diff --git a/node_modules/.bin/acorn b/node_modules/.bin/acorn deleted file mode 100644 index 679bd16..0000000 --- a/node_modules/.bin/acorn +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../acorn/bin/acorn" "$@" -else - exec node "$basedir/../acorn/bin/acorn" "$@" -fi diff --git a/node_modules/.bin/acorn.cmd b/node_modules/.bin/acorn.cmd deleted file mode 100644 index a9324df..0000000 --- a/node_modules/.bin/acorn.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\acorn\bin\acorn" %* diff --git a/node_modules/.bin/acorn.ps1 b/node_modules/.bin/acorn.ps1 deleted file mode 100644 index 6f6dcdd..0000000 --- a/node_modules/.bin/acorn.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args - } else { - & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../acorn/bin/acorn" $args - } else { - & "node$exe" "$basedir/../acorn/bin/acorn" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/json5 b/node_modules/.bin/json5 deleted file mode 100644 index abf72a4..0000000 --- a/node_modules/.bin/json5 +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../json5/lib/cli.js" "$@" -else - exec node "$basedir/../json5/lib/cli.js" "$@" -fi diff --git a/node_modules/.bin/json5.cmd b/node_modules/.bin/json5.cmd deleted file mode 100644 index 95c137f..0000000 --- a/node_modules/.bin/json5.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\json5\lib\cli.js" %* diff --git a/node_modules/.bin/json5.ps1 b/node_modules/.bin/json5.ps1 deleted file mode 100644 index 8700ddb..0000000 --- a/node_modules/.bin/json5.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args - } else { - & "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../json5/lib/cli.js" $args - } else { - & "node$exe" "$basedir/../json5/lib/cli.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/mime b/node_modules/.bin/mime deleted file mode 100644 index 7751de3..0000000 --- a/node_modules/.bin/mime +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../mime/cli.js" "$@" -else - exec node "$basedir/../mime/cli.js" "$@" -fi diff --git a/node_modules/.bin/mime.cmd b/node_modules/.bin/mime.cmd deleted file mode 100644 index 54491f1..0000000 --- a/node_modules/.bin/mime.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mime\cli.js" %* diff --git a/node_modules/.bin/mime.ps1 b/node_modules/.bin/mime.ps1 deleted file mode 100644 index 2222f40..0000000 --- a/node_modules/.bin/mime.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../mime/cli.js" $args - } else { - & "$basedir/node$exe" "$basedir/../mime/cli.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../mime/cli.js" $args - } else { - & "node$exe" "$basedir/../mime/cli.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/nodemon b/node_modules/.bin/nodemon deleted file mode 100644 index c477a18..0000000 --- a/node_modules/.bin/nodemon +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../nodemon/bin/nodemon.js" "$@" -else - exec node "$basedir/../nodemon/bin/nodemon.js" "$@" -fi diff --git a/node_modules/.bin/nodemon.cmd b/node_modules/.bin/nodemon.cmd deleted file mode 100644 index 55acf8a..0000000 --- a/node_modules/.bin/nodemon.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\nodemon\bin\nodemon.js" %* diff --git a/node_modules/.bin/nodemon.ps1 b/node_modules/.bin/nodemon.ps1 deleted file mode 100644 index d4e3f5d..0000000 --- a/node_modules/.bin/nodemon.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../nodemon/bin/nodemon.js" $args - } else { - & "$basedir/node$exe" "$basedir/../nodemon/bin/nodemon.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../nodemon/bin/nodemon.js" $args - } else { - & "node$exe" "$basedir/../nodemon/bin/nodemon.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/nodetouch b/node_modules/.bin/nodetouch deleted file mode 100644 index 3e146b4..0000000 --- a/node_modules/.bin/nodetouch +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../touch/bin/nodetouch.js" "$@" -else - exec node "$basedir/../touch/bin/nodetouch.js" "$@" -fi diff --git a/node_modules/.bin/nodetouch.cmd b/node_modules/.bin/nodetouch.cmd deleted file mode 100644 index 8298b91..0000000 --- a/node_modules/.bin/nodetouch.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\touch\bin\nodetouch.js" %* diff --git a/node_modules/.bin/nodetouch.ps1 b/node_modules/.bin/nodetouch.ps1 deleted file mode 100644 index 5f68b4c..0000000 --- a/node_modules/.bin/nodetouch.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../touch/bin/nodetouch.js" $args - } else { - & "$basedir/node$exe" "$basedir/../touch/bin/nodetouch.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../touch/bin/nodetouch.js" $args - } else { - & "node$exe" "$basedir/../touch/bin/nodetouch.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/opencollective b/node_modules/.bin/opencollective deleted file mode 100644 index bf6a4f9..0000000 --- a/node_modules/.bin/opencollective +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../@nuxt/opencollective/bin/opencollective.js" "$@" -else - exec node "$basedir/../@nuxt/opencollective/bin/opencollective.js" "$@" -fi diff --git a/node_modules/.bin/opencollective.cmd b/node_modules/.bin/opencollective.cmd deleted file mode 100644 index 2387f51..0000000 --- a/node_modules/.bin/opencollective.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\@nuxt\opencollective\bin\opencollective.js" %* diff --git a/node_modules/.bin/opencollective.ps1 b/node_modules/.bin/opencollective.ps1 deleted file mode 100644 index f26a30d..0000000 --- a/node_modules/.bin/opencollective.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../@nuxt/opencollective/bin/opencollective.js" $args - } else { - & "$basedir/node$exe" "$basedir/../@nuxt/opencollective/bin/opencollective.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../@nuxt/opencollective/bin/opencollective.js" $args - } else { - & "node$exe" "$basedir/../@nuxt/opencollective/bin/opencollective.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/semver b/node_modules/.bin/semver deleted file mode 100644 index 97c5327..0000000 --- a/node_modules/.bin/semver +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@" -else - exec node "$basedir/../semver/bin/semver.js" "$@" -fi diff --git a/node_modules/.bin/semver.cmd b/node_modules/.bin/semver.cmd deleted file mode 100644 index 9913fa9..0000000 --- a/node_modules/.bin/semver.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %* diff --git a/node_modules/.bin/semver.ps1 b/node_modules/.bin/semver.ps1 deleted file mode 100644 index 314717a..0000000 --- a/node_modules/.bin/semver.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args - } else { - & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../semver/bin/semver.js" $args - } else { - & "node$exe" "$basedir/../semver/bin/semver.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/ts-node b/node_modules/.bin/ts-node deleted file mode 100644 index f3d4fab..0000000 --- a/node_modules/.bin/ts-node +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../ts-node/dist/bin.js" "$@" -else - exec node "$basedir/../ts-node/dist/bin.js" "$@" -fi diff --git a/node_modules/.bin/ts-node-cwd b/node_modules/.bin/ts-node-cwd deleted file mode 100644 index ae68e85..0000000 --- a/node_modules/.bin/ts-node-cwd +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../ts-node/dist/bin-cwd.js" "$@" -else - exec node "$basedir/../ts-node/dist/bin-cwd.js" "$@" -fi diff --git a/node_modules/.bin/ts-node-cwd.cmd b/node_modules/.bin/ts-node-cwd.cmd deleted file mode 100644 index 50c1bbc..0000000 --- a/node_modules/.bin/ts-node-cwd.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\ts-node\dist\bin-cwd.js" %* diff --git a/node_modules/.bin/ts-node-cwd.ps1 b/node_modules/.bin/ts-node-cwd.ps1 deleted file mode 100644 index b12acfa..0000000 --- a/node_modules/.bin/ts-node-cwd.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../ts-node/dist/bin-cwd.js" $args - } else { - & "$basedir/node$exe" "$basedir/../ts-node/dist/bin-cwd.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../ts-node/dist/bin-cwd.js" $args - } else { - & "node$exe" "$basedir/../ts-node/dist/bin-cwd.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/ts-node-esm b/node_modules/.bin/ts-node-esm deleted file mode 100644 index 19ea759..0000000 --- a/node_modules/.bin/ts-node-esm +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../ts-node/dist/bin-esm.js" "$@" -else - exec node "$basedir/../ts-node/dist/bin-esm.js" "$@" -fi diff --git a/node_modules/.bin/ts-node-esm.cmd b/node_modules/.bin/ts-node-esm.cmd deleted file mode 100644 index ba439a0..0000000 --- a/node_modules/.bin/ts-node-esm.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\ts-node\dist\bin-esm.js" %* diff --git a/node_modules/.bin/ts-node-esm.ps1 b/node_modules/.bin/ts-node-esm.ps1 deleted file mode 100644 index d9806c0..0000000 --- a/node_modules/.bin/ts-node-esm.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../ts-node/dist/bin-esm.js" $args - } else { - & "$basedir/node$exe" "$basedir/../ts-node/dist/bin-esm.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../ts-node/dist/bin-esm.js" $args - } else { - & "node$exe" "$basedir/../ts-node/dist/bin-esm.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/ts-node-script b/node_modules/.bin/ts-node-script deleted file mode 100644 index 14c2f67..0000000 --- a/node_modules/.bin/ts-node-script +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../ts-node/dist/bin-script.js" "$@" -else - exec node "$basedir/../ts-node/dist/bin-script.js" "$@" -fi diff --git a/node_modules/.bin/ts-node-script.cmd b/node_modules/.bin/ts-node-script.cmd deleted file mode 100644 index 146251b..0000000 --- a/node_modules/.bin/ts-node-script.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\ts-node\dist\bin-script.js" %* diff --git a/node_modules/.bin/ts-node-script.ps1 b/node_modules/.bin/ts-node-script.ps1 deleted file mode 100644 index 3061e81..0000000 --- a/node_modules/.bin/ts-node-script.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../ts-node/dist/bin-script.js" $args - } else { - & "$basedir/node$exe" "$basedir/../ts-node/dist/bin-script.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../ts-node/dist/bin-script.js" $args - } else { - & "node$exe" "$basedir/../ts-node/dist/bin-script.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/ts-node-transpile-only b/node_modules/.bin/ts-node-transpile-only deleted file mode 100644 index d3d4c0c..0000000 --- a/node_modules/.bin/ts-node-transpile-only +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../ts-node/dist/bin-transpile.js" "$@" -else - exec node "$basedir/../ts-node/dist/bin-transpile.js" "$@" -fi diff --git a/node_modules/.bin/ts-node-transpile-only.cmd b/node_modules/.bin/ts-node-transpile-only.cmd deleted file mode 100644 index 60b2af3..0000000 --- a/node_modules/.bin/ts-node-transpile-only.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\ts-node\dist\bin-transpile.js" %* diff --git a/node_modules/.bin/ts-node-transpile-only.ps1 b/node_modules/.bin/ts-node-transpile-only.ps1 deleted file mode 100644 index 9503db4..0000000 --- a/node_modules/.bin/ts-node-transpile-only.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../ts-node/dist/bin-transpile.js" $args - } else { - & "$basedir/node$exe" "$basedir/../ts-node/dist/bin-transpile.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../ts-node/dist/bin-transpile.js" $args - } else { - & "node$exe" "$basedir/../ts-node/dist/bin-transpile.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/ts-node.cmd b/node_modules/.bin/ts-node.cmd deleted file mode 100644 index a2a9c92..0000000 --- a/node_modules/.bin/ts-node.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\ts-node\dist\bin.js" %* diff --git a/node_modules/.bin/ts-node.ps1 b/node_modules/.bin/ts-node.ps1 deleted file mode 100644 index 90517a4..0000000 --- a/node_modules/.bin/ts-node.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../ts-node/dist/bin.js" $args - } else { - & "$basedir/node$exe" "$basedir/../ts-node/dist/bin.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../ts-node/dist/bin.js" $args - } else { - & "node$exe" "$basedir/../ts-node/dist/bin.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/ts-script b/node_modules/.bin/ts-script deleted file mode 100644 index 8f65f36..0000000 --- a/node_modules/.bin/ts-script +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../ts-node/dist/bin-script-deprecated.js" "$@" -else - exec node "$basedir/../ts-node/dist/bin-script-deprecated.js" "$@" -fi diff --git a/node_modules/.bin/ts-script.cmd b/node_modules/.bin/ts-script.cmd deleted file mode 100644 index e3b0e81..0000000 --- a/node_modules/.bin/ts-script.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\ts-node\dist\bin-script-deprecated.js" %* diff --git a/node_modules/.bin/ts-script.ps1 b/node_modules/.bin/ts-script.ps1 deleted file mode 100644 index 1b348af..0000000 --- a/node_modules/.bin/ts-script.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../ts-node/dist/bin-script-deprecated.js" $args - } else { - & "$basedir/node$exe" "$basedir/../ts-node/dist/bin-script-deprecated.js" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../ts-node/dist/bin-script-deprecated.js" $args - } else { - & "node$exe" "$basedir/../ts-node/dist/bin-script-deprecated.js" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/tsc b/node_modules/.bin/tsc deleted file mode 100644 index c4864b9..0000000 --- a/node_modules/.bin/tsc +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@" -else - exec node "$basedir/../typescript/bin/tsc" "$@" -fi diff --git a/node_modules/.bin/tsc.cmd b/node_modules/.bin/tsc.cmd deleted file mode 100644 index 40bf128..0000000 --- a/node_modules/.bin/tsc.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\typescript\bin\tsc" %* diff --git a/node_modules/.bin/tsc.ps1 b/node_modules/.bin/tsc.ps1 deleted file mode 100644 index 112413b..0000000 --- a/node_modules/.bin/tsc.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../typescript/bin/tsc" $args - } else { - & "$basedir/node$exe" "$basedir/../typescript/bin/tsc" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../typescript/bin/tsc" $args - } else { - & "node$exe" "$basedir/../typescript/bin/tsc" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/tsserver b/node_modules/.bin/tsserver deleted file mode 100644 index 6c19ce3..0000000 --- a/node_modules/.bin/tsserver +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@" -else - exec node "$basedir/../typescript/bin/tsserver" "$@" -fi diff --git a/node_modules/.bin/tsserver.cmd b/node_modules/.bin/tsserver.cmd deleted file mode 100644 index 57f851f..0000000 --- a/node_modules/.bin/tsserver.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\typescript\bin\tsserver" %* diff --git a/node_modules/.bin/tsserver.ps1 b/node_modules/.bin/tsserver.ps1 deleted file mode 100644 index 249f417..0000000 --- a/node_modules/.bin/tsserver.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args - } else { - & "$basedir/node$exe" "$basedir/../typescript/bin/tsserver" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../typescript/bin/tsserver" $args - } else { - & "node$exe" "$basedir/../typescript/bin/tsserver" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.bin/uuid b/node_modules/.bin/uuid deleted file mode 100644 index 26eb018..0000000 --- a/node_modules/.bin/uuid +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../uuid/dist-node/bin/uuid" "$@" -else - exec node "$basedir/../uuid/dist-node/bin/uuid" "$@" -fi diff --git a/node_modules/.bin/uuid.cmd b/node_modules/.bin/uuid.cmd deleted file mode 100644 index 91d932f..0000000 --- a/node_modules/.bin/uuid.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\uuid\dist-node\bin\uuid" %* diff --git a/node_modules/.bin/uuid.ps1 b/node_modules/.bin/uuid.ps1 deleted file mode 100644 index 42eab25..0000000 --- a/node_modules/.bin/uuid.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../uuid/dist-node/bin/uuid" $args - } else { - & "$basedir/node$exe" "$basedir/../uuid/dist-node/bin/uuid" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../uuid/dist-node/bin/uuid" $args - } else { - & "node$exe" "$basedir/../uuid/dist-node/bin/uuid" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json deleted file mode 100644 index cba97d8..0000000 --- a/node_modules/.package-lock.json +++ /dev/null @@ -1,2886 +0,0 @@ -{ - "name": "planner", - "version": "0.1.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "node_modules/@borewit/text-codec": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@borewit/text-codec/-/text-codec-0.2.2.tgz", - "integrity": "sha512-DDaRehssg1aNrH4+2hnj1B7vnUGEjU6OIlyRdkMd0aUdIUvKXrJfXsy8LVtXAy7DRvYVluWbMspsRhz2lcW0mQ==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", - "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", - "dev": true, - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "node_modules/@lukeed/csprng": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@lukeed/csprng/-/csprng-1.1.0.tgz", - "integrity": "sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@mikro-orm/core": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@mikro-orm/core/-/core-7.0.2.tgz", - "integrity": "sha512-OzbvkyPiJnQhLpdbWcYQPh41v1jmv1KKrtJm9Irf1H7e55Kk5W2fogy74OOPIQN2mWpBz7VP6iz+o/ncEX29PQ==", - "license": "MIT", - "engines": { - "node": ">= 22.17.0" - }, - "funding": { - "url": "https://github.com/sponsors/b4nan" - }, - "peerDependencies": { - "dataloader": "2.2.3" - }, - "peerDependenciesMeta": { - "dataloader": { - "optional": true - } - } - }, - "node_modules/@mikro-orm/decorators": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@mikro-orm/decorators/-/decorators-7.0.2.tgz", - "integrity": "sha512-La38yXtp+Xt9+hu8GPKaKC/zoAzdUG/hYwSquxFgm0jU3Sy8FaBL6GzbX7gb7RxMOr88j9MFQfUsko3r7lO7zg==", - "license": "MIT", - "engines": { - "node": ">= 22.17.0" - }, - "funding": { - "url": "https://github.com/sponsors/b4nan" - }, - "peerDependencies": { - "@mikro-orm/core": "7.0.2", - "reflect-metadata": "^0.1.0 || ^0.2.0" - }, - "peerDependenciesMeta": { - "reflect-metadata": { - "optional": true - } - } - }, - "node_modules/@mikro-orm/nestjs": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@mikro-orm/nestjs/-/nestjs-7.0.1.tgz", - "integrity": "sha512-0VWaGIsVLMI6XDrrblX5om5lyf4msjlRu405jtuUYQ+nULK+XU2gb2mvzo7UvYZd//eEoXtMlkY5oEykm5Hriw==", - "license": "MIT", - "engines": { - "node": ">= 22.17.0" - }, - "peerDependencies": { - "@mikro-orm/core": "^7.0.0 || ^7.0.0-dev.0", - "@nestjs/common": "^11.0.5", - "@nestjs/core": "^11.0.5", - "reflect-metadata": "^0.1.0 || ^0.2.0" - } - }, - "node_modules/@mikro-orm/postgresql": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@mikro-orm/postgresql/-/postgresql-7.0.2.tgz", - "integrity": "sha512-x3eZbkbmAa4BcYeE85/I1VIB/xtnLrCtsOLxr/TPwXg1FrnSWTz+ba+p/Qn5u1PvW6/uAjfK1SZgCckoEjCKsA==", - "license": "MIT", - "dependencies": { - "@mikro-orm/sql": "7.0.2", - "kysely": "0.28.12", - "pg": "8.20.0", - "pg-cursor": "2.19.0", - "postgres-array": "3.0.4", - "postgres-date": "2.1.0", - "postgres-interval": "4.0.2" - }, - "engines": { - "node": ">= 22.17.0" - }, - "peerDependencies": { - "@mikro-orm/core": "7.0.2" - } - }, - "node_modules/@mikro-orm/postgresql/node_modules/postgres-array": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-3.0.4.tgz", - "integrity": "sha512-nAUSGfSDGOaOAEGwqsRY27GPOea7CNipJPOA7lPbdEpx5Kg3qzdP0AaWC5MlhTWV9s4hFX39nomVZ+C4tnGOJQ==", - "license": "MIT", - "engines": { - "node": ">=12" - } - }, - "node_modules/@mikro-orm/postgresql/node_modules/postgres-date": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-2.1.0.tgz", - "integrity": "sha512-K7Juri8gtgXVcDfZttFKVmhglp7epKb1K4pgrkLxehjqkrgPhfG6OO8LHLkfaqkbpjNRnra018XwAr1yQFWGcA==", - "license": "MIT", - "engines": { - "node": ">=12" - } - }, - "node_modules/@mikro-orm/postgresql/node_modules/postgres-interval": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-4.0.2.tgz", - "integrity": "sha512-EMsphSQ1YkQqKZL2cuG0zHkmjCCzQqQ71l2GXITqRwjhRleCdv00bDk/ktaSi0LnlaPzAc3535KTrjXsTdtx7A==", - "license": "MIT", - "engines": { - "node": ">=12" - } - }, - "node_modules/@mikro-orm/sql": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@mikro-orm/sql/-/sql-7.0.2.tgz", - "integrity": "sha512-qWCtHdjgvDYHIaJDvgY0uEu4O3hzlTJn6nrfyGxHC2d3VGbAdx8UNSq8icNmb40CO8IK4MjbwOssUqcaDLwStQ==", - "license": "MIT", - "dependencies": { - "kysely": "0.28.12" - }, - "engines": { - "node": ">= 22.17.0" - }, - "peerDependencies": { - "@mikro-orm/core": "7.0.2" - } - }, - "node_modules/@nestjs/common": { - "version": "11.1.17", - "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-11.1.17.tgz", - "integrity": "sha512-hLODw5Abp8OQgA+mUO4tHou4krKgDtUcM9j5Ihxncst9XeyxYBTt2bwZm4e4EQr5E352S4Fyy6V3iFx9ggxKAg==", - "license": "MIT", - "dependencies": { - "file-type": "21.3.2", - "iterare": "1.2.1", - "load-esm": "1.0.3", - "tslib": "2.8.1", - "uid": "2.0.2" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/nest" - }, - "peerDependencies": { - "class-transformer": ">=0.4.1", - "class-validator": ">=0.13.2", - "reflect-metadata": "^0.1.12 || ^0.2.0", - "rxjs": "^7.1.0" - }, - "peerDependenciesMeta": { - "class-transformer": { - "optional": true - }, - "class-validator": { - "optional": true - } - } - }, - "node_modules/@nestjs/core": { - "version": "11.1.17", - "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-11.1.17.tgz", - "integrity": "sha512-lD5mAYekTTurF3vDaa8C2OKPnjiz4tsfxIc5XlcSUzOhkwWf6Ay3HKvt6FmvuWQam6uIIHX52Clg+e6tAvf/cg==", - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "@nuxt/opencollective": "0.4.1", - "fast-safe-stringify": "2.1.1", - "iterare": "1.2.1", - "path-to-regexp": "8.3.0", - "tslib": "2.8.1", - "uid": "2.0.2" - }, - "engines": { - "node": ">= 20" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/nest" - }, - "peerDependencies": { - "@nestjs/common": "^11.0.0", - "@nestjs/microservices": "^11.0.0", - "@nestjs/platform-express": "^11.0.0", - "@nestjs/websockets": "^11.0.0", - "reflect-metadata": "^0.1.12 || ^0.2.0", - "rxjs": "^7.1.0" - }, - "peerDependenciesMeta": { - "@nestjs/microservices": { - "optional": true - }, - "@nestjs/platform-express": { - "optional": true - }, - "@nestjs/websockets": { - "optional": true - } - } - }, - "node_modules/@nestjs/event-emitter": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@nestjs/event-emitter/-/event-emitter-3.0.1.tgz", - "integrity": "sha512-0Ln/x+7xkU6AJFOcQI9tIhUMXVF7D5itiaQGOyJbXtlAfAIt8gzDdJm+Im7cFzKoWkiW5nCXCPh6GSvdQd/3Dw==", - "license": "MIT", - "dependencies": { - "eventemitter2": "6.4.9" - }, - "peerDependencies": { - "@nestjs/common": "^10.0.0 || ^11.0.0", - "@nestjs/core": "^10.0.0 || ^11.0.0" - } - }, - "node_modules/@nestjs/platform-express": { - "version": "11.1.17", - "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-11.1.17.tgz", - "integrity": "sha512-mAf4eOsSBsTOn/VbrUO1gsjW6dVh91qqXPMXun4dN8SnNjf7PTQagM9o8d6ab8ZBpNe6UdZftdrZoDetU+n4Qg==", - "license": "MIT", - "dependencies": { - "cors": "2.8.6", - "express": "5.2.1", - "multer": "2.1.1", - "path-to-regexp": "8.3.0", - "tslib": "2.8.1" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/nest" - }, - "peerDependencies": { - "@nestjs/common": "^11.0.0", - "@nestjs/core": "^11.0.0" - } - }, - "node_modules/@nestjs/platform-express/node_modules/accepts": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", - "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", - "license": "MIT", - "dependencies": { - "mime-types": "^3.0.0", - "negotiator": "^1.0.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/@nestjs/platform-express/node_modules/body-parser": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz", - "integrity": "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==", - "license": "MIT", - "dependencies": { - "bytes": "^3.1.2", - "content-type": "^1.0.5", - "debug": "^4.4.3", - "http-errors": "^2.0.0", - "iconv-lite": "^0.7.0", - "on-finished": "^2.4.1", - "qs": "^6.14.1", - "raw-body": "^3.0.1", - "type-is": "^2.0.1" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/@nestjs/platform-express/node_modules/content-disposition": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz", - "integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/@nestjs/platform-express/node_modules/cookie-signature": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", - "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", - "license": "MIT", - "engines": { - "node": ">=6.6.0" - } - }, - "node_modules/@nestjs/platform-express/node_modules/debug": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", - "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/@nestjs/platform-express/node_modules/express": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz", - "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==", - "license": "MIT", - "dependencies": { - "accepts": "^2.0.0", - "body-parser": "^2.2.1", - "content-disposition": "^1.0.0", - "content-type": "^1.0.5", - "cookie": "^0.7.1", - "cookie-signature": "^1.2.1", - "debug": "^4.4.0", - "depd": "^2.0.0", - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "etag": "^1.8.1", - "finalhandler": "^2.1.0", - "fresh": "^2.0.0", - "http-errors": "^2.0.0", - "merge-descriptors": "^2.0.0", - "mime-types": "^3.0.0", - "on-finished": "^2.4.1", - "once": "^1.4.0", - "parseurl": "^1.3.3", - "proxy-addr": "^2.0.7", - "qs": "^6.14.0", - "range-parser": "^1.2.1", - "router": "^2.2.0", - "send": "^1.1.0", - "serve-static": "^2.2.0", - "statuses": "^2.0.1", - "type-is": "^2.0.1", - "vary": "^1.1.2" - }, - "engines": { - "node": ">= 18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/@nestjs/platform-express/node_modules/finalhandler": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz", - "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==", - "license": "MIT", - "dependencies": { - "debug": "^4.4.0", - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "on-finished": "^2.4.1", - "parseurl": "^1.3.3", - "statuses": "^2.0.1" - }, - "engines": { - "node": ">= 18.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/@nestjs/platform-express/node_modules/fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", - "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/@nestjs/platform-express/node_modules/iconv-lite": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", - "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/@nestjs/platform-express/node_modules/media-typer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", - "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/@nestjs/platform-express/node_modules/merge-descriptors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", - "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@nestjs/platform-express/node_modules/mime-db": { - "version": "1.54.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", - "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/@nestjs/platform-express/node_modules/mime-types": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", - "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", - "license": "MIT", - "dependencies": { - "mime-db": "^1.54.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/@nestjs/platform-express/node_modules/negotiator": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", - "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/@nestjs/platform-express/node_modules/raw-body": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz", - "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==", - "license": "MIT", - "dependencies": { - "bytes": "~3.1.2", - "http-errors": "~2.0.1", - "iconv-lite": "~0.7.0", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/@nestjs/platform-express/node_modules/send": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz", - "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==", - "license": "MIT", - "dependencies": { - "debug": "^4.4.3", - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "etag": "^1.8.1", - "fresh": "^2.0.0", - "http-errors": "^2.0.1", - "mime-types": "^3.0.2", - "ms": "^2.1.3", - "on-finished": "^2.4.1", - "range-parser": "^1.2.1", - "statuses": "^2.0.2" - }, - "engines": { - "node": ">= 18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/@nestjs/platform-express/node_modules/serve-static": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz", - "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==", - "license": "MIT", - "dependencies": { - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "parseurl": "^1.3.3", - "send": "^1.2.0" - }, - "engines": { - "node": ">= 18" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/@nestjs/platform-express/node_modules/type-is": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", - "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", - "license": "MIT", - "dependencies": { - "content-type": "^1.0.5", - "media-typer": "^1.1.0", - "mime-types": "^3.0.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/@nestjs/serve-static": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@nestjs/serve-static/-/serve-static-5.0.4.tgz", - "integrity": "sha512-3kO1M9D3vsPyWPFardxIjUYeuolS58PnhCoBTkS7t3BrdZFZCKHnBZ15js+UOzOR2Q6HmD7ssGjLd0DVYVdvOw==", - "license": "MIT", - "dependencies": { - "path-to-regexp": "8.3.0" - }, - "peerDependencies": { - "@fastify/static": "^8.0.4", - "@nestjs/common": "^11.0.2", - "@nestjs/core": "^11.0.2", - "express": "^5.0.1", - "fastify": "^5.2.1" - }, - "peerDependenciesMeta": { - "@fastify/static": { - "optional": true - }, - "express": { - "optional": true - }, - "fastify": { - "optional": true - } - } - }, - "node_modules/@nuxt/opencollective": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@nuxt/opencollective/-/opencollective-0.4.1.tgz", - "integrity": "sha512-GXD3wy50qYbxCJ652bDrDzgMr3NFEkIS374+IgFQKkCvk9yiYcLvX2XDYr7UyQxf4wK0e+yqDYRubZ0DtOxnmQ==", - "license": "MIT", - "dependencies": { - "consola": "^3.2.3" - }, - "bin": { - "opencollective": "bin/opencollective.js" - }, - "engines": { - "node": "^14.18.0 || >=16.10.0", - "npm": ">=5.10.0" - } - }, - "node_modules/@tokenizer/inflate": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@tokenizer/inflate/-/inflate-0.4.1.tgz", - "integrity": "sha512-2mAv+8pkG6GIZiF1kNg1jAjh27IDxEPKwdGul3snfztFerfPGI1LjDezZp3i7BElXompqEtPmoPx6c2wgtWsOA==", - "license": "MIT", - "dependencies": { - "debug": "^4.4.3", - "token-types": "^6.1.1" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, - "node_modules/@tokenizer/inflate/node_modules/debug": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", - "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/@tokenizer/token": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", - "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==", - "license": "MIT" - }, - "node_modules/@tsconfig/node10": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.12.tgz", - "integrity": "sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true, - "license": "MIT" - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/body-parser": { - "version": "1.19.6", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz", - "integrity": "sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "node_modules/@types/connect": { - "version": "3.4.38", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", - "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/express": { - "version": "4.17.25", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.25.tgz", - "integrity": "sha512-dVd04UKsfpINUnK0yBoYHDF3xu7xVH4BuDotC/xGuycx4CgbP48X/KF/586bcObxT0HENHXEU8Nqtu6NR+eKhw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.33", - "@types/qs": "*", - "@types/serve-static": "^1" - } - }, - "node_modules/@types/express-serve-static-core": { - "version": "4.19.8", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.8.tgz", - "integrity": "sha512-02S5fmqeoKzVZCHPZid4b8JH2eM5HzQLZWN2FohQEy/0eXTq8VXZfSN6Pcr3F6N9R/vNrj7cpgbhjie6m/1tCA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*", - "@types/send": "*" - } - }, - "node_modules/@types/http-errors": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.5.tgz", - "integrity": "sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/jsonwebtoken": { - "version": "9.0.10", - "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.10.tgz", - "integrity": "sha512-asx5hIG9Qmf/1oStypjanR7iKTv0gXQ1Ov/jfrX6kS/EO0OFni8orbmGCn0672NHR3kXHwpAwR+B368ZGN/2rA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/ms": "*", - "@types/node": "*" - } - }, - "node_modules/@types/mime": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", - "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/ms": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz", - "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "20.19.37", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.37.tgz", - "integrity": "sha512-8kzdPJ3FsNsVIurqBs7oodNnCEVbni9yUEkaHbgptDACOPW04jimGagZ51E6+lXUwJjgnBw+hyko/lkFWCldqw==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~6.21.0" - } - }, - "node_modules/@types/qs": { - "version": "6.15.0", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.15.0.tgz", - "integrity": "sha512-JawvT8iBVWpzTrz3EGw9BTQFg3BQNmwERdKE22vlTxawwtbyUSlMppvZYKLZzB5zgACXdXxbD3m1bXaMqP/9ow==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/range-parser": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", - "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/send": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@types/send/-/send-1.2.1.tgz", - "integrity": "sha512-arsCikDvlU99zl1g69TcAB3mzZPpxgw0UQnaHeC1Nwb015xp8bknZv5rIfri9xTOcMuaVgvabfIRA7PSZVuZIQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/serve-static": { - "version": "1.15.10", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.10.tgz", - "integrity": "sha512-tRs1dB+g8Itk72rlSI2ZrW6vZg0YrLI81iQSTkMmOqnqCaNr/8Ek4VwWcN5vZgCYWbg/JJSGBlUaYGAOP73qBw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/http-errors": "*", - "@types/node": "*", - "@types/send": "<1" - } - }, - "node_modules/@types/serve-static/node_modules/@types/send": { - "version": "0.17.6", - "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.6.tgz", - "integrity": "sha512-Uqt8rPBE8SY0RK8JB1EzVOIZ32uqy8HwdxCnoCOsYrvnswqmFZ/k+9Ikidlk/ImhsdvBsloHbAlewb2IEBV/Og==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/mime": "^1", - "@types/node": "*" - } - }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "license": "MIT", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/acorn": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", - "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "license": "ISC", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/append-field": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz", - "integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==", - "license": "MIT" - }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true, - "license": "MIT" - }, - "node_modules/array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "license": "MIT" - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/body-parser": { - "version": "1.20.4", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.4.tgz", - "integrity": "sha512-ZTgYYLMOXY9qKU/57FAo8F+HA2dGX7bqGc71txDRC1rS4frdFI5R7NhluHxH6M0YItAP0sHB4uqAOcYKxO6uGA==", - "license": "MIT", - "dependencies": { - "bytes": "~3.1.2", - "content-type": "~1.0.5", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "~1.2.0", - "http-errors": "~2.0.1", - "iconv-lite": "~0.4.24", - "on-finished": "~2.4.1", - "qs": "~6.14.0", - "raw-body": "~2.5.3", - "type-is": "~1.6.18", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, - "node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/buffer-equal-constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", - "license": "BSD-3-Clause" - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "license": "MIT" - }, - "node_modules/busboy": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", - "dependencies": { - "streamsearch": "^1.1.0" - }, - "engines": { - "node": ">=10.16.0" - } - }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/call-bound": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", - "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "get-intrinsic": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, - "node_modules/concat-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", - "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", - "engines": [ - "node >= 6.0" - ], - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.0.2", - "typedarray": "^0.0.6" - } - }, - "node_modules/consola": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", - "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", - "license": "MIT", - "engines": { - "node": "^14.18.0 || >=16.10.0" - } - }, - "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "license": "MIT", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", - "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie-signature": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz", - "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==", - "license": "MIT" - }, - "node_modules/cors": { - "version": "2.8.6", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.6.tgz", - "integrity": "sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==", - "license": "MIT", - "dependencies": { - "object-assign": "^4", - "vary": "^1" - }, - "engines": { - "node": ">= 0.10" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "license": "MIT", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/diff": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.4.tgz", - "integrity": "sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/ecdsa-sig-formatter": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", - "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", - "license": "Apache-2.0", - "dependencies": { - "safe-buffer": "^5.0.1" - } - }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "license": "MIT" - }, - "node_modules/encodeurl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", - "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-object-atoms": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", - "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "license": "MIT" - }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/eventemitter2": { - "version": "6.4.9", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.9.tgz", - "integrity": "sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==", - "license": "MIT" - }, - "node_modules/express": { - "version": "4.22.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.22.1.tgz", - "integrity": "sha512-F2X8g9P1X7uCPZMA3MVf9wcTqlyNp7IhH5qPCI0izhaOIYXaW9L535tGA3qmjRzpH+bZczqq7hVKxTR4NWnu+g==", - "license": "MIT", - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "~1.20.3", - "content-disposition": "~0.5.4", - "content-type": "~1.0.4", - "cookie": "~0.7.1", - "cookie-signature": "~1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.3.1", - "fresh": "~0.5.2", - "http-errors": "~2.0.0", - "merge-descriptors": "1.0.3", - "methods": "~1.1.2", - "on-finished": "~2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "~0.1.12", - "proxy-addr": "~2.0.7", - "qs": "~6.14.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "~0.19.0", - "serve-static": "~1.16.2", - "setprototypeof": "1.2.0", - "statuses": "~2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/express/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/express/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, - "node_modules/express/node_modules/path-to-regexp": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", - "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", - "license": "MIT" - }, - "node_modules/fast-safe-stringify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", - "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", - "license": "MIT" - }, - "node_modules/file-type": { - "version": "21.3.2", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-21.3.2.tgz", - "integrity": "sha512-DLkUvGwep3poOV2wpzbHCOnSKGk1LzyXTv+aHFgN2VFl96wnp8YA9YjO2qPzg5PuL8q/SW9Pdi6WTkYOIh995w==", - "license": "MIT", - "dependencies": { - "@tokenizer/inflate": "^0.4.1", - "strtok3": "^10.3.4", - "token-types": "^6.1.1", - "uint8array-extras": "^1.4.0" - }, - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sindresorhus/file-type?sponsor=1" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/finalhandler": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.2.tgz", - "integrity": "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "on-finished": "~2.4.1", - "parseurl": "~1.3.3", - "statuses": "~2.0.2", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "ideallyInert": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-intrinsic": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", - "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/http-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", - "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", - "license": "MIT", - "dependencies": { - "depd": "~2.0.0", - "inherits": "~2.0.4", - "setprototypeof": "~1.2.0", - "statuses": "~2.0.2", - "toidentifier": "~1.0.1" - }, - "engines": { - "node": ">= 0.8" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, - "node_modules/ignore-by-default": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", - "dev": true, - "license": "ISC" - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "license": "ISC" - }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-promise": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", - "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", - "license": "MIT" - }, - "node_modules/iterare": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.1.tgz", - "integrity": "sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==", - "license": "ISC", - "engines": { - "node": ">=6" - } - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonwebtoken": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.3.tgz", - "integrity": "sha512-MT/xP0CrubFRNLNKvxJ2BYfy53Zkm++5bX9dtuPbqAeQpTVe0MQTFhao8+Cp//EmJp244xt6Drw/GVEGCUj40g==", - "license": "MIT", - "dependencies": { - "jws": "^4.0.1", - "lodash.includes": "^4.3.0", - "lodash.isboolean": "^3.0.3", - "lodash.isinteger": "^4.0.4", - "lodash.isnumber": "^3.0.3", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.once": "^4.0.0", - "ms": "^2.1.1", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=12", - "npm": ">=6" - } - }, - "node_modules/jwa": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.1.tgz", - "integrity": "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg==", - "license": "MIT", - "dependencies": { - "buffer-equal-constant-time": "^1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/jws": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.1.tgz", - "integrity": "sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA==", - "license": "MIT", - "dependencies": { - "jwa": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/kysely": { - "version": "0.28.12", - "resolved": "https://registry.npmjs.org/kysely/-/kysely-0.28.12.tgz", - "integrity": "sha512-kWiueDWXhbCchgiotwXkwdxZE/6h56IHAeFWg4euUfW0YsmO9sxbAxzx1KLLv2lox15EfuuxHQvgJ1qIfZuHGw==", - "license": "MIT", - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/load-esm": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/load-esm/-/load-esm-1.0.3.tgz", - "integrity": "sha512-v5xlu8eHD1+6r8EHTg6hfmO97LN8ugKtiXcy5e6oN72iD2r6u0RPfLl6fxM+7Wnh2ZRq15o0russMst44WauPA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - }, - { - "type": "buymeacoffee", - "url": "https://buymeacoffee.com/borewit" - } - ], - "license": "MIT", - "engines": { - "node": ">=13.2.0" - } - }, - "node_modules/lodash.includes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", - "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", - "license": "MIT" - }, - "node_modules/lodash.isboolean": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==", - "license": "MIT" - }, - "node_modules/lodash.isinteger": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", - "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==", - "license": "MIT" - }, - "node_modules/lodash.isnumber": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", - "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==", - "license": "MIT" - }, - "node_modules/lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", - "license": "MIT" - }, - "node_modules/lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", - "license": "MIT" - }, - "node_modules/lodash.once": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", - "license": "MIT" - }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true, - "license": "ISC" - }, - "node_modules/math-intrinsics": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/merge-descriptors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", - "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "license": "MIT", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimatch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", - "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" - }, - "node_modules/multer": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/multer/-/multer-2.1.1.tgz", - "integrity": "sha512-mo+QTzKlx8R7E5ylSXxWzGoXoZbOsRMpyitcht8By2KHvMbf3tjwosZ/Mu/XYU6UuJ3VZnODIrak5ZrPiPyB6A==", - "license": "MIT", - "dependencies": { - "append-field": "^1.0.0", - "busboy": "^1.6.0", - "concat-stream": "^2.0.0", - "type-is": "^1.6.18" - }, - "engines": { - "node": ">= 10.16.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/nodemon": { - "version": "2.0.22", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz", - "integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "chokidar": "^3.5.2", - "debug": "^3.2.7", - "ignore-by-default": "^1.0.1", - "minimatch": "^3.1.2", - "pstree.remy": "^1.1.8", - "semver": "^5.7.1", - "simple-update-notifier": "^1.0.7", - "supports-color": "^5.5.0", - "touch": "^3.1.0", - "undefsafe": "^2.0.5" - }, - "bin": { - "nodemon": "bin/nodemon.js" - }, - "engines": { - "node": ">=8.10.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/nodemon" - } - }, - "node_modules/nodemon/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/nodemon/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/nodemon/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-inspect": { - "version": "1.13.4", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", - "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/path-to-regexp": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz", - "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==", - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/pg": { - "version": "8.20.0", - "resolved": "https://registry.npmjs.org/pg/-/pg-8.20.0.tgz", - "integrity": "sha512-ldhMxz2r8fl/6QkXnBD3CR9/xg694oT6DZQ2s6c/RI28OjtSOpxnPrUCGOBJ46RCUxcWdx3p6kw/xnDHjKvaRA==", - "license": "MIT", - "dependencies": { - "pg-connection-string": "^2.12.0", - "pg-pool": "^3.13.0", - "pg-protocol": "^1.13.0", - "pg-types": "2.2.0", - "pgpass": "1.0.5" - }, - "engines": { - "node": ">= 16.0.0" - }, - "optionalDependencies": { - "pg-cloudflare": "^1.3.0" - }, - "peerDependencies": { - "pg-native": ">=3.0.1" - }, - "peerDependenciesMeta": { - "pg-native": { - "optional": true - } - } - }, - "node_modules/pg-cloudflare": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.3.0.tgz", - "integrity": "sha512-6lswVVSztmHiRtD6I8hw4qP/nDm1EJbKMRhf3HCYaqud7frGysPv7FYJ5noZQdhQtN2xJnimfMtvQq21pdbzyQ==", - "license": "MIT", - "optional": true - }, - "node_modules/pg-connection-string": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.12.0.tgz", - "integrity": "sha512-U7qg+bpswf3Cs5xLzRqbXbQl85ng0mfSV/J0nnA31MCLgvEaAo7CIhmeyrmJpOr7o+zm0rXK+hNnT5l9RHkCkQ==", - "license": "MIT" - }, - "node_modules/pg-cursor": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/pg-cursor/-/pg-cursor-2.19.0.tgz", - "integrity": "sha512-J5cF1MUz7LRJ9emOqF/06QjabMHMZy587rSPF0UuA8rCwKeeYl2co8Pp+6k5UU9YrAYHMzWkLxilfZB0hqsWWw==", - "license": "MIT", - "peerDependencies": { - "pg": "^8" - } - }, - "node_modules/pg-int8": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", - "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", - "license": "ISC", - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/pg-pool": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.13.0.tgz", - "integrity": "sha512-gB+R+Xud1gLFuRD/QgOIgGOBE2KCQPaPwkzBBGC9oG69pHTkhQeIuejVIk3/cnDyX39av2AxomQiyPT13WKHQA==", - "license": "MIT", - "peerDependencies": { - "pg": ">=8.0" - } - }, - "node_modules/pg-protocol": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.13.0.tgz", - "integrity": "sha512-zzdvXfS6v89r6v7OcFCHfHlyG/wvry1ALxZo4LqgUoy7W9xhBDMaqOuMiF3qEV45VqsN6rdlcehHrfDtlCPc8w==", - "license": "MIT" - }, - "node_modules/pg-types": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", - "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", - "license": "MIT", - "dependencies": { - "pg-int8": "1.0.1", - "postgres-array": "~2.0.0", - "postgres-bytea": "~1.0.0", - "postgres-date": "~1.0.4", - "postgres-interval": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/pgpass": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz", - "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==", - "license": "MIT", - "dependencies": { - "split2": "^4.1.0" - } - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/postgres-array": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", - "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/postgres-bytea": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.1.tgz", - "integrity": "sha512-5+5HqXnsZPE65IJZSMkZtURARZelel2oXUEO8rH83VS/hxH5vv1uHquPg5wZs8yMAfdv971IU+kcPUczi7NVBQ==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/postgres-date": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", - "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/postgres-interval": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", - "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", - "license": "MIT", - "dependencies": { - "xtend": "^4.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "license": "MIT", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/pstree.remy": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", - "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", - "dev": true, - "license": "MIT" - }, - "node_modules/qs": { - "version": "6.14.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.2.tgz", - "integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==", - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz", - "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==", - "license": "MIT", - "dependencies": { - "bytes": "~3.1.2", - "http-errors": "~2.0.1", - "iconv-lite": "~0.4.24", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/reflect-metadata": { - "version": "0.1.14", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.14.tgz", - "integrity": "sha512-ZhYeb6nRaXCfhnndflDK8qI6ZQ/YcWZCISRAWICW9XYqMUwjZM9Z0DveWX/ABN01oxSHwVxKQmxeYZSsm0jh5A==", - "license": "Apache-2.0" - }, - "node_modules/router": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", - "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", - "license": "MIT", - "dependencies": { - "debug": "^4.4.0", - "depd": "^2.0.0", - "is-promise": "^4.0.0", - "parseurl": "^1.3.3", - "path-to-regexp": "^8.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/router/node_modules/debug": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", - "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/rxjs": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", - "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "license": "MIT" - }, - "node_modules/semver": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", - "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/send": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.19.2.tgz", - "integrity": "sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "~0.5.2", - "http-errors": "~2.0.1", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "~2.4.1", - "range-parser": "~1.2.1", - "statuses": "~2.0.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, - "node_modules/serve-static": { - "version": "1.16.3", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.3.tgz", - "integrity": "sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==", - "license": "MIT", - "dependencies": { - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "~0.19.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "license": "ISC" - }, - "node_modules/side-channel": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", - "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3", - "side-channel-list": "^1.0.0", - "side-channel-map": "^1.0.1", - "side-channel-weakmap": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-list": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", - "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", - "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-weakmap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", - "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3", - "side-channel-map": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/simple-update-notifier": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz", - "integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "~7.0.0" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/simple-update-notifier/node_modules/semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/split2": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", - "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", - "license": "ISC", - "engines": { - "node": ">= 10.x" - } - }, - "node_modules/statuses": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", - "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/streamsearch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/strtok3": { - "version": "10.3.4", - "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-10.3.4.tgz", - "integrity": "sha512-KIy5nylvC5le1OdaaoCJ07L+8iQzJHGH6pWDuzS+d07Cu7n1MZ2x26P8ZKIWfbK02+XIL8Mp4RkWeqdUCrDMfg==", - "license": "MIT", - "dependencies": { - "@tokenizer/token": "^0.3.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "license": "MIT", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/token-types": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/token-types/-/token-types-6.1.2.tgz", - "integrity": "sha512-dRXchy+C0IgK8WPC6xvCHFRIWYUbqqdEIKPaKo/AcTUNzwLTK6AH7RjdLWsEZcAN/TBdtfUw3PYEgPr5VPr6ww==", - "license": "MIT", - "dependencies": { - "@borewit/text-codec": "^0.2.1", - "@tokenizer/token": "^0.3.0", - "ieee754": "^1.2.1" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, - "node_modules/touch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz", - "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", - "dev": true, - "license": "ISC", - "bin": { - "nodetouch": "bin/nodetouch.js" - } - }, - "node_modules/ts-node": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", - "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "node_modules/tsconfig-paths": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", - "integrity": "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==", - "dev": true, - "license": "MIT", - "dependencies": { - "json5": "^2.2.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "license": "MIT", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", - "license": "MIT" - }, - "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/uid": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/uid/-/uid-2.0.2.tgz", - "integrity": "sha512-u3xV3X7uzvi5b1MncmZo3i2Aw222Zk1keqLA1YkHldREkAhAqi65wuPfe7lHx8H/Wzy+8CE7S7uS3jekIM5s8g==", - "license": "MIT", - "dependencies": { - "@lukeed/csprng": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/uint8array-extras": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/uint8array-extras/-/uint8array-extras-1.5.0.tgz", - "integrity": "sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/undefsafe": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", - "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", - "dev": true, - "license": "MIT" - }, - "node_modules/undici-types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", - "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "license": "MIT" - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "license": "MIT", - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/uuid": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-13.0.0.tgz", - "integrity": "sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist-node/bin/uuid" - } - }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true, - "license": "MIT" - }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "license": "ISC" - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "license": "MIT", - "engines": { - "node": ">=0.4" - } - }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - } - } -} diff --git a/node_modules/@borewit/text-codec/LICENSE.txt b/node_modules/@borewit/text-codec/LICENSE.txt deleted file mode 100644 index 3888b0e..0000000 --- a/node_modules/@borewit/text-codec/LICENSE.txt +++ /dev/null @@ -1,9 +0,0 @@ -The MIT License (MIT) - -Copyright © 2025 Borewit - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@borewit/text-codec/README.md b/node_modules/@borewit/text-codec/README.md deleted file mode 100644 index cc538af..0000000 --- a/node_modules/@borewit/text-codec/README.md +++ /dev/null @@ -1,87 +0,0 @@ -[![CI](https://github.com/Borewit/text-codec/actions/workflows/ci.yml/badge.svg)](https://github.com/Borewit/text-codec/actions/workflows/ci.yml) -[![npm version](https://img.shields.io/npm/v/%40borewit%2Ftext-codec.svg)](https://www.npmjs.com/package/@borewit/text-codec) -[![npm downloads](http://img.shields.io/npm/dm/@borewit/text-codec.svg)](https://npmcharts.com/compare/@borewit/text-codec?interval=30) -![bundlejs](https://deno.bundlejs.com/?q=@borewit/text-codec&badge) -[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?logo=open-source-initiative&logoColor=white)](LICENSE.txt) - -# `@borewit/text-codec` - -A **lightweight polyfill for text encoders and decoders** covering a small set of commonly used encodings. - -Some JavaScript runtimes provide limited or inconsistent encoding support through `TextEncoder` and `TextDecoder`. -Examples include environments like **Hermes (React Native)** or certain **Node.js builds with limited ICU support**. - -This module provides **reliable encode/decode support for a small set of encodings that may be missing or unreliable in those environments**. - -- If a native UTF-8 `TextEncoder` / `TextDecoder` is available, it is used. -- All other encodings are implemented by this library. - -## Supported encodings - -- `utf-8` / `utf8` -- `utf-16le` -- `ascii` -- `latin1` / `iso-8859-1` -- `windows-1252` - -These encodings are commonly encountered in metadata formats and legacy text data. - -## ✨ Features - -- Encoding and decoding utilities -- Lightweight -- Typed API - -## 📦 Installation - -```sh -npm install @borewit/text-codec -``` - -# 📚 API Documentation - -## `textDecode(bytes, encoding): string` - -Decodes binary data into a JavaScript string. - -**Parameters** -- `bytes` (`Uint8Array`) — The binary data to decode. -- `encoding` (`SupportedEncoding`, optional) — Encoding type. Defaults to `"utf-8"`. - -**Returns** -- `string` — The decoded text. - -**Example** -```js -import { textDecode } from "@borewit/text-codec"; - -const bytes = new Uint8Array([0x48, 0x65, 0x6c, 0x6c, 0x6f]); -const text = textDecode(bytes, "ascii"); -console.log(text); // "Hello" -``` - -## `textEncode(input, encoding): Uint8Array` - -Encodes a JavaScript string into binary form using the specified encoding. - -**Parameters** - -- `input` (`string`) — The string to encode. -- `encoding` (`SupportedEncoding`, optional) — Encoding type. Defaults to `"utf-8"`. - -**Returns** - -`Uint8Array` — The encoded binary data. - -Example: -```js -import { textEncode } from "@borewit/text-codec"; - -const bytes = textEncode("Hello", "utf-16le"); -console.log(bytes); // Uint8Array([...]) -``` - -## 📜 Licence - -This project is licensed under the [MIT License](LICENSE.txt). Feel free to use, modify, and distribute as needed. - \ No newline at end of file diff --git a/node_modules/@borewit/text-codec/lib/index.d.ts b/node_modules/@borewit/text-codec/lib/index.d.ts deleted file mode 100644 index 1e22404..0000000 --- a/node_modules/@borewit/text-codec/lib/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type SupportedEncoding = "utf-8" | "utf8" | "utf-16le" | "us-ascii" | "ascii" | "latin1" | "iso-8859-1" | "windows-1252"; -/** - * Decode text from binary data - */ -export declare function textDecode(bytes: Uint8Array, encoding?: SupportedEncoding): string; -export declare function textEncode(input?: string, encoding?: SupportedEncoding): Uint8Array; diff --git a/node_modules/@borewit/text-codec/lib/index.js b/node_modules/@borewit/text-codec/lib/index.js deleted file mode 100644 index 1f552e0..0000000 --- a/node_modules/@borewit/text-codec/lib/index.js +++ /dev/null @@ -1,380 +0,0 @@ -const WINDOWS_1252_EXTRA = { - 0x80: "€", 0x82: "‚", 0x83: "ƒ", 0x84: "„", 0x85: "…", 0x86: "†", - 0x87: "‡", 0x88: "ˆ", 0x89: "‰", 0x8a: "Š", 0x8b: "‹", 0x8c: "Œ", - 0x8e: "Ž", 0x91: "‘", 0x92: "’", 0x93: "“", 0x94: "”", 0x95: "•", - 0x96: "–", 0x97: "—", 0x98: "˜", 0x99: "™", 0x9a: "š", 0x9b: "›", - 0x9c: "œ", 0x9e: "ž", 0x9f: "Ÿ", -}; -const WINDOWS_1252_REVERSE = {}; -for (const [code, char] of Object.entries(WINDOWS_1252_EXTRA)) { - WINDOWS_1252_REVERSE[char] = Number.parseInt(code, 10); -} -let _utf8Decoder; -let _utf8Encoder; -function utf8Decoder() { - if (typeof globalThis.TextDecoder === "undefined") - return undefined; - return (_utf8Decoder !== null && _utf8Decoder !== void 0 ? _utf8Decoder : (_utf8Decoder = new globalThis.TextDecoder("utf-8"))); -} -function utf8Encoder() { - if (typeof globalThis.TextEncoder === "undefined") - return undefined; - return (_utf8Encoder !== null && _utf8Encoder !== void 0 ? _utf8Encoder : (_utf8Encoder = new globalThis.TextEncoder())); -} -const CHUNK = 32 * 1024; -const REPLACEMENT = 0xfffd; -/** - * Decode text from binary data - */ -export function textDecode(bytes, encoding = "utf-8") { - switch (encoding.toLowerCase()) { - case "utf-8": - case "utf8": { - const dec = utf8Decoder(); - return dec ? dec.decode(bytes) : decodeUTF8(bytes); - } - case "utf-16le": - return decodeUTF16LE(bytes); - case "us-ascii": - case "ascii": - return decodeASCII(bytes); - case "latin1": - case "iso-8859-1": - return decodeLatin1(bytes); - case "windows-1252": - return decodeWindows1252(bytes); - default: - throw new RangeError(`Encoding '${encoding}' not supported`); - } -} -export function textEncode(input = "", encoding = "utf-8") { - switch (encoding.toLowerCase()) { - case "utf-8": - case "utf8": { - const enc = utf8Encoder(); - return enc ? enc.encode(input) : encodeUTF8(input); - } - case "utf-16le": - return encodeUTF16LE(input); - case "us-ascii": - case "ascii": - return encodeASCII(input); - case "latin1": - case "iso-8859-1": - return encodeLatin1(input); - case "windows-1252": - return encodeWindows1252(input); - default: - throw new RangeError(`Encoding '${encoding}' not supported`); - } -} -function appendCodePoint(out, cp) { - if (cp <= 0xffff) { - out.push(String.fromCharCode(cp)); - return; - } - cp -= 0x10000; - out.push(String.fromCharCode(0xd800 + (cp >> 10), 0xdc00 + (cp & 0x3ff))); -} -function flushChunk(parts, chunk) { - if (chunk.length === 0) - return; - parts.push(String.fromCharCode.apply(null, chunk)); - chunk.length = 0; -} -function pushCodeUnit(parts, chunk, codeUnit) { - chunk.push(codeUnit); - if (chunk.length >= CHUNK) - flushChunk(parts, chunk); -} -function pushCodePoint(parts, chunk, cp) { - if (cp <= 0xffff) { - pushCodeUnit(parts, chunk, cp); - return; - } - cp -= 0x10000; - pushCodeUnit(parts, chunk, 0xd800 + (cp >> 10)); - pushCodeUnit(parts, chunk, 0xdc00 + (cp & 0x3ff)); -} -function decodeUTF8(bytes) { - const parts = []; - const chunk = []; - let i = 0; - // Match TextDecoder("utf-8") default BOM handling - if (bytes.length >= 3 && - bytes[0] === 0xef && - bytes[1] === 0xbb && - bytes[2] === 0xbf) { - i = 3; - } - while (i < bytes.length) { - const b1 = bytes[i]; - if (b1 <= 0x7f) { - pushCodeUnit(parts, chunk, b1); - i++; - continue; - } - // Invalid leading bytes: continuation byte or impossible prefixes - if (b1 < 0xc2 || b1 > 0xf4) { - pushCodeUnit(parts, chunk, REPLACEMENT); - i++; - continue; - } - // 2-byte sequence - if (b1 <= 0xdf) { - if (i + 1 >= bytes.length) { - pushCodeUnit(parts, chunk, REPLACEMENT); - i++; - continue; - } - const b2 = bytes[i + 1]; - if ((b2 & 0xc0) !== 0x80) { - pushCodeUnit(parts, chunk, REPLACEMENT); - i++; - continue; - } - const cp = ((b1 & 0x1f) << 6) | (b2 & 0x3f); - pushCodeUnit(parts, chunk, cp); - i += 2; - continue; - } - // 3-byte sequence - if (b1 <= 0xef) { - if (i + 2 >= bytes.length) { - pushCodeUnit(parts, chunk, REPLACEMENT); - i++; - continue; - } - const b2 = bytes[i + 1]; - const b3 = bytes[i + 2]; - const valid = (b2 & 0xc0) === 0x80 && - (b3 & 0xc0) === 0x80 && - !(b1 === 0xe0 && b2 < 0xa0) && // overlong - !(b1 === 0xed && b2 >= 0xa0); // surrogate range - if (!valid) { - pushCodeUnit(parts, chunk, REPLACEMENT); - i++; - continue; - } - const cp = ((b1 & 0x0f) << 12) | - ((b2 & 0x3f) << 6) | - (b3 & 0x3f); - pushCodeUnit(parts, chunk, cp); - i += 3; - continue; - } - // 4-byte sequence - if (i + 3 >= bytes.length) { - pushCodeUnit(parts, chunk, REPLACEMENT); - i++; - continue; - } - const b2 = bytes[i + 1]; - const b3 = bytes[i + 2]; - const b4 = bytes[i + 3]; - const valid = (b2 & 0xc0) === 0x80 && - (b3 & 0xc0) === 0x80 && - (b4 & 0xc0) === 0x80 && - !(b1 === 0xf0 && b2 < 0x90) && // overlong - !(b1 === 0xf4 && b2 > 0x8f); // > U+10FFFF - if (!valid) { - pushCodeUnit(parts, chunk, REPLACEMENT); - i++; - continue; - } - const cp = ((b1 & 0x07) << 18) | - ((b2 & 0x3f) << 12) | - ((b3 & 0x3f) << 6) | - (b4 & 0x3f); - pushCodePoint(parts, chunk, cp); - i += 4; - } - flushChunk(parts, chunk); - return parts.join(""); -} -function decodeUTF16LE(bytes) { - const parts = []; - const chunk = []; - const len = bytes.length; - let i = 0; - while (i + 1 < len) { - const u1 = bytes[i] | (bytes[i + 1] << 8); - i += 2; - // High surrogate - if (u1 >= 0xd800 && u1 <= 0xdbff) { - if (i + 1 < len) { - const u2 = bytes[i] | (bytes[i + 1] << 8); - if (u2 >= 0xdc00 && u2 <= 0xdfff) { - pushCodeUnit(parts, chunk, u1); - pushCodeUnit(parts, chunk, u2); - i += 2; - } - else { - pushCodeUnit(parts, chunk, REPLACEMENT); - } - } - else { - pushCodeUnit(parts, chunk, REPLACEMENT); - } - continue; - } - // Lone low surrogate - if (u1 >= 0xdc00 && u1 <= 0xdfff) { - pushCodeUnit(parts, chunk, REPLACEMENT); - continue; - } - pushCodeUnit(parts, chunk, u1); - } - // Odd trailing byte - if (i < len) { - pushCodeUnit(parts, chunk, REPLACEMENT); - } - flushChunk(parts, chunk); - return parts.join(""); -} -function decodeASCII(bytes) { - const parts = []; - for (let i = 0; i < bytes.length; i += CHUNK) { - const end = Math.min(bytes.length, i + CHUNK); - const codes = new Array(end - i); - for (let j = i, k = 0; j < end; j++, k++) { - codes[k] = bytes[j] & 0x7f; - } - parts.push(String.fromCharCode.apply(null, codes)); - } - return parts.join(""); -} -function decodeLatin1(bytes) { - const parts = []; - for (let i = 0; i < bytes.length; i += CHUNK) { - const end = Math.min(bytes.length, i + CHUNK); - const codes = new Array(end - i); - for (let j = i, k = 0; j < end; j++, k++) { - codes[k] = bytes[j]; - } - parts.push(String.fromCharCode.apply(null, codes)); - } - return parts.join(""); -} -function decodeWindows1252(bytes) { - const parts = []; - let out = ""; - for (let i = 0; i < bytes.length; i++) { - const b = bytes[i]; - const extra = b >= 0x80 && b <= 0x9f ? WINDOWS_1252_EXTRA[b] : undefined; - out += extra !== null && extra !== void 0 ? extra : String.fromCharCode(b); - if (out.length >= CHUNK) { - parts.push(out); - out = ""; - } - } - if (out) - parts.push(out); - return parts.join(""); -} -function encodeUTF8(str) { - const out = []; - for (let i = 0; i < str.length; i++) { - let cp = str.charCodeAt(i); - // Valid surrogate pair - if (cp >= 0xd800 && cp <= 0xdbff) { - if (i + 1 < str.length) { - const lo = str.charCodeAt(i + 1); - if (lo >= 0xdc00 && lo <= 0xdfff) { - cp = 0x10000 + ((cp - 0xd800) << 10) + (lo - 0xdc00); - i++; - } - else { - cp = REPLACEMENT; - } - } - else { - cp = REPLACEMENT; - } - } - else if (cp >= 0xdc00 && cp <= 0xdfff) { - // Lone low surrogate - cp = REPLACEMENT; - } - if (cp < 0x80) { - out.push(cp); - } - else if (cp < 0x800) { - out.push(0xc0 | (cp >> 6), 0x80 | (cp & 0x3f)); - } - else if (cp < 0x10000) { - out.push(0xe0 | (cp >> 12), 0x80 | ((cp >> 6) & 0x3f), 0x80 | (cp & 0x3f)); - } - else { - out.push(0xf0 | (cp >> 18), 0x80 | ((cp >> 12) & 0x3f), 0x80 | ((cp >> 6) & 0x3f), 0x80 | (cp & 0x3f)); - } - } - return new Uint8Array(out); -} -function encodeUTF16LE(str) { - // Preserve JS string code units, but do not emit non-well-formed UTF-16. - // Replace lone surrogates with U+FFFD. - const units = []; - for (let i = 0; i < str.length; i++) { - const u = str.charCodeAt(i); - if (u >= 0xd800 && u <= 0xdbff) { - if (i + 1 < str.length) { - const lo = str.charCodeAt(i + 1); - if (lo >= 0xdc00 && lo <= 0xdfff) { - units.push(u, lo); - i++; - } - else { - units.push(REPLACEMENT); - } - } - else { - units.push(REPLACEMENT); - } - continue; - } - if (u >= 0xdc00 && u <= 0xdfff) { - units.push(REPLACEMENT); - continue; - } - units.push(u); - } - const out = new Uint8Array(units.length * 2); - for (let i = 0; i < units.length; i++) { - const code = units[i]; - const o = i * 2; - out[o] = code & 0xff; - out[o + 1] = code >>> 8; - } - return out; -} -function encodeASCII(str) { - const out = new Uint8Array(str.length); - for (let i = 0; i < str.length; i++) - out[i] = str.charCodeAt(i) & 0x7f; - return out; -} -function encodeLatin1(str) { - const out = new Uint8Array(str.length); - for (let i = 0; i < str.length; i++) - out[i] = str.charCodeAt(i) & 0xff; - return out; -} -function encodeWindows1252(str) { - const out = new Uint8Array(str.length); - for (let i = 0; i < str.length; i++) { - const ch = str[i]; - const code = ch.charCodeAt(0); - if (WINDOWS_1252_REVERSE[ch] !== undefined) { - out[i] = WINDOWS_1252_REVERSE[ch]; - continue; - } - if ((code >= 0x00 && code <= 0x7f) || - (code >= 0xa0 && code <= 0xff)) { - out[i] = code; - continue; - } - out[i] = 0x3f; // '?' - } - return out; -} diff --git a/node_modules/@borewit/text-codec/package.json b/node_modules/@borewit/text-codec/package.json deleted file mode 100644 index 3ca9696..0000000 --- a/node_modules/@borewit/text-codec/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "@borewit/text-codec", - "version": "0.2.2", - "description": "Text Decoder", - "type": "module", - "exports": "./lib/index.js", - "types": "lib/index.d.ts", - "files": [ - "lib/index.js", - "lib/index.d.ts" - ], - "scripts": { - "clean": "del-cli lib/**/*.js lib/***.js.map test/**/*.d.ts test/**/*.js test/**/*.js.map", - "build": "npm run compile", - "prepublishOnly": "npm run build", - "compile:src": "tsc --p lib --sourceMap false", - "compile:test": "tsc --p test", - "compile": "npm run compile:src && npm run compile:test", - "lint": "biome check", - "test": "mocha", - "update-biome": "npm install --save-dev --save-exact @biomejs/biome@latest && npx @biomejs/biome migrate --write" - }, - "devDependencies": { - "@biomejs/biome": "2.4.6", - "@types/chai": "^5.2.2", - "@types/mocha": "^10.0.10", - "chai": "^6.2.2", - "mocha": "^11.7.5", - "ts-node": "^10.9.2", - "typescript": "^5.9.3" - }, - "keywords": [ - "TextDecoder", - "TextEncoder", - "decoder", - "decoding", - "encod", - "encoding", - "decode", - "text", - "ascii", - "utf-8", - "utf8", - "utf-16le", - "latin1", - "iso-8859-1", - "windows-1252", - "charset", - "encoding", - "decoding", - "polyfill", - "character-set", - "latin", - "hermes", - "react" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/Borewit/text-codec.git" - }, - "author": { - "name": "Borewit", - "url": "https://github.com/Borewit" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - }, - "license": "MIT" -} diff --git a/node_modules/@cspotcode/source-map-support/LICENSE.md b/node_modules/@cspotcode/source-map-support/LICENSE.md deleted file mode 100644 index 6247ca9..0000000 --- a/node_modules/@cspotcode/source-map-support/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Evan Wallace - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@cspotcode/source-map-support/README.md b/node_modules/@cspotcode/source-map-support/README.md deleted file mode 100644 index f739070..0000000 --- a/node_modules/@cspotcode/source-map-support/README.md +++ /dev/null @@ -1,289 +0,0 @@ -# Source Map Support - -[![NPM version](https://img.shields.io/npm/v/@cspotcode/source-map-support.svg?style=flat)](https://npmjs.org/package/@cspotcode/source-map-support) -[![NPM downloads](https://img.shields.io/npm/dm/@cspotcode/source-map-support.svg?style=flat)](https://npmjs.org/package/@cspotcode/source-map-support) -[![Build status](https://img.shields.io/github/workflow/status/cspotcode/node-source-map-support/Continuous%20Integration)](https://github.com/cspotcode/node-source-map-support/actions?query=workflow%3A%22Continuous+Integration%22) - -This module provides source map support for stack traces in node via the [V8 stack trace API](https://github.com/v8/v8/wiki/Stack-Trace-API). It uses the [source-map](https://github.com/mozilla/source-map) module to replace the paths and line numbers of source-mapped files with their original paths and line numbers. The output mimics node's stack trace format with the goal of making every compile-to-JS language more of a first-class citizen. Source maps are completely general (not specific to any one language) so you can use source maps with multiple compile-to-JS languages in the same node process. - -## Installation and Usage - -#### Node support - -``` -$ npm install @cspotcode/source-map-support -``` - -Source maps can be generated using libraries such as [source-map-index-generator](https://github.com/twolfson/source-map-index-generator). Once you have a valid source map, place a source mapping comment somewhere in the file (usually done automatically or with an option by your transpiler): - -``` -//# sourceMappingURL=path/to/source.map -``` - -If multiple sourceMappingURL comments exist in one file, the last sourceMappingURL comment will be -respected (e.g. if a file mentions the comment in code, or went through multiple transpilers). -The path should either be absolute or relative to the compiled file. - -From here you have two options. - -##### CLI Usage - -```bash -node -r @cspotcode/source-map-support/register compiled.js -# Or to enable hookRequire -node -r @cspotcode/source-map-support/register-hook-require compiled.js -``` - -##### Programmatic Usage - -Put the following line at the top of the compiled file. - -```js -require('@cspotcode/source-map-support').install(); -``` - -It is also possible to install the source map support directly by -requiring the `register` module which can be handy with ES6: - -```js -import '@cspotcode/source-map-support/register' - -// Instead of: -import sourceMapSupport from '@cspotcode/source-map-support' -sourceMapSupport.install() -``` -Note: if you're using babel-register, it includes source-map-support already. - -It is also very useful with Mocha: - -``` -$ mocha --require @cspotcode/source-map-support/register tests/ -``` - -#### Browser support - -This library also works in Chrome. While the DevTools console already supports source maps, the V8 engine doesn't and `Error.prototype.stack` will be incorrect without this library. Everything will just work if you deploy your source files using [browserify](http://browserify.org/). Just make sure to pass the `--debug` flag to the browserify command so your source maps are included in the bundled code. - -This library also works if you use another build process or just include the source files directly. In this case, include the file `browser-source-map-support.js` in your page and call `sourceMapSupport.install()`. It contains the whole library already bundled for the browser using browserify. - -```html - - -``` - -This library also works if you use AMD (Asynchronous Module Definition), which is used in tools like [RequireJS](http://requirejs.org/). Just list `browser-source-map-support` as a dependency: - -```html - -``` - -## Options - -This module installs two things: a change to the `stack` property on `Error` objects and a handler for uncaught exceptions that mimics node's default exception handler (the handler can be seen in the demos below). You may want to disable the handler if you have your own uncaught exception handler. This can be done by passing an argument to the installer: - -```js -require('@cspotcode/source-map-support').install({ - handleUncaughtExceptions: false -}); -``` - -This module loads source maps from the filesystem by default. You can provide alternate loading behavior through a callback as shown below. For example, [Meteor](https://github.com/meteor) keeps all source maps cached in memory to avoid disk access. - -```js -require('@cspotcode/source-map-support').install({ - retrieveSourceMap: function(source) { - if (source === 'compiled.js') { - return { - url: 'original.js', - map: fs.readFileSync('compiled.js.map', 'utf8') - }; - } - return null; - } -}); -``` - -The module will by default assume a browser environment if XMLHttpRequest and window are defined. If either of these do not exist it will instead assume a node environment. -In some rare cases, e.g. when running a browser emulation and where both variables are also set, you can explictly specify the environment to be either 'browser' or 'node'. - -```js -require('@cspotcode/source-map-support').install({ - environment: 'node' -}); -``` - -To support files with inline source maps, the `hookRequire` options can be specified, which will monitor all source files for inline source maps. - - -```js -require('@cspotcode/source-map-support').install({ - hookRequire: true -}); -``` - -This monkey patches the `require` module loading chain, so is not enabled by default and is not recommended for any sort of production usage. - -## Demos - -#### Basic Demo - -original.js: - -```js -throw new Error('test'); // This is the original code -``` - -compiled.js: - -```js -require('@cspotcode/source-map-support').install(); - -throw new Error('test'); // This is the compiled code -// The next line defines the sourceMapping. -//# sourceMappingURL=compiled.js.map -``` - -compiled.js.map: - -```json -{ - "version": 3, - "file": "compiled.js", - "sources": ["original.js"], - "names": [], - "mappings": ";;AAAA,MAAM,IAAI" -} -``` - -Run compiled.js using node (notice how the stack trace uses original.js instead of compiled.js): - -``` -$ node compiled.js - -original.js:1 -throw new Error('test'); // This is the original code - ^ -Error: test - at Object. (original.js:1:7) - at Module._compile (module.js:456:26) - at Object.Module._extensions..js (module.js:474:10) - at Module.load (module.js:356:32) - at Function.Module._load (module.js:312:12) - at Function.Module.runMain (module.js:497:10) - at startup (node.js:119:16) - at node.js:901:3 -``` - -#### TypeScript Demo - -demo.ts: - -```typescript -declare function require(name: string); -require('@cspotcode/source-map-support').install(); -class Foo { - constructor() { this.bar(); } - bar() { throw new Error('this is a demo'); } -} -new Foo(); -``` - -Compile and run the file using the TypeScript compiler from the terminal: - -``` -$ npm install source-map-support typescript -$ node_modules/typescript/bin/tsc -sourcemap demo.ts -$ node demo.js - -demo.ts:5 - bar() { throw new Error('this is a demo'); } - ^ -Error: this is a demo - at Foo.bar (demo.ts:5:17) - at new Foo (demo.ts:4:24) - at Object. (demo.ts:7:1) - at Module._compile (module.js:456:26) - at Object.Module._extensions..js (module.js:474:10) - at Module.load (module.js:356:32) - at Function.Module._load (module.js:312:12) - at Function.Module.runMain (module.js:497:10) - at startup (node.js:119:16) - at node.js:901:3 -``` - -There is also the option to use `-r source-map-support/register` with typescript, without the need add the `require('@cspotcode/source-map-support').install()` in the code base: - -``` -$ npm install source-map-support typescript -$ node_modules/typescript/bin/tsc -sourcemap demo.ts -$ node -r source-map-support/register demo.js - -demo.ts:5 - bar() { throw new Error('this is a demo'); } - ^ -Error: this is a demo - at Foo.bar (demo.ts:5:17) - at new Foo (demo.ts:4:24) - at Object. (demo.ts:7:1) - at Module._compile (module.js:456:26) - at Object.Module._extensions..js (module.js:474:10) - at Module.load (module.js:356:32) - at Function.Module._load (module.js:312:12) - at Function.Module.runMain (module.js:497:10) - at startup (node.js:119:16) - at node.js:901:3 -``` - -#### CoffeeScript Demo - -demo.coffee: - -```coffee -require('@cspotcode/source-map-support').install() -foo = -> - bar = -> throw new Error 'this is a demo' - bar() -foo() -``` - -Compile and run the file using the CoffeeScript compiler from the terminal: - -```sh -$ npm install @cspotcode/source-map-support coffeescript -$ node_modules/.bin/coffee --map --compile demo.coffee -$ node demo.js - -demo.coffee:3 - bar = -> throw new Error 'this is a demo' - ^ -Error: this is a demo - at bar (demo.coffee:3:22) - at foo (demo.coffee:4:3) - at Object. (demo.coffee:5:1) - at Object. (demo.coffee:1:1) - at Module._compile (module.js:456:26) - at Object.Module._extensions..js (module.js:474:10) - at Module.load (module.js:356:32) - at Function.Module._load (module.js:312:12) - at Function.Module.runMain (module.js:497:10) - at startup (node.js:119:16) -``` - -## Tests - -This repo contains both automated tests for node and manual tests for the browser. The automated tests can be run using mocha (type `mocha` in the root directory). To run the manual tests: - -* Build the tests using `build.js` -* Launch the HTTP server (`npm run serve-tests`) and visit - * http://127.0.0.1:1336/amd-test - * http://127.0.0.1:1336/browser-test - * http://127.0.0.1:1336/browserify-test - **Currently not working** due to a bug with browserify (see [pull request #66](https://github.com/evanw/node-source-map-support/pull/66) for details). -* For `header-test`, run `server.js` inside that directory and visit http://127.0.0.1:1337/ - -## License - -This code is available under the [MIT license](http://opensource.org/licenses/MIT). diff --git a/node_modules/@cspotcode/source-map-support/browser-source-map-support.js b/node_modules/@cspotcode/source-map-support/browser-source-map-support.js deleted file mode 100644 index 782da50..0000000 --- a/node_modules/@cspotcode/source-map-support/browser-source-map-support.js +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Support for source maps in V8 stack traces - * https://github.com/evanw/node-source-map-support - */ -/* - The buffer module from node.js, for the browser. - - @author Feross Aboukhadijeh - license MIT -*/ -(this.define||function(R,U){this.sourceMapSupport=U()})("browser-source-map-support",function(R){(function e(C,J,A){function p(f,c){if(!J[f]){if(!C[f]){var l="function"==typeof require&&require;if(!c&&l)return l(f,!0);if(t)return t(f,!0);throw Error("Cannot find module '"+f+"'");}l=J[f]={exports:{}};C[f][0].call(l.exports,function(q){var r=C[f][1][q];return p(r?r:q)},l,l.exports,e,C,J,A)}return J[f].exports}for(var t="function"==typeof require&&require,m=0;mm)return-1;if(58>m)return m-48+52;if(91>m)return m-65;if(123>m)return m-97+26}var t="undefined"!==typeof Uint8Array?Uint8Array:Array;e.toByteArray=function(m){function f(d){q[k++]=d}if(0>16);f((u&65280)>>8);f(u&255)}2===l?(u=p(m.charAt(c))<<2|p(m.charAt(c+1))>>4,f(u&255)):1===l&&(u=p(m.charAt(c))<<10|p(m.charAt(c+1))<<4|p(m.charAt(c+2))>>2,f(u>>8&255),f(u&255));return q};e.fromByteArray=function(m){var f=m.length%3,c="",l;var q=0;for(l=m.length-f;q> -18&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>12&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>6&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r&63);c+=r}switch(f){case 1:r=m[m.length-1];c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r<<4&63);c+="==";break;case 2:r=(m[m.length-2]<<8)+ -m[m.length-1],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>10),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>4&63),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r<<2&63),c+="="}return c}})("undefined"===typeof A?this.base64js={}:A)},{}],3:[function(C,J,A){},{}],4:[function(C,J,A){(function(e){var p=Object.prototype.toString,t="function"===typeof e.alloc&&"function"===typeof e.allocUnsafe&&"function"=== -typeof e.from;J.exports=function(m,f,c){if("number"===typeof m)throw new TypeError('"value" argument must not be a number');if("ArrayBuffer"===p.call(m).slice(8,-1)){f>>>=0;var l=m.byteLength-f;if(0>l)throw new RangeError("'offset' is out of bounds");if(void 0===c)c=l;else if(c>>>=0,c>l)throw new RangeError("'length' is out of bounds");return t?e.from(m.slice(f,f+c)):new e(new Uint8Array(m.slice(f,f+c)))}if("string"===typeof m){c=f;if("string"!==typeof c||""===c)c="utf8";if(!e.isEncoding(c))throw new TypeError('"encoding" must be a valid string encoding'); -return t?e.from(m,c):new e(m,c)}return t?e.from(m):new e(m)}}).call(this,C("buffer").Buffer)},{buffer:5}],5:[function(C,J,A){function e(a,b,h){if(!(this instanceof e))return new e(a,b,h);var w=typeof a;if("number"===w)var y=0>>0:0;else if("string"===w){if("base64"===b)for(a=(a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")).replace(L,"");0!==a.length%4;)a+="=";y=e.byteLength(a,b)}else if("object"===w&&null!==a)"Buffer"===a.type&&z(a.data)&&(a=a.data),y=0<+a.length?Math.floor(+a.length):0;else throw new TypeError("must start with number, buffer, array or string"); -if(this.length>G)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+G.toString(16)+" bytes");if(e.TYPED_ARRAY_SUPPORT)var I=e._augment(new Uint8Array(y));else I=this,I.length=y,I._isBuffer=!0;if(e.TYPED_ARRAY_SUPPORT&&"number"===typeof a.byteLength)I._set(a);else{var K=a;if(z(K)||e.isBuffer(K)||K&&"object"===typeof K&&"number"===typeof K.length)if(e.isBuffer(a))for(b=0;ba)throw new RangeError("offset is not uint");if(a+b>h)throw new RangeError("Trying to access beyond buffer length");}function m(a,b,h,w,y,I){if(!e.isBuffer(a))throw new TypeError("buffer must be a Buffer instance");if(b>y||ba.length)throw new TypeError("index out of range"); -}function f(a,b,h,w){0>b&&(b=65535+b+1);for(var y=0,I=Math.min(a.length-h,2);y>>8*(w?y:1-y)}function c(a,b,h,w){0>b&&(b=4294967295+b+1);for(var y=0,I=Math.min(a.length-h,4);y>>8*(w?y:3-y)&255}function l(a,b,h,w,y,I){if(b>y||ba.length)throw new TypeError("index out of range");}function q(a,b,h,w,y){y||l(a,b,h,4,3.4028234663852886E38,-3.4028234663852886E38);v.write(a,b,h,w,23,4);return h+4}function r(a, -b,h,w,y){y||l(a,b,h,8,1.7976931348623157E308,-1.7976931348623157E308);v.write(a,b,h,w,52,8);return h+8}function k(a){for(var b=[],h=0;h=w)b.push(w);else{var y=h;55296<=w&&57343>=w&&h++;w=encodeURIComponent(a.slice(y,h+1)).substr(1).split("%");for(y=0;y=b.length||y>=a.length);y++)b[y+ -h]=a[y];return y}function g(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}var n=C("base64-js"),v=C("ieee754"),z=C("is-array");A.Buffer=e;A.SlowBuffer=e;A.INSPECT_MAX_BYTES=50;e.poolSize=8192;var G=1073741823;e.TYPED_ARRAY_SUPPORT=function(){try{var a=new ArrayBuffer(0),b=new Uint8Array(a);b.foo=function(){return 42};return 42===b.foo()&&"function"===typeof b.subarray&&0===(new Uint8Array(1)).subarray(1,1).byteLength}catch(h){return!1}}();e.isBuffer=function(a){return!(null== -a||!a._isBuffer)};e.compare=function(a,b){if(!e.isBuffer(a)||!e.isBuffer(b))throw new TypeError("Arguments must be Buffers");for(var h=a.length,w=b.length,y=0,I=Math.min(h,w);y>>1;break;case "utf8":case "utf-8":h=k(a).length;break;case "base64":h=n.toByteArray(a).length; -break;default:h=a.length}return h};e.prototype.length=void 0;e.prototype.parent=void 0;e.prototype.toString=function(a,b,h){var w=!1;b>>>=0;h=void 0===h||Infinity===h?this.length:h>>>0;a||(a="utf8");0>b&&(b=0);h>this.length&&(h=this.length);if(h<=b)return"";for(;;)switch(a){case "hex":a=b;b=h;h=this.length;if(!a||0>a)a=0;if(!b||0>b||b>h)b=h;w="";for(h=a;hw?"0"+w.toString(16):w.toString(16),w=a+w;return w;case "utf8":case "utf-8":w=a="";for(h=Math.min(this.length,h);b= -this[b]?(a+=g(w)+String.fromCharCode(this[b]),w=""):w+="%"+this[b].toString(16);return a+g(w);case "ascii":return p(this,b,h);case "binary":return p(this,b,h);case "base64":return b=0===b&&h===this.length?n.fromByteArray(this):n.fromByteArray(this.slice(b,h)),b;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":b=this.slice(b,h);h="";for(a=0;ab&&(a+=" ... "));return""};e.prototype.compare=function(a){if(!e.isBuffer(a))throw new TypeError("Argument must be a Buffer");return e.compare(this,a)};e.prototype.get=function(a){console.log(".get() is deprecated. Access using array indexes instead."); -return this.readUInt8(a)};e.prototype.set=function(a,b){console.log(".set() is deprecated. Access using array indexes instead.");return this.writeUInt8(a,b)};e.prototype.write=function(a,b,h,w){if(isFinite(b))isFinite(h)||(w=h,h=void 0);else{var y=w;w=b;b=h;h=y}b=Number(b)||0;y=this.length-b;h?(h=Number(h),h>y&&(h=y)):h=y;w=String(w||"utf8").toLowerCase();switch(w){case "hex":b=Number(b)||0;w=this.length-b;h?(h=Number(h),h>w&&(h=w)):h=w;w=a.length;if(0!==w%2)throw Error("Invalid hex string");h>w/ -2&&(h=w/2);for(w=0;w>8;K%=256;y.push(K);y.push(w)}a=d(y,this,b,h,2);break;default:throw new TypeError("Unknown encoding: "+ -w);}return a};e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};e.prototype.slice=function(a,b){var h=this.length;a=~~a;b=void 0===b?h:~~b;0>a?(a+=h,0>a&&(a=0)):a>h&&(a=h);0>b?(b+=h,0>b&&(b=0)):b>h&&(b=h);b>>=0;h||m(this,a,b,1,255,0);e.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));this[b]=a;return b+1};e.prototype.writeUInt16LE=function(a, -b,h){a=+a;b>>>=0;h||m(this,a,b,2,65535,0);e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8):f(this,a,b,!0);return b+2};e.prototype.writeUInt16BE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,2,65535,0);e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a):f(this,a,b,!1);return b+2};e.prototype.writeUInt32LE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,4,4294967295,0);e.TYPED_ARRAY_SUPPORT?(this[b+3]=a>>>24,this[b+2]=a>>>16,this[b+1]=a>>>8,this[b]=a):c(this,a,b,!0);return b+4};e.prototype.writeUInt32BE=function(a, -b,h){a=+a;b>>>=0;h||m(this,a,b,4,4294967295,0);e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=a):c(this,a,b,!1);return b+4};e.prototype.writeInt8=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,1,127,-128);e.TYPED_ARRAY_SUPPORT||(a=Math.floor(a));0>a&&(a=255+a+1);this[b]=a;return b+1};e.prototype.writeInt16LE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,2,32767,-32768);e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8):f(this,a,b,!0);return b+2};e.prototype.writeInt16BE=function(a, -b,h){a=+a;b>>>=0;h||m(this,a,b,2,32767,-32768);e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a):f(this,a,b,!1);return b+2};e.prototype.writeInt32LE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,4,2147483647,-2147483648);e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8,this[b+2]=a>>>16,this[b+3]=a>>>24):c(this,a,b,!0);return b+4};e.prototype.writeInt32BE=function(a,b,h){a=+a;b>>>=0;h||m(this,a,b,4,2147483647,-2147483648);0>a&&(a=4294967295+a+1);e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+ -2]=a>>>8,this[b+3]=a):c(this,a,b,!1);return b+4};e.prototype.writeFloatLE=function(a,b,h){return q(this,a,b,!0,h)};e.prototype.writeFloatBE=function(a,b,h){return q(this,a,b,!1,h)};e.prototype.writeDoubleLE=function(a,b,h){return r(this,a,b,!0,h)};e.prototype.writeDoubleBE=function(a,b,h){return r(this,a,b,!1,h)};e.prototype.copy=function(a,b,h,w){h||(h=0);w||0===w||(w=this.length);b||(b=0);if(w!==h&&0!==a.length&&0!==this.length){if(wb||b>=a.length)throw new TypeError("targetStart out of bounds"); -if(0>h||h>=this.length)throw new TypeError("sourceStart out of bounds");if(0>w||w>this.length)throw new TypeError("sourceEnd out of bounds");w>this.length&&(w=this.length);a.length-bw||!e.TYPED_ARRAY_SUPPORT)for(var y=0;yb||b>=this.length)throw new TypeError("start out of bounds"); -if(0>h||h>this.length)throw new TypeError("end out of bounds");if("number"===typeof a)for(;b>1,r=-7;f=t?f-1:0;var k=t?-1:1,u=e[p+f];f+=k;t=u&(1<<-r)-1;u>>=-r;for(r+=c;0>=-r;for(r+=m;0>1,u=23===f?Math.pow(2,-24)-Math.pow(2,-77):0;c=m?0:c-1;var d=m?1:-1,g=0>p||0===p&&0>1/p?1:0;p=Math.abs(p);isNaN(p)||Infinity===p?(p=isNaN(p)?1:0,m=r):(m=Math.floor(Math.log(p)/Math.LN2),1>p*(l=Math.pow(2,-m))&&(m--,l*=2),p=1<=m+k?p+u/l:p+u*Math.pow(2,1-k),2<=p*l&&(m++,l/=2),m+k>=r?(p=0,m=r):1<=m+k?(p=(p*l-1)*Math.pow(2,f),m+=k):(p=p*Math.pow(2,k-1)*Math.pow(2,f),m=0));for(;8<=f;e[t+c]=p&255,c+= -d,p/=256,f-=8);m=m<z?[]:n.slice(v,z-v+1)}c=A.resolve(c).substr(1);l=A.resolve(l).substr(1); -for(var r=q(c.split("/")),k=q(l.split("/")),u=Math.min(r.length,k.length),d=u,g=0;gl&&(l=c.length+l);return c.substr(l,q)}}).call(this,C("g5I+bs"))},{"g5I+bs":9}],9:[function(C,J,A){function e(){}C=J.exports={};C.nextTick=function(){if("undefined"!==typeof window&&window.setImmediate)return function(t){return window.setImmediate(t)};if("undefined"!==typeof window&&window.postMessage&&window.addEventListener){var p=[];window.addEventListener("message",function(t){var m=t.source;m!==window&&null!== -m||"process-tick"!==t.data||(t.stopPropagation(),0p?(-p<<1)+1:p<<1;do p=m&31,m>>>=5,0=f)throw Error("Expected more digits in base 64 VLQ value.");var q=e.decode(p.charCodeAt(t++));if(-1===q)throw Error("Invalid base64 digit: "+p.charAt(t-1));var r=!!(q&32);q&=31;c+=q<>1;m.value=1===(c&1)?-p:p;m.rest=t}},{"./base64":12}],12:[function(C, -J,A){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");A.encode=function(p){if(0<=p&&p=p?p-65:97<=p&&122>=p?p-97+26:48<=p&&57>=p?p-48+52:43==p?62:47==p?63:-1}},{}],13:[function(C,J,A){function e(p,t,m,f,c,l){var q=Math.floor((t-p)/2)+p,r=c(m,f[q],!0);return 0===r?q:0p?-1:p}A.GREATEST_LOWER_BOUND=1;A.LEAST_UPPER_BOUND=2;A.search=function(p,t,m,f){if(0===t.length)return-1;p=e(-1,t.length,p,t,m,f||A.GREATEST_LOWER_BOUND);if(0>p)return-1;for(;0<=p-1&&0===m(t[p],t[p-1],!0);)--p;return p}},{}],14:[function(C,J,A){function e(){this._array=[];this._sorted=!0;this._last={generatedLine:-1,generatedColumn:0}}var p=C("./util");e.prototype.unsortedForEach=function(t,m){this._array.forEach(t,m)};e.prototype.add=function(t){var m=this._last,f=m.generatedLine, -c=t.generatedLine,l=m.generatedColumn,q=t.generatedColumn;c>f||c==f&&q>=l||0>=p.compareByGeneratedPositionsInflated(m,t)?this._last=t:this._sorted=!1;this._array.push(t)};e.prototype.toArray=function(){this._sorted||(this._array.sort(p.compareByGeneratedPositionsInflated),this._sorted=!0);return this._array};A.MappingList=e},{"./util":19}],15:[function(C,J,A){function e(t,m,f){var c=t[m];t[m]=t[f];t[f]=c}function p(t,m,f,c){if(f=m(t[r],q)&&(l+=1,e(t,l,r));e(t,l+1,r);l+=1;p(t,m,f,l-1);p(t,m,l+1,c)}}A.quickSort=function(t,m){p(t,m,0,t.length-1)}},{}],16:[function(C,J,A){function e(k,u){var d=k;"string"===typeof k&&(d=f.parseSourceMapInput(k));return null!=d.sections?new m(d,u):new p(d,u)}function p(k,u){var d=k;"string"===typeof k&&(d=f.parseSourceMapInput(k));var g=f.getArg(d,"version"),n=f.getArg(d,"sources"),v=f.getArg(d,"names",[]),z=f.getArg(d,"sourceRoot",null),G=f.getArg(d,"sourcesContent",null),D=f.getArg(d, -"mappings");d=f.getArg(d,"file",null);if(g!=this._version)throw Error("Unsupported version: "+g);z&&(z=f.normalize(z));n=n.map(String).map(f.normalize).map(function(L){return z&&f.isAbsolute(z)&&f.isAbsolute(L)?f.relative(z,L):L});this._names=l.fromArray(v.map(String),!0);this._sources=l.fromArray(n,!0);this.sourceRoot=z;this.sourcesContent=G;this._mappings=D;this._sourceMapURL=u;this.file=d}function t(){this.generatedColumn=this.generatedLine=0;this.name=this.originalColumn=this.originalLine=this.source= -null}function m(k,u){var d=k;"string"===typeof k&&(d=f.parseSourceMapInput(k));var g=f.getArg(d,"version");d=f.getArg(d,"sections");if(g!=this._version)throw Error("Unsupported version: "+g);this._sources=new l;this._names=new l;var n={line:-1,column:0};this._sections=d.map(function(v){if(v.url)throw Error("Support for url field in sections not implemented.");var z=f.getArg(v,"offset"),G=f.getArg(z,"line"),D=f.getArg(z,"column");if(G=k[d])throw new TypeError("Line must be greater than or equal to 1, got "+ -k[d]);if(0>k[g])throw new TypeError("Column must be greater than or equal to 0, got "+k[g]);return c.search(k,u,n,v)};p.prototype.computeColumnSpans=function(){for(var k=0;k=this._sources.size()&&!this.sourcesContent.some(function(k){return null==k}):!1};p.prototype.sourceContentFor=function(k,u){if(!this.sourcesContent)return null;var d=k;null!=this.sourceRoot&&(d=f.relative(this.sourceRoot,d));if(this._sources.has(d))return this.sourcesContent[this._sources.indexOf(d)]; -var g=this.sources,n;for(n=0;n -g||95!==d.charCodeAt(g-1)||95!==d.charCodeAt(g-2)||111!==d.charCodeAt(g-3)||116!==d.charCodeAt(g-4)||111!==d.charCodeAt(g-5)||114!==d.charCodeAt(g-6)||112!==d.charCodeAt(g-7)||95!==d.charCodeAt(g-8)||95!==d.charCodeAt(g-9))return!1;for(g-=10;0<=g;g--)if(36!==d.charCodeAt(g))return!1;return!0}function r(d,g){return d===g?0:null===d?1:null===g?-1:d>g?1:-1}A.getArg=function(d,g,n){if(g in d)return d[g];if(3===arguments.length)return n;throw Error('"'+g+'" is a required argument.');};var k=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/, -u=/^data:.+,.+$/;A.urlParse=e;A.urlGenerate=p;A.normalize=t;A.join=m;A.isAbsolute=function(d){return"/"===d.charAt(0)||k.test(d)};A.relative=function(d,g){""===d&&(d=".");d=d.replace(/\/$/,"");for(var n=0;0!==g.indexOf(d+"/");){var v=d.lastIndexOf("/");if(0>v)return g;d=d.slice(0,v);if(d.match(/^([^\/]+:\/)?\/*$/))return g;++n}return Array(n+1).join("../")+g.substr(d.length+1)};C=!("__proto__"in Object.create(null));A.toSetString=C?f:c;A.fromSetString=C?f:l;A.compareByOriginalPositions=function(d, -g,n){var v=r(d.source,g.source);if(0!==v)return v;v=d.originalLine-g.originalLine;if(0!==v)return v;v=d.originalColumn-g.originalColumn;if(0!==v||n)return v;v=d.generatedColumn-g.generatedColumn;if(0!==v)return v;v=d.generatedLine-g.generatedLine;return 0!==v?v:r(d.name,g.name)};A.compareByGeneratedPositionsDeflated=function(d,g,n){var v=d.generatedLine-g.generatedLine;if(0!==v)return v;v=d.generatedColumn-g.generatedColumn;if(0!==v||n)return v;v=r(d.source,g.source);if(0!==v)return v;v=d.originalLine- -g.originalLine;if(0!==v)return v;v=d.originalColumn-g.originalColumn;return 0!==v?v:r(d.name,g.name)};A.compareByGeneratedPositionsInflated=function(d,g){var n=d.generatedLine-g.generatedLine;if(0!==n)return n;n=d.generatedColumn-g.generatedColumn;if(0!==n)return n;n=r(d.source,g.source);if(0!==n)return n;n=d.originalLine-g.originalLine;if(0!==n)return n;n=d.originalColumn-g.originalColumn;return 0!==n?n:r(d.name,g.name)};A.parseSourceMapInput=function(d){return JSON.parse(d.replace(/^\)]}'[^\n]*\n/, -""))};A.computeSourceURL=function(d,g,n){g=g||"";d&&("/"!==d[d.length-1]&&"/"!==g[0]&&(d+="/"),g=d+g);if(n){d=e(n);if(!d)throw Error("sourceMapURL could not be parsed");d.path&&(n=d.path.lastIndexOf("/"),0<=n&&(d.path=d.path.substring(0,n+1)));g=m(p(d),g)}return t(g)}},{}],20:[function(C,J,A){A.SourceMapGenerator=C("./lib/source-map-generator").SourceMapGenerator;A.SourceMapConsumer=C("./lib/source-map-consumer").SourceMapConsumer;A.SourceNode=C("./lib/source-node").SourceNode},{"./lib/source-map-consumer":16, -"./lib/source-map-generator":17,"./lib/source-node":18}],21:[function(C,J,A){(function(e){function p(){return"browser"===a?!0:"node"===a?!1:"undefined"!==typeof window&&"function"===typeof XMLHttpRequest&&!(window.require&&window.module&&window.process&&"renderer"===window.process.type)}function t(x){return function(B){for(var F=0;F";B=this.getLineNumber();null!=B&&(x+=":"+B,(B= -this.getColumnNumber())&&(x+=":"+B))}B="";var F=this.getFunctionName(),E=!0,H=this.isConstructor();if(this.isToplevel()||H)H?B+="new "+(F||""):F?B+=F:(B+=x,E=!1);else{H=this.getTypeName();"[object Object]"===H&&(H="null");var M=this.getMethodName();F?(H&&0!=F.indexOf(H)&&(B+=H+"."),B+=F,M&&F.indexOf("."+M)!=F.length-M.length-1&&(B+=" [as "+M+"]")):B+=H+"."+(M||"")}E&&(B+=" ("+x+")");return B}function q(x){var B={};Object.getOwnPropertyNames(Object.getPrototypeOf(x)).forEach(function(F){B[F]= -/^(?:is|get)/.test(F)?function(){return x[F].call(x)}:x[F]});B.toString=l;return B}function r(x,B){void 0===B&&(B={nextPosition:null,curPosition:null});if(x.isNative())return B.curPosition=null,x;var F=x.getFileName()||x.getScriptNameOrSourceURL();if(F){var E=x.getLineNumber(),H=x.getColumnNumber()-1,M=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/,S=M.test;var V="object"===typeof e&&null!==e?e.version:"";M=S.call(M,V)?0:62;1===E&&H>M&&!p()&&!x.isEval()&&(H-=M);var O= -f({source:F,line:E,column:H});B.curPosition=O;x=q(x);var T=x.getFunctionName;x.getFunctionName=function(){return null==B.nextPosition?T():B.nextPosition.name||T()};x.getFileName=function(){return O.source};x.getLineNumber=function(){return O.line};x.getColumnNumber=function(){return O.column+1};x.getScriptNameOrSourceURL=function(){return O.source};return x}var Q=x.isEval()&&x.getEvalOrigin();Q&&(Q=c(Q),x=q(x),x.getEvalOrigin=function(){return Q});return x}function k(x,B){L&&(b={},h={});for(var F= -(x.name||"Error")+": "+(x.message||""),E={nextPosition:null,curPosition:null},H=[],M=B.length-1;0<=M;M--)H.push("\n at "+r(B[M],E)),E.nextPosition=E.curPosition;E.curPosition=E.nextPosition=null;return F+H.reverse().join("")}function u(x){var B=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(x.stack);if(B){x=B[1];var F=+B[2];B=+B[3];var E=b[x];if(!E&&v&&v.existsSync(x))try{E=v.readFileSync(x,"utf8")}catch(H){E=""}if(E&&(E=E.split(/(?:\r\n|\r|\n)/)[F-1]))return x+":"+F+"\n"+E+"\n"+Array(B).join(" ")+ -"^"}return null}function d(){var x=e.emit;e.emit=function(B){if("uncaughtException"===B){var F=arguments[1]&&arguments[1].stack,E=0=12" - }, - "volta": { - "node": "16.11.0", - "npm": "7.24.2" - } -} diff --git a/node_modules/@cspotcode/source-map-support/register-hook-require.d.ts b/node_modules/@cspotcode/source-map-support/register-hook-require.d.ts deleted file mode 100644 index a787e69..0000000 --- a/node_modules/@cspotcode/source-map-support/register-hook-require.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// tslint:disable:no-useless-files - -// For following usage: -// import '@cspotcode/source-map-support/register-hook-require' -// Instead of: -// import sourceMapSupport from '@cspotcode/source-map-support' -// sourceMapSupport.install({hookRequire: true}) diff --git a/node_modules/@cspotcode/source-map-support/register-hook-require.js b/node_modules/@cspotcode/source-map-support/register-hook-require.js deleted file mode 100644 index 6bc12ab..0000000 --- a/node_modules/@cspotcode/source-map-support/register-hook-require.js +++ /dev/null @@ -1,3 +0,0 @@ -require('./').install({ - hookRequire: true -}); diff --git a/node_modules/@cspotcode/source-map-support/register.d.ts b/node_modules/@cspotcode/source-map-support/register.d.ts deleted file mode 100644 index 063cd7c..0000000 --- a/node_modules/@cspotcode/source-map-support/register.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// tslint:disable:no-useless-files - -// For following usage: -// import '@cspotcode/source-map-support/register' -// Instead of: -// import sourceMapSupport from '@cspotcode/source-map-support' -// sourceMapSupport.install() diff --git a/node_modules/@cspotcode/source-map-support/register.js b/node_modules/@cspotcode/source-map-support/register.js deleted file mode 100644 index 4f68e67..0000000 --- a/node_modules/@cspotcode/source-map-support/register.js +++ /dev/null @@ -1 +0,0 @@ -require('./').install(); diff --git a/node_modules/@cspotcode/source-map-support/source-map-support.d.ts b/node_modules/@cspotcode/source-map-support/source-map-support.d.ts deleted file mode 100644 index d8cb9d8..0000000 --- a/node_modules/@cspotcode/source-map-support/source-map-support.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -// Type definitions for source-map-support 0.5 -// Project: https://github.com/evanw/node-source-map-support -// Definitions by: Bart van der Schoor -// Jason Cheatham -// Alcedo Nathaniel De Guzman Jr -// Griffin Yourick -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -export interface RawSourceMap { - version: 3; - sources: string[]; - names: string[]; - sourceRoot?: string; - sourcesContent?: string[]; - mappings: string; - file: string; -} - -/** - * Output of retrieveSourceMap(). - * From source-map-support: - * The map field may be either a string or the parsed JSON object (i.e., - * it must be a valid argument to the SourceMapConsumer constructor). - */ -export interface UrlAndMap { - url: string; - map: string | RawSourceMap; -} - -/** - * Options to install(). - */ -export interface Options { - handleUncaughtExceptions?: boolean | undefined; - hookRequire?: boolean | undefined; - emptyCacheBetweenOperations?: boolean | undefined; - environment?: 'auto' | 'browser' | 'node' | undefined; - overrideRetrieveFile?: boolean | undefined; - overrideRetrieveSourceMap?: boolean | undefined; - retrieveFile?(path: string): string; - retrieveSourceMap?(source: string): UrlAndMap | null; - /** - * Set false to disable redirection of require / import `source-map-support` to `@cspotcode/source-map-support` - */ - redirectConflictingLibrary?: boolean; - /** - * Callback will be called every time we redirect due to `redirectConflictingLibrary` - * This allows consumers to log helpful warnings if they choose. - * @param parent NodeJS.Module which made the require() or require.resolve() call - * @param options options object internally passed to node's `_resolveFilename` hook - */ - onConflictingLibraryRedirect?: (request: string, parent: any, isMain: boolean, options: any, redirectedRequest: string) => void; -} - -export interface Position { - source: string; - line: number; - column: number; -} - -export function wrapCallSite(frame: any /* StackFrame */): any /* StackFrame */; -export function getErrorSource(error: Error): string | null; -export function mapSourcePosition(position: Position): Position; -export function retrieveSourceMap(source: string): UrlAndMap | null; -export function resetRetrieveHandlers(): void; - -/** - * Install SourceMap support. - * @param options Can be used to e.g. disable uncaughtException handler. - */ -export function install(options?: Options): void; - -/** - * Uninstall SourceMap support. - */ -export function uninstall(): void; diff --git a/node_modules/@cspotcode/source-map-support/source-map-support.js b/node_modules/@cspotcode/source-map-support/source-map-support.js deleted file mode 100644 index ad830b6..0000000 --- a/node_modules/@cspotcode/source-map-support/source-map-support.js +++ /dev/null @@ -1,938 +0,0 @@ -const { TraceMap, originalPositionFor, AnyMap } = require('@jridgewell/trace-mapping'); -var path = require('path'); -const { fileURLToPath, pathToFileURL } = require('url'); -var util = require('util'); - -var fs; -try { - fs = require('fs'); - if (!fs.existsSync || !fs.readFileSync) { - // fs doesn't have all methods we need - fs = null; - } -} catch (err) { - /* nop */ -} - -/** - * Requires a module which is protected against bundler minification. - * - * @param {NodeModule} mod - * @param {string} request - */ -function dynamicRequire(mod, request) { - return mod.require(request); -} - -/** - * @typedef {{ - * enabled: boolean; - * originalValue: any; - * installedValue: any; - * }} HookState - * Used for installing and uninstalling hooks - */ - -// Increment this if the format of sharedData changes in a breaking way. -var sharedDataVersion = 1; - -/** - * @template T - * @param {T} defaults - * @returns {T} - */ -function initializeSharedData(defaults) { - var sharedDataKey = 'source-map-support/sharedData'; - if (typeof Symbol !== 'undefined') { - sharedDataKey = Symbol.for(sharedDataKey); - } - var sharedData = this[sharedDataKey]; - if (!sharedData) { - sharedData = { version: sharedDataVersion }; - if (Object.defineProperty) { - Object.defineProperty(this, sharedDataKey, { value: sharedData }); - } else { - this[sharedDataKey] = sharedData; - } - } - if (sharedDataVersion !== sharedData.version) { - throw new Error("Multiple incompatible instances of source-map-support were loaded"); - } - for (var key in defaults) { - if (!(key in sharedData)) { - sharedData[key] = defaults[key]; - } - } - return sharedData; -} - -// If multiple instances of source-map-support are loaded into the same -// context, they shouldn't overwrite each other. By storing handlers, caches, -// and other state on a shared object, different instances of -// source-map-support can work together in a limited way. This does require -// that future versions of source-map-support continue to support the fields on -// this object. If this internal contract ever needs to be broken, increment -// sharedDataVersion. (This version number is not the same as any of the -// package's version numbers, which should reflect the *external* API of -// source-map-support.) -var sharedData = initializeSharedData({ - - // Only install once if called multiple times - // Remember how the environment looked before installation so we can restore if able - /** @type {HookState} */ - errorPrepareStackTraceHook: undefined, - /** @type {HookState} */ - processEmitHook: undefined, - /** @type {HookState} */ - moduleResolveFilenameHook: undefined, - - /** @type {Array<(request: string, parent: any, isMain: boolean, options: any, redirectedRequest: string) => void>} */ - onConflictingLibraryRedirectArr: [], - - // If true, the caches are reset before a stack trace formatting operation - emptyCacheBetweenOperations: false, - - // Maps a file path to a string containing the file contents - fileContentsCache: Object.create(null), - - // Maps a file path to a source map for that file - /** @type {Record C:/dir/file - '/'; // file:///root-dir/file -> /root-dir/file - }); - } - const key = getCacheKey(path); - if(hasFileContentsCacheFromKey(key)) { - return getFileContentsCacheFromKey(key); - } - - var contents = ''; - try { - if (!fs) { - // Use SJAX if we are in the browser - var xhr = new XMLHttpRequest(); - xhr.open('GET', path, /** async */ false); - xhr.send(null); - if (xhr.readyState === 4 && xhr.status === 200) { - contents = xhr.responseText; - } - } else if (fs.existsSync(path)) { - // Otherwise, use the filesystem - contents = fs.readFileSync(path, 'utf8'); - } - } catch (er) { - /* ignore any errors */ - } - - return setFileContentsCache(path, contents); -}); - -// Support URLs relative to a directory, but be careful about a protocol prefix -// in case we are in the browser (i.e. directories may start with "http://" or "file:///") -function supportRelativeURL(file, url) { - if(!file) return url; - // given that this happens within error formatting codepath, probably best to - // fallback instead of throwing if anything goes wrong - try { - // if should output a URL - if(isAbsoluteUrl(file) || isSchemeRelativeUrl(file)) { - if(isAbsoluteUrl(url) || isSchemeRelativeUrl(url)) { - return new URL(url, file).toString(); - } - if(path.isAbsolute(url)) { - return new URL(pathToFileURL(url), file).toString(); - } - // url is relative path or URL - return new URL(url.replace(/\\/g, '/'), file).toString(); - } - // if should output a path (unless URL is something like https://) - if(path.isAbsolute(file)) { - if(isFileUrl(url)) { - return fileURLToPath(url); - } - if(isSchemeRelativeUrl(url)) { - return fileURLToPath(new URL(url, 'file://')); - } - if(isAbsoluteUrl(url)) { - // url is a non-file URL - // Go with the URL - return url; - } - if(path.isAbsolute(url)) { - // Normalize at all? decodeURI or normalize slashes? - return path.normalize(url); - } - // url is relative path or URL - return path.join(file, '..', decodeURI(url)); - } - // If we get here, file is relative. - // Shouldn't happen since node identifies modules with absolute paths or URLs. - // But we can take a stab at returning something meaningful anyway. - if(isAbsoluteUrl(url) || isSchemeRelativeUrl(url)) { - return url; - } - return path.join(file, '..', url); - } catch(e) { - return url; - } -} - -// Return pathOrUrl in the same style as matchStyleOf: either a file URL or a native path -function matchStyleOfPathOrUrl(matchStyleOf, pathOrUrl) { - try { - if(isAbsoluteUrl(matchStyleOf) || isSchemeRelativeUrl(matchStyleOf)) { - if(isAbsoluteUrl(pathOrUrl) || isSchemeRelativeUrl(pathOrUrl)) return pathOrUrl; - if(path.isAbsolute(pathOrUrl)) return pathToFileURL(pathOrUrl).toString(); - } else if(path.isAbsolute(matchStyleOf)) { - if(isAbsoluteUrl(pathOrUrl) || isSchemeRelativeUrl(pathOrUrl)) { - return fileURLToPath(new URL(pathOrUrl, 'file://')); - } - } - return pathOrUrl; - } catch(e) { - return pathOrUrl; - } -} - -function retrieveSourceMapURL(source) { - var fileData; - - if (isInBrowser()) { - try { - var xhr = new XMLHttpRequest(); - xhr.open('GET', source, false); - xhr.send(null); - fileData = xhr.readyState === 4 ? xhr.responseText : null; - - // Support providing a sourceMappingURL via the SourceMap header - var sourceMapHeader = xhr.getResponseHeader("SourceMap") || - xhr.getResponseHeader("X-SourceMap"); - if (sourceMapHeader) { - return sourceMapHeader; - } - } catch (e) { - } - } - - // Get the URL of the source map - fileData = retrieveFile(tryFileURLToPath(source)); - var re = /(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg; - // Keep executing the search to find the *last* sourceMappingURL to avoid - // picking up sourceMappingURLs from comments, strings, etc. - var lastMatch, match; - while (match = re.exec(fileData)) lastMatch = match; - if (!lastMatch) return null; - return lastMatch[1]; -}; - -// Can be overridden by the retrieveSourceMap option to install. Takes a -// generated source filename; returns a {map, optional url} object, or null if -// there is no source map. The map field may be either a string or the parsed -// JSON object (ie, it must be a valid argument to the SourceMapConsumer -// constructor). -/** @type {(source: string) => import('./source-map-support').UrlAndMap | null} */ -var retrieveSourceMap = handlerExec(sharedData.retrieveMapHandlers, sharedData.internalRetrieveMapHandlers); -sharedData.internalRetrieveMapHandlers.push(function(source) { - var sourceMappingURL = retrieveSourceMapURL(source); - if (!sourceMappingURL) return null; - - // Read the contents of the source map - var sourceMapData; - if (reSourceMap.test(sourceMappingURL)) { - // Support source map URL as a data url - var rawData = sourceMappingURL.slice(sourceMappingURL.indexOf(',') + 1); - sourceMapData = Buffer.from(rawData, "base64").toString(); - sourceMappingURL = source; - } else { - // Support source map URLs relative to the source URL - sourceMappingURL = supportRelativeURL(source, sourceMappingURL); - sourceMapData = retrieveFile(tryFileURLToPath(sourceMappingURL)); - } - - if (!sourceMapData) { - return null; - } - - return { - url: sourceMappingURL, - map: sourceMapData - }; -}); - -function mapSourcePosition(position) { - var sourceMap = getSourceMapCache(position.source); - if (!sourceMap) { - // Call the (overrideable) retrieveSourceMap function to get the source map. - var urlAndMap = retrieveSourceMap(position.source); - if (urlAndMap) { - sourceMap = setSourceMapCache(position.source, { - url: urlAndMap.url, - map: new AnyMap(urlAndMap.map, urlAndMap.url) - }); - - // Overwrite trace-mapping's resolutions, because they do not handle - // Windows paths the way we want. - // TODO Remove now that windows path support was added to resolve-uri and thus trace-mapping? - sourceMap.map.resolvedSources = sourceMap.map.sources.map(s => supportRelativeURL(sourceMap.url, s)); - - // Load all sources stored inline with the source map into the file cache - // to pretend like they are already loaded. They may not exist on disk. - if (sourceMap.map.sourcesContent) { - sourceMap.map.resolvedSources.forEach(function(resolvedSource, i) { - var contents = sourceMap.map.sourcesContent[i]; - if (contents) { - setFileContentsCache(resolvedSource, contents); - } - }); - } - } else { - sourceMap = setSourceMapCache(position.source, { - url: null, - map: null - }); - } - } - - // Resolve the source URL relative to the URL of the source map - if (sourceMap && sourceMap.map) { - var originalPosition = originalPositionFor(sourceMap.map, position); - - // Only return the original position if a matching line was found. If no - // matching line is found then we return position instead, which will cause - // the stack trace to print the path and line for the compiled file. It is - // better to give a precise location in the compiled file than a vague - // location in the original file. - if (originalPosition.source !== null) { - // originalPosition.source has *already* been resolved against sourceMap.url - // so is *already* as absolute as possible. - // However, we want to ensure we output in same format as input: URL or native path - originalPosition.source = matchStyleOfPathOrUrl( - position.source, originalPosition.source); - return originalPosition; - } - } - - return position; -} - -// Parses code generated by FormatEvalOrigin(), a function inside V8: -// https://code.google.com/p/v8/source/browse/trunk/src/messages.js -function mapEvalOrigin(origin) { - // Most eval() calls are in this format - var match = /^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(origin); - if (match) { - var position = mapSourcePosition({ - source: match[2], - line: +match[3], - column: match[4] - 1 - }); - return 'eval at ' + match[1] + ' (' + position.source + ':' + - position.line + ':' + (position.column + 1) + ')'; - } - - // Parse nested eval() calls using recursion - match = /^eval at ([^(]+) \((.+)\)$/.exec(origin); - if (match) { - return 'eval at ' + match[1] + ' (' + mapEvalOrigin(match[2]) + ')'; - } - - // Make sure we still return useful information if we didn't find anything - return origin; -} - -// This is copied almost verbatim from the V8 source code at -// https://code.google.com/p/v8/source/browse/trunk/src/messages.js -// Update 2022-04-29: -// https://github.com/v8/v8/blob/98f6f100c5ab8e390e51422747c4ef644d5ac6f2/src/builtins/builtins-callsite.cc#L175-L179 -// https://github.com/v8/v8/blob/98f6f100c5ab8e390e51422747c4ef644d5ac6f2/src/objects/call-site-info.cc#L795-L804 -// https://github.com/v8/v8/blob/98f6f100c5ab8e390e51422747c4ef644d5ac6f2/src/objects/call-site-info.cc#L717-L750 -// The implementation of wrapCallSite() used to just forward to the actual source -// code of CallSite.prototype.toString but unfortunately a new release of V8 -// did something to the prototype chain and broke the shim. The only fix I -// could find was copy/paste. -function CallSiteToString() { - var fileName; - var fileLocation = ""; - if (this.isNative()) { - fileLocation = "native"; - } else { - fileName = this.getScriptNameOrSourceURL(); - if (!fileName && this.isEval()) { - fileLocation = this.getEvalOrigin(); - fileLocation += ", "; // Expecting source position to follow. - } - - if (fileName) { - fileLocation += fileName; - } else { - // Source code does not originate from a file and is not native, but we - // can still get the source position inside the source string, e.g. in - // an eval string. - fileLocation += ""; - } - var lineNumber = this.getLineNumber(); - if (lineNumber != null) { - fileLocation += ":" + lineNumber; - var columnNumber = this.getColumnNumber(); - if (columnNumber) { - fileLocation += ":" + columnNumber; - } - } - } - - var line = ""; - var isAsync = this.isAsync ? this.isAsync() : false; - if(isAsync) { - line += 'async '; - var isPromiseAll = this.isPromiseAll ? this.isPromiseAll() : false; - var isPromiseAny = this.isPromiseAny ? this.isPromiseAny() : false; - if(isPromiseAny || isPromiseAll) { - line += isPromiseAll ? 'Promise.all (index ' : 'Promise.any (index '; - var promiseIndex = this.getPromiseIndex(); - line += promiseIndex + ')'; - } - } - var functionName = this.getFunctionName(); - var addSuffix = true; - var isConstructor = this.isConstructor(); - var isMethodCall = !(this.isToplevel() || isConstructor); - if (isMethodCall) { - var typeName = this.getTypeName(); - // Fixes shim to be backward compatable with Node v0 to v4 - if (typeName === "[object Object]") { - typeName = "null"; - } - var methodName = this.getMethodName(); - if (functionName) { - if (typeName && functionName.indexOf(typeName) != 0) { - line += typeName + "."; - } - line += functionName; - if (methodName && functionName.indexOf("." + methodName) != functionName.length - methodName.length - 1) { - line += " [as " + methodName + "]"; - } - } else { - line += typeName + "." + (methodName || ""); - } - } else if (isConstructor) { - line += "new " + (functionName || ""); - } else if (functionName) { - line += functionName; - } else { - line += fileLocation; - addSuffix = false; - } - if (addSuffix) { - line += " (" + fileLocation + ")"; - } - return line; -} - -function cloneCallSite(frame) { - var object = {}; - Object.getOwnPropertyNames(Object.getPrototypeOf(frame)).forEach(function(name) { - object[name] = /^(?:is|get)/.test(name) ? function() { return frame[name].call(frame); } : frame[name]; - }); - object.toString = CallSiteToString; - return object; -} - -function wrapCallSite(frame, state) { - // provides interface backward compatibility - if (state === undefined) { - state = { nextPosition: null, curPosition: null } - } - if(frame.isNative()) { - state.curPosition = null; - return frame; - } - - // Most call sites will return the source file from getFileName(), but code - // passed to eval() ending in "//# sourceURL=..." will return the source file - // from getScriptNameOrSourceURL() instead - var source = frame.getFileName() || frame.getScriptNameOrSourceURL(); - if (source) { - // v8 does not expose its internal isWasm, etc methods, so we do this instead. - if(source.startsWith('wasm://')) { - state.curPosition = null; - return frame; - } - - var line = frame.getLineNumber(); - var column = frame.getColumnNumber() - 1; - - // Fix position in Node where some (internal) code is prepended. - // See https://github.com/evanw/node-source-map-support/issues/36 - // Header removed in node at ^10.16 || >=11.11.0 - // v11 is not an LTS candidate, we can just test the one version with it. - // Test node versions for: 10.16-19, 10.20+, 12-19, 20-99, 100+, or 11.11 - var noHeader = /^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/; - var headerLength = noHeader.test(process.version) ? 0 : 62; - if (line === 1 && column > headerLength && !isInBrowser() && !frame.isEval()) { - column -= headerLength; - } - - var position = mapSourcePosition({ - source: source, - line: line, - column: column - }); - state.curPosition = position; - frame = cloneCallSite(frame); - var originalFunctionName = frame.getFunctionName; - frame.getFunctionName = function() { - if (state.nextPosition == null) { - return originalFunctionName(); - } - return state.nextPosition.name || originalFunctionName(); - }; - frame.getFileName = function() { return position.source; }; - frame.getLineNumber = function() { return position.line; }; - frame.getColumnNumber = function() { return position.column + 1; }; - frame.getScriptNameOrSourceURL = function() { return position.source; }; - return frame; - } - - // Code called using eval() needs special handling - var origin = frame.isEval() && frame.getEvalOrigin(); - if (origin) { - origin = mapEvalOrigin(origin); - frame = cloneCallSite(frame); - frame.getEvalOrigin = function() { return origin; }; - return frame; - } - - // If we get here then we were unable to change the source position - return frame; -} - -var kIsNodeError = undefined; -try { - // Get a deliberate ERR_INVALID_ARG_TYPE - // TODO is there a better way to reliably get an instance of NodeError? - path.resolve(123); -} catch(e) { - const symbols = Object.getOwnPropertySymbols(e); - const symbol = symbols.find(function (s) {return s.toString().indexOf('kIsNodeError') >= 0}); - if(symbol) kIsNodeError = symbol; -} - -const ErrorPrototypeToString = (err) =>Error.prototype.toString.call(err); - -/** @param {HookState} hookState */ -function createPrepareStackTrace(hookState) { - return prepareStackTrace; - - // This function is part of the V8 stack trace API, for more info see: - // https://v8.dev/docs/stack-trace-api - function prepareStackTrace(error, stack) { - if(!hookState.enabled) return hookState.originalValue.apply(this, arguments); - - if (sharedData.emptyCacheBetweenOperations) { - clearCaches(); - } - - // node gives its own errors special treatment. Mimic that behavior - // https://github.com/nodejs/node/blob/3cbaabc4622df1b4009b9d026a1a970bdbae6e89/lib/internal/errors.js#L118-L128 - // https://github.com/nodejs/node/pull/39182 - var errorString; - if (kIsNodeError) { - if(kIsNodeError in error) { - errorString = `${error.name} [${error.code}]: ${error.message}`; - } else { - errorString = ErrorPrototypeToString(error); - } - } else { - var name = error.name || 'Error'; - var message = error.message || ''; - errorString = message ? name + ": " + message : name; - } - - var state = { nextPosition: null, curPosition: null }; - var processedStack = []; - for (var i = stack.length - 1; i >= 0; i--) { - processedStack.push('\n at ' + wrapCallSite(stack[i], state)); - state.nextPosition = state.curPosition; - } - state.curPosition = state.nextPosition = null; - return errorString + processedStack.reverse().join(''); - } -} - -// Generate position and snippet of original source with pointer -function getErrorSource(error) { - var match = /\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(error.stack); - if (match) { - var source = match[1]; - var line = +match[2]; - var column = +match[3]; - - // Support the inline sourceContents inside the source map - var contents = getFileContentsCache(source); - - const sourceAsPath = tryFileURLToPath(source); - - // Support files on disk - if (!contents && fs && fs.existsSync(sourceAsPath)) { - try { - contents = fs.readFileSync(sourceAsPath, 'utf8'); - } catch (er) { - contents = ''; - } - } - - // Format the line from the original source code like node does - if (contents) { - var code = contents.split(/(?:\r\n|\r|\n)/)[line - 1]; - if (code) { - return source + ':' + line + '\n' + code + '\n' + - new Array(column).join(' ') + '^'; - } - } - } - return null; -} - -function printFatalErrorUponExit (error) { - var source = getErrorSource(error); - - // Ensure error is printed synchronously and not truncated - if (process.stderr._handle && process.stderr._handle.setBlocking) { - process.stderr._handle.setBlocking(true); - } - - if (source) { - console.error(source); - } - - // Matches node's behavior for colorized output - console.error( - util.inspect(error, { - customInspect: false, - colors: process.stderr.isTTY - }) - ); -} - -function shimEmitUncaughtException () { - const originalValue = process.emit; - var hook = sharedData.processEmitHook = { - enabled: true, - originalValue, - installedValue: undefined - }; - var isTerminatingDueToFatalException = false; - var fatalException; - - process.emit = sharedData.processEmitHook.installedValue = function (type) { - const hadListeners = originalValue.apply(this, arguments); - if(hook.enabled) { - if (type === 'uncaughtException' && !hadListeners) { - isTerminatingDueToFatalException = true; - fatalException = arguments[1]; - process.exit(1); - } - if (type === 'exit' && isTerminatingDueToFatalException) { - printFatalErrorUponExit(fatalException); - } - } - return hadListeners; - }; -} - -var originalRetrieveFileHandlers = sharedData.retrieveFileHandlers.slice(0); -var originalRetrieveMapHandlers = sharedData.retrieveMapHandlers.slice(0); - -exports.wrapCallSite = wrapCallSite; -exports.getErrorSource = getErrorSource; -exports.mapSourcePosition = mapSourcePosition; -exports.retrieveSourceMap = retrieveSourceMap; - -exports.install = function(options) { - options = options || {}; - - if (options.environment) { - environment = options.environment; - if (["node", "browser", "auto"].indexOf(environment) === -1) { - throw new Error("environment " + environment + " was unknown. Available options are {auto, browser, node}") - } - } - - // Use dynamicRequire to avoid including in browser bundles - var Module = dynamicRequire(module, 'module'); - - // Redirect subsequent imports of "source-map-support" - // to this package - const {redirectConflictingLibrary = true, onConflictingLibraryRedirect} = options; - if(redirectConflictingLibrary) { - if (!sharedData.moduleResolveFilenameHook) { - const originalValue = Module._resolveFilename; - const moduleResolveFilenameHook = sharedData.moduleResolveFilenameHook = { - enabled: true, - originalValue, - installedValue: undefined, - } - Module._resolveFilename = sharedData.moduleResolveFilenameHook.installedValue = function (request, parent, isMain, options) { - if (moduleResolveFilenameHook.enabled) { - // Match all source-map-support entrypoints: source-map-support, source-map-support/register - let requestRedirect; - if (request === 'source-map-support') { - requestRedirect = './'; - } else if (request === 'source-map-support/register') { - requestRedirect = './register'; - } - - if (requestRedirect !== undefined) { - const newRequest = require.resolve(requestRedirect); - for (const cb of sharedData.onConflictingLibraryRedirectArr) { - cb(request, parent, isMain, options, newRequest); - } - request = newRequest; - } - } - - return originalValue.call(this, request, parent, isMain, options); - } - } - if (onConflictingLibraryRedirect) { - sharedData.onConflictingLibraryRedirectArr.push(onConflictingLibraryRedirect); - } - } - - // Allow sources to be found by methods other than reading the files - // directly from disk. - if (options.retrieveFile) { - if (options.overrideRetrieveFile) { - sharedData.retrieveFileHandlers.length = 0; - } - - sharedData.retrieveFileHandlers.unshift(options.retrieveFile); - } - - // Allow source maps to be found by methods other than reading the files - // directly from disk. - if (options.retrieveSourceMap) { - if (options.overrideRetrieveSourceMap) { - sharedData.retrieveMapHandlers.length = 0; - } - - sharedData.retrieveMapHandlers.unshift(options.retrieveSourceMap); - } - - // Support runtime transpilers that include inline source maps - if (options.hookRequire && !isInBrowser()) { - var $compile = Module.prototype._compile; - - if (!$compile.__sourceMapSupport) { - Module.prototype._compile = function(content, filename) { - setFileContentsCache(filename, content); - setSourceMapCache(filename, undefined); - return $compile.call(this, content, filename); - }; - - Module.prototype._compile.__sourceMapSupport = true; - } - } - - // Configure options - if (!sharedData.emptyCacheBetweenOperations) { - sharedData.emptyCacheBetweenOperations = 'emptyCacheBetweenOperations' in options ? - options.emptyCacheBetweenOperations : false; - } - - - // Install the error reformatter - if (!sharedData.errorPrepareStackTraceHook) { - const originalValue = Error.prepareStackTrace; - sharedData.errorPrepareStackTraceHook = { - enabled: true, - originalValue, - installedValue: undefined - }; - Error.prepareStackTrace = sharedData.errorPrepareStackTraceHook.installedValue = createPrepareStackTrace(sharedData.errorPrepareStackTraceHook); - } - - if (!sharedData.processEmitHook) { - var installHandler = 'handleUncaughtExceptions' in options ? - options.handleUncaughtExceptions : true; - - // Do not override 'uncaughtException' with our own handler in Node.js - // Worker threads. Workers pass the error to the main thread as an event, - // rather than printing something to stderr and exiting. - try { - // We need to use `dynamicRequire` because `require` on it's own will be optimized by WebPack/Browserify. - var worker_threads = dynamicRequire(module, 'worker_threads'); - if (worker_threads.isMainThread === false) { - installHandler = false; - } - } catch(e) {} - - // Provide the option to not install the uncaught exception handler. This is - // to support other uncaught exception handlers (in test frameworks, for - // example). If this handler is not installed and there are no other uncaught - // exception handlers, uncaught exceptions will be caught by node's built-in - // exception handler and the process will still be terminated. However, the - // generated JavaScript code will be shown above the stack trace instead of - // the original source code. - if (installHandler && hasGlobalProcessEventEmitter()) { - shimEmitUncaughtException(); - } - } -}; - -exports.uninstall = function() { - if(sharedData.processEmitHook) { - // Disable behavior - sharedData.processEmitHook.enabled = false; - // If possible, remove our hook function. May not be possible if subsequent third-party hooks have wrapped around us. - if(process.emit === sharedData.processEmitHook.installedValue) { - process.emit = sharedData.processEmitHook.originalValue; - } - sharedData.processEmitHook = undefined; - } - if(sharedData.errorPrepareStackTraceHook) { - // Disable behavior - sharedData.errorPrepareStackTraceHook.enabled = false; - // If possible or necessary, remove our hook function. - // In vanilla environments, prepareStackTrace is `undefined`. - // We cannot delegate to `undefined` the way we can to a function w/`.apply()`; our only option is to remove the function. - // If we are the *first* hook installed, and another was installed on top of us, we have no choice but to remove both. - if(Error.prepareStackTrace === sharedData.errorPrepareStackTraceHook.installedValue || typeof sharedData.errorPrepareStackTraceHook.originalValue !== 'function') { - Error.prepareStackTrace = sharedData.errorPrepareStackTraceHook.originalValue; - } - sharedData.errorPrepareStackTraceHook = undefined; - } - if (sharedData.moduleResolveFilenameHook) { - // Disable behavior - sharedData.moduleResolveFilenameHook.enabled = false; - // If possible, remove our hook function. May not be possible if subsequent third-party hooks have wrapped around us. - var Module = dynamicRequire(module, 'module'); - if(Module._resolveFilename === sharedData.moduleResolveFilenameHook.installedValue) { - Module._resolveFilename = sharedData.moduleResolveFilenameHook.originalValue; - } - sharedData.moduleResolveFilenameHook = undefined; - } - sharedData.onConflictingLibraryRedirectArr.length = 0; -} - -exports.resetRetrieveHandlers = function() { - sharedData.retrieveFileHandlers.length = 0; - sharedData.retrieveMapHandlers.length = 0; -} diff --git a/node_modules/@jridgewell/resolve-uri/LICENSE b/node_modules/@jridgewell/resolve-uri/LICENSE deleted file mode 100644 index 0a81b2a..0000000 --- a/node_modules/@jridgewell/resolve-uri/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2019 Justin Ridgewell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/README.md b/node_modules/@jridgewell/resolve-uri/README.md deleted file mode 100644 index 2fe70df..0000000 --- a/node_modules/@jridgewell/resolve-uri/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# @jridgewell/resolve-uri - -> Resolve a URI relative to an optional base URI - -Resolve any combination of absolute URIs, protocol-realtive URIs, absolute paths, or relative paths. - -## Installation - -```sh -npm install @jridgewell/resolve-uri -``` - -## Usage - -```typescript -function resolve(input: string, base?: string): string; -``` - -```js -import resolve from '@jridgewell/resolve-uri'; - -resolve('foo', 'https://example.com'); // => 'https://example.com/foo' -``` - -| Input | Base | Resolution | Explanation | -|-----------------------|-------------------------|--------------------------------|--------------------------------------------------------------| -| `https://example.com` | _any_ | `https://example.com/` | Input is normalized only | -| `//example.com` | `https://base.com/` | `https://example.com/` | Input inherits the base's protocol | -| `//example.com` | _rest_ | `//example.com/` | Input is normalized only | -| `/example` | `https://base.com/` | `https://base.com/example` | Input inherits the base's origin | -| `/example` | `//base.com/` | `//base.com/example` | Input inherits the base's host and remains protocol relative | -| `/example` | _rest_ | `/example` | Input is normalized only | -| `example` | `https://base.com/dir/` | `https://base.com/dir/example` | Input is joined with the base | -| `example` | `https://base.com/file` | `https://base.com/example` | Input is joined with the base without its file | -| `example` | `//base.com/dir/` | `//base.com/dir/example` | Input is joined with the base's last directory | -| `example` | `//base.com/file` | `//base.com/example` | Input is joined with the base without its file | -| `example` | `/base/dir/` | `/base/dir/example` | Input is joined with the base's last directory | -| `example` | `/base/file` | `/base/example` | Input is joined with the base without its file | -| `example` | `base/dir/` | `base/dir/example` | Input is joined with the base's last directory | -| `example` | `base/file` | `base/example` | Input is joined with the base without its file | diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs deleted file mode 100644 index e958e88..0000000 --- a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs +++ /dev/null @@ -1,232 +0,0 @@ -// Matches the scheme of a URL, eg "http://" -const schemeRegex = /^[\w+.-]+:\/\//; -/** - * Matches the parts of a URL: - * 1. Scheme, including ":", guaranteed. - * 2. User/password, including "@", optional. - * 3. Host, guaranteed. - * 4. Port, including ":", optional. - * 5. Path, including "/", optional. - * 6. Query, including "?", optional. - * 7. Hash, including "#", optional. - */ -const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; -/** - * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start - * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive). - * - * 1. Host, optional. - * 2. Path, which may include "/", guaranteed. - * 3. Query, including "?", optional. - * 4. Hash, including "#", optional. - */ -const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; -function isAbsoluteUrl(input) { - return schemeRegex.test(input); -} -function isSchemeRelativeUrl(input) { - return input.startsWith('//'); -} -function isAbsolutePath(input) { - return input.startsWith('/'); -} -function isFileUrl(input) { - return input.startsWith('file:'); -} -function isRelative(input) { - return /^[.?#]/.test(input); -} -function parseAbsoluteUrl(input) { - const match = urlRegex.exec(input); - return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || ''); -} -function parseFileUrl(input) { - const match = fileRegex.exec(input); - const path = match[2]; - return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || ''); -} -function makeUrl(scheme, user, host, port, path, query, hash) { - return { - scheme, - user, - host, - port, - path, - query, - hash, - type: 7 /* Absolute */, - }; -} -function parseUrl(input) { - if (isSchemeRelativeUrl(input)) { - const url = parseAbsoluteUrl('http:' + input); - url.scheme = ''; - url.type = 6 /* SchemeRelative */; - return url; - } - if (isAbsolutePath(input)) { - const url = parseAbsoluteUrl('http://foo.com' + input); - url.scheme = ''; - url.host = ''; - url.type = 5 /* AbsolutePath */; - return url; - } - if (isFileUrl(input)) - return parseFileUrl(input); - if (isAbsoluteUrl(input)) - return parseAbsoluteUrl(input); - const url = parseAbsoluteUrl('http://foo.com/' + input); - url.scheme = ''; - url.host = ''; - url.type = input - ? input.startsWith('?') - ? 3 /* Query */ - : input.startsWith('#') - ? 2 /* Hash */ - : 4 /* RelativePath */ - : 1 /* Empty */; - return url; -} -function stripPathFilename(path) { - // If a path ends with a parent directory "..", then it's a relative path with excess parent - // paths. It's not a file, so we can't strip it. - if (path.endsWith('/..')) - return path; - const index = path.lastIndexOf('/'); - return path.slice(0, index + 1); -} -function mergePaths(url, base) { - normalizePath(base, base.type); - // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative - // path). - if (url.path === '/') { - url.path = base.path; - } - else { - // Resolution happens relative to the base path's directory, not the file. - url.path = stripPathFilename(base.path) + url.path; - } -} -/** - * The path can have empty directories "//", unneeded parents "foo/..", or current directory - * "foo/.". We need to normalize to a standard representation. - */ -function normalizePath(url, type) { - const rel = type <= 4 /* RelativePath */; - const pieces = url.path.split('/'); - // We need to preserve the first piece always, so that we output a leading slash. The item at - // pieces[0] is an empty string. - let pointer = 1; - // Positive is the number of real directories we've output, used for popping a parent directory. - // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo". - let positive = 0; - // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will - // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a - // real directory, we won't need to append, unless the other conditions happen again. - let addTrailingSlash = false; - for (let i = 1; i < pieces.length; i++) { - const piece = pieces[i]; - // An empty directory, could be a trailing slash, or just a double "//" in the path. - if (!piece) { - addTrailingSlash = true; - continue; - } - // If we encounter a real directory, then we don't need to append anymore. - addTrailingSlash = false; - // A current directory, which we can always drop. - if (piece === '.') - continue; - // A parent directory, we need to see if there are any real directories we can pop. Else, we - // have an excess of parents, and we'll need to keep the "..". - if (piece === '..') { - if (positive) { - addTrailingSlash = true; - positive--; - pointer--; - } - else if (rel) { - // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute - // URL, protocol relative URL, or an absolute path, we don't need to keep excess. - pieces[pointer++] = piece; - } - continue; - } - // We've encountered a real directory. Move it to the next insertion pointer, which accounts for - // any popped or dropped directories. - pieces[pointer++] = piece; - positive++; - } - let path = ''; - for (let i = 1; i < pointer; i++) { - path += '/' + pieces[i]; - } - if (!path || (addTrailingSlash && !path.endsWith('/..'))) { - path += '/'; - } - url.path = path; -} -/** - * Attempts to resolve `input` URL/path relative to `base`. - */ -function resolve(input, base) { - if (!input && !base) - return ''; - const url = parseUrl(input); - let inputType = url.type; - if (base && inputType !== 7 /* Absolute */) { - const baseUrl = parseUrl(base); - const baseType = baseUrl.type; - switch (inputType) { - case 1 /* Empty */: - url.hash = baseUrl.hash; - // fall through - case 2 /* Hash */: - url.query = baseUrl.query; - // fall through - case 3 /* Query */: - case 4 /* RelativePath */: - mergePaths(url, baseUrl); - // fall through - case 5 /* AbsolutePath */: - // The host, user, and port are joined, you can't copy one without the others. - url.user = baseUrl.user; - url.host = baseUrl.host; - url.port = baseUrl.port; - // fall through - case 6 /* SchemeRelative */: - // The input doesn't have a schema at least, so we need to copy at least that over. - url.scheme = baseUrl.scheme; - } - if (baseType > inputType) - inputType = baseType; - } - normalizePath(url, inputType); - const queryHash = url.query + url.hash; - switch (inputType) { - // This is impossible, because of the empty checks at the start of the function. - // case UrlType.Empty: - case 2 /* Hash */: - case 3 /* Query */: - return queryHash; - case 4 /* RelativePath */: { - // The first char is always a "/", and we need it to be relative. - const path = url.path.slice(1); - if (!path) - return queryHash || '.'; - if (isRelative(base || input) && !isRelative(path)) { - // If base started with a leading ".", or there is no base and input started with a ".", - // then we need to ensure that the relative path starts with a ".". We don't know if - // relative starts with a "..", though, so check before prepending. - return './' + path + queryHash; - } - return path + queryHash; - } - case 5 /* AbsolutePath */: - return url.path + queryHash; - default: - return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash; - } -} - -export { resolve as default }; -//# sourceMappingURL=resolve-uri.mjs.map diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map deleted file mode 100644 index 1de97d0..0000000 --- a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolve-uri.mjs","sources":["../src/resolve-uri.ts"],"sourcesContent":["// Matches the scheme of a URL, eg \"http://\"\nconst schemeRegex = /^[\\w+.-]+:\\/\\//;\n\n/**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\nconst urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n\n/**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\nconst fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\n\ntype Url = {\n scheme: string;\n user: string;\n host: string;\n port: string;\n path: string;\n query: string;\n hash: string;\n type: UrlType;\n};\n\nconst enum UrlType {\n Empty = 1,\n Hash = 2,\n Query = 3,\n RelativePath = 4,\n AbsolutePath = 5,\n SchemeRelative = 6,\n Absolute = 7,\n}\n\nfunction isAbsoluteUrl(input: string): boolean {\n return schemeRegex.test(input);\n}\n\nfunction isSchemeRelativeUrl(input: string): boolean {\n return input.startsWith('//');\n}\n\nfunction isAbsolutePath(input: string): boolean {\n return input.startsWith('/');\n}\n\nfunction isFileUrl(input: string): boolean {\n return input.startsWith('file:');\n}\n\nfunction isRelative(input: string): boolean {\n return /^[.?#]/.test(input);\n}\n\nfunction parseAbsoluteUrl(input: string): Url {\n const match = urlRegex.exec(input)!;\n return makeUrl(\n match[1],\n match[2] || '',\n match[3],\n match[4] || '',\n match[5] || '/',\n match[6] || '',\n match[7] || '',\n );\n}\n\nfunction parseFileUrl(input: string): Url {\n const match = fileRegex.exec(input)!;\n const path = match[2];\n return makeUrl(\n 'file:',\n '',\n match[1] || '',\n '',\n isAbsolutePath(path) ? path : '/' + path,\n match[3] || '',\n match[4] || '',\n );\n}\n\nfunction makeUrl(\n scheme: string,\n user: string,\n host: string,\n port: string,\n path: string,\n query: string,\n hash: string,\n): Url {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: UrlType.Absolute,\n };\n}\n\nfunction parseUrl(input: string): Url {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = UrlType.SchemeRelative;\n return url;\n }\n\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = UrlType.AbsolutePath;\n return url;\n }\n\n if (isFileUrl(input)) return parseFileUrl(input);\n\n if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);\n\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? UrlType.Query\n : input.startsWith('#')\n ? UrlType.Hash\n : UrlType.RelativePath\n : UrlType.Empty;\n return url;\n}\n\nfunction stripPathFilename(path: string): string {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..')) return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n\nfunction mergePaths(url: Url, base: Url) {\n normalizePath(base, base.type);\n\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n } else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n}\n\n/**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\nfunction normalizePath(url: Url, type: UrlType) {\n const rel = type <= UrlType.RelativePath;\n const pieces = url.path.split('/');\n\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n\n // A current directory, which we can always drop.\n if (piece === '.') continue;\n\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n } else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n}\n\n/**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\nexport default function resolve(input: string, base: string | undefined): string {\n if (!input && !base) return '';\n\n const url = parseUrl(input);\n let inputType = url.type;\n\n if (base && inputType !== UrlType.Absolute) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n\n switch (inputType) {\n case UrlType.Empty:\n url.hash = baseUrl.hash;\n // fall through\n\n case UrlType.Hash:\n url.query = baseUrl.query;\n // fall through\n\n case UrlType.Query:\n case UrlType.RelativePath:\n mergePaths(url, baseUrl);\n // fall through\n\n case UrlType.AbsolutePath:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n\n case UrlType.SchemeRelative:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType) inputType = baseType;\n }\n\n normalizePath(url, inputType);\n\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n\n case UrlType.Hash:\n case UrlType.Query:\n return queryHash;\n\n case UrlType.RelativePath: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n\n if (!path) return queryHash || '.';\n\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n\n return path + queryHash;\n }\n\n case UrlType.AbsolutePath:\n return url.path + queryHash;\n\n default:\n return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;\n }\n}\n"],"names":[],"mappings":"AAAA;AACA,MAAM,WAAW,GAAG,gBAAgB,CAAC;AAErC;;;;;;;;;;AAUA,MAAM,QAAQ,GAAG,0EAA0E,CAAC;AAE5F;;;;;;;;;AASA,MAAM,SAAS,GAAG,iEAAiE,CAAC;AAuBpF,SAAS,aAAa,CAAC,KAAa;IAClC,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAa;IACxC,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,cAAc,CAAC,KAAa;IACnC,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,SAAS,CAAC,KAAa;IAC9B,OAAO,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC;AAED,SAAS,UAAU,CAAC,KAAa;IAC/B,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa;IACrC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAE,CAAC;IACpC,OAAO,OAAO,CACZ,KAAK,CAAC,CAAC,CAAC,EACR,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,EACR,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,EACf,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CACf,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,KAAa;IACjC,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,KAAK,CAAE,CAAC;IACrC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACtB,OAAO,OAAO,CACZ,OAAO,EACP,EAAE,EACF,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,EAAE,EACF,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,EACxC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CACf,CAAC;AACJ,CAAC;AAED,SAAS,OAAO,CACd,MAAc,EACd,IAAY,EACZ,IAAY,EACZ,IAAY,EACZ,IAAY,EACZ,KAAa,EACb,IAAY;IAEZ,OAAO;QACL,MAAM;QACN,IAAI;QACJ,IAAI;QACJ,IAAI;QACJ,IAAI;QACJ,KAAK;QACL,IAAI;QACJ,IAAI;KACL,CAAC;AACJ,CAAC;AAED,SAAS,QAAQ,CAAC,KAAa;IAC7B,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE;QAC9B,MAAM,GAAG,GAAG,gBAAgB,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC;QAC9C,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC;QAChB,GAAG,CAAC,IAAI,0BAA0B;QAClC,OAAO,GAAG,CAAC;KACZ;IAED,IAAI,cAAc,CAAC,KAAK,CAAC,EAAE;QACzB,MAAM,GAAG,GAAG,gBAAgB,CAAC,gBAAgB,GAAG,KAAK,CAAC,CAAC;QACvD,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC;QAChB,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC;QACd,GAAG,CAAC,IAAI,wBAAwB;QAChC,OAAO,GAAG,CAAC;KACZ;IAED,IAAI,SAAS,CAAC,KAAK,CAAC;QAAE,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;IAEjD,IAAI,aAAa,CAAC,KAAK,CAAC;QAAE,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAEzD,MAAM,GAAG,GAAG,gBAAgB,CAAC,iBAAiB,GAAG,KAAK,CAAC,CAAC;IACxD,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC;IAChB,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC;IACd,GAAG,CAAC,IAAI,GAAG,KAAK;UACZ,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC;;cAEnB,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC;;;wBAGT;IAClB,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAY;;;IAGrC,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACtC,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACpC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;AAClC,CAAC;AAED,SAAS,UAAU,CAAC,GAAQ,EAAE,IAAS;IACrC,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;;;IAI/B,IAAI,GAAG,CAAC,IAAI,KAAK,GAAG,EAAE;QACpB,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;KACtB;SAAM;;QAEL,GAAG,CAAC,IAAI,GAAG,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC;KACpD;AACH,CAAC;AAED;;;;AAIA,SAAS,aAAa,CAAC,GAAQ,EAAE,IAAa;IAC5C,MAAM,GAAG,GAAG,IAAI,yBAAyB;IACzC,MAAM,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;;;IAInC,IAAI,OAAO,GAAG,CAAC,CAAC;;;IAIhB,IAAI,QAAQ,GAAG,CAAC,CAAC;;;;IAKjB,IAAI,gBAAgB,GAAG,KAAK,CAAC;IAE7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtC,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;;QAGxB,IAAI,CAAC,KAAK,EAAE;YACV,gBAAgB,GAAG,IAAI,CAAC;YACxB,SAAS;SACV;;QAGD,gBAAgB,GAAG,KAAK,CAAC;;QAGzB,IAAI,KAAK,KAAK,GAAG;YAAE,SAAS;;;QAI5B,IAAI,KAAK,KAAK,IAAI,EAAE;YAClB,IAAI,QAAQ,EAAE;gBACZ,gBAAgB,GAAG,IAAI,CAAC;gBACxB,QAAQ,EAAE,CAAC;gBACX,OAAO,EAAE,CAAC;aACX;iBAAM,IAAI,GAAG,EAAE;;;gBAGd,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC;aAC3B;YACD,SAAS;SACV;;;QAID,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC;QAC1B,QAAQ,EAAE,CAAC;KACZ;IAED,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,EAAE,EAAE;QAChC,IAAI,IAAI,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;KACzB;IACD,IAAI,CAAC,IAAI,KAAK,gBAAgB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE;QACxD,IAAI,IAAI,GAAG,CAAC;KACb;IACD,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC;AAClB,CAAC;AAED;;;SAGwB,OAAO,CAAC,KAAa,EAAE,IAAwB;IACrE,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IAE/B,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5B,IAAI,SAAS,GAAG,GAAG,CAAC,IAAI,CAAC;IAEzB,IAAI,IAAI,IAAI,SAAS,uBAAuB;QAC1C,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC/B,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;QAE9B,QAAQ,SAAS;YACf;gBACE,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;;YAG1B;gBACE,GAAG,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;;YAG5B,mBAAmB;YACnB;gBACE,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;;YAG3B;;gBAEE,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;gBACxB,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;gBACxB,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;;YAG1B;;gBAEE,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;SAC/B;QACD,IAAI,QAAQ,GAAG,SAAS;YAAE,SAAS,GAAG,QAAQ,CAAC;KAChD;IAED,aAAa,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IAE9B,MAAM,SAAS,GAAG,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC;IACvC,QAAQ,SAAS;;;QAIf,kBAAkB;QAClB;YACE,OAAO,SAAS,CAAC;QAEnB,2BAA2B;;YAEzB,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAE/B,IAAI,CAAC,IAAI;gBAAE,OAAO,SAAS,IAAI,GAAG,CAAC;YAEnC,IAAI,UAAU,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;;;;gBAIlD,OAAO,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;aAChC;YAED,OAAO,IAAI,GAAG,SAAS,CAAC;SACzB;QAED;YACE,OAAO,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;QAE9B;YACE,OAAO,GAAG,CAAC,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;KACpF;AACH;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js deleted file mode 100644 index a783049..0000000 --- a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js +++ /dev/null @@ -1,240 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.resolveURI = factory()); -})(this, (function () { 'use strict'; - - // Matches the scheme of a URL, eg "http://" - const schemeRegex = /^[\w+.-]+:\/\//; - /** - * Matches the parts of a URL: - * 1. Scheme, including ":", guaranteed. - * 2. User/password, including "@", optional. - * 3. Host, guaranteed. - * 4. Port, including ":", optional. - * 5. Path, including "/", optional. - * 6. Query, including "?", optional. - * 7. Hash, including "#", optional. - */ - const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; - /** - * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start - * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive). - * - * 1. Host, optional. - * 2. Path, which may include "/", guaranteed. - * 3. Query, including "?", optional. - * 4. Hash, including "#", optional. - */ - const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; - function isAbsoluteUrl(input) { - return schemeRegex.test(input); - } - function isSchemeRelativeUrl(input) { - return input.startsWith('//'); - } - function isAbsolutePath(input) { - return input.startsWith('/'); - } - function isFileUrl(input) { - return input.startsWith('file:'); - } - function isRelative(input) { - return /^[.?#]/.test(input); - } - function parseAbsoluteUrl(input) { - const match = urlRegex.exec(input); - return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || ''); - } - function parseFileUrl(input) { - const match = fileRegex.exec(input); - const path = match[2]; - return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || ''); - } - function makeUrl(scheme, user, host, port, path, query, hash) { - return { - scheme, - user, - host, - port, - path, - query, - hash, - type: 7 /* Absolute */, - }; - } - function parseUrl(input) { - if (isSchemeRelativeUrl(input)) { - const url = parseAbsoluteUrl('http:' + input); - url.scheme = ''; - url.type = 6 /* SchemeRelative */; - return url; - } - if (isAbsolutePath(input)) { - const url = parseAbsoluteUrl('http://foo.com' + input); - url.scheme = ''; - url.host = ''; - url.type = 5 /* AbsolutePath */; - return url; - } - if (isFileUrl(input)) - return parseFileUrl(input); - if (isAbsoluteUrl(input)) - return parseAbsoluteUrl(input); - const url = parseAbsoluteUrl('http://foo.com/' + input); - url.scheme = ''; - url.host = ''; - url.type = input - ? input.startsWith('?') - ? 3 /* Query */ - : input.startsWith('#') - ? 2 /* Hash */ - : 4 /* RelativePath */ - : 1 /* Empty */; - return url; - } - function stripPathFilename(path) { - // If a path ends with a parent directory "..", then it's a relative path with excess parent - // paths. It's not a file, so we can't strip it. - if (path.endsWith('/..')) - return path; - const index = path.lastIndexOf('/'); - return path.slice(0, index + 1); - } - function mergePaths(url, base) { - normalizePath(base, base.type); - // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative - // path). - if (url.path === '/') { - url.path = base.path; - } - else { - // Resolution happens relative to the base path's directory, not the file. - url.path = stripPathFilename(base.path) + url.path; - } - } - /** - * The path can have empty directories "//", unneeded parents "foo/..", or current directory - * "foo/.". We need to normalize to a standard representation. - */ - function normalizePath(url, type) { - const rel = type <= 4 /* RelativePath */; - const pieces = url.path.split('/'); - // We need to preserve the first piece always, so that we output a leading slash. The item at - // pieces[0] is an empty string. - let pointer = 1; - // Positive is the number of real directories we've output, used for popping a parent directory. - // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo". - let positive = 0; - // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will - // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a - // real directory, we won't need to append, unless the other conditions happen again. - let addTrailingSlash = false; - for (let i = 1; i < pieces.length; i++) { - const piece = pieces[i]; - // An empty directory, could be a trailing slash, or just a double "//" in the path. - if (!piece) { - addTrailingSlash = true; - continue; - } - // If we encounter a real directory, then we don't need to append anymore. - addTrailingSlash = false; - // A current directory, which we can always drop. - if (piece === '.') - continue; - // A parent directory, we need to see if there are any real directories we can pop. Else, we - // have an excess of parents, and we'll need to keep the "..". - if (piece === '..') { - if (positive) { - addTrailingSlash = true; - positive--; - pointer--; - } - else if (rel) { - // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute - // URL, protocol relative URL, or an absolute path, we don't need to keep excess. - pieces[pointer++] = piece; - } - continue; - } - // We've encountered a real directory. Move it to the next insertion pointer, which accounts for - // any popped or dropped directories. - pieces[pointer++] = piece; - positive++; - } - let path = ''; - for (let i = 1; i < pointer; i++) { - path += '/' + pieces[i]; - } - if (!path || (addTrailingSlash && !path.endsWith('/..'))) { - path += '/'; - } - url.path = path; - } - /** - * Attempts to resolve `input` URL/path relative to `base`. - */ - function resolve(input, base) { - if (!input && !base) - return ''; - const url = parseUrl(input); - let inputType = url.type; - if (base && inputType !== 7 /* Absolute */) { - const baseUrl = parseUrl(base); - const baseType = baseUrl.type; - switch (inputType) { - case 1 /* Empty */: - url.hash = baseUrl.hash; - // fall through - case 2 /* Hash */: - url.query = baseUrl.query; - // fall through - case 3 /* Query */: - case 4 /* RelativePath */: - mergePaths(url, baseUrl); - // fall through - case 5 /* AbsolutePath */: - // The host, user, and port are joined, you can't copy one without the others. - url.user = baseUrl.user; - url.host = baseUrl.host; - url.port = baseUrl.port; - // fall through - case 6 /* SchemeRelative */: - // The input doesn't have a schema at least, so we need to copy at least that over. - url.scheme = baseUrl.scheme; - } - if (baseType > inputType) - inputType = baseType; - } - normalizePath(url, inputType); - const queryHash = url.query + url.hash; - switch (inputType) { - // This is impossible, because of the empty checks at the start of the function. - // case UrlType.Empty: - case 2 /* Hash */: - case 3 /* Query */: - return queryHash; - case 4 /* RelativePath */: { - // The first char is always a "/", and we need it to be relative. - const path = url.path.slice(1); - if (!path) - return queryHash || '.'; - if (isRelative(base || input) && !isRelative(path)) { - // If base started with a leading ".", or there is no base and input started with a ".", - // then we need to ensure that the relative path starts with a ".". We don't know if - // relative starts with a "..", though, so check before prepending. - return './' + path + queryHash; - } - return path + queryHash; - } - case 5 /* AbsolutePath */: - return url.path + queryHash; - default: - return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash; - } - } - - return resolve; - -})); -//# sourceMappingURL=resolve-uri.umd.js.map diff --git a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map b/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map deleted file mode 100644 index 70a37f2..0000000 --- a/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolve-uri.umd.js","sources":["../src/resolve-uri.ts"],"sourcesContent":["// Matches the scheme of a URL, eg \"http://\"\nconst schemeRegex = /^[\\w+.-]+:\\/\\//;\n\n/**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\nconst urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n\n/**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\nconst fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\n\ntype Url = {\n scheme: string;\n user: string;\n host: string;\n port: string;\n path: string;\n query: string;\n hash: string;\n type: UrlType;\n};\n\nconst enum UrlType {\n Empty = 1,\n Hash = 2,\n Query = 3,\n RelativePath = 4,\n AbsolutePath = 5,\n SchemeRelative = 6,\n Absolute = 7,\n}\n\nfunction isAbsoluteUrl(input: string): boolean {\n return schemeRegex.test(input);\n}\n\nfunction isSchemeRelativeUrl(input: string): boolean {\n return input.startsWith('//');\n}\n\nfunction isAbsolutePath(input: string): boolean {\n return input.startsWith('/');\n}\n\nfunction isFileUrl(input: string): boolean {\n return input.startsWith('file:');\n}\n\nfunction isRelative(input: string): boolean {\n return /^[.?#]/.test(input);\n}\n\nfunction parseAbsoluteUrl(input: string): Url {\n const match = urlRegex.exec(input)!;\n return makeUrl(\n match[1],\n match[2] || '',\n match[3],\n match[4] || '',\n match[5] || '/',\n match[6] || '',\n match[7] || '',\n );\n}\n\nfunction parseFileUrl(input: string): Url {\n const match = fileRegex.exec(input)!;\n const path = match[2];\n return makeUrl(\n 'file:',\n '',\n match[1] || '',\n '',\n isAbsolutePath(path) ? path : '/' + path,\n match[3] || '',\n match[4] || '',\n );\n}\n\nfunction makeUrl(\n scheme: string,\n user: string,\n host: string,\n port: string,\n path: string,\n query: string,\n hash: string,\n): Url {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: UrlType.Absolute,\n };\n}\n\nfunction parseUrl(input: string): Url {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = UrlType.SchemeRelative;\n return url;\n }\n\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = UrlType.AbsolutePath;\n return url;\n }\n\n if (isFileUrl(input)) return parseFileUrl(input);\n\n if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);\n\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? UrlType.Query\n : input.startsWith('#')\n ? UrlType.Hash\n : UrlType.RelativePath\n : UrlType.Empty;\n return url;\n}\n\nfunction stripPathFilename(path: string): string {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..')) return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n}\n\nfunction mergePaths(url: Url, base: Url) {\n normalizePath(base, base.type);\n\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n } else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n}\n\n/**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\nfunction normalizePath(url: Url, type: UrlType) {\n const rel = type <= UrlType.RelativePath;\n const pieces = url.path.split('/');\n\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n\n // A current directory, which we can always drop.\n if (piece === '.') continue;\n\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n } else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n}\n\n/**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\nexport default function resolve(input: string, base: string | undefined): string {\n if (!input && !base) return '';\n\n const url = parseUrl(input);\n let inputType = url.type;\n\n if (base && inputType !== UrlType.Absolute) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n\n switch (inputType) {\n case UrlType.Empty:\n url.hash = baseUrl.hash;\n // fall through\n\n case UrlType.Hash:\n url.query = baseUrl.query;\n // fall through\n\n case UrlType.Query:\n case UrlType.RelativePath:\n mergePaths(url, baseUrl);\n // fall through\n\n case UrlType.AbsolutePath:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n\n case UrlType.SchemeRelative:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType) inputType = baseType;\n }\n\n normalizePath(url, inputType);\n\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n\n case UrlType.Hash:\n case UrlType.Query:\n return queryHash;\n\n case UrlType.RelativePath: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n\n if (!path) return queryHash || '.';\n\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n\n return path + queryHash;\n }\n\n case UrlType.AbsolutePath:\n return url.path + queryHash;\n\n default:\n return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;\n }\n}\n"],"names":[],"mappings":";;;;;;IAAA;IACA,MAAM,WAAW,GAAG,gBAAgB,CAAC;IAErC;;;;;;;;;;IAUA,MAAM,QAAQ,GAAG,0EAA0E,CAAC;IAE5F;;;;;;;;;IASA,MAAM,SAAS,GAAG,iEAAiE,CAAC;IAuBpF,SAAS,aAAa,CAAC,KAAa;QAClC,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAED,SAAS,mBAAmB,CAAC,KAAa;QACxC,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,SAAS,cAAc,CAAC,KAAa;QACnC,OAAO,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED,SAAS,SAAS,CAAC,KAAa;QAC9B,OAAO,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IAED,SAAS,UAAU,CAAC,KAAa;QAC/B,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED,SAAS,gBAAgB,CAAC,KAAa;QACrC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAE,CAAC;QACpC,OAAO,OAAO,CACZ,KAAK,CAAC,CAAC,CAAC,EACR,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,EACR,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,EACf,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CACf,CAAC;IACJ,CAAC;IAED,SAAS,YAAY,CAAC,KAAa;QACjC,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,KAAK,CAAE,CAAC;QACrC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,OAAO,OAAO,CACZ,OAAO,EACP,EAAE,EACF,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,EAAE,EACF,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,EACxC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,EACd,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CACf,CAAC;IACJ,CAAC;IAED,SAAS,OAAO,CACd,MAAc,EACd,IAAY,EACZ,IAAY,EACZ,IAAY,EACZ,IAAY,EACZ,KAAa,EACb,IAAY;QAEZ,OAAO;YACL,MAAM;YACN,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,IAAI;YACJ,KAAK;YACL,IAAI;YACJ,IAAI;SACL,CAAC;IACJ,CAAC;IAED,SAAS,QAAQ,CAAC,KAAa;QAC7B,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE;YAC9B,MAAM,GAAG,GAAG,gBAAgB,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC;YAC9C,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC;YAChB,GAAG,CAAC,IAAI,0BAA0B;YAClC,OAAO,GAAG,CAAC;SACZ;QAED,IAAI,cAAc,CAAC,KAAK,CAAC,EAAE;YACzB,MAAM,GAAG,GAAG,gBAAgB,CAAC,gBAAgB,GAAG,KAAK,CAAC,CAAC;YACvD,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC;YAChB,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC;YACd,GAAG,CAAC,IAAI,wBAAwB;YAChC,OAAO,GAAG,CAAC;SACZ;QAED,IAAI,SAAS,CAAC,KAAK,CAAC;YAAE,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;QAEjD,IAAI,aAAa,CAAC,KAAK,CAAC;YAAE,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAEzD,MAAM,GAAG,GAAG,gBAAgB,CAAC,iBAAiB,GAAG,KAAK,CAAC,CAAC;QACxD,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC;QAChB,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC;QACd,GAAG,CAAC,IAAI,GAAG,KAAK;cACZ,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC;;kBAEnB,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC;;;4BAGT;QAClB,OAAO,GAAG,CAAC;IACb,CAAC;IAED,SAAS,iBAAiB,CAAC,IAAY;;;QAGrC,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QACtC,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACpC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;IAClC,CAAC;IAED,SAAS,UAAU,CAAC,GAAQ,EAAE,IAAS;QACrC,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;;;QAI/B,IAAI,GAAG,CAAC,IAAI,KAAK,GAAG,EAAE;YACpB,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;SACtB;aAAM;;YAEL,GAAG,CAAC,IAAI,GAAG,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC;SACpD;IACH,CAAC;IAED;;;;IAIA,SAAS,aAAa,CAAC,GAAQ,EAAE,IAAa;QAC5C,MAAM,GAAG,GAAG,IAAI,yBAAyB;QACzC,MAAM,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;;;QAInC,IAAI,OAAO,GAAG,CAAC,CAAC;;;QAIhB,IAAI,QAAQ,GAAG,CAAC,CAAC;;;;QAKjB,IAAI,gBAAgB,GAAG,KAAK,CAAC;QAE7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACtC,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;;YAGxB,IAAI,CAAC,KAAK,EAAE;gBACV,gBAAgB,GAAG,IAAI,CAAC;gBACxB,SAAS;aACV;;YAGD,gBAAgB,GAAG,KAAK,CAAC;;YAGzB,IAAI,KAAK,KAAK,GAAG;gBAAE,SAAS;;;YAI5B,IAAI,KAAK,KAAK,IAAI,EAAE;gBAClB,IAAI,QAAQ,EAAE;oBACZ,gBAAgB,GAAG,IAAI,CAAC;oBACxB,QAAQ,EAAE,CAAC;oBACX,OAAO,EAAE,CAAC;iBACX;qBAAM,IAAI,GAAG,EAAE;;;oBAGd,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC;iBAC3B;gBACD,SAAS;aACV;;;YAID,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC;YAC1B,QAAQ,EAAE,CAAC;SACZ;QAED,IAAI,IAAI,GAAG,EAAE,CAAC;QACd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,EAAE,EAAE;YAChC,IAAI,IAAI,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;SACzB;QACD,IAAI,CAAC,IAAI,KAAK,gBAAgB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE;YACxD,IAAI,IAAI,GAAG,CAAC;SACb;QACD,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC;IAClB,CAAC;IAED;;;aAGwB,OAAO,CAAC,KAAa,EAAE,IAAwB;QACrE,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI;YAAE,OAAO,EAAE,CAAC;QAE/B,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC5B,IAAI,SAAS,GAAG,GAAG,CAAC,IAAI,CAAC;QAEzB,IAAI,IAAI,IAAI,SAAS,uBAAuB;YAC1C,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC/B,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;YAE9B,QAAQ,SAAS;gBACf;oBACE,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;;gBAG1B;oBACE,GAAG,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;;gBAG5B,mBAAmB;gBACnB;oBACE,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;;gBAG3B;;oBAEE,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;oBACxB,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;oBACxB,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;;gBAG1B;;oBAEE,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;aAC/B;YACD,IAAI,QAAQ,GAAG,SAAS;gBAAE,SAAS,GAAG,QAAQ,CAAC;SAChD;QAED,aAAa,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QAE9B,MAAM,SAAS,GAAG,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC;QACvC,QAAQ,SAAS;;;YAIf,kBAAkB;YAClB;gBACE,OAAO,SAAS,CAAC;YAEnB,2BAA2B;;gBAEzB,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;gBAE/B,IAAI,CAAC,IAAI;oBAAE,OAAO,SAAS,IAAI,GAAG,CAAC;gBAEnC,IAAI,UAAU,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;;;;oBAIlD,OAAO,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;iBAChC;gBAED,OAAO,IAAI,GAAG,SAAS,CAAC;aACzB;YAED;gBACE,OAAO,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;YAE9B;gBACE,OAAO,GAAG,CAAC,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;SACpF;IACH;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts b/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts deleted file mode 100644 index b7f0b3b..0000000 --- a/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Attempts to resolve `input` URL/path relative to `base`. - */ -export default function resolve(input: string, base: string | undefined): string; diff --git a/node_modules/@jridgewell/resolve-uri/package.json b/node_modules/@jridgewell/resolve-uri/package.json deleted file mode 100644 index 02a4c51..0000000 --- a/node_modules/@jridgewell/resolve-uri/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "@jridgewell/resolve-uri", - "version": "3.1.2", - "description": "Resolve a URI relative to an optional base URI", - "keywords": [ - "resolve", - "uri", - "url", - "path" - ], - "author": "Justin Ridgewell ", - "license": "MIT", - "repository": "https://github.com/jridgewell/resolve-uri", - "main": "dist/resolve-uri.umd.js", - "module": "dist/resolve-uri.mjs", - "types": "dist/types/resolve-uri.d.ts", - "exports": { - ".": [ - { - "types": "./dist/types/resolve-uri.d.ts", - "browser": "./dist/resolve-uri.umd.js", - "require": "./dist/resolve-uri.umd.js", - "import": "./dist/resolve-uri.mjs" - }, - "./dist/resolve-uri.umd.js" - ], - "./package.json": "./package.json" - }, - "files": [ - "dist" - ], - "engines": { - "node": ">=6.0.0" - }, - "scripts": { - "prebuild": "rm -rf dist", - "build": "run-s -n build:*", - "build:rollup": "rollup -c rollup.config.js", - "build:ts": "tsc --project tsconfig.build.json", - "lint": "run-s -n lint:*", - "lint:prettier": "npm run test:lint:prettier -- --write", - "lint:ts": "npm run test:lint:ts -- --fix", - "pretest": "run-s build:rollup", - "test": "run-s -n test:lint test:only", - "test:debug": "mocha --inspect-brk", - "test:lint": "run-s -n test:lint:*", - "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", - "test:lint:ts": "eslint '{src,test}/**/*.ts'", - "test:only": "mocha", - "test:coverage": "c8 mocha", - "test:watch": "mocha --watch", - "prepublishOnly": "npm run preversion", - "preversion": "run-s test build" - }, - "devDependencies": { - "@jridgewell/resolve-uri-latest": "npm:@jridgewell/resolve-uri@*", - "@rollup/plugin-typescript": "8.3.0", - "@typescript-eslint/eslint-plugin": "5.10.0", - "@typescript-eslint/parser": "5.10.0", - "c8": "7.11.0", - "eslint": "8.7.0", - "eslint-config-prettier": "8.3.0", - "mocha": "9.2.0", - "npm-run-all": "4.1.5", - "prettier": "2.5.1", - "rollup": "2.66.0", - "typescript": "4.5.5" - } -} diff --git a/node_modules/@jridgewell/sourcemap-codec/LICENSE b/node_modules/@jridgewell/sourcemap-codec/LICENSE deleted file mode 100644 index 1f6ce94..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2024 Justin Ridgewell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@jridgewell/sourcemap-codec/README.md b/node_modules/@jridgewell/sourcemap-codec/README.md deleted file mode 100644 index b3e0708..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/README.md +++ /dev/null @@ -1,264 +0,0 @@ -# @jridgewell/sourcemap-codec - -Encode/decode the `mappings` property of a [sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit). - - -## Why? - -Sourcemaps are difficult to generate and manipulate, because the `mappings` property – the part that actually links the generated code back to the original source – is encoded using an obscure method called [Variable-length quantity](https://en.wikipedia.org/wiki/Variable-length_quantity). On top of that, each segment in the mapping contains offsets rather than absolute indices, which means that you can't look at a segment in isolation – you have to understand the whole sourcemap. - -This package makes the process slightly easier. - - -## Installation - -```bash -npm install @jridgewell/sourcemap-codec -``` - - -## Usage - -```js -import { encode, decode } from '@jridgewell/sourcemap-codec'; - -var decoded = decode( ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' ); - -assert.deepEqual( decoded, [ - // the first line (of the generated code) has no mappings, - // as shown by the starting semi-colon (which separates lines) - [], - - // the second line contains four (comma-separated) segments - [ - // segments are encoded as you'd expect: - // [ generatedCodeColumn, sourceIndex, sourceCodeLine, sourceCodeColumn, nameIndex ] - - // i.e. the first segment begins at column 2, and maps back to the second column - // of the second line (both zero-based) of the 0th source, and uses the 0th - // name in the `map.names` array - [ 2, 0, 2, 2, 0 ], - - // the remaining segments are 4-length rather than 5-length, - // because they don't map a name - [ 4, 0, 2, 4 ], - [ 6, 0, 2, 5 ], - [ 7, 0, 2, 7 ] - ], - - // the final line contains two segments - [ - [ 2, 1, 10, 19 ], - [ 12, 1, 11, 20 ] - ] -]); - -var encoded = encode( decoded ); -assert.equal( encoded, ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' ); -``` - -## Benchmarks - -``` -node v20.10.0 - -amp.js.map - 45120 segments - -Decode Memory Usage: -local code 5815135 bytes -@jridgewell/sourcemap-codec 1.4.15 5868160 bytes -sourcemap-codec 5492584 bytes -source-map-0.6.1 13569984 bytes -source-map-0.8.0 6390584 bytes -chrome dev tools 8011136 bytes -Smallest memory usage is sourcemap-codec - -Decode speed: -decode: local code x 492 ops/sec ±1.22% (90 runs sampled) -decode: @jridgewell/sourcemap-codec 1.4.15 x 499 ops/sec ±1.16% (89 runs sampled) -decode: sourcemap-codec x 376 ops/sec ±1.66% (89 runs sampled) -decode: source-map-0.6.1 x 34.99 ops/sec ±0.94% (48 runs sampled) -decode: source-map-0.8.0 x 351 ops/sec ±0.07% (95 runs sampled) -chrome dev tools x 165 ops/sec ±0.91% (86 runs sampled) -Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 - -Encode Memory Usage: -local code 444248 bytes -@jridgewell/sourcemap-codec 1.4.15 623024 bytes -sourcemap-codec 8696280 bytes -source-map-0.6.1 8745176 bytes -source-map-0.8.0 8736624 bytes -Smallest memory usage is local code - -Encode speed: -encode: local code x 796 ops/sec ±0.11% (97 runs sampled) -encode: @jridgewell/sourcemap-codec 1.4.15 x 795 ops/sec ±0.25% (98 runs sampled) -encode: sourcemap-codec x 231 ops/sec ±0.83% (86 runs sampled) -encode: source-map-0.6.1 x 166 ops/sec ±0.57% (86 runs sampled) -encode: source-map-0.8.0 x 203 ops/sec ±0.45% (88 runs sampled) -Fastest is encode: local code,encode: @jridgewell/sourcemap-codec 1.4.15 - - -*** - - -babel.min.js.map - 347793 segments - -Decode Memory Usage: -local code 35424960 bytes -@jridgewell/sourcemap-codec 1.4.15 35424696 bytes -sourcemap-codec 36033464 bytes -source-map-0.6.1 62253704 bytes -source-map-0.8.0 43843920 bytes -chrome dev tools 45111400 bytes -Smallest memory usage is @jridgewell/sourcemap-codec 1.4.15 - -Decode speed: -decode: local code x 38.18 ops/sec ±5.44% (52 runs sampled) -decode: @jridgewell/sourcemap-codec 1.4.15 x 38.36 ops/sec ±5.02% (52 runs sampled) -decode: sourcemap-codec x 34.05 ops/sec ±4.45% (47 runs sampled) -decode: source-map-0.6.1 x 4.31 ops/sec ±2.76% (15 runs sampled) -decode: source-map-0.8.0 x 55.60 ops/sec ±0.13% (73 runs sampled) -chrome dev tools x 16.94 ops/sec ±3.78% (46 runs sampled) -Fastest is decode: source-map-0.8.0 - -Encode Memory Usage: -local code 2606016 bytes -@jridgewell/sourcemap-codec 1.4.15 2626440 bytes -sourcemap-codec 21152576 bytes -source-map-0.6.1 25023928 bytes -source-map-0.8.0 25256448 bytes -Smallest memory usage is local code - -Encode speed: -encode: local code x 127 ops/sec ±0.18% (83 runs sampled) -encode: @jridgewell/sourcemap-codec 1.4.15 x 128 ops/sec ±0.26% (83 runs sampled) -encode: sourcemap-codec x 29.31 ops/sec ±2.55% (53 runs sampled) -encode: source-map-0.6.1 x 18.85 ops/sec ±3.19% (36 runs sampled) -encode: source-map-0.8.0 x 19.34 ops/sec ±1.97% (36 runs sampled) -Fastest is encode: @jridgewell/sourcemap-codec 1.4.15 - - -*** - - -preact.js.map - 1992 segments - -Decode Memory Usage: -local code 261696 bytes -@jridgewell/sourcemap-codec 1.4.15 244296 bytes -sourcemap-codec 302816 bytes -source-map-0.6.1 939176 bytes -source-map-0.8.0 336 bytes -chrome dev tools 587368 bytes -Smallest memory usage is source-map-0.8.0 - -Decode speed: -decode: local code x 17,782 ops/sec ±0.32% (97 runs sampled) -decode: @jridgewell/sourcemap-codec 1.4.15 x 17,863 ops/sec ±0.40% (100 runs sampled) -decode: sourcemap-codec x 12,453 ops/sec ±0.27% (101 runs sampled) -decode: source-map-0.6.1 x 1,288 ops/sec ±1.05% (96 runs sampled) -decode: source-map-0.8.0 x 9,289 ops/sec ±0.27% (101 runs sampled) -chrome dev tools x 4,769 ops/sec ±0.18% (100 runs sampled) -Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 - -Encode Memory Usage: -local code 262944 bytes -@jridgewell/sourcemap-codec 1.4.15 25544 bytes -sourcemap-codec 323048 bytes -source-map-0.6.1 507808 bytes -source-map-0.8.0 507480 bytes -Smallest memory usage is @jridgewell/sourcemap-codec 1.4.15 - -Encode speed: -encode: local code x 24,207 ops/sec ±0.79% (95 runs sampled) -encode: @jridgewell/sourcemap-codec 1.4.15 x 24,288 ops/sec ±0.48% (96 runs sampled) -encode: sourcemap-codec x 6,761 ops/sec ±0.21% (100 runs sampled) -encode: source-map-0.6.1 x 5,374 ops/sec ±0.17% (99 runs sampled) -encode: source-map-0.8.0 x 5,633 ops/sec ±0.32% (99 runs sampled) -Fastest is encode: @jridgewell/sourcemap-codec 1.4.15,encode: local code - - -*** - - -react.js.map - 5726 segments - -Decode Memory Usage: -local code 678816 bytes -@jridgewell/sourcemap-codec 1.4.15 678816 bytes -sourcemap-codec 816400 bytes -source-map-0.6.1 2288864 bytes -source-map-0.8.0 721360 bytes -chrome dev tools 1012512 bytes -Smallest memory usage is local code - -Decode speed: -decode: local code x 6,178 ops/sec ±0.19% (98 runs sampled) -decode: @jridgewell/sourcemap-codec 1.4.15 x 6,261 ops/sec ±0.22% (100 runs sampled) -decode: sourcemap-codec x 4,472 ops/sec ±0.90% (99 runs sampled) -decode: source-map-0.6.1 x 449 ops/sec ±0.31% (95 runs sampled) -decode: source-map-0.8.0 x 3,219 ops/sec ±0.13% (100 runs sampled) -chrome dev tools x 1,743 ops/sec ±0.20% (99 runs sampled) -Fastest is decode: @jridgewell/sourcemap-codec 1.4.15 - -Encode Memory Usage: -local code 140960 bytes -@jridgewell/sourcemap-codec 1.4.15 159808 bytes -sourcemap-codec 969304 bytes -source-map-0.6.1 930520 bytes -source-map-0.8.0 930248 bytes -Smallest memory usage is local code - -Encode speed: -encode: local code x 8,013 ops/sec ±0.19% (100 runs sampled) -encode: @jridgewell/sourcemap-codec 1.4.15 x 7,989 ops/sec ±0.20% (101 runs sampled) -encode: sourcemap-codec x 2,472 ops/sec ±0.21% (99 runs sampled) -encode: source-map-0.6.1 x 2,200 ops/sec ±0.17% (99 runs sampled) -encode: source-map-0.8.0 x 2,220 ops/sec ±0.37% (99 runs sampled) -Fastest is encode: local code - - -*** - - -vscode.map - 2141001 segments - -Decode Memory Usage: -local code 198955264 bytes -@jridgewell/sourcemap-codec 1.4.15 199175352 bytes -sourcemap-codec 199102688 bytes -source-map-0.6.1 386323432 bytes -source-map-0.8.0 244116432 bytes -chrome dev tools 293734280 bytes -Smallest memory usage is local code - -Decode speed: -decode: local code x 3.90 ops/sec ±22.21% (15 runs sampled) -decode: @jridgewell/sourcemap-codec 1.4.15 x 3.95 ops/sec ±23.53% (15 runs sampled) -decode: sourcemap-codec x 3.82 ops/sec ±17.94% (14 runs sampled) -decode: source-map-0.6.1 x 0.61 ops/sec ±7.81% (6 runs sampled) -decode: source-map-0.8.0 x 9.54 ops/sec ±0.28% (28 runs sampled) -chrome dev tools x 2.18 ops/sec ±10.58% (10 runs sampled) -Fastest is decode: source-map-0.8.0 - -Encode Memory Usage: -local code 13509880 bytes -@jridgewell/sourcemap-codec 1.4.15 13537648 bytes -sourcemap-codec 32540104 bytes -source-map-0.6.1 127531040 bytes -source-map-0.8.0 127535312 bytes -Smallest memory usage is local code - -Encode speed: -encode: local code x 20.10 ops/sec ±0.19% (38 runs sampled) -encode: @jridgewell/sourcemap-codec 1.4.15 x 20.26 ops/sec ±0.32% (38 runs sampled) -encode: sourcemap-codec x 5.44 ops/sec ±1.64% (18 runs sampled) -encode: source-map-0.6.1 x 2.30 ops/sec ±4.79% (10 runs sampled) -encode: source-map-0.8.0 x 2.46 ops/sec ±6.53% (10 runs sampled) -Fastest is encode: @jridgewell/sourcemap-codec 1.4.15 -``` - -# License - -MIT diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs deleted file mode 100644 index 532bab3..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +++ /dev/null @@ -1,423 +0,0 @@ -// src/vlq.ts -var comma = ",".charCodeAt(0); -var semicolon = ";".charCodeAt(0); -var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -var intToChar = new Uint8Array(64); -var charToInt = new Uint8Array(128); -for (let i = 0; i < chars.length; i++) { - const c = chars.charCodeAt(i); - intToChar[i] = c; - charToInt[c] = i; -} -function decodeInteger(reader, relative) { - let value = 0; - let shift = 0; - let integer = 0; - do { - const c = reader.next(); - integer = charToInt[c]; - value |= (integer & 31) << shift; - shift += 5; - } while (integer & 32); - const shouldNegate = value & 1; - value >>>= 1; - if (shouldNegate) { - value = -2147483648 | -value; - } - return relative + value; -} -function encodeInteger(builder, num, relative) { - let delta = num - relative; - delta = delta < 0 ? -delta << 1 | 1 : delta << 1; - do { - let clamped = delta & 31; - delta >>>= 5; - if (delta > 0) clamped |= 32; - builder.write(intToChar[clamped]); - } while (delta > 0); - return num; -} -function hasMoreVlq(reader, max) { - if (reader.pos >= max) return false; - return reader.peek() !== comma; -} - -// src/strings.ts -var bufLength = 1024 * 16; -var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? { - decode(buf) { - const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); - return out.toString(); - } -} : { - decode(buf) { - let out = ""; - for (let i = 0; i < buf.length; i++) { - out += String.fromCharCode(buf[i]); - } - return out; - } -}; -var StringWriter = class { - constructor() { - this.pos = 0; - this.out = ""; - this.buffer = new Uint8Array(bufLength); - } - write(v) { - const { buffer } = this; - buffer[this.pos++] = v; - if (this.pos === bufLength) { - this.out += td.decode(buffer); - this.pos = 0; - } - } - flush() { - const { buffer, out, pos } = this; - return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; - } -}; -var StringReader = class { - constructor(buffer) { - this.pos = 0; - this.buffer = buffer; - } - next() { - return this.buffer.charCodeAt(this.pos++); - } - peek() { - return this.buffer.charCodeAt(this.pos); - } - indexOf(char) { - const { buffer, pos } = this; - const idx = buffer.indexOf(char, pos); - return idx === -1 ? buffer.length : idx; - } -}; - -// src/scopes.ts -var EMPTY = []; -function decodeOriginalScopes(input) { - const { length } = input; - const reader = new StringReader(input); - const scopes = []; - const stack = []; - let line = 0; - for (; reader.pos < length; reader.pos++) { - line = decodeInteger(reader, line); - const column = decodeInteger(reader, 0); - if (!hasMoreVlq(reader, length)) { - const last = stack.pop(); - last[2] = line; - last[3] = column; - continue; - } - const kind = decodeInteger(reader, 0); - const fields = decodeInteger(reader, 0); - const hasName = fields & 1; - const scope = hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]; - let vars = EMPTY; - if (hasMoreVlq(reader, length)) { - vars = []; - do { - const varsIndex = decodeInteger(reader, 0); - vars.push(varsIndex); - } while (hasMoreVlq(reader, length)); - } - scope.vars = vars; - scopes.push(scope); - stack.push(scope); - } - return scopes; -} -function encodeOriginalScopes(scopes) { - const writer = new StringWriter(); - for (let i = 0; i < scopes.length; ) { - i = _encodeOriginalScopes(scopes, i, writer, [0]); - } - return writer.flush(); -} -function _encodeOriginalScopes(scopes, index, writer, state) { - const scope = scopes[index]; - const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope; - if (index > 0) writer.write(comma); - state[0] = encodeInteger(writer, startLine, state[0]); - encodeInteger(writer, startColumn, 0); - encodeInteger(writer, kind, 0); - const fields = scope.length === 6 ? 1 : 0; - encodeInteger(writer, fields, 0); - if (scope.length === 6) encodeInteger(writer, scope[5], 0); - for (const v of vars) { - encodeInteger(writer, v, 0); - } - for (index++; index < scopes.length; ) { - const next = scopes[index]; - const { 0: l, 1: c } = next; - if (l > endLine || l === endLine && c >= endColumn) { - break; - } - index = _encodeOriginalScopes(scopes, index, writer, state); - } - writer.write(comma); - state[0] = encodeInteger(writer, endLine, state[0]); - encodeInteger(writer, endColumn, 0); - return index; -} -function decodeGeneratedRanges(input) { - const { length } = input; - const reader = new StringReader(input); - const ranges = []; - const stack = []; - let genLine = 0; - let definitionSourcesIndex = 0; - let definitionScopeIndex = 0; - let callsiteSourcesIndex = 0; - let callsiteLine = 0; - let callsiteColumn = 0; - let bindingLine = 0; - let bindingColumn = 0; - do { - const semi = reader.indexOf(";"); - let genColumn = 0; - for (; reader.pos < semi; reader.pos++) { - genColumn = decodeInteger(reader, genColumn); - if (!hasMoreVlq(reader, semi)) { - const last = stack.pop(); - last[2] = genLine; - last[3] = genColumn; - continue; - } - const fields = decodeInteger(reader, 0); - const hasDefinition = fields & 1; - const hasCallsite = fields & 2; - const hasScope = fields & 4; - let callsite = null; - let bindings = EMPTY; - let range; - if (hasDefinition) { - const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex); - definitionScopeIndex = decodeInteger( - reader, - definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0 - ); - definitionSourcesIndex = defSourcesIndex; - range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex]; - } else { - range = [genLine, genColumn, 0, 0]; - } - range.isScope = !!hasScope; - if (hasCallsite) { - const prevCsi = callsiteSourcesIndex; - const prevLine = callsiteLine; - callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex); - const sameSource = prevCsi === callsiteSourcesIndex; - callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0); - callsiteColumn = decodeInteger( - reader, - sameSource && prevLine === callsiteLine ? callsiteColumn : 0 - ); - callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn]; - } - range.callsite = callsite; - if (hasMoreVlq(reader, semi)) { - bindings = []; - do { - bindingLine = genLine; - bindingColumn = genColumn; - const expressionsCount = decodeInteger(reader, 0); - let expressionRanges; - if (expressionsCount < -1) { - expressionRanges = [[decodeInteger(reader, 0)]]; - for (let i = -1; i > expressionsCount; i--) { - const prevBl = bindingLine; - bindingLine = decodeInteger(reader, bindingLine); - bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0); - const expression = decodeInteger(reader, 0); - expressionRanges.push([expression, bindingLine, bindingColumn]); - } - } else { - expressionRanges = [[expressionsCount]]; - } - bindings.push(expressionRanges); - } while (hasMoreVlq(reader, semi)); - } - range.bindings = bindings; - ranges.push(range); - stack.push(range); - } - genLine++; - reader.pos = semi + 1; - } while (reader.pos < length); - return ranges; -} -function encodeGeneratedRanges(ranges) { - if (ranges.length === 0) return ""; - const writer = new StringWriter(); - for (let i = 0; i < ranges.length; ) { - i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]); - } - return writer.flush(); -} -function _encodeGeneratedRanges(ranges, index, writer, state) { - const range = ranges[index]; - const { - 0: startLine, - 1: startColumn, - 2: endLine, - 3: endColumn, - isScope, - callsite, - bindings - } = range; - if (state[0] < startLine) { - catchupLine(writer, state[0], startLine); - state[0] = startLine; - state[1] = 0; - } else if (index > 0) { - writer.write(comma); - } - state[1] = encodeInteger(writer, range[1], state[1]); - const fields = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0); - encodeInteger(writer, fields, 0); - if (range.length === 6) { - const { 4: sourcesIndex, 5: scopesIndex } = range; - if (sourcesIndex !== state[2]) { - state[3] = 0; - } - state[2] = encodeInteger(writer, sourcesIndex, state[2]); - state[3] = encodeInteger(writer, scopesIndex, state[3]); - } - if (callsite) { - const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite; - if (sourcesIndex !== state[4]) { - state[5] = 0; - state[6] = 0; - } else if (callLine !== state[5]) { - state[6] = 0; - } - state[4] = encodeInteger(writer, sourcesIndex, state[4]); - state[5] = encodeInteger(writer, callLine, state[5]); - state[6] = encodeInteger(writer, callColumn, state[6]); - } - if (bindings) { - for (const binding of bindings) { - if (binding.length > 1) encodeInteger(writer, -binding.length, 0); - const expression = binding[0][0]; - encodeInteger(writer, expression, 0); - let bindingStartLine = startLine; - let bindingStartColumn = startColumn; - for (let i = 1; i < binding.length; i++) { - const expRange = binding[i]; - bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine); - bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn); - encodeInteger(writer, expRange[0], 0); - } - } - } - for (index++; index < ranges.length; ) { - const next = ranges[index]; - const { 0: l, 1: c } = next; - if (l > endLine || l === endLine && c >= endColumn) { - break; - } - index = _encodeGeneratedRanges(ranges, index, writer, state); - } - if (state[0] < endLine) { - catchupLine(writer, state[0], endLine); - state[0] = endLine; - state[1] = 0; - } else { - writer.write(comma); - } - state[1] = encodeInteger(writer, endColumn, state[1]); - return index; -} -function catchupLine(writer, lastLine, line) { - do { - writer.write(semicolon); - } while (++lastLine < line); -} - -// src/sourcemap-codec.ts -function decode(mappings) { - const { length } = mappings; - const reader = new StringReader(mappings); - const decoded = []; - let genColumn = 0; - let sourcesIndex = 0; - let sourceLine = 0; - let sourceColumn = 0; - let namesIndex = 0; - do { - const semi = reader.indexOf(";"); - const line = []; - let sorted = true; - let lastCol = 0; - genColumn = 0; - while (reader.pos < semi) { - let seg; - genColumn = decodeInteger(reader, genColumn); - if (genColumn < lastCol) sorted = false; - lastCol = genColumn; - if (hasMoreVlq(reader, semi)) { - sourcesIndex = decodeInteger(reader, sourcesIndex); - sourceLine = decodeInteger(reader, sourceLine); - sourceColumn = decodeInteger(reader, sourceColumn); - if (hasMoreVlq(reader, semi)) { - namesIndex = decodeInteger(reader, namesIndex); - seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]; - } else { - seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]; - } - } else { - seg = [genColumn]; - } - line.push(seg); - reader.pos++; - } - if (!sorted) sort(line); - decoded.push(line); - reader.pos = semi + 1; - } while (reader.pos <= length); - return decoded; -} -function sort(line) { - line.sort(sortComparator); -} -function sortComparator(a, b) { - return a[0] - b[0]; -} -function encode(decoded) { - const writer = new StringWriter(); - let sourcesIndex = 0; - let sourceLine = 0; - let sourceColumn = 0; - let namesIndex = 0; - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - if (i > 0) writer.write(semicolon); - if (line.length === 0) continue; - let genColumn = 0; - for (let j = 0; j < line.length; j++) { - const segment = line[j]; - if (j > 0) writer.write(comma); - genColumn = encodeInteger(writer, segment[0], genColumn); - if (segment.length === 1) continue; - sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); - sourceLine = encodeInteger(writer, segment[2], sourceLine); - sourceColumn = encodeInteger(writer, segment[3], sourceColumn); - if (segment.length === 4) continue; - namesIndex = encodeInteger(writer, segment[4], namesIndex); - } - } - return writer.flush(); -} -export { - decode, - decodeGeneratedRanges, - decodeOriginalScopes, - encode, - encodeGeneratedRanges, - encodeOriginalScopes -}; -//# sourceMappingURL=sourcemap-codec.mjs.map diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map deleted file mode 100644 index c276844..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": 3, - "sources": ["../src/vlq.ts", "../src/strings.ts", "../src/scopes.ts", "../src/sourcemap-codec.ts"], - "mappings": ";AAEO,IAAM,QAAQ,IAAI,WAAW,CAAC;AAC9B,IAAM,YAAY,IAAI,WAAW,CAAC;AAEzC,IAAM,QAAQ;AACd,IAAM,YAAY,IAAI,WAAW,EAAE;AACnC,IAAM,YAAY,IAAI,WAAW,GAAG;AAEpC,SAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACrC,QAAM,IAAI,MAAM,WAAW,CAAC;AAC5B,YAAU,CAAC,IAAI;AACf,YAAU,CAAC,IAAI;AACjB;AAEO,SAAS,cAAc,QAAsB,UAA0B;AAC5E,MAAI,QAAQ;AACZ,MAAI,QAAQ;AACZ,MAAI,UAAU;AAEd,KAAG;AACD,UAAM,IAAI,OAAO,KAAK;AACtB,cAAU,UAAU,CAAC;AACrB,cAAU,UAAU,OAAO;AAC3B,aAAS;AAAA,EACX,SAAS,UAAU;AAEnB,QAAM,eAAe,QAAQ;AAC7B,aAAW;AAEX,MAAI,cAAc;AAChB,YAAQ,cAAc,CAAC;AAAA,EACzB;AAEA,SAAO,WAAW;AACpB;AAEO,SAAS,cAAc,SAAuB,KAAa,UAA0B;AAC1F,MAAI,QAAQ,MAAM;AAElB,UAAQ,QAAQ,IAAK,CAAC,SAAS,IAAK,IAAI,SAAS;AACjD,KAAG;AACD,QAAI,UAAU,QAAQ;AACtB,eAAW;AACX,QAAI,QAAQ,EAAG,YAAW;AAC1B,YAAQ,MAAM,UAAU,OAAO,CAAC;AAAA,EAClC,SAAS,QAAQ;AAEjB,SAAO;AACT;AAEO,SAAS,WAAW,QAAsB,KAAa;AAC5D,MAAI,OAAO,OAAO,IAAK,QAAO;AAC9B,SAAO,OAAO,KAAK,MAAM;AAC3B;;;ACtDA,IAAM,YAAY,OAAO;AAGzB,IAAM,KACJ,OAAO,gBAAgB,cACH,oBAAI,YAAY,IAChC,OAAO,WAAW,cAChB;AAAA,EACE,OAAO,KAAyB;AAC9B,UAAM,MAAM,OAAO,KAAK,IAAI,QAAQ,IAAI,YAAY,IAAI,UAAU;AAClE,WAAO,IAAI,SAAS;AAAA,EACtB;AACF,IACA;AAAA,EACE,OAAO,KAAyB;AAC9B,QAAI,MAAM;AACV,aAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACnC,aAAO,OAAO,aAAa,IAAI,CAAC,CAAC;AAAA,IACnC;AACA,WAAO;AAAA,EACT;AACF;AAED,IAAM,eAAN,MAAmB;AAAA,EAAnB;AACL,eAAM;AACN,SAAQ,MAAM;AACd,SAAQ,SAAS,IAAI,WAAW,SAAS;AAAA;AAAA,EAEzC,MAAM,GAAiB;AACrB,UAAM,EAAE,OAAO,IAAI;AACnB,WAAO,KAAK,KAAK,IAAI;AACrB,QAAI,KAAK,QAAQ,WAAW;AAC1B,WAAK,OAAO,GAAG,OAAO,MAAM;AAC5B,WAAK,MAAM;AAAA,IACb;AAAA,EACF;AAAA,EAEA,QAAgB;AACd,UAAM,EAAE,QAAQ,KAAK,IAAI,IAAI;AAC7B,WAAO,MAAM,IAAI,MAAM,GAAG,OAAO,OAAO,SAAS,GAAG,GAAG,CAAC,IAAI;AAAA,EAC9D;AACF;AAEO,IAAM,eAAN,MAAmB;AAAA,EAIxB,YAAY,QAAgB;AAH5B,eAAM;AAIJ,SAAK,SAAS;AAAA,EAChB;AAAA,EAEA,OAAe;AACb,WAAO,KAAK,OAAO,WAAW,KAAK,KAAK;AAAA,EAC1C;AAAA,EAEA,OAAe;AACb,WAAO,KAAK,OAAO,WAAW,KAAK,GAAG;AAAA,EACxC;AAAA,EAEA,QAAQ,MAAsB;AAC5B,UAAM,EAAE,QAAQ,IAAI,IAAI;AACxB,UAAM,MAAM,OAAO,QAAQ,MAAM,GAAG;AACpC,WAAO,QAAQ,KAAK,OAAO,SAAS;AAAA,EACtC;AACF;;;AC7DA,IAAM,QAAe,CAAC;AA+Bf,SAAS,qBAAqB,OAAgC;AACnE,QAAM,EAAE,OAAO,IAAI;AACnB,QAAM,SAAS,IAAI,aAAa,KAAK;AACrC,QAAM,SAA0B,CAAC;AACjC,QAAM,QAAyB,CAAC;AAChC,MAAI,OAAO;AAEX,SAAO,OAAO,MAAM,QAAQ,OAAO,OAAO;AACxC,WAAO,cAAc,QAAQ,IAAI;AACjC,UAAM,SAAS,cAAc,QAAQ,CAAC;AAEtC,QAAI,CAAC,WAAW,QAAQ,MAAM,GAAG;AAC/B,YAAM,OAAO,MAAM,IAAI;AACvB,WAAK,CAAC,IAAI;AACV,WAAK,CAAC,IAAI;AACV;AAAA,IACF;AAEA,UAAM,OAAO,cAAc,QAAQ,CAAC;AACpC,UAAM,SAAS,cAAc,QAAQ,CAAC;AACtC,UAAM,UAAU,SAAS;AAEzB,UAAM,QACJ,UAAU,CAAC,MAAM,QAAQ,GAAG,GAAG,MAAM,cAAc,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,QAAQ,GAAG,GAAG,IAAI;AAG5F,QAAI,OAAc;AAClB,QAAI,WAAW,QAAQ,MAAM,GAAG;AAC9B,aAAO,CAAC;AACR,SAAG;AACD,cAAM,YAAY,cAAc,QAAQ,CAAC;AACzC,aAAK,KAAK,SAAS;AAAA,MACrB,SAAS,WAAW,QAAQ,MAAM;AAAA,IACpC;AACA,UAAM,OAAO;AAEb,WAAO,KAAK,KAAK;AACjB,UAAM,KAAK,KAAK;AAAA,EAClB;AAEA,SAAO;AACT;AAEO,SAAS,qBAAqB,QAAiC;AACpE,QAAM,SAAS,IAAI,aAAa;AAEhC,WAAS,IAAI,GAAG,IAAI,OAAO,UAAU;AACnC,QAAI,sBAAsB,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC;AAAA,EAClD;AAEA,SAAO,OAAO,MAAM;AACtB;AAEA,SAAS,sBACP,QACA,OACA,QACA,OAGQ;AACR,QAAM,QAAQ,OAAO,KAAK;AAC1B,QAAM,EAAE,GAAG,WAAW,GAAG,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,MAAM,KAAK,IAAI;AAElF,MAAI,QAAQ,EAAG,QAAO,MAAM,KAAK;AAEjC,QAAM,CAAC,IAAI,cAAc,QAAQ,WAAW,MAAM,CAAC,CAAC;AACpD,gBAAc,QAAQ,aAAa,CAAC;AACpC,gBAAc,QAAQ,MAAM,CAAC;AAE7B,QAAM,SAAS,MAAM,WAAW,IAAI,IAAS;AAC7C,gBAAc,QAAQ,QAAQ,CAAC;AAC/B,MAAI,MAAM,WAAW,EAAG,eAAc,QAAQ,MAAM,CAAC,GAAG,CAAC;AAEzD,aAAW,KAAK,MAAM;AACpB,kBAAc,QAAQ,GAAG,CAAC;AAAA,EAC5B;AAEA,OAAK,SAAS,QAAQ,OAAO,UAAU;AACrC,UAAM,OAAO,OAAO,KAAK;AACzB,UAAM,EAAE,GAAG,GAAG,GAAG,EAAE,IAAI;AACvB,QAAI,IAAI,WAAY,MAAM,WAAW,KAAK,WAAY;AACpD;AAAA,IACF;AACA,YAAQ,sBAAsB,QAAQ,OAAO,QAAQ,KAAK;AAAA,EAC5D;AAEA,SAAO,MAAM,KAAK;AAClB,QAAM,CAAC,IAAI,cAAc,QAAQ,SAAS,MAAM,CAAC,CAAC;AAClD,gBAAc,QAAQ,WAAW,CAAC;AAElC,SAAO;AACT;AAEO,SAAS,sBAAsB,OAAiC;AACrE,QAAM,EAAE,OAAO,IAAI;AACnB,QAAM,SAAS,IAAI,aAAa,KAAK;AACrC,QAAM,SAA2B,CAAC;AAClC,QAAM,QAA0B,CAAC;AAEjC,MAAI,UAAU;AACd,MAAI,yBAAyB;AAC7B,MAAI,uBAAuB;AAC3B,MAAI,uBAAuB;AAC3B,MAAI,eAAe;AACnB,MAAI,iBAAiB;AACrB,MAAI,cAAc;AAClB,MAAI,gBAAgB;AAEpB,KAAG;AACD,UAAM,OAAO,OAAO,QAAQ,GAAG;AAC/B,QAAI,YAAY;AAEhB,WAAO,OAAO,MAAM,MAAM,OAAO,OAAO;AACtC,kBAAY,cAAc,QAAQ,SAAS;AAE3C,UAAI,CAAC,WAAW,QAAQ,IAAI,GAAG;AAC7B,cAAM,OAAO,MAAM,IAAI;AACvB,aAAK,CAAC,IAAI;AACV,aAAK,CAAC,IAAI;AACV;AAAA,MACF;AAEA,YAAM,SAAS,cAAc,QAAQ,CAAC;AACtC,YAAM,gBAAgB,SAAS;AAC/B,YAAM,cAAc,SAAS;AAC7B,YAAM,WAAW,SAAS;AAE1B,UAAI,WAA4B;AAChC,UAAI,WAAsB;AAC1B,UAAI;AACJ,UAAI,eAAe;AACjB,cAAM,kBAAkB,cAAc,QAAQ,sBAAsB;AACpE,+BAAuB;AAAA,UACrB;AAAA,UACA,2BAA2B,kBAAkB,uBAAuB;AAAA,QACtE;AAEA,iCAAyB;AACzB,gBAAQ,CAAC,SAAS,WAAW,GAAG,GAAG,iBAAiB,oBAAoB;AAAA,MAC1E,OAAO;AACL,gBAAQ,CAAC,SAAS,WAAW,GAAG,CAAC;AAAA,MACnC;AAEA,YAAM,UAAU,CAAC,CAAC;AAElB,UAAI,aAAa;AACf,cAAM,UAAU;AAChB,cAAM,WAAW;AACjB,+BAAuB,cAAc,QAAQ,oBAAoB;AACjE,cAAM,aAAa,YAAY;AAC/B,uBAAe,cAAc,QAAQ,aAAa,eAAe,CAAC;AAClE,yBAAiB;AAAA,UACf;AAAA,UACA,cAAc,aAAa,eAAe,iBAAiB;AAAA,QAC7D;AAEA,mBAAW,CAAC,sBAAsB,cAAc,cAAc;AAAA,MAChE;AACA,YAAM,WAAW;AAEjB,UAAI,WAAW,QAAQ,IAAI,GAAG;AAC5B,mBAAW,CAAC;AACZ,WAAG;AACD,wBAAc;AACd,0BAAgB;AAChB,gBAAM,mBAAmB,cAAc,QAAQ,CAAC;AAChD,cAAI;AACJ,cAAI,mBAAmB,IAAI;AACzB,+BAAmB,CAAC,CAAC,cAAc,QAAQ,CAAC,CAAC,CAAC;AAC9C,qBAAS,IAAI,IAAI,IAAI,kBAAkB,KAAK;AAC1C,oBAAM,SAAS;AACf,4BAAc,cAAc,QAAQ,WAAW;AAC/C,8BAAgB,cAAc,QAAQ,gBAAgB,SAAS,gBAAgB,CAAC;AAChF,oBAAM,aAAa,cAAc,QAAQ,CAAC;AAC1C,+BAAiB,KAAK,CAAC,YAAY,aAAa,aAAa,CAAC;AAAA,YAChE;AAAA,UACF,OAAO;AACL,+BAAmB,CAAC,CAAC,gBAAgB,CAAC;AAAA,UACxC;AACA,mBAAS,KAAK,gBAAgB;AAAA,QAChC,SAAS,WAAW,QAAQ,IAAI;AAAA,MAClC;AACA,YAAM,WAAW;AAEjB,aAAO,KAAK,KAAK;AACjB,YAAM,KAAK,KAAK;AAAA,IAClB;AAEA;AACA,WAAO,MAAM,OAAO;AAAA,EACtB,SAAS,OAAO,MAAM;AAEtB,SAAO;AACT;AAEO,SAAS,sBAAsB,QAAkC;AACtE,MAAI,OAAO,WAAW,EAAG,QAAO;AAEhC,QAAM,SAAS,IAAI,aAAa;AAEhC,WAAS,IAAI,GAAG,IAAI,OAAO,UAAU;AACnC,QAAI,uBAAuB,QAAQ,GAAG,QAAQ,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;AAAA,EACrE;AAEA,SAAO,OAAO,MAAM;AACtB;AAEA,SAAS,uBACP,QACA,OACA,QACA,OASQ;AACR,QAAM,QAAQ,OAAO,KAAK;AAC1B,QAAM;AAAA,IACJ,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,MAAI,MAAM,CAAC,IAAI,WAAW;AACxB,gBAAY,QAAQ,MAAM,CAAC,GAAG,SAAS;AACvC,UAAM,CAAC,IAAI;AACX,UAAM,CAAC,IAAI;AAAA,EACb,WAAW,QAAQ,GAAG;AACpB,WAAO,MAAM,KAAK;AAAA,EACpB;AAEA,QAAM,CAAC,IAAI,cAAc,QAAQ,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC;AAEnD,QAAM,UACH,MAAM,WAAW,IAAI,IAAS,MAAM,WAAW,IAAS,MAAM,UAAU,IAAS;AACpF,gBAAc,QAAQ,QAAQ,CAAC;AAE/B,MAAI,MAAM,WAAW,GAAG;AACtB,UAAM,EAAE,GAAG,cAAc,GAAG,YAAY,IAAI;AAC5C,QAAI,iBAAiB,MAAM,CAAC,GAAG;AAC7B,YAAM,CAAC,IAAI;AAAA,IACb;AACA,UAAM,CAAC,IAAI,cAAc,QAAQ,cAAc,MAAM,CAAC,CAAC;AACvD,UAAM,CAAC,IAAI,cAAc,QAAQ,aAAa,MAAM,CAAC,CAAC;AAAA,EACxD;AAEA,MAAI,UAAU;AACZ,UAAM,EAAE,GAAG,cAAc,GAAG,UAAU,GAAG,WAAW,IAAI,MAAM;AAC9D,QAAI,iBAAiB,MAAM,CAAC,GAAG;AAC7B,YAAM,CAAC,IAAI;AACX,YAAM,CAAC,IAAI;AAAA,IACb,WAAW,aAAa,MAAM,CAAC,GAAG;AAChC,YAAM,CAAC,IAAI;AAAA,IACb;AACA,UAAM,CAAC,IAAI,cAAc,QAAQ,cAAc,MAAM,CAAC,CAAC;AACvD,UAAM,CAAC,IAAI,cAAc,QAAQ,UAAU,MAAM,CAAC,CAAC;AACnD,UAAM,CAAC,IAAI,cAAc,QAAQ,YAAY,MAAM,CAAC,CAAC;AAAA,EACvD;AAEA,MAAI,UAAU;AACZ,eAAW,WAAW,UAAU;AAC9B,UAAI,QAAQ,SAAS,EAAG,eAAc,QAAQ,CAAC,QAAQ,QAAQ,CAAC;AAChE,YAAM,aAAa,QAAQ,CAAC,EAAE,CAAC;AAC/B,oBAAc,QAAQ,YAAY,CAAC;AACnC,UAAI,mBAAmB;AACvB,UAAI,qBAAqB;AACzB,eAAS,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;AACvC,cAAM,WAAW,QAAQ,CAAC;AAC1B,2BAAmB,cAAc,QAAQ,SAAS,CAAC,GAAI,gBAAgB;AACvE,6BAAqB,cAAc,QAAQ,SAAS,CAAC,GAAI,kBAAkB;AAC3E,sBAAc,QAAQ,SAAS,CAAC,GAAI,CAAC;AAAA,MACvC;AAAA,IACF;AAAA,EACF;AAEA,OAAK,SAAS,QAAQ,OAAO,UAAU;AACrC,UAAM,OAAO,OAAO,KAAK;AACzB,UAAM,EAAE,GAAG,GAAG,GAAG,EAAE,IAAI;AACvB,QAAI,IAAI,WAAY,MAAM,WAAW,KAAK,WAAY;AACpD;AAAA,IACF;AACA,YAAQ,uBAAuB,QAAQ,OAAO,QAAQ,KAAK;AAAA,EAC7D;AAEA,MAAI,MAAM,CAAC,IAAI,SAAS;AACtB,gBAAY,QAAQ,MAAM,CAAC,GAAG,OAAO;AACrC,UAAM,CAAC,IAAI;AACX,UAAM,CAAC,IAAI;AAAA,EACb,OAAO;AACL,WAAO,MAAM,KAAK;AAAA,EACpB;AACA,QAAM,CAAC,IAAI,cAAc,QAAQ,WAAW,MAAM,CAAC,CAAC;AAEpD,SAAO;AACT;AAEA,SAAS,YAAY,QAAsB,UAAkB,MAAc;AACzE,KAAG;AACD,WAAO,MAAM,SAAS;AAAA,EACxB,SAAS,EAAE,WAAW;AACxB;;;ACtUO,SAAS,OAAO,UAAqC;AAC1D,QAAM,EAAE,OAAO,IAAI;AACnB,QAAM,SAAS,IAAI,aAAa,QAAQ;AACxC,QAAM,UAA6B,CAAC;AACpC,MAAI,YAAY;AAChB,MAAI,eAAe;AACnB,MAAI,aAAa;AACjB,MAAI,eAAe;AACnB,MAAI,aAAa;AAEjB,KAAG;AACD,UAAM,OAAO,OAAO,QAAQ,GAAG;AAC/B,UAAM,OAAsB,CAAC;AAC7B,QAAI,SAAS;AACb,QAAI,UAAU;AACd,gBAAY;AAEZ,WAAO,OAAO,MAAM,MAAM;AACxB,UAAI;AAEJ,kBAAY,cAAc,QAAQ,SAAS;AAC3C,UAAI,YAAY,QAAS,UAAS;AAClC,gBAAU;AAEV,UAAI,WAAW,QAAQ,IAAI,GAAG;AAC5B,uBAAe,cAAc,QAAQ,YAAY;AACjD,qBAAa,cAAc,QAAQ,UAAU;AAC7C,uBAAe,cAAc,QAAQ,YAAY;AAEjD,YAAI,WAAW,QAAQ,IAAI,GAAG;AAC5B,uBAAa,cAAc,QAAQ,UAAU;AAC7C,gBAAM,CAAC,WAAW,cAAc,YAAY,cAAc,UAAU;AAAA,QACtE,OAAO;AACL,gBAAM,CAAC,WAAW,cAAc,YAAY,YAAY;AAAA,QAC1D;AAAA,MACF,OAAO;AACL,cAAM,CAAC,SAAS;AAAA,MAClB;AAEA,WAAK,KAAK,GAAG;AACb,aAAO;AAAA,IACT;AAEA,QAAI,CAAC,OAAQ,MAAK,IAAI;AACtB,YAAQ,KAAK,IAAI;AACjB,WAAO,MAAM,OAAO;AAAA,EACtB,SAAS,OAAO,OAAO;AAEvB,SAAO;AACT;AAEA,SAAS,KAAK,MAA0B;AACtC,OAAK,KAAK,cAAc;AAC1B;AAEA,SAAS,eAAe,GAAqB,GAA6B;AACxE,SAAO,EAAE,CAAC,IAAI,EAAE,CAAC;AACnB;AAIO,SAAS,OAAO,SAA8C;AACnE,QAAM,SAAS,IAAI,aAAa;AAChC,MAAI,eAAe;AACnB,MAAI,aAAa;AACjB,MAAI,eAAe;AACnB,MAAI,aAAa;AAEjB,WAAS,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;AACvC,UAAM,OAAO,QAAQ,CAAC;AACtB,QAAI,IAAI,EAAG,QAAO,MAAM,SAAS;AACjC,QAAI,KAAK,WAAW,EAAG;AAEvB,QAAI,YAAY;AAEhB,aAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,YAAM,UAAU,KAAK,CAAC;AACtB,UAAI,IAAI,EAAG,QAAO,MAAM,KAAK;AAE7B,kBAAY,cAAc,QAAQ,QAAQ,CAAC,GAAG,SAAS;AAEvD,UAAI,QAAQ,WAAW,EAAG;AAC1B,qBAAe,cAAc,QAAQ,QAAQ,CAAC,GAAG,YAAY;AAC7D,mBAAa,cAAc,QAAQ,QAAQ,CAAC,GAAG,UAAU;AACzD,qBAAe,cAAc,QAAQ,QAAQ,CAAC,GAAG,YAAY;AAE7D,UAAI,QAAQ,WAAW,EAAG;AAC1B,mBAAa,cAAc,QAAQ,QAAQ,CAAC,GAAG,UAAU;AAAA,IAC3D;AAAA,EACF;AAEA,SAAO,OAAO,MAAM;AACtB;", - "names": [] -} diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js deleted file mode 100644 index 2d8e459..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js +++ /dev/null @@ -1,464 +0,0 @@ -(function (global, factory) { - if (typeof exports === 'object' && typeof module !== 'undefined') { - factory(module); - module.exports = def(module); - } else if (typeof define === 'function' && define.amd) { - define(['module'], function(mod) { - factory.apply(this, arguments); - mod.exports = def(mod); - }); - } else { - const mod = { exports: {} }; - factory(mod); - global = typeof globalThis !== 'undefined' ? globalThis : global || self; - global.sourcemapCodec = def(mod); - } - function def(m) { return 'default' in m.exports ? m.exports.default : m.exports; } -})(this, (function (module) { -"use strict"; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/sourcemap-codec.ts -var sourcemap_codec_exports = {}; -__export(sourcemap_codec_exports, { - decode: () => decode, - decodeGeneratedRanges: () => decodeGeneratedRanges, - decodeOriginalScopes: () => decodeOriginalScopes, - encode: () => encode, - encodeGeneratedRanges: () => encodeGeneratedRanges, - encodeOriginalScopes: () => encodeOriginalScopes -}); -module.exports = __toCommonJS(sourcemap_codec_exports); - -// src/vlq.ts -var comma = ",".charCodeAt(0); -var semicolon = ";".charCodeAt(0); -var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -var intToChar = new Uint8Array(64); -var charToInt = new Uint8Array(128); -for (let i = 0; i < chars.length; i++) { - const c = chars.charCodeAt(i); - intToChar[i] = c; - charToInt[c] = i; -} -function decodeInteger(reader, relative) { - let value = 0; - let shift = 0; - let integer = 0; - do { - const c = reader.next(); - integer = charToInt[c]; - value |= (integer & 31) << shift; - shift += 5; - } while (integer & 32); - const shouldNegate = value & 1; - value >>>= 1; - if (shouldNegate) { - value = -2147483648 | -value; - } - return relative + value; -} -function encodeInteger(builder, num, relative) { - let delta = num - relative; - delta = delta < 0 ? -delta << 1 | 1 : delta << 1; - do { - let clamped = delta & 31; - delta >>>= 5; - if (delta > 0) clamped |= 32; - builder.write(intToChar[clamped]); - } while (delta > 0); - return num; -} -function hasMoreVlq(reader, max) { - if (reader.pos >= max) return false; - return reader.peek() !== comma; -} - -// src/strings.ts -var bufLength = 1024 * 16; -var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? { - decode(buf) { - const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); - return out.toString(); - } -} : { - decode(buf) { - let out = ""; - for (let i = 0; i < buf.length; i++) { - out += String.fromCharCode(buf[i]); - } - return out; - } -}; -var StringWriter = class { - constructor() { - this.pos = 0; - this.out = ""; - this.buffer = new Uint8Array(bufLength); - } - write(v) { - const { buffer } = this; - buffer[this.pos++] = v; - if (this.pos === bufLength) { - this.out += td.decode(buffer); - this.pos = 0; - } - } - flush() { - const { buffer, out, pos } = this; - return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; - } -}; -var StringReader = class { - constructor(buffer) { - this.pos = 0; - this.buffer = buffer; - } - next() { - return this.buffer.charCodeAt(this.pos++); - } - peek() { - return this.buffer.charCodeAt(this.pos); - } - indexOf(char) { - const { buffer, pos } = this; - const idx = buffer.indexOf(char, pos); - return idx === -1 ? buffer.length : idx; - } -}; - -// src/scopes.ts -var EMPTY = []; -function decodeOriginalScopes(input) { - const { length } = input; - const reader = new StringReader(input); - const scopes = []; - const stack = []; - let line = 0; - for (; reader.pos < length; reader.pos++) { - line = decodeInteger(reader, line); - const column = decodeInteger(reader, 0); - if (!hasMoreVlq(reader, length)) { - const last = stack.pop(); - last[2] = line; - last[3] = column; - continue; - } - const kind = decodeInteger(reader, 0); - const fields = decodeInteger(reader, 0); - const hasName = fields & 1; - const scope = hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]; - let vars = EMPTY; - if (hasMoreVlq(reader, length)) { - vars = []; - do { - const varsIndex = decodeInteger(reader, 0); - vars.push(varsIndex); - } while (hasMoreVlq(reader, length)); - } - scope.vars = vars; - scopes.push(scope); - stack.push(scope); - } - return scopes; -} -function encodeOriginalScopes(scopes) { - const writer = new StringWriter(); - for (let i = 0; i < scopes.length; ) { - i = _encodeOriginalScopes(scopes, i, writer, [0]); - } - return writer.flush(); -} -function _encodeOriginalScopes(scopes, index, writer, state) { - const scope = scopes[index]; - const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope; - if (index > 0) writer.write(comma); - state[0] = encodeInteger(writer, startLine, state[0]); - encodeInteger(writer, startColumn, 0); - encodeInteger(writer, kind, 0); - const fields = scope.length === 6 ? 1 : 0; - encodeInteger(writer, fields, 0); - if (scope.length === 6) encodeInteger(writer, scope[5], 0); - for (const v of vars) { - encodeInteger(writer, v, 0); - } - for (index++; index < scopes.length; ) { - const next = scopes[index]; - const { 0: l, 1: c } = next; - if (l > endLine || l === endLine && c >= endColumn) { - break; - } - index = _encodeOriginalScopes(scopes, index, writer, state); - } - writer.write(comma); - state[0] = encodeInteger(writer, endLine, state[0]); - encodeInteger(writer, endColumn, 0); - return index; -} -function decodeGeneratedRanges(input) { - const { length } = input; - const reader = new StringReader(input); - const ranges = []; - const stack = []; - let genLine = 0; - let definitionSourcesIndex = 0; - let definitionScopeIndex = 0; - let callsiteSourcesIndex = 0; - let callsiteLine = 0; - let callsiteColumn = 0; - let bindingLine = 0; - let bindingColumn = 0; - do { - const semi = reader.indexOf(";"); - let genColumn = 0; - for (; reader.pos < semi; reader.pos++) { - genColumn = decodeInteger(reader, genColumn); - if (!hasMoreVlq(reader, semi)) { - const last = stack.pop(); - last[2] = genLine; - last[3] = genColumn; - continue; - } - const fields = decodeInteger(reader, 0); - const hasDefinition = fields & 1; - const hasCallsite = fields & 2; - const hasScope = fields & 4; - let callsite = null; - let bindings = EMPTY; - let range; - if (hasDefinition) { - const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex); - definitionScopeIndex = decodeInteger( - reader, - definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0 - ); - definitionSourcesIndex = defSourcesIndex; - range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex]; - } else { - range = [genLine, genColumn, 0, 0]; - } - range.isScope = !!hasScope; - if (hasCallsite) { - const prevCsi = callsiteSourcesIndex; - const prevLine = callsiteLine; - callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex); - const sameSource = prevCsi === callsiteSourcesIndex; - callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0); - callsiteColumn = decodeInteger( - reader, - sameSource && prevLine === callsiteLine ? callsiteColumn : 0 - ); - callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn]; - } - range.callsite = callsite; - if (hasMoreVlq(reader, semi)) { - bindings = []; - do { - bindingLine = genLine; - bindingColumn = genColumn; - const expressionsCount = decodeInteger(reader, 0); - let expressionRanges; - if (expressionsCount < -1) { - expressionRanges = [[decodeInteger(reader, 0)]]; - for (let i = -1; i > expressionsCount; i--) { - const prevBl = bindingLine; - bindingLine = decodeInteger(reader, bindingLine); - bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0); - const expression = decodeInteger(reader, 0); - expressionRanges.push([expression, bindingLine, bindingColumn]); - } - } else { - expressionRanges = [[expressionsCount]]; - } - bindings.push(expressionRanges); - } while (hasMoreVlq(reader, semi)); - } - range.bindings = bindings; - ranges.push(range); - stack.push(range); - } - genLine++; - reader.pos = semi + 1; - } while (reader.pos < length); - return ranges; -} -function encodeGeneratedRanges(ranges) { - if (ranges.length === 0) return ""; - const writer = new StringWriter(); - for (let i = 0; i < ranges.length; ) { - i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]); - } - return writer.flush(); -} -function _encodeGeneratedRanges(ranges, index, writer, state) { - const range = ranges[index]; - const { - 0: startLine, - 1: startColumn, - 2: endLine, - 3: endColumn, - isScope, - callsite, - bindings - } = range; - if (state[0] < startLine) { - catchupLine(writer, state[0], startLine); - state[0] = startLine; - state[1] = 0; - } else if (index > 0) { - writer.write(comma); - } - state[1] = encodeInteger(writer, range[1], state[1]); - const fields = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0); - encodeInteger(writer, fields, 0); - if (range.length === 6) { - const { 4: sourcesIndex, 5: scopesIndex } = range; - if (sourcesIndex !== state[2]) { - state[3] = 0; - } - state[2] = encodeInteger(writer, sourcesIndex, state[2]); - state[3] = encodeInteger(writer, scopesIndex, state[3]); - } - if (callsite) { - const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite; - if (sourcesIndex !== state[4]) { - state[5] = 0; - state[6] = 0; - } else if (callLine !== state[5]) { - state[6] = 0; - } - state[4] = encodeInteger(writer, sourcesIndex, state[4]); - state[5] = encodeInteger(writer, callLine, state[5]); - state[6] = encodeInteger(writer, callColumn, state[6]); - } - if (bindings) { - for (const binding of bindings) { - if (binding.length > 1) encodeInteger(writer, -binding.length, 0); - const expression = binding[0][0]; - encodeInteger(writer, expression, 0); - let bindingStartLine = startLine; - let bindingStartColumn = startColumn; - for (let i = 1; i < binding.length; i++) { - const expRange = binding[i]; - bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine); - bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn); - encodeInteger(writer, expRange[0], 0); - } - } - } - for (index++; index < ranges.length; ) { - const next = ranges[index]; - const { 0: l, 1: c } = next; - if (l > endLine || l === endLine && c >= endColumn) { - break; - } - index = _encodeGeneratedRanges(ranges, index, writer, state); - } - if (state[0] < endLine) { - catchupLine(writer, state[0], endLine); - state[0] = endLine; - state[1] = 0; - } else { - writer.write(comma); - } - state[1] = encodeInteger(writer, endColumn, state[1]); - return index; -} -function catchupLine(writer, lastLine, line) { - do { - writer.write(semicolon); - } while (++lastLine < line); -} - -// src/sourcemap-codec.ts -function decode(mappings) { - const { length } = mappings; - const reader = new StringReader(mappings); - const decoded = []; - let genColumn = 0; - let sourcesIndex = 0; - let sourceLine = 0; - let sourceColumn = 0; - let namesIndex = 0; - do { - const semi = reader.indexOf(";"); - const line = []; - let sorted = true; - let lastCol = 0; - genColumn = 0; - while (reader.pos < semi) { - let seg; - genColumn = decodeInteger(reader, genColumn); - if (genColumn < lastCol) sorted = false; - lastCol = genColumn; - if (hasMoreVlq(reader, semi)) { - sourcesIndex = decodeInteger(reader, sourcesIndex); - sourceLine = decodeInteger(reader, sourceLine); - sourceColumn = decodeInteger(reader, sourceColumn); - if (hasMoreVlq(reader, semi)) { - namesIndex = decodeInteger(reader, namesIndex); - seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]; - } else { - seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]; - } - } else { - seg = [genColumn]; - } - line.push(seg); - reader.pos++; - } - if (!sorted) sort(line); - decoded.push(line); - reader.pos = semi + 1; - } while (reader.pos <= length); - return decoded; -} -function sort(line) { - line.sort(sortComparator); -} -function sortComparator(a, b) { - return a[0] - b[0]; -} -function encode(decoded) { - const writer = new StringWriter(); - let sourcesIndex = 0; - let sourceLine = 0; - let sourceColumn = 0; - let namesIndex = 0; - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - if (i > 0) writer.write(semicolon); - if (line.length === 0) continue; - let genColumn = 0; - for (let j = 0; j < line.length; j++) { - const segment = line[j]; - if (j > 0) writer.write(comma); - genColumn = encodeInteger(writer, segment[0], genColumn); - if (segment.length === 1) continue; - sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); - sourceLine = encodeInteger(writer, segment[2], sourceLine); - sourceColumn = encodeInteger(writer, segment[3], sourceColumn); - if (segment.length === 4) continue; - namesIndex = encodeInteger(writer, segment[4], namesIndex); - } - } - return writer.flush(); -} -})); -//# sourceMappingURL=sourcemap-codec.umd.js.map diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map deleted file mode 100644 index abc18d2..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map +++ /dev/null @@ -1,6 +0,0 @@ -{ - "version": 3, - "sources": ["../src/sourcemap-codec.ts", "../src/vlq.ts", "../src/strings.ts", "../src/scopes.ts"], - "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEO,IAAM,QAAQ,IAAI,WAAW,CAAC;AAC9B,IAAM,YAAY,IAAI,WAAW,CAAC;AAEzC,IAAM,QAAQ;AACd,IAAM,YAAY,IAAI,WAAW,EAAE;AACnC,IAAM,YAAY,IAAI,WAAW,GAAG;AAEpC,SAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACrC,QAAM,IAAI,MAAM,WAAW,CAAC;AAC5B,YAAU,CAAC,IAAI;AACf,YAAU,CAAC,IAAI;AACjB;AAEO,SAAS,cAAc,QAAsB,UAA0B;AAC5E,MAAI,QAAQ;AACZ,MAAI,QAAQ;AACZ,MAAI,UAAU;AAEd,KAAG;AACD,UAAM,IAAI,OAAO,KAAK;AACtB,cAAU,UAAU,CAAC;AACrB,cAAU,UAAU,OAAO;AAC3B,aAAS;AAAA,EACX,SAAS,UAAU;AAEnB,QAAM,eAAe,QAAQ;AAC7B,aAAW;AAEX,MAAI,cAAc;AAChB,YAAQ,cAAc,CAAC;AAAA,EACzB;AAEA,SAAO,WAAW;AACpB;AAEO,SAAS,cAAc,SAAuB,KAAa,UAA0B;AAC1F,MAAI,QAAQ,MAAM;AAElB,UAAQ,QAAQ,IAAK,CAAC,SAAS,IAAK,IAAI,SAAS;AACjD,KAAG;AACD,QAAI,UAAU,QAAQ;AACtB,eAAW;AACX,QAAI,QAAQ,EAAG,YAAW;AAC1B,YAAQ,MAAM,UAAU,OAAO,CAAC;AAAA,EAClC,SAAS,QAAQ;AAEjB,SAAO;AACT;AAEO,SAAS,WAAW,QAAsB,KAAa;AAC5D,MAAI,OAAO,OAAO,IAAK,QAAO;AAC9B,SAAO,OAAO,KAAK,MAAM;AAC3B;;;ACtDA,IAAM,YAAY,OAAO;AAGzB,IAAM,KACJ,OAAO,gBAAgB,cACH,oBAAI,YAAY,IAChC,OAAO,WAAW,cAChB;AAAA,EACE,OAAO,KAAyB;AAC9B,UAAM,MAAM,OAAO,KAAK,IAAI,QAAQ,IAAI,YAAY,IAAI,UAAU;AAClE,WAAO,IAAI,SAAS;AAAA,EACtB;AACF,IACA;AAAA,EACE,OAAO,KAAyB;AAC9B,QAAI,MAAM;AACV,aAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACnC,aAAO,OAAO,aAAa,IAAI,CAAC,CAAC;AAAA,IACnC;AACA,WAAO;AAAA,EACT;AACF;AAED,IAAM,eAAN,MAAmB;AAAA,EAAnB;AACL,eAAM;AACN,SAAQ,MAAM;AACd,SAAQ,SAAS,IAAI,WAAW,SAAS;AAAA;AAAA,EAEzC,MAAM,GAAiB;AACrB,UAAM,EAAE,OAAO,IAAI;AACnB,WAAO,KAAK,KAAK,IAAI;AACrB,QAAI,KAAK,QAAQ,WAAW;AAC1B,WAAK,OAAO,GAAG,OAAO,MAAM;AAC5B,WAAK,MAAM;AAAA,IACb;AAAA,EACF;AAAA,EAEA,QAAgB;AACd,UAAM,EAAE,QAAQ,KAAK,IAAI,IAAI;AAC7B,WAAO,MAAM,IAAI,MAAM,GAAG,OAAO,OAAO,SAAS,GAAG,GAAG,CAAC,IAAI;AAAA,EAC9D;AACF;AAEO,IAAM,eAAN,MAAmB;AAAA,EAIxB,YAAY,QAAgB;AAH5B,eAAM;AAIJ,SAAK,SAAS;AAAA,EAChB;AAAA,EAEA,OAAe;AACb,WAAO,KAAK,OAAO,WAAW,KAAK,KAAK;AAAA,EAC1C;AAAA,EAEA,OAAe;AACb,WAAO,KAAK,OAAO,WAAW,KAAK,GAAG;AAAA,EACxC;AAAA,EAEA,QAAQ,MAAsB;AAC5B,UAAM,EAAE,QAAQ,IAAI,IAAI;AACxB,UAAM,MAAM,OAAO,QAAQ,MAAM,GAAG;AACpC,WAAO,QAAQ,KAAK,OAAO,SAAS;AAAA,EACtC;AACF;;;AC7DA,IAAM,QAAe,CAAC;AA+Bf,SAAS,qBAAqB,OAAgC;AACnE,QAAM,EAAE,OAAO,IAAI;AACnB,QAAM,SAAS,IAAI,aAAa,KAAK;AACrC,QAAM,SAA0B,CAAC;AACjC,QAAM,QAAyB,CAAC;AAChC,MAAI,OAAO;AAEX,SAAO,OAAO,MAAM,QAAQ,OAAO,OAAO;AACxC,WAAO,cAAc,QAAQ,IAAI;AACjC,UAAM,SAAS,cAAc,QAAQ,CAAC;AAEtC,QAAI,CAAC,WAAW,QAAQ,MAAM,GAAG;AAC/B,YAAM,OAAO,MAAM,IAAI;AACvB,WAAK,CAAC,IAAI;AACV,WAAK,CAAC,IAAI;AACV;AAAA,IACF;AAEA,UAAM,OAAO,cAAc,QAAQ,CAAC;AACpC,UAAM,SAAS,cAAc,QAAQ,CAAC;AACtC,UAAM,UAAU,SAAS;AAEzB,UAAM,QACJ,UAAU,CAAC,MAAM,QAAQ,GAAG,GAAG,MAAM,cAAc,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,QAAQ,GAAG,GAAG,IAAI;AAG5F,QAAI,OAAc;AAClB,QAAI,WAAW,QAAQ,MAAM,GAAG;AAC9B,aAAO,CAAC;AACR,SAAG;AACD,cAAM,YAAY,cAAc,QAAQ,CAAC;AACzC,aAAK,KAAK,SAAS;AAAA,MACrB,SAAS,WAAW,QAAQ,MAAM;AAAA,IACpC;AACA,UAAM,OAAO;AAEb,WAAO,KAAK,KAAK;AACjB,UAAM,KAAK,KAAK;AAAA,EAClB;AAEA,SAAO;AACT;AAEO,SAAS,qBAAqB,QAAiC;AACpE,QAAM,SAAS,IAAI,aAAa;AAEhC,WAAS,IAAI,GAAG,IAAI,OAAO,UAAU;AACnC,QAAI,sBAAsB,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC;AAAA,EAClD;AAEA,SAAO,OAAO,MAAM;AACtB;AAEA,SAAS,sBACP,QACA,OACA,QACA,OAGQ;AACR,QAAM,QAAQ,OAAO,KAAK;AAC1B,QAAM,EAAE,GAAG,WAAW,GAAG,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,MAAM,KAAK,IAAI;AAElF,MAAI,QAAQ,EAAG,QAAO,MAAM,KAAK;AAEjC,QAAM,CAAC,IAAI,cAAc,QAAQ,WAAW,MAAM,CAAC,CAAC;AACpD,gBAAc,QAAQ,aAAa,CAAC;AACpC,gBAAc,QAAQ,MAAM,CAAC;AAE7B,QAAM,SAAS,MAAM,WAAW,IAAI,IAAS;AAC7C,gBAAc,QAAQ,QAAQ,CAAC;AAC/B,MAAI,MAAM,WAAW,EAAG,eAAc,QAAQ,MAAM,CAAC,GAAG,CAAC;AAEzD,aAAW,KAAK,MAAM;AACpB,kBAAc,QAAQ,GAAG,CAAC;AAAA,EAC5B;AAEA,OAAK,SAAS,QAAQ,OAAO,UAAU;AACrC,UAAM,OAAO,OAAO,KAAK;AACzB,UAAM,EAAE,GAAG,GAAG,GAAG,EAAE,IAAI;AACvB,QAAI,IAAI,WAAY,MAAM,WAAW,KAAK,WAAY;AACpD;AAAA,IACF;AACA,YAAQ,sBAAsB,QAAQ,OAAO,QAAQ,KAAK;AAAA,EAC5D;AAEA,SAAO,MAAM,KAAK;AAClB,QAAM,CAAC,IAAI,cAAc,QAAQ,SAAS,MAAM,CAAC,CAAC;AAClD,gBAAc,QAAQ,WAAW,CAAC;AAElC,SAAO;AACT;AAEO,SAAS,sBAAsB,OAAiC;AACrE,QAAM,EAAE,OAAO,IAAI;AACnB,QAAM,SAAS,IAAI,aAAa,KAAK;AACrC,QAAM,SAA2B,CAAC;AAClC,QAAM,QAA0B,CAAC;AAEjC,MAAI,UAAU;AACd,MAAI,yBAAyB;AAC7B,MAAI,uBAAuB;AAC3B,MAAI,uBAAuB;AAC3B,MAAI,eAAe;AACnB,MAAI,iBAAiB;AACrB,MAAI,cAAc;AAClB,MAAI,gBAAgB;AAEpB,KAAG;AACD,UAAM,OAAO,OAAO,QAAQ,GAAG;AAC/B,QAAI,YAAY;AAEhB,WAAO,OAAO,MAAM,MAAM,OAAO,OAAO;AACtC,kBAAY,cAAc,QAAQ,SAAS;AAE3C,UAAI,CAAC,WAAW,QAAQ,IAAI,GAAG;AAC7B,cAAM,OAAO,MAAM,IAAI;AACvB,aAAK,CAAC,IAAI;AACV,aAAK,CAAC,IAAI;AACV;AAAA,MACF;AAEA,YAAM,SAAS,cAAc,QAAQ,CAAC;AACtC,YAAM,gBAAgB,SAAS;AAC/B,YAAM,cAAc,SAAS;AAC7B,YAAM,WAAW,SAAS;AAE1B,UAAI,WAA4B;AAChC,UAAI,WAAsB;AAC1B,UAAI;AACJ,UAAI,eAAe;AACjB,cAAM,kBAAkB,cAAc,QAAQ,sBAAsB;AACpE,+BAAuB;AAAA,UACrB;AAAA,UACA,2BAA2B,kBAAkB,uBAAuB;AAAA,QACtE;AAEA,iCAAyB;AACzB,gBAAQ,CAAC,SAAS,WAAW,GAAG,GAAG,iBAAiB,oBAAoB;AAAA,MAC1E,OAAO;AACL,gBAAQ,CAAC,SAAS,WAAW,GAAG,CAAC;AAAA,MACnC;AAEA,YAAM,UAAU,CAAC,CAAC;AAElB,UAAI,aAAa;AACf,cAAM,UAAU;AAChB,cAAM,WAAW;AACjB,+BAAuB,cAAc,QAAQ,oBAAoB;AACjE,cAAM,aAAa,YAAY;AAC/B,uBAAe,cAAc,QAAQ,aAAa,eAAe,CAAC;AAClE,yBAAiB;AAAA,UACf;AAAA,UACA,cAAc,aAAa,eAAe,iBAAiB;AAAA,QAC7D;AAEA,mBAAW,CAAC,sBAAsB,cAAc,cAAc;AAAA,MAChE;AACA,YAAM,WAAW;AAEjB,UAAI,WAAW,QAAQ,IAAI,GAAG;AAC5B,mBAAW,CAAC;AACZ,WAAG;AACD,wBAAc;AACd,0BAAgB;AAChB,gBAAM,mBAAmB,cAAc,QAAQ,CAAC;AAChD,cAAI;AACJ,cAAI,mBAAmB,IAAI;AACzB,+BAAmB,CAAC,CAAC,cAAc,QAAQ,CAAC,CAAC,CAAC;AAC9C,qBAAS,IAAI,IAAI,IAAI,kBAAkB,KAAK;AAC1C,oBAAM,SAAS;AACf,4BAAc,cAAc,QAAQ,WAAW;AAC/C,8BAAgB,cAAc,QAAQ,gBAAgB,SAAS,gBAAgB,CAAC;AAChF,oBAAM,aAAa,cAAc,QAAQ,CAAC;AAC1C,+BAAiB,KAAK,CAAC,YAAY,aAAa,aAAa,CAAC;AAAA,YAChE;AAAA,UACF,OAAO;AACL,+BAAmB,CAAC,CAAC,gBAAgB,CAAC;AAAA,UACxC;AACA,mBAAS,KAAK,gBAAgB;AAAA,QAChC,SAAS,WAAW,QAAQ,IAAI;AAAA,MAClC;AACA,YAAM,WAAW;AAEjB,aAAO,KAAK,KAAK;AACjB,YAAM,KAAK,KAAK;AAAA,IAClB;AAEA;AACA,WAAO,MAAM,OAAO;AAAA,EACtB,SAAS,OAAO,MAAM;AAEtB,SAAO;AACT;AAEO,SAAS,sBAAsB,QAAkC;AACtE,MAAI,OAAO,WAAW,EAAG,QAAO;AAEhC,QAAM,SAAS,IAAI,aAAa;AAEhC,WAAS,IAAI,GAAG,IAAI,OAAO,UAAU;AACnC,QAAI,uBAAuB,QAAQ,GAAG,QAAQ,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;AAAA,EACrE;AAEA,SAAO,OAAO,MAAM;AACtB;AAEA,SAAS,uBACP,QACA,OACA,QACA,OASQ;AACR,QAAM,QAAQ,OAAO,KAAK;AAC1B,QAAM;AAAA,IACJ,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,MAAI,MAAM,CAAC,IAAI,WAAW;AACxB,gBAAY,QAAQ,MAAM,CAAC,GAAG,SAAS;AACvC,UAAM,CAAC,IAAI;AACX,UAAM,CAAC,IAAI;AAAA,EACb,WAAW,QAAQ,GAAG;AACpB,WAAO,MAAM,KAAK;AAAA,EACpB;AAEA,QAAM,CAAC,IAAI,cAAc,QAAQ,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC;AAEnD,QAAM,UACH,MAAM,WAAW,IAAI,IAAS,MAAM,WAAW,IAAS,MAAM,UAAU,IAAS;AACpF,gBAAc,QAAQ,QAAQ,CAAC;AAE/B,MAAI,MAAM,WAAW,GAAG;AACtB,UAAM,EAAE,GAAG,cAAc,GAAG,YAAY,IAAI;AAC5C,QAAI,iBAAiB,MAAM,CAAC,GAAG;AAC7B,YAAM,CAAC,IAAI;AAAA,IACb;AACA,UAAM,CAAC,IAAI,cAAc,QAAQ,cAAc,MAAM,CAAC,CAAC;AACvD,UAAM,CAAC,IAAI,cAAc,QAAQ,aAAa,MAAM,CAAC,CAAC;AAAA,EACxD;AAEA,MAAI,UAAU;AACZ,UAAM,EAAE,GAAG,cAAc,GAAG,UAAU,GAAG,WAAW,IAAI,MAAM;AAC9D,QAAI,iBAAiB,MAAM,CAAC,GAAG;AAC7B,YAAM,CAAC,IAAI;AACX,YAAM,CAAC,IAAI;AAAA,IACb,WAAW,aAAa,MAAM,CAAC,GAAG;AAChC,YAAM,CAAC,IAAI;AAAA,IACb;AACA,UAAM,CAAC,IAAI,cAAc,QAAQ,cAAc,MAAM,CAAC,CAAC;AACvD,UAAM,CAAC,IAAI,cAAc,QAAQ,UAAU,MAAM,CAAC,CAAC;AACnD,UAAM,CAAC,IAAI,cAAc,QAAQ,YAAY,MAAM,CAAC,CAAC;AAAA,EACvD;AAEA,MAAI,UAAU;AACZ,eAAW,WAAW,UAAU;AAC9B,UAAI,QAAQ,SAAS,EAAG,eAAc,QAAQ,CAAC,QAAQ,QAAQ,CAAC;AAChE,YAAM,aAAa,QAAQ,CAAC,EAAE,CAAC;AAC/B,oBAAc,QAAQ,YAAY,CAAC;AACnC,UAAI,mBAAmB;AACvB,UAAI,qBAAqB;AACzB,eAAS,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;AACvC,cAAM,WAAW,QAAQ,CAAC;AAC1B,2BAAmB,cAAc,QAAQ,SAAS,CAAC,GAAI,gBAAgB;AACvE,6BAAqB,cAAc,QAAQ,SAAS,CAAC,GAAI,kBAAkB;AAC3E,sBAAc,QAAQ,SAAS,CAAC,GAAI,CAAC;AAAA,MACvC;AAAA,IACF;AAAA,EACF;AAEA,OAAK,SAAS,QAAQ,OAAO,UAAU;AACrC,UAAM,OAAO,OAAO,KAAK;AACzB,UAAM,EAAE,GAAG,GAAG,GAAG,EAAE,IAAI;AACvB,QAAI,IAAI,WAAY,MAAM,WAAW,KAAK,WAAY;AACpD;AAAA,IACF;AACA,YAAQ,uBAAuB,QAAQ,OAAO,QAAQ,KAAK;AAAA,EAC7D;AAEA,MAAI,MAAM,CAAC,IAAI,SAAS;AACtB,gBAAY,QAAQ,MAAM,CAAC,GAAG,OAAO;AACrC,UAAM,CAAC,IAAI;AACX,UAAM,CAAC,IAAI;AAAA,EACb,OAAO;AACL,WAAO,MAAM,KAAK;AAAA,EACpB;AACA,QAAM,CAAC,IAAI,cAAc,QAAQ,WAAW,MAAM,CAAC,CAAC;AAEpD,SAAO;AACT;AAEA,SAAS,YAAY,QAAsB,UAAkB,MAAc;AACzE,KAAG;AACD,WAAO,MAAM,SAAS;AAAA,EACxB,SAAS,EAAE,WAAW;AACxB;;;AHtUO,SAAS,OAAO,UAAqC;AAC1D,QAAM,EAAE,OAAO,IAAI;AACnB,QAAM,SAAS,IAAI,aAAa,QAAQ;AACxC,QAAM,UAA6B,CAAC;AACpC,MAAI,YAAY;AAChB,MAAI,eAAe;AACnB,MAAI,aAAa;AACjB,MAAI,eAAe;AACnB,MAAI,aAAa;AAEjB,KAAG;AACD,UAAM,OAAO,OAAO,QAAQ,GAAG;AAC/B,UAAM,OAAsB,CAAC;AAC7B,QAAI,SAAS;AACb,QAAI,UAAU;AACd,gBAAY;AAEZ,WAAO,OAAO,MAAM,MAAM;AACxB,UAAI;AAEJ,kBAAY,cAAc,QAAQ,SAAS;AAC3C,UAAI,YAAY,QAAS,UAAS;AAClC,gBAAU;AAEV,UAAI,WAAW,QAAQ,IAAI,GAAG;AAC5B,uBAAe,cAAc,QAAQ,YAAY;AACjD,qBAAa,cAAc,QAAQ,UAAU;AAC7C,uBAAe,cAAc,QAAQ,YAAY;AAEjD,YAAI,WAAW,QAAQ,IAAI,GAAG;AAC5B,uBAAa,cAAc,QAAQ,UAAU;AAC7C,gBAAM,CAAC,WAAW,cAAc,YAAY,cAAc,UAAU;AAAA,QACtE,OAAO;AACL,gBAAM,CAAC,WAAW,cAAc,YAAY,YAAY;AAAA,QAC1D;AAAA,MACF,OAAO;AACL,cAAM,CAAC,SAAS;AAAA,MAClB;AAEA,WAAK,KAAK,GAAG;AACb,aAAO;AAAA,IACT;AAEA,QAAI,CAAC,OAAQ,MAAK,IAAI;AACtB,YAAQ,KAAK,IAAI;AACjB,WAAO,MAAM,OAAO;AAAA,EACtB,SAAS,OAAO,OAAO;AAEvB,SAAO;AACT;AAEA,SAAS,KAAK,MAA0B;AACtC,OAAK,KAAK,cAAc;AAC1B;AAEA,SAAS,eAAe,GAAqB,GAA6B;AACxE,SAAO,EAAE,CAAC,IAAI,EAAE,CAAC;AACnB;AAIO,SAAS,OAAO,SAA8C;AACnE,QAAM,SAAS,IAAI,aAAa;AAChC,MAAI,eAAe;AACnB,MAAI,aAAa;AACjB,MAAI,eAAe;AACnB,MAAI,aAAa;AAEjB,WAAS,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;AACvC,UAAM,OAAO,QAAQ,CAAC;AACtB,QAAI,IAAI,EAAG,QAAO,MAAM,SAAS;AACjC,QAAI,KAAK,WAAW,EAAG;AAEvB,QAAI,YAAY;AAEhB,aAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,YAAM,UAAU,KAAK,CAAC;AACtB,UAAI,IAAI,EAAG,QAAO,MAAM,KAAK;AAE7B,kBAAY,cAAc,QAAQ,QAAQ,CAAC,GAAG,SAAS;AAEvD,UAAI,QAAQ,WAAW,EAAG;AAC1B,qBAAe,cAAc,QAAQ,QAAQ,CAAC,GAAG,YAAY;AAC7D,mBAAa,cAAc,QAAQ,QAAQ,CAAC,GAAG,UAAU;AACzD,qBAAe,cAAc,QAAQ,QAAQ,CAAC,GAAG,YAAY;AAE7D,UAAI,QAAQ,WAAW,EAAG;AAC1B,mBAAa,cAAc,QAAQ,QAAQ,CAAC,GAAG,UAAU;AAAA,IAC3D;AAAA,EACF;AAEA,SAAO,OAAO,MAAM;AACtB;", - "names": [] -} diff --git a/node_modules/@jridgewell/sourcemap-codec/package.json b/node_modules/@jridgewell/sourcemap-codec/package.json deleted file mode 100644 index da55137..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "@jridgewell/sourcemap-codec", - "version": "1.5.5", - "description": "Encode/decode sourcemap mappings", - "keywords": [ - "sourcemap", - "vlq" - ], - "main": "dist/sourcemap-codec.umd.js", - "module": "dist/sourcemap-codec.mjs", - "types": "types/sourcemap-codec.d.cts", - "files": [ - "dist", - "src", - "types" - ], - "exports": { - ".": [ - { - "import": { - "types": "./types/sourcemap-codec.d.mts", - "default": "./dist/sourcemap-codec.mjs" - }, - "default": { - "types": "./types/sourcemap-codec.d.cts", - "default": "./dist/sourcemap-codec.umd.js" - } - }, - "./dist/sourcemap-codec.umd.js" - ], - "./package.json": "./package.json" - }, - "scripts": { - "benchmark": "run-s build:code benchmark:*", - "benchmark:install": "cd benchmark && npm install", - "benchmark:only": "node --expose-gc benchmark/index.js", - "build": "run-s -n build:code build:types", - "build:code": "node ../../esbuild.mjs sourcemap-codec.ts", - "build:types": "run-s build:types:force build:types:emit build:types:mts", - "build:types:force": "rimraf tsconfig.build.tsbuildinfo", - "build:types:emit": "tsc --project tsconfig.build.json", - "build:types:mts": "node ../../mts-types.mjs", - "clean": "run-s -n clean:code clean:types", - "clean:code": "tsc --build --clean tsconfig.build.json", - "clean:types": "rimraf dist types", - "test": "run-s -n test:types test:only test:format", - "test:format": "prettier --check '{src,test}/**/*.ts'", - "test:only": "mocha", - "test:types": "eslint '{src,test}/**/*.ts'", - "lint": "run-s -n lint:types lint:format", - "lint:format": "npm run test:format -- --write", - "lint:types": "npm run test:types -- --fix", - "prepublishOnly": "npm run-s -n build test" - }, - "homepage": "https://github.com/jridgewell/sourcemaps/tree/main/packages/sourcemap-codec", - "repository": { - "type": "git", - "url": "git+https://github.com/jridgewell/sourcemaps.git", - "directory": "packages/sourcemap-codec" - }, - "author": "Justin Ridgewell ", - "license": "MIT" -} diff --git a/node_modules/@jridgewell/sourcemap-codec/src/scopes.ts b/node_modules/@jridgewell/sourcemap-codec/src/scopes.ts deleted file mode 100644 index d194c2f..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/src/scopes.ts +++ /dev/null @@ -1,345 +0,0 @@ -import { StringReader, StringWriter } from './strings'; -import { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq'; - -const EMPTY: any[] = []; - -type Line = number; -type Column = number; -type Kind = number; -type Name = number; -type Var = number; -type SourcesIndex = number; -type ScopesIndex = number; - -type Mix = (A & O) | (B & O); - -export type OriginalScope = Mix< - [Line, Column, Line, Column, Kind], - [Line, Column, Line, Column, Kind, Name], - { vars: Var[] } ->; - -export type GeneratedRange = Mix< - [Line, Column, Line, Column], - [Line, Column, Line, Column, SourcesIndex, ScopesIndex], - { - callsite: CallSite | null; - bindings: Binding[]; - isScope: boolean; - } ->; -export type CallSite = [SourcesIndex, Line, Column]; -type Binding = BindingExpressionRange[]; -export type BindingExpressionRange = [Name] | [Name, Line, Column]; - -export function decodeOriginalScopes(input: string): OriginalScope[] { - const { length } = input; - const reader = new StringReader(input); - const scopes: OriginalScope[] = []; - const stack: OriginalScope[] = []; - let line = 0; - - for (; reader.pos < length; reader.pos++) { - line = decodeInteger(reader, line); - const column = decodeInteger(reader, 0); - - if (!hasMoreVlq(reader, length)) { - const last = stack.pop()!; - last[2] = line; - last[3] = column; - continue; - } - - const kind = decodeInteger(reader, 0); - const fields = decodeInteger(reader, 0); - const hasName = fields & 0b0001; - - const scope: OriginalScope = ( - hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind] - ) as OriginalScope; - - let vars: Var[] = EMPTY; - if (hasMoreVlq(reader, length)) { - vars = []; - do { - const varsIndex = decodeInteger(reader, 0); - vars.push(varsIndex); - } while (hasMoreVlq(reader, length)); - } - scope.vars = vars; - - scopes.push(scope); - stack.push(scope); - } - - return scopes; -} - -export function encodeOriginalScopes(scopes: OriginalScope[]): string { - const writer = new StringWriter(); - - for (let i = 0; i < scopes.length; ) { - i = _encodeOriginalScopes(scopes, i, writer, [0]); - } - - return writer.flush(); -} - -function _encodeOriginalScopes( - scopes: OriginalScope[], - index: number, - writer: StringWriter, - state: [ - number, // GenColumn - ], -): number { - const scope = scopes[index]; - const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope; - - if (index > 0) writer.write(comma); - - state[0] = encodeInteger(writer, startLine, state[0]); - encodeInteger(writer, startColumn, 0); - encodeInteger(writer, kind, 0); - - const fields = scope.length === 6 ? 0b0001 : 0; - encodeInteger(writer, fields, 0); - if (scope.length === 6) encodeInteger(writer, scope[5], 0); - - for (const v of vars) { - encodeInteger(writer, v, 0); - } - - for (index++; index < scopes.length; ) { - const next = scopes[index]; - const { 0: l, 1: c } = next; - if (l > endLine || (l === endLine && c >= endColumn)) { - break; - } - index = _encodeOriginalScopes(scopes, index, writer, state); - } - - writer.write(comma); - state[0] = encodeInteger(writer, endLine, state[0]); - encodeInteger(writer, endColumn, 0); - - return index; -} - -export function decodeGeneratedRanges(input: string): GeneratedRange[] { - const { length } = input; - const reader = new StringReader(input); - const ranges: GeneratedRange[] = []; - const stack: GeneratedRange[] = []; - - let genLine = 0; - let definitionSourcesIndex = 0; - let definitionScopeIndex = 0; - let callsiteSourcesIndex = 0; - let callsiteLine = 0; - let callsiteColumn = 0; - let bindingLine = 0; - let bindingColumn = 0; - - do { - const semi = reader.indexOf(';'); - let genColumn = 0; - - for (; reader.pos < semi; reader.pos++) { - genColumn = decodeInteger(reader, genColumn); - - if (!hasMoreVlq(reader, semi)) { - const last = stack.pop()!; - last[2] = genLine; - last[3] = genColumn; - continue; - } - - const fields = decodeInteger(reader, 0); - const hasDefinition = fields & 0b0001; - const hasCallsite = fields & 0b0010; - const hasScope = fields & 0b0100; - - let callsite: CallSite | null = null; - let bindings: Binding[] = EMPTY; - let range: GeneratedRange; - if (hasDefinition) { - const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex); - definitionScopeIndex = decodeInteger( - reader, - definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0, - ); - - definitionSourcesIndex = defSourcesIndex; - range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex] as GeneratedRange; - } else { - range = [genLine, genColumn, 0, 0] as GeneratedRange; - } - - range.isScope = !!hasScope; - - if (hasCallsite) { - const prevCsi = callsiteSourcesIndex; - const prevLine = callsiteLine; - callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex); - const sameSource = prevCsi === callsiteSourcesIndex; - callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0); - callsiteColumn = decodeInteger( - reader, - sameSource && prevLine === callsiteLine ? callsiteColumn : 0, - ); - - callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn]; - } - range.callsite = callsite; - - if (hasMoreVlq(reader, semi)) { - bindings = []; - do { - bindingLine = genLine; - bindingColumn = genColumn; - const expressionsCount = decodeInteger(reader, 0); - let expressionRanges: BindingExpressionRange[]; - if (expressionsCount < -1) { - expressionRanges = [[decodeInteger(reader, 0)]]; - for (let i = -1; i > expressionsCount; i--) { - const prevBl = bindingLine; - bindingLine = decodeInteger(reader, bindingLine); - bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0); - const expression = decodeInteger(reader, 0); - expressionRanges.push([expression, bindingLine, bindingColumn]); - } - } else { - expressionRanges = [[expressionsCount]]; - } - bindings.push(expressionRanges); - } while (hasMoreVlq(reader, semi)); - } - range.bindings = bindings; - - ranges.push(range); - stack.push(range); - } - - genLine++; - reader.pos = semi + 1; - } while (reader.pos < length); - - return ranges; -} - -export function encodeGeneratedRanges(ranges: GeneratedRange[]): string { - if (ranges.length === 0) return ''; - - const writer = new StringWriter(); - - for (let i = 0; i < ranges.length; ) { - i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]); - } - - return writer.flush(); -} - -function _encodeGeneratedRanges( - ranges: GeneratedRange[], - index: number, - writer: StringWriter, - state: [ - number, // GenLine - number, // GenColumn - number, // DefSourcesIndex - number, // DefScopesIndex - number, // CallSourcesIndex - number, // CallLine - number, // CallColumn - ], -): number { - const range = ranges[index]; - const { - 0: startLine, - 1: startColumn, - 2: endLine, - 3: endColumn, - isScope, - callsite, - bindings, - } = range; - - if (state[0] < startLine) { - catchupLine(writer, state[0], startLine); - state[0] = startLine; - state[1] = 0; - } else if (index > 0) { - writer.write(comma); - } - - state[1] = encodeInteger(writer, range[1], state[1]); - - const fields = - (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0); - encodeInteger(writer, fields, 0); - - if (range.length === 6) { - const { 4: sourcesIndex, 5: scopesIndex } = range; - if (sourcesIndex !== state[2]) { - state[3] = 0; - } - state[2] = encodeInteger(writer, sourcesIndex, state[2]); - state[3] = encodeInteger(writer, scopesIndex, state[3]); - } - - if (callsite) { - const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite!; - if (sourcesIndex !== state[4]) { - state[5] = 0; - state[6] = 0; - } else if (callLine !== state[5]) { - state[6] = 0; - } - state[4] = encodeInteger(writer, sourcesIndex, state[4]); - state[5] = encodeInteger(writer, callLine, state[5]); - state[6] = encodeInteger(writer, callColumn, state[6]); - } - - if (bindings) { - for (const binding of bindings) { - if (binding.length > 1) encodeInteger(writer, -binding.length, 0); - const expression = binding[0][0]; - encodeInteger(writer, expression, 0); - let bindingStartLine = startLine; - let bindingStartColumn = startColumn; - for (let i = 1; i < binding.length; i++) { - const expRange = binding[i]; - bindingStartLine = encodeInteger(writer, expRange[1]!, bindingStartLine); - bindingStartColumn = encodeInteger(writer, expRange[2]!, bindingStartColumn); - encodeInteger(writer, expRange[0]!, 0); - } - } - } - - for (index++; index < ranges.length; ) { - const next = ranges[index]; - const { 0: l, 1: c } = next; - if (l > endLine || (l === endLine && c >= endColumn)) { - break; - } - index = _encodeGeneratedRanges(ranges, index, writer, state); - } - - if (state[0] < endLine) { - catchupLine(writer, state[0], endLine); - state[0] = endLine; - state[1] = 0; - } else { - writer.write(comma); - } - state[1] = encodeInteger(writer, endColumn, state[1]); - - return index; -} - -function catchupLine(writer: StringWriter, lastLine: number, line: number) { - do { - writer.write(semicolon); - } while (++lastLine < line); -} diff --git a/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts b/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts deleted file mode 100644 index a81f894..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq'; -import { StringWriter, StringReader } from './strings'; - -export { - decodeOriginalScopes, - encodeOriginalScopes, - decodeGeneratedRanges, - encodeGeneratedRanges, -} from './scopes'; -export type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes'; - -export type SourceMapSegment = - | [number] - | [number, number, number, number] - | [number, number, number, number, number]; -export type SourceMapLine = SourceMapSegment[]; -export type SourceMapMappings = SourceMapLine[]; - -export function decode(mappings: string): SourceMapMappings { - const { length } = mappings; - const reader = new StringReader(mappings); - const decoded: SourceMapMappings = []; - let genColumn = 0; - let sourcesIndex = 0; - let sourceLine = 0; - let sourceColumn = 0; - let namesIndex = 0; - - do { - const semi = reader.indexOf(';'); - const line: SourceMapLine = []; - let sorted = true; - let lastCol = 0; - genColumn = 0; - - while (reader.pos < semi) { - let seg: SourceMapSegment; - - genColumn = decodeInteger(reader, genColumn); - if (genColumn < lastCol) sorted = false; - lastCol = genColumn; - - if (hasMoreVlq(reader, semi)) { - sourcesIndex = decodeInteger(reader, sourcesIndex); - sourceLine = decodeInteger(reader, sourceLine); - sourceColumn = decodeInteger(reader, sourceColumn); - - if (hasMoreVlq(reader, semi)) { - namesIndex = decodeInteger(reader, namesIndex); - seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]; - } else { - seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]; - } - } else { - seg = [genColumn]; - } - - line.push(seg); - reader.pos++; - } - - if (!sorted) sort(line); - decoded.push(line); - reader.pos = semi + 1; - } while (reader.pos <= length); - - return decoded; -} - -function sort(line: SourceMapSegment[]) { - line.sort(sortComparator); -} - -function sortComparator(a: SourceMapSegment, b: SourceMapSegment): number { - return a[0] - b[0]; -} - -export function encode(decoded: SourceMapMappings): string; -export function encode(decoded: Readonly): string; -export function encode(decoded: Readonly): string { - const writer = new StringWriter(); - let sourcesIndex = 0; - let sourceLine = 0; - let sourceColumn = 0; - let namesIndex = 0; - - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - if (i > 0) writer.write(semicolon); - if (line.length === 0) continue; - - let genColumn = 0; - - for (let j = 0; j < line.length; j++) { - const segment = line[j]; - if (j > 0) writer.write(comma); - - genColumn = encodeInteger(writer, segment[0], genColumn); - - if (segment.length === 1) continue; - sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); - sourceLine = encodeInteger(writer, segment[2], sourceLine); - sourceColumn = encodeInteger(writer, segment[3], sourceColumn); - - if (segment.length === 4) continue; - namesIndex = encodeInteger(writer, segment[4], namesIndex); - } - } - - return writer.flush(); -} diff --git a/node_modules/@jridgewell/sourcemap-codec/src/strings.ts b/node_modules/@jridgewell/sourcemap-codec/src/strings.ts deleted file mode 100644 index d161965..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/src/strings.ts +++ /dev/null @@ -1,65 +0,0 @@ -const bufLength = 1024 * 16; - -// Provide a fallback for older environments. -const td = - typeof TextDecoder !== 'undefined' - ? /* #__PURE__ */ new TextDecoder() - : typeof Buffer !== 'undefined' - ? { - decode(buf: Uint8Array): string { - const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); - return out.toString(); - }, - } - : { - decode(buf: Uint8Array): string { - let out = ''; - for (let i = 0; i < buf.length; i++) { - out += String.fromCharCode(buf[i]); - } - return out; - }, - }; - -export class StringWriter { - pos = 0; - private out = ''; - private buffer = new Uint8Array(bufLength); - - write(v: number): void { - const { buffer } = this; - buffer[this.pos++] = v; - if (this.pos === bufLength) { - this.out += td.decode(buffer); - this.pos = 0; - } - } - - flush(): string { - const { buffer, out, pos } = this; - return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; - } -} - -export class StringReader { - pos = 0; - declare private buffer: string; - - constructor(buffer: string) { - this.buffer = buffer; - } - - next(): number { - return this.buffer.charCodeAt(this.pos++); - } - - peek(): number { - return this.buffer.charCodeAt(this.pos); - } - - indexOf(char: string): number { - const { buffer, pos } = this; - const idx = buffer.indexOf(char, pos); - return idx === -1 ? buffer.length : idx; - } -} diff --git a/node_modules/@jridgewell/sourcemap-codec/src/vlq.ts b/node_modules/@jridgewell/sourcemap-codec/src/vlq.ts deleted file mode 100644 index a42c681..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/src/vlq.ts +++ /dev/null @@ -1,55 +0,0 @@ -import type { StringReader, StringWriter } from './strings'; - -export const comma = ','.charCodeAt(0); -export const semicolon = ';'.charCodeAt(0); - -const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; -const intToChar = new Uint8Array(64); // 64 possible chars. -const charToInt = new Uint8Array(128); // z is 122 in ASCII - -for (let i = 0; i < chars.length; i++) { - const c = chars.charCodeAt(i); - intToChar[i] = c; - charToInt[c] = i; -} - -export function decodeInteger(reader: StringReader, relative: number): number { - let value = 0; - let shift = 0; - let integer = 0; - - do { - const c = reader.next(); - integer = charToInt[c]; - value |= (integer & 31) << shift; - shift += 5; - } while (integer & 32); - - const shouldNegate = value & 1; - value >>>= 1; - - if (shouldNegate) { - value = -0x80000000 | -value; - } - - return relative + value; -} - -export function encodeInteger(builder: StringWriter, num: number, relative: number): number { - let delta = num - relative; - - delta = delta < 0 ? (-delta << 1) | 1 : delta << 1; - do { - let clamped = delta & 0b011111; - delta >>>= 5; - if (delta > 0) clamped |= 0b100000; - builder.write(intToChar[clamped]); - } while (delta > 0); - - return num; -} - -export function hasMoreVlq(reader: StringReader, max: number) { - if (reader.pos >= max) return false; - return reader.peek() !== comma; -} diff --git a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts deleted file mode 100644 index c583c75..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts +++ /dev/null @@ -1,50 +0,0 @@ -type Line = number; -type Column = number; -type Kind = number; -type Name = number; -type Var = number; -type SourcesIndex = number; -type ScopesIndex = number; -type Mix = (A & O) | (B & O); -export type OriginalScope = Mix<[ - Line, - Column, - Line, - Column, - Kind -], [ - Line, - Column, - Line, - Column, - Kind, - Name -], { - vars: Var[]; -}>; -export type GeneratedRange = Mix<[ - Line, - Column, - Line, - Column -], [ - Line, - Column, - Line, - Column, - SourcesIndex, - ScopesIndex -], { - callsite: CallSite | null; - bindings: Binding[]; - isScope: boolean; -}>; -export type CallSite = [SourcesIndex, Line, Column]; -type Binding = BindingExpressionRange[]; -export type BindingExpressionRange = [Name] | [Name, Line, Column]; -export declare function decodeOriginalScopes(input: string): OriginalScope[]; -export declare function encodeOriginalScopes(scopes: OriginalScope[]): string; -export declare function decodeGeneratedRanges(input: string): GeneratedRange[]; -export declare function encodeGeneratedRanges(ranges: GeneratedRange[]): string; -export {}; -//# sourceMappingURL=scopes.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts.map b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts.map deleted file mode 100644 index 630e647..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../src/scopes.ts"],"names":[],"mappings":"AAKA,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,MAAM,GAAG,MAAM,CAAC;AACrB,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,GAAG,GAAG,MAAM,CAAC;AAClB,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,WAAW,GAAG,MAAM,CAAC;AAE1B,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAEtC,MAAM,MAAM,aAAa,GAAG,GAAG,CAC7B;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;IAAE,IAAI;CAAC,EAClC;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,IAAI;CAAC,EACxC;IAAE,IAAI,EAAE,GAAG,EAAE,CAAA;CAAE,CAChB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,GAAG,CAC9B;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;CAAC,EAC5B;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;IAAE,YAAY;IAAE,WAAW;CAAC,EACvD;IACE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;CAClB,CACF,CAAC;AACF,MAAM,MAAM,QAAQ,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AACpD,KAAK,OAAO,GAAG,sBAAsB,EAAE,CAAC;AACxC,MAAM,MAAM,sBAAsB,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAEnE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,EAAE,CAyCnE;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CAQpE;AA2CD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,EAAE,CAoGrE;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAUtE"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts deleted file mode 100644 index c583c75..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts +++ /dev/null @@ -1,50 +0,0 @@ -type Line = number; -type Column = number; -type Kind = number; -type Name = number; -type Var = number; -type SourcesIndex = number; -type ScopesIndex = number; -type Mix = (A & O) | (B & O); -export type OriginalScope = Mix<[ - Line, - Column, - Line, - Column, - Kind -], [ - Line, - Column, - Line, - Column, - Kind, - Name -], { - vars: Var[]; -}>; -export type GeneratedRange = Mix<[ - Line, - Column, - Line, - Column -], [ - Line, - Column, - Line, - Column, - SourcesIndex, - ScopesIndex -], { - callsite: CallSite | null; - bindings: Binding[]; - isScope: boolean; -}>; -export type CallSite = [SourcesIndex, Line, Column]; -type Binding = BindingExpressionRange[]; -export type BindingExpressionRange = [Name] | [Name, Line, Column]; -export declare function decodeOriginalScopes(input: string): OriginalScope[]; -export declare function encodeOriginalScopes(scopes: OriginalScope[]): string; -export declare function decodeGeneratedRanges(input: string): GeneratedRange[]; -export declare function encodeGeneratedRanges(ranges: GeneratedRange[]): string; -export {}; -//# sourceMappingURL=scopes.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts.map b/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts.map deleted file mode 100644 index 630e647..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../src/scopes.ts"],"names":[],"mappings":"AAKA,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,MAAM,GAAG,MAAM,CAAC;AACrB,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,GAAG,GAAG,MAAM,CAAC;AAClB,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,WAAW,GAAG,MAAM,CAAC;AAE1B,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAEtC,MAAM,MAAM,aAAa,GAAG,GAAG,CAC7B;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;IAAE,IAAI;CAAC,EAClC;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,IAAI;CAAC,EACxC;IAAE,IAAI,EAAE,GAAG,EAAE,CAAA;CAAE,CAChB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,GAAG,CAC9B;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;CAAC,EAC5B;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;IAAE,YAAY;IAAE,WAAW;CAAC,EACvD;IACE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;CAClB,CACF,CAAC;AACF,MAAM,MAAM,QAAQ,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AACpD,KAAK,OAAO,GAAG,sBAAsB,EAAE,CAAC;AACxC,MAAM,MAAM,sBAAsB,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAEnE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,EAAE,CAyCnE;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CAQpE;AA2CD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,EAAE,CAoGrE;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAUtE"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts deleted file mode 100644 index 5f35e22..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts +++ /dev/null @@ -1,9 +0,0 @@ -export { decodeOriginalScopes, encodeOriginalScopes, decodeGeneratedRanges, encodeGeneratedRanges, } from './scopes.cts'; -export type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes.cts'; -export type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number]; -export type SourceMapLine = SourceMapSegment[]; -export type SourceMapMappings = SourceMapLine[]; -export declare function decode(mappings: string): SourceMapMappings; -export declare function encode(decoded: SourceMapMappings): string; -export declare function encode(decoded: Readonly): string; -//# sourceMappingURL=sourcemap-codec.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts.map b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts.map deleted file mode 100644 index 7123d52..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sourcemap-codec.d.ts","sourceRoot":"","sources":["../src/sourcemap-codec.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEhG,MAAM,MAAM,gBAAgB,GACxB,CAAC,MAAM,CAAC,GACR,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAChC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC7C,MAAM,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;AAC/C,MAAM,MAAM,iBAAiB,GAAG,aAAa,EAAE,CAAC;AAEhD,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAiD1D;AAUD,wBAAgB,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAAC;AAC3D,wBAAgB,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts deleted file mode 100644 index 199fb9f..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts +++ /dev/null @@ -1,9 +0,0 @@ -export { decodeOriginalScopes, encodeOriginalScopes, decodeGeneratedRanges, encodeGeneratedRanges, } from './scopes.mts'; -export type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes.mts'; -export type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number]; -export type SourceMapLine = SourceMapSegment[]; -export type SourceMapMappings = SourceMapLine[]; -export declare function decode(mappings: string): SourceMapMappings; -export declare function encode(decoded: SourceMapMappings): string; -export declare function encode(decoded: Readonly): string; -//# sourceMappingURL=sourcemap-codec.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts.map b/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts.map deleted file mode 100644 index 7123d52..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sourcemap-codec.d.ts","sourceRoot":"","sources":["../src/sourcemap-codec.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEhG,MAAM,MAAM,gBAAgB,GACxB,CAAC,MAAM,CAAC,GACR,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAChC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC7C,MAAM,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;AAC/C,MAAM,MAAM,iBAAiB,GAAG,aAAa,EAAE,CAAC;AAEhD,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAiD1D;AAUD,wBAAgB,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAAC;AAC3D,wBAAgB,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts deleted file mode 100644 index 62faceb..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts +++ /dev/null @@ -1,16 +0,0 @@ -export declare class StringWriter { - pos: number; - private out; - private buffer; - write(v: number): void; - flush(): string; -} -export declare class StringReader { - pos: number; - private buffer; - constructor(buffer: string); - next(): number; - peek(): number; - indexOf(char: string): number; -} -//# sourceMappingURL=strings.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts.map b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts.map deleted file mode 100644 index d3602da..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../src/strings.ts"],"names":[],"mappings":"AAuBA,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,MAAM,CAA6B;IAE3C,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAStB,KAAK,IAAI,MAAM;CAIhB;AAED,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,QAAgB,MAAM,CAAS;gBAEnB,MAAM,EAAE,MAAM;IAI1B,IAAI,IAAI,MAAM;IAId,IAAI,IAAI,MAAM;IAId,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAK9B"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts deleted file mode 100644 index 62faceb..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts +++ /dev/null @@ -1,16 +0,0 @@ -export declare class StringWriter { - pos: number; - private out; - private buffer; - write(v: number): void; - flush(): string; -} -export declare class StringReader { - pos: number; - private buffer; - constructor(buffer: string); - next(): number; - peek(): number; - indexOf(char: string): number; -} -//# sourceMappingURL=strings.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts.map b/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts.map deleted file mode 100644 index d3602da..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../src/strings.ts"],"names":[],"mappings":"AAuBA,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,MAAM,CAA6B;IAE3C,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAStB,KAAK,IAAI,MAAM;CAIhB;AAED,qBAAa,YAAY;IACvB,GAAG,SAAK;IACR,QAAgB,MAAM,CAAS;gBAEnB,MAAM,EAAE,MAAM;IAI1B,IAAI,IAAI,MAAM;IAId,IAAI,IAAI,MAAM;IAId,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAK9B"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts deleted file mode 100644 index dbd6602..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts +++ /dev/null @@ -1,7 +0,0 @@ -import type { StringReader, StringWriter } from './strings.cts'; -export declare const comma: number; -export declare const semicolon: number; -export declare function decodeInteger(reader: StringReader, relative: number): number; -export declare function encodeInteger(builder: StringWriter, num: number, relative: number): number; -export declare function hasMoreVlq(reader: StringReader, max: number): boolean; -//# sourceMappingURL=vlq.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts.map b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts.map deleted file mode 100644 index 6fdc356..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"vlq.d.ts","sourceRoot":"","sources":["../src/vlq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE5D,eAAO,MAAM,KAAK,QAAoB,CAAC;AACvC,eAAO,MAAM,SAAS,QAAoB,CAAC;AAY3C,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAoB5E;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAY1F;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,WAG3D"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts deleted file mode 100644 index 2c739bc..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts +++ /dev/null @@ -1,7 +0,0 @@ -import type { StringReader, StringWriter } from './strings.mts'; -export declare const comma: number; -export declare const semicolon: number; -export declare function decodeInteger(reader: StringReader, relative: number): number; -export declare function encodeInteger(builder: StringWriter, num: number, relative: number): number; -export declare function hasMoreVlq(reader: StringReader, max: number): boolean; -//# sourceMappingURL=vlq.d.ts.map \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts.map b/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts.map deleted file mode 100644 index 6fdc356..0000000 --- a/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"vlq.d.ts","sourceRoot":"","sources":["../src/vlq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE5D,eAAO,MAAM,KAAK,QAAoB,CAAC;AACvC,eAAO,MAAM,SAAS,QAAoB,CAAC;AAY3C,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAoB5E;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAY1F;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,WAG3D"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/LICENSE b/node_modules/@jridgewell/trace-mapping/LICENSE deleted file mode 100644 index 37bb488..0000000 --- a/node_modules/@jridgewell/trace-mapping/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2022 Justin Ridgewell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@jridgewell/trace-mapping/README.md b/node_modules/@jridgewell/trace-mapping/README.md deleted file mode 100644 index 8286cee..0000000 --- a/node_modules/@jridgewell/trace-mapping/README.md +++ /dev/null @@ -1,193 +0,0 @@ -# @jridgewell/trace-mapping - -> Trace the original position through a source map - -`trace-mapping` allows you to take the line and column of an output file and trace it to the -original location in the source file through a source map. - -You may already be familiar with the [`source-map`][source-map] package's `SourceMapConsumer`. This -provides the same `originalPositionFor` and `generatedPositionFor` API, without requiring WASM. - -## Installation - -```sh -npm install @jridgewell/trace-mapping -``` - -## Usage - -```typescript -import { TraceMap, originalPositionFor, generatedPositionFor } from '@jridgewell/trace-mapping'; - -const tracer = new TraceMap({ - version: 3, - sources: ['input.js'], - names: ['foo'], - mappings: 'KAyCIA', -}); - -// Lines start at line 1, columns at column 0. -const traced = originalPositionFor(tracer, { line: 1, column: 5 }); -assert.deepEqual(traced, { - source: 'input.js', - line: 42, - column: 4, - name: 'foo', -}); - -const generated = generatedPositionFor(tracer, { - source: 'input.js', - line: 42, - column: 4, -}); -assert.deepEqual(generated, { - line: 1, - column: 5, -}); -``` - -We also provide a lower level API to get the actual segment that matches our line and column. Unlike -`originalPositionFor`, `traceSegment` uses a 0-base for `line`: - -```typescript -import { traceSegment } from '@jridgewell/trace-mapping'; - -// line is 0-base. -const traced = traceSegment(tracer, /* line */ 0, /* column */ 5); - -// Segments are [outputColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] -// Again, line is 0-base and so is sourceLine -assert.deepEqual(traced, [5, 0, 41, 4, 0]); -``` - -### SectionedSourceMaps - -The sourcemap spec defines a special `sections` field that's designed to handle concatenation of -output code with associated sourcemaps. This type of sourcemap is rarely used (no major build tool -produces it), but if you are hand coding a concatenation you may need it. We provide an `AnyMap` -helper that can receive either a regular sourcemap or a `SectionedSourceMap` and returns a -`TraceMap` instance: - -```typescript -import { AnyMap } from '@jridgewell/trace-mapping'; -const fooOutput = 'foo'; -const barOutput = 'bar'; -const output = [fooOutput, barOutput].join('\n'); - -const sectioned = new AnyMap({ - version: 3, - sections: [ - { - // 0-base line and column - offset: { line: 0, column: 0 }, - // fooOutput's sourcemap - map: { - version: 3, - sources: ['foo.js'], - names: ['foo'], - mappings: 'AAAAA', - }, - }, - { - // barOutput's sourcemap will not affect the first line, only the second - offset: { line: 1, column: 0 }, - map: { - version: 3, - sources: ['bar.js'], - names: ['bar'], - mappings: 'AAAAA', - }, - }, - ], -}); - -const traced = originalPositionFor(sectioned, { - line: 2, - column: 0, -}); - -assert.deepEqual(traced, { - source: 'bar.js', - line: 1, - column: 0, - name: 'bar', -}); -``` - -## Benchmarks - -``` -node v18.0.0 - -amp.js.map -trace-mapping: decoded JSON input x 183 ops/sec ±0.41% (87 runs sampled) -trace-mapping: encoded JSON input x 384 ops/sec ±0.89% (89 runs sampled) -trace-mapping: decoded Object input x 3,085 ops/sec ±0.24% (100 runs sampled) -trace-mapping: encoded Object input x 452 ops/sec ±0.80% (84 runs sampled) -source-map-js: encoded Object input x 88.82 ops/sec ±0.45% (77 runs sampled) -source-map-0.6.1: encoded Object input x 38.39 ops/sec ±1.88% (52 runs sampled) -Fastest is trace-mapping: decoded Object input - -trace-mapping: decoded originalPositionFor x 4,025,347 ops/sec ±0.15% (97 runs sampled) -trace-mapping: encoded originalPositionFor x 3,333,136 ops/sec ±1.26% (90 runs sampled) -source-map-js: encoded originalPositionFor x 824,978 ops/sec ±1.06% (94 runs sampled) -source-map-0.6.1: encoded originalPositionFor x 741,300 ops/sec ±0.93% (92 runs sampled) -source-map-0.8.0: encoded originalPositionFor x 2,587,603 ops/sec ±0.75% (97 runs sampled) -Fastest is trace-mapping: decoded originalPositionFor - -*** - -babel.min.js.map -trace-mapping: decoded JSON input x 17.43 ops/sec ±8.81% (33 runs sampled) -trace-mapping: encoded JSON input x 34.18 ops/sec ±4.67% (50 runs sampled) -trace-mapping: decoded Object input x 1,010 ops/sec ±0.41% (98 runs sampled) -trace-mapping: encoded Object input x 39.45 ops/sec ±4.01% (52 runs sampled) -source-map-js: encoded Object input x 6.57 ops/sec ±3.04% (21 runs sampled) -source-map-0.6.1: encoded Object input x 4.23 ops/sec ±2.93% (15 runs sampled) -Fastest is trace-mapping: decoded Object input - -trace-mapping: decoded originalPositionFor x 7,576,265 ops/sec ±0.74% (96 runs sampled) -trace-mapping: encoded originalPositionFor x 5,019,743 ops/sec ±0.74% (94 runs sampled) -source-map-js: encoded originalPositionFor x 3,396,137 ops/sec ±42.32% (95 runs sampled) -source-map-0.6.1: encoded originalPositionFor x 3,753,176 ops/sec ±0.72% (95 runs sampled) -source-map-0.8.0: encoded originalPositionFor x 6,423,633 ops/sec ±0.74% (95 runs sampled) -Fastest is trace-mapping: decoded originalPositionFor - -*** - -preact.js.map -trace-mapping: decoded JSON input x 3,499 ops/sec ±0.18% (98 runs sampled) -trace-mapping: encoded JSON input x 6,078 ops/sec ±0.25% (99 runs sampled) -trace-mapping: decoded Object input x 254,788 ops/sec ±0.13% (100 runs sampled) -trace-mapping: encoded Object input x 14,063 ops/sec ±0.27% (94 runs sampled) -source-map-js: encoded Object input x 2,465 ops/sec ±0.25% (98 runs sampled) -source-map-0.6.1: encoded Object input x 1,174 ops/sec ±1.90% (95 runs sampled) -Fastest is trace-mapping: decoded Object input - -trace-mapping: decoded originalPositionFor x 7,720,171 ops/sec ±0.14% (97 runs sampled) -trace-mapping: encoded originalPositionFor x 6,864,485 ops/sec ±0.16% (101 runs sampled) -source-map-js: encoded originalPositionFor x 2,387,219 ops/sec ±0.28% (98 runs sampled) -source-map-0.6.1: encoded originalPositionFor x 1,565,339 ops/sec ±0.32% (101 runs sampled) -source-map-0.8.0: encoded originalPositionFor x 3,819,732 ops/sec ±0.38% (98 runs sampled) -Fastest is trace-mapping: decoded originalPositionFor - -*** - -react.js.map -trace-mapping: decoded JSON input x 1,719 ops/sec ±0.19% (99 runs sampled) -trace-mapping: encoded JSON input x 4,284 ops/sec ±0.51% (99 runs sampled) -trace-mapping: decoded Object input x 94,668 ops/sec ±0.08% (99 runs sampled) -trace-mapping: encoded Object input x 5,287 ops/sec ±0.24% (99 runs sampled) -source-map-js: encoded Object input x 814 ops/sec ±0.20% (98 runs sampled) -source-map-0.6.1: encoded Object input x 429 ops/sec ±0.24% (94 runs sampled) -Fastest is trace-mapping: decoded Object input - -trace-mapping: decoded originalPositionFor x 28,927,989 ops/sec ±0.61% (94 runs sampled) -trace-mapping: encoded originalPositionFor x 27,394,475 ops/sec ±0.55% (97 runs sampled) -source-map-js: encoded originalPositionFor x 16,856,730 ops/sec ±0.45% (96 runs sampled) -source-map-0.6.1: encoded originalPositionFor x 12,258,950 ops/sec ±0.41% (97 runs sampled) -source-map-0.8.0: encoded originalPositionFor x 22,272,990 ops/sec ±0.58% (95 runs sampled) -Fastest is trace-mapping: decoded originalPositionFor -``` - -[source-map]: https://www.npmjs.com/package/source-map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs deleted file mode 100644 index 8fce400..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs +++ /dev/null @@ -1,514 +0,0 @@ -import { encode, decode } from '@jridgewell/sourcemap-codec'; -import resolveUri from '@jridgewell/resolve-uri'; - -function resolve(input, base) { - // The base is always treated as a directory, if it's not empty. - // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327 - // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401 - if (base && !base.endsWith('/')) - base += '/'; - return resolveUri(input, base); -} - -/** - * Removes everything after the last "/", but leaves the slash. - */ -function stripFilename(path) { - if (!path) - return ''; - const index = path.lastIndexOf('/'); - return path.slice(0, index + 1); -} - -const COLUMN = 0; -const SOURCES_INDEX = 1; -const SOURCE_LINE = 2; -const SOURCE_COLUMN = 3; -const NAMES_INDEX = 4; -const REV_GENERATED_LINE = 1; -const REV_GENERATED_COLUMN = 2; - -function maybeSort(mappings, owned) { - const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); - if (unsortedIndex === mappings.length) - return mappings; - // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If - // not, we do not want to modify the consumer's input array. - if (!owned) - mappings = mappings.slice(); - for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { - mappings[i] = sortSegments(mappings[i], owned); - } - return mappings; -} -function nextUnsortedSegmentLine(mappings, start) { - for (let i = start; i < mappings.length; i++) { - if (!isSorted(mappings[i])) - return i; - } - return mappings.length; -} -function isSorted(line) { - for (let j = 1; j < line.length; j++) { - if (line[j][COLUMN] < line[j - 1][COLUMN]) { - return false; - } - } - return true; -} -function sortSegments(line, owned) { - if (!owned) - line = line.slice(); - return line.sort(sortComparator); -} -function sortComparator(a, b) { - return a[COLUMN] - b[COLUMN]; -} - -let found = false; -/** - * A binary search implementation that returns the index if a match is found. - * If no match is found, then the left-index (the index associated with the item that comes just - * before the desired index) is returned. To maintain proper sort order, a splice would happen at - * the next index: - * - * ```js - * const array = [1, 3]; - * const needle = 2; - * const index = binarySearch(array, needle, (item, needle) => item - needle); - * - * assert.equal(index, 0); - * array.splice(index + 1, 0, needle); - * assert.deepEqual(array, [1, 2, 3]); - * ``` - */ -function binarySearch(haystack, needle, low, high) { - while (low <= high) { - const mid = low + ((high - low) >> 1); - const cmp = haystack[mid][COLUMN] - needle; - if (cmp === 0) { - found = true; - return mid; - } - if (cmp < 0) { - low = mid + 1; - } - else { - high = mid - 1; - } - } - found = false; - return low - 1; -} -function upperBound(haystack, needle, index) { - for (let i = index + 1; i < haystack.length; i++, index++) { - if (haystack[i][COLUMN] !== needle) - break; - } - return index; -} -function lowerBound(haystack, needle, index) { - for (let i = index - 1; i >= 0; i--, index--) { - if (haystack[i][COLUMN] !== needle) - break; - } - return index; -} -function memoizedState() { - return { - lastKey: -1, - lastNeedle: -1, - lastIndex: -1, - }; -} -/** - * This overly complicated beast is just to record the last tested line/column and the resulting - * index, allowing us to skip a few tests if mappings are monotonically increasing. - */ -function memoizedBinarySearch(haystack, needle, state, key) { - const { lastKey, lastNeedle, lastIndex } = state; - let low = 0; - let high = haystack.length - 1; - if (key === lastKey) { - if (needle === lastNeedle) { - found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle; - return lastIndex; - } - if (needle >= lastNeedle) { - // lastIndex may be -1 if the previous needle was not found. - low = lastIndex === -1 ? 0 : lastIndex; - } - else { - high = lastIndex; - } - } - state.lastKey = key; - state.lastNeedle = needle; - return (state.lastIndex = binarySearch(haystack, needle, low, high)); -} - -// Rebuilds the original source files, with mappings that are ordered by source line/column instead -// of generated line/column. -function buildBySources(decoded, memos) { - const sources = memos.map(buildNullArray); - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - if (seg.length === 1) - continue; - const sourceIndex = seg[SOURCES_INDEX]; - const sourceLine = seg[SOURCE_LINE]; - const sourceColumn = seg[SOURCE_COLUMN]; - const originalSource = sources[sourceIndex]; - const originalLine = (originalSource[sourceLine] || (originalSource[sourceLine] = [])); - const memo = memos[sourceIndex]; - // The binary search either found a match, or it found the left-index just before where the - // segment should go. Either way, we want to insert after that. And there may be multiple - // generated segments associated with an original location, so there may need to move several - // indexes before we find where we need to insert. - const index = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine)); - insert(originalLine, (memo.lastIndex = index + 1), [sourceColumn, i, seg[COLUMN]]); - } - } - return sources; -} -function insert(array, index, value) { - for (let i = array.length; i > index; i--) { - array[i] = array[i - 1]; - } - array[index] = value; -} -// Null arrays allow us to use ordered index keys without actually allocating contiguous memory like -// a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations. -// Numeric properties on objects are magically sorted in ascending order by the engine regardless of -// the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending -// order when iterating with for-in. -function buildNullArray() { - return { __proto__: null }; -} - -const AnyMap = function (map, mapUrl) { - const parsed = typeof map === 'string' ? JSON.parse(map) : map; - if (!('sections' in parsed)) - return new TraceMap(parsed, mapUrl); - const mappings = []; - const sources = []; - const sourcesContent = []; - const names = []; - const { sections } = parsed; - let i = 0; - for (; i < sections.length - 1; i++) { - const no = sections[i + 1].offset; - addSection(sections[i], mapUrl, mappings, sources, sourcesContent, names, no.line, no.column); - } - if (sections.length > 0) { - addSection(sections[i], mapUrl, mappings, sources, sourcesContent, names, Infinity, Infinity); - } - const joined = { - version: 3, - file: parsed.file, - names, - sources, - sourcesContent, - mappings, - }; - return presortedDecodedMap(joined); -}; -function addSection(section, mapUrl, mappings, sources, sourcesContent, names, stopLine, stopColumn) { - const map = AnyMap(section.map, mapUrl); - const { line: lineOffset, column: columnOffset } = section.offset; - const sourcesOffset = sources.length; - const namesOffset = names.length; - const decoded = decodedMappings(map); - const { resolvedSources } = map; - append(sources, resolvedSources); - append(sourcesContent, map.sourcesContent || fillSourcesContent(resolvedSources.length)); - append(names, map.names); - // If this section jumps forwards several lines, we need to add lines to the output mappings catch up. - for (let i = mappings.length; i <= lineOffset; i++) - mappings.push([]); - // We can only add so many lines before we step into the range that the next section's map - // controls. When we get to the last line, then we'll start checking the segments to see if - // they've crossed into the column range. - const stopI = stopLine - lineOffset; - const len = Math.min(decoded.length, stopI + 1); - for (let i = 0; i < len; i++) { - const line = decoded[i]; - // On the 0th loop, the line will already exist due to a previous section, or the line catch up - // loop above. - const out = i === 0 ? mappings[lineOffset] : (mappings[lineOffset + i] = []); - // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the - // map can be multiple lines), it doesn't. - const cOffset = i === 0 ? columnOffset : 0; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - const column = cOffset + seg[COLUMN]; - // If this segment steps into the column range that the next section's map controls, we need - // to stop early. - if (i === stopI && column >= stopColumn) - break; - if (seg.length === 1) { - out.push([column]); - continue; - } - const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX]; - const sourceLine = seg[SOURCE_LINE]; - const sourceColumn = seg[SOURCE_COLUMN]; - if (seg.length === 4) { - out.push([column, sourcesIndex, sourceLine, sourceColumn]); - continue; - } - out.push([column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]); - } - } -} -function append(arr, other) { - for (let i = 0; i < other.length; i++) - arr.push(other[i]); -} -// Sourcemaps don't need to have sourcesContent, and if they don't, we need to create an array of -// equal length to the sources. This is because the sources and sourcesContent are paired arrays, -// where `sourcesContent[i]` is the content of the `sources[i]` file. If we didn't, then joined -// sourcemap would desynchronize the sources/contents. -function fillSourcesContent(len) { - const sourcesContent = []; - for (let i = 0; i < len; i++) - sourcesContent[i] = null; - return sourcesContent; -} - -const INVALID_ORIGINAL_MAPPING = Object.freeze({ - source: null, - line: null, - column: null, - name: null, -}); -const INVALID_GENERATED_MAPPING = Object.freeze({ - line: null, - column: null, -}); -const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)'; -const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)'; -const LEAST_UPPER_BOUND = -1; -const GREATEST_LOWER_BOUND = 1; -/** - * Returns the encoded (VLQ string) form of the SourceMap's mappings field. - */ -let encodedMappings; -/** - * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. - */ -let decodedMappings; -/** - * A low-level API to find the segment associated with a generated line/column (think, from a - * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. - */ -let traceSegment; -/** - * A higher-level API to find the source/line/column associated with a generated line/column - * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in - * `source-map` library. - */ -let originalPositionFor; -/** - * Finds the source/line/column directly after the mapping returned by originalPositionFor, provided - * the found mapping is from the same source and line as the originalPositionFor mapping. - * - * Eg, in the code `let id = 1`, `originalPositionAfter` could find the mapping associated with `1` - * using the same needle that would return `id` when calling `originalPositionFor`. - */ -let generatedPositionFor; -/** - * Iterates each mapping in generated position order. - */ -let eachMapping; -/** - * A helper that skips sorting of the input map's mappings array, which can be expensive for larger - * maps. - */ -let presortedDecodedMap; -/** - * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -let decodedMap; -/** - * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -let encodedMap; -class TraceMap { - constructor(map, mapUrl) { - this._decodedMemo = memoizedState(); - this._bySources = undefined; - this._bySourceMemos = undefined; - const isString = typeof map === 'string'; - if (!isString && map.constructor === TraceMap) - return map; - const parsed = (isString ? JSON.parse(map) : map); - const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; - this.version = version; - this.file = file; - this.names = names; - this.sourceRoot = sourceRoot; - this.sources = sources; - this.sourcesContent = sourcesContent; - if (sourceRoot || mapUrl) { - const from = resolve(sourceRoot || '', stripFilename(mapUrl)); - this.resolvedSources = sources.map((s) => resolve(s || '', from)); - } - else { - this.resolvedSources = sources.map((s) => s || ''); - } - const { mappings } = parsed; - if (typeof mappings === 'string') { - this._encoded = mappings; - this._decoded = undefined; - } - else { - this._encoded = undefined; - this._decoded = maybeSort(mappings, isString); - } - } -} -(() => { - encodedMappings = (map) => { - var _a; - return ((_a = map._encoded) !== null && _a !== void 0 ? _a : (map._encoded = encode(map._decoded))); - }; - decodedMappings = (map) => { - return (map._decoded || (map._decoded = decode(map._encoded))); - }; - traceSegment = (map, line, column) => { - const decoded = decodedMappings(map); - // It's common for parent source maps to have pointers to lines that have no - // mapping (like a "//# sourceMappingURL=") at the end of the child file. - if (line >= decoded.length) - return null; - return traceSegmentInternal(decoded[line], map._decodedMemo, line, column, GREATEST_LOWER_BOUND); - }; - originalPositionFor = (map, { line, column, bias }) => { - line--; - if (line < 0) - throw new Error(LINE_GTR_ZERO); - if (column < 0) - throw new Error(COL_GTR_EQ_ZERO); - const decoded = decodedMappings(map); - // It's common for parent source maps to have pointers to lines that have no - // mapping (like a "//# sourceMappingURL=") at the end of the child file. - if (line >= decoded.length) - return INVALID_ORIGINAL_MAPPING; - const segment = traceSegmentInternal(decoded[line], map._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND); - if (segment == null) - return INVALID_ORIGINAL_MAPPING; - if (segment.length == 1) - return INVALID_ORIGINAL_MAPPING; - const { names, resolvedSources } = map; - return { - source: resolvedSources[segment[SOURCES_INDEX]], - line: segment[SOURCE_LINE] + 1, - column: segment[SOURCE_COLUMN], - name: segment.length === 5 ? names[segment[NAMES_INDEX]] : null, - }; - }; - generatedPositionFor = (map, { source, line, column, bias }) => { - line--; - if (line < 0) - throw new Error(LINE_GTR_ZERO); - if (column < 0) - throw new Error(COL_GTR_EQ_ZERO); - const { sources, resolvedSources } = map; - let sourceIndex = sources.indexOf(source); - if (sourceIndex === -1) - sourceIndex = resolvedSources.indexOf(source); - if (sourceIndex === -1) - return INVALID_GENERATED_MAPPING; - const generated = (map._bySources || (map._bySources = buildBySources(decodedMappings(map), (map._bySourceMemos = sources.map(memoizedState))))); - const memos = map._bySourceMemos; - const segments = generated[sourceIndex][line]; - if (segments == null) - return INVALID_GENERATED_MAPPING; - const segment = traceSegmentInternal(segments, memos[sourceIndex], line, column, bias || GREATEST_LOWER_BOUND); - if (segment == null) - return INVALID_GENERATED_MAPPING; - return { - line: segment[REV_GENERATED_LINE] + 1, - column: segment[REV_GENERATED_COLUMN], - }; - }; - eachMapping = (map, cb) => { - const decoded = decodedMappings(map); - const { names, resolvedSources } = map; - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - const generatedLine = i + 1; - const generatedColumn = seg[0]; - let source = null; - let originalLine = null; - let originalColumn = null; - let name = null; - if (seg.length !== 1) { - source = resolvedSources[seg[1]]; - originalLine = seg[2] + 1; - originalColumn = seg[3]; - } - if (seg.length === 5) - name = names[seg[4]]; - cb({ - generatedLine, - generatedColumn, - source, - originalLine, - originalColumn, - name, - }); - } - } - }; - presortedDecodedMap = (map, mapUrl) => { - const clone = Object.assign({}, map); - clone.mappings = []; - const tracer = new TraceMap(clone, mapUrl); - tracer._decoded = map.mappings; - return tracer; - }; - decodedMap = (map) => { - return { - version: 3, - file: map.file, - names: map.names, - sourceRoot: map.sourceRoot, - sources: map.sources, - sourcesContent: map.sourcesContent, - mappings: decodedMappings(map), - }; - }; - encodedMap = (map) => { - return { - version: 3, - file: map.file, - names: map.names, - sourceRoot: map.sourceRoot, - sources: map.sources, - sourcesContent: map.sourcesContent, - mappings: encodedMappings(map), - }; - }; -})(); -function traceSegmentInternal(segments, memo, line, column, bias) { - let index = memoizedBinarySearch(segments, column, memo, line); - if (found) { - index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); - } - else if (bias === LEAST_UPPER_BOUND) - index++; - if (index === -1 || index === segments.length) - return null; - return segments[index]; -} - -export { AnyMap, GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap, decodedMap, decodedMappings, eachMapping, encodedMap, encodedMappings, generatedPositionFor, originalPositionFor, presortedDecodedMap, traceSegment }; -//# sourceMappingURL=trace-mapping.mjs.map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map deleted file mode 100644 index fec7769..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"trace-mapping.mjs","sources":["../../src/resolve.ts","../../src/strip-filename.ts","../../src/sourcemap-segment.ts","../../src/sort.ts","../../src/binary-search.ts","../../src/by-source.ts","../../src/any-map.ts","../../src/trace-mapping.ts"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":["bsFound"],"mappings":";;;SAEwB,OAAO,CAAC,KAAa,EAAE,IAAwB;;;;IAIrE,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,IAAI,IAAI,GAAG,CAAC;IAE7C,OAAO,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACjC;;ACTA;;;SAGwB,aAAa,CAAC,IAA+B;IACnE,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACpC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;AAClC;;ACQO,MAAM,MAAM,GAAG,CAAC,CAAC;AACjB,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,WAAW,GAAG,CAAC,CAAC;AACtB,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,WAAW,GAAG,CAAC,CAAC;AAEtB,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAC7B,MAAM,oBAAoB,GAAG,CAAC;;SClBb,SAAS,CAC/B,QAA8B,EAC9B,KAAc;IAEd,MAAM,aAAa,GAAG,uBAAuB,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IAC3D,IAAI,aAAa,KAAK,QAAQ,CAAC,MAAM;QAAE,OAAO,QAAQ,CAAC;;;IAIvD,IAAI,CAAC,KAAK;QAAE,QAAQ,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC;IAExC,KAAK,IAAI,CAAC,GAAG,aAAa,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,uBAAuB,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE;QAC7F,QAAQ,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;KAChD;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAS,uBAAuB,CAAC,QAA8B,EAAE,KAAa;IAC5E,KAAK,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC5C,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAAE,OAAO,CAAC,CAAC;KACtC;IACD,OAAO,QAAQ,CAAC,MAAM,CAAC;AACzB,CAAC;AAED,SAAS,QAAQ,CAAC,IAAwB;IACxC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACpC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE;YACzC,OAAO,KAAK,CAAC;SACd;KACF;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,YAAY,CAAC,IAAwB,EAAE,KAAc;IAC5D,IAAI,CAAC,KAAK;QAAE,IAAI,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;IAChC,OAAO,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AACnC,CAAC;AAED,SAAS,cAAc,CAAC,CAAmB,EAAE,CAAmB;IAC9D,OAAO,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC;AAC/B;;ACnCO,IAAI,KAAK,GAAG,KAAK,CAAC;AAEzB;;;;;;;;;;;;;;;;SAgBgB,YAAY,CAC1B,QAA+C,EAC/C,MAAc,EACd,GAAW,EACX,IAAY;IAEZ,OAAO,GAAG,IAAI,IAAI,EAAE;QAClB,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC;QACtC,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;QAE3C,IAAI,GAAG,KAAK,CAAC,EAAE;YACb,KAAK,GAAG,IAAI,CAAC;YACb,OAAO,GAAG,CAAC;SACZ;QAED,IAAI,GAAG,GAAG,CAAC,EAAE;YACX,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;SACf;aAAM;YACL,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC;SAChB;KACF;IAED,KAAK,GAAG,KAAK,CAAC;IACd,OAAO,GAAG,GAAG,CAAC,CAAC;AACjB,CAAC;SAEe,UAAU,CACxB,QAA+C,EAC/C,MAAc,EACd,KAAa;IAEb,KAAK,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE;QACzD,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,MAAM;YAAE,MAAM;KAC3C;IACD,OAAO,KAAK,CAAC;AACf,CAAC;SAEe,UAAU,CACxB,QAA+C,EAC/C,MAAc,EACd,KAAa;IAEb,KAAK,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE;QAC5C,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,MAAM;YAAE,MAAM;KAC3C;IACD,OAAO,KAAK,CAAC;AACf,CAAC;SAEe,aAAa;IAC3B,OAAO;QACL,OAAO,EAAE,CAAC,CAAC;QACX,UAAU,EAAE,CAAC,CAAC;QACd,SAAS,EAAE,CAAC,CAAC;KACd,CAAC;AACJ,CAAC;AAED;;;;SAIgB,oBAAoB,CAClC,QAA+C,EAC/C,MAAc,EACd,KAAgB,EAChB,GAAW;IAEX,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAEjD,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,IAAI,IAAI,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;IAC/B,IAAI,GAAG,KAAK,OAAO,EAAE;QACnB,IAAI,MAAM,KAAK,UAAU,EAAE;YACzB,KAAK,GAAG,SAAS,KAAK,CAAC,CAAC,IAAI,QAAQ,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC;YACnE,OAAO,SAAS,CAAC;SAClB;QAED,IAAI,MAAM,IAAI,UAAU,EAAE;;YAExB,GAAG,GAAG,SAAS,KAAK,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;SACxC;aAAM;YACL,IAAI,GAAG,SAAS,CAAC;SAClB;KACF;IACD,KAAK,CAAC,OAAO,GAAG,GAAG,CAAC;IACpB,KAAK,CAAC,UAAU,GAAG,MAAM,CAAC;IAE1B,QAAQ,KAAK,CAAC,SAAS,GAAG,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE;AACvE;;ACvGA;AACA;SACwB,cAAc,CACpC,OAAsC,EACtC,KAAkB;IAElB,MAAM,OAAO,GAAa,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAEpD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACvC,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QACxB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACpC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACpB,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;gBAAE,SAAS;YAE/B,MAAM,WAAW,GAAG,GAAG,CAAC,aAAa,CAAC,CAAC;YACvC,MAAM,UAAU,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC;YACpC,MAAM,YAAY,GAAG,GAAG,CAAC,aAAa,CAAC,CAAC;YACxC,MAAM,cAAc,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;YAC5C,MAAM,YAAY,IAAI,cAAc,CAAC,UAAU,MAAzB,cAAc,CAAC,UAAU,IAAM,EAAE,EAAC,CAAC;YACzD,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC;;;;;YAMhC,MAAM,KAAK,GAAG,UAAU,CACtB,YAAY,EACZ,YAAY,EACZ,oBAAoB,CAAC,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,CAAC,CACnE,CAAC;YAEF,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,SAAS,GAAG,KAAK,GAAG,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;SACpF;KACF;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,MAAM,CAAI,KAAU,EAAE,KAAa,EAAE,KAAQ;IACpD,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;QACzC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;KACzB;IACD,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;AACvB,CAAC;AAED;AACA;AACA;AACA;AACA;AACA,SAAS,cAAc;IACrB,OAAO,EAAE,SAAS,EAAE,IAAI,EAAO,CAAC;AAClC;;MC9Ca,MAAM,GAAW,UAAU,GAAG,EAAE,MAAM;IACjD,MAAM,MAAM,GACV,OAAO,GAAG,KAAK,QAAQ,GAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAA8C,GAAG,GAAG,CAAC;IAEhG,IAAI,EAAE,UAAU,IAAI,MAAM,CAAC;QAAE,OAAO,IAAI,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjE,MAAM,QAAQ,GAAyB,EAAE,CAAC;IAC1C,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,cAAc,GAAsB,EAAE,CAAC;IAC7C,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;IAE5B,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,OAAO,CAAC,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;QACnC,MAAM,EAAE,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;QAClC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC;KAC/F;IACD,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;QACvB,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;KAC/F;IAED,MAAM,MAAM,GAAqB;QAC/B,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,KAAK;QACL,OAAO;QACP,cAAc;QACd,QAAQ;KACT,CAAC;IAEF,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC;AACrC,EAAY;AAEZ,SAAS,UAAU,CACjB,OAAgB,EAChB,MAAiC,EACjC,QAA8B,EAC9B,OAAiB,EACjB,cAAiC,EACjC,KAAe,EACf,QAAgB,EAChB,UAAkB;IAElB,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACxC,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAElE,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;IACrC,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC;IACjC,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;IACrC,MAAM,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;IAChC,MAAM,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IACjC,MAAM,CAAC,cAAc,EAAE,GAAG,CAAC,cAAc,IAAI,kBAAkB,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC;IACzF,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;;IAGzB,KAAK,IAAI,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,UAAU,EAAE,CAAC,EAAE;QAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;;;;IAKtE,MAAM,KAAK,GAAG,QAAQ,GAAG,UAAU,CAAC;IACpC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;IAEhD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;QAC5B,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;;;QAGxB,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,IAAI,QAAQ,CAAC,UAAU,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;;;QAG7E,MAAM,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,YAAY,GAAG,CAAC,CAAC;QAE3C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACpC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACpB,MAAM,MAAM,GAAG,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;;;YAIrC,IAAI,CAAC,KAAK,KAAK,IAAI,MAAM,IAAI,UAAU;gBAAE,MAAM;YAE/C,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;gBACpB,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;gBACnB,SAAS;aACV;YAED,MAAM,YAAY,GAAG,aAAa,GAAG,GAAG,CAAC,aAAa,CAAC,CAAC;YACxD,MAAM,UAAU,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC;YACpC,MAAM,YAAY,GAAG,GAAG,CAAC,aAAa,CAAC,CAAC;YACxC,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;gBACpB,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC;gBAC3D,SAAS;aACV;YAED,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;SAC5F;KACF;AACH,CAAC;AAED,SAAS,MAAM,CAAI,GAAQ,EAAE,KAAU;IACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE;QAAE,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5D,CAAC;AAED;AACA;AACA;AACA;AACA,SAAS,kBAAkB,CAAC,GAAW;IACrC,MAAM,cAAc,GAAG,EAAE,CAAC;IAC1B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE;QAAE,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IACvD,OAAO,cAAc,CAAC;AACxB;;ACxEA,MAAM,wBAAwB,GAA2B,MAAM,CAAC,MAAM,CAAC;IACrE,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,IAAI;CACX,CAAC,CAAC;AAEH,MAAM,yBAAyB,GAA4B,MAAM,CAAC,MAAM,CAAC;IACvE,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,IAAI;CACb,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,uDAAuD,CAAC;AAC9E,MAAM,eAAe,GAAG,yEAAyE,CAAC;MAErF,iBAAiB,GAAG,CAAC,EAAE;MACvB,oBAAoB,GAAG,EAAE;AAEtC;;;IAGW,gBAAiE;AAE5E;;;IAGW,gBAA2E;AAEtF;;;;IAIW,aAI4B;AAEvC;;;;;IAKW,oBAGmC;AAE9C;;;;;;;IAOW,qBAGqC;AAEhD;;;IAGW,YAAyE;AAEpF;;;;IAIW,oBAA0E;AAErF;;;;IAIW,WAE2E;AAEtF;;;;IAIW,WAAgD;MAI9C,QAAQ;IAiBnB,YAAY,GAAmB,EAAE,MAAsB;QAL/C,iBAAY,GAAG,aAAa,EAAE,CAAC;QAE/B,eAAU,GAAyB,SAAS,CAAC;QAC7C,mBAAc,GAA4B,SAAS,CAAC;QAG1D,MAAM,QAAQ,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC;QAEzC,IAAI,CAAC,QAAQ,IAAI,GAAG,CAAC,WAAW,KAAK,QAAQ;YAAE,OAAO,GAAG,CAAC;QAE1D,MAAM,MAAM,IAAI,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAA+C,CAAC;QAEhG,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC;QAC7E,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QAErC,IAAI,UAAU,IAAI,MAAM,EAAE;YACxB,MAAM,IAAI,GAAG,OAAO,CAAC,UAAU,IAAI,EAAE,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;YAC9D,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;SACnE;aAAM;YACL,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;SACpD;QAED,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QAC5B,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;YAChC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;YACzB,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;SAC3B;aAAM;YACL,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;YAC1B,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;SAC/C;KACF;CA+JF;AA7JC;IACE,eAAe,GAAG,CAAC,GAAG;;QACpB,cAAQ,GAAG,CAAC,QAAQ,oCAAZ,GAAG,CAAC,QAAQ,GAAK,MAAM,CAAC,GAAG,CAAC,QAAS,CAAC,GAAE;KACjD,CAAC;IAEF,eAAe,GAAG,CAAC,GAAG;QACpB,QAAQ,GAAG,CAAC,QAAQ,KAAZ,GAAG,CAAC,QAAQ,GAAK,MAAM,CAAC,GAAG,CAAC,QAAS,CAAC,GAAE;KACjD,CAAC;IAEF,YAAY,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM;QAC/B,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;;;QAIrC,IAAI,IAAI,IAAI,OAAO,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QAExC,OAAO,oBAAoB,CACzB,OAAO,CAAC,IAAI,CAAC,EACb,GAAG,CAAC,YAAY,EAChB,IAAI,EACJ,MAAM,EACN,oBAAoB,CACrB,CAAC;KACH,CAAC;IAEF,mBAAmB,GAAG,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;QAChD,IAAI,EAAE,CAAC;QACP,IAAI,IAAI,GAAG,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC;QAC7C,IAAI,MAAM,GAAG,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;QAEjD,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;;;QAIrC,IAAI,IAAI,IAAI,OAAO,CAAC,MAAM;YAAE,OAAO,wBAAwB,CAAC;QAE5D,MAAM,OAAO,GAAG,oBAAoB,CAClC,OAAO,CAAC,IAAI,CAAC,EACb,GAAG,CAAC,YAAY,EAChB,IAAI,EACJ,MAAM,EACN,IAAI,IAAI,oBAAoB,CAC7B,CAAC;QAEF,IAAI,OAAO,IAAI,IAAI;YAAE,OAAO,wBAAwB,CAAC;QACrD,IAAI,OAAO,CAAC,MAAM,IAAI,CAAC;YAAE,OAAO,wBAAwB,CAAC;QAEzD,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;QACvC,OAAO;YACL,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;YAC/C,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC;YAC9B,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC;YAC9B,IAAI,EAAE,OAAO,CAAC,MAAM,KAAK,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,GAAG,IAAI;SAChE,CAAC;KACH,CAAC;IAEF,oBAAoB,GAAG,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;QACzD,IAAI,EAAE,CAAC;QACP,IAAI,IAAI,GAAG,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC;QAC7C,IAAI,MAAM,GAAG,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;QAEjD,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;QACzC,IAAI,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC1C,IAAI,WAAW,KAAK,CAAC,CAAC;YAAE,WAAW,GAAG,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACtE,IAAI,WAAW,KAAK,CAAC,CAAC;YAAE,OAAO,yBAAyB,CAAC;QAEzD,MAAM,SAAS,IAAI,GAAG,CAAC,UAAU,KAAd,GAAG,CAAC,UAAU,GAAK,cAAc,CAClD,eAAe,CAAC,GAAG,CAAC,GACnB,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,EACjD,EAAC,CAAC;QACH,MAAM,KAAK,GAAG,GAAG,CAAC,cAAe,CAAC;QAElC,MAAM,QAAQ,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC;QAE9C,IAAI,QAAQ,IAAI,IAAI;YAAE,OAAO,yBAAyB,CAAC;QAEvD,MAAM,OAAO,GAAG,oBAAoB,CAClC,QAAQ,EACR,KAAK,CAAC,WAAW,CAAC,EAClB,IAAI,EACJ,MAAM,EACN,IAAI,IAAI,oBAAoB,CAC7B,CAAC;QAEF,IAAI,OAAO,IAAI,IAAI;YAAE,OAAO,yBAAyB,CAAC;QACtD,OAAO;YACL,IAAI,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC;YACrC,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC;SACtC,CAAC;KACH,CAAC;IAEF,WAAW,GAAG,CAAC,GAAG,EAAE,EAAE;QACpB,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;QACrC,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;QAEvC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACvC,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YACxB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACpC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;gBAEpB,MAAM,aAAa,GAAG,CAAC,GAAG,CAAC,CAAC;gBAC5B,MAAM,eAAe,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;gBAC/B,IAAI,MAAM,GAAG,IAAI,CAAC;gBAClB,IAAI,YAAY,GAAG,IAAI,CAAC;gBACxB,IAAI,cAAc,GAAG,IAAI,CAAC;gBAC1B,IAAI,IAAI,GAAG,IAAI,CAAC;gBAChB,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;oBACpB,MAAM,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;oBACjC,YAAY,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;oBAC1B,cAAc,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;iBACzB;gBACD,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;oBAAE,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;gBAE3C,EAAE,CAAC;oBACD,aAAa;oBACb,eAAe;oBACf,MAAM;oBACN,YAAY;oBACZ,cAAc;oBACd,IAAI;iBACU,CAAC,CAAC;aACnB;SACF;KACF,CAAC;IAEF,mBAAmB,GAAG,CAAC,GAAG,EAAE,MAAM;QAChC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;QACrC,KAAK,CAAC,QAAQ,GAAG,EAAE,CAAC;QACpB,MAAM,MAAM,GAAG,IAAI,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAC3C,MAAM,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;QAC/B,OAAO,MAAM,CAAC;KACf,CAAC;IAEF,UAAU,GAAG,CAAC,GAAG;QACf,OAAO;YACL,OAAO,EAAE,CAAC;YACV,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,UAAU,EAAE,GAAG,CAAC,UAAU;YAC1B,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,cAAc,EAAE,GAAG,CAAC,cAAc;YAClC,QAAQ,EAAE,eAAe,CAAC,GAAG,CAAC;SAC/B,CAAC;KACH,CAAC;IAEF,UAAU,GAAG,CAAC,GAAG;QACf,OAAO;YACL,OAAO,EAAE,CAAC;YACV,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,UAAU,EAAE,GAAG,CAAC,UAAU;YAC1B,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,cAAc,EAAE,GAAG,CAAC,cAAc;YAClC,QAAQ,EAAE,eAAe,CAAC,GAAG,CAAC;SAC/B,CAAC;KACH,CAAC;AACJ,CAAC,GAAA,CAAA;AAiBH,SAAS,oBAAoB,CAC3B,QAA+C,EAC/C,IAAe,EACf,IAAY,EACZ,MAAc,EACd,IAA4D;IAE5D,IAAI,KAAK,GAAG,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC/D,IAAIA,KAAO,EAAE;QACX,KAAK,GAAG,CAAC,IAAI,KAAK,iBAAiB,GAAG,UAAU,GAAG,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;KACzF;SAAM,IAAI,IAAI,KAAK,iBAAiB;QAAE,KAAK,EAAE,CAAC;IAE/C,IAAI,KAAK,KAAK,CAAC,CAAC,IAAI,KAAK,KAAK,QAAQ,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAC3D,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;AACzB;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js deleted file mode 100644 index 8b755bd..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js +++ /dev/null @@ -1,528 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@jridgewell/sourcemap-codec'), require('@jridgewell/resolve-uri')) : - typeof define === 'function' && define.amd ? define(['exports', '@jridgewell/sourcemap-codec', '@jridgewell/resolve-uri'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.traceMapping = {}, global.sourcemapCodec, global.resolveURI)); -})(this, (function (exports, sourcemapCodec, resolveUri) { 'use strict'; - - function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - - var resolveUri__default = /*#__PURE__*/_interopDefaultLegacy(resolveUri); - - function resolve(input, base) { - // The base is always treated as a directory, if it's not empty. - // https://github.com/mozilla/source-map/blob/8cb3ee57/lib/util.js#L327 - // https://github.com/chromium/chromium/blob/da4adbb3/third_party/blink/renderer/devtools/front_end/sdk/SourceMap.js#L400-L401 - if (base && !base.endsWith('/')) - base += '/'; - return resolveUri__default["default"](input, base); - } - - /** - * Removes everything after the last "/", but leaves the slash. - */ - function stripFilename(path) { - if (!path) - return ''; - const index = path.lastIndexOf('/'); - return path.slice(0, index + 1); - } - - const COLUMN = 0; - const SOURCES_INDEX = 1; - const SOURCE_LINE = 2; - const SOURCE_COLUMN = 3; - const NAMES_INDEX = 4; - const REV_GENERATED_LINE = 1; - const REV_GENERATED_COLUMN = 2; - - function maybeSort(mappings, owned) { - const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); - if (unsortedIndex === mappings.length) - return mappings; - // If we own the array (meaning we parsed it from JSON), then we're free to directly mutate it. If - // not, we do not want to modify the consumer's input array. - if (!owned) - mappings = mappings.slice(); - for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) { - mappings[i] = sortSegments(mappings[i], owned); - } - return mappings; - } - function nextUnsortedSegmentLine(mappings, start) { - for (let i = start; i < mappings.length; i++) { - if (!isSorted(mappings[i])) - return i; - } - return mappings.length; - } - function isSorted(line) { - for (let j = 1; j < line.length; j++) { - if (line[j][COLUMN] < line[j - 1][COLUMN]) { - return false; - } - } - return true; - } - function sortSegments(line, owned) { - if (!owned) - line = line.slice(); - return line.sort(sortComparator); - } - function sortComparator(a, b) { - return a[COLUMN] - b[COLUMN]; - } - - let found = false; - /** - * A binary search implementation that returns the index if a match is found. - * If no match is found, then the left-index (the index associated with the item that comes just - * before the desired index) is returned. To maintain proper sort order, a splice would happen at - * the next index: - * - * ```js - * const array = [1, 3]; - * const needle = 2; - * const index = binarySearch(array, needle, (item, needle) => item - needle); - * - * assert.equal(index, 0); - * array.splice(index + 1, 0, needle); - * assert.deepEqual(array, [1, 2, 3]); - * ``` - */ - function binarySearch(haystack, needle, low, high) { - while (low <= high) { - const mid = low + ((high - low) >> 1); - const cmp = haystack[mid][COLUMN] - needle; - if (cmp === 0) { - found = true; - return mid; - } - if (cmp < 0) { - low = mid + 1; - } - else { - high = mid - 1; - } - } - found = false; - return low - 1; - } - function upperBound(haystack, needle, index) { - for (let i = index + 1; i < haystack.length; i++, index++) { - if (haystack[i][COLUMN] !== needle) - break; - } - return index; - } - function lowerBound(haystack, needle, index) { - for (let i = index - 1; i >= 0; i--, index--) { - if (haystack[i][COLUMN] !== needle) - break; - } - return index; - } - function memoizedState() { - return { - lastKey: -1, - lastNeedle: -1, - lastIndex: -1, - }; - } - /** - * This overly complicated beast is just to record the last tested line/column and the resulting - * index, allowing us to skip a few tests if mappings are monotonically increasing. - */ - function memoizedBinarySearch(haystack, needle, state, key) { - const { lastKey, lastNeedle, lastIndex } = state; - let low = 0; - let high = haystack.length - 1; - if (key === lastKey) { - if (needle === lastNeedle) { - found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle; - return lastIndex; - } - if (needle >= lastNeedle) { - // lastIndex may be -1 if the previous needle was not found. - low = lastIndex === -1 ? 0 : lastIndex; - } - else { - high = lastIndex; - } - } - state.lastKey = key; - state.lastNeedle = needle; - return (state.lastIndex = binarySearch(haystack, needle, low, high)); - } - - // Rebuilds the original source files, with mappings that are ordered by source line/column instead - // of generated line/column. - function buildBySources(decoded, memos) { - const sources = memos.map(buildNullArray); - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - if (seg.length === 1) - continue; - const sourceIndex = seg[SOURCES_INDEX]; - const sourceLine = seg[SOURCE_LINE]; - const sourceColumn = seg[SOURCE_COLUMN]; - const originalSource = sources[sourceIndex]; - const originalLine = (originalSource[sourceLine] || (originalSource[sourceLine] = [])); - const memo = memos[sourceIndex]; - // The binary search either found a match, or it found the left-index just before where the - // segment should go. Either way, we want to insert after that. And there may be multiple - // generated segments associated with an original location, so there may need to move several - // indexes before we find where we need to insert. - const index = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine)); - insert(originalLine, (memo.lastIndex = index + 1), [sourceColumn, i, seg[COLUMN]]); - } - } - return sources; - } - function insert(array, index, value) { - for (let i = array.length; i > index; i--) { - array[i] = array[i - 1]; - } - array[index] = value; - } - // Null arrays allow us to use ordered index keys without actually allocating contiguous memory like - // a real array. We use a null-prototype object to avoid prototype pollution and deoptimizations. - // Numeric properties on objects are magically sorted in ascending order by the engine regardless of - // the insertion order. So, by setting any numeric keys, even out of order, we'll get ascending - // order when iterating with for-in. - function buildNullArray() { - return { __proto__: null }; - } - - const AnyMap = function (map, mapUrl) { - const parsed = typeof map === 'string' ? JSON.parse(map) : map; - if (!('sections' in parsed)) - return new TraceMap(parsed, mapUrl); - const mappings = []; - const sources = []; - const sourcesContent = []; - const names = []; - const { sections } = parsed; - let i = 0; - for (; i < sections.length - 1; i++) { - const no = sections[i + 1].offset; - addSection(sections[i], mapUrl, mappings, sources, sourcesContent, names, no.line, no.column); - } - if (sections.length > 0) { - addSection(sections[i], mapUrl, mappings, sources, sourcesContent, names, Infinity, Infinity); - } - const joined = { - version: 3, - file: parsed.file, - names, - sources, - sourcesContent, - mappings, - }; - return exports.presortedDecodedMap(joined); - }; - function addSection(section, mapUrl, mappings, sources, sourcesContent, names, stopLine, stopColumn) { - const map = AnyMap(section.map, mapUrl); - const { line: lineOffset, column: columnOffset } = section.offset; - const sourcesOffset = sources.length; - const namesOffset = names.length; - const decoded = exports.decodedMappings(map); - const { resolvedSources } = map; - append(sources, resolvedSources); - append(sourcesContent, map.sourcesContent || fillSourcesContent(resolvedSources.length)); - append(names, map.names); - // If this section jumps forwards several lines, we need to add lines to the output mappings catch up. - for (let i = mappings.length; i <= lineOffset; i++) - mappings.push([]); - // We can only add so many lines before we step into the range that the next section's map - // controls. When we get to the last line, then we'll start checking the segments to see if - // they've crossed into the column range. - const stopI = stopLine - lineOffset; - const len = Math.min(decoded.length, stopI + 1); - for (let i = 0; i < len; i++) { - const line = decoded[i]; - // On the 0th loop, the line will already exist due to a previous section, or the line catch up - // loop above. - const out = i === 0 ? mappings[lineOffset] : (mappings[lineOffset + i] = []); - // On the 0th loop, the section's column offset shifts us forward. On all other lines (since the - // map can be multiple lines), it doesn't. - const cOffset = i === 0 ? columnOffset : 0; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - const column = cOffset + seg[COLUMN]; - // If this segment steps into the column range that the next section's map controls, we need - // to stop early. - if (i === stopI && column >= stopColumn) - break; - if (seg.length === 1) { - out.push([column]); - continue; - } - const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX]; - const sourceLine = seg[SOURCE_LINE]; - const sourceColumn = seg[SOURCE_COLUMN]; - if (seg.length === 4) { - out.push([column, sourcesIndex, sourceLine, sourceColumn]); - continue; - } - out.push([column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]); - } - } - } - function append(arr, other) { - for (let i = 0; i < other.length; i++) - arr.push(other[i]); - } - // Sourcemaps don't need to have sourcesContent, and if they don't, we need to create an array of - // equal length to the sources. This is because the sources and sourcesContent are paired arrays, - // where `sourcesContent[i]` is the content of the `sources[i]` file. If we didn't, then joined - // sourcemap would desynchronize the sources/contents. - function fillSourcesContent(len) { - const sourcesContent = []; - for (let i = 0; i < len; i++) - sourcesContent[i] = null; - return sourcesContent; - } - - const INVALID_ORIGINAL_MAPPING = Object.freeze({ - source: null, - line: null, - column: null, - name: null, - }); - const INVALID_GENERATED_MAPPING = Object.freeze({ - line: null, - column: null, - }); - const LINE_GTR_ZERO = '`line` must be greater than 0 (lines start at line 1)'; - const COL_GTR_EQ_ZERO = '`column` must be greater than or equal to 0 (columns start at column 0)'; - const LEAST_UPPER_BOUND = -1; - const GREATEST_LOWER_BOUND = 1; - /** - * Returns the encoded (VLQ string) form of the SourceMap's mappings field. - */ - exports.encodedMappings = void 0; - /** - * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. - */ - exports.decodedMappings = void 0; - /** - * A low-level API to find the segment associated with a generated line/column (think, from a - * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. - */ - exports.traceSegment = void 0; - /** - * A higher-level API to find the source/line/column associated with a generated line/column - * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in - * `source-map` library. - */ - exports.originalPositionFor = void 0; - /** - * Finds the source/line/column directly after the mapping returned by originalPositionFor, provided - * the found mapping is from the same source and line as the originalPositionFor mapping. - * - * Eg, in the code `let id = 1`, `originalPositionAfter` could find the mapping associated with `1` - * using the same needle that would return `id` when calling `originalPositionFor`. - */ - exports.generatedPositionFor = void 0; - /** - * Iterates each mapping in generated position order. - */ - exports.eachMapping = void 0; - /** - * A helper that skips sorting of the input map's mappings array, which can be expensive for larger - * maps. - */ - exports.presortedDecodedMap = void 0; - /** - * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ - exports.decodedMap = void 0; - /** - * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ - exports.encodedMap = void 0; - class TraceMap { - constructor(map, mapUrl) { - this._decodedMemo = memoizedState(); - this._bySources = undefined; - this._bySourceMemos = undefined; - const isString = typeof map === 'string'; - if (!isString && map.constructor === TraceMap) - return map; - const parsed = (isString ? JSON.parse(map) : map); - const { version, file, names, sourceRoot, sources, sourcesContent } = parsed; - this.version = version; - this.file = file; - this.names = names; - this.sourceRoot = sourceRoot; - this.sources = sources; - this.sourcesContent = sourcesContent; - if (sourceRoot || mapUrl) { - const from = resolve(sourceRoot || '', stripFilename(mapUrl)); - this.resolvedSources = sources.map((s) => resolve(s || '', from)); - } - else { - this.resolvedSources = sources.map((s) => s || ''); - } - const { mappings } = parsed; - if (typeof mappings === 'string') { - this._encoded = mappings; - this._decoded = undefined; - } - else { - this._encoded = undefined; - this._decoded = maybeSort(mappings, isString); - } - } - } - (() => { - exports.encodedMappings = (map) => { - var _a; - return ((_a = map._encoded) !== null && _a !== void 0 ? _a : (map._encoded = sourcemapCodec.encode(map._decoded))); - }; - exports.decodedMappings = (map) => { - return (map._decoded || (map._decoded = sourcemapCodec.decode(map._encoded))); - }; - exports.traceSegment = (map, line, column) => { - const decoded = exports.decodedMappings(map); - // It's common for parent source maps to have pointers to lines that have no - // mapping (like a "//# sourceMappingURL=") at the end of the child file. - if (line >= decoded.length) - return null; - return traceSegmentInternal(decoded[line], map._decodedMemo, line, column, GREATEST_LOWER_BOUND); - }; - exports.originalPositionFor = (map, { line, column, bias }) => { - line--; - if (line < 0) - throw new Error(LINE_GTR_ZERO); - if (column < 0) - throw new Error(COL_GTR_EQ_ZERO); - const decoded = exports.decodedMappings(map); - // It's common for parent source maps to have pointers to lines that have no - // mapping (like a "//# sourceMappingURL=") at the end of the child file. - if (line >= decoded.length) - return INVALID_ORIGINAL_MAPPING; - const segment = traceSegmentInternal(decoded[line], map._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND); - if (segment == null) - return INVALID_ORIGINAL_MAPPING; - if (segment.length == 1) - return INVALID_ORIGINAL_MAPPING; - const { names, resolvedSources } = map; - return { - source: resolvedSources[segment[SOURCES_INDEX]], - line: segment[SOURCE_LINE] + 1, - column: segment[SOURCE_COLUMN], - name: segment.length === 5 ? names[segment[NAMES_INDEX]] : null, - }; - }; - exports.generatedPositionFor = (map, { source, line, column, bias }) => { - line--; - if (line < 0) - throw new Error(LINE_GTR_ZERO); - if (column < 0) - throw new Error(COL_GTR_EQ_ZERO); - const { sources, resolvedSources } = map; - let sourceIndex = sources.indexOf(source); - if (sourceIndex === -1) - sourceIndex = resolvedSources.indexOf(source); - if (sourceIndex === -1) - return INVALID_GENERATED_MAPPING; - const generated = (map._bySources || (map._bySources = buildBySources(exports.decodedMappings(map), (map._bySourceMemos = sources.map(memoizedState))))); - const memos = map._bySourceMemos; - const segments = generated[sourceIndex][line]; - if (segments == null) - return INVALID_GENERATED_MAPPING; - const segment = traceSegmentInternal(segments, memos[sourceIndex], line, column, bias || GREATEST_LOWER_BOUND); - if (segment == null) - return INVALID_GENERATED_MAPPING; - return { - line: segment[REV_GENERATED_LINE] + 1, - column: segment[REV_GENERATED_COLUMN], - }; - }; - exports.eachMapping = (map, cb) => { - const decoded = exports.decodedMappings(map); - const { names, resolvedSources } = map; - for (let i = 0; i < decoded.length; i++) { - const line = decoded[i]; - for (let j = 0; j < line.length; j++) { - const seg = line[j]; - const generatedLine = i + 1; - const generatedColumn = seg[0]; - let source = null; - let originalLine = null; - let originalColumn = null; - let name = null; - if (seg.length !== 1) { - source = resolvedSources[seg[1]]; - originalLine = seg[2] + 1; - originalColumn = seg[3]; - } - if (seg.length === 5) - name = names[seg[4]]; - cb({ - generatedLine, - generatedColumn, - source, - originalLine, - originalColumn, - name, - }); - } - } - }; - exports.presortedDecodedMap = (map, mapUrl) => { - const clone = Object.assign({}, map); - clone.mappings = []; - const tracer = new TraceMap(clone, mapUrl); - tracer._decoded = map.mappings; - return tracer; - }; - exports.decodedMap = (map) => { - return { - version: 3, - file: map.file, - names: map.names, - sourceRoot: map.sourceRoot, - sources: map.sources, - sourcesContent: map.sourcesContent, - mappings: exports.decodedMappings(map), - }; - }; - exports.encodedMap = (map) => { - return { - version: 3, - file: map.file, - names: map.names, - sourceRoot: map.sourceRoot, - sources: map.sources, - sourcesContent: map.sourcesContent, - mappings: exports.encodedMappings(map), - }; - }; - })(); - function traceSegmentInternal(segments, memo, line, column, bias) { - let index = memoizedBinarySearch(segments, column, memo, line); - if (found) { - index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index); - } - else if (bias === LEAST_UPPER_BOUND) - index++; - if (index === -1 || index === segments.length) - return null; - return segments[index]; - } - - exports.AnyMap = AnyMap; - exports.GREATEST_LOWER_BOUND = GREATEST_LOWER_BOUND; - exports.LEAST_UPPER_BOUND = LEAST_UPPER_BOUND; - exports.TraceMap = TraceMap; - - Object.defineProperty(exports, '__esModule', { value: true }); - -})); -//# sourceMappingURL=trace-mapping.umd.js.map diff --git a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map b/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map deleted file mode 100644 index 4ef72e7..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"trace-mapping.umd.js","sources":["../../src/resolve.ts","../../src/strip-filename.ts","../../src/sourcemap-segment.ts","../../src/sort.ts","../../src/binary-search.ts","../../src/by-source.ts","../../src/any-map.ts","../../src/trace-mapping.ts"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":["resolveUri","presortedDecodedMap","decodedMappings","encodedMappings","traceSegment","originalPositionFor","generatedPositionFor","eachMapping","decodedMap","encodedMap","encode","decode","bsFound"],"mappings":";;;;;;;;;;aAEwB,OAAO,CAAC,KAAa,EAAE,IAAwB;;;;QAIrE,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;YAAE,IAAI,IAAI,GAAG,CAAC;QAE7C,OAAOA,8BAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACjC;;ICTA;;;aAGwB,aAAa,CAAC,IAA+B;QACnE,IAAI,CAAC,IAAI;YAAE,OAAO,EAAE,CAAC;QACrB,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACpC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;IAClC;;ICQO,MAAM,MAAM,GAAG,CAAC,CAAC;IACjB,MAAM,aAAa,GAAG,CAAC,CAAC;IACxB,MAAM,WAAW,GAAG,CAAC,CAAC;IACtB,MAAM,aAAa,GAAG,CAAC,CAAC;IACxB,MAAM,WAAW,GAAG,CAAC,CAAC;IAEtB,MAAM,kBAAkB,GAAG,CAAC,CAAC;IAC7B,MAAM,oBAAoB,GAAG,CAAC;;aClBb,SAAS,CAC/B,QAA8B,EAC9B,KAAc;QAEd,MAAM,aAAa,GAAG,uBAAuB,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;QAC3D,IAAI,aAAa,KAAK,QAAQ,CAAC,MAAM;YAAE,OAAO,QAAQ,CAAC;;;QAIvD,IAAI,CAAC,KAAK;YAAE,QAAQ,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC;QAExC,KAAK,IAAI,CAAC,GAAG,aAAa,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,uBAAuB,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE;YAC7F,QAAQ,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;SAChD;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,SAAS,uBAAuB,CAAC,QAA8B,EAAE,KAAa;QAC5E,KAAK,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC5C,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBAAE,OAAO,CAAC,CAAC;SACtC;QACD,OAAO,QAAQ,CAAC,MAAM,CAAC;IACzB,CAAC;IAED,SAAS,QAAQ,CAAC,IAAwB;QACxC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACpC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE;gBACzC,OAAO,KAAK,CAAC;aACd;SACF;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,SAAS,YAAY,CAAC,IAAwB,EAAE,KAAc;QAC5D,IAAI,CAAC,KAAK;YAAE,IAAI,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACnC,CAAC;IAED,SAAS,cAAc,CAAC,CAAmB,EAAE,CAAmB;QAC9D,OAAO,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC;IAC/B;;ICnCO,IAAI,KAAK,GAAG,KAAK,CAAC;IAEzB;;;;;;;;;;;;;;;;aAgBgB,YAAY,CAC1B,QAA+C,EAC/C,MAAc,EACd,GAAW,EACX,IAAY;QAEZ,OAAO,GAAG,IAAI,IAAI,EAAE;YAClB,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC;YACtC,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;YAE3C,IAAI,GAAG,KAAK,CAAC,EAAE;gBACb,KAAK,GAAG,IAAI,CAAC;gBACb,OAAO,GAAG,CAAC;aACZ;YAED,IAAI,GAAG,GAAG,CAAC,EAAE;gBACX,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;aACf;iBAAM;gBACL,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC;aAChB;SACF;QAED,KAAK,GAAG,KAAK,CAAC;QACd,OAAO,GAAG,GAAG,CAAC,CAAC;IACjB,CAAC;aAEe,UAAU,CACxB,QAA+C,EAC/C,MAAc,EACd,KAAa;QAEb,KAAK,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE;YACzD,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,MAAM;gBAAE,MAAM;SAC3C;QACD,OAAO,KAAK,CAAC;IACf,CAAC;aAEe,UAAU,CACxB,QAA+C,EAC/C,MAAc,EACd,KAAa;QAEb,KAAK,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE;YAC5C,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,MAAM;gBAAE,MAAM;SAC3C;QACD,OAAO,KAAK,CAAC;IACf,CAAC;aAEe,aAAa;QAC3B,OAAO;YACL,OAAO,EAAE,CAAC,CAAC;YACX,UAAU,EAAE,CAAC,CAAC;YACd,SAAS,EAAE,CAAC,CAAC;SACd,CAAC;IACJ,CAAC;IAED;;;;aAIgB,oBAAoB,CAClC,QAA+C,EAC/C,MAAc,EACd,KAAgB,EAChB,GAAW;QAEX,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;QAEjD,IAAI,GAAG,GAAG,CAAC,CAAC;QACZ,IAAI,IAAI,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;QAC/B,IAAI,GAAG,KAAK,OAAO,EAAE;YACnB,IAAI,MAAM,KAAK,UAAU,EAAE;gBACzB,KAAK,GAAG,SAAS,KAAK,CAAC,CAAC,IAAI,QAAQ,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC;gBACnE,OAAO,SAAS,CAAC;aAClB;YAED,IAAI,MAAM,IAAI,UAAU,EAAE;;gBAExB,GAAG,GAAG,SAAS,KAAK,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;aACxC;iBAAM;gBACL,IAAI,GAAG,SAAS,CAAC;aAClB;SACF;QACD,KAAK,CAAC,OAAO,GAAG,GAAG,CAAC;QACpB,KAAK,CAAC,UAAU,GAAG,MAAM,CAAC;QAE1B,QAAQ,KAAK,CAAC,SAAS,GAAG,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE;IACvE;;ICvGA;IACA;aACwB,cAAc,CACpC,OAAsC,EACtC,KAAkB;QAElB,MAAM,OAAO,GAAa,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAEpD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACvC,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YACxB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACpC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;gBACpB,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;oBAAE,SAAS;gBAE/B,MAAM,WAAW,GAAG,GAAG,CAAC,aAAa,CAAC,CAAC;gBACvC,MAAM,UAAU,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC;gBACpC,MAAM,YAAY,GAAG,GAAG,CAAC,aAAa,CAAC,CAAC;gBACxC,MAAM,cAAc,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;gBAC5C,MAAM,YAAY,IAAI,cAAc,CAAC,UAAU,MAAzB,cAAc,CAAC,UAAU,IAAM,EAAE,EAAC,CAAC;gBACzD,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC;;;;;gBAMhC,MAAM,KAAK,GAAG,UAAU,CACtB,YAAY,EACZ,YAAY,EACZ,oBAAoB,CAAC,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,CAAC,CACnE,CAAC;gBAEF,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,SAAS,GAAG,KAAK,GAAG,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;aACpF;SACF;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,SAAS,MAAM,CAAI,KAAU,EAAE,KAAa,EAAE,KAAQ;QACpD,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;YACzC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;SACzB;QACD,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;IACvB,CAAC;IAED;IACA;IACA;IACA;IACA;IACA,SAAS,cAAc;QACrB,OAAO,EAAE,SAAS,EAAE,IAAI,EAAO,CAAC;IAClC;;UC9Ca,MAAM,GAAW,UAAU,GAAG,EAAE,MAAM;QACjD,MAAM,MAAM,GACV,OAAO,GAAG,KAAK,QAAQ,GAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAA8C,GAAG,GAAG,CAAC;QAEhG,IAAI,EAAE,UAAU,IAAI,MAAM,CAAC;YAAE,OAAO,IAAI,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAEjE,MAAM,QAAQ,GAAyB,EAAE,CAAC;QAC1C,MAAM,OAAO,GAAa,EAAE,CAAC;QAC7B,MAAM,cAAc,GAAsB,EAAE,CAAC;QAC7C,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QAE5B,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,OAAO,CAAC,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;YACnC,MAAM,EAAE,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;YAClC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC;SAC/F;QACD,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;YACvB,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;SAC/F;QAED,MAAM,MAAM,GAAqB;YAC/B,OAAO,EAAE,CAAC;YACV,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,KAAK;YACL,OAAO;YACP,cAAc;YACd,QAAQ;SACT,CAAC;QAEF,OAAOC,2BAAmB,CAAC,MAAM,CAAC,CAAC;IACrC,EAAY;IAEZ,SAAS,UAAU,CACjB,OAAgB,EAChB,MAAiC,EACjC,QAA8B,EAC9B,OAAiB,EACjB,cAAiC,EACjC,KAAe,EACf,QAAgB,EAChB,UAAkB;QAElB,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QACxC,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;QAElE,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;QACrC,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC;QACjC,MAAM,OAAO,GAAGC,uBAAe,CAAC,GAAG,CAAC,CAAC;QACrC,MAAM,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;QAChC,MAAM,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;QACjC,MAAM,CAAC,cAAc,EAAE,GAAG,CAAC,cAAc,IAAI,kBAAkB,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC;QACzF,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;;QAGzB,KAAK,IAAI,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,UAAU,EAAE,CAAC,EAAE;YAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;;;;QAKtE,MAAM,KAAK,GAAG,QAAQ,GAAG,UAAU,CAAC;QACpC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;QAEhD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;YAC5B,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;;;YAGxB,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,IAAI,QAAQ,CAAC,UAAU,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;;;YAG7E,MAAM,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,YAAY,GAAG,CAAC,CAAC;YAE3C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACpC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;gBACpB,MAAM,MAAM,GAAG,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;;;gBAIrC,IAAI,CAAC,KAAK,KAAK,IAAI,MAAM,IAAI,UAAU;oBAAE,MAAM;gBAE/C,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;oBACpB,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;oBACnB,SAAS;iBACV;gBAED,MAAM,YAAY,GAAG,aAAa,GAAG,GAAG,CAAC,aAAa,CAAC,CAAC;gBACxD,MAAM,UAAU,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC;gBACpC,MAAM,YAAY,GAAG,GAAG,CAAC,aAAa,CAAC,CAAC;gBACxC,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;oBACpB,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC;oBAC3D,SAAS;iBACV;gBAED,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;aAC5F;SACF;IACH,CAAC;IAED,SAAS,MAAM,CAAI,GAAQ,EAAE,KAAU;QACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE;YAAE,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5D,CAAC;IAED;IACA;IACA;IACA;IACA,SAAS,kBAAkB,CAAC,GAAW;QACrC,MAAM,cAAc,GAAG,EAAE,CAAC;QAC1B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE;YAAE,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;QACvD,OAAO,cAAc,CAAC;IACxB;;ICxEA,MAAM,wBAAwB,GAA2B,MAAM,CAAC,MAAM,CAAC;QACrE,MAAM,EAAE,IAAI;QACZ,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,IAAI;QACZ,IAAI,EAAE,IAAI;KACX,CAAC,CAAC;IAEH,MAAM,yBAAyB,GAA4B,MAAM,CAAC,MAAM,CAAC;QACvE,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,IAAI;KACb,CAAC,CAAC;IAEH,MAAM,aAAa,GAAG,uDAAuD,CAAC;IAC9E,MAAM,eAAe,GAAG,yEAAyE,CAAC;UAErF,iBAAiB,GAAG,CAAC,EAAE;UACvB,oBAAoB,GAAG,EAAE;IAEtC;;;AAGWC,qCAAiE;IAE5E;;;AAGWD,qCAA2E;IAEtF;;;;AAIWE,kCAI4B;IAEvC;;;;;AAKWC,yCAGmC;IAE9C;;;;;;;AAOWC,0CAGqC;IAEhD;;;AAGWC,iCAAyE;IAEpF;;;;AAIWN,yCAA0E;IAErF;;;;AAIWO,gCAE2E;IAEtF;;;;AAIWC,gCAAgD;UAI9C,QAAQ;QAiBnB,YAAY,GAAmB,EAAE,MAAsB;YAL/C,iBAAY,GAAG,aAAa,EAAE,CAAC;YAE/B,eAAU,GAAyB,SAAS,CAAC;YAC7C,mBAAc,GAA4B,SAAS,CAAC;YAG1D,MAAM,QAAQ,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC;YAEzC,IAAI,CAAC,QAAQ,IAAI,GAAG,CAAC,WAAW,KAAK,QAAQ;gBAAE,OAAO,GAAG,CAAC;YAE1D,MAAM,MAAM,IAAI,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAA+C,CAAC;YAEhG,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC;YAC7E,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;YAC7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACvB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;YAErC,IAAI,UAAU,IAAI,MAAM,EAAE;gBACxB,MAAM,IAAI,GAAG,OAAO,CAAC,UAAU,IAAI,EAAE,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;gBAC9D,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;aACnE;iBAAM;gBACL,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;aACpD;YAED,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;YAC5B,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;gBAChC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;gBACzB,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;aAC3B;iBAAM;gBACL,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;gBAC1B,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;aAC/C;SACF;KA+JF;IA7JC;QACEN,uBAAe,GAAG,CAAC,GAAG;;YACpB,cAAQ,GAAG,CAAC,QAAQ,oCAAZ,GAAG,CAAC,QAAQ,GAAKO,qBAAM,CAAC,GAAG,CAAC,QAAS,CAAC,GAAE;SACjD,CAAC;QAEFR,uBAAe,GAAG,CAAC,GAAG;YACpB,QAAQ,GAAG,CAAC,QAAQ,KAAZ,GAAG,CAAC,QAAQ,GAAKS,qBAAM,CAAC,GAAG,CAAC,QAAS,CAAC,GAAE;SACjD,CAAC;QAEFP,oBAAY,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM;YAC/B,MAAM,OAAO,GAAGF,uBAAe,CAAC,GAAG,CAAC,CAAC;;;YAIrC,IAAI,IAAI,IAAI,OAAO,CAAC,MAAM;gBAAE,OAAO,IAAI,CAAC;YAExC,OAAO,oBAAoB,CACzB,OAAO,CAAC,IAAI,CAAC,EACb,GAAG,CAAC,YAAY,EAChB,IAAI,EACJ,MAAM,EACN,oBAAoB,CACrB,CAAC;SACH,CAAC;QAEFG,2BAAmB,GAAG,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;YAChD,IAAI,EAAE,CAAC;YACP,IAAI,IAAI,GAAG,CAAC;gBAAE,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC;YAC7C,IAAI,MAAM,GAAG,CAAC;gBAAE,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;YAEjD,MAAM,OAAO,GAAGH,uBAAe,CAAC,GAAG,CAAC,CAAC;;;YAIrC,IAAI,IAAI,IAAI,OAAO,CAAC,MAAM;gBAAE,OAAO,wBAAwB,CAAC;YAE5D,MAAM,OAAO,GAAG,oBAAoB,CAClC,OAAO,CAAC,IAAI,CAAC,EACb,GAAG,CAAC,YAAY,EAChB,IAAI,EACJ,MAAM,EACN,IAAI,IAAI,oBAAoB,CAC7B,CAAC;YAEF,IAAI,OAAO,IAAI,IAAI;gBAAE,OAAO,wBAAwB,CAAC;YACrD,IAAI,OAAO,CAAC,MAAM,IAAI,CAAC;gBAAE,OAAO,wBAAwB,CAAC;YAEzD,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;YACvC,OAAO;gBACL,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;gBAC/C,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC;gBAC9B,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC;gBAC9B,IAAI,EAAE,OAAO,CAAC,MAAM,KAAK,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,GAAG,IAAI;aAChE,CAAC;SACH,CAAC;QAEFI,4BAAoB,GAAG,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;YACzD,IAAI,EAAE,CAAC;YACP,IAAI,IAAI,GAAG,CAAC;gBAAE,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC;YAC7C,IAAI,MAAM,GAAG,CAAC;gBAAE,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;YAEjD,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;YACzC,IAAI,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAC1C,IAAI,WAAW,KAAK,CAAC,CAAC;gBAAE,WAAW,GAAG,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YACtE,IAAI,WAAW,KAAK,CAAC,CAAC;gBAAE,OAAO,yBAAyB,CAAC;YAEzD,MAAM,SAAS,IAAI,GAAG,CAAC,UAAU,KAAd,GAAG,CAAC,UAAU,GAAK,cAAc,CAClDJ,uBAAe,CAAC,GAAG,CAAC,GACnB,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,EACjD,EAAC,CAAC;YACH,MAAM,KAAK,GAAG,GAAG,CAAC,cAAe,CAAC;YAElC,MAAM,QAAQ,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC;YAE9C,IAAI,QAAQ,IAAI,IAAI;gBAAE,OAAO,yBAAyB,CAAC;YAEvD,MAAM,OAAO,GAAG,oBAAoB,CAClC,QAAQ,EACR,KAAK,CAAC,WAAW,CAAC,EAClB,IAAI,EACJ,MAAM,EACN,IAAI,IAAI,oBAAoB,CAC7B,CAAC;YAEF,IAAI,OAAO,IAAI,IAAI;gBAAE,OAAO,yBAAyB,CAAC;YACtD,OAAO;gBACL,IAAI,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC;gBACrC,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC;aACtC,CAAC;SACH,CAAC;QAEFK,mBAAW,GAAG,CAAC,GAAG,EAAE,EAAE;YACpB,MAAM,OAAO,GAAGL,uBAAe,CAAC,GAAG,CAAC,CAAC;YACrC,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC;YAEvC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACvC,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;gBACxB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;oBACpC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;oBAEpB,MAAM,aAAa,GAAG,CAAC,GAAG,CAAC,CAAC;oBAC5B,MAAM,eAAe,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;oBAC/B,IAAI,MAAM,GAAG,IAAI,CAAC;oBAClB,IAAI,YAAY,GAAG,IAAI,CAAC;oBACxB,IAAI,cAAc,GAAG,IAAI,CAAC;oBAC1B,IAAI,IAAI,GAAG,IAAI,CAAC;oBAChB,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;wBACpB,MAAM,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;wBACjC,YAAY,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;wBAC1B,cAAc,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;qBACzB;oBACD,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;wBAAE,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;oBAE3C,EAAE,CAAC;wBACD,aAAa;wBACb,eAAe;wBACf,MAAM;wBACN,YAAY;wBACZ,cAAc;wBACd,IAAI;qBACU,CAAC,CAAC;iBACnB;aACF;SACF,CAAC;QAEFD,2BAAmB,GAAG,CAAC,GAAG,EAAE,MAAM;YAChC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;YACrC,KAAK,CAAC,QAAQ,GAAG,EAAE,CAAC;YACpB,MAAM,MAAM,GAAG,IAAI,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;YAC3C,MAAM,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;YAC/B,OAAO,MAAM,CAAC;SACf,CAAC;QAEFO,kBAAU,GAAG,CAAC,GAAG;YACf,OAAO;gBACL,OAAO,EAAE,CAAC;gBACV,IAAI,EAAE,GAAG,CAAC,IAAI;gBACd,KAAK,EAAE,GAAG,CAAC,KAAK;gBAChB,UAAU,EAAE,GAAG,CAAC,UAAU;gBAC1B,OAAO,EAAE,GAAG,CAAC,OAAO;gBACpB,cAAc,EAAE,GAAG,CAAC,cAAc;gBAClC,QAAQ,EAAEN,uBAAe,CAAC,GAAG,CAAC;aAC/B,CAAC;SACH,CAAC;QAEFO,kBAAU,GAAG,CAAC,GAAG;YACf,OAAO;gBACL,OAAO,EAAE,CAAC;gBACV,IAAI,EAAE,GAAG,CAAC,IAAI;gBACd,KAAK,EAAE,GAAG,CAAC,KAAK;gBAChB,UAAU,EAAE,GAAG,CAAC,UAAU;gBAC1B,OAAO,EAAE,GAAG,CAAC,OAAO;gBACpB,cAAc,EAAE,GAAG,CAAC,cAAc;gBAClC,QAAQ,EAAEN,uBAAe,CAAC,GAAG,CAAC;aAC/B,CAAC;SACH,CAAC;IACJ,CAAC,GAAA,CAAA;IAiBH,SAAS,oBAAoB,CAC3B,QAA+C,EAC/C,IAAe,EACf,IAAY,EACZ,MAAc,EACd,IAA4D;QAE5D,IAAI,KAAK,GAAG,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAC/D,IAAIS,KAAO,EAAE;YACX,KAAK,GAAG,CAAC,IAAI,KAAK,iBAAiB,GAAG,UAAU,GAAG,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;SACzF;aAAM,IAAI,IAAI,KAAK,iBAAiB;YAAE,KAAK,EAAE,CAAC;QAE/C,IAAI,KAAK,KAAK,CAAC,CAAC,IAAI,KAAK,KAAK,QAAQ,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QAC3D,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;IACzB;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts deleted file mode 100644 index 08bca6b..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { TraceMap } from './trace-mapping'; -import type { SectionedSourceMapInput } from './types'; -declare type AnyMap = { - new (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap; - (map: SectionedSourceMapInput, mapUrl?: string | null): TraceMap; -}; -export declare const AnyMap: AnyMap; -export {}; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts deleted file mode 100644 index 88820e5..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { SourceMapSegment, ReverseSegment } from './sourcemap-segment'; -export declare type MemoState = { - lastKey: number; - lastNeedle: number; - lastIndex: number; -}; -export declare let found: boolean; -/** - * A binary search implementation that returns the index if a match is found. - * If no match is found, then the left-index (the index associated with the item that comes just - * before the desired index) is returned. To maintain proper sort order, a splice would happen at - * the next index: - * - * ```js - * const array = [1, 3]; - * const needle = 2; - * const index = binarySearch(array, needle, (item, needle) => item - needle); - * - * assert.equal(index, 0); - * array.splice(index + 1, 0, needle); - * assert.deepEqual(array, [1, 2, 3]); - * ``` - */ -export declare function binarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, low: number, high: number): number; -export declare function upperBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; -export declare function lowerBound(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, index: number): number; -export declare function memoizedState(): MemoState; -/** - * This overly complicated beast is just to record the last tested line/column and the resulting - * index, allowing us to skip a few tests if mappings are monotonically increasing. - */ -export declare function memoizedBinarySearch(haystack: SourceMapSegment[] | ReverseSegment[], needle: number, state: MemoState, key: number): number; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts deleted file mode 100644 index 8d1e538..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment'; -import type { MemoState } from './binary-search'; -export declare type Source = { - __proto__: null; - [line: number]: Exclude[]; -}; -export default function buildBySources(decoded: readonly SourceMapSegment[][], memos: MemoState[]): Source[]; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts deleted file mode 100644 index cf7d4f8..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts +++ /dev/null @@ -1 +0,0 @@ -export default function resolve(input: string, base: string | undefined): string; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts deleted file mode 100644 index 2bfb5dc..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { SourceMapSegment } from './sourcemap-segment'; -export default function maybeSort(mappings: SourceMapSegment[][], owned: boolean): SourceMapSegment[][]; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts deleted file mode 100644 index 6d70924..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -declare type GeneratedColumn = number; -declare type SourcesIndex = number; -declare type SourceLine = number; -declare type SourceColumn = number; -declare type NamesIndex = number; -declare type GeneratedLine = number; -export declare type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex]; -export declare type ReverseSegment = [SourceColumn, GeneratedLine, GeneratedColumn]; -export declare const COLUMN = 0; -export declare const SOURCES_INDEX = 1; -export declare const SOURCE_LINE = 2; -export declare const SOURCE_COLUMN = 3; -export declare const NAMES_INDEX = 4; -export declare const REV_GENERATED_LINE = 1; -export declare const REV_GENERATED_COLUMN = 2; -export {}; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts deleted file mode 100644 index bead5c1..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Removes everything after the last "/", but leaves the slash. - */ -export default function stripFilename(path: string | undefined | null): string; diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts deleted file mode 100644 index 8cd4574..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -import type { SourceMapSegment } from './sourcemap-segment'; -import type { SourceMapV3, DecodedSourceMap, EncodedSourceMap, InvalidOriginalMapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, SourceMapInput, Needle, SourceNeedle, SourceMap, EachMapping } from './types'; -export type { SourceMapSegment } from './sourcemap-segment'; -export type { SourceMapInput, SectionedSourceMapInput, DecodedSourceMap, EncodedSourceMap, SectionedSourceMap, InvalidOriginalMapping, OriginalMapping as Mapping, OriginalMapping, InvalidGeneratedMapping, GeneratedMapping, EachMapping, } from './types'; -export declare const LEAST_UPPER_BOUND = -1; -export declare const GREATEST_LOWER_BOUND = 1; -/** - * Returns the encoded (VLQ string) form of the SourceMap's mappings field. - */ -export declare let encodedMappings: (map: TraceMap) => EncodedSourceMap['mappings']; -/** - * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field. - */ -export declare let decodedMappings: (map: TraceMap) => Readonly; -/** - * A low-level API to find the segment associated with a generated line/column (think, from a - * stack trace). Line and column here are 0-based, unlike `originalPositionFor`. - */ -export declare let traceSegment: (map: TraceMap, line: number, column: number) => Readonly | null; -/** - * A higher-level API to find the source/line/column associated with a generated line/column - * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in - * `source-map` library. - */ -export declare let originalPositionFor: (map: TraceMap, needle: Needle) => OriginalMapping | InvalidOriginalMapping; -/** - * Finds the source/line/column directly after the mapping returned by originalPositionFor, provided - * the found mapping is from the same source and line as the originalPositionFor mapping. - * - * Eg, in the code `let id = 1`, `originalPositionAfter` could find the mapping associated with `1` - * using the same needle that would return `id` when calling `originalPositionFor`. - */ -export declare let generatedPositionFor: (map: TraceMap, needle: SourceNeedle) => GeneratedMapping | InvalidGeneratedMapping; -/** - * Iterates each mapping in generated position order. - */ -export declare let eachMapping: (map: TraceMap, cb: (mapping: EachMapping) => void) => void; -/** - * A helper that skips sorting of the input map's mappings array, which can be expensive for larger - * maps. - */ -export declare let presortedDecodedMap: (map: DecodedSourceMap, mapUrl?: string) => TraceMap; -/** - * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -export declare let decodedMap: (map: TraceMap) => Omit & { - mappings: readonly SourceMapSegment[][]; -}; -/** - * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects - * a sourcemap, or to JSON.stringify. - */ -export declare let encodedMap: (map: TraceMap) => EncodedSourceMap; -export { AnyMap } from './any-map'; -export declare class TraceMap implements SourceMap { - version: SourceMapV3['version']; - file: SourceMapV3['file']; - names: SourceMapV3['names']; - sourceRoot: SourceMapV3['sourceRoot']; - sources: SourceMapV3['sources']; - sourcesContent: SourceMapV3['sourcesContent']; - resolvedSources: string[]; - private _encoded; - private _decoded; - private _decodedMemo; - private _bySources; - private _bySourceMemos; - constructor(map: SourceMapInput, mapUrl?: string | null); -} diff --git a/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts b/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts deleted file mode 100644 index 2cc90c0..0000000 --- a/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -import type { SourceMapSegment } from './sourcemap-segment'; -import type { TraceMap } from './trace-mapping'; -export interface SourceMapV3 { - file?: string | null; - names: string[]; - sourceRoot?: string; - sources: (string | null)[]; - sourcesContent?: (string | null)[]; - version: 3; -} -export interface EncodedSourceMap extends SourceMapV3 { - mappings: string; -} -export interface DecodedSourceMap extends SourceMapV3 { - mappings: SourceMapSegment[][]; -} -export interface Section { - offset: { - line: number; - column: number; - }; - map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap; -} -export interface SectionedSourceMap { - file?: string | null; - sections: Section[]; - version: 3; -} -export declare type OriginalMapping = { - source: string | null; - line: number; - column: number; - name: string | null; -}; -export declare type InvalidOriginalMapping = { - source: null; - line: null; - column: null; - name: null; -}; -export declare type GeneratedMapping = { - line: number; - column: number; -}; -export declare type InvalidGeneratedMapping = { - line: null; - column: null; -}; -export declare type SourceMapInput = string | EncodedSourceMap | DecodedSourceMap | TraceMap; -export declare type SectionedSourceMapInput = SourceMapInput | SectionedSourceMap; -export declare type Needle = { - line: number; - column: number; - bias?: 1 | -1; -}; -export declare type SourceNeedle = { - source: string; - line: number; - column: number; - bias?: 1 | -1; -}; -export declare type EachMapping = { - generatedLine: number; - generatedColumn: number; - source: null; - originalLine: null; - originalColumn: null; - name: null; -} | { - generatedLine: number; - generatedColumn: number; - source: string | null; - originalLine: number; - originalColumn: number; - name: string | null; -}; -export declare abstract class SourceMap { - version: SourceMapV3['version']; - file: SourceMapV3['file']; - names: SourceMapV3['names']; - sourceRoot: SourceMapV3['sourceRoot']; - sources: SourceMapV3['sources']; - sourcesContent: SourceMapV3['sourcesContent']; - resolvedSources: SourceMapV3['sources']; -} diff --git a/node_modules/@jridgewell/trace-mapping/package.json b/node_modules/@jridgewell/trace-mapping/package.json deleted file mode 100644 index a957780..0000000 --- a/node_modules/@jridgewell/trace-mapping/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "@jridgewell/trace-mapping", - "version": "0.3.9", - "description": "Trace the original position through a source map", - "keywords": [ - "source", - "map" - ], - "main": "dist/trace-mapping.umd.js", - "module": "dist/trace-mapping.mjs", - "typings": "dist/types/trace-mapping.d.ts", - "files": [ - "dist" - ], - "exports": { - ".": { - "browser": "./dist/trace-mapping.umd.js", - "require": "./dist/trace-mapping.umd.js", - "import": "./dist/trace-mapping.mjs" - }, - "./package.json": "./package.json" - }, - "author": "Justin Ridgewell ", - "repository": { - "type": "git", - "url": "git+https://github.com/jridgewell/trace-mapping.git" - }, - "license": "MIT", - "scripts": { - "benchmark": "run-s build:rollup benchmark:*", - "benchmark:install": "cd benchmark && npm install", - "benchmark:only": "node benchmark/index.mjs", - "build": "run-s -n build:*", - "build:rollup": "rollup -c rollup.config.js", - "build:ts": "tsc --project tsconfig.build.json", - "lint": "run-s -n lint:*", - "lint:prettier": "npm run test:lint:prettier -- --write", - "lint:ts": "npm run test:lint:ts -- --fix", - "prebuild": "rm -rf dist", - "prepublishOnly": "npm run preversion", - "preversion": "run-s test build", - "test": "run-s -n test:lint test:only", - "test:debug": "ava debug", - "test:lint": "run-s -n test:lint:*", - "test:lint:prettier": "prettier --check '{src,test}/**/*.ts' '**/*.md'", - "test:lint:ts": "eslint '{src,test}/**/*.ts'", - "test:only": "c8 ava", - "test:watch": "ava --watch" - }, - "devDependencies": { - "@rollup/plugin-typescript": "8.3.0", - "@typescript-eslint/eslint-plugin": "5.10.0", - "@typescript-eslint/parser": "5.10.0", - "ava": "4.0.1", - "benchmark": "2.1.4", - "c8": "7.11.0", - "esbuild": "0.14.14", - "esbuild-node-loader": "0.6.4", - "eslint": "8.7.0", - "eslint-config-prettier": "8.3.0", - "npm-run-all": "4.1.5", - "prettier": "2.5.1", - "rollup": "2.64.0", - "typescript": "4.5.4" - }, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } -} diff --git a/node_modules/@lukeed/csprng/browser/index.d.ts b/node_modules/@lukeed/csprng/browser/index.d.ts deleted file mode 100644 index 7e42d84..0000000 --- a/node_modules/@lukeed/csprng/browser/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export function random(len: number): T; diff --git a/node_modules/@lukeed/csprng/browser/index.js b/node_modules/@lukeed/csprng/browser/index.js deleted file mode 100644 index df8b656..0000000 --- a/node_modules/@lukeed/csprng/browser/index.js +++ /dev/null @@ -1,5 +0,0 @@ -function random(len) { - return crypto.getRandomValues(new Uint8Array(len)); -} - -exports.random = random; \ No newline at end of file diff --git a/node_modules/@lukeed/csprng/browser/index.min.js b/node_modules/@lukeed/csprng/browser/index.min.js deleted file mode 100644 index d3be73f..0000000 --- a/node_modules/@lukeed/csprng/browser/index.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(e["@lukeed/csprng"]={})}(this,(function(e){e.random=function(e){return crypto.getRandomValues(new Uint8Array(e))}})); \ No newline at end of file diff --git a/node_modules/@lukeed/csprng/browser/index.mjs b/node_modules/@lukeed/csprng/browser/index.mjs deleted file mode 100644 index b65d849..0000000 --- a/node_modules/@lukeed/csprng/browser/index.mjs +++ /dev/null @@ -1,3 +0,0 @@ -export function random(len) { - return crypto.getRandomValues(new Uint8Array(len)); -} diff --git a/node_modules/@lukeed/csprng/index.d.ts b/node_modules/@lukeed/csprng/index.d.ts deleted file mode 100644 index e1f3795..0000000 --- a/node_modules/@lukeed/csprng/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export function random(len: number): T; diff --git a/node_modules/@lukeed/csprng/license b/node_modules/@lukeed/csprng/license deleted file mode 100644 index fa6089f..0000000 --- a/node_modules/@lukeed/csprng/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Luke Edwards (lukeed.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@lukeed/csprng/node/index.d.ts b/node_modules/@lukeed/csprng/node/index.d.ts deleted file mode 100644 index 92f07de..0000000 --- a/node_modules/@lukeed/csprng/node/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export function random(len: number): T; diff --git a/node_modules/@lukeed/csprng/node/index.js b/node_modules/@lukeed/csprng/node/index.js deleted file mode 100644 index c3128a0..0000000 --- a/node_modules/@lukeed/csprng/node/index.js +++ /dev/null @@ -1,7 +0,0 @@ -const { randomBytes } = require('crypto'); - -function random(len) { - return randomBytes(len); -} - -exports.random = random; \ No newline at end of file diff --git a/node_modules/@lukeed/csprng/node/index.min.js b/node_modules/@lukeed/csprng/node/index.min.js deleted file mode 100644 index af3a99e..0000000 --- a/node_modules/@lukeed/csprng/node/index.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(e["@lukeed/csprng"]={})}(this,(function(e){const{randomBytes:n}=require("crypto");e.random=function(e){return n(e)}})); \ No newline at end of file diff --git a/node_modules/@lukeed/csprng/node/index.mjs b/node_modules/@lukeed/csprng/node/index.mjs deleted file mode 100644 index 9b76787..0000000 --- a/node_modules/@lukeed/csprng/node/index.mjs +++ /dev/null @@ -1,5 +0,0 @@ -import { randomBytes } from 'crypto'; - -export function random(len) { - return randomBytes(len); -} diff --git a/node_modules/@lukeed/csprng/package.json b/node_modules/@lukeed/csprng/package.json deleted file mode 100644 index 844b9c8..0000000 --- a/node_modules/@lukeed/csprng/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "version": "1.1.0", - "name": "@lukeed/csprng", - "repository": "lukeed/csprng", - "description": "An alias package for `crypto.randomBytes` in Node.js and/or browsers", - "unpkg": "browser/index.min.js", - "browser": "browser/index.mjs", - "module": "node/index.mjs", - "main": "node/index.js", - "types": "index.d.ts", - "license": "MIT", - "author": { - "name": "Luke Edwards", - "email": "luke.edwards05@gmail.com", - "url": "https://lukeed.com" - }, - "exports": { - ".": { - "browser": { - "types": "./browser/index.d.ts", - "import": "./browser/index.mjs", - "require": "./browser/index.js" - }, - "types": "./node/index.d.ts", - "import": "./node/index.mjs", - "require": "./node/index.js" - }, - "./node": { - "types": "./node/index.d.ts", - "import": "./node/index.mjs", - "require": "./node/index.js" - }, - "./browser": { - "types": "./browser/index.d.ts", - "import": "./browser/index.mjs", - "require": "./browser/index.js" - }, - "./package.json": "./package.json" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "build": "bundt", - "test": "uvu -r esm test" - }, - "files": [ - "*.d.ts", - "browser", - "node" - ], - "modes": { - "browser": "src/browser.js", - "node": "src/node.js" - }, - "keywords": [ - "crypto", - "browser", - "isomorphic", - "getRandomValues", - "randomFill", - "random", - "csprng" - ], - "devDependencies": { - "bundt": "1.1.1", - "esm": "3.2.25", - "uvu": "0.5.2" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/node_modules/@lukeed/csprng/readme.md b/node_modules/@lukeed/csprng/readme.md deleted file mode 100644 index cee48c6..0000000 --- a/node_modules/@lukeed/csprng/readme.md +++ /dev/null @@ -1,76 +0,0 @@ -# @lukeed/csprng ![CI](https://github.com/lukeed/csprng/workflows/CI/badge.svg) [![codecov](https://badgen.now.sh/codecov/c/github/lukeed/csprng)](https://codecov.io/gh/lukeed/csprng) - -> A tiny (~90B) isomorphic wrapper for `crypto.randomBytes` in Node.js and browsers. - -***Why?*** - -This package allows you/dependents to import a cryptographically secure generator (CSPRNG) _without_ worrying about (aka, checking the runtime environment for) the different `crypto` implementations. Instead, by extracting a `random` function into a third-party/external package, one can rely on bundlers and/or module resolution to load the correct implementation for the desired environment. - -In other words, one can include the browser-specific implementation when bundling for the browser, completely ignoring the Node.js code – or vice versa. - -By default, this module is set up to work with Rollup, webpack, and Node's native ESM _and_ CommonJS path resolutions. - -## Install - -``` -$ npm install --save @lukeed/csprng -``` - - -## Usage - -***General Usage*** - -```js -// Rely on bundlers/environment detection -import { random } from '@lukeed/csprng'; - -const array = random(12); -// browser => Uint8Array(12) [...] -// Node.js => -``` - -***Specific Environment*** - -```js -// Choose the "browser" implementation explicitly. -//=> ! NOTE ! Will break in Node.js environments! -import { random } from '@lukeed/csprng/browser'; - -const array = random(1024); -//=> Uint8Array(1024) [...] - -// --- - -// Choose the "node" implementation explicitly. -//=> ! NOTE ! Will break in browser environments! -import { random } from '@lukeed/csprng/node'; - -const array = random(1024); -//=> -``` - - -## API - -### random(length) -Returns: `Buffer` or `Uint8Array` - -Returns a typed array of given `length`. - - -#### length -Type: `Number` - -The desired length of your output TypedArray. - - -## Related - -- [uid](https://github.com/lukeed/uid) - A tiny (134B) and fast utility to randomize unique IDs of fixed length -- [@lukeed/uuid](https://github.com/lukeed/uuid) - A tiny (230B), fast, and cryptographically secure UUID (V4) generator for Node and the browser - - -## License - -MIT © [Luke Edwards](https://lukeed.com) diff --git a/node_modules/@mikro-orm/core/EntityManager.d.ts b/node_modules/@mikro-orm/core/EntityManager.d.ts deleted file mode 100644 index 7af3b61..0000000 --- a/node_modules/@mikro-orm/core/EntityManager.d.ts +++ /dev/null @@ -1,911 +0,0 @@ -import { type Configuration } from './utils/Configuration.js'; -import { Cursor } from './utils/Cursor.js'; -import { EntityFactory } from './entity/EntityFactory.js'; -import { type AssignOptions } from './entity/EntityAssigner.js'; -import { type EntityRepository } from './entity/EntityRepository.js'; -import { EntityLoader, type EntityLoaderOptions } from './entity/EntityLoader.js'; -import { Reference } from './entity/Reference.js'; -import { UnitOfWork } from './unit-of-work/UnitOfWork.js'; -import type { - CountOptions, - DeleteOptions, - FilterOptions, - FindAllOptions, - FindByCursorOptions, - FindOneOptions, - FindOneOrFailOptions, - FindOptions, - GetReferenceOptions, - IDatabaseDriver, - LockOptions, - NativeInsertUpdateOptions, - StreamOptions, - UpdateOptions, - UpsertManyOptions, - UpsertOptions, -} from './drivers/IDatabaseDriver.js'; -import type { - AnyString, - ArrayElement, - AutoPath, - ConnectionType, - Dictionary, - EntityClass, - EntityData, - EntityDictionary, - EntityDTO, - EntityMetadata, - EntityName, - FilterDef, - FilterQuery, - FromEntityType, - GetRepository, - IHydrator, - IsSubset, - Loaded, - MergeLoaded, - MergeSelected, - ObjectQuery, - PopulateOptions, - Primary, - Ref, - RequiredEntityData, - UnboxArray, -} from './typings.js'; -import { FlushMode, LockMode, PopulatePath, type TransactionOptions } from './enums.js'; -import type { MetadataStorage } from './metadata/MetadataStorage.js'; -import type { Transaction } from './connections/Connection.js'; -import { EventManager } from './events/EventManager.js'; -import type { EntityComparator } from './utils/EntityComparator.js'; -/** - * The EntityManager is the central access point to ORM functionality. It is a facade to all different ORM subsystems - * such as UnitOfWork, Query Language, and Repository API. - * @template {IDatabaseDriver} Driver current driver type - */ -export declare class EntityManager { - #private; - readonly config: Configuration; - protected readonly driver: Driver; - protected readonly metadata: MetadataStorage; - protected readonly eventManager: EventManager; - /** @internal */ - readonly '~entities'?: unknown; - /** @internal */ - readonly _id: number; - /** Whether this is the global (root) EntityManager instance. */ - readonly global = false; - /** The context name of this EntityManager, derived from the ORM configuration. */ - readonly name: string; - protected loggerContext?: Dictionary; - /** - * @internal - */ - constructor( - config: Configuration, - driver: Driver, - metadata: MetadataStorage, - useContext?: boolean, - eventManager?: EventManager, - ); - /** - * Gets the Driver instance used by this EntityManager. - * Driver is singleton, for one MikroORM instance, only one driver is created. - */ - getDriver(): Driver; - /** - * Gets the Connection instance, by default returns write connection - */ - getConnection(type?: ConnectionType): ReturnType; - /** - * Gets the platform instance. Just like the driver, platform is singleton, one for a MikroORM instance. - */ - getPlatform(): ReturnType; - /** - * Gets repository for given entity. You can pass either string name or entity class reference. - */ - getRepository = EntityRepository>( - entityName: EntityName, - ): GetRepository; - /** - * Shortcut for `em.getRepository()`. - */ - repo = EntityRepository>( - entityName: EntityName, - ): GetRepository; - /** - * Finds all entities matching your `where` query. You can pass additional options via the `options` parameter. - */ - find< - Entity extends object, - Hint extends string = never, - Fields extends string = PopulatePath.ALL, - Excludes extends string = never, - >( - entityName: EntityName, - where: FilterQuery>, - options?: FindOptions, - ): Promise[]>; - /** - * Finds all entities and returns an async iterable (async generator) that yields results one by one. - * The results are merged and mapped to entity instances, without adding them to the identity map. - * You can disable merging by passing the options `{ mergeResults: false }`. - * With `mergeResults` disabled, to-many collections will contain at most one item, and you will get duplicate - * root entities when there are multiple items in the populated collection. - * This is useful for processing large datasets without loading everything into memory at once. - * - * ```ts - * const stream = em.stream(Book, { populate: ['author'] }); - * - * for await (const book of stream) { - * // book is an instance of Book entity - * console.log(book.title, book.author.name); - * } - * ``` - */ - stream< - Entity extends object, - Hint extends string = never, - Fields extends string = '*', - Excludes extends string = never, - >( - entityName: EntityName, - options?: StreamOptions, Hint, Fields, Excludes>, - ): AsyncIterableIterator>; - /** - * Finds all entities of given type, optionally matching the `where` condition provided in the `options` parameter. - */ - findAll< - Entity extends object, - Hint extends string = never, - Fields extends string = '*', - Excludes extends string = never, - >( - entityName: EntityName, - options?: FindAllOptions, Hint, Fields, Excludes>, - ): Promise[]>; - private getPopulateWhere; - /** - * Registers global filter to this entity manager. Global filters are enabled by default (unless disabled via last parameter). - */ - addFilter(options: FilterDef): void; - /** - * Sets filter parameter values globally inside context defined by this entity manager. - * If you want to set shared value for all contexts, be sure to use the root entity manager. - */ - setFilterParams(name: string, args: Dictionary): void; - /** - * Returns filter parameters for given filter set in this context. - */ - getFilterParams(name: string): T; - /** - * Sets logger context for this entity manager. - */ - setLoggerContext(context: Dictionary): void; - /** - * Gets logger context for this entity manager. - */ - getLoggerContext(options?: { disableContextResolution?: boolean }): T; - /** Sets the flush mode for this EntityManager. Pass `undefined` to reset to the global default. */ - setFlushMode(flushMode?: FlushMode | `${FlushMode}`): void; - protected processWhere< - Entity extends object, - Hint extends string = never, - Fields extends string = '*', - Excludes extends string = never, - >( - entityName: EntityName, - where: FilterQuery, - options: FindOptions | FindOneOptions, - type: 'read' | 'update' | 'delete', - ): Promise>; - protected processUnionWhere( - entityName: EntityName, - options: - | FindOptions - | CountOptions - | UpdateOptions - | DeleteOptions, - type: 'read' | 'update' | 'delete', - ): Promise; - protected applyDiscriminatorCondition( - entityName: EntityName, - where: FilterQuery, - ): FilterQuery; - protected createPopulateWhere( - cond: ObjectQuery, - options: FindOptions | FindOneOptions | CountOptions, - ): ObjectQuery; - protected getJoinedFilters( - meta: EntityMetadata, - options: FindOptions | FindOneOptions, - ): Promise | undefined>; - /** - * When filters are active on M:1 or 1:1 relations, we need to ref join them eagerly as they might affect the FK value. - */ - protected autoJoinRefsForFilters( - meta: EntityMetadata, - options: FindOptions | FindOneOptions, - parent?: { - class: EntityClass; - propName: string; - }, - ): Promise; - /** - * @internal - */ - applyFilters( - entityName: EntityName, - where: FilterQuery | undefined, - options: FilterOptions | undefined, - type: 'read' | 'update' | 'delete', - findOptions?: FindOptions | FindOneOptions, - ): Promise | undefined>; - /** - * Calls `em.find()` and `em.count()` with the same arguments (where applicable) and returns the results as tuple - * where the first element is the array of entities, and the second is the count. - */ - findAndCount< - Entity extends object, - Hint extends string = never, - Fields extends string = '*', - Excludes extends string = never, - >( - entityName: EntityName, - where: FilterQuery>, - options?: FindOptions, - ): Promise<[Loaded[], number]>; - /** - * Calls `em.find()` and `em.count()` with the same arguments (where applicable) and returns the results as {@apilink Cursor} object. - * Supports `before`, `after`, `first` and `last` options while disallowing `limit` and `offset`. Explicit `orderBy` option - * is required. - * - * Use `first` and `after` for forward pagination, or `last` and `before` for backward pagination. - * - * - `first` and `last` are numbers and serve as an alternative to `offset`, those options are mutually exclusive, use only one at a time - * - `before` and `after` specify the previous cursor value, it can be one of the: - * - `Cursor` instance - * - opaque string provided by `startCursor/endCursor` properties - * - POJO/entity instance - * - * ```ts - * const currentCursor = await em.findByCursor(User, { - * first: 10, - * after: previousCursor, // cursor instance - * orderBy: { id: 'desc' }, - * }); - * - * // to fetch next page - * const nextCursor = await em.findByCursor(User, { - * first: 10, - * after: currentCursor.endCursor, // opaque string - * orderBy: { id: 'desc' }, - * }); - * - * // to fetch next page - * const nextCursor2 = await em.findByCursor(User, { - * first: 10, - * after: { id: lastSeenId }, // entity-like POJO - * orderBy: { id: 'desc' }, - * }); - * ``` - * - * The options also support an `includeCount` (true by default) option. If set to false, the `totalCount` is not - * returned as part of the cursor. This is useful for performance reason, when you don't care about the total number - * of pages. - * - * The `Cursor` object provides the following interface: - * - * ```ts - * Cursor { - * items: [ - * User { ... }, - * User { ... }, - * User { ... }, - * ], - * totalCount: 50, // not included if `includeCount: false` - * startCursor: 'WzRd', - * endCursor: 'WzZd', - * hasPrevPage: true, - * hasNextPage: true, - * } - * ``` - */ - findByCursor< - Entity extends object, - Hint extends string = never, - Fields extends string = '*', - Excludes extends string = never, - IncludeCount extends boolean = true, - >( - entityName: EntityName, - options: FindByCursorOptions, - ): Promise>; - /** - * Refreshes the persistent state of an entity from the database, overriding any local changes that have not yet been - * persisted. Returns the same entity instance (same object reference), but re-hydrated. If the entity is no longer - * in database, the method throws an error just like `em.findOneOrFail()` (and respects the same config options). - */ - refreshOrFail< - Entity extends object, - Naked extends FromEntityType = FromEntityType, - Hint extends string = never, - Fields extends string = '*', - Excludes extends string = never, - >( - entity: Entity, - options?: FindOneOrFailOptions, - ): Promise>; - /** - * Refreshes the persistent state of an entity from the database, overriding any local changes that have not yet been - * persisted. Returns the same entity instance (same object reference), but re-hydrated. If the entity is no longer - * in database, the method returns `null`. - */ - refresh< - Entity extends object, - Naked extends FromEntityType = FromEntityType, - Hint extends string = never, - Fields extends string = '*', - Excludes extends string = never, - >( - entity: Entity, - options?: FindOneOptions, - ): Promise | null>; - /** - * Finds first entity matching your `where` query. - */ - findOne< - Entity extends object, - Hint extends string = never, - Fields extends string = '*', - Excludes extends string = never, - >( - entityName: EntityName, - where: FilterQuery>, - options?: FindOneOptions, - ): Promise | null>; - /** - * Finds first entity matching your `where` query. If nothing found, it will throw an error. - * If the `strict` option is specified and nothing is found or more than one matching entity is found, it will throw an error. - * You can override the factory for creating this method via `options.failHandler` locally - * or via `Configuration.findOneOrFailHandler` (`findExactlyOneOrFailHandler` when specifying `strict`) globally. - */ - findOneOrFail< - Entity extends object, - Hint extends string = never, - Fields extends string = '*', - Excludes extends string = never, - >( - entityName: EntityName, - where: FilterQuery>, - options?: FindOneOrFailOptions, - ): Promise>; - /** - * Creates or updates the entity, based on whether it is already present in the database. - * This method performs an `insert on conflict merge` query ensuring the database is in sync, returning a managed - * entity instance. The method accepts either `entityName` together with the entity `data`, or just entity instance. - * - * ```ts - * // insert into "author" ("age", "email") values (33, 'foo@bar.com') on conflict ("email") do update set "age" = 41 - * const author = await em.upsert(Author, { email: 'foo@bar.com', age: 33 }); - * ``` - * - * The entity data needs to contain either the primary key, or any other unique property. Let's consider the following example, where `Author.email` is a unique property: - * - * ```ts - * // insert into "author" ("age", "email") values (33, 'foo@bar.com') on conflict ("email") do update set "age" = 41 - * // select "id" from "author" where "email" = 'foo@bar.com' - * const author = await em.upsert(Author, { email: 'foo@bar.com', age: 33 }); - * ``` - * - * Depending on the driver support, this will either use a returning query, or a separate select query, to fetch the primary key if it's missing from the `data`. - * - * If the entity is already present in current context, there won't be any queries - instead, the entity data will be assigned and an explicit `flush` will be required for those changes to be persisted. - */ - upsert( - entityNameOrEntity: EntityName | Entity, - data?: EntityData | NoInfer, - options?: UpsertOptions, - ): Promise; - /** - * Creates or updates the entity, based on whether it is already present in the database. - * This method performs an `insert on conflict merge` query ensuring the database is in sync, returning a managed - * entity instance. The method accepts either `entityName` together with the entity `data`, or just entity instance. - * - * ```ts - * // insert into "author" ("age", "email") values (33, 'foo@bar.com') on conflict ("email") do update set "age" = 41 - * const authors = await em.upsertMany(Author, [{ email: 'foo@bar.com', age: 33 }, ...]); - * ``` - * - * The entity data needs to contain either the primary key, or any other unique property. Let's consider the following example, where `Author.email` is a unique property: - * - * ```ts - * // insert into "author" ("age", "email") values (33, 'foo@bar.com'), (666, 'lol@lol.lol') on conflict ("email") do update set "age" = excluded."age" - * // select "id" from "author" where "email" = 'foo@bar.com' - * const author = await em.upsertMany(Author, [ - * { email: 'foo@bar.com', age: 33 }, - * { email: 'lol@lol.lol', age: 666 }, - * ]); - * ``` - * - * Depending on the driver support, this will either use a returning query, or a separate select query, to fetch the primary key if it's missing from the `data`. - * - * If the entity is already present in current context, there won't be any queries - instead, the entity data will be assigned and an explicit `flush` will be required for those changes to be persisted. - */ - upsertMany( - entityNameOrEntity: EntityName | Entity[], - data?: (EntityData | NoInfer)[], - options?: UpsertManyOptions, - ): Promise; - /** - * Runs your callback wrapped inside a database transaction. - * - * If a transaction is already active, a new savepoint (nested transaction) will be created by default. This behavior - * can be controlled via the `propagation` option. Use the provided EntityManager instance for all operations that - * should be part of the transaction. You can safely use a global EntityManager instance from a DI container, as this - * method automatically creates an async context for the transaction. - * - * **Concurrency note:** When running multiple transactions concurrently (e.g. in parallel requests or jobs), use the - * `clear: true` option. This ensures the callback runs in a clear fork of the EntityManager, providing full isolation - * between concurrent transactional handlers. Using `clear: true` is an alternative to forking explicitly and calling - * the method on the new fork – it already provides the necessary isolation for safe concurrent usage. - * - * **Propagation note:** Changes made within a transaction (whether top-level or nested) are always propagated to the - * parent context, unless the parent context is a global one. If you want to avoid that, fork the EntityManager first - * and then call this method on the fork. - * - * **Example:** - * ```ts - * await em.transactional(async (em) => { - * const author = new Author('Jon'); - * em.persist(author); - * // flush is called automatically at the end of the callback - * }); - * ``` - */ - transactional(cb: (em: this) => T | Promise, options?: TransactionOptions): Promise; - /** - * Starts new transaction bound to this EntityManager. Use `ctx` parameter to provide the parent when nesting transactions. - */ - begin(options?: Omit): Promise; - /** - * Commits the transaction bound to this EntityManager. Flushes before doing the actual commit query. - */ - commit(): Promise; - /** - * Rollbacks the transaction bound to this EntityManager. - */ - rollback(): Promise; - /** - * Runs your callback wrapped inside a database transaction. - */ - lock(entity: T, lockMode: LockMode, options?: LockOptions | number | Date): Promise; - /** - * Fires native insert query. Calling this has no side effects on the context (identity map). - */ - insert( - entityNameOrEntity: EntityName | Entity, - data?: RequiredEntityData | Entity, - options?: NativeInsertUpdateOptions, - ): Promise>; - /** - * Fires native multi-insert query. Calling this has no side effects on the context (identity map). - */ - insertMany( - entityNameOrEntities: EntityName | Entity[], - data?: RequiredEntityData[] | Entity[], - options?: NativeInsertUpdateOptions, - ): Promise[]>; - /** - * Fires native update query. Calling this has no side effects on the context (identity map). - */ - nativeUpdate( - entityName: EntityName, - where: FilterQuery>, - data: EntityData, - options?: UpdateOptions, - ): Promise; - /** - * Fires native delete query. Calling this has no side effects on the context (identity map). - */ - nativeDelete( - entityName: EntityName, - where: FilterQuery>, - options?: DeleteOptions, - ): Promise; - /** - * Maps raw database result to an entity and merges it to this EntityManager. - */ - map( - entityName: EntityName, - result: EntityDictionary, - options?: { - schema?: string; - }, - ): Entity; - /** - * Merges given entity to this EntityManager so it becomes managed. You can force refreshing of existing entities - * via second parameter. By default, it will return already loaded entities without modifying them. - */ - merge(entity: Entity, options?: MergeOptions): Entity; - /** - * Merges given entity to this EntityManager so it becomes managed. You can force refreshing of existing entities - * via second parameter. By default, it will return already loaded entities without modifying them. - */ - merge( - entityName: EntityName, - data: EntityData | EntityDTO, - options?: MergeOptions, - ): Entity; - /** - * Creates new instance of given entity and populates it with given data. - * The entity constructor will be used unless you provide `{ managed: true }` in the `options` parameter. - * The constructor will be given parameters based on the defined constructor of the entity. If the constructor - * parameter matches a property name, its value will be extracted from `data`. If no matching property exists, - * the whole `data` parameter will be passed. This means we can also define `constructor(data: Partial)` and - * `em.create()` will pass the data into it (unless we have a property named `data` too). - * - * The parameters are strictly checked, you need to provide all required properties. You can use `OptionalProps` - * symbol to omit some properties from this check without making them optional. Alternatively, use `partial: true` - * in the options to disable the strict checks for required properties. This option has no effect on runtime. - * - * The newly created entity will be automatically marked for persistence via `em.persist` unless you disable this - * behavior, either locally via `persist: false` option, or globally via `persistOnCreate` ORM config option. - */ - create< - Entity extends object, - Convert extends boolean = false, - Data extends RequiredEntityData = RequiredEntityData, - >( - entityName: EntityName, - data: Data & IsSubset, Data>, - options?: CreateOptions, - ): Entity; - /** - * Creates new instance of given entity and populates it with given data. - * The entity constructor will be used unless you provide `{ managed: true }` in the `options` parameter. - * The constructor will be given parameters based on the defined constructor of the entity. If the constructor - * parameter matches a property name, its value will be extracted from `data`. If no matching property exists, - * the whole `data` parameter will be passed. This means we can also define `constructor(data: Partial)` and - * `em.create()` will pass the data into it (unless we have a property named `data` too). - * - * The parameters are strictly checked, you need to provide all required properties. You can use `OptionalProps` - * symbol to omit some properties from this check without making them optional. Alternatively, use `partial: true` - * in the options to disable the strict checks for required properties. This option has no effect on runtime. - * - * The newly created entity will be automatically marked for persistence via `em.persist` unless you disable this - * behavior, either locally via `persist: false` option, or globally via `persistOnCreate` ORM config option. - */ - create< - Entity extends object, - Convert extends boolean = false, - Data extends EntityData = EntityData, - >( - entityName: EntityName, - data: Data & IsSubset, Data>, - options: CreateOptions & { - partial: true; - }, - ): Entity; - /** - * Shortcut for `wrap(entity).assign(data, { em })` - */ - assign< - Entity extends object, - Naked extends FromEntityType = FromEntityType, - Convert extends boolean = false, - Data extends EntityData | Partial> = - | EntityData - | Partial>, - >( - entity: Entity | Partial, - data: Data & IsSubset, Data>, - options?: AssignOptions, - ): MergeSelected; - /** - * Gets a reference to the entity identified by the given type and alternate key property without actually loading it. - * The key option specifies which property to use for identity map lookup instead of the primary key. - */ - getReference( - entityName: EntityName, - id: Entity[K], - options: Omit & { - key: K; - wrapped: true; - }, - ): Ref; - /** - * Gets a reference to the entity identified by the given type and alternate key property without actually loading it. - * The key option specifies which property to use for identity map lookup instead of the primary key. - */ - getReference( - entityName: EntityName, - id: Entity[K], - options: Omit & { - key: K; - wrapped?: false; - }, - ): Entity; - /** - * Gets a reference to the entity identified by the given type and identifier without actually loading it, if the entity is not yet loaded - */ - getReference( - entityName: EntityName, - id: Primary, - options: Omit & { - wrapped: true; - }, - ): Ref; - /** - * Gets a reference to the entity identified by the given type and identifier without actually loading it, if the entity is not yet loaded - */ - getReference(entityName: EntityName, id: Primary | Primary[]): Entity; - /** - * Gets a reference to the entity identified by the given type and identifier without actually loading it, if the entity is not yet loaded - */ - getReference( - entityName: EntityName, - id: Primary, - options: Omit & { - wrapped: false; - }, - ): Entity; - /** - * Gets a reference to the entity identified by the given type and identifier without actually loading it, if the entity is not yet loaded - */ - getReference( - entityName: EntityName, - id: Primary, - options?: GetReferenceOptions, - ): Entity | Reference; - /** - * Returns total number of entities matching your `where` query. - */ - count( - entityName: EntityName, - where?: FilterQuery>, - options?: CountOptions, - ): Promise; - /** - * Tells the EntityManager to make an instance managed and persistent. - * The entity will be entered into the database at or before transaction commit or as a result of the flush operation. - */ - persist(entity: Entity | Reference | Iterable>): this; - /** - * Marks entity for removal. - * A removed entity will be removed from the database at or before transaction commit or as a result of the flush operation. - * - * To remove entities by condition, use `em.nativeDelete()`. - */ - remove(entity: Entity | Reference | Iterable>): this; - /** - * Flushes all changes to objects that have been queued up to now to the database. - * This effectively synchronizes the in-memory state of managed objects with the database. - */ - flush(): Promise; - /** - * @internal - */ - tryFlush( - entityName: EntityName, - options: { - flushMode?: FlushMode | AnyString; - }, - ): Promise; - /** - * Clears the EntityManager. All entities that are currently managed by this EntityManager become detached. - */ - clear(): void; - /** - * Checks whether given property can be populated on the entity. - */ - canPopulate(entityName: EntityName, property: string): boolean; - /** - * Loads specified relations in batch. This will execute one query for each relation, that will populate it on all the specified entities. - */ - populate< - Entity extends object, - Naked extends FromEntityType> = FromEntityType>, - Hint extends string = never, - Fields extends string = never, - Excludes extends string = never, - >( - entities: Entity, - populate: readonly AutoPath[] | false, - options?: EntityLoaderOptions, - ): Promise< - Entity extends object[] - ? MergeLoaded, Naked, Hint, Fields, Excludes>[] - : MergeLoaded - >; - /** - * Returns new EntityManager instance with its own identity map - */ - fork(options?: ForkOptions): this; - /** - * Gets the UnitOfWork used by the EntityManager to coordinate operations. - */ - getUnitOfWork(useContext?: boolean): UnitOfWork; - /** - * Gets the EntityFactory used by the EntityManager. - */ - getEntityFactory(): EntityFactory; - /** - * @internal use `em.populate()` as the user facing API, this is exposed only for internal usage - */ - getEntityLoader(): EntityLoader; - /** - * Gets the Hydrator used by the EntityManager. - */ - getHydrator(): IHydrator; - /** - * Gets the EntityManager based on current transaction/request context. - * @internal - */ - getContext(validate?: boolean): this; - /** Gets the EventManager instance used by this EntityManager. */ - getEventManager(): EventManager; - /** - * Checks whether this EntityManager is currently operating inside a database transaction. - */ - isInTransaction(): boolean; - /** - * Gets the transaction context (driver dependent object used to make sure queries are executed on same connection). - */ - getTransactionContext(): T | undefined; - /** - * Sets the transaction context. - */ - setTransactionContext(ctx?: Transaction): void; - /** - * Resets the transaction context. - */ - resetTransactionContext(): void; - /** - * Gets the `MetadataStorage`. - */ - getMetadata(): MetadataStorage; - /** - * Gets the `EntityMetadata` instance when provided with the `entityName` parameter. - */ - getMetadata(entityName: EntityName): EntityMetadata; - /** - * Gets the EntityComparator. - */ - getComparator(): EntityComparator; - private checkLockRequirements; - private lockAndPopulate; - private buildFields; - /** @internal */ - preparePopulate( - entityName: EntityName, - options: Pick< - FindOptions, - 'populate' | 'strategy' | 'fields' | 'flags' | 'filters' | 'exclude' | 'populateHints' - >, - validate?: boolean, - ): Promise[]>; - /** - * when the entity is found in identity map, we check if it was partially loaded or we are trying to populate - * some additional lazy properties, if so, we reload and merge the data from database - */ - protected shouldRefresh( - meta: EntityMetadata, - entity: T, - options: FindOneOptions, - ): boolean; - protected prepareOptions( - options: FindOptions | FindOneOptions | CountOptions, - ): void; - /** - * @internal - */ - cacheKey( - entityName: EntityName, - options: FindOptions | FindOneOptions | CountOptions, - method: string, - where: FilterQuery, - ): unknown[]; - /** - * @internal - */ - tryCache( - entityName: EntityName, - config: boolean | number | [string, number] | undefined, - key: unknown, - refresh?: boolean, - merge?: boolean, - ): Promise< - | { - data?: R | null; - key: string; - } - | undefined - >; - /** - * @internal - */ - storeCache( - config: boolean | number | [string, number] | undefined, - key: { - key: string; - }, - data: T | (() => T), - ): Promise; - /** - * Clears result cache for given cache key. If we want to be able to call this method, - * we need to set the cache key explicitly when storing the cache. - * - * ```ts - * // set the cache key to 'book-cache-key', with expiration of 60s - * const res = await em.find(Book, { ... }, { cache: ['book-cache-key', 60_000] }); - * - * // clear the cache key by name - * await em.clearCache('book-cache-key'); - * ``` - */ - clearCache(cacheKey: string): Promise; - /** - * Returns the default schema of this EntityManager. Respects the context, so global EM will give you the contextual schema - * if executed inside request context handler. - */ - get schema(): string | undefined; - /** - * Sets the default schema of this EntityManager. Respects the context, so global EM will set the contextual schema - * if executed inside request context handler. - */ - set schema(schema: string | null | undefined); - /** @internal */ - getDataLoader(type: 'ref' | '1:m' | 'm:n'): Promise; - /** - * Returns the ID of this EntityManager. Respects the context, so global EM will give you the contextual ID - * if executed inside request context handler. - */ - get id(): number; -} -export interface CreateOptions { - /** creates a managed entity instance instead, bypassing the constructor call */ - managed?: boolean; - /** create entity in a specific schema - alternatively, use `wrap(entity).setSchema()` */ - schema?: string; - /** persist the entity automatically - this is the default behavior and is also configurable globally via `persistOnCreate` option */ - persist?: boolean; - /** this option disables the strict typing which requires all mandatory properties to have value, it has no effect on runtime */ - partial?: boolean; - /** convert raw database values based on mapped types (by default, already converted values are expected) */ - convertCustomTypes?: Convert; - /** - * Property `onCreate` hooks are normally executed during `flush` operation. - * With this option, they will be processed early inside `em.create()` method. - */ - processOnCreateHooksEarly?: boolean; -} -export interface MergeOptions { - refresh?: boolean; - convertCustomTypes?: boolean; - schema?: string; - disableContextResolution?: boolean; - validate?: boolean; - cascade?: boolean /** @default true */; -} -export interface ForkOptions { - /** do we want a clear identity map? defaults to true */ - clear?: boolean; - /** use request context? should be used only for top level request scope EM, defaults to false */ - useContext?: boolean; - /** do we want to use fresh EventManager instance? defaults to false (global instance) */ - freshEventManager?: boolean; - /** do we want to clone current EventManager instance? defaults to false (global instance) */ - cloneEventManager?: boolean; - /** use this flag to ignore the current async context - this is required if we want to call `em.fork()` inside the `getContext` handler */ - disableContextResolution?: boolean; - /** set flush mode for this fork, overrides the global option can be overridden locally via FindOptions */ - flushMode?: FlushMode | `${FlushMode}`; - /** disable transactions for this fork */ - disableTransactions?: boolean; - /** should we keep the transaction context of the parent EM? */ - keepTransactionContext?: boolean; - /** default schema to use for this fork */ - schema?: string; - /** default logger context, can be overridden via {@apilink FindOptions} */ - loggerContext?: Dictionary; -} diff --git a/node_modules/@mikro-orm/core/EntityManager.js b/node_modules/@mikro-orm/core/EntityManager.js deleted file mode 100644 index 2ef2ed5..0000000 --- a/node_modules/@mikro-orm/core/EntityManager.js +++ /dev/null @@ -1,1936 +0,0 @@ -import { getOnConflictReturningFields, getWhereCondition } from './utils/upsert-utils.js'; -import { Utils } from './utils/Utils.js'; -import { Cursor } from './utils/Cursor.js'; -import { QueryHelper } from './utils/QueryHelper.js'; -import { TransactionContext } from './utils/TransactionContext.js'; -import { isRaw, Raw } from './utils/RawQueryFragment.js'; -import { EntityFactory } from './entity/EntityFactory.js'; -import { EntityAssigner } from './entity/EntityAssigner.js'; -import { validateEmptyWhere, validateParams, validatePrimaryKey, validateProperty } from './entity/validators.js'; -import { EntityLoader } from './entity/EntityLoader.js'; -import { Reference } from './entity/Reference.js'; -import { helper } from './entity/wrap.js'; -import { ChangeSet, ChangeSetType } from './unit-of-work/ChangeSet.js'; -import { UnitOfWork } from './unit-of-work/UnitOfWork.js'; -import { - EventType, - FlushMode, - LoadStrategy, - LockMode, - PopulateHint, - PopulatePath, - QueryFlag, - ReferenceKind, - SCALAR_TYPES, -} from './enums.js'; -import { EventManager } from './events/EventManager.js'; -import { TransactionEventBroadcaster } from './events/TransactionEventBroadcaster.js'; -import { OptimisticLockError, ValidationError } from './errors.js'; -import { applyPopulateHints, getLoadingStrategy } from './entity/utils.js'; -import { TransactionManager } from './utils/TransactionManager.js'; -/** - * The EntityManager is the central access point to ORM functionality. It is a facade to all different ORM subsystems - * such as UnitOfWork, Query Language, and Repository API. - * @template {IDatabaseDriver} Driver current driver type - */ -export class EntityManager { - config; - driver; - metadata; - eventManager; - static #counter = 1; - /** @internal */ - _id = EntityManager.#counter++; - /** Whether this is the global (root) EntityManager instance. */ - global = false; - /** The context name of this EntityManager, derived from the ORM configuration. */ - name; - #loaders = {}; - #repositoryMap = new Map(); - #entityLoader; - #comparator; - #entityFactory; - #unitOfWork; - #resultCache; - #filters = {}; - #filterParams = {}; - loggerContext; - #transactionContext; - #disableTransactions; - #flushMode; - #schema; - #useContext; - /** - * @internal - */ - constructor(config, driver, metadata, useContext = true, eventManager = new EventManager(config.get('subscribers'))) { - this.config = config; - this.driver = driver; - this.metadata = metadata; - this.eventManager = eventManager; - this.#useContext = useContext; - this.#entityLoader = new EntityLoader(this); - this.name = this.config.get('contextName'); - this.#comparator = this.config.getComparator(this.metadata); - this.#resultCache = this.config.getResultCacheAdapter(); - this.#disableTransactions = this.config.get('disableTransactions'); - this.#entityFactory = new EntityFactory(this); - this.#unitOfWork = new UnitOfWork(this); - } - /** - * Gets the Driver instance used by this EntityManager. - * Driver is singleton, for one MikroORM instance, only one driver is created. - */ - getDriver() { - return this.driver; - } - /** - * Gets the Connection instance, by default returns write connection - */ - getConnection(type) { - return this.driver.getConnection(type); - } - /** - * Gets the platform instance. Just like the driver, platform is singleton, one for a MikroORM instance. - */ - getPlatform() { - return this.driver.getPlatform(); - } - /** - * Gets repository for given entity. You can pass either string name or entity class reference. - */ - getRepository(entityName) { - const meta = this.metadata.get(entityName); - if (!this.#repositoryMap.has(meta)) { - const RepositoryClass = this.config.getRepositoryClass(meta.repository); - this.#repositoryMap.set(meta, new RepositoryClass(this, entityName)); - } - return this.#repositoryMap.get(meta); - } - /** - * Shortcut for `em.getRepository()`. - */ - repo(entityName) { - return this.getRepository(entityName); - } - /** - * Finds all entities matching your `where` query. You can pass additional options via the `options` parameter. - */ - async find(entityName, where, options = {}) { - if (options.disableIdentityMap ?? this.config.get('disableIdentityMap')) { - const em = this.getContext(false); - const fork = em.fork({ keepTransactionContext: true }); - const ret = await fork.find(entityName, where, { ...options, disableIdentityMap: false }); - fork.clear(); - return ret; - } - const em = this.getContext(); - em.prepareOptions(options); - await em.tryFlush(entityName, options); - where = await em.processWhere(entityName, where, options, 'read'); - validateParams(where); - const meta = this.metadata.get(entityName); - if (meta.orderBy) { - options.orderBy = QueryHelper.mergeOrderBy(options.orderBy, meta.orderBy); - } else { - options.orderBy ??= {}; - } - options.populate = await em.preparePopulate(entityName, options); - const populate = options.populate; - const cacheKey = em.cacheKey(entityName, options, 'em.find', where); - const cached = await em.tryCache(entityName, options.cache, cacheKey, options.refresh, true); - if (cached?.data) { - await em.#entityLoader.populate(entityName, cached.data, populate, { - ...options, - ...em.getPopulateWhere(where, options), - ignoreLazyScalarProperties: true, - lookup: false, - }); - return cached.data; - } - options = { ...options }; - // save the original hint value so we know it was infer/all - options._populateWhere = options.populateWhere ?? this.config.get('populateWhere'); - options.populateWhere = this.createPopulateWhere({ ...where }, options); - options.populateFilter = await this.getJoinedFilters(meta, options); - await em.processUnionWhere(entityName, options, 'read'); - const results = await em.driver.find(entityName, where, { ctx: em.#transactionContext, em, ...options }); - if (results.length === 0) { - await em.storeCache(options.cache, cached, []); - return []; - } - const ret = []; - for (const data of results) { - const entity = em.#entityFactory.create(entityName, data, { - merge: true, - refresh: options.refresh, - schema: options.schema, - convertCustomTypes: true, - }); - ret.push(entity); - } - const unique = Utils.unique(ret); - await em.#entityLoader.populate(entityName, unique, populate, { - ...options, - ...em.getPopulateWhere(where, options), - ignoreLazyScalarProperties: true, - lookup: false, - }); - await em.#unitOfWork.dispatchOnLoadEvent(); - if (meta.virtual) { - await em.storeCache(options.cache, cached, () => ret); - } else { - await em.storeCache(options.cache, cached, () => unique.map(e => helper(e).toPOJO())); - } - return unique; - } - /** - * Finds all entities and returns an async iterable (async generator) that yields results one by one. - * The results are merged and mapped to entity instances, without adding them to the identity map. - * You can disable merging by passing the options `{ mergeResults: false }`. - * With `mergeResults` disabled, to-many collections will contain at most one item, and you will get duplicate - * root entities when there are multiple items in the populated collection. - * This is useful for processing large datasets without loading everything into memory at once. - * - * ```ts - * const stream = em.stream(Book, { populate: ['author'] }); - * - * for await (const book of stream) { - * // book is an instance of Book entity - * console.log(book.title, book.author.name); - * } - * ``` - */ - async *stream(entityName, options = {}) { - const em = this.getContext(); - em.prepareOptions(options); - options.strategy = 'joined'; - await em.tryFlush(entityName, options); - const where = await em.processWhere(entityName, options.where ?? {}, options, 'read'); - validateParams(where); - options.orderBy = options.orderBy || {}; - options.populate = await em.preparePopulate(entityName, options); - const meta = this.metadata.get(entityName); - options = { ...options }; - // save the original hint value so we know it was infer/all - options._populateWhere = options.populateWhere ?? this.config.get('populateWhere'); - options.populateWhere = this.createPopulateWhere({ ...where }, options); - options.populateFilter = await this.getJoinedFilters(meta, options); - const stream = em.driver.stream(entityName, where, { - ctx: em.#transactionContext, - mapResults: false, - ...options, - }); - for await (const data of stream) { - const fork = em.fork(); - const entity = fork.#entityFactory.create(entityName, data, { - refresh: options.refresh, - schema: options.schema, - convertCustomTypes: true, - }); - helper(entity).setSerializationContext({ - populate: options.populate, - fields: options.fields, - exclude: options.exclude, - }); - await fork.#unitOfWork.dispatchOnLoadEvent(); - fork.clear(); - yield entity; - } - } - /** - * Finds all entities of given type, optionally matching the `where` condition provided in the `options` parameter. - */ - async findAll(entityName, options) { - return this.find(entityName, options?.where ?? {}, options); - } - getPopulateWhere(where, options) { - if (options.populateWhere === undefined) { - options.populateWhere = this.config.get('populateWhere'); - } - if (options.populateWhere === PopulateHint.ALL) { - return { where: {}, populateWhere: options.populateWhere }; - } - /* v8 ignore next */ - if (options.populateWhere === PopulateHint.INFER) { - return { where, populateWhere: options.populateWhere }; - } - return { where: options.populateWhere }; - } - /** - * Registers global filter to this entity manager. Global filters are enabled by default (unless disabled via last parameter). - */ - addFilter(options) { - if (options.entity) { - options.entity = Utils.asArray(options.entity).map(n => Utils.className(n)); - } - options.default ??= true; - this.getContext(false).#filters[options.name] = options; - } - /** - * Sets filter parameter values globally inside context defined by this entity manager. - * If you want to set shared value for all contexts, be sure to use the root entity manager. - */ - setFilterParams(name, args) { - this.getContext().#filterParams[name] = args; - } - /** - * Returns filter parameters for given filter set in this context. - */ - getFilterParams(name) { - return this.getContext().#filterParams[name]; - } - /** - * Sets logger context for this entity manager. - */ - setLoggerContext(context) { - this.getContext().loggerContext = context; - } - /** - * Gets logger context for this entity manager. - */ - getLoggerContext(options) { - const em = options?.disableContextResolution ? this : this.getContext(); - em.loggerContext ??= {}; - return em.loggerContext; - } - /** Sets the flush mode for this EntityManager. Pass `undefined` to reset to the global default. */ - setFlushMode(flushMode) { - this.getContext(false).#flushMode = flushMode; - } - async processWhere(entityName, where, options, type) { - where = QueryHelper.processWhere({ - where, - entityName, - metadata: this.metadata, - platform: this.driver.getPlatform(), - convertCustomTypes: options.convertCustomTypes, - aliased: type === 'read', - }); - where = await this.applyFilters(entityName, where, options.filters ?? {}, type, options); - where = this.applyDiscriminatorCondition(entityName, where); - return where; - } - async processUnionWhere(entityName, options, type) { - if (options.unionWhere?.length) { - if (!this.driver.getPlatform().supportsUnionWhere()) { - throw new Error(`unionWhere is only supported on SQL drivers`); - } - options.unionWhere = await Promise.all( - options.unionWhere.map(branch => this.processWhere(entityName, branch, options, type)), - ); - } - } - // this method only handles the problem for mongo driver, SQL drivers have their implementation inside QueryBuilder - applyDiscriminatorCondition(entityName, where) { - const meta = this.metadata.find(entityName); - if (meta?.root.inheritanceType !== 'sti' || !meta?.discriminatorValue) { - return where; - } - const types = Object.values(meta.root.discriminatorMap).map(cls => this.metadata.get(cls)); - const children = []; - const lookUpChildren = (ret, type) => { - const children = types.filter(meta2 => meta2.extends === type); - children.forEach(m => lookUpChildren(ret, m.class)); - ret.push(...children.filter(c => c.discriminatorValue)); - return children; - }; - lookUpChildren(children, meta.class); - /* v8 ignore next */ - where[meta.root.discriminatorColumn] = - children.length > 0 - ? { $in: [meta.discriminatorValue, ...children.map(c => c.discriminatorValue)] } - : meta.discriminatorValue; - return where; - } - createPopulateWhere(cond, options) { - const ret = {}; - const populateWhere = options.populateWhere ?? this.config.get('populateWhere'); - if (populateWhere === PopulateHint.INFER) { - Utils.merge(ret, cond); - } else if (typeof populateWhere === 'object') { - Utils.merge(ret, populateWhere); - } - return ret; - } - async getJoinedFilters(meta, options) { - // If user provided populateFilter, merge it with computed filters - const userFilter = options.populateFilter; - if (!this.config.get('filtersOnRelations') || !options.populate) { - return userFilter; - } - const ret = {}; - for (const hint of options.populate) { - const field = hint.field.split(':')[0]; - const prop = meta.properties[field]; - const strategy = getLoadingStrategy( - prop.strategy || hint.strategy || options.strategy || this.config.get('loadStrategy'), - prop.kind, - ); - const joined = strategy === LoadStrategy.JOINED && prop.kind !== ReferenceKind.SCALAR; - if (!joined && !hint.filter) { - continue; - } - const filters = QueryHelper.mergePropertyFilters(prop.filters, options.filters); - const where = await this.applyFilters(prop.targetMeta.class, {}, filters, 'read', { - ...options, - populate: hint.children, - }); - const where2 = await this.getJoinedFilters(prop.targetMeta, { - ...options, - filters, - populate: hint.children, - populateWhere: PopulateHint.ALL, - }); - if (Utils.hasObjectKeys(where)) { - ret[field] = ret[field] ? { $and: [where, ret[field]] } : where; - } - if (where2 && Utils.hasObjectKeys(where2)) { - if (ret[field]) { - Utils.merge(ret[field], where2); - } else { - ret[field] = where2; - } - } - } - // Merge user-provided populateFilter with computed filters - if (userFilter) { - Utils.merge(ret, userFilter); - } - return Utils.hasObjectKeys(ret) ? ret : undefined; - } - /** - * When filters are active on M:1 or 1:1 relations, we need to ref join them eagerly as they might affect the FK value. - */ - async autoJoinRefsForFilters(meta, options, parent) { - if (!meta || !this.config.get('autoJoinRefsForFilters') || options.filters === false) { - return; - } - const ret = options.populate; - for (const prop of meta.relations) { - if ( - prop.object || - ![ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) || - !( - (options.fields?.length ?? 0) === 0 || - options.fields?.some(f => prop.name === f || prop.name.startsWith(`${String(f)}.`)) - ) || - (parent?.class === prop.targetMeta.root.class && parent.propName === prop.inversedBy) - ) { - continue; - } - options = { ...options, filters: QueryHelper.mergePropertyFilters(prop.filters, options.filters) }; - const cond = await this.applyFilters(prop.targetMeta.class, {}, options.filters, 'read', options); - if (!Utils.isEmpty(cond)) { - const populated = options.populate.filter(({ field }) => field.split(':')[0] === prop.name); - let found = false; - for (const hint of populated) { - if (!hint.all) { - hint.filter = true; - } - const strategy = getLoadingStrategy( - prop.strategy || hint.strategy || options.strategy || this.config.get('loadStrategy'), - prop.kind, - ); - if (hint.field === `${prop.name}:ref` || (hint.filter && strategy === LoadStrategy.JOINED)) { - found = true; - } - } - if (!found) { - ret.push({ field: `${prop.name}:ref`, strategy: LoadStrategy.JOINED, filter: true }); - } - } - } - for (const hint of ret) { - const [field, ref] = hint.field.split(':'); - const prop = meta?.properties[field]; - if (prop && !ref) { - hint.children ??= []; - await this.autoJoinRefsForFilters( - prop.targetMeta, - { ...options, populate: hint.children }, - { class: meta.root.class, propName: prop.name }, - ); - } - } - } - /** - * @internal - */ - async applyFilters(entityName, where, options, type, findOptions) { - const meta = this.metadata.get(entityName); - const filters = []; - const ret = []; - const active = new Set(); - const push = source => { - const activeFilters = QueryHelper.getActiveFilters(meta, options, source).filter(f => !active.has(f.name)); - filters.push(...activeFilters); - activeFilters.forEach(f => active.add(f.name)); - }; - push(this.config.get('filters')); - push(this.#filters); - push(meta.filters); - if (filters.length === 0) { - return where; - } - for (const filter of filters) { - let cond; - if (filter.cond instanceof Function) { - // @ts-ignore - // oxfmt-ignore - const args = Utils.isPlainObject(options?.[filter.name]) ? options[filter.name] : this.getContext().#filterParams[filter.name]; - if (!args && filter.cond.length > 0 && filter.args !== false) { - throw new Error(`No arguments provided for filter '${filter.name}'`); - } - cond = await filter.cond(args, type, this, findOptions, Utils.className(entityName)); - } else { - cond = filter.cond; - } - cond = QueryHelper.processWhere({ - where: cond, - entityName, - metadata: this.metadata, - platform: this.driver.getPlatform(), - aliased: type === 'read', - }); - if (filter.strict) { - Object.defineProperty(cond, '__strict', { value: filter.strict, enumerable: false }); - } - ret.push(cond); - } - const conds = [...ret, where].filter(c => Utils.hasObjectKeys(c) || Raw.hasObjectFragments(c)); - return conds.length > 1 ? { $and: conds } : conds[0]; - } - /** - * Calls `em.find()` and `em.count()` with the same arguments (where applicable) and returns the results as tuple - * where the first element is the array of entities, and the second is the count. - */ - async findAndCount(entityName, where, options = {}) { - const em = this.getContext(false); - await em.tryFlush(entityName, options); - options.flushMode = 'commit'; // do not try to auto flush again - return Promise.all([em.find(entityName, where, options), em.count(entityName, where, options)]); - } - /** - * Calls `em.find()` and `em.count()` with the same arguments (where applicable) and returns the results as {@apilink Cursor} object. - * Supports `before`, `after`, `first` and `last` options while disallowing `limit` and `offset`. Explicit `orderBy` option - * is required. - * - * Use `first` and `after` for forward pagination, or `last` and `before` for backward pagination. - * - * - `first` and `last` are numbers and serve as an alternative to `offset`, those options are mutually exclusive, use only one at a time - * - `before` and `after` specify the previous cursor value, it can be one of the: - * - `Cursor` instance - * - opaque string provided by `startCursor/endCursor` properties - * - POJO/entity instance - * - * ```ts - * const currentCursor = await em.findByCursor(User, { - * first: 10, - * after: previousCursor, // cursor instance - * orderBy: { id: 'desc' }, - * }); - * - * // to fetch next page - * const nextCursor = await em.findByCursor(User, { - * first: 10, - * after: currentCursor.endCursor, // opaque string - * orderBy: { id: 'desc' }, - * }); - * - * // to fetch next page - * const nextCursor2 = await em.findByCursor(User, { - * first: 10, - * after: { id: lastSeenId }, // entity-like POJO - * orderBy: { id: 'desc' }, - * }); - * ``` - * - * The options also support an `includeCount` (true by default) option. If set to false, the `totalCount` is not - * returned as part of the cursor. This is useful for performance reason, when you don't care about the total number - * of pages. - * - * The `Cursor` object provides the following interface: - * - * ```ts - * Cursor { - * items: [ - * User { ... }, - * User { ... }, - * User { ... }, - * ], - * totalCount: 50, // not included if `includeCount: false` - * startCursor: 'WzRd', - * endCursor: 'WzZd', - * hasPrevPage: true, - * hasNextPage: true, - * } - * ``` - */ - async findByCursor(entityName, options) { - const em = this.getContext(false); - options.overfetch ??= true; - options.where ??= {}; - if (Utils.isEmpty(options.orderBy) && !Raw.hasObjectFragments(options.orderBy)) { - throw new Error('Explicit `orderBy` option required'); - } - const [entities, count] = - options.includeCount !== false - ? await em.findAndCount(entityName, options.where, options) - : [await em.find(entityName, options.where, options)]; - return new Cursor(entities, count, options, this.metadata.get(entityName)); - } - /** - * Refreshes the persistent state of an entity from the database, overriding any local changes that have not yet been - * persisted. Returns the same entity instance (same object reference), but re-hydrated. If the entity is no longer - * in database, the method throws an error just like `em.findOneOrFail()` (and respects the same config options). - */ - async refreshOrFail(entity, options = {}) { - const ret = await this.refresh(entity, options); - if (!ret) { - options.failHandler ??= this.config.get('findOneOrFailHandler'); - const wrapped = helper(entity); - const where = wrapped.getPrimaryKey(); - throw options.failHandler(wrapped.__meta.className, where); - } - return ret; - } - /** - * Refreshes the persistent state of an entity from the database, overriding any local changes that have not yet been - * persisted. Returns the same entity instance (same object reference), but re-hydrated. If the entity is no longer - * in database, the method returns `null`. - */ - async refresh(entity, options = {}) { - const fork = this.fork({ keepTransactionContext: true }); - const wrapped = helper(entity); - const reloaded = await fork.findOne(wrapped.__meta.class, entity, { - schema: wrapped.__schema, - ...options, - flushMode: FlushMode.COMMIT, - }); - const em = this.getContext(); - if (!reloaded) { - em.#unitOfWork.unsetIdentity(entity); - return null; - } - let found = false; - for (const e of fork.#unitOfWork.getIdentityMap()) { - const ref = em.getReference(e.constructor, helper(e).getPrimaryKey()); - const data = helper(e).serialize({ ignoreSerializers: true, includeHidden: true, convertCustomTypes: false }); - em.config - .getHydrator(this.metadata) - .hydrate(ref, helper(ref).__meta, data, em.#entityFactory, 'full', false, false); - Utils.merge(helper(ref).__originalEntityData, this.#comparator.prepareEntity(e)); - found ||= ref === entity; - } - if (!found) { - const data = helper(reloaded).serialize({ - ignoreSerializers: true, - includeHidden: true, - convertCustomTypes: true, - }); - em.config - .getHydrator(this.metadata) - .hydrate(entity, wrapped.__meta, data, em.#entityFactory, 'full', false, true); - Utils.merge(wrapped.__originalEntityData, this.#comparator.prepareEntity(reloaded)); - } - return entity; - } - /** - * Finds first entity matching your `where` query. - */ - async findOne(entityName, where, options = {}) { - if (options.disableIdentityMap ?? this.config.get('disableIdentityMap')) { - const em = this.getContext(false); - const fork = em.fork({ keepTransactionContext: true }); - const ret = await fork.findOne(entityName, where, { ...options, disableIdentityMap: false }); - fork.clear(); - return ret; - } - const em = this.getContext(); - em.prepareOptions(options); - let entity = em.#unitOfWork.tryGetById(entityName, where, options.schema); - // query for a not managed entity which is already in the identity map as it - // was provided with a PK this entity does not exist in the db, there can't - // be any relations to it, so no need to deal with the populate hint - if (entity && !helper(entity).__managed) { - return entity; - } - await em.tryFlush(entityName, options); - const meta = em.metadata.get(entityName); - where = await em.processWhere(entityName, where, options, 'read'); - validateEmptyWhere(where); - em.checkLockRequirements(options.lockMode, meta); - const isOptimisticLocking = options.lockMode == null || options.lockMode === LockMode.OPTIMISTIC; - if (entity && !em.shouldRefresh(meta, entity, options) && isOptimisticLocking) { - return em.lockAndPopulate(meta, entity, where, options); - } - validateParams(where); - options.populate = await em.preparePopulate(entityName, options); - const cacheKey = em.cacheKey(entityName, options, 'em.findOne', where); - const cached = await em.tryCache(entityName, options.cache, cacheKey, options.refresh, true); - if (cached?.data !== undefined) { - if (cached.data) { - await em.#entityLoader.populate(entityName, [cached.data], options.populate, { - ...options, - ...em.getPopulateWhere(where, options), - ignoreLazyScalarProperties: true, - lookup: false, - }); - } - return cached.data; - } - options = { ...options }; - // save the original hint value so we know it was infer/all - options._populateWhere = options.populateWhere ?? this.config.get('populateWhere'); - options.populateWhere = this.createPopulateWhere({ ...where }, options); - options.populateFilter = await this.getJoinedFilters(meta, options); - await em.processUnionWhere(entityName, options, 'read'); - const data = await em.driver.findOne(entityName, where, { - ctx: em.#transactionContext, - em, - ...options, - }); - if (!data) { - await em.storeCache(options.cache, cached, null); - return null; - } - entity = em.#entityFactory.create(entityName, data, { - merge: true, - refresh: options.refresh, - schema: options.schema, - convertCustomTypes: true, - }); - await em.lockAndPopulate(meta, entity, where, options); - await em.#unitOfWork.dispatchOnLoadEvent(); - await em.storeCache(options.cache, cached, () => helper(entity).toPOJO()); - return entity; - } - /** - * Finds first entity matching your `where` query. If nothing found, it will throw an error. - * If the `strict` option is specified and nothing is found or more than one matching entity is found, it will throw an error. - * You can override the factory for creating this method via `options.failHandler` locally - * or via `Configuration.findOneOrFailHandler` (`findExactlyOneOrFailHandler` when specifying `strict`) globally. - */ - async findOneOrFail(entityName, where, options = {}) { - let entity; - let isStrictViolation = false; - if (options.strict) { - const ret = await this.find(entityName, where, { ...options, limit: 2 }); - isStrictViolation = ret.length !== 1; - entity = ret[0]; - } else { - entity = await this.findOne(entityName, where, options); - } - if (!entity || isStrictViolation) { - const key = options.strict ? 'findExactlyOneOrFailHandler' : 'findOneOrFailHandler'; - options.failHandler ??= this.config.get(key); - const name = Utils.className(entityName); - /* v8 ignore next */ - where = Utils.isEntity(where) ? helper(where).getPrimaryKey() : where; - throw options.failHandler(name, where); - } - return entity; - } - /** - * Creates or updates the entity, based on whether it is already present in the database. - * This method performs an `insert on conflict merge` query ensuring the database is in sync, returning a managed - * entity instance. The method accepts either `entityName` together with the entity `data`, or just entity instance. - * - * ```ts - * // insert into "author" ("age", "email") values (33, 'foo@bar.com') on conflict ("email") do update set "age" = 41 - * const author = await em.upsert(Author, { email: 'foo@bar.com', age: 33 }); - * ``` - * - * The entity data needs to contain either the primary key, or any other unique property. Let's consider the following example, where `Author.email` is a unique property: - * - * ```ts - * // insert into "author" ("age", "email") values (33, 'foo@bar.com') on conflict ("email") do update set "age" = 41 - * // select "id" from "author" where "email" = 'foo@bar.com' - * const author = await em.upsert(Author, { email: 'foo@bar.com', age: 33 }); - * ``` - * - * Depending on the driver support, this will either use a returning query, or a separate select query, to fetch the primary key if it's missing from the `data`. - * - * If the entity is already present in current context, there won't be any queries - instead, the entity data will be assigned and an explicit `flush` will be required for those changes to be persisted. - */ - async upsert(entityNameOrEntity, data, options = {}) { - if (options.disableIdentityMap ?? this.config.get('disableIdentityMap')) { - const em = this.getContext(false); - const fork = em.fork({ keepTransactionContext: true }); - const ret = await fork.upsert(entityNameOrEntity, data, { ...options, disableIdentityMap: false }); - fork.clear(); - return ret; - } - const em = this.getContext(false); - em.prepareOptions(options); - let entityName; - let where; - let entity = null; - if (data === undefined) { - entityName = entityNameOrEntity.constructor; - data = entityNameOrEntity; - } else { - entityName = entityNameOrEntity; - } - const meta = this.metadata.get(entityName); - const convertCustomTypes = !Utils.isEntity(data); - if (Utils.isEntity(data)) { - entity = data; - if (helper(entity).__managed && helper(entity).__em === em && !this.config.get('upsertManaged')) { - em.#entityFactory.mergeData(meta, entity, data, { initialized: true }); - return entity; - } - where = helper(entity).getPrimaryKey(); - data = em.#comparator.prepareEntity(entity); - } else { - data = Utils.copy(QueryHelper.processParams(data)); - where = Utils.extractPK(data, meta); - if (where && !this.config.get('upsertManaged')) { - const exists = em.#unitOfWork.getById(entityName, where, options.schema); - if (exists) { - return em.assign(exists, data); - } - } - } - where = getWhereCondition(meta, options.onConflictFields, data, where).where; - data = QueryHelper.processObjectParams(data); - validateParams(data, 'insert data'); - if (em.eventManager.hasListeners(EventType.beforeUpsert, meta)) { - await em.eventManager.dispatchEvent(EventType.beforeUpsert, { entity: data, em, meta }, meta); - } - const ret = await em.driver.nativeUpdate(entityName, where, data, { - ctx: em.#transactionContext, - upsert: true, - convertCustomTypes, - ...options, - }); - em.#unitOfWork.getChangeSetPersister().mapReturnedValues(entity, data, ret.row, meta, true); - entity ??= em.#entityFactory.create(entityName, data, { - refresh: true, - initialized: true, - schema: options.schema, - }); - const uniqueFields = - options.onConflictFields ?? (Utils.isPlainObject(where) ? Object.keys(where) : meta.primaryKeys); - const returning = getOnConflictReturningFields(meta, data, uniqueFields, options); - if ( - options.onConflictAction === 'ignore' || - !helper(entity).hasPrimaryKey() || - (returning.length > 0 && !(this.getPlatform().usesReturningStatement() && ret.row)) - ) { - const where = {}; - if (Array.isArray(uniqueFields)) { - for (const prop of uniqueFields) { - if (data[prop] != null) { - where[prop] = data[prop]; - } else if (meta.primaryKeys.includes(prop) && ret.insertId != null) { - where[prop] = ret.insertId; - } - } - } else { - Object.keys(data).forEach(prop => { - where[prop] = data[prop]; - }); - if (meta.simplePK && ret.insertId != null) { - where[meta.primaryKeys[0]] = ret.insertId; - } - } - const data2 = await this.driver.findOne(meta.class, where, { - fields: returning, - ctx: em.#transactionContext, - convertCustomTypes: true, - connectionType: 'write', - schema: options.schema, - }); - em.getHydrator().hydrate(entity, meta, data2, em.#entityFactory, 'full', false, true); - } - // recompute the data as there might be some values missing (e.g. those with db column defaults) - const snapshot = this.#comparator.prepareEntity(entity); - em.#unitOfWork.register(entity, snapshot, { refresh: true }); - if (em.eventManager.hasListeners(EventType.afterUpsert, meta)) { - await em.eventManager.dispatchEvent(EventType.afterUpsert, { entity, em, meta }, meta); - } - return entity; - } - /** - * Creates or updates the entity, based on whether it is already present in the database. - * This method performs an `insert on conflict merge` query ensuring the database is in sync, returning a managed - * entity instance. The method accepts either `entityName` together with the entity `data`, or just entity instance. - * - * ```ts - * // insert into "author" ("age", "email") values (33, 'foo@bar.com') on conflict ("email") do update set "age" = 41 - * const authors = await em.upsertMany(Author, [{ email: 'foo@bar.com', age: 33 }, ...]); - * ``` - * - * The entity data needs to contain either the primary key, or any other unique property. Let's consider the following example, where `Author.email` is a unique property: - * - * ```ts - * // insert into "author" ("age", "email") values (33, 'foo@bar.com'), (666, 'lol@lol.lol') on conflict ("email") do update set "age" = excluded."age" - * // select "id" from "author" where "email" = 'foo@bar.com' - * const author = await em.upsertMany(Author, [ - * { email: 'foo@bar.com', age: 33 }, - * { email: 'lol@lol.lol', age: 666 }, - * ]); - * ``` - * - * Depending on the driver support, this will either use a returning query, or a separate select query, to fetch the primary key if it's missing from the `data`. - * - * If the entity is already present in current context, there won't be any queries - instead, the entity data will be assigned and an explicit `flush` will be required for those changes to be persisted. - */ - async upsertMany(entityNameOrEntity, data, options = {}) { - if (options.disableIdentityMap ?? this.config.get('disableIdentityMap')) { - const em = this.getContext(false); - const fork = em.fork({ keepTransactionContext: true }); - const ret = await fork.upsertMany(entityNameOrEntity, data, { ...options, disableIdentityMap: false }); - fork.clear(); - return ret; - } - const em = this.getContext(false); - em.prepareOptions(options); - let entityName; - let propIndex; - if (data === undefined) { - entityName = entityNameOrEntity[0].constructor; - data = entityNameOrEntity; - } else { - entityName = entityNameOrEntity; - } - const batchSize = options.batchSize ?? this.config.get('batchSize'); - if (data.length > batchSize) { - const ret = []; - for (let i = 0; i < data.length; i += batchSize) { - const chunk = data.slice(i, i + batchSize); - ret.push(...(await this.upsertMany(entityName, chunk, options))); - } - return ret; - } - const meta = this.metadata.get(entityName); - const convertCustomTypes = !Utils.isEntity(data[0]); - const allData = []; - const allWhere = []; - const entities = new Map(); - const entitiesByData = new Map(); - for (let i = 0; i < data.length; i++) { - let row = data[i]; - let where; - if (Utils.isEntity(row)) { - const entity = row; - if (helper(entity).__managed && helper(entity).__em === em && !this.config.get('upsertManaged')) { - em.#entityFactory.mergeData(meta, entity, row, { initialized: true }); - entities.set(entity, row); - entitiesByData.set(row, entity); - continue; - } - where = helper(entity).getPrimaryKey(); - row = em.#comparator.prepareEntity(entity); - } else { - row = data[i] = Utils.copy(QueryHelper.processParams(row)); - where = Utils.extractPK(row, meta); - if (where && !this.config.get('upsertManaged')) { - const exists = em.#unitOfWork.getById(entityName, where, options.schema); - if (exists) { - em.assign(exists, row); - entities.set(exists, row); - entitiesByData.set(row, exists); - continue; - } - } - } - const unique = options.onConflictFields ?? meta.props.filter(p => p.unique).map(p => p.name); - propIndex = !isRaw(unique) && unique.findIndex(p => data[p] ?? data[p.substring(0, p.indexOf('.'))] != null); - const tmp = getWhereCondition(meta, options.onConflictFields, row, where); - propIndex = tmp.propIndex; - where = QueryHelper.processWhere({ - where: tmp.where, - entityName, - metadata: this.metadata, - platform: this.getPlatform(), - }); - row = QueryHelper.processObjectParams(row); - validateParams(row, 'insert data'); - allData.push(row); - allWhere.push(where); - } - if (entities.size === data.length) { - return [...entities.keys()]; - } - if (em.eventManager.hasListeners(EventType.beforeUpsert, meta)) { - for (const dto of data) { - const entity = entitiesByData.get(dto) ?? dto; - await em.eventManager.dispatchEvent(EventType.beforeUpsert, { entity, em, meta }, meta); - } - } - const res = await em.driver.nativeUpdateMany(entityName, allWhere, allData, { - ctx: em.#transactionContext, - upsert: true, - convertCustomTypes, - ...options, - }); - entities.clear(); - entitiesByData.clear(); - const loadPK = new Map(); - allData.forEach((row, i) => { - em.#unitOfWork - .getChangeSetPersister() - .mapReturnedValues( - Utils.isEntity(data[i]) ? data[i] : null, - Utils.isEntity(data[i]) ? {} : data[i], - res.rows?.[i], - meta, - true, - ); - const entity = Utils.isEntity(data[i]) - ? data[i] - : em.#entityFactory.create(entityName, row, { - refresh: true, - initialized: true, - schema: options.schema, - }); - if (!helper(entity).hasPrimaryKey()) { - loadPK.set(entity, allWhere[i]); - } - entities.set(entity, row); - entitiesByData.set(row, entity); - }); - // skip if we got the PKs via returning statement (`rows`) - // oxfmt-ignore - const uniqueFields = options.onConflictFields ?? (Utils.isPlainObject(allWhere[0]) ? Object.keys(allWhere[0]).flatMap(key => Utils.splitPrimaryKeys(key)) : meta.primaryKeys); - const returning = getOnConflictReturningFields(meta, data[0], uniqueFields, options); - const reloadFields = returning.length > 0 && !(this.getPlatform().usesReturningStatement() && res.rows?.length); - if (options.onConflictAction === 'ignore' || (!res.rows?.length && loadPK.size > 0) || reloadFields) { - const unique = meta.hydrateProps.filter(p => !p.lazy).map(p => p.name); - const add = new Set(propIndex !== false && propIndex >= 0 ? [unique[propIndex]] : []); - for (const cond of loadPK.values()) { - Utils.keys(cond).forEach(key => add.add(key)); - } - const where = { $or: [] }; - data.forEach((item, idx) => { - where.$or[idx] = {}; - const props = Array.isArray(uniqueFields) ? uniqueFields : Object.keys(item); - props.forEach(prop => { - where.$or[idx][prop] = item[prop]; - }); - }); - const data2 = await this.driver.find(meta.class, where, { - fields: returning.concat(...add).concat(...(Array.isArray(uniqueFields) ? uniqueFields : [])), - ctx: em.#transactionContext, - convertCustomTypes: true, - connectionType: 'write', - schema: options.schema, - }); - for (const [entity, cond] of loadPK.entries()) { - const row = data2.find(row => { - const tmp = {}; - add.forEach(k => { - if (!meta.properties[k]?.primary) { - tmp[k] = row[k]; - } - }); - return this.#comparator.matching(entityName, cond, tmp); - }); - /* v8 ignore next */ - if (!row) { - throw new Error(`Cannot find matching entity for condition ${JSON.stringify(cond)}`); - } - em.getHydrator().hydrate(entity, meta, row, em.#entityFactory, 'full', false, true); - } - if (loadPK.size !== data2.length && Array.isArray(uniqueFields)) { - for (let i = 0; i < allData.length; i++) { - const data = allData[i]; - const cond = uniqueFields.reduce((a, b) => { - // @ts-ignore - a[b] = data[b]; - return a; - }, {}); - const entity = entitiesByData.get(data); - const row = data2.find(item => { - const pk = uniqueFields.reduce((a, b) => { - // @ts-ignore - a[b] = item[b]; - return a; - }, {}); - return this.#comparator.matching(entityName, cond, pk); - }); - /* v8 ignore next */ - if (!row) { - throw new Error(`Cannot find matching entity for condition ${JSON.stringify(cond)}`); - } - em.getHydrator().hydrate(entity, meta, row, em.#entityFactory, 'full'); - } - } - } - for (const [entity] of entities) { - // recompute the data as there might be some values missing (e.g. those with db column defaults) - const snapshot = this.#comparator.prepareEntity(entity); - em.#unitOfWork.register(entity, snapshot, { refresh: true }); - } - if (em.eventManager.hasListeners(EventType.afterUpsert, meta)) { - for (const [entity] of entities) { - await em.eventManager.dispatchEvent(EventType.afterUpsert, { entity, em, meta }, meta); - } - } - return [...entities.keys()]; - } - /** - * Runs your callback wrapped inside a database transaction. - * - * If a transaction is already active, a new savepoint (nested transaction) will be created by default. This behavior - * can be controlled via the `propagation` option. Use the provided EntityManager instance for all operations that - * should be part of the transaction. You can safely use a global EntityManager instance from a DI container, as this - * method automatically creates an async context for the transaction. - * - * **Concurrency note:** When running multiple transactions concurrently (e.g. in parallel requests or jobs), use the - * `clear: true` option. This ensures the callback runs in a clear fork of the EntityManager, providing full isolation - * between concurrent transactional handlers. Using `clear: true` is an alternative to forking explicitly and calling - * the method on the new fork – it already provides the necessary isolation for safe concurrent usage. - * - * **Propagation note:** Changes made within a transaction (whether top-level or nested) are always propagated to the - * parent context, unless the parent context is a global one. If you want to avoid that, fork the EntityManager first - * and then call this method on the fork. - * - * **Example:** - * ```ts - * await em.transactional(async (em) => { - * const author = new Author('Jon'); - * em.persist(author); - * // flush is called automatically at the end of the callback - * }); - * ``` - */ - async transactional(cb, options = {}) { - const em = this.getContext(false); - if (this.#disableTransactions || em.#disableTransactions) { - return cb(em); - } - const manager = new TransactionManager(this); - return manager.handle(cb, options); - } - /** - * Starts new transaction bound to this EntityManager. Use `ctx` parameter to provide the parent when nesting transactions. - */ - async begin(options = {}) { - if (this.#disableTransactions) { - return; - } - const em = this.getContext(false); - em.#transactionContext = await em.getConnection('write').begin({ - ...options, - eventBroadcaster: new TransactionEventBroadcaster(em, { topLevelTransaction: !options.ctx }), - }); - } - /** - * Commits the transaction bound to this EntityManager. Flushes before doing the actual commit query. - */ - async commit() { - const em = this.getContext(false); - if (this.#disableTransactions) { - await em.flush(); - return; - } - if (!em.#transactionContext) { - throw ValidationError.transactionRequired(); - } - await em.flush(); - await em.getConnection('write').commit(em.#transactionContext, new TransactionEventBroadcaster(em)); - em.#transactionContext = undefined; - } - /** - * Rollbacks the transaction bound to this EntityManager. - */ - async rollback() { - if (this.#disableTransactions) { - return; - } - const em = this.getContext(false); - if (!em.#transactionContext) { - throw ValidationError.transactionRequired(); - } - await em.getConnection('write').rollback(em.#transactionContext, new TransactionEventBroadcaster(em)); - em.#transactionContext = undefined; - em.#unitOfWork.clearActionsQueue(); - } - /** - * Runs your callback wrapped inside a database transaction. - */ - async lock(entity, lockMode, options = {}) { - options = Utils.isPlainObject(options) ? options : { lockVersion: options }; - await this.getUnitOfWork().lock(entity, { lockMode, ...options }); - } - /** - * Fires native insert query. Calling this has no side effects on the context (identity map). - */ - async insert(entityNameOrEntity, data, options = {}) { - const em = this.getContext(false); - em.prepareOptions(options); - let entityName; - if (data === undefined) { - entityName = entityNameOrEntity.constructor; - data = entityNameOrEntity; - } else { - entityName = entityNameOrEntity; - } - if (Utils.isEntity(data)) { - if (options.schema && helper(data).getSchema() == null) { - helper(data).setSchema(options.schema); - } - if (!helper(data).__managed) { - // the entity might have been created via `em.create()`, which adds it to the persist stack automatically - em.#unitOfWork.getPersistStack().delete(data); - // it can be also in the identity map if it had a PK value already - em.#unitOfWork.unsetIdentity(data); - } - const meta = helper(data).__meta; - const payload = em.#comparator.prepareEntity(data); - const cs = new ChangeSet(data, ChangeSetType.CREATE, payload, meta); - await em.#unitOfWork.getChangeSetPersister().executeInserts([cs], { ctx: em.#transactionContext, ...options }); - return cs.getPrimaryKey(); - } - data = QueryHelper.processObjectParams(data); - validateParams(data, 'insert data'); - const res = await em.driver.nativeInsert(entityName, data, { - ctx: em.#transactionContext, - ...options, - }); - return res.insertId; - } - /** - * Fires native multi-insert query. Calling this has no side effects on the context (identity map). - */ - async insertMany(entityNameOrEntities, data, options = {}) { - const em = this.getContext(false); - em.prepareOptions(options); - let entityName; - if (data === undefined) { - entityName = entityNameOrEntities[0].constructor; - data = entityNameOrEntities; - } else { - entityName = entityNameOrEntities; - } - if (data.length === 0) { - return []; - } - if (Utils.isEntity(data[0])) { - const meta = helper(data[0]).__meta; - const css = data.map(row => { - if (options.schema && helper(row).getSchema() == null) { - helper(row).setSchema(options.schema); - } - if (!helper(row).__managed) { - // the entity might have been created via `em.create()`, which adds it to the persist stack automatically - em.#unitOfWork.getPersistStack().delete(row); - // it can be also in the identity map if it had a PK value already - em.#unitOfWork.unsetIdentity(row); - } - const payload = em.#comparator.prepareEntity(row); - return new ChangeSet(row, ChangeSetType.CREATE, payload, meta); - }); - await em.#unitOfWork.getChangeSetPersister().executeInserts(css, { ctx: em.#transactionContext, ...options }); - return css.map(cs => cs.getPrimaryKey()); - } - data = data.map(row => QueryHelper.processObjectParams(row)); - data.forEach(row => validateParams(row, 'insert data')); - const res = await em.driver.nativeInsertMany(entityName, data, { - ctx: em.#transactionContext, - ...options, - }); - if (res.insertedIds) { - return res.insertedIds; - } - return [res.insertId]; - } - /** - * Fires native update query. Calling this has no side effects on the context (identity map). - */ - async nativeUpdate(entityName, where, data, options = {}) { - const em = this.getContext(false); - em.prepareOptions(options); - await em.processUnionWhere(entityName, options, 'update'); - data = QueryHelper.processObjectParams(data); - where = await em.processWhere(entityName, where, { ...options, convertCustomTypes: false }, 'update'); - validateParams(data, 'update data'); - validateParams(where, 'update condition'); - const res = await em.driver.nativeUpdate(entityName, where, data, { - ctx: em.#transactionContext, - em, - ...options, - }); - return res.affectedRows; - } - /** - * Fires native delete query. Calling this has no side effects on the context (identity map). - */ - async nativeDelete(entityName, where, options = {}) { - const em = this.getContext(false); - em.prepareOptions(options); - await em.processUnionWhere(entityName, options, 'delete'); - where = await em.processWhere(entityName, where, options, 'delete'); - validateParams(where, 'delete condition'); - const res = await em.driver.nativeDelete(entityName, where, { - ctx: em.#transactionContext, - em, - ...options, - }); - return res.affectedRows; - } - /** - * Maps raw database result to an entity and merges it to this EntityManager. - */ - map(entityName, result, options = {}) { - const meta = this.metadata.get(entityName); - const data = this.driver.mapResult(result, meta); - for (const k of Object.keys(data)) { - const prop = meta.properties[k]; - if ( - prop?.kind === ReferenceKind.SCALAR && - SCALAR_TYPES.has(prop.runtimeType) && - !prop.customType && - (prop.setter || !prop.getter) - ) { - validateProperty(prop, data[k], data); - } - } - return this.merge(entityName, data, { - convertCustomTypes: true, - refresh: true, - validate: false, - ...options, - }); - } - /** - * Merges given entity to this EntityManager so it becomes managed. You can force refreshing of existing entities - * via second parameter. By default, it will return already loaded entities without modifying them. - */ - merge(entityName, data, options = {}) { - if (Utils.isEntity(entityName)) { - return this.merge(entityName.constructor, entityName, data); - } - const em = options.disableContextResolution ? this : this.getContext(); - options.schema ??= em.#schema; - options.validate ??= true; - options.cascade ??= true; - validatePrimaryKey(data, em.metadata.get(entityName)); - let entity = em.#unitOfWork.tryGetById(entityName, data, options.schema, false); - if (entity && helper(entity).__managed && helper(entity).__initialized && !options.refresh) { - return entity; - } - const dataIsEntity = Utils.isEntity(data); - entity = dataIsEntity ? data : em.#entityFactory.create(entityName, data, { merge: true, ...options }); - const visited = options.cascade ? undefined : new Set([entity]); - em.#unitOfWork.merge(entity, visited); - return entity; - } - /** - * Creates new instance of given entity and populates it with given data. - * The entity constructor will be used unless you provide `{ managed: true }` in the `options` parameter. - * The constructor will be given parameters based on the defined constructor of the entity. If the constructor - * parameter matches a property name, its value will be extracted from `data`. If no matching property exists, - * the whole `data` parameter will be passed. This means we can also define `constructor(data: Partial)` and - * `em.create()` will pass the data into it (unless we have a property named `data` too). - * - * The parameters are strictly checked, you need to provide all required properties. You can use `OptionalProps` - * symbol to omit some properties from this check without making them optional. Alternatively, use `partial: true` - * in the options to disable the strict checks for required properties. This option has no effect on runtime. - * - * The newly created entity will be automatically marked for persistence via `em.persist` unless you disable this - * behavior, either locally via `persist: false` option, or globally via `persistOnCreate` ORM config option. - */ - create(entityName, data, options = {}) { - const em = this.getContext(); - options.schema ??= em.#schema; - const entity = em.#entityFactory.create(entityName, data, { - ...options, - newEntity: !options.managed, - merge: options.managed, - normalizeAccessors: true, - }); - options.persist ??= em.config.get('persistOnCreate'); - if (options.persist && !this.getMetadata(entityName).embeddable) { - em.persist(entity); - } - return entity; - } - /** - * Shortcut for `wrap(entity).assign(data, { em })` - */ - assign(entity, data, options = {}) { - return EntityAssigner.assign(entity, data, { em: this.getContext(), ...options }); - } - /** - * Gets a reference to the entity identified by the given type and identifier without actually loading it, if the entity is not yet loaded - */ - getReference(entityName, id, options = {}) { - options.schema ??= this.schema; - options.convertCustomTypes ??= false; - const meta = this.metadata.get(entityName); - if (Utils.isPrimaryKey(id)) { - if (meta.compositePK) { - throw ValidationError.invalidCompositeIdentifier(meta); - } - id = [id]; - } - const entity = this.getEntityFactory().createReference(entityName, id, { merge: true, ...options }); - if (options.wrapped) { - return Reference.create(entity); - } - return entity; - } - /** - * Returns total number of entities matching your `where` query. - */ - async count(entityName, where = {}, options = {}) { - const em = this.getContext(false); - // Shallow copy options since the object will be modified when deleting orderBy - options = { ...options }; - em.prepareOptions(options); - await em.tryFlush(entityName, options); - where = await em.processWhere(entityName, where, options, 'read'); - options.populate = await em.preparePopulate(entityName, options); - options = { ...options }; - // save the original hint value so we know it was infer/all - const meta = em.metadata.find(entityName); - options._populateWhere = options.populateWhere ?? this.config.get('populateWhere'); - options.populateWhere = this.createPopulateWhere({ ...where }, options); - options.populateFilter = await this.getJoinedFilters(meta, options); - validateParams(where); - delete options.orderBy; - await em.processUnionWhere(entityName, options, 'read'); - const cacheKey = em.cacheKey(entityName, options, 'em.count', where); - const cached = await em.tryCache(entityName, options.cache, cacheKey); - if (cached?.data !== undefined) { - return cached.data; - } - const count = await em.driver.count(entityName, where, { ctx: em.#transactionContext, em, ...options }); - await em.storeCache(options.cache, cached, () => +count); - return +count; - } - /** - * Tells the EntityManager to make an instance managed and persistent. - * The entity will be entered into the database at or before transaction commit or as a result of the flush operation. - */ - persist(entity) { - const em = this.getContext(); - if (Utils.isEntity(entity)) { - // do not cascade just yet, cascading of entities in persist stack is done when flushing - em.#unitOfWork.persist(entity, undefined, { cascade: false }); - return em; - } - const entities = Utils.asArray(entity); - for (const ent of entities) { - if (!Utils.isEntity(ent, true)) { - /* v8 ignore next */ - const meta = typeof ent === 'object' ? em.metadata.find(ent.constructor) : undefined; - throw ValidationError.notDiscoveredEntity(ent, meta); - } - // do not cascade just yet, cascading of entities in persist stack is done when flushing - em.#unitOfWork.persist(Reference.unwrapReference(ent), undefined, { cascade: false }); - } - return this; - } - /** - * Marks entity for removal. - * A removed entity will be removed from the database at or before transaction commit or as a result of the flush operation. - * - * To remove entities by condition, use `em.nativeDelete()`. - */ - remove(entity) { - const em = this.getContext(); - if (Utils.isEntity(entity)) { - // do not cascade just yet, cascading of entities in persist stack is done when flushing - em.#unitOfWork.remove(entity, undefined, { cascade: false }); - return em; - } - const entities = Utils.asArray(entity, true); - for (const ent of entities) { - if (!Utils.isEntity(ent, true)) { - throw new Error( - `You need to pass entity instance or reference to 'em.remove()'. To remove entities by condition, use 'em.nativeDelete()'.`, - ); - } - // do not cascade just yet, cascading of entities in remove stack is done when flushing - em.#unitOfWork.remove(Reference.unwrapReference(ent), undefined, { cascade: false }); - } - return em; - } - /** - * Flushes all changes to objects that have been queued up to now to the database. - * This effectively synchronizes the in-memory state of managed objects with the database. - */ - async flush() { - await this.getUnitOfWork().commit(); - } - /** - * @internal - */ - async tryFlush(entityName, options) { - const em = this.getContext(); - const flushMode = options.flushMode ?? em.#flushMode ?? em.config.get('flushMode'); - const meta = em.metadata.get(entityName); - if (flushMode === FlushMode.COMMIT) { - return; - } - if (flushMode === FlushMode.ALWAYS || em.getUnitOfWork().shouldAutoFlush(meta)) { - await em.flush(); - } - } - /** - * Clears the EntityManager. All entities that are currently managed by this EntityManager become detached. - */ - clear() { - this.getContext().#unitOfWork.clear(); - } - /** - * Checks whether given property can be populated on the entity. - */ - canPopulate(entityName, property) { - // eslint-disable-next-line prefer-const - let [p, ...parts] = property.split('.'); - const meta = this.metadata.find(entityName); - if (!meta) { - return true; - } - if (p.includes(':')) { - p = p.split(':', 2)[0]; - } - // For TPT inheritance, check the entity's own properties, not just the root's - // For STI, meta.properties includes all properties anyway - const ret = p in meta.properties; - if (parts.length > 0) { - return this.canPopulate(meta.properties[p].targetMeta.class, parts.join('.')); - } - return ret; - } - /** - * Loads specified relations in batch. This will execute one query for each relation, that will populate it on all the specified entities. - */ - async populate(entities, populate, options = {}) { - const arr = Utils.asArray(entities); - if (arr.length === 0) { - return entities; - } - const em = this.getContext(); - em.prepareOptions(options); - const entityName = arr[0].constructor; - const preparedPopulate = await em.preparePopulate( - entityName, - { populate: populate, filters: options.filters }, - options.validate, - ); - await em.#entityLoader.populate(entityName, arr, preparedPopulate, options); - return entities; - } - /** - * Returns new EntityManager instance with its own identity map - */ - fork(options = {}) { - const em = options.disableContextResolution ? this : this.getContext(false); - options.clear ??= true; - options.useContext ??= false; - options.freshEventManager ??= false; - options.cloneEventManager ??= false; - const eventManager = options.freshEventManager - ? new EventManager(em.config.get('subscribers')) - : options.cloneEventManager - ? em.eventManager.clone() - : em.eventManager; - // we need to allow global context here as forking from global EM is fine - const allowGlobalContext = em.config.get('allowGlobalContext'); - em.config.set('allowGlobalContext', true); - const fork = new em.constructor(em.config, em.driver, em.metadata, options.useContext, eventManager); - fork.setFlushMode(options.flushMode ?? em.#flushMode); - fork.#disableTransactions = - options.disableTransactions ?? this.#disableTransactions ?? this.config.get('disableTransactions'); - em.config.set('allowGlobalContext', allowGlobalContext); - if (options.keepTransactionContext) { - fork.#transactionContext = em.#transactionContext; - } - fork.#filters = { ...em.#filters }; - fork.#filterParams = Utils.copy(em.#filterParams); - fork.loggerContext = Utils.merge({}, em.loggerContext, options.loggerContext); - fork.#schema = options.schema ?? em.#schema; - if (!options.clear) { - for (const entity of em.#unitOfWork.getIdentityMap()) { - fork.#unitOfWork.register(entity); - } - for (const entity of em.#unitOfWork.getPersistStack()) { - fork.#unitOfWork.persist(entity); - } - for (const entity of em.#unitOfWork.getOrphanRemoveStack()) { - fork.#unitOfWork.getOrphanRemoveStack().add(entity); - } - } - return fork; - } - /** - * Gets the UnitOfWork used by the EntityManager to coordinate operations. - */ - getUnitOfWork(useContext = true) { - if (!useContext) { - return this.#unitOfWork; - } - return this.getContext().#unitOfWork; - } - /** - * Gets the EntityFactory used by the EntityManager. - */ - getEntityFactory() { - return this.getContext().#entityFactory; - } - /** - * @internal use `em.populate()` as the user facing API, this is exposed only for internal usage - */ - getEntityLoader() { - return this.getContext().#entityLoader; - } - /** - * Gets the Hydrator used by the EntityManager. - */ - getHydrator() { - return this.config.getHydrator(this.getMetadata()); - } - /** - * Gets the EntityManager based on current transaction/request context. - * @internal - */ - getContext(validate = true) { - if (!this.#useContext) { - return this; - } - let em = TransactionContext.getEntityManager(this.name); // prefer the tx context - if (em) { - return em; - } - // no explicit tx started - em = this.config.get('context')(this.name) ?? this; - if (validate && !this.config.get('allowGlobalContext') && em.global) { - throw ValidationError.cannotUseGlobalContext(); - } - return em; - } - /** Gets the EventManager instance used by this EntityManager. */ - getEventManager() { - return this.eventManager; - } - /** - * Checks whether this EntityManager is currently operating inside a database transaction. - */ - isInTransaction() { - return !!this.getContext(false).#transactionContext; - } - /** - * Gets the transaction context (driver dependent object used to make sure queries are executed on same connection). - */ - getTransactionContext() { - return this.getContext(false).#transactionContext; - } - /** - * Sets the transaction context. - */ - setTransactionContext(ctx) { - if (!ctx) { - this.resetTransactionContext(); - } else { - this.getContext(false).#transactionContext = ctx; - } - } - /** - * Resets the transaction context. - */ - resetTransactionContext() { - this.getContext(false).#transactionContext = undefined; - } - /** - * Gets the `MetadataStorage` (without parameters) or `EntityMetadata` instance when provided with the `entityName` parameter. - */ - getMetadata(entityName) { - if (entityName) { - return this.metadata.get(entityName); - } - return this.metadata; - } - /** - * Gets the EntityComparator. - */ - getComparator() { - return this.#comparator; - } - checkLockRequirements(mode, meta) { - if (!mode) { - return; - } - if (mode === LockMode.OPTIMISTIC && !meta.versionProperty) { - throw OptimisticLockError.notVersioned(meta); - } - if ([LockMode.PESSIMISTIC_READ, LockMode.PESSIMISTIC_WRITE].includes(mode) && !this.isInTransaction()) { - throw ValidationError.transactionRequired(); - } - } - async lockAndPopulate(meta, entity, where, options) { - if (!meta.virtual && options.lockMode === LockMode.OPTIMISTIC) { - await this.lock(entity, options.lockMode, { - lockVersion: options.lockVersion, - lockTableAliases: options.lockTableAliases, - }); - } - const preparedPopulate = await this.preparePopulate(meta.class, options); - await this.#entityLoader.populate(meta.class, [entity], preparedPopulate, { - ...options, - ...this.getPopulateWhere(where, options), - orderBy: options.populateOrderBy ?? options.orderBy, - ignoreLazyScalarProperties: true, - lookup: false, - }); - return entity; - } - buildFields(fields) { - return fields.reduce((ret, f) => { - if (Utils.isPlainObject(f)) { - Utils.keys(f).forEach(ff => ret.push(...this.buildFields(f[ff]).map(field => `${ff}.${field}`))); - } else { - ret.push(f); - } - return ret; - }, []); - } - /** @internal */ - async preparePopulate(entityName, options, validate = true) { - if (options.populate === false) { - return []; - } - const meta = this.metadata.find(entityName); - // infer populate hint if only `fields` are available - if (!options.populate && options.fields) { - // we need to prune the `populate` hint from to-one relations, as partially loading them does not require their population, we want just the FK - const pruneToOneRelations = (meta, fields) => { - const ret = []; - for (let field of fields) { - if (field === PopulatePath.ALL || field.startsWith(`${PopulatePath.ALL}.`)) { - ret.push( - ...meta.props - .filter(prop => prop.lazy || [ReferenceKind.SCALAR, ReferenceKind.EMBEDDED].includes(prop.kind)) - .map(prop => prop.name), - ); - continue; - } - field = field.split(':')[0]; - if ( - !field.includes('.') && - ![ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(meta.properties[field].kind) - ) { - ret.push(field); - continue; - } - const parts = field.split('.'); - const key = parts.shift(); - if (parts.length === 0) { - continue; - } - const prop = meta.properties[key]; - if (!prop.targetMeta) { - ret.push(key); - continue; - } - const inner = pruneToOneRelations(prop.targetMeta, [parts.join('.')]); - if (inner.length > 0) { - ret.push(...inner.map(c => `${key}.${c}`)); - } - } - return Utils.unique(ret); - }; - options.populate = pruneToOneRelations(meta, this.buildFields(options.fields)); - } - if (!options.populate) { - const populate = this.#entityLoader.normalizePopulate(entityName, [], options.strategy, true, options.exclude); - await this.autoJoinRefsForFilters(meta, { ...options, populate }); - return populate; - } - if (typeof options.populate !== 'boolean') { - options.populate = Utils.asArray(options.populate) - .map(field => { - /* v8 ignore next */ - if (typeof field === 'boolean' || field === PopulatePath.ALL) { - return [{ field: meta.primaryKeys[0], strategy: options.strategy, all: !!field }]; // - } - // will be handled in QueryBuilder when processing the where condition via CriteriaNode - if (field === PopulatePath.INFER) { - options.flags ??= []; - options.flags.push(QueryFlag.INFER_POPULATE); - return []; - } - if (typeof field === 'string') { - return [{ field, strategy: options.strategy }]; - } - return [field]; - }) - .flat(); - } - const populate = this.#entityLoader.normalizePopulate( - entityName, - options.populate, - options.strategy, - true, - options.exclude, - ); - const invalid = populate.find(({ field }) => !this.canPopulate(entityName, field)); - if (validate && invalid) { - throw ValidationError.invalidPropertyName(entityName, invalid.field); - } - await this.autoJoinRefsForFilters(meta, { ...options, populate }); - for (const field of populate) { - // force select-in strategy when populating all relations as otherwise we could cause infinite loops when self-referencing - const all = field.all ?? (Array.isArray(options.populate) && options.populate.includes('*')); - field.strategy = all ? LoadStrategy.SELECT_IN : (options.strategy ?? field.strategy); - } - if (options.populateHints) { - applyPopulateHints(populate, options.populateHints); - } - return populate; - } - /** - * when the entity is found in identity map, we check if it was partially loaded or we are trying to populate - * some additional lazy properties, if so, we reload and merge the data from database - */ - shouldRefresh(meta, entity, options) { - if (!helper(entity).__initialized || options.refresh) { - return true; - } - let autoRefresh; - if (options.fields) { - autoRefresh = options.fields.some(field => !helper(entity).__loadedProperties.has(field)); - } else { - autoRefresh = meta.comparableProps.some(prop => { - const inlineEmbedded = prop.kind === ReferenceKind.EMBEDDED && !prop.object; - return !inlineEmbedded && !prop.lazy && !helper(entity).__loadedProperties.has(prop.name); - }); - } - if (autoRefresh || options.filters) { - return true; - } - if (Array.isArray(options.populate)) { - return options.populate.some(field => !helper(entity).__loadedProperties.has(field)); - } - return !!options.populate; - } - prepareOptions(options) { - if (!Utils.isEmpty(options.fields) && !Utils.isEmpty(options.exclude)) { - throw new ValidationError(`Cannot combine 'fields' and 'exclude' option.`); - } - options.schema ??= this.#schema; - options.logging = options.loggerContext = Utils.merge( - { id: this.id }, - this.loggerContext, - options.loggerContext, - options.logging, - ); - } - /** - * @internal - */ - cacheKey(entityName, options, method, where) { - const { ...opts } = options; - // ignore some irrelevant options, e.g. logger context can contain dynamic data for the same query - for (const k of ['ctx', 'strategy', 'flushMode', 'logging', 'loggerContext']) { - delete opts[k]; - } - return [Utils.className(entityName), method, opts, where]; - } - /** - * @internal - */ - async tryCache(entityName, config, key, refresh, merge) { - config ??= this.config.get('resultCache').global; - if (!config) { - return undefined; - } - const em = this.getContext(); - const cacheKey = Array.isArray(config) ? config[0] : JSON.stringify(key); - const cached = await em.#resultCache.get(cacheKey); - if (!cached) { - return { key: cacheKey, data: cached }; - } - let data; - const createOptions = { - merge: true, - convertCustomTypes: false, - refresh, - recomputeSnapshot: true, - }; - if (Array.isArray(cached) && merge) { - data = cached.map(item => em.#entityFactory.create(entityName, item, createOptions)); - } else if (Utils.isObject(cached) && merge) { - data = em.#entityFactory.create(entityName, cached, createOptions); - } else { - data = cached; - } - await em.#unitOfWork.dispatchOnLoadEvent(); - return { key: cacheKey, data }; - } - /** - * @internal - */ - async storeCache(config, key, data) { - config ??= this.config.get('resultCache').global; - if (config) { - const em = this.getContext(); - const expiration = Array.isArray(config) ? config[1] : typeof config === 'number' ? config : undefined; - await em.#resultCache.set(key.key, data instanceof Function ? data() : data, '', expiration); - } - } - /** - * Clears result cache for given cache key. If we want to be able to call this method, - * we need to set the cache key explicitly when storing the cache. - * - * ```ts - * // set the cache key to 'book-cache-key', with expiration of 60s - * const res = await em.find(Book, { ... }, { cache: ['book-cache-key', 60_000] }); - * - * // clear the cache key by name - * await em.clearCache('book-cache-key'); - * ``` - */ - async clearCache(cacheKey) { - await this.getContext().#resultCache.remove(cacheKey); - } - /** - * Returns the default schema of this EntityManager. Respects the context, so global EM will give you the contextual schema - * if executed inside request context handler. - */ - get schema() { - return this.getContext(false).#schema; - } - /** - * Sets the default schema of this EntityManager. Respects the context, so global EM will set the contextual schema - * if executed inside request context handler. - */ - set schema(schema) { - this.getContext(false).#schema = schema ?? undefined; - } - /** @internal */ - async getDataLoader(type) { - const em = this.getContext(); - if (em.#loaders[type]) { - return em.#loaders[type]; - } - const { DataloaderUtils } = await import('@mikro-orm/core/dataloader'); - const DataLoader = await DataloaderUtils.getDataLoader(); - switch (type) { - case 'ref': - return (em.#loaders[type] ??= new DataLoader(DataloaderUtils.getRefBatchLoadFn(em))); - case '1:m': - return (em.#loaders[type] ??= new DataLoader(DataloaderUtils.getColBatchLoadFn(em))); - case 'm:n': - return (em.#loaders[type] ??= new DataLoader(DataloaderUtils.getManyToManyColBatchLoadFn(em))); - } - } - /** - * Returns the ID of this EntityManager. Respects the context, so global EM will give you the contextual ID - * if executed inside request context handler. - */ - get id() { - return this.getContext(false)._id; - } - /** @ignore */ - [Symbol.for('nodejs.util.inspect.custom')]() { - return `[EntityManager<${this.id}>]`; - } -} diff --git a/node_modules/@mikro-orm/core/LICENSE b/node_modules/@mikro-orm/core/LICENSE deleted file mode 100644 index 23704b1..0000000 --- a/node_modules/@mikro-orm/core/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 Martin Adámek - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@mikro-orm/core/MikroORM.d.ts b/node_modules/@mikro-orm/core/MikroORM.d.ts deleted file mode 100644 index 48e42ce..0000000 --- a/node_modules/@mikro-orm/core/MikroORM.d.ts +++ /dev/null @@ -1,143 +0,0 @@ -import type { EntityManagerType, IDatabaseDriver } from './drivers/IDatabaseDriver.js'; -import { type EntitySchema } from './metadata/EntitySchema.js'; -import { MetadataStorage } from './metadata/MetadataStorage.js'; -import { Configuration, type Options } from './utils/Configuration.js'; -import type { EntityManager } from './EntityManager.js'; -import type { - AnyEntity, - Constructor, - EntityClass, - EntityMetadata, - EntityName, - IEntityGenerator, - IMigrator, - ISeedManager, -} from './typings.js'; -/** @internal */ -export declare function loadOptionalDependencies(options: Partial): Promise; -/** - * The main class used to configure and bootstrap the ORM. - * - * @example - * ```ts - * // import from driver package - * import { MikroORM, defineEntity, p } from '@mikro-orm/sqlite'; - * - * const User = defineEntity({ - * name: 'User', - * properties: { - * id: p.integer().primary(), - * name: p.string(), - * }, - * }); - * - * const orm = new MikroORM({ - * entities: [User], - * dbName: 'my.db', - * }); - * await orm.schema.update(); - * - * const em = orm.em.fork(); - * const u1 = em.create(User, { name: 'John' }); - * const u2 = em.create(User, { name: 'Ben' }); - * await em.flush(); - * ``` - */ -export declare class MikroORM< - Driver extends IDatabaseDriver = IDatabaseDriver, - EM extends Driver[typeof EntityManagerType] & EntityManager = Driver[typeof EntityManagerType] & - EntityManager, - Entities extends (string | EntityClass | EntitySchema)[] = ( - | string - | EntityClass - | EntitySchema - )[], -> { - #private; - /** The global EntityManager instance. If you are using `RequestContext` helper, it will automatically pick the request specific context under the hood */ - em: EM & { - '~entities'?: Entities; - }; - /** The database driver instance used by this ORM. */ - readonly driver: Driver; - /** The ORM configuration instance. */ - readonly config: Configuration; - /** - * Initialize the ORM, load entity metadata, create EntityManager and connect to the database. - * If you omit the `options` parameter, your CLI config will be used. - */ - static init< - D extends IDatabaseDriver = IDatabaseDriver, - EM extends D[typeof EntityManagerType] & EntityManager = D[typeof EntityManagerType] & EntityManager, - Entities extends (string | EntityClass | EntitySchema)[] = ( - | string - | EntityClass - | EntitySchema - )[], - >(options: Partial>): Promise>; - /** - * Synchronous variant of the `init` method with some limitations: - * - folder-based discovery not supported - * - ORM extensions are not autoloaded - * - when metadata cache is enabled, `FileCacheAdapter` needs to be explicitly set in the config - */ - constructor(options: Partial>); - /** - * Connects to the database. - */ - connect(): Promise; - /** - * Reconnects, possibly to a different database. - */ - reconnect(options?: Partial>): Promise; - /** - * Checks whether the database connection is active. - */ - isConnected(): Promise; - /** - * Checks whether the database connection is active, returns the reason if not. - */ - checkConnection(): Promise< - | { - ok: true; - } - | { - ok: false; - reason: string; - error?: Error; - } - >; - /** - * Closes the database connection. - */ - close(force?: boolean): Promise; - /** - * Gets the `MetadataStorage`. - */ - getMetadata(): MetadataStorage; - /** - * Gets the `EntityMetadata` instance when provided with the `entityName` parameter. - */ - getMetadata(entityName: EntityName): EntityMetadata; - private createEntityManager; - /** - * Allows dynamically discovering new entity by reference, handy for testing schema diffing. - */ - discoverEntity(entities: T | T[], reset?: EntityName | EntityName[]): void; - /** - * Gets the SchemaGenerator. - */ - get schema(): ReturnType['getSchemaGenerator']>; - /** - * Gets the SeedManager - */ - get seeder(): ISeedManager; - /** - * Gets the Migrator. - */ - get migrator(): IMigrator; - /** - * Gets the EntityGenerator. - */ - get entityGenerator(): IEntityGenerator; -} diff --git a/node_modules/@mikro-orm/core/MikroORM.js b/node_modules/@mikro-orm/core/MikroORM.js deleted file mode 100644 index 44a2e3b..0000000 --- a/node_modules/@mikro-orm/core/MikroORM.js +++ /dev/null @@ -1,219 +0,0 @@ -import { MetadataDiscovery } from './metadata/MetadataDiscovery.js'; -import { MetadataStorage } from './metadata/MetadataStorage.js'; -import { Configuration } from './utils/Configuration.js'; -import { loadEnvironmentVars } from './utils/env-vars.js'; -import { Utils } from './utils/Utils.js'; -import { colors } from './logging/colors.js'; -async function tryRegisterExtension(name, pkg, extensions) { - try { - const url = import.meta.resolve(pkg); - const mod = await import(url); - if (mod[name]) { - extensions.push(mod[name]); - } - } catch { - // not installed - } -} -/** @internal */ -export async function loadOptionalDependencies(options) { - await import('@mikro-orm/core/fs-utils').then(m => m.fs.init()).catch(() => null); - const extensions = options.extensions ?? []; - const exists = name => extensions.some(ext => ext.name === name); - if (!exists('SeedManager')) { - await tryRegisterExtension('SeedManager', '@mikro-orm/seeder', extensions); - } - if (!exists('Migrator')) { - await tryRegisterExtension('Migrator', '@mikro-orm/migrations', extensions); - } - /* v8 ignore if */ - if (!exists('Migrator')) { - await tryRegisterExtension('Migrator', '@mikro-orm/migrations-mongodb', extensions); - } - if (!exists('EntityGenerator')) { - await tryRegisterExtension('EntityGenerator', '@mikro-orm/entity-generator', extensions); - } - options.extensions = extensions; - const metadataCacheEnabled = options.metadataCache?.enabled || options.metadataProvider?.useCache?.(); - if (metadataCacheEnabled) { - options.metadataCache ??= {}; - options.metadataCache.adapter ??= await import('@mikro-orm/core/fs-utils').then(m => m.FileCacheAdapter); - } -} -/** - * The main class used to configure and bootstrap the ORM. - * - * @example - * ```ts - * // import from driver package - * import { MikroORM, defineEntity, p } from '@mikro-orm/sqlite'; - * - * const User = defineEntity({ - * name: 'User', - * properties: { - * id: p.integer().primary(), - * name: p.string(), - * }, - * }); - * - * const orm = new MikroORM({ - * entities: [User], - * dbName: 'my.db', - * }); - * await orm.schema.update(); - * - * const em = orm.em.fork(); - * const u1 = em.create(User, { name: 'John' }); - * const u2 = em.create(User, { name: 'Ben' }); - * await em.flush(); - * ``` - */ -export class MikroORM { - /** The global EntityManager instance. If you are using `RequestContext` helper, it will automatically pick the request specific context under the hood */ - em; - /** The database driver instance used by this ORM. */ - driver; - /** The ORM configuration instance. */ - config; - #metadata; - #logger; - #discovery; - /** - * Initialize the ORM, load entity metadata, create EntityManager and connect to the database. - * If you omit the `options` parameter, your CLI config will be used. - */ - static async init(options) { - /* v8 ignore next */ - if (!options) { - throw new Error(`options parameter is required`); - } - options = { ...options }; - options.discovery ??= {}; - options.discovery.skipSyncDiscovery ??= true; - await loadOptionalDependencies(options); - const orm = new this(options); - const preferTs = orm.config.get('preferTs', Utils.detectTypeScriptSupport()); - orm.#metadata = await orm.#discovery.discover(preferTs); - orm.createEntityManager(); - return orm; - } - /** - * Synchronous variant of the `init` method with some limitations: - * - folder-based discovery not supported - * - ORM extensions are not autoloaded - * - when metadata cache is enabled, `FileCacheAdapter` needs to be explicitly set in the config - */ - constructor(options) { - const env = loadEnvironmentVars(); - options = options.preferEnvVars ? Utils.merge(options, env) : Utils.merge(env, options); - this.config = new Configuration(options); - const discovery = this.config.get('discovery'); - this.driver = this.config.getDriver(); - this.#logger = this.config.getLogger(); - this.#logger.log('info', `MikroORM version: ${colors.green(Utils.getORMVersion())}`); - this.#discovery = new MetadataDiscovery(new MetadataStorage(), this.driver.getPlatform(), this.config); - this.driver.getPlatform().init(this); - for (const extension of this.config.get('extensions')) { - extension.register(this); - } - if (!discovery.skipSyncDiscovery) { - this.#metadata = this.#discovery.discoverSync(); - this.createEntityManager(); - } - } - /** - * Connects to the database. - */ - async connect() { - await this.driver.connect(); - return this.driver; - } - /** - * Reconnects, possibly to a different database. - */ - async reconnect(options = {}) { - /* v8 ignore next */ - for (const key of Utils.keys(options)) { - this.config.set(key, options[key]); - } - await this.driver.reconnect(); - } - /** - * Checks whether the database connection is active. - */ - async isConnected() { - return this.driver.getConnection().isConnected(); - } - /** - * Checks whether the database connection is active, returns the reason if not. - */ - async checkConnection() { - return this.driver.getConnection().checkConnection(); - } - /** - * Closes the database connection. - */ - async close(force = false) { - await this.driver.close(force); - await this.config.getMetadataCacheAdapter()?.close?.(); - await this.config.getResultCacheAdapter()?.close?.(); - } - /** - * Gets the `MetadataStorage` (without parameters) or `EntityMetadata` instance when provided with the `entityName` parameter. - */ - getMetadata(entityName) { - if (entityName) { - return this.#metadata.get(entityName); - } - return this.#metadata; - } - createEntityManager() { - this.driver.setMetadata(this.#metadata); - this.em = this.driver.createEntityManager(); - this.em.global = true; - this.#metadata.decorate(this.em); - this.driver.setMetadata(this.#metadata); - } - /** - * Allows dynamically discovering new entity by reference, handy for testing schema diffing. - */ - discoverEntity(entities, reset) { - for (const className of Utils.asArray(reset)) { - this.#metadata.reset(className); - this.#discovery.reset(className); - } - const tmp = this.#discovery.discoverReferences(Utils.asArray(entities)); - const metadata = this.#discovery.processDiscoveredEntities(tmp); - for (const meta of metadata) { - this.#metadata.set(meta.class, meta); - meta.root = this.#metadata.get(meta.root.class); - } - this.#metadata.decorate(this.em); - } - /** - * Gets the SchemaGenerator. - */ - get schema() { - return this.config.getExtension('@mikro-orm/schema-generator'); - } - /** - * Gets the SeedManager - */ - get seeder() { - return this.driver.getPlatform().getExtension('SeedManager', '@mikro-orm/seeder', '@mikro-orm/seeder', this.em); - } - /** - * Gets the Migrator. - */ - get migrator() { - return this.driver.getPlatform().getExtension('Migrator', '@mikro-orm/migrator', '@mikro-orm/migrations', this.em); - } - /** - * Gets the EntityGenerator. - */ - get entityGenerator() { - return this.driver - .getPlatform() - .getExtension('EntityGenerator', '@mikro-orm/entity-generator', '@mikro-orm/entity-generator', this.em); - } -} diff --git a/node_modules/@mikro-orm/core/README.md b/node_modules/@mikro-orm/core/README.md deleted file mode 100644 index f6be8af..0000000 --- a/node_modules/@mikro-orm/core/README.md +++ /dev/null @@ -1,225 +0,0 @@ -

- MikroORM -

- -TypeScript ORM for Node.js based on Data Mapper, [Unit of Work](https://mikro-orm.io/docs/unit-of-work/) and [Identity Map](https://mikro-orm.io/docs/identity-map/) patterns. Supports MongoDB, MySQL, MariaDB, PostgreSQL, SQLite (including libSQL), MSSQL and Oracle databases. - -> Heavily inspired by [Doctrine](https://www.doctrine-project.org/) and [Hibernate](https://hibernate.org/). - -[![NPM version](https://img.shields.io/npm/v/@mikro-orm/core.svg)](https://npmx.dev/package/@mikro-orm/core) -[![NPM dev version](https://img.shields.io/npm/v/@mikro-orm/core/next.svg)](https://npmx.dev/package/@mikro-orm/core) -[![Chat on discord](https://img.shields.io/discord/1214904142443839538?label=discord&color=blue)](https://discord.gg/w8bjxFHS7X) -[![Downloads](https://img.shields.io/npm/dm/@mikro-orm/core.svg)](https://npmx.dev/package/@mikro-orm/core) -[![Coverage Status](https://img.shields.io/coveralls/mikro-orm/mikro-orm.svg)](https://coveralls.io/r/mikro-orm/mikro-orm?branch=master) -[![Build Status](https://github.com/mikro-orm/mikro-orm/workflows/tests/badge.svg?branch=master)](https://github.com/mikro-orm/mikro-orm/actions?workflow=tests) - -## Quick Start - -Install a driver package for your database: - -```sh -npm install @mikro-orm/postgresql # PostgreSQL -npm install @mikro-orm/mysql # MySQL -npm install @mikro-orm/mariadb # MariaDB -npm install @mikro-orm/sqlite # SQLite -npm install @mikro-orm/libsql # libSQL / Turso -npm install @mikro-orm/mongodb # MongoDB -npm install @mikro-orm/mssql # MS SQL Server -npm install @mikro-orm/oracledb # Oracle -``` - -> If you use additional packages like `@mikro-orm/cli`, `@mikro-orm/migrations`, or `@mikro-orm/entity-generator`, install `@mikro-orm/core` explicitly as well. See the [quick start guide](https://mikro-orm.io/docs/quick-start) for details. - -### Define Entities - -The recommended way to define entities is using [`defineEntity`](https://mikro-orm.io/docs/define-entity) with `setClass`: - -```typescript -import { defineEntity, p, MikroORM } from '@mikro-orm/postgresql'; - -const AuthorSchema = defineEntity({ - name: 'Author', - properties: { - id: p.integer().primary(), - name: p.string(), - email: p.string(), - born: p.datetime().nullable(), - books: () => p.oneToMany(Book).mappedBy('author'), - }, -}); - -export class Author extends AuthorSchema.class {} -AuthorSchema.setClass(Author); - -const BookSchema = defineEntity({ - name: 'Book', - properties: { - id: p.integer().primary(), - title: p.string(), - author: () => p.manyToOne(Author).inversedBy('books'), - }, -}); - -export class Book extends BookSchema.class {} -BookSchema.setClass(Book); -``` - -You can also define entities using [decorators](https://mikro-orm.io/docs/defining-entities) or [`EntitySchema`](https://mikro-orm.io/docs/entity-schema). See the [defining entities guide](https://mikro-orm.io/docs/defining-entities) for all options. - -### Initialize and Use - -```typescript -import { MikroORM, RequestContext } from '@mikro-orm/postgresql'; - -const orm = await MikroORM.init({ - entities: [Author, Book], - dbName: 'my-db', -}); - -// Create new entities -const author = orm.em.create(Author, { - name: 'Jon Snow', - email: 'snow@wall.st', -}); -const book = orm.em.create(Book, { - title: 'My Life on The Wall', - author, -}); - -// Flush persists all tracked changes in a single transaction -await orm.em.flush(); -``` - -### Querying - -```typescript -// Find with relations -const authors = await orm.em.findAll(Author, { - populate: ['books'], - orderBy: { name: 'asc' }, -}); - -// Type-safe QueryBuilder -const qb = orm.em.createQueryBuilder(Author); -const result = await qb - .select('*') - .where({ books: { title: { $like: '%Wall%' } } }) - .getResult(); -``` - -### Request Context - -In web applications, use `RequestContext` to isolate the identity map per request: - -```typescript -const app = express(); - -app.use((req, res, next) => { - RequestContext.create(orm.em, next); -}); -``` - -More info about `RequestContext` is described [here](https://mikro-orm.io/docs/identity-map/#request-context). - -## Unit of Work - -> Unit of Work maintains a list of objects (_entities_) affected by a business transaction -> and coordinates the writing out of changes. [(Martin Fowler)](https://www.martinfowler.com/eaaCatalog/unitOfWork.html) - -When you call `em.flush()`, all computed changes are queried inside a database transaction. This means you can control transaction boundaries simply by making changes to your entities and calling `flush()` when ready. - -```typescript -const author = await em.findOneOrFail(Author, 1, { - populate: ['books'], -}); -author.name = 'Jon Snow II'; -author.books.getItems().forEach(book => book.title += ' (2nd ed.)'); -author.books.add(orm.em.create(Book, { title: 'New Book', author })); - -// Flush computes change sets and executes them in a single transaction -await em.flush(); -``` - -The above flush will execute: - -```sql -begin; -update "author" set "name" = 'Jon Snow II' where "id" = 1; -update "book" - set "title" = case - when ("id" = 1) then 'My Life on The Wall (2nd ed.)' - when ("id" = 2) then 'Another Book (2nd ed.)' - else "title" end - where "id" in (1, 2); -insert into "book" ("title", "author_id") values ('New Book', 1); -commit; -``` - -## Core Features - -- [Clean and Simple Entity Definition](https://mikro-orm.io/docs/defining-entities) — decorators, `EntitySchema`, or `defineEntity` -- [Identity Map](https://mikro-orm.io/docs/identity-map) and [Unit of Work](https://mikro-orm.io/docs/unit-of-work) — automatic change tracking -- [Entity References](https://mikro-orm.io/docs/entity-references) and [Collections](https://mikro-orm.io/docs/collections) -- [QueryBuilder](https://mikro-orm.io/docs/query-builder) and [Kysely Integration](https://mikro-orm.io/docs/kysely) -- [Transactions](https://mikro-orm.io/docs/transactions) and [Cascading](https://mikro-orm.io/docs/cascading) -- [Populating Relations](https://mikro-orm.io/docs/populating-relations) and [Loading Strategies](https://mikro-orm.io/docs/loading-strategies) -- [Filters](https://mikro-orm.io/docs/filters) and [Lifecycle Hooks](https://mikro-orm.io/docs/events#hooks) -- [Schema Generator](https://mikro-orm.io/docs/schema-generator) and [Migrations](https://mikro-orm.io/docs/migrations) -- [Entity Generator](https://mikro-orm.io/docs/entity-generator) and [Seeding](https://mikro-orm.io/docs/seeding) -- [Embeddables](https://mikro-orm.io/docs/embeddables), [Custom Types](https://mikro-orm.io/docs/custom-types), and [Serialization](https://mikro-orm.io/docs/serializing) -- [Composite and Foreign Keys as Primary Key](https://mikro-orm.io/docs/composite-keys) -- [Entity Constructors](https://mikro-orm.io/docs/entity-constructors) and [Property Validation](https://mikro-orm.io/docs/property-validation) -- [Modelling Relationships](https://mikro-orm.io/docs/relationships) and [Vanilla JS Support](https://mikro-orm.io/docs/usage-with-js) - -## Documentation - -MikroORM documentation, included in this repo in the root directory, is built with [Docusaurus](https://docusaurus.io) and publicly hosted on GitHub Pages at https://mikro-orm.io. - -There is also auto-generated [CHANGELOG.md](CHANGELOG.md) file based on commit messages (via `semantic-release`). - -## Example Integrations - -You can find example integrations for some popular frameworks in the [`mikro-orm-examples` repository](https://github.com/mikro-orm/mikro-orm-examples): - -### TypeScript Examples - -- [Express + MongoDB](https://github.com/mikro-orm/express-ts-example-app) -- [Nest + MySQL](https://github.com/mikro-orm/nestjs-example-app) -- [RealWorld example app (Nest + MySQL)](https://github.com/mikro-orm/nestjs-realworld-example-app) -- [Koa + SQLite](https://github.com/mikro-orm/koa-ts-example-app) -- [GraphQL + PostgreSQL](https://github.com/driescroons/mikro-orm-graphql-example) -- [Inversify + PostgreSQL](https://github.com/PodaruDragos/inversify-example-app) -- [NextJS + MySQL](https://github.com/jonahallibone/mikro-orm-nextjs) -- [Accounts.js REST and GraphQL authentication + SQLite](https://github.com/darkbasic/mikro-orm-accounts-example) -- [Nest + Shopify + PostgreSQL + GraphQL](https://github.com/Cloudshelf/Shopify_CSConnector) -- [Elysia.js + libSQL + Bun](https://github.com/mikro-orm/elysia-bun-example-app) -- [Electron.js + PostgreSQL](https://github.com/adnanlah/electron-mikro-orm-example-app) - -### JavaScript Examples - -- [Express + SQLite](https://github.com/mikro-orm/express-js-example-app) - -## Contributing - -Contributions, issues and feature requests are welcome. Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on the process for submitting pull requests to us. - -## Authors - -**Martin Adámek** - -- Twitter: [@B4nan](https://twitter.com/B4nan) -- Github: [@b4nan](https://github.com/b4nan) - -See also the list of contributors who [participated](https://github.com/mikro-orm/mikro-orm/contributors) in this project. - -## Show Your Support - -Please star this repository if this project helped you! - -> If you'd like to support my open-source work, consider sponsoring me directly at [github.com/sponsors/b4nan](https://github.com/sponsors/b4nan). - -## License - -Copyright © 2018-present [Martin Adámek](https://github.com/b4nan). - -This project is licensed under the MIT License - see the [LICENSE file](LICENSE) for details. diff --git a/node_modules/@mikro-orm/core/cache/CacheAdapter.d.ts b/node_modules/@mikro-orm/core/cache/CacheAdapter.d.ts deleted file mode 100644 index 6899fe5..0000000 --- a/node_modules/@mikro-orm/core/cache/CacheAdapter.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** Interface for async-capable cache storage used by result cache and metadata cache. */ -export interface CacheAdapter { - /** - * Gets the items under `name` key from the cache. - */ - get(name: string): T | Promise | undefined; - /** - * Sets the item to the cache. `origin` is used for cache invalidation and should reflect the change in data. - */ - set(name: string, data: any, origin: string, expiration?: number): void | Promise; - /** - * Removes the item from cache. - */ - remove(name: string): void | Promise; - /** - * Clears all items stored in the cache. - */ - clear(): void | Promise; - /** - * Called inside `MikroORM.close()` Allows graceful shutdowns (e.g. for redis). - */ - close?(): void | Promise; -} -/** Synchronous variant of CacheAdapter, used for metadata cache where async access is not needed. */ -export interface SyncCacheAdapter extends CacheAdapter { - /** - * Gets the items under `name` key from the cache. - */ - get(name: string): T | undefined; - /** - * Sets the item to the cache. `origin` is used for cache invalidation and should reflect the change in data. - */ - set(name: string, data: any, origin: string, expiration?: number): void; - /** - * Removes the item from cache. - */ - remove(name: string): void; - /** - * Generates a combined cache from all existing entries. - */ - combine?(): string | void; -} diff --git a/node_modules/@mikro-orm/core/cache/CacheAdapter.js b/node_modules/@mikro-orm/core/cache/CacheAdapter.js deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/@mikro-orm/core/cache/CacheAdapter.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/@mikro-orm/core/cache/FileCacheAdapter.d.ts b/node_modules/@mikro-orm/core/cache/FileCacheAdapter.d.ts deleted file mode 100644 index 5096351..0000000 --- a/node_modules/@mikro-orm/core/cache/FileCacheAdapter.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import type { SyncCacheAdapter } from './CacheAdapter.js'; -export declare class FileCacheAdapter implements SyncCacheAdapter { - #private; - constructor( - options: - | { - cacheDir: string; - combined?: boolean | string; - } - | undefined, - baseDir: string, - pretty?: boolean, - ); - /** - * @inheritDoc - */ - get(name: string): any; - /** - * @inheritDoc - */ - set(name: string, data: any, origin: string): void; - /** - * @inheritDoc - */ - remove(name: string): void; - /** - * @inheritDoc - */ - clear(): void; - combine(): string | void; - private path; - private getHash; -} diff --git a/node_modules/@mikro-orm/core/cache/FileCacheAdapter.js b/node_modules/@mikro-orm/core/cache/FileCacheAdapter.js deleted file mode 100644 index 723b693..0000000 --- a/node_modules/@mikro-orm/core/cache/FileCacheAdapter.js +++ /dev/null @@ -1,91 +0,0 @@ -import { existsSync, readFileSync, writeFileSync, unlinkSync } from 'node:fs'; -import { fs } from '../utils/fs-utils.js'; -import { Utils } from '../utils/Utils.js'; -export class FileCacheAdapter { - #VERSION = Utils.getORMVersion(); - #cache = {}; - #options; - #baseDir; - #pretty; - constructor(options = {}, baseDir, pretty = false) { - this.#options = options; - this.#baseDir = baseDir; - this.#pretty = pretty; - this.#options.cacheDir ??= process.cwd() + '/temp'; - } - /** - * @inheritDoc - */ - get(name) { - const path = this.path(name); - if (!existsSync(path)) { - return null; - } - const payload = fs.readJSONSync(path); - const hash = this.getHash(payload.origin); - if (!hash || payload.hash !== hash) { - return null; - } - return payload.data; - } - /** - * @inheritDoc - */ - set(name, data, origin) { - if (this.#options.combined) { - this.#cache[name.replace(/\.[jt]s$/, '')] = data; - return; - } - const path = this.path(name); - const hash = this.getHash(origin); - writeFileSync( - path, - JSON.stringify({ data, origin, hash, version: this.#VERSION }, null, this.#pretty ? 2 : undefined), - ); - } - /** - * @inheritDoc - */ - remove(name) { - const path = this.path(name); - unlinkSync(path); - } - /** - * @inheritDoc - */ - clear() { - const path = this.path('*'); - const files = fs.glob(path); - for (const file of files) { - /* v8 ignore next */ - try { - unlinkSync(file); - } catch { - // ignore if file is already gone - } - } - this.#cache = {}; - } - combine() { - if (!this.#options.combined) { - return; - } - let path = typeof this.#options.combined === 'string' ? this.#options.combined : './metadata.json'; - path = fs.normalizePath(this.#options.cacheDir, path); - this.#options.combined = path; // override in the options, so we can log it from the CLI in `cache:generate` command - writeFileSync(path, JSON.stringify(this.#cache, null, this.#pretty ? 2 : undefined)); - return path; - } - path(name) { - fs.ensureDir(this.#options.cacheDir); - return `${this.#options.cacheDir}/${name}.json`; - } - getHash(origin) { - origin = fs.absolutePath(origin, this.#baseDir); - if (!existsSync(origin)) { - return null; - } - const contents = readFileSync(origin); - return Utils.hash(contents.toString() + this.#VERSION); - } -} diff --git a/node_modules/@mikro-orm/core/cache/GeneratedCacheAdapter.d.ts b/node_modules/@mikro-orm/core/cache/GeneratedCacheAdapter.d.ts deleted file mode 100644 index ec407d6..0000000 --- a/node_modules/@mikro-orm/core/cache/GeneratedCacheAdapter.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { CacheAdapter } from './CacheAdapter.js'; -import type { Dictionary } from '../typings.js'; -/** Cache adapter backed by pre-generated static data, typically produced by the CLI cache:generate command. */ -export declare class GeneratedCacheAdapter implements CacheAdapter { - #private; - constructor(options: { data: Dictionary }); - /** - * @inheritDoc - */ - get(name: string): T | undefined; - /** - * @inheritDoc - */ - set(name: string, data: any, origin: string): void; - /** - * @inheritDoc - */ - remove(name: string): void; - /** - * @inheritDoc - */ - clear(): void; -} diff --git a/node_modules/@mikro-orm/core/cache/GeneratedCacheAdapter.js b/node_modules/@mikro-orm/core/cache/GeneratedCacheAdapter.js deleted file mode 100644 index 875f46c..0000000 --- a/node_modules/@mikro-orm/core/cache/GeneratedCacheAdapter.js +++ /dev/null @@ -1,33 +0,0 @@ -/** Cache adapter backed by pre-generated static data, typically produced by the CLI cache:generate command. */ -export class GeneratedCacheAdapter { - #data; - constructor(options) { - this.#data = new Map(Object.entries(options.data)); - } - /** - * @inheritDoc - */ - get(name) { - const key = name.replace(/\.[jt]s$/, ''); - const data = this.#data.get(key); - return data; - } - /** - * @inheritDoc - */ - set(name, data, origin) { - this.#data.set(name, { data }); - } - /** - * @inheritDoc - */ - remove(name) { - this.#data.delete(name); - } - /** - * @inheritDoc - */ - clear() { - this.#data.clear(); - } -} diff --git a/node_modules/@mikro-orm/core/cache/MemoryCacheAdapter.d.ts b/node_modules/@mikro-orm/core/cache/MemoryCacheAdapter.d.ts deleted file mode 100644 index 9b0ac8a..0000000 --- a/node_modules/@mikro-orm/core/cache/MemoryCacheAdapter.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { CacheAdapter } from './CacheAdapter.js'; -/** In-memory cache adapter with time-based expiration. Used as the default result cache. */ -export declare class MemoryCacheAdapter implements CacheAdapter { - #private; - constructor(options: { expiration: number }); - /** - * @inheritDoc - */ - get(name: string): T | undefined; - /** - * @inheritDoc - */ - set(name: string, data: any, origin: string, expiration?: number): void; - /** - * @inheritDoc - */ - remove(name: string): void; - /** - * @inheritDoc - */ - clear(): void; -} diff --git a/node_modules/@mikro-orm/core/cache/MemoryCacheAdapter.js b/node_modules/@mikro-orm/core/cache/MemoryCacheAdapter.js deleted file mode 100644 index 0bd5728..0000000 --- a/node_modules/@mikro-orm/core/cache/MemoryCacheAdapter.js +++ /dev/null @@ -1,40 +0,0 @@ -/** In-memory cache adapter with time-based expiration. Used as the default result cache. */ -export class MemoryCacheAdapter { - #data = new Map(); - #options; - constructor(options) { - this.#options = options; - } - /** - * @inheritDoc - */ - get(name) { - const data = this.#data.get(name); - if (data) { - if (data.expiration < Date.now()) { - this.#data.delete(name); - } else { - return data.data; - } - } - return undefined; - } - /** - * @inheritDoc - */ - set(name, data, origin, expiration) { - this.#data.set(name, { data, expiration: Date.now() + (expiration ?? this.#options.expiration) }); - } - /** - * @inheritDoc - */ - remove(name) { - this.#data.delete(name); - } - /** - * @inheritDoc - */ - clear() { - this.#data.clear(); - } -} diff --git a/node_modules/@mikro-orm/core/cache/NullCacheAdapter.d.ts b/node_modules/@mikro-orm/core/cache/NullCacheAdapter.d.ts deleted file mode 100644 index 4c48965..0000000 --- a/node_modules/@mikro-orm/core/cache/NullCacheAdapter.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { SyncCacheAdapter } from './CacheAdapter.js'; -/** No-op cache adapter that never stores or returns any data. Used to disable caching. */ -export declare class NullCacheAdapter implements SyncCacheAdapter { - /** - * @inheritDoc - */ - get(name: string): any; - /** - * @inheritDoc - */ - set(name: string, data: any, origin: string): void; - /** - * @inheritDoc - */ - remove(name: string): void; - /** - * @inheritDoc - */ - clear(): void; -} diff --git a/node_modules/@mikro-orm/core/cache/NullCacheAdapter.js b/node_modules/@mikro-orm/core/cache/NullCacheAdapter.js deleted file mode 100644 index dca6bac..0000000 --- a/node_modules/@mikro-orm/core/cache/NullCacheAdapter.js +++ /dev/null @@ -1,27 +0,0 @@ -/** No-op cache adapter that never stores or returns any data. Used to disable caching. */ -export class NullCacheAdapter { - /** - * @inheritDoc - */ - get(name) { - return null; - } - /** - * @inheritDoc - */ - set(name, data, origin) { - // ignore - } - /** - * @inheritDoc - */ - remove(name) { - // ignore - } - /** - * @inheritDoc - */ - clear() { - // ignore - } -} diff --git a/node_modules/@mikro-orm/core/cache/index.d.ts b/node_modules/@mikro-orm/core/cache/index.d.ts deleted file mode 100644 index dcfb5cf..0000000 --- a/node_modules/@mikro-orm/core/cache/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export type * from './CacheAdapter.js'; -export * from './NullCacheAdapter.js'; -export * from './MemoryCacheAdapter.js'; -export * from './GeneratedCacheAdapter.js'; diff --git a/node_modules/@mikro-orm/core/cache/index.js b/node_modules/@mikro-orm/core/cache/index.js deleted file mode 100644 index efc5715..0000000 --- a/node_modules/@mikro-orm/core/cache/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export * from './NullCacheAdapter.js'; -export * from './MemoryCacheAdapter.js'; -export * from './GeneratedCacheAdapter.js'; diff --git a/node_modules/@mikro-orm/core/connections/Connection.d.ts b/node_modules/@mikro-orm/core/connections/Connection.d.ts deleted file mode 100644 index 8c894b5..0000000 --- a/node_modules/@mikro-orm/core/connections/Connection.d.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { type Configuration, type ConnectionOptions } from '../utils/Configuration.js'; -import type { LogContext, Logger } from '../logging/Logger.js'; -import type { MetadataStorage } from '../metadata/MetadataStorage.js'; -import type { ConnectionType, Dictionary, MaybePromise, Primary } from '../typings.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { TransactionEventBroadcaster } from '../events/TransactionEventBroadcaster.js'; -import type { IsolationLevel } from '../enums.js'; -/** Abstract base class for database connections, providing transaction and query execution support. */ -export declare abstract class Connection { - #private; - protected readonly config: Configuration; - protected readonly type: ConnectionType; - protected metadata: MetadataStorage; - protected platform: Platform; - protected readonly options: ConnectionOptions; - protected readonly logger: Logger; - protected connected: boolean; - constructor(config: Configuration, options?: ConnectionOptions, type?: ConnectionType); - /** - * Establishes connection to database - */ - abstract connect(options?: { skipOnConnect?: boolean }): void | Promise; - /** - * Are we connected to the database - */ - abstract isConnected(): Promise; - /** - * Are we connected to the database - */ - abstract checkConnection(): Promise< - | { - ok: true; - } - | { - ok: false; - reason: string; - error?: Error; - } - >; - /** - * Closes the database connection (aka disconnect) - */ - close(force?: boolean): Promise; - /** - * Ensure the connection exists, this is used to support lazy connect when using `new MikroORM()` instead of the async `init` method. - */ - ensureConnection(): Promise; - /** - * Execute raw SQL queries, handy from running schema dump loaded from a file. - * This method doesn't support transactions, as opposed to `orm.schema.execute()`, which is used internally. - */ - executeDump(dump: string): Promise; - protected onConnect(): Promise; - /** Executes a callback inside a transaction, committing on success and rolling back on failure. */ - transactional( - cb: (trx: Transaction) => Promise, - options?: { - isolationLevel?: IsolationLevel | `${IsolationLevel}`; - readOnly?: boolean; - ctx?: Transaction; - eventBroadcaster?: TransactionEventBroadcaster; - loggerContext?: LogContext; - }, - ): Promise; - /** Begins a new database transaction and returns the transaction context. */ - begin(options?: { - isolationLevel?: IsolationLevel | `${IsolationLevel}`; - readOnly?: boolean; - ctx?: Transaction; - eventBroadcaster?: TransactionEventBroadcaster; - loggerContext?: LogContext; - }): Promise; - /** Commits the given transaction. */ - commit(ctx: Transaction, eventBroadcaster?: TransactionEventBroadcaster, loggerContext?: LogContext): Promise; - /** Rolls back the given transaction. */ - rollback(ctx: Transaction, eventBroadcaster?: TransactionEventBroadcaster, loggerContext?: LogContext): Promise; - /** Executes a raw query and returns the result. */ - abstract execute( - query: string, - params?: any[], - method?: 'all' | 'get' | 'run', - ctx?: Transaction, - ): Promise | any | any[]>; - /** Parses and returns the resolved connection configuration (host, port, user, etc.). */ - getConnectionOptions(): ConnectionConfig; - /** Sets the metadata storage on this connection. */ - setMetadata(metadata: MetadataStorage): void; - /** Sets the platform abstraction on this connection. */ - setPlatform(platform: Platform): void; - /** Returns the platform abstraction for this connection. */ - getPlatform(): Platform; - protected executeQuery(query: string, cb: () => Promise, context?: LogContext): Promise; - protected logQuery(query: string, context?: LogContext): void; -} -/** Result of a native database query (insert, update, delete). */ -export interface QueryResult< - T = { - id: number; - }, -> { - affectedRows: number; - insertId: Primary; - row?: Dictionary; - rows?: Dictionary[]; - insertedIds?: Primary[]; -} -/** Resolved database connection parameters. */ -export interface ConnectionConfig { - host?: string; - port?: number; - user?: string; - password?: string | (() => MaybePromise); - database?: string; - schema?: string; -} -/** Opaque transaction context type, wrapping the driver-specific transaction object. */ -export type Transaction = T & {}; diff --git a/node_modules/@mikro-orm/core/connections/Connection.js b/node_modules/@mikro-orm/core/connections/Connection.js deleted file mode 100644 index c3ba004..0000000 --- a/node_modules/@mikro-orm/core/connections/Connection.js +++ /dev/null @@ -1,169 +0,0 @@ -import { Utils } from '../utils/Utils.js'; -/** Abstract base class for database connections, providing transaction and query execution support. */ -export class Connection { - config; - type; - metadata; - platform; - options; - logger; - connected = false; - get #connectionLabel() { - return { - type: this.type, - name: this.options.name || this.config.get('name') || this.options.host || this.options.dbName, - }; - } - constructor(config, options, type = 'write') { - this.config = config; - this.type = type; - this.logger = this.config.getLogger(); - this.platform = this.config.getPlatform(); - if (options) { - this.options = Utils.copy(options); - } else { - const props = [ - 'dbName', - 'clientUrl', - 'host', - 'port', - 'user', - 'password', - 'multipleStatements', - 'pool', - 'schema', - 'driverOptions', - ]; - this.options = props.reduce((o, i) => { - o[i] = this.config.get(i); - return o; - }, {}); - } - } - /** - * Closes the database connection (aka disconnect) - */ - async close(force) { - Object.keys(this.options) - .filter(k => k !== 'name') - .forEach(k => delete this.options[k]); - } - /** - * Ensure the connection exists, this is used to support lazy connect when using `new MikroORM()` instead of the async `init` method. - */ - async ensureConnection() { - if (!this.connected) { - await this.connect(); - } - } - /** - * Execute raw SQL queries, handy from running schema dump loaded from a file. - * This method doesn't support transactions, as opposed to `orm.schema.execute()`, which is used internally. - */ - async executeDump(dump) { - throw new Error(`Executing SQL dumps is not supported by current driver`); - } - async onConnect() { - const schemaGenerator = this.config.getExtension('@mikro-orm/schema-generator'); - if (this.type === 'write' && schemaGenerator) { - if (this.config.get('ensureDatabase')) { - const options = this.config.get('ensureDatabase'); - await schemaGenerator.ensureDatabase(typeof options === 'boolean' ? {} : { ...options, forceCheck: true }); - } - if (this.config.get('ensureIndexes')) { - await schemaGenerator.ensureIndexes(); - } - } - } - /** Executes a callback inside a transaction, committing on success and rolling back on failure. */ - async transactional(cb, options) { - throw new Error(`Transactions are not supported by current driver`); - } - /** Begins a new database transaction and returns the transaction context. */ - async begin(options) { - throw new Error(`Transactions are not supported by current driver`); - } - /** Commits the given transaction. */ - async commit(ctx, eventBroadcaster, loggerContext) { - throw new Error(`Transactions are not supported by current driver`); - } - /** Rolls back the given transaction. */ - async rollback(ctx, eventBroadcaster, loggerContext) { - throw new Error(`Transactions are not supported by current driver`); - } - /** Parses and returns the resolved connection configuration (host, port, user, etc.). */ - getConnectionOptions() { - const ret = {}; - if (this.options.clientUrl) { - const url = new URL(this.options.clientUrl); - this.options.host = ret.host = this.options.host ?? decodeURIComponent(url.hostname); - this.options.port = ret.port = this.options.port ?? +url.port; - this.options.user = ret.user = this.options.user ?? decodeURIComponent(url.username); - this.options.password = ret.password = this.options.password ?? decodeURIComponent(url.password); - this.options.dbName = ret.database = this.options.dbName ?? decodeURIComponent(url.pathname).replace(/^\//, ''); - if (this.options.schema || url.searchParams.has('schema')) { - this.options.schema = ret.schema = this.options.schema ?? decodeURIComponent(url.searchParams.get('schema')); - this.config.set('schema', ret.schema); - } - } else { - const url = new URL(this.config.get('clientUrl')); - this.options.host = ret.host = this.options.host ?? this.config.get('host', decodeURIComponent(url.hostname)); - this.options.port = ret.port = this.options.port ?? this.config.get('port', +url.port); - this.options.user = ret.user = this.options.user ?? this.config.get('user', decodeURIComponent(url.username)); - this.options.password = ret.password = - this.options.password ?? this.config.get('password', decodeURIComponent(url.password)); - this.options.dbName = ret.database = - this.options.dbName ?? this.config.get('dbName', decodeURIComponent(url.pathname).replace(/^\//, '')); - } - return ret; - } - /** Sets the metadata storage on this connection. */ - setMetadata(metadata) { - this.metadata = metadata; - } - /** Sets the platform abstraction on this connection. */ - setPlatform(platform) { - this.platform = platform; - } - /** Returns the platform abstraction for this connection. */ - getPlatform() { - return this.platform; - } - async executeQuery(query, cb, context) { - const now = Date.now(); - try { - const res = await cb(); - const took = Date.now() - now; - const results = Array.isArray(res) ? res.length : undefined; - const affected = Utils.isPlainObject(res) ? res.affectedRows : undefined; - this.logQuery(query, { ...context, took, results, affected }); - return res; - } catch (e) { - const took = Date.now() - now; - this.logQuery(query, { ...context, took, level: 'error' }); - throw e; - } - } - logQuery(query, context = {}) { - const connection = this.#connectionLabel; - this.logger.logQuery({ - level: 'info', - connection, - ...context, - query, - }); - const threshold = this.config.get('slowQueryThreshold'); - if (threshold != null && (context.took ?? 0) >= threshold) { - this.config.getSlowQueryLogger().logQuery({ - ...context, - // `enabled: true` bypasses the debug-mode check in isEnabled(), - // ensuring slow query logs are always emitted regardless of the `debug` setting. - enabled: true, - level: context.level ?? 'warning', - namespace: 'slow-query', - connection, - query, - }); - } - } -} diff --git a/node_modules/@mikro-orm/core/connections/index.d.ts b/node_modules/@mikro-orm/core/connections/index.d.ts deleted file mode 100644 index 13f2c6e..0000000 --- a/node_modules/@mikro-orm/core/connections/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './Connection.js'; diff --git a/node_modules/@mikro-orm/core/connections/index.js b/node_modules/@mikro-orm/core/connections/index.js deleted file mode 100644 index 13f2c6e..0000000 --- a/node_modules/@mikro-orm/core/connections/index.js +++ /dev/null @@ -1 +0,0 @@ -export * from './Connection.js'; diff --git a/node_modules/@mikro-orm/core/drivers/DatabaseDriver.d.ts b/node_modules/@mikro-orm/core/drivers/DatabaseDriver.d.ts deleted file mode 100644 index 1fe9dcf..0000000 --- a/node_modules/@mikro-orm/core/drivers/DatabaseDriver.d.ts +++ /dev/null @@ -1,199 +0,0 @@ -import { - type CountOptions, - type DeleteOptions, - type DriverMethodOptions, - EntityManagerType, - type FindOneOptions, - type FindOptions, - type IDatabaseDriver, - type LockOptions, - type NativeInsertUpdateManyOptions, - type NativeInsertUpdateOptions, - type OrderDefinition, - type StreamOptions, -} from './IDatabaseDriver.js'; -import type { - ConnectionType, - Constructor, - Dictionary, - EntityData, - EntityDictionary, - EntityMetadata, - EntityName, - EntityProperty, - FilterQuery, - PopulateOptions, - Primary, -} from '../typings.js'; -import type { MetadataStorage } from '../metadata/MetadataStorage.js'; -import type { Connection, QueryResult, Transaction } from '../connections/Connection.js'; -import { type Configuration, type ConnectionOptions } from '../utils/Configuration.js'; -import { EntityComparator } from '../utils/EntityComparator.js'; -import { type QueryOrder } from '../enums.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { Collection } from '../entity/Collection.js'; -import { EntityManager } from '../EntityManager.js'; -import { DriverException } from '../exceptions.js'; -import { MikroORM } from '../MikroORM.js'; -/** Abstract base class for all database drivers, implementing common driver logic. */ -export declare abstract class DatabaseDriver implements IDatabaseDriver { - readonly config: Configuration; - protected readonly dependencies: string[]; - [EntityManagerType]: EntityManager; - protected readonly connection: C; - protected readonly replicas: C[]; - protected readonly platform: Platform; - protected comparator: EntityComparator; - protected metadata: MetadataStorage; - protected constructor(config: Configuration, dependencies: string[]); - abstract find( - entityName: EntityName, - where: FilterQuery, - options?: FindOptions, - ): Promise[]>; - abstract findOne( - entityName: EntityName, - where: FilterQuery, - options?: FindOneOptions, - ): Promise | null>; - abstract nativeInsert( - entityName: EntityName, - data: EntityDictionary, - options?: NativeInsertUpdateOptions, - ): Promise>; - abstract nativeInsertMany( - entityName: EntityName, - data: EntityDictionary[], - options?: NativeInsertUpdateManyOptions, - transform?: (sql: string) => string, - ): Promise>; - abstract nativeUpdate( - entityName: EntityName, - where: FilterQuery, - data: EntityDictionary, - options?: NativeInsertUpdateOptions, - ): Promise>; - nativeUpdateMany( - entityName: EntityName, - where: FilterQuery[], - data: EntityDictionary[], - options?: NativeInsertUpdateManyOptions, - ): Promise>; - abstract nativeDelete( - entityName: EntityName, - where: FilterQuery, - options?: DeleteOptions, - ): Promise>; - abstract count( - entityName: EntityName, - where: FilterQuery, - options?: CountOptions, - ): Promise; - /** Creates a new EntityManager instance bound to this driver. */ - createEntityManager(useContext?: boolean): this[typeof EntityManagerType]; - findVirtual( - entityName: EntityName, - where: FilterQuery, - options: FindOptions, - ): Promise[]>; - countVirtual( - entityName: EntityName, - where: FilterQuery, - options: CountOptions, - ): Promise; - aggregate(entityName: EntityName, pipeline: any[]): Promise; - loadFromPivotTable( - prop: EntityProperty, - owners: Primary[][], - where?: FilterQuery, - orderBy?: OrderDefinition, - ctx?: Transaction, - options?: FindOptions, - pivotJoin?: boolean, - ): Promise>; - syncCollections( - collections: Iterable>, - options?: DriverMethodOptions, - ): Promise; - /** Maps raw database result to entity data, converting column names to property names. */ - mapResult( - result: EntityDictionary, - meta?: EntityMetadata, - populate?: PopulateOptions[], - ): EntityData | null; - /** Opens the primary connection and all read replicas. */ - connect(options?: { skipOnConnect?: boolean }): Promise; - /** Closes all connections and re-establishes them. */ - reconnect(options?: { skipOnConnect?: boolean }): Promise; - /** Returns the write connection or a random read replica. */ - getConnection(type?: ConnectionType): C; - /** Closes the primary connection and all read replicas. */ - close(force?: boolean): Promise; - /** Returns the database platform abstraction for this driver. */ - getPlatform(): Platform; - /** Sets the metadata storage and initializes the comparator for all connections. */ - setMetadata(metadata: MetadataStorage): void; - /** Returns the metadata storage used by this driver. */ - getMetadata(): MetadataStorage; - /** Returns the names of native database dependencies required by this driver. */ - getDependencies(): string[]; - protected isPopulated( - meta: EntityMetadata, - prop: EntityProperty, - hint: PopulateOptions, - name?: string, - ): boolean; - protected processCursorOptions( - meta: EntityMetadata, - options: FindOptions, - orderBy: OrderDefinition, - ): { - orderBy: OrderDefinition[]; - where: FilterQuery; - }; - protected createCursorCondition( - definition: (readonly [keyof T & string, QueryOrder])[], - offsets: Dictionary[], - inverse: boolean, - meta: EntityMetadata, - ): FilterQuery; - /** @internal */ - mapDataToFieldNames( - data: Dictionary, - stringifyJsonArrays: boolean, - properties?: Record, - convertCustomTypes?: boolean, - object?: boolean, - ): Dictionary; - protected inlineEmbeddables(meta: EntityMetadata, data: T, where?: boolean): void; - protected getPrimaryKeyFields(meta: EntityMetadata): string[]; - protected createReplicas(cb: (c: ConnectionOptions) => C): C[]; - /** Acquires a pessimistic lock on the given entity. */ - lockPessimistic(entity: T, options: LockOptions): Promise; - abstract stream( - entityName: EntityName, - where: FilterQuery, - options: StreamOptions, - ): AsyncIterableIterator; - /** - * @inheritDoc - */ - convertException(exception: Error): DriverException; - protected rethrow(promise: Promise): Promise; - /** - * @internal - */ - getTableName(meta: EntityMetadata, options: NativeInsertUpdateManyOptions, quote?: boolean): string; - /** - * @internal - */ - getSchemaName( - meta?: EntityMetadata, - options?: { - schema?: string; - parentSchema?: string; - }, - ): string | undefined; - /** @internal */ - getORMClass(): Constructor; -} diff --git a/node_modules/@mikro-orm/core/drivers/DatabaseDriver.js b/node_modules/@mikro-orm/core/drivers/DatabaseDriver.js deleted file mode 100644 index 3062cc9..0000000 --- a/node_modules/@mikro-orm/core/drivers/DatabaseDriver.js +++ /dev/null @@ -1,493 +0,0 @@ -import { EntityManagerType } from './IDatabaseDriver.js'; -import { Utils } from '../utils/Utils.js'; -import { Cursor } from '../utils/Cursor.js'; -import { EntityComparator } from '../utils/EntityComparator.js'; -import { isRaw, raw } from '../utils/RawQueryFragment.js'; -import { QueryOrderNumeric, ReferenceKind } from '../enums.js'; -import { EntityManager } from '../EntityManager.js'; -import { CursorError, ValidationError } from '../errors.js'; -import { DriverException } from '../exceptions.js'; -import { helper } from '../entity/wrap.js'; -import { PolymorphicRef } from '../entity/PolymorphicRef.js'; -import { JsonType } from '../types/JsonType.js'; -import { MikroORM } from '../MikroORM.js'; -/** Abstract base class for all database drivers, implementing common driver logic. */ -export class DatabaseDriver { - config; - dependencies; - [EntityManagerType]; - connection; - replicas = []; - platform; - comparator; - metadata; - constructor(config, dependencies) { - this.config = config; - this.dependencies = dependencies; - } - async nativeUpdateMany(entityName, where, data, options) { - throw new Error(`Batch updates are not supported by ${this.constructor.name} driver`); - } - /** Creates a new EntityManager instance bound to this driver. */ - createEntityManager(useContext) { - const EntityManagerClass = this.config.get('entityManager', EntityManager); - return new EntityManagerClass(this.config, this, this.metadata, useContext); - } - /* v8 ignore next */ - async findVirtual(entityName, where, options) { - throw new Error(`Virtual entities are not supported by ${this.constructor.name} driver.`); - } - /* v8 ignore next */ - async countVirtual(entityName, where, options) { - throw new Error(`Counting virtual entities is not supported by ${this.constructor.name} driver.`); - } - async aggregate(entityName, pipeline) { - throw new Error(`Aggregations are not supported by ${this.constructor.name} driver`); - } - async loadFromPivotTable(prop, owners, where, orderBy, ctx, options, pivotJoin) { - throw new Error(`${this.constructor.name} does not use pivot tables`); - } - async syncCollections(collections, options) { - for (const coll of collections) { - /* v8 ignore else */ - if (!coll.property.owner) { - if (coll.getSnapshot() === undefined) { - throw ValidationError.cannotModifyInverseCollection(coll.owner, coll.property); - } - continue; - } - /* v8 ignore next */ - { - const pk = coll.property.targetMeta.primaryKeys[0]; - const data = { [coll.property.name]: coll.getIdentifiers(pk) }; - await this.nativeUpdate(coll.owner.constructor, helper(coll.owner).getPrimaryKey(), data, options); - } - } - } - /** Maps raw database result to entity data, converting column names to property names. */ - mapResult(result, meta, populate = []) { - if (!result || !meta) { - return result ?? null; - } - return this.comparator.mapResult(meta, result); - } - /** Opens the primary connection and all read replicas. */ - async connect(options) { - await this.connection.connect(options); - await Promise.all(this.replicas.map(replica => replica.connect())); - return this.connection; - } - /** Closes all connections and re-establishes them. */ - async reconnect(options) { - await this.close(true); - await this.connect(options); - return this.connection; - } - /** Returns the write connection or a random read replica. */ - getConnection(type = 'write') { - if (type === 'write' || this.replicas.length === 0) { - return this.connection; - } - const rand = Utils.randomInt(0, this.replicas.length - 1); - return this.replicas[rand]; - } - /** Closes the primary connection and all read replicas. */ - async close(force) { - await Promise.all(this.replicas.map(replica => replica.close(force))); - await this.connection.close(force); - } - /** Returns the database platform abstraction for this driver. */ - getPlatform() { - return this.platform; - } - /** Sets the metadata storage and initializes the comparator for all connections. */ - setMetadata(metadata) { - this.metadata = metadata; - this.comparator = new EntityComparator(this.metadata, this.platform); - this.connection.setMetadata(metadata); - this.connection.setPlatform(this.platform); - this.replicas.forEach(replica => { - replica.setMetadata(metadata); - replica.setPlatform(this.platform); - }); - } - /** Returns the metadata storage used by this driver. */ - getMetadata() { - return this.metadata; - } - /** Returns the names of native database dependencies required by this driver. */ - getDependencies() { - return this.dependencies; - } - isPopulated(meta, prop, hint, name) { - if (hint.field === prop.name || hint.field === name || hint.all) { - return true; - } - if (prop.embedded && hint.children && meta.properties[prop.embedded[0]].name === hint.field) { - return hint.children.some(c => this.isPopulated(meta, prop, c, prop.embedded[1])); - } - return false; - } - processCursorOptions(meta, options, orderBy) { - const { first, last, before, after, overfetch } = options; - const limit = first ?? last; - const isLast = !first && !!last; - const definition = Cursor.getDefinition(meta, orderBy); - const $and = []; - // allow POJO as well, we care only about the correct key being present - const isCursor = (val, key) => { - return !!val && typeof val === 'object' && key in val; - }; - const createCursor = (val, key, inverse = false) => { - let def = isCursor(val, key) ? val[key] : val; - if (Utils.isPlainObject(def)) { - def = Cursor.for(meta, def, orderBy); - } - /* v8 ignore next */ - const offsets = def ? Cursor.decode(def) : []; - if (definition.length === offsets.length) { - return this.createCursorCondition(definition, offsets, inverse, meta); - } - /* v8 ignore next */ - return {}; - }; - if (after) { - $and.push(createCursor(after, 'endCursor')); - } - if (before) { - $and.push(createCursor(before, 'startCursor', true)); - } - if (limit != null) { - options.limit = limit + (overfetch ? 1 : 0); - } - const createOrderBy = (prop, direction) => { - if (Utils.isPlainObject(direction)) { - const value = Utils.getObjectQueryKeys(direction).reduce((o, key) => { - Object.assign(o, createOrderBy(key, direction[key])); - return o; - }, {}); - return { [prop]: value }; - } - const desc = direction === QueryOrderNumeric.DESC || direction.toString().toLowerCase() === 'desc'; - const dir = Utils.xor(desc, isLast) ? 'desc' : 'asc'; - return { [prop]: dir }; - }; - return { - orderBy: definition.map(([prop, direction]) => createOrderBy(prop, direction)), - where: $and.length > 1 ? { $and } : { ...$and[0] }, - }; - } - createCursorCondition(definition, offsets, inverse, meta) { - const createCondition = (prop, direction, offset, eq = false, path = prop) => { - if (Utils.isPlainObject(direction)) { - if (offset === undefined) { - throw CursorError.missingValue(meta.className, path); - } - const value = Utils.keys(direction).reduce((o, key) => { - Object.assign(o, createCondition(key, direction[key], offset?.[key], eq, `${path}.${key}`)); - return o; - }, {}); - return { [prop]: value }; - } - const isDesc = direction === QueryOrderNumeric.DESC || direction.toString().toLowerCase() === 'desc'; - const dirStr = direction.toString().toLowerCase(); - let nullsFirst; - if (dirStr.includes('nulls first')) { - nullsFirst = true; - } else if (dirStr.includes('nulls last')) { - nullsFirst = false; - } else { - // Default: NULLS LAST for ASC, NULLS FIRST for DESC (matches most databases) - nullsFirst = isDesc; - } - const operator = Utils.xor(isDesc, inverse) ? '$lt' : '$gt'; - // For leaf-level properties, undefined means missing value - if (offset === undefined) { - throw CursorError.missingValue(meta.className, path); - } - // Handle null offset (intentional null cursor value) - if (offset === null) { - if (eq) { - // Equal to null - return { [prop]: null }; - } - // Strict comparison with null cursor value - // hasItemsAfterNull: forward + nullsFirst, or backward + nullsLast - const hasItemsAfterNull = Utils.xor(nullsFirst, inverse); - if (hasItemsAfterNull) { - return { [prop]: { $ne: null } }; - } - // No items after null in this direction, return impossible condition - return { [prop]: [] }; - } - // Non-null offset - return { [prop]: { [operator + (eq ? 'e' : '')]: offset } }; - }; - const [order, ...otherOrders] = definition; - const [offset, ...otherOffsets] = offsets; - const [prop, direction] = order; - if (!otherOrders.length) { - return createCondition(prop, direction, offset); - } - return { - ...createCondition(prop, direction, offset, true), - $or: [ - createCondition(prop, direction, offset), - this.createCursorCondition(otherOrders, otherOffsets, inverse, meta), - ], - }; - } - /** @internal */ - mapDataToFieldNames(data, stringifyJsonArrays, properties, convertCustomTypes, object) { - if (!properties || data == null) { - return data; - } - data = Object.assign({}, data); // copy first - Object.keys(data).forEach(k => { - const prop = properties[k]; - if (!prop) { - return; - } - if (prop.embeddedProps && !prop.object && !object) { - const copy = data[k]; - delete data[k]; - Object.assign( - data, - this.mapDataToFieldNames(copy, stringifyJsonArrays, prop.embeddedProps, convertCustomTypes), - ); - return; - } - if (prop.embeddedProps && (object || prop.object)) { - const copy = data[k]; - delete data[k]; - if (prop.array) { - data[prop.fieldNames[0]] = copy?.map(item => - this.mapDataToFieldNames(item, stringifyJsonArrays, prop.embeddedProps, convertCustomTypes, true), - ); - } else { - data[prop.fieldNames[0]] = this.mapDataToFieldNames( - copy, - stringifyJsonArrays, - prop.embeddedProps, - convertCustomTypes, - true, - ); - } - if (stringifyJsonArrays && prop.array && !object) { - data[prop.fieldNames[0]] = this.platform.convertJsonToDatabaseValue(data[prop.fieldNames[0]]); - } - return; - } - // Handle polymorphic relations - convert tuple or PolymorphicRef to separate columns - // Tuple format: ['discriminator', id] or ['discriminator', id1, id2] for composite keys - // Must be checked BEFORE joinColumns array handling since polymorphic uses fieldNames (includes discriminator) - if (prop.polymorphic && prop.fieldNames && prop.fieldNames.length >= 2) { - let discriminator; - let ids; - if (Array.isArray(data[k]) && typeof data[k][0] === 'string' && prop.discriminatorMap?.[data[k][0]]) { - // Tuple format: ['discriminator', ...ids] - const [disc, ...rest] = data[k]; - discriminator = disc; - ids = rest; - } else if (data[k] instanceof PolymorphicRef) { - // PolymorphicRef wrapper (internal use) - discriminator = data[k].discriminator; - const polyId = data[k].id; - // Handle object-style composite key IDs like { tenantId: 1, orgId: 100 } - if (polyId && typeof polyId === 'object' && !Array.isArray(polyId)) { - const targetEntity = prop.discriminatorMap?.[discriminator]; - const targetMeta = this.metadata.get(targetEntity); - ids = targetMeta.primaryKeys.map(pk => polyId[pk]); - } else { - ids = Utils.asArray(polyId); - } - } - if (discriminator) { - const discriminatorColumn = prop.fieldNames[0]; - const idColumns = prop.fieldNames.slice(1); - delete data[k]; - data[discriminatorColumn] = discriminator; - idColumns.forEach((col, idx) => { - data[col] = ids[idx]; - }); - return; - } - } - if (prop.joinColumns && Array.isArray(data[k])) { - const copy = Utils.flatten(data[k]); - delete data[k]; - prop.joinColumns.forEach((joinColumn, idx) => (data[joinColumn] = copy[idx])); - return; - } - if (prop.joinColumns?.length > 1 && data[k] == null) { - delete data[k]; - prop.ownColumns.forEach(joinColumn => (data[joinColumn] = null)); - return; - } - if ( - prop.customType && - convertCustomTypes && - !(prop.customType instanceof JsonType && object) && - !isRaw(data[k]) - ) { - data[k] = prop.customType.convertToDatabaseValue(data[k], this.platform, { - fromQuery: true, - key: k, - mode: 'query-data', - }); - } - if (prop.hasConvertToDatabaseValueSQL && !prop.object && !isRaw(data[k])) { - const quoted = this.platform.quoteValue(data[k]); - const sql = prop.customType.convertToDatabaseValueSQL(quoted, this.platform); - data[k] = raw(sql.replace(/\?/g, '\\?')); - } - if (prop.fieldNames) { - Utils.renameKey(data, k, prop.fieldNames[0]); - } - }); - return data; - } - inlineEmbeddables(meta, data, where) { - /* v8 ignore next */ - if (data == null) { - return; - } - Utils.keys(data).forEach(k => { - if (Utils.isOperator(k)) { - Utils.asArray(data[k]).forEach(payload => this.inlineEmbeddables(meta, payload, where)); - } - }); - meta.props.forEach(prop => { - if (prop.kind === ReferenceKind.EMBEDDED && prop.object && !where && Utils.isObject(data[prop.name])) { - return; - } - if (prop.kind === ReferenceKind.EMBEDDED && Utils.isObject(data[prop.name])) { - const props = prop.embeddedProps; - let unknownProp = false; - Object.keys(data[prop.name]).forEach(kk => { - // explicitly allow `$exists`, `$eq`, `$ne` and `$elemMatch` operators here as they can't be misused this way - const operator = Object.keys(data[prop.name]).some( - f => Utils.isOperator(f) && !['$exists', '$ne', '$eq', '$elemMatch'].includes(f), - ); - if (operator) { - throw ValidationError.cannotUseOperatorsInsideEmbeddables(meta.class, prop.name, data); - } - if (prop.object && where) { - const inline = (payload, sub, path) => { - if (sub.kind === ReferenceKind.EMBEDDED && Utils.isObject(payload[sub.embedded[1]])) { - return Object.keys(payload[sub.embedded[1]]).forEach(kkk => { - if (!sub.embeddedProps[kkk]) { - throw ValidationError.invalidEmbeddableQuery(meta.class, kkk, sub.type); - } - inline(payload[sub.embedded[1]], sub.embeddedProps[kkk], [...path, sub.fieldNames[0]]); - }); - } - data[`${path.join('.')}.${sub.fieldNames[0]}`] = payload[sub.embedded[1]]; - }; - const parentPropName = kk.substring(0, kk.indexOf('.')); - // we might be using some native JSON operator, e.g. with mongodb's `$geoWithin` or `$exists` - if (props[kk]) { - /* v8 ignore next */ - inline(data[prop.name], props[kk] || props[parentPropName], [prop.fieldNames[0]]); - } else if (props[parentPropName]) { - data[`${prop.fieldNames[0]}.${kk}`] = data[prop.name][kk]; - } else { - unknownProp = true; - } - } else if (props[kk]) { - data[props[kk].fieldNames[0]] = data[prop.name][props[kk].embedded[1]]; - } else { - throw ValidationError.invalidEmbeddableQuery(meta.class, kk, prop.type); - } - }); - if (!unknownProp) { - delete data[prop.name]; - } - } - }); - } - getPrimaryKeyFields(meta) { - return meta.getPrimaryProps().flatMap(pk => pk.fieldNames); - } - createReplicas(cb) { - const replicas = this.config.get('replicas', []); - const ret = []; - const props = [ - 'dbName', - 'clientUrl', - 'host', - 'port', - 'user', - 'password', - 'multipleStatements', - 'pool', - 'name', - 'driverOptions', - ]; - for (const conf of replicas) { - const replicaConfig = Utils.copy(conf); - for (const prop of props) { - if (conf[prop]) { - continue; - } - // do not copy options that can be inferred from explicitly provided `clientUrl` - if (conf.clientUrl && ['clientUrl', 'host', 'port', 'user', 'password'].includes(prop)) { - continue; - } - if (conf.clientUrl && prop === 'dbName' && new URL(conf.clientUrl).pathname) { - continue; - } - replicaConfig[prop] = this.config.get(prop); - } - ret.push(cb(replicaConfig)); - } - return ret; - } - /** Acquires a pessimistic lock on the given entity. */ - async lockPessimistic(entity, options) { - throw new Error(`Pessimistic locks are not supported by ${this.constructor.name} driver`); - } - /** - * @inheritDoc - */ - convertException(exception) { - if (exception instanceof DriverException) { - return exception; - } - return this.platform.getExceptionConverter().convertException(exception); - } - rethrow(promise) { - return promise.catch(e => { - throw this.convertException(e); - }); - } - /** - * @internal - */ - getTableName(meta, options, quote = true) { - const schema = this.getSchemaName(meta, options); - const tableName = - schema && schema !== this.platform.getDefaultSchemaName() ? `${schema}.${meta.tableName}` : meta.tableName; - if (quote) { - return this.platform.quoteIdentifier(tableName); - } - return tableName; - } - /** - * @internal - */ - getSchemaName(meta, options) { - if (meta?.schema && meta.schema !== '*') { - return meta.schema; - } - if (options?.schema === '*') { - return this.config.get('schema'); - } - const schemaName = meta?.schema === '*' ? this.config.getSchema() : meta?.schema; - return options?.schema ?? options?.parentSchema ?? schemaName ?? this.config.getSchema(); - } - /** @internal */ - getORMClass() { - return MikroORM; - } -} diff --git a/node_modules/@mikro-orm/core/drivers/IDatabaseDriver.d.ts b/node_modules/@mikro-orm/core/drivers/IDatabaseDriver.d.ts deleted file mode 100644 index 8347d06..0000000 --- a/node_modules/@mikro-orm/core/drivers/IDatabaseDriver.d.ts +++ /dev/null @@ -1,511 +0,0 @@ -import type { - ConnectionType, - Constructor, - EntityData, - EntityMetadata, - EntityProperty, - FilterQuery, - Primary, - Dictionary, - IPrimaryKey, - PopulateOptions, - EntityDictionary, - AutoPath, - ObjectQuery, - FilterObject, - Populate, - EntityName, - PopulateHintOptions, - Prefixes, -} from '../typings.js'; -import type { Connection, QueryResult, Transaction } from '../connections/Connection.js'; -import type { - FlushMode, - LockMode, - QueryOrderMap, - QueryFlag, - LoadStrategy, - PopulateHint, - PopulatePath, -} from '../enums.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { MetadataStorage } from '../metadata/MetadataStorage.js'; -import type { Collection } from '../entity/Collection.js'; -import type { EntityManager } from '../EntityManager.js'; -import type { DriverException } from '../exceptions.js'; -import type { Configuration } from '../utils/Configuration.js'; -import type { MikroORM } from '../MikroORM.js'; -import type { LoggingOptions, LogContext } from '../logging/Logger.js'; -import type { Raw } from '../utils/RawQueryFragment.js'; -/** Symbol used to extract the EntityManager type from a driver instance. */ -export declare const EntityManagerType: unique symbol; -/** Interface defining the contract for all database drivers. */ -export interface IDatabaseDriver { - [EntityManagerType]: EntityManager; - readonly config: Configuration; - /** Creates a new EntityManager instance for this driver. */ - createEntityManager(useContext?: boolean): this[typeof EntityManagerType]; - /** Opens a connection to the database. */ - connect(options?: { skipOnConnect?: boolean }): Promise; - /** Closes the database connection. */ - close(force?: boolean): Promise; - /** Closes and re-establishes the database connection. */ - reconnect(options?: { skipOnConnect?: boolean }): Promise; - /** Returns the underlying database connection (write or read replica). */ - getConnection(type?: ConnectionType): C; - /** - * Finds selection of entities - */ - find( - entityName: EntityName, - where: FilterQuery, - options?: FindOptions, - ): Promise[]>; - /** - * Finds single entity (table row, document) - */ - findOne( - entityName: EntityName, - where: FilterQuery, - options?: FindOneOptions, - ): Promise | null>; - /** Finds entities backed by a virtual (expression-based) definition. */ - findVirtual( - entityName: EntityName, - where: FilterQuery, - options: FindOptions, - ): Promise[]>; - /** Returns an async iterator that streams query results one entity at a time. */ - stream( - entityName: EntityName, - where: FilterQuery, - options: StreamOptions, - ): AsyncIterableIterator; - /** Inserts a single row into the database. */ - nativeInsert( - entityName: EntityName, - data: EntityDictionary, - options?: NativeInsertUpdateOptions, - ): Promise>; - /** Inserts multiple rows into the database in a single batch operation. */ - nativeInsertMany( - entityName: EntityName, - data: EntityDictionary[], - options?: NativeInsertUpdateManyOptions, - transform?: (sql: string) => string, - ): Promise>; - /** Updates rows matching the given condition. */ - nativeUpdate( - entityName: EntityName, - where: FilterQuery, - data: EntityDictionary, - options?: NativeInsertUpdateOptions, - ): Promise>; - /** Updates multiple rows with different payloads in a single batch operation. */ - nativeUpdateMany( - entityName: EntityName, - where: FilterQuery[], - data: EntityDictionary[], - options?: NativeInsertUpdateManyOptions, - ): Promise>; - /** Deletes rows matching the given condition. */ - nativeDelete( - entityName: EntityName, - where: FilterQuery, - options?: NativeDeleteOptions, - ): Promise>; - /** Persists changes to M:N collections (inserts/deletes pivot table rows). */ - syncCollections( - collections: Iterable>, - options?: DriverMethodOptions, - ): Promise; - /** Counts entities matching the given condition. */ - count( - entityName: EntityName, - where: FilterQuery, - options?: CountOptions, - ): Promise; - /** Executes a MongoDB aggregation pipeline (MongoDB driver only). */ - aggregate(entityName: EntityName, pipeline: any[]): Promise; - /** Maps raw database result to entity data, converting column names to property names. */ - mapResult( - result: EntityDictionary, - meta: EntityMetadata, - populate?: PopulateOptions[], - ): EntityData | null; - /** - * When driver uses pivot tables for M:N, this method will load identifiers for given collections from them - */ - loadFromPivotTable( - prop: EntityProperty, - owners: Primary[][], - where?: FilterQuery, - orderBy?: OrderDefinition, - ctx?: Transaction, - options?: FindOptions, - pivotJoin?: boolean, - ): Promise>; - /** Returns the database platform abstraction for this driver. */ - getPlatform(): Platform; - /** Sets the metadata storage used by this driver. */ - setMetadata(metadata: MetadataStorage): void; - /** Returns the metadata storage used by this driver. */ - getMetadata(): MetadataStorage; - /** - * Returns name of the underlying database dependencies (e.g. `mongodb` or `mysql2`) - * for SQL drivers it also returns `knex` in the array as connectors are not used directly there - */ - getDependencies(): string[]; - /** Acquires a pessimistic lock on the given entity. */ - lockPessimistic(entity: T, options: LockOptions): Promise; - /** - * Converts native db errors to standardized driver exceptions - */ - convertException(exception: Error): DriverException; - /** - * @internal - */ - getSchemaName( - meta?: EntityMetadata, - options?: { - schema?: string; - parentSchema?: string; - }, - ): string | undefined; - /** - * @internal - */ - getORMClass(): Constructor; -} -/** Represents a field selector for entity queries (property name or wildcard). */ -export type EntityField = - | keyof T - | PopulatePath.ALL - | AutoPath; -/** Defines the ordering for query results, either a single order map or an array of them. */ -export type OrderDefinition = - | (QueryOrderMap & { - 0?: never; - }) - | QueryOrderMap[]; -/** Options for `em.findAll()`, extends FindOptions with an optional `where` clause. */ -export interface FindAllOptions< - T, - P extends string = never, - F extends string = '*', - E extends string = never, -> extends FindOptions { - where?: FilterQuery; -} -/** Options for streaming query results via `em.stream()`. */ -export interface StreamOptions< - Entity, - Populate extends string = never, - Fields extends string = '*', - Exclude extends string = never, -> extends Omit< - FindAllOptions, - 'cache' | 'before' | 'after' | 'first' | 'last' | 'overfetch' | 'strategy' -> { - /** - * When populating to-many relations, the ORM streams fully merged entities instead of yielding every row. - * You can opt out of this behavior by specifying `mergeResults: false`. This will yield every row from - * the SQL result, but still mapped to entities, meaning that to-many collections will contain at most - * a single item, and you will get duplicate root entities when they have multiple items in the populated - * collection. - * - * @default true - */ - mergeResults?: boolean; -} -/** Configuration for enabling/disabling named filters on a query. */ -export type FilterOptions = Dictionary | string[] | boolean; -/** Specifies which relations to populate and which fields to select or exclude. */ -export interface LoadHint< - Entity, - Hint extends string = never, - Fields extends string = PopulatePath.ALL, - Excludes extends string = never, -> { - populate?: Populate; - fields?: readonly AutoPath[]; - exclude?: readonly AutoPath[]; -} -/** Options for `em.find()` queries, including population, ordering, pagination, and locking. */ -export interface FindOptions< - Entity, - Hint extends string = never, - Fields extends string = PopulatePath.ALL, - Excludes extends string = never, -> extends LoadHint { - /** - * Where condition for populated relations. This will have no effect on the root entity. - * With `select-in` strategy, this is applied only to the populate queries. - * With `joined` strategy, those are applied as `join on` conditions. - * When you use a nested condition on a to-many relation, it will produce a nested inner join, - * discarding the collection items based on the child condition. - */ - populateWhere?: ObjectQuery | PopulateHint | `${PopulateHint}`; - /** - * Filter condition for populated relations. This is similar to `populateWhere`, but will produce a `left join` - * when nesting the condition. This is used for implementation of joined filters. - */ - populateFilter?: ObjectQuery; - /** - * Index-friendly alternative to `$or` for conditions that span joined relations. - * Each array element becomes an independent branch combined via `UNION ALL` subquery: - * `WHERE pk IN (branch_1 UNION ALL branch_2 ... branch_N)`. - * The database plans each branch independently, enabling per-table index usage - * (e.g. GIN trigram indexes for fuzzy search across related entities). - * sql only - */ - unionWhere?: ObjectQuery[]; - /** - * Strategy for combining `unionWhere` branches. - * - `'union-all'` (default) — skips deduplication, faster for most use cases. - * - `'union'` — deduplicates rows between branches; useful when branch overlap is very high. - * sql only - */ - unionWhereStrategy?: 'union-all' | 'union'; - /** Used for ordering of the populate queries. If not specified, the value of `options.orderBy` is used. */ - populateOrderBy?: OrderDefinition; - /** Per-relation overrides for populate loading behavior. Keys are populate paths (same as used in `populate`). */ - populateHints?: [Hint] extends [never] - ? never - : { - [K in Prefixes]?: PopulateHintOptions; - }; - /** Ordering of the results.Can be an object or array of objects, keys are property names, values are ordering (asc/desc) */ - orderBy?: OrderDefinition; - /** Control result caching for this query. Result cache is by default disabled, not to be confused with the identity map. */ - cache?: boolean | number | [string, number]; - /** - * Limit the number of returned results. If you try to use limit/offset on a query that joins a to-many relation, pagination mechanism - * will be triggered, resulting in a subquery condition, to apply this limit only to the root entities - * instead of the cartesian product you get from a database in this case. - */ - limit?: number; - /** - * Sets the offset. If you try to use limit/offset on a query that joins a to-many relation, pagination mechanism - * will be triggered, resulting in a subquery condition, to apply this limit only to the root entities - * instead of the cartesian product you get from a database in this case. - */ - offset?: number; - /** Fetch items `before` this cursor. */ - before?: - | string - | { - startCursor: string | null; - } - | FilterObject; - /** Fetch items `after` this cursor. */ - after?: - | string - | { - endCursor: string | null; - } - | FilterObject; - /** Fetch `first` N items. */ - first?: number; - /** Fetch `last` N items. */ - last?: number; - /** Fetch one more item than `first`/`last`, enabled automatically in `em.findByCursor` to check if there is a next page. */ - overfetch?: boolean; - refresh?: boolean; - convertCustomTypes?: boolean; - disableIdentityMap?: boolean; - schema?: string; - flags?: QueryFlag[]; - /** sql only */ - groupBy?: string | string[]; - having?: FilterQuery; - /** sql only */ - strategy?: LoadStrategy | `${LoadStrategy}`; - flushMode?: FlushMode | `${FlushMode}`; - filters?: FilterOptions; - /** sql only */ - lockMode?: Exclude; - /** sql only */ - lockTableAliases?: string[]; - ctx?: Transaction; - connectionType?: ConnectionType; - /** SQL: appended to FROM clause (e.g. `'force index(my_index)'`); MongoDB: index name or spec passed as `hint`. */ - indexHint?: string | Dictionary; - /** sql only */ - comments?: string | string[]; - /** sql only */ - hintComments?: string | string[]; - /** SQL: collation name string applied as COLLATE to ORDER BY; MongoDB: CollationOptions object. */ - collation?: CollationOptions | string; - /** mongodb only */ - maxTimeMS?: number; - /** mongodb only */ - allowDiskUse?: boolean; - loggerContext?: LogContext; - logging?: LoggingOptions; - /** @internal used to apply filters to the auto-joined relations */ - em?: EntityManager; -} -/** Options for cursor-based pagination via `em.findByCursor()`. */ -export interface FindByCursorOptions< - T extends object, - P extends string = never, - F extends string = '*', - E extends string = never, - I extends boolean = true, -> extends Omit, 'limit' | 'offset'> { - includeCount?: I; -} -/** Options for `em.findOne()`, extends FindOptions with optimistic lock version support. */ -export interface FindOneOptions< - T, - P extends string = never, - F extends string = '*', - E extends string = never, -> extends Omit, 'limit' | 'lockMode'> { - lockMode?: LockMode; - lockVersion?: number | Date; -} -/** Options for `em.findOneOrFail()`, adds a custom error handler for missing entities. */ -export interface FindOneOrFailOptions< - T extends object, - P extends string = never, - F extends string = '*', - E extends string = never, -> extends FindOneOptions { - failHandler?: (entityName: string, where: Dictionary | IPrimaryKey | any) => Error; - strict?: boolean; -} -/** Options for native insert and update operations. */ -export interface NativeInsertUpdateOptions { - convertCustomTypes?: boolean; - ctx?: Transaction; - schema?: string; - /** `nativeUpdate()` only option */ - upsert?: boolean; - loggerContext?: LogContext; - /** sql only */ - unionWhere?: ObjectQuery[]; - /** sql only */ - unionWhereStrategy?: 'union-all' | 'union'; - filters?: FilterOptions; - /** @internal */ - em?: EntityManager; -} -/** Options for batch native insert and update operations. */ -export interface NativeInsertUpdateManyOptions extends NativeInsertUpdateOptions { - processCollections?: boolean; -} -/** Options for `em.upsert()`, controlling conflict resolution behavior. */ -export interface UpsertOptions extends Omit< - NativeInsertUpdateOptions, - 'upsert' -> { - onConflictFields?: (keyof Entity)[] | Raw; - onConflictAction?: 'ignore' | 'merge'; - onConflictMergeFields?: AutoPath[]; - onConflictExcludeFields?: AutoPath[]; - onConflictWhere?: FilterQuery; - disableIdentityMap?: boolean; -} -/** Options for `em.upsertMany()`, adds batch size control. */ -export interface UpsertManyOptions extends UpsertOptions { - batchSize?: number; -} -/** Options for `em.count()` queries. */ -export interface CountOptions { - filters?: FilterOptions; - schema?: string; - groupBy?: string | readonly string[]; - having?: FilterQuery; - cache?: boolean | number | [string, number]; - populate?: Populate; - populateWhere?: ObjectQuery | PopulateHint | `${PopulateHint}`; - populateFilter?: ObjectQuery; - /** @see FindOptions.unionWhere */ - unionWhere?: ObjectQuery[]; - /** @see FindOptions.unionWhereStrategy */ - unionWhereStrategy?: 'union-all' | 'union'; - ctx?: Transaction; - connectionType?: ConnectionType; - flushMode?: FlushMode | `${FlushMode}`; - /** SQL: appended to FROM clause (e.g. `'force index(my_index)'`); MongoDB: index name or spec passed as `hint`. */ - indexHint?: string | Dictionary; - /** sql only */ - comments?: string | string[]; - /** sql only */ - hintComments?: string | string[]; - /** SQL: collation name string applied as COLLATE; MongoDB: CollationOptions object. */ - collation?: CollationOptions | string; - /** mongodb only */ - maxTimeMS?: number; - loggerContext?: LogContext; - logging?: LoggingOptions; - /** @internal used to apply filters to the auto-joined relations */ - em?: EntityManager; -} -/** Options for `em.qb().update()` operations. */ -export interface UpdateOptions { - filters?: FilterOptions; - schema?: string; - ctx?: Transaction; - /** sql only */ - unionWhere?: ObjectQuery[]; - /** sql only */ - unionWhereStrategy?: 'union-all' | 'union'; -} -/** Options for `em.qb().delete()` operations. */ -export interface DeleteOptions extends DriverMethodOptions { - filters?: FilterOptions; - /** sql only */ - unionWhere?: ObjectQuery[]; - /** sql only */ - unionWhereStrategy?: 'union-all' | 'union'; - /** @internal */ - em?: EntityManager; -} -/** Options for `em.nativeDelete()` operations. */ -export interface NativeDeleteOptions extends DriverMethodOptions { - filters?: FilterOptions; - /** sql only */ - unionWhere?: ObjectQuery[]; - /** sql only */ - unionWhereStrategy?: 'union-all' | 'union'; - /** @internal */ - em?: EntityManager; -} -/** Options for pessimistic and optimistic lock operations. */ -export interface LockOptions extends DriverMethodOptions { - lockMode?: LockMode; - lockVersion?: number | Date; - lockTableAliases?: string[]; - logging?: LoggingOptions; -} -/** Base options shared by all driver methods (transaction context, schema, logging). */ -export interface DriverMethodOptions { - ctx?: Transaction; - schema?: string; - loggerContext?: LogContext; -} -/** MongoDB-style collation options for locale-aware string comparison. */ -export interface CollationOptions { - locale: string; - caseLevel?: boolean; - caseFirst?: string; - strength?: number; - numericOrdering?: boolean; - alternate?: string; - maxVariable?: string; - backwards?: boolean; -} -/** Options for `em.getReference()`, controlling wrapping and type conversion. */ -export interface GetReferenceOptions { - wrapped?: boolean; - convertCustomTypes?: boolean; - schema?: string; - /** - * Property name to use for identity map lookup instead of the primary key. - * This is useful for creating references by unique non-PK properties. - */ - key?: string; -} diff --git a/node_modules/@mikro-orm/core/drivers/IDatabaseDriver.js b/node_modules/@mikro-orm/core/drivers/IDatabaseDriver.js deleted file mode 100644 index c566031..0000000 --- a/node_modules/@mikro-orm/core/drivers/IDatabaseDriver.js +++ /dev/null @@ -1,2 +0,0 @@ -/** Symbol used to extract the EntityManager type from a driver instance. */ -export const EntityManagerType = Symbol('EntityManagerType'); diff --git a/node_modules/@mikro-orm/core/drivers/index.d.ts b/node_modules/@mikro-orm/core/drivers/index.d.ts deleted file mode 100644 index d90036a..0000000 --- a/node_modules/@mikro-orm/core/drivers/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './IDatabaseDriver.js'; -export * from './DatabaseDriver.js'; diff --git a/node_modules/@mikro-orm/core/drivers/index.js b/node_modules/@mikro-orm/core/drivers/index.js deleted file mode 100644 index d90036a..0000000 --- a/node_modules/@mikro-orm/core/drivers/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export * from './IDatabaseDriver.js'; -export * from './DatabaseDriver.js'; diff --git a/node_modules/@mikro-orm/core/entity/BaseEntity.d.ts b/node_modules/@mikro-orm/core/entity/BaseEntity.d.ts deleted file mode 100644 index 9533e95..0000000 --- a/node_modules/@mikro-orm/core/entity/BaseEntity.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { type Ref } from './Reference.js'; -import type { - AutoPath, - EntityData, - EntityDTO, - Loaded, - LoadedReference, - AddEager, - EntityKey, - FromEntityType, - IsSubset, - MergeSelected, - SerializeDTO, -} from '../typings.js'; -import { type AssignOptions } from './EntityAssigner.js'; -import type { EntityLoaderOptions } from './EntityLoader.js'; -import { type SerializeOptions } from '../serialization/EntitySerializer.js'; -import type { FindOneOptions } from '../drivers/IDatabaseDriver.js'; -import type { PopulatePath } from '../enums.js'; -/** Base class for entities providing convenience methods like `assign()`, `toObject()`, and `populate()`. */ -export declare abstract class BaseEntity { - /** Returns whether the entity has been fully loaded from the database. */ - isInitialized(): boolean; - /** Marks the entity as populated or not for serialization purposes. */ - populated(populated?: boolean): void; - /** Loads the specified relations on this entity. */ - populate( - populate: AutoPath[] | false, - options?: EntityLoaderOptions, - ): Promise>; - /** Returns a Reference wrapper for this entity. */ - toReference(): Ref & LoadedReference>>; - /** - * Converts the entity to a plain object representation. - * - * **Note on typing with `Loaded` entities:** When called on a `Loaded` type, - * the return type will be `EntityDTO` (with relations as primary keys), not - * `EntityDTO>` (with loaded relations as nested objects). - * This is a TypeScript limitation - the `this` type resolves to the class, not the `Loaded` wrapper. - * - * For correct typing that reflects loaded relations, use `wrap()`: - * ```ts - * const result = await em.find(User, {}, { populate: ['profile'] }); - * // Type: EntityDTO (profile is number) - * const obj1 = result[0].toObject(); - * // Type: EntityDTO> (profile is nested object) - * const obj2 = wrap(result[0]).toObject(); - * ``` - * - * Runtime values are correct in both cases - only the static types differ. - */ - toObject(): EntityDTO; - /** - * Converts the entity to a plain object representation. - * - * **Note on typing with `Loaded` entities:** When called on a `Loaded` type, - * the return type will be `EntityDTO` (with relations as primary keys), not - * `EntityDTO>` (with loaded relations as nested objects). - * This is a TypeScript limitation - the `this` type resolves to the class, not the `Loaded` wrapper. - * - * For correct typing that reflects loaded relations, use `wrap()`: - * ```ts - * const result = await em.find(User, {}, { populate: ['profile'] }); - * // Type: EntityDTO (profile is number) - * const obj1 = result[0].toObject(); - * // Type: EntityDTO> (profile is nested object) - * const obj2 = wrap(result[0]).toObject(); - * ``` - * - * Runtime values are correct in both cases - only the static types differ. - */ - toObject(ignoreFields: never[]): EntityDTO; - /** - * Converts the entity to a plain object representation. - * - * **Note on typing with `Loaded` entities:** When called on a `Loaded` type, - * the return type will be `EntityDTO` (with relations as primary keys), not - * `EntityDTO>` (with loaded relations as nested objects). - * This is a TypeScript limitation - the `this` type resolves to the class, not the `Loaded` wrapper. - * - * For correct typing that reflects loaded relations, use `wrap()`: - * ```ts - * const result = await em.find(User, {}, { populate: ['profile'] }); - * // Type: EntityDTO (profile is number) - * const obj1 = result[0].toObject(); - * // Type: EntityDTO> (profile is nested object) - * const obj2 = wrap(result[0]).toObject(); - * ``` - * - * Runtime values are correct in both cases - only the static types differ. - * - * @param ignoreFields - Array of field names to omit from the result. - */ - toObject = never>( - ignoreFields: Ignored[], - ): Omit, Ignored>; - /** Converts the entity to a plain object, including all properties regardless of serialization rules. */ - toPOJO(): EntityDTO; - /** Serializes the entity with control over which relations and fields to include or exclude. */ - serialize< - Entity extends this = this, - Naked extends FromEntityType = FromEntityType, - Hint extends string = never, - Exclude extends string = never, - >(options?: SerializeOptions): SerializeDTO; - /** Assigns the given data to this entity, updating its properties and relations. */ - assign< - Entity extends this, - Naked extends FromEntityType = FromEntityType, - Convert extends boolean = false, - Data extends EntityData | Partial> = - | EntityData - | Partial>, - >( - data: Data & IsSubset, Data>, - options?: AssignOptions, - ): MergeSelected; - /** Initializes (refreshes) the entity by reloading it from the database. Returns null if not found. */ - init< - Entity extends this = this, - Hint extends string = never, - Fields extends string = '*', - Excludes extends string = never, - >(options?: FindOneOptions): Promise | null>; - /** Returns the database schema this entity belongs to. */ - getSchema(): string | undefined; - /** Sets the database schema for this entity. */ - setSchema(schema?: string): void; -} diff --git a/node_modules/@mikro-orm/core/entity/BaseEntity.js b/node_modules/@mikro-orm/core/entity/BaseEntity.js deleted file mode 100644 index 0c3d050..0000000 --- a/node_modules/@mikro-orm/core/entity/BaseEntity.js +++ /dev/null @@ -1,51 +0,0 @@ -import { Reference } from './Reference.js'; -import { EntityAssigner } from './EntityAssigner.js'; -import { EntitySerializer } from '../serialization/EntitySerializer.js'; -import { helper } from './wrap.js'; -/** Base class for entities providing convenience methods like `assign()`, `toObject()`, and `populate()`. */ -export class BaseEntity { - /** Returns whether the entity has been fully loaded from the database. */ - isInitialized() { - return helper(this).__initialized; - } - /** Marks the entity as populated or not for serialization purposes. */ - populated(populated = true) { - helper(this).populated(populated); - } - /** Loads the specified relations on this entity. */ - async populate(populate, options = {}) { - return helper(this).populate(populate, options); - } - /** Returns a Reference wrapper for this entity. */ - toReference() { - return Reference.create(this); - } - toObject(ignoreFields) { - return helper(this).toObject(ignoreFields); - } - /** Converts the entity to a plain object, including all properties regardless of serialization rules. */ - toPOJO() { - return helper(this).toPOJO(); - } - /** Serializes the entity with control over which relations and fields to include or exclude. */ - serialize(options) { - return EntitySerializer.serialize(this, options); - } - /** Assigns the given data to this entity, updating its properties and relations. */ - assign(data, options = {}) { - return EntityAssigner.assign(this, data, options); - } - /** Initializes (refreshes) the entity by reloading it from the database. Returns null if not found. */ - init(options) { - return helper(this).init(options); - } - /** Returns the database schema this entity belongs to. */ - getSchema() { - return helper(this).getSchema(); - } - /** Sets the database schema for this entity. */ - setSchema(schema) { - helper(this).setSchema(schema); - } -} -Object.defineProperty(BaseEntity.prototype, '__baseEntity', { value: true, writable: false, enumerable: false }); diff --git a/node_modules/@mikro-orm/core/entity/Collection.d.ts b/node_modules/@mikro-orm/core/entity/Collection.d.ts deleted file mode 100644 index f56528d..0000000 --- a/node_modules/@mikro-orm/core/entity/Collection.d.ts +++ /dev/null @@ -1,227 +0,0 @@ -import type { - EntityDTO, - EntityKey, - EntityProperty, - FilterQuery, - IPrimaryKey, - Loaded, - LoadedCollection, - Populate, - Primary, -} from '../typings.js'; -import { Reference } from './Reference.js'; -import type { Transaction } from '../connections/Connection.js'; -import type { CountOptions, FindOptions } from '../drivers/IDatabaseDriver.js'; -import type { EntityLoaderOptions } from './EntityLoader.js'; -/** Options for the `Collection.matching()` method to query a subset of collection items from the database. */ -export interface MatchingOptions extends FindOptions { - /** Additional filtering conditions for the query. */ - where?: FilterQuery; - /** Whether to store the matched items in the collection (makes it read-only). */ - store?: boolean; - /** Transaction context for the query. */ - ctx?: Transaction; -} -/** Represents a to-many relation (1:m or m:n) as an iterable, managed collection of entities. */ -export declare class Collection { - #private; - readonly owner: O; - [k: number]: T; - constructor(owner: O, items?: T[], initialized?: boolean); - /** - * Creates new Collection instance, assigns it to the owning entity and sets the items to it (propagating them to their inverse sides) - */ - static create( - owner: O, - prop: EntityKey, - items: undefined | T[], - initialized: boolean, - ): Collection; - /** - * Ensures the collection is loaded first (without reloading it if it already is loaded). - * Returns the Collection instance (itself), works the same as `Reference.load()`. - */ - load( - options?: InitCollectionOptions, - ): Promise>>; - private setSerializationContext; - /** - * Initializes the collection and returns the items - */ - loadItems(options?: InitCollectionOptions): Promise[]>; - /** - * Gets the count of collection items from database instead of counting loaded items. - * The value is cached (unless you use the `where` option), use `refresh: true` to force reload it. - */ - loadCount(options?: LoadCountOptions | boolean): Promise; - /** Queries a subset of the collection items from the database with custom filtering, ordering, and pagination. */ - matching(options: MatchingOptions): Promise[]>; - /** - * Returns the items (the collection must be initialized) - */ - getItems(check?: boolean): T[]; - /** Serializes the collection items to plain JSON objects. Returns an empty array if not initialized. */ - toJSON(): EntityDTO[]; - /** Adds one or more items to the collection, propagating the change to the inverse side. Returns the number of items added. */ - add( - entity: TT | Reference | Iterable>, - ...entities: (TT | Reference)[] - ): number; - /** - * Remove specified item(s) from the collection. Note that removing item from collection does not necessarily imply deleting the target entity, - * it means we are disconnecting the relation - removing items from collection, not removing entities from database - `Collection.remove()` - * is not the same as `em.remove()`. If we want to delete the entity by removing it from collection, we need to enable `orphanRemoval: true`, - * which tells the ORM we don't want orphaned entities to exist, so we know those should be removed. - */ - remove( - entity: TT | Reference | Iterable> | ((item: TT) => boolean), - ...entities: (TT | Reference)[] - ): number; - /** Checks whether the collection contains the given item. */ - contains(item: TT | Reference, check?: boolean): boolean; - /** Returns the number of items in the collection. Throws if the collection is not initialized. */ - count(): number; - /** Returns true if the collection has no items. Throws if the collection is not initialized. */ - isEmpty(): boolean; - /** Returns whether this collection should be included in serialization based on its populated state. */ - shouldPopulate(populated?: boolean): boolean; - /** Marks the collection as populated or not for serialization purposes. */ - populated(populated?: boolean | undefined): void; - /** Initializes the collection by loading its items from the database. */ - init( - options?: InitCollectionOptions, - ): Promise>>; - private getEntityManager; - private createCondition; - private createManyToManyCondition; - private createLoadCountCondition; - private checkInitialized; - /** - * re-orders items after searching with `$in` operator - */ - private reorderItems; - private cancelOrphanRemoval; - private validateModification; - /** Converts all items in the collection to plain DTO objects. */ - toArray(): EntityDTO[]; - /** Returns the primary key values (or a specific field) of all items in the collection. */ - getIdentifiers & IPrimaryKey>(field?: string | string[]): U[]; - /** - * @internal - */ - addWithoutPropagation(entity: T): void; - /** Replaces all items in the collection with the given items. */ - set(items: Iterable>): void; - private compare; - /** - * @internal - */ - hydrate(items: T[], forcePropagate?: boolean, partial?: boolean): void; - /** - * Remove all items from the collection. Note that removing items from collection does not necessarily imply deleting the target entity, - * it means we are disconnecting the relation - removing items from collection, not removing entities from database - `Collection.remove()` - * is not the same as `em.remove()`. If we want to delete the entity by removing it from collection, we need to enable `orphanRemoval: true`, - * which tells the ORM we don't want orphaned entities to exist, so we know those should be removed. - */ - removeAll(): void; - /** - * @internal - */ - removeWithoutPropagation(entity: T): void; - /** - * Extracts a slice of the collection items starting at position start to end (exclusive) of the collection. - * If end is null it returns all elements from start to the end of the collection. - */ - slice(start?: number, end?: number): T[]; - /** - * Tests for the existence of an element that satisfies the given predicate. - */ - exists(cb: (item: T) => boolean): boolean; - /** - * Returns the first element of this collection that satisfies the predicate. - */ - find(cb: (item: T, index: number) => item is S): S | undefined; - /** - * Returns the first element of this collection that satisfies the predicate. - */ - find(cb: (item: T, index: number) => boolean): T | undefined; - /** - * Extracts a subset of the collection items. - */ - filter(cb: (item: T, index: number) => item is S): S[]; - /** - * Extracts a subset of the collection items. - */ - filter(cb: (item: T, index: number) => boolean): T[]; - /** - * Maps the collection items based on your provided mapper function. - */ - map(mapper: (item: T, index: number) => R): R[]; - /** - * Maps the collection items based on your provided mapper function to a single object. - */ - reduce(cb: (obj: R, item: T, index: number) => R, initial?: R): R; - /** - * Maps the collection items to a dictionary, indexed by the key you specify. - * If there are more items with the same key, only the first one will be present. - */ - indexBy(key: K1): Record; - /** - * Maps the collection items to a dictionary, indexed by the key you specify. - * If there are more items with the same key, only the first one will be present. - */ - indexBy(key: K1, valueKey: K2): Record; - /** Returns whether the collection has been initialized. Pass `fully = true` to also check that all items are initialized. */ - isInitialized(fully?: boolean): boolean; - isDirty(): boolean; - /** Returns whether the collection was partially loaded (propagation is disabled for partial collections). */ - isPartial(): boolean; - setDirty(dirty?: boolean): void; - get length(): number; - [Symbol.iterator](): IterableIterator; - /** - * @internal - */ - takeSnapshot(forcePropagate?: boolean): void; - /** - * @internal - */ - getSnapshot(): T[] | undefined; - /** - * @internal - */ - get property(): EntityProperty; - /** - * @internal - */ - set property(prop: EntityProperty); - protected propagate(item: T, method: 'add' | 'remove' | 'takeSnapshot'): void; - protected propagateToInverseSide(item: T, method: 'add' | 'remove' | 'takeSnapshot'): void; - protected propagateToOwningSide(item: T, method: 'add' | 'remove' | 'takeSnapshot'): void; - protected shouldPropagateToCollection( - collection: Collection, - method: 'add' | 'remove' | 'takeSnapshot', - ): boolean; - protected incrementCount(value: number): void; -} -/** Options for initializing a collection via `init()` or `load()`. */ -export interface InitCollectionOptions< - T, - P extends string = never, - F extends string = '*', - E extends string = never, -> extends EntityLoaderOptions { - /** Whether to use the dataloader for batching collection loads. */ - dataloader?: boolean; - /** Relations to populate on the loaded items. */ - populate?: Populate; - /** Populate only references (without loading full entities). Works only with M:N collections that use pivot table. */ - ref?: boolean; -} -/** Options for the `Collection.loadCount()` method. */ -export interface LoadCountOptions extends CountOptions { - /** Whether to reload the count from the database even if it is already cached. */ - refresh?: boolean; - /** Additional filtering conditions for the count query. */ - where?: FilterQuery; -} diff --git a/node_modules/@mikro-orm/core/entity/Collection.js b/node_modules/@mikro-orm/core/entity/Collection.js deleted file mode 100644 index e67ff07..0000000 --- a/node_modules/@mikro-orm/core/entity/Collection.js +++ /dev/null @@ -1,747 +0,0 @@ -import { Utils } from '../utils/Utils.js'; -import { MetadataError, ValidationError } from '../errors.js'; -import { DataloaderType, ReferenceKind } from '../enums.js'; -import { Reference } from './Reference.js'; -import { helper, wrap } from './wrap.js'; -import { QueryHelper } from '../utils/QueryHelper.js'; -import { inspect } from '../logging/inspect.js'; -/** Represents a to-many relation (1:m or m:n) as an iterable, managed collection of entities. */ -export class Collection { - owner; - #items = new Set(); - #initialized = true; - #dirty = false; - #partial = false; // mark partially loaded collections, propagation is disabled for those - #snapshot = []; // used to create a diff of the collection at commit time, undefined marks overridden values so we need to wipe when flushing - #readonly; - #count; - #property; - #populated; - constructor(owner, items, initialized = true) { - this.owner = owner; - /* v8 ignore next */ - if (items) { - let i = 0; - this.#items = new Set(items); - this.#items.forEach(item => (this[i++] = item)); - } - this.#initialized = !!items || initialized; - } - /** - * Creates new Collection instance, assigns it to the owning entity and sets the items to it (propagating them to their inverse sides) - */ - static create(owner, prop, items, initialized) { - const coll = new Collection(owner, undefined, initialized); - coll.property = helper(owner).__meta.properties[prop]; - owner[prop] = coll; - if (items) { - coll.set(items); - } - return coll; - } - /** - * Ensures the collection is loaded first (without reloading it if it already is loaded). - * Returns the Collection instance (itself), works the same as `Reference.load()`. - */ - async load(options = {}) { - if (this.isInitialized(true) && !options.refresh) { - const em = this.getEntityManager(this.#items, false); - options = { ...options, filters: QueryHelper.mergePropertyFilters(this.property.filters, options.filters) }; - await em?.populate(this.#items, options.populate, options); - this.setSerializationContext(options); - } else { - await this.init({ refresh: false, ...options }); - } - return this; - } - setSerializationContext(options) { - helper(this.owner).setSerializationContext({ - populate: Array.isArray(options.populate) - ? options.populate.map(hint => `${this.property.name}.${hint}`) - : (options.populate ?? [this.property.name]), - }); - } - /** - * Initializes the collection and returns the items - */ - async loadItems(options) { - await this.load(options); - return this.getItems(false); - } - /** - * Gets the count of collection items from database instead of counting loaded items. - * The value is cached (unless you use the `where` option), use `refresh: true` to force reload it. - */ - async loadCount(options = {}) { - options = typeof options === 'boolean' ? { refresh: options } : options; - const { refresh, where, ...countOptions } = options; - if (!refresh && !where && this.#count != null) { - return this.#count; - } - const em = this.getEntityManager(); - if ( - !em.getPlatform().usesPivotTable() && - this.property.kind === ReferenceKind.MANY_TO_MANY && - this.property.owner - ) { - return (this.#count = this.length); - } - const cond = this.createLoadCountCondition(where ?? {}); - const count = await em.count(this.property.targetMeta.class, cond, countOptions); - if (!where) { - this.#count = count; - } - return count; - } - /** Queries a subset of the collection items from the database with custom filtering, ordering, and pagination. */ - async matching(options) { - const em = this.getEntityManager(); - const { where, ctx, ...opts } = options; - let items; - if (this.property.kind === ReferenceKind.MANY_TO_MANY && em.getPlatform().usesPivotTable()) { - // M:N via pivot table bypasses em.find(), so merge all 3 levels here - opts.orderBy = QueryHelper.mergeOrderBy(opts.orderBy, this.property.orderBy, this.property.targetMeta?.orderBy); - options.populate = await em.preparePopulate(this.property.targetMeta.class, options); - const cond = await em.applyFilters(this.property.targetMeta.class, where, options.filters ?? {}, 'read'); - const map = await em - .getDriver() - .loadFromPivotTable(this.property, [helper(this.owner).__primaryKeys], cond, opts.orderBy, ctx, options); - items = map[helper(this.owner).getSerializedPrimaryKey()].map(item => - em.merge(this.property.targetMeta.class, item, { convertCustomTypes: true }), - ); - await em.populate(items, options.populate, options); - } else { - // em.find() merges entity-level orderBy, so only merge runtime + relation here - opts.orderBy = QueryHelper.mergeOrderBy(opts.orderBy, this.property.orderBy); - items = await em.find(this.property.targetMeta.class, this.createCondition(where), opts); - } - if (options.store) { - this.hydrate(items, true); - this.setSerializationContext(options); - this.populated(); - this.#readonly = true; - } - return items; - } - /** - * Returns the items (the collection must be initialized) - */ - getItems(check = true) { - if (check) { - this.checkInitialized(); - } - return [...this.#items]; - } - /** Serializes the collection items to plain JSON objects. Returns an empty array if not initialized. */ - toJSON() { - if (!this.isInitialized()) { - return []; - } - return this.toArray(); - } - /** Adds one or more items to the collection, propagating the change to the inverse side. Returns the number of items added. */ - add(entity, ...entities) { - entities = Utils.asArray(entity).concat(entities); - const unwrapped = entities.map(i => Reference.unwrapReference(i)); - this.validateModification(unwrapped); - const em = this.getEntityManager(entities, false); - let added = 0; - for (const item of entities) { - const entity = Reference.unwrapReference(item); - if (!this.contains(entity, false)) { - this.incrementCount(1); - this[this.#items.size] = entity; - this.#items.add(entity); - added++; - this.#dirty = true; - this.propagate(entity, 'add'); - } - } - if (this.property.kind === ReferenceKind.ONE_TO_MANY && em) { - em.persist(entities); - } - this.cancelOrphanRemoval(unwrapped); - return added; - } - /** - * Remove specified item(s) from the collection. Note that removing item from collection does not necessarily imply deleting the target entity, - * it means we are disconnecting the relation - removing items from collection, not removing entities from database - `Collection.remove()` - * is not the same as `em.remove()`. If we want to delete the entity by removing it from collection, we need to enable `orphanRemoval: true`, - * which tells the ORM we don't want orphaned entities to exist, so we know those should be removed. - */ - remove(entity, ...entities) { - if (entity instanceof Function) { - let removed = 0; - for (const item of this.#items) { - if (entity(item)) { - removed += this.remove(item); - } - } - return removed; - } - this.checkInitialized(); - entities = Utils.asArray(entity).concat(entities); - const unwrapped = entities.map(i => Reference.unwrapReference(i)); - this.validateModification(unwrapped); - const em = this.getEntityManager(entities, false); - let removed = 0; - for (const item of entities) { - if (!item) { - continue; - } - const entity = Reference.unwrapReference(item); - if (this.#items.delete(entity)) { - this.incrementCount(-1); - delete this[this.#items.size]; // remove last item - this.propagate(entity, 'remove'); - removed++; - this.#dirty = true; - } - if (this.property.orphanRemoval && em) { - em.getUnitOfWork().scheduleOrphanRemoval(entity); - } - } - if (this.property.kind === ReferenceKind.ONE_TO_MANY && !this.property.orphanRemoval && em) { - em.persist(entities); - } - if (removed > 0) { - Object.assign(this, [...this.#items]); // reassign array access - } - return removed; - } - /** Checks whether the collection contains the given item. */ - contains(item, check = true) { - if (check) { - this.checkInitialized(); - } - const entity = Reference.unwrapReference(item); - return this.#items.has(entity); - } - /** Returns the number of items in the collection. Throws if the collection is not initialized. */ - count() { - this.checkInitialized(); - return this.#items.size; - } - /** Returns true if the collection has no items. Throws if the collection is not initialized. */ - isEmpty() { - this.checkInitialized(); - return this.count() === 0; - } - /** Returns whether this collection should be included in serialization based on its populated state. */ - shouldPopulate(populated) { - if (!this.isInitialized(true)) { - return false; - } - if (this.#populated != null) { - return this.#populated; - } - return !!populated; - } - /** Marks the collection as populated or not for serialization purposes. */ - populated(populated = true) { - this.#populated = populated; - } - /** Initializes the collection by loading its items from the database. */ - async init(options = {}) { - if (this.#dirty) { - const items = [...this.#items]; - this.#dirty = false; - await this.init(options); - items.forEach(i => this.add(i)); - return this; - } - const em = this.getEntityManager(); - options = { ...options, filters: QueryHelper.mergePropertyFilters(this.property.filters, options.filters) }; - if (options.dataloader ?? [DataloaderType.ALL, DataloaderType.COLLECTION].includes(em.config.getDataloaderType())) { - const order = [...this.#items]; // copy order of references - const orderBy = QueryHelper.mergeOrderBy( - options.orderBy, - this.property.orderBy, - this.property.targetMeta?.orderBy, - ); - const customOrder = orderBy.length > 0; - const pivotTable = this.property.kind === ReferenceKind.MANY_TO_MANY && em.getPlatform().usesPivotTable(); - const loader = await em.getDataLoader(pivotTable ? 'm:n' : '1:m'); - const items = await loader.load([this, { ...options, orderBy }]); - if (this.property.kind === ReferenceKind.MANY_TO_MANY) { - this.#initialized = true; - this.#dirty = false; - if (!customOrder) { - this.reorderItems(items, order); - } - return this; - } - this.#items.clear(); - let i = 0; - for (const item of items) { - this.#items.add(item); - this[i++] = item; - } - this.#initialized = true; - this.#dirty = false; - return this; - } - const populate = Array.isArray(options.populate) - ? options.populate.map(f => (f === '*' ? f : `${this.property.name}.${f}`)) - : [`${this.property.name}${options.ref ? ':ref' : ''}`]; - const schema = this.property.targetMeta.schema === '*' ? helper(this.owner).__schema : undefined; - await em.populate(this.owner, populate, { - refresh: true, - ...options, - connectionType: options.connectionType, - schema, - where: { [this.property.name]: options.where }, - orderBy: { [this.property.name]: options.orderBy }, - }); - return this; - } - getEntityManager(items = [], required = true) { - const wrapped = helper(this.owner); - let em = wrapped.__em; - if (!em) { - for (const i of items) { - if (i && helper(i).__em) { - em = helper(i).__em; - break; - } - } - } - if (!em && required) { - throw ValidationError.entityNotManaged(this.owner); - } - return em; - } - createCondition(cond = {}) { - if (this.property.kind === ReferenceKind.ONE_TO_MANY) { - cond[this.property.mappedBy] = helper(this.owner).getPrimaryKey(); - } else { - // MANY_TO_MANY - this.createManyToManyCondition(cond); - } - return cond; - } - createManyToManyCondition(cond) { - const dict = cond; - if (this.property.owner || this.property.pivotTable) { - // we know there is at least one item as it was checked in load method - const pk = this.property.targetMeta.primaryKeys[0]; - dict[pk] = { $in: [] }; - this.#items.forEach(item => dict[pk].$in.push(helper(item).getPrimaryKey())); - } else { - dict[this.property.mappedBy] = helper(this.owner).getPrimaryKey(); - } - } - createLoadCountCondition(cond) { - const wrapped = helper(this.owner); - const val = wrapped.__meta.compositePK ? { $in: wrapped.__primaryKeys } : wrapped.getPrimaryKey(); - const dict = cond; - if (this.property.kind === ReferenceKind.ONE_TO_MANY) { - dict[this.property.mappedBy] = val; - } else { - const key = this.property.owner ? this.property.inversedBy : this.property.mappedBy; - dict[key] = val; - } - return cond; - } - checkInitialized() { - if (!this.isInitialized()) { - throw new Error( - `Collection<${this.property.type}> of entity ${helper(this.owner).__meta.name}[${helper(this.owner).getSerializedPrimaryKey()}] not initialized`, - ); - } - } - /** - * re-orders items after searching with `$in` operator - */ - reorderItems(items, order) { - if (this.property.kind === ReferenceKind.MANY_TO_MANY && this.property.owner) { - items.sort((a, b) => order.indexOf(a) - order.indexOf(b)); - } - } - cancelOrphanRemoval(items) { - const em = this.getEntityManager(items, false); - if (!em) { - return; - } - for (const item of items) { - em.getUnitOfWork().cancelOrphanRemoval(item); - } - } - validateModification(items) { - if (this.#readonly) { - throw ValidationError.cannotModifyReadonlyCollection(this.owner, this.property); - } - const check = item => { - if (!item) { - return false; - } - if (!Utils.isEntity(item)) { - throw ValidationError.notEntity(this.owner, this.property, item); - } - // currently we allow persisting to inverse sides only in SQL drivers - if (this.property.pivotTable || !this.property.mappedBy) { - return false; - } - if (helper(item).__initialized) { - return false; - } - return !item[this.property.mappedBy] && this.property.kind === ReferenceKind.MANY_TO_MANY; - }; - // throw if we are modifying inverse side of M:N collection when owning side is initialized (would be ignored when persisting) - if (items.some(item => check(item))) { - throw ValidationError.cannotModifyInverseCollection(this.owner, this.property); - } - } - /** Converts all items in the collection to plain DTO objects. */ - toArray() { - if (this.#items.size === 0) { - return []; - } - return this.map(item => wrap(item).toJSON()); - } - /** Returns the primary key values (or a specific field) of all items in the collection. */ - getIdentifiers(field) { - const items = this.getItems(); - const targetMeta = this.property.targetMeta; - if (items.length === 0) { - return []; - } - field ??= targetMeta.compositePK - ? targetMeta.primaryKeys - : (targetMeta.serializedPrimaryKey ?? targetMeta.primaryKeys[0]); - const cb = (i, f) => { - if (Utils.isEntity(i[f], true)) { - return wrap(i[f], true).getPrimaryKey(); - } - return i[f]; - }; - return items.map(i => { - if (Array.isArray(field)) { - return field.map(f => cb(i, f)); - } - return cb(i, field); - }); - } - /** - * @internal - */ - addWithoutPropagation(entity) { - if (!this.contains(entity, false)) { - this.incrementCount(1); - this[this.#items.size] = entity; - this.#items.add(entity); - this.#dirty = true; - } - } - /** Replaces all items in the collection with the given items. */ - set(items) { - if (!this.#initialized) { - this.#initialized = true; - this.#snapshot = undefined; - } - if (this.compare(Utils.asArray(items).map(item => Reference.unwrapReference(item)))) { - return; - } - this.remove(this.#items); - this.add(items); - } - compare(items) { - if (items.length !== this.#items.size) { - return false; - } - let idx = 0; - for (const item of this.#items) { - if (item !== items[idx++]) { - return false; - } - } - return true; - } - /** - * @internal - */ - hydrate(items, forcePropagate, partial) { - for (let i = 0; i < this.#items.size; i++) { - delete this[i]; - } - this.#initialized = true; - this.#partial = !!partial; - this.#items.clear(); - this.#count = 0; - this.add(items); - this.takeSnapshot(forcePropagate); - } - /** - * Remove all items from the collection. Note that removing items from collection does not necessarily imply deleting the target entity, - * it means we are disconnecting the relation - removing items from collection, not removing entities from database - `Collection.remove()` - * is not the same as `em.remove()`. If we want to delete the entity by removing it from collection, we need to enable `orphanRemoval: true`, - * which tells the ORM we don't want orphaned entities to exist, so we know those should be removed. - */ - removeAll() { - if (!this.#initialized) { - this.#initialized = true; - this.#snapshot = undefined; - } - this.remove(this.#items); - this.#dirty = true; - } - /** - * @internal - */ - removeWithoutPropagation(entity) { - if (!this.#items.delete(entity)) { - return; - } - this.incrementCount(-1); - delete this[this.#items.size]; - Object.assign(this, [...this.#items]); - this.#dirty = true; - } - /** - * Extracts a slice of the collection items starting at position start to end (exclusive) of the collection. - * If end is null it returns all elements from start to the end of the collection. - */ - slice(start = 0, end) { - this.checkInitialized(); - let index = 0; - end ??= this.#items.size; - const items = []; - for (const item of this.#items) { - if (index === end) { - break; - } - if (index >= start && index < end) { - items.push(item); - } - index++; - } - return items; - } - /** - * Tests for the existence of an element that satisfies the given predicate. - */ - exists(cb) { - this.checkInitialized(); - for (const item of this.#items) { - if (cb(item)) { - return true; - } - } - return false; - } - /** - * Returns the first element of this collection that satisfies the predicate. - */ - find(cb) { - this.checkInitialized(); - let index = 0; - for (const item of this.#items) { - if (cb(item, index++)) { - return item; - } - } - return undefined; - } - /** - * Extracts a subset of the collection items. - */ - filter(cb) { - this.checkInitialized(); - const items = []; - let index = 0; - for (const item of this.#items) { - if (cb(item, index++)) { - items.push(item); - } - } - return items; - } - /** - * Maps the collection items based on your provided mapper function. - */ - map(mapper) { - this.checkInitialized(); - const items = []; - let index = 0; - for (const item of this.#items) { - items.push(mapper(item, index++)); - } - return items; - } - /** - * Maps the collection items based on your provided mapper function to a single object. - */ - reduce(cb, initial = {}) { - this.checkInitialized(); - let index = 0; - for (const item of this.#items) { - initial = cb(initial, item, index++); - } - return initial; - } - /** - * Maps the collection items to a dictionary, indexed by the key you specify. - * If there are more items with the same key, only the first one will be present. - */ - indexBy(key, valueKey) { - return this.reduce((obj, item) => { - obj[item[key]] ??= valueKey ? item[valueKey] : item; - return obj; - }, {}); - } - /** Returns whether the collection has been initialized. Pass `fully = true` to also check that all items are initialized. */ - isInitialized(fully = false) { - if (!this.#initialized || !fully) { - return this.#initialized; - } - for (const item of this.#items) { - if (!helper(item).__initialized) { - return false; - } - } - return true; - } - isDirty() { - return this.#dirty; - } - /** Returns whether the collection was partially loaded (propagation is disabled for partial collections). */ - isPartial() { - return this.#partial; - } - setDirty(dirty = true) { - this.#dirty = dirty; - } - get length() { - return this.count(); - } - *[Symbol.iterator]() { - for (const item of this.getItems()) { - yield item; - } - } - /** - * @internal - */ - takeSnapshot(forcePropagate) { - this.#snapshot = [...this.#items]; - this.#dirty = false; - if (this.property.owner || forcePropagate) { - this.#items.forEach(item => { - this.propagate(item, 'takeSnapshot'); - }); - } - } - /** - * @internal - */ - getSnapshot() { - return this.#snapshot; - } - /** - * @internal - */ - get property() { - // cannot be typed to `EntityProperty` as it causes issues in assignability of `Loaded` type - if (!this.#property) { - const meta = wrap(this.owner, true).__meta; - /* v8 ignore next */ - if (!meta) { - throw MetadataError.fromUnknownEntity( - this.owner.constructor.name, - 'Collection.property getter, maybe you just forgot to initialize the ORM?', - ); - } - this.#property = meta.relations.find(prop => this.owner[prop.name] === this); - } - return this.#property; - } - /** - * @internal - */ - set property(prop) { - // cannot be typed to `EntityProperty` as it causes issues in assignability of `Loaded` type - this.#property = prop; - } - propagate(item, method) { - if (this.property.owner && this.property.inversedBy) { - this.propagateToInverseSide(item, method); - } else if (!this.property.owner && this.property.mappedBy) { - this.propagateToOwningSide(item, method); - } - } - propagateToInverseSide(item, method) { - const collection = item[this.property.inversedBy]; - if (this.shouldPropagateToCollection(collection, method)) { - method = method === 'takeSnapshot' ? method : method + 'WithoutPropagation'; - collection[method](this.owner); - } - } - propagateToOwningSide(item, method) { - const mappedBy = this.property.mappedBy; - const collection = item[mappedBy]; - if (this.property.kind === ReferenceKind.MANY_TO_MANY) { - if (this.shouldPropagateToCollection(collection, method)) { - collection[method](this.owner); - } - } else if (this.property.kind === ReferenceKind.ONE_TO_MANY && method !== 'takeSnapshot') { - const prop2 = this.property.targetMeta.properties[mappedBy]; - const owner = prop2.mapToPk ? helper(this.owner).getPrimaryKey() : this.owner; - const value = method === 'add' ? owner : null; - if (this.property.orphanRemoval && method === 'remove') { - // cache the PK before we propagate, as its value might be needed when flushing - helper(item).__pk = helper(item).getPrimaryKey(); - } - if (!prop2.nullable && prop2.deleteRule !== 'cascade' && method === 'remove') { - if (!this.property.orphanRemoval) { - throw ValidationError.cannotRemoveFromCollectionWithoutOrphanRemoval(this.owner, this.property); - } - return; - } - // skip if already propagated - if (Reference.unwrapReference(item[mappedBy]) !== value) { - item[mappedBy] = value; - } - } - } - shouldPropagateToCollection(collection, method) { - if (!collection) { - return false; - } - switch (method) { - case 'add': - return !collection.contains(this.owner, false); - case 'remove': - return collection.isInitialized() && collection.contains(this.owner, false); - case 'takeSnapshot': - return collection.isDirty(); - } - } - incrementCount(value) { - if (typeof this.#count === 'number' && this.#initialized) { - this.#count += value; - } - } - /** @ignore */ - [Symbol.for('nodejs.util.inspect.custom')](depth = 2) { - const object = { ...this }; - delete object.owner; - object.initialized = this.#initialized; - object.dirty = this.#dirty; - const ret = inspect(object, { depth }); - const name = `${this.constructor.name}<${this.property?.type ?? 'unknown'}>`; - return ret === '[Object]' ? `[${name}]` : name + ' ' + ret; - } -} -Object.defineProperties(Collection.prototype, { - $: { - get() { - return this; - }, - }, - get: { - get() { - return () => this; - }, - }, - __collection: { value: true, enumerable: false, writable: false }, -}); diff --git a/node_modules/@mikro-orm/core/entity/EntityAssigner.d.ts b/node_modules/@mikro-orm/core/entity/EntityAssigner.d.ts deleted file mode 100644 index e749242..0000000 --- a/node_modules/@mikro-orm/core/entity/EntityAssigner.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -import type { EntityManager } from '../EntityManager.js'; -import type { EntityData, EntityDTO, EntityProperty, FromEntityType, IsSubset, MergeSelected } from '../typings.js'; -/** Handles assigning data to entities, resolving relations, and propagating changes. */ -export declare class EntityAssigner { - /** Assigns the given data to the entity, resolving relations and handling custom types. */ - static assign< - Entity extends object, - Naked extends FromEntityType = FromEntityType, - Convert extends boolean = false, - Data extends EntityData | Partial> = - | EntityData - | Partial>, - >( - entity: Entity, - data: Data & IsSubset, Data>, - options?: AssignOptions, - ): MergeSelected; - private static assignProperty; - /** - * auto-wire 1:1 inverse side with owner as in no-sql drivers it can't be joined - * also makes sure the link is bidirectional when creating new entities from nested structures - * @internal - */ - static autoWireOneToOne(prop: EntityProperty, entity: O): void; - private static validateEM; - private static assignReference; - private static assignCollection; - private static assignEmbeddable; - private static createCollectionItem; -} -export declare const assign: typeof EntityAssigner.assign; -/** Options controlling how data is assigned to an entity via `assign()`. */ -export interface AssignOptions { - /** - * Allows disabling processing of nested relations. When disabled, an object payload in place of a relation always - * results in an `INSERT` query. To assign a value of the relation, use the foreign key instead of an object. - * Defaults to `true`. - */ - updateNestedEntities?: boolean; - /** - * When assigning to a relation property with object payload and `updateNestedEntities` enabled (default), you can - * control how a payload without a primary key is handled. By default, it is considered as a new object, resulting - * in an `INSERT` query. Use `updateByPrimaryKey: false` to allow assigning the data on an existing relation instead. - * Defaults to `true`. - */ - updateByPrimaryKey?: boolean; - /** - * When you have some properties in the payload that are not represented by an entity property mapping, you can skip - * such unknown properties via `onlyProperties: true`. Defaults to `false`. - */ - onlyProperties?: boolean; - /** - * With `onlyOwnProperties` enabled, inverse sides of to-many relations are skipped, and payloads of other relations are converted - * to foreign keys. Defaults to `false`. - */ - onlyOwnProperties?: boolean; - /** - * With `ignoreUndefined` enabled, `undefined` properties passed in the payload are skipped. Defaults to `false`. - */ - ignoreUndefined?: boolean; - /** - * `assign` excepts runtime values for properties using custom types. To be able to assign raw database values, you - * can enable the `convertCustomTypes` option. Defaults to `false`. - */ - convertCustomTypes?: Convert; - /** - * When assigning to a JSON property, the value is replaced. Use `mergeObjectProperties: true` to enable deep merging - * of the payload with the existing value. Defaults to `false`. - */ - mergeObjectProperties?: boolean; - /** - * When assigning to an embedded property, the values are deeply merged with the existing data. - * Use `mergeEmbeddedProperties: false` to replace them instead. Defaults to `true`. - */ - mergeEmbeddedProperties?: boolean; - /** - * When assigning to a relation property, if the value is a POJO and `updateByPrimaryKey` is enabled, we check if - * the target exists in the identity map based on its primary key and call `assign` on it recursively. If there is - * no primary key provided, or the entity is not present in the context, such an entity is considered as new - * (resulting in `INSERT` query), created via `em.create()`. You can use `merge: true` to use `em.merge()` instead, - * which means there won't be any query used for persisting the relation. Defaults to `false`. - */ - merge?: boolean; - /** - * When assigning to a to-many relation properties (`Collection`) with `updateNestedEntities` and `updateByPrimaryKey` - * enabled (default), you can use this option to override the relation schema. This is used only when trying to find - * the entity reference in the current context. If it is not found, we create the relation entity using the target - * entity schema. The value is automatically inferred from the target entity. - */ - schema?: string; - /** - * When using the static `assign()` helper, you can pass the EntityManager instance explicitly via the `em` option. - * This is only needed when you try to assign a relation property. The value is automatically inferred from the target - * entity when it is managed, or when you use `em.assign()` instead. - */ - em?: EntityManager; -} diff --git a/node_modules/@mikro-orm/core/entity/EntityAssigner.js b/node_modules/@mikro-orm/core/entity/EntityAssigner.js deleted file mode 100644 index 066d15a..0000000 --- a/node_modules/@mikro-orm/core/entity/EntityAssigner.js +++ /dev/null @@ -1,251 +0,0 @@ -import { Collection } from './Collection.js'; -import { Utils } from '../utils/Utils.js'; -import { Reference } from './Reference.js'; -import { ReferenceKind, SCALAR_TYPES } from '../enums.js'; -import { validateProperty } from './validators.js'; -import { helper, wrap } from './wrap.js'; -import { EntityHelper } from './EntityHelper.js'; -import { ValidationError } from '../errors.js'; -/** Handles assigning data to entities, resolving relations, and propagating changes. */ -export class EntityAssigner { - /** Assigns the given data to the entity, resolving relations and handling custom types. */ - static assign(entity, data, options = {}) { - let opts = options; - if (opts.visited?.has(entity)) { - return entity; - } - EntityHelper.ensurePropagation(entity); - opts.visited ??= new Set(); - opts.visited.add(entity); - const wrapped = helper(entity); - opts = { - ...wrapped.__config.get('assign'), - schema: wrapped.__schema, - ...opts, // allow overriding the defaults - }; - const meta = wrapped.__meta; - const props = meta.properties; - Object.keys(data).forEach(prop => { - return EntityAssigner.assignProperty(entity, prop, props, data, { - ...opts, - em: opts.em || wrapped.__em, - platform: wrapped.__platform, - }); - }); - return entity; - } - static assignProperty(entity, propName, props, data, options) { - let value = data[propName]; - const onlyProperties = options.onlyProperties && !(propName in props); - const ignoreUndefined = options.ignoreUndefined === true && value === undefined; - if (onlyProperties || ignoreUndefined) { - return; - } - const prop = { ...props[propName], name: propName }; - if (prop && options.onlyOwnProperties) { - if ([ReferenceKind.ONE_TO_MANY].includes(prop.kind)) { - return; - } - if ([ReferenceKind.MANY_TO_MANY].includes(prop.kind)) { - if (!prop.owner) { - return; - } else if (value?.map) { - value = value.map(v => Utils.extractPK(v, prop.targetMeta)); - } - } - if ([ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind)) { - value = Utils.extractPK(value, prop.targetMeta); - } - } - if (propName in props && !prop.nullable && value == null) { - throw new Error( - `You must pass a non-${value} value to the property ${propName} of entity ${entity.constructor.name}.`, - ); - } - // create collection instance if its missing so old items can be deleted with orphan removal - if ([ReferenceKind.MANY_TO_MANY, ReferenceKind.ONE_TO_MANY].includes(prop?.kind) && entity[prop.name] == null) { - entity[prop.name] = Collection.create(entity, prop.name, undefined, helper(entity).isInitialized()); - } - if (prop && Utils.isCollection(entity[prop.name])) { - return EntityAssigner.assignCollection(entity, entity[prop.name], value, prop, options.em, options); - } - const customType = prop?.customType; - if (options.convertCustomTypes && customType && prop.kind === ReferenceKind.SCALAR && !Utils.isEntity(data)) { - value = customType.convertToJSValue(value, options.platform); - } - if ([ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop?.kind) && value != null) { - if ( - options.updateNestedEntities && - Object.hasOwn(entity, propName) && - Utils.isEntity(entity[propName], true) && - Utils.isPlainObject(value) - ) { - const unwrappedEntity = Reference.unwrapReference(entity[propName]); - const wrapped = helper(unwrappedEntity); - if (options.updateByPrimaryKey) { - const pk = Utils.extractPK(value, prop.targetMeta); - if (pk) { - const ref = options.em.getReference(prop.targetMeta.class, pk, options); - // if the PK differs, we want to change the target entity, not update it - const wrappedChild = helper(ref); - const sameTarget = wrappedChild.getSerializedPrimaryKey() === wrapped.getSerializedPrimaryKey(); - if (wrappedChild.__managed && wrappedChild.isInitialized() && sameTarget) { - return EntityAssigner.assign(ref, value, options); - } - } - return EntityAssigner.assignReference(entity, value, prop, options.em, options); - } - if (wrapped.__managed && wrap(unwrappedEntity).isInitialized()) { - return EntityAssigner.assign(unwrappedEntity, value, options); - } - } - return EntityAssigner.assignReference(entity, value, prop, options.em, options); - } - if (prop.kind === ReferenceKind.SCALAR && SCALAR_TYPES.has(prop.runtimeType) && (prop.setter || !prop.getter)) { - validateProperty(prop, value, entity); - return (entity[prop.name] = value); - } - if (prop.kind === ReferenceKind.EMBEDDED && EntityAssigner.validateEM(options.em)) { - return EntityAssigner.assignEmbeddable(entity, value, prop, options.em, options); - } - if (options.mergeObjectProperties && Utils.isPlainObject(entity[propName]) && Utils.isPlainObject(value)) { - entity[propName] ??= {}; - entity[propName] = Utils.merge({}, entity[propName], value); - } else if (!prop || prop.setter || !prop.getter) { - entity[propName] = value; - } - } - /** - * auto-wire 1:1 inverse side with owner as in no-sql drivers it can't be joined - * also makes sure the link is bidirectional when creating new entities from nested structures - * @internal - */ - static autoWireOneToOne(prop, entity) { - const ref = entity[prop.name]; - if (prop.kind !== ReferenceKind.ONE_TO_ONE || !Utils.isEntity(ref)) { - return; - } - const meta2 = helper(ref).__meta; - const prop2 = meta2.properties[prop.inversedBy || prop.mappedBy]; - /* v8 ignore next */ - if (prop2 && !ref[prop2.name]) { - if (Reference.isReference(ref)) { - ref.unwrap()[prop2.name] = Reference.wrapReference(entity, prop2); - } else { - ref[prop2.name] = Reference.wrapReference(entity, prop2); - } - } - } - static validateEM(em) { - if (!em) { - throw new Error( - `To use assign() on not managed entities, explicitly provide EM instance: wrap(entity).assign(data, { em: orm.em })`, - ); - } - return true; - } - static assignReference(entity, value, prop, em, options) { - if (Utils.isEntity(value, true)) { - entity[prop.name] = Reference.wrapReference(value, prop); - } else if (Utils.isPrimaryKey(value, true) && EntityAssigner.validateEM(em)) { - entity[prop.name] = prop.mapToPk - ? value - : Reference.wrapReference(em.getReference(prop.targetMeta.class, value, options), prop); - } else if (Utils.isPlainObject(value) && options.merge && EntityAssigner.validateEM(em)) { - entity[prop.name] = Reference.wrapReference(em.merge(prop.targetMeta.class, value, options), prop); - } else if (Utils.isPlainObject(value) && EntityAssigner.validateEM(em)) { - entity[prop.name] = Reference.wrapReference(em.create(prop.targetMeta.class, value, options), prop); - } else { - const name = entity.constructor.name; - throw new Error( - `Invalid reference value provided for '${name}.${prop.name}' in ${name}.assign(): ${JSON.stringify(value)}`, - ); - } - EntityAssigner.autoWireOneToOne(prop, entity); - } - static assignCollection(entity, collection, value, prop, em, options) { - const invalid = []; - const items = Utils.asArray(value).map((item, idx) => { - // try to propagate missing owning side reference to the payload first - const prop2 = prop.targetMeta?.properties[prop.mappedBy]; - if (Utils.isPlainObject(item) && prop2 && item[prop2.name] == null) { - item = { ...item, [prop2.name]: Reference.wrapReference(entity, prop2) }; - } - if (options.updateNestedEntities && options.updateByPrimaryKey && Utils.isPlainObject(item)) { - const pk = Utils.extractPK(item, prop.targetMeta); - if (pk && EntityAssigner.validateEM(em)) { - const ref = em.getUnitOfWork().getById(prop.targetMeta.class, pk, options.schema); - if (ref) { - return EntityAssigner.assign(ref, item, options); - } - } - return this.createCollectionItem(item, em, prop, invalid, options); - } - /* v8 ignore next */ - if ( - options.updateNestedEntities && - !options.updateByPrimaryKey && - collection[idx] && - helper(collection[idx])?.isInitialized() - ) { - return EntityAssigner.assign(collection[idx], item, options); - } - return this.createCollectionItem(item, em, prop, invalid, options); - }); - if (invalid.length > 0) { - const name = entity.constructor.name; - throw ValidationError.invalidCollectionValues(name, prop.name, invalid); - } - if (Array.isArray(value)) { - collection.set(items); - } else { - // append to the collection in case of assigning a single value instead of array - collection.add(items); - } - } - static assignEmbeddable(entity, value, prop, em, options) { - const propName = prop.embedded ? prop.embedded[1] : prop.name; - if (value == null) { - entity[propName] = value; - return; - } - // if the value is not an array, we just push, otherwise we replace the array - if (prop.array && (Array.isArray(value) || entity[propName] == null)) { - entity[propName] = []; - } - if (prop.array) { - return Utils.asArray(value).forEach(item => { - const tmp = {}; - this.assignEmbeddable(tmp, item, { ...prop, array: false }, em, options); - entity[propName].push(...Object.values(tmp)); - }); - } - const create = () => - EntityAssigner.validateEM(em) && - em.getEntityFactory().createEmbeddable(prop.targetMeta.class, value, { - convertCustomTypes: options.convertCustomTypes, - newEntity: options.mergeEmbeddedProperties ? !('propName' in entity) : true, - }); - entity[propName] = options.mergeEmbeddedProperties ? entity[propName] || create() : create(); - Object.keys(value).forEach(key => { - EntityAssigner.assignProperty(entity[propName], key, prop.embeddedProps, value, options); - }); - } - static createCollectionItem(item, em, prop, invalid, options) { - if (Utils.isEntity(item)) { - return item; - } - if (Utils.isPrimaryKey(item) && EntityAssigner.validateEM(em)) { - return em.getReference(prop.targetMeta.class, item, options); - } - if (Utils.isPlainObject(item) && options.merge && EntityAssigner.validateEM(em)) { - return em.merge(prop.targetMeta.class, item, options); - } - if (Utils.isPlainObject(item) && EntityAssigner.validateEM(em)) { - return em.create(prop.targetMeta.class, item, options); - } - invalid.push(item); - return item; - } -} -export const assign = EntityAssigner.assign; diff --git a/node_modules/@mikro-orm/core/entity/EntityFactory.d.ts b/node_modules/@mikro-orm/core/entity/EntityFactory.d.ts deleted file mode 100644 index e99a7d9..0000000 --- a/node_modules/@mikro-orm/core/entity/EntityFactory.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -import type { EntityData, EntityMetadata, EntityName, New, Primary } from '../typings.js'; -import type { EntityManager } from '../EntityManager.js'; -import type { EntityComparator } from '../utils/EntityComparator.js'; -/** @internal Options for creating and merging entities via the EntityFactory. */ -export interface FactoryOptions { - /** Whether the entity should be marked as initialized. */ - initialized?: boolean; - /** Whether the entity is being newly created (uses constructor). */ - newEntity?: boolean; - /** - * Property `onCreate` hooks are normally executed during `flush` operation. - * With this option, they will be processed early inside `em.create()` method. - */ - processOnCreateHooksEarly?: boolean; - /** Whether to merge the entity into the identity map. */ - merge?: boolean; - /** Whether to refresh an already loaded entity with new data. */ - refresh?: boolean; - /** Whether to convert custom types during hydration. */ - convertCustomTypes?: boolean; - /** Whether to recompute the entity snapshot after creation. */ - recomputeSnapshot?: boolean; - /** Schema from FindOptions, overrides default schema. */ - schema?: string; - /** Parent entity schema for nested entity creation. */ - parentSchema?: string; - /** Whether to normalize accessors to the correct property names (normally handled via result mapper). */ - normalizeAccessors?: boolean; - /** - * Property name to use for identity map lookup instead of the primary key. - * This is useful for creating references by unique non-PK properties. - */ - key?: string; -} -/** @internal Factory responsible for creating, merging, and hydrating entity instances. */ -export declare class EntityFactory { - #private; - constructor(em: EntityManager); - /** Creates a new entity instance or returns an existing one from the identity map, hydrating it with the provided data. */ - create( - entityName: EntityName, - data: EntityData, - options?: FactoryOptions, - ): New; - /** Merges new data into an existing entity, preserving user-modified properties. */ - mergeData(meta: EntityMetadata, entity: T, data: EntityData, options?: FactoryOptions): void; - /** Creates or retrieves an uninitialized entity reference by its primary key or alternate key. */ - createReference( - entityName: EntityName, - id: Primary | Primary[] | Record>, - options?: Pick, - ): T; - /** Creates an embeddable entity instance from the provided data. */ - createEmbeddable( - entityName: EntityName, - data: EntityData, - options?: Pick, - ): T; - /** Returns the EntityComparator instance used for diffing entities. */ - getComparator(): EntityComparator; - private createEntity; - private assignDefaultValues; - private hydrate; - private findEntity; - private processDiscriminatorColumn; - /** - * denormalize PK to value required by driver (e.g. ObjectId) - */ - private denormalizePrimaryKey; - /** - * returns parameters for entity constructor, creating references from plain ids - */ - private extractConstructorParams; - private get unitOfWork(); -} diff --git a/node_modules/@mikro-orm/core/entity/EntityFactory.js b/node_modules/@mikro-orm/core/entity/EntityFactory.js deleted file mode 100644 index 6e0c218..0000000 --- a/node_modules/@mikro-orm/core/entity/EntityFactory.js +++ /dev/null @@ -1,458 +0,0 @@ -import { Utils } from '../utils/Utils.js'; -import { QueryHelper } from '../utils/QueryHelper.js'; -import { EventType, ReferenceKind } from '../enums.js'; -import { Reference } from './Reference.js'; -import { helper } from './wrap.js'; -import { EntityHelper } from './EntityHelper.js'; -import { JsonType } from '../types/JsonType.js'; -import { isRaw } from '../utils/RawQueryFragment.js'; -/** @internal Factory responsible for creating, merging, and hydrating entity instances. */ -export class EntityFactory { - #driver; - #platform; - #config; - #metadata; - #hydrator; - #eventManager; - #comparator; - #em; - constructor(em) { - this.#em = em; - this.#driver = this.#em.getDriver(); - this.#platform = this.#driver.getPlatform(); - this.#config = this.#em.config; - this.#metadata = this.#em.getMetadata(); - this.#hydrator = this.#config.getHydrator(this.#metadata); - this.#eventManager = this.#em.getEventManager(); - this.#comparator = this.#em.getComparator(); - } - /** Creates a new entity instance or returns an existing one from the identity map, hydrating it with the provided data. */ - create(entityName, data, options = {}) { - data = Reference.unwrapReference(data); - options.initialized ??= true; - if (data.__entity) { - return data; - } - const meta = this.#metadata.get(entityName); - if (meta.virtual) { - data = { ...data }; - const entity = this.createEntity(data, meta, options); - this.hydrate(entity, meta, data, options); - return entity; - } - if (meta.serializedPrimaryKey) { - this.denormalizePrimaryKey(meta, data); - } - const meta2 = this.processDiscriminatorColumn(meta, data); - const exists = this.findEntity(data, meta2, options); - let wrapped = exists && helper(exists); - if (wrapped && !options.refresh) { - wrapped.__processing = true; - Utils.dropUndefinedProperties(data); - this.mergeData(meta2, exists, data, options); - wrapped.__processing = false; - if (wrapped.isInitialized()) { - return exists; - } - } - data = { ...data }; - const entity = exists ?? this.createEntity(data, meta2, options); - wrapped = helper(entity); - wrapped.__processing = true; - wrapped.__initialized = options.initialized; - if (options.newEntity || meta.forceConstructor || meta.virtual) { - const tmp = { ...data }; - meta.constructorParams?.forEach(prop => delete tmp[prop]); - this.hydrate(entity, meta2, tmp, options); - // since we now process only a copy of the `data` via hydrator, but later we register the state with the full snapshot, - // we need to go through all props with custom types that have `ensureComparable: true` and ensure they are comparable - // even if they are not part of constructor parameters (as this is otherwise normalized during hydration, here only in `tmp`) - if (options.convertCustomTypes) { - for (const prop of meta.props) { - if (prop.customType?.ensureComparable(meta, prop) && data[prop.name]) { - if ([ReferenceKind.ONE_TO_MANY, ReferenceKind.MANY_TO_MANY].includes(prop.kind)) { - continue; - } - if ( - [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) && - Utils.isPlainObject(data[prop.name]) - ) { - data[prop.name] = Utils.getPrimaryKeyValues(data[prop.name], prop.targetMeta, true); - } - if (prop.customType instanceof JsonType && this.#platform.convertsJsonAutomatically()) { - data[prop.name] = prop.customType.convertToDatabaseValue(data[prop.name], this.#platform, { - key: prop.name, - mode: 'hydration', - }); - } - } - } - } - } else { - this.hydrate(entity, meta2, data, options); - } - if (exists && meta.root.inheritanceType && !(entity instanceof meta2.class)) { - Object.setPrototypeOf(entity, meta2.prototype); - } - if (options.merge && wrapped.hasPrimaryKey()) { - this.unitOfWork.register(entity, data, { - // Always refresh to ensure the payload is in correct shape for joined strategy. When loading nested relations, - // they will be created early without `Type.ensureComparable` being properly handled, resulting in extra updates. - refresh: options.initialized, - newEntity: options.newEntity, - loaded: options.initialized, - }); - if (options.recomputeSnapshot) { - wrapped.__originalEntityData = this.#comparator.prepareEntity(entity); - } - } - if (this.#eventManager.hasListeners(EventType.onInit, meta2)) { - this.#eventManager.dispatchEvent(EventType.onInit, { entity, meta: meta2, em: this.#em }); - } - wrapped.__processing = false; - return entity; - } - /** Merges new data into an existing entity, preserving user-modified properties. */ - mergeData(meta, entity, data, options = {}) { - // merge unchanged properties automatically - data = QueryHelper.processParams(data); - const existsData = this.#comparator.prepareEntity(entity); - const originalEntityData = helper(entity).__originalEntityData ?? {}; - const diff = this.#comparator.diffEntities(meta.class, originalEntityData, existsData); - // version properties are not part of entity snapshots - if ( - meta.versionProperty && - data[meta.versionProperty] && - data[meta.versionProperty] !== originalEntityData[meta.versionProperty] - ) { - diff[meta.versionProperty] = data[meta.versionProperty]; - } - const diff2 = this.#comparator.diffEntities(meta.class, existsData, data, { includeInverseSides: true }); - // do not override values changed by user - Utils.keys(diff).forEach(key => delete diff2[key]); - Utils.keys(diff2) - .filter(key => { - // ignore null values if there is already present non-null value - if (existsData[key] != null) { - return diff2[key] == null; - } - return diff2[key] === undefined; - }) - .forEach(key => delete diff2[key]); - // but always add collection properties and formulas if they are part of the `data` - Utils.keys(data) - .filter( - key => - meta.properties[key]?.formula || - [ReferenceKind.ONE_TO_MANY, ReferenceKind.MANY_TO_MANY].includes(meta.properties[key]?.kind), - ) - .forEach(key => (diff2[key] = data[key])); - // rehydrated with the new values, skip those changed by user - // use full hydration if the entity is already initialized, even if the caller used `initialized: false` - // (e.g. from createReference), otherwise scalar properties in diff2 won't be applied - const initialized = options.initialized || helper(entity).__initialized; - this.hydrate(entity, meta, diff2, initialized ? { ...options, initialized } : options); - // we need to update the entity data only with keys that were not present before - const nullVal = this.#config.get('forceUndefined') ? undefined : null; - Utils.keys(diff2).forEach(key => { - const prop = meta.properties[key]; - if ( - [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) && - Utils.isPlainObject(data[prop.name]) - ) { - // oxfmt-ignore - diff2[key] = entity[prop.name] ? helper(entity[prop.name]).getPrimaryKey(options.convertCustomTypes) : null; - } - if ( - !options.convertCustomTypes && - [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE, ReferenceKind.SCALAR].includes(prop.kind) && - prop.customType?.ensureComparable(meta, prop) && - diff2[key] != null - ) { - const converted = prop.customType.convertToJSValue(diff2[key], this.#platform, { force: true }); - diff2[key] = prop.customType.convertToDatabaseValue(converted, this.#platform, { fromQuery: true }); - } - originalEntityData[key] = diff2[key] === null ? nullVal : diff2[key]; - helper(entity).__loadedProperties.add(key); - }); - // in case of joined loading strategy, we need to cascade the merging to possibly loaded relations manually - meta.relations.forEach(prop => { - if ( - [ReferenceKind.MANY_TO_MANY, ReferenceKind.ONE_TO_MANY].includes(prop.kind) && - Array.isArray(data[prop.name]) - ) { - // instead of trying to match the collection items (which could easily fail if the collection was loaded with different ordering), - // we just create the entity from scratch, which will automatically pick the right one from the identity map and call `mergeData` on it - data[prop.name] - .filter(child => Utils.isPlainObject(child)) // objects with prototype can be PKs (e.g. `ObjectId`) - .forEach(child => this.create(prop.targetMeta.class, child, options)); // we can ignore the value, we just care about the `mergeData` call - return; - } - if ( - [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) && - Utils.isPlainObject(data[prop.name]) && - entity[prop.name] && - helper(entity[prop.name]).__initialized - ) { - this.create(prop.targetMeta.class, data[prop.name], options); // we can ignore the value, we just care about the `mergeData` call - } - }); - this.unitOfWork.normalizeEntityData(meta, originalEntityData); - } - /** Creates or retrieves an uninitialized entity reference by its primary key or alternate key. */ - createReference(entityName, id, options = {}) { - options.convertCustomTypes ??= true; - const meta = this.#metadata.get(entityName); - const schema = this.#driver.getSchemaName(meta, options); - // Handle alternate key lookup - if (options.key) { - const value = '' + (Array.isArray(id) ? id[0] : Utils.isPlainObject(id) ? id[options.key] : id); - const exists = this.unitOfWork.getByKey(entityName, options.key, value, schema, options.convertCustomTypes); - if (exists) { - return exists; - } - // Create entity stub - storeByKey will set the alternate key property and store in identity map - const entity = this.create(entityName, {}, { ...options, initialized: false }); - this.unitOfWork.storeByKey(entity, options.key, value, schema, options.convertCustomTypes); - return entity; - } - if (meta.simplePK) { - const exists = this.unitOfWork.getById(entityName, id, schema); - if (exists) { - return exists; - } - const data = Utils.isPlainObject(id) ? id : { [meta.primaryKeys[0]]: Array.isArray(id) ? id[0] : id }; - return this.create(entityName, data, { ...options, initialized: false }); - } - if (Array.isArray(id)) { - id = Utils.getPrimaryKeyCondFromArray(id, meta); - } - const pks = Utils.getOrderedPrimaryKeys(id, meta, this.#platform); - const exists = this.unitOfWork.getById(entityName, pks, schema, options.convertCustomTypes); - if (exists) { - return exists; - } - if (Utils.isPrimaryKey(id)) { - id = { [meta.primaryKeys[0]]: id }; - } - return this.create(entityName, id, { ...options, initialized: false }); - } - /** Creates an embeddable entity instance from the provided data. */ - createEmbeddable(entityName, data, options = {}) { - data = { ...data }; - const meta = this.#metadata.get(entityName); - const meta2 = this.processDiscriminatorColumn(meta, data); - return this.createEntity(data, meta2, options); - } - /** Returns the EntityComparator instance used for diffing entities. */ - getComparator() { - return this.#comparator; - } - createEntity(data, meta, options) { - const schema = this.#driver.getSchemaName(meta, options); - if (options.newEntity || meta.forceConstructor || meta.virtual) { - if (meta.polymorphs) { - throw new Error(`Cannot create entity ${meta.className}, class prototype is unknown`); - } - const params = this.extractConstructorParams(meta, data, options); - const Entity = meta.class; - // creates new instance via constructor as this is the new entity - const entity = new Entity(...params); - // creating managed entity instance when `forceEntityConstructor` is enabled, - // we need to wipe all the values as they would cause update queries on next flush - if (!options.newEntity && (meta.forceConstructor || this.#config.get('forceEntityConstructor'))) { - meta.props - .filter(prop => prop.persist !== false && !prop.primary && data[prop.name] === undefined) - .forEach(prop => delete entity[prop.name]); - } - if (meta.virtual) { - return entity; - } - helper(entity).__schema = schema; - if (options.initialized) { - EntityHelper.ensurePropagation(entity); - } - return entity; - } - // creates new entity instance, bypassing constructor call as its already persisted entity - const entity = Object.create(meta.class.prototype); - helper(entity).__managed = true; - helper(entity).__processing = !meta.embeddable && !meta.virtual; - helper(entity).__schema = schema; - if (options.merge && !options.newEntity) { - this.#hydrator.hydrateReference( - entity, - meta, - data, - this, - options.convertCustomTypes, - options.schema, - options.parentSchema, - ); - this.unitOfWork.register(entity); - } - if (options.initialized) { - EntityHelper.ensurePropagation(entity); - } - return entity; - } - assignDefaultValues(entity, meta) { - for (const prop of meta.props) { - if (prop.embedded || [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind)) { - continue; - } - if (prop.onCreate) { - entity[prop.name] ??= prop.onCreate(entity, this.#em); - } else if (prop.default != null && !isRaw(prop.default) && entity[prop.name] === undefined) { - entity[prop.name] = prop.default; - } - if (prop.kind === ReferenceKind.EMBEDDED && entity[prop.name]) { - const items = prop.array ? entity[prop.name] : [entity[prop.name]]; - for (const item of items) { - this.assignDefaultValues(item, prop.targetMeta); - } - } - } - } - hydrate(entity, meta, data, options) { - if (options.initialized) { - this.#hydrator.hydrate( - entity, - meta, - data, - this, - 'full', - options.newEntity, - options.convertCustomTypes, - options.schema, - this.#driver.getSchemaName(meta, options), - options.normalizeAccessors, - ); - } else { - this.#hydrator.hydrateReference( - entity, - meta, - data, - this, - options.convertCustomTypes, - options.schema, - this.#driver.getSchemaName(meta, options), - options.normalizeAccessors, - ); - } - Utils.keys(data).forEach(key => { - helper(entity)?.__loadedProperties.add(key); - helper(entity)?.__serializationContext.fields?.add(key); - }); - const processOnCreateHooksEarly = - options.processOnCreateHooksEarly ?? this.#config.get('processOnCreateHooksEarly'); - if (options.newEntity && processOnCreateHooksEarly) { - this.assignDefaultValues(entity, meta); - } - } - findEntity(data, meta, options) { - const schema = this.#driver.getSchemaName(meta, options); - if (meta.simplePK) { - return this.unitOfWork.getById(meta.class, data[meta.primaryKeys[0]], schema); - } - if (!Array.isArray(data) && meta.primaryKeys.some(pk => data[pk] == null)) { - return undefined; - } - const pks = Utils.getOrderedPrimaryKeys(data, meta, this.#platform, options.convertCustomTypes); - return this.unitOfWork.getById(meta.class, pks, schema); - } - processDiscriminatorColumn(meta, data) { - // Handle STI discriminator (persisted column) - if (meta.root.inheritanceType === 'sti') { - const prop = meta.properties[meta.root.discriminatorColumn]; - const value = data[prop.name]; - const type = meta.root.discriminatorMap[value]; - meta = type ? this.#metadata.get(type) : meta; - return meta; - } - // Handle TPT discriminator (computed at query time) - if (meta.root.inheritanceType === 'tpt' && meta.root.discriminatorMap) { - const value = data[meta.root.tptDiscriminatorColumn]; - if (value) { - const type = meta.root.discriminatorMap[value]; - meta = type ? this.#metadata.get(type) : meta; - } - } - return meta; - } - /** - * denormalize PK to value required by driver (e.g. ObjectId) - */ - denormalizePrimaryKey(meta, data) { - const pk = meta.getPrimaryProp(); - const spk = meta.properties[meta.serializedPrimaryKey]; - if (!spk?.serializedPrimaryKey) { - return; - } - if (pk.type === 'ObjectId' && (data[pk.name] != null || data[spk.name] != null)) { - data[pk.name] = this.#platform.denormalizePrimaryKey(data[spk.name] || data[pk.name]); - delete data[spk.name]; - } - } - /** - * returns parameters for entity constructor, creating references from plain ids - */ - extractConstructorParams(meta, data, options) { - if (!meta.constructorParams) { - return [data]; - } - return meta.constructorParams.map(k => { - const prop = meta.properties[k]; - const value = data[k]; - if (prop && [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) && value) { - const pk = Reference.unwrapReference(value); - const entity = this.unitOfWork.getById(prop.targetMeta.class, pk, options.schema, true); - if (entity) { - return entity; - } - if (Utils.isEntity(value)) { - return value; - } - const nakedPk = Utils.extractPK(value, prop.targetMeta, true); - if (Utils.isObject(value) && !nakedPk) { - return this.create(prop.targetMeta.class, value, options); - } - const { newEntity, initialized, ...rest } = options; - const target = this.createReference(prop.targetMeta.class, nakedPk, rest); - return Reference.wrapReference(target, prop); - } - if (prop?.kind === ReferenceKind.EMBEDDED && value) { - /* v8 ignore next */ - if (Utils.isEntity(value)) { - return value; - } - return this.createEmbeddable(prop.targetMeta.class, value, options); - } - if (!prop) { - const tmp = { ...data }; - for (const prop of meta.props) { - if (!options.convertCustomTypes || !prop.customType || tmp[prop.name] == null) { - continue; - } - if ( - [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) && - Utils.isPlainObject(tmp[prop.name]) && - !Utils.extractPK(tmp[prop.name], prop.targetMeta, true) - ) { - tmp[prop.name] = Reference.wrapReference(this.create(prop.targetMeta.class, tmp[prop.name], options), prop); - } else if (prop.kind === ReferenceKind.SCALAR) { - tmp[prop.name] = prop.customType.convertToJSValue(tmp[prop.name], this.#platform); - } - } - return tmp; - } - if (options.convertCustomTypes && prop.customType && value != null) { - return prop.customType.convertToJSValue(value, this.#platform); - } - return value; - }); - } - get unitOfWork() { - return this.#em.getUnitOfWork(false); - } -} diff --git a/node_modules/@mikro-orm/core/entity/EntityHelper.d.ts b/node_modules/@mikro-orm/core/entity/EntityHelper.d.ts deleted file mode 100644 index 7010232..0000000 --- a/node_modules/@mikro-orm/core/entity/EntityHelper.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import type { EntityManager } from '../EntityManager.js'; -import { type EntityMetadata, type EntityProperty, type IHydrator } from '../typings.js'; -/** - * @internal - */ -export declare class EntityHelper { - static decorate(meta: EntityMetadata, em: EntityManager): void; - /** - * As a performance optimization, we create entity state methods lazily. We first add - * the `null` value to the prototype to reserve space in memory. Then we define a setter on the - * prototype that will be executed exactly once per entity instance. There we redefine the given - * property on the entity instance, so shadowing the prototype setter. - */ - private static defineBaseProperties; - /** - * Defines getter and setter for every owning side of m:1 and 1:1 relation. This is then used for propagation of - * changes to the inverse side of bi-directional relations. Rest of the properties are also defined this way to - * achieve dirtiness, which is then used for fast checks whether we need to auto-flush because of managed entities. - * - * First defines a setter on the prototype, once called, actual get/set handlers are registered on the instance rather - * than on its prototype. Thanks to this we still have those properties enumerable (e.g. part of `Object.keys(entity)`). - */ - private static defineProperties; - static defineCustomInspect(meta: EntityMetadata): void; - static defineReferenceProperty( - meta: EntityMetadata, - prop: EntityProperty, - ref: T, - hydrator: IHydrator, - ): void; - static propagate( - meta: EntityMetadata, - entity: T, - owner: T, - prop: EntityProperty, - value?: T[keyof T & string], - old?: T, - ): void; - private static propagateOneToOne; - static ensurePropagation(entity: T): void; -} diff --git a/node_modules/@mikro-orm/core/entity/EntityHelper.js b/node_modules/@mikro-orm/core/entity/EntityHelper.js deleted file mode 100644 index 95ff116..0000000 --- a/node_modules/@mikro-orm/core/entity/EntityHelper.js +++ /dev/null @@ -1,311 +0,0 @@ -import { - EagerProps, - EntityName, - EntityRepositoryType, - HiddenProps, - OptionalProps, - PrimaryKeyProp, -} from '../typings.js'; -import { EntityTransformer } from '../serialization/EntityTransformer.js'; -import { Reference } from './Reference.js'; -import { Utils } from '../utils/Utils.js'; -import { WrappedEntity } from './WrappedEntity.js'; -import { ReferenceKind } from '../enums.js'; -import { helper } from './wrap.js'; -import { inspect } from '../logging/inspect.js'; -import { getEnv } from '../utils/env-vars.js'; -/** - * @internal - */ -export class EntityHelper { - static decorate(meta, em) { - const fork = em.fork(); // use fork so we can access `EntityFactory` - const serializedPrimaryKey = meta.props.find(p => p.serializedPrimaryKey); - if (serializedPrimaryKey) { - Object.defineProperty(meta.prototype, serializedPrimaryKey.name, { - get() { - return this._id ? em.getPlatform().normalizePrimaryKey(this._id) : null; - }, - set(id) { - this._id = id ? em.getPlatform().denormalizePrimaryKey(id) : null; - }, - configurable: true, - }); - } - EntityHelper.defineBaseProperties(meta, meta.prototype, fork); - EntityHelper.defineCustomInspect(meta); - if (em.config.get('propagationOnPrototype') && !meta.embeddable && !meta.virtual) { - EntityHelper.defineProperties(meta, fork); - } - const prototype = meta.prototype; - if (!prototype.toJSON) { - // toJSON can be overridden - Object.defineProperty(prototype, 'toJSON', { - value: function (...args) { - // Guard against being called on the prototype itself (e.g. by serializers - // walking the object graph and calling toJSON on prototype objects) - if (this === prototype) { - return {}; - } - return EntityTransformer.toObject(this, ...args); - }, - writable: true, - configurable: true, - enumerable: false, - }); - } - } - /** - * As a performance optimization, we create entity state methods lazily. We first add - * the `null` value to the prototype to reserve space in memory. Then we define a setter on the - * prototype that will be executed exactly once per entity instance. There we redefine the given - * property on the entity instance, so shadowing the prototype setter. - */ - static defineBaseProperties(meta, prototype, em) { - // oxfmt-ignore - const helperParams = meta.embeddable || meta.virtual ? [] : [em.getComparator().getPkGetter(meta), em.getComparator().getPkSerializer(meta), em.getComparator().getPkGetterConverted(meta)]; - Object.defineProperties(prototype, { - __entity: { value: !meta.embeddable, configurable: true }, - __meta: { value: meta, configurable: true }, - __config: { value: em.config, configurable: true }, - __platform: { value: em.getPlatform(), configurable: true }, - __factory: { value: em.getEntityFactory(), configurable: true }, - __helper: { - get() { - Object.defineProperty(this, '__helper', { - value: new WrappedEntity(this, em.getHydrator(), ...helperParams), - enumerable: false, - configurable: true, - }); - return this.__helper; - }, - configurable: true, // otherwise jest fails when trying to compare entities ¯\_(ツ)_/¯ - }, - }); - } - /** - * Defines getter and setter for every owning side of m:1 and 1:1 relation. This is then used for propagation of - * changes to the inverse side of bi-directional relations. Rest of the properties are also defined this way to - * achieve dirtiness, which is then used for fast checks whether we need to auto-flush because of managed entities. - * - * First defines a setter on the prototype, once called, actual get/set handlers are registered on the instance rather - * than on its prototype. Thanks to this we still have those properties enumerable (e.g. part of `Object.keys(entity)`). - */ - static defineProperties(meta, em) { - Object.values(meta.properties).forEach(prop => { - const isCollection = [ReferenceKind.ONE_TO_MANY, ReferenceKind.MANY_TO_MANY].includes(prop.kind); - // oxfmt-ignore - const isReference = [ReferenceKind.ONE_TO_ONE, ReferenceKind.MANY_TO_ONE].includes(prop.kind) && (prop.inversedBy || prop.mappedBy) && !prop.mapToPk; - if (isReference) { - Object.defineProperty(meta.prototype, prop.name, { - set(val) { - EntityHelper.defineReferenceProperty(meta, prop, this, em.getHydrator()); - this[prop.name] = val; - }, - configurable: true, - }); - return; - } - if (prop.inherited || prop.primary || prop.accessor || prop.persist === false || prop.embedded || isCollection) { - return; - } - Object.defineProperty(meta.prototype, prop.name, { - set(val) { - Object.defineProperty(this, prop.name, { - get() { - return this.__helper?.__data[prop.name]; - }, - set(val) { - this.__helper.__data[prop.name] = val; - }, - enumerable: true, - configurable: true, - }); - this.__helper.__data[prop.name] = val; - }, - configurable: true, - }); - }); - } - static defineCustomInspect(meta) { - // @ts-ignore - meta.prototype[Symbol.for('nodejs.util.inspect.custom')] ??= function (depth = 2) { - const object = {}; - const keys = new Set(Utils.keys(this)); - for (const prop of meta.props) { - if (keys.has(prop.name) || (prop.getter && prop.accessor === prop.name)) { - object[prop.name] = this[prop.name]; - } - } - for (const key of keys) { - if (!meta.properties[key]) { - object[key] = this[key]; - } - } - // ensure we dont have internal symbols in the POJO - [OptionalProps, EntityRepositoryType, PrimaryKeyProp, EagerProps, HiddenProps, EntityName].forEach( - sym => delete object[sym], - ); - meta.props.filter(prop => object[prop.name] === undefined).forEach(prop => delete object[prop.name]); - const ret = inspect(object, { depth }); - let name = this.constructor.name; - const showEM = ['true', 't', '1'].includes(getEnv('MIKRO_ORM_LOG_EM_ID')?.toLowerCase() ?? ''); - if (showEM) { - if (helper(this).__em) { - name += ` [managed by ${helper(this).__em.id}]`; - } else { - name += ` [not managed]`; - } - } - // distinguish not initialized entities - if (!helper(this).__initialized) { - name = `(${name})`; - } - return ret === '[Object]' ? `[${name}]` : name + ' ' + ret; - }; - } - static defineReferenceProperty(meta, prop, ref, hydrator) { - const wrapped = helper(ref); - Object.defineProperty(ref, prop.name, { - get() { - return helper(ref).__data[prop.name]; - }, - set(val) { - const entity = Reference.unwrapReference(val ?? wrapped.__data[prop.name]); - const old = Reference.unwrapReference(wrapped.__data[prop.name]); - // oxfmt-ignore - if (old && old !== entity && prop.kind === ReferenceKind.MANY_TO_ONE && prop.inversedBy && old[prop.inversedBy]) { - old[prop.inversedBy].removeWithoutPropagation(this); - } - wrapped.__data[prop.name] = Reference.wrapReference(val, prop); - // when propagation from inside hydration, we set the FK to the entity data immediately - if (val && hydrator.isRunning() && wrapped.__originalEntityData && prop.owner) { - wrapped.__originalEntityData[prop.name] = Utils.getPrimaryKeyValues( - wrapped.__data[prop.name], - prop.targetMeta, - true, - ); - } - EntityHelper.propagate(meta, entity, this, prop, Reference.unwrapReference(val), old); - }, - enumerable: true, - configurable: true, - }); - } - static propagate(meta, entity, owner, prop, value, old) { - // For polymorphic relations, get bidirectional relations from the actual entity's metadata - let bidirectionalRelations; - if (prop.polymorphic && prop.polymorphTargets?.length) { - // For polymorphic relations, we need to get the bidirectional relations from the actual value's metadata - if (!value) { - return; // No value means no propagation needed - } - bidirectionalRelations = helper(value).__meta.bidirectionalRelations; - } else { - bidirectionalRelations = prop.targetMeta.bidirectionalRelations; - } - for (const prop2 of bidirectionalRelations) { - if ((prop2.inversedBy || prop2.mappedBy) !== prop.name) { - continue; - } - // oxfmt-ignore - if (prop2.targetMeta.abstract ? prop2.targetMeta.root.class !== meta.root.class : prop2.targetMeta.class !== meta.class) { - continue; - } - const inverse = value?.[prop2.name]; - if (prop.ref && owner[prop.name]) { - // eslint-disable-next-line dot-notation - owner[prop.name]['property'] = prop; - } - if (Utils.isCollection(inverse) && inverse.isPartial()) { - continue; - } - if (prop.kind === ReferenceKind.MANY_TO_ONE && Utils.isCollection(inverse) && inverse.isInitialized()) { - inverse.addWithoutPropagation(owner); - helper(owner).__em?.getUnitOfWork().cancelOrphanRemoval(owner); - } - if (prop.kind === ReferenceKind.ONE_TO_ONE) { - if ( - (value != null && Reference.unwrapReference(inverse) !== owner) || - (value == null && entity?.[prop2.name] != null) - ) { - if (entity && (!prop.owner || helper(entity).__initialized)) { - EntityHelper.propagateOneToOne(entity, owner, prop, prop2, value, old); - } - if (old && prop.orphanRemoval) { - helper(old).__em?.getUnitOfWork().scheduleOrphanRemoval(old); - } - } - } - } - } - static propagateOneToOne(entity, owner, prop, prop2, value, old) { - helper(entity).__pk = helper(entity).getPrimaryKey(); - // the inverse side will be changed on the `value` too, so we need to clean-up and schedule orphan removal there too - if ( - !prop.primary && - !prop2.mapToPk && - value?.[prop2.name] != null && - Reference.unwrapReference(value[prop2.name]) !== entity - ) { - const other = Reference.unwrapReference(value[prop2.name]); - delete helper(other).__data[prop.name]; - if (prop2.orphanRemoval) { - helper(other).__em?.getUnitOfWork().scheduleOrphanRemoval(other); - } - } - // Skip setting the inverse side to null if it's a primary key - the entity will be removed via orphan removal - // Setting a primary key to null would corrupt the entity and cause validation errors - if (value == null && prop.orphanRemoval && prop2.primary) { - return; - } - if (value == null) { - entity[prop2.name] = value; - } else if (prop2.mapToPk) { - entity[prop2.name] = helper(owner).getPrimaryKey(); - } else { - entity[prop2.name] = Reference.wrapReference(owner, prop); - } - if (old?.[prop2.name] != null) { - delete helper(old).__data[prop2.name]; - old[prop2.name] = null; - } - } - static ensurePropagation(entity) { - if (entity.__gettersDefined) { - return; - } - const wrapped = helper(entity); - const meta = wrapped.__meta; - const platform = wrapped.__platform; - const serializedPrimaryKey = meta.props.find(p => p.serializedPrimaryKey); - const values = []; - if (serializedPrimaryKey) { - const pk = meta.getPrimaryProps()[0]; - const val = entity[serializedPrimaryKey.name]; - delete entity[serializedPrimaryKey.name]; - Object.defineProperty(entity, serializedPrimaryKey.name, { - get() { - return this[pk.name] ? platform.normalizePrimaryKey(this[pk.name]) : null; - }, - set(id) { - this[pk.name] = id ? platform.denormalizePrimaryKey(id) : null; - }, - configurable: true, - }); - if (entity[pk.name] == null && val != null) { - values.push(serializedPrimaryKey.name, val); - } - } - for (const prop of meta.trackingProps) { - if (entity[prop.name] !== undefined) { - values.push(prop.name, entity[prop.name]); - } - delete entity[prop.name]; - } - Object.defineProperties(entity, meta.definedProperties); - for (let i = 0; i < values.length; i += 2) { - entity[values[i]] = values[i + 1]; - } - } -} diff --git a/node_modules/@mikro-orm/core/entity/EntityIdentifier.d.ts b/node_modules/@mikro-orm/core/entity/EntityIdentifier.d.ts deleted file mode 100644 index 3e35f5d..0000000 --- a/node_modules/@mikro-orm/core/entity/EntityIdentifier.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { IPrimaryKey } from '../typings.js'; -/** - * @internal - */ -export declare class EntityIdentifier { - private value?; - constructor(value?: IPrimaryKey | undefined); - setValue(value: IPrimaryKey): void; - getValue(): T; -} diff --git a/node_modules/@mikro-orm/core/entity/EntityIdentifier.js b/node_modules/@mikro-orm/core/entity/EntityIdentifier.js deleted file mode 100644 index 217f857..0000000 --- a/node_modules/@mikro-orm/core/entity/EntityIdentifier.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @internal - */ -export class EntityIdentifier { - value; - constructor(value) { - this.value = value; - } - setValue(value) { - this.value = value; - } - getValue() { - return this.value; - } -} diff --git a/node_modules/@mikro-orm/core/entity/EntityLoader.d.ts b/node_modules/@mikro-orm/core/entity/EntityLoader.d.ts deleted file mode 100644 index 5a09a0a..0000000 --- a/node_modules/@mikro-orm/core/entity/EntityLoader.d.ts +++ /dev/null @@ -1,112 +0,0 @@ -import type { - AnyEntity, - AutoPath, - ConnectionType, - EntityName, - EntityProperty, - FilterQuery, - PopulateOptions, -} from '../typings.js'; -import type { EntityManager } from '../EntityManager.js'; -import { LoadStrategy, type LockMode, type PopulateHint, PopulatePath, type QueryOrderMap } from '../enums.js'; -import type { FilterOptions } from '../drivers/IDatabaseDriver.js'; -import type { LoggingOptions } from '../logging/Logger.js'; -/** Options for controlling how relations are loaded by the EntityLoader. */ -export interface EntityLoaderOptions< - Entity, - Fields extends string = PopulatePath.ALL, - Excludes extends string = never, -> { - /** Select specific fields to load (partial loading). */ - fields?: readonly AutoPath[]; - /** Fields to exclude from loading. */ - exclude?: readonly AutoPath[]; - /** Additional filtering conditions applied to populated relations. */ - where?: FilterQuery; - /** Controls how `where` conditions are applied to populated relations. */ - populateWhere?: PopulateHint | `${PopulateHint}`; - /** Ordering for populated relations. */ - orderBy?: QueryOrderMap | QueryOrderMap[]; - /** Whether to reload already loaded entities. */ - refresh?: boolean; - /** Whether to validate the populate hint against the entity metadata. */ - validate?: boolean; - /** Whether to look up eager-loaded relationships automatically. */ - lookup?: boolean; - /** Whether to convert custom types during hydration. */ - convertCustomTypes?: boolean; - /** Whether to skip loading lazy scalar properties. */ - ignoreLazyScalarProperties?: boolean; - /** Filter options to apply when loading relations. */ - filters?: FilterOptions; - /** Loading strategy to use (select-in, joined, or balanced). */ - strategy?: LoadStrategy | `${LoadStrategy}`; - /** Lock mode for the query (pessimistic locking). */ - lockMode?: Exclude; - /** Database schema override. */ - schema?: string; - /** Connection type (read or write replica). */ - connectionType?: ConnectionType; - /** Logging options for the query. */ - logging?: LoggingOptions; -} -/** Responsible for batch-loading entity relations using either select-in or joined loading strategies. */ -export declare class EntityLoader { - #private; - constructor(em: EntityManager); - /** - * Loads specified relations in batch. - * This will execute one query for each relation, that will populate it on all the specified entities. - */ - populate( - entityName: EntityName, - entities: Entity[], - populate: PopulateOptions[] | boolean, - options: EntityLoaderOptions, - ): Promise; - /** Normalizes populate hints into a structured array of PopulateOptions, expanding dot paths and eager relations. */ - normalizePopulate( - entityName: EntityName, - populate: (PopulateOptions | boolean)[] | PopulateOptions | boolean, - strategy?: LoadStrategy, - lookup?: boolean, - exclude?: string[], - ): PopulateOptions[]; - private setSerializationContext; - /** - * Merge multiple populates for the same entity with different children. Also skips `*` fields, those can come from - * partial loading hints (`fields`) that are used to infer the `populate` hint if missing. - */ - private mergeNestedPopulate; - /** - * preload everything in one call (this will update already existing references in IM) - */ - private populateMany; - private populateScalar; - private populatePolymorphic; - private initializeCollections; - private initializeOneToMany; - private initializeManyToMany; - private findChildren; - private mergePrimaryCondition; - private populateField; - /** @internal */ - findChildrenFromPivotTable( - filtered: Entity[], - prop: EntityProperty, - options: Required>, - orderBy?: QueryOrderMap[], - populate?: PopulateOptions, - pivotJoin?: boolean, - ): Promise; - private extractChildCondition; - private buildFields; - private getChildReferences; - private filterCollections; - private isPropertyLoaded; - private filterReferences; - private filterByReferences; - private lookupAllRelationships; - private getRelationName; - private lookupEagerLoadedRelationships; -} diff --git a/node_modules/@mikro-orm/core/entity/EntityLoader.js b/node_modules/@mikro-orm/core/entity/EntityLoader.js deleted file mode 100644 index 9a4f739..0000000 --- a/node_modules/@mikro-orm/core/entity/EntityLoader.js +++ /dev/null @@ -1,787 +0,0 @@ -import { QueryHelper } from '../utils/QueryHelper.js'; -import { Utils } from '../utils/Utils.js'; -import { ValidationError } from '../errors.js'; -import { LoadStrategy, PopulatePath, ReferenceKind } from '../enums.js'; -import { Reference } from './Reference.js'; -import { helper } from './wrap.js'; -import { expandDotPaths } from './utils.js'; -import { Raw } from '../utils/RawQueryFragment.js'; -/** Responsible for batch-loading entity relations using either select-in or joined loading strategies. */ -export class EntityLoader { - #metadata; - #driver; - #em; - constructor(em) { - this.#em = em; - this.#metadata = this.#em.getMetadata(); - this.#driver = this.#em.getDriver(); - } - /** - * Loads specified relations in batch. - * This will execute one query for each relation, that will populate it on all the specified entities. - */ - async populate(entityName, entities, populate, options) { - if (entities.length === 0 || Utils.isEmpty(populate)) { - return this.setSerializationContext(entities, populate, options); - } - const meta = this.#metadata.find(entityName); - if (entities.some(e => !e.__helper)) { - const entity = entities.find(e => !Utils.isEntity(e)); - throw ValidationError.notDiscoveredEntity(entity, meta, 'populate'); - } - const references = entities.filter(e => !helper(e).isInitialized()); - const visited = (options.visited ??= new Set()); - options.where ??= {}; - options.orderBy ??= {}; - options.lookup ??= true; - options.validate ??= true; - options.refresh ??= false; - options.convertCustomTypes ??= true; - if (references.length > 0) { - await this.populateScalar(meta, references, { ...options, populateWhere: undefined }); - } - populate = this.normalizePopulate(entityName, populate, options.strategy, options.lookup, options.exclude); - const invalid = populate.find(({ field }) => !this.#em.canPopulate(entityName, field)); - /* v8 ignore next */ - if (options.validate && invalid) { - throw ValidationError.invalidPropertyName(entityName, invalid.field); - } - this.setSerializationContext(entities, populate, options); - for (const entity of entities) { - visited.add(entity); - } - for (const pop of populate) { - await this.populateField(entityName, entities, pop, options); - } - for (const entity of entities) { - visited.delete(entity); - } - } - /** Normalizes populate hints into a structured array of PopulateOptions, expanding dot paths and eager relations. */ - normalizePopulate(entityName, populate, strategy, lookup = true, exclude) { - const meta = this.#metadata.find(entityName); - let normalized = Utils.asArray(populate).map(field => { - // oxfmt-ignore - return typeof field === 'boolean' || field.field === PopulatePath.ALL ? { all: !!field, field: meta.primaryKeys[0] } : field; - }); - if (normalized.some(p => p.all)) { - normalized = this.lookupAllRelationships(entityName); - } - // convert nested `field` with dot syntax to PopulateOptions with `children` array - expandDotPaths(meta, normalized, true); - if (lookup && populate !== false) { - normalized = this.lookupEagerLoadedRelationships(entityName, normalized, strategy, '', [], exclude); - // convert nested `field` with dot syntax produced by eager relations - expandDotPaths(meta, normalized, true); - } - // merge same fields - return this.mergeNestedPopulate(normalized); - } - setSerializationContext(entities, populate, options) { - for (const entity of entities) { - helper(entity).setSerializationContext({ - populate, - fields: options.fields, - exclude: options.exclude, - }); - } - } - /** - * Merge multiple populates for the same entity with different children. Also skips `*` fields, those can come from - * partial loading hints (`fields`) that are used to infer the `populate` hint if missing. - */ - mergeNestedPopulate(populate) { - const tmp = populate.reduce((ret, item) => { - /* v8 ignore next */ - if (item.field === PopulatePath.ALL) { - return ret; - } - if (!ret[item.field]) { - ret[item.field] = item; - return ret; - } - if (!ret[item.field].children && item.children) { - ret[item.field].children = item.children; - } else if (ret[item.field].children && item.children) { - ret[item.field].children.push(...item.children); - } - return ret; - }, {}); - return Object.values(tmp).map(item => { - if (item.children) { - item.children = this.mergeNestedPopulate(item.children); - } - return item; - }); - } - /** - * preload everything in one call (this will update already existing references in IM) - */ - async populateMany(entityName, entities, populate, options) { - const [field, ref] = populate.field.split(':', 2); - const meta = this.#metadata.find(entityName); - const prop = meta.properties[field]; - if (prop.kind === ReferenceKind.MANY_TO_MANY && prop.owner && !this.#driver.getPlatform().usesPivotTable()) { - const filtered = entities.filter(e => !e[prop.name]?.isInitialized()); - if (filtered.length > 0) { - await this.populateScalar(meta, filtered, { ...options, fields: [prop.name] }); - } - } - if (prop.kind === ReferenceKind.SCALAR && prop.lazy) { - const filtered = entities.filter( - e => options.refresh || (prop.ref ? !e[prop.name]?.isInitialized() : e[prop.name] === undefined), - ); - if (options.ignoreLazyScalarProperties || filtered.length === 0) { - return entities; - } - await this.populateScalar(meta, filtered, { ...options, fields: [prop.name] }); - return entities; - } - if (prop.kind === ReferenceKind.EMBEDDED) { - return []; - } - const filtered = this.filterCollections(entities, field, options, ref); - const innerOrderBy = Utils.asArray(options.orderBy) - .filter( - orderBy => - (Array.isArray(orderBy[prop.name]) && orderBy[prop.name].length > 0) || Utils.isObject(orderBy[prop.name]), - ) - .flatMap(orderBy => orderBy[prop.name]); - const where = await this.extractChildCondition(options, prop); - if (prop.kind === ReferenceKind.MANY_TO_MANY && this.#driver.getPlatform().usesPivotTable()) { - const pivotOrderBy = QueryHelper.mergeOrderBy(innerOrderBy, prop.orderBy, prop.targetMeta?.orderBy); - const res = await this.findChildrenFromPivotTable(filtered, prop, options, pivotOrderBy, populate, !!ref); - return Utils.flatten(res); - } - if (prop.polymorphic && prop.polymorphTargets) { - return this.populatePolymorphic(entities, prop, options, !!ref); - } - const { items, partial } = await this.findChildren( - options.filtered ?? entities, - prop, - populate, - { - ...options, - where, - orderBy: innerOrderBy, - }, - !!(ref || prop.mapToPk), - ); - const customOrder = innerOrderBy.length > 0 || !!prop.orderBy || !!prop.targetMeta?.orderBy; - this.initializeCollections(filtered, prop, field, items, customOrder, partial); - return items; - } - async populateScalar(meta, filtered, options) { - const pk = Utils.getPrimaryKeyHash(meta.primaryKeys); - const ids = Utils.unique(filtered.map(e => Utils.getPrimaryKeyValues(e, meta, true))); - const where = this.mergePrimaryCondition(ids, pk, options, meta, this.#metadata, this.#driver.getPlatform()); - const { filters, convertCustomTypes, lockMode, strategy, populateWhere, connectionType, logging, fields } = options; - await this.#em.find(meta.class, where, { - filters, - convertCustomTypes, - lockMode, - strategy, - populateWhere, - connectionType, - logging, - fields: fields, - populate: [], - }); - } - async populatePolymorphic(entities, prop, options, ref) { - const ownerMeta = this.#metadata.get(entities[0].constructor); - // Separate entities: those with loaded refs vs those needing FK load - const toPopulate = []; - const needsFkLoad = []; - for (const entity of entities) { - const refValue = entity[prop.name]; - if (refValue && helper(refValue).hasPrimaryKey()) { - if ( - (ref && !options.refresh) || // :ref hint - already have reference - (!ref && helper(refValue).__initialized && !options.refresh) // already loaded - ) { - continue; - } - toPopulate.push(entity); - } else if (refValue == null && !helper(entity).__loadedProperties.has(prop.name)) { - // FK columns weren't loaded (partial loading) — need to re-fetch them. - // If the property IS in __loadedProperties, the FK was loaded and is genuinely null. - needsFkLoad.push(entity); - } - } - // Load FK columns using populateScalar pattern - if (needsFkLoad.length > 0) { - await this.populateScalar(ownerMeta, needsFkLoad, { - ...options, - fields: [...ownerMeta.primaryKeys, prop.name], - }); - // After loading FKs, add to toPopulate if not using :ref hint - if (!ref) { - for (const entity of needsFkLoad) { - const refValue = entity[prop.name]; - if (refValue && helper(refValue).hasPrimaryKey()) { - toPopulate.push(entity); - } - } - } - } - if (toPopulate.length === 0) { - return []; - } - // Group references by target class for batch loading - const groups = new Map(); - for (const entity of toPopulate) { - const refValue = Reference.unwrapReference(entity[prop.name]); - const discriminator = QueryHelper.findDiscriminatorValue(prop.discriminatorMap, helper(refValue).__meta.class); - const group = groups.get(discriminator) ?? []; - group.push(refValue); - groups.set(discriminator, group); - } - // Load each group concurrently - identity map handles merging with existing references - const allItems = []; - await Promise.all( - [...groups].map(async ([discriminator, children]) => { - const targetMeta = this.#metadata.find(prop.discriminatorMap[discriminator]); - await this.populateScalar(targetMeta, children, options); - allItems.push(...children); - }), - ); - return allItems; - } - initializeCollections(filtered, prop, field, children, customOrder, partial) { - if (prop.kind === ReferenceKind.ONE_TO_MANY) { - this.initializeOneToMany(filtered, children, prop, field, partial); - } - if (prop.kind === ReferenceKind.MANY_TO_MANY && !this.#driver.getPlatform().usesPivotTable()) { - this.initializeManyToMany(filtered, children, prop, field, customOrder, partial); - } - } - initializeOneToMany(filtered, children, prop, field, partial) { - const mapToPk = prop.targetMeta.properties[prop.mappedBy].mapToPk; - const map = {}; - for (const entity of filtered) { - const key = helper(entity).getSerializedPrimaryKey(); - map[key] = []; - } - for (const child of children) { - const pk = child.__helper.__data[prop.mappedBy] ?? child[prop.mappedBy]; - if (pk) { - const key = helper(mapToPk ? this.#em.getReference(prop.targetMeta.class, pk) : pk).getSerializedPrimaryKey(); - map[key]?.push(child); - } - } - for (const entity of filtered) { - const key = helper(entity).getSerializedPrimaryKey(); - entity[field].hydrate(map[key], undefined, partial); - } - } - initializeManyToMany(filtered, children, prop, field, customOrder, partial) { - if (prop.mappedBy) { - for (const entity of filtered) { - const items = children.filter(child => child[prop.mappedBy].contains(entity, false)); - entity[field].hydrate(items, true, partial); - } - } else { - // owning side of M:N without pivot table needs to be reordered - for (const entity of filtered) { - const order = !customOrder ? [...entity[prop.name].getItems(false)] : []; // copy order of references - const items = children.filter(child => entity[prop.name].contains(child, false)); - if (!customOrder) { - items.sort((a, b) => order.indexOf(a) - order.indexOf(b)); - } - entity[field].hydrate(items, true, partial); - } - } - } - async findChildren(entities, prop, populate, options, ref) { - const children = Utils.unique(this.getChildReferences(entities, prop, options, ref)); - const meta = prop.targetMeta; - // When targetKey is set, use it for FK lookup instead of the PK - let fk = prop.targetKey ?? Utils.getPrimaryKeyHash(meta.primaryKeys); - let schema = options.schema; - const partial = !Utils.isEmpty(prop.where) || !Utils.isEmpty(options.where); - let polymorphicOwnerProp; - if (prop.kind === ReferenceKind.ONE_TO_MANY || (prop.kind === ReferenceKind.MANY_TO_MANY && !prop.owner)) { - const ownerProp = meta.properties[prop.mappedBy]; - if (ownerProp.polymorphic && ownerProp.fieldNames.length >= 2) { - const idColumns = ownerProp.fieldNames.slice(1); - fk = idColumns.length === 1 ? idColumns[0] : idColumns; - polymorphicOwnerProp = ownerProp; - } else { - fk = ownerProp.name; - } - } - if (prop.kind === ReferenceKind.ONE_TO_ONE && !prop.owner && !ref) { - children.length = 0; - fk = meta.properties[prop.mappedBy].name; - children.push(...this.filterByReferences(entities, prop.name, options.refresh)); - } - if (children.length === 0) { - return { items: [], partial }; - } - if (!schema && [ReferenceKind.ONE_TO_ONE, ReferenceKind.MANY_TO_ONE].includes(prop.kind)) { - schema = children.find(e => e.__helper.__schema)?.__helper.__schema; - } - const ids = Utils.unique(children.map(e => (prop.targetKey ? e[prop.targetKey] : e.__helper.getPrimaryKey()))); - let where; - if (polymorphicOwnerProp && Array.isArray(fk)) { - const conditions = ids.map(id => { - const pkValues = Object.values(id); - return Object.fromEntries(fk.map((col, idx) => [col, pkValues[idx]])); - }); - where = conditions.length === 1 ? conditions[0] : { $or: conditions }; - } else { - where = this.mergePrimaryCondition(ids, fk, options, meta, this.#metadata, this.#driver.getPlatform()); - } - if (polymorphicOwnerProp) { - const parentMeta = this.#metadata.find(entities[0].constructor); - const discriminatorValue = - QueryHelper.findDiscriminatorValue(polymorphicOwnerProp.discriminatorMap, parentMeta.class) ?? - parentMeta.tableName; - const discriminatorColumn = polymorphicOwnerProp.fieldNames[0]; - where = { $and: [where, { [discriminatorColumn]: discriminatorValue }] }; - } - const fields = this.buildFields(options.fields, prop, ref); - /* eslint-disable prefer-const */ - let { - refresh, - filters, - convertCustomTypes, - lockMode, - strategy, - populateWhere = 'infer', - connectionType, - logging, - } = options; - /* eslint-enable prefer-const */ - if (typeof populateWhere === 'object') { - populateWhere = await this.extractChildCondition({ where: populateWhere }, prop); - } - if (!Utils.isEmpty(prop.where) || Raw.hasObjectFragments(prop.where)) { - where = { $and: [where, prop.where] }; - } - const orderBy = QueryHelper.mergeOrderBy(options.orderBy, prop.orderBy); - const items = await this.#em.find(meta.class, where, { - filters, - convertCustomTypes, - lockMode, - populateWhere, - logging, - orderBy, - populate: populate.children ?? populate.all ?? [], - exclude: Array.isArray(options.exclude) - ? Utils.extractChildElements(options.exclude, prop.name) - : options.exclude, - strategy, - fields, - schema, - connectionType, - // @ts-ignore not a public option, will be propagated to the populate call - refresh: refresh && !children.every(item => options.visited.has(item)), - // @ts-ignore not a public option, will be propagated to the populate call - visited: options.visited, - }); - // For targetKey relations, wire up loaded entities to parent references - // This is needed because the references were created under alternate key, - // but loaded entities are stored under PK, so they don't automatically merge - if (prop.targetKey && [ReferenceKind.ONE_TO_ONE, ReferenceKind.MANY_TO_ONE].includes(prop.kind)) { - const itemsByKey = new Map(); - for (const item of items) { - itemsByKey.set('' + item[prop.targetKey], item); - } - for (const entity of entities) { - const ref = entity[prop.name]; - /* v8 ignore next */ - if (!ref) { - continue; - } - // oxfmt-ignore - const keyValue = '' + (Reference.isReference(ref) ? ref.unwrap()[prop.targetKey] : ref[prop.targetKey]); - const loadedItem = itemsByKey.get(keyValue); - if (loadedItem) { - entity[prop.name] = Reference.isReference(ref) ? Reference.create(loadedItem) : loadedItem; - } - } - } - if ([ReferenceKind.ONE_TO_ONE, ReferenceKind.MANY_TO_ONE].includes(prop.kind) && items.length !== children.length) { - const nullVal = this.#em.config.get('forceUndefined') ? undefined : null; - const itemsMap = new Set(); - const childrenMap = new Set(); - // Use targetKey value if set, otherwise use serialized PK - const getKey = e => (prop.targetKey ? '' + e[prop.targetKey] : helper(e).getSerializedPrimaryKey()); - for (const item of items) { - /* v8 ignore next */ - itemsMap.add(getKey(item)); - } - for (const child of children) { - childrenMap.add(getKey(child)); - } - for (const entity of entities) { - const ref = entity[prop.name] ?? {}; - const key = helper(ref) ? getKey(ref) : undefined; - if (key && childrenMap.has(key) && !itemsMap.has(key)) { - entity[prop.name] = nullVal; - helper(entity).__originalEntityData[prop.name] = null; - } - } - } - for (const item of items) { - if (ref && !helper(item).__onLoadFired) { - helper(item).__initialized = false; - this.#em.getUnitOfWork().unmarkAsLoaded(item); - } - } - return { items, partial }; - } - mergePrimaryCondition(ids, pk, options, meta, metadata, platform) { - const cond1 = QueryHelper.processWhere({ - where: { [pk]: { $in: ids } }, - entityName: meta.class, - metadata, - platform, - convertCustomTypes: !options.convertCustomTypes, - }); - const where = { ...options.where }; - Utils.dropUndefinedProperties(where); - return where[pk] ? { $and: [cond1, where] } : { ...cond1, ...where }; - } - async populateField(entityName, entities, populate, options) { - const field = populate.field.split(':')[0]; - const prop = this.#metadata.find(entityName).properties[field]; - if (prop.kind === ReferenceKind.SCALAR && !prop.lazy) { - return; - } - options = { ...options, filters: QueryHelper.mergePropertyFilters(prop.filters, options.filters) }; - const populated = await this.populateMany(entityName, entities, populate, options); - if (!populate.children && !populate.all) { - return; - } - const children = []; - for (const entity of entities) { - const ref = entity[field]; - if (Utils.isEntity(ref)) { - children.push(ref); - } else if (Reference.isReference(ref)) { - children.push(ref.unwrap()); - } else if (Utils.isCollection(ref)) { - children.push(...ref.getItems()); - } else if (ref && prop.kind === ReferenceKind.EMBEDDED) { - children.push(...Utils.asArray(ref)); - } - } - if (populated.length === 0 && !populate.children) { - return; - } - const fields = this.buildFields(options.fields, prop); - const innerOrderBy = Utils.asArray(options.orderBy) - .filter(orderBy => Utils.isObject(orderBy[prop.name])) - .map(orderBy => orderBy[prop.name]); - const { refresh, filters, ignoreLazyScalarProperties, populateWhere, connectionType, logging, schema } = options; - // oxfmt-ignore - const exclude = Array.isArray(options.exclude) ? Utils.extractChildElements(options.exclude, prop.name) : options.exclude; - const visited = options.visited; - for (const entity of entities) { - visited.delete(entity); - } - const unique = Utils.unique(children); - const filtered = unique.filter(e => !visited.has(e)); - for (const entity of entities) { - visited.add(entity); - } - if (!prop.targetMeta) { - return; - } - const populateChildren = async (targetMeta, items) => { - await this.populate(targetMeta.class, items, populate.children ?? populate.all, { - where: await this.extractChildCondition(options, prop, false), - orderBy: innerOrderBy, - fields, - exclude, - validate: false, - lookup: false, - filters, - ignoreLazyScalarProperties, - populateWhere, - connectionType, - logging, - schema, - // @ts-ignore not a public option, will be propagated to the populate call - refresh: refresh && !filtered.every(item => options.visited.has(item)), - // @ts-ignore not a public option, will be propagated to the populate call - visited: options.visited, - // @ts-ignore not a public option - filtered, - }); - }; - if (prop.polymorphic && prop.polymorphTargets) { - await Promise.all( - prop.polymorphTargets.map(async targetMeta => { - const targetChildren = unique.filter(child => helper(child).__meta.className === targetMeta.className); - if (targetChildren.length > 0) { - await populateChildren(targetMeta, targetChildren); - } - }), - ); - } else { - await populateChildren(prop.targetMeta, unique); - } - } - /** @internal */ - async findChildrenFromPivotTable(filtered, prop, options, orderBy, populate, pivotJoin) { - const ids = filtered.map(e => e.__helper.__primaryKeys); - const refresh = options.refresh; - let where = await this.extractChildCondition(options, prop, true); - const fields = this.buildFields(options.fields, prop); - // oxfmt-ignore - const exclude = Array.isArray(options.exclude) ? Utils.extractChildElements(options.exclude, prop.name) : options.exclude; - const populateFilter = options.populateFilter?.[prop.name]; - const options2 = { ...options, fields, exclude, populateFilter }; - ['limit', 'offset', 'first', 'last', 'before', 'after', 'overfetch'].forEach(prop => delete options2[prop]); - options2.populate = populate?.children ?? []; - if (!Utils.isEmpty(prop.where)) { - where = { $and: [where, prop.where] }; - } - const map = await this.#driver.loadFromPivotTable( - prop, - ids, - where, - orderBy, - this.#em.getTransactionContext(), - options2, - pivotJoin, - ); - const children = []; - for (let i = 0; i < filtered.length; i++) { - const entity = filtered[i]; - const items = map[Utils.getPrimaryKeyHash(ids[i])].map(item => { - if (pivotJoin) { - return this.#em.getReference(prop.targetMeta.class, item, { - convertCustomTypes: true, - schema: options.schema ?? this.#em.config.get('schema'), - }); - } - const entity = this.#em.getEntityFactory().create(prop.targetMeta.class, item, { - refresh, - merge: true, - convertCustomTypes: true, - schema: options.schema ?? this.#em.config.get('schema'), - }); - return this.#em.getUnitOfWork().register(entity, item, { refresh, loaded: true }); - }); - entity[prop.name].hydrate(items, true); - children.push(items); - } - return children; - } - async extractChildCondition(options, prop, filters = false) { - const where = options.where; - const subCond = Utils.isPlainObject(where[prop.name]) ? where[prop.name] : {}; - const meta2 = prop.targetMeta; - const pk = Utils.getPrimaryKeyHash(meta2.primaryKeys); - ['$and', '$or'].forEach(op => { - if (where[op]) { - const child = where[op] - .map(cond => cond[prop.name]) - .filter( - sub => - sub != null && - !(Utils.isPlainObject(sub) && Utils.getObjectQueryKeys(sub).every(key => Utils.isOperator(key, false))), - ) - .map(cond => { - if (Utils.isPrimaryKey(cond)) { - return { [pk]: cond }; - } - return cond; - }); - if (child.length > 0) { - subCond[op] = child; - } - } - }); - const operators = Object.keys(subCond).filter(key => Utils.isOperator(key, false)); - if (operators.length > 0) { - operators.forEach(op => { - subCond[pk] ??= {}; - subCond[pk][op] = subCond[op]; - delete subCond[op]; - }); - } - if (filters) { - return this.#em.applyFilters(meta2.class, subCond, options.filters, 'read', options); - } - return subCond; - } - buildFields(fields = [], prop, ref) { - if (ref) { - fields = prop.targetMeta.primaryKeys.map(targetPkName => `${prop.name}.${targetPkName}`); - } - const ret = fields.reduce((ret, f) => { - if (Utils.isPlainObject(f)) { - Utils.keys(f) - .filter(ff => ff === prop.name) - .forEach(ff => ret.push(...f[ff])); - } else if (f.toString().includes('.')) { - const parts = f.toString().split('.'); - const propName = parts.shift(); - const childPropName = parts.join('.'); - /* v8 ignore next */ - if (propName === prop.name) { - ret.push(childPropName); - } - } - return ret; - }, []); - // we need to automatically select the FKs too, e.g. for 1:m relations to be able to wire them with the items - if (prop.kind === ReferenceKind.ONE_TO_MANY || prop.kind === ReferenceKind.MANY_TO_MANY) { - const owner = prop.targetMeta.properties[prop.mappedBy]; - // when the owning FK is lazy, we need to explicitly select it even without user-provided fields, - // otherwise the driver will exclude it and we won't be able to map children to their parent collections - if (owner && !ret.includes(owner.name) && (ret.length > 0 || owner.lazy)) { - ret.push(owner.name); - } - } - if (ret.length === 0) { - return undefined; - } - return ret; - } - getChildReferences(entities, prop, options, ref) { - const filtered = this.filterCollections(entities, prop.name, options, ref); - if (prop.kind === ReferenceKind.ONE_TO_MANY) { - return filtered.map(e => e[prop.name].owner); - } - if (prop.kind === ReferenceKind.MANY_TO_MANY && prop.owner) { - return filtered.reduce((a, b) => { - a.push(...b[prop.name].getItems()); - return a; - }, []); - } - if (prop.kind === ReferenceKind.MANY_TO_MANY) { - // inverse side - return filtered; - } - // MANY_TO_ONE or ONE_TO_ONE - return this.filterReferences(entities, prop.name, options, ref); - } - filterCollections(entities, field, options, ref) { - if (options.refresh) { - return entities.filter(e => e[field]); - } - return entities.filter(e => Utils.isCollection(e[field]) && !e[field].isInitialized(!ref)); - } - isPropertyLoaded(entity, field) { - if (!entity || field === '*') { - return true; - } - const wrapped = helper(entity); - if (!field.includes('.')) { - return wrapped.__loadedProperties.has(field); - } - const [f, ...r] = field.split('.'); - /* v8 ignore next */ - if (!wrapped.__loadedProperties.has(f) || !wrapped.__meta.properties[f]?.targetMeta) { - return false; - } - if ([ReferenceKind.ONE_TO_MANY, ReferenceKind.MANY_TO_MANY].includes(wrapped.__meta.properties[f].kind)) { - return entity[f].getItems(false).every(item => this.isPropertyLoaded(item, r.join('.'))); - } - return this.isPropertyLoaded(entity[f], r.join('.')); - } - filterReferences(entities, field, options, ref) { - if (ref) { - return []; - } - const children = entities.filter(e => Utils.isEntity(e[field], true)); - if (options.refresh) { - return children.map(e => Reference.unwrapReference(e[field])); - } - if (options.fields) { - return children - .map(e => Reference.unwrapReference(e[field])) - .filter(target => { - const wrapped = helper(target); - const childFields = options.fields - .filter(f => f.startsWith(`${field}.`)) - .map(f => f.substring(field.length + 1)); - return !wrapped.__initialized || !childFields.every(cf => this.isPropertyLoaded(target, cf)); - }); - } - return children.filter(e => !e[field].__helper.__initialized).map(e => Reference.unwrapReference(e[field])); - } - filterByReferences(entities, field, refresh) { - /* v8 ignore next */ - if (refresh) { - return entities; - } - return entities.filter(e => e[field] !== null && !e[field]?.__helper?.__initialized); - } - lookupAllRelationships(entityName) { - const ret = []; - const meta = this.#metadata.find(entityName); - meta.relations.forEach(prop => { - ret.push({ - field: this.getRelationName(meta, prop), - // force select-in strategy when populating all relations as otherwise we could cause infinite loops when self-referencing - strategy: LoadStrategy.SELECT_IN, - // no need to look up populate children recursively as we just pass `all: true` here - all: true, - }); - }); - return ret; - } - getRelationName(meta, prop) { - if (!prop.embedded) { - return prop.name; - } - return `${this.getRelationName(meta, meta.properties[prop.embedded[0]])}.${prop.embedded[1]}`; - } - lookupEagerLoadedRelationships(entityName, populate, strategy, prefix = '', visited = [], exclude) { - const meta = this.#metadata.find(entityName); - if (!meta && !prefix) { - return populate; - } - if (!meta || visited.includes(meta)) { - return []; - } - visited.push(meta); - const ret = prefix === '' ? [...populate] : []; - meta.relations - .filter(prop => { - const field = this.getRelationName(meta, prop); - const prefixed = prefix ? `${prefix}.${field}` : field; - const isExcluded = exclude?.includes(prefixed); - const eager = prop.eager && !populate.some(p => p.field === `${prop.name}:ref`); - const populated = populate.some(p => p.field === prop.name); - const disabled = populate.some(p => p.field === prop.name && p.all === false); - return !disabled && !isExcluded && (eager || populated); - }) - .forEach(prop => { - const field = this.getRelationName(meta, prop); - const prefixed = prefix ? `${prefix}.${field}` : field; - const nestedPopulate = populate - .filter(p => p.field === prop.name) - .flatMap(p => p.children) - .filter(Boolean); - const nested = this.lookupEagerLoadedRelationships( - prop.targetMeta.class, - nestedPopulate, - strategy, - prefixed, - visited.slice(), - exclude, - ); - if (nested.length > 0) { - ret.push(...nested); - } else { - const selfReferencing = - [meta.tableName, ...visited.map(m => m.tableName)].includes(prop.targetMeta.tableName) && prop.eager; - ret.push({ - field: prefixed, - // enforce select-in strategy for self-referencing relations - strategy: selfReferencing ? LoadStrategy.SELECT_IN : (strategy ?? prop.strategy), - }); - } - }); - return ret; - } -} diff --git a/node_modules/@mikro-orm/core/entity/EntityRepository.d.ts b/node_modules/@mikro-orm/core/entity/EntityRepository.d.ts deleted file mode 100644 index a3ecbf2..0000000 --- a/node_modules/@mikro-orm/core/entity/EntityRepository.d.ts +++ /dev/null @@ -1,324 +0,0 @@ -import type { PopulatePath } from '../enums.js'; -import type { CreateOptions, EntityManager, MergeOptions } from '../EntityManager.js'; -import type { AssignOptions } from './EntityAssigner.js'; -import type { - EntityData, - EntityName, - Primary, - Loaded, - FilterQuery, - EntityDictionary, - AutoPath, - RequiredEntityData, - Ref, - EntityType, - EntityDTO, - MergeSelected, - FromEntityType, - IsSubset, - MergeLoaded, - ArrayElement, -} from '../typings.js'; -import type { - CountOptions, - DeleteOptions, - FindAllOptions, - FindByCursorOptions, - FindOneOptions, - FindOneOrFailOptions, - FindOptions, - GetReferenceOptions, - NativeInsertUpdateOptions, - StreamOptions, - UpdateOptions, - UpsertManyOptions, - UpsertOptions, -} from '../drivers/IDatabaseDriver.js'; -import type { EntityLoaderOptions } from './EntityLoader.js'; -import type { Cursor } from '../utils/Cursor.js'; -/** Repository class providing a type-safe API for querying and persisting a specific entity type. */ -export declare class EntityRepository { - protected readonly em: EntityManager; - protected readonly entityName: EntityName; - constructor(em: EntityManager, entityName: EntityName); - /** - * Finds first entity matching your `where` query. - */ - findOne( - where: FilterQuery, - options?: FindOneOptions, - ): Promise | null>; - /** - * Finds first entity matching your `where` query. If nothing is found, it will throw an error. - * You can override the factory for creating this method via `options.failHandler` locally - * or via `Configuration.findOneOrFailHandler` globally. - */ - findOneOrFail( - where: FilterQuery, - options?: FindOneOrFailOptions, - ): Promise>; - /** - * Creates or updates the entity, based on whether it is already present in the database. - * This method performs an `insert on conflict merge` query ensuring the database is in sync, returning a managed - * entity instance. The method accepts either `entityName` together with the entity `data`, or just entity instance. - * - * ```ts - * // insert into "author" ("age", "email") values (33, 'foo@bar.com') on conflict ("email") do update set "age" = 41 - * const author = await em.getRepository(Author).upsert({ email: 'foo@bar.com', age: 33 }); - * ``` - * - * The entity data needs to contain either the primary key, or any other unique property. Let's consider the following example, where `Author.email` is a unique property: - * - * ```ts - * // insert into "author" ("age", "email") values (33, 'foo@bar.com') on conflict ("email") do update set "age" = 41 - * // select "id" from "author" where "email" = 'foo@bar.com' - * const author = await em.getRepository(Author).upsert({ email: 'foo@bar.com', age: 33 }); - * ``` - * - * Depending on the driver support, this will either use a returning query, or a separate select query, to fetch the primary key if it's missing from the `data`. - * - * If the entity is already present in current context, there won't be any queries - instead, the entity data will be assigned and an explicit `flush` will be required for those changes to be persisted. - */ - upsert( - entityOrData?: EntityData | Entity, - options?: UpsertOptions, - ): Promise; - /** - * Creates or updates the entity, based on whether it is already present in the database. - * This method performs an `insert on conflict merge` query ensuring the database is in sync, returning a managed - * entity instance. - * - * ```ts - * // insert into "author" ("age", "email") values (33, 'foo@bar.com') on conflict ("email") do update set "age" = 41 - * const authors = await em.getRepository(Author).upsertMany([{ email: 'foo@bar.com', age: 33 }, ...]); - * ``` - * - * The entity data needs to contain either the primary key, or any other unique property. Let's consider the following example, where `Author.email` is a unique property: - * - * ```ts - * // insert into "author" ("age", "email") values (33, 'foo@bar.com'), (666, 'lol@lol.lol') on conflict ("email") do update set "age" = excluded."age" - * // select "id" from "author" where "email" = 'foo@bar.com' - * const author = await em.getRepository(Author).upsertMany([ - * { email: 'foo@bar.com', age: 33 }, - * { email: 'lol@lol.lol', age: 666 }, - * ]); - * ``` - * - * Depending on the driver support, this will either use a returning query, or a separate select query, to fetch the primary key if it's missing from the `data`. - * - * If the entity is already present in current context, there won't be any queries - instead, the entity data will be assigned and an explicit `flush` will be required for those changes to be persisted. - */ - upsertMany( - entitiesOrData?: EntityData[] | Entity[], - options?: UpsertManyOptions, - ): Promise; - /** - * Finds all entities matching your `where` query. You can pass additional options via the `options` parameter. - */ - find( - where: FilterQuery, - options?: FindOptions, - ): Promise[]>; - /** - * Calls `em.find()` and `em.count()` with the same arguments (where applicable) and returns the results as tuple - * where first element is the array of entities, and the second is the count. - */ - findAndCount( - where: FilterQuery, - options?: FindOptions, - ): Promise<[Loaded[], number]>; - /** - * @inheritDoc EntityManager.findByCursor - */ - findByCursor< - Hint extends string = never, - Fields extends string = '*', - Excludes extends string = never, - IncludeCount extends boolean = true, - >( - options: FindByCursorOptions, - ): Promise>; - /** - * Finds all entities of given type. You can pass additional options via the `options` parameter. - */ - findAll( - options?: FindAllOptions, - ): Promise[]>; - /** - * @inheritDoc EntityManager.stream - */ - stream( - options?: StreamOptions, - ): AsyncIterableIterator>; - /** - * @inheritDoc EntityManager.insert - */ - insert( - data: Entity | RequiredEntityData, - options?: NativeInsertUpdateOptions, - ): Promise>; - /** - * @inheritDoc EntityManager.insert - */ - insertMany( - data: Entity[] | RequiredEntityData[], - options?: NativeInsertUpdateOptions, - ): Promise[]>; - /** - * Fires native update query. Calling this has no side effects on the context (identity map). - */ - nativeUpdate(where: FilterQuery, data: EntityData, options?: UpdateOptions): Promise; - /** - * Fires native delete query. Calling this has no side effects on the context (identity map). - */ - nativeDelete(where: FilterQuery, options?: DeleteOptions): Promise; - /** - * Maps raw database result to an entity and merges it to this EntityManager. - */ - map( - result: EntityDictionary, - options?: { - schema?: string; - }, - ): Entity; - /** - * Gets a reference to the entity identified by the given type and alternate key property without actually loading it. - * The key option specifies which property to use for identity map lookup instead of the primary key. - */ - getReference( - id: Entity[K], - options: Omit & { - key: K; - wrapped: true; - }, - ): Ref; - /** - * Gets a reference to the entity identified by the given type and alternate key property without actually loading it. - * The key option specifies which property to use for identity map lookup instead of the primary key. - */ - getReference( - id: Entity[K], - options: Omit & { - key: K; - wrapped?: false; - }, - ): Entity; - /** - * Gets a reference to the entity identified by the given type and identifier without actually loading it, if the entity is not yet loaded - */ - getReference( - id: Primary, - options: Omit & { - wrapped: true; - }, - ): Ref; - /** - * Gets a reference to the entity identified by the given type and identifier without actually loading it, if the entity is not yet loaded - */ - getReference(id: Primary | Primary[]): Entity; - /** - * Gets a reference to the entity identified by the given type and identifier without actually loading it, if the entity is not yet loaded - */ - getReference( - id: Primary, - options: Omit & { - wrapped: false; - }, - ): Entity; - /** - * Checks whether given property can be populated on the entity. - */ - canPopulate(property: string): boolean; - /** - * Loads specified relations in batch. This will execute one query for each relation, that will populate it on all the specified entities. - */ - populate< - Ent extends Entity | Entity[], - Hint extends string = never, - Naked extends FromEntityType = FromEntityType, - Fields extends string = never, - Excludes extends string = never, - >( - entities: Ent, - populate: AutoPath[] | false, - options?: EntityLoaderOptions, - ): Promise< - Ent extends object[] - ? MergeLoaded, Naked, Hint, Fields, Excludes>[] - : MergeLoaded - >; - /** - * Creates new instance of given entity and populates it with given data. - * The entity constructor will be used unless you provide `{ managed: true }` in the `options` parameter. - * The constructor will be given parameters based on the defined constructor of the entity. If the constructor - * parameter matches a property name, its value will be extracted from `data`. If no matching property exists, - * the whole `data` parameter will be passed. This means we can also define `constructor(data: Partial)` and - * `em.create()` will pass the data into it (unless we have a property named `data` too). - * - * The parameters are strictly checked, you need to provide all required properties. You can use `OptionalProps` - * symbol to omit some properties from this check without making them optional. Alternatively, use `partial: true` - * in the options to disable the strict checks for required properties. This option has no effect on runtime. - * - * The newly created entity will be automatically marked for persistence via `em.persist` unless you disable this - * behavior, either locally via `persist: false` option, or globally via `persistOnCreate` ORM config option. - */ - create< - Convert extends boolean = false, - Data extends RequiredEntityData = RequiredEntityData, - >(data: Data & IsSubset, Data>, options?: CreateOptions): Entity; - /** - * Creates new instance of given entity and populates it with given data. - * The entity constructor will be used unless you provide `{ managed: true }` in the `options` parameter. - * The constructor will be given parameters based on the defined constructor of the entity. If the constructor - * parameter matches a property name, its value will be extracted from `data`. If no matching property exists, - * the whole `data` parameter will be pass. This means we can also define `constructor(data: Partial)` and - * `em.create()` will pass the data into it (unless we have a property named `data` too). - * - * The parameters are strictly checked, you need to provide all required properties. You can use `OptionalProps` - * symbol to omit some properties from this check without making them optional. Alternatively, use `partial: true` - * in the options to disable the strict checks for required properties. This option has no effect on runtime. - * - * The newly created entity will be automatically marked for persistence via `em.persist` unless you disable this - * behavior, either locally via `persist: false` option, or globally via `persistOnCreate` ORM config option. - */ - create = EntityData>( - data: Data & IsSubset, Data>, - options: CreateOptions & { - partial: true; - }, - ): Entity; - /** - * Shortcut for `wrap(entity).assign(data, { em })` - */ - assign< - Ent extends EntityType, - Naked extends FromEntityType = FromEntityType, - Convert extends boolean = false, - Data extends EntityData | Partial> = - | EntityData - | Partial>, - >( - entity: Ent | Partial, - data: Data & IsSubset, Data>, - options?: AssignOptions, - ): MergeSelected; - /** - * Merges given entity to this EntityManager so it becomes managed. You can force refreshing of existing entities - * via second parameter. By default it will return already loaded entities without modifying them. - */ - merge(data: Entity | EntityData, options?: MergeOptions): Entity; - /** - * Returns total number of entities matching your `where` query. - */ - count( - where?: FilterQuery, - options?: CountOptions, - ): Promise; - /** Returns the entity class name associated with this repository. */ - getEntityName(): string; - /** - * Returns the underlying EntityManager instance - */ - getEntityManager(): EntityManager; - protected validateRepositoryType(entities: Entity[] | Entity, method: string): void; -} diff --git a/node_modules/@mikro-orm/core/entity/EntityRepository.js b/node_modules/@mikro-orm/core/entity/EntityRepository.js deleted file mode 100644 index 8dd02c5..0000000 --- a/node_modules/@mikro-orm/core/entity/EntityRepository.js +++ /dev/null @@ -1,218 +0,0 @@ -import { ValidationError } from '../errors.js'; -import { Utils } from '../utils/Utils.js'; -/** Repository class providing a type-safe API for querying and persisting a specific entity type. */ -export class EntityRepository { - em; - entityName; - constructor(em, entityName) { - this.em = em; - this.entityName = entityName; - } - /** - * Finds first entity matching your `where` query. - */ - async findOne(where, options) { - return this.getEntityManager().findOne(this.entityName, where, options); - } - /** - * Finds first entity matching your `where` query. If nothing is found, it will throw an error. - * You can override the factory for creating this method via `options.failHandler` locally - * or via `Configuration.findOneOrFailHandler` globally. - */ - async findOneOrFail(where, options) { - return this.getEntityManager().findOneOrFail(this.entityName, where, options); - } - /** - * Creates or updates the entity, based on whether it is already present in the database. - * This method performs an `insert on conflict merge` query ensuring the database is in sync, returning a managed - * entity instance. The method accepts either `entityName` together with the entity `data`, or just entity instance. - * - * ```ts - * // insert into "author" ("age", "email") values (33, 'foo@bar.com') on conflict ("email") do update set "age" = 41 - * const author = await em.getRepository(Author).upsert({ email: 'foo@bar.com', age: 33 }); - * ``` - * - * The entity data needs to contain either the primary key, or any other unique property. Let's consider the following example, where `Author.email` is a unique property: - * - * ```ts - * // insert into "author" ("age", "email") values (33, 'foo@bar.com') on conflict ("email") do update set "age" = 41 - * // select "id" from "author" where "email" = 'foo@bar.com' - * const author = await em.getRepository(Author).upsert({ email: 'foo@bar.com', age: 33 }); - * ``` - * - * Depending on the driver support, this will either use a returning query, or a separate select query, to fetch the primary key if it's missing from the `data`. - * - * If the entity is already present in current context, there won't be any queries - instead, the entity data will be assigned and an explicit `flush` will be required for those changes to be persisted. - */ - async upsert(entityOrData, options) { - return this.getEntityManager().upsert(this.entityName, entityOrData, options); - } - /** - * Creates or updates the entity, based on whether it is already present in the database. - * This method performs an `insert on conflict merge` query ensuring the database is in sync, returning a managed - * entity instance. - * - * ```ts - * // insert into "author" ("age", "email") values (33, 'foo@bar.com') on conflict ("email") do update set "age" = 41 - * const authors = await em.getRepository(Author).upsertMany([{ email: 'foo@bar.com', age: 33 }, ...]); - * ``` - * - * The entity data needs to contain either the primary key, or any other unique property. Let's consider the following example, where `Author.email` is a unique property: - * - * ```ts - * // insert into "author" ("age", "email") values (33, 'foo@bar.com'), (666, 'lol@lol.lol') on conflict ("email") do update set "age" = excluded."age" - * // select "id" from "author" where "email" = 'foo@bar.com' - * const author = await em.getRepository(Author).upsertMany([ - * { email: 'foo@bar.com', age: 33 }, - * { email: 'lol@lol.lol', age: 666 }, - * ]); - * ``` - * - * Depending on the driver support, this will either use a returning query, or a separate select query, to fetch the primary key if it's missing from the `data`. - * - * If the entity is already present in current context, there won't be any queries - instead, the entity data will be assigned and an explicit `flush` will be required for those changes to be persisted. - */ - async upsertMany(entitiesOrData, options) { - return this.getEntityManager().upsertMany(this.entityName, entitiesOrData, options); - } - /** - * Finds all entities matching your `where` query. You can pass additional options via the `options` parameter. - */ - async find(where, options) { - return this.getEntityManager().find(this.entityName, where, options); - } - /** - * Calls `em.find()` and `em.count()` with the same arguments (where applicable) and returns the results as tuple - * where first element is the array of entities, and the second is the count. - */ - async findAndCount(where, options) { - return this.getEntityManager().findAndCount(this.entityName, where, options); - } - /** - * @inheritDoc EntityManager.findByCursor - */ - async findByCursor(options) { - return this.getEntityManager().findByCursor(this.entityName, options); - } - /** - * Finds all entities of given type. You can pass additional options via the `options` parameter. - */ - async findAll(options) { - return this.getEntityManager().findAll(this.entityName, options); - } - /** - * @inheritDoc EntityManager.stream - */ - async *stream(options) { - yield* this.getEntityManager().stream(this.entityName, options); - } - /** - * @inheritDoc EntityManager.insert - */ - async insert(data, options) { - return this.getEntityManager().insert(this.entityName, data, options); - } - /** - * @inheritDoc EntityManager.insert - */ - async insertMany(data, options) { - return this.getEntityManager().insertMany(this.entityName, data, options); - } - /** - * Fires native update query. Calling this has no side effects on the context (identity map). - */ - async nativeUpdate(where, data, options) { - return this.getEntityManager().nativeUpdate(this.entityName, where, data, options); - } - /** - * Fires native delete query. Calling this has no side effects on the context (identity map). - */ - async nativeDelete(where, options) { - return this.getEntityManager().nativeDelete(this.entityName, where, options); - } - /** - * Maps raw database result to an entity and merges it to this EntityManager. - */ - map(result, options) { - return this.getEntityManager().map(this.entityName, result, options); - } - /** - * Gets a reference to the entity identified by the given type and identifier without actually loading it, if the entity is not yet loaded - */ - getReference(id, options) { - return this.getEntityManager().getReference(this.entityName, id, options); - } - /** - * Checks whether given property can be populated on the entity. - */ - canPopulate(property) { - return this.getEntityManager().canPopulate(this.entityName, property); - } - /** - * Loads specified relations in batch. This will execute one query for each relation, that will populate it on all the specified entities. - */ - async populate(entities, populate, options) { - this.validateRepositoryType(entities, 'populate'); - // @ts-ignore hard to type - return this.getEntityManager().populate(entities, populate, options); - } - /** - * Creates new instance of given entity and populates it with given data. - * The entity constructor will be used unless you provide `{ managed: true }` in the `options` parameter. - * The constructor will be given parameters based on the defined constructor of the entity. If the constructor - * parameter matches a property name, its value will be extracted from `data`. If no matching property exists, - * the whole `data` parameter will be passed. This means we can also define `constructor(data: Partial)` and - * `em.create()` will pass the data into it (unless we have a property named `data` too). - * - * The parameters are strictly checked, you need to provide all required properties. You can use `OptionalProps` - * symbol to omit some properties from this check without making them optional. Alternatively, use `partial: true` - * in the options to disable the strict checks for required properties. This option has no effect on runtime. - * - * The newly created entity will be automatically marked for persistence via `em.persist` unless you disable this - * behavior, either locally via `persist: false` option, or globally via `persistOnCreate` ORM config option. - */ - create(data, options) { - return this.getEntityManager().create(this.entityName, data, options); - } - /** - * Shortcut for `wrap(entity).assign(data, { em })` - */ - assign(entity, data, options) { - this.validateRepositoryType(entity, 'assign'); - return this.getEntityManager().assign(entity, data, options); - } - /** - * Merges given entity to this EntityManager so it becomes managed. You can force refreshing of existing entities - * via second parameter. By default it will return already loaded entities without modifying them. - */ - merge(data, options) { - return this.getEntityManager().merge(this.entityName, data, options); - } - /** - * Returns total number of entities matching your `where` query. - */ - async count(where = {}, options = {}) { - return this.getEntityManager().count(this.entityName, where, options); - } - /** Returns the entity class name associated with this repository. */ - getEntityName() { - return Utils.className(this.entityName); - } - /** - * Returns the underlying EntityManager instance - */ - getEntityManager() { - return this.em; - } - validateRepositoryType(entities, method) { - entities = Utils.asArray(entities); - if (entities.length === 0) { - return; - } - const entityName = entities[0].constructor.name; - const repoType = Utils.className(this.entityName); - if (entityName && repoType !== entityName) { - throw ValidationError.fromWrongRepositoryType(entityName, repoType, method); - } - } -} diff --git a/node_modules/@mikro-orm/core/entity/PolymorphicRef.d.ts b/node_modules/@mikro-orm/core/entity/PolymorphicRef.d.ts deleted file mode 100644 index c95b697..0000000 --- a/node_modules/@mikro-orm/core/entity/PolymorphicRef.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Wrapper class for polymorphic relation reference data. - * Holds the discriminator value (type identifier) and the primary key value(s). - * Used internally to track polymorphic FK values before hydration. - */ -export declare class PolymorphicRef { - readonly discriminator: string; - id: unknown; - constructor(discriminator: string, id: unknown); - /** Returns `[discriminator, ...idValues]` tuple suitable for column-level expansion. */ - toTuple(): unknown[]; -} diff --git a/node_modules/@mikro-orm/core/entity/PolymorphicRef.js b/node_modules/@mikro-orm/core/entity/PolymorphicRef.js deleted file mode 100644 index d28334e..0000000 --- a/node_modules/@mikro-orm/core/entity/PolymorphicRef.js +++ /dev/null @@ -1,18 +0,0 @@ -import { Utils } from '../utils/Utils.js'; -/** - * Wrapper class for polymorphic relation reference data. - * Holds the discriminator value (type identifier) and the primary key value(s). - * Used internally to track polymorphic FK values before hydration. - */ -export class PolymorphicRef { - discriminator; - id; - constructor(discriminator, id) { - this.discriminator = discriminator; - this.id = id; - } - /** Returns `[discriminator, ...idValues]` tuple suitable for column-level expansion. */ - toTuple() { - return [this.discriminator, ...Utils.asArray(this.id)]; - } -} diff --git a/node_modules/@mikro-orm/core/entity/Reference.d.ts b/node_modules/@mikro-orm/core/entity/Reference.d.ts deleted file mode 100644 index 4919625..0000000 --- a/node_modules/@mikro-orm/core/entity/Reference.d.ts +++ /dev/null @@ -1,148 +0,0 @@ -import type { - AddEager, - AddOptional, - Dictionary, - EntityClass, - EntityKey, - EntityProperty, - Loaded, - LoadedReference, - Primary, - Ref, -} from '../typings.js'; -import type { FindOneOptions, FindOneOrFailOptions } from '../drivers/IDatabaseDriver.js'; -/** Wrapper around an entity that provides lazy loading capabilities and identity-preserving reference semantics. */ -export declare class Reference { - private entity; - private property?; - constructor(entity: T); - /** Creates a Reference wrapper for the given entity, preserving identity if one already exists. */ - static create(entity: T | Ref): Ref; - /** Creates a Reference wrapper for an entity identified by its primary key, wrapped in a Ref. */ - static createFromPK( - entityType: EntityClass, - pk: Primary, - options?: { - schema?: string; - }, - ): Ref; - /** Creates an uninitialized entity reference by primary key without wrapping it in a Reference. */ - static createNakedFromPK( - entityType: EntityClass, - pk: Primary, - options?: { - schema?: string; - }, - ): T; - /** - * Checks whether the argument is instance of `Reference` wrapper. - */ - static isReference(data: any): data is Reference; - /** - * Wraps the entity in a `Reference` wrapper if the property is defined as `ref`. - */ - static wrapReference( - entity: T | Reference, - prop: EntityProperty, - ): Reference | T; - /** - * Returns wrapped entity. - */ - static unwrapReference(ref: T | Reference | ScalarReference | Ref): T; - /** - * Ensures the underlying entity is loaded first (without reloading it if it already is loaded). Returns the entity. - * If the entity is not found in the database (e.g. it was deleted in the meantime, or currently active filters disallow loading of it) - * the method returns `null`. Use `loadOrFail()` if you want an error to be thrown in such a case. - */ - load( - options?: LoadReferenceOptions, - ): Promise | null>; - /** - * Ensures the underlying entity is loaded first (without reloading it if it already is loaded). - * Returns the entity or throws an error just like `em.findOneOrFail()` (and respects the same config options). - */ - loadOrFail( - options?: LoadReferenceOrFailOptions, - ): Promise>; - private set; - /** Returns the underlying entity without checking initialization state. */ - unwrap(): T; - /** Returns the underlying entity, throwing an error if the reference is not initialized. */ - getEntity(): T; - /** Returns the value of a property on the underlying entity. Throws if the reference is not initialized. */ - getProperty(prop: K): T[K]; - /** Loads the entity if needed, then returns the value of the specified property. */ - loadProperty( - prop: K, - options?: LoadReferenceOrFailOptions, - ): Promise[K]>; - /** Returns whether the underlying entity has been fully loaded from the database. */ - isInitialized(): boolean; - /** Marks the underlying entity as populated or not for serialization purposes. */ - populated(populated?: boolean): void; - /** Serializes the underlying entity to a plain JSON object. */ - toJSON(...args: any[]): Dictionary; -} -/** Wrapper for lazy scalar properties that provides on-demand loading from the database. */ -export declare class ScalarReference { - #private; - private value?; - private entity?; - constructor(value?: Value | undefined, initialized?: boolean); - /** - * Ensures the underlying entity is loaded first (without reloading it if it already is loaded). - * Returns either the whole entity, or the requested property. - */ - load(options?: Omit, 'populate' | 'fields' | 'exclude'>): Promise; - /** - * Ensures the underlying entity is loaded first (without reloading it if it already is loaded). - * Returns the entity or throws an error just like `em.findOneOrFail()` (and respects the same config options). - */ - loadOrFail(options?: Omit, 'populate' | 'fields' | 'exclude'>): Promise; - /** Sets the scalar value and marks the reference as initialized. */ - set(value: Value): void; - /** Binds this scalar reference to a specific entity and property for lazy loading support. */ - bind(entity: Entity, property: EntityKey): void; - /** Returns the current scalar value, or undefined if not yet loaded. */ - unwrap(): Value | undefined; - /** Returns whether the scalar value has been loaded. */ - isInitialized(): boolean; -} -/** Options for `Reference.load()` to control how the referenced entity is loaded. */ -export interface LoadReferenceOptions< - T extends object, - P extends string = never, - F extends string = '*', - E extends string = never, -> extends FindOneOptions { - /** Whether to use the dataloader for batching reference loads. */ - dataloader?: boolean; -} -/** Options for `Reference.loadOrFail()` which throws when the entity is not found. */ -export interface LoadReferenceOrFailOptions< - T extends object, - P extends string = never, - F extends string = '*', - E extends string = never, -> extends FindOneOrFailOptions { - /** Whether to use the dataloader for batching reference loads. */ - dataloader?: boolean; -} -/** - * shortcut for `wrap(entity).toReference()` - */ -export declare function ref | undefined | null, T extends I & {}>( - entity: I, -): (Ref & LoadedReference>>) | AddOptional; -/** - * shortcut for `Reference.createFromPK(entityType, pk)` - */ -export declare function ref = Primary>( - entityType: EntityClass, - pk: I, -): Ref | AddOptional; -/** - * shortcut for `Reference.createNakedFromPK(entityType, pk)` - */ -export declare function rel>(entityType: EntityClass, pk: T | PK): T; -export { Reference as Ref }; diff --git a/node_modules/@mikro-orm/core/entity/Reference.js b/node_modules/@mikro-orm/core/entity/Reference.js deleted file mode 100644 index fda0b23..0000000 --- a/node_modules/@mikro-orm/core/entity/Reference.js +++ /dev/null @@ -1,312 +0,0 @@ -import { DataloaderType } from '../enums.js'; -import { helper, wrap } from './wrap.js'; -import { Utils } from '../utils/Utils.js'; -import { QueryHelper } from '../utils/QueryHelper.js'; -import { NotFoundError } from '../errors.js'; -import { inspect } from '../logging/inspect.js'; -/** Wrapper around an entity that provides lazy loading capabilities and identity-preserving reference semantics. */ -export class Reference { - entity; - property; - constructor(entity) { - this.entity = entity; - this.set(entity); - const meta = helper(this.entity).__meta; - meta.primaryKeys.forEach(primaryKey => { - Object.defineProperty(this, primaryKey, { - get() { - return this.entity[primaryKey]; - }, - }); - }); - if (meta.serializedPrimaryKey && meta.primaryKeys[0] !== meta.serializedPrimaryKey) { - Object.defineProperty(this, meta.serializedPrimaryKey, { - get() { - return helper(this.entity).getSerializedPrimaryKey(); - }, - }); - } - } - /** Creates a Reference wrapper for the given entity, preserving identity if one already exists. */ - static create(entity) { - const unwrapped = Reference.unwrapReference(entity); - const ref = helper(entity).toReference(); - if (unwrapped !== ref.unwrap()) { - ref.set(unwrapped); - } - return ref; - } - /** Creates a Reference wrapper for an entity identified by its primary key, wrapped in a Ref. */ - static createFromPK(entityType, pk, options) { - const ref = this.createNakedFromPK(entityType, pk, options); - return helper(ref)?.toReference() ?? ref; - } - /** Creates an uninitialized entity reference by primary key without wrapping it in a Reference. */ - static createNakedFromPK(entityType, pk, options) { - const factory = entityType.prototype.__factory; - if (!factory) { - // this can happen only if `ref()` is used as a property initializer, and the value is important only for the - // inference of defaults, so it's fine to return it directly without wrapping with `Reference` class - return pk; - } - const entity = factory.createReference(entityType, pk, { - merge: false, - convertCustomTypes: false, - ...options, - }); - const wrapped = helper(entity); - wrapped.__meta.primaryKeys.forEach(key => wrapped.__loadedProperties.add(key)); - wrapped.__originalEntityData = factory.getComparator().prepareEntity(entity); - return entity; - } - /** - * Checks whether the argument is instance of `Reference` wrapper. - */ - static isReference(data) { - return data && !!data.__reference; - } - /** - * Wraps the entity in a `Reference` wrapper if the property is defined as `ref`. - */ - static wrapReference(entity, prop) { - if (entity && prop.ref && !Reference.isReference(entity)) { - const ref = Reference.create(entity); - ref.property = prop; - return ref; - } - return entity; - } - /** - * Returns wrapped entity. - */ - static unwrapReference(ref) { - return Reference.isReference(ref) ? ref.unwrap() : ref; - } - /** - * Ensures the underlying entity is loaded first (without reloading it if it already is loaded). Returns the entity. - * If the entity is not found in the database (e.g. it was deleted in the meantime, or currently active filters disallow loading of it) - * the method returns `null`. Use `loadOrFail()` if you want an error to be thrown in such a case. - */ - async load(options = {}) { - const wrapped = helper(this.entity); - if (!wrapped.__em) { - return this.entity; - } - options = { ...options, filters: QueryHelper.mergePropertyFilters(this.property?.filters, options.filters) }; - if (this.isInitialized() && !options.refresh && options.populate) { - await wrapped.__em.populate(this.entity, options.populate, options); - } - if (!this.isInitialized() || options.refresh) { - if ( - options.dataloader ?? - [DataloaderType.ALL, DataloaderType.REFERENCE].includes(wrapped.__em.config.getDataloaderType()) - ) { - const dataLoader = await wrapped.__em.getDataLoader('ref'); - return dataLoader.load([this, options]); - } - return wrapped.init(options); - } - return this.entity; - } - /** - * Ensures the underlying entity is loaded first (without reloading it if it already is loaded). - * Returns the entity or throws an error just like `em.findOneOrFail()` (and respects the same config options). - */ - async loadOrFail(options = {}) { - const ret = await this.load(options); - if (!ret) { - const wrapped = helper(this.entity); - options.failHandler ??= wrapped.__em.config.get('findOneOrFailHandler'); - const entityName = this.entity.constructor.name; - const where = wrapped.getPrimaryKey(); - throw options.failHandler(entityName, where); - } - return ret; - } - set(entity) { - this.entity = Reference.unwrapReference(entity); - delete helper(this.entity).__reference; - } - /** Returns the underlying entity without checking initialization state. */ - unwrap() { - return this.entity; - } - /** Returns the underlying entity, throwing an error if the reference is not initialized. */ - getEntity() { - if (!this.isInitialized()) { - throw new Error( - `Reference<${helper(this.entity).__meta.name}> ${helper(this.entity).getPrimaryKey()} not initialized`, - ); - } - return this.entity; - } - /** Returns the value of a property on the underlying entity. Throws if the reference is not initialized. */ - getProperty(prop) { - return this.getEntity()[prop]; - } - /** Loads the entity if needed, then returns the value of the specified property. */ - async loadProperty(prop, options) { - await this.loadOrFail(options); - return this.getEntity()[prop]; - } - /** Returns whether the underlying entity has been fully loaded from the database. */ - isInitialized() { - return helper(this.entity).__initialized; - } - /** Marks the underlying entity as populated or not for serialization purposes. */ - populated(populated) { - helper(this.entity).populated(populated); - } - /** Serializes the underlying entity to a plain JSON object. */ - toJSON(...args) { - return wrap(this.entity).toJSON(...args); - } - /** @ignore */ - [Symbol.for('nodejs.util.inspect.custom')](depth = 2) { - const object = { ...this }; - const hidden = ['meta', 'property']; - hidden.forEach(k => delete object[k]); - const ret = inspect(object, { depth }); - const wrapped = helper(this.entity); - const meta = wrapped.__meta; - /* v8 ignore next */ - const pk = wrapped.hasPrimaryKey() ? '<' + wrapped.getSerializedPrimaryKey() + '>' : ''; - const name = `Ref<${meta.className}${pk}>`; - return ret === '[Object]' ? `[${name}]` : name + ' ' + ret; - } -} -/** Wrapper for lazy scalar properties that provides on-demand loading from the database. */ -export class ScalarReference { - value; - entity; - #property; - #initialized; - constructor(value, initialized = value != null) { - this.value = value; - this.#initialized = initialized; - } - /** - * Ensures the underlying entity is loaded first (without reloading it if it already is loaded). - * Returns either the whole entity, or the requested property. - */ - async load(options) { - const opts = typeof options === 'object' ? options : { prop: options }; - if (!this.#initialized || opts.refresh) { - if (this.entity == null || this.#property == null) { - throw new Error('Cannot load scalar reference that is not bound to an entity property.'); - } - await helper(this.entity).populate([this.#property], opts); - } - return this.value; - } - /** - * Ensures the underlying entity is loaded first (without reloading it if it already is loaded). - * Returns the entity or throws an error just like `em.findOneOrFail()` (and respects the same config options). - */ - async loadOrFail(options = {}) { - const ret = await this.load(options); - if (ret == null) { - const wrapped = helper(this.entity); - options.failHandler ??= wrapped.__em.config.get('findOneOrFailHandler'); - const entityName = this.entity.constructor.name; - throw NotFoundError.failedToLoadProperty(entityName, this.#property, wrapped.getPrimaryKey()); - } - return ret; - } - /** Sets the scalar value and marks the reference as initialized. */ - set(value) { - this.value = value; - this.#initialized = true; - } - /** Binds this scalar reference to a specific entity and property for lazy loading support. */ - bind(entity, property) { - this.entity = entity; - this.#property = property; - Object.defineProperty(this, 'entity', { enumerable: false, value: entity }); - } - /** Returns the current scalar value, or undefined if not yet loaded. */ - unwrap() { - return this.value; - } - /** Returns whether the scalar value has been loaded. */ - isInitialized() { - return this.#initialized; - } - /** @ignore */ - /* v8 ignore next */ - [Symbol.for('nodejs.util.inspect.custom')]() { - return this.#initialized ? `Ref<${inspect(this.value)}>` : `Ref`; - } -} -Object.defineProperties(Reference.prototype, { - __reference: { value: true, enumerable: false }, - __meta: { - get() { - return this.entity.__meta; - }, - }, - __platform: { - get() { - return this.entity.__platform; - }, - }, - __helper: { - get() { - return this.entity.__helper; - }, - }, - $: { - get() { - return this.entity; - }, - }, - get: { - get() { - return () => this.entity; - }, - }, -}); -Object.defineProperties(ScalarReference.prototype, { - __scalarReference: { value: true, enumerable: false }, - $: { - get() { - return this.value; - }, - }, - get: { - get() { - return () => this.value; - }, - }, -}); -/** - * shortcut for `wrap(entity).toReference()` - */ -export function ref(entityOrType, pk) { - if (entityOrType == null) { - return entityOrType; - } - if (Utils.isEntity(entityOrType, true)) { - return helper(entityOrType).toReference(); - } - if (Utils.isEntity(pk, true)) { - return helper(pk).toReference(); - } - if (arguments.length === 1) { - return new ScalarReference(entityOrType, true); - } - if (pk == null) { - return pk; - } - return Reference.createFromPK(entityOrType, pk); -} -/** - * shortcut for `Reference.createNakedFromPK(entityType, pk)` - */ -export function rel(entityType, pk) { - if (pk == null || Utils.isEntity(pk)) { - return pk; - } - return Reference.createNakedFromPK(entityType, pk); -} -export { Reference as Ref }; diff --git a/node_modules/@mikro-orm/core/entity/WrappedEntity.d.ts b/node_modules/@mikro-orm/core/entity/WrappedEntity.d.ts deleted file mode 100644 index 6a2138e..0000000 --- a/node_modules/@mikro-orm/core/entity/WrappedEntity.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -import type { PopulatePath } from '../enums.js'; -import type { EntityManager } from '../EntityManager.js'; -import type { - Dictionary, - EntityData, - EntityDictionary, - EntityMetadata, - IHydrator, - EntityKey, - PopulateOptions, - Primary, - AutoPath, - Ref, - AddEager, - LoadedReference, - EntityDTO, - Loaded, - SerializeDTO, - FromEntityType, - IsSubset, - MergeSelected, -} from '../typings.js'; -import { Reference } from './Reference.js'; -import { type AssignOptions } from './EntityAssigner.js'; -import type { EntityLoaderOptions } from './EntityLoader.js'; -import type { EntityIdentifier } from './EntityIdentifier.js'; -import type { SerializationContext } from '../serialization/SerializationContext.js'; -import { type SerializeOptions } from '../serialization/EntitySerializer.js'; -import type { FindOneOptions, LoadHint } from '../drivers/IDatabaseDriver.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { Configuration } from '../utils/Configuration.js'; -/** @internal Wrapper attached to every managed entity, holding ORM state such as initialization flags, identity map references, and change tracking snapshots. */ -export declare class WrappedEntity { - __initialized: boolean; - __populated?: boolean; - __managed?: boolean; - __onLoadFired?: boolean; - __schema?: string; - __em?: EntityManager; - __loadedProperties: Set; - __data: Dictionary; - __processing: boolean; - __serializationContext: { - root?: SerializationContext; - populate?: PopulateOptions[]; - fields?: Set; - exclude?: readonly string[]; - }; - /** stores last known primary key, as its current state might be broken due to propagation/orphan removal, but we need to know the PK to be able t remove the entity */ - __pk?: Primary; - /** holds the reference wrapper instance (if created), so we can maintain the identity on reference wrappers too */ - __reference?: Reference; - /** holds last entity data snapshot, so we can compute changes when persisting managed entities */ - __originalEntityData?: EntityData; - /** holds wrapped primary key, so we can compute change set without eager commit */ - __identifier?: EntityIdentifier; - private readonly entity; - private readonly hydrator; - private readonly pkGetter?; - private readonly pkSerializer?; - private readonly pkGetterConverted?; - constructor( - entity: Entity, - hydrator: IHydrator, - pkGetter?: (e: Entity) => Primary, - pkSerializer?: (e: Entity) => string, - pkGetterConverted?: (e: Entity) => Primary, - ); - /** Returns whether the entity has been fully loaded from the database. */ - isInitialized(): boolean; - /** Returns whether the entity is managed by an EntityManager (tracked in the identity map). */ - isManaged(): boolean; - /** Marks the entity as populated or not for serialization purposes. */ - populated(populated?: boolean | undefined): void; - /** Sets the serialization context with populate hints, field selections, and exclusions. */ - setSerializationContext( - options: LoadHint, - ): void; - /** Returns a Reference wrapper for this entity, creating one if it does not already exist. */ - toReference(): Ref & LoadedReference>>; - /** Converts the entity to a plain object representation, optionally excluding specified fields. */ - toObject = never>(ignoreFields?: Ignored[]): Omit, Ignored>; - /** Serializes the entity with control over which relations and fields to include or exclude. */ - serialize( - options?: SerializeOptions, - ): SerializeDTO; - /** Converts the entity to a plain object, including all properties regardless of serialization rules. */ - toPOJO(): EntityDTO; - /** Serializes the entity using its `toJSON` method (supports `JSON.stringify`). */ - toJSON(...args: any[]): EntityDictionary; - /** Assigns the given data to this entity, updating its properties and relations. */ - assign< - Naked extends FromEntityType = FromEntityType, - Convert extends boolean = false, - Data extends EntityData | Partial> = - | EntityData - | Partial>, - >( - data: Data & IsSubset, Data>, - options?: AssignOptions, - ): MergeSelected; - /** Initializes (refreshes) the entity by reloading it from the database. Returns null if not found. */ - init( - options?: FindOneOptions, - ): Promise | null>; - /** Loads the specified relations on this entity. */ - populate( - populate: AutoPath[] | false, - options?: EntityLoaderOptions, - ): Promise>; - /** Returns whether this entity has a primary key value set. */ - hasPrimaryKey(): boolean; - /** Returns the primary key value, optionally converting custom types to their database representation. */ - getPrimaryKey(convertCustomTypes?: boolean): Primary | null; - /** Returns all primary key values as an array. Used internally for composite key handling. */ - getPrimaryKeys(convertCustomTypes?: boolean): Primary[] | null; - /** Returns the database schema this entity belongs to. */ - getSchema(): string | undefined; - /** Sets the database schema for this entity. */ - setSchema(schema?: string): void; - /** Sets the primary key value on the entity. */ - setPrimaryKey(id: Primary | null): void; - /** Returns the primary key serialized as a string suitable for identity map lookups. */ - getSerializedPrimaryKey(): string; - get __meta(): EntityMetadata; - get __platform(): Platform; - get __config(): Configuration; - get __primaryKeys(): Primary[]; -} diff --git a/node_modules/@mikro-orm/core/entity/WrappedEntity.js b/node_modules/@mikro-orm/core/entity/WrappedEntity.js deleted file mode 100644 index e7f4542..0000000 --- a/node_modules/@mikro-orm/core/entity/WrappedEntity.js +++ /dev/null @@ -1,180 +0,0 @@ -import { Reference } from './Reference.js'; -import { EntityTransformer } from '../serialization/EntityTransformer.js'; -import { EntityAssigner } from './EntityAssigner.js'; -import { Utils } from '../utils/Utils.js'; -import { ValidationError } from '../errors.js'; -import { helper } from './wrap.js'; -import { EntitySerializer } from '../serialization/EntitySerializer.js'; -import { expandDotPaths } from './utils.js'; -/** @internal Wrapper attached to every managed entity, holding ORM state such as initialization flags, identity map references, and change tracking snapshots. */ -export class WrappedEntity { - constructor(entity, hydrator, pkGetter, pkSerializer, pkGetterConverted) { - this.entity = entity; - this.hydrator = hydrator; - this.pkGetter = pkGetter; - this.pkSerializer = pkSerializer; - this.pkGetterConverted = pkGetterConverted; - this.__initialized = true; - this.__serializationContext = {}; - this.__loadedProperties = new Set(); - this.__data = {}; - this.__processing = false; - } - /** Returns whether the entity has been fully loaded from the database. */ - isInitialized() { - return this.__initialized; - } - /** Returns whether the entity is managed by an EntityManager (tracked in the identity map). */ - isManaged() { - return !!this.__managed; - } - /** Marks the entity as populated or not for serialization purposes. */ - populated(populated = true) { - this.__populated = populated; - } - /** Sets the serialization context with populate hints, field selections, and exclusions. */ - setSerializationContext(options) { - const exclude = options.exclude ?? []; - const context = this.__serializationContext; - const populate = expandDotPaths(this.__meta, options.populate); - context.populate = context.populate ? context.populate.concat(populate) : populate; - context.exclude = context.exclude ? context.exclude.concat(exclude) : exclude; - if (context.fields && options.fields) { - options.fields.forEach(f => context.fields.add(f)); - } else if (options.fields) { - context.fields = new Set(options.fields); - } else { - context.fields = new Set(['*']); - } - } - /** Returns a Reference wrapper for this entity, creating one if it does not already exist. */ - toReference() { - this.__reference ??= new Reference(this.entity); - return this.__reference; - } - /** Converts the entity to a plain object representation, optionally excluding specified fields. */ - toObject(ignoreFields) { - return EntityTransformer.toObject(this.entity, ignoreFields); - } - /** Serializes the entity with control over which relations and fields to include or exclude. */ - serialize(options) { - return EntitySerializer.serialize(this.entity, options); - } - /** Converts the entity to a plain object, including all properties regardless of serialization rules. */ - toPOJO() { - return EntityTransformer.toObject(this.entity, [], true); - } - /** Serializes the entity using its `toJSON` method (supports `JSON.stringify`). */ - toJSON(...args) { - // toJSON methods is added to the prototype during discovery to support automatic serialization via JSON.stringify() - return this.entity.toJSON(...args); - } - /** Assigns the given data to this entity, updating its properties and relations. */ - assign(data, options) { - if ('assign' in this.entity) { - return this.entity.assign(data, options); - } - return EntityAssigner.assign(this.entity, data, options); - } - /** Initializes (refreshes) the entity by reloading it from the database. Returns null if not found. */ - async init(options) { - if (!this.__em) { - throw ValidationError.entityNotManaged(this.entity); - } - return this.__em.findOne(this.entity.constructor, this.entity, { - ...options, - refresh: true, - schema: this.__schema, - }); - } - /** Loads the specified relations on this entity. */ - async populate(populate, options = {}) { - if (!this.__em) { - throw ValidationError.entityNotManaged(this.entity); - } - // @ts-ignore hard to type - await this.__em.populate(this.entity, populate, options); - return this.entity; - } - /** Returns whether this entity has a primary key value set. */ - hasPrimaryKey() { - const pk = this.getPrimaryKey(); - return pk != null; - } - /** Returns the primary key value, optionally converting custom types to their database representation. */ - getPrimaryKey(convertCustomTypes = false) { - const prop = this.__meta.getPrimaryProps()[0]; - if (!prop) { - return null; - } - if (this.__pk != null && this.__meta.compositePK) { - return Utils.getCompositeKeyValue( - this.__pk, - this.__meta, - convertCustomTypes ? 'convertToDatabaseValue' : false, - this.__platform, - ); - } - if (convertCustomTypes && this.__pk != null && prop.customType) { - return prop.customType.convertToDatabaseValue(this.__pk, this.__platform); - } - if (convertCustomTypes) { - return this.__pk ?? this.pkGetterConverted(this.entity); - } - return this.__pk ?? this.pkGetter(this.entity); - } - /** Returns all primary key values as an array. Used internally for composite key handling. */ - // TODO: currently used only in `Driver.syncCollection` — candidate for removal - getPrimaryKeys(convertCustomTypes = false) { - const pk = this.getPrimaryKey(convertCustomTypes); - if (pk == null) { - return null; - } - if (this.__meta.compositePK) { - return this.__meta.primaryKeys.reduce((ret, pk) => { - const child = this.entity[pk]; - if (Utils.isEntity(child, true)) { - const childPk = helper(child).getPrimaryKeys(convertCustomTypes); - ret.push(...childPk); - } else { - ret.push(child); - } - return ret; - }, []); - } - return [pk]; - } - /** Returns the database schema this entity belongs to. */ - getSchema() { - return this.__schema; - } - /** Sets the database schema for this entity. */ - setSchema(schema) { - this.__schema = schema; - } - /** Sets the primary key value on the entity. */ - setPrimaryKey(id) { - this.entity[this.__meta.primaryKeys[0]] = id; - this.__pk = id; - } - /** Returns the primary key serialized as a string suitable for identity map lookups. */ - getSerializedPrimaryKey() { - return this.pkSerializer(this.entity); - } - get __meta() { - return this.entity.__meta; - } - get __platform() { - return this.entity.__platform; - } - get __config() { - return this.__em?.config ?? this.entity.__config; - } - get __primaryKeys() { - return Utils.getPrimaryKeyValues(this.entity, this.__meta); - } - /** @ignore */ - [Symbol.for('nodejs.util.inspect.custom')]() { - return `[WrappedEntity<${this.__meta.className}>]`; - } -} diff --git a/node_modules/@mikro-orm/core/entity/defineEntity.d.ts b/node_modules/@mikro-orm/core/entity/defineEntity.d.ts deleted file mode 100644 index 5d1ebbf..0000000 --- a/node_modules/@mikro-orm/core/entity/defineEntity.d.ts +++ /dev/null @@ -1,1372 +0,0 @@ -import type { EntityManager } from '../EntityManager.js'; -import type { - ColumnType, - PropertyOptions, - ReferenceOptions, - EnumOptions, - EmbeddedOptions, - ManyToOneOptions, - OneToManyOptions, - OneToOneOptions, - ManyToManyOptions, -} from '../metadata/types.js'; -import type { - AnyString, - GeneratedColumnCallback, - Constructor, - CheckCallback, - FilterQuery, - EntityName, - Dictionary, - EntityMetadata, - PrimaryKeyProp, - EntityRepositoryType, - Hidden, - Opt, - Primary, - EntityClass, - EntitySchemaWithMeta, - InferEntity, - MaybeReturnType, - Ref, - IndexCallback, - FormulaCallback, - EntityCtor, - IsNever, - IWrappedEntity, - DefineConfig, - Config, -} from '../typings.js'; -import type { Raw } from '../utils/RawQueryFragment.js'; -import type { ScalarReference } from './Reference.js'; -import type { SerializeOptions } from '../serialization/EntitySerializer.js'; -import type { - Cascade, - DeferMode, - EmbeddedPrefixMode, - LoadStrategy, - QueryOrderKeysFlat, - QueryOrderMap, -} from '../enums.js'; -import type { EventSubscriber } from '../events/EventSubscriber.js'; -import type { IType, Type } from '../types/Type.js'; -import { types } from '../types/index.js'; -import type { Collection } from './Collection.js'; -import type { FilterOptions } from '../drivers/IDatabaseDriver.js'; -/** Union of all option keys supported across all property definition types (scalar, enum, embedded, relations). */ -export type UniversalPropertyKeys = - | keyof PropertyOptions - | keyof EnumOptions - | keyof EmbeddedOptions - | keyof ReferenceOptions - | keyof ManyToOneOptions - | keyof OneToManyOptions - | keyof OneToOneOptions - | keyof ManyToManyOptions; -type BuilderExtraKeys = '~options' | '~type' | '$type'; -type ExcludeKeys = 'entity' | 'items'; -type BuilderKeys = Exclude | BuilderExtraKeys; -type IncludeKeysForProperty = Exclude, ExcludeKeys> | BuilderExtraKeys; -type IncludeKeysForEnumOptions = Exclude, ExcludeKeys> | BuilderExtraKeys; -type IncludeKeysForOneToManyOptions = Exclude, ExcludeKeys> | BuilderExtraKeys; -type HasKind = Options extends { - kind: infer X extends string; -} - ? X extends K - ? true - : false - : false; -/** Lightweight chain result type for property builders - reduces type instantiation cost by avoiding full class resolution. */ -export interface PropertyChain { - '~type'?: { - value: Value; - }; - '~options': Options; - $type(): PropertyChain; - $type(): PropertyChain, Options>; - nullable(): PropertyChain< - Value, - Omit & { - nullable: true; - } - >; - ref(): PropertyChain< - Value, - Omit & { - ref: true; - } - >; - primary(): PropertyChain< - Value, - Omit & { - primary: true; - } - >; - hidden(): PropertyChain< - Value, - Omit & { - hidden: true; - } - >; - autoincrement(): PropertyChain< - Value, - Omit & { - autoincrement: true; - } - >; - autoincrement(autoincrement: false): PropertyChain< - Value, - Omit & { - autoincrement: false; - } - >; - persist(): PropertyChain< - Value, - Omit & { - persist: true; - } - >; - persist(persist: false): PropertyChain< - Value, - Omit & { - persist: false; - } - >; - version(): PropertyChain< - Value, - Omit & { - version: true; - } - >; - lazy(): PropertyChain; - name( - name: T, - ): PropertyChain< - Value, - Omit & { - fieldName: T; - } - >; - fieldName( - fieldName: T, - ): PropertyChain< - Value, - Omit & { - fieldName: T; - } - >; - onCreate(onCreate: (entity: any, em: EntityManager) => Value): PropertyChain< - Value, - Options & { - onCreate: (...args: any[]) => any; - } - >; - default(defaultValue: string | string[] | number | number[] | boolean | null | Date | Raw): PropertyChain< - Value, - Omit & { - default: any; - } - >; - defaultRaw(defaultRaw: string): PropertyChain< - Value, - Options & { - defaultRaw: string; - } - >; - formula(formula: string | FormulaCallback): PropertyChain< - Value, - Omit & { - formula: any; - } - >; - onUpdate(onUpdate: (entity: any, em: EntityManager) => Value): PropertyChain; - fieldNames(...fieldNames: string[]): PropertyChain; - type(type: PropertyValueType): PropertyChain; - runtimeType(runtimeType: string): PropertyChain; - columnType(columnType: ColumnType | AnyString): PropertyChain; - columnTypes(...columnTypes: (ColumnType | AnyString)[]): PropertyChain; - length(length: number): PropertyChain; - precision(precision: number): PropertyChain; - scale(scale: number): PropertyChain; - returning(returning?: boolean): PropertyChain; - unsigned(unsigned?: boolean): PropertyChain; - hydrate(hydrate?: boolean): PropertyChain; - concurrencyCheck(concurrencyCheck?: boolean): PropertyChain; - generated(generated: string | GeneratedColumnCallback): PropertyChain; - check(check: string | CheckCallback): PropertyChain; - setter(setter?: boolean): PropertyChain; - getter(getter?: boolean): PropertyChain; - getterName(getterName: string): PropertyChain; - serializedPrimaryKey(serializedPrimaryKey?: boolean): PropertyChain; - serializer(serializer: (value: Value, options?: SerializeOptions) => any): PropertyChain; - serializedName(serializedName: string): PropertyChain; - groups(...groups: string[]): PropertyChain; - customOrder(...customOrder: string[] | number[] | boolean[]): PropertyChain; - extra(extra: string): PropertyChain; - ignoreSchemaChanges(...ignoreSchemaChanges: ('type' | 'extra' | 'default')[]): PropertyChain; - index(index?: boolean | string): PropertyChain; - unique(unique?: boolean | string): PropertyChain; - comment(comment: string): PropertyChain; - accessor(accessor?: string | boolean): PropertyChain; - eager( - eager?: boolean, - ): HasKind extends true ? PropertyChain : never; - cascade( - ...cascade: Cascade[] - ): HasKind extends true ? PropertyChain : never; - strategy( - strategy: LoadStrategy | `${LoadStrategy}`, - ): HasKind extends true ? PropertyChain : never; - filters( - filters: FilterOptions, - ): HasKind extends true ? PropertyChain : never; - mappedBy( - mappedBy: (keyof Value & string) | ((e: Value) => any), - ): HasKind extends true ? PropertyChain : never; - inversedBy( - inversedBy: (keyof Value & string) | ((e: Value) => any), - ): HasKind extends true ? PropertyChain : never; - owner(): HasKind extends true - ? PropertyChain< - Value, - Omit & { - owner: true; - } - > - : never; - mapToPk(): HasKind extends true - ? PropertyChain< - Value, - Omit & { - mapToPk: true; - } - > - : never; - orphanRemoval( - orphanRemoval?: boolean, - ): HasKind extends true ? PropertyChain : never; - discriminator( - discriminator: string, - ): HasKind extends true ? PropertyChain : never; - discriminatorMap( - discriminatorMap: Dictionary, - ): HasKind extends true ? PropertyChain : never; - pivotTable(pivotTable: string): HasKind extends true ? PropertyChain : never; - pivotEntity( - pivotEntity: () => EntityName, - ): HasKind extends true ? PropertyChain : never; - fixedOrder(fixedOrder?: boolean): HasKind extends true ? PropertyChain : never; - fixedOrderColumn( - fixedOrderColumn: string, - ): HasKind extends true ? PropertyChain : never; - array(): HasKind extends true - ? PropertyChain< - Value, - Omit & { - array: true; - } - > - : never; - prefix(prefix: string | boolean): HasKind extends true ? PropertyChain : never; - prefixMode( - prefixMode: EmbeddedPrefixMode, - ): HasKind extends true ? PropertyChain : never; - object(object?: boolean): HasKind extends true ? PropertyChain : never; - nativeEnumName(nativeEnumName: string): HasKind extends true ? PropertyChain : never; - orderBy( - ...orderBy: QueryOrderMap[] - ): HasKind extends true ? PropertyChain : never; - where( - ...where: FilterQuery[] - ): HasKind extends true ? PropertyChain : never; - joinColumn( - joinColumn: string, - ): HasKind extends true ? PropertyChain : never; - joinColumns( - ...joinColumns: string[] - ): HasKind extends true ? PropertyChain : never; - inverseJoinColumn( - inverseJoinColumn: string, - ): HasKind extends true ? PropertyChain : never; - inverseJoinColumns( - ...inverseJoinColumns: string[] - ): HasKind extends true ? PropertyChain : never; - referenceColumnName( - referenceColumnName: string, - ): HasKind extends true ? PropertyChain : never; - referencedColumnNames( - ...referencedColumnNames: string[] - ): HasKind extends true ? PropertyChain : never; - ownColumns( - ...ownColumns: string[] - ): HasKind extends true ? PropertyChain : never; - targetKey( - targetKey: keyof Value & string, - ): HasKind extends true ? PropertyChain : never; - deleteRule( - deleteRule: 'cascade' | 'no action' | 'set null' | 'set default' | AnyString, - ): HasKind extends true ? PropertyChain : never; - updateRule( - updateRule: 'cascade' | 'no action' | 'set null' | 'set default' | AnyString, - ): HasKind extends true ? PropertyChain : never; - deferMode( - deferMode: DeferMode | `${DeferMode}`, - ): HasKind extends true ? PropertyChain : never; - createForeignKeyConstraint( - createForeignKeyConstraint?: boolean, - ): HasKind extends true ? PropertyChain : never; - foreignKeyName( - foreignKeyName: string, - ): HasKind extends true ? PropertyChain : never; -} -/** @internal */ -export declare class UniversalPropertyOptionsBuilder implements Record< - Exclude, - any -> { - '~options': Options; - '~type'?: { - value: Value; - }; - constructor(options: any); - protected assignOptions(options: EmptyOptions): any; - /** - * Set the TypeScript type of the property. - */ - $type(): UniversalPropertyOptionsBuilder; - /** - * Set the TypeScript type for custom types that map to objects. - * This method provides type safety for custom types by specifying the runtime type, - * raw database value type, and optional serialized type. - * - * @template Runtime - The runtime type that the property will have in JavaScript - * @template Raw - The raw value type as stored in the database - * @template Serialized - The type when serialized (defaults to Raw) - * @returns PropertyOptionsBuilder with IType wrapper for type safety - */ - $type(): UniversalPropertyOptionsBuilder< - IType, - Options, - IncludeKeys - >; - /** - * Alias for `fieldName`. - */ - name( - name: T, - ): Pick< - UniversalPropertyOptionsBuilder< - Value, - Omit & { - fieldName: T; - }, - IncludeKeys - >, - IncludeKeys - >; - /** - * Specify database column name for this property. - * - * @see https://mikro-orm.io/docs/naming-strategy - */ - fieldName( - fieldName: T, - ): Pick< - UniversalPropertyOptionsBuilder< - Value, - Omit & { - fieldName: T; - }, - IncludeKeys - >, - IncludeKeys - >; - /** - * Specify database column names for this property. - * Same as `fieldName` but for composite FKs. - * - * @see https://mikro-orm.io/docs/naming-strategy - */ - fieldNames(...fieldNames: string[]): Pick, IncludeKeys>; - /** - * Specify an exact database column type for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. This option is only for simple properties represented by a single column. (SQL only) - */ - columnType( - columnType: ColumnType | AnyString, - ): Pick, IncludeKeys>; - /** - * Specify an exact database column type for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. This option is suitable for composite keys, where one property is represented by multiple columns. (SQL only) - */ - columnTypes( - ...columnTypes: (ColumnType | AnyString)[] - ): Pick, IncludeKeys>; - /** - * Explicitly specify the runtime type. - * - * @see https://mikro-orm.io/docs/metadata-providers - * @see https://mikro-orm.io/docs/custom-types - */ - type( - type: TType, - ): Pick, IncludeKeys>; - /** - * Runtime type of the property. This is the JS type that your property is mapped to, e.g. `string` or `number`, and is normally inferred automatically via `reflect-metadata`. - * In some cases, the inference won't work, and you might need to specify the `runtimeType` explicitly - the most common one is when you use a union type with null like `foo: number | null`. - */ - runtimeType(runtimeType: string): Pick, IncludeKeys>; - /** - * Set length of database column, used for datetime/timestamp/varchar column types for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. (SQL only) - */ - length(length: number): Pick, IncludeKeys>; - /** - * Set precision of database column to represent the number of significant digits. (SQL only) - */ - precision(precision: number): Pick, IncludeKeys>; - /** - * Set scale of database column to represents the number of digits after the decimal point. (SQL only) - */ - scale(scale: number): Pick, IncludeKeys>; - /** - * Explicitly specify the auto increment of the primary key. - */ - autoincrement(): Pick< - UniversalPropertyOptionsBuilder< - Value, - Omit & { - autoincrement: true; - }, - IncludeKeys - >, - IncludeKeys - >; - autoincrement(autoincrement: false): Pick< - UniversalPropertyOptionsBuilder< - Value, - Omit & { - autoincrement: false; - }, - IncludeKeys - >, - IncludeKeys - >; - /** - * Add the property to the `returning` statement. - */ - returning(returning?: boolean): Pick, IncludeKeys>; - /** - * Automatically set the property value when entity gets created, executed during flush operation. - */ - onCreate(onCreate: (entity: any, em: EntityManager) => Value): Pick< - UniversalPropertyOptionsBuilder< - Value, - Options & { - onCreate: (...args: any[]) => any; - }, - IncludeKeys - >, - IncludeKeys - >; - /** - * Automatically update the property value every time entity gets updated, executed during flush operation. - */ - onUpdate( - onUpdate: (entity: any, em: EntityManager) => Value, - ): Pick, IncludeKeys>; - /** - * Specify default column value for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. - * This is a runtime value, assignable to the entity property. (SQL only) - */ - default( - defaultValue: T, - ): Pick< - UniversalPropertyOptionsBuilder< - Value, - Omit & { - default: T; - }, - IncludeKeys - >, - IncludeKeys - >; - /** - * Specify SQL functions for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. (SQL only) - * Since v4 you should use defaultRaw for SQL functions. e.g. now() - */ - defaultRaw(defaultRaw: string): Pick< - UniversalPropertyOptionsBuilder< - Value, - Options & { - defaultRaw: string; - }, - IncludeKeys - >, - IncludeKeys - >; - /** - * Allow controlling `filters` option. This will be overridden with `em.fork` or `FindOptions` if provided. - */ - filters(filters: FilterOptions): Pick, IncludeKeys>; - /** - * Set to map some SQL snippet for the entity. - * - * @see https://mikro-orm.io/docs/defining-entities#formulas Formulas - */ - formula>( - formula: T, - ): Pick< - UniversalPropertyOptionsBuilder< - Value, - Omit & { - formula: T; - }, - IncludeKeys - >, - IncludeKeys - >; - /** - * For generated columns. This will be appended to the column type after the `generated always` clause. - */ - generated( - generated: string | GeneratedColumnCallback, - ): Pick, IncludeKeys>; - /** - * Set column as nullable for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. - */ - nullable(): Pick< - UniversalPropertyOptionsBuilder< - Value, - Omit & { - nullable: true; - }, - IncludeKeys - >, - IncludeKeys - >; - /** - * Set column as unsigned for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. (SQL only) - */ - unsigned(unsigned?: boolean): Pick, IncludeKeys>; - /** - * Set false to define {@link https://mikro-orm.io/docs/serializing#shadow-properties Shadow Property}. - */ - persist(): Pick< - UniversalPropertyOptionsBuilder< - Value, - Omit & { - persist: true; - }, - IncludeKeys - >, - IncludeKeys - >; - persist(persist: false): Pick< - UniversalPropertyOptionsBuilder< - Value, - Omit & { - persist: false; - }, - IncludeKeys - >, - IncludeKeys - >; - /** - * Set false to disable hydration of this property. Useful for persisted getters. - */ - hydrate(hydrate?: boolean): Pick, IncludeKeys>; - /** - * Enable `ScalarReference` wrapper for lazy values. Use this in combination with `lazy: true` to have a type-safe accessor object in place of the value. - */ - ref(): UniversalPropertyOptionsBuilder< - Value, - Omit & { - ref: true; - }, - IncludeKeys - >; - /** - * Set to true to omit the property when {@link https://mikro-orm.io/docs/serializing Serializing}. - */ - hidden(): Pick< - UniversalPropertyOptionsBuilder< - Value, - Omit & { - hidden: true; - }, - IncludeKeys - >, - IncludeKeys - >; - /** - * Set to true to enable {@link https://mikro-orm.io/docs/transactions#optimistic-locking Optimistic Locking} via version field. (SQL only) - */ - version(): Pick< - UniversalPropertyOptionsBuilder< - Value, - Omit & { - version: true; - }, - IncludeKeys - >, - IncludeKeys - >; - /** - * Set to true to enable {@link https://mikro-orm.io/docs/transactions#optimistic-locking Optimistic Locking} via concurrency fields. - */ - concurrencyCheck( - concurrencyCheck?: boolean, - ): Pick, IncludeKeys>; - /** - * Explicitly specify index on a property. - */ - index(index?: boolean | string): Pick, IncludeKeys>; - /** - * Set column as unique for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. (SQL only) - */ - unique(unique?: boolean | string): Pick, IncludeKeys>; - /** - * Specify column with check constraints. (Postgres driver only) - * - * @see https://mikro-orm.io/docs/defining-entities#check-constraints - */ - check( - check: string | CheckCallback, - ): Pick, IncludeKeys>; - /** - * Set to omit the property from the select clause for lazy loading. - * - * @see https://mikro-orm.io/docs/defining-entities#lazy-scalar-properties - */ - lazy(): Pick, IncludeKeys>; - /** - * Set true to define entity's unique primary key identifier. - * - * @see https://mikro-orm.io/docs/decorators#primarykey - */ - primary(): Pick< - UniversalPropertyOptionsBuilder< - Value, - Omit & { - primary: true; - }, - IncludeKeys - >, - IncludeKeys - >; - /** - * Set true to define the properties as setter. (virtual) - * - * @example - * ``` - * @Property({ setter: true }) - * set address(value: string) { - * this._address = value.toLocaleLowerCase(); - * } - * ``` - */ - setter(setter?: boolean): Pick, IncludeKeys>; - /** - * Set true to define the properties as getter. (virtual) - * - * @example - * ``` - * @Property({ getter: true }) - * get fullName() { - * return this.firstName + this.lastName; - * } - * ``` - */ - getter(getter?: boolean): Pick, IncludeKeys>; - /** - * When defining a property over a method (not a getter, a regular function), you can use this option to point - * to the method name. - * - * @example - * ``` - * @Property({ getter: true }) - * getFullName() { - * return this.firstName + this.lastName; - * } - * ``` - */ - getterName(getterName: string): Pick, IncludeKeys>; - /** - * Set to define serialized primary key for MongoDB. (virtual) - * Alias for `@SerializedPrimaryKey()` decorator. - * - * @see https://mikro-orm.io/docs/decorators#serializedprimarykey - */ - serializedPrimaryKey( - serializedPrimaryKey?: boolean, - ): Pick, IncludeKeys>; - /** - * Set to use serialize property. Allow to specify a callback that will be used when serializing a property. - * - * @see https://mikro-orm.io/docs/serializing#property-serializers - */ - serializer( - serializer: (value: Value, options?: SerializeOptions) => any, - ): Pick, IncludeKeys>; - /** - * Specify name of key for the serialized value. - */ - serializedName( - serializedName: string, - ): Pick, IncludeKeys>; - /** - * Specify serialization groups for `serialize()` calls. If a property does not specify any group, it will be included, - * otherwise only properties with a matching group are included. - */ - groups(...groups: string[]): Pick, IncludeKeys>; - /** - * Specify a custom order based on the values. (SQL only) - */ - customOrder( - ...customOrder: string[] | number[] | boolean[] - ): Pick, IncludeKeys>; - /** - * Specify comment of column for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. (SQL only) - */ - comment(comment: string): Pick, IncludeKeys>; - /** mysql only */ - extra(extra: string): Pick, IncludeKeys>; - /** - * Set to avoid a perpetual diff from the {@link https://mikro-orm.io/docs/schema-generator Schema Generator} when columns are generated. - * - * @see https://mikro-orm.io/docs/defining-entities#sql-generated-columns - */ - ignoreSchemaChanges( - ...ignoreSchemaChanges: ('type' | 'extra' | 'default')[] - ): Pick, IncludeKeys>; - array(): Pick< - UniversalPropertyOptionsBuilder< - Value, - Omit & { - array: true; - }, - IncludeKeys - >, - IncludeKeys - >; - /** for postgres, by default it uses text column with check constraint */ - nativeEnumName( - nativeEnumName: string, - ): Pick, IncludeKeys>; - prefix(prefix: string | boolean): Pick, IncludeKeys>; - prefixMode( - prefixMode: EmbeddedPrefixMode, - ): Pick, IncludeKeys>; - object(object?: boolean): Pick, IncludeKeys>; - /** Set what actions on owning entity should be cascaded to the relationship. Defaults to [Cascade.PERSIST, Cascade.MERGE] (see {@doclink cascading}). */ - cascade(...cascade: Cascade[]): Pick, IncludeKeys>; - /** Always load the relationship. Discouraged for use with to-many relations for performance reasons. */ - eager(eager?: boolean): Pick, IncludeKeys>; - /** Override the default loading strategy for this property. This option has precedence over the global `loadStrategy`, but can be overridden by `FindOptions.strategy`. */ - strategy( - strategy: LoadStrategy | `${LoadStrategy}`, - ): Pick, IncludeKeys>; - /** Set this side as owning. Owning side is where the foreign key is defined. This option is not required if you use `inversedBy` or `mappedBy` to distinguish owning and inverse side. */ - owner(): Pick< - UniversalPropertyOptionsBuilder< - Value, - Omit & { - owner: true; - }, - IncludeKeys - >, - IncludeKeys - >; - /** For polymorphic relations. Specifies the property name that stores the entity type discriminator. Defaults to the property name. */ - discriminator(discriminator: string): Pick, IncludeKeys>; - /** For polymorphic relations. Custom mapping of discriminator values to entity class names. */ - discriminatorMap( - discriminatorMap: Dictionary, - ): Pick, IncludeKeys>; - /** Point to the inverse side property name. */ - inversedBy( - inversedBy: keyof Value | ((e: Value) => any), - ): Pick, IncludeKeys>; - /** Point to the owning side property name. */ - mappedBy( - mappedBy: keyof Value | ((e: Value) => any), - ): Pick, IncludeKeys>; - /** Condition for {@doclink collections#declarative-partial-loading | Declarative partial loading}. */ - where( - ...where: FilterQuery[] - ): Pick, IncludeKeys>; - /** Set default ordering. */ - orderBy( - ...orderBy: QueryOrderMap[] - ): Pick, IncludeKeys>; - /** Force stable insertion order of items in the collection (see {@doclink collections | Collections}). */ - fixedOrder(fixedOrder?: boolean): Pick, IncludeKeys>; - /** Override default order column name (`id`) for fixed ordering. */ - fixedOrderColumn( - fixedOrderColumn: string, - ): Pick, IncludeKeys>; - /** Override default name for pivot table (see {@doclink naming-strategy | Naming Strategy}). */ - pivotTable(pivotTable: string): Pick, IncludeKeys>; - /** Set pivot entity for this relation (see {@doclink collections#custom-pivot-table-entity | Custom pivot table entity}). */ - pivotEntity( - pivotEntity: () => EntityName, - ): Pick, IncludeKeys>; - /** Override the default database column name on the owning side (see {@doclink naming-strategy | Naming Strategy}). This option is only for simple properties represented by a single column. */ - joinColumn(joinColumn: string): Pick, IncludeKeys>; - /** Override the default database column name on the owning side (see {@doclink naming-strategy | Naming Strategy}). This option is suitable for composite keys, where one property is represented by multiple columns. */ - joinColumns( - ...joinColumns: string[] - ): Pick, IncludeKeys>; - /** Override the default database column name on the inverse side (see {@doclink naming-strategy | Naming Strategy}). This option is only for simple properties represented by a single column. */ - inverseJoinColumn( - inverseJoinColumn: string, - ): Pick, IncludeKeys>; - /** Override the default database column name on the inverse side (see {@doclink naming-strategy | Naming Strategy}). This option is suitable for composite keys, where one property is represented by multiple columns. */ - inverseJoinColumns( - ...inverseJoinColumns: string[] - ): Pick, IncludeKeys>; - /** Override the default database column name on the target entity (see {@doclink naming-strategy | Naming Strategy}). This option is only for simple properties represented by a single column. */ - referenceColumnName( - referenceColumnName: string, - ): Pick, IncludeKeys>; - /** Override the default database column name on the target entity (see {@doclink naming-strategy | Naming Strategy}). This option is suitable for composite keys, where one property is represented by multiple columns. */ - referencedColumnNames( - ...referencedColumnNames: string[] - ): Pick, IncludeKeys>; - /** Specify the property name on the target entity that this FK references instead of the primary key. */ - targetKey(targetKey: keyof Value): Pick, IncludeKeys>; - /** What to do when the target entity gets deleted. */ - deleteRule( - deleteRule: 'cascade' | 'no action' | 'set null' | 'set default' | AnyString, - ): Pick, IncludeKeys>; - /** What to do when the reference to the target entity gets updated. */ - updateRule( - updateRule: 'cascade' | 'no action' | 'set null' | 'set default' | AnyString, - ): Pick, IncludeKeys>; - /** Map this relation to the primary key value instead of an entity. */ - mapToPk(): Pick< - UniversalPropertyOptionsBuilder< - Value, - Omit & { - mapToPk: true; - }, - IncludeKeys - >, - IncludeKeys - >; - /** Set the constraint type. Immediate constraints are checked for each statement, while deferred ones are only checked at the end of the transaction. Only for postgres unique constraints. */ - deferMode( - deferMode: DeferMode | `${DeferMode}`, - ): Pick, IncludeKeys>; - /** When a part of a composite column is shared in other properties, use this option to specify what columns are considered as owned by this property. This is useful when your composite property is nullable, but parts of it are not. */ - ownColumns(...ownColumns: string[]): Pick, IncludeKeys>; - /** Enable/disable foreign key constraint creation on this relation */ - createForeignKeyConstraint( - createForeignKeyConstraint?: boolean, - ): Pick, IncludeKeys>; - /** Set a custom foreign key constraint name, overriding NamingStrategy.indexName(). */ - foreignKeyName( - foreignKeyName: string, - ): Pick, IncludeKeys>; - /** Remove the entity when it gets disconnected from the relationship (see {@doclink cascading | Cascading}). */ - orphanRemoval( - orphanRemoval?: boolean, - ): Pick, IncludeKeys>; - accessor( - accessor?: string | boolean, - ): Pick, IncludeKeys>; -} -/** Empty options object used as the initial state for property builders. */ -export interface EmptyOptions extends Partial> {} -/** @internal */ -export declare class OneToManyOptionsBuilderOnlyMappedBy extends UniversalPropertyOptionsBuilder< - Value, - EmptyOptions & { - kind: '1:m'; - }, - IncludeKeysForOneToManyOptions -> { - /** Point to the owning side property name. */ - mappedBy(mappedBy: keyof Value | ((e: Value) => any)): Pick< - UniversalPropertyOptionsBuilder< - Value, - EmptyOptions & { - kind: '1:m'; - }, - IncludeKeysForOneToManyOptions - >, - IncludeKeysForOneToManyOptions - >; -} -type EntityTarget = - | { - '~entity': any; - } - | EntityClass; -declare const propertyBuilders: PropertyBuilders; -type PropertyBuildersOverrideKeys = 'bigint' | 'array' | 'decimal' | 'json' | 'datetime' | 'time' | 'enum'; -/** Map of factory functions for creating type-safe property builders (scalars, enums, embeddables, and relations). */ -export type PropertyBuilders = { - [K in Exclude]: () => UniversalPropertyOptionsBuilder< - InferPropertyValueType<(typeof types)[K]>, - EmptyOptions, - IncludeKeysForProperty - >; -} & { - bigint: ( - mode?: Mode, - ) => UniversalPropertyOptionsBuilder< - InferPropertyValueType>, - EmptyOptions, - IncludeKeysForProperty - >; - array: ( - toJsValue?: (i: string) => T, - toDbValue?: (i: T) => string, - ) => UniversalPropertyOptionsBuilder< - InferPropertyValueType>, - EmptyOptions, - IncludeKeysForProperty - >; - decimal: ( - mode?: Mode, - ) => UniversalPropertyOptionsBuilder< - InferPropertyValueType>, - EmptyOptions, - IncludeKeysForProperty - >; - json: () => UniversalPropertyOptionsBuilder; - formula: ( - formula: string | FormulaCallback, - ) => UniversalPropertyOptionsBuilder; - datetime: ( - length?: number, - ) => UniversalPropertyOptionsBuilder< - InferPropertyValueType, - EmptyOptions, - IncludeKeysForProperty - >; - time: ( - length?: number, - ) => UniversalPropertyOptionsBuilder, EmptyOptions, IncludeKeysForProperty>; - type: ( - type: T, - ) => UniversalPropertyOptionsBuilder, EmptyOptions, IncludeKeysForProperty>; - enum: Dictionary)>( - items?: T, - ) => UniversalPropertyOptionsBuilder< - T extends () => Dictionary ? ValueOf> : T extends (infer Value)[] ? Value : T, - EmptyOptions, - IncludeKeysForEnumOptions - >; - embedded: ( - target: Target, - ) => PropertyChain< - InferEntity, - EmptyOptions & { - kind: 'embedded'; - } - >; - manyToMany: ( - target: Target, - ) => PropertyChain< - InferEntity, - EmptyOptions & { - kind: 'm:n'; - } - >; - manyToOne: ( - target: Target, - ) => PropertyChain< - InferEntity, - EmptyOptions & { - kind: 'm:1'; - } - >; - oneToMany: ( - target: Target, - ) => PropertyChain< - InferEntity, - EmptyOptions & { - kind: '1:m'; - } - >; - oneToOne: ( - target: Target, - ) => PropertyChain< - InferEntity, - EmptyOptions & { - kind: '1:1'; - } - >; -}; -/** Own keys + base entity keys (when TBase is not `never`). Guards against `keyof never = string | number | symbol`. */ -type AllKeys = keyof TProperties | (IsNever extends true ? never : keyof TBase); -/** Metadata descriptor for `defineEntity()`, combining entity options with property definitions. */ -export interface EntityMetadataWithProperties< - TName extends string, - TTableName extends string, - TProperties extends Record, - TPK extends (keyof TProperties)[] | undefined = undefined, - TBase = never, - TRepository = never, - TForceObject extends boolean = false, -> extends Omit< - Partial>>, - | 'properties' - | 'extends' - | 'primaryKeys' - | 'hooks' - | 'discriminatorColumn' - | 'versionProperty' - | 'concurrencyCheckKeys' - | 'serializedPrimaryKey' - | 'indexes' - | 'uniques' - | 'repository' - | 'orderBy' -> { - name: TName; - tableName?: TTableName; - extends?: - | { - '~entity': TBase; - } - | EntityCtor; - properties: TProperties | ((properties: PropertyBuilders) => TProperties); - primaryKeys?: TPK & InferPrimaryKey[]; - hooks?: DefineEntityHooks; - repository?: () => TRepository; - forceObject?: TForceObject; - inheritance?: 'tpt'; - orderBy?: - | { - [K in Extract, string>]?: QueryOrderKeysFlat; - } - | { - [K in Extract, string>]?: QueryOrderKeysFlat; - }[]; - discriminatorColumn?: string; - versionProperty?: AllKeys; - concurrencyCheckKeys?: Set>; - serializedPrimaryKey?: AllKeys; - indexes?: { - properties?: keyof TProperties | (keyof TProperties)[]; - name?: string; - type?: string; - options?: Dictionary; - expression?: string | IndexCallback>; - }[]; - uniques?: { - properties?: keyof TProperties | (keyof TProperties)[]; - name?: string; - options?: Dictionary; - expression?: string | IndexCallback>; - deferMode?: DeferMode | `${DeferMode}`; - }[]; -} -/** Defines an entity schema using property builders, with full type inference from the property definitions. */ -export declare function defineEntity< - const TName extends string, - const TTableName extends string, - const TProperties extends Record, - const TPK extends (keyof TProperties)[] | undefined = undefined, - const TBase = never, - const TRepository = never, - const TForceObject extends boolean = false, ->( - meta: EntityMetadataWithProperties, -): EntitySchemaWithMeta< - TName, - TTableName, - InferEntityFromProperties, - TBase, - TProperties ->; -/** Defines an entity schema for an existing class, combining the class with property builders. */ -export declare function defineEntity< - const TEntity = any, - const TProperties extends Record = Record, - const TClassName extends string = string, - const TTableName extends string = string, - const TBase = never, - const TClass extends EntityCtor = EntityCtor, ->( - meta: Omit>, 'properties' | 'extends' | 'className' | 'tableName' | 'hooks'> & { - class: TClass; - className?: TClassName; - tableName?: TTableName; - extends?: TBase; - properties: TProperties | ((properties: PropertyBuilders) => TProperties); - hooks?: DefineEntityHooks; - }, -): EntitySchemaWithMeta; -export declare namespace defineEntity { - var properties: PropertyBuilders; -} -/** Shorthand alias for `defineEntity.properties` - the property builders for use in `defineEntity()`. */ -export { propertyBuilders as p }; -type EntityHookValue> = (keyof T | NonNullable[K]>)[]; -/** Lifecycle hook definitions for entities created via `defineEntity()`. */ -export interface DefineEntityHooks { - onInit?: EntityHookValue; - onLoad?: EntityHookValue; - beforeCreate?: EntityHookValue; - afterCreate?: EntityHookValue; - beforeUpdate?: EntityHookValue; - afterUpdate?: EntityHookValue; - beforeUpsert?: EntityHookValue; - afterUpsert?: EntityHookValue; - beforeDelete?: EntityHookValue; - afterDelete?: EntityHookValue; -} -type PropertyValueType = PropertyOptions['type']; -type InferPropertyValueType = T extends string - ? InferTypeByString - : T extends NumberConstructor - ? number - : T extends StringConstructor - ? string - : T extends BooleanConstructor - ? boolean - : T extends DateConstructor - ? Date - : T extends ArrayConstructor - ? string[] - : T extends Constructor - ? TType extends Type - ? NonNullable - : TType - : T extends Type - ? NonNullable - : any; -type InferTypeByString = T extends keyof typeof types - ? InferJSType<(typeof types)[T]> - : InferColumnType; -type InferJSType = T extends typeof Type ? NonNullable : never; -type InferColumnType = T extends - | 'int' - | 'int4' - | 'integer' - | 'bigint' - | 'int8' - | 'int2' - | 'tinyint' - | 'smallint' - | 'mediumint' - ? number - : T extends 'double' | 'double precision' | 'real' | 'float8' | 'decimal' | 'numeric' | 'float' | 'float4' - ? number - : T extends - | 'datetime' - | 'time' - | 'time with time zone' - | 'timestamp' - | 'timestamp with time zone' - | 'timetz' - | 'timestamptz' - | 'date' - | 'interval' - ? Date - : T extends - | 'ObjectId' - | 'objectId' - | 'character varying' - | 'varchar' - | 'char' - | 'character' - | 'uuid' - | 'text' - | 'tinytext' - | 'mediumtext' - | 'longtext' - | 'enum' - ? string - : T extends 'boolean' | 'bool' | 'bit' - ? boolean - : T extends 'blob' | 'tinyblob' | 'mediumblob' | 'longblob' | 'bytea' - ? Buffer - : T extends 'point' | 'line' | 'lseg' | 'box' | 'circle' | 'path' | 'polygon' | 'geometry' - ? number[] - : T extends 'tsvector' | 'tsquery' - ? string[] - : T extends 'json' | 'jsonb' - ? any - : any; -type BaseEntityMethodKeys = 'toObject' | 'toPOJO' | 'serialize' | 'assign' | 'populate' | 'init' | 'toReference'; -/** Infers the entity type from a `defineEntity()` properties map, resolving builders, base classes, and primary keys. */ -export type InferEntityFromProperties< - Properties extends Record, - PK extends (keyof Properties)[] | undefined = undefined, - Base = never, - Repository = never, - ForceObject extends boolean = false, -> = (IsNever extends true - ? {} - : Base extends { - toObject(...args: any[]): any; - } - ? Pick< - IWrappedEntity< - { - -readonly [K in keyof Properties]: InferBuilderValue>; - } & { - [PrimaryKeyProp]?: InferCombinedPrimaryKey; - } & (IsNever extends true - ? {} - : { - [EntityRepositoryType]?: Repository extends Constructor ? R : Repository; - }) & - Omit - >, - BaseEntityMethodKeys - > - : {}) & { - -readonly [K in keyof Properties]: InferBuilderValue>; -} & { - [PrimaryKeyProp]?: InferCombinedPrimaryKey; -} & (IsNever extends true - ? {} - : { - [EntityRepositoryType]?: Repository extends Constructor ? R : Repository; - }) & - (IsNever extends true ? {} : Omit) & - (ForceObject extends true - ? { - [Config]?: DefineConfig<{ - forceObject: true; - }>; - } - : {}); -type InferCombinedPrimaryKey, PK, Base> = PK extends undefined - ? CombinePrimaryKeys, ExtractBasePrimaryKey> - : PK; -type ExtractBasePrimaryKey = Base extends { - [PrimaryKeyProp]?: infer BasePK; -} - ? BasePK - : never; -type CombinePrimaryKeys = [ChildPK] extends [never] - ? BasePK - : [BasePK] extends [never] - ? IsUnion extends true - ? ChildPK[] - : ChildPK - : ChildPK | BasePK; -/** Extracts the primary key property names from a properties map by finding builders with `primary: true`. */ -export type InferPrimaryKey> = { - [K in keyof Properties]: MaybeReturnType extends { - '~options': { - primary: true; - }; - } - ? K - : never; -}[keyof Properties]; -type InferBuilderValue = Builder extends { - '~type'?: { - value: infer Value; - }; - '~options'?: infer Options; -} - ? MaybeHidden< - MaybeOpt< - MaybeScalarRef< - MaybeNullable, Options>, Options>, Options>, - Options - >, - Options - >, - Options - > - : never; -type MaybeArray = Options extends { - array: true; -} - ? Value[] - : Value; -type MaybeMapToPk = Options extends { - mapToPk: true; -} - ? Primary - : Value; -type MaybeNullable = Options extends { - nullable: true; -} - ? Value | null | undefined - : Value; -type MaybeRelationRef = Options extends { - mapToPk: true; -} - ? Value - : Options extends { - ref: true; - kind: '1:1'; - } - ? Value extends object - ? Ref - : never - : Options extends { - ref: true; - kind: 'm:1'; - } - ? Value extends object - ? Ref - : never - : Options extends { - kind: '1:m'; - } - ? Value extends object - ? Collection - : never - : Options extends { - kind: 'm:n'; - } - ? Value extends object - ? Collection - : never - : Value; -type MaybeScalarRef = Options extends { - kind: '1:1' | 'm:1' | '1:m' | 'm:n'; -} - ? Value - : Options extends { - ref: true; - } - ? ScalarReference - : Value; -type MaybeOpt = Options extends { - mapToPk: true; -} - ? Value extends Opt - ? OriginalValue - : Value - : Options extends - | { - autoincrement: true; - } - | { - onCreate: Function; - } - | { - default: string | string[] | number | number[] | boolean | null | Date | Raw; - } - | { - defaultRaw: string; - } - | { - persist: false; - } - | { - version: true; - } - | { - formula: string | ((...args: any[]) => any); - } - ? Opt> | Extract - : Value; -type MaybeHidden = Options extends { - hidden: true; -} - ? Hidden> | Extract - : Value; -type ValueOf = T[keyof T]; -type IsUnion = T extends U ? ([U] extends [T] ? false : true) : false; diff --git a/node_modules/@mikro-orm/core/entity/defineEntity.js b/node_modules/@mikro-orm/core/entity/defineEntity.js deleted file mode 100644 index f48d78e..0000000 --- a/node_modules/@mikro-orm/core/entity/defineEntity.js +++ /dev/null @@ -1,547 +0,0 @@ -import { types } from '../types/index.js'; -import { EntitySchema } from '../metadata/EntitySchema.js'; -// Parameter-level sync assertion lives in tests/defineEntity.test.ts to avoid -// instantiating the full builder class in production builds (~680 instantiations). -/** @internal */ -export class UniversalPropertyOptionsBuilder { - '~options'; - '~type'; - constructor(options) { - this['~options'] = options; - } - assignOptions(options) { - return new UniversalPropertyOptionsBuilder({ ...this['~options'], ...options }); - } - $type() { - return this.assignOptions({}); - } - /** - * Alias for `fieldName`. - */ - name(name) { - return this.assignOptions({ name }); - } - /** - * Specify database column name for this property. - * - * @see https://mikro-orm.io/docs/naming-strategy - */ - fieldName(fieldName) { - return this.assignOptions({ fieldName }); - } - /** - * Specify database column names for this property. - * Same as `fieldName` but for composite FKs. - * - * @see https://mikro-orm.io/docs/naming-strategy - */ - fieldNames(...fieldNames) { - return this.assignOptions({ fieldNames }); - } - /** - * Specify an exact database column type for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. This option is only for simple properties represented by a single column. (SQL only) - */ - columnType(columnType) { - return this.assignOptions({ columnType }); - } - /** - * Specify an exact database column type for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. This option is suitable for composite keys, where one property is represented by multiple columns. (SQL only) - */ - columnTypes(...columnTypes) { - return this.assignOptions({ columnTypes }); - } - /** - * Explicitly specify the runtime type. - * - * @see https://mikro-orm.io/docs/metadata-providers - * @see https://mikro-orm.io/docs/custom-types - */ - type(type) { - return this.assignOptions({ type }); - } - /** - * Runtime type of the property. This is the JS type that your property is mapped to, e.g. `string` or `number`, and is normally inferred automatically via `reflect-metadata`. - * In some cases, the inference won't work, and you might need to specify the `runtimeType` explicitly - the most common one is when you use a union type with null like `foo: number | null`. - */ - runtimeType(runtimeType) { - return this.assignOptions({ runtimeType }); - } - /** - * Set length of database column, used for datetime/timestamp/varchar column types for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. (SQL only) - */ - length(length) { - return this.assignOptions({ length }); - } - /** - * Set precision of database column to represent the number of significant digits. (SQL only) - */ - precision(precision) { - return this.assignOptions({ precision }); - } - /** - * Set scale of database column to represents the number of digits after the decimal point. (SQL only) - */ - scale(scale) { - return this.assignOptions({ scale }); - } - autoincrement(autoincrement = true) { - return this.assignOptions({ autoincrement }); - } - /** - * Add the property to the `returning` statement. - */ - returning(returning = true) { - return this.assignOptions({ returning }); - } - /** - * Automatically set the property value when entity gets created, executed during flush operation. - */ - onCreate(onCreate) { - return this.assignOptions({ onCreate }); - } - /** - * Automatically update the property value every time entity gets updated, executed during flush operation. - */ - onUpdate(onUpdate) { - return this.assignOptions({ onUpdate }); - } - /** - * Specify default column value for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. - * This is a runtime value, assignable to the entity property. (SQL only) - */ - default(defaultValue) { - return this.assignOptions({ default: defaultValue }); - } - /** - * Specify SQL functions for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. (SQL only) - * Since v4 you should use defaultRaw for SQL functions. e.g. now() - */ - defaultRaw(defaultRaw) { - return this.assignOptions({ defaultRaw }); - } - /** - * Allow controlling `filters` option. This will be overridden with `em.fork` or `FindOptions` if provided. - */ - filters(filters) { - return this.assignOptions({ filters }); - } - /** - * Set to map some SQL snippet for the entity. - * - * @see https://mikro-orm.io/docs/defining-entities#formulas Formulas - */ - formula(formula) { - return this.assignOptions({ formula }); - } - /** - * For generated columns. This will be appended to the column type after the `generated always` clause. - */ - generated(generated) { - return this.assignOptions({ generated }); - } - /** - * Set column as nullable for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. - */ - nullable() { - return this.assignOptions({ nullable: true }); - } - /** - * Set column as unsigned for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. (SQL only) - */ - unsigned(unsigned = true) { - return this.assignOptions({ unsigned }); - } - persist(persist = true) { - return this.assignOptions({ persist }); - } - /** - * Set false to disable hydration of this property. Useful for persisted getters. - */ - hydrate(hydrate = true) { - return this.assignOptions({ hydrate }); - } - /** - * Enable `ScalarReference` wrapper for lazy values. Use this in combination with `lazy: true` to have a type-safe accessor object in place of the value. - */ - ref() { - return this.assignOptions({ ref: true }); - } - /** - * Set to true to omit the property when {@link https://mikro-orm.io/docs/serializing Serializing}. - */ - hidden() { - return this.assignOptions({ hidden: true }); - } - /** - * Set to true to enable {@link https://mikro-orm.io/docs/transactions#optimistic-locking Optimistic Locking} via version field. (SQL only) - */ - version() { - return this.assignOptions({ version: true }); - } - /** - * Set to true to enable {@link https://mikro-orm.io/docs/transactions#optimistic-locking Optimistic Locking} via concurrency fields. - */ - concurrencyCheck(concurrencyCheck = true) { - return this.assignOptions({ concurrencyCheck }); - } - /** - * Explicitly specify index on a property. - */ - index(index = true) { - return this.assignOptions({ index }); - } - /** - * Set column as unique for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. (SQL only) - */ - unique(unique = true) { - return this.assignOptions({ unique }); - } - /** - * Specify column with check constraints. (Postgres driver only) - * - * @see https://mikro-orm.io/docs/defining-entities#check-constraints - */ - check(check) { - return this.assignOptions({ check }); - } - /** - * Set to omit the property from the select clause for lazy loading. - * - * @see https://mikro-orm.io/docs/defining-entities#lazy-scalar-properties - */ - lazy() { - return this.assignOptions({ lazy: true }); - } - /** - * Set true to define entity's unique primary key identifier. - * - * @see https://mikro-orm.io/docs/decorators#primarykey - */ - primary() { - return this.assignOptions({ primary: true }); - } - /** - * Set true to define the properties as setter. (virtual) - * - * @example - * ``` - * @Property({ setter: true }) - * set address(value: string) { - * this._address = value.toLocaleLowerCase(); - * } - * ``` - */ - setter(setter = true) { - return this.assignOptions({ setter }); - } - /** - * Set true to define the properties as getter. (virtual) - * - * @example - * ``` - * @Property({ getter: true }) - * get fullName() { - * return this.firstName + this.lastName; - * } - * ``` - */ - getter(getter = true) { - return this.assignOptions({ getter }); - } - /** - * When defining a property over a method (not a getter, a regular function), you can use this option to point - * to the method name. - * - * @example - * ``` - * @Property({ getter: true }) - * getFullName() { - * return this.firstName + this.lastName; - * } - * ``` - */ - getterName(getterName) { - return this.assignOptions({ getterName }); - } - /** - * Set to define serialized primary key for MongoDB. (virtual) - * Alias for `@SerializedPrimaryKey()` decorator. - * - * @see https://mikro-orm.io/docs/decorators#serializedprimarykey - */ - serializedPrimaryKey(serializedPrimaryKey = true) { - return this.assignOptions({ serializedPrimaryKey }); - } - /** - * Set to use serialize property. Allow to specify a callback that will be used when serializing a property. - * - * @see https://mikro-orm.io/docs/serializing#property-serializers - */ - serializer(serializer) { - return this.assignOptions({ serializer }); - } - /** - * Specify name of key for the serialized value. - */ - serializedName(serializedName) { - return this.assignOptions({ serializedName }); - } - /** - * Specify serialization groups for `serialize()` calls. If a property does not specify any group, it will be included, - * otherwise only properties with a matching group are included. - */ - groups(...groups) { - return this.assignOptions({ groups }); - } - /** - * Specify a custom order based on the values. (SQL only) - */ - customOrder(...customOrder) { - return this.assignOptions({ customOrder }); - } - /** - * Specify comment of column for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. (SQL only) - */ - comment(comment) { - return this.assignOptions({ comment }); - } - /** mysql only */ - extra(extra) { - return this.assignOptions({ extra }); - } - /** - * Set to avoid a perpetual diff from the {@link https://mikro-orm.io/docs/schema-generator Schema Generator} when columns are generated. - * - * @see https://mikro-orm.io/docs/defining-entities#sql-generated-columns - */ - ignoreSchemaChanges(...ignoreSchemaChanges) { - return this.assignOptions({ ignoreSchemaChanges }); - } - array() { - return this.assignOptions({ array: true }); - } - /** for postgres, by default it uses text column with check constraint */ - nativeEnumName(nativeEnumName) { - return this.assignOptions({ nativeEnumName }); - } - prefix(prefix) { - return this.assignOptions({ prefix }); - } - prefixMode(prefixMode) { - return this.assignOptions({ prefixMode }); - } - object(object = true) { - return this.assignOptions({ object }); - } - /** Set what actions on owning entity should be cascaded to the relationship. Defaults to [Cascade.PERSIST, Cascade.MERGE] (see {@doclink cascading}). */ - cascade(...cascade) { - return this.assignOptions({ cascade }); - } - /** Always load the relationship. Discouraged for use with to-many relations for performance reasons. */ - eager(eager = true) { - return this.assignOptions({ eager }); - } - /** Override the default loading strategy for this property. This option has precedence over the global `loadStrategy`, but can be overridden by `FindOptions.strategy`. */ - strategy(strategy) { - return this.assignOptions({ strategy }); - } - /** Set this side as owning. Owning side is where the foreign key is defined. This option is not required if you use `inversedBy` or `mappedBy` to distinguish owning and inverse side. */ - owner() { - return this.assignOptions({ owner: true }); - } - /** For polymorphic relations. Specifies the property name that stores the entity type discriminator. Defaults to the property name. */ - discriminator(discriminator) { - return this.assignOptions({ discriminator }); - } - /** For polymorphic relations. Custom mapping of discriminator values to entity class names. */ - discriminatorMap(discriminatorMap) { - return this.assignOptions({ discriminatorMap }); - } - /** Point to the inverse side property name. */ - inversedBy(inversedBy) { - return this.assignOptions({ inversedBy }); - } - /** Point to the owning side property name. */ - mappedBy(mappedBy) { - return this.assignOptions({ mappedBy }); - } - /** Condition for {@doclink collections#declarative-partial-loading | Declarative partial loading}. */ - where(...where) { - return this.assignOptions({ where }); - } - /** Set default ordering. */ - orderBy(...orderBy) { - return this.assignOptions({ orderBy }); - } - /** Force stable insertion order of items in the collection (see {@doclink collections | Collections}). */ - fixedOrder(fixedOrder = true) { - return this.assignOptions({ fixedOrder }); - } - /** Override default order column name (`id`) for fixed ordering. */ - fixedOrderColumn(fixedOrderColumn) { - return this.assignOptions({ fixedOrderColumn }); - } - /** Override default name for pivot table (see {@doclink naming-strategy | Naming Strategy}). */ - pivotTable(pivotTable) { - return this.assignOptions({ pivotTable }); - } - /** Set pivot entity for this relation (see {@doclink collections#custom-pivot-table-entity | Custom pivot table entity}). */ - pivotEntity(pivotEntity) { - return this.assignOptions({ pivotEntity }); - } - /** Override the default database column name on the owning side (see {@doclink naming-strategy | Naming Strategy}). This option is only for simple properties represented by a single column. */ - joinColumn(joinColumn) { - return this.assignOptions({ joinColumn }); - } - /** Override the default database column name on the owning side (see {@doclink naming-strategy | Naming Strategy}). This option is suitable for composite keys, where one property is represented by multiple columns. */ - joinColumns(...joinColumns) { - return this.assignOptions({ joinColumns }); - } - /** Override the default database column name on the inverse side (see {@doclink naming-strategy | Naming Strategy}). This option is only for simple properties represented by a single column. */ - inverseJoinColumn(inverseJoinColumn) { - return this.assignOptions({ inverseJoinColumn }); - } - /** Override the default database column name on the inverse side (see {@doclink naming-strategy | Naming Strategy}). This option is suitable for composite keys, where one property is represented by multiple columns. */ - inverseJoinColumns(...inverseJoinColumns) { - return this.assignOptions({ inverseJoinColumns }); - } - /** Override the default database column name on the target entity (see {@doclink naming-strategy | Naming Strategy}). This option is only for simple properties represented by a single column. */ - referenceColumnName(referenceColumnName) { - return this.assignOptions({ referenceColumnName }); - } - /** Override the default database column name on the target entity (see {@doclink naming-strategy | Naming Strategy}). This option is suitable for composite keys, where one property is represented by multiple columns. */ - referencedColumnNames(...referencedColumnNames) { - return this.assignOptions({ referencedColumnNames }); - } - /** Specify the property name on the target entity that this FK references instead of the primary key. */ - targetKey(targetKey) { - return this.assignOptions({ targetKey }); - } - /** What to do when the target entity gets deleted. */ - deleteRule(deleteRule) { - return this.assignOptions({ deleteRule }); - } - /** What to do when the reference to the target entity gets updated. */ - updateRule(updateRule) { - return this.assignOptions({ updateRule }); - } - /** Map this relation to the primary key value instead of an entity. */ - mapToPk() { - return this.assignOptions({ mapToPk: true }); - } - /** Set the constraint type. Immediate constraints are checked for each statement, while deferred ones are only checked at the end of the transaction. Only for postgres unique constraints. */ - deferMode(deferMode) { - return this.assignOptions({ deferMode }); - } - /** When a part of a composite column is shared in other properties, use this option to specify what columns are considered as owned by this property. This is useful when your composite property is nullable, but parts of it are not. */ - ownColumns(...ownColumns) { - return this.assignOptions({ ownColumns }); - } - /** Enable/disable foreign key constraint creation on this relation */ - createForeignKeyConstraint(createForeignKeyConstraint = true) { - return this.assignOptions({ createForeignKeyConstraint }); - } - /** Set a custom foreign key constraint name, overriding NamingStrategy.indexName(). */ - foreignKeyName(foreignKeyName) { - return this.assignOptions({ foreignKeyName }); - } - /** Remove the entity when it gets disconnected from the relationship (see {@doclink cascading | Cascading}). */ - orphanRemoval(orphanRemoval = true) { - return this.assignOptions({ orphanRemoval }); - } - accessor(accessor = true) { - return this.assignOptions({ accessor }); - } -} -/** @internal */ -export class OneToManyOptionsBuilderOnlyMappedBy extends UniversalPropertyOptionsBuilder { - /** Point to the owning side property name. */ - mappedBy(mappedBy) { - return new UniversalPropertyOptionsBuilder({ ...this['~options'], mappedBy }); - } -} -function createPropertyBuilders(options) { - return Object.fromEntries( - Object.entries(options).map(([key, value]) => [key, () => new UniversalPropertyOptionsBuilder({ type: value })]), - ); -} -const propertyBuilders = { - ...createPropertyBuilders(types), - bigint: mode => new UniversalPropertyOptionsBuilder({ type: new types.bigint(mode) }), - array: (toJsValue = i => i, toDbValue = i => i) => - new UniversalPropertyOptionsBuilder({ type: new types.array(toJsValue, toDbValue) }), - decimal: mode => new UniversalPropertyOptionsBuilder({ type: new types.decimal(mode) }), - json: () => new UniversalPropertyOptionsBuilder({ type: types.json }), - formula: formula => new UniversalPropertyOptionsBuilder({ formula }), - datetime: length => new UniversalPropertyOptionsBuilder({ type: types.datetime, length }), - time: length => new UniversalPropertyOptionsBuilder({ type: types.time, length }), - type: type => new UniversalPropertyOptionsBuilder({ type }), - enum: items => - new UniversalPropertyOptionsBuilder({ - enum: true, - items, - }), - embedded: target => - new UniversalPropertyOptionsBuilder({ - entity: () => target, - kind: 'embedded', - }), - manyToMany: target => - new UniversalPropertyOptionsBuilder({ - entity: () => target, - kind: 'm:n', - }), - manyToOne: target => - new UniversalPropertyOptionsBuilder({ - entity: () => target, - kind: 'm:1', - }), - oneToMany: target => - new OneToManyOptionsBuilderOnlyMappedBy({ - entity: () => target, - kind: '1:m', - }), - oneToOne: target => - new UniversalPropertyOptionsBuilder({ - entity: () => target, - kind: '1:1', - }), -}; -function getBuilderOptions(builder) { - return '~options' in builder ? builder['~options'] : builder; -} -export function defineEntity(meta) { - const { properties: propertiesOrGetter, ...options } = meta; - const propertyOptions = - typeof propertiesOrGetter === 'function' ? propertiesOrGetter(propertyBuilders) : propertiesOrGetter; - const properties = {}; - const values = new Map(); - for (const [key, builder] of Object.entries(propertyOptions)) { - if (typeof builder === 'function') { - Object.defineProperty(properties, key, { - get: () => { - let value = values.get(key); - if (value === undefined) { - value = getBuilderOptions(builder()); - values.set(key, value); - } - return value; - }, - set: value => { - values.set(key, value); - }, - enumerable: true, - }); - } else { - Object.defineProperty(properties, key, { - value: getBuilderOptions(builder), - writable: true, - enumerable: true, - }); - } - } - return new EntitySchema({ properties, ...options }); -} -defineEntity.properties = propertyBuilders; -/** Shorthand alias for `defineEntity.properties` - the property builders for use in `defineEntity()`. */ -export { propertyBuilders as p }; diff --git a/node_modules/@mikro-orm/core/entity/index.d.ts b/node_modules/@mikro-orm/core/entity/index.d.ts deleted file mode 100644 index 5431cbe..0000000 --- a/node_modules/@mikro-orm/core/entity/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export * from './EntityRepository.js'; -export * from './EntityIdentifier.js'; -export * from './PolymorphicRef.js'; -export * from './EntityAssigner.js'; -export * from './EntityHelper.js'; -export * from './EntityFactory.js'; -export * from './Collection.js'; -export * from './EntityLoader.js'; -export * from './Reference.js'; -export * from './BaseEntity.js'; -export * from './WrappedEntity.js'; -export * from './validators.js'; -export * from './wrap.js'; -export * from './defineEntity.js'; -export * from './utils.js'; diff --git a/node_modules/@mikro-orm/core/entity/index.js b/node_modules/@mikro-orm/core/entity/index.js deleted file mode 100644 index 5431cbe..0000000 --- a/node_modules/@mikro-orm/core/entity/index.js +++ /dev/null @@ -1,15 +0,0 @@ -export * from './EntityRepository.js'; -export * from './EntityIdentifier.js'; -export * from './PolymorphicRef.js'; -export * from './EntityAssigner.js'; -export * from './EntityHelper.js'; -export * from './EntityFactory.js'; -export * from './Collection.js'; -export * from './EntityLoader.js'; -export * from './Reference.js'; -export * from './BaseEntity.js'; -export * from './WrappedEntity.js'; -export * from './validators.js'; -export * from './wrap.js'; -export * from './defineEntity.js'; -export * from './utils.js'; diff --git a/node_modules/@mikro-orm/core/entity/utils.d.ts b/node_modules/@mikro-orm/core/entity/utils.d.ts deleted file mode 100644 index c5bccb1..0000000 --- a/node_modules/@mikro-orm/core/entity/utils.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { EntityMetadata, PopulateHintOptions, PopulateOptions } from '../typings.js'; -import { LoadStrategy, ReferenceKind } from '../enums.js'; -/** - * @internal - */ -export declare function expandDotPaths( - meta: EntityMetadata, - populate?: readonly (string | PopulateOptions)[], - normalized?: boolean, -): PopulateOptions[]; -/** - * Returns the loading strategy based on the provided hint. - * If `BALANCED` strategy is used, it will return JOINED if the property is a to-one relation. - * @internal - */ -export declare function getLoadingStrategy( - strategy: LoadStrategy | `${LoadStrategy}`, - kind: ReferenceKind, -): LoadStrategy.SELECT_IN | LoadStrategy.JOINED; -/** - * Applies per-relation overrides from `populateHints` to the normalized populate tree. - * @internal - */ -export declare function applyPopulateHints( - populate: PopulateOptions[], - hints: Record, -): void; diff --git a/node_modules/@mikro-orm/core/entity/utils.js b/node_modules/@mikro-orm/core/entity/utils.js deleted file mode 100644 index e8325ae..0000000 --- a/node_modules/@mikro-orm/core/entity/utils.js +++ /dev/null @@ -1,102 +0,0 @@ -import { LoadStrategy, PopulatePath, ReferenceKind } from '../enums.js'; -import { Utils } from '../utils/Utils.js'; -/** - * Expands `books.perex` like populate to use `children` array instead of the dot syntax - */ -function expandNestedPopulate(parentProp, parts, strategy, all) { - const meta = parentProp.targetMeta; - const field = parts.shift(); - const prop = meta.properties[field]; - const ret = { field, strategy, all }; - if (parts.length > 0) { - ret.children = [expandNestedPopulate(prop, parts, strategy)]; - } - return ret; -} -/** - * @internal - */ -export function expandDotPaths(meta, populate, normalized = false) { - const ret = normalized - ? populate - : Utils.asArray(populate).map(field => { - if (typeof field === 'string') { - return { field }; - } - /* v8 ignore next */ - return typeof field === 'boolean' || field.field === PopulatePath.ALL - ? { all: !!field, field: meta.primaryKeys[0] } - : field; - }); - for (const p of ret) { - if (!p.field.includes('.')) { - continue; - } - const [f, ...parts] = p.field.split('.'); - p.field = f; - p.children ??= []; - const prop = meta.properties[p.field]; - if (parts[0] === PopulatePath.ALL) { - prop.targetMeta.props - .filter(prop => prop.lazy || prop.kind !== ReferenceKind.SCALAR) - .forEach(prop => p.children.push({ field: prop.name, strategy: p.strategy })); - } else if (prop.kind === ReferenceKind.EMBEDDED) { - const embeddedProp = Object.values(prop.embeddedProps).find(c => c.embedded[1] === parts[0]); - ret.push({ - ...p, - field: embeddedProp.name, - children: parts.length > 1 ? [expandNestedPopulate(embeddedProp, parts.slice(1), p.strategy, p.all)] : [], - }); - p.children.push(expandNestedPopulate(prop, parts, p.strategy, p.all)); - } else { - p.children.push(expandNestedPopulate(prop, parts, p.strategy, p.all)); - } - } - return ret; -} -/** - * Returns the loading strategy based on the provided hint. - * If `BALANCED` strategy is used, it will return JOINED if the property is a to-one relation. - * @internal - */ -export function getLoadingStrategy(strategy, kind) { - if (strategy === LoadStrategy.BALANCED) { - return [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(kind) - ? LoadStrategy.JOINED - : LoadStrategy.SELECT_IN; - } - return strategy; -} -function findPopulateEntry(populate, parts) { - let current = populate; - for (let i = 0; i < parts.length; i++) { - const entry = current.find(p => p.field.split(':')[0] === parts[i]); - if (!entry) { - return undefined; - } - if (i === parts.length - 1) { - return entry; - } - current = entry.children ?? []; - } - /* v8 ignore next */ - return undefined; -} -/** - * Applies per-relation overrides from `populateHints` to the normalized populate tree. - * @internal - */ -export function applyPopulateHints(populate, hints) { - for (const [path, hint] of Object.entries(hints)) { - const entry = findPopulateEntry(populate, path.split('.')); - if (!entry) { - continue; - } - if (hint.strategy != null) { - entry.strategy = hint.strategy; - } - if (hint.joinType != null) { - entry.joinType = hint.joinType; - } - } -} diff --git a/node_modules/@mikro-orm/core/entity/validators.d.ts b/node_modules/@mikro-orm/core/entity/validators.d.ts deleted file mode 100644 index 63299ce..0000000 --- a/node_modules/@mikro-orm/core/entity/validators.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { EntityData, EntityMetadata, EntityProperty, FilterQuery } from '../typings.js'; -/** @internal */ -export declare function validateProperty(prop: EntityProperty, givenValue: any, entity: T): void; -/** @internal */ -export declare function validateEntity(entity: T, meta: EntityMetadata): void; -/** @internal */ -export declare function validateParams(params: any, type?: string, field?: string): void; -/** @internal */ -export declare function validatePrimaryKey(entity: EntityData, meta: EntityMetadata): void; -/** @internal */ -export declare function validateEmptyWhere(where: FilterQuery): void; diff --git a/node_modules/@mikro-orm/core/entity/validators.js b/node_modules/@mikro-orm/core/entity/validators.js deleted file mode 100644 index 14fe42a..0000000 --- a/node_modules/@mikro-orm/core/entity/validators.js +++ /dev/null @@ -1,66 +0,0 @@ -import { Utils } from '../utils/Utils.js'; -import { ValidationError } from '../errors.js'; -import { isRaw, Raw } from '../utils/RawQueryFragment.js'; -import { SCALAR_TYPES } from '../enums.js'; -/** @internal */ -export function validateProperty(prop, givenValue, entity) { - if (givenValue == null || isRaw(givenValue)) { - return; - } - const expectedType = prop.runtimeType; - const propName = prop.embedded ? prop.name.replace(/~/g, '.') : prop.name; - const givenType = Utils.getObjectType(givenValue); - if (prop.enum && prop.items) { - /* v8 ignore next */ - if (!prop.items.some(it => it === givenValue)) { - throw ValidationError.fromWrongPropertyType(entity, propName, expectedType, givenType, givenValue); - } - } else { - if (givenType !== expectedType && SCALAR_TYPES.has(expectedType)) { - throw ValidationError.fromWrongPropertyType(entity, propName, expectedType, givenType, givenValue); - } - } -} -function getValue(o, prop) { - if (prop.embedded && prop.embedded[0] in o) { - return o[prop.embedded[0]]?.[prop.embedded[1]]; - } - /* v8 ignore next */ - if (prop.ref) { - return o[prop.name]?.unwrap(); - } - return o[prop.name]; -} -/** @internal */ -export function validateEntity(entity, meta) { - for (const prop of meta.validateProps) { - validateProperty(prop, getValue(entity, prop), entity); - } -} -/** @internal */ -export function validateParams(params, type = 'search condition', field) { - if (Utils.isPrimaryKey(params) || Utils.isEntity(params)) { - return; - } - if (Array.isArray(params)) { - return params.forEach(item => validateParams(item, type, field)); - } - if (Utils.isPlainObject(params)) { - Object.keys(params).forEach(k => validateParams(params[k], type, k)); - } -} -/** @internal */ -export function validatePrimaryKey(entity, meta) { - const pkExists = - meta.primaryKeys.every(pk => entity[pk] != null) || - (meta.serializedPrimaryKey && entity[meta.serializedPrimaryKey] != null); - if (!entity || !pkExists) { - throw ValidationError.fromMergeWithoutPK(meta); - } -} -/** @internal */ -export function validateEmptyWhere(where) { - if (Utils.isEmpty(where) && !Raw.hasObjectFragments(where)) { - throw new Error(`You cannot call 'EntityManager.findOne()' with empty 'where' parameter`); - } -} diff --git a/node_modules/@mikro-orm/core/entity/wrap.d.ts b/node_modules/@mikro-orm/core/entity/wrap.d.ts deleted file mode 100644 index ee49c9e..0000000 --- a/node_modules/@mikro-orm/core/entity/wrap.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { IWrappedEntity, IWrappedEntityInternal } from '../typings.js'; -/** - * returns WrappedEntity instance associated with this entity. This includes all the internal properties like `__meta` or `__em`. - */ -export declare function wrap(entity: T, preferHelper: true): IWrappedEntityInternal; -/** - * wraps entity type with WrappedEntity internal properties and helpers like init/isInitialized/populated/toJSON - */ -export declare function wrap(entity: T, preferHelper?: false): IWrappedEntity; -/** - * wraps entity type with WrappedEntity internal properties and helpers like init/isInitialized/populated/toJSON - * use `preferHelper = true` to have access to the internal `__` properties like `__meta` or `__em` - * @internal - */ -export declare function helper(entity: T): IWrappedEntityInternal; diff --git a/node_modules/@mikro-orm/core/entity/wrap.js b/node_modules/@mikro-orm/core/entity/wrap.js deleted file mode 100644 index e0d25f1..0000000 --- a/node_modules/@mikro-orm/core/entity/wrap.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * wraps entity type with WrappedEntity internal properties and helpers like init/isInitialized/populated/toJSON - * use `preferHelper = true` to have access to the internal `__` properties like `__meta` or `__em` - */ -export function wrap(entity, preferHelper = false) { - if (!entity) { - return entity; - } - if (entity.__baseEntity && !preferHelper) { - return entity; - } - return entity.__helper ?? entity; -} -/** - * wraps entity type with WrappedEntity internal properties and helpers like init/isInitialized/populated/toJSON - * use `preferHelper = true` to have access to the internal `__` properties like `__meta` or `__em` - * @internal - */ -export function helper(entity) { - return entity.__helper; -} diff --git a/node_modules/@mikro-orm/core/enums.d.ts b/node_modules/@mikro-orm/core/enums.d.ts deleted file mode 100644 index 3e4f2cd..0000000 --- a/node_modules/@mikro-orm/core/enums.d.ts +++ /dev/null @@ -1,326 +0,0 @@ -import type { EntityKey, ExpandProperty } from './typings.js'; -import type { Transaction } from './connections/Connection.js'; -import type { LogContext } from './logging/Logger.js'; -/** Controls when the `EntityManager` flushes pending changes to the database. */ -export declare enum FlushMode { - /** The `EntityManager` delays the flush until the current Transaction is committed. */ - COMMIT = 'commit', - /** This is the default mode, and it flushes the `EntityManager` only if necessary. */ - AUTO = 'auto', - /** Flushes the `EntityManager` before every query. */ - ALWAYS = 'always', -} -/** Controls how populate hints are resolved when using `FindOptions.populateWhere`. */ -export declare enum PopulateHint { - /** Infer population hints from the `where` condition. */ - INFER = 'infer', - /** Apply population hints to all relations. */ - ALL = 'all', -} -/** Special tokens used as populate path values in `FindOptions.populate`. */ -export declare enum PopulatePath { - /** Infer which relations to populate based on fields accessed in the `where` or `orderBy` clause. */ - INFER = '$infer', - /** Populate all relations. */ - ALL = '*', -} -/** Logical grouping operators for combining query conditions. */ -export declare enum GroupOperator { - /** Logical AND — all conditions must match. */ - $and = 'and', - /** Logical OR — at least one condition must match. */ - $or = 'or', -} -/** Comparison and filtering operators used in query conditions. */ -export declare enum QueryOperator { - /** Equal. */ - $eq = '=', - /** Included in the given list. */ - $in = 'in', - /** Not included in the given list. */ - $nin = 'not in', - /** Greater than. */ - $gt = '>', - /** Greater than or equal to. */ - $gte = '>=', - /** Less than. */ - $lt = '<', - /** Less than or equal to. */ - $lte = '<=', - /** Not equal. */ - $ne = '!=', - /** Negation wrapper. */ - $not = 'not', - /** SQL LIKE pattern matching. */ - $like = 'like', - /** Regular expression matching. */ - $re = 'regexp', - /** Full-text search. */ - $fulltext = 'fulltext', - /** Checks that the value is not null (i.e., exists). */ - $exists = 'not null', - /** Case-insensitive LIKE (PostgreSQL only). */ - $ilike = 'ilike', // postgres only - /** Array overlap operator (PostgreSQL only). */ - $overlap = '&&', // postgres only - /** Array/JSON contains operator (PostgreSQL only). */ - $contains = '@>', // postgres only - /** Array/JSON contained-by operator (PostgreSQL only). */ - $contained = '<@', // postgres only - /** No element in the collection matches (SQL only). */ - $none = 'none', // collection operators, sql only - /** At least one element in the collection matches (SQL only). */ - $some = 'some', // collection operators, sql only - /** Every element in the collection matches (SQL only). */ - $every = 'every', // collection operators, sql only - /** Matches collections by their size (SQL only). */ - $size = 'size', // collection operators, sql only - /** JSON object has the given key (PostgreSQL only). */ - $hasKey = '?', // postgres only, json - /** JSON object has all of the given keys (PostgreSQL only). */ - $hasKeys = '?&', // postgres only, json - /** JSON object has at least one of the given keys (PostgreSQL only). */ - $hasSomeKeys = '?|', // postgres only, json - /** Matches an element inside a JSON array (SQL only). */ - $elemMatch = 'elemMatch', -} -export declare const ARRAY_OPERATORS: string[]; -export declare const JSON_KEY_OPERATORS: string[]; -/** Sort direction for query results. Both upper- and lower-case variants are accepted. */ -export declare enum QueryOrder { - /** Ascending order. */ - ASC = 'ASC', - /** Ascending order with nulls sorted last. */ - ASC_NULLS_LAST = 'ASC NULLS LAST', - /** Ascending order with nulls sorted first. */ - ASC_NULLS_FIRST = 'ASC NULLS FIRST', - /** Descending order. */ - DESC = 'DESC', - /** Descending order with nulls sorted last. */ - DESC_NULLS_LAST = 'DESC NULLS LAST', - /** Descending order with nulls sorted first. */ - DESC_NULLS_FIRST = 'DESC NULLS FIRST', - /** Ascending order (lower-case variant). */ - asc = 'asc', - /** Ascending order with nulls sorted last (lower-case variant). */ - asc_nulls_last = 'asc nulls last', - /** Ascending order with nulls sorted first (lower-case variant). */ - asc_nulls_first = 'asc nulls first', - /** Descending order (lower-case variant). */ - desc = 'desc', - /** Descending order with nulls sorted last (lower-case variant). */ - desc_nulls_last = 'desc nulls last', - /** Descending order with nulls sorted first (lower-case variant). */ - desc_nulls_first = 'desc nulls first', -} -/** Numeric sort direction, compatible with MongoDB-style ordering. */ -export declare enum QueryOrderNumeric { - /** Ascending order. */ - ASC = 1, - /** Descending order. */ - DESC = -1, -} -export type QueryOrderKeysFlat = QueryOrder | QueryOrderNumeric | `${QueryOrder}`; -export type QueryOrderKeys = QueryOrderKeysFlat | QueryOrderMap; -export type QueryOrderMap = { - [K in EntityKey]?: QueryOrderKeys>; -}; -export interface FlatQueryOrderMap { - [x: string]: QueryOrderKeysFlat; -} -/** Flags that modify query builder behavior. */ -export declare enum QueryFlag { - /** Add a DISTINCT clause to the SELECT statement. */ - DISTINCT = 'DISTINCT', - /** Enable result pagination via a sub-query for the primary keys. */ - PAGINATE = 'PAGINATE', - /** Disable the automatic pagination sub-query. */ - DISABLE_PAGINATE = 'DISABLE_PAGINATE', - /** Wrap UPDATE statements in a sub-query. */ - UPDATE_SUB_QUERY = 'UPDATE_SUB_QUERY', - /** Wrap DELETE statements in a sub-query. */ - DELETE_SUB_QUERY = 'DELETE_SUB_QUERY', - /** Convert values through custom type mappings when reading results. */ - CONVERT_CUSTOM_TYPES = 'CONVERT_CUSTOM_TYPES', - /** Include lazy formula properties in the SELECT clause. */ - INCLUDE_LAZY_FORMULAS = 'INCLUDE_LAZY_FORMULAS', - /** Automatically join the owning side of one-to-one relations. */ - AUTO_JOIN_ONE_TO_ONE_OWNER = 'AUTO_JOIN_ONE_TO_ONE_OWNER', - /** Infer the populate hint from the query fields. */ - INFER_POPULATE = 'INFER_POPULATE', - /** Prevent nested conditions from being promoted to INNER JOINs. */ - DISABLE_NESTED_INNER_JOIN = 'DISABLE_NESTED_INNER_JOIN', - /** Enable IDENTITY_INSERT for explicit PK values (MSSQL only). */ - IDENTITY_INSERT = 'IDENTITY_INSERT', // mssql only - /** Use an OUTPUT...INTO temp table for returning rows (MSSQL only). */ - OUTPUT_TABLE = 'OUTPUT_TABLE', -} -export declare const SCALAR_TYPES: Set; -/** Describes the kind of relationship a property represents. */ -export declare enum ReferenceKind { - /** A plain scalar property (not a relation). */ - SCALAR = 'scalar', - /** A one-to-one relation. */ - ONE_TO_ONE = '1:1', - /** A one-to-many relation (inverse side of a many-to-one). */ - ONE_TO_MANY = '1:m', - /** A many-to-one relation (owning side). */ - MANY_TO_ONE = 'm:1', - /** A many-to-many relation. */ - MANY_TO_MANY = 'm:n', - /** An embedded entity (inline object stored within the parent). */ - EMBEDDED = 'embedded', -} -/** Cascade operations that propagate from a parent entity to its relations. */ -export declare enum Cascade { - /** Cascade persist — new related entities are automatically persisted. */ - PERSIST = 'persist', - /** Cascade merge — detached related entities are merged into the identity map. */ - MERGE = 'merge', - /** Cascade remove — removing the parent also removes related entities. */ - REMOVE = 'remove', - /** Enable all cascade operations (persist, merge, remove). */ - ALL = 'all', - /** @internal */ - SCHEDULE_ORPHAN_REMOVAL = 'schedule_orphan_removal', - /** @internal */ - CANCEL_ORPHAN_REMOVAL = 'cancel_orphan_removal', -} -/** Strategy used to load related entities when populating. */ -export declare enum LoadStrategy { - /** Load relations with a separate SELECT ... WHERE pk IN (...) query. */ - SELECT_IN = 'select-in', - /** Load relations via SQL JOINs in a single query. */ - JOINED = 'joined', - /** Use joined strategy for to-one relations and select-in for to-many. */ - BALANCED = 'balanced', -} -/** Controls which relation types use the dataloader for batched loading. */ -export declare enum DataloaderType { - /** Dataloader is disabled. */ - NONE = 0, - /** Use the dataloader for Reference (to-one) relations only. */ - REFERENCE = 1, - /** Use the dataloader for Collection (to-many) relations only. */ - COLLECTION = 2, - /** Use the dataloader for both Reference and Collection relations. */ - ALL = 3, -} -/** Locking strategy for concurrency control. */ -export declare enum LockMode { - /** No locking. */ - NONE = 0, - /** Optimistic locking via a version column. */ - OPTIMISTIC = 1, - /** Pessimistic shared lock (FOR SHARE). */ - PESSIMISTIC_READ = 2, - /** Pessimistic exclusive lock (FOR UPDATE). */ - PESSIMISTIC_WRITE = 3, - /** Pessimistic exclusive lock that skips already-locked rows (FOR UPDATE SKIP LOCKED). */ - PESSIMISTIC_PARTIAL_WRITE = 4, - /** Pessimistic exclusive lock that fails immediately if the row is locked (FOR UPDATE NOWAIT). */ - PESSIMISTIC_WRITE_OR_FAIL = 5, - /** Pessimistic shared lock that skips already-locked rows (FOR SHARE SKIP LOCKED). */ - PESSIMISTIC_PARTIAL_READ = 6, - /** Pessimistic shared lock that fails immediately if the row is locked (FOR SHARE NOWAIT). */ - PESSIMISTIC_READ_OR_FAIL = 7, -} -/** Transaction isolation levels as defined by the SQL standard (plus vendor extensions). */ -export declare enum IsolationLevel { - /** Allows dirty reads, non-repeatable reads, and phantom reads. */ - READ_UNCOMMITTED = 'read uncommitted', - /** Prevents dirty reads; non-repeatable and phantom reads are still possible. */ - READ_COMMITTED = 'read committed', - /** Snapshot isolation — each transaction sees a consistent snapshot of the database (MSSQL). */ - SNAPSHOT = 'snapshot', - /** Prevents dirty and non-repeatable reads; phantom reads are still possible. */ - REPEATABLE_READ = 'repeatable read', - /** Full isolation — transactions are executed as if they were run sequentially. */ - SERIALIZABLE = 'serializable', -} -/** Lifecycle and transaction events emitted by the ORM. */ -export declare enum EventType { - /** Fired when an entity instance is created (via constructor or `em.create`). */ - onInit = 'onInit', - /** Fired after an entity is loaded from the database. */ - onLoad = 'onLoad', - /** Fired before a new entity is inserted into the database. */ - beforeCreate = 'beforeCreate', - /** Fired after a new entity has been inserted into the database. */ - afterCreate = 'afterCreate', - /** Fired before an existing entity is updated in the database. */ - beforeUpdate = 'beforeUpdate', - /** Fired after an existing entity has been updated in the database. */ - afterUpdate = 'afterUpdate', - /** Fired before an upsert operation. */ - beforeUpsert = 'beforeUpsert', - /** Fired after an upsert operation. */ - afterUpsert = 'afterUpsert', - /** Fired before an entity is deleted from the database. */ - beforeDelete = 'beforeDelete', - /** Fired after an entity has been deleted from the database. */ - afterDelete = 'afterDelete', - /** Fired at the very beginning of `em.flush()`, before change detection. */ - beforeFlush = 'beforeFlush', - /** Fired during `em.flush()` after change detection but before database writes. */ - onFlush = 'onFlush', - /** Fired after `em.flush()` has completed all database writes. */ - afterFlush = 'afterFlush', - /** Fired before a new database transaction is started. */ - beforeTransactionStart = 'beforeTransactionStart', - /** Fired after a new database transaction has been started. */ - afterTransactionStart = 'afterTransactionStart', - /** Fired before a database transaction is committed. */ - beforeTransactionCommit = 'beforeTransactionCommit', - /** Fired after a database transaction has been committed. */ - afterTransactionCommit = 'afterTransactionCommit', - /** Fired before a database transaction is rolled back. */ - beforeTransactionRollback = 'beforeTransactionRollback', - /** Fired after a database transaction has been rolled back. */ - afterTransactionRollback = 'afterTransactionRollback', -} -export declare const EventTypeMap: Record; -export type TransactionEventType = - | EventType.beforeTransactionStart - | EventType.afterTransactionStart - | EventType.beforeTransactionCommit - | EventType.afterTransactionCommit - | EventType.beforeTransactionRollback - | EventType.afterTransactionRollback; -/** Controls how a transactional operation interacts with an existing transaction. */ -export declare enum TransactionPropagation { - /** Join the current transaction or create a new one if none exists. */ - REQUIRED = 'required', - /** Always create a new transaction, suspending the current one if it exists. */ - REQUIRES_NEW = 'requires_new', - /** Create a nested savepoint within the current transaction, or a new transaction if none exists. */ - NESTED = 'nested', - /** Execute non-transactionally, suspending the current transaction if one exists. */ - NOT_SUPPORTED = 'not_supported', - /** Join the current transaction if one exists, otherwise execute non-transactionally. */ - SUPPORTS = 'supports', - /** Join the current transaction; throw if no transaction is active. */ - MANDATORY = 'mandatory', - /** Execute non-transactionally; throw if a transaction is active. */ - NEVER = 'never', -} -export interface TransactionOptions { - ctx?: Transaction; - propagation?: TransactionPropagation | `${TransactionPropagation}`; - isolationLevel?: IsolationLevel | `${IsolationLevel}`; - readOnly?: boolean; - clear?: boolean; - flushMode?: FlushMode | `${FlushMode}`; - ignoreNestedTransactions?: boolean; - loggerContext?: LogContext; -} -export declare abstract class PlainObject {} -/** Constraint deferral mode for database constraints (e.g., foreign keys, unique). */ -export declare enum DeferMode { - /** The constraint is checked immediately by default, but can be deferred within a transaction. */ - INITIALLY_IMMEDIATE = 'immediate', - /** The constraint is deferred until the transaction is committed. */ - INITIALLY_DEFERRED = 'deferred', -} -/** With `absolute` the prefix is set at the root of the entity (regardless of the nesting level) */ -export type EmbeddedPrefixMode = 'absolute' | 'relative'; diff --git a/node_modules/@mikro-orm/core/enums.js b/node_modules/@mikro-orm/core/enums.js deleted file mode 100644 index e8d4eed..0000000 --- a/node_modules/@mikro-orm/core/enums.js +++ /dev/null @@ -1,325 +0,0 @@ -/** Controls when the `EntityManager` flushes pending changes to the database. */ -export var FlushMode; -(function (FlushMode) { - /** The `EntityManager` delays the flush until the current Transaction is committed. */ - FlushMode['COMMIT'] = 'commit'; - /** This is the default mode, and it flushes the `EntityManager` only if necessary. */ - FlushMode['AUTO'] = 'auto'; - /** Flushes the `EntityManager` before every query. */ - FlushMode['ALWAYS'] = 'always'; -})(FlushMode || (FlushMode = {})); -/** Controls how populate hints are resolved when using `FindOptions.populateWhere`. */ -export var PopulateHint; -(function (PopulateHint) { - /** Infer population hints from the `where` condition. */ - PopulateHint['INFER'] = 'infer'; - /** Apply population hints to all relations. */ - PopulateHint['ALL'] = 'all'; -})(PopulateHint || (PopulateHint = {})); -/** Special tokens used as populate path values in `FindOptions.populate`. */ -export var PopulatePath; -(function (PopulatePath) { - /** Infer which relations to populate based on fields accessed in the `where` or `orderBy` clause. */ - PopulatePath['INFER'] = '$infer'; - /** Populate all relations. */ - PopulatePath['ALL'] = '*'; -})(PopulatePath || (PopulatePath = {})); -/** Logical grouping operators for combining query conditions. */ -export var GroupOperator; -(function (GroupOperator) { - /** Logical AND — all conditions must match. */ - GroupOperator['$and'] = 'and'; - /** Logical OR — at least one condition must match. */ - GroupOperator['$or'] = 'or'; -})(GroupOperator || (GroupOperator = {})); -/** Comparison and filtering operators used in query conditions. */ -export var QueryOperator; -(function (QueryOperator) { - /** Equal. */ - QueryOperator['$eq'] = '='; - /** Included in the given list. */ - QueryOperator['$in'] = 'in'; - /** Not included in the given list. */ - QueryOperator['$nin'] = 'not in'; - /** Greater than. */ - QueryOperator['$gt'] = '>'; - /** Greater than or equal to. */ - QueryOperator['$gte'] = '>='; - /** Less than. */ - QueryOperator['$lt'] = '<'; - /** Less than or equal to. */ - QueryOperator['$lte'] = '<='; - /** Not equal. */ - QueryOperator['$ne'] = '!='; - /** Negation wrapper. */ - QueryOperator['$not'] = 'not'; - /** SQL LIKE pattern matching. */ - QueryOperator['$like'] = 'like'; - /** Regular expression matching. */ - QueryOperator['$re'] = 'regexp'; - /** Full-text search. */ - QueryOperator['$fulltext'] = 'fulltext'; - /** Checks that the value is not null (i.e., exists). */ - QueryOperator['$exists'] = 'not null'; - /** Case-insensitive LIKE (PostgreSQL only). */ - QueryOperator['$ilike'] = 'ilike'; - /** Array overlap operator (PostgreSQL only). */ - QueryOperator['$overlap'] = '&&'; - /** Array/JSON contains operator (PostgreSQL only). */ - QueryOperator['$contains'] = '@>'; - /** Array/JSON contained-by operator (PostgreSQL only). */ - QueryOperator['$contained'] = '<@'; - /** No element in the collection matches (SQL only). */ - QueryOperator['$none'] = 'none'; - /** At least one element in the collection matches (SQL only). */ - QueryOperator['$some'] = 'some'; - /** Every element in the collection matches (SQL only). */ - QueryOperator['$every'] = 'every'; - /** Matches collections by their size (SQL only). */ - QueryOperator['$size'] = 'size'; - /** JSON object has the given key (PostgreSQL only). */ - QueryOperator['$hasKey'] = '?'; - /** JSON object has all of the given keys (PostgreSQL only). */ - QueryOperator['$hasKeys'] = '?&'; - /** JSON object has at least one of the given keys (PostgreSQL only). */ - QueryOperator['$hasSomeKeys'] = '?|'; - /** Matches an element inside a JSON array (SQL only). */ - QueryOperator['$elemMatch'] = 'elemMatch'; -})(QueryOperator || (QueryOperator = {})); -export const ARRAY_OPERATORS = ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne', '$overlap', '$contains', '$contained']; -export const JSON_KEY_OPERATORS = ['$hasKey', '$hasKeys', '$hasSomeKeys']; -/** Sort direction for query results. Both upper- and lower-case variants are accepted. */ -export var QueryOrder; -(function (QueryOrder) { - /** Ascending order. */ - QueryOrder['ASC'] = 'ASC'; - /** Ascending order with nulls sorted last. */ - QueryOrder['ASC_NULLS_LAST'] = 'ASC NULLS LAST'; - /** Ascending order with nulls sorted first. */ - QueryOrder['ASC_NULLS_FIRST'] = 'ASC NULLS FIRST'; - /** Descending order. */ - QueryOrder['DESC'] = 'DESC'; - /** Descending order with nulls sorted last. */ - QueryOrder['DESC_NULLS_LAST'] = 'DESC NULLS LAST'; - /** Descending order with nulls sorted first. */ - QueryOrder['DESC_NULLS_FIRST'] = 'DESC NULLS FIRST'; - /** Ascending order (lower-case variant). */ - QueryOrder['asc'] = 'asc'; - /** Ascending order with nulls sorted last (lower-case variant). */ - QueryOrder['asc_nulls_last'] = 'asc nulls last'; - /** Ascending order with nulls sorted first (lower-case variant). */ - QueryOrder['asc_nulls_first'] = 'asc nulls first'; - /** Descending order (lower-case variant). */ - QueryOrder['desc'] = 'desc'; - /** Descending order with nulls sorted last (lower-case variant). */ - QueryOrder['desc_nulls_last'] = 'desc nulls last'; - /** Descending order with nulls sorted first (lower-case variant). */ - QueryOrder['desc_nulls_first'] = 'desc nulls first'; -})(QueryOrder || (QueryOrder = {})); -/** Numeric sort direction, compatible with MongoDB-style ordering. */ -export var QueryOrderNumeric; -(function (QueryOrderNumeric) { - /** Ascending order. */ - QueryOrderNumeric[(QueryOrderNumeric['ASC'] = 1)] = 'ASC'; - /** Descending order. */ - QueryOrderNumeric[(QueryOrderNumeric['DESC'] = -1)] = 'DESC'; -})(QueryOrderNumeric || (QueryOrderNumeric = {})); -/** Flags that modify query builder behavior. */ -export var QueryFlag; -(function (QueryFlag) { - /** Add a DISTINCT clause to the SELECT statement. */ - QueryFlag['DISTINCT'] = 'DISTINCT'; - /** Enable result pagination via a sub-query for the primary keys. */ - QueryFlag['PAGINATE'] = 'PAGINATE'; - /** Disable the automatic pagination sub-query. */ - QueryFlag['DISABLE_PAGINATE'] = 'DISABLE_PAGINATE'; - /** Wrap UPDATE statements in a sub-query. */ - QueryFlag['UPDATE_SUB_QUERY'] = 'UPDATE_SUB_QUERY'; - /** Wrap DELETE statements in a sub-query. */ - QueryFlag['DELETE_SUB_QUERY'] = 'DELETE_SUB_QUERY'; - /** Convert values through custom type mappings when reading results. */ - QueryFlag['CONVERT_CUSTOM_TYPES'] = 'CONVERT_CUSTOM_TYPES'; - /** Include lazy formula properties in the SELECT clause. */ - QueryFlag['INCLUDE_LAZY_FORMULAS'] = 'INCLUDE_LAZY_FORMULAS'; - /** Automatically join the owning side of one-to-one relations. */ - QueryFlag['AUTO_JOIN_ONE_TO_ONE_OWNER'] = 'AUTO_JOIN_ONE_TO_ONE_OWNER'; - /** Infer the populate hint from the query fields. */ - QueryFlag['INFER_POPULATE'] = 'INFER_POPULATE'; - /** Prevent nested conditions from being promoted to INNER JOINs. */ - QueryFlag['DISABLE_NESTED_INNER_JOIN'] = 'DISABLE_NESTED_INNER_JOIN'; - /** Enable IDENTITY_INSERT for explicit PK values (MSSQL only). */ - QueryFlag['IDENTITY_INSERT'] = 'IDENTITY_INSERT'; - /** Use an OUTPUT...INTO temp table for returning rows (MSSQL only). */ - QueryFlag['OUTPUT_TABLE'] = 'OUTPUT_TABLE'; -})(QueryFlag || (QueryFlag = {})); -export const SCALAR_TYPES = new Set([ - 'string', - 'number', - 'boolean', - 'bigint', - 'Uint8Array', - 'Date', - 'Buffer', - 'RegExp', -]); -/** Describes the kind of relationship a property represents. */ -export var ReferenceKind; -(function (ReferenceKind) { - /** A plain scalar property (not a relation). */ - ReferenceKind['SCALAR'] = 'scalar'; - /** A one-to-one relation. */ - ReferenceKind['ONE_TO_ONE'] = '1:1'; - /** A one-to-many relation (inverse side of a many-to-one). */ - ReferenceKind['ONE_TO_MANY'] = '1:m'; - /** A many-to-one relation (owning side). */ - ReferenceKind['MANY_TO_ONE'] = 'm:1'; - /** A many-to-many relation. */ - ReferenceKind['MANY_TO_MANY'] = 'm:n'; - /** An embedded entity (inline object stored within the parent). */ - ReferenceKind['EMBEDDED'] = 'embedded'; -})(ReferenceKind || (ReferenceKind = {})); -/** Cascade operations that propagate from a parent entity to its relations. */ -export var Cascade; -(function (Cascade) { - /** Cascade persist — new related entities are automatically persisted. */ - Cascade['PERSIST'] = 'persist'; - /** Cascade merge — detached related entities are merged into the identity map. */ - Cascade['MERGE'] = 'merge'; - /** Cascade remove — removing the parent also removes related entities. */ - Cascade['REMOVE'] = 'remove'; - /** Enable all cascade operations (persist, merge, remove). */ - Cascade['ALL'] = 'all'; - /** @internal */ - Cascade['SCHEDULE_ORPHAN_REMOVAL'] = 'schedule_orphan_removal'; - /** @internal */ - Cascade['CANCEL_ORPHAN_REMOVAL'] = 'cancel_orphan_removal'; -})(Cascade || (Cascade = {})); -/** Strategy used to load related entities when populating. */ -export var LoadStrategy; -(function (LoadStrategy) { - /** Load relations with a separate SELECT ... WHERE pk IN (...) query. */ - LoadStrategy['SELECT_IN'] = 'select-in'; - /** Load relations via SQL JOINs in a single query. */ - LoadStrategy['JOINED'] = 'joined'; - /** Use joined strategy for to-one relations and select-in for to-many. */ - LoadStrategy['BALANCED'] = 'balanced'; -})(LoadStrategy || (LoadStrategy = {})); -/** Controls which relation types use the dataloader for batched loading. */ -export var DataloaderType; -(function (DataloaderType) { - /** Dataloader is disabled. */ - DataloaderType[(DataloaderType['NONE'] = 0)] = 'NONE'; - /** Use the dataloader for Reference (to-one) relations only. */ - DataloaderType[(DataloaderType['REFERENCE'] = 1)] = 'REFERENCE'; - /** Use the dataloader for Collection (to-many) relations only. */ - DataloaderType[(DataloaderType['COLLECTION'] = 2)] = 'COLLECTION'; - /** Use the dataloader for both Reference and Collection relations. */ - DataloaderType[(DataloaderType['ALL'] = 3)] = 'ALL'; -})(DataloaderType || (DataloaderType = {})); -/** Locking strategy for concurrency control. */ -export var LockMode; -(function (LockMode) { - /** No locking. */ - LockMode[(LockMode['NONE'] = 0)] = 'NONE'; - /** Optimistic locking via a version column. */ - LockMode[(LockMode['OPTIMISTIC'] = 1)] = 'OPTIMISTIC'; - /** Pessimistic shared lock (FOR SHARE). */ - LockMode[(LockMode['PESSIMISTIC_READ'] = 2)] = 'PESSIMISTIC_READ'; - /** Pessimistic exclusive lock (FOR UPDATE). */ - LockMode[(LockMode['PESSIMISTIC_WRITE'] = 3)] = 'PESSIMISTIC_WRITE'; - /** Pessimistic exclusive lock that skips already-locked rows (FOR UPDATE SKIP LOCKED). */ - LockMode[(LockMode['PESSIMISTIC_PARTIAL_WRITE'] = 4)] = 'PESSIMISTIC_PARTIAL_WRITE'; - /** Pessimistic exclusive lock that fails immediately if the row is locked (FOR UPDATE NOWAIT). */ - LockMode[(LockMode['PESSIMISTIC_WRITE_OR_FAIL'] = 5)] = 'PESSIMISTIC_WRITE_OR_FAIL'; - /** Pessimistic shared lock that skips already-locked rows (FOR SHARE SKIP LOCKED). */ - LockMode[(LockMode['PESSIMISTIC_PARTIAL_READ'] = 6)] = 'PESSIMISTIC_PARTIAL_READ'; - /** Pessimistic shared lock that fails immediately if the row is locked (FOR SHARE NOWAIT). */ - LockMode[(LockMode['PESSIMISTIC_READ_OR_FAIL'] = 7)] = 'PESSIMISTIC_READ_OR_FAIL'; -})(LockMode || (LockMode = {})); -/** Transaction isolation levels as defined by the SQL standard (plus vendor extensions). */ -export var IsolationLevel; -(function (IsolationLevel) { - /** Allows dirty reads, non-repeatable reads, and phantom reads. */ - IsolationLevel['READ_UNCOMMITTED'] = 'read uncommitted'; - /** Prevents dirty reads; non-repeatable and phantom reads are still possible. */ - IsolationLevel['READ_COMMITTED'] = 'read committed'; - /** Snapshot isolation — each transaction sees a consistent snapshot of the database (MSSQL). */ - IsolationLevel['SNAPSHOT'] = 'snapshot'; - /** Prevents dirty and non-repeatable reads; phantom reads are still possible. */ - IsolationLevel['REPEATABLE_READ'] = 'repeatable read'; - /** Full isolation — transactions are executed as if they were run sequentially. */ - IsolationLevel['SERIALIZABLE'] = 'serializable'; -})(IsolationLevel || (IsolationLevel = {})); -/** Lifecycle and transaction events emitted by the ORM. */ -export var EventType; -(function (EventType) { - /** Fired when an entity instance is created (via constructor or `em.create`). */ - EventType['onInit'] = 'onInit'; - /** Fired after an entity is loaded from the database. */ - EventType['onLoad'] = 'onLoad'; - /** Fired before a new entity is inserted into the database. */ - EventType['beforeCreate'] = 'beforeCreate'; - /** Fired after a new entity has been inserted into the database. */ - EventType['afterCreate'] = 'afterCreate'; - /** Fired before an existing entity is updated in the database. */ - EventType['beforeUpdate'] = 'beforeUpdate'; - /** Fired after an existing entity has been updated in the database. */ - EventType['afterUpdate'] = 'afterUpdate'; - /** Fired before an upsert operation. */ - EventType['beforeUpsert'] = 'beforeUpsert'; - /** Fired after an upsert operation. */ - EventType['afterUpsert'] = 'afterUpsert'; - /** Fired before an entity is deleted from the database. */ - EventType['beforeDelete'] = 'beforeDelete'; - /** Fired after an entity has been deleted from the database. */ - EventType['afterDelete'] = 'afterDelete'; - /** Fired at the very beginning of `em.flush()`, before change detection. */ - EventType['beforeFlush'] = 'beforeFlush'; - /** Fired during `em.flush()` after change detection but before database writes. */ - EventType['onFlush'] = 'onFlush'; - /** Fired after `em.flush()` has completed all database writes. */ - EventType['afterFlush'] = 'afterFlush'; - /** Fired before a new database transaction is started. */ - EventType['beforeTransactionStart'] = 'beforeTransactionStart'; - /** Fired after a new database transaction has been started. */ - EventType['afterTransactionStart'] = 'afterTransactionStart'; - /** Fired before a database transaction is committed. */ - EventType['beforeTransactionCommit'] = 'beforeTransactionCommit'; - /** Fired after a database transaction has been committed. */ - EventType['afterTransactionCommit'] = 'afterTransactionCommit'; - /** Fired before a database transaction is rolled back. */ - EventType['beforeTransactionRollback'] = 'beforeTransactionRollback'; - /** Fired after a database transaction has been rolled back. */ - EventType['afterTransactionRollback'] = 'afterTransactionRollback'; -})(EventType || (EventType = {})); -export const EventTypeMap = Object.keys(EventType).reduce((a, b, i) => { - a[b] = i; - return a; -}, {}); -/** Controls how a transactional operation interacts with an existing transaction. */ -export var TransactionPropagation; -(function (TransactionPropagation) { - /** Join the current transaction or create a new one if none exists. */ - TransactionPropagation['REQUIRED'] = 'required'; - /** Always create a new transaction, suspending the current one if it exists. */ - TransactionPropagation['REQUIRES_NEW'] = 'requires_new'; - /** Create a nested savepoint within the current transaction, or a new transaction if none exists. */ - TransactionPropagation['NESTED'] = 'nested'; - /** Execute non-transactionally, suspending the current transaction if one exists. */ - TransactionPropagation['NOT_SUPPORTED'] = 'not_supported'; - /** Join the current transaction if one exists, otherwise execute non-transactionally. */ - TransactionPropagation['SUPPORTS'] = 'supports'; - /** Join the current transaction; throw if no transaction is active. */ - TransactionPropagation['MANDATORY'] = 'mandatory'; - /** Execute non-transactionally; throw if a transaction is active. */ - TransactionPropagation['NEVER'] = 'never'; -})(TransactionPropagation || (TransactionPropagation = {})); -export class PlainObject {} -/** Constraint deferral mode for database constraints (e.g., foreign keys, unique). */ -export var DeferMode; -(function (DeferMode) { - /** The constraint is checked immediately by default, but can be deferred within a transaction. */ - DeferMode['INITIALLY_IMMEDIATE'] = 'immediate'; - /** The constraint is deferred until the transaction is committed. */ - DeferMode['INITIALLY_DEFERRED'] = 'deferred'; -})(DeferMode || (DeferMode = {})); diff --git a/node_modules/@mikro-orm/core/errors.d.ts b/node_modules/@mikro-orm/core/errors.d.ts deleted file mode 100644 index a256d9c..0000000 --- a/node_modules/@mikro-orm/core/errors.d.ts +++ /dev/null @@ -1,132 +0,0 @@ -import type { - AnyEntity, - Constructor, - Dictionary, - EntityMetadata, - EntityName, - EntityProperty, - IPrimaryKey, -} from './typings.js'; -/** Base error class for ORM validation errors such as invalid entity state or incorrect usage. */ -export declare class ValidationError extends Error { - readonly entity?: T | undefined; - constructor(message: string, entity?: T | undefined); - /** - * Gets instance of entity that caused this error. - */ - getEntity(): AnyEntity | undefined; - static fromWrongPropertyType( - entity: AnyEntity, - property: string, - expectedType: string, - givenType: string, - givenValue: string, - ): ValidationError; - static fromWrongRepositoryType(entityName: string, repoType: string, method: string): ValidationError; - static fromMergeWithoutPK(meta: EntityMetadata): ValidationError; - static transactionRequired(): ValidationError; - static entityNotManaged(entity: AnyEntity): ValidationError; - static notEntity(owner: AnyEntity, prop: EntityProperty, data: any): ValidationError; - static notDiscoveredEntity(data: any, meta?: EntityMetadata, action?: string): ValidationError; - static invalidPropertyName(entityName: EntityName, invalid: string): ValidationError; - static invalidCollectionValues(entityName: string, propName: string, invalid: unknown): ValidationError; - static invalidEnumArrayItems(entityName: string, invalid: unknown): ValidationError; - static invalidType(type: Constructor, value: any, mode: string): ValidationError; - static propertyRequired(entity: AnyEntity, property: EntityProperty): ValidationError; - static cannotModifyInverseCollection(owner: AnyEntity, property: EntityProperty): ValidationError; - static cannotModifyReadonlyCollection(owner: AnyEntity, property: EntityProperty): ValidationError; - static cannotRemoveFromCollectionWithoutOrphanRemoval(owner: AnyEntity, property: EntityProperty): ValidationError; - static invalidCompositeIdentifier(meta: EntityMetadata): ValidationError; - static cannotCommit(): ValidationError; - static cannotUseGlobalContext(): ValidationError; - static cannotUseOperatorsInsideEmbeddables( - entityName: EntityName, - propName: string, - payload: unknown, - ): ValidationError; - static cannotUseGroupOperatorsInsideScalars( - entityName: EntityName, - propName: string, - payload: unknown, - ): ValidationError; - static invalidEmbeddableQuery(entityName: EntityName, propName: string, embeddableType: string): ValidationError; - static invalidQueryCondition(cond: unknown): ValidationError; -} -/** Error thrown when cursor-based pagination encounters missing or invalid cursor values. */ -export declare class CursorError extends ValidationError { - static entityNotPopulated(entity: AnyEntity, prop: string): ValidationError; - static missingValue(entityName: string, prop: string): ValidationError; -} -/** Error thrown when an optimistic lock conflict is detected during entity persistence. */ -export declare class OptimisticLockError extends ValidationError { - static notVersioned(meta: EntityMetadata): OptimisticLockError; - static lockFailed(entityOrName: AnyEntity | string): OptimisticLockError; - static lockFailedVersionMismatch( - entity: AnyEntity, - expectedLockVersion: number | Date, - actualLockVersion: number | Date, - ): OptimisticLockError; -} -/** Error thrown when entity metadata is invalid, incomplete, or inconsistent. */ -export declare class MetadataError extends ValidationError { - static fromMissingPrimaryKey(meta: EntityMetadata): MetadataError; - static fromWrongReference( - meta: EntityMetadata, - prop: EntityProperty, - key: 'inversedBy' | 'mappedBy', - owner?: EntityProperty, - ): MetadataError; - static fromWrongForeignKey(meta: EntityMetadata, prop: EntityProperty, key: string): MetadataError; - static fromWrongTypeDefinition(meta: EntityMetadata, prop: EntityProperty): MetadataError; - static fromWrongOwnership(meta: EntityMetadata, prop: EntityProperty, key: 'inversedBy' | 'mappedBy'): MetadataError; - static fromWrongReferenceKind(meta: EntityMetadata, owner: EntityProperty, prop: EntityProperty): MetadataError; - static fromInversideSidePrimary(meta: EntityMetadata, owner: EntityProperty, prop: EntityProperty): MetadataError; - static unknownIndexProperty(meta: EntityMetadata, prop: string, type: string): MetadataError; - static multipleVersionFields(meta: EntityMetadata, fields: string[]): MetadataError; - static invalidVersionFieldType(meta: EntityMetadata): MetadataError; - static fromUnknownEntity(entityName: string, source: string): MetadataError; - static noEntityDiscovered(): MetadataError; - static onlyAbstractEntitiesDiscovered(): MetadataError; - static duplicateEntityDiscovered(paths: string[]): MetadataError; - static duplicateFieldName(entityName: EntityName, names: [string, string][]): MetadataError; - static multipleDecorators(entityName: string, propertyName: string): MetadataError; - static missingMetadata(entity: string): MetadataError; - static invalidPrimaryKey(meta: EntityMetadata, prop: EntityProperty, requiredName: string): MetadataError; - static invalidManyToManyWithPivotEntity( - meta1: EntityMetadata, - prop1: EntityProperty, - meta2: EntityMetadata, - prop2: EntityProperty, - ): MetadataError; - static targetIsAbstract(meta: EntityMetadata, prop: EntityProperty): MetadataError; - static nonPersistentCompositeProp(meta: EntityMetadata, prop: EntityProperty): MetadataError; - static propertyTargetsEntityType(meta: EntityMetadata, prop: EntityProperty, target: EntityMetadata): MetadataError; - static fromMissingOption(meta: EntityMetadata, prop: EntityProperty, option: string): MetadataError; - static targetKeyOnManyToMany(meta: EntityMetadata, prop: EntityProperty): MetadataError; - static targetKeyNotUnique(meta: EntityMetadata, prop: EntityProperty, target?: EntityMetadata): MetadataError; - static targetKeyNotFound(meta: EntityMetadata, prop: EntityProperty, target?: EntityMetadata): MetadataError; - static incompatiblePolymorphicTargets( - meta: EntityMetadata, - prop: EntityProperty, - target1: EntityMetadata, - target2: EntityMetadata, - reason: string, - ): MetadataError; - static dangerousPropertyName(meta: EntityMetadata, prop: EntityProperty): MetadataError; - static viewEntityWithoutExpression(meta: EntityMetadata): MetadataError; - static mixedInheritanceStrategies(root: EntityMetadata, child: EntityMetadata): MetadataError; - static tptNotSupportedByDriver(meta: EntityMetadata): MetadataError; - private static fromMessage; -} -/** Error thrown when an entity lookup fails to find the expected result. */ -export declare class NotFoundError extends ValidationError { - static findOneFailed(name: string, where: Dictionary | IPrimaryKey): NotFoundError; - static findExactlyOneFailed(name: string, where: Dictionary | IPrimaryKey): NotFoundError; - static failedToLoadProperty(name: string, propName: string, where: unknown): NotFoundError; -} -/** Error thrown when a transaction propagation requirement is not satisfied. */ -export declare class TransactionStateError extends ValidationError { - static requiredTransactionNotFound(propagation: string): TransactionStateError; - static transactionNotAllowed(propagation: string): TransactionStateError; - static invalidPropagation(propagation: string): TransactionStateError; -} diff --git a/node_modules/@mikro-orm/core/errors.js b/node_modules/@mikro-orm/core/errors.js deleted file mode 100644 index 23d129a..0000000 --- a/node_modules/@mikro-orm/core/errors.js +++ /dev/null @@ -1,371 +0,0 @@ -import { inspect } from './logging/inspect.js'; -import { Utils } from './utils/Utils.js'; -/** Base error class for ORM validation errors such as invalid entity state or incorrect usage. */ -export class ValidationError extends Error { - entity; - constructor(message, entity) { - super(message); - this.entity = entity; - Error.captureStackTrace(this, this.constructor); - this.name = this.constructor.name; - this.message = message; - } - /** - * Gets instance of entity that caused this error. - */ - getEntity() { - return this.entity; - } - static fromWrongPropertyType(entity, property, expectedType, givenType, givenValue) { - const entityName = entity.constructor.name; - const msg = `Trying to set ${entityName}.${property} of type '${expectedType}' to ${inspect(givenValue)} of type '${givenType}'`; - return new ValidationError(msg); - } - static fromWrongRepositoryType(entityName, repoType, method) { - const msg = `Trying to use EntityRepository.${method}() with '${entityName}' entity while the repository is of type '${repoType}'`; - return new ValidationError(msg); - } - static fromMergeWithoutPK(meta) { - return new ValidationError(`You cannot merge entity '${meta.className}' without identifier!`); - } - static transactionRequired() { - return new ValidationError('An open transaction is required for this operation'); - } - static entityNotManaged(entity) { - return new ValidationError( - `Entity ${entity.constructor.name} is not managed. An entity is managed if its fetched from the database or registered as new through EntityManager.persist()`, - ); - } - static notEntity(owner, prop, data) { - const type = /\[object (\w+)]/.exec(Object.prototype.toString.call(data))[1].toLowerCase(); - return new ValidationError( - `Entity of type ${prop.type} expected for property ${owner.constructor.name}.${prop.name}, ${inspect(data)} of type ${type} given. If you are using Object.assign(entity, data), use em.assign(entity, data) instead.`, - ); - } - static notDiscoveredEntity(data, meta, action = 'persist') { - /* v8 ignore next */ - const type = meta?.className ?? /\[object (\w+)]/.exec(Object.prototype.toString.call(data))[1].toLowerCase(); - let err = `Trying to ${action} not discovered entity of type ${type}.`; - if (meta) { - err += ` Entity with this name was discovered, but not the prototype you are passing to the ORM. If using EntitySchema, be sure to point to the implementation via \`class\`.`; - } - return new ValidationError(err); - } - static invalidPropertyName(entityName, invalid) { - return new ValidationError(`Entity '${Utils.className(entityName)}' does not have property '${invalid}'`); - } - static invalidCollectionValues(entityName, propName, invalid) { - return new ValidationError( - `Invalid collection values provided for '${entityName}.${propName}' in ${entityName}.assign(): ${inspect(invalid)}`, - ); - } - static invalidEnumArrayItems(entityName, invalid) { - return new ValidationError(`Invalid enum array items provided in ${entityName}: ${inspect(invalid)}`); - } - static invalidType(type, value, mode) { - const valueType = /\[object (\w+)]/.exec(Object.prototype.toString.call(value))[1].toLowerCase(); - if (value instanceof Date) { - value = value.toISOString(); - } - return new ValidationError( - `Could not convert ${mode} value '${value}' of type '${valueType}' to type ${type.name}`, - ); - } - static propertyRequired(entity, property) { - const entityName = entity.__meta.className; - return new ValidationError( - `Value for ${entityName}.${property.name} is required, '${entity[property.name]}' found\nentity: ${inspect(entity)}`, - entity, - ); - } - static cannotModifyInverseCollection(owner, property) { - const inverseCollection = `${owner.constructor.name}.${property.name}`; - const ownerCollection = `${property.type}.${property.mappedBy}`; - const error = - `You cannot modify inverse side of M:N collection ${inverseCollection} when the owning side is not initialized. ` + - `Consider working with the owning side instead (${ownerCollection}).`; - return new ValidationError(error, owner); - } - static cannotModifyReadonlyCollection(owner, property) { - return new ValidationError( - `You cannot modify collection ${owner.constructor.name}.${property.name} as it is marked as readonly.`, - owner, - ); - } - static cannotRemoveFromCollectionWithoutOrphanRemoval(owner, property) { - const options = [ - ' - add `orphanRemoval: true` to the collection options', - " - add `deleteRule: 'cascade'` to the owning side options", - ' - add `nullable: true` to the owning side options', - ].join('\n'); - return new ValidationError( - `Removing items from collection ${owner.constructor.name}.${property.name} without \`orphanRemoval: true\` would break non-null constraint on the owning side. You have several options: \n${options}`, - owner, - ); - } - static invalidCompositeIdentifier(meta) { - return new ValidationError(`Composite key required for entity ${meta.className}.`); - } - static cannotCommit() { - return new ValidationError('You cannot call em.flush() from inside lifecycle hook handlers'); - } - static cannotUseGlobalContext() { - return new ValidationError( - "Using global EntityManager instance methods for context specific actions is disallowed. If you need to work with the global instance's identity map, use `allowGlobalContext` configuration option or `fork()` instead.", - ); - } - static cannotUseOperatorsInsideEmbeddables(entityName, propName, payload) { - return new ValidationError( - `Using operators inside embeddables is not allowed, move the operator above. (property: ${Utils.className(entityName)}.${propName}, payload: ${inspect(payload)})`, - ); - } - static cannotUseGroupOperatorsInsideScalars(entityName, propName, payload) { - return new ValidationError( - `Using group operators ($and/$or) inside scalar properties is not allowed, move the operator above. (property: ${Utils.className(entityName)}.${propName}, payload: ${inspect(payload)})`, - ); - } - static invalidEmbeddableQuery(entityName, propName, embeddableType) { - return new ValidationError( - `Invalid query for entity '${Utils.className(entityName)}', property '${propName}' does not exist in embeddable '${embeddableType}'`, - ); - } - /* v8 ignore next */ - static invalidQueryCondition(cond) { - return new ValidationError(`Invalid query condition: ${inspect(cond, { depth: 5 })}`); - } -} -/** Error thrown when cursor-based pagination encounters missing or invalid cursor values. */ -export class CursorError extends ValidationError { - static entityNotPopulated(entity, prop) { - return new CursorError(`Cannot create cursor, value for '${entity.constructor.name}.${prop}' is missing.`); - } - static missingValue(entityName, prop) { - return new CursorError(`Invalid cursor condition, value for '${entityName}.${prop}' is missing.`); - } -} -/** Error thrown when an optimistic lock conflict is detected during entity persistence. */ -export class OptimisticLockError extends ValidationError { - static notVersioned(meta) { - return new OptimisticLockError(`Cannot obtain optimistic lock on unversioned entity ${meta.className}`); - } - static lockFailed(entityOrName) { - const name = typeof entityOrName === 'string' ? entityOrName : entityOrName.constructor.name; - const entity = typeof entityOrName === 'string' ? undefined : entityOrName; - return new OptimisticLockError(`The optimistic lock on entity ${name} failed`, entity); - } - static lockFailedVersionMismatch(entity, expectedLockVersion, actualLockVersion) { - expectedLockVersion = expectedLockVersion instanceof Date ? expectedLockVersion.getTime() : expectedLockVersion; - actualLockVersion = actualLockVersion instanceof Date ? actualLockVersion.getTime() : actualLockVersion; - return new OptimisticLockError( - `The optimistic lock failed, version ${expectedLockVersion} was expected, but is actually ${actualLockVersion}`, - entity, - ); - } -} -/** Error thrown when entity metadata is invalid, incomplete, or inconsistent. */ -export class MetadataError extends ValidationError { - static fromMissingPrimaryKey(meta) { - return new MetadataError(`${meta.className} entity is missing @PrimaryKey()`); - } - static fromWrongReference(meta, prop, key, owner) { - if (owner) { - return MetadataError.fromMessage( - meta, - prop, - `has wrong '${key}' reference type: ${owner.type} instead of ${meta.className}`, - ); - } - return MetadataError.fromMessage(meta, prop, `has unknown '${key}' reference: ${prop.type}.${prop[key]}`); - } - static fromWrongForeignKey(meta, prop, key) { - return MetadataError.fromMessage( - meta, - prop, - `requires explicit '${key}' option, since the 'joinColumns' are not matching the length.`, - ); - } - static fromWrongTypeDefinition(meta, prop) { - if (!prop.type) { - return MetadataError.fromMessage(meta, prop, `is missing type definition`); - } - return MetadataError.fromMessage(meta, prop, `has unknown type: ${prop.type}`); - } - static fromWrongOwnership(meta, prop, key) { - const type = key === 'inversedBy' ? 'owning' : 'inverse'; - const other = key === 'inversedBy' ? 'mappedBy' : 'inversedBy'; - return new MetadataError( - `Both ${meta.className}.${prop.name} and ${prop.type}.${prop[key]} are defined as ${type} sides, use '${other}' on one of them`, - ); - } - static fromWrongReferenceKind(meta, owner, prop) { - return new MetadataError( - `${meta.className}.${prop.name} is of type ${prop.kind} which is incompatible with its owning side ${prop.type}.${owner.name} of type ${owner.kind}`, - ); - } - static fromInversideSidePrimary(meta, owner, prop) { - return new MetadataError( - `${meta.className}.${prop.name} cannot be primary key as it is defined as inverse side. Maybe you should swap the use of 'inversedBy' and 'mappedBy'.`, - ); - } - static unknownIndexProperty(meta, prop, type) { - return new MetadataError( - `Entity ${meta.className} has wrong ${type} definition: '${prop}' does not exist. You need to use property name, not column name.`, - ); - } - static multipleVersionFields(meta, fields) { - return new MetadataError( - `Entity ${meta.className} has multiple version properties defined: '${fields.join("', '")}'. Only one version property is allowed per entity.`, - ); - } - static invalidVersionFieldType(meta) { - const prop = meta.properties[meta.versionProperty]; - return new MetadataError( - `Version property ${meta.className}.${prop.name} has unsupported type '${prop.type}'. Only 'number' and 'Date' are allowed.`, - ); - } - static fromUnknownEntity(entityName, source) { - return new MetadataError( - `Entity '${entityName}' was not discovered, please make sure to provide it in 'entities' array when initializing the ORM (used in ${source})`, - ); - } - static noEntityDiscovered() { - return new MetadataError('No entities were discovered'); - } - static onlyAbstractEntitiesDiscovered() { - return new MetadataError( - 'Only abstract entities were discovered, maybe you forgot to use @Entity() decorator? This can also happen when you have multiple `@mikro-orm/core` packages installed side by side.', - ); - } - static duplicateEntityDiscovered(paths) { - return new MetadataError(`Duplicate table names are not allowed: ${paths.join(', ')}`); - } - static duplicateFieldName(entityName, names) { - return new MetadataError( - `Duplicate fieldNames are not allowed: ${names.map(n => `${Utils.className(entityName)}.${n[0]} (fieldName: '${n[1]}')`).join(', ')}`, - ); - } - static multipleDecorators(entityName, propertyName) { - return new MetadataError(`Multiple property decorators used on '${entityName}.${propertyName}' property`); - } - static missingMetadata(entity) { - return new MetadataError(`Metadata for entity ${entity} not found`); - } - static invalidPrimaryKey(meta, prop, requiredName) { - return this.fromMessage(meta, prop, `has wrong field name, '${requiredName}' is required in current driver`); - } - static invalidManyToManyWithPivotEntity(meta1, prop1, meta2, prop2) { - const p1 = `${meta1.className}.${prop1.name}`; - const p2 = `${meta2.className}.${prop2.name}`; - return new MetadataError( - `${p1} and ${p2} use the same 'pivotEntity', but don't form a bidirectional relation. Specify 'inversedBy' or 'mappedBy' to link them.`, - ); - } - static targetIsAbstract(meta, prop) { - return this.fromMessage( - meta, - prop, - `targets abstract entity ${prop.type}. Maybe you forgot to put @Entity() decorator on the ${prop.type} class?`, - ); - } - static nonPersistentCompositeProp(meta, prop) { - return this.fromMessage( - meta, - prop, - `is non-persistent relation which targets composite primary key. This is not supported and will cause issues, 'persist: false' should be added to the properties representing single columns instead.`, - ); - } - static propertyTargetsEntityType(meta, prop, target) { - /* v8 ignore next */ - const suggestion = target.embeddable ? 'Embedded' : 'ManyToOne'; - return this.fromMessage( - meta, - prop, - `is defined as scalar @Property(), but its type is a discovered entity ${target.className}. Maybe you want to use @${suggestion}() decorator instead?`, - ); - } - static fromMissingOption(meta, prop, option) { - return this.fromMessage(meta, prop, `is missing '${option}' option`); - } - static targetKeyOnManyToMany(meta, prop) { - return this.fromMessage(meta, prop, `uses 'targetKey' option which is not supported for ManyToMany relations`); - } - static targetKeyNotUnique(meta, prop, target) { - const targetName = target?.className ?? prop.type; - return this.fromMessage( - meta, - prop, - `has 'targetKey' set to '${prop.targetKey}', but ${targetName}.${prop.targetKey} is not marked as unique`, - ); - } - static targetKeyNotFound(meta, prop, target) { - const targetName = target?.className ?? prop.type; - return this.fromMessage( - meta, - prop, - `has 'targetKey' set to '${prop.targetKey}', but ${targetName}.${prop.targetKey} does not exist`, - ); - } - static incompatiblePolymorphicTargets(meta, prop, target1, target2, reason) { - return this.fromMessage( - meta, - prop, - `has incompatible polymorphic targets ${target1.className} and ${target2.className}: ${reason}`, - ); - } - static dangerousPropertyName(meta, prop) { - return this.fromMessage( - meta, - prop, - `uses a dangerous property name '${prop.name}' which could lead to prototype pollution. Please use a different property name.`, - ); - } - static viewEntityWithoutExpression(meta) { - return new MetadataError( - `View entity ${meta.className} is missing 'expression'. View entities must have an expression defining the SQL query.`, - ); - } - static mixedInheritanceStrategies(root, child) { - return new MetadataError( - `Entity ${child.className} cannot mix STI (Single Table Inheritance) and TPT (Table-Per-Type) inheritance. Root entity ${root.className} uses STI (discriminatorColumn) but also has inheritance: 'tpt'. Choose one inheritance strategy per hierarchy.`, - ); - } - static tptNotSupportedByDriver(meta) { - return new MetadataError( - `Entity ${meta.className} uses TPT (Table-Per-Type) inheritance which is not supported by the current driver. TPT requires SQL JOINs and is only available with SQL drivers.`, - ); - } - static fromMessage(meta, prop, message) { - return new MetadataError(`${meta.className}.${prop.name} ${message}`); - } -} -/** Error thrown when an entity lookup fails to find the expected result. */ -export class NotFoundError extends ValidationError { - static findOneFailed(name, where) { - return new NotFoundError(`${name} not found (${inspect(where)})`); - } - static findExactlyOneFailed(name, where) { - return new NotFoundError( - `Wrong number of ${name} entities found for query ${inspect(where)}, expected exactly one`, - ); - } - static failedToLoadProperty(name, propName, where) { - const whereString = typeof where === 'object' ? inspect(where) : where; - return new NotFoundError(`${name} (${whereString}) failed to load property '${propName}'`); - } -} -/** Error thrown when a transaction propagation requirement is not satisfied. */ -export class TransactionStateError extends ValidationError { - static requiredTransactionNotFound(propagation) { - return new TransactionStateError( - `No existing transaction found for transaction marked with propagation "${propagation}"`, - ); - } - static transactionNotAllowed(propagation) { - return new TransactionStateError( - `Existing transaction found for transaction marked with propagation "${propagation}"`, - ); - } - static invalidPropagation(propagation) { - return new TransactionStateError(`Unsupported transaction propagation type: ${propagation}`); - } -} diff --git a/node_modules/@mikro-orm/core/events/EventManager.d.ts b/node_modules/@mikro-orm/core/events/EventManager.d.ts deleted file mode 100644 index 123b070..0000000 --- a/node_modules/@mikro-orm/core/events/EventManager.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { EntityMetadata } from '../typings.js'; -import type { EventArgs, EventSubscriber, FlushEventArgs, TransactionEventArgs } from './EventSubscriber.js'; -import { EventType, type TransactionEventType } from '../enums.js'; -/** Manages event subscribers and dispatches entity/flush/transaction lifecycle events. */ -export declare class EventManager { - #private; - constructor(subscribers: Iterable); - /** Registers an event subscriber and indexes its subscribed entities and event types. */ - registerSubscriber(subscriber: EventSubscriber): void; - /** Returns the set of all registered event subscribers. */ - getSubscribers(): Set; - dispatchEvent( - event: TransactionEventType, - args: TransactionEventArgs, - meta?: EntityMetadata, - ): unknown; - dispatchEvent( - event: EventType.onInit, - args: Partial>, - meta?: EntityMetadata, - ): unknown; - dispatchEvent( - event: EventType, - args: Partial | FlushEventArgs>, - meta?: EntityMetadata, - ): Promise; - /** Checks whether there are any listeners (hooks or subscribers) for the given event type and entity. */ - hasListeners(event: EventType, meta: EntityMetadata): boolean; - /** Creates a new EventManager with the same set of subscribers. */ - clone(): EventManager; - private getSubscribedEntities; -} diff --git a/node_modules/@mikro-orm/core/events/EventManager.js b/node_modules/@mikro-orm/core/events/EventManager.js deleted file mode 100644 index 43778f5..0000000 --- a/node_modules/@mikro-orm/core/events/EventManager.js +++ /dev/null @@ -1,91 +0,0 @@ -import { Utils } from '../utils/Utils.js'; -import { EventType, EventTypeMap } from '../enums.js'; -/** Manages event subscribers and dispatches entity/flush/transaction lifecycle events. */ -export class EventManager { - #listeners = {}; - #entities = new Map(); - #cache = new Map(); - #subscribers = new Set(); - constructor(subscribers) { - for (const subscriber of subscribers) { - this.registerSubscriber(subscriber); - } - } - /** Registers an event subscriber and indexes its subscribed entities and event types. */ - registerSubscriber(subscriber) { - if (this.#subscribers.has(subscriber)) { - return; - } - this.#subscribers.add(subscriber); - this.#entities.set(subscriber, this.getSubscribedEntities(subscriber)); - this.#cache.clear(); - Utils.keys(EventType) - .filter(event => event in subscriber) - .forEach(event => { - this.#listeners[event] ??= new Set(); - this.#listeners[event].add(subscriber); - }); - } - /** Returns the set of all registered event subscribers. */ - getSubscribers() { - return this.#subscribers; - } - dispatchEvent(event, args, meta) { - const listeners = []; - const entity = args.entity; - // execute lifecycle hooks first - meta ??= entity?.__meta; - const hooks = meta?.hooks[event] || []; - listeners.push( - ...hooks.map(hook => { - const prototypeHook = meta?.prototype[hook]; - const handler = typeof hook === 'function' ? hook : (entity[hook] ?? prototypeHook); - return handler.bind(entity); - }), - ); - for (const listener of this.#listeners[event] ?? new Set()) { - const entities = this.#entities.get(listener); - if (entities.size === 0 || !entity || entities.has(entity.constructor.name)) { - listeners.push(listener[event].bind(listener)); - } - } - if (event === EventType.onInit) { - for (const listener of listeners) { - void listener(args); - } - return; - } - return Utils.runSerial(listeners, listener => listener(args)); - } - /** Checks whether there are any listeners (hooks or subscribers) for the given event type and entity. */ - hasListeners(event, meta) { - const cacheKey = meta._id + EventTypeMap[event]; - if (this.#cache.has(cacheKey)) { - return this.#cache.get(cacheKey); - } - const hasHooks = meta.hooks[event]?.length; - if (hasHooks) { - this.#cache.set(cacheKey, true); - return true; - } - for (const listener of this.#listeners[event] ?? new Set()) { - const entities = this.#entities.get(listener); - if (entities.size === 0 || entities.has(meta.className)) { - this.#cache.set(cacheKey, true); - return true; - } - } - this.#cache.set(cacheKey, false); - return false; - } - /** Creates a new EventManager with the same set of subscribers. */ - clone() { - return new EventManager(this.#subscribers); - } - getSubscribedEntities(listener) { - if (!listener.getSubscribedEntities) { - return new Set(); - } - return new Set(listener.getSubscribedEntities().map(name => Utils.className(name))); - } -} diff --git a/node_modules/@mikro-orm/core/events/EventSubscriber.d.ts b/node_modules/@mikro-orm/core/events/EventSubscriber.d.ts deleted file mode 100644 index 4ff688f..0000000 --- a/node_modules/@mikro-orm/core/events/EventSubscriber.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -import type { EntityName, EntityMetadata } from '../typings.js'; -import type { EntityManager } from '../EntityManager.js'; -import type { UnitOfWork } from '../unit-of-work/UnitOfWork.js'; -import type { ChangeSet } from '../unit-of-work/ChangeSet.js'; -import type { Transaction } from '../connections/Connection.js'; -/** Arguments passed to entity lifecycle event hooks. */ -export interface EventArgs { - entity: T; - em: EntityManager; - meta: EntityMetadata; - changeSet?: ChangeSet; -} -/** Arguments passed to flush lifecycle event hooks (beforeFlush, onFlush, afterFlush). */ -export interface FlushEventArgs extends Omit, 'entity' | 'changeSet' | 'meta'> { - uow: UnitOfWork; -} -/** Arguments passed to transaction lifecycle event hooks (start, commit, rollback). */ -export interface TransactionEventArgs extends Omit, 'entity' | 'meta' | 'changeSet'> { - transaction?: Transaction & { - savepointName?: string; - }; - uow?: UnitOfWork; -} -/** Interface for subscribing to entity and transaction lifecycle events. */ -export interface EventSubscriber { - getSubscribedEntities?(): EntityName[]; - onInit?(args: EventArgs): void; - onLoad?(args: EventArgs): void | Promise; - beforeCreate?(args: EventArgs): void | Promise; - afterCreate?(args: EventArgs): void | Promise; - beforeUpdate?(args: EventArgs): void | Promise; - afterUpdate?(args: EventArgs): void | Promise; - beforeUpsert?(args: EventArgs): void | Promise; - afterUpsert?(args: EventArgs): void | Promise; - beforeDelete?(args: EventArgs): void | Promise; - afterDelete?(args: EventArgs): void | Promise; - beforeFlush?(args: FlushEventArgs): void | Promise; - onFlush?(args: FlushEventArgs): void | Promise; - afterFlush?(args: FlushEventArgs): void | Promise; - beforeTransactionStart?(args: TransactionEventArgs): void | Promise; - afterTransactionStart?(args: TransactionEventArgs): void | Promise; - beforeTransactionCommit?(args: TransactionEventArgs): void | Promise; - afterTransactionCommit?(args: TransactionEventArgs): void | Promise; - beforeTransactionRollback?(args: TransactionEventArgs): void | Promise; - afterTransactionRollback?(args: TransactionEventArgs): void | Promise; -} diff --git a/node_modules/@mikro-orm/core/events/EventSubscriber.js b/node_modules/@mikro-orm/core/events/EventSubscriber.js deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/@mikro-orm/core/events/EventSubscriber.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/@mikro-orm/core/events/TransactionEventBroadcaster.d.ts b/node_modules/@mikro-orm/core/events/TransactionEventBroadcaster.d.ts deleted file mode 100644 index 0d10bfc..0000000 --- a/node_modules/@mikro-orm/core/events/TransactionEventBroadcaster.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { Transaction } from '../connections/Connection.js'; -import type { EntityManager } from '../EntityManager.js'; -import type { TransactionEventType } from '../enums.js'; -/** Broadcasts transaction lifecycle events (start, commit, rollback) through the EventManager. */ -export declare class TransactionEventBroadcaster { - private readonly em; - readonly context?: - | { - topLevelTransaction?: boolean; - } - | undefined; - constructor( - em: EntityManager, - context?: - | { - topLevelTransaction?: boolean; - } - | undefined, - ); - /** Dispatches a transaction lifecycle event to the EventManager. */ - dispatchEvent(event: TransactionEventType, transaction?: Transaction): Promise; -} diff --git a/node_modules/@mikro-orm/core/events/TransactionEventBroadcaster.js b/node_modules/@mikro-orm/core/events/TransactionEventBroadcaster.js deleted file mode 100644 index d5b2fca..0000000 --- a/node_modules/@mikro-orm/core/events/TransactionEventBroadcaster.js +++ /dev/null @@ -1,17 +0,0 @@ -/** Broadcasts transaction lifecycle events (start, commit, rollback) through the EventManager. */ -export class TransactionEventBroadcaster { - em; - context; - constructor(em, context) { - this.em = em; - this.context = context; - } - /** Dispatches a transaction lifecycle event to the EventManager. */ - async dispatchEvent(event, transaction) { - await this.em.getEventManager().dispatchEvent(event, { - em: this.em, - uow: this.em.getUnitOfWork(false), - transaction, - }); - } -} diff --git a/node_modules/@mikro-orm/core/events/index.d.ts b/node_modules/@mikro-orm/core/events/index.d.ts deleted file mode 100644 index 9c34e6e..0000000 --- a/node_modules/@mikro-orm/core/events/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type * from './EventSubscriber.js'; -export * from './EventManager.js'; -export * from './TransactionEventBroadcaster.js'; diff --git a/node_modules/@mikro-orm/core/events/index.js b/node_modules/@mikro-orm/core/events/index.js deleted file mode 100644 index a0f36d9..0000000 --- a/node_modules/@mikro-orm/core/events/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export * from './EventManager.js'; -export * from './TransactionEventBroadcaster.js'; diff --git a/node_modules/@mikro-orm/core/exceptions.d.ts b/node_modules/@mikro-orm/core/exceptions.d.ts deleted file mode 100644 index 7d9058f..0000000 --- a/node_modules/@mikro-orm/core/exceptions.d.ts +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Base class for all errors detected in the driver. - */ -export declare class DriverException extends Error { - code?: string; - errno?: number; - sqlState?: string; - sqlMessage?: string; - errmsg?: string; - constructor(previous: Error); -} -/** - * Base class for all connection related errors detected in the driver. - */ -export declare class ConnectionException extends DriverException {} -/** - * Base class for all server related errors detected in the driver. - */ -export declare class ServerException extends DriverException {} -/** - * Base class for all constraint violation related errors detected in the driver. - */ -export declare class ConstraintViolationException extends ServerException {} -/** - * Base class for all already existing database object related errors detected in the driver. - * - * A database object is considered any asset that can be created in a database - * such as schemas, tables, views, sequences, triggers, constraints, indexes, - * functions, stored procedures etc. - */ -export declare class DatabaseObjectExistsException extends ServerException {} -/** - * Base class for all unknown database object related errors detected in the driver. - * - * A database object is considered any asset that can be created in a database - * such as schemas, tables, views, sequences, triggers, constraints, indexes, - * functions, stored procedures etc. - */ -export declare class DatabaseObjectNotFoundException extends ServerException {} -/** - * Exception for a deadlock error of a transaction detected in the driver. - */ -export declare class DeadlockException extends ServerException {} -/** - * Exception for a foreign key constraint violation detected in the driver. - */ -export declare class ForeignKeyConstraintViolationException extends ConstraintViolationException {} -/** - * Exception for a check constraint violation detected in the driver. - */ -export declare class CheckConstraintViolationException extends ConstraintViolationException {} -/** - * Exception for an invalid specified field name in a statement detected in the driver. - */ -export declare class InvalidFieldNameException extends ServerException {} -/** - * Exception for a lock wait timeout error of a transaction detected in the driver. - */ -export declare class LockWaitTimeoutException extends ServerException {} -/** - * Exception for a non-unique/ambiguous specified field name in a statement detected in the driver. - */ -export declare class NonUniqueFieldNameException extends ServerException {} -/** - * Exception for a NOT NULL constraint violation detected in the driver. - */ -export declare class NotNullConstraintViolationException extends ConstraintViolationException {} -/** - * Exception for a write operation attempt on a read-only database element detected in the driver. - */ -export declare class ReadOnlyException extends ServerException {} -/** - * Exception for a syntax error in a statement detected in the driver. - */ -export declare class SyntaxErrorException extends ServerException {} -/** - * Exception for an already existing table referenced in a statement detected in the driver. - */ -export declare class TableExistsException extends DatabaseObjectExistsException {} -/** - * Exception for an unknown table referenced in a statement detected in the driver. - */ -export declare class TableNotFoundException extends DatabaseObjectNotFoundException {} -/** - * Exception for a unique constraint violation detected in the driver. - */ -export declare class UniqueConstraintViolationException extends ConstraintViolationException {} diff --git a/node_modules/@mikro-orm/core/exceptions.js b/node_modules/@mikro-orm/core/exceptions.js deleted file mode 100644 index e0e644d..0000000 --- a/node_modules/@mikro-orm/core/exceptions.js +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Base class for all errors detected in the driver. - */ -export class DriverException extends Error { - code; - errno; - sqlState; - sqlMessage; - errmsg; - constructor(previous) { - super(previous.message); - Object.getOwnPropertyNames(previous).forEach(k => (this[k] = previous[k])); - this.name = this.constructor.name; - Error.captureStackTrace(this, this.constructor); - if (previous.stack) { - this.stack += - '\n\n' + - previous.stack - .split('\n') - .filter(l => l.trim().startsWith('at ')) - .join('\n'); - } - } -} -/** - * Base class for all connection related errors detected in the driver. - */ -export class ConnectionException extends DriverException {} -/** - * Base class for all server related errors detected in the driver. - */ -export class ServerException extends DriverException {} -/** - * Base class for all constraint violation related errors detected in the driver. - */ -export class ConstraintViolationException extends ServerException {} -/** - * Base class for all already existing database object related errors detected in the driver. - * - * A database object is considered any asset that can be created in a database - * such as schemas, tables, views, sequences, triggers, constraints, indexes, - * functions, stored procedures etc. - */ -export class DatabaseObjectExistsException extends ServerException {} -/** - * Base class for all unknown database object related errors detected in the driver. - * - * A database object is considered any asset that can be created in a database - * such as schemas, tables, views, sequences, triggers, constraints, indexes, - * functions, stored procedures etc. - */ -export class DatabaseObjectNotFoundException extends ServerException {} -/** - * Exception for a deadlock error of a transaction detected in the driver. - */ -export class DeadlockException extends ServerException {} -/** - * Exception for a foreign key constraint violation detected in the driver. - */ -export class ForeignKeyConstraintViolationException extends ConstraintViolationException {} -/** - * Exception for a check constraint violation detected in the driver. - */ -export class CheckConstraintViolationException extends ConstraintViolationException {} -/** - * Exception for an invalid specified field name in a statement detected in the driver. - */ -export class InvalidFieldNameException extends ServerException {} -/** - * Exception for a lock wait timeout error of a transaction detected in the driver. - */ -export class LockWaitTimeoutException extends ServerException {} -/** - * Exception for a non-unique/ambiguous specified field name in a statement detected in the driver. - */ -export class NonUniqueFieldNameException extends ServerException {} -/** - * Exception for a NOT NULL constraint violation detected in the driver. - */ -export class NotNullConstraintViolationException extends ConstraintViolationException {} -/** - * Exception for a write operation attempt on a read-only database element detected in the driver. - */ -export class ReadOnlyException extends ServerException {} -/** - * Exception for a syntax error in a statement detected in the driver. - */ -export class SyntaxErrorException extends ServerException {} -/** - * Exception for an already existing table referenced in a statement detected in the driver. - */ -export class TableExistsException extends DatabaseObjectExistsException {} -/** - * Exception for an unknown table referenced in a statement detected in the driver. - */ -export class TableNotFoundException extends DatabaseObjectNotFoundException {} -/** - * Exception for a unique constraint violation detected in the driver. - */ -export class UniqueConstraintViolationException extends ConstraintViolationException {} diff --git a/node_modules/@mikro-orm/core/hydration/Hydrator.d.ts b/node_modules/@mikro-orm/core/hydration/Hydrator.d.ts deleted file mode 100644 index 117d4d7..0000000 --- a/node_modules/@mikro-orm/core/hydration/Hydrator.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -import type { EntityData, EntityMetadata, EntityProperty, IHydrator } from '../typings.js'; -import type { EntityFactory } from '../entity/EntityFactory.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { MetadataStorage } from '../metadata/MetadataStorage.js'; -import type { Configuration } from '../utils/Configuration.js'; -/** Abstract base class for hydrating entity instances from raw database data. */ -export declare abstract class Hydrator implements IHydrator { - protected readonly metadata: MetadataStorage; - protected readonly platform: Platform; - protected readonly config: Configuration; - protected running: boolean; - constructor(metadata: MetadataStorage, platform: Platform, config: Configuration); - /** - * @inheritDoc - */ - hydrate( - entity: T, - meta: EntityMetadata, - data: EntityData, - factory: EntityFactory, - type: 'full' | 'reference', - newEntity?: boolean, - convertCustomTypes?: boolean, - schema?: string, - parentSchema?: string, - ): void; - /** - * @inheritDoc - */ - hydrateReference( - entity: T, - meta: EntityMetadata, - data: EntityData, - factory: EntityFactory, - convertCustomTypes?: boolean, - schema?: string, - parentSchema?: string, - ): void; - /** Returns whether the hydrator is currently in the middle of hydrating an entity. */ - isRunning(): boolean; - protected getProperties(meta: EntityMetadata, type: 'full' | 'reference'): EntityProperty[]; - protected hydrateProperty( - entity: T, - prop: EntityProperty, - data: EntityData, - factory: EntityFactory, - newEntity?: boolean, - convertCustomTypes?: boolean, - ): void; -} diff --git a/node_modules/@mikro-orm/core/hydration/Hydrator.js b/node_modules/@mikro-orm/core/hydration/Hydrator.js deleted file mode 100644 index 9a2cd7d..0000000 --- a/node_modules/@mikro-orm/core/hydration/Hydrator.js +++ /dev/null @@ -1,49 +0,0 @@ -/** Abstract base class for hydrating entity instances from raw database data. */ -/* v8 ignore next */ -export class Hydrator { - metadata; - platform; - config; - running = false; - constructor(metadata, platform, config) { - this.metadata = metadata; - this.platform = platform; - this.config = config; - } - /** - * @inheritDoc - */ - hydrate(entity, meta, data, factory, type, newEntity = false, convertCustomTypes = false, schema, parentSchema) { - // the running state is used to consider propagation as hydration, saving the values directly to the entity data, - // but we don't want that for new entities, their propagation should result in entity updates when flushing - this.running = !newEntity; - const props = this.getProperties(meta, type); - for (const prop of props) { - this.hydrateProperty(entity, prop, data, factory, newEntity, convertCustomTypes); - } - this.running = false; - } - /** - * @inheritDoc - */ - hydrateReference(entity, meta, data, factory, convertCustomTypes, schema, parentSchema) { - this.running = true; - meta.primaryKeys.forEach(pk => { - this.hydrateProperty(entity, meta.properties[pk], data, factory, false, convertCustomTypes); - }); - this.running = false; - } - /** Returns whether the hydrator is currently in the middle of hydrating an entity. */ - isRunning() { - return this.running; - } - getProperties(meta, type) { - if (type === 'reference') { - return meta.primaryKeys.map(pk => meta.properties[pk]); - } - return meta.hydrateProps; - } - hydrateProperty(entity, prop, data, factory, newEntity, convertCustomTypes) { - entity[prop.name] = data[prop.name]; - } -} diff --git a/node_modules/@mikro-orm/core/hydration/ObjectHydrator.d.ts b/node_modules/@mikro-orm/core/hydration/ObjectHydrator.d.ts deleted file mode 100644 index a83ea69..0000000 --- a/node_modules/@mikro-orm/core/hydration/ObjectHydrator.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -import type { EntityData, EntityMetadata } from '../typings.js'; -import { Hydrator } from './Hydrator.js'; -import type { EntityFactory } from '../entity/EntityFactory.js'; -type EntityHydrator = ( - entity: T, - data: EntityData, - factory: EntityFactory, - newEntity: boolean, - convertCustomTypes: boolean, - schema?: string, - parentSchema?: string, - normalizeAccessors?: boolean, -) => void; -/** @internal JIT-compiled hydrator that converts raw database rows into entity instances with optimized generated code. */ -export declare class ObjectHydrator extends Hydrator { - #private; - /** - * @inheritDoc - */ - hydrate( - entity: T, - meta: EntityMetadata, - data: EntityData, - factory: EntityFactory, - type: 'full' | 'reference', - newEntity?: boolean, - convertCustomTypes?: boolean, - schema?: string, - parentSchema?: string, - normalizeAccessors?: boolean, - ): void; - /** - * @inheritDoc - */ - hydrateReference( - entity: T, - meta: EntityMetadata, - data: EntityData, - factory: EntityFactory, - convertCustomTypes?: boolean, - schema?: string, - parentSchema?: string, - normalizeAccessors?: boolean, - ): void; - /** - * @internal Highly performance-sensitive method. - */ - getEntityHydrator( - meta: EntityMetadata, - type: 'full' | 'reference', - normalizeAccessors?: boolean, - ): EntityHydrator; - private createCollectionItemMapper; - private wrap; - private safeKey; -} -export {}; diff --git a/node_modules/@mikro-orm/core/hydration/ObjectHydrator.js b/node_modules/@mikro-orm/core/hydration/ObjectHydrator.js deleted file mode 100644 index ff2de49..0000000 --- a/node_modules/@mikro-orm/core/hydration/ObjectHydrator.js +++ /dev/null @@ -1,499 +0,0 @@ -import { Hydrator } from './Hydrator.js'; -import { Collection } from '../entity/Collection.js'; -import { Reference, ScalarReference } from '../entity/Reference.js'; -import { PolymorphicRef } from '../entity/PolymorphicRef.js'; -import { parseJsonSafe, Utils } from '../utils/Utils.js'; -import { ReferenceKind } from '../enums.js'; -import { Raw } from '../utils/RawQueryFragment.js'; -import { ValidationError } from '../errors.js'; -/** @internal JIT-compiled hydrator that converts raw database rows into entity instances with optimized generated code. */ -export class ObjectHydrator extends Hydrator { - #hydrators = { - 'full~true': new Map(), - 'full~false': new Map(), - 'reference~true': new Map(), - 'reference~false': new Map(), - }; - #tmpIndex = 0; - /** - * @inheritDoc - */ - hydrate( - entity, - meta, - data, - factory, - type, - newEntity = false, - convertCustomTypes = false, - schema, - parentSchema, - normalizeAccessors, - ) { - const hydrate = this.getEntityHydrator(meta, type, normalizeAccessors); - const running = this.running; - // the running state is used to consider propagation as hydration, saving the values directly to the entity data, - // but we don't want that for new entities, their propagation should result in entity updates when flushing - this.running = !newEntity; - Utils.callCompiledFunction( - hydrate, - entity, - data, - factory, - newEntity, - convertCustomTypes, - schema, - parentSchema, - normalizeAccessors, - ); - this.running = running; - } - /** - * @inheritDoc - */ - hydrateReference(entity, meta, data, factory, convertCustomTypes = false, schema, parentSchema, normalizeAccessors) { - const hydrate = this.getEntityHydrator(meta, 'reference', normalizeAccessors); - const running = this.running; - this.running = true; - Utils.callCompiledFunction( - hydrate, - entity, - data, - factory, - false, - convertCustomTypes, - schema, - parentSchema, - normalizeAccessors, - ); - this.running = running; - } - /** - * @internal Highly performance-sensitive method. - */ - getEntityHydrator(meta, type, normalizeAccessors = false) { - const key = `${type}~${normalizeAccessors}`; - const exists = this.#hydrators[key].get(meta.class); - if (exists) { - return exists; - } - const lines = []; - const context = new Map(); - const props = this.getProperties(meta, type); - context.set('isPrimaryKey', Utils.isPrimaryKey); - context.set('Collection', Collection); - context.set('Reference', Reference); - context.set('PolymorphicRef', PolymorphicRef); - context.set('ValidationError', ValidationError); - const registerCustomType = (prop, convertorKey, method, context) => { - context.set(`${method}_${convertorKey}`, val => { - /* v8 ignore next */ - if (Raw.isKnownFragment(val)) { - return val; - } - return prop.customType[method](val, this.platform, { mode: 'serialization' }); - }); - return convertorKey; - }; - const hydrateScalar = (prop, path, dataKey) => { - const entityKey = path.map(k => this.wrap(k)).join(''); - const tz = this.platform.getTimezone(); - const convertorKey = path - .filter(k => !/\[idx_\d+]/.exec(k)) - .map(k => this.safeKey(k)) - .join('_'); - const ret = []; - const idx = this.#tmpIndex++; - const nullVal = this.config.get('forceUndefined') ? 'undefined' : 'null'; - if (prop.getter && !prop.setter && prop.persist === false) { - return []; - } - if (prop.ref) { - context.set('ScalarReference', ScalarReference); - ret.push(` const oldValue_${idx} = entity${entityKey};`); - } - ret.push(` if (data${dataKey} === null) {`); - if (prop.ref) { - ret.push(` entity${entityKey} = new ScalarReference();`); - ret.push(` entity${entityKey}.bind(entity, '${prop.name}');`); - ret.push(` entity${entityKey}.set(${nullVal});`); - } else { - ret.push(` entity${entityKey} = ${nullVal};`); - } - ret.push(` } else if (typeof data${dataKey} !== 'undefined') {`); - if (prop.customType) { - registerCustomType(prop, convertorKey, 'convertToJSValue', context); - registerCustomType(prop, convertorKey, 'convertToDatabaseValue', context); - ret.push( - ` if (convertCustomTypes) {`, - ` const value = convertToJSValue_${convertorKey}(data${dataKey});`, - ); - if (prop.customType.ensureComparable(meta, prop)) { - ret.push(` data${dataKey} = convertToDatabaseValue_${convertorKey}(value);`); - } - ret.push( - ` entity${entityKey} = value;`, - ` } else {`, - ` entity${entityKey} = data${dataKey};`, - ` }`, - ); - } else if (prop.runtimeType === 'boolean') { - ret.push(` entity${entityKey} = !!data${dataKey};`); - } else if (prop.runtimeType === 'Date' && !this.platform.isNumericProperty(prop)) { - ret.push(` if (data${dataKey} instanceof Date) {`); - ret.push(` entity${entityKey} = data${dataKey};`); - if (!tz || tz === 'local') { - ret.push(` } else {`); - ret.push(` entity${entityKey} = new Date(data${dataKey});`); - } else { - ret.push( - ` } else if (typeof data${dataKey} === 'number' || data${dataKey}.includes('+') || data${dataKey}.lastIndexOf('-') > 10 || data${dataKey}.endsWith('Z')) {`, - ); - ret.push(` entity${entityKey} = new Date(data${dataKey});`); - ret.push(` } else {`); - ret.push(` entity${entityKey} = new Date(data${dataKey} + '${tz}');`); - } - ret.push(` }`); - } else { - ret.push(` entity${entityKey} = data${dataKey};`); - } - if (prop.ref) { - ret.push(` const value = entity${entityKey};`); - ret.push(` entity${entityKey} = oldValue_${idx} ?? new ScalarReference(value);`); - ret.push(` entity${entityKey}.bind(entity, '${prop.name}');`); - ret.push(` entity${entityKey}.set(value);`); - } - ret.push(` }`); - if (prop.ref) { - ret.push(` if (!entity${entityKey}) {`); - ret.push(` entity${entityKey} = new ScalarReference();`); - ret.push(` entity${entityKey}.bind(entity, '${prop.name}');`); - ret.push(` }`); - } - return ret; - }; - const hydrateToOne = (prop, dataKey, entityKey) => { - const ret = []; - const method = type === 'reference' ? 'createReference' : 'create'; - const nullVal = this.config.get('forceUndefined') ? 'undefined' : 'null'; - ret.push(` if (data${dataKey} === null) {\n entity${entityKey} = ${nullVal};`); - ret.push(` } else if (typeof data${dataKey} !== 'undefined') {`); - // For polymorphic: instanceof check; for regular: isPrimaryKey() check - const pkCheck = prop.polymorphic - ? `data${dataKey} instanceof PolymorphicRef` - : `isPrimaryKey(data${dataKey}, true)`; - ret.push(` if (${pkCheck}) {`); - // When targetKey is set, pass the key option to createReference so it uses the alternate key - const keyOption = prop.targetKey ? `, key: '${prop.targetKey}'` : ''; - if (prop.polymorphic) { - // For polymorphic: target class from discriminator map, PK from data.id - const discriminatorMapKey = this.safeKey(`discriminatorMap_${prop.name}_${this.#tmpIndex++}`); - context.set(discriminatorMapKey, prop.discriminatorMap); - ret.push(` const targetClass = ${discriminatorMapKey}[data${dataKey}.discriminator];`); - ret.push( - ` if (!targetClass) throw new ValidationError(\`Unknown discriminator value '\${data${dataKey}.discriminator}' for polymorphic relation '${prop.name}'. Valid values: \${Object.keys(${discriminatorMapKey}).join(', ')}\`);`, - ); - if (prop.ref) { - ret.push( - ` entity${entityKey} = Reference.create(factory.createReference(targetClass, data${dataKey}.id, { merge: true, convertCustomTypes, normalizeAccessors, schema${keyOption} }));`, - ); - } else { - ret.push( - ` entity${entityKey} = factory.createReference(targetClass, data${dataKey}.id, { merge: true, convertCustomTypes, normalizeAccessors, schema${keyOption} });`, - ); - } - } else { - // For regular: fixed target class, PK is the data itself - const targetKey = this.safeKey(`${prop.targetMeta.tableName}_${this.#tmpIndex++}`); - context.set(targetKey, prop.targetMeta.class); - if (prop.ref) { - ret.push( - ` entity${entityKey} = Reference.create(factory.createReference(${targetKey}, data${dataKey}, { merge: true, convertCustomTypes, normalizeAccessors, schema${keyOption} }));`, - ); - } else { - ret.push( - ` entity${entityKey} = factory.createReference(${targetKey}, data${dataKey}, { merge: true, convertCustomTypes, normalizeAccessors, schema${keyOption} });`, - ); - } - } - ret.push(` } else if (data${dataKey} && typeof data${dataKey} === 'object') {`); - // For full entity hydration, polymorphic needs to determine target class from entity itself - let hydrateTargetExpr; - if (prop.polymorphic) { - hydrateTargetExpr = `data${dataKey}.constructor`; - } else { - const targetKey = this.safeKey(`${prop.targetMeta.tableName}_${this.#tmpIndex++}`); - context.set(targetKey, prop.targetMeta.class); - hydrateTargetExpr = targetKey; - } - if (prop.ref) { - ret.push( - ` entity${entityKey} = Reference.create(factory.${method}(${hydrateTargetExpr}, data${dataKey}, { initialized: true, merge: true, newEntity, convertCustomTypes, normalizeAccessors, schema }));`, - ); - } else { - ret.push( - ` entity${entityKey} = factory.${method}(${hydrateTargetExpr}, data${dataKey}, { initialized: true, merge: true, newEntity, convertCustomTypes, normalizeAccessors, schema });`, - ); - } - ret.push(` }`); - ret.push(` }`); - if (prop.kind === ReferenceKind.ONE_TO_ONE) { - const meta2 = this.metadata.get(prop.targetMeta.class); - const prop2 = meta2.properties[prop.inversedBy || prop.mappedBy]; - if (prop2 && !prop2.mapToPk) { - ret.push(` if (data${dataKey} && entity${entityKey} && !entity${entityKey}.${this.safeKey(prop2.name)}) {`); - ret.push( - ` entity${entityKey}.${prop.ref ? 'unwrap().' : ''}${this.safeKey(prop2.name)} = ${prop2.ref ? 'Reference.create(entity)' : 'entity'};`, - ); - ret.push(` }`); - } - } - if (prop.customType?.ensureComparable(meta, prop)) { - registerCustomType(prop, this.safeKey(prop.name), 'convertToDatabaseValue', context); - ret.push(` if (data${dataKey} != null && typeof data${dataKey} !== 'object' && convertCustomTypes) {`); - ret.push( - ` data${dataKey} = convertToDatabaseValue_${this.safeKey(prop.name)}(entity${entityKey}.__helper.getPrimaryKey());`, - ); - ret.push(` }`); - } - return ret; - }; - const hydrateToMany = (prop, dataKey, entityKey) => { - const ret = []; - ret.push(...this.createCollectionItemMapper(prop, context)); - ret.push(` if (data${dataKey} && !Array.isArray(data${dataKey}) && typeof data${dataKey} === 'object') {`); - ret.push(` data${dataKey} = [data${dataKey}];`); - ret.push(` }`); - ret.push(` if (Array.isArray(data${dataKey})) {`); - ret.push( - ` const items = data${dataKey}.map(value => createCollectionItem_${this.safeKey(prop.name)}(value, entity));`, - ); - ret.push(` const coll = Collection.create(entity, '${prop.name}', items, newEntity);`); - ret.push(` if (newEntity) {`); - ret.push(` coll.setDirty();`); - ret.push(` } else {`); - ret.push(` coll.takeSnapshot(true);`); - ret.push(` }`); - ret.push(` } else if (!entity${entityKey} && data${dataKey} instanceof Collection) {`); - ret.push(` entity${entityKey} = data${dataKey};`); - if (!this.platform.usesPivotTable() && prop.owner && prop.kind === ReferenceKind.MANY_TO_MANY) { - ret.push(` } else if (!entity${entityKey} && Array.isArray(data${dataKey})) {`); - const items = this.platform.usesPivotTable() || !prop.owner ? 'undefined' : '[]'; - ret.push( - ` const coll = Collection.create(entity, '${prop.name}', ${items}, !!data${dataKey} || newEntity);`, - ); - ret.push(` coll.setDirty(false);`); - } - ret.push(` } else if (!entity${entityKey}) {`); - ret.push(` const coll = Collection.create(entity, '${prop.name}', undefined, newEntity);`); - ret.push(` coll.setDirty(false);`); - ret.push(` }`); - return ret; - }; - const registerEmbeddedPrototype = (prop, path) => { - const convertorKey = path - .filter(k => !/\[idx_\d+]/.exec(k)) - .map(k => this.safeKey(k)) - .join('_'); - if (prop.targetMeta?.polymorphs) { - prop.targetMeta.polymorphs.forEach(meta => { - context.set(`prototype_${convertorKey}_${meta.className}`, meta.prototype); - }); - } else { - context.set(`prototype_${convertorKey}`, prop.embeddable.prototype); - } - }; - const parseObjectEmbeddable = (prop, dataKey, ret) => { - if (!this.platform.convertsJsonAutomatically() && (prop.object || prop.array)) { - context.set('parseJsonSafe', parseJsonSafe); - ret.push( - ` if (typeof data${dataKey} === 'string') {`, - ` data${dataKey} = parseJsonSafe(data${dataKey});`, - ` }`, - ); - } - }; - const createCond = (prop, dataKey, cond) => { - const conds = []; - if (prop.object) { - conds.push(`data${dataKey} ${cond ?? '!= null'}`); - } else { - const notNull = cond ?? (prop.nullable ? '!= null' : '!== undefined'); - meta.props - .filter(p => p.embedded?.[0] === prop.name) - .forEach(p => { - if (p.kind === ReferenceKind.EMBEDDED && !p.object && !p.array) { - conds.push(...createCond(p, dataKey + this.wrap(p.embedded[1]), cond)); - return; - } - conds.push(`data${this.wrap(p.name)} ${notNull}`); - }); - } - return conds; - }; - const hydrateEmbedded = (prop, path, dataKey) => { - const entityKey = path.map(k => this.wrap(k)).join(''); - const ret = []; - registerEmbeddedPrototype(prop, path); - parseObjectEmbeddable(prop, dataKey, ret); - ret.push(` if (${createCond(prop, dataKey).join(' || ')}) {`); - if (prop.object) { - ret.push(` const embeddedData = data${dataKey};`); - } else { - ret.push(` const embeddedData = {`); - for (const childProp of Object.values(prop.embeddedProps)) { - const key = /^\w+$/.exec(childProp.embedded[1]) ? childProp.embedded[1] : `'${childProp.embedded[1]}'`; - ret.push(` ${key}: data${this.wrap(childProp.name)},`); - } - ret.push(` };`); - } - if (prop.targetMeta?.polymorphs) { - prop.targetMeta.polymorphs.forEach(childMeta => { - const childProp = prop.embeddedProps[prop.targetMeta.discriminatorColumn]; - const childDataKey = prop.object ? dataKey + this.wrap(childProp.embedded[1]) : this.wrap(childProp.name); - context.set(childMeta.className, childMeta.class); - // weak comparison as we can have numbers that might have been converted to strings due to being object keys - ret.push(` if (data${childDataKey} == '${childMeta.discriminatorValue}') {`); - ret.push(` if (entity${entityKey} == null) {`); - ret.push( - ` entity${entityKey} = factory.createEmbeddable(${childMeta.className}, embeddedData, { newEntity, convertCustomTypes, normalizeAccessors });`, - ); - ret.push(` }`); - meta.props - .filter(p => p.embedded?.[0] === prop.name) - .forEach(childProp => { - const childDataKey = prop.object ? dataKey + this.wrap(childProp.embedded[1]) : this.wrap(childProp.name); - const prop2 = childMeta.properties[childProp.embedded[1]]; - const prop3 = { - ...prop2, - name: childProp.name, - embedded: childProp.embedded, - embeddedProps: childProp.embeddedProps, - }; - ret.push( - // eslint-disable-next-line @typescript-eslint/no-use-before-define, no-use-before-define - ...hydrateProperty(prop3, childProp.object, [...path, childProp.embedded[1]], childDataKey).map( - l => ' ' + l, - ), - ); - }); - ret.push(` }`); - }); - } else { - const targetKey = this.safeKey(`${prop.targetMeta.tableName}_${this.#tmpIndex++}`); - context.set(targetKey, prop.targetMeta.class); - ret.push(` if (entity${entityKey} == null) {`); - ret.push( - ` entity${entityKey} = factory.createEmbeddable(${targetKey}, embeddedData, { newEntity, convertCustomTypes, normalizeAccessors });`, - ); - ret.push(` }`); - meta.props - .filter(p => p.embedded?.[0] === prop.name) - .forEach(childProp => { - const childDataKey = prop.object ? dataKey + this.wrap(childProp.embedded[1]) : this.wrap(childProp.name); - ret.push( - // eslint-disable-next-line @typescript-eslint/no-use-before-define, no-use-before-define - ...hydrateProperty(childProp, prop.object, [...path, childProp.embedded[1]], childDataKey).map( - l => ' ' + l, - ), - ); - }); - } - /* v8 ignore next */ - const nullVal = this.config.get('forceUndefined') ? 'undefined' : 'null'; - if (prop.object) { - ret.push(` } else if (data${dataKey} === null) {`); - } else { - ret.push(` } else if (${createCond(prop, dataKey, '=== null').join(' && ')}) {`); - } - ret.push(` entity${entityKey} = ${nullVal};`); - ret.push(` }`); - return ret; - }; - const hydrateEmbeddedArray = (prop, path, dataKey) => { - const entityKey = path.map(k => this.wrap(k)).join(''); - const ret = []; - const idx = this.#tmpIndex++; - registerEmbeddedPrototype(prop, path); - parseObjectEmbeddable(prop, dataKey, ret); - ret.push(` if (Array.isArray(data${dataKey})) {`); - ret.push(` entity${entityKey} = [];`); - ret.push(` data${dataKey}.forEach((_, idx_${idx}) => {`); - ret.push(...hydrateEmbedded(prop, [...path, `[idx_${idx}]`], `${dataKey}[idx_${idx}]`).map(l => ' ' + l)); - ret.push(` });`); - ret.push(` }`); - return ret; - }; - const hydrateProperty = (prop, object = prop.object, path = [prop.name], dataKey) => { - const entityKey = path.map(k => this.wrap(k)).join(''); - dataKey = - dataKey ?? (object ? entityKey : this.wrap(normalizeAccessors ? (prop.accessor ?? prop.name) : prop.name)); - const ret = []; - if ([ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) && !prop.mapToPk) { - ret.push(...hydrateToOne(prop, dataKey, entityKey)); - } else if (prop.kind === ReferenceKind.ONE_TO_MANY || prop.kind === ReferenceKind.MANY_TO_MANY) { - ret.push(...hydrateToMany(prop, dataKey, entityKey)); - } else if (prop.kind === ReferenceKind.EMBEDDED) { - if (prop.array) { - ret.push(...hydrateEmbeddedArray(prop, path, dataKey)); - } else { - ret.push(...hydrateEmbedded(prop, path, dataKey)); - if (!prop.object) { - ret.push(...hydrateEmbedded({ ...prop, object: true }, path, dataKey)); - } - } - } else { - // ReferenceKind.SCALAR - ret.push(...hydrateScalar(prop, path, dataKey)); - } - if (this.config.get('forceUndefined')) { - ret.push(` if (data${dataKey} === null) entity${entityKey} = undefined;`); - } - return ret; - }; - for (const prop of props) { - lines.push(...hydrateProperty(prop)); - } - const code = - `// compiled hydrator for entity ${meta.className} (${type + normalizeAccessors ? ' normalized' : ''})\n` + - `return function(entity, data, factory, newEntity, convertCustomTypes, schema, parentSchema, normalizeAccessors) {\n` + - `${lines.join('\n')}\n}`; - const fnKey = `hydrator-${meta.uniqueName}-${type}-${normalizeAccessors}`; - const hydrator = Utils.createFunction(context, code, this.config.get('compiledFunctions'), fnKey); - this.#hydrators[key].set(meta.class, hydrator); - return hydrator; - } - createCollectionItemMapper(prop, context) { - const meta = this.metadata.get(prop.targetMeta.class); - const lines = []; - lines.push(` const createCollectionItem_${this.safeKey(prop.name)} = (value, entity) => {`); - const prop2 = prop.targetMeta.properties[prop.mappedBy]; - if (prop.kind === ReferenceKind.ONE_TO_MANY && prop2.primary) { - lines.push(` if (typeof value === 'object' && value?.['${prop2.name}'] == null) {`); - lines.push( - ` value = { ...value, ['${prop2.name}']: Reference.wrapReference(entity, { ref: ${prop2.ref} }) };`, - ); - lines.push(` }`); - } - const targetKey = this.safeKey(`${prop.targetMeta.tableName}_${this.#tmpIndex++}`); - context.set(targetKey, prop.targetMeta.class); - lines.push( - ` if (isPrimaryKey(value, ${meta.compositePK})) return factory.createReference(${targetKey}, value, { convertCustomTypes, schema, normalizeAccessors, merge: true });`, - ); - lines.push(` if (value && value.__entity) return value;`); - lines.push( - ` return factory.create(${targetKey}, value, { newEntity, convertCustomTypes, schema, normalizeAccessors, merge: true });`, - ); - lines.push(` }`); - return lines; - } - wrap(key) { - if (/^\[.*]$/.exec(key)) { - return key; - } - return /^\w+$/.exec(key) ? `.${key}` : `['${key}']`; - } - safeKey(key) { - return key.replace(/\W/g, '_'); - } -} diff --git a/node_modules/@mikro-orm/core/hydration/index.d.ts b/node_modules/@mikro-orm/core/hydration/index.d.ts deleted file mode 100644 index 9e51b61..0000000 --- a/node_modules/@mikro-orm/core/hydration/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './Hydrator.js'; -export * from './ObjectHydrator.js'; diff --git a/node_modules/@mikro-orm/core/hydration/index.js b/node_modules/@mikro-orm/core/hydration/index.js deleted file mode 100644 index 9e51b61..0000000 --- a/node_modules/@mikro-orm/core/hydration/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export * from './Hydrator.js'; -export * from './ObjectHydrator.js'; diff --git a/node_modules/@mikro-orm/core/index.d.ts b/node_modules/@mikro-orm/core/index.d.ts deleted file mode 100644 index 5e735a0..0000000 --- a/node_modules/@mikro-orm/core/index.d.ts +++ /dev/null @@ -1,139 +0,0 @@ -/** - * @packageDocumentation - * @module core - */ -export { - EntityMetadata, - PrimaryKeyProp, - EntityRepositoryType, - OptionalProps, - EagerProps, - HiddenProps, - Config, - EntityName, -} from './typings.js'; -export type { - CompiledFunctions, - Constructor, - ConnectionType, - Dictionary, - Primary, - IPrimaryKey, - ObjectQuery, - FilterQuery, - IWrappedEntity, - InferEntityName, - EntityData, - Highlighter, - MaybePromise, - AnyEntity, - EntityClass, - EntityProperty, - PopulateOptions, - Populate, - Loaded, - New, - LoadedReference, - LoadedCollection, - IMigrator, - IMigrationGenerator, - MigratorEvent, - GetRepository, - MigrationObject, - DeepPartial, - PrimaryProperty, - Cast, - IsUnknown, - EntityDictionary, - EntityDTO, - EntityDTOFlat, - EntityDTOProp, - SerializeDTO, - MigrationDiff, - GenerateOptions, - FilterObject, - IMigrationRunner, - IEntityGenerator, - ISeedManager, - SeederObject, - IMigratorStorage, - RequiredEntityData, - CheckCallback, - IndexCallback, - FormulaCallback, - FormulaTable, - SchemaTable, - SchemaColumns, - SimpleColumnMeta, - Rel, - Ref, - ScalarRef, - EntityRef, - ISchemaGenerator, - MigrationInfo, - MigrateOptions, - MigrationResult, - MigrationRow, - EntityKey, - EntityValue, - EntityDataValue, - FilterKey, - EntityType, - FromEntityType, - Selected, - IsSubset, - EntityProps, - ExpandProperty, - ExpandScalar, - FilterItemValue, - ExpandQuery, - Scalar, - ExpandHint, - FilterValue, - MergeLoaded, - MergeSelected, - TypeConfig, - AnyString, - ClearDatabaseOptions, - CreateSchemaOptions, - EnsureDatabaseOptions, - UpdateSchemaOptions, - DropSchemaOptions, - RefreshDatabaseOptions, - AutoPath, - UnboxArray, - MetadataProcessor, - ImportsResolver, - RequiredNullable, - DefineConfig, - Opt, - Hidden, - EntitySchemaWithMeta, - InferEntity, - CheckConstraint, - GeneratedColumnCallback, - FilterDef, - EntityCtor, - Subquery, - PopulateHintOptions, - Prefixes, -} from './typings.js'; -export * from './enums.js'; -export * from './errors.js'; -export * from './exceptions.js'; -export * from './MikroORM.js'; -export * from './entity/index.js'; -export * from './serialization/index.js'; -export * from './events/index.js'; -export * from './EntityManager.js'; -export * from './unit-of-work/index.js'; -export * from './utils/index.js'; -export * from './logging/index.js'; -export * from './hydration/index.js'; -export * from './drivers/index.js'; -export * from './connections/index.js'; -export * from './platforms/index.js'; -export * from './types/index.js'; -export * from './naming-strategy/index.js'; -export * from './metadata/index.js'; -export * from './cache/index.js'; diff --git a/node_modules/@mikro-orm/core/index.js b/node_modules/@mikro-orm/core/index.js deleted file mode 100644 index 0010e97..0000000 --- a/node_modules/@mikro-orm/core/index.js +++ /dev/null @@ -1,33 +0,0 @@ -/** - * @packageDocumentation - * @module core - */ -export { - EntityMetadata, - PrimaryKeyProp, - EntityRepositoryType, - OptionalProps, - EagerProps, - HiddenProps, - Config, - EntityName, -} from './typings.js'; -export * from './enums.js'; -export * from './errors.js'; -export * from './exceptions.js'; -export * from './MikroORM.js'; -export * from './entity/index.js'; -export * from './serialization/index.js'; -export * from './events/index.js'; -export * from './EntityManager.js'; -export * from './unit-of-work/index.js'; -export * from './utils/index.js'; -export * from './logging/index.js'; -export * from './hydration/index.js'; -export * from './drivers/index.js'; -export * from './connections/index.js'; -export * from './platforms/index.js'; -export * from './types/index.js'; -export * from './naming-strategy/index.js'; -export * from './metadata/index.js'; -export * from './cache/index.js'; diff --git a/node_modules/@mikro-orm/core/logging/DefaultLogger.d.ts b/node_modules/@mikro-orm/core/logging/DefaultLogger.d.ts deleted file mode 100644 index 2efb088..0000000 --- a/node_modules/@mikro-orm/core/logging/DefaultLogger.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import type { Logger, LoggerNamespace, LogContext, LoggerOptions } from './Logger.js'; -/** Default logger implementation with colored output, query formatting, and namespace-based filtering. */ -export declare class DefaultLogger implements Logger { - private readonly options; - debugMode: boolean | LoggerNamespace[]; - readonly writer: (message: string) => void; - private readonly usesReplicas?; - private readonly highlighter?; - constructor(options: LoggerOptions); - /** - * @inheritDoc - */ - log(namespace: LoggerNamespace, message: string, context?: LogContext): void; - /** - * @inheritDoc - */ - error(namespace: LoggerNamespace, message: string, context?: LogContext): void; - /** - * @inheritDoc - */ - warn(namespace: LoggerNamespace, message: string, context?: LogContext): void; - /** - * @inheritDoc - */ - setDebugMode(debugMode: boolean | LoggerNamespace[]): void; - /** Checks whether logging is enabled for the given namespace, considering context overrides. */ - isEnabled(namespace: LoggerNamespace, context?: LogContext): boolean; - /** - * @inheritDoc - */ - logQuery( - context: { - query: string; - } & LogContext, - ): void; - /** Factory method for creating a new DefaultLogger instance. */ - static create(this: void, options: LoggerOptions): DefaultLogger; -} diff --git a/node_modules/@mikro-orm/core/logging/DefaultLogger.js b/node_modules/@mikro-orm/core/logging/DefaultLogger.js deleted file mode 100644 index a62cf64..0000000 --- a/node_modules/@mikro-orm/core/logging/DefaultLogger.js +++ /dev/null @@ -1,98 +0,0 @@ -import { colors } from './colors.js'; -/** Default logger implementation with colored output, query formatting, and namespace-based filtering. */ -export class DefaultLogger { - options; - debugMode; - writer; - usesReplicas; - highlighter; - constructor(options) { - this.options = options; - this.debugMode = this.options.debugMode ?? false; - this.writer = this.options.writer; - this.usesReplicas = this.options.usesReplicas; - this.highlighter = this.options.highlighter; - } - /** - * @inheritDoc - */ - log(namespace, message, context) { - if (!this.isEnabled(namespace, context)) { - return; - } - // clean up the whitespace - message = message.replace(/\n/g, '').replace(/ +/g, ' ').trim(); - // use red for error levels - if (context?.level === 'error') { - message = colors.red(message); - } - // use yellow for warning levels - if (context?.level === 'warning') { - message = colors.yellow(message); - } - const label = context?.label ? colors.cyan(`(${context.label}) `) : ''; - this.writer(colors.grey(`[${namespace}] `) + label + message); - } - /** - * @inheritDoc - */ - error(namespace, message, context) { - this.log(namespace, message, { ...context, level: 'error' }); - } - /** - * @inheritDoc - */ - warn(namespace, message, context) { - this.log(namespace, message, { ...context, level: 'warning' }); - } - /** - * @inheritDoc - */ - setDebugMode(debugMode) { - this.debugMode = debugMode; - } - /** Checks whether logging is enabled for the given namespace, considering context overrides. */ - isEnabled(namespace, context) { - if (context?.enabled !== undefined) { - return context.enabled; - } - const debugMode = context?.debugMode ?? this.debugMode; - if (namespace === 'deprecated') { - const { ignoreDeprecations = false } = this.options; - return Array.isArray(ignoreDeprecations) - ? /* v8 ignore next */ - !ignoreDeprecations.includes(context?.label ?? '') - : !ignoreDeprecations; - } - return !!debugMode && (!Array.isArray(debugMode) || debugMode.includes(namespace)); - } - /** - * @inheritDoc - */ - logQuery(context) { - const namespace = context.namespace ?? 'query'; - if (!this.isEnabled(namespace, context)) { - return; - } - /* v8 ignore next */ - let msg = this.highlighter?.highlight(context.query) ?? context.query; - if (context.took != null) { - const meta = [`took ${context.took} ms`]; - if (context.results != null) { - meta.push(`${context.results} result${context.results === 0 || context.results > 1 ? 's' : ''}`); - } - if (context.affected != null) { - meta.push(`${context.affected} row${context.affected === 0 || context.affected > 1 ? 's' : ''} affected`); - } - msg += colors.grey(` [${meta.join(', ')}]`); - } - if (this.usesReplicas && context.connection) { - msg += colors.cyan(` (via ${context.connection.type} connection '${context.connection.name}')`); - } - return this.log(namespace, msg, context); - } - /** Factory method for creating a new DefaultLogger instance. */ - static create(options) { - return new DefaultLogger(options); - } -} diff --git a/node_modules/@mikro-orm/core/logging/Logger.d.ts b/node_modules/@mikro-orm/core/logging/Logger.d.ts deleted file mode 100644 index 0778106..0000000 --- a/node_modules/@mikro-orm/core/logging/Logger.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import type { AnyString, Dictionary, Highlighter } from '../typings.js'; -/** Interface for ORM logging, supporting namespaced log levels and query logging. */ -export interface Logger { - /** - * Logs a message inside given namespace. - */ - log(namespace: LoggerNamespace | AnyString, message: string, context?: LogContext): void; - /** - * Logs error message inside given namespace. - */ - error(namespace: LoggerNamespace | AnyString, message: string, context?: LogContext): void; - /** - * Logs warning message inside given namespace. - */ - warn(namespace: LoggerNamespace | AnyString, message: string, context?: LogContext): void; - /** - * Logs a message inside given namespace. - */ - logQuery(context: LogContext): void; - /** - * Sets active namespaces. Pass `true` to enable all logging. - */ - setDebugMode(debugMode: boolean | LoggerNamespace[]): void; - /** Checks whether logging is enabled for the given namespace. */ - isEnabled(namespace: LoggerNamespace, context?: LogContext): boolean; -} -/** Available logging namespaces that can be individually enabled or disabled. */ -export type LoggerNamespace = 'query' | 'query-params' | 'schema' | 'discovery' | 'info' | 'deprecated' | 'slow-query'; -/** Contextual metadata passed alongside log messages, including query details and timing. */ -export interface LogContext extends Dictionary { - query?: string; - label?: string; - namespace?: LoggerNamespace; - params?: readonly unknown[]; - took?: number; - results?: number; - affected?: number; - level?: 'info' | 'warning' | 'error'; - enabled?: boolean; - debugMode?: LoggerNamespace[]; - connection?: { - type?: string; - name?: string; - }; -} -/** Options for constructing a Logger instance. */ -export interface LoggerOptions { - writer: (message: string) => void; - debugMode?: boolean | LoggerNamespace[]; - ignoreDeprecations?: boolean | string[]; - highlighter?: Highlighter; - usesReplicas?: boolean; -} -/** - * Logger options to modify format output and overrides, including a label and additional properties that can be accessed by custom loggers. - * - * Differs from {@apilink LoggerOptions} in terms of how they are used; this type is primarily a public type meant to be used within methods like `em.find()`. - * - * @example - * await em.findOne(User, 1, { logger: { label: 'user middleware' } }; - * // [query] (user middleware) select * from user where id = 1; - */ -export type LoggingOptions = Pick; diff --git a/node_modules/@mikro-orm/core/logging/Logger.js b/node_modules/@mikro-orm/core/logging/Logger.js deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/@mikro-orm/core/logging/Logger.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/@mikro-orm/core/logging/SimpleLogger.d.ts b/node_modules/@mikro-orm/core/logging/SimpleLogger.d.ts deleted file mode 100644 index 3851ed3..0000000 --- a/node_modules/@mikro-orm/core/logging/SimpleLogger.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { LogContext, LoggerNamespace, LoggerOptions } from './Logger.js'; -import { DefaultLogger } from './DefaultLogger.js'; -/** - * A basic logger that provides fully formatted output without color - */ -export declare class SimpleLogger extends DefaultLogger { - /** - * @inheritDoc - */ - log(namespace: LoggerNamespace, message: string, context?: LogContext): void; - /** - * @inheritDoc - */ - logQuery( - context: { - query: string; - } & LogContext, - ): void; - static create(this: void, options: LoggerOptions): SimpleLogger; -} diff --git a/node_modules/@mikro-orm/core/logging/SimpleLogger.js b/node_modules/@mikro-orm/core/logging/SimpleLogger.js deleted file mode 100644 index 72b8214..0000000 --- a/node_modules/@mikro-orm/core/logging/SimpleLogger.js +++ /dev/null @@ -1,30 +0,0 @@ -import { DefaultLogger } from './DefaultLogger.js'; -/** - * A basic logger that provides fully formatted output without color - */ -export class SimpleLogger extends DefaultLogger { - /** - * @inheritDoc - */ - log(namespace, message, context) { - if (!this.isEnabled(namespace, context)) { - return; - } - // clean up the whitespace - message = message.replace(/\n/g, '').replace(/ +/g, ' ').trim(); - const label = context?.label ? `(${context.label}) ` : ''; - this.writer(`[${namespace}] ${label}${message}`); - } - /** - * @inheritDoc - */ - logQuery(context) { - if (!this.isEnabled('query', context)) { - return; - } - return this.log('query', context.query, context); - } - static create(options) { - return new SimpleLogger(options); - } -} diff --git a/node_modules/@mikro-orm/core/logging/colors.d.ts b/node_modules/@mikro-orm/core/logging/colors.d.ts deleted file mode 100644 index 8a62b1e..0000000 --- a/node_modules/@mikro-orm/core/logging/colors.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** @internal */ -export declare const colors: { - red: (text: string) => string; - green: (text: string) => string; - yellow: (text: string) => string; - grey: (text: string) => string; - cyan: (text: string) => string; - enabled: () => boolean; -}; diff --git a/node_modules/@mikro-orm/core/logging/colors.js b/node_modules/@mikro-orm/core/logging/colors.js deleted file mode 100644 index fd65cac..0000000 --- a/node_modules/@mikro-orm/core/logging/colors.js +++ /dev/null @@ -1,15 +0,0 @@ -import { getEnv } from '../utils/env-vars.js'; -const bool = k => ['true', 't', '1'].includes(getEnv(k)?.toLowerCase() ?? ''); -const boolIfDefined = k => (getEnv(k) != null ? bool(k) : true); -const enabled = () => - !bool('NO_COLOR') && !bool('MIKRO_ORM_NO_COLOR') && boolIfDefined('FORCE_COLOR') && boolIfDefined('MIKRO_ORM_COLORS'); -const wrap = fn => text => (enabled() ? fn(text) : text); -/** @internal */ -export const colors = { - red: wrap(text => `\x1B[31m${text}\x1B[39m`), - green: wrap(text => `\x1B[32m${text}\x1B[39m`), - yellow: wrap(text => `\x1B[33m${text}\x1B[39m`), - grey: wrap(text => `\x1B[90m${text}\x1B[39m`), - cyan: wrap(text => `\x1B[36m${text}\x1B[39m`), - enabled, -}; diff --git a/node_modules/@mikro-orm/core/logging/index.d.ts b/node_modules/@mikro-orm/core/logging/index.d.ts deleted file mode 100644 index e713c61..0000000 --- a/node_modules/@mikro-orm/core/logging/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './colors.js'; -export type * from './Logger.js'; -export * from './DefaultLogger.js'; -export * from './SimpleLogger.js'; -export * from './inspect.js'; diff --git a/node_modules/@mikro-orm/core/logging/index.js b/node_modules/@mikro-orm/core/logging/index.js deleted file mode 100644 index 466207d..0000000 --- a/node_modules/@mikro-orm/core/logging/index.js +++ /dev/null @@ -1,4 +0,0 @@ -export * from './colors.js'; -export * from './DefaultLogger.js'; -export * from './SimpleLogger.js'; -export * from './inspect.js'; diff --git a/node_modules/@mikro-orm/core/logging/inspect.d.ts b/node_modules/@mikro-orm/core/logging/inspect.d.ts deleted file mode 100644 index 931a73c..0000000 --- a/node_modules/@mikro-orm/core/logging/inspect.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -/** @internal */ -export declare function inspect(value: unknown, options?: Record): string; diff --git a/node_modules/@mikro-orm/core/logging/inspect.js b/node_modules/@mikro-orm/core/logging/inspect.js deleted file mode 100644 index f2799a8..0000000 --- a/node_modules/@mikro-orm/core/logging/inspect.js +++ /dev/null @@ -1,11 +0,0 @@ -let nodeInspect; -/** @internal */ -export function inspect(value, options) { - nodeInspect ??= globalThis.process?.getBuiltinModule?.('node:util').inspect; - /* v8 ignore else */ - if (nodeInspect) { - return nodeInspect(value, options); - } - /* v8 ignore next */ - return JSON.stringify(value, null, 2); -} diff --git a/node_modules/@mikro-orm/core/metadata/EntitySchema.d.ts b/node_modules/@mikro-orm/core/metadata/EntitySchema.d.ts deleted file mode 100644 index dffda36..0000000 --- a/node_modules/@mikro-orm/core/metadata/EntitySchema.d.ts +++ /dev/null @@ -1,225 +0,0 @@ -import { - EntityMetadata, - type AnyEntity, - type EntityKey, - type Constructor, - type DeepPartial, - type EntityName, - type EntityProperty, - type CleanKeys, - type ExpandProperty, - type IsNever, - type EntityCtor, -} from '../typings.js'; -import { type EventType, ReferenceKind } from '../enums.js'; -import type { EventArgs } from '../events/EventSubscriber.js'; -import { Type } from '../types/Type.js'; -import type { - PropertyOptions, - ManyToOneOptions, - OneToOneOptions, - OneToManyOptions, - ManyToManyOptions, - EmbeddedOptions, - EnumOptions, - PrimaryKeyOptions, - SerializedPrimaryKeyOptions, - IndexOptions, - UniqueOptions, -} from './types.js'; -type TypeType = - | string - | NumberConstructor - | StringConstructor - | BooleanConstructor - | DateConstructor - | ArrayConstructor - | Constructor> - | Type; -type TypeDef = - | { - type: TypeType; - } - | { - entity: () => EntityName | EntityName[]; - }; -type EmbeddedTypeDef = - | { - type: TypeType; - } - | { - entity: () => EntityName | EntityName[]; - }; -/** Union type representing all possible property definition shapes in an EntitySchema. */ -export type EntitySchemaProperty = - | ({ - kind: ReferenceKind.MANY_TO_ONE | 'm:1'; - } & TypeDef & - ManyToOneOptions) - | ({ - kind: ReferenceKind.ONE_TO_ONE | '1:1'; - } & TypeDef & - OneToOneOptions) - | ({ - kind: ReferenceKind.ONE_TO_MANY | '1:m'; - } & TypeDef & - OneToManyOptions) - | ({ - kind: ReferenceKind.MANY_TO_MANY | 'm:n'; - } & TypeDef & - ManyToManyOptions) - | ({ - kind: ReferenceKind.EMBEDDED | 'embedded'; - } & EmbeddedTypeDef & - EmbeddedOptions & - PropertyOptions) - | ({ - enum: true; - } & EnumOptions) - | (TypeDef & PropertyOptions); -type OmitBaseProps = IsNever extends true ? Entity : Omit; -/** Configuration object for defining an entity via EntitySchema. */ -export type EntitySchemaMetadata> = Omit< - Partial>, - 'name' | 'properties' | 'extends' -> & - ( - | { - name: string; - } - | { - class: Class; - name?: string; - } - ) & { - extends?: EntityName; - } & { - properties?: { - [Key in keyof OmitBaseProps as CleanKeys, Key>]-?: EntitySchemaProperty< - ExpandProperty>, - Entity - >; - }; - } & { - inheritance?: 'tpt'; - }; -/** Class-less entity definition that provides a programmatic API for defining entities without decorators. */ -export declare class EntitySchema> { - /** - * When schema links the entity class via `class` option, this registry allows the lookup from opposite side, - * so we can use the class in `entities` option just like the EntitySchema instance. - */ - static REGISTRY: Map; - /** @internal Type-level marker for fast entity type inference */ - readonly '~entity': Entity; - private readonly _meta; - private internal; - private initialized; - constructor(meta: EntitySchemaMetadata); - /** - * Checks if the given value is an EntitySchema instance, using duck-typing - * as a fallback when `instanceof` fails due to CJS/ESM dual-package hazard - * (e.g. when using `tsx` or `@swc-node/register` with `"type": "commonjs"` projects). - */ - static is(item: unknown): item is EntitySchema; - /** Creates an EntitySchema from existing EntityMetadata (used internally). */ - static fromMetadata( - meta: EntityMetadata | DeepPartial>, - ): EntitySchema; - /** Adds a scalar property to the entity schema. */ - addProperty( - name: EntityKey, - type?: TypeType, - options?: PropertyOptions | EntityProperty, - ): void; - /** Adds an enum property to the entity schema. */ - addEnum(name: EntityKey, type?: TypeType, options?: EnumOptions): void; - /** Adds a version property for optimistic locking. */ - addVersion(name: EntityKey, type: TypeType, options?: PropertyOptions): void; - /** Adds a primary key property to the entity schema. */ - addPrimaryKey(name: EntityKey, type: TypeType, options?: PrimaryKeyOptions): void; - /** Adds a serialized primary key property (e.g. for MongoDB ObjectId). */ - addSerializedPrimaryKey(name: EntityKey, type: TypeType, options?: SerializedPrimaryKeyOptions): void; - /** Adds an embedded property to the entity schema. */ - addEmbedded(name: EntityKey, options: EmbeddedOptions): void; - /** Adds a many-to-one relation to the entity schema. */ - addManyToOne( - name: EntityKey, - type: TypeType, - options: ManyToOneOptions, - ): void; - /** Adds a many-to-many relation to the entity schema. */ - addManyToMany( - name: EntityKey, - type: TypeType, - options: ManyToManyOptions, - ): void; - /** Adds a one-to-many relation to the entity schema. */ - addOneToMany( - name: EntityKey, - type: TypeType, - options: OneToManyOptions, - ): void; - /** Adds a one-to-one relation to the entity schema. */ - addOneToOne( - name: EntityKey, - type: TypeType, - options: OneToOneOptions, - ): void; - /** Adds an index definition to the entity schema. */ - addIndex(options: IndexOptions): void; - /** Adds a unique constraint definition to the entity schema. */ - addUnique(options: UniqueOptions): void; - /** Sets a custom repository class for this entity. */ - setCustomRepository(repository: () => Constructor): void; - /** Sets the base entity that this schema extends. */ - setExtends(base: EntityName): void; - /** Sets or replaces the entity class associated with this schema. */ - setClass(cls: Class): void; - /** Returns the underlying EntityMetadata. */ - get meta(): EntityMetadata; - /** Returns the entity class name. */ - get name(): string | EntityName; - /** Returns the database table name. */ - get tableName(): string; - get class(): Class; - get properties(): Record; - new(...params: ConstructorParameters): Entity; - /** - * @internal - */ - init(): this; - /** - * Check if this entity is part of a TPT hierarchy by walking up the extends chain. - * This handles mid-level abstract entities (e.g., Animal -> Mammal -> Dog where Mammal is abstract). - */ - private isPartOfTPTHierarchy; - private initProperties; - private initPrimaryKeys; - private normalizeType; - private createProperty; - private rename; - private renameCompositeOptions; - /** - * Adds a lifecycle hook handler to the entity schema. - * This method allows registering hooks after the entity is defined, - * which can be useful for avoiding circular type references. - * - * @example - * ```ts - * export const Article = defineEntity({ - * name: 'Article', - * properties: { ... }, - * }); - * - * Article.addHook('beforeCreate', async args => { - * args.entity.slug = args.entity.title.toLowerCase(); - * }); - * ``` - */ - addHook( - event: EventType | `${EventType}`, - handler: (args: EventArgs) => void | Promise, - ): this; -} -export {}; diff --git a/node_modules/@mikro-orm/core/metadata/EntitySchema.js b/node_modules/@mikro-orm/core/metadata/EntitySchema.js deleted file mode 100644 index 2fc6d51..0000000 --- a/node_modules/@mikro-orm/core/metadata/EntitySchema.js +++ /dev/null @@ -1,405 +0,0 @@ -import { EntityMetadata } from '../typings.js'; -import { BaseEntity } from '../entity/BaseEntity.js'; -import { Cascade, ReferenceKind } from '../enums.js'; -import { Type } from '../types/Type.js'; -import { Utils } from '../utils/Utils.js'; -import { EnumArrayType } from '../types/EnumArrayType.js'; -/** Class-less entity definition that provides a programmatic API for defining entities without decorators. */ -export class EntitySchema { - /** - * When schema links the entity class via `class` option, this registry allows the lookup from opposite side, - * so we can use the class in `entities` option just like the EntitySchema instance. - */ - static REGISTRY = new Map(); - _meta; - internal = false; - initialized = false; - constructor(meta) { - meta.name = meta.class ? meta.class.name : meta.name; - if (meta.name) { - meta.abstract ??= false; - } - this._meta = new EntityMetadata({ - className: meta.name, - ...meta, - }); - this._meta.root ??= this._meta; - if (meta.class && !meta.internal) { - EntitySchema.REGISTRY.set(meta.class, this); - } - } - /** - * Checks if the given value is an EntitySchema instance, using duck-typing - * as a fallback when `instanceof` fails due to CJS/ESM dual-package hazard - * (e.g. when using `tsx` or `@swc-node/register` with `"type": "commonjs"` projects). - */ - static is(item) { - if (item instanceof EntitySchema) { - return true; - } - return item != null && typeof item === 'object' && item.constructor?.name === 'EntitySchema' && 'meta' in item; - } - /** Creates an EntitySchema from existing EntityMetadata (used internally). */ - static fromMetadata(meta) { - const schema = new EntitySchema({ ...meta, internal: true }); - schema.internal = true; - return schema; - } - /** Adds a scalar property to the entity schema. */ - addProperty(name, type, options = {}) { - this.renameCompositeOptions(name, options); - const prop = { - name, - kind: ReferenceKind.SCALAR, - ...options, - ...this.normalizeType(options, type), - }; - if (type && Type.isMappedType(type.prototype)) { - prop.type = type; - } - if (typeof prop.formula === 'string') { - const formula = prop.formula; - prop.formula = () => formula; - } - if (prop.formula) { - prop.persist ??= false; - } - this._meta.properties[name] = prop; - } - /** Adds an enum property to the entity schema. */ - addEnum(name, type, options = {}) { - if (options.items instanceof Function) { - options.items = Utils.extractEnumValues(options.items()); - } - // enum arrays are simple numeric/string arrays, the constraint is enforced in the custom type only - if (options.array && !options.type) { - options.type = new EnumArrayType(`${this._meta.className}.${name}`, options.items); - options.enum = false; - } - const prop = { enum: true, ...options }; - if (prop.array) { - prop.enum = false; - } - // force string labels on native enums - if (prop.nativeEnumName && Array.isArray(prop.items)) { - prop.items = prop.items.map(val => '' + val); - } - this.addProperty(name, this.internal ? type : type || 'enum', prop); - } - /** Adds a version property for optimistic locking. */ - addVersion(name, type, options = {}) { - this.addProperty(name, type, { version: true, ...options }); - } - /** Adds a primary key property to the entity schema. */ - addPrimaryKey(name, type, options = {}) { - this.addProperty(name, type, { primary: true, ...options }); - } - /** Adds a serialized primary key property (e.g. for MongoDB ObjectId). */ - addSerializedPrimaryKey(name, type, options = {}) { - this._meta.serializedPrimaryKey = name; - this.addProperty(name, type, { serializedPrimaryKey: true, ...options }); - } - /** Adds an embedded property to the entity schema. */ - addEmbedded(name, options) { - this.renameCompositeOptions(name, options); - Utils.defaultValue(options, 'prefix', true); - if (options.array) { - options.object = true; // force object mode for arrays - } - this._meta.properties[name] = { - name, - kind: ReferenceKind.EMBEDDED, - ...this.normalizeType(options), - ...options, - }; - } - /** Adds a many-to-one relation to the entity schema. */ - addManyToOne(name, type, options) { - const prop = this.createProperty(ReferenceKind.MANY_TO_ONE, options); - prop.owner = true; - if (prop.joinColumns && !prop.fieldNames) { - prop.fieldNames = prop.joinColumns; - } - if (prop.fieldNames && !prop.joinColumns) { - prop.joinColumns = prop.fieldNames; - } - // By default, the foreign key constraint is created on the relation - Utils.defaultValue(prop, 'createForeignKeyConstraint', true); - this.addProperty(name, type, prop); - } - /** Adds a many-to-many relation to the entity schema. */ - addManyToMany(name, type, options) { - options.fixedOrder = options.fixedOrder || !!options.fixedOrderColumn; - if (!options.owner && !options.mappedBy) { - options.owner = true; - } - if (options.owner) { - Utils.renameKey(options, 'mappedBy', 'inversedBy'); - // By default, the foreign key constraint is created on the relation - Utils.defaultValue(options, 'createForeignKeyConstraint', true); - } - const prop = this.createProperty(ReferenceKind.MANY_TO_MANY, options); - this.addProperty(name, type, prop); - } - /** Adds a one-to-many relation to the entity schema. */ - addOneToMany(name, type, options) { - const prop = this.createProperty(ReferenceKind.ONE_TO_MANY, options); - this.addProperty(name, type, prop); - } - /** Adds a one-to-one relation to the entity schema. */ - addOneToOne(name, type, options) { - const prop = this.createProperty(ReferenceKind.ONE_TO_ONE, options); - Utils.defaultValue(prop, 'owner', !!prop.inversedBy || !prop.mappedBy); - Utils.defaultValue(prop, 'unique', prop.owner); - if (prop.owner) { - if (options.mappedBy) { - Utils.renameKey(prop, 'mappedBy', 'inversedBy'); - } - // By default, the foreign key constraint is created on the relation - Utils.defaultValue(prop, 'createForeignKeyConstraint', true); - } - if (prop.joinColumns && !prop.fieldNames) { - prop.fieldNames = prop.joinColumns; - } - if (prop.fieldNames && !prop.joinColumns) { - prop.joinColumns = prop.fieldNames; - } - this.addProperty(name, type, prop); - } - /** Adds an index definition to the entity schema. */ - addIndex(options) { - this._meta.indexes.push(options); - } - /** Adds a unique constraint definition to the entity schema. */ - addUnique(options) { - this._meta.uniques.push(options); - } - /** Sets a custom repository class for this entity. */ - setCustomRepository(repository) { - this._meta.repository = repository; - } - /** Sets the base entity that this schema extends. */ - setExtends(base) { - this._meta.extends = base; - } - /** Sets or replaces the entity class associated with this schema. */ - setClass(cls) { - const oldClass = this._meta.class; - const sameClass = this._meta.class === cls; - this._meta.class = cls; - this._meta.prototype = cls.prototype; - this._meta.className = this._meta.name ?? cls.name; - if (!sameClass || !this._meta.constructorParams) { - this._meta.constructorParams = Utils.getConstructorParams(cls); - } - if (!this.internal) { - // Remove old class from registry if it's being replaced with a different class - if (oldClass && oldClass !== cls && EntitySchema.REGISTRY.get(oldClass) === this) { - EntitySchema.REGISTRY.delete(oldClass); - } - EntitySchema.REGISTRY.set(cls, this); - } - const base = Object.getPrototypeOf(cls); - // Only set extends if the parent is NOT the auto-generated class for this same entity. - // When the user extends the auto-generated class (from defineEntity without a class option) - // and registers their custom class via setClass, we don't want to discover the - // auto-generated class as a separate parent entity. - if (base !== BaseEntity && base.name !== this._meta.className) { - this._meta.extends ??= base.name ? base : undefined; - } - } - /** Returns the underlying EntityMetadata. */ - get meta() { - return this._meta; - } - /** Returns the entity class name. */ - get name() { - return this._meta.className; - } - /** Returns the database table name. */ - get tableName() { - return this._meta.tableName; - } - get class() { - return this._meta.class; - } - get properties() { - return this._meta.properties; - } - new(...params) { - return new this._meta.class(...params); - } - /** - * @internal - */ - init() { - if (this.initialized) { - return this; - } - this.setClass(this._meta.class); - // Abstract TPT entities keep their name because they have their own table - const isTPT = this._meta.inheritance === 'tpt' || this.isPartOfTPTHierarchy(); - if (this._meta.abstract && !this._meta.discriminatorColumn && !isTPT) { - delete this._meta.name; - } - const tableName = this._meta.collection ?? this._meta.tableName; - if (tableName?.includes('.') && !this._meta.schema) { - this._meta.schema = tableName.substring(0, tableName.indexOf('.')); - this._meta.tableName = tableName.substring(tableName.indexOf('.') + 1); - } - this.initProperties(); - this.initPrimaryKeys(); - this._meta.props = Object.values(this._meta.properties); - this._meta.relations = this._meta.props.filter( - prop => - typeof prop.kind !== 'undefined' && prop.kind !== ReferenceKind.SCALAR && prop.kind !== ReferenceKind.EMBEDDED, - ); - this.initialized = true; - return this; - } - /** - * Check if this entity is part of a TPT hierarchy by walking up the extends chain. - * This handles mid-level abstract entities (e.g., Animal -> Mammal -> Dog where Mammal is abstract). - */ - isPartOfTPTHierarchy() { - let parent = this._meta.extends; - while (parent) { - const parentSchema = EntitySchema.is(parent) ? parent : EntitySchema.REGISTRY.get(parent); - if (!parentSchema) { - break; - } - if (parentSchema._meta.inheritance === 'tpt') { - return true; - } - parent = parentSchema._meta.extends; - } - return false; - } - initProperties() { - Utils.entries(this._meta.properties).forEach(([name, options]) => { - if (Type.isMappedType(options.type)) { - options.type ??= options.type.constructor.name; - } - switch (options.kind) { - case ReferenceKind.ONE_TO_ONE: - this.addOneToOne(name, options.type, options); - break; - case ReferenceKind.ONE_TO_MANY: - this.addOneToMany(name, options.type, options); - break; - case ReferenceKind.MANY_TO_ONE: - this.addManyToOne(name, options.type, options); - break; - case ReferenceKind.MANY_TO_MANY: - this.addManyToMany(name, options.type, options); - break; - case ReferenceKind.EMBEDDED: - this.addEmbedded(name, options); - break; - default: - if (options.enum) { - this.addEnum(name, options.type, options); - } else if (options.primary) { - this.addPrimaryKey(name, options.type, options); - } else if (options.serializedPrimaryKey) { - this.addSerializedPrimaryKey(name, options.type, options); - } else if (options.version) { - this.addVersion(name, options.type, options); - } else { - this.addProperty(name, options.type, options); - } - } - }); - } - initPrimaryKeys() { - const pks = Object.values(this._meta.properties).filter(prop => prop.primary); - if (pks.length > 0) { - this._meta.primaryKeys = pks.map(prop => prop.name); - this._meta.compositePK = pks.length > 1; - this._meta.simplePK = !this._meta.compositePK && pks[0].kind === ReferenceKind.SCALAR && !pks[0].customType; - } - if (pks.length === 1 && ['number', 'bigint'].includes(pks[0].type)) { - pks[0].autoincrement ??= true; - } - const serializedPrimaryKey = Object.values(this._meta.properties).find(prop => prop.serializedPrimaryKey); - if (serializedPrimaryKey) { - this._meta.serializedPrimaryKey = serializedPrimaryKey.name; - } - } - normalizeType(options, type) { - if ('entity' in options) { - /* v8 ignore next */ - if (typeof options.entity === 'string') { - throw new Error( - `Relation target needs to be an entity class or EntitySchema instance, string '${options.entity}' given instead for ${this._meta.className}.${options.name}.`, - ); - } else if (options.entity) { - const tmp = options.entity(); - type = options.type = Array.isArray(tmp) - ? tmp - .map(t => Utils.className(t)) - .sort() - .join(' | ') - : Utils.className(tmp); - const target = EntitySchema.is(tmp) ? tmp.meta.class : tmp; - return { type, target }; - } - } - if (type instanceof Function) { - type = type.name; - } - if (['String', 'Number', 'Boolean', 'Array'].includes(type)) { - type = type.toLowerCase(); - } - return { type }; - } - createProperty(kind, options) { - return { - kind, - cascade: [Cascade.PERSIST], - ...options, - }; - } - rename(data, from, to) { - if (from in data && !(to in data)) { - // @ts-ignore - data[to] = [data[from]]; - // @ts-ignore - delete data[from]; - } - } - renameCompositeOptions(name, options = {}) { - if (name !== options.name && !options.fieldNames) { - Utils.renameKey(options, 'name', 'fieldName'); - } else if (options.name && (options.fieldNames?.length ?? 0) > 1) { - delete options.name; - } - this.rename(options, 'fieldName', 'fieldNames'); - this.rename(options, 'joinColumn', 'joinColumns'); - this.rename(options, 'inverseJoinColumn', 'inverseJoinColumns'); - this.rename(options, 'referenceColumnName', 'referencedColumnNames'); - this.rename(options, 'columnType', 'columnTypes'); - } - /** - * Adds a lifecycle hook handler to the entity schema. - * This method allows registering hooks after the entity is defined, - * which can be useful for avoiding circular type references. - * - * @example - * ```ts - * export const Article = defineEntity({ - * name: 'Article', - * properties: { ... }, - * }); - * - * Article.addHook('beforeCreate', async args => { - * args.entity.slug = args.entity.title.toLowerCase(); - * }); - * ``` - */ - addHook(event, handler) { - this._meta.hooks[event] ??= []; - this._meta.hooks[event].push(handler); - return this; - } -} diff --git a/node_modules/@mikro-orm/core/metadata/MetadataDiscovery.d.ts b/node_modules/@mikro-orm/core/metadata/MetadataDiscovery.d.ts deleted file mode 100644 index fa1bfaa..0000000 --- a/node_modules/@mikro-orm/core/metadata/MetadataDiscovery.d.ts +++ /dev/null @@ -1,122 +0,0 @@ -import { type EntityClass, EntityMetadata, type EntityName } from '../typings.js'; -import type { Configuration } from '../utils/Configuration.js'; -import { MetadataStorage } from './MetadataStorage.js'; -import { EntitySchema } from './EntitySchema.js'; -import type { Platform } from '../platforms/Platform.js'; -/** Discovers, validates, and processes entity metadata from configured sources. */ -export declare class MetadataDiscovery { - #private; - constructor(metadata: MetadataStorage, platform: Platform, config: Configuration); - /** Discovers all entities asynchronously and returns the populated MetadataStorage. */ - discover(preferTs?: boolean): Promise; - /** Discovers all entities synchronously and returns the populated MetadataStorage. */ - discoverSync(): MetadataStorage; - private mapDiscoveredEntities; - private initAccessors; - /** Processes discovered entities: initializes relations, embeddables, indexes, and inheritance. */ - processDiscoveredEntities(discovered: EntityMetadata[]): EntityMetadata[]; - private findEntities; - private discoverMissingTargets; - private tryDiscoverTargets; - discoverReferences(refs: Iterable | EntitySchema>, validate?: boolean): EntityMetadata[]; - reset(entityName: EntityName): void; - private getSchema; - private getRootEntity; - private discoverEntity; - private initNullability; - private applyNamingStrategy; - private initOwnColumns; - private initFieldName; - private initManyToOneFieldName; - private initManyToManyFieldName; - private initManyToManyFields; - private isExplicitTableName; - private initManyToOneFields; - private initOneToManyFields; - private processEntity; - private findReferencingProperties; - private initFactoryField; - private ensureCorrectFKOrderInPivotEntity; - private definePivotTableEntity; - /** - * Create a scalar property for a pivot table column. - */ - private createPivotScalarProperty; - /** - * Get column types for an entity's primary keys, initializing them if needed. - */ - private getPrimaryKeyColumnTypes; - /** - * Add missing FK columns for a polymorphic entity to an existing pivot table. - */ - private addPolymorphicPivotColumns; - /** - * Define properties for a polymorphic pivot table. - */ - private definePolymorphicPivotProperties; - /** - * Create a virtual M:1 relation from pivot to a polymorphic owner entity. - * This enables single-query join loading for inverse-side polymorphic M:N. - */ - private definePolymorphicOwnerRelation; - private defineFixedOrderProperty; - private definePivotProperty; - private autoWireBidirectionalProperties; - private defineBaseEntityProperties; - private initPolyEmbeddables; - private initPolymorphicRelation; - private initEmbeddables; - private initSingleTableInheritance; - /** - * First pass of TPT initialization: sets up hierarchy relationships - * (inheritanceType, tptParent, tptChildren) before properties have fieldNames. - */ - private initTPTRelationships; - /** - * Second pass of TPT initialization: re-resolves metadata references after fieldNames - * are set, syncs to registry metadata, and sets up discriminators. - */ - private finalizeTPTInheritance; - /** - * Initialize TPT discriminator map and virtual discriminator property. - * Unlike STI where the discriminator is a persisted column, TPT discriminator is computed - * at query time using CASE WHEN expressions based on which child table has data. - */ - private initTPTDiscriminator; - /** - * Recursively collect all TPT descendants (children, grandchildren, etc.) - */ - private collectAllTPTDescendants; - /** - * Computes ownProps for TPT entities - only properties defined in THIS entity, - * not inherited from parent. Also creates synthetic join properties for parent/child relationships. - * - * Called multiple times during discovery as metadata is progressively built. - * Each pass overwrites earlier results to reflect the final state of properties. - */ - private computeTPTOwnProps; - /** Returns the depth of a TPT entity in its hierarchy (0 for root). */ - private getTPTDepth; - /** - * Find the direct TPT parent entity for the given entity. - */ - private getTPTParent; - private createDiscriminatorProperty; - private initAutoincrement; - private createSchemaTable; - private initCheckConstraints; - private initGeneratedColumn; - private getDefaultVersionValue; - private inferDefaultValue; - private initDefaultValue; - private inferTypeFromDefault; - private initVersionProperty; - private initCustomType; - private initRelation; - private initColumnType; - private getMappedType; - private getPrefix; - private initUnsigned; - private initIndexes; - private shouldForceConstructorUsage; -} diff --git a/node_modules/@mikro-orm/core/metadata/MetadataDiscovery.js b/node_modules/@mikro-orm/core/metadata/MetadataDiscovery.js deleted file mode 100644 index 94fbdd4..0000000 --- a/node_modules/@mikro-orm/core/metadata/MetadataDiscovery.js +++ /dev/null @@ -1,1973 +0,0 @@ -import { EntityMetadata } from '../typings.js'; -import { compareArrays, Utils } from '../utils/Utils.js'; -import { QueryHelper } from '../utils/QueryHelper.js'; -import { MetadataValidator } from './MetadataValidator.js'; -import { MetadataProvider } from './MetadataProvider.js'; -import { MetadataStorage } from './MetadataStorage.js'; -import { EntitySchema } from './EntitySchema.js'; -import { Cascade, ReferenceKind } from '../enums.js'; -import { MetadataError } from '../errors.js'; -import { t, Type } from '../types/index.js'; -import { colors } from '../logging/colors.js'; -import { raw, Raw } from '../utils/RawQueryFragment.js'; -import { BaseEntity } from '../entity/BaseEntity.js'; -/** Discovers, validates, and processes entity metadata from configured sources. */ -export class MetadataDiscovery { - #namingStrategy; - #metadataProvider; - #logger; - #schemaHelper; - #validator = new MetadataValidator(); - #discovered = []; - #metadata; - #platform; - #config; - constructor(metadata, platform, config) { - this.#metadata = metadata; - this.#platform = platform; - this.#config = config; - this.#namingStrategy = this.#config.getNamingStrategy(); - this.#metadataProvider = this.#config.getMetadataProvider(); - this.#logger = this.#config.getLogger(); - this.#schemaHelper = this.#platform.getSchemaHelper(); - } - /** Discovers all entities asynchronously and returns the populated MetadataStorage. */ - async discover(preferTs = true) { - this.#discovered.length = 0; - const startTime = Date.now(); - const suffix = - this.#metadataProvider.constructor === MetadataProvider - ? '' - : `, using ${colors.cyan(this.#metadataProvider.constructor.name)}`; - this.#logger.log('discovery', `ORM entity discovery started${suffix}`); - await this.findEntities(preferTs); - for (const meta of this.#discovered) { - /* v8 ignore next */ - await this.#config.get('discovery').onMetadata?.(meta, this.#platform); - } - this.processDiscoveredEntities(this.#discovered); - const diff = Date.now() - startTime; - this.#logger.log( - 'discovery', - `- entity discovery finished, found ${colors.green('' + this.#discovered.length)} entities, took ${colors.green(`${diff} ms`)}`, - ); - const storage = this.mapDiscoveredEntities(); - /* v8 ignore next */ - await this.#config.get('discovery').afterDiscovered?.(storage, this.#platform); - return storage; - } - /** Discovers all entities synchronously and returns the populated MetadataStorage. */ - discoverSync() { - this.#discovered.length = 0; - const startTime = Date.now(); - const suffix = - this.#metadataProvider.constructor === MetadataProvider - ? '' - : `, using ${colors.cyan(this.#metadataProvider.constructor.name)}`; - this.#logger.log('discovery', `ORM entity discovery started${suffix} in sync mode`); - const refs = this.#config.get('entities'); - this.discoverReferences(refs); - for (const meta of this.#discovered) { - /* v8 ignore next */ - void this.#config.get('discovery').onMetadata?.(meta, this.#platform); - } - this.processDiscoveredEntities(this.#discovered); - const diff = Date.now() - startTime; - this.#logger.log( - 'discovery', - `- entity discovery finished, found ${colors.green('' + this.#discovered.length)} entities, took ${colors.green(`${diff} ms`)}`, - ); - const storage = this.mapDiscoveredEntities(); - /* v8 ignore next */ - void this.#config.get('discovery').afterDiscovered?.(storage, this.#platform); - return storage; - } - mapDiscoveredEntities() { - const discovered = new MetadataStorage(); - this.#discovered - .filter(meta => meta.root.name) - .sort((a, b) => b.root.name.localeCompare(a.root.name)) - .forEach(meta => { - this.#platform.validateMetadata(meta); - discovered.set(meta.class, meta); - }); - for (const meta of discovered) { - meta.root = discovered.get(meta.root.class); - if (meta.inheritanceType === 'tpt') { - this.computeTPTOwnProps(meta); - } - } - return discovered; - } - initAccessors(meta) { - for (const prop of Object.values(meta.properties)) { - if (!prop.accessor || meta.properties[prop.accessor]) { - continue; - } - const desc = Object.getOwnPropertyDescriptor(meta.prototype, prop.name); - if (desc?.get || desc?.set) { - this.initRelation(prop); - this.initFieldName(prop); - const accessor = prop.name; - prop.name = typeof prop.accessor === 'string' ? prop.accessor : prop.name; - if (prop.accessor === true) { - prop.getter = prop.setter = true; - } else { - prop.getter = prop.setter = false; - } - prop.accessor = accessor; - prop.serializedName ??= accessor; - Utils.renameKey(meta.properties, accessor, prop.name); - } else { - const name = prop.name; - if (prop.kind === ReferenceKind.SCALAR || prop.kind === ReferenceKind.EMBEDDED) { - prop.name = prop.accessor; - } - this.initRelation(prop); - this.initFieldName(prop); - prop.serializedName ??= prop.accessor; - prop.name = name; - } - } - } - /** Processes discovered entities: initializes relations, embeddables, indexes, and inheritance. */ - processDiscoveredEntities(discovered) { - for (const meta of discovered) { - let i = 1; - Object.values(meta.properties).forEach(prop => meta.propertyOrder.set(prop.name, i++)); - Object.values(meta.properties).forEach(prop => this.initPolyEmbeddables(prop, discovered)); - this.initAccessors(meta); - } - // ignore base entities (not annotated with @Entity) - const filtered = discovered.filter(meta => meta.root.name); - // sort so we discover entities first to get around issues with nested embeddables - filtered.sort((a, b) => (!a.embeddable === !b.embeddable ? 0 : a.embeddable ? 1 : -1)); - filtered.forEach(meta => this.initSingleTableInheritance(meta, filtered)); - filtered.forEach(meta => this.initTPTRelationships(meta, filtered)); - filtered.forEach(meta => this.defineBaseEntityProperties(meta)); - filtered.forEach(meta => { - const newMeta = EntitySchema.fromMetadata(meta).init().meta; - return this.#metadata.set(newMeta.class, newMeta); - }); - filtered.forEach(meta => this.initAutoincrement(meta)); - const forEachProp = cb => { - filtered.forEach(meta => Object.values(meta.properties).forEach(prop => cb(meta, prop))); - }; - forEachProp((m, p) => this.initFactoryField(m, p)); - forEachProp((m, p) => this.initPolymorphicRelation(m, p, filtered)); - forEachProp((_m, p) => this.initRelation(p)); - forEachProp((m, p) => this.initEmbeddables(m, p)); - forEachProp((_m, p) => this.initFieldName(p)); - filtered.forEach(meta => this.finalizeTPTInheritance(meta, filtered)); - filtered.forEach(meta => this.computeTPTOwnProps(meta)); - forEachProp((m, p) => this.initVersionProperty(m, p)); - forEachProp((m, p) => this.initCustomType(m, p)); - forEachProp((m, p) => this.initGeneratedColumn(m, p)); - filtered.forEach(meta => this.initAutoincrement(meta)); // once again after we init custom types - filtered.forEach(meta => this.initCheckConstraints(meta)); - forEachProp((_m, p) => { - this.initDefaultValue(p); - this.inferTypeFromDefault(p); - this.initRelation(p); - this.initColumnType(p); - }); - forEachProp((m, p) => this.initIndexes(m, p)); - filtered.forEach(meta => this.autoWireBidirectionalProperties(meta)); - for (const meta of filtered) { - discovered.push(...this.processEntity(meta)); - } - discovered.forEach(meta => meta.sync(true)); - this.#metadataProvider.combineCache(); - return discovered.map(meta => { - meta = this.#metadata.get(meta.class); - meta.sync(true); - this.findReferencingProperties(meta, filtered); - if (meta.inheritanceType === 'tpt') { - this.computeTPTOwnProps(meta); - } - return meta; - }); - } - async findEntities(preferTs) { - const { entities, entitiesTs, baseDir } = this.#config.getAll(); - const targets = preferTs && entitiesTs.length > 0 ? entitiesTs : entities; - const processed = []; - const paths = []; - for (const entity of targets) { - if (typeof entity === 'string') { - paths.push(entity); - } else { - processed.push(entity); - } - } - if (paths.length > 0) { - const { discoverEntities } = await import('@mikro-orm/core/file-discovery'); - processed.push(...(await discoverEntities(paths, { baseDir }))); - } - return this.discoverReferences(processed); - } - discoverMissingTargets() { - const unwrap = type => - type - .replace(/Array<(.*)>/, '$1') // unwrap array - .replace(/\[]$/, '') // remove array suffix - .replace(/\((.*)\)/, '$1'); // unwrap union types - const missing = []; - this.#discovered.forEach(meta => - Object.values(meta.properties).forEach(prop => { - if (prop.kind === ReferenceKind.MANY_TO_MANY && prop.pivotEntity) { - const pivotEntity = prop.pivotEntity; - const target = typeof pivotEntity === 'function' && !pivotEntity.prototype ? pivotEntity() : pivotEntity; - if (!this.#discovered.find(m => m.className === Utils.className(target))) { - missing.push(target); - } - } - if (prop.kind !== ReferenceKind.SCALAR) { - const target = typeof prop.entity === 'function' && !prop.entity.prototype ? prop.entity() : prop.type; - if ( - !unwrap(prop.type) - .split(/ ?\| ?/) - .every(type => this.#discovered.find(m => m.className === type)) - ) { - missing.push(...Utils.asArray(target)); - } - } - }), - ); - if (missing.length > 0) { - this.tryDiscoverTargets(missing); - } - } - tryDiscoverTargets(targets) { - for (const target of targets) { - const schema = EntitySchema.is(target) ? target : undefined; - const isDiscoverable = typeof target === 'function' || schema; - if (isDiscoverable && target.name) { - // Get the actual class for EntitySchema, or use target directly for classes - const targetClass = schema ? schema.meta.class : target; - if (!this.#metadata.has(targetClass)) { - this.discoverReferences([target], false); - this.discoverMissingTargets(); - } - } - } - } - discoverReferences(refs, validate = true) { - const found = []; - for (const entity of refs) { - if (typeof entity === 'string') { - throw new Error('Folder based discovery requires the async `MikroORM.init()` method.'); - } - const schema = this.getSchema(entity); - const meta = schema.init().meta; - this.#metadata.set(meta.class, meta); - found.push(schema); - } - // discover parents (base entities) automatically - for (const meta of this.#metadata) { - let parent = meta.extends; - if (EntitySchema.is(parent) && !this.#metadata.has(parent.init().meta.class)) { - this.discoverReferences([parent], false); - } - if (typeof parent === 'function' && parent.name && !this.#metadata.has(parent)) { - this.discoverReferences([parent], false); - } - /* v8 ignore next */ - if (!meta.class) { - continue; - } - parent = Object.getPrototypeOf(meta.class); - // Skip if parent is the auto-generated base class for the same entity (from setClass usage) - if ( - parent.name !== '' && - parent.name !== meta.className && - !this.#metadata.has(parent) && - parent !== BaseEntity - ) { - this.discoverReferences([parent], false); - } - } - for (const schema of found) { - this.discoverEntity(schema); - } - this.discoverMissingTargets(); - if (validate) { - this.#validator.validateDiscovered(this.#discovered, this.#config.get('discovery')); - } - return this.#discovered.filter(meta => found.find(m => m.name === meta.className)); - } - reset(entityName) { - const exists = this.#discovered.findIndex( - m => m.class === entityName || m.className === Utils.className(entityName), - ); - if (exists !== -1) { - this.#metadata.reset(this.#discovered[exists].class); - this.#discovered.splice(exists, 1); - } - } - getSchema(entity) { - if (EntitySchema.REGISTRY.has(entity)) { - entity = EntitySchema.REGISTRY.get(entity); - } - if (EntitySchema.is(entity)) { - const meta = Utils.copy(entity.meta, false); - return EntitySchema.fromMetadata(meta); - } - // After the EntitySchema check, entity must be an EntityClass - const cls = entity; - const path = cls[MetadataStorage.PATH_SYMBOL]; - if (path) { - const meta = Utils.copy(MetadataStorage.getMetadata(cls.name, path), false); - meta.path = path; - this.#metadata.set(cls, meta); - } - const exists = this.#metadata.has(cls); - const meta = this.#metadata.get(cls, true); - meta.abstract ??= !(exists && meta.name); - const schema = EntitySchema.fromMetadata(meta); - schema.setClass(cls); - return schema; - } - getRootEntity(meta) { - const base = meta.extends && this.#metadata.find(meta.extends); - if (!base || base === meta) { - // make sure we do not fall into infinite loop - return meta; - } - const root = this.getRootEntity(base); - // For STI or TPT, use the root entity. - // Check both `inheritanceType` (set during discovery) and raw `inheritance` option (set before discovery). - if (root.discriminatorColumn || root.inheritanceType || root.inheritance === 'tpt') { - return root; - } - return meta; - } - discoverEntity(schema) { - const meta = schema.meta; - const path = meta.path; - this.#logger.log( - 'discovery', - `- processing entity ${colors.cyan(meta.className)}${colors.grey(path ? ` (${path})` : '')}`, - ); - const root = this.getRootEntity(meta); - schema.meta.path = meta.path; - const cache = this.#metadataProvider.getCachedMetadata(meta, root); - if (cache) { - this.#logger.log('discovery', `- using cached metadata for entity ${colors.cyan(meta.className)}`); - this.#discovered.push(meta); - return; - } - // infer default value from property initializer early, as the metadata provider might use some defaults, e.g. string for reflect-metadata - for (const prop of meta.props) { - this.inferDefaultValue(meta, prop); - } - // if the definition is using EntitySchema we still want it to go through the metadata provider to validate no types are missing - this.#metadataProvider.loadEntityMetadata(meta); - if (!meta.tableName && meta.name) { - const entityName = root.discriminatorColumn ? root.name : meta.name; - meta.tableName = this.#namingStrategy.classToTableName(entityName); - } - this.#metadataProvider.saveToCache(meta); - meta.root = root; - this.#discovered.push(meta); - } - initNullability(prop) { - if (prop.kind === ReferenceKind.ONE_TO_ONE) { - return Utils.defaultValue(prop, 'nullable', prop.optional || !prop.owner); - } - return Utils.defaultValue(prop, 'nullable', prop.optional); - } - applyNamingStrategy(meta, prop) { - if (!prop.fieldNames) { - this.initFieldName(prop); - } - if (prop.kind === ReferenceKind.MANY_TO_MANY) { - this.initManyToManyFields(meta, prop); - } - if ([ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind)) { - this.initManyToOneFields(prop); - } - if (prop.kind === ReferenceKind.ONE_TO_MANY) { - this.initOneToManyFields(prop); - } - } - initOwnColumns(meta) { - meta.sync(); - for (const prop of meta.props) { - if ( - !prop.joinColumns || - !prop.columnTypes || - prop.ownColumns || - ![ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) - ) { - continue; - } - // For polymorphic relations, ownColumns should include all fieldNames - // (discriminator + ID columns) since they are all owned by this relation - if (prop.polymorphic) { - prop.ownColumns = prop.fieldNames; - continue; - } - if (prop.joinColumns.length > 1) { - prop.ownColumns = prop.joinColumns.filter(col => { - return !meta.props.find(p => p.name !== prop.name && (!p.fieldNames || p.fieldNames.includes(col))); - }); - } - if (!prop.ownColumns || prop.ownColumns.length === 0) { - prop.ownColumns = prop.joinColumns; - } - if (prop.joinColumns.length !== prop.columnTypes.length) { - prop.columnTypes = prop.joinColumns.flatMap(field => { - const matched = meta.props.find(p => p.fieldNames?.includes(field)); - /* v8 ignore next */ - if (!matched) { - throw MetadataError.fromWrongForeignKey(meta, prop, 'columnTypes'); - } - return matched.columnTypes; - }); - } - if (prop.joinColumns.length !== prop.referencedColumnNames.length) { - throw MetadataError.fromWrongForeignKey(meta, prop, 'referencedColumnNames'); - } - } - } - initFieldName(prop, object = false) { - if (prop.fieldNames && prop.fieldNames.length > 0) { - return; - } - if (prop.kind === ReferenceKind.SCALAR || prop.kind === ReferenceKind.EMBEDDED) { - prop.fieldNames = [this.#namingStrategy.propertyToColumnName(prop.name, object)]; - } else if ([ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) && !prop.polymorphic) { - prop.fieldNames = this.initManyToOneFieldName(prop, prop.name); - } else if (prop.kind === ReferenceKind.MANY_TO_MANY && prop.owner) { - prop.fieldNames = this.initManyToManyFieldName(prop, prop.name); - } - } - initManyToOneFieldName(prop, name, tableName) { - const meta2 = prop.targetMeta; - const ret = []; - for (const primaryKey of meta2.primaryKeys) { - this.initFieldName(meta2.properties[primaryKey]); - for (const fieldName of meta2.properties[primaryKey].fieldNames) { - ret.push(this.#namingStrategy.joinKeyColumnName(name, fieldName, meta2.compositePK, tableName)); - } - } - return ret; - } - initManyToManyFieldName(prop, name) { - const meta2 = prop.targetMeta; - return meta2.primaryKeys.map(() => this.#namingStrategy.propertyToColumnName(name)); - } - initManyToManyFields(meta, prop) { - const meta2 = prop.targetMeta; - Utils.defaultValue(prop, 'fixedOrder', !!prop.fixedOrderColumn); - const pivotMeta = this.#metadata.find(prop.pivotEntity); - const props = Object.values(pivotMeta?.properties ?? {}); - const pks = props.filter(p => p.primary); - const fks = props.filter(p => p.kind === ReferenceKind.MANY_TO_ONE); - if (pivotMeta) { - pivotMeta.pivotTable = true; - prop.pivotTable = pivotMeta.tableName; - if (pks.length === 1) { - prop.fixedOrder = true; - prop.fixedOrderColumn = pks[0].name; - } - } - if (pivotMeta && (pks.length === 2 || fks.length >= 2)) { - const owner = prop.mappedBy ? meta2.properties[prop.mappedBy] : prop; - const [first, second] = this.ensureCorrectFKOrderInPivotEntity(pivotMeta, owner); - prop.joinColumns ??= first.fieldNames; - prop.inverseJoinColumns ??= second.fieldNames; - } - if (!prop.pivotTable && prop.owner && this.#platform.usesPivotTable()) { - prop.pivotTable = this.#namingStrategy.joinTableName(meta.className, meta2.tableName, prop.name, meta.tableName); - } - if (prop.mappedBy) { - const prop2 = meta2.properties[prop.mappedBy]; - this.initManyToManyFields(meta2, prop2); - prop.pivotTable = prop2.pivotTable; - prop.pivotEntity = prop2.pivotEntity; - prop.fixedOrder = prop2.fixedOrder; - prop.fixedOrderColumn = prop2.fixedOrderColumn; - prop.joinColumns = prop2.inverseJoinColumns; - prop.inverseJoinColumns = prop2.joinColumns; - prop.polymorphic = prop2.polymorphic; - prop.discriminator = prop2.discriminator; - prop.discriminatorColumn = prop2.discriminatorColumn; - prop.discriminatorValue = prop2.discriminatorValue; - } - prop.referencedColumnNames ??= Utils.flatten( - meta.primaryKeys.map(primaryKey => meta.properties[primaryKey].fieldNames), - ); - // For polymorphic M:N, use discriminator base name for FK column (e.g., taggable_id instead of post_id) - if (prop.polymorphic && prop.discriminator) { - prop.joinColumns ??= prop.referencedColumnNames.map(referencedColumnName => - this.#namingStrategy.joinKeyColumnName( - prop.discriminator, - referencedColumnName, - prop.referencedColumnNames.length > 1, - ), - ); - } else { - const ownerTableName = this.isExplicitTableName(meta.root) ? meta.root.tableName : undefined; - prop.joinColumns ??= prop.referencedColumnNames.map(referencedColumnName => - this.#namingStrategy.joinKeyColumnName( - meta.root.className, - referencedColumnName, - meta.compositePK, - ownerTableName, - ), - ); - } - const inverseTableName = this.isExplicitTableName(meta2.root) ? meta2.root.tableName : undefined; - prop.inverseJoinColumns ??= this.initManyToOneFieldName(prop, meta2.root.className, inverseTableName); - } - isExplicitTableName(meta) { - return meta.tableName !== this.#namingStrategy.classToTableName(meta.className); - } - initManyToOneFields(prop) { - if (prop.polymorphic && prop.polymorphTargets) { - const fieldNames1 = prop.targetMeta.getPrimaryProps().flatMap(pk => pk.fieldNames); - const idColumns = fieldNames1.map(fieldName => - this.#namingStrategy.joinKeyColumnName(prop.discriminator, fieldName, fieldNames1.length > 1), - ); - prop.fieldNames ??= [prop.discriminatorColumn, ...idColumns]; - prop.joinColumns ??= idColumns; - prop.referencedColumnNames ??= fieldNames1; - prop.referencedTableName ??= prop.targetMeta.tableName; - return; - } - const meta2 = prop.targetMeta; - let fieldNames; - // If targetKey is specified, use that property's field names instead of PKs - if (prop.targetKey) { - const targetProp = meta2.properties[prop.targetKey]; - fieldNames = targetProp.fieldNames; - } else { - fieldNames = Utils.flatten(meta2.primaryKeys.map(primaryKey => meta2.properties[primaryKey].fieldNames)); - } - Utils.defaultValue(prop, 'referencedTableName', meta2.tableName); - if (!prop.joinColumns) { - prop.joinColumns = fieldNames.map(fieldName => - this.#namingStrategy.joinKeyColumnName(prop.name, fieldName, fieldNames.length > 1), - ); - } - if (!prop.referencedColumnNames) { - prop.referencedColumnNames = fieldNames; - } - // Relations to composite PK targets need cascade update by default, - // since composite PKs are more likely to have mutable components - if (meta2.compositePK) { - prop.updateRule ??= 'cascade'; - } - // Nullable relations default to 'set null' on delete - when the referenced - // entity is deleted, set the FK to null rather than failing - if (prop.nullable) { - prop.deleteRule ??= 'set null'; - } - } - initOneToManyFields(prop) { - const meta2 = prop.targetMeta; - if (!prop.joinColumns) { - prop.joinColumns = [this.#namingStrategy.joinColumnName(prop.name)]; - } - if (!prop.referencedColumnNames) { - meta2.getPrimaryProps().forEach(pk => this.applyNamingStrategy(meta2, pk)); - prop.referencedColumnNames = Utils.flatten(meta2.getPrimaryProps().map(pk => pk.fieldNames)); - } - } - processEntity(meta) { - const pks = Object.values(meta.properties).filter(prop => prop.primary); - meta.primaryKeys = pks.map(prop => prop.name); - meta.compositePK = pks.length > 1; - // FK used as PK, we need to cascade - applies to both single FK-as-PK - // and composite PKs where all PKs are FKs (e.g., pivot-like entities) - const fkPks = pks.filter(pk => pk.kind !== ReferenceKind.SCALAR); - if (fkPks.length > 0 && fkPks.length === pks.length) { - for (const pk of fkPks) { - pk.deleteRule ??= 'cascade'; - pk.updateRule ??= 'cascade'; - } - } - meta.forceConstructor ??= this.shouldForceConstructorUsage(meta); - this.#validator.validateEntityDefinition(this.#metadata, meta.class, this.#config.get('discovery')); - for (const prop of Object.values(meta.properties)) { - this.initNullability(prop); - this.applyNamingStrategy(meta, prop); - this.initDefaultValue(prop); - this.inferTypeFromDefault(prop); - this.initVersionProperty(meta, prop); - this.initCustomType(meta, prop); - this.initColumnType(prop); - this.initRelation(prop); - } - this.initOwnColumns(meta); - meta.simplePK = - pks.length === 1 && pks[0].kind === ReferenceKind.SCALAR && !pks[0].customType && pks[0].runtimeType !== 'Date'; - meta.serializedPrimaryKey ??= meta.props.find(prop => prop.serializedPrimaryKey)?.name; - if (meta.serializedPrimaryKey && meta.serializedPrimaryKey !== meta.primaryKeys[0]) { - meta.properties[meta.serializedPrimaryKey].persist ??= false; - } - if (this.#platform.usesPivotTable()) { - return Object.values(meta.properties) - .filter(prop => prop.kind === ReferenceKind.MANY_TO_MANY && prop.owner && prop.pivotTable) - .map(prop => { - const pivotMeta = this.definePivotTableEntity(meta, prop); - prop.pivotEntity = pivotMeta.class; - if (prop.inversedBy) { - prop.targetMeta.properties[prop.inversedBy].pivotEntity = pivotMeta.class; - } - return pivotMeta; - }); - } - return []; - } - findReferencingProperties(meta, metadata) { - for (const meta2 of metadata) { - for (const prop2 of meta2.relations) { - if (prop2.kind !== ReferenceKind.SCALAR && prop2.type === meta.className) { - meta.referencingProperties.push({ meta: meta2, prop: prop2 }); - } - } - } - } - initFactoryField(meta, prop) { - ['mappedBy', 'inversedBy', 'pivotEntity'].forEach(type => { - const value = prop[type]; - if (value instanceof Function) { - const meta2 = prop.targetMeta ?? this.#metadata.get(prop.target); - prop[type] = value(meta2.properties)?.name; - if (type === 'pivotEntity' && value) { - prop[type] = value(meta2.properties); - } - if (prop[type] == null) { - throw MetadataError.fromWrongReference(meta, prop, type); - } - } - }); - } - ensureCorrectFKOrderInPivotEntity(meta, owner) { - const pks = Object.values(meta.properties).filter(p => p.primary); - const fks = Object.values(meta.properties).filter(p => p.kind === ReferenceKind.MANY_TO_ONE); - let first, second; - if (pks.length === 2) { - [first, second] = pks; - } else if (fks.length >= 2) { - [first, second] = fks; - } else { - /* v8 ignore next */ - return []; - } - // wrong FK order, first FK needs to point to the owning side - // (note that we can detect this only if the FKs target different types) - if (owner.type === first.type && first.type !== second.type) { - delete meta.properties[first.name]; - meta.removeProperty(first.name, false); - meta.addProperty(first); - [first, second] = [second, first]; - } - return [first, second]; - } - definePivotTableEntity(meta, prop) { - const pivotMeta = prop.pivotEntity - ? this.#metadata.find(prop.pivotEntity) - : this.#metadata.getByClassName(prop.pivotTable, false); - // ensure inverse side exists so we can join it when populating via pivot tables - if (!prop.inversedBy && prop.targetMeta) { - const inverseName = `${meta.className}_${prop.name}__inverse`; - prop.inversedBy = inverseName; - const inverseProp = { - name: inverseName, - kind: ReferenceKind.MANY_TO_MANY, - type: meta.className, - target: meta.class, - targetMeta: meta, - mappedBy: prop.name, - pivotEntity: prop.pivotEntity, - pivotTable: prop.pivotTable, - persist: false, - hydrate: false, - }; - this.applyNamingStrategy(prop.targetMeta, inverseProp); - this.initCustomType(prop.targetMeta, inverseProp); - prop.targetMeta.properties[inverseName] = inverseProp; - } - if (pivotMeta) { - prop.pivotEntity = pivotMeta.class; - this.ensureCorrectFKOrderInPivotEntity(pivotMeta, prop); - if (prop.polymorphic && prop.discriminatorValue) { - pivotMeta.polymorphicDiscriminatorMap ??= {}; - pivotMeta.polymorphicDiscriminatorMap[prop.discriminatorValue] = meta.class; - // For composite PK entities sharing a polymorphic pivot table, - // we need to add columns for each entity type's PKs - this.addPolymorphicPivotColumns(pivotMeta, meta, prop); - // Add virtual M:1 relation for this polymorphic owner (for join loading) - const ownerRelationName = `${prop.discriminator}_${meta.tableName}`; - if (!pivotMeta.properties[ownerRelationName]) { - pivotMeta.properties[ownerRelationName] = this.definePolymorphicOwnerRelation(prop, ownerRelationName, meta); - } - } - return pivotMeta; - } - let tableName = prop.pivotTable; - let schemaName; - if (prop.pivotTable.includes('.')) { - [schemaName, tableName] = prop.pivotTable.split('.'); - } - schemaName ??= meta.schema; - const targetMeta = prop.targetMeta; - const targetType = targetMeta.className; - const pivotMeta2 = new EntityMetadata({ - name: prop.pivotTable, - className: prop.pivotTable, - collection: tableName, - schema: schemaName, - pivotTable: true, - }); - prop.pivotEntity = pivotMeta2.class; - if (prop.fixedOrder) { - const primaryProp = this.defineFixedOrderProperty(prop, targetMeta); - pivotMeta2.properties[primaryProp.name] = primaryProp; - } else { - pivotMeta2.compositePK = true; - } - // handle self-referenced m:n with same default field names - if ( - meta.className === targetType && - prop.joinColumns.every((joinColumn, idx) => joinColumn === prop.inverseJoinColumns[idx]) - ) { - // use tableName only when explicitly provided by user, otherwise use className for backwards compatibility - const baseName = this.isExplicitTableName(meta) ? meta.tableName : meta.className; - prop.joinColumns = prop.referencedColumnNames.map(name => - this.#namingStrategy.joinKeyColumnName(baseName + '_1', name, meta.compositePK), - ); - prop.inverseJoinColumns = prop.referencedColumnNames.map(name => - this.#namingStrategy.joinKeyColumnName(baseName + '_2', name, meta.compositePK), - ); - if (prop.inversedBy) { - const prop2 = targetMeta.properties[prop.inversedBy]; - prop2.inverseJoinColumns = prop.joinColumns; - prop2.joinColumns = prop.inverseJoinColumns; - } - // propagate updated joinColumns to all child entities that inherit this property (STI) - for (const childMeta of this.#discovered.filter(m => m.root === meta && m !== meta)) { - const childProp = childMeta.properties[prop.name]; - if (childProp) { - childProp.joinColumns = prop.joinColumns; - childProp.inverseJoinColumns = prop.inverseJoinColumns; - } - } - } - // For polymorphic M:N, create discriminator column and polymorphic FK - if (prop.polymorphic && prop.discriminatorColumn) { - this.definePolymorphicPivotProperties(pivotMeta2, meta, prop, targetMeta); - } else { - pivotMeta2.properties[meta.name + '_owner'] = this.definePivotProperty( - prop, - meta.name + '_owner', - meta.class, - targetType + '_inverse', - true, - meta.className === targetType, - ); - pivotMeta2.properties[targetType + '_inverse'] = this.definePivotProperty( - prop, - targetType + '_inverse', - targetMeta.class, - meta.name + '_owner', - false, - meta.className === targetType, - ); - } - return this.#metadata.set(pivotMeta2.class, EntitySchema.fromMetadata(pivotMeta2).init().meta); - } - /** - * Create a scalar property for a pivot table column. - */ - createPivotScalarProperty(name, columnTypes, fieldNames = [name], options = {}) { - return { - name, - fieldNames, - columnTypes, - type: options.type ?? 'number', - kind: ReferenceKind.SCALAR, - primary: options.primary ?? false, - nullable: options.nullable ?? true, - ...(options.persist !== undefined && { persist: options.persist }), - }; - } - /** - * Get column types for an entity's primary keys, initializing them if needed. - */ - getPrimaryKeyColumnTypes(meta) { - const columnTypes = []; - for (const pk of meta.primaryKeys) { - const pkProp = meta.properties[pk]; - this.initCustomType(meta, pkProp); - this.initColumnType(pkProp); - columnTypes.push(...pkProp.columnTypes); - } - return columnTypes; - } - /** - * Add missing FK columns for a polymorphic entity to an existing pivot table. - */ - addPolymorphicPivotColumns(pivotMeta, meta, prop) { - const existingFieldNames = new Set(Object.values(pivotMeta.properties).flatMap(p => p.fieldNames ?? [])); - const columnTypes = this.getPrimaryKeyColumnTypes(meta); - for (let i = 0; i < prop.joinColumns.length; i++) { - const joinColumn = prop.joinColumns[i]; - if (!existingFieldNames.has(joinColumn)) { - pivotMeta.properties[joinColumn] = this.createPivotScalarProperty(joinColumn, [columnTypes[i]]); - } - } - } - /** - * Define properties for a polymorphic pivot table. - */ - definePolymorphicPivotProperties(pivotMeta, meta, prop, targetMeta) { - const discriminatorColumn = prop.discriminatorColumn; - const isCompositePK = meta.compositePK; - // For composite PK polymorphic M:N, we need fixedOrder (auto-increment PK) - if (isCompositePK && !prop.fixedOrder) { - prop.fixedOrder = true; - const primaryProp = this.defineFixedOrderProperty(prop, targetMeta); - pivotMeta.properties[primaryProp.name] = primaryProp; - pivotMeta.compositePK = false; - } - const discriminatorProp = this.createPivotScalarProperty( - discriminatorColumn, - [this.#platform.getVarcharTypeDeclarationSQL(prop)], - [discriminatorColumn], - { type: 'string', primary: !isCompositePK, nullable: false }, - ); - this.initFieldName(discriminatorProp); - pivotMeta.properties[discriminatorColumn] = discriminatorProp; - const columnTypes = this.getPrimaryKeyColumnTypes(meta); - if (isCompositePK) { - // Create separate properties for each PK column (nullable for other entity types) - for (let i = 0; i < prop.joinColumns.length; i++) { - pivotMeta.properties[prop.joinColumns[i]] = this.createPivotScalarProperty(prop.joinColumns[i], [ - columnTypes[i], - ]); - } - // Virtual property combining all columns (for compatibility) - pivotMeta.properties[prop.discriminator] = this.createPivotScalarProperty( - prop.discriminator, - columnTypes, - [...prop.joinColumns], - { type: meta.className, persist: false }, - ); - } else { - pivotMeta.properties[prop.discriminator] = this.createPivotScalarProperty( - prop.discriminator, - columnTypes, - [...prop.joinColumns], - { type: meta.className, primary: true, nullable: false }, - ); - } - pivotMeta.properties[targetMeta.className + '_inverse'] = this.definePivotProperty( - prop, - targetMeta.className + '_inverse', - targetMeta.class, - prop.discriminator, - false, - false, - ); - // Create virtual M:1 relation to the polymorphic owner for single-query join loading - const ownerRelationName = `${prop.discriminator}_${meta.tableName}`; - pivotMeta.properties[ownerRelationName] = this.definePolymorphicOwnerRelation(prop, ownerRelationName, meta); - pivotMeta.polymorphicDiscriminatorMap ??= {}; - pivotMeta.polymorphicDiscriminatorMap[prop.discriminatorValue] = meta.class; - } - /** - * Create a virtual M:1 relation from pivot to a polymorphic owner entity. - * This enables single-query join loading for inverse-side polymorphic M:N. - */ - definePolymorphicOwnerRelation(prop, name, targetMeta) { - const ret = { - name, - type: targetMeta.className, - target: targetMeta.class, - kind: ReferenceKind.MANY_TO_ONE, - nullable: true, - owner: true, - primary: false, - createForeignKeyConstraint: false, - persist: false, - index: false, - }; - ret.targetMeta = targetMeta; - ret.fieldNames = ret.joinColumns = ret.ownColumns = [...prop.joinColumns]; - ret.referencedColumnNames = []; - ret.inverseJoinColumns = []; - for (const primaryKey of targetMeta.primaryKeys) { - const pkProp = targetMeta.properties[primaryKey]; - ret.referencedColumnNames.push(...pkProp.fieldNames); - ret.inverseJoinColumns.push(...pkProp.fieldNames); - ret.length = pkProp.length; - ret.precision = pkProp.precision; - ret.scale = pkProp.scale; - } - const schema = targetMeta.schema ?? this.#config.get('schema') ?? this.#platform.getDefaultSchemaName(); - ret.referencedTableName = schema && schema !== '*' ? schema + '.' + targetMeta.tableName : targetMeta.tableName; - this.initColumnType(ret); - this.initRelation(ret); - return ret; - } - defineFixedOrderProperty(prop, targetMeta) { - const pk = prop.fixedOrderColumn || this.#namingStrategy.referenceColumnName(); - const primaryProp = { - name: pk, - type: 'number', - runtimeType: 'number', - kind: ReferenceKind.SCALAR, - primary: true, - autoincrement: true, - unsigned: this.#platform.supportsUnsigned(), - }; - this.initFieldName(primaryProp); - this.initColumnType(primaryProp); - prop.fixedOrderColumn = pk; - if (prop.inversedBy) { - const prop2 = targetMeta.properties[prop.inversedBy]; - prop2.fixedOrder = true; - prop2.fixedOrderColumn = pk; - } - return primaryProp; - } - definePivotProperty(prop, name, type, inverse, owner, selfReferencing) { - const ret = { - name, - type: Utils.className(type), - target: type, - kind: ReferenceKind.MANY_TO_ONE, - cascade: [Cascade.ALL], - fixedOrder: prop.fixedOrder, - fixedOrderColumn: prop.fixedOrderColumn, - index: this.#platform.indexForeignKeys(), - primary: !prop.fixedOrder, - autoincrement: false, - updateRule: prop.updateRule, - deleteRule: prop.deleteRule, - createForeignKeyConstraint: prop.createForeignKeyConstraint, - }; - const defaultRule = selfReferencing && !this.#platform.supportsMultipleCascadePaths() ? 'no action' : 'cascade'; - ret.updateRule ??= defaultRule; - ret.deleteRule ??= defaultRule; - const meta = this.#metadata.get(type); - ret.targetMeta = meta; - ret.joinColumns = []; - ret.inverseJoinColumns = []; - const schema = meta.schema ?? this.#config.get('schema') ?? this.#platform.getDefaultSchemaName(); - ret.referencedTableName = schema && schema !== '*' ? schema + '.' + meta.tableName : meta.tableName; - if (owner) { - ret.owner = true; - ret.inversedBy = inverse; - ret.referencedColumnNames = prop.referencedColumnNames; - ret.fieldNames = ret.joinColumns = prop.joinColumns; - ret.inverseJoinColumns = prop.referencedColumnNames; - meta.primaryKeys.forEach(primaryKey => { - const prop2 = meta.properties[primaryKey]; - ret.length = prop2.length; - ret.precision = prop2.precision; - ret.scale = prop2.scale; - }); - } else { - ret.owner = false; - ret.mappedBy = inverse; - ret.fieldNames = ret.joinColumns = prop.inverseJoinColumns; - ret.referencedColumnNames = []; - ret.inverseJoinColumns = []; - meta.primaryKeys.forEach(primaryKey => { - const prop2 = meta.properties[primaryKey]; - ret.referencedColumnNames.push(...prop2.fieldNames); - ret.inverseJoinColumns.push(...prop2.fieldNames); - ret.length = prop2.length; - ret.precision = prop2.precision; - ret.scale = prop2.scale; - }); - } - this.initColumnType(ret); - this.initRelation(ret); - return ret; - } - autoWireBidirectionalProperties(meta) { - Object.values(meta.properties) - .filter(prop => prop.kind !== ReferenceKind.SCALAR && !prop.owner && prop.mappedBy) - .forEach(prop => { - const meta2 = prop.targetMeta; - const prop2 = meta2.properties[prop.mappedBy]; - if (prop2 && !prop2.inversedBy) { - prop2.inversedBy = prop.name; - } - }); - } - defineBaseEntityProperties(meta) { - const base = meta.extends && this.#metadata.get(meta.extends); - if (!base || base === meta) { - // make sure we do not fall into infinite loop - return 0; - } - let order = this.defineBaseEntityProperties(base); - const ownProps = Object.values(meta.properties); - const old = ownProps.map(x => x.name); - meta.properties = {}; - Object.values(base.properties).forEach(prop => { - if (!prop.inherited) { - meta.properties[prop.name] = prop; - } - }); - ownProps.forEach(prop => (meta.properties[prop.name] = prop)); - meta.filters = { ...base.filters, ...meta.filters }; - if (!meta.discriminatorValue) { - Object.values(base.properties) - .filter(prop => !old.includes(prop.name)) - .forEach(prop => { - meta.properties[prop.name] = { ...prop }; - meta.propertyOrder.set(prop.name, (order += 0.01)); - }); - } - meta.indexes = Utils.unique([...base.indexes, ...meta.indexes]); - meta.uniques = Utils.unique([...base.uniques, ...meta.uniques]); - meta.checks = Utils.unique([...base.checks, ...meta.checks]); - const pks = Object.values(meta.properties) - .filter(p => p.primary) - .map(p => p.name); - if (pks.length > 0 && meta.primaryKeys.length === 0) { - meta.primaryKeys = pks; - } - Utils.keys(base.hooks).forEach(type => { - meta.hooks[type] = Utils.unique([...base.hooks[type], ...(meta.hooks[type] || [])]); - }); - if ((meta.constructorParams?.length ?? 0) === 0 && (base.constructorParams?.length ?? 0) > 0) { - meta.constructorParams = [...base.constructorParams]; - } - return order; - } - initPolyEmbeddables(embeddedProp, discovered, visited = new Set()) { - if (embeddedProp.kind !== ReferenceKind.EMBEDDED || visited.has(embeddedProp)) { - return; - } - visited.add(embeddedProp); - const types = embeddedProp.type.split(/ ?\| ?/); - let embeddable = this.#discovered.find(m => m.name === embeddedProp.type); - const polymorphs = this.#discovered.filter(m => types.includes(m.name)); - // create virtual polymorphic entity - if (!embeddable && polymorphs.length > 0) { - const properties = {}; - let discriminatorColumn; - const inlineProperties = meta => { - Object.values(meta.properties).forEach(prop => { - // defaults on db level would mess up with change tracking - delete prop.default; - if (properties[prop.name] && properties[prop.name].type !== prop.type) { - properties[prop.name].type = `${properties[prop.name].type} | ${prop.type}`; - properties[prop.name].runtimeType = 'any'; - properties[prop.name].stiMerged = true; - return properties[prop.name]; - } - // Deep copy to prevent mutating the original entity's property — - // both from the merge path above (GH #6522/#6523) and from - // downstream code that mutates nested arrays like fieldNames. - return (properties[prop.name] = Utils.copy(prop)); - }); - }; - const processExtensions = meta => { - const parent = this.#discovered.find(m => { - return meta.extends && Utils.className(meta.extends) === m.className; - }); - if (!parent) { - return; - } - discriminatorColumn ??= parent.discriminatorColumn; - inlineProperties(parent); - processExtensions(parent); - }; - polymorphs.forEach(meta => { - inlineProperties(meta); - processExtensions(meta); - }); - const name = polymorphs - .map(t => t.className) - .sort() - .join(' | '); - embeddable = new EntityMetadata({ - name, - className: name, - embeddable: true, - abstract: true, - properties, - polymorphs, - discriminatorColumn, - }); - embeddable.sync(); - discovered.push(embeddable); - polymorphs.forEach(meta => (meta.root = embeddable)); - } - } - initPolymorphicRelation(meta, prop, discovered) { - if (!prop.discriminator && !prop.discriminatorColumn && !prop.discriminatorMap && !Array.isArray(prop.target)) { - return; - } - prop.polymorphic = true; - prop.discriminator ??= prop.name; - prop.discriminatorColumn ??= this.#namingStrategy.discriminatorColumnName(prop.discriminator); - prop.createForeignKeyConstraint = false; - const isToOne = [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind); - if (isToOne) { - const types = prop.type.split(/ ?\| ?/); - prop.polymorphTargets = discovered.filter(m => types.includes(m.className) && !m.embeddable); - prop.targetMeta = prop.polymorphTargets[0]; - prop.referencedPKs = prop.targetMeta?.primaryKeys; - } - if (prop.discriminatorMap) { - const normalizedMap = {}; - for (const [key, value] of Object.entries(prop.discriminatorMap)) { - const targetMeta = this.#metadata.getByClassName(value, false); - if (!targetMeta) { - throw MetadataError.fromUnknownEntity(value, `${meta.className}.${prop.name} discriminatorMap`); - } - normalizedMap[key] = targetMeta.class; - if (targetMeta.class === meta.class) { - prop.discriminatorValue = key; - } - } - prop.discriminatorMap = normalizedMap; - } else if (isToOne) { - prop.discriminatorMap = {}; - const tableNameToTarget = new Map(); - for (const target of prop.polymorphTargets) { - const existing = tableNameToTarget.get(target.tableName); - if (existing) { - throw MetadataError.incompatiblePolymorphicTargets( - meta, - prop, - existing, - target, - `both use table '${target.tableName}'. Use separate properties instead of a single polymorphic relation.`, - ); - } - tableNameToTarget.set(target.tableName, target); - prop.discriminatorMap[target.tableName] = target.class; - } - } else { - prop.discriminatorValue ??= meta.tableName; - if (!prop.discriminatorMap) { - prop.discriminatorMap = { [prop.discriminatorValue]: meta.class }; - } - } - } - initEmbeddables(meta, embeddedProp, visited = new Set()) { - if (embeddedProp.kind !== ReferenceKind.EMBEDDED || visited.has(embeddedProp)) { - return; - } - visited.add(embeddedProp); - const embeddable = this.#discovered.find(m => m.name === embeddedProp.type); - if (!embeddable) { - throw MetadataError.fromUnknownEntity(embeddedProp.type, `${meta.className}.${embeddedProp.name}`); - } - embeddedProp.embeddable = embeddable.class; - embeddedProp.embeddedProps = {}; - let order = meta.propertyOrder.get(embeddedProp.name); - const getRootProperty = prop => (prop.embedded ? getRootProperty(meta.properties[prop.embedded[0]]) : prop); - const isParentObject = prop => { - if (prop.object || prop.array) { - return true; - } - return prop.embedded ? isParentObject(meta.properties[prop.embedded[0]]) : false; - }; - const isParentArray = prop => { - if (prop.array) { - return true; - } - return prop.embedded ? isParentArray(meta.properties[prop.embedded[0]]) : false; - }; - const rootProperty = getRootProperty(embeddedProp); - const parentProperty = meta.properties[embeddedProp.embedded?.[0] ?? '']; - const object = isParentObject(embeddedProp); - const array = isParentArray(embeddedProp); - this.initFieldName(embeddedProp, rootProperty !== embeddedProp && object); - // the prefix of the parent cannot be a boolean; it already passed here - const prefix = this.getPrefix(embeddedProp, parentProperty); - const glue = object ? '~' : '_'; - for (const prop of Object.values(embeddable.properties)) { - const name = (embeddedProp.embeddedPath?.join(glue) ?? embeddedProp.fieldNames[0] + glue) + prop.name; - meta.properties[name] = Utils.copy(prop); - meta.properties[name].name = name; - meta.properties[name].embedded = [embeddedProp.name, prop.name]; - meta.propertyOrder.set(name, (order += 0.01)); - embeddedProp.embeddedProps[prop.name] = meta.properties[name]; - meta.properties[name].persist ??= embeddedProp.persist; - const refInArray = - array && [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) && prop.owner; - if (embeddedProp.nullable || refInArray) { - meta.properties[name].nullable = true; - } - if (meta.properties[name].fieldNames) { - meta.properties[name].fieldNames[0] = prefix + meta.properties[name].fieldNames[0]; - } else { - const name2 = meta.properties[name].name; - meta.properties[name].name = prefix + prop.name; - this.initFieldName(meta.properties[name]); - meta.properties[name].name = name2; - } - if (object) { - embeddedProp.object = true; - let path = []; - let tmp = embeddedProp; - while (tmp.embedded && tmp.object) { - path.unshift(tmp.embedded[1]); - tmp = meta.properties[tmp.embedded[0]]; - } - if (tmp === rootProperty) { - path.unshift(rootProperty.fieldNames[0]); - } else if (embeddedProp.embeddedPath) { - path = [...embeddedProp.embeddedPath]; - } else { - path = [embeddedProp.fieldNames[0]]; - } - this.initFieldName(prop, true); - this.initRelation(prop); - path.push(prop.fieldNames[0]); - meta.properties[name].fieldNames = prop.fieldNames; - meta.properties[name].embeddedPath = path; - const targetProp = prop.targetMeta?.getPrimaryProp() ?? prop; - const fieldName = raw( - this.#platform.getSearchJsonPropertySQL(path.join('->'), targetProp.runtimeType ?? targetProp.type, true), - ); - meta.properties[name].fieldNameRaw = fieldName.sql; // for querying in SQL drivers - meta.properties[name].persist = false; // only virtual as we store the whole object - meta.properties[name].userDefined = false; // mark this as a generated/internal property, so we can distinguish from user-defined non-persist properties - meta.properties[name].object = true; - this.initCustomType(meta, meta.properties[name], false, true); - } - this.initEmbeddables(meta, meta.properties[name], visited); - } - for (const index of embeddable.indexes) { - meta.indexes.push({ - ...index, - properties: Utils.asArray(index.properties).map(p => { - return embeddedProp.embeddedProps[p].name; - }), - }); - } - for (const unique of embeddable.uniques) { - meta.uniques.push({ - ...unique, - properties: Utils.asArray(unique.properties).map(p => { - return embeddedProp.embeddedProps[p].name; - }), - }); - } - } - initSingleTableInheritance(meta, metadata) { - if (meta.root !== meta && !meta.__processed) { - meta.root = metadata.find(m => m.class === meta.root.class); - meta.root.__processed = true; - } else { - delete meta.root.__processed; - } - if (!meta.root.discriminatorColumn) { - return; - } - meta.root.inheritanceType = 'sti'; - if (meta.root.discriminatorMap) { - const map = meta.root.discriminatorMap; - Object.keys(map) - .filter(key => typeof map[key] === 'string') - .forEach(key => (map[key] = this.#metadata.getByClassName(map[key]).class)); - } else { - meta.root.discriminatorMap = {}; - const children = metadata - .filter(m => m.root.class === meta.root.class && !m.abstract) - .sort((a, b) => a.className.localeCompare(b.className)); - for (const m of children) { - const name = m.discriminatorValue ?? this.#namingStrategy.classToTableName(m.className); - meta.root.discriminatorMap[name] = m.class; - } - } - meta.discriminatorValue = QueryHelper.findDiscriminatorValue(meta.root.discriminatorMap, meta.class); - if (!meta.root.properties[meta.root.discriminatorColumn]) { - this.createDiscriminatorProperty(meta.root); - } - Utils.defaultValue( - meta.root.properties[meta.root.discriminatorColumn], - 'items', - Object.keys(meta.root.discriminatorMap), - ); - Utils.defaultValue(meta.root.properties[meta.root.discriminatorColumn], 'index', true); - if (meta.root === meta) { - return; - } - Object.values(meta.properties).forEach(prop => { - const newProp = { ...prop }; - const rootProp = meta.root.properties[prop.name]; - // stiMerged is set during inlineProperties when a property was merged - // from multiple polymorphic variants with different types. The flag is - // cleared implicitly when the first child claims the root property via - // addProperty below, so subsequent children correctly trigger renaming. - const typesMatch = rootProp?.type === prop.type || rootProp?.stiMerged === true; - if ( - rootProp && - (!typesMatch || - (rootProp.fieldNames && prop.fieldNames && !compareArrays(rootProp.fieldNames, prop.fieldNames))) - ) { - const name = newProp.name; - this.initFieldName(newProp, newProp.object); - newProp.renamedFrom = name; - newProp.name = `${name}_${meta._id}`; - meta.root.addProperty(newProp); - this.initFieldName(prop, prop.object); - // Track all field variants and map discriminator values to field names - if (!rootProp.stiFieldNames) { - this.initFieldName(rootProp, rootProp.object); - rootProp.stiFieldNames = [...rootProp.fieldNames]; - rootProp.stiFieldNameMap = {}; - // Find which discriminator owns the original fieldNames - for (const [discValue, childClass] of Object.entries(meta.root.discriminatorMap)) { - const childMeta = this.#metadata.find(childClass); - if ( - childMeta?.properties[prop.name]?.fieldNames && - compareArrays(childMeta.properties[prop.name].fieldNames, rootProp.fieldNames) - ) { - rootProp.stiFieldNameMap[discValue] = rootProp.fieldNames[0]; - break; - } - } - } - rootProp.stiFieldNameMap[meta.discriminatorValue] = prop.fieldNames[0]; - rootProp.stiFieldNames.push(...prop.fieldNames); - newProp.nullable = true; - newProp.name = name; - newProp.hydrate = false; - newProp.inherited = true; - return; - } - if (prop.enum && prop.items && rootProp?.items) { - newProp.items = Utils.unique([...rootProp.items, ...prop.items]); - } - newProp.nullable = true; - newProp.inherited = !rootProp; - meta.root.addProperty(newProp); - }); - meta.tableName = meta.root.tableName; - meta.root.indexes = Utils.unique([...meta.root.indexes, ...meta.indexes]); - meta.root.uniques = Utils.unique([...meta.root.uniques, ...meta.uniques]); - meta.root.checks = Utils.unique([...meta.root.checks, ...meta.checks]); - } - /** - * First pass of TPT initialization: sets up hierarchy relationships - * (inheritanceType, tptParent, tptChildren) before properties have fieldNames. - */ - initTPTRelationships(meta, metadata) { - if (meta.root !== meta) { - meta.root = metadata.find(m => m.class === meta.root.class); - } - const inheritance = meta.inheritance; - if (inheritance === 'tpt' && meta.root === meta) { - meta.inheritanceType = 'tpt'; - meta.tptChildren = []; - } - if (meta.root.inheritanceType !== 'tpt') { - return; - } - const parent = this.getTPTParent(meta, metadata); - if (parent) { - meta.tptParent = parent; - meta.inheritanceType = 'tpt'; - parent.tptChildren ??= []; - if (!parent.tptChildren.includes(meta)) { - parent.tptChildren.push(meta); - } - } - } - /** - * Second pass of TPT initialization: re-resolves metadata references after fieldNames - * are set, syncs to registry metadata, and sets up discriminators. - */ - finalizeTPTInheritance(meta, metadata) { - if (meta.inheritanceType !== 'tpt') { - return; - } - if (meta.tptParent) { - meta.tptParent = metadata.find(m => m.class === meta.tptParent.class) ?? meta.tptParent; - } - if (meta.tptChildren) { - meta.tptChildren = meta.tptChildren.map(child => metadata.find(m => m.class === child.class) ?? child); - } - const registryMeta = this.#metadata.get(meta.class); - if (registryMeta && registryMeta !== meta) { - registryMeta.inheritanceType = meta.inheritanceType; - registryMeta.tptParent = meta.tptParent ? this.#metadata.get(meta.tptParent.class) : undefined; - registryMeta.tptChildren = meta.tptChildren?.map(child => this.#metadata.get(child.class)); - } - this.initTPTDiscriminator(meta, metadata); - } - /** - * Initialize TPT discriminator map and virtual discriminator property. - * Unlike STI where the discriminator is a persisted column, TPT discriminator is computed - * at query time using CASE WHEN expressions based on which child table has data. - */ - initTPTDiscriminator(meta, metadata) { - const allDescendants = this.collectAllTPTDescendants(meta, metadata); - allDescendants.sort((a, b) => this.getTPTDepth(b) - this.getTPTDepth(a)); - meta.allTPTDescendants = allDescendants; - if (meta.root !== meta) { - return; - } - meta.root.discriminatorMap = {}; - for (const m of allDescendants) { - const name = this.#namingStrategy.classToTableName(m.className); - meta.root.discriminatorMap[name] = m.class; - m.discriminatorValue = name; - } - if (!meta.abstract) { - const name = this.#namingStrategy.classToTableName(meta.className); - meta.root.discriminatorMap[name] = meta.class; - meta.discriminatorValue = name; - } - // Virtual discriminator property - computed at query time via CASE WHEN, not persisted - const discriminatorColumn = '__tpt_type'; - if (!meta.root.properties[discriminatorColumn]) { - meta.root.addProperty({ - name: discriminatorColumn, - type: 'string', - kind: ReferenceKind.SCALAR, - persist: false, - userDefined: false, - hidden: true, - }); - } - meta.root.tptDiscriminatorColumn = discriminatorColumn; - } - /** - * Recursively collect all TPT descendants (children, grandchildren, etc.) - */ - collectAllTPTDescendants(meta, metadata) { - const descendants = []; - const collect = parent => { - for (const child of parent.tptChildren ?? []) { - const resolved = metadata.find(m => m.class === child.class) ?? child; - if (!resolved.abstract) { - descendants.push(resolved); - } - collect(resolved); - } - }; - collect(meta); - return descendants; - } - /** - * Computes ownProps for TPT entities - only properties defined in THIS entity, - * not inherited from parent. Also creates synthetic join properties for parent/child relationships. - * - * Called multiple times during discovery as metadata is progressively built. - * Each pass overwrites earlier results to reflect the final state of properties. - */ - computeTPTOwnProps(meta) { - if (meta.inheritanceType !== 'tpt') { - return; - } - const belongsToTable = prop => prop.persist !== false || prop.primary; - // Use meta.properties (object) since meta.props (array) may not be populated yet - const allProps = Object.values(meta.properties); - if (!meta.tptParent) { - meta.ownProps = allProps.filter(belongsToTable); - return; - } - const parentPropNames = new Set(Object.values(meta.tptParent.properties).map(p => p.name)); - meta.ownProps = allProps.filter(prop => !parentPropNames.has(prop.name) && belongsToTable(prop)); - // Create synthetic join properties for the parent-child relationship - const childFieldNames = meta.getPrimaryProps().flatMap(p => p.fieldNames); - const parentFieldNames = meta.tptParent.getPrimaryProps().flatMap(p => p.fieldNames); - meta.tptParentProp = { - name: '[tpt:parent]', - kind: ReferenceKind.MANY_TO_ONE, - targetMeta: meta.tptParent, - fieldNames: childFieldNames, - referencedColumnNames: parentFieldNames, - persist: false, - }; - meta.tptInverseProp = { - name: '[tpt:child]', - kind: ReferenceKind.ONE_TO_ONE, - owner: true, - targetMeta: meta, - fieldNames: parentFieldNames, - joinColumns: parentFieldNames, - referencedColumnNames: childFieldNames, - persist: false, - }; - } - /** Returns the depth of a TPT entity in its hierarchy (0 for root). */ - getTPTDepth(meta) { - let depth = 0; - let current = meta; - while (current.tptParent) { - depth++; - current = current.tptParent; - } - return depth; - } - /** - * Find the direct TPT parent entity for the given entity. - */ - getTPTParent(meta, metadata) { - if (meta.root === meta) { - return undefined; - } - return metadata.find(m => { - const ext = meta.extends; - if (EntitySchema.is(ext)) { - return m.class === ext.meta.class || m.className === ext.meta.className; - } - return m.class === ext || m.className === Utils.className(ext); - }); - } - createDiscriminatorProperty(meta) { - meta.addProperty({ - name: meta.discriminatorColumn, - type: 'string', - enum: true, - kind: ReferenceKind.SCALAR, - userDefined: false, - }); - } - initAutoincrement(meta) { - const pks = meta.getPrimaryProps(); - if (pks.length === 1 && this.#platform.isNumericProperty(pks[0])) { - /* v8 ignore next */ - pks[0].autoincrement ??= true; - } - } - createSchemaTable(meta) { - const qualifiedName = meta.schema ? `${meta.schema}.${meta.tableName}` : meta.tableName; - return { - name: meta.tableName, - schema: meta.schema, - qualifiedName, - toString: () => qualifiedName, - }; - } - initCheckConstraints(meta) { - const columns = meta.createSchemaColumnMappingObject(); - const table = this.createSchemaTable(meta); - for (const check of meta.checks) { - const fieldNames = check.property ? meta.properties[check.property].fieldNames : []; - check.name ??= this.#namingStrategy.indexName(meta.tableName, fieldNames, 'check'); - if (check.expression instanceof Function) { - check.expression = check.expression(columns, table); - } - } - if (this.#platform.usesEnumCheckConstraints() && !meta.embeddable) { - for (const prop of meta.props) { - if ( - prop.enum && - prop.persist !== false && - !prop.nativeEnumName && - prop.items?.every(item => typeof item === 'string') - ) { - this.initFieldName(prop); - meta.checks.push({ - name: this.#namingStrategy.indexName(meta.tableName, prop.fieldNames, 'check'), - property: prop.name, - expression: `${this.#platform.quoteIdentifier(prop.fieldNames[0])} in ('${prop.items.join("', '")}')`, - }); - } - } - } - } - initGeneratedColumn(meta, prop) { - if (!prop.generated && prop.columnTypes) { - const match = /(.*) generated always as (.*)/i.exec(prop.columnTypes[0]); - if (match) { - prop.columnTypes[0] = match[1]; - prop.generated = match[2]; - return; - } - const match2 = /^as (.*)/i.exec(prop.columnTypes[0]?.trim()); - if (match2) { - prop.generated = match2[1]; - } - return; - } - if (prop.generated instanceof Function) { - const columns = meta.createSchemaColumnMappingObject(); - prop.generated = prop.generated(columns, this.createSchemaTable(meta)); - } - } - getDefaultVersionValue(meta, prop) { - if (typeof prop.defaultRaw !== 'undefined') { - return prop.defaultRaw; - } - /* v8 ignore next */ - if (prop.default != null) { - return '' + this.#platform.convertVersionValue(prop.default, prop); - } - this.initCustomType(meta, prop, true); - const type = prop.customType?.runtimeType ?? prop.runtimeType ?? prop.type; - if (type === 'Date') { - prop.length ??= this.#platform.getDefaultVersionLength(); - return this.#platform.getCurrentTimestampSQL(prop.length); - } - return '1'; - } - inferDefaultValue(meta, prop) { - try { - // try to create two entity instances to detect the value is stable - const now = Date.now(); - const entity1 = new meta.class(); - const entity2 = new meta.class(); - // we compare the two values by reference, this will discard things like `new Date()` or `Date.now()` - if ( - this.#config.get('discovery').inferDefaultValues && - prop.default === undefined && - entity1[prop.name] != null && - entity1[prop.name] === entity2[prop.name] && - entity1[prop.name] !== now - ) { - prop.default ??= entity1[prop.name]; - } - // if the default value is null, infer nullability - if (entity1[prop.name] === null) { - prop.nullable ??= true; - } - // but still use object values for type inference if not explicitly set, e.g. `createdAt = new Date()` - if (prop.kind === ReferenceKind.SCALAR && prop.type == null && entity1[prop.name] != null) { - prop.type = prop.runtimeType = Utils.getObjectType(entity1[prop.name]); - } - } catch { - // ignore - } - } - initDefaultValue(prop) { - if (prop.defaultRaw || !('default' in prop)) { - return; - } - let val = prop.default; - const raw = Raw.getKnownFragment(val); - if (raw) { - prop.defaultRaw = this.#platform.formatQuery(raw.sql, raw.params); - return; - } - if (Array.isArray(prop.default) && prop.customType) { - val = prop.customType.convertToDatabaseValue(prop.default, this.#platform); - } - prop.defaultRaw = typeof val === 'string' ? `'${val}'` : '' + val; - } - inferTypeFromDefault(prop) { - if ((prop.defaultRaw == null && prop.default == null) || prop.type !== 'any') { - return; - } - switch (typeof prop.default) { - case 'string': - prop.type = prop.runtimeType = 'string'; - break; - case 'number': - prop.type = prop.runtimeType = 'number'; - break; - case 'boolean': - prop.type = prop.runtimeType = 'boolean'; - break; - } - if (prop.defaultRaw?.startsWith('current_timestamp')) { - prop.type = prop.runtimeType = 'Date'; - } - } - initVersionProperty(meta, prop) { - if (prop.version) { - this.initDefaultValue(prop); - meta.versionProperty = prop.name; - prop.defaultRaw = this.getDefaultVersionValue(meta, prop); - } - if (prop.concurrencyCheck && !prop.primary) { - meta.concurrencyCheckKeys.add(prop.name); - } - } - initCustomType(meta, prop, simple = false, objectEmbeddable = false) { - // `prop.type` might be actually instance of custom type class - if (Type.isMappedType(prop.type) && !prop.customType) { - prop.customType = prop.type; - prop.type = prop.customType.constructor.name; - } - // `prop.type` might also be custom type class (not instance), so `typeof MyType` will give us `function`, not `object` - if (typeof prop.type === 'function' && Type.isMappedType(prop.type.prototype) && !prop.customType) { - // if the type is an ORM defined mapped type without `ensureComparable: true`, - // we use just the type name, to have more performant hydration code - const brand = Type.getOrmType(prop.type); - const type = Utils.keys(t).find(type => { - return !Type.getType(t[type]).ensureComparable(meta, prop) && (prop.type === t[type] || brand === type); - }); - if (type) { - prop.type = type === 'datetime' ? 'Date' : type; - } else { - prop.customType = new prop.type(); - prop.type = prop.customType.constructor.name; - } - } - if (simple) { - return; - } - if (!prop.customType && ['json', 'jsonb'].includes(prop.type?.toLowerCase())) { - prop.customType = new t.json(); - } - if ( - prop.kind === ReferenceKind.SCALAR && - !prop.customType && - prop.columnTypes && - ['json', 'jsonb'].includes(prop.columnTypes[0]) - ) { - prop.customType = new t.json(); - } - if (prop.kind === ReferenceKind.EMBEDDED && !prop.customType && (prop.object || prop.array)) { - prop.customType = new t.json(); - } - if (!prop.customType && prop.array && prop.items) { - prop.customType = new t.enumArray(`${meta.className}.${prop.name}`, prop.items); - } - const isArray = prop.type?.toLowerCase() === 'array' || prop.type?.toString().endsWith('[]'); - if (objectEmbeddable && !prop.customType && isArray) { - prop.customType = new t.json(); - } - // for number arrays we make sure to convert the items to numbers - if (!prop.customType && prop.type === 'number[]') { - prop.customType = new t.array(i => +i); - } - // `string[]` can be returned via ts-morph, while reflect metadata will give us just `array` - if (!prop.customType && isArray) { - prop.customType = new t.array(); - } - if (!prop.customType && prop.type?.toLowerCase() === 'buffer') { - prop.customType = new t.blob(); - } - if (!prop.customType && prop.type?.toLowerCase() === 'uint8array') { - prop.customType = new t.uint8array(); - } - const mappedType = this.getMappedType(prop); - if (prop.fieldNames?.length === 1 && !prop.customType) { - [t.bigint, t.double, t.decimal, t.interval, t.date] - .filter(type => mappedType instanceof type) - .forEach(type => (prop.customType = new type())); - } - if (prop.customType && !prop.columnTypes) { - const mappedType = this.getMappedType({ - columnTypes: [prop.customType.getColumnType(prop, this.#platform)], - }); - if (prop.customType.compareAsType() === 'any' && ![t.json].some(t => prop.customType instanceof t)) { - prop.runtimeType ??= mappedType.runtimeType; - } else { - prop.runtimeType ??= prop.customType.runtimeType; - } - } else if (prop.runtimeType === 'object') { - prop.runtimeType = mappedType.runtimeType; - } else { - prop.runtimeType ??= mappedType.runtimeType; - } - if (prop.customType) { - prop.customType.platform = this.#platform; - prop.customType.meta = meta; - prop.customType.prop = prop; - prop.columnTypes ??= [prop.customType.getColumnType(prop, this.#platform)]; - prop.hasConvertToJSValueSQL = - !!prop.customType.convertToJSValueSQL && prop.customType.convertToJSValueSQL('', this.#platform) !== ''; - prop.hasConvertToDatabaseValueSQL = - !!prop.customType.convertToDatabaseValueSQL && - prop.customType.convertToDatabaseValueSQL('', this.#platform) !== ''; - if ( - prop.customType instanceof t.bigint && - ['string', 'bigint', 'number'].includes(prop.runtimeType.toLowerCase()) - ) { - prop.customType.mode = prop.runtimeType.toLowerCase(); - } - } - if (Type.isMappedType(prop.customType) && prop.kind === ReferenceKind.SCALAR && !isArray) { - prop.type = prop.customType.name; - } - if ( - !prop.customType && - [ReferenceKind.ONE_TO_ONE, ReferenceKind.MANY_TO_ONE].includes(prop.kind) && - !prop.polymorphic && - prop.targetMeta.compositePK - ) { - prop.customTypes = []; - for (const pk of prop.targetMeta.getPrimaryProps()) { - if (pk.customType) { - prop.customTypes.push(pk.customType); - prop.hasConvertToJSValueSQL ||= - !!pk.customType.convertToJSValueSQL && pk.customType.convertToJSValueSQL('', this.#platform) !== ''; - /* v8 ignore next */ - prop.hasConvertToDatabaseValueSQL ||= - !!pk.customType.convertToDatabaseValueSQL && - pk.customType.convertToDatabaseValueSQL('', this.#platform) !== ''; - } else { - prop.customTypes.push(undefined); - } - } - } - if (prop.kind === ReferenceKind.SCALAR && !(mappedType instanceof t.unknown)) { - if ( - !prop.columnTypes && - prop.nativeEnumName && - meta.schema !== this.#platform.getDefaultSchemaName() && - meta.schema && - !prop.nativeEnumName.includes('.') - ) { - prop.columnTypes = [`${meta.schema}.${prop.nativeEnumName}`]; - } else { - prop.columnTypes ??= [mappedType.getColumnType(prop, this.#platform)]; - } - // use only custom types provided by user, we don't need to use the ones provided by ORM, - // with exception for ArrayType and JsonType, those two are handled in - if (!Object.values(t).some(type => type === mappedType.constructor)) { - prop.customType ??= mappedType; - } - } - } - initRelation(prop) { - if (prop.kind === ReferenceKind.SCALAR || prop.polymorphTargets) { - return; - } - // when the target is a polymorphic embedded entity, `prop.target` is an array of classes, we need to get the metadata by the type name instead - const meta2 = this.#metadata.find(prop.target) ?? this.#metadata.getByClassName(prop.type); - // If targetKey is specified, use that property instead of PKs for referencedPKs - prop.referencedPKs = prop.targetKey ? [prop.targetKey] : meta2.primaryKeys; - prop.targetMeta = meta2; - if (meta2.view) { - prop.createForeignKeyConstraint = false; - } - // Auto-generate formula for persist: false relations, but only for single-column FKs - // Composite FK relations need standard JOIN conditions, not formula-based - if ( - !prop.formula && - prop.persist === false && - [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) && - !prop.embedded - ) { - this.initFieldName(prop); - if (prop.fieldNames?.length === 1) { - prop.formula = table => `${table}.${this.#platform.quoteIdentifier(prop.fieldNames[0])}`; - } - } - } - initColumnType(prop) { - this.initUnsigned(prop); - // Get the target properties for FK relations - use targetKey property if specified, otherwise PKs - const targetProps = prop.targetMeta - ? prop.targetKey - ? [prop.targetMeta.properties[prop.targetKey]] - : prop.targetMeta.getPrimaryProps() - : []; - targetProps.map(targetProp => { - prop.length ??= targetProp.length; - prop.precision ??= targetProp.precision; - prop.scale ??= targetProp.scale; - }); - if (prop.kind === ReferenceKind.SCALAR && (prop.type == null || prop.type === 'object') && prop.columnTypes?.[0]) { - delete prop.type; - const mappedType = this.getMappedType(prop); - prop.type = mappedType.compareAsType(); - } - if (prop.columnTypes || !this.#schemaHelper) { - return; - } - if (prop.kind === ReferenceKind.SCALAR) { - const mappedType = this.getMappedType(prop); - const SCALAR_TYPES = ['string', 'number', 'boolean', 'bigint', 'Date', 'Buffer', 'RegExp', 'any', 'unknown']; - if ( - mappedType instanceof t.unknown && - // it could be a runtime type from reflect-metadata - !SCALAR_TYPES.includes(prop.type) && - // or it might be inferred via ts-morph to some generic type alias - !/[<>:"';{}]/.exec(prop.type) - ) { - const type = - prop.length != null && !prop.type.endsWith(`(${prop.length})`) ? `${prop.type}(${prop.length})` : prop.type; - prop.columnTypes = [type]; - } else { - prop.columnTypes = [mappedType.getColumnType(prop, this.#platform)]; - } - return; - } - /* v8 ignore next */ - if (prop.kind === ReferenceKind.EMBEDDED && prop.object) { - prop.columnTypes = [this.#platform.getJsonDeclarationSQL()]; - return; - } - const targetMeta = prop.targetMeta; - prop.columnTypes = []; - // Use targetKey property if specified, otherwise use primary key properties - const referencedProps = prop.targetKey ? [targetMeta.properties[prop.targetKey]] : targetMeta.getPrimaryProps(); - if (prop.polymorphic && prop.polymorphTargets) { - prop.columnTypes.push(this.#platform.getVarcharTypeDeclarationSQL(prop)); - } - for (const referencedProp of referencedProps) { - this.initCustomType(targetMeta, referencedProp); - this.initColumnType(referencedProp); - const mappedType = this.getMappedType(referencedProp); - let columnTypes = referencedProp.columnTypes; - if (referencedProp.autoincrement) { - columnTypes = [mappedType.getColumnType({ ...referencedProp, autoincrement: false }, this.#platform)]; - } - prop.columnTypes.push(...columnTypes); - if (!targetMeta.compositePK || prop.targetKey) { - prop.customType = referencedProp.customType; - } - } - } - getMappedType(prop) { - if (prop.customType) { - return prop.customType; - } - /* v8 ignore next */ - let t = prop.columnTypes?.[0] ?? prop.type ?? ''; - if (prop.nativeEnumName) { - t = 'enum'; - } else if (prop.enum) { - t = prop.items?.every(item => typeof item === 'string') ? 'enum' : 'tinyint'; - } - if (t === 'Date') { - t = 'datetime'; - } - return this.#platform.getMappedType(t); - } - getPrefix(prop, parent) { - const { embeddedPath = [], fieldNames, prefix = true, prefixMode } = prop; - if (prefix === true) { - return (embeddedPath.length ? embeddedPath.join('_') : fieldNames[0]) + '_'; - } - const prefixParent = parent ? this.getPrefix(parent, null) : ''; - if (prefix === false) { - return prefixParent; - } - const mode = prefixMode ?? this.#config.get('embeddables').prefixMode; - return mode === 'absolute' ? prefix : prefixParent + prefix; - } - initUnsigned(prop) { - if (prop.unsigned != null) { - return; - } - if ([ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind)) { - prop.unsigned = prop.targetMeta.getPrimaryProps().some(pk => { - this.initUnsigned(pk); - return pk.unsigned; - }); - return; - } - prop.unsigned ??= - (prop.primary || prop.unsigned) && this.#platform.isNumericProperty(prop) && this.#platform.supportsUnsigned(); - } - initIndexes(meta, prop) { - const hasIndex = meta.indexes.some(idx => idx.properties?.length === 1 && idx.properties[0] === prop.name); - if (prop.kind === ReferenceKind.MANY_TO_ONE && this.#platform.indexForeignKeys() && !hasIndex) { - prop.index ??= true; - } - } - shouldForceConstructorUsage(meta) { - const forceConstructor = this.#config.get('forceEntityConstructor'); - if (Array.isArray(forceConstructor)) { - return forceConstructor.some(cls => Utils.className(cls) === meta.className); - } - return forceConstructor; - } -} diff --git a/node_modules/@mikro-orm/core/metadata/MetadataProvider.d.ts b/node_modules/@mikro-orm/core/metadata/MetadataProvider.d.ts deleted file mode 100644 index 0120ea4..0000000 --- a/node_modules/@mikro-orm/core/metadata/MetadataProvider.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import type { EntityMetadata } from '../typings.js'; -import type { Logger } from '../logging/Logger.js'; -import type { SyncCacheAdapter } from '../cache/CacheAdapter.js'; -import type { Platform } from '../platforms/Platform.js'; -export interface IConfiguration { - get(key: string, defaultValue?: any): any; - getLogger(): Logger; - getMetadataCacheAdapter(): SyncCacheAdapter; - getPlatform(): Platform; -} -/** Base metadata provider that resolves entity type information and manages metadata caching. */ -export declare class MetadataProvider { - protected readonly config: IConfiguration; - constructor(config: IConfiguration); - /** Resolves entity references and type information for all properties in the given metadata. */ - loadEntityMetadata(meta: EntityMetadata): void; - /** Merges cached metadata into the given entity metadata, preserving function expressions. */ - loadFromCache(meta: EntityMetadata, cache: EntityMetadata): void; - /** Whether this provider class uses metadata caching by default. */ - static useCache(): boolean; - /** Whether metadata caching is enabled for this instance. */ - useCache(): boolean; - saveToCache(meta: EntityMetadata): void; - /** Attempts to load metadata from cache, returning undefined if not available. */ - getCachedMetadata( - meta: Pick, 'className' | 'path' | 'root'>, - root: EntityMetadata, - ): EntityMetadata | undefined; - /** Combines individual metadata cache entries into a single file. */ - combineCache(): void; - /** Returns the cache key for the given entity metadata. */ - getCacheKey(meta: Pick): string; -} diff --git a/node_modules/@mikro-orm/core/metadata/MetadataProvider.js b/node_modules/@mikro-orm/core/metadata/MetadataProvider.js deleted file mode 100644 index 88b53b7..0000000 --- a/node_modules/@mikro-orm/core/metadata/MetadataProvider.js +++ /dev/null @@ -1,95 +0,0 @@ -import { Utils } from '../utils/Utils.js'; -import { EntitySchema } from './EntitySchema.js'; -/** Base metadata provider that resolves entity type information and manages metadata caching. */ -export class MetadataProvider { - config; - constructor(config) { - this.config = config; - } - /** Resolves entity references and type information for all properties in the given metadata. */ - loadEntityMetadata(meta) { - for (const prop of meta.props) { - /* v8 ignore next */ - if (typeof prop.entity === 'string') { - prop.type = prop.entity; - } else if (prop.entity) { - const tmp = prop.entity(); - prop.type = Array.isArray(tmp) - ? tmp - .map(t => Utils.className(t)) - .sort() - .join(' | ') - : Utils.className(tmp); - prop.target = EntitySchema.is(tmp) ? tmp.meta.class : tmp; - } else if (!prop.type && !((prop.enum || prop.array) && (prop.items?.length ?? 0) > 0)) { - throw new Error(`Please provide either 'type' or 'entity' attribute in ${meta.className}.${prop.name}.`); - } - } - } - /** Merges cached metadata into the given entity metadata, preserving function expressions. */ - loadFromCache(meta, cache) { - Object.values(cache.properties).forEach(prop => { - const metaProp = meta.properties[prop.name]; - /* v8 ignore next */ - if (metaProp?.enum && Array.isArray(metaProp.items)) { - delete prop.items; - } - }); - // Preserve function expressions from indexes/uniques — they can't survive JSON cache serialization - const expressionMap = new Map(); - for (const arr of [meta.indexes, meta.uniques]) { - for (const idx of arr ?? []) { - if (typeof idx.expression === 'function' && idx.name) { - expressionMap.set(idx.name, idx.expression); - } - } - } - Utils.mergeConfig(meta, cache); - // Restore function expressions that were lost during JSON serialization - if (expressionMap.size > 0) { - for (const arr of [meta.indexes, meta.uniques]) { - for (const idx of arr ?? []) { - const fn = idx.name && expressionMap.get(idx.name); - if (fn && typeof idx.expression !== 'function') { - idx.expression = fn; - } - } - } - } - } - /** Whether this provider class uses metadata caching by default. */ - static useCache() { - return false; - } - /** Whether metadata caching is enabled for this instance. */ - useCache() { - return this.config.get('metadataCache').enabled ?? MetadataProvider.useCache(); - } - saveToCache(meta) { - // - } - /** Attempts to load metadata from cache, returning undefined if not available. */ - getCachedMetadata(meta, root) { - if (!this.useCache()) { - return undefined; - } - const cache = meta.path && this.config.getMetadataCacheAdapter().get(this.getCacheKey(meta)); - if (cache) { - this.loadFromCache(meta, cache); - meta.root = root; - } - return cache; - } - /** Combines individual metadata cache entries into a single file. */ - combineCache() { - const path = this.config.getMetadataCacheAdapter().combine?.(); - // override the path in the options, so we can log it from the CLI in `cache:generate` command - if (path) { - this.config.get('metadataCache').combined = path; - } - } - /** Returns the cache key for the given entity metadata. */ - getCacheKey(meta) { - return meta.className; - } -} diff --git a/node_modules/@mikro-orm/core/metadata/MetadataStorage.d.ts b/node_modules/@mikro-orm/core/metadata/MetadataStorage.d.ts deleted file mode 100644 index c04c9ff..0000000 --- a/node_modules/@mikro-orm/core/metadata/MetadataStorage.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { type Dictionary, EntityMetadata, type EntityName } from '../typings.js'; -import type { EntityManager } from '../EntityManager.js'; -/** Registry that stores and provides access to entity metadata by class, name, or id. */ -export declare class MetadataStorage { - #private; - static readonly PATH_SYMBOL: unique symbol; - constructor(metadata?: Dictionary); - /** Returns the global metadata dictionary, or a specific entry by entity name and path. */ - static getMetadata(): Dictionary; - static getMetadata(entity: string, path: string): EntityMetadata; - /** Checks whether an entity with the given class name exists in the global metadata. */ - static isKnownEntity(name: string): boolean; - /** Clears all entries from the global metadata registry. */ - static clear(): void; - /** Returns the map of all registered entity metadata. */ - getAll(): Map; - /** Returns metadata for the given entity, optionally initializing it if not found. */ - get(entityName: EntityName, init?: boolean): EntityMetadata; - /** Finds metadata for the given entity, returning undefined if not registered. */ - find(entityName: EntityName): EntityMetadata | undefined; - /** Checks whether metadata exists for the given entity. */ - has(entityName: EntityName): boolean; - /** Registers metadata for the given entity. */ - set(entityName: EntityName, meta: EntityMetadata): EntityMetadata; - /** Removes metadata for the given entity from all internal maps. */ - reset(entityName: EntityName): void; - /** Decorates all entity prototypes with helper methods (e.g. init, toJSON). */ - decorate(em: EntityManager): void; - [Symbol.iterator](): IterableIterator; - /** Returns metadata by its internal numeric id. */ - getById(id: number): EntityMetadata; - /** Returns metadata by class name, optionally throwing if not found. */ - getByClassName( - className: string, - validate?: V, - ): V extends true ? EntityMetadata : EntityMetadata | undefined; - /** Returns metadata by unique name, optionally throwing if not found. */ - getByUniqueName( - uniqueName: string, - validate?: V, - ): V extends true ? EntityMetadata : EntityMetadata | undefined; - private validate; -} diff --git a/node_modules/@mikro-orm/core/metadata/MetadataStorage.js b/node_modules/@mikro-orm/core/metadata/MetadataStorage.js deleted file mode 100644 index 1880407..0000000 --- a/node_modules/@mikro-orm/core/metadata/MetadataStorage.js +++ /dev/null @@ -1,128 +0,0 @@ -import { EntityMetadata } from '../typings.js'; -import { Utils } from '../utils/Utils.js'; -import { MetadataError } from '../errors.js'; -import { EntityHelper } from '../entity/EntityHelper.js'; -import { EntitySchema } from './EntitySchema.js'; -function getGlobalStorage(namespace) { - const key = `mikro-orm-${namespace}`; - globalThis[key] = globalThis[key] || {}; - return globalThis[key]; -} -/** Registry that stores and provides access to entity metadata by class, name, or id. */ -export class MetadataStorage { - static PATH_SYMBOL = Symbol.for('@mikro-orm/core/MetadataStorage.PATH_SYMBOL'); - static #metadata = getGlobalStorage('metadata'); - #metadataMap = new Map(); - #idMap; - #classNameMap; - #uniqueNameMap; - constructor(metadata = {}) { - this.#idMap = {}; - this.#uniqueNameMap = {}; - this.#classNameMap = Utils.copy(metadata, false); - for (const meta of Object.values(this.#classNameMap)) { - this.#idMap[meta._id] = meta; - this.#uniqueNameMap[meta.uniqueName] = meta; - this.#metadataMap.set(meta.class, meta); - } - } - static getMetadata(entity, path) { - const key = entity && path ? entity + '-' + Utils.hash(path) : null; - if (key && !MetadataStorage.#metadata[key]) { - MetadataStorage.#metadata[key] = new EntityMetadata({ className: entity, path }); - } - if (key) { - return MetadataStorage.#metadata[key]; - } - return MetadataStorage.#metadata; - } - /** Checks whether an entity with the given class name exists in the global metadata. */ - static isKnownEntity(name) { - return !!Object.values(this.#metadata).find(meta => meta.className === name); - } - /** Clears all entries from the global metadata registry. */ - static clear() { - Object.keys(this.#metadata).forEach(k => delete this.#metadata[k]); - } - /** Returns the map of all registered entity metadata. */ - getAll() { - return this.#metadataMap; - } - /** Returns metadata for the given entity, optionally initializing it if not found. */ - get(entityName, init = false) { - const exists = this.find(entityName); - if (exists) { - return exists; - } - const className = Utils.className(entityName); - if (!init) { - throw MetadataError.missingMetadata(className); - } - const meta = new EntityMetadata({ class: entityName, name: className }); - this.set(entityName, meta); - return meta; - } - /** Finds metadata for the given entity, returning undefined if not registered. */ - find(entityName) { - if (!entityName) { - return; - } - const meta = this.#metadataMap.get(entityName); - if (meta) { - return meta; - } - if (EntitySchema.is(entityName)) { - return this.#metadataMap.get(entityName.meta.class) ?? entityName.meta; - } - return this.#classNameMap[Utils.className(entityName)]; - } - /** Checks whether metadata exists for the given entity. */ - has(entityName) { - return this.#metadataMap.has(entityName); - } - /** Registers metadata for the given entity. */ - set(entityName, meta) { - this.#metadataMap.set(entityName, meta); - this.#idMap[meta._id] = meta; - this.#uniqueNameMap[meta.uniqueName] = meta; - this.#classNameMap[Utils.className(entityName)] = meta; - return meta; - } - /** Removes metadata for the given entity from all internal maps. */ - reset(entityName) { - const meta = this.find(entityName); - if (meta) { - this.#metadataMap.delete(meta.class); - delete this.#idMap[meta._id]; - delete this.#uniqueNameMap[meta.uniqueName]; - delete this.#classNameMap[meta.className]; - } - } - /** Decorates all entity prototypes with helper methods (e.g. init, toJSON). */ - decorate(em) { - [...this.#metadataMap.values()].filter(meta => meta.prototype).forEach(meta => EntityHelper.decorate(meta, em)); - } - *[Symbol.iterator]() { - for (const meta of this.#metadataMap.values()) { - yield meta; - } - } - /** Returns metadata by its internal numeric id. */ - getById(id) { - return this.#idMap[id]; - } - /** Returns metadata by class name, optionally throwing if not found. */ - getByClassName(className, validate = true) { - return this.validate(this.#classNameMap[className], className, validate); - } - /** Returns metadata by unique name, optionally throwing if not found. */ - getByUniqueName(uniqueName, validate = true) { - return this.validate(this.#uniqueNameMap[uniqueName], uniqueName, validate); - } - validate(meta, id, validate) { - if (!meta && validate) { - throw MetadataError.missingMetadata(id); - } - return meta; - } -} diff --git a/node_modules/@mikro-orm/core/metadata/MetadataValidator.d.ts b/node_modules/@mikro-orm/core/metadata/MetadataValidator.d.ts deleted file mode 100644 index 32cf984..0000000 --- a/node_modules/@mikro-orm/core/metadata/MetadataValidator.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -import type { EntityMetadata, EntityName } from '../typings.js'; -import { type MetadataDiscoveryOptions } from '../utils/Configuration.js'; -import type { MetadataStorage } from './MetadataStorage.js'; -/** - * @internal - */ -export declare class MetadataValidator { - validateEntityDefinition(metadata: MetadataStorage, name: EntityName, options: MetadataDiscoveryOptions): void; - validateDiscovered(discovered: EntityMetadata[], options: MetadataDiscoveryOptions): void; - private validateReference; - private validateTargetKey; - /** - * Checks if a property has a unique constraint (either via `unique: true` or single-property `@Unique` decorator). - * Composite unique constraints are not sufficient for targetKey. - */ - private isPropertyUnique; - private validatePolymorphicTargets; - private validateBidirectional; - private validateOwningSide; - private validateInverseSide; - private validateIndexes; - private validateDuplicateFieldNames; - private validateVersionField; - /** - * Validates that entity properties do not use dangerous names that could lead to - * prototype pollution vulnerabilities. This validation ensures that property names - * cannot be exploited to modify object prototypes when values are assigned during - * entity hydration or persistence operations. - * - * @internal - */ - private validatePropertyNames; - /** - * Validates view entity configuration. - * View entities must have an expression. - */ - private validateViewEntity; - /** - * Validates that STI and TPT are not mixed in the same inheritance hierarchy. - * An entity hierarchy can use either STI (discriminatorColumn) or TPT (inheritance: 'tpt'), - * but not both. - * - * Note: This validation runs before `initTablePerTypeInheritance` sets `inheritanceType`, - * so we check the raw `inheritance` option from the decorator/schema. - */ - private validateInheritanceStrategies; -} diff --git a/node_modules/@mikro-orm/core/metadata/MetadataValidator.js b/node_modules/@mikro-orm/core/metadata/MetadataValidator.js deleted file mode 100644 index 8863fb1..0000000 --- a/node_modules/@mikro-orm/core/metadata/MetadataValidator.js +++ /dev/null @@ -1,425 +0,0 @@ -import { Utils } from '../utils/Utils.js'; -import { MetadataError } from '../errors.js'; -import { ReferenceKind } from '../enums.js'; -/** - * List of property names that could lead to prototype pollution vulnerabilities. - * These names should never be used as entity property names because they could - * allow malicious code to modify object prototypes when property values are assigned. - * - * - `__proto__`: Could modify the prototype chain - * - `constructor`: Could modify the constructor property - * - `prototype`: Could modify the prototype object - * - * @internal - */ -const DANGEROUS_PROPERTY_NAMES = ['__proto__', 'constructor', 'prototype']; -/** - * @internal - */ -export class MetadataValidator { - validateEntityDefinition(metadata, name, options) { - const meta = metadata.get(name); - // View entities (expression with view flag) behave like regular tables but are read-only - // They can have primary keys and are created as actual database views - if (meta.view) { - this.validateViewEntity(meta); - return; - } - // Virtual entities (expression without view flag) have restrictions - no PKs, limited relation types - // Note: meta.virtual is set later in sync(), so we check for expression && !view here - if (meta.virtual || (meta.expression && !meta.view)) { - for (const prop of Utils.values(meta.properties)) { - if ( - ![ReferenceKind.SCALAR, ReferenceKind.EMBEDDED, ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes( - prop.kind, - ) - ) { - throw new MetadataError( - `Only scalars, embedded properties and to-many relations are allowed inside virtual entity. Found '${prop.kind}' in ${meta.className}.${prop.name}`, - ); - } - if (prop.primary) { - throw new MetadataError( - `Virtual entity ${meta.className} cannot have primary key ${meta.className}.${prop.name}`, - ); - } - } - return; - } - // entities have PK - if (!meta.embeddable && (!meta.primaryKeys || meta.primaryKeys.length === 0)) { - throw MetadataError.fromMissingPrimaryKey(meta); - } - this.validateVersionField(meta); - this.validateDuplicateFieldNames(meta, options); - this.validateIndexes(meta, meta.indexes ?? [], 'index'); - this.validateIndexes(meta, meta.uniques ?? [], 'unique'); - this.validatePropertyNames(meta); - for (const prop of Utils.values(meta.properties)) { - if (prop.kind !== ReferenceKind.SCALAR) { - this.validateReference(meta, prop, options); - this.validateBidirectional(meta, prop); - } else if (metadata.getByClassName(prop.type, false)) { - throw MetadataError.propertyTargetsEntityType(meta, prop, metadata.getByClassName(prop.type)); - } - } - } - validateDiscovered(discovered, options) { - if (discovered.length === 0 && options.warnWhenNoEntities) { - throw MetadataError.noEntityDiscovered(); - } - // Validate no mixing of STI and TPT in the same hierarchy - this.validateInheritanceStrategies(discovered); - const tableNames = discovered.filter( - meta => - !meta.abstract && - !meta.embeddable && - meta === meta.root && - (meta.tableName || meta.collection) && - meta.schema !== '*', - ); - const duplicateTableNames = Utils.findDuplicates( - tableNames.map(meta => { - const tableName = meta.tableName || meta.collection; - return (meta.schema ? '.' + meta.schema : '') + tableName; - }), - ); - if (duplicateTableNames.length > 0 && options.checkDuplicateTableNames) { - throw MetadataError.duplicateEntityDiscovered(duplicateTableNames); - } - // validate we found at least one entity (not just abstract/base entities) - if (discovered.filter(meta => meta.name).length === 0 && options.warnWhenNoEntities) { - throw MetadataError.onlyAbstractEntitiesDiscovered(); - } - const unwrap = type => - type - .replace(/Array<(.*)>/, '$1') // unwrap array - .replace(/\[]$/, '') // remove array suffix - .replace(/\((.*)\)/, '$1'); // unwrap union types - const name = p => { - if (typeof p === 'function' && !p.prototype) { - return Utils.className(p()); - } - return Utils.className(p); - }; - const pivotProps = new Map(); - // check for not discovered entities - discovered.forEach(meta => - Object.values(meta.properties).forEach(prop => { - if ( - prop.kind !== ReferenceKind.SCALAR && - !unwrap(prop.type) - .split(/ ?\| ?/) - .every(type => discovered.find(m => m.className === type)) - ) { - throw MetadataError.fromUnknownEntity(prop.type, `${meta.className}.${prop.name}`); - } - if (prop.pivotEntity) { - const props = pivotProps.get(name(prop.pivotEntity)) ?? []; - props.push({ meta, prop }); - pivotProps.set(name(prop.pivotEntity), props); - } - }), - ); - pivotProps.forEach(props => { - // if the pivot entity is used in more than one property, check if they are linked - if (props.length > 1 && props.every(p => !p.prop.mappedBy && !p.prop.inversedBy)) { - throw MetadataError.invalidManyToManyWithPivotEntity( - props[0].meta, - props[0].prop, - props[1].meta, - props[1].prop, - ); - } - }); - } - validateReference(meta, prop, options) { - // references do have types - if (!prop.type) { - throw MetadataError.fromWrongTypeDefinition(meta, prop); - } - // Polymorphic relations have multiple targets, validate PK compatibility - if (prop.polymorphic && prop.polymorphTargets) { - this.validatePolymorphicTargets(meta, prop); - return; - } - const targetMeta = prop.targetMeta; - // references do have type of known entity - if (!targetMeta) { - throw MetadataError.fromWrongTypeDefinition(meta, prop); - } - if (targetMeta.abstract && !targetMeta.root?.inheritanceType && !targetMeta.embeddable) { - throw MetadataError.targetIsAbstract(meta, prop); - } - if ( - [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) && - prop.persist === false && - targetMeta.compositePK && - options.checkNonPersistentCompositeProps - ) { - throw MetadataError.nonPersistentCompositeProp(meta, prop); - } - this.validateTargetKey(meta, prop, targetMeta); - } - validateTargetKey(meta, prop, targetMeta) { - if (!prop.targetKey) { - return; - } - // targetKey is not supported for ManyToMany relations - if (prop.kind === ReferenceKind.MANY_TO_MANY) { - throw MetadataError.targetKeyOnManyToMany(meta, prop); - } - // targetKey must point to an existing property - const targetProp = targetMeta.properties[prop.targetKey]; - if (!targetProp) { - throw MetadataError.targetKeyNotFound(meta, prop); - } - // targetKey must point to a unique property (composite unique is not sufficient) - if (!this.isPropertyUnique(targetProp, targetMeta)) { - throw MetadataError.targetKeyNotUnique(meta, prop); - } - } - /** - * Checks if a property has a unique constraint (either via `unique: true` or single-property `@Unique` decorator). - * Composite unique constraints are not sufficient for targetKey. - */ - isPropertyUnique(prop, meta) { - if (prop.unique) { - return true; - } - // Check for single-property unique constraint via @Unique decorator - return !!meta.uniques?.some(u => { - const props = Utils.asArray(u.properties); - return props.length === 1 && props[0] === prop.name && !u.options; - }); - } - validatePolymorphicTargets(meta, prop) { - const targets = prop.polymorphTargets; - // Validate targetKey exists and is compatible across all targets - if (prop.targetKey) { - for (const target of targets) { - const targetProp = target.properties[prop.targetKey]; - if (!targetProp) { - throw MetadataError.targetKeyNotFound(meta, prop, target); - } - // targetKey must point to a unique property (composite unique is not sufficient) - if (!this.isPropertyUnique(targetProp, target)) { - throw MetadataError.targetKeyNotUnique(meta, prop, target); - } - } - } - const firstPKs = targets[0].getPrimaryProps(); - for (let i = 1; i < targets.length; i++) { - const target = targets[i]; - const targetPKs = target.getPrimaryProps(); - if (targetPKs.length !== firstPKs.length) { - throw MetadataError.incompatiblePolymorphicTargets( - meta, - prop, - targets[0], - target, - 'different number of primary keys', - ); - } - for (let j = 0; j < firstPKs.length; j++) { - const firstPK = firstPKs[j]; - const targetPK = targetPKs[j]; - if (firstPK.runtimeType !== targetPK.runtimeType) { - throw MetadataError.incompatiblePolymorphicTargets( - meta, - prop, - targets[0], - target, - `incompatible primary key types: ${firstPK.name} (${firstPK.runtimeType}) vs ${targetPK.name} (${targetPK.runtimeType})`, - ); - } - } - } - } - validateBidirectional(meta, prop) { - if (prop.inversedBy) { - this.validateOwningSide(meta, prop); - } else if (prop.mappedBy) { - this.validateInverseSide(meta, prop); - } else if (prop.kind === ReferenceKind.ONE_TO_MANY && !prop.mappedBy) { - // 1:m property has `mappedBy` - throw MetadataError.fromMissingOption(meta, prop, 'mappedBy'); - } - } - validateOwningSide(meta, prop) { - // For polymorphic relations, inversedBy may point to multiple entity types - if (prop.polymorphic && prop.polymorphTargets?.length) { - // For polymorphic relations, validate inversedBy against each target - // The inverse property should exist on the target entities and reference back to this property - for (const targetMeta of prop.polymorphTargets) { - const inverse = targetMeta.properties[prop.inversedBy]; - // The inverse property is optional - some targets may not have it - if (!inverse) { - continue; - } - // Validate the inverse property - if (inverse.targetMeta?.root.class !== meta.root.class) { - throw MetadataError.fromWrongReference(meta, prop, 'inversedBy', inverse); - } - // inverse side is not defined as owner - if (inverse.inversedBy || inverse.owner) { - throw MetadataError.fromWrongOwnership(meta, prop, 'inversedBy'); - } - } - return; - } - const inverse = prop.targetMeta.properties[prop.inversedBy]; - // has correct `inversedBy` on owning side - if (!inverse) { - throw MetadataError.fromWrongReference(meta, prop, 'inversedBy'); - } - const targetClass = inverse.targetMeta?.root.class; - // has correct `inversedBy` reference type - if (inverse.type !== meta.className && targetClass !== meta.root.class) { - throw MetadataError.fromWrongReference(meta, prop, 'inversedBy', inverse); - } - // inverse side is not defined as owner - if (inverse.inversedBy || inverse.owner) { - throw MetadataError.fromWrongOwnership(meta, prop, 'inversedBy'); - } - } - validateInverseSide(meta, prop) { - const owner = prop.targetMeta.properties[prop.mappedBy]; - // has correct `mappedBy` on inverse side - if (prop.mappedBy && !owner) { - throw MetadataError.fromWrongReference(meta, prop, 'mappedBy'); - } - // has correct `mappedBy` reference type - // For polymorphic relations, check if this entity is one of the polymorphic targets - const isValidPolymorphicInverse = - owner.polymorphic && owner.polymorphTargets?.some(target => target.class === meta.root.class); - if ( - !isValidPolymorphicInverse && - owner.type !== meta.className && - owner.targetMeta?.root.class !== meta.root.class - ) { - throw MetadataError.fromWrongReference(meta, prop, 'mappedBy', owner); - } - // owning side is not defined as inverse - if (owner.mappedBy) { - throw MetadataError.fromWrongOwnership(meta, prop, 'mappedBy'); - } - // owning side is not defined as inverse - const valid = [ - { owner: ReferenceKind.MANY_TO_ONE, inverse: ReferenceKind.ONE_TO_MANY }, - { owner: ReferenceKind.MANY_TO_MANY, inverse: ReferenceKind.MANY_TO_MANY }, - { owner: ReferenceKind.ONE_TO_ONE, inverse: ReferenceKind.ONE_TO_ONE }, - ]; - if (!valid.find(spec => spec.owner === owner.kind && spec.inverse === prop.kind)) { - throw MetadataError.fromWrongReferenceKind(meta, owner, prop); - } - if (prop.primary) { - throw MetadataError.fromInversideSidePrimary(meta, owner, prop); - } - } - validateIndexes(meta, indexes, type) { - for (const index of indexes) { - for (const propName of Utils.asArray(index.properties)) { - const prop = meta.root.properties[propName]; - if (!prop && !Object.values(meta.root.properties).some(p => propName.startsWith(p.name + '.'))) { - throw MetadataError.unknownIndexProperty(meta, propName, type); - } - } - } - } - validateDuplicateFieldNames(meta, options) { - const candidates = Object.values(meta.properties) - .filter( - prop => - prop.persist !== false && - !prop.inherited && - prop.fieldNames?.length === 1 && - (prop.kind !== ReferenceKind.EMBEDDED || prop.object), - ) - .map(prop => prop.fieldNames[0]); - const duplicates = Utils.findDuplicates(candidates); - if (duplicates.length > 0 && options.checkDuplicateFieldNames) { - const pairs = duplicates.flatMap(name => { - return Object.values(meta.properties) - .filter(p => p.fieldNames?.[0] === name) - .map(prop => { - return [prop.embedded ? prop.embedded.join('.') : prop.name, prop.fieldNames[0]]; - }); - }); - throw MetadataError.duplicateFieldName(meta.class, pairs); - } - } - validateVersionField(meta) { - if (!meta.versionProperty) { - return; - } - const props = Object.values(meta.properties).filter(p => p.version); - if (props.length > 1) { - throw MetadataError.multipleVersionFields( - meta, - props.map(p => p.name), - ); - } - const prop = meta.properties[meta.versionProperty]; - const type = prop.runtimeType ?? prop.columnTypes?.[0] ?? prop.type; - if (type !== 'number' && type !== 'Date' && !type.startsWith('timestamp') && !type.startsWith('datetime')) { - throw MetadataError.invalidVersionFieldType(meta); - } - } - /** - * Validates that entity properties do not use dangerous names that could lead to - * prototype pollution vulnerabilities. This validation ensures that property names - * cannot be exploited to modify object prototypes when values are assigned during - * entity hydration or persistence operations. - * - * @internal - */ - validatePropertyNames(meta) { - for (const prop of Utils.values(meta.properties)) { - if (DANGEROUS_PROPERTY_NAMES.includes(prop.name)) { - throw MetadataError.dangerousPropertyName(meta, prop); - } - } - } - /** - * Validates view entity configuration. - * View entities must have an expression. - */ - validateViewEntity(meta) { - // View entities must have an expression - if (!meta.expression) { - throw MetadataError.viewEntityWithoutExpression(meta); - } - // Validate indexes if present - this.validateIndexes(meta, meta.indexes ?? [], 'index'); - this.validateIndexes(meta, meta.uniques ?? [], 'unique'); - // Validate property names - this.validatePropertyNames(meta); - } - /** - * Validates that STI and TPT are not mixed in the same inheritance hierarchy. - * An entity hierarchy can use either STI (discriminatorColumn) or TPT (inheritance: 'tpt'), - * but not both. - * - * Note: This validation runs before `initTablePerTypeInheritance` sets `inheritanceType`, - * so we check the raw `inheritance` option from the decorator/schema. - */ - validateInheritanceStrategies(discovered) { - const checkedRoots = new Set(); - for (const meta of discovered) { - if (meta.embeddable) { - continue; - } - const root = meta.root; - if (checkedRoots.has(root)) { - continue; - } - checkedRoots.add(root); - const hasSTI = !!root.discriminatorColumn; - const hasTPT = root.inheritanceType === 'tpt' || root.inheritance === 'tpt'; - if (hasSTI && hasTPT) { - throw MetadataError.mixedInheritanceStrategies(root, meta); - } - } - } -} diff --git a/node_modules/@mikro-orm/core/metadata/discover-entities.d.ts b/node_modules/@mikro-orm/core/metadata/discover-entities.d.ts deleted file mode 100644 index c9991be..0000000 --- a/node_modules/@mikro-orm/core/metadata/discover-entities.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { type Constructor } from '../typings.js'; -import { EntitySchema } from './EntitySchema.js'; -export declare function discoverEntities( - paths: string | string[], - options?: { - baseDir?: string; - }, -): Promise>; diff --git a/node_modules/@mikro-orm/core/metadata/discover-entities.js b/node_modules/@mikro-orm/core/metadata/discover-entities.js deleted file mode 100644 index a0c66a2..0000000 --- a/node_modules/@mikro-orm/core/metadata/discover-entities.js +++ /dev/null @@ -1,40 +0,0 @@ -import { basename } from 'node:path'; -import { fs } from '../utils/fs-utils.js'; -import { Utils } from '../utils/Utils.js'; -import { MetadataStorage } from './MetadataStorage.js'; -import { EntitySchema } from './EntitySchema.js'; -async function getEntityClassOrSchema(filepath, allTargets, baseDir) { - const path = fs.normalizePath(baseDir, filepath); - const exports = await fs.dynamicImport(path); - const targets = Object.values(exports); - // ignore class implementations that are linked from an EntitySchema - for (const item of targets) { - if (EntitySchema.is(item)) { - for (const item2 of targets) { - if (item.meta.class === item2) { - targets.splice(targets.indexOf(item2), 1); - } - } - } - } - for (const item of targets) { - const validTarget = EntitySchema.is(item) || (item instanceof Function && MetadataStorage.isKnownEntity(item.name)); - if (validTarget && !allTargets.has(item)) { - allTargets.set(item, path); - } - } -} -export async function discoverEntities(paths, options) { - paths = Utils.asArray(paths).map(path => fs.normalizePath(path)); - const baseDir = fs.absolutePath(options?.baseDir ?? process.cwd()); - const files = fs.glob(paths, fs.normalizePath(baseDir)); - const found = new Map(); - for (const filepath of files) { - const filename = basename(filepath); - if (!/\.[cm]?[jt]s$/.exec(filename) || /\.d\.[cm]?ts/.exec(filename)) { - continue; - } - await getEntityClassOrSchema(filepath, found, baseDir); - } - return found.keys(); -} diff --git a/node_modules/@mikro-orm/core/metadata/index.d.ts b/node_modules/@mikro-orm/core/metadata/index.d.ts deleted file mode 100644 index a7960af..0000000 --- a/node_modules/@mikro-orm/core/metadata/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type * from './types.js'; -export * from './EntitySchema.js'; -export * from './MetadataDiscovery.js'; -export * from './MetadataStorage.js'; -export * from './MetadataProvider.js'; -export * from './MetadataValidator.js'; diff --git a/node_modules/@mikro-orm/core/metadata/index.js b/node_modules/@mikro-orm/core/metadata/index.js deleted file mode 100644 index 2aaf852..0000000 --- a/node_modules/@mikro-orm/core/metadata/index.js +++ /dev/null @@ -1,5 +0,0 @@ -export * from './EntitySchema.js'; -export * from './MetadataDiscovery.js'; -export * from './MetadataStorage.js'; -export * from './MetadataProvider.js'; -export * from './MetadataValidator.js'; diff --git a/node_modules/@mikro-orm/core/metadata/types.d.ts b/node_modules/@mikro-orm/core/metadata/types.d.ts deleted file mode 100644 index c944236..0000000 --- a/node_modules/@mikro-orm/core/metadata/types.d.ts +++ /dev/null @@ -1,661 +0,0 @@ -import type { - AnyEntity, - Constructor, - EntityName, - AnyString, - CheckCallback, - GeneratedColumnCallback, - FormulaCallback, - FilterQuery, - Dictionary, - AutoPath, - EntityClass, - IndexCallback, - ObjectQuery, - Raw, -} from '../typings.js'; -import type { Cascade, LoadStrategy, DeferMode, QueryOrderMap, EmbeddedPrefixMode } from '../enums.js'; -import type { Type, types } from '../types/index.js'; -import type { EntityManager } from '../EntityManager.js'; -import type { FilterOptions, FindOptions } from '../drivers/IDatabaseDriver.js'; -import type { SerializeOptions } from '../serialization/EntitySerializer.js'; -export type EntityOptions ? P : T> = { - /** Override default collection/table name. Alias for `collection`. */ - tableName?: string; - /** Sets the schema name. */ - schema?: string; - /** Override default collection/table name. Alias for `tableName`. */ - collection?: string; - /** - * Set default ordering for this entity. This ordering is applied when: - * - Querying the entity directly via `em.find()`, `em.findAll()`, etc. - * - Populating the entity as a relation - * - * All orderings are combined together. Precedence (highest to lowest): - * 1. Runtime `FindOptions.orderBy` - * 2. Relation-level `@OneToMany({ orderBy })` / `@ManyToMany({ orderBy })` - * 3. Entity-level `@Entity({ orderBy })` - */ - orderBy?: QueryOrderMap | QueryOrderMap[]; - /** For {@doclink inheritance-mapping#single-table-inheritance | Single Table Inheritance}. */ - discriminatorColumn?: (T extends EntityClass ? keyof P : string) | AnyString; - /** For {@doclink inheritance-mapping#single-table-inheritance | Single Table Inheritance}. */ - discriminatorMap?: Dictionary; - /** For {@doclink inheritance-mapping#single-table-inheritance | Single Table Inheritance}. */ - discriminatorValue?: number | string; - /** Set inheritance strategy: 'tpt' for {@doclink inheritance-mapping#table-per-type-inheritance-tpt | Table-Per-Type} inheritance. When set on the root entity, each entity in the hierarchy gets its own table with a FK from child PK to parent PK. */ - inheritance?: 'tpt'; - /** Enforce use of constructor when creating managed entity instances. */ - forceConstructor?: boolean; - /** Specify constructor parameters to be used in `em.create` or when `forceConstructor` is enabled. Those should be names of declared entity properties in the same order as your constructor uses them. The ORM tries to infer those automatically, use this option in case the inference fails. */ - constructorParams?: (T extends EntityClass ? keyof P : string)[]; - /** Specify comment to table. (SQL only) */ - comment?: string; - /** Marks entity as abstract, such entities are inlined during discovery. */ - abstract?: boolean; - /** Disables change tracking - such entities are ignored during flush. */ - readonly?: boolean; - /** Marks entity as {@doclink virtual-entities | virtual}. This is set automatically when you use `expression` option (unless `view` is set). */ - virtual?: boolean; - /** - * Marks entity as a database view. Unlike virtual entities which evaluate expressions at query time, - * view entities create actual database views. The `expression` option must be provided when `view` is true. - * View entities are read-only by default. - * - * Use `view: true` for regular views, or `view: { materialized: true }` for materialized views (PostgreSQL only). - * Materialized views store the query results and must be refreshed to update data. - * Use `view: { materialized: true, withData: false }` to create an unpopulated materialized view. - */ - view?: - | boolean - | { - materialized?: boolean; - withData?: boolean; - }; - /** Used to make ORM aware of externally defined triggers. This is needed for MS SQL Server multi inserts, ignored in other dialects. */ - hasTriggers?: boolean; - /** SQL query that maps to a {@doclink virtual-entities | virtual entity}, or for view entities, the view definition. */ - expression?: - | string - | ((em: any, where: ObjectQuery, options: FindOptions, stream?: boolean) => object); - /** Set {@doclink repositories#custom-repository | custom repository class}. */ - repository?: () => Constructor; -}; -export interface PropertyOptions { - /** - * Alias for `fieldName`. - */ - name?: string; - /** - * Specify database column name for this property. - * - * @see https://mikro-orm.io/docs/naming-strategy - */ - fieldName?: string; - /** - * Specify database column names for this property. - * Same as `fieldName` but for composite FKs. - * - * @see https://mikro-orm.io/docs/naming-strategy - */ - fieldNames?: string[]; - /** - * Specify an exact database column type for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. This option is only for simple properties represented by a single column. (SQL only) - */ - columnType?: ColumnType | AnyString; - /** - * Specify an exact database column type for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. This option is suitable for composite keys, where one property is represented by multiple columns. (SQL only) - */ - columnTypes?: (ColumnType | AnyString)[]; - /** - * Explicitly specify the runtime type. - * - * @see https://mikro-orm.io/docs/metadata-providers - * @see https://mikro-orm.io/docs/custom-types - */ - type?: - | keyof typeof types - | 'ObjectId' - | Date - | Constructor - | Constructor> - | Type - | (() => unknown) - | ColumnType - | AnyString; - /** - * Runtime type of the property. This is the JS type that your property is mapped to, e.g. `string` or `number`, and is normally inferred automatically via `reflect-metadata`. - * In some cases, the inference won't work, and you might need to specify the `runtimeType` explicitly - the most common one is when you use a union type with null like `foo: number | null`. - */ - runtimeType?: string; - /** - * Set length of database column, used for datetime/timestamp/varchar column types for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. (SQL only) - */ - length?: number; - /** - * Set precision of database column to represent the number of significant digits. (SQL only) - */ - precision?: number; - /** - * Set scale of database column to represents the number of digits after the decimal point. (SQL only) - */ - scale?: number; - /** - * Explicitly specify the auto increment of the primary key. - */ - autoincrement?: boolean; - /** - * Add the property to the `returning` statement. - */ - returning?: boolean; - /** - * Automatically set the property value when entity gets created, executed during flush operation. - * @param entity - */ - onCreate?: (entity: Owner, em: EntityManager) => any; - /** - * Automatically update the property value every time entity gets updated, executed during flush operation. - * @param entity - */ - onUpdate?: (entity: Owner, em: EntityManager) => any; - /** - * Specify default column value for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. - * This is a runtime value, assignable to the entity property. (SQL only) - */ - default?: string | string[] | number | number[] | boolean | null | Date | Raw; - /** - * Specify SQL functions for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. (SQL only) - * Since v4 you should use defaultRaw for SQL functions. e.g. now() - */ - defaultRaw?: string | Raw; - /** - * Set to map some SQL snippet for the entity. - * - * @see https://mikro-orm.io/docs/defining-entities#formulas Formulas - */ - formula?: string | FormulaCallback; - /** - * For generated columns. This will be appended to the column type after the `generated always` clause. - */ - generated?: string | Raw | GeneratedColumnCallback; - /** - * Set column as nullable for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. - */ - nullable?: boolean; - /** - * Set column as unsigned for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. (SQL only) - */ - unsigned?: boolean; - /** - * Set false to define {@link https://mikro-orm.io/docs/serializing#shadow-properties Shadow Property}. - */ - persist?: boolean; - /** - * Set false to disable hydration of this property. Useful for persisted getters. - */ - hydrate?: boolean; - /** - * Enable `ScalarReference` wrapper for lazy values. Use this in combination with `lazy: true` to have a type-safe accessor object in place of the value. - */ - ref?: boolean; - /** - * Set to true to omit the property when {@link https://mikro-orm.io/docs/serializing Serializing}. - */ - hidden?: boolean; - /** - * Set to true to enable {@link https://mikro-orm.io/docs/transactions#optimistic-locking Optimistic Locking} via version field. (SQL only) - */ - version?: boolean; - /** - * Set to true to enable {@link https://mikro-orm.io/docs/transactions#optimistic-locking Optimistic Locking} via concurrency fields. - */ - concurrencyCheck?: boolean; - /** - * Explicitly specify index on a property. - */ - index?: boolean | string; - /** - * Set column as unique for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. (SQL only) - */ - unique?: boolean | string; - /** - * Specify column with check constraints. (Postgres driver only) - * - * @see https://mikro-orm.io/docs/defining-entities#check-constraints - */ - check?: string | CheckCallback; - /** - * Set to omit the property from the select clause for lazy loading. - * - * @see https://mikro-orm.io/docs/defining-entities#lazy-scalar-properties - */ - lazy?: boolean; - /** - * Set true to define entity's unique primary key identifier. - * Alias for `@PrimaryKey()` decorator - * - * @see https://mikro-orm.io/docs/decorators#primarykey - */ - primary?: boolean; - /** - * Set true to define the properties as setter. (virtual) - * - * @example - * ```ts - * @Property({ setter: true }) - * set address(value: string) { - * this._address = value.toLocaleLowerCase(); - * } - * ``` - */ - setter?: boolean; - /** - * Set true to define the properties as getter. (virtual) - * - * @example - * ```ts - * @Property({ getter: true }) - * get fullName() { - * return this.firstName + this.lastName; - * } - * ``` - */ - getter?: boolean; - /** - * When defining a property over a method (not a getter, a regular function), you can use this option to point - * to the method name. - * - * @example - * ```ts - * @Property({ getter: true }) - * getFullName() { - * return this.firstName + this.lastName; - * } - * ``` - */ - getterName?: keyof Owner; - /** - * When using a private property backed by a public get/set pair, use the `accessor` option to point to the other side. - * - * > The `fieldName` will be inferred based on the accessor name unless specified explicitly. - * - * If the `accessor` option points to something, the ORM will use the backing property directly. - * - * @example - * ```ts - * @Entity() - * export class User { - * // the ORM will use the backing field directly - * @Property({ accessor: 'email' }) - * private _email: string; - * - * get email() { - * return this._email; - * } - * - * set email() { - * return this._email; - * } - * } - *``` - * - * If you want to the ORM to use your accessor internally too, use `accessor: true` on the get/set property instead. - * This is handy if you want to use a native private property for the backing field. - * - * @example - * ```ts - * @Entity({ forceConstructor: true }) - * export class User { - * #email: string; - * - * // the ORM will use the accessor internally - * @Property({ accessor: true }) - * get email() { - * return this.#email; - * } - * - * set email() { - * return this.#email; - * } - * } - * ``` - */ - accessor?: keyof Owner | AnyString | boolean; - /** - * Set to define serialized primary key for MongoDB. (virtual) - * Alias for `@SerializedPrimaryKey()` decorator. - * - * @see https://mikro-orm.io/docs/decorators#serializedprimarykey - */ - serializedPrimaryKey?: boolean; - /** - * Set to use serialize property. Allow to specify a callback that will be used when serializing a property. - * - * @see https://mikro-orm.io/docs/serializing#property-serializers - */ - serializer?: (value: any, options?: SerializeOptions) => any; - /** - * Specify name of key for the serialized value. - */ - serializedName?: string; - /** - * Specify serialization groups for `serialize()` calls. If a property does not specify any group, it will be included, - * otherwise only properties with a matching group are included. - */ - groups?: string[]; - /** - * Specify a custom order based on the values. (SQL only) - */ - customOrder?: string[] | number[] | boolean[]; - /** - * Specify comment of column for {@link https://mikro-orm.io/docs/schema-generator Schema Generator}. (SQL only) - */ - comment?: string; - /** mysql only */ - extra?: string; - /** - * Set to avoid a perpetual diff from the {@link https://mikro-orm.io/docs/schema-generator Schema Generator} when columns are generated. - * - * @see https://mikro-orm.io/docs/defining-entities#sql-generated-columns - */ - ignoreSchemaChanges?: ('type' | 'extra' | 'default')[]; -} -export interface ReferenceOptions extends PropertyOptions { - /** Set target entity type. For polymorphic relations, pass an array of entity types. */ - entity?: () => EntityName | EntityName[]; - /** Set what actions on owning entity should be cascaded to the relationship. Defaults to [Cascade.PERSIST, Cascade.MERGE] (see {@doclink cascading}). */ - cascade?: Cascade[]; - /** Always load the relationship. Discouraged for use with to-many relations for performance reasons. */ - eager?: boolean; - /** Override the default loading strategy for this property. This option has precedence over the global `loadStrategy`, but can be overridden by `FindOptions.strategy`. */ - strategy?: LoadStrategy | `${LoadStrategy}`; - /** Control filter parameters for the relation. This will serve as a default value when processing filters on this relation. It's value can be overridden via `em.fork()` or `FindOptions`. */ - filters?: FilterOptions; -} -/** - * Inspired by https://github.com/typeorm/typeorm/blob/941b584ba135617e55d6685caef671172ec1dc03/src/driver/types/ColumnTypes.ts - * @ignore - */ -export type ColumnType = - | 'int' - | 'int4' - | 'integer' - | 'bigint' - | 'int8' - | 'int2' - | 'tinyint' - | 'smallint' - | 'mediumint' - | 'double' - | 'double precision' - | 'real' - | 'float8' - | 'decimal' - | 'numeric' - | 'float' - | 'float4' - | 'datetime' - | 'time' - | 'time with time zone' - | 'timestamp' - | 'timestamp with time zone' - | 'timetz' - | 'timestamptz' - | 'date' - | 'interval' - | 'character varying' - | 'varchar' - | 'char' - | 'character' - | 'uuid' - | 'text' - | 'tinytext' - | 'mediumtext' - | 'longtext' - | 'boolean' - | 'bool' - | 'bit' - | 'enum' - | 'blob' - | 'tinyblob' - | 'mediumblob' - | 'longblob' - | 'bytea' - | 'point' - | 'line' - | 'lseg' - | 'box' - | 'circle' - | 'path' - | 'polygon' - | 'geometry' - | 'tsvector' - | 'tsquery' - | 'json' - | 'jsonb'; -interface PolymorphicOptions { - /** - * For polymorphic relations. Specifies the property name that stores the entity type discriminator. - * Defaults to the property name. Only used when `entity` returns an array of types. - * For M:N relations, this is the column name in the pivot table. - */ - discriminator?: string; - /** - * For polymorphic relations. Custom mapping of discriminator values to entity class names. - * If not provided, table names are used as discriminator values. - */ - discriminatorMap?: Dictionary; -} -export interface ManyToOneOptions extends ReferenceOptions, PolymorphicOptions { - /** Point to the inverse side property name. */ - inversedBy?: (string & keyof Target) | ((e: Target) => any); - /** Wrap the entity in {@apilink Reference} wrapper. */ - ref?: boolean; - /** Use this relation as a primary key. */ - primary?: boolean; - /** Map this relation to the primary key value instead of an entity. */ - mapToPk?: boolean; - /** Override the default database column name on the owning side (see {@doclink naming-strategy | Naming Strategy}). This option is only for simple properties represented by a single column. */ - joinColumn?: string; - /** Override the default database column name on the owning side (see {@doclink naming-strategy | Naming Strategy}). This option is suitable for composite keys, where one property is represented by multiple columns. */ - joinColumns?: string[]; - /** When a part of a composite column is shared in other properties, use this option to specify what columns are considered as owned by this property. This is useful when your composite property is nullable, but parts of it are not. */ - ownColumns?: string[]; - /** Override the default database column name on the target entity (see {@doclink naming-strategy | Naming Strategy}). This option is only for simple properties represented by a single column. */ - referenceColumnName?: string; - /** Override the default database column name on the target entity (see {@doclink naming-strategy | Naming Strategy}). This option is suitable for composite keys, where one property is represented by multiple columns. */ - referencedColumnNames?: string[]; - /** Specify the property name on the target entity that this FK references instead of the primary key. */ - targetKey?: string & keyof Target; - /** What to do when the target entity gets deleted. */ - deleteRule?: 'cascade' | 'no action' | 'set null' | 'set default' | AnyString; - /** What to do when the reference to the target entity gets updated. */ - updateRule?: 'cascade' | 'no action' | 'set null' | 'set default' | AnyString; - /** Set the constraint type. Immediate constraints are checked for each statement, while deferred ones are only checked at the end of the transaction. Only for postgres unique constraints. */ - deferMode?: DeferMode | `${DeferMode}`; - /** Enable/disable foreign key constraint creation on this relation */ - createForeignKeyConstraint?: boolean; - /** Set a custom foreign key constraint name, overriding NamingStrategy.indexName(). */ - foreignKeyName?: string; -} -export interface OneToManyOptions extends ReferenceOptions { - /** Remove the entity when it gets disconnected from the relationship (see {@doclink cascading | Cascading}). */ - orphanRemoval?: boolean; - /** Set default ordering. */ - orderBy?: QueryOrderMap | QueryOrderMap[]; - /** Condition for {@doclink collections#declarative-partial-loading | Declarative partial loading}. */ - where?: FilterQuery; - /** Override the default database column name on the owning side (see {@doclink naming-strategy | Naming Strategy}). This option is only for simple properties represented by a single column. */ - joinColumn?: string; - /** Override the default database column name on the owning side (see {@doclink naming-strategy | Naming Strategy}). This option is suitable for composite keys, where one property is represented by multiple columns. */ - joinColumns?: string[]; - /** Override the default database column name on the inverse side (see {@doclink naming-strategy | Naming Strategy}). This option is only for simple properties represented by a single column. */ - inverseJoinColumn?: string; - /** Override the default database column name on the inverse side (see {@doclink naming-strategy | Naming Strategy}). This option is suitable for composite keys, where one property is represented by multiple columns. */ - inverseJoinColumns?: string[]; - /** Override the default database column name on the target entity (see {@doclink naming-strategy | Naming Strategy}). This option is only for simple properties represented by a single column. */ - referenceColumnName?: string; - /** Override the default database column name on the target entity (see {@doclink naming-strategy | Naming Strategy}). This option is suitable for composite keys, where one property is represented by multiple columns. */ - referencedColumnNames?: string[]; - /** Point to the owning side property name. */ - mappedBy: (string & keyof Target) | ((e: Target) => any); -} -export interface OneToOneOptions - extends Partial, 'orderBy'>>, PolymorphicOptions { - /** Set this side as owning. Owning side is where the foreign key is defined. This option is not required if you use `inversedBy` or `mappedBy` to distinguish owning and inverse side. */ - owner?: boolean; - /** Point to the inverse side property name. */ - inversedBy?: (string & keyof Target) | ((e: Target) => any); - /** Wrap the entity in {@apilink Reference} wrapper. */ - ref?: boolean; - /** Use this relation as a primary key. */ - primary?: boolean; - /** Map this relation to the primary key value instead of an entity. */ - mapToPk?: boolean; - /** When a part of a composite column is shared in other properties, use this option to specify what columns are considered as owned by this property. This is useful when your composite property is nullable, but parts of it are not. */ - ownColumns?: string[]; - /** Specify the property name on the target entity that this FK references instead of the primary key. */ - targetKey?: string & keyof Target; - /** What to do when the target entity gets deleted. */ - deleteRule?: 'cascade' | 'no action' | 'set null' | 'set default' | AnyString; - /** What to do when the reference to the target entity gets updated. */ - updateRule?: 'cascade' | 'no action' | 'set null' | 'set default' | AnyString; - /** Set the constraint type. Immediate constraints are checked for each statement, while deferred ones are only checked at the end of the transaction. Only for postgres unique constraints. */ - deferMode?: DeferMode | `${DeferMode}`; - /** Set a custom foreign key constraint name, overriding NamingStrategy.indexName(). */ - foreignKeyName?: string; - /** Enable/disable foreign key constraint creation on this relation */ - createForeignKeyConstraint?: boolean; -} -export interface ManyToManyOptions extends ReferenceOptions, PolymorphicOptions { - /** Set this side as owning. Owning side is where the foreign key is defined. This option is not required if you use `inversedBy` or `mappedBy` to distinguish owning and inverse side. */ - owner?: boolean; - /** Point to the inverse side property name. */ - inversedBy?: (string & keyof Target) | ((e: Target) => any); - /** Point to the owning side property name. */ - mappedBy?: (string & keyof Target) | ((e: Target) => any); - /** Condition for {@doclink collections#declarative-partial-loading | Declarative partial loading}. */ - where?: FilterQuery; - /** Set default ordering. */ - orderBy?: QueryOrderMap | QueryOrderMap[]; - /** Force stable insertion order of items in the collection (see {@doclink collections | Collections}). */ - fixedOrder?: boolean; - /** Override default order column name (`id`) for fixed ordering. */ - fixedOrderColumn?: string; - /** Override default name for pivot table (see {@doclink naming-strategy | Naming Strategy}). */ - pivotTable?: string; - /** Set pivot entity for this relation (see {@doclink collections#custom-pivot-table-entity | Custom pivot table entity}). */ - pivotEntity?: () => EntityName; - /** Override the default database column name on the owning side (see {@doclink naming-strategy | Naming Strategy}). This option is only for simple properties represented by a single column. */ - joinColumn?: string; - /** Override the default database column name on the owning side (see {@doclink naming-strategy | Naming Strategy}). This option is suitable for composite keys, where one property is represented by multiple columns. */ - joinColumns?: string[]; - /** Override the default database column name on the inverse side (see {@doclink naming-strategy | Naming Strategy}). This option is only for simple properties represented by a single column. */ - inverseJoinColumn?: string; - /** Override the default database column name on the inverse side (see {@doclink naming-strategy | Naming Strategy}). This option is suitable for composite keys, where one property is represented by multiple columns. */ - inverseJoinColumns?: string[]; - /** Override the default database column name on the target entity (see {@doclink naming-strategy | Naming Strategy}). This option is only for simple properties represented by a single column. */ - referenceColumnName?: string; - /** Override the default database column name on the target entity (see {@doclink naming-strategy | Naming Strategy}). This option is suitable for composite keys, where one property is represented by multiple columns. */ - referencedColumnNames?: string[]; - /** What to do when the target entity gets deleted. */ - deleteRule?: 'cascade' | 'no action' | 'set null' | 'set default' | AnyString; - /** What to do when the reference to the target entity gets updated. */ - updateRule?: 'cascade' | 'no action' | 'set null' | 'set default' | AnyString; - /** Enable/disable foreign key constraint creation on this relation */ - createForeignKeyConstraint?: boolean; -} -export interface EmbeddedOptions extends PropertyOptions { - entity?: () => EntityName | EntityName[]; - prefix?: string | boolean; - prefixMode?: EmbeddedPrefixMode; - object?: boolean; - array?: boolean; -} -export interface EmbeddableOptions { - /** Specify constructor parameters to be used in `em.create` or when `forceConstructor` is enabled. Those should be names of declared entity properties in the same order as your constructor uses them. The ORM tries to infer those automatically, use this option in case the inference fails. */ - constructorParams?: (Owner extends EntityClass ? keyof P : string)[]; - /** For polymorphic embeddables. Specify the property name that stores the discriminator value. Alias for `discriminatorColumn`. */ - discriminator?: (Owner extends EntityClass ? keyof P : string) | AnyString; - /** For polymorphic embeddables. @deprecated Use `discriminator` instead. */ - discriminatorColumn?: (Owner extends EntityClass ? keyof P : string) | AnyString; - discriminatorMap?: Dictionary; - discriminatorValue?: number | string; - abstract?: boolean; -} -export interface EnumOptions extends PropertyOptions { - items?: (number | string)[] | (() => Dictionary); - array?: boolean; - /** for postgres, by default it uses text column with check constraint */ - nativeEnumName?: string; -} -export interface PrimaryKeyOptions extends PropertyOptions {} -export interface SerializedPrimaryKeyOptions extends PropertyOptions { - type?: any; -} -type MaybeArray = T | T[]; -type Properties = MaybeArray>; -/** Options for column within an index, supporting advanced index features like prefix length and collation. */ -export interface IndexColumnOptions { - /** Column name or property path. */ - name: string; - /** Sort order for the column (default: ASC). */ - sort?: 'ASC' | 'DESC' | 'asc' | 'desc'; - /** NULLS ordering for the column (PostgreSQL). */ - nulls?: 'FIRST' | 'LAST' | 'first' | 'last'; - /** Prefix length for the column (MySQL, MariaDB). */ - length?: number; - /** Collation for the column (PostgreSQL, SQLite, or MySQL/MariaDB via expression). */ - collation?: string; -} -interface BaseOptions { - name?: string; - properties?: T extends EntityClass ? Properties : Properties; - options?: Dictionary; - expression?: string | (T extends EntityClass ? IndexCallback

: IndexCallback); - /** - * Advanced column options for the index. - * When specified, allows fine-grained control over each column in the index including - * sort order, nulls ordering, prefix length, and collation. - * If both `columns` and `properties` are specified, `columns` takes precedence for index creation. - */ - columns?: IndexColumnOptions[]; - /** - * Columns to include in the index but not as part of the key (PostgreSQL, MSSQL). - * These columns are stored in the leaf level of the index but not used for searching. - */ - include?: T extends EntityClass ? Properties : Properties; - /** Fill factor for the index as a percentage 0-100 (PostgreSQL, MSSQL). */ - fillFactor?: number; -} -export interface UniqueOptions extends BaseOptions { - deferMode?: DeferMode | `${DeferMode}`; - /** - * Whether the index is disabled (MSSQL only). - * A disabled index is not used for query planning and is not maintained on writes. - * It can be re-enabled later using `ALTER INDEX ... REBUILD`. - */ - disabled?: boolean; -} -export interface IndexOptions extends BaseOptions { - type?: string; - /** - * Whether the index is invisible/hidden from the query optimizer (MySQL 8+, MariaDB 10.6+, MongoDB). - * An invisible index is still maintained on writes but not used for query planning. - * Useful for testing the impact of removing an index before actually dropping it. - */ - invisible?: boolean; - /** - * Whether the index is disabled (MSSQL only). - * A disabled index is not used for query planning and is not maintained on writes. - * It can be re-enabled later using `ALTER INDEX ... REBUILD`. - */ - disabled?: boolean; - /** - * Whether the index should be clustered (MariaDB, MSSQL). - * A clustered index determines the physical order of data in the table. - * Only one clustered index can exist per table. - */ - clustered?: boolean; -} -export {}; diff --git a/node_modules/@mikro-orm/core/metadata/types.js b/node_modules/@mikro-orm/core/metadata/types.js deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/@mikro-orm/core/metadata/types.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/@mikro-orm/core/naming-strategy/AbstractNamingStrategy.d.ts b/node_modules/@mikro-orm/core/naming-strategy/AbstractNamingStrategy.d.ts deleted file mode 100644 index 8b0cbfc..0000000 --- a/node_modules/@mikro-orm/core/naming-strategy/AbstractNamingStrategy.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import type { NamingStrategy } from './NamingStrategy.js'; -import { type ReferenceKind } from '../enums.js'; -/** Base class for naming strategies, providing default implementations for common naming conventions. */ -export declare abstract class AbstractNamingStrategy implements NamingStrategy { - getClassName(file: string, separator?: string): string; - classToMigrationName(timestamp: string, customMigrationName?: string): string; - indexName( - tableName: string, - columns: string[], - type: 'primary' | 'foreign' | 'unique' | 'index' | 'sequence' | 'check' | 'default', - ): string; - /** - * @inheritDoc - */ - getEntityName(tableName: string, schemaName?: string): string; - columnNameToProperty(columnName: string): string; - /** - * @inheritDoc - */ - getEnumClassName(columnName: string, tableName: string | undefined, schemaName?: string): string; - /** - * @inheritDoc - */ - getEnumTypeName(columnName: string, tableName: string | undefined, schemaName?: string): string; - /** - * @inheritDoc - */ - enumValueToEnumProperty(enumValue: string, columnName: string, tableName: string, schemaName?: string): string; - aliasName(entityName: string, index: number): string; - /** - * @inheritDoc - */ - inverseSideName(entityName: string, propertyName: string, kind: ReferenceKind): string; - /** - * @inheritDoc - */ - manyToManyPropertyName( - ownerEntityName: string, - targetEntityName: string, - pivotTableName: string, - ownerTableName: string, - schemaName?: string, - ): string; - /** - * @inheritDoc - */ - discriminatorColumnName(baseName: string): string; - abstract classToTableName(entityName: string, tableName?: string): string; - abstract joinColumnName(propertyName: string): string; - abstract joinKeyColumnName( - entityName: string, - referencedColumnName?: string, - composite?: boolean, - tableName?: string, - ): string; - abstract joinTableName(sourceEntity: string, targetEntity: string, propertyName?: string, tableName?: string): string; - abstract propertyToColumnName(propertyName: string, object?: boolean): string; - abstract referenceColumnName(): string; -} diff --git a/node_modules/@mikro-orm/core/naming-strategy/AbstractNamingStrategy.js b/node_modules/@mikro-orm/core/naming-strategy/AbstractNamingStrategy.js deleted file mode 100644 index 0bc8a0d..0000000 --- a/node_modules/@mikro-orm/core/naming-strategy/AbstractNamingStrategy.js +++ /dev/null @@ -1,103 +0,0 @@ -import { PopulatePath } from '../enums.js'; -const populatePathMembers = Object.values(PopulatePath); -/** Base class for naming strategies, providing default implementations for common naming conventions. */ -export class AbstractNamingStrategy { - getClassName(file, separator = '-') { - const name = file.split('.')[0]; - const ret = name.replace(new RegExp(`(?:${separator})+(\\w)`, 'ug'), (_, p1) => p1.toUpperCase()); - return ret.charAt(0).toUpperCase() + ret.slice(1); - } - classToMigrationName(timestamp, customMigrationName) { - let migrationName = `Migration${timestamp}`; - if (customMigrationName) { - migrationName += `_${customMigrationName}`; - } - return migrationName; - } - indexName(tableName, columns, type) { - /* v8 ignore next */ - if (tableName.includes('.')) { - tableName = tableName.substring(tableName.indexOf('.') + 1); - } - if (type === 'primary') { - return `${tableName}_pkey`; - } - columns = columns.map(col => col.replace(/\./g, '_')); - if (type === 'sequence') { - return `${tableName}_${columns.join('_')}_seq`; - } - if (columns.length > 0) { - return `${tableName}_${columns.join('_')}_${type}`; - } - return `${tableName}_${type}`; - } - /** - * @inheritDoc - */ - getEntityName(tableName, schemaName) { - const name = /^[^$_\p{ID_Start}]/u.exec(tableName) ? `E_${tableName}` : tableName; - return this.getClassName( - name.replaceAll(/[^\u200C\u200D\p{ID_Continue}]+/gu, r => - r - .split('') - .map(c => `$${c.codePointAt(0)}`) - .join(''), - ), - '_', - ); - } - columnNameToProperty(columnName) { - const propName = columnName.replace(/[_\- ]+(\w)/gu, (_, p1) => p1.toUpperCase()); - if (populatePathMembers.includes(propName.replace(/^\${2,}/u, '$$').replace(/^\$\*$/u, '*'))) { - return `$${propName}`; - } - return propName; - } - /** - * @inheritDoc - */ - getEnumClassName(columnName, tableName, schemaName) { - return this.getEntityName(tableName ? `${tableName}_${columnName}` : columnName, schemaName); - } - /** - * @inheritDoc - */ - getEnumTypeName(columnName, tableName, schemaName) { - return 'T' + this.getEnumClassName(columnName, tableName, schemaName); - } - /** - * @inheritDoc - */ - enumValueToEnumProperty(enumValue, columnName, tableName, schemaName) { - return enumValue.toUpperCase(); - } - aliasName(entityName, index) { - // Take only the first letter of the prefix to keep character counts down since some engines have character limits - return entityName.charAt(0).toLowerCase() + index; - } - /** - * @inheritDoc - */ - inverseSideName(entityName, propertyName, kind) { - if (kind === 'm:n') { - return propertyName + 'Inverse'; - } - const suffix = kind === '1:m' && !entityName.endsWith('Collection') ? 'Collection' : ''; - if (entityName.length === 1) { - return entityName[0].toLowerCase() + suffix; - } - return entityName[0].toLowerCase() + entityName.substring(1) + suffix; - } - /** - * @inheritDoc - */ - manyToManyPropertyName(ownerEntityName, targetEntityName, pivotTableName, ownerTableName, schemaName) { - return this.columnNameToProperty(pivotTableName.replace(new RegExp('^' + ownerTableName + '_'), '')); - } - /** - * @inheritDoc - */ - discriminatorColumnName(baseName) { - return this.propertyToColumnName(baseName + 'Type'); - } -} diff --git a/node_modules/@mikro-orm/core/naming-strategy/EntityCaseNamingStrategy.d.ts b/node_modules/@mikro-orm/core/naming-strategy/EntityCaseNamingStrategy.d.ts deleted file mode 100644 index 0945209..0000000 --- a/node_modules/@mikro-orm/core/naming-strategy/EntityCaseNamingStrategy.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { AbstractNamingStrategy } from './AbstractNamingStrategy.js'; -/** - * This strategy keeps original entity/property names for table/column. - */ -export declare class EntityCaseNamingStrategy extends AbstractNamingStrategy { - classToTableName(entityName: string, tableName?: string): string; - joinColumnName(propertyName: string): string; - joinKeyColumnName(entityName: string, referencedColumnName?: string, composite?: boolean, tableName?: string): string; - joinTableName(sourceEntity: string, targetEntity: string, propertyName: string, tableName?: string): string; - propertyToColumnName(propertyName: string): string; - referenceColumnName(): string; -} diff --git a/node_modules/@mikro-orm/core/naming-strategy/EntityCaseNamingStrategy.js b/node_modules/@mikro-orm/core/naming-strategy/EntityCaseNamingStrategy.js deleted file mode 100644 index a7da40b..0000000 --- a/node_modules/@mikro-orm/core/naming-strategy/EntityCaseNamingStrategy.js +++ /dev/null @@ -1,29 +0,0 @@ -import { AbstractNamingStrategy } from './AbstractNamingStrategy.js'; -/** - * This strategy keeps original entity/property names for table/column. - */ -export class EntityCaseNamingStrategy extends AbstractNamingStrategy { - classToTableName(entityName, tableName) { - return tableName ?? entityName; - } - joinColumnName(propertyName) { - return propertyName; - } - joinKeyColumnName(entityName, referencedColumnName, composite, tableName) { - entityName = this.classToTableName(entityName, tableName); - const name = entityName.substring(0, 1).toLowerCase() + entityName.substring(1); - if (composite && referencedColumnName) { - return name + '_' + referencedColumnName; - } - return name; - } - joinTableName(sourceEntity, targetEntity, propertyName, tableName) { - return this.classToTableName(sourceEntity, tableName) + '_' + this.propertyToColumnName(propertyName); - } - propertyToColumnName(propertyName) { - return propertyName; - } - referenceColumnName() { - return 'id'; - } -} diff --git a/node_modules/@mikro-orm/core/naming-strategy/MongoNamingStrategy.d.ts b/node_modules/@mikro-orm/core/naming-strategy/MongoNamingStrategy.d.ts deleted file mode 100644 index ac71fda..0000000 --- a/node_modules/@mikro-orm/core/naming-strategy/MongoNamingStrategy.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { AbstractNamingStrategy } from './AbstractNamingStrategy.js'; -/** Naming strategy for MongoDB that uses camelCase property names and hyphenated collection names. */ -export declare class MongoNamingStrategy extends AbstractNamingStrategy { - classToTableName(entityName: string, tableName?: string): string; - joinColumnName(propertyName: string): string; - joinKeyColumnName(entityName: string, referencedColumnName?: string, composite?: boolean, tableName?: string): string; - joinTableName(sourceEntity: string, targetEntity: string, propertyName: string, tableName?: string): string; - propertyToColumnName(propertyName: string): string; - referenceColumnName(): string; -} diff --git a/node_modules/@mikro-orm/core/naming-strategy/MongoNamingStrategy.js b/node_modules/@mikro-orm/core/naming-strategy/MongoNamingStrategy.js deleted file mode 100644 index 522abd0..0000000 --- a/node_modules/@mikro-orm/core/naming-strategy/MongoNamingStrategy.js +++ /dev/null @@ -1,22 +0,0 @@ -import { AbstractNamingStrategy } from './AbstractNamingStrategy.js'; -/** Naming strategy for MongoDB that uses camelCase property names and hyphenated collection names. */ -export class MongoNamingStrategy extends AbstractNamingStrategy { - classToTableName(entityName, tableName) { - return tableName ?? entityName.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); - } - joinColumnName(propertyName) { - return propertyName; - } - joinKeyColumnName(entityName, referencedColumnName, composite, tableName) { - return tableName ?? entityName; - } - joinTableName(sourceEntity, targetEntity, propertyName, tableName) { - return this.classToTableName(sourceEntity, tableName) + '_' + this.propertyToColumnName(propertyName); - } - propertyToColumnName(propertyName) { - return propertyName; - } - referenceColumnName() { - return '_id'; - } -} diff --git a/node_modules/@mikro-orm/core/naming-strategy/NamingStrategy.d.ts b/node_modules/@mikro-orm/core/naming-strategy/NamingStrategy.d.ts deleted file mode 100644 index 67b667f..0000000 --- a/node_modules/@mikro-orm/core/naming-strategy/NamingStrategy.d.ts +++ /dev/null @@ -1,112 +0,0 @@ -import type { ReferenceKind } from '../enums.js'; -export interface NamingStrategy { - /** - * Return a name of the class based on its file name - */ - getClassName(file: string, separator?: string): string; - /** - * Return a table name for an entity class - */ - classToTableName(entityName: string, tableName?: string): string; - /** - * Return a migration name. This name should allow ordering. - */ - classToMigrationName(timestamp: string, customMigrationName?: string): string; - /** - * Return a column name for a property - */ - propertyToColumnName(propertyName: string, object?: boolean): string; - /** - * Get an enum class name. - * - * @param columnName The column name which has the enum. - * @param tableName The table name of the column. - * @param schemaName The schema name of the column. - * - * @return A new class name that will be used for the enum. - */ - getEnumClassName(columnName: string, tableName: string | undefined, schemaName?: string): string; - /** - * Get an enum type name. Used with `enumType: 'dictionary'` and `enumType: 'union-type'` entity generator option. - * - * @param columnName The column name which has the enum. - * @param tableName The table name of the column. - * @param schemaName The schema name of the column. - * - * @return A new type name that will be used for the enum. - */ - getEnumTypeName(columnName: string, tableName: string | undefined, schemaName?: string): string; - /** - * Get an enum option name for a given enum value. - * - * @param enumValue The enum value to generate a name for. - * @param columnName The column name which has the enum. - * @param tableName The table name of the column. - * @param schemaName The schema name of the column. - * - * @return The name of the enum property that will hold the value. - */ - enumValueToEnumProperty(enumValue: string, columnName: string, tableName: string, schemaName?: string): string; - /** - * Return a name of the entity class based on database table name (used in `EntityGenerator`). - * Default implementation ignores the schema name. - */ - getEntityName(tableName: string, schemaName?: string): string; - /** - * Return a property for a column name (used in `EntityGenerator`). - */ - columnNameToProperty(columnName: string): string; - /** - * Return the default reference column name - */ - referenceColumnName(): string; - /** - * Return a join column name for a property - */ - joinColumnName(propertyName: string): string; - /** - * Return a join table name - */ - joinTableName(sourceEntity: string, targetEntity: string, propertyName: string, tableName?: string): string; - /** - * Return the foreign key column name for the given parameters - */ - joinKeyColumnName(entityName: string, referencedColumnName?: string, composite?: boolean, tableName?: string): string; - /** - * Returns key/constraint name for the given type. Some drivers might not support all the types (e.g. mysql and sqlite enforce the PK name). - */ - indexName( - tableName: string, - columns: string[], - type: 'primary' | 'foreign' | 'unique' | 'index' | 'sequence' | 'check' | 'default', - ): string; - /** - * Returns alias name for given entity. The alias needs to be unique across the query, which is by default - * ensured via appended index parameter. It is optional to use it as long as you ensure it will be unique. - */ - aliasName(entityName: string, index: number): string; - /** - * Returns the name of the inverse side property. Used in the `EntityGenerator` with `bidirectionalRelations` option. - */ - inverseSideName(entityName: string, propertyName: string, kind: ReferenceKind): string; - /** - * Return a property name for a many-to-many relation (used in `EntityGenerator`). - * - * @param ownerEntityName - The owner entity class name - * @param targetEntityName - The target entity class name - * @param pivotTableName - The pivot table name - * @param ownerTableName - The owner table name - * @param schemaName - The schema name (if any) - */ - manyToManyPropertyName( - ownerEntityName: string, - targetEntityName: string, - pivotTableName: string, - ownerTableName: string, - schemaName?: string, - ): string; - /** - * Returns the discriminator column name for polymorphic relations. - */ - discriminatorColumnName(baseName: string): string; -} diff --git a/node_modules/@mikro-orm/core/naming-strategy/NamingStrategy.js b/node_modules/@mikro-orm/core/naming-strategy/NamingStrategy.js deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/@mikro-orm/core/naming-strategy/NamingStrategy.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/@mikro-orm/core/naming-strategy/UnderscoreNamingStrategy.d.ts b/node_modules/@mikro-orm/core/naming-strategy/UnderscoreNamingStrategy.d.ts deleted file mode 100644 index 5b2ac83..0000000 --- a/node_modules/@mikro-orm/core/naming-strategy/UnderscoreNamingStrategy.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { AbstractNamingStrategy } from './AbstractNamingStrategy.js'; -/** Naming strategy that converts camelCase names to snake_case for table and column names. */ -export declare class UnderscoreNamingStrategy extends AbstractNamingStrategy { - classToTableName(entityName: string, tableName?: string): string; - joinColumnName(propertyName: string): string; - joinKeyColumnName(entityName: string, referencedColumnName?: string, composite?: boolean, tableName?: string): string; - joinTableName(sourceEntity: string, targetEntity: string, propertyName: string, tableName?: string): string; - propertyToColumnName(propertyName: string, object?: boolean): string; - referenceColumnName(): string; - private underscore; -} diff --git a/node_modules/@mikro-orm/core/naming-strategy/UnderscoreNamingStrategy.js b/node_modules/@mikro-orm/core/naming-strategy/UnderscoreNamingStrategy.js deleted file mode 100644 index 601b551..0000000 --- a/node_modules/@mikro-orm/core/naming-strategy/UnderscoreNamingStrategy.js +++ /dev/null @@ -1,25 +0,0 @@ -import { AbstractNamingStrategy } from './AbstractNamingStrategy.js'; -/** Naming strategy that converts camelCase names to snake_case for table and column names. */ -export class UnderscoreNamingStrategy extends AbstractNamingStrategy { - classToTableName(entityName, tableName) { - return tableName ?? this.underscore(entityName); - } - joinColumnName(propertyName) { - return this.underscore(propertyName) + '_' + this.referenceColumnName(); - } - joinKeyColumnName(entityName, referencedColumnName, composite, tableName) { - return this.classToTableName(entityName, tableName) + '_' + (referencedColumnName || this.referenceColumnName()); - } - joinTableName(sourceEntity, targetEntity, propertyName, tableName) { - return this.classToTableName(sourceEntity, tableName) + '_' + this.classToTableName(propertyName); - } - propertyToColumnName(propertyName, object) { - return this.underscore(propertyName); - } - referenceColumnName() { - return 'id'; - } - underscore(name) { - return name.replace(/([a-z])([A-Z])/g, '$1_$2').toLowerCase(); - } -} diff --git a/node_modules/@mikro-orm/core/naming-strategy/index.d.ts b/node_modules/@mikro-orm/core/naming-strategy/index.d.ts deleted file mode 100644 index e23c15b..0000000 --- a/node_modules/@mikro-orm/core/naming-strategy/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export type * from './NamingStrategy.js'; -export * from './AbstractNamingStrategy.js'; -export * from './MongoNamingStrategy.js'; -export * from './UnderscoreNamingStrategy.js'; -export * from './EntityCaseNamingStrategy.js'; diff --git a/node_modules/@mikro-orm/core/naming-strategy/index.js b/node_modules/@mikro-orm/core/naming-strategy/index.js deleted file mode 100644 index 9045193..0000000 --- a/node_modules/@mikro-orm/core/naming-strategy/index.js +++ /dev/null @@ -1,4 +0,0 @@ -export * from './AbstractNamingStrategy.js'; -export * from './MongoNamingStrategy.js'; -export * from './UnderscoreNamingStrategy.js'; -export * from './EntityCaseNamingStrategy.js'; diff --git a/node_modules/@mikro-orm/core/not-supported.d.ts b/node_modules/@mikro-orm/core/not-supported.d.ts deleted file mode 100644 index 7e78d43..0000000 --- a/node_modules/@mikro-orm/core/not-supported.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare function discoverEntities(): void; -export declare const fs: {}; diff --git a/node_modules/@mikro-orm/core/not-supported.js b/node_modules/@mikro-orm/core/not-supported.js deleted file mode 100644 index 1ba2095..0000000 --- a/node_modules/@mikro-orm/core/not-supported.js +++ /dev/null @@ -1,11 +0,0 @@ -export function discoverEntities() { - throw new Error('Folder-based discovery is not supported in this environment.'); -} -export const fs = new Proxy( - {}, - { - get: () => { - throw new Error('File system is not supported in this environment.'); - }, - }, -); diff --git a/node_modules/@mikro-orm/core/package.json b/node_modules/@mikro-orm/core/package.json deleted file mode 100644 index 1fd7f9a..0000000 --- a/node_modules/@mikro-orm/core/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "@mikro-orm/core", - "version": "7.0.2", - "description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.", - "keywords": [ - "data-mapper", - "ddd", - "entity", - "identity-map", - "javascript", - "js", - "mariadb", - "mikro-orm", - "mongo", - "mongodb", - "mysql", - "orm", - "postgresql", - "sqlite", - "sqlite3", - "ts", - "typescript", - "unit-of-work" - ], - "homepage": "https://mikro-orm.io", - "bugs": { - "url": "https://github.com/mikro-orm/mikro-orm/issues" - }, - "license": "MIT", - "author": "Martin Adámek", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/mikro-orm/mikro-orm.git" - }, - "funding": "https://github.com/sponsors/b4nan", - "type": "module", - "exports": { - "./package.json": "./package.json", - ".": "./index.js", - "./file-discovery": { - "node": "./metadata/discover-entities.js", - "browser": "./not-supported.js" - }, - "./fs-utils": { - "node": "./utils/fs-utils.js", - "browser": "./not-supported.js" - }, - "./migrations": "./utils/AbstractMigrator.js", - "./schema": "./utils/AbstractSchemaGenerator.js", - "./dataloader": "./utils/DataloaderUtils.js" - }, - "publishConfig": { - "access": "public" - }, - "scripts": { - "build": "yarn compile && yarn copy", - "clean": "yarn run -T rimraf ./dist", - "compile": "yarn run -T tsc -p tsconfig.build.json", - "copy": "node ../../scripts/copy.mjs" - }, - "peerDependencies": { - "dataloader": "2.2.3" - }, - "peerDependenciesMeta": { - "dataloader": { - "optional": true - } - }, - "engines": { - "node": ">= 22.17.0" - } -} diff --git a/node_modules/@mikro-orm/core/platforms/ExceptionConverter.d.ts b/node_modules/@mikro-orm/core/platforms/ExceptionConverter.d.ts deleted file mode 100644 index 5cd0547..0000000 --- a/node_modules/@mikro-orm/core/platforms/ExceptionConverter.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { Dictionary } from '../typings.js'; -import { DriverException } from '../exceptions.js'; -/** Converts native database errors into standardized DriverException instances. */ -export declare class ExceptionConverter { - convertException(exception: Error & Dictionary): DriverException; -} diff --git a/node_modules/@mikro-orm/core/platforms/ExceptionConverter.js b/node_modules/@mikro-orm/core/platforms/ExceptionConverter.js deleted file mode 100644 index bbf5028..0000000 --- a/node_modules/@mikro-orm/core/platforms/ExceptionConverter.js +++ /dev/null @@ -1,8 +0,0 @@ -import { DriverException } from '../exceptions.js'; -/** Converts native database errors into standardized DriverException instances. */ -export class ExceptionConverter { - /* v8 ignore next */ - convertException(exception) { - return new DriverException(exception); - } -} diff --git a/node_modules/@mikro-orm/core/platforms/Platform.d.ts b/node_modules/@mikro-orm/core/platforms/Platform.d.ts deleted file mode 100644 index e40e15f..0000000 --- a/node_modules/@mikro-orm/core/platforms/Platform.d.ts +++ /dev/null @@ -1,324 +0,0 @@ -import { EntityRepository } from '../entity/EntityRepository.js'; -import { type NamingStrategy } from '../naming-strategy/NamingStrategy.js'; -import type { - Constructor, - EntityMetadata, - EntityProperty, - IPrimaryKey, - ISchemaGenerator, - PopulateOptions, - Primary, - SimpleColumnMeta, - FilterQuery, - EntityValue, - EntityKey, -} from '../typings.js'; -import { ExceptionConverter } from './ExceptionConverter.js'; -import type { EntityManager } from '../EntityManager.js'; -import type { Configuration } from '../utils/Configuration.js'; -import type { IDatabaseDriver } from '../drivers/IDatabaseDriver.js'; -import { Type } from '../types/index.js'; -import type { MikroORM } from '../MikroORM.js'; -import type { TransformContext } from '../types/Type.js'; -import { Raw } from '../utils/RawQueryFragment.js'; -/** Symbol used to tag cloned embeddable data for JSON serialization handling. */ -export declare const JsonProperty: unique symbol; -/** Abstract base class providing database-specific behavior and SQL dialect differences. */ -export declare abstract class Platform { - protected readonly exceptionConverter: ExceptionConverter; - protected config: Configuration; - protected namingStrategy: NamingStrategy; - protected timezone?: string; - /** Whether this driver uses pivot tables for M:N relations (SQL drivers do, MongoDB does not). */ - usesPivotTable(): boolean; - /** Whether this driver supports database transactions. */ - supportsTransactions(): boolean; - /** Whether the driver wraps operations in implicit transactions by default. */ - usesImplicitTransactions(): boolean; - /** Returns the default naming strategy constructor for this platform. */ - getNamingStrategy(): { - new (): NamingStrategy; - }; - /** Whether the driver supports RETURNING clause (e.g. PostgreSQL). */ - usesReturningStatement(): boolean; - /** Whether the driver supports OUTPUT clause (e.g. MSSQL). */ - usesOutputStatement(): boolean; - /** Whether DELETE statements require explicit CASCADE keyword. */ - usesCascadeStatement(): boolean; - /** for postgres native enums */ - supportsNativeEnums(): boolean; - /** for postgres text enums (default) */ - usesEnumCheckConstraints(): boolean; - /** Whether this platform supports materialized views. */ - supportsMaterializedViews(): boolean; - /** Returns the schema helper instance for this platform, or undefined if not supported. */ - getSchemaHelper(): unknown; - /** Whether the platform automatically creates indexes on foreign key columns. */ - indexForeignKeys(): boolean; - /** - * Whether or not the driver supports retuning list of created PKs back when multi-inserting - */ - usesBatchInserts(): boolean; - /** - * Whether or not the driver supports updating many records at once - */ - usesBatchUpdates(): boolean; - /** Whether the platform supports the DEFAULT keyword in INSERT statements. */ - usesDefaultKeyword(): boolean; - /** - * Normalizes primary key wrapper to scalar value (e.g. mongodb's ObjectId to string) - */ - normalizePrimaryKey(data: Primary | IPrimaryKey): T; - /** - * Converts scalar primary key representation to native driver wrapper (e.g. string to mongodb's ObjectId) - */ - denormalizePrimaryKey(data: IPrimaryKey): IPrimaryKey; - /** - * Returns the SQL specific for the platform to get the current timestamp - */ - getCurrentTimestampSQL(length?: number): string; - /** Returns the SQL type declaration for datetime columns. */ - getDateTimeTypeDeclarationSQL(column: { length?: number }): string; - /** Returns the default fractional seconds precision for datetime columns. */ - getDefaultDateTimeLength(): number; - /** Returns the default length for varchar columns. */ - getDefaultVarcharLength(): number; - /** Returns the default length for char columns. */ - getDefaultCharLength(): number; - /** Returns the SQL type declaration for date columns. */ - getDateTypeDeclarationSQL(length?: number): string; - /** Returns the SQL type declaration for time columns. */ - getTimeTypeDeclarationSQL(length?: number): string; - /** Returns the SQL operator used for regular expression matching. */ - getRegExpOperator(val?: unknown, flags?: string): string; - /** Builds the SQL clause and parameters for a regular expression condition. */ - mapRegExpCondition( - mappedKey: string, - value: { - $re: string; - $flags?: string; - }, - ): { - sql: string; - params: unknown[]; - }; - /** Converts a JavaScript RegExp into a platform-specific regex representation. */ - getRegExpValue(val: RegExp): { - $re: string; - $flags?: string; - }; - /** Whether the given operator is allowed at the top level of a query condition. */ - isAllowedTopLevelOperator(operator: string): boolean; - /** Converts a version field value for comparison in optimistic locking queries. */ - convertVersionValue( - value: Date | number, - prop: EntityProperty, - ): - | Date - | string - | number - | { - $in: (string | number)[]; - }; - /** Returns the default fractional seconds precision for version timestamp columns. */ - getDefaultVersionLength(): number; - /** Whether the platform supports tuple comparison in WHERE clauses. */ - allowsComparingTuples(): boolean; - /** Whether the given property maps to a bigint database column. */ - isBigIntProperty(prop: EntityProperty): boolean; - /** Returns the default schema name for this platform (e.g. "public" for PostgreSQL). */ - getDefaultSchemaName(): string | undefined; - /** Returns the SQL type declaration for boolean columns. */ - getBooleanTypeDeclarationSQL(): string; - /** Returns the SQL type declaration for integer columns. */ - getIntegerTypeDeclarationSQL(column: { length?: number; unsigned?: boolean; autoincrement?: boolean }): string; - getSmallIntTypeDeclarationSQL(column: { length?: number; unsigned?: boolean; autoincrement?: boolean }): string; - getMediumIntTypeDeclarationSQL(column: { length?: number; unsigned?: boolean; autoincrement?: boolean }): string; - getTinyIntTypeDeclarationSQL(column: { length?: number; unsigned?: boolean; autoincrement?: boolean }): string; - getBigIntTypeDeclarationSQL(column: { length?: number; unsigned?: boolean; autoincrement?: boolean }): string; - getCharTypeDeclarationSQL(column: { length?: number }): string; - getVarcharTypeDeclarationSQL(column: { length?: number }): string; - getIntervalTypeDeclarationSQL(column: { length?: number }): string; - getTextTypeDeclarationSQL(_column: { length?: number }): string; - getEnumTypeDeclarationSQL(column: { - items?: unknown[]; - fieldNames: string[]; - length?: number; - unsigned?: boolean; - autoincrement?: boolean; - }): string; - getFloatDeclarationSQL(): string; - getDoubleDeclarationSQL(): string; - getDecimalTypeDeclarationSQL(column: { precision?: number; scale?: number }): string; - getUuidTypeDeclarationSQL(column: { length?: number }): string; - /** Extracts the base type name from a full SQL type declaration (e.g. "varchar(255)" -> "varchar"). */ - extractSimpleType(type: string): string; - /** - * This should be used only to compare types, it can strip some information like the length. - */ - normalizeColumnType( - type: string, - options: { - length?: number; - precision?: number; - scale?: number; - }, - ): string; - /** Returns the mapped Type instance for a given SQL/runtime type string. */ - getMappedType(type: string): Type; - /** Returns the default mapped Type for a given type string when no custom mapping is configured. */ - getDefaultMappedType(type: string): Type; - /** Whether the platform supports multiple cascade paths to the same table. */ - supportsMultipleCascadePaths(): boolean; - /** - * Returns true if the platform supports ON UPDATE foreign key rules. - * Oracle doesn't support ON UPDATE rules. - */ - supportsOnUpdate(): boolean; - /** Whether the connection supports executing multiple SQL statements in a single call. */ - supportsMultipleStatements(): boolean; - /** Whether the platform supports the UNION WHERE optimization for multi-branch queries. */ - supportsUnionWhere(): boolean; - /** Returns the SQL type declaration used for array storage. */ - getArrayDeclarationSQL(): string; - /** Serializes a string array into its database storage format. */ - marshallArray(values: string[]): string; - /** Deserializes a database-stored array string back into a string array. */ - unmarshallArray(value: string): string[]; - getBlobDeclarationSQL(): string; - getJsonDeclarationSQL(): string; - getSearchJsonPropertySQL(path: string, type: string, aliased: boolean): string | Raw; - getSearchJsonPropertyKey(path: string[], type: string, aliased: boolean, value?: unknown): string | Raw; - processJsonCondition( - o: FilterQuery, - value: EntityValue, - path: EntityKey[], - alias: boolean, - ): FilterQuery; - protected getJsonValueType(value: unknown): string; - getJsonIndexDefinition(index: { columnNames: string[] }): string[]; - getFullTextWhereClause(prop: EntityProperty): string; - supportsCreatingFullTextIndex(): boolean; - getFullTextIndexExpression( - indexName: string, - schemaName: string | undefined, - tableName: string, - columns: SimpleColumnMeta[], - ): string; - /** Whether the driver automatically parses JSON columns into JS objects. */ - convertsJsonAutomatically(): boolean; - /** Converts a JS value to its JSON database representation (typically JSON.stringify). */ - convertJsonToDatabaseValue(value: unknown, context?: TransformContext): unknown; - /** Converts a database JSON value to its JS representation. */ - convertJsonToJSValue(value: unknown, context?: TransformContext): unknown; - convertDateToJSValue(value: string | Date): string; - convertIntervalToJSValue(value: string): unknown; - convertIntervalToDatabaseValue(value: unknown): unknown; - usesAsKeyword(): boolean; - /** - * Determines how UUID values are compared in the change set tracking. - * Return `'string'` for inline string comparison (fast), or `'any'` for deep comparison via type methods. - */ - compareUuids(): string; - convertUuidToJSValue(value: unknown): unknown; - convertUuidToDatabaseValue(value: unknown): unknown; - /** Parses a string or numeric value into a Date object. */ - parseDate(value: string | number): Date; - /** Returns the default EntityRepository class used by this platform. */ - getRepositoryClass(): Constructor>; - /** Returns the default character set for this platform. */ - getDefaultCharset(): string; - /** Returns the exception converter for translating native errors to driver exceptions. */ - getExceptionConverter(): ExceptionConverter; - /** - * Allows registering extensions of the driver automatically (e.g. `SchemaGenerator` extension in SQL drivers). - */ - lookupExtensions(orm: MikroORM): void; - /** @internal */ - init(orm: MikroORM): void; - /** Retrieves a registered extension (e.g. SchemaGenerator, Migrator), throwing if not found. */ - getExtension(extensionName: string, extensionKey: string, moduleName: string, em: EntityManager): T; - getSchemaGenerator(driver: IDatabaseDriver, em?: EntityManager): ISchemaGenerator; - /** Processes a date value before persisting, applying timezone or format conversions. */ - processDateProperty(value: unknown): string | number | Date; - /** Wraps a table or column identifier with the platform-specific quote character. */ - quoteIdentifier( - id: - | string - | { - toString: () => string; - }, - quote?: string, - ): string; - /** Quotes a literal value for safe embedding in SQL. */ - quoteValue(value: any): string; - escape(value: any): string; - /** Replaces `?` placeholders in SQL with quoted parameter values. */ - formatQuery(sql: string, params: readonly any[]): string; - /** Deep-clones embeddable data and tags it for JSON serialization. */ - cloneEmbeddable(data: T): T; - /** Initializes the platform with the ORM configuration. */ - setConfig(config: Configuration): void; - /** Returns the current ORM configuration. */ - getConfig(): Configuration; - /** Returns the configured timezone, or undefined if not set. */ - getTimezone(): string | undefined; - /** Whether the given property represents a numeric database column. */ - isNumericProperty(prop: EntityProperty, ignoreCustomType?: boolean): boolean; - /** Whether the given mapped type represents a numeric column. */ - isNumericColumn(mappedType: Type): boolean; - /** Whether the platform supports unsigned integer columns. */ - supportsUnsigned(): boolean; - /** - * Returns the default name of index for the given columns - */ - getIndexName( - tableName: string, - columns: string[], - type: 'index' | 'unique' | 'foreign' | 'primary' | 'sequence', - ): string; - /** Returns the default primary key constraint name. */ - getDefaultPrimaryName(tableName: string, columns: string[]): string; - /** Whether the platform supports custom names for primary key constraints. */ - supportsCustomPrimaryKeyNames(): boolean; - /** Whether the given property key is included in the populate hint. */ - isPopulated(key: string, populate: readonly PopulateOptions[] | boolean): boolean; - /** Whether the given property should be included as a column in the SELECT query. */ - shouldHaveColumn( - prop: EntityProperty, - populate: readonly PopulateOptions[] | boolean, - exclude?: string[], - includeFormulas?: boolean, - ignoreInlineEmbeddables?: boolean, - ): boolean; - /** - * Currently not supported due to how knex does complex sqlite diffing (always based on current schema) - */ - /** Whether the platform supports generating down migrations. */ - supportsDownMigrations(): boolean; - /** Whether the platform supports deferred unique constraints. */ - supportsDeferredUniqueConstraints(): boolean; - /** Platform-specific validation of entity metadata. */ - validateMetadata(meta: EntityMetadata): void; - /** - * Generates a custom order by statement given a set of in order values, eg. - * ORDER BY (CASE WHEN priority = 'low' THEN 1 WHEN priority = 'medium' THEN 2 ELSE NULL END) - */ - generateCustomOrder(escapedColumn: string, values: unknown[]): void; - /** - * Returns default client url for given driver (e.g. mongodb://127.0.0.1:27017 for mongodb) - */ - getDefaultClientUrl(): string; - /** - * @internal - */ - castColumn(prop?: { columnTypes?: string[] }): string; - /** - * @internal - */ - castJsonValue(prop?: { columnTypes?: string[] }): string; - /** - * @internal - */ - clone(): this; -} diff --git a/node_modules/@mikro-orm/core/platforms/Platform.js b/node_modules/@mikro-orm/core/platforms/Platform.js deleted file mode 100644 index a24438b..0000000 --- a/node_modules/@mikro-orm/core/platforms/Platform.js +++ /dev/null @@ -1,674 +0,0 @@ -import { clone } from '../utils/clone.js'; -import { EntityRepository } from '../entity/EntityRepository.js'; -import { UnderscoreNamingStrategy } from '../naming-strategy/UnderscoreNamingStrategy.js'; -import { ExceptionConverter } from './ExceptionConverter.js'; -import { - ArrayType, - BigIntType, - BlobType, - BooleanType, - CharacterType, - DateTimeType, - DateType, - DecimalType, - DoubleType, - EnumType, - FloatType, - IntegerType, - IntervalType, - JsonType, - MediumIntType, - SmallIntType, - StringType, - TextType, - TimeType, - TinyIntType, - Type, - Uint8ArrayType, - UnknownType, - UuidType, -} from '../types/index.js'; -import { parseJsonSafe, Utils } from '../utils/Utils.js'; -import { ReferenceKind } from '../enums.js'; -import { Raw } from '../utils/RawQueryFragment.js'; -/** Symbol used to tag cloned embeddable data for JSON serialization handling. */ -export const JsonProperty = Symbol('JsonProperty'); -/** Abstract base class providing database-specific behavior and SQL dialect differences. */ -export class Platform { - exceptionConverter = new ExceptionConverter(); - config; - namingStrategy; - timezone; - /** Whether this driver uses pivot tables for M:N relations (SQL drivers do, MongoDB does not). */ - usesPivotTable() { - return false; - } - /** Whether this driver supports database transactions. */ - supportsTransactions() { - return !this.config.get('disableTransactions'); - } - /** Whether the driver wraps operations in implicit transactions by default. */ - usesImplicitTransactions() { - return true; - } - /** Returns the default naming strategy constructor for this platform. */ - getNamingStrategy() { - return UnderscoreNamingStrategy; - } - /** Whether the driver supports RETURNING clause (e.g. PostgreSQL). */ - usesReturningStatement() { - return false; - } - /** Whether the driver supports OUTPUT clause (e.g. MSSQL). */ - usesOutputStatement() { - return false; - } - /** Whether DELETE statements require explicit CASCADE keyword. */ - usesCascadeStatement() { - return false; - } - /** for postgres native enums */ - supportsNativeEnums() { - return false; - } - /** for postgres text enums (default) */ - usesEnumCheckConstraints() { - return false; - } - /** Whether this platform supports materialized views. */ - supportsMaterializedViews() { - return false; - } - /** Returns the schema helper instance for this platform, or undefined if not supported. */ - getSchemaHelper() { - return undefined; - } - /** Whether the platform automatically creates indexes on foreign key columns. */ - indexForeignKeys() { - return false; - } - /** - * Whether or not the driver supports retuning list of created PKs back when multi-inserting - */ - usesBatchInserts() { - return true; - } - /** - * Whether or not the driver supports updating many records at once - */ - usesBatchUpdates() { - return true; - } - /** Whether the platform supports the DEFAULT keyword in INSERT statements. */ - usesDefaultKeyword() { - return true; - } - /** - * Normalizes primary key wrapper to scalar value (e.g. mongodb's ObjectId to string) - */ - normalizePrimaryKey(data) { - return data; - } - /** - * Converts scalar primary key representation to native driver wrapper (e.g. string to mongodb's ObjectId) - */ - denormalizePrimaryKey(data) { - return data; - } - /** - * Returns the SQL specific for the platform to get the current timestamp - */ - getCurrentTimestampSQL(length) { - return 'current_timestamp' + (length ? `(${length})` : ''); - } - /** Returns the SQL type declaration for datetime columns. */ - getDateTimeTypeDeclarationSQL(column) { - return 'datetime' + (column.length ? `(${column.length})` : ''); - } - /** Returns the default fractional seconds precision for datetime columns. */ - getDefaultDateTimeLength() { - return 0; - } - /** Returns the default length for varchar columns. */ - getDefaultVarcharLength() { - return 255; - } - /** Returns the default length for char columns. */ - getDefaultCharLength() { - return 1; - } - /** Returns the SQL type declaration for date columns. */ - getDateTypeDeclarationSQL(length) { - return 'date' + (length ? `(${length})` : ''); - } - /** Returns the SQL type declaration for time columns. */ - getTimeTypeDeclarationSQL(length) { - return 'time' + (length ? `(${length})` : ''); - } - /** Returns the SQL operator used for regular expression matching. */ - getRegExpOperator(val, flags) { - return 'regexp'; - } - /** Builds the SQL clause and parameters for a regular expression condition. */ - mapRegExpCondition(mappedKey, value) { - const operator = this.getRegExpOperator(value.$re, value.$flags); - const quotedKey = this.quoteIdentifier(mappedKey); - return { sql: `${quotedKey} ${operator} ?`, params: [value.$re] }; - } - /** Converts a JavaScript RegExp into a platform-specific regex representation. */ - getRegExpValue(val) { - if (val.flags.includes('i')) { - return { $re: `(?i)${val.source}` }; - } - return { $re: val.source }; - } - /** Whether the given operator is allowed at the top level of a query condition. */ - isAllowedTopLevelOperator(operator) { - return operator === '$not'; - } - /** Converts a version field value for comparison in optimistic locking queries. */ - convertVersionValue(value, prop) { - return value; - } - /** Returns the default fractional seconds precision for version timestamp columns. */ - getDefaultVersionLength() { - return 3; - } - /** Whether the platform supports tuple comparison in WHERE clauses. */ - allowsComparingTuples() { - return true; - } - /** Whether the given property maps to a bigint database column. */ - isBigIntProperty(prop) { - return prop.columnTypes?.[0] === 'bigint'; - } - /** Returns the default schema name for this platform (e.g. "public" for PostgreSQL). */ - getDefaultSchemaName() { - return undefined; - } - /** Returns the SQL type declaration for boolean columns. */ - getBooleanTypeDeclarationSQL() { - return 'boolean'; - } - /** Returns the SQL type declaration for integer columns. */ - getIntegerTypeDeclarationSQL(column) { - return 'int'; - } - getSmallIntTypeDeclarationSQL(column) { - return 'smallint'; - } - getMediumIntTypeDeclarationSQL(column) { - return 'mediumint'; - } - getTinyIntTypeDeclarationSQL(column) { - return 'tinyint'; - } - getBigIntTypeDeclarationSQL(column) { - return 'bigint'; - } - getCharTypeDeclarationSQL(column) { - return `char(${column.length ?? this.getDefaultCharLength()})`; - } - getVarcharTypeDeclarationSQL(column) { - return `varchar(${column.length ?? this.getDefaultVarcharLength()})`; - } - getIntervalTypeDeclarationSQL(column) { - return 'interval' + (column.length ? `(${column.length})` : ''); - } - getTextTypeDeclarationSQL(_column) { - return 'text'; - } - getEnumTypeDeclarationSQL(column) { - if (column.items?.every(item => typeof item === 'string')) { - return `enum('${column.items.join("','")}')`; - } - return this.getTinyIntTypeDeclarationSQL(column); - } - getFloatDeclarationSQL() { - return 'float'; - } - getDoubleDeclarationSQL() { - return 'double'; - } - getDecimalTypeDeclarationSQL(column) { - const precision = column.precision ?? 10; - const scale = column.scale ?? 0; - return `numeric(${precision},${scale})`; - } - getUuidTypeDeclarationSQL(column) { - column.length ??= 36; - return this.getVarcharTypeDeclarationSQL(column); - } - /** Extracts the base type name from a full SQL type declaration (e.g. "varchar(255)" -> "varchar"). */ - extractSimpleType(type) { - return /[^(), ]+/.exec(type.toLowerCase())[0]; - } - /** - * This should be used only to compare types, it can strip some information like the length. - */ - normalizeColumnType(type, options) { - return type.toLowerCase(); - } - /** Returns the mapped Type instance for a given SQL/runtime type string. */ - getMappedType(type) { - const mappedType = this.config.get('discovery').getMappedType?.(type, this); - return mappedType ?? this.getDefaultMappedType(type); - } - /** Returns the default mapped Type for a given type string when no custom mapping is configured. */ - getDefaultMappedType(type) { - if (type.endsWith('[]')) { - return Type.getType(ArrayType); - } - switch (this.extractSimpleType(type)) { - case 'character': - case 'char': - return Type.getType(CharacterType); - case 'string': - case 'varchar': - return Type.getType(StringType); - case 'interval': - return Type.getType(IntervalType); - case 'text': - return Type.getType(TextType); - case 'int': - case 'number': - return Type.getType(IntegerType); - case 'bigint': - return Type.getType(BigIntType); - case 'smallint': - return Type.getType(SmallIntType); - case 'tinyint': - return Type.getType(TinyIntType); - case 'mediumint': - return Type.getType(MediumIntType); - case 'float': - return Type.getType(FloatType); - case 'double': - return Type.getType(DoubleType); - case 'integer': - return Type.getType(IntegerType); - case 'decimal': - case 'numeric': - return Type.getType(DecimalType); - case 'boolean': - return Type.getType(BooleanType); - case 'blob': - case 'buffer': - return Type.getType(BlobType); - case 'uint8array': - return Type.getType(Uint8ArrayType); - case 'uuid': - return Type.getType(UuidType); - case 'date': - return Type.getType(DateType); - case 'datetime': - case 'timestamp': - return Type.getType(DateTimeType); - case 'time': - return Type.getType(TimeType); - case 'object': - case 'json': - return Type.getType(JsonType); - case 'enum': - return Type.getType(EnumType); - default: - return Type.getType(UnknownType); - } - } - /** Whether the platform supports multiple cascade paths to the same table. */ - supportsMultipleCascadePaths() { - return true; - } - /** - * Returns true if the platform supports ON UPDATE foreign key rules. - * Oracle doesn't support ON UPDATE rules. - */ - supportsOnUpdate() { - return true; - } - /** Whether the connection supports executing multiple SQL statements in a single call. */ - supportsMultipleStatements() { - return this.config.get('multipleStatements'); - } - /** Whether the platform supports the UNION WHERE optimization for multi-branch queries. */ - supportsUnionWhere() { - return false; - } - /** Returns the SQL type declaration used for array storage. */ - getArrayDeclarationSQL() { - return 'text'; - } - /** Serializes a string array into its database storage format. */ - marshallArray(values) { - return values.join(','); - } - /** Deserializes a database-stored array string back into a string array. */ - unmarshallArray(value) { - if (value === '') { - return []; - } - return value.split(','); - } - getBlobDeclarationSQL() { - return 'blob'; - } - getJsonDeclarationSQL() { - return 'json'; - } - getSearchJsonPropertySQL(path, type, aliased) { - return path; - } - getSearchJsonPropertyKey(path, type, aliased, value) { - return path.join('.'); - } - processJsonCondition(o, value, path, alias) { - if (Utils.isPlainObject(value) && !Object.keys(value).some(k => Utils.isOperator(k))) { - Utils.keys(value).forEach(k => { - this.processJsonCondition(o, value[k], [...path, k], alias); - }); - return o; - } - if (path.length === 1) { - o[path[0]] = value; - return o; - } - const type = this.getJsonValueType(value); - const k = this.getSearchJsonPropertyKey(path, type, alias, value); - o[k] = value; - return o; - } - getJsonValueType(value) { - if (Array.isArray(value)) { - return typeof value[0]; - } - if (Utils.isPlainObject(value) && Object.keys(value).every(k => Utils.isOperator(k))) { - return this.getJsonValueType(Object.values(value)[0]); - } - return typeof value; - } - /* v8 ignore next */ - getJsonIndexDefinition(index) { - return index.columnNames; - } - getFullTextWhereClause(prop) { - throw new Error('Full text searching is not supported by this driver.'); - } - supportsCreatingFullTextIndex() { - return false; - } - getFullTextIndexExpression(indexName, schemaName, tableName, columns) { - throw new Error('Full text searching is not supported by this driver.'); - } - /** Whether the driver automatically parses JSON columns into JS objects. */ - convertsJsonAutomatically() { - return true; - } - /** Converts a JS value to its JSON database representation (typically JSON.stringify). */ - convertJsonToDatabaseValue(value, context) { - return JSON.stringify(value); - } - /** Converts a database JSON value to its JS representation. */ - convertJsonToJSValue(value, context) { - return parseJsonSafe(value); - } - convertDateToJSValue(value) { - return value; - } - convertIntervalToJSValue(value) { - return value; - } - convertIntervalToDatabaseValue(value) { - return value; - } - usesAsKeyword() { - return true; - } - /** - * Determines how UUID values are compared in the change set tracking. - * Return `'string'` for inline string comparison (fast), or `'any'` for deep comparison via type methods. - */ - compareUuids() { - return 'string'; - } - convertUuidToJSValue(value) { - return value; - } - convertUuidToDatabaseValue(value) { - return value; - } - /** Parses a string or numeric value into a Date object. */ - parseDate(value) { - const date = new Date(value); - /* v8 ignore next */ - if (isNaN(date.getTime())) { - return value; - } - return date; - } - /** Returns the default EntityRepository class used by this platform. */ - getRepositoryClass() { - return EntityRepository; - } - /** Returns the default character set for this platform. */ - getDefaultCharset() { - return 'utf8'; - } - /** Returns the exception converter for translating native errors to driver exceptions. */ - getExceptionConverter() { - return this.exceptionConverter; - } - /** - * Allows registering extensions of the driver automatically (e.g. `SchemaGenerator` extension in SQL drivers). - */ - lookupExtensions(orm) { - // no extensions by default - } - /** @internal */ - init(orm) { - this.lookupExtensions(orm); - } - /** Retrieves a registered extension (e.g. SchemaGenerator, Migrator), throwing if not found. */ - getExtension(extensionName, extensionKey, moduleName, em) { - const extension = this.config.getExtension(extensionKey); - if (extension) { - return extension; - } - /* v8 ignore next */ - throw new Error( - `${extensionName} extension not registered. Provide it in the ORM config, or use the async \`MikroORM.init()\` method to load extensions automatically.`, - ); - } - /* v8 ignore next: kept for type inference only */ - getSchemaGenerator(driver, em) { - throw new Error(`${driver.constructor.name} does not support SchemaGenerator`); - } - /** Processes a date value before persisting, applying timezone or format conversions. */ - processDateProperty(value) { - return value; - } - /** Wraps a table or column identifier with the platform-specific quote character. */ - quoteIdentifier(id, quote = '`') { - const raw = Raw.getKnownFragment(id); - if (raw) { - return this.formatQuery(raw.sql, raw.params); - } - return `${quote}${id.toString().replace('.', `${quote}.${quote}`)}${quote}`; - } - /** Quotes a literal value for safe embedding in SQL. */ - quoteValue(value) { - return value; - } - /* v8 ignore next */ - escape(value) { - return value; - } - /** Replaces `?` placeholders in SQL with quoted parameter values. */ - formatQuery(sql, params) { - if (params.length === 0) { - return sql; - } - // fast string replace without regexps - let j = 0; - let pos = 0; - let ret = ''; - if (sql.startsWith('?')) { - if (sql[1] === '?') { - ret += this.quoteIdentifier(params[j++]); - pos = 2; - } else { - ret += this.quoteValue(params[j++]); - pos = 1; - } - } - while (pos < sql.length) { - const idx = sql.indexOf('?', pos + 1); - if (idx === -1) { - ret += sql.substring(pos, sql.length); - break; - } - if (sql.substring(idx - 1, idx + 1) === '\\?') { - ret += sql.substring(pos, idx - 1) + '?'; - pos = idx + 1; - } else if (sql.substring(idx, idx + 2) === '??') { - ret += sql.substring(pos, idx) + this.quoteIdentifier(params[j++]); - pos = idx + 2; - } else { - ret += sql.substring(pos, idx) + this.quoteValue(params[j++]); - pos = idx + 1; - } - } - return ret; - } - /** Deep-clones embeddable data and tags it for JSON serialization. */ - cloneEmbeddable(data) { - const copy = clone(data); - // tag the copy so we know it should be stringified when quoting (so we know how to treat JSON arrays) - Object.defineProperty(copy, JsonProperty, { enumerable: false, value: true }); - return copy; - } - /** Initializes the platform with the ORM configuration. */ - setConfig(config) { - this.config = config; - this.namingStrategy = config.getNamingStrategy(); - if (this.config.get('forceUtcTimezone')) { - this.timezone = 'Z'; - } else { - this.timezone = this.config.get('timezone'); - } - } - /** Returns the current ORM configuration. */ - getConfig() { - return this.config; - } - /** Returns the configured timezone, or undefined if not set. */ - getTimezone() { - return this.timezone; - } - /** Whether the given property represents a numeric database column. */ - isNumericProperty(prop, ignoreCustomType = false) { - const numericMappedType = prop.columnTypes?.[0] && this.isNumericColumn(this.getMappedType(prop.columnTypes[0])); - return numericMappedType || prop.type === 'number' || this.isBigIntProperty(prop); - } - /** Whether the given mapped type represents a numeric column. */ - isNumericColumn(mappedType) { - return [IntegerType, SmallIntType, BigIntType, TinyIntType].some(t => mappedType instanceof t); - } - /** Whether the platform supports unsigned integer columns. */ - supportsUnsigned() { - return false; - } - /** - * Returns the default name of index for the given columns - */ - getIndexName(tableName, columns, type) { - return this.namingStrategy.indexName(tableName, columns, type); - } - /** Returns the default primary key constraint name. */ - getDefaultPrimaryName(tableName, columns) { - return 'primary'; - } - /** Whether the platform supports custom names for primary key constraints. */ - supportsCustomPrimaryKeyNames() { - return false; - } - /** Whether the given property key is included in the populate hint. */ - isPopulated(key, populate) { - return populate === true || (populate !== false && populate.some(p => p.field === key || p.all)); - } - /** Whether the given property should be included as a column in the SELECT query. */ - shouldHaveColumn(prop, populate, exclude, includeFormulas = true, ignoreInlineEmbeddables = true) { - if (exclude?.includes(prop.name)) { - return false; - } - if (exclude?.find(k => k.startsWith(`${prop.name}.`) && !this.isPopulated(prop.name, populate))) { - return false; - } - if (prop.formula) { - return includeFormulas && (!prop.lazy || this.isPopulated(prop.name, populate)); - } - if (prop.persist === false) { - return false; - } - if (prop.lazy && (populate === false || (populate !== true && !populate.some(p => p.field === prop.name)))) { - return false; - } - if ([ReferenceKind.SCALAR, ReferenceKind.MANY_TO_ONE].includes(prop.kind)) { - return true; - } - if (prop.kind === ReferenceKind.EMBEDDED) { - return prop.object || ignoreInlineEmbeddables; - } - return prop.kind === ReferenceKind.ONE_TO_ONE && prop.owner; - } - /** - * Currently not supported due to how knex does complex sqlite diffing (always based on current schema) - */ - /** Whether the platform supports generating down migrations. */ - supportsDownMigrations() { - return true; - } - /** Whether the platform supports deferred unique constraints. */ - supportsDeferredUniqueConstraints() { - return true; - } - /** Platform-specific validation of entity metadata. */ - validateMetadata(meta) { - return; - } - /** - * Generates a custom order by statement given a set of in order values, eg. - * ORDER BY (CASE WHEN priority = 'low' THEN 1 WHEN priority = 'medium' THEN 2 ELSE NULL END) - */ - generateCustomOrder(escapedColumn, values) { - throw new Error('Not supported'); - } - /** - * Returns default client url for given driver (e.g. mongodb://127.0.0.1:27017 for mongodb) - */ - getDefaultClientUrl() { - return ''; - } - /** - * @internal - */ - castColumn(prop) { - return ''; - } - /** - * @internal - */ - castJsonValue(prop) { - return ''; - } - /** - * @internal - */ - clone() { - return this; - } - /** @ignore */ - /* v8 ignore next */ - [Symbol.for('nodejs.util.inspect.custom')]() { - return `[${this.constructor.name}]`; - } -} diff --git a/node_modules/@mikro-orm/core/platforms/index.d.ts b/node_modules/@mikro-orm/core/platforms/index.d.ts deleted file mode 100644 index 996ddef..0000000 --- a/node_modules/@mikro-orm/core/platforms/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './Platform.js'; -export * from './ExceptionConverter.js'; diff --git a/node_modules/@mikro-orm/core/platforms/index.js b/node_modules/@mikro-orm/core/platforms/index.js deleted file mode 100644 index 996ddef..0000000 --- a/node_modules/@mikro-orm/core/platforms/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export * from './Platform.js'; -export * from './ExceptionConverter.js'; diff --git a/node_modules/@mikro-orm/core/serialization/EntitySerializer.d.ts b/node_modules/@mikro-orm/core/serialization/EntitySerializer.d.ts deleted file mode 100644 index 9e57a33..0000000 --- a/node_modules/@mikro-orm/core/serialization/EntitySerializer.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -import type { - ArrayElement, - AutoPath, - CleanTypeConfig, - SerializeDTO, - FromEntityType, - TypeConfig, - UnboxArray, -} from '../typings.js'; -import { type PopulatePath } from '../enums.js'; -/** Converts entity instances to plain DTOs via `serialize()`, with fine-grained control over populate, exclude, and serialization groups. */ -export declare class EntitySerializer { - /** Serializes an entity to a plain DTO, with fine-grained control over population, exclusion, groups, and custom types. */ - static serialize( - entity: T, - options?: SerializeOptions, - ): SerializeDTO; - private static propertyName; - private static processProperty; - private static processCustomType; - private static extractChildOptions; - private static processEntity; - private static processCollection; -} -export interface SerializeOptions { - /** Specify which relation should be serialized as populated and which as a FK. */ - populate?: readonly AutoPath[]; - /** Specify which properties should be omitted. */ - exclude?: readonly AutoPath[]; - /** Enforce unpopulated references to be returned as objects, e.g. `{ author: { id: 1 } }` instead of `{ author: 1 }`. */ - forceObject?: boolean; - /** Ignore custom property serializers. */ - ignoreSerializers?: boolean; - /** Include properties marked as `hidden`. */ - includeHidden?: boolean; - /** Skip properties with `null` value. */ - skipNull?: boolean; - /** Only include properties for a specific group. If a property does not specify any group, it will be included, otherwise only properties with a matching group are included. */ - groups?: string[]; - /** Convert custom types to their database representation. By default, the `Type.toJSON` method is invoked instead. */ - convertCustomTypes?: boolean; -} -/** - * Converts entity instance to POJO, converting the `Collection`s to arrays and unwrapping the `Reference` wrapper, while respecting the serialization options. - * This method accepts either a single entity or an array of entities, and returns the corresponding POJO or an array of POJO. - * To serialize a single entity, you can also use `wrap(entity).serialize()` which handles a single entity only. - * - * ```ts - * const dtos = serialize([user1, user, ...], { exclude: ['id', 'email'], forceObject: true }); - * const [dto2, dto3] = serialize([user2, user3], { exclude: ['id', 'email'], forceObject: true }); - * const dto1 = serialize(user, { exclude: ['id', 'email'], forceObject: true }); - * const dto2 = wrap(user).serialize({ exclude: ['id', 'email'], forceObject: true }); - * ``` - */ -export declare function serialize< - Entity extends object, - Naked extends FromEntityType = FromEntityType, - Populate extends string = never, - Exclude extends string = never, - Config extends TypeConfig = never, ->( - entity: Entity, - options?: Config & SerializeOptions, Populate, Exclude>, -): Naked extends object[] - ? SerializeDTO, Populate, Exclude, CleanTypeConfig>[] - : SerializeDTO>; diff --git a/node_modules/@mikro-orm/core/serialization/EntitySerializer.js b/node_modules/@mikro-orm/core/serialization/EntitySerializer.js deleted file mode 100644 index 7eb00c7..0000000 --- a/node_modules/@mikro-orm/core/serialization/EntitySerializer.js +++ /dev/null @@ -1,255 +0,0 @@ -import { helper } from '../entity/wrap.js'; -import { Utils } from '../utils/Utils.js'; -import { ReferenceKind } from '../enums.js'; -import { Reference } from '../entity/Reference.js'; -import { SerializationContext } from './SerializationContext.js'; -import { isRaw } from '../utils/RawQueryFragment.js'; -function isVisible(meta, propName, options) { - const prop = meta.properties[propName]; - if (options.groups && prop?.groups) { - return prop.groups.some(g => options.groups.includes(g)); - } - if ( - Array.isArray(options.populate) && - options.populate?.find(item => item === propName || item.startsWith(propName + '.') || item === '*') - ) { - return true; - } - if (options.exclude?.find(item => item === propName)) { - return false; - } - const visible = prop && !(prop.hidden && !options.includeHidden); - const prefixed = prop && !prop.primary && !prop.accessor && propName.startsWith('_'); // ignore prefixed properties, if it's not a PK - return visible && !prefixed; -} -function isPopulated(propName, options) { - if ( - typeof options.populate !== 'boolean' && - options.populate?.find(item => item === propName || item.startsWith(propName + '.') || item === '*') - ) { - return true; - } - if (typeof options.populate === 'boolean') { - return options.populate; - } - return false; -} -/** Converts entity instances to plain DTOs via `serialize()`, with fine-grained control over populate, exclude, and serialization groups. */ -export class EntitySerializer { - /** Serializes an entity to a plain DTO, with fine-grained control over population, exclusion, groups, and custom types. */ - static serialize(entity, options = {}) { - const wrapped = helper(entity); - const meta = wrapped.__meta; - let contextCreated = false; - if (!wrapped.__serializationContext.root) { - const root = new SerializationContext(); - SerializationContext.propagate( - root, - entity, - (meta, prop) => meta.properties[prop]?.kind !== ReferenceKind.SCALAR, - ); - options.populate = options.populate ? Utils.asArray(options.populate) : options.populate; - contextCreated = true; - } - const root = wrapped.__serializationContext.root; - const ret = {}; - const props = new Set(); - if (meta.serializedPrimaryKey && !meta.compositePK) { - props.add(meta.serializedPrimaryKey); - } else { - meta.primaryKeys.forEach(pk => props.add(pk)); - } - if (wrapped.isInitialized() || !wrapped.hasPrimaryKey()) { - const entityKeys = new Set(Object.keys(entity)); - for (const prop of meta.props) { - if (entityKeys.has(prop.name) || (prop.getter && prop.accessor === prop.name)) { - props.add(prop.name); - } - } - for (const key of entityKeys) { - if (!meta.properties[key]) { - props.add(key); - } - } - } - const visited = root.visited.has(entity); - if (!visited) { - root.visited.add(entity); - } - for (const prop of props) { - if (!isVisible(meta, prop, options)) { - continue; - } - const cycle = root.visit(meta.class, prop); - if (cycle && visited) { - continue; - } - const val = this.processProperty(prop, entity, options); - if (!cycle) { - root.leave(meta.class, prop); - } - if (options.skipNull && Utils.isPlainObject(val)) { - Utils.dropUndefinedProperties(val, null); - } - if (isRaw(val)) { - throw new Error(`Trying to serialize raw SQL fragment: '${val.sql}'`); - } - const visible = typeof val !== 'undefined' && !(val === null && options.skipNull); - if (visible) { - ret[this.propertyName(meta, prop)] = val; - } - } - if (contextCreated) { - root.close(); - } - if (!wrapped.isInitialized()) { - return ret; - } - for (const prop of meta.getterProps) { - // decorated get methods - if (prop.getterName != null) { - const visible = entity[prop.getterName] instanceof Function && isVisible(meta, prop.name, options); - if (visible) { - ret[this.propertyName(meta, prop.name)] = this.processProperty(prop.getterName, entity, options); - } - } else { - // decorated getters - const visible = typeof entity[prop.name] !== 'undefined' && isVisible(meta, prop.name, options); - if (visible) { - ret[this.propertyName(meta, prop.name)] = this.processProperty(prop.name, entity, options); - } - } - } - return ret; - } - static propertyName(meta, prop) { - /* v8 ignore next */ - if (meta.properties[prop]?.serializedName) { - return meta.properties[prop].serializedName; - } - if (meta.properties[prop]?.primary && meta.serializedPrimaryKey) { - return meta.serializedPrimaryKey; - } - return prop; - } - static processProperty(prop, entity, options) { - const parts = prop.split('.'); - prop = parts[0]; - const wrapped = helper(entity); - const property = wrapped.__meta.properties[prop] ?? { name: prop }; - const serializer = property?.serializer; - const value = entity[prop]; - // getter method - if (entity[prop] instanceof Function) { - const returnValue = entity[prop](); - if (!options.ignoreSerializers && serializer) { - return serializer(returnValue, this.extractChildOptions(options, prop)); - } - return returnValue; - } - /* v8 ignore next */ - if (!options.ignoreSerializers && serializer) { - return serializer(value); - } - if (Utils.isCollection(value)) { - return this.processCollection(property, entity, options); - } - if (Utils.isEntity(value, true)) { - return this.processEntity(property, entity, wrapped.__platform, options); - } - if (Utils.isScalarReference(value)) { - return value.unwrap(); - } - /* v8 ignore next */ - if (property?.kind === ReferenceKind.EMBEDDED) { - if (Array.isArray(value)) { - return value.map(item => helper(item).toJSON()); - } - if (Utils.isObject(value)) { - return helper(value).toJSON(); - } - } - if (property.customType) { - return this.processCustomType(value, property, wrapped.__platform, options.convertCustomTypes); - } - return wrapped.__platform.normalizePrimaryKey(value); - } - static processCustomType(value, prop, platform, convertCustomTypes) { - if (!prop.customType) { - return value; - } - if (convertCustomTypes) { - return prop.customType.convertToDatabaseValue(value, platform, { mode: 'serialization' }); - } - return prop.customType.toJSON(value, platform); - } - static extractChildOptions(options, prop) { - return { - ...options, - populate: Array.isArray(options.populate) - ? Utils.extractChildElements(options.populate, prop, '*') - : options.populate, - exclude: Array.isArray(options.exclude) ? Utils.extractChildElements(options.exclude, prop) : options.exclude, - }; - } - static processEntity(prop, entity, platform, options) { - const child = Reference.unwrapReference(entity[prop.name]); - const wrapped = helper(child); - const populated = isPopulated(prop.name, options) && wrapped.isInitialized(); - const expand = populated || !wrapped.__managed; - const meta = wrapped.__meta; - const childOptions = this.extractChildOptions(options, prop.name); - const visible = meta.primaryKeys.filter(prop => isVisible(meta, prop, childOptions)); - if (expand) { - return this.serialize(child, childOptions); - } - const pk = this.processCustomType(wrapped.getPrimaryKey(), prop, wrapped.__platform, options.convertCustomTypes); - if (options.forceObject || wrapped.__config.get('serialization').forceObject) { - return Utils.primaryKeyToObject(meta, pk, visible); - } - if (Utils.isPlainObject(pk)) { - const pruned = Utils.primaryKeyToObject(meta, pk, visible); - if (visible.length === 1) { - return platform.normalizePrimaryKey(pruned[visible[0]]); - } - return pruned; - } - return platform.normalizePrimaryKey(pk); - } - static processCollection(prop, entity, options) { - const col = entity[prop.name]; - if (!col.isInitialized()) { - return undefined; - } - return col.getItems(false).map(item => { - const populated = isPopulated(prop.name, options); - const wrapped = helper(item); - if (populated || !wrapped.__managed) { - return this.serialize(item, this.extractChildOptions(options, prop.name)); - } - const pk = this.processCustomType(wrapped.getPrimaryKey(), prop, wrapped.__platform, options.convertCustomTypes); - if (options.forceObject || wrapped.__config.get('serialization').forceObject) { - return Utils.primaryKeyToObject(wrapped.__meta, pk); - } - return pk; - }); - } -} -/** - * Converts entity instance to POJO, converting the `Collection`s to arrays and unwrapping the `Reference` wrapper, while respecting the serialization options. - * This method accepts either a single entity or an array of entities, and returns the corresponding POJO or an array of POJO. - * To serialize a single entity, you can also use `wrap(entity).serialize()` which handles a single entity only. - * - * ```ts - * const dtos = serialize([user1, user, ...], { exclude: ['id', 'email'], forceObject: true }); - * const [dto2, dto3] = serialize([user2, user3], { exclude: ['id', 'email'], forceObject: true }); - * const dto1 = serialize(user, { exclude: ['id', 'email'], forceObject: true }); - * const dto2 = wrap(user).serialize({ exclude: ['id', 'email'], forceObject: true }); - * ``` - */ -export function serialize(entities, options) { - if (Array.isArray(entities)) { - return entities.map(e => EntitySerializer.serialize(e, options)); - } - return EntitySerializer.serialize(entities, options); -} diff --git a/node_modules/@mikro-orm/core/serialization/EntityTransformer.d.ts b/node_modules/@mikro-orm/core/serialization/EntityTransformer.d.ts deleted file mode 100644 index 27e4d9a..0000000 --- a/node_modules/@mikro-orm/core/serialization/EntityTransformer.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { EntityDTO, EntityKey } from '../typings.js'; -/** Converts entity instances to plain objects via `toObject()`, respecting populate hints, hidden fields, and serialization context. */ -export declare class EntityTransformer { - /** Converts an entity to a plain object, respecting populate hints, hidden fields, and custom serializers. */ - static toObject = never>( - entity: Entity, - ignoreFields?: Ignored[], - raw?: boolean, - ): Omit, Ignored>; - private static propertyName; - private static processProperty; - private static processEntity; - private static processCollection; -} diff --git a/node_modules/@mikro-orm/core/serialization/EntityTransformer.js b/node_modules/@mikro-orm/core/serialization/EntityTransformer.js deleted file mode 100644 index ff0c35e..0000000 --- a/node_modules/@mikro-orm/core/serialization/EntityTransformer.js +++ /dev/null @@ -1,234 +0,0 @@ -import { helper, wrap } from '../entity/wrap.js'; -import { Utils } from '../utils/Utils.js'; -import { ReferenceKind } from '../enums.js'; -import { SerializationContext } from './SerializationContext.js'; -import { isRaw } from '../utils/RawQueryFragment.js'; -function isVisible(meta, propName, ignoreFields = []) { - const prop = meta.properties[propName]; - const visible = prop && !prop.hidden; - const prefixed = prop && !prop.primary && !prop.accessor && propName.startsWith('_'); // ignore prefixed properties, if it's not a PK - return visible && !prefixed && !ignoreFields.includes(propName); -} -/** Converts entity instances to plain objects via `toObject()`, respecting populate hints, hidden fields, and serialization context. */ -export class EntityTransformer { - /** Converts an entity to a plain object, respecting populate hints, hidden fields, and custom serializers. */ - static toObject(entity, ignoreFields = [], raw = false) { - if (!Array.isArray(ignoreFields)) { - ignoreFields = []; - } - const wrapped = helper(entity); - let contextCreated = false; - if (!wrapped) { - return entity; - } - if (!wrapped.__serializationContext.root) { - const root = new SerializationContext( - wrapped.__serializationContext.populate, - wrapped.__serializationContext.fields, - wrapped.__serializationContext.exclude, - ); - SerializationContext.propagate(root, entity, isVisible); - contextCreated = true; - } - const root = wrapped.__serializationContext.root; - const meta = wrapped.__meta; - const ret = {}; - const props = new Set(); - if (meta.serializedPrimaryKey && !meta.compositePK) { - props.add(meta.serializedPrimaryKey); - } else { - meta.primaryKeys.forEach(pk => props.add(pk)); - } - if (wrapped.isInitialized() || !wrapped.hasPrimaryKey()) { - const entityKeys = new Set(Object.keys(entity)); - for (const prop of meta.props) { - if (entityKeys.has(prop.name) || (prop.getter && prop.accessor === prop.name)) { - props.add(prop.name); - } - } - for (const key of entityKeys) { - if (!meta.properties[key]) { - props.add(key); - } - } - } - const visited = root.visited.has(entity); - const includePrimaryKeys = wrapped.__config.get('serialization').includePrimaryKeys; - if (!visited) { - root.visited.add(entity); - } - for (const prop of props) { - const visible = raw ? meta.properties[prop] : isVisible(meta, prop, ignoreFields); - if (!visible) { - continue; - } - const populated = root.isMarkedAsPopulated(meta.class, prop); - if (!raw) { - const partiallyLoaded = root.isPartiallyLoaded(meta.class, prop); - const isPrimary = includePrimaryKeys && meta.properties[prop].primary; - if (!partiallyLoaded && !populated && !isPrimary) { - continue; - } - if (root.isExcluded(meta.class, prop) && !populated) { - continue; - } - } - const cycle = root.visit(meta.class, prop); - if (cycle && visited) { - continue; - } - const val = EntityTransformer.processProperty(prop, entity, raw, populated); - if (!cycle) { - root.leave(meta.class, prop); - } - if (isRaw(val)) { - throw new Error(`Trying to serialize raw SQL fragment: '${val.sql}'`); - } - if (typeof val === 'undefined') { - continue; - } - ret[this.propertyName(meta, prop, raw)] = val; - } - if (!wrapped.isInitialized() && wrapped.hasPrimaryKey()) { - return ret; - } - for (const prop of meta.getterProps) { - // decorated get methods - if (prop.getterName != null) { - const visible = !prop.hidden && entity[prop.getterName] instanceof Function; - const populated = root.isMarkedAsPopulated(meta.class, prop.name); - if (visible) { - ret[this.propertyName(meta, prop.name, raw)] = this.processProperty(prop.getterName, entity, raw, populated); - } - } else { - // decorated getters - const visible = !prop.hidden && typeof entity[prop.name] !== 'undefined'; - const populated = root.isMarkedAsPopulated(meta.class, prop.name); - if (visible) { - ret[this.propertyName(meta, prop.name, raw)] = this.processProperty(prop.name, entity, raw, populated); - } - } - } - if (contextCreated) { - root.close(); - } - return ret; - } - static propertyName(meta, prop, raw) { - if (raw) { - return prop; - } - if (meta.properties[prop].serializedName) { - return meta.properties[prop].serializedName; - } - if (meta.properties[prop].primary && meta.serializedPrimaryKey) { - return meta.serializedPrimaryKey; - } - return prop; - } - static processProperty(prop, entity, raw, populated) { - const wrapped = helper(entity); - const property = wrapped.__meta.properties[prop] ?? { name: prop }; - const serializer = property?.serializer; - const value = entity[prop]; - // getter method - if (entity[prop] instanceof Function) { - const returnValue = entity[prop](); - if (serializer && !raw) { - return serializer(returnValue); - } - return returnValue; - } - if (serializer && !raw) { - return serializer(value); - } - if (Utils.isCollection(value)) { - return EntityTransformer.processCollection(property, entity, raw, populated); - } - if (Utils.isEntity(value, true)) { - return EntityTransformer.processEntity(property, entity, wrapped.__platform, raw, populated); - } - if (Utils.isScalarReference(value)) { - return value.unwrap(); - } - if (property.kind === ReferenceKind.EMBEDDED) { - if (Array.isArray(value)) { - return value.map(item => { - const wrapped = item && helper(item); - return wrapped ? wrapped.toJSON() : item; - }); - } - const wrapped = value && helper(value); - return wrapped ? wrapped.toJSON() : value; - } - const customType = property?.customType; - if (customType) { - return customType.toJSON(value, wrapped.__platform); - } - if (property?.primary) { - return wrapped.__platform.normalizePrimaryKey(value); - } - return value; - } - static processEntity(prop, entity, platform, raw, populated) { - const child = entity[prop.name]; - const wrapped = helper(child); - const meta = wrapped.__meta; - const visible = meta.primaryKeys.filter(prop => isVisible(meta, prop)); - if (raw && wrapped.isInitialized() && child !== entity) { - return wrapped.toPOJO(); - } - function isPopulated() { - if (wrapped.__populated != null) { - return wrapped.__populated; - } - if (populated) { - return true; - } - return !wrapped.__managed; - } - if (wrapped.isInitialized() && isPopulated() && child !== entity) { - return wrap(child).toJSON(); - } - let pk = wrapped.getPrimaryKey(); - if (prop.customType) { - pk = prop.customType.toJSON(pk, wrapped.__platform); - } - if (wrapped.__config.get('serialization').forceObject) { - return Utils.primaryKeyToObject(meta, pk, visible); - } - if (Utils.isPlainObject(pk)) { - const pruned = Utils.primaryKeyToObject(meta, pk, visible); - if (visible.length === 1) { - return platform.normalizePrimaryKey(pruned[visible[0]]); - } - return pruned; - } - return platform.normalizePrimaryKey(pk); - } - static processCollection(prop, entity, raw, populated) { - const col = entity[prop.name]; - if (raw && col.isInitialized(true)) { - return col.map(item => helper(item).toPOJO()); - } - if (col.shouldPopulate(populated)) { - return col.toArray(); - } - if (col.isInitialized()) { - const wrapped = helper(entity); - const forceObject = wrapped.__config.get('serialization').forceObject; - return col.map(item => { - const wrapped = helper(item); - const pk = wrapped.getPrimaryKey(); - if (prop.customType) { - return prop.customType.toJSON(pk, wrapped.__platform); - } - if (forceObject) { - return Utils.primaryKeyToObject(wrapped.__meta, pk); - } - return pk; - }); - } - return undefined; - } -} diff --git a/node_modules/@mikro-orm/core/serialization/SerializationContext.d.ts b/node_modules/@mikro-orm/core/serialization/SerializationContext.d.ts deleted file mode 100644 index 902c967..0000000 --- a/node_modules/@mikro-orm/core/serialization/SerializationContext.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { AnyEntity, EntityMetadata, EntityName, PopulateOptions } from '../typings.js'; -/** - * Helper that allows to keep track of where we are currently at when serializing complex entity graph with cycles. - * Before we process a property, we call `visit` that checks if it is not a cycle path (but allows to pass cycles that - * are defined in populate hint). If not, we proceed and call `leave` afterwards. - */ -export declare class SerializationContext { - #private; - readonly path: [EntityName, string][]; - readonly visited: Set; - constructor(populate?: PopulateOptions[], fields?: Set, exclude?: readonly string[]); - /** - * Returns true when there is a cycle detected. - */ - visit(entityName: EntityName, prop: string): boolean; - /** Removes the last entry from the visit path after processing a property. */ - leave(entityName: EntityName, prop: string): void; - /** Cleans up the serialization context by removing root references from all tracked entities. */ - close(): void; - /** - * When initializing new context, we need to propagate it to the whole entity graph recursively. - */ - static propagate( - root: SerializationContext, - entity: AnyEntity, - isVisible: (meta: EntityMetadata, prop: string) => boolean, - ): void; - /** Checks whether a property is explicitly listed in the populate hints for the current path. */ - isMarkedAsPopulated(entityName: EntityName, prop: string): boolean; - /** Checks whether a property is excluded from serialization via the exclude list. */ - isExcluded(entityName: EntityName, prop: string): boolean; - /** Checks whether a property is included in the partial fields selection for the current path. */ - isPartiallyLoaded(entityName: EntityName, prop: string): boolean; - private register; -} diff --git a/node_modules/@mikro-orm/core/serialization/SerializationContext.js b/node_modules/@mikro-orm/core/serialization/SerializationContext.js deleted file mode 100644 index 3319e7b..0000000 --- a/node_modules/@mikro-orm/core/serialization/SerializationContext.js +++ /dev/null @@ -1,125 +0,0 @@ -import { Utils } from '../utils/Utils.js'; -import { helper } from '../entity/wrap.js'; -/** - * Helper that allows to keep track of where we are currently at when serializing complex entity graph with cycles. - * Before we process a property, we call `visit` that checks if it is not a cycle path (but allows to pass cycles that - * are defined in populate hint). If not, we proceed and call `leave` afterwards. - */ -export class SerializationContext { - path = []; - visited = new Set(); - #entities = new Set(); - #populate; - #fields; - #exclude; - constructor(populate = [], fields, exclude) { - this.#populate = populate; - this.#fields = fields; - this.#exclude = exclude; - } - /** - * Returns true when there is a cycle detected. - */ - visit(entityName, prop) { - if (!this.path.find(([cls, item]) => entityName === cls && prop === item)) { - this.path.push([entityName, prop]); - return false; - } - // check if the path is explicitly populated - if (!this.isMarkedAsPopulated(entityName, prop)) { - return true; - } - this.path.push([entityName, prop]); - return false; - } - /** Removes the last entry from the visit path after processing a property. */ - leave(entityName, prop) { - const last = this.path.pop(); - /* v8 ignore next */ - if (last?.[0] !== entityName || last[1] !== prop) { - throw new Error(`Trying to leave wrong property: ${entityName}.${prop} instead of ${last?.join('.')}`); - } - } - /** Cleans up the serialization context by removing root references from all tracked entities. */ - close() { - for (const entity of this.#entities) { - delete helper(entity).__serializationContext.root; - } - } - /** - * When initializing new context, we need to propagate it to the whole entity graph recursively. - */ - static propagate(root, entity, isVisible) { - root.register(entity); - const meta = helper(entity).__meta; - for (const key of Object.keys(entity)) { - if (!isVisible(meta, key)) { - continue; - } - const target = entity[key]; - if (Utils.isEntity(target, true)) { - if (!target.__helper.__serializationContext.root) { - this.propagate(root, target, isVisible); - } - continue; - } - if (Utils.isCollection(target)) { - for (const item of target.getItems(false)) { - if (!item.__helper.__serializationContext.root) { - this.propagate(root, item, isVisible); - } - } - } - } - } - /** Checks whether a property is explicitly listed in the populate hints for the current path. */ - isMarkedAsPopulated(entityName, prop) { - let populate = this.#populate ?? []; - for (const segment of this.path) { - const hints = populate.filter(p => p.field === segment[1]); - if (hints.length > 0) { - const childHints = []; - for (const hint of hints) { - // we need to check for cycles here too, as we could fall into endless loops for bidirectional relations - if (hint.all) { - return !this.path.find(([cls, item]) => entityName === cls && prop === item); - } - if (hint.children) { - childHints.push(...hint.children); - } - } - populate = childHints; - } - } - return !!populate?.some(p => p.field === prop); - } - /** Checks whether a property is excluded from serialization via the exclude list. */ - isExcluded(entityName, prop) { - if (!this.#exclude || this.#exclude.length === 0) { - return false; - } - const fullPath = this.path.map(segment => segment[1] + '.').join('') + prop; - return this.#exclude.includes(fullPath); - } - /** Checks whether a property is included in the partial fields selection for the current path. */ - isPartiallyLoaded(entityName, prop) { - if (!this.#fields) { - return true; - } - let fields = [...this.#fields]; - for (const segment of this.path) { - /* v8 ignore next */ - if (fields.length === 0) { - return true; - } - fields = fields - .filter(field => field.startsWith(`${segment[1]}.`) || field === '*') - .map(field => (field === '*' ? field : field.substring(segment[1].length + 1))); - } - return fields.some(p => p === prop || p === '*'); - } - register(entity) { - helper(entity).__serializationContext.root = this; - this.#entities.add(entity); - } -} diff --git a/node_modules/@mikro-orm/core/serialization/index.d.ts b/node_modules/@mikro-orm/core/serialization/index.d.ts deleted file mode 100644 index 8f397d1..0000000 --- a/node_modules/@mikro-orm/core/serialization/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './EntityTransformer.js'; -export * from './EntitySerializer.js'; -export * from './SerializationContext.js'; diff --git a/node_modules/@mikro-orm/core/serialization/index.js b/node_modules/@mikro-orm/core/serialization/index.js deleted file mode 100644 index 8f397d1..0000000 --- a/node_modules/@mikro-orm/core/serialization/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export * from './EntityTransformer.js'; -export * from './EntitySerializer.js'; -export * from './SerializationContext.js'; diff --git a/node_modules/@mikro-orm/core/types/ArrayType.d.ts b/node_modules/@mikro-orm/core/types/ArrayType.d.ts deleted file mode 100644 index 5e695c9..0000000 --- a/node_modules/@mikro-orm/core/types/ArrayType.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { type TransformContext, Type } from './Type.js'; -import type { EntityProperty } from '../typings.js'; -import type { Platform } from '../platforms/Platform.js'; -/** Maps a database text/array column to a JS array, using platform-specific marshalling (e.g., PostgreSQL arrays or comma-separated strings). */ -export declare class ArrayType extends Type { - private readonly toJsValue; - private readonly toDbValue; - constructor(toJsValue?: (i: string) => T, toDbValue?: (i: T) => string); - convertToDatabaseValue(value: T[] | null, platform: Platform, context?: TransformContext): string | null; - convertToJSValue(value: T[] | string | null, platform: Platform): T[] | null; - compareAsType(): string; - toJSON(value: T[]): T[]; - getColumnType(prop: EntityProperty, platform: Platform): string; -} diff --git a/node_modules/@mikro-orm/core/types/ArrayType.js b/node_modules/@mikro-orm/core/types/ArrayType.js deleted file mode 100644 index 8c38a8b..0000000 --- a/node_modules/@mikro-orm/core/types/ArrayType.js +++ /dev/null @@ -1,43 +0,0 @@ -import { Type } from './Type.js'; -import { ValidationError } from '../errors.js'; -/** Maps a database text/array column to a JS array, using platform-specific marshalling (e.g., PostgreSQL arrays or comma-separated strings). */ -export class ArrayType extends Type { - toJsValue; - toDbValue; - constructor(toJsValue = i => i, toDbValue = i => i) { - super(); - this.toJsValue = toJsValue; - this.toDbValue = toDbValue; - } - convertToDatabaseValue(value, platform, context) { - if (!value) { - return value; - } - if (Array.isArray(value)) { - return platform.marshallArray(value.map(i => this.toDbValue(i))); - } - /* v8 ignore next */ - if (context?.fromQuery) { - return value; - } - throw ValidationError.invalidType(ArrayType, value, 'JS'); - } - convertToJSValue(value, platform) { - if (value == null) { - return value; - } - if (typeof value === 'string') { - value = platform.unmarshallArray(value); - } - return value.map(i => this.toJsValue(i)); - } - compareAsType() { - return 'string[]'; - } - toJSON(value) { - return value; - } - getColumnType(prop, platform) { - return platform.getArrayDeclarationSQL(); - } -} diff --git a/node_modules/@mikro-orm/core/types/BigIntType.d.ts b/node_modules/@mikro-orm/core/types/BigIntType.d.ts deleted file mode 100644 index e3cefee..0000000 --- a/node_modules/@mikro-orm/core/types/BigIntType.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Type } from './Type.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { EntityProperty } from '../typings.js'; -/** - * This type will automatically convert string values returned from the database to native JS bigints (default) - * or numbers (safe only for values up to `Number.MAX_SAFE_INTEGER`), or strings, depending on the `mode`. - */ -export declare class BigIntType extends Type< - JSTypeByMode | null | undefined, - string | null | undefined -> { - mode?: Mode | undefined; - constructor(mode?: Mode | undefined); - convertToDatabaseValue(value: JSTypeByMode | null | undefined): string | null | undefined; - convertToJSValue(value: string | bigint | null | undefined): JSTypeByMode | null | undefined; - toJSON(value: JSTypeByMode | null | undefined): JSTypeByMode | null | undefined; - getColumnType(prop: EntityProperty, platform: Platform): string; - compareAsType(): string; - compareValues(a: string, b: string): boolean; -} -type JSTypeByMode = Mode extends 'bigint' - ? bigint - : Mode extends 'number' - ? number - : string; -export {}; diff --git a/node_modules/@mikro-orm/core/types/BigIntType.js b/node_modules/@mikro-orm/core/types/BigIntType.js deleted file mode 100644 index 5a7564e..0000000 --- a/node_modules/@mikro-orm/core/types/BigIntType.js +++ /dev/null @@ -1,48 +0,0 @@ -import { Type } from './Type.js'; -/** - * This type will automatically convert string values returned from the database to native JS bigints (default) - * or numbers (safe only for values up to `Number.MAX_SAFE_INTEGER`), or strings, depending on the `mode`. - */ -export class BigIntType extends Type { - mode; - constructor(mode) { - super(); - this.mode = mode; - } - convertToDatabaseValue(value) { - if (value == null) { - return value; - } - return '' + value; - } - convertToJSValue(value) { - /* v8 ignore next */ - if (value == null) { - return value; - } - switch (this.mode) { - case 'number': - return Number(value); - case 'string': - return String(value); - case 'bigint': - default: - return BigInt(String(value)); - } - } - toJSON(value) { - if (this.mode === 'number') { - return value; - } - return this.convertToDatabaseValue(value); - } - getColumnType(prop, platform) { - return platform.getBigIntTypeDeclarationSQL(prop); - } - compareAsType() { - return this.mode ?? 'bigint'; - } - compareValues(a, b) { - return String(a) === String(b); - } -} diff --git a/node_modules/@mikro-orm/core/types/BlobType.d.ts b/node_modules/@mikro-orm/core/types/BlobType.d.ts deleted file mode 100644 index 975a242..0000000 --- a/node_modules/@mikro-orm/core/types/BlobType.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Uint8ArrayType } from './Uint8ArrayType.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { EntityProperty } from '../typings.js'; -/** Maps a database BLOB/BYTEA column to a Node.js `Buffer`. */ -export declare class BlobType extends Uint8ArrayType { - convertToJSValue(value: Buffer): Buffer | null; - compareAsType(): string; - getColumnType(prop: EntityProperty, platform: Platform): string; -} diff --git a/node_modules/@mikro-orm/core/types/BlobType.js b/node_modules/@mikro-orm/core/types/BlobType.js deleted file mode 100644 index 47aecd7..0000000 --- a/node_modules/@mikro-orm/core/types/BlobType.js +++ /dev/null @@ -1,19 +0,0 @@ -import { Uint8ArrayType } from './Uint8ArrayType.js'; -/** Maps a database BLOB/BYTEA column to a Node.js `Buffer`. */ -export class BlobType extends Uint8ArrayType { - convertToJSValue(value) { - if (value instanceof Buffer || !value) { - return value; - } - if (value.buffer instanceof Buffer) { - return value.buffer; - } - return Buffer.from(value); - } - compareAsType() { - return 'Buffer'; - } - getColumnType(prop, platform) { - return platform.getBlobDeclarationSQL(); - } -} diff --git a/node_modules/@mikro-orm/core/types/BooleanType.d.ts b/node_modules/@mikro-orm/core/types/BooleanType.d.ts deleted file mode 100644 index 0753c8a..0000000 --- a/node_modules/@mikro-orm/core/types/BooleanType.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Type } from './Type.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { EntityProperty } from '../typings.js'; -/** Maps a database BOOLEAN/TINYINT(1) column to a JS `boolean`. */ -export declare class BooleanType extends Type { - getColumnType(prop: EntityProperty, platform: Platform): string; - compareAsType(): string; - convertToJSValue(value: boolean | null | undefined): boolean | null | undefined; - ensureComparable(): boolean; -} diff --git a/node_modules/@mikro-orm/core/types/BooleanType.js b/node_modules/@mikro-orm/core/types/BooleanType.js deleted file mode 100644 index 702a043..0000000 --- a/node_modules/@mikro-orm/core/types/BooleanType.js +++ /dev/null @@ -1,16 +0,0 @@ -import { Type } from './Type.js'; -/** Maps a database BOOLEAN/TINYINT(1) column to a JS `boolean`. */ -export class BooleanType extends Type { - getColumnType(prop, platform) { - return platform.getBooleanTypeDeclarationSQL(); - } - compareAsType() { - return 'boolean'; - } - convertToJSValue(value) { - return Boolean(value); - } - ensureComparable() { - return false; - } -} diff --git a/node_modules/@mikro-orm/core/types/CharacterType.d.ts b/node_modules/@mikro-orm/core/types/CharacterType.d.ts deleted file mode 100644 index 082e1b1..0000000 --- a/node_modules/@mikro-orm/core/types/CharacterType.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { StringType } from './StringType.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { EntityProperty } from '../typings.js'; -/** Maps a database CHAR (fixed-length) column to a JS `string`. */ -export declare class CharacterType extends StringType { - getColumnType(prop: EntityProperty, platform: Platform): string; - getDefaultLength(platform: Platform): number; -} diff --git a/node_modules/@mikro-orm/core/types/CharacterType.js b/node_modules/@mikro-orm/core/types/CharacterType.js deleted file mode 100644 index a456637..0000000 --- a/node_modules/@mikro-orm/core/types/CharacterType.js +++ /dev/null @@ -1,10 +0,0 @@ -import { StringType } from './StringType.js'; -/** Maps a database CHAR (fixed-length) column to a JS `string`. */ -export class CharacterType extends StringType { - getColumnType(prop, platform) { - return platform.getCharTypeDeclarationSQL(prop); - } - getDefaultLength(platform) { - return platform.getDefaultCharLength(); - } -} diff --git a/node_modules/@mikro-orm/core/types/DateTimeType.d.ts b/node_modules/@mikro-orm/core/types/DateTimeType.d.ts deleted file mode 100644 index b4f51c9..0000000 --- a/node_modules/@mikro-orm/core/types/DateTimeType.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Type } from './Type.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { EntityProperty } from '../typings.js'; -/** Maps a database DATETIME/TIMESTAMP column to a JS `Date` object. */ -export declare class DateTimeType extends Type { - getColumnType(prop: EntityProperty, platform: Platform): string; - compareAsType(): string; - get runtimeType(): string; - ensureComparable(): boolean; - getDefaultLength(platform: Platform): number; -} diff --git a/node_modules/@mikro-orm/core/types/DateTimeType.js b/node_modules/@mikro-orm/core/types/DateTimeType.js deleted file mode 100644 index 28edca3..0000000 --- a/node_modules/@mikro-orm/core/types/DateTimeType.js +++ /dev/null @@ -1,19 +0,0 @@ -import { Type } from './Type.js'; -/** Maps a database DATETIME/TIMESTAMP column to a JS `Date` object. */ -export class DateTimeType extends Type { - getColumnType(prop, platform) { - return platform.getDateTimeTypeDeclarationSQL({ length: prop.length }); - } - compareAsType() { - return 'Date'; - } - get runtimeType() { - return 'Date'; - } - ensureComparable() { - return false; - } - getDefaultLength(platform) { - return platform.getDefaultDateTimeLength(); - } -} diff --git a/node_modules/@mikro-orm/core/types/DateType.d.ts b/node_modules/@mikro-orm/core/types/DateType.d.ts deleted file mode 100644 index cf95ce4..0000000 --- a/node_modules/@mikro-orm/core/types/DateType.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Type } from './Type.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { EntityProperty } from '../typings.js'; -/** Maps a database DATE column (date without time) to a JS `string` in YYYY-MM-DD format. */ -export declare class DateType extends Type { - compareAsType(): string; - ensureComparable(): boolean; - convertToJSValue(value: any, platform: Platform): string | null | undefined; - getColumnType(prop: EntityProperty, platform: Platform): string; - getDefaultLength(platform: Platform): number; -} diff --git a/node_modules/@mikro-orm/core/types/DateType.js b/node_modules/@mikro-orm/core/types/DateType.js deleted file mode 100644 index d8ed891..0000000 --- a/node_modules/@mikro-orm/core/types/DateType.js +++ /dev/null @@ -1,19 +0,0 @@ -import { Type } from './Type.js'; -/** Maps a database DATE column (date without time) to a JS `string` in YYYY-MM-DD format. */ -export class DateType extends Type { - compareAsType() { - return 'string'; - } - ensureComparable() { - return false; - } - convertToJSValue(value, platform) { - return platform.convertDateToJSValue(value); - } - getColumnType(prop, platform) { - return platform.getDateTypeDeclarationSQL(prop.length); - } - getDefaultLength(platform) { - return 0; - } -} diff --git a/node_modules/@mikro-orm/core/types/DecimalType.d.ts b/node_modules/@mikro-orm/core/types/DecimalType.d.ts deleted file mode 100644 index 9a52ee7..0000000 --- a/node_modules/@mikro-orm/core/types/DecimalType.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Type } from './Type.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { EntityProperty } from '../typings.js'; -/** - * Type that maps an SQL DECIMAL to a JS string or number. - */ -export declare class DecimalType extends Type, string> { - mode?: Mode | undefined; - constructor(mode?: Mode | undefined); - convertToJSValue(value: string): JSTypeByMode; - compareValues(a: string, b: string): boolean; - private format; - getColumnType(prop: EntityProperty, platform: Platform): string; - compareAsType(): string; -} -type JSTypeByMode = Mode extends 'number' ? number : string; -export {}; diff --git a/node_modules/@mikro-orm/core/types/DecimalType.js b/node_modules/@mikro-orm/core/types/DecimalType.js deleted file mode 100644 index 754d5b8..0000000 --- a/node_modules/@mikro-orm/core/types/DecimalType.js +++ /dev/null @@ -1,35 +0,0 @@ -import { Type } from './Type.js'; -/** - * Type that maps an SQL DECIMAL to a JS string or number. - */ -export class DecimalType extends Type { - mode; - constructor(mode) { - super(); - this.mode = mode; - } - /* v8 ignore next */ - convertToJSValue(value) { - if ((this.mode ?? this.prop?.runtimeType) === 'number') { - return +value; - } - return String(value); - } - compareValues(a, b) { - return this.format(a) === this.format(b); - } - format(val) { - /* v8 ignore next */ - if (this.prop?.scale == null) { - return +val; - } - const base = Math.pow(10, this.prop.scale); - return Math.round((+val + Number.EPSILON) * base) / base; - } - getColumnType(prop, platform) { - return platform.getDecimalTypeDeclarationSQL(prop); - } - compareAsType() { - return this.mode ?? this.prop?.runtimeType ?? 'string'; - } -} diff --git a/node_modules/@mikro-orm/core/types/DoubleType.d.ts b/node_modules/@mikro-orm/core/types/DoubleType.d.ts deleted file mode 100644 index 9d25b7d..0000000 --- a/node_modules/@mikro-orm/core/types/DoubleType.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Type } from './Type.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { EntityProperty } from '../typings.js'; -/** - * Type that maps an SQL DOUBLE to a JS string or number. - */ -export declare class DoubleType extends Type { - convertToJSValue(value: string): number | string; - getColumnType(prop: EntityProperty, platform: Platform): string; - compareAsType(): string; -} diff --git a/node_modules/@mikro-orm/core/types/DoubleType.js b/node_modules/@mikro-orm/core/types/DoubleType.js deleted file mode 100644 index b4a9a4c..0000000 --- a/node_modules/@mikro-orm/core/types/DoubleType.js +++ /dev/null @@ -1,19 +0,0 @@ -import { Type } from './Type.js'; -/** - * Type that maps an SQL DOUBLE to a JS string or number. - */ -export class DoubleType extends Type { - /* v8 ignore next */ - convertToJSValue(value) { - if (this.prop?.runtimeType === 'number') { - return +value; - } - return String(value); - } - getColumnType(prop, platform) { - return platform.getDoubleDeclarationSQL(); - } - compareAsType() { - return this.prop?.runtimeType ?? 'number'; - } -} diff --git a/node_modules/@mikro-orm/core/types/EnumArrayType.d.ts b/node_modules/@mikro-orm/core/types/EnumArrayType.d.ts deleted file mode 100644 index 1594343..0000000 --- a/node_modules/@mikro-orm/core/types/EnumArrayType.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ArrayType } from './ArrayType.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { TransformContext } from './Type.js'; -import type { EntityProperty } from '../typings.js'; -/** Maps a database array column to a JS array of enum values, with validation against allowed enum items. */ -export declare class EnumArrayType extends ArrayType { - private readonly owner; - private readonly items?; - constructor(owner: string, items?: T[] | undefined, hydrate?: (i: string) => T); - convertToDatabaseValue(value: T[] | null, platform: Platform, context?: TransformContext): string | null; - getColumnType(prop: EntityProperty, platform: Platform): string; -} diff --git a/node_modules/@mikro-orm/core/types/EnumArrayType.js b/node_modules/@mikro-orm/core/types/EnumArrayType.js deleted file mode 100644 index 6aaf8e0..0000000 --- a/node_modules/@mikro-orm/core/types/EnumArrayType.js +++ /dev/null @@ -1,33 +0,0 @@ -import { ArrayType } from './ArrayType.js'; -import { ValidationError } from '../errors.js'; -function mapHydrator(items, hydrate) { - if (items && items.length > 0 && typeof items[0] === 'number') { - return i => +i; - } - return hydrate; -} -/** Maps a database array column to a JS array of enum values, with validation against allowed enum items. */ -export class EnumArrayType extends ArrayType { - owner; - items; - constructor(owner, items, hydrate = i => i) { - super(mapHydrator(items, hydrate)); - this.owner = owner; - this.items = items; - } - convertToDatabaseValue(value, platform, context) { - if (Array.isArray(value) && Array.isArray(this.items)) { - const invalid = value.filter(v => !this.items.includes(v)); - if (invalid.length > 0) { - throw ValidationError.invalidEnumArrayItems(this.owner, invalid); - } - } - return super.convertToDatabaseValue(value, platform, context); - } - getColumnType(prop, platform) { - if (prop.nativeEnumName) { - return `${prop.nativeEnumName}[]`; - } - return super.getColumnType(prop, platform); - } -} diff --git a/node_modules/@mikro-orm/core/types/EnumType.d.ts b/node_modules/@mikro-orm/core/types/EnumType.d.ts deleted file mode 100644 index cf44379..0000000 --- a/node_modules/@mikro-orm/core/types/EnumType.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Type } from './Type.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { EntityProperty } from '../typings.js'; -/** Maps a database ENUM or equivalent column to a JS string. Supports native database enums when available. */ -export declare class EnumType extends Type { - getColumnType(prop: EntityProperty, platform: Platform): string; - compareAsType(): string; - ensureComparable(): boolean; -} diff --git a/node_modules/@mikro-orm/core/types/EnumType.js b/node_modules/@mikro-orm/core/types/EnumType.js deleted file mode 100644 index b78c39d..0000000 --- a/node_modules/@mikro-orm/core/types/EnumType.js +++ /dev/null @@ -1,16 +0,0 @@ -import { Type } from './Type.js'; -/** Maps a database ENUM or equivalent column to a JS string. Supports native database enums when available. */ -export class EnumType extends Type { - getColumnType(prop, platform) { - if (prop.nativeEnumName) { - return prop.nativeEnumName; - } - return prop.columnTypes?.[0] ?? platform.getEnumTypeDeclarationSQL(prop); - } - compareAsType() { - return 'string'; - } - ensureComparable() { - return false; - } -} diff --git a/node_modules/@mikro-orm/core/types/FloatType.d.ts b/node_modules/@mikro-orm/core/types/FloatType.d.ts deleted file mode 100644 index b1e094e..0000000 --- a/node_modules/@mikro-orm/core/types/FloatType.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Type } from './Type.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { EntityProperty } from '../typings.js'; -/** Maps a database FLOAT column to a JS `number`. */ -export declare class FloatType extends Type { - getColumnType(prop: EntityProperty, platform: Platform): string; - compareAsType(): string; - ensureComparable(): boolean; -} diff --git a/node_modules/@mikro-orm/core/types/FloatType.js b/node_modules/@mikro-orm/core/types/FloatType.js deleted file mode 100644 index 5baefa1..0000000 --- a/node_modules/@mikro-orm/core/types/FloatType.js +++ /dev/null @@ -1,13 +0,0 @@ -import { Type } from './Type.js'; -/** Maps a database FLOAT column to a JS `number`. */ -export class FloatType extends Type { - getColumnType(prop, platform) { - return platform.getFloatDeclarationSQL(); - } - compareAsType() { - return 'number'; - } - ensureComparable() { - return false; - } -} diff --git a/node_modules/@mikro-orm/core/types/IntegerType.d.ts b/node_modules/@mikro-orm/core/types/IntegerType.d.ts deleted file mode 100644 index 56a1862..0000000 --- a/node_modules/@mikro-orm/core/types/IntegerType.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Type } from './Type.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { EntityProperty } from '../typings.js'; -/** Maps a database INTEGER/INT column to a JS `number`. */ -export declare class IntegerType extends Type { - getColumnType(prop: EntityProperty, platform: Platform): string; - compareAsType(): string; - ensureComparable(): boolean; -} diff --git a/node_modules/@mikro-orm/core/types/IntegerType.js b/node_modules/@mikro-orm/core/types/IntegerType.js deleted file mode 100644 index f24c798..0000000 --- a/node_modules/@mikro-orm/core/types/IntegerType.js +++ /dev/null @@ -1,13 +0,0 @@ -import { Type } from './Type.js'; -/** Maps a database INTEGER/INT column to a JS `number`. */ -export class IntegerType extends Type { - getColumnType(prop, platform) { - return platform.getIntegerTypeDeclarationSQL(prop); - } - compareAsType() { - return 'number'; - } - ensureComparable() { - return false; - } -} diff --git a/node_modules/@mikro-orm/core/types/IntervalType.d.ts b/node_modules/@mikro-orm/core/types/IntervalType.d.ts deleted file mode 100644 index 2aae2aa..0000000 --- a/node_modules/@mikro-orm/core/types/IntervalType.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Type } from './Type.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { EntityProperty } from '../typings.js'; -/** Maps a database INTERVAL column (PostgreSQL) to a JS `string`. */ -export declare class IntervalType extends Type { - getColumnType(prop: EntityProperty, platform: Platform): string; - convertToJSValue(value: string | null | undefined, platform: Platform): string | null | undefined; - convertToDatabaseValue(value: string | null | undefined, platform: Platform): string | null | undefined; - getDefaultLength(platform: Platform): number; -} diff --git a/node_modules/@mikro-orm/core/types/IntervalType.js b/node_modules/@mikro-orm/core/types/IntervalType.js deleted file mode 100644 index 14693ab..0000000 --- a/node_modules/@mikro-orm/core/types/IntervalType.js +++ /dev/null @@ -1,16 +0,0 @@ -import { Type } from './Type.js'; -/** Maps a database INTERVAL column (PostgreSQL) to a JS `string`. */ -export class IntervalType extends Type { - getColumnType(prop, platform) { - return platform.getIntervalTypeDeclarationSQL(prop); - } - convertToJSValue(value, platform) { - return platform.convertIntervalToJSValue(value); - } - convertToDatabaseValue(value, platform) { - return platform.convertIntervalToDatabaseValue(value); - } - getDefaultLength(platform) { - return platform.getDefaultDateTimeLength(); - } -} diff --git a/node_modules/@mikro-orm/core/types/JsonType.d.ts b/node_modules/@mikro-orm/core/types/JsonType.d.ts deleted file mode 100644 index d96f866..0000000 --- a/node_modules/@mikro-orm/core/types/JsonType.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Type, type TransformContext } from './Type.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { EntityMetadata, EntityProperty } from '../typings.js'; -/** Maps a database JSON/JSONB column to a JS object, handling serialization and deserialization. */ -export declare class JsonType extends Type { - convertToDatabaseValue(value: unknown, platform: Platform, context?: TransformContext): string | null; - convertToJSValueSQL(key: string, platform: Platform): string; - convertToDatabaseValueSQL(key: string, platform: Platform): string; - convertToJSValue(value: string | unknown, platform: Platform, context?: TransformContext): unknown; - getColumnType(prop: EntityProperty, platform: Platform): string; - ensureComparable(meta: EntityMetadata, prop: EntityProperty): boolean; - compareAsType(): string; - get runtimeType(): string; -} diff --git a/node_modules/@mikro-orm/core/types/JsonType.js b/node_modules/@mikro-orm/core/types/JsonType.js deleted file mode 100644 index e545e96..0000000 --- a/node_modules/@mikro-orm/core/types/JsonType.js +++ /dev/null @@ -1,36 +0,0 @@ -import { Type } from './Type.js'; -/** Maps a database JSON/JSONB column to a JS object, handling serialization and deserialization. */ -export class JsonType extends Type { - convertToDatabaseValue(value, platform, context) { - if (value == null) { - return value; - } - return platform.convertJsonToDatabaseValue(value, context); - } - convertToJSValueSQL(key, platform) { - return key + platform.castJsonValue(this.prop); - } - convertToDatabaseValueSQL(key, platform) { - return key + platform.castColumn(this.prop); - } - convertToJSValue(value, platform, context) { - const isJsonColumn = ['json', 'jsonb', platform.getJsonDeclarationSQL()].includes(this.prop.columnTypes[0]); - const isObjectEmbedded = this.prop.embedded && this.prop.object; - if ((platform.convertsJsonAutomatically() || isObjectEmbedded) && isJsonColumn && !context?.force) { - return value; - } - return platform.convertJsonToJSValue(value, context); - } - getColumnType(prop, platform) { - return platform.getJsonDeclarationSQL(); - } - ensureComparable(meta, prop) { - return !prop.embedded || !meta.properties[prop.embedded[0]].object; - } - compareAsType() { - return 'any'; - } - get runtimeType() { - return 'any'; - } -} diff --git a/node_modules/@mikro-orm/core/types/MediumIntType.d.ts b/node_modules/@mikro-orm/core/types/MediumIntType.d.ts deleted file mode 100644 index 4d6dd37..0000000 --- a/node_modules/@mikro-orm/core/types/MediumIntType.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { Platform } from '../platforms/Platform.js'; -import type { EntityProperty } from '../typings.js'; -import { IntegerType } from './IntegerType.js'; -/** Maps a database MEDIUMINT column to a JS `number`. */ -export declare class MediumIntType extends IntegerType { - getColumnType(prop: EntityProperty, platform: Platform): string; -} diff --git a/node_modules/@mikro-orm/core/types/MediumIntType.js b/node_modules/@mikro-orm/core/types/MediumIntType.js deleted file mode 100644 index 12cfec7..0000000 --- a/node_modules/@mikro-orm/core/types/MediumIntType.js +++ /dev/null @@ -1,7 +0,0 @@ -import { IntegerType } from './IntegerType.js'; -/** Maps a database MEDIUMINT column to a JS `number`. */ -export class MediumIntType extends IntegerType { - getColumnType(prop, platform) { - return platform.getMediumIntTypeDeclarationSQL(prop); - } -} diff --git a/node_modules/@mikro-orm/core/types/SmallIntType.d.ts b/node_modules/@mikro-orm/core/types/SmallIntType.d.ts deleted file mode 100644 index a6766ab..0000000 --- a/node_modules/@mikro-orm/core/types/SmallIntType.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Type } from './Type.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { EntityProperty } from '../typings.js'; -/** Maps a database SMALLINT column to a JS `number`. */ -export declare class SmallIntType extends Type { - getColumnType(prop: EntityProperty, platform: Platform): string; - compareAsType(): string; - ensureComparable(): boolean; -} diff --git a/node_modules/@mikro-orm/core/types/SmallIntType.js b/node_modules/@mikro-orm/core/types/SmallIntType.js deleted file mode 100644 index 75cabf1..0000000 --- a/node_modules/@mikro-orm/core/types/SmallIntType.js +++ /dev/null @@ -1,13 +0,0 @@ -import { Type } from './Type.js'; -/** Maps a database SMALLINT column to a JS `number`. */ -export class SmallIntType extends Type { - getColumnType(prop, platform) { - return platform.getSmallIntTypeDeclarationSQL(prop); - } - compareAsType() { - return 'number'; - } - ensureComparable() { - return false; - } -} diff --git a/node_modules/@mikro-orm/core/types/StringType.d.ts b/node_modules/@mikro-orm/core/types/StringType.d.ts deleted file mode 100644 index a08fc2b..0000000 --- a/node_modules/@mikro-orm/core/types/StringType.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Type } from './Type.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { EntityProperty } from '../typings.js'; -/** Maps a database VARCHAR column to a JS `string`. */ -export declare class StringType extends Type { - getColumnType(prop: EntityProperty, platform: Platform): string; - compareAsType(): string; - ensureComparable(): boolean; - getDefaultLength(platform: Platform): number; -} diff --git a/node_modules/@mikro-orm/core/types/StringType.js b/node_modules/@mikro-orm/core/types/StringType.js deleted file mode 100644 index d843883..0000000 --- a/node_modules/@mikro-orm/core/types/StringType.js +++ /dev/null @@ -1,16 +0,0 @@ -import { Type } from './Type.js'; -/** Maps a database VARCHAR column to a JS `string`. */ -export class StringType extends Type { - getColumnType(prop, platform) { - return platform.getVarcharTypeDeclarationSQL(prop); - } - compareAsType() { - return 'string'; - } - ensureComparable() { - return false; - } - getDefaultLength(platform) { - return platform.getDefaultVarcharLength(); - } -} diff --git a/node_modules/@mikro-orm/core/types/TextType.d.ts b/node_modules/@mikro-orm/core/types/TextType.d.ts deleted file mode 100644 index dda32ed..0000000 --- a/node_modules/@mikro-orm/core/types/TextType.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Type } from './Type.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { EntityProperty } from '../typings.js'; -/** Maps a database TEXT column (unbounded length) to a JS `string`. */ -export declare class TextType extends Type { - getColumnType(prop: EntityProperty, platform: Platform): string; - compareAsType(): string; - ensureComparable(): boolean; -} diff --git a/node_modules/@mikro-orm/core/types/TextType.js b/node_modules/@mikro-orm/core/types/TextType.js deleted file mode 100644 index 38381a0..0000000 --- a/node_modules/@mikro-orm/core/types/TextType.js +++ /dev/null @@ -1,13 +0,0 @@ -import { Type } from './Type.js'; -/** Maps a database TEXT column (unbounded length) to a JS `string`. */ -export class TextType extends Type { - getColumnType(prop, platform) { - return platform.getTextTypeDeclarationSQL(prop); - } - compareAsType() { - return 'string'; - } - ensureComparable() { - return false; - } -} diff --git a/node_modules/@mikro-orm/core/types/TimeType.d.ts b/node_modules/@mikro-orm/core/types/TimeType.d.ts deleted file mode 100644 index d8a3fd8..0000000 --- a/node_modules/@mikro-orm/core/types/TimeType.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Type } from './Type.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { EntityProperty } from '../typings.js'; -/** Maps a database TIME column to a JS `string` in HH:MM:SS format. */ -export declare class TimeType extends Type { - convertToDatabaseValue(value: any, platform: Platform): string; - compareAsType(): string; - ensureComparable(): boolean; - getColumnType(prop: EntityProperty, platform: Platform): string; - getDefaultLength(platform: Platform): number; -} diff --git a/node_modules/@mikro-orm/core/types/TimeType.js b/node_modules/@mikro-orm/core/types/TimeType.js deleted file mode 100644 index 2b7a1ee..0000000 --- a/node_modules/@mikro-orm/core/types/TimeType.js +++ /dev/null @@ -1,23 +0,0 @@ -import { Type } from './Type.js'; -import { ValidationError } from '../errors.js'; -/** Maps a database TIME column to a JS `string` in HH:MM:SS format. */ -export class TimeType extends Type { - convertToDatabaseValue(value, platform) { - if (value && !value.toString().match(/^\d{2,}:(?:[0-5]\d):(?:[0-5]\d)$/)) { - throw ValidationError.invalidType(TimeType, value, 'JS'); - } - return super.convertToDatabaseValue(value, platform); - } - compareAsType() { - return 'string'; - } - ensureComparable() { - return false; - } - getColumnType(prop, platform) { - return platform.getTimeTypeDeclarationSQL(prop.length); - } - getDefaultLength(platform) { - return platform.getDefaultDateTimeLength(); - } -} diff --git a/node_modules/@mikro-orm/core/types/TinyIntType.d.ts b/node_modules/@mikro-orm/core/types/TinyIntType.d.ts deleted file mode 100644 index 92e614a..0000000 --- a/node_modules/@mikro-orm/core/types/TinyIntType.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Type } from './Type.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { EntityProperty } from '../typings.js'; -/** Maps a database TINYINT column to a JS `number`. */ -export declare class TinyIntType extends Type { - getColumnType(prop: EntityProperty, platform: Platform): string; - compareAsType(): string; - ensureComparable(): boolean; -} diff --git a/node_modules/@mikro-orm/core/types/TinyIntType.js b/node_modules/@mikro-orm/core/types/TinyIntType.js deleted file mode 100644 index 538f756..0000000 --- a/node_modules/@mikro-orm/core/types/TinyIntType.js +++ /dev/null @@ -1,14 +0,0 @@ -import { Type } from './Type.js'; -/** Maps a database TINYINT column to a JS `number`. */ -export class TinyIntType extends Type { - getColumnType(prop, platform) { - return platform.getTinyIntTypeDeclarationSQL(prop); - } - compareAsType() { - return 'number'; - } - /* v8 ignore next */ - ensureComparable() { - return false; - } -} diff --git a/node_modules/@mikro-orm/core/types/Type.d.ts b/node_modules/@mikro-orm/core/types/Type.d.ts deleted file mode 100644 index a92d02d..0000000 --- a/node_modules/@mikro-orm/core/types/Type.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -import type { Platform } from '../platforms/Platform.js'; -import type { Constructor, EntityMetadata, EntityProperty } from '../typings.js'; -/** @internal */ -export declare const ORM_TYPE: unique symbol; -/** Context passed to type conversion methods, indicating the conversion mode and source. */ -export interface TransformContext { - fromQuery?: boolean; - force?: boolean; - key?: string; - mode?: 'hydration' | 'query' | 'query-data' | 'discovery' | 'serialization'; -} -/** Branded type helper for mapping between JS runtime, database raw, and JSON serialized representations. */ -export type IType = Runtime & { - __raw?: Raw; - __runtime?: Runtime; - __serialized?: Serialized; -}; -/** Abstract base class for custom property types that handle conversion between JS and database representations. */ -export declare abstract class Type { - private static readonly types; - platform?: Platform; - meta?: EntityMetadata; - prop?: EntityProperty; - /** - * Converts a value from its JS representation to its database representation of this type. - */ - convertToDatabaseValue(value: JSType, platform: Platform, context?: TransformContext): DBType; - /** - * Converts a value from its database representation to its JS representation of this type. - */ - convertToJSValue(value: DBType, platform: Platform, context?: TransformContext): JSType; - /** - * Converts a value from its JS representation to its database representation of this type. - */ - convertToDatabaseValueSQL?(key: string, platform: Platform): string; - /** - * Modifies the SQL expression (identifier, parameter) to convert to a JS value. - */ - convertToJSValueSQL?(key: string, platform: Platform): string; - /** - * How should the raw database values be compared? Used in `EntityComparator`. - * Possible values: string | number | bigint | boolean | date | any | buffer | array - */ - compareAsType(): string; - /** - * Allows to override the internal comparison logic. - */ - compareValues?(a: DBType, b: DBType): boolean; - get runtimeType(): string; - get name(): string; - /** - * When a value is hydrated, we convert it back to the database value to ensure comparability, - * as often the raw database response is not the same as the `convertToDatabaseValue` result. - * This allows to disable the additional conversion in case you know it is not needed. - */ - ensureComparable(meta: EntityMetadata, prop: EntityProperty): boolean; - /** - * Converts a value from its JS representation to its serialized JSON form of this type. - * By default uses the runtime value. - */ - toJSON(value: JSType, platform: Platform): JSType | DBType; - /** - * Gets the SQL declaration snippet for a field of this type. - */ - getColumnType(prop: EntityProperty, platform: Platform): string; - /** - * Get the default length for values of this type - * - * When doing schema generation, if neither "length" nor "columnType" option is provided, - * the length will be defaulted to this value. - * - * When doing entity generation, if the type is recognized to this type, and the inferred length is this value, - * the length option will be omitted in the output. If this method is not defined, length is always outputted - * based on what is in the database metadata. - * - * @param platform The platform the default will be used for. - * - * @return The default value for the given platform. - */ - getDefaultLength?(platform: Platform): number; - static getType< - JSType, - DBType = JSType, - TypeClass extends Constructor> = Constructor>, - >(cls: TypeClass): InstanceType; - /** - * Checks whether the argument is instance of `Type`. - */ - static isMappedType(data: any): data is Type; - /** - * @internal - * Returns the built-in type registry key if the given constructor is a branded ORM type - * (not a user subclass). Uses `Symbol.for()` so it works across CJS/ESM module graphs. - */ - static getOrmType(cls: object): string | undefined; -} diff --git a/node_modules/@mikro-orm/core/types/Type.js b/node_modules/@mikro-orm/core/types/Type.js deleted file mode 100644 index 320d89f..0000000 --- a/node_modules/@mikro-orm/core/types/Type.js +++ /dev/null @@ -1,91 +0,0 @@ -import { inspect } from '../logging/inspect.js'; -/** @internal */ -export const ORM_TYPE = Symbol.for('@mikro-orm/type'); -/** Abstract base class for custom property types that handle conversion between JS and database representations. */ -export class Type { - static types = new Map(); - platform; - meta; - prop; - /** - * Converts a value from its JS representation to its database representation of this type. - */ - convertToDatabaseValue(value, platform, context) { - return value; - } - /** - * Converts a value from its database representation to its JS representation of this type. - */ - convertToJSValue(value, platform, context) { - return value; - } - /** - * How should the raw database values be compared? Used in `EntityComparator`. - * Possible values: string | number | bigint | boolean | date | any | buffer | array - */ - compareAsType() { - return 'any'; - } - get runtimeType() { - const compareType = this.compareAsType(); - return compareType === 'any' ? 'string' : compareType; - } - get name() { - return this.constructor.name; - } - /** - * When a value is hydrated, we convert it back to the database value to ensure comparability, - * as often the raw database response is not the same as the `convertToDatabaseValue` result. - * This allows to disable the additional conversion in case you know it is not needed. - */ - ensureComparable(meta, prop) { - return true; - } - /** - * Converts a value from its JS representation to its serialized JSON form of this type. - * By default uses the runtime value. - */ - toJSON(value, platform) { - return value; - } - /** - * Gets the SQL declaration snippet for a field of this type. - */ - getColumnType(prop, platform) { - return prop.columnTypes?.[0] ?? platform.getTextTypeDeclarationSQL(prop); - } - static getType(cls) { - const key = cls.name; - if (!Type.types.has(key)) { - Type.types.set(key, new cls()); - } - return Type.types.get(key); - } - /** - * Checks whether the argument is instance of `Type`. - */ - static isMappedType(data) { - return !!data?.__mappedType; - } - /** - * @internal - * Returns the built-in type registry key if the given constructor is a branded ORM type - * (not a user subclass). Uses `Symbol.for()` so it works across CJS/ESM module graphs. - */ - static getOrmType(cls) { - return Object.hasOwn(cls, ORM_TYPE) ? cls[ORM_TYPE] : undefined; - } - /** @ignore */ - [Symbol.for('nodejs.util.inspect.custom')](depth = 2) { - const object = { ...this }; - const hidden = ['prop', 'platform', 'meta']; - hidden.forEach(k => delete object[k]); - const ret = inspect(object, { depth }); - const name = this.constructor.name; - /* v8 ignore next */ - return ret === '[Object]' ? `[${name}]` : name + ' ' + ret; - } -} -Object.defineProperties(Type.prototype, { - __mappedType: { value: true, enumerable: false, writable: false }, -}); diff --git a/node_modules/@mikro-orm/core/types/Uint8ArrayType.d.ts b/node_modules/@mikro-orm/core/types/Uint8ArrayType.d.ts deleted file mode 100644 index 7105407..0000000 --- a/node_modules/@mikro-orm/core/types/Uint8ArrayType.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Type } from './Type.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { EntityProperty } from '../typings.js'; -/** Maps a database BLOB/BYTEA column to a JS `Uint8Array`. */ -export declare class Uint8ArrayType extends Type { - convertToDatabaseValue(value: Uint8Array): Buffer; - convertToJSValue(value: Buffer): Uint8Array | null; - compareAsType(): string; - getColumnType(prop: EntityProperty, platform: Platform): string; -} diff --git a/node_modules/@mikro-orm/core/types/Uint8ArrayType.js b/node_modules/@mikro-orm/core/types/Uint8ArrayType.js deleted file mode 100644 index bfeb2cf..0000000 --- a/node_modules/@mikro-orm/core/types/Uint8ArrayType.js +++ /dev/null @@ -1,29 +0,0 @@ -import { Type } from './Type.js'; -/** Maps a database BLOB/BYTEA column to a JS `Uint8Array`. */ -export class Uint8ArrayType extends Type { - convertToDatabaseValue(value) { - if (!value) { - return value; - } - return Buffer.from(value); - } - convertToJSValue(value) { - /* v8 ignore next */ - if (!value) { - return value; - } - if (value instanceof Buffer) { - return new Uint8Array(value); - } - if (value.buffer instanceof Buffer) { - return new Uint8Array(value.buffer); - } - return new Uint8Array(Buffer.from(value)); - } - compareAsType() { - return 'Buffer'; - } - getColumnType(prop, platform) { - return platform.getBlobDeclarationSQL(); - } -} diff --git a/node_modules/@mikro-orm/core/types/UnknownType.d.ts b/node_modules/@mikro-orm/core/types/UnknownType.d.ts deleted file mode 100644 index 0ed45a3..0000000 --- a/node_modules/@mikro-orm/core/types/UnknownType.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { EntityProperty } from '../typings.js'; -import type { Platform } from '../platforms/Platform.js'; -import { Type } from './Type.js'; -/** Passthrough type that performs no conversion, used when the column type is unknown or unrecognized. */ -export declare class UnknownType extends Type { - getColumnType(prop: EntityProperty, platform: Platform): string; - get runtimeType(): string; - compareAsType(): string; - ensureComparable(): boolean; -} diff --git a/node_modules/@mikro-orm/core/types/UnknownType.js b/node_modules/@mikro-orm/core/types/UnknownType.js deleted file mode 100644 index 279687a..0000000 --- a/node_modules/@mikro-orm/core/types/UnknownType.js +++ /dev/null @@ -1,16 +0,0 @@ -import { Type } from './Type.js'; -/** Passthrough type that performs no conversion, used when the column type is unknown or unrecognized. */ -export class UnknownType extends Type { - getColumnType(prop, platform) { - return prop.columnTypes?.[0] ?? platform.getVarcharTypeDeclarationSQL(prop); - } - get runtimeType() { - return 'unknown'; - } - compareAsType() { - return 'unknown'; - } - ensureComparable() { - return false; - } -} diff --git a/node_modules/@mikro-orm/core/types/UuidType.d.ts b/node_modules/@mikro-orm/core/types/UuidType.d.ts deleted file mode 100644 index a701d23..0000000 --- a/node_modules/@mikro-orm/core/types/UuidType.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Type } from './Type.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { EntityProperty } from '../typings.js'; -/** Maps a database UUID column to a JS `string`, with platform-specific normalization. */ -export declare class UuidType extends Type { - getColumnType(prop: EntityProperty, platform: Platform): string; - compareAsType(): string; - convertToDatabaseValue(value: string | null | undefined, platform: Platform): string | null; - convertToJSValue(value: string | null | undefined, platform: Platform): string | null | undefined; - ensureComparable(): boolean; -} diff --git a/node_modules/@mikro-orm/core/types/UuidType.js b/node_modules/@mikro-orm/core/types/UuidType.js deleted file mode 100644 index 46d29df..0000000 --- a/node_modules/@mikro-orm/core/types/UuidType.js +++ /dev/null @@ -1,25 +0,0 @@ -import { Type } from './Type.js'; -/** Maps a database UUID column to a JS `string`, with platform-specific normalization. */ -export class UuidType extends Type { - getColumnType(prop, platform) { - return platform.getUuidTypeDeclarationSQL(prop); - } - compareAsType() { - return this.platform?.compareUuids() ?? 'string'; - } - convertToDatabaseValue(value, platform) { - if (value == null) { - return value; - } - return platform.convertUuidToDatabaseValue(value); - } - convertToJSValue(value, platform) { - if (value == null) { - return value; - } - return platform.convertUuidToJSValue(value); - } - ensureComparable() { - return this.platform?.compareUuids() !== 'string'; - } -} diff --git a/node_modules/@mikro-orm/core/types/index.d.ts b/node_modules/@mikro-orm/core/types/index.d.ts deleted file mode 100644 index 18b3895..0000000 --- a/node_modules/@mikro-orm/core/types/index.d.ts +++ /dev/null @@ -1,107 +0,0 @@ -import { ArrayType } from './ArrayType.js'; -import { BigIntType } from './BigIntType.js'; -import { BlobType } from './BlobType.js'; -import { BooleanType } from './BooleanType.js'; -import { DateTimeType } from './DateTimeType.js'; -import { DateType } from './DateType.js'; -import { DecimalType } from './DecimalType.js'; -import { DoubleType } from './DoubleType.js'; -import { EnumArrayType } from './EnumArrayType.js'; -import { EnumType } from './EnumType.js'; -import { CharacterType } from './CharacterType.js'; -import { FloatType } from './FloatType.js'; -import { IntegerType } from './IntegerType.js'; -import { IntervalType } from './IntervalType.js'; -import { JsonType } from './JsonType.js'; -import { MediumIntType } from './MediumIntType.js'; -import { SmallIntType } from './SmallIntType.js'; -import { StringType } from './StringType.js'; -import { TextType } from './TextType.js'; -import { TimeType } from './TimeType.js'; -import { TinyIntType } from './TinyIntType.js'; -import { type IType, type TransformContext, Type } from './Type.js'; -import { Uint8ArrayType } from './Uint8ArrayType.js'; -import { UnknownType } from './UnknownType.js'; -import { UuidType } from './UuidType.js'; -export type { TransformContext, IType }; -export { - Type, - DateType, - TimeType, - DateTimeType, - BigIntType, - BlobType, - Uint8ArrayType, - ArrayType, - EnumArrayType, - EnumType, - JsonType, - IntegerType, - SmallIntType, - TinyIntType, - MediumIntType, - FloatType, - DoubleType, - BooleanType, - DecimalType, - StringType, - UuidType, - TextType, - UnknownType, - IntervalType, - CharacterType, -}; -/** Registry of all built-in type constructors, keyed by their short name (e.g., `types.integer`, `types.uuid`). */ -export declare const types: { - readonly date: typeof DateType; - readonly time: typeof TimeType; - readonly datetime: typeof DateTimeType; - readonly bigint: typeof BigIntType; - readonly blob: typeof BlobType; - readonly uint8array: typeof Uint8ArrayType; - readonly array: typeof ArrayType; - readonly enumArray: typeof EnumArrayType; - readonly enum: typeof EnumType; - readonly json: typeof JsonType; - readonly integer: typeof IntegerType; - readonly smallint: typeof SmallIntType; - readonly tinyint: typeof TinyIntType; - readonly mediumint: typeof MediumIntType; - readonly float: typeof FloatType; - readonly double: typeof DoubleType; - readonly boolean: typeof BooleanType; - readonly decimal: typeof DecimalType; - readonly character: typeof CharacterType; - readonly string: typeof StringType; - readonly uuid: typeof UuidType; - readonly text: typeof TextType; - readonly interval: typeof IntervalType; - readonly unknown: typeof UnknownType; -}; -/** Shorthand alias for the `types` registry. */ -export declare const t: { - readonly date: typeof DateType; - readonly time: typeof TimeType; - readonly datetime: typeof DateTimeType; - readonly bigint: typeof BigIntType; - readonly blob: typeof BlobType; - readonly uint8array: typeof Uint8ArrayType; - readonly array: typeof ArrayType; - readonly enumArray: typeof EnumArrayType; - readonly enum: typeof EnumType; - readonly json: typeof JsonType; - readonly integer: typeof IntegerType; - readonly smallint: typeof SmallIntType; - readonly tinyint: typeof TinyIntType; - readonly mediumint: typeof MediumIntType; - readonly float: typeof FloatType; - readonly double: typeof DoubleType; - readonly boolean: typeof BooleanType; - readonly decimal: typeof DecimalType; - readonly character: typeof CharacterType; - readonly string: typeof StringType; - readonly uuid: typeof UuidType; - readonly text: typeof TextType; - readonly interval: typeof IntervalType; - readonly unknown: typeof UnknownType; -}; diff --git a/node_modules/@mikro-orm/core/types/index.js b/node_modules/@mikro-orm/core/types/index.js deleted file mode 100644 index 6c6513d..0000000 --- a/node_modules/@mikro-orm/core/types/index.js +++ /dev/null @@ -1,91 +0,0 @@ -import { ArrayType } from './ArrayType.js'; -import { BigIntType } from './BigIntType.js'; -import { BlobType } from './BlobType.js'; -import { BooleanType } from './BooleanType.js'; -import { DateTimeType } from './DateTimeType.js'; -import { DateType } from './DateType.js'; -import { DecimalType } from './DecimalType.js'; -import { DoubleType } from './DoubleType.js'; -import { EnumArrayType } from './EnumArrayType.js'; -import { EnumType } from './EnumType.js'; -import { CharacterType } from './CharacterType.js'; -import { FloatType } from './FloatType.js'; -import { IntegerType } from './IntegerType.js'; -import { IntervalType } from './IntervalType.js'; -import { JsonType } from './JsonType.js'; -import { MediumIntType } from './MediumIntType.js'; -import { SmallIntType } from './SmallIntType.js'; -import { StringType } from './StringType.js'; -import { TextType } from './TextType.js'; -import { TimeType } from './TimeType.js'; -import { TinyIntType } from './TinyIntType.js'; -import { ORM_TYPE, Type } from './Type.js'; -import { Uint8ArrayType } from './Uint8ArrayType.js'; -import { UnknownType } from './UnknownType.js'; -import { UuidType } from './UuidType.js'; -export { - Type, - DateType, - TimeType, - DateTimeType, - BigIntType, - BlobType, - Uint8ArrayType, - ArrayType, - EnumArrayType, - EnumType, - JsonType, - IntegerType, - SmallIntType, - TinyIntType, - MediumIntType, - FloatType, - DoubleType, - BooleanType, - DecimalType, - StringType, - UuidType, - TextType, - UnknownType, - IntervalType, - CharacterType, -}; -/** Registry of all built-in type constructors, keyed by their short name (e.g., `types.integer`, `types.uuid`). */ -export const types = { - date: DateType, - time: TimeType, - datetime: DateTimeType, - bigint: BigIntType, - blob: BlobType, - uint8array: Uint8ArrayType, - array: ArrayType, - enumArray: EnumArrayType, - enum: EnumType, - json: JsonType, - integer: IntegerType, - smallint: SmallIntType, - tinyint: TinyIntType, - mediumint: MediumIntType, - float: FloatType, - double: DoubleType, - boolean: BooleanType, - decimal: DecimalType, - character: CharacterType, - string: StringType, - uuid: UuidType, - text: TextType, - interval: IntervalType, - unknown: UnknownType, -}; -/** Shorthand alias for the `types` registry. */ -export const t = types; -/** - * Brand each built-in type constructor with its registry key via a cross-module symbol. - * Symbol.for() returns the same symbol across CJS/ESM module graphs, so this survives - * the dual-package hazard (e.g. when using tsx or @swc-node/register with "type": "commonjs"). - * Using Object.defineProperty ensures the brand is an own (non-inherited) property, - * so subclasses (e.g. MyJsonType extends JsonType) won't be detected as built-in types. - */ -for (const [key, type] of Object.entries(types)) { - Object.defineProperty(type, ORM_TYPE, { value: key, enumerable: false }); -} diff --git a/node_modules/@mikro-orm/core/typings.d.ts b/node_modules/@mikro-orm/core/typings.d.ts deleted file mode 100644 index b1c13bd..0000000 --- a/node_modules/@mikro-orm/core/typings.d.ts +++ /dev/null @@ -1,1781 +0,0 @@ -import type { Transaction } from './connections/Connection.js'; -import { - type Cascade, - type DeferMode, - type EmbeddedPrefixMode, - type EventType, - type LoadStrategy, - type PopulatePath, - type QueryOrderMap, - ReferenceKind, -} from './enums.js'; -import { type AssignOptions } from './entity/EntityAssigner.js'; -import { type EntityIdentifier } from './entity/EntityIdentifier.js'; -import { type EntityLoaderOptions } from './entity/EntityLoader.js'; -import { type Collection } from './entity/Collection.js'; -import { type EntityFactory } from './entity/EntityFactory.js'; -import { type EntityRepository } from './entity/EntityRepository.js'; -import { Reference, type ScalarReference } from './entity/Reference.js'; -import type { SerializationContext } from './serialization/SerializationContext.js'; -import type { SerializeOptions } from './serialization/EntitySerializer.js'; -import type { MetadataStorage } from './metadata/MetadataStorage.js'; -import type { EntitySchema } from './metadata/EntitySchema.js'; -import type { IndexColumnOptions } from './metadata/types.js'; -import type { Type, types } from './types/index.js'; -import type { Platform } from './platforms/Platform.js'; -import type { Configuration } from './utils/Configuration.js'; -import type { Raw } from './utils/RawQueryFragment.js'; -import type { EntityManager } from './EntityManager.js'; -import type { EventSubscriber } from './events/EventSubscriber.js'; -import type { FilterOptions, FindOneOptions, FindOptions, LoadHint } from './drivers/IDatabaseDriver.js'; -export type { Raw }; -/** Generic constructor type. Matches any class that can be instantiated with `new`. */ -export type Constructor = new (...args: any[]) => T; -/** Simple string-keyed object type. Use instead of `Record` for convenience. */ -export type Dictionary = { - [k: string]: T; -}; -/** Record of compiled functions, used internally for hydration and comparison. */ -export type CompiledFunctions = Record any>; -/** - * Extracts string property keys from an entity, excluding symbols, functions, and internal keys. - * Pass `B = true` to also exclude scalar properties (useful for getting only relation keys). - */ -export type EntityKey = string & - { - [K in keyof T]-?: CleanKeys extends never ? never : K; - }[keyof T]; -/** Resolves to the value type of entity properties (keyed by `EntityKey`). */ -export type EntityValue = T[EntityKey]; -/** Resolves to the value type within `EntityData` (the data shape used for create/update). */ -export type EntityDataValue = EntityData[EntityKey]; -/** Extracts valid keys for `FilterQuery`. */ -export type FilterKey = keyof FilterQuery; -/** A function type that accepts a dictionary argument and returns a Promise. */ -export type AsyncFunction = (args: T) => Promise; -/** Identity mapped type that forces TypeScript to eagerly evaluate and flatten `T`. */ -export type Compute = { - [K in keyof T]: T[K]; -} & {}; -type InternalKeys = - | 'EntityRepositoryType' - | 'PrimaryKeyProp' - | 'OptionalProps' - | 'EagerProps' - | 'HiddenProps' - | '__selectedType' - | '__loadedType'; -/** Filters out function, symbol, and internal keys from an entity type. When `B = true`, also excludes scalar keys. */ -export type CleanKeys = T[K] & {} extends Function - ? never - : K extends symbol | InternalKeys - ? never - : B extends true - ? T[K] & {} extends Scalar - ? never - : K - : K; -/** Extracts keys of `T` whose values are functions. */ -export type FunctionKeys = T[K] extends Function ? K : never; -/** Conditional cast: returns `T` if it extends `R`, otherwise returns `R`. */ -export type Cast = T extends R ? T : R; -/** Evaluates to `true` if `T` is the `unknown` type. */ -export type IsUnknown = T extends unknown ? (unknown extends T ? true : never) : never; -/** Evaluates to `true` if `T` is `any`. */ -export type IsAny = 0 extends 1 & T ? true : false; -/** Evaluates to `True` if `T` is `never`, otherwise `False`. */ -export type IsNever = [T] extends [never] ? True : False; -/** Represents a value that may be synchronous or wrapped in a Promise. */ -export type MaybePromise = T | Promise; -/** - * Structural type for matching Collection without triggering full interface evaluation. - * Using `T extends CollectionShape` instead of `T extends Collection` avoids - * forcing TypeScript to evaluate Collection's 30+ methods, preventing instantiation explosion - * (~133k → ~2k instantiations). - * - * Usage: - * - Matching only: `T extends CollectionShape` - * - With inference: `T extends CollectionShape` - */ -type CollectionShape = { - [k: number]: T; - readonly owner: object; -}; -/** - * Structural type for matching LoadedCollection (extends CollectionShape with `$` property). - * - * Usage: - * - Matching only: `T extends LoadedCollectionShape` - * - With inference: `T extends LoadedCollectionShape` - */ -type LoadedCollectionShape = CollectionShape & { - $: any; -}; -/** - * Structural type for matching Reference without triggering full class evaluation. - * Using `T extends ReferenceShape` instead of `T extends Reference` avoids - * forcing TypeScript to evaluate Reference's methods, preventing instantiation overhead - * (~800 → ~15 instantiations). - * - * Usage: - * - Matching only: `T extends ReferenceShape` - * - With inference: `T extends ReferenceShape` - */ -type ReferenceShape = { - unwrap(): T; -}; -/** - * Structural type for matching LoadedReference (Reference with `$` property). - * Note: We don't parameterize ReferenceShape here because for loaded relations, - * the Reference unwrap() returns the base type while $ returns the Loaded type. - * We infer T from $ to get the full Loaded type for EntityDTO. - */ -type LoadedReferenceShape = ReferenceShape & { - $: T; -}; -/** - * Structural type for matching any loadable relation (Collection, Reference, or array). - * Using this instead of `Loadable` in conditional type checks prevents - * TypeScript from evaluating the full Collection/Reference interfaces. - */ -type LoadableShape = CollectionShape | ReferenceShape | readonly any[]; -/** Gets all keys from all members of a union type (distributes over the union). */ -export type UnionKeys = T extends any ? keyof T : never; -/** Gets the type of a property from all union members that have it (distributes over the union). */ -export type UnionPropertyType = T extends any ? (K extends keyof T ? T[K] : never) : never; -type IsUnion = T extends any ? ([U] extends [T] ? false : true) : false; -/** - * Merges all members of a union type into a single object with all their properties. - * For non-union types, returns `T` directly to avoid expensive key iteration. - */ -export type MergeUnion = [T] extends [object] - ? T extends Scalar - ? T - : IsUnion extends true - ? { - [K in UnionKeys]: UnionPropertyType; - } - : T - : T; -/** Recursively makes all properties of `T` optional, including nested objects and arrays. */ -export type DeepPartial = T & { - [P in keyof T]?: T[P] extends (infer U)[] - ? DeepPartial[] - : T[P] extends Readonly[] - ? Readonly>[] - : DeepPartial; -}; -/** Symbol used to declare a custom repository type on an entity class (e.g., `[EntityRepositoryType]?: BookRepository`). */ -export declare const EntityRepositoryType: unique symbol; -/** Symbol used to declare the primary key property name(s) on an entity (e.g., `[PrimaryKeyProp]?: 'id'`). */ -export declare const PrimaryKeyProp: unique symbol; -/** Symbol used to declare which properties are optional in `em.create()` (e.g., `[OptionalProps]?: 'createdAt'`). */ -export declare const OptionalProps: unique symbol; -/** Symbol used to declare which relation properties should be eagerly loaded (e.g., `[EagerProps]?: 'author'`). */ -export declare const EagerProps: unique symbol; -/** Symbol used to declare which properties are hidden from serialization (e.g., `[HiddenProps]?: 'password'`). */ -export declare const HiddenProps: unique symbol; -/** Symbol used to declare type-level configuration on an entity (e.g., `[Config]?: DefineConfig<{ forceObject: true }>`). */ -export declare const Config: unique symbol; -/** Symbol used to declare the entity name as a string literal type (used by `defineEntity`). */ -export declare const EntityName: unique symbol; -/** Extracts the entity name string literal from an entity type that declares `[EntityName]`. */ -export type InferEntityName = T extends { - [EntityName]?: infer Name; -} - ? Name extends string - ? Name - : never - : never; -/** - * Branded type that marks a property as optional in `em.create()`. - * Use as a property type wrapper: `createdAt: Opt` instead of listing in `[OptionalProps]`. - */ -export type Opt = T & Opt.Brand; -export declare namespace Opt { - const __optional: unique symbol; - interface Brand { - [__optional]?: 1; - } -} -/** - * Branded type that marks a nullable property as required in `em.create()`. - * By default, nullable properties are treated as optional; this forces them to be explicitly provided. - */ -export type RequiredNullable = (T & RequiredNullable.Brand) | null; -export declare namespace RequiredNullable { - const __requiredNullable: unique symbol; - interface Brand { - [__requiredNullable]?: 1; - } -} -/** - * Branded type that marks a property as hidden from serialization. - * Use as a property type wrapper: `password: Hidden` instead of listing in `[HiddenProps]`. - */ -export type Hidden = T & Hidden.Brand; -export declare namespace Hidden { - const __hidden: unique symbol; - interface Brand { - [__hidden]?: 1; - } -} -/** - * Branded type for entity-level configuration (e.g., `[Config]?: DefineConfig<{ forceObject: true }>`). - * Controls type-level behavior such as forcing object representation for primary keys in DTOs. - */ -export type DefineConfig = T & DefineConfig.Brand; -export declare namespace DefineConfig { - const __config: unique symbol; - interface Brand { - [__config]?: 1; - } -} -/** Extracts only the `TypeConfig` keys from a branded config type, stripping the brand. */ -export type CleanTypeConfig = Compute>>; -/** Configuration options that can be set on an entity via the `[Config]` symbol. */ -export interface TypeConfig { - forceObject?: boolean; -} -declare const __selectedType: unique symbol; -declare const __loadedType: unique symbol; -declare const __loadHint: unique symbol; -/** - * Expands a populate hint into all its prefixes. - * e.g., Prefixes<'a.b.c'> = 'a' | 'a.b' | 'a.b.c' - * This reflects that loading 'a.b.c' means 'a' and 'a.b' are also loaded. - * Special case: '*' returns string to ensure Loaded is assignable to any Loaded. - */ -export type Prefixes = S extends '*' - ? string - : S extends `${infer H}.${infer T}` - ? H | `${H}.${Prefixes}` - : S; -/** Unwraps a value to its primary key type. Scalars pass through; References are unwrapped first. */ -export type UnwrapPrimary = T extends Scalar ? T : T extends ReferenceShape ? Primary : Primary; -type PrimaryPropToType = { - [Index in keyof Keys]: UnwrapPrimary; -}; -type ReadonlyPrimary = T extends any[] ? Readonly : T; -/** - * Resolves the primary key type for an entity. Uses `[PrimaryKeyProp]` if declared, - * otherwise falls back to `_id`, `id`, or `uuid` properties. For composite keys, returns a tuple. - */ -export type Primary = - IsAny extends true - ? any - : T extends { - [PrimaryKeyProp]?: infer PK; - } - ? PK extends undefined - ? Omit - : PK extends keyof T - ? ReadonlyPrimary> - : PK extends (keyof T)[] - ? ReadonlyPrimary> - : PK - : T extends { - _id?: infer PK; - } - ? ReadonlyPrimary | string - : T extends { - id?: infer PK; - } - ? ReadonlyPrimary - : T extends { - uuid?: infer PK; - } - ? ReadonlyPrimary - : T; -/** @internal */ -export type PrimaryProperty = T extends { - [PrimaryKeyProp]?: infer PK; -} - ? PK extends keyof T - ? PK - : PK extends any[] - ? PK[number] - : never - : T extends { - _id?: any; - } - ? T extends { - id?: any; - } - ? 'id' | '_id' - : '_id' - : T extends { - id?: any; - } - ? 'id' - : T extends { - uuid?: any; - } - ? 'uuid' - : never; -/** Union of all allowed primary key value types (number, string, bigint, Date, ObjectId-like). */ -export type IPrimaryKeyValue = - | number - | string - | bigint - | Date - | { - toHexString(): string; - }; -/** Alias for a primary key value, constrained to `IPrimaryKeyValue`. */ -export type IPrimaryKey = T; -/** Union of types considered "scalar" (non-entity) values. Used to distinguish entity relations from plain values. */ -export type Scalar = - | boolean - | number - | string - | bigint - | symbol - | Date - | RegExp - | Uint8Array - | { - toHexString(): string; - }; -type Primitive = boolean | number | string | bigint | symbol; -/** Expands a scalar type to include alternative representations accepted in queries (e.g., `Date | string`). */ -export type ExpandScalar = - | null - | (T extends string ? T | RegExp : T extends Date ? Date | string : T extends bigint ? bigint | string | number : T); -/** Marker interface for query builders that can be used as subqueries */ -export interface Subquery { - readonly __subquery: true; -} -/** Map of query operators (`$eq`, `$gt`, `$in`, etc.) available for filtering a value of type `T`. */ -export type OperatorMap = { - $and?: ExpandQuery[]; - $or?: ExpandQuery[]; - $eq?: ExpandScalar | readonly ExpandScalar[] | Subquery; - $ne?: ExpandScalar | readonly ExpandScalar[] | Subquery; - $in?: readonly ExpandScalar[] | readonly Primary[] | Raw | Subquery; - $nin?: readonly ExpandScalar[] | readonly Primary[] | Raw | Subquery; - $not?: ExpandQuery; - $none?: ExpandQuery; - $some?: ExpandQuery; - $every?: ExpandQuery; - $size?: - | number - | { - $eq?: number; - $ne?: number; - $gt?: number; - $gte?: number; - $lt?: number; - $lte?: number; - }; - $gt?: ExpandScalar | readonly ExpandScalar[] | Subquery; - $gte?: ExpandScalar | readonly ExpandScalar[] | Subquery; - $lt?: ExpandScalar | readonly ExpandScalar[] | Subquery; - $lte?: ExpandScalar | readonly ExpandScalar[] | Subquery; - $like?: string; - $re?: string; - $ilike?: string; - $fulltext?: string; - $overlap?: readonly string[] | string | object; - $contains?: readonly string[] | string | object; - $contained?: readonly string[] | string | object; - $exists?: boolean; - $hasKey?: string; - $hasKeys?: readonly string[]; - $hasSomeKeys?: readonly string[]; -}; -/** A single filter value: the raw value, its expanded scalar form, its primary key, or a raw SQL expression. */ -export type FilterItemValue = T | ExpandScalar | Primary | Raw; -/** A complete filter value: an operator map, a single value, an array of values, or null. */ -export type FilterValue = OperatorMap> | FilterItemValue | FilterItemValue[] | null; -type FilterObjectProp = K extends keyof MergeUnion - ? MergeUnion[K] - : K extends keyof T - ? T[K] - : never; -type ExpandQueryMerged = [T] extends [object] - ? [T] extends [Scalar] - ? never - : FilterQuery> - : FilterValue; -type ElemMatchCondition> = { - [K in keyof T]?: T[K] | OperatorMap; -} & { - $or?: ElemMatchCondition[]; - $and?: ElemMatchCondition[]; - $not?: ElemMatchCondition; -}; -type ElemMatchFilter = T extends readonly (infer E)[] - ? E extends Record - ? { - $elemMatch: ElemMatchCondition; - } - : never - : never; -/** Object form of a filter query, mapping entity keys to their filter conditions. */ -export type FilterObject = { - -readonly [K in EntityKey]?: - | ExpandQuery>> - | ExpandQueryMerged>> - | FilterValue>> - | ElemMatchFilter> - | null; -}; -/** Recursively expands a type into its `FilterQuery` form for nested object filtering. */ -export type ExpandQuery = T extends object ? (T extends Scalar ? never : FilterQuery) : FilterValue; -/** Partial entity shape with all entity properties optional. */ -export type EntityProps = { - -readonly [K in EntityKey]?: T[K]; -}; -/** Object-based query filter combining operator maps with property-level filters. */ -export type ObjectQuery = OperatorMap & FilterObject; -/** - * The main query filter type used in `em.find()`, `em.findOne()`, etc. - * Accepts an object query, a primary key value, entity props with operators, or an array of filters. - */ -export type FilterQuery = - | ObjectQuery - | NonNullable>> - | NonNullable & OperatorMap> - | FilterQuery[]; -/** Public interface for the entity wrapper, accessible via `wrap(entity)`. Provides helper methods for entity state management. */ -export interface IWrappedEntity { - isInitialized(): boolean; - isManaged(): boolean; - populated(populated?: boolean): void; - populate( - populate: readonly AutoPath[] | false, - options?: EntityLoaderOptions, - ): Promise>; - init( - options?: FindOneOptions, - ): Promise | null>; - toReference(): Ref & LoadedReference>>; - toObject(): EntityDTO; - toObject(ignoreFields: never[]): EntityDTO; - toObject>(ignoreFields: Ignored[]): Omit, Ignored>; - toJSON(...args: any[]): EntityDTO; - toPOJO(): EntityDTO; - serialize< - Naked extends FromEntityType = FromEntityType, - Hint extends string = never, - Exclude extends string = never, - >( - options?: SerializeOptions, - ): SerializeDTO; - setSerializationContext( - options: LoadHint, - ): void; - assign< - Naked extends FromEntityType = FromEntityType, - Convert extends boolean = false, - Data extends EntityData | Partial> = - | EntityData - | Partial>, - >( - data: Data & IsSubset, Data>, - options?: AssignOptions, - ): MergeSelected; - getSchema(): string | undefined; - setSchema(schema?: string): void; -} -/** @internal Extended wrapper interface with internal state used by the ORM runtime. */ -export interface IWrappedEntityInternal extends IWrappedEntity { - hasPrimaryKey(): boolean; - getPrimaryKey(convertCustomTypes?: boolean): Primary | null; - getPrimaryKeys(convertCustomTypes?: boolean): Primary[] | null; - setPrimaryKey(val: Primary): void; - getSerializedPrimaryKey(): string & keyof Entity; - __meta: EntityMetadata; - __data: Dictionary; - __em?: EntityManager; - __platform: Platform; - __config: Configuration; - __factory: EntityFactory; - __hydrator: IHydrator; - __initialized: boolean; - __originalEntityData?: EntityData; - __loadedProperties: Set; - __identifier?: EntityIdentifier | EntityIdentifier[]; - __managed: boolean; - __processing: boolean; - __schema?: string; - __populated: boolean; - __onLoadFired: boolean; - __reference?: Ref; - __pk?: Primary; - __primaryKeys: Primary[]; - __serializationContext: { - root?: SerializationContext; - populate?: PopulateOptions[]; - fields?: Set; - exclude?: string[]; - }; -} -/** Loose entity type used in generic contexts. Equivalent to `Partial`. */ -export type AnyEntity = Partial; -/** A class (function with prototype) whose instances are of type `T`. */ -export type EntityClass = Function & { - prototype: T; -}; -/** Any valid entity name reference: a class, abstract constructor, or EntitySchema. */ -export type EntityName = EntityClass | EntityCtor | EntitySchema; -/** Resolves the custom repository type for an entity (from `[EntityRepositoryType]`), or falls back to `Fallback`. */ -export type GetRepository< - Entity extends { - [k: PropertyKey]: any; - }, - Fallback, -> = Entity[typeof EntityRepositoryType] extends EntityRepository | undefined - ? NonNullable - : Fallback; -type PolymorphicPrimaryInner = T extends object - ? Primary extends readonly [infer First, infer Second, ...infer Rest] - ? readonly [string, First, Second, ...Rest] | [string, First, Second, ...Rest] - : readonly [string, Primary] | [string, Primary] - : never; -/** - * Tuple format for polymorphic FK values: [discriminator, ...pkValues] - * Distributes over unions, so `Post | Comment` becomes `['post', number] | ['comment', number]` - * For composite keys like [tenantId, orgId], becomes ['discriminator', tenantId, orgId] - */ -export type PolymorphicPrimary = true extends IsUnion ? PolymorphicPrimaryInner : never; -/** Allowed value types when assigning to an entity data property: the entity itself, its PK, or a polymorphic PK tuple. */ -export type EntityDataPropValue = T | Primary | PolymorphicPrimary; -type ExpandEntityProp = - T extends Record - ? - | { - [K in keyof T as CleanKeys]?: - | EntityDataProp, C> - | EntityDataPropValue> - | null; - } - | EntityDataPropValue> - : T; -type ExpandRequiredEntityProp = - T extends Record ? ExpandRequiredEntityPropObject | EntityDataPropValue> : T; -type ExpandRequiredEntityPropObject = { - [K in keyof T as RequiredKeys]: - | RequiredEntityDataProp, T, C> - | EntityDataPropValue>; -} & { - [K in keyof T as OptionalKeys]?: - | RequiredEntityDataProp, T, C> - | EntityDataPropValue> - | null - | undefined; -}; -type NonArrayObject = object & { - [Symbol.iterator]?: never; -}; -/** Resolves the allowed input type for a single entity property in `EntityData`. Handles scalars, references, collections, and nested entities. */ -export type EntityDataProp = T extends Date - ? string | Date - : T extends Scalar - ? T - : T extends ScalarReference - ? EntityDataProp - : T extends { - __runtime?: infer Runtime; - __raw?: infer Raw; - } - ? C extends true - ? Raw - : Runtime - : T extends ReferenceShape - ? EntityDataNested - : T extends CollectionShape - ? U | U[] | EntityDataNested | EntityDataNested[] - : T extends readonly (infer U)[] - ? U extends NonArrayObject - ? U | U[] | EntityDataNested | EntityDataNested[] - : U[] | EntityDataNested[] - : EntityDataNested; -/** Like `EntityDataProp` but used in `RequiredEntityData` context with required/optional key distinction. */ -export type RequiredEntityDataProp = T extends Date - ? string | Date - : Exclude extends RequiredNullable.Brand - ? T | null - : T extends Scalar - ? T - : T extends ScalarReference - ? RequiredEntityDataProp - : T extends { - __runtime?: infer Runtime; - __raw?: infer Raw; - } - ? C extends true - ? Raw - : Runtime - : T extends ReferenceShape - ? RequiredEntityDataNested - : T extends CollectionShape - ? U | U[] | RequiredEntityDataNested | RequiredEntityDataNested[] - : T extends readonly (infer U)[] - ? U extends NonArrayObject - ? U | U[] | RequiredEntityDataNested | RequiredEntityDataNested[] - : U[] | RequiredEntityDataNested[] - : RequiredEntityDataNested; -/** Nested entity data shape for embedded or related entities within `EntityData`. */ -export type EntityDataNested = T extends undefined - ? never - : T extends any[] - ? Readonly - : EntityData | ExpandEntityProp; -type UnwrapScalarRef = T extends ScalarReference ? U : T; -type EntityDataItem = C extends false - ? UnwrapScalarRef | EntityDataProp | Raw | null - : EntityDataProp | Raw | null; -/** Nested entity data shape used within `RequiredEntityData` for embedded or related entities. */ -export type RequiredEntityDataNested = T extends any[] - ? Readonly - : RequiredEntityData | ExpandRequiredEntityProp; -type ExplicitlyOptionalProps = - | (T extends { - [OptionalProps]?: infer K; - } - ? K - : never) - | ({ - [K in keyof T]: T[K] extends Opt ? K : never; - }[keyof T] & {}); -type NullableKeys = { - [K in keyof T]: unknown extends T[K] ? never : V extends T[K] ? K : never; -}[keyof T]; -type RequiredNullableKeys = { - [K in keyof T]: Exclude extends RequiredNullable.Brand ? K : never; -}[keyof T]; -type ProbablyOptionalProps = - | PrimaryProperty - | ExplicitlyOptionalProps - | Exclude>, RequiredNullableKeys>; -type IsOptional = T[K] extends CollectionShape - ? true - : ExtractType extends I - ? true - : K extends ProbablyOptionalProps - ? true - : false; -type RequiredKeys = IsOptional extends false ? CleanKeys : never; -type OptionalKeys = IsOptional extends false ? never : CleanKeys; -/** Data shape for creating or updating entities. All properties are optional. Used in `em.create()` and `em.assign()`. */ -export type EntityData = { - [K in EntityKey]?: EntityDataItem; -}; -/** - * Data shape for `em.create()` with required/optional distinction based on entity metadata. - * Properties with defaults, nullable types, `Opt` brand, or `[OptionalProps]` declaration are optional. - * `I` excludes additional types from being required (used for inverse side of relations). - */ -export type RequiredEntityData = { - [K in keyof T as RequiredKeys]: - | T[K] - | RequiredEntityDataProp - | Primary - | PolymorphicPrimary - | Raw; -} & { - [K in keyof T as OptionalKeys]?: - | T[K] - | RequiredEntityDataProp - | Primary - | PolymorphicPrimary - | Raw - | null; -}; -/** `EntityData` extended with an index signature, allowing arbitrary additional properties. */ -export type EntityDictionary = EntityData & Record; -type ExtractEagerProps = T extends { - [EagerProps]?: infer PK; -} - ? PK - : never; -type Relation = { - [P in keyof T as T[P] extends unknown[] | Record ? P : never]?: T[P]; -}; -/** Identity type that can be used to get around issues with cycles in bidirectional relations. It will disable reflect-metadata inference. */ -export type Rel = T; -/** Alias for `ScalarReference` (see {@apilink Ref}). */ -export type ScalarRef = ScalarReference; -/** Alias for `Reference & { id: number }` (see {@apilink Ref}). */ -export type EntityRef = - true extends IsUnknown> - ? Reference - : IsAny extends true - ? Reference - : { - [K in PrimaryProperty & keyof T]: T[K]; - } & Reference; -/** - * Ref type represents a `Reference` instance, and adds the primary keys to its prototype automatically, so you can do - * `ref.id` instead of `ref.unwrap().id`. It resolves to either `ScalarRef` or `EntityRef`, based on the type argument. - */ -export type Ref = T extends any - ? IsAny extends true - ? Reference - : T extends Scalar - ? ScalarReference - : EntityRef - : never; -type ExtractHiddenProps = - | (T extends { - [HiddenProps]?: infer K; - } - ? K - : never) - | ({ - [K in keyof T]: T[K] extends Primitive ? (T[K] extends Hidden ? K : never) : never; - }[keyof T] & {}); -type ExcludeHidden = K extends ExtractHiddenProps ? never : K; -type ExtractConfig = T extends { - [Config]?: infer K; -} - ? K & TypeConfig - : TypeConfig; -type PreferExplicitConfig = IsNever; -type PrimaryOrObject = PreferExplicitConfig>['forceObject'] extends true - ? { - [K in PrimaryProperty & keyof U]: U[K]; - } - : Primary; -type DTOWrapper = Flat extends true - ? EntityDTOFlat - : EntityDTO; -/** Resolves the serialized (DTO) type for a single entity property. Unwraps references, collections, and custom serialized types. */ -export type EntityDTOProp = T extends Scalar - ? T - : T extends ScalarReference - ? U - : T extends { - __serialized?: infer U; - } - ? IsUnknown extends false - ? U - : T - : T extends LoadedReferenceShape - ? DTOWrapper - : T extends ReferenceShape - ? PrimaryOrObject - : T extends LoadedCollectionShape - ? DTOWrapper[] - : T extends CollectionShape - ? PrimaryOrObject[] - : T extends readonly (infer U)[] - ? U extends Scalar - ? T - : EntityDTOProp[] - : T extends Relation - ? DTOWrapper - : T; -type UnwrapLoadedEntity = T extends { - [__loadedType]?: infer U; -} - ? NonNullable - : T; -type DTOProbablyOptionalProps = NonNullable, undefined>>; -type DTOIsOptional = T[K] extends LoadedCollectionShape - ? false - : K extends PrimaryProperty> - ? false - : K extends DTOProbablyOptionalProps - ? true - : false; -type DTORequiredKeys = - DTOIsOptional extends false ? ExcludeHidden & CleanKeys : never; -type DTOOptionalKeys = - DTOIsOptional extends false ? never : ExcludeHidden & CleanKeys; -/** - * Plain object (DTO) representation of an entity as returned by `toObject()` / `toPOJO()`. - * Unwraps references to PKs, collections to arrays, and respects hidden properties. - */ -export type EntityDTO = { - [K in keyof T as DTORequiredKeys]: EntityDTOProp | AddOptional; -} & { - [K in keyof T as DTOOptionalKeys]?: EntityDTOProp | AddOptional; -}; -/** - * @internal - * 1-pass variant of EntityDTO — ~2x cheaper to resolve but all keys are required - * (optional keys use `| undefined` in value type instead of `?` modifier). - * Use only for internal type computations (output types), never as a user-facing - * function parameter type where generic assignability checks are needed. - */ -export type EntityDTOFlat = { - [K in keyof T as ExcludeHidden & CleanKeys]: EntityDTOProp | AddOptional; -}; -/** - * @internal - * Single-pass fused type that combines Loaded + EntityDTO into one mapped type. - * ~40x faster than `EntityDTO>` for populated entities. - */ -type SerializeTopHints = H extends `${infer Top}.${string}` ? Top : H; -type SerializeSubHints = H extends `${K}.${infer Rest}` ? Rest : never; -type SerializePropValue = - K & string extends SerializeTopHints - ? NonNullable extends CollectionShape - ? SerializeDTO, never, C>[] - : SerializeDTO, SerializeSubHints, never, C> | Extract - : EntityDTOProp; -/** - * Return type of `serialize()`. Combines Loaded + EntityDTO in a single pass for better performance. - * Respects populate hints (`H`) and exclude hints (`E`). - */ -export type SerializeDTO< - T, - H extends string = never, - E extends string = never, - C extends TypeConfig = never, -> = string extends H - ? EntityDTOFlat - : { - [K in keyof T as ExcludeHidden & CleanKeys & (IsNever extends true ? K : Exclude)]: - | SerializePropValue - | Extract; - }; -type TargetKeys = T extends EntityClass ? keyof P : keyof T; -type PropertyName = IsUnknown extends false ? TargetKeys : string; -/** Table reference object passed to formula callbacks, including alias and schema information. */ -export type FormulaTable = { - alias: string; - name: string; - schema?: string; - qualifiedName: string; - toString: () => string; -}; -/** - * Table reference for schema callbacks (indexes, checks, generated columns). - * Unlike FormulaTable, this has no alias since schema generation doesn't use query aliases. - */ -export type SchemaTable = { - name: string; - schema?: string; - qualifiedName: string; - toString: () => string; -}; -/** - * Column mapping for formula callbacks. Maps property names to fully-qualified alias.fieldName. - * Has toString() returning the main alias for backwards compatibility with old formula syntax. - * @example - * // New recommended syntax - use cols.propName for fully-qualified references - * formula: cols => `${cols.firstName} || ' ' || ${cols.lastName}` - * - * // Old syntax still works - cols.toString() returns the alias - * formula: cols => `${cols}.first_name || ' ' || ${cols}.last_name` - */ -export type FormulaColumns = Record, string> & { - toString(): string; -}; -/** - * Column mapping for schema callbacks (indexes, checks, generated columns). - * Maps property names to field names. For TPT entities, only includes properties - * that belong to the current table (not inherited properties from parent tables). - */ -export type SchemaColumns = Record, string>; -/** Callback for custom index expressions. Receives column mappings, table info, and the index name. */ -export type IndexCallback = ( - columns: Record, string>, - table: SchemaTable, - indexName: string, -) => string | Raw; -/** Callback for computed (formula) properties. Receives column mappings and table info, returns a SQL expression. */ -export type FormulaCallback = (columns: FormulaColumns, table: FormulaTable) => string | Raw; -/** Callback for CHECK constraint expressions. Receives column mappings and table info. */ -export type CheckCallback = (columns: Record, string>, table: SchemaTable) => string | Raw; -/** Callback for generated (computed) column expressions. Receives column mappings and table info. */ -export type GeneratedColumnCallback = (columns: Record, string>, table: SchemaTable) => string | Raw; -/** Definition of a CHECK constraint on a table or property. */ -export interface CheckConstraint { - name?: string; - property?: string; - expression: string | Raw | CheckCallback; -} -/** Branded string that accepts any string value while preserving autocompletion for known literals. */ -export type AnyString = string & {}; -/** Describes a single property (column, relation, or embedded) within an entity's metadata. */ -export interface EntityProperty { - name: EntityKey; - entity: () => EntityName; - target: EntityClass; - type: keyof typeof types | AnyString; - runtimeType: 'number' | 'string' | 'boolean' | 'bigint' | 'Buffer' | 'Date' | 'object' | 'any' | AnyString; - targetMeta?: EntityMetadata; - columnTypes: string[]; - generated?: string | Raw | GeneratedColumnCallback; - customType?: Type; - customTypes: (Type | undefined)[]; - hasConvertToJSValueSQL: boolean; - hasConvertToDatabaseValueSQL: boolean; - autoincrement?: boolean; - returning?: boolean; - primary?: boolean; - serializedPrimaryKey: boolean; - groups?: string[]; - lazy?: boolean; - array?: boolean; - length?: number; - precision?: number; - scale?: number; - kind: ReferenceKind; - ref?: boolean; - fieldNames: string[]; - fieldNameRaw?: string; - default?: string | number | boolean | null; - defaultRaw?: string; - formula?: FormulaCallback; - filters?: FilterOptions; - prefix?: string | boolean; - prefixMode?: EmbeddedPrefixMode; - embedded?: [EntityKey, EntityKey]; - embeddedPath?: string[]; - embeddable: EntityClass; - embeddedProps: Dictionary; - discriminatorColumn?: string; - discriminator?: string; - polymorphic?: boolean; - polymorphTargets?: EntityMetadata[]; - discriminatorMap?: Dictionary>; - discriminatorValue?: string; - object?: boolean; - index?: boolean | string; - unique?: boolean | string; - nullable?: boolean; - inherited?: boolean; - renamedFrom?: string; - stiMerged?: boolean; - stiFieldNames?: string[]; - stiFieldNameMap?: Dictionary; - unsigned?: boolean; - mapToPk?: boolean; - persist?: boolean; - hydrate?: boolean; - hidden?: boolean; - enum?: boolean; - items?: (number | string)[]; - nativeEnumName?: string; - version?: boolean; - concurrencyCheck?: boolean; - eager?: boolean; - setter?: boolean; - getter?: boolean; - getterName?: keyof Owner; - accessor?: EntityKey; - cascade: Cascade[]; - orphanRemoval?: boolean; - onCreate?: (entity: Owner, em: EntityManager) => any; - onUpdate?: (entity: Owner, em: EntityManager) => any; - deleteRule?: 'cascade' | 'no action' | 'set null' | 'set default' | AnyString; - updateRule?: 'cascade' | 'no action' | 'set null' | 'set default' | AnyString; - strategy?: LoadStrategy; - owner: boolean; - inversedBy: EntityKey; - mappedBy: EntityKey; - where?: FilterQuery; - orderBy?: QueryOrderMap | QueryOrderMap[]; - customOrder?: string[] | number[] | boolean[]; - fixedOrder?: boolean; - fixedOrderColumn?: string; - pivotTable: string; - pivotEntity: EntityClass; - joinColumns: string[]; - ownColumns: string[]; - inverseJoinColumns: string[]; - referencedColumnNames: string[]; - referencedTableName: string; - referencedPKs: EntityKey[]; - targetKey?: string; - serializer?: (value: any, options?: SerializeOptions) => any; - serializedName?: string; - comment?: string; - /** mysql only */ - extra?: string; - userDefined?: boolean; - optional?: boolean; - ignoreSchemaChanges?: ('type' | 'extra' | 'default')[]; - deferMode?: DeferMode; - createForeignKeyConstraint: boolean; - foreignKeyName?: string; -} -/** - * Runtime metadata for an entity, holding its properties, relations, indexes, hooks, and more. - * Created during metadata discovery and used throughout the ORM lifecycle. - */ -export declare class EntityMetadata = EntityCtor> { - private static counter; - readonly _id: number; - readonly propertyOrder: Map; - constructor(meta?: Partial); - addProperty(prop: Partial>): void; - removeProperty(name: string, sync?: boolean): void; - getPrimaryProps(flatten?: boolean): EntityProperty[]; - getPrimaryProp(): EntityProperty; - /** - * Creates a mapping from property names to field names. - * @param alias - Optional alias to prefix field names. Can be a string (same for all) or a function (per-property). - * When provided, also adds toString() returning the alias for backwards compatibility with formulas. - * @param toStringAlias - Optional alias to return from toString(). Defaults to `alias` when it's a string. - */ - createColumnMappingObject( - alias?: string | ((prop: EntityProperty) => string), - toStringAlias?: string, - ): FormulaColumns; - /** - * Creates a column mapping for schema callbacks (indexes, checks, generated columns). - * For TPT entities, only includes properties that belong to the current table (ownProps). - */ - createSchemaColumnMappingObject(): SchemaColumns; - get tableName(): string; - set tableName(name: string); - get uniqueName(): string; - sync(initIndexes?: boolean, config?: Configuration): void; - private initIndexes; - /** @internal */ - clone(): this; -} -/** Minimal column metadata with just a name and database type. */ -export interface SimpleColumnMeta { - name: string; - type: string; -} -/** Abstract constructor type that matches both abstract and concrete entity classes. */ -export type EntityCtor = abstract new (...args: any[]) => T; -export interface EntityMetadata = EntityCtor> { - name?: string; - className: string; - tableName: string; - schema?: string; - pivotTable?: boolean; - virtual?: boolean; - /** True if this entity represents a database view (not a virtual entity). Accepts `{ materialized: true }` as input, normalized to `true` during sync. */ - view?: - | boolean - | { - materialized?: boolean; - withData?: boolean; - }; - /** True if this is a materialized view (PostgreSQL only). Requires `view: true`. */ - materialized?: boolean; - /** For materialized views, whether data is populated on creation. Defaults to true. */ - withData?: boolean; - expression?: - | string - | (( - em: any, - where: ObjectQuery, - options: FindOptions, - stream?: boolean, - ) => MaybePromise); - discriminatorColumn?: EntityKey | AnyString; - discriminatorValue?: number | string; - discriminatorMap?: Dictionary; - embeddable: boolean; - constructorParams?: (keyof Entity)[]; - forceConstructor: boolean; - extends?: EntityName; - collection: string; - path: string; - primaryKeys: EntityKey[]; - simplePK: boolean; - compositePK: boolean; - versionProperty: EntityKey; - concurrencyCheckKeys: Set>; - serializedPrimaryKey?: EntityKey; - properties: { - [K in EntityKey]: EntityProperty; - }; - props: EntityProperty[]; - relations: EntityProperty[]; - bidirectionalRelations: EntityProperty[]; - referencingProperties: { - meta: EntityMetadata; - prop: EntityProperty; - }[]; - comparableProps: EntityProperty[]; - trackingProps: EntityProperty[]; - hydrateProps: EntityProperty[]; - validateProps: EntityProperty[]; - uniqueProps: EntityProperty[]; - getterProps: EntityProperty[]; - indexes: { - properties?: EntityKey | EntityKey[]; - name?: string; - type?: string; - options?: Dictionary; - expression?: string | IndexCallback; - columns?: IndexColumnOptions[]; - include?: EntityKey | EntityKey[]; - fillFactor?: number; - invisible?: boolean; - disabled?: boolean; - clustered?: boolean; - }[]; - uniques: { - properties?: EntityKey | EntityKey[]; - name?: string; - options?: Dictionary; - expression?: string | IndexCallback; - deferMode?: DeferMode | `${DeferMode}`; - columns?: IndexColumnOptions[]; - include?: EntityKey | EntityKey[]; - fillFactor?: number; - disabled?: boolean; - }[]; - checks: CheckConstraint[]; - repositoryClass?: string; - repository: () => EntityClass>; - hooks: { - [K in EventType]?: (keyof Entity | EventSubscriber[EventType])[]; - }; - prototype: Entity; - class: Class; - abstract: boolean; - filters: Dictionary; - comment?: string; - selfReferencing?: boolean; - hasUniqueProps?: boolean; - readonly?: boolean; - polymorphs?: EntityMetadata[]; - root: EntityMetadata; - definedProperties: Dictionary; - /** For polymorphic M:N pivot tables, maps discriminator values to entity classes */ - polymorphicDiscriminatorMap?: Dictionary; - /** Inheritance type: 'sti' (Single Table Inheritance) or 'tpt' (Table-Per-Type). Only set on root entities. */ - inheritanceType?: 'sti' | 'tpt'; - /** For TPT: direct parent entity metadata (the entity this one extends). */ - tptParent?: EntityMetadata; - /** For TPT: direct child entities (entities that extend this one). */ - tptChildren?: EntityMetadata[]; - /** For TPT: all non-abstract descendants, sorted by depth (deepest first). Precomputed during discovery. */ - allTPTDescendants?: EntityMetadata[]; - /** For TPT: synthetic property representing the join to the parent table (child PK → parent PK). */ - tptParentProp?: EntityProperty; - /** For TPT: inverse of tptParentProp, used for joining from parent to child (parent PK → child PK). */ - tptInverseProp?: EntityProperty; - /** For TPT: virtual discriminator property name (computed at query time, not persisted). */ - tptDiscriminatorColumn?: string; - /** For TPT: properties defined only in THIS entity (not inherited from parent). */ - ownProps?: EntityProperty[]; - hasTriggers?: boolean; - /** - * Default ordering for this entity. Applied when querying this entity directly - * or when it's populated as a relation. Combined with other orderings based on precedence. - */ - orderBy?: QueryOrderMap | QueryOrderMap[]; - /** @internal can be used for computed numeric cache keys */ - readonly _id: number; -} -/** Options for `ISchemaGenerator.create()`. */ -export interface CreateSchemaOptions { - wrap?: boolean; - schema?: string; -} -/** Options for `ISchemaGenerator.clear()` to truncate/clear database tables. */ -export interface ClearDatabaseOptions { - schema?: string; - truncate?: boolean; - clearIdentityMap?: boolean; -} -/** Options for `ISchemaGenerator.ensureDatabase()` which creates and optionally clears the database. */ -export interface EnsureDatabaseOptions extends CreateSchemaOptions, ClearDatabaseOptions { - clear?: boolean; - create?: boolean; - forceCheck?: boolean; -} -/** Options for `ISchemaGenerator.drop()`. */ -export interface DropSchemaOptions { - wrap?: boolean; - dropMigrationsTable?: boolean; - dropForeignKeys?: boolean; - dropDb?: boolean; - schema?: string; -} -/** Options for `ISchemaGenerator.update()` to apply incremental schema changes. */ -export interface UpdateSchemaOptions { - wrap?: boolean; - safe?: boolean; - dropDb?: boolean; - dropTables?: boolean; - schema?: string; - fromSchema?: DatabaseSchema; -} -/** Options for `ISchemaGenerator.refresh()` which drops and recreates the schema. */ -export interface RefreshDatabaseOptions extends CreateSchemaOptions { - ensureIndexes?: boolean; - dropDb?: boolean; - createSchema?: boolean; -} -/** Interface for the schema generator, responsible for creating, updating, and dropping database schemas. */ -export interface ISchemaGenerator { - create(options?: CreateSchemaOptions): Promise; - update(options?: UpdateSchemaOptions): Promise; - drop(options?: DropSchemaOptions): Promise; - refresh(options?: RefreshDatabaseOptions): Promise; - clear(options?: ClearDatabaseOptions): Promise; - execute( - sql: string, - options?: { - wrap?: boolean; - }, - ): Promise; - getCreateSchemaSQL(options?: CreateSchemaOptions): Promise; - getDropSchemaSQL(options?: Omit): Promise; - getUpdateSchemaSQL(options?: UpdateSchemaOptions): Promise; - getUpdateSchemaMigrationSQL(options?: UpdateSchemaOptions): Promise<{ - up: string; - down: string; - }>; - ensureDatabase(options?: EnsureDatabaseOptions): Promise; - createDatabase(name?: string): Promise; - dropDatabase(name?: string): Promise; - ensureIndexes(): Promise; -} -/** Custom resolver for import paths in the entity generator. Returns a path/name pair or undefined to use the default. */ -export type ImportsResolver = ( - alias: string, - basePath: string, - extension: '.js' | '', - originFileName: string, -) => - | { - path: string; - name: string; - } - | undefined; -/** Options for the entity generator (`IEntityGenerator.generate()`). Controls output format, filtering, and style. */ -export interface GenerateOptions { - path?: string; - save?: boolean; - schema?: string; - takeTables?: (RegExp | string)[]; - skipTables?: (RegExp | string)[]; - skipColumns?: Dictionary<(RegExp | string)[]>; - forceUndefined?: boolean; - undefinedDefaults?: boolean; - bidirectionalRelations?: boolean; - identifiedReferences?: boolean; - entityDefinition?: 'decorators' | 'defineEntity' | 'entitySchema'; - decorators?: 'es' | 'legacy'; - inferEntityType?: boolean; - enumMode?: 'ts-enum' | 'union-type' | 'dictionary'; - esmImport?: boolean; - scalarTypeInDecorator?: boolean; - scalarPropertiesForRelations?: 'always' | 'never' | 'smart'; - fileName?: (className: string) => string; - onImport?: ImportsResolver; - extraImports?: (basePath: string, originFileName: string) => string[] | undefined; - onlyPurePivotTables?: boolean; - outputPurePivotTables?: boolean; - readOnlyPivotTables?: boolean; - customBaseEntityName?: string; - useCoreBaseEntity?: boolean; - coreImportsPrefix?: string; - onInitialMetadata?: MetadataProcessor; - onProcessedMetadata?: MetadataProcessor; -} -/** Interface for the entity generator, which reverse-engineers database schema into entity source files. */ -export interface IEntityGenerator { - generate(options?: GenerateOptions): Promise; -} -/** Basic migration descriptor with a name and optional file path. */ -export type MigrationInfo = { - name: string; - path?: string; -}; -/** Options for controlling which migrations to run (range, specific list, or transaction). */ -export type MigrateOptions = { - from?: string | number; - to?: string | number; - migrations?: string[]; - transaction?: Transaction; -}; -/** Result of creating a new migration file, including the generated code and schema diff. */ -export type MigrationResult = { - fileName: string; - code: string; - diff: MigrationDiff; -}; -/** A row from the migrations tracking table, representing an executed migration. */ -export type MigrationRow = { - id: number; - name: string; - executed_at: Date; -}; -/** - * @internal - */ -export interface IMigrationRunner { - run(migration: Migration, method: 'up' | 'down'): Promise; - setMasterMigration(trx: Transaction): void; - unsetMasterMigration(): void; -} -/** - * @internal - */ -export interface IMigratorStorage { - executed(): Promise; - logMigration(params: Dictionary): Promise; - unlogMigration(params: Dictionary): Promise; - getExecutedMigrations(): Promise; - ensureTable?(): Promise; - setMasterMigration(trx: Transaction): void; - unsetMasterMigration(): void; - getMigrationName(name: string): string; - getTableName?(): { - schemaName?: string; - tableName: string; - }; -} -/** Interface for the migrator, responsible for creating and executing database migrations. */ -export interface IMigrator { - /** - * Checks current schema for changes, generates new migration if there are any. - */ - create(path?: string, blank?: boolean, initial?: boolean, name?: string): Promise; - /** - * Checks current schema for changes. - */ - checkSchema(): Promise; - /** - * Creates initial migration. This generates the schema based on metadata, and checks whether all the tables - * are already present. If yes, it will also automatically log the migration as executed. - * Initial migration can be created only if the schema is already aligned with the metadata, or when no schema - * is present - in such case regular migration would have the same effect. - */ - createInitial(path?: string): Promise; - /** - * Returns list of already executed migrations. - */ - getExecuted(): Promise; - /** - * Returns list of pending (not yet executed) migrations found in the migration directory. - */ - getPending(): Promise; - /** - * Executes specified migrations. Without parameter it will migrate up to the latest version. - */ - up(options?: string | string[] | MigrateOptions): Promise; - /** - * Executes down migrations to the given point. Without parameter it will migrate one version down. - */ - down(options?: string | string[] | Omit): Promise; - /** - * Registers event handler. - */ - on(event: MigratorEvent, listener: (event: MigrationInfo) => MaybePromise): IMigrator; - /** - * Removes event handler. - */ - off(event: MigratorEvent, listener: (event: MigrationInfo) => MaybePromise): IMigrator; - /** - * @internal - */ - getStorage(): IMigratorStorage; -} -/** Events emitted by the migrator during migration execution. */ -export type MigratorEvent = 'migrating' | 'migrated' | 'reverting' | 'reverted'; -/** The up and down SQL statements representing a schema diff for a migration. */ -export interface MigrationDiff { - up: string[]; - down: string[]; -} -/** Interface for generating migration file contents from schema diffs. */ -export interface IMigrationGenerator { - /** - * Generates the full contents of migration file. Uses `generateMigrationFile` to get the file contents. - */ - generate(diff: MigrationDiff, path?: string, name?: string): Promise<[string, string]>; - /** - * Creates single migration statement. By default adds `this.addSql(sql);` to the code. - */ - createStatement(sql: string, padLeft: number): string; - /** - * Returns the file contents of given migration. - */ - generateMigrationFile(className: string, diff: MigrationDiff): MaybePromise; -} -/** Interface that all migration classes must implement. */ -export interface Migration { - up(): Promise | void; - down(): Promise | void; - isTransactional(): boolean; - reset(): void; - setTransactionContext(ctx: Transaction): void; - getQueries?(): any[]; -} -/** A named migration class reference, used for inline migration registration. */ -export interface MigrationObject { - name: string; - class: Constructor; -} -type EntityFromInput = T extends readonly EntityName[] ? U : T extends EntityName ? U : never; -type FilterDefResolved = { - name: string; - cond: - | FilterQuery - | (( - args: Dictionary, - type: 'read' | 'update' | 'delete', - em: any, - options?: FindOptions | FindOneOptions, - entityName?: string, - ) => MaybePromise>); - default?: boolean; - entity?: EntityName | EntityName[]; - args?: boolean; - strict?: boolean; -}; -/** Definition of a query filter that can be registered globally or per-entity via `@Filter()`. */ -export type FilterDef = FilterDefResolved> & { - entity?: T; -}; -/** Type for the `populate` option in find methods. An array of relation paths to eagerly load, or `false` to disable. */ -export type Populate = readonly AutoPath[] | false; -/** Parsed populate hint for a single relation, including strategy and nested children. */ -export type PopulateOptions = { - field: EntityKey; - strategy?: LoadStrategy; - all?: boolean; - filter?: boolean; - joinType?: 'inner join' | 'left join'; - children?: PopulateOptions[]; - /** When true, ignores `mapToPk` on the property and returns full entity data instead of just PKs. */ - dataOnly?: boolean; -}; -/** Inline options that can be appended to populate hint strings (e.g., strategy, join type). */ -export type PopulateHintOptions = { - strategy?: LoadStrategy.JOINED | LoadStrategy.SELECT_IN | 'joined' | 'select-in'; - joinType?: 'inner join' | 'left join'; -}; -type ExtractType = - T extends CollectionShape - ? U - : T extends ReferenceShape - ? U - : T extends Ref - ? U - : T extends readonly (infer U)[] - ? U - : T; -type ExtractStringKeys = { - [K in keyof T]-?: CleanKeys; -}[keyof T] & {}; -/** - * Extracts string keys from an entity type, handling Collection/Reference wrappers. - * Simplified to just check `T extends object` since ExtractType handles the unwrapping. - */ -type StringKeys = T extends object ? ExtractStringKeys> | E : never; -type GetStringKey, E extends string> = K extends keyof T - ? ExtractType - : K extends E - ? keyof T - : never; -type Prev = [never, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; -type RelationKeys = T extends object - ? { - [K in keyof T]-?: CleanKeys; - }[keyof T] & {} - : never; -/** - * Autocomplete-friendly type for dot-separated relation paths (e.g., `'author.books'`). - * Validates each segment against entity keys and provides IDE suggestions. Depth-limited to prevent infinite recursion. - */ -export type AutoPath< - O, - P extends string | boolean, - E extends string = never, - D extends Prev[number] = 9, -> = P extends boolean - ? P - : [D] extends [never] - ? never - : P extends any - ? P extends string - ? P extends `${infer A}.${infer B}` - ? A extends StringKeys - ? `${A}.${AutoPath>, B, E, Prev[D]>}` - : never - : P extends StringKeys - ? - | (NonNullable, E>> extends unknown - ? Exclude - : never) - | (StringKeys, E>>, E> extends never - ? never - : `${P & string}.`) - : StringKeys | `${RelationKeys}:ref` - : never - : never; -/** Unwraps an array type to its element type; non-arrays pass through unchanged. */ -export type UnboxArray = T extends any[] ? ArrayElement : T; -/** Extracts the element type from an array type. */ -export type ArrayElement = ArrayType extends (infer ElementType)[] ? ElementType : never; -/** Unwraps a property type from its wrapper (Reference, Collection, or array) to the inner entity type. */ -export type ExpandProperty = - T extends ReferenceShape - ? NonNullable - : T extends CollectionShape - ? NonNullable - : T extends (infer U)[] - ? NonNullable - : NonNullable; -type LoadedLoadable = T extends CollectionShape - ? LoadedCollection - : T extends ScalarReference - ? LoadedScalarReference - : T extends ReferenceShape - ? T & LoadedReference - : T extends Scalar - ? T - : T extends (infer U)[] - ? U extends Scalar - ? T - : E[] - : E; -type IsTrue = IsNever extends true ? false : T extends boolean ? (T extends true ? true : false) : false; -type StringLiteral = T extends string ? (string extends T ? never : T) : never; -type Prefix = K extends `${infer S}.${string}` ? S : K extends '*' ? keyof T : K; -type IsPrefixedExclude = K extends E ? never : K; -/** Checks whether a key `K` is included in the populate/fields hints. Used to filter entity keys in `Loaded`/`Selected`. */ -export type IsPrefixed = - IsNever extends false - ? IsPrefixedExclude - : K extends symbol - ? never - : IsTrue extends true - ? T[K] & {} extends LoadableShape - ? K - : never - : IsNever> extends true - ? never - : '*' extends L - ? K - : K extends Prefix - ? K - : K extends PrimaryProperty - ? K - : never; -type Suffix = Hint extends `${infer Pref}.${infer Suf}` - ? Pref extends Key - ? Suf - : never - : Hint extends All - ? Hint - : never; -/** Validates that `U` is a subset of `T`. Returns `{}` if valid, or a mapped type with `never` values to cause a type error. */ -export type IsSubset = keyof U extends keyof T - ? {} - : string extends keyof U - ? {} - : { - [K in keyof U as K extends keyof T ? never : CleanKeys]: never; - }; -/** - * Fast check if T is a Loaded type by looking for the marker symbol. - * This is much cheaper than matching against the full Loaded structure. - */ -type IsLoadedType = T extends { - [__loadedType]?: any; -} - ? true - : false; -/** - * Optimized MergeSelected using intersection instead of extraction. - * When T is already Loaded, we intersect with a new Loaded type for the selected fields. - * This avoids the expensive pattern matching needed to extract hints from Loaded types. - */ -export type MergeSelected = IsLoadedType extends true ? T & Loaded : T; -/** - * Optimized MergeLoaded using intersection instead of extraction. - * When T is already Loaded, we intersect with a new Loaded type for the additional hints. - * This avoids the expensive pattern matching needed to extract hints from Loaded types. - * Used for `em.populate` and `em.refresh`. - */ -export type MergeLoaded = - IsLoadedType extends true ? T & Loaded : Loaded; -/** Extracts the nullability modifiers (`null`, `undefined`, or both) from a type `T`. */ -export type AddOptional = undefined | null extends T - ? null | undefined - : null extends T - ? null - : undefined extends T - ? undefined - : never; -type LoadedProp = LoadedLoadable< - T, - Loaded, L, F, E> ->; -/** Extracts the eager-loaded property names declared via `[EagerProps]` as a string union. */ -export type AddEager = ExtractEagerProps & string; -/** Combines an explicit populate hint `L` with the entity's eagerly loaded properties. */ -export type ExpandHint = L | AddEager; -/** - * Entity type narrowed to only the selected fields (`F`) and populated relations (`L`). - * Used as the return type when `fields` option is specified in find methods. - */ -export type Selected = { - [K in keyof T as IsPrefixed> | FunctionKeys]: T[K] extends Function - ? T[K] - : NonNullable extends Scalar - ? T[K] - : LoadedProp, Suffix, Suffix> | AddOptional; -} & { - [__selectedType]?: T; -}; -type LoadedEntityType = - | { - [__loadedType]?: T; - } - | { - [__selectedType]?: T; - }; -/** Accepts either a plain entity type or a `Loaded`/`Selected` wrapped version. */ -export type EntityType = T | LoadedEntityType; -/** Extracts the base entity type from a `Loaded`/`Selected` wrapper, or returns `T` as-is. */ -export type FromEntityType = T extends LoadedEntityType ? U : T; -type LoadedInternal = [F] extends ['*'] - ? IsNever extends true - ? T & { - [K in keyof T as IsPrefixed>]: - | LoadedProp, Suffix, Suffix, Suffix> - | AddOptional; - } - : { - [K in keyof T as IsPrefixed, E>]: - | LoadedProp, Suffix, Suffix, Suffix> - | AddOptional; - } - : Selected; -/** - * Represents entity with its loaded relations (`populate` hint) and selected properties (`fields` hint). - * The __loadHint marker uses contravariance to ensure Loaded is NOT assignable to Loaded. - */ -export type Loaded = LoadedInternal< - T, - L, - F, - E -> & { - [__loadedType]?: T; - [__loadHint]?: (hint: Prefixes) => void; -}; -/** A `Reference` that is guaranteed to be loaded, providing synchronous access via `$` and `get()`. */ -export interface LoadedReference extends Reference> { - $: NonNullable; - get(): NonNullable; -} -/** A `ScalarReference` that is guaranteed to be loaded, providing synchronous access via `$` and `get()`. */ -export interface LoadedScalarReference extends ScalarReference { - $: T; - get(): T; -} -/** A `Collection` that is guaranteed to be loaded, providing synchronous access via `$`, `get()`, and `getItems()`. */ -export interface LoadedCollection extends Collection { - $: Collection; - get(): Collection; - getItems(check?: boolean): T[]; -} -/** Alias for `Loaded`. Represents a newly created entity with all specified relations populated. */ -export type New = Loaded; -/** Interface for SQL/code syntax highlighters used in logging output. */ -export interface Highlighter { - highlight(text: string): string; -} -/** Interface for the metadata storage, which holds `EntityMetadata` for all discovered entities. */ -export interface IMetadataStorage { - getAll(): Map; - get(entity: EntityName, init?: boolean, validate?: boolean): EntityMetadata; - find(entity: EntityName): EntityMetadata | undefined; - has(entity: EntityName): boolean; - set(entity: EntityName, meta: EntityMetadata): EntityMetadata; - reset(entity: EntityName): void; -} -/** Interface for entity hydrators, which populate entity instances from raw database data. */ -export interface IHydrator { - /** - * Hydrates the whole entity. This process handles custom type conversions, creating missing Collection instances, - * mapping FKs to entity instances, as well as merging those entities. - */ - hydrate( - entity: T, - meta: EntityMetadata, - data: EntityData, - factory: EntityFactory, - type: 'full' | 'reference', - newEntity?: boolean, - convertCustomTypes?: boolean, - schema?: string, - parentSchema?: string, - normalizeAccessors?: boolean, - ): void; - /** - * Hydrates primary keys only - */ - hydrateReference( - entity: T, - meta: EntityMetadata, - data: EntityData, - factory: EntityFactory, - convertCustomTypes?: boolean, - schema?: string, - parentSchema?: string, - normalizeAccessors?: boolean, - ): void; - isRunning(): boolean; -} -/** Constructor signature for hydrator implementations. */ -export interface HydratorConstructor { - new (metadata: MetadataStorage, platform: Platform, config: Configuration): IHydrator; -} -/** Interface for the seed manager, which runs database seeders. */ -export interface ISeedManager { - seed(...classNames: Constructor[]): Promise; - /** @internal */ - seedString(...classNames: string[]): Promise; - create(className: string): Promise; -} -/** Interface that all seeder classes must implement. The `run` method receives an EntityManager. */ -export interface Seeder { - run(em: EntityManager, context?: T): void | Promise; -} -/** A named seeder class reference, used for inline seeder registration. */ -export interface SeederObject { - name: string; - class: Constructor; -} -/** Discriminator for read vs write database connections in read-replica setups. */ -export type ConnectionType = 'read' | 'write'; -/** Callback for processing entity metadata during discovery or entity generation. */ -export type MetadataProcessor = (metadata: EntityMetadata[], platform: Platform) => MaybePromise; -/** Extracts the return type if `T` is a function, otherwise returns `T` as-is. */ -export type MaybeReturnType = T extends (...args: any[]) => infer R ? R : T; -/** - * Extended `EntitySchema` interface that carries additional type-level metadata (entity name, properties, table name). - * Returned by `defineEntity()` to provide strong type inference without explicit generics. - */ -export interface EntitySchemaWithMeta< - TName extends string = string, - TTableName extends string = string, - TEntity = any, - TBase = never, - TProperties extends Record = Record, - TClass extends EntityCtor = EntityCtor, -> extends EntitySchema { - readonly name: TName; - readonly properties: TProperties; - readonly tableName: TTableName; - /** @internal Direct entity type access - avoids expensive pattern matching */ - readonly '~entity': TEntity; -} -/** - * Extracts the entity type from an `EntitySchema`, `EntitySchemaWithMeta`, or entity class. - * Uses a fast-path direct property access when available, falling back to generic inference. - */ -export type InferEntity = Schema extends { - '~entity': infer E; -} - ? E - : Schema extends EntitySchema - ? Entity - : Schema extends EntityClass - ? Entity - : Schema; diff --git a/node_modules/@mikro-orm/core/typings.js b/node_modules/@mikro-orm/core/typings.js deleted file mode 100644 index c764710..0000000 --- a/node_modules/@mikro-orm/core/typings.js +++ /dev/null @@ -1,287 +0,0 @@ -import { ReferenceKind } from './enums.js'; -import { Reference } from './entity/Reference.js'; -import { EntityHelper } from './entity/EntityHelper.js'; -import { helper } from './entity/wrap.js'; -import { Utils } from './utils/Utils.js'; -import { EntityComparator } from './utils/EntityComparator.js'; -import { BaseEntity } from './entity/BaseEntity.js'; -/** Symbol used to declare a custom repository type on an entity class (e.g., `[EntityRepositoryType]?: BookRepository`). */ -export const EntityRepositoryType = Symbol('EntityRepositoryType'); -/** Symbol used to declare the primary key property name(s) on an entity (e.g., `[PrimaryKeyProp]?: 'id'`). */ -export const PrimaryKeyProp = Symbol('PrimaryKeyProp'); -/** Symbol used to declare which properties are optional in `em.create()` (e.g., `[OptionalProps]?: 'createdAt'`). */ -export const OptionalProps = Symbol('OptionalProps'); -/** Symbol used to declare which relation properties should be eagerly loaded (e.g., `[EagerProps]?: 'author'`). */ -export const EagerProps = Symbol('EagerProps'); -/** Symbol used to declare which properties are hidden from serialization (e.g., `[HiddenProps]?: 'password'`). */ -export const HiddenProps = Symbol('HiddenProps'); -/** Symbol used to declare type-level configuration on an entity (e.g., `[Config]?: DefineConfig<{ forceObject: true }>`). */ -export const Config = Symbol('Config'); -/** Symbol used to declare the entity name as a string literal type (used by `defineEntity`). */ -// eslint-disable-next-line @typescript-eslint/no-redeclare -export const EntityName = Symbol('EntityName'); -/** - * Runtime metadata for an entity, holding its properties, relations, indexes, hooks, and more. - * Created during metadata discovery and used throughout the ORM lifecycle. - */ -export class EntityMetadata { - static counter = 0; - _id = 1000 * EntityMetadata.counter++; // keep the id >= 1000 to allow computing cache keys by simple addition - propertyOrder = new Map(); - constructor(meta = {}) { - this.properties = {}; - this.props = []; - this.primaryKeys = []; - this.filters = {}; - this.hooks = {}; - this.indexes = []; - this.uniques = []; - this.checks = []; - this.referencingProperties = []; - this.concurrencyCheckKeys = new Set(); - Object.assign(this, meta); - const name = meta.className ?? meta.name; - if (!this.class && name) { - const Class = - this.extends === BaseEntity ? { [name]: class extends BaseEntity {} }[name] : { [name]: class {} }[name]; - this.class = Class; - } - } - addProperty(prop) { - this.properties[prop.name] = prop; - this.propertyOrder.set(prop.name, this.props.length); - this.sync(); - } - removeProperty(name, sync = true) { - delete this.properties[name]; - this.propertyOrder.delete(name); - if (sync) { - this.sync(); - } - } - getPrimaryProps(flatten = false) { - const pks = this.primaryKeys.map(pk => this.properties[pk]); - if (flatten) { - return pks.flatMap(pk => { - if ([ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(pk.kind)) { - return pk.targetMeta.getPrimaryProps(true); - } - return [pk]; - }); - } - return pks; - } - getPrimaryProp() { - return this.properties[this.primaryKeys[0]]; - } - /** - * Creates a mapping from property names to field names. - * @param alias - Optional alias to prefix field names. Can be a string (same for all) or a function (per-property). - * When provided, also adds toString() returning the alias for backwards compatibility with formulas. - * @param toStringAlias - Optional alias to return from toString(). Defaults to `alias` when it's a string. - */ - createColumnMappingObject(alias, toStringAlias) { - const resolveAlias = typeof alias === 'function' ? alias : () => alias; - const defaultAlias = toStringAlias ?? (typeof alias === 'string' ? alias : undefined); - const result = Object.values(this.properties).reduce((o, prop) => { - if (prop.fieldNames) { - const propAlias = resolveAlias(prop); - o[prop.name] = propAlias ? `${propAlias}.${prop.fieldNames[0]}` : prop.fieldNames[0]; - } - return o; - }, {}); - // Add toString() for backwards compatibility when alias is provided - Object.defineProperty(result, 'toString', { - value: () => defaultAlias ?? '', - enumerable: false, - }); - // Wrap in Proxy to detect old formula signature usage where the first param was FormulaTable. - // If user accesses `.alias` or `.qualifiedName` (FormulaTable-only properties), warn them. - const warnedProps = new Set(['alias', 'qualifiedName']); - return new Proxy(result, { - get(target, prop, receiver) { - if (typeof prop === 'string' && warnedProps.has(prop) && !(prop in target)) { - // eslint-disable-next-line no-console - console.warn( - `[MikroORM] Detected old formula callback signature. The first parameter is now 'columns', not 'table'. ` + - `Accessing '.${prop}' on the columns object will return undefined. ` + - `Update your formula: formula(cols => quote\`\${cols.propName} ...\`). See the v7 upgrade guide.`, - ); - } - return Reflect.get(target, prop, receiver); - }, - }); - } - /** - * Creates a column mapping for schema callbacks (indexes, checks, generated columns). - * For TPT entities, only includes properties that belong to the current table (ownProps). - */ - createSchemaColumnMappingObject() { - // For TPT entities, only include properties that belong to this entity's table - const props = this.inheritanceType === 'tpt' && this.ownProps ? this.ownProps : Object.values(this.properties); - return props.reduce((o, prop) => { - if (prop.fieldNames) { - o[prop.name] = prop.fieldNames[0]; - } - return o; - }, {}); - } - get tableName() { - return this.collection; - } - set tableName(name) { - this.collection = name; - } - get uniqueName() { - return this.tableName + '_' + this._id; - } - sync(initIndexes = false, config) { - this.root ??= this; - const props = Object.values(this.properties).sort( - (a, b) => this.propertyOrder.get(a.name) - this.propertyOrder.get(b.name), - ); - this.props = [...props.filter(p => p.primary), ...props.filter(p => !p.primary)]; - this.relations = this.props.filter( - prop => - typeof prop.kind !== 'undefined' && prop.kind !== ReferenceKind.SCALAR && prop.kind !== ReferenceKind.EMBEDDED, - ); - this.bidirectionalRelations = this.relations.filter(prop => prop.mappedBy || prop.inversedBy); - this.uniqueProps = this.props.filter(prop => prop.unique); - this.getterProps = this.props.filter(prop => prop.getter); - this.comparableProps = this.props.filter(prop => EntityComparator.isComparable(prop, this)); - this.validateProps = this.props.filter(prop => { - if (prop.inherited || (prop.persist === false && prop.userDefined !== false)) { - return false; - } - return prop.kind === ReferenceKind.SCALAR && ['string', 'number', 'boolean', 'Date'].includes(prop.type); - }); - this.hydrateProps = this.props.filter(prop => { - // `prop.userDefined` is either `undefined` or `false` - const discriminator = this.root.discriminatorColumn === prop.name && prop.userDefined === false; - // even if we don't have a setter, do not ignore value from database! - const onlyGetter = prop.getter && !prop.setter && prop.persist === false; - return !prop.inherited && prop.hydrate !== false && !discriminator && !prop.embedded && !onlyGetter; - }); - this.trackingProps = this.hydrateProps.filter(prop => { - return !prop.getter && !prop.setter && [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind); - }); - this.selfReferencing = this.relations.some(prop => { - return this.root.uniqueName === prop.targetMeta?.root.uniqueName; - }); - this.hasUniqueProps = this.uniques.length + this.uniqueProps.length > 0; - // Normalize object-form `view` option: `view: { materialized: true, withData: false }` - // into flat metadata fields (`view: true`, `materialized: true`, `withData: false`). - if (typeof this.view === 'object') { - this.materialized = this.view.materialized; - this.withData = this.view.withData; - this.view = true; - } - // If `view` is set, this is a database view entity (not a virtual entity). - // Virtual entities evaluate expressions at query time, view entities create actual database views. - this.virtual = !!this.expression && !this.view; - if (config) { - for (const prop of this.props) { - if (prop.enum && !prop.nativeEnumName && prop.items?.every(item => typeof item === 'string')) { - const name = config.getNamingStrategy().indexName(this.tableName, prop.fieldNames, 'check'); - const exists = this.checks.findIndex(check => check.name === name); - if (exists !== -1) { - this.checks.splice(exists, 1); - } - this.checks.push({ - name, - property: prop.name, - expression: `${config.getPlatform().quoteIdentifier(prop.fieldNames[0])} in ('${prop.items.join("', '")}')`, - }); - } - } - } - this.checks = Utils.removeDuplicates(this.checks); - this.indexes = Utils.removeDuplicates(this.indexes); - this.uniques = Utils.removeDuplicates(this.uniques); - for (const hook of Utils.keys(this.hooks)) { - this.hooks[hook] = Utils.removeDuplicates(this.hooks[hook]); - } - if (this.virtual || this.view) { - this.readonly = true; - } - if (initIndexes && this.name) { - this.props.forEach(prop => this.initIndexes(prop)); - } - this.definedProperties = this.trackingProps.reduce( - (o, prop) => { - const hasInverse = (prop.inversedBy || prop.mappedBy) && !prop.mapToPk; - if (hasInverse) { - // eslint-disable-next-line @typescript-eslint/no-this-alias - const meta = this; - o[prop.name] = { - get() { - return this.__helper.__data[prop.name]; - }, - set(val) { - const wrapped = this.__helper; - const hydrator = wrapped.hydrator; - const entity = Reference.unwrapReference(val ?? wrapped.__data[prop.name]); - const old = Reference.unwrapReference(wrapped.__data[prop.name]); - if ( - old && - old !== entity && - prop.kind === ReferenceKind.MANY_TO_ONE && - prop.inversedBy && - old[prop.inversedBy] - ) { - old[prop.inversedBy].removeWithoutPropagation(this); - } - wrapped.__data[prop.name] = Reference.wrapReference(val, prop); - // when propagation from inside hydration, we set the FK to the entity data immediately - if (val && hydrator.isRunning() && wrapped.__originalEntityData && prop.owner) { - const targetMeta = prop.targetMeta ?? helper(entity)?.__meta; - if (targetMeta) { - wrapped.__originalEntityData[prop.name] = Utils.getPrimaryKeyValues(val, targetMeta, true); - } - } - EntityHelper.propagate(meta, entity, this, prop, Reference.unwrapReference(val), old); - }, - enumerable: true, - configurable: true, - }; - } - return o; - }, - { __gettersDefined: { value: true, enumerable: false } }, - ); - } - initIndexes(prop) { - const simpleIndex = this.indexes.find( - index => index.properties === prop.name && !index.options && !index.type && !index.expression, - ); - const simpleUnique = this.uniques.find(index => index.properties === prop.name && !index.options); - const owner = prop.kind === ReferenceKind.MANY_TO_ONE; - if (!prop.index && simpleIndex) { - Utils.defaultValue(simpleIndex, 'name', true); - prop.index = simpleIndex.name; - this.indexes.splice(this.indexes.indexOf(simpleIndex), 1); - } - if (!prop.unique && simpleUnique) { - Utils.defaultValue(simpleUnique, 'name', true); - prop.unique = simpleUnique.name; - this.uniques.splice(this.uniques.indexOf(simpleUnique), 1); - } - if (prop.index && owner && prop.fieldNames.length > 1) { - this.indexes.push({ properties: prop.name }); - prop.index = false; - } - /* v8 ignore next */ - if (owner && prop.fieldNames.length > 1 && prop.unique) { - this.uniques.push({ properties: prop.name }); - prop.unique = false; - } - } - /** @internal */ - clone() { - return this; - } - /** @ignore */ - [Symbol.for('nodejs.util.inspect.custom')]() { - return `[${this.constructor.name}<${this.className}>]`; - } -} diff --git a/node_modules/@mikro-orm/core/unit-of-work/ChangeSet.d.ts b/node_modules/@mikro-orm/core/unit-of-work/ChangeSet.d.ts deleted file mode 100644 index c06f32f..0000000 --- a/node_modules/@mikro-orm/core/unit-of-work/ChangeSet.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { EntityData, EntityMetadata, EntityDictionary, Primary } from '../typings.js'; -/** Represents a pending change (create, update, or delete) for a single entity. */ -export declare class ChangeSet { - entity: T; - type: ChangeSetType; - payload: EntityDictionary; - meta: EntityMetadata; - private primaryKey?; - private serializedPrimaryKey?; - constructor(entity: T, type: ChangeSetType, payload: EntityDictionary, meta: EntityMetadata); - /** Returns the primary key of the entity, optionally as an object for composite keys. */ - getPrimaryKey(object?: boolean): Primary | null; - /** Returns the serialized (string) form of the primary key. */ - getSerializedPrimaryKey(): string | null; -} -export interface ChangeSet { - meta: EntityMetadata; - rootMeta: EntityMetadata; - schema?: string; - type: ChangeSetType; - entity: T; - payload: EntityDictionary; - persisted: boolean; - originalEntity?: EntityData; - /** For TPT: changesets for parent tables, ordered from immediate parent to root */ - tptChangeSets?: ChangeSet[]; -} -/** Enumeration of change set operation types. */ -export declare enum ChangeSetType { - CREATE = 'create', - UPDATE = 'update', - DELETE = 'delete', - UPDATE_EARLY = 'update_early', - DELETE_EARLY = 'delete_early', -} diff --git a/node_modules/@mikro-orm/core/unit-of-work/ChangeSet.js b/node_modules/@mikro-orm/core/unit-of-work/ChangeSet.js deleted file mode 100644 index 36a0d98..0000000 --- a/node_modules/@mikro-orm/core/unit-of-work/ChangeSet.js +++ /dev/null @@ -1,69 +0,0 @@ -import { helper } from '../entity/wrap.js'; -import { Utils } from '../utils/Utils.js'; -import { inspect } from '../logging/inspect.js'; -/** Represents a pending change (create, update, or delete) for a single entity. */ -export class ChangeSet { - entity; - type; - payload; - meta; - primaryKey; - serializedPrimaryKey; - constructor(entity, type, payload, meta) { - this.entity = entity; - this.type = type; - this.payload = payload; - this.meta = meta; - this.meta = meta; - this.rootMeta = meta.root; - this.schema = helper(entity).__schema ?? meta.root.schema; - } - /** Returns the primary key of the entity, optionally as an object for composite keys. */ - getPrimaryKey(object = false) { - if (!this.originalEntity) { - this.primaryKey ??= helper(this.entity).getPrimaryKey(true); - } else if (this.meta.compositePK) { - this.primaryKey = this.meta.primaryKeys.map(pk => this.originalEntity[pk]); - } else { - this.primaryKey = this.originalEntity[this.meta.primaryKeys[0]]; - } - if ( - !this.meta.compositePK && - this.meta.getPrimaryProp().targetMeta?.compositePK && - typeof this.primaryKey === 'object' && - this.primaryKey !== null - ) { - this.primaryKey = this.meta.getPrimaryProp().targetMeta.primaryKeys.map(childPK => { - return this.primaryKey[childPK]; - }); - } - if (object && this.primaryKey != null) { - return Utils.primaryKeyToObject(this.meta, this.primaryKey); - } - return this.primaryKey ?? null; - } - /** Returns the serialized (string) form of the primary key. */ - getSerializedPrimaryKey() { - this.serializedPrimaryKey ??= helper(this.entity).getSerializedPrimaryKey(); - return this.serializedPrimaryKey; - } - /** @ignore */ - [Symbol.for('nodejs.util.inspect.custom')](depth = 2) { - const object = { ...this }; - const hidden = ['meta', 'serializedPrimaryKey']; - hidden.forEach(k => delete object[k]); - const ret = inspect(object, { depth }); - const name = `${this.constructor.name}<${this.meta.className}>`; - /* v8 ignore next */ - return ret === '[Object]' ? `[${name}]` : name + ' ' + ret; - } -} -/** Enumeration of change set operation types. */ -export var ChangeSetType; -(function (ChangeSetType) { - ChangeSetType['CREATE'] = 'create'; - ChangeSetType['UPDATE'] = 'update'; - ChangeSetType['DELETE'] = 'delete'; - ChangeSetType['UPDATE_EARLY'] = 'update_early'; - ChangeSetType['DELETE_EARLY'] = 'delete_early'; -})(ChangeSetType || (ChangeSetType = {})); diff --git a/node_modules/@mikro-orm/core/unit-of-work/ChangeSetComputer.d.ts b/node_modules/@mikro-orm/core/unit-of-work/ChangeSetComputer.d.ts deleted file mode 100644 index c22f8d2..0000000 --- a/node_modules/@mikro-orm/core/unit-of-work/ChangeSetComputer.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { AnyEntity } from '../typings.js'; -import { ChangeSet } from './ChangeSet.js'; -import { type Collection } from '../entity/Collection.js'; -import type { EntityManager } from '../EntityManager.js'; -/** @internal Computes change sets by comparing entity state against original snapshots. */ -export declare class ChangeSetComputer { - #private; - constructor(em: EntityManager, collectionUpdates: Set>); - /** Computes a change set for the given entity by diffing against its original state. */ - computeChangeSet(entity: T): ChangeSet | null; - /** - * Traverses entity graph and executes `onCreate` and `onUpdate` methods, assigning the values to given properties. - */ - private processPropertyInitializers; - private computePayload; - private processProperty; - private processToOne; - private processToMany; -} diff --git a/node_modules/@mikro-orm/core/unit-of-work/ChangeSetComputer.js b/node_modules/@mikro-orm/core/unit-of-work/ChangeSetComputer.js deleted file mode 100644 index 028d085..0000000 --- a/node_modules/@mikro-orm/core/unit-of-work/ChangeSetComputer.js +++ /dev/null @@ -1,195 +0,0 @@ -import { Utils } from '../utils/Utils.js'; -import { QueryHelper } from '../utils/QueryHelper.js'; -import { ChangeSet, ChangeSetType } from './ChangeSet.js'; -import { helper } from '../entity/wrap.js'; -import { validateEntity } from '../entity/validators.js'; -import { Reference } from '../entity/Reference.js'; -import { PolymorphicRef } from '../entity/PolymorphicRef.js'; -import { ReferenceKind } from '../enums.js'; -import { isRaw } from '../utils/RawQueryFragment.js'; -/** @internal Computes change sets by comparing entity state against original snapshots. */ -export class ChangeSetComputer { - #comparator; - #metadata; - #platform; - #config; - #em; - #collectionUpdates; - constructor(em, collectionUpdates) { - this.#em = em; - this.#collectionUpdates = collectionUpdates; - this.#config = this.#em.config; - this.#metadata = this.#em.getMetadata(); - this.#platform = this.#em.getPlatform(); - this.#comparator = this.#config.getComparator(this.#metadata); - } - /** Computes a change set for the given entity by diffing against its original state. */ - computeChangeSet(entity) { - const meta = this.#metadata.get(entity.constructor); - if (meta.readonly) { - return null; - } - const wrapped = helper(entity); - const type = wrapped.__originalEntityData ? ChangeSetType.UPDATE : ChangeSetType.CREATE; - const map = new Map(); - // Execute `onCreate` and `onUpdate` on properties recursively, saves `onUpdate` results - // to the `map` as we want to apply those only if something else changed. - if (type === ChangeSetType.CREATE) { - // run update hooks only after we know there are other changes - for (const prop of meta.hydrateProps) { - this.processPropertyInitializers(entity, prop, type, map); - } - } - if (type === ChangeSetType.UPDATE && !wrapped.__initialized) { - const data = this.#comparator.prepareEntity(entity); - if (Utils.equals(data, wrapped.__originalEntityData)) { - return null; - } - } - const changeSet = new ChangeSet(entity, type, this.computePayload(entity), meta); - changeSet.originalEntity = wrapped.__originalEntityData; - for (const prop of meta.relations.filter(prop => prop.persist !== false || prop.userDefined === false)) { - this.processProperty(changeSet, prop); - } - if (changeSet.type === ChangeSetType.UPDATE && !Utils.hasObjectKeys(changeSet.payload)) { - return null; - } - validateEntity(changeSet.entity, meta); - // Execute `onCreate` and `onUpdate` on properties recursively, saves `onUpdate` results - // to the `map` as we want to apply those only if something else changed. - if (type === ChangeSetType.UPDATE) { - for (const prop of meta.hydrateProps) { - this.processPropertyInitializers(entity, prop, type, map); - } - } - if (map.size > 0) { - for (const [entity, pairs] of map) { - for (const [prop, value] of pairs) { - entity[prop] = value; - } - } - // Recompute the changeset, we need to merge this as here we ignore relations. - const diff = this.computePayload(entity, true); - Utils.merge(changeSet.payload, diff); - } - return changeSet; - } - /** - * Traverses entity graph and executes `onCreate` and `onUpdate` methods, assigning the values to given properties. - */ - processPropertyInitializers(entity, prop, type, map, nested) { - if ( - prop.onCreate && - type === ChangeSetType.CREATE && - (entity[prop.name] == null || (Utils.isScalarReference(entity[prop.name]) && entity[prop.name].unwrap() == null)) - ) { - entity[prop.name] = prop.onCreate(entity, this.#em); - } else if ( - prop.default != null && - !isRaw(prop.default) && - ![ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) && - type === ChangeSetType.CREATE && - entity[prop.name] === undefined - ) { - entity[prop.name] = prop.default; - } - if (prop.onUpdate && type === ChangeSetType.UPDATE) { - const pairs = map.get(entity) ?? []; - pairs.push([prop.name, prop.onUpdate(entity, this.#em)]); - map.set(entity, pairs); - } - if (prop.kind === ReferenceKind.EMBEDDED && entity[prop.name]) { - const items = prop.array ? entity[prop.name] : [entity[prop.name]]; - for (const item of items) { - for (const embeddedProp of prop.targetMeta.hydrateProps) { - this.processPropertyInitializers(item, embeddedProp, type, map, nested || prop.object); - } - } - } - } - computePayload(entity, ignoreUndefined = false) { - const data = this.#comparator.prepareEntity(entity); - const wrapped = helper(entity); - const entityName = wrapped.__meta.class; - const originalEntityData = wrapped.__originalEntityData; - if (!wrapped.__initialized) { - for (const prop of wrapped.__meta.primaryKeys) { - delete data[prop]; - } - return data; - } - if (originalEntityData) { - const comparator = this.#comparator.getEntityComparator(entityName); - const diff = comparator(originalEntityData, data); - if (ignoreUndefined) { - Utils.keys(diff) - .filter(k => diff[k] === undefined) - .forEach(k => delete diff[k]); - } - return diff; - } - return data; - } - processProperty(changeSet, prop, target) { - if (!target) { - const targets = Utils.unwrapProperty(changeSet.entity, changeSet.meta, prop); - targets.forEach(([t]) => this.processProperty(changeSet, prop, t)); - return; - } - if (Utils.isCollection(target)) { - // m:n or 1:m - this.processToMany(prop, changeSet); - } - if ([ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind)) { - this.processToOne(prop, changeSet); - } - } - processToOne(prop, changeSet) { - const isToOneOwner = - prop.kind === ReferenceKind.MANY_TO_ONE || (prop.kind === ReferenceKind.ONE_TO_ONE && prop.owner); - if (!isToOneOwner || prop.mapToPk) { - return; - } - const targets = Utils.unwrapProperty(changeSet.entity, changeSet.meta, prop); - targets.forEach(([rawTarget, idx]) => { - const target = Reference.unwrapReference(rawTarget); - const needsProcessing = target != null && (prop.targetKey != null || !target.__helper.hasPrimaryKey()); - if (needsProcessing) { - let value = prop.targetKey ? target[prop.targetKey] : target.__helper.__identifier; - /* v8 ignore next */ - if (prop.targetKey && prop.targetMeta) { - const targetProp = prop.targetMeta.properties[prop.targetKey]; - if (targetProp?.customType) { - value = targetProp.customType.convertToDatabaseValue(value, this.#platform, { mode: 'serialization' }); - } - } - if (prop.polymorphic) { - const discriminator = QueryHelper.findDiscriminatorValue(prop.discriminatorMap, target.constructor); - Utils.setPayloadProperty( - changeSet.payload, - changeSet.meta, - prop, - new PolymorphicRef(discriminator, value), - idx, - ); - } else { - Utils.setPayloadProperty(changeSet.payload, changeSet.meta, prop, value, idx); - } - } - }); - } - processToMany(prop, changeSet) { - const target = changeSet.entity[prop.name]; - if (!target.isDirty() && changeSet.type !== ChangeSetType.CREATE) { - return; - } - if (target.isDirty()) { - this.#collectionUpdates.add(target); - } - if (prop.owner && !this.#platform.usesPivotTable()) { - changeSet.payload[prop.name] = target.getItems(false).map(item => { - return item.__helper.__identifier ?? item.__helper.getPrimaryKey(); - }); - } - } -} diff --git a/node_modules/@mikro-orm/core/unit-of-work/ChangeSetPersister.d.ts b/node_modules/@mikro-orm/core/unit-of-work/ChangeSetPersister.d.ts deleted file mode 100644 index e58cf64..0000000 --- a/node_modules/@mikro-orm/core/unit-of-work/ChangeSetPersister.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -import type { Dictionary, EntityDictionary, EntityMetadata } from '../typings.js'; -import { type ChangeSet } from './ChangeSet.js'; -import type { DriverMethodOptions } from '../drivers/IDatabaseDriver.js'; -import type { EntityManager } from '../EntityManager.js'; -/** @internal Executes change sets against the database, handling inserts, updates, and deletes. */ -export declare class ChangeSetPersister { - #private; - constructor(em: EntityManager); - /** Executes all pending INSERT change sets, using batch inserts when possible. */ - executeInserts( - changeSets: ChangeSet[], - options?: DriverMethodOptions, - withSchema?: boolean, - ): Promise; - /** Executes all pending UPDATE change sets, using batch updates when possible. */ - executeUpdates( - changeSets: ChangeSet[], - batched: boolean, - options?: DriverMethodOptions, - withSchema?: boolean, - ): Promise; - /** Executes all pending DELETE change sets in batches. */ - executeDeletes( - changeSets: ChangeSet[], - options?: DriverMethodOptions, - withSchema?: boolean, - ): Promise; - private runForEachSchema; - private validateRequired; - private processProperties; - private persistNewEntity; - private persistNewEntities; - private prepareOptions; - private persistNewEntitiesBatch; - private persistManagedEntity; - private persistManagedEntities; - private checkConcurrencyKeys; - private persistManagedEntitiesBatch; - private mapPrimaryKey; - /** - * Sets populate flag to new entities so they are serialized like if they were loaded from the db - */ - private markAsPopulated; - private updateEntity; - private checkOptimisticLocks; - private checkOptimisticLock; - /** - * This method also handles reloading of database default values for inserts and raw property updates, - * so we use a single query in case of both versioning and default values is used. - */ - private reloadVersionValues; - /** - * For TPT child tables, resolve EntityIdentifier values in PK fields. - * The parent table insert assigns the actual PK value, which the child table references. - */ - private resolveTPTIdentifiers; - private processProperty; - /** - * Maps values returned via `returning` statement (postgres) or the inserted id (other sql drivers). - * No need to handle composite keys here as they need to be set upfront. - * We do need to map to the change set payload too, as it will be used in the originalEntityData for new entities. - */ - mapReturnedValues( - entity: T | null | undefined, - payload: EntityDictionary, - row: Dictionary | undefined, - meta: EntityMetadata, - upsert?: boolean, - ): void; -} diff --git a/node_modules/@mikro-orm/core/unit-of-work/ChangeSetPersister.js b/node_modules/@mikro-orm/core/unit-of-work/ChangeSetPersister.js deleted file mode 100644 index bd1763b..0000000 --- a/node_modules/@mikro-orm/core/unit-of-work/ChangeSetPersister.js +++ /dev/null @@ -1,475 +0,0 @@ -import { EntityIdentifier } from '../entity/EntityIdentifier.js'; -import { PolymorphicRef } from '../entity/PolymorphicRef.js'; -import { helper } from '../entity/wrap.js'; -import { ChangeSetType } from './ChangeSet.js'; -import { isRaw } from '../utils/RawQueryFragment.js'; -import { Utils } from '../utils/Utils.js'; -import { OptimisticLockError, ValidationError } from '../errors.js'; -import { ReferenceKind } from '../enums.js'; -/** @internal Executes change sets against the database, handling inserts, updates, and deletes. */ -export class ChangeSetPersister { - #platform; - #comparator; - #usesReturningStatement; - #driver; - #metadata; - #hydrator; - #factory; - #config; - #em; - constructor(em) { - this.#em = em; - this.#driver = this.#em.getDriver(); - this.#config = this.#em.config; - this.#metadata = this.#em.getMetadata(); - this.#factory = this.#em.getEntityFactory(); - this.#platform = this.#driver.getPlatform(); - this.#hydrator = this.#config.getHydrator(this.#metadata); - this.#comparator = this.#config.getComparator(this.#metadata); - this.#usesReturningStatement = this.#platform.usesReturningStatement() || this.#platform.usesOutputStatement(); - } - /** Executes all pending INSERT change sets, using batch inserts when possible. */ - async executeInserts(changeSets, options, withSchema) { - if (!withSchema) { - return this.runForEachSchema(changeSets, 'executeInserts', options); - } - const meta = changeSets[0].meta; - changeSets.forEach(changeSet => this.processProperties(changeSet)); - if (changeSets.length > 1 && this.#config.get('useBatchInserts', this.#platform.usesBatchInserts())) { - return this.persistNewEntities(meta, changeSets, options); - } - for (const changeSet of changeSets) { - await this.persistNewEntity(meta, changeSet, options); - } - } - /** Executes all pending UPDATE change sets, using batch updates when possible. */ - async executeUpdates(changeSets, batched, options, withSchema) { - if (!withSchema) { - return this.runForEachSchema(changeSets, 'executeUpdates', options, batched); - } - const meta = changeSets[0].meta; - changeSets.forEach(changeSet => this.processProperties(changeSet)); - // For STI with conflicting fieldNames (renamedFrom properties), we can't batch mixed child types - const hasSTIConflicts = meta.root.props.some(p => p.renamedFrom); - const hasMixedTypes = hasSTIConflicts && changeSets.some(cs => cs.meta.class !== meta.class); - if ( - batched && - changeSets.length > 1 && - !hasMixedTypes && - this.#config.get('useBatchUpdates', this.#platform.usesBatchUpdates()) - ) { - return this.persistManagedEntities(meta, changeSets, options); - } - for (const changeSet of changeSets) { - await this.persistManagedEntity(changeSet, options); - } - } - /** Executes all pending DELETE change sets in batches. */ - async executeDeletes(changeSets, options, withSchema) { - if (!withSchema) { - return this.runForEachSchema(changeSets, 'executeDeletes', options); - } - const size = this.#config.get('batchSize'); - const meta = changeSets[0].meta; - const pk = Utils.getPrimaryKeyHash(meta.primaryKeys); - for (let i = 0; i < changeSets.length; i += size) { - const chunk = changeSets.slice(i, i + size); - const pks = chunk.map(cs => cs.getPrimaryKey()); - options = this.prepareOptions(meta, options); - await this.#driver.nativeDelete(meta.root.class, { [pk]: { $in: pks } }, options); - } - } - async runForEachSchema(changeSets, method, options, ...args) { - const groups = new Map(); - changeSets.forEach(cs => { - const group = groups.get(cs.schema) ?? []; - group.push(cs); - groups.set(cs.schema, group); - }); - for (const [key, group] of groups.entries()) { - options = { ...options, schema: key }; - // @ts-ignore - await this[method](group, ...args, options, true); - } - } - validateRequired(entity) { - const wrapped = helper(entity); - for (const prop of wrapped.__meta.props) { - if ( - !prop.nullable && - !prop.autoincrement && - !prop.default && - !prop.defaultRaw && - !prop.onCreate && - !prop.generated && - !prop.embedded && - ![ReferenceKind.ONE_TO_MANY, ReferenceKind.MANY_TO_MANY].includes(prop.kind) && - prop.name !== wrapped.__meta.root.discriminatorColumn && - prop.type !== 'ObjectId' && - prop.persist !== false && - entity[prop.name] == null - ) { - throw ValidationError.propertyRequired(entity, prop); - } - } - } - processProperties(changeSet) { - const meta = changeSet.meta; - for (const prop of meta.relations) { - this.processProperty(changeSet, prop); - } - if (changeSet.type === ChangeSetType.CREATE && this.#config.get('validateRequired')) { - this.validateRequired(changeSet.entity); - } - } - async persistNewEntity(meta, changeSet, options) { - const wrapped = helper(changeSet.entity); - options = this.prepareOptions(meta, options, { - convertCustomTypes: false, - }); - this.resolveTPTIdentifiers(changeSet); - // Use changeSet's own meta for STI entities to get correct field mappings - const res = await this.#driver.nativeInsertMany(changeSet.meta.class, [changeSet.payload], options); - if (!wrapped.hasPrimaryKey()) { - this.mapPrimaryKey(meta, res.insertId ?? res.row?.[meta.primaryKeys[0]], changeSet); - } - this.mapReturnedValues(changeSet.entity, changeSet.payload, res.row, meta); - this.markAsPopulated(changeSet, meta); - wrapped.__initialized = true; - wrapped.__managed = true; - if (!this.#usesReturningStatement) { - await this.reloadVersionValues(meta, [changeSet], options); - } - changeSet.persisted = true; - } - async persistNewEntities(meta, changeSets, options) { - const size = this.#config.get('batchSize'); - for (let i = 0; i < changeSets.length; i += size) { - const chunk = changeSets.slice(i, i + size); - await this.persistNewEntitiesBatch(meta, chunk, options); - if (!this.#usesReturningStatement) { - await this.reloadVersionValues(meta, chunk, options); - } - } - } - prepareOptions(meta, options, additionalOptions) { - const loggerContext = Utils.merge( - { id: this.#em._id }, - this.#em.getLoggerContext({ disableContextResolution: true }), - ); - return { - ...options, - ...additionalOptions, - schema: options?.schema ?? meta.schema, - loggerContext, - }; - } - async persistNewEntitiesBatch(meta, changeSets, options) { - options = this.prepareOptions(meta, options, { - convertCustomTypes: false, - processCollections: false, - }); - for (const changeSet of changeSets) { - this.resolveTPTIdentifiers(changeSet); - } - const res = await this.#driver.nativeInsertMany( - meta.class, - changeSets.map(cs => cs.payload), - options, - ); - for (let i = 0; i < changeSets.length; i++) { - const changeSet = changeSets[i]; - const wrapped = helper(changeSet.entity); - if (!wrapped.hasPrimaryKey()) { - const field = meta.getPrimaryProps()[0].fieldNames[0]; - this.mapPrimaryKey(meta, res.rows[i][field], changeSet); - } - if (res.rows) { - this.mapReturnedValues(changeSet.entity, changeSet.payload, res.rows[i], meta); - } - this.markAsPopulated(changeSet, meta); - wrapped.__initialized = true; - wrapped.__managed = true; - changeSet.persisted = true; - } - } - async persistManagedEntity(changeSet, options) { - const meta = changeSet.meta; - const res = await this.updateEntity(meta, changeSet, options); - this.checkOptimisticLock(meta, changeSet, res); - this.mapReturnedValues(changeSet.entity, changeSet.payload, res.row, meta); - await this.reloadVersionValues(meta, [changeSet], options); - changeSet.persisted = true; - } - async persistManagedEntities(meta, changeSets, options) { - const size = this.#config.get('batchSize'); - for (let i = 0; i < changeSets.length; i += size) { - const chunk = changeSets.slice(i, i + size); - await this.persistManagedEntitiesBatch(meta, chunk, options); - await this.reloadVersionValues(meta, chunk, options); - } - } - checkConcurrencyKeys(meta, changeSet, cond) { - const tmp = []; - for (const key of meta.concurrencyCheckKeys) { - cond[key] = changeSet.originalEntity[key]; - if (changeSet.payload[key]) { - tmp.push(key); - } - } - if (tmp.length === 0 && meta.concurrencyCheckKeys.size > 0) { - throw OptimisticLockError.lockFailed(changeSet.entity); - } - } - async persistManagedEntitiesBatch(meta, changeSets, options) { - await this.checkOptimisticLocks(meta, changeSets, options); - options = this.prepareOptions(meta, options, { - convertCustomTypes: false, - processCollections: false, - }); - const cond = []; - const payload = []; - for (const changeSet of changeSets) { - const where = changeSet.getPrimaryKey(true); - this.checkConcurrencyKeys(meta, changeSet, where); - cond.push(where); - payload.push(changeSet.payload); - } - const res = await this.#driver.nativeUpdateMany(meta.class, cond, payload, options); - const map = new Map(); - res.rows?.forEach(item => map.set(Utils.getCompositeKeyHash(item, meta, true, this.#platform, true), item)); - for (const changeSet of changeSets) { - if (res.rows) { - const row = map.get(helper(changeSet.entity).getSerializedPrimaryKey()); - this.mapReturnedValues(changeSet.entity, changeSet.payload, row, meta); - } - changeSet.persisted = true; - } - } - mapPrimaryKey(meta, value, changeSet) { - const prop = meta.properties[meta.primaryKeys[0]]; - const insertId = prop.customType ? prop.customType.convertToJSValue(value, this.#platform) : value; - const wrapped = helper(changeSet.entity); - if (!wrapped.hasPrimaryKey()) { - wrapped.setPrimaryKey(insertId); - } - // some drivers might be returning bigint PKs as numbers when the number is small enough, - // but we need to have it as string so comparison works in change set tracking, so instead - // of using the raw value from db, we convert it back to the db value explicitly - value = prop.customType - ? prop.customType.convertToDatabaseValue(insertId, this.#platform, { mode: 'serialization' }) - : value; - changeSet.payload[wrapped.__meta.primaryKeys[0]] = value; - if (wrapped.__identifier && !Array.isArray(wrapped.__identifier)) { - wrapped.__identifier.setValue(value); - } - } - /** - * Sets populate flag to new entities so they are serialized like if they were loaded from the db - */ - markAsPopulated(changeSet, meta) { - helper(changeSet.entity).__schema = this.#driver.getSchemaName(meta, changeSet); - if (!this.#config.get('populateAfterFlush')) { - return; - } - helper(changeSet.entity).populated(); - meta.relations.forEach(prop => { - const value = changeSet.entity[prop.name]; - if (Utils.isEntity(value, true)) { - value.__helper.populated(); - } else if (Utils.isCollection(value)) { - value.populated(); - } - }); - } - async updateEntity(meta, changeSet, options) { - const cond = changeSet.getPrimaryKey(true); - options = this.prepareOptions(meta, options, { - convertCustomTypes: false, - }); - if ( - meta.concurrencyCheckKeys.size === 0 && - (!meta.versionProperty || changeSet.entity[meta.versionProperty] == null) - ) { - return this.#driver.nativeUpdate(changeSet.meta.class, cond, changeSet.payload, options); - } - if (meta.versionProperty) { - cond[meta.versionProperty] = this.#platform.convertVersionValue( - changeSet.entity[meta.versionProperty], - meta.properties[meta.versionProperty], - ); - } - this.checkConcurrencyKeys(meta, changeSet, cond); - return this.#driver.nativeUpdate(changeSet.meta.class, cond, changeSet.payload, options); - } - async checkOptimisticLocks(meta, changeSets, options) { - if ( - meta.concurrencyCheckKeys.size === 0 && - (!meta.versionProperty || changeSets.every(cs => cs.entity[meta.versionProperty] == null)) - ) { - return; - } - // skip entity references as they don't have version values loaded - changeSets = changeSets.filter(cs => helper(cs.entity).__initialized); - const $or = changeSets.map(cs => { - const cond = Utils.getPrimaryKeyCond(cs.originalEntity, meta.primaryKeys.concat(...meta.concurrencyCheckKeys)); - if (meta.versionProperty) { - // @ts-ignore - cond[meta.versionProperty] = this.#platform.convertVersionValue( - cs.entity[meta.versionProperty], - meta.properties[meta.versionProperty], - ); - } - return cond; - }); - const primaryKeys = meta.primaryKeys.concat(...meta.concurrencyCheckKeys); - options = this.prepareOptions(meta, options, { - fields: primaryKeys, - }); - const res = await this.#driver.find(meta.root.class, { $or }, options); - if (res.length !== changeSets.length) { - const compare = (a, b, keys) => keys.every(k => a[k] === b[k]); - const entity = changeSets.find(cs => { - return !res.some(row => compare(Utils.getPrimaryKeyCond(cs.entity, primaryKeys), row, primaryKeys)); - }).entity; - throw OptimisticLockError.lockFailed(entity); - } - } - checkOptimisticLock(meta, changeSet, res) { - if ((meta.versionProperty || meta.concurrencyCheckKeys.size > 0) && res && !res.affectedRows) { - throw OptimisticLockError.lockFailed(changeSet.entity); - } - } - /** - * This method also handles reloading of database default values for inserts and raw property updates, - * so we use a single query in case of both versioning and default values is used. - */ - async reloadVersionValues(meta, changeSets, options) { - const reloadProps = - meta.versionProperty && !this.#usesReturningStatement ? [meta.properties[meta.versionProperty]] : []; - if (changeSets[0].type === ChangeSetType.CREATE) { - for (const prop of meta.props) { - if (prop.persist === false) { - continue; - } - if (isRaw(changeSets[0].entity[prop.name])) { - reloadProps.push(prop); - continue; - } - // do not reload things that already had a runtime value - if (changeSets[0].entity[prop.name] != null || prop.defaultRaw === 'null') { - continue; - } - if (prop.autoincrement || prop.generated || prop.defaultRaw) { - reloadProps.push(prop); - } - } - } - if (changeSets[0].type === ChangeSetType.UPDATE) { - const returning = new Set(); - changeSets.forEach(cs => { - Utils.keys(cs.payload).forEach(k => { - if (isRaw(cs.payload[k]) && isRaw(cs.entity[k])) { - returning.add(meta.properties[k]); - } - }); - }); - // reload generated columns - if (!this.#usesReturningStatement) { - meta.props.filter(prop => prop.generated && !prop.primary).forEach(prop => reloadProps.push(prop)); - reloadProps.push(...returning); - } - } - if (reloadProps.length === 0) { - return; - } - reloadProps.unshift(...meta.getPrimaryProps()); - const pk = Utils.getPrimaryKeyHash(meta.primaryKeys); - const pks = changeSets.map(cs => { - const val = helper(cs.entity).getPrimaryKey(true); - if (Utils.isPlainObject(val)) { - return Utils.getCompositeKeyValue(val, meta, false, this.#platform); - } - return val; - }); - options = this.prepareOptions(meta, options, { - fields: Utils.unique(reloadProps.map(prop => prop.name)), - }); - const data = await this.#driver.find(meta.class, { [pk]: { $in: pks } }, options); - const map = new Map(); - data.forEach(item => map.set(Utils.getCompositeKeyHash(item, meta, false, this.#platform, true), item)); - for (const changeSet of changeSets) { - const data = map.get(helper(changeSet.entity).getSerializedPrimaryKey()); - this.#hydrator.hydrate(changeSet.entity, meta, data, this.#factory, 'full', false, true); - Object.assign(changeSet.payload, data); // merge to the changeset payload, so it gets saved to the entity snapshot - } - } - /** - * For TPT child tables, resolve EntityIdentifier values in PK fields. - * The parent table insert assigns the actual PK value, which the child table references. - */ - resolveTPTIdentifiers(changeSet) { - if (changeSet.meta.inheritanceType !== 'tpt' || !changeSet.meta.tptParent) { - return; - } - for (const pk of changeSet.meta.primaryKeys) { - const value = changeSet.payload[pk]; - if (value instanceof EntityIdentifier) { - changeSet.payload[pk] = value.getValue(); - } - } - } - processProperty(changeSet, prop) { - const meta = changeSet.meta; - const value = changeSet.payload[prop.name]; // for inline embeddables - if (value instanceof EntityIdentifier) { - changeSet.payload[prop.name] = value.getValue(); - return; - } - if (value instanceof PolymorphicRef) { - if (value.id instanceof EntityIdentifier) { - value.id = value.id.getValue(); - } - return; - } - if (Array.isArray(value) && value.every(item => item instanceof EntityIdentifier)) { - changeSet.payload[prop.name] = value.map(item => item.getValue()); - return; - } - if (prop.kind === ReferenceKind.MANY_TO_MANY && Array.isArray(value)) { - changeSet.payload[prop.name] = value.map(val => (val instanceof EntityIdentifier ? val.getValue() : val)); - return; - } - if (prop.name in changeSet.payload) { - return; - } - const values = Utils.unwrapProperty(changeSet.payload, meta, prop, true); // for object embeddables - values.forEach(([value, indexes]) => { - if (value instanceof EntityIdentifier) { - Utils.setPayloadProperty(changeSet.payload, meta, prop, value.getValue(), indexes); - } - }); - } - /** - * Maps values returned via `returning` statement (postgres) or the inserted id (other sql drivers). - * No need to handle composite keys here as they need to be set upfront. - * We do need to map to the change set payload too, as it will be used in the originalEntityData for new entities. - */ - mapReturnedValues(entity, payload, row, meta, upsert = false) { - if ((!this.#usesReturningStatement && !upsert) || !row || !Utils.hasObjectKeys(row)) { - return; - } - const mapped = this.#comparator.mapResult(meta, row); - if (entity) { - this.#hydrator.hydrate(entity, meta, mapped, this.#factory, 'full', false, true); - } - if (upsert) { - for (const prop of meta.props) { - if (prop.customType && prop.name in mapped) { - mapped[prop.name] = prop.customType.convertToJSValue(mapped[prop.name], this.#platform); - } - } - } - Object.assign(payload, mapped); - } -} diff --git a/node_modules/@mikro-orm/core/unit-of-work/CommitOrderCalculator.d.ts b/node_modules/@mikro-orm/core/unit-of-work/CommitOrderCalculator.d.ts deleted file mode 100644 index c1445aa..0000000 --- a/node_modules/@mikro-orm/core/unit-of-work/CommitOrderCalculator.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -import type { EntityProperty } from '../typings.js'; -export declare const enum NodeState { - NOT_VISITED = 0, - IN_PROGRESS = 1, - VISITED = 2, -} -type Hash = number; -export interface Node { - hash: Hash; - state: NodeState; - dependencies: Map; -} -export interface Edge { - from: Hash; - to: Hash; - weight: number; -} -/** - * CommitOrderCalculator implements topological sorting, which is an ordering - * algorithm for directed graphs (DG) and/or directed acyclic graphs (DAG) by - * using a depth-first searching (DFS) to traverse the graph built in memory. - * This algorithm have a linear running time based on nodes (V) and dependency - * between the nodes (E), resulting in a computational complexity of O(V + E). - * - * Based on https://github.com/doctrine/orm/blob/master/lib/Doctrine/ORM/Internal/CommitOrderCalculator.php - * @internal - */ -export declare class CommitOrderCalculator { - #private; - /** - * Checks for node existence in graph. - */ - hasNode(hash: Hash): boolean; - /** - * Adds a new node to the graph, assigning its hash. - */ - addNode(hash: Hash): void; - /** - * Adds a new dependency (edge) to the graph using their hashes. - */ - addDependency(from: Hash, to: Hash, weight: number): void; - discoverProperty(prop: EntityProperty, entityName: Hash): void; - /** - * Return a valid order list of all current nodes. - * The desired topological sorting is the reverse post order of these searches. - * - * @internal Highly performance-sensitive method. - */ - sort(): Hash[]; - /** - * Visit a given node definition for reordering. - * - * @internal Highly performance-sensitive method. - */ - private visit; - /** - * Visits all target's dependencies if in cycle with given node - */ - private visitOpenNode; -} -export {}; diff --git a/node_modules/@mikro-orm/core/unit-of-work/CommitOrderCalculator.js b/node_modules/@mikro-orm/core/unit-of-work/CommitOrderCalculator.js deleted file mode 100644 index f868657..0000000 --- a/node_modules/@mikro-orm/core/unit-of-work/CommitOrderCalculator.js +++ /dev/null @@ -1,112 +0,0 @@ -import { ReferenceKind } from '../enums.js'; -export var NodeState; -(function (NodeState) { - NodeState[(NodeState['NOT_VISITED'] = 0)] = 'NOT_VISITED'; - NodeState[(NodeState['IN_PROGRESS'] = 1)] = 'IN_PROGRESS'; - NodeState[(NodeState['VISITED'] = 2)] = 'VISITED'; -})(NodeState || (NodeState = {})); -/** - * CommitOrderCalculator implements topological sorting, which is an ordering - * algorithm for directed graphs (DG) and/or directed acyclic graphs (DAG) by - * using a depth-first searching (DFS) to traverse the graph built in memory. - * This algorithm have a linear running time based on nodes (V) and dependency - * between the nodes (E), resulting in a computational complexity of O(V + E). - * - * Based on https://github.com/doctrine/orm/blob/master/lib/Doctrine/ORM/Internal/CommitOrderCalculator.php - * @internal - */ -export class CommitOrderCalculator { - /** Matrix of nodes, keys are provided hashes and values are the node definition objects. */ - #nodes = new Map(); - /** Volatile variable holding calculated nodes during sorting process. */ - #sortedNodeList = []; - /** - * Checks for node existence in graph. - */ - hasNode(hash) { - return this.#nodes.has(hash); - } - /** - * Adds a new node to the graph, assigning its hash. - */ - addNode(hash) { - this.#nodes.set(hash, { hash, state: 0 /* NodeState.NOT_VISITED */, dependencies: new Map() }); - } - /** - * Adds a new dependency (edge) to the graph using their hashes. - */ - addDependency(from, to, weight) { - this.#nodes.get(from).dependencies.set(to, { from, to, weight }); - } - discoverProperty(prop, entityName) { - const toOneOwner = - (prop.kind === ReferenceKind.ONE_TO_ONE && prop.owner) || prop.kind === ReferenceKind.MANY_TO_ONE; - const toManyOwner = prop.kind === ReferenceKind.MANY_TO_MANY && prop.owner && !prop.pivotEntity; - if (!toOneOwner && !toManyOwner) { - return; - } - const propertyType = prop.targetMeta?.root._id; - if (propertyType == null || !this.hasNode(propertyType)) { - return; - } - this.addDependency(propertyType, entityName, prop.nullable || prop.persist === false ? 0 : 1); - } - /** - * Return a valid order list of all current nodes. - * The desired topological sorting is the reverse post order of these searches. - * - * @internal Highly performance-sensitive method. - */ - sort() { - for (const vertex of this.#nodes.values()) { - if (vertex.state !== 0 /* NodeState.NOT_VISITED */) { - continue; - } - this.visit(vertex); - } - const sortedList = this.#sortedNodeList.reverse(); - this.#nodes = new Map(); - this.#sortedNodeList = []; - return sortedList; - } - /** - * Visit a given node definition for reordering. - * - * @internal Highly performance-sensitive method. - */ - visit(node) { - node.state = 1 /* NodeState.IN_PROGRESS */; - for (const edge of node.dependencies.values()) { - const target = this.#nodes.get(edge.to); - switch (target.state) { - case 2 /* NodeState.VISITED */: - break; // Do nothing, since node was already visited - case 1 /* NodeState.IN_PROGRESS */: - this.visitOpenNode(node, target, edge); - break; - case 0 /* NodeState.NOT_VISITED */: - this.visit(target); - } - } - if (node.state !== 2 /* NodeState.VISITED */) { - node.state = 2 /* NodeState.VISITED */; - this.#sortedNodeList.push(node.hash); - } - } - /** - * Visits all target's dependencies if in cycle with given node - */ - visitOpenNode(node, target, edge) { - if (!target.dependencies.has(node.hash) || target.dependencies.get(node.hash).weight >= edge.weight) { - return; - } - for (const edge of target.dependencies.values()) { - const targetNode = this.#nodes.get(edge.to); - if (targetNode.state === 0 /* NodeState.NOT_VISITED */) { - this.visit(targetNode); - } - } - target.state = 2 /* NodeState.VISITED */; - this.#sortedNodeList.push(target.hash); - } -} diff --git a/node_modules/@mikro-orm/core/unit-of-work/IdentityMap.d.ts b/node_modules/@mikro-orm/core/unit-of-work/IdentityMap.d.ts deleted file mode 100644 index 74af2f5..0000000 --- a/node_modules/@mikro-orm/core/unit-of-work/IdentityMap.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { AnyEntity, EntityMetadata } from '../typings.js'; -/** @internal Stores managed entity instances keyed by their primary key hash, ensuring each row is loaded once. */ -export declare class IdentityMap { - #private; - constructor(defaultSchema?: string); - /** Stores an entity in the identity map under its primary key hash. */ - store(item: T): void; - /** - * Stores an entity under an alternate key (non-PK property). - * This allows looking up entities by unique properties that are not the primary key. - */ - storeByKey(item: T, key: string, value: string, schema?: string): void; - /** Removes an entity and its alternate key entries from the identity map. */ - delete(item: T): void; - /** Retrieves an entity by its hash key from the identity map. */ - getByHash(meta: EntityMetadata, hash: string): T | undefined; - /** Returns (or creates) the per-entity-class store within the identity map. */ - getStore(meta: EntityMetadata): Map; - clear(): void; - /** Returns all entities currently in the identity map. */ - values(): AnyEntity[]; - [Symbol.iterator](): IterableIterator; - /** Returns all hash keys currently in the identity map. */ - keys(): string[]; - /** - * For back compatibility only. - */ - get(hash: string): T | undefined; - private getPkHash; - /** - * Creates a hash for an alternate key lookup. - * Format: `[key]value` or `schema:[key]value` - */ - getKeyHash(key: string, value: string, schema?: string): string; -} diff --git a/node_modules/@mikro-orm/core/unit-of-work/IdentityMap.js b/node_modules/@mikro-orm/core/unit-of-work/IdentityMap.js deleted file mode 100644 index 60dbfd8..0000000 --- a/node_modules/@mikro-orm/core/unit-of-work/IdentityMap.js +++ /dev/null @@ -1,117 +0,0 @@ -/** @internal Stores managed entity instances keyed by their primary key hash, ensuring each row is loaded once. */ -export class IdentityMap { - #defaultSchema; - #registry = new Map(); - /** Tracks alternate key hashes for each entity so we can clean them up on delete */ - #alternateKeys = new WeakMap(); - constructor(defaultSchema) { - this.#defaultSchema = defaultSchema; - } - /** Stores an entity in the identity map under its primary key hash. */ - store(item) { - this.getStore(item.__meta.root).set(this.getPkHash(item), item); - } - /** - * Stores an entity under an alternate key (non-PK property). - * This allows looking up entities by unique properties that are not the primary key. - */ - storeByKey(item, key, value, schema) { - const hash = this.getKeyHash(key, value, schema); - this.getStore(item.__meta.root).set(hash, item); - // Track this alternate key so we can clean it up when the entity is deleted - let keys = this.#alternateKeys.get(item); - if (!keys) { - keys = new Set(); - this.#alternateKeys.set(item, keys); - } - keys.add(hash); - } - /** Removes an entity and its alternate key entries from the identity map. */ - delete(item) { - const meta = item.__meta.root; - const store = this.getStore(meta); - store.delete(this.getPkHash(item)); - // Also delete any alternate key entries for this entity - const altKeys = this.#alternateKeys.get(item); - if (altKeys) { - for (const hash of altKeys) { - store.delete(hash); - } - this.#alternateKeys.delete(item); - } - } - /** Retrieves an entity by its hash key from the identity map. */ - getByHash(meta, hash) { - const store = this.getStore(meta); - return store.has(hash) ? store.get(hash) : undefined; - } - /** Returns (or creates) the per-entity-class store within the identity map. */ - getStore(meta) { - const store = this.#registry.get(meta.class); - if (store) { - return store; - } - const newStore = new Map(); - this.#registry.set(meta.class, newStore); - return newStore; - } - clear() { - this.#registry.clear(); - } - /** Returns all entities currently in the identity map. */ - values() { - const ret = []; - for (const store of this.#registry.values()) { - ret.push(...store.values()); - } - return ret; - } - *[Symbol.iterator]() { - for (const store of this.#registry.values()) { - for (const item of store.values()) { - yield item; - } - } - } - /** Returns all hash keys currently in the identity map. */ - keys() { - const ret = []; - for (const [cls, store] of this.#registry) { - ret.push(...[...store.keys()].map(hash => `${cls.name}-${hash}`)); - } - return ret; - } - /** - * For back compatibility only. - */ - get(hash) { - const [name, id] = hash.split('-', 2); - const cls = [...this.#registry.keys()].find(k => k.name === name); - if (!cls) { - return undefined; - } - const store = this.#registry.get(cls); - return store.has(id) ? store.get(id) : undefined; - } - getPkHash(item) { - const wrapped = item.__helper; - const meta = wrapped.__meta; - const hash = wrapped.getSerializedPrimaryKey(); - const schema = wrapped.__schema ?? meta.root.schema ?? this.#defaultSchema; - if (schema) { - return schema + ':' + hash; - } - return hash; - } - /** - * Creates a hash for an alternate key lookup. - * Format: `[key]value` or `schema:[key]value` - */ - getKeyHash(key, value, schema) { - const hash = `[${key}]${value}`; - if (schema) { - return schema + ':' + hash; - } - return hash; - } -} diff --git a/node_modules/@mikro-orm/core/unit-of-work/UnitOfWork.d.ts b/node_modules/@mikro-orm/core/unit-of-work/UnitOfWork.d.ts deleted file mode 100644 index 7a53cbc..0000000 --- a/node_modules/@mikro-orm/core/unit-of-work/UnitOfWork.d.ts +++ /dev/null @@ -1,193 +0,0 @@ -import type { - AnyEntity, - EntityData, - EntityMetadata, - EntityName, - EntityProperty, - FilterQuery, - Primary, -} from '../typings.js'; -import { Collection } from '../entity/Collection.js'; -import { Reference } from '../entity/Reference.js'; -import { ChangeSet, ChangeSetType } from './ChangeSet.js'; -import { ChangeSetPersister } from './ChangeSetPersister.js'; -import type { EntityManager } from '../EntityManager.js'; -import { IdentityMap } from './IdentityMap.js'; -import type { LockOptions } from '../drivers/IDatabaseDriver.js'; -/** Implements the Unit of Work pattern: tracks entity changes, computes change sets, and flushes them to the database. */ -export declare class UnitOfWork { - #private; - constructor(em: EntityManager); - /** Merges an entity into the identity map, taking a snapshot of its current state. */ - merge(entity: T, visited?: Set): void; - /** - * Entity data can wary in its shape, e.g. we might get a deep relation graph with joined strategy, but for diffing, - * we need to normalize the shape, so relation values are only raw FKs. This method handles that. - * @internal - */ - normalizeEntityData(meta: EntityMetadata, data: EntityData): void; - /** - * @internal - */ - register(entity: T, data?: EntityData, options?: RegisterOptions): T; - /** - * @internal - */ - dispatchOnLoadEvent(): Promise; - /** - * @internal - */ - unmarkAsLoaded(entity: AnyEntity): void; - /** - * Returns entity from the identity map. For composite keys, you need to pass an array of PKs in the same order as they are defined in `meta.primaryKeys`. - */ - getById( - entityName: EntityName, - id: Primary | Primary[], - schema?: string, - convertCustomTypes?: boolean, - ): T | undefined; - /** - * Returns entity from the identity map by an alternate key (non-PK property). - * @param convertCustomTypes - If true, the value is in database format and will be converted to JS format for lookup. - * If false (default), the value is assumed to be in JS format already. - */ - getByKey( - entityName: EntityName, - key: string, - value: unknown, - schema?: string, - convertCustomTypes?: boolean, - ): T | undefined; - /** - * Stores an entity in the identity map under an alternate key (non-PK property). - * Also sets the property value on the entity. - * @param convertCustomTypes - If true, the value is in database format and will be converted to JS format. - * If false (default), the value is assumed to be in JS format already. - */ - storeByKey( - entity: T, - key: string, - value: unknown, - schema?: string, - convertCustomTypes?: boolean, - ): void; - /** Attempts to extract a primary key from the where condition and look up the entity in the identity map. */ - tryGetById( - entityName: EntityName, - where: FilterQuery, - schema?: string, - strict?: boolean, - ): T | null; - /** - * Returns map of all managed entities. - */ - getIdentityMap(): IdentityMap; - /** - * Returns stored snapshot of entity state that is used for change set computation. - */ - getOriginalEntityData(entity: T): EntityData | undefined; - /** Returns the set of entities scheduled for persistence. */ - getPersistStack(): Set; - /** Returns the set of entities scheduled for removal. */ - getRemoveStack(): Set; - /** Returns all computed change sets for the current flush. */ - getChangeSets(): ChangeSet[]; - /** Returns all M:N collections that need synchronization. */ - getCollectionUpdates(): Collection[]; - /** Returns extra updates needed for relations that could not be resolved in the initial pass. */ - getExtraUpdates(): Set< - [ - AnyEntity, - string | string[], - AnyEntity | AnyEntity[] | Reference | Collection, - ChangeSet | undefined, - ChangeSetType, - ] - >; - /** Checks whether an auto-flush is needed before querying the given entity type. */ - shouldAutoFlush(meta: EntityMetadata): boolean; - /** Clears the queue of entity types that triggered auto-flush detection. */ - clearActionsQueue(): void; - /** Computes and registers a change set for the given entity. */ - computeChangeSet(entity: T, type?: ChangeSetType): void; - /** Recomputes and merges the change set for an already-tracked entity. */ - recomputeSingleChangeSet(entity: T): void; - /** Marks an entity for persistence, cascading to related entities. */ - persist( - entity: T, - visited?: Set, - options?: { - checkRemoveStack?: boolean; - cascade?: boolean; - }, - ): void; - /** Marks an entity for removal, cascading to related entities. */ - remove( - entity: T, - visited?: Set, - options?: { - cascade?: boolean; - }, - ): void; - /** Flushes all pending changes to the database within a transaction. */ - commit(): Promise; - private doCommit; - lock(entity: T, options: LockOptions): Promise; - clear(): void; - unsetIdentity(entity: AnyEntity): void; - computeChangeSets(): void; - scheduleExtraUpdate(changeSet: ChangeSet, props: EntityProperty[]): void; - scheduleOrphanRemoval(entity?: AnyEntity, visited?: Set): void; - cancelOrphanRemoval(entity: AnyEntity, visited?: Set): void; - getOrphanRemoveStack(): Set; - getChangeSetPersister(): ChangeSetPersister; - private findNewEntities; - /** - * For TPT inheritance, creates separate changesets for each table in the hierarchy. - * Uses the same entity instance for all changesets - only the metadata and payload differ. - */ - private createTPTChangeSets; - /** - * Returns `true` when the change set should be skipped as it will be empty after the extra update. - */ - private checkUniqueProps; - private expandUniqueProps; - private initIdentifier; - private processReference; - private processToOneReference; - private processToManyReference; - private runHooks; - private postCommitCleanup; - private cascade; - private cascadeReference; - private isCollectionSelfReferenced; - private shouldCascade; - private lockPessimistic; - private lockOptimistic; - private fixMissingReference; - private persistToDatabase; - private commitCreateChangeSets; - private findExtraUpdates; - private findEarlyUpdates; - private commitUpdateChangeSets; - private commitDeleteChangeSets; - private commitExtraUpdates; - private commitCollectionUpdates; - private filterCollectionUpdates; - /** - * Orders change sets so FK constrains are maintained, ensures stable order (needed for node < 11) - */ - private getChangeSetGroups; - private getCommitOrder; - private resetTransaction; - /** - * Takes snapshots of all processed collections - */ - private takeCollectionSnapshots; -} -export interface RegisterOptions { - refresh?: boolean; - newEntity?: boolean; - loaded?: boolean; -} diff --git a/node_modules/@mikro-orm/core/unit-of-work/UnitOfWork.js b/node_modules/@mikro-orm/core/unit-of-work/UnitOfWork.js deleted file mode 100644 index c84d1bf..0000000 --- a/node_modules/@mikro-orm/core/unit-of-work/UnitOfWork.js +++ /dev/null @@ -1,1226 +0,0 @@ -import { Collection } from '../entity/Collection.js'; -import { EntityHelper } from '../entity/EntityHelper.js'; -import { helper } from '../entity/wrap.js'; -import { Reference } from '../entity/Reference.js'; -import { EntityIdentifier } from '../entity/EntityIdentifier.js'; -import { ChangeSet, ChangeSetType } from './ChangeSet.js'; -import { ChangeSetComputer } from './ChangeSetComputer.js'; -import { ChangeSetPersister } from './ChangeSetPersister.js'; -import { CommitOrderCalculator } from './CommitOrderCalculator.js'; -import { Utils } from '../utils/Utils.js'; -import { Cascade, DeferMode, EventType, LockMode, ReferenceKind } from '../enums.js'; -import { OptimisticLockError, ValidationError } from '../errors.js'; -import { TransactionEventBroadcaster } from '../events/TransactionEventBroadcaster.js'; -import { IdentityMap } from './IdentityMap.js'; -import { createAsyncContext } from '../utils/AsyncContext.js'; -// to deal with validation for flush inside flush hooks and `Promise.all` -const insideFlush = createAsyncContext(); -/** Implements the Unit of Work pattern: tracks entity changes, computes change sets, and flushes them to the database. */ -export class UnitOfWork { - /** map of references to managed entities */ - #identityMap; - #persistStack = new Set(); - #removeStack = new Set(); - #orphanRemoveStack = new Set(); - #changeSets = new Map(); - #collectionUpdates = new Set(); - #extraUpdates = new Set(); - #metadata; - #platform; - #eventManager; - #comparator; - #changeSetComputer; - #changeSetPersister; - #queuedActions = new Set(); - #loadedEntities = new Set(); - #flushQueue = []; - #working = false; - #em; - constructor(em) { - this.#em = em; - this.#metadata = this.#em.getMetadata(); - this.#platform = this.#em.getPlatform(); - this.#identityMap = new IdentityMap(this.#platform.getDefaultSchemaName()); - this.#eventManager = this.#em.getEventManager(); - this.#comparator = this.#em.getComparator(); - this.#changeSetComputer = new ChangeSetComputer(this.#em, this.#collectionUpdates); - this.#changeSetPersister = new ChangeSetPersister(this.#em); - } - /** Merges an entity into the identity map, taking a snapshot of its current state. */ - merge(entity, visited) { - const wrapped = helper(entity); - wrapped.__em = this.#em; - if (!wrapped.hasPrimaryKey()) { - return; - } - // skip new entities that could be linked from already persisted entity - // that is being re-fetched (but allow calling `merge(e)` explicitly for those) - if (!wrapped.__managed && visited) { - return; - } - this.#identityMap.store(entity); - // if visited is available, we are cascading, and need to be careful when resetting the entity data - // as there can be some entity with already changed state that is not yet flushed - if (wrapped.__initialized && (!visited || !wrapped.__originalEntityData)) { - wrapped.__originalEntityData = this.#comparator.prepareEntity(entity); - } - this.cascade(entity, Cascade.MERGE, visited ?? new Set()); - } - /** - * Entity data can wary in its shape, e.g. we might get a deep relation graph with joined strategy, but for diffing, - * we need to normalize the shape, so relation values are only raw FKs. This method handles that. - * @internal - */ - normalizeEntityData(meta, data) { - const forceUndefined = this.#em.config.get('forceUndefined'); - for (const key of Utils.keys(data)) { - const prop = meta.properties[key]; - if (!prop) { - continue; - } - if ( - [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) && - Utils.isPlainObject(data[prop.name]) - ) { - // Skip polymorphic relations - they use PolymorphicRef wrapper - if (!prop.polymorphic) { - data[prop.name] = Utils.getPrimaryKeyValues(data[prop.name], prop.targetMeta, true); - } - } else if (prop.kind === ReferenceKind.EMBEDDED && !prop.object && Utils.isPlainObject(data[prop.name])) { - for (const p of prop.targetMeta.props) { - /* v8 ignore next */ - const prefix = prop.prefix === false ? '' : prop.prefix === true ? prop.name + '_' : prop.prefix; - data[prefix + p.name] = data[prop.name][p.name]; - } - data[prop.name] = Utils.getPrimaryKeyValues(data[prop.name], prop.targetMeta, true); - } - if (prop.hydrate === false && prop.customType?.ensureComparable(meta, prop)) { - const converted = prop.customType.convertToJSValue(data[key], this.#platform, { - key, - mode: 'hydration', - force: true, - }); - data[key] = prop.customType.convertToDatabaseValue(converted, this.#platform, { key, mode: 'hydration' }); - } - if (forceUndefined) { - if (data[key] === null) { - data[key] = undefined; - } - } - } - } - /** - * @internal - */ - register(entity, data, options) { - this.#identityMap.store(entity); - EntityHelper.ensurePropagation(entity); - if (options?.newEntity) { - return entity; - } - const forceUndefined = this.#em.config.get('forceUndefined'); - const wrapped = helper(entity); - if (options?.loaded && wrapped.__initialized && !wrapped.__onLoadFired) { - this.#loadedEntities.add(entity); - } - wrapped.__em ??= this.#em; - wrapped.__managed = true; - if (data && (options?.refresh || !wrapped.__originalEntityData)) { - this.normalizeEntityData(wrapped.__meta, data); - for (const key of Utils.keys(data)) { - const prop = wrapped.__meta.properties[key]; - if (prop) { - wrapped.__loadedProperties.add(key); - } - } - wrapped.__originalEntityData = data; - } - return entity; - } - /** - * @internal - */ - async dispatchOnLoadEvent() { - for (const entity of this.#loadedEntities) { - if (this.#eventManager.hasListeners(EventType.onLoad, entity.__meta)) { - await this.#eventManager.dispatchEvent(EventType.onLoad, { entity, meta: entity.__meta, em: this.#em }); - helper(entity).__onLoadFired = true; - } - } - this.#loadedEntities.clear(); - } - /** - * @internal - */ - unmarkAsLoaded(entity) { - this.#loadedEntities.delete(entity); - } - /** - * Returns entity from the identity map. For composite keys, you need to pass an array of PKs in the same order as they are defined in `meta.primaryKeys`. - */ - getById(entityName, id, schema, convertCustomTypes) { - if (id == null || (Array.isArray(id) && id.length === 0)) { - return undefined; - } - const meta = this.#metadata.find(entityName).root; - let hash; - if (meta.simplePK) { - hash = '' + id; - } else { - let keys = Array.isArray(id) ? Utils.flatten(id) : [id]; - keys = meta.getPrimaryProps(true).map((p, i) => { - if (!convertCustomTypes && p.customType) { - return p.customType.convertToDatabaseValue(keys[i], this.#platform, { - key: p.name, - mode: 'hydration', - }); - } - return keys[i]; - }); - hash = Utils.getPrimaryKeyHash(keys); - } - schema ??= meta.schema ?? this.#em.config.getSchema(); - if (schema) { - hash = `${schema}:${hash}`; - } - return this.#identityMap.getByHash(meta, hash); - } - /** - * Returns entity from the identity map by an alternate key (non-PK property). - * @param convertCustomTypes - If true, the value is in database format and will be converted to JS format for lookup. - * If false (default), the value is assumed to be in JS format already. - */ - getByKey(entityName, key, value, schema, convertCustomTypes) { - const meta = this.#metadata.find(entityName).root; - schema ??= meta.schema ?? this.#em.config.getSchema(); - const prop = meta.properties[key]; - // Convert from DB format to JS format if needed - if (convertCustomTypes && prop?.customType) { - value = prop.customType.convertToJSValue(value, this.#platform, { mode: 'hydration' }); - } - const hash = this.#identityMap.getKeyHash(key, '' + value, schema); - return this.#identityMap.getByHash(meta, hash); - } - /** - * Stores an entity in the identity map under an alternate key (non-PK property). - * Also sets the property value on the entity. - * @param convertCustomTypes - If true, the value is in database format and will be converted to JS format. - * If false (default), the value is assumed to be in JS format already. - */ - storeByKey(entity, key, value, schema, convertCustomTypes) { - const meta = entity.__meta.root; - schema ??= meta.schema ?? this.#em.config.getSchema(); - const prop = meta.properties[key]; - // Convert from DB format to JS format if needed - if (convertCustomTypes && prop?.customType) { - value = prop.customType.convertToJSValue(value, this.#platform, { mode: 'hydration' }); - } - // Set the property on the entity - entity[key] = value; - this.#identityMap.storeByKey(entity, key, '' + value, schema); - } - /** Attempts to extract a primary key from the where condition and look up the entity in the identity map. */ - tryGetById(entityName, where, schema, strict = true) { - const pk = Utils.extractPK(where, this.#metadata.find(entityName), strict); - if (!pk) { - return null; - } - return this.getById(entityName, pk, schema); - } - /** - * Returns map of all managed entities. - */ - getIdentityMap() { - return this.#identityMap; - } - /** - * Returns stored snapshot of entity state that is used for change set computation. - */ - getOriginalEntityData(entity) { - return helper(entity).__originalEntityData; - } - /** Returns the set of entities scheduled for persistence. */ - getPersistStack() { - return this.#persistStack; - } - /** Returns the set of entities scheduled for removal. */ - getRemoveStack() { - return this.#removeStack; - } - /** Returns all computed change sets for the current flush. */ - getChangeSets() { - return [...this.#changeSets.values()]; - } - /** Returns all M:N collections that need synchronization. */ - getCollectionUpdates() { - return [...this.#collectionUpdates]; - } - /** Returns extra updates needed for relations that could not be resolved in the initial pass. */ - getExtraUpdates() { - return this.#extraUpdates; - } - /** Checks whether an auto-flush is needed before querying the given entity type. */ - shouldAutoFlush(meta) { - if (insideFlush.getStore()) { - return false; - } - if (this.#queuedActions.has(meta.class) || this.#queuedActions.has(meta.root.class)) { - return true; - } - if (meta.discriminatorMap && Object.values(meta.discriminatorMap).some(v => this.#queuedActions.has(v))) { - return true; - } - return false; - } - /** Clears the queue of entity types that triggered auto-flush detection. */ - clearActionsQueue() { - this.#queuedActions.clear(); - } - /** Computes and registers a change set for the given entity. */ - computeChangeSet(entity, type) { - const wrapped = helper(entity); - if (type === ChangeSetType.DELETE || type === ChangeSetType.DELETE_EARLY) { - this.#changeSets.set(entity, new ChangeSet(entity, type, {}, wrapped.__meta)); - return; - } - const cs = this.#changeSetComputer.computeChangeSet(entity); - if (!cs || this.checkUniqueProps(cs)) { - return; - } - /* v8 ignore next */ - if (type) { - cs.type = type; - } - this.initIdentifier(entity); - this.#changeSets.set(entity, cs); - this.#persistStack.delete(entity); - wrapped.__originalEntityData = this.#comparator.prepareEntity(entity); - } - /** Recomputes and merges the change set for an already-tracked entity. */ - recomputeSingleChangeSet(entity) { - const changeSet = this.#changeSets.get(entity); - if (!changeSet) { - return; - } - const cs = this.#changeSetComputer.computeChangeSet(entity); - if (cs && !this.checkUniqueProps(cs)) { - Object.assign(changeSet.payload, cs.payload); - helper(entity).__originalEntityData = this.#comparator.prepareEntity(entity); - } - } - /** Marks an entity for persistence, cascading to related entities. */ - persist(entity, visited, options = {}) { - EntityHelper.ensurePropagation(entity); - if (options.checkRemoveStack && this.#removeStack.has(entity)) { - return; - } - const wrapped = helper(entity); - this.#persistStack.add(entity); - this.#queuedActions.add(wrapped.__meta.class); - this.#removeStack.delete(entity); - if (!wrapped.__managed && wrapped.hasPrimaryKey()) { - this.#identityMap.store(entity); - } - if (options.cascade ?? true) { - this.cascade(entity, Cascade.PERSIST, visited, options); - } - } - /** Marks an entity for removal, cascading to related entities. */ - remove(entity, visited, options = {}) { - // allow removing not managed entities if they are not part of the persist stack - if (helper(entity).__managed || !this.#persistStack.has(entity)) { - this.#removeStack.add(entity); - this.#queuedActions.add(helper(entity).__meta.class); - } else { - this.#persistStack.delete(entity); - this.#identityMap.delete(entity); - } - // remove from referencing relations that are nullable - for (const prop of helper(entity).__meta.bidirectionalRelations) { - const inverseProp = prop.mappedBy || prop.inversedBy; - const relation = Reference.unwrapReference(entity[prop.name]); - const prop2 = prop.targetMeta.properties[inverseProp]; - if (prop.kind === ReferenceKind.ONE_TO_MANY && prop2.nullable && Utils.isCollection(relation)) { - for (const item of relation.getItems(false)) { - delete item[inverseProp]; - } - continue; - } - const target = relation?.[inverseProp]; - if (relation && Utils.isCollection(target)) { - target.removeWithoutPropagation(entity); - } - } - if (options.cascade ?? true) { - this.cascade(entity, Cascade.REMOVE, visited); - } - } - /** Flushes all pending changes to the database within a transaction. */ - async commit() { - if (this.#working) { - if (insideFlush.getStore()) { - throw ValidationError.cannotCommit(); - } - return new Promise((resolve, reject) => { - this.#flushQueue.push(() => { - return insideFlush.run(true, () => { - return this.doCommit().then(resolve, reject); - }); - }); - }); - } - try { - this.#working = true; - await insideFlush.run(true, () => this.doCommit()); - while (this.#flushQueue.length) { - await this.#flushQueue.shift()(); - } - } finally { - this.postCommitCleanup(); - this.#working = false; - } - } - async doCommit() { - const oldTx = this.#em.getTransactionContext(); - try { - await this.#eventManager.dispatchEvent(EventType.beforeFlush, { em: this.#em, uow: this }); - this.computeChangeSets(); - for (const cs of this.#changeSets.values()) { - cs.entity.__helper.__processing = true; - } - await this.#eventManager.dispatchEvent(EventType.onFlush, { em: this.#em, uow: this }); - this.filterCollectionUpdates(); - // nothing to do, do not start transaction - if (this.#changeSets.size === 0 && this.#collectionUpdates.size === 0 && this.#extraUpdates.size === 0) { - await this.#eventManager.dispatchEvent(EventType.afterFlush, { em: this.#em, uow: this }); - return; - } - const groups = this.getChangeSetGroups(); - const platform = this.#em.getPlatform(); - const runInTransaction = - !this.#em.isInTransaction() && platform.supportsTransactions() && this.#em.config.get('implicitTransactions'); - if (runInTransaction) { - const loggerContext = Utils.merge( - { id: this.#em._id }, - this.#em.getLoggerContext({ disableContextResolution: true }), - ); - await this.#em.getConnection('write').transactional(trx => this.persistToDatabase(groups, trx), { - ctx: oldTx, - eventBroadcaster: new TransactionEventBroadcaster(this.#em), - loggerContext, - }); - } else { - await this.persistToDatabase(groups, this.#em.getTransactionContext()); - } - this.resetTransaction(oldTx); - for (const cs of this.#changeSets.values()) { - cs.entity.__helper.__processing = false; - } - await this.#eventManager.dispatchEvent(EventType.afterFlush, { em: this.#em, uow: this }); - } finally { - this.resetTransaction(oldTx); - } - } - async lock(entity, options) { - if (!this.getById(entity.constructor, helper(entity).__primaryKeys, helper(entity).__schema)) { - throw ValidationError.entityNotManaged(entity); - } - const meta = this.#metadata.find(entity.constructor); - if (options.lockMode === LockMode.OPTIMISTIC) { - await this.lockOptimistic(entity, meta, options.lockVersion); - } else if (options.lockMode != null) { - await this.lockPessimistic(entity, options); - } - } - clear() { - this.#identityMap.clear(); - this.#loadedEntities.clear(); - this.postCommitCleanup(); - } - unsetIdentity(entity) { - this.#identityMap.delete(entity); - const wrapped = helper(entity); - const serializedPK = wrapped.getSerializedPrimaryKey(); - // remove references of this entity in all managed entities, otherwise flushing could reinsert the entity - for (const { meta, prop } of wrapped.__meta.referencingProperties) { - for (const referrer of this.#identityMap.getStore(meta).values()) { - const rel = Reference.unwrapReference(referrer[prop.name]); - if (Utils.isCollection(rel)) { - rel.removeWithoutPropagation(entity); - } else if ( - rel && - (prop.mapToPk - ? helper(this.#em.getReference(prop.targetMeta.class, rel)).getSerializedPrimaryKey() === serializedPK - : rel === entity) - ) { - if (prop.formula) { - delete referrer[prop.name]; - } else { - delete helper(referrer).__data[prop.name]; - } - } - } - } - delete wrapped.__identifier; - delete wrapped.__originalEntityData; - wrapped.__managed = false; - } - computeChangeSets() { - this.#changeSets.clear(); - const visited = new Set(); - for (const entity of this.#removeStack) { - this.cascade(entity, Cascade.REMOVE, visited); - } - visited.clear(); - for (const entity of this.#identityMap) { - if (!this.#removeStack.has(entity) && !this.#persistStack.has(entity) && !this.#orphanRemoveStack.has(entity)) { - this.cascade(entity, Cascade.PERSIST, visited, { checkRemoveStack: true }); - } - } - for (const entity of this.#persistStack) { - this.cascade(entity, Cascade.PERSIST, visited, { checkRemoveStack: true }); - } - visited.clear(); - for (const entity of this.#persistStack) { - this.findNewEntities(entity, visited); - } - for (const entity of this.#orphanRemoveStack) { - if (!helper(entity).__processing) { - this.#removeStack.add(entity); - } - } - // Check insert stack if there are any entities matching something from delete stack. This can happen when recreating entities. - const inserts = {}; - for (const cs of this.#changeSets.values()) { - if (cs.type === ChangeSetType.CREATE) { - inserts[cs.meta.uniqueName] ??= []; - inserts[cs.meta.uniqueName].push(cs); - } - } - for (const cs of this.#changeSets.values()) { - if (cs.type === ChangeSetType.UPDATE) { - this.findEarlyUpdates(cs, inserts[cs.meta.uniqueName]); - } - } - for (const entity of this.#removeStack) { - const wrapped = helper(entity); - /* v8 ignore next */ - if (wrapped.__processing) { - continue; - } - const deletePkHash = [wrapped.getSerializedPrimaryKey(), ...this.expandUniqueProps(entity)]; - let type = ChangeSetType.DELETE; - for (const cs of inserts[wrapped.__meta.uniqueName] ?? []) { - if ( - deletePkHash.some( - hash => - hash === cs.getSerializedPrimaryKey() || this.expandUniqueProps(cs.entity).find(child => hash === child), - ) - ) { - type = ChangeSetType.DELETE_EARLY; - } - } - this.computeChangeSet(entity, type); - } - } - scheduleExtraUpdate(changeSet, props) { - if (props.length === 0) { - return; - } - let conflicts = false; - let type = ChangeSetType.UPDATE; - if (!props.some(prop => prop.name in changeSet.payload)) { - return; - } - for (const cs of this.#changeSets.values()) { - for (const prop of props) { - if (prop.name in cs.payload && cs.rootMeta === changeSet.rootMeta && cs.type === changeSet.type) { - conflicts = true; - if (changeSet.payload[prop.name] == null) { - type = ChangeSetType.UPDATE_EARLY; - } - } - } - } - if (!conflicts) { - return; - } - this.#extraUpdates.add([ - changeSet.entity, - props.map(p => p.name), - props.map(p => changeSet.entity[p.name]), - changeSet, - type, - ]); - for (const p of props) { - delete changeSet.entity[p.name]; - delete changeSet.payload[p.name]; - } - } - scheduleOrphanRemoval(entity, visited) { - if (entity) { - const wrapped = helper(entity); - wrapped.__em = this.#em; - this.#orphanRemoveStack.add(entity); - this.#queuedActions.add(wrapped.__meta.class); - this.cascade(entity, Cascade.SCHEDULE_ORPHAN_REMOVAL, visited); - } - } - cancelOrphanRemoval(entity, visited) { - this.#orphanRemoveStack.delete(entity); - this.cascade(entity, Cascade.CANCEL_ORPHAN_REMOVAL, visited); - } - getOrphanRemoveStack() { - return this.#orphanRemoveStack; - } - getChangeSetPersister() { - return this.#changeSetPersister; - } - findNewEntities(entity, visited, idx = 0, processed = new Set()) { - if (visited.has(entity)) { - return; - } - visited.add(entity); - processed.add(entity); - const wrapped = helper(entity); - if (wrapped.__processing || this.#removeStack.has(entity) || this.#orphanRemoveStack.has(entity)) { - return; - } - // Set entityManager default schema - wrapped.__schema ??= this.#em.schema; - this.initIdentifier(entity); - for (const prop of wrapped.__meta.relations) { - const targets = Utils.unwrapProperty(entity, wrapped.__meta, prop); - for (const [target] of targets) { - const kind = Reference.unwrapReference(target); - this.processReference(entity, prop, kind, visited, processed, idx); - } - } - const changeSet = this.#changeSetComputer.computeChangeSet(entity); - if (changeSet && !this.checkUniqueProps(changeSet)) { - // For TPT child entities, create changesets for each table in hierarchy - if (wrapped.__meta.inheritanceType === 'tpt' && wrapped.__meta.tptParent) { - this.createTPTChangeSets(entity, changeSet); - } else { - this.#changeSets.set(entity, changeSet); - } - } - } - /** - * For TPT inheritance, creates separate changesets for each table in the hierarchy. - * Uses the same entity instance for all changesets - only the metadata and payload differ. - */ - createTPTChangeSets(entity, originalChangeSet) { - const meta = helper(entity).__meta; - const isCreate = originalChangeSet.type === ChangeSetType.CREATE; - let current = meta; - let leafCs; - const parentChangeSets = []; - while (current) { - const isRoot = !current.tptParent; - const payload = {}; - for (const prop of current.ownProps) { - if (prop.name in originalChangeSet.payload) { - payload[prop.name] = originalChangeSet.payload[prop.name]; - } - } - // For CREATE on non-root tables, include the PK (EntityIdentifier for deferred resolution) - if (isCreate && !isRoot) { - const wrapped = helper(entity); - const identifier = wrapped.__identifier; - const identifiers = Array.isArray(identifier) ? identifier : [identifier]; - for (let i = 0; i < current.primaryKeys.length; i++) { - const pk = current.primaryKeys[i]; - payload[pk] = identifiers[i] ?? originalChangeSet.payload[pk]; - } - } - if (!isCreate && Object.keys(payload).length === 0) { - current = current.tptParent; - continue; - } - const cs = new ChangeSet(entity, originalChangeSet.type, payload, current); - if (current === meta) { - cs.originalEntity = originalChangeSet.originalEntity; - leafCs = cs; - } else { - parentChangeSets.push(cs); - } - current = current.tptParent; - } - // When only parent properties changed (UPDATE), leaf payload is empty—create a stub anchor - if (!leafCs && parentChangeSets.length > 0) { - leafCs = new ChangeSet(entity, originalChangeSet.type, {}, meta); - leafCs.originalEntity = originalChangeSet.originalEntity; - } - // Store the leaf changeset in the main map (entity as key), with parent CSs attached - if (leafCs) { - if (parentChangeSets.length > 0) { - leafCs.tptChangeSets = parentChangeSets; - } - this.#changeSets.set(entity, leafCs); - } - } - /** - * Returns `true` when the change set should be skipped as it will be empty after the extra update. - */ - checkUniqueProps(changeSet) { - if (changeSet.type !== ChangeSetType.UPDATE) { - return false; - } - // when changing a unique nullable property (or a 1:1 relation), we can't do it in a single - // query as it would cause unique constraint violations - const uniqueProps = changeSet.meta.uniqueProps.filter(prop => { - return prop.nullable || changeSet.type !== ChangeSetType.CREATE; - }); - this.scheduleExtraUpdate(changeSet, uniqueProps); - return changeSet.type === ChangeSetType.UPDATE && !Utils.hasObjectKeys(changeSet.payload); - } - expandUniqueProps(entity) { - const wrapped = helper(entity); - if (!wrapped.__meta.hasUniqueProps) { - return []; - } - const simpleUniqueHashes = wrapped.__meta.uniqueProps - .map(prop => { - if (entity[prop.name] != null) { - return prop.kind === ReferenceKind.SCALAR || prop.mapToPk - ? entity[prop.name] - : helper(entity[prop.name]).getSerializedPrimaryKey(); - } - if (wrapped.__originalEntityData?.[prop.name] != null) { - return Utils.getPrimaryKeyHash(Utils.asArray(wrapped.__originalEntityData[prop.name])); - } - return undefined; - }) - .filter(i => i); - const compoundUniqueHashes = wrapped.__meta.uniques - .map(unique => { - const props = Utils.asArray(unique.properties); - if (props.every(prop => entity[prop] != null)) { - return Utils.getPrimaryKeyHash( - props.map(p => { - const prop = wrapped.__meta.properties[p]; - return prop.kind === ReferenceKind.SCALAR || prop.mapToPk - ? entity[prop.name] - : helper(entity[prop.name]).getSerializedPrimaryKey(); - }), - ); - } - return undefined; - }) - .filter(i => i); - return simpleUniqueHashes.concat(compoundUniqueHashes); - } - initIdentifier(entity) { - const wrapped = entity && helper(entity); - if (!wrapped || wrapped.__identifier || wrapped.hasPrimaryKey()) { - return; - } - const pks = wrapped.__meta.getPrimaryProps(); - const idents = []; - for (const pk of pks) { - if (pk.kind === ReferenceKind.SCALAR) { - idents.push(new EntityIdentifier(entity[pk.name])); - } else if (entity[pk.name]) { - this.initIdentifier(entity[pk.name]); - idents.push(helper(entity[pk.name])?.__identifier); - } - } - if (pks.length === 1) { - wrapped.__identifier = idents[0]; - } else { - wrapped.__identifier = idents; - } - } - processReference(parent, prop, kind, visited, processed, idx) { - const isToOne = prop.kind === ReferenceKind.MANY_TO_ONE || prop.kind === ReferenceKind.ONE_TO_ONE; - if (isToOne && Utils.isEntity(kind)) { - return this.processToOneReference(kind, visited, processed, idx); - } - if (Utils.isCollection(kind)) { - kind - .getItems(false) - .filter(item => !item.__helper.__originalEntityData) - .forEach(item => { - // propagate schema from parent - item.__helper.__schema ??= helper(parent).__schema; - }); - if (prop.kind === ReferenceKind.MANY_TO_MANY && kind.isDirty()) { - this.processToManyReference(kind, visited, processed, parent, prop); - } - } - } - processToOneReference(kind, visited, processed, idx) { - if (!kind.__helper.__managed) { - this.findNewEntities(kind, visited, idx, processed); - } - } - processToManyReference(collection, visited, processed, parent, prop) { - if (this.isCollectionSelfReferenced(collection, processed)) { - this.#extraUpdates.add([parent, prop.name, collection, undefined, ChangeSetType.UPDATE]); - const coll = new Collection(parent); - coll.property = prop; - parent[prop.name] = coll; - return; - } - collection - .getItems(false) - .filter(item => !item.__helper.__originalEntityData) - .forEach(item => this.findNewEntities(item, visited, 0, processed)); - } - async runHooks(type, changeSet, sync = false) { - const meta = changeSet.meta; - if (!this.#eventManager.hasListeners(type, meta)) { - return; - } - if (!sync) { - await this.#eventManager.dispatchEvent(type, { entity: changeSet.entity, meta, em: this.#em, changeSet }); - return; - } - const copy = this.#comparator.prepareEntity(changeSet.entity); - await this.#eventManager.dispatchEvent(type, { entity: changeSet.entity, meta, em: this.#em, changeSet }); - const current = this.#comparator.prepareEntity(changeSet.entity); - const diff = this.#comparator.diffEntities(changeSet.meta.class, copy, current); - Object.assign(changeSet.payload, diff); - const wrapped = helper(changeSet.entity); - if (wrapped.__identifier) { - const idents = Utils.asArray(wrapped.__identifier); - let i = 0; - for (const pk of wrapped.__meta.primaryKeys) { - if (diff[pk]) { - idents[i].setValue(diff[pk]); - } - i++; - } - } - } - postCommitCleanup() { - for (const cs of this.#changeSets.values()) { - const wrapped = helper(cs.entity); - wrapped.__processing = false; - delete wrapped.__pk; - } - this.#persistStack.clear(); - this.#removeStack.clear(); - this.#orphanRemoveStack.clear(); - this.#changeSets.clear(); - this.#collectionUpdates.clear(); - this.#extraUpdates.clear(); - this.#queuedActions.clear(); - this.#working = false; - } - cascade(entity, type, visited = new Set(), options = {}) { - if (visited.has(entity)) { - return; - } - visited.add(entity); - switch (type) { - case Cascade.PERSIST: - this.persist(entity, visited, options); - break; - case Cascade.MERGE: - this.merge(entity, visited); - break; - case Cascade.REMOVE: - this.remove(entity, visited, options); - break; - case Cascade.SCHEDULE_ORPHAN_REMOVAL: - this.scheduleOrphanRemoval(entity, visited); - break; - case Cascade.CANCEL_ORPHAN_REMOVAL: - this.cancelOrphanRemoval(entity, visited); - break; - } - for (const prop of helper(entity).__meta.relations) { - this.cascadeReference(entity, prop, type, visited, options); - } - } - cascadeReference(entity, prop, type, visited, options) { - this.fixMissingReference(entity, prop); - if (!this.shouldCascade(prop, type)) { - return; - } - const kind = Reference.unwrapReference(entity[prop.name]); - if ([ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) && Utils.isEntity(kind)) { - return this.cascade(kind, type, visited, options); - } - const collection = kind; - if ([ReferenceKind.ONE_TO_MANY, ReferenceKind.MANY_TO_MANY].includes(prop.kind) && collection) { - for (const item of collection.getItems(false)) { - this.cascade(item, type, visited, options); - } - } - } - isCollectionSelfReferenced(collection, processed) { - const filtered = collection.getItems(false).filter(item => !helper(item).__originalEntityData); - return filtered.some(items => processed.has(items)); - } - shouldCascade(prop, type) { - if ( - [Cascade.REMOVE, Cascade.SCHEDULE_ORPHAN_REMOVAL, Cascade.CANCEL_ORPHAN_REMOVAL, Cascade.ALL].includes(type) && - prop.orphanRemoval - ) { - return true; - } - // ignore user settings for merge, it is kept only for back compatibility, this should have never been configurable - if (type === Cascade.MERGE) { - return true; - } - return prop.cascade && (prop.cascade.includes(type) || prop.cascade.includes(Cascade.ALL)); - } - async lockPessimistic(entity, options) { - if (!this.#em.isInTransaction()) { - throw ValidationError.transactionRequired(); - } - await this.#em.getDriver().lockPessimistic(entity, { ctx: this.#em.getTransactionContext(), ...options }); - } - async lockOptimistic(entity, meta, version) { - if (!meta.versionProperty) { - throw OptimisticLockError.notVersioned(meta); - } - if (typeof version === 'undefined') { - return; - } - const wrapped = helper(entity); - if (!wrapped.__initialized) { - await wrapped.init(); - } - const previousVersion = entity[meta.versionProperty]; - if (previousVersion !== version) { - throw OptimisticLockError.lockFailedVersionMismatch(entity, version, previousVersion); - } - } - fixMissingReference(entity, prop) { - const reference = entity[prop.name]; - const target = Reference.unwrapReference(reference); - if ([ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) && target && !prop.mapToPk) { - if (!Utils.isEntity(target)) { - entity[prop.name] = this.#em.getReference(prop.targetMeta.class, target, { - wrapped: !!prop.ref, - }); - } else if (!helper(target).__initialized && !helper(target).__em) { - const pk = helper(target).getPrimaryKey(); - entity[prop.name] = this.#em.getReference(prop.targetMeta.class, pk, { - wrapped: !!prop.ref, - }); - } - } - // perf: set the `Collection._property` to skip the getter, as it can be slow when there are a lot of relations - if (Utils.isCollection(target)) { - target.property = prop; - } - const isCollection = [ReferenceKind.ONE_TO_MANY, ReferenceKind.MANY_TO_MANY].includes(prop.kind); - if (isCollection && Array.isArray(target)) { - const collection = new Collection(entity); - collection.property = prop; - entity[prop.name] = collection; - collection.set(target); - } - } - async persistToDatabase(groups, ctx) { - if (ctx) { - this.#em.setTransactionContext(ctx); - } - const commitOrder = this.getCommitOrder(); - const commitOrderReversed = [...commitOrder].reverse(); - // early delete - when we recreate entity in the same UoW, we need to issue those delete queries before inserts - for (const meta of commitOrderReversed) { - await this.commitDeleteChangeSets(groups[ChangeSetType.DELETE_EARLY].get(meta) ?? [], ctx); - } - // early update - when we recreate entity in the same UoW, we need to issue those delete queries before inserts - for (const meta of commitOrder) { - await this.commitUpdateChangeSets(groups[ChangeSetType.UPDATE_EARLY].get(meta) ?? [], ctx); - } - // extra updates - await this.commitExtraUpdates(ChangeSetType.UPDATE_EARLY, ctx); - // create - for (const meta of commitOrder) { - await this.commitCreateChangeSets(groups[ChangeSetType.CREATE].get(meta) ?? [], ctx); - } - // update - for (const meta of commitOrder) { - await this.commitUpdateChangeSets(groups[ChangeSetType.UPDATE].get(meta) ?? [], ctx); - } - // extra updates - await this.commitExtraUpdates(ChangeSetType.UPDATE, ctx); - // collection updates - await this.commitCollectionUpdates(ctx); - // delete - entity deletions need to be in reverse commit order - for (const meta of commitOrderReversed) { - await this.commitDeleteChangeSets(groups[ChangeSetType.DELETE].get(meta) ?? [], ctx); - } - // take snapshots of all persisted collections - const visited = new Set(); - for (const changeSet of this.#changeSets.values()) { - this.takeCollectionSnapshots(changeSet.entity, visited); - } - } - async commitCreateChangeSets(changeSets, ctx) { - if (changeSets.length === 0) { - return; - } - const props = changeSets[0].meta.root.relations.filter(prop => { - return ( - (prop.kind === ReferenceKind.ONE_TO_ONE && prop.owner) || - prop.kind === ReferenceKind.MANY_TO_ONE || - (prop.kind === ReferenceKind.MANY_TO_MANY && prop.owner && !this.#platform.usesPivotTable()) - ); - }); - for (const changeSet of changeSets) { - this.findExtraUpdates(changeSet, props); - await this.runHooks(EventType.beforeCreate, changeSet, true); - } - await this.#changeSetPersister.executeInserts(changeSets, { ctx }); - for (const changeSet of changeSets) { - this.register(changeSet.entity, changeSet.payload, { refresh: true }); - await this.runHooks(EventType.afterCreate, changeSet); - } - } - findExtraUpdates(changeSet, props) { - for (const prop of props) { - const ref = changeSet.entity[prop.name]; - if (!ref || prop.deferMode === DeferMode.INITIALLY_DEFERRED) { - continue; - } - if (Utils.isCollection(ref)) { - ref.getItems(false).some(item => { - const cs = this.#changeSets.get(Reference.unwrapReference(item)); - const isScheduledForInsert = cs?.type === ChangeSetType.CREATE && !cs.persisted; - if (isScheduledForInsert) { - this.scheduleExtraUpdate(changeSet, [prop]); - return true; - } - return false; - }); - continue; - } - const refEntity = Reference.unwrapReference(ref); - // For mapToPk properties, the value is a primitive (string/array), not an entity - if (!Utils.isEntity(refEntity)) { - continue; - } - // For TPT entities, check if the ROOT table's changeset has been persisted - // (since the FK is to the root table, not the concrete entity's table) - let cs = this.#changeSets.get(refEntity); - if (cs?.tptChangeSets?.length) { - // Root table changeset is the last one (ordered immediate parent → root) - cs = cs.tptChangeSets[cs.tptChangeSets.length - 1]; - } - const isScheduledForInsert = cs?.type === ChangeSetType.CREATE && !cs.persisted; - if (isScheduledForInsert) { - this.scheduleExtraUpdate(changeSet, [prop]); - } - } - } - findEarlyUpdates(changeSet, inserts = []) { - const props = changeSet.meta.uniqueProps; - for (const prop of props) { - const insert = inserts.find(c => Utils.equals(c.payload[prop.name], changeSet.originalEntity[prop.name])); - const propEmpty = changeSet.payload[prop.name] === null || changeSet.payload[prop.name] === undefined; - if ( - prop.name in changeSet.payload && - insert && - // We only want to update early if the unique property on the changeset is going to be empty, so that - // the previous unique value can be set on a different entity without constraint issues - propEmpty - ) { - changeSet.type = ChangeSetType.UPDATE_EARLY; - } - } - } - async commitUpdateChangeSets(changeSets, ctx, batched = true) { - if (changeSets.length === 0) { - return; - } - for (const changeSet of changeSets) { - await this.runHooks(EventType.beforeUpdate, changeSet, true); - } - await this.#changeSetPersister.executeUpdates(changeSets, batched, { ctx }); - for (const changeSet of changeSets) { - const wrapped = helper(changeSet.entity); - wrapped.__originalEntityData = this.#comparator.prepareEntity(changeSet.entity); - if (!wrapped.__initialized) { - for (const prop of changeSet.meta.relations) { - if ( - [ReferenceKind.MANY_TO_MANY, ReferenceKind.ONE_TO_MANY].includes(prop.kind) && - changeSet.entity[prop.name] == null - ) { - changeSet.entity[prop.name] = Collection.create( - changeSet.entity, - prop.name, - undefined, - wrapped.isInitialized(), - ); - } - } - wrapped.__initialized = true; - } - await this.runHooks(EventType.afterUpdate, changeSet); - } - } - async commitDeleteChangeSets(changeSets, ctx) { - if (changeSets.length === 0) { - return; - } - for (const changeSet of changeSets) { - await this.runHooks(EventType.beforeDelete, changeSet, true); - } - await this.#changeSetPersister.executeDeletes(changeSets, { ctx }); - for (const changeSet of changeSets) { - this.unsetIdentity(changeSet.entity); - await this.runHooks(EventType.afterDelete, changeSet); - } - } - async commitExtraUpdates(type, ctx) { - const extraUpdates = []; - for (const extraUpdate of this.#extraUpdates) { - if (extraUpdate[4] !== type) { - continue; - } - if (Array.isArray(extraUpdate[1])) { - extraUpdate[1].forEach((p, i) => (extraUpdate[0][p] = extraUpdate[2][i])); - } else { - extraUpdate[0][extraUpdate[1]] = extraUpdate[2]; - } - const changeSet = this.#changeSetComputer.computeChangeSet(extraUpdate[0]); - if (changeSet) { - extraUpdates.push([changeSet, extraUpdate[3]]); - } - } - await this.commitUpdateChangeSets( - extraUpdates.map(u => u[0]), - ctx, - false, - ); - // propagate the new values to the original changeset - for (const extraUpdate of extraUpdates) { - if (extraUpdate[1]) { - Object.assign(extraUpdate[1].payload, extraUpdate[0].payload); - } - } - } - async commitCollectionUpdates(ctx) { - this.filterCollectionUpdates(); - const loggerContext = Utils.merge( - { id: this.#em._id }, - this.#em.getLoggerContext({ disableContextResolution: true }), - ); - await this.#em.getDriver().syncCollections(this.#collectionUpdates, { - ctx, - schema: this.#em.schema, - loggerContext, - }); - for (const coll of this.#collectionUpdates) { - coll.takeSnapshot(); - } - } - filterCollectionUpdates() { - for (const coll of this.#collectionUpdates) { - let skip = true; - if (coll.property.owner || coll.getItems(false).filter(item => !item.__helper.__initialized).length > 0) { - if (this.#platform.usesPivotTable()) { - skip = false; - } - } else if (coll.property.kind === ReferenceKind.ONE_TO_MANY && coll.getSnapshot() === undefined) { - skip = false; - } else if (coll.property.kind === ReferenceKind.MANY_TO_MANY && !coll.property.owner) { - skip = false; - } - if (skip) { - this.#collectionUpdates.delete(coll); - } - } - } - /** - * Orders change sets so FK constrains are maintained, ensures stable order (needed for node < 11) - */ - getChangeSetGroups() { - const groups = { - [ChangeSetType.CREATE]: new Map(), - [ChangeSetType.UPDATE]: new Map(), - [ChangeSetType.DELETE]: new Map(), - [ChangeSetType.UPDATE_EARLY]: new Map(), - [ChangeSetType.DELETE_EARLY]: new Map(), - }; - const addToGroup = cs => { - // Skip stub TPT changesets with empty payload (e.g. leaf with no own-property changes on UPDATE) - if ( - (cs.type === ChangeSetType.UPDATE || cs.type === ChangeSetType.UPDATE_EARLY) && - !Utils.hasObjectKeys(cs.payload) - ) { - return; - } - const group = groups[cs.type]; - const groupKey = cs.meta.inheritanceType === 'tpt' ? cs.meta : cs.rootMeta; - const classGroup = group.get(groupKey) ?? []; - classGroup.push(cs); - if (!group.has(groupKey)) { - group.set(groupKey, classGroup); - } - }; - for (const cs of this.#changeSets.values()) { - addToGroup(cs); - for (const parentCs of cs.tptChangeSets ?? []) { - addToGroup(parentCs); - } - } - return groups; - } - getCommitOrder() { - const calc = new CommitOrderCalculator(); - const set = new Set(); - this.#changeSets.forEach(cs => { - if (cs.meta.inheritanceType === 'tpt') { - set.add(cs.meta); - for (const parentCs of cs.tptChangeSets ?? []) { - set.add(parentCs.meta); - } - } else { - set.add(cs.rootMeta); - } - }); - set.forEach(meta => calc.addNode(meta._id)); - for (const meta of set) { - for (const prop of meta.relations) { - if (prop.polymorphTargets) { - for (const targetMeta of prop.polymorphTargets) { - calc.discoverProperty({ ...prop, targetMeta }, meta._id); - } - } else { - calc.discoverProperty(prop, meta._id); - } - } - // For TPT, parent table must be inserted BEFORE child tables - if (meta.inheritanceType === 'tpt' && meta.tptParent && set.has(meta.tptParent)) { - calc.addDependency(meta.tptParent._id, meta._id, 1); - } - } - return calc.sort().map(id => this.#metadata.getById(id)); - } - resetTransaction(oldTx) { - if (oldTx) { - this.#em.setTransactionContext(oldTx); - } else { - this.#em.resetTransactionContext(); - } - } - /** - * Takes snapshots of all processed collections - */ - takeCollectionSnapshots(entity, visited) { - if (visited.has(entity)) { - return; - } - visited.add(entity); - helper(entity)?.__meta.relations.forEach(prop => { - const value = entity[prop.name]; - if (Utils.isCollection(value)) { - value.takeSnapshot(); - } - // cascade to m:1 relations as we need to snapshot the 1:m inverse side (for `removeAll()` with orphan removal) - if (prop.kind === ReferenceKind.MANY_TO_ONE && value) { - this.takeCollectionSnapshots(Reference.unwrapReference(value), visited); - } - }); - } -} diff --git a/node_modules/@mikro-orm/core/unit-of-work/index.d.ts b/node_modules/@mikro-orm/core/unit-of-work/index.d.ts deleted file mode 100644 index d061ff7..0000000 --- a/node_modules/@mikro-orm/core/unit-of-work/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './ChangeSet.js'; -export * from './ChangeSetComputer.js'; -export * from './ChangeSetPersister.js'; -export * from './CommitOrderCalculator.js'; -export * from './UnitOfWork.js'; -export * from './IdentityMap.js'; diff --git a/node_modules/@mikro-orm/core/unit-of-work/index.js b/node_modules/@mikro-orm/core/unit-of-work/index.js deleted file mode 100644 index d061ff7..0000000 --- a/node_modules/@mikro-orm/core/unit-of-work/index.js +++ /dev/null @@ -1,6 +0,0 @@ -export * from './ChangeSet.js'; -export * from './ChangeSetComputer.js'; -export * from './ChangeSetPersister.js'; -export * from './CommitOrderCalculator.js'; -export * from './UnitOfWork.js'; -export * from './IdentityMap.js'; diff --git a/node_modules/@mikro-orm/core/utils/AbstractMigrator.d.ts b/node_modules/@mikro-orm/core/utils/AbstractMigrator.d.ts deleted file mode 100644 index 2d6c020..0000000 --- a/node_modules/@mikro-orm/core/utils/AbstractMigrator.d.ts +++ /dev/null @@ -1,121 +0,0 @@ -import type { - Constructor, - IMigrationGenerator, - IMigrationRunner, - IMigrator, - IMigratorStorage, - MaybePromise, - Migration, - MigrationInfo, - MigrationRow, - MigratorEvent, -} from '../typings.js'; -import type { Transaction } from '../connections/Connection.js'; -import type { Configuration, MigrationsOptions } from './Configuration.js'; -import type { EntityManagerType, IDatabaseDriver } from '../drivers/IDatabaseDriver.js'; -interface RunnableMigration { - name: string; - path?: string; - up: () => MaybePromise; - down: () => MaybePromise; -} -type MigrateOptions = { - from?: string | number; - to?: string | number; - migrations?: string[]; - transaction?: Transaction; -}; -export declare abstract class AbstractMigrator implements IMigrator { - #private; - protected readonly em: D[typeof EntityManagerType]; - protected runner: IMigrationRunner; - protected storage: IMigratorStorage; - protected generator: IMigrationGenerator; - protected readonly driver: D; - protected readonly config: Configuration; - protected readonly options: MigrationsOptions; - protected absolutePath: string; - protected initialized: boolean; - constructor(em: D[typeof EntityManagerType]); - protected abstract createRunner(): IMigrationRunner; - protected abstract createStorage(): IMigratorStorage; - protected abstract getDefaultGenerator(): IMigrationGenerator; - abstract create( - path?: string, - blank?: boolean, - initial?: boolean, - name?: string, - ): Promise<{ - fileName: string; - code: string; - diff: { - up: string[]; - down: string[]; - }; - }>; - abstract checkSchema(): Promise; - abstract createInitial( - path?: string, - name?: string, - blank?: boolean, - ): Promise<{ - fileName: string; - code: string; - diff: { - up: string[]; - down: string[]; - }; - }>; - /** - * @inheritDoc - */ - on(eventName: MigratorEvent, listener: (event: MigrationInfo) => MaybePromise): this; - /** - * @inheritDoc - */ - off(eventName: MigratorEvent, listener: (event: MigrationInfo) => MaybePromise): this; - /** - * @inheritDoc - */ - getExecuted(): Promise; - /** - * @inheritDoc - */ - getPending(): Promise; - /** - * @inheritDoc - */ - up(options?: string | string[] | MigrateOptions): Promise; - /** - * @inheritDoc - */ - down(options?: string | string[] | Omit): Promise; - abstract getStorage(): IMigratorStorage; - protected init(): Promise; - protected initServices(): void; - protected resolve(params: { name: string; path: string }): RunnableMigration; - protected initialize(MigrationClass: Constructor, name: string): RunnableMigration; - /** - * Checks if `src` folder exists, it so, tries to adjust the migrations and seeders paths automatically to use it. - * If there is a `dist` or `build` folder, it will be used for the JS variant (`path` option), while the `src` folder will be - * used for the TS variant (`pathTs` option). - * - * If the default folder exists (e.g. `/migrations`), the config will respect that, so this auto-detection should not - * break existing projects, only help with the new ones. - */ - private detectSourceFolder; - private registerDefaultListeners; - private emit; - private discoverMigrations; - private executeMigrations; - private filterUp; - private filterDown; - private getMigrationFilename; - private prefix; - protected runMigrations( - method: 'up' | 'down', - options?: string | string[] | MigrateOptions, - ): Promise; - private runInTransaction; -} -export {}; diff --git a/node_modules/@mikro-orm/core/utils/AbstractMigrator.js b/node_modules/@mikro-orm/core/utils/AbstractMigrator.js deleted file mode 100644 index 2728c88..0000000 --- a/node_modules/@mikro-orm/core/utils/AbstractMigrator.js +++ /dev/null @@ -1,303 +0,0 @@ -import { Utils } from './Utils.js'; -export class AbstractMigrator { - em; - runner; - storage; - generator; - driver; - config; - options; - absolutePath; - initialized = false; - #listeners = new Map(); - constructor(em) { - this.em = em; - this.driver = this.em.getDriver(); - this.config = this.em.config; - this.options = this.config.get('migrations'); - this.initServices(); - this.registerDefaultListeners(); - } - /** - * @inheritDoc - */ - on(eventName, listener) { - if (!this.#listeners.has(eventName)) { - this.#listeners.set(eventName, new Set()); - } - this.#listeners.get(eventName).add(listener); - return this; - } - /** - * @inheritDoc - */ - off(eventName, listener) { - this.#listeners.get(eventName)?.delete(listener); - return this; - } - /** - * @inheritDoc - */ - async getExecuted() { - await this.init(); - return this.storage.getExecutedMigrations(); - } - /** - * @inheritDoc - */ - async getPending() { - await this.init(); - const all = await this.discoverMigrations(); - const executed = new Set(await this.storage.executed()); - return all.filter(m => !executed.has(m.name)).map(m => ({ name: m.name, path: m.path })); - } - /** - * @inheritDoc - */ - async up(options) { - return this.runMigrations('up', options); - } - /** - * @inheritDoc - */ - async down(options) { - return this.runMigrations('down', options); - } - async init() { - if (this.initialized) { - return; - } - this.initialized = true; - if (!this.options.migrationsList) { - const { fs } = await import('@mikro-orm/core/fs-utils'); - this.detectSourceFolder(fs); - /* v8 ignore next */ - const key = - this.config.get('preferTs', Utils.detectTypeScriptSupport()) && this.options.pathTs ? 'pathTs' : 'path'; - this.absolutePath = fs.absolutePath(this.options[key], this.config.get('baseDir')); - fs.ensureDir(this.absolutePath); - } - } - initServices() { - this.runner = this.createRunner(); - this.storage = this.createStorage(); - if (this.options.generator) { - this.generator = new this.options.generator(this.driver, this.config.getNamingStrategy(), this.options); - } else { - this.generator = this.getDefaultGenerator(); - } - } - resolve(params) { - const createMigrationHandler = async method => { - const { fs } = await import('@mikro-orm/core/fs-utils'); - const migration = await fs.dynamicImport(params.path); - const MigrationClass = Object.values(migration).find( - cls => typeof cls === 'function' && typeof cls.constructor === 'function', - ); - const instance = new MigrationClass(this.driver, this.config); - await this.runner.run(instance, method); - }; - return { - name: this.storage.getMigrationName(params.name), - path: params.path, - up: () => createMigrationHandler('up'), - down: () => createMigrationHandler('down'), - }; - } - initialize(MigrationClass, name) { - const instance = new MigrationClass(this.driver, this.config); - return { - name: this.storage.getMigrationName(name), - up: () => this.runner.run(instance, 'up'), - down: () => this.runner.run(instance, 'down'), - }; - } - /** - * Checks if `src` folder exists, it so, tries to adjust the migrations and seeders paths automatically to use it. - * If there is a `dist` or `build` folder, it will be used for the JS variant (`path` option), while the `src` folder will be - * used for the TS variant (`pathTs` option). - * - * If the default folder exists (e.g. `/migrations`), the config will respect that, so this auto-detection should not - * break existing projects, only help with the new ones. - */ - detectSourceFolder(fs) { - const baseDir = this.config.get('baseDir'); - const defaultPath = './migrations'; - if (!fs.pathExists(baseDir + '/src')) { - this.options.path ??= defaultPath; - return; - } - const exists = fs.pathExists(`${baseDir}/${defaultPath}`); - const distDir = fs.pathExists(baseDir + '/dist'); - const buildDir = fs.pathExists(baseDir + '/build'); - // if neither `dist` nor `build` exist, we use the `src` folder as it might be a JS project without building, but with `src` folder - /* v8 ignore next */ - const path = distDir ? './dist' : buildDir ? './build' : './src'; - // only if the user did not provide any values and if the default path does not exist - if (!this.options.path && !this.options.pathTs && !exists) { - this.options.path = `${path}/migrations`; - this.options.pathTs = './src/migrations'; - } - } - registerDefaultListeners() { - /* v8 ignore else */ - if (!this.options.silent) { - const logger = this.config.getLogger(); - this.on('migrating', event => logger.log('migrator', `Processing '${event.name}'`, { enabled: true })); - this.on('migrated', event => logger.log('migrator', `Applied '${event.name}'`, { enabled: true })); - this.on('reverting', event => logger.log('migrator', `Processing '${event.name}'`, { enabled: true })); - this.on('reverted', event => logger.log('migrator', `Reverted '${event.name}'`, { enabled: true })); - } - } - async emit(event, data) { - for (const listener of this.#listeners.get(event) ?? []) { - await listener(data); - } - } - async discoverMigrations() { - if (this.options.migrationsList) { - return this.options.migrationsList.map(migration => { - if (typeof migration === 'function') { - return this.initialize(migration, migration.name); - } - return this.initialize(migration.class, migration.name); - }); - } - const { fs } = await import('@mikro-orm/core/fs-utils'); - const pattern = fs.normalizePath(this.absolutePath, this.options.glob); - const files = fs.glob(pattern).sort(); - return files.map(filePath => - this.resolve({ - name: filePath.replace(/\\/g, '/').split('/').pop(), - path: filePath, - }), - ); - } - async executeMigrations(method, options = {}) { - const all = await this.discoverMigrations(); - const executed = await this.storage.executed(); - const executedSet = new Set(executed); - let toRun; - if (method === 'up') { - toRun = this.filterUp(all, executedSet, options); - } else { - toRun = this.filterDown(all, executed, options); - } - const result = []; - const eventBefore = method === 'up' ? 'migrating' : 'reverting'; - const eventAfter = method === 'up' ? 'migrated' : 'reverted'; - for (const migration of toRun) { - const event = { name: migration.name, path: migration.path }; - await this.emit(eventBefore, event); - await migration[method](); - if (method === 'up') { - await this.storage.logMigration({ name: migration.name }); - } else { - await this.storage.unlogMigration({ name: migration.name }); - } - await this.emit(eventAfter, event); - result.push(event); - } - return result; - } - filterUp(all, executed, options) { - let pending = all.filter(m => !executed.has(m.name)); - if (options.migrations) { - const set = new Set(options.migrations); - return pending.filter(m => set.has(m.name)); - } - if (options.from) { - const idx = all.findIndex(m => m.name === options.from); - if (idx >= 0) { - const names = new Set(all.slice(idx + 1).map(m => m.name)); - pending = pending.filter(m => names.has(m.name)); - } - } - if (options.to && typeof options.to === 'string') { - const idx = all.findIndex(m => m.name === options.to); - if (idx >= 0) { - const names = new Set(all.slice(0, idx + 1).map(m => m.name)); - pending = pending.filter(m => names.has(m.name)); - } - } - return pending; - } - filterDown(all, executed, options) { - const migrationMap = new Map(all.map(m => [m.name, m])); - const executedReversed = [...executed].reverse(); - if (options.migrations) { - const set = new Set(options.migrations); - return executedReversed - .filter(name => set.has(name)) - .map(name => migrationMap.get(name)) - .filter(Boolean); - } - if (options.to === 0) { - return executedReversed.map(name => migrationMap.get(name)).filter(Boolean); - } - if (options.to) { - const result = []; - for (const name of executedReversed) { - if (name === String(options.to)) { - break; - } - const m = migrationMap.get(name); - if (m) { - result.push(m); - } - } - return result; - } - // Default: revert last 1 - if (executedReversed.length > 0) { - const m = migrationMap.get(executedReversed[0]); - return m ? [m] : []; - } - return []; - } - getMigrationFilename(name) { - name = name.replace(/\.[jt]s$/, ''); - return /^\d{14}$/.exec(name) ? this.options.fileName(name) : name; - } - prefix(options) { - if (typeof options === 'string' || Array.isArray(options)) { - return { migrations: Utils.asArray(options).map(name => this.getMigrationFilename(name)) }; - } - if (!options) { - return {}; - } - const result = {}; - if (options.migrations) { - result.migrations = options.migrations.map(name => this.getMigrationFilename(name)); - } - if (options.from) { - result.from = this.getMigrationFilename(String(options.from)); - } - if (options.to && options.to !== 0) { - result.to = this.getMigrationFilename(String(options.to)); - } else if (options.to === 0) { - result.to = 0; - } - return result; - } - async runMigrations(method, options) { - await this.init(); - if (!this.options.transactional || !this.options.allOrNothing) { - return this.executeMigrations(method, this.prefix(options)); - } - if (Utils.isObject(options) && options.transaction) { - return this.runInTransaction(options.transaction, method, options); - } - return this.driver.getConnection().transactional(trx => this.runInTransaction(trx, method, options)); - } - async runInTransaction(trx, method, options) { - this.runner.setMasterMigration(trx); - this.storage.setMasterMigration(trx); - try { - return await this.executeMigrations(method, this.prefix(options)); - } finally { - this.runner.unsetMasterMigration(); - this.storage.unsetMasterMigration(); - } - } -} diff --git a/node_modules/@mikro-orm/core/utils/AbstractSchemaGenerator.d.ts b/node_modules/@mikro-orm/core/utils/AbstractSchemaGenerator.d.ts deleted file mode 100644 index 59dfedd..0000000 --- a/node_modules/@mikro-orm/core/utils/AbstractSchemaGenerator.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import type { - ClearDatabaseOptions, - DropSchemaOptions, - EntityMetadata, - ISchemaGenerator, - UpdateSchemaOptions, - CreateSchemaOptions, - RefreshDatabaseOptions, - EnsureDatabaseOptions, -} from '../typings.js'; -import { type EntityManagerType, type IDatabaseDriver } from '../drivers/IDatabaseDriver.js'; -import type { MetadataStorage } from '../metadata/MetadataStorage.js'; -import type { Configuration } from './Configuration.js'; -export declare abstract class AbstractSchemaGenerator implements ISchemaGenerator { - protected readonly em?: D[typeof EntityManagerType]; - protected readonly driver: D; - protected readonly config: Configuration; - protected readonly metadata: MetadataStorage; - protected readonly platform: ReturnType; - protected readonly connection: ReturnType; - constructor(em: D | D[typeof EntityManagerType]); - create(options?: CreateSchemaOptions): Promise; - /** - * Returns true if the database was created. - */ - ensureDatabase(options?: EnsureDatabaseOptions): Promise; - refresh(options?: RefreshDatabaseOptions): Promise; - clear(options?: ClearDatabaseOptions): Promise; - protected clearIdentityMap(): void; - getCreateSchemaSQL(options?: CreateSchemaOptions): Promise; - drop(options?: DropSchemaOptions): Promise; - getDropSchemaSQL(options?: Omit): Promise; - update(options?: UpdateSchemaOptions): Promise; - getUpdateSchemaSQL(options?: UpdateSchemaOptions): Promise; - getUpdateSchemaMigrationSQL(options?: UpdateSchemaOptions): Promise<{ - up: string; - down: string; - }>; - /** - * creates new database and connects to it - */ - createDatabase(name?: string): Promise; - dropDatabase(name?: string): Promise; - execute(query: string): Promise; - ensureIndexes(): Promise; - protected getOrderedMetadata(schema?: string): EntityMetadata[]; - protected notImplemented(): never; -} diff --git a/node_modules/@mikro-orm/core/utils/AbstractSchemaGenerator.js b/node_modules/@mikro-orm/core/utils/AbstractSchemaGenerator.js deleted file mode 100644 index cc0c866..0000000 --- a/node_modules/@mikro-orm/core/utils/AbstractSchemaGenerator.js +++ /dev/null @@ -1,125 +0,0 @@ -import { CommitOrderCalculator } from '../unit-of-work/CommitOrderCalculator.js'; -import { EntityManager } from '../EntityManager.js'; -export class AbstractSchemaGenerator { - em; - driver; - config; - metadata; - platform; - connection; - constructor(em) { - this.em = em instanceof EntityManager ? em : undefined; - this.driver = em instanceof EntityManager ? em.getDriver() : em; - this.config = this.driver.config; - this.metadata = this.driver.getMetadata(); - this.platform = this.driver.getPlatform(); - this.connection = this.driver.getConnection(); - } - async create(options) { - this.notImplemented(); - } - /** - * Returns true if the database was created. - */ - async ensureDatabase(options) { - this.notImplemented(); - } - async refresh(options) { - if (options?.dropDb) { - const name = this.config.get('dbName'); - await this.dropDatabase(name); - await this.createDatabase(name); - } else { - await this.ensureDatabase(); - await this.drop(options); - } - if (options?.createSchema !== false) { - await this.create(options); - } - } - async clear(options) { - for (const meta of this.getOrderedMetadata(options?.schema).reverse()) { - await this.driver.nativeDelete(meta.class, {}, options); - } - if (options?.clearIdentityMap ?? true) { - this.clearIdentityMap(); - } - } - clearIdentityMap() { - /* v8 ignore next */ - if (!this.em) { - return; - } - const allowGlobalContext = this.config.get('allowGlobalContext'); - this.config.set('allowGlobalContext', true); - this.em.clear(); - this.config.set('allowGlobalContext', allowGlobalContext); - } - async getCreateSchemaSQL(options) { - this.notImplemented(); - } - async drop(options) { - this.notImplemented(); - } - async getDropSchemaSQL(options) { - this.notImplemented(); - } - async update(options) { - this.notImplemented(); - } - async getUpdateSchemaSQL(options) { - this.notImplemented(); - } - async getUpdateSchemaMigrationSQL(options) { - this.notImplemented(); - } - /** - * creates new database and connects to it - */ - async createDatabase(name) { - this.notImplemented(); - } - async dropDatabase(name) { - this.notImplemented(); - } - async execute(query) { - this.notImplemented(); - } - async ensureIndexes() { - this.notImplemented(); - } - getOrderedMetadata(schema) { - const metadata = [...this.metadata.getAll().values()].filter(meta => { - const isRootEntity = meta.root.class === meta.class; - const isTPTChild = meta.inheritanceType === 'tpt' && meta.tptParent; - return (isRootEntity || isTPTChild) && !meta.embeddable && !meta.virtual; - }); - const calc = new CommitOrderCalculator(); - metadata.forEach(meta => { - const nodeId = meta.inheritanceType === 'tpt' && meta.tptParent ? meta._id : meta.root._id; - calc.addNode(nodeId); - }); - let meta = metadata.pop(); - while (meta) { - const nodeId = meta.inheritanceType === 'tpt' && meta.tptParent ? meta._id : meta.root._id; - for (const prop of meta.relations) { - calc.discoverProperty(prop, nodeId); - } - if (meta.inheritanceType === 'tpt' && meta.tptParent) { - const parentId = meta.tptParent._id; - calc.addDependency(parentId, nodeId, 1); - } - meta = metadata.pop(); - } - return calc - .sort() - .map(cls => this.metadata.getById(cls)) - .filter(meta => { - const targetSchema = meta.schema ?? this.config.get('schema', this.platform.getDefaultSchemaName()); - return schema ? [schema, '*'].includes(targetSchema) : meta.schema !== '*'; - }); - } - notImplemented() { - throw new Error(`This method is not supported by ${this.driver.constructor.name} driver`); - } -} diff --git a/node_modules/@mikro-orm/core/utils/AsyncContext.d.ts b/node_modules/@mikro-orm/core/utils/AsyncContext.d.ts deleted file mode 100644 index 1625668..0000000 --- a/node_modules/@mikro-orm/core/utils/AsyncContext.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface AsyncContext { - getStore(): T | undefined; - run(store: T, callback: () => R): R; - enterWith(store: T): void; -} -export declare function createAsyncContext(): AsyncContext; diff --git a/node_modules/@mikro-orm/core/utils/AsyncContext.js b/node_modules/@mikro-orm/core/utils/AsyncContext.js deleted file mode 100644 index 7dbc9e7..0000000 --- a/node_modules/@mikro-orm/core/utils/AsyncContext.js +++ /dev/null @@ -1,41 +0,0 @@ -function getNodeAsyncContext() { - const mod = globalThis.process?.getBuiltinModule?.('node:async_hooks'); - /* v8 ignore next */ - if (!mod?.AsyncLocalStorage) { - throw new Error('AsyncLocalStorage not available'); - } - return new mod.AsyncLocalStorage(); -} -/* v8 ignore next */ -function createFallbackAsyncContext() { - let store; - // eslint-disable-next-line no-console - console.warn('AsyncLocalStorage not available'); - return { - getStore: () => store, - enterWith: value => (store = value), - run: (value, cb) => { - const prev = store; - store = value; - try { - return cb(); - } finally { - store = prev; - } - }, - }; -} -export function createAsyncContext() { - /* v8 ignore next */ - const ALS = globalThis.AsyncLocalStorage; - /* v8 ignore next */ - if (typeof ALS === 'function' && ALS.prototype?.run) { - return new ALS(); - } - /* v8 ignore else */ - if (globalThis.process?.versions?.node) { - return getNodeAsyncContext(); - } - /* v8 ignore next */ - return createFallbackAsyncContext(); -} diff --git a/node_modules/@mikro-orm/core/utils/Configuration.d.ts b/node_modules/@mikro-orm/core/utils/Configuration.d.ts deleted file mode 100644 index 81b81a0..0000000 --- a/node_modules/@mikro-orm/core/utils/Configuration.d.ts +++ /dev/null @@ -1,954 +0,0 @@ -import type { NamingStrategy } from '../naming-strategy/NamingStrategy.js'; -import { type CacheAdapter, type SyncCacheAdapter } from '../cache/CacheAdapter.js'; -import type { EntityRepository } from '../entity/EntityRepository.js'; -import type { - AnyEntity, - CompiledFunctions, - Constructor, - Dictionary, - EnsureDatabaseOptions, - EntityClass, - EntityMetadata, - FilterDef, - GenerateOptions, - Highlighter, - HydratorConstructor, - IHydrator, - IMigrationGenerator, - IPrimaryKey, - MaybePromise, - Migration, - MigrationObject, - Seeder, - SeederObject, -} from '../typings.js'; -import { type Logger, type LoggerNamespace, type LoggerOptions } from '../logging/Logger.js'; -import type { EntityManager } from '../EntityManager.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { EntitySchema } from '../metadata/EntitySchema.js'; -import { MetadataProvider } from '../metadata/MetadataProvider.js'; -import type { MetadataStorage } from '../metadata/MetadataStorage.js'; -import type { EventSubscriber } from '../events/EventSubscriber.js'; -import type { AssignOptions } from '../entity/EntityAssigner.js'; -import type { EntityManagerType, IDatabaseDriver } from '../drivers/IDatabaseDriver.js'; -import { DataloaderType, FlushMode, LoadStrategy, PopulateHint, type EmbeddedPrefixMode } from '../enums.js'; -import { EntityComparator } from './EntityComparator.js'; -import type { Type } from '../types/Type.js'; -import type { MikroORM } from '../MikroORM.js'; -/** Holds and validates all ORM configuration options, providing access to drivers, loggers, cache adapters, and other services. */ -export declare class Configuration< - D extends IDatabaseDriver = IDatabaseDriver, - EM extends EntityManager = D[typeof EntityManagerType] & EntityManager, -> { - #private; - constructor(options: Partial, validate?: boolean); - /** Returns the database platform instance. */ - getPlatform(): ReturnType; - /** - * Gets specific configuration option. Falls back to specified `defaultValue` if provided. - */ - get, U extends Options[T]>(key: T, defaultValue?: U): U; - /** Returns all configuration options. */ - getAll(): Options; - /** - * Overrides specified configuration value. - */ - set, U extends Options[T]>(key: T, value: U): void; - /** - * Resets the configuration to its default value - */ - reset>(key: T): void; - /** - * Gets Logger instance. - */ - getLogger(): Logger; - /** - * Gets the logger instance for slow queries. - * Falls back to the main logger if no custom slow query logger factory is configured. - */ - getSlowQueryLogger(): Logger; - /** Returns the configured dataloader type, normalizing boolean values. */ - getDataloaderType(): DataloaderType; - /** Returns the configured schema name, optionally skipping the platform's default schema. */ - getSchema(skipDefaultSchema?: boolean): string | undefined; - /** - * Gets current database driver instance. - */ - getDriver(): D; - /** Registers a lazily-initialized extension by name. */ - registerExtension(name: string, cb: () => unknown): void; - /** Returns a previously registered extension by name, initializing it on first access. */ - getExtension(name: string): T | undefined; - /** - * Gets instance of NamingStrategy. (cached) - */ - getNamingStrategy(): NamingStrategy; - /** - * Gets instance of Hydrator. (cached) - */ - getHydrator(metadata: MetadataStorage): IHydrator; - /** - * Gets instance of Comparator. (cached) - */ - getComparator(metadata: MetadataStorage): EntityComparator; - /** - * Gets instance of MetadataProvider. (cached) - */ - getMetadataProvider(): MetadataProvider; - /** - * Gets instance of metadata CacheAdapter. (cached) - */ - getMetadataCacheAdapter(): SyncCacheAdapter; - /** - * Gets instance of CacheAdapter for result cache. (cached) - */ - getResultCacheAdapter(): CacheAdapter; - /** - * Gets EntityRepository class to be instantiated. - */ - getRepositoryClass(repository: () => EntityClass>): Options['entityRepository']; - /** - * Creates instance of given service and caches it. - */ - getCachedService< - T extends { - new (...args: any[]): InstanceType; - }, - >(cls: T, ...args: ConstructorParameters): InstanceType; - /** Clears the cached service instances, forcing re-creation on next access. */ - resetServiceCache(): void; - private init; - private sync; - private validateOptions; -} -/** - * Type helper to make it easier to use `mikro-orm.config.js`. - */ -export declare function defineConfig< - D extends IDatabaseDriver = IDatabaseDriver, - EM extends EntityManager = EntityManager, - Entities extends (string | EntityClass | EntitySchema)[] = ( - | string - | EntityClass - | EntitySchema - )[], ->(options: Partial>): Partial>; -/** - * Connection configuration options for database connections. - * @see https://mikro-orm.io/docs/configuration#connection - */ -export interface ConnectionOptions { - /** Name of the database to connect to. */ - dbName?: string; - /** Default database schema to use. */ - schema?: string; - /** Name of the connection (used for logging when replicas are used). */ - name?: string; - /** Full client connection URL. Overrides individual connection options. */ - clientUrl?: string; - /** Database server hostname. */ - host?: string; - /** Database server port number. */ - port?: number; - /** Database user name. */ - user?: string; - /** - * Database password. Can be a string or a callback function that returns the password. - * The callback is useful for short-lived tokens from cloud providers. - * @example - * password: async () => someCallToGetTheToken() - */ - password?: string | (() => MaybePromise); - /** Character set for the connection. */ - charset?: string; - /** Collation for the connection. */ - collate?: string; - /** - * Enable multiple statements in a single query. - * Required for importing database dump files. - * Should be disabled in production for security. - * @default false - */ - multipleStatements?: boolean; - /** Connection pool configuration. */ - pool?: PoolConfig; - /** - * Additional driver-specific options. - * The object will be deeply merged with internal driver options. - */ - driverOptions?: Dictionary; - /** Callback to execute when a new connection is created. */ - onCreateConnection?: (connection: unknown) => Promise; - /** - * SQLite/libSQL: databases to attach on connection. - * Each attached database acts as a schema, accessible via `schema.table` syntax. - * Entities can reference attached databases via `@Entity({ schema: 'db_name' })`. - * Note: Not supported for remote libSQL connections. - * @example - * attachDatabases: [ - * { name: 'users_db', path: './users.db' }, - * { name: 'logs_db', path: '/var/data/logs.db' }, - * ] - */ - attachDatabases?: { - name: string; - path: string; - }[]; -} -/** - * Configuration options for database migrations. - * @see https://mikro-orm.io/docs/migrations - */ -export type MigrationsOptions = { - /** - * Name of the migrations table. - * @default 'mikro_orm_migrations' - */ - tableName?: string; - /** - * Path to the folder with migration files (for compiled JavaScript files). - * @default './migrations' - */ - path?: string; - /** - * Path to the folder with migration files (for TypeScript source files). - * Used when running in TypeScript mode. - */ - pathTs?: string; - /** - * Glob pattern to match migration files. - * @default '!(*.d).{js,ts,cjs}' - */ - glob?: string; - /** - * Disable logging for migration operations. - * @default false - */ - silent?: boolean; - /** - * Run each migration inside a transaction. - * @default true - */ - transactional?: boolean; - /** - * Try to disable foreign key checks during migrations. - * @default false - */ - disableForeignKeys?: boolean; - /** - * Run all migrations in the current batch in a master transaction. - * @default true - */ - allOrNothing?: boolean; - /** - * Allow dropping tables during schema diff. - * @default true - */ - dropTables?: boolean; - /** - * Safe mode - only allow adding new tables and columns, never dropping existing ones. - * @default false - */ - safe?: boolean; - /** - * Create a snapshot of the current schema after migration generation. - * @default true - */ - snapshot?: boolean; - /** Custom name for the snapshot file. */ - snapshotName?: string; - /** - * File extension for generated migration files. - * @default 'ts' - */ - emit?: 'js' | 'ts' | 'cjs'; - /** Custom migration generator class. */ - generator?: Constructor; - /** - * Custom function to generate migration file names. - * @default (timestamp, name) => `Migration${timestamp}${name ? '_' + name : ''}` - */ - fileName?: (timestamp: string, name?: string) => string; - /** List of migration classes or objects to use instead of file-based discovery. */ - migrationsList?: (MigrationObject | Constructor)[]; -}; -/** - * Configuration options for database seeders. - * @see https://mikro-orm.io/docs/seeding - */ -export interface SeederOptions { - /** - * Path to the folder with seeder files (for compiled JavaScript files). - * @default './seeders' - */ - path?: string; - /** - * Path to the folder with seeder files (for TypeScript source files). - * Used when running in TypeScript mode. - */ - pathTs?: string; - /** - * Glob pattern to match seeder files. - * @default '!(*.d).{js,ts}' - */ - glob?: string; - /** - * Name of the default seeder class to run. - * @default 'DatabaseSeeder' - */ - defaultSeeder?: string; - /** - * File extension for generated seeder files. - * @default 'ts' - */ - emit?: 'js' | 'ts'; - /** - * Custom function to generate seeder file names. - * @default (className) => className - */ - fileName?: (className: string) => string; - /** List of seeder classes or objects to use instead of file-based discovery. */ - seedersList?: (SeederObject | Constructor)[]; -} -/** - * Connection pool configuration. - * @see https://mikro-orm.io/docs/configuration#connection - */ -export interface PoolConfig { - /** Minimum number of connections to keep in the pool. */ - min?: number; - /** Maximum number of connections allowed in the pool. */ - max?: number; - /** Time in milliseconds before an idle connection is closed. */ - idleTimeoutMillis?: number; -} -/** - * Configuration options for metadata discovery. - * @see https://mikro-orm.io/docs/configuration#entity-discovery - */ -export interface MetadataDiscoveryOptions { - /** - * Throw an error when no entities are discovered. - * @default true - */ - warnWhenNoEntities?: boolean; - /** - * Check for duplicate table names and throw an error if found. - * @default true - */ - checkDuplicateTableNames?: boolean; - /** - * Check for duplicate field names and throw an error if found. - * @default true - */ - checkDuplicateFieldNames?: boolean; - /** - * Check for composite primary keys marked as `persist: false` and throw an error if found. - * @default true - */ - checkNonPersistentCompositeProps?: boolean; - /** - * Infer default values from property initializers when possible - * (if the constructor can be invoked without parameters). - * @default true - */ - inferDefaultValues?: boolean; - /** - * Custom callback to override default type mapping. - * Allows customizing how property types are mapped to database column types. - * @example - * getMappedType(type, platform) { - * if (type === 'string') { - * return Type.getType(TextType); - * } - * return platform.getDefaultMappedType(type); - * } - */ - getMappedType?: (type: string, platform: Platform) => Type | undefined; - /** - * Hook called for each entity metadata during discovery. - * Can be used to modify metadata dynamically before defaults are filled in. - * The hook can be async when using `MikroORM.init()`. - */ - onMetadata?: (meta: EntityMetadata, platform: Platform) => MaybePromise; - /** - * Hook called after all entities are discovered. - * Can be used to access and modify all metadata at once. - */ - afterDiscovered?: (storage: MetadataStorage, platform: Platform) => MaybePromise; - /** Path to the TypeScript configuration file for ts-morph metadata provider. */ - tsConfigPath?: string; - /** @internal */ - skipSyncDiscovery?: boolean; -} -/** - * MikroORM configuration options. - * @see https://mikro-orm.io/docs/configuration - */ -export interface Options< - Driver extends IDatabaseDriver = IDatabaseDriver, - EM extends EntityManager & Driver[typeof EntityManagerType] = EntityManager & - Driver[typeof EntityManagerType], - Entities extends (string | EntityClass | EntitySchema)[] = ( - | string - | EntityClass - | EntitySchema - )[], -> extends ConnectionOptions { - /** Connection pool configuration. */ - pool: PoolConfig; - /** - * Additional driver-specific options. - * The object will be deeply merged with internal driver options. - */ - driverOptions: Dictionary; - /** - * Array of entity classes or paths to entity modules. - * Paths support glob patterns for automatic discovery. - * @example - * entities: [Author, Book, Publisher] // class references - * entities: ['./dist/entities'] // folder paths - */ - entities: Entities; - /** - * Array of TypeScript entity source paths. - * Used when running in TypeScript mode (e.g., via `tsx` or `swc`). - * Should always be specified when using folder-based discovery. - * @example - * entitiesTs: ['./src/entities'] - */ - entitiesTs: Entities; - /** - * ORM extensions to register (e.g., Migrator, EntityGenerator, SeedManager). - * Extensions registered here are available via shortcuts like `orm.migrator`. - * @example - * extensions: [Migrator, EntityGenerator, SeedManager] - */ - extensions: { - register: (orm: MikroORM) => void; - }[]; - /** - * Event subscribers to register. - * Can be class references or instances. - */ - subscribers: Iterable>; - /** - * Global entity filters to apply. - * Filters are applied by default unless explicitly disabled. - * @see https://mikro-orm.io/docs/filters - */ - filters: Dictionary< - { - name?: string; - } & Omit - >; - /** - * Metadata discovery configuration options. - * Controls how entities are discovered and validated. - */ - discovery: MetadataDiscoveryOptions; - /** - * Database driver class to use. - * Should be imported from the specific driver package (e.g. `@mikro-orm/mysql`, `@mikro-orm/postgresql`). - * Alternatively, use the `defineConfig` helper or `MikroORM` class exported from the driver package. - * @example - * import { MySqlDriver } from '@mikro-orm/mysql'; - * - * MikroORM.init({ - * driver: MySqlDriver, - * dbName: 'my_db', - * }); - */ - driver?: { - new (config: Configuration): Driver; - }; - /** - * Custom naming strategy class for mapping entity/property names to database table/column names. - * Built-in options: `UnderscoreNamingStrategy`, `MongoNamingStrategy`, `EntityCaseNamingStrategy`. - * @see https://mikro-orm.io/docs/naming-strategy - */ - namingStrategy?: { - new (): NamingStrategy; - }; - /** - * Enable implicit transactions for all write operations. - * When enabled, all queries will be wrapped in a transaction. - * Disabled for MongoDB driver by default. - */ - implicitTransactions?: boolean; - /** - * Disable all transactions. - * When enabled, no queries will be wrapped in transactions, even when explicitly requested. - * @default false - */ - disableTransactions?: boolean; - /** - * Enable verbose logging of internal operations. - * @default false - */ - verbose: boolean; - /** - * Ignore `undefined` values in find queries instead of treating them as `null`. - * @default false - * @example - * // With ignoreUndefinedInQuery: true - * em.find(User, { email: undefined }) // resolves to em.find(User, {}) - */ - ignoreUndefinedInQuery: boolean; - /** - * Hook to modify SQL queries before execution. - * Useful for adding observability hints or query modifications. - * @param sql - The generated SQL query - * @param params - Query parameters - * @returns Modified SQL query - */ - onQuery: (sql: string, params: readonly unknown[]) => string; - /** - * Automatically join the owning side of 1:1 relations when querying the inverse side. - * @default true - */ - autoJoinOneToOneOwner: boolean; - /** - * Automatically join M:1 and 1:1 relations when filters are defined on them. - * Important for implementing soft deletes via filters. - * @default true - */ - autoJoinRefsForFilters: boolean; - /** - * Apply filters to relations in queries. - * @default true - */ - filtersOnRelations: boolean; - /** - * Enable propagation of changes on entity prototypes. - * @default true - */ - propagationOnPrototype: boolean; - /** - * Mark all relations as populated after flush for new entities. - * This aligns serialized output of loaded entities and just-inserted ones. - * @default true - */ - populateAfterFlush: boolean; - /** - * Serialization options for `toJSON()` and `serialize()` methods. - */ - serialization: { - /** - * Include primary keys in serialized output. - * @default true - */ - includePrimaryKeys?: boolean; - /** - * Enforce unpopulated references to be returned as objects. - * When enabled, references are serialized as `{ author: { id: 1 } }` instead of `{ author: 1 }`. - * @default false - */ - forceObject?: boolean; - }; - /** - * Default options for entity assignment via `em.assign()`. - * @see https://mikro-orm.io/docs/entity-helper - */ - assign: AssignOptions; - /** - * Automatically call `em.persist()` on entities created via `em.create()`. - * @default true - */ - persistOnCreate: boolean; - /** - * When upsert creates a new entity, mark it as managed in the identity map. - * @default true - */ - upsertManaged: boolean; - /** - * Force use of entity constructors when creating entity instances. - * Required when using native private properties inside entities. - * Can be `true` for all entities or an array of specific entity classes/names. - * @default false - */ - forceEntityConstructor: boolean | (Constructor | string)[]; - /** - * Convert `null` values from database to `undefined` when hydrating entities. - * @default false - */ - forceUndefined: boolean; - /** - * Property `onCreate` hooks are normally executed during `flush` operation. - * With this option, they will be processed early inside `em.create()` method. - * @default true - */ - processOnCreateHooksEarly: boolean; - /** - * Force `Date` values to be stored in UTC for datetime columns without timezone. - * Works for MySQL (`datetime` type), PostgreSQL (`timestamp` type), and MSSQL (`datetime`/`datetime2` types). - * SQLite does this by default. - * @default true - */ - forceUtcTimezone: boolean; - /** - * Timezone to use for date operations. - * @example '+02:00' - */ - timezone?: string; - /** - * Ensure the database exists when initializing the ORM. - * When `true`, will create the database if it doesn't exist. - * @default true - */ - ensureDatabase: boolean | EnsureDatabaseOptions; - /** - * Ensure database indexes exist on startup. This option works only with the MongoDB driver. - * When enabled, indexes will be created based on entity metadata. - * @default false - */ - ensureIndexes: boolean; - /** - * Use batch insert queries for better performance. - * @default true - */ - useBatchInserts?: boolean; - /** - * Use batch update queries for better performance. - * @default true - */ - useBatchUpdates?: boolean; - /** - * Number of entities to process in each batch for batch inserts/updates. - * @default 300 - */ - batchSize: number; - /** - * Custom hydrator class for assigning database values to entities. - * @default ObjectHydrator - */ - hydrator: HydratorConstructor; - /** - * Pre-generated compiled functions for hydration and comparison. - * Use the `compile` CLI command to create these functions. - * Enables deployment to runtimes that prohibit `new Function`/eval (e.g. Cloudflare Workers). - */ - compiledFunctions?: CompiledFunctions; - /** - * Default loading strategy for relations. - * - `'joined'`: Use SQL JOINs (single query, may cause cartesian product) - * - `'select-in'`: Use separate SELECT IN queries (multiple queries) - * - `'balanced'`: Decides based on relation type and context. - * @default 'balanced' - */ - loadStrategy: LoadStrategy | `${LoadStrategy}`; - /** - * Enable dataloader for batching reference loading. - * - `true` or `DataloaderType.ALL`: Enable for all relation types - * - `false` or `DataloaderType.NONE`: Disable dataloader - * - `DataloaderType.REFERENCE`: Enable only for scalar references - * - `DataloaderType.COLLECTION`: Enable only for collections - * @default DataloaderType.NONE - */ - dataloader: DataloaderType | boolean; - /** - * Determines how where conditions are applied during population. - * - `'all'`: Populate all matching relations (default in v5+) - * - `'infer'`: Infer conditions from the original query (v4 behavior) - * @default 'all' - */ - populateWhere: PopulateHint | `${PopulateHint}`; - /** - * Default flush mode for the entity manager. - * - `'commit'`: Flush only on explicit commit - * - `'auto'`: Flush before queries when needed - * - `'always'`: Always flush before queries - * @default 'auto' - */ - flushMode: FlushMode | `${FlushMode}`; - /** - * Custom base repository class for all entities. - * Entity-specific repositories can still be defined and will take precedence. - * @see https://mikro-orm.io/docs/repositories - */ - entityRepository?: EntityClass>; - /** - * Custom entity manager class to use. - */ - entityManager?: Constructor; - /** - * Read replica connection configurations. - * Each replica can override parts of the main connection options. - * @see https://mikro-orm.io/docs/read-connections - */ - replicas?: ConnectionOptions[]; - /** - * Validate that required properties are set on new entities before insert. - * @default true - */ - validateRequired: boolean; - /** - * Callback to get the current request context's EntityManager. - * Used for automatic context propagation in web frameworks. - * @default RequestContext.getEntityManager - */ - context: (name: string) => EntityManager | undefined; - /** - * Name of the context for multi-ORM setups. - * @default 'default' - */ - contextName: string; - /** - * Allow using the global EntityManager without a request context. - * Not recommended for production - each request should have its own context. - * Can also be set via `MIKRO_ORM_ALLOW_GLOBAL_CONTEXT` environment variable. - * @default false - */ - allowGlobalContext: boolean; - /** - * When enabled, environment variables take precedence over explicitly provided config options. - * By default, explicit options win over env vars. - * @default false - */ - preferEnvVars?: boolean; - /** - * Disable the identity map. - * When disabled, each query returns new entity instances. - * Not recommended for most use cases. - * @default false - */ - disableIdentityMap?: boolean; - /** - * Custom logger function for ORM output. - * @default console.log - */ - logger: (message: string) => void; - /** - * Enable colored output in logs. - * @default true - */ - colors: boolean; - /** - * Factory function to create a custom logger instance. - * @default DefaultLogger.create - */ - loggerFactory?: (options: LoggerOptions) => Logger; - /** - * Threshold in milliseconds for logging slow queries. - * Queries taking at least this long will be logged via the 'slow-query' namespace at warning level. - * Slow query logs are always emitted when the threshold is met, regardless of the `debug` setting. - * Set to `0` to log every query as slow. - * @default undefined (slow query logging disabled) - */ - slowQueryThreshold?: number; - /** - * Factory function to create a custom logger instance for slow queries. - * Has the same shape as `loggerFactory`. When not provided, the main logger instance is used. - * - * Note: slow query log entries are emitted with `context.enabled = true` to bypass the - * debug-mode check. Custom logger implementations must respect `context.enabled` in their - * `isEnabled()` method (as `DefaultLogger` does) to ensure slow query logs are always emitted. - * @default undefined (falls back to main logger) - */ - slowQueryLoggerFactory?: (options: LoggerOptions) => Logger; - /** - * Custom error handler for `em.findOneOrFail()` when no entity is found. - * @param entityName - Name of the entity being queried - * @param where - Query conditions - * @returns Error instance to throw - */ - findOneOrFailHandler: (entityName: string, where: Dictionary | IPrimaryKey) => Error; - /** - * Custom error handler for `em.findExactlyOneOrFail()` when entity count is not exactly one. - * Used when strict mode is enabled. - * @param entityName - Name of the entity being queried - * @param where - Query conditions - * @returns Error instance to throw - */ - findExactlyOneOrFailHandler: (entityName: string, where: Dictionary | IPrimaryKey) => Error; - /** - * Enable debug logging. - * Can be `true` for all namespaces or an array of specific namespaces. - * Available namespaces: `'query'`, `'query-params'`, `'discovery'`, `'info'`. - * @default false - * @see https://mikro-orm.io/docs/logging - */ - debug: boolean | LoggerNamespace[]; - /** - * Ignore deprecation warnings. - * Can be `true` to ignore all or an array of specific deprecation labels. - * @default false - * @see https://mikro-orm.io/docs/logging#deprecation-warnings - */ - ignoreDeprecations: boolean | string[]; - /** - * Syntax highlighter for SQL queries in logs. - * @default NullHighlighter - */ - highlighter: Highlighter; - /** - * Force the ORM to use TypeScript options regardless of detection. - * Uses `entitiesTs` for discovery and `pathTs` for migrations/seeders. - * Should only be used for tests, not production builds. - * @default false - */ - preferTs?: boolean; - /** - * Base directory for resolving relative paths. - * @default process.cwd() - */ - baseDir: string; - /** - * Migration configuration options. - * @see https://mikro-orm.io/docs/migrations - */ - migrations: MigrationsOptions; - /** - * Schema generator configuration options. - */ - schemaGenerator: { - /** - * Try to disable foreign key checks during schema operations. - * @default false - */ - disableForeignKeys?: boolean; - /** - * Try to disable foreign key checks during `schema.clear()`. Enabled by default for MySQL/MariaDB. - */ - disableForeignKeysForClear?: boolean; - /** - * Generate foreign key constraints. - * @default true - */ - createForeignKeyConstraints?: boolean; - /** - * Schema names to ignore when comparing schemas. - * @default [] - */ - ignoreSchema?: string[]; - /** - * Table names or patterns to skip during schema generation. - * @default [] - */ - skipTables?: (string | RegExp)[]; - /** - * View names or patterns to skip during schema generation (e.g. PostGIS system views). - * @default [] - */ - skipViews?: (string | RegExp)[]; - /** - * Column names or patterns to skip during schema generation, keyed by table name. - * @default {} - */ - skipColumns?: Dictionary<(string | RegExp)[]>; - /** - * Database name to use for management operations (e.g., creating/dropping databases). - */ - managementDbName?: string; - /** - * Default ON UPDATE rule for foreign keys. - * When not set, no rule is emitted and the database uses its native default (NO ACTION/RESTRICT). - */ - defaultUpdateRule?: 'cascade' | 'no action' | 'set null' | 'set default' | 'restrict'; - /** - * Default ON DELETE rule for foreign keys. - * When not set, no rule is emitted and the database uses its native default (NO ACTION/RESTRICT). - */ - defaultDeleteRule?: 'cascade' | 'no action' | 'set null' | 'set default' | 'restrict'; - tableSpace?: string; - }; - /** - * Embeddable entity configuration options. - */ - embeddables: { - /** - * Mode for generating column prefixes for embedded properties. - * @default 'relative' - */ - prefixMode: EmbeddedPrefixMode; - }; - /** - * Entity generator (code generation) configuration options. - * @see https://mikro-orm.io/docs/entity-generator - */ - entityGenerator: GenerateOptions; - /** - * Metadata cache configuration for improved startup performance. - * @see https://mikro-orm.io/docs/metadata-cache - */ - metadataCache: { - /** - * Enable metadata caching. - * Defaults based on the metadata provider's `useCache()` method. - */ - enabled?: boolean; - /** - * Combine all metadata into a single cache file. - * Can be `true` for default path or a custom path string. - */ - combined?: boolean | string; - /** - * Pretty print JSON cache files. - * @default false - */ - pretty?: boolean; - /** - * Cache adapter class to use. When cache is enabled, and no adapter is provided explicitly, {@link FileCacheAdapter} is used automatically - but only if you use the async `MikroORM.init()` method. - */ - adapter?: { - new (...params: any[]): SyncCacheAdapter; - }; - /** - * Options passed to the cache adapter constructor. - * @default { cacheDir: process.cwd() + '/temp' } - */ - options?: Dictionary; - }; - /** - * Result cache configuration for query result caching. - */ - resultCache: { - /** - * Default cache expiration time in milliseconds. - * @default 1000 - */ - expiration?: number; - /** - * Cache adapter class to use. - * @default MemoryCacheAdapter - */ - adapter?: { - new (...params: any[]): CacheAdapter; - }; - /** - * Options passed to the cache adapter constructor. - * @default {} - */ - options?: Dictionary; - /** - * Enable global result caching for all queries. - * Can be `true`, an expiration number, or a tuple of `[key, expiration]`. - */ - global?: boolean | number | [string, number]; - }; - /** - * Metadata provider class for entity discovery. - * Built-in options: `ReflectMetadataProvider` (default), `TsMorphMetadataProvider`. - * @default ReflectMetadataProvider - * @see https://mikro-orm.io/docs/metadata-providers - */ - metadataProvider: { - new (config: Configuration): MetadataProvider; - useCache?: MetadataProvider['useCache']; - }; - /** - * Seeder configuration options. - * @see https://mikro-orm.io/docs/seeding - */ - seeder: SeederOptions; - /** - * Prefer read replicas for read operations when available. - * @default true - */ - preferReadReplicas: boolean; - /** - * Custom dynamic import provider for loading modules. - * @default (id) => import(id) - */ - dynamicImportProvider: (id: string) => Promise; -} diff --git a/node_modules/@mikro-orm/core/utils/Configuration.js b/node_modules/@mikro-orm/core/utils/Configuration.js deleted file mode 100644 index 8d89587..0000000 --- a/node_modules/@mikro-orm/core/utils/Configuration.js +++ /dev/null @@ -1,405 +0,0 @@ -import { NullCacheAdapter } from '../cache/NullCacheAdapter.js'; -import { ObjectHydrator } from '../hydration/ObjectHydrator.js'; -import { NullHighlighter } from '../utils/NullHighlighter.js'; -import { DefaultLogger } from '../logging/DefaultLogger.js'; -import { colors } from '../logging/colors.js'; -import { Utils } from '../utils/Utils.js'; -import { MetadataProvider } from '../metadata/MetadataProvider.js'; -import { NotFoundError } from '../errors.js'; -import { RequestContext } from './RequestContext.js'; -import { DataloaderType, FlushMode, LoadStrategy, PopulateHint } from '../enums.js'; -import { MemoryCacheAdapter } from '../cache/MemoryCacheAdapter.js'; -import { EntityComparator } from './EntityComparator.js'; -import { setEnv } from './env-vars.js'; -const DEFAULTS = { - pool: {}, - entities: [], - entitiesTs: [], - extensions: [], - subscribers: [], - filters: {}, - discovery: { - warnWhenNoEntities: true, - checkDuplicateTableNames: true, - checkDuplicateFieldNames: true, - checkDuplicateEntities: true, - checkNonPersistentCompositeProps: true, - inferDefaultValues: true, - }, - validateRequired: true, - context: name => RequestContext.getEntityManager(name), - contextName: 'default', - allowGlobalContext: false, - // eslint-disable-next-line no-console - logger: console.log.bind(console), - colors: true, - findOneOrFailHandler: (entityName, where) => NotFoundError.findOneFailed(entityName, where), - findExactlyOneOrFailHandler: (entityName, where) => NotFoundError.findExactlyOneFailed(entityName, where), - baseDir: globalThis.process?.cwd?.(), - hydrator: ObjectHydrator, - flushMode: FlushMode.AUTO, - loadStrategy: LoadStrategy.BALANCED, - dataloader: DataloaderType.NONE, - populateWhere: PopulateHint.ALL, - ignoreUndefinedInQuery: false, - onQuery: sql => sql, - autoJoinOneToOneOwner: true, - autoJoinRefsForFilters: true, - filtersOnRelations: true, - propagationOnPrototype: true, - populateAfterFlush: true, - serialization: { - includePrimaryKeys: true, - }, - assign: { - updateNestedEntities: true, - updateByPrimaryKey: true, - mergeObjectProperties: false, - mergeEmbeddedProperties: true, - ignoreUndefined: false, - }, - persistOnCreate: true, - upsertManaged: true, - forceEntityConstructor: false, - forceUndefined: false, - forceUtcTimezone: true, - processOnCreateHooksEarly: true, - ensureDatabase: true, - ensureIndexes: false, - batchSize: 300, - debug: false, - ignoreDeprecations: false, - verbose: false, - driverOptions: {}, - migrations: { - tableName: 'mikro_orm_migrations', - glob: '!(*.d).{js,ts,cjs}', - silent: false, - transactional: true, - allOrNothing: true, - dropTables: true, - safe: false, - snapshot: true, - emit: 'ts', - fileName: (timestamp, name) => `Migration${timestamp}${name ? '_' + name : ''}`, - }, - schemaGenerator: { - createForeignKeyConstraints: true, - ignoreSchema: [], - skipTables: [], - skipViews: [], - skipColumns: {}, - }, - embeddables: { - prefixMode: 'relative', - }, - entityGenerator: { - forceUndefined: true, - undefinedDefaults: false, - scalarTypeInDecorator: false, - bidirectionalRelations: true, - identifiedReferences: true, - scalarPropertiesForRelations: 'never', - entityDefinition: 'defineEntity', - decorators: 'legacy', - enumMode: 'dictionary', - /* v8 ignore next */ - fileName: className => className, - onlyPurePivotTables: false, - outputPurePivotTables: false, - readOnlyPivotTables: false, - useCoreBaseEntity: false, - }, - metadataCache: {}, - resultCache: { - adapter: MemoryCacheAdapter, - expiration: 1000, // 1s - options: {}, - }, - metadataProvider: MetadataProvider, - highlighter: new NullHighlighter(), - seeder: { - defaultSeeder: 'DatabaseSeeder', - glob: '!(*.d).{js,ts}', - emit: 'ts', - fileName: className => className, - }, - preferReadReplicas: true, - dynamicImportProvider: /* v8 ignore next */ id => import(id), -}; -/** Holds and validates all ORM configuration options, providing access to drivers, loggers, cache adapters, and other services. */ -export class Configuration { - #options; - #logger; - #slowQueryLogger; - #driver; - #platform; - #cache = new Map(); - #extensions = new Map(); - constructor(options, validate = true) { - if (options.dynamicImportProvider) { - globalThis.dynamicImportProvider = options.dynamicImportProvider; - } - this.#options = Utils.mergeConfig({}, DEFAULTS, options); - if (validate) { - this.validateOptions(); - } - this.#options.loggerFactory ??= DefaultLogger.create; - this.#logger = this.#options.loggerFactory({ - debugMode: this.#options.debug, - ignoreDeprecations: this.#options.ignoreDeprecations, - usesReplicas: (this.#options.replicas?.length ?? 0) > 0, - highlighter: this.#options.highlighter, - writer: this.#options.logger, - }); - const cf = this.#options.compiledFunctions; - if (cf && cf.__version !== Utils.getORMVersion()) { - this.#logger.warn( - 'discovery', - `Compiled functions were generated with MikroORM v${cf.__version ?? 'unknown'}, but the current version is v${Utils.getORMVersion()}. Please regenerate with \`npx mikro-orm compile\`.`, - ); - } - if (this.#options.driver) { - this.#driver = new this.#options.driver(this); - this.#platform = this.#driver.getPlatform(); - this.#platform.setConfig(this); - this.init(validate); - } - } - /** Returns the database platform instance. */ - getPlatform() { - return this.#platform; - } - /** - * Gets specific configuration option. Falls back to specified `defaultValue` if provided. - */ - get(key, defaultValue) { - if (typeof this.#options[key] !== 'undefined') { - return this.#options[key]; - } - return defaultValue; - } - /** Returns all configuration options. */ - getAll() { - return this.#options; - } - /** - * Overrides specified configuration value. - */ - set(key, value) { - this.#options[key] = value; - this.sync(); - } - /** - * Resets the configuration to its default value - */ - reset(key) { - this.#options[key] = DEFAULTS[key]; - } - /** - * Gets Logger instance. - */ - getLogger() { - return this.#logger; - } - /** - * Gets the logger instance for slow queries. - * Falls back to the main logger if no custom slow query logger factory is configured. - */ - getSlowQueryLogger() { - this.#slowQueryLogger ??= - this.#options.slowQueryLoggerFactory?.({ - debugMode: this.#options.debug, - writer: this.#options.logger, - highlighter: this.#options.highlighter, - usesReplicas: (this.#options.replicas?.length ?? 0) > 0, - }) ?? this.#logger; - return this.#slowQueryLogger; - } - /** Returns the configured dataloader type, normalizing boolean values. */ - getDataloaderType() { - if (typeof this.#options.dataloader === 'boolean') { - return this.#options.dataloader ? DataloaderType.ALL : DataloaderType.NONE; - } - return this.#options.dataloader; - } - /** Returns the configured schema name, optionally skipping the platform's default schema. */ - getSchema(skipDefaultSchema = false) { - if (skipDefaultSchema && this.#options.schema === this.#platform.getDefaultSchemaName()) { - return undefined; - } - return this.#options.schema; - } - /** - * Gets current database driver instance. - */ - getDriver() { - return this.#driver; - } - /** Registers a lazily-initialized extension by name. */ - registerExtension(name, cb) { - this.#extensions.set(name, cb); - } - /** Returns a previously registered extension by name, initializing it on first access. */ - getExtension(name) { - if (this.#cache.has(name)) { - return this.#cache.get(name); - } - const ext = this.#extensions.get(name); - /* v8 ignore next */ - if (!ext) { - return undefined; - } - this.#cache.set(name, ext()); - return this.#cache.get(name); - } - /** - * Gets instance of NamingStrategy. (cached) - */ - getNamingStrategy() { - return this.getCachedService(this.#options.namingStrategy || this.#platform.getNamingStrategy()); - } - /** - * Gets instance of Hydrator. (cached) - */ - getHydrator(metadata) { - return this.getCachedService(this.#options.hydrator, metadata, this.#platform, this); - } - /** - * Gets instance of Comparator. (cached) - */ - getComparator(metadata) { - return this.getCachedService(EntityComparator, metadata, this.#platform, this); - } - /** - * Gets instance of MetadataProvider. (cached) - */ - getMetadataProvider() { - return this.getCachedService(this.#options.metadataProvider, this); - } - /** - * Gets instance of metadata CacheAdapter. (cached) - */ - getMetadataCacheAdapter() { - return this.getCachedService( - this.#options.metadataCache.adapter, - this.#options.metadataCache.options, - this.#options.baseDir, - this.#options.metadataCache.pretty, - ); - } - /** - * Gets instance of CacheAdapter for result cache. (cached) - */ - getResultCacheAdapter() { - return this.getCachedService(this.#options.resultCache.adapter, { - expiration: this.#options.resultCache.expiration, - ...this.#options.resultCache.options, - }); - } - /** - * Gets EntityRepository class to be instantiated. - */ - getRepositoryClass(repository) { - if (repository) { - return repository(); - } - if (this.#options.entityRepository) { - return this.#options.entityRepository; - } - return this.#platform.getRepositoryClass(); - } - /** - * Creates instance of given service and caches it. - */ - getCachedService(cls, ...args) { - if (!this.#cache.has(cls.name)) { - this.#cache.set(cls.name, new cls(...args)); - } - return this.#cache.get(cls.name); - } - /** Clears the cached service instances, forcing re-creation on next access. */ - resetServiceCache() { - this.#cache.clear(); - } - init(validate) { - const useCache = this.getMetadataProvider().useCache(); - const metadataCache = this.#options.metadataCache; - if (!useCache) { - metadataCache.adapter = NullCacheAdapter; - } - metadataCache.enabled ??= useCache; - this.#options.clientUrl ??= this.#platform.getDefaultClientUrl(); - this.#options.implicitTransactions ??= this.#platform.usesImplicitTransactions(); - if (validate && metadataCache.enabled && !metadataCache.adapter) { - throw new Error( - 'No metadata cache adapter specified, please fill in `metadataCache.adapter` option or use the async MikroORM.init() method which can autoload it.', - ); - } - try { - const url = new URL(this.#options.clientUrl); - if (url.pathname) { - this.#options.dbName = this.get('dbName', decodeURIComponent(url.pathname).substring(1)); - } - } catch { - const url = /:\/\/.*\/([^?]+)/.exec(this.#options.clientUrl); - if (url) { - this.#options.dbName = this.get('dbName', decodeURIComponent(url[1])); - } - } - if (validate && !this.#options.dbName && this.#options.clientUrl) { - throw new Error("No database specified, `clientUrl` option provided but it's missing the pathname."); - } - this.#options.schema ??= this.#platform.getDefaultSchemaName(); - this.#options.charset ??= this.#platform.getDefaultCharset(); - Object.keys(this.#options.filters).forEach(key => { - this.#options.filters[key].default ??= true; - }); - if (!this.#options.filtersOnRelations) { - this.#options.autoJoinRefsForFilters ??= false; - } - this.#options.subscribers = [...this.#options.subscribers].map(subscriber => { - return subscriber.constructor.name === 'Function' ? new subscriber() : subscriber; - }); - this.sync(); - if (!colors.enabled()) { - this.#options.highlighter = new NullHighlighter(); - } - } - sync() { - setEnv('MIKRO_ORM_COLORS', this.#options.colors); - this.#logger.setDebugMode(this.#options.debug); - this.#slowQueryLogger = undefined; - } - validateOptions() { - /* v8 ignore next */ - if ('type' in this.#options) { - throw new Error( - "The `type` option has been removed in v6, please fill in the `driver` option instead or use `defineConfig` helper (to define your ORM config) or `MikroORM` class (to call the `init` method) exported from the driver package (e.g. `import { defineConfig } from '@mikro-orm/mysql'; export default defineConfig({ ... })`).", - ); - } - if (!this.#options.driver) { - throw new Error( - "No driver specified, please fill in the `driver` option or use `defineConfig` helper (to define your ORM config) or `MikroORM` class (to call the `init` method) exported from the driver package (e.g. `import { defineConfig } from '@mikro-orm/mysql'; export defineConfig({ ... })`).", - ); - } - if (!this.#options.dbName && !this.#options.clientUrl) { - throw new Error('No database specified, please fill in `dbName` or `clientUrl` option'); - } - if (this.#options.entities.length === 0 && this.#options.discovery.warnWhenNoEntities) { - throw new Error('No entities found, please use `entities` option'); - } - if ( - typeof this.#options.driverOptions === 'function' && - this.#options.driverOptions.constructor.name === 'AsyncFunction' - ) { - throw new Error('`driverOptions` callback cannot be async'); - } - } -} -/** - * Type helper to make it easier to use `mikro-orm.config.js`. - */ -export function defineConfig(options) { - return options; -} diff --git a/node_modules/@mikro-orm/core/utils/ConfigurationLoader.d.ts b/node_modules/@mikro-orm/core/utils/ConfigurationLoader.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/@mikro-orm/core/utils/ConfigurationLoader.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/@mikro-orm/core/utils/ConfigurationLoader.js b/node_modules/@mikro-orm/core/utils/ConfigurationLoader.js deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/@mikro-orm/core/utils/ConfigurationLoader.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/@mikro-orm/core/utils/Cursor.d.ts b/node_modules/@mikro-orm/core/utils/Cursor.d.ts deleted file mode 100644 index 3236676..0000000 --- a/node_modules/@mikro-orm/core/utils/Cursor.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -import type { EntityKey, EntityMetadata, FilterObject, Loaded } from '../typings.js'; -import type { FindByCursorOptions, OrderDefinition } from '../drivers/IDatabaseDriver.js'; -import { type QueryOrder } from '../enums.js'; -/** - * As an alternative to the offset-based pagination with `limit` and `offset`, we can paginate based on a cursor. - * A cursor is an opaque string that defines a specific place in ordered entity graph. You can use `em.findByCursor()` - * to access those options. Under the hood, it will call `em.find()` and `em.count()` just like the `em.findAndCount()` - * method, but will use the cursor options instead. - * - * Supports `before`, `after`, `first` and `last` options while disallowing `limit` and `offset`. Explicit `orderBy` option is required. - * - * Use `first` and `after` for forward pagination, or `last` and `before` for backward pagination. - * - * - `first` and `last` are numbers and serve as an alternative to `offset`, those options are mutually exclusive, use only one at a time - * - `before` and `after` specify the previous cursor value - * - * ```ts - * const currentCursor = await em.findByCursor(User, {}, { - * first: 10, - * after: previousCursor, // can be either string or `Cursor` instance - * orderBy: { id: 'desc' }, - * }); - * - * // to fetch next page - * const nextCursor = await em.findByCursor(User, {}, { - * first: 10, - * after: currentCursor.endCursor, // or currentCursor.endCursor - * orderBy: { id: 'desc' }, - * }); - * ``` - * - * The `Cursor` object provides the following interface: - * - * ```ts - * Cursor { - * items: [ - * User { ... }, - * User { ... }, - * User { ... }, - * ... - * ], - * totalCount: 50, - * length: 10, - * startCursor: 'WzRd', - * endCursor: 'WzZd', - * hasPrevPage: true, - * hasNextPage: true, - * } - * ``` - */ -export declare class Cursor< - Entity extends object, - Hint extends string = never, - Fields extends string = '*', - Excludes extends string = never, - IncludeCount extends boolean = true, -> { - #private; - readonly items: Loaded[]; - readonly totalCount: IncludeCount extends true ? number : undefined; - readonly hasPrevPage: boolean; - readonly hasNextPage: boolean; - constructor( - items: Loaded[], - totalCount: IncludeCount extends true ? number : undefined, - options: FindByCursorOptions, - meta: EntityMetadata, - ); - get startCursor(): string | null; - get endCursor(): string | null; - /** - * Computes the cursor value for a given entity. - */ - from(entity: Entity | Loaded): string; - [Symbol.iterator](): IterableIterator>; - get length(): number; - /** - * Computes the cursor value for given entity and order definition. - */ - static for( - meta: EntityMetadata, - entity: FilterObject, - orderBy: OrderDefinition, - ): string; - static encode(value: unknown[]): string; - static decode(value: string): unknown[]; - static getDefinition( - meta: EntityMetadata, - orderBy: OrderDefinition, - ): [EntityKey, QueryOrder][]; -} diff --git a/node_modules/@mikro-orm/core/utils/Cursor.js b/node_modules/@mikro-orm/core/utils/Cursor.js deleted file mode 100644 index 1c94b78..0000000 --- a/node_modules/@mikro-orm/core/utils/Cursor.js +++ /dev/null @@ -1,196 +0,0 @@ -import { Utils } from './Utils.js'; -import { ReferenceKind } from '../enums.js'; -import { Reference } from '../entity/Reference.js'; -import { helper } from '../entity/wrap.js'; -import { Raw } from '../utils/RawQueryFragment.js'; -import { CursorError } from '../errors.js'; -import { inspect } from '../logging/inspect.js'; -/** - * As an alternative to the offset-based pagination with `limit` and `offset`, we can paginate based on a cursor. - * A cursor is an opaque string that defines a specific place in ordered entity graph. You can use `em.findByCursor()` - * to access those options. Under the hood, it will call `em.find()` and `em.count()` just like the `em.findAndCount()` - * method, but will use the cursor options instead. - * - * Supports `before`, `after`, `first` and `last` options while disallowing `limit` and `offset`. Explicit `orderBy` option is required. - * - * Use `first` and `after` for forward pagination, or `last` and `before` for backward pagination. - * - * - `first` and `last` are numbers and serve as an alternative to `offset`, those options are mutually exclusive, use only one at a time - * - `before` and `after` specify the previous cursor value - * - * ```ts - * const currentCursor = await em.findByCursor(User, {}, { - * first: 10, - * after: previousCursor, // can be either string or `Cursor` instance - * orderBy: { id: 'desc' }, - * }); - * - * // to fetch next page - * const nextCursor = await em.findByCursor(User, {}, { - * first: 10, - * after: currentCursor.endCursor, // or currentCursor.endCursor - * orderBy: { id: 'desc' }, - * }); - * ``` - * - * The `Cursor` object provides the following interface: - * - * ```ts - * Cursor { - * items: [ - * User { ... }, - * User { ... }, - * User { ... }, - * ... - * ], - * totalCount: 50, - * length: 10, - * startCursor: 'WzRd', - * endCursor: 'WzZd', - * hasPrevPage: true, - * hasNextPage: true, - * } - * ``` - */ -export class Cursor { - items; - totalCount; - hasPrevPage; - hasNextPage; - #definition; - constructor(items, totalCount, options, meta) { - this.items = items; - this.totalCount = totalCount; - const { first, last, before, after, orderBy, overfetch } = options; - const limit = first ?? last; - const isLast = !first && !!last; - const hasMorePages = !!overfetch && limit != null && items.length > limit; - this.hasPrevPage = isLast ? hasMorePages : !!after; - this.hasNextPage = isLast ? !!before : hasMorePages; - if (hasMorePages) { - if (isLast) { - items.shift(); - } else { - items.pop(); - } - } - this.#definition = Cursor.getDefinition(meta, orderBy); - } - get startCursor() { - if (this.items.length === 0) { - return null; - } - return this.from(this.items[0]); - } - get endCursor() { - if (this.items.length === 0) { - return null; - } - return this.from(this.items[this.items.length - 1]); - } - /** - * Computes the cursor value for a given entity. - */ - from(entity) { - const processEntity = (entity, prop, direction, object = false) => { - if (Utils.isPlainObject(direction)) { - const unwrapped = Reference.unwrapReference(entity[prop]); - // Check if the relation is loaded - for nested properties, undefined means not populated - if (Utils.isEntity(unwrapped) && !helper(unwrapped).isInitialized()) { - throw CursorError.entityNotPopulated(entity, prop); - } - return Utils.keys(direction).reduce((o, key) => { - Object.assign(o, processEntity(unwrapped, key, direction[key], true)); - return o; - }, {}); - } - let value = entity[prop]; - // Allow null/undefined values in cursor - they will be handled in createCursorCondition - // undefined can occur with forceUndefined config option which converts null to undefined - if (value == null) { - return object ? { [prop]: null } : null; - } - if (Utils.isEntity(value, true)) { - value = helper(value).getPrimaryKey(); - } - if (Utils.isScalarReference(value)) { - value = value.unwrap(); - } - if (object) { - return { [prop]: value }; - } - return value; - }; - const value = this.#definition.map(([key, direction]) => processEntity(entity, key, direction)); - return Cursor.encode(value); - } - *[Symbol.iterator]() { - for (const item of this.items) { - yield item; - } - } - get length() { - return this.items.length; - } - /** - * Computes the cursor value for given entity and order definition. - */ - static for(meta, entity, orderBy) { - const definition = this.getDefinition(meta, orderBy); - return Cursor.encode( - definition.map(([key]) => { - const value = entity[key]; - if (value === undefined) { - throw CursorError.missingValue(meta.className, key); - } - return value; - }), - ); - } - static encode(value) { - return Buffer.from(JSON.stringify(value)).toString('base64url'); - } - static decode(value) { - return JSON.parse(Buffer.from(value, 'base64url').toString('utf8')).map(value => { - if (typeof value === 'string' && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}/.exec(value)) { - return new Date(value); - } - return value; - }); - } - static getDefinition(meta, orderBy) { - return Utils.asArray(orderBy).flatMap(order => { - const ret = []; - for (const key of Utils.getObjectQueryKeys(order)) { - if (Raw.isKnownFragmentSymbol(key)) { - ret.push([key, order[key]]); - continue; - } - const prop = meta.properties[key]; - /* v8 ignore next */ - if ( - !prop || - !( - [ReferenceKind.SCALAR, ReferenceKind.EMBEDDED, ReferenceKind.MANY_TO_ONE].includes(prop.kind) || - (prop.kind === ReferenceKind.ONE_TO_ONE && prop.owner) - ) - ) { - continue; - } - ret.push([prop.name, order[prop.name]]); - } - return ret; - }); - } - /** @ignore */ - /* v8 ignore next */ - [Symbol.for('nodejs.util.inspect.custom')]() { - const type = this.items[0]?.constructor.name; - const { items, startCursor, endCursor, hasPrevPage, hasNextPage, totalCount, length } = this; - const options = inspect( - { startCursor, endCursor, totalCount, hasPrevPage, hasNextPage, items, length }, - { depth: 0 }, - ); - return `Cursor${type ? `<${type}>` : ''} ${options.replace('items: [Array]', 'items: [...]')}`; - } -} diff --git a/node_modules/@mikro-orm/core/utils/DataloaderUtils.d.ts b/node_modules/@mikro-orm/core/utils/DataloaderUtils.d.ts deleted file mode 100644 index 831da88..0000000 --- a/node_modules/@mikro-orm/core/utils/DataloaderUtils.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -import type { Constructor, Primary, Ref } from '../typings.js'; -import { Collection, type InitCollectionOptions } from '../entity/Collection.js'; -import { type EntityManager } from '../EntityManager.js'; -import { type LoadReferenceOptions } from '../entity/Reference.js'; -type BatchLoadFn = (keys: readonly K[]) => PromiseLike>; -export declare class DataloaderUtils { - private static DataLoader?; - /** - * Groups identified references by entity and returns a Map with the - * class name as the index and the corresponding primary keys as the value. - */ - static groupPrimaryKeysByEntityAndOpts( - refsWithOpts: readonly [Ref, Omit, 'dataloader'>?][], - ): Map>>; - /** - * Returns the reference dataloader batchLoadFn, which aggregates references by entity, - * makes one query per entity and maps each input reference to the corresponding result. - */ - static getRefBatchLoadFn( - em: EntityManager, - ): BatchLoadFn<[Ref, Omit, 'dataloader'>?], any>; - /** - * Groups collections by entity and returns a Map whose keys are the entity names and whose values are filter Maps - * which we can use to narrow down the find query to return just the items of the collections that have been dataloaded. - * The entries of the filter Map will be used as the values of an $or operator so we end up with a query per entity. - */ - static groupInversedOrMappedKeysByEntityAndOpts( - collsWithOpts: readonly [Collection, Omit, 'dataloader'>?][], - ): Map>>>; - /** - * Turn the entity+options map into actual queries. - * The keys are the entity names + a stringified version of the options and the values are filter Maps which will be used as the values of an $or operator so we end up with a query per entity+opts. - * We must populate the inverse side of the relationship in order to be able to later retrieve the PK(s) from its item(s). - * Together with the query the promises will also return the key which can be used to narrow down the results pertaining to a certain set of options. - */ - static entitiesAndOptsMapToQueries( - entitiesAndOptsMap: Map>>>, - em: EntityManager, - ): Promise<[string, any[]]>[]; - /** - * Creates a filter which returns the results pertaining to a certain collection. - * First checks if the Entity type matches, then retrieves the inverse side of the relationship - * where the filtering will be done in order to match the target collection. - */ - static getColFilter(collection: Collection): (result: T) => result is S; - /** - * Returns the 1:M collection dataloader batchLoadFn, which aggregates collections by entity, - * makes one query per entity and maps each input collection to the corresponding result. - */ - static getColBatchLoadFn( - em: EntityManager, - ): BatchLoadFn<[Collection, Omit, 'dataloader'>?], any>; - /** - * Returns the M:N collection dataloader batchLoadFn, which aggregates collections by entity, - * makes one query per entity and maps each input collection to the corresponding result. - */ - static getManyToManyColBatchLoadFn( - em: EntityManager, - ): BatchLoadFn<[Collection, Omit, 'dataloader'>?], any>; - static getDataLoader(): Promise< - Constructor<{ - load: (...args: unknown[]) => Promise; - }> - >; -} -export {}; diff --git a/node_modules/@mikro-orm/core/utils/DataloaderUtils.js b/node_modules/@mikro-orm/core/utils/DataloaderUtils.js deleted file mode 100644 index 1d29d90..0000000 --- a/node_modules/@mikro-orm/core/utils/DataloaderUtils.js +++ /dev/null @@ -1,238 +0,0 @@ -import { Collection } from '../entity/Collection.js'; -import { helper } from '../entity/wrap.js'; -import { Reference } from '../entity/Reference.js'; -import { Utils } from './Utils.js'; -export class DataloaderUtils { - static DataLoader; - /** - * Groups identified references by entity and returns a Map with the - * class name as the index and the corresponding primary keys as the value. - */ - static groupPrimaryKeysByEntityAndOpts(refsWithOpts) { - const map = new Map(); - for (const [ref, opts] of refsWithOpts) { - /* The key is a combination of the uniqueName (a unique table name based identifier) and a stringified version if the load options because we want - to map each combination of entities/options into separate find queries in order to return accurate results. - This could be further optimized finding the "lowest common denominator" among the different options - for each Entity and firing a single query for each Entity instead of Entity+options combination. - The former is the approach taken by the out-of-tree "find" dataloader: https://github.com/darkbasic/mikro-orm-dataloaders - In real-world scenarios (GraphQL) most of the time you will end up batching the same sets of options anyway, - so we end up getting most of the benefits with the much simpler implementation. - Also there are scenarios where the single query per entity implementation may end up being slower, for example - if the vast majority of the references batched for a certain entity don't have populate options while a few ones have - a wildcard populate so you end up doing the additional joins for all the entities. - Thus such approach should probably be configurable, if not opt-in. - NOTE: meta + opts multi maps (https://github.com/martian17/ds-js) might be a more elegant way - to implement this but not necessarily faster. */ - const key = `${helper(ref).__meta.uniqueName}|${JSON.stringify(opts ?? {})}`; - let primaryKeysSet = map.get(key); - if (primaryKeysSet == null) { - primaryKeysSet = new Set(); - map.set(key, primaryKeysSet); - } - primaryKeysSet.add(helper(ref).getPrimaryKey()); - } - return map; - } - /** - * Returns the reference dataloader batchLoadFn, which aggregates references by entity, - * makes one query per entity and maps each input reference to the corresponding result. - */ - static getRefBatchLoadFn(em) { - return async refsWithOpts => { - const groupedIdsMap = DataloaderUtils.groupPrimaryKeysByEntityAndOpts(refsWithOpts); - const promises = Array.from(groupedIdsMap).map(([key, idsSet]) => { - const uniqueName = key.substring(0, key.indexOf('|')); - const opts = JSON.parse(key.substring(key.indexOf('|') + 1)); - const meta = em.getMetadata().getByUniqueName(uniqueName); - return em.find(meta.class, Array.from(idsSet), opts); - }); - await Promise.all(promises); - /* Instead of assigning each find result to the original reference we use a shortcut - which takes advantage of the already existing Mikro-ORM caching mechanism: - when it calls ref.unwrap it will automatically retrieve the entity - from the cache (it will hit the cache because of the previous find query). - This trick won't be possible for collections where we will be forced to map the results. */ - return refsWithOpts.map(([ref]) => ref.unwrap()); - }; - } - /** - * Groups collections by entity and returns a Map whose keys are the entity names and whose values are filter Maps - * which we can use to narrow down the find query to return just the items of the collections that have been dataloaded. - * The entries of the filter Map will be used as the values of an $or operator so we end up with a query per entity. - */ - static groupInversedOrMappedKeysByEntityAndOpts(collsWithOpts) { - const entitiesMap = new Map(); - for (const [col, opts] of collsWithOpts) { - /* - We first get the entity name of the Collection and together with its options (see groupPrimaryKeysByEntityAndOpts - for a full explanation) we use it as the key of the first Map. - With that we know that we have to look for entities of this type (and with the same options) in order to fulfill the collection. - The value is another Map which we can use to filter the find query to get results pertaining to the collections that have been dataloaded: - its keys are the props we are going to filter to and its values are the corresponding PKs. - */ - const key = `${col.property.targetMeta.uniqueName}|${JSON.stringify(opts ?? {})}`; - let filterMap = entitiesMap.get(key); // We are going to use this map to filter the entities pertaining to the collections that have been dataloaded. - if (filterMap == null) { - filterMap = new Map(); - entitiesMap.set(key, filterMap); - } - // The Collection dataloader relies on the inverse side of the relationship (inversedBy/mappedBy), which is going to be - // the key of the filter Map and it's the prop that we use to filter the results pertaining to the Collection. - const inversedProp = col.property.inversedBy ?? col.property.mappedBy; // Many to Many vs One to Many - let primaryKeys = filterMap.get(inversedProp); - if (primaryKeys == null) { - primaryKeys = new Set(); - filterMap.set(inversedProp, primaryKeys); - } - // This is the PK that in conjunction with the filter Map key (the prop) will lead to this specific Collection - primaryKeys.add(helper(col.owner).getPrimaryKey()); - } - return entitiesMap; - } - /** - * Turn the entity+options map into actual queries. - * The keys are the entity names + a stringified version of the options and the values are filter Maps which will be used as the values of an $or operator so we end up with a query per entity+opts. - * We must populate the inverse side of the relationship in order to be able to later retrieve the PK(s) from its item(s). - * Together with the query the promises will also return the key which can be used to narrow down the results pertaining to a certain set of options. - */ - static entitiesAndOptsMapToQueries(entitiesAndOptsMap, em) { - return Array.from(entitiesAndOptsMap, async ([key, filterMap]) => { - const uniqueName = key.substring(0, key.indexOf('|')); - const opts = JSON.parse(key.substring(key.indexOf('|') + 1)); - const meta = em.getMetadata().getByUniqueName(uniqueName); - const res = await em.find( - meta.class, - opts?.where != null && Object.keys(opts.where).length > 0 - ? { - $and: [ - { - $or: Array.from(filterMap.entries()).map(([prop, pks]) => { - return { [prop]: Array.from(pks) }; - }), - }, - opts.where, - ], - } - : { - // The entries of the filter Map will be used as the values of the $or operator - $or: Array.from(filterMap.entries()).map(([prop, pks]) => { - return { [prop]: Array.from(pks) }; - }), - }, - { - ...opts, - // We need to populate the inverse side of the relationship in order to be able to later retrieve the PK(s) from its item(s) - populate: [ - ...(opts.populate === false ? [] : (opts.populate ?? [])), - ...Array.from(filterMap.keys()).filter( - // We need to do so only if the inverse side is a collection, because we can already retrieve the PK from a reference without having to load it - prop => meta.properties[prop]?.ref !== true, - ), - ], - }, - ); - return [key, res]; - }); - } - /** - * Creates a filter which returns the results pertaining to a certain collection. - * First checks if the Entity type matches, then retrieves the inverse side of the relationship - * where the filtering will be done in order to match the target collection. - */ - static getColFilter(collection) { - return result => { - // There is no need to check if Entity matches because we already matched the key which is entity+options. - // This is the inverse side of the relationship where the filtering will be done in order to match the target collection - // Either inversedBy or mappedBy exist because we already checked in groupInversedOrMappedKeysByEntity - const inverseProp = collection.property.inversedBy ?? collection.property.mappedBy; - const target = Reference.unwrapReference(result[inverseProp]); - if (target instanceof Collection) { - for (const item of target) { - if (item === collection.owner) { - return true; - } - } - } else if (target) { - return target === collection.owner; - } - return false; - }; - } - /** - * Returns the 1:M collection dataloader batchLoadFn, which aggregates collections by entity, - * makes one query per entity and maps each input collection to the corresponding result. - */ - static getColBatchLoadFn(em) { - return async collsWithOpts => { - const entitiesAndOptsMap = DataloaderUtils.groupInversedOrMappedKeysByEntityAndOpts(collsWithOpts); - const promises = DataloaderUtils.entitiesAndOptsMapToQueries(entitiesAndOptsMap, em); - const resultsMap = new Map(await Promise.all(promises)); - // We need to filter the results in order to map each input collection - // to a subset of each query matching the collection items. - return collsWithOpts.map(([col, opts]) => { - const key = `${col.property.targetMeta.uniqueName}|${JSON.stringify(opts ?? {})}`; - const entities = resultsMap.get(key); - if (entities == null) { - // Should never happen - /* v8 ignore next */ - throw new Error('Cannot match results'); - } - return entities.filter(DataloaderUtils.getColFilter(col)); - }); - }; - } - /** - * Returns the M:N collection dataloader batchLoadFn, which aggregates collections by entity, - * makes one query per entity and maps each input collection to the corresponding result. - */ - static getManyToManyColBatchLoadFn(em) { - return async collsWithOpts => { - const groups = new Map(); - for (const [col, opts] of collsWithOpts) { - const key = `${col.property.targetMeta.uniqueName}.${col.property.name}|${JSON.stringify(opts ?? {})}`; - const value = groups.get(key) ?? []; - value.push([col, opts ?? {}]); - groups.set(key, value); - } - const ret = []; - for (const group of groups.values()) { - const prop = group[0][0].property; - const options = {}; - const wrap = cond => ({ [prop.name]: cond }); - const orderBy = Utils.asArray(group[0][1]?.orderBy).map(o => wrap(o)); - const populate = wrap(group[0][1]?.populate); - const owners = group.map(c => c[0].owner); - const $or = []; - // a bit of a hack, but we need to prefix the key, since we have only a column name, not a property name - const alias = em.config.getNamingStrategy().aliasName(Utils.className(prop.pivotEntity), 0); - const fk = `${alias}.${Utils.getPrimaryKeyHash(prop.joinColumns)}`; - for (const c of group) { - $or.push({ $and: [c[1]?.where ?? {}, { [fk]: c[0].owner }] }); - options.refresh ??= c[1]?.refresh; - } - options.where = wrap({ $or }); - const r = await em - .getEntityLoader() - .findChildrenFromPivotTable(owners, prop, options, orderBy, populate, group[0][1]?.ref); - ret.push(...r); - } - return ret; - }; - } - static async getDataLoader() { - if (this.DataLoader) { - return this.DataLoader; - } - try { - const mod = await import('dataloader'); - const DataLoader = mod.default; - return (this.DataLoader ??= DataLoader); - } catch { - /* v8 ignore next */ - throw new Error( - "DataLoader is not found, make sure `dataloader` package is installed in your project's dependencies.", - ); - } - } -} diff --git a/node_modules/@mikro-orm/core/utils/EntityComparator.d.ts b/node_modules/@mikro-orm/core/utils/EntityComparator.d.ts deleted file mode 100644 index 47acedf..0000000 --- a/node_modules/@mikro-orm/core/utils/EntityComparator.d.ts +++ /dev/null @@ -1,110 +0,0 @@ -import type { - EntityData, - EntityDictionary, - EntityMetadata, - EntityName, - EntityProperty, - IMetadataStorage, - Primary, -} from '../typings.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { Configuration } from './Configuration.js'; -type Comparator = ( - a: T, - b: T, - options?: { - includeInverseSides?: boolean; - }, -) => EntityData; -type ResultMapper = (result: EntityData) => EntityData | null; -type SnapshotGenerator = (entity: T) => EntityData; -type PkGetter = (entity: T) => Primary; -type PkSerializer = (entity: T) => string; -type CompositeKeyPart = string | CompositeKeyPart[]; -/** @internal Generates and caches JIT-compiled functions for comparing, snapshotting, and mapping entity data. */ -export declare class EntityComparator { - #private; - constructor(metadata: IMetadataStorage, platform: Platform, config?: Configuration); - /** - * Computes difference between two entities. - */ - diffEntities( - entityName: EntityName, - a: EntityData, - b: EntityData, - options?: { - includeInverseSides?: boolean; - }, - ): EntityData; - /** Returns true if two entity snapshots are identical (no differences). */ - matching(entityName: EntityName, a: EntityData, b: EntityData): boolean; - /** - * Removes ORM specific code from entities and prepares it for serializing. Used before change set computation. - * References will be mapped to primary keys, collections to arrays of primary keys. - */ - prepareEntity(entity: T): EntityData; - /** - * Maps database columns to properties. - */ - mapResult(meta: EntityMetadata, result: EntityDictionary): EntityData; - /** - * @internal Highly performance-sensitive method. - */ - getPkGetter(meta: EntityMetadata): PkGetter; - /** - * @internal Highly performance-sensitive method. - */ - getPkGetterConverted(meta: EntityMetadata): PkGetter; - /** - * @internal Highly performance-sensitive method. - */ - getPkSerializer(meta: EntityMetadata): PkSerializer; - /** - * @internal Highly performance-sensitive method. - */ - getSnapshotGenerator(entityName: EntityName): SnapshotGenerator; - /** - * @internal - */ - propName(name: string, parent?: string): string; - /** - * @internal respects nested composite keys, e.g. `[1, [2, 3]]` - */ - createCompositeKeyArray(prop: EntityProperty, parents?: EntityProperty[]): string; - /** - * @internal - */ - formatCompositeKeyPart(part: CompositeKeyPart): string; - /** - * @internal Highly performance-sensitive method. - */ - getResultMapper(meta: EntityMetadata): ResultMapper; - private getPropertyCondition; - private getEmbeddedArrayPropertySnapshot; - /** - * we need to serialize only object embeddables, and only the top level ones, so root object embeddable - * properties and first child nested object embeddables with inlined parent - */ - private shouldSerialize; - private getEmbeddedPropertySnapshot; - private registerCustomType; - private getPropertySnapshot; - /** - * @internal Highly performance-sensitive method. - */ - getEntityComparator(entityName: EntityName): Comparator; - private getGenericComparator; - private getPropertyComparator; - private wrap; - private safeKey; - /** - * Sets the toArray helper in the context if not already set. - * Used for converting composite PKs to arrays. - */ - private setToArrayHelper; - /** - * perf: used to generate list of comparable properties during discovery, so we speed up the runtime comparison - */ - static isComparable(prop: EntityProperty, root: EntityMetadata): boolean; -} -export {}; diff --git a/node_modules/@mikro-orm/core/utils/EntityComparator.js b/node_modules/@mikro-orm/core/utils/EntityComparator.js deleted file mode 100644 index f06cbf4..0000000 --- a/node_modules/@mikro-orm/core/utils/EntityComparator.js +++ /dev/null @@ -1,843 +0,0 @@ -import { clone } from './clone.js'; -import { ReferenceKind } from '../enums.js'; -import { - compareArrays, - compareBooleans, - compareBuffers, - compareObjects, - equals, - parseJsonSafe, - Utils, -} from './Utils.js'; -import { JsonType } from '../types/JsonType.js'; -import { Raw } from './RawQueryFragment.js'; -import { EntityIdentifier } from '../entity/EntityIdentifier.js'; -import { PolymorphicRef } from '../entity/PolymorphicRef.js'; -/** @internal Generates and caches JIT-compiled functions for comparing, snapshotting, and mapping entity data. */ -export class EntityComparator { - #comparators = new Map(); - #mappers = new Map(); - #snapshotGenerators = new Map(); - #pkGetters = new Map(); - #pkGettersConverted = new Map(); - #pkSerializers = new Map(); - #tmpIndex = 0; - #metadata; - #platform; - #config; - constructor(metadata, platform, config) { - this.#metadata = metadata; - this.#platform = platform; - this.#config = config; - } - /** - * Computes difference between two entities. - */ - diffEntities(entityName, a, b, options) { - const comparator = this.getEntityComparator(entityName); - return Utils.callCompiledFunction(comparator, a, b, options); - } - /** Returns true if two entity snapshots are identical (no differences). */ - matching(entityName, a, b) { - const diff = this.diffEntities(entityName, a, b); - return Utils.getObjectKeysSize(diff) === 0; - } - /** - * Removes ORM specific code from entities and prepares it for serializing. Used before change set computation. - * References will be mapped to primary keys, collections to arrays of primary keys. - */ - prepareEntity(entity) { - const generator = this.getSnapshotGenerator(entity.constructor); - return Utils.callCompiledFunction(generator, entity); - } - /** - * Maps database columns to properties. - */ - mapResult(meta, result) { - const mapper = this.getResultMapper(meta); - return Utils.callCompiledFunction(mapper, result); - } - /** - * @internal Highly performance-sensitive method. - */ - getPkGetter(meta) { - const exists = this.#pkGetters.get(meta); - /* v8 ignore next */ - if (exists) { - return exists; - } - const lines = []; - const context = new Map(); - if (meta.primaryKeys.length > 1) { - lines.push(` const cond = {`); - meta.primaryKeys.forEach(pk => { - if (meta.properties[pk].kind !== ReferenceKind.SCALAR) { - lines.push( - ` ${pk}: (entity${this.wrap(pk)} != null && (entity${this.wrap(pk)}.__entity || entity${this.wrap(pk)}.__reference)) ? entity${this.wrap(pk)}.__helper.getPrimaryKey() : entity${this.wrap(pk)},`, - ); - } else { - lines.push(` ${pk}: entity${this.wrap(pk)},`); - } - }); - lines.push(` };`); - lines.push(` if (${meta.primaryKeys.map(pk => `cond.${pk} == null`).join(' || ')}) return null;`); - lines.push(` return cond;`); - } else { - const pk = meta.primaryKeys[0]; - if (meta.properties[pk].kind !== ReferenceKind.SCALAR) { - lines.push( - ` if (entity${this.wrap(pk)} != null && (entity${this.wrap(pk)}.__entity || entity${this.wrap(pk)}.__reference)) {`, - ); - lines.push(` const pk = entity${this.wrap(pk)}.__helper.getPrimaryKey();`); - if (meta.properties[pk].targetMeta.compositePK) { - lines.push(` if (typeof pk === 'object' && pk != null) {`); - lines.push(` return [`); - for (const childPK of meta.properties[pk].targetMeta.primaryKeys) { - lines.push(` pk${this.wrap(childPK)},`); - } - lines.push(` ];`); - lines.push(` }`); - } - lines.push(` return pk;`); - lines.push(` }`); - } - lines.push(` return entity${this.wrap(pk)};`); - } - const code = - `// compiled pk getter for entity ${meta.className}\n` + `return function(entity) {\n${lines.join('\n')}\n}`; - const fnKey = `pkGetter-${meta.uniqueName}`; - const pkSerializer = Utils.createFunction(context, code, this.#config?.get('compiledFunctions'), fnKey); - this.#pkGetters.set(meta, pkSerializer); - return pkSerializer; - } - /** - * @internal Highly performance-sensitive method. - */ - getPkGetterConverted(meta) { - const exists = this.#pkGettersConverted.get(meta); - /* v8 ignore next */ - if (exists) { - return exists; - } - const lines = []; - const context = new Map(); - if (meta.primaryKeys.length > 1) { - lines.push(` const cond = {`); - meta.primaryKeys.forEach(pk => { - if (meta.properties[pk].kind !== ReferenceKind.SCALAR) { - lines.push( - ` ${pk}: (entity${this.wrap(pk)} != null && (entity${this.wrap(pk)}.__entity || entity${this.wrap(pk)}.__reference)) ? entity${this.wrap(pk)}.__helper.getPrimaryKey(true) : entity${this.wrap(pk)},`, - ); - } else { - if (meta.properties[pk].customType) { - const convertorKey = this.registerCustomType(meta.properties[pk], context); - lines.push(` ${pk}: convertToDatabaseValue_${convertorKey}(entity${this.wrap(pk)}),`); - } else { - lines.push(` ${pk}: entity${this.wrap(pk)},`); - } - } - }); - lines.push(` };`); - lines.push(` if (${meta.primaryKeys.map(pk => `cond.${pk} == null`).join(' || ')}) return null;`); - lines.push(` return cond;`); - } else { - const pk = meta.primaryKeys[0]; - if (meta.properties[pk].kind !== ReferenceKind.SCALAR) { - lines.push( - ` if (entity${this.wrap(pk)} != null && (entity${this.wrap(pk)}.__entity || entity${this.wrap(pk)}.__reference)) return entity${this.wrap(pk)}.__helper.getPrimaryKey(true);`, - ); - } - if (meta.properties[pk].customType) { - const convertorKey = this.registerCustomType(meta.properties[pk], context); - lines.push(` return convertToDatabaseValue_${convertorKey}(entity${this.wrap(pk)});`); - } else { - lines.push(` return entity${this.wrap(pk)};`); - } - } - const code = - `// compiled pk getter (with converted custom types) for entity ${meta.className}\n` + - `return function(entity) {\n${lines.join('\n')}\n}`; - const fnKey = `pkGetterConverted-${meta.uniqueName}`; - const pkSerializer = Utils.createFunction(context, code, this.#config?.get('compiledFunctions'), fnKey); - this.#pkGettersConverted.set(meta, pkSerializer); - return pkSerializer; - } - /** - * @internal Highly performance-sensitive method. - */ - getPkSerializer(meta) { - const exists = this.#pkSerializers.get(meta); - /* v8 ignore next */ - if (exists) { - return exists; - } - const lines = []; - const context = new Map(); - context.set('getCompositeKeyValue', val => - Utils.flatten(Utils.getCompositeKeyValue(val, meta, 'convertToDatabaseValue', this.#platform)), - ); - context.set('getPrimaryKeyHash', val => Utils.getPrimaryKeyHash(Utils.asArray(val))); - if (meta.primaryKeys.length > 1) { - lines.push(` const pks = entity.__helper.__pk ? getCompositeKeyValue(entity.__helper.__pk) : [`); - meta.primaryKeys.forEach(pk => { - if (meta.properties[pk].kind !== ReferenceKind.SCALAR) { - lines.push( - ` (entity${this.wrap(pk)} != null && (entity${this.wrap(pk)}.__entity || entity${this.wrap(pk)}.__reference)) ? entity${this.wrap(pk)}.__helper.getSerializedPrimaryKey() : entity${this.wrap(pk)},`, - ); - } else { - lines.push(` entity${this.wrap(pk)},`); - } - }); - lines.push(` ];`); - lines.push(` return pks.join('${Utils.PK_SEPARATOR}');`); - } else { - const pk = meta.primaryKeys[0]; - const prop = meta.properties[pk]; - if (prop.kind !== ReferenceKind.SCALAR) { - lines.push( - ` if (entity${this.wrap(pk)} != null && (entity${this.wrap(pk)}.__entity || entity${this.wrap(pk)}.__reference)) return entity${this.wrap(pk)}.__helper.getSerializedPrimaryKey();`, - ); - } - const serializedPrimaryKey = meta.props.find(p => p.serializedPrimaryKey); - if (serializedPrimaryKey) { - lines.push(` return '' + entity.${serializedPrimaryKey.name};`); - } else if (prop.customType) { - const convertorKey = this.registerCustomType(meta.properties[pk], context); - const idx = this.#tmpIndex++; - lines.push(` const val_${idx} = convertToDatabaseValue_${convertorKey}(entity${this.wrap(pk)});`); - lines.push(` return getPrimaryKeyHash(val_${idx});`); - } else { - lines.push(` return '' + entity${this.wrap(pk)};`); - } - } - const code = - `// compiled pk serializer for entity ${meta.className}\n` + `return function(entity) {\n${lines.join('\n')}\n}`; - const fnKey = `pkSerializer-${meta.uniqueName}`; - const pkSerializer = Utils.createFunction(context, code, this.#config?.get('compiledFunctions'), fnKey); - this.#pkSerializers.set(meta, pkSerializer); - return pkSerializer; - } - /** - * @internal Highly performance-sensitive method. - */ - getSnapshotGenerator(entityName) { - const meta = this.#metadata.find(entityName); - const exists = this.#snapshotGenerators.get(meta); - if (exists) { - return exists; - } - const lines = []; - const context = new Map(); - context.set('clone', clone); - context.set('cloneEmbeddable', o => this.#platform.cloneEmbeddable(o)); // do not clone prototypes - if (meta.root.inheritanceType === 'sti' && meta.discriminatorValue) { - lines.push(` ret${this.wrap(meta.root.discriminatorColumn)} = '${meta.discriminatorValue}'`); - } - const getRootProperty = prop => (prop.embedded ? getRootProperty(meta.properties[prop.embedded[0]]) : prop); - // copy all comparable props, ignore collections and references, process custom types - meta.comparableProps - .filter(prop => { - const root = getRootProperty(prop); - return prop === root || root.kind !== ReferenceKind.EMBEDDED; - }) - .forEach(prop => - lines.push( - this.getPropertySnapshot(meta, prop, context, this.wrap(prop.name), this.wrap(prop.name), [prop.name]), - ), - ); - const code = `return function(entity) {\n const ret = {};\n${lines.join('\n')}\n return ret;\n}`; - const fnKey = `snapshotGenerator-${meta.uniqueName}`; - const snapshotGenerator = Utils.createFunction(context, code, this.#config?.get('compiledFunctions'), fnKey); - this.#snapshotGenerators.set(meta, snapshotGenerator); - return snapshotGenerator; - } - /** - * @internal - */ - propName(name, parent = 'result') { - return parent + this.wrap(name); - } - /** - * @internal respects nested composite keys, e.g. `[1, [2, 3]]` - */ - createCompositeKeyArray(prop, parents = []) { - if (!prop.targetMeta) { - let fieldName = prop.fieldNames[0]; - // traverse all parents, mapping my field name to each parent's field name until we reach the root - for (let i = parents.length - 1; i >= 0; i--) { - const parent = parents[i]; - // skip m:n since it does not represent any column directly - if (parent.pivotEntity) { - continue; - } - const idx = parent.referencedColumnNames.indexOf(fieldName); - fieldName = parent.fieldNames[idx]; - } - return this.propName(fieldName); - } - const parts = []; - prop.targetMeta.getPrimaryProps().forEach(pk => { - const part = this.createCompositeKeyArray(pk, [...parents, prop]); - parts.push(part); - }); - return this.formatCompositeKeyPart(parts); - } - /** - * @internal - */ - formatCompositeKeyPart(part) { - if (!Array.isArray(part)) { - return part; - } - if (part.length === 1) { - return this.formatCompositeKeyPart(part[0]); - } - const formatted = part.map(p => this.formatCompositeKeyPart(p)).join(', '); - return `[${formatted}]`; - } - /** - * @internal Highly performance-sensitive method. - */ - getResultMapper(meta) { - const exists = this.#mappers.get(meta); - if (exists) { - return exists; - } - const lines = []; - const context = new Map(); - context.set('PolymorphicRef', PolymorphicRef); - const tz = this.#platform.getTimezone(); - const parseDate = (key, value, padding = '') => { - lines.push(`${padding} if (${value} == null || ${value} instanceof Date) {`); - lines.push(`${padding} ${key} = ${value};`); - if (!tz || tz === 'local') { - lines.push(`${padding} } else if (typeof ${value} === 'bigint') {`); - lines.push(`${padding} ${key} = parseDate(Number(${value}));`); - lines.push(`${padding} } else {`); - lines.push(`${padding} ${key} = parseDate(${value});`); - } else { - lines.push(`${padding} } else if (typeof ${value} === 'bigint') {`); - lines.push(`${padding} ${key} = parseDate(Number(${value}));`); - lines.push( - `${padding} } else if (typeof ${value} === 'number' || ${value}.includes('+') || ${value}.lastIndexOf('-') > 10 || ${value}.endsWith('Z')) {`, - ); - lines.push(`${padding} ${key} = parseDate(${value});`); - lines.push(`${padding} } else {`); - lines.push(`${padding} ${key} = parseDate(${value} + '${tz}');`); - } - lines.push(`${padding} }`); - }; - lines.push(` const mapped = {};`); - const mapEntityProperties = (meta, padding = '') => { - for (const prop of meta.props) { - if (!prop.fieldNames) { - continue; - } - if (prop.polymorphic && prop.fieldNames.length >= 2) { - const discriminatorField = prop.fieldNames[0]; - const idFields = prop.fieldNames.slice(1); - lines.push( - `${padding} if (${prop.fieldNames.map(field => `typeof ${this.propName(field)} === 'undefined'`).join(' && ')}) {`, - ); - lines.push( - `${padding} } else if (${prop.fieldNames.map(field => `${this.propName(field)} != null`).join(' && ')}) {`, - ); - if (idFields.length === 1) { - lines.push( - `${padding} ret${this.wrap(prop.name)} = new PolymorphicRef(${this.propName(discriminatorField)}, ${this.propName(idFields[0])});`, - ); - } else { - lines.push( - `${padding} ret${this.wrap(prop.name)} = new PolymorphicRef(${this.propName(discriminatorField)}, [${idFields.map(f => this.propName(f)).join(', ')}]);`, - ); - } - lines.push(...prop.fieldNames.map(field => `${padding} ${this.propName(field, 'mapped')} = true;`)); - lines.push( - `${padding} } else if (${prop.fieldNames.map(field => `${this.propName(field)} == null`).join(' && ')}) {\n${padding} ret${this.wrap(prop.name)} = null;`, - ); - lines.push(...prop.fieldNames.map(field => `${padding} ${this.propName(field, 'mapped')} = true;`), ' }'); - continue; - } - if (prop.targetMeta && prop.fieldNames.length > 1) { - lines.push( - `${padding} if (${prop.fieldNames.map(field => `typeof ${this.propName(field)} === 'undefined'`).join(' && ')}) {`, - ); - lines.push( - `${padding} } else if (${prop.fieldNames.map(field => `${this.propName(field)} != null`).join(' && ')}) {`, - ); - lines.push(`${padding} ret${this.wrap(prop.name)} = ${this.createCompositeKeyArray(prop)};`); - lines.push(...prop.fieldNames.map(field => `${padding} ${this.propName(field, 'mapped')} = true;`)); - lines.push( - `${padding} } else if (${prop.fieldNames.map(field => `${this.propName(field)} == null`).join(' && ')}) {\n${padding} ret${this.wrap(prop.name)} = null;`, - ); - lines.push(...prop.fieldNames.map(field => `${padding} ${this.propName(field, 'mapped')} = true;`), ' }'); - continue; - } - if (prop.embedded && (meta.embeddable || meta.properties[prop.embedded[0]].object)) { - continue; - } - if (prop.runtimeType === 'boolean') { - lines.push(`${padding} if (typeof ${this.propName(prop.fieldNames[0])} !== 'undefined') {`); - lines.push( - `${padding} ret${this.wrap(prop.name)} = ${this.propName(prop.fieldNames[0])} == null ? ${this.propName(prop.fieldNames[0])} : !!${this.propName(prop.fieldNames[0])};`, - ); - lines.push(`${padding} ${this.propName(prop.fieldNames[0], 'mapped')} = true;`); - lines.push(`${padding} }`); - } else if (prop.runtimeType === 'Date' && !this.#platform.isNumericProperty(prop)) { - lines.push(`${padding} if (typeof ${this.propName(prop.fieldNames[0])} !== 'undefined') {`); - context.set('parseDate', value => this.#platform.parseDate(value)); - parseDate('ret' + this.wrap(prop.name), this.propName(prop.fieldNames[0]), padding); - lines.push(`${padding} ${this.propName(prop.fieldNames[0], 'mapped')} = true;`); - lines.push(`${padding} }`); - } else if (prop.kind === ReferenceKind.EMBEDDED && (prop.object || meta.embeddable)) { - const idx = this.#tmpIndex++; - context.set(`mapEmbeddedResult_${idx}`, data => { - const item = parseJsonSafe(data); - if (Array.isArray(item)) { - return item.map(row => (row == null ? row : this.getResultMapper(prop.targetMeta)(row))); - } - return item == null ? item : this.getResultMapper(prop.targetMeta)(item); - }); - lines.push(`${padding} if (typeof ${this.propName(prop.fieldNames[0])} !== 'undefined') {`); - lines.push( - `${padding} ret${this.wrap(prop.name)} = ${this.propName(prop.fieldNames[0])} == null ? ${this.propName(prop.fieldNames[0])} : mapEmbeddedResult_${idx}(${this.propName(prop.fieldNames[0])});`, - ); - lines.push(`${padding} ${this.propName(prop.fieldNames[0], 'mapped')} = true;`); - lines.push(`${padding} }`); - } else if (prop.kind !== ReferenceKind.EMBEDDED) { - lines.push(`${padding} if (typeof ${this.propName(prop.fieldNames[0])} !== 'undefined') {`); - lines.push(`${padding} ret${this.wrap(prop.name)} = ${this.propName(prop.fieldNames[0])};`); - lines.push(`${padding} ${this.propName(prop.fieldNames[0], 'mapped')} = true;`); - lines.push(`${padding} }`); - } - } - }; - if (meta.polymorphs && meta.discriminatorColumn) { - for (const polymorph of meta.polymorphs) { - const first = polymorph === meta.polymorphs[0]; - lines.push( - ` ${first ? '' : 'else '}if (${this.propName(meta.discriminatorColumn)} == '${polymorph.discriminatorValue}') {`, - ); - mapEntityProperties(polymorph, ' '); - lines.push(` }`); - } - lines.push(` else {`); - mapEntityProperties(meta, ' '); - lines.push(` }`); - } else { - mapEntityProperties(meta); - } - lines.push( - ` for (let k in result) { if (Object.hasOwn(result, k) && !mapped[k] && ret[k] === undefined) ret[k] = result[k]; }`, - ); - const code = - `// compiled mapper for entity ${meta.className}\n` + - `return function(result) {\n const ret = {};\n${lines.join('\n')}\n return ret;\n}`; - const fnKey = `resultMapper-${meta.uniqueName}`; - const resultMapper = Utils.createFunction(context, code, this.#config?.get('compiledFunctions'), fnKey); - this.#mappers.set(meta, resultMapper); - return resultMapper; - } - getPropertyCondition(path) { - const parts = path.slice(); // copy first - if (parts.length > 1) { - parts.pop(); - } - let tail = ''; - return parts - .map(k => { - if (/^\[idx_\d+]$/.exec(k)) { - tail += k; - return ''; - } - const mapped = `typeof entity${tail ? '.' + tail : ''}${this.wrap(k)} !== 'undefined'`; - tail += tail ? '.' + k : k; - return mapped; - }) - .filter(k => k) - .join(' && '); - } - getEmbeddedArrayPropertySnapshot(meta, prop, context, level, path, dataKey) { - const entityKey = path.map(k => this.wrap(k)).join(''); - const ret = []; - const padding = ' '.repeat(level * 2); - const idx = this.#tmpIndex++; - ret.push(`${padding}if (Array.isArray(entity${entityKey})) {`); - ret.push(`${padding} ret${dataKey} = [];`); - ret.push(`${padding} entity${entityKey}.forEach((_, idx_${idx}) => {`); - ret.push( - this.getEmbeddedPropertySnapshot( - meta, - prop, - context, - level + 2, - [...path, `[idx_${idx}]`], - `${dataKey}[idx_${idx}]`, - true, - ), - ); - ret.push(`${padding} });`); - if (this.shouldSerialize(prop, dataKey)) { - ret.push(`${padding} ret${dataKey} = cloneEmbeddable(ret${dataKey});`); - } - ret.push(`${padding}}`); - return ret.join('\n'); - } - /** - * we need to serialize only object embeddables, and only the top level ones, so root object embeddable - * properties and first child nested object embeddables with inlined parent - */ - shouldSerialize(prop, dataKey) { - dataKey = dataKey.replace(/^\./, ''); - const contains = (str, re) => (str.match(re) || []).length > 0; - const a = contains(dataKey, /\./g); - const b = contains(dataKey, /\[idx_/g); - return !!prop.object && !a && !b; - } - getEmbeddedPropertySnapshot(meta, prop, context, level, path, dataKey, object = prop.object) { - const padding = ' '.repeat(level * 2); - const nullCond = `entity${path.map(k => this.wrap(k)).join('')} === null`; - let ret = level === 1 ? '' : '\n'; - if (object) { - ret += `${padding}if (${nullCond}) ret${dataKey} = null;\n`; - } else { - ret += `${padding}if (${nullCond}) {\n`; - ret += - meta.props - .filter( - p => - p.embedded?.[0] === prop.name && - // object for JSON embeddable - (p.object || p.persist !== false), - ) - .map(childProp => { - const childDataKey = - meta.embeddable || prop.object ? dataKey + this.wrap(childProp.embedded[1]) : this.wrap(childProp.name); - return `${padding} ret${childDataKey} = null;`; - }) - .join('\n') + `\n`; - ret += `${padding}}\n`; - } - const cond = `entity${path.map(k => this.wrap(k)).join('')} != null`; - ret += `${padding}if (${cond}) {\n`; - if (object) { - ret += `${padding} ret${dataKey} = {};\n`; - } - function shouldProcessCustomType(childProp) { - if (!childProp.customType) { - return false; - } - if (childProp.customType instanceof JsonType) { - return !prop.object; - } - return true; - } - ret += - meta.props - .filter( - p => - p.embedded?.[0] === prop.name && - // object for JSON embeddable - (p.object || p.persist !== false), - ) - .map(childProp => { - const childDataKey = - meta.embeddable || prop.object ? dataKey + this.wrap(childProp.embedded[1]) : this.wrap(childProp.name); - const childEntityKey = [...path, childProp.embedded[1]].map(k => this.wrap(k)).join(''); - const childCond = `typeof entity${childEntityKey} !== 'undefined'`; - if (childProp.kind === ReferenceKind.EMBEDDED) { - return this.getPropertySnapshot( - meta, - childProp, - context, - childDataKey, - childEntityKey, - [...path, childProp.embedded[1]], - level + 1, - prop.object, - ); - } - if (childProp.kind !== ReferenceKind.SCALAR) { - return this.getPropertySnapshot( - meta, - childProp, - context, - childDataKey, - childEntityKey, - [...path, childProp.embedded[1]], - level, - prop.object, - ) - .split('\n') - .map(l => padding + l) - .join('\n'); - } - if (shouldProcessCustomType(childProp)) { - const convertorKey = this.registerCustomType(childProp, context); - if ( - ['number', 'string', 'boolean', 'bigint'].includes(childProp.customType.compareAsType().toLowerCase()) - ) { - return `${padding} if (${childCond}) ret${childDataKey} = convertToDatabaseValue_${convertorKey}(entity${childEntityKey});`; - } - return `${padding} if (${childCond}) ret${childDataKey} = clone(convertToDatabaseValue_${convertorKey}(entity${childEntityKey}));`; - } - return `${padding} if (${childCond}) ret${childDataKey} = clone(entity${childEntityKey});`; - }) - .join('\n') + `\n`; - if (this.shouldSerialize(prop, dataKey)) { - return `${ret + padding} ret${dataKey} = cloneEmbeddable(ret${dataKey});\n${padding}}`; - } - return `${ret}${padding}}`; - } - registerCustomType(prop, context) { - const convertorKey = this.safeKey(prop.name); - context.set(`convertToDatabaseValue_${convertorKey}`, val => { - /* v8 ignore next */ - if (Raw.isKnownFragment(val)) { - return val; - } - return prop.customType.convertToDatabaseValue(val, this.#platform, { mode: 'serialization' }); - }); - return convertorKey; - } - getPropertySnapshot(meta, prop, context, dataKey, entityKey, path, level = 1, object) { - const unwrap = prop.ref ? '?.unwrap()' : ''; - let ret = ` if (${this.getPropertyCondition(path)}) {\n`; - if (['number', 'string', 'boolean'].includes(prop.type.toLowerCase())) { - return ret + ` ret${dataKey} = entity${entityKey}${unwrap};\n }\n`; - } - if (prop.kind === ReferenceKind.EMBEDDED) { - if (prop.array) { - return this.getEmbeddedArrayPropertySnapshot(meta, prop, context, level, path, dataKey) + '\n'; - } - return this.getEmbeddedPropertySnapshot(meta, prop, context, level, path, dataKey, object) + '\n'; - } - if (prop.kind === ReferenceKind.ONE_TO_ONE || prop.kind === ReferenceKind.MANY_TO_ONE) { - if (prop.mapToPk) { - if (prop.customType) { - const convertorKey = this.registerCustomType(prop, context); - ret += ` ret${dataKey} = convertToDatabaseValue_${convertorKey}(entity${entityKey});\n`; - } else { - ret += ` ret${dataKey} = entity${entityKey};\n`; - } - } else if (prop.polymorphic) { - const discriminatorMapKey = `discriminatorMapReverse_${prop.name}`; - const reverseMap = new Map(); - for (const [key, value] of Object.entries(prop.discriminatorMap)) { - reverseMap.set(value, key); - } - context.set(discriminatorMapKey, reverseMap); - this.setToArrayHelper(context); - context.set('EntityIdentifier', EntityIdentifier); - context.set('PolymorphicRef', PolymorphicRef); - ret += ` if (entity${entityKey} === null) {\n`; - ret += ` ret${dataKey} = null;\n`; - ret += ` } else if (typeof entity${entityKey} !== 'undefined') {\n`; - ret += ` const val${level} = entity${entityKey}${unwrap};\n`; - ret += ` const discriminator = ${discriminatorMapKey}.get(val${level}?.constructor);\n`; - ret += ` const pk = val${level}?.__helper?.__identifier && !val${level}?.__helper?.hasPrimaryKey()\n`; - ret += ` ? val${level}.__helper.__identifier\n`; - ret += ` : toArray(val${level}?.__helper?.getPrimaryKey(true));\n`; - ret += ` ret${dataKey} = new PolymorphicRef(discriminator, pk);\n`; - ret += ` }\n`; - } else if (prop.targetKey) { - // When targetKey is set, extract that property value instead of the PK - const targetProp = prop.targetMeta?.properties[prop.targetKey]; - ret += ` if (entity${entityKey} === null) {\n`; - ret += ` ret${dataKey} = null;\n`; - ret += ` } else if (typeof entity${entityKey} !== 'undefined') {\n`; - ret += ` const val${level} = entity${entityKey}${unwrap};\n`; - if (targetProp?.customType) { - // If targetKey property has a custom type, convert to database value - const convertorKey = this.registerCustomType(targetProp, context); - ret += ` ret${dataKey} = convertToDatabaseValue_${convertorKey}(val${level}?.${prop.targetKey});\n`; - } else { - ret += ` ret${dataKey} = val${level}?.${prop.targetKey};\n`; - } - ret += ` }\n`; - } else { - this.setToArrayHelper(context); - context.set('EntityIdentifier', EntityIdentifier); - ret += ` if (entity${entityKey} === null) {\n`; - ret += ` ret${dataKey} = null;\n`; - ret += ` } else if (entity${entityKey}?.__helper.__identifier && !entity${entityKey}.__helper.hasPrimaryKey()) {\n`; - ret += ` ret${dataKey} = entity${entityKey}?.__helper.__identifier;\n`; - ret += ` } else if (typeof entity${entityKey} !== 'undefined') {\n`; - ret += ` ret${dataKey} = toArray(entity${entityKey}.__helper.getPrimaryKey(true));\n`; - ret += ` }\n`; - } - return ret + ' }\n'; - } - if (prop.customType) { - const convertorKey = this.registerCustomType(prop, context); - if (['number', 'string', 'boolean', 'bigint'].includes(prop.customType.compareAsType().toLowerCase())) { - return ret + ` ret${dataKey} = convertToDatabaseValue_${convertorKey}(entity${entityKey}${unwrap});\n }\n`; - } - return ( - ret + ` ret${dataKey} = clone(convertToDatabaseValue_${convertorKey}(entity${entityKey}${unwrap}));\n }\n` - ); - } - if (prop.runtimeType === 'Date') { - context.set('processDateProperty', this.#platform.processDateProperty.bind(this.#platform)); - return ret + ` ret${dataKey} = clone(processDateProperty(entity${entityKey}${unwrap}));\n }\n`; - } - return ret + ` ret${dataKey} = clone(entity${entityKey}${unwrap});\n }\n`; - } - /** - * @internal Highly performance-sensitive method. - */ - getEntityComparator(entityName) { - const meta = this.#metadata.find(entityName); - const exists = this.#comparators.get(meta); - if (exists) { - return exists; - } - const lines = []; - const context = new Map(); - context.set('compareArrays', compareArrays); - context.set('compareBooleans', compareBooleans); - context.set('compareBuffers', compareBuffers); - context.set('compareObjects', compareObjects); - context.set('equals', equals); - for (const prop of meta.comparableProps) { - lines.push(this.getPropertyComparator(prop, context)); - } - // also compare 1:1 inverse sides, important for `factory.mergeData` - lines.push(`if (options?.includeInverseSides) {`); - for (const prop of meta.bidirectionalRelations) { - if (prop.kind === ReferenceKind.ONE_TO_ONE && !prop.owner && prop.hydrate !== false) { - lines.push(this.getPropertyComparator(prop, context)); - } - } - lines.push(`}`); - const code = - `// compiled comparator for entity ${meta.className}\n` + - `return function(last, current, options) {\n const diff = {};\n${lines.join('\n')}\n return diff;\n}`; - const fnKey = `comparator-${meta.uniqueName}`; - const comparator = Utils.createFunction(context, code, this.#config?.get('compiledFunctions'), fnKey); - this.#comparators.set(meta, comparator); - return comparator; - } - getGenericComparator(prop, cond) { - return ( - ` if (current${prop} === null && last${prop} === undefined) {\n` + - ` diff${prop} = current${prop};\n` + - ` } else if (current${prop} == null && last${prop} == null) {\n\n` + - ` } else if ((current${prop} != null && last${prop} == null) || (current${prop} == null && last${prop} != null)) {\n` + - ` diff${prop} = current${prop};\n` + - ` } else if (${cond}) {\n` + - ` diff${prop} = current${prop};\n` + - ` }\n` - ); - } - getPropertyComparator(prop, context) { - let type = prop.type.toLowerCase(); - if (prop.kind !== ReferenceKind.SCALAR && prop.kind !== ReferenceKind.EMBEDDED) { - if (prop.polymorphic) { - type = 'object'; - } else { - const meta2 = prop.targetMeta; - if (meta2.primaryKeys.length > 1) { - type = 'array'; - } else { - type = meta2.getPrimaryProp().type.toLowerCase(); - } - } - } - if (prop.customType) { - if (prop.customType.compareValues) { - const idx = this.#tmpIndex++; - context.set(`compareValues_${idx}`, (a, b) => { - if (Raw.isKnownFragment(a) || Raw.isKnownFragment(b)) { - return Raw.getKnownFragment(a) === Raw.getKnownFragment(b); - } - return prop.customType.compareValues(a, b); - }); - return this.getGenericComparator( - this.wrap(prop.name), - `!compareValues_${idx}(last${this.wrap(prop.name)}, current${this.wrap(prop.name)})`, - ); - } - type = prop.customType.compareAsType().toLowerCase(); - } - if (type.endsWith('[]')) { - type = 'array'; - } - if (['string', 'number', 'bigint'].includes(type)) { - return this.getGenericComparator( - this.wrap(prop.name), - `last${this.wrap(prop.name)} !== current${this.wrap(prop.name)}`, - ); - } - if (type === 'boolean') { - return this.getGenericComparator( - this.wrap(prop.name), - `!compareBooleans(last${this.wrap(prop.name)}, current${this.wrap(prop.name)})`, - ); - } - if (['array'].includes(type) || type.endsWith('[]')) { - return this.getGenericComparator( - this.wrap(prop.name), - `!compareArrays(last${this.wrap(prop.name)}, current${this.wrap(prop.name)})`, - ); - } - if (['buffer', 'uint8array'].includes(type)) { - return this.getGenericComparator( - this.wrap(prop.name), - `!compareBuffers(last${this.wrap(prop.name)}, current${this.wrap(prop.name)})`, - ); - } - if (type === 'date') { - return this.getGenericComparator( - this.wrap(prop.name), - `last${this.wrap(prop.name)}.valueOf() !== current${this.wrap(prop.name)}.valueOf()`, - ); - } - if (type === 'objectid') { - // We might be comparing PK to object, in case we compare with cached data of populated entity - // in such case we just ignore the comparison and fallback to `equals()` (which will still mark - // it as not equal as we compare PK to plain object). - const cond = `last${this.wrap(prop.name)}.toHexString?.() !== current${this.wrap(prop.name)}.toHexString?.()`; - return this.getGenericComparator(this.wrap(prop.name), cond); - } - return this.getGenericComparator( - this.wrap(prop.name), - `!equals(last${this.wrap(prop.name)}, current${this.wrap(prop.name)})`, - ); - } - wrap(key) { - if (/^\[.*]$/.exec(key)) { - return key; - } - return /^\w+$/.exec(key) ? `.${key}` : `['${key}']`; - } - safeKey(key) { - return key.replace(/\W/g, '_'); - } - /** - * Sets the toArray helper in the context if not already set. - * Used for converting composite PKs to arrays. - */ - setToArrayHelper(context) { - if (context.has('toArray')) { - return; - } - const toArray = val => { - if (Utils.isPlainObject(val)) { - return Object.values(val).map(v => toArray(v)); - } - return val; - }; - context.set('toArray', toArray); - } - /** - * perf: used to generate list of comparable properties during discovery, so we speed up the runtime comparison - */ - static isComparable(prop, root) { - const virtual = prop.persist === false || (prop.generated && !prop.primary); - const inverse = prop.kind === ReferenceKind.ONE_TO_ONE && !prop.owner; - const discriminator = prop.name === root.discriminatorColumn; - const collection = prop.kind === ReferenceKind.ONE_TO_MANY || prop.kind === ReferenceKind.MANY_TO_MANY; - return !virtual && !collection && !inverse && !discriminator && !prop.version; - } -} diff --git a/node_modules/@mikro-orm/core/utils/NullHighlighter.d.ts b/node_modules/@mikro-orm/core/utils/NullHighlighter.d.ts deleted file mode 100644 index 9dadc99..0000000 --- a/node_modules/@mikro-orm/core/utils/NullHighlighter.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { Highlighter } from '../typings.js'; -/** No-op highlighter that returns SQL text unchanged. Used as the default when no syntax highlighting is configured. */ -export declare class NullHighlighter implements Highlighter { - highlight(text: string): string; -} diff --git a/node_modules/@mikro-orm/core/utils/NullHighlighter.js b/node_modules/@mikro-orm/core/utils/NullHighlighter.js deleted file mode 100644 index 0c860c9..0000000 --- a/node_modules/@mikro-orm/core/utils/NullHighlighter.js +++ /dev/null @@ -1,6 +0,0 @@ -/** No-op highlighter that returns SQL text unchanged. Used as the default when no syntax highlighting is configured. */ -export class NullHighlighter { - highlight(text) { - return text; - } -} diff --git a/node_modules/@mikro-orm/core/utils/QueryHelper.d.ts b/node_modules/@mikro-orm/core/utils/QueryHelper.d.ts deleted file mode 100644 index 48d6329..0000000 --- a/node_modules/@mikro-orm/core/utils/QueryHelper.d.ts +++ /dev/null @@ -1,90 +0,0 @@ -import type { Dictionary, EntityMetadata, EntityName, EntityProperty, FilterDef, FilterQuery } from '../typings.js'; -import { type QueryOrderMap } from '../enums.js'; -import type { Platform } from '../platforms/Platform.js'; -import type { MetadataStorage } from '../metadata/MetadataStorage.js'; -import type { FilterOptions } from '../drivers/IDatabaseDriver.js'; -/** @internal */ -export declare class QueryHelper { - static readonly SUPPORTED_OPERATORS: string[]; - /** - * Finds the discriminator value (key) for a given entity class in a discriminator map. - */ - static findDiscriminatorValue(discriminatorMap: Dictionary, targetClass: T): string | undefined; - static processParams(params: unknown): any; - static processObjectParams(params?: T): T; - /** - * converts `{ account: { $or: [ [Object], [Object] ] } }` - * to `{ $or: [ { account: [Object] }, { account: [Object] } ] }` - */ - static liftGroupOperators( - where: Dictionary, - meta: EntityMetadata, - metadata: MetadataStorage, - key?: string, - ): string | undefined; - static inlinePrimaryKeyObjects( - where: Dictionary, - meta: EntityMetadata, - metadata: MetadataStorage, - key?: string, - ): boolean; - static processWhere(options: ProcessWhereOptions): FilterQuery; - static getActiveFilters( - meta: EntityMetadata, - options: FilterOptions | undefined, - filters: Dictionary, - ): FilterDef[]; - static mergePropertyFilters( - propFilters: FilterOptions | undefined, - options: FilterOptions | undefined, - ): FilterOptions | undefined; - static isFilterActive( - meta: EntityMetadata, - filterName: string, - filter: FilterDef, - options: Dictionary, - ): boolean; - static processCustomType( - prop: EntityProperty, - cond: FilterQuery, - platform: Platform, - key?: string, - fromQuery?: boolean, - ): FilterQuery; - private static isSupportedOperator; - private static processJsonCondition; - static findProperty(fieldName: string, options: ProcessWhereOptions): EntityProperty | undefined; - /** - * Converts entity references for composite FK properties into flat arrays - * of correctly-ordered join column values, before processParams flattens them - * incorrectly due to shared FK columns. - */ - private static convertCompositeEntityRefs; - /** - * Extracts values for a FK's join columns from an entity by traversing the FK chain. - * Handles shared FK columns (e.g., tenant_id referenced by multiple FKs) correctly. - */ - private static extractJoinColumnValues; - /** - * Extracts the value for a specific column from an entity by finding which PK property - * owns that column and recursively traversing FK references. - */ - private static extractColumnValue; - /** - * Merges multiple orderBy sources with key-level deduplication (first-seen key wins). - * RawQueryFragment symbol keys are never deduped (each is unique). - */ - static mergeOrderBy(...sources: (QueryOrderMap | QueryOrderMap[] | undefined)[]): QueryOrderMap[]; -} -interface ProcessWhereOptions { - where: FilterQuery; - entityName: EntityName; - metadata: MetadataStorage; - platform: Platform; - aliased?: boolean; - aliasMap?: Dictionary; - convertCustomTypes?: boolean; - root?: boolean; - type?: 'where' | 'orderBy'; -} -export {}; diff --git a/node_modules/@mikro-orm/core/utils/QueryHelper.js b/node_modules/@mikro-orm/core/utils/QueryHelper.js deleted file mode 100644 index c9a0d34..0000000 --- a/node_modules/@mikro-orm/core/utils/QueryHelper.js +++ /dev/null @@ -1,397 +0,0 @@ -import { Reference } from '../entity/Reference.js'; -import { Utils } from './Utils.js'; -import { ARRAY_OPERATORS, GroupOperator, JSON_KEY_OPERATORS, ReferenceKind } from '../enums.js'; -import { JsonType } from '../types/JsonType.js'; -import { helper } from '../entity/wrap.js'; -import { isRaw, Raw } from './RawQueryFragment.js'; -/** @internal */ -export class QueryHelper { - static SUPPORTED_OPERATORS = ['>', '<', '<=', '>=', '!', '!=']; - /** - * Finds the discriminator value (key) for a given entity class in a discriminator map. - */ - static findDiscriminatorValue(discriminatorMap, targetClass) { - return Object.entries(discriminatorMap).find(([, cls]) => cls === targetClass)?.[0]; - } - static processParams(params) { - if (Reference.isReference(params)) { - params = params.unwrap(); - } - if (Utils.isEntity(params)) { - if (helper(params).__meta.compositePK) { - return helper(params).__primaryKeys; - } - return helper(params).getPrimaryKey(); - } - if (params === undefined) { - return null; - } - if (Array.isArray(params)) { - return params.map(item => QueryHelper.processParams(item)); - } - if (Utils.isPlainObject(params)) { - QueryHelper.processObjectParams(params); - } - return params; - } - static processObjectParams(params = {}) { - Utils.getObjectQueryKeys(params).forEach(k => { - params[k] = QueryHelper.processParams(params[k]); - }); - return params; - } - /** - * converts `{ account: { $or: [ [Object], [Object] ] } }` - * to `{ $or: [ { account: [Object] }, { account: [Object] } ] }` - */ - static liftGroupOperators(where, meta, metadata, key) { - if (!Utils.isPlainObject(where)) { - return undefined; - } - const keys = Object.keys(where); - const groupOperator = keys.find(k => { - return ( - k in GroupOperator && - Array.isArray(where[k]) && - where[k].every(cond => { - return ( - Utils.isPlainObject(cond) && - Object.keys(cond).every(k2 => { - if (Utils.isOperator(k2, false)) { - if (k2 === '$not') { - return Object.keys(cond[k2]).every(k3 => meta.primaryKeys.includes(k3)); - } - /* v8 ignore next */ - return true; - } - return meta.primaryKeys.includes(k2); - }) - ); - }) - ); - }); - if (groupOperator) { - return groupOperator; - } - for (const k of keys) { - const value = where[k]; - const prop = meta.properties[k]; - // Polymorphic relations use multiple columns (discriminator + FK), so they cannot - // participate in the standard single-column FK expansion. Query by discriminator - // column directly instead, e.g. { likeableType: 'post', likeableId: 1 }. - if (!prop || ![ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) || prop.polymorphic) { - continue; - } - const op = this.liftGroupOperators(value, prop.targetMeta, metadata, k); - if (op) { - delete where[k]; - where[op] = value[op].map(v => { - return { [k]: v }; - }); - } - } - return undefined; - } - static inlinePrimaryKeyObjects(where, meta, metadata, key) { - if (Array.isArray(where)) { - where.forEach((item, i) => { - if (this.inlinePrimaryKeyObjects(item, meta, metadata, key)) { - where[i] = Utils.getPrimaryKeyValues(item, meta, false); - } - }); - } - if (!Utils.isPlainObject(where) || (key && meta.properties[key]?.customType instanceof JsonType)) { - return false; - } - if (meta.primaryKeys.every(pk => pk in where) && Utils.getObjectKeysSize(where) === meta.primaryKeys.length) { - return ( - !!key && - !GroupOperator[key] && - key !== '$not' && - Object.keys(where).every( - k => - !Utils.isPlainObject(where[k]) || - Object.keys(where[k]).every(v => { - if (Utils.isOperator(v, false)) { - return true; - } - if ( - meta.properties[k].primary && - [ReferenceKind.ONE_TO_ONE, ReferenceKind.MANY_TO_ONE].includes(meta.properties[k].kind) - ) { - return this.inlinePrimaryKeyObjects(where[k], meta.properties[k].targetMeta, metadata, v); - } - /* v8 ignore next */ - return true; - }), - ) - ); - } - Object.keys(where).forEach(k => { - const meta2 = metadata.find(meta.properties[k]?.targetMeta?.class) || meta; - if (this.inlinePrimaryKeyObjects(where[k], meta2, metadata, k)) { - where[k] = Utils.getPrimaryKeyValues(where[k], meta2, true); - } - }); - return false; - } - static processWhere(options) { - // eslint-disable-next-line prefer-const - let { where, entityName, metadata, platform, aliased = true, convertCustomTypes = true, root = true } = options; - const meta = metadata.find(entityName); - // inline PK-only objects in M:N queries, so we don't join the target entity when not needed - if (meta && root) { - QueryHelper.liftGroupOperators(where, meta, metadata); - QueryHelper.inlinePrimaryKeyObjects(where, meta, metadata); - } - if (meta && root) { - QueryHelper.convertCompositeEntityRefs(where, meta); - } - if (platform.getConfig().get('ignoreUndefinedInQuery') && where && typeof where === 'object') { - Utils.dropUndefinedProperties(where); - } - where = QueryHelper.processParams(where) ?? {}; - /* v8 ignore next */ - if (!root && Utils.isPrimaryKey(where)) { - return where; - } - if (meta && Utils.isPrimaryKey(where, meta.compositePK)) { - where = { [Utils.getPrimaryKeyHash(meta.primaryKeys)]: where }; - } - if (Array.isArray(where) && root) { - const rootPrimaryKey = meta ? Utils.getPrimaryKeyHash(meta.primaryKeys) : Utils.className(entityName); - let cond = { [rootPrimaryKey]: { $in: where } }; - // @ts-ignore - // detect tuple comparison, use `$or` in case the number of constituents don't match - if ( - meta && - !where.every( - c => - Utils.isPrimaryKey(c) || - (Array.isArray(c) && c.length === meta.primaryKeys.length && c.every(i => Utils.isPrimaryKey(i))), - ) - ) { - cond = { $or: where }; - } - return QueryHelper.processWhere({ ...options, where: cond, root: false }); - } - if (!Utils.isPlainObject(where)) { - return where; - } - return Utils.getObjectQueryKeys(where).reduce((o, key) => { - let value = where[key]; - const customExpression = Raw.isKnownFragmentSymbol(key); - if (Array.isArray(value) && value.length === 0 && customExpression) { - o[key] = value; - return o; - } - if (key in GroupOperator) { - o[key] = value.map(sub => QueryHelper.processWhere({ ...options, where: sub, root })); - return o; - } - // wrap top level operators (except platform allowed operators) with PK - if (Utils.isOperator(key) && root && meta && !platform.isAllowedTopLevelOperator(key)) { - const rootPrimaryKey = Utils.getPrimaryKeyHash(meta.primaryKeys); - o[rootPrimaryKey] = { [key]: QueryHelper.processWhere({ ...options, where: value, root: false }) }; - return o; - } - const prop = customExpression ? null : this.findProperty(key, options); - const keys = prop?.joinColumns?.length ?? 0; - const composite = keys > 1; - if (prop?.customType && convertCustomTypes && !isRaw(value)) { - value = QueryHelper.processCustomType(prop, value, platform, undefined, true); - } - // oxfmt-ignore - const isJsonProperty = prop?.customType instanceof JsonType && !isRaw(value) && (Utils.isPlainObject(value) ? !['$eq', '$elemMatch'].includes(Object.keys(value)[0]) : !Array.isArray(value)); - if (isJsonProperty && prop?.kind !== ReferenceKind.EMBEDDED) { - return this.processJsonCondition(o, value, [prop.fieldNames[0]], platform, aliased); - } - // oxfmt-ignore - if (Array.isArray(value) && !Utils.isOperator(key) && !QueryHelper.isSupportedOperator(key) && !(customExpression && Raw.getKnownFragment(key).params.length > 0) && options.type !== 'orderBy') { - // comparing single composite key - use $eq instead of $in - const op = composite && !value.every(v => Array.isArray(v)) ? '$eq' : '$in'; - o[key] = { [op]: value }; - return o; - } - if (Utils.isPlainObject(value)) { - o[key] = QueryHelper.processWhere({ - ...options, - where: value, - entityName: prop?.targetMeta?.class ?? entityName, - root: false, - }); - } else { - o[key] = value; - } - return o; - }, {}); - } - static getActiveFilters(meta, options, filters) { - if (options === false) { - return []; - } - const opts = {}; - if (Array.isArray(options)) { - options.forEach(filter => (opts[filter] = true)); - } else if (Utils.isPlainObject(options)) { - Object.keys(options).forEach(filter => (opts[filter] = options[filter])); - } - return Object.keys(filters) - .filter(f => QueryHelper.isFilterActive(meta, f, filters[f], opts)) - .map(f => { - filters[f].name = f; - return filters[f]; - }); - } - static mergePropertyFilters(propFilters, options) { - if (!options || !propFilters || options === true || propFilters === true) { - return options ?? propFilters; - } - if (Array.isArray(propFilters)) { - propFilters = propFilters.reduce((o, item) => { - o[item] = true; - return o; - }, {}); - } - if (Array.isArray(options)) { - options = options.reduce((o, item) => { - o[item] = true; - return o; - }, {}); - } - return Utils.mergeConfig({}, propFilters, options); - } - static isFilterActive(meta, filterName, filter, options) { - if (filter.entity && !filter.entity.includes(meta.className)) { - return false; - } - if (options[filterName] === false) { - return false; - } - return filter.default || filterName in options; - } - static processCustomType(prop, cond, platform, key, fromQuery) { - if (Utils.isPlainObject(cond)) { - return Utils.getObjectQueryKeys(cond).reduce((o, k) => { - if (!Raw.isKnownFragmentSymbol(k) && (Utils.isOperator(k, true) || prop.referencedPKs?.includes(k))) { - o[k] = QueryHelper.processCustomType(prop, cond[k], platform, k, fromQuery); - } else { - o[k] = cond[k]; - } - return o; - }, {}); - } - if (key && JSON_KEY_OPERATORS.includes(key)) { - return Array.isArray(cond) ? platform.marshallArray(cond) : cond; - } - if (Array.isArray(cond) && !(key && ARRAY_OPERATORS.includes(key))) { - return cond.map(v => QueryHelper.processCustomType(prop, v, platform, key, fromQuery)); - } - if (isRaw(cond)) { - return cond; - } - return prop.customType.convertToDatabaseValue(cond, platform, { fromQuery, key, mode: 'query' }); - } - static isSupportedOperator(key) { - return !!QueryHelper.SUPPORTED_OPERATORS.find(op => key === op); - } - static processJsonCondition(o, value, path, platform, alias) { - return platform.processJsonCondition(o, value, path, alias); - } - static findProperty(fieldName, options) { - const parts = fieldName.split('.'); - const propName = parts.pop(); - const alias = parts.length > 0 ? parts.join('.') : undefined; - const entityName = alias ? options.aliasMap?.[alias] : options.entityName; - const meta = entityName ? options.metadata.find(entityName) : undefined; - return meta?.properties[propName]; - } - /** - * Converts entity references for composite FK properties into flat arrays - * of correctly-ordered join column values, before processParams flattens them - * incorrectly due to shared FK columns. - */ - static convertCompositeEntityRefs(where, meta) { - if (!Utils.isPlainObject(where)) { - return; - } - for (const k of Object.keys(where)) { - if (k in GroupOperator) { - if (Array.isArray(where[k])) { - where[k].forEach(sub => this.convertCompositeEntityRefs(sub, meta)); - } - continue; - } - if (k === '$not') { - this.convertCompositeEntityRefs(where[k], meta); - continue; - } - const prop = meta.properties[k]; - if (!prop?.joinColumns || prop.joinColumns.length <= 1) { - continue; - } - const w = where[k]; - if (Utils.isEntity(w)) { - where[k] = this.extractJoinColumnValues(w, prop); - } else if (Utils.isPlainObject(w)) { - for (const op of Object.keys(w)) { - if (Utils.isOperator(op, false) && Array.isArray(w[op])) { - w[op] = w[op].map(item => (Utils.isEntity(item) ? this.extractJoinColumnValues(item, prop) : item)); - } - } - } - } - } - /** - * Extracts values for a FK's join columns from an entity by traversing the FK chain. - * Handles shared FK columns (e.g., tenant_id referenced by multiple FKs) correctly. - */ - static extractJoinColumnValues(entity, prop) { - return prop.referencedColumnNames.map(refCol => { - return this.extractColumnValue(entity, prop.targetMeta, refCol); - }); - } - /** - * Extracts the value for a specific column from an entity by finding which PK property - * owns that column and recursively traversing FK references. - */ - static extractColumnValue(entity, meta, columnName) { - for (const pk of meta.primaryKeys) { - const pkProp = meta.properties[pk]; - const colIdx = pkProp.fieldNames.indexOf(columnName); - if (colIdx !== -1) { - const value = entity[pk]; - if (pkProp.targetMeta && Utils.isEntity(value, true)) { - const refCol = pkProp.referencedColumnNames[colIdx]; - return this.extractColumnValue(value, pkProp.targetMeta, refCol); - } - return value; - } - } - return null; - } - /** - * Merges multiple orderBy sources with key-level deduplication (first-seen key wins). - * RawQueryFragment symbol keys are never deduped (each is unique). - */ - static mergeOrderBy(...sources) { - const result = []; - const seenKeys = new Set(); - for (const source of sources) { - if (source == null) { - continue; - } - for (const item of Utils.asArray(source)) { - for (const key of Utils.getObjectQueryKeys(item)) { - if (typeof key === 'symbol') { - result.push({ [key]: item[key] }); - } else if (!seenKeys.has(key)) { - seenKeys.add(key); - result.push({ [key]: item[key] }); - } - } - } - } - return result; - } -} diff --git a/node_modules/@mikro-orm/core/utils/RawQueryFragment.d.ts b/node_modules/@mikro-orm/core/utils/RawQueryFragment.d.ts deleted file mode 100644 index 17035e8..0000000 --- a/node_modules/@mikro-orm/core/utils/RawQueryFragment.d.ts +++ /dev/null @@ -1,152 +0,0 @@ -import type { AnyString, Dictionary, EntityKey } from '../typings.js'; -declare const rawFragmentSymbolBrand: unique symbol; -/** Branded symbol type used as a unique key for tracking raw SQL fragments in object properties. */ -export type RawQueryFragmentSymbol = symbol & { - readonly [rawFragmentSymbolBrand]: true; -}; -/** Represents a raw SQL fragment with optional parameters, usable as both a value and an object key via Symbol coercion. */ -export declare class RawQueryFragment { - #private; - readonly sql: string; - readonly params: unknown[]; - /** @internal Type-level only - used to track the alias for type inference */ - private readonly __alias?; - constructor(sql: string, params?: unknown[]); - /** Returns a unique symbol key for this fragment, creating and caching it on first access. */ - get key(): RawQueryFragmentSymbol; - /** Creates a new fragment with an alias appended via `as ??`. */ - as(alias: A): RawQueryFragment; - [Symbol.toPrimitive](hint: 'string'): RawQueryFragmentSymbol; - get [Symbol.toStringTag](): string; - toJSON(): string; - clone(): this; - /** Checks whether the given value is a symbol that maps to a known raw query fragment. */ - static isKnownFragmentSymbol(key: unknown): key is RawQueryFragmentSymbol; - /** Checks whether an object has any symbol keys that are known raw query fragments. */ - static hasObjectFragments(object: unknown): boolean; - /** Checks whether the given value is a RawQueryFragment instance or a known fragment symbol. */ - static isKnownFragment(key: unknown): key is RawQueryFragment | symbol; - /** Retrieves the RawQueryFragment associated with the given key (instance or symbol). */ - static getKnownFragment(key: unknown): RawQueryFragment | undefined; -} -export { RawQueryFragment as Raw }; -/** Checks whether the given value is a `RawQueryFragment` instance. */ -export declare function isRaw(value: unknown): value is RawQueryFragment; -/** @internal */ -export declare const ALIAS_REPLACEMENT = '[::alias::]'; -/** @internal */ -export declare const ALIAS_REPLACEMENT_RE = '\\[::alias::\\]'; -/** - * Creates raw SQL query fragment that can be assigned to a property or part of a filter. This fragment is represented - * by `RawQueryFragment` class instance that can be serialized to a string, so it can be used both as an object value - * and key. When serialized, the fragment key gets cached and only such cached key will be recognized by the ORM. - * This adds a runtime safety to the raw query fragments. - * - * > **`raw()` helper is required since v6 to use a raw fragment in your query, both through EntityManager and QueryBuilder.** - * - * ```ts - * // as a value - * await em.find(User, { time: raw('now()') }); - * - * // as a key - * await em.find(User, { [raw('lower(name)')]: name.toLowerCase() }); - * - * // value can be empty array - * await em.find(User, { [raw('(select 1 = 1)')]: [] }); - * ``` - * - * The `raw` helper supports several signatures, you can pass in a callback that receives the current property alias: - * - * ```ts - * await em.find(User, { [raw(alias => `lower(${alias}.name)`)]: name.toLowerCase() }); - * ``` - * - * You can also use the `sql` tagged template function, which works the same, but supports only the simple string signature: - * - * ```ts - * await em.find(User, { [sql`lower(name)`]: name.toLowerCase() }); - * ``` - * - * When using inside filters, you might have to use a callback signature to create new raw instance for every filter usage. - * - * ```ts - * @Filter({ name: 'long', cond: () => ({ [raw('length(perex)')]: { $gt: 10000 } }) }) - * ``` - * - * The `raw` helper can be used within indexes and uniques to write database-agnostic SQL expressions. In that case, you can use `'??'` to tag your database identifiers (table name, column names, index name, ...) inside your expression, and pass those identifiers as a second parameter to the `raw` helper. Internally, those will automatically be quoted according to the database in use: - * - * ```ts - * // On postgres, will produce: create index "index custom_idx_on_name" on "library.author" ("country") - * // On mysql, will produce: create index `index custom_idx_on_name` on `library.author` (`country`) - * @Index({ name: 'custom_idx_on_name', expression: (table, columns) => raw(`create index ?? on ?? (??)`, ['custom_idx_on_name', table, columns.name]) }) - * @Entity({ schema: 'library' }) - * export class Author { ... } - * ``` - * - * You can also use the `quote` tag function to write database-agnostic SQL expressions. The end-result is the same as using the `raw` function regarding database identifiers quoting, only to have a more elegant expression syntax: - * - * ```ts - * @Index({ name: 'custom_idx_on_name', expression: (table, columns) => quote`create index ${'custom_idx_on_name'} on ${table} (${columns.name})` }) - * @Entity({ schema: 'library' }) - * export class Author { ... } - * ``` - */ -export declare function raw( - sql: EntityKey | EntityKey[] | AnyString | ((alias: string) => string) | RawQueryFragment, - params?: readonly unknown[] | Dictionary, -): R; -/** - * Alternative to the `raw()` helper allowing to use it as a tagged template function for the simple cases. - * - * ```ts - * // as a value - * await em.find(User, { time: sql`now()` }); - * - * // as a key - * await em.find(User, { [sql`lower(name)`]: name.toLowerCase() }); - * - * // value can be empty array - * await em.find(User, { [sql`(select 1 = 1)`]: [] }); - * - * // with type parameter for assignment without casting - * entity.date = sql`now()`; - * ``` - */ -export declare function sql(sql: readonly string[], ...values: unknown[]): R; -export declare namespace sql { - var ref: (...keys: string[]) => RawQueryFragment & symbol; - var now: (length?: number) => RawQueryFragment & symbol; - var lower: & symbol, T extends object = any>( - key: string | ((alias: string) => string), - ) => R; - var upper: & symbol, T extends object = any>( - key: string | ((alias: string) => string), - ) => R; -} -/** Creates a raw SQL function expression wrapping the given key (e.g., `lower(name)`). */ -export declare function createSqlFunction( - func: string, - key: string | ((alias: string) => string), -): R; -/** - * Tag function providing quoting of db identifiers (table name, columns names, index names, ...). - * - * Within the template literal on which the tag function is applied, all placeholders are considered to be database identifiers, and will thus be quoted as so according to the database in use. - * - * ```ts - * // On postgres, will produce: create index "index custom_idx_on_name" on "library.author" ("name") - * // On mysql, will produce: create index `index custom_idx_on_name` on `library.author` (`name`) - * @Index({ name: 'custom_idx_on_name', expression: (table, columns, indexName) => quote`create index ${indexName} on ${table} (${columns.name})` }) - * @Entity({ schema: 'library' }) - * export class Author { ... } - * ``` - */ -export declare function quote( - expParts: readonly string[], - ...values: ( - | string - | { - toString(): string; - } - )[] -): RawQueryFragment & symbol; diff --git a/node_modules/@mikro-orm/core/utils/RawQueryFragment.js b/node_modules/@mikro-orm/core/utils/RawQueryFragment.js deleted file mode 100644 index be99856..0000000 --- a/node_modules/@mikro-orm/core/utils/RawQueryFragment.js +++ /dev/null @@ -1,217 +0,0 @@ -import { Utils } from './Utils.js'; -/** Represents a raw SQL fragment with optional parameters, usable as both a value and an object key via Symbol coercion. */ -export class RawQueryFragment { - sql; - params; - static #rawQueryReferences = new WeakMap(); - #key; - constructor(sql, params = []) { - this.sql = sql; - this.params = params; - } - /** Returns a unique symbol key for this fragment, creating and caching it on first access. */ - get key() { - if (!this.#key) { - this.#key = Symbol(this.toJSON()); - RawQueryFragment.#rawQueryReferences.set(this.#key, this); - } - return this.#key; - } - /** Creates a new fragment with an alias appended via `as ??`. */ - as(alias) { - return new RawQueryFragment(`${this.sql} as ??`, [...this.params, alias]); - } - [Symbol.toPrimitive](hint) { - // if a fragment is converted to string (used as an object key), return a unique symbol - // and save a weak reference to map so we can retrieve it when compiling the query - if (hint === 'string') { - return this.key; - } - throw new Error(`Trying to modify raw SQL fragment: '${this.sql}'`); - } - get [Symbol.toStringTag]() { - return this.toJSON(); - } - toJSON() { - return `raw('${this.sql}')`; - } - clone() { - return this; - } - /** Checks whether the given value is a symbol that maps to a known raw query fragment. */ - static isKnownFragmentSymbol(key) { - return typeof key === 'symbol' && this.#rawQueryReferences.has(key); - } - /** Checks whether an object has any symbol keys that are known raw query fragments. */ - static hasObjectFragments(object) { - return ( - Utils.isPlainObject(object) && - Object.getOwnPropertySymbols(object).some(symbol => this.isKnownFragmentSymbol(symbol)) - ); - } - /** Checks whether the given value is a RawQueryFragment instance or a known fragment symbol. */ - static isKnownFragment(key) { - if (key instanceof RawQueryFragment) { - return true; - } - return this.isKnownFragmentSymbol(key); - } - /** Retrieves the RawQueryFragment associated with the given key (instance or symbol). */ - static getKnownFragment(key) { - if (key instanceof RawQueryFragment) { - return key; - } - if (typeof key !== 'symbol') { - return; - } - return this.#rawQueryReferences.get(key); - } - /** @ignore */ - /* v8 ignore next */ - [Symbol.for('nodejs.util.inspect.custom')]() { - if (this.params) { - return { sql: this.sql, params: this.params }; - } - return { sql: this.sql }; - } -} -export { RawQueryFragment as Raw }; -Object.defineProperties(RawQueryFragment.prototype, { - __raw: { value: true, enumerable: false }, -}); -/** Checks whether the given value is a `RawQueryFragment` instance. */ -export function isRaw(value) { - return typeof value === 'object' && value !== null && '__raw' in value; -} -/** @internal */ -export const ALIAS_REPLACEMENT = '[::alias::]'; -/** @internal */ -export const ALIAS_REPLACEMENT_RE = '\\[::alias::\\]'; -/** - * Creates raw SQL query fragment that can be assigned to a property or part of a filter. This fragment is represented - * by `RawQueryFragment` class instance that can be serialized to a string, so it can be used both as an object value - * and key. When serialized, the fragment key gets cached and only such cached key will be recognized by the ORM. - * This adds a runtime safety to the raw query fragments. - * - * > **`raw()` helper is required since v6 to use a raw fragment in your query, both through EntityManager and QueryBuilder.** - * - * ```ts - * // as a value - * await em.find(User, { time: raw('now()') }); - * - * // as a key - * await em.find(User, { [raw('lower(name)')]: name.toLowerCase() }); - * - * // value can be empty array - * await em.find(User, { [raw('(select 1 = 1)')]: [] }); - * ``` - * - * The `raw` helper supports several signatures, you can pass in a callback that receives the current property alias: - * - * ```ts - * await em.find(User, { [raw(alias => `lower(${alias}.name)`)]: name.toLowerCase() }); - * ``` - * - * You can also use the `sql` tagged template function, which works the same, but supports only the simple string signature: - * - * ```ts - * await em.find(User, { [sql`lower(name)`]: name.toLowerCase() }); - * ``` - * - * When using inside filters, you might have to use a callback signature to create new raw instance for every filter usage. - * - * ```ts - * @Filter({ name: 'long', cond: () => ({ [raw('length(perex)')]: { $gt: 10000 } }) }) - * ``` - * - * The `raw` helper can be used within indexes and uniques to write database-agnostic SQL expressions. In that case, you can use `'??'` to tag your database identifiers (table name, column names, index name, ...) inside your expression, and pass those identifiers as a second parameter to the `raw` helper. Internally, those will automatically be quoted according to the database in use: - * - * ```ts - * // On postgres, will produce: create index "index custom_idx_on_name" on "library.author" ("country") - * // On mysql, will produce: create index `index custom_idx_on_name` on `library.author` (`country`) - * @Index({ name: 'custom_idx_on_name', expression: (table, columns) => raw(`create index ?? on ?? (??)`, ['custom_idx_on_name', table, columns.name]) }) - * @Entity({ schema: 'library' }) - * export class Author { ... } - * ``` - * - * You can also use the `quote` tag function to write database-agnostic SQL expressions. The end-result is the same as using the `raw` function regarding database identifiers quoting, only to have a more elegant expression syntax: - * - * ```ts - * @Index({ name: 'custom_idx_on_name', expression: (table, columns) => quote`create index ${'custom_idx_on_name'} on ${table} (${columns.name})` }) - * @Entity({ schema: 'library' }) - * export class Author { ... } - * ``` - */ -export function raw(sql, params) { - if (sql instanceof RawQueryFragment) { - return sql; - } - if (sql instanceof Function) { - sql = sql(ALIAS_REPLACEMENT); - } - if (sql === '??' && Array.isArray(params)) { - return new RawQueryFragment(sql, params); - } - if (Array.isArray(sql)) { - // for composite FK we return just a simple string - return Utils.getPrimaryKeyHash(sql); - } - if (typeof params === 'object' && !Array.isArray(params)) { - const pairs = Object.entries(params); - const objectParams = []; - for (const [key, value] of pairs) { - sql = sql.replace(`:${key}:`, '??'); - sql = sql.replace(`:${key}`, '?'); - objectParams.push(value); - } - return new RawQueryFragment(sql, objectParams); - } - return new RawQueryFragment(sql, params); -} -/** - * Alternative to the `raw()` helper allowing to use it as a tagged template function for the simple cases. - * - * ```ts - * // as a value - * await em.find(User, { time: sql`now()` }); - * - * // as a key - * await em.find(User, { [sql`lower(name)`]: name.toLowerCase() }); - * - * // value can be empty array - * await em.find(User, { [sql`(select 1 = 1)`]: [] }); - * - * // with type parameter for assignment without casting - * entity.date = sql`now()`; - * ``` - */ -export function sql(sql, ...values) { - return raw(sql.join('?'), values); -} -/** Creates a raw SQL function expression wrapping the given key (e.g., `lower(name)`). */ -export function createSqlFunction(func, key) { - if (typeof key === 'string') { - return raw(`${func}(${key})`); - } - return raw(a => `${func}(${key(a)})`); -} -sql.ref = (...keys) => raw('??', [keys.join('.')]); -sql.now = length => raw('current_timestamp' + (length == null ? '' : `(${length})`)); -sql.lower = key => createSqlFunction('lower', key); -sql.upper = key => createSqlFunction('upper', key); -/** - * Tag function providing quoting of db identifiers (table name, columns names, index names, ...). - * - * Within the template literal on which the tag function is applied, all placeholders are considered to be database identifiers, and will thus be quoted as so according to the database in use. - * - * ```ts - * // On postgres, will produce: create index "index custom_idx_on_name" on "library.author" ("name") - * // On mysql, will produce: create index `index custom_idx_on_name` on `library.author` (`name`) - * @Index({ name: 'custom_idx_on_name', expression: (table, columns, indexName) => quote`create index ${indexName} on ${table} (${columns.name})` }) - * @Entity({ schema: 'library' }) - * export class Author { ... } - * ``` - */ -export function quote(expParts, ...values) { - return raw(expParts.join('??'), values); -} diff --git a/node_modules/@mikro-orm/core/utils/RequestContext.d.ts b/node_modules/@mikro-orm/core/utils/RequestContext.d.ts deleted file mode 100644 index 041f869..0000000 --- a/node_modules/@mikro-orm/core/utils/RequestContext.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { EntityManager } from '../EntityManager.js'; -import { type LoggingOptions } from '../logging/Logger.js'; -/** - * Uses `AsyncLocalStorage` to create async context that holds the current EM fork. - */ -export declare class RequestContext { - readonly map: Map; - private static storage; - private static counter; - readonly id: number; - constructor(map: Map); - /** - * Returns default EntityManager. - */ - get em(): EntityManager | undefined; - /** - * Creates new RequestContext instance and runs the code inside its domain. - * If the handler is async, the return value needs to be awaited. - * Uses `AsyncLocalStorage.run()`, suitable for regular express style middlewares with a `next` callback. - */ - static create(em: EntityManager | EntityManager[], next: (...args: any[]) => T, options?: CreateContextOptions): T; - /** - * Creates new RequestContext instance and runs the code inside its domain. - * If the handler is async, the return value needs to be awaited. - * Uses `AsyncLocalStorage.enterWith()`, suitable for elysia style middlewares without a `next` callback. - */ - static enter(em: EntityManager | EntityManager[], options?: CreateContextOptions): void; - /** - * Returns current RequestContext (if available). - */ - static currentRequestContext(): RequestContext | undefined; - /** - * Returns current EntityManager (if available). - */ - static getEntityManager(name?: string): EntityManager | undefined; - private static createContext; -} -/** Options for creating a new RequestContext, allowing schema and logger overrides. */ -export interface CreateContextOptions { - schema?: string; - loggerContext?: LoggingOptions; -} diff --git a/node_modules/@mikro-orm/core/utils/RequestContext.js b/node_modules/@mikro-orm/core/utils/RequestContext.js deleted file mode 100644 index 44ff800..0000000 --- a/node_modules/@mikro-orm/core/utils/RequestContext.js +++ /dev/null @@ -1,59 +0,0 @@ -import { createAsyncContext } from './AsyncContext.js'; -/** - * Uses `AsyncLocalStorage` to create async context that holds the current EM fork. - */ -export class RequestContext { - map; - static storage = createAsyncContext(); - static counter = 1; - id = RequestContext.counter++; - constructor(map) { - this.map = map; - } - /** - * Returns default EntityManager. - */ - get em() { - return this.map.get('default'); - } - /** - * Creates new RequestContext instance and runs the code inside its domain. - * If the handler is async, the return value needs to be awaited. - * Uses `AsyncLocalStorage.run()`, suitable for regular express style middlewares with a `next` callback. - */ - static create(em, next, options = {}) { - const ctx = this.createContext(em, options); - return this.storage.run(ctx, next); - } - /** - * Creates new RequestContext instance and runs the code inside its domain. - * If the handler is async, the return value needs to be awaited. - * Uses `AsyncLocalStorage.enterWith()`, suitable for elysia style middlewares without a `next` callback. - */ - static enter(em, options = {}) { - const ctx = this.createContext(em, options); - this.storage.enterWith(ctx); - } - /** - * Returns current RequestContext (if available). - */ - static currentRequestContext() { - return this.storage.getStore(); - } - /** - * Returns current EntityManager (if available). - */ - static getEntityManager(name = 'default') { - const context = RequestContext.currentRequestContext(); - return context ? context.map.get(name) : undefined; - } - static createContext(em, options = {}) { - const forks = new Map(); - if (Array.isArray(em)) { - em.forEach(em => forks.set(em.name, em.fork({ useContext: true, ...options }))); - } else { - forks.set(em.name, em.fork({ useContext: true, ...options })); - } - return new RequestContext(forks); - } -} diff --git a/node_modules/@mikro-orm/core/utils/TransactionContext.d.ts b/node_modules/@mikro-orm/core/utils/TransactionContext.d.ts deleted file mode 100644 index bef72fb..0000000 --- a/node_modules/@mikro-orm/core/utils/TransactionContext.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { EntityManager } from '../EntityManager.js'; -/** Uses `AsyncLocalStorage` to maintain a transaction-scoped EntityManager context across async operations. */ -export declare class TransactionContext { - readonly em: EntityManager; - private static storage; - readonly id: number; - constructor(em: EntityManager); - /** - * Creates new TransactionContext instance and runs the code inside its domain. - */ - static create(em: EntityManager, next: (...args: any[]) => T): T; - /** - * Returns current TransactionContext (if available). - */ - static currentTransactionContext(): TransactionContext | undefined; - /** - * Returns current EntityManager (if available). - */ - static getEntityManager(name?: string): EntityManager | undefined; -} diff --git a/node_modules/@mikro-orm/core/utils/TransactionContext.js b/node_modules/@mikro-orm/core/utils/TransactionContext.js deleted file mode 100644 index ace1797..0000000 --- a/node_modules/@mikro-orm/core/utils/TransactionContext.js +++ /dev/null @@ -1,31 +0,0 @@ -import { createAsyncContext } from './AsyncContext.js'; -/** Uses `AsyncLocalStorage` to maintain a transaction-scoped EntityManager context across async operations. */ -export class TransactionContext { - em; - static storage = createAsyncContext(); - id; - constructor(em) { - this.em = em; - this.id = this.em._id; - } - /** - * Creates new TransactionContext instance and runs the code inside its domain. - */ - static create(em, next) { - const context = new TransactionContext(em); - return this.storage.run(context, next); - } - /** - * Returns current TransactionContext (if available). - */ - static currentTransactionContext() { - return this.storage.getStore(); - } - /** - * Returns current EntityManager (if available). - */ - static getEntityManager(name = 'default') { - const context = TransactionContext.currentTransactionContext(); - return context?.em.name === name ? context.em : undefined; - } -} diff --git a/node_modules/@mikro-orm/core/utils/TransactionManager.d.ts b/node_modules/@mikro-orm/core/utils/TransactionManager.d.ts deleted file mode 100644 index fbb10d9..0000000 --- a/node_modules/@mikro-orm/core/utils/TransactionManager.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -import type { EntityManager } from '../EntityManager.js'; -import { type TransactionOptions } from '../enums.js'; -/** - * Manages transaction lifecycle and propagation for EntityManager. - */ -export declare class TransactionManager { - private readonly em; - constructor(em: EntityManager); - /** - * Main entry point for handling transactional operations with propagation support. - */ - handle(cb: (em: EntityManager) => T | Promise, options?: TransactionOptions): Promise; - /** - * Executes the callback with the specified propagation type. - */ - private executeWithPropagation; - /** - * Suspends the current transaction and returns the suspended resources. - */ - private suspendTransaction; - /** - * Resumes a previously suspended transaction. - */ - private resumeTransaction; - /** - * Executes operation without transaction context. - */ - private executeWithoutTransaction; - /** - * Creates new independent transaction, suspending any existing one. - */ - private executeWithNewTransaction; - /** - * Creates new transaction context. - */ - private createNewTransaction; - /** - * Executes nested transaction with savepoint. - */ - private executeNestedTransaction; - /** - * Creates a fork of the EntityManager with the given options. - */ - private createFork; - /** - * Determines if changes should be propagated to the upper context. - */ - private shouldPropagateToUpperContext; - /** - * Merges entities from fork to parent EntityManager. - */ - private mergeEntitiesToParent; - /** - * Registers a deletion handler to unset entity identities after flush. - */ - private registerDeletionHandler; - /** - * Processes transaction execution. - */ - private processTransaction; - /** - * Executes transaction workflow with entity synchronization. - */ - private executeTransactionFlow; -} diff --git a/node_modules/@mikro-orm/core/utils/TransactionManager.js b/node_modules/@mikro-orm/core/utils/TransactionManager.js deleted file mode 100644 index 1091f88..0000000 --- a/node_modules/@mikro-orm/core/utils/TransactionManager.js +++ /dev/null @@ -1,225 +0,0 @@ -import { ReferenceKind, TransactionPropagation } from '../enums.js'; -import { TransactionEventBroadcaster } from '../events/TransactionEventBroadcaster.js'; -import { TransactionContext } from '../utils/TransactionContext.js'; -import { ChangeSetType } from '../unit-of-work/ChangeSet.js'; -import { TransactionStateError } from '../errors.js'; -import { helper } from '../entity/wrap.js'; -/** - * Manages transaction lifecycle and propagation for EntityManager. - */ -export class TransactionManager { - em; - constructor(em) { - this.em = em; - } - /** - * Main entry point for handling transactional operations with propagation support. - */ - async handle(cb, options = {}) { - const em = this.em.getContext(false); - options.propagation ??= TransactionPropagation.NESTED; - options.ctx ??= em.getTransactionContext(); - const hasExistingTransaction = !!em.getTransactionContext(); - return this.executeWithPropagation(options.propagation, em, cb, options, hasExistingTransaction); - } - /** - * Executes the callback with the specified propagation type. - */ - async executeWithPropagation(propagation, em, cb, options, hasExistingTransaction) { - switch (propagation) { - case TransactionPropagation.NOT_SUPPORTED: - return this.executeWithoutTransaction(em, cb, options); - case TransactionPropagation.REQUIRES_NEW: - return this.executeWithNewTransaction(em, cb, options, hasExistingTransaction); - case TransactionPropagation.REQUIRED: - if (hasExistingTransaction) { - return cb(em); - } - return this.createNewTransaction(em, cb, options); - case TransactionPropagation.NESTED: - if (hasExistingTransaction) { - return this.executeNestedTransaction(em, cb, options); - } - return this.createNewTransaction(em, cb, options); - case TransactionPropagation.SUPPORTS: - if (hasExistingTransaction) { - return cb(em); - } - return this.executeWithoutTransaction(em, cb, options); - case TransactionPropagation.MANDATORY: - if (!hasExistingTransaction) { - throw TransactionStateError.requiredTransactionNotFound(propagation); - } - return cb(em); - case TransactionPropagation.NEVER: - if (hasExistingTransaction) { - throw TransactionStateError.transactionNotAllowed(propagation); - } - return this.executeWithoutTransaction(em, cb, options); - default: - throw TransactionStateError.invalidPropagation(propagation); - } - } - /** - * Suspends the current transaction and returns the suspended resources. - */ - suspendTransaction(em) { - const suspended = em.getTransactionContext(); - em.resetTransactionContext(); - return suspended; - } - /** - * Resumes a previously suspended transaction. - */ - resumeTransaction(em, suspended) { - if (suspended != null) { - em.setTransactionContext(suspended); - } - } - /** - * Executes operation without transaction context. - */ - async executeWithoutTransaction(em, cb, options) { - const suspended = this.suspendTransaction(em); - const fork = this.createFork(em, { ...options, disableTransactions: true }); - const propagateToUpperContext = this.shouldPropagateToUpperContext(em); - try { - return await this.executeTransactionFlow(fork, cb, propagateToUpperContext, em); - } finally { - this.resumeTransaction(em, suspended); - } - } - /** - * Creates new independent transaction, suspending any existing one. - */ - async executeWithNewTransaction(em, cb, options, hasExistingTransaction) { - const fork = this.createFork(em, options); - let suspended = null; - // Suspend existing transaction if present - if (hasExistingTransaction) { - suspended = this.suspendTransaction(em); - } - const newOptions = { ...options, ctx: undefined }; - try { - return await this.processTransaction(em, fork, cb, newOptions); - } finally { - if (suspended != null) { - this.resumeTransaction(em, suspended); - } - } - } - /** - * Creates new transaction context. - */ - async createNewTransaction(em, cb, options) { - const fork = this.createFork(em, options); - return this.processTransaction(em, fork, cb, options); - } - /** - * Executes nested transaction with savepoint. - */ - async executeNestedTransaction(em, cb, options) { - const fork = this.createFork(em, options); - // Pass existing context to create savepoint - const nestedOptions = { ...options, ctx: em.getTransactionContext() }; - return this.processTransaction(em, fork, cb, nestedOptions); - } - /** - * Creates a fork of the EntityManager with the given options. - */ - createFork(em, options) { - return em.fork({ - clear: options.clear ?? false, - flushMode: options.flushMode, - cloneEventManager: true, - disableTransactions: options.ignoreNestedTransactions, - loggerContext: options.loggerContext, - }); - } - /** - * Determines if changes should be propagated to the upper context. - */ - shouldPropagateToUpperContext(em) { - return !em.global || this.em.config.get('allowGlobalContext'); - } - /** - * Merges entities from fork to parent EntityManager. - */ - mergeEntitiesToParent(fork, parent) { - const parentUoW = parent.getUnitOfWork(false); - // perf: if parent is empty, we can just move all entities from the fork to skip the `em.merge` overhead - if (parentUoW.getIdentityMap().keys().length === 0) { - for (const entity of fork.getUnitOfWork(false).getIdentityMap()) { - parentUoW.getIdentityMap().store(entity); - helper(entity).__em = parent; - } - return; - } - for (const entity of fork.getUnitOfWork(false).getIdentityMap()) { - const wrapped = helper(entity); - const meta = wrapped.__meta; - const parentEntity = parentUoW.getById(meta.class, wrapped.getPrimaryKey(), parent.schema, true); - if (parentEntity && parentEntity !== entity) { - const parentWrapped = helper(parentEntity); - parentWrapped.__data = wrapped.__data; - parentWrapped.__originalEntityData = wrapped.__originalEntityData; - for (const prop of meta.hydrateProps) { - if (prop.kind === ReferenceKind.SCALAR) { - parentEntity[prop.name] = entity[prop.name]; - } - } - } else { - parentUoW.merge(entity, new Set([entity])); - } - } - } - /** - * Registers a deletion handler to unset entity identities after flush. - */ - registerDeletionHandler(fork, parent) { - fork.getEventManager().registerSubscriber({ - afterFlush: args => { - const deletionChangeSets = args.uow - .getChangeSets() - .filter(cs => cs.type === ChangeSetType.DELETE || cs.type === ChangeSetType.DELETE_EARLY); - for (const cs of deletionChangeSets) { - parent.getUnitOfWork(false).unsetIdentity(cs.entity); - } - }, - }); - } - /** - * Processes transaction execution. - */ - async processTransaction(em, fork, cb, options) { - const propagateToUpperContext = this.shouldPropagateToUpperContext(em); - const eventBroadcaster = new TransactionEventBroadcaster(fork, undefined); - return TransactionContext.create(fork, () => - fork.getConnection().transactional( - async trx => { - fork.setTransactionContext(trx); - return this.executeTransactionFlow(fork, cb, propagateToUpperContext, em); - }, - { ...options, eventBroadcaster }, - ), - ); - } - /** - * Executes transaction workflow with entity synchronization. - */ - async executeTransactionFlow(fork, cb, propagateToUpperContext, parentEm) { - if (!propagateToUpperContext) { - const ret = await cb(fork); - await fork.flush(); - return ret; - } - // Setup: Register deletion handler before execution - this.registerDeletionHandler(fork, parentEm); - // Execute callback and flush - const ret = await cb(fork); - await fork.flush(); - // Synchronization: Merge entities back to the parent - this.mergeEntitiesToParent(fork, parentEm); - return ret; - } -} diff --git a/node_modules/@mikro-orm/core/utils/Utils.d.ts b/node_modules/@mikro-orm/core/utils/Utils.d.ts deleted file mode 100644 index 7313f2c..0000000 --- a/node_modules/@mikro-orm/core/utils/Utils.d.ts +++ /dev/null @@ -1,225 +0,0 @@ -import type { - CompiledFunctions, - Dictionary, - EntityData, - EntityDictionary, - EntityKey, - EntityMetadata, - EntityName, - EntityProperty, - Primary, -} from '../typings.js'; -import type { Collection } from '../entity/Collection.js'; -import type { Platform } from '../platforms/Platform.js'; -import { type ScalarReference } from '../entity/Reference.js'; -import { type RawQueryFragmentSymbol } from './RawQueryFragment.js'; -/** Deeply compares two objects for equality, handling dates, regexes, and raw fragments. */ -export declare function compareObjects(a: any, b: any): boolean; -/** Compares two arrays element-by-element for deep equality. */ -export declare function compareArrays(a: any[] | string, b: any[] | string): boolean; -/** Compares two boolean values, treating numeric 0/1 as false/true. */ -export declare function compareBooleans(a: unknown, b: unknown): boolean; -/** Compares two byte arrays element-by-element. */ -export declare function compareBuffers(a: Uint8Array, b: Uint8Array): boolean; -/** - * Checks if arguments are deeply (but not strictly) equal. - */ -export declare function equals(a: any, b: any): boolean; -/** Parses a JSON string safely, returning the original value if parsing fails. */ -export declare function parseJsonSafe(value: unknown): T; -/** Collection of general-purpose utility methods used throughout the ORM. */ -export declare class Utils { - #private; - static readonly PK_SEPARATOR = '~~~'; - /** - * Checks if the argument is instance of `Object`. Returns false for arrays. - */ - static isObject(o: any): o is T; - /** - * Removes `undefined` properties (recursively) so they are not saved as nulls - */ - static dropUndefinedProperties(o: any, value?: null, visited?: Set): void; - /** - * Returns the number of properties on `obj`. This is 20x faster than Object.keys(obj).length. - * @see https://github.com/deepkit/deepkit-framework/blob/master/packages/core/src/core.ts - */ - static getObjectKeysSize(object: Dictionary): number; - /** - * Returns true if `obj` has at least one property. This is 20x faster than Object.keys(obj).length. - * @see https://github.com/deepkit/deepkit-framework/blob/master/packages/core/src/core.ts - */ - static hasObjectKeys(object: Dictionary): boolean; - /** - * Checks if arguments are deeply (but not strictly) equal. - */ - static equals(a: any, b: any): boolean; - /** - * Gets array without duplicates. - */ - static unique(items: T[]): T[]; - /** - * Merges all sources into the target recursively. - */ - static merge(target: any, ...sources: any[]): any; - /** - * Merges all sources into the target recursively. Ignores `undefined` values. - */ - static mergeConfig(target: T, ...sources: Dictionary[]): T; - /** - * Merges all sources into the target recursively. - */ - private static _merge; - /** - * Creates deep copy of given object. - */ - static copy(entity: T, respectCustomCloneMethod?: boolean): T; - /** - * Normalize the argument to always be an array. - */ - static asArray(data?: T | readonly T[] | Iterable, strict?: boolean): T[]; - /** - * Checks if the value is iterable, but considers strings and buffers as not iterable. - */ - static isIterable(value: unknown): value is Iterable; - /** - * Renames object key, keeps order of properties. - */ - static renameKey(payload: T, from: string | keyof T, to: string): void; - /** - * Returns array of functions argument names. Uses basic regex for source code analysis, might not work with advanced syntax. - */ - static getConstructorParams(func: { toString(): string }): string[] | undefined; - /** - * Checks whether the argument looks like primary key (string, number or ObjectId). - */ - static isPrimaryKey(key: any, allowComposite?: boolean): key is Primary; - /** - * Extracts primary key from `data`. Accepts objects or primary keys directly. - */ - static extractPK(data: any, meta?: EntityMetadata, strict?: boolean): Primary | string | null; - static getCompositeKeyValue( - data: EntityData, - meta: EntityMetadata, - convertCustomTypes?: boolean | 'convertToDatabaseValue' | 'convertToJSValue', - platform?: Platform, - ): Primary; - static getCompositeKeyHash( - data: EntityData, - meta: EntityMetadata, - convertCustomTypes?: boolean, - platform?: Platform, - flat?: boolean, - ): string; - static getPrimaryKeyHash(pks: (string | Buffer | Date)[]): string; - static splitPrimaryKeys(key: string): EntityKey[]; - static getPrimaryKeyValues( - entity: T, - meta: EntityMetadata, - allowScalar?: boolean, - convertCustomTypes?: boolean, - ): any; - static getPrimaryKeyCond(entity: T, primaryKeys: EntityKey[]): Record> | null; - /** - * Maps nested FKs from `[1, 2, 3]` to `[1, [2, 3]]`. - */ - static mapFlatCompositePrimaryKey( - fk: Primary[], - prop: EntityProperty, - fieldNames?: string[], - idx?: number, - ): Primary | Primary[]; - static getPrimaryKeyCondFromArray( - pks: Primary[], - meta: EntityMetadata, - ): Record>; - static getOrderedPrimaryKeys( - id: Primary | Record>, - meta: EntityMetadata, - platform?: Platform, - convertCustomTypes?: boolean, - allowScalar?: boolean, - ): Primary[]; - /** - * Checks whether given object is an entity instance. - */ - static isEntity(data: any, allowReference?: boolean): data is T & {}; - /** - * Checks whether given object is a scalar reference. - */ - static isScalarReference(data: any, allowReference?: boolean): data is ScalarReference & {}; - /** - * Checks whether the argument is empty (array without items, object without keys or falsy value). - */ - static isEmpty(data: any): boolean; - /** - * Gets string name of given class. - */ - static className(classOrName: string | EntityName): string; - static extractChildElements(items: string[], prefix: string, allSymbol?: string): string[]; - /** - * Tries to detect TypeScript support. - */ - static detectTypeScriptSupport(): boolean; - /** - * Gets the type of the argument. - */ - static getObjectType(value: any): string; - /** - * Checks whether the value is POJO (e.g. `{ foo: 'bar' }`, and not instance of `Foo`) - */ - static isPlainObject(value: any): value is T; - /** - * Executes the `cb` promise serially on every element of the `items` array and returns array of resolved values. - */ - static runSerial(items: Iterable, cb: (item: U) => Promise): Promise; - static isCollection(item: any): item is Collection; - static hash(data: string, length?: number): string; - static runIfNotEmpty(clause: () => any, data: any): void; - static defaultValue(prop: T, option: keyof T, defaultValue: any): void; - static findDuplicates(items: T[]): T[]; - static removeDuplicates(items: T[]): T[]; - static randomInt(min: number, max: number): number; - /** - * Extracts all possible values of a TS enum. Works with both string and numeric enums. - */ - static extractEnumValues(target: Dictionary): (string | number)[]; - static flatten(arrays: T[][], deep?: boolean): T[]; - static isOperator(key: PropertyKey, includeGroupOperators?: boolean): boolean; - static hasNestedKey(object: unknown, key: string): boolean; - static getORMVersion(): string; - static createFunction( - context: Map, - code: string, - compiledFunctions?: CompiledFunctions, - key?: string, - ): any; - static callCompiledFunction(fn: (...args: T) => R, ...args: T): R; - static unwrapProperty( - entity: T, - meta: EntityMetadata, - prop: EntityProperty, - payload?: boolean, - ): [unknown, number[]][]; - static setPayloadProperty( - entity: EntityDictionary, - meta: EntityMetadata, - prop: EntityProperty, - value: unknown, - idx: number[], - ): void; - static tryImport({ - module, - warning, - }: { - module: string; - warning?: string; - }): Promise; - static xor(a: boolean, b: boolean): boolean; - static keys(obj: T): (keyof T)[]; - static values(obj: T): T[keyof T][]; - static entries(obj: T): [keyof T, T[keyof T]][]; - static primaryKeyToObject(meta: EntityMetadata, primaryKey: Primary | T, visible?: (keyof T)[]): T; - static getObjectQueryKeys>( - obj: T, - ): (K | RawQueryFragmentSymbol)[]; -} diff --git a/node_modules/@mikro-orm/core/utils/Utils.js b/node_modules/@mikro-orm/core/utils/Utils.js deleted file mode 100644 index a7aa067..0000000 --- a/node_modules/@mikro-orm/core/utils/Utils.js +++ /dev/null @@ -1,852 +0,0 @@ -import { clone } from './clone.js'; -import { GroupOperator, PlainObject, QueryOperator, ReferenceKind } from '../enums.js'; -import { helper } from '../entity/wrap.js'; -import { Raw } from './RawQueryFragment.js'; -function compareConstructors(a, b) { - if (a.constructor === b.constructor) { - return true; - } - if (!a.constructor) { - return b.constructor === Object; - } - if (!b.constructor) { - return a.constructor === Object; - } - return false; -} -/** Deeply compares two objects for equality, handling dates, regexes, and raw fragments. */ -export function compareObjects(a, b) { - if (a === b || (a == null && b == null)) { - return true; - } - if (!a || !b || typeof a !== 'object' || typeof b !== 'object' || !compareConstructors(a, b)) { - return false; - } - if (a.__raw && b.__raw) { - // eslint-disable-next-line @typescript-eslint/no-use-before-define - return a.sql === b.sql && compareArrays(a.params, b.params); - } - if (a instanceof Date && b instanceof Date) { - const timeA = a.getTime(); - const timeB = b.getTime(); - if (isNaN(timeA) || isNaN(timeB)) { - throw new Error('Comparing invalid dates is not supported'); - } - return timeA === timeB; - } - /* v8 ignore next */ - if ( - (typeof a === 'function' && typeof b === 'function') || - (a instanceof RegExp && b instanceof RegExp) || - (a instanceof String && b instanceof String) || - (a instanceof Number && b instanceof Number) - ) { - return a.toString() === b.toString(); - } - const keys = Object.keys(a); - const length = keys.length; - if (length !== Object.keys(b).length) { - return false; - } - for (let i = length; i-- !== 0; ) { - if (!Object.hasOwn(b, keys[i])) { - return false; - } - } - for (let i = length; i-- !== 0; ) { - const key = keys[i]; - // eslint-disable-next-line @typescript-eslint/no-use-before-define - if (!equals(a[key], b[key])) { - return false; - } - } - return true; -} -/** Compares two arrays element-by-element for deep equality. */ -export function compareArrays(a, b) { - const length = a.length; - if (length !== b.length) { - return false; - } - for (let i = length; i-- !== 0; ) { - // eslint-disable-next-line @typescript-eslint/no-use-before-define - if (!equals(a[i], b[i])) { - return false; - } - } - return true; -} -/** Compares two boolean values, treating numeric 0/1 as false/true. */ -export function compareBooleans(a, b) { - a = typeof a === 'number' ? Boolean(a) : a; - b = typeof b === 'number' ? Boolean(b) : b; - return a === b; -} -/** Compares two byte arrays element-by-element. */ -export function compareBuffers(a, b) { - const length = a.length; - if (length !== b.length) { - return false; - } - for (let i = length; i-- !== 0; ) { - if (a[i] !== b[i]) { - return false; - } - } - return true; -} -/** - * Checks if arguments are deeply (but not strictly) equal. - */ -export function equals(a, b) { - if (a === b) { - return true; - } - if (a && b && typeof a === 'object' && typeof b === 'object') { - if (Array.isArray(a)) { - return compareArrays(a, b); - } - if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) { - return compareBuffers(a, b); - } - return compareObjects(a, b); - } - return Number.isNaN(a) && Number.isNaN(b); -} -const equalsFn = equals; -/** Parses a JSON string safely, returning the original value if parsing fails. */ -export function parseJsonSafe(value) { - if (typeof value === 'string') { - /* v8 ignore next */ - try { - return JSON.parse(value); - } catch { - // ignore and return the value, as sometimes we get the parsed value, - // e.g. when it is a string value in JSON column - } - } - return value; -} -/** Collection of general-purpose utility methods used throughout the ORM. */ -export class Utils { - static PK_SEPARATOR = '~~~'; - static #ORM_VERSION = '7.0.2'; - /** - * Checks if the argument is instance of `Object`. Returns false for arrays. - */ - static isObject(o) { - return !!o && typeof o === 'object' && !Array.isArray(o); - } - /** - * Removes `undefined` properties (recursively) so they are not saved as nulls - */ - static dropUndefinedProperties(o, value, visited = new Set()) { - if (Array.isArray(o)) { - for (const item of o) { - Utils.dropUndefinedProperties(item, value, visited); - } - return; - } - if (!Utils.isPlainObject(o) || visited.has(o)) { - return; - } - visited.add(o); - for (const key of Object.keys(o)) { - if (o[key] === value) { - delete o[key]; - continue; - } - Utils.dropUndefinedProperties(o[key], value, visited); - } - } - /** - * Returns the number of properties on `obj`. This is 20x faster than Object.keys(obj).length. - * @see https://github.com/deepkit/deepkit-framework/blob/master/packages/core/src/core.ts - */ - static getObjectKeysSize(object) { - let size = 0; - for (const key in object) { - if (Object.hasOwn(object, key)) { - size++; - } - } - return size; - } - /** - * Returns true if `obj` has at least one property. This is 20x faster than Object.keys(obj).length. - * @see https://github.com/deepkit/deepkit-framework/blob/master/packages/core/src/core.ts - */ - static hasObjectKeys(object) { - for (const key in object) { - if (Object.hasOwn(object, key)) { - return true; - } - } - return false; - } - /** - * Checks if arguments are deeply (but not strictly) equal. - */ - static equals(a, b) { - return equalsFn(a, b); - } - /** - * Gets array without duplicates. - */ - static unique(items) { - if (items.length < 2) { - return items; - } - return [...new Set(items)]; - } - /** - * Merges all sources into the target recursively. - */ - static merge(target, ...sources) { - return Utils._merge(target, sources, false); - } - /** - * Merges all sources into the target recursively. Ignores `undefined` values. - */ - static mergeConfig(target, ...sources) { - return Utils._merge(target, sources, true); - } - /** - * Merges all sources into the target recursively. - */ - static _merge(target, sources, ignoreUndefined) { - if (!sources.length) { - return target; - } - const source = sources.shift(); - if (Utils.isObject(target) && Utils.isPlainObject(source)) { - for (const [key, value] of Object.entries(source)) { - if (ignoreUndefined && typeof value === 'undefined') { - continue; - } - if (Utils.isPlainObject(value)) { - if (!Utils.isObject(target[key])) { - target[key] = Utils.copy(value); - continue; - } - /* v8 ignore next */ - if (!(key in target)) { - Object.assign(target, { [key]: {} }); - } - Utils._merge(target[key], [value], ignoreUndefined); - } else { - Object.assign(target, { [key]: value }); - } - } - } - return Utils._merge(target, sources, ignoreUndefined); - } - /** - * Creates deep copy of given object. - */ - static copy(entity, respectCustomCloneMethod = true) { - return clone(entity, respectCustomCloneMethod); - } - /** - * Normalize the argument to always be an array. - */ - static asArray(data, strict = false) { - if (typeof data === 'undefined' && !strict) { - return []; - } - if (this.isIterable(data)) { - return Array.from(data); - } - return [data]; - } - /** - * Checks if the value is iterable, but considers strings and buffers as not iterable. - */ - static isIterable(value) { - if (value == null || typeof value === 'string' || ArrayBuffer.isView(value)) { - return false; - } - return typeof Object(value)[Symbol.iterator] === 'function'; - } - /** - * Renames object key, keeps order of properties. - */ - static renameKey(payload, from, to) { - if (Utils.isObject(payload) && from in payload && !(to in payload)) { - for (const key of Object.keys(payload)) { - const value = payload[key]; - delete payload[key]; - payload[from === key ? to : key] = value; - } - } - } - /** - * Returns array of functions argument names. Uses basic regex for source code analysis, might not work with advanced syntax. - */ - static getConstructorParams(func) { - const source = func.toString(); - const i = source.indexOf('constructor'); - if (i === -1) { - return undefined; - } - const start = source.indexOf('(', i); - if (start === -1) { - return undefined; - } - let depth = 0; - let end = start; - for (; end < source.length; end++) { - if (source[end] === '(') { - depth++; - } - if (source[end] === ')') { - depth--; - } - if (depth === 0) { - break; - } - } - const raw = source.slice(start + 1, end); - return raw - .split(',') - .map(s => s.trim().replace(/=.*$/, '').trim()) - .filter(Boolean) - .map(raw => (raw.startsWith('{') && raw.endsWith('}') ? '' : raw)); - } - /** - * Checks whether the argument looks like primary key (string, number or ObjectId). - */ - static isPrimaryKey(key, allowComposite = false) { - if (['string', 'number', 'bigint'].includes(typeof key)) { - return true; - } - if (allowComposite && Array.isArray(key) && key.every(v => Utils.isPrimaryKey(v, true))) { - return true; - } - if (Utils.isObject(key)) { - if (key.constructor?.name === 'ObjectId') { - return true; - } - if (!Utils.isPlainObject(key) && !Utils.isEntity(key, true)) { - return true; - } - } - return false; - } - /** - * Extracts primary key from `data`. Accepts objects or primary keys directly. - */ - static extractPK(data, meta, strict = false) { - if (Utils.isPrimaryKey(data)) { - return data; - } - if (Utils.isEntity(data, true)) { - const wrapped = helper(data); - if (wrapped.__meta.compositePK) { - return wrapped.getPrimaryKeys(); - } - return wrapped.getPrimaryKey(); - } - if (strict && meta && Utils.getObjectKeysSize(data) !== meta.primaryKeys.length) { - return null; - } - if (Utils.isPlainObject(data) && meta) { - if (meta.compositePK) { - return this.getCompositeKeyValue(data, meta); - } - return data[meta.primaryKeys[0]] ?? data[meta.serializedPrimaryKey] ?? null; - } - return null; - } - static getCompositeKeyValue(data, meta, convertCustomTypes = false, platform) { - return meta.primaryKeys.map((pk, idx) => { - const value = Array.isArray(data) ? data[idx] : data[pk]; - const prop = meta.properties[pk]; - if (prop.targetMeta && Utils.isPlainObject(value)) { - return this.getCompositeKeyValue(value, prop.targetMeta); - } - if (prop.customType && platform && convertCustomTypes) { - const method = typeof convertCustomTypes === 'string' ? convertCustomTypes : 'convertToJSValue'; - return prop.customType[method](value, platform); - } - return value; - }); - } - static getCompositeKeyHash(data, meta, convertCustomTypes = false, platform, flat = false) { - let pks = this.getCompositeKeyValue(data, meta, convertCustomTypes, platform); - if (flat) { - pks = Utils.flatten(pks); - } - return Utils.getPrimaryKeyHash(pks); - } - static getPrimaryKeyHash(pks) { - return pks - .map(pk => { - if (Buffer.isBuffer(pk)) { - return pk.toString('hex'); - } - if (pk instanceof Date) { - return pk.toISOString(); - } - return pk; - }) - .join(this.PK_SEPARATOR); - } - static splitPrimaryKeys(key) { - return key.split(this.PK_SEPARATOR); - } - static getPrimaryKeyValues(entity, meta, allowScalar = false, convertCustomTypes = false) { - /* v8 ignore next */ - if (entity == null) { - return entity; - } - function toArray(val) { - if (Utils.isPlainObject(val)) { - return Object.values(val).flatMap(v => toArray(v)); - } - return val; - } - let pk; - if (Utils.isEntity(entity, true)) { - pk = helper(entity).getPrimaryKey(convertCustomTypes); - } else { - pk = meta.primaryKeys.reduce((o, pk) => { - const targetMeta = meta.properties[pk].targetMeta; - if (targetMeta && Utils.isPlainObject(entity[pk])) { - o[pk] = Utils.getPrimaryKeyValues(entity[pk], targetMeta, allowScalar, convertCustomTypes); - } else { - o[pk] = entity[pk]; - } - return o; - }, {}); - } - if (meta.primaryKeys.length > 1) { - return toArray(pk); - } - if (allowScalar) { - if (Utils.isPlainObject(pk)) { - return pk[meta.primaryKeys[0]]; - } - return pk; - } - return [pk]; - } - static getPrimaryKeyCond(entity, primaryKeys) { - const cond = primaryKeys.reduce((o, pk) => { - o[pk] = Utils.extractPK(entity[pk]); - return o; - }, {}); - if (Object.values(cond).some(v => v === null)) { - return null; - } - return cond; - } - /** - * Maps nested FKs from `[1, 2, 3]` to `[1, [2, 3]]`. - */ - static mapFlatCompositePrimaryKey(fk, prop, fieldNames = prop.fieldNames, idx = 0) { - if (!prop.targetMeta) { - return fk[idx++]; - } - const parts = []; - for (const pk of prop.targetMeta.getPrimaryProps()) { - parts.push(this.mapFlatCompositePrimaryKey(fk, pk, fieldNames, idx)); - idx += pk.fieldNames.length; - } - if (parts.length < 2) { - return parts[0]; - } - return parts; - } - static getPrimaryKeyCondFromArray(pks, meta) { - return meta.getPrimaryProps().reduce((o, pk, idx) => { - if (Array.isArray(pks[idx]) && pk.targetMeta) { - o[pk.name] = pks[idx]; - } else { - o[pk.name] = Utils.extractPK(pks[idx], meta); - } - return o; - }, {}); - } - static getOrderedPrimaryKeys(id, meta, platform, convertCustomTypes = false, allowScalar = false) { - const data = Utils.isPrimaryKey(id) ? { [meta.primaryKeys[0]]: id } : id; - const pks = meta.primaryKeys.map((pk, idx) => { - const prop = meta.properties[pk]; - // `data` can be a composite PK in form of array of PKs, or a DTO - let value = Array.isArray(data) ? data[idx] : (data[pk] ?? data); - if (convertCustomTypes && platform && prop.customType && !prop.targetMeta) { - value = prop.customType.convertToJSValue(value, platform); - } - if (prop.kind !== ReferenceKind.SCALAR && prop.targetMeta) { - const value2 = this.getOrderedPrimaryKeys(value, prop.targetMeta, platform, convertCustomTypes, allowScalar); - value = value2.length > 1 ? value2 : value2[0]; - } - return value; - }); - if (allowScalar && pks.length === 1) { - return pks[0]; - } - // we need to flatten the PKs as composite PKs can be build from another composite PKs - // and this method is used to get the PK hash in identity map, that expects flat array - return Utils.flatten(pks); - } - /** - * Checks whether given object is an entity instance. - */ - static isEntity(data, allowReference = false) { - if (!Utils.isObject(data)) { - return false; - } - if (allowReference && !!data.__reference) { - return true; - } - return !!data.__entity; - } - /** - * Checks whether given object is a scalar reference. - */ - static isScalarReference(data, allowReference = false) { - return typeof data === 'object' && data?.__scalarReference; - } - /** - * Checks whether the argument is empty (array without items, object without keys or falsy value). - */ - static isEmpty(data) { - if (Array.isArray(data)) { - return data.length === 0; - } - if (Utils.isObject(data)) { - return !Utils.hasObjectKeys(data); - } - return !data; - } - /** - * Gets string name of given class. - */ - static className(classOrName) { - if (typeof classOrName === 'string') { - return classOrName; - } - return classOrName.name; - } - static extractChildElements(items, prefix, allSymbol) { - return items - .filter(field => field === allSymbol || field.startsWith(`${prefix}.`)) - .map(field => (field === allSymbol ? allSymbol : field.substring(prefix.length + 1))); - } - /** - * Tries to detect TypeScript support. - */ - static detectTypeScriptSupport() { - /* v8 ignore next */ - const process = globalThis.process ?? {}; - /* v8 ignore next */ - return ( - process.argv?.[0]?.endsWith('ts-node') || // running via ts-node directly - !!process.env?.MIKRO_ORM_CLI_ALWAYS_ALLOW_TS || // forced explicitly or enabled via `registerTypeScriptSupport()` - !!process.env?.TS_JEST || // check if ts-jest is used - !!process.env?.VITEST || // check if vitest is used - !!process.versions?.bun || // check if bun is used - process.argv?.slice(1).some(arg => /\.([mc]?ts|tsx)$/.exec(arg)) || // executing `.ts` file - process.execArgv?.some(arg => { - return ( - arg.includes('ts-node') || // check for ts-node loader - arg.includes('@swc-node/register') || // check for swc-node/register loader - arg.includes('node_modules/tsx/') - ); // check for tsx loader - }) - ); - } - /** - * Gets the type of the argument. - */ - static getObjectType(value) { - const simple = typeof value; - if (['string', 'number', 'boolean', 'bigint'].includes(simple)) { - return simple; - } - const objectType = Object.prototype.toString.call(value); - const type = /^\[object (.+)]$/.exec(objectType)[1]; - if (type === 'Uint8Array') { - return 'Buffer'; - } - return type; - } - /** - * Checks whether the value is POJO (e.g. `{ foo: 'bar' }`, and not instance of `Foo`) - */ - static isPlainObject(value) { - return ( - (value !== null && - typeof value === 'object' && - typeof value.constructor === 'function' && - (Object.hasOwn(value.constructor.prototype, 'isPrototypeOf') || - Object.getPrototypeOf(value.constructor.prototype) === null)) || - (value && Object.getPrototypeOf(value) === null) || - value instanceof PlainObject - ); - } - /** - * Executes the `cb` promise serially on every element of the `items` array and returns array of resolved values. - */ - static async runSerial(items, cb) { - const ret = []; - for (const item of items) { - ret.push(await cb(item)); - } - return ret; - } - static isCollection(item) { - return item?.__collection; - } - // FNV-1a 64-bit - static hash(data, length) { - let h1 = 0xcbf29ce484222325n; - for (let i = 0; i < data.length; i++) { - h1 ^= BigInt(data.charCodeAt(i)); - h1 = (h1 * 0x100000001b3n) & 0xffffffffffffffffn; - } - const hash = h1.toString(16).padStart(16, '0'); - if (length) { - return hash.substring(0, length); - } - return hash; - } - static runIfNotEmpty(clause, data) { - if (!Utils.isEmpty(data)) { - clause(); - } - } - static defaultValue(prop, option, defaultValue) { - prop[option] = option in prop ? prop[option] : defaultValue; - } - static findDuplicates(items) { - return items.reduce((acc, v, i, arr) => { - return arr.indexOf(v) !== i && !acc.includes(v) ? acc.concat(v) : acc; - }, []); - } - static removeDuplicates(items) { - const ret = []; - const contains = (arr, val) => !!arr.find(v => equals(val, v)); - for (const item of items) { - if (!contains(ret, item)) { - ret.push(item); - } - } - return ret; - } - static randomInt(min, max) { - return Math.round(Math.random() * (max - min)) + min; - } - /** - * Extracts all possible values of a TS enum. Works with both string and numeric enums. - */ - static extractEnumValues(target) { - const keys = Object.keys(target); - const values = Object.values(target); - const numeric = !!values.find(v => typeof v === 'number'); - const constEnum = - values.length % 2 === 0 && // const enum will have even number of items - values.slice(0, values.length / 2).every(v => typeof v === 'string') && // first half are strings - values.slice(values.length / 2).every(v => typeof v === 'number') && // second half are numbers - this.equals( - keys, - values - .slice(values.length / 2) - .concat(values.slice(0, values.length / 2)) - .map(v => '' + v), - ); // and when swapped, it will match the keys - if (numeric || constEnum) { - return values.filter(val => !keys.includes(val)); - } - return values; - } - static flatten(arrays, deep) { - return arrays.flatMap(v => (deep && Array.isArray(v) ? this.flatten(v, true) : v)); - } - static isOperator(key, includeGroupOperators = true) { - if (!includeGroupOperators) { - return key in QueryOperator; - } - return key in GroupOperator || key in QueryOperator; - } - static hasNestedKey(object, key) { - if (!object) { - return false; - } - if (Array.isArray(object)) { - return object.some(o => this.hasNestedKey(o, key)); - } - if (typeof object === 'object') { - return Object.entries(object).some(([k, v]) => k === key || this.hasNestedKey(v, key)); - } - return false; - } - static getORMVersion() { - return this.#ORM_VERSION; - } - static createFunction(context, code, compiledFunctions, key) { - if (key && compiledFunctions?.[key]) { - return compiledFunctions[key](...context.values()); - } - try { - // eslint-disable-next-line @typescript-eslint/no-implied-eval - return new Function(...context.keys(), `'use strict';\n` + code)(...context.values()); - /* v8 ignore next */ - } catch (e) { - // eslint-disable-next-line no-console - console.error(code); - throw e; - } - } - static callCompiledFunction(fn, ...args) { - try { - return fn(...args); - } catch (e) { - /* v8 ignore next */ - if ([SyntaxError, TypeError, EvalError, ReferenceError].some(t => e instanceof t)) { - const position = e.stack.match(/:(\d+):(\d+)/); - let code = fn.toString(); - if (position) { - const lines = code.split('\n').map((line, idx) => { - if (idx === +position[1] - 5) { - return '> ' + line; - } - return ' ' + line; - }); - lines.splice(+position[1] - 4, 0, ' '.repeat(+position[2]) + '^'); - code = lines.join('\n'); - } - // eslint-disable-next-line no-console - console.error(`JIT runtime error: ${e.message}\n\n${code}`); - } - throw e; - } - } - static unwrapProperty(entity, meta, prop, payload = false) { - let p = prop; - const path = []; - if (!prop.object && !prop.array && !prop.embedded) { - return entity[prop.name] != null ? [[entity[prop.name], []]] : []; - } - while (p.embedded) { - const child = meta.properties[p.embedded[0]]; - if (payload && !child.object && !child.array) { - break; - } - path.shift(); - path.unshift(p.embedded[0], p.embedded[1]); - p = child; - } - const ret = []; - const follow = (t, idx = 0, i = []) => { - const k = path[idx]; - if (Array.isArray(t)) { - for (const t1 of t) { - const ii = t.indexOf(t1); - follow(t1, idx, [...i, ii]); - } - return; - } - if (t == null) { - return; - } - const target = t[k]; - if (path[++idx]) { - follow(target, idx, i); - } else if (target != null) { - ret.push([target, i]); - } - }; - follow(entity); - return ret; - } - static setPayloadProperty(entity, meta, prop, value, idx) { - if (!prop.object && !prop.array && !prop.embedded) { - entity[prop.name] = value; - return; - } - let target = entity; - let p = prop; - const path = []; - while (p.embedded) { - path.shift(); - path.unshift(p.embedded[0], p.embedded[1]); - const prev = p; - p = meta.properties[p.embedded[0]]; - if (!p.object) { - path.shift(); - path[0] = prev.name; - break; - } - } - let j = 0; - for (const k of path) { - const i = path.indexOf(k); - if (i === path.length - 1) { - if (Array.isArray(target)) { - target[idx[j++]][k] = value; - } else { - target[k] = value; - } - } else { - if (Array.isArray(target)) { - target = target[idx[j++]][k]; - } else { - target = target[k]; - } - } - } - } - static async tryImport({ module, warning }) { - try { - return await import(module); - } catch (err) { - if (err.code === 'ERR_MODULE_NOT_FOUND') { - if (warning) { - // eslint-disable-next-line no-console - console.warn(warning); - } - return undefined; - } - throw err; - } - } - static xor(a, b) { - return (a || b) && !(a && b); - } - static keys(obj) { - return Object.keys(obj); - } - static values(obj) { - return Object.values(obj); - } - static entries(obj) { - return Object.entries(obj); - } - static primaryKeyToObject(meta, primaryKey, visible) { - const pks = - meta.compositePK && Utils.isPlainObject(primaryKey) ? Object.values(primaryKey) : Utils.asArray(primaryKey); - const pkProps = meta.getPrimaryProps(); - return meta.primaryKeys.reduce((o, pk, idx) => { - const pkProp = pkProps[idx]; - if (visible && !visible.includes(pkProp.name)) { - return o; - } - if (Utils.isPlainObject(pks[idx]) && pkProp.targetMeta) { - o[pk] = Utils.getOrderedPrimaryKeys(pks[idx], pkProp.targetMeta); - return o; - } - o[pk] = pks[idx]; - return o; - }, {}); - } - static getObjectQueryKeys(obj) { - return Reflect.ownKeys(obj).filter(key => { - if (!Object.prototype.propertyIsEnumerable.call(obj, key)) { - return false; - } - return typeof key === 'string' || Raw.isKnownFragmentSymbol(key); - }); - } -} diff --git a/node_modules/@mikro-orm/core/utils/clone.d.ts b/node_modules/@mikro-orm/core/utils/clone.d.ts deleted file mode 100644 index 0cc3d21..0000000 --- a/node_modules/@mikro-orm/core/utils/clone.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Inspired by https://github.com/pvorb/clone but simplified and never tries to - * clone `EventEmitter`s to get around https://github.com/mikro-orm/mikro-orm/issues/2748 - * @internal - */ -export declare function clone(parent: T, respectCustomCloneMethod?: boolean): T; diff --git a/node_modules/@mikro-orm/core/utils/clone.js b/node_modules/@mikro-orm/core/utils/clone.js deleted file mode 100644 index 5594068..0000000 --- a/node_modules/@mikro-orm/core/utils/clone.js +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Inspired by https://github.com/pvorb/clone but simplified and never tries to - * clone `EventEmitter`s to get around https://github.com/mikro-orm/mikro-orm/issues/2748 - * @internal - */ -/** - * Get the property descriptor of a property on an object or its prototype chain. - * - * @param obj - The object to get the property descriptor from. - * @param prop - The property to get the descriptor for. - */ -function getPropertyDescriptor(obj, prop) { - const descriptor = Object.getOwnPropertyDescriptor(obj, prop); - if (descriptor) { - return descriptor; - } - const proto = Object.getPrototypeOf(obj); - if (proto) { - return getPropertyDescriptor(proto, prop); - } - return null; -} -const TypedArray = Object.getPrototypeOf(Uint8Array); -export function clone(parent, respectCustomCloneMethod = true) { - const allParents = []; - const allChildren = []; - function _clone(parent) { - // cloning null always returns null - if (parent === null) { - return null; - } - if (typeof parent !== 'object') { - return parent; - } - if (respectCustomCloneMethod && 'clone' in parent && typeof parent.clone === 'function') { - return parent.clone(); - } - let child; - let proto; - if (parent instanceof Map) { - child = new Map(); - } else if (parent instanceof Set) { - child = new Set(); - } else if (parent instanceof Promise) { - child = new Promise((resolve, reject) => { - parent.then(resolve.bind(null, _clone), reject.bind(null, _clone)); - }); - } else if (Array.isArray(parent)) { - child = []; - } else if (parent instanceof RegExp) { - let flags = ''; - if (parent.global) { - flags += 'g'; - } - if (parent.ignoreCase) { - flags += 'i'; - } - if (parent.multiline) { - flags += 'm'; - } - child = new RegExp(parent.source, flags); - if (parent.lastIndex) { - child.lastIndex = parent.lastIndex; - } - } else if (parent instanceof Date) { - child = new Date(parent.getTime()); - } else if (Buffer.isBuffer(parent)) { - child = Buffer.allocUnsafe(parent.length); - parent.copy(child); - return child; - } else if (parent instanceof TypedArray) { - child = parent.slice(); - return child; - } else if (parent instanceof Error) { - child = new parent.constructor(parent.message); - } else { - proto = Object.getPrototypeOf(parent); - child = Object.create(proto); - } - const index = allParents.indexOf(parent); - if (index !== -1) { - return allChildren[index]; - } - allParents.push(parent); - allChildren.push(child); - if (parent instanceof Map) { - parent.forEach((value, key) => { - const keyChild = _clone(key); - const valueChild = _clone(value); - child.set(keyChild, valueChild); - }); - } - if (parent instanceof Set) { - parent.forEach(value => { - const entryChild = _clone(value); - child.add(entryChild); - }); - } - for (const i in parent) { - let attrs; - if (proto) { - attrs = getPropertyDescriptor(proto, i); - } - if (attrs && typeof attrs.get === 'function' && attrs.set == null) { - continue; - } - child[i] = _clone(parent[i]); - } - const symbols = Object.getOwnPropertySymbols(parent); - for (let i = 0; i < symbols.length; i++) { - const symbol = symbols[i]; - const descriptor = Object.getOwnPropertyDescriptor(parent, symbol); - if (descriptor && !descriptor.enumerable) { - continue; - } - child[symbol] = _clone(parent[symbol]); - } - return child; - } - return _clone(parent); -} diff --git a/node_modules/@mikro-orm/core/utils/env-vars.d.ts b/node_modules/@mikro-orm/core/utils/env-vars.d.ts deleted file mode 100644 index a62f44d..0000000 --- a/node_modules/@mikro-orm/core/utils/env-vars.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { type Options } from './Configuration.js'; -/** @internal */ -export declare function setEnv(key: string, value: unknown): void; -/** @internal */ -export declare function getEnv(key: string): string | undefined; -/** @internal */ -export declare function loadEnvironmentVars(): Partial; diff --git a/node_modules/@mikro-orm/core/utils/env-vars.js b/node_modules/@mikro-orm/core/utils/env-vars.js deleted file mode 100644 index 3f3a2d7..0000000 --- a/node_modules/@mikro-orm/core/utils/env-vars.js +++ /dev/null @@ -1,100 +0,0 @@ -import { Utils } from './Utils.js'; -/** @internal */ -export function setEnv(key, value) { - if (globalThis.process?.env) { - globalThis.process.env[key] = String(value); - } -} -/** @internal */ -export function getEnv(key) { - return globalThis.process?.env?.[key]; -} -/** @internal */ -export function loadEnvironmentVars() { - const ret = {}; - const getEnvKey = (key, envPrefix = 'MIKRO_ORM_') => { - return ( - envPrefix + - key - .replace(/([a-z0-9])([A-Z])/g, '$1_$2') - .replace(/([A-Z])([A-Z][a-z])/g, '$1_$2') - .toUpperCase() - ); - }; - const array = v => v.split(',').map(vv => vv.trim()); - const bool = v => ['true', 't', '1'].includes(v.toLowerCase()); - const num = v => +v; - const read = (o, envPrefix, key, mapper = v => v) => { - const envKey = getEnvKey(key, envPrefix); - /* v8 ignore next */ - if (envKey in (globalThis.process?.env ?? {})) { - o[key] = mapper(getEnv(envKey)); - } - }; - const cleanup = (o, k) => (Utils.hasObjectKeys(o[k]) ? {} : delete o[k]); - const read0 = read.bind(null, ret, 'MIKRO_ORM_'); - read0('baseDir'); - read0('entities', array); - read0('entitiesTs', array); - read0('clientUrl'); - read0('host'); - read0('port', num); - read0('user'); - read0('password'); - read0('dbName'); - read0('schema'); - read0('loadStrategy'); - read0('batchSize', num); - read0('useBatchInserts', bool); - read0('useBatchUpdates', bool); - read0('allowGlobalContext', bool); - read0('autoJoinOneToOneOwner', bool); - read0('populateAfterFlush', bool); - read0('forceEntityConstructor', bool); - read0('forceUndefined', bool); - read0('forceUtcTimezone', bool); - read0('timezone'); - read0('ensureIndexes', bool); - read0('implicitTransactions', bool); - read0('debug', bool); - read0('colors', bool); - ret.discovery = {}; - const read1 = read.bind(null, ret.discovery, 'MIKRO_ORM_DISCOVERY_'); - read1('warnWhenNoEntities', bool); - read1('checkDuplicateTableNames', bool); - read1('checkDuplicateFieldNames', bool); - read1('checkNonPersistentCompositeProps', bool); - read1('inferDefaultValues', bool); - read1('tsConfigPath'); - cleanup(ret, 'discovery'); - ret.migrations = {}; - const read2 = read.bind(null, ret.migrations, 'MIKRO_ORM_MIGRATIONS_'); - read2('tableName'); - read2('path'); - read2('pathTs'); - read2('glob'); - read2('transactional', bool); - read2('disableForeignKeys', bool); - read2('allOrNothing', bool); - read2('dropTables', bool); - read2('safe', bool); - read2('silent', bool); - read2('emit'); - read2('snapshot', bool); - read2('snapshotName'); - cleanup(ret, 'migrations'); - ret.schemaGenerator = {}; - const read3 = read.bind(null, ret.schemaGenerator, 'MIKRO_ORM_SCHEMA_GENERATOR_'); - read3('disableForeignKeys', bool); - read3('createForeignKeyConstraints', bool); - cleanup(ret, 'schemaGenerator'); - ret.seeder = {}; - const read4 = read.bind(null, ret.seeder, 'MIKRO_ORM_SEEDER_'); - read4('path'); - read4('pathTs'); - read4('glob'); - read4('emit'); - read4('defaultSeeder'); - cleanup(ret, 'seeder'); - return ret; -} diff --git a/node_modules/@mikro-orm/core/utils/fs-utils.d.ts b/node_modules/@mikro-orm/core/utils/fs-utils.d.ts deleted file mode 100644 index 7fbcbad..0000000 --- a/node_modules/@mikro-orm/core/utils/fs-utils.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { type Dictionary } from '../typings.js'; -export interface FsUtils { - init(): Promise; - pathExists(path: string): boolean; - ensureDir(path: string): void; - readJSONSync(path: string): T; - glob(input: string | string[], cwd?: string): string[]; - resolveGlob(input: string | string[], cwd?: string): string[]; - getPackageConfig(basePath?: string): T; - getORMPackages(): Set; - getORMPackageVersion(name: string): string | undefined; - checkPackageVersion(): void; - normalizePath(...parts: string[]): string; - relativePath(path: string, relativeTo: string): string; - absolutePath(path: string, baseDir?: string): string; - writeFile(path: string, data: string, options?: Record): Promise; - dynamicImport(id: string): Promise; -} -export declare const fs: FsUtils; -export * from '../cache/FileCacheAdapter.js'; diff --git a/node_modules/@mikro-orm/core/utils/fs-utils.js b/node_modules/@mikro-orm/core/utils/fs-utils.js deleted file mode 100644 index f17de54..0000000 --- a/node_modules/@mikro-orm/core/utils/fs-utils.js +++ /dev/null @@ -1,192 +0,0 @@ -import { existsSync, globSync as nodeGlobSync, mkdirSync, readFileSync, realpathSync, statSync } from 'node:fs'; -import { writeFile as nodeWriteFile } from 'node:fs/promises'; -import { isAbsolute, join, normalize, relative } from 'node:path'; -import { fileURLToPath, pathToFileURL } from 'node:url'; -import { Utils } from './Utils.js'; -import { colors } from '../logging/colors.js'; -let globSync = (patterns, options) => { - const files = nodeGlobSync(patterns, { ...options, withFileTypes: true }); - return files.filter(f => f.isFile()).map(f => join(f.parentPath, f.name)); -}; -export const fs = { - async init() { - const tinyGlobby = await import('tinyglobby').catch(() => null); - if (tinyGlobby) { - globSync = (patterns, options) => { - patterns = Utils.asArray(patterns).map(p => p.replace(/\\/g, '/')); - if (options?.cwd) { - options = { ...options, cwd: options.cwd.replace(/\\/g, '/') }; - } - return tinyGlobby.globSync(patterns, { ...options, expandDirectories: false }); - }; - } - }, - pathExists(path) { - if (/[*?[\]]/.test(path)) { - return globSync(path).length > 0; - } - return existsSync(path); - }, - ensureDir(path) { - if (!existsSync(path)) { - mkdirSync(path, { recursive: true }); - } - }, - readJSONSync(path) { - const file = readFileSync(path); - return JSON.parse(file.toString()); - }, - glob(input, cwd) { - const patterns = Array.isArray(input) ? input : [input]; - const positive = []; - const negative = []; - for (const p of patterns) { - if (p.startsWith('!')) { - negative.push(p.slice(1)); - } else { - positive.push(p); - } - } - const included = new Set(this.resolveGlob(positive, cwd)); - if (included.size > 0 && negative.length > 0) { - const excluded = this.resolveGlob(negative, cwd); - for (const file of excluded) { - included.delete(file); - } - } - return [...included]; - }, - resolveGlob(input, cwd) { - if (Array.isArray(input)) { - return input.flatMap(paths => this.resolveGlob(paths, cwd)); - } - const hasGlobChars = /[*?[\]]/.test(input); - if (!hasGlobChars) { - try { - const s = statSync(cwd ? this.normalizePath(cwd, input) : input); - if (s.isDirectory()) { - return globSync(join(input, '**'), { cwd }); - } - } catch { - // ignore - } - } - return globSync(input, { cwd }); - }, - getPackageConfig(basePath = process.cwd()) { - if (this.pathExists(`${basePath}/package.json`)) { - try { - const path = this.normalizePath(import.meta.resolve(`${basePath}/package.json`)); - return this.readJSONSync(path); - } catch (e) { - /* v8 ignore next */ - return {}; - } - } - const parentFolder = realpathSync(`${basePath}/..`); - // we reached the root folder - if (basePath === parentFolder) { - return {}; - } - return this.getPackageConfig(parentFolder); - }, - getORMPackages() { - const pkg = this.getPackageConfig(); - return new Set([...Object.keys(pkg.dependencies ?? {}), ...Object.keys(pkg.devDependencies ?? {})]); - }, - getORMPackageVersion(name) { - try { - const path = import.meta.resolve(`${name}/package.json`); - const pkg = this.readJSONSync(fileURLToPath(path)); - return pkg?.version; - } catch (e) { - return undefined; - } - }, - // inspired by https://github.com/facebook/docusaurus/pull/3386 - checkPackageVersion() { - const coreVersion = Utils.getORMVersion(); - if (process.env.MIKRO_ORM_ALLOW_VERSION_MISMATCH || coreVersion === '[[MIKRO_ORM_VERSION]]') { - return; - } - const deps = this.getORMPackages(); - const exceptions = new Set(['nestjs', 'sql-highlighter', 'mongo-highlighter']); - const ormPackages = [...deps].filter( - d => d.startsWith('@mikro-orm/') && d !== '@mikro-orm/core' && !exceptions.has(d.substring('@mikro-orm/'.length)), - ); - for (const ormPackage of ormPackages) { - const version = this.getORMPackageVersion(ormPackage); - if (version != null && version !== coreVersion) { - throw new Error( - `Bad ${colors.cyan(ormPackage)} version ${colors.yellow('' + version)}.\n` + - `All official @mikro-orm/* packages need to have the exact same version as @mikro-orm/core (${colors.green(coreVersion)}).\n` + - `Only exceptions are packages that don't live in the 'mikro-orm' repository: ${[...exceptions].join(', ')}.\n` + - `Maybe you want to check, or regenerate your yarn.lock or package-lock.json file?`, - ); - } - } - }, - /** - * Resolves and normalizes a series of path parts relative to each preceding part. - * If any part is a `file:` URL, it is converted to a local path. If any part is an - * absolute path, it replaces preceding paths (similar to `path.resolve` in NodeJS). - * Trailing directory separators are removed, and all directory separators are converted - * to POSIX-style separators (`/`). - */ - normalizePath(...parts) { - let start = 0; - for (let i = 0; i < parts.length; i++) { - const part = parts[i]; - if (isAbsolute(part)) { - start = i; - } else if (part.startsWith('file:')) { - start = i; - parts[i] = fileURLToPath(part); - } - } - if (start > 0) { - parts = parts.slice(start); - } - let path = parts.join('/').replace(/\\/g, '/').replace(/\/$/, ''); - path = normalize(path).replace(/\\/g, '/'); - return /^[/.]|[a-zA-Z]:/.exec(path) || path.startsWith('!') ? path : './' + path; - }, - /** - * Determines the relative path between two paths. If either path is a `file:` URL, - * it is converted to a local path. - */ - relativePath(path, relativeTo) { - if (!path) { - return path; - } - path = this.normalizePath(path); - if (path.startsWith('.')) { - return path; - } - path = relative(this.normalizePath(relativeTo), path); - return this.normalizePath(path); - }, - /** - * Computes the absolute path to for the given path relative to the provided base directory. - * If either `path` or `baseDir` are `file:` URLs, they are converted to local paths. - */ - absolutePath(path, baseDir = process.cwd()) { - if (!path) { - return this.normalizePath(baseDir); - } - if (!isAbsolute(path) && !path.startsWith('file://')) { - path = baseDir + '/' + path; - } - return this.normalizePath(path); - }, - async writeFile(path, data, options) { - await nodeWriteFile(path, data, options); - }, - async dynamicImport(id) { - /* v8 ignore next */ - const specifier = id.startsWith('file://') ? id : pathToFileURL(id).href; - const dynamicImportProvider = globalThis.dynamicImportProvider ?? (id => import(id)); - return dynamicImportProvider(specifier); - }, -}; -export * from '../cache/FileCacheAdapter.js'; diff --git a/node_modules/@mikro-orm/core/utils/index.d.ts b/node_modules/@mikro-orm/core/utils/index.d.ts deleted file mode 100644 index 3cbaf83..0000000 --- a/node_modules/@mikro-orm/core/utils/index.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export * from './Configuration.js'; -export * from './Cursor.js'; -export * from './Utils.js'; -export * from './RequestContext.js'; -export * from './TransactionContext.js'; -export * from './TransactionManager.js'; -export * from './QueryHelper.js'; -export * from './NullHighlighter.js'; -export * from './EntityComparator.js'; -export * from './RawQueryFragment.js'; -export * from './env-vars.js'; -export * from './upsert-utils.js'; diff --git a/node_modules/@mikro-orm/core/utils/index.js b/node_modules/@mikro-orm/core/utils/index.js deleted file mode 100644 index 3cbaf83..0000000 --- a/node_modules/@mikro-orm/core/utils/index.js +++ /dev/null @@ -1,12 +0,0 @@ -export * from './Configuration.js'; -export * from './Cursor.js'; -export * from './Utils.js'; -export * from './RequestContext.js'; -export * from './TransactionContext.js'; -export * from './TransactionManager.js'; -export * from './QueryHelper.js'; -export * from './NullHighlighter.js'; -export * from './EntityComparator.js'; -export * from './RawQueryFragment.js'; -export * from './env-vars.js'; -export * from './upsert-utils.js'; diff --git a/node_modules/@mikro-orm/core/utils/upsert-utils.d.ts b/node_modules/@mikro-orm/core/utils/upsert-utils.d.ts deleted file mode 100644 index b918405..0000000 --- a/node_modules/@mikro-orm/core/utils/upsert-utils.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { EntityData, EntityMetadata, FilterQuery } from '../typings.js'; -import type { UpsertOptions } from '../drivers/IDatabaseDriver.js'; -import { type Raw } from '../utils/RawQueryFragment.js'; -/** @internal */ -export declare function getOnConflictFields( - meta: EntityMetadata | undefined, - data: EntityData, - uniqueFields: (keyof T)[] | Raw, - options: UpsertOptions, -): (keyof T)[]; -/** @internal */ -export declare function getOnConflictReturningFields( - meta: EntityMetadata | undefined, - data: EntityData, - uniqueFields: (keyof T)[] | Raw, - options: UpsertOptions, -): (keyof T)[] | '*'; -/** @internal */ -export declare function getWhereCondition( - meta: EntityMetadata, - onConflictFields: (keyof T)[] | Raw | undefined, - data: EntityData, - where: FilterQuery, -): { - where: FilterQuery; - propIndex: number | false; -}; diff --git a/node_modules/@mikro-orm/core/utils/upsert-utils.js b/node_modules/@mikro-orm/core/utils/upsert-utils.js deleted file mode 100644 index 7c5d378..0000000 --- a/node_modules/@mikro-orm/core/utils/upsert-utils.js +++ /dev/null @@ -1,142 +0,0 @@ -import { isRaw } from '../utils/RawQueryFragment.js'; -import { Utils } from './Utils.js'; -function expandEmbeddedProperties(prop, key) { - if (prop.object) { - return [prop.name]; - } - return Object.values(prop.embeddedProps).flatMap(p => { - /* v8 ignore next */ - if (p.embeddable && !p.object) { - return expandEmbeddedProperties(p); - } - return [p.name]; - }); -} -/** - * Expands dot paths and stars - */ -function expandFields(meta, fields) { - return fields.flatMap(f => { - if (f === '*' && meta) { - return meta.comparableProps.filter(p => !p.lazy && !p.embeddable).map(p => p.name); - } - if (f.includes('.')) { - const [k, ...tmp] = f.split('.'); - const rest = tmp.join('.'); - const prop = meta?.properties[k]; - if (prop?.embeddable) { - if (rest === '*') { - return expandEmbeddedProperties(prop); - } - return expandEmbeddedProperties(prop, rest); - } - } - const prop = meta?.properties[f]; - if (prop?.embeddable) { - return expandEmbeddedProperties(prop); - } - return [f]; - }); -} -/** @internal */ -export function getOnConflictFields(meta, data, uniqueFields, options) { - if (options.onConflictMergeFields) { - const onConflictMergeFields = expandFields(meta, options.onConflictMergeFields); - return onConflictMergeFields.flatMap(f => { - const prop = meta?.properties[f]; - /* v8 ignore next */ - if (prop?.embeddable && !prop.object) { - return Object.values(prop.embeddedProps).map(p => p.name); - } - return f; - }); - } - const keys = Object.keys(data).flatMap(f => { - if (!(Array.isArray(uniqueFields) && !uniqueFields.includes(f))) { - return []; - } - const prop = meta?.properties[f]; - if (prop?.embeddable && !prop.object) { - return expandEmbeddedProperties(prop); - } - return [f]; - }); - if (options.onConflictExcludeFields) { - const onConflictExcludeFields = expandFields(meta, options.onConflictExcludeFields); - return keys.filter(f => !onConflictExcludeFields.includes(f)); - } - return keys; -} -/** @internal */ -export function getOnConflictReturningFields(meta, data, uniqueFields, options) { - /* v8 ignore next */ - if (!meta) { - return '*'; - } - const keys = meta.comparableProps - .filter(p => { - if (p.lazy || p.embeddable) { - return false; - } - if (p.autoincrement) { - return true; - } - return Array.isArray(uniqueFields) && !uniqueFields.includes(p.name); - }) - .map(p => p.name); - if (meta.versionProperty) { - keys.push(meta.versionProperty); - } - if (options.onConflictAction === 'ignore') { - return keys; - } - if (options.onConflictMergeFields) { - const onConflictMergeFields = expandFields(meta, options.onConflictMergeFields); - return keys.filter(key => !onConflictMergeFields.includes(key)); - } - if (options.onConflictExcludeFields) { - const onConflictExcludeFields = expandFields(meta, options.onConflictExcludeFields); - return [...new Set(keys.concat(...onConflictExcludeFields))]; - } - return keys.filter(key => !(key in data)); -} -function getPropertyValue(obj, key) { - if (!key.includes('.')) { - return obj[key]; - } - const parts = key.split('.'); - let curr = obj; - for (let i = 0; i < parts.length - 1; i++) { - curr[parts[i]] ??= {}; - curr = curr[parts[i]]; - } - return curr[parts[parts.length - 1]]; -} -/** @internal */ -export function getWhereCondition(meta, onConflictFields, data, where) { - const unique = onConflictFields ?? meta.props.filter(p => p.unique).map(p => p.name); - const propIndex = !isRaw(unique) && unique.findIndex(p => data[p] ?? data[p.substring(0, p.indexOf('.'))] != null); - if (onConflictFields || where == null) { - if (propIndex !== false && propIndex >= 0) { - let key = unique[propIndex]; - if (key.includes('.')) { - const prop = meta.properties[key.substring(0, key.indexOf('.'))]; - if (prop) { - key = `${prop.fieldNames[0]}${key.substring(key.indexOf('.'))}`; - } - } - where = { [key]: getPropertyValue(data, unique[propIndex]) }; - } else if (meta.uniques.length > 0) { - for (const u of meta.uniques) { - if (Utils.asArray(u.properties).every(p => data[p] != null)) { - where = Utils.asArray(u.properties).reduce((o, key) => { - o[key] = data[key]; - return o; - }, {}); - break; - } - } - } - } - return { where, propIndex }; -} diff --git a/node_modules/@mikro-orm/decorators/LICENSE b/node_modules/@mikro-orm/decorators/LICENSE deleted file mode 100644 index 23704b1..0000000 --- a/node_modules/@mikro-orm/decorators/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 Martin Adámek - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@mikro-orm/decorators/README.md b/node_modules/@mikro-orm/decorators/README.md deleted file mode 100644 index f6be8af..0000000 --- a/node_modules/@mikro-orm/decorators/README.md +++ /dev/null @@ -1,225 +0,0 @@ -

- MikroORM -

- -TypeScript ORM for Node.js based on Data Mapper, [Unit of Work](https://mikro-orm.io/docs/unit-of-work/) and [Identity Map](https://mikro-orm.io/docs/identity-map/) patterns. Supports MongoDB, MySQL, MariaDB, PostgreSQL, SQLite (including libSQL), MSSQL and Oracle databases. - -> Heavily inspired by [Doctrine](https://www.doctrine-project.org/) and [Hibernate](https://hibernate.org/). - -[![NPM version](https://img.shields.io/npm/v/@mikro-orm/core.svg)](https://npmx.dev/package/@mikro-orm/core) -[![NPM dev version](https://img.shields.io/npm/v/@mikro-orm/core/next.svg)](https://npmx.dev/package/@mikro-orm/core) -[![Chat on discord](https://img.shields.io/discord/1214904142443839538?label=discord&color=blue)](https://discord.gg/w8bjxFHS7X) -[![Downloads](https://img.shields.io/npm/dm/@mikro-orm/core.svg)](https://npmx.dev/package/@mikro-orm/core) -[![Coverage Status](https://img.shields.io/coveralls/mikro-orm/mikro-orm.svg)](https://coveralls.io/r/mikro-orm/mikro-orm?branch=master) -[![Build Status](https://github.com/mikro-orm/mikro-orm/workflows/tests/badge.svg?branch=master)](https://github.com/mikro-orm/mikro-orm/actions?workflow=tests) - -## Quick Start - -Install a driver package for your database: - -```sh -npm install @mikro-orm/postgresql # PostgreSQL -npm install @mikro-orm/mysql # MySQL -npm install @mikro-orm/mariadb # MariaDB -npm install @mikro-orm/sqlite # SQLite -npm install @mikro-orm/libsql # libSQL / Turso -npm install @mikro-orm/mongodb # MongoDB -npm install @mikro-orm/mssql # MS SQL Server -npm install @mikro-orm/oracledb # Oracle -``` - -> If you use additional packages like `@mikro-orm/cli`, `@mikro-orm/migrations`, or `@mikro-orm/entity-generator`, install `@mikro-orm/core` explicitly as well. See the [quick start guide](https://mikro-orm.io/docs/quick-start) for details. - -### Define Entities - -The recommended way to define entities is using [`defineEntity`](https://mikro-orm.io/docs/define-entity) with `setClass`: - -```typescript -import { defineEntity, p, MikroORM } from '@mikro-orm/postgresql'; - -const AuthorSchema = defineEntity({ - name: 'Author', - properties: { - id: p.integer().primary(), - name: p.string(), - email: p.string(), - born: p.datetime().nullable(), - books: () => p.oneToMany(Book).mappedBy('author'), - }, -}); - -export class Author extends AuthorSchema.class {} -AuthorSchema.setClass(Author); - -const BookSchema = defineEntity({ - name: 'Book', - properties: { - id: p.integer().primary(), - title: p.string(), - author: () => p.manyToOne(Author).inversedBy('books'), - }, -}); - -export class Book extends BookSchema.class {} -BookSchema.setClass(Book); -``` - -You can also define entities using [decorators](https://mikro-orm.io/docs/defining-entities) or [`EntitySchema`](https://mikro-orm.io/docs/entity-schema). See the [defining entities guide](https://mikro-orm.io/docs/defining-entities) for all options. - -### Initialize and Use - -```typescript -import { MikroORM, RequestContext } from '@mikro-orm/postgresql'; - -const orm = await MikroORM.init({ - entities: [Author, Book], - dbName: 'my-db', -}); - -// Create new entities -const author = orm.em.create(Author, { - name: 'Jon Snow', - email: 'snow@wall.st', -}); -const book = orm.em.create(Book, { - title: 'My Life on The Wall', - author, -}); - -// Flush persists all tracked changes in a single transaction -await orm.em.flush(); -``` - -### Querying - -```typescript -// Find with relations -const authors = await orm.em.findAll(Author, { - populate: ['books'], - orderBy: { name: 'asc' }, -}); - -// Type-safe QueryBuilder -const qb = orm.em.createQueryBuilder(Author); -const result = await qb - .select('*') - .where({ books: { title: { $like: '%Wall%' } } }) - .getResult(); -``` - -### Request Context - -In web applications, use `RequestContext` to isolate the identity map per request: - -```typescript -const app = express(); - -app.use((req, res, next) => { - RequestContext.create(orm.em, next); -}); -``` - -More info about `RequestContext` is described [here](https://mikro-orm.io/docs/identity-map/#request-context). - -## Unit of Work - -> Unit of Work maintains a list of objects (_entities_) affected by a business transaction -> and coordinates the writing out of changes. [(Martin Fowler)](https://www.martinfowler.com/eaaCatalog/unitOfWork.html) - -When you call `em.flush()`, all computed changes are queried inside a database transaction. This means you can control transaction boundaries simply by making changes to your entities and calling `flush()` when ready. - -```typescript -const author = await em.findOneOrFail(Author, 1, { - populate: ['books'], -}); -author.name = 'Jon Snow II'; -author.books.getItems().forEach(book => book.title += ' (2nd ed.)'); -author.books.add(orm.em.create(Book, { title: 'New Book', author })); - -// Flush computes change sets and executes them in a single transaction -await em.flush(); -``` - -The above flush will execute: - -```sql -begin; -update "author" set "name" = 'Jon Snow II' where "id" = 1; -update "book" - set "title" = case - when ("id" = 1) then 'My Life on The Wall (2nd ed.)' - when ("id" = 2) then 'Another Book (2nd ed.)' - else "title" end - where "id" in (1, 2); -insert into "book" ("title", "author_id") values ('New Book', 1); -commit; -``` - -## Core Features - -- [Clean and Simple Entity Definition](https://mikro-orm.io/docs/defining-entities) — decorators, `EntitySchema`, or `defineEntity` -- [Identity Map](https://mikro-orm.io/docs/identity-map) and [Unit of Work](https://mikro-orm.io/docs/unit-of-work) — automatic change tracking -- [Entity References](https://mikro-orm.io/docs/entity-references) and [Collections](https://mikro-orm.io/docs/collections) -- [QueryBuilder](https://mikro-orm.io/docs/query-builder) and [Kysely Integration](https://mikro-orm.io/docs/kysely) -- [Transactions](https://mikro-orm.io/docs/transactions) and [Cascading](https://mikro-orm.io/docs/cascading) -- [Populating Relations](https://mikro-orm.io/docs/populating-relations) and [Loading Strategies](https://mikro-orm.io/docs/loading-strategies) -- [Filters](https://mikro-orm.io/docs/filters) and [Lifecycle Hooks](https://mikro-orm.io/docs/events#hooks) -- [Schema Generator](https://mikro-orm.io/docs/schema-generator) and [Migrations](https://mikro-orm.io/docs/migrations) -- [Entity Generator](https://mikro-orm.io/docs/entity-generator) and [Seeding](https://mikro-orm.io/docs/seeding) -- [Embeddables](https://mikro-orm.io/docs/embeddables), [Custom Types](https://mikro-orm.io/docs/custom-types), and [Serialization](https://mikro-orm.io/docs/serializing) -- [Composite and Foreign Keys as Primary Key](https://mikro-orm.io/docs/composite-keys) -- [Entity Constructors](https://mikro-orm.io/docs/entity-constructors) and [Property Validation](https://mikro-orm.io/docs/property-validation) -- [Modelling Relationships](https://mikro-orm.io/docs/relationships) and [Vanilla JS Support](https://mikro-orm.io/docs/usage-with-js) - -## Documentation - -MikroORM documentation, included in this repo in the root directory, is built with [Docusaurus](https://docusaurus.io) and publicly hosted on GitHub Pages at https://mikro-orm.io. - -There is also auto-generated [CHANGELOG.md](CHANGELOG.md) file based on commit messages (via `semantic-release`). - -## Example Integrations - -You can find example integrations for some popular frameworks in the [`mikro-orm-examples` repository](https://github.com/mikro-orm/mikro-orm-examples): - -### TypeScript Examples - -- [Express + MongoDB](https://github.com/mikro-orm/express-ts-example-app) -- [Nest + MySQL](https://github.com/mikro-orm/nestjs-example-app) -- [RealWorld example app (Nest + MySQL)](https://github.com/mikro-orm/nestjs-realworld-example-app) -- [Koa + SQLite](https://github.com/mikro-orm/koa-ts-example-app) -- [GraphQL + PostgreSQL](https://github.com/driescroons/mikro-orm-graphql-example) -- [Inversify + PostgreSQL](https://github.com/PodaruDragos/inversify-example-app) -- [NextJS + MySQL](https://github.com/jonahallibone/mikro-orm-nextjs) -- [Accounts.js REST and GraphQL authentication + SQLite](https://github.com/darkbasic/mikro-orm-accounts-example) -- [Nest + Shopify + PostgreSQL + GraphQL](https://github.com/Cloudshelf/Shopify_CSConnector) -- [Elysia.js + libSQL + Bun](https://github.com/mikro-orm/elysia-bun-example-app) -- [Electron.js + PostgreSQL](https://github.com/adnanlah/electron-mikro-orm-example-app) - -### JavaScript Examples - -- [Express + SQLite](https://github.com/mikro-orm/express-js-example-app) - -## Contributing - -Contributions, issues and feature requests are welcome. Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on the process for submitting pull requests to us. - -## Authors - -**Martin Adámek** - -- Twitter: [@B4nan](https://twitter.com/B4nan) -- Github: [@b4nan](https://github.com/b4nan) - -See also the list of contributors who [participated](https://github.com/mikro-orm/mikro-orm/contributors) in this project. - -## Show Your Support - -Please star this repository if this project helped you! - -> If you'd like to support my open-source work, consider sponsoring me directly at [github.com/sponsors/b4nan](https://github.com/sponsors/b4nan). - -## License - -Copyright © 2018-present [Martin Adámek](https://github.com/b4nan). - -This project is licensed under the MIT License - see the [LICENSE file](LICENSE) for details. diff --git a/node_modules/@mikro-orm/decorators/es/Check.d.ts b/node_modules/@mikro-orm/decorators/es/Check.d.ts deleted file mode 100644 index 3b6eb8d..0000000 --- a/node_modules/@mikro-orm/decorators/es/Check.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { type CheckConstraint } from '@mikro-orm/core'; -/** Defines a database check constraint on a property (TC39 decorator). */ -export declare function Check( - options: CheckConstraint, -): (value: unknown, context: ClassFieldDecoratorContext) => void; diff --git a/node_modules/@mikro-orm/decorators/es/Check.js b/node_modules/@mikro-orm/decorators/es/Check.js deleted file mode 100644 index 0a6fafd..0000000 --- a/node_modules/@mikro-orm/decorators/es/Check.js +++ /dev/null @@ -1,9 +0,0 @@ -/** Defines a database check constraint on a property (TC39 decorator). */ -export function Check(options) { - return function (value, context) { - const meta = context.metadata; - meta.checks ??= []; - options.property ??= context.name; - meta.checks.push(options); - }; -} diff --git a/node_modules/@mikro-orm/decorators/es/CreateRequestContext.d.ts b/node_modules/@mikro-orm/decorators/es/CreateRequestContext.d.ts deleted file mode 100644 index 65b176b..0000000 --- a/node_modules/@mikro-orm/decorators/es/CreateRequestContext.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { type ContextProvider } from '../utils.js'; -/** Wraps an async method in a new RequestContext, forking the EntityManager (TC39 decorator). */ -export declare function CreateRequestContext( - contextProvider?: ContextProvider, - respectExistingContext?: boolean, -): ( - value: (this: T, ...args: any) => any, - context: ClassMethodDecoratorContext, -) => (this: T, ...args: any[]) => Promise; -/** Like `@CreateRequestContext`, but reuses an existing RequestContext if one is available (TC39 decorator). */ -export declare function EnsureRequestContext( - context?: ContextProvider, -): ( - value: (this: T, ...args: any) => any, - context: ClassMethodDecoratorContext, -) => (this: T, ...args: any[]) => Promise; diff --git a/node_modules/@mikro-orm/decorators/es/CreateRequestContext.js b/node_modules/@mikro-orm/decorators/es/CreateRequestContext.js deleted file mode 100644 index 84ed43f..0000000 --- a/node_modules/@mikro-orm/decorators/es/CreateRequestContext.js +++ /dev/null @@ -1,33 +0,0 @@ -import { RequestContext, TransactionContext } from '@mikro-orm/core'; -import { resolveContextProvider } from '../utils.js'; -/** Wraps an async method in a new RequestContext, forking the EntityManager (TC39 decorator). */ -export function CreateRequestContext(contextProvider, respectExistingContext = false) { - return function (value, context) { - const name = respectExistingContext ? 'EnsureRequestContext' : 'CreateRequestContext'; - if (value.constructor.name !== 'AsyncFunction') { - throw new Error(`@${name}() should be use with async functions`); - } - return async function (...args) { - const em = await resolveContextProvider(this, contextProvider); - if (!em) { - throw new Error( - `@${name}() decorator can only be applied to methods of classes with \`orm: MikroORM\` property, \`em: EntityManager\` property, or with a callback parameter like \`@${name}(() => orm)\` that returns one of those types. The parameter will contain a reference to current \`this\`. Returning an EntityRepository from it is also supported.`, - ); - } - // reuse existing context if available for given respect `contextName` - if (respectExistingContext && RequestContext.getEntityManager(em.name)) { - return value.apply(this, args); - } - // Otherwise, the outer tx context would be preferred. - const txContext = TransactionContext.currentTransactionContext(); - const provider = txContext ? TransactionContext : RequestContext; - return txContext - ? provider.create(em.fork({ useContext: true }), () => value.apply(this, args)) - : provider.create(em, () => value.apply(this, args)); - }; - }; -} -/** Like `@CreateRequestContext`, but reuses an existing RequestContext if one is available (TC39 decorator). */ -export function EnsureRequestContext(context) { - return CreateRequestContext(context, true); -} diff --git a/node_modules/@mikro-orm/decorators/es/Embeddable.d.ts b/node_modules/@mikro-orm/decorators/es/Embeddable.d.ts deleted file mode 100644 index f46c67f..0000000 --- a/node_modules/@mikro-orm/decorators/es/Embeddable.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { type Constructor, type EmbeddableOptions, type EntityClass } from '@mikro-orm/core'; -/** Marks a class as an embeddable type (TC39 decorator). */ -export declare function Embeddable & Constructor>( - options?: EmbeddableOptions, -): (target: Owner, context: ClassDecoratorContext) => Owner; diff --git a/node_modules/@mikro-orm/decorators/es/Embeddable.js b/node_modules/@mikro-orm/decorators/es/Embeddable.js deleted file mode 100644 index 4372cb4..0000000 --- a/node_modules/@mikro-orm/decorators/es/Embeddable.js +++ /dev/null @@ -1,14 +0,0 @@ -import { Utils } from '@mikro-orm/core'; -import { getMetadataFromDecorator } from '../utils.js'; -/** Marks a class as an embeddable type (TC39 decorator). */ -export function Embeddable(options = {}) { - return function (target, context) { - const meta = getMetadataFromDecorator(target); - const metadata = { ...context.metadata }; - Utils.mergeConfig(meta, metadata, options); - meta.class = target; - meta.name = meta.class.name; - meta.embeddable = true; - return target; - }; -} diff --git a/node_modules/@mikro-orm/decorators/es/Embedded.d.ts b/node_modules/@mikro-orm/decorators/es/Embedded.d.ts deleted file mode 100644 index 6e19001..0000000 --- a/node_modules/@mikro-orm/decorators/es/Embedded.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { type EntityName, type EmbeddedOptions } from '@mikro-orm/core'; -/** Defines an embedded property on an entity (TC39 decorator). */ -export declare function Embedded( - type?: EmbeddedOptions | (() => EntityName | EntityName[]), - options?: EmbeddedOptions, -): (value: unknown, context: ClassFieldDecoratorContext) => void; diff --git a/node_modules/@mikro-orm/decorators/es/Embedded.js b/node_modules/@mikro-orm/decorators/es/Embedded.js deleted file mode 100644 index 94579fb..0000000 --- a/node_modules/@mikro-orm/decorators/es/Embedded.js +++ /dev/null @@ -1,15 +0,0 @@ -import { ReferenceKind, Utils } from '@mikro-orm/core'; -import { prepareMetadataContext } from '../utils.js'; -/** Defines an embedded property on an entity (TC39 decorator). */ -export function Embedded(type = {}, options = {}) { - return function (value, context) { - const meta = prepareMetadataContext(context, ReferenceKind.EMBEDDED); - options = type instanceof Function ? { entity: type, ...options } : { ...type, ...options }; - Utils.defaultValue(options, 'prefix', true); - meta.properties[context.name] = { - name: context.name, - kind: ReferenceKind.EMBEDDED, - ...options, - }; - }; -} diff --git a/node_modules/@mikro-orm/decorators/es/Entity.d.ts b/node_modules/@mikro-orm/decorators/es/Entity.d.ts deleted file mode 100644 index e41c825..0000000 --- a/node_modules/@mikro-orm/decorators/es/Entity.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { type Constructor, type EntityOptions, type EntityClass } from '@mikro-orm/core'; -/** Marks a class as a MikroORM entity (TC39 decorator). */ -export declare function Entity & Constructor>( - options?: EntityOptions, -): (target: Owner, context: ClassDecoratorContext) => void; diff --git a/node_modules/@mikro-orm/decorators/es/Entity.js b/node_modules/@mikro-orm/decorators/es/Entity.js deleted file mode 100644 index afbf8d5..0000000 --- a/node_modules/@mikro-orm/decorators/es/Entity.js +++ /dev/null @@ -1,14 +0,0 @@ -import { Utils } from '@mikro-orm/core'; -import { getMetadataFromDecorator } from '../utils.js'; -/** Marks a class as a MikroORM entity (TC39 decorator). */ -export function Entity(options = {}) { - return function (target, context) { - const meta = getMetadataFromDecorator(target); - const metadata = { ...context.metadata }; - Utils.mergeConfig(meta, metadata, options); - meta.class = target; - if (!options.abstract || meta.discriminatorColumn) { - meta.name = context.name; - } - }; -} diff --git a/node_modules/@mikro-orm/decorators/es/Enum.d.ts b/node_modules/@mikro-orm/decorators/es/Enum.d.ts deleted file mode 100644 index 50c6da5..0000000 --- a/node_modules/@mikro-orm/decorators/es/Enum.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { type EnumOptions, type AnyEntity, type Dictionary } from '@mikro-orm/core'; -/** Defines an enum property on an entity (TC39 decorator). */ -export declare function Enum( - options?: EnumOptions | (() => Dictionary), -): (target: unknown, context: ClassFieldDecoratorContext) => void; diff --git a/node_modules/@mikro-orm/decorators/es/Enum.js b/node_modules/@mikro-orm/decorators/es/Enum.js deleted file mode 100644 index 9c40bca..0000000 --- a/node_modules/@mikro-orm/decorators/es/Enum.js +++ /dev/null @@ -1,15 +0,0 @@ -import { ReferenceKind } from '@mikro-orm/core'; -import { prepareMetadataContext } from '../utils.js'; -/** Defines an enum property on an entity (TC39 decorator). */ -export function Enum(options = {}) { - return function (target, context) { - const meta = prepareMetadataContext(context); - options = options instanceof Function ? { items: options } : options; - meta.properties[context.name] = { - name: context.name, - kind: ReferenceKind.SCALAR, - enum: true, - ...options, - }; - }; -} diff --git a/node_modules/@mikro-orm/decorators/es/Filter.d.ts b/node_modules/@mikro-orm/decorators/es/Filter.d.ts deleted file mode 100644 index eb60098..0000000 --- a/node_modules/@mikro-orm/decorators/es/Filter.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { type FilterDef, type EntityClass } from '@mikro-orm/core'; -/** Registers a named filter on an entity class (TC39 decorator). */ -export declare function Filter>(options: FilterDef): (target: T) => void; diff --git a/node_modules/@mikro-orm/decorators/es/Filter.js b/node_modules/@mikro-orm/decorators/es/Filter.js deleted file mode 100644 index 2456d60..0000000 --- a/node_modules/@mikro-orm/decorators/es/Filter.js +++ /dev/null @@ -1,8 +0,0 @@ -import { getMetadataFromDecorator } from '../utils.js'; -/** Registers a named filter on an entity class (TC39 decorator). */ -export function Filter(options) { - return function (target) { - const meta = getMetadataFromDecorator(target); - meta.filters[options.name] = options; - }; -} diff --git a/node_modules/@mikro-orm/decorators/es/Formula.d.ts b/node_modules/@mikro-orm/decorators/es/Formula.d.ts deleted file mode 100644 index 5c994df..0000000 --- a/node_modules/@mikro-orm/decorators/es/Formula.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { type FormulaCallback, type PropertyOptions } from '@mikro-orm/core'; -/** Defines a computed SQL formula property on an entity (TC39 decorator). */ -export declare function Formula( - formula: string | FormulaCallback, - options?: PropertyOptions, -): (value: unknown, context: ClassFieldDecoratorContext) => void; diff --git a/node_modules/@mikro-orm/decorators/es/Formula.js b/node_modules/@mikro-orm/decorators/es/Formula.js deleted file mode 100644 index cf8e4b3..0000000 --- a/node_modules/@mikro-orm/decorators/es/Formula.js +++ /dev/null @@ -1,14 +0,0 @@ -import { ReferenceKind } from '@mikro-orm/core'; -import { prepareMetadataContext } from '../utils.js'; -/** Defines a computed SQL formula property on an entity (TC39 decorator). */ -export function Formula(formula, options = {}) { - return function (value, context) { - const meta = prepareMetadataContext(context); - meta.properties[context.name] = { - name: context.name, - kind: ReferenceKind.SCALAR, - formula, - ...options, - }; - }; -} diff --git a/node_modules/@mikro-orm/decorators/es/Indexed.d.ts b/node_modules/@mikro-orm/decorators/es/Indexed.d.ts deleted file mode 100644 index 4d7fb40..0000000 --- a/node_modules/@mikro-orm/decorators/es/Indexed.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { type IndexOptions, type UniqueOptions, type Constructor } from '@mikro-orm/core'; -/** Defines a database index on a property or entity class (TC39 decorator). */ -export declare function Index( - options?: IndexOptions, -): (value: unknown, context: ClassDecoratorContext | ClassFieldDecoratorContext) => any; -/** Defines a unique constraint on a property or entity class (TC39 decorator). */ -export declare function Unique( - options?: UniqueOptions, -): (value: unknown, context: ClassDecoratorContext | ClassFieldDecoratorContext) => any; diff --git a/node_modules/@mikro-orm/decorators/es/Indexed.js b/node_modules/@mikro-orm/decorators/es/Indexed.js deleted file mode 100644 index eeb6b95..0000000 --- a/node_modules/@mikro-orm/decorators/es/Indexed.js +++ /dev/null @@ -1,19 +0,0 @@ -function createDecorator(options, unique) { - return function (value, context) { - const meta = context.metadata; - if (context.kind === 'field') { - options.properties ??= context.name; - } - const key = unique ? 'uniques' : 'indexes'; - meta[key] ??= []; - meta[key].push(options); - }; -} -/** Defines a database index on a property or entity class (TC39 decorator). */ -export function Index(options = {}) { - return createDecorator(options, false); -} -/** Defines a unique constraint on a property or entity class (TC39 decorator). */ -export function Unique(options = {}) { - return createDecorator(options, true); -} diff --git a/node_modules/@mikro-orm/decorators/es/ManyToMany.d.ts b/node_modules/@mikro-orm/decorators/es/ManyToMany.d.ts deleted file mode 100644 index c621b37..0000000 --- a/node_modules/@mikro-orm/decorators/es/ManyToMany.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { type EntityName, type ManyToManyOptions, type Collection } from '@mikro-orm/core'; -/** Defines a many-to-many relationship (TC39 decorator). */ -export declare function ManyToMany( - entity?: ManyToManyOptions | string | (() => EntityName), - mappedBy?: (string & keyof Target) | ((e: Target) => any), - options?: Partial>, -): (_: unknown, context: ClassFieldDecoratorContext | undefined>) => void; diff --git a/node_modules/@mikro-orm/decorators/es/ManyToMany.js b/node_modules/@mikro-orm/decorators/es/ManyToMany.js deleted file mode 100644 index cd51d08..0000000 --- a/node_modules/@mikro-orm/decorators/es/ManyToMany.js +++ /dev/null @@ -1,12 +0,0 @@ -import { ReferenceKind, Utils } from '@mikro-orm/core'; -import { prepareMetadataContext, processDecoratorParameters } from '../utils.js'; -/** Defines a many-to-many relationship (TC39 decorator). */ -export function ManyToMany(entity, mappedBy, options = {}) { - return function (_, context) { - const meta = prepareMetadataContext(context, ReferenceKind.MANY_TO_MANY); - options = processDecoratorParameters({ entity, mappedBy, options }); - const property = { name: context.name, kind: ReferenceKind.MANY_TO_MANY }; - meta.properties[context.name] ??= {}; - Utils.mergeConfig(meta.properties[context.name], property, options); - }; -} diff --git a/node_modules/@mikro-orm/decorators/es/ManyToOne.d.ts b/node_modules/@mikro-orm/decorators/es/ManyToOne.d.ts deleted file mode 100644 index 0e9d19e..0000000 --- a/node_modules/@mikro-orm/decorators/es/ManyToOne.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { type ManyToOneOptions, type EntityName, type Ref } from '@mikro-orm/core'; -/** Defines a many-to-one relationship (TC39 decorator). */ -export declare function ManyToOne( - entity?: ManyToOneOptions | ((e?: Owner) => EntityName | EntityName[]), - options?: Partial>, -): (_: unknown, context: ClassFieldDecoratorContext>) => void; diff --git a/node_modules/@mikro-orm/decorators/es/ManyToOne.js b/node_modules/@mikro-orm/decorators/es/ManyToOne.js deleted file mode 100644 index c54af6c..0000000 --- a/node_modules/@mikro-orm/decorators/es/ManyToOne.js +++ /dev/null @@ -1,11 +0,0 @@ -import { ReferenceKind, Utils } from '@mikro-orm/core'; -import { prepareMetadataContext, processDecoratorParameters } from '../utils.js'; -/** Defines a many-to-one relationship (TC39 decorator). */ -export function ManyToOne(entity = {}, options = {}) { - return function (_, context) { - const meta = prepareMetadataContext(context, ReferenceKind.MANY_TO_ONE); - options = processDecoratorParameters({ entity, options }); - const property = { name: context.name, kind: ReferenceKind.MANY_TO_ONE }; - meta.properties[context.name] = Utils.mergeConfig(meta.properties[context.name] ?? {}, property, options); - }; -} diff --git a/node_modules/@mikro-orm/decorators/es/OneToMany.d.ts b/node_modules/@mikro-orm/decorators/es/OneToMany.d.ts deleted file mode 100644 index f04f781..0000000 --- a/node_modules/@mikro-orm/decorators/es/OneToMany.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { type Collection, type EntityName, type OneToManyOptions } from '@mikro-orm/core'; -/** Defines a one-to-many relationship (TC39 decorator). */ -export declare function OneToMany( - entity: string | ((e?: Owner) => EntityName), - mappedBy: (string & keyof Target) | ((e: Target) => any), - options?: Partial>, -): (value: unknown, context: ClassFieldDecoratorContext | undefined>) => void; -export declare function OneToMany( - options: OneToManyOptions, -): (value: unknown, context: ClassFieldDecoratorContext | undefined>) => void; diff --git a/node_modules/@mikro-orm/decorators/es/OneToMany.js b/node_modules/@mikro-orm/decorators/es/OneToMany.js deleted file mode 100644 index 221ffa2..0000000 --- a/node_modules/@mikro-orm/decorators/es/OneToMany.js +++ /dev/null @@ -1,11 +0,0 @@ -import { ReferenceKind, Utils } from '@mikro-orm/core'; -import { prepareMetadataContext, processDecoratorParameters } from '../utils.js'; -export function OneToMany(entity, mappedBy, options = {}) { - return function (value, context) { - const meta = prepareMetadataContext(context, ReferenceKind.ONE_TO_MANY); - options = processDecoratorParameters({ entity, mappedBy, options }); - const property = { name: context.name, kind: ReferenceKind.ONE_TO_MANY }; - meta.properties[context.name] ??= {}; - Utils.mergeConfig(meta.properties[context.name], property, options); - }; -} diff --git a/node_modules/@mikro-orm/decorators/es/OneToOne.d.ts b/node_modules/@mikro-orm/decorators/es/OneToOne.d.ts deleted file mode 100644 index 5738224..0000000 --- a/node_modules/@mikro-orm/decorators/es/OneToOne.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { type EntityName, type OneToOneOptions, type Ref } from '@mikro-orm/core'; -/** Defines a one-to-one relationship (TC39 decorator). */ -export declare function OneToOne( - entity?: OneToOneOptions | string | ((e: Owner) => EntityName | EntityName[]), - mappedByOrOptions?: (string & keyof Target) | ((e: Target) => any) | Partial>, - options?: Partial>, -): (_: unknown, context: ClassFieldDecoratorContext | null | undefined>) => void; diff --git a/node_modules/@mikro-orm/decorators/es/OneToOne.js b/node_modules/@mikro-orm/decorators/es/OneToOne.js deleted file mode 100644 index a4413c8..0000000 --- a/node_modules/@mikro-orm/decorators/es/OneToOne.js +++ /dev/null @@ -1,13 +0,0 @@ -import { ReferenceKind } from '@mikro-orm/core'; -import { prepareMetadataContext, processDecoratorParameters } from '../utils.js'; -/** Defines a one-to-one relationship (TC39 decorator). */ -export function OneToOne(entity, mappedByOrOptions, options = {}) { - const mappedBy = typeof mappedByOrOptions === 'object' ? mappedByOrOptions.mappedBy : mappedByOrOptions; - options = typeof mappedByOrOptions === 'object' ? { ...mappedByOrOptions, ...options } : options; - return function (_, context) { - const meta = prepareMetadataContext(context, ReferenceKind.ONE_TO_ONE); - options = processDecoratorParameters({ entity, mappedBy, options }); - const property = { name: context.name, kind: ReferenceKind.ONE_TO_ONE }; - meta.properties[context.name] = Object.assign(meta.properties[context.name] ?? {}, property, options); - }; -} diff --git a/node_modules/@mikro-orm/decorators/es/PrimaryKey.d.ts b/node_modules/@mikro-orm/decorators/es/PrimaryKey.d.ts deleted file mode 100644 index c4023da..0000000 --- a/node_modules/@mikro-orm/decorators/es/PrimaryKey.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { type PrimaryKeyOptions, type SerializedPrimaryKeyOptions } from '@mikro-orm/core'; -/** Marks a property as the primary key of an entity (TC39 decorator). */ -export declare function PrimaryKey( - options?: PrimaryKeyOptions, -): (value: unknown, context: ClassFieldDecoratorContext) => void; -/** Marks a property as the serialized form of the primary key, e.g. for MongoDB ObjectId (TC39 decorator). */ -export declare function SerializedPrimaryKey( - options?: SerializedPrimaryKeyOptions, -): (value: unknown, context: ClassFieldDecoratorContext) => void; diff --git a/node_modules/@mikro-orm/decorators/es/PrimaryKey.js b/node_modules/@mikro-orm/decorators/es/PrimaryKey.js deleted file mode 100644 index 55b174d..0000000 --- a/node_modules/@mikro-orm/decorators/es/PrimaryKey.js +++ /dev/null @@ -1,22 +0,0 @@ -import { ReferenceKind } from '@mikro-orm/core'; -import { prepareMetadataContext } from '../utils.js'; -function createDecorator(options, serialized) { - return function (value, context) { - const meta = prepareMetadataContext(context, ReferenceKind.SCALAR); - const key = serialized ? 'serializedPrimaryKey' : 'primary'; - options[key] = true; - meta.properties[context.name] = { - name: context.name, - kind: ReferenceKind.SCALAR, - ...options, - }; - }; -} -/** Marks a property as the primary key of an entity (TC39 decorator). */ -export function PrimaryKey(options = {}) { - return createDecorator(options, false); -} -/** Marks a property as the serialized form of the primary key, e.g. for MongoDB ObjectId (TC39 decorator). */ -export function SerializedPrimaryKey(options = {}) { - return createDecorator(options, true); -} diff --git a/node_modules/@mikro-orm/decorators/es/Property.d.ts b/node_modules/@mikro-orm/decorators/es/Property.d.ts deleted file mode 100644 index 3272a56..0000000 --- a/node_modules/@mikro-orm/decorators/es/Property.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { type PropertyOptions } from '@mikro-orm/core'; -/** Defines a scalar property on an entity (TC39 decorator). */ -export declare function Property( - options?: PropertyOptions, -): ( - value: unknown, - context: - | ClassFieldDecoratorContext - | ClassGetterDecoratorContext - | ClassSetterDecoratorContext - | ClassAccessorDecoratorContext - | ClassMethodDecoratorContext, -) => void; diff --git a/node_modules/@mikro-orm/decorators/es/Property.js b/node_modules/@mikro-orm/decorators/es/Property.js deleted file mode 100644 index 0efe1d1..0000000 --- a/node_modules/@mikro-orm/decorators/es/Property.js +++ /dev/null @@ -1,42 +0,0 @@ -import { ReferenceKind, Utils } from '@mikro-orm/core'; -import { prepareMetadataContext } from '../utils.js'; -/** Defines a scalar property on an entity (TC39 decorator). */ -export function Property(options = {}) { - return function (value, context) { - const meta = prepareMetadataContext(context, ReferenceKind.SCALAR); - const { check, ...opts } = options; - const prop = { kind: ReferenceKind.SCALAR, ...opts }; - const name = options.name ?? context.name; - meta.checks ??= []; - if (context.name !== name) { - Utils.renameKey(options, 'name', 'fieldName'); - } - if (context.kind === 'field') { - prop.name = context.name; - prop.getter = false; - prop.setter = false; - } else if (context.kind === 'getter') { - prop.name = context.name; - prop.getter = true; - prop.setter = false; - } else if (context.kind === 'setter') { - prop.name = context.name; - prop.getter = false; - prop.setter = true; - } else if (context.kind === 'accessor') { - prop.name = context.name; - prop.getter = true; - prop.setter = true; - } else if (context.kind === 'method') { - prop.getter = true; - prop.persist = false; - prop.type = 'method'; - prop.getterName = context.name; - prop.name = name; - } - if (check) { - meta.checks.push({ property: prop.name, expression: check }); - } - meta.properties[prop.name] = prop; - }; -} diff --git a/node_modules/@mikro-orm/decorators/es/Transactional.d.ts b/node_modules/@mikro-orm/decorators/es/Transactional.d.ts deleted file mode 100644 index 9b7a57f..0000000 --- a/node_modules/@mikro-orm/decorators/es/Transactional.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { type TransactionOptions } from '@mikro-orm/core'; -import { type ContextProvider } from '../utils.js'; -type TransactionalOptions = TransactionOptions & { - context?: ContextProvider; - contextName?: string; -}; -/** - * This decorator wraps the method with `em.transactional()`, so you can provide `TransactionOptions` just like with `em.transactional()`. - * The difference is that you can specify the context in which the transaction begins by providing `context` option, - * and if omitted, the transaction will begin in the current context implicitly. - * It works on async functions and can be nested with `em.transactional()`. - * Unlike `em.transactional()`, this decorator uses `REQUIRED` propagation by default, which means it will join existing transactions. - */ -export declare function Transactional< - Owner extends object, - Value extends (this: Owner, ...args: any) => any = (this: Owner, ...args: any) => any, ->( - options?: TransactionalOptions, -): (value: Value, context: ClassMethodDecoratorContext) => (this: Owner, ...args: any) => Promise; -export {}; diff --git a/node_modules/@mikro-orm/decorators/es/Transactional.js b/node_modules/@mikro-orm/decorators/es/Transactional.js deleted file mode 100644 index 292d0f5..0000000 --- a/node_modules/@mikro-orm/decorators/es/Transactional.js +++ /dev/null @@ -1,30 +0,0 @@ -import { RequestContext, TransactionContext, TransactionPropagation } from '@mikro-orm/core'; -import { resolveContextProvider } from '../utils.js'; -/** - * This decorator wraps the method with `em.transactional()`, so you can provide `TransactionOptions` just like with `em.transactional()`. - * The difference is that you can specify the context in which the transaction begins by providing `context` option, - * and if omitted, the transaction will begin in the current context implicitly. - * It works on async functions and can be nested with `em.transactional()`. - * Unlike `em.transactional()`, this decorator uses `REQUIRED` propagation by default, which means it will join existing transactions. - */ -export function Transactional(options = {}) { - return function (value, context) { - if (value.constructor.name !== 'AsyncFunction') { - throw new Error('@Transactional() should be use with async functions'); - } - return async function (...args) { - const { context, contextName, ...txOptions } = options; - txOptions.propagation ??= TransactionPropagation.REQUIRED; - const em = - (await resolveContextProvider(this, context)) || - TransactionContext.getEntityManager(contextName) || - RequestContext.getEntityManager(contextName); - if (!em) { - throw new Error( - `@Transactional() decorator can only be applied to methods of classes with \`orm: MikroORM\` property, \`em: EntityManager\` property, or with a callback parameter like \`@Transactional(() => orm)\` that returns one of those types. The parameter will contain a reference to current \`this\`. Returning an EntityRepository from it is also supported.`, - ); - } - return em.transactional(() => value.apply(this, args), txOptions); - }; - }; -} diff --git a/node_modules/@mikro-orm/decorators/es/hooks.d.ts b/node_modules/@mikro-orm/decorators/es/hooks.d.ts deleted file mode 100644 index 87b4842..0000000 --- a/node_modules/@mikro-orm/decorators/es/hooks.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** Called before a new entity is persisted to the database (TC39 decorator). */ -export declare function BeforeCreate(): ( - value: (...args: any[]) => unknown, - context: ClassMethodDecoratorContext, -) => void; -/** Called after a new entity has been persisted to the database (TC39 decorator). */ -export declare function AfterCreate(): ( - value: (...args: any[]) => unknown, - context: ClassMethodDecoratorContext, -) => void; -/** Called before an existing entity is updated in the database (TC39 decorator). */ -export declare function BeforeUpdate(): ( - value: (...args: any[]) => unknown, - context: ClassMethodDecoratorContext, -) => void; -/** Called after an existing entity has been updated in the database (TC39 decorator). */ -export declare function AfterUpdate(): ( - value: (...args: any[]) => unknown, - context: ClassMethodDecoratorContext, -) => void; -/** Called before an entity is upserted (TC39 decorator). */ -export declare function BeforeUpsert(): ( - value: (...args: any[]) => unknown, - context: ClassMethodDecoratorContext, -) => void; -/** Called after an entity has been upserted (TC39 decorator). */ -export declare function AfterUpsert(): ( - value: (...args: any[]) => unknown, - context: ClassMethodDecoratorContext, -) => void; -/** Called when an entity is instantiated by the EntityManager (TC39 decorator). */ -export declare function OnInit(): (value: (...args: any[]) => unknown, context: ClassMethodDecoratorContext) => void; -/** Called after an entity is loaded from the database (TC39 decorator). */ -export declare function OnLoad(): (value: (...args: any[]) => unknown, context: ClassMethodDecoratorContext) => void; -/** - * Called before deleting entity, but only when providing initialized entity to EM#remove() - */ -export declare function BeforeDelete(): ( - value: (...args: any[]) => unknown, - context: ClassMethodDecoratorContext, -) => void; -/** - * Called after deleting entity, but only when providing initialized entity to EM#remove() - */ -export declare function AfterDelete(): ( - value: (...args: any[]) => unknown, - context: ClassMethodDecoratorContext, -) => void; diff --git a/node_modules/@mikro-orm/decorators/es/hooks.js b/node_modules/@mikro-orm/decorators/es/hooks.js deleted file mode 100644 index 95e2155..0000000 --- a/node_modules/@mikro-orm/decorators/es/hooks.js +++ /dev/null @@ -1,53 +0,0 @@ -import { EventType } from '@mikro-orm/core'; -function hook(type) { - return function (value, context) { - const meta = context.metadata; - meta.hooks ??= {}; - meta.hooks[type] ??= []; - meta.hooks[type].push(value); - }; -} -/** Called before a new entity is persisted to the database (TC39 decorator). */ -export function BeforeCreate() { - return hook(EventType.beforeCreate); -} -/** Called after a new entity has been persisted to the database (TC39 decorator). */ -export function AfterCreate() { - return hook(EventType.afterCreate); -} -/** Called before an existing entity is updated in the database (TC39 decorator). */ -export function BeforeUpdate() { - return hook(EventType.beforeUpdate); -} -/** Called after an existing entity has been updated in the database (TC39 decorator). */ -export function AfterUpdate() { - return hook(EventType.afterUpdate); -} -/** Called before an entity is upserted (TC39 decorator). */ -export function BeforeUpsert() { - return hook(EventType.beforeUpsert); -} -/** Called after an entity has been upserted (TC39 decorator). */ -export function AfterUpsert() { - return hook(EventType.afterUpsert); -} -/** Called when an entity is instantiated by the EntityManager (TC39 decorator). */ -export function OnInit() { - return hook(EventType.onInit); -} -/** Called after an entity is loaded from the database (TC39 decorator). */ -export function OnLoad() { - return hook(EventType.onLoad); -} -/** - * Called before deleting entity, but only when providing initialized entity to EM#remove() - */ -export function BeforeDelete() { - return hook(EventType.beforeDelete); -} -/** - * Called after deleting entity, but only when providing initialized entity to EM#remove() - */ -export function AfterDelete() { - return hook(EventType.afterDelete); -} diff --git a/node_modules/@mikro-orm/decorators/es/index.d.ts b/node_modules/@mikro-orm/decorators/es/index.d.ts deleted file mode 100644 index 7fbb9c3..0000000 --- a/node_modules/@mikro-orm/decorators/es/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export * from './PrimaryKey.js'; -export * from './Entity.js'; -export * from './OneToOne.js'; -export * from './ManyToOne.js'; -export * from './ManyToMany.js'; -export * from './OneToMany.js'; -export * from './Property.js'; -export * from './Check.js'; -export * from './Enum.js'; -export * from './Formula.js'; -export * from './Indexed.js'; -export * from './Embeddable.js'; -export * from './Embedded.js'; -export * from './Filter.js'; -export * from './CreateRequestContext.js'; -export * from './hooks.js'; -export * from './Transactional.js'; diff --git a/node_modules/@mikro-orm/decorators/es/index.js b/node_modules/@mikro-orm/decorators/es/index.js deleted file mode 100644 index 7fbb9c3..0000000 --- a/node_modules/@mikro-orm/decorators/es/index.js +++ /dev/null @@ -1,17 +0,0 @@ -export * from './PrimaryKey.js'; -export * from './Entity.js'; -export * from './OneToOne.js'; -export * from './ManyToOne.js'; -export * from './ManyToMany.js'; -export * from './OneToMany.js'; -export * from './Property.js'; -export * from './Check.js'; -export * from './Enum.js'; -export * from './Formula.js'; -export * from './Indexed.js'; -export * from './Embeddable.js'; -export * from './Embedded.js'; -export * from './Filter.js'; -export * from './CreateRequestContext.js'; -export * from './hooks.js'; -export * from './Transactional.js'; diff --git a/node_modules/@mikro-orm/decorators/legacy/Check.d.ts b/node_modules/@mikro-orm/decorators/legacy/Check.d.ts deleted file mode 100644 index e841300..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/Check.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { type CheckConstraint, type EntityClass } from '@mikro-orm/core'; -/** Defines a database check constraint on a property or entity class (legacy TypeScript decorator). */ -export declare function Check( - options: CheckConstraint, -): (target: T, propertyName?: T extends EntityClass ? undefined : keyof T) => any; diff --git a/node_modules/@mikro-orm/decorators/legacy/Check.js b/node_modules/@mikro-orm/decorators/legacy/Check.js deleted file mode 100644 index f5ceda0..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/Check.js +++ /dev/null @@ -1,13 +0,0 @@ -import { getMetadataFromDecorator } from '../utils.js'; -/** Defines a database check constraint on a property or entity class (legacy TypeScript decorator). */ -export function Check(options) { - return function (target, propertyName) { - const meta = getMetadataFromDecorator(propertyName ? target.constructor : target); - options.property ??= propertyName; - meta.checks.push(options); - if (!propertyName) { - return target; - } - return undefined; - }; -} diff --git a/node_modules/@mikro-orm/decorators/legacy/CreateRequestContext.d.ts b/node_modules/@mikro-orm/decorators/legacy/CreateRequestContext.d.ts deleted file mode 100644 index 73ac075..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/CreateRequestContext.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { type ContextProvider } from '../utils.js'; -/** Wraps an async method in a new RequestContext, forking the EntityManager (legacy TypeScript decorator). */ -export declare function CreateRequestContext( - context?: ContextProvider, - respectExistingContext?: boolean, -): MethodDecorator; -/** Like `@CreateRequestContext`, but reuses an existing RequestContext if one is available (legacy TypeScript decorator). */ -export declare function EnsureRequestContext(context?: ContextProvider): MethodDecorator; diff --git a/node_modules/@mikro-orm/decorators/legacy/CreateRequestContext.js b/node_modules/@mikro-orm/decorators/legacy/CreateRequestContext.js deleted file mode 100644 index 7a9a1af..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/CreateRequestContext.js +++ /dev/null @@ -1,35 +0,0 @@ -import { RequestContext, TransactionContext } from '@mikro-orm/core'; -import { resolveContextProvider } from '../utils.js'; -/** Wraps an async method in a new RequestContext, forking the EntityManager (legacy TypeScript decorator). */ -export function CreateRequestContext(context, respectExistingContext = false) { - return function (target, propertyKey, descriptor) { - const originalMethod = descriptor.value; - const name = respectExistingContext ? 'EnsureRequestContext' : 'CreateRequestContext'; - if (originalMethod.constructor.name !== 'AsyncFunction') { - throw new Error(`@${name}() should be use with async functions`); - } - descriptor.value = async function (...args) { - const em = await resolveContextProvider(this, context); - if (!em) { - throw new Error( - `@${name}() decorator can only be applied to methods of classes with \`orm: MikroORM\` property, \`em: EntityManager\` property, or with a callback parameter like \`@${name}(() => orm)\` that returns one of those types. The parameter will contain a reference to current \`this\`. Returning an EntityRepository from it is also supported.`, - ); - } - // reuse existing context if available for given respect `contextName` - if (respectExistingContext && RequestContext.getEntityManager(em.name)) { - return originalMethod.apply(this, args); - } - // Otherwise, the outer tx context would be preferred. - const txContext = TransactionContext.currentTransactionContext(); - const provider = txContext ? TransactionContext : RequestContext; - return txContext - ? provider.create(em.fork({ useContext: true }), () => originalMethod.apply(this, args)) - : provider.create(em, () => originalMethod.apply(this, args)); - }; - return descriptor; - }; -} -/** Like `@CreateRequestContext`, but reuses an existing RequestContext if one is available (legacy TypeScript decorator). */ -export function EnsureRequestContext(context) { - return CreateRequestContext(context, true); -} diff --git a/node_modules/@mikro-orm/decorators/legacy/Embeddable.d.ts b/node_modules/@mikro-orm/decorators/legacy/Embeddable.d.ts deleted file mode 100644 index 8e6e570..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/Embeddable.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { type EmbeddableOptions } from '@mikro-orm/core'; -/** Marks a class as an embeddable type (legacy TypeScript decorator). */ -export declare function Embeddable(options?: EmbeddableOptions): (target: T) => T; diff --git a/node_modules/@mikro-orm/decorators/legacy/Embeddable.js b/node_modules/@mikro-orm/decorators/legacy/Embeddable.js deleted file mode 100644 index b67d3ae..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/Embeddable.js +++ /dev/null @@ -1,12 +0,0 @@ -import { getMetadataFromDecorator } from '../utils.js'; -/** Marks a class as an embeddable type (legacy TypeScript decorator). */ -export function Embeddable(options = {}) { - return function (target) { - const meta = getMetadataFromDecorator(target); - meta.class = target; - meta.name = meta.class.name; - meta.embeddable = true; - Object.assign(meta, options); - return target; - }; -} diff --git a/node_modules/@mikro-orm/decorators/legacy/Embedded.d.ts b/node_modules/@mikro-orm/decorators/legacy/Embedded.d.ts deleted file mode 100644 index 82ae400..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/Embedded.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { type AnyEntity, type EntityName, type EmbeddedOptions } from '@mikro-orm/core'; -/** Defines an embedded property on an entity (legacy TypeScript decorator). */ -export declare function Embedded( - type?: EmbeddedOptions | (() => EntityName | EntityName[]), - options?: EmbeddedOptions, -): (target: AnyEntity, propertyName: string) => void; diff --git a/node_modules/@mikro-orm/decorators/legacy/Embedded.js b/node_modules/@mikro-orm/decorators/legacy/Embedded.js deleted file mode 100644 index 1e456f4..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/Embedded.js +++ /dev/null @@ -1,16 +0,0 @@ -import { ReferenceKind, Utils } from '@mikro-orm/core'; -import { validateSingleDecorator, getMetadataFromDecorator } from '../utils.js'; -/** Defines an embedded property on an entity (legacy TypeScript decorator). */ -export function Embedded(type = {}, options = {}) { - return function (target, propertyName) { - const meta = getMetadataFromDecorator(target.constructor); - validateSingleDecorator(meta, propertyName, ReferenceKind.EMBEDDED); - options = type instanceof Function ? { entity: type, ...options } : { ...type, ...options }; - Utils.defaultValue(options, 'prefix', true); - meta.properties[propertyName] = { - name: propertyName, - kind: ReferenceKind.EMBEDDED, - ...options, - }; - }; -} diff --git a/node_modules/@mikro-orm/decorators/legacy/Entity.d.ts b/node_modules/@mikro-orm/decorators/legacy/Entity.d.ts deleted file mode 100644 index d040c28..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/Entity.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { type EntityClass, type EntityOptions } from '@mikro-orm/core'; -/** Marks a class as a MikroORM entity (legacy TypeScript decorator). */ -export declare function Entity>(options?: EntityOptions): (target: T) => void; diff --git a/node_modules/@mikro-orm/decorators/legacy/Entity.js b/node_modules/@mikro-orm/decorators/legacy/Entity.js deleted file mode 100644 index b1afd27..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/Entity.js +++ /dev/null @@ -1,13 +0,0 @@ -import { Utils } from '@mikro-orm/core'; -import { getMetadataFromDecorator } from '../utils.js'; -/** Marks a class as a MikroORM entity (legacy TypeScript decorator). */ -export function Entity(options = {}) { - return function (target) { - const meta = getMetadataFromDecorator(target); - Utils.mergeConfig(meta, options); - meta.class = target; - if (!options.abstract || meta.discriminatorColumn) { - meta.name = target.name; - } - }; -} diff --git a/node_modules/@mikro-orm/decorators/legacy/Enum.d.ts b/node_modules/@mikro-orm/decorators/legacy/Enum.d.ts deleted file mode 100644 index efbda74..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/Enum.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { type EnumOptions, type AnyEntity, type Dictionary } from '@mikro-orm/core'; -/** Defines an enum property on an entity (legacy TypeScript decorator). */ -export declare function Enum( - options?: EnumOptions | (() => Dictionary), -): (target: T, propertyName: string) => void; diff --git a/node_modules/@mikro-orm/decorators/legacy/Enum.js b/node_modules/@mikro-orm/decorators/legacy/Enum.js deleted file mode 100644 index dda5d86..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/Enum.js +++ /dev/null @@ -1,15 +0,0 @@ -import { ReferenceKind } from '@mikro-orm/core'; -import { getMetadataFromDecorator } from '../utils.js'; -/** Defines an enum property on an entity (legacy TypeScript decorator). */ -export function Enum(options = {}) { - return function (target, propertyName) { - const meta = getMetadataFromDecorator(target.constructor); - options = options instanceof Function ? { items: options } : options; - meta.properties[propertyName] = { - name: propertyName, - kind: ReferenceKind.SCALAR, - enum: true, - ...options, - }; - }; -} diff --git a/node_modules/@mikro-orm/decorators/legacy/Filter.d.ts b/node_modules/@mikro-orm/decorators/legacy/Filter.d.ts deleted file mode 100644 index 520f74a..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/Filter.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { type FilterDef, type EntityClass } from '@mikro-orm/core'; -/** Registers a named filter on an entity class (legacy TypeScript decorator). */ -export declare function Filter>(options: FilterDef): (target: T) => void; diff --git a/node_modules/@mikro-orm/decorators/legacy/Filter.js b/node_modules/@mikro-orm/decorators/legacy/Filter.js deleted file mode 100644 index 1ba834c..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/Filter.js +++ /dev/null @@ -1,8 +0,0 @@ -import { getMetadataFromDecorator } from '../utils.js'; -/** Registers a named filter on an entity class (legacy TypeScript decorator). */ -export function Filter(options) { - return function (target) { - const meta = getMetadataFromDecorator(target); - meta.filters[options.name] = options; - }; -} diff --git a/node_modules/@mikro-orm/decorators/legacy/Formula.d.ts b/node_modules/@mikro-orm/decorators/legacy/Formula.d.ts deleted file mode 100644 index 3c3fab2..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/Formula.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { type FormulaCallback, type PropertyOptions } from '@mikro-orm/core'; -/** Defines a computed SQL formula property on an entity (legacy TypeScript decorator). */ -export declare function Formula( - formula: string | FormulaCallback, - options?: PropertyOptions, -): (target: T, propertyName: string) => void; diff --git a/node_modules/@mikro-orm/decorators/legacy/Formula.js b/node_modules/@mikro-orm/decorators/legacy/Formula.js deleted file mode 100644 index 058c0e0..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/Formula.js +++ /dev/null @@ -1,14 +0,0 @@ -import { ReferenceKind } from '@mikro-orm/core'; -import { getMetadataFromDecorator } from '../utils.js'; -/** Defines a computed SQL formula property on an entity (legacy TypeScript decorator). */ -export function Formula(formula, options = {}) { - return function (target, propertyName) { - const meta = getMetadataFromDecorator(target.constructor); - meta.properties[propertyName] = { - name: propertyName, - kind: ReferenceKind.SCALAR, - formula, - ...options, - }; - }; -} diff --git a/node_modules/@mikro-orm/decorators/legacy/Indexed.d.ts b/node_modules/@mikro-orm/decorators/legacy/Indexed.d.ts deleted file mode 100644 index 8ba9031..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/Indexed.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { type EntityClass, type IndexOptions, type UniqueOptions } from '@mikro-orm/core'; -/** Defines a database index on a property or entity class (legacy TypeScript decorator). */ -export declare function Index( - options?: IndexOptions, -): (target: T, propertyName?: T extends EntityClass ? undefined : keyof T) => any; -/** Defines a unique constraint on a property or entity class (legacy TypeScript decorator). */ -export declare function Unique( - options?: UniqueOptions, -): (target: T, propertyName?: T extends EntityClass ? undefined : keyof T) => any; diff --git a/node_modules/@mikro-orm/decorators/legacy/Indexed.js b/node_modules/@mikro-orm/decorators/legacy/Indexed.js deleted file mode 100644 index 354df1a..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/Indexed.js +++ /dev/null @@ -1,21 +0,0 @@ -import { getMetadataFromDecorator } from '../utils.js'; -function createDecorator(options, unique) { - return function (target, propertyName) { - const meta = getMetadataFromDecorator(propertyName ? target.constructor : target); - options.properties ??= propertyName; - const key = unique ? 'uniques' : 'indexes'; - meta[key].push(options); - if (!propertyName) { - return target; - } - return undefined; - }; -} -/** Defines a database index on a property or entity class (legacy TypeScript decorator). */ -export function Index(options = {}) { - return createDecorator(options, false); -} -/** Defines a unique constraint on a property or entity class (legacy TypeScript decorator). */ -export function Unique(options = {}) { - return createDecorator(options, true); -} diff --git a/node_modules/@mikro-orm/decorators/legacy/ManyToMany.d.ts b/node_modules/@mikro-orm/decorators/legacy/ManyToMany.d.ts deleted file mode 100644 index a48368c..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/ManyToMany.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { type EntityName, type ManyToManyOptions } from '@mikro-orm/core'; -/** Defines a many-to-many relationship (legacy TypeScript decorator). */ -export declare function ManyToMany( - entity: () => EntityName, - mappedBy?: (string & keyof Target) | ((e: Target) => any), - options?: Partial>, -): (target: Owner, propertyName: keyof Owner) => void; -export declare function ManyToMany(entity: string, options?: any): never; -export declare function ManyToMany( - options?: ManyToManyOptions, -): (target: Owner, propertyName: keyof Owner) => void; diff --git a/node_modules/@mikro-orm/decorators/legacy/ManyToMany.js b/node_modules/@mikro-orm/decorators/legacy/ManyToMany.js deleted file mode 100644 index f2432f7..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/ManyToMany.js +++ /dev/null @@ -1,11 +0,0 @@ -import { ReferenceKind } from '@mikro-orm/core'; -import { processDecoratorParameters, validateSingleDecorator, getMetadataFromDecorator } from '../utils.js'; -export function ManyToMany(entity, mappedBy, options = {}) { - return function (target, propertyName) { - options = processDecoratorParameters({ entity, mappedBy, options }); - const meta = getMetadataFromDecorator(target.constructor); - validateSingleDecorator(meta, propertyName, ReferenceKind.MANY_TO_MANY); - const property = { name: propertyName, kind: ReferenceKind.MANY_TO_MANY }; - meta.properties[propertyName] = Object.assign(meta.properties[propertyName] ?? {}, property, options); - }; -} diff --git a/node_modules/@mikro-orm/decorators/legacy/ManyToOne.d.ts b/node_modules/@mikro-orm/decorators/legacy/ManyToOne.d.ts deleted file mode 100644 index 58108ce..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/ManyToOne.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { type ManyToOneOptions, type EntityName } from '@mikro-orm/core'; -/** Defines a many-to-one relationship (legacy TypeScript decorator). */ -export declare function ManyToOne( - entity: (e?: any) => EntityName | EntityName[], - options?: Partial>, -): (target: Owner, propertyName: string) => void; -export declare function ManyToOne(entity: string, options?: any): never; -export declare function ManyToOne( - options?: ManyToOneOptions, -): (target: Owner, propertyName: string) => void; diff --git a/node_modules/@mikro-orm/decorators/legacy/ManyToOne.js b/node_modules/@mikro-orm/decorators/legacy/ManyToOne.js deleted file mode 100644 index 4f34307..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/ManyToOne.js +++ /dev/null @@ -1,11 +0,0 @@ -import { ReferenceKind } from '@mikro-orm/core'; -import { processDecoratorParameters, validateSingleDecorator, getMetadataFromDecorator } from '../utils.js'; -export function ManyToOne(entity = {}, options = {}) { - return function (target, propertyName) { - options = processDecoratorParameters({ entity, options }); - const meta = getMetadataFromDecorator(target.constructor); - validateSingleDecorator(meta, propertyName, ReferenceKind.MANY_TO_ONE); - const property = { name: propertyName, kind: ReferenceKind.MANY_TO_ONE }; - meta.properties[propertyName] = Object.assign(meta.properties[propertyName] ?? {}, property, options); - }; -} diff --git a/node_modules/@mikro-orm/decorators/legacy/OneToMany.d.ts b/node_modules/@mikro-orm/decorators/legacy/OneToMany.d.ts deleted file mode 100644 index 805b6e8..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/OneToMany.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { type EntityName, type OneToManyOptions } from '@mikro-orm/core'; -/** Defines a one-to-many relationship (legacy TypeScript decorator). */ -export declare function OneToMany( - entity: (e?: any) => EntityName, - mappedBy: (string & keyof Target) | ((e: Target) => any), - options?: Partial>, -): (target: Owner, propertyName: string) => void; -export declare function OneToMany( - options: OneToManyOptions, -): (target: Owner, propertyName: string) => void; diff --git a/node_modules/@mikro-orm/decorators/legacy/OneToMany.js b/node_modules/@mikro-orm/decorators/legacy/OneToMany.js deleted file mode 100644 index 36eadfc..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/OneToMany.js +++ /dev/null @@ -1,11 +0,0 @@ -import { ReferenceKind } from '@mikro-orm/core'; -import { processDecoratorParameters, validateSingleDecorator, getMetadataFromDecorator } from '../utils.js'; -export function OneToMany(entity, mappedBy, options = {}) { - return function (target, propertyName) { - options = processDecoratorParameters({ entity, mappedBy, options }); - const meta = getMetadataFromDecorator(target.constructor); - validateSingleDecorator(meta, propertyName, ReferenceKind.ONE_TO_MANY); - const property = { name: propertyName, kind: ReferenceKind.ONE_TO_MANY }; - meta.properties[propertyName] = Object.assign(meta.properties[propertyName] ?? {}, property, options); - }; -} diff --git a/node_modules/@mikro-orm/decorators/legacy/OneToOne.d.ts b/node_modules/@mikro-orm/decorators/legacy/OneToOne.d.ts deleted file mode 100644 index c78c576..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/OneToOne.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { type EntityName, type OneToOneOptions } from '@mikro-orm/core'; -/** Defines a one-to-one relationship (legacy TypeScript decorator). */ -export declare function OneToOne( - entity: (e: Owner) => EntityName | EntityName[], - mappedByOrOptions?: (string & keyof Target) | ((e: Target) => any) | Partial>, - options?: Partial>, -): (target: Owner, propertyName: string) => void; -export declare function OneToOne( - entity?: OneToOneOptions, -): (target: Owner, propertyName: string) => void; diff --git a/node_modules/@mikro-orm/decorators/legacy/OneToOne.js b/node_modules/@mikro-orm/decorators/legacy/OneToOne.js deleted file mode 100644 index c937eef..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/OneToOne.js +++ /dev/null @@ -1,13 +0,0 @@ -import { ReferenceKind } from '@mikro-orm/core'; -import { processDecoratorParameters, validateSingleDecorator, getMetadataFromDecorator } from '../utils.js'; -export function OneToOne(entity, mappedByOrOptions, options = {}) { - const mappedBy = typeof mappedByOrOptions === 'object' ? mappedByOrOptions.mappedBy : mappedByOrOptions; - options = typeof mappedByOrOptions === 'object' ? { ...mappedByOrOptions, ...options } : options; - return function (target, propertyName) { - options = processDecoratorParameters({ entity, mappedBy, options }); - const meta = getMetadataFromDecorator(target.constructor); - validateSingleDecorator(meta, propertyName, ReferenceKind.ONE_TO_ONE); - const property = { name: propertyName, kind: ReferenceKind.ONE_TO_ONE }; - meta.properties[propertyName] = Object.assign(meta.properties[propertyName] ?? {}, property, options); - }; -} diff --git a/node_modules/@mikro-orm/decorators/legacy/PrimaryKey.d.ts b/node_modules/@mikro-orm/decorators/legacy/PrimaryKey.d.ts deleted file mode 100644 index cd42c99..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/PrimaryKey.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { type PrimaryKeyOptions, type SerializedPrimaryKeyOptions } from '@mikro-orm/core'; -/** Marks a property as the primary key of an entity (legacy TypeScript decorator). */ -export declare function PrimaryKey( - options?: PrimaryKeyOptions, -): (target: T, propertyName: string) => void; -/** Marks a property as the serialized form of the primary key, e.g. for MongoDB ObjectId (legacy TypeScript decorator). */ -export declare function SerializedPrimaryKey( - options?: SerializedPrimaryKeyOptions, -): (target: T, propertyName: string) => void; diff --git a/node_modules/@mikro-orm/decorators/legacy/PrimaryKey.js b/node_modules/@mikro-orm/decorators/legacy/PrimaryKey.js deleted file mode 100644 index ec72bc5..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/PrimaryKey.js +++ /dev/null @@ -1,23 +0,0 @@ -import { ReferenceKind } from '@mikro-orm/core'; -import { validateSingleDecorator, getMetadataFromDecorator } from '../utils.js'; -function createDecorator(options, serialized) { - return function (target, propertyName) { - const meta = getMetadataFromDecorator(target.constructor); - validateSingleDecorator(meta, propertyName, ReferenceKind.SCALAR); - const k = serialized ? 'serializedPrimaryKey' : 'primary'; - options[k] = true; - meta.properties[propertyName] = { - name: propertyName, - kind: ReferenceKind.SCALAR, - ...options, - }; - }; -} -/** Marks a property as the primary key of an entity (legacy TypeScript decorator). */ -export function PrimaryKey(options = {}) { - return createDecorator(options, false); -} -/** Marks a property as the serialized form of the primary key, e.g. for MongoDB ObjectId (legacy TypeScript decorator). */ -export function SerializedPrimaryKey(options = {}) { - return createDecorator(options, true); -} diff --git a/node_modules/@mikro-orm/decorators/legacy/Property.d.ts b/node_modules/@mikro-orm/decorators/legacy/Property.d.ts deleted file mode 100644 index 8550a63..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/Property.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { type PropertyOptions } from '@mikro-orm/core'; -/** Defines a scalar property on an entity (legacy TypeScript decorator). */ -export declare function Property( - options?: PropertyOptions, -): (target: T, propertyName: string) => void; diff --git a/node_modules/@mikro-orm/decorators/legacy/Property.js b/node_modules/@mikro-orm/decorators/legacy/Property.js deleted file mode 100644 index 61047db..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/Property.js +++ /dev/null @@ -1,30 +0,0 @@ -import { Utils, ReferenceKind } from '@mikro-orm/core'; -import { validateSingleDecorator, getMetadataFromDecorator } from '../utils.js'; -/** Defines a scalar property on an entity (legacy TypeScript decorator). */ -export function Property(options = {}) { - return function (target, propertyName) { - const meta = getMetadataFromDecorator(target.constructor); - const desc = Object.getOwnPropertyDescriptor(target, propertyName) || {}; - validateSingleDecorator(meta, propertyName, ReferenceKind.SCALAR); - const name = options.name || propertyName; - if (propertyName !== name && !(desc.value instanceof Function)) { - Utils.renameKey(options, 'name', 'fieldName'); - } - options.name = propertyName; - const { check, ...opts } = options; - const prop = { kind: ReferenceKind.SCALAR, ...opts }; - prop.getter = !!desc.get; - prop.setter = !!desc.set; - if (desc.value instanceof Function) { - prop.getter = true; - prop.persist = false; - prop.type = 'method'; - prop.getterName = propertyName; - prop.name = name; - } - if (check) { - meta.checks.push({ property: prop.name, expression: check }); - } - meta.properties[prop.name] = prop; - }; -} diff --git a/node_modules/@mikro-orm/decorators/legacy/ReflectMetadataProvider.d.ts b/node_modules/@mikro-orm/decorators/legacy/ReflectMetadataProvider.d.ts deleted file mode 100644 index e4a8168..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/ReflectMetadataProvider.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import 'reflect-metadata'; -import { type EntityMetadata, type EntityProperty, MetadataProvider } from '@mikro-orm/core'; -/** Metadata provider that uses `reflect-metadata` to infer property types from TypeScript's emitted design:type metadata. */ -export declare class ReflectMetadataProvider extends MetadataProvider { - loadEntityMetadata(meta: EntityMetadata): void; - protected initPropertyType(meta: EntityMetadata, prop: EntityProperty): void; -} diff --git a/node_modules/@mikro-orm/decorators/legacy/ReflectMetadataProvider.js b/node_modules/@mikro-orm/decorators/legacy/ReflectMetadataProvider.js deleted file mode 100644 index 5f47562..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/ReflectMetadataProvider.js +++ /dev/null @@ -1,54 +0,0 @@ -import 'reflect-metadata'; -import { EntitySchema, MetadataProvider, ReferenceKind, Utils } from '@mikro-orm/core'; -/** Metadata provider that uses `reflect-metadata` to infer property types from TypeScript's emitted design:type metadata. */ -export class ReflectMetadataProvider extends MetadataProvider { - loadEntityMetadata(meta) { - // load types and column names - for (const prop of meta.props) { - /* v8 ignore next */ - if (typeof prop.entity === 'string') { - throw new Error( - `Relation target needs to be an entity class or EntitySchema instance, '${prop.entity}' given instead for ${meta.className}.${prop.name}.`, - ); - } else if (prop.entity) { - const tmp = prop.entity(); - prop.type = Array.isArray(tmp) - ? tmp - .map(t => Utils.className(t)) - .sort() - .join(' | ') - : Utils.className(tmp); - prop.target = EntitySchema.is(tmp) ? tmp.meta.class : tmp; - } else { - this.initPropertyType(meta, prop); - } - } - } - initPropertyType(meta, prop) { - const type = Reflect.getMetadata('design:type', meta.prototype, prop.name); - if ( - !prop.type && - (!type || (type === Object && prop.kind !== ReferenceKind.SCALAR)) && - !(prop.enum && (prop.items?.length ?? 0) > 0) - ) { - throw new Error( - `Please provide either 'type' or 'entity' attribute in ${meta.className}.${prop.name}. Make sure you have 'emitDecoratorMetadata' enabled in your tsconfig.json.`, - ); - } - // Force mapping to UnknownType which is a string when we see just `Object`, as that often means failed inference. - // This is to prevent defaulting to JSON column type, which can often be hard to revert and cause hard to understand issues with PKs. - // If there are explicitly provided `columnTypes`, we use those instead for the inference, this way - // we can have things like `columnType: 'timestamp'` be respected as `type: 'Date'`. - if (prop.kind === ReferenceKind.SCALAR && type === Object && !prop.columnTypes) { - prop.type ??= 'any'; - return; - } - let typeName = type?.name; - if (typeName && ['string', 'number', 'boolean', 'array', 'object'].includes(typeName.toLowerCase())) { - typeName = typeName.toLowerCase(); - } - prop.type ??= typeName; - prop.runtimeType ??= typeName; - prop.target = type; - } -} diff --git a/node_modules/@mikro-orm/decorators/legacy/Transactional.d.ts b/node_modules/@mikro-orm/decorators/legacy/Transactional.d.ts deleted file mode 100644 index 6fb312d..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/Transactional.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { type TransactionOptions } from '@mikro-orm/core'; -import { type ContextProvider } from '../utils.js'; -type TransactionalOptions = TransactionOptions & { - context?: ContextProvider; - contextName?: string; -}; -/** - * This decorator wraps the method with `em.transactional()`, so you can provide `TransactionOptions` just like with `em.transactional()`. - * The difference is that you can specify the context in which the transaction begins by providing `context` option, - * and if omitted, the transaction will begin in the current context implicitly. - * It works on async functions and can be nested with `em.transactional()`. - * Unlike `em.transactional()`, this decorator uses `REQUIRED` propagation by default, which means it will join existing transactions. - */ -export declare function Transactional(options?: TransactionalOptions): MethodDecorator; -export {}; diff --git a/node_modules/@mikro-orm/decorators/legacy/Transactional.js b/node_modules/@mikro-orm/decorators/legacy/Transactional.js deleted file mode 100644 index e66a6f2..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/Transactional.js +++ /dev/null @@ -1,32 +0,0 @@ -import { TransactionPropagation, RequestContext, TransactionContext } from '@mikro-orm/core'; -import { resolveContextProvider } from '../utils.js'; -/** - * This decorator wraps the method with `em.transactional()`, so you can provide `TransactionOptions` just like with `em.transactional()`. - * The difference is that you can specify the context in which the transaction begins by providing `context` option, - * and if omitted, the transaction will begin in the current context implicitly. - * It works on async functions and can be nested with `em.transactional()`. - * Unlike `em.transactional()`, this decorator uses `REQUIRED` propagation by default, which means it will join existing transactions. - */ -export function Transactional(options = {}) { - return function (target, propertyKey, descriptor) { - const originalMethod = descriptor.value; - if (originalMethod.constructor.name !== 'AsyncFunction') { - throw new Error('@Transactional() should be use with async functions'); - } - descriptor.value = async function (...args) { - const { context, contextName, ...txOptions } = options; - txOptions.propagation ??= TransactionPropagation.REQUIRED; - const em = - (await resolveContextProvider(this, context)) || - TransactionContext.getEntityManager(contextName) || - RequestContext.getEntityManager(contextName); - if (!em) { - throw new Error( - `@Transactional() decorator can only be applied to methods of classes with \`orm: MikroORM\` property, \`em: EntityManager\` property, or with a callback parameter like \`@Transactional(() => orm)\` that returns one of those types. The parameter will contain a reference to current \`this\`. Returning an EntityRepository from it is also supported.`, - ); - } - return em.transactional(() => originalMethod.apply(this, args), txOptions); - }; - return descriptor; - }; -} diff --git a/node_modules/@mikro-orm/decorators/legacy/hooks.d.ts b/node_modules/@mikro-orm/decorators/legacy/hooks.d.ts deleted file mode 100644 index 1605e46..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/hooks.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** Called before a new entity is persisted to the database (legacy TypeScript decorator). */ -export declare function BeforeCreate(): (target: any, method: string) => void; -/** Called after a new entity has been persisted to the database (legacy TypeScript decorator). */ -export declare function AfterCreate(): (target: any, method: string) => void; -/** Called before an existing entity is updated in the database (legacy TypeScript decorator). */ -export declare function BeforeUpdate(): (target: any, method: string) => void; -/** Called after an existing entity has been updated in the database (legacy TypeScript decorator). */ -export declare function AfterUpdate(): (target: any, method: string) => void; -/** Called before an entity is upserted (legacy TypeScript decorator). */ -export declare function BeforeUpsert(): (target: any, method: string) => void; -/** Called after an entity has been upserted (legacy TypeScript decorator). */ -export declare function AfterUpsert(): (target: any, method: string) => void; -/** Called when an entity is instantiated by the EntityManager (legacy TypeScript decorator). */ -export declare function OnInit(): (target: any, method: string) => void; -/** Called after an entity is loaded from the database (legacy TypeScript decorator). */ -export declare function OnLoad(): (target: any, method: string) => void; -/** - * Called before deleting entity, but only when providing initialized entity to EM#remove() - */ -export declare function BeforeDelete(): (target: any, method: string) => void; -/** - * Called after deleting entity, but only when providing initialized entity to EM#remove() - */ -export declare function AfterDelete(): (target: any, method: string) => void; diff --git a/node_modules/@mikro-orm/decorators/legacy/hooks.js b/node_modules/@mikro-orm/decorators/legacy/hooks.js deleted file mode 100644 index ac7bc07..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/hooks.js +++ /dev/null @@ -1,53 +0,0 @@ -import { EventType } from '@mikro-orm/core'; -import { getMetadataFromDecorator } from '../utils.js'; -function hook(type) { - return function (target, method) { - const meta = getMetadataFromDecorator(target.constructor); - meta.hooks[type] ??= []; - meta.hooks[type].push(method); - }; -} -/** Called before a new entity is persisted to the database (legacy TypeScript decorator). */ -export function BeforeCreate() { - return hook(EventType.beforeCreate); -} -/** Called after a new entity has been persisted to the database (legacy TypeScript decorator). */ -export function AfterCreate() { - return hook(EventType.afterCreate); -} -/** Called before an existing entity is updated in the database (legacy TypeScript decorator). */ -export function BeforeUpdate() { - return hook(EventType.beforeUpdate); -} -/** Called after an existing entity has been updated in the database (legacy TypeScript decorator). */ -export function AfterUpdate() { - return hook(EventType.afterUpdate); -} -/** Called before an entity is upserted (legacy TypeScript decorator). */ -export function BeforeUpsert() { - return hook(EventType.beforeUpsert); -} -/** Called after an entity has been upserted (legacy TypeScript decorator). */ -export function AfterUpsert() { - return hook(EventType.afterUpsert); -} -/** Called when an entity is instantiated by the EntityManager (legacy TypeScript decorator). */ -export function OnInit() { - return hook(EventType.onInit); -} -/** Called after an entity is loaded from the database (legacy TypeScript decorator). */ -export function OnLoad() { - return hook(EventType.onLoad); -} -/** - * Called before deleting entity, but only when providing initialized entity to EM#remove() - */ -export function BeforeDelete() { - return hook(EventType.beforeDelete); -} -/** - * Called after deleting entity, but only when providing initialized entity to EM#remove() - */ -export function AfterDelete() { - return hook(EventType.afterDelete); -} diff --git a/node_modules/@mikro-orm/decorators/legacy/index.d.ts b/node_modules/@mikro-orm/decorators/legacy/index.d.ts deleted file mode 100644 index 19ecae5..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export * from './PrimaryKey.js'; -export * from './Entity.js'; -export * from './OneToOne.js'; -export * from './ManyToOne.js'; -export * from './ManyToMany.js'; -export * from './OneToMany.js'; -export * from './Property.js'; -export * from './Check.js'; -export * from './Enum.js'; -export * from './Formula.js'; -export * from './Indexed.js'; -export * from './Embeddable.js'; -export * from './Embedded.js'; -export * from './Filter.js'; -export * from './CreateRequestContext.js'; -export * from './hooks.js'; -export * from './Transactional.js'; -export * from './ReflectMetadataProvider.js'; diff --git a/node_modules/@mikro-orm/decorators/legacy/index.js b/node_modules/@mikro-orm/decorators/legacy/index.js deleted file mode 100644 index 19ecae5..0000000 --- a/node_modules/@mikro-orm/decorators/legacy/index.js +++ /dev/null @@ -1,18 +0,0 @@ -export * from './PrimaryKey.js'; -export * from './Entity.js'; -export * from './OneToOne.js'; -export * from './ManyToOne.js'; -export * from './ManyToMany.js'; -export * from './OneToMany.js'; -export * from './Property.js'; -export * from './Check.js'; -export * from './Enum.js'; -export * from './Formula.js'; -export * from './Indexed.js'; -export * from './Embeddable.js'; -export * from './Embedded.js'; -export * from './Filter.js'; -export * from './CreateRequestContext.js'; -export * from './hooks.js'; -export * from './Transactional.js'; -export * from './ReflectMetadataProvider.js'; diff --git a/node_modules/@mikro-orm/decorators/package.json b/node_modules/@mikro-orm/decorators/package.json deleted file mode 100644 index 641ae63..0000000 --- a/node_modules/@mikro-orm/decorators/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "name": "@mikro-orm/decorators", - "version": "7.0.2", - "description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.", - "keywords": [ - "data-mapper", - "ddd", - "entity", - "identity-map", - "javascript", - "js", - "mariadb", - "mikro-orm", - "mongo", - "mongodb", - "mysql", - "orm", - "postgresql", - "sqlite", - "sqlite3", - "ts", - "typescript", - "unit-of-work" - ], - "homepage": "https://mikro-orm.io", - "bugs": { - "url": "https://github.com/mikro-orm/mikro-orm/issues" - }, - "license": "MIT", - "author": "Martin Adámek", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/mikro-orm/mikro-orm.git" - }, - "funding": "https://github.com/sponsors/b4nan", - "type": "module", - "exports": { - "./package.json": "./package.json", - "./es": "./es/index.js", - "./legacy": "./legacy/index.js" - }, - "publishConfig": { - "access": "public" - }, - "scripts": { - "build": "yarn compile && yarn copy", - "clean": "yarn run -T rimraf ./dist", - "compile": "yarn run -T tsc -p tsconfig.build.json", - "copy": "node ../../scripts/copy.mjs" - }, - "devDependencies": { - "@mikro-orm/core": "^7.0.2" - }, - "peerDependencies": { - "@mikro-orm/core": "7.0.2", - "reflect-metadata": "^0.1.0 || ^0.2.0" - }, - "peerDependenciesMeta": { - "reflect-metadata": { - "optional": true - } - }, - "engines": { - "node": ">= 22.17.0" - } -} diff --git a/node_modules/@mikro-orm/decorators/utils.d.ts b/node_modules/@mikro-orm/decorators/utils.d.ts deleted file mode 100644 index e044510..0000000 --- a/node_modules/@mikro-orm/decorators/utils.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { - type Dictionary, - EntityManager, - type EntityMetadata, - EntityRepository, - type MaybePromise, - MetadataStorage, - MikroORM, - type ReferenceKind, -} from '@mikro-orm/core'; -/** - * The type of context that the user intends to inject. - */ -export type ContextProvider = - | MaybePromise - | ((type: T) => MaybePromise< - | MikroORM - | EntityManager - | EntityRepository - | { - getEntityManager(): EntityManager; - } - >); -/** - * Find `EntityManager` in provided context, or else in instance's `orm` or `em` properties. - */ -export declare function resolveContextProvider( - caller: T & { - orm?: MaybePromise; - em?: MaybePromise; - }, - provider?: ContextProvider, -): Promise; -/** - * Relation decorators allow using two signatures - * - using first parameter as options object - * - using all parameters - * - * This function validates those two ways are not mixed and returns the final options object. - * If the second way is used, we always consider the last parameter as options object. - * @internal - */ -export declare function processDecoratorParameters(params: Dictionary): T; -/** - * Validate there is only one property decorator. This disallows using `@Property()` together with e.g. `@ManyToOne()` - * on the same property. One should use only `@ManyToOne()` in such case. - * We allow the existence of the property in metadata if the reference kind is the same, this should allow things like HMR to work. - */ -export declare function validateSingleDecorator(meta: EntityMetadata, propertyName: string, kind: ReferenceKind): void; -/** - * Prepares and returns a metadata context for an entity, ensuring default structure and validating proper usage of a single decorator. - * We need to use the `Object.hasOwn` here, since the metadata object respects inheritance, and the `properties` object might already - * exist for some base entity. - */ -export declare function prepareMetadataContext( - context: - | ClassFieldDecoratorContext - | ClassGetterDecoratorContext - | ClassSetterDecoratorContext - | ClassAccessorDecoratorContext - | ClassMethodDecoratorContext, - kind?: ReferenceKind, -): EntityMetadata; -/** - * Uses some dark magic to get source path to caller where decorator is used. - * Analyzes stack trace of error created inside the function call. - */ -export declare function lookupPathFromDecorator(name: string, stack?: string[]): string; -/** Retrieves or creates the metadata object for a decorated entity class. */ -export declare function getMetadataFromDecorator( - target: T & - Dictionary & { - [MetadataStorage.PATH_SYMBOL]?: string; - }, -): EntityMetadata; diff --git a/node_modules/@mikro-orm/decorators/utils.js b/node_modules/@mikro-orm/decorators/utils.js deleted file mode 100644 index 1c17968..0000000 --- a/node_modules/@mikro-orm/decorators/utils.js +++ /dev/null @@ -1,131 +0,0 @@ -import { EntityManager, EntityRepository, MetadataError, MetadataStorage, MikroORM, Utils } from '@mikro-orm/core'; -function getEntityManager(caller, context) { - if (context instanceof EntityManager) { - return context; - } - if (context instanceof EntityRepository) { - return context.getEntityManager(); - } - if (context instanceof MikroORM) { - return context.em; - } - if (caller.em instanceof EntityManager) { - return caller.em; - } - if (caller.orm instanceof MikroORM) { - return caller.orm.em; - } - return undefined; -} -/** - * Find `EntityManager` in provided context, or else in instance's `orm` or `em` properties. - */ -export async function resolveContextProvider(caller, provider) { - const context = typeof provider === 'function' ? await provider(caller) : await provider; - return getEntityManager({ orm: await caller.orm, em: await caller.em }, context); -} -/** - * Relation decorators allow using two signatures - * - using first parameter as options object - * - using all parameters - * - * This function validates those two ways are not mixed and returns the final options object. - * If the second way is used, we always consider the last parameter as options object. - * @internal - */ -export function processDecoratorParameters(params) { - const keys = Object.keys(params); - const values = Object.values(params); - if (!Utils.isPlainObject(values[0])) { - const lastKey = keys[keys.length - 1]; - const last = params[lastKey]; - delete params[lastKey]; - return { ...last, ...params }; - } - // validate only first parameter is used if its an option object - const empty = v => v == null || (Utils.isPlainObject(v) && !Utils.hasObjectKeys(v)); - if (values.slice(1).some(v => !empty(v))) { - throw new Error( - 'Mixing first decorator parameter as options object with other parameters is forbidden. ' + - 'If you want to use the options parameter at first position, provide all options inside it.', - ); - } - return values[0]; -} -/** - * Validate there is only one property decorator. This disallows using `@Property()` together with e.g. `@ManyToOne()` - * on the same property. One should use only `@ManyToOne()` in such case. - * We allow the existence of the property in metadata if the reference kind is the same, this should allow things like HMR to work. - */ -export function validateSingleDecorator(meta, propertyName, kind) { - if (meta.properties[propertyName] && meta.properties[propertyName].kind !== kind) { - throw MetadataError.multipleDecorators(meta.className, propertyName); - } -} -/** - * Prepares and returns a metadata context for an entity, ensuring default structure and validating proper usage of a single decorator. - * We need to use the `Object.hasOwn` here, since the metadata object respects inheritance, and the `properties` object might already - * exist for some base entity. - */ -export function prepareMetadataContext(context, kind) { - const meta = context.metadata; - if (!Object.hasOwn(meta, 'properties')) { - meta.properties = { ...meta.properties }; - } - if (kind) { - validateSingleDecorator(meta, context.name, kind); - } - return meta; -} -/** - * Uses some dark magic to get source path to caller where decorator is used. - * Analyzes stack trace of error created inside the function call. - */ -export function lookupPathFromDecorator(name, stack) { - // use some dark magic to get source path to caller - stack = stack || new Error().stack.split('\n'); - // In some situations (e.g. swc 1.3.4+), the presence of a source map can obscure the call to - // __decorate(), replacing it with the constructor name. To support these cases we look for - // Reflect.decorate() as well. Also when babel is used, we need to check - // the `_applyDecoratedDescriptor` method instead. - let line = stack.findIndex(line => /__decorate|Reflect\.decorate|_applyDecoratedDescriptor/.exec(line)); - // bun does not have those lines at all, only the DecorateProperty/DecorateConstructor, - // but those are also present in node, so we need to check this only if they weren't found. - if (line === -1) { - // here we handle bun which stack is different from nodejs so we search for reflect-metadata - // Different bun versions might have different stack traces. The "last index" works for both 1.2.6 and 1.2.7. - const reflectLine = stack.findLastIndex(line => - line.replace(/\\/g, '/').includes('node_modules/reflect-metadata/Reflect.js'), - ); - if (reflectLine === -1 || reflectLine + 2 >= stack.length || !stack[reflectLine + 1].includes('bun:wrap')) { - return name; - } - line = reflectLine + 2; - } - if (stack[line].includes('Reflect.decorate')) { - line++; - } - // Skip decorator runtime helpers (tslib, @oxc-project/runtime, etc.) - while ( - line < stack.length && - /node_modules\/(tslib\/|@oxc-project\/runtime\/)/.test(stack[line].replace(/\\/g, '/')) - ) { - line++; - } - try { - const re = /\(.+\)/i.exec(stack[line]) ? /\((.*):\d+:\d+\)/ : /at\s*(.*):\d+:\d+$/; - return stack[line].match(re)[1]; - } catch { - return name; - } -} -/** Retrieves or creates the metadata object for a decorated entity class. */ -export function getMetadataFromDecorator(target) { - if (!Object.hasOwn(target, MetadataStorage.PATH_SYMBOL)) { - Object.defineProperty(target, MetadataStorage.PATH_SYMBOL, { - value: lookupPathFromDecorator(target.name), - writable: true, - }); - } - return MetadataStorage.getMetadata(target.name, target[MetadataStorage.PATH_SYMBOL]); -} diff --git a/node_modules/@mikro-orm/nestjs/LICENSE b/node_modules/@mikro-orm/nestjs/LICENSE deleted file mode 100644 index 51f3ed6..0000000 --- a/node_modules/@mikro-orm/nestjs/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2019 Dario Mancuso, Martin Adámek - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@mikro-orm/nestjs/README.md b/node_modules/@mikro-orm/nestjs/README.md deleted file mode 100644 index 546f5f7..0000000 --- a/node_modules/@mikro-orm/nestjs/README.md +++ /dev/null @@ -1,503 +0,0 @@ -

- Nest Logo
MikroORM -

- -> Based on [dario1985/nestjs-mikro-orm](https://github.com/dario1985/nestjs-mikro-orm). - -[![NPM version](https://img.shields.io/npm/v/@mikro-orm/nestjs.svg)](https://www.npmjs.com/package/@mikro-orm/nestjs) -[![Chat on slack](https://img.shields.io/badge/chat-on%20slack-blue.svg)](https://join.slack.com/t/mikroorm/shared_invite/enQtNTM1ODYzMzM4MDk3LWM4ZDExMjU5ZDhmNjA2MmM3MWMwZmExNjhhNDdiYTMwNWM0MGY5ZTE3ZjkyZTMzOWExNDgyYmMzNDE1NDI5NjA) -[![Downloads](https://img.shields.io/npm/dm/@mikro-orm/nestjs.svg)](https://www.npmjs.com/package/@mikro-orm/nestjs) -[![Build Status](https://github.com/mikro-orm/nestjs/workflows/tests/badge.svg?branch=master)](https://github.com/mikro-orm/nestjs/actions?workflow=tests) - -## Description - -The [MikroORM](https://github.com/mikro-orm/mikro-orm) module for [NestJS](https://github.com/nestjs/nest). - -## 🚀 Quick Start - -First install the module via `yarn` or `npm` and do not forget to install the database driver as well: - -```bash -$ yarn add @mikro-orm/core @mikro-orm/nestjs @mikro-orm/mongodb # for mongo -$ yarn add @mikro-orm/core @mikro-orm/nestjs @mikro-orm/mysql # for mysql/mariadb -$ yarn add @mikro-orm/core @mikro-orm/nestjs @mikro-orm/mariadb # for mysql/mariadb -$ yarn add @mikro-orm/core @mikro-orm/nestjs @mikro-orm/postgresql # for postgresql -$ yarn add @mikro-orm/core @mikro-orm/nestjs @mikro-orm/sqlite # for sqlite -``` - -or - -```bash -$ npm i -s @mikro-orm/core @mikro-orm/nestjs @mikro-orm/mongodb # for mongo -$ npm i -s @mikro-orm/core @mikro-orm/nestjs @mikro-orm/mysql # for mysql/mariadb -$ npm i -s @mikro-orm/core @mikro-orm/nestjs @mikro-orm/mariadb # for mysql/mariadb -$ npm i -s @mikro-orm/core @mikro-orm/nestjs @mikro-orm/postgresql # for postgresql -$ npm i -s @mikro-orm/core @mikro-orm/nestjs @mikro-orm/sqlite # for sqlite -``` - -Once the installation process is completed, we can import the `MikroOrmModule` into the root `AppModule`. - -```typescript -@Module({ - imports: [ - MikroOrmModule.forRoot({ - entities: ['../dist/entities'], - entitiesTs: ['../src/entities'], - dbName: 'my-db-name.sqlite3', - type: 'sqlite', - baseDir: __dirname, - }), - ], - controllers: [AppController], - providers: [AppService], -}) -export class AppModule {} -``` - -The `forRoot()` method accepts the same configuration object as `init()` from the MikroORM package. -You can also omit the parameter to use the CLI config. - -Afterward, the `EntityManager` will be available to inject across entire project (without importing any module elsewhere). - -```ts -@Injectable() -export class MyService { - - constructor(private readonly orm: MikroORM, - private readonly em: EntityManager) { } - -} -``` - -To define which repositories shall be registered in the current scope you can use the `forFeature()` method. For example, in this way: - -> You should **not** register your base entities via `forFeature()`, as there are no -> repositories for those. On the other hand, base entities need to be part of the list -> in `forRoot()` (or in the ORM config in general). - -```typescript -// photo.module.ts - -@Module({ - imports: [MikroOrmModule.forFeature([Photo])], - providers: [PhotoService], - controllers: [PhotoController], -}) -export class PhotoModule {} -``` - -and import it into the root `AppModule`: - -```typescript -// app.module.ts -@Module({ - imports: [MikroOrmModule.forRoot(...), PhotoModule], -}) -export class AppModule {} -``` - -In this way we can inject the `PhotoRepository` to the `PhotoService` using the `@InjectRepository()` decorator: - -```typescript -@Injectable() -export class PhotoService { - constructor( - @InjectRepository(Photo) - private readonly photoRepository: EntityRepository - ) {} - - // ... - -} -``` - -## Driver-specific imports - -When you try to inject the `EntityManager` or `MikroORM` symbols exported from the driver package, Nest.js needs to be aware of those typed. In other words, those driver specific exports need to be specifically registered in the DI container. This module uses automated discovery of the driver type in order to do that, but it fails to work when you use `useFactory` which requires some dependencies. - -Instead of relying on this discovery, you can provide the driver type explicitly: - -```typescript -@Module({ - imports: [ - MikroOrmModule.forRootAsync({ - useFactory: (configService: ConfigService) => configService.getOrThrow(ConfigKey.ORM), - inject: [ConfigService], - driver: PostgreSqlDriver, - }), - ], - controllers: [AppController], - providers: [AppService], -}) -export class AppModule {} -``` - -## Load entities automatically - -Manually adding entities to the entities array of the connection options can be -tedious. In addition, referencing entities from the root module breaks application -domain boundaries and causes leaking implementation details to other parts of the -application. To solve this issue, static glob paths can be used. - -Note, however, that glob paths are not supported by webpack, so if you are building -your application within a monorepo, you won't be able to use them. To address this -issue, an alternative solution is provided. To automatically load entities, set the -`autoLoadEntities` property of the configuration object (passed into the `forRoot()` -method) to `true`, as shown below: - -```ts -@Module({ - imports: [ - MikroOrmModule.forRoot({ - ... - autoLoadEntities: true, - }), - ], -}) -export class AppModule {} -``` - -With that option specified, every entity registered through the `forFeature()` -method will be automatically added to the entities array of the configuration -object. - -> Note that entities that aren't registered through the `forFeature()` method, but -> are only referenced from the entity (via a relationship), won't be included by -> way of the `autoLoadEntities` setting. - -> Using `autoLoadEntities` also has no effect on the MikroORM CLI - for that we -> still need CLI config with the full list of entities. On the other hand, we can -> use globs there, as the CLI won't go thru webpack. - -## Request scoped handlers in queues - -As mentioned in the docs, we need a clean state for each request. That is handled -automatically thanks to the `RequestContext` helper registered via middleware. - -But middlewares are executed only for regular HTTP request handles, what if we need -a request scoped method outside of that? One example of that is queue handlers or -scheduled tasks. - -We can use the `@CreateRequestContext()` decorator. It requires you to first inject the -`MikroORM` instance to current context, it will be then used to create the context -for you. Under the hood, the decorator will register new request context for your -method and execute it inside the context. - -```ts -@Injectable() -export class MyService { - - constructor(private readonly orm: MikroORM) { } - - @CreateRequestContext() - async doSomething() { - // this will be executed in a separate context - } - -} -``` - -## Serialization caveat - -[NestJS built-in serialization](https://docs.nestjs.com/techniques/serialization) relies on [class-transformer](https://github.com/typestack/class-transformer). Since MikroORM wraps every single entity relation in a `Reference` or a `Collection` instance (for type-safety), this will make the built-in `ClassSerializerInterceptor` blind to any wrapped relations. In other words, if you return MikroORM entities from your HTTP or WebSocket handlers, all of their relations will NOT be serialized. - -Luckily, MikroORM provides a [serialization API](https://mikro-orm.io/docs/serializing) which can be used in lieu of `ClassSerializerInterceptor`. - -```typescript -@Entity() -export class Book { - - @Property({ hidden: true }) // --> Equivalent of class-transformer's `@Exclude` - hiddenField: number = Date.now(); - - @Property({ persist: false }) // --> Will only exist in memory (and will be serialized). Similar to class-transformer's `@Expose()` - count?: number; - - @ManyToOne({ serializer: value => value.name, serializedName: 'authorName' }) // Equivalent of class-transformer's `@Transform()` - author: Author; - -} - -``` - -## Using `AsyncLocalStorage` for request context - -> Since v5 AsyncLocalStorage is used inside RequestContext helper so this section is no longer valid. - -By default, the `domain` api is used in the `RequestContext` helper. Since `@mikro-orm/core@4.0.3`, -you can use the new `AsyncLocalStorage` too, if you are on up to date node version: - -```typescript -// create new (global) storage instance -const storage = new AsyncLocalStorage(); - -@Module({ - imports: [ - MikroOrmModule.forRoot({ - // ... - registerRequestContext: false, // disable automatatic middleware - context: () => storage.getStore(), // use our AsyncLocalStorage instance - }), - ], - controllers: [AppController], - providers: [AppService], -}) -export class AppModule {} - -// register the request context middleware -const app = await NestFactory.create(AppModule, { ... }); - -app.use((req, res, next) => { - storage.run(orm.em.fork(true, true), next); -}); -``` - -## Using NestJS `Injection Scopes` for request context - -Since `@nestjs/common@6`, you can use the new `Injection Scopes` (https://docs.nestjs.com/fundamentals/injection-scopes) too: - -```typescript -import { Scope } from '@nestjs/common'; - -@Module({ - imports: [ - MikroOrmModule.forRoot({ - // ... - registerRequestContext: false, // disable automatatic middleware - scope: Scope.REQUEST - }), - ], - controllers: [AppController], - providers: [AppService] -}) -export class AppModule {} -``` - -Or, if you're using the Async provider: - -```typescript -import { Scope } from '@nestjs/common'; -import { PostgreSqlDriver } from '@mikro-orm/postgresql'; - -@Module({ - imports: [ - MikroOrmModule.forRootAsync({ - // ... - useFactory: () => ({ - // ... - registerRequestContext: false, // disable automatatic middleware - }), - scope: Scope.REQUEST - }) - ], - controllers: [AppController], - providers: [AppService] -}) -export class AppModule {} -``` - -> Please note that this might have some impact on performance, -> see: https://docs.nestjs.com/fundamentals/injection-scopes#performance - -## Using custom repositories - -When using custom repositories, we can get around the need for `@InjectRepository()` -decorator by naming our repositories the same way as `getRepositoryToken()` method do: - -```ts -export const getRepositoryToken = (entity: EntityName) => `${Utils.className(entity)}Repository`; -``` - -In other words, as long as we name the repository same was as the entity is called, -appending `Repository` suffix, the repository will be registered automatically in -the Nest.js DI container. - -`**./author.entity.ts**` - -```ts -@Entity({ customRepository: () => AuthorRepository }) -export class Author { - - // to allow inference in `em.getRepository()` - [EntityRepositoryType]?: AuthorRepository; - -} -``` - -`**./author.repository.ts**` - -```ts -export class AuthorRepository extends EntityRepository { - - // your custom methods... - -} -``` - -As the custom repository name is the same as what `getRepositoryToken()` would -return, we do not need the `@InjectRepository()` decorator anymore: - -```ts -@Injectable() -export class MyService { - - constructor(private readonly repo: AuthorRepository) { } - -} -``` - -## App shutdown and cleanup - -By default, NestJS does not listen for system process termination signals (for example SIGTERM). Because of this, the MikroORM shutdown logic will never executed if the process is terminated, which could lead to database connections remaining open and consuming resources. To enable this, the `enableShutdownHooks` function needs to be called when starting up the application. - -```ts -async function bootstrap() { - const app = await NestFactory.create(AppModule); - - // Starts listening for shutdown hooks - app.enableShutdownHooks(); - - await app.listen(3000); -} -``` - -More information about [enableShutdownHooks](https://docs.nestjs.com/fundamentals/lifecycle-events#application-shutdown) - -## Multiple Database Connections - -You can define multiple database connections by registering multiple `MikroOrmModule`'s, each with a unique `contextName`. You will need to disable the automatic request context middleware by setting `registerRequestContext` to `false`, as it wouldn't work with this approach - note that this needs to be part of all your `MikroOrmModule`s with non-default `contextName`. To have the same automatic request context behaviour, you must register `MikroOrmModule` with `forMiddleware()` instead: - -```typescript -@Module({ - imports: [ - MikroOrmModule.forRoot({ - contextName: 'db1', - registerRequestContext: false, // disable automatatic middleware - ... - }), - MikroOrmModule.forRoot({ - contextName: 'db2', - registerRequestContext: false, // disable automatatic middleware - ... - }), - MikroOrmModule.forMiddleware() - ], - controllers: [AppController], - providers: [AppService], -}) -export class AppModule {} -``` - -Since MikroORM v6.4, you can also define [multiple configurations](https://mikro-orm.io/docs/quick-start#configuration-file-structure) as part of a single ORM config. If you want to use such a combined config file, you need to destructure the result, since it will be also an array: - -```typescript -@Module({ - imports: [ - // `config` exports an array of configs - ...MikroOrmModule.forRoot(config), - MikroOrmModule.forMiddleware() - ], - controllers: [AppController], - providers: [AppService], -}) -export class AppModule {} -``` - -To access different `MikroORM`/`EntityManager` connections you have to use the new injection tokens `@InjectMikroORM()`/`@InjectEntityManager()` where you are required to pass the `contextName` in: - -```ts -@Injectable() -export class MyService { - - constructor(@InjectMikroORM('db1') private readonly orm1: MikroORM, - @InjectMikroORM('db2') private readonly orm2: MikroORM, - @InjectEntityManager('db1') private readonly em1: EntityManager, - @InjectEntityManager('db2') private readonly em2: EntityManager) { } - -} -``` - -When defining your repositories with `forFeature()` method you will need to set which `contextName` you want it registered against: - -```typescript -// photo.module.ts - -@Module({ - imports: [MikroOrmModule.forFeature([Photo], 'db1')], - providers: [PhotoService], - controllers: [PhotoController], -}) -export class PhotoModule {} -``` - -When using the `@InjectRepository` decorator you will also need to pass the `contextName` you want to get it from: - -```typescript -@Injectable() -export class PhotoService { - constructor( - @InjectRepository(Photo, 'db1') - private readonly photoRepository: EntityRepository - ) {} - - // ... - -} -``` - -You can use the `@InjectMikroORMs` decorator to get all registered MikroORM instances: - -```typescript -@Injectable() -export class MyService { - - constructor(@InjectMikroORMs() private readonly orms: MikroORM[]) { } - -} -``` - -## Testing - -The `nestjs-mikro-orm` package exposes `getRepositoryToken()` function that returns prepared token based on a given entity to allow mocking the repository. - -```typescript -@Module({ - providers: [ - PhotoService, - { - provide: getRepositoryToken(Photo), - useValue: mockedRepository, - }, - ], -}) -export class PhotoModule {} -``` - -## 🤝 Contributing - -Contributions, issues and feature requests are welcome. Please read -[CONTRIBUTING.md](CONTRIBUTING.md) -for details on the process for submitting pull requests to us. - -## Authors - -👤 **Dario Mancuso** - -- Github: [@dario1985](https://github.com/dario1985) - -👤 **Martin Adámek** - -- Twitter: [@B4nan](https://twitter.com/B4nan) -- Github: [@b4nan](https://github.com/b4nan) - -See also the list of contributors who [participated](https://github.com/mikro-orm/nestjs/contributors) in this project. - -## Show Your Support - -Please ⭐️ this repository if this project helped you! - -## 📝 License - -Copyright © 2018 [Martin Adámek](https://github.com/b4nan). - -This project is licensed under the MIT License - see the [LICENSE file](LICENSE) for details. diff --git a/node_modules/@mikro-orm/nestjs/index.d.ts b/node_modules/@mikro-orm/nestjs/index.d.ts deleted file mode 100644 index 53ae1be..0000000 --- a/node_modules/@mikro-orm/nestjs/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './mikro-orm.module.js'; -export * from './mikro-orm.common.js'; -export * from './mikro-orm.middleware.js'; -export * from './multiple-mikro-orm.middleware.js'; -export * from './typings.js'; diff --git a/node_modules/@mikro-orm/nestjs/index.js b/node_modules/@mikro-orm/nestjs/index.js deleted file mode 100644 index 53ae1be..0000000 --- a/node_modules/@mikro-orm/nestjs/index.js +++ /dev/null @@ -1,5 +0,0 @@ -export * from './mikro-orm.module.js'; -export * from './mikro-orm.common.js'; -export * from './mikro-orm.middleware.js'; -export * from './multiple-mikro-orm.middleware.js'; -export * from './typings.js'; diff --git a/node_modules/@mikro-orm/nestjs/middleware.helper.d.ts b/node_modules/@mikro-orm/nestjs/middleware.helper.d.ts deleted file mode 100644 index be562d3..0000000 --- a/node_modules/@mikro-orm/nestjs/middleware.helper.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { type MiddlewareConsumer } from '@nestjs/common'; -import type { MikroOrmMiddlewareModuleOptions } from './typings.js'; -export declare function forRoutesPath(options: MikroOrmMiddlewareModuleOptions, consumer: MiddlewareConsumer): string; diff --git a/node_modules/@mikro-orm/nestjs/middleware.helper.js b/node_modules/@mikro-orm/nestjs/middleware.helper.js deleted file mode 100644 index b657e6d..0000000 --- a/node_modules/@mikro-orm/nestjs/middleware.helper.js +++ /dev/null @@ -1,17 +0,0 @@ -import { HttpStatus } from '@nestjs/common'; -export function forRoutesPath(options, consumer) { - if (options.forRoutesPath) { - return options.forRoutesPath; - } - // detect nest v11 based on a newly added enum value - if (HttpStatus.MULTI_STATUS) { - return '{*all}'; - } - const isFastify = (consumer) => { - if (typeof consumer.httpAdapter !== 'object') { - return false; - } - return consumer.httpAdapter.constructor.name.toLowerCase().startsWith('fastify'); - }; - return isFastify(consumer) ? '(.*)' : '*'; -} diff --git a/node_modules/@mikro-orm/nestjs/mikro-orm-core.module.d.ts b/node_modules/@mikro-orm/nestjs/mikro-orm-core.module.d.ts deleted file mode 100644 index 056935f..0000000 --- a/node_modules/@mikro-orm/nestjs/mikro-orm-core.module.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { type DynamicModule, type MiddlewareConsumer, type NestModule, type OnApplicationShutdown } from '@nestjs/common'; -import { ModuleRef } from '@nestjs/core'; -import type { MikroOrmModuleOptions, MikroOrmModuleAsyncOptions, MikroOrmModuleSyncOptions } from './typings.js'; -export declare class MikroOrmCoreModule implements NestModule, OnApplicationShutdown { - private readonly options; - private readonly moduleRef; - constructor(options: MikroOrmModuleOptions, moduleRef: ModuleRef); - static forRoot(options: MikroOrmModuleSyncOptions): Promise; - static forRootAsync(options: MikroOrmModuleAsyncOptions): Promise; - private static buildDynamicModule; - /** - * Tries to create the driver instance to use the actual entity manager implementation for DI symbol. - * This helps with dependency resolution issues when importing the EM from driver package (e.g. `SqlEntityManager`). - */ - private static createEntityManager; - onApplicationShutdown(): Promise; - configure(consumer: MiddlewareConsumer): void; - private static setContextName; -} diff --git a/node_modules/@mikro-orm/nestjs/mikro-orm-core.module.js b/node_modules/@mikro-orm/nestjs/mikro-orm-core.module.js deleted file mode 100644 index f651667..0000000 --- a/node_modules/@mikro-orm/nestjs/mikro-orm-core.module.js +++ /dev/null @@ -1,144 +0,0 @@ -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; -var __param = (this && this.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; -var MikroOrmCoreModule_1; -import { Configuration, EntityManager, MikroORM } from '@mikro-orm/core'; -import { Global, Inject, Module, RequestMethod, } from '@nestjs/common'; -// oxlint-disable-next-line consistent-type-imports -import { ModuleRef } from '@nestjs/core'; -import { forRoutesPath } from './middleware.helper.js'; -import { CONTEXT_NAMES, getEntityManagerToken, getMikroORMToken, MIKRO_ORM_MODULE_OPTIONS, } from './mikro-orm.common.js'; -import { MikroOrmEntitiesStorage } from './mikro-orm.entities.storage.js'; -import { MikroOrmMiddleware } from './mikro-orm.middleware.js'; -import { createAsyncProviders, createEntityManagerProvider, createMikroOrmProvider } from './mikro-orm.providers.js'; -let MikroOrmCoreModule = MikroOrmCoreModule_1 = class MikroOrmCoreModule { - options; - moduleRef; - constructor(options, moduleRef) { - this.options = options; - this.moduleRef = moduleRef; - } - static async forRoot(options) { - const contextName = this.setContextName(options.contextName); - const em = await this.createEntityManager(options); - return this.buildDynamicModule(em, contextName, options, [ - { provide: MIKRO_ORM_MODULE_OPTIONS, useValue: options }, - ]); - } - static async forRootAsync(options) { - const contextName = this.setContextName(options.contextName); - const em = await this.createEntityManager(options); - return this.buildDynamicModule(em, contextName, options, [...(options.providers || []), ...createAsyncProviders({ ...options, contextName: options.contextName })], options.imports || []); - } - static buildDynamicModule(em, contextName, options, baseProviders, imports = []) { - if (em && !contextName) { - return { - module: MikroOrmCoreModule_1, - imports, - providers: [ - ...baseProviders, - createMikroOrmProvider(contextName), - createMikroOrmProvider(contextName, em.getDriver().getORMClass()), - createEntityManagerProvider(options.scope, EntityManager, undefined, options.forkOptions), - createEntityManagerProvider(options.scope, em.constructor, undefined, options.forkOptions), - ], - exports: [MikroORM, EntityManager, em.constructor, em.getDriver().getORMClass()], - }; - } - return { - module: MikroOrmCoreModule_1, - imports, - providers: [ - ...baseProviders, - createMikroOrmProvider(contextName), - ...(em ? [createMikroOrmProvider(contextName, em.getDriver().getORMClass())] : []), - createEntityManagerProvider(options.scope, EntityManager, contextName, options.forkOptions), - ...(em ? [createEntityManagerProvider(options.scope, em.constructor, contextName, options.forkOptions)] : []), - ], - exports: [ - contextName ? getMikroORMToken(contextName) : MikroORM, - contextName ? getEntityManagerToken(contextName) : EntityManager, - ...(em && !contextName ? [em.constructor, em.getDriver().getORMClass()] : []), - ], - }; - } - /** - * Tries to create the driver instance to use the actual entity manager implementation for DI symbol. - * This helps with dependency resolution issues when importing the EM from driver package (e.g. `SqlEntityManager`). - */ - static async createEntityManager(options) { - if (options.contextName) { - return undefined; - } - try { - let config; - if (typeof options === 'object' && options && 'driver' in options && !('useFactory' in options)) { - config = new Configuration(options, false); - } - // For async options with explicit driver hint, create a minimal config for EM type detection - if (!config && 'driver' in options && options.driver) { - config = new Configuration({ driver: options.driver }, false); - } - if (!config && 'useFactory' in options) { - config = new Configuration(await options.useFactory(), false); - } - if (!config && options instanceof Configuration) { - config = options; - } - return config?.getDriver().createEntityManager(); - } - catch { - if (options && - 'useFactory' in options && - 'inject' in options && - !options.driver && - options.inject.length > 0) { - // oxlint-disable-next-line no-console - console.warn('Support for driver specific imports in modules defined with `useFactory` and `inject` requires an explicit `driver` option. See https://github.com/mikro-orm/nestjs/pull/204'); - } - } - } - async onApplicationShutdown() { - const token = this.options.contextName ? getMikroORMToken(this.options.contextName) : MikroORM; - const orm = this.moduleRef.get(token); - if (orm) { - await orm.close(); - MikroOrmEntitiesStorage.clearLater(); - } - CONTEXT_NAMES.length = 0; - } - configure(consumer) { - if (this.options.registerRequestContext === false) { - return; - } - consumer - .apply(MikroOrmMiddleware) // register request context automatically - .forRoutes({ path: forRoutesPath(this.options, consumer), method: RequestMethod.ALL }); - } - static setContextName(contextName) { - if (!contextName) { - return; - } - if (CONTEXT_NAMES.includes(contextName)) { - throw new Error(`ContextName '${contextName}' already registered`); - } - CONTEXT_NAMES.push(contextName); - return contextName; - } -}; -MikroOrmCoreModule = MikroOrmCoreModule_1 = __decorate([ - Global(), - Module({}), - __param(0, Inject(MIKRO_ORM_MODULE_OPTIONS)), - __metadata("design:paramtypes", [Object, ModuleRef]) -], MikroOrmCoreModule); -export { MikroOrmCoreModule }; diff --git a/node_modules/@mikro-orm/nestjs/mikro-orm-middleware.module.d.ts b/node_modules/@mikro-orm/nestjs/mikro-orm-middleware.module.d.ts deleted file mode 100644 index 26323b4..0000000 --- a/node_modules/@mikro-orm/nestjs/mikro-orm-middleware.module.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { type MiddlewareConsumer, type NestModule } from '@nestjs/common'; -import type { MikroORM } from '@mikro-orm/core'; -import type { MikroOrmMiddlewareModuleOptions } from './typings.js'; -export declare class MikroOrmMiddlewareModule implements NestModule { - private readonly options; - constructor(options: MikroOrmMiddlewareModuleOptions); - static forRoot(options?: MikroOrmMiddlewareModuleOptions): { - module: typeof MikroOrmMiddlewareModule; - providers: ({ - provide: symbol; - useValue: MikroOrmMiddlewareModuleOptions; - useFactory?: undefined; - inject?: undefined; - } | { - provide: string; - useFactory: (...args: MikroORM[]) => MikroORM, import("@mikro-orm/core").EntityManager>, (string | import("@mikro-orm/core").EntitySchema | import("@mikro-orm/core").EntityClass>)[]>[]; - inject: string[]; - useValue?: undefined; - })[]; - exports: string[]; - }; - configure(consumer: MiddlewareConsumer): void; -} diff --git a/node_modules/@mikro-orm/nestjs/mikro-orm-middleware.module.js b/node_modules/@mikro-orm/nestjs/mikro-orm-middleware.module.js deleted file mode 100644 index b7758cc..0000000 --- a/node_modules/@mikro-orm/nestjs/mikro-orm-middleware.module.js +++ /dev/null @@ -1,50 +0,0 @@ -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; -var __param = (this && this.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; -var MikroOrmMiddlewareModule_1; -import { Global, Inject, Module, RequestMethod } from '@nestjs/common'; -import { forRoutesPath } from './middleware.helper.js'; -import { CONTEXT_NAMES, getMikroORMToken, MIKRO_ORM_MODULE_OPTIONS } from './mikro-orm.common.js'; -import { MultipleMikroOrmMiddleware } from './multiple-mikro-orm.middleware.js'; -let MikroOrmMiddlewareModule = MikroOrmMiddlewareModule_1 = class MikroOrmMiddlewareModule { - options; - constructor(options) { - this.options = options; - } - static forRoot(options) { - const inject = CONTEXT_NAMES.map(name => getMikroORMToken(name)); - return { - module: MikroOrmMiddlewareModule_1, - providers: [ - { provide: MIKRO_ORM_MODULE_OPTIONS, useValue: options || {} }, - { - provide: 'MikroORMs', - useFactory: (...args) => args, - inject, - }, - ], - exports: ['MikroORMs'], - }; - } - configure(consumer) { - consumer - .apply(MultipleMikroOrmMiddleware) - .forRoutes({ path: forRoutesPath(this.options, consumer), method: RequestMethod.ALL }); - } -}; -MikroOrmMiddlewareModule = MikroOrmMiddlewareModule_1 = __decorate([ - Global(), - Module({}), - __param(0, Inject(MIKRO_ORM_MODULE_OPTIONS)), - __metadata("design:paramtypes", [Object]) -], MikroOrmMiddlewareModule); -export { MikroOrmMiddlewareModule }; diff --git a/node_modules/@mikro-orm/nestjs/mikro-orm.common.d.ts b/node_modules/@mikro-orm/nestjs/mikro-orm.common.d.ts deleted file mode 100644 index 5cfa81e..0000000 --- a/node_modules/@mikro-orm/nestjs/mikro-orm.common.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { Logger } from '@nestjs/common'; -import type { EntityName } from './typings.js'; -export declare const MIKRO_ORM_MODULE_OPTIONS: unique symbol; -export declare const CONTEXT_NAMES: string[]; -export declare const logger: Logger; -/** - * Gets the injection token based on context name for the relevant MikroORM provider. - * @param name The context name of the database connection. - * @returns The MikroORM provider injection token for the supplied context name. - */ -export declare const getMikroORMToken: (name: string) => string; -/** - * Injects a MikroORM provider based on the supplied context name. - * - * @param name The context name of the database connection. - * @returns A parameter decorator which will cause NestJS to inject the relevant MikroORM provider. - */ -export declare const InjectMikroORM: (name: string) => PropertyDecorator & ParameterDecorator; -/** - * Injects the MikroORMs provider. - * - * @returns A decorator which will cause NestJS to inject the MikroORMs provider. - */ -export declare const InjectMikroORMs: () => PropertyDecorator & ParameterDecorator; -/** - * Gets the injection token based on context name for the relevant EntityManager provider. - * @param name The context name of the database connection. - * @returns The EntityManager provider injection token for the supplied context name. - */ -export declare const getEntityManagerToken: (name: string) => string; -/** - * Injects an EntityManager provider based on the supplied context name. - * - * @param name The context name of the database connection. - * @returns A parameter decorator which will cause NestJS to inject the relevant EntityManager provider. - */ -export declare const InjectEntityManager: (name: string) => PropertyDecorator & ParameterDecorator; -/** - * Gets the injection token based on class and optionally based on context name. - * @param entity The class of the Entity to use for the injected repository provider. - * @param name An optional context name - required for multiple database connections. See: [Multiple Database Connections](https://mikro-orm.io/docs/usage-with-nestjs#multiple-database-connections) - * @returns The EntityRepository provider injection token based on the supplied entity and context name. - */ -export declare const getRepositoryToken: (entity: EntityName, name?: string) => string; -/** - * Injects an EntityRepository provider. - * - * @param entity The class of the Entity to use for the injected repository provider. - * @param name An optional context name - required for multiple database connections. See: [Multiple Database Connections](https://mikro-orm.io/docs/usage-with-nestjs#multiple-database-connections) - * @returns A parameter decorator which will cause NestJS to inject the relevant EntityRepository provider. - */ -export declare const InjectRepository: (entity: EntityName, name?: string) => PropertyDecorator & ParameterDecorator; diff --git a/node_modules/@mikro-orm/nestjs/mikro-orm.common.js b/node_modules/@mikro-orm/nestjs/mikro-orm.common.js deleted file mode 100644 index b23bc2f..0000000 --- a/node_modules/@mikro-orm/nestjs/mikro-orm.common.js +++ /dev/null @@ -1,55 +0,0 @@ -import { MikroORM, Utils } from '@mikro-orm/core'; -import { Inject, Logger } from '@nestjs/common'; -export const MIKRO_ORM_MODULE_OPTIONS = Symbol('mikro-orm-module-options'); -export const CONTEXT_NAMES = []; -export const logger = new Logger(MikroORM.name); -/** - * Gets the injection token based on context name for the relevant MikroORM provider. - * @param name The context name of the database connection. - * @returns The MikroORM provider injection token for the supplied context name. - */ -export const getMikroORMToken = (name) => `${name}_MikroORM`; -/** - * Injects a MikroORM provider based on the supplied context name. - * - * @param name The context name of the database connection. - * @returns A parameter decorator which will cause NestJS to inject the relevant MikroORM provider. - */ -export const InjectMikroORM = (name) => Inject(getMikroORMToken(name)); -/** - * Injects the MikroORMs provider. - * - * @returns A decorator which will cause NestJS to inject the MikroORMs provider. - */ -export const InjectMikroORMs = () => Inject('MikroORMs'); -/** - * Gets the injection token based on context name for the relevant EntityManager provider. - * @param name The context name of the database connection. - * @returns The EntityManager provider injection token for the supplied context name. - */ -export const getEntityManagerToken = (name) => `${name}_EntityManager`; -/** - * Injects an EntityManager provider based on the supplied context name. - * - * @param name The context name of the database connection. - * @returns A parameter decorator which will cause NestJS to inject the relevant EntityManager provider. - */ -export const InjectEntityManager = (name) => Inject(getEntityManagerToken(name)); -/** - * Gets the injection token based on class and optionally based on context name. - * @param entity The class of the Entity to use for the injected repository provider. - * @param name An optional context name - required for multiple database connections. See: [Multiple Database Connections](https://mikro-orm.io/docs/usage-with-nestjs#multiple-database-connections) - * @returns The EntityRepository provider injection token based on the supplied entity and context name. - */ -export const getRepositoryToken = (entity, name) => { - const suffix = name ? `_${name}` : ''; - return `${Utils.className(entity)}Repository${suffix}`; -}; -/** - * Injects an EntityRepository provider. - * - * @param entity The class of the Entity to use for the injected repository provider. - * @param name An optional context name - required for multiple database connections. See: [Multiple Database Connections](https://mikro-orm.io/docs/usage-with-nestjs#multiple-database-connections) - * @returns A parameter decorator which will cause NestJS to inject the relevant EntityRepository provider. - */ -export const InjectRepository = (entity, name) => Inject(getRepositoryToken(entity, name)); diff --git a/node_modules/@mikro-orm/nestjs/mikro-orm.entities.storage.d.ts b/node_modules/@mikro-orm/nestjs/mikro-orm.entities.storage.d.ts deleted file mode 100644 index 2654fef..0000000 --- a/node_modules/@mikro-orm/nestjs/mikro-orm.entities.storage.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { AnyEntity } from '@mikro-orm/core'; -import type { EntityName } from './typings.js'; -export declare class MikroOrmEntitiesStorage { - private static readonly storage; - private static shouldClear; - static addEntity(entity: EntityName, contextName?: string): void; - static getEntities(contextName?: string): never[] | SetIterator>>; - static clear(contextName?: string): void; - /** - * When the `addEntity` is called next, the storage will be cleared automatically before it. - * We want to keep the cache, as it's populated on require time, but sometimes (tests) the contexts could be cleared. - * This resolves both cases by deferring the `clear` call to the first `addEntity` call. - */ - static clearLater(): void; -} diff --git a/node_modules/@mikro-orm/nestjs/mikro-orm.entities.storage.js b/node_modules/@mikro-orm/nestjs/mikro-orm.entities.storage.js deleted file mode 100644 index 0d4eaf7..0000000 --- a/node_modules/@mikro-orm/nestjs/mikro-orm.entities.storage.js +++ /dev/null @@ -1,30 +0,0 @@ -export class MikroOrmEntitiesStorage { - static storage = new Map(); - static shouldClear = false; - static addEntity(entity, contextName = 'default') { - if (this.shouldClear) { - this.clear(contextName); - this.shouldClear = false; - } - let set = this.storage.get(contextName); - if (!set) { - set = new Set(); - this.storage.set(contextName, set); - } - set.add(entity); - } - static getEntities(contextName = 'default') { - return this.storage.get(contextName)?.values() || []; - } - static clear(contextName = 'default') { - this.storage.get(contextName)?.clear(); - } - /** - * When the `addEntity` is called next, the storage will be cleared automatically before it. - * We want to keep the cache, as it's populated on require time, but sometimes (tests) the contexts could be cleared. - * This resolves both cases by deferring the `clear` call to the first `addEntity` call. - */ - static clearLater() { - this.shouldClear = true; - } -} diff --git a/node_modules/@mikro-orm/nestjs/mikro-orm.middleware.d.ts b/node_modules/@mikro-orm/nestjs/mikro-orm.middleware.d.ts deleted file mode 100644 index 716bb6f..0000000 --- a/node_modules/@mikro-orm/nestjs/mikro-orm.middleware.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { MikroORM } from '@mikro-orm/core'; -import { type NestMiddleware } from '@nestjs/common'; -export declare class MikroOrmMiddleware implements NestMiddleware { - private readonly orm; - constructor(orm: MikroORM); - use(req: unknown, res: unknown, next: (...args: any[]) => void): void; -} diff --git a/node_modules/@mikro-orm/nestjs/mikro-orm.middleware.js b/node_modules/@mikro-orm/nestjs/mikro-orm.middleware.js deleted file mode 100644 index 746b3fc..0000000 --- a/node_modules/@mikro-orm/nestjs/mikro-orm.middleware.js +++ /dev/null @@ -1,26 +0,0 @@ -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; -// oxlint-disable-next-line consistent-type-imports -import { MikroORM, RequestContext } from '@mikro-orm/core'; -import { Injectable } from '@nestjs/common'; -let MikroOrmMiddleware = class MikroOrmMiddleware { - orm; - constructor(orm) { - this.orm = orm; - } - use(req, res, next) { - RequestContext.create(this.orm.em, next); - } -}; -MikroOrmMiddleware = __decorate([ - Injectable(), - __metadata("design:paramtypes", [MikroORM]) -], MikroOrmMiddleware); -export { MikroOrmMiddleware }; diff --git a/node_modules/@mikro-orm/nestjs/mikro-orm.module.d.ts b/node_modules/@mikro-orm/nestjs/mikro-orm.module.d.ts deleted file mode 100644 index 2b4c1c8..0000000 --- a/node_modules/@mikro-orm/nestjs/mikro-orm.module.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { type AnyEntity } from '@mikro-orm/core'; -import { type DynamicModule } from '@nestjs/common'; -import type { EntityName, MikroOrmModuleAsyncOptions, MikroOrmModuleFeatureOptions, MikroOrmModuleSyncOptions, MikroOrmMiddlewareModuleOptions, MaybePromise } from './typings.js'; -export declare class MikroOrmModule { - /** - * Clears the entity storage. This is useful for testing purposes, when you want to isolate the tests. - * Keep in mind that this should be called when using a test runner that keeps the context alive between tests (like Vitest with threads disabled). - */ - static clearStorage(contextName?: string): void; - static forRoot(options: MikroOrmModuleSyncOptions): MaybePromise; - static forRoot(options: MikroOrmModuleSyncOptions[]): MaybePromise[]; - static forRootAsync(options: MikroOrmModuleAsyncOptions): MaybePromise; - static forRootAsync(options: MikroOrmModuleAsyncOptions[]): MaybePromise[]; - static forFeature(options: EntityName[] | MikroOrmModuleFeatureOptions, contextName?: string): DynamicModule; - static forMiddleware(options?: MikroOrmMiddlewareModuleOptions): DynamicModule; -} diff --git a/node_modules/@mikro-orm/nestjs/mikro-orm.module.js b/node_modules/@mikro-orm/nestjs/mikro-orm.module.js deleted file mode 100644 index 2625216..0000000 --- a/node_modules/@mikro-orm/nestjs/mikro-orm.module.js +++ /dev/null @@ -1,55 +0,0 @@ -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var MikroOrmModule_1; -import { Module } from '@nestjs/common'; -import { MikroOrmCoreModule } from './mikro-orm-core.module.js'; -import { MikroOrmMiddlewareModule } from './mikro-orm-middleware.module.js'; -import { MikroOrmEntitiesStorage } from './mikro-orm.entities.storage.js'; -import { createMikroOrmRepositoryProviders } from './mikro-orm.providers.js'; -let MikroOrmModule = MikroOrmModule_1 = class MikroOrmModule { - /** - * Clears the entity storage. This is useful for testing purposes, when you want to isolate the tests. - * Keep in mind that this should be called when using a test runner that keeps the context alive between tests (like Vitest with threads disabled). - */ - static clearStorage(contextName) { - MikroOrmEntitiesStorage.clear(contextName); - } - static forRoot(options) { - if (Array.isArray(options)) { - return options.map(o => MikroOrmCoreModule.forRoot(o)); - } - return MikroOrmCoreModule.forRoot(options); - } - static forRootAsync(options) { - if (Array.isArray(options)) { - return options.map(o => MikroOrmCoreModule.forRootAsync(o)); - } - return MikroOrmCoreModule.forRootAsync(options); - } - static forFeature(options, contextName) { - const entities = Array.isArray(options) ? options : options.entities || []; - const name = Array.isArray(options) || contextName ? contextName : options.contextName; - const providers = createMikroOrmRepositoryProviders(entities, name); - for (const e of entities) { - if (typeof e !== 'string') { - MikroOrmEntitiesStorage.addEntity(e, name); - } - } - return { - module: MikroOrmModule_1, - providers: [...providers], - exports: [...providers], - }; - } - static forMiddleware(options) { - return MikroOrmMiddlewareModule.forRoot(options); - } -}; -MikroOrmModule = MikroOrmModule_1 = __decorate([ - Module({}) -], MikroOrmModule); -export { MikroOrmModule }; diff --git a/node_modules/@mikro-orm/nestjs/mikro-orm.providers.d.ts b/node_modules/@mikro-orm/nestjs/mikro-orm.providers.d.ts deleted file mode 100644 index 5decbea..0000000 --- a/node_modules/@mikro-orm/nestjs/mikro-orm.providers.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { EntityManager, type AnyEntity, type ForkOptions } from '@mikro-orm/core'; -import { Scope, type Provider, type Type } from '@nestjs/common'; -import type { EntityName, MikroOrmModuleAsyncOptions } from './typings.js'; -export declare function createMikroOrmProvider(contextName?: string, type?: Type): Provider; -export declare function createEntityManagerProvider(scope?: Scope, entityManager?: Type, contextName?: string, forkOptions?: ForkOptions): Provider; -export declare function createMikroOrmAsyncOptionsProvider(options: MikroOrmModuleAsyncOptions): Provider; -export declare function createAsyncProviders(options: MikroOrmModuleAsyncOptions): Provider[]; -export declare function createMikroOrmRepositoryProviders(entities: EntityName[], contextName?: string): Provider[]; diff --git a/node_modules/@mikro-orm/nestjs/mikro-orm.providers.js b/node_modules/@mikro-orm/nestjs/mikro-orm.providers.js deleted file mode 100644 index 04cbba6..0000000 --- a/node_modules/@mikro-orm/nestjs/mikro-orm.providers.js +++ /dev/null @@ -1,102 +0,0 @@ -import { EntityManager, EntitySchema, MetadataStorage, MikroORM } from '@mikro-orm/core'; -import { Scope } from '@nestjs/common'; -import { MIKRO_ORM_MODULE_OPTIONS, getEntityManagerToken, getMikroORMToken, getRepositoryToken, logger, } from './mikro-orm.common.js'; -import { MikroOrmEntitiesStorage } from './mikro-orm.entities.storage.js'; -export function createMikroOrmProvider(contextName, type = MikroORM) { - if (!contextName && type !== MikroORM) { - return { - provide: type, - useFactory: orm => orm, // just a simple alias - inject: [MikroORM], // depend on the ORM from core package - }; - } - return { - provide: contextName ? getMikroORMToken(contextName) : type, - useFactory: async (options) => { - options = { logger: logger.log.bind(logger), ...options }; - if (options.autoLoadEntities) { - options.entities = [ - ...(options.entities || []), - ...MikroOrmEntitiesStorage.getEntities(contextName), - ]; - options.entitiesTs = [ - ...(options.entitiesTs || []), - ...MikroOrmEntitiesStorage.getEntities(contextName), - ]; - delete options.autoLoadEntities; - } - return MikroORM.init(options); - }, - inject: [MIKRO_ORM_MODULE_OPTIONS], - }; -} -export function createEntityManagerProvider(scope = Scope.DEFAULT, entityManager = EntityManager, contextName, forkOptions) { - if (!contextName && entityManager !== EntityManager) { - return { - provide: entityManager, - scope, - useFactory: (em) => em, // just a simple alias, unlike `useExisting` from nest, this works with request scopes too - inject: [EntityManager], // depend on the EM from core package - }; - } - return { - provide: contextName ? getEntityManagerToken(contextName) : entityManager, - scope, - useFactory: (orm) => (scope === Scope.DEFAULT ? orm.em : orm.em.fork({ useContext: true, ...forkOptions })), - inject: [contextName ? getMikroORMToken(contextName) : MikroORM], - }; -} -export function createMikroOrmAsyncOptionsProvider(options) { - if (options.useFactory) { - return { - provide: MIKRO_ORM_MODULE_OPTIONS, - useFactory: async (...args) => { - const factoryOptions = await options.useFactory(...args); - return options.contextName ? { contextName: options.contextName, ...factoryOptions } : factoryOptions; - }, - inject: options.inject || [], - }; - } - const inject = []; - if (options.useClass || options.useExisting) { - inject.push(options.useClass ?? options.useExisting); - } - return { - provide: MIKRO_ORM_MODULE_OPTIONS, - useFactory: async (optionsFactory) => await optionsFactory.createMikroOrmOptions(options.contextName), - inject, - }; -} -export function createAsyncProviders(options) { - if (options.useExisting || options.useFactory) { - return [createMikroOrmAsyncOptionsProvider(options)]; - } - if (options.useClass) { - return [createMikroOrmAsyncOptionsProvider(options), { provide: options.useClass, useClass: options.useClass }]; - } - throw new Error('Invalid MikroORM async options: one of `useClass`, `useExisting` or `useFactory` should be defined.'); -} -export function createMikroOrmRepositoryProviders(entities, contextName) { - const metadata = Object.values(MetadataStorage.getMetadata()); - const providers = []; - const inject = contextName ? getEntityManagerToken(contextName) : EntityManager; - (entities || []).forEach(entity => { - const meta = entity instanceof EntitySchema - ? entity.meta - : (typeof entity === 'function' ? EntitySchema.REGISTRY.get(entity)?.meta : undefined) ?? metadata.find(meta => meta.class === entity); - const repository = meta?.repository; - if (repository) { - providers.push({ - provide: repository(), - useFactory: em => em.getRepository(entity), - inject: [inject], - }); - } - providers.push({ - provide: getRepositoryToken(entity, contextName), - useFactory: em => em.getRepository(entity), - inject: [inject], - }); - }); - return providers; -} diff --git a/node_modules/@mikro-orm/nestjs/multiple-mikro-orm.middleware.d.ts b/node_modules/@mikro-orm/nestjs/multiple-mikro-orm.middleware.d.ts deleted file mode 100644 index dc9c384..0000000 --- a/node_modules/@mikro-orm/nestjs/multiple-mikro-orm.middleware.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { type MikroORM } from '@mikro-orm/core'; -import { type NestMiddleware } from '@nestjs/common'; -export declare class MultipleMikroOrmMiddleware implements NestMiddleware { - private readonly orm; - constructor(orm: MikroORM[]); - use(req: unknown, res: unknown, next: (...args: any[]) => void): void; -} diff --git a/node_modules/@mikro-orm/nestjs/multiple-mikro-orm.middleware.js b/node_modules/@mikro-orm/nestjs/multiple-mikro-orm.middleware.js deleted file mode 100644 index 610167b..0000000 --- a/node_modules/@mikro-orm/nestjs/multiple-mikro-orm.middleware.js +++ /dev/null @@ -1,30 +0,0 @@ -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; -var __param = (this && this.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; -import { RequestContext } from '@mikro-orm/core'; -import { Injectable } from '@nestjs/common'; -import { InjectMikroORMs } from './mikro-orm.common.js'; -let MultipleMikroOrmMiddleware = class MultipleMikroOrmMiddleware { - orm; - constructor(orm) { - this.orm = orm; - } - use(req, res, next) { - RequestContext.create(this.orm.map(orm => orm.em), next); - } -}; -MultipleMikroOrmMiddleware = __decorate([ - Injectable(), - __param(0, InjectMikroORMs()), - __metadata("design:paramtypes", [Array]) -], MultipleMikroOrmMiddleware); -export { MultipleMikroOrmMiddleware }; diff --git a/node_modules/@mikro-orm/nestjs/package.json b/node_modules/@mikro-orm/nestjs/package.json deleted file mode 100644 index b1d869b..0000000 --- a/node_modules/@mikro-orm/nestjs/package.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "name": "@mikro-orm/nestjs", - "version": "7.0.1", - "description": "NestJS module for MikroORM", - "keywords": [ - "data-mapper", - "ddd", - "entity", - "identity-map", - "mikro-orm", - "mongo", - "mongodb", - "mysql", - "nestjs", - "orm", - "postgresql", - "sqlite", - "unit-of-work" - ], - "homepage": "https://github.com/mikro-orm/nestjs#readme", - "bugs": "https://github.com/mikro-orm/nestjs/issues", - "repository": { - "type": "git", - "url": "https://github.com/mikro-orm/nestjs" - }, - "author": { - "name": "Martin Adamek", - "email": "banan23@gmail.com" - }, - "license": "MIT", - "type": "module", - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "scripts": { - "build": "yarn clean && yarn compile && yarn copy", - "clean": "rimraf ./dist", - "compile": "tsc -p tsconfig.build.json", - "copy": "node ./scripts/copy.mjs", - "test": "vitest run", - "tsc-check-tests": "tsc --noEmit --project tests/tsconfig.json", - "format": "oxfmt --write .", - "lint": "oxlint --type-aware", - "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1", - "coverage": "yarn test --coverage" - }, - "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ] - }, - "lint-staged": { - "*": "oxfmt --no-error-on-unmatched-pattern" - }, - "devDependencies": { - "@mikro-orm/core": "^7.0.0-dev.109", - "@mikro-orm/decorators": "^7.0.0-dev.109", - "@mikro-orm/sqlite": "^7.0.0-dev.109", - "@nestjs/common": "^11.1.9", - "@nestjs/core": "^11.1.9", - "@nestjs/platform-express": "^11.1.9", - "@nestjs/testing": "^11.1.9", - "@swc/core": "^1.15.5", - "@types/node": "^25.0.1", - "@types/supertest": "^7.0.0", - "@vitest/coverage-v8": "^4.0.16", - "conventional-changelog": "^7.1.1", - "conventional-changelog-cli": "^5.0.0", - "oxfmt": "^0.38.0", - "oxlint": "^1.33.0", - "oxlint-tsgolint": "^0.16.0", - "reflect-metadata": "^0.2.2", - "rimraf": "^6.1.2", - "rxjs": "^7.8.2", - "supertest": "^7.1.4", - "typescript": "5.9.3", - "unplugin-swc": "^1.5.9", - "vitest": "^4.0.16" - }, - "peerDependencies": { - "@mikro-orm/core": "^7.0.0 || ^7.0.0-dev.0", - "@nestjs/common": "^11.0.5", - "@nestjs/core": "^11.0.5", - "reflect-metadata": "^0.1.0 || ^0.2.0" - }, - "packageManager": "yarn@4.12.0", - "engines": { - "node": ">= 22.17.0" - }, - "readme": "./README.md", - "renovate": { - "extends": [ - "config:base", - ":preserveSemverRanges", - ":semanticCommitTypeAll(chore)" - ], - "semanticCommits": "enabled", - "separateMajorMinor": false, - "dependencyDashboard": false, - "packageRules": [ - { - "matchUpdateTypes": [ - "patch", - "minor" - ], - "groupName": "patch/minor dependencies", - "groupSlug": "all-non-major", - "automerge": true, - "automergeType": "branch" - } - ], - "schedule": [ - "every weekday" - ] - } -} diff --git a/node_modules/@mikro-orm/nestjs/typings.d.ts b/node_modules/@mikro-orm/nestjs/typings.d.ts deleted file mode 100644 index 577d02f..0000000 --- a/node_modules/@mikro-orm/nestjs/typings.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -import type { AnyEntity, Constructor, EntityName as CoreEntityName, EntitySchema, ForkOptions, IDatabaseDriver, Options } from '@mikro-orm/core'; -import type { MiddlewareConsumer, ModuleMetadata, Scope, Type } from '@nestjs/common'; -import type { AbstractHttpAdapter } from '@nestjs/core'; -export type MaybePromise = T | Promise; -export interface NestMiddlewareConsumer extends MiddlewareConsumer { - httpAdapter: AbstractHttpAdapter; -} -type MikroOrmNestScopeOptions = { - /** - * The NestJS provider scope to use for the EntityManager (and any subsequent downstream records). - * - * This scope will also impact the scope of Entity Repositories as they depend on the EntityManager. - * - * @see [NestJS Scope Hierarchy](https://docs.nestjs.com/fundamentals/injection-scopes#scope-hierarchy) - */ - scope?: Scope; - /** - * An optional configuration object to use when forking the Event Manager if it is configured with a scope other than Scope.DEFAULT - * - * This configuration option has no effect when the scope is set to Scope.DEFAULT. - * - * https://mikro-orm.io/api/core/interface/ForkOptions - */ - forkOptions?: ForkOptions; -}; -export type MikroOrmMiddlewareModuleOptions = { - /** - * Routes to apply the middleware. - * - * For Fastify, the middleware applies to all routes using `(.*)`. - * - * For all other frameworks including Express, the middleware applies to all routes using `*`. - */ - forRoutesPath?: string; -}; -export type MikroOrmModuleOptions = { - registerRequestContext?: boolean; - /** - * Specifies whether or not to automatically load the entities based on MikroOrmModule.forFeature invocations. - * - * @see [MikroOrm - NestJS - Load Entities Automatically](https://mikro-orm.io/docs/usage-with-nestjs#load-entities-automatically) - * - * @default false - */ - autoLoadEntities?: boolean; -} & Partial> & MikroOrmMiddlewareModuleOptions; -export interface MikroOrmModuleFeatureOptions { - /** - * The entities to provide an EntityRepository for. - * - * @see [MikroOrm - NestJS - Repositories](https://mikro-orm.io/docs/usage-with-nestjs#repositories) - */ - entities?: EntityName[]; - /** - * The context (database connection) to use for the entity repository. - * - * @see [MikroOrm - NestJS - Multiple Database Connections](https://mikro-orm.io/docs/usage-with-nestjs#multiple-database-connections) - */ - contextName?: string; -} -export interface MikroOrmOptionsFactory { - createMikroOrmOptions(contextName?: string): Promise> | MikroOrmModuleOptions; -} -export interface MikroOrmModuleSyncOptions extends MikroOrmModuleOptions, MikroOrmNestScopeOptions { -} -export interface MikroOrmModuleAsyncOptions extends Pick, MikroOrmNestScopeOptions { - /** - * The context name (database connection) to specify for this instance. - * - * When injecting repositories or entity manager instances, this context name will need to be specified where there are multiple datbaase connections. - * - * @see [MikroOrm - NestJS - Multiple Database Connections](https://mikro-orm.io/docs/usage-with-nestjs#multiple-database-connections) - */ - contextName?: string; - useExisting?: Type>; - useClass?: Type>; - useFactory?: (...args: any[]) => Promise, 'contextName'>> | Omit, 'contextName'>; - driver?: Constructor; - inject?: any[]; -} -export declare type EntityName> = CoreEntityName | EntitySchema; -export {}; diff --git a/node_modules/@mikro-orm/nestjs/typings.js b/node_modules/@mikro-orm/nestjs/typings.js deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/@mikro-orm/nestjs/typings.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/@mikro-orm/postgresql/LICENSE b/node_modules/@mikro-orm/postgresql/LICENSE deleted file mode 100644 index 23704b1..0000000 --- a/node_modules/@mikro-orm/postgresql/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 Martin Adámek - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@mikro-orm/postgresql/PostgreSqlConnection.d.ts b/node_modules/@mikro-orm/postgresql/PostgreSqlConnection.d.ts deleted file mode 100644 index aed8896..0000000 --- a/node_modules/@mikro-orm/postgresql/PostgreSqlConnection.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { type PoolConfig } from 'pg'; -import { PostgresDialect } from 'kysely'; -import { AbstractSqlConnection } from '@mikro-orm/sql'; -/** PostgreSQL database connection using the `pg` driver. */ -export declare class PostgreSqlConnection extends AbstractSqlConnection { - createKyselyDialect(overrides: PoolConfig): PostgresDialect; - mapOptions(overrides: PoolConfig): PoolConfig; -} diff --git a/node_modules/@mikro-orm/postgresql/PostgreSqlConnection.js b/node_modules/@mikro-orm/postgresql/PostgreSqlConnection.js deleted file mode 100644 index 981fae3..0000000 --- a/node_modules/@mikro-orm/postgresql/PostgreSqlConnection.js +++ /dev/null @@ -1,38 +0,0 @@ -import { Pool, TypeOverrides } from 'pg'; -import Cursor from 'pg-cursor'; -import { PostgresDialect } from 'kysely'; -import array from 'postgres-array'; -import { AbstractSqlConnection, Utils } from '@mikro-orm/sql'; -/** PostgreSQL database connection using the `pg` driver. */ -export class PostgreSqlConnection extends AbstractSqlConnection { - createKyselyDialect(overrides) { - const options = this.mapOptions(overrides); - return new PostgresDialect({ - pool: new Pool(options), - cursor: Cursor, - onCreateConnection: this.options.onCreateConnection ?? this.config.get('onCreateConnection'), - }); - } - mapOptions(overrides) { - const ret = { ...this.getConnectionOptions() }; - const pool = this.config.get('pool'); - Utils.defaultValue(ret, 'max', pool?.max); - Utils.defaultValue(ret, 'idleTimeoutMillis', pool?.idleTimeoutMillis); - // use `select typname, oid, typarray from pg_type order by oid` to get the list of OIDs - const types = new TypeOverrides(); - [ - 1082, // date - 1114, // timestamp - 1184, // timestamptz - 1186, // interval - ].forEach(oid => types.setTypeParser(oid, str => str)); - [ - 1182, // date[] - 1115, // timestamp[] - 1185, // timestamptz[] - 1187, // interval[] - ].forEach(oid => types.setTypeParser(oid, str => array.parse(str))); - ret.types = types; - return Utils.mergeConfig(ret, overrides); - } -} diff --git a/node_modules/@mikro-orm/postgresql/PostgreSqlDriver.d.ts b/node_modules/@mikro-orm/postgresql/PostgreSqlDriver.d.ts deleted file mode 100644 index d82e4a4..0000000 --- a/node_modules/@mikro-orm/postgresql/PostgreSqlDriver.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { type Configuration, type Constructor, EntityManagerType } from '@mikro-orm/core'; -import { AbstractSqlDriver } from '@mikro-orm/sql'; -import { PostgreSqlConnection } from './PostgreSqlConnection.js'; -import { PostgreSqlMikroORM } from './PostgreSqlMikroORM.js'; -import { PostgreSqlEntityManager } from './PostgreSqlEntityManager.js'; -/** Database driver for PostgreSQL. */ -export declare class PostgreSqlDriver extends AbstractSqlDriver { - [EntityManagerType]: PostgreSqlEntityManager; - constructor(config: Configuration); - createEntityManager(useContext?: boolean): this[typeof EntityManagerType]; - /** @inheritDoc */ - getORMClass(): Constructor; -} diff --git a/node_modules/@mikro-orm/postgresql/PostgreSqlDriver.js b/node_modules/@mikro-orm/postgresql/PostgreSqlDriver.js deleted file mode 100644 index 8ba8891..0000000 --- a/node_modules/@mikro-orm/postgresql/PostgreSqlDriver.js +++ /dev/null @@ -1,21 +0,0 @@ -import { EntityManagerType } from '@mikro-orm/core'; -import { AbstractSqlDriver } from '@mikro-orm/sql'; -import { PostgreSqlConnection } from './PostgreSqlConnection.js'; -import { PostgreSqlPlatform } from './PostgreSqlPlatform.js'; -import { PostgreSqlMikroORM } from './PostgreSqlMikroORM.js'; -import { PostgreSqlEntityManager } from './PostgreSqlEntityManager.js'; -/** Database driver for PostgreSQL. */ -export class PostgreSqlDriver extends AbstractSqlDriver { - [EntityManagerType]; - constructor(config) { - super(config, new PostgreSqlPlatform(), PostgreSqlConnection, ['kysely', 'pg']); - } - createEntityManager(useContext) { - const EntityManagerClass = this.config.get('entityManager', PostgreSqlEntityManager); - return new EntityManagerClass(this.config, this, this.metadata, useContext); - } - /** @inheritDoc */ - getORMClass() { - return PostgreSqlMikroORM; - } -} diff --git a/node_modules/@mikro-orm/postgresql/PostgreSqlEntityManager.d.ts b/node_modules/@mikro-orm/postgresql/PostgreSqlEntityManager.d.ts deleted file mode 100644 index 77599c3..0000000 --- a/node_modules/@mikro-orm/postgresql/PostgreSqlEntityManager.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { type EntityName } from '@mikro-orm/core'; -import { SqlEntityManager } from '@mikro-orm/sql'; -import type { PostgreSqlDriver } from './PostgreSqlDriver.js'; -/** - * @inheritDoc - */ -export declare class PostgreSqlEntityManager< - Driver extends PostgreSqlDriver = PostgreSqlDriver, -> extends SqlEntityManager { - /** - * Refreshes a materialized view. - * - * @param entityName - The entity name or class of the materialized view - * @param options - Optional settings - * @param options.concurrently - If true, refreshes the view concurrently (requires a unique index on the view) - */ - refreshMaterializedView( - entityName: EntityName, - options?: { - concurrently?: boolean; - }, - ): Promise; -} diff --git a/node_modules/@mikro-orm/postgresql/PostgreSqlEntityManager.js b/node_modules/@mikro-orm/postgresql/PostgreSqlEntityManager.js deleted file mode 100644 index f0ee680..0000000 --- a/node_modules/@mikro-orm/postgresql/PostgreSqlEntityManager.js +++ /dev/null @@ -1,23 +0,0 @@ -import { SqlEntityManager } from '@mikro-orm/sql'; -/** - * @inheritDoc - */ -export class PostgreSqlEntityManager extends SqlEntityManager { - /** - * Refreshes a materialized view. - * - * @param entityName - The entity name or class of the materialized view - * @param options - Optional settings - * @param options.concurrently - If true, refreshes the view concurrently (requires a unique index on the view) - */ - async refreshMaterializedView(entityName, options) { - const meta = this.getMetadata(entityName); - if (!meta.view || !meta.materialized) { - throw new Error(`Entity ${meta.className} is not a materialized view`); - } - const helper = this.getDriver().getPlatform().getSchemaHelper(); - const schema = meta.schema ?? this.config.get('schema'); - const sql = helper.refreshMaterializedView(meta.tableName, schema, options?.concurrently); - await this.execute(sql); - } -} diff --git a/node_modules/@mikro-orm/postgresql/PostgreSqlMikroORM.d.ts b/node_modules/@mikro-orm/postgresql/PostgreSqlMikroORM.d.ts deleted file mode 100644 index 75f4548..0000000 --- a/node_modules/@mikro-orm/postgresql/PostgreSqlMikroORM.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { - type AnyEntity, - type EntityClass, - type EntitySchema, - MikroORM, - type Options, - type IDatabaseDriver, - type EntityManager, - type EntityManagerType, -} from '@mikro-orm/core'; -import { PostgreSqlDriver } from './PostgreSqlDriver.js'; -import type { PostgreSqlEntityManager } from './PostgreSqlEntityManager.js'; -/** Configuration options for the PostgreSQL driver. */ -export type PostgreSqlOptions< - EM extends PostgreSqlEntityManager = PostgreSqlEntityManager, - Entities extends (string | EntityClass | EntitySchema)[] = ( - | string - | EntityClass - | EntitySchema - )[], -> = Partial>; -/** Creates a type-safe configuration object for the PostgreSQL driver. */ -export declare function definePostgreSqlConfig< - EM extends PostgreSqlEntityManager = PostgreSqlEntityManager, - Entities extends (string | EntityClass | EntitySchema)[] = ( - | string - | EntityClass - | EntitySchema - )[], ->(options: Partial>): Partial>; -/** - * @inheritDoc - */ -export declare class PostgreSqlMikroORM< - EM extends PostgreSqlEntityManager = PostgreSqlEntityManager, - Entities extends (string | EntityClass | EntitySchema)[] = ( - | string - | EntityClass - | EntitySchema - )[], -> extends MikroORM { - /** - * @inheritDoc - */ - static init< - D extends IDatabaseDriver = PostgreSqlDriver, - EM extends EntityManager = D[typeof EntityManagerType] & EntityManager, - Entities extends (string | EntityClass | EntitySchema)[] = ( - | string - | EntityClass - | EntitySchema - )[], - >(options: Partial>): Promise>; - /** - * @inheritDoc - */ - constructor(options: Partial>); -} diff --git a/node_modules/@mikro-orm/postgresql/PostgreSqlMikroORM.js b/node_modules/@mikro-orm/postgresql/PostgreSqlMikroORM.js deleted file mode 100644 index a967ee2..0000000 --- a/node_modules/@mikro-orm/postgresql/PostgreSqlMikroORM.js +++ /dev/null @@ -1,23 +0,0 @@ -import { defineConfig, MikroORM } from '@mikro-orm/core'; -import { PostgreSqlDriver } from './PostgreSqlDriver.js'; -/** Creates a type-safe configuration object for the PostgreSQL driver. */ -export function definePostgreSqlConfig(options) { - return defineConfig({ driver: PostgreSqlDriver, ...options }); -} -/** - * @inheritDoc - */ -export class PostgreSqlMikroORM extends MikroORM { - /** - * @inheritDoc - */ - static async init(options) { - return super.init(definePostgreSqlConfig(options)); - } - /** - * @inheritDoc - */ - constructor(options) { - super(definePostgreSqlConfig(options)); - } -} diff --git a/node_modules/@mikro-orm/postgresql/PostgreSqlPlatform.d.ts b/node_modules/@mikro-orm/postgresql/PostgreSqlPlatform.d.ts deleted file mode 100644 index 40c394e..0000000 --- a/node_modules/@mikro-orm/postgresql/PostgreSqlPlatform.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { type IPostgresInterval } from 'postgres-interval'; -import { BasePostgreSqlPlatform } from '@mikro-orm/sql'; -/** Platform implementation for PostgreSQL. */ -export declare class PostgreSqlPlatform extends BasePostgreSqlPlatform { - convertIntervalToJSValue(value: string): unknown; - convertIntervalToDatabaseValue(value: IPostgresInterval): unknown; - unmarshallArray(value: string): string[]; - escape(value: any): string; - /** - * @inheritDoc - */ - parseDate(value: string | number): Date; -} diff --git a/node_modules/@mikro-orm/postgresql/PostgreSqlPlatform.js b/node_modules/@mikro-orm/postgresql/PostgreSqlPlatform.js deleted file mode 100644 index a41db85..0000000 --- a/node_modules/@mikro-orm/postgresql/PostgreSqlPlatform.js +++ /dev/null @@ -1,58 +0,0 @@ -import { Client } from 'pg'; -import array from 'postgres-array'; -import parseDate from 'postgres-date'; -import PostgresInterval from 'postgres-interval'; -import { BasePostgreSqlPlatform, Utils } from '@mikro-orm/sql'; -/** Platform implementation for PostgreSQL. */ -export class PostgreSqlPlatform extends BasePostgreSqlPlatform { - convertIntervalToJSValue(value) { - return PostgresInterval(value); - } - convertIntervalToDatabaseValue(value) { - if (Utils.isObject(value) && 'toPostgres' in value && typeof value.toPostgres === 'function') { - return value.toPostgres(); - } - return value; - } - unmarshallArray(value) { - return array.parse(value); - } - escape(value) { - if (typeof value === 'bigint') { - value = value.toString(); - } - if (typeof value === 'string') { - return Client.prototype.escapeLiteral(value); - } - if (value instanceof Date) { - return `'${this.formatDate(value)}'`; - } - if (ArrayBuffer.isView(value)) { - return `E'\\\\x${value.toString('hex')}'`; - } - if (Array.isArray(value)) { - return value.map(v => this.escape(v)).join(', '); - } - return value; - } - /** - * @inheritDoc - */ - parseDate(value) { - // postgres-date returns `null` for a JS ISO string which has the `T` separator - if (typeof value === 'string' && value.charAt(10) === 'T') { - return new Date(value); - } - /* v8 ignore next */ - if (typeof value === 'number') { - return new Date(value); - } - // @ts-ignore fix wrong type resolution during build - const parsed = parseDate(value); - /* v8 ignore next */ - if (parsed === null) { - return value; - } - return parsed; - } -} diff --git a/node_modules/@mikro-orm/postgresql/README.md b/node_modules/@mikro-orm/postgresql/README.md deleted file mode 100644 index f6be8af..0000000 --- a/node_modules/@mikro-orm/postgresql/README.md +++ /dev/null @@ -1,225 +0,0 @@ -

- MikroORM -

- -TypeScript ORM for Node.js based on Data Mapper, [Unit of Work](https://mikro-orm.io/docs/unit-of-work/) and [Identity Map](https://mikro-orm.io/docs/identity-map/) patterns. Supports MongoDB, MySQL, MariaDB, PostgreSQL, SQLite (including libSQL), MSSQL and Oracle databases. - -> Heavily inspired by [Doctrine](https://www.doctrine-project.org/) and [Hibernate](https://hibernate.org/). - -[![NPM version](https://img.shields.io/npm/v/@mikro-orm/core.svg)](https://npmx.dev/package/@mikro-orm/core) -[![NPM dev version](https://img.shields.io/npm/v/@mikro-orm/core/next.svg)](https://npmx.dev/package/@mikro-orm/core) -[![Chat on discord](https://img.shields.io/discord/1214904142443839538?label=discord&color=blue)](https://discord.gg/w8bjxFHS7X) -[![Downloads](https://img.shields.io/npm/dm/@mikro-orm/core.svg)](https://npmx.dev/package/@mikro-orm/core) -[![Coverage Status](https://img.shields.io/coveralls/mikro-orm/mikro-orm.svg)](https://coveralls.io/r/mikro-orm/mikro-orm?branch=master) -[![Build Status](https://github.com/mikro-orm/mikro-orm/workflows/tests/badge.svg?branch=master)](https://github.com/mikro-orm/mikro-orm/actions?workflow=tests) - -## Quick Start - -Install a driver package for your database: - -```sh -npm install @mikro-orm/postgresql # PostgreSQL -npm install @mikro-orm/mysql # MySQL -npm install @mikro-orm/mariadb # MariaDB -npm install @mikro-orm/sqlite # SQLite -npm install @mikro-orm/libsql # libSQL / Turso -npm install @mikro-orm/mongodb # MongoDB -npm install @mikro-orm/mssql # MS SQL Server -npm install @mikro-orm/oracledb # Oracle -``` - -> If you use additional packages like `@mikro-orm/cli`, `@mikro-orm/migrations`, or `@mikro-orm/entity-generator`, install `@mikro-orm/core` explicitly as well. See the [quick start guide](https://mikro-orm.io/docs/quick-start) for details. - -### Define Entities - -The recommended way to define entities is using [`defineEntity`](https://mikro-orm.io/docs/define-entity) with `setClass`: - -```typescript -import { defineEntity, p, MikroORM } from '@mikro-orm/postgresql'; - -const AuthorSchema = defineEntity({ - name: 'Author', - properties: { - id: p.integer().primary(), - name: p.string(), - email: p.string(), - born: p.datetime().nullable(), - books: () => p.oneToMany(Book).mappedBy('author'), - }, -}); - -export class Author extends AuthorSchema.class {} -AuthorSchema.setClass(Author); - -const BookSchema = defineEntity({ - name: 'Book', - properties: { - id: p.integer().primary(), - title: p.string(), - author: () => p.manyToOne(Author).inversedBy('books'), - }, -}); - -export class Book extends BookSchema.class {} -BookSchema.setClass(Book); -``` - -You can also define entities using [decorators](https://mikro-orm.io/docs/defining-entities) or [`EntitySchema`](https://mikro-orm.io/docs/entity-schema). See the [defining entities guide](https://mikro-orm.io/docs/defining-entities) for all options. - -### Initialize and Use - -```typescript -import { MikroORM, RequestContext } from '@mikro-orm/postgresql'; - -const orm = await MikroORM.init({ - entities: [Author, Book], - dbName: 'my-db', -}); - -// Create new entities -const author = orm.em.create(Author, { - name: 'Jon Snow', - email: 'snow@wall.st', -}); -const book = orm.em.create(Book, { - title: 'My Life on The Wall', - author, -}); - -// Flush persists all tracked changes in a single transaction -await orm.em.flush(); -``` - -### Querying - -```typescript -// Find with relations -const authors = await orm.em.findAll(Author, { - populate: ['books'], - orderBy: { name: 'asc' }, -}); - -// Type-safe QueryBuilder -const qb = orm.em.createQueryBuilder(Author); -const result = await qb - .select('*') - .where({ books: { title: { $like: '%Wall%' } } }) - .getResult(); -``` - -### Request Context - -In web applications, use `RequestContext` to isolate the identity map per request: - -```typescript -const app = express(); - -app.use((req, res, next) => { - RequestContext.create(orm.em, next); -}); -``` - -More info about `RequestContext` is described [here](https://mikro-orm.io/docs/identity-map/#request-context). - -## Unit of Work - -> Unit of Work maintains a list of objects (_entities_) affected by a business transaction -> and coordinates the writing out of changes. [(Martin Fowler)](https://www.martinfowler.com/eaaCatalog/unitOfWork.html) - -When you call `em.flush()`, all computed changes are queried inside a database transaction. This means you can control transaction boundaries simply by making changes to your entities and calling `flush()` when ready. - -```typescript -const author = await em.findOneOrFail(Author, 1, { - populate: ['books'], -}); -author.name = 'Jon Snow II'; -author.books.getItems().forEach(book => book.title += ' (2nd ed.)'); -author.books.add(orm.em.create(Book, { title: 'New Book', author })); - -// Flush computes change sets and executes them in a single transaction -await em.flush(); -``` - -The above flush will execute: - -```sql -begin; -update "author" set "name" = 'Jon Snow II' where "id" = 1; -update "book" - set "title" = case - when ("id" = 1) then 'My Life on The Wall (2nd ed.)' - when ("id" = 2) then 'Another Book (2nd ed.)' - else "title" end - where "id" in (1, 2); -insert into "book" ("title", "author_id") values ('New Book', 1); -commit; -``` - -## Core Features - -- [Clean and Simple Entity Definition](https://mikro-orm.io/docs/defining-entities) — decorators, `EntitySchema`, or `defineEntity` -- [Identity Map](https://mikro-orm.io/docs/identity-map) and [Unit of Work](https://mikro-orm.io/docs/unit-of-work) — automatic change tracking -- [Entity References](https://mikro-orm.io/docs/entity-references) and [Collections](https://mikro-orm.io/docs/collections) -- [QueryBuilder](https://mikro-orm.io/docs/query-builder) and [Kysely Integration](https://mikro-orm.io/docs/kysely) -- [Transactions](https://mikro-orm.io/docs/transactions) and [Cascading](https://mikro-orm.io/docs/cascading) -- [Populating Relations](https://mikro-orm.io/docs/populating-relations) and [Loading Strategies](https://mikro-orm.io/docs/loading-strategies) -- [Filters](https://mikro-orm.io/docs/filters) and [Lifecycle Hooks](https://mikro-orm.io/docs/events#hooks) -- [Schema Generator](https://mikro-orm.io/docs/schema-generator) and [Migrations](https://mikro-orm.io/docs/migrations) -- [Entity Generator](https://mikro-orm.io/docs/entity-generator) and [Seeding](https://mikro-orm.io/docs/seeding) -- [Embeddables](https://mikro-orm.io/docs/embeddables), [Custom Types](https://mikro-orm.io/docs/custom-types), and [Serialization](https://mikro-orm.io/docs/serializing) -- [Composite and Foreign Keys as Primary Key](https://mikro-orm.io/docs/composite-keys) -- [Entity Constructors](https://mikro-orm.io/docs/entity-constructors) and [Property Validation](https://mikro-orm.io/docs/property-validation) -- [Modelling Relationships](https://mikro-orm.io/docs/relationships) and [Vanilla JS Support](https://mikro-orm.io/docs/usage-with-js) - -## Documentation - -MikroORM documentation, included in this repo in the root directory, is built with [Docusaurus](https://docusaurus.io) and publicly hosted on GitHub Pages at https://mikro-orm.io. - -There is also auto-generated [CHANGELOG.md](CHANGELOG.md) file based on commit messages (via `semantic-release`). - -## Example Integrations - -You can find example integrations for some popular frameworks in the [`mikro-orm-examples` repository](https://github.com/mikro-orm/mikro-orm-examples): - -### TypeScript Examples - -- [Express + MongoDB](https://github.com/mikro-orm/express-ts-example-app) -- [Nest + MySQL](https://github.com/mikro-orm/nestjs-example-app) -- [RealWorld example app (Nest + MySQL)](https://github.com/mikro-orm/nestjs-realworld-example-app) -- [Koa + SQLite](https://github.com/mikro-orm/koa-ts-example-app) -- [GraphQL + PostgreSQL](https://github.com/driescroons/mikro-orm-graphql-example) -- [Inversify + PostgreSQL](https://github.com/PodaruDragos/inversify-example-app) -- [NextJS + MySQL](https://github.com/jonahallibone/mikro-orm-nextjs) -- [Accounts.js REST and GraphQL authentication + SQLite](https://github.com/darkbasic/mikro-orm-accounts-example) -- [Nest + Shopify + PostgreSQL + GraphQL](https://github.com/Cloudshelf/Shopify_CSConnector) -- [Elysia.js + libSQL + Bun](https://github.com/mikro-orm/elysia-bun-example-app) -- [Electron.js + PostgreSQL](https://github.com/adnanlah/electron-mikro-orm-example-app) - -### JavaScript Examples - -- [Express + SQLite](https://github.com/mikro-orm/express-js-example-app) - -## Contributing - -Contributions, issues and feature requests are welcome. Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on the process for submitting pull requests to us. - -## Authors - -**Martin Adámek** - -- Twitter: [@B4nan](https://twitter.com/B4nan) -- Github: [@b4nan](https://github.com/b4nan) - -See also the list of contributors who [participated](https://github.com/mikro-orm/mikro-orm/contributors) in this project. - -## Show Your Support - -Please star this repository if this project helped you! - -> If you'd like to support my open-source work, consider sponsoring me directly at [github.com/sponsors/b4nan](https://github.com/sponsors/b4nan). - -## License - -Copyright © 2018-present [Martin Adámek](https://github.com/b4nan). - -This project is licensed under the MIT License - see the [LICENSE file](LICENSE) for details. diff --git a/node_modules/@mikro-orm/postgresql/index.d.ts b/node_modules/@mikro-orm/postgresql/index.d.ts deleted file mode 100644 index 94e4ae7..0000000 --- a/node_modules/@mikro-orm/postgresql/index.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export * from '@mikro-orm/sql'; -export * from './PostgreSqlConnection.js'; -export * from './PostgreSqlDriver.js'; -export * from './PostgreSqlPlatform.js'; -export { PostgreSqlEntityManager as EntityManager } from './PostgreSqlEntityManager.js'; -export { - PostgreSqlMikroORM as MikroORM, - type PostgreSqlOptions as Options, - definePostgreSqlConfig as defineConfig, -} from './PostgreSqlMikroORM.js'; -export { raw } from './raw.js'; diff --git a/node_modules/@mikro-orm/postgresql/index.js b/node_modules/@mikro-orm/postgresql/index.js deleted file mode 100644 index 2ef8154..0000000 --- a/node_modules/@mikro-orm/postgresql/index.js +++ /dev/null @@ -1,7 +0,0 @@ -export * from '@mikro-orm/sql'; -export * from './PostgreSqlConnection.js'; -export * from './PostgreSqlDriver.js'; -export * from './PostgreSqlPlatform.js'; -export { PostgreSqlEntityManager as EntityManager } from './PostgreSqlEntityManager.js'; -export { PostgreSqlMikroORM as MikroORM, definePostgreSqlConfig as defineConfig } from './PostgreSqlMikroORM.js'; -export { raw } from './raw.js'; diff --git a/node_modules/@mikro-orm/postgresql/node_modules/postgres-array/index.d.ts b/node_modules/@mikro-orm/postgresql/node_modules/postgres-array/index.d.ts deleted file mode 100644 index 88665bd..0000000 --- a/node_modules/@mikro-orm/postgresql/node_modules/postgres-array/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ - -export function parse(source: string): string[]; -export function parse(source: string, transform: (value: string) => T): T[]; - diff --git a/node_modules/@mikro-orm/postgresql/node_modules/postgres-array/index.js b/node_modules/@mikro-orm/postgresql/node_modules/postgres-array/index.js deleted file mode 100644 index 3383d2b..0000000 --- a/node_modules/@mikro-orm/postgresql/node_modules/postgres-array/index.js +++ /dev/null @@ -1,121 +0,0 @@ -'use strict' - -const BACKSLASH = '\\' -const DQUOT = '"' -const LBRACE = '{' -const RBRACE = '}' -const LBRACKET = '[' -const EQUALS = '=' -const COMMA = ',' - -/** When the raw value is this, it means a literal `null` */ -const NULL_STRING = 'NULL' - -/** - * Parses an array according to - * https://www.postgresql.org/docs/17/arrays.html#ARRAYS-IO - * - * Trusts the data (mostly), so only hook up to trusted Postgres servers. - */ -function makeParseArrayWithTransform (transform) { - const haveTransform = transform != null - return function parseArray (str) { - const rbraceIndex = str.length - 1 - if (rbraceIndex === 1) { - return [] - } - if (str[rbraceIndex] !== RBRACE) { - throw new Error('Invalid array text - must end with }') - } - - // If starts with `[`, it is specifying the index boundas. Skip past first `=`. - let position = 0 - if (str[position] === LBRACKET) { - position = str.indexOf(EQUALS) + 1 - } - - if (str[position++] !== LBRACE) { - throw new Error('Invalid array text - must start with {') - } - const output = [] - let current = output - const stack = [] - - let currentStringStart = position - let currentString = '' - let expectValue = true - - for (; position < rbraceIndex; ++position) { - let char = str[position] - // > The array output routine will put double quotes around element values if - // > they are empty strings, contain curly braces, delimiter characters, double - // > quotes, backslashes, or white space, or match the word NULL. Double quotes - // > and backslashes embedded in element values will be backslash-escaped. - if (char === DQUOT) { - // It's escaped - currentStringStart = ++position - let dquot = str.indexOf(DQUOT, currentStringStart) - let backSlash = str.indexOf(BACKSLASH, currentStringStart) - while (backSlash !== -1 && backSlash < dquot) { - position = backSlash - const part = str.slice(currentStringStart, position) - currentString += part - currentStringStart = ++position - if (dquot === position++) { - // This was an escaped doublequote; find the next one! - dquot = str.indexOf(DQUOT, position) - } - // Either way, find the next backslash - backSlash = str.indexOf(BACKSLASH, position) - } - position = dquot - const part = str.slice(currentStringStart, position) - currentString += part - current.push(haveTransform ? transform(currentString) : currentString) - currentString = '' - expectValue = false - } else if (char === LBRACE) { - const newArray = [] - current.push(newArray) - stack.push(current) - current = newArray - currentStringStart = position + 1 - expectValue = true - } else if (char === COMMA) { - expectValue = true - } else if (char === RBRACE) { - expectValue = false - const arr = stack.pop() - if (arr === undefined) { - throw new Error("Invalid array text - too many '}'") - } - current = arr - } else if (expectValue) { - currentStringStart = position - while ( - (char = str[position]) !== COMMA && - char !== RBRACE && - position < rbraceIndex - ) { - ++position - } - const part = str.slice(currentStringStart, position--) - current.push( - part === NULL_STRING ? null : haveTransform ? transform(part) : part - ) - expectValue = false - } else { - throw new Error('Was expecting delimeter') - } - } - - return output - } -} - -const parseArray = makeParseArrayWithTransform() - -exports.parse = (source, transform) => - transform != null - ? makeParseArrayWithTransform(transform)(source) - : parseArray(source) diff --git a/node_modules/@mikro-orm/postgresql/node_modules/postgres-array/license b/node_modules/@mikro-orm/postgresql/node_modules/postgres-array/license deleted file mode 100644 index 25c6247..0000000 --- a/node_modules/@mikro-orm/postgresql/node_modules/postgres-array/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Ben Drucker (bendrucker.me) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/@mikro-orm/postgresql/node_modules/postgres-array/package.json b/node_modules/@mikro-orm/postgresql/node_modules/postgres-array/package.json deleted file mode 100644 index 31ff477..0000000 --- a/node_modules/@mikro-orm/postgresql/node_modules/postgres-array/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "postgres-array", - "main": "index.js", - "version": "3.0.4", - "description": "Parse postgres array columns", - "license": "MIT", - "repository": "bendrucker/postgres-array", - "author": { - "name": "Ben Drucker", - "email": "bvdrucker@gmail.com", - "url": "bendrucker.me" - }, - "engines": { - "node": ">=12" - }, - "scripts": { - "test": "standard && tape test.js" - }, - "types": "index.d.ts", - "keywords": [ - "postgres", - "array", - "parser" - ], - "dependencies": {}, - "devDependencies": { - "standard": "^17.0.0", - "tape": "^5.0.0" - }, - "files": [ - "index.js", - "index.d.ts", - "readme.md" - ] -} diff --git a/node_modules/@mikro-orm/postgresql/node_modules/postgres-array/readme.md b/node_modules/@mikro-orm/postgresql/node_modules/postgres-array/readme.md deleted file mode 100644 index aa9e108..0000000 --- a/node_modules/@mikro-orm/postgresql/node_modules/postgres-array/readme.md +++ /dev/null @@ -1,43 +0,0 @@ -# postgres-array [![tests](https://github.com/bendrucker/postgres-array/workflows/tests/badge.svg)](https://github.com/bendrucker/postgres-array/actions?query=workflow%3Atests) - -> Parse postgres array columns - - -## Install - -``` -npm install --save postgres-array -``` - - -## Usage - -```js -const { parse } = require('postgres-array') - -parse('{1,2,3}', (value) => parseInt(value, 10)) -//=> [1, 2, 3] -``` - -## API - -#### `parse(input, [transform])` -> `array` - -##### input - -*Required* -Type: `string` - -A Postgres array string. - -##### transform - -Type: `function` -Default: `identity` - -A function that transforms non-null values inserted into the array. - - -## License - -MIT © [Ben Drucker](http://bendrucker.me) diff --git a/node_modules/@mikro-orm/postgresql/node_modules/postgres-date/index.d.ts b/node_modules/@mikro-orm/postgresql/node_modules/postgres-date/index.d.ts deleted file mode 100644 index daef364..0000000 --- a/node_modules/@mikro-orm/postgresql/node_modules/postgres-date/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function parseDate(isoDate: string): Date | number | null -declare function parseDate(isoDate: null | undefined): null -export default parseDate diff --git a/node_modules/@mikro-orm/postgresql/node_modules/postgres-date/index.js b/node_modules/@mikro-orm/postgresql/node_modules/postgres-date/index.js deleted file mode 100644 index a96077c..0000000 --- a/node_modules/@mikro-orm/postgresql/node_modules/postgres-date/index.js +++ /dev/null @@ -1,308 +0,0 @@ -'use strict' - -const CHAR_CODE_0 = '0'.charCodeAt(0) -const CHAR_CODE_9 = '9'.charCodeAt(0) -const CHAR_CODE_DASH = '-'.charCodeAt(0) -const CHAR_CODE_COLON = ':'.charCodeAt(0) -const CHAR_CODE_SPACE = ' '.charCodeAt(0) -const CHAR_CODE_DOT = '.'.charCodeAt(0) -const CHAR_CODE_Z = 'Z'.charCodeAt(0) -const CHAR_CODE_MINUS = '-'.charCodeAt(0) -const CHAR_CODE_PLUS = '+'.charCodeAt(0) - -class PGDateParser { - constructor (dateString) { - this.dateString = dateString - this.pos = 0 - this.stringLen = dateString.length - } - - isDigit (c) { - return c >= CHAR_CODE_0 && c <= CHAR_CODE_9 - } - - /** read numbers and parse positive integer regex: \d+ */ - readInteger () { - let val = 0 - const start = this.pos - while (this.pos < this.stringLen) { - const chr = this.dateString.charCodeAt(this.pos) - if (this.isDigit(chr)) { - val = val * 10 - this.pos += 1 - val += chr - CHAR_CODE_0 - } else { - break - } - } - - if (start === this.pos) { - return null - } - - return val - } - - /** read exactly 2 numbers and parse positive integer. regex: \d{2} */ - readInteger2 () { - const chr1 = this.dateString.charCodeAt(this.pos) - const chr2 = this.dateString.charCodeAt(this.pos + 1) - - if (this.isDigit(chr1) && this.isDigit(chr2)) { - this.pos += 2 - return (chr1 - CHAR_CODE_0) * 10 + (chr2 - CHAR_CODE_0) - } - - return -1 - } - - skipChar (char) { - if (this.pos === this.stringLen) { - return false - } - - if (this.dateString.charCodeAt(this.pos) === char) { - this.pos += 1 - return true - } - - return false - } - - readBC () { - if (this.pos === this.stringLen) { - return false - } - - if (this.dateString.slice(this.pos, this.pos + 3) === ' BC') { - this.pos += 3 - return true - } - - return false - } - - checkEnd () { - return this.pos === this.stringLen - } - - getUTC () { - return this.skipChar(CHAR_CODE_Z) - } - - readSign () { - if (this.pos >= this.stringLen) { - return null - } - - const char = this.dateString.charCodeAt(this.pos) - if (char === CHAR_CODE_PLUS) { - this.pos += 1 - return 1 - } - - if (char === CHAR_CODE_MINUS) { - this.pos += 1 - return -1 - } - - return null - } - - getTZOffset () { - // special handling for '+00' at the end of - UTC - if (this.pos === this.stringLen - 3 && this.dateString.slice(this.pos, this.pos + 3) === '+00') { - this.pos += 3 - return 0 - } - - if (this.stringLen === this.pos) { - return undefined - } - - const sign = this.readSign() - if (sign === null) { - if (this.getUTC()) { - return 0 - } - - return undefined - } - - const hours = this.readInteger2() - if (hours === null) { - return null - } - let offset = hours * 3600 - - if (!this.skipChar(CHAR_CODE_COLON)) { - return offset * sign * 1000 - } - - const minutes = this.readInteger2() - if (minutes === null) { - return null - } - offset += minutes * 60 - - if (!this.skipChar(CHAR_CODE_COLON)) { - return offset * sign * 1000 - } - - const seconds = this.readInteger2() - if (seconds == null) { - return null - } - - return (offset + seconds) * sign * 1000 - } - - /* read milliseconds out of time fraction, returns 0 if missing, null if format invalid */ - readMilliseconds () { - /* read milliseconds from fraction: .001=1, 0.1 = 100 */ - if (this.skipChar(CHAR_CODE_DOT)) { - let i = 2 - let val = 0 - const start = this.pos - while (this.pos < this.stringLen) { - const chr = this.dateString.charCodeAt(this.pos) - if (this.isDigit(chr)) { - this.pos += 1 - if (i >= 0) { - val += (chr - CHAR_CODE_0) * 10 ** i - } - i -= 1 - } else { - break - } - } - - if (start === this.pos) { - return null - } - - return val - } - - return 0 - } - - readDate () { - const year = this.readInteger() - if (!this.skipChar(CHAR_CODE_DASH)) { - return null - } - - let month = this.readInteger2() - if (!this.skipChar(CHAR_CODE_DASH)) { - return null - } - - const day = this.readInteger2() - if (year === null || month === null || day === null) { - return null - } - - month = month - 1 - return { year, month, day } - } - - readTime () { - if (this.stringLen - this.pos < 9 || !this.skipChar(CHAR_CODE_SPACE)) { - return { hours: 0, minutes: 0, seconds: 0, milliseconds: 0 } - } - - const hours = this.readInteger2() - if (hours === null || !this.skipChar(CHAR_CODE_COLON)) { - return null - } - const minutes = this.readInteger2() - if (minutes === null || !this.skipChar(CHAR_CODE_COLON)) { - return null - } - const seconds = this.readInteger2() - if (seconds === null) { - return null - } - - const milliseconds = this.readMilliseconds() - if (milliseconds === null) { - return null - } - - return { hours, minutes, seconds, milliseconds } - } - - getJSDate () { - const date = this.readDate() - if (date === null) { - return null - } - - const time = this.readTime() - if (time === null) { - return null - } - - const tzOffset = this.getTZOffset() - if (tzOffset === null) { - return null - } - - const isBC = this.readBC() - if (isBC) { - date.year = -(date.year - 1) - } - - if (!this.checkEnd()) { - return null - } - - let jsDate - if (tzOffset !== undefined) { - jsDate = new Date( - Date.UTC(date.year, date.month, date.day, time.hours, time.minutes, time.seconds, time.milliseconds) - ) - - if (date.year <= 99 && date.year >= -99) { - jsDate.setUTCFullYear(date.year) - } - - if (tzOffset !== 0) { - jsDate.setTime(jsDate.getTime() - tzOffset) - } - } else { - jsDate = new Date(date.year, date.month, date.day, time.hours, time.minutes, time.seconds, time.milliseconds) - if (date.year <= 99 && date.year >= -99) { - jsDate.setFullYear(date.year) - } - } - - return jsDate - } - - static parse (dateString) { - return new PGDateParser(dateString).getJSDate() - } -} - -module.exports = function parseDate (isoDate) { - if (isoDate === null || isoDate === undefined) { - return null - } - - const date = PGDateParser.parse(isoDate) - - // parsing failed, check for infinity - if (date === null) { - if (isoDate === 'infinity') { - return Infinity - } - - if (isoDate === '-infinity') { - return -Infinity - } - } - - return date -} diff --git a/node_modules/@mikro-orm/postgresql/node_modules/postgres-date/license b/node_modules/@mikro-orm/postgresql/node_modules/postgres-date/license deleted file mode 100644 index 25c6247..0000000 --- a/node_modules/@mikro-orm/postgresql/node_modules/postgres-date/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Ben Drucker (bendrucker.me) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/@mikro-orm/postgresql/node_modules/postgres-date/package.json b/node_modules/@mikro-orm/postgresql/node_modules/postgres-date/package.json deleted file mode 100644 index b51acca..0000000 --- a/node_modules/@mikro-orm/postgresql/node_modules/postgres-date/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "postgres-date", - "main": "index.js", - "version": "2.1.0", - "description": "Postgres date column parser", - "license": "MIT", - "repository": "bendrucker/postgres-date", - "author": { - "name": "Ben Drucker", - "email": "bvdrucker@gmail.com", - "url": "bendrucker.me" - }, - "engines": { - "node": ">=12" - }, - "scripts": { - "test": "standard && tape test.js && tsd" - }, - "keywords": [ - "postgres", - "date", - "parser" - ], - "dependencies": {}, - "devDependencies": { - "standard": "^16.0.0", - "tape": "^5.0.0", - "tsd": "^0.19.0" - }, - "files": [ - "index.js", - "index.d.ts", - "readme.md" - ] -} diff --git a/node_modules/@mikro-orm/postgresql/node_modules/postgres-date/readme.md b/node_modules/@mikro-orm/postgresql/node_modules/postgres-date/readme.md deleted file mode 100644 index 4d8b825..0000000 --- a/node_modules/@mikro-orm/postgresql/node_modules/postgres-date/readme.md +++ /dev/null @@ -1,48 +0,0 @@ -# postgres-date [![tests](https://github.com/bendrucker/postgres-date/workflows/tests/badge.svg)](https://github.com/bendrucker/postgres-date/actions?query=workflow%3Atests) - -> Postgres date output parser - -This package parses [date/time outputs](https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-DATETIME-OUTPUT) from Postgres into Javascript `Date` objects. Its goal is to match Postgres behavior and preserve data accuracy. - -If you find a case where a valid Postgres output results in incorrect parsing (including loss of precision), please [create a pull request](https://github.com/bendrucker/postgres-date/compare) and provide a failing test. - -**Supported Postgres Versions:** `>= 9.6` - -All prior versions of Postgres are likely compatible but not officially supported. - -## Install - -``` -npm install --save postgres-date -``` - -## Usage - -```js -const parse = require('postgres-date') -parse('2011-01-23 22:15:51Z') -// => 2011-01-23T22:15:51.000Z -``` - -## API - -#### `parse(isoDate)` -> `date` - -##### isoDate - -*Required* -Type: `string` - -A date string from Postgres. - -## Releases - -The following semantic versioning increments will be used for changes: - -* **Major**: Removal of support for Node.js versions or Postgres versions (not expected) -* **Minor**: Unused, since Postgres returns dates in standard ISO 8601 format -* **Patch**: Any fix for parsing behavior - -## License - -MIT © [Ben Drucker](http://bendrucker.me) diff --git a/node_modules/@mikro-orm/postgresql/node_modules/postgres-interval/index.d.ts b/node_modules/@mikro-orm/postgresql/node_modules/postgres-interval/index.d.ts deleted file mode 100644 index c7a33be..0000000 --- a/node_modules/@mikro-orm/postgresql/node_modules/postgres-interval/index.d.ts +++ /dev/null @@ -1,86 +0,0 @@ -declare namespace PostgresInterval { - export interface IPostgresInterval { - years: number; - months: number; - days: number; - hours: number; - minutes: number; - seconds: number; - milliseconds: number; - - /** - * Returns an interval string. This allows the interval object to be passed into prepared statements. - * - * ```js - * var parse = require('postgres-interval') - * var interval = parse('01:02:03') - * // => { hours: 1, minutes: 2, seconds: 3 } - * interval.toPostgres() - * // 1 hour 2 minutes 3 seconds - * ``` - */ - toPostgres(): string; - - /** - * Returns an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Durations) compliant string, for example P0Y0M0DT0H9M0S. - * - * Also available as {@link toISOString toISOString}. - * - * ```js - * var parse = require('postgres-interval') - * var interval = parse('01:02:03') - * // => { hours: 1, minutes: 2, seconds: 3 } - * interval.toISO() - * // P0Y0M0DT1H2M3S - * ``` - */ - toISO(): string; - /** - * Returns an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Durations) compliant string, for example P0Y0M0DT0H9M0S. - * - * Also available as {@link toISO toISO} for backwards compatibility. - * - * ```js - * var parse = require('postgres-interval') - * var interval = parse('01:02:03') - * // => { hours: 1, minutes: 2, seconds: 3 } - * interval.toISOString() - * // P0Y0M0DT1H2M3S - * ``` - */ - toISOString(): string; - /** - * Returns an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Durations) compliant string shortened to minimum length, for example `PT9M`. - * - * ```js - * var parse = require('postgres-interval') - * var interval = parse('01:02:03') - * // => { hours: 1, minutes: 2, seconds: 3 } - * interval.toISOStringShort() - * // PT1H2M3S - * ``` - */ - toISOStringShort(): string; - } -} - -/** - * Parse Postgres interval columns. - * - * ```js - * var parse = require('postgres-interval') - * var interval = parse('01:02:03') - * // => { hours: 1, minutes: 2, seconds: 3 } - * interval.toPostgres() - * // 1 hour 2 minutes 3 seconds - * interval.toISOString() - * // P0Y0M0DT1H2M3S - * interval.toISOStringShort() - * // PT1H2M3S - * ``` - * - * @param raw A Postgres interval string. - */ -declare function PostgresInterval(raw: string): PostgresInterval.IPostgresInterval; - -export = PostgresInterval; diff --git a/node_modules/@mikro-orm/postgresql/node_modules/postgres-interval/index.js b/node_modules/@mikro-orm/postgresql/node_modules/postgres-interval/index.js deleted file mode 100644 index aba05a5..0000000 --- a/node_modules/@mikro-orm/postgresql/node_modules/postgres-interval/index.js +++ /dev/null @@ -1,266 +0,0 @@ -'use strict' - -module.exports = PostgresInterval - -function PostgresInterval (raw) { - if (!(this instanceof PostgresInterval)) { - return new PostgresInterval(raw) - } - - this.years = 0 - this.months = 0 - this.days = 0 - this.hours = 0 - this.minutes = 0 - this.seconds = 0 - this.milliseconds = 0 - - parse(this, raw) -} - -PostgresInterval.prototype.toPostgres = function () { - let postgresString = '' - - if (this.years) { - postgresString += this.years === 1 ? this.years + ' year' : this.years + ' years' - } - - if (this.months) { - if (postgresString.length) { - postgresString += ' ' - } - - postgresString += this.months === 1 ? this.months + ' month' : this.months + ' months' - } - - if (this.days) { - if (postgresString.length) { - postgresString += ' ' - } - - postgresString += this.days === 1 ? this.days + ' day' : this.days + ' days' - } - - if (this.hours) { - if (postgresString.length) { - postgresString += ' ' - } - - postgresString += this.hours === 1 ? this.hours + ' hour' : this.hours + ' hours' - } - - if (this.minutes) { - if (postgresString.length) { - postgresString += ' ' - } - - postgresString += this.minutes === 1 ? this.minutes + ' minute' : this.minutes + ' minutes' - } - - if (this.seconds || this.milliseconds) { - if (postgresString.length) { - postgresString += ' ' - } - - if (this.milliseconds) { - const value = Math.trunc((this.seconds + this.milliseconds / 1000) * 1000000) / 1000000 - - postgresString += value === 1 ? value + ' second' : value + ' seconds' - } else { - postgresString += this.seconds === 1 ? this.seconds + ' second' : this.seconds + ' seconds' - } - } - - return postgresString === '' ? '0' : postgresString -} - -const propertiesISOEquivalent = { - years: 'Y', - months: 'M', - days: 'D', - hours: 'H', - minutes: 'M', - seconds: 'S' -} - -// according to ISO 8601 -PostgresInterval.prototype.toISOString = PostgresInterval.prototype.toISO = - function () { - return toISOString.call(this, { short: false }) - } - -PostgresInterval.prototype.toISOStringShort = function () { - return toISOString.call(this, { short: true }) -} - -function toISOString ({ short }) { - let datePart = '' - - if (!short || this.years) { - datePart += this.years + propertiesISOEquivalent.years - } - - if (!short || this.months) { - datePart += this.months + propertiesISOEquivalent.months - } - - if (!short || this.days) { - datePart += this.days + propertiesISOEquivalent.days - } - - let timePart = '' - - if (!short || this.hours) { - timePart += this.hours + propertiesISOEquivalent.hours - } - - if (!short || this.minutes) { - timePart += this.minutes + propertiesISOEquivalent.minutes - } - - if (!short || (this.seconds || this.milliseconds)) { - if (this.milliseconds) { - timePart += (Math.trunc((this.seconds + this.milliseconds / 1000) * 1000000) / 1000000) + propertiesISOEquivalent.seconds - } else { - timePart += this.seconds + propertiesISOEquivalent.seconds - } - } - - if (!timePart && !datePart) { - return 'PT0S' - } - - if (!timePart) { - return `P${datePart}` - } - - return `P${datePart}T${timePart}` -} - -const position = { value: 0 } - -function readNextNum (interval) { - let val = 0 - - while (position.value < interval.length) { - const char = interval[position.value] - - if (char >= '0' && char <= '9') { - val = val * 10 + +char - position.value++ - } else { - break - } - } - - return val -} - -function parseMillisecond (interval) { - const previousPosition = position.value - const currentValue = readNextNum(interval) - const valueStringLength = position.value - previousPosition - - switch (valueStringLength) { - case 1: - return currentValue * 100 - case 2: - return currentValue * 10 - case 3: - return currentValue - case 4: - return currentValue / 10 - case 5: - return currentValue / 100 - case 6: - return currentValue / 1000 - } - - // slow path - const remainder = valueStringLength - 3 - return currentValue / Math.pow(10, remainder) -} - -function parse (instance, interval) { - if (!interval) { - return - } - - position.value = 0 - - let currentValue - let nextNegative = 1 - - while (position.value < interval.length) { - const char = interval[position.value] - - if (char === '-') { - nextNegative = -1 - position.value++ - continue - } else if (char === '+') { - position.value++ - continue - } else if (char === ' ') { - position.value++ - continue - } else if (char < '0' || char > '9') { - position.value++ - continue - } else { - currentValue = readNextNum(interval) - - if (interval[position.value] === ':') { - instance.hours = currentValue ? nextNegative * currentValue : 0 - - position.value++ - currentValue = readNextNum(interval) - instance.minutes = currentValue ? nextNegative * currentValue : 0 - - position.value++ - currentValue = readNextNum(interval) - instance.seconds = currentValue ? nextNegative * currentValue : 0 - - if (interval[position.value] === '.') { - position.value++ - - currentValue = parseMillisecond(interval) - instance.milliseconds = currentValue ? nextNegative * currentValue : 0 - } - - return - } - - // skip space - position.value++ - - const unit = interval[position.value] - - if (unit === 'y') { - instance.years = currentValue ? nextNegative * currentValue : 0 - } else if (unit === 'm') { - instance.months = currentValue ? nextNegative * currentValue : 0 - } else if (unit === 'd') { - instance.days = currentValue ? nextNegative * currentValue : 0 - } - - nextNegative = 1 - } - } -} - -PostgresInterval.parse = function (interval) { - const instance = { - years: 0, - months: 0, - days: 0, - hours: 0, - minutes: 0, - seconds: 0, - milliseconds: 0 - } - - parse(instance, interval) - - return instance -} diff --git a/node_modules/@mikro-orm/postgresql/node_modules/postgres-interval/license b/node_modules/@mikro-orm/postgresql/node_modules/postgres-interval/license deleted file mode 100644 index 25c6247..0000000 --- a/node_modules/@mikro-orm/postgresql/node_modules/postgres-interval/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Ben Drucker (bendrucker.me) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/@mikro-orm/postgresql/node_modules/postgres-interval/package.json b/node_modules/@mikro-orm/postgresql/node_modules/postgres-interval/package.json deleted file mode 100644 index 7b498db..0000000 --- a/node_modules/@mikro-orm/postgresql/node_modules/postgres-interval/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "postgres-interval", - "main": "index.js", - "version": "4.0.2", - "description": "Parse Postgres interval columns", - "license": "MIT", - "repository": "bendrucker/postgres-interval", - "author": { - "name": "Ben Drucker", - "email": "bvdrucker@gmail.com", - "url": "https://www.bendrucker.me" - }, - "engines": { - "node": ">=12" - }, - "scripts": { - "test": "standard && tape test.js" - }, - "keywords": [ - "postgres", - "interval", - "parser" - ], - "dependencies": {}, - "devDependencies": { - "standard": "^17.0.0", - "tape": "^5.0.0" - }, - "files": [ - "index.js", - "index.d.ts", - "readme.md" - ] -} diff --git a/node_modules/@mikro-orm/postgresql/node_modules/postgres-interval/readme.md b/node_modules/@mikro-orm/postgresql/node_modules/postgres-interval/readme.md deleted file mode 100644 index bb95bb9..0000000 --- a/node_modules/@mikro-orm/postgresql/node_modules/postgres-interval/readme.md +++ /dev/null @@ -1,62 +0,0 @@ -# postgres-interval [![tests](https://github.com/bendrucker/postgres-interval/workflows/tests/badge.svg)](https://github.com/bendrucker/postgres-interval/actions?query=workflow%3Atests) - -> Parse Postgres interval columns - - -## Install - -```sh -npm install --save postgres-interval -``` - - -## Usage - -```js -var parse = require('postgres-interval') -var interval = parse('01:02:03') -// => { hours: 1, minutes: 2, seconds: 3 } -interval.toPostgres() -// 1 hour 2 minutes 3 seconds -interval.toISOString() -// P0Y0M0DT1H2M3S -interval.toISOStringShort() -// PT1H2M3S -``` - -This package parses the default Postgres interval style. If you have changed [`intervalstyle`](https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-INTERVALSTYLE), you will need to set it back to the default: - -```sql -set intervalstyle to default; -``` - -## API - -#### `parse(pgInterval)` -> `interval` - -##### pgInterval - -*Required* -Type: `string` - -A Postgres interval string. - -This package is focused on parsing Postgres outputs. It optimizes for performance by assuming that inputs follow the default interval format. It does not perform any validation on the input. If any interval field is not found, its value will be set to `0` in the returned `interval`. - -#### `interval.toPostgres()` -> `string` - -Returns an interval string. This allows the interval object to be passed into prepared statements. - -#### `interval.toISOString()` -> `string` - -Returns an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Durations) compliant string, for example `P0Y0M0DT0H9M0S`. - -Also available as `interval.toISO()` for backwards compatibility. - -#### `interval.toISOStringShort()` -> `string` - -Returns an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Durations) compliant string shortened to minimum length, for example `PT9M`. - -## License - -MIT © [Ben Drucker](http://bendrucker.me) diff --git a/node_modules/@mikro-orm/postgresql/package.json b/node_modules/@mikro-orm/postgresql/package.json deleted file mode 100644 index 2f463f1..0000000 --- a/node_modules/@mikro-orm/postgresql/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "@mikro-orm/postgresql", - "version": "7.0.2", - "description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.", - "keywords": [ - "data-mapper", - "ddd", - "entity", - "identity-map", - "javascript", - "js", - "mariadb", - "mikro-orm", - "mongo", - "mongodb", - "mysql", - "orm", - "postgresql", - "sqlite", - "sqlite3", - "ts", - "typescript", - "unit-of-work" - ], - "homepage": "https://mikro-orm.io", - "bugs": { - "url": "https://github.com/mikro-orm/mikro-orm/issues" - }, - "license": "MIT", - "author": "Martin Adámek", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/mikro-orm/mikro-orm.git" - }, - "type": "module", - "exports": { - "./package.json": "./package.json", - ".": "./index.js" - }, - "publishConfig": { - "access": "public" - }, - "scripts": { - "build": "yarn compile && yarn copy", - "clean": "yarn run -T rimraf ./dist", - "compile": "yarn run -T tsc -p tsconfig.build.json", - "copy": "node ../../scripts/copy.mjs" - }, - "dependencies": { - "@mikro-orm/sql": "7.0.2", - "kysely": "0.28.12", - "pg": "8.20.0", - "pg-cursor": "2.19.0", - "postgres-array": "3.0.4", - "postgres-date": "2.1.0", - "postgres-interval": "4.0.2" - }, - "devDependencies": { - "@mikro-orm/core": "^7.0.2" - }, - "peerDependencies": { - "@mikro-orm/core": "7.0.2" - }, - "engines": { - "node": ">= 22.17.0" - } -} diff --git a/node_modules/@mikro-orm/postgresql/raw.d.ts b/node_modules/@mikro-orm/postgresql/raw.d.ts deleted file mode 100644 index 89a19e9..0000000 --- a/node_modules/@mikro-orm/postgresql/raw.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { type AnyString, type Dictionary, type EntityKey, type RawQueryFragment } from '@mikro-orm/sql'; -import type { SelectQueryBuilder as KyselySelectQueryBuilder } from 'kysely'; -/** @internal Type for QueryBuilder instances passed to raw() - uses toRaw to distinguish from Kysely QueryBuilder */ -type QueryBuilderLike = { - toQuery(): { - sql: string; - params: readonly unknown[]; - }; - toRaw(): RawQueryFragment; -}; -/** - * Creates raw SQL query fragment that can be assigned to a property or part of a filter. This fragment is represented - * by `RawQueryFragment` class instance that can be serialized to a string, so it can be used both as an object value - * and key. When serialized, the fragment key gets cached and only such cached key will be recognized by the ORM. - * This adds a runtime safety to the raw query fragments. - * - * > **`raw()` helper is required since v6 to use a raw fragment in your query, both through EntityManager and QueryBuilder.** - * - * ```ts - * // as a value - * await em.find(User, { time: raw('now()') }); - * - * // as a key - * await em.find(User, { [raw('lower(name)')]: name.toLowerCase() }); - * - * // value can be empty array - * await em.find(User, { [raw('(select 1 = 1)')]: [] }); - * ``` - * - * The `raw` helper supports several signatures, you can pass in a callback that receives the current property alias: - * - * ```ts - * await em.find(User, { [raw(alias => `lower(${alias}.name)`)]: name.toLowerCase() }); - * ``` - * - * You can also use the `sql` tagged template function, which works the same, but supports only the simple string signature: - * - * ```ts - * await em.find(User, { [sql`lower(name)`]: name.toLowerCase() }); - * ``` - * - * When using inside filters, you might have to use a callback signature to create new raw instance for every filter usage. - * - * ```ts - * @Filter({ name: 'long', cond: () => ({ [raw('length(perex)')]: { $gt: 10000 } }) }) - * ``` - * - * The `raw` helper can be used within indexes and uniques to write database-agnostic SQL expressions. In that case, you can use `'??'` to tag your database identifiers (table name, column names, index name, ...) inside your expression, and pass those identifiers as a second parameter to the `raw` helper. Internally, those will automatically be quoted according to the database in use: - * - * ```ts - * // On postgres, will produce: create index "index custom_idx_on_name" on "library.author" ("country") - * // On mysql, will produce: create index `index custom_idx_on_name` on `library.author` (`country`) - * @Index({ name: 'custom_idx_on_name', expression: (table, columns) => raw(`create index ?? on ?? (??)`, ['custom_idx_on_name', table, columns.name]) }) - * @Entity({ schema: 'library' }) - * export class Author { ... } - * ``` - * - * You can also use the `quote` tag function to write database-agnostic SQL expressions. The end-result is the same as using the `raw` function regarding database identifiers quoting, only to have a more elegant expression syntax: - * - * ```ts - * @Index({ name: 'custom_idx_on_name', expression: (table, columns) => quote`create index ${'custom_idx_on_name'} on ${table} (${columns.name})` }) - * @Entity({ schema: 'library' }) - * export class Author { ... } - * ``` - */ -export declare function raw( - sql: - | QueryBuilderLike - | KyselySelectQueryBuilder - | EntityKey - | EntityKey[] - | AnyString - | ((alias: string) => string) - | RawQueryFragment, - params?: readonly unknown[] | Dictionary, -): R; -export {}; diff --git a/node_modules/@mikro-orm/postgresql/raw.js b/node_modules/@mikro-orm/postgresql/raw.js deleted file mode 100644 index 52853b1..0000000 --- a/node_modules/@mikro-orm/postgresql/raw.js +++ /dev/null @@ -1,64 +0,0 @@ -import { raw as raw_, Utils } from '@mikro-orm/sql'; -/** - * Creates raw SQL query fragment that can be assigned to a property or part of a filter. This fragment is represented - * by `RawQueryFragment` class instance that can be serialized to a string, so it can be used both as an object value - * and key. When serialized, the fragment key gets cached and only such cached key will be recognized by the ORM. - * This adds a runtime safety to the raw query fragments. - * - * > **`raw()` helper is required since v6 to use a raw fragment in your query, both through EntityManager and QueryBuilder.** - * - * ```ts - * // as a value - * await em.find(User, { time: raw('now()') }); - * - * // as a key - * await em.find(User, { [raw('lower(name)')]: name.toLowerCase() }); - * - * // value can be empty array - * await em.find(User, { [raw('(select 1 = 1)')]: [] }); - * ``` - * - * The `raw` helper supports several signatures, you can pass in a callback that receives the current property alias: - * - * ```ts - * await em.find(User, { [raw(alias => `lower(${alias}.name)`)]: name.toLowerCase() }); - * ``` - * - * You can also use the `sql` tagged template function, which works the same, but supports only the simple string signature: - * - * ```ts - * await em.find(User, { [sql`lower(name)`]: name.toLowerCase() }); - * ``` - * - * When using inside filters, you might have to use a callback signature to create new raw instance for every filter usage. - * - * ```ts - * @Filter({ name: 'long', cond: () => ({ [raw('length(perex)')]: { $gt: 10000 } }) }) - * ``` - * - * The `raw` helper can be used within indexes and uniques to write database-agnostic SQL expressions. In that case, you can use `'??'` to tag your database identifiers (table name, column names, index name, ...) inside your expression, and pass those identifiers as a second parameter to the `raw` helper. Internally, those will automatically be quoted according to the database in use: - * - * ```ts - * // On postgres, will produce: create index "index custom_idx_on_name" on "library.author" ("country") - * // On mysql, will produce: create index `index custom_idx_on_name` on `library.author` (`country`) - * @Index({ name: 'custom_idx_on_name', expression: (table, columns) => raw(`create index ?? on ?? (??)`, ['custom_idx_on_name', table, columns.name]) }) - * @Entity({ schema: 'library' }) - * export class Author { ... } - * ``` - * - * You can also use the `quote` tag function to write database-agnostic SQL expressions. The end-result is the same as using the `raw` function regarding database identifiers quoting, only to have a more elegant expression syntax: - * - * ```ts - * @Index({ name: 'custom_idx_on_name', expression: (table, columns) => quote`create index ${'custom_idx_on_name'} on ${table} (${columns.name})` }) - * @Entity({ schema: 'library' }) - * export class Author { ... } - * ``` - */ -export function raw(sql, params) { - if (Utils.isObject(sql) && 'compile' in sql) { - const query = sql.compile(); - const processed = query.sql.replaceAll(/\$\d+/g, '?'); - return raw_(processed, query.parameters); - } - return raw_(sql, params); -} diff --git a/node_modules/@mikro-orm/sql/AbstractSqlConnection.d.ts b/node_modules/@mikro-orm/sql/AbstractSqlConnection.d.ts deleted file mode 100644 index 519a0d0..0000000 --- a/node_modules/@mikro-orm/sql/AbstractSqlConnection.d.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { type ControlledTransaction, type Dialect, Kysely } from 'kysely'; -import { - type AnyEntity, - Connection, - type Dictionary, - type EntityData, - type IsolationLevel, - type LogContext, - type LoggingOptions, - type MaybePromise, - type QueryResult, - RawQueryFragment, - type Transaction, - type TransactionEventBroadcaster, -} from '@mikro-orm/core'; -import type { AbstractSqlPlatform } from './AbstractSqlPlatform.js'; -import { NativeQueryBuilder } from './query/NativeQueryBuilder.js'; -/** Base class for SQL database connections, built on top of Kysely. */ -export declare abstract class AbstractSqlConnection extends Connection { - #private; - protected platform: AbstractSqlPlatform; - /** Creates a Kysely dialect instance with driver-specific configuration. */ - abstract createKyselyDialect(overrides: Dictionary): MaybePromise; - /** Establishes the database connection and runs the onConnect hook. */ - connect(options?: { skipOnConnect?: boolean }): Promise; - /** Initializes the Kysely client from driver options or a user-provided Kysely instance. */ - createKysely(): MaybePromise; - /** - * @inheritDoc - */ - close(force?: boolean): Promise; - /** - * @inheritDoc - */ - isConnected(): Promise; - /** - * @inheritDoc - */ - checkConnection(): Promise< - | { - ok: true; - } - | { - ok: false; - reason: string; - error?: Error; - } - >; - /** Returns the underlying Kysely client, creating it synchronously if needed. */ - getClient(): Kysely; - /** Ensures the Kysely client is initialized, creating it asynchronously if needed. */ - initClient(): Promise; - /** Executes a callback within a transaction, committing on success and rolling back on error. */ - transactional( - cb: (trx: Transaction>) => Promise, - options?: { - isolationLevel?: IsolationLevel; - readOnly?: boolean; - ctx?: ControlledTransaction; - eventBroadcaster?: TransactionEventBroadcaster; - loggerContext?: LogContext; - }, - ): Promise; - /** Begins a new transaction or creates a savepoint if a transaction context already exists. */ - begin(options?: { - isolationLevel?: IsolationLevel; - readOnly?: boolean; - ctx?: ControlledTransaction; - eventBroadcaster?: TransactionEventBroadcaster; - loggerContext?: LogContext; - }): Promise>; - /** Commits the transaction or releases the savepoint. */ - commit( - ctx: ControlledTransaction, - eventBroadcaster?: TransactionEventBroadcaster, - loggerContext?: LogContext, - ): Promise; - /** Rolls back the transaction or rolls back to the savepoint. */ - rollback( - ctx: ControlledTransaction, - eventBroadcaster?: TransactionEventBroadcaster, - loggerContext?: LogContext, - ): Promise; - private prepareQuery; - /** Executes a SQL query and returns the result based on the method: `'all'` for rows, `'get'` for single row, `'run'` for affected count. */ - execute | EntityData[] = EntityData[]>( - query: string | NativeQueryBuilder | RawQueryFragment, - params?: readonly unknown[], - method?: 'all' | 'get' | 'run', - ctx?: Transaction, - loggerContext?: LoggingOptions, - ): Promise; - /** Executes a SQL query and returns an async iterable that yields results row by row. */ - stream>( - query: string | NativeQueryBuilder | RawQueryFragment, - params?: readonly unknown[], - ctx?: Transaction>, - loggerContext?: LoggingOptions, - ): AsyncIterableIterator; - /** @inheritDoc */ - executeDump(dump: string): Promise; - protected getSql(query: string, formatted: string, context?: LogContext): string; - protected transformRawResult(res: any, method?: 'all' | 'get' | 'run'): T; -} diff --git a/node_modules/@mikro-orm/sql/AbstractSqlConnection.js b/node_modules/@mikro-orm/sql/AbstractSqlConnection.js deleted file mode 100644 index cbd8751..0000000 --- a/node_modules/@mikro-orm/sql/AbstractSqlConnection.js +++ /dev/null @@ -1,257 +0,0 @@ -import { CompiledQuery, Kysely } from 'kysely'; -import { Connection, EventType, RawQueryFragment, Utils } from '@mikro-orm/core'; -import { NativeQueryBuilder } from './query/NativeQueryBuilder.js'; -/** Base class for SQL database connections, built on top of Kysely. */ -export class AbstractSqlConnection extends Connection { - #client; - /** Establishes the database connection and runs the onConnect hook. */ - async connect(options) { - await this.initClient(); - this.connected = true; - if (options?.skipOnConnect !== true) { - await this.onConnect(); - } - } - /** Initializes the Kysely client from driver options or a user-provided Kysely instance. */ - createKysely() { - let driverOptions = this.options.driverOptions ?? this.config.get('driverOptions'); - if (typeof driverOptions === 'function') { - driverOptions = driverOptions(); - } - if (driverOptions instanceof Kysely) { - this.logger.log('info', 'Reusing Kysely client provided via `driverOptions`'); - this.#client = driverOptions; - } else if ('createDriver' in driverOptions) { - this.logger.log('info', 'Reusing Kysely dialect provided via `driverOptions`'); - this.#client = new Kysely({ dialect: driverOptions }); - } else { - const dialect = this.createKyselyDialect(driverOptions); - if (dialect instanceof Promise) { - return dialect.then(d => { - this.#client = new Kysely({ dialect: d }); - }); - } - this.#client = new Kysely({ dialect }); - } - } - /** - * @inheritDoc - */ - async close(force) { - await super.close(force); - await this.#client?.destroy(); - this.connected = false; - this.#client = undefined; - } - /** - * @inheritDoc - */ - async isConnected() { - const check = await this.checkConnection(); - return check.ok; - } - /** - * @inheritDoc - */ - async checkConnection() { - if (!this.connected) { - return { ok: false, reason: 'Connection not established' }; - } - try { - await this.getClient().executeQuery(CompiledQuery.raw('select 1')); - return { ok: true }; - } catch (error) { - return { ok: false, reason: error.message, error }; - } - } - /** Returns the underlying Kysely client, creating it synchronously if needed. */ - getClient() { - if (!this.#client) { - const maybePromise = this.createKysely(); - /* v8 ignore next */ - if (maybePromise instanceof Promise) { - throw new Error( - 'Current driver requires async initialization, use `MikroORM.init()` instead of the constructor', - ); - } - } - return this.#client; - } - /** Ensures the Kysely client is initialized, creating it asynchronously if needed. */ - async initClient() { - if (!this.#client) { - await this.createKysely(); - } - } - /** Executes a callback within a transaction, committing on success and rolling back on error. */ - async transactional(cb, options = {}) { - const trx = await this.begin(options); - try { - const ret = await cb(trx); - await this.commit(trx, options.eventBroadcaster, options.loggerContext); - return ret; - } catch (error) { - await this.rollback(trx, options.eventBroadcaster, options.loggerContext); - throw error; - } - } - /** Begins a new transaction or creates a savepoint if a transaction context already exists. */ - async begin(options = {}) { - if (options.ctx) { - const ctx = options.ctx; - await options.eventBroadcaster?.dispatchEvent(EventType.beforeTransactionStart, ctx); - ctx.index ??= 0; - const savepointName = `trx${ctx.index + 1}`; - const trx = await options.ctx.savepoint(savepointName).execute(); - Reflect.defineProperty(trx, 'index', { value: ctx.index + 1 }); - Reflect.defineProperty(trx, 'savepointName', { value: savepointName }); - this.logQuery(this.platform.getSavepointSQL(savepointName), options.loggerContext); - await options.eventBroadcaster?.dispatchEvent(EventType.afterTransactionStart, trx); - return trx; - } - await this.ensureConnection(); - await options.eventBroadcaster?.dispatchEvent(EventType.beforeTransactionStart); - let trxBuilder = this.getClient().startTransaction(); - if (options.isolationLevel) { - trxBuilder = trxBuilder.setIsolationLevel(options.isolationLevel); - } - if (options.readOnly) { - trxBuilder = trxBuilder.setAccessMode('read only'); - } - const trx = await trxBuilder.execute(); - if (options.ctx) { - const ctx = options.ctx; - ctx.index ??= 0; - const savepointName = `trx${ctx.index + 1}`; - Reflect.defineProperty(trx, 'index', { value: ctx.index + 1 }); - Reflect.defineProperty(trx, 'savepointName', { value: savepointName }); - this.logQuery(this.platform.getSavepointSQL(savepointName), options.loggerContext); - } else { - for (const query of this.platform.getBeginTransactionSQL(options)) { - this.logQuery(query, options.loggerContext); - } - } - await options.eventBroadcaster?.dispatchEvent(EventType.afterTransactionStart, trx); - return trx; - } - /** Commits the transaction or releases the savepoint. */ - async commit(ctx, eventBroadcaster, loggerContext) { - if (ctx.isRolledBack) { - return; - } - await eventBroadcaster?.dispatchEvent(EventType.beforeTransactionCommit, ctx); - if ('savepointName' in ctx) { - await ctx.releaseSavepoint(ctx.savepointName).execute(); - this.logQuery(this.platform.getReleaseSavepointSQL(ctx.savepointName), loggerContext); - } else { - await ctx.commit().execute(); - this.logQuery(this.platform.getCommitTransactionSQL(), loggerContext); - } - await eventBroadcaster?.dispatchEvent(EventType.afterTransactionCommit, ctx); - } - /** Rolls back the transaction or rolls back to the savepoint. */ - async rollback(ctx, eventBroadcaster, loggerContext) { - await eventBroadcaster?.dispatchEvent(EventType.beforeTransactionRollback, ctx); - if ('savepointName' in ctx) { - await ctx.rollbackToSavepoint(ctx.savepointName).execute(); - this.logQuery(this.platform.getRollbackToSavepointSQL(ctx.savepointName), loggerContext); - } else { - await ctx.rollback().execute(); - this.logQuery(this.platform.getRollbackTransactionSQL(), loggerContext); - } - await eventBroadcaster?.dispatchEvent(EventType.afterTransactionRollback, ctx); - } - prepareQuery(query, params = []) { - if (query instanceof NativeQueryBuilder) { - query = query.toRaw(); - } - if (query instanceof RawQueryFragment) { - params = query.params; - query = query.sql; - } - query = this.config.get('onQuery')(query, params); - const formatted = this.platform.formatQuery(query, params); - return { query, params, formatted }; - } - /** Executes a SQL query and returns the result based on the method: `'all'` for rows, `'get'` for single row, `'run'` for affected count. */ - async execute(query, params = [], method = 'all', ctx, loggerContext) { - await this.ensureConnection(); - const q = this.prepareQuery(query, params); - const sql = this.getSql(q.query, q.formatted, loggerContext); - return this.executeQuery( - sql, - async () => { - const compiled = CompiledQuery.raw(q.formatted); - const res = await (ctx ?? this.#client).executeQuery(compiled); - return this.transformRawResult(res, method); - }, - { ...q, ...loggerContext }, - ); - } - /** Executes a SQL query and returns an async iterable that yields results row by row. */ - async *stream(query, params = [], ctx, loggerContext) { - await this.ensureConnection(); - const q = this.prepareQuery(query, params); - const sql = this.getSql(q.query, q.formatted, loggerContext); - // construct the compiled query manually with `kind: 'SelectQueryNode'` to avoid sqlite validation for select queries when streaming - const compiled = { - query: { - kind: 'SelectQueryNode', - }, - sql: q.formatted, - parameters: [], - }; - try { - const res = (ctx ?? this.getClient()).getExecutor().stream(compiled, 1); - this.logQuery(sql, { - sql, - params, - ...loggerContext, - affected: Utils.isPlainObject(res) ? res.affectedRows : undefined, - }); - for await (const items of res) { - for (const row of this.transformRawResult(items, 'all')) { - yield row; - } - } - } catch (e) { - this.logQuery(sql, { sql, params, ...loggerContext, level: 'error' }); - throw e; - } - } - /** @inheritDoc */ - async executeDump(dump) { - await this.ensureConnection(); - try { - const raw = CompiledQuery.raw(dump); - await this.getClient().executeQuery(raw); - } catch (e) { - /* v8 ignore next */ - throw this.platform.getExceptionConverter().convertException(e); - } - } - getSql(query, formatted, context) { - const logger = this.config.getLogger(); - if (!logger.isEnabled('query', context)) { - return query; - } - if (logger.isEnabled('query-params', context)) { - return formatted; - } - return query; - } - transformRawResult(res, method) { - if (method === 'get') { - return res.rows[0]; - } - if (method === 'all') { - return res.rows; - } - return { - affectedRows: Number(res.numAffectedRows ?? res.rows.length), - insertId: res.insertId != null ? Number(res.insertId) : res.insertId, - row: res.rows[0], - rows: res.rows, - }; - } -} diff --git a/node_modules/@mikro-orm/sql/AbstractSqlDriver.d.ts b/node_modules/@mikro-orm/sql/AbstractSqlDriver.d.ts deleted file mode 100644 index a5cab59..0000000 --- a/node_modules/@mikro-orm/sql/AbstractSqlDriver.d.ts +++ /dev/null @@ -1,423 +0,0 @@ -import { - type AnyEntity, - type Collection, - type Configuration, - type ConnectionType, - type Constructor, - type CountOptions, - DatabaseDriver, - type DeleteOptions, - type Dictionary, - type DriverMethodOptions, - type EntityData, - type EntityDictionary, - type EntityField, - EntityManagerType, - type EntityMetadata, - type EntityName, - type EntityProperty, - type FilterQuery, - type FindOneOptions, - type FindOptions, - type FormulaTable, - type LockOptions, - type LoggingOptions, - type NativeInsertUpdateManyOptions, - type NativeInsertUpdateOptions, - type ObjectQuery, - type Options, - type OrderDefinition, - type PopulateOptions, - type PopulatePath, - type Primary, - type QueryOrderMap, - type QueryResult, - type Raw, - RawQueryFragment, - type StreamOptions, - type Transaction, - type UpsertManyOptions, - type UpsertOptions, -} from '@mikro-orm/core'; -import type { AbstractSqlConnection } from './AbstractSqlConnection.js'; -import type { AbstractSqlPlatform } from './AbstractSqlPlatform.js'; -import { type AnyQueryBuilder } from './query/QueryBuilder.js'; -import { type NativeQueryBuilder } from './query/NativeQueryBuilder.js'; -import { QueryType } from './query/enums.js'; -import { SqlEntityManager } from './SqlEntityManager.js'; -import type { InternalField } from './typings.js'; -/** Base class for SQL database drivers, implementing find/insert/update/delete using QueryBuilder. */ -export declare abstract class AbstractSqlDriver< - Connection extends AbstractSqlConnection = AbstractSqlConnection, - Platform extends AbstractSqlPlatform = AbstractSqlPlatform, -> extends DatabaseDriver { - [EntityManagerType]: SqlEntityManager; - protected readonly connection: Connection; - protected readonly replicas: Connection[]; - protected readonly platform: Platform; - protected constructor( - config: Configuration, - platform: Platform, - connection: Constructor, - connector: string[], - ); - getPlatform(): Platform; - /** Evaluates a formula callback, handling both string and Raw return values. */ - evaluateFormula(formula: (...args: any[]) => string | Raw, columns: any, table: FormulaTable): string; - /** For TPT entities, returns ownProps (columns in this table); otherwise returns all props. */ - private getTableProps; - /** Creates a FormulaTable object for use in formula callbacks. */ - private createFormulaTable; - private validateSqlOptions; - createEntityManager(useContext?: boolean): this[typeof EntityManagerType]; - private createQueryBuilderFromOptions; - find( - entityName: EntityName, - where: ObjectQuery, - options?: FindOptions, - ): Promise[]>; - findOne( - entityName: EntityName, - where: ObjectQuery, - options?: FindOneOptions, - ): Promise | null>; - protected hasToManyJoins(hint: PopulateOptions, meta: EntityMetadata): boolean; - findVirtual( - entityName: EntityName, - where: ObjectQuery, - options: FindOptions, - ): Promise[]>; - countVirtual( - entityName: EntityName, - where: ObjectQuery, - options: CountOptions, - ): Promise; - protected findFromVirtual( - entityName: EntityName, - where: ObjectQuery, - options: FindOptions | CountOptions, - type: QueryType, - ): Promise[] | number>; - protected streamFromVirtual( - entityName: EntityName, - where: FilterQuery, - options: StreamOptions, - ): AsyncIterableIterator>; - protected wrapVirtualExpressionInSubquery( - meta: EntityMetadata, - expression: string, - where: FilterQuery, - options: FindOptions, - type: QueryType, - ): Promise; - protected wrapVirtualExpressionInSubqueryStream( - meta: EntityMetadata, - expression: string, - where: FilterQuery, - options: FindOptions, - type: QueryType.SELECT, - ): AsyncIterableIterator; - /** - * Virtual entities have no PKs, so to-many populate joins can't be deduplicated. - * Force balanced strategy to load to-many relations via separate queries. - */ - private forceBalancedStrategy; - mapResult( - result: EntityData, - meta: EntityMetadata, - populate?: PopulateOptions[], - qb?: AnyQueryBuilder, - map?: Dictionary, - ): EntityData | null; - /** - * Maps aliased columns from TPT parent tables back to their original field names. - * TPT parent columns are selected with aliases like `parent_alias__column_name`, - * and need to be renamed back to `column_name` for the result mapper to work. - */ - private mapTPTColumns; - private mapJoinedProps; - /** - * Maps a single property from a joined result row into the relation pojo. - * Handles polymorphic FKs, composite keys, Date parsing, and embedded objects. - */ - private mapJoinedProp; - count(entityName: EntityName, where: any, options?: CountOptions): Promise; - nativeInsert( - entityName: EntityName, - data: EntityDictionary, - options?: NativeInsertUpdateOptions, - ): Promise>; - nativeInsertMany( - entityName: EntityName, - data: EntityDictionary[], - options?: NativeInsertUpdateManyOptions, - transform?: (sql: string) => string, - ): Promise>; - nativeUpdate( - entityName: EntityName, - where: FilterQuery, - data: EntityDictionary, - options?: NativeInsertUpdateOptions & UpsertOptions, - ): Promise>; - nativeUpdateMany( - entityName: EntityName, - where: FilterQuery[], - data: EntityDictionary[], - options?: NativeInsertUpdateManyOptions & UpsertManyOptions, - transform?: (sql: string, params: any[]) => string, - ): Promise>; - nativeDelete( - entityName: EntityName, - where: FilterQuery | string | any, - options?: DeleteOptions, - ): Promise>; - /** - * Fast comparison for collection snapshots that are represented by PK arrays. - * Compares scalars via `===` and fallbacks to Utils.equals()` for more complex types like Buffer. - * Always expects the same length of the arrays, since we only compare PKs of the same entity type. - */ - private comparePrimaryKeyArrays; - syncCollections( - collections: Iterable>, - options?: DriverMethodOptions, - ): Promise; - loadFromPivotTable( - prop: EntityProperty, - owners: Primary[][], - where?: FilterQuery, - orderBy?: OrderDefinition, - ctx?: Transaction, - options?: FindOptions, - pivotJoin?: boolean, - ): Promise>; - /** - * Load from a polymorphic M:N pivot table. - */ - protected loadFromPolymorphicPivotTable( - prop: EntityProperty, - owners: Primary[][], - where?: FilterQuery, - orderBy?: OrderDefinition, - ctx?: Transaction, - options?: FindOptions, - pivotJoin?: boolean, - ): Promise>; - /** - * Load from owner side of polymorphic M:N (e.g., Post -> Tags) - */ - protected loadPolymorphicPivotOwnerSide( - prop: EntityProperty, - owners: Primary[][], - where: FilterQuery, - orderBy?: OrderDefinition, - ctx?: Transaction, - options?: FindOptions, - pivotJoin?: boolean, - inverseProp?: EntityProperty, - ): Promise>; - /** - * Load from inverse side of polymorphic M:N (e.g., Tag -> Posts) - * Uses single query with join via virtual relation on pivot. - */ - protected loadPolymorphicPivotInverseSide( - prop: EntityProperty, - owners: Primary[][], - where: FilterQuery, - orderBy?: OrderDefinition, - ctx?: Transaction, - options?: FindOptions, - ): Promise>; - /** - * Build a map from owner PKs to their related entities from pivot table results. - */ - private buildPivotResultMap; - private wrapPopulateFilter; - private getPivotOrderBy; - execute | EntityData[] = EntityData[]>( - query: string | NativeQueryBuilder | RawQueryFragment, - params?: any[], - method?: 'all' | 'get' | 'run', - ctx?: Transaction, - loggerContext?: LoggingOptions, - ): Promise; - stream( - entityName: EntityName, - where: FilterQuery, - options: StreamOptions, - ): AsyncIterableIterator; - /** - * 1:1 owner side needs to be marked for population so QB auto-joins the owner id - */ - protected autoJoinOneToOneOwner( - meta: EntityMetadata, - populate: PopulateOptions[], - fields?: readonly EntityField[], - ): PopulateOptions[]; - /** - * @internal - */ - joinedProps( - meta: EntityMetadata, - populate: readonly PopulateOptions[], - options?: { - strategy?: Options['loadStrategy']; - }, - ): PopulateOptions[]; - /** - * @internal - */ - mergeJoinedResult( - rawResults: EntityData[], - meta: EntityMetadata, - joinedProps: PopulateOptions[], - ): EntityData[]; - protected shouldHaveColumn( - meta: EntityMetadata, - prop: EntityProperty, - populate: readonly PopulateOptions[], - fields?: readonly InternalField[], - exclude?: readonly InternalField[], - ): boolean; - protected getFieldsForJoinedLoad( - qb: AnyQueryBuilder, - meta: EntityMetadata, - options: FieldsForJoinedLoadOptions, - ): InternalField[]; - /** - * Adds LEFT JOINs and fields for TPT polymorphic loading when populating a relation to a TPT base class. - * @internal - */ - protected addTPTPolymorphicJoinsForRelation( - qb: AnyQueryBuilder, - meta: EntityMetadata, - baseAlias: string, - fields: InternalField[], - ): void; - /** - * Find the alias for a TPT child table in the query builder. - * @internal - */ - protected findTPTChildAlias(qb: AnyQueryBuilder, childMeta: EntityMetadata): string | undefined; - /** - * Builds a CASE WHEN expression for TPT discriminator. - * Determines concrete entity type based on which child table has a non-null PK. - * @internal - */ - buildTPTDiscriminatorExpression( - meta: EntityMetadata, - descendants: EntityMetadata[], - aliasMap: Dictionary, - baseAlias: string, - ): Raw; - /** - * Maps TPT child-specific fields during hydration. - * When a relation points to a TPT base class, the actual entity might be a child class. - * This method reads the discriminator to determine the concrete type and maps child-specific fields. - * @internal - */ - protected mapTPTChildFields( - relationPojo: EntityData, - meta: EntityMetadata, - relationAlias: string, - qb: AnyQueryBuilder, - root: EntityData, - ): void; - /** - * @internal - */ - mapPropToFieldNames( - qb: AnyQueryBuilder, - prop: EntityProperty, - tableAlias: string, - meta: EntityMetadata, - schema?: string, - explicitFields?: readonly InternalField[], - ): InternalField[]; - /** @internal */ - createQueryBuilder( - entityName: EntityName | AnyQueryBuilder, - ctx?: Transaction, - preferredConnectionType?: ConnectionType, - convertCustomTypes?: boolean, - loggerContext?: LoggingOptions, - alias?: string, - em?: SqlEntityManager, - ): AnyQueryBuilder; - protected resolveConnectionType(args: { ctx?: Transaction; connectionType?: ConnectionType }): ConnectionType; - protected extractManyToMany(meta: EntityMetadata, data: EntityDictionary): EntityData; - protected processManyToMany( - meta: EntityMetadata, - pks: Primary[], - collections: EntityData, - clear: boolean, - options?: DriverMethodOptions, - ): Promise; - lockPessimistic(entity: T, options: LockOptions): Promise; - protected buildPopulateWhere( - meta: EntityMetadata, - joinedProps: PopulateOptions[], - options: Pick, 'populateWhere'>, - ): ObjectQuery; - /** - * Builds a UNION ALL (or UNION) subquery from `unionWhere` branches and merges it - * into the main WHERE as `pk IN (branch_1 UNION ALL branch_2 ...)`. - * Each branch is planned independently by the database, enabling per-table index usage. - */ - protected applyUnionWhere( - meta: EntityMetadata, - where: ObjectQuery, - options: FindOptions | CountOptions | NativeInsertUpdateOptions | DeleteOptions, - forDml?: boolean, - ): Promise>; - protected buildOrderBy( - qb: AnyQueryBuilder, - meta: EntityMetadata, - populate: PopulateOptions[], - options: Pick, 'strategy' | 'orderBy' | 'populateOrderBy'>, - ): QueryOrderMap[]; - protected buildPopulateOrderBy( - qb: AnyQueryBuilder, - meta: EntityMetadata, - populateOrderBy: QueryOrderMap[], - parentPath: string, - explicit: boolean, - parentAlias?: string, - ): QueryOrderMap[]; - protected buildJoinedPropsOrderBy( - qb: AnyQueryBuilder, - meta: EntityMetadata, - populate: PopulateOptions[], - options?: Pick, 'strategy' | 'orderBy' | 'populateOrderBy'>, - parentPath?: string, - ): QueryOrderMap[]; - private buildToManyOrderBy; - protected normalizeFields(fields: InternalField[], prefix?: string): string[]; - protected processField( - meta: EntityMetadata, - prop: EntityProperty | undefined, - field: string, - ret: InternalField[], - ): void; - protected buildFields( - meta: EntityMetadata, - populate: PopulateOptions[], - joinedProps: PopulateOptions[], - qb: AnyQueryBuilder, - alias: string, - options: Pick, 'strategy' | 'fields' | 'exclude'>, - schema?: string, - ): InternalField[]; -} -interface FieldsForJoinedLoadOptions { - explicitFields?: readonly InternalField[]; - exclude?: readonly InternalField[]; - populate?: readonly PopulateOptions[]; - strategy?: Options['loadStrategy']; - populateWhere?: FindOptions['populateWhere']; - populateFilter?: FindOptions['populateFilter']; - parentTableAlias: string; - parentJoinPath?: string; - count?: boolean; - schema?: string; -} -export {}; diff --git a/node_modules/@mikro-orm/sql/AbstractSqlDriver.js b/node_modules/@mikro-orm/sql/AbstractSqlDriver.js deleted file mode 100644 index fa19412..0000000 --- a/node_modules/@mikro-orm/sql/AbstractSqlDriver.js +++ /dev/null @@ -1,2123 +0,0 @@ -import { - ALIAS_REPLACEMENT_RE, - DatabaseDriver, - EntityManagerType, - getLoadingStrategy, - getOnConflictFields, - getOnConflictReturningFields, - helper, - isRaw, - LoadStrategy, - parseJsonSafe, - PolymorphicRef, - QueryFlag, - QueryHelper, - QueryOrder, - raw, - RawQueryFragment, - ReferenceKind, - Utils, -} from '@mikro-orm/core'; -import { QueryBuilder } from './query/QueryBuilder.js'; -import { JoinType, QueryType } from './query/enums.js'; -import { SqlEntityManager } from './SqlEntityManager.js'; -import { PivotCollectionPersister } from './PivotCollectionPersister.js'; -/** Base class for SQL database drivers, implementing find/insert/update/delete using QueryBuilder. */ -export class AbstractSqlDriver extends DatabaseDriver { - [EntityManagerType]; - connection; - replicas = []; - platform; - constructor(config, platform, connection, connector) { - super(config, connector); - this.connection = new connection(this.config); - this.replicas = this.createReplicas(conf => new connection(this.config, conf, 'read')); - this.platform = platform; - } - getPlatform() { - return this.platform; - } - /** Evaluates a formula callback, handling both string and Raw return values. */ - evaluateFormula(formula, columns, table) { - const result = formula(columns, table); - return isRaw(result) ? this.platform.formatQuery(result.sql, result.params) : result; - } - /** For TPT entities, returns ownProps (columns in this table); otherwise returns all props. */ - getTableProps(meta) { - return meta.inheritanceType === 'tpt' && meta.ownProps ? meta.ownProps : meta.props; - } - /** Creates a FormulaTable object for use in formula callbacks. */ - createFormulaTable(alias, meta, schema) { - const effectiveSchema = schema ?? (meta.schema !== '*' ? meta.schema : undefined); - const qualifiedName = effectiveSchema ? `${effectiveSchema}.${meta.tableName}` : meta.tableName; - return { alias, name: meta.tableName, schema: effectiveSchema, qualifiedName, toString: () => alias }; - } - validateSqlOptions(options) { - if (options.collation != null && typeof options.collation !== 'string') { - throw new Error( - 'Collation option for SQL drivers must be a string (collation name). Use a CollationOptions object only with MongoDB.', - ); - } - if (options.indexHint != null && typeof options.indexHint !== 'string') { - throw new Error( - "indexHint for SQL drivers must be a string (e.g. 'force index(my_index)'). Use an object only with MongoDB.", - ); - } - } - createEntityManager(useContext) { - const EntityManagerClass = this.config.get('entityManager', SqlEntityManager); - return new EntityManagerClass(this.config, this, this.metadata, useContext); - } - async createQueryBuilderFromOptions(meta, where, options = {}) { - const connectionType = this.resolveConnectionType({ ctx: options.ctx, connectionType: options.connectionType }); - const populate = this.autoJoinOneToOneOwner(meta, options.populate, options.fields); - const joinedProps = this.joinedProps(meta, populate, options); - const schema = this.getSchemaName(meta, options); - const qb = this.createQueryBuilder( - meta.class, - options.ctx, - connectionType, - false, - options.logging, - undefined, - options.em, - ).withSchema(schema); - const fields = this.buildFields(meta, populate, joinedProps, qb, qb.alias, options, schema); - const orderBy = this.buildOrderBy(qb, meta, populate, options); - const populateWhere = this.buildPopulateWhere(meta, joinedProps, options); - Utils.asArray(options.flags).forEach(flag => qb.setFlag(flag)); - if (Utils.isPrimaryKey(where, meta.compositePK)) { - where = { [Utils.getPrimaryKeyHash(meta.primaryKeys)]: where }; - } - this.validateSqlOptions(options); - const { first, last, before, after } = options; - const isCursorPagination = [first, last, before, after].some(v => v != null); - qb.state.resolvedPopulateWhere = options._populateWhere; - qb.select(fields) - // only add populateWhere if we are populate-joining, as this will be used to add `on` conditions - .populate( - populate, - joinedProps.length > 0 ? populateWhere : undefined, - joinedProps.length > 0 ? options.populateFilter : undefined, - ) - .where(where) - .groupBy(options.groupBy) - .having(options.having) - .indexHint(options.indexHint) - .collation(options.collation) - .comment(options.comments) - .hintComment(options.hintComments); - if (isCursorPagination) { - const { orderBy: newOrderBy, where } = this.processCursorOptions(meta, options, orderBy); - qb.andWhere(where).orderBy(newOrderBy); - } else { - qb.orderBy(orderBy); - } - if (options.limit != null || options.offset != null) { - qb.limit(options.limit, options.offset); - } - if (options.lockMode) { - qb.setLockMode(options.lockMode, options.lockTableAliases); - } - if (options.em) { - await qb.applyJoinedFilters(options.em, options.filters); - } - return qb; - } - async find(entityName, where, options = {}) { - options = { populate: [], orderBy: [], ...options }; - const meta = this.metadata.get(entityName); - if (meta.virtual) { - return this.findVirtual(entityName, where, options); - } - if (options.unionWhere?.length) { - where = await this.applyUnionWhere(meta, where, options); - } - const qb = await this.createQueryBuilderFromOptions(meta, where, options); - const result = await this.rethrow(qb.execute('all')); - if (options.last && !options.first) { - result.reverse(); - } - return result; - } - async findOne(entityName, where, options) { - const opts = { populate: [], ...options }; - const meta = this.metadata.find(entityName); - const populate = this.autoJoinOneToOneOwner(meta, opts.populate, opts.fields); - const joinedProps = this.joinedProps(meta, populate, options); - const hasToManyJoins = joinedProps.some(hint => this.hasToManyJoins(hint, meta)); - if (joinedProps.length === 0 || !hasToManyJoins) { - opts.limit = 1; - } - if (opts.limit > 0 && !opts.flags?.includes(QueryFlag.DISABLE_PAGINATE)) { - opts.flags ??= []; - opts.flags.push(QueryFlag.DISABLE_PAGINATE); - } - const res = await this.find(entityName, where, opts); - return res[0] || null; - } - hasToManyJoins(hint, meta) { - const [propName] = hint.field.split(':', 2); - const prop = meta.properties[propName]; - if (prop && [ReferenceKind.ONE_TO_MANY, ReferenceKind.MANY_TO_MANY].includes(prop.kind)) { - return true; - } - if (hint.children && prop.targetMeta) { - return hint.children.some(hint => this.hasToManyJoins(hint, prop.targetMeta)); - } - return false; - } - async findVirtual(entityName, where, options) { - return this.findFromVirtual(entityName, where, options, QueryType.SELECT); - } - async countVirtual(entityName, where, options) { - return this.findFromVirtual(entityName, where, options, QueryType.COUNT); - } - async findFromVirtual(entityName, where, options, type) { - const meta = this.metadata.get(entityName); - /* v8 ignore next */ - if (!meta.expression) { - return type === QueryType.SELECT ? [] : 0; - } - if (typeof meta.expression === 'string') { - return this.wrapVirtualExpressionInSubquery(meta, meta.expression, where, options, type); - } - const em = this.createEntityManager(); - em.setTransactionContext(options.ctx); - const res = meta.expression(em, where, options); - if (typeof res === 'string') { - return this.wrapVirtualExpressionInSubquery(meta, res, where, options, type); - } - if (res instanceof QueryBuilder) { - return this.wrapVirtualExpressionInSubquery(meta, res.getFormattedQuery(), where, options, type); - } - if (res instanceof RawQueryFragment) { - const expr = this.platform.formatQuery(res.sql, res.params); - return this.wrapVirtualExpressionInSubquery(meta, expr, where, options, type); - } - /* v8 ignore next */ - return res; - } - async *streamFromVirtual(entityName, where, options) { - const meta = this.metadata.get(entityName); - /* v8 ignore next */ - if (!meta.expression) { - return; - } - if (typeof meta.expression === 'string') { - yield* this.wrapVirtualExpressionInSubqueryStream(meta, meta.expression, where, options, QueryType.SELECT); - return; - } - const em = this.createEntityManager(); - em.setTransactionContext(options.ctx); - const res = meta.expression(em, where, options, true); - if (typeof res === 'string') { - yield* this.wrapVirtualExpressionInSubqueryStream(meta, res, where, options, QueryType.SELECT); - return; - } - if (res instanceof QueryBuilder) { - yield* this.wrapVirtualExpressionInSubqueryStream( - meta, - res.getFormattedQuery(), - where, - options, - QueryType.SELECT, - ); - return; - } - if (res instanceof RawQueryFragment) { - const expr = this.platform.formatQuery(res.sql, res.params); - yield* this.wrapVirtualExpressionInSubqueryStream(meta, expr, where, options, QueryType.SELECT); - return; - } - /* v8 ignore next */ - yield* res; - } - async wrapVirtualExpressionInSubquery(meta, expression, where, options, type) { - const qb = await this.createQueryBuilderFromOptions(meta, where, this.forceBalancedStrategy(options)); - qb.setFlag(QueryFlag.DISABLE_PAGINATE); - const isCursorPagination = [options.first, options.last, options.before, options.after].some(v => v != null); - const native = qb.getNativeQuery(false); - if (type === QueryType.COUNT) { - native.clear('select').clear('limit').clear('offset').count(); - } - const asKeyword = this.platform.usesAsKeyword() ? ' as ' : ' '; - native.from(raw(`(${expression})${asKeyword}${this.platform.quoteIdentifier(qb.alias)}`)); - const query = native.compile(); - const res = await this.execute(query.sql, query.params, 'all', options.ctx); - if (type === QueryType.COUNT) { - return res[0].count; - } - if (isCursorPagination && !options.first && !!options.last) { - res.reverse(); - } - return res.map(row => this.mapResult(row, meta)); - } - async *wrapVirtualExpressionInSubqueryStream(meta, expression, where, options, type) { - const qb = await this.createQueryBuilderFromOptions(meta, where, this.forceBalancedStrategy(options)); - qb.unsetFlag(QueryFlag.DISABLE_PAGINATE); - const native = qb.getNativeQuery(false); - const asKeyword = this.platform.usesAsKeyword() ? ' as ' : ' '; - native.from(raw(`(${expression})${asKeyword}${this.platform.quoteIdentifier(qb.alias)}`)); - const query = native.compile(); - const connectionType = this.resolveConnectionType({ ctx: options.ctx, connectionType: options.connectionType }); - const res = this.getConnection(connectionType).stream(query.sql, query.params, options.ctx, options.loggerContext); - for await (const row of res) { - yield this.mapResult(row, meta); - } - } - /** - * Virtual entities have no PKs, so to-many populate joins can't be deduplicated. - * Force balanced strategy to load to-many relations via separate queries. - */ - forceBalancedStrategy(options) { - const clearStrategy = hints => { - return hints.map(hint => ({ - ...hint, - strategy: undefined, - children: hint.children ? clearStrategy(hint.children) : undefined, - })); - }; - const opts = { ...options, strategy: 'balanced' }; - if (Array.isArray(opts.populate)) { - opts.populate = clearStrategy(opts.populate); - } - return opts; - } - mapResult(result, meta, populate = [], qb, map = {}) { - // For TPT inheritance, map aliased parent table columns back to their field names - if (qb && meta.inheritanceType === 'tpt' && meta.tptParent) { - this.mapTPTColumns(result, meta, qb); - } - // For TPT polymorphic queries (querying a base class), map child table fields - if (qb && meta.inheritanceType === 'tpt' && meta.allTPTDescendants?.length) { - const mainAlias = qb.mainAlias?.aliasName ?? 'e0'; - this.mapTPTChildFields(result, meta, mainAlias, qb, result); - } - const ret = super.mapResult(result, meta); - /* v8 ignore next */ - if (!ret) { - return null; - } - if (qb) { - // here we map the aliased results (cartesian product) to an object graph - this.mapJoinedProps(ret, meta, populate, qb, ret, map); - } - return ret; - } - /** - * Maps aliased columns from TPT parent tables back to their original field names. - * TPT parent columns are selected with aliases like `parent_alias__column_name`, - * and need to be renamed back to `column_name` for the result mapper to work. - */ - mapTPTColumns(result, meta, qb) { - const tptAliases = qb.state.tptAlias; - // Walk up the TPT hierarchy - let parentMeta = meta.tptParent; - while (parentMeta) { - const parentAlias = tptAliases[parentMeta.className]; - if (parentAlias) { - // Rename columns from this parent table - for (const prop of parentMeta.ownProps) { - for (const fieldName of prop.fieldNames) { - const aliasedKey = `${parentAlias}__${fieldName}`; - if (aliasedKey in result) { - // Copy the value to the unaliased field name and remove the aliased key - result[fieldName] = result[aliasedKey]; - delete result[aliasedKey]; - } - } - } - } - parentMeta = parentMeta.tptParent; - } - } - mapJoinedProps(result, meta, populate, qb, root, map, parentJoinPath) { - const joinedProps = this.joinedProps(meta, populate); - joinedProps.forEach(hint => { - const [propName, ref] = hint.field.split(':', 2); - const prop = meta.properties[propName]; - /* v8 ignore next */ - if (!prop) { - return; - } - // Polymorphic to-one: iterate targets, find the matching one, build entity from its columns. - // Skip :ref hints — no JOINs were created, so the FK reference is already set by the result mapper. - if ( - prop.polymorphic && - prop.polymorphTargets?.length && - !ref && - [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) - ) { - const basePath = parentJoinPath ? `${parentJoinPath}.${prop.name}` : `${meta.name}.${prop.name}`; - const pathPrefix = !parentJoinPath ? '[populate]' : ''; - let matched = false; - for (const targetMeta of prop.polymorphTargets) { - const targetPath = `${pathPrefix}${basePath}[${targetMeta.className}]`; - const relationAlias = qb.getAliasForJoinPath(targetPath, { matchPopulateJoins: true }); - const meta2 = targetMeta; - const targetProps = meta2.props.filter(p => this.platform.shouldHaveColumn(p, hint.children || [])); - const hasPK = meta2 - .getPrimaryProps() - .every(pk => pk.fieldNames.every(name => root[`${relationAlias}__${name}`] != null)); - if (hasPK && !matched) { - matched = true; - const relationPojo = {}; - const tz = this.platform.getTimezone(); - for (const p of targetProps) { - this.mapJoinedProp(relationPojo, p, relationAlias, root, tz, meta2); - } - // Inject the entity class constructor so that the factory creates the correct type - Object.defineProperty(relationPojo, 'constructor', { - value: meta2.class, - enumerable: false, - configurable: true, - }); - result[prop.name] = relationPojo; - const populateChildren = hint.children || []; - this.mapJoinedProps(relationPojo, meta2, populateChildren, qb, root, map, targetPath); - } - // Clean up aliased columns for ALL targets (even non-matching ones) - for (const p of targetProps) { - for (const name of p.fieldNames) { - delete root[`${relationAlias}__${name}`]; - } - } - } - if (!matched) { - result[prop.name] = null; - } - return; - } - const pivotRefJoin = prop.kind === ReferenceKind.MANY_TO_MANY && ref; - const meta2 = prop.targetMeta; - let path = parentJoinPath ? `${parentJoinPath}.${prop.name}` : `${meta.name}.${prop.name}`; - if (!parentJoinPath) { - path = '[populate]' + path; - } - if (pivotRefJoin) { - path += '[pivot]'; - } - const relationAlias = qb.getAliasForJoinPath(path, { matchPopulateJoins: true }); - /* v8 ignore next */ - if (!relationAlias) { - return; - } - // pivot ref joins via joined strategy need to be handled separately here, as they dont join the target entity - if (pivotRefJoin) { - let item; - if (prop.inverseJoinColumns.length > 1) { - // composite keys - item = prop.inverseJoinColumns.map(name => root[`${relationAlias}__${name}`]); - } else { - const alias = `${relationAlias}__${prop.inverseJoinColumns[0]}`; - item = root[alias]; - } - prop.joinColumns.forEach(name => delete root[`${relationAlias}__${name}`]); - prop.inverseJoinColumns.forEach(name => delete root[`${relationAlias}__${name}`]); - result[prop.name] ??= []; - if (item) { - result[prop.name].push(item); - } - return; - } - const mapToPk = !hint.dataOnly && !!(ref || prop.mapToPk); - const targetProps = mapToPk - ? meta2.getPrimaryProps() - : meta2.props.filter(prop => this.platform.shouldHaveColumn(prop, hint.children || [])); - // If the primary key value for the relation is null, we know we haven't joined to anything - // and therefore we don't return any record (since all values would be null) - const hasPK = meta2.getPrimaryProps().every(pk => - pk.fieldNames.every(name => { - return root[`${relationAlias}__${name}`] != null; - }), - ); - if (!hasPK) { - if ([ReferenceKind.MANY_TO_MANY, ReferenceKind.ONE_TO_MANY].includes(prop.kind)) { - result[prop.name] = []; - } - if ([ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind)) { - result[prop.name] = null; - } - for (const prop of targetProps) { - for (const name of prop.fieldNames) { - delete root[`${relationAlias}__${name}`]; - } - } - return; - } - let relationPojo = {}; - meta2.props - .filter(prop => !ref && prop.persist === false && prop.fieldNames) - .forEach(prop => { - /* v8 ignore next */ - if (prop.fieldNames.length > 1) { - // composite keys - relationPojo[prop.name] = prop.fieldNames.map(name => root[`${relationAlias}__${name}`]); - } else { - const alias = `${relationAlias}__${prop.fieldNames[0]}`; - relationPojo[prop.name] = root[alias]; - } - }); - const tz = this.platform.getTimezone(); - for (const prop of targetProps) { - this.mapJoinedProp(relationPojo, prop, relationAlias, root, tz, meta2); - } - // Handle TPT polymorphic child fields - map fields from child table aliases - this.mapTPTChildFields(relationPojo, meta2, relationAlias, qb, root); - // properties can be mapped to multiple places, e.g. when sharing a column in multiple FKs, - // so we need to delete them after everything is mapped from given level - for (const prop of targetProps) { - for (const name of prop.fieldNames) { - delete root[`${relationAlias}__${name}`]; - } - } - if (mapToPk) { - const tmp = Object.values(relationPojo); - /* v8 ignore next */ - relationPojo = meta2.compositePK ? tmp : tmp[0]; - } - if ([ReferenceKind.MANY_TO_MANY, ReferenceKind.ONE_TO_MANY].includes(prop.kind)) { - result[prop.name] ??= []; - result[prop.name].push(relationPojo); - } else { - result[prop.name] = relationPojo; - } - const populateChildren = hint.children || []; - this.mapJoinedProps(relationPojo, meta2, populateChildren, qb, root, map, path); - }); - } - /** - * Maps a single property from a joined result row into the relation pojo. - * Handles polymorphic FKs, composite keys, Date parsing, and embedded objects. - */ - mapJoinedProp(relationPojo, prop, relationAlias, root, tz, meta, options) { - if (prop.fieldNames.every(name => typeof root[`${relationAlias}__${name}`] === 'undefined')) { - return; - } - if (prop.polymorphic) { - const discriminatorAlias = `${relationAlias}__${prop.fieldNames[0]}`; - const discriminatorValue = root[discriminatorAlias]; - const pkFieldNames = prop.fieldNames.slice(1); - const pkValues = pkFieldNames.map(name => root[`${relationAlias}__${name}`]); - const pkValue = pkValues.length === 1 ? pkValues[0] : pkValues; - if (discriminatorValue != null && pkValue != null) { - relationPojo[prop.name] = new PolymorphicRef(discriminatorValue, pkValue); - } else { - relationPojo[prop.name] = null; - } - } else if (prop.fieldNames.length > 1) { - // composite keys - const fk = prop.fieldNames.map(name => root[`${relationAlias}__${name}`]); - const pk = Utils.mapFlatCompositePrimaryKey(fk, prop); - relationPojo[prop.name] = pk.every(val => val != null) ? pk : null; - } else if (prop.runtimeType === 'Date') { - const alias = `${relationAlias}__${prop.fieldNames[0]}`; - const value = root[alias]; - if ( - tz && - tz !== 'local' && - typeof value === 'string' && - !value.includes('+') && - value.lastIndexOf('-') < 11 && - !value.endsWith('Z') - ) { - relationPojo[prop.name] = this.platform.parseDate(value + tz); - } else if (['string', 'number'].includes(typeof value)) { - relationPojo[prop.name] = this.platform.parseDate(value); - } else { - relationPojo[prop.name] = value; - } - } else { - const alias = `${relationAlias}__${prop.fieldNames[0]}`; - relationPojo[prop.name] = root[alias]; - if (prop.kind === ReferenceKind.EMBEDDED && (prop.object || meta.embeddable)) { - const item = parseJsonSafe(relationPojo[prop.name]); - if (Array.isArray(item)) { - relationPojo[prop.name] = item.map(row => - row == null ? row : this.comparator.mapResult(prop.targetMeta, row), - ); - } else { - relationPojo[prop.name] = item == null ? item : this.comparator.mapResult(prop.targetMeta, item); - } - } - } - if (options?.deleteFromRoot) { - for (const name of prop.fieldNames) { - delete root[`${relationAlias}__${name}`]; - } - } - } - async count(entityName, where, options = {}) { - const meta = this.metadata.get(entityName); - if (meta.virtual) { - return this.countVirtual(entityName, where, options); - } - if (options.unionWhere?.length) { - where = await this.applyUnionWhere(meta, where, options); - } - options = { populate: [], ...options }; - const populate = options.populate; - const joinedProps = this.joinedProps(meta, populate, options); - const schema = this.getSchemaName(meta, options); - const qb = this.createQueryBuilder(entityName, options.ctx, options.connectionType, false, options.logging); - const populateWhere = this.buildPopulateWhere(meta, joinedProps, options); - if (meta && !Utils.isEmpty(populate)) { - this.buildFields(meta, populate, joinedProps, qb, qb.alias, options, schema); - } - this.validateSqlOptions(options); - qb.state.resolvedPopulateWhere = options._populateWhere; - qb.indexHint(options.indexHint) - .collation(options.collation) - .comment(options.comments) - .hintComment(options.hintComments) - .groupBy(options.groupBy) - .having(options.having) - .populate( - populate, - joinedProps.length > 0 ? populateWhere : undefined, - joinedProps.length > 0 ? options.populateFilter : undefined, - ) - .withSchema(schema) - .where(where); - if (options.em) { - await qb.applyJoinedFilters(options.em, options.filters); - } - return this.rethrow(qb.getCount()); - } - async nativeInsert(entityName, data, options = {}) { - options.convertCustomTypes ??= true; - const meta = this.metadata.get(entityName); - const collections = this.extractManyToMany(meta, data); - const qb = this.createQueryBuilder( - entityName, - options.ctx, - 'write', - options.convertCustomTypes, - options.loggerContext, - ).withSchema(this.getSchemaName(meta, options)); - const res = await this.rethrow(qb.insert(data).execute('run', false)); - res.row = res.row || {}; - let pk; - if (meta.primaryKeys.length > 1) { - // owner has composite pk - pk = Utils.getPrimaryKeyCond(data, meta.primaryKeys); - } else { - /* v8 ignore next */ - res.insertId = data[meta.primaryKeys[0]] ?? res.insertId ?? res.row[meta.primaryKeys[0]]; - if (options.convertCustomTypes && meta?.getPrimaryProp().customType) { - pk = [meta.getPrimaryProp().customType.convertToDatabaseValue(res.insertId, this.platform)]; - } else { - pk = [res.insertId]; - } - } - await this.processManyToMany(meta, pk, collections, false, options); - return res; - } - async nativeInsertMany(entityName, data, options = {}, transform) { - options.processCollections ??= true; - options.convertCustomTypes ??= true; - const entityMeta = this.metadata.get(entityName); - const meta = entityMeta.inheritanceType === 'tpt' ? entityMeta : entityMeta.root; - const collections = options.processCollections ? data.map(d => this.extractManyToMany(meta, d)) : []; - const pks = this.getPrimaryKeyFields(meta); - const set = new Set(); - data.forEach(row => Utils.keys(row).forEach(k => set.add(k))); - const props = [...set].map(name => meta.properties[name] ?? { name, fieldNames: [name] }); - // For STI with conflicting fieldNames, include all alternative columns - let fields = Utils.flatten(props.map(prop => prop.stiFieldNames ?? prop.fieldNames)); - const duplicates = Utils.findDuplicates(fields); - const params = []; - if (duplicates.length) { - fields = Utils.unique(fields); - } - const tableName = this.getTableName(meta, options); - let sql = `insert into ${tableName} `; - sql += - fields.length > 0 - ? '(' + fields.map(k => this.platform.quoteIdentifier(k)).join(', ') + ')' - : `(${this.platform.quoteIdentifier(pks[0])})`; - if (this.platform.usesOutputStatement()) { - const returningProps = this.getTableProps(meta) - .filter(prop => (prop.persist !== false && prop.defaultRaw) || prop.autoincrement || prop.generated) - .filter(prop => !(prop.name in data[0]) || isRaw(data[0][prop.name])); - const returningFields = Utils.flatten(returningProps.map(prop => prop.fieldNames)); - sql += - returningFields.length > 0 - ? ` output ${returningFields.map(field => 'inserted.' + this.platform.quoteIdentifier(field)).join(', ')}` - : ''; - } - if (fields.length > 0 || this.platform.usesDefaultKeyword()) { - sql += ' values '; - } else { - sql += ' ' + data.map(() => `select null as ${this.platform.quoteIdentifier(pks[0])}`).join(' union all '); - } - const addParams = (prop, row) => { - const rowValue = row[prop.name]; - if (prop.nullable && rowValue === null) { - params.push(null); - return; - } - let value = rowValue ?? prop.default; - if (prop.kind === ReferenceKind.EMBEDDED && prop.object) { - if (prop.array && value) { - value = this.platform.cloneEmbeddable(value); - for (let i = 0; i < value.length; i++) { - const item = value[i]; - value[i] = this.mapDataToFieldNames(item, false, prop.embeddedProps, options.convertCustomTypes); - } - } else { - value = this.mapDataToFieldNames(value, false, prop.embeddedProps, options.convertCustomTypes); - } - } - if (typeof value === 'undefined' && this.platform.usesDefaultKeyword()) { - params.push(raw('default')); - return; - } - if (options.convertCustomTypes && prop.customType) { - params.push( - prop.customType.convertToDatabaseValue(value, this.platform, { key: prop.name, mode: 'query-data' }), - ); - return; - } - params.push(value); - }; - if (fields.length > 0 || this.platform.usesDefaultKeyword()) { - sql += data - .map(row => { - const keys = []; - const usedDups = []; - props.forEach(prop => { - // For STI with conflicting fieldNames, use discriminator to determine which field gets value - if (prop.stiFieldNames && prop.stiFieldNameMap && meta.discriminatorColumn) { - const activeField = prop.stiFieldNameMap[row[meta.discriminatorColumn]]; - for (const field of prop.stiFieldNames) { - params.push(field === activeField ? row[prop.name] : null); - keys.push('?'); - } - return; - } - if (prop.fieldNames.length > 1) { - const newFields = []; - let rawParam; - const target = row[prop.name]; - if (prop.polymorphic && target instanceof PolymorphicRef) { - rawParam = target.toTuple(); - } else { - rawParam = Utils.asArray(target) ?? prop.fieldNames.map(() => null); - } - // Deep flatten nested arrays when needed (for deeply nested composite keys like Tag -> Comment -> Post -> User) - const needsFlatten = rawParam.length !== prop.fieldNames.length && rawParam.some(v => Array.isArray(v)); - const allParam = needsFlatten ? Utils.flatten(rawParam, true) : rawParam; - // TODO(v7): instead of making this conditional here, the entity snapshot should respect `ownColumns`, - // but that means changing the compiled PK getters, which might be seen as breaking - const columns = allParam.length > 1 ? prop.fieldNames : prop.ownColumns; - const param = []; - columns.forEach((field, idx) => { - if (usedDups.includes(field)) { - return; - } - newFields.push(field); - param.push(allParam[idx]); - }); - newFields.forEach((field, idx) => { - if (!duplicates.includes(field) || !usedDups.includes(field)) { - params.push(param[idx]); - keys.push('?'); - usedDups.push(field); - } - }); - } else { - const field = prop.fieldNames[0]; - if (!duplicates.includes(field) || !usedDups.includes(field)) { - if ( - prop.customType && - !prop.object && - 'convertToDatabaseValueSQL' in prop.customType && - row[prop.name] != null && - !isRaw(row[prop.name]) - ) { - keys.push(prop.customType.convertToDatabaseValueSQL('?', this.platform)); - } else { - keys.push('?'); - } - addParams(prop, row); - usedDups.push(field); - } - } - }); - return '(' + (keys.join(', ') || 'default') + ')'; - }) - .join(', '); - } - if (meta && this.platform.usesReturningStatement()) { - const returningProps = this.getTableProps(meta) - .filter(prop => (prop.persist !== false && prop.defaultRaw) || prop.autoincrement || prop.generated) - .filter(prop => !(prop.name in data[0]) || isRaw(data[0][prop.name])); - const returningFields = Utils.flatten(returningProps.map(prop => prop.fieldNames)); - /* v8 ignore next */ - sql += - returningFields.length > 0 - ? ` returning ${returningFields.map(field => this.platform.quoteIdentifier(field)).join(', ')}` - : ''; - } - if (transform) { - sql = transform(sql); - } - const res = await this.execute(sql, params, 'run', options.ctx, options.loggerContext); - let pk; - /* v8 ignore next */ - if (pks.length > 1) { - // owner has composite pk - pk = data.map(d => Utils.getPrimaryKeyCond(d, pks)); - } else { - res.row ??= {}; - res.rows ??= []; - pk = data.map((d, i) => d[pks[0]] ?? res.rows[i]?.[pks[0]]).map(d => [d]); - res.insertId = res.insertId || res.row[pks[0]]; - } - for (let i = 0; i < collections.length; i++) { - await this.processManyToMany(meta, pk[i], collections[i], false, options); - } - return res; - } - async nativeUpdate(entityName, where, data, options = {}) { - options.convertCustomTypes ??= true; - const meta = this.metadata.get(entityName); - const pks = this.getPrimaryKeyFields(meta); - const collections = this.extractManyToMany(meta, data); - let res = { affectedRows: 0, insertId: 0, row: {} }; - if (Utils.isPrimaryKey(where) && pks.length === 1) { - /* v8 ignore next */ - where = { [meta.primaryKeys[0] ?? pks[0]]: where }; - } - if (!options.upsert && options.unionWhere?.length) { - where = await this.applyUnionWhere(meta, where, options, true); - } - if (Utils.hasObjectKeys(data)) { - const qb = this.createQueryBuilder( - entityName, - options.ctx, - 'write', - options.convertCustomTypes, - options.loggerContext, - ).withSchema(this.getSchemaName(meta, options)); - if (options.upsert) { - /* v8 ignore next */ - const uniqueFields = - options.onConflictFields ?? (Utils.isPlainObject(where) ? Utils.keys(where) : meta.primaryKeys); - const returning = getOnConflictReturningFields(meta, data, uniqueFields, options); - qb.insert(data).onConflict(uniqueFields).returning(returning); - if (!options.onConflictAction || options.onConflictAction === 'merge') { - const fields = getOnConflictFields(meta, data, uniqueFields, options); - qb.merge(fields); - } - if (options.onConflictAction === 'ignore') { - qb.ignore(); - } - if (options.onConflictWhere) { - qb.where(options.onConflictWhere); - } - } else { - qb.update(data).where(where); - // reload generated columns and version fields - const returning = []; - meta.props - .filter(prop => (prop.generated && !prop.primary) || prop.version) - .forEach(prop => returning.push(prop.name)); - qb.returning(returning); - } - res = await this.rethrow(qb.execute('run', false)); - } - /* v8 ignore next */ - const pk = pks.map(pk => Utils.extractPK(data[pk] || where, meta)); - await this.processManyToMany(meta, pk, collections, true, options); - return res; - } - async nativeUpdateMany(entityName, where, data, options = {}, transform) { - options.processCollections ??= true; - options.convertCustomTypes ??= true; - const meta = this.metadata.get(entityName); - if (options.upsert) { - const uniqueFields = - options.onConflictFields ?? - (Utils.isPlainObject(where[0]) - ? Object.keys(where[0]).flatMap(key => Utils.splitPrimaryKeys(key)) - : meta.primaryKeys); - const qb = this.createQueryBuilder( - entityName, - options.ctx, - 'write', - options.convertCustomTypes, - options.loggerContext, - ).withSchema(this.getSchemaName(meta, options)); - const returning = getOnConflictReturningFields(meta, data[0], uniqueFields, options); - qb.insert(data).onConflict(uniqueFields).returning(returning); - if (!options.onConflictAction || options.onConflictAction === 'merge') { - const fields = getOnConflictFields(meta, data[0], uniqueFields, options); - qb.merge(fields); - } - if (options.onConflictAction === 'ignore') { - qb.ignore(); - } - if (options.onConflictWhere) { - qb.where(options.onConflictWhere); - } - return this.rethrow(qb.execute('run', false)); - } - const collections = options.processCollections ? data.map(d => this.extractManyToMany(meta, d)) : []; - const keys = new Set(); - const fields = new Set(); - const returning = new Set(); - for (const row of data) { - for (const k of Utils.keys(row)) { - keys.add(k); - if (isRaw(row[k])) { - returning.add(k); - } - } - } - // reload generated columns and version fields - meta.props.filter(prop => prop.generated || prop.version || prop.primary).forEach(prop => returning.add(prop.name)); - const pkCond = Utils.flatten(meta.primaryKeys.map(pk => meta.properties[pk].fieldNames)) - .map(pk => `${this.platform.quoteIdentifier(pk)} = ?`) - .join(' and '); - const params = []; - let sql = `update ${this.getTableName(meta, options)} set `; - const addParams = (prop, value) => { - if (prop.kind === ReferenceKind.EMBEDDED && prop.object) { - if (prop.array && value) { - for (let i = 0; i < value.length; i++) { - const item = value[i]; - value[i] = this.mapDataToFieldNames(item, false, prop.embeddedProps, options.convertCustomTypes); - } - } else { - value = this.mapDataToFieldNames(value, false, prop.embeddedProps, options.convertCustomTypes); - } - } - params.push(value); - }; - for (const key of keys) { - const prop = meta.properties[key] ?? meta.root.properties[key]; - if (prop.polymorphic && prop.fieldNames.length > 1) { - for (let idx = 0; idx < data.length; idx++) { - const rowValue = data[idx][key]; - if (rowValue instanceof PolymorphicRef) { - data[idx][key] = rowValue.toTuple(); - } - } - } - prop.fieldNames.forEach((fieldName, fieldNameIdx) => { - if (fields.has(fieldName) || (prop.ownColumns && !prop.ownColumns.includes(fieldName))) { - return; - } - fields.add(fieldName); - sql += `${this.platform.quoteIdentifier(fieldName)} = case`; - where.forEach((cond, idx) => { - if (key in data[idx]) { - const pks = Utils.getOrderedPrimaryKeys(cond, meta); - sql += ` when (${pkCond}) then `; - if ( - prop.customType && - !prop.object && - 'convertToDatabaseValueSQL' in prop.customType && - data[idx][prop.name] != null && - !isRaw(data[idx][key]) - ) { - sql += prop.customType.convertToDatabaseValueSQL('?', this.platform); - } else { - sql += '?'; - } - params.push(...pks); - addParams(prop, prop.fieldNames.length > 1 ? data[idx][key]?.[fieldNameIdx] : data[idx][key]); - } - }); - sql += ` else ${this.platform.quoteIdentifier(fieldName)} end, `; - return sql; - }); - } - if (meta.versionProperty) { - const versionProperty = meta.properties[meta.versionProperty]; - const quotedFieldName = this.platform.quoteIdentifier(versionProperty.fieldNames[0]); - sql += `${quotedFieldName} = `; - if (versionProperty.runtimeType === 'Date') { - sql += this.platform.getCurrentTimestampSQL(versionProperty.length); - } else { - sql += `${quotedFieldName} + 1`; - } - sql += `, `; - } - sql = sql.substring(0, sql.length - 2) + ' where '; - const pkProps = meta.primaryKeys.concat(...meta.concurrencyCheckKeys); - const pks = Utils.flatten(pkProps.map(pk => meta.properties[pk].fieldNames)); - sql += - pks.length > 1 - ? `(${pks.map(pk => this.platform.quoteIdentifier(pk)).join(', ')})` - : this.platform.quoteIdentifier(pks[0]); - const conds = where.map(cond => { - if (Utils.isPlainObject(cond) && Utils.getObjectKeysSize(cond) === 1) { - cond = Object.values(cond)[0]; - } - if (pks.length > 1) { - pkProps.forEach(pk => { - if (Array.isArray(cond[pk])) { - params.push(...Utils.flatten(cond[pk])); - } else { - params.push(cond[pk]); - } - }); - return `(${Array.from({ length: pks.length }).fill('?').join(', ')})`; - } - params.push(cond); - return '?'; - }); - sql += ` in (${conds.join(', ')})`; - if (this.platform.usesReturningStatement() && returning.size > 0) { - const returningFields = Utils.flatten([...returning].map(prop => meta.properties[prop].fieldNames)); - /* v8 ignore next */ - sql += - returningFields.length > 0 - ? ` returning ${returningFields.map(field => this.platform.quoteIdentifier(field)).join(', ')}` - : ''; - } - if (transform) { - sql = transform(sql, params); - } - const res = await this.rethrow(this.execute(sql, params, 'run', options.ctx, options.loggerContext)); - for (let i = 0; i < collections.length; i++) { - await this.processManyToMany(meta, where[i], collections[i], false, options); - } - return res; - } - async nativeDelete(entityName, where, options = {}) { - const meta = this.metadata.get(entityName); - const pks = this.getPrimaryKeyFields(meta); - if (Utils.isPrimaryKey(where) && pks.length === 1) { - where = { [pks[0]]: where }; - } - if (options.unionWhere?.length) { - where = await this.applyUnionWhere(meta, where, options, true); - } - const qb = this.createQueryBuilder(entityName, options.ctx, 'write', false, options.loggerContext) - .delete(where) - .withSchema(this.getSchemaName(meta, options)); - return this.rethrow(qb.execute('run', false)); - } - /** - * Fast comparison for collection snapshots that are represented by PK arrays. - * Compares scalars via `===` and fallbacks to Utils.equals()` for more complex types like Buffer. - * Always expects the same length of the arrays, since we only compare PKs of the same entity type. - */ - comparePrimaryKeyArrays(a, b) { - for (let i = a.length; i-- !== 0; ) { - if (['number', 'string', 'bigint', 'boolean'].includes(typeof a[i])) { - if (a[i] !== b[i]) { - return false; - } - } else { - if (!Utils.equals(a[i], b[i])) { - return false; - } - } - } - return true; - } - async syncCollections(collections, options) { - const groups = {}; - for (const coll of collections) { - const wrapped = helper(coll.owner); - const meta = wrapped.__meta; - const pks = wrapped.getPrimaryKeys(true); - const snap = coll.getSnapshot(); - const includes = (arr, item) => !!arr.find(i => this.comparePrimaryKeyArrays(i, item)); - const snapshot = snap ? snap.map(item => helper(item).getPrimaryKeys(true)) : []; - const current = coll.getItems(false).map(item => helper(item).getPrimaryKeys(true)); - const deleteDiff = snap ? snapshot.filter(item => !includes(current, item)) : true; - const insertDiff = current.filter(item => !includes(snapshot, item)); - const target = snapshot.filter(item => includes(current, item)).concat(...insertDiff); - const equals = Utils.equals(current, target); - // wrong order if we just delete and insert to the end (only owning sides can have fixed order) - if (coll.property.owner && coll.property.fixedOrder && !equals && Array.isArray(deleteDiff)) { - deleteDiff.length = insertDiff.length = 0; - for (const item of snapshot) { - deleteDiff.push(item); - } - for (const item of current) { - insertDiff.push(item); - } - } - if (coll.property.kind === ReferenceKind.ONE_TO_MANY) { - const cols = coll.property.referencedColumnNames; - const qb = this.createQueryBuilder(coll.property.targetMeta.class, options?.ctx, 'write').withSchema( - this.getSchemaName(meta, options), - ); - if (coll.getSnapshot() === undefined) { - if (coll.property.orphanRemoval) { - const query = qb - .delete({ [coll.property.mappedBy]: pks }) - .andWhere({ [cols.join(Utils.PK_SEPARATOR)]: { $nin: insertDiff } }); - await this.rethrow(query.execute()); - continue; - } - const query = qb - .update({ [coll.property.mappedBy]: null }) - .where({ [coll.property.mappedBy]: pks }) - .andWhere({ [cols.join(Utils.PK_SEPARATOR)]: { $nin: insertDiff } }); - await this.rethrow(query.execute()); - continue; - } - /* v8 ignore next */ - const query = qb - .update({ [coll.property.mappedBy]: pks }) - .where({ [cols.join(Utils.PK_SEPARATOR)]: { $in: insertDiff } }); - await this.rethrow(query.execute()); - continue; - } - const pivotMeta = this.metadata.find(coll.property.pivotEntity); - let schema = pivotMeta.schema; - if (schema === '*') { - if (coll.property.owner) { - schema = wrapped.getSchema() === '*' ? (options?.schema ?? this.config.get('schema')) : wrapped.getSchema(); - } else { - const targetMeta = coll.property.targetMeta; - const targetSchema = (coll[0] ?? snap?.[0]) && helper(coll[0] ?? snap?.[0]).getSchema(); - schema = - targetMeta.schema === '*' - ? (options?.schema ?? targetSchema ?? this.config.get('schema')) - : targetMeta.schema; - } - } else if (schema == null) { - schema = this.config.get('schema'); - } - const tableName = `${schema ?? '_'}.${pivotMeta.tableName}`; - const persister = (groups[tableName] ??= new PivotCollectionPersister( - pivotMeta, - this, - options?.ctx, - schema, - options?.loggerContext, - )); - persister.enqueueUpdate(coll.property, insertDiff, deleteDiff, pks, coll.isInitialized()); - } - for (const persister of Utils.values(groups)) { - await this.rethrow(persister.execute()); - } - } - async loadFromPivotTable(prop, owners, where = {}, orderBy, ctx, options, pivotJoin) { - /* v8 ignore next */ - if (owners.length === 0) { - return {}; - } - const pivotMeta = this.metadata.get(prop.pivotEntity); - if (prop.polymorphic && prop.discriminatorColumn && prop.discriminatorValue) { - return this.loadFromPolymorphicPivotTable(prop, owners, where, orderBy, ctx, options, pivotJoin); - } - const pivotProp1 = pivotMeta.relations[prop.owner ? 1 : 0]; - const pivotProp2 = pivotMeta.relations[prop.owner ? 0 : 1]; - const ownerMeta = pivotProp2.targetMeta; - // The pivot query builder doesn't convert custom types, so we need to manually - // convert owner PKs to DB format for the query and convert result FKs back to - // JS format for consistent key hashing in buildPivotResultMap. - const pkProp = ownerMeta.properties[ownerMeta.primaryKeys[0]]; - const needsConversion = pkProp?.customType?.ensureComparable(ownerMeta, pkProp) && !ownerMeta.compositePK; - let ownerPks = ownerMeta.compositePK ? owners : owners.map(o => o[0]); - if (needsConversion) { - ownerPks = ownerPks.map(v => pkProp.customType.convertToDatabaseValue(v, this.platform, { mode: 'query' })); - } - const cond = { - [pivotProp2.name]: { $in: ownerPks }, - }; - if (!Utils.isEmpty(where)) { - cond[pivotProp1.name] = { ...where }; - } - where = cond; - const populateField = pivotJoin ? `${pivotProp1.name}:ref` : pivotProp1.name; - const populate = this.autoJoinOneToOneOwner(prop.targetMeta, options?.populate ?? [], options?.fields); - const childFields = !Utils.isEmpty(options?.fields) ? options.fields.map(f => `${pivotProp1.name}.${f}`) : []; - const childExclude = !Utils.isEmpty(options?.exclude) ? options.exclude.map(f => `${pivotProp1.name}.${f}`) : []; - const fields = pivotJoin ? [pivotProp1.name, pivotProp2.name] : [pivotProp1.name, pivotProp2.name, ...childFields]; - const res = await this.find(pivotMeta.class, where, { - ctx, - ...options, - fields, - exclude: childExclude, - orderBy: this.getPivotOrderBy(prop, pivotProp1, orderBy, options?.orderBy), - populate: [ - { - field: populateField, - strategy: LoadStrategy.JOINED, - joinType: JoinType.innerJoin, - children: populate, - dataOnly: pivotProp1.mapToPk && !pivotJoin, - }, - ], - populateWhere: undefined, - // @ts-ignore - _populateWhere: 'infer', - populateFilter: this.wrapPopulateFilter(options, pivotProp2.name), - }); - // Convert result FK values back to JS format so key hashing - // in buildPivotResultMap is consistent with the owner keys. - if (needsConversion) { - for (const item of res) { - const fk = item[pivotProp2.name]; - if (fk != null) { - item[pivotProp2.name] = pkProp.customType.convertToJSValue(fk, this.platform); - } - } - } - return this.buildPivotResultMap(owners, res, pivotProp2.name, pivotProp1.name); - } - /** - * Load from a polymorphic M:N pivot table. - */ - async loadFromPolymorphicPivotTable(prop, owners, where = {}, orderBy, ctx, options, pivotJoin) { - const pivotMeta = this.metadata.get(prop.pivotEntity); - // Find the M:1 relation on the pivot pointing to the target entity. - // We exclude virtual polymorphic owner relations (persist: false) and non-M:1 relations. - const inverseProp = pivotMeta.relations.find( - r => r.kind === ReferenceKind.MANY_TO_ONE && r.persist !== false && r.targetMeta === prop.targetMeta, - ); - if (inverseProp) { - return this.loadPolymorphicPivotOwnerSide(prop, owners, where, orderBy, ctx, options, pivotJoin, inverseProp); - } - return this.loadPolymorphicPivotInverseSide(prop, owners, where, orderBy, ctx, options); - } - /** - * Load from owner side of polymorphic M:N (e.g., Post -> Tags) - */ - async loadPolymorphicPivotOwnerSide(prop, owners, where, orderBy, ctx, options, pivotJoin, inverseProp) { - const pivotMeta = this.metadata.get(prop.pivotEntity); - const targetMeta = prop.targetMeta; - // Build condition: discriminator = 'post' AND {discriminator} IN (...) - const cond = { - [prop.discriminatorColumn]: prop.discriminatorValue, - [prop.discriminator]: { $in: owners.length === 1 && owners[0].length === 1 ? owners.map(o => o[0]) : owners }, - }; - if (!Utils.isEmpty(where)) { - cond[inverseProp.name] = { ...where }; - } - const populateField = pivotJoin ? `${inverseProp.name}:ref` : inverseProp.name; - const populate = this.autoJoinOneToOneOwner(targetMeta, options?.populate ?? [], options?.fields); - const childFields = !Utils.isEmpty(options?.fields) ? options.fields.map(f => `${inverseProp.name}.${f}`) : []; - const childExclude = !Utils.isEmpty(options?.exclude) ? options.exclude.map(f => `${inverseProp.name}.${f}`) : []; - const fields = pivotJoin - ? [inverseProp.name, prop.discriminator, prop.discriminatorColumn] - : [inverseProp.name, prop.discriminator, prop.discriminatorColumn, ...childFields]; - const res = await this.find(pivotMeta.class, cond, { - ctx, - ...options, - fields, - exclude: childExclude, - orderBy: this.getPivotOrderBy(prop, inverseProp, orderBy, options?.orderBy), - populate: [ - { - field: populateField, - strategy: LoadStrategy.JOINED, - joinType: JoinType.innerJoin, - children: populate, - dataOnly: inverseProp.mapToPk && !pivotJoin, - }, - ], - populateWhere: undefined, - // @ts-ignore - _populateWhere: 'infer', - populateFilter: this.wrapPopulateFilter(options, inverseProp.name), - }); - return this.buildPivotResultMap(owners, res, prop.discriminator, inverseProp.name); - } - /** - * Load from inverse side of polymorphic M:N (e.g., Tag -> Posts) - * Uses single query with join via virtual relation on pivot. - */ - async loadPolymorphicPivotInverseSide(prop, owners, where, orderBy, ctx, options) { - const pivotMeta = this.metadata.get(prop.pivotEntity); - const targetMeta = prop.targetMeta; - // Find the relation to the entity we're starting from (e.g., Tag_inverse -> Tag) - // Exclude virtual polymorphic owner relations (persist: false) - we want the actual M:N inverse relation - const tagProp = pivotMeta.relations.find(r => r.persist !== false && r.targetMeta !== targetMeta); - // Find the virtual relation to the polymorphic owner (e.g., taggable_Post -> Post) - const ownerRelationName = `${prop.discriminator}_${targetMeta.tableName}`; - const ownerProp = pivotMeta.properties[ownerRelationName]; - // Build condition: discriminator = 'post' AND Tag_inverse IN (tagIds) - const cond = { - [prop.discriminatorColumn]: prop.discriminatorValue, - [tagProp.name]: { $in: owners.length === 1 && owners[0].length === 1 ? owners.map(o => o[0]) : owners }, - }; - if (!Utils.isEmpty(where)) { - cond[ownerRelationName] = { ...where }; - } - const populateField = ownerRelationName; - const populate = this.autoJoinOneToOneOwner(targetMeta, options?.populate ?? [], options?.fields); - const childFields = !Utils.isEmpty(options?.fields) ? options.fields.map(f => `${ownerRelationName}.${f}`) : []; - const childExclude = !Utils.isEmpty(options?.exclude) ? options.exclude.map(f => `${ownerRelationName}.${f}`) : []; - const fields = [ownerRelationName, tagProp.name, prop.discriminatorColumn, ...childFields]; - const res = await this.find(pivotMeta.class, cond, { - ctx, - ...options, - fields, - exclude: childExclude, - orderBy: this.getPivotOrderBy(prop, ownerProp, orderBy, options?.orderBy), - populate: [ - { - field: populateField, - strategy: LoadStrategy.JOINED, - joinType: JoinType.innerJoin, - children: populate, - }, - ], - populateWhere: undefined, - // @ts-ignore - _populateWhere: 'infer', - populateFilter: this.wrapPopulateFilter(options, ownerRelationName), - }); - return this.buildPivotResultMap(owners, res, tagProp.name, ownerRelationName); - } - /** - * Build a map from owner PKs to their related entities from pivot table results. - */ - buildPivotResultMap(owners, results, keyProp, valueProp) { - const map = {}; - for (const owner of owners) { - const key = Utils.getPrimaryKeyHash(owner); - map[key] = []; - } - for (const item of results) { - const key = Utils.getPrimaryKeyHash(Utils.asArray(item[keyProp])); - const entity = item[valueProp]; - if (map[key]) { - map[key].push(entity); - } - } - return map; - } - wrapPopulateFilter(options, propName) { - if (!Utils.isEmpty(options?.populateFilter) || RawQueryFragment.hasObjectFragments(options?.populateFilter)) { - return { [propName]: options?.populateFilter }; - } - return undefined; - } - getPivotOrderBy(prop, pivotProp, orderBy, parentOrderBy) { - if (!Utils.isEmpty(orderBy) || RawQueryFragment.hasObjectFragments(orderBy)) { - return Utils.asArray(orderBy).map(o => ({ [pivotProp.name]: o })); - } - if (prop.kind === ReferenceKind.MANY_TO_MANY && Utils.asArray(parentOrderBy).some(o => o[prop.name])) { - return Utils.asArray(parentOrderBy) - .filter(o => o[prop.name]) - .map(o => ({ [pivotProp.name]: o[prop.name] })); - } - if (!Utils.isEmpty(prop.orderBy) || RawQueryFragment.hasObjectFragments(prop.orderBy)) { - return Utils.asArray(prop.orderBy).map(o => ({ [pivotProp.name]: o })); - } - if (prop.fixedOrder) { - return [{ [prop.fixedOrderColumn]: QueryOrder.ASC }]; - } - return []; - } - async execute(query, params = [], method = 'all', ctx, loggerContext) { - return this.rethrow(this.connection.execute(query, params, method, ctx, loggerContext)); - } - async *stream(entityName, where, options) { - options = { populate: [], orderBy: [], ...options }; - const meta = this.metadata.get(entityName); - if (meta.virtual) { - yield* this.streamFromVirtual(entityName, where, options); - return; - } - const qb = await this.createQueryBuilderFromOptions(meta, where, options); - try { - const result = qb.stream(options); - for await (const item of result) { - yield item; - } - } catch (e) { - throw this.convertException(e); - } - } - /** - * 1:1 owner side needs to be marked for population so QB auto-joins the owner id - */ - autoJoinOneToOneOwner(meta, populate, fields = []) { - if (!this.config.get('autoJoinOneToOneOwner')) { - return populate; - } - const relationsToPopulate = populate.map(({ field }) => field.split(':')[0]); - const toPopulate = meta.relations - .filter( - prop => - prop.kind === ReferenceKind.ONE_TO_ONE && - !prop.owner && - !prop.lazy && - !relationsToPopulate.includes(prop.name), - ) - .filter(prop => fields.length === 0 || fields.some(f => prop.name === f || prop.name.startsWith(`${String(f)}.`))) - .map(prop => ({ field: `${prop.name}:ref`, strategy: LoadStrategy.JOINED })); - return [...populate, ...toPopulate]; - } - /** - * @internal - */ - joinedProps(meta, populate, options) { - return populate.filter(hint => { - const [propName, ref] = hint.field.split(':', 2); - const prop = meta.properties[propName] || {}; - const strategy = getLoadingStrategy( - hint.strategy || prop.strategy || options?.strategy || this.config.get('loadStrategy'), - prop.kind, - ); - if (ref && [ReferenceKind.ONE_TO_ONE, ReferenceKind.MANY_TO_ONE].includes(prop.kind)) { - return true; - } - // skip redundant joins for 1:1 owner population hints when using `mapToPk` - if (prop.kind === ReferenceKind.ONE_TO_ONE && prop.mapToPk && prop.owner) { - return false; - } - if (strategy !== LoadStrategy.JOINED) { - // force joined strategy for explicit 1:1 owner populate hint as it would require a join anyway - return prop.kind === ReferenceKind.ONE_TO_ONE && !prop.owner; - } - return ![ReferenceKind.SCALAR, ReferenceKind.EMBEDDED].includes(prop.kind); - }); - } - /** - * @internal - */ - mergeJoinedResult(rawResults, meta, joinedProps) { - if (rawResults.length <= 1) { - return rawResults; - } - const res = []; - const map = {}; - const collectionsToMerge = {}; - const hints = joinedProps.map(hint => { - const [propName, ref] = hint.field.split(':', 2); - return { propName, ref, children: hint.children }; - }); - for (const item of rawResults) { - const pk = Utils.getCompositeKeyHash(item, meta); - if (map[pk]) { - for (const { propName } of hints) { - if (!item[propName]) { - continue; - } - collectionsToMerge[pk] ??= {}; - collectionsToMerge[pk][propName] ??= [map[pk][propName]]; - collectionsToMerge[pk][propName].push(item[propName]); - } - } else { - map[pk] = item; - res.push(item); - } - } - for (const pk in collectionsToMerge) { - const entity = map[pk]; - const collections = collectionsToMerge[pk]; - for (const { propName, ref, children } of hints) { - if (!collections[propName]) { - continue; - } - const prop = meta.properties[propName]; - const items = collections[propName].flat(); - if ([ReferenceKind.ONE_TO_MANY, ReferenceKind.MANY_TO_MANY].includes(prop.kind) && ref) { - entity[propName] = items; - continue; - } - switch (prop.kind) { - case ReferenceKind.ONE_TO_MANY: - case ReferenceKind.MANY_TO_MANY: - entity[propName] = this.mergeJoinedResult(items, prop.targetMeta, children ?? []); - break; - case ReferenceKind.MANY_TO_ONE: - case ReferenceKind.ONE_TO_ONE: - entity[propName] = this.mergeJoinedResult(items, prop.targetMeta, children ?? [])[0]; - break; - } - } - } - return res; - } - shouldHaveColumn(meta, prop, populate, fields, exclude) { - if (!this.platform.shouldHaveColumn(prop, populate, exclude)) { - return false; - } - if (!fields || fields.includes('*') || prop.primary || meta.root.discriminatorColumn === prop.name) { - return true; - } - return fields.some(f => f === prop.name || f.toString().startsWith(prop.name + '.')); - } - getFieldsForJoinedLoad(qb, meta, options) { - const fields = []; - const populate = options.populate ?? []; - const joinedProps = this.joinedProps(meta, populate, options); - const populateWhereAll = options?._populateWhere === 'all' || Utils.isEmpty(options?._populateWhere); - // Ensure TPT joins are applied early so that _tptAlias is available for join resolution - // This is needed when populating relations that are inherited from TPT parent entities - if (!options.parentJoinPath) { - qb.ensureTPTJoins(); - } - // root entity is already handled, skip that - if (options.parentJoinPath) { - // alias all fields in the primary table - meta.props - .filter(prop => this.shouldHaveColumn(meta, prop, populate, options.explicitFields, options.exclude)) - .forEach(prop => - fields.push( - ...this.mapPropToFieldNames( - qb, - prop, - options.parentTableAlias, - meta, - options.schema, - options.explicitFields, - ), - ), - ); - } - for (const hint of joinedProps) { - const [propName, ref] = hint.field.split(':', 2); - const prop = meta.properties[propName]; - // Polymorphic to-one: create a LEFT JOIN per target type - // Skip :ref hints — polymorphic to-one already has FK + discriminator in the row - if ( - prop.polymorphic && - prop.polymorphTargets?.length && - !ref && - [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) - ) { - const basePath = options.parentJoinPath - ? `${options.parentJoinPath}.${prop.name}` - : `${meta.name}.${prop.name}`; - const pathPrefix = - !options.parentJoinPath && populateWhereAll && !basePath.startsWith('[populate]') ? '[populate]' : ''; - for (const targetMeta of prop.polymorphTargets) { - const tableAlias = qb.getNextAlias(targetMeta.className); - const targetPath = `${pathPrefix}${basePath}[${targetMeta.className}]`; - const schema = targetMeta.schema === '*' ? (options?.schema ?? this.config.get('schema')) : targetMeta.schema; - qb.addPolymorphicJoin( - prop, - targetMeta, - options.parentTableAlias, - tableAlias, - JoinType.leftJoin, - targetPath, - schema, - ); - // Select fields from each target table - fields.push( - ...this.getFieldsForJoinedLoad(qb, targetMeta, { - ...options, - populate: hint.children, - parentTableAlias: tableAlias, - parentJoinPath: targetPath, - }), - ); - } - continue; - } - // ignore ref joins of known FKs unless it's a filter hint - if ( - ref && - !hint.filter && - (prop.kind === ReferenceKind.MANY_TO_ONE || (prop.kind === ReferenceKind.ONE_TO_ONE && prop.owner)) - ) { - continue; - } - const meta2 = prop.targetMeta; - const pivotRefJoin = prop.kind === ReferenceKind.MANY_TO_MANY && ref; - const tableAlias = qb.getNextAlias(prop.name); - const field = `${options.parentTableAlias}.${prop.name}`; - let path = options.parentJoinPath ? `${options.parentJoinPath}.${prop.name}` : `${meta.name}.${prop.name}`; - if (!options.parentJoinPath && populateWhereAll && !hint.filter && !path.startsWith('[populate]')) { - path = '[populate]' + path; - } - const mandatoryToOneProperty = - [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) && !prop.nullable; - const joinType = pivotRefJoin - ? JoinType.pivotJoin - : hint.joinType - ? hint.joinType - : (hint.filter && !prop.nullable) || mandatoryToOneProperty - ? JoinType.innerJoin - : JoinType.leftJoin; - const schema = - prop.targetMeta.schema === '*' ? (options?.schema ?? this.config.get('schema')) : prop.targetMeta.schema; - qb.join(field, tableAlias, {}, joinType, path, schema); - // For relations to TPT base classes, add LEFT JOINs for all child tables (polymorphic loading) - if (meta2.inheritanceType === 'tpt' && meta2.tptChildren?.length && !ref) { - // Use the registry metadata to ensure allTPTDescendants is available - const tptMeta = this.metadata.get(meta2.class); - this.addTPTPolymorphicJoinsForRelation(qb, tptMeta, tableAlias, fields); - } - if (pivotRefJoin) { - fields.push( - ...prop.joinColumns.map(col => - qb.helper.mapper(`${tableAlias}.${col}`, qb.type, undefined, `${tableAlias}__${col}`), - ), - ...prop.inverseJoinColumns.map(col => - qb.helper.mapper(`${tableAlias}.${col}`, qb.type, undefined, `${tableAlias}__${col}`), - ), - ); - } - if (prop.kind === ReferenceKind.ONE_TO_MANY && ref) { - fields.push( - ...this.getFieldsForJoinedLoad(qb, meta2, { - ...options, - explicitFields: prop.referencedColumnNames, - exclude: undefined, - populate: hint.children, - parentTableAlias: tableAlias, - parentJoinPath: path, - }), - ); - } - const childExplicitFields = - options.explicitFields?.filter(f => Utils.isPlainObject(f)).map(o => o[prop.name])[0] || []; - options.explicitFields?.forEach(f => { - if (typeof f === 'string' && f.startsWith(`${prop.name}.`)) { - childExplicitFields.push(f.substring(prop.name.length + 1)); - } - }); - const childExclude = options.exclude ? Utils.extractChildElements(options.exclude, prop.name) : options.exclude; - if (!ref && (!prop.mapToPk || hint.dataOnly)) { - fields.push( - ...this.getFieldsForJoinedLoad(qb, meta2, { - ...options, - explicitFields: childExplicitFields.length === 0 ? undefined : childExplicitFields, - exclude: childExclude, - populate: hint.children, - parentTableAlias: tableAlias, - parentJoinPath: path, - }), - ); - } else if ( - hint.filter || - (prop.mapToPk && !hint.dataOnly) || - (ref && [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind)) - ) { - fields.push( - ...prop.referencedColumnNames.map(col => - qb.helper.mapper(`${tableAlias}.${col}`, qb.type, undefined, `${tableAlias}__${col}`), - ), - ); - } - } - return fields; - } - /** - * Adds LEFT JOINs and fields for TPT polymorphic loading when populating a relation to a TPT base class. - * @internal - */ - addTPTPolymorphicJoinsForRelation(qb, meta, baseAlias, fields) { - // allTPTDescendants is pre-computed during discovery, sorted by depth (deepest first) - const descendants = meta.allTPTDescendants; - const childAliases = {}; - // LEFT JOIN each descendant table - for (const childMeta of descendants) { - const childAlias = qb.getNextAlias(childMeta.className); - qb.createAlias(childMeta.class, childAlias); - childAliases[childMeta.className] = childAlias; - qb.addPropertyJoin(childMeta.tptInverseProp, baseAlias, childAlias, JoinType.leftJoin, `[tpt]${meta.className}`); - // Add fields from this child (only ownProps, skip PKs) - for (const prop of childMeta.ownProps.filter(p => !p.primary && this.platform.shouldHaveColumn(p, []))) { - for (const fieldName of prop.fieldNames) { - const field = `${childAlias}.${fieldName}`; - const fieldAlias = `${childAlias}__${fieldName}`; - fields.push(raw(`${this.platform.quoteIdentifier(field)} as ${this.platform.quoteIdentifier(fieldAlias)}`)); - } - } - } - // Add computed discriminator (descendants already sorted by depth) - if (meta.root.tptDiscriminatorColumn) { - fields.push(this.buildTPTDiscriminatorExpression(meta, descendants, childAliases, baseAlias)); - } - } - /** - * Find the alias for a TPT child table in the query builder. - * @internal - */ - findTPTChildAlias(qb, childMeta) { - const joins = qb.state.joins; - for (const key of Object.keys(joins)) { - if (joins[key].table === childMeta.tableName && key.includes('[tpt]')) { - return joins[key].alias; - } - } - return undefined; - } - /** - * Builds a CASE WHEN expression for TPT discriminator. - * Determines concrete entity type based on which child table has a non-null PK. - * @internal - */ - buildTPTDiscriminatorExpression(meta, descendants, aliasMap, baseAlias) { - const cases = descendants.map(child => { - const childAlias = aliasMap[child.className]; - const pkFieldName = child.properties[child.primaryKeys[0]].fieldNames[0]; - return `when ${this.platform.quoteIdentifier(`${childAlias}.${pkFieldName}`)} is not null then '${child.discriminatorValue}'`; - }); - const defaultValue = meta.abstract ? 'null' : `'${meta.discriminatorValue}'`; - const caseExpr = `case ${cases.join(' ')} else ${defaultValue} end`; - const aliased = this.platform.quoteIdentifier(`${baseAlias}__${meta.root.tptDiscriminatorColumn}`); - return raw(`${caseExpr} as ${aliased}`); - } - /** - * Maps TPT child-specific fields during hydration. - * When a relation points to a TPT base class, the actual entity might be a child class. - * This method reads the discriminator to determine the concrete type and maps child-specific fields. - * @internal - */ - mapTPTChildFields(relationPojo, meta, relationAlias, qb, root) { - // Check if this is a TPT base with polymorphic children - if (meta.inheritanceType !== 'tpt' || !meta.root.tptDiscriminatorColumn) { - return; - } - // Read the discriminator value - const discriminatorAlias = `${relationAlias}__${meta.root.tptDiscriminatorColumn}`; - const discriminatorValue = root[discriminatorAlias]; - if (!discriminatorValue) { - return; - } - // Set the discriminator in the pojo for EntityFactory - relationPojo[meta.root.tptDiscriminatorColumn] = discriminatorValue; - // Find the concrete metadata from discriminator map - const concreteClass = meta.root.discriminatorMap?.[discriminatorValue]; - /* v8 ignore next 3 - defensive check for invalid discriminator values */ - if (!concreteClass) { - return; - } - const concreteMeta = this.metadata.get(concreteClass); - if (concreteMeta === meta) { - // Already the concrete type, no child fields to map - delete root[discriminatorAlias]; - return; - } - // Traverse up from concrete type and map fields from each level's table - const tz = this.platform.getTimezone(); - let currentMeta = concreteMeta; - while (currentMeta && currentMeta !== meta) { - const childAlias = this.findTPTChildAlias(qb, currentMeta); - if (childAlias) { - // Map fields using same filtering as joined loading, plus skip PKs - for (const prop of currentMeta.ownProps.filter(p => !p.primary && this.platform.shouldHaveColumn(p, []))) { - this.mapJoinedProp(relationPojo, prop, childAlias, root, tz, currentMeta, { - deleteFromRoot: true, - }); - } - } - currentMeta = currentMeta.tptParent; - } - // Clean up the discriminator alias - delete root[discriminatorAlias]; - } - /** - * @internal - */ - mapPropToFieldNames(qb, prop, tableAlias, meta, schema, explicitFields) { - if (prop.kind === ReferenceKind.EMBEDDED && !prop.object) { - return Object.entries(prop.embeddedProps).flatMap(([name, childProp]) => { - const childFields = explicitFields ? Utils.extractChildElements(explicitFields, prop.name) : []; - if ( - !this.shouldHaveColumn( - prop.targetMeta, - { ...childProp, name }, - [], - childFields.length > 0 ? childFields : undefined, - ) - ) { - return []; - } - return this.mapPropToFieldNames(qb, childProp, tableAlias, meta, schema, childFields); - }); - } - const aliased = this.platform.quoteIdentifier(`${tableAlias}__${prop.fieldNames[0]}`); - if (prop.customTypes?.some(type => !!type?.convertToJSValueSQL)) { - return prop.fieldNames.map((col, idx) => { - if (!prop.customTypes[idx]?.convertToJSValueSQL) { - return col; - } - const prefixed = this.platform.quoteIdentifier(`${tableAlias}.${col}`); - const aliased = this.platform.quoteIdentifier(`${tableAlias}__${col}`); - return raw(`${prop.customTypes[idx].convertToJSValueSQL(prefixed, this.platform)} as ${aliased}`); - }); - } - if (prop.customType?.convertToJSValueSQL) { - const prefixed = this.platform.quoteIdentifier(`${tableAlias}.${prop.fieldNames[0]}`); - return [raw(`${prop.customType.convertToJSValueSQL(prefixed, this.platform)} as ${aliased}`)]; - } - if (prop.formula) { - const quotedAlias = this.platform.quoteIdentifier(tableAlias).toString(); - const table = this.createFormulaTable(quotedAlias, meta, schema); - const columns = meta.createColumnMappingObject(tableAlias); - return [raw(`${this.evaluateFormula(prop.formula, columns, table)} as ${aliased}`)]; - } - return prop.fieldNames.map(fieldName => { - return raw('?? as ??', [`${tableAlias}.${fieldName}`, `${tableAlias}__${fieldName}`]); - }); - } - /** @internal */ - createQueryBuilder(entityName, ctx, preferredConnectionType, convertCustomTypes, loggerContext, alias, em) { - // do not compute the connectionType if EM is provided as it will be computed from it in the QB later on - const connectionType = em - ? preferredConnectionType - : this.resolveConnectionType({ ctx, connectionType: preferredConnectionType }); - const qb = new QueryBuilder(entityName, this.metadata, this, ctx, alias, connectionType, em, loggerContext); - if (!convertCustomTypes) { - qb.unsetFlag(QueryFlag.CONVERT_CUSTOM_TYPES); - } - return qb; - } - resolveConnectionType(args) { - if (args.ctx) { - return 'write'; - } - if (args.connectionType) { - return args.connectionType; - } - if (this.config.get('preferReadReplicas')) { - return 'read'; - } - return 'write'; - } - extractManyToMany(meta, data) { - const ret = {}; - for (const prop of meta.relations) { - if (prop.kind === ReferenceKind.MANY_TO_MANY && data[prop.name]) { - ret[prop.name] = data[prop.name].map(item => Utils.asArray(item)); - delete data[prop.name]; - } - } - return ret; - } - async processManyToMany(meta, pks, collections, clear, options) { - for (const prop of meta.relations) { - if (collections[prop.name]) { - const pivotMeta = this.metadata.get(prop.pivotEntity); - const persister = new PivotCollectionPersister( - pivotMeta, - this, - options?.ctx, - options?.schema, - options?.loggerContext, - ); - persister.enqueueUpdate(prop, collections[prop.name], clear, pks); - await this.rethrow(persister.execute()); - } - } - } - async lockPessimistic(entity, options) { - const meta = helper(entity).__meta; - const qb = this.createQueryBuilder(meta.class, options.ctx, undefined, undefined, options.logging).withSchema( - options.schema ?? meta.schema, - ); - const cond = Utils.getPrimaryKeyCond(entity, meta.primaryKeys); - qb.select(raw('1')).where(cond).setLockMode(options.lockMode, options.lockTableAliases); - await this.rethrow(qb.execute()); - } - buildPopulateWhere(meta, joinedProps, options) { - const where = {}; - for (const hint of joinedProps) { - const [propName] = hint.field.split(':', 2); - const prop = meta.properties[propName]; - if (!Utils.isEmpty(prop.where) || RawQueryFragment.hasObjectFragments(prop.where)) { - where[prop.name] = Utils.copy(prop.where); - } - if (hint.children) { - const targetMeta = prop.targetMeta; - if (targetMeta) { - const inner = this.buildPopulateWhere(targetMeta, hint.children, {}); - if (!Utils.isEmpty(inner) || RawQueryFragment.hasObjectFragments(inner)) { - where[prop.name] ??= {}; - Object.assign(where[prop.name], inner); - } - } - } - } - if (Utils.isEmpty(options.populateWhere) && !RawQueryFragment.hasObjectFragments(options.populateWhere)) { - return where; - } - if (Utils.isEmpty(where) && !RawQueryFragment.hasObjectFragments(where)) { - return options.populateWhere; - } - /* v8 ignore next */ - return { $and: [options.populateWhere, where] }; - } - /** - * Builds a UNION ALL (or UNION) subquery from `unionWhere` branches and merges it - * into the main WHERE as `pk IN (branch_1 UNION ALL branch_2 ...)`. - * Each branch is planned independently by the database, enabling per-table index usage. - */ - async applyUnionWhere(meta, where, options, forDml = false) { - const unionWhere = options.unionWhere; - const strategy = options.unionWhereStrategy ?? 'union-all'; - const schema = this.getSchemaName(meta, options); - const connectionType = this.resolveConnectionType({ - ctx: options.ctx, - connectionType: options.connectionType, - }); - const branchQbs = []; - for (const branch of unionWhere) { - const qb = this.createQueryBuilder(meta.class, options.ctx, connectionType, false, options.logging).withSchema( - schema, - ); - const pkFields = meta.primaryKeys.map(pk => { - const prop = meta.properties[pk]; - return `${qb.alias}.${prop.fieldNames[0]}`; - }); - qb.select(pkFields).where(branch); - if (options.em) { - await qb.applyJoinedFilters(options.em, options.filters); - } - branchQbs.push(qb); - } - const [first, ...rest] = branchQbs; - const unionQb = strategy === 'union' ? first.union(...rest) : first.unionAll(...rest); - const pkHash = Utils.getPrimaryKeyHash(meta.primaryKeys); - // MySQL does not allow referencing the target table in a subquery - // for UPDATE/DELETE, so we wrap the union in a derived table. - if (forDml) { - const { sql, params } = unionQb.toQuery(); - return { - $and: [where, { [pkHash]: { $in: raw(`select * from (${sql}) as __u`, params) } }], - }; - } - return { - $and: [where, { [pkHash]: { $in: unionQb.toRaw() } }], - }; - } - buildOrderBy(qb, meta, populate, options) { - const joinedProps = this.joinedProps(meta, populate, options); - // `options._populateWhere` is a copy of the value provided by user with a fallback to the global config option - // as `options.populateWhere` will be always recomputed to respect filters - const populateWhereAll = options._populateWhere !== 'infer' && !Utils.isEmpty(options._populateWhere); - const path = (populateWhereAll ? '[populate]' : '') + meta.className; - const optionsOrderBy = Utils.asArray(options.orderBy); - const populateOrderBy = this.buildPopulateOrderBy( - qb, - meta, - Utils.asArray(options.populateOrderBy ?? options.orderBy), - path, - !!options.populateOrderBy, - ); - const joinedPropsOrderBy = this.buildJoinedPropsOrderBy(qb, meta, joinedProps, options, path); - return [...optionsOrderBy, ...populateOrderBy, ...joinedPropsOrderBy]; - } - buildPopulateOrderBy(qb, meta, populateOrderBy, parentPath, explicit, parentAlias = qb.alias) { - const orderBy = []; - for (let i = 0; i < populateOrderBy.length; i++) { - const orderHint = populateOrderBy[i]; - for (const field of Utils.getObjectQueryKeys(orderHint)) { - const childOrder = orderHint[field]; - if (RawQueryFragment.isKnownFragmentSymbol(field)) { - const { sql, params } = RawQueryFragment.getKnownFragment(field); - const key = raw(sql.replace(new RegExp(ALIAS_REPLACEMENT_RE, 'g'), parentAlias), params); - orderBy.push({ [key]: childOrder }); - continue; - } - const prop = meta.properties[field]; - if (!prop) { - throw new Error(`Trying to order by not existing property ${meta.className}.${field}`); - } - let path = parentPath; - const meta2 = prop.targetMeta; - if ( - prop.kind !== ReferenceKind.SCALAR && - (![ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) || - !prop.owner || - Utils.isPlainObject(childOrder)) - ) { - path += `.${field}`; - } - if (prop.kind === ReferenceKind.MANY_TO_MANY && typeof childOrder !== 'object') { - path += '[pivot]'; - } - const join = qb.getJoinForPath(path, { matchPopulateJoins: true }); - const propAlias = qb.getAliasForJoinPath(join ?? path, { matchPopulateJoins: true }) ?? parentAlias; - if (!join) { - continue; - } - if ( - join && - ![ReferenceKind.SCALAR, ReferenceKind.EMBEDDED].includes(prop.kind) && - typeof childOrder === 'object' - ) { - const children = this.buildPopulateOrderBy(qb, meta2, Utils.asArray(childOrder), path, explicit, propAlias); - orderBy.push(...children); - continue; - } - if (prop.kind === ReferenceKind.MANY_TO_MANY && join) { - if (prop.fixedOrderColumn) { - orderBy.push({ [`${join.alias}.${prop.fixedOrderColumn}`]: childOrder }); - } else { - for (const col of prop.inverseJoinColumns) { - orderBy.push({ [`${join.ownerAlias}.${col}`]: childOrder }); - } - } - continue; - } - const order = typeof childOrder === 'object' ? childOrder[field] : childOrder; - if (order) { - orderBy.push({ [`${propAlias}.${field}`]: order }); - } - } - } - return orderBy; - } - buildJoinedPropsOrderBy(qb, meta, populate, options, parentPath) { - const orderBy = []; - const joinedProps = this.joinedProps(meta, populate, options); - for (const hint of joinedProps) { - const [propName, ref] = hint.field.split(':', 2); - const prop = meta.properties[propName]; - let path = `${parentPath}.${propName}`; - if (prop.kind === ReferenceKind.MANY_TO_MANY && ref) { - path += '[pivot]'; - } - if ([ReferenceKind.MANY_TO_MANY, ReferenceKind.ONE_TO_MANY].includes(prop.kind)) { - this.buildToManyOrderBy(qb, prop, path, ref, orderBy); - } - if (hint.children) { - orderBy.push(...this.buildJoinedPropsOrderBy(qb, prop.targetMeta, hint.children, options, path)); - } - } - return orderBy; - } - buildToManyOrderBy(qb, prop, path, ref, orderBy) { - const join = qb.getJoinForPath(path, { matchPopulateJoins: true }); - const propAlias = qb.getAliasForJoinPath(join ?? path, { matchPopulateJoins: true }); - if (prop.kind === ReferenceKind.MANY_TO_MANY && prop.fixedOrder && join) { - const alias = ref ? propAlias : join.ownerAlias; - orderBy.push({ [`${alias}.${prop.fixedOrderColumn}`]: QueryOrder.ASC }); - } - const effectiveOrderBy = QueryHelper.mergeOrderBy(prop.orderBy, prop.targetMeta?.orderBy); - for (const item of effectiveOrderBy) { - for (const field of Utils.getObjectQueryKeys(item)) { - const order = item[field]; - if (RawQueryFragment.isKnownFragmentSymbol(field)) { - const { sql, params } = RawQueryFragment.getKnownFragment(field); - const sql2 = propAlias ? sql.replace(new RegExp(ALIAS_REPLACEMENT_RE, 'g'), propAlias) : sql; - const key = raw(sql2, params); - orderBy.push({ [key]: order }); - continue; - } - orderBy.push({ [`${propAlias}.${field}`]: order }); - } - } - } - normalizeFields(fields, prefix = '') { - const ret = []; - for (const field of fields) { - if (typeof field === 'string') { - ret.push(prefix + field); - continue; - } - if (Utils.isPlainObject(field)) { - for (const key of Object.keys(field)) { - ret.push(...this.normalizeFields(field[key], key + '.')); - } - } - } - return ret; - } - processField(meta, prop, field, ret) { - if (!prop || (prop.kind === ReferenceKind.ONE_TO_ONE && !prop.owner)) { - return; - } - if (prop.kind === ReferenceKind.EMBEDDED) { - if (prop.object) { - ret.push(prop.name); - return; - } - const parts = field.split('.'); - const top = parts.shift(); - for (const key of Object.keys(prop.embeddedProps)) { - if (!top || key === top) { - this.processField(meta, prop.embeddedProps[key], parts.join('.'), ret); - } - } - return; - } - if (prop.persist === false && !prop.embedded && !prop.formula) { - return; - } - ret.push(prop.name); - } - buildFields(meta, populate, joinedProps, qb, alias, options, schema) { - const lazyProps = meta.props.filter(prop => prop.lazy && !populate.some(p => this.isPopulated(meta, prop, p))); - const hasLazyFormulas = meta.props.some(p => p.lazy && p.formula); - const requiresSQLConversion = meta.props.some(p => p.customType?.convertToJSValueSQL && p.persist !== false); - const hasExplicitFields = !!options.fields; - const ret = []; - let addFormulas = false; - // handle root entity properties first, this is used for both strategies in the same way - if (options.fields) { - for (const field of this.normalizeFields(options.fields)) { - if (field === '*') { - ret.push('*'); - continue; - } - const parts = field.split('.'); - const rootPropName = parts.shift(); // first one is the `prop` - const prop = QueryHelper.findProperty(rootPropName, { - metadata: this.metadata, - platform: this.platform, - entityName: meta.class, - where: {}, - aliasMap: qb.getAliasMap(), - }); - this.processField(meta, prop, parts.join('.'), ret); - } - if (!options.fields.includes('*') && !options.fields.includes(`${qb.alias}.*`)) { - ret.unshift(...meta.primaryKeys.filter(pk => !options.fields.includes(pk))); - } - if ( - meta.root.inheritanceType === 'sti' && - !options.fields.includes(`${qb.alias}.${meta.root.discriminatorColumn}`) - ) { - ret.push(meta.root.discriminatorColumn); - } - } else if (!Utils.isEmpty(options.exclude) || lazyProps.some(p => !p.formula && (p.kind !== '1:1' || p.owner))) { - const props = meta.props.filter(prop => - this.platform.shouldHaveColumn(prop, populate, options.exclude, false, false), - ); - ret.push(...props.filter(p => !lazyProps.includes(p)).map(p => p.name)); - addFormulas = true; - } else if (hasLazyFormulas || requiresSQLConversion) { - ret.push('*'); - addFormulas = true; - } else { - ret.push('*'); - } - if (ret.length > 0 && !hasExplicitFields && addFormulas) { - // Create formula column mapping with unquoted aliases - quoting should be handled by the user via `quote` helper - const quotedAlias = this.platform.quoteIdentifier(alias); - const columns = meta.createColumnMappingObject(alias); - const effectiveSchema = schema ?? (meta.schema !== '*' ? meta.schema : undefined); - for (const prop of meta.props) { - if (lazyProps.includes(prop)) { - continue; - } - if (prop.formula) { - const aliased = this.platform.quoteIdentifier(prop.fieldNames[0]); - const table = this.createFormulaTable(quotedAlias.toString(), meta, effectiveSchema); - ret.push(raw(`${this.evaluateFormula(prop.formula, columns, table)} as ${aliased}`)); - } - if (!prop.object && (prop.hasConvertToDatabaseValueSQL || prop.hasConvertToJSValueSQL)) { - ret.push(prop.name); - } - } - } - // add joined relations after the root entity fields - if (joinedProps.length > 0) { - ret.push( - ...this.getFieldsForJoinedLoad(qb, meta, { - explicitFields: options.fields, - exclude: options.exclude, - populate, - parentTableAlias: alias, - ...options, - }), - ); - } - return Utils.unique(ret); - } -} diff --git a/node_modules/@mikro-orm/sql/AbstractSqlPlatform.d.ts b/node_modules/@mikro-orm/sql/AbstractSqlPlatform.d.ts deleted file mode 100644 index 8a90013..0000000 --- a/node_modules/@mikro-orm/sql/AbstractSqlPlatform.d.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { - type RawQueryFragment, - type Constructor, - type EntityManager, - type EntityRepository, - type IDatabaseDriver, - type IsolationLevel, - type MikroORM, - Platform, -} from '@mikro-orm/core'; -import { SqlSchemaGenerator } from './schema/SqlSchemaGenerator.js'; -import { type SchemaHelper } from './schema/SchemaHelper.js'; -import type { IndexDef } from './typings.js'; -import { NativeQueryBuilder } from './query/NativeQueryBuilder.js'; -/** Base class for SQL database platforms, providing SQL generation and quoting utilities. */ -export declare abstract class AbstractSqlPlatform extends Platform { - #private; - protected readonly schemaHelper?: SchemaHelper; - usesPivotTable(): boolean; - indexForeignKeys(): boolean; - getRepositoryClass(): Constructor>; - getSchemaHelper(): SchemaHelper | undefined; - /** @inheritDoc */ - lookupExtensions(orm: MikroORM): void; - getSchemaGenerator(driver: IDatabaseDriver, em?: EntityManager): SqlSchemaGenerator; - /** @internal */ - createNativeQueryBuilder(): NativeQueryBuilder; - getBeginTransactionSQL(options?: { isolationLevel?: IsolationLevel; readOnly?: boolean }): string[]; - getCommitTransactionSQL(): string; - getRollbackTransactionSQL(): string; - getSavepointSQL(savepointName: string): string; - getRollbackToSavepointSQL(savepointName: string): string; - getReleaseSavepointSQL(savepointName: string): string; - quoteValue(value: any): string; - getSearchJsonPropertySQL(path: string, type: string, aliased: boolean): string | RawQueryFragment; - getSearchJsonPropertyKey(path: string[], type: string, aliased: boolean, value?: unknown): string | RawQueryFragment; - /** - * Quotes a key for use inside a JSON path expression (e.g. `$.key`). - * Simple alphanumeric keys are left unquoted; others are wrapped in double quotes. - * @internal - */ - quoteJsonKey(key: string): string; - getJsonIndexDefinition(index: IndexDef): string[]; - supportsUnionWhere(): boolean; - supportsSchemas(): boolean; - /** @inheritDoc */ - generateCustomOrder(escapedColumn: string, values: unknown[]): string; - /** - * @internal - */ - getOrderByExpression(column: string, direction: string, collation?: string): string[]; - /** - * Quotes a collation name for use in COLLATE clauses. - * @internal - */ - quoteCollation(collation: string): string; - /** @internal */ - protected validateCollationName(collation: string): void; - /** @internal */ - validateJsonPropertyName(name: string): void; - /** - * Returns FROM clause for JSON array iteration. - * @internal - */ - getJsonArrayFromSQL( - column: string, - alias: string, - _properties: { - name: string; - type: string; - }[], - ): string; - /** - * Returns SQL expression to access an element's property within a JSON array iteration. - * @internal - */ - getJsonArrayElementPropertySQL(alias: string, property: string, _type: string): string; - /** - * Wraps JSON array FROM clause and WHERE condition into a full EXISTS condition. - * MySQL overrides this because `json_table` doesn't support correlated subqueries. - * @internal - */ - getJsonArrayExistsSQL(from: string, where: string): string; - /** - * Maps a runtime type name (e.g. 'string', 'number') to a driver-specific bind type constant. - * Used by NativeQueryBuilder for output bindings. - * @internal - */ - mapToBindType(type: string): unknown; -} diff --git a/node_modules/@mikro-orm/sql/AbstractSqlPlatform.js b/node_modules/@mikro-orm/sql/AbstractSqlPlatform.js deleted file mode 100644 index bf05a93..0000000 --- a/node_modules/@mikro-orm/sql/AbstractSqlPlatform.js +++ /dev/null @@ -1,168 +0,0 @@ -import { isRaw, JsonProperty, Platform, raw, Utils } from '@mikro-orm/core'; -import { SqlEntityRepository } from './SqlEntityRepository.js'; -import { SqlSchemaGenerator } from './schema/SqlSchemaGenerator.js'; -import { NativeQueryBuilder } from './query/NativeQueryBuilder.js'; -/** Base class for SQL database platforms, providing SQL generation and quoting utilities. */ -export class AbstractSqlPlatform extends Platform { - static #JSON_PROPERTY_NAME_RE = /^[a-zA-Z_][a-zA-Z0-9_]*$/; - schemaHelper; - usesPivotTable() { - return true; - } - indexForeignKeys() { - return true; - } - getRepositoryClass() { - return SqlEntityRepository; - } - getSchemaHelper() { - return this.schemaHelper; - } - /** @inheritDoc */ - lookupExtensions(orm) { - SqlSchemaGenerator.register(orm); - } - /* v8 ignore next: kept for type inference only */ - getSchemaGenerator(driver, em) { - return new SqlSchemaGenerator(em ?? driver); - } - /** @internal */ - /* v8 ignore next */ - createNativeQueryBuilder() { - return new NativeQueryBuilder(this); - } - getBeginTransactionSQL(options) { - if (options?.isolationLevel) { - return [`set transaction isolation level ${options.isolationLevel}`, 'begin']; - } - return ['begin']; - } - getCommitTransactionSQL() { - return 'commit'; - } - getRollbackTransactionSQL() { - return 'rollback'; - } - getSavepointSQL(savepointName) { - return `savepoint ${this.quoteIdentifier(savepointName)}`; - } - getRollbackToSavepointSQL(savepointName) { - return `rollback to savepoint ${this.quoteIdentifier(savepointName)}`; - } - getReleaseSavepointSQL(savepointName) { - return `release savepoint ${this.quoteIdentifier(savepointName)}`; - } - quoteValue(value) { - if (isRaw(value)) { - return this.formatQuery(value.sql, value.params); - } - if (Utils.isPlainObject(value) || value?.[JsonProperty]) { - return this.escape(JSON.stringify(value)); - } - return this.escape(value); - } - getSearchJsonPropertySQL(path, type, aliased) { - return this.getSearchJsonPropertyKey(path.split('->'), type, aliased); - } - getSearchJsonPropertyKey(path, type, aliased, value) { - const [a, ...b] = path; - if (aliased) { - return raw( - alias => `json_extract(${this.quoteIdentifier(`${alias}.${a}`)}, '$.${b.map(this.quoteJsonKey).join('.')}')`, - ); - } - return raw(`json_extract(${this.quoteIdentifier(a)}, '$.${b.map(this.quoteJsonKey).join('.')}')`); - } - /** - * Quotes a key for use inside a JSON path expression (e.g. `$.key`). - * Simple alphanumeric keys are left unquoted; others are wrapped in double quotes. - * @internal - */ - quoteJsonKey(key) { - return /^[a-z]\w*$/i.exec(key) ? key : `"${key}"`; - } - getJsonIndexDefinition(index) { - return index.columnNames.map(column => { - if (!column.includes('.')) { - return column; - } - const [root, ...path] = column.split('.'); - return `(json_extract(${root}, '$.${path.join('.')}'))`; - }); - } - supportsUnionWhere() { - return true; - } - supportsSchemas() { - return false; - } - /** @inheritDoc */ - generateCustomOrder(escapedColumn, values) { - let ret = '(case '; - values.forEach((v, i) => { - ret += `when ${escapedColumn} = ${this.quoteValue(v)} then ${i} `; - }); - return ret + 'else null end)'; - } - /** - * @internal - */ - getOrderByExpression(column, direction, collation) { - if (collation) { - return [`${column} collate ${this.quoteCollation(collation)} ${direction.toLowerCase()}`]; - } - return [`${column} ${direction.toLowerCase()}`]; - } - /** - * Quotes a collation name for use in COLLATE clauses. - * @internal - */ - quoteCollation(collation) { - this.validateCollationName(collation); - return this.quoteIdentifier(collation); - } - /** @internal */ - validateCollationName(collation) { - if (!/^[\w]+$/.test(collation)) { - throw new Error(`Invalid collation name: '${collation}'. Collation names must contain only word characters.`); - } - } - /** @internal */ - validateJsonPropertyName(name) { - if (!AbstractSqlPlatform.#JSON_PROPERTY_NAME_RE.test(name)) { - throw new Error( - `Invalid JSON property name: '${name}'. JSON property names must contain only alphanumeric characters and underscores.`, - ); - } - } - /** - * Returns FROM clause for JSON array iteration. - * @internal - */ - getJsonArrayFromSQL(column, alias, _properties) { - return `json_each(${column}) as ${this.quoteIdentifier(alias)}`; - } - /** - * Returns SQL expression to access an element's property within a JSON array iteration. - * @internal - */ - getJsonArrayElementPropertySQL(alias, property, _type) { - return `${this.quoteIdentifier(alias)}.${this.quoteIdentifier(property)}`; - } - /** - * Wraps JSON array FROM clause and WHERE condition into a full EXISTS condition. - * MySQL overrides this because `json_table` doesn't support correlated subqueries. - * @internal - */ - getJsonArrayExistsSQL(from, where) { - return `exists (select 1 from ${from} where ${where})`; - } - /** - * Maps a runtime type name (e.g. 'string', 'number') to a driver-specific bind type constant. - * Used by NativeQueryBuilder for output bindings. - * @internal - */ - mapToBindType(type) { - return type; - } -} diff --git a/node_modules/@mikro-orm/sql/LICENSE b/node_modules/@mikro-orm/sql/LICENSE deleted file mode 100644 index 23704b1..0000000 --- a/node_modules/@mikro-orm/sql/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 Martin Adámek - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@mikro-orm/sql/PivotCollectionPersister.d.ts b/node_modules/@mikro-orm/sql/PivotCollectionPersister.d.ts deleted file mode 100644 index 98a99b2..0000000 --- a/node_modules/@mikro-orm/sql/PivotCollectionPersister.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { - type Dictionary, - type EntityMetadata, - type EntityProperty, - type Primary, - type Transaction, -} from '@mikro-orm/core'; -import { type AbstractSqlDriver } from './AbstractSqlDriver.js'; -export declare class PivotCollectionPersister { - #private; - constructor( - meta: EntityMetadata, - driver: AbstractSqlDriver, - ctx?: Transaction, - schema?: string, - loggerContext?: Dictionary, - ); - enqueueUpdate( - prop: EntityProperty, - insertDiff: Primary[][], - deleteDiff: Primary[][] | boolean, - pks: Primary[], - isInitialized?: boolean, - ): void; - private enqueueInsert; - private enqueueUpsert; - private createInsertStatement; - private enqueueDelete; - /** - * Build the keys and data arrays for pivot table operations. - * Handles polymorphic M:N by prepending the discriminator column/value. - */ - private buildPivotKeysAndData; - private collectStatements; - execute(): Promise; -} diff --git a/node_modules/@mikro-orm/sql/PivotCollectionPersister.js b/node_modules/@mikro-orm/sql/PivotCollectionPersister.js deleted file mode 100644 index 89bb5ee..0000000 --- a/node_modules/@mikro-orm/sql/PivotCollectionPersister.js +++ /dev/null @@ -1,175 +0,0 @@ -class InsertStatement { - order; - #keys; - #data; - constructor(keys, data, order) { - this.order = order; - this.#keys = keys; - this.#data = data; - } - getHash() { - return JSON.stringify(this.#data); - } - getData() { - const data = {}; - this.#keys.forEach((key, idx) => (data[key] = this.#data[idx])); - return data; - } -} -class DeleteStatement { - #keys; - #cond; - constructor(keys, cond) { - this.#keys = keys; - this.#cond = cond; - } - getHash() { - return JSON.stringify(this.#cond); - } - getCondition() { - const cond = {}; - this.#keys.forEach((key, idx) => (cond[key] = this.#cond[idx])); - return cond; - } -} -export class PivotCollectionPersister { - #inserts = new Map(); - #upserts = new Map(); - #deletes = new Map(); - #batchSize; - #order = 0; - #meta; - #driver; - #ctx; - #schema; - #loggerContext; - constructor(meta, driver, ctx, schema, loggerContext) { - this.#meta = meta; - this.#driver = driver; - this.#ctx = ctx; - this.#schema = schema; - this.#loggerContext = loggerContext; - this.#batchSize = this.#driver.config.get('batchSize'); - } - enqueueUpdate(prop, insertDiff, deleteDiff, pks, isInitialized = true) { - if (insertDiff.length) { - if (isInitialized) { - this.enqueueInsert(prop, insertDiff, pks); - } else { - this.enqueueUpsert(prop, insertDiff, pks); - } - } - if (deleteDiff === true || (Array.isArray(deleteDiff) && deleteDiff.length)) { - this.enqueueDelete(prop, deleteDiff, pks); - } - } - enqueueInsert(prop, insertDiff, pks) { - for (const fks of insertDiff) { - const statement = this.createInsertStatement(prop, fks, pks); - const hash = statement.getHash(); - if (prop.owner || !this.#inserts.has(hash)) { - this.#inserts.set(hash, statement); - } - } - } - enqueueUpsert(prop, insertDiff, pks) { - for (const fks of insertDiff) { - const statement = this.createInsertStatement(prop, fks, pks); - const hash = statement.getHash(); - if (prop.owner || !this.#upserts.has(hash)) { - this.#upserts.set(hash, statement); - } - } - } - createInsertStatement(prop, fks, pks) { - const { data, keys } = this.buildPivotKeysAndData(prop, fks, pks); - return new InsertStatement(keys, data, this.#order++); - } - enqueueDelete(prop, deleteDiff, pks) { - if (deleteDiff === true) { - const { data, keys } = this.buildPivotKeysAndData(prop, [], pks, true); - const statement = new DeleteStatement(keys, data); - this.#deletes.set(statement.getHash(), statement); - return; - } - for (const fks of deleteDiff) { - const { data, keys } = this.buildPivotKeysAndData(prop, fks, pks); - const statement = new DeleteStatement(keys, data); - this.#deletes.set(statement.getHash(), statement); - } - } - /** - * Build the keys and data arrays for pivot table operations. - * Handles polymorphic M:N by prepending the discriminator column/value. - */ - buildPivotKeysAndData(prop, fks, pks, deleteAll = false) { - let data; - let keys; - if (deleteAll) { - data = pks; - keys = prop.joinColumns; - } else { - data = prop.owner ? [...fks, ...pks] : [...pks, ...fks]; - keys = prop.owner - ? [...prop.inverseJoinColumns, ...prop.joinColumns] - : [...prop.joinColumns, ...prop.inverseJoinColumns]; - } - if (prop.polymorphic && prop.discriminatorColumn && prop.discriminatorValue) { - data = [prop.discriminatorValue, ...data]; - keys = [prop.discriminatorColumn, ...keys]; - } - return { data, keys }; - } - collectStatements(statements) { - const items = []; - for (const statement of statements.values()) { - items[statement.order] = statement.getData(); - } - return items.filter(Boolean); - } - async execute() { - if (this.#deletes.size > 0) { - const deletes = [...this.#deletes.values()]; - for (let i = 0; i < deletes.length; i += this.#batchSize) { - const chunk = deletes.slice(i, i + this.#batchSize); - const cond = { $or: [] }; - for (const item of chunk) { - cond.$or.push(item.getCondition()); - } - await this.#driver.nativeDelete(this.#meta.class, cond, { - ctx: this.#ctx, - schema: this.#schema, - loggerContext: this.#loggerContext, - }); - } - } - if (this.#inserts.size > 0) { - const filtered = this.collectStatements(this.#inserts); - for (let i = 0; i < filtered.length; i += this.#batchSize) { - const chunk = filtered.slice(i, i + this.#batchSize); - await this.#driver.nativeInsertMany(this.#meta.class, chunk, { - ctx: this.#ctx, - schema: this.#schema, - convertCustomTypes: false, - processCollections: false, - loggerContext: this.#loggerContext, - }); - } - } - if (this.#upserts.size > 0) { - const filtered = this.collectStatements(this.#upserts); - for (let i = 0; i < filtered.length; i += this.#batchSize) { - const chunk = filtered.slice(i, i + this.#batchSize); - await this.#driver.nativeUpdateMany(this.#meta.class, [], chunk, { - ctx: this.#ctx, - schema: this.#schema, - convertCustomTypes: false, - processCollections: false, - upsert: true, - onConflictAction: 'ignore', - loggerContext: this.#loggerContext, - }); - } - } - } -} diff --git a/node_modules/@mikro-orm/sql/README.md b/node_modules/@mikro-orm/sql/README.md deleted file mode 100644 index f6be8af..0000000 --- a/node_modules/@mikro-orm/sql/README.md +++ /dev/null @@ -1,225 +0,0 @@ -

- MikroORM -

- -TypeScript ORM for Node.js based on Data Mapper, [Unit of Work](https://mikro-orm.io/docs/unit-of-work/) and [Identity Map](https://mikro-orm.io/docs/identity-map/) patterns. Supports MongoDB, MySQL, MariaDB, PostgreSQL, SQLite (including libSQL), MSSQL and Oracle databases. - -> Heavily inspired by [Doctrine](https://www.doctrine-project.org/) and [Hibernate](https://hibernate.org/). - -[![NPM version](https://img.shields.io/npm/v/@mikro-orm/core.svg)](https://npmx.dev/package/@mikro-orm/core) -[![NPM dev version](https://img.shields.io/npm/v/@mikro-orm/core/next.svg)](https://npmx.dev/package/@mikro-orm/core) -[![Chat on discord](https://img.shields.io/discord/1214904142443839538?label=discord&color=blue)](https://discord.gg/w8bjxFHS7X) -[![Downloads](https://img.shields.io/npm/dm/@mikro-orm/core.svg)](https://npmx.dev/package/@mikro-orm/core) -[![Coverage Status](https://img.shields.io/coveralls/mikro-orm/mikro-orm.svg)](https://coveralls.io/r/mikro-orm/mikro-orm?branch=master) -[![Build Status](https://github.com/mikro-orm/mikro-orm/workflows/tests/badge.svg?branch=master)](https://github.com/mikro-orm/mikro-orm/actions?workflow=tests) - -## Quick Start - -Install a driver package for your database: - -```sh -npm install @mikro-orm/postgresql # PostgreSQL -npm install @mikro-orm/mysql # MySQL -npm install @mikro-orm/mariadb # MariaDB -npm install @mikro-orm/sqlite # SQLite -npm install @mikro-orm/libsql # libSQL / Turso -npm install @mikro-orm/mongodb # MongoDB -npm install @mikro-orm/mssql # MS SQL Server -npm install @mikro-orm/oracledb # Oracle -``` - -> If you use additional packages like `@mikro-orm/cli`, `@mikro-orm/migrations`, or `@mikro-orm/entity-generator`, install `@mikro-orm/core` explicitly as well. See the [quick start guide](https://mikro-orm.io/docs/quick-start) for details. - -### Define Entities - -The recommended way to define entities is using [`defineEntity`](https://mikro-orm.io/docs/define-entity) with `setClass`: - -```typescript -import { defineEntity, p, MikroORM } from '@mikro-orm/postgresql'; - -const AuthorSchema = defineEntity({ - name: 'Author', - properties: { - id: p.integer().primary(), - name: p.string(), - email: p.string(), - born: p.datetime().nullable(), - books: () => p.oneToMany(Book).mappedBy('author'), - }, -}); - -export class Author extends AuthorSchema.class {} -AuthorSchema.setClass(Author); - -const BookSchema = defineEntity({ - name: 'Book', - properties: { - id: p.integer().primary(), - title: p.string(), - author: () => p.manyToOne(Author).inversedBy('books'), - }, -}); - -export class Book extends BookSchema.class {} -BookSchema.setClass(Book); -``` - -You can also define entities using [decorators](https://mikro-orm.io/docs/defining-entities) or [`EntitySchema`](https://mikro-orm.io/docs/entity-schema). See the [defining entities guide](https://mikro-orm.io/docs/defining-entities) for all options. - -### Initialize and Use - -```typescript -import { MikroORM, RequestContext } from '@mikro-orm/postgresql'; - -const orm = await MikroORM.init({ - entities: [Author, Book], - dbName: 'my-db', -}); - -// Create new entities -const author = orm.em.create(Author, { - name: 'Jon Snow', - email: 'snow@wall.st', -}); -const book = orm.em.create(Book, { - title: 'My Life on The Wall', - author, -}); - -// Flush persists all tracked changes in a single transaction -await orm.em.flush(); -``` - -### Querying - -```typescript -// Find with relations -const authors = await orm.em.findAll(Author, { - populate: ['books'], - orderBy: { name: 'asc' }, -}); - -// Type-safe QueryBuilder -const qb = orm.em.createQueryBuilder(Author); -const result = await qb - .select('*') - .where({ books: { title: { $like: '%Wall%' } } }) - .getResult(); -``` - -### Request Context - -In web applications, use `RequestContext` to isolate the identity map per request: - -```typescript -const app = express(); - -app.use((req, res, next) => { - RequestContext.create(orm.em, next); -}); -``` - -More info about `RequestContext` is described [here](https://mikro-orm.io/docs/identity-map/#request-context). - -## Unit of Work - -> Unit of Work maintains a list of objects (_entities_) affected by a business transaction -> and coordinates the writing out of changes. [(Martin Fowler)](https://www.martinfowler.com/eaaCatalog/unitOfWork.html) - -When you call `em.flush()`, all computed changes are queried inside a database transaction. This means you can control transaction boundaries simply by making changes to your entities and calling `flush()` when ready. - -```typescript -const author = await em.findOneOrFail(Author, 1, { - populate: ['books'], -}); -author.name = 'Jon Snow II'; -author.books.getItems().forEach(book => book.title += ' (2nd ed.)'); -author.books.add(orm.em.create(Book, { title: 'New Book', author })); - -// Flush computes change sets and executes them in a single transaction -await em.flush(); -``` - -The above flush will execute: - -```sql -begin; -update "author" set "name" = 'Jon Snow II' where "id" = 1; -update "book" - set "title" = case - when ("id" = 1) then 'My Life on The Wall (2nd ed.)' - when ("id" = 2) then 'Another Book (2nd ed.)' - else "title" end - where "id" in (1, 2); -insert into "book" ("title", "author_id") values ('New Book', 1); -commit; -``` - -## Core Features - -- [Clean and Simple Entity Definition](https://mikro-orm.io/docs/defining-entities) — decorators, `EntitySchema`, or `defineEntity` -- [Identity Map](https://mikro-orm.io/docs/identity-map) and [Unit of Work](https://mikro-orm.io/docs/unit-of-work) — automatic change tracking -- [Entity References](https://mikro-orm.io/docs/entity-references) and [Collections](https://mikro-orm.io/docs/collections) -- [QueryBuilder](https://mikro-orm.io/docs/query-builder) and [Kysely Integration](https://mikro-orm.io/docs/kysely) -- [Transactions](https://mikro-orm.io/docs/transactions) and [Cascading](https://mikro-orm.io/docs/cascading) -- [Populating Relations](https://mikro-orm.io/docs/populating-relations) and [Loading Strategies](https://mikro-orm.io/docs/loading-strategies) -- [Filters](https://mikro-orm.io/docs/filters) and [Lifecycle Hooks](https://mikro-orm.io/docs/events#hooks) -- [Schema Generator](https://mikro-orm.io/docs/schema-generator) and [Migrations](https://mikro-orm.io/docs/migrations) -- [Entity Generator](https://mikro-orm.io/docs/entity-generator) and [Seeding](https://mikro-orm.io/docs/seeding) -- [Embeddables](https://mikro-orm.io/docs/embeddables), [Custom Types](https://mikro-orm.io/docs/custom-types), and [Serialization](https://mikro-orm.io/docs/serializing) -- [Composite and Foreign Keys as Primary Key](https://mikro-orm.io/docs/composite-keys) -- [Entity Constructors](https://mikro-orm.io/docs/entity-constructors) and [Property Validation](https://mikro-orm.io/docs/property-validation) -- [Modelling Relationships](https://mikro-orm.io/docs/relationships) and [Vanilla JS Support](https://mikro-orm.io/docs/usage-with-js) - -## Documentation - -MikroORM documentation, included in this repo in the root directory, is built with [Docusaurus](https://docusaurus.io) and publicly hosted on GitHub Pages at https://mikro-orm.io. - -There is also auto-generated [CHANGELOG.md](CHANGELOG.md) file based on commit messages (via `semantic-release`). - -## Example Integrations - -You can find example integrations for some popular frameworks in the [`mikro-orm-examples` repository](https://github.com/mikro-orm/mikro-orm-examples): - -### TypeScript Examples - -- [Express + MongoDB](https://github.com/mikro-orm/express-ts-example-app) -- [Nest + MySQL](https://github.com/mikro-orm/nestjs-example-app) -- [RealWorld example app (Nest + MySQL)](https://github.com/mikro-orm/nestjs-realworld-example-app) -- [Koa + SQLite](https://github.com/mikro-orm/koa-ts-example-app) -- [GraphQL + PostgreSQL](https://github.com/driescroons/mikro-orm-graphql-example) -- [Inversify + PostgreSQL](https://github.com/PodaruDragos/inversify-example-app) -- [NextJS + MySQL](https://github.com/jonahallibone/mikro-orm-nextjs) -- [Accounts.js REST and GraphQL authentication + SQLite](https://github.com/darkbasic/mikro-orm-accounts-example) -- [Nest + Shopify + PostgreSQL + GraphQL](https://github.com/Cloudshelf/Shopify_CSConnector) -- [Elysia.js + libSQL + Bun](https://github.com/mikro-orm/elysia-bun-example-app) -- [Electron.js + PostgreSQL](https://github.com/adnanlah/electron-mikro-orm-example-app) - -### JavaScript Examples - -- [Express + SQLite](https://github.com/mikro-orm/express-js-example-app) - -## Contributing - -Contributions, issues and feature requests are welcome. Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on the process for submitting pull requests to us. - -## Authors - -**Martin Adámek** - -- Twitter: [@B4nan](https://twitter.com/B4nan) -- Github: [@b4nan](https://github.com/b4nan) - -See also the list of contributors who [participated](https://github.com/mikro-orm/mikro-orm/contributors) in this project. - -## Show Your Support - -Please star this repository if this project helped you! - -> If you'd like to support my open-source work, consider sponsoring me directly at [github.com/sponsors/b4nan](https://github.com/sponsors/b4nan). - -## License - -Copyright © 2018-present [Martin Adámek](https://github.com/b4nan). - -This project is licensed under the MIT License - see the [LICENSE file](LICENSE) for details. diff --git a/node_modules/@mikro-orm/sql/SqlEntityManager.d.ts b/node_modules/@mikro-orm/sql/SqlEntityManager.d.ts deleted file mode 100644 index ac22857..0000000 --- a/node_modules/@mikro-orm/sql/SqlEntityManager.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { - type EntitySchemaWithMeta, - EntityManager, - type AnyEntity, - type ConnectionType, - type EntityData, - type EntityName, - type EntityRepository, - type GetRepository, - type QueryResult, - type FilterQuery, - type LoggingOptions, - type RawQueryFragment, -} from '@mikro-orm/core'; -import type { AbstractSqlDriver } from './AbstractSqlDriver.js'; -import type { NativeQueryBuilder } from './query/NativeQueryBuilder.js'; -import type { QueryBuilder } from './query/QueryBuilder.js'; -import type { SqlEntityRepository } from './SqlEntityRepository.js'; -import type { Kysely } from 'kysely'; -import type { InferClassEntityDB, InferKyselyDB } from './typings.js'; -import { type MikroKyselyPluginOptions } from './plugin/index.js'; -/** Options for `SqlEntityManager.getKysely()`. */ -export interface GetKyselyOptions extends MikroKyselyPluginOptions { - /** Connection type to use (`'read'` or `'write'`). */ - type?: ConnectionType; -} -/** - * @inheritDoc - */ -export declare class SqlEntityManager< - Driver extends AbstractSqlDriver = AbstractSqlDriver, -> extends EntityManager { - /** - * Creates a QueryBuilder instance - */ - createQueryBuilder( - entityName: EntityName | QueryBuilder, - alias?: RootAlias, - type?: ConnectionType, - loggerContext?: LoggingOptions, - ): QueryBuilder; - /** - * Shortcut for `createQueryBuilder()` - */ - qb( - entityName: EntityName, - alias?: RootAlias, - type?: ConnectionType, - loggerContext?: LoggingOptions, - ): QueryBuilder; - /** - * Returns configured Kysely instance. - */ - getKysely( - options?: TOptions, - ): Kysely< - TDB extends undefined - ? InferKyselyDB, TOptions> & InferClassEntityDB, TOptions> - : TDB - >; - /** Executes a raw SQL query, using the current transaction context if available. */ - execute | EntityData[] = EntityData[]>( - query: string | NativeQueryBuilder | RawQueryFragment, - params?: any[], - method?: 'all' | 'get' | 'run', - loggerContext?: LoggingOptions, - ): Promise; - getRepository = SqlEntityRepository>( - entityName: EntityName, - ): GetRepository; - protected applyDiscriminatorCondition( - entityName: EntityName, - where: FilterQuery, - ): FilterQuery; -} -type EntitiesFromManager> = - NonNullable extends any[] - ? Extract[number], EntitySchemaWithMeta> - : never; -type AllEntitiesFromManager> = - NonNullable extends any[] ? NonNullable[number] : never; -export {}; diff --git a/node_modules/@mikro-orm/sql/SqlEntityManager.js b/node_modules/@mikro-orm/sql/SqlEntityManager.js deleted file mode 100644 index 81859f6..0000000 --- a/node_modules/@mikro-orm/sql/SqlEntityManager.js +++ /dev/null @@ -1,61 +0,0 @@ -import { EntityManager } from '@mikro-orm/core'; -import { MikroKyselyPlugin } from './plugin/index.js'; -/** - * @inheritDoc - */ -export class SqlEntityManager extends EntityManager { - /** - * Creates a QueryBuilder instance - */ - createQueryBuilder(entityName, alias, type, loggerContext) { - const context = this.getContext(false); - return this.driver.createQueryBuilder( - entityName, - context.getTransactionContext(), - type, - true, - loggerContext ?? context.loggerContext, - alias, - this, - ); - } - /** - * Shortcut for `createQueryBuilder()` - */ - qb(entityName, alias, type, loggerContext) { - return this.createQueryBuilder(entityName, alias, type, loggerContext); - } - /** - * Returns configured Kysely instance. - */ - getKysely(options = {}) { - let kysely = this.getConnection(options.type).getClient(); - if ( - options.columnNamingStrategy != null || - options.tableNamingStrategy != null || - options.processOnCreateHooks != null || - options.processOnUpdateHooks != null || - options.convertValues != null - ) { - kysely = kysely.withPlugin(new MikroKyselyPlugin(this, options)); - } - return kysely; - } - /** Executes a raw SQL query, using the current transaction context if available. */ - async execute(query, params = [], method = 'all', loggerContext) { - return this.getDriver().execute( - query, - params, - method, - this.getContext(false).getTransactionContext(), - loggerContext, - ); - } - getRepository(entityName) { - return super.getRepository(entityName); - } - applyDiscriminatorCondition(entityName, where) { - // this is handled in QueryBuilder now for SQL drivers - return where; - } -} diff --git a/node_modules/@mikro-orm/sql/SqlEntityRepository.d.ts b/node_modules/@mikro-orm/sql/SqlEntityRepository.d.ts deleted file mode 100644 index e563d47..0000000 --- a/node_modules/@mikro-orm/sql/SqlEntityRepository.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { EntityRepository, type EntityName } from '@mikro-orm/core'; -import type { SqlEntityManager } from './SqlEntityManager.js'; -import type { QueryBuilder } from './query/QueryBuilder.js'; -/** SQL-specific entity repository with QueryBuilder support. */ -export declare class SqlEntityRepository extends EntityRepository { - protected readonly em: SqlEntityManager; - constructor(em: SqlEntityManager, entityName: EntityName); - /** - * Creates a QueryBuilder instance - */ - createQueryBuilder(alias?: RootAlias): QueryBuilder; - /** - * Shortcut for `createQueryBuilder()` - */ - qb(alias?: RootAlias): QueryBuilder; - /** - * @inheritDoc - */ - getEntityManager(): SqlEntityManager; -} diff --git a/node_modules/@mikro-orm/sql/SqlEntityRepository.js b/node_modules/@mikro-orm/sql/SqlEntityRepository.js deleted file mode 100644 index 135f84a..0000000 --- a/node_modules/@mikro-orm/sql/SqlEntityRepository.js +++ /dev/null @@ -1,27 +0,0 @@ -import { EntityRepository } from '@mikro-orm/core'; -/** SQL-specific entity repository with QueryBuilder support. */ -export class SqlEntityRepository extends EntityRepository { - em; - constructor(em, entityName) { - super(em, entityName); - this.em = em; - } - /** - * Creates a QueryBuilder instance - */ - createQueryBuilder(alias) { - return this.getEntityManager().createQueryBuilder(this.entityName, alias); - } - /** - * Shortcut for `createQueryBuilder()` - */ - qb(alias) { - return this.createQueryBuilder(alias); - } - /** - * @inheritDoc - */ - getEntityManager() { - return this.em; - } -} diff --git a/node_modules/@mikro-orm/sql/dialects/index.d.ts b/node_modules/@mikro-orm/sql/dialects/index.d.ts deleted file mode 100644 index b94f874..0000000 --- a/node_modules/@mikro-orm/sql/dialects/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './mssql/index.js'; -export * from './mysql/index.js'; -export * from './postgresql/index.js'; -export * from './sqlite/index.js'; -export * from './oracledb/index.js'; diff --git a/node_modules/@mikro-orm/sql/dialects/index.js b/node_modules/@mikro-orm/sql/dialects/index.js deleted file mode 100644 index b94f874..0000000 --- a/node_modules/@mikro-orm/sql/dialects/index.js +++ /dev/null @@ -1,5 +0,0 @@ -export * from './mssql/index.js'; -export * from './mysql/index.js'; -export * from './postgresql/index.js'; -export * from './sqlite/index.js'; -export * from './oracledb/index.js'; diff --git a/node_modules/@mikro-orm/sql/dialects/mssql/MsSqlNativeQueryBuilder.d.ts b/node_modules/@mikro-orm/sql/dialects/mssql/MsSqlNativeQueryBuilder.d.ts deleted file mode 100644 index 85877e6..0000000 --- a/node_modules/@mikro-orm/sql/dialects/mssql/MsSqlNativeQueryBuilder.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { NativeQueryBuilder } from '../../query/NativeQueryBuilder.js'; -/** @internal */ -export declare class MsSqlNativeQueryBuilder extends NativeQueryBuilder { - compile(): { - sql: string; - params: unknown[]; - }; - protected compileInsert(): void; - private appendOutputTable; - private compileUpsert; - protected compileSelect(): void; - protected addLockClause(): void; - protected compileTruncate(): void; - /** MSSQL has no RECURSIVE keyword — CTEs are implicitly recursive. */ - protected getCteKeyword(_hasRecursive: boolean): string; -} diff --git a/node_modules/@mikro-orm/sql/dialects/mssql/MsSqlNativeQueryBuilder.js b/node_modules/@mikro-orm/sql/dialects/mssql/MsSqlNativeQueryBuilder.js deleted file mode 100644 index cc1a50b..0000000 --- a/node_modules/@mikro-orm/sql/dialects/mssql/MsSqlNativeQueryBuilder.js +++ /dev/null @@ -1,202 +0,0 @@ -import { LockMode, QueryFlag, RawQueryFragment, Utils } from '@mikro-orm/core'; -import { NativeQueryBuilder } from '../../query/NativeQueryBuilder.js'; -import { QueryType } from '../../query/enums.js'; -/** @internal */ -export class MsSqlNativeQueryBuilder extends NativeQueryBuilder { - compile() { - if (!this.type) { - throw new Error('No query type provided'); - } - this.parts.length = 0; - this.params.length = 0; - if (this.options.flags?.has(QueryFlag.IDENTITY_INSERT)) { - this.parts.push(`set identity_insert ${this.getTableName()} on;`); - } - const { prefix, suffix } = this.appendOutputTable(); - if (prefix) { - this.parts.push(prefix); - } - if (this.options.comment) { - this.parts.push(...this.options.comment.map(comment => `/* ${comment} */`)); - } - this.compileCtes(); - if (this.options.onConflict && !Utils.isEmpty(Utils.asArray(this.options.data)[0])) { - this.compileUpsert(); - } else { - switch (this.type) { - case QueryType.SELECT: - case QueryType.COUNT: - this.compileSelect(); - break; - case QueryType.INSERT: - this.compileInsert(); - break; - case QueryType.UPDATE: - this.compileUpdate(); - break; - case QueryType.DELETE: - this.compileDelete(); - break; - case QueryType.TRUNCATE: - this.compileTruncate(); - break; - } - if (suffix) { - this.parts[this.parts.length - 1] += ';'; - this.parts.push(suffix); - } else if ([QueryType.INSERT, QueryType.UPDATE, QueryType.DELETE].includes(this.type)) { - this.parts[this.parts.length - 1] += '; select @@rowcount;'; - } - } - if (this.options.flags?.has(QueryFlag.IDENTITY_INSERT)) { - this.parts.push(`set identity_insert ${this.getTableName()} off;`); - } - return this.combineParts(); - } - compileInsert() { - if (!this.options.data) { - throw new Error('No data provided'); - } - this.parts.push('insert'); - this.addHintComment(); - this.parts.push(`into ${this.getTableName()}`); - if (Object.keys(this.options.data).length === 0) { - this.addOutputClause('inserted'); - this.parts.push('default values'); - return; - } - const parts = this.processInsertData(); - if (this.options.flags?.has(QueryFlag.OUTPUT_TABLE)) { - this.parts[this.parts.length - 2] += ' into #out '; - } - this.parts.push(parts.join(', ')); - } - appendOutputTable() { - if (!this.options.flags?.has(QueryFlag.OUTPUT_TABLE)) { - return { prefix: '', suffix: '' }; - } - const returningFields = this.options.returning; - const selections = returningFields.map(field => `[t].${this.platform.quoteIdentifier(field)}`).join(','); - return { - prefix: `select top(0) ${selections} into #out from ${this.getTableName()} as t left join ${this.getTableName()} on 0 = 1;`, - suffix: `select ${selections} from #out as t; drop table #out`, - }; - } - compileUpsert() { - const clause = this.options.onConflict; - const dataAsArray = Utils.asArray(this.options.data); - const keys = Object.keys(dataAsArray[0]); - const values = keys.map(() => '?'); - const parts = []; - for (const data of dataAsArray) { - for (const key of keys) { - this.params.push(data[key]); - } - parts.push(`(${values.join(', ')})`); - } - this.parts.push(`merge into ${this.getTableName()}`); - this.parts.push(`using (values ${parts.join(', ')}) as tsource(${keys.map(key => this.quote(key)).join(', ')})`); - if (clause.fields instanceof RawQueryFragment) { - this.parts.push(clause.fields.sql); - this.params.push(...clause.fields.params); - } else if (clause.fields.length > 0) { - const fields = clause.fields.map(field => { - const col = this.quote(field); - return `${this.getTableName()}.${col} = tsource.${col}`; - }); - this.parts.push(`on ${fields.join(' and ')}`); - } - const sourceColumns = keys.map(field => `tsource.${this.quote(field)}`).join(', '); - const destinationColumns = keys.map(field => this.quote(field)).join(', '); - this.parts.push(`when not matched then insert (${destinationColumns}) values (${sourceColumns})`); - if (!clause.ignore) { - this.parts.push('when matched'); - if (clause.where) { - this.parts.push(`and ${clause.where.sql}`); - this.params.push(...clause.where.params); - } - this.parts.push('then update set'); - if (!clause.merge || Array.isArray(clause.merge)) { - const parts = (clause.merge || keys) - .filter(field => !Array.isArray(clause.fields) || !clause.fields.includes(field)) - .map(column => `${this.quote(column)} = tsource.${this.quote(column)}`); - this.parts.push(parts.join(', ')); - } else if (typeof clause.merge === 'object') { - const parts = Object.entries(clause.merge).map(([key, value]) => { - this.params.push(value); - return `${this.getTableName()}.${this.quote(key)} = ?`; - }); - this.parts.push(parts.join(', ')); - } - } - this.addOutputClause('inserted'); - this.parts[this.parts.length - 1] += ';'; - } - compileSelect() { - this.parts.push('select'); - if (this.options.limit != null && this.options.offset == null) { - this.parts.push(`top (?)`); - this.params.push(this.options.limit); - } - this.addHintComment(); - this.parts.push(`${this.getFields()} from ${this.getTableName()}`); - this.addLockClause(); - if (this.options.joins) { - for (const join of this.options.joins) { - this.parts.push(join.sql); - this.params.push(...join.params); - } - } - if (this.options.where?.sql.trim()) { - this.parts.push(`where ${this.options.where.sql}`); - this.params.push(...this.options.where.params); - } - if (this.options.groupBy) { - const fields = this.options.groupBy.map(field => this.quote(field)); - this.parts.push(`group by ${fields.join(', ')}`); - } - if (this.options.having) { - this.parts.push(`having ${this.options.having.sql}`); - this.params.push(...this.options.having.params); - } - if (this.options.orderBy) { - this.parts.push(`order by ${this.options.orderBy}`); - } - if (this.options.offset != null) { - /* v8 ignore next */ - if (!this.options.orderBy) { - throw new Error('Order by clause is required for pagination'); - } - this.parts.push(`offset ? rows`); - this.params.push(this.options.offset); - if (this.options.limit != null) { - this.parts.push(`fetch next ? rows only`); - this.params.push(this.options.limit); - } - } - } - addLockClause() { - if ( - !this.options.lockMode || - ![LockMode.PESSIMISTIC_READ, LockMode.PESSIMISTIC_WRITE].includes(this.options.lockMode) - ) { - return; - } - const map = { - [LockMode.PESSIMISTIC_READ]: 'with (holdlock)', - [LockMode.PESSIMISTIC_WRITE]: 'with (updlock)', - }; - if (this.options.lockMode !== LockMode.OPTIMISTIC) { - this.parts.push(map[this.options.lockMode]); - } - } - compileTruncate() { - const tableName = this.getTableName(); - const sql = `delete from ${tableName}; declare @count int = case @@rowcount when 0 then 1 else 0 end; dbcc checkident ('${tableName.replace(/[[\]]/g, '')}', reseed, @count)`; - this.parts.push(sql); - } - /** MSSQL has no RECURSIVE keyword — CTEs are implicitly recursive. */ - getCteKeyword(_hasRecursive) { - return 'with'; - } -} diff --git a/node_modules/@mikro-orm/sql/dialects/mssql/index.d.ts b/node_modules/@mikro-orm/sql/dialects/mssql/index.d.ts deleted file mode 100644 index c35cd17..0000000 --- a/node_modules/@mikro-orm/sql/dialects/mssql/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './MsSqlNativeQueryBuilder.js'; diff --git a/node_modules/@mikro-orm/sql/dialects/mssql/index.js b/node_modules/@mikro-orm/sql/dialects/mssql/index.js deleted file mode 100644 index c35cd17..0000000 --- a/node_modules/@mikro-orm/sql/dialects/mssql/index.js +++ /dev/null @@ -1 +0,0 @@ -export * from './MsSqlNativeQueryBuilder.js'; diff --git a/node_modules/@mikro-orm/sql/dialects/mysql/BaseMySqlPlatform.d.ts b/node_modules/@mikro-orm/sql/dialects/mysql/BaseMySqlPlatform.d.ts deleted file mode 100644 index 61b8c20..0000000 --- a/node_modules/@mikro-orm/sql/dialects/mysql/BaseMySqlPlatform.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { - type SimpleColumnMeta, - type Type, - type TransformContext, - type MikroORM, - type IsolationLevel, -} from '@mikro-orm/core'; -import { MySqlSchemaHelper } from './MySqlSchemaHelper.js'; -import { MySqlExceptionConverter } from './MySqlExceptionConverter.js'; -import { AbstractSqlPlatform } from '../../AbstractSqlPlatform.js'; -import type { IndexDef } from '../../typings.js'; -import { MySqlNativeQueryBuilder } from './MySqlNativeQueryBuilder.js'; -export declare class BaseMySqlPlatform extends AbstractSqlPlatform { - #private; - protected readonly schemaHelper: MySqlSchemaHelper; - protected readonly exceptionConverter: MySqlExceptionConverter; - protected readonly ORDER_BY_NULLS_TRANSLATE: { - readonly 'asc nulls first': 'is not null'; - readonly 'asc nulls last': 'is null'; - readonly 'desc nulls first': 'is not null'; - readonly 'desc nulls last': 'is null'; - }; - /** @internal */ - createNativeQueryBuilder(): MySqlNativeQueryBuilder; - getDefaultCharset(): string; - init(orm: MikroORM): void; - getBeginTransactionSQL(options?: { isolationLevel?: IsolationLevel; readOnly?: boolean }): string[]; - convertJsonToDatabaseValue(value: unknown, context?: TransformContext): unknown; - getJsonIndexDefinition(index: IndexDef): string[]; - getBooleanTypeDeclarationSQL(): string; - normalizeColumnType( - type: string, - options: { - length?: number; - precision?: number; - scale?: number; - }, - ): string; - getDefaultMappedType(type: string): Type; - isNumericColumn(mappedType: Type): boolean; - supportsUnsigned(): boolean; - /** - * Returns the default name of index for the given columns - * cannot go past 64 character length for identifiers in MySQL - */ - getIndexName( - tableName: string, - columns: string[], - type: 'index' | 'unique' | 'foreign' | 'primary' | 'sequence', - ): string; - getDefaultPrimaryName(tableName: string, columns: string[]): string; - supportsCreatingFullTextIndex(): boolean; - getFullTextWhereClause(): string; - getFullTextIndexExpression( - indexName: string, - schemaName: string | undefined, - tableName: string, - columns: SimpleColumnMeta[], - ): string; - getOrderByExpression(column: string, direction: string, collation?: string): string[]; - getJsonArrayFromSQL( - column: string, - alias: string, - properties: { - name: string; - type: string; - }[], - ): string; - getJsonArrayExistsSQL(from: string, where: string): string; - getDefaultClientUrl(): string; -} diff --git a/node_modules/@mikro-orm/sql/dialects/mysql/BaseMySqlPlatform.js b/node_modules/@mikro-orm/sql/dialects/mysql/BaseMySqlPlatform.js deleted file mode 100644 index d00cbc7..0000000 --- a/node_modules/@mikro-orm/sql/dialects/mysql/BaseMySqlPlatform.js +++ /dev/null @@ -1,140 +0,0 @@ -import { Utils, QueryOrder, DecimalType, DoubleType } from '@mikro-orm/core'; -import { MySqlSchemaHelper } from './MySqlSchemaHelper.js'; -import { MySqlExceptionConverter } from './MySqlExceptionConverter.js'; -import { AbstractSqlPlatform } from '../../AbstractSqlPlatform.js'; -import { MySqlNativeQueryBuilder } from './MySqlNativeQueryBuilder.js'; -export class BaseMySqlPlatform extends AbstractSqlPlatform { - schemaHelper = new MySqlSchemaHelper(this); - exceptionConverter = new MySqlExceptionConverter(); - #jsonTypeCasts = { - string: 'text', - number: 'double', - bigint: 'bigint', - boolean: 'unsigned', - }; - ORDER_BY_NULLS_TRANSLATE = { - [QueryOrder.asc_nulls_first]: 'is not null', - [QueryOrder.asc_nulls_last]: 'is null', - [QueryOrder.desc_nulls_first]: 'is not null', - [QueryOrder.desc_nulls_last]: 'is null', - }; - /** @internal */ - createNativeQueryBuilder() { - return new MySqlNativeQueryBuilder(this); - } - getDefaultCharset() { - return 'utf8mb4'; - } - init(orm) { - super.init(orm); - orm.config.get('schemaGenerator').disableForeignKeysForClear ??= true; - } - getBeginTransactionSQL(options) { - if (options?.isolationLevel || options?.readOnly) { - const parts = []; - if (options.isolationLevel) { - parts.push(`isolation level ${options.isolationLevel}`); - } - if (options.readOnly) { - parts.push('read only'); - } - const sql = `set transaction ${parts.join(', ')}`; - return [sql, 'begin']; - } - return ['begin']; - } - convertJsonToDatabaseValue(value, context) { - if (context?.mode === 'query') { - return value; - } - return JSON.stringify(value); - } - getJsonIndexDefinition(index) { - return index.columnNames.map(column => { - if (!column.includes('.')) { - return column; - } - const [root, ...path] = column.split('.'); - return `(json_value(${this.quoteIdentifier(root)}, '$.${path.join('.')}' returning ${index.options?.returning ?? 'char(255)'}))`; - }); - } - getBooleanTypeDeclarationSQL() { - return 'tinyint(1)'; - } - normalizeColumnType(type, options) { - const simpleType = this.extractSimpleType(type); - if (['decimal', 'numeric'].includes(simpleType)) { - return this.getDecimalTypeDeclarationSQL(options); - } - return type; - } - getDefaultMappedType(type) { - if (type === 'tinyint(1)') { - return super.getDefaultMappedType('boolean'); - } - return super.getDefaultMappedType(type); - } - isNumericColumn(mappedType) { - return super.isNumericColumn(mappedType) || [DecimalType, DoubleType].some(t => mappedType instanceof t); - } - supportsUnsigned() { - return true; - } - /** - * Returns the default name of index for the given columns - * cannot go past 64 character length for identifiers in MySQL - */ - getIndexName(tableName, columns, type) { - if (type === 'primary') { - return this.getDefaultPrimaryName(tableName, columns); - } - const indexName = super.getIndexName(tableName, columns, type); - if (indexName.length > 64) { - return `${indexName.substring(0, 56 - type.length)}_${Utils.hash(indexName, 5)}_${type}`; - } - return indexName; - } - getDefaultPrimaryName(tableName, columns) { - return 'PRIMARY'; // https://dev.mysql.com/doc/refman/8.0/en/create-table.html#create-table-indexes-keys - } - supportsCreatingFullTextIndex() { - return true; - } - getFullTextWhereClause() { - return `match(:column:) against (:query in boolean mode)`; - } - getFullTextIndexExpression(indexName, schemaName, tableName, columns) { - /* v8 ignore next */ - const quotedTableName = this.quoteIdentifier(schemaName ? `${schemaName}.${tableName}` : tableName); - const quotedColumnNames = columns.map(c => this.quoteIdentifier(c.name)); - const quotedIndexName = this.quoteIdentifier(indexName); - return `alter table ${quotedTableName} add fulltext index ${quotedIndexName}(${quotedColumnNames.join(',')})`; - } - getOrderByExpression(column, direction, collation) { - const ret = []; - const dir = direction.toLowerCase(); - const col = collation ? `${column} collate ${this.quoteCollation(collation)}` : column; - if (dir in this.ORDER_BY_NULLS_TRANSLATE) { - ret.push(`${col} ${this.ORDER_BY_NULLS_TRANSLATE[dir]}`); - } - ret.push(`${col} ${dir.replace(/(\s|nulls|first|last)*/gi, '')}`); - return ret; - } - getJsonArrayFromSQL(column, alias, properties) { - const columns = properties - .map( - p => - `${this.quoteIdentifier(p.name)} ${this.#jsonTypeCasts[p.type] ?? 'text'} path '$.${this.quoteJsonKey(p.name)}'`, - ) - .join(', '); - return `json_table(${column}, '$[*]' columns (${columns})) as ${this.quoteIdentifier(alias)}`; - } - // MySQL does not support correlated json_table inside EXISTS subqueries, - // so we use a semi-join via the comma-join pattern instead. - getJsonArrayExistsSQL(from, where) { - return `(select 1 from ${from} where ${where} limit 1) is not null`; - } - getDefaultClientUrl() { - return 'mysql://root@127.0.0.1:3306'; - } -} diff --git a/node_modules/@mikro-orm/sql/dialects/mysql/MySqlExceptionConverter.d.ts b/node_modules/@mikro-orm/sql/dialects/mysql/MySqlExceptionConverter.d.ts deleted file mode 100644 index 2058f64..0000000 --- a/node_modules/@mikro-orm/sql/dialects/mysql/MySqlExceptionConverter.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ExceptionConverter, type Dictionary, type DriverException } from '@mikro-orm/core'; -export declare class MySqlExceptionConverter extends ExceptionConverter { - /** - * @see http://dev.mysql.com/doc/refman/5.7/en/error-messages-client.html - * @see http://dev.mysql.com/doc/refman/5.7/en/error-messages-server.html - * @see https://github.com/doctrine/dbal/blob/master/src/Driver/AbstractMySQLDriver.php - */ - convertException(exception: Error & Dictionary): DriverException; -} diff --git a/node_modules/@mikro-orm/sql/dialects/mysql/MySqlExceptionConverter.js b/node_modules/@mikro-orm/sql/dialects/mysql/MySqlExceptionConverter.js deleted file mode 100644 index 57845fa..0000000 --- a/node_modules/@mikro-orm/sql/dialects/mysql/MySqlExceptionConverter.js +++ /dev/null @@ -1,94 +0,0 @@ -import { - DeadlockException, - LockWaitTimeoutException, - TableExistsException, - TableNotFoundException, - ForeignKeyConstraintViolationException, - UniqueConstraintViolationException, - InvalidFieldNameException, - NonUniqueFieldNameException, - SyntaxErrorException, - ConnectionException, - NotNullConstraintViolationException, - ExceptionConverter, - CheckConstraintViolationException, -} from '@mikro-orm/core'; -export class MySqlExceptionConverter extends ExceptionConverter { - /** - * @see http://dev.mysql.com/doc/refman/5.7/en/error-messages-client.html - * @see http://dev.mysql.com/doc/refman/5.7/en/error-messages-server.html - * @see https://github.com/doctrine/dbal/blob/master/src/Driver/AbstractMySQLDriver.php - */ - convertException(exception) { - /* v8 ignore next */ - switch (exception.errno) { - case 1213: - return new DeadlockException(exception); - case 1205: - return new LockWaitTimeoutException(exception); - case 1050: - return new TableExistsException(exception); - case 1051: - case 1146: - return new TableNotFoundException(exception); - case 1216: - case 1217: - case 1451: - case 1452: - case 1701: - return new ForeignKeyConstraintViolationException(exception); - case 3819: - case 4025: - return new CheckConstraintViolationException(exception); - case 1062: - case 1557: - case 1569: - case 1586: - return new UniqueConstraintViolationException(exception); - case 1054: - case 1166: - case 1611: - return new InvalidFieldNameException(exception); - case 1052: - case 1060: - case 1110: - return new NonUniqueFieldNameException(exception); - case 1064: - case 1149: - case 1287: - case 1341: - case 1342: - case 1343: - case 1344: - case 1382: - case 1479: - case 1541: - case 1554: - case 1626: - return new SyntaxErrorException(exception); - case 1044: - case 1045: - case 1046: - case 1049: - case 1095: - case 1142: - case 1143: - case 1227: - case 1370: - case 1429: - case 2002: - case 2005: - return new ConnectionException(exception); - case 1048: - case 1121: - case 1138: - case 1171: - case 1252: - case 1263: - case 1364: - case 1566: - return new NotNullConstraintViolationException(exception); - } - return super.convertException(exception); - } -} diff --git a/node_modules/@mikro-orm/sql/dialects/mysql/MySqlNativeQueryBuilder.d.ts b/node_modules/@mikro-orm/sql/dialects/mysql/MySqlNativeQueryBuilder.d.ts deleted file mode 100644 index d3f1666..0000000 --- a/node_modules/@mikro-orm/sql/dialects/mysql/MySqlNativeQueryBuilder.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { NativeQueryBuilder } from '../../query/NativeQueryBuilder.js'; -/** @internal */ -export declare class MySqlNativeQueryBuilder extends NativeQueryBuilder { - protected compileInsert(): void; - protected addLockClause(): void; - protected addOnConflictClause(): void; -} diff --git a/node_modules/@mikro-orm/sql/dialects/mysql/MySqlNativeQueryBuilder.js b/node_modules/@mikro-orm/sql/dialects/mysql/MySqlNativeQueryBuilder.js deleted file mode 100644 index dcfdbc7..0000000 --- a/node_modules/@mikro-orm/sql/dialects/mysql/MySqlNativeQueryBuilder.js +++ /dev/null @@ -1,74 +0,0 @@ -import { LockMode, RawQueryFragment, Utils } from '@mikro-orm/core'; -import { NativeQueryBuilder } from '../../query/NativeQueryBuilder.js'; -/** @internal */ -export class MySqlNativeQueryBuilder extends NativeQueryBuilder { - compileInsert() { - if (!this.options.data) { - throw new Error('No data provided'); - } - this.parts.push('insert'); - if (this.options.onConflict?.ignore) { - this.parts.push('ignore'); - } - this.addHintComment(); - this.parts.push(`into ${this.getTableName()}`); - if (Object.keys(this.options.data).length === 0) { - this.parts.push('default values'); - return; - } - const parts = this.processInsertData(); - this.parts.push(parts.join(', ')); - } - addLockClause() { - if (!this.options.lockMode) { - return; - } - const map = { - [LockMode.PESSIMISTIC_READ]: 'lock in share mode', - [LockMode.PESSIMISTIC_WRITE]: 'for update', - [LockMode.PESSIMISTIC_PARTIAL_WRITE]: 'for update skip locked', - [LockMode.PESSIMISTIC_WRITE_OR_FAIL]: 'for update nowait', - [LockMode.PESSIMISTIC_PARTIAL_READ]: 'lock in share mode skip locked', - [LockMode.PESSIMISTIC_READ_OR_FAIL]: 'lock in share mode nowait', - }; - if (this.options.lockMode !== LockMode.OPTIMISTIC) { - this.parts.push(map[this.options.lockMode]); - } - } - addOnConflictClause() { - const clause = this.options.onConflict; - if (!clause || clause.ignore) { - return; - } - if (clause.merge) { - this.parts.push('on duplicate key update'); - if (Utils.isObject(clause.merge)) { - const fields = Object.keys(clause.merge).map(field => { - this.params.push(clause.merge[field]); - return `${this.quote(field)} = ?`; - }); - this.parts.push(fields.join(', ')); - } else if (clause.merge.length === 0) { - const dataAsArray = Utils.asArray(this.options.data); - const keys = Object.keys(dataAsArray[0]); - this.parts.push(keys.map(key => `${this.quote(key)} = values(${this.quote(key)})`).join(', ')); - } else { - const fields = clause.merge.map(key => `${this.quote(key)} = values(${this.quote(key)})`); - this.parts.push(fields.join(', ')); - } - if (clause.where) { - this.parts.push(`where ${clause.where.sql}`); - this.params.push(...clause.where.params); - } - return; - } - this.parts.push('on conflict'); - if (clause.fields instanceof RawQueryFragment) { - this.parts.push(clause.fields.sql); - this.params.push(...clause.fields.params); - } else if (clause.fields.length > 0) { - const fields = clause.fields.map(field => this.quote(field)); - this.parts.push(`(${fields.join(', ')})`); - } - } -} diff --git a/node_modules/@mikro-orm/sql/dialects/mysql/MySqlSchemaHelper.d.ts b/node_modules/@mikro-orm/sql/dialects/mysql/MySqlSchemaHelper.d.ts deleted file mode 100644 index 8f45a74..0000000 --- a/node_modules/@mikro-orm/sql/dialects/mysql/MySqlSchemaHelper.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { type Dictionary, type Type } from '@mikro-orm/core'; -import type { CheckDef, Column, ForeignKey, IndexDef, Table, TableDifference } from '../../typings.js'; -import type { AbstractSqlConnection } from '../../AbstractSqlConnection.js'; -import { SchemaHelper } from '../../schema/SchemaHelper.js'; -import type { DatabaseSchema } from '../../schema/DatabaseSchema.js'; -import type { DatabaseTable } from '../../schema/DatabaseTable.js'; -export declare class MySqlSchemaHelper extends SchemaHelper { - #private; - static readonly DEFAULT_VALUES: { - 'now()': string[]; - 'current_timestamp(?)': string[]; - '0': string[]; - }; - getSchemaBeginning(charset: string, disableForeignKeys?: boolean): string; - disableForeignKeysSQL(): string; - enableForeignKeysSQL(): string; - finalizeTable(table: DatabaseTable, charset: string, collate?: string): string; - getListTablesSQL(): string; - getListViewsSQL(): string; - loadViews(schema: DatabaseSchema, connection: AbstractSqlConnection, schemaName?: string): Promise; - loadInformationSchema(schema: DatabaseSchema, connection: AbstractSqlConnection, tables: Table[]): Promise; - getAllIndexes(connection: AbstractSqlConnection, tables: Table[]): Promise>; - getCreateIndexSQL(tableName: string, index: IndexDef, partialExpression?: boolean): string; - /** - * Build the column list for a MySQL index, with MySQL-specific handling for collation. - * MySQL requires collation to be specified as an expression: (column_name COLLATE collation_name) - */ - protected getIndexColumns(index: IndexDef): string; - /** - * Append MySQL-specific index suffixes like INVISIBLE. - */ - protected appendMySqlIndexSuffix(sql: string, index: IndexDef): string; - getAllColumns(connection: AbstractSqlConnection, tables: Table[]): Promise>; - getAllChecks(connection: AbstractSqlConnection, tables: Table[]): Promise>; - getAllForeignKeys(connection: AbstractSqlConnection, tables: Table[]): Promise>>; - getPreAlterTable(tableDiff: TableDifference, safe: boolean): string[]; - getRenameColumnSQL(tableName: string, oldColumnName: string, to: Column): string; - getRenameIndexSQL(tableName: string, index: IndexDef, oldIndexName: string): string[]; - getChangeColumnCommentSQL(tableName: string, to: Column, schemaName?: string): string; - alterTableColumn(column: Column, table: DatabaseTable, changedProperties: Set): string[]; - private getColumnDeclarationSQL; - getAllEnumDefinitions(connection: AbstractSqlConnection, tables: Table[]): Promise>>; - private supportsCheckConstraints; - protected getChecksSQL(tables: Table[]): string; - normalizeDefaultValue(defaultValue: string, length: number): string | number; - protected wrap(val: string | null | undefined, type: Type): string | null | undefined; -} diff --git a/node_modules/@mikro-orm/sql/dialects/mysql/MySqlSchemaHelper.js b/node_modules/@mikro-orm/sql/dialects/mysql/MySqlSchemaHelper.js deleted file mode 100644 index 06303f1..0000000 --- a/node_modules/@mikro-orm/sql/dialects/mysql/MySqlSchemaHelper.js +++ /dev/null @@ -1,379 +0,0 @@ -import { EnumType, StringType, TextType } from '@mikro-orm/core'; -import { SchemaHelper } from '../../schema/SchemaHelper.js'; -export class MySqlSchemaHelper extends SchemaHelper { - #cache = {}; - static DEFAULT_VALUES = { - 'now()': ['now()', 'current_timestamp'], - 'current_timestamp(?)': ['current_timestamp(?)'], - 0: ['0', 'false'], - }; - getSchemaBeginning(charset, disableForeignKeys) { - if (disableForeignKeys) { - return `set names ${charset};\n${this.disableForeignKeysSQL()}\n\n`; - } - return `set names ${charset};\n\n`; - } - disableForeignKeysSQL() { - return 'set foreign_key_checks = 0;'; - } - enableForeignKeysSQL() { - return 'set foreign_key_checks = 1;'; - } - finalizeTable(table, charset, collate) { - let sql = ` default character set ${charset}`; - if (collate) { - sql += ` collate ${collate}`; - } - sql += ' engine = InnoDB'; - if (table.comment) { - sql += ` comment = ${this.platform.quoteValue(table.comment)}`; - } - return sql; - } - getListTablesSQL() { - return `select table_name as table_name, nullif(table_schema, schema()) as schema_name, table_comment as table_comment from information_schema.tables where table_type = 'BASE TABLE' and table_schema = schema()`; - } - getListViewsSQL() { - return `select table_name as view_name, nullif(table_schema, schema()) as schema_name, view_definition from information_schema.views where table_schema = schema()`; - } - async loadViews(schema, connection, schemaName) { - const views = await connection.execute(this.getListViewsSQL()); - for (const view of views) { - // MySQL information_schema.views.view_definition requires SHOW VIEW privilege - // and may return NULL. Use SHOW CREATE VIEW as fallback. - let definition = view.view_definition?.trim(); - if (!definition) { - const createView = await connection.execute(`show create view \`${view.view_name}\``); - if (createView[0]?.['Create View']) { - // Extract SELECT statement from CREATE VIEW ... AS SELECT ... - const match = /\bAS\s+(.+)$/is.exec(createView[0]['Create View']); - definition = match?.[1]?.trim(); - } - } - if (definition) { - schema.addView(view.view_name, view.schema_name ?? undefined, definition); - } - } - } - async loadInformationSchema(schema, connection, tables) { - if (tables.length === 0) { - return; - } - const columns = await this.getAllColumns(connection, tables); - const indexes = await this.getAllIndexes(connection, tables); - const checks = await this.getAllChecks(connection, tables); - const fks = await this.getAllForeignKeys(connection, tables); - const enums = await this.getAllEnumDefinitions(connection, tables); - for (const t of tables) { - const key = this.getTableKey(t); - const table = schema.addTable(t.table_name, t.schema_name, t.table_comment); - const pks = await this.getPrimaryKeys(connection, indexes[key], table.name, table.schema); - table.init(columns[key], indexes[key], checks[key], pks, fks[key], enums[key]); - } - } - async getAllIndexes(connection, tables) { - const sql = `select table_name as table_name, nullif(table_schema, schema()) as schema_name, index_name as index_name, non_unique as non_unique, column_name as column_name, index_type as index_type, sub_part as sub_part, collation as sort_order /*!80013 , expression as expression, is_visible as is_visible */ - from information_schema.statistics where table_schema = database() - and table_name in (${tables.map(t => this.platform.quoteValue(t.table_name)).join(', ')}) - order by schema_name, table_name, index_name, seq_in_index`; - const allIndexes = await connection.execute(sql); - const ret = {}; - for (const index of allIndexes) { - const key = this.getTableKey(index); - const indexDef = { - columnNames: [index.column_name], - keyName: index.index_name, - unique: !index.non_unique, - primary: index.index_name === 'PRIMARY', - constraint: !index.non_unique, - }; - // Capture column options (prefix length, sort order) - if (index.sub_part != null || index.sort_order === 'D') { - indexDef.columns = [ - { - name: index.column_name, - ...(index.sub_part != null && { length: index.sub_part }), - ...(index.sort_order === 'D' && { sort: 'DESC' }), - }, - ]; - } - // Capture index type for fulltext and spatial indexes - if (index.index_type === 'FULLTEXT') { - indexDef.type = 'fulltext'; - } else if (index.index_type === 'SPATIAL') { - /* v8 ignore next */ - indexDef.type = 'spatial'; - } - // Capture invisible flag (MySQL 8.0.13+) - if (index.is_visible === 'NO') { - indexDef.invisible = true; - } - if (!index.column_name || index.expression?.match(/ where /i)) { - indexDef.expression = index.expression; // required for the `getCreateIndexSQL()` call - indexDef.expression = this.getCreateIndexSQL(index.table_name, indexDef, !!index.expression); - } - ret[key] ??= []; - ret[key].push(indexDef); - } - for (const key of Object.keys(ret)) { - ret[key] = await this.mapIndexes(ret[key]); - } - return ret; - } - getCreateIndexSQL(tableName, index, partialExpression = false) { - /* v8 ignore next */ - if (index.expression && !partialExpression) { - return index.expression; - } - tableName = this.quote(tableName); - const keyName = this.quote(index.keyName); - let sql = `alter table ${tableName} add ${index.unique ? 'unique' : 'index'} ${keyName} `; - if (index.expression && partialExpression) { - sql += `(${index.expression})`; - return this.appendMySqlIndexSuffix(sql, index); - } - // JSON columns can have unique index but not unique constraint, and we need to distinguish those, so we can properly drop them - if (index.columnNames.some(column => column.includes('.'))) { - const columns = this.platform.getJsonIndexDefinition(index); - sql = `alter table ${tableName} add ${index.unique ? 'unique ' : ''}index ${keyName} `; - sql += `(${columns.join(', ')})`; - return this.appendMySqlIndexSuffix(sql, index); - } - // Build column list with advanced options - const columns = this.getIndexColumns(index); - sql += `(${columns})`; - return this.appendMySqlIndexSuffix(sql, index); - } - /** - * Build the column list for a MySQL index, with MySQL-specific handling for collation. - * MySQL requires collation to be specified as an expression: (column_name COLLATE collation_name) - */ - getIndexColumns(index) { - if (index.columns?.length) { - return index.columns - .map(col => { - const quotedName = this.quote(col.name); - // MySQL supports collation via expression: (column_name COLLATE collation_name) - // When collation is specified, wrap in parentheses as an expression - if (col.collation) { - let expr = col.length ? `${quotedName}(${col.length})` : quotedName; - expr = `(${expr} collate ${col.collation})`; - // Sort order comes after the expression - if (col.sort) { - expr += ` ${col.sort}`; - } - return expr; - } - // Standard column definition without collation - let colDef = quotedName; - // MySQL supports prefix length - if (col.length) { - colDef += `(${col.length})`; - } - // MySQL supports sort order - if (col.sort) { - colDef += ` ${col.sort}`; - } - return colDef; - }) - .join(', '); - } - return index.columnNames.map(c => this.quote(c)).join(', '); - } - /** - * Append MySQL-specific index suffixes like INVISIBLE. - */ - appendMySqlIndexSuffix(sql, index) { - // MySQL 8.0+ supports INVISIBLE indexes - if (index.invisible) { - sql += ' invisible'; - } - return sql; - } - async getAllColumns(connection, tables) { - const sql = `select table_name as table_name, - nullif(table_schema, schema()) as schema_name, - column_name as column_name, - column_default as column_default, - nullif(column_comment, '') as column_comment, - is_nullable as is_nullable, - data_type as data_type, - column_type as column_type, - column_key as column_key, - extra as extra, - generation_expression as generation_expression, - numeric_precision as numeric_precision, - numeric_scale as numeric_scale, - ifnull(datetime_precision, character_maximum_length) length - from information_schema.columns where table_schema = database() and table_name in (${tables.map(t => this.platform.quoteValue(t.table_name))}) - order by ordinal_position`; - const allColumns = await connection.execute(sql); - const str = val => (val != null ? '' + val : val); - const extra = val => - val.replace(/auto_increment|default_generated|(stored|virtual) generated/i, '').trim() || undefined; - const ret = {}; - for (const col of allColumns) { - const mappedType = this.platform.getMappedType(col.column_type); - const defaultValue = str( - this.normalizeDefaultValue( - mappedType.compareAsType() === 'boolean' && ['0', '1'].includes(col.column_default) - ? ['false', 'true'][+col.column_default] - : col.column_default, - col.length, - ), - ); - const key = this.getTableKey(col); - const generated = col.generation_expression - ? `(${col.generation_expression.replaceAll(`\\'`, `'`)}) ${col.extra.match(/stored generated/i) ? 'stored' : 'virtual'}` - : undefined; - ret[key] ??= []; - ret[key].push({ - name: col.column_name, - type: this.platform.isNumericColumn(mappedType) - ? col.column_type.replace(/ unsigned$/, '').replace(/\(\d+\)$/, '') - : col.column_type, - mappedType, - unsigned: col.column_type.endsWith(' unsigned'), - length: col.length, - default: this.wrap(defaultValue, mappedType), - nullable: col.is_nullable === 'YES', - primary: col.column_key === 'PRI', - unique: col.column_key === 'UNI', - autoincrement: col.extra === 'auto_increment', - precision: col.numeric_precision, - scale: col.numeric_scale, - comment: col.column_comment, - extra: extra(col.extra), - generated, - }); - } - return ret; - } - async getAllChecks(connection, tables) { - /* v8 ignore next */ - if (!(await this.supportsCheckConstraints(connection))) { - return {}; - } - const sql = this.getChecksSQL(tables); - const allChecks = await connection.execute(sql); - const ret = {}; - for (const check of allChecks) { - const key = this.getTableKey(check); - ret[key] ??= []; - ret[key].push({ - name: check.name, - columnName: check.column_name, - definition: `check ${check.expression}`, - expression: check.expression.replace(/^\((.*)\)$/, '$1'), - }); - } - return ret; - } - async getAllForeignKeys(connection, tables) { - const sql = `select k.constraint_name as constraint_name, nullif(k.table_schema, schema()) as schema_name, k.table_name as table_name, k.column_name as column_name, k.referenced_table_name as referenced_table_name, k.referenced_column_name as referenced_column_name, c.update_rule as update_rule, c.delete_rule as delete_rule - from information_schema.key_column_usage k - inner join information_schema.referential_constraints c on c.constraint_name = k.constraint_name and c.table_name = k.table_name - where k.table_name in (${tables.map(t => this.platform.quoteValue(t.table_name)).join(', ')}) - and k.table_schema = database() and c.constraint_schema = database() and k.referenced_column_name is not null - order by constraint_name, k.ordinal_position`; - const allFks = await connection.execute(sql); - const ret = {}; - for (const fk of allFks) { - const key = this.getTableKey(fk); - ret[key] ??= []; - ret[key].push(fk); - } - Object.keys(ret).forEach(key => { - const parts = key.split('.'); - /* v8 ignore next */ - const schemaName = parts.length > 1 ? parts[0] : undefined; - ret[key] = this.mapForeignKeys(ret[key], key, schemaName); - }); - return ret; - } - getPreAlterTable(tableDiff, safe) { - // Dropping primary keys requires to unset autoincrement attribute on the particular column first. - const pk = Object.values(tableDiff.removedIndexes).find(idx => idx.primary); - if (!pk || safe) { - return []; - } - return pk.columnNames - .filter(col => tableDiff.fromTable.hasColumn(col)) - .map(col => tableDiff.fromTable.getColumn(col)) - .filter(col => col.autoincrement) - .map( - col => - `alter table \`${tableDiff.name}\` modify \`${col.name}\` ${this.getColumnDeclarationSQL({ ...col, autoincrement: false })}`, - ); - } - getRenameColumnSQL(tableName, oldColumnName, to) { - tableName = this.quote(tableName); - oldColumnName = this.quote(oldColumnName); - const columnName = this.quote(to.name); - return `alter table ${tableName} change ${oldColumnName} ${columnName} ${this.getColumnDeclarationSQL(to)}`; - } - getRenameIndexSQL(tableName, index, oldIndexName) { - tableName = this.quote(tableName); - oldIndexName = this.quote(oldIndexName); - const keyName = this.quote(index.keyName); - return [`alter table ${tableName} rename index ${oldIndexName} to ${keyName}`]; - } - getChangeColumnCommentSQL(tableName, to, schemaName) { - tableName = this.quote(tableName); - const columnName = this.quote(to.name); - return `alter table ${tableName} modify ${columnName} ${this.getColumnDeclarationSQL(to)}`; - } - alterTableColumn(column, table, changedProperties) { - const col = this.createTableColumn(column, table, changedProperties); - return [`alter table ${table.getQuotedName()} modify ${col}`]; - } - getColumnDeclarationSQL(col) { - let ret = col.type; - ret += col.unsigned ? ' unsigned' : ''; - ret += col.autoincrement ? ' auto_increment' : ''; - ret += ' '; - ret += col.nullable ? 'null' : 'not null'; - ret += col.default ? ' default ' + col.default : ''; - ret += col.comment ? ` comment ${this.platform.quoteValue(col.comment)}` : ''; - return ret; - } - async getAllEnumDefinitions(connection, tables) { - const sql = `select column_name as column_name, column_type as column_type, table_name as table_name - from information_schema.columns - where data_type = 'enum' and table_name in (${tables.map(t => `'${t.table_name}'`).join(', ')}) and table_schema = database()`; - const enums = await connection.execute(sql); - return enums.reduce((o, item) => { - o[item.table_name] ??= {}; - o[item.table_name][item.column_name] = item.column_type - .match(/enum\((.*)\)/)[1] - .split(',') - .map(item => /'(.*)'/.exec(item)[1]); - return o; - }, {}); - } - async supportsCheckConstraints(connection) { - if (this.#cache.supportsCheckConstraints != null) { - return this.#cache.supportsCheckConstraints; - } - const sql = `select 1 from information_schema.tables where table_name = 'CHECK_CONSTRAINTS' and table_schema = 'information_schema'`; - const res = await connection.execute(sql); - return (this.#cache.supportsCheckConstraints = res.length > 0); - } - getChecksSQL(tables) { - return `select cc.constraint_schema as table_schema, tc.table_name as table_name, cc.constraint_name as name, cc.check_clause as expression - from information_schema.check_constraints cc - join information_schema.table_constraints tc - on tc.constraint_schema = cc.constraint_schema - and tc.constraint_name = cc.constraint_name - and constraint_type = 'CHECK' - where tc.table_name in (${tables.map(t => this.platform.quoteValue(t.table_name))}) and tc.constraint_schema = database() - order by tc.constraint_name`; - } - normalizeDefaultValue(defaultValue, length) { - return super.normalizeDefaultValue(defaultValue, length, MySqlSchemaHelper.DEFAULT_VALUES); - } - wrap(val, type) { - const stringType = type instanceof StringType || type instanceof TextType || type instanceof EnumType; - return typeof val === 'string' && val.length > 0 && stringType ? this.platform.quoteValue(val) : val; - } -} diff --git a/node_modules/@mikro-orm/sql/dialects/mysql/index.d.ts b/node_modules/@mikro-orm/sql/dialects/mysql/index.d.ts deleted file mode 100644 index 7e2afa5..0000000 --- a/node_modules/@mikro-orm/sql/dialects/mysql/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './MySqlSchemaHelper.js'; -export * from './BaseMySqlPlatform.js'; -export * from './MySqlNativeQueryBuilder.js'; diff --git a/node_modules/@mikro-orm/sql/dialects/mysql/index.js b/node_modules/@mikro-orm/sql/dialects/mysql/index.js deleted file mode 100644 index 7e2afa5..0000000 --- a/node_modules/@mikro-orm/sql/dialects/mysql/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export * from './MySqlSchemaHelper.js'; -export * from './BaseMySqlPlatform.js'; -export * from './MySqlNativeQueryBuilder.js'; diff --git a/node_modules/@mikro-orm/sql/dialects/oracledb/OracleDialect.d.ts b/node_modules/@mikro-orm/sql/dialects/oracledb/OracleDialect.d.ts deleted file mode 100644 index 5918b5b..0000000 --- a/node_modules/@mikro-orm/sql/dialects/oracledb/OracleDialect.d.ts +++ /dev/null @@ -1,107 +0,0 @@ -import { - type AliasNode, - CompiledQuery, - type DatabaseConnection, - type DatabaseIntrospector, - DefaultQueryCompiler, - type Dialect, - DialectAdapterBase, - type Driver, - type Kysely, - type QueryCompiler, - type QueryResult, - type TransactionSettings, -} from 'kysely'; -/** - * Subset of oracledb's Pool interface used by the dialect. - * We define our own interface to avoid importing the `oracledb` package directly. - */ -export interface OraclePool { - getConnection(): Promise; - close(drainTime?: number): Promise; -} -/** - * Subset of oracledb's Connection interface used by the dialect. - */ -export interface OraclePoolConnection { - execute( - sql: string, - params: unknown[], - options?: Record, - ): Promise<{ - rows?: R[]; - rowsAffected?: number; - resultSet?: OracleResultSet; - outBinds?: unknown; - }>; - commit(): Promise; - rollback(): Promise; - close(): Promise; -} -interface OracleResultSet { - getRow(): Promise; - close(): Promise; -} -declare class OracleQueryCompiler extends DefaultQueryCompiler { - protected getLeftIdentifierWrapper(): string; - protected getRightIdentifierWrapper(): string; - protected visitAlias(node: AliasNode): void; -} -declare class OracleAdapter extends DialectAdapterBase { - #private; - get supportsReturning(): boolean; - get supportsTransactionalDdl(): boolean; - acquireMigrationLock(_: Kysely): Promise; - releaseMigrationLock(_: Kysely): Promise; -} -declare class OracleConnection implements DatabaseConnection { - #private; - readonly id: number; - constructor(connection: OraclePoolConnection, executeOptions?: Record); - executeQuery(compiledQuery: CompiledQuery): Promise>; - formatQuery(query: CompiledQuery): { - sql: string; - bindParams: unknown[]; - }; - streamQuery(compiledQuery: CompiledQuery, _chunkSize?: number): AsyncIterableIterator>; - get connection(): OraclePoolConnection; -} -declare class OracleDriver implements Driver { - #private; - constructor(config: OracleDialectConfig); - init(): Promise; - acquireConnection(): Promise; - savepoint( - connection: OracleConnection, - savepointName: string, - compileQuery: QueryCompiler['compileQuery'], - ): Promise; - rollbackToSavepoint( - connection: OracleConnection, - savepointName: string, - compileQuery: QueryCompiler['compileQuery'], - ): Promise; - releaseSavepoint( - connection: OracleConnection, - savepointName: string, - compileQuery: QueryCompiler['compileQuery'], - ): Promise; - beginTransaction(connection: OracleConnection, settings: TransactionSettings): Promise; - commitTransaction(connection: OracleConnection): Promise; - rollbackTransaction(connection: OracleConnection): Promise; - releaseConnection(connection: OracleConnection): Promise; - destroy(): Promise; -} -export interface OracleDialectConfig { - pool: OraclePool; - executeOptions?: Record; -} -export declare class OracleDialect implements Dialect { - #private; - constructor(config: OracleDialectConfig); - createDriver(): OracleDriver; - createAdapter(): OracleAdapter; - createIntrospector(db: Kysely): DatabaseIntrospector; - createQueryCompiler(): OracleQueryCompiler; -} -export {}; diff --git a/node_modules/@mikro-orm/sql/dialects/oracledb/OracleDialect.js b/node_modules/@mikro-orm/sql/dialects/oracledb/OracleDialect.js deleted file mode 100644 index 01fcafd..0000000 --- a/node_modules/@mikro-orm/sql/dialects/oracledb/OracleDialect.js +++ /dev/null @@ -1,172 +0,0 @@ -// inlined https://github.com/griffiths-waite/kysely-oracledb with minor adjustments -/* v8 ignore start: internal Kysely driver integration, tested through the main Oracle driver */ -import { - CompiledQuery, - createQueryId, - DefaultQueryCompiler, - DialectAdapterBase, - IdentifierNode, - RawNode, -} from 'kysely'; -function parseSavepointCommand(command, savepointName) { - return RawNode.createWithChildren([ - RawNode.createWithSql(`${command} `), - IdentifierNode.create(savepointName), // ensures savepointName gets sanitized - ]); -} -class OracleQueryCompiler extends DefaultQueryCompiler { - getLeftIdentifierWrapper() { - return ''; - } - getRightIdentifierWrapper() { - return ''; - } - visitAlias(node) { - this.visitNode(node.node); - this.append(' '); - this.visitNode(node.alias); - } -} -class OracleAdapter extends DialectAdapterBase { - #supportsReturning = false; - #supportsTransactionalDdl = false; - get supportsReturning() { - return this.#supportsReturning; - } - get supportsTransactionalDdl() { - return this.#supportsTransactionalDdl; - } - async acquireMigrationLock(_) { - throw new Error('Not implemented'); - } - async releaseMigrationLock(_) { - throw new Error('Not implemented'); - } -} -const OUT_FORMAT_OBJECT = 4002; -let i = 0; -class OracleConnection { - id = i++; - #executeOptions; - #connection; - constructor(connection, executeOptions) { - this.#executeOptions = executeOptions ?? {}; - this.#connection = connection; - } - async executeQuery(compiledQuery) { - const { sql, bindParams } = this.formatQuery(compiledQuery); - const result = await this.#connection.execute(sql, bindParams, { - autoCommit: compiledQuery.autoCommit, - outFormat: OUT_FORMAT_OBJECT, - ...this.#executeOptions, - }); - return { - rows: result?.rows || [], - numAffectedRows: result.rowsAffected ? BigInt(result.rowsAffected) : undefined, - // @ts-ignore internal extension for Oracle returning clause - outBinds: result.outBinds, - }; - } - formatQuery(query) { - return { - sql: query.sql.replace(/\$(\d+)/g, (_match, p1) => `:${parseInt(p1, 10) - 1}`), // Format bind params in Oracle syntax :0, :1, etc. - bindParams: query.parameters, - }; - } - async *streamQuery(compiledQuery, _chunkSize) { - const { sql, bindParams } = this.formatQuery(compiledQuery); - const result = await this.#connection.execute(sql, bindParams, { - resultSet: true, - autoCommit: compiledQuery.autoCommit, - outFormat: OUT_FORMAT_OBJECT, - ...this.#executeOptions, - }); - const rs = result.resultSet; - try { - let row; - while ((row = await rs.getRow())) { - yield { rows: [row] }; - } - } finally { - await rs.close(); - } - } - get connection() { - return this.#connection; - } -} -class OracleDriver { - #config; - #connections = new Set(); - constructor(config) { - this.#config = config; - } - async init() { - // - } - async acquireConnection() { - const connection = new OracleConnection(await this.#config.pool.getConnection(), this.#config.executeOptions); - this.#connections.add(connection); - return connection; - } - async savepoint(connection, savepointName, compileQuery) { - await connection.executeQuery(compileQuery(parseSavepointCommand('savepoint', savepointName), createQueryId())); - } - async rollbackToSavepoint(connection, savepointName, compileQuery) { - await connection.executeQuery( - compileQuery(parseSavepointCommand('rollback to savepoint', savepointName), createQueryId()), - ); - } - async releaseSavepoint(connection, savepointName, compileQuery) { - // - } - async beginTransaction(connection, settings) { - if (settings.accessMode) { - await connection.executeQuery(CompiledQuery.raw(`set transaction ${settings.accessMode}`)); - return; - } - if (settings.isolationLevel) { - await connection.executeQuery(CompiledQuery.raw(`set transaction isolation level ${settings.isolationLevel}`)); - } - } - async commitTransaction(connection) { - await connection.connection.commit(); - } - async rollbackTransaction(connection) { - await connection.connection.rollback(); - } - async releaseConnection(connection) { - try { - await connection.connection.close(); - } catch (err) { - // - } finally { - this.#connections.delete(connection); - } - } - async destroy() { - for (const connection of this.#connections) { - await this.releaseConnection(connection); - } - await this.#config.pool?.close(0); - } -} -export class OracleDialect { - #config; - constructor(config) { - this.#config = config; - } - createDriver() { - return new OracleDriver(this.#config); - } - createAdapter() { - return new OracleAdapter(); - } - createIntrospector(db) { - throw new Error('Not implemented'); - } - createQueryCompiler() { - return new OracleQueryCompiler(); - } -} -/* v8 ignore stop */ diff --git a/node_modules/@mikro-orm/sql/dialects/oracledb/OracleNativeQueryBuilder.d.ts b/node_modules/@mikro-orm/sql/dialects/oracledb/OracleNativeQueryBuilder.d.ts deleted file mode 100644 index fcf6d32..0000000 --- a/node_modules/@mikro-orm/sql/dialects/oracledb/OracleNativeQueryBuilder.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { type Dictionary } from '@mikro-orm/core'; -import { NativeQueryBuilder } from '../../query/NativeQueryBuilder.js'; -/** @internal */ -export declare function markOutBindings(obj: Dictionary): void; -/** @internal */ -export declare class OracleNativeQueryBuilder extends NativeQueryBuilder { - as(alias: string): this; - compile(): { - sql: string; - params: unknown[]; - }; - protected compileTruncate(): void; - protected combineParts(): { - sql: string; - params: unknown[]; - }; - private compileUpsert; - protected compileSelect(): void; -} diff --git a/node_modules/@mikro-orm/sql/dialects/oracledb/OracleNativeQueryBuilder.js b/node_modules/@mikro-orm/sql/dialects/oracledb/OracleNativeQueryBuilder.js deleted file mode 100644 index dee0be8..0000000 --- a/node_modules/@mikro-orm/sql/dialects/oracledb/OracleNativeQueryBuilder.js +++ /dev/null @@ -1,245 +0,0 @@ -import { raw, RawQueryFragment, Utils } from '@mikro-orm/core'; -import { QueryType } from '../../query/enums.js'; -import { NativeQueryBuilder } from '../../query/NativeQueryBuilder.js'; -/** @internal */ -export function markOutBindings(obj) { - Object.defineProperty(obj, '__outBindings', { - value: true, - writable: true, - configurable: true, - enumerable: false, - }); -} -/** @internal */ -export class OracleNativeQueryBuilder extends NativeQueryBuilder { - as(alias) { - this.wrap('(', `) ${this.platform.quoteIdentifier(alias)}`); - return this; - } - compile() { - if (!this.type) { - throw new Error('No query type provided'); - } - this.parts.length = 0; - this.params.length = 0; - /* v8 ignore next 3: query comment branch */ - if (this.options.comment) { - this.parts.push(...this.options.comment.map(comment => `/* ${comment} */`)); - } - let copy; - if (this.options.onConflict && !Utils.isEmpty(Utils.asArray(this.options.data)[0])) { - this.compileUpsert(); - } else { - if (this.options.returning && Array.isArray(this.options.data) && this.options.data.length > 1) { - copy = [...this.options.data]; - this.options.data.length = 1; - } - switch (this.type) { - case QueryType.SELECT: - case QueryType.COUNT: - this.compileSelect(); - break; - case QueryType.INSERT: - this.compileInsert(); - break; - case QueryType.UPDATE: - this.compileUpdate(); - break; - case QueryType.DELETE: - this.compileDelete(); - break; - case QueryType.TRUNCATE: - this.compileTruncate(); - break; - } - this.addOnConflictClause(); - } - if (this.options.returning) { - const isUpsert = this.options.onConflict && !Utils.isEmpty(Utils.asArray(this.options.data)[0]); - const prefix = isUpsert ? `${this.getTableName()}.` : ''; - const fields = this.options.returning.map(field => prefix + this.quote(Array.isArray(field) ? field[0] : field)); - const into = this.options.returning.map(field => ':out_' + (Array.isArray(field) ? field[0] : field)); - const outBindings = this.options.returning.map(field => { - const name = 'out_' + (Array.isArray(field) ? field[0] : field); - const type = Array.isArray(field) ? field[1] : 'string'; - return [name, type]; - }); - markOutBindings(outBindings); - this.parts.push(`returning ${fields.join(', ')}`); - this.parts.push(`into ${into.join(', ')}`); - this.params.push(outBindings); - } - this.addLockClause(); - if (!copy) { - return this.combineParts(); - } - // multi insert with returning - const sql = this.parts.join(' '); - const blockLines = []; - const block2Lines = []; - const keys = Object.keys(copy[0]); - const last = this.params[this.params.length - 1]; - /* v8 ignore next 3: defensive check — output bindings are always set by compile() */ - if (!Array.isArray(last) || !('__outBindings' in last) || !last.__outBindings) { - throw new Error('Output bindings are required for multi insert with returning'); - } - const outBindings = {}; - markOutBindings(outBindings); - for (let i = 0; i < copy.length; i++) { - const params = []; - for (const key of keys) { - /* v8 ignore next 3: undefined value branch in multi-insert */ - if (typeof copy[i][key] === 'undefined') { - params.push(this.platform.usesDefaultKeyword() ? raw('default') : null); - } else { - params.push(copy[i][key]); - } - } - // we need to interpolate to allow proper escaping - const formatted = this.platform.formatQuery(sql, params).replaceAll(`'`, `''`); - /* v8 ignore next 3: returning field type branches */ - const using = this.options.returning.map(field => { - const name = Array.isArray(field) ? field[0] : field; - const type = Array.isArray(field) ? field[1] : 'string'; - outBindings[`out_${name}__${i}`] = { - dir: this.platform.mapToBindType('out'), - type: this.platform.mapToBindType(type), - }; - return `out :out_${name}__${i}`; - }); - blockLines.push(` execute immediate '${formatted}' using ${using.join(', ')};`); - block2Lines.push(` execute immediate '${sql}' using ${using.join(', ')};`); - } - const block = `begin\n${blockLines.join('\n')}\n end;`; - const block2 = `begin\n${block2Lines.join('\n')}\n end;`; - // save raw query without interpolation for logging, - Object.defineProperty(outBindings, '__rawQuery', { - value: block2, - writable: true, - configurable: true, - enumerable: false, - }); - this.options.data = copy; - return { sql: block, params: [outBindings] }; - } - compileTruncate() { - super.compileTruncate(); - this.parts.push('drop all storage cascade'); - } - combineParts() { - let sql = this.parts.join(' '); - const last = this.params[this.params.length - 1]; - if (this.options.wrap) { - const [a, b] = this.options.wrap; - sql = `${a}${sql}${b}`; - } - if (!(Array.isArray(last) && '__outBindings' in last && last.__outBindings)) { - return { sql, params: this.params }; - } - const out = this.params.pop(); - const outBindings = {}; - markOutBindings(outBindings); - this.params.push(outBindings); - for (const item of out) { - outBindings[item[0]] = { - dir: this.platform.mapToBindType('out'), - type: this.platform.mapToBindType(item[1]), - }; - } - return { sql, params: this.params }; - } - compileUpsert() { - const clause = this.options.onConflict; - const dataAsArray = Utils.asArray(this.options.data); - const keys = Object.keys(dataAsArray[0]); - const parts = []; - for (const data of dataAsArray) { - for (const key of keys) { - this.params.push(data[key]); - } - parts.push(`select ${keys.map(k => `? as ${this.quote(k)}`).join(', ')} from dual`); - } - this.parts.push(`merge into ${this.getTableName()}`); - this.parts.push(`using (${parts.join(' union all ')}) tsource`); - /* v8 ignore next 4: RawQueryFragment conflict fields branch */ - if (clause.fields instanceof RawQueryFragment) { - this.parts.push(clause.fields.sql); - this.params.push(...clause.fields.params); - } else if (clause.fields.length > 0) { - const fields = clause.fields.map(field => { - const col = this.quote(field); - return `${this.getTableName()}.${col} = tsource.${col}`; - }); - this.parts.push(`on (${fields.join(' and ')})`); - } - const sourceColumns = keys.map(field => `tsource.${this.quote(field)}`).join(', '); - const destinationColumns = keys.map(field => this.quote(field)).join(', '); - this.parts.push(`when not matched then insert (${destinationColumns}) values (${sourceColumns})`); - if (!clause.ignore) { - /* v8 ignore next: merge type branch */ - if (!clause.merge || Array.isArray(clause.merge)) { - const mergeParts = (clause.merge || keys) - .filter(field => !Array.isArray(clause.fields) || !clause.fields.includes(field)) - .filter(field => keys.includes(field)) // only reference columns present in the source data - .map(column => `${this.quote(column)} = tsource.${this.quote(column)}`); - /* v8 ignore next 10: empty mergeParts branch */ - if (mergeParts.length > 0) { - this.parts.push('when matched'); - if (clause.where) { - this.parts.push(`and ${clause.where.sql}`); - this.params.push(...clause.where.params); - } - this.parts.push('then update set'); - this.parts.push(mergeParts.join(', ')); - } - } /* v8 ignore start: object-form merge branch */ else if (typeof clause.merge === 'object') { - this.parts.push('when matched'); - if (clause.where) { - this.parts.push(`and ${clause.where.sql}`); - this.params.push(...clause.where.params); - } - this.parts.push('then update set'); - const parts = Object.entries(clause.merge).map(([key, value]) => { - this.params.push(value); - return `${this.getTableName()}.${this.quote(key)} = ?`; - }); - this.parts.push(parts.join(', ')); - } - /* v8 ignore stop */ - } - } - compileSelect() { - this.parts.push('select'); - this.addHintComment(); - this.parts.push(`${this.getFields()} from ${this.getTableName()}`); - if (this.options.joins) { - for (const join of this.options.joins) { - this.parts.push(join.sql); - this.params.push(...join.params); - } - } - if (this.options.where?.sql.trim()) { - this.parts.push(`where ${this.options.where.sql}`); - this.params.push(...this.options.where.params); - } - if (this.options.groupBy) { - const fields = this.options.groupBy.map(field => this.quote(field)); - this.parts.push(`group by ${fields.join(', ')}`); - } - if (this.options.having) { - this.parts.push(`having ${this.options.having.sql}`); - this.params.push(...this.options.having.params); - } - if (this.options.orderBy) { - this.parts.push(`order by ${this.options.orderBy}`); - } - if (this.options.offset != null) { - this.parts.push(`offset ? rows`); - this.params.push(this.options.offset); - } - if (this.options.limit != null) { - this.parts.push(`fetch next ? rows only`); - this.params.push(this.options.limit); - } - } -} diff --git a/node_modules/@mikro-orm/sql/dialects/oracledb/index.d.ts b/node_modules/@mikro-orm/sql/dialects/oracledb/index.d.ts deleted file mode 100644 index bc644f1..0000000 --- a/node_modules/@mikro-orm/sql/dialects/oracledb/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './OracleDialect.js'; -export * from './OracleNativeQueryBuilder.js'; diff --git a/node_modules/@mikro-orm/sql/dialects/oracledb/index.js b/node_modules/@mikro-orm/sql/dialects/oracledb/index.js deleted file mode 100644 index bc644f1..0000000 --- a/node_modules/@mikro-orm/sql/dialects/oracledb/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export * from './OracleDialect.js'; -export * from './OracleNativeQueryBuilder.js'; diff --git a/node_modules/@mikro-orm/sql/dialects/postgresql/BasePostgreSqlPlatform.d.ts b/node_modules/@mikro-orm/sql/dialects/postgresql/BasePostgreSqlPlatform.d.ts deleted file mode 100644 index ee201f1..0000000 --- a/node_modules/@mikro-orm/sql/dialects/postgresql/BasePostgreSqlPlatform.d.ts +++ /dev/null @@ -1,115 +0,0 @@ -import { - type EntityProperty, - type IsolationLevel, - RawQueryFragment, - type SimpleColumnMeta, - Type, -} from '@mikro-orm/core'; -import { AbstractSqlPlatform } from '../../AbstractSqlPlatform.js'; -import type { IndexDef } from '../../typings.js'; -import { PostgreSqlNativeQueryBuilder } from './PostgreSqlNativeQueryBuilder.js'; -import { PostgreSqlSchemaHelper } from './PostgreSqlSchemaHelper.js'; -import { PostgreSqlExceptionConverter } from './PostgreSqlExceptionConverter.js'; -export declare class BasePostgreSqlPlatform extends AbstractSqlPlatform { - #private; - protected readonly schemaHelper: PostgreSqlSchemaHelper; - protected readonly exceptionConverter: PostgreSqlExceptionConverter; - createNativeQueryBuilder(): PostgreSqlNativeQueryBuilder; - usesReturningStatement(): boolean; - usesCascadeStatement(): boolean; - supportsNativeEnums(): boolean; - usesEnumCheckConstraints(): boolean; - supportsMaterializedViews(): boolean; - supportsCustomPrimaryKeyNames(): boolean; - getCurrentTimestampSQL(length: number): string; - getDateTimeTypeDeclarationSQL(column: { length?: number }): string; - getDefaultDateTimeLength(): number; - getTimeTypeDeclarationSQL(): string; - getIntegerTypeDeclarationSQL(column: { length?: number; autoincrement?: boolean; generated?: string }): string; - getBigIntTypeDeclarationSQL(column: { autoincrement?: boolean }): string; - getTinyIntTypeDeclarationSQL(column: { length?: number; unsigned?: boolean; autoincrement?: boolean }): string; - getUuidTypeDeclarationSQL(column: { length?: number }): string; - getFullTextWhereClause(prop: EntityProperty): string; - supportsCreatingFullTextIndex(): boolean; - getFullTextIndexExpression( - indexName: string, - schemaName: string | undefined, - tableName: string, - columns: SimpleColumnMeta[], - ): string; - normalizeColumnType( - type: string, - options: { - length?: number; - precision?: number; - scale?: number; - autoincrement?: boolean; - }, - ): string; - getMappedType(type: string): Type; - getRegExpOperator(val?: unknown, flags?: string): string; - getRegExpValue(val: RegExp): { - $re: string; - $flags?: string; - }; - isBigIntProperty(prop: EntityProperty): boolean; - getArrayDeclarationSQL(): string; - getFloatDeclarationSQL(): string; - getDoubleDeclarationSQL(): string; - getEnumTypeDeclarationSQL(column: { fieldNames: string[]; items?: unknown[]; nativeEnumName?: string }): string; - supportsMultipleStatements(): boolean; - getBeginTransactionSQL(options?: { isolationLevel?: IsolationLevel; readOnly?: boolean }): string[]; - marshallArray(values: string[]): string; - unmarshallArray(value: string): string[]; - getVarcharTypeDeclarationSQL(column: { length?: number }): string; - getCharTypeDeclarationSQL(column: { length?: number }): string; - getIntervalTypeDeclarationSQL(column: { length?: number }): string; - getBlobDeclarationSQL(): string; - getJsonDeclarationSQL(): string; - getSearchJsonPropertyKey( - path: string[], - type: string | undefined | Type, - aliased: boolean, - value?: unknown, - ): string | RawQueryFragment; - getJsonIndexDefinition(index: IndexDef): string[]; - quoteIdentifier( - id: - | string - | { - toString: () => string; - }, - quote?: string, - ): string; - private pad; - /** @internal */ - formatDate(date: Date): string; - indexForeignKeys(): boolean; - getDefaultMappedType(type: string): Type; - supportsSchemas(): boolean; - getDefaultSchemaName(): string | undefined; - /** - * Returns the default name of index for the given columns - * cannot go past 63 character length for identifiers in MySQL - */ - getIndexName( - tableName: string, - columns: string[], - type: 'index' | 'unique' | 'foreign' | 'primary' | 'sequence', - ): string; - getDefaultPrimaryName(tableName: string, columns: string[]): string; - /** - * @inheritDoc - */ - castColumn(prop?: { columnTypes?: string[] }): string; - getJsonArrayFromSQL( - column: string, - alias: string, - _properties: { - name: string; - type: string; - }[], - ): string; - getJsonArrayElementPropertySQL(alias: string, property: string, type: string): string; - getDefaultClientUrl(): string; -} diff --git a/node_modules/@mikro-orm/sql/dialects/postgresql/BasePostgreSqlPlatform.js b/node_modules/@mikro-orm/sql/dialects/postgresql/BasePostgreSqlPlatform.js deleted file mode 100644 index 4d5e483..0000000 --- a/node_modules/@mikro-orm/sql/dialects/postgresql/BasePostgreSqlPlatform.js +++ /dev/null @@ -1,363 +0,0 @@ -import { ALIAS_REPLACEMENT, ARRAY_OPERATORS, raw, RawQueryFragment, Type, Utils } from '@mikro-orm/core'; -import { AbstractSqlPlatform } from '../../AbstractSqlPlatform.js'; -import { PostgreSqlNativeQueryBuilder } from './PostgreSqlNativeQueryBuilder.js'; -import { PostgreSqlSchemaHelper } from './PostgreSqlSchemaHelper.js'; -import { PostgreSqlExceptionConverter } from './PostgreSqlExceptionConverter.js'; -import { FullTextType } from './FullTextType.js'; -export class BasePostgreSqlPlatform extends AbstractSqlPlatform { - schemaHelper = new PostgreSqlSchemaHelper(this); - exceptionConverter = new PostgreSqlExceptionConverter(); - /** Maps JS runtime type names to PostgreSQL cast types for JSON property access. @internal */ - #jsonTypeCasts = { number: 'float8', bigint: 'int8', boolean: 'bool' }; - createNativeQueryBuilder() { - return new PostgreSqlNativeQueryBuilder(this); - } - usesReturningStatement() { - return true; - } - usesCascadeStatement() { - return true; - } - supportsNativeEnums() { - return true; - } - usesEnumCheckConstraints() { - return true; - } - supportsMaterializedViews() { - return true; - } - supportsCustomPrimaryKeyNames() { - return true; - } - getCurrentTimestampSQL(length) { - return `current_timestamp(${length})`; - } - getDateTimeTypeDeclarationSQL(column) { - /* v8 ignore next */ - return 'timestamptz' + (column.length != null ? `(${column.length})` : ''); - } - getDefaultDateTimeLength() { - return 6; - } - getTimeTypeDeclarationSQL() { - return 'time(0)'; - } - getIntegerTypeDeclarationSQL(column) { - if (column.autoincrement && !column.generated) { - return 'serial'; - } - return 'int'; - } - getBigIntTypeDeclarationSQL(column) { - /* v8 ignore next */ - if (column.autoincrement) { - return `bigserial`; - } - return 'bigint'; - } - getTinyIntTypeDeclarationSQL(column) { - return 'smallint'; - } - getUuidTypeDeclarationSQL(column) { - return `uuid`; - } - getFullTextWhereClause(prop) { - if (prop.customType instanceof FullTextType) { - return `:column: @@ plainto_tsquery('${prop.customType.regconfig}', :query)`; - } - /* v8 ignore next */ - if (prop.columnTypes[0] === 'tsvector') { - return `:column: @@ plainto_tsquery('simple', :query)`; - } - return `to_tsvector('simple', :column:) @@ plainto_tsquery('simple', :query)`; - } - supportsCreatingFullTextIndex() { - return true; - } - getFullTextIndexExpression(indexName, schemaName, tableName, columns) { - /* v8 ignore next */ - const quotedTableName = this.quoteIdentifier(schemaName ? `${schemaName}.${tableName}` : tableName); - const quotedColumnNames = columns.map(c => this.quoteIdentifier(c.name)); - const quotedIndexName = this.quoteIdentifier(indexName); - if (columns.length === 1 && columns[0].type === 'tsvector') { - return `create index ${quotedIndexName} on ${quotedTableName} using gin(${quotedColumnNames[0]})`; - } - return `create index ${quotedIndexName} on ${quotedTableName} using gin(to_tsvector('simple', ${quotedColumnNames.join(` || ' ' || `)}))`; - } - normalizeColumnType(type, options) { - const simpleType = this.extractSimpleType(type); - if (['int', 'int4', 'integer'].includes(simpleType)) { - return this.getIntegerTypeDeclarationSQL({}); - } - if (['bigint', 'int8'].includes(simpleType)) { - return this.getBigIntTypeDeclarationSQL({}); - } - if (['smallint', 'int2'].includes(simpleType)) { - return this.getSmallIntTypeDeclarationSQL({}); - } - if (['boolean', 'bool'].includes(simpleType)) { - return this.getBooleanTypeDeclarationSQL(); - } - if (['varchar', 'character varying'].includes(simpleType)) { - return this.getVarcharTypeDeclarationSQL(options); - } - if (['char', 'bpchar'].includes(simpleType)) { - return this.getCharTypeDeclarationSQL(options); - } - if (['decimal', 'numeric'].includes(simpleType)) { - return this.getDecimalTypeDeclarationSQL(options); - } - if (['interval'].includes(simpleType)) { - return this.getIntervalTypeDeclarationSQL(options); - } - return super.normalizeColumnType(type, options); - } - getMappedType(type) { - switch (this.extractSimpleType(type)) { - case 'tsvector': - return Type.getType(FullTextType); - default: - return super.getMappedType(type); - } - } - getRegExpOperator(val, flags) { - /* v8 ignore next */ - if ((val instanceof RegExp && val.flags.includes('i')) || flags?.includes('i')) { - return '~*'; - } - return '~'; - } - /* v8 ignore next */ - getRegExpValue(val) { - if (val.flags.includes('i')) { - return { $re: val.source, $flags: val.flags }; - } - return { $re: val.source }; - } - isBigIntProperty(prop) { - return super.isBigIntProperty(prop) || ['bigserial', 'int8'].includes(prop.columnTypes?.[0]); - } - getArrayDeclarationSQL() { - return 'text[]'; - } - getFloatDeclarationSQL() { - return 'real'; - } - getDoubleDeclarationSQL() { - return 'double precision'; - } - getEnumTypeDeclarationSQL(column) { - /* v8 ignore next */ - if (column.nativeEnumName) { - return column.nativeEnumName; - } - if (column.items?.every(item => typeof item === 'string')) { - return 'text'; - } - return `smallint`; - } - supportsMultipleStatements() { - return true; - } - getBeginTransactionSQL(options) { - if (options?.isolationLevel || options?.readOnly) { - let sql = 'start transaction'; - sql += options.isolationLevel ? ` isolation level ${options.isolationLevel}` : ''; - sql += options.readOnly ? ` read only` : ''; - return [sql]; - } - return ['begin']; - } - marshallArray(values) { - const quote = v => (v === '' || /["{},\\]/.exec(v) ? JSON.stringify(v) : v); - return `{${values.map(v => quote('' + v)).join(',')}}`; - } - /* v8 ignore next */ - unmarshallArray(value) { - if (value === '{}') { - return []; - } - return value - .substring(1, value.length - 1) - .split(',') - .map(v => { - if (v === `""`) { - return ''; - } - if (/"(.*)"/.exec(v)) { - return v.substring(1, v.length - 1).replaceAll('\\"', '"'); - } - return v; - }); - } - getVarcharTypeDeclarationSQL(column) { - if (column.length === -1) { - return 'varchar'; - } - return super.getVarcharTypeDeclarationSQL(column); - } - getCharTypeDeclarationSQL(column) { - if (column.length === -1) { - return 'char'; - } - return super.getCharTypeDeclarationSQL(column); - } - getIntervalTypeDeclarationSQL(column) { - return 'interval' + (column.length != null ? `(${column.length})` : ''); - } - getBlobDeclarationSQL() { - return 'bytea'; - } - getJsonDeclarationSQL() { - return 'jsonb'; - } - getSearchJsonPropertyKey(path, type, aliased, value) { - const first = path.shift(); - const last = path.pop(); - const root = this.quoteIdentifier(aliased ? `${ALIAS_REPLACEMENT}.${first}` : first); - type = typeof type === 'string' ? this.getMappedType(type).runtimeType : String(type); - const cast = key => raw(type in this.#jsonTypeCasts ? `(${key})::${this.#jsonTypeCasts[type]}` : key); - let lastOperator = '->>'; - // force `->` for operator payloads with array values - if ( - Utils.isPlainObject(value) && - Object.keys(value).every(key => ARRAY_OPERATORS.includes(key) && Array.isArray(value[key])) - ) { - lastOperator = '->'; - } - if (path.length === 0) { - return cast(`${root}${lastOperator}'${last}'`); - } - return cast(`${root}->${path.map(a => this.quoteValue(a)).join('->')}${lastOperator}'${last}'`); - } - getJsonIndexDefinition(index) { - return index.columnNames.map(column => { - if (!column.includes('.')) { - return column; - } - const path = column.split('.'); - const first = path.shift(); - const last = path.pop(); - if (path.length === 0) { - return `(${this.quoteIdentifier(first)}->>${this.quoteValue(last)})`; - } - return `(${this.quoteIdentifier(first)}->${path.map(c => this.quoteValue(c)).join('->')}->>${this.quoteValue(last)})`; - }); - } - quoteIdentifier(id, quote = '"') { - if (RawQueryFragment.isKnownFragment(id)) { - return super.quoteIdentifier(id); - } - return `${quote}${id.toString().replace('.', `${quote}.${quote}`)}${quote}`; - } - pad(number, digits) { - return String(number).padStart(digits, '0'); - } - /** @internal */ - formatDate(date) { - if (this.timezone === 'Z') { - return date.toISOString(); - } - let offset = -date.getTimezoneOffset(); - let year = date.getFullYear(); - const isBCYear = year < 1; - /* v8 ignore next */ - if (isBCYear) { - year = Math.abs(year) + 1; - } - const datePart = `${this.pad(year, 4)}-${this.pad(date.getMonth() + 1, 2)}-${this.pad(date.getDate(), 2)}`; - const timePart = `${this.pad(date.getHours(), 2)}:${this.pad(date.getMinutes(), 2)}:${this.pad(date.getSeconds(), 2)}.${this.pad(date.getMilliseconds(), 3)}`; - let ret = `${datePart}T${timePart}`; - /* v8 ignore next */ - if (offset < 0) { - ret += '-'; - offset *= -1; - } else { - ret += '+'; - } - ret += this.pad(Math.floor(offset / 60), 2) + ':' + this.pad(offset % 60, 2); - /* v8 ignore next */ - if (isBCYear) { - ret += ' BC'; - } - return ret; - } - indexForeignKeys() { - return false; - } - getDefaultMappedType(type) { - const normalizedType = this.extractSimpleType(type); - const map = { - int2: 'smallint', - smallserial: 'smallint', - int: 'integer', - int4: 'integer', - serial: 'integer', - serial4: 'integer', - int8: 'bigint', - bigserial: 'bigint', - serial8: 'bigint', - numeric: 'decimal', - bool: 'boolean', - real: 'float', - float4: 'float', - float8: 'double', - timestamp: 'datetime', - timestamptz: 'datetime', - bytea: 'blob', - jsonb: 'json', - 'character varying': 'varchar', - bpchar: 'character', - }; - return super.getDefaultMappedType(map[normalizedType] ?? type); - } - supportsSchemas() { - return true; - } - getDefaultSchemaName() { - return 'public'; - } - /** - * Returns the default name of index for the given columns - * cannot go past 63 character length for identifiers in MySQL - */ - getIndexName(tableName, columns, type) { - const indexName = super.getIndexName(tableName, columns, type); - if (indexName.length > 63) { - const suffix = type === 'primary' ? 'pkey' : type; - return `${indexName.substring(0, 55 - type.length)}_${Utils.hash(indexName, 5)}_${suffix}`; - } - return indexName; - } - getDefaultPrimaryName(tableName, columns) { - const indexName = `${tableName}_pkey`; - if (indexName.length > 63) { - return `${indexName.substring(0, 55 - 'pkey'.length)}_${Utils.hash(indexName, 5)}_pkey`; - } - return indexName; - } - /** - * @inheritDoc - */ - castColumn(prop) { - switch (prop?.columnTypes?.[0]) { - case this.getUuidTypeDeclarationSQL({}): - return '::text'; - case this.getBooleanTypeDeclarationSQL(): - return '::int'; - default: - return ''; - } - } - getJsonArrayFromSQL(column, alias, _properties) { - return `jsonb_array_elements(${column}) as ${this.quoteIdentifier(alias)}`; - } - getJsonArrayElementPropertySQL(alias, property, type) { - const expr = `${this.quoteIdentifier(alias)}->>${this.quoteValue(property)}`; - return type in this.#jsonTypeCasts ? `(${expr})::${this.#jsonTypeCasts[type]}` : expr; - } - getDefaultClientUrl() { - return 'postgresql://postgres@127.0.0.1:5432'; - } -} diff --git a/node_modules/@mikro-orm/sql/dialects/postgresql/FullTextType.d.ts b/node_modules/@mikro-orm/sql/dialects/postgresql/FullTextType.d.ts deleted file mode 100644 index bfe629f..0000000 --- a/node_modules/@mikro-orm/sql/dialects/postgresql/FullTextType.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Type, type TransformContext, type RawQueryFragment } from '@mikro-orm/core'; -import type { BasePostgreSqlPlatform } from './BasePostgreSqlPlatform.js'; -type FullTextWeight = 'A' | 'B' | 'C' | 'D'; -export type WeightedFullTextValue = { - [K in FullTextWeight]?: string | null; -}; -export declare class FullTextType extends Type { - regconfig: string; - constructor(regconfig?: string); - compareAsType(): string; - getColumnType(): string; - convertToDatabaseValue( - value: string | WeightedFullTextValue, - platform: BasePostgreSqlPlatform, - context?: TransformContext | boolean, - ): string | null | RawQueryFragment; -} -export {}; diff --git a/node_modules/@mikro-orm/sql/dialects/postgresql/FullTextType.js b/node_modules/@mikro-orm/sql/dialects/postgresql/FullTextType.js deleted file mode 100644 index ae58284..0000000 --- a/node_modules/@mikro-orm/sql/dialects/postgresql/FullTextType.js +++ /dev/null @@ -1,59 +0,0 @@ -import { raw, Type } from '@mikro-orm/core'; -export class FullTextType extends Type { - regconfig; - constructor(regconfig = 'simple') { - super(); - this.regconfig = regconfig; - } - compareAsType() { - return 'any'; - } - getColumnType() { - return 'tsvector'; - } - // Use convertToDatabaseValue to prepare insert queries as this method has - // access to the raw JS value. Return Knex#raw to prevent QueryBuilderHelper#mapData - // from sanitizing the returned chaing of SQL functions. - convertToDatabaseValue(value, platform, context) { - // Don't convert to values from select queries to the to_tsvector notation - // these should be compared as string using a special oparator or function - // this behaviour is defined in Platform#getFullTextWhereClause. - // This is always a string. - if (typeof context === 'object' && context.fromQuery) { - return value; - } - // Null values should not be processed - if (!value) { - return null; - } - // the object from that looks like { A: 'test data', B: 'test data2' ... } - // must be converted to - // setweight(to_tsvector(regconfig, value), A) || setweight(to_tsvector(regconfig, value), B)... etc - // use Knex#raw to do binding of the values sanitization of the boundvalues - // as we return a raw string which should not be sanitzed anymore - if (typeof value === 'object') { - const bindings = []; - const sqlParts = []; - for (const [weight, data] of Object.entries(value)) { - // Check whether the weight is valid according to Postgres, - // Postgres allows the weight to be upper and lowercase. - if (!['A', 'B', 'C', 'D'].includes(weight.toUpperCase())) { - throw new Error('Weight should be one of A, B, C, D.'); - } - // Ignore all values that are not a string - if (typeof data === 'string') { - sqlParts.push('setweight(to_tsvector(?, ?), ?)'); - bindings.push(this.regconfig, data, weight); - } - } - // Return null if the object has no valid strings - if (sqlParts.length === 0) { - return null; - } - // Join all the `setweight` parts using the PostgreSQL tsvector `||` concatenation operator - return raw(sqlParts.join(' || '), bindings); - } - // if it's not an object, it is expected to be string which does not have to be wrapped in setweight. - return raw('to_tsvector(?, ?)', [this.regconfig, value]); - } -} diff --git a/node_modules/@mikro-orm/sql/dialects/postgresql/PostgreSqlExceptionConverter.d.ts b/node_modules/@mikro-orm/sql/dialects/postgresql/PostgreSqlExceptionConverter.d.ts deleted file mode 100644 index c6ce37b..0000000 --- a/node_modules/@mikro-orm/sql/dialects/postgresql/PostgreSqlExceptionConverter.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { ExceptionConverter, type Dictionary, type DriverException } from '@mikro-orm/core'; -export declare class PostgreSqlExceptionConverter extends ExceptionConverter { - /** - * @see http://www.postgresql.org/docs/9.4/static/errcodes-appendix.html - * @see https://github.com/doctrine/dbal/blob/master/src/Driver/AbstractPostgreSQLDriver.php - */ - convertException(exception: Error & Dictionary): DriverException; -} diff --git a/node_modules/@mikro-orm/sql/dialects/postgresql/PostgreSqlExceptionConverter.js b/node_modules/@mikro-orm/sql/dialects/postgresql/PostgreSqlExceptionConverter.js deleted file mode 100644 index fcf3334..0000000 --- a/node_modules/@mikro-orm/sql/dialects/postgresql/PostgreSqlExceptionConverter.js +++ /dev/null @@ -1,59 +0,0 @@ -import { - DeadlockException, - ExceptionConverter, - ForeignKeyConstraintViolationException, - InvalidFieldNameException, - NonUniqueFieldNameException, - NotNullConstraintViolationException, - SyntaxErrorException, - TableExistsException, - TableNotFoundException, - UniqueConstraintViolationException, - CheckConstraintViolationException, -} from '@mikro-orm/core'; -export class PostgreSqlExceptionConverter extends ExceptionConverter { - /** - * @see http://www.postgresql.org/docs/9.4/static/errcodes-appendix.html - * @see https://github.com/doctrine/dbal/blob/master/src/Driver/AbstractPostgreSQLDriver.php - */ - convertException(exception) { - if (exception.detail?.toString().trim()) { - exception.message += '\n - detail: ' + exception.detail; - } - if (exception.hint?.toString().trim()) { - exception.message += '\n - hint: ' + exception.hint; - } - /* v8 ignore next */ - switch (exception.code) { - case '40001': - case '40P01': - return new DeadlockException(exception); - case '0A000': - // Foreign key constraint violations during a TRUNCATE operation - // are considered "feature not supported" in PostgreSQL. - if (exception.message.includes('truncate')) { - return new ForeignKeyConstraintViolationException(exception); - } - break; - case '23502': - return new NotNullConstraintViolationException(exception); - case '23503': - return new ForeignKeyConstraintViolationException(exception); - case '23505': - return new UniqueConstraintViolationException(exception); - case '23514': - return new CheckConstraintViolationException(exception); - case '42601': - return new SyntaxErrorException(exception); - case '42702': - return new NonUniqueFieldNameException(exception); - case '42703': - return new InvalidFieldNameException(exception); - case '42P01': - return new TableNotFoundException(exception); - case '42P07': - return new TableExistsException(exception); - } - return super.convertException(exception); - } -} diff --git a/node_modules/@mikro-orm/sql/dialects/postgresql/PostgreSqlNativeQueryBuilder.d.ts b/node_modules/@mikro-orm/sql/dialects/postgresql/PostgreSqlNativeQueryBuilder.d.ts deleted file mode 100644 index 7f584b1..0000000 --- a/node_modules/@mikro-orm/sql/dialects/postgresql/PostgreSqlNativeQueryBuilder.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { NativeQueryBuilder } from '../../query/NativeQueryBuilder.js'; -/** @internal */ -export declare class PostgreSqlNativeQueryBuilder extends NativeQueryBuilder { - protected compileTruncate(): void; -} diff --git a/node_modules/@mikro-orm/sql/dialects/postgresql/PostgreSqlNativeQueryBuilder.js b/node_modules/@mikro-orm/sql/dialects/postgresql/PostgreSqlNativeQueryBuilder.js deleted file mode 100644 index 1c91bfb..0000000 --- a/node_modules/@mikro-orm/sql/dialects/postgresql/PostgreSqlNativeQueryBuilder.js +++ /dev/null @@ -1,8 +0,0 @@ -import { NativeQueryBuilder } from '../../query/NativeQueryBuilder.js'; -/** @internal */ -export class PostgreSqlNativeQueryBuilder extends NativeQueryBuilder { - compileTruncate() { - super.compileTruncate(); - this.parts.push('restart identity cascade'); - } -} diff --git a/node_modules/@mikro-orm/sql/dialects/postgresql/PostgreSqlSchemaHelper.d.ts b/node_modules/@mikro-orm/sql/dialects/postgresql/PostgreSqlSchemaHelper.d.ts deleted file mode 100644 index 758c295..0000000 --- a/node_modules/@mikro-orm/sql/dialects/postgresql/PostgreSqlSchemaHelper.d.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { type Dictionary } from '@mikro-orm/core'; -import { SchemaHelper } from '../../schema/SchemaHelper.js'; -import type { AbstractSqlConnection } from '../../AbstractSqlConnection.js'; -import type { CheckDef, Column, ForeignKey, IndexDef, Table, TableDifference } from '../../typings.js'; -import type { DatabaseSchema } from '../../schema/DatabaseSchema.js'; -import type { DatabaseTable } from '../../schema/DatabaseTable.js'; -export declare class PostgreSqlSchemaHelper extends SchemaHelper { - static readonly DEFAULT_VALUES: { - 'now()': string[]; - 'current_timestamp(?)': string[]; - "('now'::text)::timestamp(?) with time zone": string[]; - "('now'::text)::timestamp(?) without time zone": string[]; - 'null::character varying': string[]; - 'null::timestamp with time zone': string[]; - 'null::timestamp without time zone': string[]; - }; - getSchemaBeginning(charset: string, disableForeignKeys?: boolean): string; - getCreateDatabaseSQL(name: string): string; - getListTablesSQL(): string; - private getIgnoredViewsCondition; - getListViewsSQL(): string; - loadViews(schema: DatabaseSchema, connection: AbstractSqlConnection): Promise; - getListMaterializedViewsSQL(): string; - loadMaterializedViews(schema: DatabaseSchema, connection: AbstractSqlConnection, schemaName?: string): Promise; - createMaterializedView(name: string, schema: string | undefined, definition: string, withData?: boolean): string; - dropMaterializedViewIfExists(name: string, schema?: string): string; - refreshMaterializedView(name: string, schema?: string, concurrently?: boolean): string; - getNamespaces(connection: AbstractSqlConnection): Promise; - private getIgnoredNamespacesConditionSQL; - loadInformationSchema( - schema: DatabaseSchema, - connection: AbstractSqlConnection, - tables: Table[], - schemas?: string[], - ): Promise; - getAllIndexes(connection: AbstractSqlConnection, tables: Table[]): Promise>; - /** - * Parses column definitions from the full CREATE INDEX expression. - * Since pg_get_indexdef(oid, col_num, true) doesn't include sort modifiers, - * we extract them from the full expression instead. - * - * We use columnDefs (from individual pg_get_indexdef calls) as the source - * of column names, and find their modifiers in the expression. - */ - private parseIndexColumnsFromExpression; - /** - * Extracts the content inside parentheses starting at the given position. - * Handles nested parentheses correctly. - */ - private extractParenthesizedContent; - getAllColumns( - connection: AbstractSqlConnection, - tablesBySchemas: Map, - nativeEnums?: Dictionary<{ - name: string; - schema?: string; - items: string[]; - }>, - ): Promise>; - getAllChecks( - connection: AbstractSqlConnection, - tablesBySchemas: Map, - ): Promise>; - getAllForeignKeys( - connection: AbstractSqlConnection, - tablesBySchemas: Map, - ): Promise>>; - getNativeEnumDefinitions( - connection: AbstractSqlConnection, - schemas: string[], - ): Promise< - Dictionary<{ - name: string; - schema?: string; - items: string[]; - }> - >; - getCreateNativeEnumSQL(name: string, values: unknown[], schema?: string): string; - getDropNativeEnumSQL(name: string, schema?: string): string; - getAlterNativeEnumSQL(name: string, schema?: string, value?: string, items?: string[], oldItems?: string[]): string; - private getEnumDefinitions; - createTableColumn(column: Column, table: DatabaseTable): string | undefined; - getPreAlterTable(tableDiff: TableDifference, safe: boolean): string[]; - castColumn(name: string, type: string): string; - dropForeignKey(tableName: string, constraintName: string): string; - getPostAlterTable(tableDiff: TableDifference, safe: boolean): string[]; - private getAlterColumnAutoincrement; - getChangeColumnCommentSQL(tableName: string, to: Column, schemaName?: string): string; - alterTableComment(table: DatabaseTable, comment?: string): string; - normalizeDefaultValue(defaultValue: string, length: number): string | number; - appendComments(table: DatabaseTable): string[]; - getDatabaseExistsSQL(name: string): string; - getDatabaseNotExistsError(dbName: string): string; - getManagementDbName(): string; - disableForeignKeysSQL(): string; - enableForeignKeysSQL(): string; - getRenameIndexSQL(tableName: string, index: IndexDef, oldIndexName: string): string[]; - dropIndex(table: string, index: IndexDef, oldIndexName?: string): string; - /** - * Build the column list for a PostgreSQL index. - */ - protected getIndexColumns(index: IndexDef): string; - /** - * PostgreSQL-specific index options like fill factor. - */ - protected getCreateIndexSuffix(index: IndexDef): string; - private getIndexesSQL; - private getChecksSQL; - inferLengthFromColumnType(type: string): number | undefined; -} diff --git a/node_modules/@mikro-orm/sql/dialects/postgresql/PostgreSqlSchemaHelper.js b/node_modules/@mikro-orm/sql/dialects/postgresql/PostgreSqlSchemaHelper.js deleted file mode 100644 index c422de7..0000000 --- a/node_modules/@mikro-orm/sql/dialects/postgresql/PostgreSqlSchemaHelper.js +++ /dev/null @@ -1,776 +0,0 @@ -import { DeferMode, EnumType, Type, Utils } from '@mikro-orm/core'; -import { SchemaHelper } from '../../schema/SchemaHelper.js'; -/** PostGIS system views that should be automatically ignored */ -const POSTGIS_VIEWS = ['geography_columns', 'geometry_columns']; -export class PostgreSqlSchemaHelper extends SchemaHelper { - static DEFAULT_VALUES = { - 'now()': ['now()', 'current_timestamp'], - 'current_timestamp(?)': ['current_timestamp(?)'], - "('now'::text)::timestamp(?) with time zone": ['current_timestamp(?)'], - "('now'::text)::timestamp(?) without time zone": ['current_timestamp(?)'], - 'null::character varying': ['null'], - 'null::timestamp with time zone': ['null'], - 'null::timestamp without time zone': ['null'], - }; - getSchemaBeginning(charset, disableForeignKeys) { - if (disableForeignKeys) { - return `set names '${charset}';\n${this.disableForeignKeysSQL()}\n\n`; - } - return `set names '${charset}';\n\n`; - } - getCreateDatabaseSQL(name) { - return `create database ${this.quote(name)}`; - } - getListTablesSQL() { - return ( - `select table_name, table_schema as schema_name, ` + - `(select pg_catalog.obj_description(c.oid) from pg_catalog.pg_class c - where c.oid = (select ('"' || table_schema || '"."' || table_name || '"')::regclass::oid) and c.relname = table_name) as table_comment ` + - `from information_schema.tables ` + - `where ${this.getIgnoredNamespacesConditionSQL('table_schema')} ` + - `and table_name != 'geometry_columns' and table_name != 'spatial_ref_sys' and table_type != 'VIEW' ` + - `and table_name not in (select inhrelid::regclass::text from pg_inherits) ` + - `order by table_name` - ); - } - getIgnoredViewsCondition() { - return POSTGIS_VIEWS.map(v => `table_name != '${v}'`).join(' and '); - } - getListViewsSQL() { - return ( - `select table_name as view_name, table_schema as schema_name, view_definition ` + - `from information_schema.views ` + - `where ${this.getIgnoredNamespacesConditionSQL('table_schema')} ` + - `and ${this.getIgnoredViewsCondition()} ` + - `order by table_name` - ); - } - async loadViews(schema, connection) { - const views = await connection.execute(this.getListViewsSQL()); - for (const view of views) { - const definition = view.view_definition?.trim().replace(/;$/, '') ?? ''; - if (definition) { - schema.addView(view.view_name, view.schema_name, definition); - } - } - } - getListMaterializedViewsSQL() { - return ( - `select matviewname as view_name, schemaname as schema_name, definition as view_definition ` + - `from pg_matviews ` + - `where ${this.getIgnoredNamespacesConditionSQL('schemaname')} ` + - `order by matviewname` - ); - } - async loadMaterializedViews(schema, connection, schemaName) { - const views = await connection.execute(this.getListMaterializedViewsSQL()); - for (const view of views) { - const definition = view.view_definition?.trim().replace(/;$/, '') ?? ''; - if (definition) { - schema.addView(view.view_name, view.schema_name, definition, true); - } - } - } - createMaterializedView(name, schema, definition, withData = true) { - const viewName = this.quote(this.getTableName(name, schema)); - const dataClause = withData ? ' with data' : ' with no data'; - return `create materialized view ${viewName} as ${definition}${dataClause}`; - } - dropMaterializedViewIfExists(name, schema) { - return `drop materialized view if exists ${this.quote(this.getTableName(name, schema))} cascade`; - } - refreshMaterializedView(name, schema, concurrently = false) { - const concurrent = concurrently ? ' concurrently' : ''; - return `refresh materialized view${concurrent} ${this.quote(this.getTableName(name, schema))}`; - } - async getNamespaces(connection) { - const sql = - `select schema_name from information_schema.schemata ` + - `where ${this.getIgnoredNamespacesConditionSQL()} ` + - `order by schema_name`; - const res = await connection.execute(sql); - return res.map(row => row.schema_name); - } - getIgnoredNamespacesConditionSQL(column = 'schema_name') { - const ignored = [ - 'information_schema', - 'tiger', - 'topology', - /* v8 ignore next */ - ...(this.platform.getConfig().get('schemaGenerator').ignoreSchema ?? []), - ] - .map(s => this.platform.quoteValue(s)) - .join(', '); - const ignoredPrefixes = ['pg_', 'crdb_', '_timescaledb_'].map(p => `"${column}" not like '${p}%'`).join(' and '); - return `${ignoredPrefixes} and "${column}" not in (${ignored})`; - } - async loadInformationSchema(schema, connection, tables, schemas) { - schemas ??= tables.length === 0 ? [schema.name] : tables.map(t => t.schema_name); - const nativeEnums = await this.getNativeEnumDefinitions(connection, schemas); - schema.setNativeEnums(nativeEnums); - if (tables.length === 0) { - return; - } - const tablesBySchema = this.getTablesGroupedBySchemas(tables); - const columns = await this.getAllColumns(connection, tablesBySchema, nativeEnums); - const indexes = await this.getAllIndexes(connection, tables); - const checks = await this.getAllChecks(connection, tablesBySchema); - const fks = await this.getAllForeignKeys(connection, tablesBySchema); - for (const t of tables) { - const key = this.getTableKey(t); - const table = schema.addTable(t.table_name, t.schema_name, t.table_comment); - const pks = await this.getPrimaryKeys(connection, indexes[key], table.name, table.schema); - const enums = this.getEnumDefinitions(checks[key] ?? []); - if (columns[key]) { - table.init(columns[key], indexes[key], checks[key], pks, fks[key], enums); - } - } - } - async getAllIndexes(connection, tables) { - const sql = this.getIndexesSQL(tables); - const unquote = str => str.replace(/['"`]/g, ''); - const allIndexes = await connection.execute(sql); - const ret = {}; - for (const index of allIndexes) { - const key = this.getTableKey(index); - // Extract INCLUDE columns from expression first, to filter them from key columns - const includeMatch = index.expression?.match(/include\s*\(([^)]+)\)/i); - const includeColumns = includeMatch ? includeMatch[1].split(',').map(col => unquote(col.trim())) : []; - // Filter out INCLUDE columns from the column definitions to get only key columns - const keyColumnDefs = index.index_def.filter(col => !includeColumns.includes(unquote(col))); - // Parse sort order and NULLS ordering from the full expression - // pg_get_indexdef individual columns don't include sort modifiers, so we parse from full expression - const columns = this.parseIndexColumnsFromExpression(index.expression, keyColumnDefs, unquote); - const columnNames = columns.map(col => col.name); - const hasAdvancedColumnOptions = columns.some(col => col.sort || col.nulls || col.collation); - const indexDef = { - columnNames, - composite: columnNames.length > 1, - // JSON columns can have unique index but not unique constraint, and we need to distinguish those, so we can properly drop them - constraint: index.contype === 'u', - keyName: index.constraint_name, - unique: index.unique, - primary: index.primary, - }; - // Add columns array if there are advanced options - if (hasAdvancedColumnOptions) { - indexDef.columns = columns; - } - if (index.condeferrable) { - indexDef.deferMode = index.condeferred ? DeferMode.INITIALLY_DEFERRED : DeferMode.INITIALLY_IMMEDIATE; - } - if (index.index_def.some(col => /[(): ,"'`]/.exec(col)) || index.expression?.match(/ where /i)) { - indexDef.expression = index.expression; - } - if (index.deferrable) { - indexDef.deferMode = index.initially_deferred ? DeferMode.INITIALLY_DEFERRED : DeferMode.INITIALLY_IMMEDIATE; - } - // Extract fillFactor from reloptions - if (index.reloptions) { - const fillFactorMatch = index.reloptions.find(opt => opt.startsWith('fillfactor=')); - if (fillFactorMatch) { - indexDef.fillFactor = parseInt(fillFactorMatch.split('=')[1], 10); - } - } - // Add INCLUDE columns (already extracted above) - if (includeColumns.length > 0) { - indexDef.include = includeColumns; - } - // Add index type if not btree (the default) - if (index.index_type && index.index_type !== 'btree') { - indexDef.type = index.index_type; - } - ret[key] ??= []; - ret[key].push(indexDef); - } - return ret; - } - /** - * Parses column definitions from the full CREATE INDEX expression. - * Since pg_get_indexdef(oid, col_num, true) doesn't include sort modifiers, - * we extract them from the full expression instead. - * - * We use columnDefs (from individual pg_get_indexdef calls) as the source - * of column names, and find their modifiers in the expression. - */ - parseIndexColumnsFromExpression(expression, columnDefs, unquote) { - // Extract just the column list from the expression (between first parens after USING) - // Pattern: ... USING method (...columns...) [INCLUDE (...)] [WHERE ...] - // Note: pg_get_indexdef always returns a valid expression with USING clause - const usingMatch = /using\s+\w+\s*\(/i.exec(expression); - const startIdx = usingMatch.index + usingMatch[0].length - 1; // Position of opening ( - const columnsStr = this.extractParenthesizedContent(expression, startIdx); - // Use the column names from columnDefs and find their modifiers in the expression - return columnDefs.map(colDef => { - const name = unquote(colDef); - const result = { name }; - // Find this column in the expression and extract modifiers - // Create a pattern that matches the column name (quoted or unquoted) followed by modifiers - const escapedName = name.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); - const colPattern = new RegExp(`"?${escapedName}"?\\s*([^,)]*?)(?:,|$)`, 'i'); - const colMatch = columnsStr.match(colPattern); - if (colMatch) { - const modifiers = colMatch[1]; - // Extract sort order (PostgreSQL omits ASC in output as it's the default) - if (/\bdesc\b/i.test(modifiers)) { - result.sort = 'DESC'; - } - // Extract NULLS ordering - const nullsMatch = /nulls\s+(first|last)/i.exec(modifiers); - if (nullsMatch) { - result.nulls = nullsMatch[1].toUpperCase(); - } - // Extract collation - const collateMatch = /collate\s+"?([^"\s,)]+)"?/i.exec(modifiers); - if (collateMatch) { - result.collation = collateMatch[1]; - } - } - return result; - }); - } - /** - * Extracts the content inside parentheses starting at the given position. - * Handles nested parentheses correctly. - */ - extractParenthesizedContent(str, startIdx) { - let depth = 0; - const start = startIdx + 1; - for (let i = startIdx; i < str.length; i++) { - if (str[i] === '(') { - depth++; - } else if (str[i] === ')') { - depth--; - if (depth === 0) { - return str.slice(start, i); - } - } - } - /* v8 ignore next - pg_get_indexdef always returns balanced parentheses */ - return ''; - } - async getAllColumns(connection, tablesBySchemas, nativeEnums) { - const sql = `select table_schema as schema_name, table_name, column_name, - column_default, - is_nullable, - udt_name, - udt_schema, - coalesce(datetime_precision, character_maximum_length) length, - atttypmod custom_length, - numeric_precision, - numeric_scale, - data_type, - is_identity, - identity_generation, - generation_expression, - pg_catalog.col_description(pgc.oid, cols.ordinal_position::int) column_comment - from information_schema.columns cols - join pg_class pgc on cols.table_name = pgc.relname - join pg_attribute pga on pgc.oid = pga.attrelid and cols.column_name = pga.attname - where (${[...tablesBySchemas.entries()].map(([schema, tables]) => `(table_schema = ${this.platform.quoteValue(schema)} and table_name in (${tables.map(t => this.platform.quoteValue(t.table_name)).join(',')}))`).join(' or ')}) - order by ordinal_position`; - const allColumns = await connection.execute(sql); - const str = val => (val != null ? '' + val : val); - const ret = {}; - for (const col of allColumns) { - const mappedType = connection.getPlatform().getMappedType(col.data_type); - const increments = - (col.column_default?.includes('nextval') || col.is_identity === 'YES') && - connection.getPlatform().isNumericColumn(mappedType); - const key = this.getTableKey(col); - ret[key] ??= []; - let type = col.data_type.toLowerCase() === 'array' ? col.udt_name.replace(/^_(.*)$/, '$1[]') : col.udt_name; - if ( - col.data_type === 'USER-DEFINED' && - col.udt_schema && - col.udt_schema !== this.platform.getDefaultSchemaName() - ) { - type = `${col.udt_schema}.${type}`; - } - if (type === 'bpchar') { - type = 'char'; - } - if (type === 'vector' && col.length == null && col.custom_length != null && col.custom_length !== -1) { - col.length = col.custom_length; - } - if (col.length != null && !type.endsWith(`(${col.length})`) && !['text', 'date'].includes(type)) { - type += `(${col.length})`; - } - if (type === 'numeric' && col.numeric_precision != null && col.numeric_scale != null) { - type += `(${col.numeric_precision},${col.numeric_scale})`; - } - const length = this.inferLengthFromColumnType(type) === -1 ? -1 : col.length; - const column = { - name: col.column_name, - type, - mappedType, - length, - precision: col.numeric_precision, - scale: col.numeric_scale, - nullable: col.is_nullable === 'YES', - default: str(this.normalizeDefaultValue(col.column_default, col.length)), - unsigned: increments, - autoincrement: increments, - generated: - col.is_identity === 'YES' - ? col.identity_generation === 'BY DEFAULT' - ? 'by default as identity' - : 'identity' - : col.generation_expression - ? col.generation_expression + ' stored' - : undefined, - comment: col.column_comment, - }; - if (nativeEnums?.[column.type]) { - column.mappedType = Type.getType(EnumType); - column.nativeEnumName = column.type; - column.enumItems = nativeEnums[column.type]?.items; - } - ret[key].push(column); - } - return ret; - } - async getAllChecks(connection, tablesBySchemas) { - const sql = this.getChecksSQL(tablesBySchemas); - const allChecks = await connection.execute(sql); - const ret = {}; - const seen = new Set(); - for (const check of allChecks) { - const key = this.getTableKey(check); - const dedupeKey = `${key}:${check.name}`; - if (seen.has(dedupeKey)) { - continue; - } - seen.add(dedupeKey); - ret[key] ??= []; - const m = /^check \(\((.*)\)\)$/is.exec(check.expression); - const def = m?.[1].replace(/\((.*?)\)::\w+/g, '$1'); - ret[key].push({ - name: check.name, - columnName: check.column_name, - definition: check.expression, - expression: def, - }); - } - return ret; - } - async getAllForeignKeys(connection, tablesBySchemas) { - const sql = `select nsp1.nspname schema_name, cls1.relname table_name, nsp2.nspname referenced_schema_name, - cls2.relname referenced_table_name, a.attname column_name, af.attname referenced_column_name, conname constraint_name, - confupdtype update_rule, confdeltype delete_rule, array_position(con.conkey,a.attnum) as ord, condeferrable, condeferred, - pg_get_constraintdef(con.oid) as constraint_def - from pg_attribute a - join pg_constraint con on con.conrelid = a.attrelid AND a.attnum = ANY (con.conkey) - join pg_attribute af on af.attnum = con.confkey[array_position(con.conkey,a.attnum)] AND af.attrelid = con.confrelid - join pg_namespace nsp1 on nsp1.oid = con.connamespace - join pg_class cls1 on cls1.oid = con.conrelid - join pg_class cls2 on cls2.oid = confrelid - join pg_namespace nsp2 on nsp2.oid = cls2.relnamespace - where (${[...tablesBySchemas.entries()].map(([schema, tables]) => `(cls1.relname in (${tables.map(t => this.platform.quoteValue(t.table_name)).join(',')}) and nsp1.nspname = ${this.platform.quoteValue(schema)})`).join(' or ')}) - and confrelid > 0 - order by nsp1.nspname, cls1.relname, constraint_name, ord`; - const allFks = await connection.execute(sql); - const ret = {}; - function mapReferentialIntegrity(value, def) { - const match = ['n', 'd'].includes(value) && /ON DELETE (SET (NULL|DEFAULT) \(.*?\))/.exec(def); - if (match) { - return match[1]; - } - /* v8 ignore next */ - switch (value) { - case 'r': - return 'RESTRICT'; - case 'c': - return 'CASCADE'; - case 'n': - return 'SET NULL'; - case 'd': - return 'SET DEFAULT'; - case 'a': - default: - return 'NO ACTION'; - } - } - for (const fk of allFks) { - fk.update_rule = mapReferentialIntegrity(fk.update_rule, fk.constraint_def); - fk.delete_rule = mapReferentialIntegrity(fk.delete_rule, fk.constraint_def); - if (fk.condeferrable) { - fk.defer_mode = fk.condeferred ? DeferMode.INITIALLY_DEFERRED : DeferMode.INITIALLY_IMMEDIATE; - } - const key = this.getTableKey(fk); - ret[key] ??= []; - ret[key].push(fk); - } - Object.keys(ret).forEach(key => { - const [schemaName, tableName] = key.split('.'); - ret[key] = this.mapForeignKeys(ret[key], tableName, schemaName); - }); - return ret; - } - async getNativeEnumDefinitions(connection, schemas) { - const uniqueSchemas = Utils.unique(schemas); - const res = await connection.execute( - `select t.typname as enum_name, n.nspname as schema_name, array_agg(e.enumlabel order by e.enumsortorder) as enum_value - from pg_type t - join pg_enum e on t.oid = e.enumtypid - join pg_catalog.pg_namespace n on n.oid = t.typnamespace - where n.nspname in (${Array(uniqueSchemas.length).fill('?').join(', ')}) - group by t.typname, n.nspname`, - uniqueSchemas, - ); - return res.reduce((o, row) => { - let name = row.enum_name; - if (row.schema_name && row.schema_name !== this.platform.getDefaultSchemaName()) { - name = row.schema_name + '.' + name; - } - let items = row.enum_value; - if (!Array.isArray(items)) { - items = this.platform.unmarshallArray(row.enum_value); - } - o[name] = { - name: row.enum_name, - schema: row.schema_name, - items, - }; - return o; - }, {}); - } - getCreateNativeEnumSQL(name, values, schema) { - if (schema && schema !== this.platform.getDefaultSchemaName()) { - name = schema + '.' + name; - } - return `create type ${this.quote(name)} as enum (${values.map(value => this.platform.quoteValue(value)).join(', ')})`; - } - getDropNativeEnumSQL(name, schema) { - if (schema && schema !== this.platform.getDefaultSchemaName()) { - name = schema + '.' + name; - } - return `drop type ${this.quote(name)}`; - } - getAlterNativeEnumSQL(name, schema, value, items, oldItems) { - if (schema && schema !== this.platform.getDefaultSchemaName()) { - name = schema + '.' + name; - } - let suffix = ''; - if (items && value && oldItems) { - const position = items.indexOf(value); - if (position > 0) { - suffix = ` after ${this.platform.quoteValue(items[position - 1])}`; - } else if (items.length > 1 && oldItems.length > 0) { - suffix = ` before ${this.platform.quoteValue(oldItems[0])}`; - } - } - return `alter type ${this.quote(name)} add value if not exists ${this.platform.quoteValue(value)}${suffix}`; - } - getEnumDefinitions(checks) { - return checks.reduce((o, item) => { - // check constraints are defined as one of: - // `CHECK ((type = ANY (ARRAY['local'::text, 'global'::text])))` - // `CHECK (("columnName" = ANY (ARRAY['local'::text, 'global'::text])))` - // `CHECK (((enum_test)::text = ANY ((ARRAY['a'::character varying, 'b'::character varying, 'c'::character varying])::text[])))` - // `CHECK ((("enumTest")::text = ANY ((ARRAY['a'::character varying, 'b'::character varying, 'c'::character varying])::text[])))` - // `CHECK ((type = 'a'::text))` - const m1 = - item.definition?.match(/check \(\(\("?(\w+)"?\)::/i) || item.definition?.match(/check \(\("?(\w+)"? = /i); - const m2 = item.definition?.match(/\(array\[(.*)]\)/i) || item.definition?.match(/ = (.*)\)/i); - if (item.columnName && m1 && m2) { - const m3 = m2[1].match(/('[^']*'::text)/g); - let items; - /* v8 ignore next */ - if (m3) { - items = m3.map(item => /^\(?'(.*)'/.exec(item.trim())?.[1]); - } else { - items = m2[1].split(',').map(item => /^\(?'(.*)'/.exec(item.trim())?.[1]); - } - items = items.filter(item => item !== undefined); - if (items.length > 0) { - o[item.columnName] = items; - item.expression = `${this.quote(item.columnName)} in ('${items.join("', '")}')`; - item.definition = `check (${item.expression})`; - } - } - return o; - }, {}); - } - createTableColumn(column, table) { - const pk = table.getPrimaryKey(); - const compositePK = pk?.composite; - const primaryKey = !this.hasNonDefaultPrimaryKeyName(table); - const col = [this.quote(column.name)]; - if (column.autoincrement && !column.generated && !compositePK) { - col.push(column.mappedType.getColumnType({ autoincrement: true }, this.platform)); - } else { - let columnType = column.type; - if (column.nativeEnumName) { - const parts = column.type.split('.'); - if (parts.length === 2 && parts[0] === '*') { - columnType = `${table.schema}.${parts[1]}`; - } - if (columnType.endsWith('[]')) { - columnType = this.quote(columnType.substring(0, columnType.length - 2)) + '[]'; - } else { - columnType = this.quote(columnType); - } - } - if (column.generated === 'by default as identity') { - columnType += ` generated ${column.generated}`; - } else if (column.generated) { - columnType += ` generated always as ${column.generated}`; - } - col.push(columnType); - Utils.runIfNotEmpty(() => col.push('null'), column.nullable); - Utils.runIfNotEmpty(() => col.push('not null'), !column.nullable); - } - if (column.autoincrement && !compositePK) { - Utils.runIfNotEmpty(() => col.push('primary key'), primaryKey && column.primary); - } - const useDefault = column.default != null && column.default !== 'null' && !column.autoincrement; - Utils.runIfNotEmpty(() => col.push(`default ${column.default}`), useDefault); - return col.join(' '); - } - getPreAlterTable(tableDiff, safe) { - const ret = []; - const parts = tableDiff.name.split('.'); - const tableName = parts.pop(); - const schemaName = parts.pop(); - /* v8 ignore next */ - const name = - (schemaName && schemaName !== this.platform.getDefaultSchemaName() ? schemaName + '.' : '') + tableName; - const quotedName = this.quote(name); - // detect that the column was an enum before and remove the check constraint in such case here - const changedEnums = Object.values(tableDiff.changedColumns).filter( - col => col.fromColumn.mappedType instanceof EnumType, - ); - for (const col of changedEnums) { - if (!col.fromColumn.nativeEnumName && col.column.nativeEnumName && col.fromColumn.default) { - ret.push(`alter table ${quotedName} alter column "${col.column.name}" drop default`); - } - if (col.fromColumn.nativeEnumName && !col.column.nativeEnumName && col.fromColumn.default) { - ret.push(`alter table ${quotedName} alter column "${col.column.name}" drop default`); - } - } - // changing uuid column type requires to cast it to text first - const uuids = Object.values(tableDiff.changedColumns).filter( - col => col.changedProperties.has('type') && col.fromColumn.type === 'uuid', - ); - for (const col of uuids) { - ret.push( - `alter table ${quotedName} alter column "${col.column.name}" type text using ("${col.column.name}"::text)`, - ); - } - for (const { column } of Object.values(tableDiff.changedColumns).filter(diff => - diff.changedProperties.has('autoincrement'), - )) { - if (!column.autoincrement && column.default == null) { - ret.push(`alter table ${quotedName} alter column ${this.quote(column.name)} drop default`); - } - } - return ret; - } - castColumn(name, type) { - if (type === 'uuid') { - type = 'text::uuid'; - } - return ` using (${this.quote(name)}::${type})`; - } - dropForeignKey(tableName, constraintName) { - return `alter table ${this.quote(tableName)} drop constraint ${this.quote(constraintName)}`; - } - getPostAlterTable(tableDiff, safe) { - const ret = []; - const parts = tableDiff.name.split('.'); - const tableName = parts.pop(); - const schemaName = parts.pop(); - /* v8 ignore next */ - const name = - (schemaName && schemaName !== this.platform.getDefaultSchemaName() ? schemaName + '.' : '') + tableName; - const quotedName = this.quote(name); - // detect that the column was an enum before and remove the check constraint in such a case here - const changedEnums = Object.values(tableDiff.changedColumns).filter( - col => col.fromColumn.mappedType instanceof EnumType, - ); - for (const col of changedEnums) { - if (!col.fromColumn.nativeEnumName && col.column.nativeEnumName && col.column.default) { - ret.push(`alter table ${quotedName} alter column "${col.column.name}" set default ${col.column.default}`); - } - if (col.fromColumn.nativeEnumName && !col.column.nativeEnumName && col.column.default) { - ret.push(`alter table ${quotedName} alter column "${col.column.name}" set default ${col.column.default}`); - } - } - for (const { column } of Object.values(tableDiff.changedColumns).filter(diff => - diff.changedProperties.has('autoincrement'), - )) { - ret.push(...this.getAlterColumnAutoincrement(tableName, column, schemaName)); - } - return ret; - } - getAlterColumnAutoincrement(tableName, column, schemaName) { - const ret = []; - /* v8 ignore next */ - const name = - (schemaName && schemaName !== this.platform.getDefaultSchemaName() ? schemaName + '.' : '') + tableName; - if (column.autoincrement) { - const seqName = this.platform.getIndexName(tableName, [column.name], 'sequence'); - ret.push(`create sequence if not exists ${this.quote(seqName)}`); - ret.push(`select setval('${seqName}', (select max(${this.quote(column.name)}) from ${this.quote(name)}))`); - ret.push( - `alter table ${this.quote(name)} alter column ${this.quote(column.name)} set default nextval('${seqName}')`, - ); - } - return ret; - } - getChangeColumnCommentSQL(tableName, to, schemaName) { - const name = this.quote( - (schemaName && schemaName !== this.platform.getDefaultSchemaName() ? schemaName + '.' : '') + tableName, - ); - const value = to.comment ? this.platform.quoteValue(to.comment) : 'null'; - return `comment on column ${name}.${this.quote(to.name)} is ${value}`; - } - alterTableComment(table, comment) { - return `comment on table ${table.getQuotedName()} is ${this.platform.quoteValue(comment ?? '')}`; - } - normalizeDefaultValue(defaultValue, length) { - if (!defaultValue || typeof defaultValue !== 'string') { - return super.normalizeDefaultValue(defaultValue, length, PostgreSqlSchemaHelper.DEFAULT_VALUES); - } - const match = /^'(.*)'::(.*)$/.exec(defaultValue); - if (match) { - if (match[2] === 'integer') { - return +match[1]; - } - return `'${match[1]}'`; - } - return super.normalizeDefaultValue(defaultValue, length, PostgreSqlSchemaHelper.DEFAULT_VALUES); - } - appendComments(table) { - const sql = []; - if (table.comment) { - const comment = this.platform.quoteValue(this.processComment(table.comment)); - sql.push(`comment on table ${table.getQuotedName()} is ${comment}`); - } - for (const column of table.getColumns()) { - if (column.comment) { - const comment = this.platform.quoteValue(this.processComment(column.comment)); - sql.push(`comment on column ${table.getQuotedName()}.${this.quote(column.name)} is ${comment}`); - } - } - return sql; - } - getDatabaseExistsSQL(name) { - return `select 1 from pg_database where datname = '${name}'`; - } - getDatabaseNotExistsError(dbName) { - return `database ${this.quote(dbName)} does not exist`; - } - getManagementDbName() { - return this.platform.getConfig().get('schemaGenerator', {}).managementDbName ?? 'postgres'; - } - disableForeignKeysSQL() { - return `set session_replication_role = 'replica';`; - } - enableForeignKeysSQL() { - return `set session_replication_role = 'origin';`; - } - getRenameIndexSQL(tableName, index, oldIndexName) { - oldIndexName = this.quote(oldIndexName); - const keyName = this.quote(index.keyName); - return [`alter index ${oldIndexName} rename to ${keyName}`]; - } - dropIndex(table, index, oldIndexName = index.keyName) { - if (index.primary || (index.unique && index.constraint)) { - return `alter table ${this.quote(table)} drop constraint ${this.quote(oldIndexName)}`; - } - return `drop index ${this.quote(oldIndexName)}`; - } - /** - * Build the column list for a PostgreSQL index. - */ - getIndexColumns(index) { - if (index.columns?.length) { - return index.columns - .map(col => { - let colDef = this.quote(col.name); - // PostgreSQL supports collation with double quotes - if (col.collation) { - colDef += ` collate ${this.quote(col.collation)}`; - } - // PostgreSQL supports sort order - if (col.sort) { - colDef += ` ${col.sort}`; - } - // PostgreSQL supports NULLS FIRST/LAST - if (col.nulls) { - colDef += ` nulls ${col.nulls}`; - } - return colDef; - }) - .join(', '); - } - return index.columnNames.map(c => this.quote(c)).join(', '); - } - /** - * PostgreSQL-specific index options like fill factor. - */ - getCreateIndexSuffix(index) { - const withOptions = []; - if (index.fillFactor != null) { - withOptions.push(`fillfactor = ${index.fillFactor}`); - } - if (withOptions.length > 0) { - return ` with (${withOptions.join(', ')})`; - } - return super.getCreateIndexSuffix(index); - } - getIndexesSQL(tables) { - return `select indrelid::regclass as table_name, ns.nspname as schema_name, relname as constraint_name, idx.indisunique as unique, idx.indisprimary as primary, contype, condeferrable, condeferred, - array( - select pg_get_indexdef(idx.indexrelid, k + 1, true) - from generate_subscripts(idx.indkey, 1) as k - order by k - ) as index_def, - pg_get_indexdef(idx.indexrelid) as expression, - c.condeferrable as deferrable, - c.condeferred as initially_deferred, - i.reloptions, - am.amname as index_type - from pg_index idx - join pg_class as i on i.oid = idx.indexrelid - join pg_namespace as ns on i.relnamespace = ns.oid - join pg_am as am on am.oid = i.relam - left join pg_constraint as c on c.conname = i.relname - where indrelid in (${tables.map(t => `${this.platform.quoteValue(`${this.quote(t.schema_name)}.${this.quote(t.table_name)}`)}::regclass`).join(', ')}) - order by relname`; - } - getChecksSQL(tablesBySchemas) { - return `select ccu.table_name as table_name, ccu.table_schema as schema_name, pgc.conname as name, conrelid::regclass as table_from, ccu.column_name as column_name, pg_get_constraintdef(pgc.oid) as expression - from pg_constraint pgc - join pg_namespace nsp on nsp.oid = pgc.connamespace - join pg_class cls on pgc.conrelid = cls.oid - join information_schema.constraint_column_usage ccu on pgc.conname = ccu.constraint_name and nsp.nspname = ccu.constraint_schema and cls.relname = ccu.table_name - where contype = 'c' and (${[...tablesBySchemas.entries()].map(([schema, tables]) => `ccu.table_name in (${tables.map(t => this.platform.quoteValue(t.table_name)).join(',')}) and ccu.table_schema = ${this.platform.quoteValue(schema)}`).join(' or ')}) - order by pgc.conname`; - } - inferLengthFromColumnType(type) { - const match = /^(\w+(?:\s+\w+)*)\s*(?:\(\s*(\d+)\s*\)|$)/.exec(type); - if (!match) { - return; - } - if (!match[2]) { - switch (match[1]) { - case 'character varying': - case 'varchar': - case 'bpchar': - case 'char': - case 'character': - return -1; - case 'interval': - case 'time': - case 'timestamp': - case 'timestamptz': - return this.platform.getDefaultDateTimeLength(); - } - return; - } - return +match[2]; - } -} diff --git a/node_modules/@mikro-orm/sql/dialects/postgresql/index.d.ts b/node_modules/@mikro-orm/sql/dialects/postgresql/index.d.ts deleted file mode 100644 index ce9616a..0000000 --- a/node_modules/@mikro-orm/sql/dialects/postgresql/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './PostgreSqlNativeQueryBuilder.js'; -export * from './BasePostgreSqlPlatform.js'; -export * from './FullTextType.js'; -export * from './PostgreSqlSchemaHelper.js'; diff --git a/node_modules/@mikro-orm/sql/dialects/postgresql/index.js b/node_modules/@mikro-orm/sql/dialects/postgresql/index.js deleted file mode 100644 index ce9616a..0000000 --- a/node_modules/@mikro-orm/sql/dialects/postgresql/index.js +++ /dev/null @@ -1,4 +0,0 @@ -export * from './PostgreSqlNativeQueryBuilder.js'; -export * from './BasePostgreSqlPlatform.js'; -export * from './FullTextType.js'; -export * from './PostgreSqlSchemaHelper.js'; diff --git a/node_modules/@mikro-orm/sql/dialects/sqlite/BaseSqliteConnection.d.ts b/node_modules/@mikro-orm/sql/dialects/sqlite/BaseSqliteConnection.d.ts deleted file mode 100644 index 69c9e7d..0000000 --- a/node_modules/@mikro-orm/sql/dialects/sqlite/BaseSqliteConnection.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { type Dialect } from 'kysely'; -import type { Dictionary } from '@mikro-orm/core'; -import { AbstractSqlConnection } from '../../AbstractSqlConnection.js'; -export declare class BaseSqliteConnection extends AbstractSqlConnection { - createKyselyDialect(options: Dictionary): Dialect; - connect(options?: { skipOnConnect?: boolean }): Promise; - protected attachDatabases(): Promise; -} diff --git a/node_modules/@mikro-orm/sql/dialects/sqlite/BaseSqliteConnection.js b/node_modules/@mikro-orm/sql/dialects/sqlite/BaseSqliteConnection.js deleted file mode 100644 index 1663266..0000000 --- a/node_modules/@mikro-orm/sql/dialects/sqlite/BaseSqliteConnection.js +++ /dev/null @@ -1,27 +0,0 @@ -import { CompiledQuery } from 'kysely'; -import { AbstractSqlConnection } from '../../AbstractSqlConnection.js'; -export class BaseSqliteConnection extends AbstractSqlConnection { - createKyselyDialect(options) { - throw new Error( - 'No SQLite dialect configured. Pass a Kysely dialect via the `driverOptions` config option, ' + - 'e.g. `new NodeSqliteDialect(...)` for node:sqlite or a custom dialect for other libraries.', - ); - } - async connect(options) { - await super.connect(options); - await this.getClient().executeQuery(CompiledQuery.raw('pragma foreign_keys = on')); - await this.attachDatabases(); - } - async attachDatabases() { - const attachDatabases = this.config.get('attachDatabases'); - if (!attachDatabases?.length) { - return; - } - const { fs } = await import('@mikro-orm/core/fs-utils'); - const baseDir = this.config.get('baseDir'); - for (const db of attachDatabases) { - const path = fs.absolutePath(db.path, baseDir); - await this.execute(`attach database '${path}' as ${this.platform.quoteIdentifier(db.name)}`); - } - } -} diff --git a/node_modules/@mikro-orm/sql/dialects/sqlite/NodeSqliteDialect.d.ts b/node_modules/@mikro-orm/sql/dialects/sqlite/NodeSqliteDialect.d.ts deleted file mode 100644 index 371fc28..0000000 --- a/node_modules/@mikro-orm/sql/dialects/sqlite/NodeSqliteDialect.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { SqliteDialect } from 'kysely'; -/** - * Kysely dialect for `node:sqlite` (Node.js 22.5+, Deno 2.2+). - * - * Bridges `node:sqlite`'s `DatabaseSync` to the `better-sqlite3` interface - * that Kysely's `SqliteDialect` expects. - * - * @example - * ```ts - * import { SqliteDriver, NodeSqliteDialect } from '@mikro-orm/sql'; - * - * const orm = await MikroORM.init({ - * driver: SqliteDriver, - * dbName: ':memory:', - * driverOptions: new NodeSqliteDialect(':memory:'), - * }); - * ``` - */ -export declare class NodeSqliteDialect extends SqliteDialect { - constructor(dbName: string); -} diff --git a/node_modules/@mikro-orm/sql/dialects/sqlite/NodeSqliteDialect.js b/node_modules/@mikro-orm/sql/dialects/sqlite/NodeSqliteDialect.js deleted file mode 100644 index d12da46..0000000 --- a/node_modules/@mikro-orm/sql/dialects/sqlite/NodeSqliteDialect.js +++ /dev/null @@ -1,43 +0,0 @@ -import { SqliteDialect } from 'kysely'; -/** - * Kysely dialect for `node:sqlite` (Node.js 22.5+, Deno 2.2+). - * - * Bridges `node:sqlite`'s `DatabaseSync` to the `better-sqlite3` interface - * that Kysely's `SqliteDialect` expects. - * - * @example - * ```ts - * import { SqliteDriver, NodeSqliteDialect } from '@mikro-orm/sql'; - * - * const orm = await MikroORM.init({ - * driver: SqliteDriver, - * dbName: ':memory:', - * driverOptions: new NodeSqliteDialect(':memory:'), - * }); - * ``` - */ -export class NodeSqliteDialect extends SqliteDialect { - constructor(dbName) { - const { DatabaseSync } = globalThis.process.getBuiltinModule('node:sqlite'); - super({ - database: () => { - const db = new DatabaseSync(dbName); - return { - prepare(sql) { - const stmt = db.prepare(sql); - return { - reader: /^\s*(select|pragma|explain|with)/i.test(sql) || /\breturning\b/i.test(sql), - all: params => stmt.all(...params), - run: params => stmt.run(...params), - /* v8 ignore next */ - get: params => stmt.get(...params), - }; - }, - close() { - db.close(); - }, - }; - }, - }); - } -} diff --git a/node_modules/@mikro-orm/sql/dialects/sqlite/SqliteDriver.d.ts b/node_modules/@mikro-orm/sql/dialects/sqlite/SqliteDriver.d.ts deleted file mode 100644 index fc98bac..0000000 --- a/node_modules/@mikro-orm/sql/dialects/sqlite/SqliteDriver.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { Configuration } from '@mikro-orm/core'; -import { AbstractSqlDriver } from '../../AbstractSqlDriver.js'; -import { BaseSqliteConnection } from './BaseSqliteConnection.js'; -/** - * Generic SQLite driver that uses `driverOptions` for the Kysely dialect. - * Use this with any SQLite library by passing a Kysely dialect via `driverOptions`. - * - * For the default better-sqlite3 experience, use `@mikro-orm/sqlite` instead. - */ -export declare class SqliteDriver extends AbstractSqlDriver { - constructor(config: Configuration); -} diff --git a/node_modules/@mikro-orm/sql/dialects/sqlite/SqliteDriver.js b/node_modules/@mikro-orm/sql/dialects/sqlite/SqliteDriver.js deleted file mode 100644 index e49e1e4..0000000 --- a/node_modules/@mikro-orm/sql/dialects/sqlite/SqliteDriver.js +++ /dev/null @@ -1,14 +0,0 @@ -import { AbstractSqlDriver } from '../../AbstractSqlDriver.js'; -import { BaseSqliteConnection } from './BaseSqliteConnection.js'; -import { SqlitePlatform } from './SqlitePlatform.js'; -/** - * Generic SQLite driver that uses `driverOptions` for the Kysely dialect. - * Use this with any SQLite library by passing a Kysely dialect via `driverOptions`. - * - * For the default better-sqlite3 experience, use `@mikro-orm/sqlite` instead. - */ -export class SqliteDriver extends AbstractSqlDriver { - constructor(config) { - super(config, new SqlitePlatform(), BaseSqliteConnection, ['kysely']); - } -} diff --git a/node_modules/@mikro-orm/sql/dialects/sqlite/SqliteExceptionConverter.d.ts b/node_modules/@mikro-orm/sql/dialects/sqlite/SqliteExceptionConverter.d.ts deleted file mode 100644 index ab6ec79..0000000 --- a/node_modules/@mikro-orm/sql/dialects/sqlite/SqliteExceptionConverter.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ExceptionConverter, type Dictionary, type DriverException } from '@mikro-orm/core'; -export declare class SqliteExceptionConverter extends ExceptionConverter { - /** - * @inheritDoc - * @see http://www.sqlite.org/c3ref/c_abort.html - * @see https://github.com/doctrine/dbal/blob/master/src/Driver/AbstractSQLiteDriver.php - */ - convertException(exception: Error & Dictionary): DriverException; -} diff --git a/node_modules/@mikro-orm/sql/dialects/sqlite/SqliteExceptionConverter.js b/node_modules/@mikro-orm/sql/dialects/sqlite/SqliteExceptionConverter.js deleted file mode 100644 index c1c8ebc..0000000 --- a/node_modules/@mikro-orm/sql/dialects/sqlite/SqliteExceptionConverter.js +++ /dev/null @@ -1,70 +0,0 @@ -import { - ConnectionException, - ExceptionConverter, - InvalidFieldNameException, - LockWaitTimeoutException, - NonUniqueFieldNameException, - CheckConstraintViolationException, - NotNullConstraintViolationException, - ReadOnlyException, - SyntaxErrorException, - TableExistsException, - TableNotFoundException, - UniqueConstraintViolationException, - ForeignKeyConstraintViolationException, -} from '@mikro-orm/core'; -export class SqliteExceptionConverter extends ExceptionConverter { - /** - * @inheritDoc - * @see http://www.sqlite.org/c3ref/c_abort.html - * @see https://github.com/doctrine/dbal/blob/master/src/Driver/AbstractSQLiteDriver.php - */ - convertException(exception) { - /* v8 ignore next */ - if (exception.message.includes('database is locked')) { - return new LockWaitTimeoutException(exception); - } - if ( - exception.message.includes('must be unique') || - exception.message.includes('is not unique') || - exception.message.includes('are not unique') || - exception.message.includes('UNIQUE constraint failed') - ) { - return new UniqueConstraintViolationException(exception); - } - if (exception.message.includes('may not be NULL') || exception.message.includes('NOT NULL constraint failed')) { - return new NotNullConstraintViolationException(exception); - } - /* v8 ignore next */ - if (exception.message.includes('CHECK constraint failed')) { - return new CheckConstraintViolationException(exception); - } - if (exception.message.includes('no such table:')) { - return new TableNotFoundException(exception); - } - if (exception.message.includes('already exists')) { - return new TableExistsException(exception); - } - if (exception.message.includes('no such column:')) { - return new InvalidFieldNameException(exception); - } - if (exception.message.includes('ambiguous column name')) { - return new NonUniqueFieldNameException(exception); - } - if (exception.message.includes('syntax error')) { - return new SyntaxErrorException(exception); - } - /* v8 ignore next */ - if (exception.message.includes('attempt to write a readonly database')) { - return new ReadOnlyException(exception); - } - /* v8 ignore next */ - if (exception.message.includes('unable to open database file')) { - return new ConnectionException(exception); - } - if (exception.message.includes('FOREIGN KEY constraint failed')) { - return new ForeignKeyConstraintViolationException(exception); - } - return super.convertException(exception); - } -} diff --git a/node_modules/@mikro-orm/sql/dialects/sqlite/SqliteNativeQueryBuilder.d.ts b/node_modules/@mikro-orm/sql/dialects/sqlite/SqliteNativeQueryBuilder.d.ts deleted file mode 100644 index 690e964..0000000 --- a/node_modules/@mikro-orm/sql/dialects/sqlite/SqliteNativeQueryBuilder.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { NativeQueryBuilder } from '../../query/NativeQueryBuilder.js'; -/** @internal */ -export declare class SqliteNativeQueryBuilder extends NativeQueryBuilder { - protected compileTruncate(): void; - protected addLockClause(): void; -} diff --git a/node_modules/@mikro-orm/sql/dialects/sqlite/SqliteNativeQueryBuilder.js b/node_modules/@mikro-orm/sql/dialects/sqlite/SqliteNativeQueryBuilder.js deleted file mode 100644 index b006d13..0000000 --- a/node_modules/@mikro-orm/sql/dialects/sqlite/SqliteNativeQueryBuilder.js +++ /dev/null @@ -1,11 +0,0 @@ -import { NativeQueryBuilder } from '../../query/NativeQueryBuilder.js'; -/** @internal */ -export class SqliteNativeQueryBuilder extends NativeQueryBuilder { - compileTruncate() { - const sql = `delete from ${this.getTableName()}`; - this.parts.push(sql); - } - addLockClause() { - return; // not supported - } -} diff --git a/node_modules/@mikro-orm/sql/dialects/sqlite/SqlitePlatform.d.ts b/node_modules/@mikro-orm/sql/dialects/sqlite/SqlitePlatform.d.ts deleted file mode 100644 index 7fab88e..0000000 --- a/node_modules/@mikro-orm/sql/dialects/sqlite/SqlitePlatform.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { type EntityProperty, type IsolationLevel } from '@mikro-orm/core'; -import { AbstractSqlPlatform } from '../../AbstractSqlPlatform.js'; -import { SqliteNativeQueryBuilder } from './SqliteNativeQueryBuilder.js'; -import { SqliteSchemaHelper } from './SqliteSchemaHelper.js'; -import { SqliteExceptionConverter } from './SqliteExceptionConverter.js'; -export declare class SqlitePlatform extends AbstractSqlPlatform { - protected readonly schemaHelper: SqliteSchemaHelper; - protected readonly exceptionConverter: SqliteExceptionConverter; - /** @internal */ - createNativeQueryBuilder(): SqliteNativeQueryBuilder; - usesDefaultKeyword(): boolean; - usesReturningStatement(): boolean; - usesEnumCheckConstraints(): boolean; - getCurrentTimestampSQL(length: number): string; - getDateTimeTypeDeclarationSQL(column: { length: number }): string; - getBeginTransactionSQL(options?: { isolationLevel?: IsolationLevel; readOnly?: boolean }): string[]; - getEnumTypeDeclarationSQL(column: { - items?: unknown[]; - fieldNames: string[]; - length?: number; - unsigned?: boolean; - autoincrement?: boolean; - }): string; - getTinyIntTypeDeclarationSQL(column: { length?: number; unsigned?: boolean; autoincrement?: boolean }): string; - getSmallIntTypeDeclarationSQL(column: { length?: number; unsigned?: boolean; autoincrement?: boolean }): string; - getIntegerTypeDeclarationSQL(column: { length?: number; unsigned?: boolean; autoincrement?: boolean }): string; - getFloatDeclarationSQL(): string; - getBooleanTypeDeclarationSQL(): string; - getCharTypeDeclarationSQL(column: { length?: number }): string; - getVarcharTypeDeclarationSQL(column: { length?: number }): string; - normalizeColumnType( - type: string, - options: { - length?: number; - precision?: number; - scale?: number; - }, - ): string; - convertsJsonAutomatically(): boolean; - /** - * This is used to narrow the value of Date properties as they will be stored as timestamps in sqlite. - * We use this method to convert Dates to timestamps when computing the changeset, so we have the right - * data type in the payload as well as in original entity data. Without that, we would end up with diffs - * including all Date properties, as we would be comparing Date object with timestamp. - */ - processDateProperty(value: unknown): string | number | Date; - getIndexName( - tableName: string, - columns: string[], - type: 'index' | 'unique' | 'foreign' | 'primary' | 'sequence', - ): string; - supportsDeferredUniqueConstraints(): boolean; - /** - * SQLite supports schemas via ATTACH DATABASE. Returns true when there are - * attached databases configured. - */ - supportsSchemas(): boolean; - getDefaultSchemaName(): string | undefined; - getFullTextWhereClause(): string; - escape(value: any): string; - convertVersionValue( - value: Date | number, - prop: EntityProperty, - ): - | number - | { - $in: (string | number)[]; - }; - getJsonArrayElementPropertySQL(alias: string, property: string, _type: string): string; - quoteValue(value: any): string; -} diff --git a/node_modules/@mikro-orm/sql/dialects/sqlite/SqlitePlatform.js b/node_modules/@mikro-orm/sql/dialects/sqlite/SqlitePlatform.js deleted file mode 100644 index a57fcc2..0000000 --- a/node_modules/@mikro-orm/sql/dialects/sqlite/SqlitePlatform.js +++ /dev/null @@ -1,145 +0,0 @@ -import { AbstractSqlPlatform } from '../../AbstractSqlPlatform.js'; -import { SqliteNativeQueryBuilder } from './SqliteNativeQueryBuilder.js'; -import { SqliteSchemaHelper } from './SqliteSchemaHelper.js'; -import { SqliteExceptionConverter } from './SqliteExceptionConverter.js'; -export class SqlitePlatform extends AbstractSqlPlatform { - schemaHelper = new SqliteSchemaHelper(this); - exceptionConverter = new SqliteExceptionConverter(); - /** @internal */ - createNativeQueryBuilder() { - return new SqliteNativeQueryBuilder(this); - } - usesDefaultKeyword() { - return false; - } - usesReturningStatement() { - return true; - } - usesEnumCheckConstraints() { - return true; - } - getCurrentTimestampSQL(length) { - return `(strftime('%s', 'now') * 1000)`; - } - getDateTimeTypeDeclarationSQL(column) { - return 'datetime'; - } - getBeginTransactionSQL(options) { - return ['begin']; - } - getEnumTypeDeclarationSQL(column) { - if (column.items?.every(item => typeof item === 'string')) { - return 'text'; - } - /* v8 ignore next */ - return this.getTinyIntTypeDeclarationSQL(column); - } - getTinyIntTypeDeclarationSQL(column) { - return this.getIntegerTypeDeclarationSQL(column); - } - getSmallIntTypeDeclarationSQL(column) { - return this.getIntegerTypeDeclarationSQL(column); - } - getIntegerTypeDeclarationSQL(column) { - return 'integer'; - } - getFloatDeclarationSQL() { - return 'real'; - } - getBooleanTypeDeclarationSQL() { - return 'integer'; - } - getCharTypeDeclarationSQL(column) { - return 'text'; - } - getVarcharTypeDeclarationSQL(column) { - return 'text'; - } - normalizeColumnType(type, options) { - const simpleType = this.extractSimpleType(type); - if (['varchar', 'text'].includes(simpleType)) { - return this.getVarcharTypeDeclarationSQL(options); - } - return simpleType; - } - convertsJsonAutomatically() { - return false; - } - /** - * This is used to narrow the value of Date properties as they will be stored as timestamps in sqlite. - * We use this method to convert Dates to timestamps when computing the changeset, so we have the right - * data type in the payload as well as in original entity data. Without that, we would end up with diffs - * including all Date properties, as we would be comparing Date object with timestamp. - */ - processDateProperty(value) { - if (value instanceof Date) { - return +value; - } - return value; - } - getIndexName(tableName, columns, type) { - if (type === 'primary') { - return this.getDefaultPrimaryName(tableName, columns); - } - return super.getIndexName(tableName, columns, type); - } - supportsDeferredUniqueConstraints() { - return false; - } - /** - * SQLite supports schemas via ATTACH DATABASE. Returns true when there are - * attached databases configured. - */ - supportsSchemas() { - const attachDatabases = this.config.get('attachDatabases'); - return !!attachDatabases?.length; - } - getDefaultSchemaName() { - // Return 'main' only when schema support is active (i.e., databases are attached) - return this.supportsSchemas() ? 'main' : undefined; - } - getFullTextWhereClause() { - return `:column: match :query`; - } - escape(value) { - if (value == null) { - return 'null'; - } - if (typeof value === 'boolean') { - return value ? 'true' : 'false'; - } - if (typeof value === 'number' || typeof value === 'bigint') { - return '' + value; - } - if (value instanceof Date) { - return '' + +value; - } - if (Array.isArray(value)) { - return value.map(v => this.escape(v)).join(', '); - } - if (Buffer.isBuffer(value)) { - return `X'${value.toString('hex')}'`; - } - return `'${String(value).replace(/'/g, "''")}'`; - } - convertVersionValue(value, prop) { - if (prop.runtimeType === 'Date') { - const ts = +value; - const str = new Date(ts) - .toISOString() - .replace('T', ' ') - .replace(/\.\d{3}Z$/, ''); - return { $in: [ts, str] }; - } - return value; - } - getJsonArrayElementPropertySQL(alias, property, _type) { - return `json_extract(${this.quoteIdentifier(alias)}.value, '$.${this.quoteJsonKey(property)}')`; - } - quoteValue(value) { - if (value instanceof Date) { - return '' + +value; - } - return super.quoteValue(value); - } -} diff --git a/node_modules/@mikro-orm/sql/dialects/sqlite/SqliteSchemaHelper.d.ts b/node_modules/@mikro-orm/sql/dialects/sqlite/SqliteSchemaHelper.d.ts deleted file mode 100644 index bb094cb..0000000 --- a/node_modules/@mikro-orm/sql/dialects/sqlite/SqliteSchemaHelper.d.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { type Connection } from '@mikro-orm/core'; -import type { AbstractSqlConnection } from '../../AbstractSqlConnection.js'; -import { SchemaHelper } from '../../schema/SchemaHelper.js'; -import type { Column, IndexDef, Table, TableDifference } from '../../typings.js'; -import type { DatabaseTable } from '../../schema/DatabaseTable.js'; -import type { DatabaseSchema } from '../../schema/DatabaseSchema.js'; -export declare class SqliteSchemaHelper extends SchemaHelper { - disableForeignKeysSQL(): string; - enableForeignKeysSQL(): string; - supportsSchemaConstraints(): boolean; - getCreateNamespaceSQL(name: string): string; - getDropNamespaceSQL(name: string): string; - getListTablesSQL(): string; - getAllTables(connection: AbstractSqlConnection, schemas?: string[]): Promise; - getNamespaces(connection: AbstractSqlConnection): Promise; - private getIgnoredViewsCondition; - getListViewsSQL(): string; - loadViews(schema: DatabaseSchema, connection: AbstractSqlConnection, schemaName?: string): Promise; - getDropDatabaseSQL(name: string): string; - loadInformationSchema( - schema: DatabaseSchema, - connection: AbstractSqlConnection, - tables: Table[], - schemas?: string[], - ): Promise; - createTable(table: DatabaseTable, alter?: boolean): string[]; - createTableColumn(column: Column, table: DatabaseTable, _changedProperties?: Set): string | undefined; - getAddColumnsSQL(table: DatabaseTable, columns: Column[], diff?: TableDifference): string[]; - dropForeignKey(tableName: string, constraintName: string): string; - getDropColumnsSQL(tableName: string, columns: Column[], schemaName?: string): string; - getCreateIndexSQL(tableName: string, index: IndexDef): string; - private parseTableDefinition; - /** - * Returns schema prefix for pragma and sqlite_master queries. - * Returns empty string for main database (no prefix needed). - */ - private getSchemaPrefix; - /** - * Returns all database names excluding 'temp'. - */ - private getDatabaseList; - /** - * Extracts the SELECT part from a CREATE VIEW statement. - */ - private extractViewDefinition; - private getColumns; - /** - * SQLite strips outer parentheses from expression defaults (`DEFAULT (expr)` → `expr` in pragma). - * We need to add them back so they match what we generate in DDL. - */ - private wrapExpressionDefault; - private getEnumDefinitions; - getPrimaryKeys( - connection: AbstractSqlConnection, - indexes: IndexDef[], - tableName: string, - schemaName?: string, - ): Promise; - private getIndexes; - private getChecks; - private getColumnDefinitions; - private getForeignKeys; - getManagementDbName(): string; - getCreateDatabaseSQL(name: string): string; - databaseExists(connection: Connection, name: string): Promise; - /** - * Implicit indexes will be ignored when diffing - */ - isImplicitIndex(name: string): boolean; - dropIndex(table: string, index: IndexDef, oldIndexName?: string): string; - /** - * SQLite does not support schema-qualified table names in REFERENCES clauses. - * Foreign key references can only point to tables in the same database. - */ - getReferencedTableName(referencedTableName: string, schema?: string): string; - alterTable(diff: TableDifference, safe?: boolean): string[]; - private getAlterTempTableSQL; -} diff --git a/node_modules/@mikro-orm/sql/dialects/sqlite/SqliteSchemaHelper.js b/node_modules/@mikro-orm/sql/dialects/sqlite/SqliteSchemaHelper.js deleted file mode 100644 index b556019..0000000 --- a/node_modules/@mikro-orm/sql/dialects/sqlite/SqliteSchemaHelper.js +++ /dev/null @@ -1,543 +0,0 @@ -import { Utils } from '@mikro-orm/core'; -import { SchemaHelper } from '../../schema/SchemaHelper.js'; -/** SpatiaLite system views that should be automatically ignored */ -const SPATIALITE_VIEWS = [ - 'geometry_columns', - 'spatial_ref_sys', - 'views_geometry_columns', - 'virts_geometry_columns', - 'geom_cols_ref_sys', - 'spatial_ref_sys_aux', - 'vector_layers', - 'vector_layers_auth', - 'vector_layers_field_infos', - 'vector_layers_statistics', - 'ElementaryGeometries', -]; -export class SqliteSchemaHelper extends SchemaHelper { - disableForeignKeysSQL() { - return 'pragma foreign_keys = off;'; - } - enableForeignKeysSQL() { - return 'pragma foreign_keys = on;'; - } - supportsSchemaConstraints() { - return false; - } - getCreateNamespaceSQL(name) { - return ''; - } - getDropNamespaceSQL(name) { - return ''; - } - getListTablesSQL() { - return ( - `select name as table_name from sqlite_master where type = 'table' and name != 'sqlite_sequence' and name != 'geometry_columns' and name != 'spatial_ref_sys' ` + - `union all select name as table_name from sqlite_temp_master where type = 'table' order by name` - ); - } - async getAllTables(connection, schemas) { - const databases = await this.getDatabaseList(connection); - const hasAttachedDbs = databases.length > 1; // More than just 'main' - // If no attached databases, use original behavior - if (!hasAttachedDbs && !schemas?.length) { - return connection.execute(this.getListTablesSQL()); - } - // With attached databases, query each one - const targetSchemas = schemas?.length ? schemas : databases; - const allTables = []; - for (const dbName of targetSchemas) { - const prefix = this.getSchemaPrefix(dbName); - const tables = await connection.execute( - `select name from ${prefix}sqlite_master where type = 'table' ` + - `and name != 'sqlite_sequence' and name != 'geometry_columns' and name != 'spatial_ref_sys'`, - ); - for (const t of tables) { - allTables.push({ table_name: t.name, schema_name: dbName }); - } - } - return allTables; - } - async getNamespaces(connection) { - return this.getDatabaseList(connection); - } - getIgnoredViewsCondition() { - return SPATIALITE_VIEWS.map(v => `name != '${v}'`).join(' and '); - } - getListViewsSQL() { - return `select name as view_name, sql as view_definition from sqlite_master where type = 'view' and ${this.getIgnoredViewsCondition()} order by name`; - } - async loadViews(schema, connection, schemaName) { - const databases = await this.getDatabaseList(connection); - const hasAttachedDbs = databases.length > 1; // More than just 'main' - // If no attached databases and no specific schema, use original behavior - if (!hasAttachedDbs && !schemaName) { - const views = await connection.execute(this.getListViewsSQL()); - for (const view of views) { - schema.addView(view.view_name, schemaName, this.extractViewDefinition(view.view_definition)); - } - return; - } - // With attached databases, query each one - /* v8 ignore next - schemaName branch not commonly used */ - const targetDbs = schemaName ? [schemaName] : databases; - for (const dbName of targetDbs) { - const prefix = this.getSchemaPrefix(dbName); - const views = await connection.execute( - `select name as view_name, sql as view_definition from ${prefix}sqlite_master where type = 'view' and ${this.getIgnoredViewsCondition()} order by name`, - ); - for (const view of views) { - schema.addView(view.view_name, dbName, this.extractViewDefinition(view.view_definition)); - } - } - } - getDropDatabaseSQL(name) { - if (name === ':memory:') { - return ''; - } - /* v8 ignore next */ - return `drop database if exists ${this.quote(name)}`; - } - async loadInformationSchema(schema, connection, tables, schemas) { - for (const t of tables) { - const table = schema.addTable(t.table_name, t.schema_name, t.table_comment); - const cols = await this.getColumns(connection, table.name, table.schema); - const indexes = await this.getIndexes(connection, table.name, table.schema); - const checks = await this.getChecks(connection, table.name, table.schema); - const pks = await this.getPrimaryKeys(connection, indexes, table.name, table.schema); - const fks = await this.getForeignKeys(connection, table.name, table.schema); - const enums = await this.getEnumDefinitions(connection, table.name, table.schema); - table.init(cols, indexes, checks, pks, fks, enums); - } - } - createTable(table, alter) { - let sql = `create table ${table.getQuotedName()} (`; - const columns = table.getColumns(); - const lastColumn = columns[columns.length - 1].name; - for (const column of columns) { - const col = this.createTableColumn(column, table); - if (col) { - const comma = column.name === lastColumn ? '' : ', '; - sql += col + comma; - } - } - const primaryKey = table.getPrimaryKey(); - const createPrimary = primaryKey?.composite; - if (createPrimary && primaryKey) { - sql += `, primary key (${primaryKey.columnNames.map(c => this.quote(c)).join(', ')})`; - } - const parts = []; - for (const fk of Object.values(table.getForeignKeys())) { - parts.push(this.createForeignKey(table, fk, false)); - } - for (const check of table.getChecks()) { - const sql = `constraint ${this.quote(check.name)} check (${check.expression})`; - parts.push(sql); - } - if (parts.length > 0) { - sql += ', ' + parts.join(', '); - } - sql += ')'; - if (table.comment) { - sql += ` /* ${table.comment} */`; - } - const ret = []; - this.append(ret, sql); - for (const index of table.getIndexes()) { - this.append(ret, this.createIndex(index, table)); - } - return ret; - } - createTableColumn(column, table, _changedProperties) { - const col = [this.quote(column.name)]; - const checks = table.getChecks(); - const check = checks.findIndex(check => check.columnName === column.name); - const useDefault = column.default != null && column.default !== 'null'; - let columnType = column.type; - if (column.autoincrement) { - columnType = 'integer'; - } - if (column.generated) { - columnType += ` generated always as ${column.generated}`; - } - col.push(columnType); - if (check !== -1) { - col.push(`check (${checks[check].expression})`); - checks.splice(check, 1); - } - Utils.runIfNotEmpty(() => col.push('null'), column.nullable); - Utils.runIfNotEmpty(() => col.push('not null'), !column.nullable && !column.generated); - Utils.runIfNotEmpty(() => col.push('primary key'), column.primary); - Utils.runIfNotEmpty(() => col.push('autoincrement'), column.autoincrement); - Utils.runIfNotEmpty(() => col.push(`default ${column.default}`), useDefault); - return col.join(' '); - } - getAddColumnsSQL(table, columns, diff) { - return columns.map(column => { - let sql = `alter table ${table.getQuotedName()} add column ${this.createTableColumn(column, table)}`; - const foreignKey = Object.values(diff.addedForeignKeys).find( - fk => fk.columnNames.length === 1 && fk.columnNames[0] === column.name, - ); - if (foreignKey && this.options.createForeignKeyConstraints) { - delete diff.addedForeignKeys[foreignKey.constraintName]; - sql += ' ' + this.createForeignKey(diff.toTable, foreignKey, false, true); - } - return sql; - }); - } - dropForeignKey(tableName, constraintName) { - return ''; - } - getDropColumnsSQL(tableName, columns, schemaName) { - /* v8 ignore next */ - const name = this.quote( - (schemaName && schemaName !== this.platform.getDefaultSchemaName() ? schemaName + '.' : '') + tableName, - ); - return columns - .map(column => { - return `alter table ${name} drop column ${this.quote(column.name)}`; - }) - .join(';\n'); - } - getCreateIndexSQL(tableName, index) { - /* v8 ignore next */ - if (index.expression) { - return index.expression; - } - // SQLite requires: CREATE INDEX schema.index_name ON table_name (columns) - // NOT: CREATE INDEX index_name ON schema.table_name (columns) - const [schemaName, rawTableName] = this.splitTableName(tableName); - const quotedTableName = this.quote(rawTableName); - // If there's a schema, prefix the index name with it - let keyName; - if (schemaName && schemaName !== 'main') { - keyName = `${this.quote(schemaName)}.${this.quote(index.keyName)}`; - } else { - keyName = this.quote(index.keyName); - } - const sqlPrefix = `create ${index.unique ? 'unique ' : ''}index ${keyName} on ${quotedTableName}`; - /* v8 ignore next 4 */ - if (index.columnNames.some(column => column.includes('.'))) { - // JSON columns can have unique index but not unique constraint, and we need to distinguish those, so we can properly drop them - const columns = this.platform.getJsonIndexDefinition(index); - return `${sqlPrefix} (${columns.join(', ')})`; - } - // Use getIndexColumns to support advanced options like sort order and collation - return `${sqlPrefix} (${this.getIndexColumns(index)})`; - } - parseTableDefinition(sql, cols) { - const columns = {}; - const constraints = []; - // extract all columns definitions - let columnsDef = new RegExp(`create table [\`"']?.*?[\`"']? \\((.*)\\)`, 'i').exec(sql.replaceAll('\n', ''))?.[1]; - /* v8 ignore next */ - if (columnsDef) { - if (columnsDef.includes(', constraint ')) { - constraints.push(...columnsDef.substring(columnsDef.indexOf(', constraint') + 2).split(', ')); - columnsDef = columnsDef.substring(0, columnsDef.indexOf(', constraint')); - } - for (let i = cols.length - 1; i >= 0; i--) { - const col = cols[i]; - const re = ` *, *[\`"']?${col.name}[\`"']? (.*)`; - const columnDef = new RegExp(re, 'i').exec(columnsDef); - if (columnDef) { - columns[col.name] = { name: col.name, definition: columnDef[1] }; - columnsDef = columnsDef.substring(0, columnDef.index); - } - } - } - return { columns, constraints }; - } - /** - * Returns schema prefix for pragma and sqlite_master queries. - * Returns empty string for main database (no prefix needed). - */ - getSchemaPrefix(schemaName) { - if (!schemaName || schemaName === 'main') { - return ''; - } - return `${this.platform.quoteIdentifier(schemaName)}.`; - } - /** - * Returns all database names excluding 'temp'. - */ - async getDatabaseList(connection) { - const databases = await connection.execute('pragma database_list'); - return databases.filter(d => d.name !== 'temp').map(d => d.name); - } - /** - * Extracts the SELECT part from a CREATE VIEW statement. - */ - extractViewDefinition(viewDefinition) { - const match = /create\s+view\s+[`"']?\w+[`"']?\s+as\s+(.*)/is.exec(viewDefinition); - /* v8 ignore next - fallback for non-standard view definitions */ - return match ? match[1] : viewDefinition; - } - async getColumns(connection, tableName, schemaName) { - const prefix = this.getSchemaPrefix(schemaName); - const columns = await connection.execute(`pragma ${prefix}table_xinfo('${tableName}')`); - const sql = `select sql from ${prefix}sqlite_master where type = ? and name = ?`; - const tableDefinition = await connection.execute(sql, ['table', tableName], 'get'); - const composite = columns.reduce((count, col) => count + (col.pk ? 1 : 0), 0) > 1; - // there can be only one, so naive check like this should be enough - const hasAutoincrement = tableDefinition.sql.toLowerCase().includes('autoincrement'); - const { columns: columnDefinitions } = this.parseTableDefinition(tableDefinition.sql, columns); - return columns.map(col => { - const mappedType = connection.getPlatform().getMappedType(col.type); - let generated; - if (col.hidden > 1) { - /* v8 ignore next */ - const storage = col.hidden === 2 ? 'virtual' : 'stored'; - const re = new RegExp(`(generated always)? as \\((.*)\\)( ${storage})?$`, 'i'); - const match = columnDefinitions[col.name].definition.match(re); - if (match) { - generated = `${match[2]} ${storage}`; - } - } - return { - name: col.name, - type: col.type, - default: this.wrapExpressionDefault(col.dflt_value), - nullable: !col.notnull, - primary: !!col.pk, - mappedType, - unsigned: false, - autoincrement: !composite && col.pk && this.platform.isNumericColumn(mappedType) && hasAutoincrement, - generated, - }; - }); - } - /** - * SQLite strips outer parentheses from expression defaults (`DEFAULT (expr)` → `expr` in pragma). - * We need to add them back so they match what we generate in DDL. - */ - wrapExpressionDefault(value) { - if (value == null) { - return null; - } - // simple values that are returned as-is from pragma (no wrapping needed) - if ( - /^-?\d/.test(value) || - /^[xX]'/.test(value) || - value.startsWith("'") || - value.startsWith('"') || - value.startsWith('(') - ) { - return value; - } - const lower = value.toLowerCase(); - if (['null', 'true', 'false', 'current_timestamp', 'current_date', 'current_time'].includes(lower)) { - return value; - } - // everything else is an expression that had its outer parens stripped - return `(${value})`; - } - async getEnumDefinitions(connection, tableName, schemaName) { - const prefix = this.getSchemaPrefix(schemaName); - const sql = `select sql from ${prefix}sqlite_master where type = ? and name = ?`; - const tableDefinition = await connection.execute(sql, ['table', tableName], 'get'); - const checkConstraints = [...(tableDefinition.sql.match(/[`["'][^`\]"']+[`\]"'] text check \(.*?\)/gi) ?? [])]; - return checkConstraints.reduce((o, item) => { - // check constraints are defined as (note that last closing paren is missing): - // `type` text check (`type` in ('local', 'global') - const match = /[`["']([^`\]"']+)[`\]"'] text check \(.* \((.*)\)/i.exec(item); - /* v8 ignore next */ - if (match) { - o[match[1]] = match[2].split(',').map(item => /^\(?'(.*)'/.exec(item.trim())[1]); - } - return o; - }, {}); - } - async getPrimaryKeys(connection, indexes, tableName, schemaName) { - const prefix = this.getSchemaPrefix(schemaName); - const sql = `pragma ${prefix}table_info(\`${tableName}\`)`; - const cols = await connection.execute(sql); - return cols.filter(col => !!col.pk).map(col => col.name); - } - async getIndexes(connection, tableName, schemaName) { - const prefix = this.getSchemaPrefix(schemaName); - const sql = `pragma ${prefix}table_info(\`${tableName}\`)`; - const cols = await connection.execute(sql); - const indexes = await connection.execute(`pragma ${prefix}index_list(\`${tableName}\`)`); - const ret = []; - for (const col of cols.filter(c => c.pk)) { - ret.push({ - columnNames: [col.name], - keyName: 'primary', - constraint: true, - unique: true, - primary: true, - }); - } - for (const index of indexes.filter(index => !this.isImplicitIndex(index.name))) { - const res = await connection.execute(`pragma ${prefix}index_info(\`${index.name}\`)`); - ret.push( - ...res.map(row => ({ - columnNames: [row.name], - keyName: index.name, - unique: !!index.unique, - constraint: !!index.unique, - primary: false, - })), - ); - } - return this.mapIndexes(ret); - } - async getChecks(connection, tableName, schemaName) { - const { columns, constraints } = await this.getColumnDefinitions(connection, tableName, schemaName); - const checks = []; - for (const key of Object.keys(columns)) { - const column = columns[key]; - const expression = / (check \((.*)\))/i.exec(column.definition); - if (expression) { - checks.push({ - name: this.platform.getConfig().getNamingStrategy().indexName(tableName, [column.name], 'check'), - definition: expression[1], - expression: expression[2], - columnName: column.name, - }); - } - } - for (const constraint of constraints) { - const expression = /constraint *[`"']?(.*?)[`"']? * (check \((.*)\))/i.exec(constraint); - if (expression) { - checks.push({ - name: expression[1], - definition: expression[2], - expression: expression[3], - }); - } - } - return checks; - } - async getColumnDefinitions(connection, tableName, schemaName) { - const prefix = this.getSchemaPrefix(schemaName); - const columns = await connection.execute(`pragma ${prefix}table_xinfo('${tableName}')`); - const sql = `select sql from ${prefix}sqlite_master where type = ? and name = ?`; - const tableDefinition = await connection.execute(sql, ['table', tableName], 'get'); - return this.parseTableDefinition(tableDefinition.sql, columns); - } - async getForeignKeys(connection, tableName, schemaName) { - const { constraints } = await this.getColumnDefinitions(connection, tableName, schemaName); - const prefix = this.getSchemaPrefix(schemaName); - const fks = await connection.execute(`pragma ${prefix}foreign_key_list(\`${tableName}\`)`); - const qualifiedTableName = schemaName ? `${schemaName}.${tableName}` : tableName; - return fks.reduce((ret, fk) => { - const constraintName = this.platform.getIndexName(tableName, [fk.from], 'foreign'); - const constraint = constraints?.find(c => c.includes(constraintName)); - ret[constraintName] = { - constraintName, - columnName: fk.from, - columnNames: [fk.from], - localTableName: qualifiedTableName, - referencedTableName: fk.table, - referencedColumnName: fk.to, - referencedColumnNames: [fk.to], - updateRule: fk.on_update.toLowerCase(), - deleteRule: fk.on_delete.toLowerCase(), - deferMode: constraint?.match(/ deferrable initially (deferred|immediate)/i)?.[1].toLowerCase(), - }; - return ret; - }, {}); - } - getManagementDbName() { - return ''; - } - getCreateDatabaseSQL(name) { - return ''; - } - async databaseExists(connection, name) { - const tables = await connection.execute(this.getListTablesSQL()); - return tables.length > 0; - } - /** - * Implicit indexes will be ignored when diffing - */ - isImplicitIndex(name) { - // Ignore indexes with reserved names, e.g. autoindexes - return name.startsWith('sqlite_'); - } - dropIndex(table, index, oldIndexName = index.keyName) { - return `drop index ${this.quote(oldIndexName)}`; - } - /** - * SQLite does not support schema-qualified table names in REFERENCES clauses. - * Foreign key references can only point to tables in the same database. - */ - getReferencedTableName(referencedTableName, schema) { - const [schemaName, tableName] = this.splitTableName(referencedTableName); - // Strip any schema prefix - SQLite REFERENCES clause doesn't support it - return tableName; - } - alterTable(diff, safe) { - const ret = []; - const [schemaName, tableName] = this.splitTableName(diff.name); - if ( - Utils.hasObjectKeys(diff.removedChecks) || - Utils.hasObjectKeys(diff.changedChecks) || - Utils.hasObjectKeys(diff.changedForeignKeys) || - Utils.hasObjectKeys(diff.changedColumns) - ) { - return this.getAlterTempTableSQL(diff); - } - for (const index of Object.values(diff.removedIndexes)) { - this.append(ret, this.dropIndex(diff.name, index)); - } - for (const index of Object.values(diff.changedIndexes)) { - this.append(ret, this.dropIndex(diff.name, index)); - } - /* v8 ignore next */ - if (!safe && Object.values(diff.removedColumns).length > 0) { - this.append(ret, this.getDropColumnsSQL(tableName, Object.values(diff.removedColumns), schemaName)); - } - if (Object.values(diff.addedColumns).length > 0) { - this.append(ret, this.getAddColumnsSQL(diff.toTable, Object.values(diff.addedColumns), diff)); - } - if (Utils.hasObjectKeys(diff.addedForeignKeys) || Utils.hasObjectKeys(diff.addedChecks)) { - return this.getAlterTempTableSQL(diff); - } - for (const [oldColumnName, column] of Object.entries(diff.renamedColumns)) { - this.append(ret, this.getRenameColumnSQL(tableName, oldColumnName, column, schemaName)); - } - for (const index of Object.values(diff.addedIndexes)) { - ret.push(this.createIndex(index, diff.toTable)); - } - for (const index of Object.values(diff.changedIndexes)) { - ret.push(this.createIndex(index, diff.toTable, true)); - } - for (const [oldIndexName, index] of Object.entries(diff.renamedIndexes)) { - if (index.unique) { - this.append(ret, this.dropIndex(diff.name, index, oldIndexName)); - this.append(ret, this.createIndex(index, diff.toTable)); - } else { - this.append(ret, this.getRenameIndexSQL(diff.name, index, oldIndexName)); - } - } - return ret; - } - getAlterTempTableSQL(changedTable) { - const tempName = `${changedTable.toTable.name}__temp_alter`; - const quotedName = this.quote(changedTable.toTable.name); - const quotedTempName = this.quote(tempName); - const [first, ...rest] = this.createTable(changedTable.toTable); - const sql = [ - 'pragma foreign_keys = off;', - first.replace(`create table ${quotedName}`, `create table ${quotedTempName}`), - ]; - const columns = []; - for (const column of changedTable.toTable.getColumns()) { - const fromColumn = changedTable.fromTable.getColumn(column.name); - if (fromColumn) { - columns.push(this.quote(column.name)); - } else { - columns.push(`null as ${this.quote(column.name)}`); - } - } - sql.push(`insert into ${quotedTempName} select ${columns.join(', ')} from ${quotedName};`); - sql.push(`drop table ${quotedName};`); - sql.push(`alter table ${quotedTempName} rename to ${quotedName};`); - sql.push(...rest); - sql.push('pragma foreign_keys = on;'); - return sql; - } -} diff --git a/node_modules/@mikro-orm/sql/dialects/sqlite/index.d.ts b/node_modules/@mikro-orm/sql/dialects/sqlite/index.d.ts deleted file mode 100644 index 07c6aa1..0000000 --- a/node_modules/@mikro-orm/sql/dialects/sqlite/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './BaseSqliteConnection.js'; -export * from './NodeSqliteDialect.js'; -export * from './SqliteDriver.js'; -export * from './SqlitePlatform.js'; -export * from './SqliteSchemaHelper.js'; -export * from './SqliteNativeQueryBuilder.js'; diff --git a/node_modules/@mikro-orm/sql/dialects/sqlite/index.js b/node_modules/@mikro-orm/sql/dialects/sqlite/index.js deleted file mode 100644 index 07c6aa1..0000000 --- a/node_modules/@mikro-orm/sql/dialects/sqlite/index.js +++ /dev/null @@ -1,6 +0,0 @@ -export * from './BaseSqliteConnection.js'; -export * from './NodeSqliteDialect.js'; -export * from './SqliteDriver.js'; -export * from './SqlitePlatform.js'; -export * from './SqliteSchemaHelper.js'; -export * from './SqliteNativeQueryBuilder.js'; diff --git a/node_modules/@mikro-orm/sql/index.d.ts b/node_modules/@mikro-orm/sql/index.d.ts deleted file mode 100644 index 6f0732e..0000000 --- a/node_modules/@mikro-orm/sql/index.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * @packageDocumentation - * @module sql - */ -export { Kysely } from 'kysely'; -export * from '@mikro-orm/core'; -export * from './AbstractSqlConnection.js'; -export * from './AbstractSqlDriver.js'; -export * from './AbstractSqlPlatform.js'; -export * from './SqlEntityManager.js'; -export * from './SqlEntityRepository.js'; -export * from './query/index.js'; -export { raw } from './query/index.js'; -export * from './schema/index.js'; -export * from './dialects/index.js'; -export type * from './typings.js'; -export * from './plugin/index.js'; -export { SqlEntityManager as EntityManager } from './SqlEntityManager.js'; -export { SqlEntityRepository as EntityRepository } from './SqlEntityRepository.js'; diff --git a/node_modules/@mikro-orm/sql/index.js b/node_modules/@mikro-orm/sql/index.js deleted file mode 100644 index 9aebd30..0000000 --- a/node_modules/@mikro-orm/sql/index.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @packageDocumentation - * @module sql - */ -export { Kysely } from 'kysely'; -export * from '@mikro-orm/core'; -export * from './AbstractSqlConnection.js'; -export * from './AbstractSqlDriver.js'; -export * from './AbstractSqlPlatform.js'; -export * from './SqlEntityManager.js'; -export * from './SqlEntityRepository.js'; -export * from './query/index.js'; -export { raw } from './query/index.js'; -export * from './schema/index.js'; -export * from './dialects/index.js'; -export * from './plugin/index.js'; -export { SqlEntityManager as EntityManager } from './SqlEntityManager.js'; -export { SqlEntityRepository as EntityRepository } from './SqlEntityRepository.js'; diff --git a/node_modules/@mikro-orm/sql/package.json b/node_modules/@mikro-orm/sql/package.json deleted file mode 100644 index 8ee0ca1..0000000 --- a/node_modules/@mikro-orm/sql/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "@mikro-orm/sql", - "version": "7.0.2", - "description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.", - "keywords": [ - "data-mapper", - "ddd", - "entity", - "identity-map", - "javascript", - "js", - "mariadb", - "mikro-orm", - "mongo", - "mongodb", - "mysql", - "orm", - "postgresql", - "sqlite", - "sqlite3", - "ts", - "typescript", - "unit-of-work" - ], - "homepage": "https://mikro-orm.io", - "bugs": { - "url": "https://github.com/mikro-orm/mikro-orm/issues" - }, - "license": "MIT", - "author": "Martin Adámek", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/mikro-orm/mikro-orm.git" - }, - "type": "module", - "exports": { - "./package.json": "./package.json", - ".": "./index.js" - }, - "publishConfig": { - "access": "public" - }, - "scripts": { - "build": "yarn compile && yarn copy", - "clean": "yarn run -T rimraf ./dist", - "compile": "yarn run -T tsc -p tsconfig.build.json", - "copy": "node ../../scripts/copy.mjs" - }, - "dependencies": { - "kysely": "0.28.12" - }, - "devDependencies": { - "@mikro-orm/core": "^7.0.2" - }, - "peerDependencies": { - "@mikro-orm/core": "7.0.2" - }, - "engines": { - "node": ">= 22.17.0" - } -} diff --git a/node_modules/@mikro-orm/sql/plugin/index.d.ts b/node_modules/@mikro-orm/sql/plugin/index.d.ts deleted file mode 100644 index 69cb162..0000000 --- a/node_modules/@mikro-orm/sql/plugin/index.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { - type KyselyPlugin, - type PluginTransformQueryArgs, - type PluginTransformResultArgs, - type QueryResult, - type RootOperationNode, - type UnknownRow, -} from 'kysely'; -import type { SqlEntityManager } from '../SqlEntityManager.js'; -/** Configuration options for the MikroKyselyPlugin. */ -export interface MikroKyselyPluginOptions { - /** - * Use database table names ('table') or entity names ('entity') in queries. - * - * @default 'table' - */ - tableNamingStrategy?: 'table' | 'entity'; - /** - * Use database column names ('column') or property names ('property') in queries. - * - * @default 'column' - */ - columnNamingStrategy?: 'column' | 'property'; - /** - * Automatically process entity `onCreate` hooks in INSERT queries. - * - * @default false - */ - processOnCreateHooks?: boolean; - /** - * Automatically process entity `onUpdate` hooks in UPDATE queries. - * - * @default false - */ - processOnUpdateHooks?: boolean; - /** - * Convert JavaScript values to database-compatible values (e.g., Date to timestamp, custom types). - * - * @default false - */ - convertValues?: boolean; -} -/** Kysely plugin that transforms queries and results to use MikroORM entity/property naming conventions. */ -export declare class MikroKyselyPlugin implements KyselyPlugin { - #private; - constructor(em: SqlEntityManager, options?: MikroKyselyPluginOptions); - transformQuery(args: PluginTransformQueryArgs): RootOperationNode; - transformResult(args: PluginTransformResultArgs): Promise>; -} diff --git a/node_modules/@mikro-orm/sql/plugin/index.js b/node_modules/@mikro-orm/sql/plugin/index.js deleted file mode 100644 index bf6132d..0000000 --- a/node_modules/@mikro-orm/sql/plugin/index.js +++ /dev/null @@ -1,50 +0,0 @@ -import { - SelectQueryNode as SelectQueryNodeClass, - InsertQueryNode as InsertQueryNodeClass, - UpdateQueryNode as UpdateQueryNodeClass, - DeleteQueryNode as DeleteQueryNodeClass, -} from 'kysely'; -import { MikroTransformer } from './transformer.js'; -/** Kysely plugin that transforms queries and results to use MikroORM entity/property naming conventions. */ -export class MikroKyselyPlugin { - static #queryNodeCache = new WeakMap(); - #transformer; - #options; - constructor(em, options = {}) { - this.#options = options; - this.#transformer = new MikroTransformer(em, options); - } - transformQuery(args) { - this.#transformer.reset(); - const result = this.#transformer.transformNode(args.node, args.queryId); - // Cache the entity map if it is one we can process (for use in transformResult) - if ( - SelectQueryNodeClass.is(args.node) || - InsertQueryNodeClass.is(args.node) || - UpdateQueryNodeClass.is(args.node) || - DeleteQueryNodeClass.is(args.node) - ) { - // clone the entityMap because the transformer's internal map will be cleared and reused by the next query - const entityMap = new Map(this.#transformer.getOutputEntityMap()); - MikroKyselyPlugin.#queryNodeCache.set(args.queryId, { entityMap }); - } - return result; - } - async transformResult(args) { - // Only transform results if columnNamingStrategy is 'property' or convertValues is true - if (this.#options.columnNamingStrategy !== 'property' && !this.#options.convertValues) { - return args.result; - } - // Retrieve the cached query node and metadata - const cache = MikroKyselyPlugin.#queryNodeCache.get(args.queryId); - if (!cache) { - return args.result; - } - // Transform the result rows using the transformer - const transformedRows = this.#transformer.transformResult(args.result.rows ?? [], cache.entityMap); - return { - ...args.result, - rows: transformedRows ?? [], - }; - } -} diff --git a/node_modules/@mikro-orm/sql/plugin/transformer.d.ts b/node_modules/@mikro-orm/sql/plugin/transformer.d.ts deleted file mode 100644 index 96eba28..0000000 --- a/node_modules/@mikro-orm/sql/plugin/transformer.d.ts +++ /dev/null @@ -1,122 +0,0 @@ -import { type EntityMetadata, type EntityProperty } from '@mikro-orm/core'; -import { - type CommonTableExpressionNameNode, - type DeleteQueryNode, - type IdentifierNode, - type InsertQueryNode, - type JoinNode, - type MergeQueryNode, - type QueryId, - type SelectQueryNode, - type UpdateQueryNode, - type WithNode, - ColumnNode, - OperationNodeTransformer, - TableNode, -} from 'kysely'; -import type { MikroKyselyPluginOptions } from './index.js'; -import type { SqlEntityManager } from '../SqlEntityManager.js'; -export declare class MikroTransformer extends OperationNodeTransformer { - #private; - constructor(em: SqlEntityManager, options?: MikroKyselyPluginOptions); - reset(): void; - getOutputEntityMap(): Map; - /** @internal */ - getContextStack(): Map[]; - /** @internal */ - getSubqueryAliasMap(): Map; - transformSelectQuery(node: SelectQueryNode, queryId: QueryId): SelectQueryNode; - transformInsertQuery(node: InsertQueryNode, queryId?: QueryId): InsertQueryNode; - transformUpdateQuery(node: UpdateQueryNode, queryId?: QueryId): UpdateQueryNode; - transformDeleteQuery(node: DeleteQueryNode, queryId?: QueryId): DeleteQueryNode; - transformMergeQuery(node: MergeQueryNode, queryId?: QueryId): MergeQueryNode; - transformIdentifier(node: IdentifierNode, queryId: QueryId): IdentifierNode; - /** - * Find owner entity metadata for the current identifier in the context stack. - * Supports both aliased and non-aliased table references. - * Searches up the context stack to support correlated subqueries. - * Also checks subquery/CTE aliases to resolve to their source tables. - */ - findOwnerEntityInContext(): EntityMetadata | undefined; - processOnCreateHooks(node: InsertQueryNode, meta: EntityMetadata): InsertQueryNode; - processOnUpdateHooks(node: UpdateQueryNode, meta: EntityMetadata): UpdateQueryNode; - processInsertValues(node: InsertQueryNode, meta: EntityMetadata): InsertQueryNode; - processUpdateValues(node: UpdateQueryNode, meta: EntityMetadata): UpdateQueryNode; - mapColumnsToProperties(columns: readonly ColumnNode[], meta: EntityMetadata): (EntityProperty | undefined)[]; - normalizeColumnName(identifier: IdentifierNode): string; - findProperty(meta: EntityMetadata | undefined, columnName?: string): EntityProperty | undefined; - shouldConvertValues(): boolean; - prepareInputValue(prop: EntityProperty | undefined, value: unknown, enabled: boolean): unknown; - /** - * Look up a table name/alias in the context stack. - * Searches from current scope (top of stack) to parent scopes (bottom). - * This supports correlated subqueries and references to outer query tables. - */ - lookupInContextStack(tableNameOrAlias: string): EntityMetadata | undefined; - /** - * Process WITH node (CTE definitions) - */ - processWithNode(withNode: WithNode, context: Map): void; - /** - * Extract CTE name from CommonTableExpressionNameNode - */ - getCTEName(nameNode: CommonTableExpressionNameNode): string | undefined; - /** - * Process a FROM item (can be TableNode or AliasNode) - */ - processFromItem( - from: any, // OperationNode type - can be TableNode, AliasNode, or SelectQueryNode - context: Map, - ): void; - /** - * Process a JOIN node - */ - processJoinNode(join: JoinNode, context: Map): void; - /** - * Extract the primary source table from a SELECT query - * This helps resolve columns from subqueries to their original entity tables - */ - extractSourceTableFromSelectQuery(selectQuery: SelectQueryNode): EntityMetadata | undefined; - /** - * Extract alias name from an alias node - */ - extractAliasName(alias: any): string | undefined; - /** - * Extract table name from a TableNode - */ - getTableName(node: TableNode | undefined): string | undefined; - /** - * Find entity metadata by table name or entity name - */ - findEntityMetadata(name: string): EntityMetadata | undefined; - /** - * Transform result rows by mapping database column names to property names - * This is called for SELECT queries when columnNamingStrategy is 'property' - */ - transformResult( - rows: Record[] | undefined, - entityMap: Map, - ): Record[] | undefined; - buildGlobalFieldMap(entityMap: Map): Record; - buildGlobalRelationFieldMap(entityMap: Map): Record; - /** - * Build a mapping from database field names to property objects - * Format: { 'field_name': EntityProperty } - */ - buildFieldToPropertyMap(meta: EntityMetadata, alias?: string): Record; - /** - * Build a mapping for relation fields - * For ManyToOne relations, we need to map from the foreign key field to the relation property - * Format: { 'foreign_key_field': 'relationPropertyName' } - */ - buildRelationFieldMap(meta: EntityMetadata, alias?: string): Record; - /** - * Transform a single row by mapping column names to property names - */ - transformRow( - row: Record, - fieldToPropertyMap: Record, - relationFieldMap: Record, - ): Record; - prepareOutputValue(prop: EntityProperty | undefined, value: unknown): unknown; -} diff --git a/node_modules/@mikro-orm/sql/plugin/transformer.js b/node_modules/@mikro-orm/sql/plugin/transformer.js deleted file mode 100644 index a792605..0000000 --- a/node_modules/@mikro-orm/sql/plugin/transformer.js +++ /dev/null @@ -1,901 +0,0 @@ -import { ReferenceKind, isRaw } from '@mikro-orm/core'; -import { - AliasNode, - ColumnNode, - ColumnUpdateNode, - OperationNodeTransformer, - PrimitiveValueListNode, - ReferenceNode, - SchemableIdentifierNode, - TableNode, - ValueListNode, - ValueNode, - ValuesNode, -} from 'kysely'; -export class MikroTransformer extends OperationNodeTransformer { - /** - * Context stack to support nested queries (subqueries, CTEs) - * Each level of query scope has its own Map of table aliases/names to EntityMetadata - * Top of stack (highest index) is the current scope - */ - #contextStack = []; - /** - * Subquery alias map: maps subquery/CTE alias to its source table metadata - * Used to resolve columns from subqueries/CTEs to their original table definitions - */ - #subqueryAliasMap = new Map(); - #metadata; - #platform; - /** - * Global map of all entities involved in the query. - * Populated during AST transformation and used for result transformation. - */ - #entityMap = new Map(); - #em; - #options; - constructor(em, options = {}) { - super(); - this.#em = em; - this.#options = options; - this.#metadata = em.getMetadata(); - this.#platform = em.getDriver().getPlatform(); - } - reset() { - this.#subqueryAliasMap.clear(); - this.#entityMap.clear(); - } - getOutputEntityMap() { - return this.#entityMap; - } - /** @internal */ - getContextStack() { - return this.#contextStack; - } - /** @internal */ - getSubqueryAliasMap() { - return this.#subqueryAliasMap; - } - transformSelectQuery(node, queryId) { - // Push a new context for this query scope (starts with inherited parent context) - const currentContext = new Map(); - this.#contextStack.push(currentContext); - try { - // Process WITH clause (CTEs) first - they define names available in this scope - if (node.with) { - this.processWithNode(node.with, currentContext); - } - // Process FROM clause - main tables in this scope - if (node.from?.froms) { - for (const from of node.from.froms) { - this.processFromItem(from, currentContext); - } - } - // Process JOINs - additional tables joined into this scope - if (node.joins) { - for (const join of node.joins) { - this.processJoinNode(join, currentContext); - } - } - return super.transformSelectQuery(node, queryId); - } finally { - // Pop the context when exiting this query scope - this.#contextStack.pop(); - } - } - transformInsertQuery(node, queryId) { - const currentContext = new Map(); - this.#contextStack.push(currentContext); - try { - let entityMeta; - if (node.into) { - const tableName = this.getTableName(node.into); - if (tableName) { - const meta = this.findEntityMetadata(tableName); - if (meta) { - entityMeta = meta; - currentContext.set(meta.tableName, meta); - this.#entityMap.set(meta.tableName, meta); - } - } - } - const nodeWithHooks = - this.#options.processOnCreateHooks && entityMeta ? this.processOnCreateHooks(node, entityMeta) : node; - const nodeWithConvertedValues = - this.#options.convertValues && entityMeta ? this.processInsertValues(nodeWithHooks, entityMeta) : nodeWithHooks; - // Handle ON CONFLICT clause - let finalNode = nodeWithConvertedValues; - if (node.onConflict?.updates && entityMeta) { - // Create a temporary UpdateQueryNode to reuse processOnUpdateHooks and processUpdateValues - // We only care about the updates part - const tempUpdateNode = { - kind: 'UpdateQueryNode', - table: node.into, // Dummy table - updates: node.onConflict.updates, - }; - const updatesWithHooks = this.#options.processOnUpdateHooks - ? this.processOnUpdateHooks(tempUpdateNode, entityMeta).updates - : node.onConflict.updates; - const tempUpdateNodeWithHooks = { - ...tempUpdateNode, - updates: updatesWithHooks, - }; - const updatesWithConvertedValues = this.#options.convertValues - ? this.processUpdateValues(tempUpdateNodeWithHooks, entityMeta).updates - : updatesWithHooks; - if (updatesWithConvertedValues && updatesWithConvertedValues !== node.onConflict.updates) { - // Construct the new OnConflictNode with updated values - finalNode = { - ...finalNode, - onConflict: { - ...node.onConflict, - updates: updatesWithConvertedValues, - }, - }; - } - } - return super.transformInsertQuery(finalNode, queryId); - } finally { - this.#contextStack.pop(); - } - } - transformUpdateQuery(node, queryId) { - const currentContext = new Map(); - this.#contextStack.push(currentContext); - try { - let entityMeta; - if (node.table && TableNode.is(node.table)) { - const tableName = this.getTableName(node.table); - if (tableName) { - const meta = this.findEntityMetadata(tableName); - if (meta) { - entityMeta = meta; - currentContext.set(meta.tableName, meta); - this.#entityMap.set(meta.tableName, meta); - } - } - } - // Process FROM clause in UPDATE queries (for UPDATE with JOIN) - if (node.from) { - for (const fromItem of node.from.froms) { - this.processFromItem(fromItem, currentContext); - } - } - // Also process JOINs in UPDATE queries - if (node.joins) { - for (const join of node.joins) { - this.processJoinNode(join, currentContext); - } - } - const nodeWithHooks = - this.#options.processOnUpdateHooks && entityMeta ? this.processOnUpdateHooks(node, entityMeta) : node; - const nodeWithConvertedValues = - this.#options.convertValues && entityMeta ? this.processUpdateValues(nodeWithHooks, entityMeta) : nodeWithHooks; - return super.transformUpdateQuery(nodeWithConvertedValues, queryId); - } finally { - this.#contextStack.pop(); - } - } - transformDeleteQuery(node, queryId) { - const currentContext = new Map(); - this.#contextStack.push(currentContext); - try { - const froms = node.from?.froms; - if (froms && froms.length > 0) { - const firstFrom = froms[0]; - if (TableNode.is(firstFrom)) { - const tableName = this.getTableName(firstFrom); - if (tableName) { - const meta = this.findEntityMetadata(tableName); - if (meta) { - currentContext.set(meta.tableName, meta); - this.#entityMap.set(meta.tableName, meta); - } - } - } - } - // Also process JOINs in DELETE queries - if (node.joins) { - for (const join of node.joins) { - this.processJoinNode(join, currentContext); - } - } - return super.transformDeleteQuery(node, queryId); - } finally { - this.#contextStack.pop(); - } - } - transformMergeQuery(node, queryId) { - const currentContext = new Map(); - this.#contextStack.push(currentContext); - try { - return super.transformMergeQuery(node, queryId); - } finally { - this.#contextStack.pop(); - } - } - transformIdentifier(node, queryId) { - node = super.transformIdentifier(node, queryId); - const parent = this.nodeStack[this.nodeStack.length - 2]; - // Transform table names when tableNamingStrategy is 'entity' - if (this.#options.tableNamingStrategy === 'entity' && parent && SchemableIdentifierNode.is(parent)) { - const meta = this.findEntityMetadata(node.name); - if (meta) { - return { - ...node, - name: meta.tableName, - }; - } - } - // Transform column names when columnNamingStrategy is 'property' - // Support ColumnNode, ColumnUpdateNode, and ReferenceNode (for JOIN conditions) - if ( - this.#options.columnNamingStrategy === 'property' && - parent && - (ColumnNode.is(parent) || ColumnUpdateNode.is(parent) || ReferenceNode.is(parent)) - ) { - const ownerMeta = this.findOwnerEntityInContext(); - if (ownerMeta) { - const prop = ownerMeta.properties[node.name]; - const fieldName = prop?.fieldNames?.[0]; - if (fieldName) { - return { - ...node, - name: fieldName, - }; - } - } - } - return node; - } - /** - * Find owner entity metadata for the current identifier in the context stack. - * Supports both aliased and non-aliased table references. - * Searches up the context stack to support correlated subqueries. - * Also checks subquery/CTE aliases to resolve to their source tables. - */ - findOwnerEntityInContext() { - // Check if current column has a table reference (e.g., u.firstName) - const reference = this.nodeStack.find(it => ReferenceNode.is(it)); - if (reference?.table && TableNode.is(reference.table)) { - const tableName = this.getTableName(reference.table); - if (tableName) { - // First, check in subquery alias map (for CTE/subquery columns) - if (this.#subqueryAliasMap.has(tableName)) { - return this.#subqueryAliasMap.get(tableName); - } - // Find entity metadata to get the actual table name - // Context uses table names (meta.tableName) as keys, not entity names - const entityMeta = this.findEntityMetadata(tableName); - if (entityMeta) { - // Search in context stack using the actual table name - const meta = this.lookupInContextStack(entityMeta.tableName); - if (meta) { - return meta; - } - // Also try with the entity name (for cases where context uses entity name) - const metaByEntityName = this.lookupInContextStack(tableName); - if (metaByEntityName) { - return metaByEntityName; - } - } else { - // If entity metadata not found, try direct lookup (for CTE/subquery cases) - const meta = this.lookupInContextStack(tableName); - if (meta) { - return meta; - } - } - } - } - // If no explicit table reference, use the first entity in current context - if (this.#contextStack.length > 0) { - const currentContext = this.#contextStack[this.#contextStack.length - 1]; - for (const [alias, meta] of currentContext.entries()) { - if (meta) { - return meta; - } - // If the context value is undefined but the alias is in subqueryAliasMap, - // use the mapped metadata (for CTE/subquery cases) - if (!meta && this.#subqueryAliasMap.has(alias)) { - const mappedMeta = this.#subqueryAliasMap.get(alias); - if (mappedMeta) { - return mappedMeta; - } - } - } - } - return undefined; - } - processOnCreateHooks(node, meta) { - if (!node.columns || !node.values || !ValuesNode.is(node.values)) { - return node; - } - const existingProps = new Set(); - for (const col of node.columns) { - const prop = this.findProperty(meta, this.normalizeColumnName(col.column)); - if (prop) { - existingProps.add(prop.name); - } - } - const missingProps = meta.props.filter(prop => prop.onCreate && !existingProps.has(prop.name)); - if (missingProps.length === 0) { - return node; - } - const newColumns = [...node.columns]; - for (const prop of missingProps) { - newColumns.push(ColumnNode.create(prop.name)); - } - const newRows = node.values.values.map(row => { - const valuesToAdd = missingProps.map(prop => { - const val = prop.onCreate(undefined, this.#em); - return val; - }); - if (ValueListNode.is(row)) { - const newValues = [...row.values, ...valuesToAdd.map(v => ValueNode.create(v))]; - return ValueListNode.create(newValues); - } - if (PrimitiveValueListNode.is(row)) { - const newValues = [...row.values, ...valuesToAdd]; - return PrimitiveValueListNode.create(newValues); - } - return row; - }); - return { - ...node, - columns: Object.freeze(newColumns), - values: ValuesNode.create(newRows), - }; - } - processOnUpdateHooks(node, meta) { - if (!node.updates) { - return node; - } - const existingProps = new Set(); - for (const update of node.updates) { - if (ColumnNode.is(update.column)) { - const prop = this.findProperty(meta, this.normalizeColumnName(update.column.column)); - if (prop) { - existingProps.add(prop.name); - } - } - } - const missingProps = meta.props.filter(prop => prop.onUpdate && !existingProps.has(prop.name)); - if (missingProps.length === 0) { - return node; - } - const newUpdates = [...node.updates]; - for (const prop of missingProps) { - const val = prop.onUpdate(undefined, this.#em); - newUpdates.push(ColumnUpdateNode.create(ColumnNode.create(prop.name), ValueNode.create(val))); - } - return { - ...node, - updates: Object.freeze(newUpdates), - }; - } - processInsertValues(node, meta) { - if (!node.columns?.length || !node.values || !ValuesNode.is(node.values)) { - return node; - } - const columnProps = this.mapColumnsToProperties(node.columns, meta); - const shouldConvert = this.shouldConvertValues(); - let changed = false; - const convertedRows = node.values.values.map(row => { - if (ValueListNode.is(row)) { - if (row.values.length !== columnProps.length) { - return row; - } - const values = row.values.map((valueNode, idx) => { - if (!ValueNode.is(valueNode)) { - return valueNode; - } - const converted = this.prepareInputValue(columnProps[idx], valueNode.value, shouldConvert); - if (converted === valueNode.value) { - return valueNode; - } - changed = true; - return valueNode.immediate ? ValueNode.createImmediate(converted) : ValueNode.create(converted); - }); - return ValueListNode.create(values); - } - if (PrimitiveValueListNode.is(row)) { - if (row.values.length !== columnProps.length) { - return row; - } - const values = row.values.map((value, idx) => { - const converted = this.prepareInputValue(columnProps[idx], value, shouldConvert); - if (converted !== value) { - changed = true; - } - return converted; - }); - return PrimitiveValueListNode.create(values); - } - return row; - }); - if (!changed) { - return node; - } - return { - ...node, - values: ValuesNode.create(convertedRows), - }; - } - processUpdateValues(node, meta) { - if (!node.updates?.length) { - return node; - } - const shouldConvert = this.shouldConvertValues(); - let changed = false; - const updates = node.updates.map(updateNode => { - if (!ValueNode.is(updateNode.value)) { - return updateNode; - } - const columnName = ColumnNode.is(updateNode.column) - ? this.normalizeColumnName(updateNode.column.column) - : undefined; - const property = this.findProperty(meta, columnName); - const converted = this.prepareInputValue(property, updateNode.value.value, shouldConvert); - if (converted === updateNode.value.value) { - return updateNode; - } - changed = true; - const newValueNode = updateNode.value.immediate - ? ValueNode.createImmediate(converted) - : ValueNode.create(converted); - return { - ...updateNode, - value: newValueNode, - }; - }); - if (!changed) { - return node; - } - return { - ...node, - updates, - }; - } - mapColumnsToProperties(columns, meta) { - return columns.map(column => { - const columnName = this.normalizeColumnName(column.column); - return this.findProperty(meta, columnName); - }); - } - normalizeColumnName(identifier) { - const name = identifier.name; - if (!name.includes('.')) { - return name; - } - const parts = name.split('.'); - return parts[parts.length - 1] ?? name; - } - findProperty(meta, columnName) { - if (!meta || !columnName) { - return undefined; - } - if (meta.properties[columnName]) { - return meta.properties[columnName]; - } - return meta.props.find(prop => prop.fieldNames?.includes(columnName)); - } - shouldConvertValues() { - return !!this.#options.convertValues; - } - prepareInputValue(prop, value, enabled) { - if (!enabled || !prop || value == null) { - return value; - } - if (typeof value === 'object' && value !== null) { - if (isRaw(value)) { - return value; - } - if ('kind' in value) { - return value; - } - } - if (prop.customType && !isRaw(value)) { - return prop.customType.convertToDatabaseValue(value, this.#platform, { - fromQuery: true, - key: prop.name, - mode: 'query-data', - }); - } - if (value instanceof Date) { - return this.#platform.processDateProperty(value); - } - return value; - } - /** - * Look up a table name/alias in the context stack. - * Searches from current scope (top of stack) to parent scopes (bottom). - * This supports correlated subqueries and references to outer query tables. - */ - lookupInContextStack(tableNameOrAlias) { - // Search from top of stack (current scope) to bottom (parent scopes) - for (let i = this.#contextStack.length - 1; i >= 0; i--) { - const context = this.#contextStack[i]; - if (context.has(tableNameOrAlias)) { - return context.get(tableNameOrAlias); - } - } - return undefined; - } - /** - * Process WITH node (CTE definitions) - */ - processWithNode(withNode, context) { - for (const cte of withNode.expressions) { - const cteName = this.getCTEName(cte.name); - if (cteName) { - // CTEs are not entities, so map to undefined - // They will be transformed recursively by transformSelectQuery - context.set(cteName, undefined); - // Also try to extract the source table from the CTE's expression - // This helps resolve columns in subsequent queries that use the CTE - if (cte.expression?.kind === 'SelectQueryNode') { - const sourceMeta = this.extractSourceTableFromSelectQuery(cte.expression); - if (sourceMeta) { - this.#subqueryAliasMap.set(cteName, sourceMeta); - // Add CTE to entityMap so it can be used for result transformation if needed - // (though CTEs usually don't appear in result rows directly, but their columns might) - this.#entityMap.set(cteName, sourceMeta); - } - } - } - } - } - /** - * Extract CTE name from CommonTableExpressionNameNode - */ - getCTEName(nameNode) { - if (TableNode.is(nameNode.table)) { - return this.getTableName(nameNode.table); - } - return undefined; - } - /** - * Process a FROM item (can be TableNode or AliasNode) - */ - processFromItem( - from, // OperationNode type - can be TableNode, AliasNode, or SelectQueryNode - context, - ) { - if (AliasNode.is(from)) { - if (TableNode.is(from.node)) { - // Regular table with alias - const tableName = this.getTableName(from.node); - if (tableName && from.alias) { - const meta = this.findEntityMetadata(tableName); - const aliasName = this.extractAliasName(from.alias); - if (aliasName) { - context.set(aliasName, meta); - if (meta) { - this.#entityMap.set(aliasName, meta); - } - // Also map the alias in subqueryAliasMap if the table name is a CTE - if (this.#subqueryAliasMap.has(tableName)) { - this.#subqueryAliasMap.set(aliasName, this.#subqueryAliasMap.get(tableName)); - } - } - } - } else if (from.node?.kind === 'SelectQueryNode') { - // Subquery with alias - const aliasName = this.extractAliasName(from.alias); - if (aliasName) { - context.set(aliasName, undefined); - // Try to extract the source table from the subquery - const sourceMeta = this.extractSourceTableFromSelectQuery(from.node); - if (sourceMeta) { - this.#subqueryAliasMap.set(aliasName, sourceMeta); - } - } - } else { - // Other types with alias - const aliasName = this.extractAliasName(from.alias); - if (aliasName) { - context.set(aliasName, undefined); - } - } - } else if (TableNode.is(from)) { - // Table without alias - const tableName = this.getTableName(from); - if (tableName) { - const meta = this.findEntityMetadata(tableName); - context.set(tableName, meta); - if (meta) { - this.#entityMap.set(tableName, meta); - } - } - } - } - /** - * Process a JOIN node - */ - processJoinNode(join, context) { - const joinTable = join.table; - if (AliasNode.is(joinTable)) { - if (TableNode.is(joinTable.node)) { - // Regular table with alias in JOIN - const tableName = this.getTableName(joinTable.node); - if (tableName && joinTable.alias) { - const meta = this.findEntityMetadata(tableName); - const aliasName = this.extractAliasName(joinTable.alias); - if (aliasName) { - context.set(aliasName, meta); - if (meta) { - this.#entityMap.set(aliasName, meta); - } - // Also map the alias in subqueryAliasMap if the table name is a CTE - if (this.#subqueryAliasMap.has(tableName)) { - this.#subqueryAliasMap.set(aliasName, this.#subqueryAliasMap.get(tableName)); - } - } - } - } else if (joinTable.node?.kind === 'SelectQueryNode') { - // Subquery with alias in JOIN - const aliasName = this.extractAliasName(joinTable.alias); - if (aliasName) { - context.set(aliasName, undefined); - // Try to extract the source table from the subquery - const sourceMeta = this.extractSourceTableFromSelectQuery(joinTable.node); - if (sourceMeta) { - this.#subqueryAliasMap.set(aliasName, sourceMeta); - } - } - } else { - // Other types with alias - const aliasName = this.extractAliasName(joinTable.alias); - if (aliasName) { - context.set(aliasName, undefined); - } - } - } else if (TableNode.is(joinTable)) { - // Table without alias in JOIN - const tableName = this.getTableName(joinTable); - if (tableName) { - const meta = this.findEntityMetadata(tableName); - // Use table name (meta.tableName) as key to match transformUpdateQuery behavior - if (meta) { - context.set(meta.tableName, meta); - this.#entityMap.set(meta.tableName, meta); - // Also set with entity name for backward compatibility - context.set(tableName, meta); - } else { - context.set(tableName, undefined); - } - } - } - } - /** - * Extract the primary source table from a SELECT query - * This helps resolve columns from subqueries to their original entity tables - */ - extractSourceTableFromSelectQuery(selectQuery) { - if (!selectQuery.from?.froms || selectQuery.from.froms.length === 0) { - return undefined; - } - // Get the first FROM table - const firstFrom = selectQuery.from.froms[0]; - let sourceTable; - if (AliasNode.is(firstFrom) && TableNode.is(firstFrom.node)) { - sourceTable = firstFrom.node; - } else if (TableNode.is(firstFrom)) { - sourceTable = firstFrom; - } - if (sourceTable) { - const tableName = this.getTableName(sourceTable); - if (tableName) { - return this.findEntityMetadata(tableName); - } - } - return undefined; - } - /** - * Extract alias name from an alias node - */ - extractAliasName(alias) { - if (typeof alias === 'object' && 'name' in alias) { - return alias.name; - } - return undefined; - } - /** - * Extract table name from a TableNode - */ - getTableName(node) { - if (!node) { - return undefined; - } - if (TableNode.is(node) && SchemableIdentifierNode.is(node.table)) { - const identifier = node.table.identifier; - if (typeof identifier === 'object' && 'name' in identifier) { - return identifier.name; - } - } - return undefined; - } - /** - * Find entity metadata by table name or entity name - */ - findEntityMetadata(name) { - const byEntity = this.#metadata.getByClassName(name, false); - if (byEntity) { - return byEntity; - } - const allMetadata = Array.from(this.#metadata); - const byTable = allMetadata.find(m => m.tableName === name); - if (byTable) { - return byTable; - } - return undefined; - } - /** - * Transform result rows by mapping database column names to property names - * This is called for SELECT queries when columnNamingStrategy is 'property' - */ - transformResult(rows, entityMap) { - // Only transform if columnNamingStrategy is 'property' or convertValues is true, and we have data - if ( - (this.#options.columnNamingStrategy !== 'property' && !this.#options.convertValues) || - !rows || - rows.length === 0 - ) { - return rows; - } - // If no entities found (e.g. raw query without known tables), return rows as is - if (entityMap.size === 0) { - return rows; - } - // Build a global mapping from database field names to property objects - const fieldToPropertyMap = this.buildGlobalFieldMap(entityMap); - const relationFieldMap = this.buildGlobalRelationFieldMap(entityMap); - // Transform each row - return rows.map(row => this.transformRow(row, fieldToPropertyMap, relationFieldMap)); - } - buildGlobalFieldMap(entityMap) { - const map = {}; - for (const [alias, meta] of entityMap.entries()) { - Object.assign(map, this.buildFieldToPropertyMap(meta, alias)); - } - return map; - } - buildGlobalRelationFieldMap(entityMap) { - const map = {}; - for (const [alias, meta] of entityMap.entries()) { - Object.assign(map, this.buildRelationFieldMap(meta, alias)); - } - return map; - } - /** - * Build a mapping from database field names to property objects - * Format: { 'field_name': EntityProperty } - */ - buildFieldToPropertyMap(meta, alias) { - const map = {}; - for (const prop of meta.props) { - if (prop.fieldNames && prop.fieldNames.length > 0) { - for (const fieldName of prop.fieldNames) { - if (!(fieldName in map)) { - map[fieldName] = prop; - } - if (alias) { - const dotted = `${alias}.${fieldName}`; - if (!(dotted in map)) { - map[dotted] = prop; - } - const underscored = `${alias}_${fieldName}`; - if (!(underscored in map)) { - map[underscored] = prop; - } - const doubleUnderscored = `${alias}__${fieldName}`; - if (!(doubleUnderscored in map)) { - map[doubleUnderscored] = prop; - } - } - } - } - if (!(prop.name in map)) { - map[prop.name] = prop; - } - } - return map; - } - /** - * Build a mapping for relation fields - * For ManyToOne relations, we need to map from the foreign key field to the relation property - * Format: { 'foreign_key_field': 'relationPropertyName' } - */ - buildRelationFieldMap(meta, alias) { - const map = {}; - for (const prop of meta.props) { - // For ManyToOne/OneToOne relations, find the foreign key field - if (prop.kind === ReferenceKind.MANY_TO_ONE || prop.kind === ReferenceKind.ONE_TO_ONE) { - if (prop.fieldNames && prop.fieldNames.length > 0) { - const fieldName = prop.fieldNames[0]; - map[fieldName] = prop.name; - if (alias) { - map[`${alias}.${fieldName}`] = prop.name; - map[`${alias}_${fieldName}`] = prop.name; - map[`${alias}__${fieldName}`] = prop.name; - } - } - } - } - return map; - } - /** - * Transform a single row by mapping column names to property names - */ - transformRow(row, fieldToPropertyMap, relationFieldMap) { - const transformed = { ...row }; - // First pass: map regular fields from fieldName to propertyName and convert values - for (const [fieldName, prop] of Object.entries(fieldToPropertyMap)) { - if (!(fieldName in transformed)) { - continue; - } - const converted = this.prepareOutputValue(prop, transformed[fieldName]); - if (this.#options.columnNamingStrategy === 'property' && prop.name !== fieldName) { - if (!(prop.name in transformed)) { - transformed[prop.name] = converted; - } else { - transformed[prop.name] = converted; - } - delete transformed[fieldName]; - continue; - } - if (this.#options.convertValues) { - transformed[fieldName] = converted; - } - } - // Second pass: handle relation fields - // Only run if columnNamingStrategy is 'property', as we don't want to rename FKs otherwise - if (this.#options.columnNamingStrategy === 'property') { - for (const [fieldName, relationPropertyName] of Object.entries(relationFieldMap)) { - if (fieldName in transformed && !(relationPropertyName in transformed)) { - // Move the foreign key value to the relation property name - transformed[relationPropertyName] = transformed[fieldName]; - delete transformed[fieldName]; - } - } - } - return transformed; - } - prepareOutputValue(prop, value) { - if (!this.#options.convertValues || !prop || value == null) { - return value; - } - if (prop.customType) { - return prop.customType.convertToJSValue(value, this.#platform); - } - // Aligned with EntityComparator.getResultMapper logic - if (prop.runtimeType === 'boolean') { - // Use !! conversion like EntityComparator: value == null ? value : !!value - return value == null ? value : !!value; - } - if (prop.runtimeType === 'Date' && !this.#platform.isNumericProperty(prop)) { - // Aligned with EntityComparator: exclude numeric timestamp properties - // If already Date instance or null, return as is - if (value == null || value instanceof Date) { - return value; - } - // Handle timezone like EntityComparator.parseDate - const tz = this.#platform.getTimezone(); - if (!tz || tz === 'local') { - return this.#platform.parseDate(value); - } - // For non-local timezone, check if value already has timezone info - // Number (timestamp) doesn't need timezone handling, string needs check - if ( - typeof value === 'number' || - (typeof value === 'string' && (value.includes('+') || value.lastIndexOf('-') > 10 || value.endsWith('Z'))) - ) { - return this.#platform.parseDate(value); - } - // Append timezone if not present (only for string values) - return this.#platform.parseDate(value + tz); - } - // For all other runtimeTypes (number, string, bigint, Buffer, object, any, etc.) - // EntityComparator just assigns directly without conversion - return value; - } -} diff --git a/node_modules/@mikro-orm/sql/query/ArrayCriteriaNode.d.ts b/node_modules/@mikro-orm/sql/query/ArrayCriteriaNode.d.ts deleted file mode 100644 index 872e3dd..0000000 --- a/node_modules/@mikro-orm/sql/query/ArrayCriteriaNode.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { CriteriaNode } from './CriteriaNode.js'; -import type { IQueryBuilder, ICriteriaNodeProcessOptions } from '../typings.js'; -/** - * @internal - */ -export declare class ArrayCriteriaNode extends CriteriaNode { - process(qb: IQueryBuilder, options?: ICriteriaNodeProcessOptions): any; - unwrap(): any; - willAutoJoin(qb: IQueryBuilder, alias?: string, options?: ICriteriaNodeProcessOptions): boolean; - isStrict(): boolean; -} diff --git a/node_modules/@mikro-orm/sql/query/ArrayCriteriaNode.js b/node_modules/@mikro-orm/sql/query/ArrayCriteriaNode.js deleted file mode 100644 index b065113..0000000 --- a/node_modules/@mikro-orm/sql/query/ArrayCriteriaNode.js +++ /dev/null @@ -1,24 +0,0 @@ -import { CriteriaNode } from './CriteriaNode.js'; -/** - * @internal - */ -export class ArrayCriteriaNode extends CriteriaNode { - process(qb, options) { - return this.payload.map(node => { - return node.process(qb, options); - }); - } - unwrap() { - return this.payload.map(node => { - return node.unwrap(); - }); - } - willAutoJoin(qb, alias, options) { - return this.payload.some(node => { - return node.willAutoJoin(qb, alias, options); - }); - } - isStrict() { - return this.strict || this.payload.some(node => node.isStrict()); - } -} diff --git a/node_modules/@mikro-orm/sql/query/CriteriaNode.d.ts b/node_modules/@mikro-orm/sql/query/CriteriaNode.d.ts deleted file mode 100644 index a967ba4..0000000 --- a/node_modules/@mikro-orm/sql/query/CriteriaNode.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { - type EntityKey, - type EntityProperty, - type MetadataStorage, - type RawQueryFragmentSymbol, - type EntityName, -} from '@mikro-orm/core'; -import type { ICriteriaNode, ICriteriaNodeProcessOptions, IQueryBuilder } from '../typings.js'; -/** - * Helper for working with deeply nested where/orderBy/having criteria. Uses composite pattern to build tree from the payload. - * Auto-joins relations and converts payload from { books: { publisher: { name: '...' } } } to { 'publisher_alias.name': '...' } - * @internal - */ -export declare class CriteriaNode implements ICriteriaNode { - protected readonly metadata: MetadataStorage; - readonly entityName: EntityName; - readonly parent?: ICriteriaNode | undefined; - readonly key?: (EntityKey | RawQueryFragmentSymbol) | undefined; - readonly validate: boolean; - readonly strict: boolean; - payload: any; - prop?: EntityProperty; - index?: number; - constructor( - metadata: MetadataStorage, - entityName: EntityName, - parent?: ICriteriaNode | undefined, - key?: (EntityKey | RawQueryFragmentSymbol) | undefined, - validate?: boolean, - strict?: boolean, - ); - process(qb: IQueryBuilder, options?: ICriteriaNodeProcessOptions): any; - unwrap(): any; - shouldInline(payload: any): boolean; - willAutoJoin(qb: IQueryBuilder, alias?: string, options?: ICriteriaNodeProcessOptions): boolean; - shouldRename(payload: any): boolean; - renameFieldToPK(qb: IQueryBuilder, ownerAlias?: string): string; - getPath(opts?: { addIndex?: boolean; parentPath?: string }): string; - private isPivotJoin; - getPivotPath(path: string): string; - aliased(field: string, alias?: string): string; - isStrict(): boolean; -} diff --git a/node_modules/@mikro-orm/sql/query/CriteriaNode.js b/node_modules/@mikro-orm/sql/query/CriteriaNode.js deleted file mode 100644 index df68412..0000000 --- a/node_modules/@mikro-orm/sql/query/CriteriaNode.js +++ /dev/null @@ -1,150 +0,0 @@ -import { RawQueryFragment, ReferenceKind, Utils, inspect } from '@mikro-orm/core'; -/** - * Helper for working with deeply nested where/orderBy/having criteria. Uses composite pattern to build tree from the payload. - * Auto-joins relations and converts payload from { books: { publisher: { name: '...' } } } to { 'publisher_alias.name': '...' } - * @internal - */ -export class CriteriaNode { - metadata; - entityName; - parent; - key; - validate; - strict; - payload; - prop; - index; - constructor(metadata, entityName, parent, key, validate = true, strict = false) { - this.metadata = metadata; - this.entityName = entityName; - this.parent = parent; - this.key = key; - this.validate = validate; - this.strict = strict; - const meta = parent && metadata.find(parent.entityName); - if (meta && key && !RawQueryFragment.isKnownFragmentSymbol(key)) { - const pks = Utils.splitPrimaryKeys(key); - if (pks.length > 1) { - return; - } - for (const k of pks) { - this.prop = meta.props.find( - prop => - prop.name === k || (prop.fieldNames?.length === 1 && prop.fieldNames[0] === k && prop.persist !== false), - ); - const isProp = this.prop || meta.props.find(prop => (prop.fieldNames || []).includes(k)); - // do not validate if the key is prefixed or type casted (e.g. `k::text`) - if (validate && !isProp && !k.includes('.') && !k.includes('::') && !Utils.isOperator(k)) { - throw new Error(`Trying to query by not existing property ${Utils.className(entityName)}.${k}`); - } - } - } - } - process(qb, options) { - return this.payload; - } - unwrap() { - return this.payload; - } - shouldInline(payload) { - return false; - } - willAutoJoin(qb, alias, options) { - return false; - } - shouldRename(payload) { - const type = this.prop ? this.prop.kind : null; - const composite = this.prop?.joinColumns ? this.prop.joinColumns.length > 1 : false; - const rawField = RawQueryFragment.isKnownFragmentSymbol(this.key); - const scalar = - payload === null || - Utils.isPrimaryKey(payload) || - payload instanceof RegExp || - payload instanceof Date || - rawField; - const operator = - Utils.isPlainObject(payload) && Utils.getObjectQueryKeys(payload).every(k => Utils.isOperator(k, false)); - if (composite) { - return true; - } - switch (type) { - case ReferenceKind.MANY_TO_ONE: - return false; - case ReferenceKind.ONE_TO_ONE: - return !this.prop.owner; - case ReferenceKind.ONE_TO_MANY: - return scalar || operator; - case ReferenceKind.MANY_TO_MANY: - return scalar || operator; - default: - return false; - } - } - renameFieldToPK(qb, ownerAlias) { - const joinAlias = qb.getAliasForJoinPath(this.getPath(), { matchPopulateJoins: true }); - if ( - !joinAlias && - this.parent && - [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(this.prop.kind) && - this.prop.owner - ) { - const alias = qb.getAliasForJoinPath(this.parent.getPath()) ?? ownerAlias ?? qb.alias; - return Utils.getPrimaryKeyHash(this.prop.joinColumns.map(col => `${alias}.${col}`)); - } - const alias = joinAlias ?? ownerAlias ?? qb.alias; - if (this.prop.kind === ReferenceKind.MANY_TO_MANY) { - return Utils.getPrimaryKeyHash(this.prop.inverseJoinColumns.map(col => `${alias}.${col}`)); - } - return Utils.getPrimaryKeyHash(this.prop.referencedColumnNames.map(col => `${alias}.${col}`)); - } - getPath(opts) { - // use index on parent only if we are processing to-many relation - const addParentIndex = - this.prop && [ReferenceKind.ONE_TO_MANY, ReferenceKind.MANY_TO_MANY].includes(this.prop.kind); - const parentPath = - opts?.parentPath ?? this.parent?.getPath({ addIndex: addParentIndex }) ?? Utils.className(this.entityName); - const index = opts?.addIndex && this.index != null ? `[${this.index}]` : ''; - // ignore group operators to allow easier mapping (e.g. for orderBy) - const key = - this.key && !RawQueryFragment.isKnownFragmentSymbol(this.key) && !['$and', '$or', '$not'].includes(this.key) - ? '.' + this.key - : ''; - const ret = parentPath + index + key; - if (this.isPivotJoin()) { - // distinguish pivot table join from target entity join - return this.getPivotPath(ret); - } - return ret; - } - isPivotJoin() { - if (!this.key || !this.prop) { - return false; - } - const rawField = RawQueryFragment.isKnownFragmentSymbol(this.key); - const scalar = - this.payload === null || - Utils.isPrimaryKey(this.payload) || - this.payload instanceof RegExp || - this.payload instanceof Date || - rawField; - const operator = - Utils.isObject(this.payload) && Utils.getObjectQueryKeys(this.payload).every(k => Utils.isOperator(k, false)); - return this.prop.kind === ReferenceKind.MANY_TO_MANY && (scalar || operator); - } - getPivotPath(path) { - return `${path}[pivot]`; - } - aliased(field, alias) { - return alias ? `${alias}.${field}` : field; - } - isStrict() { - return this.strict; - } - /** @ignore */ - /* v8 ignore next */ - [Symbol.for('nodejs.util.inspect.custom')]() { - const o = {}; - ['entityName', 'key', 'index', 'payload'].filter(k => this[k] !== undefined).forEach(k => (o[k] = this[k])); - return `${this.constructor.name} ${inspect(o)}`; - } -} diff --git a/node_modules/@mikro-orm/sql/query/CriteriaNodeFactory.d.ts b/node_modules/@mikro-orm/sql/query/CriteriaNodeFactory.d.ts deleted file mode 100644 index 4f464be..0000000 --- a/node_modules/@mikro-orm/sql/query/CriteriaNodeFactory.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { - type Dictionary, - type EntityKey, - type EntityMetadata, - type EntityName, - type MetadataStorage, - type RawQueryFragmentSymbol, -} from '@mikro-orm/core'; -import type { ICriteriaNode } from '../typings.js'; -/** - * @internal - */ -export declare class CriteriaNodeFactory { - static createNode( - metadata: MetadataStorage, - entityName: EntityName, - payload: any, - parent?: ICriteriaNode, - key?: EntityKey | RawQueryFragmentSymbol, - validate?: boolean, - ): ICriteriaNode; - static createScalarNode( - metadata: MetadataStorage, - entityName: EntityName, - payload: any, - parent?: ICriteriaNode, - key?: EntityKey | RawQueryFragmentSymbol, - validate?: boolean, - ): ICriteriaNode; - static createArrayNode( - metadata: MetadataStorage, - entityName: EntityName, - payload: any[], - parent?: ICriteriaNode, - key?: EntityKey, - validate?: boolean, - ): ICriteriaNode; - static createObjectNode( - metadata: MetadataStorage, - entityName: EntityName, - payload: Dictionary, - parent?: ICriteriaNode, - key?: EntityKey, - validate?: boolean, - ): ICriteriaNode; - static createObjectItemNode( - metadata: MetadataStorage, - entityName: EntityName, - node: ICriteriaNode, - payload: Dictionary, - key: EntityKey | RawQueryFragmentSymbol, - meta?: EntityMetadata, - validate?: boolean, - ): ICriteriaNode; -} diff --git a/node_modules/@mikro-orm/sql/query/CriteriaNodeFactory.js b/node_modules/@mikro-orm/sql/query/CriteriaNodeFactory.js deleted file mode 100644 index e04925b..0000000 --- a/node_modules/@mikro-orm/sql/query/CriteriaNodeFactory.js +++ /dev/null @@ -1,111 +0,0 @@ -import { - GroupOperator, - isRaw, - JsonType, - RawQueryFragment, - ReferenceKind, - Utils, - ValidationError, -} from '@mikro-orm/core'; -import { ObjectCriteriaNode } from './ObjectCriteriaNode.js'; -import { ArrayCriteriaNode } from './ArrayCriteriaNode.js'; -import { ScalarCriteriaNode } from './ScalarCriteriaNode.js'; -import { EMBEDDABLE_ARRAY_OPS } from './enums.js'; -/** - * @internal - */ -export class CriteriaNodeFactory { - static createNode(metadata, entityName, payload, parent, key, validate = true) { - const rawField = RawQueryFragment.isKnownFragmentSymbol(key); - const scalar = - Utils.isPrimaryKey(payload) || isRaw(payload) || payload instanceof RegExp || payload instanceof Date || rawField; - if (Array.isArray(payload) && !scalar) { - return this.createArrayNode(metadata, entityName, payload, parent, key, validate); - } - if (Utils.isPlainObject(payload) && !scalar) { - return this.createObjectNode(metadata, entityName, payload, parent, key, validate); - } - return this.createScalarNode(metadata, entityName, payload, parent, key, validate); - } - static createScalarNode(metadata, entityName, payload, parent, key, validate = true) { - const node = new ScalarCriteriaNode(metadata, entityName, parent, key, validate); - node.payload = payload; - return node; - } - static createArrayNode(metadata, entityName, payload, parent, key, validate = true) { - const node = new ArrayCriteriaNode(metadata, entityName, parent, key, validate); - node.payload = payload.map((item, index) => { - const n = this.createNode(metadata, entityName, item, node, undefined, validate); - // we care about branching only for $and - if (key === '$and' && payload.length > 1) { - n.index = index; - } - return n; - }); - return node; - } - static createObjectNode(metadata, entityName, payload, parent, key, validate = true) { - const meta = metadata.find(entityName); - const node = new ObjectCriteriaNode(metadata, entityName, parent, key, validate, payload.__strict); - node.payload = {}; - for (const k of Utils.getObjectQueryKeys(payload)) { - node.payload[k] = this.createObjectItemNode(metadata, entityName, node, payload, k, meta, validate); - } - return node; - } - static createObjectItemNode(metadata, entityName, node, payload, key, meta, validate = true) { - const rawField = RawQueryFragment.isKnownFragmentSymbol(key); - const prop = rawField ? null : meta?.properties[key]; - const childEntity = prop && prop.kind !== ReferenceKind.SCALAR ? prop.targetMeta.class : entityName; - const isNotEmbedded = rawField || prop?.kind !== ReferenceKind.EMBEDDED; - const val = payload[key]; - if (isNotEmbedded && prop?.customType instanceof JsonType) { - return this.createScalarNode(metadata, childEntity, val, node, key, validate); - } - if (prop?.kind === ReferenceKind.SCALAR && val != null && Object.keys(val).some(f => f in GroupOperator)) { - throw ValidationError.cannotUseGroupOperatorsInsideScalars(entityName, prop.name, payload); - } - if (isNotEmbedded) { - return this.createNode(metadata, childEntity, val, node, key, validate); - } - if (val == null) { - const map = Object.keys(prop.embeddedProps).reduce((oo, k) => { - oo[prop.embeddedProps[k].name] = null; - return oo; - }, {}); - return this.createNode(metadata, entityName, map, node, key, validate); - } - // For array embeddeds stored as real columns, route property-level queries - // as scalar nodes so QueryBuilderHelper generates EXISTS subqueries with - // JSON array iteration. Keys containing `~` indicate the property lives - // inside a parent's object-mode JSON column (MetadataDiscovery uses `~` as - // the glue for object embeds), where JSON path access is used instead. - if (prop.array && !String(key).includes('~')) { - const keys = Object.keys(val); - const hasOnlyArrayOps = keys.every(k => EMBEDDABLE_ARRAY_OPS.includes(k)); - if (!hasOnlyArrayOps) { - return this.createScalarNode(metadata, entityName, val, node, key, validate); - } - } - // array operators can be used on embedded properties - const operator = Object.keys(val).some(f => Utils.isOperator(f) && !EMBEDDABLE_ARRAY_OPS.includes(f)); - if (operator) { - throw ValidationError.cannotUseOperatorsInsideEmbeddables(entityName, prop.name, payload); - } - const map = Object.keys(val).reduce((oo, k) => { - const embeddedProp = prop.embeddedProps[k] ?? Object.values(prop.embeddedProps).find(p => p.name === k); - if (!embeddedProp && !EMBEDDABLE_ARRAY_OPS.includes(k)) { - throw ValidationError.invalidEmbeddableQuery(entityName, k, prop.type); - } - if (embeddedProp) { - oo[embeddedProp.name] = val[k]; - } else if (typeof val[k] === 'object') { - oo[k] = JSON.stringify(val[k]); - } else { - oo[k] = val[k]; - } - return oo; - }, {}); - return this.createNode(metadata, entityName, map, node, key, validate); - } -} diff --git a/node_modules/@mikro-orm/sql/query/NativeQueryBuilder.d.ts b/node_modules/@mikro-orm/sql/query/NativeQueryBuilder.d.ts deleted file mode 100644 index 7c4ca74..0000000 --- a/node_modules/@mikro-orm/sql/query/NativeQueryBuilder.d.ts +++ /dev/null @@ -1,137 +0,0 @@ -import { type Dictionary, LockMode, type QueryFlag, RawQueryFragment, type Subquery } from '@mikro-orm/core'; -import { QueryType } from './enums.js'; -import type { AbstractSqlPlatform } from '../AbstractSqlPlatform.js'; -/** Options for Common Table Expression (CTE) definitions. */ -export interface CteOptions { - /** Column names for the CTE. */ - columns?: string[]; - /** PostgreSQL: MATERIALIZED / NOT MATERIALIZED */ - materialized?: boolean; -} -interface CteClause extends CteOptions { - name: string; - sql: string; - params: unknown[]; - recursive?: boolean; -} -interface Options { - tableName?: string | RawQueryFragment; - indexHint?: string; - select?: (string | RawQueryFragment)[]; - distinct?: boolean; - distinctOn?: string[]; - joins?: { - sql: string; - params: unknown[]; - }[]; - groupBy?: (string | RawQueryFragment)[]; - where?: { - sql: string; - params: unknown[]; - }; - having?: { - sql: string; - params: unknown[]; - }; - orderBy?: string; - limit?: number; - offset?: number; - data?: Dictionary; - onConflict?: OnConflictClause; - lockMode?: LockMode; - lockTables?: string[]; - returning?: (string | RawQueryFragment | [name: string, type: unknown])[]; - comment?: string[]; - hintComment?: string[]; - flags?: Set; - wrap?: [prefix: string, suffix: string]; - ctes?: CteClause[]; -} -/** Options for specifying the target table in FROM/INTO clauses. */ -export interface TableOptions { - schema?: string; - indexHint?: string; - alias?: string; -} -interface OnConflictClause { - fields: string[] | RawQueryFragment; - ignore?: boolean; - merge?: Dictionary | (string | RawQueryFragment)[]; - where?: { - sql: string; - params: unknown[]; - }; -} -/** @internal */ -export declare class NativeQueryBuilder implements Subquery { - protected readonly platform: AbstractSqlPlatform; - readonly __subquery: true; - protected type?: QueryType; - protected parts: string[]; - protected params: unknown[]; - protected options: Options; - constructor(platform: AbstractSqlPlatform); - select(fields: string | RawQueryFragment | (string | RawQueryFragment)[]): this; - count(fields?: string | RawQueryFragment | (string | RawQueryFragment)[], distinct?: boolean): this; - into(tableName: string | RawQueryFragment | NativeQueryBuilder, options?: TableOptions): this; - from(tableName: string | RawQueryFragment | NativeQueryBuilder, options?: TableOptions): this; - where(sql: string, params: unknown[]): this; - having(sql: string, params: unknown[]): this; - groupBy(groupBy: (string | RawQueryFragment)[]): this; - join(sql: string, params: unknown[]): this; - orderBy(orderBy: string): this; - /** - * The sub-query is compiled eagerly at call time — later mutations to the - * sub-query builder will not be reflected in this CTE. - */ - with(name: string, query: NativeQueryBuilder | RawQueryFragment, options?: CteOptions): this; - /** - * Adds a recursive CTE (`WITH RECURSIVE` on PostgreSQL/MySQL/SQLite, plain `WITH` on MSSQL). - * The sub-query is compiled eagerly — later mutations will not be reflected. - */ - withRecursive(name: string, query: NativeQueryBuilder | RawQueryFragment, options?: CteOptions): this; - private addCte; - toString(): string; - compile(): { - sql: string; - params: unknown[]; - }; - protected addLockClause(): void; - protected addOnConflictClause(): void; - protected combineParts(): { - sql: string; - params: unknown[]; - }; - limit(limit: number): this; - offset(offset: number): this; - insert(data: Dictionary): this; - update(data: Dictionary): this; - delete(): this; - truncate(): this; - distinct(): this; - distinctOn(fields: string[]): this; - onConflict(options: OnConflictClause): OnConflictClause; - returning(fields: (string | RawQueryFragment | [name: string, type: unknown])[]): this; - lockMode(lockMode: LockMode, lockTables?: string[]): this; - comment(comment: string | string[]): this; - hintComment(comment: string | string[]): this; - setFlags(flags: Set): this; - clear(clause: keyof Options): this; - wrap(prefix: string, suffix: string): this; - as(alias: string): this; - toRaw(): RawQueryFragment; - protected compileSelect(): void; - protected getFields(): string; - protected compileInsert(): void; - protected addOutputClause(type: 'inserted' | 'deleted'): void; - protected processInsertData(): string[]; - protected compileUpdate(): void; - protected compileDelete(): void; - protected compileTruncate(): void; - protected addHintComment(): void; - protected compileCtes(): void; - protected getCteKeyword(hasRecursive: boolean): string; - protected getTableName(): string; - protected quote(id: string | RawQueryFragment | NativeQueryBuilder): string; -} -export {}; diff --git a/node_modules/@mikro-orm/sql/query/NativeQueryBuilder.js b/node_modules/@mikro-orm/sql/query/NativeQueryBuilder.js deleted file mode 100644 index 9583c29..0000000 --- a/node_modules/@mikro-orm/sql/query/NativeQueryBuilder.js +++ /dev/null @@ -1,490 +0,0 @@ -import { LockMode, raw, RawQueryFragment, Utils } from '@mikro-orm/core'; -import { QueryType } from './enums.js'; -/** @internal */ -export class NativeQueryBuilder { - platform; - type; - parts = []; - params = []; - options = {}; - constructor(platform) { - this.platform = platform; - } - select(fields) { - this.type = QueryType.SELECT; - this.options.select ??= []; - this.options.select.push(...Utils.asArray(fields)); - return this; - } - count(fields = '*', distinct) { - this.type = QueryType.COUNT; - this.options.select = Utils.asArray(fields); - this.options.distinct = distinct; - return this; - } - into(tableName, options) { - return this.from(tableName, options); - } - from(tableName, options) { - if (tableName instanceof NativeQueryBuilder) { - tableName = tableName.toRaw(); - } - if (typeof tableName === 'string') { - const asKeyword = this.platform.usesAsKeyword() ? ' as ' : ' '; - const alias = options?.alias ? `${asKeyword}${this.platform.quoteIdentifier(options.alias)}` : ''; - const schema = - options?.schema && options.schema !== this.platform.getDefaultSchemaName() ? `${options.schema}.` : ''; - tableName = this.quote(schema + tableName) + alias; - } - this.options.tableName = tableName; - this.options.indexHint = options?.indexHint; - return this; - } - where(sql, params) { - this.options.where = { sql, params }; - return this; - } - having(sql, params) { - this.options.having = { sql, params }; - return this; - } - groupBy(groupBy) { - this.options.groupBy = groupBy; - return this; - } - join(sql, params) { - this.options.joins ??= []; - this.options.joins.push({ sql, params }); - return this; - } - orderBy(orderBy) { - this.options.orderBy = orderBy; - return this; - } - /** - * The sub-query is compiled eagerly at call time — later mutations to the - * sub-query builder will not be reflected in this CTE. - */ - with(name, query, options) { - return this.addCte(name, query, options); - } - /** - * Adds a recursive CTE (`WITH RECURSIVE` on PostgreSQL/MySQL/SQLite, plain `WITH` on MSSQL). - * The sub-query is compiled eagerly — later mutations will not be reflected. - */ - withRecursive(name, query, options) { - return this.addCte(name, query, options, true); - } - addCte(name, query, options, recursive) { - this.options.ctes ??= []; - if (this.options.ctes.some(cte => cte.name === name)) { - throw new Error(`CTE with name '${name}' already exists`); - } - const { sql, params } = - query instanceof NativeQueryBuilder ? query.compile() : { sql: query.sql, params: [...query.params] }; - this.options.ctes.push({ - name, - sql, - params, - recursive, - columns: options?.columns, - materialized: options?.materialized, - }); - return this; - } - toString() { - const { sql, params } = this.compile(); - return this.platform.formatQuery(sql, params); - } - compile() { - if (!this.type) { - throw new Error('No query type provided'); - } - this.parts.length = 0; - this.params.length = 0; - if (this.options.comment) { - this.parts.push(...this.options.comment.map(comment => `/* ${comment} */`)); - } - this.compileCtes(); - switch (this.type) { - case QueryType.SELECT: - case QueryType.COUNT: - this.compileSelect(); - break; - case QueryType.INSERT: - this.compileInsert(); - break; - case QueryType.UPDATE: - this.compileUpdate(); - break; - case QueryType.DELETE: - this.compileDelete(); - break; - case QueryType.TRUNCATE: - this.compileTruncate(); - break; - } - this.addOnConflictClause(); - if (this.options.returning && this.platform.usesReturningStatement()) { - const fields = this.options.returning.map(field => this.quote(field)); - this.parts.push(`returning ${fields.join(', ')}`); - } - this.addLockClause(); - return this.combineParts(); - } - addLockClause() { - if (!this.options.lockMode) { - return; - } - if ( - [LockMode.PESSIMISTIC_READ, LockMode.PESSIMISTIC_PARTIAL_READ, LockMode.PESSIMISTIC_READ_OR_FAIL].includes( - this.options.lockMode, - ) - ) { - this.parts.push('for share'); - } - if ( - [LockMode.PESSIMISTIC_WRITE, LockMode.PESSIMISTIC_PARTIAL_WRITE, LockMode.PESSIMISTIC_WRITE_OR_FAIL].includes( - this.options.lockMode, - ) - ) { - this.parts.push('for update'); - } - if (this.options.lockTables?.length) { - const fields = this.options.lockTables.map(field => this.quote(field)); - this.parts.push(`of ${fields.join(', ')}`); - } - if ([LockMode.PESSIMISTIC_PARTIAL_READ, LockMode.PESSIMISTIC_PARTIAL_WRITE].includes(this.options.lockMode)) { - this.parts.push('skip locked'); - } - if ([LockMode.PESSIMISTIC_READ_OR_FAIL, LockMode.PESSIMISTIC_WRITE_OR_FAIL].includes(this.options.lockMode)) { - this.parts.push('nowait'); - } - } - addOnConflictClause() { - const clause = this.options.onConflict; - if (!clause) { - return; - } - this.parts.push('on conflict'); - if (clause.fields instanceof RawQueryFragment) { - this.parts.push(clause.fields.sql); - this.params.push(...clause.fields.params); - } else if (clause.fields.length > 0) { - const fields = clause.fields.map(field => this.quote(field)); - this.parts.push(`(${fields.join(', ')})`); - } - if (clause.ignore) { - this.parts.push('do nothing'); - } - if (Utils.isObject(clause.merge)) { - this.parts.push('do update set'); - const fields = Object.keys(clause.merge).map(field => { - this.params.push(clause.merge[field]); - return `${this.quote(field)} = ?`; - }); - this.parts.push(fields.join(', ')); - } else if (clause.merge) { - this.parts.push('do update set'); - if (clause.merge.length) { - const fields = clause.merge.map(field => `${this.quote(field)} = excluded.${this.quote(field)}`); - this.parts.push(fields.join(', ')); - } else { - const dataAsArray = Utils.asArray(this.options.data); - const keys = Object.keys(dataAsArray[0]); - const fields = keys.map(field => `${this.quote(field)} = excluded.${this.quote(field)}`); - this.parts.push(fields.join(', ')); - } - } - if (clause.where) { - this.parts.push(`where ${clause.where.sql}`); - this.params.push(...clause.where.params); - } - } - combineParts() { - let sql = this.parts.join(' '); - if (this.options.wrap) { - const [a, b] = this.options.wrap; - sql = `${a}${sql}${b}`; - } - return { sql, params: this.params }; - } - limit(limit) { - this.options.limit = limit; - return this; - } - offset(offset) { - this.options.offset = offset; - return this; - } - insert(data) { - this.type = QueryType.INSERT; - this.options.data = data; - return this; - } - update(data) { - this.type = QueryType.UPDATE; - this.options.data ??= {}; - Object.assign(this.options.data, data); - return this; - } - delete() { - this.type = QueryType.DELETE; - return this; - } - truncate() { - this.type = QueryType.TRUNCATE; - return this; - } - distinct() { - this.options.distinct = true; - return this; - } - distinctOn(fields) { - this.options.distinctOn = fields; - return this; - } - onConflict(options) { - this.options.onConflict = options; - return options; - } - returning(fields) { - this.options.returning = fields; - return this; - } - lockMode(lockMode, lockTables) { - this.options.lockMode = lockMode; - this.options.lockTables = lockTables; - return this; - } - comment(comment) { - this.options.comment ??= []; - this.options.comment.push(...Utils.asArray(comment)); - return this; - } - hintComment(comment) { - this.options.hintComment ??= []; - this.options.hintComment.push(...Utils.asArray(comment)); - return this; - } - setFlags(flags) { - this.options.flags = flags; - return this; - } - clear(clause) { - delete this.options[clause]; - return this; - } - wrap(prefix, suffix) { - this.options.wrap = [prefix, suffix]; - return this; - } - as(alias) { - this.wrap('(', `) as ${this.platform.quoteIdentifier(alias)}`); - return this; - } - toRaw() { - const { sql, params } = this.compile(); - return raw(sql, params); - } - compileSelect() { - this.parts.push('select'); - this.addHintComment(); - this.parts.push(`${this.getFields()} from ${this.getTableName()}`); - if (this.options.joins) { - for (const join of this.options.joins) { - this.parts.push(join.sql); - this.params.push(...join.params); - } - } - if (this.options.where?.sql.trim()) { - this.parts.push(`where ${this.options.where.sql}`); - this.options.where.params.forEach(p => this.params.push(p)); - } - if (this.options.groupBy) { - const fields = this.options.groupBy.map(field => this.quote(field)); - this.parts.push(`group by ${fields.join(', ')}`); - } - if (this.options.having) { - this.parts.push(`having ${this.options.having.sql}`); - this.params.push(...this.options.having.params); - } - if (this.options.orderBy) { - this.parts.push(`order by ${this.options.orderBy}`); - } - if (this.options.limit != null) { - this.parts.push(`limit ?`); - this.params.push(this.options.limit); - } - if (this.options.offset != null) { - this.parts.push(`offset ?`); - this.params.push(this.options.offset); - } - } - getFields() { - if (!this.options.select || this.options.select.length === 0) { - throw new Error('No fields selected'); - } - let fields = this.options.select.map(field => this.quote(field)).join(', '); - if (this.options.distinct) { - fields = `distinct ${fields}`; - } else if (this.options.distinctOn) { - fields = `distinct on (${this.options.distinctOn.map(field => this.quote(field)).join(', ')}) ${fields}`; - } - if (this.type === QueryType.COUNT) { - fields = `count(${fields}) as ${this.quote('count')}`; - } - return fields; - } - compileInsert() { - if (!this.options.data) { - throw new Error('No data provided'); - } - this.parts.push('insert'); - this.addHintComment(); - this.parts.push(`into ${this.getTableName()}`); - if (Object.keys(this.options.data).length === 0) { - this.addOutputClause('inserted'); - this.parts.push('default values'); - return; - } - const parts = this.processInsertData(); - this.parts.push(parts.join(', ')); - } - addOutputClause(type) { - if (this.options.returning && this.platform.usesOutputStatement()) { - const fields = this.options.returning.map(field => `${type}.${this.quote(field)}`); - this.parts.push(`output ${fields.join(', ')}`); - } - } - processInsertData() { - const dataAsArray = Utils.asArray(this.options.data); - const keys = Object.keys(dataAsArray[0]); - const values = keys.map(() => '?'); - const parts = []; - this.parts.push(`(${keys.map(key => this.quote(key)).join(', ')})`); - this.addOutputClause('inserted'); - this.parts.push('values'); - for (const data of dataAsArray) { - for (const key of keys) { - if (typeof data[key] === 'undefined') { - this.params.push(this.platform.usesDefaultKeyword() ? raw('default') : null); - } else { - this.params.push(data[key]); - } - } - parts.push(`(${values.join(', ')})`); - } - return parts; - } - compileUpdate() { - if (!this.options.data || Object.keys(this.options.data).length === 0) { - throw new Error('No data provided'); - } - this.parts.push('update'); - this.addHintComment(); - this.parts.push(this.getTableName()); - if (this.options.joins) { - for (const join of this.options.joins) { - this.parts.push(join.sql); - this.params.push(...join.params); - } - } - this.parts.push('set'); - if (this.options.data) { - const parts = []; - for (const key of Object.keys(this.options.data)) { - parts.push(`${this.quote(key)} = ?`); - this.params.push(this.options.data[key]); - } - this.parts.push(parts.join(', ')); - } - this.addOutputClause('inserted'); - if (this.options.where?.sql.trim()) { - this.parts.push(`where ${this.options.where.sql}`); - this.params.push(...this.options.where.params); - } - } - compileDelete() { - this.parts.push('delete'); - this.addHintComment(); - this.parts.push(`from ${this.getTableName()}`); - this.addOutputClause('deleted'); - if (this.options.where?.sql.trim()) { - this.parts.push(`where ${this.options.where.sql}`); - this.params.push(...this.options.where.params); - } - } - compileTruncate() { - const sql = `truncate table ${this.getTableName()}`; - this.parts.push(sql); - } - addHintComment() { - if (this.options.hintComment) { - this.parts.push(`/*+ ${this.options.hintComment.join(' ')} */`); - } - } - compileCtes() { - const ctes = this.options.ctes; - if (!ctes || ctes.length === 0) { - return; - } - const hasRecursive = ctes.some(cte => cte.recursive); - const keyword = this.getCteKeyword(hasRecursive); - const cteParts = []; - for (const cte of ctes) { - let part = this.quote(cte.name); - if (cte.columns?.length) { - part += ` (${cte.columns.map(c => this.quote(c)).join(', ')})`; - } - part += ' as'; - if (cte.materialized === true) { - part += ' materialized'; - } else if (cte.materialized === false) { - part += ' not materialized'; - } - part += ` (${cte.sql})`; - this.params.push(...cte.params); - cteParts.push(part); - } - this.parts.push(`${keyword} ${cteParts.join(', ')}`); - } - getCteKeyword(hasRecursive) { - return hasRecursive ? 'with recursive' : 'with'; - } - getTableName() { - if (!this.options.tableName) { - throw new Error('No table name provided'); - } - const indexHint = this.options.indexHint ? ' ' + this.options.indexHint : ''; - if (this.options.tableName instanceof RawQueryFragment) { - this.params.push(...this.options.tableName.params); - return this.options.tableName.sql + indexHint; - } - return this.options.tableName + indexHint; - } - quote(id) { - if (id instanceof RawQueryFragment) { - return this.platform.formatQuery(id.sql, id.params); - } - if (id instanceof NativeQueryBuilder) { - const { sql, params } = id.compile(); - return this.platform.formatQuery(sql, params); - } - if (id.endsWith('.*')) { - const schema = this.platform.quoteIdentifier(id.substring(0, id.indexOf('.'))); - return schema + '.*'; - } - if (id.toLowerCase().includes(' as ')) { - const parts = id.split(/ as /i); - const a = this.platform.quoteIdentifier(parts[0]); - const b = this.platform.quoteIdentifier(parts[1]); - const asKeyword = this.platform.usesAsKeyword() ? ' as ' : ' '; - return `${a}${asKeyword}${b}`; - } - if (id === '*') { - return id; - } - return this.platform.quoteIdentifier(id); - } -} diff --git a/node_modules/@mikro-orm/sql/query/ObjectCriteriaNode.d.ts b/node_modules/@mikro-orm/sql/query/ObjectCriteriaNode.d.ts deleted file mode 100644 index 2ec2a31..0000000 --- a/node_modules/@mikro-orm/sql/query/ObjectCriteriaNode.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { CriteriaNode } from './CriteriaNode.js'; -import type { ICriteriaNodeProcessOptions, IQueryBuilder } from '../typings.js'; -/** - * @internal - */ -export declare class ObjectCriteriaNode extends CriteriaNode { - process(qb: IQueryBuilder, options?: ICriteriaNodeProcessOptions): any; - isStrict(): boolean; - unwrap(): any; - willAutoJoin(qb: IQueryBuilder, alias?: string, options?: ICriteriaNodeProcessOptions): boolean; - shouldInline(payload: any): boolean; - private getChildKey; - private inlineArrayChildPayload; - private inlineChildPayload; - private inlineCondition; - private shouldAutoJoin; - private autoJoin; - private isPrefixed; -} diff --git a/node_modules/@mikro-orm/sql/query/ObjectCriteriaNode.js b/node_modules/@mikro-orm/sql/query/ObjectCriteriaNode.js deleted file mode 100644 index 44fbdf4..0000000 --- a/node_modules/@mikro-orm/sql/query/ObjectCriteriaNode.js +++ /dev/null @@ -1,324 +0,0 @@ -import { - ALIAS_REPLACEMENT, - GroupOperator, - QueryFlag, - raw, - RawQueryFragment, - ReferenceKind, - Utils, -} from '@mikro-orm/core'; -import { CriteriaNode } from './CriteriaNode.js'; -import { JoinType, QueryType } from './enums.js'; -const COLLECTION_OPERATORS = ['$some', '$none', '$every', '$size']; -/** - * @internal - */ -export class ObjectCriteriaNode extends CriteriaNode { - process(qb, options) { - const matchPopulateJoins = - options?.matchPopulateJoins || - (this.prop && [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(this.prop.kind)); - const nestedAlias = qb.getAliasForJoinPath(this.getPath(options), { ...options, matchPopulateJoins }); - const ownerAlias = options?.alias || qb.alias; - const keys = Utils.getObjectQueryKeys(this.payload); - let alias = options?.alias; - if (nestedAlias) { - alias = nestedAlias; - } - if (this.shouldAutoJoin(qb, nestedAlias)) { - if (keys.some(k => COLLECTION_OPERATORS.includes(k))) { - if (![ReferenceKind.MANY_TO_MANY, ReferenceKind.ONE_TO_MANY].includes(this.prop.kind)) { - // ignore collection operators when used on a non-relational property - this can happen when they get into - // populateWhere via `infer` on m:n properties with select-in strategy - if (this.parent?.parent) { - // we validate only usage on top level - return {}; - } - throw new Error( - `Collection operators can be used only inside a collection property context, but it was used for ${this.getPath()}.`, - ); - } - const $and = []; - const knownKey = - [ReferenceKind.SCALAR, ReferenceKind.MANY_TO_ONE, ReferenceKind.EMBEDDED].includes(this.prop.kind) || - (this.prop.kind === ReferenceKind.ONE_TO_ONE && this.prop.owner); - const parentMeta = this.metadata.find(this.parent.entityName); - const primaryKeys = parentMeta.primaryKeys.map(pk => { - return [QueryType.SELECT, QueryType.COUNT].includes(qb.type) ? `${knownKey ? alias : ownerAlias}.${pk}` : pk; - }); - for (const key of keys) { - if (typeof key !== 'string' || !COLLECTION_OPERATORS.includes(key)) { - throw new Error('Mixing collection operators with other filters is not allowed.'); - } - const payload = this.payload[key].unwrap(); - const qb2 = qb.clone(true, ['schema']); - const joinAlias = qb2.getNextAlias(this.prop.targetMeta.class); - const sub = qb2 - .from(parentMeta.class) - // eslint-disable-next-line no-unexpected-multiline - [key === '$size' ? 'leftJoin' : 'innerJoin'](this.key, joinAlias) - .select(parentMeta.primaryKeys); - if (key === '$size') { - const sizeCondition = typeof payload === 'number' ? { $eq: payload } : payload; - const pks = this.prop.referencedColumnNames; - const countExpr = raw( - `count(${pks.map(() => '??').join(', ')})`, - pks.map(pk => `${joinAlias}.${pk}`), - ); - sub.groupBy(parentMeta.primaryKeys); - sub.having({ - $and: Object.keys(sizeCondition).map(op => ({ [countExpr]: { [op]: sizeCondition[op] } })), - }); - } else if (key === '$every') { - sub.where({ $not: { [this.key]: payload } }); - } else { - sub.where({ [this.key]: payload }); - } - const op = ['$size', '$some'].includes(key) ? '$in' : '$nin'; - $and.push({ - [Utils.getPrimaryKeyHash(primaryKeys)]: { [op]: sub.getNativeQuery().toRaw() }, - }); - } - if ($and.length === 1) { - return $and[0]; - } - return { $and }; - } - alias = this.autoJoin(qb, ownerAlias, options); - } - if (this.prop && nestedAlias) { - const toOneProperty = [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(this.prop.kind); - // if the property is nullable and the filter is strict, we need to use left join, so we mimic the inner join behaviour - // with an exclusive condition on the join columns: - // - if the owning column is null, the row is missing, we don't apply the filter - // - if the target column is not null, the row is matched, we apply the filter - if (toOneProperty && this.prop.nullable && this.isStrict()) { - const key = this.prop.owner ? this.prop.name : this.prop.referencedPKs; - qb.andWhere({ - $or: [ - { [ownerAlias + '.' + key]: null }, - { [nestedAlias + '.' + Utils.getPrimaryKeyHash(this.prop.referencedPKs)]: { $ne: null } }, - ], - }); - } - } - return keys.reduce((o, field) => { - const childNode = this.payload[field]; - const payload = childNode.process(qb, { ...options, alias: this.prop ? alias : ownerAlias }); - const operator = Utils.isOperator(field); - const isRawField = RawQueryFragment.isKnownFragmentSymbol(field); - // we need to keep the prefixing for formulas otherwise we would lose aliasing context when nesting inside group operators - const virtual = childNode.prop?.persist === false && !childNode.prop?.formula && !!options?.type; - // if key is missing, we are inside group operator and we need to prefix with alias - const primaryKey = this.key && this.metadata.find(this.entityName)?.primaryKeys.includes(field); - const isToOne = - childNode.prop && [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(childNode.prop.kind); - if (childNode.shouldInline(payload)) { - const childAlias = qb.getAliasForJoinPath(childNode.getPath(), { preferNoBranch: isToOne, ...options }); - const a = qb.helper.isTableNameAliasRequired(qb.type) ? alias : undefined; - this.inlineChildPayload(o, payload, field, a, childAlias); - } else if (childNode.shouldRename(payload)) { - this.inlineCondition(childNode.renameFieldToPK(qb, alias), o, payload); - } else if (isRawField) { - const rawField = RawQueryFragment.getKnownFragment(field); - o[raw(rawField.sql.replaceAll(ALIAS_REPLACEMENT, alias), rawField.params)] = payload; - } else if (!childNode.validate && !childNode.prop && !field.includes('.') && !operator) { - // wrap unknown fields in raw() to prevent alias prefixing (e.g. raw SQL aliases in HAVING) - // use '??' placeholder to properly quote the identifier - o[raw('??', [field])] = payload; - } else if ( - primaryKey || - virtual || - operator || - field.includes('.') || - ![QueryType.SELECT, QueryType.COUNT].includes(qb.type) - ) { - this.inlineCondition(field.replaceAll(ALIAS_REPLACEMENT, alias), o, payload); - } else { - this.inlineCondition(`${alias ?? qb.alias}.${field}`, o, payload); - } - return o; - }, {}); - } - isStrict() { - return ( - this.strict || - Utils.getObjectQueryKeys(this.payload).some(key => { - return this.payload[key].isStrict(); - }) - ); - } - unwrap() { - return Utils.getObjectQueryKeys(this.payload).reduce((o, field) => { - o[field] = this.payload[field].unwrap(); - return o; - }, {}); - } - willAutoJoin(qb, alias, options) { - const nestedAlias = qb.getAliasForJoinPath(this.getPath(options), options); - const ownerAlias = alias || qb.alias; - const keys = Utils.getObjectQueryKeys(this.payload); - if (nestedAlias) { - alias = nestedAlias; - } - if (this.shouldAutoJoin(qb, nestedAlias)) { - return !keys.some(k => COLLECTION_OPERATORS.includes(k)); - } - return keys.some(field => { - const childNode = this.payload[field]; - return childNode.willAutoJoin(qb, this.prop ? alias : ownerAlias, options); - }); - } - shouldInline(payload) { - const rawField = RawQueryFragment.isKnownFragmentSymbol(this.key); - const scalar = Utils.isPrimaryKey(payload) || payload instanceof RegExp || payload instanceof Date || rawField; - const operator = - Utils.isObject(payload) && - Utils.getObjectQueryKeys(payload).every(k => { - if (k === '$not' && Utils.isPlainObject(payload[k])) { - // $not wrapping non-operator conditions (entity props) should be inlined - return Utils.getObjectQueryKeys(payload[k]).every(ik => Utils.isOperator(ik, false)); - } - return Utils.isOperator(k, false); - }); - return !!this.prop && this.prop.kind !== ReferenceKind.SCALAR && !scalar && !operator; - } - getChildKey(k, prop, childAlias, alias) { - const idx = prop.referencedPKs.indexOf(k); - return idx !== -1 && !childAlias && ![ReferenceKind.ONE_TO_MANY, ReferenceKind.MANY_TO_MANY].includes(prop.kind) - ? this.aliased(prop.joinColumns[idx], alias) - : k; - } - inlineArrayChildPayload(obj, payload, k, prop, childAlias, alias) { - const key = this.getChildKey(k, prop, childAlias); - const value = payload.map(child => - Utils.getObjectQueryKeys(child).reduce((inner, childKey) => { - const key = - RawQueryFragment.isKnownFragmentSymbol(childKey) || this.isPrefixed(childKey) || Utils.isOperator(childKey) - ? childKey - : this.aliased(childKey, childAlias); - inner[key] = child[childKey]; - return inner; - }, {}), - ); - this.inlineCondition(key, obj, value); - } - inlineChildPayload(o, payload, field, alias, childAlias) { - const prop = this.metadata.find(this.entityName).properties[field]; - for (const k of Utils.getObjectQueryKeys(payload)) { - if (RawQueryFragment.isKnownFragmentSymbol(k)) { - o[k] = payload[k]; - } else if ( - k === '$not' && - Utils.isPlainObject(payload[k]) && - Utils.getObjectQueryKeys(payload[k]).some(ik => !Utils.isOperator(ik, false)) - ) { - // $not wraps entity conditions (from auto-join), inline at current level - this.inlineCondition(k, o, payload[k]); - } else if (Utils.isOperator(k, false)) { - const tmp = payload[k]; - delete payload[k]; - o[this.aliased(field, alias)] = { [k]: tmp, ...o[this.aliased(field, alias)] }; - } else if (k in GroupOperator && Array.isArray(payload[k])) { - this.inlineArrayChildPayload(o, payload[k], k, prop, childAlias, alias); - } else if (this.isPrefixed(k) || Utils.isOperator(k) || !childAlias) { - const key = this.getChildKey(k, prop, childAlias, alias); - this.inlineCondition(key, o, payload[k]); - } else { - o[this.aliased(k, childAlias)] = payload[k]; - } - } - } - inlineCondition(key, o, value) { - if (!(key in o)) { - o[key] = value; - return; - } - /* v8 ignore next */ - if (key === '$and') { - o.$and.push({ [key]: value }); - return; - } - const $and = o.$and ?? []; - $and.push({ [key]: o[key] }, { [key]: value }); - delete o[key]; - o.$and = $and; - } - shouldAutoJoin(qb, nestedAlias) { - if (!this.prop || !this.parent) { - return false; - } - const keys = Utils.getObjectQueryKeys(this.payload); - if (keys.every(k => typeof k === 'string' && k.includes('.') && k.startsWith(`${qb.alias}.`))) { - return false; - } - if (keys.some(k => COLLECTION_OPERATORS.includes(k))) { - return true; - } - const meta = this.metadata.find(this.entityName); - const embeddable = this.prop.kind === ReferenceKind.EMBEDDED; - const knownKey = - [ReferenceKind.SCALAR, ReferenceKind.MANY_TO_ONE, ReferenceKind.EMBEDDED].includes(this.prop.kind) || - (this.prop.kind === ReferenceKind.ONE_TO_ONE && this.prop.owner); - const operatorKeys = - knownKey && - keys.every(key => { - if (key === '$not') { - // $not wraps conditions like $and/$or, check if it wraps entity property conditions (needs auto-join) - // vs simple operator conditions on the FK (doesn't need auto-join) - const childPayload = this.payload[key].payload; - if (Utils.isPlainObject(childPayload)) { - return Utils.getObjectQueryKeys(childPayload).every(k => Utils.isOperator(k, false)); - } - } - return Utils.isOperator(key, false); - }); - const primaryKeys = - knownKey && - keys.every(key => { - if (typeof key !== 'string' || !meta.primaryKeys.includes(key)) { - return false; - } - if ( - !Utils.isPlainObject(this.payload[key].payload) || - ![ReferenceKind.ONE_TO_ONE, ReferenceKind.MANY_TO_ONE].includes(meta.properties[key].kind) - ) { - return true; - } - return Utils.getObjectQueryKeys(this.payload[key].payload).every( - k => typeof k === 'string' && meta.properties[key].targetMeta.primaryKeys.includes(k), - ); - }); - return !primaryKeys && !nestedAlias && !operatorKeys && !embeddable; - } - autoJoin(qb, alias, options) { - const nestedAlias = qb.getNextAlias(this.prop?.pivotEntity ?? this.entityName); - const rawField = RawQueryFragment.isKnownFragmentSymbol(this.key); - const scalar = - Utils.isPrimaryKey(this.payload) || this.payload instanceof RegExp || this.payload instanceof Date || rawField; - const operator = - Utils.isPlainObject(this.payload) && - Utils.getObjectQueryKeys(this.payload).every(k => Utils.isOperator(k, false)); - const field = `${alias}.${this.prop.name}`; - const method = qb.hasFlag(QueryFlag.INFER_POPULATE) ? 'joinAndSelect' : 'join'; - const path = this.getPath(); - if (this.prop.kind === ReferenceKind.MANY_TO_MANY && (scalar || operator)) { - qb.join(field, nestedAlias, undefined, JoinType.pivotJoin, path); - } else { - const prev = qb.state.fields?.slice(); - const toOneProperty = [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(this.prop.kind); - const joinType = toOneProperty && !this.prop.nullable ? JoinType.innerJoin : JoinType.leftJoin; - qb[method](field, nestedAlias, undefined, joinType, path); - if (!qb.hasFlag(QueryFlag.INFER_POPULATE)) { - qb.state.fields = prev; - } - } - if (options?.type !== 'orderBy') { - qb.scheduleFilterCheck(path); - } - return nestedAlias; - } - isPrefixed(field) { - return !!/\w+\./.exec(field); - } -} diff --git a/node_modules/@mikro-orm/sql/query/QueryBuilder.d.ts b/node_modules/@mikro-orm/sql/query/QueryBuilder.d.ts deleted file mode 100644 index 941fe8f..0000000 --- a/node_modules/@mikro-orm/sql/query/QueryBuilder.d.ts +++ /dev/null @@ -1,1646 +0,0 @@ -import { - type AnyEntity, - type AutoPath, - type Collection, - type ConnectionType, - type Dictionary, - type EntityData, - type EntityDTOFlat, - type EntityDTOProp, - type EntityKey, - type EntityManager, - EntityMetadata, - type EntityName, - type EntityProperty, - type ExpandProperty, - type FilterObject, - type FilterOptions, - type FilterValue, - type FlushMode, - type GroupOperator, - type Loaded, - LockMode, - type LoggingOptions, - type MetadataStorage, - type PrimaryProperty, - type ObjectQuery, - PopulateHint, - type PopulateOptions, - type PopulatePath, - QueryFlag, - type QueryOrderKeysFlat, - type QueryOrderMap, - type QueryResult, - RawQueryFragment, - type Raw, - type RequiredEntityData, - type Scalar, - type SerializeDTO, - type Subquery, - type Transaction, -} from '@mikro-orm/core'; -import { JoinType, QueryType } from './enums.js'; -import type { AbstractSqlDriver } from '../AbstractSqlDriver.js'; -import { type Alias, type OnConflictClause, QueryBuilderHelper } from './QueryBuilderHelper.js'; -import type { SqlEntityManager } from '../SqlEntityManager.js'; -import type { ICriteriaNodeProcessOptions, InternalField, JoinOptions } from '../typings.js'; -import type { AbstractSqlPlatform } from '../AbstractSqlPlatform.js'; -import { type CteOptions, NativeQueryBuilder } from './NativeQueryBuilder.js'; -export interface ExecuteOptions { - mapResults?: boolean; - mergeResults?: boolean; -} -export interface QBStreamOptions { - /** - * Results are mapped to entities, if you set `mapResults: false` you will get POJOs instead. - * - * @default true - */ - mapResults?: boolean; - /** - * When populating to-many relations, the ORM streams fully merged entities instead of yielding every row. - * You can opt out of this behavior by specifying `mergeResults: false`. This will yield every row from - * the SQL result, but still mapped to entities, meaning that to-many collections will contain at most - * one item, and you will get duplicate root entities when they have multiple items in the populated - * collection. - * - * @default true - */ - mergeResults?: boolean; - /** - * When enabled, the driver will return the raw database results without renaming the fields to match the entity property names. - * - * @default false - */ - rawResults?: boolean; -} -type IsNever = [T] extends [never] ? True : False; -type GetAlias = T extends `${infer A}.${string}` ? A : never; -type GetPropName = T extends `${string}.${infer P}` ? P : T; -type AppendToHint = `${Parent}.${Child}`; -/** - * Context tuple format: [Path, Alias, Type, Select] - * - Path: The relation path from root entity (e.g., 'books', 'books.author') - * - Alias: The SQL alias used in the query (e.g., 'b', 'a1') - * - Type: The entity type of the joined relation - * - Select: Whether this join was created via joinAndSelect (affects Fields tracking) - * - * Example: After `qb.leftJoin('a.books', 'b')`, Context becomes: - * { b: ['books', 'b', Book, false] } - */ -type AddToContext = { - [K in Alias]: [GetPath, K, ExpandProperty & keyof Type]>, Select]; -}; -type GetPath = - GetAlias extends infer Alias - ? IsNever extends true - ? GetPropName - : Alias extends keyof Context - ? Context[Alias] extends [infer Path, ...any[]] - ? AppendToHint> - : GetPropName - : GetPropName - : GetPropName; -type GetType = - GetAlias extends infer Alias - ? IsNever extends true - ? Type - : [Context] extends [never] - ? Type - : Alias extends keyof Context - ? Context[Alias] extends [string, string, infer PropType, any] - ? PropType & object - : Type - : Type - : Type; -type AddToHint = Select extends true - ? GetAlias extends infer Alias - ? IsNever extends true - ? GetPropName - : Alias extends RootAlias - ? GetPropName - : Alias extends keyof Context - ? Context[Alias] extends [infer Path, ...any[]] - ? AppendToHint> - : GetPropName - : GetPropName - : GetPropName - : never; -export type ModifyHint = - | Hint - | AddToHint; -export type ModifyContext< - Entity extends object, - Context, - Field extends string, - Alias extends string, - Select extends boolean = false, -> = - IsNever extends true - ? AddToContext, object, Field, Alias, Select> - : Context & AddToContext, Context, Field, Alias, Select>; -type StripRootAlias< - F extends string, - RootAlias extends string, - Context = never, -> = F extends `${RootAlias}.${infer Field}` - ? Field - : F extends `${infer Alias}.${string}` - ? Alias extends AliasNames - ? never - : F - : F; -type StripFieldAlias = F extends `${infer Path} as ${string}` ? Path : F; -type ExtractRootFields = [Fields] extends ['*'] - ? '*' - : Fields extends `${RootAlias}.*` - ? '*' - : Fields extends string - ? StripRootAlias, RootAlias, Context> - : never; -type PrefixWithPath = `${Path}.${Field}`; -type StripJoinAlias = F extends `${Alias}.${infer Field}` ? Field : F; -export type JoinSelectField = - | (keyof JoinedEntity & string) - | `${Alias}.${keyof JoinedEntity & string}`; -type AddJoinFields< - RootAlias, - Context, - Field extends string, - Alias extends string, - JoinFields extends readonly string[], -> = JoinFields extends readonly (infer F)[] - ? F extends string - ? PrefixWithPath & string, StripJoinAlias> - : never - : never; -export type ModifyFields< - CurrentFields extends string, - RootAlias, - Context, - Field extends string, - Alias extends string, - JoinFields extends readonly string[] | undefined, -> = JoinFields extends readonly string[] - ? CurrentFields | AddJoinFields - : CurrentFields; -type EntityRelations = EntityKey; -type JoinedEntityType = ExpandProperty< - GetType[GetPropName & keyof GetType] ->; -type AliasNames = Context[keyof Context] extends infer Join - ? Join extends any - ? Join extends [string, infer Alias, any, any] - ? Alias & string - : never - : never - : never; -type ContextRelationKeys = Context[keyof Context] extends infer Join - ? Join extends any - ? Join extends [string, infer Alias, infer Type, any] - ? `${Alias & string}.${EntityRelations}` - : never - : never - : never; -export type QBField = - | EntityRelations - | `${RootAlias}.${EntityRelations}` - | ([Context] extends [never] ? never : ContextRelationKeys); -type ContextFieldKeys = Context[keyof Context] extends infer Join - ? Join extends any - ? Join extends [string, infer Alias, infer Type, any] - ? `${Alias & string}.${keyof Type & string}` - : never - : never - : never; -type WithAlias = T | `${T} as ${string}`; -export type Field = - | WithAlias> - | (IsNever extends true ? never : WithAlias<`${RootAlias}.${EntityKey}`> | `${RootAlias}.*`) - | ([Context] extends [never] ? never : WithAlias> | `${AliasNames}.*`) - | '*' - | QueryBuilder - | NativeQueryBuilder - | RawQueryFragment - | (RawQueryFragment & symbol); -type RootAliasOrderKeys = { - [K in `${RootAlias}.${EntityKey}`]?: QueryOrderKeysFlat; -}; -type ContextOrderKeys = { - [K in ContextFieldKeys]?: QueryOrderKeysFlat; -}; -type RawOrderKeys = { - [K in RawAliases]?: QueryOrderKeysFlat; -}; -export type ContextOrderByMap< - Entity, - RootAlias extends string = never, - Context = never, - RawAliases extends string = never, -> = - | QueryOrderMap - | ((IsNever extends true ? {} : RootAliasOrderKeys) & - ([Context] extends [never] ? {} : ContextOrderKeys) & - (IsNever extends true ? {} : string extends RawAliases ? {} : RawOrderKeys)); -type AliasedPath = P extends `${Alias}.*` - ? P - : P extends `${Alias}.${infer Rest}` - ? `${Alias}.${AutoPath}` - : never; -type ContextAliasedPath = Context[keyof Context] extends infer Join - ? Join extends any - ? Join extends [string, infer Alias, infer Type, any] - ? AliasedPath - : never - : never - : never; -type NestedAutoPath = P extends `${string}:ref` - ? never - : P extends `${infer Path} as ${string}` - ? - | AliasedPath - | ContextAliasedPath - | AutoPath extends never - ? never - : P - : AliasedPath | ContextAliasedPath | AutoPath; -type AliasedObjectQuery = { - [K in EntityKey as `${Alias}.${K}`]?: ObjectQuery[K]; -}; -type JoinCondition = ( - | ObjectQuery - | AliasedObjectQuery -) & { - $not?: JoinCondition; - $or?: JoinCondition[]; - $and?: JoinCondition[]; -}; -type RawJoinCondition = { - [key: string]: FilterValue | RawQueryFragment; -}; -type ExtractRawAliasFromField = - F extends RawQueryFragment - ? A extends string - ? A - : never - : F extends `${string} as ${infer A}` - ? A - : never; -type ExtractRawAliasesFromTuple = T extends readonly [infer Head, ...infer Tail] - ? ExtractRawAliasFromField | ExtractRawAliasesFromTuple - : never; -type ExtractRawAliases = Fields extends readonly unknown[] - ? ExtractRawAliasesFromTuple - : ExtractRawAliasFromField; -type FlatOperatorMap = { - $eq?: Scalar | readonly Scalar[] | Subquery | null; - $ne?: Scalar | readonly Scalar[] | Subquery | null; - $in?: readonly Scalar[] | Raw | Subquery; - $nin?: readonly Scalar[] | Raw | Subquery; - $gt?: Scalar | Subquery; - $gte?: Scalar | Subquery; - $lt?: Scalar | Subquery; - $lte?: Scalar | Subquery; - $like?: string; - $re?: string; - $ilike?: string; - $fulltext?: string; - $overlap?: readonly string[] | string | object; - $contains?: readonly string[] | string | object; - $contained?: readonly string[] | string | object; - $exists?: boolean; - $hasKey?: string; - $hasKeys?: readonly string[]; - $hasSomeKeys?: readonly string[]; -}; -type AliasedFilterValue = Scalar | FlatOperatorMap | readonly Scalar[] | null | QueryBuilder | NativeQueryBuilder; -type TypedAliasedFilterValue = FilterValue> | QueryBuilder | NativeQueryBuilder; -type RootAliasFilterKeys = { - [K in EntityKey as `${RootAlias}.${K}`]?: TypedAliasedFilterValue; -}; -type ContextFilterKeys = { - [K in ContextFieldKeys]?: AliasedFilterValue; -}; -type RawFilterKeys = { - [K in RawAliases]?: AliasedFilterValue; -}; -type NestedFilterCondition = ObjectQuery & - (IsNever extends true ? {} : string extends RootAlias ? {} : RootAliasFilterKeys) & - ([Context] extends [never] ? {} : ContextFilterKeys) & - (IsNever extends true ? {} : string extends RawAliases ? {} : RawFilterKeys); -type GroupOperators = { - $and?: NestedFilterCondition[]; - $or?: NestedFilterCondition[]; - $not?: NestedFilterCondition; -}; -export type AliasedFilterCondition< - RootAlias extends string, - Context, - Entity, - RawAliases extends string = never, -> = (IsNever extends true ? {} : string extends RootAlias ? {} : RootAliasFilterKeys) & - ([Context] extends [never] ? {} : ContextFilterKeys) & - (IsNever extends true ? {} : string extends RawAliases ? {} : RawFilterKeys) & - GroupOperators; -export type QBFilterQuery< - Entity, - RootAlias extends string = never, - Context = never, - RawAliases extends string = never, -> = FilterObject & AliasedFilterCondition; -/** @internal */ -export interface QBState { - type?: QueryType; - fields?: InternalField[]; - populate: PopulateOptions[]; - populateWhere?: ObjectQuery | PopulateHint | `${PopulateHint}`; - populateFilter?: ObjectQuery | PopulateHint | `${PopulateHint}`; - resolvedPopulateWhere?: ObjectQuery | PopulateHint | `${PopulateHint}`; - populateMap: Dictionary; - aliasCounter: number; - flags: Set; - finalized: boolean; - populateHintFinalized: boolean; - joins: Dictionary; - explicitAlias: boolean; - schema?: string; - cond: Dictionary; - data?: Dictionary; - orderBy: QueryOrderMap[]; - groupBy: InternalField[]; - having: Dictionary; - returning?: InternalField[]; - onConflict?: OnConflictClause[]; - limit?: number; - offset?: number; - distinctOn?: string[]; - joinedProps: Map>; - cache?: boolean | number | [string, number]; - indexHint?: string; - collation?: string; - comments: string[]; - hintComments: string[]; - flushMode?: FlushMode; - lockMode?: LockMode; - lockTables?: string[]; - subQueries: Dictionary; - mainAlias?: Alias; - aliases: Dictionary>; - tptAlias: Dictionary; - unionQuery?: { - sql: string; - params: readonly unknown[]; - }; - ctes: (CteOptions & { - name: string; - query: NativeQueryBuilder | RawQueryFragment; - recursive?: boolean; - })[]; - tptJoinsApplied: boolean; - autoJoinedPaths: string[]; -} -/** - * SQL query builder with fluent interface. - * - * ```ts - * const qb = orm.em.createQueryBuilder(Publisher); - * qb.select('*') - * .where({ - * name: 'test 123', - * type: PublisherType.GLOBAL, - * }) - * .orderBy({ - * name: QueryOrder.DESC, - * type: QueryOrder.ASC, - * }) - * .limit(2, 1); - * - * const publisher = await qb.getSingleResult(); - * ``` - */ -export declare class QueryBuilder< - Entity extends object = AnyEntity, - RootAlias extends string = never, - Hint extends string = never, - Context extends object = never, - RawAliases extends string = never, - Fields extends string = '*', - CTEs extends Record = {}, -> implements Subquery { - #private; - protected readonly metadata: MetadataStorage; - protected readonly driver: AbstractSqlDriver; - protected readonly context?: Transaction | undefined; - protected connectionType?: ConnectionType | undefined; - protected em?: SqlEntityManager | undefined; - protected loggerContext?: (LoggingOptions & Dictionary) | undefined; - readonly __subquery: true; - /** @internal */ - static createDefaultState(): QBState; - get mainAlias(): Alias; - get alias(): string; - get helper(): QueryBuilderHelper; - get type(): QueryType; - /** @internal */ - get state(): QBState; - protected readonly platform: AbstractSqlPlatform; - /** - * @internal - */ - constructor( - entityName: EntityName | QueryBuilder, - metadata: MetadataStorage, - driver: AbstractSqlDriver, - context?: Transaction | undefined, - alias?: string, - connectionType?: ConnectionType | undefined, - em?: SqlEntityManager | undefined, - loggerContext?: (LoggingOptions & Dictionary) | undefined, - ); - /** - * Creates a SELECT query, specifying the fields to retrieve. - * - * @example - * ```ts - * // Select specific fields - * const qb = em.createQueryBuilder(User, 'u'); - * qb.select(['u.id', 'u.name', 'u.email']); - * - * // Select with raw expressions - * qb.select([raw('count(*) as total')]); - * - * // Select with aliases (works for regular and formula properties) - * qb.select(['id', 'fullName as displayName']); - * qb.select(['id', sql.ref('fullName').as('displayName')]); - * - * // Select with distinct - * qb.select('*', true); - * ``` - */ - select[]>( - fields: F, - distinct?: boolean, - ): SelectQueryBuilder< - Entity, - RootAlias, - Hint, - Context, - RawAliases | ExtractRawAliases, - ExtractRootFields, - CTEs - >; - /** - * Creates a SELECT query, specifying the fields to retrieve. - * - * @example - * ```ts - * // Select specific fields - * const qb = em.createQueryBuilder(User, 'u'); - * qb.select(['u.id', 'u.name', 'u.email']); - * - * // Select with raw expressions - * qb.select([raw('count(*) as total')]); - * - * // Select with distinct - * qb.select('*', true); - * ``` - */ - select( - fields: readonly NestedAutoPath[], - distinct?: boolean, - ): SelectQueryBuilder, CTEs>; - /** - * Creates a SELECT query, specifying the fields to retrieve. - * - * @example - * ```ts - * // Select specific fields with nested paths (e.g., for embedded properties) - * const qb = em.createQueryBuilder(User, 'u'); - * qb.select('address.city'); - * ``` - */ - select( - fields: NestedAutoPath, - distinct?: boolean, - ): SelectQueryBuilder, CTEs>; - /** - * Creates a SELECT query, specifying the fields to retrieve. - * - * @example - * ```ts - * // Select specific fields - * const qb = em.createQueryBuilder(User, 'u'); - * qb.select(['u.id', 'u.name', 'u.email']); - * - * // Select with raw expressions - * qb.select([raw('count(*) as total')]); - * - * // Select with distinct - * qb.select('*', true); - * ``` - */ - select>( - fields: F, - distinct?: boolean, - ): SelectQueryBuilder< - Entity, - RootAlias, - Hint, - Context, - RawAliases | ExtractRawAliases, - ExtractRootFields, - CTEs - >; - /** - * Adds fields to an existing SELECT query. - */ - addSelect | readonly Field[]>( - fields: F, - ): SelectQueryBuilder< - Entity, - RootAlias, - Hint, - Context, - RawAliases | ExtractRawAliases, - Fields | ExtractRootFields, - CTEs - >; - distinct(): SelectQueryBuilder; - /** postgres only */ - distinctOn[]>( - fields: F, - ): SelectQueryBuilder; - /** postgres only */ - distinctOn>( - fields: F, - ): SelectQueryBuilder; - /** - * Creates an INSERT query with the given data. - * - * @example - * ```ts - * await em.createQueryBuilder(User) - * .insert({ name: 'John', email: 'john@example.com' }) - * .execute(); - * - * // Bulk insert - * await em.createQueryBuilder(User) - * .insert([{ name: 'John' }, { name: 'Jane' }]) - * .execute(); - * ``` - */ - insert( - data: RequiredEntityData | RequiredEntityData[], - ): InsertQueryBuilder; - /** - * Creates an UPDATE query with the given data. - * Use `where()` to specify which rows to update. - * - * @example - * ```ts - * await em.createQueryBuilder(User) - * .update({ name: 'John Doe' }) - * .where({ id: 1 }) - * .execute(); - * ``` - */ - update(data: EntityData): UpdateQueryBuilder; - /** - * Creates a DELETE query. - * Use `where()` to specify which rows to delete. - * - * @example - * ```ts - * await em.createQueryBuilder(User) - * .delete() - * .where({ id: 1 }) - * .execute(); - * - * // Or pass the condition directly - * await em.createQueryBuilder(User) - * .delete({ isActive: false }) - * .execute(); - * ``` - */ - delete(cond?: QBFilterQuery): DeleteQueryBuilder; - /** - * Creates a TRUNCATE query to remove all rows from the table. - */ - truncate(): TruncateQueryBuilder; - /** - * Creates a COUNT query to count matching rows. - * - * @example - * ```ts - * const count = await em.createQueryBuilder(User) - * .count() - * .where({ isActive: true }) - * .execute('get'); - * ``` - */ - count>(field?: F | F[], distinct?: boolean): CountQueryBuilder; - /** - * Adds a JOIN clause to the query for an entity relation. - * - * @example - * ```ts - * const qb = em.createQueryBuilder(Book, 'b'); - * qb.select('*') - * .join('b.author', 'a') - * .where({ 'a.name': 'John' }); - * ``` - */ - join, Alias extends string>( - field: Field, - alias: Alias, - cond?: JoinCondition, Alias>, - type?: JoinType, - path?: string, - schema?: string, - ): SelectQueryBuilder< - Entity, - RootAlias, - ModifyHint & {}, - ModifyContext, - RawAliases, - '*', - CTEs - >; - /** - * Adds a JOIN clause to the query for a subquery. - */ - join( - field: RawQueryFragment | QueryBuilder, - alias: Alias, - cond?: RawJoinCondition, - type?: JoinType, - path?: string, - schema?: string, - ): SelectQueryBuilder, RawAliases, '*', CTEs>; - /** - * Adds an INNER JOIN clause to the query for an entity relation. - */ - innerJoin, Alias extends string>( - field: Field, - alias: Alias, - cond?: JoinCondition, Alias>, - schema?: string, - ): SelectQueryBuilder< - Entity, - RootAlias, - ModifyHint & {}, - ModifyContext, - RawAliases, - '*', - CTEs - >; - /** - * Adds an INNER JOIN clause to the query for a subquery. - */ - innerJoin( - field: RawQueryFragment | QueryBuilder, - alias: Alias, - cond?: RawJoinCondition, - schema?: string, - ): SelectQueryBuilder, RawAliases, '*', CTEs>; - innerJoinLateral( - field: RawQueryFragment | QueryBuilder, - alias: Alias, - cond?: RawJoinCondition, - schema?: string, - ): SelectQueryBuilder, RawAliases, '*', CTEs>; - /** - * Adds a LEFT JOIN clause to the query for an entity relation. - */ - leftJoin, Alias extends string>( - field: Field, - alias: Alias, - cond?: JoinCondition, Alias>, - schema?: string, - ): SelectQueryBuilder< - Entity, - RootAlias, - ModifyHint & {}, - ModifyContext, - RawAliases, - '*', - CTEs - >; - /** - * Adds a LEFT JOIN clause to the query for a subquery. - */ - leftJoin( - field: RawQueryFragment | QueryBuilder, - alias: Alias, - cond?: RawJoinCondition, - schema?: string, - ): SelectQueryBuilder, RawAliases, '*', CTEs>; - leftJoinLateral( - field: RawQueryFragment | QueryBuilder, - alias: Alias, - cond?: RawJoinCondition, - schema?: string, - ): SelectQueryBuilder, RawAliases, '*', CTEs>; - /** - * Adds a JOIN clause and automatically selects the joined entity's fields. - * This is useful for eager loading related entities. - * - * @example - * ```ts - * const qb = em.createQueryBuilder(Book, 'b'); - * qb.select('*') - * .joinAndSelect('b.author', 'a') - * .where({ 'a.name': 'John' }); - * ``` - */ - joinAndSelect< - Field extends QBField, - Alias extends string, - const JoinFields extends - | readonly [ - JoinSelectField, Alias>, - ...JoinSelectField, Alias>[], - ] - | undefined = undefined, - >( - field: Field | [Field, RawQueryFragment | QueryBuilder], - alias: Alias, - cond?: JoinCondition, Alias>, - type?: JoinType, - path?: string, - fields?: JoinFields, - schema?: string, - ): SelectQueryBuilder< - Entity, - RootAlias, - ModifyHint & {}, - ModifyContext, - RawAliases, - ModifyFields, - CTEs - >; - leftJoinAndSelect< - Field extends QBField, - Alias extends string, - const JoinFields extends - | readonly [ - JoinSelectField, Alias>, - ...JoinSelectField, Alias>[], - ] - | undefined = undefined, - >( - field: Field | [Field, RawQueryFragment | QueryBuilder], - alias: Alias, - cond?: JoinCondition, Alias>, - fields?: JoinFields, - schema?: string, - ): SelectQueryBuilder< - Entity, - RootAlias, - ModifyHint & {}, - ModifyContext, - RawAliases, - ModifyFields, - CTEs - >; - leftJoinLateralAndSelect< - Field extends QBField, - Alias extends string, - const JoinFields extends - | readonly [ - JoinSelectField, Alias>, - ...JoinSelectField, Alias>[], - ] - | undefined = undefined, - >( - field: [Field, RawQueryFragment | QueryBuilder], - alias: Alias, - cond?: JoinCondition, Alias>, - fields?: JoinFields, - schema?: string, - ): SelectQueryBuilder< - Entity, - RootAlias, - ModifyHint & {}, - ModifyContext, - RawAliases, - ModifyFields, - CTEs - >; - innerJoinAndSelect< - Field extends QBField, - Alias extends string, - const JoinFields extends - | readonly [ - JoinSelectField, Alias>, - ...JoinSelectField, Alias>[], - ] - | undefined = undefined, - >( - field: Field | [Field, RawQueryFragment | QueryBuilder], - alias: Alias, - cond?: JoinCondition, Alias>, - fields?: JoinFields, - schema?: string, - ): SelectQueryBuilder< - Entity, - RootAlias, - ModifyHint & {}, - ModifyContext, - RawAliases, - ModifyFields, - CTEs - >; - innerJoinLateralAndSelect< - Field extends QBField, - Alias extends string, - const JoinFields extends - | readonly [ - JoinSelectField, Alias>, - ...JoinSelectField, Alias>[], - ] - | undefined = undefined, - >( - field: [Field, RawQueryFragment | QueryBuilder], - alias: Alias, - cond?: JoinCondition, Alias>, - fields?: JoinFields, - schema?: string, - ): SelectQueryBuilder< - Entity, - RootAlias, - ModifyHint & {}, - ModifyContext, - RawAliases, - ModifyFields, - CTEs - >; - protected getFieldsForJoinedLoad( - prop: EntityProperty, - alias: string, - explicitFields?: readonly string[], - ): InternalField[]; - /** - * Apply filters to the QB where condition. - */ - applyFilters(filterOptions?: FilterOptions): Promise; - /** - * @internal - */ - scheduleFilterCheck(path: string): void; - /** - * @internal - */ - applyJoinedFilters(em: EntityManager, filterOptions: FilterOptions | undefined): Promise; - withSubQuery(subQuery: RawQueryFragment | NativeQueryBuilder, alias: string): this; - /** - * Adds a WHERE clause to the query using an object condition. - * - * Supports filtering by: - * - Direct entity properties: `{ name: 'John' }` - * - Nested relations/embedded: `{ author: { name: 'John' } }` - * - Aliased properties after joins: `{ 'a.name': 'John' }` or `{ 'b.title': 'test' }` - * - Filter operators: `{ age: { $gte: 18 } }` - * - Logical operators: `{ $or: [{ name: 'John' }, { name: 'Jane' }] }` - * - * @example - * ```ts - * // Filter by entity properties - * qb.where({ name: 'John', age: { $gte: 18 } }); - * - * // Filter by nested relation - * qb.where({ author: { name: 'John' } }); - * - * // Filter by aliased properties after join - * qb.leftJoin('a.books', 'b').where({ 'b.title': 'test' }); - * - * // Combine with logical operators - * qb.where({ $or: [{ status: 'active' }, { role: 'admin' }] }); - * ``` - */ - where(cond: QBFilterQuery, operator?: keyof typeof GroupOperator): this; - /** - * Adds a WHERE clause to the query using a raw SQL string or fragment. - * - * @example - * ```ts - * // Raw SQL with parameters - * qb.where('name = ? AND age >= ?', ['John', 18]); - * - * // Using raw() helper - * qb.where(raw('lower(name) = ?', ['john'])); - * ``` - */ - where(cond: string | RawQueryFragment, params?: any[], operator?: keyof typeof GroupOperator): this; - /** - * Adds an AND WHERE clause to the query using an object condition. - * - * @example - * ```ts - * qb.where({ status: 'active' }).andWhere({ role: 'admin' }); - * qb.where({ name: 'John' }).andWhere({ 'b.title': 'test' }); - * ``` - */ - andWhere(cond: QBFilterQuery): this; - /** - * Adds an AND WHERE clause to the query using a raw SQL string or fragment. - * - * @example - * ```ts - * qb.where({ status: 'active' }).andWhere('age >= ?', [18]); - * ``` - */ - andWhere(cond: string | RawQueryFragment, params?: any[]): this; - /** - * Adds an OR WHERE clause to the query using an object condition. - * - * @example - * ```ts - * qb.where({ status: 'active' }).orWhere({ role: 'admin' }); - * qb.where({ name: 'John' }).orWhere({ name: 'Jane' }); - * ``` - */ - orWhere(cond: QBFilterQuery): this; - /** - * Adds an OR WHERE clause to the query using a raw SQL string or fragment. - * - * @example - * ```ts - * qb.where({ status: 'active' }).orWhere('role = ?', ['admin']); - * ``` - */ - orWhere(cond: string | RawQueryFragment, params?: any[]): this; - /** - * Adds an ORDER BY clause to the query, replacing any existing order. - * - * @example - * ```ts - * qb.orderBy({ name: 'asc', createdAt: 'desc' }); - * qb.orderBy([{ name: 'asc' }, { createdAt: 'desc' }]); - * qb.orderBy({ profile: { bio: 'asc' } }); // nested via object - * qb.orderBy({ 'profile.bio': 'asc' }); // nested via dot notation - * ``` - */ - orderBy( - orderBy: - | ContextOrderByMap - | ContextOrderByMap[], - ): SelectQueryBuilder; - /** - * Adds an ORDER BY clause to the query, replacing any existing order. - * - * @example - * ```ts - * qb.orderBy({ name: 'asc', createdAt: 'desc' }); - * qb.orderBy([{ name: 'asc' }, { createdAt: 'desc' }]); - * qb.orderBy({ profile: { bio: 'asc' } }); // nested via object - * qb.orderBy({ 'profile.bio': 'asc' }); // nested via dot notation - * ``` - */ - orderBy>( - orderBy: T & { - [K in keyof T]: K extends NestedAutoPath - ? T[K] - : K extends RawAliases - ? T[K] - : never; - }, - ): SelectQueryBuilder; - /** - * Adds additional ORDER BY clause without replacing existing order. - */ - andOrderBy( - orderBy: - | ContextOrderByMap - | ContextOrderByMap[], - ): SelectQueryBuilder; - /** - * Adds additional ORDER BY clause without replacing existing order. - */ - andOrderBy>( - orderBy: T & { - [K in keyof T]: K extends NestedAutoPath - ? T[K] - : K extends RawAliases - ? T[K] - : never; - }, - ): SelectQueryBuilder; - private processOrderBy; - /** Collect custom aliases from select fields (stored as 'resolved as alias' strings by select()). */ - private getSelectAliases; - /** - * Adds a GROUP BY clause to the query. - * - * @example - * ```ts - * qb.select([raw('count(*) as count'), 'status']) - * .groupBy('status'); - * ``` - */ - groupBy[]>( - fields: F, - ): SelectQueryBuilder; - /** - * Adds a GROUP BY clause to the query. - * - * @example - * ```ts - * qb.select([raw('count(*) as count'), 'status']) - * .groupBy('status'); - * ``` - */ - groupBy>( - fields: F, - ): SelectQueryBuilder; - /** - * Adds a GROUP BY clause to the query. - * - * @example - * ```ts - * qb.select([raw('count(*) as count'), 'status']) - * .groupBy('status'); - * ``` - */ - groupBy( - fields: NestedAutoPath | readonly NestedAutoPath[], - ): SelectQueryBuilder; - /** - * Adds a HAVING clause to the query, typically used with GROUP BY. - * - * @example - * ```ts - * qb.select([raw('count(*) as count'), 'status']) - * .groupBy('status') - * .having({ count: { $gt: 5 } }); - * ``` - */ - having( - cond?: QBFilterQuery | string, - params?: any[], - operator?: keyof typeof GroupOperator, - ): SelectQueryBuilder; - andHaving( - cond?: QBFilterQuery | string, - params?: any[], - ): SelectQueryBuilder; - orHaving( - cond?: QBFilterQuery | string, - params?: any[], - ): SelectQueryBuilder; - onConflict>( - fields?: F | F[] | RawQueryFragment, - ): InsertQueryBuilder; - ignore(): this; - merge(data: readonly NestedAutoPath[]): this; - merge>(data?: EntityData | F[]): this; - returning>(fields?: F | F[]): this; - /** - * @internal - */ - populate( - populate: PopulateOptions[], - populateWhere?: ObjectQuery | PopulateHint | `${PopulateHint}`, - populateFilter?: ObjectQuery | PopulateHint | `${PopulateHint}`, - ): this; - /** - * Sets a LIMIT clause to restrict the number of results. - * - * @example - * ```ts - * qb.select('*').limit(10); // First 10 results - * qb.select('*').limit(10, 20); // 10 results starting from offset 20 - * ``` - */ - limit( - limit?: number, - offset?: number, - ): SelectQueryBuilder; - /** - * Sets an OFFSET clause to skip a number of results. - * - * @example - * ```ts - * qb.select('*').limit(10).offset(20); // Results 21-30 - * ``` - */ - offset(offset?: number): SelectQueryBuilder; - withSchema(schema?: string): this; - setLockMode(mode?: LockMode, tables?: string[]): this; - setFlushMode(flushMode?: FlushMode): this; - setFlag(flag: QueryFlag): this; - unsetFlag(flag: QueryFlag): this; - hasFlag(flag: QueryFlag): boolean; - cache(config?: boolean | number | [string, number]): this; - /** - * Adds index hint to the FROM clause. - */ - indexHint(sql: string | undefined): this; - /** - * Adds COLLATE clause to ORDER BY expressions. - */ - collation(collation: string | undefined): this; - /** - * Prepend comment to the sql query using the syntax `/* ... *‍/`. Some characters are forbidden such as `/*, *‍/` and `?`. - */ - comment(comment: string | string[] | undefined): this; - /** - * Add hints to the query using comment-like syntax `/*+ ... *‍/`. MySQL and Oracle use this syntax for optimizer hints. - * Also various DB proxies and routers use this syntax to pass hints to alter their behavior. In other dialects the hints - * are ignored as simple comments. - */ - hintComment(comment: string | string[] | undefined): this; - /** - * Specifies FROM which entity's table select/update/delete will be executed, removing all previously set FROM-s. - * Allows setting a main string alias of the selection data. - */ - from( - target: QueryBuilder, - aliasName?: string, - ): SelectQueryBuilder; - /** - * Specifies FROM which entity's table select/update/delete will be executed, removing all previously set FROM-s. - * Allows setting a main string alias of the selection data. - */ - from( - target: EntityName, - ): SelectQueryBuilder; - /** - * Specifies a CTE name as the FROM source, with full type safety. - * The entity type is inferred from the CTE definition passed to `.with()`. - */ - from( - target: Name, - aliasName?: Alias, - ): SelectQueryBuilder; - getNativeQuery(processVirtualEntity?: boolean): NativeQueryBuilder; - protected processReturningStatement( - qb: NativeQueryBuilder, - meta?: EntityMetadata, - data?: Dictionary, - returning?: Field[], - ): void; - /** - * Returns the query with parameters as wildcards. - */ - getQuery(): string; - /** - * Returns raw fragment representation of this QueryBuilder. - */ - toRaw(): RawQueryFragment; - toQuery(): { - sql: string; - params: readonly unknown[]; - }; - /** - * Returns the list of all parameters for this query. - */ - getParams(): readonly unknown[]; - /** - * Returns raw interpolated query string with all the parameters inlined. - */ - getFormattedQuery(): string; - /** - * @internal - */ - getAliasForJoinPath(path?: string | JoinOptions, options?: ICriteriaNodeProcessOptions): string | undefined; - /** - * @internal - */ - getJoinForPath(path: string, options?: ICriteriaNodeProcessOptions): JoinOptions | undefined; - /** - * @internal - */ - getNextAlias(entityName?: string | EntityName): string; - /** - * Registers a join for a specific polymorphic target type. - * Used by the driver to create per-target LEFT JOINs for JOINED loading. - * @internal - */ - addPolymorphicJoin( - prop: EntityProperty, - targetMeta: EntityMetadata, - ownerAlias: string, - alias: string, - type: JoinType, - path: string, - schema?: string, - ): void; - /** - * @internal - */ - getAliasMap(): Dictionary; - /** - * Executes this QB and returns the raw results, mapped to the property names (unless disabled via last parameter). - * Use `method` to specify what kind of result you want to get (array/single/meta). - */ - execute(method?: 'all' | 'get' | 'run', options?: ExecuteOptions | boolean): Promise; - private getConnection; - /** - * Executes the query and returns an async iterable (async generator) that yields results one by one. - * By default, the results are merged and mapped to entity instances, without adding them to the identity map. - * You can disable merging and mapping by passing the options `{ mergeResults: false, mapResults: false }`. - * This is useful for processing large datasets without loading everything into memory at once. - * - * ```ts - * const qb = em.createQueryBuilder(Book, 'b'); - * qb.select('*').where({ title: '1984' }).leftJoinAndSelect('b.author', 'a'); - * - * for await (const book of qb.stream()) { - * // book is an instance of Book entity - * console.log(book.title, book.author.name); - * } - * ``` - */ - stream(options?: QBStreamOptions): AsyncIterableIterator>; - /** - * Alias for `qb.getResultList()` - */ - getResult(): Promise[]>; - /** - * Executes the query, returning array of results mapped to entity instances. - */ - getResultList(limit?: number): Promise[]>; - private propagatePopulateHint; - private mapResult; - private mapResults; - /** - * Executes the query, returning the first result or null - */ - getSingleResult(): Promise | null>; - /** - * Executes count query (without offset and limit), returning total count of results - */ - getCount>(field?: F | F[], distinct?: boolean): Promise; - /** - * Executes the query, returning both array of results and total count query (without offset and limit). - */ - getResultAndCount(): Promise<[Loaded[], number]>; - /** - * Returns native query builder instance with sub-query aliased with given alias. - */ - as(alias: string): NativeQueryBuilder; - /** - * Returns native query builder instance with sub-query aliased with given alias. - * You can provide the target entity name as the first parameter and use the second parameter to point to an existing property to infer its field name. - */ - as(targetEntity: EntityName, alias: EntityKey): NativeQueryBuilder; - /** - * Combines the current query with one or more other queries using `UNION ALL`. - * All queries must select the same columns. Returns a `QueryBuilder` that - * can be used with `$in`, passed to `qb.from()`, or converted via `.getQuery()`, - * `.getParams()`, `.toQuery()`, `.toRaw()`, etc. - * - * ```ts - * const qb1 = em.createQueryBuilder(Employee).select('id').where(condition1); - * const qb2 = em.createQueryBuilder(Employee).select('id').where(condition2); - * const qb3 = em.createQueryBuilder(Employee).select('id').where(condition3); - * const subquery = qb1.unionAll(qb2, qb3); - * - * const results = await em.find(Employee, { id: { $in: subquery } }); - * ``` - */ - unionAll(...others: (QueryBuilder | NativeQueryBuilder)[]): QueryBuilder; - /** - * Combines the current query with one or more other queries using `UNION` (with deduplication). - * All queries must select the same columns. Returns a `QueryBuilder` that - * can be used with `$in`, passed to `qb.from()`, or converted via `.getQuery()`, - * `.getParams()`, `.toQuery()`, `.toRaw()`, etc. - * - * ```ts - * const qb1 = em.createQueryBuilder(Employee).select('id').where(condition1); - * const qb2 = em.createQueryBuilder(Employee).select('id').where(condition2); - * const subquery = qb1.union(qb2); - * - * const results = await em.find(Employee, { id: { $in: subquery } }); - * ``` - */ - union(...others: (QueryBuilder | NativeQueryBuilder)[]): QueryBuilder; - private buildUnionQuery; - /** - * Adds a Common Table Expression (CTE) to the query. - * When a `QueryBuilder` is passed, its entity type is tracked for type-safe `from()`. - * - * @example - * ```ts - * const recentBooks = em.createQueryBuilder(Book, 'b').select('*').where({ ... }); - * const qb = em.createQueryBuilder(Author, 'a') - * .with('recent_books', recentBooks) - * .select('*') - * .from('recent_books', 'rb'); // entity type inferred as Book - * ``` - */ - with>( - name: Name, - query: Q, - options?: CteOptions, - ): QueryBuilder< - Entity, - RootAlias, - Hint, - Context, - RawAliases, - Fields, - CTEs & Record ? T : object> - >; - /** - * Adds a Common Table Expression (CTE) to the query using a `NativeQueryBuilder` or raw SQL fragment. - * The CTE name is tracked but without entity type inference — use `from()` to query from it. - */ - with( - name: Name, - query: NativeQueryBuilder | RawQueryFragment, - options?: CteOptions, - ): QueryBuilder>; - /** - * Adds a recursive Common Table Expression (CTE) to the query. - * When a `QueryBuilder` is passed, its entity type is tracked for type-safe `from()`. - * - * @example - * ```ts - * const base = em.createQueryBuilder(Category).select('*').where({ parent: null }); - * const rec = em.createQueryBuilder(Category, 'c').select('c.*') - * .leftJoin('c.parent', 'ct', { id: sql.ref('c.parentId') }); - * const qb = em.createQueryBuilder(Category) - * .withRecursive('category_tree', base.unionAll(rec)) - * .select('*') - * .from('category_tree', 'ct'); // entity type inferred as Category - * ``` - */ - withRecursive>( - name: Name, - query: Q, - options?: CteOptions, - ): QueryBuilder< - Entity, - RootAlias, - Hint, - Context, - RawAliases, - Fields, - CTEs & Record ? T : object> - >; - /** - * Adds a recursive Common Table Expression (CTE) to the query using a `NativeQueryBuilder` or raw SQL fragment. - * The CTE name is tracked but without entity type inference — use `from()` to query from it. - */ - withRecursive( - name: Name, - query: NativeQueryBuilder | RawQueryFragment, - options?: CteOptions, - ): QueryBuilder>; - private addCte; - clone( - reset?: boolean | (keyof QBState)[], - preserve?: (keyof QBState)[], - ): QueryBuilder; - /** - * Sets logger context for this query builder. - */ - setLoggerContext(context: LoggingOptions & Dictionary): void; - /** - * Gets logger context for this query builder. - */ - getLoggerContext(): T; - private fromVirtual; - /** - * Adds a join from a property object. Used internally for TPT joins where the property - * is synthetic (not in entity.properties) but defined on metadata (e.g., tptParentProp). - * The caller must create the alias first via createAlias(). - * @internal - */ - addPropertyJoin( - prop: EntityProperty, - ownerAlias: string, - alias: string, - type: JoinType, - path: string, - schema?: string, - ): string; - private joinReference; - protected prepareFields( - fields: InternalField[], - type?: 'where' | 'groupBy' | 'sub-query', - schema?: string, - ): (string | RawQueryFragment)[]; - /** - * Resolves nested paths like `a.books.title` to their actual field references. - * Auto-joins relations as needed and returns `{alias}.{field}`. - * For embeddeds: navigates into flattened embeddeds to return the correct field name. - */ - protected resolveNestedPath(field: string): string | string[]; - protected init(type: QueryType, data?: any, cond?: any): this; - private getQueryBase; - private applyDiscriminatorCondition; - /** - * Ensures TPT joins are applied. Can be called early before finalize() to populate - * the _tptAlias map for use in join resolution. Safe to call multiple times. - * @internal - */ - ensureTPTJoins(): void; - /** - * For TPT (Table-Per-Type) inheritance: INNER JOINs parent tables. - * When querying a child entity, we need to join all parent tables. - * Field selection is handled separately in addTPTParentFields(). - */ - private applyTPTJoins; - /** - * For TPT inheritance: adds field selections from parent tables. - */ - private addTPTParentFields; - /** - * For TPT polymorphic queries: LEFT JOINs all child tables when querying a TPT base class. - * Adds discriminator and child fields to determine and load the concrete type. - */ - private applyTPTPolymorphicJoins; - private finalize; - /** @internal */ - processPopulateHint(): void; - private processPopulateWhere; - private mergeOnConditions; - /** - * When adding an inner join on a left joined relation, we need to nest them, - * otherwise the inner join could discard rows of the root table. - */ - private processNestedJoins; - private hasToManyJoins; - protected wrapPaginateSubQuery(meta: EntityMetadata): void; - /** - * Computes the set of populate paths from the _populate hints. - */ - protected getPopulatePaths(): Set; - protected normalizeJoinPath(join: JoinOptions, meta: EntityMetadata): string; - /** - * Transfers WHERE conditions to ORDER BY joins that are not used for population. - * This ensures the outer query's ORDER BY uses the same filtered rows as the subquery. - * GH #6160 - */ - protected transferConditionsForOrderByJoins( - meta: EntityMetadata, - cond: Dictionary | undefined, - populatePaths: Set, - ): void; - /** - * Removes joins that are not used for population or ordering to improve performance. - */ - protected pruneJoinsForPagination(meta: EntityMetadata, populatePaths: Set): void; - /** - * Transfers WHERE conditions that reference a join alias to the join's ON clause. - * This is needed when a join is kept for ORDER BY after pagination wrapping, - * so the outer query orders by the same filtered rows as the subquery. - * @internal - */ - protected transferConditionsToJoin(cond: Dictionary, join: JoinOptions, path?: string): void; - private wrapModifySubQuery; - private getSchema; - /** @internal */ - createAlias( - entityName: EntityName, - aliasName: string, - subQuery?: NativeQueryBuilder | RawQueryFragment, - ): Alias; - private createMainAlias; - private fromSubQuery; - private fromEntityName; - private fromRawTable; - private createQueryBuilderHelper; - private ensureFromClause; - private ensureNotFinalized; -} -export interface RunQueryBuilder< - Entity extends object, - RootAlias extends string = never, - Context extends object = never, - RawAliases extends string = never, -> extends Omit< - QueryBuilder, - 'getResult' | 'getSingleResult' | 'getResultList' | 'where' -> { - where( - cond: QBFilterQuery | string, - params?: keyof typeof GroupOperator | any[], - operator?: keyof typeof GroupOperator, - ): this; - execute>(method?: 'all' | 'get' | 'run', mapResults?: boolean): Promise; -} -/** - * @internal Optimized DTO type for execute(). - * Bypasses the double mapped type of EntityDTO> by using DirectDTO - * which only iterates selected keys instead of all entity keys. - * - * - Wildcard, no joins: EntityDTO - * - Selected fields, no joins: DirectDTO (~132x faster than Pick, F>) - * - Wildcard + single-level join: Omit> + override populated relations - * - Selected fields + single-level join: DirectDTO for root + DirectDTO for joined (~60x faster) - * - Wildcard + nested joins: uses SerializeDTO (~40x faster than EntityDTO>) - * - Fields + nested joins: falls back to EntityDTO> - */ -type DirectDTO = { - [K in F]: EntityDTOProp> | Extract; -}; -type PopulatedDTO = - NonNullable extends Collection ? EntityDTOFlat[] : EntityDTOFlat>; -type SubFields = F extends `${Rel}.${infer Sub}` ? Sub : never; -type RootFields = F extends `${string}.${string}` - ? F extends `${H}.${string}` - ? never - : F - : F; -type JoinDTO = - NonNullable extends Collection - ? SubFields extends never - ? EntityDTOProp> - : DirectDTO | PrimaryProperty) & keyof U>[] - : SubFields extends never - ? EntityDTOProp - : - | DirectDTO< - NonNullable, - (SubFields | PrimaryProperty>) & keyof NonNullable - > - | Extract; -type ExecuteDTO = [H] extends [never] - ? [F] extends ['*'] - ? EntityDTOFlat - : DirectDTO - : [F] extends ['*'] - ? true extends (H extends `${string}.${string}` ? true : false) - ? SerializeDTO - : Omit, H & keyof EntityDTOFlat> & { - [K in H & keyof T as K & keyof EntityDTOFlat]: PopulatedDTO | Extract; - } - : true extends (H extends `${string}.${string}` ? true : false) - ? EntityDTOFlat> - : DirectDTO | PrimaryProperty) & keyof T> & { - [K in H & keyof T]: JoinDTO; - }; -/** Shorthand for `QueryBuilder` with all generic parameters set to `any`. */ -export type AnyQueryBuilder = QueryBuilder; -export interface SelectQueryBuilder< - Entity extends object = AnyEntity, - RootAlias extends string = never, - Hint extends string = never, - Context extends object = never, - RawAliases extends string = never, - Fields extends string = '*', - CTEs extends Record = {}, -> extends QueryBuilder { - execute[]>( - method?: 'all' | 'get' | 'run', - mapResults?: boolean, - ): Promise; - execute[]>(method: 'all', mapResults?: boolean): Promise; - execute>(method: 'get', mapResults?: boolean): Promise; - execute>(method: 'run', mapResults?: boolean): Promise; -} -export interface CountQueryBuilder extends QueryBuilder { - execute< - Result = { - count: number; - }[], - >( - method?: 'all' | 'get' | 'run', - mapResults?: boolean, - ): Promise; - execute< - Result = { - count: number; - }[], - >( - method: 'all', - mapResults?: boolean, - ): Promise; - execute< - Result = { - count: number; - }, - >( - method: 'get', - mapResults?: boolean, - ): Promise; - execute< - Result = QueryResult<{ - count: number; - }>, - >( - method: 'run', - mapResults?: boolean, - ): Promise; -} -export interface InsertQueryBuilder< - T extends object, - RootAlias extends string = never, - Context extends object = never, -> extends RunQueryBuilder {} -export interface UpdateQueryBuilder< - T extends object, - RootAlias extends string = never, - Context extends object = never, -> extends RunQueryBuilder {} -export interface DeleteQueryBuilder< - T extends object, - RootAlias extends string = never, - Context extends object = never, -> extends RunQueryBuilder {} -export interface TruncateQueryBuilder extends RunQueryBuilder {} -export {}; diff --git a/node_modules/@mikro-orm/sql/query/QueryBuilder.js b/node_modules/@mikro-orm/sql/query/QueryBuilder.js deleted file mode 100644 index 548c384..0000000 --- a/node_modules/@mikro-orm/sql/query/QueryBuilder.js +++ /dev/null @@ -1,2312 +0,0 @@ -var _a; -import { - EntityMetadata, - helper, - inspect, - isRaw, - LoadStrategy, - LockMode, - PopulateHint, - QueryFlag, - QueryHelper, - raw, - RawQueryFragment, - Reference, - ReferenceKind, - serialize, - Utils, - ValidationError, -} from '@mikro-orm/core'; -import { JoinType, QueryType } from './enums.js'; -import { QueryBuilderHelper } from './QueryBuilderHelper.js'; -import { CriteriaNodeFactory } from './CriteriaNodeFactory.js'; -import { NativeQueryBuilder } from './NativeQueryBuilder.js'; -/** Matches 'path as alias' — safe because ORM property names are JS identifiers (no spaces). */ -const FIELD_ALIAS_RE = /^(.+?)\s+as\s+(\w+)$/i; -/** - * SQL query builder with fluent interface. - * - * ```ts - * const qb = orm.em.createQueryBuilder(Publisher); - * qb.select('*') - * .where({ - * name: 'test 123', - * type: PublisherType.GLOBAL, - * }) - * .orderBy({ - * name: QueryOrder.DESC, - * type: QueryOrder.ASC, - * }) - * .limit(2, 1); - * - * const publisher = await qb.getSingleResult(); - * ``` - */ -export class QueryBuilder { - metadata; - driver; - context; - connectionType; - em; - loggerContext; - #state = _a.createDefaultState(); - #helper; - #query; - /** @internal */ - static createDefaultState() { - return { - aliasCounter: 0, - explicitAlias: false, - populateHintFinalized: false, - joins: {}, - cond: {}, - orderBy: [], - groupBy: [], - having: {}, - comments: [], - hintComments: [], - subQueries: {}, - aliases: {}, - tptAlias: {}, - ctes: [], - tptJoinsApplied: false, - autoJoinedPaths: [], - populate: [], - populateMap: {}, - flags: new Set([QueryFlag.CONVERT_CUSTOM_TYPES]), - finalized: false, - joinedProps: new Map(), - }; - } - get mainAlias() { - this.ensureFromClause(); - return this.#state.mainAlias; - } - get alias() { - return this.mainAlias.aliasName; - } - get helper() { - this.ensureFromClause(); - return this.#helper; - } - get type() { - return this.#state.type ?? QueryType.SELECT; - } - /** @internal */ - get state() { - return this.#state; - } - platform; - /** - * @internal - */ - constructor(entityName, metadata, driver, context, alias, connectionType, em, loggerContext) { - this.metadata = metadata; - this.driver = driver; - this.context = context; - this.connectionType = connectionType; - this.em = em; - this.loggerContext = loggerContext; - this.platform = this.driver.getPlatform(); - if (alias) { - this.#state.aliasCounter++; - this.#state.explicitAlias = true; - } - // @ts-expect-error union type does not match the overloaded method signature - this.from(entityName, alias); - } - select(fields, distinct = false) { - this.ensureNotFinalized(); - this.#state.fields = Utils.asArray(fields).flatMap(f => { - if (typeof f !== 'string') { - // Normalize sql.ref('prop') and sql.ref('prop').as('alias') to string form - if (isRaw(f) && f.sql === '??' && f.params.length === 1) { - return this.resolveNestedPath(String(f.params[0])); - } - if (isRaw(f) && f.sql === '?? as ??' && f.params.length === 2) { - return `${this.resolveNestedPath(String(f.params[0]))} as ${String(f.params[1])}`; - } - return f; - } - const asMatch = FIELD_ALIAS_RE.exec(f); - if (asMatch) { - return `${this.resolveNestedPath(asMatch[1].trim())} as ${asMatch[2]}`; - } - return this.resolveNestedPath(f); - }); - if (distinct) { - this.#state.flags.add(QueryFlag.DISTINCT); - } - return this.init(QueryType.SELECT); - } - /** - * Adds fields to an existing SELECT query. - */ - addSelect(fields) { - this.ensureNotFinalized(); - if (this.#state.type && this.#state.type !== QueryType.SELECT) { - return this; - } - return this.select([...Utils.asArray(this.#state.fields), ...Utils.asArray(fields)]); - } - distinct() { - this.ensureNotFinalized(); - return this.setFlag(QueryFlag.DISTINCT); - } - distinctOn(fields) { - this.ensureNotFinalized(); - this.#state.distinctOn = Utils.asArray(fields); - return this; - } - /** - * Creates an INSERT query with the given data. - * - * @example - * ```ts - * await em.createQueryBuilder(User) - * .insert({ name: 'John', email: 'john@example.com' }) - * .execute(); - * - * // Bulk insert - * await em.createQueryBuilder(User) - * .insert([{ name: 'John' }, { name: 'Jane' }]) - * .execute(); - * ``` - */ - insert(data) { - return this.init(QueryType.INSERT, data); - } - /** - * Creates an UPDATE query with the given data. - * Use `where()` to specify which rows to update. - * - * @example - * ```ts - * await em.createQueryBuilder(User) - * .update({ name: 'John Doe' }) - * .where({ id: 1 }) - * .execute(); - * ``` - */ - update(data) { - return this.init(QueryType.UPDATE, data); - } - /** - * Creates a DELETE query. - * Use `where()` to specify which rows to delete. - * - * @example - * ```ts - * await em.createQueryBuilder(User) - * .delete() - * .where({ id: 1 }) - * .execute(); - * - * // Or pass the condition directly - * await em.createQueryBuilder(User) - * .delete({ isActive: false }) - * .execute(); - * ``` - */ - delete(cond) { - return this.init(QueryType.DELETE, undefined, cond); - } - /** - * Creates a TRUNCATE query to remove all rows from the table. - */ - truncate() { - return this.init(QueryType.TRUNCATE); - } - /** - * Creates a COUNT query to count matching rows. - * - * @example - * ```ts - * const count = await em.createQueryBuilder(User) - * .count() - * .where({ isActive: true }) - * .execute('get'); - * ``` - */ - count(field, distinct = false) { - if (field) { - this.#state.fields = Utils.asArray(field); - } else if (distinct || this.hasToManyJoins()) { - this.#state.fields = this.mainAlias.meta.primaryKeys; - } else { - this.#state.fields = [raw('*')]; - } - if (distinct) { - this.#state.flags.add(QueryFlag.DISTINCT); - } - return this.init(QueryType.COUNT); - } - join(field, alias, cond = {}, type = JoinType.innerJoin, path, schema) { - this.joinReference(field, alias, cond, type, path, schema); - return this; - } - innerJoin(field, alias, cond = {}, schema) { - this.join(field, alias, cond, JoinType.innerJoin, undefined, schema); - return this; - } - innerJoinLateral(field, alias, cond = {}, schema) { - return this.join(field, alias, cond, JoinType.innerJoinLateral, undefined, schema); - } - leftJoin(field, alias, cond = {}, schema) { - return this.join(field, alias, cond, JoinType.leftJoin, undefined, schema); - } - leftJoinLateral(field, alias, cond = {}, schema) { - return this.join(field, alias, cond, JoinType.leftJoinLateral, undefined, schema); - } - /** - * Adds a JOIN clause and automatically selects the joined entity's fields. - * This is useful for eager loading related entities. - * - * @example - * ```ts - * const qb = em.createQueryBuilder(Book, 'b'); - * qb.select('*') - * .joinAndSelect('b.author', 'a') - * .where({ 'a.name': 'John' }); - * ``` - */ - joinAndSelect(field, alias, cond = {}, type = JoinType.innerJoin, path, fields, schema) { - if (!this.#state.type) { - this.select('*'); - } - let subquery; - if (Array.isArray(field)) { - const rawFragment = field[1] instanceof _a ? field[1].toRaw() : field[1]; - subquery = this.platform.formatQuery(rawFragment.sql, rawFragment.params); - field = field[0]; - } - const { prop, key } = this.joinReference(field, alias, cond, type, path, schema, subquery); - const [fromAlias] = this.helper.splitField(field); - if (subquery) { - this.#state.joins[key].subquery = subquery; - } - const populate = this.#state.joinedProps.get(fromAlias); - const item = { field: prop.name, strategy: LoadStrategy.JOINED, children: [] }; - if (populate) { - populate.children.push(item); - } else { - // root entity - this.#state.populate.push(item); - } - this.#state.joinedProps.set(alias, item); - this.addSelect(this.getFieldsForJoinedLoad(prop, alias, fields)); - return this; - } - leftJoinAndSelect(field, alias, cond = {}, fields, schema) { - return this.joinAndSelect(field, alias, cond, JoinType.leftJoin, undefined, fields, schema); - } - leftJoinLateralAndSelect(field, alias, cond = {}, fields, schema) { - this.joinAndSelect(field, alias, cond, JoinType.leftJoinLateral, undefined, fields, schema); - return this; - } - innerJoinAndSelect(field, alias, cond = {}, fields, schema) { - return this.joinAndSelect(field, alias, cond, JoinType.innerJoin, undefined, fields, schema); - } - innerJoinLateralAndSelect(field, alias, cond = {}, fields, schema) { - this.joinAndSelect(field, alias, cond, JoinType.innerJoinLateral, undefined, fields, schema); - return this; - } - getFieldsForJoinedLoad(prop, alias, explicitFields) { - const fields = []; - const populate = []; - const joinKey = Object.keys(this.#state.joins).find(join => join.endsWith(`#${alias}`)); - const targetMeta = prop.targetMeta; - const schema = this.#state.schema ?? (targetMeta.schema !== '*' ? targetMeta.schema : undefined); - if (joinKey) { - const path = this.#state.joins[joinKey].path.split('.').slice(1); - let children = this.#state.populate; - for (let i = 0; i < path.length; i++) { - const child = children.filter(hint => { - const [propName] = hint.field.split(':', 2); - return propName === path[i]; - }); - children = child.flatMap(c => c.children); - } - populate.push(...children); - } - for (const p of targetMeta.getPrimaryProps()) { - fields.push(...this.driver.mapPropToFieldNames(this, p, alias, targetMeta, schema)); - } - if (explicitFields && explicitFields.length > 0) { - for (const field of explicitFields) { - const [a, f] = this.helper.splitField(field); - const p = targetMeta.properties[f]; - if (p) { - fields.push(...this.driver.mapPropToFieldNames(this, p, alias, targetMeta, schema)); - } else { - fields.push(`${a}.${f} as ${a}__${f}`); - } - } - } - targetMeta.props - .filter(prop => { - if (!explicitFields || explicitFields.length === 0) { - return this.platform.shouldHaveColumn(prop, populate); - } - return prop.primary && !explicitFields.includes(prop.name) && !explicitFields.includes(`${alias}.${prop.name}`); - }) - .forEach(prop => fields.push(...this.driver.mapPropToFieldNames(this, prop, alias, targetMeta, schema))); - return fields; - } - /** - * Apply filters to the QB where condition. - */ - async applyFilters(filterOptions = {}) { - /* v8 ignore next */ - if (!this.em) { - throw new Error('Cannot apply filters, this QueryBuilder is not attached to an EntityManager'); - } - const cond = await this.em.applyFilters(this.mainAlias.entityName, {}, filterOptions, 'read'); - this.andWhere(cond); - } - /** - * @internal - */ - scheduleFilterCheck(path) { - this.#state.autoJoinedPaths.push(path); - } - /** - * @internal - */ - async applyJoinedFilters(em, filterOptions) { - for (const path of this.#state.autoJoinedPaths) { - const join = this.getJoinForPath(path); - if (join.type === JoinType.pivotJoin) { - continue; - } - filterOptions = QueryHelper.mergePropertyFilters(join.prop.filters, filterOptions); - let cond = await em.applyFilters(join.prop.targetMeta.class, join.cond, filterOptions, 'read'); - const criteriaNode = CriteriaNodeFactory.createNode(this.metadata, join.prop.targetMeta.class, cond); - cond = criteriaNode.process(this, { - matchPopulateJoins: true, - filter: true, - alias: join.alias, - ignoreBranching: true, - parentPath: join.path, - }); - if (Utils.hasObjectKeys(cond) || RawQueryFragment.hasObjectFragments(cond)) { - // remove nested filters, we only care about scalars here, nesting would require another join branch - for (const key of Object.keys(cond)) { - if ( - Utils.isPlainObject(cond[key]) && - Object.keys(cond[key]).every( - k => !(Utils.isOperator(k) && !['$some', '$none', '$every', '$size'].includes(k)), - ) - ) { - delete cond[key]; - } - } - if (Utils.hasObjectKeys(join.cond) || RawQueryFragment.hasObjectFragments(join.cond)) { - /* v8 ignore next */ - join.cond = { $and: [join.cond, cond] }; - } else { - join.cond = { ...cond }; - } - } - } - } - withSubQuery(subQuery, alias) { - this.ensureNotFinalized(); - if (isRaw(subQuery)) { - this.#state.subQueries[alias] = this.platform.formatQuery(subQuery.sql, subQuery.params); - } else { - this.#state.subQueries[alias] = subQuery.toString(); - } - return this; - } - where(cond, params, operator) { - this.ensureNotFinalized(); - let processedCond; - if (isRaw(cond)) { - const sql = this.platform.formatQuery(cond.sql, cond.params); - processedCond = { [raw(`(${sql})`)]: Utils.asArray(params) }; - operator ??= '$and'; - } else if (typeof cond === 'string') { - processedCond = { [raw(`(${cond})`, Utils.asArray(params))]: [] }; - operator ??= '$and'; - } else { - processedCond = QueryHelper.processWhere({ - where: cond, - entityName: this.mainAlias.entityName, - metadata: this.metadata, - platform: this.platform, - aliasMap: this.getAliasMap(), - aliased: [QueryType.SELECT, QueryType.COUNT].includes(this.type), - convertCustomTypes: this.#state.flags.has(QueryFlag.CONVERT_CUSTOM_TYPES), - }); - } - const op = operator || params; - const topLevel = - !op || !(Utils.hasObjectKeys(this.#state.cond) || RawQueryFragment.hasObjectFragments(this.#state.cond)); - const criteriaNode = CriteriaNodeFactory.createNode(this.metadata, this.mainAlias.entityName, processedCond); - const ignoreBranching = this.#state.resolvedPopulateWhere === 'infer'; - if ( - [QueryType.UPDATE, QueryType.DELETE].includes(this.type) && - criteriaNode.willAutoJoin(this, undefined, { ignoreBranching }) - ) { - // use sub-query to support joining - this.setFlag(this.type === QueryType.UPDATE ? QueryFlag.UPDATE_SUB_QUERY : QueryFlag.DELETE_SUB_QUERY); - this.select(this.mainAlias.meta.primaryKeys, true); - } - if (topLevel) { - this.#state.cond = criteriaNode.process(this, { ignoreBranching }); - } else if (Array.isArray(this.#state.cond[op])) { - this.#state.cond[op].push(criteriaNode.process(this, { ignoreBranching })); - } else { - const cond1 = [this.#state.cond, criteriaNode.process(this, { ignoreBranching })]; - this.#state.cond = { [op]: cond1 }; - } - if (this.#state.onConflict) { - this.#state.onConflict[this.#state.onConflict.length - 1].where = this.helper.processOnConflictCondition( - this.#state.cond, - this.#state.schema, - ); - this.#state.cond = {}; - } - return this; - } - andWhere(cond, params) { - return this.where(cond, params, '$and'); - } - orWhere(cond, params) { - return this.where(cond, params, '$or'); - } - orderBy(orderBy) { - return this.processOrderBy(orderBy, true); - } - andOrderBy(orderBy) { - return this.processOrderBy(orderBy, false); - } - processOrderBy(orderBy, reset = true) { - this.ensureNotFinalized(); - if (reset) { - this.#state.orderBy = []; - } - const selectAliases = this.getSelectAliases(); - Utils.asArray(orderBy).forEach(orig => { - // Shallow clone to avoid mutating the caller's object — safe because the clone - // is only used within this loop iteration and `orig` is not referenced afterward. - const o = { ...orig }; - // Wrap known select aliases in raw() so they bypass property validation and alias prefixing - for (const key of Object.keys(o)) { - if (selectAliases.has(key)) { - o[raw('??', [key])] = o[key]; - delete o[key]; - } - } - this.helper.validateQueryOrder(o); - const processed = QueryHelper.processWhere({ - where: o, - entityName: this.mainAlias.entityName, - metadata: this.metadata, - platform: this.platform, - aliasMap: this.getAliasMap(), - aliased: [QueryType.SELECT, QueryType.COUNT].includes(this.type), - convertCustomTypes: false, - type: 'orderBy', - }); - this.#state.orderBy.push( - CriteriaNodeFactory.createNode(this.metadata, this.mainAlias.entityName, processed).process(this, { - matchPopulateJoins: true, - type: 'orderBy', - }), - ); - }); - return this; - } - /** Collect custom aliases from select fields (stored as 'resolved as alias' strings by select()). */ - getSelectAliases() { - const aliases = new Set(); - for (const field of this.#state.fields ?? []) { - if (typeof field === 'string') { - const m = FIELD_ALIAS_RE.exec(field); - if (m) { - aliases.add(m[2]); - } - } - } - return aliases; - } - groupBy(fields) { - this.ensureNotFinalized(); - this.#state.groupBy = Utils.asArray(fields).flatMap(f => { - if (typeof f !== 'string') { - // Normalize sql.ref('prop') to string for proper formula resolution - if (isRaw(f) && f.sql === '??' && f.params.length === 1) { - return this.resolveNestedPath(String(f.params[0])); - } - return f; - } - return this.resolveNestedPath(f); - }); - return this; - } - /** - * Adds a HAVING clause to the query, typically used with GROUP BY. - * - * @example - * ```ts - * qb.select([raw('count(*) as count'), 'status']) - * .groupBy('status') - * .having({ count: { $gt: 5 } }); - * ``` - */ - having(cond = {}, params, operator) { - this.ensureNotFinalized(); - if (typeof cond === 'string') { - cond = { [raw(`(${cond})`, params)]: [] }; - } - const processed = CriteriaNodeFactory.createNode( - this.metadata, - this.mainAlias.entityName, - cond, - undefined, - undefined, - false, - ).process(this, { type: 'having' }); - if (!this.#state.having || !operator) { - this.#state.having = processed; - } else { - const cond1 = [this.#state.having, processed]; - this.#state.having = { [operator]: cond1 }; - } - return this; - } - andHaving(cond, params) { - return this.having(cond, params, '$and'); - } - orHaving(cond, params) { - return this.having(cond, params, '$or'); - } - onConflict(fields = []) { - const meta = this.mainAlias.meta; - this.ensureNotFinalized(); - this.#state.onConflict ??= []; - this.#state.onConflict.push({ - fields: isRaw(fields) - ? fields - : Utils.asArray(fields).flatMap(f => { - const key = f.toString(); - /* v8 ignore next */ - return meta.properties[key]?.fieldNames ?? [key]; - }), - }); - return this; - } - ignore() { - if (!this.#state.onConflict) { - throw new Error('You need to call `qb.onConflict()` first to use `qb.ignore()`'); - } - this.#state.onConflict[this.#state.onConflict.length - 1].ignore = true; - return this; - } - merge(data) { - if (!this.#state.onConflict) { - throw new Error('You need to call `qb.onConflict()` first to use `qb.merge()`'); - } - if (Array.isArray(data) && data.length === 0) { - return this.ignore(); - } - this.#state.onConflict[this.#state.onConflict.length - 1].merge = data; - return this; - } - returning(fields) { - this.#state.returning = Utils.asArray(fields); - return this; - } - /** - * @internal - */ - populate(populate, populateWhere, populateFilter) { - this.ensureNotFinalized(); - this.#state.populate = populate; - this.#state.populateWhere = populateWhere; - this.#state.populateFilter = populateFilter; - return this; - } - /** - * Sets a LIMIT clause to restrict the number of results. - * - * @example - * ```ts - * qb.select('*').limit(10); // First 10 results - * qb.select('*').limit(10, 20); // 10 results starting from offset 20 - * ``` - */ - limit(limit, offset = 0) { - this.ensureNotFinalized(); - this.#state.limit = limit; - if (offset) { - this.offset(offset); - } - return this; - } - /** - * Sets an OFFSET clause to skip a number of results. - * - * @example - * ```ts - * qb.select('*').limit(10).offset(20); // Results 21-30 - * ``` - */ - offset(offset) { - this.ensureNotFinalized(); - this.#state.offset = offset; - return this; - } - withSchema(schema) { - this.ensureNotFinalized(); - this.#state.schema = schema; - return this; - } - setLockMode(mode, tables) { - this.ensureNotFinalized(); - if (mode != null && ![LockMode.OPTIMISTIC, LockMode.NONE].includes(mode) && !this.context) { - throw ValidationError.transactionRequired(); - } - this.#state.lockMode = mode; - this.#state.lockTables = tables; - return this; - } - setFlushMode(flushMode) { - this.ensureNotFinalized(); - this.#state.flushMode = flushMode; - return this; - } - setFlag(flag) { - this.ensureNotFinalized(); - this.#state.flags.add(flag); - return this; - } - unsetFlag(flag) { - this.ensureNotFinalized(); - this.#state.flags.delete(flag); - return this; - } - hasFlag(flag) { - return this.#state.flags.has(flag); - } - cache(config = true) { - this.ensureNotFinalized(); - this.#state.cache = config; - return this; - } - /** - * Adds index hint to the FROM clause. - */ - indexHint(sql) { - this.ensureNotFinalized(); - this.#state.indexHint = sql; - return this; - } - /** - * Adds COLLATE clause to ORDER BY expressions. - */ - collation(collation) { - this.ensureNotFinalized(); - this.#state.collation = collation; - return this; - } - /** - * Prepend comment to the sql query using the syntax `/* ... *‍/`. Some characters are forbidden such as `/*, *‍/` and `?`. - */ - comment(comment) { - this.ensureNotFinalized(); - this.#state.comments.push(...Utils.asArray(comment)); - return this; - } - /** - * Add hints to the query using comment-like syntax `/*+ ... *‍/`. MySQL and Oracle use this syntax for optimizer hints. - * Also various DB proxies and routers use this syntax to pass hints to alter their behavior. In other dialects the hints - * are ignored as simple comments. - */ - hintComment(comment) { - this.ensureNotFinalized(); - this.#state.hintComments.push(...Utils.asArray(comment)); - return this; - } - from(target, aliasName) { - this.ensureNotFinalized(); - if (target instanceof _a) { - this.fromSubQuery(target, aliasName); - } else if (typeof target === 'string' && !this.metadata.find(target)) { - this.fromRawTable(target, aliasName); - } else { - if (aliasName && this.#state.mainAlias && Utils.className(target) !== this.#state.mainAlias.aliasName) { - throw new Error( - `Cannot override the alias to '${aliasName}' since a query already contains references to '${this.#state.mainAlias.aliasName}'`, - ); - } - this.fromEntityName(target, aliasName); - } - return this; - } - getNativeQuery(processVirtualEntity = true) { - if (this.#state.unionQuery) { - if (!this.#query?.qb) { - this.#query = {}; - const nqb = this.platform.createNativeQueryBuilder(); - nqb.select('*'); - nqb.from(raw(`(${this.#state.unionQuery.sql})`, this.#state.unionQuery.params)); - this.#query.qb = nqb; - } - return this.#query.qb; - } - if (this.#query?.qb) { - return this.#query.qb; - } - this.#query = {}; - this.finalize(); - const qb = this.getQueryBase(processVirtualEntity); - for (const cte of this.#state.ctes) { - const query = cte.query; - const opts = { columns: cte.columns, materialized: cte.materialized }; - if (cte.recursive) { - qb.withRecursive(cte.name, query, opts); - } else { - qb.with(cte.name, query, opts); - } - } - const schema = this.getSchema(this.mainAlias); - const isNotEmptyObject = obj => Utils.hasObjectKeys(obj) || RawQueryFragment.hasObjectFragments(obj); - Utils.runIfNotEmpty( - () => this.helper.appendQueryCondition(this.type, this.#state.cond, qb), - this.#state.cond && !this.#state.onConflict, - ); - Utils.runIfNotEmpty( - () => qb.groupBy(this.prepareFields(this.#state.groupBy, 'groupBy', schema)), - isNotEmptyObject(this.#state.groupBy), - ); - Utils.runIfNotEmpty( - () => this.helper.appendQueryCondition(this.type, this.#state.having, qb, undefined, 'having'), - isNotEmptyObject(this.#state.having), - ); - Utils.runIfNotEmpty(() => { - const queryOrder = this.helper.getQueryOrder( - this.type, - this.#state.orderBy, - this.#state.populateMap, - this.#state.collation, - ); - if (queryOrder.length > 0) { - const sql = Utils.unique(queryOrder).join(', '); - qb.orderBy(sql); - return; - } - }, isNotEmptyObject(this.#state.orderBy)); - Utils.runIfNotEmpty(() => qb.limit(this.#state.limit), this.#state.limit != null); - Utils.runIfNotEmpty(() => qb.offset(this.#state.offset), this.#state.offset); - Utils.runIfNotEmpty(() => qb.comment(this.#state.comments), this.#state.comments); - Utils.runIfNotEmpty(() => qb.hintComment(this.#state.hintComments), this.#state.hintComments); - Utils.runIfNotEmpty( - () => this.helper.appendOnConflictClause(QueryType.UPSERT, this.#state.onConflict, qb), - this.#state.onConflict, - ); - if (this.#state.lockMode) { - this.helper.getLockSQL(qb, this.#state.lockMode, this.#state.lockTables, this.#state.joins); - } - this.processReturningStatement(qb, this.mainAlias.meta, this.#state.data, this.#state.returning); - return (this.#query.qb = qb); - } - processReturningStatement(qb, meta, data, returning) { - const usesReturningStatement = this.platform.usesReturningStatement() || this.platform.usesOutputStatement(); - if (!meta || !data || !usesReturningStatement) { - return; - } - // always respect explicit returning hint - if (returning && returning.length > 0) { - qb.returning(returning.map(field => this.helper.mapper(field, this.type))); - return; - } - if (this.type === QueryType.INSERT) { - const returningProps = meta.hydrateProps - .filter( - prop => - prop.returning || (prop.persist !== false && ((prop.primary && prop.autoincrement) || prop.defaultRaw)), - ) - .filter(prop => !(prop.name in data)); - if (returningProps.length > 0) { - qb.returning(Utils.flatten(returningProps.map(prop => prop.fieldNames))); - } - return; - } - if (this.type === QueryType.UPDATE) { - const returningProps = meta.hydrateProps.filter(prop => prop.fieldNames && isRaw(data[prop.fieldNames[0]])); - if (returningProps.length > 0) { - qb.returning( - returningProps.flatMap(prop => { - if (prop.hasConvertToJSValueSQL) { - const aliased = this.platform.quoteIdentifier(prop.fieldNames[0]); - const sql = - prop.customType.convertToJSValueSQL(aliased, this.platform) + - ' as ' + - this.platform.quoteIdentifier(prop.fieldNames[0]); - return [raw(sql)]; - } - return prop.fieldNames; - }), - ); - } - } - } - /** - * Returns the query with parameters as wildcards. - */ - getQuery() { - return this.toQuery().sql; - } - /** - * Returns raw fragment representation of this QueryBuilder. - */ - toRaw() { - const { sql, params } = this.toQuery(); - return raw(sql, params); - } - toQuery() { - if (this.#state.unionQuery) { - return this.#state.unionQuery; - } - if (this.#query?.sql) { - return { sql: this.#query.sql, params: this.#query.params }; - } - const query = this.getNativeQuery().compile(); - this.#query.sql = query.sql; - this.#query.params = query.params; - return { sql: this.#query.sql, params: this.#query.params }; - } - /** - * Returns the list of all parameters for this query. - */ - getParams() { - return this.toQuery().params; - } - /** - * Returns raw interpolated query string with all the parameters inlined. - */ - getFormattedQuery() { - const query = this.toQuery(); - return this.platform.formatQuery(query.sql, query.params); - } - /** - * @internal - */ - getAliasForJoinPath(path, options) { - if (!path || path === Utils.className(this.mainAlias.entityName)) { - return this.mainAlias.aliasName; - } - const join = typeof path === 'string' ? this.getJoinForPath(path, options) : path; - if (join?.path?.endsWith('[pivot]')) { - return join.alias; - } - return join?.inverseAlias || join?.alias; - } - /** - * @internal - */ - getJoinForPath(path, options) { - const joins = Object.values(this.#state.joins); - if (joins.length === 0) { - return undefined; - } - let join = joins.find(j => j.path === path); - if (options?.preferNoBranch) { - join = joins.find(j => { - return j.path?.replace(/\[\d+]|\[populate]/g, '') === path.replace(/\[\d+]|\[populate]/g, ''); - }); - } - if (!join && options?.ignoreBranching) { - join = joins.find(j => { - return j.path?.replace(/\[\d+]/g, '') === path.replace(/\[\d+]/g, ''); - }); - } - if (!join && options?.matchPopulateJoins && options?.ignoreBranching) { - join = joins.find(j => { - return j.path?.replace(/\[\d+]|\[populate]/g, '') === path.replace(/\[\d+]|\[populate]/g, ''); - }); - } - if (!join && options?.matchPopulateJoins) { - join = joins.find(j => { - return j.path?.replace(/\[populate]/g, '') === path.replace(/\[populate]/g, ''); - }); - } - return join; - } - /** - * @internal - */ - getNextAlias(entityName = 'e') { - entityName = Utils.className(entityName); - return this.driver.config.getNamingStrategy().aliasName(entityName, this.#state.aliasCounter++); - } - /** - * Registers a join for a specific polymorphic target type. - * Used by the driver to create per-target LEFT JOINs for JOINED loading. - * @internal - */ - addPolymorphicJoin(prop, targetMeta, ownerAlias, alias, type, path, schema) { - // Override referencedColumnNames to use the specific target's PK columns - // (polymorphic targets may have different PK column names, e.g. org_id vs user_id) - const referencedColumnNames = targetMeta.getPrimaryProps().flatMap(pk => pk.fieldNames); - const targetProp = { ...prop, targetMeta, referencedColumnNames }; - const aliasedName = `${ownerAlias}.${prop.name}[${targetMeta.className}]#${alias}`; - this.#state.joins[aliasedName] = this.helper.joinManyToOneReference( - targetProp, - ownerAlias, - alias, - type, - {}, - schema, - ); - this.#state.joins[aliasedName].path = path; - this.createAlias(targetMeta.class, alias); - } - /** - * @internal - */ - getAliasMap() { - return Object.fromEntries(Object.entries(this.#state.aliases).map(([key, value]) => [key, value.entityName])); - } - /** - * Executes this QB and returns the raw results, mapped to the property names (unless disabled via last parameter). - * Use `method` to specify what kind of result you want to get (array/single/meta). - */ - async execute(method, options) { - options = typeof options === 'boolean' ? { mapResults: options } : (options ?? {}); - options.mergeResults ??= true; - options.mapResults ??= true; - const isRunType = [QueryType.INSERT, QueryType.UPDATE, QueryType.DELETE, QueryType.TRUNCATE].includes(this.type); - method ??= isRunType ? 'run' : 'all'; - if (!this.connectionType && (isRunType || this.context)) { - this.connectionType = 'write'; - } - if (!this.#state.finalized && method === 'get' && this.type === QueryType.SELECT) { - this.limit(1); - } - const query = this.toQuery(); - const cached = await this.em?.tryCache(this.mainAlias.entityName, this.#state.cache, [ - 'qb.execute', - query.sql, - query.params, - method, - ]); - if (cached?.data !== undefined) { - return cached.data; - } - const loggerContext = { id: this.em?.id, ...this.loggerContext }; - const res = await this.getConnection().execute(query.sql, query.params, method, this.context, loggerContext); - const meta = this.mainAlias.meta; - if (!options.mapResults || !meta) { - await this.em?.storeCache(this.#state.cache, cached, res); - return res; - } - if (method === 'run') { - return res; - } - const joinedProps = this.driver.joinedProps(meta, this.#state.populate); - let mapped; - if (Array.isArray(res)) { - const map = {}; - mapped = res.map(r => this.driver.mapResult(r, meta, this.#state.populate, this, map)); - if (options.mergeResults && joinedProps.length > 0) { - mapped = this.driver.mergeJoinedResult(mapped, this.mainAlias.meta, joinedProps); - } - } else { - mapped = [this.driver.mapResult(res, meta, joinedProps, this)]; - } - if (method === 'get') { - await this.em?.storeCache(this.#state.cache, cached, mapped[0]); - return mapped[0]; - } - await this.em?.storeCache(this.#state.cache, cached, mapped); - return mapped; - } - getConnection() { - const write = !this.platform.getConfig().get('preferReadReplicas'); - const type = this.connectionType || (write ? 'write' : 'read'); - return this.driver.getConnection(type); - } - /** - * Executes the query and returns an async iterable (async generator) that yields results one by one. - * By default, the results are merged and mapped to entity instances, without adding them to the identity map. - * You can disable merging and mapping by passing the options `{ mergeResults: false, mapResults: false }`. - * This is useful for processing large datasets without loading everything into memory at once. - * - * ```ts - * const qb = em.createQueryBuilder(Book, 'b'); - * qb.select('*').where({ title: '1984' }).leftJoinAndSelect('b.author', 'a'); - * - * for await (const book of qb.stream()) { - * // book is an instance of Book entity - * console.log(book.title, book.author.name); - * } - * ``` - */ - async *stream(options) { - options ??= {}; - options.mergeResults ??= true; - options.mapResults ??= true; - const query = this.toQuery(); - const loggerContext = { id: this.em?.id, ...this.loggerContext }; - const res = this.getConnection().stream(query.sql, query.params, this.context, loggerContext); - const meta = this.mainAlias.meta; - if (options.rawResults || !meta) { - yield* res; - return; - } - const joinedProps = this.driver.joinedProps(meta, this.#state.populate); - const stack = []; - const hash = data => { - return Utils.getPrimaryKeyHash(meta.primaryKeys.map(pk => data[pk])); - }; - for await (const row of res) { - const mapped = this.driver.mapResult(row, meta, this.#state.populate, this); - if (!options.mergeResults || joinedProps.length === 0) { - yield this.mapResult(mapped, options.mapResults); - continue; - } - if (stack.length > 0 && hash(stack[stack.length - 1]) !== hash(mapped)) { - const res = this.driver.mergeJoinedResult(stack, this.mainAlias.meta, joinedProps); - for (const row of res) { - yield this.mapResult(row, options.mapResults); - } - stack.length = 0; - } - stack.push(mapped); - } - if (stack.length > 0) { - const merged = this.driver.mergeJoinedResult(stack, this.mainAlias.meta, joinedProps); - yield this.mapResult(merged[0], options.mapResults); - } - } - /** - * Alias for `qb.getResultList()` - */ - async getResult() { - return this.getResultList(); - } - /** - * Executes the query, returning array of results mapped to entity instances. - */ - async getResultList(limit) { - await this.em.tryFlush(this.mainAlias.entityName, { flushMode: this.#state.flushMode }); - const res = await this.execute('all', true); - return this.mapResults(res, limit); - } - propagatePopulateHint(entity, hint) { - helper(entity).__serializationContext.populate = hint.concat(helper(entity).__serializationContext.populate ?? []); - hint.forEach(hint => { - const [propName] = hint.field.split(':', 2); - const value = Reference.unwrapReference(entity[propName]); - if (Utils.isEntity(value)) { - this.propagatePopulateHint(value, hint.children ?? []); - } else if (Utils.isCollection(value)) { - value.populated(); - value.getItems(false).forEach(item => this.propagatePopulateHint(item, hint.children ?? [])); - } - }); - } - mapResult(row, map = true) { - if (!map) { - return row; - } - const entity = this.em.map(this.mainAlias.entityName, row, { schema: this.#state.schema }); - this.propagatePopulateHint(entity, this.#state.populate); - return entity; - } - mapResults(res, limit) { - const entities = []; - for (const row of res) { - const entity = this.mapResult(row); - this.propagatePopulateHint(entity, this.#state.populate); - entities.push(entity); - if (limit != null && --limit === 0) { - break; - } - } - return Utils.unique(entities); - } - /** - * Executes the query, returning the first result or null - */ - async getSingleResult() { - if (!this.#state.finalized) { - this.limit(1); - } - const [res] = await this.getResultList(1); - return res || null; - } - async getCount(field, distinct) { - let res; - if (this.type === QueryType.COUNT) { - res = await this.execute('get', false); - } else { - const qb = this.#state.type === undefined ? this : this.clone(); - qb.processPopulateHint(); // needs to happen sooner so `qb.hasToManyJoins()` reports correctly - qb.count(field, distinct ?? qb.hasToManyJoins()) - .limit(undefined) - .offset(undefined) - .orderBy([]); - res = await qb.execute('get', false); - } - return res ? +res.count : 0; - } - /** - * Executes the query, returning both array of results and total count query (without offset and limit). - */ - async getResultAndCount() { - return [await this.clone().getResultList(), await this.clone().getCount()]; - } - as(aliasOrTargetEntity, alias) { - const qb = this.getNativeQuery(); - let finalAlias = aliasOrTargetEntity; - /* v8 ignore next */ - if (typeof aliasOrTargetEntity === 'string' && aliasOrTargetEntity.includes('.')) { - throw new Error( - 'qb.as(alias) no longer supports target entity name prefix, use qb.as(TargetEntity, key) signature instead', - ); - } - if (alias) { - const meta = this.metadata.get(aliasOrTargetEntity); - /* v8 ignore next */ - finalAlias = meta.properties[alias]?.fieldNames[0] ?? alias; - } - qb.as(finalAlias); - // tag the instance, so it is possible to detect it easily - Object.defineProperty(qb, '__as', { enumerable: false, value: finalAlias }); - return qb; - } - /** - * Combines the current query with one or more other queries using `UNION ALL`. - * All queries must select the same columns. Returns a `QueryBuilder` that - * can be used with `$in`, passed to `qb.from()`, or converted via `.getQuery()`, - * `.getParams()`, `.toQuery()`, `.toRaw()`, etc. - * - * ```ts - * const qb1 = em.createQueryBuilder(Employee).select('id').where(condition1); - * const qb2 = em.createQueryBuilder(Employee).select('id').where(condition2); - * const qb3 = em.createQueryBuilder(Employee).select('id').where(condition3); - * const subquery = qb1.unionAll(qb2, qb3); - * - * const results = await em.find(Employee, { id: { $in: subquery } }); - * ``` - */ - unionAll(...others) { - return this.buildUnionQuery('union all', others); - } - /** - * Combines the current query with one or more other queries using `UNION` (with deduplication). - * All queries must select the same columns. Returns a `QueryBuilder` that - * can be used with `$in`, passed to `qb.from()`, or converted via `.getQuery()`, - * `.getParams()`, `.toQuery()`, `.toRaw()`, etc. - * - * ```ts - * const qb1 = em.createQueryBuilder(Employee).select('id').where(condition1); - * const qb2 = em.createQueryBuilder(Employee).select('id').where(condition2); - * const subquery = qb1.union(qb2); - * - * const results = await em.find(Employee, { id: { $in: subquery } }); - * ``` - */ - union(...others) { - return this.buildUnionQuery('union', others); - } - buildUnionQuery(separator, others) { - const all = [this, ...others]; - const parts = []; - const params = []; - for (const qb of all) { - const compiled = qb instanceof _a ? qb.toQuery() : qb.compile(); - parts.push(`(${compiled.sql})`); - params.push(...compiled.params); - } - const result = this.clone(true); - result.#state.unionQuery = { sql: parts.join(` ${separator} `), params }; - return result; - } - with(name, query, options) { - return this.addCte(name, query, options); - } - withRecursive(name, query, options) { - return this.addCte(name, query, options, true); - } - addCte(name, query, options, recursive) { - this.ensureNotFinalized(); - if (this.#state.ctes.some(cte => cte.name === name)) { - throw new Error(`CTE with name '${name}' already exists`); - } - // Eagerly compile QueryBuilder to RawQueryFragment — later mutations to the sub-query won't be reflected - const compiled = query instanceof _a ? query.toRaw() : query; - this.#state.ctes.push({ - name, - query: compiled, - recursive, - columns: options?.columns, - materialized: options?.materialized, - }); - return this; - } - clone(reset, preserve) { - const qb = new _a( - this.#state.mainAlias.entityName, - this.metadata, - this.driver, - this.context, - this.#state.mainAlias.aliasName, - this.connectionType, - this.em, - ); - if (reset !== true) { - qb.#state = Utils.copy(this.#state); - // CTEs contain NativeQueryBuilder instances that should not be deep-cloned - qb.#state.ctes = this.#state.ctes.map(cte => ({ ...cte })); - if (Array.isArray(reset)) { - const fresh = _a.createDefaultState(); - for (const key of reset) { - qb.#state[key] = fresh[key]; - } - } - } else if (preserve) { - for (const key of preserve) { - qb.#state[key] = Utils.copy(this.#state[key]); - } - } - qb.#state.finalized = false; - qb.#query = undefined; - qb.#helper = qb.createQueryBuilderHelper(); - return qb; - } - /** - * Sets logger context for this query builder. - */ - setLoggerContext(context) { - this.loggerContext = context; - } - /** - * Gets logger context for this query builder. - */ - getLoggerContext() { - this.loggerContext ??= {}; - return this.loggerContext; - } - fromVirtual(meta) { - if (typeof meta.expression === 'string') { - return `(${meta.expression}) as ${this.platform.quoteIdentifier(this.alias)}`; - } - const res = meta.expression(this.em, this.#state.cond, {}); - if (typeof res === 'string') { - return `(${res}) as ${this.platform.quoteIdentifier(this.alias)}`; - } - if (res instanceof _a) { - return `(${res.getFormattedQuery()}) as ${this.platform.quoteIdentifier(this.alias)}`; - } - if (isRaw(res)) { - const query = this.platform.formatQuery(res.sql, res.params); - return `(${query}) as ${this.platform.quoteIdentifier(this.alias)}`; - } - /* v8 ignore next */ - return res; - } - /** - * Adds a join from a property object. Used internally for TPT joins where the property - * is synthetic (not in entity.properties) but defined on metadata (e.g., tptParentProp). - * The caller must create the alias first via createAlias(). - * @internal - */ - addPropertyJoin(prop, ownerAlias, alias, type, path, schema) { - schema ??= prop.targetMeta?.schema === '*' ? '*' : this.driver.getSchemaName(prop.targetMeta); - const key = `[tpt]${ownerAlias}#${alias}`; - this.#state.joins[key] = - prop.kind === ReferenceKind.MANY_TO_ONE - ? this.helper.joinManyToOneReference(prop, ownerAlias, alias, type, {}, schema) - : this.helper.joinOneToReference(prop, ownerAlias, alias, type, {}, schema); - this.#state.joins[key].path = path; - return key; - } - joinReference(field, alias, cond, type, path, schema, subquery) { - this.ensureNotFinalized(); - if (typeof field === 'object') { - const prop = { - name: '__subquery__', - kind: ReferenceKind.MANY_TO_ONE, - }; - if (field instanceof _a) { - prop.type = Utils.className(field.mainAlias.entityName); - prop.targetMeta = field.mainAlias.meta; - field = field.getNativeQuery(); - } - if (isRaw(field)) { - field = this.platform.formatQuery(field.sql, field.params); - } - const key = `${this.alias}.${prop.name}#${alias}`; - this.#state.joins[key] = { - prop, - alias, - type, - cond, - schema, - subquery: field.toString(), - ownerAlias: this.alias, - }; - return { prop, key }; - } - if (!subquery && type.includes('lateral')) { - throw new Error(`Lateral join can be used only with a sub-query.`); - } - const [fromAlias, fromField] = this.helper.splitField(field); - const q = str => `'${str}'`; - if (!this.#state.aliases[fromAlias]) { - throw new Error( - `Trying to join ${q(fromField)} with alias ${q(fromAlias)}, but ${q(fromAlias)} is not a known alias. Available aliases are: ${Object.keys(this.#state.aliases).map(q).join(', ')}.`, - ); - } - const entityName = this.#state.aliases[fromAlias].entityName; - const meta = this.metadata.get(entityName); - const prop = meta.properties[fromField]; - if (!prop) { - throw new Error( - `Trying to join ${q(field)}, but ${q(fromField)} is not a defined relation on ${meta.className}.`, - ); - } - // For TPT inheritance, owning relations (M:1 and owning 1:1) may have FK columns in a parent table - // Resolve the correct alias for the table that owns the FK column - const ownerAlias = - prop.kind === ReferenceKind.MANY_TO_ONE || (prop.kind === ReferenceKind.ONE_TO_ONE && prop.owner) - ? this.helper.getTPTAliasForProperty(fromField, fromAlias) - : fromAlias; - this.createAlias(prop.targetMeta.class, alias); - cond = QueryHelper.processWhere({ - where: cond, - entityName: this.mainAlias.entityName, - metadata: this.metadata, - platform: this.platform, - aliasMap: this.getAliasMap(), - aliased: [QueryType.SELECT, QueryType.COUNT].includes(this.type), - }); - const criteriaNode = CriteriaNodeFactory.createNode(this.metadata, prop.targetMeta.class, cond); - cond = criteriaNode.process(this, { ignoreBranching: true, alias }); - let aliasedName = `${fromAlias}.${prop.name}#${alias}`; - path ??= `${Object.values(this.#state.joins).find(j => j.alias === fromAlias)?.path ?? Utils.className(entityName)}.${prop.name}`; - if (prop.kind === ReferenceKind.ONE_TO_MANY) { - this.#state.joins[aliasedName] = this.helper.joinOneToReference(prop, fromAlias, alias, type, cond, schema); - this.#state.joins[aliasedName].path ??= path; - } else if (prop.kind === ReferenceKind.MANY_TO_MANY) { - let pivotAlias = alias; - if (type !== JoinType.pivotJoin) { - const oldPivotAlias = this.getAliasForJoinPath(path + '[pivot]'); - pivotAlias = oldPivotAlias ?? this.getNextAlias(prop.pivotEntity); - aliasedName = `${fromAlias}.${prop.name}#${pivotAlias}`; - } - const joins = this.helper.joinManyToManyReference(prop, fromAlias, alias, pivotAlias, type, cond, path, schema); - Object.assign(this.#state.joins, joins); - this.createAlias(prop.pivotEntity, pivotAlias); - this.#state.joins[aliasedName].path ??= path; - aliasedName = Object.keys(joins)[1]; - } else if (prop.kind === ReferenceKind.ONE_TO_ONE) { - this.#state.joins[aliasedName] = this.helper.joinOneToReference(prop, ownerAlias, alias, type, cond, schema); - this.#state.joins[aliasedName].path ??= path; - } else { - // MANY_TO_ONE - this.#state.joins[aliasedName] = this.helper.joinManyToOneReference(prop, ownerAlias, alias, type, cond, schema); - this.#state.joins[aliasedName].path ??= path; - } - return { prop, key: aliasedName }; - } - prepareFields(fields, type = 'where', schema) { - const ret = []; - const getFieldName = (name, customAlias) => { - const alias = customAlias ?? (type === 'groupBy' ? null : undefined); - return this.helper.mapper(name, this.type, undefined, alias, schema); - }; - fields.forEach(originalField => { - if (typeof originalField !== 'string') { - ret.push(originalField); - return; - } - // Strip 'as alias' suffix if present — the alias is passed to mapper at the end - let field = originalField; - let customAlias; - const asMatch = FIELD_ALIAS_RE.exec(originalField); - if (asMatch) { - field = asMatch[1].trim(); - customAlias = asMatch[2]; - } - const join = Object.keys(this.#state.joins).find(k => field === k.substring(0, k.indexOf('#'))); - if (join && type === 'where') { - ret.push(...this.helper.mapJoinColumns(this.type, this.#state.joins[join])); - return; - } - const [a, f] = this.helper.splitField(field); - const prop = this.helper.getProperty(f, a); - /* v8 ignore next */ - if (prop && [ReferenceKind.ONE_TO_MANY, ReferenceKind.MANY_TO_MANY].includes(prop.kind)) { - return; - } - if (prop?.persist === false && !prop.embedded && !prop.formula && type === 'where') { - return; - } - if (prop?.embedded || (prop?.kind === ReferenceKind.EMBEDDED && prop.object)) { - const name = prop.embeddedPath?.join('.') ?? prop.fieldNames[0]; - const aliased = this.#state.aliases[a] ? `${a}.${name}` : name; - ret.push(getFieldName(aliased, customAlias)); - return; - } - if (prop?.kind === ReferenceKind.EMBEDDED) { - if (customAlias) { - throw new Error( - `Cannot use 'as ${customAlias}' alias on embedded property '${field}' because it expands to multiple columns. Alias individual fields instead (e.g. '${field}.propertyName as ${customAlias}').`, - ); - } - const nest = prop => { - for (const childProp of Object.values(prop.embeddedProps)) { - if ( - childProp.fieldNames && - (childProp.kind !== ReferenceKind.EMBEDDED || childProp.object) && - childProp.persist !== false - ) { - ret.push(getFieldName(childProp.fieldNames[0])); - } else { - nest(childProp); - } - } - }; - nest(prop); - return; - } - if (prop && prop.fieldNames.length > 1 && !prop.fieldNames.includes(f)) { - if (customAlias) { - throw new Error( - `Cannot use 'as ${customAlias}' alias on '${field}' because it expands to multiple columns (${prop.fieldNames.join(', ')}).`, - ); - } - ret.push(...prop.fieldNames.map(f => getFieldName(f))); - return; - } - ret.push(getFieldName(field, customAlias)); - }); - const requiresSQLConversion = this.mainAlias.meta.props.filter( - p => p.hasConvertToJSValueSQL && p.persist !== false, - ); - if ( - this.#state.flags.has(QueryFlag.CONVERT_CUSTOM_TYPES) && - (fields.includes('*') || fields.includes(`${this.mainAlias.aliasName}.*`)) && - requiresSQLConversion.length > 0 - ) { - for (const p of requiresSQLConversion) { - ret.push(this.helper.mapper(p.name, this.type)); - } - } - for (const f of Object.keys(this.#state.populateMap)) { - if (type === 'where' && this.#state.joins[f]) { - ret.push(...this.helper.mapJoinColumns(this.type, this.#state.joins[f])); - } - } - return Utils.unique(ret); - } - /** - * Resolves nested paths like `a.books.title` to their actual field references. - * Auto-joins relations as needed and returns `{alias}.{field}`. - * For embeddeds: navigates into flattened embeddeds to return the correct field name. - */ - resolveNestedPath(field) { - if (typeof field !== 'string' || !field.includes('.')) { - return field; - } - const parts = field.split('.'); - // Simple alias.property case - let prepareFields handle it - if (parts.length === 2 && this.#state.aliases[parts[0]]) { - return field; - } - // Start with root alias - let currentAlias = parts[0]; - let currentMeta = this.#state.aliases[currentAlias] - ? this.metadata.get(this.#state.aliases[currentAlias].entityName) - : this.mainAlias.meta; - // If first part is not an alias, it's a property of the main entity - if (!this.#state.aliases[currentAlias]) { - currentAlias = this.mainAlias.aliasName; - parts.unshift(currentAlias); - } - // Walk through the path parts (skip the alias) - for (let i = 1; i < parts.length; i++) { - const propName = parts[i]; - const prop = currentMeta.properties[propName]; - if (!prop) { - return field; // Unknown property, return as-is for raw SQL support - } - const isLastPart = i === parts.length - 1; - // Handle embedded properties - navigate into flattened embeddeds - if (prop.kind === ReferenceKind.EMBEDDED) { - if (prop.object) { - return `${currentAlias}.${propName}`; - } - // Navigate through remaining path to find the leaf property - const remainingPath = parts.slice(i + 1); - let embeddedProp = prop; - for (const part of remainingPath) { - embeddedProp = embeddedProp?.embeddedProps?.[part]; - if (embeddedProp?.object && embeddedProp.fieldNames?.[0]) { - return `${currentAlias}.${embeddedProp.fieldNames[0]}`; - } - } - return `${currentAlias}.${embeddedProp?.fieldNames?.[0] ?? propName}`; - } - // Handle relations - auto-join if not the last part - if ( - prop.kind === ReferenceKind.MANY_TO_ONE || - prop.kind === ReferenceKind.ONE_TO_ONE || - prop.kind === ReferenceKind.ONE_TO_MANY || - prop.kind === ReferenceKind.MANY_TO_MANY - ) { - if (isLastPart) { - return `${currentAlias}.${propName}`; - } - // Find existing join or create new one - const joinPath = parts.slice(0, i + 1).join('.'); - const existingJoinKey = Object.keys(this.#state.joins).find(k => { - const join = this.#state.joins[k]; - // Check by path or by key prefix (key format is `alias.field#joinAlias`) - return join.path === joinPath || k.startsWith(`${currentAlias}.${propName}#`); - }); - let joinAlias; - if (existingJoinKey) { - joinAlias = this.#state.joins[existingJoinKey].alias; - } else { - joinAlias = this.getNextAlias(prop.targetMeta?.className ?? propName); - this.join(`${currentAlias}.${propName}`, joinAlias, {}, JoinType.leftJoin); - } - currentAlias = joinAlias; - currentMeta = prop.targetMeta; - continue; - } - // Scalar property - return it (if not last part, it's an invalid path but let SQL handle it) - return `${currentAlias}.${propName}`; - } - return field; - } - init(type, data, cond) { - this.ensureNotFinalized(); - this.#state.type = type; - if ([QueryType.UPDATE, QueryType.DELETE].includes(type) && Utils.hasObjectKeys(this.#state.cond)) { - throw new Error( - `You are trying to call \`qb.where().${type.toLowerCase()}()\`. Calling \`qb.${type.toLowerCase()}()\` before \`qb.where()\` is required.`, - ); - } - if (!this.helper.isTableNameAliasRequired(type)) { - this.#state.fields = undefined; - } - if (data) { - if (Utils.isEntity(data)) { - data = this.em?.getComparator().prepareEntity(data) ?? serialize(data); - } - this.#state.data = this.helper.processData(data, this.#state.flags.has(QueryFlag.CONVERT_CUSTOM_TYPES), false); - } - if (cond) { - this.where(cond); - } - return this; - } - getQueryBase(processVirtualEntity) { - const qb = this.platform.createNativeQueryBuilder().setFlags(this.#state.flags); - const { subQuery, aliasName, entityName, meta, rawTableName } = this.mainAlias; - const requiresAlias = - this.#state.finalized && (this.#state.explicitAlias || this.helper.isTableNameAliasRequired(this.type)); - const alias = requiresAlias ? aliasName : undefined; - const schema = this.getSchema(this.mainAlias); - const tableName = rawTableName - ? rawTableName - : subQuery instanceof NativeQueryBuilder - ? subQuery.as(aliasName) - : subQuery - ? raw(`(${subQuery.sql}) as ${this.platform.quoteIdentifier(aliasName)}`, subQuery.params) - : this.helper.getTableName(entityName); - const joinSchema = this.#state.schema ?? this.em?.schema ?? schema; - const schemaOverride = this.#state.schema ?? this.em?.schema; - if (meta.virtual && processVirtualEntity) { - qb.from(raw(this.fromVirtual(meta)), { indexHint: this.#state.indexHint }); - } else { - qb.from(tableName, { - schema: rawTableName ? undefined : schema, - alias, - indexHint: this.#state.indexHint, - }); - } - switch (this.type) { - case QueryType.SELECT: - qb.select(this.prepareFields(this.#state.fields, 'where', schema)); - if (this.#state.distinctOn) { - qb.distinctOn(this.prepareFields(this.#state.distinctOn, 'where', schema)); - } else if (this.#state.flags.has(QueryFlag.DISTINCT)) { - qb.distinct(); - } - this.helper.processJoins(qb, this.#state.joins, joinSchema, schemaOverride); - break; - case QueryType.COUNT: { - const fields = this.#state.fields.map(f => this.helper.mapper(f, this.type, undefined, undefined, schema)); - qb.count(fields, this.#state.flags.has(QueryFlag.DISTINCT)); - this.helper.processJoins(qb, this.#state.joins, joinSchema, schemaOverride); - break; - } - case QueryType.INSERT: - qb.insert(this.#state.data); - break; - case QueryType.UPDATE: - qb.update(this.#state.data); - this.helper.processJoins(qb, this.#state.joins, joinSchema, schemaOverride); - this.helper.updateVersionProperty(qb, this.#state.data); - break; - case QueryType.DELETE: - qb.delete(); - break; - case QueryType.TRUNCATE: - qb.truncate(); - break; - } - return qb; - } - applyDiscriminatorCondition() { - const meta = this.mainAlias.meta; - if (meta.root.inheritanceType !== 'sti' || !meta.discriminatorValue) { - return; - } - const types = Object.values(meta.root.discriminatorMap).map(cls => this.metadata.get(cls)); - const children = []; - const lookUpChildren = (ret, type) => { - const children = types.filter(meta2 => meta2.extends === type); - children.forEach(m => lookUpChildren(ret, m.class)); - ret.push(...children.filter(c => c.discriminatorValue)); - return children; - }; - lookUpChildren(children, meta.class); - this.andWhere({ - [meta.root.discriminatorColumn]: - children.length > 0 - ? { $in: [meta.discriminatorValue, ...children.map(c => c.discriminatorValue)] } - : meta.discriminatorValue, - }); - } - /** - * Ensures TPT joins are applied. Can be called early before finalize() to populate - * the _tptAlias map for use in join resolution. Safe to call multiple times. - * @internal - */ - ensureTPTJoins() { - this.applyTPTJoins(); - } - /** - * For TPT (Table-Per-Type) inheritance: INNER JOINs parent tables. - * When querying a child entity, we need to join all parent tables. - * Field selection is handled separately in addTPTParentFields(). - */ - applyTPTJoins() { - const meta = this.mainAlias.meta; - if ( - meta?.inheritanceType !== 'tpt' || - !meta.tptParent || - ![QueryType.SELECT, QueryType.COUNT].includes(this.type) - ) { - return; - } - if (this.#state.tptJoinsApplied) { - return; - } - this.#state.tptJoinsApplied = true; - let childMeta = meta; - let childAlias = this.mainAlias.aliasName; - while (childMeta.tptParent) { - const parentMeta = childMeta.tptParent; - const parentAlias = this.getNextAlias(parentMeta.className); - this.createAlias(parentMeta.class, parentAlias); - this.#state.tptAlias[parentMeta.className] = parentAlias; - this.addPropertyJoin( - childMeta.tptParentProp, - childAlias, - parentAlias, - JoinType.innerJoin, - `[tpt]${childMeta.className}`, - ); - childMeta = parentMeta; - childAlias = parentAlias; - } - } - /** - * For TPT inheritance: adds field selections from parent tables. - */ - addTPTParentFields() { - const meta = this.mainAlias.meta; - if ( - meta?.inheritanceType !== 'tpt' || - !meta.tptParent || - ![QueryType.SELECT, QueryType.COUNT].includes(this.type) - ) { - return; - } - if (!this.#state.fields?.includes('*') && !this.#state.fields?.includes(`${this.mainAlias.aliasName}.*`)) { - return; - } - let parentMeta = meta.tptParent; - while (parentMeta) { - const parentAlias = this.#state.tptAlias[parentMeta.className]; - if (parentAlias) { - const schema = parentMeta.schema === '*' ? '*' : this.driver.getSchemaName(parentMeta); - parentMeta.ownProps - .filter(prop => this.platform.shouldHaveColumn(prop, [])) - .forEach(prop => - this.#state.fields.push(...this.driver.mapPropToFieldNames(this, prop, parentAlias, parentMeta, schema)), - ); - } - parentMeta = parentMeta.tptParent; - } - } - /** - * For TPT polymorphic queries: LEFT JOINs all child tables when querying a TPT base class. - * Adds discriminator and child fields to determine and load the concrete type. - */ - applyTPTPolymorphicJoins() { - const meta = this.mainAlias.meta; - const descendants = meta?.allTPTDescendants; - if (!descendants?.length || ![QueryType.SELECT, QueryType.COUNT].includes(this.type)) { - return; - } - if (!this.#state.fields?.includes('*') && !this.#state.fields?.includes(`${this.mainAlias.aliasName}.*`)) { - return; - } - // LEFT JOIN each descendant table and add their fields - for (const childMeta of descendants) { - const childAlias = this.getNextAlias(childMeta.className); - this.createAlias(childMeta.class, childAlias); - this.#state.tptAlias[childMeta.className] = childAlias; - this.addPropertyJoin( - childMeta.tptInverseProp, - this.mainAlias.aliasName, - childAlias, - JoinType.leftJoin, - `[tpt]${meta.className}`, - ); - // Add child fields - const schema = childMeta.schema === '*' ? '*' : this.driver.getSchemaName(childMeta); - childMeta.ownProps - .filter(prop => !prop.primary && this.platform.shouldHaveColumn(prop, [])) - .forEach(prop => - this.#state.fields.push(...this.driver.mapPropToFieldNames(this, prop, childAlias, childMeta, schema)), - ); - } - // Add computed discriminator (CASE WHEN to determine concrete type) - // descendants is pre-sorted by depth (deepest first) during discovery - if (meta.tptDiscriminatorColumn) { - this.#state.fields.push( - this.driver.buildTPTDiscriminatorExpression(meta, descendants, this.#state.tptAlias, this.mainAlias.aliasName), - ); - } - } - finalize() { - if (this.#state.finalized) { - return; - } - if (!this.#state.type) { - this.select('*'); - } - const meta = this.mainAlias.meta; - this.applyDiscriminatorCondition(); - this.applyTPTJoins(); - this.addTPTParentFields(); - this.applyTPTPolymorphicJoins(); - this.processPopulateHint(); - this.processNestedJoins(); - if (meta && (this.#state.fields?.includes('*') || this.#state.fields?.includes(`${this.mainAlias.aliasName}.*`))) { - const schema = this.getSchema(this.mainAlias); - // Create a column mapping with unquoted aliases - quoting should be handled by the user via `quote` helper - // For TPT, use helper to resolve correct alias per property (inherited props use parent alias) - const quotedMainAlias = this.platform.quoteIdentifier(this.mainAlias.aliasName).toString(); - const columns = meta.createColumnMappingObject( - prop => this.helper.getTPTAliasForProperty(prop.name, this.mainAlias.aliasName), - quotedMainAlias, - ); - meta.props - .filter(prop => prop.formula && (!prop.lazy || this.#state.flags.has(QueryFlag.INCLUDE_LAZY_FORMULAS))) - .map(prop => { - const aliased = this.platform.quoteIdentifier(prop.fieldNames[0]); - const table = this.helper.createFormulaTable(quotedMainAlias, meta, schema); - return `${this.driver.evaluateFormula(prop.formula, columns, table)} as ${aliased}`; - }) - .filter( - field => - !this.#state.fields.some(f => { - if (isRaw(f)) { - return f.sql === field && f.params.length === 0; - } - return f === field; - }), - ) - .forEach(field => this.#state.fields.push(raw(field))); - } - QueryHelper.processObjectParams(this.#state.data); - QueryHelper.processObjectParams(this.#state.cond); - QueryHelper.processObjectParams(this.#state.having); - // automatically enable paginate flag when we detect to-many joins, but only if there is no `group by` clause - if ( - !this.#state.flags.has(QueryFlag.DISABLE_PAGINATE) && - this.#state.groupBy.length === 0 && - this.hasToManyJoins() - ) { - this.#state.flags.add(QueryFlag.PAGINATE); - } - if ( - meta && - !meta.virtual && - this.#state.flags.has(QueryFlag.PAGINATE) && - !this.#state.flags.has(QueryFlag.DISABLE_PAGINATE) && - (this.#state.limit > 0 || this.#state.offset > 0) - ) { - this.wrapPaginateSubQuery(meta); - } - if ( - meta && - (this.#state.flags.has(QueryFlag.UPDATE_SUB_QUERY) || this.#state.flags.has(QueryFlag.DELETE_SUB_QUERY)) - ) { - this.wrapModifySubQuery(meta); - } - this.#state.finalized = true; - } - /** @internal */ - processPopulateHint() { - if (this.#state.populateHintFinalized) { - return; - } - const meta = this.mainAlias.meta; - if (meta && this.#state.flags.has(QueryFlag.AUTO_JOIN_ONE_TO_ONE_OWNER)) { - const relationsToPopulate = this.#state.populate.map(({ field }) => field); - meta.relations - .filter( - prop => - prop.kind === ReferenceKind.ONE_TO_ONE && - !prop.owner && - !relationsToPopulate.includes(prop.name) && - !relationsToPopulate.includes(`${prop.name}:ref`), - ) - .map(prop => ({ field: `${prop.name}:ref` })) - .forEach(item => this.#state.populate.push(item)); - } - this.#state.populate.forEach(({ field }) => { - const [fromAlias, fromField] = this.helper.splitField(field); - const aliasedField = `${fromAlias}.${fromField}`; - const join = Object.keys(this.#state.joins).find(k => `${aliasedField}#${this.#state.joins[k].alias}` === k); - if (join && this.#state.joins[join] && this.helper.isOneToOneInverse(fromField)) { - this.#state.populateMap[join] = this.#state.joins[join].alias; - return; - } - if (meta && this.helper.isOneToOneInverse(fromField)) { - const prop = meta.properties[fromField]; - const alias = this.getNextAlias(prop.pivotEntity ?? prop.targetMeta.class); - const aliasedName = `${fromAlias}.${prop.name}#${alias}`; - this.#state.joins[aliasedName] = this.helper.joinOneToReference( - prop, - this.mainAlias.aliasName, - alias, - JoinType.leftJoin, - ); - this.#state.joins[aliasedName].path = - `${Object.values(this.#state.joins).find(j => j.alias === fromAlias)?.path ?? meta.className}.${prop.name}`; - this.#state.populateMap[aliasedName] = this.#state.joins[aliasedName].alias; - this.createAlias(prop.targetMeta.class, alias); - } - }); - this.processPopulateWhere(false); - this.processPopulateWhere(true); - this.#state.populateHintFinalized = true; - } - processPopulateWhere(filter) { - const value = filter ? this.#state.populateFilter : this.#state.populateWhere; - if (value == null || value === PopulateHint.ALL) { - return; - } - let joins = Object.values(this.#state.joins); - for (const join of joins) { - join.cond_ ??= join.cond; - join.cond = { ...join.cond }; - } - if (typeof value === 'object') { - const cond = CriteriaNodeFactory.createNode(this.metadata, this.mainAlias.entityName, value).process(this, { - matchPopulateJoins: true, - ignoreBranching: true, - preferNoBranch: true, - filter, - }); - // there might be new joins created by processing the `populateWhere` object - joins = Object.values(this.#state.joins); - this.mergeOnConditions(joins, cond, filter); - } - } - mergeOnConditions(joins, cond, filter, op) { - for (const k of Object.keys(cond)) { - if (Utils.isOperator(k)) { - if (Array.isArray(cond[k])) { - cond[k].forEach(c => this.mergeOnConditions(joins, c, filter, k)); - } - /* v8 ignore next */ - this.mergeOnConditions(joins, cond[k], filter, k); - } - const [alias] = this.helper.splitField(k); - const join = joins.find(j => j.alias === alias); - if (join) { - const parentJoin = joins.find(j => j.alias === join.ownerAlias); - // https://stackoverflow.com/a/56815807/3665878 - if (parentJoin && !filter) { - const nested = (parentJoin.nested ??= new Set()); - join.type = - join.type === JoinType.innerJoin || - [ReferenceKind.ONE_TO_MANY, ReferenceKind.MANY_TO_MANY].includes(parentJoin.prop.kind) - ? JoinType.nestedInnerJoin - : JoinType.nestedLeftJoin; - nested.add(join); - } - if (join.cond[k]) { - /* v8 ignore next */ - join.cond = { [op ?? '$and']: [join.cond, { [k]: cond[k] }] }; - } else if (op === '$or') { - join.cond.$or ??= []; - join.cond.$or.push({ [k]: cond[k] }); - } else { - join.cond = { ...join.cond, [k]: cond[k] }; - } - } - } - } - /** - * When adding an inner join on a left joined relation, we need to nest them, - * otherwise the inner join could discard rows of the root table. - */ - processNestedJoins() { - if (this.#state.flags.has(QueryFlag.DISABLE_NESTED_INNER_JOIN)) { - return; - } - const joins = Object.values(this.#state.joins); - const lookupParentGroup = j => { - return j.nested ?? (j.parent ? lookupParentGroup(j.parent) : undefined); - }; - for (const join of joins) { - if (join.type === JoinType.innerJoin) { - join.parent = joins.find(j => j.alias === join.ownerAlias); - // https://stackoverflow.com/a/56815807/3665878 - if (join.parent?.type === JoinType.leftJoin || join.parent?.type === JoinType.nestedLeftJoin) { - const nested = (join.parent.nested ??= new Set()); - join.type = join.type === JoinType.innerJoin ? JoinType.nestedInnerJoin : JoinType.nestedLeftJoin; - nested.add(join); - } else if (join.parent?.type === JoinType.nestedInnerJoin) { - const group = lookupParentGroup(join.parent); - const nested = group ?? (join.parent.nested ??= new Set()); - join.type = join.type === JoinType.innerJoin ? JoinType.nestedInnerJoin : JoinType.nestedLeftJoin; - nested.add(join); - } - } - } - } - hasToManyJoins() { - return Object.values(this.#state.joins).some(join => { - return [ReferenceKind.ONE_TO_MANY, ReferenceKind.MANY_TO_MANY].includes(join.prop.kind); - }); - } - wrapPaginateSubQuery(meta) { - const schema = this.getSchema(this.mainAlias); - const pks = this.prepareFields(meta.primaryKeys, 'sub-query', schema); - const subQuery = this.clone(['orderBy', 'fields', 'lockMode', 'lockTables']) - .select(pks) - .groupBy(pks) - .limit(this.#state.limit); - // revert the on conditions added via populateWhere, we want to apply those only once - for (const join of Object.values(subQuery.#state.joins)) { - if (join.cond_) { - join.cond = join.cond_; - } - } - if (this.#state.offset) { - subQuery.offset(this.#state.offset); - } - const addToSelect = []; - if (this.#state.orderBy.length > 0) { - const orderBy = []; - for (const orderMap of this.#state.orderBy) { - for (const field of Utils.getObjectQueryKeys(orderMap)) { - const direction = orderMap[field]; - if (RawQueryFragment.isKnownFragmentSymbol(field)) { - orderBy.push({ [field]: direction }); - continue; - } - const [a, f] = this.helper.splitField(field); - const prop = this.helper.getProperty(f, a); - const type = this.platform.castColumn(prop); - const fieldName = this.helper.mapper(field, this.type, undefined, null); - if (!prop?.persist && !prop?.formula && !prop?.hasConvertToJSValueSQL && !pks.includes(fieldName)) { - addToSelect.push(fieldName); - } - const quoted = this.platform.quoteIdentifier(fieldName); - const key = raw(`min(${quoted}${type})`); - orderBy.push({ [key]: direction }); - } - } - subQuery.orderBy(orderBy); - } - subQuery.#state.finalized = true; - const innerQuery = subQuery.as(this.mainAlias.aliasName).clear('select').select(pks); - if (addToSelect.length > 0) { - addToSelect.forEach(prop => { - const field = this.#state.fields.find(field => { - if (typeof field === 'object' && field && '__as' in field) { - return field.__as === prop; - } - if (isRaw(field)) { - // not perfect, but should work most of the time, ideally we should check only the alias (`... as alias`) - return field.sql.includes(prop); - } - return false; - }); - /* v8 ignore next */ - if (isRaw(field)) { - innerQuery.select(field); - } else if (field instanceof NativeQueryBuilder) { - innerQuery.select(field.toRaw()); - } else if (field) { - innerQuery.select(field); - } - }); - } - // multiple sub-queries are needed to get around mysql limitations with order by + limit + where in + group by (o.O) - // https://stackoverflow.com/questions/17892762/mysql-this-version-of-mysql-doesnt-yet-support-limit-in-all-any-some-subqu - const subSubQuery = this.platform.createNativeQueryBuilder(); - subSubQuery.select(pks).from(innerQuery); - this.#state.limit = undefined; - this.#state.offset = undefined; - // Save the original WHERE conditions before pruning joins - const originalCond = this.#state.cond; - const populatePaths = this.getPopulatePaths(); - if (!this.#state.fields.some(field => isRaw(field))) { - this.pruneJoinsForPagination(meta, populatePaths); - } - // Transfer WHERE conditions to ORDER BY joins (GH #6160) - this.transferConditionsForOrderByJoins(meta, originalCond, populatePaths); - const { sql, params } = subSubQuery.compile(); - this.select(this.#state.fields).where({ - [Utils.getPrimaryKeyHash(meta.primaryKeys)]: { $in: raw(sql, params) }, - }); - } - /** - * Computes the set of populate paths from the _populate hints. - */ - getPopulatePaths() { - const paths = new Set(); - function addPath(hints, prefix = '') { - for (const hint of hints) { - const field = hint.field.split(':')[0]; - const fullPath = prefix ? prefix + '.' + field : field; - paths.add(fullPath); - if (hint.children) { - addPath(hint.children, fullPath); - } - } - } - addPath(this.#state.populate); - return paths; - } - normalizeJoinPath(join, meta) { - return join.path?.replace(/\[populate]|\[pivot]|:ref/g, '').replace(new RegExp(`^${meta.className}.`), '') ?? ''; - } - /** - * Transfers WHERE conditions to ORDER BY joins that are not used for population. - * This ensures the outer query's ORDER BY uses the same filtered rows as the subquery. - * GH #6160 - */ - transferConditionsForOrderByJoins(meta, cond, populatePaths) { - if (!cond || this.#state.orderBy.length === 0) { - return; - } - const orderByAliases = new Set( - this.#state.orderBy - .flatMap(hint => Object.keys(hint)) - .filter(k => !RawQueryFragment.isKnownFragmentSymbol(k)) - .map(k => k.split('.')[0]), - ); - for (const join of Object.values(this.#state.joins)) { - const joinPath = this.normalizeJoinPath(join, meta); - const isPopulateJoin = populatePaths.has(joinPath); - // Only transfer conditions for joins used for ORDER BY but not for population - if (orderByAliases.has(join.alias) && !isPopulateJoin) { - this.transferConditionsToJoin(cond, join); - } - } - } - /** - * Removes joins that are not used for population or ordering to improve performance. - */ - pruneJoinsForPagination(meta, populatePaths) { - const orderByAliases = this.#state.orderBy.flatMap(hint => Object.keys(hint)).map(k => k.split('.')[0]); - const joins = Object.entries(this.#state.joins); - const rootAlias = this.alias; - function addParentAlias(alias) { - const join = joins.find(j => j[1].alias === alias); - if (join && join[1].ownerAlias !== rootAlias) { - orderByAliases.push(join[1].ownerAlias); - addParentAlias(join[1].ownerAlias); - } - } - for (const orderByAlias of orderByAliases) { - addParentAlias(orderByAlias); - } - for (const [key, join] of joins) { - const path = this.normalizeJoinPath(join, meta); - if (!populatePaths.has(path) && !orderByAliases.includes(join.alias)) { - delete this.#state.joins[key]; - } - } - } - /** - * Transfers WHERE conditions that reference a join alias to the join's ON clause. - * This is needed when a join is kept for ORDER BY after pagination wrapping, - * so the outer query orders by the same filtered rows as the subquery. - * @internal - */ - transferConditionsToJoin(cond, join, path = '') { - const aliasPrefix = join.alias + '.'; - for (const key of Object.keys(cond)) { - const value = cond[key]; - // Handle $and/$or operators - recurse into nested conditions - if (key === '$and' || key === '$or') { - if (Array.isArray(value)) { - for (const item of value) { - this.transferConditionsToJoin(item, join, path); - } - } - continue; - } - // Check if this condition references the join alias - if (key.startsWith(aliasPrefix)) { - // Add condition to the join's ON clause - join.cond[key] = value; - } - } - } - wrapModifySubQuery(meta) { - const subQuery = this.clone(); - subQuery.#state.finalized = true; - // wrap one more time to get around MySQL limitations - // https://stackoverflow.com/questions/45494/mysql-error-1093-cant-specify-target-table-for-update-in-from-clause - const subSubQuery = this.platform.createNativeQueryBuilder(); - const method = this.#state.flags.has(QueryFlag.UPDATE_SUB_QUERY) ? 'update' : 'delete'; - const schema = this.getSchema(this.mainAlias); - const pks = this.prepareFields(meta.primaryKeys, 'sub-query', schema); - this.#state.cond = {}; // otherwise we would trigger validation error - this.#state.joins = {}; // included in the subquery - subSubQuery.select(pks).from(subQuery.as(this.mainAlias.aliasName)); - const { sql, params } = subSubQuery.compile(); - this[method](this.#state.data).where({ - [Utils.getPrimaryKeyHash(meta.primaryKeys)]: { $in: raw(sql, params) }, - }); - } - getSchema(alias) { - const { meta } = alias; - const metaSchema = meta.schema && meta.schema !== '*' ? meta.schema : undefined; - const schema = this.#state.schema ?? metaSchema ?? this.em?.schema ?? this.em?.config.getSchema(true); - if (schema === this.platform.getDefaultSchemaName()) { - return undefined; - } - return schema; - } - /** @internal */ - createAlias(entityName, aliasName, subQuery) { - const meta = this.metadata.find(entityName); - const alias = { aliasName, entityName, meta, subQuery }; - this.#state.aliases[aliasName] = alias; - return alias; - } - createMainAlias(entityName, aliasName, subQuery) { - this.#state.mainAlias = this.createAlias(entityName, aliasName, subQuery); - this.#helper = this.createQueryBuilderHelper(); - return this.#state.mainAlias; - } - fromSubQuery(target, aliasName) { - const { entityName } = target.mainAlias; - aliasName ??= this.getNextAlias(entityName); - const subQuery = target.#state.unionQuery ? target.toRaw() : target.getNativeQuery(); - this.createMainAlias(entityName, aliasName, subQuery); - } - fromEntityName(entityName, aliasName) { - aliasName ??= this.#state.mainAlias?.aliasName ?? this.getNextAlias(entityName); - this.createMainAlias(entityName, aliasName); - } - fromRawTable(tableName, aliasName) { - aliasName ??= this.#state.mainAlias?.aliasName ?? this.getNextAlias(tableName); - const meta = new EntityMetadata({ - className: tableName, - collection: tableName, - }); - meta.root = meta; - this.#state.mainAlias = { - aliasName, - entityName: tableName, - meta, - rawTableName: tableName, - }; - this.#state.aliases[aliasName] = this.#state.mainAlias; - this.#helper = this.createQueryBuilderHelper(); - } - createQueryBuilderHelper() { - return new QueryBuilderHelper( - this.mainAlias.entityName, - this.mainAlias.aliasName, - this.#state.aliases, - this.#state.subQueries, - this.driver, - this.#state.tptAlias, - ); - } - ensureFromClause() { - /* v8 ignore next */ - if (!this.#state.mainAlias) { - throw new Error(`Cannot proceed to build a query because the main alias is not set.`); - } - } - ensureNotFinalized() { - if (this.#state.finalized) { - throw new Error('This QueryBuilder instance is already finalized, clone it first if you want to modify it.'); - } - } - /** @ignore */ - /* v8 ignore next */ - [Symbol.for('nodejs.util.inspect.custom')](depth = 2) { - const object = { ...this }; - const hidden = ['metadata', 'driver', 'context', 'platform', 'type']; - Object.keys(object) - .filter(k => k.startsWith('_')) - .forEach(k => delete object[k]); - Object.keys(object) - .filter(k => object[k] == null) - .forEach(k => delete object[k]); - hidden.forEach(k => delete object[k]); - let prefix = this.type ? this.type.substring(0, 1) + this.type.toLowerCase().substring(1) : ''; - if (this.#state.data) { - object.data = this.#state.data; - } - if (this.#state.schema) { - object.schema = this.#state.schema; - } - if (!Utils.isEmpty(this.#state.cond)) { - object.where = this.#state.cond; - } - if (this.#state.onConflict?.[0]) { - prefix = 'Upsert'; - object.onConflict = this.#state.onConflict[0]; - } - if (!Utils.isEmpty(this.#state.orderBy)) { - object.orderBy = this.#state.orderBy; - } - const name = this.#state.mainAlias - ? `${prefix}QueryBuilder<${Utils.className(this.#state.mainAlias?.entityName)}>` - : 'QueryBuilder'; - const ret = inspect(object, { depth }); - return ret === '[Object]' ? `[${name}]` : name + ' ' + ret; - } -} -_a = QueryBuilder; diff --git a/node_modules/@mikro-orm/sql/query/QueryBuilderHelper.d.ts b/node_modules/@mikro-orm/sql/query/QueryBuilderHelper.d.ts deleted file mode 100644 index b2119b2..0000000 --- a/node_modules/@mikro-orm/sql/query/QueryBuilderHelper.d.ts +++ /dev/null @@ -1,166 +0,0 @@ -import { - type Dictionary, - type EntityData, - type EntityKey, - type EntityMetadata, - type EntityName, - type EntityProperty, - type FilterQuery, - type FlatQueryOrderMap, - type FormulaTable, - LockMode, - type QueryOrderMap, - Raw, - type RawQueryFragment, - type RawQueryFragmentSymbol, -} from '@mikro-orm/core'; -import { JoinType, QueryType } from './enums.js'; -import type { InternalField, JoinOptions } from '../typings.js'; -import type { AbstractSqlDriver } from '../AbstractSqlDriver.js'; -import type { NativeQueryBuilder } from './NativeQueryBuilder.js'; -/** - * @internal - */ -export declare class QueryBuilderHelper { - #private; - constructor( - entityName: EntityName, - alias: string, - aliasMap: Dictionary>, - subQueries: Dictionary, - driver: AbstractSqlDriver, - tptAliasMap?: Dictionary, - ); - /** - * For TPT inheritance, finds the correct alias for a property based on which entity owns it. - * Returns the main alias if not a TPT property or if the property belongs to the main entity. - */ - getTPTAliasForProperty(propName: string, defaultAlias: string): string; - mapper(field: string | Raw | RawQueryFragmentSymbol, type?: QueryType): string; - mapper( - field: string | Raw | RawQueryFragmentSymbol, - type?: QueryType, - value?: any, - alias?: string | null, - schema?: string, - ): string; - processData(data: Dictionary, convertCustomTypes: boolean, multi?: boolean): any; - joinOneToReference( - prop: EntityProperty, - ownerAlias: string, - alias: string, - type: JoinType, - cond?: Dictionary, - schema?: string, - ): JoinOptions; - joinManyToOneReference( - prop: EntityProperty, - ownerAlias: string, - alias: string, - type: JoinType, - cond?: Dictionary, - schema?: string, - ): JoinOptions; - joinManyToManyReference( - prop: EntityProperty, - ownerAlias: string, - alias: string, - pivotAlias: string, - type: JoinType, - cond: Dictionary, - path: string, - schema?: string, - ): Dictionary; - processJoins(qb: NativeQueryBuilder, joins: Dictionary, schema?: string, schemaOverride?: string): void; - createJoinExpression( - join: JoinOptions, - joins: Dictionary, - schema?: string, - schemaOverride?: string, - ): { - sql: string; - params: unknown[]; - }; - mapJoinColumns(type: QueryType, join: JoinOptions): (string | Raw)[]; - isOneToOneInverse(field: string, meta?: EntityMetadata): boolean; - getTableName(entityName: EntityName): string; - /** - * Checks whether the RE can be rewritten to simple LIKE query - */ - isSimpleRegExp(re: any): re is RegExp; - getRegExpParam(re: RegExp): string; - appendOnConflictClause(type: QueryType, onConflict: OnConflictClause[], qb: NativeQueryBuilder): void; - appendQueryCondition( - type: QueryType, - cond: any, - qb: NativeQueryBuilder, - operator?: '$and' | '$or', - method?: 'where' | 'having', - ): void; - _appendQueryCondition( - type: QueryType, - cond: any, - operator?: '$and' | '$or', - ): { - sql: string; - params: unknown[]; - }; - private append; - private appendQuerySubCondition; - private processObjectSubCondition; - private getValueReplacement; - private getOperatorReplacement; - validateQueryOrder(orderBy: QueryOrderMap): void; - getQueryOrder( - type: QueryType, - orderBy: FlatQueryOrderMap | FlatQueryOrderMap[], - populate: Dictionary, - collation?: string, - ): string[]; - getQueryOrderFromObject( - type: QueryType, - orderBy: FlatQueryOrderMap, - populate: Dictionary, - collation?: string, - ): string[]; - splitField(field: EntityKey, greedyAlias?: boolean): [string, EntityKey, string | undefined]; - getLockSQL( - qb: NativeQueryBuilder, - lockMode: LockMode, - lockTables?: string[], - joinsMap?: Dictionary, - ): void; - updateVersionProperty(qb: NativeQueryBuilder, data: Dictionary): void; - private prefix; - private appendGroupCondition; - private isPrefixed; - private fieldName; - getProperty(field: string, alias?: string): EntityProperty | undefined; - isTableNameAliasRequired(type: QueryType): boolean; - private processEmbeddedArrayCondition; - private buildJsonArrayExists; - private resolveEmbeddedProp; - private buildEmbeddedArrayOperatorCondition; - private processJsonElemMatch; - /** - * Shared logic for building WHERE conditions inside JSON array EXISTS subqueries. - * Used by both embedded array queries (metadata-driven) and $elemMatch (type-inferred). - */ - private buildArrayElementWhere; - private inferJsonValueType; - processOnConflictCondition(cond: FilterQuery, schema?: string): FilterQuery; - createFormulaTable(alias: string, meta: EntityMetadata, schema?: string): FormulaTable; -} -export interface Alias { - aliasName: string; - entityName: EntityName; - meta: EntityMetadata; - subQuery?: NativeQueryBuilder | RawQueryFragment; - rawTableName?: string; -} -export interface OnConflictClause { - fields: string[] | Raw; - ignore?: boolean; - merge?: EntityData | InternalField[]; - where?: FilterQuery; -} diff --git a/node_modules/@mikro-orm/sql/query/QueryBuilderHelper.js b/node_modules/@mikro-orm/sql/query/QueryBuilderHelper.js deleted file mode 100644 index 6a4624c..0000000 --- a/node_modules/@mikro-orm/sql/query/QueryBuilderHelper.js +++ /dev/null @@ -1,1113 +0,0 @@ -import { - ALIAS_REPLACEMENT, - ALIAS_REPLACEMENT_RE, - ArrayType, - JsonType, - inspect, - isRaw, - LockMode, - OptimisticLockError, - QueryOperator, - QueryOrderNumeric, - raw, - Raw, - QueryHelper, - ReferenceKind, - Utils, - ValidationError, -} from '@mikro-orm/core'; -import { EMBEDDABLE_ARRAY_OPS, JoinType, QueryType } from './enums.js'; -/** - * @internal - */ -export class QueryBuilderHelper { - #platform; - #metadata; - #entityName; - #alias; - #aliasMap; - #subQueries; - #driver; - #tptAliasMap; - /** Monotonically increasing counter for unique JSON array iteration aliases within a single query. */ - #jsonAliasCounter = 0; - constructor(entityName, alias, aliasMap, subQueries, driver, tptAliasMap = {}) { - this.#entityName = entityName; - this.#alias = alias; - this.#aliasMap = aliasMap; - this.#subQueries = subQueries; - this.#driver = driver; - this.#tptAliasMap = tptAliasMap; - this.#platform = this.#driver.getPlatform(); - this.#metadata = this.#driver.getMetadata(); - } - /** - * For TPT inheritance, finds the correct alias for a property based on which entity owns it. - * Returns the main alias if not a TPT property or if the property belongs to the main entity. - */ - getTPTAliasForProperty(propName, defaultAlias) { - const meta = this.#aliasMap[defaultAlias]?.meta ?? this.#metadata.get(this.#entityName); - if (meta?.inheritanceType !== 'tpt' || !meta.tptParent) { - return defaultAlias; - } - // Check if property is in the main entity's ownProps - if (meta.ownProps?.some(p => p.name === propName || p.fieldNames?.includes(propName))) { - return defaultAlias; - } - // Walk up the TPT hierarchy to find which parent owns this property - let parentMeta = meta.tptParent; - while (parentMeta) { - const parentAlias = this.#tptAliasMap[parentMeta.className]; - if (parentAlias && parentMeta.ownProps?.some(p => p.name === propName || p.fieldNames?.includes(propName))) { - return parentAlias; - } - parentMeta = parentMeta.tptParent; - } - // Property not found in hierarchy, return default alias - return defaultAlias; - } - mapper(field, type = QueryType.SELECT, value, alias, schema) { - if (isRaw(field)) { - return raw(field.sql, field.params); - } - if (Raw.isKnownFragmentSymbol(field)) { - return Raw.getKnownFragment(field); - } - /* v8 ignore next */ - if (typeof field !== 'string') { - return field; - } - const isTableNameAliasRequired = this.isTableNameAliasRequired(type); - const fields = Utils.splitPrimaryKeys(field); - if (fields.length > 1) { - const parts = []; - for (const p of fields) { - const [a, f] = this.splitField(p); - const prop = this.getProperty(f, a); - const fkIdx2 = prop?.fieldNames.findIndex(name => name === f) ?? -1; - if (fkIdx2 !== -1) { - parts.push( - this.mapper( - a !== this.#alias ? `${a}.${prop.fieldNames[fkIdx2]}` : prop.fieldNames[fkIdx2], - type, - value, - alias, - ), - ); - } else if (prop) { - parts.push(...prop.fieldNames.map(f => this.mapper(a !== this.#alias ? `${a}.${f}` : f, type, value, alias))); - } else { - parts.push(this.mapper(a !== this.#alias ? `${a}.${f}` : f, type, value, alias)); - } - } - // flatten the value if we see we are expanding nested composite key - // hackish, but cleaner solution would require quite a lot of refactoring - if (fields.length !== parts.length && Array.isArray(value)) { - value.forEach(row => { - if (Array.isArray(row)) { - const tmp = Utils.flatten(row); - row.length = 0; - row.push(...tmp); - } - }); - } - return raw('(' + parts.map(part => this.#platform.quoteIdentifier(part)).join(', ') + ')'); - } - const [a, f] = this.splitField(field); - const prop = this.getProperty(f, a); - // For TPT inheritance, resolve the correct alias for this property - // Only apply TPT resolution when `a` is an actual table alias (in aliasMap), - // not when it's an embedded property name like 'profile1.identity.links' - const isTableAlias = !!this.#aliasMap[a]; - const baseAlias = isTableAlias ? a : this.#alias; - const resolvedAlias = isTableAlias ? this.getTPTAliasForProperty(prop?.name ?? f, a) : this.#alias; - const aliasPrefix = isTableNameAliasRequired ? resolvedAlias + '.' : ''; - const fkIdx2 = prop?.fieldNames.findIndex(name => name === f) ?? -1; - const fkIdx = fkIdx2 === -1 ? 0 : fkIdx2; - if (a === prop?.embedded?.[0]) { - return aliasPrefix + prop.fieldNames[fkIdx]; - } - const noPrefix = prop?.persist === false; - if (prop?.fieldNameRaw) { - return raw(this.prefix(field, isTableNameAliasRequired)); - } - if (prop?.formula) { - const alias2 = this.#platform.quoteIdentifier(a).toString(); - const aliasName = alias === undefined ? prop.fieldNames[0] : alias; - const as = aliasName === null ? '' : ` as ${this.#platform.quoteIdentifier(aliasName)}`; - const meta = this.#aliasMap[a]?.meta ?? this.#metadata.get(this.#entityName); - const table = this.createFormulaTable(alias2, meta, schema); - const columns = meta.createColumnMappingObject(p => this.getTPTAliasForProperty(p.name, a), alias2); - let value = this.#driver.evaluateFormula(prop.formula, columns, table); - if (!this.isTableNameAliasRequired(type)) { - value = value.replaceAll(alias2 + '.', ''); - } - return raw(`${value}${as}`); - } - if (prop?.hasConvertToJSValueSQL && type !== QueryType.UPSERT) { - let valueSQL; - if (prop.fieldNames.length > 1 && fkIdx !== -1) { - const fk = prop.targetMeta.getPrimaryProps()[fkIdx]; - const prefixed = this.prefix(field, isTableNameAliasRequired, true, fkIdx); - valueSQL = fk.customType.convertToJSValueSQL(prefixed, this.#platform); - } else { - const prefixed = this.prefix(field, isTableNameAliasRequired, true); - valueSQL = prop.customType.convertToJSValueSQL(prefixed, this.#platform); - } - if (alias === null) { - return raw(valueSQL); - } - return raw(`${valueSQL} as ${this.#platform.quoteIdentifier(alias ?? prop.fieldNames[fkIdx])}`); - } - let ret = this.prefix(field, false, false, fkIdx); - if (alias) { - ret += ' as ' + alias; - } - if (!isTableNameAliasRequired || this.isPrefixed(ret) || noPrefix) { - return ret; - } - return resolvedAlias + '.' + ret; - } - processData(data, convertCustomTypes, multi = false) { - if (Array.isArray(data)) { - return data.map(d => this.processData(d, convertCustomTypes, true)); - } - const meta = this.#metadata.find(this.#entityName); - data = this.#driver.mapDataToFieldNames(data, true, meta?.properties, convertCustomTypes); - if (!Utils.hasObjectKeys(data) && meta && multi) { - /* v8 ignore next */ - data[meta.getPrimaryProps()[0].fieldNames[0]] = this.#platform.usesDefaultKeyword() ? raw('default') : undefined; - } - return data; - } - joinOneToReference(prop, ownerAlias, alias, type, cond = {}, schema) { - const prop2 = prop.targetMeta.properties[prop.mappedBy || prop.inversedBy]; - const table = this.getTableName(prop.targetMeta.class); - const joinColumns = prop.owner ? prop.referencedColumnNames : prop2.joinColumns; - const inverseJoinColumns = prop.referencedColumnNames; - const primaryKeys = prop.owner ? prop.joinColumns : prop2.referencedColumnNames; - schema ??= prop.targetMeta?.schema === '*' ? '*' : this.#driver.getSchemaName(prop.targetMeta); - cond = Utils.merge(cond, prop.where); - // For inverse side of polymorphic relations, add discriminator condition - if (!prop.owner && prop2.polymorphic && prop2.discriminatorColumn && prop2.discriminatorMap) { - const ownerMeta = this.#aliasMap[ownerAlias]?.meta ?? this.#metadata.get(this.#entityName); - const discriminatorValue = QueryHelper.findDiscriminatorValue(prop2.discriminatorMap, ownerMeta.class); - if (discriminatorValue) { - cond[`${alias}.${prop2.discriminatorColumn}`] = discriminatorValue; - } - } - return { - prop, - type, - cond, - ownerAlias, - alias, - table, - schema, - joinColumns, - inverseJoinColumns, - primaryKeys, - }; - } - joinManyToOneReference(prop, ownerAlias, alias, type, cond = {}, schema) { - return { - prop, - type, - cond, - ownerAlias, - alias, - table: this.getTableName(prop.targetMeta.class), - schema: prop.targetMeta?.schema === '*' ? '*' : this.#driver.getSchemaName(prop.targetMeta, { schema }), - joinColumns: prop.referencedColumnNames, - // For polymorphic relations, fieldNames includes the discriminator column which is not - // part of the join condition - use joinColumns (the FK columns only) instead - primaryKeys: prop.polymorphic ? prop.joinColumns : prop.fieldNames, - }; - } - joinManyToManyReference(prop, ownerAlias, alias, pivotAlias, type, cond, path, schema) { - const pivotMeta = this.#metadata.find(prop.pivotEntity); - const ret = { - [`${ownerAlias}.${prop.name}#${pivotAlias}`]: { - prop, - type, - ownerAlias, - alias: pivotAlias, - inverseAlias: alias, - joinColumns: prop.joinColumns, - inverseJoinColumns: prop.inverseJoinColumns, - primaryKeys: prop.referencedColumnNames, - cond: {}, - table: pivotMeta.tableName, - schema: prop.targetMeta?.schema === '*' ? '*' : this.#driver.getSchemaName(pivotMeta, { schema }), - path: path.endsWith('[pivot]') ? path : `${path}[pivot]`, - }, - }; - if (type === JoinType.pivotJoin) { - return ret; - } - const prop2 = pivotMeta.relations[prop.owner ? 1 : 0]; - ret[`${pivotAlias}.${prop2.name}#${alias}`] = this.joinManyToOneReference( - prop2, - pivotAlias, - alias, - type, - cond, - schema, - ); - ret[`${pivotAlias}.${prop2.name}#${alias}`].path = path; - const tmp = prop2.referencedTableName.split('.'); - ret[`${pivotAlias}.${prop2.name}#${alias}`].schema ??= tmp.length > 1 ? tmp[0] : undefined; - return ret; - } - processJoins(qb, joins, schema, schemaOverride) { - Object.values(joins).forEach(join => { - if ([JoinType.nestedInnerJoin, JoinType.nestedLeftJoin].includes(join.type)) { - return; - } - const { sql, params } = this.createJoinExpression(join, joins, schema, schemaOverride); - qb.join(sql, params); - }); - } - createJoinExpression(join, joins, schema, schemaOverride) { - let table = join.table; - const method = - { - [JoinType.nestedInnerJoin]: 'inner join', - [JoinType.nestedLeftJoin]: 'left join', - [JoinType.pivotJoin]: 'left join', - }[join.type] ?? join.type; - const conditions = []; - const params = []; - schema = join.schema === '*' ? schema : (join.schema ?? schemaOverride); - if (schema && schema !== this.#platform.getDefaultSchemaName()) { - table = `${schema}.${table}`; - } - if (join.prop.name !== '__subquery__') { - join.primaryKeys.forEach((primaryKey, idx) => { - const right = `${join.alias}.${join.joinColumns[idx]}`; - if (join.prop.formula) { - const quotedAlias = this.#platform.quoteIdentifier(join.ownerAlias).toString(); - const ownerMeta = this.#aliasMap[join.ownerAlias]?.meta ?? this.#metadata.get(this.#entityName); - const table = this.createFormulaTable(quotedAlias, ownerMeta, schema); - const columns = ownerMeta.createColumnMappingObject( - p => this.getTPTAliasForProperty(p.name, join.ownerAlias), - quotedAlias, - ); - const left = this.#driver.evaluateFormula(join.prop.formula, columns, table); - conditions.push(`${left} = ${this.#platform.quoteIdentifier(right)}`); - return; - } - const left = - join.prop.object && join.prop.fieldNameRaw - ? join.prop.fieldNameRaw.replaceAll(ALIAS_REPLACEMENT, join.ownerAlias) - : this.#platform.quoteIdentifier(`${join.ownerAlias}.${primaryKey}`); - conditions.push(`${left} = ${this.#platform.quoteIdentifier(right)}`); - }); - } - if ( - join.prop.targetMeta?.root.inheritanceType === 'sti' && - join.prop.targetMeta?.discriminatorValue && - !join.path?.endsWith('[pivot]') - ) { - const typeProperty = join.prop.targetMeta.root.discriminatorColumn; - const alias = join.inverseAlias ?? join.alias; - join.cond[`${alias}.${typeProperty}`] = join.prop.targetMeta.discriminatorValue; - } - // For polymorphic relations, add discriminator condition to filter by target entity type - if (join.prop.polymorphic && join.prop.discriminatorColumn && join.prop.discriminatorMap) { - const discriminatorValue = QueryHelper.findDiscriminatorValue( - join.prop.discriminatorMap, - join.prop.targetMeta.class, - ); - if (discriminatorValue) { - const discriminatorCol = this.#platform.quoteIdentifier(`${join.ownerAlias}.${join.prop.discriminatorColumn}`); - conditions.push(`${discriminatorCol} = ?`); - params.push(discriminatorValue); - } - } - let sql = method + ' '; - if (join.nested) { - const asKeyword = this.#platform.usesAsKeyword() ? ' as ' : ' '; - sql += `(${this.#platform.quoteIdentifier(table)}${asKeyword}${this.#platform.quoteIdentifier(join.alias)}`; - for (const nested of join.nested) { - const { sql: nestedSql, params: nestedParams } = this.createJoinExpression( - nested, - joins, - schema, - schemaOverride, - ); - sql += ' ' + nestedSql; - params.push(...nestedParams); - } - sql += `)`; - } else if (join.subquery) { - const asKeyword = this.#platform.usesAsKeyword() ? ' as ' : ' '; - sql += `(${join.subquery})${asKeyword}${this.#platform.quoteIdentifier(join.alias)}`; - } else { - sql += - this.#platform.quoteIdentifier(table) + - (this.#platform.usesAsKeyword() ? ' as ' : ' ') + - this.#platform.quoteIdentifier(join.alias); - } - const oldAlias = this.#alias; - this.#alias = join.alias; - const subquery = this._appendQueryCondition(QueryType.SELECT, join.cond); - this.#alias = oldAlias; - if (subquery.sql) { - conditions.push(subquery.sql); - subquery.params.forEach(p => params.push(p)); - } - if (conditions.length > 0) { - sql += ` on ${conditions.join(' and ')}`; - } - return { sql, params }; - } - mapJoinColumns(type, join) { - if (join.prop && [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(join.prop.kind)) { - return join.prop.fieldNames.map((_fieldName, idx) => { - const columns = join.prop.owner ? join.joinColumns : join.inverseJoinColumns; - return this.mapper(`${join.alias}.${columns[idx]}`, type, undefined, `${join.alias}__${columns[idx]}`); - }); - } - return [ - ...join.joinColumns.map(col => this.mapper(`${join.alias}.${col}`, type, undefined, `fk__${col}`)), - ...join.inverseJoinColumns.map(col => this.mapper(`${join.alias}.${col}`, type, undefined, `fk__${col}`)), - ]; - } - isOneToOneInverse(field, meta) { - meta ??= this.#metadata.find(this.#entityName); - const prop = meta.properties[field.replace(/:ref$/, '')]; - return prop?.kind === ReferenceKind.ONE_TO_ONE && !prop.owner; - } - getTableName(entityName) { - const meta = this.#metadata.find(entityName); - return meta?.tableName ?? Utils.className(entityName); - } - /** - * Checks whether the RE can be rewritten to simple LIKE query - */ - isSimpleRegExp(re) { - if (!(re instanceof RegExp)) { - return false; - } - if (re.flags.includes('i')) { - return false; - } - // when including the opening bracket/paren we consider it complex - return !/[{[(]/.exec(re.source); - } - getRegExpParam(re) { - const value = re.source - .replace(/\.\*/g, '%') // .* -> % - .replace(/\./g, '_') // . -> _ - .replace(/\\_/g, '.') // \. -> . - .replace(/^\^/g, '') // remove ^ from start - .replace(/\$$/g, ''); // remove $ from end - if (re.source.startsWith('^') && re.source.endsWith('$')) { - return value; - } - if (re.source.startsWith('^')) { - return value + '%'; - } - if (re.source.endsWith('$')) { - return '%' + value; - } - return `%${value}%`; - } - appendOnConflictClause(type, onConflict, qb) { - onConflict.forEach(item => { - const { fields, ignore } = item; - const sub = qb.onConflict({ fields, ignore }); - Utils.runIfNotEmpty(() => { - let mergeParam = item.merge; - if (Utils.isObject(item.merge)) { - mergeParam = {}; - Utils.keys(item.merge).forEach(key => { - const k = this.mapper(key, type); - mergeParam[k] = item.merge[key]; - }); - } - if (Array.isArray(item.merge)) { - mergeParam = item.merge.map(key => this.mapper(key, type)); - } - sub.merge = mergeParam ?? []; - if (item.where) { - sub.where = this._appendQueryCondition(type, item.where); - } - }, 'merge' in item); - }); - } - appendQueryCondition(type, cond, qb, operator, method = 'where') { - const { sql, params } = this._appendQueryCondition(type, cond, operator); - qb[method](sql, params); - } - _appendQueryCondition(type, cond, operator) { - const parts = []; - const params = []; - for (const k of Utils.getObjectQueryKeys(cond)) { - if (k === '$and' || k === '$or') { - if (operator) { - this.append(() => this.appendGroupCondition(type, k, cond[k]), parts, params, operator); - continue; - } - this.append(() => this.appendGroupCondition(type, k, cond[k]), parts, params); - continue; - } - if (k === '$not') { - const res = this._appendQueryCondition(type, cond[k]); - parts.push(`not (${res.sql})`); - res.params.forEach(p => params.push(p)); - continue; - } - this.append(() => this.appendQuerySubCondition(type, cond, k), parts, params); - } - return { sql: parts.join(' and '), params }; - } - append(cb, parts, params, operator) { - const res = cb(); - if (['', '()'].includes(res.sql)) { - return; - } - parts.push(operator === '$or' ? `(${res.sql})` : res.sql); - res.params.forEach(p => params.push(p)); - } - appendQuerySubCondition(type, cond, key) { - const parts = []; - const params = []; - if (this.isSimpleRegExp(cond[key])) { - parts.push(`${this.#platform.quoteIdentifier(this.mapper(key, type))} like ?`); - params.push(this.getRegExpParam(cond[key])); - return { sql: parts.join(' and '), params }; - } - if (Utils.isPlainObject(cond[key]) && !Raw.isKnownFragmentSymbol(key)) { - const [a, f] = this.splitField(key); - const prop = this.getProperty(f, a); - if (prop?.kind === ReferenceKind.EMBEDDED && prop.array) { - const keys = Object.keys(cond[key]); - const hasOnlyArrayOps = keys.every(k => EMBEDDABLE_ARRAY_OPS.includes(k)); - if (!hasOnlyArrayOps) { - return this.processEmbeddedArrayCondition(cond[key], prop, a); - } - } - // $elemMatch on JSON properties — iterate array elements via EXISTS subquery. - // When combined with other operators (e.g. $contains), processObjectSubCondition - // splits them first (size > 1), so $elemMatch arrives here alone. - if (prop && cond[key].$elemMatch != null && Utils.getObjectKeysSize(cond[key]) === 1) { - if (!(prop.customType instanceof JsonType)) { - throw new ValidationError( - `$elemMatch can only be used on JSON array properties, but '${this.#entityName}.${prop.name}' has type '${prop.type}'`, - ); - } - return this.processJsonElemMatch(cond[key].$elemMatch, prop, a); - } - } - if (Utils.isPlainObject(cond[key]) || cond[key] instanceof RegExp) { - return this.processObjectSubCondition(cond, key, type); - } - const op = cond[key] === null ? 'is' : '='; - if (Raw.isKnownFragmentSymbol(key)) { - const raw = Raw.getKnownFragment(key); - const sql = raw.sql.replaceAll(ALIAS_REPLACEMENT, this.#alias); - const value = Utils.asArray(cond[key]); - params.push(...raw.params); - if (value.length > 0) { - const k = key; - const val = this.getValueReplacement([k], value[0], params, k); - parts.push(`${sql} ${op} ${val}`); - return { sql: parts.join(' and '), params }; - } - parts.push(sql); - return { sql: parts.join(' and '), params }; - } - const fields = Utils.splitPrimaryKeys(key); - if (this.#subQueries[key]) { - const val = this.getValueReplacement(fields, cond[key], params, key); - parts.push(`(${this.#subQueries[key]}) ${op} ${val}`); - return { sql: parts.join(' and '), params }; - } - const val = this.getValueReplacement(fields, cond[key], params, key); - parts.push(`${this.#platform.quoteIdentifier(this.mapper(key, type, cond[key], null))} ${op} ${val}`); - return { sql: parts.join(' and '), params }; - } - processObjectSubCondition(cond, key, type) { - const parts = []; - const params = []; - let value = cond[key]; - const size = Utils.getObjectKeysSize(value); - if (Utils.isPlainObject(value) && size === 0) { - return { sql: '', params }; - } - // grouped condition for one field, e.g. `{ age: { $gte: 10, $lt: 50 } }` - if (size > 1) { - const subCondition = Object.entries(value).map(([subKey, subValue]) => { - return { [key]: { [subKey]: subValue } }; - }); - for (const sub of subCondition) { - this.append(() => this._appendQueryCondition(type, sub, '$and'), parts, params); - } - return { sql: parts.join(' and '), params }; - } - if (value instanceof RegExp) { - value = this.#platform.getRegExpValue(value); - } - // operators - const op = Object.keys(QueryOperator).find(op => op in value); - /* v8 ignore next */ - if (!op) { - throw ValidationError.invalidQueryCondition(cond); - } - const replacement = this.getOperatorReplacement(op, value); - const rawField = Raw.isKnownFragmentSymbol(key); - const fields = rawField ? [key] : Utils.splitPrimaryKeys(key); - if (fields.length > 1 && Array.isArray(value[op])) { - const singleTuple = !value[op].every(v => Array.isArray(v)); - if (!this.#platform.allowsComparingTuples()) { - const mapped = fields.map(f => this.mapper(f, type)); - if (op === '$in') { - const conds = value[op].map(() => { - return `(${mapped.map(field => `${this.#platform.quoteIdentifier(field)} = ?`).join(' and ')})`; - }); - parts.push(`(${conds.join(' or ')})`); - params.push(...Utils.flatten(value[op])); - return { sql: parts.join(' and '), params }; - } - parts.push(...mapped.map(field => `${this.#platform.quoteIdentifier(field)} = ?`)); - params.push(...Utils.flatten(value[op])); - return { sql: parts.join(' and '), params }; - } - if (singleTuple) { - const tmp = - value[op].length === 1 && Utils.isPlainObject(value[op][0]) ? fields.map(f => value[op][0][f]) : value[op]; - const sql = `(${fields.map(() => '?').join(', ')})`; - value[op] = raw(sql, tmp); - } - } - if (this.#subQueries[key]) { - const val = this.getValueReplacement(fields, value[op], params, op); - parts.push(`(${this.#subQueries[key]}) ${replacement} ${val}`); - return { sql: parts.join(' and '), params }; - } - const [a, f] = rawField ? [] : this.splitField(key); - const prop = f && this.getProperty(f, a); - if (prop && [ReferenceKind.ONE_TO_MANY, ReferenceKind.MANY_TO_MANY].includes(prop.kind)) { - return { sql: '', params }; - } - if (op === '$fulltext') { - /* v8 ignore next */ - if (!prop) { - throw new Error(`Cannot use $fulltext operator on ${String(key)}, property not found`); - } - const { sql, params: params2 } = raw(this.#platform.getFullTextWhereClause(prop), { - column: this.mapper(key, type, undefined, null), - query: value[op], - }); - parts.push(sql); - params.push(...params2); - } else if (['$in', '$nin'].includes(op) && Array.isArray(value[op]) && value[op].length === 0) { - parts.push(`1 = ${op === '$in' ? 0 : 1}`); - } else if (op === '$re') { - const mappedKey = this.mapper(key, type, value[op], null); - const processed = this.#platform.mapRegExpCondition(mappedKey, value); - parts.push(processed.sql); - params.push(...processed.params); - } else if (value[op] instanceof Raw || typeof value[op]?.toRaw === 'function') { - const query = value[op] instanceof Raw ? value[op] : value[op].toRaw(); - const mappedKey = this.mapper(key, type, query, null); - let sql = query.sql; - if (['$in', '$nin'].includes(op)) { - sql = `(${sql})`; - } - parts.push(`${this.#platform.quoteIdentifier(mappedKey)} ${replacement} ${sql}`); - params.push(...query.params); - } else { - const mappedKey = this.mapper(key, type, value[op], null); - const val = this.getValueReplacement(fields, value[op], params, op, prop); - parts.push(`${this.#platform.quoteIdentifier(mappedKey)} ${replacement} ${val}`); - } - return { sql: parts.join(' and '), params }; - } - getValueReplacement(fields, value, params, key, prop) { - if (Array.isArray(value)) { - if (fields.length > 1) { - const tmp = []; - for (const field of value) { - tmp.push(`(${field.map(() => '?').join(', ')})`); - params.push(...field); - } - return `(${tmp.join(', ')})`; - } - if (prop?.customType instanceof ArrayType) { - const item = prop.customType.convertToDatabaseValue(value, this.#platform, { - fromQuery: true, - key, - mode: 'query', - }); - params.push(item); - } else { - value.forEach(p => params.push(p)); - } - return `(${value.map(() => '?').join(', ')})`; - } - if (value === null) { - return 'null'; - } - params.push(value); - return '?'; - } - getOperatorReplacement(op, value) { - let replacement = QueryOperator[op]; - if (op === '$exists') { - replacement = value[op] ? 'is not' : 'is'; - value[op] = null; - } - if (value[op] === null && ['$eq', '$ne'].includes(op)) { - replacement = op === '$eq' ? 'is' : 'is not'; - } - if (op === '$re') { - replacement = this.#platform.getRegExpOperator(value[op], value.$flags); - } - if (replacement.includes('?')) { - replacement = replacement.replaceAll('?', '\\?'); - } - return replacement; - } - validateQueryOrder(orderBy) { - const strKeys = []; - const rawKeys = []; - for (const key of Utils.getObjectQueryKeys(orderBy)) { - const raw = Raw.getKnownFragment(key); - if (raw) { - rawKeys.push(raw); - } else { - strKeys.push(key); - } - } - if (strKeys.length > 0 && rawKeys.length > 0) { - const example = [ - ...strKeys.map(key => ({ [key]: orderBy[key] })), - ...rawKeys.map(rawKey => ({ [`raw('${rawKey.sql}')`]: orderBy[rawKey] })), - ]; - throw new Error( - [ - `Invalid "orderBy": You are mixing field-based keys and raw SQL fragments inside a single object.`, - `This is not allowed because object key order cannot reliably preserve evaluation order.`, - `To fix this, split them into separate objects inside an array:\n`, - `orderBy: ${inspect(example, { depth: 5 }).replace(/"raw\('(.*)'\)"/g, `[raw('$1')]`)}`, - ].join('\n'), - ); - } - } - getQueryOrder(type, orderBy, populate, collation) { - if (Array.isArray(orderBy)) { - return orderBy.flatMap(o => this.getQueryOrder(type, o, populate, collation)); - } - return this.getQueryOrderFromObject(type, orderBy, populate, collation); - } - getQueryOrderFromObject(type, orderBy, populate, collation) { - const ret = []; - for (const key of Utils.getObjectQueryKeys(orderBy)) { - const direction = orderBy[key]; - const order = typeof direction === 'number' ? QueryOrderNumeric[direction] : direction; - if (Raw.isKnownFragmentSymbol(key)) { - const raw = Raw.getKnownFragment(key); - ret.push( - ...this.#platform.getOrderByExpression(this.#platform.formatQuery(raw.sql, raw.params), order, collation), - ); - continue; - } - for (const f of Utils.splitPrimaryKeys(key)) { - // eslint-disable-next-line prefer-const - let [alias, field] = this.splitField(f, true); - alias = populate[alias] || alias; - const prop = this.getProperty(field, alias); - const noPrefix = (prop?.persist === false && !prop.formula && !prop.embedded) || Raw.isKnownFragment(f); - const column = this.mapper(noPrefix ? field : `${alias}.${field}`, type, undefined, null); - /* v8 ignore next */ - const rawColumn = - typeof column === 'string' - ? column - .split('.') - .map(e => this.#platform.quoteIdentifier(e)) - .join('.') - : column; - const customOrder = prop?.customOrder; - let colPart = customOrder ? this.#platform.generateCustomOrder(rawColumn, customOrder) : rawColumn; - if (isRaw(colPart)) { - colPart = this.#platform.formatQuery(colPart.sql, colPart.params); - } - if (Array.isArray(order)) { - order.forEach(part => ret.push(...this.getQueryOrderFromObject(type, part, populate, collation))); - } else { - ret.push(...this.#platform.getOrderByExpression(colPart, order, collation)); - } - } - } - return ret; - } - splitField(field, greedyAlias = false) { - const parts = field.split('.'); - const ref = parts[parts.length - 1].split(':')[1]; - if (ref) { - parts[parts.length - 1] = parts[parts.length - 1].substring(0, parts[parts.length - 1].indexOf(':')); - } - if (parts.length === 1) { - return [this.#alias, parts[0], ref]; - } - if (greedyAlias) { - const fromField = parts.pop(); - const fromAlias = parts.join('.'); - return [fromAlias, fromField, ref]; - } - const fromAlias = parts.shift(); - const fromField = parts.join('.'); - return [fromAlias, fromField, ref]; - } - getLockSQL(qb, lockMode, lockTables = [], joinsMap) { - const meta = this.#metadata.find(this.#entityName); - if (lockMode === LockMode.OPTIMISTIC && meta && !meta.versionProperty) { - throw OptimisticLockError.lockFailed(Utils.className(this.#entityName)); - } - if (lockMode !== LockMode.OPTIMISTIC && lockTables.length === 0 && joinsMap) { - const joins = Object.values(joinsMap); - const innerJoins = joins.filter(join => - [JoinType.innerJoin, JoinType.innerJoinLateral, JoinType.nestedInnerJoin].includes(join.type), - ); - if (joins.length > innerJoins.length) { - lockTables.push(this.#alias, ...innerJoins.map(join => join.alias)); - } - } - qb.lockMode(lockMode, lockTables); - } - updateVersionProperty(qb, data) { - const meta = this.#metadata.find(this.#entityName); - if (!meta?.versionProperty || meta.versionProperty in data) { - return; - } - const versionProperty = meta.properties[meta.versionProperty]; - let sql = this.#platform.quoteIdentifier(versionProperty.fieldNames[0]) + ' + 1'; - if (versionProperty.runtimeType === 'Date') { - sql = this.#platform.getCurrentTimestampSQL(versionProperty.length); - } - qb.update({ [versionProperty.fieldNames[0]]: raw(sql) }); - } - prefix(field, always = false, quote = false, idx) { - let ret; - if (!this.isPrefixed(field)) { - // For TPT inheritance, resolve the correct alias for this property - const tptAlias = this.getTPTAliasForProperty(field, this.#alias); - const alias = always ? (quote ? tptAlias : this.#platform.quoteIdentifier(tptAlias)) + '.' : ''; - const fieldName = this.fieldName(field, tptAlias, always, idx); - if (fieldName instanceof Raw) { - return fieldName.sql; - } - ret = alias + fieldName; - } else { - const [a, ...rest] = field.split('.'); - const f = rest.join('.'); - // For TPT inheritance, resolve the correct alias for this property - // Only apply TPT resolution when `a` is an actual table alias (in aliasMap), - // not when it's an embedded property name like 'profile1.identity.links' - const isTableAlias = !!this.#aliasMap[a]; - const resolvedAlias = isTableAlias ? this.getTPTAliasForProperty(f, a) : a; - const fieldName = this.fieldName(f, resolvedAlias, always, idx); - if (fieldName instanceof Raw) { - return fieldName.sql; - } - ret = resolvedAlias + '.' + fieldName; - } - if (quote) { - return this.#platform.quoteIdentifier(ret); - } - return ret; - } - appendGroupCondition(type, operator, subCondition) { - const parts = []; - const params = []; - // single sub-condition can be ignored to reduce nesting of parens - if (subCondition.length === 1 || operator === '$and') { - for (const sub of subCondition) { - this.append(() => this._appendQueryCondition(type, sub), parts, params); - } - return { sql: parts.join(' and '), params }; - } - for (const sub of subCondition) { - // skip nesting parens if the value is simple = scalar or object without operators or with only single key, being the operator - const keys = Utils.getObjectQueryKeys(sub); - const val = sub[keys[0]]; - const simple = - !Utils.isPlainObject(val) || - Utils.getObjectKeysSize(val) === 1 || - Object.keys(val).every(k => !Utils.isOperator(k)); - if (keys.length === 1 && simple) { - this.append(() => this._appendQueryCondition(type, sub, operator), parts, params); - continue; - } - this.append(() => this._appendQueryCondition(type, sub), parts, params, operator); - } - return { sql: `(${parts.join(' or ')})`, params }; - } - isPrefixed(field) { - return !!/[\w`"[\]]+\./.exec(field); - } - fieldName(field, alias, always, idx = 0) { - const prop = this.getProperty(field, alias); - if (!prop) { - return field; - } - if (prop.fieldNameRaw) { - if (!always) { - return raw( - prop.fieldNameRaw - .replace(new RegExp(ALIAS_REPLACEMENT_RE + '\\.?', 'g'), '') - .replace(this.#platform.quoteIdentifier('') + '.', ''), - ); - } - if (alias) { - return raw(prop.fieldNameRaw.replace(new RegExp(ALIAS_REPLACEMENT_RE, 'g'), alias)); - } - /* v8 ignore next */ - return raw(prop.fieldNameRaw); - } - /* v8 ignore next */ - return prop.fieldNames?.[idx] ?? field; - } - getProperty(field, alias) { - const entityName = this.#aliasMap[alias]?.entityName || this.#entityName; - const meta = this.#metadata.find(entityName); - // raw table name (e.g. CTE) — no metadata available - if (!meta) { - return undefined; - } - // check if `alias` is not matching an embedded property name instead of alias, e.g. `address.city` - if (alias) { - const prop = meta.properties[alias]; - if (prop?.kind === ReferenceKind.EMBEDDED) { - const parts = field.split('.'); - const nest = p => (parts.length > 0 ? nest(p.embeddedProps[parts.shift()]) : p); - return nest(prop); - } - } - if (meta.properties[field]) { - return meta.properties[field]; - } - return meta.relations.find(prop => prop.fieldNames?.some(name => field === name)); - } - isTableNameAliasRequired(type) { - return [QueryType.SELECT, QueryType.COUNT].includes(type); - } - processEmbeddedArrayCondition(cond, prop, alias) { - const column = this.#platform.quoteIdentifier(`${alias}.${prop.fieldNames[0]}`); - const resolveProperty = key => { - const { embProp, jsonPropName } = this.resolveEmbeddedProp(prop, key); - return { name: jsonPropName, type: embProp.runtimeType ?? 'string' }; - }; - const invalidObjectError = key => ValidationError.invalidEmbeddableQuery(this.#entityName, key, prop.type); - const parts = []; - const allParams = []; - // Top-level $not generates NOT EXISTS (no element matches the inner condition). - const { $not, ...rest } = cond; - if (Utils.hasObjectKeys(rest)) { - const result = this.buildJsonArrayExists(rest, column, false, resolveProperty, invalidObjectError); - if (result) { - parts.push(result.sql); - allParams.push(...result.params); - } - } - if ($not != null) { - if (!Utils.isPlainObject($not)) { - throw new ValidationError(`Invalid query: $not in embedded array queries expects an object value`); - } - const result = this.buildJsonArrayExists($not, column, true, resolveProperty, invalidObjectError); - if (result) { - parts.push(result.sql); - allParams.push(...result.params); - } - } - if (parts.length === 0) { - return { sql: '1 = 1', params: [] }; - } - return { sql: parts.join(' and '), params: allParams }; - } - buildJsonArrayExists(cond, column, negate, resolveProperty, invalidObjectError) { - const jeAlias = `__je${this.#jsonAliasCounter++}`; - const referencedProps = new Map(); - const { sql: whereSql, params } = this.buildArrayElementWhere( - cond, - jeAlias, - referencedProps, - resolveProperty, - invalidObjectError, - ); - if (!whereSql) { - return null; - } - const from = this.#platform.getJsonArrayFromSQL(column, jeAlias, [...referencedProps.values()]); - const exists = this.#platform.getJsonArrayExistsSQL(from, whereSql); - return { sql: negate ? `not ${exists}` : exists, params }; - } - resolveEmbeddedProp(prop, key) { - const embProp = prop.embeddedProps[key] ?? Object.values(prop.embeddedProps).find(p => p.name === key); - if (!embProp) { - throw ValidationError.invalidEmbeddableQuery(this.#entityName, key, prop.type); - } - const prefix = `${prop.fieldNames[0]}~`; - const raw = embProp.fieldNames[0]; - const jsonPropName = raw.startsWith(prefix) ? raw.slice(prefix.length) : raw; - return { embProp, jsonPropName }; - } - buildEmbeddedArrayOperatorCondition(lhs, value, params) { - const supported = new Set(['$eq', '$ne', '$gt', '$gte', '$lt', '$lte', '$in', '$nin', '$not', '$like', '$exists']); - const parts = []; - // Clone to avoid getOperatorReplacement mutating the original (it sets value[op] = null for $exists). - value = { ...value }; - for (const op of Object.keys(value)) { - if (!supported.has(op)) { - throw new ValidationError(`Operator ${op} is not supported in embedded array queries`); - } - const replacement = this.getOperatorReplacement(op, value); - const val = value[op]; - if (['$in', '$nin'].includes(op)) { - if (!Array.isArray(val)) { - throw new ValidationError(`Invalid query: ${op} operator expects an array value`); - } else if (val.length === 0) { - parts.push(`1 = ${op === '$in' ? 0 : 1}`); - } else { - val.forEach(v => params.push(v)); - parts.push(`${lhs} ${replacement} (${val.map(() => '?').join(', ')})`); - } - } else if (op === '$exists') { - parts.push(`${lhs} ${replacement} null`); - } else if (val === null) { - parts.push(`${lhs} ${replacement} null`); - } else { - parts.push(`${lhs} ${replacement} ?`); - params.push(val); - } - } - return parts.join(' and '); - } - processJsonElemMatch(cond, prop, alias) { - const column = this.#platform.quoteIdentifier(`${alias}.${prop.fieldNames[0]}`); - const result = this.buildJsonArrayExists( - cond, - column, - false, - (key, value) => { - this.#platform.validateJsonPropertyName(key); - return { name: key, type: this.inferJsonValueType(value) }; - }, - () => ValidationError.invalidQueryCondition(cond), - ); - return result ?? { sql: '1 = 1', params: [] }; - } - /** - * Shared logic for building WHERE conditions inside JSON array EXISTS subqueries. - * Used by both embedded array queries (metadata-driven) and $elemMatch (type-inferred). - */ - buildArrayElementWhere(cond, jeAlias, referencedProps, resolveProperty, invalidObjectError) { - const parts = []; - const params = []; - for (const k of Object.keys(cond)) { - if (k === '$and' || k === '$or') { - const items = cond[k]; - if (items.length === 0) { - continue; - } - const subParts = []; - for (const item of items) { - const sub = this.buildArrayElementWhere(item, jeAlias, referencedProps, resolveProperty, invalidObjectError); - if (sub.sql) { - subParts.push(sub.sql); - params.push(...sub.params); - } - } - if (subParts.length > 0) { - const joiner = k === '$or' ? ' or ' : ' and '; - parts.push(`(${subParts.join(joiner)})`); - } - continue; - } - // Within $or/$and scope, $not provides element-level negation: - // "this element does not match the condition". - if (k === '$not') { - const sub = this.buildArrayElementWhere(cond[k], jeAlias, referencedProps, resolveProperty, invalidObjectError); - if (sub.sql) { - parts.push(`not (${sub.sql})`); - params.push(...sub.params); - } - continue; - } - const value = cond[k]; - const { name, type } = resolveProperty(k, value); - referencedProps.set(k, { name, type }); - const lhs = this.#platform.getJsonArrayElementPropertySQL(jeAlias, name, type); - if (Utils.isPlainObject(value)) { - const valueKeys = Object.keys(value); - if (valueKeys.some(vk => !Utils.isOperator(vk))) { - throw invalidObjectError(k); - } - const sub = this.buildEmbeddedArrayOperatorCondition(lhs, value, params); - parts.push(sub); - } else if (value === null) { - parts.push(`${lhs} is null`); - } else { - parts.push(`${lhs} = ?`); - params.push(value); - } - } - return { sql: parts.join(' and '), params }; - } - inferJsonValueType(value) { - if (typeof value === 'number') { - return 'number'; - } - if (typeof value === 'boolean') { - return 'boolean'; - } - if (typeof value === 'bigint') { - return 'bigint'; - } - if (Utils.isPlainObject(value)) { - for (const v of Object.values(value)) { - if (typeof v === 'number') { - return 'number'; - } - if (typeof v === 'boolean') { - return 'boolean'; - } - if (typeof v === 'bigint') { - return 'bigint'; - } - if (Array.isArray(v) && v.length > 0) { - if (typeof v[0] === 'number') { - return 'number'; - } - if (typeof v[0] === 'boolean') { - return 'boolean'; - } - } - } - } - return 'string'; - } - processOnConflictCondition(cond, schema) { - const meta = this.#metadata.get(this.#entityName); - const tableName = meta.tableName; - for (const key of Object.keys(cond)) { - const mapped = this.mapper(key, QueryType.UPSERT); - Utils.renameKey(cond, key, tableName + '.' + mapped); - } - return cond; - } - createFormulaTable(alias, meta, schema) { - const effectiveSchema = schema ?? (meta.schema !== '*' ? meta.schema : undefined); - const qualifiedName = effectiveSchema ? `${effectiveSchema}.${meta.tableName}` : meta.tableName; - return { - alias, - name: meta.tableName, - schema: effectiveSchema, - qualifiedName, - toString: () => alias, - }; - } -} diff --git a/node_modules/@mikro-orm/sql/query/ScalarCriteriaNode.d.ts b/node_modules/@mikro-orm/sql/query/ScalarCriteriaNode.d.ts deleted file mode 100644 index 3b4e7be..0000000 --- a/node_modules/@mikro-orm/sql/query/ScalarCriteriaNode.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { CriteriaNode } from './CriteriaNode.js'; -import type { ICriteriaNodeProcessOptions, IQueryBuilder } from '../typings.js'; -/** - * @internal - */ -export declare class ScalarCriteriaNode extends CriteriaNode { - process(qb: IQueryBuilder, options?: ICriteriaNodeProcessOptions): any; - willAutoJoin(qb: IQueryBuilder, alias?: string, options?: ICriteriaNodeProcessOptions): boolean; - private shouldJoin; -} diff --git a/node_modules/@mikro-orm/sql/query/ScalarCriteriaNode.js b/node_modules/@mikro-orm/sql/query/ScalarCriteriaNode.js deleted file mode 100644 index 1c621cb..0000000 --- a/node_modules/@mikro-orm/sql/query/ScalarCriteriaNode.js +++ /dev/null @@ -1,65 +0,0 @@ -import { ARRAY_OPERATORS, ReferenceKind } from '@mikro-orm/core'; -import { CriteriaNode } from './CriteriaNode.js'; -import { JoinType, QueryType } from './enums.js'; -import { QueryBuilder } from './QueryBuilder.js'; -/** - * @internal - */ -export class ScalarCriteriaNode extends CriteriaNode { - process(qb, options) { - const matchPopulateJoins = - options?.matchPopulateJoins || - (this.prop && [ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(this.prop.kind)); - const nestedAlias = qb.getAliasForJoinPath(this.getPath(options), { ...options, matchPopulateJoins }); - if (this.shouldJoin(qb, nestedAlias)) { - const path = this.getPath(); - const parentPath = this.parent.getPath(); // the parent is always there, otherwise `shouldJoin` would return `false` - const nestedAlias = qb.getAliasForJoinPath(path) || qb.getNextAlias(this.prop?.pivotEntity ?? this.entityName); - const field = this.aliased(this.prop.name, options?.alias); - const type = this.prop.kind === ReferenceKind.MANY_TO_MANY ? JoinType.pivotJoin : JoinType.leftJoin; - qb.join(field, nestedAlias, undefined, type, path); - // select the owner as virtual property when joining from 1:1 inverse side, but only if the parent is root entity - if ( - this.prop.kind === ReferenceKind.ONE_TO_ONE && - !parentPath.includes('.') && - !qb.state.fields?.includes(field) - ) { - qb.addSelect(field); - } - } - if (this.payload instanceof QueryBuilder) { - return this.payload.toRaw(); - } - if (this.payload && typeof this.payload === 'object') { - const keys = Object.keys(this.payload).filter( - key => ARRAY_OPERATORS.includes(key) && Array.isArray(this.payload[key]), - ); - for (const key of keys) { - this.payload[key] = JSON.stringify(this.payload[key]); - } - } - return this.payload; - } - willAutoJoin(qb, alias, options) { - return this.shouldJoin(qb, alias); - } - shouldJoin(qb, nestedAlias) { - if ( - !this.parent || - !this.prop || - (nestedAlias && [QueryType.SELECT, QueryType.COUNT].includes(qb.type ?? QueryType.SELECT)) - ) { - return false; - } - switch (this.prop.kind) { - case ReferenceKind.ONE_TO_MANY: - return true; - case ReferenceKind.MANY_TO_MANY: - return true; - case ReferenceKind.ONE_TO_ONE: - return !this.prop.owner; - default: - return false; // SCALAR, MANY_TO_ONE - } - } -} diff --git a/node_modules/@mikro-orm/sql/query/enums.d.ts b/node_modules/@mikro-orm/sql/query/enums.d.ts deleted file mode 100644 index b76393d..0000000 --- a/node_modules/@mikro-orm/sql/query/enums.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** Type of SQL query to be generated. */ -export declare enum QueryType { - TRUNCATE = 'TRUNCATE', - SELECT = 'SELECT', - COUNT = 'COUNT', - INSERT = 'INSERT', - UPDATE = 'UPDATE', - DELETE = 'DELETE', - UPSERT = 'UPSERT', -} -/** Operators that apply to the embedded array column itself, not to individual elements. */ -export declare const EMBEDDABLE_ARRAY_OPS: string[]; -/** Type of SQL JOIN clause. */ -export declare enum JoinType { - leftJoin = 'left join', - innerJoin = 'inner join', - nestedLeftJoin = 'nested left join', - nestedInnerJoin = 'nested inner join', - pivotJoin = 'pivot join', - innerJoinLateral = 'inner join lateral', - leftJoinLateral = 'left join lateral', -} diff --git a/node_modules/@mikro-orm/sql/query/enums.js b/node_modules/@mikro-orm/sql/query/enums.js deleted file mode 100644 index 1dc5d6c..0000000 --- a/node_modules/@mikro-orm/sql/query/enums.js +++ /dev/null @@ -1,24 +0,0 @@ -/** Type of SQL query to be generated. */ -export var QueryType; -(function (QueryType) { - QueryType['TRUNCATE'] = 'TRUNCATE'; - QueryType['SELECT'] = 'SELECT'; - QueryType['COUNT'] = 'COUNT'; - QueryType['INSERT'] = 'INSERT'; - QueryType['UPDATE'] = 'UPDATE'; - QueryType['DELETE'] = 'DELETE'; - QueryType['UPSERT'] = 'UPSERT'; -})(QueryType || (QueryType = {})); -/** Operators that apply to the embedded array column itself, not to individual elements. */ -export const EMBEDDABLE_ARRAY_OPS = ['$contains', '$contained', '$overlap']; -/** Type of SQL JOIN clause. */ -export var JoinType; -(function (JoinType) { - JoinType['leftJoin'] = 'left join'; - JoinType['innerJoin'] = 'inner join'; - JoinType['nestedLeftJoin'] = 'nested left join'; - JoinType['nestedInnerJoin'] = 'nested inner join'; - JoinType['pivotJoin'] = 'pivot join'; - JoinType['innerJoinLateral'] = 'inner join lateral'; - JoinType['leftJoinLateral'] = 'left join lateral'; -})(JoinType || (JoinType = {})); diff --git a/node_modules/@mikro-orm/sql/query/index.d.ts b/node_modules/@mikro-orm/sql/query/index.d.ts deleted file mode 100644 index 97f362f..0000000 --- a/node_modules/@mikro-orm/sql/query/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from './enums.js'; -export * from './QueryBuilderHelper.js'; -export * from './QueryBuilder.js'; -export * from './CriteriaNode.js'; -export * from './ArrayCriteriaNode.js'; -export * from './ObjectCriteriaNode.js'; -export * from './ScalarCriteriaNode.js'; -export * from './CriteriaNodeFactory.js'; -export * from './NativeQueryBuilder.js'; -export * from './raw.js'; diff --git a/node_modules/@mikro-orm/sql/query/index.js b/node_modules/@mikro-orm/sql/query/index.js deleted file mode 100644 index 97f362f..0000000 --- a/node_modules/@mikro-orm/sql/query/index.js +++ /dev/null @@ -1,10 +0,0 @@ -export * from './enums.js'; -export * from './QueryBuilderHelper.js'; -export * from './QueryBuilder.js'; -export * from './CriteriaNode.js'; -export * from './ArrayCriteriaNode.js'; -export * from './ObjectCriteriaNode.js'; -export * from './ScalarCriteriaNode.js'; -export * from './CriteriaNodeFactory.js'; -export * from './NativeQueryBuilder.js'; -export * from './raw.js'; diff --git a/node_modules/@mikro-orm/sql/query/raw.d.ts b/node_modules/@mikro-orm/sql/query/raw.d.ts deleted file mode 100644 index b54b88f..0000000 --- a/node_modules/@mikro-orm/sql/query/raw.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { type AnyString, type Dictionary, type EntityKey, type RawQueryFragment } from '@mikro-orm/core'; -import type { SelectQueryBuilder as KyselySelectQueryBuilder } from 'kysely'; -/** @internal Type for QueryBuilder instances passed to raw() - uses toRaw to distinguish from Kysely QueryBuilder */ -type QueryBuilderLike = { - toQuery(): { - sql: string; - params: readonly unknown[]; - }; - toRaw(): RawQueryFragment; -}; -/** - * Creates raw SQL query fragment that can be assigned to a property or part of a filter. This fragment is represented - * by `RawQueryFragment` class instance that can be serialized to a string, so it can be used both as an object value - * and key. When serialized, the fragment key gets cached and only such cached key will be recognized by the ORM. - * This adds a runtime safety to the raw query fragments. - * - * > **`raw()` helper is required since v6 to use a raw fragment in your query, both through EntityManager and QueryBuilder.** - * - * ```ts - * // as a value - * await em.find(User, { time: raw('now()') }); - * - * // as a key - * await em.find(User, { [raw('lower(name)')]: name.toLowerCase() }); - * - * // value can be empty array - * await em.find(User, { [raw('(select 1 = 1)')]: [] }); - * ``` - * - * The `raw` helper supports several signatures, you can pass in a callback that receives the current property alias: - * - * ```ts - * await em.find(User, { [raw(alias => `lower(${alias}.name)`)]: name.toLowerCase() }); - * ``` - * - * You can also use the `sql` tagged template function, which works the same, but supports only the simple string signature: - * - * ```ts - * await em.find(User, { [sql`lower(name)`]: name.toLowerCase() }); - * ``` - * - * When using inside filters, you might have to use a callback signature to create new raw instance for every filter usage. - * - * ```ts - * @Filter({ name: 'long', cond: () => ({ [raw('length(perex)')]: { $gt: 10000 } }) }) - * ``` - * - * The `raw` helper can be used within indexes and uniques to write database-agnostic SQL expressions. In that case, you can use `'??'` to tag your database identifiers (table name, column names, index name, ...) inside your expression, and pass those identifiers as a second parameter to the `raw` helper. Internally, those will automatically be quoted according to the database in use: - * - * ```ts - * // On postgres, will produce: create index "index custom_idx_on_name" on "library.author" ("country") - * // On mysql, will produce: create index `index custom_idx_on_name` on `library.author` (`country`) - * @Index({ name: 'custom_idx_on_name', expression: (table, columns) => raw(`create index ?? on ?? (??)`, ['custom_idx_on_name', table, columns.name]) }) - * @Entity({ schema: 'library' }) - * export class Author { ... } - * ``` - * - * You can also use the `quote` tag function to write database-agnostic SQL expressions. The end-result is the same as using the `raw` function regarding database identifiers quoting, only to have a more elegant expression syntax: - * - * ```ts - * @Index({ name: 'custom_idx_on_name', expression: (table, columns) => quote`create index ${'custom_idx_on_name'} on ${table} (${columns.name})` }) - * @Entity({ schema: 'library' }) - * export class Author { ... } - * ``` - */ -export declare function raw( - sql: - | QueryBuilderLike - | KyselySelectQueryBuilder - | EntityKey - | EntityKey[] - | AnyString - | ((alias: string) => string) - | RawQueryFragment, - params?: readonly unknown[] | Dictionary, -): R; -export {}; diff --git a/node_modules/@mikro-orm/sql/query/raw.js b/node_modules/@mikro-orm/sql/query/raw.js deleted file mode 100644 index a141147..0000000 --- a/node_modules/@mikro-orm/sql/query/raw.js +++ /dev/null @@ -1,67 +0,0 @@ -import { raw as raw_, Utils } from '@mikro-orm/core'; -/** - * Creates raw SQL query fragment that can be assigned to a property or part of a filter. This fragment is represented - * by `RawQueryFragment` class instance that can be serialized to a string, so it can be used both as an object value - * and key. When serialized, the fragment key gets cached and only such cached key will be recognized by the ORM. - * This adds a runtime safety to the raw query fragments. - * - * > **`raw()` helper is required since v6 to use a raw fragment in your query, both through EntityManager and QueryBuilder.** - * - * ```ts - * // as a value - * await em.find(User, { time: raw('now()') }); - * - * // as a key - * await em.find(User, { [raw('lower(name)')]: name.toLowerCase() }); - * - * // value can be empty array - * await em.find(User, { [raw('(select 1 = 1)')]: [] }); - * ``` - * - * The `raw` helper supports several signatures, you can pass in a callback that receives the current property alias: - * - * ```ts - * await em.find(User, { [raw(alias => `lower(${alias}.name)`)]: name.toLowerCase() }); - * ``` - * - * You can also use the `sql` tagged template function, which works the same, but supports only the simple string signature: - * - * ```ts - * await em.find(User, { [sql`lower(name)`]: name.toLowerCase() }); - * ``` - * - * When using inside filters, you might have to use a callback signature to create new raw instance for every filter usage. - * - * ```ts - * @Filter({ name: 'long', cond: () => ({ [raw('length(perex)')]: { $gt: 10000 } }) }) - * ``` - * - * The `raw` helper can be used within indexes and uniques to write database-agnostic SQL expressions. In that case, you can use `'??'` to tag your database identifiers (table name, column names, index name, ...) inside your expression, and pass those identifiers as a second parameter to the `raw` helper. Internally, those will automatically be quoted according to the database in use: - * - * ```ts - * // On postgres, will produce: create index "index custom_idx_on_name" on "library.author" ("country") - * // On mysql, will produce: create index `index custom_idx_on_name` on `library.author` (`country`) - * @Index({ name: 'custom_idx_on_name', expression: (table, columns) => raw(`create index ?? on ?? (??)`, ['custom_idx_on_name', table, columns.name]) }) - * @Entity({ schema: 'library' }) - * export class Author { ... } - * ``` - * - * You can also use the `quote` tag function to write database-agnostic SQL expressions. The end-result is the same as using the `raw` function regarding database identifiers quoting, only to have a more elegant expression syntax: - * - * ```ts - * @Index({ name: 'custom_idx_on_name', expression: (table, columns) => quote`create index ${'custom_idx_on_name'} on ${table} (${columns.name})` }) - * @Entity({ schema: 'library' }) - * export class Author { ... } - * ``` - */ -export function raw(sql, params) { - if (Utils.isObject(sql) && 'compile' in sql) { - const query = sql.compile(); - return raw_(query.sql, query.parameters); - } - if (Utils.isObject(sql) && 'toQuery' in sql) { - const query = sql.toQuery(); - return raw_(query.sql, query.params); - } - return raw_(sql, params); -} diff --git a/node_modules/@mikro-orm/sql/schema/DatabaseSchema.d.ts b/node_modules/@mikro-orm/sql/schema/DatabaseSchema.d.ts deleted file mode 100644 index 37f77df..0000000 --- a/node_modules/@mikro-orm/sql/schema/DatabaseSchema.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { type Configuration, type Dictionary, type EntityMetadata } from '@mikro-orm/core'; -import { DatabaseTable } from './DatabaseTable.js'; -import type { AbstractSqlConnection } from '../AbstractSqlConnection.js'; -import type { DatabaseView } from '../typings.js'; -import type { AbstractSqlPlatform } from '../AbstractSqlPlatform.js'; -/** - * @internal - */ -export declare class DatabaseSchema { - #private; - readonly name: string; - constructor(platform: AbstractSqlPlatform, name: string); - addTable(name: string, schema: string | undefined | null, comment?: string): DatabaseTable; - getTables(): DatabaseTable[]; - /** @internal */ - setTables(tables: DatabaseTable[]): void; - /** @internal */ - setNamespaces(namespaces: Set): void; - getTable(name: string): DatabaseTable | undefined; - hasTable(name: string): boolean; - addView( - name: string, - schema: string | undefined | null, - definition: string, - materialized?: boolean, - withData?: boolean, - ): DatabaseView; - getViews(): DatabaseView[]; - /** @internal */ - setViews(views: DatabaseView[]): void; - getView(name: string): DatabaseView | undefined; - hasView(name: string): boolean; - setNativeEnums( - nativeEnums: Dictionary<{ - name: string; - schema?: string; - items: string[]; - }>, - ): void; - getNativeEnums(): Dictionary<{ - name: string; - schema?: string; - items: string[]; - }>; - getNativeEnum(name: string): { - name: string; - schema?: string; - items: string[]; - }; - hasNamespace(namespace: string): boolean; - hasNativeEnum(name: string): boolean; - getNamespaces(): string[]; - static create( - connection: AbstractSqlConnection, - platform: AbstractSqlPlatform, - config: Configuration, - schemaName?: string, - schemas?: string[], - takeTables?: (string | RegExp)[], - skipTables?: (string | RegExp)[], - skipViews?: (string | RegExp)[], - ): Promise; - static fromMetadata( - metadata: EntityMetadata[], - platform: AbstractSqlPlatform, - config: Configuration, - schemaName?: string, - em?: any, - ): DatabaseSchema; - private static getViewDefinition; - private static getSchemaName; - /** - * Add a foreign key from a TPT child entity's PK to its parent entity's PK. - * This FK uses ON DELETE CASCADE to ensure child rows are deleted when parent is deleted. - */ - private static addTPTForeignKey; - private static matchName; - private static isNameAllowed; - private static isTableNameAllowed; - private static shouldHaveColumn; - toJSON(): Dictionary; - prune(schema: string | undefined, wildcardSchemaTables: string[]): void; -} diff --git a/node_modules/@mikro-orm/sql/schema/DatabaseSchema.js b/node_modules/@mikro-orm/sql/schema/DatabaseSchema.js deleted file mode 100644 index bd43e00..0000000 --- a/node_modules/@mikro-orm/sql/schema/DatabaseSchema.js +++ /dev/null @@ -1,360 +0,0 @@ -import { ReferenceKind, isRaw } from '@mikro-orm/core'; -import { DatabaseTable } from './DatabaseTable.js'; -/** - * @internal - */ -export class DatabaseSchema { - name; - #tables = []; - #views = []; - #namespaces = new Set(); - #nativeEnums = {}; // for postgres - #platform; - constructor(platform, name) { - this.name = name; - this.#platform = platform; - } - addTable(name, schema, comment) { - const namespaceName = schema ?? this.name; - const table = new DatabaseTable(this.#platform, name, namespaceName); - table.nativeEnums = this.#nativeEnums; - table.comment = comment; - this.#tables.push(table); - if (namespaceName != null) { - this.#namespaces.add(namespaceName); - } - return table; - } - getTables() { - return this.#tables; - } - /** @internal */ - setTables(tables) { - this.#tables = tables; - } - /** @internal */ - setNamespaces(namespaces) { - this.#namespaces = namespaces; - } - getTable(name) { - return this.#tables.find(t => t.name === name || `${t.schema}.${t.name}` === name); - } - hasTable(name) { - return !!this.getTable(name); - } - addView(name, schema, definition, materialized, withData) { - const namespaceName = schema ?? this.name; - const view = { name, schema: namespaceName, definition, materialized, withData }; - this.#views.push(view); - if (namespaceName != null) { - this.#namespaces.add(namespaceName); - } - return view; - } - getViews() { - return this.#views; - } - /** @internal */ - setViews(views) { - this.#views = views; - } - getView(name) { - return this.#views.find(v => v.name === name || `${v.schema}.${v.name}` === name); - } - hasView(name) { - return !!this.getView(name); - } - setNativeEnums(nativeEnums) { - this.#nativeEnums = nativeEnums; - for (const nativeEnum of Object.values(nativeEnums)) { - if (nativeEnum.schema && nativeEnum.schema !== '*') { - this.#namespaces.add(nativeEnum.schema); - } - } - } - getNativeEnums() { - return this.#nativeEnums; - } - getNativeEnum(name) { - return this.#nativeEnums[name]; - } - hasNamespace(namespace) { - return this.#namespaces.has(namespace); - } - hasNativeEnum(name) { - return name in this.#nativeEnums; - } - getNamespaces() { - return [...this.#namespaces]; - } - static async create(connection, platform, config, schemaName, schemas, takeTables, skipTables, skipViews) { - const schema = new DatabaseSchema(platform, schemaName ?? config.get('schema') ?? platform.getDefaultSchemaName()); - const allTables = await platform.getSchemaHelper().getAllTables(connection, schemas); - const parts = config.get('migrations').tableName.split('.'); - const migrationsTableName = parts[1] ?? parts[0]; - const migrationsSchemaName = parts.length > 1 ? parts[0] : config.get('schema', platform.getDefaultSchemaName()); - const tables = allTables.filter( - t => - this.isTableNameAllowed(t.table_name, takeTables, skipTables) && - (t.table_name !== migrationsTableName || (t.schema_name && t.schema_name !== migrationsSchemaName)), - ); - await platform - .getSchemaHelper() - .loadInformationSchema(schema, connection, tables, schemas && schemas.length > 0 ? schemas : undefined); - // Load views from database - await platform.getSchemaHelper().loadViews(schema, connection); - // Load materialized views (PostgreSQL only) - if (platform.supportsMaterializedViews()) { - await platform.getSchemaHelper().loadMaterializedViews(schema, connection, schemaName); - } - // Filter out skipped views - if (skipViews && skipViews.length > 0) { - schema.#views = schema.#views.filter(v => this.isNameAllowed(v.name, skipViews)); - } - return schema; - } - static fromMetadata(metadata, platform, config, schemaName, em) { - const schema = new DatabaseSchema(platform, schemaName ?? config.get('schema')); - const nativeEnums = {}; - const skipColumns = config.get('schemaGenerator').skipColumns || {}; - for (const meta of metadata) { - // Skip view entities when collecting native enums - if (meta.view) { - continue; - } - for (const prop of meta.props) { - if (prop.nativeEnumName) { - let key = prop.nativeEnumName; - let enumName = prop.nativeEnumName; - let enumSchema = meta.schema ?? schema.name; - if (key.includes('.')) { - const [explicitSchema, ...parts] = prop.nativeEnumName.split('.'); - enumName = parts.join('.'); - key = enumName; - enumSchema = explicitSchema; - } - if (enumSchema && enumSchema !== '*' && enumSchema !== platform.getDefaultSchemaName()) { - key = enumSchema + '.' + key; - } - nativeEnums[key] = { - name: enumName, - schema: enumSchema, - items: prop.items?.map(val => '' + val) ?? [], - }; - } - } - } - schema.setNativeEnums(nativeEnums); - for (const meta of metadata) { - // Handle view entities separately - if (meta.view) { - const viewDefinition = this.getViewDefinition(meta, em, platform); - if (viewDefinition) { - schema.addView( - meta.collection, - this.getSchemaName(meta, config, schemaName), - viewDefinition, - meta.materialized, - meta.withData, - ); - } - continue; - } - const table = schema.addTable(meta.collection, this.getSchemaName(meta, config, schemaName)); - table.comment = meta.comment; - // For TPT child entities, only use ownProps (properties defined in this entity only) - // For all other entities (including TPT root), use all props - const propsToProcess = - meta.inheritanceType === 'tpt' && meta.tptParent && meta.ownProps ? meta.ownProps : meta.props; - for (const prop of propsToProcess) { - if (!this.shouldHaveColumn(meta, prop, skipColumns)) { - continue; - } - table.addColumnFromProperty(prop, meta, config); - } - // For TPT child entities, always include the PK columns (they form the FK to parent) - if (meta.inheritanceType === 'tpt' && meta.tptParent) { - const pkProps = meta.primaryKeys.map(pk => meta.properties[pk]); - for (const pkProp of pkProps) { - // Only add if not already added (it might be in ownProps if defined in this entity) - if (!propsToProcess.includes(pkProp)) { - table.addColumnFromProperty(pkProp, meta, config); - } - // Child PK must not be autoincrement — it references the parent PK via FK - for (const field of pkProp.fieldNames) { - const col = table.getColumn(field); - if (col) { - col.autoincrement = false; - } - } - } - // Add FK from child PK to parent PK with ON DELETE CASCADE - this.addTPTForeignKey(table, meta, config, platform); - } - meta.indexes.forEach(index => table.addIndex(meta, index, 'index')); - meta.uniques.forEach(index => table.addIndex(meta, index, 'unique')); - // For TPT child entities, the PK is also defined here - const pkPropsForIndex = - meta.inheritanceType === 'tpt' && meta.tptParent - ? meta.primaryKeys.map(pk => meta.properties[pk]) - : meta.props.filter(prop => prop.primary); - table.addIndex(meta, { properties: pkPropsForIndex.map(prop => prop.name) }, 'primary'); - for (const check of meta.checks) { - const columnName = check.property ? meta.properties[check.property].fieldNames[0] : undefined; - const expression = isRaw(check.expression) - ? platform.formatQuery(check.expression.sql, check.expression.params) - : check.expression; - table.addCheck({ - name: check.name, - expression, - definition: `check (${expression})`, - columnName, - }); - } - } - return schema; - } - static getViewDefinition(meta, em, platform) { - if (typeof meta.expression === 'string') { - return meta.expression; - } - // Expression is a function, need to evaluate it - /* v8 ignore next */ - if (!em) { - return undefined; - } - const result = meta.expression(em, {}, {}); - // Async expressions are not supported for view entities - if (result && typeof result.then === 'function') { - throw new Error( - `View entity ${meta.className} expression returned a Promise. Async expressions are not supported for view entities.`, - ); - } - /* v8 ignore next */ - if (typeof result === 'string') { - return result; - } - /* v8 ignore next */ - if (isRaw(result)) { - return platform.formatQuery(result.sql, result.params); - } - // Check if it's a QueryBuilder (has getFormattedQuery method) - if (result && typeof result.getFormattedQuery === 'function') { - return result.getFormattedQuery(); - } - /* v8 ignore next - fallback for unknown result types */ - return undefined; - } - static getSchemaName(meta, config, schema) { - return (meta.schema === '*' ? schema : meta.schema) ?? config.get('schema'); - } - /** - * Add a foreign key from a TPT child entity's PK to its parent entity's PK. - * This FK uses ON DELETE CASCADE to ensure child rows are deleted when parent is deleted. - */ - static addTPTForeignKey(table, meta, config, platform) { - const parent = meta.tptParent; - const pkColumnNames = meta.primaryKeys.flatMap(pk => meta.properties[pk].fieldNames); - const parentPkColumnNames = parent.primaryKeys.flatMap(pk => parent.properties[pk].fieldNames); - // Determine the parent table name with schema - const parentSchema = - parent.schema === '*' ? undefined : (parent.schema ?? config.get('schema', platform.getDefaultSchemaName())); - const parentTableName = parentSchema ? `${parentSchema}.${parent.tableName}` : parent.tableName; - // Create FK constraint name - const constraintName = platform.getIndexName(table.name, pkColumnNames, 'foreign'); - // Add the foreign key to the table - const fks = table.getForeignKeys(); - fks[constraintName] = { - constraintName, - columnNames: pkColumnNames, - localTableName: table.getShortestName(false), - referencedColumnNames: parentPkColumnNames, - referencedTableName: parentTableName, - deleteRule: 'cascade', // TPT always uses cascade delete - updateRule: 'cascade', // TPT always uses cascade update - }; - } - static matchName(name, nameToMatch) { - return typeof nameToMatch === 'string' - ? name.toLocaleLowerCase() === nameToMatch.toLocaleLowerCase() - : nameToMatch.test(name); - } - static isNameAllowed(name, skipNames) { - return !(skipNames?.some(pattern => this.matchName(name, pattern)) ?? false); - } - static isTableNameAllowed(tableName, takeTables, skipTables) { - return ( - (takeTables?.some(tableNameToMatch => this.matchName(tableName, tableNameToMatch)) ?? true) && - this.isNameAllowed(tableName, skipTables) - ); - } - static shouldHaveColumn(meta, prop, skipColumns) { - if (prop.persist === false || (prop.columnTypes?.length ?? 0) === 0) { - return false; - } - // Check if column should be skipped - if (skipColumns) { - const tableName = meta.tableName; - const tableSchema = meta.schema; - const fullTableName = tableSchema ? `${tableSchema}.${tableName}` : tableName; - // Check for skipColumns by table name or fully qualified table name - const columnsToSkip = skipColumns[tableName] || skipColumns[fullTableName]; - if (columnsToSkip) { - for (const fieldName of prop.fieldNames) { - if (columnsToSkip.some(pattern => this.matchName(fieldName, pattern))) { - return false; - } - } - } - } - if (prop.kind === ReferenceKind.EMBEDDED && prop.object) { - return true; - } - const getRootProperty = prop => (prop.embedded ? getRootProperty(meta.properties[prop.embedded[0]]) : prop); - const rootProp = getRootProperty(prop); - if (rootProp.kind === ReferenceKind.EMBEDDED) { - return prop === rootProp || !rootProp.object; - } - return ( - [ReferenceKind.SCALAR, ReferenceKind.MANY_TO_ONE].includes(prop.kind) || - (prop.kind === ReferenceKind.ONE_TO_ONE && prop.owner) - ); - } - toJSON() { - return { - name: this.name, - namespaces: [...this.#namespaces], - tables: this.#tables, - views: this.#views, - nativeEnums: this.#nativeEnums, - }; - } - prune(schema, wildcardSchemaTables) { - const hasWildcardSchema = wildcardSchemaTables.length > 0; - this.#tables = this.#tables.filter(table => { - return ( - (!schema && !hasWildcardSchema) || // no schema specified and we don't have any multi-schema entity - table.schema === schema || // specified schema matches the table's one - (!schema && !wildcardSchemaTables.includes(table.name)) - ); // no schema specified and the table has fixed one provided - }); - this.#views = this.#views.filter(view => { - /* v8 ignore next */ - return ( - (!schema && !hasWildcardSchema) || - view.schema === schema || - (!schema && !wildcardSchemaTables.includes(view.name)) - ); - }); - // remove namespaces of ignored tables and views - for (const ns of this.#namespaces) { - if ( - !this.#tables.some(t => t.schema === ns) && - !this.#views.some(v => v.schema === ns) && - !Object.values(this.#nativeEnums).some(e => e.schema === ns) - ) { - this.#namespaces.delete(ns); - } - } - } -} diff --git a/node_modules/@mikro-orm/sql/schema/DatabaseTable.d.ts b/node_modules/@mikro-orm/sql/schema/DatabaseTable.d.ts deleted file mode 100644 index 228d9a2..0000000 --- a/node_modules/@mikro-orm/sql/schema/DatabaseTable.d.ts +++ /dev/null @@ -1,105 +0,0 @@ -import { - type Configuration, - type DeferMode, - type Dictionary, - type EntityMetadata, - type EntityProperty, - type IndexCallback, - type NamingStrategy, -} from '@mikro-orm/core'; -import type { SchemaHelper } from './SchemaHelper.js'; -import type { CheckDef, Column, ForeignKey, IndexDef } from '../typings.js'; -import type { AbstractSqlPlatform } from '../AbstractSqlPlatform.js'; -/** - * @internal - */ -export declare class DatabaseTable { - #private; - readonly name: string; - readonly schema?: string | undefined; - nativeEnums: Dictionary<{ - name: string; - schema?: string; - items: string[]; - }>; - comment?: string; - constructor(platform: AbstractSqlPlatform, name: string, schema?: string | undefined); - getQuotedName(): string; - getColumns(): Column[]; - getColumn(name: string): Column | undefined; - removeColumn(name: string): void; - getIndexes(): IndexDef[]; - getChecks(): CheckDef[]; - /** @internal */ - setIndexes(indexes: IndexDef[]): void; - /** @internal */ - setChecks(checks: CheckDef[]): void; - /** @internal */ - setForeignKeys(fks: Dictionary): void; - init( - cols: Column[], - indexes: IndexDef[] | undefined, - checks: CheckDef[] | undefined, - pks: string[], - fks?: Dictionary, - enums?: Dictionary, - ): void; - addColumn(column: Column): void; - addColumnFromProperty(prop: EntityProperty, meta: EntityMetadata, config: Configuration): void; - private getIndexName; - getEntityDeclaration( - namingStrategy: NamingStrategy, - schemaHelper: SchemaHelper, - scalarPropertiesForRelations: 'always' | 'never' | 'smart', - ): EntityMetadata; - private foreignKeysToProps; - private findFkIndex; - private getIndexProperties; - private getSafeBaseNameForFkProp; - /** - * The shortest name is stripped of the default namespace. All other namespaced elements are returned as full-qualified names. - */ - getShortestName(skipDefaultSchema?: boolean): string; - getForeignKeys(): Dictionary; - hasColumn(columnName: string): boolean; - getIndex(indexName: string): IndexDef | undefined; - hasIndex(indexName: string): boolean; - getCheck(checkName: string): CheckDef | undefined; - hasCheck(checkName: string): boolean; - getPrimaryKey(): IndexDef | undefined; - hasPrimaryKey(): boolean; - private getForeignKeyDeclaration; - private getPropertyDeclaration; - private getReferenceKind; - private getPropertyName; - private getPropertyTypeForForeignKey; - private getPropertyTypeForColumn; - private getPropertyDefaultValue; - private processIndexExpression; - addIndex( - meta: EntityMetadata, - index: { - properties?: string | string[]; - name?: string; - type?: string; - expression?: string | IndexCallback; - deferMode?: DeferMode | `${DeferMode}`; - options?: Dictionary; - columns?: { - name: string; - sort?: 'ASC' | 'DESC' | 'asc' | 'desc'; - nulls?: 'FIRST' | 'LAST' | 'first' | 'last'; - length?: number; - collation?: string; - }[]; - include?: string | string[]; - fillFactor?: number; - invisible?: boolean; - disabled?: boolean; - clustered?: boolean; - }, - type: 'index' | 'unique' | 'primary', - ): void; - addCheck(check: CheckDef): void; - toJSON(): Dictionary; -} diff --git a/node_modules/@mikro-orm/sql/schema/DatabaseTable.js b/node_modules/@mikro-orm/sql/schema/DatabaseTable.js deleted file mode 100644 index 2645439..0000000 --- a/node_modules/@mikro-orm/sql/schema/DatabaseTable.js +++ /dev/null @@ -1,1022 +0,0 @@ -import { - DecimalType, - EntitySchema, - RawQueryFragment, - ReferenceKind, - t, - Type, - UnknownType, - Utils, -} from '@mikro-orm/core'; -/** - * @internal - */ -export class DatabaseTable { - name; - schema; - #columns = {}; - #indexes = []; - #checks = []; - #foreignKeys = {}; - #platform; - nativeEnums = {}; // for postgres - comment; - constructor(platform, name, schema) { - this.name = name; - this.schema = schema; - this.#platform = platform; - } - getQuotedName() { - return this.#platform.quoteIdentifier(this.getShortestName()); - } - getColumns() { - return Object.values(this.#columns); - } - getColumn(name) { - return this.#columns[name]; - } - removeColumn(name) { - delete this.#columns[name]; - } - getIndexes() { - return Utils.removeDuplicates(this.#indexes); - } - getChecks() { - return this.#checks; - } - /** @internal */ - setIndexes(indexes) { - this.#indexes = indexes; - } - /** @internal */ - setChecks(checks) { - this.#checks = checks; - } - /** @internal */ - setForeignKeys(fks) { - this.#foreignKeys = fks; - } - init(cols, indexes = [], checks = [], pks, fks = {}, enums = {}) { - this.#indexes = indexes; - this.#checks = checks; - this.#foreignKeys = fks; - this.#columns = cols.reduce((o, v) => { - const index = indexes.filter(i => i.columnNames[0] === v.name); - v.primary = v.primary || pks.includes(v.name); - v.unique = index.some(i => i.unique && !i.primary); - const type = v.name in enums ? 'enum' : v.type; - v.mappedType = this.#platform.getMappedType(type); - v.default = v.default?.toString().startsWith('nextval(') ? null : v.default; - v.enumItems ??= enums[v.name] || []; - o[v.name] = v; - return o; - }, {}); - } - addColumn(column) { - this.#columns[column.name] = column; - } - addColumnFromProperty(prop, meta, config) { - prop.fieldNames?.forEach((field, idx) => { - const type = prop.enum ? 'enum' : prop.columnTypes[idx]; - const mappedType = this.#platform.getMappedType(type); - if (mappedType instanceof DecimalType) { - const match = /\w+\((\d+), ?(\d+)\)/.exec(prop.columnTypes[idx]); - /* v8 ignore next */ - if (match) { - prop.precision ??= +match[1]; - prop.scale ??= +match[2]; - prop.length = undefined; - } - } - if (prop.length == null && prop.columnTypes[idx]) { - prop.length = this.#platform.getSchemaHelper().inferLengthFromColumnType(prop.columnTypes[idx]); - if (typeof mappedType.getDefaultLength !== 'undefined') { - prop.length ??= mappedType.getDefaultLength(this.#platform); - } - } - const primary = !meta.compositePK && prop.fieldNames.length === 1 && !!prop.primary; - this.#columns[field] = { - name: prop.fieldNames[idx], - type: prop.columnTypes[idx], - generated: - prop.generated instanceof RawQueryFragment - ? this.#platform.formatQuery(prop.generated.sql, prop.generated.params) - : prop.generated, - mappedType, - unsigned: prop.unsigned && this.#platform.isNumericColumn(mappedType), - autoincrement: - prop.autoincrement ?? - (primary && prop.kind === ReferenceKind.SCALAR && this.#platform.isNumericColumn(mappedType)), - primary, - nullable: this.#columns[field]?.nullable ?? !!prop.nullable, - nativeEnumName: prop.nativeEnumName, - length: prop.length, - precision: prop.precision, - scale: prop.scale, - default: prop.defaultRaw, - enumItems: prop.nativeEnumName || prop.items?.every(i => typeof i === 'string') ? prop.items : undefined, - comment: prop.comment, - extra: prop.extra, - ignoreSchemaChanges: prop.ignoreSchemaChanges, - }; - this.#columns[field].unsigned ??= this.#columns[field].autoincrement; - if (this.nativeEnums[type]) { - this.#columns[field].enumItems ??= this.nativeEnums[type].items; - } - const defaultValue = this.#platform.getSchemaHelper().normalizeDefaultValue(prop.defaultRaw, prop.length); - this.#columns[field].default = defaultValue; - }); - if ([ReferenceKind.MANY_TO_ONE, ReferenceKind.ONE_TO_ONE].includes(prop.kind) && !prop.polymorphic) { - const constraintName = this.getIndexName(prop.foreignKeyName ?? true, prop.fieldNames, 'foreign'); - let schema = - prop.targetMeta.root.schema === '*' - ? this.schema - : (prop.targetMeta.root.schema ?? config.get('schema', this.#platform.getDefaultSchemaName())); - if (prop.referencedTableName.includes('.')) { - schema = undefined; - } - // For cross-schema FKs on MySQL/MariaDB (where schema = database), when the referenced - // table has no explicit schema but the current table does, qualify with dbName so the - // FK can resolve the referenced table in the correct database - if (!schema && this.schema && !this.#platform.getDefaultSchemaName()) { - schema = config.get('dbName'); - } - if (prop.createForeignKeyConstraint) { - this.#foreignKeys[constraintName] = { - constraintName, - columnNames: prop.fieldNames, - localTableName: this.getShortestName(false), - referencedColumnNames: prop.referencedColumnNames, - referencedTableName: schema ? `${schema}.${prop.referencedTableName}` : prop.referencedTableName, - }; - const schemaConfig = config.get('schemaGenerator'); - this.#foreignKeys[constraintName].deleteRule = prop.deleteRule ?? schemaConfig.defaultDeleteRule; - this.#foreignKeys[constraintName].updateRule = prop.updateRule ?? schemaConfig.defaultUpdateRule; - if (prop.deferMode) { - this.#foreignKeys[constraintName].deferMode = prop.deferMode; - } - } - } - if (prop.index) { - this.#indexes.push({ - columnNames: prop.fieldNames, - composite: prop.fieldNames.length > 1, - keyName: this.getIndexName(prop.index, prop.fieldNames, 'index'), - constraint: false, - primary: false, - unique: false, - }); - } - if (prop.unique && !(prop.primary && !meta.compositePK)) { - this.#indexes.push({ - columnNames: prop.fieldNames, - composite: prop.fieldNames.length > 1, - keyName: this.getIndexName(prop.unique, prop.fieldNames, 'unique'), - constraint: !prop.fieldNames.some(d => d.includes('.')), - primary: false, - unique: true, - deferMode: prop.deferMode, - }); - } - } - getIndexName(value, columnNames, type) { - if (typeof value === 'string') { - return value; - } - return this.#platform.getIndexName(this.name, columnNames, type); - } - getEntityDeclaration(namingStrategy, schemaHelper, scalarPropertiesForRelations) { - const { fksOnColumnProps, fksOnStandaloneProps, columnFks, fkIndexes, nullableForeignKeys, skippedColumnNames } = - this.foreignKeysToProps(namingStrategy, scalarPropertiesForRelations); - const name = namingStrategy.getEntityName(this.name, this.schema); - const schema = new EntitySchema({ name, collection: this.name, schema: this.schema, comment: this.comment }); - const compositeFkIndexes = {}; - const compositeFkUniques = {}; - const potentiallyUnmappedIndexes = this.#indexes.filter( - index => - !index.primary && // Skip primary index. Whether it's in use by scalar column or FK, it's already mapped. - // Non-trivial non-composite indexes will be declared at the entity's metadata, though later outputted in the property - (index.columnNames.length > 1 || // All composite indexes are to be mapped to entity decorators or FK props. - skippedColumnNames.includes(index.columnNames[0]) || // Non-composite indexes for skipped columns are to be mapped as entity decorators. - index.deferMode || - index.expression || - !(index.columnNames[0] in columnFks)) && // Trivial non-composite indexes for scalar props are to be mapped to the column. - // ignore indexes that don't have all column names (this can happen in sqlite where there is no way to infer this for expressions) - !(index.columnNames.some(col => !col) && !index.expression), - ); - // Helper to map column name to property name - const columnToPropertyName = colName => this.getPropertyName(namingStrategy, colName); - for (const index of potentiallyUnmappedIndexes) { - // Build the index/unique options object with advanced options - const ret = { - name: index.keyName, - deferMode: index.deferMode, - expression: index.expression, - // Advanced index options - convert column names to property names - columns: index.columns?.map(col => ({ - ...col, - name: columnToPropertyName(col.name), - })), - include: index.include?.map(colName => columnToPropertyName(colName)), - fillFactor: index.fillFactor, - disabled: index.disabled, - }; - // Index-only options (not valid for Unique) - if (!index.unique) { - if (index.type) { - // Convert index type - IndexDef.type can be string or object, IndexOptions.type is just string - ret.type = typeof index.type === 'string' ? index.type : index.type.indexType; - } - if (index.invisible) { - ret.invisible = index.invisible; - } - if (index.clustered) { - ret.clustered = index.clustered; - } - } - // An index is trivial if it has no special options that require entity-level declaration - const hasAdvancedOptions = - index.columns?.length || - index.include?.length || - index.fillFactor || - index.type || - index.invisible || - index.disabled || - index.clustered; - const isTrivial = !index.deferMode && !index.expression && !hasAdvancedOptions; - if (isTrivial) { - // Index is for FK. Map to the FK prop and move on. - const fkForIndex = fkIndexes.get(index); - if (fkForIndex && !fkForIndex.fk.columnNames.some(col => !index.columnNames.includes(col))) { - ret.properties = [this.getPropertyName(namingStrategy, fkForIndex.baseName, fkForIndex.fk)]; - const map = index.unique ? compositeFkUniques : compositeFkIndexes; - if (typeof map[ret.properties[0]] === 'undefined') { - map[ret.properties[0]] = index; - continue; - } - } - } - const properties = - ret.properties ?? - this.getIndexProperties(index, columnFks, fksOnColumnProps, fksOnStandaloneProps, namingStrategy); - // If there is a column that cannot be unambiguously mapped to a prop, render an expression. - if (typeof properties === 'undefined') { - ret.expression ??= schemaHelper.getCreateIndexSQL(this.name, index); - } else { - ret.properties ??= properties; - // If the index is for one property that is not a FK prop, map to the column prop and move on. - if (properties.length === 1 && isTrivial && !fksOnStandaloneProps.has(properties[0])) { - const map = index.unique ? compositeFkUniques : compositeFkIndexes; - // Only map one trivial index. If the same column is indexed many times over, output - if (typeof map[properties[0]] === 'undefined') { - map[properties[0]] = index; - continue; - } - } - } - // Composite indexes that aren't exclusively mapped to FK props get an entity decorator. - if (index.unique) { - schema.addUnique(ret); - continue; - } - schema.addIndex(ret); - } - const addedStandaloneFkPropsBasedOnColumn = new Set(); - const nonSkippedColumns = this.getColumns().filter(column => !skippedColumnNames.includes(column.name)); - for (const column of nonSkippedColumns) { - const columnName = column.name; - const standaloneFkPropBasedOnColumn = fksOnStandaloneProps.get(columnName); - if (standaloneFkPropBasedOnColumn && !fksOnColumnProps.get(columnName)) { - addedStandaloneFkPropsBasedOnColumn.add(columnName); - const { fkIndex, currentFk } = standaloneFkPropBasedOnColumn; - const prop = this.getForeignKeyDeclaration( - currentFk, - namingStrategy, - schemaHelper, - fkIndex, - nullableForeignKeys.has(currentFk), - columnName, - fksOnColumnProps, - ); - schema.addProperty(prop.name, prop.type, prop); - } - const prop = this.getPropertyDeclaration( - column, - namingStrategy, - schemaHelper, - compositeFkIndexes, - compositeFkUniques, - columnFks, - fksOnColumnProps.get(columnName), - ); - schema.addProperty(prop.name, prop.type, prop); - } - for (const [propBaseName, { fkIndex, currentFk }] of fksOnStandaloneProps.entries()) { - if (addedStandaloneFkPropsBasedOnColumn.has(propBaseName)) { - continue; - } - const prop = this.getForeignKeyDeclaration( - currentFk, - namingStrategy, - schemaHelper, - fkIndex, - nullableForeignKeys.has(currentFk), - propBaseName, - fksOnColumnProps, - ); - schema.addProperty(prop.name, prop.type, prop); - } - const meta = schema.init().meta; - const oneToOneCandidateProperties = meta.relations.filter( - prop => prop.primary && prop.kind === ReferenceKind.MANY_TO_ONE, - ); - if ( - oneToOneCandidateProperties.length === 1 && - oneToOneCandidateProperties[0].fieldNames.length === - new Set(meta.getPrimaryProps().flatMap(prop => prop.fieldNames)).size - ) { - oneToOneCandidateProperties[0].kind = ReferenceKind.ONE_TO_ONE; - } - return meta; - } - foreignKeysToProps(namingStrategy, scalarPropertiesForRelations) { - const fks = Object.values(this.getForeignKeys()); - const fksOnColumnProps = new Map(); - const fksOnStandaloneProps = new Map(); - const columnFks = {}; - const fkIndexes = new Map(); - const nullableForeignKeys = new Set(); - const standaloneFksBasedOnColumnNames = new Map(); - for (const currentFk of fks) { - const fkIndex = this.findFkIndex(currentFk); - if ( - currentFk.columnNames.length === 1 && - !fks.some( - fk => fk !== currentFk && fk.columnNames.length === 1 && currentFk.columnNames[0] === fk.columnNames[0], - ) - ) { - // Non-composite FK is the only possible one for a column. Render the column with it. - const columnName = currentFk.columnNames[0]; - columnFks[columnName] ??= []; - columnFks[columnName].push(currentFk); - if (this.getColumn(columnName)?.nullable) { - nullableForeignKeys.add(currentFk); - } - if (scalarPropertiesForRelations === 'always') { - const baseName = this.getSafeBaseNameForFkProp(namingStrategy, currentFk, fks, columnName); - standaloneFksBasedOnColumnNames.set(baseName, currentFk); - fksOnStandaloneProps.set(baseName, { fkIndex, currentFk }); - if (fkIndex) { - fkIndexes.set(fkIndex, { fk: currentFk, baseName }); - } - } else { - fksOnColumnProps.set(columnName, currentFk); - if (fkIndex) { - fkIndexes.set(fkIndex, { fk: currentFk, baseName: columnName }); - } - } - continue; - } - const specificColumnNames = []; - const nullableColumnsInFk = []; - for (const columnName of currentFk.columnNames) { - columnFks[columnName] ??= []; - columnFks[columnName].push(currentFk); - if (!fks.some(fk => fk !== currentFk && fk.columnNames.includes(columnName))) { - specificColumnNames.push(columnName); - } - if (this.getColumn(columnName)?.nullable) { - nullableColumnsInFk.push(columnName); - } - } - if (nullableColumnsInFk.length > 0) { - nullableForeignKeys.add(currentFk); - } - if ( - specificColumnNames.length === 1 && - (nullableColumnsInFk.length === currentFk.columnNames.length || - nullableColumnsInFk.length === 0 || - (nullableColumnsInFk.length === 1 && nullableColumnsInFk[0] === specificColumnNames[0])) - ) { - // Composite FK has exactly one column which is not used in any other FK. - // The FK also doesn't have a mix of nullable and non-nullable columns, - // or its only nullable column is this very one. - // It is safe to just render this FK attached to the specific column. - const columnName = specificColumnNames[0]; - if (scalarPropertiesForRelations === 'always') { - const baseName = this.getSafeBaseNameForFkProp(namingStrategy, currentFk, fks, columnName); - standaloneFksBasedOnColumnNames.set(baseName, currentFk); - fksOnStandaloneProps.set(baseName, { fkIndex, currentFk }); - if (fkIndex) { - fkIndexes.set(fkIndex, { fk: currentFk, baseName }); - } - } else { - fksOnColumnProps.set(columnName, currentFk); - if (fkIndex) { - fkIndexes.set(fkIndex, { fk: currentFk, baseName: columnName }); - } - } - continue; - } - if (specificColumnNames.length === currentFk.columnNames.length) { - // All columns involved with this FK are only covered by this one FK. - if (nullableColumnsInFk.length <= 1) { - // Also, this FK is either not nullable, or has only one nullable column. - // It is safe to name the FK after the nullable column, or any non-nullable one (the first one is picked). - const columnName = nullableColumnsInFk.at(0) ?? currentFk.columnNames[0]; - if (scalarPropertiesForRelations === 'always') { - const baseName = this.getSafeBaseNameForFkProp(namingStrategy, currentFk, fks, columnName); - standaloneFksBasedOnColumnNames.set(baseName, currentFk); - fksOnStandaloneProps.set(baseName, { fkIndex, currentFk }); - if (fkIndex) { - fkIndexes.set(fkIndex, { fk: currentFk, baseName }); - } - } else { - fksOnColumnProps.set(columnName, currentFk); - if (fkIndex) { - fkIndexes.set(fkIndex, { fk: currentFk, baseName: columnName }); - } - } - continue; - } - // If the first nullable column's name with FK is different from the name without FK, - // name a standalone prop after the column, but treat the column prop itself as not having FK. - const columnName = nullableColumnsInFk[0]; - const baseName = this.getSafeBaseNameForFkProp(namingStrategy, currentFk, fks, columnName); - standaloneFksBasedOnColumnNames.set(baseName, currentFk); - fksOnStandaloneProps.set(baseName, { fkIndex, currentFk }); - if (fkIndex) { - fkIndexes.set(fkIndex, { fk: currentFk, baseName }); - } - continue; - } - // FK is not unambiguously mappable to a column. Pick another name for a standalone FK prop. - const baseName = this.getSafeBaseNameForFkProp(namingStrategy, currentFk, fks); - fksOnStandaloneProps.set(baseName, { fkIndex, currentFk }); - if (fkIndex) { - fkIndexes.set(fkIndex, { fk: currentFk, baseName }); - } - } - const columnsInFks = Object.keys(columnFks); - const skippingHandlers = { - // Never generate scalar props for composite keys, - // i.e. always skip columns if they are covered by foreign keys. - never: column => columnsInFks.includes(column.name) && !fksOnColumnProps.has(column.name), - // Always generate scalar props for composite keys, - // i.e. do not skip columns, even if they are covered by foreign keys. - always: column => false, - // Smart scalar props generation. - // Skips columns if they are covered by foreign keys. - // But also does not skip if the column is not nullable, and yet all involved FKs are nullable, - // or if one or more FKs involved has multiple nullable columns. - smart: column => { - return ( - columnsInFks.includes(column.name) && - !fksOnColumnProps.has(column.name) && - (column.nullable - ? columnFks[column.name].some( - fk => - !fk.columnNames.some( - fkColumnName => fkColumnName !== column.name && this.getColumn(fkColumnName)?.nullable, - ), - ) - : columnFks[column.name].some(fk => !nullableForeignKeys.has(fk))) - ); - }, - }; - const skippedColumnNames = this.getColumns() - .filter(skippingHandlers[scalarPropertiesForRelations]) - .map(column => column.name); - // Check standalone FKs named after columns for potential conflicts among themselves. - // This typically happens when two standalone FKs named after a column resolve to the same prop name - // because the respective columns include the referenced table in the name. - // Depending on naming strategy and actual names, it may also originate from other scenarios. - // We do our best to de-duplicate them here. - const safePropNames = new Set(); - const unsafePropNames = new Map(); - for (const [unsafeBaseName, currentFk] of standaloneFksBasedOnColumnNames) { - const propName = this.getPropertyName(namingStrategy, unsafeBaseName, currentFk); - if (safePropNames.has(propName)) { - if (!unsafePropNames.has(propName)) { - unsafePropNames.set(propName, []); - } - unsafePropNames.get(propName).push({ unsafeBaseName, currentFk }); - continue; - } - safePropNames.add(propName); - } - for (const [unsafePropName, affectedBaseNames] of unsafePropNames) { - safePropNames.delete(unsafePropName); - for (const { unsafeBaseName, currentFk } of affectedBaseNames) { - const newBaseName = this.getSafeBaseNameForFkProp(namingStrategy, currentFk, fks); - fksOnStandaloneProps.delete(unsafeBaseName); - let fkIndex; - for (const [indexDef, fkIndexDesc] of fkIndexes) { - if (fkIndexDesc.fk !== currentFk) { - continue; - } - fkIndexDesc.baseName = newBaseName; - fkIndex = indexDef; - break; - } - fksOnStandaloneProps.set(newBaseName, { fkIndex, currentFk }); - } - } - return { fksOnColumnProps, fksOnStandaloneProps, columnFks, fkIndexes, nullableForeignKeys, skippedColumnNames }; - } - findFkIndex(currentFk) { - const fkColumnsLength = currentFk.columnNames.length; - const possibleIndexes = this.#indexes.filter(index => { - return ( - index.columnNames.length === fkColumnsLength && - !currentFk.columnNames.some((columnName, i) => index.columnNames[i] !== columnName) - ); - }); - possibleIndexes.sort((a, b) => { - if (a.primary !== b.primary) { - return a.primary ? -1 : 1; - } - if (a.unique !== b.unique) { - return a.unique ? -1 : 1; - } - return a.keyName.localeCompare(b.keyName); - }); - return possibleIndexes.at(0); - } - getIndexProperties(index, columnFks, fksOnColumnProps, fksOnStandaloneProps, namingStrategy) { - const propBaseNames = new Set(); - const columnNames = index.columnNames; - const l = columnNames.length; - if (columnNames.some(col => !col)) { - return; - } - for (let i = 0; i < l; ++i) { - const columnName = columnNames[i]; - // The column is not involved with FKs. - if (!(columnName in columnFks)) { - // If there is no such column, the "name" is actually an expression. - if (!this.hasColumn(columnName)) { - return; - } - // It has a prop named after it. - // Add it and move on. - propBaseNames.add(columnName); - continue; - } - // If the prop named after the column has a FK and the FK's columns are a subset of this index, - // include this prop and move on. - const columnPropFk = fksOnColumnProps.get(columnName); - if (columnPropFk && !columnPropFk.columnNames.some(fkColumnName => !columnNames.includes(fkColumnName))) { - propBaseNames.add(columnName); - continue; - } - // If there is at least one standalone FK featuring this column, - // and all of its columns are a subset of this index, - // include that FK, and consider mapping of this column to a prop a success. - let propAdded = false; - for (const [propName, { currentFk: fk }] of fksOnStandaloneProps) { - if (!columnFks[columnName].includes(fk)) { - continue; - } - if (!fk.columnNames.some(fkColumnName => !columnNames.includes(fkColumnName))) { - propBaseNames.add(propName); - propAdded = true; - } - } - if (propAdded) { - continue; - } - // If we have reached this point, it means the column is not mappable to a prop name. - // Break the whole prop creation. - return; - } - return Array.from(propBaseNames).map(baseName => - this.getPropertyName(namingStrategy, baseName, fksOnColumnProps.get(baseName)), - ); - } - getSafeBaseNameForFkProp(namingStrategy, currentFk, fks, columnName) { - if ( - columnName && - this.getPropertyName(namingStrategy, columnName, currentFk) !== this.getPropertyName(namingStrategy, columnName) - ) { - // The eligible scalar column name is different from the name of the FK prop of the same column. - // Both can be safely rendered. - // Use the column name as a base for the FK prop. - return columnName; - } - // Strip schema prefix from referenced table name (e.g., "public.fr_usuario" -> "fr_usuario") - const getTableName = fullName => { - const parts = fullName.split('.'); - return parts[parts.length - 1]; - }; - const referencedTableName = getTableName(currentFk.referencedTableName); - // Check for conflicts using stripped table names (handles cross-schema FKs to same-named tables) - const hasConflictingFk = fks.some( - fk => fk !== currentFk && getTableName(fk.referencedTableName) === referencedTableName, - ); - if (!hasConflictingFk && !this.getColumn(referencedTableName)) { - // FK is the only one in this table that references a table with this name. - // The name of the referenced table is not shared with a column in this table, - // so it is safe to output prop name based on the referenced entity. - return referencedTableName; - } - // Any ambiguous FK is rendered with a name based on the FK constraint name - let finalPropBaseName = currentFk.constraintName; - while (this.getColumn(finalPropBaseName)) { - // In the unlikely event that the FK constraint name is shared by a column name, generate a name by - // continuously prefixing with "fk_", until a non-existent column is hit. - // The worst case scenario is a very long name with several repeated "fk_" - // that is not really a valid DB identifier but a valid JS variable name. - finalPropBaseName = `fk_${finalPropBaseName}`; - } - return finalPropBaseName; - } - /** - * The shortest name is stripped of the default namespace. All other namespaced elements are returned as full-qualified names. - */ - getShortestName(skipDefaultSchema = true) { - const defaultSchema = this.#platform.getDefaultSchemaName(); - if ( - !this.schema || - this.name.startsWith(defaultSchema + '.') || - (this.schema === defaultSchema && skipDefaultSchema) - ) { - return this.name; - } - return `${this.schema}.${this.name}`; - } - getForeignKeys() { - return this.#foreignKeys; - } - hasColumn(columnName) { - return columnName in this.#columns; - } - getIndex(indexName) { - return this.#indexes.find(i => i.keyName === indexName); - } - hasIndex(indexName) { - return !!this.getIndex(indexName); - } - getCheck(checkName) { - return this.#checks.find(i => i.name === checkName); - } - hasCheck(checkName) { - return !!this.getCheck(checkName); - } - getPrimaryKey() { - return this.#indexes.find(i => i.primary); - } - hasPrimaryKey() { - return !!this.getPrimaryKey(); - } - getForeignKeyDeclaration(fk, namingStrategy, schemaHelper, fkIndex, nullable, propNameBase, fksOnColumnProps) { - const prop = this.getPropertyName(namingStrategy, propNameBase, fk); - const kind = fkIndex?.unique && !fkIndex.primary ? this.getReferenceKind(fk, fkIndex) : this.getReferenceKind(fk); - const runtimeType = this.getPropertyTypeForForeignKey(namingStrategy, fk); - const fkOptions = {}; - fkOptions.fieldNames = fk.columnNames; - fkOptions.referencedTableName = fk.referencedTableName; - fkOptions.referencedColumnNames = fk.referencedColumnNames; - fkOptions.updateRule = fk.updateRule?.toLowerCase(); - fkOptions.deleteRule = fk.deleteRule?.toLowerCase(); - fkOptions.deferMode = fk.deferMode; - fkOptions.columnTypes = fk.columnNames.map(c => this.getColumn(c).type); - const columnOptions = {}; - if (fk.columnNames.length === 1) { - const column = this.getColumn(fk.columnNames[0]); - const defaultRaw = this.getPropertyDefaultValue(schemaHelper, column, column.type, true); - const defaultTs = this.getPropertyDefaultValue(schemaHelper, column, column.type); - columnOptions.default = defaultRaw !== defaultTs || defaultRaw === '' ? defaultTs : undefined; - columnOptions.defaultRaw = column.nullable && defaultRaw === 'null' ? undefined : defaultRaw; - columnOptions.optional = typeof column.generated !== 'undefined' || defaultRaw !== 'null'; - columnOptions.generated = column.generated; - columnOptions.nullable = column.nullable; - columnOptions.primary = column.primary; - columnOptions.length = column.length; - columnOptions.precision = column.precision; - columnOptions.scale = column.scale; - columnOptions.extra = column.extra; - columnOptions.comment = column.comment; - columnOptions.enum = !!column.enumItems?.length; - columnOptions.items = column.enumItems; - } - return { - name: prop, - type: runtimeType, - runtimeType, - kind, - ...columnOptions, - nullable, - primary: - fkIndex?.primary || !fk.columnNames.some(columnName => !this.getPrimaryKey()?.columnNames.includes(columnName)), - index: !fkIndex?.unique ? fkIndex?.keyName : undefined, - unique: fkIndex?.unique && !fkIndex.primary ? fkIndex.keyName : undefined, - ...fkOptions, - }; - } - getPropertyDeclaration(column, namingStrategy, schemaHelper, compositeFkIndexes, compositeFkUniques, columnFks, fk) { - const prop = this.getPropertyName(namingStrategy, column.name, fk); - const persist = !(column.name in columnFks && typeof fk === 'undefined'); - const index = - compositeFkIndexes[prop] || - this.#indexes.find(idx => idx.columnNames[0] === column.name && !idx.composite && !idx.unique && !idx.primary); - const unique = - compositeFkUniques[prop] || - this.#indexes.find(idx => idx.columnNames[0] === column.name && !idx.composite && idx.unique && !idx.primary); - const kind = this.getReferenceKind(fk, unique); - const runtimeType = this.getPropertyTypeForColumn(namingStrategy, column, fk); - const type = fk - ? runtimeType - : (Utils.keys(t).find(k => { - const typeInCoreMap = this.#platform.getMappedType(k); - return ( - (typeInCoreMap !== Type.getType(UnknownType) || k === 'unknown') && typeInCoreMap === column.mappedType - ); - }) ?? runtimeType); - const ignoreSchemaChanges = - type === 'unknown' && column.length ? (column.extra ? ['type', 'extra'] : ['type']) : undefined; - const defaultRaw = this.getPropertyDefaultValue(schemaHelper, column, runtimeType, true); - const defaultParsed = this.getPropertyDefaultValue(schemaHelper, column, runtimeType); - const defaultTs = defaultRaw !== defaultParsed || defaultParsed === '' ? defaultParsed : undefined; - const fkOptions = {}; - if (fk) { - fkOptions.fieldNames = fk.columnNames; - fkOptions.referencedTableName = fk.referencedTableName; - fkOptions.referencedColumnNames = fk.referencedColumnNames; - fkOptions.updateRule = fk.updateRule?.toLowerCase(); - fkOptions.deleteRule = fk.deleteRule?.toLowerCase(); - fkOptions.deferMode = fk.deferMode; - fkOptions.columnTypes = fk.columnNames.map(col => this.getColumn(col).type); - } - const ret = { - name: prop, - type, - runtimeType, - kind, - ignoreSchemaChanges, - generated: column.generated, - optional: defaultRaw !== 'null' || defaultTs != null || typeof column.generated !== 'undefined', - columnType: column.type, - default: defaultTs, - defaultRaw: column.nullable && defaultRaw === 'null' ? undefined : defaultRaw, - nullable: column.nullable, - primary: column.primary && persist, - autoincrement: column.autoincrement, - fieldName: column.name, - unsigned: column.unsigned, - length: column.length, - precision: column.precision, - scale: column.scale, - extra: column.extra, - comment: column.comment, - index: index ? index.keyName : undefined, - unique: unique ? unique.keyName : undefined, - enum: !!column.enumItems?.length, - items: column.enumItems, - persist, - ...fkOptions, - }; - const nativeEnumName = Object.keys(this.nativeEnums).find(name => name === column.type); - if (nativeEnumName) { - ret.nativeEnumName = nativeEnumName; - } - return ret; - } - getReferenceKind(fk, unique) { - if (fk && unique) { - return ReferenceKind.ONE_TO_ONE; - } - if (fk) { - return ReferenceKind.MANY_TO_ONE; - } - return ReferenceKind.SCALAR; - } - getPropertyName(namingStrategy, baseName, fk) { - let field = baseName; - if (fk) { - const idx = fk.columnNames.indexOf(baseName); - let replacedFieldName = field.replace(new RegExp(`_${fk.referencedColumnNames[idx]}$`), ''); - if (replacedFieldName === field) { - replacedFieldName = field.replace(new RegExp(`_${namingStrategy.referenceColumnName()}$`), ''); - } - field = replacedFieldName; - } - if (field.startsWith('_')) { - return field; - } - return namingStrategy.columnNameToProperty(field); - } - getPropertyTypeForForeignKey(namingStrategy, fk) { - const parts = fk.referencedTableName.split('.', 2); - return namingStrategy.getEntityName(...parts.reverse()); - } - getPropertyTypeForColumn(namingStrategy, column, fk) { - if (fk) { - return this.getPropertyTypeForForeignKey(namingStrategy, fk); - } - const enumMode = this.#platform.getConfig().get('entityGenerator').enumMode; - // If this column is using an enum. - if (column.enumItems?.length) { - const name = column.nativeEnumName ?? column.name; - const tableName = column.nativeEnumName ? undefined : this.name; - if (enumMode === 'ts-enum') { - // We will create a new enum name for this type and set it as the property type as well. - return namingStrategy.getEnumClassName(name, tableName, this.schema); - } - // With other enum strategies, we need to use the type name. - return namingStrategy.getEnumTypeName(name, tableName, this.schema); - } - return column.mappedType?.runtimeType ?? 'unknown'; - } - getPropertyDefaultValue(schemaHelper, column, propType, raw = false) { - const defaultValue = column.default ?? 'null'; - const val = schemaHelper.normalizeDefaultValue(defaultValue, column.length); - if (val === 'null') { - return raw ? 'null' : column.nullable ? null : undefined; - } - if (propType === 'boolean' && !raw) { - return !['0', 'false', 'f', 'n', 'no', 'off'].includes('' + column.default); - } - if (propType === 'number' && !raw) { - return +defaultValue; - } - // unquote string defaults if `raw = false` - const match = /^'(.*)'$/.exec('' + val); - if (!raw && match) { - return match[1]; - } - return '' + val; - } - processIndexExpression(indexName, expression, meta) { - if (expression instanceof Function) { - const qualifiedName = this.schema ? `${this.schema}.${this.name}` : this.name; - const table = { - name: this.name, - schema: this.schema, - qualifiedName, - toString: () => qualifiedName, - }; - const columns = meta.createSchemaColumnMappingObject(); - const exp = expression(columns, table, indexName); - return exp instanceof RawQueryFragment ? this.#platform.formatQuery(exp.sql, exp.params) : exp; - } - return expression; - } - addIndex(meta, index, type) { - // If columns are specified but properties are not, derive properties from column names - if ( - index.columns?.length && - !index.expression && - (!index.properties || Utils.asArray(index.properties).length === 0) - ) { - index = { ...index, properties: index.columns.map(c => c.name) }; - } - const properties = Utils.unique( - Utils.flatten( - Utils.asArray(index.properties).map(prop => { - const parts = prop.split('.'); - const root = parts[0]; - if (meta.properties[prop]) { - if (meta.properties[prop].embeddedPath) { - return [meta.properties[prop].embeddedPath.join('.')]; - } - return meta.properties[prop].fieldNames; - } - const rootProp = meta.properties[root]; - // inline embedded property index, we need to find the field name of the child property - if (rootProp?.embeddable && !rootProp.object && parts.length > 1) { - const expand = (p, i) => { - if (parts.length === i) { - return p.fieldNames[0]; - } - return expand(p.embeddedProps[parts[i]], i + 1); - }; - return [expand(rootProp, 1)]; - } - // json index, we need to rename the column only - if (rootProp) { - return [prop.replace(root, rootProp.fieldNames[0])]; - } - /* v8 ignore next */ - return [prop]; - }), - ), - ); - if (properties.length === 0 && !index.expression) { - return; - } - const name = this.getIndexName(index.name, properties, type); - // Process include columns (map property names to field names) - const includeColumns = index.include - ? Utils.unique( - Utils.flatten( - Utils.asArray(index.include).map(prop => { - if (meta.properties[prop]) { - return meta.properties[prop].fieldNames; - } - /* v8 ignore next */ - return [prop]; - }), - ), - ) - : undefined; - // Process columns with advanced options (map property names to field names) - const columns = index.columns?.map(col => { - const fieldName = meta.properties[col.name]?.fieldNames[0] ?? col.name; - return { - name: fieldName, - sort: col.sort?.toUpperCase(), - nulls: col.nulls?.toUpperCase(), - length: col.length, - collation: col.collation, - }; - }); - // Validate that column options reference fields in the index properties - if (columns?.length && properties.length > 0) { - for (const col of columns) { - if (!properties.includes(col.name)) { - throw new Error( - `Index '${name}' on entity '${meta.className}': column option references field '${col.name}' which is not in the index properties`, - ); - } - } - } - // Validate fillFactor range - if (index.fillFactor != null && (index.fillFactor < 0 || index.fillFactor > 100)) { - throw new Error( - `fillFactor must be between 0 and 100, got ${index.fillFactor} for index '${name}' on entity '${meta.className}'`, - ); - } - this.#indexes.push({ - keyName: name, - columnNames: properties, - composite: properties.length > 1, - // JSON columns can have unique index but not unique constraint, and we need to distinguish those, so we can properly drop them - constraint: type !== 'index' && !properties.some(d => d.includes('.')), - primary: type === 'primary', - unique: type !== 'index', - type: index.type, - expression: this.processIndexExpression(name, index.expression, meta), - options: index.options, - deferMode: index.deferMode, - columns, - include: includeColumns, - fillFactor: index.fillFactor, - invisible: index.invisible, - disabled: index.disabled, - clustered: index.clustered, - }); - } - addCheck(check) { - this.#checks.push(check); - } - toJSON() { - const columns = this.#columns; - const columnsMapped = Utils.keys(columns).reduce((o, col) => { - const c = columns[col]; - const normalized = { - name: c.name, - type: c.type, - unsigned: !!c.unsigned, - autoincrement: !!c.autoincrement, - primary: !!c.primary, - nullable: !!c.nullable, - unique: !!c.unique, - length: c.length ?? null, - precision: c.precision ?? null, - scale: c.scale ?? null, - default: c.default ?? null, - comment: c.comment ?? null, - enumItems: c.enumItems ?? [], - mappedType: Utils.keys(t).find(k => t[k] === c.mappedType.constructor), - }; - if (c.generated) { - normalized.generated = c.generated; - } - if (c.nativeEnumName) { - normalized.nativeEnumName = c.nativeEnumName; - } - if (c.extra) { - normalized.extra = c.extra; - } - if (c.ignoreSchemaChanges) { - normalized.ignoreSchemaChanges = c.ignoreSchemaChanges; - } - if (c.defaultConstraint) { - normalized.defaultConstraint = c.defaultConstraint; - } - o[col] = normalized; - return o; - }, {}); - return { - name: this.name, - schema: this.schema, - columns: columnsMapped, - indexes: this.#indexes, - checks: this.#checks, - foreignKeys: this.#foreignKeys, - nativeEnums: this.nativeEnums, - comment: this.comment, - }; - } -} diff --git a/node_modules/@mikro-orm/sql/schema/SchemaComparator.d.ts b/node_modules/@mikro-orm/sql/schema/SchemaComparator.d.ts deleted file mode 100644 index 68788de..0000000 --- a/node_modules/@mikro-orm/sql/schema/SchemaComparator.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { type Dictionary } from '@mikro-orm/core'; -import type { Column, ForeignKey, IndexDef, SchemaDifference, TableDifference } from '../typings.js'; -import type { DatabaseSchema } from './DatabaseSchema.js'; -import type { DatabaseTable } from './DatabaseTable.js'; -import type { AbstractSqlPlatform } from '../AbstractSqlPlatform.js'; -/** - * Compares two Schemas and return an instance of SchemaDifference. - */ -export declare class SchemaComparator { - #private; - constructor(platform: AbstractSqlPlatform); - /** - * Returns a SchemaDifference object containing the differences between the schemas fromSchema and toSchema. - * - * The returned differences are returned in such a way that they contain the - * operations to change the schema stored in fromSchema to the schema that is - * stored in toSchema. - */ - compare(fromSchema: DatabaseSchema, toSchema: DatabaseSchema, inverseDiff?: SchemaDifference): SchemaDifference; - /** - * Returns the difference between the tables fromTable and toTable. - * If there are no differences this method returns the boolean false. - */ - diffTable( - fromTable: DatabaseTable, - toTable: DatabaseTable, - inverseTableDiff?: TableDifference, - ): TableDifference | false; - /** - * Try to find columns that only changed their name, rename operations maybe cheaper than add/drop - * however ambiguities between different possibilities should not lead to renaming at all. - */ - private detectColumnRenamings; - /** - * Try to find indexes that only changed their name, rename operations maybe cheaper than add/drop - * however ambiguities between different possibilities should not lead to renaming at all. - */ - private detectIndexRenamings; - diffForeignKey(key1: ForeignKey, key2: ForeignKey, tableDifferences: TableDifference): boolean; - /** - * Returns the difference between the columns - */ - diffColumn(fromColumn: Column, toColumn: Column, fromTable: DatabaseTable, logging?: boolean): Set; - diffEnumItems(items1?: string[], items2?: string[]): boolean; - diffComment(comment1?: string, comment2?: string): boolean; - /** - * Finds the difference between the indexes index1 and index2. - * Compares index1 with index2 and returns index2 if there are any differences or false in case there are no differences. - */ - diffIndex(index1: IndexDef, index2: IndexDef): boolean; - /** - * Checks if the other index already fulfills all the indexing and constraint needs of the current one. - */ - isIndexFulfilledBy(index1: IndexDef, index2: IndexDef): boolean; - /** - * Compare advanced column options between two indexes. - */ - private compareIndexColumns; - /** - * Compare two arrays for equality (order matters). - */ - private compareArrays; - diffExpression(expr1: string, expr2: string): boolean; - parseJsonDefault(defaultValue?: string | null): Dictionary | string | null; - hasSameDefaultValue(from: Column, to: Column): boolean; - private mapColumnToProperty; - private log; -} diff --git a/node_modules/@mikro-orm/sql/schema/SchemaComparator.js b/node_modules/@mikro-orm/sql/schema/SchemaComparator.js deleted file mode 100644 index b90d732..0000000 --- a/node_modules/@mikro-orm/sql/schema/SchemaComparator.js +++ /dev/null @@ -1,753 +0,0 @@ -import { ArrayType, BooleanType, DateTimeType, inspect, JsonType, parseJsonSafe, Utils } from '@mikro-orm/core'; -/** - * Compares two Schemas and return an instance of SchemaDifference. - */ -export class SchemaComparator { - #helper; - #logger; - #platform; - constructor(platform) { - this.#platform = platform; - this.#helper = this.#platform.getSchemaHelper(); - this.#logger = this.#platform.getConfig().getLogger(); - } - /** - * Returns a SchemaDifference object containing the differences between the schemas fromSchema and toSchema. - * - * The returned differences are returned in such a way that they contain the - * operations to change the schema stored in fromSchema to the schema that is - * stored in toSchema. - */ - compare(fromSchema, toSchema, inverseDiff) { - const diff = { - newTables: {}, - removedTables: {}, - changedTables: {}, - newViews: {}, - changedViews: {}, - removedViews: {}, - orphanedForeignKeys: [], - newNativeEnums: [], - removedNativeEnums: [], - newNamespaces: new Set(), - removedNamespaces: new Set(), - fromSchema, - }; - const foreignKeysToTable = {}; - for (const namespace of toSchema.getNamespaces()) { - if (fromSchema.hasNamespace(namespace) || namespace === this.#platform.getDefaultSchemaName()) { - continue; - } - diff.newNamespaces.add(namespace); - } - for (const namespace of fromSchema.getNamespaces()) { - if (toSchema.hasNamespace(namespace) || namespace === this.#platform.getDefaultSchemaName()) { - continue; - } - diff.removedNamespaces.add(namespace); - } - for (const [key, nativeEnum] of Object.entries(toSchema.getNativeEnums())) { - if (fromSchema.hasNativeEnum(key)) { - continue; - } - if (nativeEnum.schema === '*' && fromSchema.hasNativeEnum(`${toSchema.name}.${key}`)) { - continue; - } - diff.newNativeEnums.push(nativeEnum); - } - for (const [key, nativeEnum] of Object.entries(fromSchema.getNativeEnums())) { - if (toSchema.hasNativeEnum(key)) { - continue; - } - if ( - key.startsWith(`${fromSchema.name}.`) && - (fromSchema.name !== toSchema.name || - toSchema.getNativeEnum(key.substring(fromSchema.name.length + 1))?.schema === '*') - ) { - continue; - } - diff.removedNativeEnums.push(nativeEnum); - } - for (const table of toSchema.getTables()) { - const tableName = table.getShortestName(false); - if (!fromSchema.hasTable(tableName)) { - diff.newTables[tableName] = toSchema.getTable(tableName); - } else { - const tableDifferences = this.diffTable( - fromSchema.getTable(tableName), - toSchema.getTable(tableName), - inverseDiff?.changedTables[tableName], - ); - if (tableDifferences !== false) { - diff.changedTables[tableName] = tableDifferences; - } - } - } - // Check if there are tables removed - for (let table of fromSchema.getTables()) { - const tableName = table.getShortestName(); - table = fromSchema.getTable(tableName); - if (!toSchema.hasTable(tableName)) { - diff.removedTables[tableName] = table; - } - // also remember all foreign keys that point to a specific table - for (const foreignKey of Object.values(table.getForeignKeys())) { - if (!foreignKeysToTable[foreignKey.referencedTableName]) { - foreignKeysToTable[foreignKey.referencedTableName] = []; - } - foreignKeysToTable[foreignKey.referencedTableName].push(foreignKey); - } - } - for (const table of Object.values(diff.removedTables)) { - const tableName = (table.schema ? table.schema + '.' : '') + table.name; - if (!foreignKeysToTable[tableName]) { - continue; - } - diff.orphanedForeignKeys.push(...foreignKeysToTable[tableName]); - // Deleting duplicated foreign keys present both on the orphanedForeignKey and the removedForeignKeys from changedTables. - for (const foreignKey of foreignKeysToTable[tableName]) { - const localTableName = foreignKey.localTableName; - if (!diff.changedTables[localTableName]) { - continue; - } - for (const [key, fk] of Object.entries(diff.changedTables[localTableName].removedForeignKeys)) { - // We check if the key is from the removed table, if not we skip. - if (tableName !== fk.referencedTableName) { - continue; - } - delete diff.changedTables[localTableName].removedForeignKeys[key]; - } - } - } - // Compare views - for (const toView of toSchema.getViews()) { - const viewName = toView.schema ? `${toView.schema}.${toView.name}` : toView.name; - if (!fromSchema.hasView(toView.name) && !fromSchema.hasView(viewName)) { - diff.newViews[viewName] = toView; - this.log(`view ${viewName} added`); - } else { - const fromView = fromSchema.getView(toView.name) ?? fromSchema.getView(viewName); - if (fromView && this.diffExpression(fromView.definition, toView.definition)) { - diff.changedViews[viewName] = { from: fromView, to: toView }; - this.log(`view ${viewName} changed`); - } - } - } - // Check for removed views - for (const fromView of fromSchema.getViews()) { - const viewName = fromView.schema ? `${fromView.schema}.${fromView.name}` : fromView.name; - if (!toSchema.hasView(fromView.name) && !toSchema.hasView(viewName)) { - diff.removedViews[viewName] = fromView; - this.log(`view ${viewName} removed`); - } - } - return diff; - } - /** - * Returns the difference between the tables fromTable and toTable. - * If there are no differences this method returns the boolean false. - */ - diffTable(fromTable, toTable, inverseTableDiff) { - let changes = 0; - const tableDifferences = { - name: fromTable.getShortestName(), - addedColumns: {}, - addedForeignKeys: {}, - addedIndexes: {}, - addedChecks: {}, - changedColumns: {}, - changedForeignKeys: {}, - changedIndexes: {}, - changedChecks: {}, - removedColumns: {}, - removedForeignKeys: {}, - removedIndexes: {}, - removedChecks: {}, - renamedColumns: {}, - renamedIndexes: {}, - fromTable, - toTable, - }; - if (this.diffComment(fromTable.comment, toTable.comment)) { - tableDifferences.changedComment = toTable.comment; - this.log(`table comment changed for ${tableDifferences.name}`, { - fromTableComment: fromTable.comment, - toTableComment: toTable.comment, - }); - changes++; - } - const fromTableColumns = fromTable.getColumns(); - const toTableColumns = toTable.getColumns(); - // See if all the columns in "from" table exist in "to" table - for (const column of toTableColumns) { - if (fromTable.hasColumn(column.name)) { - continue; - } - tableDifferences.addedColumns[column.name] = column; - this.log(`column ${tableDifferences.name}.${column.name} of type ${column.type} added`); - changes++; - } - /* See if there are any removed columns in "to" table */ - for (const column of fromTableColumns) { - // See if column is removed in "to" table. - if (!toTable.hasColumn(column.name)) { - tableDifferences.removedColumns[column.name] = column; - this.log(`column ${tableDifferences.name}.${column.name} removed`); - changes++; - continue; - } - // See if column has changed properties in "to" table. - const changedProperties = this.diffColumn(column, toTable.getColumn(column.name), fromTable, true); - if (changedProperties.size === 0) { - continue; - } - if (changedProperties.size === 1 && changedProperties.has('generated')) { - tableDifferences.addedColumns[column.name] = toTable.getColumn(column.name); - tableDifferences.removedColumns[column.name] = column; - changes++; - continue; - } - tableDifferences.changedColumns[column.name] = { - oldColumnName: column.name, - fromColumn: column, - column: toTable.getColumn(column.name), - changedProperties, - }; - this.log(`column ${tableDifferences.name}.${column.name} changed`, { changedProperties }); - changes++; - } - this.detectColumnRenamings(tableDifferences, inverseTableDiff); - const fromTableIndexes = fromTable.getIndexes(); - const toTableIndexes = toTable.getIndexes(); - // See if all the indexes in "from" table exist in "to" table - for (const index of Object.values(toTableIndexes)) { - if ((index.primary && fromTableIndexes.find(i => i.primary)) || fromTable.hasIndex(index.keyName)) { - continue; - } - tableDifferences.addedIndexes[index.keyName] = index; - this.log(`index ${index.keyName} added to table ${tableDifferences.name}`, { index }); - changes++; - } - // See if there are any removed indexes in "to" table - for (const index of fromTableIndexes) { - // See if index is removed in "to" table. - if ((index.primary && !toTable.hasPrimaryKey()) || (!index.primary && !toTable.hasIndex(index.keyName))) { - tableDifferences.removedIndexes[index.keyName] = index; - this.log(`index ${index.keyName} removed from table ${tableDifferences.name}`); - changes++; - continue; - } - // See if index has changed in "to" table. - const toTableIndex = index.primary ? toTable.getPrimaryKey() : toTable.getIndex(index.keyName); - if (!this.diffIndex(index, toTableIndex)) { - continue; - } - tableDifferences.changedIndexes[index.keyName] = toTableIndex; - this.log(`index ${index.keyName} changed in table ${tableDifferences.name}`, { - fromTableIndex: index, - toTableIndex, - }); - changes++; - } - this.detectIndexRenamings(tableDifferences); - const fromTableChecks = fromTable.getChecks(); - const toTableChecks = toTable.getChecks(); - // See if all the checks in "from" table exist in "to" table - for (const check of toTableChecks) { - if (fromTable.hasCheck(check.name)) { - continue; - } - tableDifferences.addedChecks[check.name] = check; - this.log(`check constraint ${check.name} added to table ${tableDifferences.name}`, { check }); - changes++; - } - // See if there are any removed checks in "to" table - for (const check of fromTableChecks) { - if (!toTable.hasCheck(check.name)) { - tableDifferences.removedChecks[check.name] = check; - this.log(`check constraint ${check.name} removed from table ${tableDifferences.name}`); - changes++; - continue; - } - // See if check has changed in "to" table - const toTableCheck = toTable.getCheck(check.name); - const toColumn = toTable.getColumn(check.columnName); - const fromColumn = fromTable.getColumn(check.columnName); - if (!this.diffExpression(check.expression, toTableCheck.expression)) { - continue; - } - if ( - fromColumn?.enumItems && - toColumn?.enumItems && - !this.diffEnumItems(fromColumn.enumItems, toColumn.enumItems) - ) { - continue; - } - this.log(`check constraint ${check.name} changed in table ${tableDifferences.name}`, { - fromTableCheck: check, - toTableCheck, - }); - tableDifferences.changedChecks[check.name] = toTableCheck; - changes++; - } - const fromForeignKeys = { ...fromTable.getForeignKeys() }; - const toForeignKeys = { ...toTable.getForeignKeys() }; - for (const fromConstraint of Object.values(fromForeignKeys)) { - for (const toConstraint of Object.values(toForeignKeys)) { - if (!this.diffForeignKey(fromConstraint, toConstraint, tableDifferences)) { - delete fromForeignKeys[fromConstraint.constraintName]; - delete toForeignKeys[toConstraint.constraintName]; - } else if (fromConstraint.constraintName.toLowerCase() === toConstraint.constraintName.toLowerCase()) { - this.log(`FK constraint ${fromConstraint.constraintName} changed in table ${tableDifferences.name}`, { - fromConstraint, - toConstraint, - }); - tableDifferences.changedForeignKeys[toConstraint.constraintName] = toConstraint; - changes++; - delete fromForeignKeys[fromConstraint.constraintName]; - delete toForeignKeys[toConstraint.constraintName]; - } - } - } - for (const fromConstraint of Object.values(fromForeignKeys)) { - tableDifferences.removedForeignKeys[fromConstraint.constraintName] = fromConstraint; - this.log(`FK constraint ${fromConstraint.constraintName} removed from table ${tableDifferences.name}`); - changes++; - } - for (const toConstraint of Object.values(toForeignKeys)) { - tableDifferences.addedForeignKeys[toConstraint.constraintName] = toConstraint; - this.log(`FK constraint ${toConstraint.constraintName} added to table ${tableDifferences.name}`, { - constraint: toConstraint, - }); - changes++; - } - return changes ? tableDifferences : false; - } - /** - * Try to find columns that only changed their name, rename operations maybe cheaper than add/drop - * however ambiguities between different possibilities should not lead to renaming at all. - */ - detectColumnRenamings(tableDifferences, inverseTableDiff) { - const renameCandidates = {}; - const oldFKs = Object.values(tableDifferences.fromTable.getForeignKeys()); - const newFKs = Object.values(tableDifferences.toTable.getForeignKeys()); - for (const addedColumn of Object.values(tableDifferences.addedColumns)) { - for (const removedColumn of Object.values(tableDifferences.removedColumns)) { - const diff = this.diffColumn(addedColumn, removedColumn, tableDifferences.fromTable); - if (diff.size !== 0) { - continue; - } - const wasFK = oldFKs.some(fk => fk.columnNames.includes(removedColumn.name)); - const isFK = newFKs.some(fk => fk.columnNames.includes(addedColumn.name)); - if (wasFK !== isFK) { - continue; - } - const renamedColumn = inverseTableDiff?.renamedColumns[addedColumn.name]; - if (renamedColumn && renamedColumn?.name !== removedColumn.name) { - continue; - } - renameCandidates[addedColumn.name] = renameCandidates[addedColumn.name] ?? []; - renameCandidates[addedColumn.name].push([removedColumn, addedColumn]); - } - } - for (const candidateColumns of Object.values(renameCandidates)) { - if (candidateColumns.length !== 1) { - continue; - } - const [removedColumn, addedColumn] = candidateColumns[0]; - const removedColumnName = removedColumn.name; - const addedColumnName = addedColumn.name; - /* v8 ignore next */ - if (tableDifferences.renamedColumns[removedColumnName]) { - continue; - } - tableDifferences.renamedColumns[removedColumnName] = addedColumn; - delete tableDifferences.addedColumns[addedColumnName]; - delete tableDifferences.removedColumns[removedColumnName]; - this.log(`renamed column detected in table ${tableDifferences.name}`, { - old: removedColumnName, - new: addedColumnName, - }); - } - } - /** - * Try to find indexes that only changed their name, rename operations maybe cheaper than add/drop - * however ambiguities between different possibilities should not lead to renaming at all. - */ - detectIndexRenamings(tableDifferences) { - const renameCandidates = {}; - // Gather possible rename candidates by comparing each added and removed index based on semantics. - for (const addedIndex of Object.values(tableDifferences.addedIndexes)) { - for (const removedIndex of Object.values(tableDifferences.removedIndexes)) { - if (this.diffIndex(addedIndex, removedIndex)) { - continue; - } - renameCandidates[addedIndex.keyName] = renameCandidates[addedIndex.keyName] ?? []; - renameCandidates[addedIndex.keyName].push([removedIndex, addedIndex]); - } - } - for (const candidateIndexes of Object.values(renameCandidates)) { - // If the current rename candidate contains exactly one semantically equal index, we can safely rename it. - // Otherwise it is unclear if a rename action is really intended, therefore we let those ambiguous indexes be added/dropped. - if (candidateIndexes.length !== 1) { - continue; - } - const [removedIndex, addedIndex] = candidateIndexes[0]; - const removedIndexName = removedIndex.keyName; - const addedIndexName = addedIndex.keyName; - if (tableDifferences.renamedIndexes[removedIndexName]) { - continue; - } - tableDifferences.renamedIndexes[removedIndexName] = addedIndex; - delete tableDifferences.addedIndexes[addedIndexName]; - delete tableDifferences.removedIndexes[removedIndexName]; - this.log(`renamed index detected in table ${tableDifferences.name}`, { - old: removedIndexName, - new: addedIndexName, - }); - } - } - diffForeignKey(key1, key2, tableDifferences) { - if (key1.columnNames.join('~').toLowerCase() !== key2.columnNames.join('~').toLowerCase()) { - return true; - } - if (key1.referencedColumnNames.join('~').toLowerCase() !== key2.referencedColumnNames.join('~').toLowerCase()) { - return true; - } - if (key1.constraintName !== key2.constraintName) { - return true; - } - if (key1.referencedTableName !== key2.referencedTableName) { - return true; - } - if (key1.deferMode !== key2.deferMode) { - return true; - } - if (key1.localTableName === key1.referencedTableName && !this.#platform.supportsMultipleCascadePaths()) { - return false; - } - if (key1.columnNames.some(col => tableDifferences.changedColumns[col]?.changedProperties.has('type'))) { - return true; - } - const defaultRule = ['restrict', 'no action']; - const rule = (key, method) => { - return (key[method] ?? defaultRule[0]).toLowerCase().replace(defaultRule[1], defaultRule[0]).replace(/"/g, ''); - }; - const compare = method => rule(key1, method) === rule(key2, method); - // Skip updateRule comparison for platforms that don't support ON UPDATE (e.g., Oracle) - const updateRuleDiffers = this.#platform.supportsOnUpdate() && !compare('updateRule'); - return updateRuleDiffers || !compare('deleteRule'); - } - /** - * Returns the difference between the columns - */ - diffColumn(fromColumn, toColumn, fromTable, logging) { - const changedProperties = new Set(); - const fromProp = this.mapColumnToProperty({ ...fromColumn, autoincrement: false }); - const toProp = this.mapColumnToProperty({ ...toColumn, autoincrement: false }); - const fromColumnType = this.#platform.normalizeColumnType( - fromColumn.mappedType.getColumnType(fromProp, this.#platform).toLowerCase(), - fromProp, - ); - const fromNativeEnum = - fromTable.nativeEnums[fromColumnType] ?? - Object.values(fromTable.nativeEnums).find(e => e.name === fromColumnType && e.schema !== '*'); - let toColumnType = this.#platform.normalizeColumnType( - toColumn.mappedType.getColumnType(toProp, this.#platform).toLowerCase(), - toProp, - ); - const log = (msg, params) => { - if (logging) { - const copy = Utils.copy(params); - Utils.dropUndefinedProperties(copy); - this.log(msg, copy); - } - }; - if ( - fromColumnType !== toColumnType && - (!fromNativeEnum || `${fromNativeEnum.schema}.${fromNativeEnum.name}` !== toColumnType) && - !(fromColumn.ignoreSchemaChanges?.includes('type') || toColumn.ignoreSchemaChanges?.includes('type')) && - !fromColumn.generated && - !toColumn.generated - ) { - if ( - !toColumnType.includes('.') && - fromTable.schema && - fromTable.schema !== this.#platform.getDefaultSchemaName() - ) { - toColumnType = `${fromTable.schema}.${toColumnType}`; - } - if (fromColumnType !== toColumnType) { - log(`'type' changed for column ${fromTable.name}.${fromColumn.name}`, { fromColumnType, toColumnType }); - changedProperties.add('type'); - } - } - if (!!fromColumn.nullable !== !!toColumn.nullable && !fromColumn.generated && !toColumn.generated) { - log(`'nullable' changed for column ${fromTable.name}.${fromColumn.name}`, { fromColumn, toColumn }); - changedProperties.add('nullable'); - } - if (this.diffExpression(fromColumn.generated, toColumn.generated)) { - log(`'generated' changed for column ${fromTable.name}.${fromColumn.name}`, { fromColumn, toColumn }); - changedProperties.add('generated'); - } - if (!!fromColumn.autoincrement !== !!toColumn.autoincrement) { - log(`'autoincrement' changed for column ${fromTable.name}.${fromColumn.name}`, { fromColumn, toColumn }); - changedProperties.add('autoincrement'); - } - if (!!fromColumn.unsigned !== !!toColumn.unsigned && this.#platform.supportsUnsigned()) { - log(`'unsigned' changed for column ${fromTable.name}.${fromColumn.name}`, { fromColumn, toColumn }); - changedProperties.add('unsigned'); - } - if ( - !(fromColumn.ignoreSchemaChanges?.includes('default') || toColumn.ignoreSchemaChanges?.includes('default')) && - !this.hasSameDefaultValue(fromColumn, toColumn) - ) { - log(`'default' changed for column ${fromTable.name}.${fromColumn.name}`, { fromColumn, toColumn }); - changedProperties.add('default'); - } - if (this.diffComment(fromColumn.comment, toColumn.comment)) { - log(`'comment' changed for column ${fromTable.name}.${fromColumn.name}`, { fromColumn, toColumn }); - changedProperties.add('comment'); - } - if ( - !(fromColumn.mappedType instanceof ArrayType) && - !(toColumn.mappedType instanceof ArrayType) && - this.diffEnumItems(fromColumn.enumItems, toColumn.enumItems) - ) { - log(`'enumItems' changed for column ${fromTable.name}.${fromColumn.name}`, { fromColumn, toColumn }); - changedProperties.add('enumItems'); - } - if ( - (fromColumn.extra || '').toLowerCase() !== (toColumn.extra || '').toLowerCase() && - !(fromColumn.ignoreSchemaChanges?.includes('extra') || toColumn.ignoreSchemaChanges?.includes('extra')) - ) { - log(`'extra' changed for column ${fromTable.name}.${fromColumn.name}`, { fromColumn, toColumn }); - changedProperties.add('extra'); - } - return changedProperties; - } - diffEnumItems(items1 = [], items2 = []) { - return items1.length !== items2.length || items1.some((v, i) => v !== items2[i]); - } - diffComment(comment1, comment2) { - // A null value and an empty string are actually equal for a comment so they should not trigger a change. - // eslint-disable-next-line eqeqeq - return comment1 != comment2 && !(comment1 == null && comment2 === '') && !(comment2 == null && comment1 === ''); - } - /** - * Finds the difference between the indexes index1 and index2. - * Compares index1 with index2 and returns index2 if there are any differences or false in case there are no differences. - */ - diffIndex(index1, index2) { - // if one of them is a custom expression or full text index, compare only by name - if (index1.expression || index2.expression || index1.type === 'fulltext' || index2.type === 'fulltext') { - return index1.keyName !== index2.keyName; - } - return !this.isIndexFulfilledBy(index1, index2) || !this.isIndexFulfilledBy(index2, index1); - } - /** - * Checks if the other index already fulfills all the indexing and constraint needs of the current one. - */ - isIndexFulfilledBy(index1, index2) { - // allow the other index to be equally large only. It being larger is an option but it creates a problem with scenarios of the kind PRIMARY KEY(foo,bar) UNIQUE(foo) - if (index1.columnNames.length !== index2.columnNames.length) { - return false; - } - function spansColumns() { - for (let i = 0; i < index1.columnNames.length; i++) { - if (index1.columnNames[i] === index2.columnNames[i]) { - continue; - } - return false; - } - return true; - } - // Check if columns are the same, and even in the same order - if (!spansColumns()) { - return false; - } - // Compare advanced column options (sort order, nulls, length, collation) - if (!this.compareIndexColumns(index1, index2)) { - return false; - } - // Compare INCLUDE columns for covering indexes - if (!this.compareArrays(index1.include, index2.include)) { - return false; - } - // Compare fill factor - if (index1.fillFactor !== index2.fillFactor) { - return false; - } - // Compare invisible flag - if (!!index1.invisible !== !!index2.invisible) { - return false; - } - // Compare disabled flag - if (!!index1.disabled !== !!index2.disabled) { - return false; - } - // Compare clustered flag - if (!!index1.clustered !== !!index2.clustered) { - return false; - } - if (!index1.unique && !index1.primary) { - // this is a special case: If the current key is neither primary or unique, any unique or - // primary key will always have the same effect for the index and there cannot be any constraint - // overlaps. This means a primary or unique index can always fulfill the requirements of just an - // index that has no constraints. - return true; - } - if (this.#platform.supportsDeferredUniqueConstraints() && index1.deferMode !== index2.deferMode) { - return false; - } - return index1.primary === index2.primary && index1.unique === index2.unique; - } - /** - * Compare advanced column options between two indexes. - */ - compareIndexColumns(index1, index2) { - const cols1 = index1.columns ?? []; - const cols2 = index2.columns ?? []; - // If neither has column options, they match - if (cols1.length === 0 && cols2.length === 0) { - return true; - } - // If only one has column options, they don't match - if (cols1.length !== cols2.length) { - return false; - } - // Compare each column's options - // Note: We don't check c1.name !== c2.name because the indexes already have matching columnNames - // and the columns array is derived from those same column names - for (let i = 0; i < cols1.length; i++) { - const c1 = cols1[i]; - const c2 = cols2[i]; - const sort1 = c1.sort?.toUpperCase() ?? 'ASC'; - const sort2 = c2.sort?.toUpperCase() ?? 'ASC'; - if (sort1 !== sort2) { - return false; - } - const defaultNulls = s => (s === 'DESC' ? 'FIRST' : 'LAST'); - const nulls1 = c1.nulls?.toUpperCase() ?? defaultNulls(sort1); - const nulls2 = c2.nulls?.toUpperCase() ?? defaultNulls(sort2); - if (nulls1 !== nulls2) { - return false; - } - if (c1.length !== c2.length) { - return false; - } - if (c1.collation !== c2.collation) { - return false; - } - } - return true; - } - /** - * Compare two arrays for equality (order matters). - */ - compareArrays(arr1, arr2) { - if (!arr1 && !arr2) { - return true; - } - if (!arr1 || !arr2 || arr1.length !== arr2.length) { - return false; - } - return arr1.every((val, i) => val === arr2[i]); - } - diffExpression(expr1, expr2) { - // expressions like check constraints might be normalized by the driver, - // e.g. quotes might be added (https://github.com/mikro-orm/mikro-orm/issues/3827) - const simplify = str => { - return ( - str - ?.replace(/_\w+'(.*?)'/g, '$1') - .replace(/in\s*\((.*?)\)/gi, '= any (array[$1])') - // MySQL normalizes count(*) to count(0) - .replace(/\bcount\s*\(\s*0\s*\)/gi, 'count(*)') - // Remove quotes first so we can process identifiers - .replace(/['"`]/g, '') - // MySQL adds table/alias prefixes to columns (e.g., a.name or table_name.column vs just column) - // Strip these prefixes - match word.word patterns and keep only the last part - .replace(/\b\w+\.(\w+)/g, '$1') - // Normalize JOIN syntax: inner join -> join (equivalent in SQL) - .replace(/\binner\s+join\b/gi, 'join') - // Remove redundant column aliases like `title AS title` -> `title` - .replace(/\b(\w+)\s+as\s+\1\b/gi, '$1') - // Remove AS keyword (optional in SQL, MySQL may add/remove it) - .replace(/\bas\b/gi, '') - // Remove remaining special chars, parentheses, type casts, asterisks, and normalize whitespace - .replace(/[()\n[\]*]|::\w+| +/g, '') - .replace(/anyarray\[(.*)]/gi, '$1') - .toLowerCase() - // PostgreSQL adds default aliases to aggregate functions (e.g., count(*) AS count) - // After removing AS and whitespace, this results in duplicate adjacent words - // Remove these duplicates: "countcount" -> "count", "minmin" -> "min" - // Use lookahead to match repeated patterns of 3+ chars (avoid false positives on short sequences) - .replace(/(\w{3,})\1/g, '$1') - // Remove trailing semicolon (PostgreSQL adds it to view definitions) - .replace(/;$/, '') - ); - }; - return simplify(expr1) !== simplify(expr2); - } - parseJsonDefault(defaultValue) { - /* v8 ignore next */ - if (!defaultValue) { - return null; - } - const val = defaultValue.replace(/^(_\w+\\)?'(.*?)\\?'$/, '$2').replace(/^\(?'(.*?)'\)?$/, '$1'); - return parseJsonSafe(val); - } - hasSameDefaultValue(from, to) { - if ( - from.default == null || - from.default.toString().toLowerCase() === 'null' || - from.default.toString().startsWith('nextval(') - ) { - return to.default == null || to.default.toLowerCase() === 'null'; - } - if (to.mappedType instanceof BooleanType) { - const defaultValueFrom = !['0', 'false', 'f', 'n', 'no', 'off'].includes('' + from.default); - const defaultValueTo = !['0', 'false', 'f', 'n', 'no', 'off'].includes('' + to.default); - return defaultValueFrom === defaultValueTo; - } - if (to.mappedType instanceof JsonType) { - const defaultValueFrom = this.parseJsonDefault(from.default); - const defaultValueTo = this.parseJsonDefault(to.default); - return Utils.equals(defaultValueFrom, defaultValueTo); - } - if (to.mappedType instanceof DateTimeType && from.default && to.default) { - // normalize now/current_timestamp defaults, also remove `()` from the end of default expression - const defaultValueFrom = from.default.toLowerCase().replace('current_timestamp', 'now').replace(/\(\)$/, ''); - const defaultValueTo = to.default.toLowerCase().replace('current_timestamp', 'now').replace(/\(\)$/, ''); - return defaultValueFrom === defaultValueTo; - } - if (from.default && to.default) { - return from.default.toString().toLowerCase() === to.default.toString().toLowerCase(); - } - if (['', this.#helper.getDefaultEmptyString()].includes(to.default) && from.default != null) { - return ['', this.#helper.getDefaultEmptyString()].includes(from.default.toString()); - } - // eslint-disable-next-line eqeqeq - return from.default == to.default; // == intentionally - } - mapColumnToProperty(column) { - const length = /\w+\((\d+)\)/.exec(column.type); - const match = /\w+\((\d+), ?(\d+)\)/.exec(column.type); - return { - fieldNames: [column.name], - columnTypes: [column.type], - items: column.enumItems, - ...column, - length: length ? +length[1] : column.length, - precision: match ? +match[1] : column.precision, - scale: match ? +match[2] : column.scale, - }; - } - log(message, params) { - if (params) { - message += ' ' + inspect(params); - } - this.#logger.log('schema', message); - } -} diff --git a/node_modules/@mikro-orm/sql/schema/SchemaHelper.d.ts b/node_modules/@mikro-orm/sql/schema/SchemaHelper.d.ts deleted file mode 100644 index 6bda238..0000000 --- a/node_modules/@mikro-orm/sql/schema/SchemaHelper.d.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { type Connection, type Dictionary, type Options, RawQueryFragment } from '@mikro-orm/core'; -import type { AbstractSqlConnection } from '../AbstractSqlConnection.js'; -import type { AbstractSqlPlatform } from '../AbstractSqlPlatform.js'; -import type { CheckDef, Column, ForeignKey, IndexDef, Table, TableDifference } from '../typings.js'; -import type { DatabaseSchema } from './DatabaseSchema.js'; -import type { DatabaseTable } from './DatabaseTable.js'; -/** Base class for database-specific schema helpers. Provides SQL generation for DDL operations. */ -export declare abstract class SchemaHelper { - protected readonly platform: AbstractSqlPlatform; - constructor(platform: AbstractSqlPlatform); - /** Returns SQL to prepend to schema migration scripts (e.g., disabling FK checks). */ - getSchemaBeginning(_charset: string, disableForeignKeys?: boolean): string; - /** Returns SQL to disable foreign key checks. */ - disableForeignKeysSQL(): string; - /** Returns SQL to re-enable foreign key checks. */ - enableForeignKeysSQL(): string; - /** Returns SQL to append to schema migration scripts (e.g., re-enabling FK checks). */ - getSchemaEnd(disableForeignKeys?: boolean): string; - finalizeTable(table: DatabaseTable, charset: string, collate?: string): string; - appendComments(table: DatabaseTable): string[]; - supportsSchemaConstraints(): boolean; - getPrimaryKeys( - connection: AbstractSqlConnection, - indexes: IndexDef[] | undefined, - tableName: string, - schemaName?: string, - ): Promise; - inferLengthFromColumnType(type: string): number | undefined; - protected getTableKey(t: Table): string; - getCreateNativeEnumSQL(name: string, values: unknown[], schema?: string): string; - getDropNativeEnumSQL(name: string, schema?: string): string; - getAlterNativeEnumSQL(name: string, schema?: string, value?: string, items?: string[], oldItems?: string[]): string; - /** Loads table metadata (columns, indexes, foreign keys) from the database information schema. */ - abstract loadInformationSchema( - schema: DatabaseSchema, - connection: AbstractSqlConnection, - tables: Table[], - schemas?: string[], - ): Promise; - /** Returns the SQL query to list all tables in the database. */ - getListTablesSQL(): string; - /** Retrieves all tables from the database. */ - getAllTables(connection: AbstractSqlConnection, schemas?: string[]): Promise; - getListViewsSQL(): string; - loadViews(schema: DatabaseSchema, connection: AbstractSqlConnection, schemaName?: string): Promise; - /** Returns SQL to rename a column in a table. */ - getRenameColumnSQL(tableName: string, oldColumnName: string, to: Column, schemaName?: string): string; - /** Returns SQL to create an index on a table. */ - getCreateIndexSQL(tableName: string, index: IndexDef): string; - /** - * Hook for adding driver-specific index options (e.g., fill factor for PostgreSQL). - */ - protected getCreateIndexSuffix(_index: IndexDef): string; - /** - * Build the column list for an index, supporting advanced options like sort order, nulls ordering, and collation. - * Note: Prefix length is only supported by MySQL/MariaDB which override this method. - */ - protected getIndexColumns(index: IndexDef): string; - /** Returns SQL to drop an index. */ - getDropIndexSQL(tableName: string, index: IndexDef): string; - getRenameIndexSQL(tableName: string, index: IndexDef, oldIndexName: string): string[]; - /** Returns SQL statements to apply a table difference (add/drop/alter columns, indexes, foreign keys). */ - alterTable(diff: TableDifference, safe?: boolean): string[]; - /** Returns SQL to add columns to an existing table. */ - getAddColumnsSQL(table: DatabaseTable, columns: Column[]): string[]; - getDropColumnsSQL(tableName: string, columns: Column[], schemaName?: string): string; - hasNonDefaultPrimaryKeyName(table: DatabaseTable): boolean; - castColumn(name: string, type: string): string; - alterTableColumn(column: Column, table: DatabaseTable, changedProperties: Set): string[]; - createTableColumn(column: Column, table: DatabaseTable, changedProperties?: Set): string | undefined; - getPreAlterTable(tableDiff: TableDifference, safe: boolean): string[]; - getPostAlterTable(tableDiff: TableDifference, safe: boolean): string[]; - getChangeColumnCommentSQL(tableName: string, to: Column, schemaName?: string): string; - getNamespaces(connection: AbstractSqlConnection): Promise; - protected mapIndexes(indexes: IndexDef[]): Promise; - mapForeignKeys(fks: any[], tableName: string, schemaName?: string): Dictionary; - normalizeDefaultValue( - defaultValue: string | RawQueryFragment, - length?: number, - defaultValues?: Dictionary, - ): string | number; - getCreateDatabaseSQL(name: string): string; - getDropDatabaseSQL(name: string): string; - getCreateNamespaceSQL(name: string): string; - getDropNamespaceSQL(name: string): string; - getDatabaseExistsSQL(name: string): string; - getDatabaseNotExistsError(dbName: string): string; - getManagementDbName(): string; - getDefaultEmptyString(): string; - databaseExists(connection: Connection, name: string): Promise; - append(array: string[], sql: string | string[], pad?: boolean): void; - /** Returns SQL statements to create a table with all its columns, primary key, indexes, and checks. */ - createTable(table: DatabaseTable, alter?: boolean): string[]; - alterTableComment(table: DatabaseTable, comment?: string): string; - /** Returns SQL to create a foreign key constraint on a table. */ - createForeignKey(table: DatabaseTable, foreignKey: ForeignKey, alterTable?: boolean, inline?: boolean): string; - splitTableName(name: string, skipDefaultSchema?: boolean): [string | undefined, string]; - getReferencedTableName(referencedTableName: string, schema?: string): string; - createIndex(index: IndexDef, table: DatabaseTable, createPrimary?: boolean): string; - createCheck(table: DatabaseTable, check: CheckDef): string; - protected getTableName(table: string, schema?: string): string; - getTablesGroupedBySchemas(tables: Table[]): Map; - get options(): NonNullable; - protected processComment(comment: string): string; - protected quote(...keys: (string | undefined)[]): string; - dropForeignKey(tableName: string, constraintName: string): string; - dropIndex(table: string, index: IndexDef, oldIndexName?: string): string; - dropConstraint(table: string, name: string): string; - /** Returns SQL to drop a table if it exists. */ - dropTableIfExists(name: string, schema?: string): string; - createView(name: string, schema: string | undefined, definition: string): string; - dropViewIfExists(name: string, schema?: string): string; - createMaterializedView(name: string, schema: string | undefined, definition: string, withData?: boolean): string; - dropMaterializedViewIfExists(name: string, schema?: string): string; - refreshMaterializedView(name: string, schema?: string, concurrently?: boolean): string; - getListMaterializedViewsSQL(): string; - loadMaterializedViews(schema: DatabaseSchema, connection: AbstractSqlConnection, schemaName?: string): Promise; -} diff --git a/node_modules/@mikro-orm/sql/schema/SchemaHelper.js b/node_modules/@mikro-orm/sql/schema/SchemaHelper.js deleted file mode 100644 index 3bc4cb7..0000000 --- a/node_modules/@mikro-orm/sql/schema/SchemaHelper.js +++ /dev/null @@ -1,684 +0,0 @@ -import { RawQueryFragment, Utils } from '@mikro-orm/core'; -/** Base class for database-specific schema helpers. Provides SQL generation for DDL operations. */ -export class SchemaHelper { - platform; - constructor(platform) { - this.platform = platform; - } - /** Returns SQL to prepend to schema migration scripts (e.g., disabling FK checks). */ - getSchemaBeginning(_charset, disableForeignKeys) { - if (disableForeignKeys) { - return `${this.disableForeignKeysSQL()}\n`; - } - return ''; - } - /** Returns SQL to disable foreign key checks. */ - disableForeignKeysSQL() { - return ''; - } - /** Returns SQL to re-enable foreign key checks. */ - enableForeignKeysSQL() { - return ''; - } - /** Returns SQL to append to schema migration scripts (e.g., re-enabling FK checks). */ - getSchemaEnd(disableForeignKeys) { - if (disableForeignKeys) { - return `${this.enableForeignKeysSQL()}\n`; - } - return ''; - } - finalizeTable(table, charset, collate) { - return ''; - } - appendComments(table) { - return []; - } - supportsSchemaConstraints() { - return true; - } - async getPrimaryKeys(connection, indexes = [], tableName, schemaName) { - const pks = indexes.filter(i => i.primary).map(pk => pk.columnNames); - return Utils.flatten(pks); - } - inferLengthFromColumnType(type) { - const match = /^\w+\s*(?:\(\s*(\d+)\s*\)|$)/.exec(type); - if (!match) { - return; - } - return +match[1]; - } - getTableKey(t) { - const unquote = str => str.replace(/['"`]/g, ''); - const parts = t.table_name.split('.'); - if (parts.length > 1) { - return `${unquote(parts[0])}.${unquote(parts[1])}`; - } - if (t.schema_name) { - return `${unquote(t.schema_name)}.${unquote(t.table_name)}`; - } - return unquote(t.table_name); - } - getCreateNativeEnumSQL(name, values, schema) { - throw new Error('Not supported by given driver'); - } - getDropNativeEnumSQL(name, schema) { - throw new Error('Not supported by given driver'); - } - getAlterNativeEnumSQL(name, schema, value, items, oldItems) { - throw new Error('Not supported by given driver'); - } - /** Returns the SQL query to list all tables in the database. */ - getListTablesSQL() { - throw new Error('Not supported by given driver'); - } - /** Retrieves all tables from the database. */ - async getAllTables(connection, schemas) { - return connection.execute(this.getListTablesSQL()); - } - getListViewsSQL() { - throw new Error('Not supported by given driver'); - } - async loadViews(schema, connection, schemaName) { - throw new Error('Not supported by given driver'); - } - /** Returns SQL to rename a column in a table. */ - getRenameColumnSQL(tableName, oldColumnName, to, schemaName) { - tableName = this.quote(tableName); - oldColumnName = this.quote(oldColumnName); - const columnName = this.quote(to.name); - const schemaReference = schemaName !== undefined && schemaName !== 'public' ? '"' + schemaName + '".' : ''; - const tableReference = schemaReference + tableName; - return `alter table ${tableReference} rename column ${oldColumnName} to ${columnName}`; - } - /** Returns SQL to create an index on a table. */ - getCreateIndexSQL(tableName, index) { - /* v8 ignore next */ - if (index.expression) { - return index.expression; - } - if (index.fillFactor != null && (index.fillFactor < 0 || index.fillFactor > 100)) { - throw new Error(`fillFactor must be between 0 and 100, got ${index.fillFactor} for index '${index.keyName}'`); - } - tableName = this.quote(tableName); - const keyName = this.quote(index.keyName); - const defer = index.deferMode ? ` deferrable initially ${index.deferMode}` : ''; - let sql = `create ${index.unique ? 'unique ' : ''}index ${keyName} on ${tableName}`; - if (index.unique && index.constraint) { - sql = `alter table ${tableName} add constraint ${keyName} unique`; - } - if (index.columnNames.some(column => column.includes('.'))) { - // JSON columns can have unique index but not unique constraint, and we need to distinguish those, so we can properly drop them - sql = `create ${index.unique ? 'unique ' : ''}index ${keyName} on ${tableName}`; - const columns = this.platform.getJsonIndexDefinition(index); - return `${sql} (${columns.join(', ')})${this.getCreateIndexSuffix(index)}${defer}`; - } - // Build column list with advanced options - const columns = this.getIndexColumns(index); - sql += ` (${columns})`; - // Add INCLUDE clause for covering indexes (PostgreSQL, MSSQL) - if (index.include?.length) { - sql += ` include (${index.include.map(c => this.quote(c)).join(', ')})`; - } - return sql + this.getCreateIndexSuffix(index) + defer; - } - /** - * Hook for adding driver-specific index options (e.g., fill factor for PostgreSQL). - */ - getCreateIndexSuffix(_index) { - return ''; - } - /** - * Build the column list for an index, supporting advanced options like sort order, nulls ordering, and collation. - * Note: Prefix length is only supported by MySQL/MariaDB which override this method. - */ - getIndexColumns(index) { - if (index.columns?.length) { - return index.columns - .map(col => { - let colDef = this.quote(col.name); - // Collation comes after column name (SQLite syntax: column COLLATE name) - if (col.collation) { - colDef += ` collate ${col.collation}`; - } - // Sort order - if (col.sort) { - colDef += ` ${col.sort}`; - } - // NULLS ordering (PostgreSQL) - if (col.nulls) { - colDef += ` nulls ${col.nulls}`; - } - return colDef; - }) - .join(', '); - } - return index.columnNames.map(c => this.quote(c)).join(', '); - } - /** Returns SQL to drop an index. */ - getDropIndexSQL(tableName, index) { - return `drop index ${this.quote(index.keyName)}`; - } - getRenameIndexSQL(tableName, index, oldIndexName) { - return [ - this.getDropIndexSQL(tableName, { ...index, keyName: oldIndexName }), - this.getCreateIndexSQL(tableName, index), - ]; - } - /** Returns SQL statements to apply a table difference (add/drop/alter columns, indexes, foreign keys). */ - alterTable(diff, safe) { - const ret = []; - const [schemaName, tableName] = this.splitTableName(diff.name); - if (this.platform.supportsNativeEnums()) { - const changedNativeEnums = []; - for (const { column, changedProperties } of Object.values(diff.changedColumns)) { - if (!column.nativeEnumName) { - continue; - } - const key = - schemaName && schemaName !== this.platform.getDefaultSchemaName() && !column.nativeEnumName.includes('.') - ? schemaName + '.' + column.nativeEnumName - : column.nativeEnumName; - if (changedProperties.has('enumItems') && key in diff.fromTable.nativeEnums) { - changedNativeEnums.push([column.nativeEnumName, column.enumItems, diff.fromTable.nativeEnums[key].items]); - } - } - Utils.removeDuplicates(changedNativeEnums).forEach(([enumName, itemsNew, itemsOld]) => { - // postgres allows only adding new items - const newItems = itemsNew.filter(val => !itemsOld.includes(val)); - if (enumName.includes('.')) { - const [enumSchemaName, rawEnumName] = enumName.split('.'); - ret.push( - ...newItems.map(val => this.getAlterNativeEnumSQL(rawEnumName, enumSchemaName, val, itemsNew, itemsOld)), - ); - return; - } - ret.push(...newItems.map(val => this.getAlterNativeEnumSQL(enumName, schemaName, val, itemsNew, itemsOld))); - }); - } - for (const index of Object.values(diff.removedIndexes)) { - ret.push(this.dropIndex(diff.name, index)); - } - for (const index of Object.values(diff.changedIndexes)) { - ret.push(this.dropIndex(diff.name, index)); - } - for (const check of Object.values(diff.removedChecks)) { - ret.push(this.dropConstraint(diff.name, check.name)); - } - for (const check of Object.values(diff.changedChecks)) { - ret.push(this.dropConstraint(diff.name, check.name)); - } - /* v8 ignore next */ - if (!safe && Object.values(diff.removedColumns).length > 0) { - ret.push(this.getDropColumnsSQL(tableName, Object.values(diff.removedColumns), schemaName)); - } - if (Object.values(diff.addedColumns).length > 0) { - this.append(ret, this.getAddColumnsSQL(diff.toTable, Object.values(diff.addedColumns))); - } - for (const column of Object.values(diff.addedColumns)) { - const foreignKey = Object.values(diff.addedForeignKeys).find( - fk => fk.columnNames.length === 1 && fk.columnNames[0] === column.name, - ); - if (foreignKey && this.options.createForeignKeyConstraints) { - delete diff.addedForeignKeys[foreignKey.constraintName]; - ret.push(this.createForeignKey(diff.toTable, foreignKey)); - } - } - for (const { column, changedProperties } of Object.values(diff.changedColumns)) { - if (changedProperties.size === 1 && changedProperties.has('comment')) { - continue; - } - if (changedProperties.size === 1 && changedProperties.has('enumItems') && column.nativeEnumName) { - continue; - } - this.append(ret, this.alterTableColumn(column, diff.fromTable, changedProperties)); - } - for (const { column, changedProperties } of Object.values(diff.changedColumns).filter(diff => - diff.changedProperties.has('comment'), - )) { - if ( - ['type', 'nullable', 'autoincrement', 'unsigned', 'default', 'enumItems'].some(t => changedProperties.has(t)) - ) { - continue; // will be handled via column update - } - ret.push(this.getChangeColumnCommentSQL(tableName, column, schemaName)); - } - for (const [oldColumnName, column] of Object.entries(diff.renamedColumns)) { - ret.push(this.getRenameColumnSQL(tableName, oldColumnName, column, schemaName)); - } - for (const foreignKey of Object.values(diff.addedForeignKeys)) { - ret.push(this.createForeignKey(diff.toTable, foreignKey)); - } - for (const foreignKey of Object.values(diff.changedForeignKeys)) { - ret.push(this.createForeignKey(diff.toTable, foreignKey)); - } - for (const index of Object.values(diff.addedIndexes)) { - ret.push(this.createIndex(index, diff.toTable)); - } - for (const index of Object.values(diff.changedIndexes)) { - ret.push(this.createIndex(index, diff.toTable, true)); - } - for (const [oldIndexName, index] of Object.entries(diff.renamedIndexes)) { - if (index.unique) { - ret.push(this.dropIndex(diff.name, index, oldIndexName)); - ret.push(this.createIndex(index, diff.toTable)); - } else { - ret.push(...this.getRenameIndexSQL(diff.name, index, oldIndexName)); - } - } - for (const check of Object.values(diff.addedChecks)) { - ret.push(this.createCheck(diff.toTable, check)); - } - for (const check of Object.values(diff.changedChecks)) { - ret.push(this.createCheck(diff.toTable, check)); - } - if ('changedComment' in diff) { - ret.push(this.alterTableComment(diff.toTable, diff.changedComment)); - } - return ret; - } - /** Returns SQL to add columns to an existing table. */ - getAddColumnsSQL(table, columns) { - const adds = columns - .map(column => { - return `add ${this.createTableColumn(column, table)}`; - }) - .join(', '); - return [`alter table ${table.getQuotedName()} ${adds}`]; - } - getDropColumnsSQL(tableName, columns, schemaName) { - const name = this.quote(this.getTableName(tableName, schemaName)); - const drops = columns.map(column => `drop column ${this.quote(column.name)}`).join(', '); - return `alter table ${name} ${drops}`; - } - hasNonDefaultPrimaryKeyName(table) { - const pkIndex = table.getPrimaryKey(); - if (!pkIndex || !this.platform.supportsCustomPrimaryKeyNames()) { - return false; - } - const defaultName = this.platform.getDefaultPrimaryName(table.name, pkIndex.columnNames); - return pkIndex?.keyName !== defaultName; - } - /* v8 ignore next */ - castColumn(name, type) { - return ''; - } - alterTableColumn(column, table, changedProperties) { - const sql = []; - if (changedProperties.has('default') && column.default == null) { - sql.push(`alter table ${table.getQuotedName()} alter column ${this.quote(column.name)} drop default`); - } - if (changedProperties.has('type')) { - let type = column.type + (column.generated ? ` generated always as ${column.generated}` : ''); - if (column.nativeEnumName) { - type = this.quote(this.getTableName(type, table.schema)); - } - sql.push( - `alter table ${table.getQuotedName()} alter column ${this.quote(column.name)} type ${type + this.castColumn(column.name, type)}`, - ); - } - if (changedProperties.has('default') && column.default != null) { - sql.push( - `alter table ${table.getQuotedName()} alter column ${this.quote(column.name)} set default ${column.default}`, - ); - } - if (changedProperties.has('nullable')) { - const action = column.nullable ? 'drop' : 'set'; - sql.push(`alter table ${table.getQuotedName()} alter column ${this.quote(column.name)} ${action} not null`); - } - return sql; - } - createTableColumn(column, table, changedProperties) { - const compositePK = table.getPrimaryKey()?.composite; - const primaryKey = !changedProperties && !this.hasNonDefaultPrimaryKeyName(table); - const columnType = column.type + (column.generated ? ` generated always as ${column.generated}` : ''); - const useDefault = column.default != null && column.default !== 'null' && !column.autoincrement; - const col = [this.quote(column.name), columnType]; - Utils.runIfNotEmpty(() => col.push('unsigned'), column.unsigned && this.platform.supportsUnsigned()); - Utils.runIfNotEmpty(() => col.push('null'), column.nullable); - Utils.runIfNotEmpty(() => col.push('not null'), !column.nullable && !column.generated); - Utils.runIfNotEmpty(() => col.push('auto_increment'), column.autoincrement); - Utils.runIfNotEmpty(() => col.push('unique'), column.autoincrement && !column.primary); - if ( - column.autoincrement && - !column.generated && - !compositePK && - (!changedProperties || changedProperties.has('autoincrement') || changedProperties.has('type')) - ) { - Utils.runIfNotEmpty(() => col.push('primary key'), primaryKey && column.primary); - } - if (useDefault) { - // https://dev.mysql.com/doc/refman/9.0/en/data-type-defaults.html - const needsExpression = [ - 'blob', - 'text', - 'json', - 'point', - 'linestring', - 'polygon', - 'multipoint', - 'multilinestring', - 'multipolygon', - 'geometrycollection', - ].some(type => column.type.toLowerCase().startsWith(type)); - const defaultSql = needsExpression && !column.default.startsWith('(') ? `(${column.default})` : column.default; - col.push(`default ${defaultSql}`); - } - Utils.runIfNotEmpty(() => col.push(column.extra), column.extra); - Utils.runIfNotEmpty(() => col.push(`comment ${this.platform.quoteValue(column.comment)}`), column.comment); - return col.join(' '); - } - getPreAlterTable(tableDiff, safe) { - return []; - } - getPostAlterTable(tableDiff, safe) { - return []; - } - getChangeColumnCommentSQL(tableName, to, schemaName) { - return ''; - } - async getNamespaces(connection) { - return []; - } - async mapIndexes(indexes) { - const map = {}; - indexes.forEach(index => { - if (map[index.keyName]) { - if (index.columnNames.length > 0) { - map[index.keyName].composite = true; - map[index.keyName].columnNames.push(index.columnNames[0]); - } - // Merge columns array for advanced column options (sort, length, collation, etc.) - if (index.columns?.length) { - map[index.keyName].columns ??= []; - map[index.keyName].columns.push(index.columns[0]); - } - // Merge INCLUDE columns - if (index.include?.length) { - map[index.keyName].include ??= []; - map[index.keyName].include.push(index.include[0]); - } - } else { - map[index.keyName] = index; - } - }); - return Object.values(map); - } - mapForeignKeys(fks, tableName, schemaName) { - return fks.reduce((ret, fk) => { - if (ret[fk.constraint_name]) { - ret[fk.constraint_name].columnNames.push(fk.column_name); - ret[fk.constraint_name].referencedColumnNames.push(fk.referenced_column_name); - } else { - ret[fk.constraint_name] = { - columnNames: [fk.column_name], - constraintName: fk.constraint_name, - localTableName: schemaName ? `${schemaName}.${tableName}` : tableName, - referencedTableName: fk.referenced_schema_name - ? `${fk.referenced_schema_name}.${fk.referenced_table_name}` - : fk.referenced_table_name, - referencedColumnNames: [fk.referenced_column_name], - updateRule: fk.update_rule.toLowerCase(), - deleteRule: fk.delete_rule.toLowerCase(), - deferMode: fk.defer_mode, - }; - } - return ret; - }, {}); - } - normalizeDefaultValue(defaultValue, length, defaultValues = {}) { - if (defaultValue == null) { - return defaultValue; - } - if (defaultValue instanceof RawQueryFragment) { - return this.platform.formatQuery(defaultValue.sql, defaultValue.params); - } - const genericValue = defaultValue.replace(/\(\d+\)/, '(?)').toLowerCase(); - const norm = defaultValues[genericValue]; - if (!norm) { - return defaultValue; - } - return norm[0].replace('(?)', length != null ? `(${length})` : ''); - } - getCreateDatabaseSQL(name) { - name = this.quote(name); - // two line breaks to force separate execution - return `create database ${name};\n\nuse ${name}`; - } - getDropDatabaseSQL(name) { - return `drop database if exists ${this.quote(name)}`; - } - /* v8 ignore next */ - getCreateNamespaceSQL(name) { - return `create schema if not exists ${this.quote(name)}`; - } - /* v8 ignore next */ - getDropNamespaceSQL(name) { - return `drop schema if exists ${this.quote(name)}`; - } - getDatabaseExistsSQL(name) { - return `select 1 from information_schema.schemata where schema_name = '${name}'`; - } - getDatabaseNotExistsError(dbName) { - return `Unknown database '${dbName}'`; - } - getManagementDbName() { - return 'information_schema'; - } - getDefaultEmptyString() { - return "''"; - } - async databaseExists(connection, name) { - try { - const res = await connection.execute(this.getDatabaseExistsSQL(name)); - return res.length > 0; - } catch (e) { - if (e instanceof Error && e.message.includes(this.getDatabaseNotExistsError(name))) { - return false; - } - /* v8 ignore next */ - throw e; - } - } - append(array, sql, pad = false) { - const length = array.length; - for (const row of Utils.asArray(sql)) { - if (!row) { - continue; - } - let tmp = row.trim(); - if (!tmp.endsWith(';')) { - tmp += ';'; - } - array.push(tmp); - } - if (pad && array.length > length) { - array.push(''); - } - } - /** Returns SQL statements to create a table with all its columns, primary key, indexes, and checks. */ - createTable(table, alter) { - let sql = `create table ${table.getQuotedName()} (`; - const columns = table.getColumns(); - const lastColumn = columns[columns.length - 1].name; - for (const column of columns) { - const col = this.createTableColumn(column, table); - if (col) { - const comma = column.name === lastColumn ? '' : ', '; - sql += col + comma; - } - } - const primaryKey = table.getPrimaryKey(); - const createPrimary = - !table.getColumns().some(c => c.autoincrement && c.primary) || this.hasNonDefaultPrimaryKeyName(table); - if (createPrimary && primaryKey) { - const name = this.hasNonDefaultPrimaryKeyName(table) ? `constraint ${this.quote(primaryKey.keyName)} ` : ''; - sql += `, ${name}primary key (${primaryKey.columnNames.map(c => this.quote(c)).join(', ')})`; - } - sql += ')'; - sql += this.finalizeTable( - table, - this.platform.getConfig().get('charset'), - this.platform.getConfig().get('collate'), - ); - const ret = []; - this.append(ret, sql); - this.append(ret, this.appendComments(table)); - for (const index of table.getIndexes()) { - this.append(ret, this.createIndex(index, table)); - } - if (!alter) { - for (const check of table.getChecks()) { - this.append(ret, this.createCheck(table, check)); - } - } - return ret; - } - alterTableComment(table, comment) { - return `alter table ${table.getQuotedName()} comment = ${this.platform.quoteValue(comment ?? '')}`; - } - /** Returns SQL to create a foreign key constraint on a table. */ - createForeignKey(table, foreignKey, alterTable = true, inline = false) { - if (!this.options.createForeignKeyConstraints) { - return ''; - } - const constraintName = this.quote(foreignKey.constraintName); - const columnNames = foreignKey.columnNames.map(c => this.quote(c)).join(', '); - const referencedColumnNames = foreignKey.referencedColumnNames.map(c => this.quote(c)).join(', '); - const referencedTableName = this.quote(this.getReferencedTableName(foreignKey.referencedTableName, table.schema)); - const sql = []; - if (alterTable) { - sql.push(`alter table ${table.getQuotedName()} add`); - } - sql.push(`constraint ${constraintName}`); - if (!inline) { - sql.push(`foreign key (${columnNames})`); - } - sql.push(`references ${referencedTableName} (${referencedColumnNames})`); - if (foreignKey.localTableName !== foreignKey.referencedTableName || this.platform.supportsMultipleCascadePaths()) { - if (foreignKey.updateRule) { - sql.push(`on update ${foreignKey.updateRule}`); - } - if (foreignKey.deleteRule) { - sql.push(`on delete ${foreignKey.deleteRule}`); - } - } - if (foreignKey.deferMode) { - sql.push(`deferrable initially ${foreignKey.deferMode}`); - } - return sql.join(' '); - } - splitTableName(name, skipDefaultSchema = false) { - const parts = name.split('.'); - const tableName = parts.pop(); - let schemaName = parts.pop(); - if (skipDefaultSchema && schemaName === this.platform.getDefaultSchemaName()) { - schemaName = undefined; - } - return [schemaName, tableName]; - } - getReferencedTableName(referencedTableName, schema) { - const [schemaName, tableName] = this.splitTableName(referencedTableName); - schema = schemaName ?? schema ?? this.platform.getConfig().get('schema'); - /* v8 ignore next */ - if (schema && schemaName === '*') { - return `${schema}.${referencedTableName.replace(/^\*\./, '')}`; - } - return this.getTableName(tableName, schema); - } - createIndex(index, table, createPrimary = false) { - if (index.primary && !createPrimary) { - return ''; - } - if (index.expression) { - return index.expression; - } - const columns = index.columnNames.map(c => this.quote(c)).join(', '); - const defer = index.deferMode ? ` deferrable initially ${index.deferMode}` : ''; - if (index.primary) { - const keyName = this.hasNonDefaultPrimaryKeyName(table) ? `constraint ${index.keyName} ` : ''; - return `alter table ${table.getQuotedName()} add ${keyName}primary key (${columns})${defer}`; - } - if (index.type === 'fulltext') { - const columns = index.columnNames.map(name => ({ name, type: table.getColumn(name).type })); - if (this.platform.supportsCreatingFullTextIndex()) { - return this.platform.getFullTextIndexExpression(index.keyName, table.schema, table.name, columns); - } - } - return this.getCreateIndexSQL(table.getShortestName(), index); - } - createCheck(table, check) { - return `alter table ${table.getQuotedName()} add constraint ${this.quote(check.name)} check (${check.expression})`; - } - getTableName(table, schema) { - if (schema && schema !== this.platform.getDefaultSchemaName()) { - return `${schema}.${table}`; - } - return table; - } - getTablesGroupedBySchemas(tables) { - return tables.reduce((acc, table) => { - const schemaTables = acc.get(table.schema_name); - if (!schemaTables) { - acc.set(table.schema_name, [table]); - return acc; - } - schemaTables.push(table); - return acc; - }, new Map()); - } - get options() { - return this.platform.getConfig().get('schemaGenerator'); - } - processComment(comment) { - return comment; - } - quote(...keys) { - return this.platform.quoteIdentifier(keys.filter(Boolean).join('.')); - } - dropForeignKey(tableName, constraintName) { - return `alter table ${this.quote(tableName)} drop foreign key ${this.quote(constraintName)}`; - } - dropIndex(table, index, oldIndexName = index.keyName) { - if (index.primary) { - return `alter table ${this.quote(table)} drop primary key`; - } - return `alter table ${this.quote(table)} drop index ${this.quote(oldIndexName)}`; - } - dropConstraint(table, name) { - return `alter table ${this.quote(table)} drop constraint ${this.quote(name)}`; - } - /** Returns SQL to drop a table if it exists. */ - dropTableIfExists(name, schema) { - let sql = `drop table if exists ${this.quote(this.getTableName(name, schema))}`; - if (this.platform.usesCascadeStatement()) { - sql += ' cascade'; - } - return sql; - } - createView(name, schema, definition) { - const viewName = this.quote(this.getTableName(name, schema)); - return `create view ${viewName} as ${definition}`; - } - dropViewIfExists(name, schema) { - let sql = `drop view if exists ${this.quote(this.getTableName(name, schema))}`; - if (this.platform.usesCascadeStatement()) { - sql += ' cascade'; - } - return sql; - } - createMaterializedView(name, schema, definition, withData = true) { - throw new Error('Not supported by given driver'); - } - dropMaterializedViewIfExists(name, schema) { - throw new Error('Not supported by given driver'); - } - refreshMaterializedView(name, schema, concurrently = false) { - throw new Error('Not supported by given driver'); - } - getListMaterializedViewsSQL() { - throw new Error('Not supported by given driver'); - } - async loadMaterializedViews(schema, connection, schemaName) { - throw new Error('Not supported by given driver'); - } -} diff --git a/node_modules/@mikro-orm/sql/schema/SqlSchemaGenerator.d.ts b/node_modules/@mikro-orm/sql/schema/SqlSchemaGenerator.d.ts deleted file mode 100644 index 40a5e3a..0000000 --- a/node_modules/@mikro-orm/sql/schema/SqlSchemaGenerator.d.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { - type ClearDatabaseOptions, - type CreateSchemaOptions, - type DropSchemaOptions, - type EnsureDatabaseOptions, - type EntityMetadata, - type ISchemaGenerator, - type MikroORM, - type Options, - type Transaction, - type UpdateSchemaOptions, -} from '@mikro-orm/core'; -import { AbstractSchemaGenerator } from '@mikro-orm/core/schema'; -import type { SchemaDifference } from '../typings.js'; -import { DatabaseSchema } from './DatabaseSchema.js'; -import type { AbstractSqlDriver } from '../AbstractSqlDriver.js'; -import type { SchemaHelper } from './SchemaHelper.js'; -/** Generates and manages SQL database schemas based on entity metadata. Supports create, update, and drop operations. */ -export declare class SqlSchemaGenerator extends AbstractSchemaGenerator implements ISchemaGenerator { - protected readonly helper: SchemaHelper; - protected readonly options: NonNullable; - protected lastEnsuredDatabase?: string; - static register(orm: MikroORM): void; - create(options?: CreateSchemaOptions): Promise; - /** - * Returns true if the database was created. - */ - ensureDatabase(options?: EnsureDatabaseOptions): Promise; - getTargetSchema(schema?: string): DatabaseSchema; - protected getOrderedMetadata(schema?: string): EntityMetadata[]; - getCreateSchemaSQL(options?: CreateSchemaOptions): Promise; - drop(options?: DropSchemaOptions): Promise; - createNamespace(name: string): Promise; - dropNamespace(name: string): Promise; - clear(options?: ClearDatabaseOptions): Promise; - getDropSchemaSQL(options?: Omit): Promise; - private getSchemaName; - update(options?: UpdateSchemaOptions): Promise; - getUpdateSchemaSQL(options?: UpdateSchemaOptions): Promise; - getUpdateSchemaMigrationSQL(options?: UpdateSchemaOptions): Promise<{ - up: string; - down: string; - }>; - private prepareSchemaForComparison; - diffToSQL( - schemaDiff: SchemaDifference, - options: { - wrap?: boolean; - safe?: boolean; - dropTables?: boolean; - schema?: string; - }, - ): string; - /** - * We need to drop foreign keys first for all tables to allow dropping PK constraints. - */ - private preAlterTable; - /** - * creates new database and connects to it - */ - createDatabase( - name?: string, - options?: { - skipOnConnect?: boolean; - }, - ): Promise; - dropDatabase(name?: string): Promise; - execute( - sql: string, - options?: { - wrap?: boolean; - ctx?: Transaction; - }, - ): Promise; - dropTableIfExists(name: string, schema?: string): Promise; - private wrapSchema; - private append; - private matchName; - private isTableSkipped; - /** - * Sorts views by their dependencies so that views depending on other views are created after their dependencies. - * Uses topological sort based on view definition string matching. - */ - private sortViewsByDependencies; - private escapeRegExp; -} -export { SqlSchemaGenerator as SchemaGenerator }; diff --git a/node_modules/@mikro-orm/sql/schema/SqlSchemaGenerator.js b/node_modules/@mikro-orm/sql/schema/SqlSchemaGenerator.js deleted file mode 100644 index 0a072e0..0000000 --- a/node_modules/@mikro-orm/sql/schema/SqlSchemaGenerator.js +++ /dev/null @@ -1,553 +0,0 @@ -import { CommitOrderCalculator, TableNotFoundException, Utils } from '@mikro-orm/core'; -import { AbstractSchemaGenerator } from '@mikro-orm/core/schema'; -import { DatabaseSchema } from './DatabaseSchema.js'; -import { SchemaComparator } from './SchemaComparator.js'; -/** Generates and manages SQL database schemas based on entity metadata. Supports create, update, and drop operations. */ -export class SqlSchemaGenerator extends AbstractSchemaGenerator { - helper = this.platform.getSchemaHelper(); - options = this.config.get('schemaGenerator'); - lastEnsuredDatabase; - static register(orm) { - orm.config.registerExtension('@mikro-orm/schema-generator', () => new SqlSchemaGenerator(orm.em)); - } - async create(options) { - await this.ensureDatabase(); - const sql = await this.getCreateSchemaSQL(options); - await this.execute(sql); - } - /** - * Returns true if the database was created. - */ - async ensureDatabase(options) { - await this.connection.ensureConnection(); - const dbName = this.config.get('dbName'); - if (this.lastEnsuredDatabase === dbName && !options?.forceCheck) { - return true; - } - const exists = await this.helper.databaseExists(this.connection, dbName); - this.lastEnsuredDatabase = dbName; - if (!exists) { - const managementDbName = this.helper.getManagementDbName(); - if (managementDbName) { - this.config.set('dbName', managementDbName); - await this.driver.reconnect({ skipOnConnect: true }); - await this.createDatabase(dbName, { skipOnConnect: true }); - } - if (options?.create) { - await this.create(options); - } - return true; - } - /* v8 ignore next */ - if (options?.clear) { - await this.clear({ ...options, clearIdentityMap: false }); - } - return false; - } - getTargetSchema(schema) { - const metadata = this.getOrderedMetadata(schema); - const schemaName = schema ?? this.config.get('schema') ?? this.platform.getDefaultSchemaName(); - return DatabaseSchema.fromMetadata(metadata, this.platform, this.config, schemaName, this.em); - } - getOrderedMetadata(schema) { - const metadata = super.getOrderedMetadata(schema); - // Filter out skipped tables - return metadata.filter(meta => { - const tableName = meta.tableName; - const tableSchema = meta.schema ?? schema ?? this.config.get('schema'); - return !this.isTableSkipped(tableName, tableSchema); - }); - } - async getCreateSchemaSQL(options = {}) { - const toSchema = this.getTargetSchema(options.schema); - const ret = []; - for (const namespace of toSchema.getNamespaces()) { - if (namespace === this.platform.getDefaultSchemaName()) { - continue; - } - const sql = this.helper.getCreateNamespaceSQL(namespace); - this.append(ret, sql); - } - if (this.platform.supportsNativeEnums()) { - const created = []; - for (const [enumName, enumOptions] of Object.entries(toSchema.getNativeEnums())) { - /* v8 ignore next */ - if (created.includes(enumName)) { - continue; - } - created.push(enumName); - const sql = this.helper.getCreateNativeEnumSQL( - enumOptions.name, - enumOptions.items, - this.getSchemaName(enumOptions, options), - ); - this.append(ret, sql); - } - } - for (const table of toSchema.getTables()) { - this.append(ret, this.helper.createTable(table), true); - } - if (this.helper.supportsSchemaConstraints()) { - for (const table of toSchema.getTables()) { - const fks = Object.values(table.getForeignKeys()).map(fk => this.helper.createForeignKey(table, fk)); - this.append(ret, fks, true); - } - } - // Create views after tables (views may depend on tables) - // Sort views by dependencies (views depending on other views come later) - const sortedViews = this.sortViewsByDependencies(toSchema.getViews()); - for (const view of sortedViews) { - if (view.materialized) { - this.append( - ret, - this.helper.createMaterializedView(view.name, view.schema, view.definition, view.withData ?? true), - ); - } else { - this.append(ret, this.helper.createView(view.name, view.schema, view.definition), true); - } - } - return this.wrapSchema(ret, options); - } - async drop(options = {}) { - if (options.dropDb) { - const name = this.config.get('dbName'); - return this.dropDatabase(name); - } - const sql = await this.getDropSchemaSQL(options); - await this.execute(sql); - } - async createNamespace(name) { - const sql = this.helper.getCreateNamespaceSQL(name); - await this.execute(sql); - } - async dropNamespace(name) { - const sql = this.helper.getDropNamespaceSQL(name); - await this.execute(sql); - } - async clear(options) { - // truncate by default, so no value is considered as true - /* v8 ignore next */ - if (options?.truncate === false) { - return super.clear(options); - } - if (this.options.disableForeignKeysForClear) { - await this.execute(this.helper.disableForeignKeysSQL()); - } - const schema = options?.schema ?? this.config.get('schema', this.platform.getDefaultSchemaName()); - for (const meta of this.getOrderedMetadata(schema).reverse()) { - try { - await this.driver - .createQueryBuilder(meta.class, this.em?.getTransactionContext(), 'write', false) - .withSchema(schema) - .truncate() - .execute(); - } catch (e) { - if (this.platform.getExceptionConverter().convertException(e) instanceof TableNotFoundException) { - continue; - } - throw e; - } - } - if (this.options.disableForeignKeysForClear) { - await this.execute(this.helper.enableForeignKeysSQL()); - } - if (options?.clearIdentityMap ?? true) { - this.clearIdentityMap(); - } - } - async getDropSchemaSQL(options = {}) { - await this.ensureDatabase(); - const metadata = this.getOrderedMetadata(options.schema).reverse(); - const schemas = this.getTargetSchema(options.schema).getNamespaces(); - const schema = await DatabaseSchema.create( - this.connection, - this.platform, - this.config, - options.schema, - schemas, - undefined, - this.options.skipTables, - this.options.skipViews, - ); - const ret = []; - // Drop views first (views may depend on tables) - // Drop in reverse dependency order (dependent views first) - const targetSchema = this.getTargetSchema(options.schema); - const sortedViews = this.sortViewsByDependencies(targetSchema.getViews()).reverse(); - for (const view of sortedViews) { - if (view.materialized) { - this.append(ret, this.helper.dropMaterializedViewIfExists(view.name, view.schema)); - } else { - this.append(ret, this.helper.dropViewIfExists(view.name, view.schema)); - } - } - // remove FKs explicitly if we can't use a cascading statement and we don't disable FK checks (we need this for circular relations) - for (const meta of metadata) { - if (!this.platform.usesCascadeStatement() && (!this.options.disableForeignKeys || options.dropForeignKeys)) { - const table = schema.getTable(meta.tableName); - if (!table) { - continue; - } - const foreignKeys = Object.values(table.getForeignKeys()); - for (const fk of foreignKeys) { - this.append(ret, this.helper.dropForeignKey(table.getShortestName(), fk.constraintName)); - } - } - } - for (const meta of metadata) { - this.append(ret, this.helper.dropTableIfExists(meta.tableName, this.getSchemaName(meta, options))); - } - if (this.platform.supportsNativeEnums()) { - for (const columnName of Object.keys(schema.getNativeEnums())) { - const sql = this.helper.getDropNativeEnumSQL(columnName, options.schema ?? this.config.get('schema')); - this.append(ret, sql); - } - } - if (options.dropMigrationsTable) { - this.append( - ret, - this.helper.dropTableIfExists(this.config.get('migrations').tableName, this.config.get('schema')), - ); - } - return this.wrapSchema(ret, options); - } - getSchemaName(meta, options) { - const schemaName = options.schema ?? this.config.get('schema'); - /* v8 ignore next */ - const resolvedName = meta.schema && meta.schema === '*' ? schemaName : (meta.schema ?? schemaName); - // skip default schema name - if (resolvedName === this.platform.getDefaultSchemaName()) { - return undefined; - } - return resolvedName; - } - async update(options = {}) { - const sql = await this.getUpdateSchemaSQL(options); - await this.execute(sql); - } - async getUpdateSchemaSQL(options = {}) { - await this.ensureDatabase(); - const { fromSchema, toSchema } = await this.prepareSchemaForComparison(options); - const comparator = new SchemaComparator(this.platform); - const diffUp = comparator.compare(fromSchema, toSchema); - return this.diffToSQL(diffUp, options); - } - async getUpdateSchemaMigrationSQL(options = {}) { - if (!options.fromSchema) { - await this.ensureDatabase(); - } - const { fromSchema, toSchema } = await this.prepareSchemaForComparison(options); - const comparator = new SchemaComparator(this.platform); - const diffUp = comparator.compare(fromSchema, toSchema); - const diffDown = comparator.compare(toSchema, fromSchema, diffUp); - return { - up: this.diffToSQL(diffUp, options), - down: this.platform.supportsDownMigrations() ? this.diffToSQL(diffDown, options) : '', - }; - } - async prepareSchemaForComparison(options) { - options.safe ??= false; - options.dropTables ??= true; - const toSchema = this.getTargetSchema(options.schema); - const schemas = toSchema.getNamespaces(); - const fromSchema = - options.fromSchema ?? - (await DatabaseSchema.create( - this.connection, - this.platform, - this.config, - options.schema, - schemas, - undefined, - this.options.skipTables, - this.options.skipViews, - )); - const wildcardSchemaTables = [...this.metadata.getAll().values()] - .filter(meta => meta.schema === '*') - .map(meta => meta.tableName); - fromSchema.prune(options.schema, wildcardSchemaTables); - toSchema.prune(options.schema, wildcardSchemaTables); - return { fromSchema, toSchema }; - } - diffToSQL(schemaDiff, options) { - const ret = []; - globalThis.idx = 0; - if (this.platform.supportsSchemas()) { - for (const newNamespace of schemaDiff.newNamespaces) { - const sql = this.helper.getCreateNamespaceSQL(newNamespace); - this.append(ret, sql); - } - } - if (this.platform.supportsNativeEnums()) { - for (const newNativeEnum of schemaDiff.newNativeEnums) { - const sql = this.helper.getCreateNativeEnumSQL( - newNativeEnum.name, - newNativeEnum.items, - this.getSchemaName(newNativeEnum, options), - ); - this.append(ret, sql); - } - } - // Drop removed and changed views first (before modifying tables they may depend on) - // Drop in reverse dependency order (dependent views first) - if (options.dropTables && !options.safe) { - const sortedRemovedViews = this.sortViewsByDependencies(Object.values(schemaDiff.removedViews)).reverse(); - for (const view of sortedRemovedViews) { - if (view.materialized) { - this.append(ret, this.helper.dropMaterializedViewIfExists(view.name, view.schema)); - } else { - this.append(ret, this.helper.dropViewIfExists(view.name, view.schema)); - } - } - } - // Drop changed views (they will be recreated after table changes) - // Also in reverse dependency order - const changedViewsFrom = Object.values(schemaDiff.changedViews).map(v => v.from); - const sortedChangedViewsFrom = this.sortViewsByDependencies(changedViewsFrom).reverse(); - for (const view of sortedChangedViewsFrom) { - if (view.materialized) { - this.append(ret, this.helper.dropMaterializedViewIfExists(view.name, view.schema)); - } else { - this.append(ret, this.helper.dropViewIfExists(view.name, view.schema)); - } - } - if (!options.safe && this.options.createForeignKeyConstraints) { - for (const orphanedForeignKey of schemaDiff.orphanedForeignKeys) { - const [schemaName, tableName] = this.helper.splitTableName(orphanedForeignKey.localTableName, true); - /* v8 ignore next */ - const name = (schemaName ? schemaName + '.' : '') + tableName; - this.append(ret, this.helper.dropForeignKey(name, orphanedForeignKey.constraintName)); - } - if (schemaDiff.orphanedForeignKeys.length > 0) { - ret.push(''); - } - } - for (const newTable of Object.values(schemaDiff.newTables)) { - this.append(ret, this.helper.createTable(newTable, true), true); - } - if (this.helper.supportsSchemaConstraints()) { - for (const newTable of Object.values(schemaDiff.newTables)) { - const sql = []; - if (this.options.createForeignKeyConstraints) { - const fks = Object.values(newTable.getForeignKeys()).map(fk => this.helper.createForeignKey(newTable, fk)); - this.append(sql, fks); - } - for (const check of newTable.getChecks()) { - this.append(sql, this.helper.createCheck(newTable, check)); - } - this.append(ret, sql, true); - } - } - if (options.dropTables && !options.safe) { - for (const table of Object.values(schemaDiff.removedTables)) { - this.append(ret, this.helper.dropTableIfExists(table.name, table.schema)); - } - if (Utils.hasObjectKeys(schemaDiff.removedTables)) { - ret.push(''); - } - } - for (const changedTable of Object.values(schemaDiff.changedTables)) { - this.append(ret, this.preAlterTable(changedTable, options.safe), true); - } - for (const changedTable of Object.values(schemaDiff.changedTables)) { - this.append(ret, this.helper.alterTable(changedTable, options.safe), true); - } - for (const changedTable of Object.values(schemaDiff.changedTables)) { - this.append(ret, this.helper.getPostAlterTable(changedTable, options.safe), true); - } - if (!options.safe && this.platform.supportsNativeEnums()) { - for (const removedNativeEnum of schemaDiff.removedNativeEnums) { - this.append(ret, this.helper.getDropNativeEnumSQL(removedNativeEnum.name, removedNativeEnum.schema)); - } - } - if (options.dropTables && !options.safe) { - for (const removedNamespace of schemaDiff.removedNamespaces) { - const sql = this.helper.getDropNamespaceSQL(removedNamespace); - this.append(ret, sql); - } - } - // Create new views after all table changes are done - // Sort views by dependencies (views depending on other views come later) - const sortedNewViews = this.sortViewsByDependencies(Object.values(schemaDiff.newViews)); - for (const view of sortedNewViews) { - if (view.materialized) { - this.append( - ret, - this.helper.createMaterializedView(view.name, view.schema, view.definition, view.withData ?? true), - ); - } else { - this.append(ret, this.helper.createView(view.name, view.schema, view.definition), true); - } - } - // Recreate changed views (also sorted by dependencies) - const changedViews = Object.values(schemaDiff.changedViews).map(v => v.to); - const sortedChangedViews = this.sortViewsByDependencies(changedViews); - for (const view of sortedChangedViews) { - if (view.materialized) { - this.append( - ret, - this.helper.createMaterializedView(view.name, view.schema, view.definition, view.withData ?? true), - ); - } else { - this.append(ret, this.helper.createView(view.name, view.schema, view.definition), true); - } - } - return this.wrapSchema(ret, options); - } - /** - * We need to drop foreign keys first for all tables to allow dropping PK constraints. - */ - preAlterTable(diff, safe) { - const ret = []; - this.append(ret, this.helper.getPreAlterTable(diff, safe)); - for (const foreignKey of Object.values(diff.removedForeignKeys)) { - ret.push(this.helper.dropForeignKey(diff.toTable.getShortestName(), foreignKey.constraintName)); - } - for (const foreignKey of Object.values(diff.changedForeignKeys)) { - ret.push(this.helper.dropForeignKey(diff.toTable.getShortestName(), foreignKey.constraintName)); - } - return ret; - } - /** - * creates new database and connects to it - */ - async createDatabase(name, options) { - name ??= this.config.get('dbName'); - const sql = this.helper.getCreateDatabaseSQL(name); - if (sql) { - await this.execute(sql); - } - this.config.set('dbName', name); - await this.driver.reconnect(options); - } - async dropDatabase(name) { - name ??= this.config.get('dbName'); - this.config.set('dbName', this.helper.getManagementDbName()); - await this.driver.reconnect(); - await this.execute(this.helper.getDropDatabaseSQL(name)); - this.config.set('dbName', name); - } - async execute(sql, options = {}) { - options.wrap ??= false; - const lines = this.wrapSchema(sql, options).split('\n'); - const groups = []; - let i = 0; - for (const line of lines) { - if (line.trim() === '') { - if (groups[i]?.length > 0) { - i++; - } - continue; - } - groups[i] ??= []; - groups[i].push(line.trim()); - } - if (groups.length === 0) { - return; - } - if (this.platform.supportsMultipleStatements()) { - for (const group of groups) { - const query = group.join('\n'); - await this.driver.execute(query); - } - return; - } - const statements = groups.flatMap(group => { - return group - .join('\n') - .split(';\n') - .map(s => s.trim()) - .filter(s => s); - }); - await Utils.runSerial(statements, stmt => this.driver.execute(stmt)); - } - async dropTableIfExists(name, schema) { - const sql = this.helper.dropTableIfExists(name, schema); - return this.execute(sql); - } - wrapSchema(sql, options) { - const array = Utils.asArray(sql); - if (array.length === 0) { - return ''; - } - if (array[array.length - 1] === '') { - array.pop(); - } - if (options.wrap === false) { - return array.join('\n') + '\n'; - } - let ret = this.helper.getSchemaBeginning(this.config.get('charset'), this.options.disableForeignKeys); - ret += array.join('\n') + '\n'; - ret += this.helper.getSchemaEnd(this.options.disableForeignKeys); - return ret; - } - append(array, sql, pad) { - return this.helper.append(array, sql, pad); - } - matchName(name, nameToMatch) { - return typeof nameToMatch === 'string' - ? name.toLocaleLowerCase() === nameToMatch.toLocaleLowerCase() - : nameToMatch.test(name); - } - isTableSkipped(tableName, schemaName) { - const skipTables = this.options.skipTables; - if (!skipTables || skipTables.length === 0) { - return false; - } - const fullTableName = schemaName ? `${schemaName}.${tableName}` : tableName; - return skipTables.some(pattern => this.matchName(tableName, pattern) || this.matchName(fullTableName, pattern)); - } - /** - * Sorts views by their dependencies so that views depending on other views are created after their dependencies. - * Uses topological sort based on view definition string matching. - */ - sortViewsByDependencies(views) { - if (views.length <= 1) { - return views; - } - // Use CommitOrderCalculator for topological sort - const calc = new CommitOrderCalculator(); - // Map views to numeric indices for the calculator - const viewToIndex = new Map(); - const indexToView = new Map(); - for (let i = 0; i < views.length; i++) { - viewToIndex.set(views[i], i); - indexToView.set(i, views[i]); - calc.addNode(i); - } - // Check each view's definition for references to other view names - for (const view of views) { - const definition = view.definition.toLowerCase(); - const viewIndex = viewToIndex.get(view); - for (const otherView of views) { - if (otherView === view) { - continue; - } - // Check if the definition references the other view's name - // Use word boundary matching to avoid false positives - const patterns = [new RegExp(`\\b${this.escapeRegExp(otherView.name.toLowerCase())}\\b`)]; - if (otherView.schema) { - patterns.push( - new RegExp(`\\b${this.escapeRegExp(`${otherView.schema}.${otherView.name}`.toLowerCase())}\\b`), - ); - } - for (const pattern of patterns) { - if (pattern.test(definition)) { - // view depends on otherView, so otherView must come first - // addDependency(from, to) puts `from` before `to` in result - const otherIndex = viewToIndex.get(otherView); - calc.addDependency(otherIndex, viewIndex, 1); - break; - } - } - } - } - // Sort and map back to views - return calc.sort().map(index => indexToView.get(index)); - } - escapeRegExp(string) { - return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); - } -} -// for back compatibility -export { SqlSchemaGenerator as SchemaGenerator }; diff --git a/node_modules/@mikro-orm/sql/schema/index.d.ts b/node_modules/@mikro-orm/sql/schema/index.d.ts deleted file mode 100644 index 0ddedb9..0000000 --- a/node_modules/@mikro-orm/sql/schema/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './DatabaseSchema.js'; -export * from './DatabaseTable.js'; -export * from './SqlSchemaGenerator.js'; -export * from './SchemaHelper.js'; -export * from './SchemaComparator.js'; diff --git a/node_modules/@mikro-orm/sql/schema/index.js b/node_modules/@mikro-orm/sql/schema/index.js deleted file mode 100644 index 0ddedb9..0000000 --- a/node_modules/@mikro-orm/sql/schema/index.js +++ /dev/null @@ -1,5 +0,0 @@ -export * from './DatabaseSchema.js'; -export * from './DatabaseTable.js'; -export * from './SqlSchemaGenerator.js'; -export * from './SchemaHelper.js'; -export * from './SchemaComparator.js'; diff --git a/node_modules/@mikro-orm/sql/typings.d.ts b/node_modules/@mikro-orm/sql/typings.d.ts deleted file mode 100644 index 698142e..0000000 --- a/node_modules/@mikro-orm/sql/typings.d.ts +++ /dev/null @@ -1,440 +0,0 @@ -import type { Generated, Kysely } from 'kysely'; -import type { - CheckCallback, - DeferMode, - Dictionary, - EntityName, - EntityProperty, - EntitySchemaWithMeta, - FilterQuery, - GroupOperator, - IndexColumnOptions, - InferEntityName, - Opt, - Primary, - PrimaryProperty, - QueryFlag, - QueryOrderMap, - RawQueryFragment, - Scalar, - Type, -} from '@mikro-orm/core'; -import type { JoinType, QueryType } from './query/enums.js'; -import type { DatabaseSchema } from './schema/DatabaseSchema.js'; -import type { DatabaseTable } from './schema/DatabaseTable.js'; -import type { AnyQueryBuilder } from './query/QueryBuilder.js'; -import type { CteOptions, NativeQueryBuilder } from './query/NativeQueryBuilder.js'; -import type { MikroKyselyPluginOptions } from './plugin/index.js'; -export interface Table { - table_name: string; - schema_name?: string; - table_comment?: string; -} -/** @internal */ -export type InternalField = string | RawQueryFragment | AnyQueryBuilder | NativeQueryBuilder; -export interface JoinOptions { - table: string; - schema?: string; - type: JoinType; - alias: string; - ownerAlias: string; - inverseAlias?: string; - joinColumns?: string[]; - inverseJoinColumns?: string[]; - primaryKeys?: string[]; - path?: string; - prop: EntityProperty; - cond: Dictionary; - cond_?: Dictionary; - subquery?: string; - nested?: Set; - parent?: JoinOptions; -} -export interface Column { - name: string; - type: string; - mappedType: Type; - unsigned?: boolean; - autoincrement?: boolean; - nullable?: boolean; - length?: number; - precision?: number; - scale?: number; - default?: string | null; - defaultConstraint?: string; - comment?: string; - generated?: string; - nativeEnumName?: string; - enumItems?: string[]; - primary?: boolean; - unique?: boolean; - /** mysql only */ - extra?: string; - ignoreSchemaChanges?: ('type' | 'extra' | 'default')[]; -} -export interface ForeignKey { - columnNames: string[]; - constraintName: string; - localTableName: string; - referencedTableName: string; - referencedColumnNames: string[]; - updateRule?: string; - deleteRule?: string; - deferMode?: DeferMode; -} -export interface IndexDef { - columnNames: string[]; - keyName: string; - unique: boolean; - constraint: boolean; - primary: boolean; - composite?: boolean; - expression?: string; - options?: Dictionary; - type?: - | string - | Readonly<{ - indexType?: string; - storageEngineIndexType?: 'hash' | 'btree'; - predicate?: string; - }>; - deferMode?: DeferMode | `${DeferMode}`; - /** - * Advanced column options for the index. - * When specified, these options override the simple columnNames for index generation. - */ - columns?: IndexColumnOptions[]; - /** - * Columns to include in the index but not as part of the key (PostgreSQL, MSSQL). - */ - include?: string[]; - /** Fill factor for the index as a percentage 0-100 (PostgreSQL, MSSQL). */ - fillFactor?: number; - /** - * Whether the index is invisible/hidden from the query optimizer (MySQL 8+, MariaDB 10.6+, MongoDB). - */ - invisible?: boolean; - /** - * Whether the index is disabled (MSSQL only). - */ - disabled?: boolean; - /** - * Whether the index should be clustered (MariaDB, MSSQL). - */ - clustered?: boolean; -} -export interface CheckDef { - name: string; - expression: string | CheckCallback; - definition?: string; - columnName?: string; -} -export interface ColumnDifference { - oldColumnName: string; - column: Column; - fromColumn: Column; - changedProperties: Set; -} -export interface TableDifference { - name: string; - changedComment?: string; - fromTable: DatabaseTable; - toTable: DatabaseTable; - addedColumns: Dictionary; - changedColumns: Dictionary; - removedColumns: Dictionary; - renamedColumns: Dictionary; - addedIndexes: Dictionary; - changedIndexes: Dictionary; - removedIndexes: Dictionary; - renamedIndexes: Dictionary; - addedChecks: Dictionary; - changedChecks: Dictionary; - removedChecks: Dictionary; - addedForeignKeys: Dictionary; - changedForeignKeys: Dictionary; - removedForeignKeys: Dictionary; -} -export interface DatabaseView { - name: string; - schema?: string; - definition: string; - /** True if this is a materialized view (PostgreSQL only). */ - materialized?: boolean; - /** For materialized views, whether data was populated on creation. */ - withData?: boolean; -} -export interface SchemaDifference { - newNamespaces: Set; - newNativeEnums: { - name: string; - schema?: string; - items: string[]; - }[]; - newTables: Dictionary; - changedTables: Dictionary; - removedTables: Dictionary; - newViews: Dictionary; - changedViews: Dictionary<{ - from: DatabaseView; - to: DatabaseView; - }>; - removedViews: Dictionary; - removedNamespaces: Set; - removedNativeEnums: { - name: string; - schema?: string; - }[]; - orphanedForeignKeys: ForeignKey[]; - fromSchema: DatabaseSchema; -} -export interface IQueryBuilder { - readonly alias: string; - readonly type: QueryType; - /** @internal */ - state: { - fields?: InternalField[]; - [key: string]: any; - }; - /** @internal */ - helper: any; - select(fields: string | RawQueryFragment | (string | RawQueryFragment)[], distinct?: boolean): this; - addSelect(fields: string | string[]): this; - from(target: EntityName | IQueryBuilder, aliasName?: string): IQueryBuilder; - insert(data: any): this; - update(data: any): this; - delete(cond?: FilterQuery): this; - truncate(): this; - count(field?: string | string[], distinct?: boolean): this; - join(field: string, alias: string, cond?: FilterQuery, type?: JoinType, path?: string): this; - innerJoin(field: string, alias: string, cond?: FilterQuery): this; - leftJoin(field: string, alias: string, cond?: FilterQuery): this; - joinAndSelect(field: any, alias: string, cond?: FilterQuery): this; - leftJoinAndSelect(field: any, alias: string, cond?: FilterQuery, fields?: string[]): this; - innerJoinAndSelect(field: any, alias: string, cond?: FilterQuery, fields?: string[]): this; - withSubQuery(subQuery: RawQueryFragment | NativeQueryBuilder, alias: string): this; - where( - cond: FilterQuery | string | RawQueryFragment | Dictionary, - operator?: keyof typeof GroupOperator | any[], - operator2?: keyof typeof GroupOperator, - ): this; - andWhere(cond: FilterQuery | string | RawQueryFragment | Dictionary, params?: any[]): this; - orWhere(cond: FilterQuery | string | RawQueryFragment | Dictionary, params?: any[]): this; - orderBy(orderBy: QueryOrderMap): this; - groupBy(fields: (string | keyof T) | (string | keyof T)[]): this; - having(cond?: FilterQuery | string, params?: any[]): this; - getAliasForJoinPath(path: string, options?: ICriteriaNodeProcessOptions): string | undefined; - getJoinForPath(path?: string, options?: ICriteriaNodeProcessOptions): JoinOptions | undefined; - getNextAlias(entityName?: string | EntityName): string; - clone(reset?: boolean | string[], preserve?: string[]): IQueryBuilder; - setFlag(flag: QueryFlag): this; - unsetFlag(flag: QueryFlag): this; - hasFlag(flag: QueryFlag): boolean; - with(name: string, query: AnyQueryBuilder | NativeQueryBuilder | RawQueryFragment, options?: CteOptions): this; - withRecursive( - name: string, - query: AnyQueryBuilder | NativeQueryBuilder | RawQueryFragment, - options?: CteOptions, - ): this; - scheduleFilterCheck(path: string): void; - withSchema(schema: string): this; -} -export interface ICriteriaNodeProcessOptions { - alias?: string; - matchPopulateJoins?: boolean; - ignoreBranching?: boolean; - preferNoBranch?: boolean; - type?: 'orderBy' | 'having'; - filter?: boolean; - parentPath?: string; -} -export interface ICriteriaNode { - readonly entityName: EntityName; - readonly parent?: ICriteriaNode | undefined; - readonly key?: string | symbol | undefined; - readonly strict?: boolean; - payload: any; - prop?: EntityProperty; - index?: number; - process(qb: IQueryBuilder, options?: ICriteriaNodeProcessOptions): any; - shouldInline(payload: any): boolean; - willAutoJoin(qb: IQueryBuilder, alias?: string, options?: ICriteriaNodeProcessOptions): boolean; - shouldRename(payload: any): boolean; - renameFieldToPK(qb: IQueryBuilder, ownerAlias?: string): string; - getPath(opts?: { addIndex?: boolean }): string; - getPivotPath(path: string): string; -} -export type MaybeReturnType = T extends (...args: any[]) => infer R ? R : T; -export type InferEntityProperties = - Schema extends EntitySchemaWithMeta ? Properties : never; -export type InferKyselyDB< - TEntities extends { - name: string; - }, - TOptions extends MikroKyselyPluginOptions = {}, -> = MapValueAsTable, TOptions>; -export type InferDBFromKysely> = TKysely extends Kysely ? TDB : never; -type PreferStringLiteral = [TCandidate] extends [never] - ? TFallback - : string extends TCandidate - ? TFallback - : TCandidate extends string - ? TCandidate - : TFallback; -export type MapTableName< - T extends { - name: string; - tableName?: string; - }, - TOptions extends MikroKyselyPluginOptions = {}, -> = { - [P in T as TOptions['tableNamingStrategy'] extends 'entity' - ? P['name'] - : PreferStringLiteral, P['name']>]: P; -}; -export type MapValueAsTable, TOptions extends MikroKyselyPluginOptions = {}> = { - [K in keyof TMap as TransformName< - K, - TOptions['tableNamingStrategy'] extends 'entity' ? 'entity' : 'underscore' - >]: InferKyselyTable; -}; -export type InferKyselyTable< - TSchema extends EntitySchemaWithMeta, - TOptions extends MikroKyselyPluginOptions = {}, -> = ExcludeNever<{ - -readonly [K in keyof InferEntityProperties as TransformColumnName< - K, - TOptions['columnNamingStrategy'] extends 'property' ? 'property' : 'underscore', - MaybeReturnType[K]> - >]: InferColumnValue< - MaybeReturnType[K]>, - TOptions['processOnCreateHooks'] extends true ? true : false - >; -}>; -type TransformName = TNamingStrategy extends 'underscore' - ? TName extends string - ? SnakeCase - : TName - : TName; -type TransformColumnName< - TName, - TNamingStrategy extends 'underscore' | 'property', - TBuilder, -> = TNamingStrategy extends 'property' - ? TName - : TBuilder extends { - '~options': { - fieldName: string; - }; - } - ? TBuilder['~options']['fieldName'] - : TName extends string - ? MaybeJoinColumnName, TBuilder> - : never; -type MaybeJoinColumnName = TBuilder extends { - '~type'?: { - value: infer Value; - }; - '~options': { - kind: 'm:1'; - }; -} - ? PrimaryProperty extends string - ? `${TName}_${SnakeCase>}` - : never - : TBuilder extends { - '~type'?: { - value: infer Value; - }; - '~options': { - kind: '1:1'; - owner: true; - }; - } - ? PrimaryProperty extends string - ? `${TName}_${SnakeCase>}` - : never - : TName; -export type SnakeCase = TName extends `${infer A}${infer B}${infer Rest}` - ? IsUpperLetter extends never - ? `${Lowercase}${SnakeCase<`${B}${Rest}`>}` - : IsLowerLetter extends never - ? `${Lowercase}${SnakeCase<`${B}${Rest}`>}` - : `${Lowercase}_${SnakeCase<`${B}${Rest}`>}` - : Lowercase; -type IsLowerLetter = C extends Lowercase ? (C extends Uppercase ? never : C) : never; -type IsUpperLetter = C extends Uppercase ? (C extends Lowercase ? never : C) : never; -type InferColumnValue = TBuilder extends { - '~type'?: { - value: infer Value; - }; - '~options': infer TOptions; -} - ? MaybeNever, TOptions, TProcessOnCreate>, TOptions> - : never; -type MaybeGenerated = TOptions extends { - nullable: true; -} - ? TValue | null - : TOptions extends { - autoincrement: true; - } - ? Generated - : TOptions extends { - default: true; - } - ? Generated - : TOptions extends { - defaultRaw: true; - } - ? Generated - : TProcessOnCreate extends false - ? TValue - : TOptions extends { - onCreate: Function; - } - ? Generated - : TValue; -type MaybeJoinKey = TOptions extends { - kind: 'm:1'; -} - ? UnwrapOpt> - : TOptions extends { - kind: '1:1'; - } - ? TOptions extends { - owner: true; - } - ? UnwrapOpt> - : never - : TValue; -type UnwrapOpt = TValue extends Opt ? OriginalValue : TValue; -type MaybeNever = TOptions extends - | { - persist: false; - } - | { - kind: 'm:n' | '1:m'; - } - ? never - : TValue; -type ExcludeNever> = { - [K in keyof TMap as TMap[K] extends never ? never : K]: TMap[K]; -}; -export type InferClassEntityDB = - ClassEntityDBMap extends infer R ? ([keyof R] extends [never] ? unknown : R) : never; -type ClassEntityDBMap = { - [T in TEntities as ClassEntityTableName]: ClassEntityColumns; -}; -type ClassEntityTableName = T extends abstract new ( - ...args: any[] -) => infer Instance - ? TransformName, TOptions['tableNamingStrategy'] extends 'entity' ? 'entity' : 'underscore'> - : never; -type ClassEntityColumns = T extends abstract new (...args: any[]) => infer Instance - ? { - [K in keyof Instance as IsClassEntityColumn]: Instance[K]; - } - : never; -type IsClassEntityColumn = K extends symbol ? never : NonNullable extends Scalar ? K : never; -export {}; diff --git a/node_modules/@mikro-orm/sql/typings.js b/node_modules/@mikro-orm/sql/typings.js deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/@mikro-orm/sql/typings.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/@nestjs/common/LICENSE b/node_modules/@nestjs/common/LICENSE deleted file mode 100644 index d209764..0000000 --- a/node_modules/@nestjs/common/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2017-present Kamil Mysliwiec - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@nestjs/common/PACKAGE.md b/node_modules/@nestjs/common/PACKAGE.md deleted file mode 100644 index 2e33978..0000000 --- a/node_modules/@nestjs/common/PACKAGE.md +++ /dev/null @@ -1 +0,0 @@ -The common package comes with decorators such as `@Controller()`, `@Injectable()` and so on. diff --git a/node_modules/@nestjs/common/Readme.md b/node_modules/@nestjs/common/Readme.md deleted file mode 100644 index 72d4b89..0000000 --- a/node_modules/@nestjs/common/Readme.md +++ /dev/null @@ -1,146 +0,0 @@ -

- Nest Logo -

- -[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456 -[circleci-url]: https://circleci.com/gh/nestjs/nest - -

A progressive Node.js framework for building efficient and scalable server-side applications.

-

-NPM Version -Package License -NPM Downloads -CircleCI -Discord -Backers on Open Collective -Sponsors on Open Collective - - Support us - -

- - -## Description - -Nest is a framework for building efficient, scalable Node.js server-side applications. It uses modern JavaScript, is built with TypeScript (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming). - -

Under the hood, Nest makes use of Express, but also provides compatibility with a wide range of other libraries, like Fastify, allowing for easy use of the myriad of third-party plugins which are available.

- -## Philosophy - -

In recent years, thanks to Node.js, JavaScript has become the “lingua franca” of the web for both front-end and back-end applications, giving rise to awesome projects like Angular, React, and Vue, which improve developer productivity and enable the construction of fast, testable, and extensible frontend applications. However, on the server-side, while there are a lot of superb libraries, helpers, and tools for Node, none of them effectively solve the main problem - the architecture.

-

Nest aims to provide an application architecture out of the box which allows for effortless creation of highly testable, scalable, and loosely coupled and easily maintainable applications. The architecture is heavily inspired by Angular.

- -## Getting started - -- To check out the [guide](https://docs.nestjs.com), visit [docs.nestjs.com](https://docs.nestjs.com). :books: -- 要查看中文 [指南](readme_zh.md), 请访问 [docs.nestjs.cn](https://docs.nestjs.cn). :books: -- [가이드](readme_kr.md) 문서는 [docs.nestjs.com](https://docs.nestjs.com)에서 확인하실 수 있습니다. :books: -- [ガイド](readme_jp.md)は [docs.nestjs.com](https://docs.nestjs.com)でご確認ください。 :books: - -## Questions - -For questions and support please use the official [Discord channel](https://discord.gg/G7Qnnhy). The issue list of this repo is **exclusively** for bug reports and feature requests. - -## Issues - -Please make sure to read the [Issue Reporting Checklist](https://github.com/nestjs/nest/blob/master/CONTRIBUTING.md#-submitting-an-issue) before opening an issue. Issues not conforming to the guidelines may be closed immediately. - -## Consulting - -With official support, you can get expert help straight from the Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://enterprise.nestjs.com). - -## Support - -Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support from the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support). - -#### Principal Sponsors - - - - - - - - - -
- -#### Gold Sponsors - - - - - - - - - - - - - -
- -#### Silver Sponsors - - - - - - - - - - - - -
- -#### Sponsors - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -## Backers - - - -## Stay in touch - -- Author - [Kamil Myśliwiec](https://x.com/kammysliwiec) -- Website - [https://nestjs.com](https://nestjs.com/) -- X - [@nestframework](https://x.com/nestframework) - -## License - -Nest is [MIT licensed](LICENSE). diff --git a/node_modules/@nestjs/common/constants.d.ts b/node_modules/@nestjs/common/constants.d.ts deleted file mode 100644 index 246972a..0000000 --- a/node_modules/@nestjs/common/constants.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -export declare const MODULE_METADATA: { - IMPORTS: string; - PROVIDERS: string; - CONTROLLERS: string; - EXPORTS: string; -}; -export declare const GLOBAL_MODULE_METADATA = "__module:global__"; -export declare const HOST_METADATA = "host"; -export declare const PATH_METADATA = "path"; -export declare const PARAMTYPES_METADATA = "design:paramtypes"; -export declare const SELF_DECLARED_DEPS_METADATA = "self:paramtypes"; -export declare const OPTIONAL_DEPS_METADATA = "optional:paramtypes"; -export declare const PROPERTY_DEPS_METADATA = "self:properties_metadata"; -export declare const OPTIONAL_PROPERTY_DEPS_METADATA = "optional:properties_metadata"; -export declare const SCOPE_OPTIONS_METADATA = "scope:options"; -export declare const METHOD_METADATA = "method"; -export declare const ROUTE_ARGS_METADATA = "__routeArguments__"; -export declare const CUSTOM_ROUTE_ARGS_METADATA = "__customRouteArgs__"; -export declare const FILTER_CATCH_EXCEPTIONS = "__filterCatchExceptions__"; -export declare const PIPES_METADATA = "__pipes__"; -export declare const GUARDS_METADATA = "__guards__"; -export declare const INTERCEPTORS_METADATA = "__interceptors__"; -export declare const EXCEPTION_FILTERS_METADATA = "__exceptionFilters__"; -export declare const ENHANCER_KEY_TO_SUBTYPE_MAP: { - readonly __guards__: "guard"; - readonly __interceptors__: "interceptor"; - readonly __pipes__: "pipe"; - readonly __exceptionFilters__: "filter"; -}; -export type EnhancerSubtype = (typeof ENHANCER_KEY_TO_SUBTYPE_MAP)[keyof typeof ENHANCER_KEY_TO_SUBTYPE_MAP]; -export declare const RENDER_METADATA = "__renderTemplate__"; -export declare const HTTP_CODE_METADATA = "__httpCode__"; -export declare const MODULE_PATH = "__module_path__"; -export declare const HEADERS_METADATA = "__headers__"; -export declare const REDIRECT_METADATA = "__redirect__"; -export declare const RESPONSE_PASSTHROUGH_METADATA = "__responsePassthrough__"; -export declare const SSE_METADATA = "__sse__"; -export declare const VERSION_METADATA = "__version__"; -export declare const INJECTABLE_WATERMARK = "__injectable__"; -export declare const CONTROLLER_WATERMARK = "__controller__"; -export declare const CATCH_WATERMARK = "__catch__"; -export declare const ENTRY_PROVIDER_WATERMARK = "__entryProvider__"; diff --git a/node_modules/@nestjs/common/constants.js b/node_modules/@nestjs/common/constants.js deleted file mode 100644 index 3347634..0000000 --- a/node_modules/@nestjs/common/constants.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ENTRY_PROVIDER_WATERMARK = exports.CATCH_WATERMARK = exports.CONTROLLER_WATERMARK = exports.INJECTABLE_WATERMARK = exports.VERSION_METADATA = exports.SSE_METADATA = exports.RESPONSE_PASSTHROUGH_METADATA = exports.REDIRECT_METADATA = exports.HEADERS_METADATA = exports.MODULE_PATH = exports.HTTP_CODE_METADATA = exports.RENDER_METADATA = exports.ENHANCER_KEY_TO_SUBTYPE_MAP = exports.EXCEPTION_FILTERS_METADATA = exports.INTERCEPTORS_METADATA = exports.GUARDS_METADATA = exports.PIPES_METADATA = exports.FILTER_CATCH_EXCEPTIONS = exports.CUSTOM_ROUTE_ARGS_METADATA = exports.ROUTE_ARGS_METADATA = exports.METHOD_METADATA = exports.SCOPE_OPTIONS_METADATA = exports.OPTIONAL_PROPERTY_DEPS_METADATA = exports.PROPERTY_DEPS_METADATA = exports.OPTIONAL_DEPS_METADATA = exports.SELF_DECLARED_DEPS_METADATA = exports.PARAMTYPES_METADATA = exports.PATH_METADATA = exports.HOST_METADATA = exports.GLOBAL_MODULE_METADATA = exports.MODULE_METADATA = void 0; -exports.MODULE_METADATA = { - IMPORTS: 'imports', - PROVIDERS: 'providers', - CONTROLLERS: 'controllers', - EXPORTS: 'exports', -}; -exports.GLOBAL_MODULE_METADATA = '__module:global__'; -exports.HOST_METADATA = 'host'; -exports.PATH_METADATA = 'path'; -exports.PARAMTYPES_METADATA = 'design:paramtypes'; -exports.SELF_DECLARED_DEPS_METADATA = 'self:paramtypes'; -exports.OPTIONAL_DEPS_METADATA = 'optional:paramtypes'; -exports.PROPERTY_DEPS_METADATA = 'self:properties_metadata'; -exports.OPTIONAL_PROPERTY_DEPS_METADATA = 'optional:properties_metadata'; -exports.SCOPE_OPTIONS_METADATA = 'scope:options'; -exports.METHOD_METADATA = 'method'; -exports.ROUTE_ARGS_METADATA = '__routeArguments__'; -exports.CUSTOM_ROUTE_ARGS_METADATA = '__customRouteArgs__'; -exports.FILTER_CATCH_EXCEPTIONS = '__filterCatchExceptions__'; -exports.PIPES_METADATA = '__pipes__'; -exports.GUARDS_METADATA = '__guards__'; -exports.INTERCEPTORS_METADATA = '__interceptors__'; -exports.EXCEPTION_FILTERS_METADATA = '__exceptionFilters__'; -exports.ENHANCER_KEY_TO_SUBTYPE_MAP = { - [exports.GUARDS_METADATA]: 'guard', - [exports.INTERCEPTORS_METADATA]: 'interceptor', - [exports.PIPES_METADATA]: 'pipe', - [exports.EXCEPTION_FILTERS_METADATA]: 'filter', -}; -exports.RENDER_METADATA = '__renderTemplate__'; -exports.HTTP_CODE_METADATA = '__httpCode__'; -exports.MODULE_PATH = '__module_path__'; -exports.HEADERS_METADATA = '__headers__'; -exports.REDIRECT_METADATA = '__redirect__'; -exports.RESPONSE_PASSTHROUGH_METADATA = '__responsePassthrough__'; -exports.SSE_METADATA = '__sse__'; -exports.VERSION_METADATA = '__version__'; -exports.INJECTABLE_WATERMARK = '__injectable__'; -exports.CONTROLLER_WATERMARK = '__controller__'; -exports.CATCH_WATERMARK = '__catch__'; -exports.ENTRY_PROVIDER_WATERMARK = '__entryProvider__'; diff --git a/node_modules/@nestjs/common/decorators/core/apply-decorators.d.ts b/node_modules/@nestjs/common/decorators/core/apply-decorators.d.ts deleted file mode 100644 index 84dccfd..0000000 --- a/node_modules/@nestjs/common/decorators/core/apply-decorators.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Function that returns a new decorator that applies all decorators provided by param - * - * Useful to build new decorators (or a decorator factory) encapsulating multiple decorators related with the same feature - * - * @param decorators one or more decorators (e.g., `ApplyGuard(...)`) - * - * @publicApi - */ -export declare function applyDecorators(...decorators: Array): (target: TFunction | object, propertyKey?: string | symbol, descriptor?: TypedPropertyDescriptor) => void; diff --git a/node_modules/@nestjs/common/decorators/core/apply-decorators.js b/node_modules/@nestjs/common/decorators/core/apply-decorators.js deleted file mode 100644 index 117c331..0000000 --- a/node_modules/@nestjs/common/decorators/core/apply-decorators.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.applyDecorators = applyDecorators; -/** - * Function that returns a new decorator that applies all decorators provided by param - * - * Useful to build new decorators (or a decorator factory) encapsulating multiple decorators related with the same feature - * - * @param decorators one or more decorators (e.g., `ApplyGuard(...)`) - * - * @publicApi - */ -function applyDecorators(...decorators) { - return (target, propertyKey, descriptor) => { - for (const decorator of decorators) { - if (target instanceof Function && !descriptor) { - decorator(target); - continue; - } - decorator(target, propertyKey, descriptor); - } - }; -} diff --git a/node_modules/@nestjs/common/decorators/core/bind.decorator.d.ts b/node_modules/@nestjs/common/decorators/core/bind.decorator.d.ts deleted file mode 100644 index 90cceeb..0000000 --- a/node_modules/@nestjs/common/decorators/core/bind.decorator.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Decorator that binds *parameter decorators* to the method that follows. - * - * Useful when the language doesn't provide a 'Parameter Decorator' feature - * (i.e., vanilla JavaScript). - * - * @param decorators one or more parameter decorators (e.g., `Req()`) - * - * @publicApi - */ -export declare function Bind(...decorators: any[]): MethodDecorator; diff --git a/node_modules/@nestjs/common/decorators/core/bind.decorator.js b/node_modules/@nestjs/common/decorators/core/bind.decorator.js deleted file mode 100644 index 591f9dc..0000000 --- a/node_modules/@nestjs/common/decorators/core/bind.decorator.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Bind = Bind; -/** - * Decorator that binds *parameter decorators* to the method that follows. - * - * Useful when the language doesn't provide a 'Parameter Decorator' feature - * (i.e., vanilla JavaScript). - * - * @param decorators one or more parameter decorators (e.g., `Req()`) - * - * @publicApi - */ -function Bind(...decorators) { - return (target, key, descriptor) => { - decorators.forEach((fn, index) => fn(target, key, index)); - return descriptor; - }; -} diff --git a/node_modules/@nestjs/common/decorators/core/catch.decorator.d.ts b/node_modules/@nestjs/common/decorators/core/catch.decorator.d.ts deleted file mode 100644 index d18e37c..0000000 --- a/node_modules/@nestjs/common/decorators/core/catch.decorator.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Type, Abstract } from '../../interfaces'; -/** - * Decorator that marks a class as a Nest exception filter. An exception filter - * handles exceptions thrown by or not handled by your application code. - * - * The decorated class must implement the `ExceptionFilter` interface. - * - * @param exceptions one or more exception *types* specifying - * the exceptions to be caught and handled by this filter. - * - * @see [Exception Filters](https://docs.nestjs.com/exception-filters) - * - * @usageNotes - * Exception filters are applied using the `@UseFilters()` decorator, or (globally) - * with `app.useGlobalFilters()`. - * - * @publicApi - */ -export declare function Catch(...exceptions: Array | Abstract>): ClassDecorator; diff --git a/node_modules/@nestjs/common/decorators/core/catch.decorator.js b/node_modules/@nestjs/common/decorators/core/catch.decorator.js deleted file mode 100644 index f4a382d..0000000 --- a/node_modules/@nestjs/common/decorators/core/catch.decorator.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Catch = Catch; -const constants_1 = require("../../constants"); -/** - * Decorator that marks a class as a Nest exception filter. An exception filter - * handles exceptions thrown by or not handled by your application code. - * - * The decorated class must implement the `ExceptionFilter` interface. - * - * @param exceptions one or more exception *types* specifying - * the exceptions to be caught and handled by this filter. - * - * @see [Exception Filters](https://docs.nestjs.com/exception-filters) - * - * @usageNotes - * Exception filters are applied using the `@UseFilters()` decorator, or (globally) - * with `app.useGlobalFilters()`. - * - * @publicApi - */ -function Catch(...exceptions) { - return (target) => { - Reflect.defineMetadata(constants_1.CATCH_WATERMARK, true, target); - Reflect.defineMetadata(constants_1.FILTER_CATCH_EXCEPTIONS, exceptions, target); - }; -} diff --git a/node_modules/@nestjs/common/decorators/core/controller.decorator.d.ts b/node_modules/@nestjs/common/decorators/core/controller.decorator.d.ts deleted file mode 100644 index 8042085..0000000 --- a/node_modules/@nestjs/common/decorators/core/controller.decorator.d.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { ScopeOptions, VersionOptions } from '../../interfaces'; -/** - * Interface defining options that can be passed to `@Controller()` decorator - * - * @publicApi - */ -export interface ControllerOptions extends ScopeOptions, VersionOptions { - /** - * Specifies an optional `route path prefix`. The prefix is pre-pended to the - * path specified in any request decorator in the class. - * - * Supported only by HTTP-based applications (does not apply to non-HTTP microservices). - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - */ - path?: string | string[]; - /** - * Specifies an optional HTTP Request host filter. When configured, methods - * within the controller will only be routed if the request host matches the - * specified value. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - */ - host?: string | RegExp | Array; -} -/** - * Decorator that marks a class as a Nest controller that can receive inbound - * requests and produce responses. - * - * An HTTP Controller responds to inbound HTTP Requests and produces HTTP Responses. - * It defines a class that provides the context for one or more related route - * handlers that correspond to HTTP request methods and associated routes - * for example `GET /api/profile`, `POST /users/resume`. - * - * A Microservice Controller responds to requests as well as events, running over - * a variety of transports [(read more here)](https://docs.nestjs.com/microservices/basics). - * It defines a class that provides a context for one or more message or event - * handlers. - * - * @see [Controllers](https://docs.nestjs.com/controllers) - * @see [Microservices](https://docs.nestjs.com/microservices/basics#request-response) - * - * @publicApi - */ -export declare function Controller(): ClassDecorator; -/** - * Decorator that marks a class as a Nest controller that can receive inbound - * requests and produce responses. - * - * An HTTP Controller responds to inbound HTTP Requests and produces HTTP Responses. - * It defines a class that provides the context for one or more related route - * handlers that correspond to HTTP request methods and associated routes - * for example `GET /api/profile`, `POST /users/resume`. - * - * A Microservice Controller responds to requests as well as events, running over - * a variety of transports [(read more here)](https://docs.nestjs.com/microservices/basics). - * It defines a class that provides a context for one or more message or event - * handlers. - * - * @param {string|Array} prefix string that defines a `route path prefix`. The prefix - * is pre-pended to the path specified in any request decorator in the class. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * @see [Controllers](https://docs.nestjs.com/controllers) - * @see [Microservices](https://docs.nestjs.com/microservices/basics#request-response) - * - * @publicApi - */ -export declare function Controller(prefix: string | string[]): ClassDecorator; -/** - * Decorator that marks a class as a Nest controller that can receive inbound - * requests and produce responses. - * - * An HTTP Controller responds to inbound HTTP Requests and produces HTTP Responses. - * It defines a class that provides the context for one or more related route - * handlers that correspond to HTTP request methods and associated routes - * for example `GET /api/profile`, `POST /users/resume`. - * - * A Microservice Controller responds to requests as well as events, running over - * a variety of transports [(read more here)](https://docs.nestjs.com/microservices/basics). - * It defines a class that provides a context for one or more message or event - * handlers. - * - * @param {object} options configuration object specifying: - * - * - `scope` - symbol that determines the lifetime of a Controller instance. - * [See Scope](https://docs.nestjs.com/fundamentals/injection-scopes#usage) for - * more details. - * - `prefix` - string that defines a `route path prefix`. The prefix - * is pre-pended to the path specified in any request decorator in the class. - * - `version` - string, array of strings, or Symbol that defines the version - * of all routes in the class. [See Versioning](https://docs.nestjs.com/techniques/versioning) - * for more details. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * @see [Controllers](https://docs.nestjs.com/controllers) - * @see [Microservices](https://docs.nestjs.com/microservices/basics#request-response) - * @see [Versioning](https://docs.nestjs.com/techniques/versioning) - * - * @publicApi - */ -export declare function Controller(options: ControllerOptions): ClassDecorator; diff --git a/node_modules/@nestjs/common/decorators/core/controller.decorator.js b/node_modules/@nestjs/common/decorators/core/controller.decorator.js deleted file mode 100644 index 0f197e2..0000000 --- a/node_modules/@nestjs/common/decorators/core/controller.decorator.js +++ /dev/null @@ -1,61 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Controller = Controller; -const constants_1 = require("../../constants"); -const shared_utils_1 = require("../../utils/shared.utils"); -/** - * Decorator that marks a class as a Nest controller that can receive inbound - * requests and produce responses. - * - * An HTTP Controller responds to inbound HTTP Requests and produces HTTP Responses. - * It defines a class that provides the context for one or more related route - * handlers that correspond to HTTP request methods and associated routes - * for example `GET /api/profile`, `POST /users/resume` - * - * A Microservice Controller responds to requests as well as events, running over - * a variety of transports [(read more here)](https://docs.nestjs.com/microservices/basics). - * It defines a class that provides a context for one or more message or event - * handlers. - * - * @param prefixOrOptions a `route path prefix` or a `ControllerOptions` object. - * A `route path prefix` is pre-pended to the path specified in any request decorator - * in the class. `ControllerOptions` is an options configuration object specifying: - * - `scope` - symbol that determines the lifetime of a Controller instance. - * [See Scope](https://docs.nestjs.com/fundamentals/injection-scopes#usage) for - * more details. - * - `prefix` - string that defines a `route path prefix`. The prefix - * is pre-pended to the path specified in any request decorator in the class. - * - `version` - string, array of strings, or Symbol that defines the version - * of all routes in the class. [See Versioning](https://docs.nestjs.com/techniques/versioning) - * for more details. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * @see [Controllers](https://docs.nestjs.com/controllers) - * @see [Microservices](https://docs.nestjs.com/microservices/basics#request-response) - * @see [Scope](https://docs.nestjs.com/fundamentals/injection-scopes#usage) - * @see [Versioning](https://docs.nestjs.com/techniques/versioning) - * - * @publicApi - */ -function Controller(prefixOrOptions) { - const defaultPath = '/'; - const [path, host, scopeOptions, versionOptions] = (0, shared_utils_1.isUndefined)(prefixOrOptions) - ? [defaultPath, undefined, undefined, undefined] - : (0, shared_utils_1.isString)(prefixOrOptions) || Array.isArray(prefixOrOptions) - ? [prefixOrOptions, undefined, undefined, undefined] - : [ - prefixOrOptions.path || defaultPath, - prefixOrOptions.host, - { scope: prefixOrOptions.scope, durable: prefixOrOptions.durable }, - Array.isArray(prefixOrOptions.version) - ? Array.from(new Set(prefixOrOptions.version)) - : prefixOrOptions.version, - ]; - return (target) => { - Reflect.defineMetadata(constants_1.CONTROLLER_WATERMARK, true, target); - Reflect.defineMetadata(constants_1.PATH_METADATA, path, target); - Reflect.defineMetadata(constants_1.HOST_METADATA, host, target); - Reflect.defineMetadata(constants_1.SCOPE_OPTIONS_METADATA, scopeOptions, target); - Reflect.defineMetadata(constants_1.VERSION_METADATA, versionOptions, target); - }; -} diff --git a/node_modules/@nestjs/common/decorators/core/dependencies.decorator.d.ts b/node_modules/@nestjs/common/decorators/core/dependencies.decorator.d.ts deleted file mode 100644 index 7eceb23..0000000 --- a/node_modules/@nestjs/common/decorators/core/dependencies.decorator.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare function flatten = any>(arr: T): T extends Array ? R : never; -/** - * Decorator that sets required dependencies (required with a vanilla JavaScript objects) - * - * @publicApi - */ -export declare const Dependencies: (...dependencies: Array) => ClassDecorator; diff --git a/node_modules/@nestjs/common/decorators/core/dependencies.decorator.js b/node_modules/@nestjs/common/decorators/core/dependencies.decorator.js deleted file mode 100644 index b7db72c..0000000 --- a/node_modules/@nestjs/common/decorators/core/dependencies.decorator.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Dependencies = void 0; -exports.flatten = flatten; -const constants_1 = require("../../constants"); -function flatten(arr) { - const flat = [].concat(...arr); - return flat.some(Array.isArray) - ? flatten(flat) - : flat; -} -/** - * Decorator that sets required dependencies (required with a vanilla JavaScript objects) - * - * @publicApi - */ -const Dependencies = (...dependencies) => { - const flattenDeps = flatten(dependencies); - return (target) => { - Reflect.defineMetadata(constants_1.PARAMTYPES_METADATA, flattenDeps, target); - }; -}; -exports.Dependencies = Dependencies; diff --git a/node_modules/@nestjs/common/decorators/core/exception-filters.decorator.d.ts b/node_modules/@nestjs/common/decorators/core/exception-filters.decorator.d.ts deleted file mode 100644 index e3fe841..0000000 --- a/node_modules/@nestjs/common/decorators/core/exception-filters.decorator.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ExceptionFilter } from '../../index'; -/** - * Decorator that binds exception filters to the scope of the controller or - * method, depending on its context. - * - * When `@UseFilters` is used at the controller level, the filter will be - * applied to every handler (method) in the controller. - * - * When `@UseFilters` is used at the individual handler level, the filter - * will apply only to that specific method. - * - * @param filters exception filter instance or class, or a list of exception - * filter instances or classes. - * - * @see [Exception filters](https://docs.nestjs.com/exception-filters) - * - * @usageNotes - * Exception filters can also be set up globally for all controllers and routes - * using `app.useGlobalFilters()`. [See here for details](https://docs.nestjs.com/exception-filters#binding-filters) - * - * @publicApi - */ -export declare const UseFilters: (...filters: (ExceptionFilter | Function)[]) => MethodDecorator & ClassDecorator; diff --git a/node_modules/@nestjs/common/decorators/core/exception-filters.decorator.js b/node_modules/@nestjs/common/decorators/core/exception-filters.decorator.js deleted file mode 100644 index fcdab56..0000000 --- a/node_modules/@nestjs/common/decorators/core/exception-filters.decorator.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UseFilters = void 0; -const constants_1 = require("../../constants"); -const extend_metadata_util_1 = require("../../utils/extend-metadata.util"); -const shared_utils_1 = require("../../utils/shared.utils"); -const validate_each_util_1 = require("../../utils/validate-each.util"); -/** - * Decorator that binds exception filters to the scope of the controller or - * method, depending on its context. - * - * When `@UseFilters` is used at the controller level, the filter will be - * applied to every handler (method) in the controller. - * - * When `@UseFilters` is used at the individual handler level, the filter - * will apply only to that specific method. - * - * @param filters exception filter instance or class, or a list of exception - * filter instances or classes. - * - * @see [Exception filters](https://docs.nestjs.com/exception-filters) - * - * @usageNotes - * Exception filters can also be set up globally for all controllers and routes - * using `app.useGlobalFilters()`. [See here for details](https://docs.nestjs.com/exception-filters#binding-filters) - * - * @publicApi - */ -const UseFilters = (...filters) => addExceptionFiltersMetadata(...filters); -exports.UseFilters = UseFilters; -function addExceptionFiltersMetadata(...filters) { - return (target, key, descriptor) => { - const isFilterValid = (filter) => filter && ((0, shared_utils_1.isFunction)(filter) || (0, shared_utils_1.isFunction)(filter.catch)); - if (descriptor) { - (0, validate_each_util_1.validateEach)(target.constructor, filters, isFilterValid, '@UseFilters', 'filter'); - (0, extend_metadata_util_1.extendArrayMetadata)(constants_1.EXCEPTION_FILTERS_METADATA, filters, descriptor.value); - return descriptor; - } - (0, validate_each_util_1.validateEach)(target, filters, isFilterValid, '@UseFilters', 'filter'); - (0, extend_metadata_util_1.extendArrayMetadata)(constants_1.EXCEPTION_FILTERS_METADATA, filters, target); - return target; - }; -} diff --git a/node_modules/@nestjs/common/decorators/core/index.d.ts b/node_modules/@nestjs/common/decorators/core/index.d.ts deleted file mode 100644 index c68c774..0000000 --- a/node_modules/@nestjs/common/decorators/core/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export * from './bind.decorator'; -export * from './catch.decorator'; -export * from './controller.decorator'; -export * from './dependencies.decorator'; -export * from './exception-filters.decorator'; -export * from './inject.decorator'; -export * from './injectable.decorator'; -export * from './optional.decorator'; -export * from './set-metadata.decorator'; -export * from './use-guards.decorator'; -export * from './use-interceptors.decorator'; -export * from './use-pipes.decorator'; -export * from './apply-decorators'; -export * from './version.decorator'; diff --git a/node_modules/@nestjs/common/decorators/core/index.js b/node_modules/@nestjs/common/decorators/core/index.js deleted file mode 100644 index 31d8890..0000000 --- a/node_modules/@nestjs/common/decorators/core/index.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./bind.decorator"), exports); -tslib_1.__exportStar(require("./catch.decorator"), exports); -tslib_1.__exportStar(require("./controller.decorator"), exports); -tslib_1.__exportStar(require("./dependencies.decorator"), exports); -tslib_1.__exportStar(require("./exception-filters.decorator"), exports); -tslib_1.__exportStar(require("./inject.decorator"), exports); -tslib_1.__exportStar(require("./injectable.decorator"), exports); -tslib_1.__exportStar(require("./optional.decorator"), exports); -tslib_1.__exportStar(require("./set-metadata.decorator"), exports); -tslib_1.__exportStar(require("./use-guards.decorator"), exports); -tslib_1.__exportStar(require("./use-interceptors.decorator"), exports); -tslib_1.__exportStar(require("./use-pipes.decorator"), exports); -tslib_1.__exportStar(require("./apply-decorators"), exports); -tslib_1.__exportStar(require("./version.decorator"), exports); diff --git a/node_modules/@nestjs/common/decorators/core/inject.decorator.d.ts b/node_modules/@nestjs/common/decorators/core/inject.decorator.d.ts deleted file mode 100644 index 08f472c..0000000 --- a/node_modules/@nestjs/common/decorators/core/inject.decorator.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { ForwardReference, InjectionToken } from '../../interfaces'; -/** - * Decorator that marks a constructor parameter as a target for - * [Dependency Injection (DI)](https://docs.nestjs.com/providers#dependency-injection). - * - * Any injected provider must be visible within the module scope (loosely - * speaking, the containing module) of the class it is being injected into. This - * can be done by: - * - * - defining the provider in the same module scope - * - exporting the provider from one module scope and importing that module into the - * module scope of the class being injected into - * - exporting the provider from a module that is marked as global using the - * `@Global()` decorator - * - * #### Injection tokens - * Can be *types* (class names), *strings* or *symbols*. This depends on how the - * provider with which it is associated was defined. Providers defined with the - * `@Injectable()` decorator use the class name. Custom Providers may use strings - * or symbols as the injection token. - * - * @param token lookup key for the provider to be injected (assigned to the constructor - * parameter). - * - * @see [Providers](https://docs.nestjs.com/providers) - * @see [Custom Providers](https://docs.nestjs.com/fundamentals/custom-providers) - * @see [Injection Scopes](https://docs.nestjs.com/fundamentals/injection-scopes) - * - * @publicApi - */ -export declare function Inject(token?: InjectionToken | ForwardReference): PropertyDecorator & ParameterDecorator; diff --git a/node_modules/@nestjs/common/decorators/core/inject.decorator.js b/node_modules/@nestjs/common/decorators/core/inject.decorator.js deleted file mode 100644 index c694134..0000000 --- a/node_modules/@nestjs/common/decorators/core/inject.decorator.js +++ /dev/null @@ -1,53 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Inject = Inject; -const constants_1 = require("../../constants"); -const shared_utils_1 = require("../../utils/shared.utils"); -/** - * Decorator that marks a constructor parameter as a target for - * [Dependency Injection (DI)](https://docs.nestjs.com/providers#dependency-injection). - * - * Any injected provider must be visible within the module scope (loosely - * speaking, the containing module) of the class it is being injected into. This - * can be done by: - * - * - defining the provider in the same module scope - * - exporting the provider from one module scope and importing that module into the - * module scope of the class being injected into - * - exporting the provider from a module that is marked as global using the - * `@Global()` decorator - * - * #### Injection tokens - * Can be *types* (class names), *strings* or *symbols*. This depends on how the - * provider with which it is associated was defined. Providers defined with the - * `@Injectable()` decorator use the class name. Custom Providers may use strings - * or symbols as the injection token. - * - * @param token lookup key for the provider to be injected (assigned to the constructor - * parameter). - * - * @see [Providers](https://docs.nestjs.com/providers) - * @see [Custom Providers](https://docs.nestjs.com/fundamentals/custom-providers) - * @see [Injection Scopes](https://docs.nestjs.com/fundamentals/injection-scopes) - * - * @publicApi - */ -function Inject(token) { - const injectCallHasArguments = arguments.length > 0; - return (target, key, index) => { - let type = token || Reflect.getMetadata('design:type', target, key); - // Try to infer the token in a constructor-based injection - if (!type && !injectCallHasArguments) { - type = Reflect.getMetadata(constants_1.PARAMTYPES_METADATA, target, key)?.[index]; - } - if (!(0, shared_utils_1.isUndefined)(index)) { - let dependencies = Reflect.getMetadata(constants_1.SELF_DECLARED_DEPS_METADATA, target) || []; - dependencies = [...dependencies, { index, param: type }]; - Reflect.defineMetadata(constants_1.SELF_DECLARED_DEPS_METADATA, dependencies, target); - return; - } - let properties = Reflect.getMetadata(constants_1.PROPERTY_DEPS_METADATA, target.constructor) || []; - properties = [...properties, { key, type }]; - Reflect.defineMetadata(constants_1.PROPERTY_DEPS_METADATA, properties, target.constructor); - }; -} diff --git a/node_modules/@nestjs/common/decorators/core/injectable.decorator.d.ts b/node_modules/@nestjs/common/decorators/core/injectable.decorator.d.ts deleted file mode 100644 index 793e8f1..0000000 --- a/node_modules/@nestjs/common/decorators/core/injectable.decorator.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { ScopeOptions } from '../../interfaces/scope-options.interface'; -import { Type } from '../../interfaces/type.interface'; -/** - * Defines the injection scope. - * - * @see [Injection Scopes](https://docs.nestjs.com/fundamentals/injection-scopes) - * - * @publicApi - */ -export type InjectableOptions = ScopeOptions; -/** - * Decorator that marks a class as a [provider](https://docs.nestjs.com/providers). - * Providers can be injected into other classes via constructor parameter injection - * using Nest's built-in [Dependency Injection (DI)](https://docs.nestjs.com/providers#dependency-injection) - * system. - * - * When injecting a provider, it must be visible within the module scope (loosely - * speaking, the containing module) of the class it is being injected into. This - * can be done by: - * - * - defining the provider in the same module scope - * - exporting the provider from one module scope and importing that module into the - * module scope of the class being injected into - * - exporting the provider from a module that is marked as global using the - * `@Global()` decorator - * - * Providers can also be defined in a more explicit and imperative form using - * various [custom provider](https://docs.nestjs.com/fundamentals/custom-providers) techniques that expose - * more capabilities of the DI system. - * - * @param options options specifying scope of injectable - * - * @see [Providers](https://docs.nestjs.com/providers) - * @see [Custom Providers](https://docs.nestjs.com/fundamentals/custom-providers) - * @see [Injection Scopes](https://docs.nestjs.com/fundamentals/injection-scopes) - * - * @publicApi - */ -export declare function Injectable(options?: InjectableOptions): ClassDecorator; -/** - * @publicApi - */ -export declare function mixin(mixinClass: Type): Type; diff --git a/node_modules/@nestjs/common/decorators/core/injectable.decorator.js b/node_modules/@nestjs/common/decorators/core/injectable.decorator.js deleted file mode 100644 index cf858bb..0000000 --- a/node_modules/@nestjs/common/decorators/core/injectable.decorator.js +++ /dev/null @@ -1,50 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Injectable = Injectable; -exports.mixin = mixin; -const uid_1 = require("uid"); -const constants_1 = require("../../constants"); -/** - * Decorator that marks a class as a [provider](https://docs.nestjs.com/providers). - * Providers can be injected into other classes via constructor parameter injection - * using Nest's built-in [Dependency Injection (DI)](https://docs.nestjs.com/providers#dependency-injection) - * system. - * - * When injecting a provider, it must be visible within the module scope (loosely - * speaking, the containing module) of the class it is being injected into. This - * can be done by: - * - * - defining the provider in the same module scope - * - exporting the provider from one module scope and importing that module into the - * module scope of the class being injected into - * - exporting the provider from a module that is marked as global using the - * `@Global()` decorator - * - * Providers can also be defined in a more explicit and imperative form using - * various [custom provider](https://docs.nestjs.com/fundamentals/custom-providers) techniques that expose - * more capabilities of the DI system. - * - * @param options options specifying scope of injectable - * - * @see [Providers](https://docs.nestjs.com/providers) - * @see [Custom Providers](https://docs.nestjs.com/fundamentals/custom-providers) - * @see [Injection Scopes](https://docs.nestjs.com/fundamentals/injection-scopes) - * - * @publicApi - */ -function Injectable(options) { - return (target) => { - Reflect.defineMetadata(constants_1.INJECTABLE_WATERMARK, true, target); - Reflect.defineMetadata(constants_1.SCOPE_OPTIONS_METADATA, options, target); - }; -} -/** - * @publicApi - */ -function mixin(mixinClass) { - Object.defineProperty(mixinClass, 'name', { - value: (0, uid_1.uid)(21), - }); - Injectable()(mixinClass); - return mixinClass; -} diff --git a/node_modules/@nestjs/common/decorators/core/optional.decorator.d.ts b/node_modules/@nestjs/common/decorators/core/optional.decorator.d.ts deleted file mode 100644 index c195218..0000000 --- a/node_modules/@nestjs/common/decorators/core/optional.decorator.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Parameter decorator for an injected dependency marking the - * dependency as optional. - * - * For example: - * ```typescript - * constructor(@Optional() @Inject('HTTP_OPTIONS')private readonly httpClient: T) {} - * ``` - * - * @see [Optional providers](https://docs.nestjs.com/providers#optional-providers) - * - * @publicApi - */ -export declare function Optional(): PropertyDecorator & ParameterDecorator; diff --git a/node_modules/@nestjs/common/decorators/core/optional.decorator.js b/node_modules/@nestjs/common/decorators/core/optional.decorator.js deleted file mode 100644 index 869067d..0000000 --- a/node_modules/@nestjs/common/decorators/core/optional.decorator.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Optional = Optional; -const constants_1 = require("../../constants"); -const shared_utils_1 = require("../../utils/shared.utils"); -/** - * Parameter decorator for an injected dependency marking the - * dependency as optional. - * - * For example: - * ```typescript - * constructor(@Optional() @Inject('HTTP_OPTIONS')private readonly httpClient: T) {} - * ``` - * - * @see [Optional providers](https://docs.nestjs.com/providers#optional-providers) - * - * @publicApi - */ -function Optional() { - return (target, key, index) => { - if (!(0, shared_utils_1.isUndefined)(index)) { - const args = Reflect.getMetadata(constants_1.OPTIONAL_DEPS_METADATA, target) || []; - Reflect.defineMetadata(constants_1.OPTIONAL_DEPS_METADATA, [...args, index], target); - return; - } - const properties = Reflect.getMetadata(constants_1.OPTIONAL_PROPERTY_DEPS_METADATA, target.constructor) || []; - Reflect.defineMetadata(constants_1.OPTIONAL_PROPERTY_DEPS_METADATA, [...properties, key], target.constructor); - }; -} diff --git a/node_modules/@nestjs/common/decorators/core/set-metadata.decorator.d.ts b/node_modules/@nestjs/common/decorators/core/set-metadata.decorator.d.ts deleted file mode 100644 index e9fe786..0000000 --- a/node_modules/@nestjs/common/decorators/core/set-metadata.decorator.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -export type CustomDecorator = MethodDecorator & ClassDecorator & { - KEY: TKey; -}; -/** - * Decorator that assigns metadata to the class/function using the - * specified `key`. - * - * Requires two parameters: - * - `key` - a value defining the key under which the metadata is stored - * - `value` - metadata to be associated with `key` - * - * This metadata can be reflected using the `Reflector` class. - * - * Example: `@SetMetadata('roles', ['admin'])` - * - * @see [Reflection](https://docs.nestjs.com/fundamentals/execution-context#reflection-and-metadata) - * - * @publicApi - */ -export declare const SetMetadata: (metadataKey: K, metadataValue: V) => CustomDecorator; diff --git a/node_modules/@nestjs/common/decorators/core/set-metadata.decorator.js b/node_modules/@nestjs/common/decorators/core/set-metadata.decorator.js deleted file mode 100644 index a426145..0000000 --- a/node_modules/@nestjs/common/decorators/core/set-metadata.decorator.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SetMetadata = void 0; -/** - * Decorator that assigns metadata to the class/function using the - * specified `key`. - * - * Requires two parameters: - * - `key` - a value defining the key under which the metadata is stored - * - `value` - metadata to be associated with `key` - * - * This metadata can be reflected using the `Reflector` class. - * - * Example: `@SetMetadata('roles', ['admin'])` - * - * @see [Reflection](https://docs.nestjs.com/fundamentals/execution-context#reflection-and-metadata) - * - * @publicApi - */ -const SetMetadata = (metadataKey, metadataValue) => { - const decoratorFactory = (target, key, descriptor) => { - if (descriptor) { - Reflect.defineMetadata(metadataKey, metadataValue, descriptor.value); - return descriptor; - } - Reflect.defineMetadata(metadataKey, metadataValue, target); - return target; - }; - decoratorFactory.KEY = metadataKey; - return decoratorFactory; -}; -exports.SetMetadata = SetMetadata; diff --git a/node_modules/@nestjs/common/decorators/core/use-guards.decorator.d.ts b/node_modules/@nestjs/common/decorators/core/use-guards.decorator.d.ts deleted file mode 100644 index 81ae99c..0000000 --- a/node_modules/@nestjs/common/decorators/core/use-guards.decorator.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { CanActivate } from '../../interfaces'; -/** - * Decorator that binds guards to the scope of the controller or method, - * depending on its context. - * - * When `@UseGuards` is used at the controller level, the guard will be - * applied to every handler (method) in the controller. - * - * When `@UseGuards` is used at the individual handler level, the guard - * will apply only to that specific method. - * - * @param guards a single guard instance or class, or a list of guard instances - * or classes. - * - * @see [Guards](https://docs.nestjs.com/guards) - * - * @usageNotes - * Guards can also be set up globally for all controllers and routes - * using `app.useGlobalGuards()`. [See here for details](https://docs.nestjs.com/guards#binding-guards) - * - * @publicApi - */ -export declare function UseGuards(...guards: (CanActivate | Function)[]): MethodDecorator & ClassDecorator; diff --git a/node_modules/@nestjs/common/decorators/core/use-guards.decorator.js b/node_modules/@nestjs/common/decorators/core/use-guards.decorator.js deleted file mode 100644 index b8a8f98..0000000 --- a/node_modules/@nestjs/common/decorators/core/use-guards.decorator.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UseGuards = UseGuards; -const constants_1 = require("../../constants"); -const extend_metadata_util_1 = require("../../utils/extend-metadata.util"); -const shared_utils_1 = require("../../utils/shared.utils"); -const validate_each_util_1 = require("../../utils/validate-each.util"); -/** - * Decorator that binds guards to the scope of the controller or method, - * depending on its context. - * - * When `@UseGuards` is used at the controller level, the guard will be - * applied to every handler (method) in the controller. - * - * When `@UseGuards` is used at the individual handler level, the guard - * will apply only to that specific method. - * - * @param guards a single guard instance or class, or a list of guard instances - * or classes. - * - * @see [Guards](https://docs.nestjs.com/guards) - * - * @usageNotes - * Guards can also be set up globally for all controllers and routes - * using `app.useGlobalGuards()`. [See here for details](https://docs.nestjs.com/guards#binding-guards) - * - * @publicApi - */ -function UseGuards(...guards) { - return (target, key, descriptor) => { - const isGuardValid = (guard) => guard && ((0, shared_utils_1.isFunction)(guard) || (0, shared_utils_1.isFunction)(guard.canActivate)); - if (descriptor) { - (0, validate_each_util_1.validateEach)(target.constructor, guards, isGuardValid, '@UseGuards', 'guard'); - (0, extend_metadata_util_1.extendArrayMetadata)(constants_1.GUARDS_METADATA, guards, descriptor.value); - return descriptor; - } - (0, validate_each_util_1.validateEach)(target, guards, isGuardValid, '@UseGuards', 'guard'); - (0, extend_metadata_util_1.extendArrayMetadata)(constants_1.GUARDS_METADATA, guards, target); - return target; - }; -} diff --git a/node_modules/@nestjs/common/decorators/core/use-interceptors.decorator.d.ts b/node_modules/@nestjs/common/decorators/core/use-interceptors.decorator.d.ts deleted file mode 100644 index ea9c9a8..0000000 --- a/node_modules/@nestjs/common/decorators/core/use-interceptors.decorator.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { NestInterceptor } from '../../interfaces'; -/** - * Decorator that binds interceptors to the scope of the controller or method, - * depending on its context. - * - * When `@UseInterceptors` is used at the controller level, the interceptor will - * be applied to every handler (method) in the controller. - * - * When `@UseInterceptors` is used at the individual handler level, the interceptor - * will apply only to that specific method. - * - * @param interceptors a single interceptor instance or class, or a list of - * interceptor instances or classes. - * - * @see [Interceptors](https://docs.nestjs.com/interceptors) - * - * @usageNotes - * Interceptors can also be set up globally for all controllers and routes - * using `app.useGlobalInterceptors()`. [See here for details](https://docs.nestjs.com/interceptors#binding-interceptors) - * - * @publicApi - */ -export declare function UseInterceptors(...interceptors: (NestInterceptor | Function)[]): MethodDecorator & ClassDecorator; diff --git a/node_modules/@nestjs/common/decorators/core/use-interceptors.decorator.js b/node_modules/@nestjs/common/decorators/core/use-interceptors.decorator.js deleted file mode 100644 index d4ff80a..0000000 --- a/node_modules/@nestjs/common/decorators/core/use-interceptors.decorator.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UseInterceptors = UseInterceptors; -const constants_1 = require("../../constants"); -const extend_metadata_util_1 = require("../../utils/extend-metadata.util"); -const shared_utils_1 = require("../../utils/shared.utils"); -const validate_each_util_1 = require("../../utils/validate-each.util"); -/** - * Decorator that binds interceptors to the scope of the controller or method, - * depending on its context. - * - * When `@UseInterceptors` is used at the controller level, the interceptor will - * be applied to every handler (method) in the controller. - * - * When `@UseInterceptors` is used at the individual handler level, the interceptor - * will apply only to that specific method. - * - * @param interceptors a single interceptor instance or class, or a list of - * interceptor instances or classes. - * - * @see [Interceptors](https://docs.nestjs.com/interceptors) - * - * @usageNotes - * Interceptors can also be set up globally for all controllers and routes - * using `app.useGlobalInterceptors()`. [See here for details](https://docs.nestjs.com/interceptors#binding-interceptors) - * - * @publicApi - */ -function UseInterceptors(...interceptors) { - return (target, key, descriptor) => { - const isInterceptorValid = (interceptor) => interceptor && - ((0, shared_utils_1.isFunction)(interceptor) || (0, shared_utils_1.isFunction)(interceptor.intercept)); - if (descriptor) { - (0, validate_each_util_1.validateEach)(target.constructor, interceptors, isInterceptorValid, '@UseInterceptors', 'interceptor'); - (0, extend_metadata_util_1.extendArrayMetadata)(constants_1.INTERCEPTORS_METADATA, interceptors, descriptor.value); - return descriptor; - } - (0, validate_each_util_1.validateEach)(target, interceptors, isInterceptorValid, '@UseInterceptors', 'interceptor'); - (0, extend_metadata_util_1.extendArrayMetadata)(constants_1.INTERCEPTORS_METADATA, interceptors, target); - return target; - }; -} diff --git a/node_modules/@nestjs/common/decorators/core/use-pipes.decorator.d.ts b/node_modules/@nestjs/common/decorators/core/use-pipes.decorator.d.ts deleted file mode 100644 index 48459a2..0000000 --- a/node_modules/@nestjs/common/decorators/core/use-pipes.decorator.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { PipeTransform } from '../../interfaces/index'; -/** - * Decorator that binds pipes to the scope of the controller or method, - * depending on its context. - * - * When `@UsePipes` is used at the controller level, the pipe will be - * applied to every handler (method) in the controller. - * - * When `@UsePipes` is used at the individual handler level, the pipe - * will apply only to that specific method. - * - * @param pipes a single pipe instance or class, or a list of pipe instances or - * classes. - * - * @see [Pipes](https://docs.nestjs.com/pipes) - * - * @usageNotes - * Pipes can also be set up globally for all controllers and routes - * using `app.useGlobalPipes()`. [See here for details](https://docs.nestjs.com/pipes#class-validator) - * - * @publicApi - */ -export declare function UsePipes(...pipes: (PipeTransform | Function)[]): ClassDecorator & MethodDecorator; diff --git a/node_modules/@nestjs/common/decorators/core/use-pipes.decorator.js b/node_modules/@nestjs/common/decorators/core/use-pipes.decorator.js deleted file mode 100644 index a8aa846..0000000 --- a/node_modules/@nestjs/common/decorators/core/use-pipes.decorator.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UsePipes = UsePipes; -const constants_1 = require("../../constants"); -const extend_metadata_util_1 = require("../../utils/extend-metadata.util"); -const shared_utils_1 = require("../../utils/shared.utils"); -const validate_each_util_1 = require("../../utils/validate-each.util"); -/** - * Decorator that binds pipes to the scope of the controller or method, - * depending on its context. - * - * When `@UsePipes` is used at the controller level, the pipe will be - * applied to every handler (method) in the controller. - * - * When `@UsePipes` is used at the individual handler level, the pipe - * will apply only to that specific method. - * - * @param pipes a single pipe instance or class, or a list of pipe instances or - * classes. - * - * @see [Pipes](https://docs.nestjs.com/pipes) - * - * @usageNotes - * Pipes can also be set up globally for all controllers and routes - * using `app.useGlobalPipes()`. [See here for details](https://docs.nestjs.com/pipes#class-validator) - * - * @publicApi - */ -function UsePipes(...pipes) { - return (target, key, descriptor) => { - const isPipeValid = (pipe) => pipe && ((0, shared_utils_1.isFunction)(pipe) || (0, shared_utils_1.isFunction)(pipe.transform)); - if (descriptor) { - (0, extend_metadata_util_1.extendArrayMetadata)(constants_1.PIPES_METADATA, pipes, descriptor.value); - return descriptor; - } - (0, validate_each_util_1.validateEach)(target, pipes, isPipeValid, '@UsePipes', 'pipe'); - (0, extend_metadata_util_1.extendArrayMetadata)(constants_1.PIPES_METADATA, pipes, target); - return target; - }; -} diff --git a/node_modules/@nestjs/common/decorators/core/version.decorator.d.ts b/node_modules/@nestjs/common/decorators/core/version.decorator.d.ts deleted file mode 100644 index 88aa997..0000000 --- a/node_modules/@nestjs/common/decorators/core/version.decorator.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { VersionValue } from '../../interfaces/version-options.interface'; -/** - * Sets the version of the endpoint to the passed version - * - * @publicApi - */ -export declare function Version(version: VersionValue): MethodDecorator; diff --git a/node_modules/@nestjs/common/decorators/core/version.decorator.js b/node_modules/@nestjs/common/decorators/core/version.decorator.js deleted file mode 100644 index 85b6c20..0000000 --- a/node_modules/@nestjs/common/decorators/core/version.decorator.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Version = Version; -const constants_1 = require("../../constants"); -/** - * Sets the version of the endpoint to the passed version - * - * @publicApi - */ -function Version(version) { - if (Array.isArray(version)) { - // Drop duplicated versions - version = Array.from(new Set(version)); - } - return (target, key, descriptor) => { - Reflect.defineMetadata(constants_1.VERSION_METADATA, version, descriptor.value); - return descriptor; - }; -} diff --git a/node_modules/@nestjs/common/decorators/http/create-route-param-metadata.decorator.d.ts b/node_modules/@nestjs/common/decorators/http/create-route-param-metadata.decorator.d.ts deleted file mode 100644 index 900b08e..0000000 --- a/node_modules/@nestjs/common/decorators/http/create-route-param-metadata.decorator.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { PipeTransform } from '../../index'; -import { Type } from '../../interfaces'; -import { CustomParamFactory } from '../../interfaces/features/custom-route-param-factory.interface'; -export type ParamDecoratorEnhancer = ParameterDecorator; -/** - * Defines HTTP route param decorator - * - * @param factory - * @param enhancers - * - * @publicApi - */ -export declare function createParamDecorator(factory: CustomParamFactory, enhancers?: ParamDecoratorEnhancer[]): (...dataOrPipes: (Type | PipeTransform | FactoryData)[]) => ParameterDecorator; diff --git a/node_modules/@nestjs/common/decorators/http/create-route-param-metadata.decorator.js b/node_modules/@nestjs/common/decorators/http/create-route-param-metadata.decorator.js deleted file mode 100644 index 4d64012..0000000 --- a/node_modules/@nestjs/common/decorators/http/create-route-param-metadata.decorator.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createParamDecorator = createParamDecorator; -const uid_1 = require("uid"); -const constants_1 = require("../../constants"); -const assign_custom_metadata_util_1 = require("../../utils/assign-custom-metadata.util"); -const shared_utils_1 = require("../../utils/shared.utils"); -/** - * Defines HTTP route param decorator - * - * @param factory - * @param enhancers - * - * @publicApi - */ -function createParamDecorator(factory, enhancers = []) { - const paramtype = (0, uid_1.uid)(21); - return (data, ...pipes) => (target, key, index) => { - const args = Reflect.getMetadata(constants_1.ROUTE_ARGS_METADATA, target.constructor, key) || - {}; - const isPipe = (pipe) => pipe && - (((0, shared_utils_1.isFunction)(pipe) && - pipe.prototype && - (0, shared_utils_1.isFunction)(pipe.prototype.transform)) || - (0, shared_utils_1.isFunction)(pipe.transform)); - const hasParamData = (0, shared_utils_1.isNil)(data) || !isPipe(data); - const paramData = hasParamData ? data : undefined; - const paramPipes = hasParamData ? pipes : [data, ...pipes]; - Reflect.defineMetadata(constants_1.ROUTE_ARGS_METADATA, (0, assign_custom_metadata_util_1.assignCustomParameterMetadata)(args, paramtype, index, factory, paramData, ...paramPipes), target.constructor, key); - enhancers.forEach(fn => fn(target, key, index)); - }; -} diff --git a/node_modules/@nestjs/common/decorators/http/header.decorator.d.ts b/node_modules/@nestjs/common/decorators/http/header.decorator.d.ts deleted file mode 100644 index 39510a4..0000000 --- a/node_modules/@nestjs/common/decorators/http/header.decorator.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Request method Decorator. Sets a response header. - * - * For example: - * `@Header('Cache-Control', 'none')` - * `@Header('Cache-Control', () => 'none')` - * - * @param name string to be used for header name - * @param value string to be used for header value - * - * @see [Headers](https://docs.nestjs.com/controllers#headers) - * - * @publicApi - */ -export declare function Header(name: string, value: string | (() => string)): MethodDecorator; diff --git a/node_modules/@nestjs/common/decorators/http/header.decorator.js b/node_modules/@nestjs/common/decorators/http/header.decorator.js deleted file mode 100644 index 7a7e7d7..0000000 --- a/node_modules/@nestjs/common/decorators/http/header.decorator.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Header = Header; -const constants_1 = require("../../constants"); -const extend_metadata_util_1 = require("../../utils/extend-metadata.util"); -/** - * Request method Decorator. Sets a response header. - * - * For example: - * `@Header('Cache-Control', 'none')` - * `@Header('Cache-Control', () => 'none')` - * - * @param name string to be used for header name - * @param value string to be used for header value - * - * @see [Headers](https://docs.nestjs.com/controllers#headers) - * - * @publicApi - */ -function Header(name, value) { - return (target, key, descriptor) => { - (0, extend_metadata_util_1.extendArrayMetadata)(constants_1.HEADERS_METADATA, [{ name, value }], descriptor.value); - return descriptor; - }; -} diff --git a/node_modules/@nestjs/common/decorators/http/http-code.decorator.d.ts b/node_modules/@nestjs/common/decorators/http/http-code.decorator.d.ts deleted file mode 100644 index ca98dc9..0000000 --- a/node_modules/@nestjs/common/decorators/http/http-code.decorator.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Request method Decorator. Defines the HTTP response status code. Overrides - * default status code for the decorated request method. - * - * @param statusCode HTTP response code to be returned by route handler. - * - * @see [Http Status Codes](https://docs.nestjs.com/controllers#status-code) - * - * @publicApi - */ -export declare function HttpCode(statusCode: number): MethodDecorator; diff --git a/node_modules/@nestjs/common/decorators/http/http-code.decorator.js b/node_modules/@nestjs/common/decorators/http/http-code.decorator.js deleted file mode 100644 index aae99de..0000000 --- a/node_modules/@nestjs/common/decorators/http/http-code.decorator.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.HttpCode = HttpCode; -const constants_1 = require("../../constants"); -/** - * Request method Decorator. Defines the HTTP response status code. Overrides - * default status code for the decorated request method. - * - * @param statusCode HTTP response code to be returned by route handler. - * - * @see [Http Status Codes](https://docs.nestjs.com/controllers#status-code) - * - * @publicApi - */ -function HttpCode(statusCode) { - return (target, key, descriptor) => { - Reflect.defineMetadata(constants_1.HTTP_CODE_METADATA, statusCode, descriptor.value); - return descriptor; - }; -} diff --git a/node_modules/@nestjs/common/decorators/http/index.d.ts b/node_modules/@nestjs/common/decorators/http/index.d.ts deleted file mode 100644 index 39b61bf..0000000 --- a/node_modules/@nestjs/common/decorators/http/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export * from './request-mapping.decorator'; -export * from './route-params.decorator'; -export * from './http-code.decorator'; -export * from './create-route-param-metadata.decorator'; -export * from './render.decorator'; -export * from './header.decorator'; -export * from './redirect.decorator'; -export * from './sse.decorator'; diff --git a/node_modules/@nestjs/common/decorators/http/index.js b/node_modules/@nestjs/common/decorators/http/index.js deleted file mode 100644 index f039fc5..0000000 --- a/node_modules/@nestjs/common/decorators/http/index.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./request-mapping.decorator"), exports); -tslib_1.__exportStar(require("./route-params.decorator"), exports); -tslib_1.__exportStar(require("./http-code.decorator"), exports); -tslib_1.__exportStar(require("./create-route-param-metadata.decorator"), exports); -tslib_1.__exportStar(require("./render.decorator"), exports); -tslib_1.__exportStar(require("./header.decorator"), exports); -tslib_1.__exportStar(require("./redirect.decorator"), exports); -tslib_1.__exportStar(require("./sse.decorator"), exports); diff --git a/node_modules/@nestjs/common/decorators/http/redirect.decorator.d.ts b/node_modules/@nestjs/common/decorators/http/redirect.decorator.d.ts deleted file mode 100644 index be01544..0000000 --- a/node_modules/@nestjs/common/decorators/http/redirect.decorator.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Redirects request to the specified URL. - * - * @publicApi - */ -export declare function Redirect(url?: string, statusCode?: number): MethodDecorator; diff --git a/node_modules/@nestjs/common/decorators/http/redirect.decorator.js b/node_modules/@nestjs/common/decorators/http/redirect.decorator.js deleted file mode 100644 index e03ccea..0000000 --- a/node_modules/@nestjs/common/decorators/http/redirect.decorator.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Redirect = Redirect; -const constants_1 = require("../../constants"); -/** - * Redirects request to the specified URL. - * - * @publicApi - */ -function Redirect(url = '', statusCode) { - return (target, key, descriptor) => { - Reflect.defineMetadata(constants_1.REDIRECT_METADATA, { statusCode, url }, descriptor.value); - return descriptor; - }; -} diff --git a/node_modules/@nestjs/common/decorators/http/render.decorator.d.ts b/node_modules/@nestjs/common/decorators/http/render.decorator.d.ts deleted file mode 100644 index 294b5e0..0000000 --- a/node_modules/@nestjs/common/decorators/http/render.decorator.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Route handler method Decorator. Defines a template to be rendered by the controller. - * - * For example: `@Render('index')` - * - * @param template name of the render engine template file - * - * @see [Model-View-Controller](https://docs.nestjs.com/techniques/mvc) - * - * @publicApi - */ -export declare function Render(template: string): MethodDecorator; diff --git a/node_modules/@nestjs/common/decorators/http/render.decorator.js b/node_modules/@nestjs/common/decorators/http/render.decorator.js deleted file mode 100644 index 5bf80e6..0000000 --- a/node_modules/@nestjs/common/decorators/http/render.decorator.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Render = Render; -const constants_1 = require("../../constants"); -/** - * Route handler method Decorator. Defines a template to be rendered by the controller. - * - * For example: `@Render('index')` - * - * @param template name of the render engine template file - * - * @see [Model-View-Controller](https://docs.nestjs.com/techniques/mvc) - * - * @publicApi - */ -function Render(template) { - return (target, key, descriptor) => { - Reflect.defineMetadata(constants_1.RENDER_METADATA, template, descriptor.value); - return descriptor; - }; -} diff --git a/node_modules/@nestjs/common/decorators/http/request-mapping.decorator.d.ts b/node_modules/@nestjs/common/decorators/http/request-mapping.decorator.d.ts deleted file mode 100644 index 287f577..0000000 --- a/node_modules/@nestjs/common/decorators/http/request-mapping.decorator.d.ts +++ /dev/null @@ -1,134 +0,0 @@ -import { RequestMethod } from '../../enums/request-method.enum'; -export interface RequestMappingMetadata { - path?: string | string[]; - method?: RequestMethod; -} -export declare const RequestMapping: (metadata?: RequestMappingMetadata) => MethodDecorator; -/** - * Route handler (method) Decorator. Routes HTTP POST requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -export declare const Post: (path?: string | string[]) => MethodDecorator; -/** - * Route handler (method) Decorator. Routes HTTP GET requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -export declare const Get: (path?: string | string[]) => MethodDecorator; -/** - * Route handler (method) Decorator. Routes HTTP DELETE requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -export declare const Delete: (path?: string | string[]) => MethodDecorator; -/** - * Route handler (method) Decorator. Routes HTTP PUT requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -export declare const Put: (path?: string | string[]) => MethodDecorator; -/** - * Route handler (method) Decorator. Routes HTTP PATCH requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -export declare const Patch: (path?: string | string[]) => MethodDecorator; -/** - * Route handler (method) Decorator. Routes HTTP OPTIONS requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -export declare const Options: (path?: string | string[]) => MethodDecorator; -/** - * Route handler (method) Decorator. Routes HTTP HEAD requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -export declare const Head: (path?: string | string[]) => MethodDecorator; -/** - * Route handler (method) Decorator. Routes all HTTP requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -export declare const All: (path?: string | string[]) => MethodDecorator; -/** - * Route handler (method) Decorator. Routes HTTP SEARCH requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -export declare const Search: (path?: string | string[]) => MethodDecorator; -/** - * Route handler (method) Decorator. Routes Webdav PROPFIND requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -export declare const Propfind: (path?: string | string[]) => MethodDecorator; -/** - * Route handler (method) Decorator. Routes Webdav PROPPATCH requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -export declare const Proppatch: (path?: string | string[]) => MethodDecorator; -/** - * Route handler (method) Decorator. Routes Webdav MKCOL requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -export declare const Mkcol: (path?: string | string[]) => MethodDecorator; -/** - * Route handler (method) Decorator. Routes Webdav COPY requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -export declare const Copy: (path?: string | string[]) => MethodDecorator; -/** - * Route handler (method) Decorator. Routes Webdav MOVE requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -export declare const Move: (path?: string | string[]) => MethodDecorator; -/** - * Route handler (method) Decorator. Routes Webdav LOCK requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -export declare const Lock: (path?: string | string[]) => MethodDecorator; -/** - * Route handler (method) Decorator. Routes Webdav UNLOCK requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -export declare const Unlock: (path?: string | string[]) => MethodDecorator; diff --git a/node_modules/@nestjs/common/decorators/http/request-mapping.decorator.js b/node_modules/@nestjs/common/decorators/http/request-mapping.decorator.js deleted file mode 100644 index cd55a03..0000000 --- a/node_modules/@nestjs/common/decorators/http/request-mapping.decorator.js +++ /dev/null @@ -1,154 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Unlock = exports.Lock = exports.Move = exports.Copy = exports.Mkcol = exports.Proppatch = exports.Propfind = exports.Search = exports.All = exports.Head = exports.Options = exports.Patch = exports.Put = exports.Delete = exports.Get = exports.Post = exports.RequestMapping = void 0; -const constants_1 = require("../../constants"); -const request_method_enum_1 = require("../../enums/request-method.enum"); -const defaultMetadata = { - [constants_1.PATH_METADATA]: '/', - [constants_1.METHOD_METADATA]: request_method_enum_1.RequestMethod.GET, -}; -const RequestMapping = (metadata = defaultMetadata) => { - const pathMetadata = metadata[constants_1.PATH_METADATA]; - const path = pathMetadata && pathMetadata.length ? pathMetadata : '/'; - const requestMethod = metadata[constants_1.METHOD_METADATA] || request_method_enum_1.RequestMethod.GET; - return (target, key, descriptor) => { - Reflect.defineMetadata(constants_1.PATH_METADATA, path, descriptor.value); - Reflect.defineMetadata(constants_1.METHOD_METADATA, requestMethod, descriptor.value); - return descriptor; - }; -}; -exports.RequestMapping = RequestMapping; -const createMappingDecorator = (method) => (path) => { - return (0, exports.RequestMapping)({ - [constants_1.PATH_METADATA]: path, - [constants_1.METHOD_METADATA]: method, - }); -}; -/** - * Route handler (method) Decorator. Routes HTTP POST requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -exports.Post = createMappingDecorator(request_method_enum_1.RequestMethod.POST); -/** - * Route handler (method) Decorator. Routes HTTP GET requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -exports.Get = createMappingDecorator(request_method_enum_1.RequestMethod.GET); -/** - * Route handler (method) Decorator. Routes HTTP DELETE requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -exports.Delete = createMappingDecorator(request_method_enum_1.RequestMethod.DELETE); -/** - * Route handler (method) Decorator. Routes HTTP PUT requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -exports.Put = createMappingDecorator(request_method_enum_1.RequestMethod.PUT); -/** - * Route handler (method) Decorator. Routes HTTP PATCH requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -exports.Patch = createMappingDecorator(request_method_enum_1.RequestMethod.PATCH); -/** - * Route handler (method) Decorator. Routes HTTP OPTIONS requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -exports.Options = createMappingDecorator(request_method_enum_1.RequestMethod.OPTIONS); -/** - * Route handler (method) Decorator. Routes HTTP HEAD requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -exports.Head = createMappingDecorator(request_method_enum_1.RequestMethod.HEAD); -/** - * Route handler (method) Decorator. Routes all HTTP requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -exports.All = createMappingDecorator(request_method_enum_1.RequestMethod.ALL); -/** - * Route handler (method) Decorator. Routes HTTP SEARCH requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -exports.Search = createMappingDecorator(request_method_enum_1.RequestMethod.SEARCH); -/** - * Route handler (method) Decorator. Routes Webdav PROPFIND requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -exports.Propfind = createMappingDecorator(request_method_enum_1.RequestMethod.PROPFIND); -/** - * Route handler (method) Decorator. Routes Webdav PROPPATCH requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -exports.Proppatch = createMappingDecorator(request_method_enum_1.RequestMethod.PROPPATCH); -/** - * Route handler (method) Decorator. Routes Webdav MKCOL requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -exports.Mkcol = createMappingDecorator(request_method_enum_1.RequestMethod.MKCOL); -/** - * Route handler (method) Decorator. Routes Webdav COPY requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -exports.Copy = createMappingDecorator(request_method_enum_1.RequestMethod.COPY); -/** - * Route handler (method) Decorator. Routes Webdav MOVE requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -exports.Move = createMappingDecorator(request_method_enum_1.RequestMethod.MOVE); -/** - * Route handler (method) Decorator. Routes Webdav LOCK requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -exports.Lock = createMappingDecorator(request_method_enum_1.RequestMethod.LOCK); -/** - * Route handler (method) Decorator. Routes Webdav UNLOCK requests to the specified path. - * - * @see [Routing](https://docs.nestjs.com/controllers#routing) - * - * @publicApi - */ -exports.Unlock = createMappingDecorator(request_method_enum_1.RequestMethod.UNLOCK); diff --git a/node_modules/@nestjs/common/decorators/http/route-params.decorator.d.ts b/node_modules/@nestjs/common/decorators/http/route-params.decorator.d.ts deleted file mode 100644 index 835ebbb..0000000 --- a/node_modules/@nestjs/common/decorators/http/route-params.decorator.d.ts +++ /dev/null @@ -1,445 +0,0 @@ -import { PipeTransform } from '../../index'; -import { Type } from '../../interfaces'; -/** - * The `@Response()`/`@Res` parameter decorator options. - */ -export interface ResponseDecoratorOptions { - /** - * Determines whether the response will be sent manually within the route handler, - * with the use of native response handling methods exposed by the platform-specific response object, - * or if it should passthrough Nest response processing pipeline. - * - * @default false - */ - passthrough: boolean; -} -export type ParamData = object | string | number; -export interface RouteParamMetadata { - index: number; - data?: ParamData; -} -export declare function assignMetadata(args: TArgs, paramtype: TParamtype, index: number, data?: ParamData, ...pipes: (Type | PipeTransform)[]): TArgs & { - [x: string]: { - index: number; - data: ParamData | undefined; - pipes: (PipeTransform | Type>)[]; - }; -}; -/** - * Route handler parameter decorator. Extracts the `Request` - * object from the underlying platform and populates the decorated - * parameter with the value of `Request`. - * - * Example: `logout(@Request() req)` - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * - * @publicApi - */ -export declare const Request: () => ParameterDecorator; -/** - * Route handler parameter decorator. Extracts the `Response` - * object from the underlying platform and populates the decorated - * parameter with the value of `Response`. - * - * Example: `logout(@Response() res)` - * - * @publicApi - */ -export declare const Response: (options?: ResponseDecoratorOptions) => ParameterDecorator; -/** - * Route handler parameter decorator. Extracts reference to the `Next` function - * from the underlying platform and populates the decorated - * parameter with the value of `Next`. - * - * @publicApi - */ -export declare const Next: () => ParameterDecorator; -/** - * Route handler parameter decorator. Extracts the `Ip` property - * from the `req` object and populates the decorated - * parameter with the value of `ip`. - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * - * @publicApi - */ -export declare const Ip: () => ParameterDecorator; -/** - * Route handler parameter decorator. Extracts the `Session` object - * from the underlying platform and populates the decorated - * parameter with the value of `Session`. - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * - * @publicApi - */ -export declare const Session: () => ParameterDecorator; -/** - * Route handler parameter decorator. Extracts the `file` object - * and populates the decorated parameter with the value of `file`. - * Used in conjunction with - * [multer middleware](https://github.com/expressjs/multer) for Express-based applications. - * - * For example: - * ```typescript - * uploadFile(@UploadedFile() file) { - * console.log(file); - * } - * ``` - * @see [Request object](https://docs.nestjs.com/techniques/file-upload) - * - * @publicApi - */ -export declare function UploadedFile(): ParameterDecorator; -/** - * Route handler parameter decorator. Extracts the `file` object - * and populates the decorated parameter with the value of `file`. - * Used in conjunction with - * [multer middleware](https://github.com/expressjs/multer) for Express-based applications. - * - * For example: - * ```typescript - * uploadFile(@UploadedFile() file) { - * console.log(file); - * } - * ``` - * @see [Request object](https://docs.nestjs.com/techniques/file-upload) - * - * @publicApi - */ -export declare function UploadedFile(...pipes: (Type | PipeTransform)[]): ParameterDecorator; -/** - * Route handler parameter decorator. Extracts the `file` object - * and populates the decorated parameter with the value of `file`. - * Used in conjunction with - * [multer middleware](https://github.com/expressjs/multer) for Express-based applications. - * - * For example: - * ```typescript - * uploadFile(@UploadedFile() file) { - * console.log(file); - * } - * ``` - * @see [Request object](https://docs.nestjs.com/techniques/file-upload) - * - * @publicApi - */ -export declare function UploadedFile(fileKey?: string, ...pipes: (Type | PipeTransform)[]): ParameterDecorator; -/** - * Route handler parameter decorator. Extracts the `files` object - * and populates the decorated parameter with the value of `files`. - * Used in conjunction with - * [multer middleware](https://github.com/expressjs/multer) for Express-based applications. - * - * For example: - * ```typescript - * uploadFile(@UploadedFiles() files) { - * console.log(files); - * } - * ``` - * @see [Request object](https://docs.nestjs.com/techniques/file-upload) - * - * @publicApi - */ -export declare function UploadedFiles(): ParameterDecorator; -/** - * Route handler parameter decorator. Extracts the `files` object - * and populates the decorated parameter with the value of `files`. - * Used in conjunction with - * [multer middleware](https://github.com/expressjs/multer) for Express-based applications. - * - * For example: - * ```typescript - * uploadFile(@UploadedFiles() files) { - * console.log(files); - * } - * ``` - * @see [Request object](https://docs.nestjs.com/techniques/file-upload) - * - * @publicApi - */ -export declare function UploadedFiles(...pipes: (Type | PipeTransform)[]): ParameterDecorator; -/** - * Route handler parameter decorator. Extracts the `headers` - * property from the `req` object and populates the decorated - * parameter with the value of `headers`. - * - * For example: `async update(@Headers('Cache-Control') cacheControl: string)` - * - * @param property name of single header property to extract. - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * - * @publicApi - */ -export declare const Headers: (property?: string) => ParameterDecorator; -/** - * Route handler parameter decorator. Extracts the `query` - * property from the `req` object and populates the decorated - * parameter with the value of `query`. May also apply pipes to the bound - * query parameter. - * - * For example: - * ```typescript - * async find(@Query('user') user: string) - * ``` - * - * @param property name of single property to extract from the `query` object - * @param pipes one or more pipes to apply to the bound query parameter - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * - * @publicApi - */ -export declare function Query(): ParameterDecorator; -/** - * Route handler parameter decorator. Extracts the `query` - * property from the `req` object and populates the decorated - * parameter with the value of `query`. May also apply pipes to the bound - * query parameter. - * - * For example: - * ```typescript - * async find(@Query('user') user: string) - * ``` - * - * @param property name of single property to extract from the `query` object - * @param pipes one or more pipes to apply to the bound query parameter - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * - * @publicApi - */ -export declare function Query(...pipes: (Type | PipeTransform)[]): ParameterDecorator; -/** - * Route handler parameter decorator. Extracts the `query` - * property from the `req` object and populates the decorated - * parameter with the value of `query`. May also apply pipes to the bound - * query parameter. - * - * For example: - * ```typescript - * async find(@Query('user') user: string) - * ``` - * - * @param property name of single property to extract from the `query` object - * @param pipes one or more pipes to apply to the bound query parameter - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * - * @publicApi - */ -export declare function Query(property: string, ...pipes: (Type | PipeTransform)[]): ParameterDecorator; -/** - * Route handler parameter decorator. Extracts the entire `body` - * object from the `req` object and populates the decorated - * parameter with the value of `body`. - * - * For example: - * ```typescript - * async create(@Body() createDto: CreateCatDto) - * ``` - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * - * @publicApi - */ -export declare function Body(): ParameterDecorator; -/** - * Route handler parameter decorator. Extracts the entire `body` - * object from the `req` object and populates the decorated - * parameter with the value of `body`. Also applies the specified - * pipes to that parameter. - * - * For example: - * ```typescript - * async create(@Body(new ValidationPipe()) createDto: CreateCatDto) - * ``` - * - * @param pipes one or more pipes - either instances or classes - to apply to - * the bound body parameter. - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * @see [Working with pipes](https://docs.nestjs.com/custom-decorators#working-with-pipes) - * - * @publicApi - */ -export declare function Body(...pipes: (Type | PipeTransform)[]): ParameterDecorator; -/** - * Route handler parameter decorator. Extracts a single property from - * the `body` object property of the `req` object and populates the decorated - * parameter with the value of that property. Also applies pipes to the bound - * body parameter. - * - * For example: - * ```typescript - * async create(@Body('role', new ValidationPipe()) role: string) - * ``` - * - * @param property name of single property to extract from the `body` object - * @param pipes one or more pipes - either instances or classes - to apply to - * the bound body parameter. - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * @see [Working with pipes](https://docs.nestjs.com/custom-decorators#working-with-pipes) - * - * @publicApi - */ -export declare function Body(property: string, ...pipes: (Type | PipeTransform)[]): ParameterDecorator; -/** - * Route handler parameter decorator. Extracts the `rawBody` Buffer - * property from the `req` object and populates the decorated parameter with that value. - * - * For example: - * ```typescript - * async create(@RawBody() rawBody: Buffer | undefined) - * ``` - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * @see [Raw body](https://docs.nestjs.com/faq/raw-body) - * - * @publicApi - */ -export declare function RawBody(): ParameterDecorator; -/** - * Route handler parameter decorator. Extracts the `rawBody` Buffer - * property from the `req` object and populates the decorated parameter with that value. - * Also applies pipes to the bound rawBody parameter. - * - * For example: - * ```typescript - * async create(@RawBody(new ValidationPipe()) rawBody: Buffer) - * ``` - * - * @param pipes one or more pipes - either instances or classes - to apply to - * the bound body parameter. - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * @see [Raw body](https://docs.nestjs.com/faq/raw-body) - * @see [Working with pipes](https://docs.nestjs.com/custom-decorators#working-with-pipes) - * - * @publicApi - */ -export declare function RawBody(...pipes: (Type> | PipeTransform)[]): ParameterDecorator; -/** - * Route handler parameter decorator. Extracts the `params` - * property from the `req` object and populates the decorated - * parameter with the value of `params`. May also apply pipes to the bound - * parameter. - * - * For example, extracting all params: - * ```typescript - * findOne(@Param() params: string[]) - * ``` - * - * For example, extracting a single param: - * ```typescript - * findOne(@Param('id') id: string) - * ``` - * @param property name of single property to extract from the `req` object - * @param pipes one or more pipes - either instances or classes - to apply to - * the bound parameter. - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * @see [Working with pipes](https://docs.nestjs.com/custom-decorators#working-with-pipes) - * - * @publicApi - */ -export declare function Param(): ParameterDecorator; -/** - * Route handler parameter decorator. Extracts the `params` - * property from the `req` object and populates the decorated - * parameter with the value of `params`. May also apply pipes to the bound - * parameter. - * - * For example, extracting all params: - * ```typescript - * findOne(@Param() params: string[]) - * ``` - * - * For example, extracting a single param: - * ```typescript - * findOne(@Param('id') id: string) - * ``` - * @param property name of single property to extract from the `req` object - * @param pipes one or more pipes - either instances or classes - to apply to - * the bound parameter. - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * @see [Working with pipes](https://docs.nestjs.com/custom-decorators#working-with-pipes) - * - * @publicApi - */ -export declare function Param(...pipes: (Type | PipeTransform)[]): ParameterDecorator; -/** - * Route handler parameter decorator. Extracts the `params` - * property from the `req` object and populates the decorated - * parameter with the value of `params`. May also apply pipes to the bound - * parameter. - * - * For example, extracting all params: - * ```typescript - * findOne(@Param() params: string[]) - * ``` - * - * For example, extracting a single param: - * ```typescript - * findOne(@Param('id') id: string) - * ``` - * @param property name of single property to extract from the `req` object - * @param pipes one or more pipes - either instances or classes - to apply to - * the bound parameter. - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * @see [Working with pipes](https://docs.nestjs.com/custom-decorators#working-with-pipes) - * - * @publicApi - */ -export declare function Param(property: string, ...pipes: (Type | PipeTransform)[]): ParameterDecorator; -/** - * Route handler parameter decorator. Extracts the `hosts` - * property from the `req` object and populates the decorated - * parameter with the value of `hosts`. May also apply pipes to the bound - * parameter. - * - * For example, extracting all params: - * ```typescript - * findOne(@HostParam() params: string[]) - * ``` - * - * For example, extracting a single param: - * ```typescript - * findOne(@HostParam('id') id: string) - * ``` - * @param property name of single property to extract from the `req` object - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * - * @publicApi - */ -export declare function HostParam(): ParameterDecorator; -/** - * Route handler parameter decorator. Extracts the `hosts` - * property from the `req` object and populates the decorated - * parameter with the value of `hosts`. May also apply pipes to the bound - * parameter. - * - * For example, extracting all params: - * ```typescript - * findOne(@HostParam() params: string[]) - * ``` - * - * For example, extracting a single param: - * ```typescript - * findOne(@HostParam('id') id: string) - * ``` - * @param property name of single property to extract from the `req` object - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * - * @publicApi - */ -export declare function HostParam(property: string): ParameterDecorator; -export declare const Req: () => ParameterDecorator; -export declare const Res: (options?: ResponseDecoratorOptions) => ParameterDecorator; diff --git a/node_modules/@nestjs/common/decorators/http/route-params.decorator.js b/node_modules/@nestjs/common/decorators/http/route-params.decorator.js deleted file mode 100644 index 92288ab..0000000 --- a/node_modules/@nestjs/common/decorators/http/route-params.decorator.js +++ /dev/null @@ -1,265 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Res = exports.Req = exports.Headers = exports.Session = exports.Ip = exports.Next = exports.Response = exports.Request = void 0; -exports.assignMetadata = assignMetadata; -exports.UploadedFile = UploadedFile; -exports.UploadedFiles = UploadedFiles; -exports.Query = Query; -exports.Body = Body; -exports.RawBody = RawBody; -exports.Param = Param; -exports.HostParam = HostParam; -const constants_1 = require("../../constants"); -const route_paramtypes_enum_1 = require("../../enums/route-paramtypes.enum"); -const shared_utils_1 = require("../../utils/shared.utils"); -function assignMetadata(args, paramtype, index, data, ...pipes) { - return { - ...args, - [`${paramtype}:${index}`]: { - index, - data, - pipes, - }, - }; -} -function createRouteParamDecorator(paramtype) { - return (data) => (target, key, index) => { - const args = Reflect.getMetadata(constants_1.ROUTE_ARGS_METADATA, target.constructor, key) || - {}; - Reflect.defineMetadata(constants_1.ROUTE_ARGS_METADATA, assignMetadata(args, paramtype, index, data), target.constructor, key); - }; -} -const createPipesRouteParamDecorator = (paramtype) => (data, ...pipes) => (target, key, index) => { - const args = Reflect.getMetadata(constants_1.ROUTE_ARGS_METADATA, target.constructor, key) || {}; - const hasParamData = (0, shared_utils_1.isNil)(data) || (0, shared_utils_1.isString)(data); - const paramData = hasParamData ? data : undefined; - const paramPipes = hasParamData ? pipes : [data, ...pipes]; - Reflect.defineMetadata(constants_1.ROUTE_ARGS_METADATA, assignMetadata(args, paramtype, index, paramData, ...paramPipes), target.constructor, key); -}; -/** - * Route handler parameter decorator. Extracts the `Request` - * object from the underlying platform and populates the decorated - * parameter with the value of `Request`. - * - * Example: `logout(@Request() req)` - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * - * @publicApi - */ -exports.Request = createRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.REQUEST); -/** - * Route handler parameter decorator. Extracts the `Response` - * object from the underlying platform and populates the decorated - * parameter with the value of `Response`. - * - * Example: `logout(@Response() res)` - * - * @publicApi - */ -const Response = (options) => (target, key, index) => { - if (options?.passthrough) { - Reflect.defineMetadata(constants_1.RESPONSE_PASSTHROUGH_METADATA, options?.passthrough, target.constructor, key); - } - return createRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.RESPONSE)()(target, key, index); -}; -exports.Response = Response; -/** - * Route handler parameter decorator. Extracts reference to the `Next` function - * from the underlying platform and populates the decorated - * parameter with the value of `Next`. - * - * @publicApi - */ -exports.Next = createRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.NEXT); -/** - * Route handler parameter decorator. Extracts the `Ip` property - * from the `req` object and populates the decorated - * parameter with the value of `ip`. - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * - * @publicApi - */ -exports.Ip = createRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.IP); -/** - * Route handler parameter decorator. Extracts the `Session` object - * from the underlying platform and populates the decorated - * parameter with the value of `Session`. - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * - * @publicApi - */ -exports.Session = createRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.SESSION); -/** - * Route handler parameter decorator. Extracts the `file` object - * and populates the decorated parameter with the value of `file`. - * Used in conjunction with - * [multer middleware](https://github.com/expressjs/multer) for Express-based applications. - * - * For example: - * ```typescript - * uploadFile(@UploadedFile() file) { - * console.log(file); - * } - * ``` - * @see [Request object](https://docs.nestjs.com/techniques/file-upload) - * - * @publicApi - */ -function UploadedFile(fileKey, ...pipes) { - return createPipesRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.FILE)(fileKey, ...pipes); -} -/** - * Route handler parameter decorator. Extracts the `files` object - * and populates the decorated parameter with the value of `files`. - * Used in conjunction with - * [multer middleware](https://github.com/expressjs/multer) for Express-based applications. - * - * For example: - * ```typescript - * uploadFile(@UploadedFiles() files) { - * console.log(files); - * } - * ``` - * @see [Request object](https://docs.nestjs.com/techniques/file-upload) - * - * @publicApi - */ -function UploadedFiles(...pipes) { - return createPipesRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.FILES)(undefined, ...pipes); -} -/** - * Route handler parameter decorator. Extracts the `headers` - * property from the `req` object and populates the decorated - * parameter with the value of `headers`. - * - * For example: `async update(@Headers('Cache-Control') cacheControl: string)` - * - * @param property name of single header property to extract. - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * - * @publicApi - */ -exports.Headers = createRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.HEADERS); -/** - * Route handler parameter decorator. Extracts the `query` - * property from the `req` object and populates the decorated - * parameter with the value of `query`. May also apply pipes to the bound - * query parameter. - * - * For example: - * ```typescript - * async find(@Query('user') user: string) - * ``` - * - * @param property name of single property to extract from the `query` object - * @param pipes one or more pipes to apply to the bound query parameter - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * - * @publicApi - */ -function Query(property, ...pipes) { - return createPipesRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.QUERY)(property, ...pipes); -} -/** - * Route handler parameter decorator. Extracts the entire `body` object - * property, or optionally a named property of the `body` object, from - * the `req` object and populates the decorated parameter with that value. - * Also applies pipes to the bound body parameter. - * - * For example: - * ```typescript - * async create(@Body('role', new ValidationPipe()) role: string) - * ``` - * - * @param property name of single property to extract from the `body` object - * @param pipes one or more pipes - either instances or classes - to apply to - * the bound body parameter. - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * @see [Working with pipes](https://docs.nestjs.com/custom-decorators#working-with-pipes) - * - * @publicApi - */ -function Body(property, ...pipes) { - return createPipesRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.BODY)(property, ...pipes); -} -/** - * Route handler parameter decorator. Extracts the `rawBody` Buffer - * property from the `req` object and populates the decorated parameter with that value. - * Also applies pipes to the bound rawBody parameter. - * - * For example: - * ```typescript - * async create(@RawBody(new ValidationPipe()) rawBody: Buffer) - * ``` - * - * @param pipes one or more pipes - either instances or classes - to apply to - * the bound body parameter. - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * @see [Raw body](https://docs.nestjs.com/faq/raw-body) - * @see [Working with pipes](https://docs.nestjs.com/custom-decorators#working-with-pipes) - * - * @publicApi - */ -function RawBody(...pipes) { - return createPipesRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.RAW_BODY)(undefined, ...pipes); -} -/** - * Route handler parameter decorator. Extracts the `params` - * property from the `req` object and populates the decorated - * parameter with the value of `params`. May also apply pipes to the bound - * parameter. - * - * For example, extracting all params: - * ```typescript - * findOne(@Param() params: string[]) - * ``` - * - * For example, extracting a single param: - * ```typescript - * findOne(@Param('id') id: string) - * ``` - * @param property name of single property to extract from the `req` object - * @param pipes one or more pipes - either instances or classes - to apply to - * the bound parameter. - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * @see [Working with pipes](https://docs.nestjs.com/custom-decorators#working-with-pipes) - * - * @publicApi - */ -function Param(property, ...pipes) { - return createPipesRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.PARAM)(property, ...pipes); -} -/** - * Route handler parameter decorator. Extracts the `hosts` - * property from the `req` object and populates the decorated - * parameter with the value of `params`. May also apply pipes to the bound - * parameter. - * - * For example, extracting all params: - * ```typescript - * findOne(@HostParam() params: string[]) - * ``` - * - * For example, extracting a single param: - * ```typescript - * findOne(@HostParam('id') id: string) - * ``` - * @param property name of single property to extract from the `req` object - * - * @see [Request object](https://docs.nestjs.com/controllers#request-object) - * - * @publicApi - */ -function HostParam(property) { - return createRouteParamDecorator(route_paramtypes_enum_1.RouteParamtypes.HOST)(property); -} -exports.Req = exports.Request; -exports.Res = exports.Response; diff --git a/node_modules/@nestjs/common/decorators/http/sse.decorator.d.ts b/node_modules/@nestjs/common/decorators/http/sse.decorator.d.ts deleted file mode 100644 index d14b7d8..0000000 --- a/node_modules/@nestjs/common/decorators/http/sse.decorator.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { METHOD_METADATA } from '../../constants'; -import { RequestMethod } from '../../enums/request-method.enum'; -/** - * Declares this route as a Server-Sent-Events endpoint - * - * @publicApi - */ -export declare function Sse(path?: string, options?: { - [METHOD_METADATA]?: RequestMethod; -}): MethodDecorator; diff --git a/node_modules/@nestjs/common/decorators/http/sse.decorator.js b/node_modules/@nestjs/common/decorators/http/sse.decorator.js deleted file mode 100644 index a00d101..0000000 --- a/node_modules/@nestjs/common/decorators/http/sse.decorator.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Sse = Sse; -const constants_1 = require("../../constants"); -const request_method_enum_1 = require("../../enums/request-method.enum"); -/** - * Declares this route as a Server-Sent-Events endpoint - * - * @publicApi - */ -function Sse(path, options = { - [constants_1.METHOD_METADATA]: request_method_enum_1.RequestMethod.GET, -}) { - return (target, key, descriptor) => { - path = path && path.length ? path : '/'; - Reflect.defineMetadata(constants_1.PATH_METADATA, path, descriptor.value); - Reflect.defineMetadata(constants_1.METHOD_METADATA, options[constants_1.METHOD_METADATA], descriptor.value); - Reflect.defineMetadata(constants_1.SSE_METADATA, true, descriptor.value); - return descriptor; - }; -} diff --git a/node_modules/@nestjs/common/decorators/index.d.ts b/node_modules/@nestjs/common/decorators/index.d.ts deleted file mode 100644 index 20ab3a1..0000000 --- a/node_modules/@nestjs/common/decorators/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './core'; -export * from './modules'; -export * from './http'; diff --git a/node_modules/@nestjs/common/decorators/index.js b/node_modules/@nestjs/common/decorators/index.js deleted file mode 100644 index 3b4d4c1..0000000 --- a/node_modules/@nestjs/common/decorators/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./core"), exports); -tslib_1.__exportStar(require("./modules"), exports); -tslib_1.__exportStar(require("./http"), exports); diff --git a/node_modules/@nestjs/common/decorators/modules/global.decorator.d.ts b/node_modules/@nestjs/common/decorators/modules/global.decorator.d.ts deleted file mode 100644 index 3e83727..0000000 --- a/node_modules/@nestjs/common/decorators/modules/global.decorator.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Decorator that makes a module global-scoped. - * - * Once imported into any module, a global-scoped module will be visible - * in all modules. Thereafter, modules that wish to inject a service exported - * from a global module do not need to import the provider module. - * - * @see [Global modules](https://docs.nestjs.com/modules#global-modules) - * - * @publicApi - */ -export declare function Global(): ClassDecorator; diff --git a/node_modules/@nestjs/common/decorators/modules/global.decorator.js b/node_modules/@nestjs/common/decorators/modules/global.decorator.js deleted file mode 100644 index f393753..0000000 --- a/node_modules/@nestjs/common/decorators/modules/global.decorator.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Global = Global; -const constants_1 = require("../../constants"); -/** - * Decorator that makes a module global-scoped. - * - * Once imported into any module, a global-scoped module will be visible - * in all modules. Thereafter, modules that wish to inject a service exported - * from a global module do not need to import the provider module. - * - * @see [Global modules](https://docs.nestjs.com/modules#global-modules) - * - * @publicApi - */ -function Global() { - return (target) => { - Reflect.defineMetadata(constants_1.GLOBAL_MODULE_METADATA, true, target); - }; -} diff --git a/node_modules/@nestjs/common/decorators/modules/index.d.ts b/node_modules/@nestjs/common/decorators/modules/index.d.ts deleted file mode 100644 index e1994f7..0000000 --- a/node_modules/@nestjs/common/decorators/modules/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './global.decorator'; -export * from './module.decorator'; diff --git a/node_modules/@nestjs/common/decorators/modules/index.js b/node_modules/@nestjs/common/decorators/modules/index.js deleted file mode 100644 index 3ec1229..0000000 --- a/node_modules/@nestjs/common/decorators/modules/index.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./global.decorator"), exports); -tslib_1.__exportStar(require("./module.decorator"), exports); diff --git a/node_modules/@nestjs/common/decorators/modules/module.decorator.d.ts b/node_modules/@nestjs/common/decorators/modules/module.decorator.d.ts deleted file mode 100644 index 11c30ae..0000000 --- a/node_modules/@nestjs/common/decorators/modules/module.decorator.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { ModuleMetadata } from '../../interfaces/modules/module-metadata.interface'; -/** - * Decorator that marks a class as a [module](https://docs.nestjs.com/modules). - * - * Modules are used by Nest to organize the application structure into scopes. Controllers - * and Providers are scoped by the module they are declared in. Modules and their - * classes (Controllers and Providers) form a graph that determines how Nest - * performs [Dependency Injection (DI)](https://docs.nestjs.com/providers#dependency-injection). - * - * @param metadata module configuration metadata - * - * @see [Modules](https://docs.nestjs.com/modules) - * - * @publicApi - */ -export declare function Module(metadata: ModuleMetadata): ClassDecorator; diff --git a/node_modules/@nestjs/common/decorators/modules/module.decorator.js b/node_modules/@nestjs/common/decorators/modules/module.decorator.js deleted file mode 100644 index bd1d912..0000000 --- a/node_modules/@nestjs/common/decorators/modules/module.decorator.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Module = Module; -const validate_module_keys_util_1 = require("../../utils/validate-module-keys.util"); -/** - * Decorator that marks a class as a [module](https://docs.nestjs.com/modules). - * - * Modules are used by Nest to organize the application structure into scopes. Controllers - * and Providers are scoped by the module they are declared in. Modules and their - * classes (Controllers and Providers) form a graph that determines how Nest - * performs [Dependency Injection (DI)](https://docs.nestjs.com/providers#dependency-injection). - * - * @param metadata module configuration metadata - * - * @see [Modules](https://docs.nestjs.com/modules) - * - * @publicApi - */ -function Module(metadata) { - const propsKeys = Object.keys(metadata); - (0, validate_module_keys_util_1.validateModuleKeys)(propsKeys); - return (target) => { - for (const property in metadata) { - if (Object.hasOwnProperty.call(metadata, property)) { - Reflect.defineMetadata(property, metadata[property], target); - } - } - }; -} diff --git a/node_modules/@nestjs/common/enums/http-status.enum.d.ts b/node_modules/@nestjs/common/enums/http-status.enum.d.ts deleted file mode 100644 index 5599068..0000000 --- a/node_modules/@nestjs/common/enums/http-status.enum.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * @publicApi - */ -export declare enum HttpStatus { - CONTINUE = 100, - SWITCHING_PROTOCOLS = 101, - PROCESSING = 102, - EARLYHINTS = 103, - OK = 200, - CREATED = 201, - ACCEPTED = 202, - NON_AUTHORITATIVE_INFORMATION = 203, - NO_CONTENT = 204, - RESET_CONTENT = 205, - PARTIAL_CONTENT = 206, - MULTI_STATUS = 207, - ALREADY_REPORTED = 208, - CONTENT_DIFFERENT = 210, - AMBIGUOUS = 300, - MOVED_PERMANENTLY = 301, - FOUND = 302, - SEE_OTHER = 303, - NOT_MODIFIED = 304, - TEMPORARY_REDIRECT = 307, - PERMANENT_REDIRECT = 308, - BAD_REQUEST = 400, - UNAUTHORIZED = 401, - PAYMENT_REQUIRED = 402, - FORBIDDEN = 403, - NOT_FOUND = 404, - METHOD_NOT_ALLOWED = 405, - NOT_ACCEPTABLE = 406, - PROXY_AUTHENTICATION_REQUIRED = 407, - REQUEST_TIMEOUT = 408, - CONFLICT = 409, - GONE = 410, - LENGTH_REQUIRED = 411, - PRECONDITION_FAILED = 412, - PAYLOAD_TOO_LARGE = 413, - URI_TOO_LONG = 414, - UNSUPPORTED_MEDIA_TYPE = 415, - REQUESTED_RANGE_NOT_SATISFIABLE = 416, - EXPECTATION_FAILED = 417, - I_AM_A_TEAPOT = 418, - MISDIRECTED = 421, - UNPROCESSABLE_ENTITY = 422, - LOCKED = 423, - FAILED_DEPENDENCY = 424, - PRECONDITION_REQUIRED = 428, - TOO_MANY_REQUESTS = 429, - UNRECOVERABLE_ERROR = 456, - INTERNAL_SERVER_ERROR = 500, - NOT_IMPLEMENTED = 501, - BAD_GATEWAY = 502, - SERVICE_UNAVAILABLE = 503, - GATEWAY_TIMEOUT = 504, - HTTP_VERSION_NOT_SUPPORTED = 505, - INSUFFICIENT_STORAGE = 507, - LOOP_DETECTED = 508 -} diff --git a/node_modules/@nestjs/common/enums/http-status.enum.js b/node_modules/@nestjs/common/enums/http-status.enum.js deleted file mode 100644 index 5e91529..0000000 --- a/node_modules/@nestjs/common/enums/http-status.enum.js +++ /dev/null @@ -1,64 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.HttpStatus = void 0; -/** - * @publicApi - */ -var HttpStatus; -(function (HttpStatus) { - HttpStatus[HttpStatus["CONTINUE"] = 100] = "CONTINUE"; - HttpStatus[HttpStatus["SWITCHING_PROTOCOLS"] = 101] = "SWITCHING_PROTOCOLS"; - HttpStatus[HttpStatus["PROCESSING"] = 102] = "PROCESSING"; - HttpStatus[HttpStatus["EARLYHINTS"] = 103] = "EARLYHINTS"; - HttpStatus[HttpStatus["OK"] = 200] = "OK"; - HttpStatus[HttpStatus["CREATED"] = 201] = "CREATED"; - HttpStatus[HttpStatus["ACCEPTED"] = 202] = "ACCEPTED"; - HttpStatus[HttpStatus["NON_AUTHORITATIVE_INFORMATION"] = 203] = "NON_AUTHORITATIVE_INFORMATION"; - HttpStatus[HttpStatus["NO_CONTENT"] = 204] = "NO_CONTENT"; - HttpStatus[HttpStatus["RESET_CONTENT"] = 205] = "RESET_CONTENT"; - HttpStatus[HttpStatus["PARTIAL_CONTENT"] = 206] = "PARTIAL_CONTENT"; - HttpStatus[HttpStatus["MULTI_STATUS"] = 207] = "MULTI_STATUS"; - HttpStatus[HttpStatus["ALREADY_REPORTED"] = 208] = "ALREADY_REPORTED"; - HttpStatus[HttpStatus["CONTENT_DIFFERENT"] = 210] = "CONTENT_DIFFERENT"; - HttpStatus[HttpStatus["AMBIGUOUS"] = 300] = "AMBIGUOUS"; - HttpStatus[HttpStatus["MOVED_PERMANENTLY"] = 301] = "MOVED_PERMANENTLY"; - HttpStatus[HttpStatus["FOUND"] = 302] = "FOUND"; - HttpStatus[HttpStatus["SEE_OTHER"] = 303] = "SEE_OTHER"; - HttpStatus[HttpStatus["NOT_MODIFIED"] = 304] = "NOT_MODIFIED"; - HttpStatus[HttpStatus["TEMPORARY_REDIRECT"] = 307] = "TEMPORARY_REDIRECT"; - HttpStatus[HttpStatus["PERMANENT_REDIRECT"] = 308] = "PERMANENT_REDIRECT"; - HttpStatus[HttpStatus["BAD_REQUEST"] = 400] = "BAD_REQUEST"; - HttpStatus[HttpStatus["UNAUTHORIZED"] = 401] = "UNAUTHORIZED"; - HttpStatus[HttpStatus["PAYMENT_REQUIRED"] = 402] = "PAYMENT_REQUIRED"; - HttpStatus[HttpStatus["FORBIDDEN"] = 403] = "FORBIDDEN"; - HttpStatus[HttpStatus["NOT_FOUND"] = 404] = "NOT_FOUND"; - HttpStatus[HttpStatus["METHOD_NOT_ALLOWED"] = 405] = "METHOD_NOT_ALLOWED"; - HttpStatus[HttpStatus["NOT_ACCEPTABLE"] = 406] = "NOT_ACCEPTABLE"; - HttpStatus[HttpStatus["PROXY_AUTHENTICATION_REQUIRED"] = 407] = "PROXY_AUTHENTICATION_REQUIRED"; - HttpStatus[HttpStatus["REQUEST_TIMEOUT"] = 408] = "REQUEST_TIMEOUT"; - HttpStatus[HttpStatus["CONFLICT"] = 409] = "CONFLICT"; - HttpStatus[HttpStatus["GONE"] = 410] = "GONE"; - HttpStatus[HttpStatus["LENGTH_REQUIRED"] = 411] = "LENGTH_REQUIRED"; - HttpStatus[HttpStatus["PRECONDITION_FAILED"] = 412] = "PRECONDITION_FAILED"; - HttpStatus[HttpStatus["PAYLOAD_TOO_LARGE"] = 413] = "PAYLOAD_TOO_LARGE"; - HttpStatus[HttpStatus["URI_TOO_LONG"] = 414] = "URI_TOO_LONG"; - HttpStatus[HttpStatus["UNSUPPORTED_MEDIA_TYPE"] = 415] = "UNSUPPORTED_MEDIA_TYPE"; - HttpStatus[HttpStatus["REQUESTED_RANGE_NOT_SATISFIABLE"] = 416] = "REQUESTED_RANGE_NOT_SATISFIABLE"; - HttpStatus[HttpStatus["EXPECTATION_FAILED"] = 417] = "EXPECTATION_FAILED"; - HttpStatus[HttpStatus["I_AM_A_TEAPOT"] = 418] = "I_AM_A_TEAPOT"; - HttpStatus[HttpStatus["MISDIRECTED"] = 421] = "MISDIRECTED"; - HttpStatus[HttpStatus["UNPROCESSABLE_ENTITY"] = 422] = "UNPROCESSABLE_ENTITY"; - HttpStatus[HttpStatus["LOCKED"] = 423] = "LOCKED"; - HttpStatus[HttpStatus["FAILED_DEPENDENCY"] = 424] = "FAILED_DEPENDENCY"; - HttpStatus[HttpStatus["PRECONDITION_REQUIRED"] = 428] = "PRECONDITION_REQUIRED"; - HttpStatus[HttpStatus["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS"; - HttpStatus[HttpStatus["UNRECOVERABLE_ERROR"] = 456] = "UNRECOVERABLE_ERROR"; - HttpStatus[HttpStatus["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR"; - HttpStatus[HttpStatus["NOT_IMPLEMENTED"] = 501] = "NOT_IMPLEMENTED"; - HttpStatus[HttpStatus["BAD_GATEWAY"] = 502] = "BAD_GATEWAY"; - HttpStatus[HttpStatus["SERVICE_UNAVAILABLE"] = 503] = "SERVICE_UNAVAILABLE"; - HttpStatus[HttpStatus["GATEWAY_TIMEOUT"] = 504] = "GATEWAY_TIMEOUT"; - HttpStatus[HttpStatus["HTTP_VERSION_NOT_SUPPORTED"] = 505] = "HTTP_VERSION_NOT_SUPPORTED"; - HttpStatus[HttpStatus["INSUFFICIENT_STORAGE"] = 507] = "INSUFFICIENT_STORAGE"; - HttpStatus[HttpStatus["LOOP_DETECTED"] = 508] = "LOOP_DETECTED"; -})(HttpStatus || (exports.HttpStatus = HttpStatus = {})); diff --git a/node_modules/@nestjs/common/enums/index.d.ts b/node_modules/@nestjs/common/enums/index.d.ts deleted file mode 100644 index 13ee987..0000000 --- a/node_modules/@nestjs/common/enums/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './request-method.enum'; -export * from './http-status.enum'; -export * from './shutdown-signal.enum'; -export * from './version-type.enum'; diff --git a/node_modules/@nestjs/common/enums/index.js b/node_modules/@nestjs/common/enums/index.js deleted file mode 100644 index 9b08925..0000000 --- a/node_modules/@nestjs/common/enums/index.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./request-method.enum"), exports); -tslib_1.__exportStar(require("./http-status.enum"), exports); -tslib_1.__exportStar(require("./shutdown-signal.enum"), exports); -tslib_1.__exportStar(require("./version-type.enum"), exports); diff --git a/node_modules/@nestjs/common/enums/request-method.enum.d.ts b/node_modules/@nestjs/common/enums/request-method.enum.d.ts deleted file mode 100644 index cd1c896..0000000 --- a/node_modules/@nestjs/common/enums/request-method.enum.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export declare enum RequestMethod { - GET = 0, - POST = 1, - PUT = 2, - DELETE = 3, - PATCH = 4, - ALL = 5, - OPTIONS = 6, - HEAD = 7, - SEARCH = 8, - PROPFIND = 9, - PROPPATCH = 10, - MKCOL = 11, - COPY = 12, - MOVE = 13, - LOCK = 14, - UNLOCK = 15 -} diff --git a/node_modules/@nestjs/common/enums/request-method.enum.js b/node_modules/@nestjs/common/enums/request-method.enum.js deleted file mode 100644 index decba23..0000000 --- a/node_modules/@nestjs/common/enums/request-method.enum.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RequestMethod = void 0; -var RequestMethod; -(function (RequestMethod) { - RequestMethod[RequestMethod["GET"] = 0] = "GET"; - RequestMethod[RequestMethod["POST"] = 1] = "POST"; - RequestMethod[RequestMethod["PUT"] = 2] = "PUT"; - RequestMethod[RequestMethod["DELETE"] = 3] = "DELETE"; - RequestMethod[RequestMethod["PATCH"] = 4] = "PATCH"; - RequestMethod[RequestMethod["ALL"] = 5] = "ALL"; - RequestMethod[RequestMethod["OPTIONS"] = 6] = "OPTIONS"; - RequestMethod[RequestMethod["HEAD"] = 7] = "HEAD"; - RequestMethod[RequestMethod["SEARCH"] = 8] = "SEARCH"; - RequestMethod[RequestMethod["PROPFIND"] = 9] = "PROPFIND"; - RequestMethod[RequestMethod["PROPPATCH"] = 10] = "PROPPATCH"; - RequestMethod[RequestMethod["MKCOL"] = 11] = "MKCOL"; - RequestMethod[RequestMethod["COPY"] = 12] = "COPY"; - RequestMethod[RequestMethod["MOVE"] = 13] = "MOVE"; - RequestMethod[RequestMethod["LOCK"] = 14] = "LOCK"; - RequestMethod[RequestMethod["UNLOCK"] = 15] = "UNLOCK"; -})(RequestMethod || (exports.RequestMethod = RequestMethod = {})); diff --git a/node_modules/@nestjs/common/enums/route-paramtypes.enum.d.ts b/node_modules/@nestjs/common/enums/route-paramtypes.enum.d.ts deleted file mode 100644 index 6d3c38c..0000000 --- a/node_modules/@nestjs/common/enums/route-paramtypes.enum.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export declare enum RouteParamtypes { - REQUEST = 0, - RESPONSE = 1, - NEXT = 2, - BODY = 3, - QUERY = 4, - PARAM = 5, - HEADERS = 6, - SESSION = 7, - FILE = 8, - FILES = 9, - HOST = 10, - IP = 11, - RAW_BODY = 12, - ACK = 13 -} diff --git a/node_modules/@nestjs/common/enums/route-paramtypes.enum.js b/node_modules/@nestjs/common/enums/route-paramtypes.enum.js deleted file mode 100644 index 4cfa429..0000000 --- a/node_modules/@nestjs/common/enums/route-paramtypes.enum.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RouteParamtypes = void 0; -var RouteParamtypes; -(function (RouteParamtypes) { - RouteParamtypes[RouteParamtypes["REQUEST"] = 0] = "REQUEST"; - RouteParamtypes[RouteParamtypes["RESPONSE"] = 1] = "RESPONSE"; - RouteParamtypes[RouteParamtypes["NEXT"] = 2] = "NEXT"; - RouteParamtypes[RouteParamtypes["BODY"] = 3] = "BODY"; - RouteParamtypes[RouteParamtypes["QUERY"] = 4] = "QUERY"; - RouteParamtypes[RouteParamtypes["PARAM"] = 5] = "PARAM"; - RouteParamtypes[RouteParamtypes["HEADERS"] = 6] = "HEADERS"; - RouteParamtypes[RouteParamtypes["SESSION"] = 7] = "SESSION"; - RouteParamtypes[RouteParamtypes["FILE"] = 8] = "FILE"; - RouteParamtypes[RouteParamtypes["FILES"] = 9] = "FILES"; - RouteParamtypes[RouteParamtypes["HOST"] = 10] = "HOST"; - RouteParamtypes[RouteParamtypes["IP"] = 11] = "IP"; - RouteParamtypes[RouteParamtypes["RAW_BODY"] = 12] = "RAW_BODY"; - RouteParamtypes[RouteParamtypes["ACK"] = 13] = "ACK"; -})(RouteParamtypes || (exports.RouteParamtypes = RouteParamtypes = {})); diff --git a/node_modules/@nestjs/common/enums/shutdown-signal.enum.d.ts b/node_modules/@nestjs/common/enums/shutdown-signal.enum.d.ts deleted file mode 100644 index 99f5b4d..0000000 --- a/node_modules/@nestjs/common/enums/shutdown-signal.enum.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * System signals which shut down a process - */ -export declare enum ShutdownSignal { - SIGHUP = "SIGHUP", - SIGINT = "SIGINT", - SIGQUIT = "SIGQUIT", - SIGILL = "SIGILL", - SIGTRAP = "SIGTRAP", - SIGABRT = "SIGABRT", - SIGBUS = "SIGBUS", - SIGFPE = "SIGFPE", - SIGSEGV = "SIGSEGV", - SIGUSR2 = "SIGUSR2", - SIGTERM = "SIGTERM" -} diff --git a/node_modules/@nestjs/common/enums/shutdown-signal.enum.js b/node_modules/@nestjs/common/enums/shutdown-signal.enum.js deleted file mode 100644 index 9b753cb..0000000 --- a/node_modules/@nestjs/common/enums/shutdown-signal.enum.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ShutdownSignal = void 0; -/** - * System signals which shut down a process - */ -var ShutdownSignal; -(function (ShutdownSignal) { - ShutdownSignal["SIGHUP"] = "SIGHUP"; - ShutdownSignal["SIGINT"] = "SIGINT"; - ShutdownSignal["SIGQUIT"] = "SIGQUIT"; - ShutdownSignal["SIGILL"] = "SIGILL"; - ShutdownSignal["SIGTRAP"] = "SIGTRAP"; - ShutdownSignal["SIGABRT"] = "SIGABRT"; - ShutdownSignal["SIGBUS"] = "SIGBUS"; - ShutdownSignal["SIGFPE"] = "SIGFPE"; - ShutdownSignal["SIGSEGV"] = "SIGSEGV"; - ShutdownSignal["SIGUSR2"] = "SIGUSR2"; - ShutdownSignal["SIGTERM"] = "SIGTERM"; -})(ShutdownSignal || (exports.ShutdownSignal = ShutdownSignal = {})); diff --git a/node_modules/@nestjs/common/enums/version-type.enum.d.ts b/node_modules/@nestjs/common/enums/version-type.enum.d.ts deleted file mode 100644 index 98248fd..0000000 --- a/node_modules/@nestjs/common/enums/version-type.enum.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @publicApi - */ -export declare enum VersioningType { - URI = 0, - HEADER = 1, - MEDIA_TYPE = 2, - CUSTOM = 3 -} diff --git a/node_modules/@nestjs/common/enums/version-type.enum.js b/node_modules/@nestjs/common/enums/version-type.enum.js deleted file mode 100644 index 9aacb5b..0000000 --- a/node_modules/@nestjs/common/enums/version-type.enum.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.VersioningType = void 0; -/** - * @publicApi - */ -var VersioningType; -(function (VersioningType) { - VersioningType[VersioningType["URI"] = 0] = "URI"; - VersioningType[VersioningType["HEADER"] = 1] = "HEADER"; - VersioningType[VersioningType["MEDIA_TYPE"] = 2] = "MEDIA_TYPE"; - VersioningType[VersioningType["CUSTOM"] = 3] = "CUSTOM"; -})(VersioningType || (exports.VersioningType = VersioningType = {})); diff --git a/node_modules/@nestjs/common/exceptions/bad-gateway.exception.d.ts b/node_modules/@nestjs/common/exceptions/bad-gateway.exception.d.ts deleted file mode 100644 index 5e72b12..0000000 --- a/node_modules/@nestjs/common/exceptions/bad-gateway.exception.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { HttpException, HttpExceptionOptions } from './http.exception'; -/** - * Defines an HTTP exception for *Bad Gateway* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -export declare class BadGatewayException extends HttpException { - /** - * Instantiate a `BadGatewayException` Exception. - * - * @example - * `throw new BadGatewayException()` - * - * @usageNotes - * The HTTP response status code will be 502. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 502. - * - `message`: the string `'Bad Gateway'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError?: any, descriptionOrOptions?: string | HttpExceptionOptions); -} diff --git a/node_modules/@nestjs/common/exceptions/bad-gateway.exception.js b/node_modules/@nestjs/common/exceptions/bad-gateway.exception.js deleted file mode 100644 index 6f1bd4e..0000000 --- a/node_modules/@nestjs/common/exceptions/bad-gateway.exception.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BadGatewayException = void 0; -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_exception_1 = require("./http.exception"); -/** - * Defines an HTTP exception for *Bad Gateway* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -class BadGatewayException extends http_exception_1.HttpException { - /** - * Instantiate a `BadGatewayException` Exception. - * - * @example - * `throw new BadGatewayException()` - * - * @usageNotes - * The HTTP response status code will be 502. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 502. - * - `message`: the string `'Bad Gateway'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError, descriptionOrOptions = 'Bad Gateway') { - const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); - super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.BAD_GATEWAY), http_status_enum_1.HttpStatus.BAD_GATEWAY, httpExceptionOptions); - } -} -exports.BadGatewayException = BadGatewayException; diff --git a/node_modules/@nestjs/common/exceptions/bad-request.exception.d.ts b/node_modules/@nestjs/common/exceptions/bad-request.exception.d.ts deleted file mode 100644 index c4edd89..0000000 --- a/node_modules/@nestjs/common/exceptions/bad-request.exception.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { HttpException, HttpExceptionOptions } from './http.exception'; -/** - * Defines an HTTP exception for *Bad Request* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -export declare class BadRequestException extends HttpException { - /** - * Instantiate a `BadRequestException` Exception. - * - * @example - * `throw new BadRequestException()` - * - * @usageNotes - * The HTTP response status code will be 400. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 400. - * - `message`: the string `'Bad Request'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError?: any, descriptionOrOptions?: string | HttpExceptionOptions); -} diff --git a/node_modules/@nestjs/common/exceptions/bad-request.exception.js b/node_modules/@nestjs/common/exceptions/bad-request.exception.js deleted file mode 100644 index df486e1..0000000 --- a/node_modules/@nestjs/common/exceptions/bad-request.exception.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BadRequestException = void 0; -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_exception_1 = require("./http.exception"); -/** - * Defines an HTTP exception for *Bad Request* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -class BadRequestException extends http_exception_1.HttpException { - /** - * Instantiate a `BadRequestException` Exception. - * - * @example - * `throw new BadRequestException()` - * - * @usageNotes - * The HTTP response status code will be 400. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 400. - * - `message`: the string `'Bad Request'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError, descriptionOrOptions = 'Bad Request') { - const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); - super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.BAD_REQUEST), http_status_enum_1.HttpStatus.BAD_REQUEST, httpExceptionOptions); - } -} -exports.BadRequestException = BadRequestException; diff --git a/node_modules/@nestjs/common/exceptions/conflict.exception.d.ts b/node_modules/@nestjs/common/exceptions/conflict.exception.d.ts deleted file mode 100644 index 9cb047c..0000000 --- a/node_modules/@nestjs/common/exceptions/conflict.exception.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { HttpException, HttpExceptionOptions } from './http.exception'; -/** - * Defines an HTTP exception for *Conflict* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -export declare class ConflictException extends HttpException { - /** - * Instantiate a `ConflictException` Exception. - * - * @example - * `throw new ConflictException()` - * - * @usageNotes - * The HTTP response status code will be 409. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 409. - * - `message`: the string `'Conflict'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError?: any, descriptionOrOptions?: string | HttpExceptionOptions); -} diff --git a/node_modules/@nestjs/common/exceptions/conflict.exception.js b/node_modules/@nestjs/common/exceptions/conflict.exception.js deleted file mode 100644 index f73a78e..0000000 --- a/node_modules/@nestjs/common/exceptions/conflict.exception.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ConflictException = void 0; -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_exception_1 = require("./http.exception"); -/** - * Defines an HTTP exception for *Conflict* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -class ConflictException extends http_exception_1.HttpException { - /** - * Instantiate a `ConflictException` Exception. - * - * @example - * `throw new ConflictException()` - * - * @usageNotes - * The HTTP response status code will be 409. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 409. - * - `message`: the string `'Conflict'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError, descriptionOrOptions = 'Conflict') { - const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); - super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.CONFLICT), http_status_enum_1.HttpStatus.CONFLICT, httpExceptionOptions); - } -} -exports.ConflictException = ConflictException; diff --git a/node_modules/@nestjs/common/exceptions/forbidden.exception.d.ts b/node_modules/@nestjs/common/exceptions/forbidden.exception.d.ts deleted file mode 100644 index 76b6860..0000000 --- a/node_modules/@nestjs/common/exceptions/forbidden.exception.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { HttpException, HttpExceptionOptions } from './http.exception'; -/** - * Defines an HTTP exception for *Forbidden* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -export declare class ForbiddenException extends HttpException { - /** - * Instantiate a `ForbiddenException` Exception. - * - * @example - * `throw new ForbiddenException()` - * - * @usageNotes - * The HTTP response status code will be 403. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 403. - * - `message`: the string `'Forbidden'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError?: any, descriptionOrOptions?: string | HttpExceptionOptions); -} diff --git a/node_modules/@nestjs/common/exceptions/forbidden.exception.js b/node_modules/@nestjs/common/exceptions/forbidden.exception.js deleted file mode 100644 index 3362bcb..0000000 --- a/node_modules/@nestjs/common/exceptions/forbidden.exception.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ForbiddenException = void 0; -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_exception_1 = require("./http.exception"); -/** - * Defines an HTTP exception for *Forbidden* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -class ForbiddenException extends http_exception_1.HttpException { - /** - * Instantiate a `ForbiddenException` Exception. - * - * @example - * `throw new ForbiddenException()` - * - * @usageNotes - * The HTTP response status code will be 403. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 403. - * - `message`: the string `'Forbidden'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError, descriptionOrOptions = 'Forbidden') { - const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); - super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.FORBIDDEN), http_status_enum_1.HttpStatus.FORBIDDEN, httpExceptionOptions); - } -} -exports.ForbiddenException = ForbiddenException; diff --git a/node_modules/@nestjs/common/exceptions/gateway-timeout.exception.d.ts b/node_modules/@nestjs/common/exceptions/gateway-timeout.exception.d.ts deleted file mode 100644 index a42411a..0000000 --- a/node_modules/@nestjs/common/exceptions/gateway-timeout.exception.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { HttpException, HttpExceptionOptions } from './http.exception'; -/** - * Defines an HTTP exception for *Gateway Timeout* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -export declare class GatewayTimeoutException extends HttpException { - /** - * Instantiate a `GatewayTimeoutException` Exception. - * - * @example - * `throw new GatewayTimeoutException()` - * - * @usageNotes - * The HTTP response status code will be 504. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 504. - * - `message`: the string `'Gateway Timeout'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError?: any, descriptionOrOptions?: string | HttpExceptionOptions); -} diff --git a/node_modules/@nestjs/common/exceptions/gateway-timeout.exception.js b/node_modules/@nestjs/common/exceptions/gateway-timeout.exception.js deleted file mode 100644 index 28cedc9..0000000 --- a/node_modules/@nestjs/common/exceptions/gateway-timeout.exception.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GatewayTimeoutException = void 0; -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_exception_1 = require("./http.exception"); -/** - * Defines an HTTP exception for *Gateway Timeout* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -class GatewayTimeoutException extends http_exception_1.HttpException { - /** - * Instantiate a `GatewayTimeoutException` Exception. - * - * @example - * `throw new GatewayTimeoutException()` - * - * @usageNotes - * The HTTP response status code will be 504. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 504. - * - `message`: the string `'Gateway Timeout'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError, descriptionOrOptions = 'Gateway Timeout') { - const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); - super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.GATEWAY_TIMEOUT), http_status_enum_1.HttpStatus.GATEWAY_TIMEOUT, httpExceptionOptions); - } -} -exports.GatewayTimeoutException = GatewayTimeoutException; diff --git a/node_modules/@nestjs/common/exceptions/gone.exception.d.ts b/node_modules/@nestjs/common/exceptions/gone.exception.d.ts deleted file mode 100644 index 46f1126..0000000 --- a/node_modules/@nestjs/common/exceptions/gone.exception.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { HttpException, HttpExceptionOptions } from './http.exception'; -/** - * Defines an HTTP exception for *Gone* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -export declare class GoneException extends HttpException { - /** - * Instantiate a `GoneException` Exception. - * - * @example - * `throw new GoneException()` - * - * @usageNotes - * The HTTP response status code will be 410. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 410. - * - `message`: the string `'Gone'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError?: any, descriptionOrOptions?: string | HttpExceptionOptions); -} diff --git a/node_modules/@nestjs/common/exceptions/gone.exception.js b/node_modules/@nestjs/common/exceptions/gone.exception.js deleted file mode 100644 index affca5b..0000000 --- a/node_modules/@nestjs/common/exceptions/gone.exception.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GoneException = void 0; -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_exception_1 = require("./http.exception"); -/** - * Defines an HTTP exception for *Gone* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -class GoneException extends http_exception_1.HttpException { - /** - * Instantiate a `GoneException` Exception. - * - * @example - * `throw new GoneException()` - * - * @usageNotes - * The HTTP response status code will be 410. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 410. - * - `message`: the string `'Gone'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError, descriptionOrOptions = 'Gone') { - const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); - super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.GONE), http_status_enum_1.HttpStatus.GONE, httpExceptionOptions); - } -} -exports.GoneException = GoneException; diff --git a/node_modules/@nestjs/common/exceptions/http-version-not-supported.exception.d.ts b/node_modules/@nestjs/common/exceptions/http-version-not-supported.exception.d.ts deleted file mode 100644 index c2b7390..0000000 --- a/node_modules/@nestjs/common/exceptions/http-version-not-supported.exception.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { HttpException, HttpExceptionOptions } from './http.exception'; -/** - * Defines an HTTP exception for *Http Version Not Supported* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -export declare class HttpVersionNotSupportedException extends HttpException { - /** - * Instantiate a `HttpVersionNotSupportedException` Exception. - * - * @example - * `throw new HttpVersionNotSupportedException()` - * - * @usageNotes - * The HTTP response status code will be 505. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 505. - * - `message`: the string `'HTTP Version Not Supported'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError?: any, descriptionOrOptions?: string | HttpExceptionOptions); -} diff --git a/node_modules/@nestjs/common/exceptions/http-version-not-supported.exception.js b/node_modules/@nestjs/common/exceptions/http-version-not-supported.exception.js deleted file mode 100644 index 89648cc..0000000 --- a/node_modules/@nestjs/common/exceptions/http-version-not-supported.exception.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.HttpVersionNotSupportedException = void 0; -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_exception_1 = require("./http.exception"); -/** - * Defines an HTTP exception for *Http Version Not Supported* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -class HttpVersionNotSupportedException extends http_exception_1.HttpException { - /** - * Instantiate a `HttpVersionNotSupportedException` Exception. - * - * @example - * `throw new HttpVersionNotSupportedException()` - * - * @usageNotes - * The HTTP response status code will be 505. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 505. - * - `message`: the string `'HTTP Version Not Supported'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError, descriptionOrOptions = 'HTTP Version Not Supported') { - const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); - super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.HTTP_VERSION_NOT_SUPPORTED), http_status_enum_1.HttpStatus.HTTP_VERSION_NOT_SUPPORTED, httpExceptionOptions); - } -} -exports.HttpVersionNotSupportedException = HttpVersionNotSupportedException; diff --git a/node_modules/@nestjs/common/exceptions/http.exception.d.ts b/node_modules/@nestjs/common/exceptions/http.exception.d.ts deleted file mode 100644 index 83373e3..0000000 --- a/node_modules/@nestjs/common/exceptions/http.exception.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { HttpExceptionBody, HttpExceptionBodyMessage } from '../interfaces/http/http-exception-body.interface'; -import { IntrinsicException } from './intrinsic.exception'; -export interface HttpExceptionOptions { - /** original cause of the error */ - cause?: unknown; - description?: string; -} -export interface DescriptionAndOptions { - description?: string; - httpExceptionOptions?: HttpExceptionOptions; -} -/** - * Defines the base Nest HTTP exception, which is handled by the default - * Exceptions Handler. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -export declare class HttpException extends IntrinsicException { - private readonly response; - private readonly status; - private readonly options?; - /** - * Exception cause. Indicates the specific original cause of the error. - * It is used when catching and re-throwing an error with a more-specific or useful error message in order to still have access to the original error. - */ - cause: unknown; - /** - * Instantiate a plain HTTP Exception. - * - * @example - * throw new HttpException('message', HttpStatus.BAD_REQUEST) - * throw new HttpException('custom message', HttpStatus.BAD_REQUEST, { - * cause: new Error('Cause Error'), - * }) - * - * - * @usageNotes - * The constructor arguments define the response and the HTTP response status code. - * - The `response` argument (required) defines the JSON response body. alternatively, it can also be - * an error object that is used to define an error [cause](https://nodejs.org/en/blog/release/v16.9.0/#error-cause). - * - The `status` argument (required) defines the HTTP Status Code. - * - The `options` argument (optional) defines additional error options. Currently, it supports the `cause` attribute, - * and can be used as an alternative way to specify the error cause: `const error = new HttpException('description', 400, { cause: new Error() });` - * - * By default, the JSON response body contains two properties: - * - `statusCode`: the Http Status Code. - * - `message`: a short description of the HTTP error by default; override this - * by supplying a string in the `response` parameter. - * - * To override the entire JSON response body, pass an object to the `createBody` - * method. Nest will serialize the object and return it as the JSON response body. - * - * The `status` argument is required, and should be a valid HTTP status code. - * Best practice is to use the `HttpStatus` enum imported from `nestjs/common`. - * - * @param response string, object describing the error condition or the error cause. - * @param status HTTP response status code. - * @param options An object used to add an error cause. - */ - constructor(response: string | Record, status: number, options?: HttpExceptionOptions | undefined); - /** - * Configures error chaining support - * - * @see https://nodejs.org/en/blog/release/v16.9.0/#error-cause - * @see https://github.com/microsoft/TypeScript/issues/45167 - */ - initCause(): void; - initMessage(): void; - initName(): void; - getResponse(): string | object; - getStatus(): number; - static createBody(nil: null | '', message: HttpExceptionBodyMessage, statusCode: number): HttpExceptionBody; - static createBody(message: HttpExceptionBodyMessage, error: string, statusCode: number): HttpExceptionBody; - static createBody>(custom: Body): Body; - static getDescriptionFrom(descriptionOrOptions: string | HttpExceptionOptions): string; - static getHttpExceptionOptionsFrom(descriptionOrOptions: string | HttpExceptionOptions): HttpExceptionOptions; - /** - * Utility method used to extract the error description and httpExceptionOptions from the given argument. - * This is used by inheriting classes to correctly parse both options. - * @returns the error description and the httpExceptionOptions as an object. - */ - static extractDescriptionAndOptionsFrom(descriptionOrOptions: string | HttpExceptionOptions): DescriptionAndOptions; -} diff --git a/node_modules/@nestjs/common/exceptions/http.exception.js b/node_modules/@nestjs/common/exceptions/http.exception.js deleted file mode 100644 index 9f117cc..0000000 --- a/node_modules/@nestjs/common/exceptions/http.exception.js +++ /dev/null @@ -1,133 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.HttpException = void 0; -const shared_utils_1 = require("../utils/shared.utils"); -const intrinsic_exception_1 = require("./intrinsic.exception"); -/** - * Defines the base Nest HTTP exception, which is handled by the default - * Exceptions Handler. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -class HttpException extends intrinsic_exception_1.IntrinsicException { - /** - * Instantiate a plain HTTP Exception. - * - * @example - * throw new HttpException('message', HttpStatus.BAD_REQUEST) - * throw new HttpException('custom message', HttpStatus.BAD_REQUEST, { - * cause: new Error('Cause Error'), - * }) - * - * - * @usageNotes - * The constructor arguments define the response and the HTTP response status code. - * - The `response` argument (required) defines the JSON response body. alternatively, it can also be - * an error object that is used to define an error [cause](https://nodejs.org/en/blog/release/v16.9.0/#error-cause). - * - The `status` argument (required) defines the HTTP Status Code. - * - The `options` argument (optional) defines additional error options. Currently, it supports the `cause` attribute, - * and can be used as an alternative way to specify the error cause: `const error = new HttpException('description', 400, { cause: new Error() });` - * - * By default, the JSON response body contains two properties: - * - `statusCode`: the Http Status Code. - * - `message`: a short description of the HTTP error by default; override this - * by supplying a string in the `response` parameter. - * - * To override the entire JSON response body, pass an object to the `createBody` - * method. Nest will serialize the object and return it as the JSON response body. - * - * The `status` argument is required, and should be a valid HTTP status code. - * Best practice is to use the `HttpStatus` enum imported from `nestjs/common`. - * - * @param response string, object describing the error condition or the error cause. - * @param status HTTP response status code. - * @param options An object used to add an error cause. - */ - constructor(response, status, options) { - super(); - this.response = response; - this.status = status; - this.options = options; - this.initMessage(); - this.initName(); - this.initCause(); - } - /** - * Configures error chaining support - * - * @see https://nodejs.org/en/blog/release/v16.9.0/#error-cause - * @see https://github.com/microsoft/TypeScript/issues/45167 - */ - initCause() { - if (this.options?.cause) { - this.cause = this.options.cause; - return; - } - } - initMessage() { - if ((0, shared_utils_1.isString)(this.response)) { - this.message = this.response; - } - else if ((0, shared_utils_1.isObject)(this.response) && (0, shared_utils_1.isString)(this.response.message)) { - this.message = this.response.message; - } - else if (this.constructor) { - this.message = - this.constructor.name.match(/[A-Z][a-z]+|[0-9]+/g)?.join(' ') ?? - 'Error'; - } - } - initName() { - this.name = this.constructor.name; - } - getResponse() { - return this.response; - } - getStatus() { - return this.status; - } - static createBody(arg0, arg1, statusCode) { - if (!arg0) { - return { - message: arg1, - statusCode: statusCode, - }; - } - if ((0, shared_utils_1.isString)(arg0) || Array.isArray(arg0) || (0, shared_utils_1.isNumber)(arg0)) { - return { - message: arg0, - error: arg1, - statusCode: statusCode, - }; - } - return arg0; - } - static getDescriptionFrom(descriptionOrOptions) { - return (0, shared_utils_1.isString)(descriptionOrOptions) - ? descriptionOrOptions - : descriptionOrOptions?.description; - } - static getHttpExceptionOptionsFrom(descriptionOrOptions) { - return (0, shared_utils_1.isString)(descriptionOrOptions) ? {} : descriptionOrOptions; - } - /** - * Utility method used to extract the error description and httpExceptionOptions from the given argument. - * This is used by inheriting classes to correctly parse both options. - * @returns the error description and the httpExceptionOptions as an object. - */ - static extractDescriptionAndOptionsFrom(descriptionOrOptions) { - const description = (0, shared_utils_1.isString)(descriptionOrOptions) - ? descriptionOrOptions - : descriptionOrOptions?.description; - const httpExceptionOptions = (0, shared_utils_1.isString)(descriptionOrOptions) - ? {} - : descriptionOrOptions; - return { - description, - httpExceptionOptions, - }; - } -} -exports.HttpException = HttpException; diff --git a/node_modules/@nestjs/common/exceptions/im-a-teapot.exception.d.ts b/node_modules/@nestjs/common/exceptions/im-a-teapot.exception.d.ts deleted file mode 100644 index b7d2d5b..0000000 --- a/node_modules/@nestjs/common/exceptions/im-a-teapot.exception.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { HttpException, HttpExceptionOptions } from './http.exception'; -/** - * Defines an HTTP exception for *ImATeapotException* type errors. - * - * Any attempt to brew coffee with a teapot should result in the error code - * "418 I'm a teapot". The resulting entity body MAY be short and stout. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -export declare class ImATeapotException extends HttpException { - /** - * Instantiate an `ImATeapotException` Exception. - * - * @example - * `throw new ImATeapotException()` - * - * @usageNotes - * The HTTP response status code will be 418. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 418. - * - `message`: the string `"I'm a Teapot"` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError?: any, descriptionOrOptions?: string | HttpExceptionOptions); -} diff --git a/node_modules/@nestjs/common/exceptions/im-a-teapot.exception.js b/node_modules/@nestjs/common/exceptions/im-a-teapot.exception.js deleted file mode 100644 index 03d1296..0000000 --- a/node_modules/@nestjs/common/exceptions/im-a-teapot.exception.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ImATeapotException = void 0; -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_exception_1 = require("./http.exception"); -/** - * Defines an HTTP exception for *ImATeapotException* type errors. - * - * Any attempt to brew coffee with a teapot should result in the error code - * "418 I'm a teapot". The resulting entity body MAY be short and stout. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -class ImATeapotException extends http_exception_1.HttpException { - /** - * Instantiate an `ImATeapotException` Exception. - * - * @example - * `throw new ImATeapotException()` - * - * @usageNotes - * The HTTP response status code will be 418. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 418. - * - `message`: the string `"I'm a Teapot"` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError, descriptionOrOptions = `I'm a teapot`) { - const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); - super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.I_AM_A_TEAPOT), http_status_enum_1.HttpStatus.I_AM_A_TEAPOT, httpExceptionOptions); - } -} -exports.ImATeapotException = ImATeapotException; diff --git a/node_modules/@nestjs/common/exceptions/index.d.ts b/node_modules/@nestjs/common/exceptions/index.d.ts deleted file mode 100644 index 5542183..0000000 --- a/node_modules/@nestjs/common/exceptions/index.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -export * from './bad-gateway.exception'; -export * from './bad-request.exception'; -export * from './conflict.exception'; -export * from './forbidden.exception'; -export * from './gateway-timeout.exception'; -export * from './gone.exception'; -export * from './http-version-not-supported.exception'; -export * from './http.exception'; -export * from './im-a-teapot.exception'; -export * from './internal-server-error.exception'; -export * from './intrinsic.exception'; -export * from './method-not-allowed.exception'; -export * from './misdirected.exception'; -export * from './not-acceptable.exception'; -export * from './not-found.exception'; -export * from './not-implemented.exception'; -export * from './payload-too-large.exception'; -export * from './precondition-failed.exception'; -export * from './request-timeout.exception'; -export * from './service-unavailable.exception'; -export * from './unauthorized.exception'; -export * from './unprocessable-entity.exception'; -export * from './unsupported-media-type.exception'; diff --git a/node_modules/@nestjs/common/exceptions/index.js b/node_modules/@nestjs/common/exceptions/index.js deleted file mode 100644 index 1aa3f1b..0000000 --- a/node_modules/@nestjs/common/exceptions/index.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./bad-gateway.exception"), exports); -tslib_1.__exportStar(require("./bad-request.exception"), exports); -tslib_1.__exportStar(require("./conflict.exception"), exports); -tslib_1.__exportStar(require("./forbidden.exception"), exports); -tslib_1.__exportStar(require("./gateway-timeout.exception"), exports); -tslib_1.__exportStar(require("./gone.exception"), exports); -tslib_1.__exportStar(require("./http-version-not-supported.exception"), exports); -tslib_1.__exportStar(require("./http.exception"), exports); -tslib_1.__exportStar(require("./im-a-teapot.exception"), exports); -tslib_1.__exportStar(require("./internal-server-error.exception"), exports); -tslib_1.__exportStar(require("./intrinsic.exception"), exports); -tslib_1.__exportStar(require("./method-not-allowed.exception"), exports); -tslib_1.__exportStar(require("./misdirected.exception"), exports); -tslib_1.__exportStar(require("./not-acceptable.exception"), exports); -tslib_1.__exportStar(require("./not-found.exception"), exports); -tslib_1.__exportStar(require("./not-implemented.exception"), exports); -tslib_1.__exportStar(require("./payload-too-large.exception"), exports); -tslib_1.__exportStar(require("./precondition-failed.exception"), exports); -tslib_1.__exportStar(require("./request-timeout.exception"), exports); -tslib_1.__exportStar(require("./service-unavailable.exception"), exports); -tslib_1.__exportStar(require("./unauthorized.exception"), exports); -tslib_1.__exportStar(require("./unprocessable-entity.exception"), exports); -tslib_1.__exportStar(require("./unsupported-media-type.exception"), exports); diff --git a/node_modules/@nestjs/common/exceptions/internal-server-error.exception.d.ts b/node_modules/@nestjs/common/exceptions/internal-server-error.exception.d.ts deleted file mode 100644 index ecdecef..0000000 --- a/node_modules/@nestjs/common/exceptions/internal-server-error.exception.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { HttpException, HttpExceptionOptions } from './http.exception'; -/** - * Defines an HTTP exception for *Internal Server Error* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -export declare class InternalServerErrorException extends HttpException { - /** - * Instantiate an `InternalServerErrorException` Exception. - * - * @example - * `throw new InternalServerErrorException()` - * - * @usageNotes - * The HTTP response status code will be 500. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 500. - * - `message`: the string `'Internal Server Error'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError?: any, descriptionOrOptions?: string | HttpExceptionOptions); -} diff --git a/node_modules/@nestjs/common/exceptions/internal-server-error.exception.js b/node_modules/@nestjs/common/exceptions/internal-server-error.exception.js deleted file mode 100644 index 2c794b7..0000000 --- a/node_modules/@nestjs/common/exceptions/internal-server-error.exception.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.InternalServerErrorException = void 0; -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_exception_1 = require("./http.exception"); -/** - * Defines an HTTP exception for *Internal Server Error* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -class InternalServerErrorException extends http_exception_1.HttpException { - /** - * Instantiate an `InternalServerErrorException` Exception. - * - * @example - * `throw new InternalServerErrorException()` - * - * @usageNotes - * The HTTP response status code will be 500. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 500. - * - `message`: the string `'Internal Server Error'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError, descriptionOrOptions = 'Internal Server Error') { - const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); - super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.INTERNAL_SERVER_ERROR), http_status_enum_1.HttpStatus.INTERNAL_SERVER_ERROR, httpExceptionOptions); - } -} -exports.InternalServerErrorException = InternalServerErrorException; diff --git a/node_modules/@nestjs/common/exceptions/intrinsic.exception.d.ts b/node_modules/@nestjs/common/exceptions/intrinsic.exception.d.ts deleted file mode 100644 index b1b7efc..0000000 --- a/node_modules/@nestjs/common/exceptions/intrinsic.exception.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Exception that represents an intrinsic error in the application. - * When thrown, the default exception filter will not log the error message. - * - * @publicApi - */ -export declare class IntrinsicException extends Error { -} diff --git a/node_modules/@nestjs/common/exceptions/intrinsic.exception.js b/node_modules/@nestjs/common/exceptions/intrinsic.exception.js deleted file mode 100644 index 37b0611..0000000 --- a/node_modules/@nestjs/common/exceptions/intrinsic.exception.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.IntrinsicException = void 0; -/** - * Exception that represents an intrinsic error in the application. - * When thrown, the default exception filter will not log the error message. - * - * @publicApi - */ -class IntrinsicException extends Error { -} -exports.IntrinsicException = IntrinsicException; diff --git a/node_modules/@nestjs/common/exceptions/method-not-allowed.exception.d.ts b/node_modules/@nestjs/common/exceptions/method-not-allowed.exception.d.ts deleted file mode 100644 index 4975bcf..0000000 --- a/node_modules/@nestjs/common/exceptions/method-not-allowed.exception.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { HttpException, HttpExceptionOptions } from './http.exception'; -/** - * Defines an HTTP exception for *Method Not Allowed* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -export declare class MethodNotAllowedException extends HttpException { - /** - * Instantiate a `MethodNotAllowedException` Exception. - * - * @example - * `throw new MethodNotAllowedException()` - * - * @usageNotes - * The HTTP response status code will be 405. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 405. - * - `message`: the string `'Method Not Allowed'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError?: any, descriptionOrOptions?: string | HttpExceptionOptions); -} diff --git a/node_modules/@nestjs/common/exceptions/method-not-allowed.exception.js b/node_modules/@nestjs/common/exceptions/method-not-allowed.exception.js deleted file mode 100644 index ec131fa..0000000 --- a/node_modules/@nestjs/common/exceptions/method-not-allowed.exception.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MethodNotAllowedException = void 0; -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_exception_1 = require("./http.exception"); -/** - * Defines an HTTP exception for *Method Not Allowed* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -class MethodNotAllowedException extends http_exception_1.HttpException { - /** - * Instantiate a `MethodNotAllowedException` Exception. - * - * @example - * `throw new MethodNotAllowedException()` - * - * @usageNotes - * The HTTP response status code will be 405. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 405. - * - `message`: the string `'Method Not Allowed'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError, descriptionOrOptions = 'Method Not Allowed') { - const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); - super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.METHOD_NOT_ALLOWED), http_status_enum_1.HttpStatus.METHOD_NOT_ALLOWED, httpExceptionOptions); - } -} -exports.MethodNotAllowedException = MethodNotAllowedException; diff --git a/node_modules/@nestjs/common/exceptions/misdirected.exception.d.ts b/node_modules/@nestjs/common/exceptions/misdirected.exception.d.ts deleted file mode 100644 index 90795e7..0000000 --- a/node_modules/@nestjs/common/exceptions/misdirected.exception.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { HttpException, HttpExceptionOptions } from './http.exception'; -/** - * Defines an HTTP exception for *Misdirected* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -export declare class MisdirectedException extends HttpException { - /** - * Instantiate a `MisdirectedException` Exception. - * - * @example - * `throw new MisdirectedException()` - * - * @usageNotes - * The HTTP response status code will be 421. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 421. - * - `message`: the string `'Bad Gateway'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError?: any, descriptionOrOptions?: string | HttpExceptionOptions); -} diff --git a/node_modules/@nestjs/common/exceptions/misdirected.exception.js b/node_modules/@nestjs/common/exceptions/misdirected.exception.js deleted file mode 100644 index bd90344..0000000 --- a/node_modules/@nestjs/common/exceptions/misdirected.exception.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MisdirectedException = void 0; -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_exception_1 = require("./http.exception"); -/** - * Defines an HTTP exception for *Misdirected* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -class MisdirectedException extends http_exception_1.HttpException { - /** - * Instantiate a `MisdirectedException` Exception. - * - * @example - * `throw new MisdirectedException()` - * - * @usageNotes - * The HTTP response status code will be 421. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 421. - * - `message`: the string `'Bad Gateway'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError, descriptionOrOptions = 'Misdirected') { - const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); - super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.MISDIRECTED), http_status_enum_1.HttpStatus.MISDIRECTED, httpExceptionOptions); - } -} -exports.MisdirectedException = MisdirectedException; diff --git a/node_modules/@nestjs/common/exceptions/not-acceptable.exception.d.ts b/node_modules/@nestjs/common/exceptions/not-acceptable.exception.d.ts deleted file mode 100644 index 8a737ef..0000000 --- a/node_modules/@nestjs/common/exceptions/not-acceptable.exception.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { HttpException, HttpExceptionOptions } from './http.exception'; -/** - * Defines an HTTP exception for *Not Acceptable* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -export declare class NotAcceptableException extends HttpException { - /** - * Instantiate a `NotAcceptableException` Exception. - * - * @example - * `throw new NotAcceptableException()` - * - * @usageNotes - * The HTTP response status code will be 406. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 406. - * - `error`: the string `'Not Acceptable'` by default; override this by supplying - * a string in the `error` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError?: any, descriptionOrOptions?: string | HttpExceptionOptions); -} diff --git a/node_modules/@nestjs/common/exceptions/not-acceptable.exception.js b/node_modules/@nestjs/common/exceptions/not-acceptable.exception.js deleted file mode 100644 index a7c3212..0000000 --- a/node_modules/@nestjs/common/exceptions/not-acceptable.exception.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NotAcceptableException = void 0; -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_exception_1 = require("./http.exception"); -/** - * Defines an HTTP exception for *Not Acceptable* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -class NotAcceptableException extends http_exception_1.HttpException { - /** - * Instantiate a `NotAcceptableException` Exception. - * - * @example - * `throw new NotAcceptableException()` - * - * @usageNotes - * The HTTP response status code will be 406. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 406. - * - `error`: the string `'Not Acceptable'` by default; override this by supplying - * a string in the `error` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError, descriptionOrOptions = 'Not Acceptable') { - const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); - super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.NOT_ACCEPTABLE), http_status_enum_1.HttpStatus.NOT_ACCEPTABLE, httpExceptionOptions); - } -} -exports.NotAcceptableException = NotAcceptableException; diff --git a/node_modules/@nestjs/common/exceptions/not-found.exception.d.ts b/node_modules/@nestjs/common/exceptions/not-found.exception.d.ts deleted file mode 100644 index 7ac89c9..0000000 --- a/node_modules/@nestjs/common/exceptions/not-found.exception.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { HttpException, HttpExceptionOptions } from './http.exception'; -/** - * Defines an HTTP exception for *Not Found* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -export declare class NotFoundException extends HttpException { - /** - * Instantiate a `NotFoundException` Exception. - * - * @example - * `throw new NotFoundException()` - * - * @usageNotes - * The HTTP response status code will be 404. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 404. - * - `message`: the string `'Not Found'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError?: any, descriptionOrOptions?: string | HttpExceptionOptions); -} diff --git a/node_modules/@nestjs/common/exceptions/not-found.exception.js b/node_modules/@nestjs/common/exceptions/not-found.exception.js deleted file mode 100644 index bce036d..0000000 --- a/node_modules/@nestjs/common/exceptions/not-found.exception.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NotFoundException = void 0; -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_exception_1 = require("./http.exception"); -/** - * Defines an HTTP exception for *Not Found* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -class NotFoundException extends http_exception_1.HttpException { - /** - * Instantiate a `NotFoundException` Exception. - * - * @example - * `throw new NotFoundException()` - * - * @usageNotes - * The HTTP response status code will be 404. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 404. - * - `message`: the string `'Not Found'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError, descriptionOrOptions = 'Not Found') { - const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); - super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.NOT_FOUND), http_status_enum_1.HttpStatus.NOT_FOUND, httpExceptionOptions); - } -} -exports.NotFoundException = NotFoundException; diff --git a/node_modules/@nestjs/common/exceptions/not-implemented.exception.d.ts b/node_modules/@nestjs/common/exceptions/not-implemented.exception.d.ts deleted file mode 100644 index 65b4c8a..0000000 --- a/node_modules/@nestjs/common/exceptions/not-implemented.exception.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { HttpException, HttpExceptionOptions } from './http.exception'; -/** - * Defines an HTTP exception for *Not Implemented* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -export declare class NotImplementedException extends HttpException { - /** - * Instantiate a `NotImplementedException` Exception. - * - * @example - * `throw new NotImplementedException()` - * - * @usageNotes - * The HTTP response status code will be 501. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 501. - * - `message`: the string `'Not Implemented'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - * @param error a short description of the HTTP error. - */ - constructor(objectOrError?: any, descriptionOrOptions?: string | HttpExceptionOptions); -} diff --git a/node_modules/@nestjs/common/exceptions/not-implemented.exception.js b/node_modules/@nestjs/common/exceptions/not-implemented.exception.js deleted file mode 100644 index c1b2fd8..0000000 --- a/node_modules/@nestjs/common/exceptions/not-implemented.exception.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NotImplementedException = void 0; -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_exception_1 = require("./http.exception"); -/** - * Defines an HTTP exception for *Not Implemented* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -class NotImplementedException extends http_exception_1.HttpException { - /** - * Instantiate a `NotImplementedException` Exception. - * - * @example - * `throw new NotImplementedException()` - * - * @usageNotes - * The HTTP response status code will be 501. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 501. - * - `message`: the string `'Not Implemented'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - * @param error a short description of the HTTP error. - */ - constructor(objectOrError, descriptionOrOptions = 'Not Implemented') { - const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); - super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.NOT_IMPLEMENTED), http_status_enum_1.HttpStatus.NOT_IMPLEMENTED, httpExceptionOptions); - } -} -exports.NotImplementedException = NotImplementedException; diff --git a/node_modules/@nestjs/common/exceptions/payload-too-large.exception.d.ts b/node_modules/@nestjs/common/exceptions/payload-too-large.exception.d.ts deleted file mode 100644 index d944883..0000000 --- a/node_modules/@nestjs/common/exceptions/payload-too-large.exception.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { HttpException, HttpExceptionOptions } from './http.exception'; -/** - * Defines an HTTP exception for *Payload Too Large* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -export declare class PayloadTooLargeException extends HttpException { - /** - * Instantiate a `PayloadTooLargeException` Exception. - * - * @example - * `throw new PayloadTooLargeException()` - * - * @usageNotes - * The HTTP response status code will be 413. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 413. - * - `message`: the string `'Payload Too Large'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError?: any, descriptionOrOptions?: string | HttpExceptionOptions); -} diff --git a/node_modules/@nestjs/common/exceptions/payload-too-large.exception.js b/node_modules/@nestjs/common/exceptions/payload-too-large.exception.js deleted file mode 100644 index 7368944..0000000 --- a/node_modules/@nestjs/common/exceptions/payload-too-large.exception.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PayloadTooLargeException = void 0; -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_exception_1 = require("./http.exception"); -/** - * Defines an HTTP exception for *Payload Too Large* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -class PayloadTooLargeException extends http_exception_1.HttpException { - /** - * Instantiate a `PayloadTooLargeException` Exception. - * - * @example - * `throw new PayloadTooLargeException()` - * - * @usageNotes - * The HTTP response status code will be 413. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 413. - * - `message`: the string `'Payload Too Large'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError, descriptionOrOptions = 'Payload Too Large') { - const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); - super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.PAYLOAD_TOO_LARGE), http_status_enum_1.HttpStatus.PAYLOAD_TOO_LARGE, httpExceptionOptions); - } -} -exports.PayloadTooLargeException = PayloadTooLargeException; diff --git a/node_modules/@nestjs/common/exceptions/precondition-failed.exception.d.ts b/node_modules/@nestjs/common/exceptions/precondition-failed.exception.d.ts deleted file mode 100644 index 057c513..0000000 --- a/node_modules/@nestjs/common/exceptions/precondition-failed.exception.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { HttpException, HttpExceptionOptions } from './http.exception'; -/** - * Defines an HTTP exception for *Precondition Failed* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -export declare class PreconditionFailedException extends HttpException { - /** - * Instantiate a `PreconditionFailedException` Exception. - * - * @example - * `throw new PreconditionFailedException()` - * - * @usageNotes - * The HTTP response status code will be 412. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 412. - * - `message`: the string `'Precondition Failed'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError?: any, descriptionOrOptions?: string | HttpExceptionOptions); -} diff --git a/node_modules/@nestjs/common/exceptions/precondition-failed.exception.js b/node_modules/@nestjs/common/exceptions/precondition-failed.exception.js deleted file mode 100644 index d3696ad..0000000 --- a/node_modules/@nestjs/common/exceptions/precondition-failed.exception.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PreconditionFailedException = void 0; -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_exception_1 = require("./http.exception"); -/** - * Defines an HTTP exception for *Precondition Failed* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -class PreconditionFailedException extends http_exception_1.HttpException { - /** - * Instantiate a `PreconditionFailedException` Exception. - * - * @example - * `throw new PreconditionFailedException()` - * - * @usageNotes - * The HTTP response status code will be 412. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 412. - * - `message`: the string `'Precondition Failed'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError, descriptionOrOptions = 'Precondition Failed') { - const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); - super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.PRECONDITION_FAILED), http_status_enum_1.HttpStatus.PRECONDITION_FAILED, httpExceptionOptions); - } -} -exports.PreconditionFailedException = PreconditionFailedException; diff --git a/node_modules/@nestjs/common/exceptions/request-timeout.exception.d.ts b/node_modules/@nestjs/common/exceptions/request-timeout.exception.d.ts deleted file mode 100644 index 2c77b5f..0000000 --- a/node_modules/@nestjs/common/exceptions/request-timeout.exception.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { HttpException, HttpExceptionOptions } from './http.exception'; -/** - * Defines an HTTP exception for *Request Timeout* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -export declare class RequestTimeoutException extends HttpException { - /** - * Instantiate a `RequestTimeoutException` Exception. - * - * @example - * `throw new RequestTimeoutException()` - * - * @usageNotes - * The HTTP response status code will be 408. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 408. - * - `message`: the string `'Request Timeout'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError?: any, descriptionOrOptions?: string | HttpExceptionOptions); -} diff --git a/node_modules/@nestjs/common/exceptions/request-timeout.exception.js b/node_modules/@nestjs/common/exceptions/request-timeout.exception.js deleted file mode 100644 index b0bb23f..0000000 --- a/node_modules/@nestjs/common/exceptions/request-timeout.exception.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RequestTimeoutException = void 0; -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_exception_1 = require("./http.exception"); -/** - * Defines an HTTP exception for *Request Timeout* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -class RequestTimeoutException extends http_exception_1.HttpException { - /** - * Instantiate a `RequestTimeoutException` Exception. - * - * @example - * `throw new RequestTimeoutException()` - * - * @usageNotes - * The HTTP response status code will be 408. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 408. - * - `message`: the string `'Request Timeout'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError, descriptionOrOptions = 'Request Timeout') { - const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); - super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.REQUEST_TIMEOUT), http_status_enum_1.HttpStatus.REQUEST_TIMEOUT, httpExceptionOptions); - } -} -exports.RequestTimeoutException = RequestTimeoutException; diff --git a/node_modules/@nestjs/common/exceptions/service-unavailable.exception.d.ts b/node_modules/@nestjs/common/exceptions/service-unavailable.exception.d.ts deleted file mode 100644 index 5160fbd..0000000 --- a/node_modules/@nestjs/common/exceptions/service-unavailable.exception.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { HttpException, HttpExceptionOptions } from './http.exception'; -/** - * Defines an HTTP exception for *Service Unavailable* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -export declare class ServiceUnavailableException extends HttpException { - /** - * Instantiate a `ServiceUnavailableException` Exception. - * - * @example - * `throw new ServiceUnavailableException()` - * - * @usageNotes - * The HTTP response status code will be 503. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 503. - * - `message`: the string `'Service Unavailable'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError?: any, descriptionOrOptions?: string | HttpExceptionOptions); -} diff --git a/node_modules/@nestjs/common/exceptions/service-unavailable.exception.js b/node_modules/@nestjs/common/exceptions/service-unavailable.exception.js deleted file mode 100644 index 088a9b3..0000000 --- a/node_modules/@nestjs/common/exceptions/service-unavailable.exception.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ServiceUnavailableException = void 0; -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_exception_1 = require("./http.exception"); -/** - * Defines an HTTP exception for *Service Unavailable* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -class ServiceUnavailableException extends http_exception_1.HttpException { - /** - * Instantiate a `ServiceUnavailableException` Exception. - * - * @example - * `throw new ServiceUnavailableException()` - * - * @usageNotes - * The HTTP response status code will be 503. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 503. - * - `message`: the string `'Service Unavailable'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError, descriptionOrOptions = 'Service Unavailable') { - const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); - super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.SERVICE_UNAVAILABLE), http_status_enum_1.HttpStatus.SERVICE_UNAVAILABLE, httpExceptionOptions); - } -} -exports.ServiceUnavailableException = ServiceUnavailableException; diff --git a/node_modules/@nestjs/common/exceptions/unauthorized.exception.d.ts b/node_modules/@nestjs/common/exceptions/unauthorized.exception.d.ts deleted file mode 100644 index 2755fe0..0000000 --- a/node_modules/@nestjs/common/exceptions/unauthorized.exception.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { HttpException, HttpExceptionOptions } from './http.exception'; -/** - * Defines an HTTP exception for *Unauthorized* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -export declare class UnauthorizedException extends HttpException { - /** - * Instantiate an `UnauthorizedException` Exception. - * - * @example - * `throw new UnauthorizedException()` - * - * @usageNotes - * The HTTP response status code will be 401. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 401. - * - `message`: the string `'Unauthorized'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError?: any, descriptionOrOptions?: string | HttpExceptionOptions); -} diff --git a/node_modules/@nestjs/common/exceptions/unauthorized.exception.js b/node_modules/@nestjs/common/exceptions/unauthorized.exception.js deleted file mode 100644 index ccfbc03..0000000 --- a/node_modules/@nestjs/common/exceptions/unauthorized.exception.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UnauthorizedException = void 0; -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_exception_1 = require("./http.exception"); -/** - * Defines an HTTP exception for *Unauthorized* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -class UnauthorizedException extends http_exception_1.HttpException { - /** - * Instantiate an `UnauthorizedException` Exception. - * - * @example - * `throw new UnauthorizedException()` - * - * @usageNotes - * The HTTP response status code will be 401. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 401. - * - `message`: the string `'Unauthorized'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError, descriptionOrOptions = 'Unauthorized') { - const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); - super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.UNAUTHORIZED), http_status_enum_1.HttpStatus.UNAUTHORIZED, httpExceptionOptions); - } -} -exports.UnauthorizedException = UnauthorizedException; diff --git a/node_modules/@nestjs/common/exceptions/unprocessable-entity.exception.d.ts b/node_modules/@nestjs/common/exceptions/unprocessable-entity.exception.d.ts deleted file mode 100644 index 02e8129..0000000 --- a/node_modules/@nestjs/common/exceptions/unprocessable-entity.exception.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { HttpException, HttpExceptionOptions } from './http.exception'; -/** - * Defines an HTTP exception for *Unprocessable Entity* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -export declare class UnprocessableEntityException extends HttpException { - /** - * Instantiate an `UnprocessableEntityException` Exception. - * - * @example - * `throw new UnprocessableEntityException()` - * - * @usageNotes - * The HTTP response status code will be 422. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 422. - * - `message`: the string `'Unprocessable Entity'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError?: any, descriptionOrOptions?: string | HttpExceptionOptions); -} diff --git a/node_modules/@nestjs/common/exceptions/unprocessable-entity.exception.js b/node_modules/@nestjs/common/exceptions/unprocessable-entity.exception.js deleted file mode 100644 index c6713de..0000000 --- a/node_modules/@nestjs/common/exceptions/unprocessable-entity.exception.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UnprocessableEntityException = void 0; -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_exception_1 = require("./http.exception"); -/** - * Defines an HTTP exception for *Unprocessable Entity* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -class UnprocessableEntityException extends http_exception_1.HttpException { - /** - * Instantiate an `UnprocessableEntityException` Exception. - * - * @example - * `throw new UnprocessableEntityException()` - * - * @usageNotes - * The HTTP response status code will be 422. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 422. - * - `message`: the string `'Unprocessable Entity'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError, descriptionOrOptions = 'Unprocessable Entity') { - const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); - super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.UNPROCESSABLE_ENTITY), http_status_enum_1.HttpStatus.UNPROCESSABLE_ENTITY, httpExceptionOptions); - } -} -exports.UnprocessableEntityException = UnprocessableEntityException; diff --git a/node_modules/@nestjs/common/exceptions/unsupported-media-type.exception.d.ts b/node_modules/@nestjs/common/exceptions/unsupported-media-type.exception.d.ts deleted file mode 100644 index f9cd0c7..0000000 --- a/node_modules/@nestjs/common/exceptions/unsupported-media-type.exception.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { HttpException, HttpExceptionOptions } from './http.exception'; -/** - * Defines an HTTP exception for *Unsupported Media Type* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -export declare class UnsupportedMediaTypeException extends HttpException { - /** - * Instantiate an `UnsupportedMediaTypeException` Exception. - * - * @example - * `throw new UnsupportedMediaTypeException()` - * - * @usageNotes - * The HTTP response status code will be 415. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 415. - * - `message`: the string `'Unsupported Media Type'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError?: any, descriptionOrOptions?: string | HttpExceptionOptions); -} diff --git a/node_modules/@nestjs/common/exceptions/unsupported-media-type.exception.js b/node_modules/@nestjs/common/exceptions/unsupported-media-type.exception.js deleted file mode 100644 index e85e7fc..0000000 --- a/node_modules/@nestjs/common/exceptions/unsupported-media-type.exception.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UnsupportedMediaTypeException = void 0; -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_exception_1 = require("./http.exception"); -/** - * Defines an HTTP exception for *Unsupported Media Type* type errors. - * - * @see [Built-in HTTP exceptions](https://docs.nestjs.com/exception-filters#built-in-http-exceptions) - * - * @publicApi - */ -class UnsupportedMediaTypeException extends http_exception_1.HttpException { - /** - * Instantiate an `UnsupportedMediaTypeException` Exception. - * - * @example - * `throw new UnsupportedMediaTypeException()` - * - * @usageNotes - * The HTTP response status code will be 415. - * - The `objectOrError` argument defines the JSON response body or the message string. - * - The `descriptionOrOptions` argument contains either a short description of the HTTP error or an options object used to provide an underlying error cause. - * - * By default, the JSON response body contains two properties: - * - `statusCode`: this will be the value 415. - * - `message`: the string `'Unsupported Media Type'` by default; override this by supplying - * a string in the `objectOrError` parameter. - * - * If the parameter `objectOrError` is a string, the response body will contain an - * additional property, `error`, with a short description of the HTTP error. To override the - * entire JSON response body, pass an object instead. Nest will serialize the object - * and return it as the JSON response body. - * - * @param objectOrError string or object describing the error condition. - * @param descriptionOrOptions either a short description of the HTTP error or an options object used to provide an underlying error cause - */ - constructor(objectOrError, descriptionOrOptions = 'Unsupported Media Type') { - const { description, httpExceptionOptions } = http_exception_1.HttpException.extractDescriptionAndOptionsFrom(descriptionOrOptions); - super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.UNSUPPORTED_MEDIA_TYPE), http_status_enum_1.HttpStatus.UNSUPPORTED_MEDIA_TYPE, httpExceptionOptions); - } -} -exports.UnsupportedMediaTypeException = UnsupportedMediaTypeException; diff --git a/node_modules/@nestjs/common/file-stream/index.d.ts b/node_modules/@nestjs/common/file-stream/index.d.ts deleted file mode 100644 index 75a39ab..0000000 --- a/node_modules/@nestjs/common/file-stream/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './streamable-file'; diff --git a/node_modules/@nestjs/common/file-stream/index.js b/node_modules/@nestjs/common/file-stream/index.js deleted file mode 100644 index 4795e2c..0000000 --- a/node_modules/@nestjs/common/file-stream/index.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./streamable-file"), exports); diff --git a/node_modules/@nestjs/common/file-stream/interfaces/index.d.ts b/node_modules/@nestjs/common/file-stream/interfaces/index.d.ts deleted file mode 100644 index 9be413e..0000000 --- a/node_modules/@nestjs/common/file-stream/interfaces/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './streamable-options.interface'; -export * from './streamable-handler-response.interface'; diff --git a/node_modules/@nestjs/common/file-stream/interfaces/index.js b/node_modules/@nestjs/common/file-stream/interfaces/index.js deleted file mode 100644 index 5d18a94..0000000 --- a/node_modules/@nestjs/common/file-stream/interfaces/index.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./streamable-options.interface"), exports); -tslib_1.__exportStar(require("./streamable-handler-response.interface"), exports); diff --git a/node_modules/@nestjs/common/file-stream/interfaces/streamable-handler-response.interface.d.ts b/node_modules/@nestjs/common/file-stream/interfaces/streamable-handler-response.interface.d.ts deleted file mode 100644 index 36ad796..0000000 --- a/node_modules/@nestjs/common/file-stream/interfaces/streamable-handler-response.interface.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface StreamableHandlerResponse { - /** `true` if the connection is destroyed, `false` otherwise. */ - destroyed: boolean; - /** `true` if headers were sent, `false` otherwise. */ - headersSent: boolean; - /** The status code that will be sent to the client when the headers get flushed. */ - statusCode: number; - /** Sends the HTTP response. */ - send: (body: string) => void; - /** Signals to the server that all of the response headers and body have been sent. */ - end: () => void; -} diff --git a/node_modules/@nestjs/common/file-stream/interfaces/streamable-handler-response.interface.js b/node_modules/@nestjs/common/file-stream/interfaces/streamable-handler-response.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/file-stream/interfaces/streamable-handler-response.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/file-stream/interfaces/streamable-options.interface.d.ts b/node_modules/@nestjs/common/file-stream/interfaces/streamable-options.interface.d.ts deleted file mode 100644 index b5fc863..0000000 --- a/node_modules/@nestjs/common/file-stream/interfaces/streamable-options.interface.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Options for `StreamableFile` - * - * @see [Streaming files](https://docs.nestjs.com/techniques/streaming-files) - * - * @publicApi - */ -export interface StreamableFileOptions { - /** - * The value that will be used for the `Content-Type` response header. - * @default `"application/octet-stream"` - */ - type?: string; - /** - * The value that will be used for the `Content-Disposition` response header. - */ - disposition?: string | string[]; - /** - * The value that will be used for the `Content-Length` response header. - */ - length?: number; -} diff --git a/node_modules/@nestjs/common/file-stream/interfaces/streamable-options.interface.js b/node_modules/@nestjs/common/file-stream/interfaces/streamable-options.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/file-stream/interfaces/streamable-options.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/file-stream/streamable-file.d.ts b/node_modules/@nestjs/common/file-stream/streamable-file.d.ts deleted file mode 100644 index b385e7b..0000000 --- a/node_modules/@nestjs/common/file-stream/streamable-file.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Readable } from 'stream'; -import { Logger } from '../services'; -import { StreamableFileOptions, StreamableHandlerResponse } from './interfaces'; -/** - * @see [Streaming files](https://docs.nestjs.com/techniques/streaming-files) - * - * @publicApi - */ -export declare class StreamableFile { - readonly options: StreamableFileOptions; - private readonly stream; - protected logger: Logger; - protected handleError: (err: Error, response: StreamableHandlerResponse) => void; - protected logError: (err: Error) => void; - constructor(buffer: Uint8Array, options?: StreamableFileOptions); - constructor(readable: Readable, options?: StreamableFileOptions); - getStream(): Readable; - getHeaders(): { - type: string; - disposition: string | string[] | undefined; - length: number | undefined; - }; - get errorHandler(): (err: Error, response: StreamableHandlerResponse) => void; - setErrorHandler(handler: (err: Error, response: StreamableHandlerResponse) => void): this; - get errorLogger(): (err: Error) => void; - setErrorLogger(handler: (err: Error) => void): this; -} diff --git a/node_modules/@nestjs/common/file-stream/streamable-file.js b/node_modules/@nestjs/common/file-stream/streamable-file.js deleted file mode 100644 index 07cbf77..0000000 --- a/node_modules/@nestjs/common/file-stream/streamable-file.js +++ /dev/null @@ -1,68 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.StreamableFile = void 0; -const stream_1 = require("stream"); -const util_1 = require("util"); -const enums_1 = require("../enums"); -const services_1 = require("../services"); -const shared_utils_1 = require("../utils/shared.utils"); -/** - * @see [Streaming files](https://docs.nestjs.com/techniques/streaming-files) - * - * @publicApi - */ -class StreamableFile { - constructor(bufferOrReadStream, options = {}) { - this.options = options; - this.logger = new services_1.Logger('StreamableFile'); - this.handleError = (err, res) => { - if (res.destroyed) { - return; - } - if (res.headersSent) { - res.end(); - return; - } - res.statusCode = enums_1.HttpStatus.BAD_REQUEST; - res.send(err.message); - }; - this.logError = (err) => { - this.logger.error(err); - }; - if (util_1.types.isUint8Array(bufferOrReadStream)) { - this.stream = new stream_1.Readable(); - this.stream.push(bufferOrReadStream); - this.stream.push(null); - this.options.length ??= bufferOrReadStream.length; - } - else if (bufferOrReadStream.pipe && (0, shared_utils_1.isFunction)(bufferOrReadStream.pipe)) { - this.stream = bufferOrReadStream; - } - } - getStream() { - return this.stream; - } - getHeaders() { - const { type = 'application/octet-stream', disposition = undefined, length = undefined, } = this.options; - return { - type, - disposition, - length, - }; - } - get errorHandler() { - return this.handleError; - } - setErrorHandler(handler) { - this.handleError = handler; - return this; - } - get errorLogger() { - return this.logError; - } - setErrorLogger(handler) { - this.logError = handler; - return this; - } -} -exports.StreamableFile = StreamableFile; diff --git a/node_modules/@nestjs/common/index.d.ts b/node_modules/@nestjs/common/index.d.ts deleted file mode 100644 index 77ae696..0000000 --- a/node_modules/@nestjs/common/index.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import 'reflect-metadata'; -export * from './decorators'; -export * from './enums'; -export * from './exceptions'; -export * from './file-stream'; -export { Abstract, ArgumentMetadata, ArgumentsHost, BeforeApplicationShutdown, CallHandler, CanActivate, ClassProvider, ContextType, DynamicModule, ExceptionFilter, ExecutionContext, ExistingProvider, FactoryProvider, ForwardReference, HttpServer, HttpExceptionBody, HttpExceptionBodyMessage, HttpRedirectResponse, INestApplication, INestApplicationContext, INestMicroservice, InjectionToken, IntrospectionResult, MessageEvent, MiddlewareConsumer, ModuleMetadata, NestApplicationOptions, NestHybridApplicationOptions, NestInterceptor, NestMiddleware, NestModule, OnApplicationBootstrap, OnApplicationShutdown, OnModuleDestroy, OnModuleInit, OptionalFactoryDependency, Paramtype, PipeTransform, Provider, RawBodyRequest, RpcExceptionFilter, Scope, ScopeOptions, Type, ValidationError, ValueProvider, VersioningOptions, VERSION_NEUTRAL, WebSocketAdapter, WsExceptionFilter, WsMessageHandler, } from './interfaces'; -export * from './module-utils'; -export * from './pipes'; -export * from './serializer'; -export * from './services'; -export * from './utils'; diff --git a/node_modules/@nestjs/common/index.js b/node_modules/@nestjs/common/index.js deleted file mode 100644 index 498cf11..0000000 --- a/node_modules/@nestjs/common/index.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.VERSION_NEUTRAL = exports.Scope = void 0; -const tslib_1 = require("tslib"); -/* - * Nest @common - * Copyright(c) 2017 - 2025 Kamil Mysliwiec - * https://nestjs.com - * MIT Licensed - */ -require("reflect-metadata"); -tslib_1.__exportStar(require("./decorators"), exports); -tslib_1.__exportStar(require("./enums"), exports); -tslib_1.__exportStar(require("./exceptions"), exports); -tslib_1.__exportStar(require("./file-stream"), exports); -var interfaces_1 = require("./interfaces"); -Object.defineProperty(exports, "Scope", { enumerable: true, get: function () { return interfaces_1.Scope; } }); -Object.defineProperty(exports, "VERSION_NEUTRAL", { enumerable: true, get: function () { return interfaces_1.VERSION_NEUTRAL; } }); -tslib_1.__exportStar(require("./module-utils"), exports); -tslib_1.__exportStar(require("./pipes"), exports); -tslib_1.__exportStar(require("./serializer"), exports); -tslib_1.__exportStar(require("./services"), exports); -tslib_1.__exportStar(require("./utils"), exports); diff --git a/node_modules/@nestjs/common/interfaces/abstract.interface.d.ts b/node_modules/@nestjs/common/interfaces/abstract.interface.d.ts deleted file mode 100644 index be7a40b..0000000 --- a/node_modules/@nestjs/common/interfaces/abstract.interface.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface Abstract extends Function { - prototype: T; -} diff --git a/node_modules/@nestjs/common/interfaces/abstract.interface.js b/node_modules/@nestjs/common/interfaces/abstract.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/abstract.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/controllers/controller-metadata.interface.d.ts b/node_modules/@nestjs/common/interfaces/controllers/controller-metadata.interface.d.ts deleted file mode 100644 index b816bf9..0000000 --- a/node_modules/@nestjs/common/interfaces/controllers/controller-metadata.interface.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ControllerMetadata { - path?: string; -} diff --git a/node_modules/@nestjs/common/interfaces/controllers/controller-metadata.interface.js b/node_modules/@nestjs/common/interfaces/controllers/controller-metadata.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/controllers/controller-metadata.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/controllers/controller.interface.d.ts b/node_modules/@nestjs/common/interfaces/controllers/controller.interface.d.ts deleted file mode 100644 index b937a65..0000000 --- a/node_modules/@nestjs/common/interfaces/controllers/controller.interface.d.ts +++ /dev/null @@ -1 +0,0 @@ -export type Controller = object; diff --git a/node_modules/@nestjs/common/interfaces/controllers/controller.interface.js b/node_modules/@nestjs/common/interfaces/controllers/controller.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/controllers/controller.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/controllers/index.d.ts b/node_modules/@nestjs/common/interfaces/controllers/index.d.ts deleted file mode 100644 index 4bd6092..0000000 --- a/node_modules/@nestjs/common/interfaces/controllers/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './controller-metadata.interface'; -export * from './controller.interface'; diff --git a/node_modules/@nestjs/common/interfaces/controllers/index.js b/node_modules/@nestjs/common/interfaces/controllers/index.js deleted file mode 100644 index aa33c74..0000000 --- a/node_modules/@nestjs/common/interfaces/controllers/index.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./controller-metadata.interface"), exports); -tslib_1.__exportStar(require("./controller.interface"), exports); diff --git a/node_modules/@nestjs/common/interfaces/exceptions/exception-filter-metadata.interface.d.ts b/node_modules/@nestjs/common/interfaces/exceptions/exception-filter-metadata.interface.d.ts deleted file mode 100644 index 75700d5..0000000 --- a/node_modules/@nestjs/common/interfaces/exceptions/exception-filter-metadata.interface.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ExceptionFilter } from './exception-filter.interface'; -import { Type } from '../type.interface'; -export interface ExceptionFilterMetadata { - func: ExceptionFilter['catch']; - exceptionMetatypes: Type[]; -} diff --git a/node_modules/@nestjs/common/interfaces/exceptions/exception-filter-metadata.interface.js b/node_modules/@nestjs/common/interfaces/exceptions/exception-filter-metadata.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/exceptions/exception-filter-metadata.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/exceptions/exception-filter.interface.d.ts b/node_modules/@nestjs/common/interfaces/exceptions/exception-filter.interface.d.ts deleted file mode 100644 index e02baed..0000000 --- a/node_modules/@nestjs/common/interfaces/exceptions/exception-filter.interface.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ArgumentsHost } from '../features/arguments-host.interface'; -/** - * Interface describing implementation of an exception filter. - * - * @see [Exception Filters](https://docs.nestjs.com/exception-filters) - * - * @publicApi - */ -export interface ExceptionFilter { - /** - * Method to implement a custom exception filter. - * - * @param exception the class of the exception being handled - * @param host used to access an array of arguments for - * the in-flight request - */ - catch(exception: T, host: ArgumentsHost): any; -} diff --git a/node_modules/@nestjs/common/interfaces/exceptions/exception-filter.interface.js b/node_modules/@nestjs/common/interfaces/exceptions/exception-filter.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/exceptions/exception-filter.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/exceptions/index.d.ts b/node_modules/@nestjs/common/interfaces/exceptions/index.d.ts deleted file mode 100644 index f35002c..0000000 --- a/node_modules/@nestjs/common/interfaces/exceptions/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './exception-filter-metadata.interface'; -export * from './exception-filter.interface'; -export * from './rpc-exception-filter-metadata.interface'; -export * from './rpc-exception-filter.interface'; -export * from './ws-exception-filter.interface'; diff --git a/node_modules/@nestjs/common/interfaces/exceptions/index.js b/node_modules/@nestjs/common/interfaces/exceptions/index.js deleted file mode 100644 index 079791a..0000000 --- a/node_modules/@nestjs/common/interfaces/exceptions/index.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./exception-filter-metadata.interface"), exports); -tslib_1.__exportStar(require("./exception-filter.interface"), exports); -tslib_1.__exportStar(require("./rpc-exception-filter-metadata.interface"), exports); -tslib_1.__exportStar(require("./rpc-exception-filter.interface"), exports); -tslib_1.__exportStar(require("./ws-exception-filter.interface"), exports); diff --git a/node_modules/@nestjs/common/interfaces/exceptions/rpc-exception-filter-metadata.interface.d.ts b/node_modules/@nestjs/common/interfaces/exceptions/rpc-exception-filter-metadata.interface.d.ts deleted file mode 100644 index 8b17fb9..0000000 --- a/node_modules/@nestjs/common/interfaces/exceptions/rpc-exception-filter-metadata.interface.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RpcExceptionFilter } from './rpc-exception-filter.interface'; -import { Type } from '../type.interface'; -export interface RpcExceptionFilterMetadata { - func: RpcExceptionFilter['catch']; - exceptionMetatypes: Type[]; -} diff --git a/node_modules/@nestjs/common/interfaces/exceptions/rpc-exception-filter-metadata.interface.js b/node_modules/@nestjs/common/interfaces/exceptions/rpc-exception-filter-metadata.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/exceptions/rpc-exception-filter-metadata.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/exceptions/rpc-exception-filter.interface.d.ts b/node_modules/@nestjs/common/interfaces/exceptions/rpc-exception-filter.interface.d.ts deleted file mode 100644 index f14c8f9..0000000 --- a/node_modules/@nestjs/common/interfaces/exceptions/rpc-exception-filter.interface.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Observable } from 'rxjs'; -import { ArgumentsHost } from '../features/arguments-host.interface'; -/** - * Interface describing implementation of an RPC exception filter. - * - * @see [Exception Filters](https://docs.nestjs.com/microservices/exception-filters) - * - * @publicApi - */ -export interface RpcExceptionFilter { - /** - * Method to implement a custom (microservice) exception filter. - * - * @param exception the type (class) of the exception being handled - * @param host used to access an array of arguments for - * the in-flight message - */ - catch(exception: T, host: ArgumentsHost): Observable; -} diff --git a/node_modules/@nestjs/common/interfaces/exceptions/rpc-exception-filter.interface.js b/node_modules/@nestjs/common/interfaces/exceptions/rpc-exception-filter.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/exceptions/rpc-exception-filter.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/exceptions/ws-exception-filter.interface.d.ts b/node_modules/@nestjs/common/interfaces/exceptions/ws-exception-filter.interface.d.ts deleted file mode 100644 index f3de66f..0000000 --- a/node_modules/@nestjs/common/interfaces/exceptions/ws-exception-filter.interface.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ArgumentsHost } from '../features/arguments-host.interface'; -/** - * Interface describing implementation of a Web Sockets exception filter. - * - * @see [Exception Filters](https://docs.nestjs.com/websockets/exception-filters) - * - * @publicApi - */ -export interface WsExceptionFilter { - /** - * Method to implement a custom (web sockets) exception filter. - * - * @param exception the type (class) of the exception being handled - * @param host used to access an array of arguments for - * the in-flight message catch(exception: T, host: ArgumentsHost): any; - */ - catch(exception: T, host: ArgumentsHost): any; -} diff --git a/node_modules/@nestjs/common/interfaces/exceptions/ws-exception-filter.interface.js b/node_modules/@nestjs/common/interfaces/exceptions/ws-exception-filter.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/exceptions/ws-exception-filter.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/external/class-transform-options.interface.d.ts b/node_modules/@nestjs/common/interfaces/external/class-transform-options.interface.d.ts deleted file mode 100644 index a82df5d..0000000 --- a/node_modules/@nestjs/common/interfaces/external/class-transform-options.interface.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Options to be passed during transformation. - * - * @see https://github.com/typestack/class-transformer - * - * @publicApi - */ -export interface ClassTransformOptions { - /** - * Exclusion strategy. By default exposeAll is used, which means that it will expose all properties that - * are transformed by default. - */ - strategy?: 'excludeAll' | 'exposeAll'; - /** - * Only properties with given groups will be transformed. - */ - groups?: string[]; - /** - * Only properties with "since" > version < "until" will be transformed. - */ - version?: number; - /** - * Excludes properties with the given prefixes. For example, if you mark your private properties with "_" and "__" - * you can set this option's value to ["_", "__"] and all private properties will be skipped. - * This works only for "exposeAll" strategy. - */ - excludePrefixes?: string[]; - /** - * If set to true then class transformer will ignore all @Expose and @Exclude decorators and what's inside them. - * This option is useful if you want to "clone" your object but not apply decorators affects. - */ - ignoreDecorators?: boolean; - /** - * Target maps allows to set a Types of the transforming object without using @Type decorator. - * This is useful when you are transforming external classes, or if you already have type metadata for - * objects and you don't want to set it up again. - */ - targetMaps?: any[]; - /** - * If set to true then class transformer will perform a circular check. (Circular check is turned off by default) - * This option is useful when you know for sure that your types might have a circular dependency. - */ - enableCircularCheck?: boolean; - /** - * If set to true class-transformer will attempt conversion based on TS reflected type - */ - enableImplicitConversion?: boolean; - /** - * If set to true class-transformer will exclude properties which are not part of the original class - * and exposing all class properties (with undefined, if nothing else is given) - */ - excludeExtraneousValues?: boolean; - /** - * If set to true then class transformer will take default values for unprovided fields. - * This is useful when you convert a plain object to a class and have an optional field with a default value. - */ - exposeDefaultValues?: boolean; - /** - * When set to true, fields with `undefined` as value will be included in class to plain transformation. Otherwise - * those fields will be omitted from the result. - * - * DEFAULT: `true` - */ - exposeUnsetFields?: boolean; -} diff --git a/node_modules/@nestjs/common/interfaces/external/class-transform-options.interface.js b/node_modules/@nestjs/common/interfaces/external/class-transform-options.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/external/class-transform-options.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/external/cors-options.interface.d.ts b/node_modules/@nestjs/common/interfaces/external/cors-options.interface.d.ts deleted file mode 100644 index 76b27d6..0000000 --- a/node_modules/@nestjs/common/interfaces/external/cors-options.interface.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -type StaticOrigin = boolean | string | RegExp | (string | RegExp)[]; -/** - * Set origin to a function implementing some custom logic. The function takes the - * request origin as the first parameter and a callback (which expects the signature - * err [object], allow [bool]) as the second. - * - * @see https://github.com/expressjs/cors - * - * @publicApi - */ -export type CustomOrigin = (requestOrigin: string | undefined, callback: (err: Error | null, origin?: StaticOrigin) => void) => void; -/** - * Interface describing CORS options that can be set. - * - * @see https://github.com/expressjs/cors - * @publicApi - */ -export interface CorsOptions { - /** - * Configures the `Access-Control-Allow-Origins` CORS header. See [here for more detail.](https://github.com/expressjs/cors#configuration-options) - */ - origin?: StaticOrigin | CustomOrigin; - /** - * Configures the Access-Control-Allow-Methods CORS header. - */ - methods?: string | string[]; - /** - * Configures the Access-Control-Allow-Headers CORS header. - */ - allowedHeaders?: string | string[]; - /** - * Configures the Access-Control-Expose-Headers CORS header. - */ - exposedHeaders?: string | string[]; - /** - * Configures the Access-Control-Allow-Credentials CORS header. - */ - credentials?: boolean; - /** - * Configures the Access-Control-Max-Age CORS header. - */ - maxAge?: number; - /** - * Whether to pass the CORS preflight response to the next handler. - */ - preflightContinue?: boolean; - /** - * Provides a status code to use for successful OPTIONS requests. - */ - optionsSuccessStatus?: number; -} -export interface CorsOptionsCallback { - (error: Error | null, options: CorsOptions): void; -} -export interface CorsOptionsDelegate { - (req: T, cb: CorsOptionsCallback): void; -} -export {}; diff --git a/node_modules/@nestjs/common/interfaces/external/cors-options.interface.js b/node_modules/@nestjs/common/interfaces/external/cors-options.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/external/cors-options.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/external/https-options.interface.d.ts b/node_modules/@nestjs/common/interfaces/external/https-options.interface.d.ts deleted file mode 100644 index fbb6ab6..0000000 --- a/node_modules/@nestjs/common/interfaces/external/https-options.interface.d.ts +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Interface describing Https Options that can be set. - * - * @see https://nodejs.org/api/tls.html - * - * @publicApi - */ -export interface HttpsOptions { - /** - * PFX or PKCS12 encoded private key and certificate chain. pfx is an alternative - * to providing key and cert individually. PFX is usually encrypted, if it is, - * passphrase will be used to decrypt it. Multiple PFX can be provided either - * as an array of unencrypted PFX buffers, or an array of objects in the form - * {buf: [, passphrase: ]}. The object form can only - * occur in an array. object.passphrase is optional. Encrypted PFX will be decrypted - * with object.passphrase if provided, or options.passphrase if it is not. - */ - pfx?: any; - /** - * Private keys in PEM format. PEM allows the option of private keys being encrypted. - * Encrypted keys will be decrypted with options.passphrase. Multiple keys using - * different algorithms can be provided either as an array of unencrypted key - * strings or buffers, or an array of objects in the form {pem: [, passphrase: ]}. - * The object form can only occur in an array. object.passphrase is optional. - * Encrypted keys will be decrypted with object.passphrase if provided, or options.passphrase - * if it is not - */ - key?: any; - /** - * Shared passphrase used for a single private key and/or a PFX. - */ - passphrase?: string; - /** - * Cert chains in PEM format. One cert chain should be provided per private key. - * Each cert chain should consist of the PEM formatted certificate for a provided - * private key, followed by the PEM formatted intermediate certificates (if any), - * in order, and not including the root CA (the root CA must be pre-known to the - * peer, see ca). When providing multiple cert chains, they do not have to be - * in the same order as their private keys in key. If the intermediate certificates - * are not provided, the peer will not be able to validate the certificate, and - * the handshake will fail. - */ - cert?: any; - /** - * Optionally override the trusted CA certificates. Default is to trust the well-known - * CAs curated by Mozilla. Mozilla's CAs are completely replaced when CAs are - * explicitly specified using this option. The value can be a string or Buffer, - * or an Array of strings and/or Buffers. Any string or Buffer can contain multiple - * PEM CAs concatenated together. The peer's certificate must be chainable to - * a CA trusted by the server for the connection to be authenticated. When using - * certificates that are not chainable to a well-known CA, the certificate's CA - * must be explicitly specified as a trusted or the connection will fail to authenticate. - * If the peer uses a certificate that doesn't match or chain to one of the default - * CAs, use the ca option to provide a CA certificate that the peer's certificate - * can match or chain to. For self-signed certificates, the certificate is its - * own CA, and must be provided. For PEM encoded certificates, supported types - * are "TRUSTED CERTIFICATE", "X509 CERTIFICATE", and "CERTIFICATE". See also tls.rootCertificates. - */ - ca?: any; - /** - * PEM formatted CRLs (Certificate Revocation Lists). - */ - crl?: any; - /** - * Cipher suite specification, replacing the default. For more information, see - * modifying the default cipher suite. Permitted ciphers can be obtained via tls.getCiphers(). - * Cipher names must be uppercased in order for OpenSSL to accept them. - */ - ciphers?: string; - /** - * Attempt to use the server's cipher suite preferences instead of the client's. - * When true, causes SSL_OP_CIPHER_SERVER_PREFERENCE to be set in secureOptions, - * see OpenSSL Options for more information. - */ - honorCipherOrder?: boolean; - /** - * If true the server will request a certificate from clients that connect and - * attempt to verify that certificate. Default: false. - */ - requestCert?: boolean; - /** - * If not false the server will reject any connection which is not authorized - * with the list of supplied CAs. This option only has an effect if requestCert is true. Default: true - */ - rejectUnauthorized?: boolean; - /** - * An array or Buffer of possible NPN protocols. (Protocols should be ordered - * by their priority). - */ - NPNProtocols?: any; - /** - * A function that will be called if the client supports SNI TLS extension. Two - * arguments will be passed when called: servername and cb. SNICallback should - * invoke cb(null, ctx), where ctx is a SecureContext instance. (tls.createSecureContext(...) - * can be used to get a proper SecureContext.) If SNICallback wasn't provided - * the default callback with high-level API will be used. - */ - SNICallback?: (servername: string, cb: (err: Error, ctx: any) => any) => any; - /** - * Optionally affect the OpenSSL protocol behavior, which is not usually necessary. - * This should be used carefully if at all! Value is a numeric bitmask of the SSL_OP_* options - * from OpenSSL Options. - */ - secureOptions?: number; -} diff --git a/node_modules/@nestjs/common/interfaces/external/https-options.interface.js b/node_modules/@nestjs/common/interfaces/external/https-options.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/external/https-options.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/external/transformer-package.interface.d.ts b/node_modules/@nestjs/common/interfaces/external/transformer-package.interface.d.ts deleted file mode 100644 index 1222e9f..0000000 --- a/node_modules/@nestjs/common/interfaces/external/transformer-package.interface.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Type } from '../type.interface'; -import { ClassTransformOptions } from './class-transform-options.interface'; -export interface TransformerPackage { - plainToInstance(cls: Type, plain: unknown, options?: ClassTransformOptions): T | T[]; - classToPlain(object: unknown, options?: ClassTransformOptions): Record | Record[]; -} diff --git a/node_modules/@nestjs/common/interfaces/external/transformer-package.interface.js b/node_modules/@nestjs/common/interfaces/external/transformer-package.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/external/transformer-package.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/external/validation-error.interface.d.ts b/node_modules/@nestjs/common/interfaces/external/validation-error.interface.d.ts deleted file mode 100644 index 30d38df..0000000 --- a/node_modules/@nestjs/common/interfaces/external/validation-error.interface.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Validation error description. - * @see https://github.com/typestack/class-validator - * - * class-validator@0.13.0 - * - * @publicApi - */ -export interface ValidationError { - /** - * Object that was validated. - * - * OPTIONAL - configurable via the ValidatorOptions.validationError.target option - */ - target?: Record; - /** - * Object's property that hasn't passed validation. - */ - property: string; - /** - * Value that haven't pass a validation. - * - * OPTIONAL - configurable via the ValidatorOptions.validationError.value option - */ - value?: any; - /** - * Constraints that failed validation with error messages. - */ - constraints?: { - [type: string]: string; - }; - /** - * Contains all nested validation errors of the property. - */ - children?: ValidationError[]; - /** - * A transient set of data passed through to the validation result for response mapping - */ - contexts?: { - [type: string]: any; - }; -} diff --git a/node_modules/@nestjs/common/interfaces/external/validation-error.interface.js b/node_modules/@nestjs/common/interfaces/external/validation-error.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/external/validation-error.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/external/validator-options.interface.d.ts b/node_modules/@nestjs/common/interfaces/external/validator-options.interface.d.ts deleted file mode 100644 index 0a5396a..0000000 --- a/node_modules/@nestjs/common/interfaces/external/validator-options.interface.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Options passed to validator during validation. - * @see https://github.com/typestack/class-validator - * - * class-validator@0.13.0 - * - * @publicApi - */ -export interface ValidatorOptions { - /** - * If set to true then class-validator will print extra warning messages to the console when something is not right. - */ - enableDebugMessages?: boolean; - /** - * If set to true then validator will skip validation of all properties that are undefined in the validating object. - */ - skipUndefinedProperties?: boolean; - /** - * If set to true then validator will skip validation of all properties that are null in the validating object. - */ - skipNullProperties?: boolean; - /** - * If set to true then validator will skip validation of all properties that are null or undefined in the validating object. - */ - skipMissingProperties?: boolean; - /** - * If set to true validator will strip validated object of any properties that do not have any decorators. - * - * Tip: if no other decorator is suitable for your property use @Allow decorator. - */ - whitelist?: boolean; - /** - * If set to true, instead of stripping non-whitelisted properties validator will throw an error - */ - forbidNonWhitelisted?: boolean; - /** - * Groups to be used during validation of the object. - */ - groups?: string[]; - /** - * Set default for `always` option of decorators. Default can be overridden in decorator options. - */ - always?: boolean; - /** - * If [groups]{@link ValidatorOptions#groups} is not given or is empty, - * ignore decorators with at least one group. - */ - strictGroups?: boolean; - /** - * If set to true, the validation will not use default messages. - * Error message always will be undefined if its not explicitly set. - */ - dismissDefaultMessages?: boolean; - /** - * ValidationError special options. - */ - validationError?: { - /** - * Indicates if target should be exposed in ValidationError. - */ - target?: boolean; - /** - * Indicates if validated value should be exposed in ValidationError. - */ - value?: boolean; - }; - /** - * Settings true will cause fail validation of unknown objects. - */ - forbidUnknownValues?: boolean; - /** - * When set to true, validation of the given property will stop after encountering the first error. - * This is enabled by default. - */ - stopAtFirstError?: boolean; -} diff --git a/node_modules/@nestjs/common/interfaces/external/validator-options.interface.js b/node_modules/@nestjs/common/interfaces/external/validator-options.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/external/validator-options.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/external/validator-package.interface.d.ts b/node_modules/@nestjs/common/interfaces/external/validator-package.interface.d.ts deleted file mode 100644 index 7a83d60..0000000 --- a/node_modules/@nestjs/common/interfaces/external/validator-package.interface.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ValidationError } from './validation-error.interface'; -import { ValidatorOptions } from './validator-options.interface'; -export interface ValidatorPackage { - validate(object: unknown, validatorOptions?: ValidatorOptions): ValidationError[] | Promise; -} diff --git a/node_modules/@nestjs/common/interfaces/external/validator-package.interface.js b/node_modules/@nestjs/common/interfaces/external/validator-package.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/external/validator-package.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/features/arguments-host.interface.d.ts b/node_modules/@nestjs/common/interfaces/features/arguments-host.interface.d.ts deleted file mode 100644 index 112fc0b..0000000 --- a/node_modules/@nestjs/common/interfaces/features/arguments-host.interface.d.ts +++ /dev/null @@ -1,88 +0,0 @@ -export type ContextType = 'http' | 'ws' | 'rpc'; -/** - * Methods to obtain request and response objects. - * - * @publicApi - */ -export interface HttpArgumentsHost { - /** - * Returns the in-flight `request` object. - */ - getRequest(): T; - /** - * Returns the in-flight `response` object. - */ - getResponse(): T; - getNext(): T; -} -/** - * Methods to obtain WebSocket data and client objects. - * - * @publicApi - */ -export interface WsArgumentsHost { - /** - * Returns the data object. - */ - getData(): T; - /** - * Returns the client object. - */ - getClient(): T; - /** - * Returns the pattern for the event - */ - getPattern(): string; -} -/** - * Methods to obtain RPC data object. - * - * @publicApi - */ -export interface RpcArgumentsHost { - /** - * Returns the data object. - */ - getData(): T; - /** - * Returns the context object. - */ - getContext(): T; -} -/** - * Provides methods for retrieving the arguments being passed to a handler. - * Allows choosing the appropriate execution context (e.g., Http, RPC, or - * WebSockets) to retrieve the arguments from. - * - * @publicApi - */ -export interface ArgumentsHost { - /** - * Returns the array of arguments being passed to the handler. - */ - getArgs = any[]>(): T; - /** - * Returns a particular argument by index. - * @param index index of argument to retrieve - */ - getArgByIndex(index: number): T; - /** - * Switch context to RPC. - * @returns interface with methods to retrieve RPC arguments - */ - switchToRpc(): RpcArgumentsHost; - /** - * Switch context to HTTP. - * @returns interface with methods to retrieve HTTP arguments - */ - switchToHttp(): HttpArgumentsHost; - /** - * Switch context to WebSockets. - * @returns interface with methods to retrieve WebSockets arguments - */ - switchToWs(): WsArgumentsHost; - /** - * Returns the current execution context type (string) - */ - getType(): TContext; -} diff --git a/node_modules/@nestjs/common/interfaces/features/arguments-host.interface.js b/node_modules/@nestjs/common/interfaces/features/arguments-host.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/features/arguments-host.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/features/can-activate.interface.d.ts b/node_modules/@nestjs/common/interfaces/features/can-activate.interface.d.ts deleted file mode 100644 index 722dee7..0000000 --- a/node_modules/@nestjs/common/interfaces/features/can-activate.interface.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Observable } from 'rxjs'; -import { ExecutionContext } from './execution-context.interface'; -/** - * Interface defining the `canActivate()` function that must be implemented - * by a guard. Return value indicates whether or not the current request is - * allowed to proceed. Return can be either synchronous (`boolean`) - * or asynchronous (`Promise` or `Observable`). - * - * @see [Guards](https://docs.nestjs.com/guards) - * - * @publicApi - */ -export interface CanActivate { - /** - * @param context Current execution context. Provides access to details about - * the current request pipeline. - * - * @returns Value indicating whether or not the current request is allowed to - * proceed. - */ - canActivate(context: ExecutionContext): boolean | Promise | Observable; -} diff --git a/node_modules/@nestjs/common/interfaces/features/can-activate.interface.js b/node_modules/@nestjs/common/interfaces/features/can-activate.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/features/can-activate.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/features/custom-route-param-factory.interface.d.ts b/node_modules/@nestjs/common/interfaces/features/custom-route-param-factory.interface.d.ts deleted file mode 100644 index cde0838..0000000 --- a/node_modules/@nestjs/common/interfaces/features/custom-route-param-factory.interface.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ExecutionContext } from './execution-context.interface'; -/** - * @publicApi - */ -export type CustomParamFactory = (data: TData, context: ExecutionContext) => TOutput; diff --git a/node_modules/@nestjs/common/interfaces/features/custom-route-param-factory.interface.js b/node_modules/@nestjs/common/interfaces/features/custom-route-param-factory.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/features/custom-route-param-factory.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/features/execution-context.interface.d.ts b/node_modules/@nestjs/common/interfaces/features/execution-context.interface.d.ts deleted file mode 100644 index 22051e8..0000000 --- a/node_modules/@nestjs/common/interfaces/features/execution-context.interface.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Type } from '../index'; -import { ArgumentsHost } from './arguments-host.interface'; -/** - * Interface describing details about the current request pipeline. - * - * @see [Execution Context](https://docs.nestjs.com/guards#execution-context) - * - * @publicApi - */ -export interface ExecutionContext extends ArgumentsHost { - /** - * Returns the *type* of the controller class which the current handler belongs to. - */ - getClass(): Type; - /** - * Returns a reference to the handler (method) that will be invoked next in the - * request pipeline. - */ - getHandler(): Function; -} diff --git a/node_modules/@nestjs/common/interfaces/features/execution-context.interface.js b/node_modules/@nestjs/common/interfaces/features/execution-context.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/features/execution-context.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/features/nest-interceptor.interface.d.ts b/node_modules/@nestjs/common/interfaces/features/nest-interceptor.interface.d.ts deleted file mode 100644 index 9400939..0000000 --- a/node_modules/@nestjs/common/interfaces/features/nest-interceptor.interface.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Observable } from 'rxjs'; -import { ExecutionContext } from './execution-context.interface'; -/** - * Interface providing access to the response stream. - * - * @see [Interceptors](https://docs.nestjs.com/interceptors) - * - * @publicApi - */ -export interface CallHandler { - /** - * Returns an `Observable` representing the response stream from the route - * handler. - */ - handle(): Observable; -} -/** - * Interface describing implementation of an interceptor. - * - * @see [Interceptors](https://docs.nestjs.com/interceptors) - * - * @publicApi - */ -export interface NestInterceptor { - /** - * Method to implement a custom interceptor. - * - * @param context an `ExecutionContext` object providing methods to access the - * route handler and class about to be invoked. - * @param next a reference to the `CallHandler`, which provides access to an - * `Observable` representing the response stream from the route handler. - */ - intercept(context: ExecutionContext, next: CallHandler): Observable | Promise>; -} diff --git a/node_modules/@nestjs/common/interfaces/features/nest-interceptor.interface.js b/node_modules/@nestjs/common/interfaces/features/nest-interceptor.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/features/nest-interceptor.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/features/paramtype.interface.d.ts b/node_modules/@nestjs/common/interfaces/features/paramtype.interface.d.ts deleted file mode 100644 index a63184f..0000000 --- a/node_modules/@nestjs/common/interfaces/features/paramtype.interface.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * @publicApi - */ -export type Paramtype = 'body' | 'query' | 'param' | 'custom'; diff --git a/node_modules/@nestjs/common/interfaces/features/paramtype.interface.js b/node_modules/@nestjs/common/interfaces/features/paramtype.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/features/paramtype.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/features/pipe-transform.interface.d.ts b/node_modules/@nestjs/common/interfaces/features/pipe-transform.interface.d.ts deleted file mode 100644 index 6efa44d..0000000 --- a/node_modules/@nestjs/common/interfaces/features/pipe-transform.interface.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Type } from '../type.interface'; -import { Paramtype } from './paramtype.interface'; -export type Transform = (value: T, metadata: ArgumentMetadata) => any; -/** - * Interface describing a pipe implementation's `transform()` method metadata argument. - * - * @see [Pipes](https://docs.nestjs.com/pipes) - * - * @publicApi - */ -export interface ArgumentMetadata { - /** - * Indicates whether argument is a body, query, param, or custom parameter - */ - readonly type: Paramtype; - /** - * Underlying base type (e.g., `String`) of the parameter, based on the type - * definition in the route handler. - */ - readonly metatype?: Type | undefined; - /** - * String passed as an argument to the decorator. - * Example: `@Body('userId')` would yield `userId` - */ - readonly data?: string | undefined; -} -/** - * Interface describing implementation of a pipe. - * - * @see [Pipes](https://docs.nestjs.com/pipes) - * - * @publicApi - */ -export interface PipeTransform { - /** - * Method to implement a custom pipe. Called with two parameters - * - * @param value argument before it is received by route handler method - * @param metadata contains metadata about the value - */ - transform(value: T, metadata: ArgumentMetadata): R; -} diff --git a/node_modules/@nestjs/common/interfaces/features/pipe-transform.interface.js b/node_modules/@nestjs/common/interfaces/features/pipe-transform.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/features/pipe-transform.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/global-prefix-options.interface.d.ts b/node_modules/@nestjs/common/interfaces/global-prefix-options.interface.d.ts deleted file mode 100644 index 5de362d..0000000 --- a/node_modules/@nestjs/common/interfaces/global-prefix-options.interface.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { RouteInfo } from './middleware'; -/** - * @publicApi - */ -export interface GlobalPrefixOptions { - exclude?: T[]; -} diff --git a/node_modules/@nestjs/common/interfaces/global-prefix-options.interface.js b/node_modules/@nestjs/common/interfaces/global-prefix-options.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/global-prefix-options.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/hooks/before-application-shutdown.interface.d.ts b/node_modules/@nestjs/common/interfaces/hooks/before-application-shutdown.interface.d.ts deleted file mode 100644 index 4024cb5..0000000 --- a/node_modules/@nestjs/common/interfaces/hooks/before-application-shutdown.interface.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface BeforeApplicationShutdown { - beforeApplicationShutdown(signal?: string): any; -} diff --git a/node_modules/@nestjs/common/interfaces/hooks/before-application-shutdown.interface.js b/node_modules/@nestjs/common/interfaces/hooks/before-application-shutdown.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/hooks/before-application-shutdown.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/hooks/index.d.ts b/node_modules/@nestjs/common/interfaces/hooks/index.d.ts deleted file mode 100644 index 01aad24..0000000 --- a/node_modules/@nestjs/common/interfaces/hooks/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './before-application-shutdown.interface'; -export * from './on-application-bootstrap.interface'; -export * from './on-application-shutdown.interface'; -export * from './on-destroy.interface'; -export * from './on-init.interface'; diff --git a/node_modules/@nestjs/common/interfaces/hooks/index.js b/node_modules/@nestjs/common/interfaces/hooks/index.js deleted file mode 100644 index 547b6f5..0000000 --- a/node_modules/@nestjs/common/interfaces/hooks/index.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./before-application-shutdown.interface"), exports); -tslib_1.__exportStar(require("./on-application-bootstrap.interface"), exports); -tslib_1.__exportStar(require("./on-application-shutdown.interface"), exports); -tslib_1.__exportStar(require("./on-destroy.interface"), exports); -tslib_1.__exportStar(require("./on-init.interface"), exports); diff --git a/node_modules/@nestjs/common/interfaces/hooks/on-application-bootstrap.interface.d.ts b/node_modules/@nestjs/common/interfaces/hooks/on-application-bootstrap.interface.d.ts deleted file mode 100644 index 5e1f523..0000000 --- a/node_modules/@nestjs/common/interfaces/hooks/on-application-bootstrap.interface.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Interface defining method called once the application has fully started and - * is bootstrapped. - * - * @see [Lifecycle Events](https://docs.nestjs.com/fundamentals/lifecycle-events) - * - * @publicApi - */ -export interface OnApplicationBootstrap { - onApplicationBootstrap(): any; -} diff --git a/node_modules/@nestjs/common/interfaces/hooks/on-application-bootstrap.interface.js b/node_modules/@nestjs/common/interfaces/hooks/on-application-bootstrap.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/hooks/on-application-bootstrap.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/hooks/on-application-shutdown.interface.d.ts b/node_modules/@nestjs/common/interfaces/hooks/on-application-shutdown.interface.d.ts deleted file mode 100644 index cdace1c..0000000 --- a/node_modules/@nestjs/common/interfaces/hooks/on-application-shutdown.interface.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Interface defining method to respond to system signals (when application gets - * shutdown by, e.g., SIGTERM) - * - * @see [Lifecycle Events](https://docs.nestjs.com/fundamentals/lifecycle-events) - * - * @publicApi - */ -export interface OnApplicationShutdown { - onApplicationShutdown(signal?: string): any; -} diff --git a/node_modules/@nestjs/common/interfaces/hooks/on-application-shutdown.interface.js b/node_modules/@nestjs/common/interfaces/hooks/on-application-shutdown.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/hooks/on-application-shutdown.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/hooks/on-destroy.interface.d.ts b/node_modules/@nestjs/common/interfaces/hooks/on-destroy.interface.d.ts deleted file mode 100644 index ad235a9..0000000 --- a/node_modules/@nestjs/common/interfaces/hooks/on-destroy.interface.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Interface defining method called just before Nest destroys the host module - * (`app.close()` method has been evaluated). Use to perform cleanup on - * resources (e.g., Database connections). - * - * @see [Lifecycle Events](https://docs.nestjs.com/fundamentals/lifecycle-events) - * - * @publicApi - */ -export interface OnModuleDestroy { - onModuleDestroy(): any; -} diff --git a/node_modules/@nestjs/common/interfaces/hooks/on-destroy.interface.js b/node_modules/@nestjs/common/interfaces/hooks/on-destroy.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/hooks/on-destroy.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/hooks/on-init.interface.d.ts b/node_modules/@nestjs/common/interfaces/hooks/on-init.interface.d.ts deleted file mode 100644 index 595d819..0000000 --- a/node_modules/@nestjs/common/interfaces/hooks/on-init.interface.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Interface defining method called once the host module has been initialized. - * - * @see [Lifecycle Events](https://docs.nestjs.com/fundamentals/lifecycle-events) - * - * @publicApi - */ -export interface OnModuleInit { - onModuleInit(): any; -} diff --git a/node_modules/@nestjs/common/interfaces/hooks/on-init.interface.js b/node_modules/@nestjs/common/interfaces/hooks/on-init.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/hooks/on-init.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/http/http-exception-body.interface.d.ts b/node_modules/@nestjs/common/interfaces/http/http-exception-body.interface.d.ts deleted file mode 100644 index 85a829b..0000000 --- a/node_modules/@nestjs/common/interfaces/http/http-exception-body.interface.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type HttpExceptionBodyMessage = string | string[] | number; -export interface HttpExceptionBody { - message: HttpExceptionBodyMessage; - error?: string; - statusCode: number; -} diff --git a/node_modules/@nestjs/common/interfaces/http/http-exception-body.interface.js b/node_modules/@nestjs/common/interfaces/http/http-exception-body.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/http/http-exception-body.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/http/http-redirect-response.interface.d.ts b/node_modules/@nestjs/common/interfaces/http/http-redirect-response.interface.d.ts deleted file mode 100644 index 8eb2508..0000000 --- a/node_modules/@nestjs/common/interfaces/http/http-redirect-response.interface.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { HttpStatus } from '../../enums'; -export interface HttpRedirectResponse { - url: string; - statusCode: HttpStatus; -} diff --git a/node_modules/@nestjs/common/interfaces/http/http-redirect-response.interface.js b/node_modules/@nestjs/common/interfaces/http/http-redirect-response.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/http/http-redirect-response.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/http/http-server.interface.d.ts b/node_modules/@nestjs/common/interfaces/http/http-server.interface.d.ts deleted file mode 100644 index fc06b80..0000000 --- a/node_modules/@nestjs/common/interfaces/http/http-server.interface.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { RequestMethod } from '../../enums'; -import { NestApplicationOptions } from '../../interfaces/nest-application-options.interface'; -import { VersionValue, VersioningOptions } from '../version-options.interface'; -export type ErrorHandler = (error: any, req: TRequest, res: TResponse, next?: Function) => any; -export type RequestHandler = (req: TRequest, res: TResponse, next?: Function) => any; -export interface HttpServer { - use(handler: RequestHandler | ErrorHandler): any; - use(path: string, handler: RequestHandler | ErrorHandler): any; - useBodyParser?(...args: any[]): any; - get(handler: RequestHandler): any; - get(path: string, handler: RequestHandler): any; - post(handler: RequestHandler): any; - post(path: string, handler: RequestHandler): any; - head(handler: RequestHandler): any; - head(path: string, handler: RequestHandler): any; - delete(handler: RequestHandler): any; - delete(path: string, handler: RequestHandler): any; - put(handler: RequestHandler): any; - put(path: string, handler: RequestHandler): any; - patch(handler: RequestHandler): any; - patch(path: string, handler: RequestHandler): any; - propfind?(handler: RequestHandler): any; - propfind?(path: string, handler: RequestHandler): any; - proppatch?(handler: RequestHandler): any; - proppatch?(path: string, handler: RequestHandler): any; - mkcol?(handler: RequestHandler): any; - mkcol?(path: string, handler: RequestHandler): any; - copy?(handler: RequestHandler): any; - copy?(path: string, handler: RequestHandler): any; - move?(handler: RequestHandler): any; - move?(path: string, handler: RequestHandler): any; - lock?(handler: RequestHandler): any; - lock?(path: string, handler: RequestHandler): any; - unlock?(handler: RequestHandler): any; - unlock?(path: string, handler: RequestHandler): any; - all(path: string, handler: RequestHandler): any; - all(handler: RequestHandler): any; - options(handler: RequestHandler): any; - options(path: string, handler: RequestHandler): any; - search?(handler: RequestHandler): any; - search?(path: string, handler: RequestHandler): any; - listen(port: number | string, callback?: () => void): any; - listen(port: number | string, hostname: string, callback?: () => void): any; - reply(response: any, body: any, statusCode?: number): any; - status(response: any, statusCode: number): any; - end(response: any, message?: string): any; - render(response: any, view: string, options: any): any; - redirect(response: any, statusCode: number, url: string): any; - isHeadersSent(response: any): boolean; - setHeader(response: any, name: string, value: string): any; - setErrorHandler?(handler: Function, prefix?: string): any; - setNotFoundHandler?(handler: Function, prefix?: string): any; - useStaticAssets?(...args: any[]): this; - setBaseViewsDir?(path: string | string[]): this; - setViewEngine?(engineOrOptions: any): this; - createMiddlewareFactory(method: RequestMethod): ((path: string, callback: Function) => any) | Promise<(path: string, callback: Function) => any>; - getRequestHostname?(request: TRequest): string; - getRequestMethod?(request: TRequest): string; - getRequestUrl?(request: TRequest): string; - getInstance(): ServerInstance; - registerParserMiddleware(...args: any[]): any; - enableCors(options: any): any; - getHttpServer(): any; - initHttpServer(options: NestApplicationOptions): void; - close(): any; - getType(): string; - init?(): Promise; - applyVersionFilter(handler: Function, version: VersionValue, versioningOptions: VersioningOptions): (req: TRequest, res: TResponse, next: () => void) => Function; - normalizePath?(path: string): string; -} diff --git a/node_modules/@nestjs/common/interfaces/http/http-server.interface.js b/node_modules/@nestjs/common/interfaces/http/http-server.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/http/http-server.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/http/index.d.ts b/node_modules/@nestjs/common/interfaces/http/index.d.ts deleted file mode 100644 index ad8ebfc..0000000 --- a/node_modules/@nestjs/common/interfaces/http/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './http-exception-body.interface'; -export * from './http-redirect-response.interface'; -export * from './http-server.interface'; -export * from './message-event.interface'; -export * from './raw-body-request.interface'; diff --git a/node_modules/@nestjs/common/interfaces/http/index.js b/node_modules/@nestjs/common/interfaces/http/index.js deleted file mode 100644 index 22af770..0000000 --- a/node_modules/@nestjs/common/interfaces/http/index.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./http-exception-body.interface"), exports); -tslib_1.__exportStar(require("./http-redirect-response.interface"), exports); -tslib_1.__exportStar(require("./http-server.interface"), exports); -tslib_1.__exportStar(require("./message-event.interface"), exports); -tslib_1.__exportStar(require("./raw-body-request.interface"), exports); diff --git a/node_modules/@nestjs/common/interfaces/http/message-event.interface.d.ts b/node_modules/@nestjs/common/interfaces/http/message-event.interface.d.ts deleted file mode 100644 index 530a4d9..0000000 --- a/node_modules/@nestjs/common/interfaces/http/message-event.interface.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface MessageEvent { - data: string | object; - id?: string; - type?: string; - retry?: number; -} diff --git a/node_modules/@nestjs/common/interfaces/http/message-event.interface.js b/node_modules/@nestjs/common/interfaces/http/message-event.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/http/message-event.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/http/raw-body-request.interface.d.ts b/node_modules/@nestjs/common/interfaces/http/raw-body-request.interface.d.ts deleted file mode 100644 index 5537aee..0000000 --- a/node_modules/@nestjs/common/interfaces/http/raw-body-request.interface.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @publicApi - */ -export type RawBodyRequest = T & { - rawBody?: Buffer; -}; diff --git a/node_modules/@nestjs/common/interfaces/http/raw-body-request.interface.js b/node_modules/@nestjs/common/interfaces/http/raw-body-request.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/http/raw-body-request.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/index.d.ts b/node_modules/@nestjs/common/interfaces/index.d.ts deleted file mode 100644 index 94ceff9..0000000 --- a/node_modules/@nestjs/common/interfaces/index.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -export * from './abstract.interface'; -export * from './controllers/controller-metadata.interface'; -export * from './controllers/controller.interface'; -export * from './exceptions/exception-filter.interface'; -export * from './exceptions/rpc-exception-filter.interface'; -export * from './exceptions/ws-exception-filter.interface'; -export * from './external/validation-error.interface'; -export * from './features/arguments-host.interface'; -export * from './features/can-activate.interface'; -export * from './features/custom-route-param-factory.interface'; -export * from './features/execution-context.interface'; -export * from './features/nest-interceptor.interface'; -export * from './features/paramtype.interface'; -export * from './features/pipe-transform.interface'; -export * from './global-prefix-options.interface'; -export * from './hooks'; -export * from './http'; -export * from './injectable.interface'; -export * from './microservices/nest-hybrid-application-options.interface'; -export * from './middleware'; -export * from './modules'; -export * from './nest-application-context.interface'; -export * from './nest-application-options.interface'; -export * from './nest-application.interface'; -export * from './nest-microservice.interface'; -export * from './scope-options.interface'; -export * from './shutdown-hooks-options.interface'; -export * from './type.interface'; -export * from './version-options.interface'; -export * from './websockets/web-socket-adapter.interface'; diff --git a/node_modules/@nestjs/common/interfaces/index.js b/node_modules/@nestjs/common/interfaces/index.js deleted file mode 100644 index 2d18bda..0000000 --- a/node_modules/@nestjs/common/interfaces/index.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./abstract.interface"), exports); -tslib_1.__exportStar(require("./controllers/controller-metadata.interface"), exports); -tslib_1.__exportStar(require("./controllers/controller.interface"), exports); -tslib_1.__exportStar(require("./exceptions/exception-filter.interface"), exports); -tslib_1.__exportStar(require("./exceptions/rpc-exception-filter.interface"), exports); -tslib_1.__exportStar(require("./exceptions/ws-exception-filter.interface"), exports); -tslib_1.__exportStar(require("./external/validation-error.interface"), exports); -tslib_1.__exportStar(require("./features/arguments-host.interface"), exports); -tslib_1.__exportStar(require("./features/can-activate.interface"), exports); -tslib_1.__exportStar(require("./features/custom-route-param-factory.interface"), exports); -tslib_1.__exportStar(require("./features/execution-context.interface"), exports); -tslib_1.__exportStar(require("./features/nest-interceptor.interface"), exports); -tslib_1.__exportStar(require("./features/paramtype.interface"), exports); -tslib_1.__exportStar(require("./features/pipe-transform.interface"), exports); -tslib_1.__exportStar(require("./global-prefix-options.interface"), exports); -tslib_1.__exportStar(require("./hooks"), exports); -tslib_1.__exportStar(require("./http"), exports); -tslib_1.__exportStar(require("./injectable.interface"), exports); -tslib_1.__exportStar(require("./microservices/nest-hybrid-application-options.interface"), exports); -tslib_1.__exportStar(require("./middleware"), exports); -tslib_1.__exportStar(require("./modules"), exports); -tslib_1.__exportStar(require("./nest-application-context.interface"), exports); -tslib_1.__exportStar(require("./nest-application-options.interface"), exports); -tslib_1.__exportStar(require("./nest-application.interface"), exports); -tslib_1.__exportStar(require("./nest-microservice.interface"), exports); -tslib_1.__exportStar(require("./scope-options.interface"), exports); -tslib_1.__exportStar(require("./shutdown-hooks-options.interface"), exports); -tslib_1.__exportStar(require("./type.interface"), exports); -tslib_1.__exportStar(require("./version-options.interface"), exports); -tslib_1.__exportStar(require("./websockets/web-socket-adapter.interface"), exports); diff --git a/node_modules/@nestjs/common/interfaces/injectable.interface.d.ts b/node_modules/@nestjs/common/interfaces/injectable.interface.d.ts deleted file mode 100644 index 0839daa..0000000 --- a/node_modules/@nestjs/common/interfaces/injectable.interface.d.ts +++ /dev/null @@ -1 +0,0 @@ -export type Injectable = unknown; diff --git a/node_modules/@nestjs/common/interfaces/injectable.interface.js b/node_modules/@nestjs/common/interfaces/injectable.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/injectable.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/microservices/nest-hybrid-application-options.interface.d.ts b/node_modules/@nestjs/common/interfaces/microservices/nest-hybrid-application-options.interface.d.ts deleted file mode 100644 index 7e3aeab..0000000 --- a/node_modules/@nestjs/common/interfaces/microservices/nest-hybrid-application-options.interface.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * @publicApi - */ -export interface NestHybridApplicationOptions { - inheritAppConfig?: boolean; - deferInitialization?: boolean; -} diff --git a/node_modules/@nestjs/common/interfaces/microservices/nest-hybrid-application-options.interface.js b/node_modules/@nestjs/common/interfaces/microservices/nest-hybrid-application-options.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/microservices/nest-hybrid-application-options.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/microservices/nest-microservice-options.interface.d.ts b/node_modules/@nestjs/common/interfaces/microservices/nest-microservice-options.interface.d.ts deleted file mode 100644 index 16caa64..0000000 --- a/node_modules/@nestjs/common/interfaces/microservices/nest-microservice-options.interface.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { NestApplicationContextOptions } from '../nest-application-context-options.interface'; -/** - * @publicApi - */ -export type NestMicroserviceOptions = NestApplicationContextOptions; diff --git a/node_modules/@nestjs/common/interfaces/microservices/nest-microservice-options.interface.js b/node_modules/@nestjs/common/interfaces/microservices/nest-microservice-options.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/microservices/nest-microservice-options.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/microservices/pre-request-hook.interface.d.ts b/node_modules/@nestjs/common/interfaces/microservices/pre-request-hook.interface.d.ts deleted file mode 100644 index b41e725..0000000 --- a/node_modules/@nestjs/common/interfaces/microservices/pre-request-hook.interface.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Observable } from 'rxjs'; -import { ExecutionContext } from '../features/execution-context.interface.js'; -/** - * Interface describing a global preRequest hook for microservices. - * - * Hooks are executed before guards, allowing setup of context (e.g. AsyncLocalStorage) - * that is available to all downstream enhancers. - * - * @example - * ```typescript - * const als = new AsyncLocalStorage(); - * app.registerPreRequestHook((context, next) => { - * als.enterWith({ correlationId: uuid() }); - * return next(); - * }); - * ``` - * - * @publicApi - */ -export interface PreRequestHook { - (context: ExecutionContext, next: () => Observable): Observable; -} diff --git a/node_modules/@nestjs/common/interfaces/microservices/pre-request-hook.interface.js b/node_modules/@nestjs/common/interfaces/microservices/pre-request-hook.interface.js deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/@nestjs/common/interfaces/microservices/pre-request-hook.interface.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/@nestjs/common/interfaces/middleware/index.d.ts b/node_modules/@nestjs/common/interfaces/middleware/index.d.ts deleted file mode 100644 index b23e220..0000000 --- a/node_modules/@nestjs/common/interfaces/middleware/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './middleware-config-proxy.interface'; -export * from './middleware-configuration.interface'; -export * from './middleware-consumer.interface'; -export * from './nest-middleware.interface'; diff --git a/node_modules/@nestjs/common/interfaces/middleware/index.js b/node_modules/@nestjs/common/interfaces/middleware/index.js deleted file mode 100644 index 3302f82..0000000 --- a/node_modules/@nestjs/common/interfaces/middleware/index.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./middleware-config-proxy.interface"), exports); -tslib_1.__exportStar(require("./middleware-configuration.interface"), exports); -tslib_1.__exportStar(require("./middleware-consumer.interface"), exports); -tslib_1.__exportStar(require("./nest-middleware.interface"), exports); diff --git a/node_modules/@nestjs/common/interfaces/middleware/middleware-config-proxy.interface.d.ts b/node_modules/@nestjs/common/interfaces/middleware/middleware-config-proxy.interface.d.ts deleted file mode 100644 index 7952c45..0000000 --- a/node_modules/@nestjs/common/interfaces/middleware/middleware-config-proxy.interface.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Type } from '../type.interface'; -import { RouteInfo } from './middleware-configuration.interface'; -import { MiddlewareConsumer } from './middleware-consumer.interface'; -/** - * @publicApi - */ -export interface MiddlewareConfigProxy { - /** - * Routes to exclude from the current middleware. - * - * @param {(string | RouteInfo)[]} routes - * @returns {MiddlewareConfigProxy} - */ - exclude(...routes: (string | RouteInfo)[]): MiddlewareConfigProxy; - /** - * Attaches either routes or controllers to the current middleware. - * If you pass a controller class, Nest will attach the current middleware to every path - * defined within it. - * - * @param {(string | Type | RouteInfo)[]} routes - * @returns {MiddlewareConsumer} - */ - forRoutes(...routes: (string | Type | RouteInfo)[]): MiddlewareConsumer; -} diff --git a/node_modules/@nestjs/common/interfaces/middleware/middleware-config-proxy.interface.js b/node_modules/@nestjs/common/interfaces/middleware/middleware-config-proxy.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/middleware/middleware-config-proxy.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/middleware/middleware-configuration.interface.d.ts b/node_modules/@nestjs/common/interfaces/middleware/middleware-configuration.interface.d.ts deleted file mode 100644 index d927313..0000000 --- a/node_modules/@nestjs/common/interfaces/middleware/middleware-configuration.interface.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { RequestMethod } from '../../enums'; -import { Type } from '../type.interface'; -import { VersionValue } from '../version-options.interface'; -export interface RouteInfo { - path: string; - method: RequestMethod; - version?: VersionValue; -} -export interface MiddlewareConfiguration { - middleware: T; - forRoutes: (Type | string | RouteInfo)[]; -} diff --git a/node_modules/@nestjs/common/interfaces/middleware/middleware-configuration.interface.js b/node_modules/@nestjs/common/interfaces/middleware/middleware-configuration.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/middleware/middleware-configuration.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/middleware/middleware-consumer.interface.d.ts b/node_modules/@nestjs/common/interfaces/middleware/middleware-consumer.interface.d.ts deleted file mode 100644 index 84feba2..0000000 --- a/node_modules/@nestjs/common/interfaces/middleware/middleware-consumer.interface.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Type } from '../type.interface'; -import { MiddlewareConfigProxy } from './middleware-config-proxy.interface'; -/** - * Interface defining method for applying user defined middleware to routes. - * - * @see [MiddlewareConsumer](https://docs.nestjs.com/middleware#middleware-consumer) - * - * @publicApi - */ -export interface MiddlewareConsumer { - /** - * @param {...(Type | Function)} middleware middleware class/function or array of classes/functions - * to be attached to the passed routes. - * - * @returns {MiddlewareConfigProxy} - */ - apply(...middleware: (Type | Function)[]): MiddlewareConfigProxy; -} diff --git a/node_modules/@nestjs/common/interfaces/middleware/middleware-consumer.interface.js b/node_modules/@nestjs/common/interfaces/middleware/middleware-consumer.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/middleware/middleware-consumer.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/middleware/nest-middleware.interface.d.ts b/node_modules/@nestjs/common/interfaces/middleware/nest-middleware.interface.d.ts deleted file mode 100644 index b8e3ed8..0000000 --- a/node_modules/@nestjs/common/interfaces/middleware/nest-middleware.interface.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * @see [Middleware](https://docs.nestjs.com/middleware) - * - * @publicApi - */ -export interface NestMiddleware { - use(req: TRequest, res: TResponse, next: (error?: any) => void): any; -} diff --git a/node_modules/@nestjs/common/interfaces/middleware/nest-middleware.interface.js b/node_modules/@nestjs/common/interfaces/middleware/nest-middleware.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/middleware/nest-middleware.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/modules/dynamic-module.interface.d.ts b/node_modules/@nestjs/common/interfaces/modules/dynamic-module.interface.d.ts deleted file mode 100644 index 3a42edf..0000000 --- a/node_modules/@nestjs/common/interfaces/modules/dynamic-module.interface.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Type } from '../type.interface'; -import { ModuleMetadata } from './module-metadata.interface'; -/** - * Interface defining a Dynamic Module. - * - * @see [Dynamic Modules](https://docs.nestjs.com/modules#dynamic-modules) - * - * @publicApi - */ -export interface DynamicModule extends ModuleMetadata { - /** - * A module reference - */ - module: Type; - /** - * When "true", makes a module global-scoped. - * - * Once imported into any module, a global-scoped module will be visible - * in all modules. Thereafter, modules that wish to inject a service exported - * from a global module do not need to import the provider module. - * - * @default false - */ - global?: boolean; -} diff --git a/node_modules/@nestjs/common/interfaces/modules/dynamic-module.interface.js b/node_modules/@nestjs/common/interfaces/modules/dynamic-module.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/modules/dynamic-module.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/modules/forward-reference.interface.d.ts b/node_modules/@nestjs/common/interfaces/modules/forward-reference.interface.d.ts deleted file mode 100644 index 3b11eb8..0000000 --- a/node_modules/@nestjs/common/interfaces/modules/forward-reference.interface.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ForwardReference { - forwardRef: T; -} diff --git a/node_modules/@nestjs/common/interfaces/modules/forward-reference.interface.js b/node_modules/@nestjs/common/interfaces/modules/forward-reference.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/modules/forward-reference.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/modules/index.d.ts b/node_modules/@nestjs/common/interfaces/modules/index.d.ts deleted file mode 100644 index 458f952..0000000 --- a/node_modules/@nestjs/common/interfaces/modules/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export * from './dynamic-module.interface'; -export * from './forward-reference.interface'; -export * from './injection-token.interface'; -export * from './introspection-result.interface'; -export * from './module-metadata.interface'; -export * from './nest-module.interface'; -export * from './optional-factory-dependency.interface'; -export * from './provider.interface'; diff --git a/node_modules/@nestjs/common/interfaces/modules/index.js b/node_modules/@nestjs/common/interfaces/modules/index.js deleted file mode 100644 index a630045..0000000 --- a/node_modules/@nestjs/common/interfaces/modules/index.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./dynamic-module.interface"), exports); -tslib_1.__exportStar(require("./forward-reference.interface"), exports); -tslib_1.__exportStar(require("./injection-token.interface"), exports); -tslib_1.__exportStar(require("./introspection-result.interface"), exports); -tslib_1.__exportStar(require("./module-metadata.interface"), exports); -tslib_1.__exportStar(require("./nest-module.interface"), exports); -tslib_1.__exportStar(require("./optional-factory-dependency.interface"), exports); -tslib_1.__exportStar(require("./provider.interface"), exports); diff --git a/node_modules/@nestjs/common/interfaces/modules/injection-token.interface.d.ts b/node_modules/@nestjs/common/interfaces/modules/injection-token.interface.d.ts deleted file mode 100644 index ef930f4..0000000 --- a/node_modules/@nestjs/common/interfaces/modules/injection-token.interface.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Abstract } from '../abstract.interface'; -import { Type } from '../type.interface'; -/** - * @publicApi - */ -export type InjectionToken = string | symbol | Type | Abstract | Function; diff --git a/node_modules/@nestjs/common/interfaces/modules/injection-token.interface.js b/node_modules/@nestjs/common/interfaces/modules/injection-token.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/modules/injection-token.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/modules/introspection-result.interface.d.ts b/node_modules/@nestjs/common/interfaces/modules/introspection-result.interface.d.ts deleted file mode 100644 index 2d132bd..0000000 --- a/node_modules/@nestjs/common/interfaces/modules/introspection-result.interface.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Scope } from '../scope-options.interface'; -/** - * @publicApi - */ -export interface IntrospectionResult { - /** - * Enum defining lifetime of host class or factory. - */ - scope: Scope; -} diff --git a/node_modules/@nestjs/common/interfaces/modules/introspection-result.interface.js b/node_modules/@nestjs/common/interfaces/modules/introspection-result.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/modules/introspection-result.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/modules/module-metadata.interface.d.ts b/node_modules/@nestjs/common/interfaces/modules/module-metadata.interface.d.ts deleted file mode 100644 index 4c34bcd..0000000 --- a/node_modules/@nestjs/common/interfaces/modules/module-metadata.interface.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Abstract } from '../abstract.interface'; -import { Type } from '../type.interface'; -import { DynamicModule } from './dynamic-module.interface'; -import { ForwardReference } from './forward-reference.interface'; -import { Provider } from './provider.interface'; -/** - * Interface defining the property object that describes the module. - * - * @see [Modules](https://docs.nestjs.com/modules) - * - * @publicApi - */ -export interface ModuleMetadata { - /** - * Optional list of imported modules that export the providers which are - * required in this module. - */ - imports?: Array | DynamicModule | Promise | ForwardReference>; - /** - * Optional list of controllers defined in this module which have to be - * instantiated. - */ - controllers?: Type[]; - /** - * Optional list of providers that will be instantiated by the Nest injector - * and that may be shared at least across this module. - */ - providers?: Provider[]; - /** - * Optional list of the subset of providers that are provided by this module - * and should be available in other modules which import this module. - */ - exports?: Array | Function>; -} diff --git a/node_modules/@nestjs/common/interfaces/modules/module-metadata.interface.js b/node_modules/@nestjs/common/interfaces/modules/module-metadata.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/modules/module-metadata.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/modules/nest-module.interface.d.ts b/node_modules/@nestjs/common/interfaces/modules/nest-module.interface.d.ts deleted file mode 100644 index b36f43a..0000000 --- a/node_modules/@nestjs/common/interfaces/modules/nest-module.interface.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { MiddlewareConsumer } from '../middleware/middleware-consumer.interface'; -/** - * @publicApi - */ -export interface NestModule { - configure(consumer: MiddlewareConsumer): any; -} diff --git a/node_modules/@nestjs/common/interfaces/modules/nest-module.interface.js b/node_modules/@nestjs/common/interfaces/modules/nest-module.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/modules/nest-module.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/modules/optional-factory-dependency.interface.d.ts b/node_modules/@nestjs/common/interfaces/modules/optional-factory-dependency.interface.d.ts deleted file mode 100644 index 560adb2..0000000 --- a/node_modules/@nestjs/common/interfaces/modules/optional-factory-dependency.interface.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { InjectionToken } from './injection-token.interface'; -/** - * @publicApi - */ -export type OptionalFactoryDependency = { - token: InjectionToken; - optional: boolean; -}; diff --git a/node_modules/@nestjs/common/interfaces/modules/optional-factory-dependency.interface.js b/node_modules/@nestjs/common/interfaces/modules/optional-factory-dependency.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/modules/optional-factory-dependency.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/modules/provider.interface.d.ts b/node_modules/@nestjs/common/interfaces/modules/provider.interface.d.ts deleted file mode 100644 index 43de604..0000000 --- a/node_modules/@nestjs/common/interfaces/modules/provider.interface.d.ts +++ /dev/null @@ -1,156 +0,0 @@ -import { Scope } from '../scope-options.interface'; -import { Type } from '../type.interface'; -import { InjectionToken } from './injection-token.interface'; -import { OptionalFactoryDependency } from './optional-factory-dependency.interface'; -/** - * - * @publicApi - */ -export type Provider = Type | ClassProvider | ValueProvider | FactoryProvider | ExistingProvider; -/** - * Interface defining a *Class* type provider. - * - * For example: - * ```typescript - * const configServiceProvider = { - * provide: ConfigService, - * useClass: - * process.env.NODE_ENV === 'development' - * ? DevelopmentConfigService - * : ProductionConfigService, - * }; - * ``` - * - * @see [Class providers](https://docs.nestjs.com/fundamentals/custom-providers#class-providers-useclass) - * @see [Injection scopes](https://docs.nestjs.com/fundamentals/injection-scopes) - * - * @publicApi - */ -export interface ClassProvider { - /** - * Injection token - */ - provide: InjectionToken; - /** - * Type (class name) of provider (instance to be injected). - */ - useClass: Type; - /** - * Optional enum defining lifetime of the provider that is injected. - */ - scope?: Scope; - /** - * This option is only available on factory providers! - * - * @see [Use factory](https://docs.nestjs.com/fundamentals/custom-providers#factory-providers-usefactory) - */ - inject?: never; - /** - * Flags provider as durable. This flag can be used in combination with custom context id - * factory strategy to construct lazy DI subtrees. - * - * This flag can be used only in conjunction with scope = Scope.REQUEST. - */ - durable?: boolean; -} -/** - * Interface defining a *Value* type provider. - * - * For example: - * ```typescript - * const connectionProvider = { - * provide: 'CONNECTION', - * useValue: connection, - * }; - * ``` - * - * @see [Value providers](https://docs.nestjs.com/fundamentals/custom-providers#value-providers-usevalue) - * - * @publicApi - */ -export interface ValueProvider { - /** - * Injection token - */ - provide: InjectionToken; - /** - * Instance of a provider to be injected. - */ - useValue: T; - /** - * This option is only available on factory providers! - * - * @see [Use factory](https://docs.nestjs.com/fundamentals/custom-providers#factory-providers-usefactory) - */ - inject?: never; -} -/** - * Interface defining a *Factory* type provider. - * - * For example: - * ```typescript - * const connectionFactory = { - * provide: 'CONNECTION', - * useFactory: (optionsProvider: OptionsProvider) => { - * const options = optionsProvider.get(); - * return new DatabaseConnection(options); - * }, - * inject: [OptionsProvider], - * }; - * ``` - * - * @see [Factory providers](https://docs.nestjs.com/fundamentals/custom-providers#factory-providers-usefactory) - * @see [Injection scopes](https://docs.nestjs.com/fundamentals/injection-scopes) - * - * @publicApi - */ -export interface FactoryProvider { - /** - * Injection token - */ - provide: InjectionToken; - /** - * Factory function that returns an instance of the provider to be injected. - */ - useFactory: (...args: any[]) => T | Promise; - /** - * Optional list of providers to be injected into the context of the Factory function. - */ - inject?: Array; - /** - * Optional enum defining lifetime of the provider that is returned by the Factory function. - */ - scope?: Scope; - /** - * Flags provider as durable. This flag can be used in combination with custom context id - * factory strategy to construct lazy DI subtrees. - * - * This flag can be used only in conjunction with scope = Scope.REQUEST. - */ - durable?: boolean; -} -/** - * Interface defining an *Existing* (aliased) type provider. - * - * For example: - * ```typescript - * const loggerAliasProvider = { - * provide: 'AliasedLoggerService', - * useExisting: LoggerService - * }; - * ``` - * - * @see [Alias providers](https://docs.nestjs.com/fundamentals/custom-providers#alias-providers-useexisting) - * - * @publicApi - */ -export interface ExistingProvider { - /** - * Injection token - */ - provide: InjectionToken; - /** - * Provider to be aliased by the Injection token. - */ - useExisting: any; -} diff --git a/node_modules/@nestjs/common/interfaces/modules/provider.interface.js b/node_modules/@nestjs/common/interfaces/modules/provider.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/modules/provider.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/nest-application-context-options.interface.d.ts b/node_modules/@nestjs/common/interfaces/nest-application-context-options.interface.d.ts deleted file mode 100644 index fd48856..0000000 --- a/node_modules/@nestjs/common/interfaces/nest-application-context-options.interface.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { LoggerService, LogLevel } from '../services/logger.service'; -/** - * @publicApi - */ -export declare class NestApplicationContextOptions { - /** - * Specifies the logger to use. Pass `false` to turn off logging. - */ - logger?: LoggerService | LogLevel[] | false; - /** - * Whether to abort the process on Error. By default, the process is exited. - * Pass `false` to override the default behavior. If `false` is passed, Nest will not exit - * the application and instead will rethrow the exception. - * @default true - */ - abortOnError?: boolean | undefined; - /** - * If enabled, logs will be buffered until the "Logger#flush" method is called. - * @default false - */ - bufferLogs?: boolean; - /** - * If enabled, logs will be automatically flushed and buffer detached when - * application initialization process either completes or fails. - * @default true - */ - autoFlushLogs?: boolean; - /** - * Whether to run application in the preview mode. - * In the preview mode, providers/controllers are not instantiated & resolved. - * - * @default false - */ - preview?: boolean; - /** - * Whether to generate a serialized graph snapshot. - * - * @default false - */ - snapshot?: boolean; - /** - * Determines what algorithm use to generate module ids. - * When set to `deep-hash`, the module id is generated based on the serialized module definition. - * When set to `reference`, each module obtains a unique id based on its reference. - * - * @default 'reference' - */ - moduleIdGeneratorAlgorithm?: 'deep-hash' | 'reference'; - /** - * Instrument the application context. - * This option allows you to add custom instrumentation to the application context. - */ - instrument?: { - /** - * Function that decorates each instance created by the application context. - * This function can be used to add custom properties or methods to the instance. - * @param instance The instance to decorate. - * @returns The decorated instance. - */ - instanceDecorator: (instance: unknown) => unknown; - }; - /** - * If enabled, will force the use of console.log/console.error instead of process.stdout/stderr.write - * in the default ConsoleLogger. This is useful for test environments like Jest that can buffer console calls. - * @default false - */ - forceConsole?: boolean; -} diff --git a/node_modules/@nestjs/common/interfaces/nest-application-context-options.interface.js b/node_modules/@nestjs/common/interfaces/nest-application-context-options.interface.js deleted file mode 100644 index 0e13572..0000000 --- a/node_modules/@nestjs/common/interfaces/nest-application-context-options.interface.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NestApplicationContextOptions = void 0; -/** - * @publicApi - */ -class NestApplicationContextOptions { -} -exports.NestApplicationContextOptions = NestApplicationContextOptions; diff --git a/node_modules/@nestjs/common/interfaces/nest-application-context.interface.d.ts b/node_modules/@nestjs/common/interfaces/nest-application-context.interface.d.ts deleted file mode 100644 index 4e5c334..0000000 --- a/node_modules/@nestjs/common/interfaces/nest-application-context.interface.d.ts +++ /dev/null @@ -1,139 +0,0 @@ -import { ShutdownSignal } from '../enums/shutdown-signal.enum'; -import { LoggerService, LogLevel } from '../services/logger.service'; -import { DynamicModule } from './modules'; -import { NestApplicationContextOptions } from './nest-application-context-options.interface'; -import { ShutdownHooksOptions } from './shutdown-hooks-options.interface'; -import { Type } from './type.interface'; -export type SelectOptions = Pick; -export interface GetOrResolveOptions { - /** - * If enabled, lookup will only be performed in the host module. - * @default false - */ - strict?: boolean; - /** - * If enabled, instead of returning a first instance registered under a given token, - * a list of instances will be returned. - * @default false - */ - each?: boolean; -} -/** - * Interface defining NestApplicationContext. - * - * @publicApi - */ -export interface INestApplicationContext { - /** - * Allows navigating through the modules tree, for example, to pull out a specific instance from the selected module. - * @returns {INestApplicationContext} - */ - select(module: Type | DynamicModule, options?: SelectOptions): INestApplicationContext; - /** - * Retrieves an instance of either injectable or controller, otherwise, throws exception. - * @returns {TResult} - */ - get(typeOrToken: Type | Function | string | symbol): TResult; - /** - * Retrieves an instance of either injectable or controller, otherwise, throws exception. - * @returns {TResult} - */ - get(typeOrToken: Type | Function | string | symbol, options: { - strict?: boolean; - each?: undefined | false; - }): TResult; - /** - * Retrieves a list of instances of either injectables or controllers, otherwise, throws exception. - * @returns {Array} - */ - get(typeOrToken: Type | Function | string | symbol, options: { - strict?: boolean; - each: true; - }): Array; - /** - * Retrieves an instance (or a list of instances) of either injectable or controller, otherwise, throws exception. - * @returns {TResult | Array} - */ - get(typeOrToken: Type | Function | string | symbol, options?: GetOrResolveOptions): TResult | Array; - /** - * Resolves transient or request-scoped instance of either injectable or controller, otherwise, throws exception. - * @returns {Array} - */ - resolve(typeOrToken: Type | Function | string | symbol): Promise; - /** - * Resolves transient or request-scoped instance of either injectable or controller, otherwise, throws exception. - * @returns {Array} - */ - resolve(typeOrToken: Type | Function | string | symbol, contextId?: { - id: number; - }): Promise; - /** - * Resolves transient or request-scoped instance of either injectable or controller, otherwise, throws exception. - * @returns {Array} - */ - resolve(typeOrToken: Type | Function | string | symbol, contextId?: { - id: number; - }, options?: { - strict?: boolean; - each?: undefined | false; - }): Promise; - /** - * Resolves transient or request-scoped instances of either injectables or controllers, otherwise, throws exception. - * @returns {Array} - */ - resolve(typeOrToken: Type | Function | string | symbol, contextId?: { - id: number; - }, options?: { - strict?: boolean; - each: true; - }): Promise>; - /** - * Resolves transient or request-scoped instance (or a list of instances) of either injectable or controller, otherwise, throws exception. - * @returns {Promise>} - */ - resolve(typeOrToken: Type | Function | string | symbol, contextId?: { - id: number; - }, options?: GetOrResolveOptions): Promise>; - /** - * Registers the request/context object for a given context ID (DI container sub-tree). - * @returns {void} - */ - registerRequestByContextId(request: T, contextId: { - id: number; - }): void; - /** - * Terminates the application - * @returns {Promise} - */ - close(): Promise; - /** - * Sets custom logger service. - * Flushes buffered logs if auto flush is on. - * @returns {void} - */ - useLogger(logger: LoggerService | LogLevel[] | false): void; - /** - * Prints buffered logs and detaches buffer. - * @returns {void} - */ - flushLogs(): void; - /** - * Enables the usage of shutdown hooks. Will call the - * `onApplicationShutdown` function of a provider if the - * process receives a shutdown signal. - * - * @param {ShutdownSignal[] | string[]} [signals] The system signals to listen to - * @param {ShutdownHooksOptions} [options] Options for configuring shutdown hooks behavior - * - * @returns {this} The Nest application context instance - */ - enableShutdownHooks(signals?: ShutdownSignal[] | string[], options?: ShutdownHooksOptions): this; - /** - * Initializes the Nest application. - * Calls the Nest lifecycle events. - * It isn't mandatory to call this method directly. - * - * @returns {Promise} The NestApplicationContext instance as Promise - */ - init(): Promise; -} diff --git a/node_modules/@nestjs/common/interfaces/nest-application-context.interface.js b/node_modules/@nestjs/common/interfaces/nest-application-context.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/nest-application-context.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/nest-application-options.interface.d.ts b/node_modules/@nestjs/common/interfaces/nest-application-options.interface.d.ts deleted file mode 100644 index ade8fc3..0000000 --- a/node_modules/@nestjs/common/interfaces/nest-application-options.interface.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { CorsOptions, CorsOptionsDelegate } from './external/cors-options.interface'; -import { HttpsOptions } from './external/https-options.interface'; -import { NestApplicationContextOptions } from './nest-application-context-options.interface'; -/** - * @publicApi - */ -export interface NestApplicationOptions extends NestApplicationContextOptions { - /** - * CORS options from [CORS package](https://github.com/expressjs/cors#configuration-options) - */ - cors?: boolean | CorsOptions | CorsOptionsDelegate; - /** - * Whether to use underlying platform body parser. - */ - bodyParser?: boolean; - /** - * Set of configurable HTTPS options - */ - httpsOptions?: HttpsOptions; - /** - * Whether to register the raw request body on the request. Use `req.rawBody`. - */ - rawBody?: boolean; - /** - * Force close open HTTP connections. Useful if restarting your application hangs due to - * keep-alive connections in the HTTP adapter. - */ - forceCloseConnections?: boolean; -} diff --git a/node_modules/@nestjs/common/interfaces/nest-application-options.interface.js b/node_modules/@nestjs/common/interfaces/nest-application-options.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/nest-application-options.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/nest-application.interface.d.ts b/node_modules/@nestjs/common/interfaces/nest-application.interface.d.ts deleted file mode 100644 index 6e7fff8..0000000 --- a/node_modules/@nestjs/common/interfaces/nest-application.interface.d.ts +++ /dev/null @@ -1,135 +0,0 @@ -import { CanActivate } from './features/can-activate.interface'; -import { NestInterceptor } from './features/nest-interceptor.interface'; -import { GlobalPrefixOptions } from './global-prefix-options.interface'; -import { HttpServer } from './http/http-server.interface'; -import { ExceptionFilter, INestMicroservice, NestHybridApplicationOptions, PipeTransform } from './index'; -import { INestApplicationContext } from './nest-application-context.interface'; -import { VersioningOptions } from './version-options.interface'; -import { WebSocketAdapter } from './websockets/web-socket-adapter.interface'; -/** - * Interface defining the core NestApplication object. - * - * @publicApi - */ -export interface INestApplication extends INestApplicationContext { - /** - * A wrapper function around HTTP adapter method: `adapter.use()`. - * Example `app.use(cors())` - * - * @returns {this} - */ - use(...args: any[]): this; - /** - * Enables CORS (Cross-Origin Resource Sharing) - * - * @returns {void} - */ - enableCors(options?: any): void; - /** - * Enables Versioning for the application. - * By default, URI-based versioning is used. - * - * @param {VersioningOptions} options - * @returns {this} - */ - enableVersioning(options?: VersioningOptions): this; - /** - * Starts the application. - * - * @param {number|string} port - * @param {string} [hostname] - * @param {Function} [callback] Optional callback - * @returns {Promise} A Promise that, when resolved, is a reference to the underlying HttpServer. - */ - listen(port: number | string, callback?: () => void): Promise; - listen(port: number | string, hostname: string, callback?: () => void): Promise; - /** - * Returns the url the application is listening at, based on OS and IP version. Returns as an IP value either in IPv6 or IPv4 - * - * @returns {Promise} The IP where the server is listening - */ - getUrl(): Promise; - /** - * Registers a prefix for every HTTP route path. - * - * @param {string} prefix The prefix for every HTTP route path (for example `/v1/api`) - * @param {GlobalPrefixOptions} options Global prefix options object - * @returns {this} - */ - setGlobalPrefix(prefix: string, options?: GlobalPrefixOptions): this; - /** - * Register Ws Adapter which will be used inside Gateways. - * Use when you want to override default `socket.io` library. - * - * @param {WebSocketAdapter} adapter - * @returns {this} - */ - useWebSocketAdapter(adapter: WebSocketAdapter): this; - /** - * Connects microservice to the NestApplication instance. Transforms application - * to a hybrid instance. - * - * @template {object} T - * @param {T} options Microservice options object - * @param {NestHybridApplicationOptions} hybridOptions Hybrid options object - * @returns {INestMicroservice} - */ - connectMicroservice(options: T, hybridOptions?: NestHybridApplicationOptions): INestMicroservice; - /** - * Returns array of the microservices connected to the NestApplication. - * - * @returns {INestMicroservice[]} - */ - getMicroservices(): INestMicroservice[]; - /** - * Returns the underlying native HTTP server. - * - * @returns {TServer} - */ - getHttpServer(): TServer; - /** - * Returns the underlying HTTP adapter. - * - * @returns {HttpServer} - */ - getHttpAdapter(): HttpServer; - /** - * Starts all connected microservices asynchronously. - * - * @returns {Promise} - */ - startAllMicroservices(): Promise; - /** - * Registers exception filters as global filters (will be used within - * every HTTP route handler) - * - * @param {...ExceptionFilter} filters - */ - useGlobalFilters(...filters: ExceptionFilter[]): this; - /** - * Registers pipes as global pipes (will be used within every HTTP route handler) - * - * @param {...PipeTransform} pipes - */ - useGlobalPipes(...pipes: PipeTransform[]): this; - /** - * Registers interceptors as global interceptors (will be used within - * every HTTP route handler) - * - * @param {...NestInterceptor} interceptors - */ - useGlobalInterceptors(...interceptors: NestInterceptor[]): this; - /** - * Registers guards as global guards (will be used within every HTTP route handler) - * - * @param {...CanActivate} guards - */ - useGlobalGuards(...guards: CanActivate[]): this; - /** - * Terminates the application (including NestApplication, Gateways, and each connected - * microservice) - * - * @returns {Promise} - */ - close(): Promise; -} diff --git a/node_modules/@nestjs/common/interfaces/nest-application.interface.js b/node_modules/@nestjs/common/interfaces/nest-application.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/nest-application.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/nest-microservice.interface.d.ts b/node_modules/@nestjs/common/interfaces/nest-microservice.interface.d.ts deleted file mode 100644 index 1b4e343..0000000 --- a/node_modules/@nestjs/common/interfaces/nest-microservice.interface.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { Observable } from 'rxjs'; -import { ExceptionFilter } from './exceptions/exception-filter.interface'; -import { CanActivate } from './features/can-activate.interface'; -import { NestInterceptor } from './features/nest-interceptor.interface'; -import { PipeTransform } from './features/pipe-transform.interface'; -import { INestApplicationContext } from './nest-application-context.interface'; -import { WebSocketAdapter } from './websockets/web-socket-adapter.interface'; -/** - * Interface describing Microservice Context. - * - * @publicApi - */ -export interface INestMicroservice extends INestApplicationContext { - /** - * Starts the microservice. - * - * @returns {void} - */ - listen(): Promise; - /** - * Registers a web socket adapter that will be used for Gateways. - * Use to override the default `socket.io` library. - * - * @param {WebSocketAdapter} adapter - * @returns {this} - */ - useWebSocketAdapter(adapter: WebSocketAdapter): this; - /** - * Registers global exception filters (will be used for every pattern handler). - * - * @param {...ExceptionFilter} filters - */ - useGlobalFilters(...filters: ExceptionFilter[]): this; - /** - * Registers global pipes (will be used for every pattern handler). - * - * @param {...PipeTransform} pipes - */ - useGlobalPipes(...pipes: PipeTransform[]): this; - /** - * Registers global interceptors (will be used for every pattern handler). - * - * @param {...NestInterceptor} interceptors - */ - useGlobalInterceptors(...interceptors: NestInterceptor[]): this; - /** - * Registers global guards (will be used for every pattern handler). - * - * @param {...CanActivate} guards - */ - useGlobalGuards(...guards: CanActivate[]): this; - /** - * Terminates the application. - * - * @returns {Promise} - */ - close(): Promise; - /** - * Returns an observable that emits status changes. - * - * @returns {Observable} - */ - status: Observable; - /** - * Registers an event listener for the given event. - * @param event Event name - * @param callback Callback to be executed when the event is emitted - */ - on = Record, EventKey extends keyof EventsMap = keyof EventsMap, EventCallback extends EventsMap[EventKey] = EventsMap[EventKey]>(event: EventKey, callback: EventCallback): void; - /** - * Returns an instance of the underlying server/broker instance, - * or a group of servers if there are more than one. - */ - unwrap(): T; -} diff --git a/node_modules/@nestjs/common/interfaces/nest-microservice.interface.js b/node_modules/@nestjs/common/interfaces/nest-microservice.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/nest-microservice.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/scope-options.interface.d.ts b/node_modules/@nestjs/common/interfaces/scope-options.interface.d.ts deleted file mode 100644 index 2305f46..0000000 --- a/node_modules/@nestjs/common/interfaces/scope-options.interface.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * @publicApi - */ -export declare enum Scope { - /** - * The provider can be shared across multiple classes. The provider lifetime - * is strictly tied to the application lifecycle. Once the application has - * bootstrapped, all providers have been instantiated. - */ - DEFAULT = 0, - /** - * A new private instance of the provider is instantiated for every use - */ - TRANSIENT = 1, - /** - * A new instance is instantiated for each request processing pipeline - */ - REQUEST = 2 -} -/** - * @publicApi - * - * @see [Injection Scopes](https://docs.nestjs.com/fundamentals/injection-scopes) - */ -export interface ScopeOptions { - /** - * Specifies the lifetime of an injected Provider or Controller. - */ - scope?: Scope; - /** - * Flags provider as durable. This flag can be used in combination with custom context id - * factory strategy to construct lazy DI subtrees. - * - * This flag can be used only in conjunction with scope = Scope.REQUEST. - */ - durable?: boolean; -} diff --git a/node_modules/@nestjs/common/interfaces/scope-options.interface.js b/node_modules/@nestjs/common/interfaces/scope-options.interface.js deleted file mode 100644 index bb16590..0000000 --- a/node_modules/@nestjs/common/interfaces/scope-options.interface.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Scope = void 0; -/** - * @publicApi - */ -var Scope; -(function (Scope) { - /** - * The provider can be shared across multiple classes. The provider lifetime - * is strictly tied to the application lifecycle. Once the application has - * bootstrapped, all providers have been instantiated. - */ - Scope[Scope["DEFAULT"] = 0] = "DEFAULT"; - /** - * A new private instance of the provider is instantiated for every use - */ - Scope[Scope["TRANSIENT"] = 1] = "TRANSIENT"; - /** - * A new instance is instantiated for each request processing pipeline - */ - Scope[Scope["REQUEST"] = 2] = "REQUEST"; -})(Scope || (exports.Scope = Scope = {})); diff --git a/node_modules/@nestjs/common/interfaces/shutdown-hooks-options.interface.d.ts b/node_modules/@nestjs/common/interfaces/shutdown-hooks-options.interface.d.ts deleted file mode 100644 index 6629a5d..0000000 --- a/node_modules/@nestjs/common/interfaces/shutdown-hooks-options.interface.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Options for configuring shutdown hooks behavior. - * - * @publicApi - */ -export interface ShutdownHooksOptions { - /** - * If true, uses `process.exit()` instead of `process.kill(process.pid, signal)` - * after shutdown hooks complete. This ensures the 'exit' event is properly - * triggered, which is required for async loggers (like Pino with transports) - * to flush their buffers before the process terminates. - * - * Note: Using `process.exit()` will: - * - Change the exit code (e.g., SIGTERM: 143 → 0) - * - May not trigger other signal handlers from third-party libraries - * - May affect orchestrator (Kubernetes, Docker) behavior - * - * @default false - */ - useProcessExit?: boolean; -} diff --git a/node_modules/@nestjs/common/interfaces/shutdown-hooks-options.interface.js b/node_modules/@nestjs/common/interfaces/shutdown-hooks-options.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/shutdown-hooks-options.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/type.interface.d.ts b/node_modules/@nestjs/common/interfaces/type.interface.d.ts deleted file mode 100644 index c04ad19..0000000 --- a/node_modules/@nestjs/common/interfaces/type.interface.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface Type extends Function { - new (...args: any[]): T; -} diff --git a/node_modules/@nestjs/common/interfaces/type.interface.js b/node_modules/@nestjs/common/interfaces/type.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/type.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/interfaces/version-options.interface.d.ts b/node_modules/@nestjs/common/interfaces/version-options.interface.d.ts deleted file mode 100644 index 0e04a15..0000000 --- a/node_modules/@nestjs/common/interfaces/version-options.interface.d.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { VersioningType } from '../enums/version-type.enum'; -/** - * Indicates that this will work for any version passed in the request, or no version. - * - * @publicApi - */ -export declare const VERSION_NEUTRAL: unique symbol; -/** - * @publicApi - */ -export type VersionValue = string | typeof VERSION_NEUTRAL | Array; -/** - * @publicApi - */ -export interface VersionOptions { - /** - * Specifies an optional API Version. When configured, methods - * within the controller will only be routed if the request version - * matches the specified value. - * - * Supported only by HTTP-based applications (does not apply to non-HTTP microservices). - * - * @see [Versioning](https://docs.nestjs.com/techniques/versioning) - */ - version?: VersionValue; -} -/** - * @publicApi - */ -export interface HeaderVersioningOptions { - type: VersioningType.HEADER; - /** - * The name of the Request Header that contains the version. - */ - header: string; -} -/** - * @publicApi - */ -export interface UriVersioningOptions { - type: VersioningType.URI; - /** - * Optional prefix that will prepend the version within the URI. - * - * Defaults to `v`. - * - * Ex. Assuming a version of `1`, for `/api/v1/route`, `v` is the prefix. - */ - prefix?: string | false; -} -/** - * @publicApi - */ -export interface MediaTypeVersioningOptions { - type: VersioningType.MEDIA_TYPE; - /** - * The key within the Media Type Header to determine the version from. - * - * Ex. For `application/json;v=1`, the key is `v=`. - */ - key: string; -} -/** - * @publicApi - */ -export interface CustomVersioningOptions { - type: VersioningType.CUSTOM; - /** - * A function that accepts a request object (specific to the underlying platform, ie Express or Fastify) - * and returns a single version value or an ordered array of versions, in order from HIGHEST to LOWEST. - * - * Ex. Returned version array = ['3.1', '3.0', '2.5', '2', '1.9'] - * - * Use type assertion or narrowing to identify the specific request type. - */ - extractor: (request: unknown) => string | string[]; -} -/** - * @publicApi - */ -interface VersioningCommonOptions { - /** - * The default version to be used as a fallback when you did not provide some - * version to `@Controller()` nor `@Version()`. - */ - defaultVersion?: VersionOptions['version']; -} -/** - * @publicApi - */ -export type VersioningOptions = VersioningCommonOptions & (HeaderVersioningOptions | UriVersioningOptions | MediaTypeVersioningOptions | CustomVersioningOptions); -export {}; diff --git a/node_modules/@nestjs/common/interfaces/version-options.interface.js b/node_modules/@nestjs/common/interfaces/version-options.interface.js deleted file mode 100644 index f801caf..0000000 --- a/node_modules/@nestjs/common/interfaces/version-options.interface.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.VERSION_NEUTRAL = void 0; -/** - * Indicates that this will work for any version passed in the request, or no version. - * - * @publicApi - */ -exports.VERSION_NEUTRAL = Symbol('VERSION_NEUTRAL'); diff --git a/node_modules/@nestjs/common/interfaces/websockets/web-socket-adapter.interface.d.ts b/node_modules/@nestjs/common/interfaces/websockets/web-socket-adapter.interface.d.ts deleted file mode 100644 index 5724d50..0000000 --- a/node_modules/@nestjs/common/interfaces/websockets/web-socket-adapter.interface.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Observable } from 'rxjs'; -/** - * @publicApi - */ -export interface WsMessageHandler { - message: T; - callback: (...args: any[]) => Observable | Promise; - isAckHandledManually: boolean; -} -/** - * @publicApi - */ -export interface WebSocketAdapter { - create(port: number, options?: TOptions): TServer; - bindClientConnect(server: TServer, callback: Function): any; - bindClientDisconnect?(client: TClient, callback: Function): any; - bindMessageHandlers(client: TClient, handlers: WsMessageHandler[], transform: (data: any) => Observable): any; - close(server: TServer): any; -} diff --git a/node_modules/@nestjs/common/interfaces/websockets/web-socket-adapter.interface.js b/node_modules/@nestjs/common/interfaces/websockets/web-socket-adapter.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/interfaces/websockets/web-socket-adapter.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/internal.d.ts b/node_modules/@nestjs/common/internal.d.ts deleted file mode 100644 index bc49bb3..0000000 --- a/node_modules/@nestjs/common/internal.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Internal module - not part of the public API. - * These exports are used by sibling @nestjs packages. - * Do not depend on these in your application code. - * @internal - * @module - */ -export * from './constants.js'; -export { RouteParamtypes } from './enums/route-paramtypes.enum.js'; -export * from './utils/shared.utils.js'; -export * from './utils/load-package.util.js'; -export * from './utils/cli-colors.util.js'; -export * from './utils/random-string-generator.util.js'; -export * from './utils/select-exception-filter-metadata.util.js'; -export type { Controller, Injectable } from './interfaces/index.js'; -export type { NestApplicationContextOptions } from './interfaces/nest-application-context-options.interface.js'; -export type { NestMicroserviceOptions } from './interfaces/microservices/nest-microservice-options.interface.js'; -export type { CorsOptions, CorsOptionsDelegate, CustomOrigin, } from './interfaces/external/cors-options.interface.js'; -export type { ExceptionFilterMetadata } from './interfaces/exceptions/exception-filter-metadata.interface.js'; -export type { RpcExceptionFilterMetadata } from './interfaces/exceptions/rpc-exception-filter-metadata.interface.js'; -export type { VersionValue } from './interfaces/version-options.interface.js'; -export type { GlobalPrefixOptions } from './interfaces/global-prefix-options.interface.js'; -export type { MiddlewareConfiguration, RouteInfo, } from './interfaces/middleware/middleware-configuration.interface.js'; -export type { MiddlewareConfigProxy } from './interfaces/middleware/middleware-config-proxy.interface.js'; -export type { ModuleMetadata } from './interfaces/modules/module-metadata.interface.js'; -export type { HttpArgumentsHost, RpcArgumentsHost, WsArgumentsHost, } from './interfaces/features/arguments-host.interface.js'; -export type { RequestHandler } from './interfaces/http/http-server.interface.js'; -export type { GetOrResolveOptions, SelectOptions, } from './interfaces/nest-application-context.interface.js'; -export type { ShutdownHooksOptions } from './interfaces/shutdown-hooks-options.interface.js'; -export { assignMetadata } from './decorators/http/route-params.decorator.js'; diff --git a/node_modules/@nestjs/common/internal.js b/node_modules/@nestjs/common/internal.js deleted file mode 100644 index 0904c94..0000000 --- a/node_modules/@nestjs/common/internal.js +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Internal module - not part of the public API. - * These exports are used by sibling @nestjs packages. - * Do not depend on these in your application code. - * @internal - * @module - */ -// Constants -export * from './constants.js'; -// Enums (internal) -export { RouteParamtypes } from './enums/route-paramtypes.enum.js'; -// Utils -export * from './utils/shared.utils.js'; -export * from './utils/load-package.util.js'; -export * from './utils/cli-colors.util.js'; -export * from './utils/random-string-generator.util.js'; -export * from './utils/select-exception-filter-metadata.util.js'; -// Decorators (internal) -export { assignMetadata } from './decorators/http/route-params.decorator.js'; diff --git a/node_modules/@nestjs/common/module-utils/configurable-module.builder.d.ts b/node_modules/@nestjs/common/module-utils/configurable-module.builder.d.ts deleted file mode 100644 index 9769154..0000000 --- a/node_modules/@nestjs/common/module-utils/configurable-module.builder.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { DynamicModule } from '../interfaces'; -import { Logger } from '../services/logger.service'; -import { DEFAULT_FACTORY_CLASS_METHOD_KEY, DEFAULT_METHOD_KEY } from './constants'; -import { ConfigurableModuleHost } from './interfaces'; -/** - * @publicApi - */ -export interface ConfigurableModuleBuilderOptions { - /** - * Specifies what injection token should be used for the module options provider. - * By default, an auto-generated UUID will be used. - */ - optionsInjectionToken?: string | symbol; - /** - * By default, an UUID will be used as a module options provider token. - * Explicitly specifying the "moduleName" will instruct the "ConfigurableModuleBuilder" - * to use a more descriptive provider token. - * - * For example, `moduleName: "Cache"` will auto-generate the provider token: "CACHE_MODULE_OPTIONS". - */ - moduleName?: string; - /** - * Indicates whether module should always be "transient" - meaning, - * every time you call the static method to construct a dynamic module, - * regardless of what arguments you pass in, a new "unique" module will be created. - * - * @default false - */ - alwaysTransient?: boolean; -} -/** - * Factory that lets you create configurable modules and - * provides a way to reduce the majority of dynamic module boilerplate. - * - * @publicApi - */ -export declare class ConfigurableModuleBuilder { - protected readonly options: ConfigurableModuleBuilderOptions; - protected staticMethodKey: StaticMethodKey; - protected factoryClassMethodKey: FactoryClassMethodKey; - protected extras: ExtraModuleDefinitionOptions; - protected transformModuleDefinition: (definition: DynamicModule, extraOptions: ExtraModuleDefinitionOptions) => DynamicModule; - protected readonly logger: Logger; - constructor(options?: ConfigurableModuleBuilderOptions, parentBuilder?: ConfigurableModuleBuilder); - /** - * Registers the "extras" object (a set of extra options that can be used to modify the dynamic module definition). - * Values you specify within the "extras" object will be used as default values (that can be overridden by module consumers). - * - * This method also applies the so-called "module definition transform function" that takes the auto-generated - * dynamic module object ("DynamicModule") and the actual consumer "extras" object as input parameters. - * The "extras" object consists of values explicitly specified by module consumers and default values. - * - * @example - * ```typescript - * .setExtras<{ isGlobal?: boolean }>({ isGlobal: false }, (definition, extras) => - * ({ ...definition, global: extras.isGlobal }) - * ) - * ``` - */ - setExtras(extras: ExtraModuleDefinitionOptions, transformDefinition?: (definition: DynamicModule, extras: ExtraModuleDefinitionOptions) => DynamicModule): ConfigurableModuleBuilder; - /** - * Dynamic modules must expose public static methods that let you pass in - * configuration parameters (control the module's behavior from the outside). - * Some frequently used names that you may have seen in other modules are: - * "forRoot", "forFeature", "register", "configure". - * - * This method "setClassMethodName" lets you specify the name of the - * method that will be auto-generated. - * - * @param key name of the method - */ - setClassMethodName(key: StaticMethodKey): ConfigurableModuleBuilder; - /** - * Asynchronously configured modules (that rely on other modules, i.e. "ConfigModule") - * let you pass the configuration factory class that will be registered and instantiated as a provider. - * This provider then will be used to retrieve the module's configuration. To provide the configuration, - * the corresponding factory method must be implemented. - * - * This method ("setFactoryMethodName") lets you control what method name will have to be - * implemented by the config factory (default is "create"). - * - * @param key name of the method - */ - setFactoryMethodName(key: FactoryClassMethodKey): ConfigurableModuleBuilder; - /** - * Returns an object consisting of multiple properties that lets you - * easily construct dynamic configurable modules. See "ConfigurableModuleHost" interface for more details. - */ - build(): ConfigurableModuleHost; - private constructInjectionTokenString; - private createConfigurableModuleCls; - private createTypeProxy; -} diff --git a/node_modules/@nestjs/common/module-utils/configurable-module.builder.js b/node_modules/@nestjs/common/module-utils/configurable-module.builder.js deleted file mode 100644 index 136bfd4..0000000 --- a/node_modules/@nestjs/common/module-utils/configurable-module.builder.js +++ /dev/null @@ -1,219 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ConfigurableModuleBuilder = void 0; -const logger_service_1 = require("../services/logger.service"); -const random_string_generator_util_1 = require("../utils/random-string-generator.util"); -const constants_1 = require("./constants"); -const utils_1 = require("./utils"); -/** - * Factory that lets you create configurable modules and - * provides a way to reduce the majority of dynamic module boilerplate. - * - * @publicApi - */ -class ConfigurableModuleBuilder { - constructor(options = {}, parentBuilder) { - this.options = options; - this.logger = new logger_service_1.Logger(ConfigurableModuleBuilder.name); - if (parentBuilder) { - this.staticMethodKey = parentBuilder.staticMethodKey; - this.factoryClassMethodKey = - parentBuilder.factoryClassMethodKey; - this.transformModuleDefinition = - parentBuilder.transformModuleDefinition; - this.extras = parentBuilder.extras; - } - } - /** - * Registers the "extras" object (a set of extra options that can be used to modify the dynamic module definition). - * Values you specify within the "extras" object will be used as default values (that can be overridden by module consumers). - * - * This method also applies the so-called "module definition transform function" that takes the auto-generated - * dynamic module object ("DynamicModule") and the actual consumer "extras" object as input parameters. - * The "extras" object consists of values explicitly specified by module consumers and default values. - * - * @example - * ```typescript - * .setExtras<{ isGlobal?: boolean }>({ isGlobal: false }, (definition, extras) => - * ({ ...definition, global: extras.isGlobal }) - * ) - * ``` - */ - setExtras(extras, transformDefinition = def => def) { - const builder = new ConfigurableModuleBuilder(this.options, this); - builder.extras = extras; - builder.transformModuleDefinition = transformDefinition; - return builder; - } - /** - * Dynamic modules must expose public static methods that let you pass in - * configuration parameters (control the module's behavior from the outside). - * Some frequently used names that you may have seen in other modules are: - * "forRoot", "forFeature", "register", "configure". - * - * This method "setClassMethodName" lets you specify the name of the - * method that will be auto-generated. - * - * @param key name of the method - */ - setClassMethodName(key) { - const builder = new ConfigurableModuleBuilder(this.options, this); - builder.staticMethodKey = key; - return builder; - } - /** - * Asynchronously configured modules (that rely on other modules, i.e. "ConfigModule") - * let you pass the configuration factory class that will be registered and instantiated as a provider. - * This provider then will be used to retrieve the module's configuration. To provide the configuration, - * the corresponding factory method must be implemented. - * - * This method ("setFactoryMethodName") lets you control what method name will have to be - * implemented by the config factory (default is "create"). - * - * @param key name of the method - */ - setFactoryMethodName(key) { - const builder = new ConfigurableModuleBuilder(this.options, this); - builder.factoryClassMethodKey = key; - return builder; - } - /** - * Returns an object consisting of multiple properties that lets you - * easily construct dynamic configurable modules. See "ConfigurableModuleHost" interface for more details. - */ - build() { - this.staticMethodKey ??= constants_1.DEFAULT_METHOD_KEY; - this.factoryClassMethodKey ??= - constants_1.DEFAULT_FACTORY_CLASS_METHOD_KEY; - this.options.optionsInjectionToken ??= this.options.moduleName - ? this.constructInjectionTokenString() - : (0, utils_1.generateOptionsInjectionToken)(); - this.transformModuleDefinition ??= definition => definition; - return { - ConfigurableModuleClass: this.createConfigurableModuleCls(), - MODULE_OPTIONS_TOKEN: this.options.optionsInjectionToken, - ASYNC_OPTIONS_TYPE: this.createTypeProxy('ASYNC_OPTIONS_TYPE'), - OPTIONS_TYPE: this.createTypeProxy('OPTIONS_TYPE'), - }; - } - constructInjectionTokenString() { - const moduleNameInSnakeCase = this.options - .moduleName.trim() - .split(/(?=[A-Z])/) - .join('_') - .toUpperCase(); - return `${moduleNameInSnakeCase}_MODULE_OPTIONS`; - } - createConfigurableModuleCls() { - // eslint-disable-next-line @typescript-eslint/no-this-alias - const self = this; - const asyncMethodKey = this.staticMethodKey + constants_1.ASYNC_METHOD_SUFFIX; - class InternalModuleClass { - static [self.staticMethodKey](options) { - const providers = [ - { - provide: self.options.optionsInjectionToken, - useValue: this.omitExtras(options, self.extras), - }, - ]; - if (self.options.alwaysTransient) { - providers.push({ - provide: constants_1.CONFIGURABLE_MODULE_ID, - useValue: (0, random_string_generator_util_1.randomStringGenerator)(), - }); - } - return self.transformModuleDefinition({ - module: this, - providers, - }, { - ...self.extras, - ...options, - }); - } - static [asyncMethodKey](options) { - const providers = this.createAsyncProviders(options); - if (self.options.alwaysTransient) { - providers.push({ - provide: constants_1.CONFIGURABLE_MODULE_ID, - useValue: (0, random_string_generator_util_1.randomStringGenerator)(), - }); - } - return self.transformModuleDefinition({ - module: this, - imports: options.imports || [], - providers, - }, { - ...self.extras, - ...this.extractExtrasFromAsyncOptions(options, self.extras), - }); - } - static omitExtras(input, extras) { - if (!extras) { - return input; - } - const moduleOptions = {}; - const extrasKeys = Object.keys(extras); - Object.keys(input) - .filter(key => !extrasKeys.includes(key)) - .forEach(key => { - moduleOptions[key] = input[key]; - }); - return moduleOptions; - } - static extractExtrasFromAsyncOptions(input, extras) { - if (!extras) { - return {}; - } - const extrasOptions = {}; - Object.keys(input) - .filter(key => !constants_1.ASYNC_OPTIONS_METADATA_KEYS.includes(key)) - .forEach(key => { - extrasOptions[key] = input[key]; - }); - return extrasOptions; - } - static createAsyncProviders(options) { - if (options.useExisting || options.useFactory) { - if (options.inject && options.provideInjectionTokensFrom) { - return [ - this.createAsyncOptionsProvider(options), - ...(0, utils_1.getInjectionProviders)(options.provideInjectionTokensFrom, options.inject), - ]; - } - return [this.createAsyncOptionsProvider(options)]; - } - return [ - this.createAsyncOptionsProvider(options), - { - provide: options.useClass, - useClass: options.useClass, - }, - ]; - } - static createAsyncOptionsProvider(options) { - if (options.useFactory) { - return { - provide: self.options.optionsInjectionToken, - useFactory: options.useFactory, - inject: options.inject || [], - }; - } - return { - provide: self.options.optionsInjectionToken, - useFactory: async (optionsFactory) => await optionsFactory[self.factoryClassMethodKey](), - inject: [options.useExisting || options.useClass], - }; - } - } - return InternalModuleClass; - } - createTypeProxy(typeName) { - const proxy = new Proxy({}, { - get: () => { - throw new Error(`"${typeName}" is not supposed to be used as a value.`); - }, - }); - return proxy; - } -} -exports.ConfigurableModuleBuilder = ConfigurableModuleBuilder; diff --git a/node_modules/@nestjs/common/module-utils/constants.d.ts b/node_modules/@nestjs/common/module-utils/constants.d.ts deleted file mode 100644 index a81f627..0000000 --- a/node_modules/@nestjs/common/module-utils/constants.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export declare const DEFAULT_METHOD_KEY = "register"; -export declare const DEFAULT_FACTORY_CLASS_METHOD_KEY = "create"; -export declare const ASYNC_METHOD_SUFFIX = "Async"; -export declare const CONFIGURABLE_MODULE_ID = "CONFIGURABLE_MODULE_ID"; -/** - * List of keys that are specific to ConfigurableModuleAsyncOptions - * and should be excluded when extracting user-defined extras. - */ -export declare const ASYNC_OPTIONS_METADATA_KEYS: readonly ["useFactory", "useClass", "useExisting", "inject", "imports", "provideInjectionTokensFrom"]; diff --git a/node_modules/@nestjs/common/module-utils/constants.js b/node_modules/@nestjs/common/module-utils/constants.js deleted file mode 100644 index 453b267..0000000 --- a/node_modules/@nestjs/common/module-utils/constants.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ASYNC_OPTIONS_METADATA_KEYS = exports.CONFIGURABLE_MODULE_ID = exports.ASYNC_METHOD_SUFFIX = exports.DEFAULT_FACTORY_CLASS_METHOD_KEY = exports.DEFAULT_METHOD_KEY = void 0; -exports.DEFAULT_METHOD_KEY = 'register'; -exports.DEFAULT_FACTORY_CLASS_METHOD_KEY = 'create'; -exports.ASYNC_METHOD_SUFFIX = 'Async'; -exports.CONFIGURABLE_MODULE_ID = 'CONFIGURABLE_MODULE_ID'; -/** - * List of keys that are specific to ConfigurableModuleAsyncOptions - * and should be excluded when extracting user-defined extras. - */ -exports.ASYNC_OPTIONS_METADATA_KEYS = [ - 'useFactory', - 'useClass', - 'useExisting', - 'inject', - 'imports', - 'provideInjectionTokensFrom', -]; diff --git a/node_modules/@nestjs/common/module-utils/index.d.ts b/node_modules/@nestjs/common/module-utils/index.d.ts deleted file mode 100644 index 4393992..0000000 --- a/node_modules/@nestjs/common/module-utils/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './configurable-module.builder'; -export * from './interfaces'; diff --git a/node_modules/@nestjs/common/module-utils/index.js b/node_modules/@nestjs/common/module-utils/index.js deleted file mode 100644 index be437f6..0000000 --- a/node_modules/@nestjs/common/module-utils/index.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./configurable-module.builder"), exports); -tslib_1.__exportStar(require("./interfaces"), exports); diff --git a/node_modules/@nestjs/common/module-utils/interfaces/configurable-module-async-options.interface.d.ts b/node_modules/@nestjs/common/module-utils/interfaces/configurable-module-async-options.interface.d.ts deleted file mode 100644 index 5ae5fef..0000000 --- a/node_modules/@nestjs/common/module-utils/interfaces/configurable-module-async-options.interface.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { FactoryProvider, ModuleMetadata, Provider, Type } from '../../interfaces'; -import { DEFAULT_FACTORY_CLASS_METHOD_KEY } from '../constants'; -/** - * Interface that must be implemented by the module options factory class. - * Method key varies depending on the "FactoryClassMethodKey" type argument. - * - * @publicApi - */ -export type ConfigurableModuleOptionsFactory = Record<`${FactoryClassMethodKey}`, () => Promise | ModuleOptions>; -/** - * Interface that represents the module async options object - * Factory method name varies depending on the "FactoryClassMethodKey" type argument. - * - * @publicApi - */ -export interface ConfigurableModuleAsyncOptions extends Pick { - /** - * Injection token resolving to an existing provider. The provider must implement - * the corresponding interface. - */ - useExisting?: Type>; - /** - * Injection token resolving to a class that will be instantiated as a provider. - * The class must implement the corresponding interface. - */ - useClass?: Type>; - /** - * Function returning options (or a Promise resolving to options) to configure the - * module. - */ - useFactory?: (...args: any[]) => Promise | ModuleOptions; - /** - * Dependencies that a Factory may inject. - */ - inject?: FactoryProvider['inject']; - /** - * List of parent module's providers that will be filtered to only provide necessary - * providers for the 'inject' array - * useful to pass options to nested async modules - */ - provideInjectionTokensFrom?: Provider[]; -} diff --git a/node_modules/@nestjs/common/module-utils/interfaces/configurable-module-async-options.interface.js b/node_modules/@nestjs/common/module-utils/interfaces/configurable-module-async-options.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/module-utils/interfaces/configurable-module-async-options.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/module-utils/interfaces/configurable-module-cls.interface.d.ts b/node_modules/@nestjs/common/module-utils/interfaces/configurable-module-cls.interface.d.ts deleted file mode 100644 index a53bda3..0000000 --- a/node_modules/@nestjs/common/module-utils/interfaces/configurable-module-cls.interface.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { DynamicModule } from '../../interfaces'; -import { DEFAULT_FACTORY_CLASS_METHOD_KEY, DEFAULT_METHOD_KEY } from '../constants'; -import { ConfigurableModuleAsyncOptions } from './configurable-module-async-options.interface'; -/** - * Class that represents a blueprint/prototype for a configurable Nest module. - * This class provides static methods for constructing dynamic modules. Their names - * can be controlled through the "MethodKey" type argument. - * - * @publicApi - */ -export type ConfigurableModuleCls = { - new (): any; -} & Record<`${MethodKey}`, (options: ModuleOptions & Partial) => DynamicModule> & Record<`${MethodKey}Async`, (options: ConfigurableModuleAsyncOptions & Partial) => DynamicModule>; diff --git a/node_modules/@nestjs/common/module-utils/interfaces/configurable-module-cls.interface.js b/node_modules/@nestjs/common/module-utils/interfaces/configurable-module-cls.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/module-utils/interfaces/configurable-module-cls.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/module-utils/interfaces/configurable-module-host.interface.d.ts b/node_modules/@nestjs/common/module-utils/interfaces/configurable-module-host.interface.d.ts deleted file mode 100644 index 564b3de..0000000 --- a/node_modules/@nestjs/common/module-utils/interfaces/configurable-module-host.interface.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { ConfigurableModuleAsyncOptions } from './configurable-module-async-options.interface'; -import { ConfigurableModuleCls } from './configurable-module-cls.interface'; -/** - * Configurable module host. See properties for more details - * - * @publicApi - */ -export interface ConfigurableModuleHost, MethodKey extends string = string, FactoryClassMethodKey extends string = string, ExtraModuleDefinitionOptions = {}> { - /** - * Class that represents a blueprint/prototype for a configurable Nest module. - * This class provides static methods for constructing dynamic modules. Their names - * can be controlled through the "MethodKey" type argument. - * - * Your module class should inherit from this class to make the static methods available. - * - * @example - * ```typescript - * @Module({}) - * class IntegrationModule extends ConfigurableModuleCls { - * // ... - * } - * ``` - */ - ConfigurableModuleClass: ConfigurableModuleCls; - /** - * Module options provider token. Can be used to inject the "options object" to - * providers registered within the host module. - */ - MODULE_OPTIONS_TOKEN: string | symbol; - /** - * Can be used to auto-infer the compound "async module options" type. - * Note: this property is not supposed to be used as a value. - * - * @example - * ```typescript - * @Module({}) - * class IntegrationModule extends ConfigurableModuleCls { - * static module = initializer(IntegrationModule); - * - * static registerAsync(options: typeof ASYNC_OPTIONS_TYPE): DynamicModule { - * return super.registerAsync(options); - * } - * ``` - */ - ASYNC_OPTIONS_TYPE: ConfigurableModuleAsyncOptions & Partial; - /** - * Can be used to auto-infer the compound "module options" type (options interface + extra module definition options). - * Note: this property is not supposed to be used as a value. - * - * @example - * ```typescript - * @Module({}) - * class IntegrationModule extends ConfigurableModuleCls { - * static module = initializer(IntegrationModule); - * - * static register(options: typeof OPTIONS_TYPE): DynamicModule { - * return super.register(options); - * } - * ``` - */ - OPTIONS_TYPE: ModuleOptions & Partial; -} diff --git a/node_modules/@nestjs/common/module-utils/interfaces/configurable-module-host.interface.js b/node_modules/@nestjs/common/module-utils/interfaces/configurable-module-host.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/module-utils/interfaces/configurable-module-host.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/module-utils/interfaces/index.d.ts b/node_modules/@nestjs/common/module-utils/interfaces/index.d.ts deleted file mode 100644 index 35c5230..0000000 --- a/node_modules/@nestjs/common/module-utils/interfaces/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './configurable-module-async-options.interface'; -export * from './configurable-module-cls.interface'; -export * from './configurable-module-host.interface'; diff --git a/node_modules/@nestjs/common/module-utils/interfaces/index.js b/node_modules/@nestjs/common/module-utils/interfaces/index.js deleted file mode 100644 index f030ac6..0000000 --- a/node_modules/@nestjs/common/module-utils/interfaces/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./configurable-module-async-options.interface"), exports); -tslib_1.__exportStar(require("./configurable-module-cls.interface"), exports); -tslib_1.__exportStar(require("./configurable-module-host.interface"), exports); diff --git a/node_modules/@nestjs/common/module-utils/utils/generate-options-injection-token.util.d.ts b/node_modules/@nestjs/common/module-utils/utils/generate-options-injection-token.util.d.ts deleted file mode 100644 index 309890c..0000000 --- a/node_modules/@nestjs/common/module-utils/utils/generate-options-injection-token.util.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function generateOptionsInjectionToken(): string; diff --git a/node_modules/@nestjs/common/module-utils/utils/generate-options-injection-token.util.js b/node_modules/@nestjs/common/module-utils/utils/generate-options-injection-token.util.js deleted file mode 100644 index bf4cc71..0000000 --- a/node_modules/@nestjs/common/module-utils/utils/generate-options-injection-token.util.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.generateOptionsInjectionToken = generateOptionsInjectionToken; -const random_string_generator_util_1 = require("../../utils/random-string-generator.util"); -function generateOptionsInjectionToken() { - const hash = (0, random_string_generator_util_1.randomStringGenerator)(); - return `CONFIGURABLE_MODULE_OPTIONS[${hash}]`; -} diff --git a/node_modules/@nestjs/common/module-utils/utils/get-injection-providers.util.d.ts b/node_modules/@nestjs/common/module-utils/utils/get-injection-providers.util.d.ts deleted file mode 100644 index 2fd5479..0000000 --- a/node_modules/@nestjs/common/module-utils/utils/get-injection-providers.util.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { FactoryProvider, Provider } from '../../interfaces'; -/** - * - * @param providers List of a module's providers - * @param tokens Injection tokens needed for a useFactory function (usually the module's options' token) - * @returns All the providers needed for the tokens' injection (searched recursively) - */ -export declare function getInjectionProviders(providers: Provider[], tokens: FactoryProvider['inject']): Provider[]; diff --git a/node_modules/@nestjs/common/module-utils/utils/get-injection-providers.util.js b/node_modules/@nestjs/common/module-utils/utils/get-injection-providers.util.js deleted file mode 100644 index 1069b1e..0000000 --- a/node_modules/@nestjs/common/module-utils/utils/get-injection-providers.util.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getInjectionProviders = getInjectionProviders; -const shared_utils_1 = require("../../utils/shared.utils"); -/** - * @param value - * @returns `true` if value is `OptionalFactoryDependency` - */ -function isOptionalFactoryDependency(value) { - return (!(0, shared_utils_1.isUndefined)(value.token) && - !(0, shared_utils_1.isUndefined)(value.optional) && - !value.prototype); -} -const mapInjectToTokens = (t) => isOptionalFactoryDependency(t) ? t.token : t; -/** - * - * @param providers List of a module's providers - * @param tokens Injection tokens needed for a useFactory function (usually the module's options' token) - * @returns All the providers needed for the tokens' injection (searched recursively) - */ -function getInjectionProviders(providers, tokens) { - const result = []; - let search = tokens.map(mapInjectToTokens); - while (search.length > 0) { - const match = (providers ?? []).filter(p => !result.includes(p) && // this prevents circular loops and duplication - (search.includes(p) || search.includes(p?.provide))); - result.push(...match); - // get injection tokens of the matched providers, if any - search = match - .filter(p => p?.inject) - .flatMap(p => p.inject) - .map(mapInjectToTokens); - } - return result; -} diff --git a/node_modules/@nestjs/common/module-utils/utils/index.d.ts b/node_modules/@nestjs/common/module-utils/utils/index.d.ts deleted file mode 100644 index 7125be0..0000000 --- a/node_modules/@nestjs/common/module-utils/utils/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './generate-options-injection-token.util'; -export * from './get-injection-providers.util'; diff --git a/node_modules/@nestjs/common/module-utils/utils/index.js b/node_modules/@nestjs/common/module-utils/utils/index.js deleted file mode 100644 index 88efd09..0000000 --- a/node_modules/@nestjs/common/module-utils/utils/index.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./generate-options-injection-token.util"), exports); -tslib_1.__exportStar(require("./get-injection-providers.util"), exports); diff --git a/node_modules/@nestjs/common/package.json b/node_modules/@nestjs/common/package.json deleted file mode 100644 index 8f5b5fc..0000000 --- a/node_modules/@nestjs/common/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "@nestjs/common", - "version": "11.1.17", - "description": "Nest - modern, fast, powerful node.js web framework (@common)", - "author": "Kamil Mysliwiec", - "homepage": "https://nestjs.com", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/nest" - }, - "repository": { - "type": "git", - "url": "https://github.com/nestjs/nest.git", - "directory": "packages/common" - }, - "publishConfig": { - "access": "public" - }, - "license": "MIT", - "dependencies": { - "file-type": "21.3.2", - "iterare": "1.2.1", - "load-esm": "1.0.3", - "tslib": "2.8.1", - "uid": "2.0.2" - }, - "peerDependencies": { - "class-transformer": ">=0.4.1", - "class-validator": ">=0.13.2", - "reflect-metadata": "^0.1.12 || ^0.2.0", - "rxjs": "^7.1.0" - }, - "peerDependenciesMeta": { - "class-validator": { - "optional": true - }, - "class-transformer": { - "optional": true - } - }, - "gitHead": "447a373ebebd2c58b5b3c8d718f25922a025f2fe" -} diff --git a/node_modules/@nestjs/common/pipes/default-value.pipe.d.ts b/node_modules/@nestjs/common/pipes/default-value.pipe.d.ts deleted file mode 100644 index a4af7ad..0000000 --- a/node_modules/@nestjs/common/pipes/default-value.pipe.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { ArgumentMetadata, PipeTransform } from '../interfaces/features/pipe-transform.interface'; -/** - * Defines the built-in DefaultValue Pipe - * - * @see [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes) - * - * @publicApi - */ -export declare class DefaultValuePipe implements PipeTransform { - protected readonly defaultValue: R; - constructor(defaultValue: R); - transform(value?: T, _metadata?: ArgumentMetadata): T | R; -} diff --git a/node_modules/@nestjs/common/pipes/default-value.pipe.js b/node_modules/@nestjs/common/pipes/default-value.pipe.js deleted file mode 100644 index 1c7eee9..0000000 --- a/node_modules/@nestjs/common/pipes/default-value.pipe.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DefaultValuePipe = void 0; -const tslib_1 = require("tslib"); -const injectable_decorator_1 = require("../decorators/core/injectable.decorator"); -const shared_utils_1 = require("../utils/shared.utils"); -/** - * Defines the built-in DefaultValue Pipe - * - * @see [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes) - * - * @publicApi - */ -let DefaultValuePipe = class DefaultValuePipe { - constructor(defaultValue) { - this.defaultValue = defaultValue; - } - transform(value, _metadata) { - if ((0, shared_utils_1.isNil)(value) || - ((0, shared_utils_1.isNumber)(value) && isNaN(value))) { - return this.defaultValue; - } - return value; - } -}; -exports.DefaultValuePipe = DefaultValuePipe; -exports.DefaultValuePipe = DefaultValuePipe = tslib_1.__decorate([ - (0, injectable_decorator_1.Injectable)(), - tslib_1.__metadata("design:paramtypes", [Object]) -], DefaultValuePipe); diff --git a/node_modules/@nestjs/common/pipes/file/file-type.validator.d.ts b/node_modules/@nestjs/common/pipes/file/file-type.validator.d.ts deleted file mode 100644 index 96dbd7c..0000000 --- a/node_modules/@nestjs/common/pipes/file/file-type.validator.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { FileValidatorContext } from './file-validator-context.interface'; -import { FileValidator } from './file-validator.interface'; -import { IFile } from './interfaces'; -type FileTypeValidatorContext = FileValidatorContext>; -export type FileTypeValidatorOptions = { - /** - * Expected file type(s) for validation. Can be a string (MIME type) - * or a regular expression to match multiple types. - * - * @example - * // Match a single MIME type - * fileType: 'image/png' - * - * @example - * // Match multiple types using RegExp - * fileType: /^image\/(png|jpeg)$/ - */ - fileType: string | RegExp; - /** - * Custom error message displayed when file type validation fails - * Can be provided as a static string, or as a factory function - * that receives the validation context (file and validator configuration) - * and returns a dynamic error message. - * - * @example - * // Static message - * new FileTypeValidator({ fileType: 'image/png', errorMessage: 'Only PNG allowed' }) - * - * @example - * // Dynamic message based on file object and validator configuration - * new FileTypeValidator({ - * fileType: 'image/png', - * errorMessage: ctx => `Received file type '${ctx.file?.mimetype}', but expected '${ctx.config.fileType}'` - * }) - */ - errorMessage?: string | ((ctx: FileTypeValidatorContext) => string); - /** - * If `true`, the validator will skip the magic numbers validation. - * This can be useful when you can't identify some files as there are no common magic numbers available for some file types. - * @default false - */ - skipMagicNumbersValidation?: boolean; - /** - * If `true`, and magic number check fails, fallback to mimetype comparison. - * @default false - */ - fallbackToMimetype?: boolean; -}; -/** - * Defines the built-in FileTypeValidator. It validates incoming files by examining - * their magic numbers using the file-type package, providing more reliable file type validation - * than just checking the mimetype string. - * - * @see [File Validators](https://docs.nestjs.com/techniques/file-upload#validators) - * - * @publicApi - */ -export declare class FileTypeValidator extends FileValidator { - buildErrorMessage(file?: IFile): string; - isValid(file?: IFile): Promise; -} -export {}; diff --git a/node_modules/@nestjs/common/pipes/file/file-type.validator.js b/node_modules/@nestjs/common/pipes/file/file-type.validator.js deleted file mode 100644 index a576b8e..0000000 --- a/node_modules/@nestjs/common/pipes/file/file-type.validator.js +++ /dev/null @@ -1,102 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.FileTypeValidator = void 0; -const url_1 = require("url"); -const logger_service_1 = require("../../services/logger.service"); -const file_validator_interface_1 = require("./file-validator.interface"); -const load_esm_1 = require("load-esm"); -const logger = new logger_service_1.Logger('FileTypeValidator'); -/** - * Defines the built-in FileTypeValidator. It validates incoming files by examining - * their magic numbers using the file-type package, providing more reliable file type validation - * than just checking the mimetype string. - * - * @see [File Validators](https://docs.nestjs.com/techniques/file-upload#validators) - * - * @publicApi - */ -class FileTypeValidator extends file_validator_interface_1.FileValidator { - buildErrorMessage(file) { - const { errorMessage, ...config } = this.validationOptions; - if (errorMessage) { - return typeof errorMessage === 'function' - ? errorMessage({ file, config }) - : errorMessage; - } - if (file?.mimetype) { - const baseMessage = `Validation failed (current file type is ${file.mimetype}, expected type is ${this.validationOptions.fileType})`; - /** - * If fallbackToMimetype is enabled, this means the validator failed to detect the file type - * via magic number inspection (e.g. due to an unknown or too short buffer), - * and instead used the mimetype string provided by the client as a fallback. - * - * This message clarifies that fallback logic was used, in case users rely on file signatures. - */ - if (this.validationOptions.fallbackToMimetype) { - return `${baseMessage} - magic number detection failed, used mimetype fallback`; - } - return baseMessage; - } - return `Validation failed (expected type is ${this.validationOptions.fileType})`; - } - async isValid(file) { - if (!this.validationOptions) { - return true; - } - const isFileValid = !!file && 'mimetype' in file; - // Skip magic number validation if set - if (this.validationOptions.skipMagicNumbersValidation) { - return (isFileValid && !!file.mimetype.match(this.validationOptions.fileType)); - } - if (!isFileValid) - return false; - if (!file.buffer) { - if (this.validationOptions.fallbackToMimetype) { - return !!file.mimetype.match(this.validationOptions.fileType); - } - return false; - } - try { - let fileTypeModule; - try { - const resolvedPath = require.resolve('file-type'); - fileTypeModule = (0, url_1.pathToFileURL)(resolvedPath).href; - } - catch { - fileTypeModule = 'file-type'; - } - const { fileTypeFromBuffer } = await (0, load_esm_1.loadEsm)(fileTypeModule); - const fileType = await fileTypeFromBuffer(file.buffer); - if (fileType) { - // Match detected mime type against allowed type - return !!fileType.mime.match(this.validationOptions.fileType); - } - /** - * Fallback logic: If file-type cannot detect magic number (e.g. file too small), - * Optionally fall back to mimetype string for compatibility. - * This is useful for plain text, CSVs, or files without recognizable signatures. - */ - if (this.validationOptions.fallbackToMimetype) { - return !!file.mimetype.match(this.validationOptions.fileType); - } - return false; - } - catch (error) { - const errorMessage = error instanceof Error ? error.message : String(error); - // Check for common ESM loading issues - if (errorMessage.includes('ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING') || - errorMessage.includes('Cannot find module') || - errorMessage.includes('ERR_MODULE_NOT_FOUND')) { - logger.warn(`Failed to load the "file-type" package for magic number validation. ` + - `If you are using Jest, run it with NODE_OPTIONS="--experimental-vm-modules". ` + - `Error: ${errorMessage}`); - } - // Fallback to mimetype if enabled - if (this.validationOptions.fallbackToMimetype) { - return !!file.mimetype.match(this.validationOptions.fileType); - } - return false; - } - } -} -exports.FileTypeValidator = FileTypeValidator; diff --git a/node_modules/@nestjs/common/pipes/file/file-validator-context.interface.d.ts b/node_modules/@nestjs/common/pipes/file/file-validator-context.interface.d.ts deleted file mode 100644 index a3c01e6..0000000 --- a/node_modules/@nestjs/common/pipes/file/file-validator-context.interface.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IFile } from './interfaces'; -export type FileValidatorContext = { - file?: IFile; - config: TConfig; -}; diff --git a/node_modules/@nestjs/common/pipes/file/file-validator-context.interface.js b/node_modules/@nestjs/common/pipes/file/file-validator-context.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/pipes/file/file-validator-context.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/pipes/file/file-validator.interface.d.ts b/node_modules/@nestjs/common/pipes/file/file-validator.interface.d.ts deleted file mode 100644 index 1d1198d..0000000 --- a/node_modules/@nestjs/common/pipes/file/file-validator.interface.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { IFile } from './interfaces'; -/** - * Interface describing FileValidators, which can be added to a ParseFilePipe - * - * @see {ParseFilePipe} - * @publicApi - */ -export declare abstract class FileValidator, TFile extends IFile = IFile> { - protected readonly validationOptions: TValidationOptions; - constructor(validationOptions: TValidationOptions); - /** - * Indicates if this file should be considered valid, according to the options passed in the constructor. - * @param file the file from the request object - */ - abstract isValid(file?: TFile | TFile[] | Record): boolean | Promise; - /** - * Builds an error message in case the validation fails. - * @param file the file from the request object - */ - abstract buildErrorMessage(file: any): string; -} diff --git a/node_modules/@nestjs/common/pipes/file/file-validator.interface.js b/node_modules/@nestjs/common/pipes/file/file-validator.interface.js deleted file mode 100644 index 51accc6..0000000 --- a/node_modules/@nestjs/common/pipes/file/file-validator.interface.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.FileValidator = void 0; -/** - * Interface describing FileValidators, which can be added to a ParseFilePipe - * - * @see {ParseFilePipe} - * @publicApi - */ -class FileValidator { - constructor(validationOptions) { - this.validationOptions = validationOptions; - } -} -exports.FileValidator = FileValidator; diff --git a/node_modules/@nestjs/common/pipes/file/index.d.ts b/node_modules/@nestjs/common/pipes/file/index.d.ts deleted file mode 100644 index 11d19e3..0000000 --- a/node_modules/@nestjs/common/pipes/file/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './file-type.validator'; -export * from './file-validator.interface'; -export * from './max-file-size.validator'; -export * from './parse-file-options.interface'; -export * from './parse-file.pipe'; -export * from './parse-file-pipe.builder'; diff --git a/node_modules/@nestjs/common/pipes/file/index.js b/node_modules/@nestjs/common/pipes/file/index.js deleted file mode 100644 index 1230093..0000000 --- a/node_modules/@nestjs/common/pipes/file/index.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./file-type.validator"), exports); -tslib_1.__exportStar(require("./file-validator.interface"), exports); -tslib_1.__exportStar(require("./max-file-size.validator"), exports); -tslib_1.__exportStar(require("./parse-file-options.interface"), exports); -tslib_1.__exportStar(require("./parse-file.pipe"), exports); -tslib_1.__exportStar(require("./parse-file-pipe.builder"), exports); diff --git a/node_modules/@nestjs/common/pipes/file/interfaces/file.interface.d.ts b/node_modules/@nestjs/common/pipes/file/interfaces/file.interface.d.ts deleted file mode 100644 index 9d6162e..0000000 --- a/node_modules/@nestjs/common/pipes/file/interfaces/file.interface.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface IFile { - mimetype: string; - size: number; - buffer?: Buffer; -} diff --git a/node_modules/@nestjs/common/pipes/file/interfaces/file.interface.js b/node_modules/@nestjs/common/pipes/file/interfaces/file.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/pipes/file/interfaces/file.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/pipes/file/interfaces/index.d.ts b/node_modules/@nestjs/common/pipes/file/interfaces/index.d.ts deleted file mode 100644 index 09d8f3c..0000000 --- a/node_modules/@nestjs/common/pipes/file/interfaces/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './file.interface'; diff --git a/node_modules/@nestjs/common/pipes/file/interfaces/index.js b/node_modules/@nestjs/common/pipes/file/interfaces/index.js deleted file mode 100644 index 465358b..0000000 --- a/node_modules/@nestjs/common/pipes/file/interfaces/index.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./file.interface"), exports); diff --git a/node_modules/@nestjs/common/pipes/file/max-file-size.validator.d.ts b/node_modules/@nestjs/common/pipes/file/max-file-size.validator.d.ts deleted file mode 100644 index 3557da0..0000000 --- a/node_modules/@nestjs/common/pipes/file/max-file-size.validator.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { FileValidatorContext } from './file-validator-context.interface'; -import { FileValidator } from './file-validator.interface'; -import { IFile } from './interfaces'; -type MaxFileSizeValidatorContext = FileValidatorContext>; -export type MaxFileSizeValidatorOptions = { - /** - * Maximum allowed file size in bytes. - */ - maxSize: number; - /** - * @deprecated Use `errorMessage` instead. - */ - message?: string | ((maxSize: number) => string); - /** - * Custom error message returned when file size validation fails. - * Can be provided as a static string, or as a factory function - * that receives the validation context (file and validator configuration) - * and returns a dynamic error message. - * - * @example - * // Static message - * new MaxFileSizeValidator({ maxSize: 1000, errorMessage: 'File size exceeds the limit' }) - * - * @example - * // Dynamic message based on file object and validator configuration - * new MaxFileSizeValidator({ - * maxSize: 1000, - * errorMessage: ctx => `Received file size is ${ctx.file?.size}, but it must be smaller than ${ctx.config.maxSize}.` - * }) - */ - errorMessage?: string | ((ctx: MaxFileSizeValidatorContext) => string); -}; -/** - * Defines the built-in MaxSize File Validator - * - * @see [File Validators](https://docs.nestjs.com/techniques/file-upload#file-validation) - * - * @publicApi - */ -export declare class MaxFileSizeValidator extends FileValidator { - buildErrorMessage(file?: IFile): string; - isValid(file?: IFile): boolean; -} -export {}; diff --git a/node_modules/@nestjs/common/pipes/file/max-file-size.validator.js b/node_modules/@nestjs/common/pipes/file/max-file-size.validator.js deleted file mode 100644 index af3b016..0000000 --- a/node_modules/@nestjs/common/pipes/file/max-file-size.validator.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MaxFileSizeValidator = void 0; -const file_validator_interface_1 = require("./file-validator.interface"); -/** - * Defines the built-in MaxSize File Validator - * - * @see [File Validators](https://docs.nestjs.com/techniques/file-upload#file-validation) - * - * @publicApi - */ -class MaxFileSizeValidator extends file_validator_interface_1.FileValidator { - buildErrorMessage(file) { - const { errorMessage, message, ...config } = this.validationOptions; - if (errorMessage) { - return typeof errorMessage === 'function' - ? errorMessage({ file, config }) - : errorMessage; - } - if (message) { - return typeof message === 'function' - ? message(this.validationOptions.maxSize) - : message; - } - if (file?.size) { - return `Validation failed (current file size is ${file.size}, expected size is less than ${this.validationOptions.maxSize})`; - } - return `Validation failed (expected size is less than ${this.validationOptions.maxSize})`; - } - isValid(file) { - if (!this.validationOptions || !file) { - return true; - } - return 'size' in file && file.size < this.validationOptions.maxSize; - } -} -exports.MaxFileSizeValidator = MaxFileSizeValidator; diff --git a/node_modules/@nestjs/common/pipes/file/parse-file-options.interface.d.ts b/node_modules/@nestjs/common/pipes/file/parse-file-options.interface.d.ts deleted file mode 100644 index 55fa9cf..0000000 --- a/node_modules/@nestjs/common/pipes/file/parse-file-options.interface.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ErrorHttpStatusCode } from '../../utils/http-error-by-code.util'; -import { FileValidator } from './file-validator.interface'; -/** - * @publicApi - */ -export interface ParseFileOptions { - validators?: FileValidator[]; - errorHttpStatusCode?: ErrorHttpStatusCode; - exceptionFactory?: (error: string) => any; - /** - * Defines if file parameter is required. - * @default true - */ - fileIsRequired?: boolean; -} diff --git a/node_modules/@nestjs/common/pipes/file/parse-file-options.interface.js b/node_modules/@nestjs/common/pipes/file/parse-file-options.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/pipes/file/parse-file-options.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/pipes/file/parse-file-pipe.builder.d.ts b/node_modules/@nestjs/common/pipes/file/parse-file-pipe.builder.d.ts deleted file mode 100644 index 282b6f6..0000000 --- a/node_modules/@nestjs/common/pipes/file/parse-file-pipe.builder.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { FileTypeValidatorOptions } from './file-type.validator'; -import { FileValidator } from './file-validator.interface'; -import { MaxFileSizeValidatorOptions } from './max-file-size.validator'; -import { ParseFileOptions } from './parse-file-options.interface'; -import { ParseFilePipe } from './parse-file.pipe'; -/** - * @publicApi - */ -export declare class ParseFilePipeBuilder { - private validators; - addMaxSizeValidator(options: MaxFileSizeValidatorOptions): this; - addFileTypeValidator(options: FileTypeValidatorOptions): this; - addValidator(validator: FileValidator): this; - build(additionalOptions?: Omit): ParseFilePipe; -} diff --git a/node_modules/@nestjs/common/pipes/file/parse-file-pipe.builder.js b/node_modules/@nestjs/common/pipes/file/parse-file-pipe.builder.js deleted file mode 100644 index a33995a..0000000 --- a/node_modules/@nestjs/common/pipes/file/parse-file-pipe.builder.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ParseFilePipeBuilder = void 0; -const file_type_validator_1 = require("./file-type.validator"); -const max_file_size_validator_1 = require("./max-file-size.validator"); -const parse_file_pipe_1 = require("./parse-file.pipe"); -/** - * @publicApi - */ -class ParseFilePipeBuilder { - constructor() { - this.validators = []; - } - addMaxSizeValidator(options) { - return this.addValidator(new max_file_size_validator_1.MaxFileSizeValidator(options)); - } - addFileTypeValidator(options) { - return this.addValidator(new file_type_validator_1.FileTypeValidator(options)); - } - addValidator(validator) { - this.validators.push(validator); - return this; - } - build(additionalOptions) { - const parseFilePipe = new parse_file_pipe_1.ParseFilePipe({ - ...additionalOptions, - validators: this.validators, - }); - this.validators = []; - return parseFilePipe; - } -} -exports.ParseFilePipeBuilder = ParseFilePipeBuilder; diff --git a/node_modules/@nestjs/common/pipes/file/parse-file.pipe.d.ts b/node_modules/@nestjs/common/pipes/file/parse-file.pipe.d.ts deleted file mode 100644 index 1c2796c..0000000 --- a/node_modules/@nestjs/common/pipes/file/parse-file.pipe.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { PipeTransform } from '../../interfaces/features/pipe-transform.interface'; -import { FileValidator } from './file-validator.interface'; -import { ParseFileOptions } from './parse-file-options.interface'; -/** - * Defines the built-in ParseFile Pipe. This pipe can be used to validate incoming files - * with `@UploadedFile()` decorator. You can use either other specific built-in validators - * or provide one of your own, simply implementing it through FileValidator interface - * and adding it to ParseFilePipe's constructor. - * - * @see [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes) - * - * @publicApi - */ -export declare class ParseFilePipe implements PipeTransform { - protected exceptionFactory: (error: string) => any; - private readonly validators; - private readonly fileIsRequired; - constructor(options?: ParseFileOptions); - transform(value: any): Promise; - private validateFilesOrFile; - private thereAreNoFilesIn; - protected validate(file: any): Promise; - private validateOrThrow; - /** - * @returns list of validators used in this pipe. - */ - getValidators(): FileValidator, import("./interfaces").IFile>[]; -} diff --git a/node_modules/@nestjs/common/pipes/file/parse-file.pipe.js b/node_modules/@nestjs/common/pipes/file/parse-file.pipe.js deleted file mode 100644 index 63fec93..0000000 --- a/node_modules/@nestjs/common/pipes/file/parse-file.pipe.js +++ /dev/null @@ -1,76 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ParseFilePipe = void 0; -const tslib_1 = require("tslib"); -const core_1 = require("../../decorators/core"); -const enums_1 = require("../../enums"); -const http_error_by_code_util_1 = require("../../utils/http-error-by-code.util"); -const shared_utils_1 = require("../../utils/shared.utils"); -/** - * Defines the built-in ParseFile Pipe. This pipe can be used to validate incoming files - * with `@UploadedFile()` decorator. You can use either other specific built-in validators - * or provide one of your own, simply implementing it through FileValidator interface - * and adding it to ParseFilePipe's constructor. - * - * @see [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes) - * - * @publicApi - */ -let ParseFilePipe = class ParseFilePipe { - constructor(options = {}) { - const { exceptionFactory, errorHttpStatusCode = enums_1.HttpStatus.BAD_REQUEST, validators = [], fileIsRequired, } = options; - this.exceptionFactory = - exceptionFactory || - (error => new http_error_by_code_util_1.HttpErrorByCode[errorHttpStatusCode](error)); - this.validators = validators; - this.fileIsRequired = fileIsRequired ?? true; - } - async transform(value) { - const areThereAnyFilesIn = this.thereAreNoFilesIn(value); - if (areThereAnyFilesIn && this.fileIsRequired) { - throw this.exceptionFactory('File is required'); - } - if (!areThereAnyFilesIn && this.validators.length) { - await this.validateFilesOrFile(value); - } - return value; - } - async validateFilesOrFile(value) { - if (Array.isArray(value)) { - await Promise.all(value.map(f => this.validate(f))); - } - else { - await this.validate(value); - } - } - thereAreNoFilesIn(value) { - const isEmptyArray = Array.isArray(value) && (0, shared_utils_1.isEmpty)(value); - const isEmptyObject = (0, shared_utils_1.isObject)(value) && (0, shared_utils_1.isEmpty)(Object.keys(value)); - return (0, shared_utils_1.isUndefined)(value) || isEmptyArray || isEmptyObject; - } - async validate(file) { - for (const validator of this.validators) { - await this.validateOrThrow(file, validator); - } - return file; - } - async validateOrThrow(file, validator) { - const isValid = await validator.isValid(file); - if (!isValid) { - const errorMessage = validator.buildErrorMessage(file); - throw this.exceptionFactory(errorMessage); - } - } - /** - * @returns list of validators used in this pipe. - */ - getValidators() { - return this.validators; - } -}; -exports.ParseFilePipe = ParseFilePipe; -exports.ParseFilePipe = ParseFilePipe = tslib_1.__decorate([ - (0, core_1.Injectable)(), - tslib_1.__param(0, (0, core_1.Optional)()), - tslib_1.__metadata("design:paramtypes", [Object]) -], ParseFilePipe); diff --git a/node_modules/@nestjs/common/pipes/index.d.ts b/node_modules/@nestjs/common/pipes/index.d.ts deleted file mode 100644 index f416b94..0000000 --- a/node_modules/@nestjs/common/pipes/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from './default-value.pipe'; -export * from './file'; -export * from './parse-array.pipe'; -export * from './parse-bool.pipe'; -export * from './parse-date.pipe'; -export * from './parse-enum.pipe'; -export * from './parse-float.pipe'; -export * from './parse-int.pipe'; -export * from './parse-uuid.pipe'; -export * from './validation.pipe'; diff --git a/node_modules/@nestjs/common/pipes/index.js b/node_modules/@nestjs/common/pipes/index.js deleted file mode 100644 index cb4ddf8..0000000 --- a/node_modules/@nestjs/common/pipes/index.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./default-value.pipe"), exports); -tslib_1.__exportStar(require("./file"), exports); -tslib_1.__exportStar(require("./parse-array.pipe"), exports); -tslib_1.__exportStar(require("./parse-bool.pipe"), exports); -tslib_1.__exportStar(require("./parse-date.pipe"), exports); -tslib_1.__exportStar(require("./parse-enum.pipe"), exports); -tslib_1.__exportStar(require("./parse-float.pipe"), exports); -tslib_1.__exportStar(require("./parse-int.pipe"), exports); -tslib_1.__exportStar(require("./parse-uuid.pipe"), exports); -tslib_1.__exportStar(require("./validation.pipe"), exports); diff --git a/node_modules/@nestjs/common/pipes/parse-array.pipe.d.ts b/node_modules/@nestjs/common/pipes/parse-array.pipe.d.ts deleted file mode 100644 index e842ec9..0000000 --- a/node_modules/@nestjs/common/pipes/parse-array.pipe.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { Type } from '../interfaces'; -import { ArgumentMetadata, PipeTransform } from '../interfaces/features/pipe-transform.interface'; -import { ValidationPipe, ValidationPipeOptions } from './validation.pipe'; -/** - * @publicApi - */ -export interface ParseArrayOptions extends Omit { - /** - * Type for items to be converted into - */ - items?: Type; - /** - * Items separator to split string by - * @default ',' - */ - separator?: string; - /** - * If true, the pipe will return null or undefined if the value is not provided - * @default false - */ - optional?: boolean; - /** - * A factory function that returns an exception object to be thrown - * if validation fails. - * @param error Error message or object - * @returns The exception object - */ - exceptionFactory?: (error: any) => any; -} -/** - * Defines the built-in ParseArray Pipe - * - * @see [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes) - * - * @publicApi - */ -export declare class ParseArrayPipe implements PipeTransform { - protected readonly options: ParseArrayOptions; - protected readonly validationPipe: ValidationPipe; - protected exceptionFactory: (error: string) => any; - constructor(options?: ParseArrayOptions); - /** - * Method that accesses and performs optional transformation on argument for - * in-flight requests. - * - * @param value currently processed route argument - * @param metadata contains metadata about the currently processed route argument - */ - transform(value: any, metadata: ArgumentMetadata): Promise; - protected isExpectedTypePrimitive(): boolean; - protected validatePrimitive(originalValue: any, index?: number): any; -} diff --git a/node_modules/@nestjs/common/pipes/parse-array.pipe.js b/node_modules/@nestjs/common/pipes/parse-array.pipe.js deleted file mode 100644 index 1a38b4f..0000000 --- a/node_modules/@nestjs/common/pipes/parse-array.pipe.js +++ /dev/null @@ -1,148 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ParseArrayPipe = void 0; -const tslib_1 = require("tslib"); -const injectable_decorator_1 = require("../decorators/core/injectable.decorator"); -const optional_decorator_1 = require("../decorators/core/optional.decorator"); -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_error_by_code_util_1 = require("../utils/http-error-by-code.util"); -const shared_utils_1 = require("../utils/shared.utils"); -const validation_pipe_1 = require("./validation.pipe"); -const VALIDATION_ERROR_MESSAGE = 'Validation failed (parsable array expected)'; -const DEFAULT_ARRAY_SEPARATOR = ','; -/** - * Defines the built-in ParseArray Pipe - * - * @see [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes) - * - * @publicApi - */ -let ParseArrayPipe = class ParseArrayPipe { - constructor(options = {}) { - this.options = options; - this.validationPipe = new validation_pipe_1.ValidationPipe({ - transform: true, - validateCustomDecorators: true, - ...options, - }); - const { exceptionFactory, errorHttpStatusCode = http_status_enum_1.HttpStatus.BAD_REQUEST } = options; - this.exceptionFactory = - exceptionFactory || - (error => new http_error_by_code_util_1.HttpErrorByCode[errorHttpStatusCode](error)); - } - /** - * Method that accesses and performs optional transformation on argument for - * in-flight requests. - * - * @param value currently processed route argument - * @param metadata contains metadata about the currently processed route argument - */ - async transform(value, metadata) { - if (!value && !this.options.optional) { - throw this.exceptionFactory(VALIDATION_ERROR_MESSAGE); - } - else if ((0, shared_utils_1.isNil)(value) && this.options.optional) { - return value; - } - if (!Array.isArray(value)) { - if (!(0, shared_utils_1.isString)(value)) { - throw this.exceptionFactory(VALIDATION_ERROR_MESSAGE); - } - else { - try { - value = value - .trim() - .split(this.options.separator || DEFAULT_ARRAY_SEPARATOR); - } - catch { - throw this.exceptionFactory(VALIDATION_ERROR_MESSAGE); - } - } - } - if (this.options.items) { - const validationMetadata = { - metatype: this.options.items, - type: 'query', - }; - const isExpectedTypePrimitive = this.isExpectedTypePrimitive(); - const toClassInstance = (item, index) => { - if (this.options.items !== String) { - try { - item = JSON.parse(item); - } - catch { - // Do nothing - } - } - if (isExpectedTypePrimitive) { - return this.validatePrimitive(item, index); - } - return this.validationPipe.transform(item, validationMetadata); - }; - if (this.options.stopAtFirstError === false) { - // strict compare to "false" to make sure - // that this option is disabled by default - let errors = []; - const targetArray = value; - for (let i = 0; i < targetArray.length; i++) { - try { - targetArray[i] = await toClassInstance(targetArray[i]); - } - catch (err) { - let message; - if (err.getResponse) { - const response = err.getResponse(); - if (Array.isArray(response.message)) { - message = response.message.map((item) => `[${i}] ${item}`); - } - else { - message = `[${i}] ${response.message}`; - } - } - else { - message = err; - } - errors = errors.concat(message); - } - } - if (errors.length > 0) { - throw this.exceptionFactory(errors); - } - return targetArray; - } - else { - value = await Promise.all(value.map(toClassInstance)); - } - } - return value; - } - isExpectedTypePrimitive() { - return [Boolean, Number, String].includes(this.options.items); - } - validatePrimitive(originalValue, index) { - if (this.options.items === Number) { - const value = originalValue !== null && originalValue !== '' ? +originalValue : NaN; - if (isNaN(value)) { - throw this.exceptionFactory(`${(0, shared_utils_1.isUndefined)(index) ? '' : `[${index}] `}item must be a number`); - } - return value; - } - else if (this.options.items === String) { - if (!(0, shared_utils_1.isString)(originalValue)) { - return `${originalValue}`; - } - } - else if (this.options.items === Boolean) { - if (typeof originalValue !== 'boolean') { - throw this.exceptionFactory(`${(0, shared_utils_1.isUndefined)(index) ? '' : `[${index}] `}item must be a boolean value`); - } - } - return originalValue; - } -}; -exports.ParseArrayPipe = ParseArrayPipe; -exports.ParseArrayPipe = ParseArrayPipe = tslib_1.__decorate([ - (0, injectable_decorator_1.Injectable)(), - tslib_1.__param(0, (0, optional_decorator_1.Optional)()), - tslib_1.__metadata("design:paramtypes", [Object]) -], ParseArrayPipe); diff --git a/node_modules/@nestjs/common/pipes/parse-bool.pipe.d.ts b/node_modules/@nestjs/common/pipes/parse-bool.pipe.d.ts deleted file mode 100644 index 9a2fe23..0000000 --- a/node_modules/@nestjs/common/pipes/parse-bool.pipe.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { ArgumentMetadata, PipeTransform } from '../interfaces/features/pipe-transform.interface'; -import { ErrorHttpStatusCode } from '../utils/http-error-by-code.util'; -/** - * @publicApi - */ -export interface ParseBoolPipeOptions { - /** - * The HTTP status code to be used in the response when the validation fails. - */ - errorHttpStatusCode?: ErrorHttpStatusCode; - /** - * A factory function that returns an exception object to be thrown - * if validation fails. - * @param error Error message - * @returns The exception object - */ - exceptionFactory?: (error: string) => any; - /** - * If true, the pipe will return null or undefined if the value is not provided - * @default false - */ - optional?: boolean; -} -/** - * Defines the built-in ParseBool Pipe - * - * @see [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes) - * - * @publicApi - */ -export declare class ParseBoolPipe implements PipeTransform> { - protected readonly options?: ParseBoolPipeOptions | undefined; - protected exceptionFactory: (error: string) => any; - constructor(options?: ParseBoolPipeOptions | undefined); - /** - * Method that accesses and performs optional transformation on argument for - * in-flight requests. - * - * @param value currently processed route argument - * @param metadata contains metadata about the currently processed route argument - */ - transform(value: string | boolean, metadata: ArgumentMetadata): Promise; - /** - * @param value currently processed route argument - * @returns `true` if `value` is said 'true', ie., if it is equal to the boolean - * `true` or the string `"true"` - */ - protected isTrue(value: string | boolean): boolean; - /** - * @param value currently processed route argument - * @returns `true` if `value` is said 'false', ie., if it is equal to the boolean - * `false` or the string `"false"` - */ - protected isFalse(value: string | boolean): boolean; -} diff --git a/node_modules/@nestjs/common/pipes/parse-bool.pipe.js b/node_modules/@nestjs/common/pipes/parse-bool.pipe.js deleted file mode 100644 index 058aa42..0000000 --- a/node_modules/@nestjs/common/pipes/parse-bool.pipe.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ParseBoolPipe = void 0; -const tslib_1 = require("tslib"); -const injectable_decorator_1 = require("../decorators/core/injectable.decorator"); -const optional_decorator_1 = require("../decorators/core/optional.decorator"); -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_error_by_code_util_1 = require("../utils/http-error-by-code.util"); -const shared_utils_1 = require("../utils/shared.utils"); -/** - * Defines the built-in ParseBool Pipe - * - * @see [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes) - * - * @publicApi - */ -let ParseBoolPipe = class ParseBoolPipe { - constructor(options) { - this.options = options; - options = options || {}; - const { exceptionFactory, errorHttpStatusCode = http_status_enum_1.HttpStatus.BAD_REQUEST } = options; - this.exceptionFactory = - exceptionFactory || - (error => new http_error_by_code_util_1.HttpErrorByCode[errorHttpStatusCode](error)); - } - /** - * Method that accesses and performs optional transformation on argument for - * in-flight requests. - * - * @param value currently processed route argument - * @param metadata contains metadata about the currently processed route argument - */ - async transform(value, metadata) { - if ((0, shared_utils_1.isNil)(value) && this.options?.optional) { - return value; - } - if (this.isTrue(value)) { - return true; - } - if (this.isFalse(value)) { - return false; - } - throw this.exceptionFactory('Validation failed (boolean string is expected)'); - } - /** - * @param value currently processed route argument - * @returns `true` if `value` is said 'true', ie., if it is equal to the boolean - * `true` or the string `"true"` - */ - isTrue(value) { - return value === true || value === 'true'; - } - /** - * @param value currently processed route argument - * @returns `true` if `value` is said 'false', ie., if it is equal to the boolean - * `false` or the string `"false"` - */ - isFalse(value) { - return value === false || value === 'false'; - } -}; -exports.ParseBoolPipe = ParseBoolPipe; -exports.ParseBoolPipe = ParseBoolPipe = tslib_1.__decorate([ - (0, injectable_decorator_1.Injectable)(), - tslib_1.__param(0, (0, optional_decorator_1.Optional)()), - tslib_1.__metadata("design:paramtypes", [Object]) -], ParseBoolPipe); diff --git a/node_modules/@nestjs/common/pipes/parse-date.pipe.d.ts b/node_modules/@nestjs/common/pipes/parse-date.pipe.d.ts deleted file mode 100644 index 79e1df7..0000000 --- a/node_modules/@nestjs/common/pipes/parse-date.pipe.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { PipeTransform } from '../interfaces/features/pipe-transform.interface'; -import { ErrorHttpStatusCode } from '../utils/http-error-by-code.util'; -export interface ParseDatePipeOptions { - /** - * If true, the pipe will return null or undefined if the value is not provided - * @default false - */ - optional?: boolean; - /** - * Default value for the date - */ - default?: () => Date; - /** - * The HTTP status code to be used in the response when the validation fails. - */ - errorHttpStatusCode?: ErrorHttpStatusCode; - /** - * A factory function that returns an exception object to be thrown - * if validation fails. - * @param error Error message - * @returns The exception object - */ - exceptionFactory?: (error: string) => any; -} -export declare class ParseDatePipe implements PipeTransform { - private readonly options; - protected exceptionFactory: (error: string) => any; - constructor(options?: ParseDatePipeOptions); - /** - * Method that accesses and performs optional transformation on argument for - * in-flight requests. - * - * @param value currently processed route argument - * @param metadata contains metadata about the currently processed route argument - */ - transform(value: string | number | undefined | null): Date | null | undefined; -} diff --git a/node_modules/@nestjs/common/pipes/parse-date.pipe.js b/node_modules/@nestjs/common/pipes/parse-date.pipe.js deleted file mode 100644 index 34d1f32..0000000 --- a/node_modules/@nestjs/common/pipes/parse-date.pipe.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ParseDatePipe = void 0; -const tslib_1 = require("tslib"); -const injectable_decorator_1 = require("../decorators/core/injectable.decorator"); -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_error_by_code_util_1 = require("../utils/http-error-by-code.util"); -const shared_utils_1 = require("../utils/shared.utils"); -let ParseDatePipe = class ParseDatePipe { - constructor(options = {}) { - this.options = options; - const { exceptionFactory, errorHttpStatusCode = http_status_enum_1.HttpStatus.BAD_REQUEST } = options; - this.exceptionFactory = - exceptionFactory || - (error => new http_error_by_code_util_1.HttpErrorByCode[errorHttpStatusCode](error)); - } - /** - * Method that accesses and performs optional transformation on argument for - * in-flight requests. - * - * @param value currently processed route argument - * @param metadata contains metadata about the currently processed route argument - */ - transform(value) { - if (this.options.optional && (0, shared_utils_1.isNil)(value)) { - return this.options.default ? this.options.default() : value; - } - if (!value) { - throw this.exceptionFactory('Validation failed (no Date provided)'); - } - const transformedValue = new Date(value); - if (isNaN(transformedValue.getTime())) { - throw this.exceptionFactory('Validation failed (invalid date format)'); - } - return transformedValue; - } -}; -exports.ParseDatePipe = ParseDatePipe; -exports.ParseDatePipe = ParseDatePipe = tslib_1.__decorate([ - (0, injectable_decorator_1.Injectable)(), - tslib_1.__metadata("design:paramtypes", [Object]) -], ParseDatePipe); diff --git a/node_modules/@nestjs/common/pipes/parse-enum.pipe.d.ts b/node_modules/@nestjs/common/pipes/parse-enum.pipe.d.ts deleted file mode 100644 index a8d9793..0000000 --- a/node_modules/@nestjs/common/pipes/parse-enum.pipe.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { ArgumentMetadata } from '../index'; -import { PipeTransform } from '../interfaces/features/pipe-transform.interface'; -import { ErrorHttpStatusCode } from '../utils/http-error-by-code.util'; -/** - * @publicApi - */ -export interface ParseEnumPipeOptions { - /** - * If true, the pipe will return null or undefined if the value is not provided - * @default false - */ - optional?: boolean; - /** - * The HTTP status code to be used in the response when the validation fails. - */ - errorHttpStatusCode?: ErrorHttpStatusCode; - /** - * A factory function that returns an exception object to be thrown - * if validation fails. - * @param error Error message - * @returns The exception object - */ - exceptionFactory?: (error: string) => any; -} -/** - * Defines the built-in ParseEnum Pipe - * - * @see [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes) - * - * @publicApi - */ -export declare class ParseEnumPipe implements PipeTransform { - protected readonly enumType: T; - protected readonly options?: ParseEnumPipeOptions | undefined; - protected exceptionFactory: (error: string) => any; - constructor(enumType: T, options?: ParseEnumPipeOptions | undefined); - /** - * Method that accesses and performs optional transformation on argument for - * in-flight requests. - * - * @param value currently processed route argument - * @param metadata contains metadata about the currently processed route argument - */ - transform(value: T, metadata: ArgumentMetadata): Promise; - protected isEnum(value: T): boolean; -} diff --git a/node_modules/@nestjs/common/pipes/parse-enum.pipe.js b/node_modules/@nestjs/common/pipes/parse-enum.pipe.js deleted file mode 100644 index 1c92bd4..0000000 --- a/node_modules/@nestjs/common/pipes/parse-enum.pipe.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ParseEnumPipe = void 0; -const tslib_1 = require("tslib"); -const core_1 = require("../decorators/core"); -const index_1 = require("../index"); -const http_error_by_code_util_1 = require("../utils/http-error-by-code.util"); -const shared_utils_1 = require("../utils/shared.utils"); -/** - * Defines the built-in ParseEnum Pipe - * - * @see [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes) - * - * @publicApi - */ -let ParseEnumPipe = class ParseEnumPipe { - constructor(enumType, options) { - this.enumType = enumType; - this.options = options; - if (!enumType) { - throw new Error(`"ParseEnumPipe" requires "enumType" argument specified (to validate input values).`); - } - options = options || {}; - const { exceptionFactory, errorHttpStatusCode = index_1.HttpStatus.BAD_REQUEST } = options; - this.exceptionFactory = - exceptionFactory || - (error => new http_error_by_code_util_1.HttpErrorByCode[errorHttpStatusCode](error)); - } - /** - * Method that accesses and performs optional transformation on argument for - * in-flight requests. - * - * @param value currently processed route argument - * @param metadata contains metadata about the currently processed route argument - */ - async transform(value, metadata) { - if ((0, shared_utils_1.isNil)(value) && this.options?.optional) { - return value; - } - if (!this.isEnum(value)) { - throw this.exceptionFactory('Validation failed (enum string is expected)'); - } - return value; - } - isEnum(value) { - const enumValues = Object.keys(this.enumType).map(item => this.enumType[item]); - return enumValues.includes(value); - } -}; -exports.ParseEnumPipe = ParseEnumPipe; -exports.ParseEnumPipe = ParseEnumPipe = tslib_1.__decorate([ - (0, core_1.Injectable)(), - tslib_1.__param(1, (0, core_1.Optional)()), - tslib_1.__metadata("design:paramtypes", [Object, Object]) -], ParseEnumPipe); diff --git a/node_modules/@nestjs/common/pipes/parse-float.pipe.d.ts b/node_modules/@nestjs/common/pipes/parse-float.pipe.d.ts deleted file mode 100644 index 8096f15..0000000 --- a/node_modules/@nestjs/common/pipes/parse-float.pipe.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { ArgumentMetadata } from '../index'; -import { PipeTransform } from '../interfaces/features/pipe-transform.interface'; -import { ErrorHttpStatusCode } from '../utils/http-error-by-code.util'; -/** - * @publicApi - */ -export interface ParseFloatPipeOptions { - /** - * The HTTP status code to be used in the response when the validation fails. - */ - errorHttpStatusCode?: ErrorHttpStatusCode; - /** - * A factory function that returns an exception object to be thrown - * if validation fails. - * @param error Error message - * @returns The exception object - */ - exceptionFactory?: (error: string) => any; - /** - * If true, the pipe will return null or undefined if the value is not provided - * @default false - */ - optional?: boolean; -} -/** - * Defines the built-in ParseFloat Pipe - * - * @see [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes) - * - * @publicApi - */ -export declare class ParseFloatPipe implements PipeTransform { - protected readonly options?: ParseFloatPipeOptions | undefined; - protected exceptionFactory: (error: string) => any; - constructor(options?: ParseFloatPipeOptions | undefined); - /** - * Method that accesses and performs optional transformation on argument for - * in-flight requests. - * - * @param value currently processed route argument - * @param metadata contains metadata about the currently processed route argument - */ - transform(value: string, metadata: ArgumentMetadata): Promise; - /** - * @param value currently processed route argument - * @returns `true` if `value` is a valid float number - */ - protected isNumeric(value: string): boolean; -} diff --git a/node_modules/@nestjs/common/pipes/parse-float.pipe.js b/node_modules/@nestjs/common/pipes/parse-float.pipe.js deleted file mode 100644 index fbf2488..0000000 --- a/node_modules/@nestjs/common/pipes/parse-float.pipe.js +++ /dev/null @@ -1,56 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ParseFloatPipe = void 0; -const tslib_1 = require("tslib"); -const core_1 = require("../decorators/core"); -const index_1 = require("../index"); -const http_error_by_code_util_1 = require("../utils/http-error-by-code.util"); -const shared_utils_1 = require("../utils/shared.utils"); -/** - * Defines the built-in ParseFloat Pipe - * - * @see [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes) - * - * @publicApi - */ -let ParseFloatPipe = class ParseFloatPipe { - constructor(options) { - this.options = options; - options = options || {}; - const { exceptionFactory, errorHttpStatusCode = index_1.HttpStatus.BAD_REQUEST } = options; - this.exceptionFactory = - exceptionFactory || - (error => new http_error_by_code_util_1.HttpErrorByCode[errorHttpStatusCode](error)); - } - /** - * Method that accesses and performs optional transformation on argument for - * in-flight requests. - * - * @param value currently processed route argument - * @param metadata contains metadata about the currently processed route argument - */ - async transform(value, metadata) { - if ((0, shared_utils_1.isNil)(value) && this.options?.optional) { - return value; - } - if (!this.isNumeric(value)) { - throw this.exceptionFactory('Validation failed (numeric string is expected)'); - } - return parseFloat(value); - } - /** - * @param value currently processed route argument - * @returns `true` if `value` is a valid float number - */ - isNumeric(value) { - return (['string', 'number'].includes(typeof value) && - !isNaN(parseFloat(value)) && - isFinite(value)); - } -}; -exports.ParseFloatPipe = ParseFloatPipe; -exports.ParseFloatPipe = ParseFloatPipe = tslib_1.__decorate([ - (0, core_1.Injectable)(), - tslib_1.__param(0, (0, core_1.Optional)()), - tslib_1.__metadata("design:paramtypes", [Object]) -], ParseFloatPipe); diff --git a/node_modules/@nestjs/common/pipes/parse-int.pipe.d.ts b/node_modules/@nestjs/common/pipes/parse-int.pipe.d.ts deleted file mode 100644 index aeb40b2..0000000 --- a/node_modules/@nestjs/common/pipes/parse-int.pipe.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { ArgumentMetadata, PipeTransform } from '../interfaces/features/pipe-transform.interface'; -import { ErrorHttpStatusCode } from '../utils/http-error-by-code.util'; -/** - * @publicApi - */ -export interface ParseIntPipeOptions { - /** - * The HTTP status code to be used in the response when the validation fails. - */ - errorHttpStatusCode?: ErrorHttpStatusCode; - /** - * A factory function that returns an exception object to be thrown - * if validation fails. - * @param error Error message - * @returns The exception object - */ - exceptionFactory?: (error: string) => any; - /** - * If true, the pipe will return null or undefined if the value is not provided - * @default false - */ - optional?: boolean; -} -/** - * Defines the built-in ParseInt Pipe - * - * @see [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes) - * - * @publicApi - */ -export declare class ParseIntPipe implements PipeTransform { - protected readonly options?: ParseIntPipeOptions | undefined; - protected exceptionFactory: (error: string) => any; - constructor(options?: ParseIntPipeOptions | undefined); - /** - * Method that accesses and performs optional transformation on argument for - * in-flight requests. - * - * @param value currently processed route argument - * @param metadata contains metadata about the currently processed route argument - */ - transform(value: string, metadata: ArgumentMetadata): Promise; - /** - * @param value currently processed route argument - * @returns `true` if `value` is a valid integer number - */ - protected isNumeric(value: string): boolean; -} diff --git a/node_modules/@nestjs/common/pipes/parse-int.pipe.js b/node_modules/@nestjs/common/pipes/parse-int.pipe.js deleted file mode 100644 index 7a30ed9..0000000 --- a/node_modules/@nestjs/common/pipes/parse-int.pipe.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ParseIntPipe = void 0; -const tslib_1 = require("tslib"); -const injectable_decorator_1 = require("../decorators/core/injectable.decorator"); -const optional_decorator_1 = require("../decorators/core/optional.decorator"); -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_error_by_code_util_1 = require("../utils/http-error-by-code.util"); -const shared_utils_1 = require("../utils/shared.utils"); -/** - * Defines the built-in ParseInt Pipe - * - * @see [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes) - * - * @publicApi - */ -let ParseIntPipe = class ParseIntPipe { - constructor(options) { - this.options = options; - options = options || {}; - const { exceptionFactory, errorHttpStatusCode = http_status_enum_1.HttpStatus.BAD_REQUEST } = options; - this.exceptionFactory = - exceptionFactory || - (error => new http_error_by_code_util_1.HttpErrorByCode[errorHttpStatusCode](error)); - } - /** - * Method that accesses and performs optional transformation on argument for - * in-flight requests. - * - * @param value currently processed route argument - * @param metadata contains metadata about the currently processed route argument - */ - async transform(value, metadata) { - if ((0, shared_utils_1.isNil)(value) && this.options?.optional) { - return value; - } - if (!this.isNumeric(value)) { - throw this.exceptionFactory('Validation failed (numeric string is expected)'); - } - return parseInt(value, 10); - } - /** - * @param value currently processed route argument - * @returns `true` if `value` is a valid integer number - */ - isNumeric(value) { - return (['string', 'number'].includes(typeof value) && - /^-?\d+$/.test(value) && - isFinite(value)); - } -}; -exports.ParseIntPipe = ParseIntPipe; -exports.ParseIntPipe = ParseIntPipe = tslib_1.__decorate([ - (0, injectable_decorator_1.Injectable)(), - tslib_1.__param(0, (0, optional_decorator_1.Optional)()), - tslib_1.__metadata("design:paramtypes", [Object]) -], ParseIntPipe); diff --git a/node_modules/@nestjs/common/pipes/parse-uuid.pipe.d.ts b/node_modules/@nestjs/common/pipes/parse-uuid.pipe.d.ts deleted file mode 100644 index 7075223..0000000 --- a/node_modules/@nestjs/common/pipes/parse-uuid.pipe.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { ArgumentMetadata, PipeTransform } from '../interfaces/features/pipe-transform.interface'; -import { ErrorHttpStatusCode } from '../utils/http-error-by-code.util'; -/** - * @publicApi - */ -export interface ParseUUIDPipeOptions { - /** - * UUID version to validate - */ - version?: '3' | '4' | '5' | '7'; - /** - * The HTTP status code to be used in the response when the validation fails. - */ - errorHttpStatusCode?: ErrorHttpStatusCode; - /** - * A factory function that returns an exception object to be thrown - * if validation fails. - * @param error Error message - * @returns The exception object - */ - exceptionFactory?: (errors: string) => any; - /** - * If true, the pipe will return null or undefined if the value is not provided - * @default false - */ - optional?: boolean; -} -/** - * Defines the built-in ParseUUID Pipe - * - * @see [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes) - * - * @publicApi - */ -export declare class ParseUUIDPipe implements PipeTransform { - protected readonly options?: ParseUUIDPipeOptions | undefined; - protected static uuidRegExps: { - 3: RegExp; - 4: RegExp; - 5: RegExp; - 7: RegExp; - all: RegExp; - }; - private readonly version; - protected exceptionFactory: (errors: string) => any; - constructor(options?: ParseUUIDPipeOptions | undefined); - transform(value: string, metadata: ArgumentMetadata): Promise; - protected isUUID(str: unknown, version?: string): any; -} diff --git a/node_modules/@nestjs/common/pipes/parse-uuid.pipe.js b/node_modules/@nestjs/common/pipes/parse-uuid.pipe.js deleted file mode 100644 index 88aa76c..0000000 --- a/node_modules/@nestjs/common/pipes/parse-uuid.pipe.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; -var ParseUUIDPipe_1; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ParseUUIDPipe = void 0; -const tslib_1 = require("tslib"); -const injectable_decorator_1 = require("../decorators/core/injectable.decorator"); -const optional_decorator_1 = require("../decorators/core/optional.decorator"); -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_error_by_code_util_1 = require("../utils/http-error-by-code.util"); -const shared_utils_1 = require("../utils/shared.utils"); -/** - * Defines the built-in ParseUUID Pipe - * - * @see [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes) - * - * @publicApi - */ -let ParseUUIDPipe = ParseUUIDPipe_1 = class ParseUUIDPipe { - constructor(options) { - this.options = options; - options = options || {}; - const { exceptionFactory, errorHttpStatusCode = http_status_enum_1.HttpStatus.BAD_REQUEST, version, } = options; - this.version = version; - this.exceptionFactory = - exceptionFactory || - (error => new http_error_by_code_util_1.HttpErrorByCode[errorHttpStatusCode](error)); - } - async transform(value, metadata) { - if ((0, shared_utils_1.isNil)(value) && this.options?.optional) { - return value; - } - if (!this.isUUID(value, this.version)) { - throw this.exceptionFactory(`Validation failed (uuid${this.version ? ` v ${this.version}` : ''} is expected)`); - } - return value; - } - isUUID(str, version = 'all') { - if (!(0, shared_utils_1.isString)(str)) { - throw this.exceptionFactory('The value passed as UUID is not a string'); - } - const pattern = ParseUUIDPipe_1.uuidRegExps[version]; - return pattern?.test(str); - } -}; -exports.ParseUUIDPipe = ParseUUIDPipe; -ParseUUIDPipe.uuidRegExps = { - 3: /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i, - 4: /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, - 5: /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, - 7: /^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, - all: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i, -}; -exports.ParseUUIDPipe = ParseUUIDPipe = ParseUUIDPipe_1 = tslib_1.__decorate([ - (0, injectable_decorator_1.Injectable)(), - tslib_1.__param(0, (0, optional_decorator_1.Optional)()), - tslib_1.__metadata("design:paramtypes", [Object]) -], ParseUUIDPipe); diff --git a/node_modules/@nestjs/common/pipes/standard-schema-validation.pipe.d.ts b/node_modules/@nestjs/common/pipes/standard-schema-validation.pipe.d.ts deleted file mode 100644 index 8288118..0000000 --- a/node_modules/@nestjs/common/pipes/standard-schema-validation.pipe.d.ts +++ /dev/null @@ -1,86 +0,0 @@ -import type { StandardSchemaV1 } from '@standard-schema/spec'; -import { ArgumentMetadata, PipeTransform } from '../interfaces/features/pipe-transform.interface.js'; -import { ErrorHttpStatusCode } from '../utils/http-error-by-code.util.js'; -/** - * @publicApi - */ -export interface StandardSchemaValidationPipeOptions { - /** - * If true, the pipe will return the value produced by the schema - * (which may differ from the input if the schema coerces/transforms values). - * If false, the original input value is returned after successful validation. - * @default true - */ - transform?: boolean; - /** - * If true, the pipe will also validate parameters decorated with custom decorators - * (created with `createParamDecorator`). When false, custom parameters are skipped. - * @default false - */ - validateCustomDecorators?: boolean; - /** - * Options to pass to the standard schema `validate` function. - * These options are forwarded as the second argument to the schema's `~standard.validate` method. - */ - validateOptions?: Record; - /** - * The HTTP status code to be used in the response when the validation fails. - * @default HttpStatus.BAD_REQUEST - */ - errorHttpStatusCode?: ErrorHttpStatusCode; - /** - * A factory function that returns an exception object to be thrown - * if validation fails. - * @param issues The issues returned by the standard schema validation - * @returns The exception object - */ - exceptionFactory?: (issues: readonly StandardSchemaV1.Issue[]) => any; -} -/** - * Defines the built-in StandardSchemaValidation Pipe. - * - * Uses a standard schema object (conforming to the Standard Schema spec) - * attached to the parameter metadata to validate incoming values. - * - * @see [Standard Schema](https://github.com/standard-schema/standard-schema) - * - * @publicApi - */ -export declare class StandardSchemaValidationPipe implements PipeTransform { - protected readonly options?: StandardSchemaValidationPipeOptions | undefined; - protected isTransformEnabled: boolean; - protected validateCustomDecorators: boolean; - protected validateOptions: Record | undefined; - protected exceptionFactory: (issues: readonly StandardSchemaV1.Issue[]) => any; - constructor(options?: StandardSchemaValidationPipeOptions | undefined); - /** - * Method that validates the incoming value against the standard schema - * provided in the parameter metadata. - * - * @param value currently processed route argument - * @param metadata contains metadata about the currently processed route argument - */ - transform(value: T, metadata: ArgumentMetadata): Promise; - /** - * Determines whether validation should be performed for the given metadata. - * Skips validation for custom decorators unless `validateCustomDecorators` is enabled. - * - * @param metadata contains metadata about the currently processed route argument - * @returns `true` if validation should be performed - */ - protected toValidate(metadata: ArgumentMetadata): boolean; - /** - * Validates a value against a standard schema. - * Can be overridden to customize validation behavior. - * - * @param value The value to validate - * @param schema The standard schema to validate against - * @param options Optional options forwarded to the schema's validate method - * @returns The validation result - */ - protected validate(value: unknown, schema: StandardSchemaV1, options?: Record): Promise> | StandardSchemaV1.Result; - /** - * Strips dangerous prototype pollution keys from an object. - */ - protected stripProtoKeys(value: any): void; -} diff --git a/node_modules/@nestjs/common/pipes/standard-schema-validation.pipe.js b/node_modules/@nestjs/common/pipes/standard-schema-validation.pipe.js deleted file mode 100644 index 4f6ddb2..0000000 --- a/node_modules/@nestjs/common/pipes/standard-schema-validation.pipe.js +++ /dev/null @@ -1,120 +0,0 @@ -import { __decorate, __metadata, __param } from "tslib"; -import { types } from 'util'; -import { Injectable } from '../decorators/core/injectable.decorator.js'; -import { Optional } from '../decorators/core/optional.decorator.js'; -import { HttpStatus } from '../enums/http-status.enum.js'; -import { HttpErrorByCode, } from '../utils/http-error-by-code.util.js'; -/** - * Built-in JavaScript types that should be excluded from prototype stripping - * to avoid conflicts with test frameworks like Jest's useFakeTimers - */ -const BUILT_IN_TYPES = [Date, RegExp, Error, Map, Set, WeakMap, WeakSet]; -/** - * Defines the built-in StandardSchemaValidation Pipe. - * - * Uses a standard schema object (conforming to the Standard Schema spec) - * attached to the parameter metadata to validate incoming values. - * - * @see [Standard Schema](https://github.com/standard-schema/standard-schema) - * - * @publicApi - */ -let StandardSchemaValidationPipe = class StandardSchemaValidationPipe { - options; - isTransformEnabled; - validateCustomDecorators; - validateOptions; - exceptionFactory; - constructor(options) { - this.options = options; - const { transform = true, validateCustomDecorators = false, validateOptions, exceptionFactory, errorHttpStatusCode = HttpStatus.BAD_REQUEST, } = options || {}; - this.isTransformEnabled = transform; - this.validateCustomDecorators = validateCustomDecorators; - this.validateOptions = validateOptions; - this.exceptionFactory = - exceptionFactory || - (issues => { - const messages = issues.map(issue => issue.message); - return new HttpErrorByCode[errorHttpStatusCode](messages); - }); - } - /** - * Method that validates the incoming value against the standard schema - * provided in the parameter metadata. - * - * @param value currently processed route argument - * @param metadata contains metadata about the currently processed route argument - */ - async transform(value, metadata) { - const schema = metadata.schema; - if (!schema || !this.toValidate(metadata)) { - return value; - } - this.stripProtoKeys(value); - const result = await this.validate(value, schema, this.validateOptions); - if (result.issues) { - throw this.exceptionFactory(result.issues); - } - return this.isTransformEnabled ? result.value : value; - } - /** - * Determines whether validation should be performed for the given metadata. - * Skips validation for custom decorators unless `validateCustomDecorators` is enabled. - * - * @param metadata contains metadata about the currently processed route argument - * @returns `true` if validation should be performed - */ - toValidate(metadata) { - const { type } = metadata; - if (type === 'custom' && !this.validateCustomDecorators) { - return false; - } - return true; - } - /** - * Validates a value against a standard schema. - * Can be overridden to customize validation behavior. - * - * @param value The value to validate - * @param schema The standard schema to validate against - * @param options Optional options forwarded to the schema's validate method - * @returns The validation result - */ - validate(value, schema, options) { - return schema['~standard'].validate(value, options); - } - /** - * Strips dangerous prototype pollution keys from an object. - */ - stripProtoKeys(value) { - if (value == null || - typeof value !== 'object' || - types.isTypedArray(value)) { - return; - } - if (BUILT_IN_TYPES.some(type => value instanceof type)) { - return; - } - if (Array.isArray(value)) { - for (const v of value) { - this.stripProtoKeys(v); - } - return; - } - delete value.__proto__; - delete value.prototype; - const constructorType = value?.constructor; - if (constructorType && !BUILT_IN_TYPES.includes(constructorType)) { - delete value.constructor; - } - for (const key in value) { - this.stripProtoKeys(value[key]); - } - } -}; -StandardSchemaValidationPipe = __decorate([ - Injectable(), - __param(0, Optional()), - __metadata("design:paramtypes", [Object]) -], StandardSchemaValidationPipe); -export { StandardSchemaValidationPipe }; diff --git a/node_modules/@nestjs/common/pipes/validation.pipe.d.ts b/node_modules/@nestjs/common/pipes/validation.pipe.d.ts deleted file mode 100644 index b809fc6..0000000 --- a/node_modules/@nestjs/common/pipes/validation.pipe.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { ClassTransformOptions } from '../interfaces/external/class-transform-options.interface'; -import { TransformerPackage } from '../interfaces/external/transformer-package.interface'; -import { ValidationError } from '../interfaces/external/validation-error.interface'; -import { ValidatorOptions } from '../interfaces/external/validator-options.interface'; -import { ValidatorPackage } from '../interfaces/external/validator-package.interface'; -import { ArgumentMetadata, PipeTransform } from '../interfaces/features/pipe-transform.interface'; -import { Type } from '../interfaces/type.interface'; -import { ErrorHttpStatusCode } from '../utils/http-error-by-code.util'; -/** - * @publicApi - */ -export interface ValidationPipeOptions extends ValidatorOptions { - transform?: boolean; - disableErrorMessages?: boolean; - transformOptions?: ClassTransformOptions; - errorHttpStatusCode?: ErrorHttpStatusCode; - exceptionFactory?: (errors: ValidationError[]) => any; - validateCustomDecorators?: boolean; - expectedType?: Type; - validatorPackage?: ValidatorPackage; - transformerPackage?: TransformerPackage; -} -/** - * @see [Validation](https://docs.nestjs.com/techniques/validation) - * - * @publicApi - */ -export declare class ValidationPipe implements PipeTransform { - protected isTransformEnabled: boolean; - protected isDetailedOutputDisabled?: boolean; - protected validatorOptions: ValidatorOptions; - protected transformOptions: ClassTransformOptions | undefined; - protected errorHttpStatusCode: ErrorHttpStatusCode; - protected expectedType: Type | undefined; - protected exceptionFactory: (errors: ValidationError[]) => any; - protected validateCustomDecorators: boolean; - constructor(options?: ValidationPipeOptions); - protected loadValidator(validatorPackage?: ValidatorPackage): ValidatorPackage; - protected loadTransformer(transformerPackage?: TransformerPackage): TransformerPackage; - transform(value: any, metadata: ArgumentMetadata): Promise; - createExceptionFactory(): (validationErrors?: ValidationError[]) => unknown; - protected toValidate(metadata: ArgumentMetadata): boolean; - protected transformPrimitive(value: any, metadata: ArgumentMetadata): any; - protected toEmptyIfNil(value: T, metatype: Type | object): R | object | string; - protected stripProtoKeys(value: any): void; - protected isPrimitive(value: unknown): boolean; - protected validate(object: object, validatorOptions?: ValidatorOptions): Promise | ValidationError[]; - protected flattenValidationErrors(validationErrors: ValidationError[]): string[]; - protected mapChildrenToValidationErrors(error: ValidationError, parentPath?: string): ValidationError[]; - protected prependConstraintsWithParentProp(parentPath: string, error: ValidationError): ValidationError; -} diff --git a/node_modules/@nestjs/common/pipes/validation.pipe.js b/node_modules/@nestjs/common/pipes/validation.pipe.js deleted file mode 100644 index bd64729..0000000 --- a/node_modules/@nestjs/common/pipes/validation.pipe.js +++ /dev/null @@ -1,245 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ValidationPipe = void 0; -const tslib_1 = require("tslib"); -const iterare_1 = require("iterare"); -const util_1 = require("util"); -const decorators_1 = require("../decorators"); -const core_1 = require("../decorators/core"); -const http_status_enum_1 = require("../enums/http-status.enum"); -const http_error_by_code_util_1 = require("../utils/http-error-by-code.util"); -const load_package_util_1 = require("../utils/load-package.util"); -const shared_utils_1 = require("../utils/shared.utils"); -let classValidator = {}; -let classTransformer = {}; -/** - * Built-in JavaScript types that should be excluded from prototype stripping - * to avoid conflicts with test frameworks like Jest's useFakeTimers - */ -const BUILT_IN_TYPES = [Date, RegExp, Error, Map, Set, WeakMap, WeakSet]; -/** - * @see [Validation](https://docs.nestjs.com/techniques/validation) - * - * @publicApi - */ -let ValidationPipe = class ValidationPipe { - constructor(options) { - options = options || {}; - const { transform, disableErrorMessages, errorHttpStatusCode, expectedType, transformOptions, validateCustomDecorators, ...validatorOptions } = options; - // @see [https://github.com/nestjs/nest/issues/10683#issuecomment-1413690508](https://github.com/nestjs/nest/issues/10683#issuecomment-1413690508) - this.validatorOptions = { forbidUnknownValues: false, ...validatorOptions }; - this.isTransformEnabled = !!transform; - this.transformOptions = transformOptions; - this.isDetailedOutputDisabled = disableErrorMessages; - this.validateCustomDecorators = validateCustomDecorators || false; - this.errorHttpStatusCode = errorHttpStatusCode || http_status_enum_1.HttpStatus.BAD_REQUEST; - this.expectedType = expectedType; - this.exceptionFactory = - options.exceptionFactory || this.createExceptionFactory(); - classValidator = this.loadValidator(options.validatorPackage); - classTransformer = this.loadTransformer(options.transformerPackage); - } - loadValidator(validatorPackage) { - return (validatorPackage ?? - (0, load_package_util_1.loadPackage)('class-validator', 'ValidationPipe', () => require('class-validator'))); - } - loadTransformer(transformerPackage) { - return (transformerPackage ?? - (0, load_package_util_1.loadPackage)('class-transformer', 'ValidationPipe', () => require('class-transformer'))); - } - async transform(value, metadata) { - if (this.expectedType) { - metadata = { ...metadata, metatype: this.expectedType }; - } - const metatype = metadata.metatype; - if (!metatype || !this.toValidate(metadata)) { - return this.isTransformEnabled - ? this.transformPrimitive(value, metadata) - : value; - } - const originalValue = value; - value = this.toEmptyIfNil(value, metatype); - const isNil = value !== originalValue; - const isPrimitive = this.isPrimitive(value); - this.stripProtoKeys(value); - let entity = classTransformer.plainToInstance(metatype, value, this.transformOptions); - const originalEntity = entity; - const isCtorNotEqual = entity.constructor !== metatype; - if (isCtorNotEqual && !isPrimitive) { - entity.constructor = metatype; - } - else if (isCtorNotEqual) { - // when "entity" is a primitive value, we have to temporarily - // replace the entity to perform the validation against the original - // metatype defined inside the handler - entity = { constructor: metatype }; - } - const errors = await this.validate(entity, this.validatorOptions); - if (errors.length > 0) { - throw await this.exceptionFactory(errors); - } - if (originalValue === undefined && originalEntity === '') { - // Since SWC requires empty string for validation (to avoid an error), - // a fallback is needed to revert to the original value (when undefined). - // @see [https://github.com/nestjs/nest/issues/14430](https://github.com/nestjs/nest/issues/14430) - return originalValue; - } - if (isPrimitive) { - // if the value is a primitive value and the validation process has been successfully completed - // we have to revert the original value passed through the pipe - entity = originalEntity; - } - if (this.isTransformEnabled) { - return entity; - } - if (isNil) { - // if the value was originally undefined or null, revert it back - return originalValue; - } - // we check if the number of keys of the "validatorOptions" is higher than 1 (instead of 0) - // because the "forbidUnknownValues" now fallbacks to "false" (in case it wasn't explicitly specified) - const shouldTransformToPlain = Object.keys(this.validatorOptions).length > 1; - return shouldTransformToPlain - ? classTransformer.classToPlain(entity, this.transformOptions) - : value; - } - createExceptionFactory() { - return (validationErrors = []) => { - if (this.isDetailedOutputDisabled) { - return new http_error_by_code_util_1.HttpErrorByCode[this.errorHttpStatusCode](); - } - const errors = this.flattenValidationErrors(validationErrors); - return new http_error_by_code_util_1.HttpErrorByCode[this.errorHttpStatusCode](errors); - }; - } - toValidate(metadata) { - const { metatype, type } = metadata; - if (type === 'custom' && !this.validateCustomDecorators) { - return false; - } - const types = [String, Boolean, Number, Array, Object, Buffer, Date]; - return !types.some(t => metatype === t) && !(0, shared_utils_1.isNil)(metatype); - } - transformPrimitive(value, metadata) { - if (!metadata.data) { - // leave top-level query/param objects unmodified - return value; - } - const { type, metatype } = metadata; - if (type !== 'param' && type !== 'query') { - return value; - } - if (metatype === Boolean) { - if ((0, shared_utils_1.isUndefined)(value)) { - // This is an workaround to deal with optional boolean values since - // optional booleans shouldn't be parsed to a valid boolean when - // they were not defined - return undefined; - } - // Any fasly value but `undefined` will be parsed to `false` - return value === true || value === 'true'; - } - if (metatype === Number) { - if ((0, shared_utils_1.isUndefined)(value)) { - // This is a workaround to deal with optional numeric values since - // optional numerics shouldn't be parsed to a valid number when - // they were not defined - return undefined; - } - return +value; - } - if (metatype === String && !(0, shared_utils_1.isUndefined)(value)) { - return String(value); - } - return value; - } - toEmptyIfNil(value, metatype) { - if (!(0, shared_utils_1.isNil)(value)) { - return value; - } - if (typeof metatype === 'function' || - (metatype && 'prototype' in metatype && metatype.prototype?.constructor)) { - return {}; - } - // SWC requires empty string to be returned instead of an empty object - // when the value is nil and the metatype is not a class instance, but a plain object (enum, for example). - // Otherwise, the error will be thrown. - // @see [https://github.com/nestjs/nest/issues/12680](https://github.com/nestjs/nest/issues/12680) - return ''; - } - stripProtoKeys(value) { - if (value == null || - typeof value !== 'object' || - util_1.types.isTypedArray(value)) { - return; - } - // Skip built-in JavaScript primitives to avoid Jest useFakeTimers conflicts - if (BUILT_IN_TYPES.some(type => value instanceof type)) { - return; - } - if (Array.isArray(value)) { - for (const v of value) { - this.stripProtoKeys(v); - } - return; - } - // Delete dangerous prototype pollution keys - delete value.__proto__; - delete value.prototype; - // Only delete constructor if it's NOT a built-in type - const constructorType = value?.constructor; - if (constructorType && !BUILT_IN_TYPES.includes(constructorType)) { - delete value.constructor; - } - for (const key in value) { - this.stripProtoKeys(value[key]); - } - } - isPrimitive(value) { - return ['number', 'boolean', 'string'].includes(typeof value); - } - validate(object, validatorOptions) { - return classValidator.validate(object, validatorOptions); - } - flattenValidationErrors(validationErrors) { - return (0, iterare_1.iterate)(validationErrors) - .map(error => this.mapChildrenToValidationErrors(error)) - .flatten() - .filter(item => !!item.constraints) - .map(item => Object.values(item.constraints)) - .flatten() - .toArray(); - } - mapChildrenToValidationErrors(error, parentPath) { - if (!(error.children && error.children.length)) { - return [error]; - } - const validationErrors = []; - parentPath = parentPath - ? `${parentPath}.${error.property}` - : error.property; - for (const item of error.children) { - if (item.children && item.children.length) { - validationErrors.push(...this.mapChildrenToValidationErrors(item, parentPath)); - } - validationErrors.push(this.prependConstraintsWithParentProp(parentPath, item)); - } - return validationErrors; - } - prependConstraintsWithParentProp(parentPath, error) { - const constraints = {}; - for (const key in error.constraints) { - constraints[key] = `${parentPath}.${error.constraints[key]}`; - } - return { - ...error, - constraints, - }; - } -}; -exports.ValidationPipe = ValidationPipe; -exports.ValidationPipe = ValidationPipe = tslib_1.__decorate([ - (0, core_1.Injectable)(), - tslib_1.__param(0, (0, decorators_1.Optional)()), - tslib_1.__metadata("design:paramtypes", [Object]) -], ValidationPipe); diff --git a/node_modules/@nestjs/common/serializer/class-serializer.constants.d.ts b/node_modules/@nestjs/common/serializer/class-serializer.constants.d.ts deleted file mode 100644 index 3de1155..0000000 --- a/node_modules/@nestjs/common/serializer/class-serializer.constants.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const CLASS_SERIALIZER_OPTIONS = "class_serializer:options"; diff --git a/node_modules/@nestjs/common/serializer/class-serializer.constants.js b/node_modules/@nestjs/common/serializer/class-serializer.constants.js deleted file mode 100644 index 61fe531..0000000 --- a/node_modules/@nestjs/common/serializer/class-serializer.constants.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CLASS_SERIALIZER_OPTIONS = void 0; -exports.CLASS_SERIALIZER_OPTIONS = 'class_serializer:options'; diff --git a/node_modules/@nestjs/common/serializer/class-serializer.interceptor.d.ts b/node_modules/@nestjs/common/serializer/class-serializer.interceptor.d.ts deleted file mode 100644 index 630ac64..0000000 --- a/node_modules/@nestjs/common/serializer/class-serializer.interceptor.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { ClassSerializerContextOptions } from './class-serializer.interfaces'; -import { Observable } from 'rxjs'; -import { CallHandler, ExecutionContext, NestInterceptor } from '../interfaces'; -import { ClassTransformOptions } from '../interfaces/external/class-transform-options.interface'; -import { TransformerPackage } from '../interfaces/external/transformer-package.interface'; -export interface PlainLiteralObject { - [key: string]: any; -} -/** - * @publicApi - */ -export interface ClassSerializerInterceptorOptions extends ClassTransformOptions { - transformerPackage?: TransformerPackage; -} -/** - * @publicApi - */ -export declare class ClassSerializerInterceptor implements NestInterceptor { - protected readonly reflector: any; - protected readonly defaultOptions: ClassSerializerInterceptorOptions; - constructor(reflector: any, defaultOptions?: ClassSerializerInterceptorOptions); - intercept(context: ExecutionContext, next: CallHandler): Observable; - /** - * Serializes responses that are non-null objects nor streamable files. - */ - serialize(response: PlainLiteralObject | Array, options: ClassSerializerContextOptions): PlainLiteralObject | Array; - transformToPlain(plainOrClass: any, options: ClassSerializerContextOptions): PlainLiteralObject; - protected getContextOptions(context: ExecutionContext): ClassSerializerContextOptions | undefined; -} diff --git a/node_modules/@nestjs/common/serializer/class-serializer.interceptor.js b/node_modules/@nestjs/common/serializer/class-serializer.interceptor.js deleted file mode 100644 index 0a1a607..0000000 --- a/node_modules/@nestjs/common/serializer/class-serializer.interceptor.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ClassSerializerInterceptor = void 0; -const tslib_1 = require("tslib"); -const operators_1 = require("rxjs/operators"); -const core_1 = require("../decorators/core"); -const file_stream_1 = require("../file-stream"); -const load_package_util_1 = require("../utils/load-package.util"); -const shared_utils_1 = require("../utils/shared.utils"); -const class_serializer_constants_1 = require("./class-serializer.constants"); -let classTransformer = {}; -// NOTE (external) -// We need to deduplicate them here due to the circular dependency -// between core and common packages -const REFLECTOR = 'Reflector'; -/** - * @publicApi - */ -let ClassSerializerInterceptor = class ClassSerializerInterceptor { - constructor(reflector, defaultOptions = {}) { - this.reflector = reflector; - this.defaultOptions = defaultOptions; - classTransformer = - defaultOptions?.transformerPackage ?? - (0, load_package_util_1.loadPackage)('class-transformer', 'ClassSerializerInterceptor', () => require('class-transformer')); - if (!defaultOptions?.transformerPackage) { - require('class-transformer'); - } - } - intercept(context, next) { - const contextOptions = this.getContextOptions(context); - const options = { - ...this.defaultOptions, - ...contextOptions, - }; - return next - .handle() - .pipe((0, operators_1.map)((res) => this.serialize(res, options))); - } - /** - * Serializes responses that are non-null objects nor streamable files. - */ - serialize(response, options) { - if (!(0, shared_utils_1.isObject)(response) || response instanceof file_stream_1.StreamableFile) { - return response; - } - return Array.isArray(response) - ? response.map(item => this.transformToPlain(item, options)) - : this.transformToPlain(response, options); - } - transformToPlain(plainOrClass, options) { - if (!plainOrClass) { - return plainOrClass; - } - if (!options.type) { - return classTransformer.classToPlain(plainOrClass, options); - } - if (plainOrClass instanceof options.type) { - return classTransformer.classToPlain(plainOrClass, options); - } - const instance = classTransformer.plainToInstance(options.type, plainOrClass, options); - return classTransformer.classToPlain(instance, options); - } - getContextOptions(context) { - return this.reflector.getAllAndOverride(class_serializer_constants_1.CLASS_SERIALIZER_OPTIONS, [ - context.getHandler(), - context.getClass(), - ]); - } -}; -exports.ClassSerializerInterceptor = ClassSerializerInterceptor; -exports.ClassSerializerInterceptor = ClassSerializerInterceptor = tslib_1.__decorate([ - (0, core_1.Injectable)(), - tslib_1.__param(0, (0, core_1.Inject)(REFLECTOR)), - tslib_1.__param(1, (0, core_1.Optional)()), - tslib_1.__metadata("design:paramtypes", [Object, Object]) -], ClassSerializerInterceptor); diff --git a/node_modules/@nestjs/common/serializer/class-serializer.interfaces.d.ts b/node_modules/@nestjs/common/serializer/class-serializer.interfaces.d.ts deleted file mode 100644 index 60df5d4..0000000 --- a/node_modules/@nestjs/common/serializer/class-serializer.interfaces.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { ClassTransformOptions } from '../interfaces/external/class-transform-options.interface'; -import { Type } from '../interfaces'; -/** - * @publicApi - */ -export interface ClassSerializerContextOptions extends ClassTransformOptions { - type?: Type; -} diff --git a/node_modules/@nestjs/common/serializer/class-serializer.interfaces.js b/node_modules/@nestjs/common/serializer/class-serializer.interfaces.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/common/serializer/class-serializer.interfaces.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/common/serializer/decorators/index.d.ts b/node_modules/@nestjs/common/serializer/decorators/index.d.ts deleted file mode 100644 index eff9f6f..0000000 --- a/node_modules/@nestjs/common/serializer/decorators/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './serialize-options.decorator'; diff --git a/node_modules/@nestjs/common/serializer/decorators/index.js b/node_modules/@nestjs/common/serializer/decorators/index.js deleted file mode 100644 index db1daff..0000000 --- a/node_modules/@nestjs/common/serializer/decorators/index.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./serialize-options.decorator"), exports); diff --git a/node_modules/@nestjs/common/serializer/decorators/serialize-options.decorator.d.ts b/node_modules/@nestjs/common/serializer/decorators/serialize-options.decorator.d.ts deleted file mode 100644 index cd547e0..0000000 --- a/node_modules/@nestjs/common/serializer/decorators/serialize-options.decorator.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ClassSerializerContextOptions } from '../class-serializer.interfaces'; -/** - * @publicApi - */ -export declare const SerializeOptions: (options: ClassSerializerContextOptions) => import("../../decorators").CustomDecorator; diff --git a/node_modules/@nestjs/common/serializer/decorators/serialize-options.decorator.js b/node_modules/@nestjs/common/serializer/decorators/serialize-options.decorator.js deleted file mode 100644 index 0d1232a..0000000 --- a/node_modules/@nestjs/common/serializer/decorators/serialize-options.decorator.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SerializeOptions = void 0; -const decorators_1 = require("../../decorators"); -const class_serializer_constants_1 = require("../class-serializer.constants"); -/** - * @publicApi - */ -const SerializeOptions = (options) => (0, decorators_1.SetMetadata)(class_serializer_constants_1.CLASS_SERIALIZER_OPTIONS, options); -exports.SerializeOptions = SerializeOptions; diff --git a/node_modules/@nestjs/common/serializer/index.d.ts b/node_modules/@nestjs/common/serializer/index.d.ts deleted file mode 100644 index 828c4ae..0000000 --- a/node_modules/@nestjs/common/serializer/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './class-serializer.interceptor'; -export * from './decorators'; -export * from './class-serializer.interfaces'; diff --git a/node_modules/@nestjs/common/serializer/index.js b/node_modules/@nestjs/common/serializer/index.js deleted file mode 100644 index b0d7425..0000000 --- a/node_modules/@nestjs/common/serializer/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./class-serializer.interceptor"), exports); -tslib_1.__exportStar(require("./decorators"), exports); -tslib_1.__exportStar(require("./class-serializer.interfaces"), exports); diff --git a/node_modules/@nestjs/common/serializer/standard-schema-serializer.interceptor.d.ts b/node_modules/@nestjs/common/serializer/standard-schema-serializer.interceptor.d.ts deleted file mode 100644 index a9420e0..0000000 --- a/node_modules/@nestjs/common/serializer/standard-schema-serializer.interceptor.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -import type { StandardSchemaV1 } from '@standard-schema/spec'; -import { Observable } from 'rxjs'; -import { CallHandler, ExecutionContext, NestInterceptor } from '../interfaces/index.js'; -import { StandardSchemaSerializerContextOptions } from './standard-schema-serializer.interfaces.js'; -interface PlainLiteralObject { - [key: string]: any; -} -/** - * @publicApi - */ -export interface StandardSchemaSerializerInterceptorOptions { - /** - * A default standard schema to use for serialization when no schema - * is provided via `@SerializeOptions()`. - */ - schema?: StandardSchemaV1; - /** - * Default options forwarded to the schema's `~standard.validate()` call. - * Can be overridden per-handler via `@SerializeOptions({ validateOptions })`. - */ - validateOptions?: StandardSchemaV1.Options; -} -/** - * An interceptor that serializes outgoing responses using a Standard Schema. - * - * The schema can be provided either: - * - As a default option in the interceptor constructor - * - Per-handler or per-class via `@SerializeOptions({ schema })` decorator - * - * When a schema is present, the interceptor validates/transforms the response - * through the schema's `~standard.validate()` method. If validation fails, - * the issues are thrown as an error. - * - * @see [Standard Schema](https://github.com/standard-schema/standard-schema) - * - * @publicApi - */ -export declare class StandardSchemaSerializerInterceptor implements NestInterceptor { - protected readonly reflector: any; - protected readonly defaultOptions: StandardSchemaSerializerInterceptorOptions; - constructor(reflector: any, defaultOptions?: StandardSchemaSerializerInterceptorOptions); - intercept(context: ExecutionContext, next: CallHandler): Observable; - /** - * Serializes responses that are non-null objects nor streamable files. - */ - serialize(response: PlainLiteralObject | Array, schema: StandardSchemaV1 | undefined, validateOptions?: StandardSchemaV1.Options): PlainLiteralObject | Array | Promise>; - transformToPlain(plainOrClass: any, schema: StandardSchemaV1, validateOptions?: StandardSchemaV1.Options): Promise; - protected getContextOptions(context: ExecutionContext): StandardSchemaSerializerContextOptions | undefined; -} -export {}; diff --git a/node_modules/@nestjs/common/serializer/standard-schema-serializer.interceptor.js b/node_modules/@nestjs/common/serializer/standard-schema-serializer.interceptor.js deleted file mode 100644 index bba704f..0000000 --- a/node_modules/@nestjs/common/serializer/standard-schema-serializer.interceptor.js +++ /dev/null @@ -1,75 +0,0 @@ -import { __decorate, __metadata, __param } from "tslib"; -import { map } from 'rxjs/operators'; -import { Inject, Injectable, Optional } from '../decorators/core/index.js'; -import { StreamableFile } from '../file-stream/index.js'; -import { isObject } from '../utils/shared.utils.js'; -import { CLASS_SERIALIZER_OPTIONS } from './class-serializer.constants.js'; -// NOTE (external) -// We need to deduplicate them here due to the circular dependency -// between core and common packages -const REFLECTOR = 'Reflector'; -/** - * An interceptor that serializes outgoing responses using a Standard Schema. - * - * The schema can be provided either: - * - As a default option in the interceptor constructor - * - Per-handler or per-class via `@SerializeOptions({ schema })` decorator - * - * When a schema is present, the interceptor validates/transforms the response - * through the schema's `~standard.validate()` method. If validation fails, - * the issues are thrown as an error. - * - * @see [Standard Schema](https://github.com/standard-schema/standard-schema) - * - * @publicApi - */ -let StandardSchemaSerializerInterceptor = class StandardSchemaSerializerInterceptor { - reflector; - defaultOptions; - constructor(reflector, defaultOptions = {}) { - this.reflector = reflector; - this.defaultOptions = defaultOptions; - } - intercept(context, next) { - const contextOptions = this.getContextOptions(context); - const schema = contextOptions?.schema ?? this.defaultOptions.schema; - const validateOptions = contextOptions?.validateOptions ?? this.defaultOptions.validateOptions; - return next - .handle() - .pipe(map((res) => this.serialize(res, schema, validateOptions))); - } - /** - * Serializes responses that are non-null objects nor streamable files. - */ - serialize(response, schema, validateOptions) { - if (!schema || !isObject(response) || response instanceof StreamableFile) { - return response; - } - return Array.isArray(response) - ? Promise.all(response.map(item => this.transformToPlain(item, schema, validateOptions))) - : this.transformToPlain(response, schema, validateOptions); - } - async transformToPlain(plainOrClass, schema, validateOptions) { - if (!plainOrClass) { - return plainOrClass; - } - const result = await schema['~standard'].validate(plainOrClass, validateOptions); - if (result.issues) { - throw new Error(`Serialization failed: ${result.issues.map(i => i.message).join(', ')}`); - } - return result.value; - } - getContextOptions(context) { - return this.reflector.getAllAndOverride(CLASS_SERIALIZER_OPTIONS, [ - context.getHandler(), - context.getClass(), - ]); - } -}; -StandardSchemaSerializerInterceptor = __decorate([ - Injectable(), - __param(0, Inject(REFLECTOR)), - __param(1, Optional()), - __metadata("design:paramtypes", [Object, Object]) -], StandardSchemaSerializerInterceptor); -export { StandardSchemaSerializerInterceptor }; diff --git a/node_modules/@nestjs/common/serializer/standard-schema-serializer.interfaces.d.ts b/node_modules/@nestjs/common/serializer/standard-schema-serializer.interfaces.d.ts deleted file mode 100644 index 1aad5f9..0000000 --- a/node_modules/@nestjs/common/serializer/standard-schema-serializer.interfaces.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { StandardSchemaV1 } from '@standard-schema/spec'; -/** - * Options for the `StandardSchemaSerializerInterceptor`, passed via - * `@SerializeOptions({ schema })`. - * - * @publicApi - */ -export interface StandardSchemaSerializerContextOptions { - /** - * A standard schema to use for serialization. - * Used by `StandardSchemaSerializerInterceptor` to validate/transform the response. - */ - schema?: StandardSchemaV1; - /** - * Optional options forwarded to the schema's `~standard.validate()` call. - */ - validateOptions?: StandardSchemaV1.Options; -} diff --git a/node_modules/@nestjs/common/serializer/standard-schema-serializer.interfaces.js b/node_modules/@nestjs/common/serializer/standard-schema-serializer.interfaces.js deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/@nestjs/common/serializer/standard-schema-serializer.interfaces.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/@nestjs/common/services/console-logger.service.d.ts b/node_modules/@nestjs/common/services/console-logger.service.d.ts deleted file mode 100644 index c38a30f..0000000 --- a/node_modules/@nestjs/common/services/console-logger.service.d.ts +++ /dev/null @@ -1,202 +0,0 @@ -import { InspectOptions } from 'util'; -import { LoggerService, LogLevel } from './logger.service'; -/** - * @publicApi - */ -export interface ConsoleLoggerOptions { - /** - * Enabled log levels. - */ - logLevels?: LogLevel[]; - /** - * If enabled, will print timestamp (time difference) between current and previous log message. - * Note: This option is not used when `json` is enabled. - */ - timestamp?: boolean; - /** - * A prefix to be used for each log message. - * Note: This option is not used when `json` is enabled. - */ - prefix?: string; - /** - * If enabled, will print the log message in JSON format. - */ - json?: boolean; - /** - * If enabled, will print the log message in color. - * Default true if json is disabled, false otherwise - */ - colors?: boolean; - /** - * The context of the logger. - */ - context?: string; - /** - * If enabled, will force the use of console.log/console.error instead of process.stdout/stderr.write. - * This is useful for test environments like Jest that can buffer console calls. - * @default false - */ - forceConsole?: boolean; - /** - * If enabled, will print the log message in a single line, even if it is an object with multiple properties. - * If set to a number, the most n inner elements are united on a single line as long as all properties fit into breakLength. Short array elements are also grouped together. - * Default true when `json` is enabled, false otherwise. - */ - compact?: boolean | number; - /** - * Specifies the maximum number of Array, TypedArray, Map, Set, WeakMap, and WeakSet elements to include when formatting. - * Set to null or Infinity to show all elements. Set to 0 or negative to show no elements. - * Ignored when `json` is enabled, colors are disabled, and `compact` is set to true as it produces a parseable JSON output. - * @default 100 - */ - maxArrayLength?: number; - /** - * Specifies the maximum number of characters to include when formatting. - * Set to null or Infinity to show all elements. Set to 0 or negative to show no characters. - * Ignored when `json` is enabled, colors are disabled, and `compact` is set to true as it produces a parseable JSON output. - * @default 10000. - */ - maxStringLength?: number; - /** - * If enabled, will sort keys while formatting objects. - * Can also be a custom sorting function. - * Ignored when `json` is enabled, colors are disabled, and `compact` is set to true as it produces a parseable JSON output. - * @default false - */ - sorted?: boolean | ((a: string, b: string) => number); - /** - * Specifies the number of times to recurse while formatting object. - * This is useful for inspecting large objects. To recurse up to the maximum call stack size pass Infinity or null. - * Ignored when `json` is enabled, colors are disabled, and `compact` is set to true as it produces a parseable JSON output. - * @default 5 - */ - depth?: number; - /** - * If true, object's non-enumerable symbols and properties are included in the formatted result. - * WeakMap and WeakSet entries are also included as well as user defined prototype properties - * @default false - */ - showHidden?: boolean; - /** - * The length at which input values are split across multiple lines. Set to Infinity to format the input as a single line (in combination with "compact" set to true). - * Default Infinity when "compact" is true, 80 otherwise. - * Ignored when `json` is enabled, colors are disabled, and `compact` is set to true as it produces a parseable JSON output. - */ - breakLength?: number; -} -/** - * @publicApi - */ -export declare class ConsoleLogger implements LoggerService { - /** - * The options of the logger. - */ - protected options: ConsoleLoggerOptions; - /** - * The context of the logger (can be set manually or automatically inferred). - */ - protected context?: string; - /** - * The original context of the logger (set in the constructor). - */ - protected originalContext?: string; - /** - * The options used for the "inspect" method. - */ - protected inspectOptions: InspectOptions; - /** - * The last timestamp at which the log message was printed. - */ - protected static lastTimestampAt?: number; - constructor(); - constructor(context: string); - constructor(options: ConsoleLoggerOptions); - constructor(context: string, options: ConsoleLoggerOptions); - /** - * Write a 'log' level log, if the configured level allows for it. - * Prints to `stdout` with newline. - */ - log(message: any, context?: string): void; - log(message: any, ...optionalParams: [...any, string?]): void; - /** - * Write an 'error' level log, if the configured level allows for it. - * Prints to `stderr` with newline. - */ - error(message: any, stackOrContext?: string): void; - error(message: any, stack?: string, context?: string): void; - error(message: any, ...optionalParams: [...any, string?, string?]): void; - /** - * Write a 'warn' level log, if the configured level allows for it. - * Prints to `stdout` with newline. - */ - warn(message: any, context?: string): void; - warn(message: any, ...optionalParams: [...any, string?]): void; - /** - * Write a 'debug' level log, if the configured level allows for it. - * Prints to `stdout` with newline. - */ - debug(message: any, context?: string): void; - debug(message: any, ...optionalParams: [...any, string?]): void; - /** - * Write a 'verbose' level log, if the configured level allows for it. - * Prints to `stdout` with newline. - */ - verbose(message: any, context?: string): void; - verbose(message: any, ...optionalParams: [...any, string?]): void; - /** - * Write a 'fatal' level log, if the configured level allows for it. - * Prints to `stdout` with newline. - */ - fatal(message: any, context?: string): void; - fatal(message: any, ...optionalParams: [...any, string?]): void; - /** - * Set log levels - * @param levels log levels - */ - setLogLevels(levels: LogLevel[]): void; - /** - * Set logger context - * @param context context - */ - setContext(context: string): void; - /** - * Resets the logger context to the value that was passed in the constructor. - */ - resetContext(): void; - isLevelEnabled(level: LogLevel): boolean; - protected getTimestamp(): string; - protected printMessages(messages: unknown[], context?: string, logLevel?: LogLevel, writeStreamType?: 'stdout' | 'stderr', errorStack?: unknown): void; - protected printAsJson(message: unknown, options: { - context: string; - logLevel: LogLevel; - writeStreamType?: 'stdout' | 'stderr'; - errorStack?: unknown; - }): void; - protected getJsonLogObject(message: unknown, options: { - context: string; - logLevel: LogLevel; - writeStreamType?: 'stdout' | 'stderr'; - errorStack?: unknown; - }): { - level: LogLevel; - pid: number; - timestamp: number; - message: unknown; - context?: string; - stack?: unknown; - }; - protected formatPid(pid: number): string; - protected formatContext(context: string): string; - protected formatMessage(logLevel: LogLevel, message: unknown, pidMessage: string, formattedLogLevel: string, contextMessage: string, timestampDiff: string): string; - protected stringifyMessage(message: unknown, logLevel: LogLevel): any; - protected colorize(message: string, logLevel: LogLevel): string; - protected printStackTrace(stack: string): void; - protected updateAndGetTimestampDiff(): string; - protected formatTimestampDiff(timestampDiff: number): string; - protected getInspectOptions(): InspectOptions; - protected stringifyReplacer(key: string, value: unknown): unknown; - private getContextAndMessagesToPrint; - private getContextAndStackAndMessagesToPrint; - private isStackFormat; - private getColorByLogLevel; -} diff --git a/node_modules/@nestjs/common/services/console-logger.service.js b/node_modules/@nestjs/common/services/console-logger.service.js deleted file mode 100644 index 26713f7..0000000 --- a/node_modules/@nestjs/common/services/console-logger.service.js +++ /dev/null @@ -1,379 +0,0 @@ -"use strict"; -var ConsoleLogger_1; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ConsoleLogger = void 0; -const tslib_1 = require("tslib"); -const util_1 = require("util"); -const core_1 = require("../decorators/core"); -const cli_colors_util_1 = require("../utils/cli-colors.util"); -const shared_utils_1 = require("../utils/shared.utils"); -const is_log_level_enabled_util_1 = require("./utils/is-log-level-enabled.util"); -const DEFAULT_DEPTH = 5; -const DEFAULT_LOG_LEVELS = [ - 'log', - 'error', - 'warn', - 'debug', - 'verbose', - 'fatal', -]; -const dateTimeFormatter = new Intl.DateTimeFormat(undefined, { - year: 'numeric', - hour: 'numeric', - minute: 'numeric', - second: 'numeric', - day: '2-digit', - month: '2-digit', -}); -/** - * @publicApi - */ -let ConsoleLogger = ConsoleLogger_1 = class ConsoleLogger { - constructor(contextOrOptions, options) { - // eslint-disable-next-line prefer-const - let [context, opts] = (0, shared_utils_1.isString)(contextOrOptions) - ? [contextOrOptions, options] - : options - ? [undefined, options] - : [contextOrOptions?.context, contextOrOptions]; - opts = opts ?? {}; - opts.logLevels ??= DEFAULT_LOG_LEVELS; - opts.colors ??= opts.colors ?? (opts.json ? false : (0, cli_colors_util_1.isColorAllowed)()); - opts.prefix ??= 'Nest'; - this.options = opts; - this.inspectOptions = this.getInspectOptions(); - if (context) { - this.context = context; - this.originalContext = context; - } - } - log(message, ...optionalParams) { - if (!this.isLevelEnabled('log')) { - return; - } - const { messages, context } = this.getContextAndMessagesToPrint([ - message, - ...optionalParams, - ]); - this.printMessages(messages, context, 'log'); - } - error(message, ...optionalParams) { - if (!this.isLevelEnabled('error')) { - return; - } - const { messages, context, stack } = this.getContextAndStackAndMessagesToPrint([message, ...optionalParams]); - this.printMessages(messages, context, 'error', 'stderr', stack); - this.printStackTrace(stack); - } - warn(message, ...optionalParams) { - if (!this.isLevelEnabled('warn')) { - return; - } - const { messages, context } = this.getContextAndMessagesToPrint([ - message, - ...optionalParams, - ]); - this.printMessages(messages, context, 'warn'); - } - debug(message, ...optionalParams) { - if (!this.isLevelEnabled('debug')) { - return; - } - const { messages, context } = this.getContextAndMessagesToPrint([ - message, - ...optionalParams, - ]); - this.printMessages(messages, context, 'debug'); - } - verbose(message, ...optionalParams) { - if (!this.isLevelEnabled('verbose')) { - return; - } - const { messages, context } = this.getContextAndMessagesToPrint([ - message, - ...optionalParams, - ]); - this.printMessages(messages, context, 'verbose'); - } - fatal(message, ...optionalParams) { - if (!this.isLevelEnabled('fatal')) { - return; - } - const { messages, context } = this.getContextAndMessagesToPrint([ - message, - ...optionalParams, - ]); - this.printMessages(messages, context, 'fatal'); - } - /** - * Set log levels - * @param levels log levels - */ - setLogLevels(levels) { - if (!this.options) { - this.options = {}; - } - this.options.logLevels = levels; - } - /** - * Set logger context - * @param context context - */ - setContext(context) { - this.context = context; - } - /** - * Resets the logger context to the value that was passed in the constructor. - */ - resetContext() { - this.context = this.originalContext; - } - isLevelEnabled(level) { - const logLevels = this.options?.logLevels; - return (0, is_log_level_enabled_util_1.isLogLevelEnabled)(level, logLevels); - } - getTimestamp() { - return dateTimeFormatter.format(Date.now()); - } - printMessages(messages, context = '', logLevel = 'log', writeStreamType, errorStack) { - messages.forEach(message => { - if (this.options.json) { - this.printAsJson(message, { - context, - logLevel, - writeStreamType, - errorStack, - }); - return; - } - const pidMessage = this.formatPid(process.pid); - const contextMessage = this.formatContext(context); - const timestampDiff = this.updateAndGetTimestampDiff(); - const formattedLogLevel = logLevel.toUpperCase().padStart(7, ' '); - const formattedMessage = this.formatMessage(logLevel, message, pidMessage, formattedLogLevel, contextMessage, timestampDiff); - if (this.options.forceConsole) { - if (writeStreamType === 'stderr') { - console.error(formattedMessage.trim()); - } - else { - console.log(formattedMessage.trim()); - } - } - else { - process[writeStreamType ?? 'stdout'].write(formattedMessage); - } - }); - } - printAsJson(message, options) { - const logObject = this.getJsonLogObject(message, options); - const formattedMessage = !this.options.colors && this.inspectOptions.compact === true - ? JSON.stringify(logObject, this.stringifyReplacer) - : (0, util_1.inspect)(logObject, this.inspectOptions); - if (this.options.forceConsole) { - if (options.writeStreamType === 'stderr') { - console.error(formattedMessage); - } - else { - console.log(formattedMessage); - } - } - else { - process[options.writeStreamType ?? 'stdout'].write(`${formattedMessage}\n`); - } - } - getJsonLogObject(message, options) { - const logObject = { - level: options.logLevel, - pid: process.pid, - timestamp: Date.now(), - message, - }; - if (options.context) { - logObject.context = options.context; - } - if (options.errorStack) { - logObject.stack = options.errorStack; - } - return logObject; - } - formatPid(pid) { - return `[${this.options.prefix}] ${pid} - `; - } - formatContext(context) { - if (!context) { - return ''; - } - context = `[${context}] `; - return this.options.colors ? (0, cli_colors_util_1.yellow)(context) : context; - } - formatMessage(logLevel, message, pidMessage, formattedLogLevel, contextMessage, timestampDiff) { - const output = this.stringifyMessage(message, logLevel); - pidMessage = this.colorize(pidMessage, logLevel); - formattedLogLevel = this.colorize(formattedLogLevel, logLevel); - return `${pidMessage}${this.getTimestamp()} ${formattedLogLevel} ${contextMessage}${output}${timestampDiff}\n`; - } - stringifyMessage(message, logLevel) { - if ((0, shared_utils_1.isFunction)(message)) { - const messageAsStr = Function.prototype.toString.call(message); - const isClass = messageAsStr.startsWith('class '); - if (isClass) { - // If the message is a class, we will display the class name. - return this.stringifyMessage(message.name, logLevel); - } - // If the message is a non-class function, call it and re-resolve its value. - return this.stringifyMessage(message(), logLevel); - } - if (typeof message === 'string') { - return this.colorize(message, logLevel); - } - const outputText = (0, util_1.inspect)(message, this.inspectOptions); - if ((0, shared_utils_1.isPlainObject)(message)) { - return `Object(${Object.keys(message).length}) ${outputText}`; - } - if (Array.isArray(message)) { - return `Array(${message.length}) ${outputText}`; - } - return outputText; - } - colorize(message, logLevel) { - if (!this.options.colors || this.options.json) { - return message; - } - const color = this.getColorByLogLevel(logLevel); - return color(message); - } - printStackTrace(stack) { - if (!stack || this.options.json) { - return; - } - if (this.options.forceConsole) { - console.error(stack); - } - else { - process.stderr.write(`${stack}\n`); - } - } - updateAndGetTimestampDiff() { - const includeTimestamp = ConsoleLogger_1.lastTimestampAt && this.options?.timestamp; - const result = includeTimestamp - ? this.formatTimestampDiff(Date.now() - ConsoleLogger_1.lastTimestampAt) - : ''; - ConsoleLogger_1.lastTimestampAt = Date.now(); - return result; - } - formatTimestampDiff(timestampDiff) { - const formattedDiff = ` +${timestampDiff}ms`; - return this.options.colors ? (0, cli_colors_util_1.yellow)(formattedDiff) : formattedDiff; - } - getInspectOptions() { - let breakLength = this.options.breakLength; - if (typeof breakLength === 'undefined') { - breakLength = this.options.colors - ? this.options.compact - ? Infinity - : undefined - : this.options.compact === false - ? undefined - : Infinity; // default breakLength to Infinity if inline is not set and colors is false - } - const inspectOptions = { - depth: this.options.depth ?? DEFAULT_DEPTH, - sorted: this.options.sorted, - showHidden: this.options.showHidden, - compact: this.options.compact ?? (this.options.json ? true : false), - colors: this.options.colors, - breakLength, - }; - if (typeof this.options.maxArrayLength !== 'undefined') { - inspectOptions.maxArrayLength = this.options.maxArrayLength; - } - if (typeof this.options.maxStringLength !== 'undefined') { - inspectOptions.maxStringLength = this.options.maxStringLength; - } - return inspectOptions; - } - stringifyReplacer(key, value) { - // Mimic util.inspect behavior for JSON logger with compact on and colors off - if (typeof value === 'bigint') { - return value.toString(); - } - if (typeof value === 'symbol') { - return value.toString(); - } - if (value instanceof Map || - value instanceof Set || - value instanceof Error) { - return `${(0, util_1.inspect)(value, this.inspectOptions)}`; - } - return value; - } - getContextAndMessagesToPrint(args) { - if (args?.length <= 1) { - return { messages: args, context: this.context }; - } - const lastElement = args[args.length - 1]; - const isContext = (0, shared_utils_1.isString)(lastElement); - if (!isContext) { - return { messages: args, context: this.context }; - } - return { - context: lastElement, - messages: args.slice(0, args.length - 1), - }; - } - getContextAndStackAndMessagesToPrint(args) { - if (args.length === 2) { - return this.isStackFormat(args[1]) - ? { - messages: [args[0]], - stack: args[1], - context: this.context, - } - : { ...this.getContextAndMessagesToPrint(args) }; - } - const { messages, context } = this.getContextAndMessagesToPrint(args); - if (messages?.length <= 1) { - return { messages, context }; - } - const lastElement = messages[messages.length - 1]; - const isStack = (0, shared_utils_1.isString)(lastElement); - // https://github.com/nestjs/nest/issues/11074#issuecomment-1421680060 - if (!isStack && !(0, shared_utils_1.isUndefined)(lastElement)) { - return { messages, context }; - } - return { - stack: lastElement, - messages: messages.slice(0, messages.length - 1), - context, - }; - } - isStackFormat(stack) { - if (!(0, shared_utils_1.isString)(stack) && !(0, shared_utils_1.isUndefined)(stack)) { - return false; - } - return /^(.)+\n\s+at .+:\d+:\d+/.test(stack); - } - getColorByLogLevel(level) { - switch (level) { - case 'debug': - return cli_colors_util_1.clc.magentaBright; - case 'warn': - return cli_colors_util_1.clc.yellow; - case 'error': - return cli_colors_util_1.clc.red; - case 'verbose': - return cli_colors_util_1.clc.cyanBright; - case 'fatal': - return cli_colors_util_1.clc.bold; - default: - return cli_colors_util_1.clc.green; - } - } -}; -exports.ConsoleLogger = ConsoleLogger; -exports.ConsoleLogger = ConsoleLogger = ConsoleLogger_1 = tslib_1.__decorate([ - (0, core_1.Injectable)(), - tslib_1.__param(0, (0, core_1.Optional)()), - tslib_1.__param(1, (0, core_1.Optional)()), - tslib_1.__metadata("design:paramtypes", [Object, Object]) -], ConsoleLogger); diff --git a/node_modules/@nestjs/common/services/index.d.ts b/node_modules/@nestjs/common/services/index.d.ts deleted file mode 100644 index c1cad96..0000000 --- a/node_modules/@nestjs/common/services/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './console-logger.service'; -export * from './logger.service'; -export * from './utils/filter-log-levels.util'; diff --git a/node_modules/@nestjs/common/services/index.js b/node_modules/@nestjs/common/services/index.js deleted file mode 100644 index 95e9918..0000000 --- a/node_modules/@nestjs/common/services/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./console-logger.service"), exports); -tslib_1.__exportStar(require("./logger.service"), exports); -tslib_1.__exportStar(require("./utils/filter-log-levels.util"), exports); diff --git a/node_modules/@nestjs/common/services/logger.service.d.ts b/node_modules/@nestjs/common/services/logger.service.d.ts deleted file mode 100644 index 917ec98..0000000 --- a/node_modules/@nestjs/common/services/logger.service.d.ts +++ /dev/null @@ -1,152 +0,0 @@ -export declare const LOG_LEVELS: ["verbose", "debug", "log", "warn", "error", "fatal"]; -/** - * @publicApi - */ -export type LogLevel = (typeof LOG_LEVELS)[number]; -/** - * @publicApi - */ -export interface LoggerService { - /** - * Write a 'log' level log. - */ - log(message: any, ...optionalParams: any[]): any; - /** - * Write an 'error' level log. - */ - error(message: any, ...optionalParams: any[]): any; - /** - * Write a 'warn' level log. - */ - warn(message: any, ...optionalParams: any[]): any; - /** - * Write a 'debug' level log. - */ - debug?(message: any, ...optionalParams: any[]): any; - /** - * Write a 'verbose' level log. - */ - verbose?(message: any, ...optionalParams: any[]): any; - /** - * Write a 'fatal' level log. - */ - fatal?(message: any, ...optionalParams: any[]): any; - /** - * Set log levels. - * @param levels log levels - */ - setLogLevels?(levels: LogLevel[]): any; -} -interface LogBufferRecord { - /** - * Method to execute. - */ - methodRef: Function; - /** - * Arguments to pass to the method. - */ - arguments: unknown[]; -} -/** - * @publicApi - */ -export declare class Logger implements LoggerService { - protected context?: string | undefined; - protected options: { - timestamp?: boolean; - }; - protected static logBuffer: LogBufferRecord[]; - protected static staticInstanceRef?: LoggerService; - protected static logLevels?: LogLevel[]; - private static isBufferAttached; - protected localInstanceRef?: LoggerService; - private static WrapBuffer; - constructor(); - constructor(context: string); - constructor(context: string, options?: { - timestamp?: boolean; - }); - get localInstance(): LoggerService; - /** - * Write an 'error' level log. - */ - error(message: any, stack?: string, context?: string): void; - error(message: any, ...optionalParams: [...any, string?, string?]): void; - /** - * Write a 'log' level log. - */ - log(message: any, context?: string): void; - log(message: any, ...optionalParams: [...any, string?]): void; - /** - * Write a 'warn' level log. - */ - warn(message: any, context?: string): void; - warn(message: any, ...optionalParams: [...any, string?]): void; - /** - * Write a 'debug' level log. - */ - debug(message: any, context?: string): void; - debug(message: any, ...optionalParams: [...any, string?]): void; - /** - * Write a 'verbose' level log. - */ - verbose(message: any, context?: string): void; - verbose(message: any, ...optionalParams: [...any, string?]): void; - /** - * Write a 'fatal' level log. - */ - fatal(message: any, context?: string): void; - fatal(message: any, ...optionalParams: [...any, string?]): void; - /** - * Write an 'error' level log. - */ - static error(message: any, stackOrContext?: string): void; - static error(message: any, context?: string): void; - static error(message: any, stack?: string, context?: string): void; - static error(message: any, ...optionalParams: [...any, string?, string?]): void; - /** - * Write a 'log' level log. - */ - static log(message: any, context?: string): void; - static log(message: any, ...optionalParams: [...any, string?]): void; - /** - * Write a 'warn' level log. - */ - static warn(message: any, context?: string): void; - static warn(message: any, ...optionalParams: [...any, string?]): void; - /** - * Write a 'debug' level log, if the configured level allows for it. - * Prints to `stdout` with newline. - */ - static debug(message: any, context?: string): void; - static debug(message: any, ...optionalParams: [...any, string?]): void; - /** - * Write a 'verbose' level log. - */ - static verbose(message: any, context?: string): void; - static verbose(message: any, ...optionalParams: [...any, string?]): void; - /** - * Write a 'fatal' level log. - */ - static fatal(message: any, context?: string): void; - static fatal(message: any, ...optionalParams: [...any, string?]): void; - /** - * Print buffered logs and detach buffer. - */ - static flush(): void; - /** - * Attach buffer. - * Turns on initialization logs buffering. - */ - static attachBuffer(): void; - /** - * Detach buffer. - * Turns off initialization logs buffering. - */ - static detachBuffer(): void; - static getTimestamp(): string; - static overrideLogger(logger: LoggerService | LogLevel[] | boolean): any; - static isLevelEnabled(level: LogLevel): boolean; - private registerLocalInstanceRef; -} -export {}; diff --git a/node_modules/@nestjs/common/services/logger.service.js b/node_modules/@nestjs/common/services/logger.service.js deleted file mode 100644 index ca90673..0000000 --- a/node_modules/@nestjs/common/services/logger.service.js +++ /dev/null @@ -1,251 +0,0 @@ -"use strict"; -var Logger_1; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Logger = exports.LOG_LEVELS = void 0; -const tslib_1 = require("tslib"); -const core_1 = require("../decorators/core"); -const shared_utils_1 = require("../utils/shared.utils"); -const console_logger_service_1 = require("./console-logger.service"); -const utils_1 = require("./utils"); -exports.LOG_LEVELS = [ - 'verbose', - 'debug', - 'log', - 'warn', - 'error', - 'fatal', -]; -const DEFAULT_LOGGER = new console_logger_service_1.ConsoleLogger(); -const dateTimeFormatter = new Intl.DateTimeFormat(undefined, { - year: 'numeric', - hour: 'numeric', - minute: 'numeric', - second: 'numeric', - day: '2-digit', - month: '2-digit', -}); -/** - * @publicApi - */ -let Logger = Logger_1 = class Logger { - constructor(context, options = {}) { - this.context = context; - this.options = options; - } - get localInstance() { - if (Logger_1.staticInstanceRef === DEFAULT_LOGGER) { - return this.registerLocalInstanceRef(); - } - else if (Logger_1.staticInstanceRef instanceof Logger_1) { - const prototype = Object.getPrototypeOf(Logger_1.staticInstanceRef); - if (prototype.constructor === Logger_1) { - return this.registerLocalInstanceRef(); - } - } - return Logger_1.staticInstanceRef; - } - error(message, ...optionalParams) { - optionalParams = this.context - ? (optionalParams.length ? optionalParams : [undefined]).concat(this.context) - : optionalParams; - this.localInstance?.error(message, ...optionalParams); - } - log(message, ...optionalParams) { - optionalParams = this.context - ? optionalParams.concat(this.context) - : optionalParams; - this.localInstance?.log(message, ...optionalParams); - } - warn(message, ...optionalParams) { - optionalParams = this.context - ? optionalParams.concat(this.context) - : optionalParams; - this.localInstance?.warn(message, ...optionalParams); - } - debug(message, ...optionalParams) { - optionalParams = this.context - ? optionalParams.concat(this.context) - : optionalParams; - this.localInstance?.debug?.(message, ...optionalParams); - } - verbose(message, ...optionalParams) { - optionalParams = this.context - ? optionalParams.concat(this.context) - : optionalParams; - this.localInstance?.verbose?.(message, ...optionalParams); - } - fatal(message, ...optionalParams) { - optionalParams = this.context - ? optionalParams.concat(this.context) - : optionalParams; - this.localInstance?.fatal?.(message, ...optionalParams); - } - static error(message, ...optionalParams) { - this.staticInstanceRef?.error(message, ...optionalParams); - } - static log(message, ...optionalParams) { - this.staticInstanceRef?.log(message, ...optionalParams); - } - static warn(message, ...optionalParams) { - this.staticInstanceRef?.warn(message, ...optionalParams); - } - static debug(message, ...optionalParams) { - this.staticInstanceRef?.debug?.(message, ...optionalParams); - } - static verbose(message, ...optionalParams) { - this.staticInstanceRef?.verbose?.(message, ...optionalParams); - } - static fatal(message, ...optionalParams) { - this.staticInstanceRef?.fatal?.(message, ...optionalParams); - } - /** - * Print buffered logs and detach buffer. - */ - static flush() { - this.isBufferAttached = false; - this.logBuffer.forEach(item => item.methodRef(...item.arguments)); - this.logBuffer = []; - } - /** - * Attach buffer. - * Turns on initialization logs buffering. - */ - static attachBuffer() { - this.isBufferAttached = true; - } - /** - * Detach buffer. - * Turns off initialization logs buffering. - */ - static detachBuffer() { - this.isBufferAttached = false; - } - static getTimestamp() { - return dateTimeFormatter.format(Date.now()); - } - static overrideLogger(logger) { - if (Array.isArray(logger)) { - Logger_1.logLevels = logger; - return this.staticInstanceRef?.setLogLevels?.(logger); - } - if ((0, shared_utils_1.isObject)(logger)) { - if (logger instanceof Logger_1 && logger.constructor !== Logger_1) { - const errorMessage = `Using the "extends Logger" instruction is not allowed in Nest v9. Please, use "extends ConsoleLogger" instead.`; - this.staticInstanceRef?.error(errorMessage); - throw new Error(errorMessage); - } - this.staticInstanceRef = logger; - } - else { - this.staticInstanceRef = undefined; - } - } - static isLevelEnabled(level) { - const logLevels = Logger_1.logLevels; - return (0, utils_1.isLogLevelEnabled)(level, logLevels); - } - registerLocalInstanceRef() { - if (this.localInstanceRef) { - return this.localInstanceRef; - } - this.localInstanceRef = new console_logger_service_1.ConsoleLogger(this.context, { - timestamp: this.options?.timestamp, - logLevels: Logger_1.logLevels, - }); - return this.localInstanceRef; - } -}; -exports.Logger = Logger; -Logger.logBuffer = new Array(); -Logger.staticInstanceRef = DEFAULT_LOGGER; -Logger.WrapBuffer = (target, propertyKey, descriptor) => { - const originalFn = descriptor.value; - descriptor.value = function (...args) { - if (Logger_1.isBufferAttached) { - Logger_1.logBuffer.push({ - methodRef: originalFn.bind(this), - arguments: args, - }); - return; - } - return originalFn.call(this, ...args); - }; -}; -tslib_1.__decorate([ - Logger.WrapBuffer, - tslib_1.__metadata("design:type", Function), - tslib_1.__metadata("design:paramtypes", [Object, Object]), - tslib_1.__metadata("design:returntype", void 0) -], Logger.prototype, "error", null); -tslib_1.__decorate([ - Logger.WrapBuffer, - tslib_1.__metadata("design:type", Function), - tslib_1.__metadata("design:paramtypes", [Object, Object]), - tslib_1.__metadata("design:returntype", void 0) -], Logger.prototype, "log", null); -tslib_1.__decorate([ - Logger.WrapBuffer, - tslib_1.__metadata("design:type", Function), - tslib_1.__metadata("design:paramtypes", [Object, Object]), - tslib_1.__metadata("design:returntype", void 0) -], Logger.prototype, "warn", null); -tslib_1.__decorate([ - Logger.WrapBuffer, - tslib_1.__metadata("design:type", Function), - tslib_1.__metadata("design:paramtypes", [Object, Object]), - tslib_1.__metadata("design:returntype", void 0) -], Logger.prototype, "debug", null); -tslib_1.__decorate([ - Logger.WrapBuffer, - tslib_1.__metadata("design:type", Function), - tslib_1.__metadata("design:paramtypes", [Object, Object]), - tslib_1.__metadata("design:returntype", void 0) -], Logger.prototype, "verbose", null); -tslib_1.__decorate([ - Logger.WrapBuffer, - tslib_1.__metadata("design:type", Function), - tslib_1.__metadata("design:paramtypes", [Object, Object]), - tslib_1.__metadata("design:returntype", void 0) -], Logger.prototype, "fatal", null); -tslib_1.__decorate([ - Logger.WrapBuffer, - tslib_1.__metadata("design:type", Function), - tslib_1.__metadata("design:paramtypes", [Object, Object]), - tslib_1.__metadata("design:returntype", void 0) -], Logger, "error", null); -tslib_1.__decorate([ - Logger.WrapBuffer, - tslib_1.__metadata("design:type", Function), - tslib_1.__metadata("design:paramtypes", [Object, Object]), - tslib_1.__metadata("design:returntype", void 0) -], Logger, "log", null); -tslib_1.__decorate([ - Logger.WrapBuffer, - tslib_1.__metadata("design:type", Function), - tslib_1.__metadata("design:paramtypes", [Object, Object]), - tslib_1.__metadata("design:returntype", void 0) -], Logger, "warn", null); -tslib_1.__decorate([ - Logger.WrapBuffer, - tslib_1.__metadata("design:type", Function), - tslib_1.__metadata("design:paramtypes", [Object, Object]), - tslib_1.__metadata("design:returntype", void 0) -], Logger, "debug", null); -tslib_1.__decorate([ - Logger.WrapBuffer, - tslib_1.__metadata("design:type", Function), - tslib_1.__metadata("design:paramtypes", [Object, Object]), - tslib_1.__metadata("design:returntype", void 0) -], Logger, "verbose", null); -tslib_1.__decorate([ - Logger.WrapBuffer, - tslib_1.__metadata("design:type", Function), - tslib_1.__metadata("design:paramtypes", [Object, Object]), - tslib_1.__metadata("design:returntype", void 0) -], Logger, "fatal", null); -exports.Logger = Logger = Logger_1 = tslib_1.__decorate([ - (0, core_1.Injectable)(), - tslib_1.__param(0, (0, core_1.Optional)()), - tslib_1.__param(1, (0, core_1.Optional)()), - tslib_1.__metadata("design:paramtypes", [String, Object]) -], Logger); diff --git a/node_modules/@nestjs/common/services/utils/filter-log-levels.util.d.ts b/node_modules/@nestjs/common/services/utils/filter-log-levels.util.d.ts deleted file mode 100644 index d85f984..0000000 --- a/node_modules/@nestjs/common/services/utils/filter-log-levels.util.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { LogLevel } from '../logger.service'; -/** - * @publicApi - */ -export declare function filterLogLevels(parseableString?: string): LogLevel[]; diff --git a/node_modules/@nestjs/common/services/utils/filter-log-levels.util.js b/node_modules/@nestjs/common/services/utils/filter-log-levels.util.js deleted file mode 100644 index 6586b86..0000000 --- a/node_modules/@nestjs/common/services/utils/filter-log-levels.util.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.filterLogLevels = filterLogLevels; -const logger_service_1 = require("../logger.service"); -const is_log_level_util_1 = require("./is-log-level.util"); -/** - * @publicApi - */ -function filterLogLevels(parseableString = '') { - const sanitizedString = parseableString.replaceAll(' ', '').toLowerCase(); - if (sanitizedString[0] === '>') { - const orEqual = sanitizedString[1] === '='; - const logLevelIndex = logger_service_1.LOG_LEVELS.indexOf(sanitizedString.substring(orEqual ? 2 : 1)); - if (logLevelIndex === -1) { - throw new Error(`parse error (unknown log level): ${sanitizedString}`); - } - return logger_service_1.LOG_LEVELS.slice(orEqual ? logLevelIndex : logLevelIndex + 1); - } - else if (sanitizedString.includes(',')) { - return sanitizedString.split(',').filter(is_log_level_util_1.isLogLevel); - } - return (0, is_log_level_util_1.isLogLevel)(sanitizedString) ? [sanitizedString] : logger_service_1.LOG_LEVELS; -} diff --git a/node_modules/@nestjs/common/services/utils/index.d.ts b/node_modules/@nestjs/common/services/utils/index.d.ts deleted file mode 100644 index e6ad943..0000000 --- a/node_modules/@nestjs/common/services/utils/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './filter-log-levels.util'; -export * from './is-log-level-enabled.util'; -export * from './is-log-level.util'; diff --git a/node_modules/@nestjs/common/services/utils/index.js b/node_modules/@nestjs/common/services/utils/index.js deleted file mode 100644 index a2d51ae..0000000 --- a/node_modules/@nestjs/common/services/utils/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./filter-log-levels.util"), exports); -tslib_1.__exportStar(require("./is-log-level-enabled.util"), exports); -tslib_1.__exportStar(require("./is-log-level.util"), exports); diff --git a/node_modules/@nestjs/common/services/utils/is-log-level-enabled.util.d.ts b/node_modules/@nestjs/common/services/utils/is-log-level-enabled.util.d.ts deleted file mode 100644 index 57b9b3f..0000000 --- a/node_modules/@nestjs/common/services/utils/is-log-level-enabled.util.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { LogLevel } from '../logger.service'; -/** - * Checks if target level is enabled. - * @param targetLevel target level - * @param logLevels array of enabled log levels - */ -export declare function isLogLevelEnabled(targetLevel: LogLevel, logLevels: LogLevel[] | undefined): boolean; diff --git a/node_modules/@nestjs/common/services/utils/is-log-level-enabled.util.js b/node_modules/@nestjs/common/services/utils/is-log-level-enabled.util.js deleted file mode 100644 index 515e39f..0000000 --- a/node_modules/@nestjs/common/services/utils/is-log-level-enabled.util.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isLogLevelEnabled = isLogLevelEnabled; -const LOG_LEVEL_VALUES = { - verbose: 0, - debug: 1, - log: 2, - warn: 3, - error: 4, - fatal: 5, -}; -/** - * Checks if target level is enabled. - * @param targetLevel target level - * @param logLevels array of enabled log levels - */ -function isLogLevelEnabled(targetLevel, logLevels) { - if (!logLevels || (Array.isArray(logLevels) && logLevels?.length === 0)) { - return false; - } - if (logLevels.includes(targetLevel)) { - return true; - } - let highestLogLevelValue = -Infinity; - for (const level of logLevels) { - const v = LOG_LEVEL_VALUES[level]; - if (v > highestLogLevelValue) - highestLogLevelValue = v; - } - const targetLevelValue = LOG_LEVEL_VALUES[targetLevel]; - return targetLevelValue >= highestLogLevelValue; -} diff --git a/node_modules/@nestjs/common/services/utils/is-log-level.util.d.ts b/node_modules/@nestjs/common/services/utils/is-log-level.util.d.ts deleted file mode 100644 index 761c23b..0000000 --- a/node_modules/@nestjs/common/services/utils/is-log-level.util.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { LogLevel } from '../logger.service'; -/** - * @publicApi - */ -export declare function isLogLevel(maybeLogLevel: any): maybeLogLevel is LogLevel; diff --git a/node_modules/@nestjs/common/services/utils/is-log-level.util.js b/node_modules/@nestjs/common/services/utils/is-log-level.util.js deleted file mode 100644 index ff502d9..0000000 --- a/node_modules/@nestjs/common/services/utils/is-log-level.util.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isLogLevel = isLogLevel; -const logger_service_1 = require("../logger.service"); -/** - * @publicApi - */ -function isLogLevel(maybeLogLevel) { - return logger_service_1.LOG_LEVELS.includes(maybeLogLevel); -} diff --git a/node_modules/@nestjs/common/tsconfig.build.json b/node_modules/@nestjs/common/tsconfig.build.json deleted file mode 100644 index 2d16c3a..0000000 --- a/node_modules/@nestjs/common/tsconfig.build.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../tsconfig.build.json", - "compilerOptions": { - "outDir": ".", - "rootDir": ".", - "paths": {} - }, - "exclude": ["node_modules", "dist", "test/**/*", "*.spec.ts"], - "references": [] -} diff --git a/node_modules/@nestjs/common/utils/assign-custom-metadata.util.d.ts b/node_modules/@nestjs/common/utils/assign-custom-metadata.util.d.ts deleted file mode 100644 index ade9860..0000000 --- a/node_modules/@nestjs/common/utils/assign-custom-metadata.util.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { ParamData, RouteParamMetadata } from '../decorators/http/route-params.decorator'; -import { PipeTransform, Type } from '../interfaces'; -import { CustomParamFactory } from '../interfaces/features/custom-route-param-factory.interface'; -export declare function assignCustomParameterMetadata(args: Record, paramtype: number | string, index: number, factory: CustomParamFactory, data?: ParamData, ...pipes: (Type | PipeTransform)[]): {}; diff --git a/node_modules/@nestjs/common/utils/assign-custom-metadata.util.js b/node_modules/@nestjs/common/utils/assign-custom-metadata.util.js deleted file mode 100644 index 312e978..0000000 --- a/node_modules/@nestjs/common/utils/assign-custom-metadata.util.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.assignCustomParameterMetadata = assignCustomParameterMetadata; -const constants_1 = require("../constants"); -function assignCustomParameterMetadata(args, paramtype, index, factory, data, ...pipes) { - return { - ...args, - [`${paramtype}${constants_1.CUSTOM_ROUTE_ARGS_METADATA}:${index}`]: { - index, - factory, - data, - pipes, - }, - }; -} diff --git a/node_modules/@nestjs/common/utils/cli-colors.util.d.ts b/node_modules/@nestjs/common/utils/cli-colors.util.d.ts deleted file mode 100644 index aff85ad..0000000 --- a/node_modules/@nestjs/common/utils/cli-colors.util.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export declare const isColorAllowed: () => boolean; -export declare const clc: { - bold: (text: string) => string; - green: (text: string) => string; - yellow: (text: string) => string; - red: (text: string) => string; - magentaBright: (text: string) => string; - cyanBright: (text: string) => string; -}; -export declare const yellow: (text: string) => string; diff --git a/node_modules/@nestjs/common/utils/cli-colors.util.js b/node_modules/@nestjs/common/utils/cli-colors.util.js deleted file mode 100644 index 2813867..0000000 --- a/node_modules/@nestjs/common/utils/cli-colors.util.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.yellow = exports.clc = exports.isColorAllowed = void 0; -const isColorAllowed = () => !process.env.NO_COLOR; -exports.isColorAllowed = isColorAllowed; -const colorIfAllowed = (colorFn) => (text) => (0, exports.isColorAllowed)() ? colorFn(text) : text; -exports.clc = { - bold: colorIfAllowed((text) => `\x1B[1m${text}\x1B[0m`), - green: colorIfAllowed((text) => `\x1B[32m${text}\x1B[39m`), - yellow: colorIfAllowed((text) => `\x1B[33m${text}\x1B[39m`), - red: colorIfAllowed((text) => `\x1B[31m${text}\x1B[39m`), - magentaBright: colorIfAllowed((text) => `\x1B[95m${text}\x1B[39m`), - cyanBright: colorIfAllowed((text) => `\x1B[96m${text}\x1B[39m`), -}; -exports.yellow = colorIfAllowed((text) => `\x1B[38;5;3m${text}\x1B[39m`); diff --git a/node_modules/@nestjs/common/utils/extend-metadata.util.d.ts b/node_modules/@nestjs/common/utils/extend-metadata.util.d.ts deleted file mode 100644 index 2911201..0000000 --- a/node_modules/@nestjs/common/utils/extend-metadata.util.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function extendArrayMetadata>(key: string, metadata: T, target: Function): void; diff --git a/node_modules/@nestjs/common/utils/extend-metadata.util.js b/node_modules/@nestjs/common/utils/extend-metadata.util.js deleted file mode 100644 index 6534bbb..0000000 --- a/node_modules/@nestjs/common/utils/extend-metadata.util.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.extendArrayMetadata = extendArrayMetadata; -function extendArrayMetadata(key, metadata, target) { - const previousValue = Reflect.getMetadata(key, target) || []; - const value = [...previousValue, ...metadata]; - Reflect.defineMetadata(key, value, target); -} diff --git a/node_modules/@nestjs/common/utils/forward-ref.util.d.ts b/node_modules/@nestjs/common/utils/forward-ref.util.d.ts deleted file mode 100644 index ccec016..0000000 --- a/node_modules/@nestjs/common/utils/forward-ref.util.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ForwardReference } from '../interfaces/modules/forward-reference.interface'; -/** - * @publicApi - */ -export declare const forwardRef: (fn: () => any) => ForwardReference; diff --git a/node_modules/@nestjs/common/utils/forward-ref.util.js b/node_modules/@nestjs/common/utils/forward-ref.util.js deleted file mode 100644 index 80f89d3..0000000 --- a/node_modules/@nestjs/common/utils/forward-ref.util.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.forwardRef = void 0; -/** - * @publicApi - */ -const forwardRef = (fn) => ({ - forwardRef: fn, -}); -exports.forwardRef = forwardRef; diff --git a/node_modules/@nestjs/common/utils/http-error-by-code.util.d.ts b/node_modules/@nestjs/common/utils/http-error-by-code.util.d.ts deleted file mode 100644 index 89ed9e1..0000000 --- a/node_modules/@nestjs/common/utils/http-error-by-code.util.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { HttpStatus } from '../enums'; -import { Type } from '../interfaces'; -export type ErrorHttpStatusCode = HttpStatus.BAD_GATEWAY | HttpStatus.BAD_REQUEST | HttpStatus.CONFLICT | HttpStatus.FORBIDDEN | HttpStatus.GATEWAY_TIMEOUT | HttpStatus.GONE | HttpStatus.I_AM_A_TEAPOT | HttpStatus.INTERNAL_SERVER_ERROR | HttpStatus.METHOD_NOT_ALLOWED | HttpStatus.NOT_ACCEPTABLE | HttpStatus.NOT_FOUND | HttpStatus.NOT_IMPLEMENTED | HttpStatus.PAYLOAD_TOO_LARGE | HttpStatus.PRECONDITION_FAILED | HttpStatus.REQUEST_TIMEOUT | HttpStatus.SERVICE_UNAVAILABLE | HttpStatus.UNAUTHORIZED | HttpStatus.UNPROCESSABLE_ENTITY | HttpStatus.UNSUPPORTED_MEDIA_TYPE; -export declare const HttpErrorByCode: Record>; diff --git a/node_modules/@nestjs/common/utils/http-error-by-code.util.js b/node_modules/@nestjs/common/utils/http-error-by-code.util.js deleted file mode 100644 index ca52883..0000000 --- a/node_modules/@nestjs/common/utils/http-error-by-code.util.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.HttpErrorByCode = void 0; -const enums_1 = require("../enums"); -const exceptions_1 = require("../exceptions"); -exports.HttpErrorByCode = { - [enums_1.HttpStatus.BAD_GATEWAY]: exceptions_1.BadGatewayException, - [enums_1.HttpStatus.BAD_REQUEST]: exceptions_1.BadRequestException, - [enums_1.HttpStatus.CONFLICT]: exceptions_1.ConflictException, - [enums_1.HttpStatus.FORBIDDEN]: exceptions_1.ForbiddenException, - [enums_1.HttpStatus.GATEWAY_TIMEOUT]: exceptions_1.GatewayTimeoutException, - [enums_1.HttpStatus.GONE]: exceptions_1.GoneException, - [enums_1.HttpStatus.I_AM_A_TEAPOT]: exceptions_1.ImATeapotException, - [enums_1.HttpStatus.INTERNAL_SERVER_ERROR]: exceptions_1.InternalServerErrorException, - [enums_1.HttpStatus.METHOD_NOT_ALLOWED]: exceptions_1.MethodNotAllowedException, - [enums_1.HttpStatus.NOT_ACCEPTABLE]: exceptions_1.NotAcceptableException, - [enums_1.HttpStatus.NOT_FOUND]: exceptions_1.NotFoundException, - [enums_1.HttpStatus.NOT_IMPLEMENTED]: exceptions_1.NotImplementedException, - [enums_1.HttpStatus.PAYLOAD_TOO_LARGE]: exceptions_1.PayloadTooLargeException, - [enums_1.HttpStatus.PRECONDITION_FAILED]: exceptions_1.PreconditionFailedException, - [enums_1.HttpStatus.REQUEST_TIMEOUT]: exceptions_1.RequestTimeoutException, - [enums_1.HttpStatus.SERVICE_UNAVAILABLE]: exceptions_1.ServiceUnavailableException, - [enums_1.HttpStatus.UNAUTHORIZED]: exceptions_1.UnauthorizedException, - [enums_1.HttpStatus.UNPROCESSABLE_ENTITY]: exceptions_1.UnprocessableEntityException, - [enums_1.HttpStatus.UNSUPPORTED_MEDIA_TYPE]: exceptions_1.UnsupportedMediaTypeException, -}; diff --git a/node_modules/@nestjs/common/utils/index.d.ts b/node_modules/@nestjs/common/utils/index.d.ts deleted file mode 100644 index c871969..0000000 --- a/node_modules/@nestjs/common/utils/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './forward-ref.util'; diff --git a/node_modules/@nestjs/common/utils/index.js b/node_modules/@nestjs/common/utils/index.js deleted file mode 100644 index 33b61c6..0000000 --- a/node_modules/@nestjs/common/utils/index.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./forward-ref.util"), exports); diff --git a/node_modules/@nestjs/common/utils/load-package.util.d.ts b/node_modules/@nestjs/common/utils/load-package.util.d.ts deleted file mode 100644 index 5d0eb84..0000000 --- a/node_modules/@nestjs/common/utils/load-package.util.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function loadPackage(packageName: string, context: string, loaderFn?: Function): any; diff --git a/node_modules/@nestjs/common/utils/load-package.util.js b/node_modules/@nestjs/common/utils/load-package.util.js deleted file mode 100644 index 9d60598..0000000 --- a/node_modules/@nestjs/common/utils/load-package.util.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.loadPackage = loadPackage; -const logger_service_1 = require("../services/logger.service"); -const MISSING_REQUIRED_DEPENDENCY = (name, reason) => `The "${name}" package is missing. Please, make sure to install it to take advantage of ${reason}.`; -const logger = new logger_service_1.Logger('PackageLoader'); -function loadPackage(packageName, context, loaderFn) { - try { - return loaderFn ? loaderFn() : require(packageName); - } - catch (e) { - logger.error(MISSING_REQUIRED_DEPENDENCY(packageName, context)); - logger_service_1.Logger.flush(); - process.exit(1); - } -} diff --git a/node_modules/@nestjs/common/utils/merge-with-values.util.d.ts b/node_modules/@nestjs/common/utils/merge-with-values.util.d.ts deleted file mode 100644 index 3917872..0000000 --- a/node_modules/@nestjs/common/utils/merge-with-values.util.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export type Constructor = new (...args: any[]) => T; -export declare const MergeWithValues: >(data: { - [param: string]: any; -}) => (Metatype: T) => any; diff --git a/node_modules/@nestjs/common/utils/merge-with-values.util.js b/node_modules/@nestjs/common/utils/merge-with-values.util.js deleted file mode 100644 index 8dc3c79..0000000 --- a/node_modules/@nestjs/common/utils/merge-with-values.util.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MergeWithValues = void 0; -/* eslint-disable @typescript-eslint/no-empty-object-type */ -const MergeWithValues = (data) => { - return (Metatype) => { - const Type = class extends Metatype { - constructor(...args) { - super(...args); - } - }; - const token = Metatype.name + JSON.stringify(data); - Object.defineProperty(Type, 'name', { value: token }); - Object.assign(Type.prototype, data); - return Type; - }; -}; -exports.MergeWithValues = MergeWithValues; diff --git a/node_modules/@nestjs/common/utils/random-string-generator.util.d.ts b/node_modules/@nestjs/common/utils/random-string-generator.util.d.ts deleted file mode 100644 index e14a1ee..0000000 --- a/node_modules/@nestjs/common/utils/random-string-generator.util.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const randomStringGenerator: () => string; diff --git a/node_modules/@nestjs/common/utils/random-string-generator.util.js b/node_modules/@nestjs/common/utils/random-string-generator.util.js deleted file mode 100644 index eb0b022..0000000 --- a/node_modules/@nestjs/common/utils/random-string-generator.util.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.randomStringGenerator = void 0; -const uid_1 = require("uid"); -const randomStringGenerator = () => (0, uid_1.uid)(21); -exports.randomStringGenerator = randomStringGenerator; diff --git a/node_modules/@nestjs/common/utils/select-exception-filter-metadata.util.d.ts b/node_modules/@nestjs/common/utils/select-exception-filter-metadata.util.d.ts deleted file mode 100644 index 9bbe1e1..0000000 --- a/node_modules/@nestjs/common/utils/select-exception-filter-metadata.util.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { ExceptionFilterMetadata } from '../interfaces/exceptions'; -export declare const selectExceptionFilterMetadata: (filters: ExceptionFilterMetadata[], exception: T) => ExceptionFilterMetadata | undefined; diff --git a/node_modules/@nestjs/common/utils/select-exception-filter-metadata.util.js b/node_modules/@nestjs/common/utils/select-exception-filter-metadata.util.js deleted file mode 100644 index 28200e7..0000000 --- a/node_modules/@nestjs/common/utils/select-exception-filter-metadata.util.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.selectExceptionFilterMetadata = void 0; -const selectExceptionFilterMetadata = (filters, exception) => filters.find(({ exceptionMetatypes }) => !exceptionMetatypes.length || - exceptionMetatypes.some(ExceptionMetaType => exception instanceof ExceptionMetaType)); -exports.selectExceptionFilterMetadata = selectExceptionFilterMetadata; diff --git a/node_modules/@nestjs/common/utils/shared.utils.d.ts b/node_modules/@nestjs/common/utils/shared.utils.d.ts deleted file mode 100644 index 329ae4e..0000000 --- a/node_modules/@nestjs/common/utils/shared.utils.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export declare const isUndefined: (obj: any) => obj is undefined; -export declare const isObject: (fn: any) => fn is object; -export declare const isPlainObject: (fn: any) => fn is object; -export declare const addLeadingSlash: (path?: string) => string; -export declare const normalizePath: (path?: string) => string; -export declare const stripEndSlash: (path: string) => string; -export declare const isFunction: (val: any) => val is Function; -export declare const isString: (val: any) => val is string; -export declare const isNumber: (val: any) => val is number; -export declare const isConstructor: (val: any) => boolean; -export declare const isNil: (val: any) => val is null | undefined; -export declare const isEmpty: (array: any) => boolean; -export declare const isSymbol: (val: any) => val is symbol; diff --git a/node_modules/@nestjs/common/utils/shared.utils.js b/node_modules/@nestjs/common/utils/shared.utils.js deleted file mode 100644 index 2d0fe61..0000000 --- a/node_modules/@nestjs/common/utils/shared.utils.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isSymbol = exports.isEmpty = exports.isNil = exports.isConstructor = exports.isNumber = exports.isString = exports.isFunction = exports.stripEndSlash = exports.normalizePath = exports.addLeadingSlash = exports.isPlainObject = exports.isObject = exports.isUndefined = void 0; -const isUndefined = (obj) => typeof obj === 'undefined'; -exports.isUndefined = isUndefined; -const isObject = (fn) => !(0, exports.isNil)(fn) && typeof fn === 'object'; -exports.isObject = isObject; -const isPlainObject = (fn) => { - if (!(0, exports.isObject)(fn)) { - return false; - } - const proto = Object.getPrototypeOf(fn); - if (proto === null) { - return true; - } - const ctor = Object.prototype.hasOwnProperty.call(proto, 'constructor') && - proto.constructor; - return (typeof ctor === 'function' && - ctor instanceof ctor && - Function.prototype.toString.call(ctor) === - Function.prototype.toString.call(Object)); -}; -exports.isPlainObject = isPlainObject; -const addLeadingSlash = (path) => path && typeof path === 'string' - ? path.charAt(0) !== '/' && path.substring(0, 2) !== '{/' - ? '/' + path - : path - : ''; -exports.addLeadingSlash = addLeadingSlash; -const normalizePath = (path) => path - ? path.startsWith('/') - ? ('/' + path.replace(/\/+$/, '')).replace(/\/+/g, '/') - : '/' + path.replace(/\/+$/, '') - : '/'; -exports.normalizePath = normalizePath; -const stripEndSlash = (path) => path[path.length - 1] === '/' ? path.slice(0, path.length - 1) : path; -exports.stripEndSlash = stripEndSlash; -const isFunction = (val) => typeof val === 'function'; -exports.isFunction = isFunction; -const isString = (val) => typeof val === 'string'; -exports.isString = isString; -const isNumber = (val) => typeof val === 'number'; -exports.isNumber = isNumber; -const isConstructor = (val) => val === 'constructor'; -exports.isConstructor = isConstructor; -const isNil = (val) => (0, exports.isUndefined)(val) || val === null; -exports.isNil = isNil; -const isEmpty = (array) => !(array && array.length > 0); -exports.isEmpty = isEmpty; -const isSymbol = (val) => typeof val === 'symbol'; -exports.isSymbol = isSymbol; diff --git a/node_modules/@nestjs/common/utils/validate-each.util.d.ts b/node_modules/@nestjs/common/utils/validate-each.util.d.ts deleted file mode 100644 index e723991..0000000 --- a/node_modules/@nestjs/common/utils/validate-each.util.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export declare class InvalidDecoratorItemException extends Error { - private readonly msg; - constructor(decorator: string, item: string, context: string); - what(): string; -} -export declare function validateEach(context: { - name: string; -}, arr: any[], predicate: Function, decorator: string, item: string): boolean; diff --git a/node_modules/@nestjs/common/utils/validate-each.util.js b/node_modules/@nestjs/common/utils/validate-each.util.js deleted file mode 100644 index 8fb9c20..0000000 --- a/node_modules/@nestjs/common/utils/validate-each.util.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.InvalidDecoratorItemException = void 0; -exports.validateEach = validateEach; -class InvalidDecoratorItemException extends Error { - constructor(decorator, item, context) { - const message = `Invalid ${item} passed to ${decorator}() decorator (${context}).`; - super(message); - this.msg = message; - } - what() { - return this.msg; - } -} -exports.InvalidDecoratorItemException = InvalidDecoratorItemException; -function validateEach(context, arr, predicate, decorator, item) { - if (!context || !context.name) { - return true; - } - const errors = arr.some(str => !predicate(str)); - if (errors) { - throw new InvalidDecoratorItemException(decorator, item, context.name); - } - return true; -} diff --git a/node_modules/@nestjs/common/utils/validate-module-keys.util.d.ts b/node_modules/@nestjs/common/utils/validate-module-keys.util.d.ts deleted file mode 100644 index 356b4f1..0000000 --- a/node_modules/@nestjs/common/utils/validate-module-keys.util.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare const INVALID_MODULE_CONFIG_MESSAGE: (text: TemplateStringsArray, property: string) => string; -export declare function validateModuleKeys(keys: string[]): void; diff --git a/node_modules/@nestjs/common/utils/validate-module-keys.util.js b/node_modules/@nestjs/common/utils/validate-module-keys.util.js deleted file mode 100644 index be73a2f..0000000 --- a/node_modules/@nestjs/common/utils/validate-module-keys.util.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.INVALID_MODULE_CONFIG_MESSAGE = void 0; -exports.validateModuleKeys = validateModuleKeys; -const constants_1 = require("../constants"); -const INVALID_MODULE_CONFIG_MESSAGE = (text, property) => `Invalid property '${property}' passed into the @Module() decorator.`; -exports.INVALID_MODULE_CONFIG_MESSAGE = INVALID_MODULE_CONFIG_MESSAGE; -const metadataKeys = [ - constants_1.MODULE_METADATA.IMPORTS, - constants_1.MODULE_METADATA.EXPORTS, - constants_1.MODULE_METADATA.CONTROLLERS, - constants_1.MODULE_METADATA.PROVIDERS, -]; -function validateModuleKeys(keys) { - const validateKey = (key) => { - if (metadataKeys.includes(key)) { - return; - } - throw new Error((0, exports.INVALID_MODULE_CONFIG_MESSAGE) `${key}`); - }; - keys.forEach(validateKey); -} diff --git a/node_modules/@nestjs/core/LICENSE b/node_modules/@nestjs/core/LICENSE deleted file mode 100644 index d209764..0000000 --- a/node_modules/@nestjs/core/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2017-present Kamil Mysliwiec - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@nestjs/core/PACKAGE.md b/node_modules/@nestjs/core/PACKAGE.md deleted file mode 100644 index 8559cad..0000000 --- a/node_modules/@nestjs/core/PACKAGE.md +++ /dev/null @@ -1 +0,0 @@ -Implements Nest's core functionality, low-level services, and utilities. diff --git a/node_modules/@nestjs/core/Readme.md b/node_modules/@nestjs/core/Readme.md deleted file mode 100644 index 72d4b89..0000000 --- a/node_modules/@nestjs/core/Readme.md +++ /dev/null @@ -1,146 +0,0 @@ -

- Nest Logo -

- -[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456 -[circleci-url]: https://circleci.com/gh/nestjs/nest - -

A progressive Node.js framework for building efficient and scalable server-side applications.

-

-NPM Version -Package License -NPM Downloads -CircleCI -Discord -Backers on Open Collective -Sponsors on Open Collective - - Support us - -

- - -## Description - -Nest is a framework for building efficient, scalable Node.js server-side applications. It uses modern JavaScript, is built with TypeScript (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming). - -

Under the hood, Nest makes use of Express, but also provides compatibility with a wide range of other libraries, like Fastify, allowing for easy use of the myriad of third-party plugins which are available.

- -## Philosophy - -

In recent years, thanks to Node.js, JavaScript has become the “lingua franca” of the web for both front-end and back-end applications, giving rise to awesome projects like Angular, React, and Vue, which improve developer productivity and enable the construction of fast, testable, and extensible frontend applications. However, on the server-side, while there are a lot of superb libraries, helpers, and tools for Node, none of them effectively solve the main problem - the architecture.

-

Nest aims to provide an application architecture out of the box which allows for effortless creation of highly testable, scalable, and loosely coupled and easily maintainable applications. The architecture is heavily inspired by Angular.

- -## Getting started - -- To check out the [guide](https://docs.nestjs.com), visit [docs.nestjs.com](https://docs.nestjs.com). :books: -- 要查看中文 [指南](readme_zh.md), 请访问 [docs.nestjs.cn](https://docs.nestjs.cn). :books: -- [가이드](readme_kr.md) 문서는 [docs.nestjs.com](https://docs.nestjs.com)에서 확인하실 수 있습니다. :books: -- [ガイド](readme_jp.md)は [docs.nestjs.com](https://docs.nestjs.com)でご確認ください。 :books: - -## Questions - -For questions and support please use the official [Discord channel](https://discord.gg/G7Qnnhy). The issue list of this repo is **exclusively** for bug reports and feature requests. - -## Issues - -Please make sure to read the [Issue Reporting Checklist](https://github.com/nestjs/nest/blob/master/CONTRIBUTING.md#-submitting-an-issue) before opening an issue. Issues not conforming to the guidelines may be closed immediately. - -## Consulting - -With official support, you can get expert help straight from the Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://enterprise.nestjs.com). - -## Support - -Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support from the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support). - -#### Principal Sponsors - - - - - - - - - -
- -#### Gold Sponsors - - - - - - - - - - - - - -
- -#### Silver Sponsors - - - - - - - - - - - - -
- -#### Sponsors - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -## Backers - - - -## Stay in touch - -- Author - [Kamil Myśliwiec](https://x.com/kammysliwiec) -- Website - [https://nestjs.com](https://nestjs.com/) -- X - [@nestframework](https://x.com/nestframework) - -## License - -Nest is [MIT licensed](LICENSE). diff --git a/node_modules/@nestjs/core/adapters/http-adapter.d.ts b/node_modules/@nestjs/core/adapters/http-adapter.d.ts deleted file mode 100644 index 99ec8dc..0000000 --- a/node_modules/@nestjs/core/adapters/http-adapter.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { HttpServer, RequestMethod, VersioningOptions } from '@nestjs/common'; -import { RequestHandler, VersionValue } from '@nestjs/common/interfaces'; -import { NestApplicationOptions } from '@nestjs/common/interfaces/nest-application-options.interface'; -/** - * @publicApi - */ -export declare abstract class AbstractHttpAdapter implements HttpServer { - protected instance?: any | undefined; - protected httpServer: TServer; - protected onRouteTriggered: ((requestMethod: RequestMethod, path: string) => void) | undefined; - constructor(instance?: any | undefined); - init(): Promise; - use(...args: any[]): any; - get(handler: RequestHandler): any; - get(path: any, handler: RequestHandler): any; - post(handler: RequestHandler): any; - post(path: any, handler: RequestHandler): any; - head(handler: RequestHandler): any; - head(path: any, handler: RequestHandler): any; - delete(handler: RequestHandler): any; - delete(path: any, handler: RequestHandler): any; - put(handler: RequestHandler): any; - put(path: any, handler: RequestHandler): any; - patch(handler: RequestHandler): any; - patch(path: any, handler: RequestHandler): any; - propfind(handler: RequestHandler): any; - propfind(path: any, handler: RequestHandler): any; - proppatch(handler: RequestHandler): any; - proppatch(path: any, handler: RequestHandler): any; - mkcol(handler: RequestHandler): any; - mkcol(path: any, handler: RequestHandler): any; - copy(handler: RequestHandler): any; - copy(path: any, handler: RequestHandler): any; - move(handler: RequestHandler): any; - move(path: any, handler: RequestHandler): any; - lock(handler: RequestHandler): any; - lock(path: any, handler: RequestHandler): any; - unlock(handler: RequestHandler): any; - unlock(path: any, handler: RequestHandler): any; - all(handler: RequestHandler): any; - all(path: any, handler: RequestHandler): any; - search(handler: RequestHandler): any; - search(path: any, handler: RequestHandler): any; - options(handler: RequestHandler): any; - options(path: any, handler: RequestHandler): any; - listen(port: string | number, callback?: () => void): any; - listen(port: string | number, hostname: string, callback?: () => void): any; - getHttpServer(): TServer; - setHttpServer(httpServer: TServer): void; - setInstance(instance: T): void; - getInstance(): T; - normalizePath(path: string): string; - setOnRouteTriggered(onRouteTriggered: (requestMethod: RequestMethod, path: string) => void): void; - getOnRouteTriggered(): ((requestMethod: RequestMethod, path: string) => void) | undefined; - setOnRequestHook(onRequestHook: Function): void; - setOnResponseHook(onResponseHook: Function): void; - abstract close(): any; - abstract initHttpServer(options: NestApplicationOptions): any; - abstract useStaticAssets(...args: any[]): any; - abstract setViewEngine(engine: string): any; - abstract getRequestHostname(request: any): any; - abstract getRequestMethod(request: any): any; - abstract getRequestUrl(request: any): any; - abstract status(response: any, statusCode: number): any; - abstract reply(response: any, body: any, statusCode?: number): any; - abstract end(response: any, message?: string): any; - abstract render(response: any, view: string, options: any): any; - abstract redirect(response: any, statusCode: number, url: string): any; - abstract setErrorHandler(handler: Function, prefix?: string): any; - abstract setNotFoundHandler(handler: Function, prefix?: string): any; - abstract isHeadersSent(response: any): any; - abstract getHeader(response: any, name: string): any; - abstract setHeader(response: any, name: string, value: string): any; - abstract appendHeader(response: any, name: string, value: string): any; - abstract registerParserMiddleware(prefix?: string, rawBody?: boolean): any; - abstract enableCors(options?: any, prefix?: string): any; - abstract createMiddlewareFactory(requestMethod: RequestMethod): ((path: string, callback: Function) => any) | Promise<(path: string, callback: Function) => any>; - abstract getType(): string; - abstract applyVersionFilter(handler: Function, version: VersionValue, versioningOptions: VersioningOptions): (req: TRequest, res: TResponse, next: () => void) => Function; -} diff --git a/node_modules/@nestjs/core/adapters/http-adapter.js b/node_modules/@nestjs/core/adapters/http-adapter.js deleted file mode 100644 index c7a285a..0000000 --- a/node_modules/@nestjs/core/adapters/http-adapter.js +++ /dev/null @@ -1,90 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AbstractHttpAdapter = void 0; -/** - * @publicApi - */ -class AbstractHttpAdapter { - constructor(instance) { - this.instance = instance; - } - async init() { } - use(...args) { - return this.instance.use(...args); - } - get(...args) { - return this.instance.get(...args); - } - post(...args) { - return this.instance.post(...args); - } - head(...args) { - return this.instance.head(...args); - } - delete(...args) { - return this.instance.delete(...args); - } - put(...args) { - return this.instance.put(...args); - } - patch(...args) { - return this.instance.patch(...args); - } - propfind(...args) { - return this.instance.propfind(...args); - } - proppatch(...args) { - return this.instance.proppatch(...args); - } - mkcol(...args) { - return this.instance.mkcol(...args); - } - copy(...args) { - return this.instance.copy(...args); - } - move(...args) { - return this.instance.move(...args); - } - lock(...args) { - return this.instance.lock(...args); - } - unlock(...args) { - return this.instance.unlock(...args); - } - all(...args) { - return this.instance.all(...args); - } - search(...args) { - return this.instance.search(...args); - } - options(...args) { - return this.instance.options(...args); - } - listen(port, hostname, callback) { - return this.instance.listen(port, hostname, callback); - } - getHttpServer() { - return this.httpServer; - } - setHttpServer(httpServer) { - this.httpServer = httpServer; - } - setInstance(instance) { - this.instance = instance; - } - getInstance() { - return this.instance; - } - normalizePath(path) { - return path; - } - setOnRouteTriggered(onRouteTriggered) { - this.onRouteTriggered = onRouteTriggered; - } - getOnRouteTriggered() { - return this.onRouteTriggered; - } - setOnRequestHook(onRequestHook) { } - setOnResponseHook(onResponseHook) { } -} -exports.AbstractHttpAdapter = AbstractHttpAdapter; diff --git a/node_modules/@nestjs/core/adapters/index.d.ts b/node_modules/@nestjs/core/adapters/index.d.ts deleted file mode 100644 index 8063987..0000000 --- a/node_modules/@nestjs/core/adapters/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './http-adapter'; diff --git a/node_modules/@nestjs/core/adapters/index.js b/node_modules/@nestjs/core/adapters/index.js deleted file mode 100644 index 4ad3455..0000000 --- a/node_modules/@nestjs/core/adapters/index.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./http-adapter"), exports); diff --git a/node_modules/@nestjs/core/application-config.d.ts b/node_modules/@nestjs/core/application-config.d.ts deleted file mode 100644 index 40b0e02..0000000 --- a/node_modules/@nestjs/core/application-config.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { CanActivate, ExceptionFilter, NestInterceptor, PipeTransform, VersioningOptions, WebSocketAdapter } from '@nestjs/common'; -import { GlobalPrefixOptions } from '@nestjs/common/interfaces'; -import { InstanceWrapper } from './injector/instance-wrapper'; -import { ExcludeRouteMetadata } from './router/interfaces/exclude-route-metadata.interface'; -export declare class ApplicationConfig { - private ioAdapter; - private globalPrefix; - private globalPrefixOptions; - private globalPipes; - private globalFilters; - private globalInterceptors; - private globalGuards; - private versioningOptions; - private readonly globalRequestPipes; - private readonly globalRequestFilters; - private readonly globalRequestInterceptors; - private readonly globalRequestGuards; - constructor(ioAdapter?: WebSocketAdapter | null); - setGlobalPrefix(prefix: string): void; - getGlobalPrefix(): string; - setGlobalPrefixOptions(options: GlobalPrefixOptions): void; - getGlobalPrefixOptions(): GlobalPrefixOptions; - setIoAdapter(ioAdapter: WebSocketAdapter): void; - getIoAdapter(): WebSocketAdapter; - addGlobalPipe(pipe: PipeTransform): void; - useGlobalPipes(...pipes: PipeTransform[]): void; - getGlobalFilters(): ExceptionFilter[]; - addGlobalFilter(filter: ExceptionFilter): void; - useGlobalFilters(...filters: ExceptionFilter[]): void; - getGlobalPipes(): PipeTransform[]; - getGlobalInterceptors(): NestInterceptor[]; - addGlobalInterceptor(interceptor: NestInterceptor): void; - useGlobalInterceptors(...interceptors: NestInterceptor[]): void; - getGlobalGuards(): CanActivate[]; - addGlobalGuard(guard: CanActivate): void; - useGlobalGuards(...guards: CanActivate[]): void; - addGlobalRequestInterceptor(wrapper: InstanceWrapper): void; - getGlobalRequestInterceptors(): InstanceWrapper[]; - addGlobalRequestPipe(wrapper: InstanceWrapper): void; - getGlobalRequestPipes(): InstanceWrapper[]; - addGlobalRequestFilter(wrapper: InstanceWrapper): void; - getGlobalRequestFilters(): InstanceWrapper[]; - addGlobalRequestGuard(wrapper: InstanceWrapper): void; - getGlobalRequestGuards(): InstanceWrapper[]; - enableVersioning(options: VersioningOptions): void; - getVersioning(): VersioningOptions | undefined; -} diff --git a/node_modules/@nestjs/core/application-config.js b/node_modules/@nestjs/core/application-config.js deleted file mode 100644 index 4fd27ed..0000000 --- a/node_modules/@nestjs/core/application-config.js +++ /dev/null @@ -1,107 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ApplicationConfig = void 0; -class ApplicationConfig { - constructor(ioAdapter = null) { - this.ioAdapter = ioAdapter; - this.globalPrefix = ''; - this.globalPrefixOptions = {}; - this.globalPipes = []; - this.globalFilters = []; - this.globalInterceptors = []; - this.globalGuards = []; - this.globalRequestPipes = []; - this.globalRequestFilters = []; - this.globalRequestInterceptors = []; - this.globalRequestGuards = []; - } - setGlobalPrefix(prefix) { - this.globalPrefix = prefix; - } - getGlobalPrefix() { - return this.globalPrefix; - } - setGlobalPrefixOptions(options) { - this.globalPrefixOptions = options; - } - getGlobalPrefixOptions() { - return this.globalPrefixOptions; - } - setIoAdapter(ioAdapter) { - this.ioAdapter = ioAdapter; - } - getIoAdapter() { - return this.ioAdapter; - } - addGlobalPipe(pipe) { - this.globalPipes.push(pipe); - } - useGlobalPipes(...pipes) { - this.globalPipes = this.globalPipes.concat(pipes); - } - getGlobalFilters() { - return this.globalFilters; - } - addGlobalFilter(filter) { - this.globalFilters.push(filter); - } - useGlobalFilters(...filters) { - this.globalFilters = this.globalFilters.concat(filters); - } - getGlobalPipes() { - return this.globalPipes; - } - getGlobalInterceptors() { - return this.globalInterceptors; - } - addGlobalInterceptor(interceptor) { - this.globalInterceptors.push(interceptor); - } - useGlobalInterceptors(...interceptors) { - this.globalInterceptors = this.globalInterceptors.concat(interceptors); - } - getGlobalGuards() { - return this.globalGuards; - } - addGlobalGuard(guard) { - this.globalGuards.push(guard); - } - useGlobalGuards(...guards) { - this.globalGuards = this.globalGuards.concat(guards); - } - addGlobalRequestInterceptor(wrapper) { - this.globalRequestInterceptors.push(wrapper); - } - getGlobalRequestInterceptors() { - return this.globalRequestInterceptors; - } - addGlobalRequestPipe(wrapper) { - this.globalRequestPipes.push(wrapper); - } - getGlobalRequestPipes() { - return this.globalRequestPipes; - } - addGlobalRequestFilter(wrapper) { - this.globalRequestFilters.push(wrapper); - } - getGlobalRequestFilters() { - return this.globalRequestFilters; - } - addGlobalRequestGuard(wrapper) { - this.globalRequestGuards.push(wrapper); - } - getGlobalRequestGuards() { - return this.globalRequestGuards; - } - enableVersioning(options) { - if (Array.isArray(options.defaultVersion)) { - // Drop duplicated versions - options.defaultVersion = Array.from(new Set(options.defaultVersion)); - } - this.versioningOptions = options; - } - getVersioning() { - return this.versioningOptions; - } -} -exports.ApplicationConfig = ApplicationConfig; diff --git a/node_modules/@nestjs/core/constants.d.ts b/node_modules/@nestjs/core/constants.d.ts deleted file mode 100644 index 5eca221..0000000 --- a/node_modules/@nestjs/core/constants.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { EnhancerSubtype } from '@nestjs/common/constants'; -export declare const MESSAGES: { - APPLICATION_START: string; - APPLICATION_READY: string; - MICROSERVICE_READY: string; - UNKNOWN_EXCEPTION_MESSAGE: string; - ERROR_DURING_SHUTDOWN: string; - CALL_LISTEN_FIRST: string; -}; -export declare const APP_INTERCEPTOR = "APP_INTERCEPTOR"; -export declare const APP_PIPE = "APP_PIPE"; -export declare const APP_GUARD = "APP_GUARD"; -export declare const APP_FILTER = "APP_FILTER"; -export declare const ENHANCER_TOKEN_TO_SUBTYPE_MAP: Record; diff --git a/node_modules/@nestjs/core/constants.js b/node_modules/@nestjs/core/constants.js deleted file mode 100644 index 1ad27d7..0000000 --- a/node_modules/@nestjs/core/constants.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ENHANCER_TOKEN_TO_SUBTYPE_MAP = exports.APP_FILTER = exports.APP_GUARD = exports.APP_PIPE = exports.APP_INTERCEPTOR = exports.MESSAGES = void 0; -exports.MESSAGES = { - APPLICATION_START: `Starting Nest application...`, - APPLICATION_READY: `Nest application successfully started`, - MICROSERVICE_READY: `Nest microservice successfully started`, - UNKNOWN_EXCEPTION_MESSAGE: 'Internal server error', - ERROR_DURING_SHUTDOWN: 'Error happened during shutdown', - CALL_LISTEN_FIRST: 'app.listen() needs to be called before calling app.getUrl()', -}; -exports.APP_INTERCEPTOR = 'APP_INTERCEPTOR'; -exports.APP_PIPE = 'APP_PIPE'; -exports.APP_GUARD = 'APP_GUARD'; -exports.APP_FILTER = 'APP_FILTER'; -exports.ENHANCER_TOKEN_TO_SUBTYPE_MAP = { - [exports.APP_GUARD]: 'guard', - [exports.APP_INTERCEPTOR]: 'interceptor', - [exports.APP_PIPE]: 'pipe', - [exports.APP_FILTER]: 'filter', -}; diff --git a/node_modules/@nestjs/core/discovery/discoverable-meta-host-collection.d.ts b/node_modules/@nestjs/core/discovery/discoverable-meta-host-collection.d.ts deleted file mode 100644 index d49b836..0000000 --- a/node_modules/@nestjs/core/discovery/discoverable-meta-host-collection.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Type } from '@nestjs/common'; -import { InstanceWrapper } from '../injector/instance-wrapper'; -import { ModulesContainer } from '../injector/modules-container'; -export declare class DiscoverableMetaHostCollection { - /** - * A map of class references to metadata keys. - */ - static readonly metaHostLinks: Map, string>; - /** - * A map of metadata keys to instance wrappers (providers) with the corresponding metadata key. - * The map is weakly referenced by the modules container (unique per application). - */ - private static readonly providersByMetaKey; - /** - * A map of metadata keys to instance wrappers (controllers) with the corresponding metadata key. - * The map is weakly referenced by the modules container (unique per application). - */ - private static readonly controllersByMetaKey; - /** - * Adds a link between a class reference and a metadata key. - * @param target The class reference. - * @param metadataKey The metadata key. - */ - static addClassMetaHostLink(target: Type | Function, metadataKey: string): void; - /** - * Inspects a provider instance wrapper and adds it to the collection of providers - * if it has a metadata key. - * @param hostContainerRef A reference to the modules container. - * @param instanceWrapper A provider instance wrapper. - * @returns void - */ - static inspectProvider(hostContainerRef: ModulesContainer, instanceWrapper: InstanceWrapper): void; - /** - * Inspects a controller instance wrapper and adds it to the collection of controllers - * if it has a metadata key. - * @param hostContainerRef A reference to the modules container. - * @param instanceWrapper A controller's instance wrapper. - * @returns void - */ - static inspectController(hostContainerRef: ModulesContainer, instanceWrapper: InstanceWrapper): void; - static insertByMetaKey(metaKey: string, instanceWrapper: InstanceWrapper, collection: Map>): void; - static getProvidersByMetaKey(hostContainerRef: ModulesContainer, metaKey: string): Set; - static getControllersByMetaKey(hostContainerRef: ModulesContainer, metaKey: string): Set; - private static inspectInstanceWrapper; - private static getMetaKeyByInstanceWrapper; -} diff --git a/node_modules/@nestjs/core/discovery/discoverable-meta-host-collection.js b/node_modules/@nestjs/core/discovery/discoverable-meta-host-collection.js deleted file mode 100644 index 6590a6b..0000000 --- a/node_modules/@nestjs/core/discovery/discoverable-meta-host-collection.js +++ /dev/null @@ -1,98 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DiscoverableMetaHostCollection = void 0; -class DiscoverableMetaHostCollection { - /** - * Adds a link between a class reference and a metadata key. - * @param target The class reference. - * @param metadataKey The metadata key. - */ - static addClassMetaHostLink(target, metadataKey) { - this.metaHostLinks.set(target, metadataKey); - } - /** - * Inspects a provider instance wrapper and adds it to the collection of providers - * if it has a metadata key. - * @param hostContainerRef A reference to the modules container. - * @param instanceWrapper A provider instance wrapper. - * @returns void - */ - static inspectProvider(hostContainerRef, instanceWrapper) { - return this.inspectInstanceWrapper(hostContainerRef, instanceWrapper, this.providersByMetaKey); - } - /** - * Inspects a controller instance wrapper and adds it to the collection of controllers - * if it has a metadata key. - * @param hostContainerRef A reference to the modules container. - * @param instanceWrapper A controller's instance wrapper. - * @returns void - */ - static inspectController(hostContainerRef, instanceWrapper) { - return this.inspectInstanceWrapper(hostContainerRef, instanceWrapper, this.controllersByMetaKey); - } - static insertByMetaKey(metaKey, instanceWrapper, collection) { - if (collection.has(metaKey)) { - const wrappers = collection.get(metaKey); - wrappers.add(instanceWrapper); - } - else { - const wrappers = new Set(); - wrappers.add(instanceWrapper); - collection.set(metaKey, wrappers); - } - } - static getProvidersByMetaKey(hostContainerRef, metaKey) { - const wrappersByMetaKey = this.providersByMetaKey.get(hostContainerRef); - return wrappersByMetaKey?.get(metaKey) ?? new Set(); - } - static getControllersByMetaKey(hostContainerRef, metaKey) { - const wrappersByMetaKey = this.controllersByMetaKey.get(hostContainerRef); - return wrappersByMetaKey?.get(metaKey) ?? new Set(); - } - static inspectInstanceWrapper(hostContainerRef, instanceWrapper, wrapperByMetaKeyMap) { - const metaKey = DiscoverableMetaHostCollection.getMetaKeyByInstanceWrapper(instanceWrapper); - if (!metaKey) { - return; - } - let collection; - if (wrapperByMetaKeyMap.has(hostContainerRef)) { - collection = wrapperByMetaKeyMap.get(hostContainerRef); - } - else { - collection = new Map(); - wrapperByMetaKeyMap.set(hostContainerRef, collection); - } - this.insertByMetaKey(metaKey, instanceWrapper, collection); - } - static getMetaKeyByInstanceWrapper(instanceWrapper) { - return this.metaHostLinks.get( - // NOTE: Regarding the ternary statement below, - // - The condition `!wrapper.metatype` is needed because when we use `useValue` - // the value of `wrapper.metatype` will be `null`. - // - The condition `wrapper.inject` is needed here because when we use - // `useFactory`, the value of `wrapper.metatype` will be the supplied - // factory function. - // For both cases, we should use `wrapper.instance.constructor` instead - // of `wrapper.metatype` to resolve processor's class properly. - // But since calling `wrapper.instance` could degrade overall performance - // we must defer it as much we can. - instanceWrapper.metatype || instanceWrapper.inject - ? (instanceWrapper.instance?.constructor ?? instanceWrapper.metatype) - : instanceWrapper.metatype); - } -} -exports.DiscoverableMetaHostCollection = DiscoverableMetaHostCollection; -/** - * A map of class references to metadata keys. - */ -DiscoverableMetaHostCollection.metaHostLinks = new Map(); -/** - * A map of metadata keys to instance wrappers (providers) with the corresponding metadata key. - * The map is weakly referenced by the modules container (unique per application). - */ -DiscoverableMetaHostCollection.providersByMetaKey = new WeakMap(); -/** - * A map of metadata keys to instance wrappers (controllers) with the corresponding metadata key. - * The map is weakly referenced by the modules container (unique per application). - */ -DiscoverableMetaHostCollection.controllersByMetaKey = new WeakMap(); diff --git a/node_modules/@nestjs/core/discovery/discovery-module.d.ts b/node_modules/@nestjs/core/discovery/discovery-module.d.ts deleted file mode 100644 index b9d530b..0000000 --- a/node_modules/@nestjs/core/discovery/discovery-module.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * @publicApi - */ -export declare class DiscoveryModule { -} diff --git a/node_modules/@nestjs/core/discovery/discovery-module.js b/node_modules/@nestjs/core/discovery/discovery-module.js deleted file mode 100644 index d853494..0000000 --- a/node_modules/@nestjs/core/discovery/discovery-module.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DiscoveryModule = void 0; -const tslib_1 = require("tslib"); -const common_1 = require("@nestjs/common"); -const metadata_scanner_1 = require("../metadata-scanner"); -const discovery_service_1 = require("./discovery-service"); -/** - * @publicApi - */ -let DiscoveryModule = class DiscoveryModule { -}; -exports.DiscoveryModule = DiscoveryModule; -exports.DiscoveryModule = DiscoveryModule = tslib_1.__decorate([ - (0, common_1.Module)({ - providers: [metadata_scanner_1.MetadataScanner, discovery_service_1.DiscoveryService], - exports: [metadata_scanner_1.MetadataScanner, discovery_service_1.DiscoveryService], - }) -], DiscoveryModule); diff --git a/node_modules/@nestjs/core/discovery/discovery-service.d.ts b/node_modules/@nestjs/core/discovery/discovery-service.d.ts deleted file mode 100644 index 3b07e67..0000000 --- a/node_modules/@nestjs/core/discovery/discovery-service.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { CustomDecorator } from '@nestjs/common'; -import { InstanceWrapper } from '../injector/instance-wrapper'; -import { Module } from '../injector/module'; -import { ModulesContainer } from '../injector/modules-container'; -/** - * @publicApi - */ -export interface FilterByInclude { - /** - * List of modules to include (whitelist) into the discovery process. - */ - include?: Function[]; -} -/** - * @publicApi - */ -export interface FilterByMetadataKey { - /** - * A key to filter controllers and providers by. - * Only instance wrappers with the specified metadata key will be returned. - */ - metadataKey?: string; -} -/** - * @publicApi - */ -export type DiscoveryOptions = FilterByInclude | FilterByMetadataKey; -/** - * @publicApi - */ -export type DiscoverableDecorator = ((opts?: T) => CustomDecorator) & { - KEY: string; -}; -/** - * @publicApi - */ -export declare class DiscoveryService { - private readonly modulesContainer; - constructor(modulesContainer: ModulesContainer); - /** - * Creates a decorator that can be used to decorate classes and methods with metadata. - * The decorator will also add the class to the collection of discoverable classes (by metadata key). - * Decorated classes can be discovered using the `getProviders` and `getControllers` methods. - * @returns A decorator function. - */ - static createDecorator(): DiscoverableDecorator; - /** - * Returns an array of instance wrappers (providers). - * Depending on the options, the array will contain either all providers or only providers with the specified metadata key. - * @param options Discovery options. - * @param modules A list of modules to filter by. - * @returns An array of instance wrappers (providers). - */ - getProviders(options?: DiscoveryOptions, modules?: Module[]): InstanceWrapper[]; - /** - * Returns an array of instance wrappers (controllers). - * Depending on the options, the array will contain either all controllers or only controllers with the specified metadata key. - * @param options Discovery options. - * @param modules A list of modules to filter by. - * @returns An array of instance wrappers (controllers). - */ - getControllers(options?: DiscoveryOptions, modules?: Module[]): InstanceWrapper[]; - /** - * Retrieves metadata from the specified instance wrapper. - * @param decorator The decorator to retrieve metadata of. - * @param instanceWrapper Reference to the instance wrapper. - * @param methodKey An optional method key to retrieve metadata from. - * @returns Discovered metadata. - */ - getMetadataByDecorator>(decorator: T, instanceWrapper: InstanceWrapper, methodKey?: string): T extends DiscoverableDecorator ? R | undefined : T | undefined; - /** - * Returns a list of modules to be used for discovery. - */ - protected getModules(options?: DiscoveryOptions): Module[]; - private includeWhitelisted; -} diff --git a/node_modules/@nestjs/core/discovery/discovery-service.js b/node_modules/@nestjs/core/discovery/discovery-service.js deleted file mode 100644 index 93716ab..0000000 --- a/node_modules/@nestjs/core/discovery/discovery-service.js +++ /dev/null @@ -1,98 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DiscoveryService = void 0; -const tslib_1 = require("tslib"); -const common_1 = require("@nestjs/common"); -const uid_1 = require("uid"); -const modules_container_1 = require("../injector/modules-container"); -const discoverable_meta_host_collection_1 = require("./discoverable-meta-host-collection"); -/** - * @publicApi - */ -let DiscoveryService = class DiscoveryService { - constructor(modulesContainer) { - this.modulesContainer = modulesContainer; - } - /** - * Creates a decorator that can be used to decorate classes and methods with metadata. - * The decorator will also add the class to the collection of discoverable classes (by metadata key). - * Decorated classes can be discovered using the `getProviders` and `getControllers` methods. - * @returns A decorator function. - */ - static createDecorator() { - const metadataKey = (0, uid_1.uid)(21); - const decoratorFn = (opts) => (target, key, descriptor) => { - if (!descriptor) { - discoverable_meta_host_collection_1.DiscoverableMetaHostCollection.addClassMetaHostLink(target, metadataKey); - } - (0, common_1.SetMetadata)(metadataKey, opts ?? {})(target, key, descriptor); - }; - decoratorFn.KEY = metadataKey; - return decoratorFn; - } - /** - * Returns an array of instance wrappers (providers). - * Depending on the options, the array will contain either all providers or only providers with the specified metadata key. - * @param options Discovery options. - * @param modules A list of modules to filter by. - * @returns An array of instance wrappers (providers). - */ - getProviders(options = {}, modules = this.getModules(options)) { - if ('metadataKey' in options) { - const providers = discoverable_meta_host_collection_1.DiscoverableMetaHostCollection.getProvidersByMetaKey(this.modulesContainer, options.metadataKey); - return Array.from(providers); - } - const providers = modules.map(item => [...item.providers.values()]); - return (0, common_1.flatten)(providers); - } - /** - * Returns an array of instance wrappers (controllers). - * Depending on the options, the array will contain either all controllers or only controllers with the specified metadata key. - * @param options Discovery options. - * @param modules A list of modules to filter by. - * @returns An array of instance wrappers (controllers). - */ - getControllers(options = {}, modules = this.getModules(options)) { - if ('metadataKey' in options) { - const controllers = discoverable_meta_host_collection_1.DiscoverableMetaHostCollection.getControllersByMetaKey(this.modulesContainer, options.metadataKey); - return Array.from(controllers); - } - const controllers = modules.map(item => [...item.controllers.values()]); - return (0, common_1.flatten)(controllers); - } - /** - * Retrieves metadata from the specified instance wrapper. - * @param decorator The decorator to retrieve metadata of. - * @param instanceWrapper Reference to the instance wrapper. - * @param methodKey An optional method key to retrieve metadata from. - * @returns Discovered metadata. - */ - getMetadataByDecorator(decorator, instanceWrapper, methodKey) { - if (methodKey) { - return Reflect.getMetadata(decorator.KEY, instanceWrapper.instance[methodKey]); - } - const clsRef = instanceWrapper.instance?.constructor ?? instanceWrapper.metatype; - return Reflect.getMetadata(decorator.KEY, clsRef); - } - /** - * Returns a list of modules to be used for discovery. - */ - getModules(options = {}) { - const includeInOpts = 'include' in options; - if (!includeInOpts) { - const moduleRefs = [...this.modulesContainer.values()]; - return moduleRefs; - } - const whitelisted = this.includeWhitelisted(options.include); - return whitelisted; - } - includeWhitelisted(include) { - const moduleRefs = [...this.modulesContainer.values()]; - return moduleRefs.filter(({ metatype }) => include.some(item => item === metatype)); - } -}; -exports.DiscoveryService = DiscoveryService; -exports.DiscoveryService = DiscoveryService = tslib_1.__decorate([ - (0, common_1.Injectable)(), - tslib_1.__metadata("design:paramtypes", [modules_container_1.ModulesContainer]) -], DiscoveryService); diff --git a/node_modules/@nestjs/core/discovery/index.d.ts b/node_modules/@nestjs/core/discovery/index.d.ts deleted file mode 100644 index 0e4a750..0000000 --- a/node_modules/@nestjs/core/discovery/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './discovery-module'; -export * from './discovery-service'; diff --git a/node_modules/@nestjs/core/discovery/index.js b/node_modules/@nestjs/core/discovery/index.js deleted file mode 100644 index 0750bd5..0000000 --- a/node_modules/@nestjs/core/discovery/index.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./discovery-module"), exports); -tslib_1.__exportStar(require("./discovery-service"), exports); diff --git a/node_modules/@nestjs/core/errors/exception-handler.d.ts b/node_modules/@nestjs/core/errors/exception-handler.d.ts deleted file mode 100644 index 9c0cf92..0000000 --- a/node_modules/@nestjs/core/errors/exception-handler.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare class ExceptionHandler { - private static readonly logger; - handle(exception: Error): void; -} diff --git a/node_modules/@nestjs/core/errors/exception-handler.js b/node_modules/@nestjs/core/errors/exception-handler.js deleted file mode 100644 index 646a142..0000000 --- a/node_modules/@nestjs/core/errors/exception-handler.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ExceptionHandler = void 0; -const logger_service_1 = require("@nestjs/common/services/logger.service"); -class ExceptionHandler { - handle(exception) { - ExceptionHandler.logger.error(exception); - } -} -exports.ExceptionHandler = ExceptionHandler; -ExceptionHandler.logger = new logger_service_1.Logger(ExceptionHandler.name); diff --git a/node_modules/@nestjs/core/errors/exceptions-zone.d.ts b/node_modules/@nestjs/core/errors/exceptions-zone.d.ts deleted file mode 100644 index 621b773..0000000 --- a/node_modules/@nestjs/core/errors/exceptions-zone.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare class ExceptionsZone { - private static readonly exceptionHandler; - static run(callback: () => void, teardown: ((err: any) => void) | undefined, autoFlushLogs: boolean): void; - static asyncRun(callback: () => Promise, teardown: ((err: any) => void) | undefined, autoFlushLogs: boolean): Promise; -} diff --git a/node_modules/@nestjs/core/errors/exceptions-zone.js b/node_modules/@nestjs/core/errors/exceptions-zone.js deleted file mode 100644 index 4f37089..0000000 --- a/node_modules/@nestjs/core/errors/exceptions-zone.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ExceptionsZone = void 0; -const common_1 = require("@nestjs/common"); -const exception_handler_1 = require("./exception-handler"); -const DEFAULT_TEARDOWN = () => process.exit(1); -class ExceptionsZone { - static run(callback, teardown = DEFAULT_TEARDOWN, autoFlushLogs) { - try { - callback(); - } - catch (e) { - this.exceptionHandler.handle(e); - if (autoFlushLogs) { - common_1.Logger.flush(); - } - teardown(e); - } - } - static async asyncRun(callback, teardown = DEFAULT_TEARDOWN, autoFlushLogs) { - try { - await callback(); - } - catch (e) { - this.exceptionHandler.handle(e); - if (autoFlushLogs) { - common_1.Logger.flush(); - } - teardown(e); - } - } -} -exports.ExceptionsZone = ExceptionsZone; -ExceptionsZone.exceptionHandler = new exception_handler_1.ExceptionHandler(); diff --git a/node_modules/@nestjs/core/errors/exceptions/circular-dependency.exception.d.ts b/node_modules/@nestjs/core/errors/exceptions/circular-dependency.exception.d.ts deleted file mode 100644 index 947b717..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/circular-dependency.exception.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { RuntimeException } from './runtime.exception'; -export declare class CircularDependencyException extends RuntimeException { - constructor(context?: string); -} diff --git a/node_modules/@nestjs/core/errors/exceptions/circular-dependency.exception.js b/node_modules/@nestjs/core/errors/exceptions/circular-dependency.exception.js deleted file mode 100644 index 5f99ca8..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/circular-dependency.exception.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CircularDependencyException = void 0; -const runtime_exception_1 = require("./runtime.exception"); -class CircularDependencyException extends runtime_exception_1.RuntimeException { - constructor(context) { - const ctx = context ? ` inside ${context}` : ``; - super(`A circular dependency has been detected${ctx}. Please, make sure that each side of a bidirectional relationships are decorated with "forwardRef()". Note that circular relationships between custom providers (e.g., factories) are not supported since functions cannot be called more than once.`); - } -} -exports.CircularDependencyException = CircularDependencyException; diff --git a/node_modules/@nestjs/core/errors/exceptions/index.d.ts b/node_modules/@nestjs/core/errors/exceptions/index.d.ts deleted file mode 100644 index 530968b..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export * from './circular-dependency.exception'; -export * from './runtime.exception'; -export * from './unknown-element.exception'; -export * from './invalid-class-scope.exception'; -export * from './invalid-class.exception'; -export * from './unknown-export.exception'; -export * from './unknown-module.exception'; -export * from './undefined-forwardref.exception'; diff --git a/node_modules/@nestjs/core/errors/exceptions/index.js b/node_modules/@nestjs/core/errors/exceptions/index.js deleted file mode 100644 index 0e629a2..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/index.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./circular-dependency.exception"), exports); -tslib_1.__exportStar(require("./runtime.exception"), exports); -tslib_1.__exportStar(require("./unknown-element.exception"), exports); -tslib_1.__exportStar(require("./invalid-class-scope.exception"), exports); -tslib_1.__exportStar(require("./invalid-class.exception"), exports); -tslib_1.__exportStar(require("./unknown-export.exception"), exports); -tslib_1.__exportStar(require("./unknown-module.exception"), exports); -tslib_1.__exportStar(require("./undefined-forwardref.exception"), exports); diff --git a/node_modules/@nestjs/core/errors/exceptions/invalid-class-module.exception.d.ts b/node_modules/@nestjs/core/errors/exceptions/invalid-class-module.exception.d.ts deleted file mode 100644 index c180f71..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/invalid-class-module.exception.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { RuntimeException } from './runtime.exception'; -export declare class InvalidClassModuleException extends RuntimeException { - constructor(metatypeUsedAsAModule: any, scope: any[]); -} diff --git a/node_modules/@nestjs/core/errors/exceptions/invalid-class-module.exception.js b/node_modules/@nestjs/core/errors/exceptions/invalid-class-module.exception.js deleted file mode 100644 index 88848c6..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/invalid-class-module.exception.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.InvalidClassModuleException = void 0; -const messages_1 = require("../messages"); -const runtime_exception_1 = require("./runtime.exception"); -class InvalidClassModuleException extends runtime_exception_1.RuntimeException { - constructor(metatypeUsedAsAModule, scope) { - super((0, messages_1.USING_INVALID_CLASS_AS_A_MODULE_MESSAGE)(metatypeUsedAsAModule, scope)); - } -} -exports.InvalidClassModuleException = InvalidClassModuleException; diff --git a/node_modules/@nestjs/core/errors/exceptions/invalid-class-scope.exception.d.ts b/node_modules/@nestjs/core/errors/exceptions/invalid-class-scope.exception.d.ts deleted file mode 100644 index 09a1b0e..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/invalid-class-scope.exception.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Abstract, Type } from '@nestjs/common/interfaces'; -import { RuntimeException } from './runtime.exception'; -export declare class InvalidClassScopeException extends RuntimeException { - constructor(metatypeOrToken: Type | Abstract | string | symbol); -} diff --git a/node_modules/@nestjs/core/errors/exceptions/invalid-class-scope.exception.js b/node_modules/@nestjs/core/errors/exceptions/invalid-class-scope.exception.js deleted file mode 100644 index 6d2227e..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/invalid-class-scope.exception.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.InvalidClassScopeException = void 0; -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const messages_1 = require("../messages"); -const runtime_exception_1 = require("./runtime.exception"); -class InvalidClassScopeException extends runtime_exception_1.RuntimeException { - constructor(metatypeOrToken) { - let name = (0, shared_utils_1.isFunction)(metatypeOrToken) - ? metatypeOrToken.name - : metatypeOrToken; - name = name && name.toString(); - super((0, messages_1.INVALID_CLASS_SCOPE_MESSAGE) `${name}`); - } -} -exports.InvalidClassScopeException = InvalidClassScopeException; diff --git a/node_modules/@nestjs/core/errors/exceptions/invalid-class.exception.d.ts b/node_modules/@nestjs/core/errors/exceptions/invalid-class.exception.d.ts deleted file mode 100644 index ce9498c..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/invalid-class.exception.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { RuntimeException } from './runtime.exception'; -export declare class InvalidClassException extends RuntimeException { - constructor(value: any); -} diff --git a/node_modules/@nestjs/core/errors/exceptions/invalid-class.exception.js b/node_modules/@nestjs/core/errors/exceptions/invalid-class.exception.js deleted file mode 100644 index 529407c..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/invalid-class.exception.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.InvalidClassException = void 0; -const messages_1 = require("../messages"); -const runtime_exception_1 = require("./runtime.exception"); -class InvalidClassException extends runtime_exception_1.RuntimeException { - constructor(value) { - super((0, messages_1.INVALID_CLASS_MESSAGE) `${value}`); - } -} -exports.InvalidClassException = InvalidClassException; diff --git a/node_modules/@nestjs/core/errors/exceptions/invalid-exception-filter.exception.d.ts b/node_modules/@nestjs/core/errors/exceptions/invalid-exception-filter.exception.d.ts deleted file mode 100644 index a2ed936..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/invalid-exception-filter.exception.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { RuntimeException } from './runtime.exception'; -export declare class InvalidExceptionFilterException extends RuntimeException { - constructor(); -} diff --git a/node_modules/@nestjs/core/errors/exceptions/invalid-exception-filter.exception.js b/node_modules/@nestjs/core/errors/exceptions/invalid-exception-filter.exception.js deleted file mode 100644 index 9e2439e..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/invalid-exception-filter.exception.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.InvalidExceptionFilterException = void 0; -const runtime_exception_1 = require("./runtime.exception"); -const messages_1 = require("../messages"); -class InvalidExceptionFilterException extends runtime_exception_1.RuntimeException { - constructor() { - super(messages_1.INVALID_EXCEPTION_FILTER); - } -} -exports.InvalidExceptionFilterException = InvalidExceptionFilterException; diff --git a/node_modules/@nestjs/core/errors/exceptions/invalid-middleware-configuration.exception.d.ts b/node_modules/@nestjs/core/errors/exceptions/invalid-middleware-configuration.exception.d.ts deleted file mode 100644 index a4bbaaa..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/invalid-middleware-configuration.exception.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { RuntimeException } from './runtime.exception'; -export declare class InvalidMiddlewareConfigurationException extends RuntimeException { - constructor(); -} diff --git a/node_modules/@nestjs/core/errors/exceptions/invalid-middleware-configuration.exception.js b/node_modules/@nestjs/core/errors/exceptions/invalid-middleware-configuration.exception.js deleted file mode 100644 index fadbe53..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/invalid-middleware-configuration.exception.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.InvalidMiddlewareConfigurationException = void 0; -const runtime_exception_1 = require("./runtime.exception"); -const messages_1 = require("../messages"); -class InvalidMiddlewareConfigurationException extends runtime_exception_1.RuntimeException { - constructor() { - super(messages_1.INVALID_MIDDLEWARE_CONFIGURATION); - } -} -exports.InvalidMiddlewareConfigurationException = InvalidMiddlewareConfigurationException; diff --git a/node_modules/@nestjs/core/errors/exceptions/invalid-middleware.exception.d.ts b/node_modules/@nestjs/core/errors/exceptions/invalid-middleware.exception.d.ts deleted file mode 100644 index acb777c..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/invalid-middleware.exception.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { RuntimeException } from './runtime.exception'; -export declare class InvalidMiddlewareException extends RuntimeException { - constructor(name: string); -} diff --git a/node_modules/@nestjs/core/errors/exceptions/invalid-middleware.exception.js b/node_modules/@nestjs/core/errors/exceptions/invalid-middleware.exception.js deleted file mode 100644 index 7dbbe88..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/invalid-middleware.exception.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.InvalidMiddlewareException = void 0; -const messages_1 = require("../messages"); -const runtime_exception_1 = require("./runtime.exception"); -class InvalidMiddlewareException extends runtime_exception_1.RuntimeException { - constructor(name) { - super((0, messages_1.INVALID_MIDDLEWARE_MESSAGE) `${name}`); - } -} -exports.InvalidMiddlewareException = InvalidMiddlewareException; diff --git a/node_modules/@nestjs/core/errors/exceptions/invalid-module.exception.d.ts b/node_modules/@nestjs/core/errors/exceptions/invalid-module.exception.d.ts deleted file mode 100644 index 1047fe0..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/invalid-module.exception.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { RuntimeException } from './runtime.exception'; -export declare class InvalidModuleException extends RuntimeException { - constructor(parentModule: any, index: number, scope: any[]); -} diff --git a/node_modules/@nestjs/core/errors/exceptions/invalid-module.exception.js b/node_modules/@nestjs/core/errors/exceptions/invalid-module.exception.js deleted file mode 100644 index 5a80652..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/invalid-module.exception.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.InvalidModuleException = void 0; -const messages_1 = require("../messages"); -const runtime_exception_1 = require("./runtime.exception"); -class InvalidModuleException extends runtime_exception_1.RuntimeException { - constructor(parentModule, index, scope) { - super((0, messages_1.INVALID_MODULE_MESSAGE)(parentModule, index, scope)); - } -} -exports.InvalidModuleException = InvalidModuleException; diff --git a/node_modules/@nestjs/core/errors/exceptions/runtime.exception.d.ts b/node_modules/@nestjs/core/errors/exceptions/runtime.exception.d.ts deleted file mode 100644 index ad4339f..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/runtime.exception.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare class RuntimeException extends Error { - constructor(message?: string); - what(): string; -} diff --git a/node_modules/@nestjs/core/errors/exceptions/runtime.exception.js b/node_modules/@nestjs/core/errors/exceptions/runtime.exception.js deleted file mode 100644 index bc248e5..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/runtime.exception.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RuntimeException = void 0; -class RuntimeException extends Error { - constructor(message = ``) { - super(message); - } - what() { - return this.message; - } -} -exports.RuntimeException = RuntimeException; diff --git a/node_modules/@nestjs/core/errors/exceptions/undefined-dependency.exception.d.ts b/node_modules/@nestjs/core/errors/exceptions/undefined-dependency.exception.d.ts deleted file mode 100644 index 74156ce..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/undefined-dependency.exception.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { InjectorDependencyContext } from '../../injector/injector'; -import { Module } from '../../injector/module'; -import { RuntimeException } from './runtime.exception'; -export declare class UndefinedDependencyException extends RuntimeException { - constructor(type: string, undefinedDependencyContext: InjectorDependencyContext, moduleRef?: Module); -} diff --git a/node_modules/@nestjs/core/errors/exceptions/undefined-dependency.exception.js b/node_modules/@nestjs/core/errors/exceptions/undefined-dependency.exception.js deleted file mode 100644 index 661e8fe..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/undefined-dependency.exception.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UndefinedDependencyException = void 0; -const messages_1 = require("../messages"); -const runtime_exception_1 = require("./runtime.exception"); -class UndefinedDependencyException extends runtime_exception_1.RuntimeException { - constructor(type, undefinedDependencyContext, moduleRef) { - super((0, messages_1.UNKNOWN_DEPENDENCIES_MESSAGE)(type, undefinedDependencyContext, moduleRef)); - } -} -exports.UndefinedDependencyException = UndefinedDependencyException; diff --git a/node_modules/@nestjs/core/errors/exceptions/undefined-forwardref.exception.d.ts b/node_modules/@nestjs/core/errors/exceptions/undefined-forwardref.exception.d.ts deleted file mode 100644 index 3269dda..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/undefined-forwardref.exception.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { RuntimeException } from './runtime.exception'; -import { Type } from '@nestjs/common'; -export declare class UndefinedForwardRefException extends RuntimeException { - constructor(scope: Type[]); -} diff --git a/node_modules/@nestjs/core/errors/exceptions/undefined-forwardref.exception.js b/node_modules/@nestjs/core/errors/exceptions/undefined-forwardref.exception.js deleted file mode 100644 index a35e069..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/undefined-forwardref.exception.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UndefinedForwardRefException = void 0; -const messages_1 = require("../messages"); -const runtime_exception_1 = require("./runtime.exception"); -class UndefinedForwardRefException extends runtime_exception_1.RuntimeException { - constructor(scope) { - super((0, messages_1.UNDEFINED_FORWARDREF_MESSAGE)(scope)); - } -} -exports.UndefinedForwardRefException = UndefinedForwardRefException; diff --git a/node_modules/@nestjs/core/errors/exceptions/undefined-module.exception.d.ts b/node_modules/@nestjs/core/errors/exceptions/undefined-module.exception.d.ts deleted file mode 100644 index f0e929b..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/undefined-module.exception.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { RuntimeException } from './runtime.exception'; -export declare class UndefinedModuleException extends RuntimeException { - constructor(parentModule: any, index: number, scope: any[]); -} diff --git a/node_modules/@nestjs/core/errors/exceptions/undefined-module.exception.js b/node_modules/@nestjs/core/errors/exceptions/undefined-module.exception.js deleted file mode 100644 index df5f9ec..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/undefined-module.exception.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UndefinedModuleException = void 0; -const runtime_exception_1 = require("./runtime.exception"); -const messages_1 = require("../messages"); -class UndefinedModuleException extends runtime_exception_1.RuntimeException { - constructor(parentModule, index, scope) { - super((0, messages_1.UNDEFINED_MODULE_MESSAGE)(parentModule, index, scope)); - } -} -exports.UndefinedModuleException = UndefinedModuleException; diff --git a/node_modules/@nestjs/core/errors/exceptions/unknown-dependencies.exception.d.ts b/node_modules/@nestjs/core/errors/exceptions/unknown-dependencies.exception.d.ts deleted file mode 100644 index 716750e..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/unknown-dependencies.exception.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { InjectorDependencyContext } from '../../injector/injector'; -import { Module } from '../../injector/module'; -import { RuntimeException } from './runtime.exception'; -export declare class UnknownDependenciesException extends RuntimeException { - readonly type: string | symbol; - readonly context: InjectorDependencyContext; - readonly metadata?: { - id: string; - } | undefined; - readonly moduleRef: { - id: string; - } | undefined; - constructor(type: string | symbol, context: InjectorDependencyContext, moduleRef?: Module, metadata?: { - id: string; - } | undefined); -} diff --git a/node_modules/@nestjs/core/errors/exceptions/unknown-dependencies.exception.js b/node_modules/@nestjs/core/errors/exceptions/unknown-dependencies.exception.js deleted file mode 100644 index 98c408e..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/unknown-dependencies.exception.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UnknownDependenciesException = void 0; -const messages_1 = require("../messages"); -const runtime_exception_1 = require("./runtime.exception"); -class UnknownDependenciesException extends runtime_exception_1.RuntimeException { - constructor(type, context, moduleRef, metadata) { - super((0, messages_1.UNKNOWN_DEPENDENCIES_MESSAGE)(type, context, moduleRef)); - this.type = type; - this.context = context; - this.metadata = metadata; - this.moduleRef = moduleRef && { id: moduleRef.id }; - } -} -exports.UnknownDependenciesException = UnknownDependenciesException; diff --git a/node_modules/@nestjs/core/errors/exceptions/unknown-element.exception.d.ts b/node_modules/@nestjs/core/errors/exceptions/unknown-element.exception.d.ts deleted file mode 100644 index f189c81..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/unknown-element.exception.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { RuntimeException } from './runtime.exception'; -export declare class UnknownElementException extends RuntimeException { - constructor(name?: string | symbol); -} diff --git a/node_modules/@nestjs/core/errors/exceptions/unknown-element.exception.js b/node_modules/@nestjs/core/errors/exceptions/unknown-element.exception.js deleted file mode 100644 index ede2284..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/unknown-element.exception.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UnknownElementException = void 0; -const runtime_exception_1 = require("./runtime.exception"); -class UnknownElementException extends runtime_exception_1.RuntimeException { - constructor(name) { - name = name && name.toString(); - super(`Nest could not find ${name || 'given'} element (this provider does not exist in the current context)`); - } -} -exports.UnknownElementException = UnknownElementException; diff --git a/node_modules/@nestjs/core/errors/exceptions/unknown-export.exception.d.ts b/node_modules/@nestjs/core/errors/exceptions/unknown-export.exception.d.ts deleted file mode 100644 index 92b683f..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/unknown-export.exception.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { RuntimeException } from './runtime.exception'; -export declare class UnknownExportException extends RuntimeException { - constructor(token: string | symbol, moduleName: string); -} diff --git a/node_modules/@nestjs/core/errors/exceptions/unknown-export.exception.js b/node_modules/@nestjs/core/errors/exceptions/unknown-export.exception.js deleted file mode 100644 index cb8e313..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/unknown-export.exception.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UnknownExportException = void 0; -const messages_1 = require("../messages"); -const runtime_exception_1 = require("./runtime.exception"); -class UnknownExportException extends runtime_exception_1.RuntimeException { - constructor(token, moduleName) { - super((0, messages_1.UNKNOWN_EXPORT_MESSAGE)(token, moduleName)); - } -} -exports.UnknownExportException = UnknownExportException; diff --git a/node_modules/@nestjs/core/errors/exceptions/unknown-module.exception.d.ts b/node_modules/@nestjs/core/errors/exceptions/unknown-module.exception.d.ts deleted file mode 100644 index 51a3bec..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/unknown-module.exception.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { RuntimeException } from './runtime.exception'; -export declare class UnknownModuleException extends RuntimeException { - constructor(moduleName?: string); -} diff --git a/node_modules/@nestjs/core/errors/exceptions/unknown-module.exception.js b/node_modules/@nestjs/core/errors/exceptions/unknown-module.exception.js deleted file mode 100644 index ea12014..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/unknown-module.exception.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UnknownModuleException = void 0; -const runtime_exception_1 = require("./runtime.exception"); -class UnknownModuleException extends runtime_exception_1.RuntimeException { - constructor(moduleName) { - super(`Nest could not select the given module (${moduleName ? `"${moduleName}"` : 'it'} does not exist in current context).`); - } -} -exports.UnknownModuleException = UnknownModuleException; diff --git a/node_modules/@nestjs/core/errors/exceptions/unknown-request-mapping.exception.d.ts b/node_modules/@nestjs/core/errors/exceptions/unknown-request-mapping.exception.d.ts deleted file mode 100644 index 22c15a9..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/unknown-request-mapping.exception.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { Type } from '@nestjs/common'; -import { RuntimeException } from './runtime.exception'; -export declare class UnknownRequestMappingException extends RuntimeException { - constructor(metatype: Type); -} diff --git a/node_modules/@nestjs/core/errors/exceptions/unknown-request-mapping.exception.js b/node_modules/@nestjs/core/errors/exceptions/unknown-request-mapping.exception.js deleted file mode 100644 index f052caf..0000000 --- a/node_modules/@nestjs/core/errors/exceptions/unknown-request-mapping.exception.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UnknownRequestMappingException = void 0; -const runtime_exception_1 = require("./runtime.exception"); -const messages_1 = require("../messages"); -class UnknownRequestMappingException extends runtime_exception_1.RuntimeException { - constructor(metatype) { - super((0, messages_1.UNKNOWN_REQUEST_MAPPING)(metatype)); - } -} -exports.UnknownRequestMappingException = UnknownRequestMappingException; diff --git a/node_modules/@nestjs/core/errors/messages.d.ts b/node_modules/@nestjs/core/errors/messages.d.ts deleted file mode 100644 index d03e723..0000000 --- a/node_modules/@nestjs/core/errors/messages.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { ForwardReference, Type } from '@nestjs/common'; -import { InjectorDependencyContext } from '../injector/injector'; -import { Module } from '../injector/module'; -export declare const UNKNOWN_DEPENDENCIES_MESSAGE: (type: string | symbol, unknownDependencyContext: InjectorDependencyContext, moduleRef: Module | undefined) => string; -export declare const INVALID_MIDDLEWARE_MESSAGE: (text: TemplateStringsArray, name: string) => string; -export declare const UNDEFINED_FORWARDREF_MESSAGE: (scope: Type[]) => string; -export declare const INVALID_MODULE_MESSAGE: (parentModule: any, index: number, scope: any[]) => string; -export declare const USING_INVALID_CLASS_AS_A_MODULE_MESSAGE: (metatypeUsedAsAModule: Type | ForwardReference, scope: any[]) => string; -export declare const UNDEFINED_MODULE_MESSAGE: (parentModule: any, index: number, scope: any[]) => string; -export declare const UNKNOWN_EXPORT_MESSAGE: (token: string | symbol | undefined, module: string) => string; -export declare const INVALID_CLASS_MESSAGE: (text: TemplateStringsArray, value: any) => string; -export declare const INVALID_CLASS_SCOPE_MESSAGE: (text: TemplateStringsArray, name: string | undefined) => string; -export declare const UNKNOWN_REQUEST_MAPPING: (metatype: Type) => string; -export declare const INVALID_MIDDLEWARE_CONFIGURATION = "An invalid middleware configuration has been passed inside the module 'configure()' method."; -export declare const UNHANDLED_RUNTIME_EXCEPTION = "Unhandled Runtime Exception."; -export declare const INVALID_EXCEPTION_FILTER = "Invalid exception filters (@UseFilters())."; -export declare const MICROSERVICES_PACKAGE_NOT_FOUND_EXCEPTION = "Unable to load @nestjs/microservices package. (Please make sure that it's already installed.)"; diff --git a/node_modules/@nestjs/core/errors/messages.js b/node_modules/@nestjs/core/errors/messages.js deleted file mode 100644 index 4ee1516..0000000 --- a/node_modules/@nestjs/core/errors/messages.js +++ /dev/null @@ -1,174 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MICROSERVICES_PACKAGE_NOT_FOUND_EXCEPTION = exports.INVALID_EXCEPTION_FILTER = exports.UNHANDLED_RUNTIME_EXCEPTION = exports.INVALID_MIDDLEWARE_CONFIGURATION = exports.UNKNOWN_REQUEST_MAPPING = exports.INVALID_CLASS_SCOPE_MESSAGE = exports.INVALID_CLASS_MESSAGE = exports.UNKNOWN_EXPORT_MESSAGE = exports.UNDEFINED_MODULE_MESSAGE = exports.USING_INVALID_CLASS_AS_A_MODULE_MESSAGE = exports.INVALID_MODULE_MESSAGE = exports.UNDEFINED_FORWARDREF_MESSAGE = exports.INVALID_MIDDLEWARE_MESSAGE = exports.UNKNOWN_DEPENDENCIES_MESSAGE = void 0; -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -/** - * Returns the name of an instance or `undefined` - * @param instance The instance which should get the name from - */ -const getInstanceName = (instance) => { - if (instance?.forwardRef) { - return instance.forwardRef()?.name; - } - if (instance?.module) { - return instance.module?.name; - } - return instance?.name; -}; -/** - * Returns the name of the dependency. - * Tries to get the class name, otherwise the string value - * (= injection token). As fallback to any falsy value for `dependency`, it - * returns `fallbackValue` - * @param dependency The name of the dependency to be displayed - * @param fallbackValue The fallback value if the dependency is falsy - * @param disambiguated Whether dependency's name is disambiguated with double quotes - */ -const getDependencyName = (dependency, fallbackValue, disambiguated = true) => -// use class name -getInstanceName(dependency) || - // use injection token (symbol) - ((0, shared_utils_1.isSymbol)(dependency) && dependency.toString()) || - // use string directly - (dependency - ? disambiguated - ? `"${dependency}"` - : dependency - : undefined) || - // otherwise - fallbackValue; -/** - * Returns the name of the module - * Tries to get the class name. As fallback it returns 'current'. - * @param module The module which should get displayed - */ -const getModuleName = (module) => (module && getInstanceName(module.metatype)) || 'current'; -const stringifyScope = (scope) => (scope || []).map(getInstanceName).join(' -> '); -const UNKNOWN_DEPENDENCIES_MESSAGE = (type, unknownDependencyContext, moduleRef) => { - const { index, name, dependencies, key } = unknownDependencyContext; - const moduleName = getModuleName(moduleRef); - const dependencyName = getDependencyName(name, 'dependency'); - const isImportTypeIssue = !(0, shared_utils_1.isNil)(index) && - dependencies && - (dependencies[index] === undefined || - dependencies[index] === Object || - (typeof dependencies[index] === 'function' && - dependencies[index].name === 'Object')); - let potentialSolutions; - if (isImportTypeIssue) { - potentialSolutions = `\n -Potential solutions: -- The dependency at index [${index}] appears to be undefined at runtime -- This commonly occurs when using 'import type' instead of 'import' for injectable classes -- Check your imports and change: - ❌ import type { SomeService } from './some.service'; - ✅ import { SomeService } from './some.service'; -- Ensure the imported class is decorated with @Injectable() or is a valid provider -- If using dynamic imports, ensure the class is available at runtime, not just for type checking - -For more common dependency resolution issues, see: https://docs.nestjs.com/faq/common-errors`; - } - else { - potentialSolutions = - // If module's name is well defined - moduleName !== 'current' - ? `\n -Potential solutions: -- Is ${moduleName} a valid NestJS module? -- If ${dependencyName} is a provider, is it part of the current ${moduleName}? -- If ${dependencyName} is exported from a separate @Module, is that module imported within ${moduleName}? - @Module({ - imports: [ /* the Module containing ${dependencyName} */ ] - }) - -For more common dependency resolution issues, see: https://docs.nestjs.com/faq/common-errors` - : `\n -Potential solutions: -- If ${dependencyName} is a provider, is it part of the current Module? -- If ${dependencyName} is exported from a separate @Module, is that module imported within Module? - @Module({ - imports: [ /* the Module containing ${dependencyName} */ ] - }) - -For more common dependency resolution issues, see: https://docs.nestjs.com/faq/common-errors`; - } - let message = `Nest can't resolve dependencies of the ${type.toString()}`; - if ((0, shared_utils_1.isNil)(index)) { - message += `. Please make sure that the "${key.toString()}" property is available in the current context.${potentialSolutions}`; - return message; - } - const dependenciesName = (dependencies || []).map(dependencyName => getDependencyName(dependencyName, '+', false)); - dependenciesName[index] = '?'; - const tokenFragment = !isImportTypeIssue && name !== undefined ? ` ${dependencyName}` : ''; - const contextLabel = isImportTypeIssue ? 'current' : moduleName; - message += ` (`; - message += dependenciesName.join(', '); - message += `). Please make sure that the argument${tokenFragment} at index [${index}]`; - message += ` is available in the ${contextLabel} module.`; - message += potentialSolutions; - return message; -}; -exports.UNKNOWN_DEPENDENCIES_MESSAGE = UNKNOWN_DEPENDENCIES_MESSAGE; -const INVALID_MIDDLEWARE_MESSAGE = (text, name) => `The middleware doesn't provide the 'use' method (${name})`; -exports.INVALID_MIDDLEWARE_MESSAGE = INVALID_MIDDLEWARE_MESSAGE; -const UNDEFINED_FORWARDREF_MESSAGE = (scope) => `Nest cannot create the module instance. Often, this is because of a circular dependency between modules. Use forwardRef() to avoid it. - -(Read more: https://docs.nestjs.com/fundamentals/circular-dependency) -Scope [${stringifyScope(scope)}] -`; -exports.UNDEFINED_FORWARDREF_MESSAGE = UNDEFINED_FORWARDREF_MESSAGE; -const INVALID_MODULE_MESSAGE = (parentModule, index, scope) => { - const parentModuleName = parentModule?.name || 'module'; - return `Nest cannot create the ${parentModuleName} instance. -Received an unexpected value at index [${index}] of the ${parentModuleName} "imports" array. - -Scope [${stringifyScope(scope)}]`; -}; -exports.INVALID_MODULE_MESSAGE = INVALID_MODULE_MESSAGE; -const USING_INVALID_CLASS_AS_A_MODULE_MESSAGE = (metatypeUsedAsAModule, scope) => { - const metatypeNameQuote = `"${getInstanceName(metatypeUsedAsAModule)}"`; - return `Classes annotated with @Injectable(), @Catch(), and @Controller() decorators must not appear in the "imports" array of a module. -Please remove ${metatypeNameQuote} (including forwarded occurrences, if any) from all of the "imports" arrays. - -Scope [${stringifyScope(scope)}] -`; -}; -exports.USING_INVALID_CLASS_AS_A_MODULE_MESSAGE = USING_INVALID_CLASS_AS_A_MODULE_MESSAGE; -const UNDEFINED_MODULE_MESSAGE = (parentModule, index, scope) => { - const parentModuleName = parentModule?.name || 'module'; - return `Nest cannot create the ${parentModuleName} instance. -The module at index [${index}] of the ${parentModuleName} "imports" array is undefined. - -Potential causes: -- A circular dependency between modules. Use forwardRef() to avoid it. Read more: https://docs.nestjs.com/fundamentals/circular-dependency -- The module at index [${index}] is of type "undefined". Check your import statements and the type of the module. - -Scope [${stringifyScope(scope)}]`; -}; -exports.UNDEFINED_MODULE_MESSAGE = UNDEFINED_MODULE_MESSAGE; -const UNKNOWN_EXPORT_MESSAGE = (token = 'item', module) => { - token = (0, shared_utils_1.isSymbol)(token) ? token.toString() : token; - return `Nest cannot export a provider/module that is not a part of the currently processed module (${module}). Please verify whether the exported ${token} is available in this particular context. - -Possible Solutions: -- Is ${token} part of the relevant providers/imports within ${module}? - -For more common dependency resolution issues, see: https://docs.nestjs.com/faq/common-errors -`; -}; -exports.UNKNOWN_EXPORT_MESSAGE = UNKNOWN_EXPORT_MESSAGE; -const INVALID_CLASS_MESSAGE = (text, value) => `ModuleRef cannot instantiate class (${value} is not constructable).`; -exports.INVALID_CLASS_MESSAGE = INVALID_CLASS_MESSAGE; -const INVALID_CLASS_SCOPE_MESSAGE = (text, name) => `${name || 'This class'} is marked as a scoped provider. Request and transient-scoped providers can't be used in combination with "get()" method. Please, use "resolve()" instead.`; -exports.INVALID_CLASS_SCOPE_MESSAGE = INVALID_CLASS_SCOPE_MESSAGE; -const UNKNOWN_REQUEST_MAPPING = (metatype) => { - const className = metatype.name; - return className - ? `An invalid controller has been detected. "${className}" does not have the @Controller() decorator but it is being listed in the "controllers" array of some module.` - : `An invalid controller has been detected. Perhaps, one of your controllers is missing the @Controller() decorator.`; -}; -exports.UNKNOWN_REQUEST_MAPPING = UNKNOWN_REQUEST_MAPPING; -exports.INVALID_MIDDLEWARE_CONFIGURATION = `An invalid middleware configuration has been passed inside the module 'configure()' method.`; -exports.UNHANDLED_RUNTIME_EXCEPTION = `Unhandled Runtime Exception.`; -exports.INVALID_EXCEPTION_FILTER = `Invalid exception filters (@UseFilters()).`; -exports.MICROSERVICES_PACKAGE_NOT_FOUND_EXCEPTION = `Unable to load @nestjs/microservices package. (Please make sure that it's already installed.)`; diff --git a/node_modules/@nestjs/core/exceptions/base-exception-filter-context.d.ts b/node_modules/@nestjs/core/exceptions/base-exception-filter-context.d.ts deleted file mode 100644 index 2f333e9..0000000 --- a/node_modules/@nestjs/core/exceptions/base-exception-filter-context.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Type } from '@nestjs/common/interfaces'; -import { ExceptionFilter } from '@nestjs/common/interfaces/exceptions/exception-filter.interface'; -import { ContextCreator } from '../helpers/context-creator'; -import { NestContainer } from '../injector/container'; -import { InstanceWrapper } from '../injector/instance-wrapper'; -export declare class BaseExceptionFilterContext extends ContextCreator { - private readonly container; - protected moduleContext: string; - constructor(container: NestContainer); - createConcreteContext(metadata: T, contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): R; - getFilterInstance(filter: Function | ExceptionFilter, contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): ExceptionFilter | null; - getInstanceByMetatype(metatype: Type): InstanceWrapper | undefined; - reflectCatchExceptions(instance: ExceptionFilter): Type[]; -} diff --git a/node_modules/@nestjs/core/exceptions/base-exception-filter-context.js b/node_modules/@nestjs/core/exceptions/base-exception-filter-context.js deleted file mode 100644 index b05f3a7..0000000 --- a/node_modules/@nestjs/core/exceptions/base-exception-filter-context.js +++ /dev/null @@ -1,56 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BaseExceptionFilterContext = void 0; -const constants_1 = require("@nestjs/common/constants"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const iterare_1 = require("iterare"); -const context_creator_1 = require("../helpers/context-creator"); -const constants_2 = require("../injector/constants"); -class BaseExceptionFilterContext extends context_creator_1.ContextCreator { - constructor(container) { - super(); - this.container = container; - } - createConcreteContext(metadata, contextId = constants_2.STATIC_CONTEXT, inquirerId) { - if ((0, shared_utils_1.isEmpty)(metadata)) { - return []; - } - return (0, iterare_1.iterate)(metadata) - .filter(instance => instance && ((0, shared_utils_1.isFunction)(instance.catch) || instance.name)) - .map(filter => this.getFilterInstance(filter, contextId, inquirerId)) - .filter(item => !!item) - .map(instance => ({ - func: instance.catch.bind(instance), - exceptionMetatypes: this.reflectCatchExceptions(instance), - })) - .toArray(); - } - getFilterInstance(filter, contextId = constants_2.STATIC_CONTEXT, inquirerId) { - const isObject = !!filter.catch; - if (isObject) { - return filter; - } - const instanceWrapper = this.getInstanceByMetatype(filter); - if (!instanceWrapper) { - return null; - } - const instanceHost = instanceWrapper.getInstanceByContextId(this.getContextId(contextId, instanceWrapper), inquirerId); - return instanceHost && instanceHost.instance; - } - getInstanceByMetatype(metatype) { - if (!this.moduleContext) { - return; - } - const collection = this.container.getModules(); - const moduleRef = collection.get(this.moduleContext); - if (!moduleRef) { - return; - } - return moduleRef.injectables.get(metatype); - } - reflectCatchExceptions(instance) { - const prototype = Object.getPrototypeOf(instance); - return (Reflect.getMetadata(constants_1.FILTER_CATCH_EXCEPTIONS, prototype.constructor) || []); - } -} -exports.BaseExceptionFilterContext = BaseExceptionFilterContext; diff --git a/node_modules/@nestjs/core/exceptions/base-exception-filter.d.ts b/node_modules/@nestjs/core/exceptions/base-exception-filter.d.ts deleted file mode 100644 index 9167086..0000000 --- a/node_modules/@nestjs/core/exceptions/base-exception-filter.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { ArgumentsHost, ExceptionFilter, HttpServer } from '@nestjs/common'; -import { AbstractHttpAdapter } from '../adapters'; -import { HttpAdapterHost } from '../helpers/http-adapter-host'; -export declare class BaseExceptionFilter implements ExceptionFilter { - protected readonly applicationRef?: HttpServer | undefined; - private static readonly logger; - protected readonly httpAdapterHost?: HttpAdapterHost; - constructor(applicationRef?: HttpServer | undefined); - catch(exception: T, host: ArgumentsHost): void; - handleUnknownError(exception: T, host: ArgumentsHost, applicationRef: AbstractHttpAdapter | HttpServer): void; - isExceptionObject(err: any): err is Error; - /** - * Checks if the thrown error comes from the "http-errors" library. - * @param err error object - */ - isHttpError(err: any): err is { - statusCode: number; - message: string; - }; -} diff --git a/node_modules/@nestjs/core/exceptions/base-exception-filter.js b/node_modules/@nestjs/core/exceptions/base-exception-filter.js deleted file mode 100644 index b3db345..0000000 --- a/node_modules/@nestjs/core/exceptions/base-exception-filter.js +++ /dev/null @@ -1,72 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BaseExceptionFilter = void 0; -const tslib_1 = require("tslib"); -const common_1 = require("@nestjs/common"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const constants_1 = require("../constants"); -const http_adapter_host_1 = require("../helpers/http-adapter-host"); -class BaseExceptionFilter { - constructor(applicationRef) { - this.applicationRef = applicationRef; - } - catch(exception, host) { - const applicationRef = this.applicationRef || - (this.httpAdapterHost && this.httpAdapterHost.httpAdapter); - if (!(exception instanceof common_1.HttpException)) { - return this.handleUnknownError(exception, host, applicationRef); - } - const res = exception.getResponse(); - const message = (0, shared_utils_1.isObject)(res) - ? res - : { - statusCode: exception.getStatus(), - message: res, - }; - const response = host.getArgByIndex(1); - if (!applicationRef.isHeadersSent(response)) { - applicationRef.reply(response, message, exception.getStatus()); - } - else { - applicationRef.end(response); - } - } - handleUnknownError(exception, host, applicationRef) { - const body = this.isHttpError(exception) - ? { - statusCode: exception.statusCode, - message: exception.message, - } - : { - statusCode: common_1.HttpStatus.INTERNAL_SERVER_ERROR, - message: constants_1.MESSAGES.UNKNOWN_EXCEPTION_MESSAGE, - }; - const response = host.getArgByIndex(1); - if (!applicationRef.isHeadersSent(response)) { - applicationRef.reply(response, body, body.statusCode); - } - else { - applicationRef.end(response); - } - if (!(exception instanceof common_1.IntrinsicException)) { - BaseExceptionFilter.logger.error(exception); - } - } - isExceptionObject(err) { - return (0, shared_utils_1.isObject)(err) && !!err.message; - } - /** - * Checks if the thrown error comes from the "http-errors" library. - * @param err error object - */ - isHttpError(err) { - return err?.statusCode && err?.message; - } -} -exports.BaseExceptionFilter = BaseExceptionFilter; -BaseExceptionFilter.logger = new common_1.Logger('ExceptionsHandler'); -tslib_1.__decorate([ - (0, common_1.Optional)(), - (0, common_1.Inject)(), - tslib_1.__metadata("design:type", http_adapter_host_1.HttpAdapterHost) -], BaseExceptionFilter.prototype, "httpAdapterHost", void 0); diff --git a/node_modules/@nestjs/core/exceptions/exceptions-handler.d.ts b/node_modules/@nestjs/core/exceptions/exceptions-handler.d.ts deleted file mode 100644 index 1fd6e33..0000000 --- a/node_modules/@nestjs/core/exceptions/exceptions-handler.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { HttpException } from '@nestjs/common'; -import { ExceptionFilterMetadata } from '@nestjs/common/interfaces/exceptions/exception-filter-metadata.interface'; -import { ArgumentsHost } from '@nestjs/common/interfaces/features/arguments-host.interface'; -import { BaseExceptionFilter } from './base-exception-filter'; -export declare class ExceptionsHandler extends BaseExceptionFilter { - private filters; - next(exception: Error | HttpException, ctx: ArgumentsHost): void; - setCustomFilters(filters: ExceptionFilterMetadata[]): void; - invokeCustomFilters(exception: T, ctx: ArgumentsHost): boolean; -} diff --git a/node_modules/@nestjs/core/exceptions/exceptions-handler.js b/node_modules/@nestjs/core/exceptions/exceptions-handler.js deleted file mode 100644 index f9166d8..0000000 --- a/node_modules/@nestjs/core/exceptions/exceptions-handler.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ExceptionsHandler = void 0; -const select_exception_filter_metadata_util_1 = require("@nestjs/common/utils/select-exception-filter-metadata.util"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const invalid_exception_filter_exception_1 = require("../errors/exceptions/invalid-exception-filter.exception"); -const base_exception_filter_1 = require("./base-exception-filter"); -class ExceptionsHandler extends base_exception_filter_1.BaseExceptionFilter { - constructor() { - super(...arguments); - this.filters = []; - } - next(exception, ctx) { - if (this.invokeCustomFilters(exception, ctx)) { - return; - } - super.catch(exception, ctx); - } - setCustomFilters(filters) { - if (!Array.isArray(filters)) { - throw new invalid_exception_filter_exception_1.InvalidExceptionFilterException(); - } - this.filters = filters; - } - invokeCustomFilters(exception, ctx) { - if ((0, shared_utils_1.isEmpty)(this.filters)) { - return false; - } - const filter = (0, select_exception_filter_metadata_util_1.selectExceptionFilterMetadata)(this.filters, exception); - filter && filter.func(exception, ctx); - return !!filter; - } -} -exports.ExceptionsHandler = ExceptionsHandler; diff --git a/node_modules/@nestjs/core/exceptions/external-exception-filter-context.d.ts b/node_modules/@nestjs/core/exceptions/external-exception-filter-context.d.ts deleted file mode 100644 index 3f5c370..0000000 --- a/node_modules/@nestjs/core/exceptions/external-exception-filter-context.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Controller } from '@nestjs/common/interfaces'; -import { ApplicationConfig } from '../application-config'; -import { NestContainer } from '../injector/container'; -import { RouterProxyCallback } from '../router/router-proxy'; -import { BaseExceptionFilterContext } from './base-exception-filter-context'; -import { ExternalExceptionsHandler } from './external-exceptions-handler'; -export declare class ExternalExceptionFilterContext extends BaseExceptionFilterContext { - private readonly config?; - constructor(container: NestContainer, config?: ApplicationConfig | undefined); - create(instance: Controller, callback: RouterProxyCallback, module: string, contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): ExternalExceptionsHandler; - getGlobalMetadata(contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): T; -} diff --git a/node_modules/@nestjs/core/exceptions/external-exception-filter-context.js b/node_modules/@nestjs/core/exceptions/external-exception-filter-context.js deleted file mode 100644 index a2b2582..0000000 --- a/node_modules/@nestjs/core/exceptions/external-exception-filter-context.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ExternalExceptionFilterContext = void 0; -const constants_1 = require("@nestjs/common/constants"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const iterare_1 = require("iterare"); -const constants_2 = require("../injector/constants"); -const base_exception_filter_context_1 = require("./base-exception-filter-context"); -const external_exceptions_handler_1 = require("./external-exceptions-handler"); -class ExternalExceptionFilterContext extends base_exception_filter_context_1.BaseExceptionFilterContext { - constructor(container, config) { - super(container); - this.config = config; - } - create(instance, callback, module, contextId = constants_2.STATIC_CONTEXT, inquirerId) { - this.moduleContext = module; - const exceptionHandler = new external_exceptions_handler_1.ExternalExceptionsHandler(); - const filters = this.createContext(instance, callback, constants_1.EXCEPTION_FILTERS_METADATA, contextId, inquirerId); - if ((0, shared_utils_1.isEmpty)(filters)) { - return exceptionHandler; - } - exceptionHandler.setCustomFilters(filters.reverse()); - return exceptionHandler; - } - getGlobalMetadata(contextId = constants_2.STATIC_CONTEXT, inquirerId) { - if (!this.config) { - return []; - } - const globalFilters = this.config.getGlobalFilters(); - if (contextId === constants_2.STATIC_CONTEXT && !inquirerId) { - return globalFilters; - } - const scopedFilterWrappers = this.config.getGlobalRequestFilters(); - const scopedFilters = (0, iterare_1.iterate)(scopedFilterWrappers) - .map(wrapper => wrapper.getInstanceByContextId(contextId, inquirerId)) - .filter(host => !!host) - .map(host => host.instance) - .toArray(); - return globalFilters.concat(scopedFilters); - } -} -exports.ExternalExceptionFilterContext = ExternalExceptionFilterContext; diff --git a/node_modules/@nestjs/core/exceptions/external-exception-filter.d.ts b/node_modules/@nestjs/core/exceptions/external-exception-filter.d.ts deleted file mode 100644 index 2b99282..0000000 --- a/node_modules/@nestjs/core/exceptions/external-exception-filter.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ArgumentsHost } from '@nestjs/common'; -export declare class ExternalExceptionFilter { - private static readonly logger; - catch(exception: T, host: ArgumentsHost): R | Promise; -} diff --git a/node_modules/@nestjs/core/exceptions/external-exception-filter.js b/node_modules/@nestjs/core/exceptions/external-exception-filter.js deleted file mode 100644 index 2713a8b..0000000 --- a/node_modules/@nestjs/core/exceptions/external-exception-filter.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ExternalExceptionFilter = void 0; -const common_1 = require("@nestjs/common"); -class ExternalExceptionFilter { - catch(exception, host) { - if (exception instanceof Error && - !(exception instanceof common_1.IntrinsicException)) { - ExternalExceptionFilter.logger.error(exception); - } - throw exception; - } -} -exports.ExternalExceptionFilter = ExternalExceptionFilter; -ExternalExceptionFilter.logger = new common_1.Logger('ExceptionsHandler'); diff --git a/node_modules/@nestjs/core/exceptions/external-exceptions-handler.d.ts b/node_modules/@nestjs/core/exceptions/external-exceptions-handler.d.ts deleted file mode 100644 index f1daf2e..0000000 --- a/node_modules/@nestjs/core/exceptions/external-exceptions-handler.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ExceptionFilterMetadata } from '@nestjs/common/interfaces/exceptions'; -import { ArgumentsHost } from '@nestjs/common/interfaces/features/arguments-host.interface'; -import { ExternalExceptionFilter } from './external-exception-filter'; -export declare class ExternalExceptionsHandler extends ExternalExceptionFilter { - private filters; - next(exception: Error, host: ArgumentsHost): Promise; - setCustomFilters(filters: ExceptionFilterMetadata[]): void; - invokeCustomFilters(exception: T, host: ArgumentsHost): Promise | null; -} diff --git a/node_modules/@nestjs/core/exceptions/external-exceptions-handler.js b/node_modules/@nestjs/core/exceptions/external-exceptions-handler.js deleted file mode 100644 index 649173a..0000000 --- a/node_modules/@nestjs/core/exceptions/external-exceptions-handler.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ExternalExceptionsHandler = void 0; -const select_exception_filter_metadata_util_1 = require("@nestjs/common/utils/select-exception-filter-metadata.util"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const invalid_exception_filter_exception_1 = require("../errors/exceptions/invalid-exception-filter.exception"); -const external_exception_filter_1 = require("./external-exception-filter"); -class ExternalExceptionsHandler extends external_exception_filter_1.ExternalExceptionFilter { - constructor() { - super(...arguments); - this.filters = []; - } - next(exception, host) { - const result = this.invokeCustomFilters(exception, host); - if (result) { - return result; - } - return super.catch(exception, host); - } - setCustomFilters(filters) { - if (!Array.isArray(filters)) { - throw new invalid_exception_filter_exception_1.InvalidExceptionFilterException(); - } - this.filters = filters; - } - invokeCustomFilters(exception, host) { - if ((0, shared_utils_1.isEmpty)(this.filters)) { - return null; - } - const filter = (0, select_exception_filter_metadata_util_1.selectExceptionFilterMetadata)(this.filters, exception); - return filter ? filter.func(exception, host) : null; - } -} -exports.ExternalExceptionsHandler = ExternalExceptionsHandler; diff --git a/node_modules/@nestjs/core/exceptions/index.d.ts b/node_modules/@nestjs/core/exceptions/index.d.ts deleted file mode 100644 index cc19dee..0000000 --- a/node_modules/@nestjs/core/exceptions/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './base-exception-filter'; diff --git a/node_modules/@nestjs/core/exceptions/index.js b/node_modules/@nestjs/core/exceptions/index.js deleted file mode 100644 index e8f1ade..0000000 --- a/node_modules/@nestjs/core/exceptions/index.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./base-exception-filter"), exports); diff --git a/node_modules/@nestjs/core/guards/constants.d.ts b/node_modules/@nestjs/core/guards/constants.d.ts deleted file mode 100644 index f4c98c0..0000000 --- a/node_modules/@nestjs/core/guards/constants.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const FORBIDDEN_MESSAGE = "Forbidden resource"; diff --git a/node_modules/@nestjs/core/guards/constants.js b/node_modules/@nestjs/core/guards/constants.js deleted file mode 100644 index 60053ec..0000000 --- a/node_modules/@nestjs/core/guards/constants.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.FORBIDDEN_MESSAGE = void 0; -exports.FORBIDDEN_MESSAGE = 'Forbidden resource'; diff --git a/node_modules/@nestjs/core/guards/guards-consumer.d.ts b/node_modules/@nestjs/core/guards/guards-consumer.d.ts deleted file mode 100644 index f927d76..0000000 --- a/node_modules/@nestjs/core/guards/guards-consumer.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { CanActivate } from '@nestjs/common'; -import { ContextType, Controller } from '@nestjs/common/interfaces'; -import { Observable } from 'rxjs'; -import { ExecutionContextHost } from '../helpers/execution-context-host'; -export declare class GuardsConsumer { - tryActivate(guards: CanActivate[], args: unknown[], instance: Controller, callback: (...args: unknown[]) => unknown, type?: TContext): Promise; - createContext(args: unknown[], instance: Controller, callback: (...args: unknown[]) => unknown): ExecutionContextHost; - pickResult(result: boolean | Promise | Observable): Promise; -} diff --git a/node_modules/@nestjs/core/guards/guards-consumer.js b/node_modules/@nestjs/core/guards/guards-consumer.js deleted file mode 100644 index 16087c0..0000000 --- a/node_modules/@nestjs/core/guards/guards-consumer.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GuardsConsumer = void 0; -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const rxjs_1 = require("rxjs"); -const execution_context_host_1 = require("../helpers/execution-context-host"); -class GuardsConsumer { - async tryActivate(guards, args, instance, callback, type) { - if (!guards || (0, shared_utils_1.isEmpty)(guards)) { - return true; - } - const context = this.createContext(args, instance, callback); - context.setType(type); - for (const guard of guards) { - const result = guard.canActivate(context); - if (typeof result === 'boolean') { - if (!result) { - return false; - } - continue; - } - if (await this.pickResult(result)) { - continue; - } - return false; - } - return true; - } - createContext(args, instance, callback) { - return new execution_context_host_1.ExecutionContextHost(args, instance.constructor, callback); - } - async pickResult(result) { - if (result instanceof rxjs_1.Observable) { - return (0, rxjs_1.lastValueFrom)(result); - } - return result; - } -} -exports.GuardsConsumer = GuardsConsumer; diff --git a/node_modules/@nestjs/core/guards/guards-context-creator.d.ts b/node_modules/@nestjs/core/guards/guards-context-creator.d.ts deleted file mode 100644 index c52f8db..0000000 --- a/node_modules/@nestjs/core/guards/guards-context-creator.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { CanActivate } from '@nestjs/common'; -import { Controller, Type } from '@nestjs/common/interfaces'; -import { ApplicationConfig } from '../application-config'; -import { ContextCreator } from '../helpers/context-creator'; -import { NestContainer } from '../injector/container'; -import { InstanceWrapper } from '../injector/instance-wrapper'; -export declare class GuardsContextCreator extends ContextCreator { - private readonly container; - private readonly config?; - private moduleContext; - constructor(container: NestContainer, config?: ApplicationConfig | undefined); - create(instance: Controller, callback: (...args: unknown[]) => unknown, module: string, contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): CanActivate[]; - createConcreteContext(metadata: T, contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): R; - getGuardInstance(metatype: Function | CanActivate, contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): CanActivate | null; - getInstanceByMetatype(metatype: Type): InstanceWrapper | undefined; - getGlobalMetadata(contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): T; -} diff --git a/node_modules/@nestjs/core/guards/guards-context-creator.js b/node_modules/@nestjs/core/guards/guards-context-creator.js deleted file mode 100644 index 078b8f9..0000000 --- a/node_modules/@nestjs/core/guards/guards-context-creator.js +++ /dev/null @@ -1,70 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GuardsContextCreator = void 0; -const constants_1 = require("@nestjs/common/constants"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const iterare_1 = require("iterare"); -const context_creator_1 = require("../helpers/context-creator"); -const constants_2 = require("../injector/constants"); -class GuardsContextCreator extends context_creator_1.ContextCreator { - constructor(container, config) { - super(); - this.container = container; - this.config = config; - } - create(instance, callback, module, contextId = constants_2.STATIC_CONTEXT, inquirerId) { - this.moduleContext = module; - return this.createContext(instance, callback, constants_1.GUARDS_METADATA, contextId, inquirerId); - } - createConcreteContext(metadata, contextId = constants_2.STATIC_CONTEXT, inquirerId) { - if ((0, shared_utils_1.isEmpty)(metadata)) { - return []; - } - return (0, iterare_1.iterate)(metadata) - .filter((guard) => guard && (guard.name || guard.canActivate)) - .map(guard => this.getGuardInstance(guard, contextId, inquirerId)) - .filter((guard) => !!guard && (0, shared_utils_1.isFunction)(guard.canActivate)) - .toArray(); - } - getGuardInstance(metatype, contextId = constants_2.STATIC_CONTEXT, inquirerId) { - const isObject = !!metatype.canActivate; - if (isObject) { - return metatype; - } - const instanceWrapper = this.getInstanceByMetatype(metatype); - if (!instanceWrapper) { - return null; - } - const instanceHost = instanceWrapper.getInstanceByContextId(this.getContextId(contextId, instanceWrapper), inquirerId); - return instanceHost && instanceHost.instance; - } - getInstanceByMetatype(metatype) { - if (!this.moduleContext) { - return; - } - const collection = this.container.getModules(); - const moduleRef = collection.get(this.moduleContext); - if (!moduleRef) { - return; - } - const injectables = moduleRef.injectables; - return injectables.get(metatype); - } - getGlobalMetadata(contextId = constants_2.STATIC_CONTEXT, inquirerId) { - if (!this.config) { - return []; - } - const globalGuards = this.config.getGlobalGuards(); - if (contextId === constants_2.STATIC_CONTEXT && !inquirerId) { - return globalGuards; - } - const scopedGuardWrappers = this.config.getGlobalRequestGuards(); - const scopedGuards = (0, iterare_1.iterate)(scopedGuardWrappers) - .map(wrapper => wrapper.getInstanceByContextId(this.getContextId(contextId, wrapper), inquirerId)) - .filter(host => !!host) - .map(host => host.instance) - .toArray(); - return globalGuards.concat(scopedGuards); - } -} -exports.GuardsContextCreator = GuardsContextCreator; diff --git a/node_modules/@nestjs/core/guards/index.d.ts b/node_modules/@nestjs/core/guards/index.d.ts deleted file mode 100644 index 61a8b77..0000000 --- a/node_modules/@nestjs/core/guards/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './constants'; -export * from './guards-consumer'; -export * from './guards-context-creator'; diff --git a/node_modules/@nestjs/core/guards/index.js b/node_modules/@nestjs/core/guards/index.js deleted file mode 100644 index 2c55ce2..0000000 --- a/node_modules/@nestjs/core/guards/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./constants"), exports); -tslib_1.__exportStar(require("./guards-consumer"), exports); -tslib_1.__exportStar(require("./guards-context-creator"), exports); diff --git a/node_modules/@nestjs/core/helpers/barrier.d.ts b/node_modules/@nestjs/core/helpers/barrier.d.ts deleted file mode 100644 index c1e7dd3..0000000 --- a/node_modules/@nestjs/core/helpers/barrier.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * A simple barrier to synchronize flow of multiple async operations. - */ -export declare class Barrier { - private currentCount; - private targetCount; - private promise; - private resolve; - constructor(targetCount: number); - /** - * Signal that a participant has reached the barrier. - * - * The barrier will be resolved once `targetCount` participants have reached it. - */ - signal(): void; - /** - * Wait for the barrier to be resolved. - * - * @returns A promise that resolves when the barrier is resolved. - */ - wait(): Promise; - /** - * Signal that a participant has reached the barrier and wait for the barrier to be resolved. - * - * The barrier will be resolved once `targetCount` participants have reached it. - * - * @returns A promise that resolves when the barrier is resolved. - */ - signalAndWait(): Promise; -} diff --git a/node_modules/@nestjs/core/helpers/barrier.js b/node_modules/@nestjs/core/helpers/barrier.js deleted file mode 100644 index 44dec62..0000000 --- a/node_modules/@nestjs/core/helpers/barrier.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Barrier = void 0; -/** - * A simple barrier to synchronize flow of multiple async operations. - */ -class Barrier { - constructor(targetCount) { - this.currentCount = 0; - this.targetCount = targetCount; - this.promise = new Promise(resolve => { - this.resolve = resolve; - }); - } - /** - * Signal that a participant has reached the barrier. - * - * The barrier will be resolved once `targetCount` participants have reached it. - */ - signal() { - this.currentCount += 1; - if (this.currentCount === this.targetCount) { - this.resolve(); - } - } - /** - * Wait for the barrier to be resolved. - * - * @returns A promise that resolves when the barrier is resolved. - */ - async wait() { - return this.promise; - } - /** - * Signal that a participant has reached the barrier and wait for the barrier to be resolved. - * - * The barrier will be resolved once `targetCount` participants have reached it. - * - * @returns A promise that resolves when the barrier is resolved. - */ - async signalAndWait() { - this.signal(); - return this.wait(); - } -} -exports.Barrier = Barrier; diff --git a/node_modules/@nestjs/core/helpers/context-creator.d.ts b/node_modules/@nestjs/core/helpers/context-creator.d.ts deleted file mode 100644 index 198f852..0000000 --- a/node_modules/@nestjs/core/helpers/context-creator.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Controller } from '@nestjs/common/interfaces'; -import { ContextId, InstanceWrapper } from '../injector/instance-wrapper'; -export declare abstract class ContextCreator { - abstract createConcreteContext(metadata: T, contextId?: ContextId, inquirerId?: string): R; - getGlobalMetadata?(contextId?: ContextId, inquirerId?: string): T; - createContext(instance: Controller, callback: (...args: any[]) => void, metadataKey: string, contextId?: ContextId, inquirerId?: string): R; - reflectClassMetadata(instance: Controller, metadataKey: string): T; - reflectMethodMetadata(callback: (...args: unknown[]) => unknown, metadataKey: string): T; - protected getContextId(contextId: ContextId, instanceWrapper: InstanceWrapper): ContextId; -} diff --git a/node_modules/@nestjs/core/helpers/context-creator.js b/node_modules/@nestjs/core/helpers/context-creator.js deleted file mode 100644 index 04b8952..0000000 --- a/node_modules/@nestjs/core/helpers/context-creator.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ContextCreator = void 0; -const constants_1 = require("../injector/constants"); -class ContextCreator { - createContext(instance, callback, metadataKey, contextId = constants_1.STATIC_CONTEXT, inquirerId) { - const globalMetadata = this.getGlobalMetadata && - this.getGlobalMetadata(contextId, inquirerId); - const classMetadata = this.reflectClassMetadata(instance, metadataKey); - const methodMetadata = this.reflectMethodMetadata(callback, metadataKey); - return [ - ...this.createConcreteContext(globalMetadata || [], contextId, inquirerId), - ...this.createConcreteContext(classMetadata, contextId, inquirerId), - ...this.createConcreteContext(methodMetadata, contextId, inquirerId), - ]; - } - reflectClassMetadata(instance, metadataKey) { - const prototype = Object.getPrototypeOf(instance); - return Reflect.getMetadata(metadataKey, prototype.constructor); - } - reflectMethodMetadata(callback, metadataKey) { - return Reflect.getMetadata(metadataKey, callback); - } - getContextId(contextId, instanceWrapper) { - return contextId.getParent - ? contextId.getParent({ - token: instanceWrapper.token, - isTreeDurable: instanceWrapper.isDependencyTreeDurable(), - }) - : contextId; - } -} -exports.ContextCreator = ContextCreator; diff --git a/node_modules/@nestjs/core/helpers/context-id-factory.d.ts b/node_modules/@nestjs/core/helpers/context-id-factory.d.ts deleted file mode 100644 index aa0a951..0000000 --- a/node_modules/@nestjs/core/helpers/context-id-factory.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { ContextId, HostComponentInfo } from '../injector/instance-wrapper'; -export declare function createContextId(): ContextId; -export type ContextIdResolverFn = (info: HostComponentInfo) => ContextId; -export interface ContextIdResolver { - /** - * Payload associated with the custom context id - */ - payload: unknown; - /** - * A context id resolver function - */ - resolve: ContextIdResolverFn; -} -export interface ContextIdStrategy { - /** - * Allows to attach a parent context id to the existing child context id. - * This lets you construct durable DI sub-trees that can be shared between contexts. - * @param contextId auto-generated child context id - * @param request request object - */ - attach(contextId: ContextId, request: T): ContextIdResolverFn | ContextIdResolver | undefined; -} -export declare class ContextIdFactory { - private static strategy?; - /** - * Generates a context identifier based on the request object. - */ - static create(): ContextId; - /** - * Generates a random identifier to track asynchronous execution context. - * @param request request object - */ - static getByRequest = any>(request: T, propsToInspect?: string[]): ContextId; - /** - * Registers a custom context id strategy that lets you attach - * a parent context id to the existing context id object. - * @param strategy strategy instance - */ - static apply(strategy: ContextIdStrategy): void; - private static isContextIdResolverWithPayload; -} diff --git a/node_modules/@nestjs/core/helpers/context-id-factory.js b/node_modules/@nestjs/core/helpers/context-id-factory.js deleted file mode 100644 index 8c1b4ba..0000000 --- a/node_modules/@nestjs/core/helpers/context-id-factory.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ContextIdFactory = void 0; -exports.createContextId = createContextId; -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const request_constants_1 = require("../router/request/request-constants"); -function createContextId() { - /** - * We are generating random identifier to track asynchronous - * execution context. An identifier does not have to be neither unique - * nor unpredictable because WeakMap uses objects as keys (reference comparison). - * Thus, even though identifier number might be equal, WeakMap would properly - * associate asynchronous context with its internal map values using object reference. - * Object is automatically removed once request has been processed (closure). - */ - return { id: Math.random() }; -} -class ContextIdFactory { - /** - * Generates a context identifier based on the request object. - */ - static create() { - return createContextId(); - } - /** - * Generates a random identifier to track asynchronous execution context. - * @param request request object - */ - static getByRequest(request, propsToInspect = ['raw']) { - if (!request) { - return ContextIdFactory.create(); - } - if (request[request_constants_1.REQUEST_CONTEXT_ID]) { - return request[request_constants_1.REQUEST_CONTEXT_ID]; - } - for (const key of propsToInspect) { - if (request[key]?.[request_constants_1.REQUEST_CONTEXT_ID]) { - return request[key][request_constants_1.REQUEST_CONTEXT_ID]; - } - } - if (!this.strategy) { - return ContextIdFactory.create(); - } - const contextId = createContextId(); - const resolverObjectOrFunction = this.strategy.attach(contextId, request); - if (this.isContextIdResolverWithPayload(resolverObjectOrFunction)) { - contextId.getParent = resolverObjectOrFunction.resolve; - contextId.payload = resolverObjectOrFunction.payload; - } - else { - contextId.getParent = resolverObjectOrFunction; - } - return contextId; - } - /** - * Registers a custom context id strategy that lets you attach - * a parent context id to the existing context id object. - * @param strategy strategy instance - */ - static apply(strategy) { - this.strategy = strategy; - } - static isContextIdResolverWithPayload(resolverOrResolverFn) { - return (0, shared_utils_1.isObject)(resolverOrResolverFn); - } -} -exports.ContextIdFactory = ContextIdFactory; diff --git a/node_modules/@nestjs/core/helpers/context-utils.d.ts b/node_modules/@nestjs/core/helpers/context-utils.d.ts deleted file mode 100644 index 191ee4b..0000000 --- a/node_modules/@nestjs/core/helpers/context-utils.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ParamData } from '@nestjs/common'; -import { ContextType, Controller, PipeTransform } from '@nestjs/common/interfaces'; -import { ExecutionContextHost } from './execution-context-host'; -export interface ParamProperties { - index: number; - type: T | string; - data: ParamData; - pipes: PipeTransform[]; - extractValue: IExtractor; -} -export declare class ContextUtils { - mapParamType(key: string): string; - reflectCallbackParamtypes(instance: Controller, methodName: string): any[]; - reflectCallbackMetadata(instance: Controller, methodName: string, metadataKey: string): T; - reflectPassthrough(instance: Controller, methodName: string): boolean; - getArgumentsLength(keys: string[], metadata: T): number; - createNullArray(length: number): any[]; - mergeParamsMetatypes(paramsProperties: ParamProperties[], paramtypes: any[]): (ParamProperties & { - metatype?: any; - })[]; - getCustomFactory(factory: (...args: unknown[]) => void, data: unknown, contextFactory: (args: unknown[]) => ExecutionContextHost): (...args: unknown[]) => unknown; - getContextFactory(contextType: TContext, instance?: object, callback?: Function): (args: unknown[]) => ExecutionContextHost; -} diff --git a/node_modules/@nestjs/core/helpers/context-utils.js b/node_modules/@nestjs/core/helpers/context-utils.js deleted file mode 100644 index 0c74659..0000000 --- a/node_modules/@nestjs/core/helpers/context-utils.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ContextUtils = void 0; -const constants_1 = require("@nestjs/common/constants"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const execution_context_host_1 = require("./execution-context-host"); -class ContextUtils { - mapParamType(key) { - const keyPair = key.split(':'); - return keyPair[0]; - } - reflectCallbackParamtypes(instance, methodName) { - return Reflect.getMetadata(constants_1.PARAMTYPES_METADATA, instance, methodName); - } - reflectCallbackMetadata(instance, methodName, metadataKey) { - return Reflect.getMetadata(metadataKey, instance.constructor, methodName); - } - reflectPassthrough(instance, methodName) { - return Reflect.getMetadata(constants_1.RESPONSE_PASSTHROUGH_METADATA, instance.constructor, methodName); - } - getArgumentsLength(keys, metadata) { - return keys.length - ? Math.max(...keys.map(key => metadata[key].index)) + 1 - : 0; - } - createNullArray(length) { - const a = new Array(length); - for (let i = 0; i < length; ++i) - a[i] = undefined; - return a; - } - mergeParamsMetatypes(paramsProperties, paramtypes) { - if (!paramtypes) { - return paramsProperties; - } - return paramsProperties.map(param => ({ - ...param, - metatype: paramtypes[param.index], - })); - } - getCustomFactory(factory, data, contextFactory) { - return (0, shared_utils_1.isFunction)(factory) - ? (...args) => factory(data, contextFactory(args)) - : () => null; - } - getContextFactory(contextType, instance, callback) { - const type = instance && instance.constructor; - return (args) => { - const ctx = new execution_context_host_1.ExecutionContextHost(args, type, callback); - ctx.setType(contextType); - return ctx; - }; - } -} -exports.ContextUtils = ContextUtils; diff --git a/node_modules/@nestjs/core/helpers/execution-context-host.d.ts b/node_modules/@nestjs/core/helpers/execution-context-host.d.ts deleted file mode 100644 index 15d2b8f..0000000 --- a/node_modules/@nestjs/core/helpers/execution-context-host.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { ExecutionContext } from '@nestjs/common'; -import { Type } from '@nestjs/common/interfaces'; -import { ContextType, HttpArgumentsHost, RpcArgumentsHost, WsArgumentsHost } from '@nestjs/common/interfaces/features/arguments-host.interface'; -export declare class ExecutionContextHost implements ExecutionContext { - private readonly args; - private readonly constructorRef; - private readonly handler; - private contextType; - constructor(args: any[], constructorRef?: Type | null, handler?: Function | null); - setType(type: TContext): void; - getType(): TContext; - getClass(): Type; - getHandler(): Function; - getArgs = any[]>(): T; - getArgByIndex(index: number): T; - switchToRpc(): RpcArgumentsHost; - switchToHttp(): HttpArgumentsHost; - switchToWs(): WsArgumentsHost; -} diff --git a/node_modules/@nestjs/core/helpers/execution-context-host.js b/node_modules/@nestjs/core/helpers/execution-context-host.js deleted file mode 100644 index ec96b9e..0000000 --- a/node_modules/@nestjs/core/helpers/execution-context-host.js +++ /dev/null @@ -1,50 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ExecutionContextHost = void 0; -class ExecutionContextHost { - constructor(args, constructorRef = null, handler = null) { - this.args = args; - this.constructorRef = constructorRef; - this.handler = handler; - this.contextType = 'http'; - } - setType(type) { - type && (this.contextType = type); - } - getType() { - return this.contextType; - } - getClass() { - return this.constructorRef; - } - getHandler() { - return this.handler; - } - getArgs() { - return this.args; - } - getArgByIndex(index) { - return this.args[index]; - } - switchToRpc() { - return Object.assign(this, { - getData: () => this.getArgByIndex(0), - getContext: () => this.getArgByIndex(1), - }); - } - switchToHttp() { - return Object.assign(this, { - getRequest: () => this.getArgByIndex(0), - getResponse: () => this.getArgByIndex(1), - getNext: () => this.getArgByIndex(2), - }); - } - switchToWs() { - return Object.assign(this, { - getClient: () => this.getArgByIndex(0), - getData: () => this.getArgByIndex(1), - getPattern: () => this.getArgByIndex(this.getArgs().length - 1), - }); - } -} -exports.ExecutionContextHost = ExecutionContextHost; diff --git a/node_modules/@nestjs/core/helpers/external-context-creator.d.ts b/node_modules/@nestjs/core/helpers/external-context-creator.d.ts deleted file mode 100644 index dc575d8..0000000 --- a/node_modules/@nestjs/core/helpers/external-context-creator.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { ParamData } from '@nestjs/common'; -import { ContextType, Controller, PipeTransform } from '@nestjs/common/interfaces'; -import { ExternalExceptionFilterContext } from '../exceptions/external-exception-filter-context'; -import { GuardsConsumer, GuardsContextCreator } from '../guards'; -import { NestContainer } from '../injector/container'; -import { ContextId } from '../injector/instance-wrapper'; -import { ModulesContainer } from '../injector/modules-container'; -import { InterceptorsConsumer, InterceptorsContextCreator } from '../interceptors'; -import { PipesConsumer, PipesContextCreator } from '../pipes'; -import { ParamProperties } from './context-utils'; -import { ExternalHandlerMetadata } from './interfaces/external-handler-metadata.interface'; -import { ParamsMetadata } from './interfaces/params-metadata.interface'; -export interface ParamsFactory { - exchangeKeyForValue(type: number, data: ParamData, args: any): any; -} -export interface ExternalContextOptions { - guards?: boolean; - interceptors?: boolean; - filters?: boolean; -} -export declare class ExternalContextCreator { - private readonly guardsContextCreator; - private readonly guardsConsumer; - private readonly interceptorsContextCreator; - private readonly interceptorsConsumer; - private readonly modulesContainer; - private readonly pipesContextCreator; - private readonly pipesConsumer; - private readonly filtersContextCreator; - private readonly contextUtils; - private readonly externalErrorProxy; - private readonly handlerMetadataStorage; - private container; - constructor(guardsContextCreator: GuardsContextCreator, guardsConsumer: GuardsConsumer, interceptorsContextCreator: InterceptorsContextCreator, interceptorsConsumer: InterceptorsConsumer, modulesContainer: ModulesContainer, pipesContextCreator: PipesContextCreator, pipesConsumer: PipesConsumer, filtersContextCreator: ExternalExceptionFilterContext); - static fromContainer(container: NestContainer): ExternalContextCreator; - create(instance: Controller, callback: (...args: unknown[]) => unknown, methodName: string, metadataKey?: string, paramsFactory?: ParamsFactory, contextId?: ContextId, inquirerId?: string, options?: ExternalContextOptions, contextType?: TContext): (...args: any[]) => Promise; - getMetadata(instance: Controller, methodName: string, metadataKey?: string, paramsFactory?: ParamsFactory, contextType?: TContext): ExternalHandlerMetadata; - getContextModuleKey(moduleCtor: Function | undefined): string; - exchangeKeysForValues(keys: string[], metadata: TMetadata, moduleContext: string, paramsFactory: ParamsFactory, contextId?: ContextId, inquirerId?: string, contextFactory?: (args: unknown[]) => import("./execution-context-host").ExecutionContextHost): ParamProperties[]; - createPipesFn(pipes: PipeTransform[], paramsOptions: (ParamProperties & { - metatype?: unknown; - })[]): ((args: unknown[], ...params: unknown[]) => Promise) | null; - getParamValue(value: T, { metatype, type, data }: { - metatype: any; - type: any; - data: any; - }, pipes: PipeTransform[]): Promise; - transformToResult(resultOrDeferred: any): Promise; - createGuardsFn(guards: any[], instance: Controller, callback: (...args: any[]) => any, contextType?: TContext): Function | null; - registerRequestProvider(request: T, contextId: ContextId): void; -} diff --git a/node_modules/@nestjs/core/helpers/external-context-creator.js b/node_modules/@nestjs/core/helpers/external-context-creator.js deleted file mode 100644 index 3ca9d0e..0000000 --- a/node_modules/@nestjs/core/helpers/external-context-creator.js +++ /dev/null @@ -1,166 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ExternalContextCreator = void 0; -const common_1 = require("@nestjs/common"); -const constants_1 = require("@nestjs/common/constants"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const rxjs_1 = require("rxjs"); -const external_exception_filter_context_1 = require("../exceptions/external-exception-filter-context"); -const guards_1 = require("../guards"); -const constants_2 = require("../guards/constants"); -const constants_3 = require("../injector/constants"); -const interceptors_1 = require("../interceptors"); -const pipes_1 = require("../pipes"); -const context_utils_1 = require("./context-utils"); -const external_proxy_1 = require("./external-proxy"); -const handler_metadata_storage_1 = require("./handler-metadata-storage"); -class ExternalContextCreator { - constructor(guardsContextCreator, guardsConsumer, interceptorsContextCreator, interceptorsConsumer, modulesContainer, pipesContextCreator, pipesConsumer, filtersContextCreator) { - this.guardsContextCreator = guardsContextCreator; - this.guardsConsumer = guardsConsumer; - this.interceptorsContextCreator = interceptorsContextCreator; - this.interceptorsConsumer = interceptorsConsumer; - this.modulesContainer = modulesContainer; - this.pipesContextCreator = pipesContextCreator; - this.pipesConsumer = pipesConsumer; - this.filtersContextCreator = filtersContextCreator; - this.contextUtils = new context_utils_1.ContextUtils(); - this.externalErrorProxy = new external_proxy_1.ExternalErrorProxy(); - this.handlerMetadataStorage = new handler_metadata_storage_1.HandlerMetadataStorage(); - } - static fromContainer(container) { - const guardsContextCreator = new guards_1.GuardsContextCreator(container, container.applicationConfig); - const guardsConsumer = new guards_1.GuardsConsumer(); - const interceptorsContextCreator = new interceptors_1.InterceptorsContextCreator(container, container.applicationConfig); - const interceptorsConsumer = new interceptors_1.InterceptorsConsumer(); - const pipesContextCreator = new pipes_1.PipesContextCreator(container, container.applicationConfig); - const pipesConsumer = new pipes_1.PipesConsumer(); - const filtersContextCreator = new external_exception_filter_context_1.ExternalExceptionFilterContext(container, container.applicationConfig); - const externalContextCreator = new ExternalContextCreator(guardsContextCreator, guardsConsumer, interceptorsContextCreator, interceptorsConsumer, container.getModules(), pipesContextCreator, pipesConsumer, filtersContextCreator); - externalContextCreator.container = container; - return externalContextCreator; - } - create(instance, callback, methodName, metadataKey, paramsFactory, contextId = constants_3.STATIC_CONTEXT, inquirerId, options = { - interceptors: true, - guards: true, - filters: true, - }, contextType = 'http') { - const moduleKey = this.getContextModuleKey(instance.constructor); - const { argsLength, paramtypes, getParamsMetadata } = this.getMetadata(instance, methodName, metadataKey, paramsFactory, contextType); - const pipes = this.pipesContextCreator.create(instance, callback, moduleKey, contextId, inquirerId); - const guards = this.guardsContextCreator.create(instance, callback, moduleKey, contextId, inquirerId); - const exceptionFilter = this.filtersContextCreator.create(instance, callback, moduleKey, contextId, inquirerId); - const interceptors = options.interceptors - ? this.interceptorsContextCreator.create(instance, callback, moduleKey, contextId, inquirerId) - : []; - const paramsMetadata = getParamsMetadata(moduleKey, contextId, inquirerId); - const paramsOptions = paramsMetadata - ? this.contextUtils.mergeParamsMetatypes(paramsMetadata, paramtypes) - : []; - const fnCanActivate = options.guards - ? this.createGuardsFn(guards, instance, callback, contextType) - : null; - const fnApplyPipes = this.createPipesFn(pipes, paramsOptions); - const handler = (initialArgs, ...args) => async () => { - if (fnApplyPipes) { - await fnApplyPipes(initialArgs, ...args); - return callback.apply(instance, initialArgs); - } - return callback.apply(instance, args); - }; - const target = async (...args) => { - const initialArgs = this.contextUtils.createNullArray(argsLength); - fnCanActivate && (await fnCanActivate(args)); - const result = await this.interceptorsConsumer.intercept(interceptors, args, instance, callback, handler(initialArgs, ...args), contextType); - return this.transformToResult(result); - }; - return options.filters - ? this.externalErrorProxy.createProxy(target, exceptionFilter, contextType) - : target; - } - getMetadata(instance, methodName, metadataKey, paramsFactory, contextType) { - const cacheMetadata = this.handlerMetadataStorage.get(instance, methodName); - if (cacheMetadata) { - return cacheMetadata; - } - const metadata = this.contextUtils.reflectCallbackMetadata(instance, methodName, metadataKey || '') || {}; - const keys = Object.keys(metadata); - const argsLength = this.contextUtils.getArgumentsLength(keys, metadata); - const paramtypes = this.contextUtils.reflectCallbackParamtypes(instance, methodName); - const contextFactory = this.contextUtils.getContextFactory(contextType, instance, instance[methodName]); - const getParamsMetadata = (moduleKey, contextId = constants_3.STATIC_CONTEXT, inquirerId) => paramsFactory - ? this.exchangeKeysForValues(keys, metadata, moduleKey, paramsFactory, contextId, inquirerId, contextFactory) - : null; - const handlerMetadata = { - argsLength, - paramtypes, - getParamsMetadata: getParamsMetadata, - }; - this.handlerMetadataStorage.set(instance, methodName, handlerMetadata); - return handlerMetadata; - } - getContextModuleKey(moduleCtor) { - const emptyModuleKey = ''; - if (!moduleCtor) { - return emptyModuleKey; - } - const moduleContainerEntries = this.modulesContainer.entries(); - for (const [key, moduleRef] of moduleContainerEntries) { - if (moduleRef.hasProvider(moduleCtor)) { - return key; - } - } - return emptyModuleKey; - } - exchangeKeysForValues(keys, metadata, moduleContext, paramsFactory, contextId = constants_3.STATIC_CONTEXT, inquirerId, contextFactory = this.contextUtils.getContextFactory('http')) { - this.pipesContextCreator.setModuleContext(moduleContext); - return keys.map(key => { - const { index, data, pipes: pipesCollection } = metadata[key]; - const pipes = this.pipesContextCreator.createConcreteContext(pipesCollection, contextId, inquirerId); - const type = this.contextUtils.mapParamType(key); - if (key.includes(constants_1.CUSTOM_ROUTE_ARGS_METADATA)) { - const { factory } = metadata[key]; - const customExtractValue = this.contextUtils.getCustomFactory(factory, data, contextFactory); - return { index, extractValue: customExtractValue, type, data, pipes }; - } - const numericType = Number(type); - const extractValue = (...args) => paramsFactory.exchangeKeyForValue(numericType, data, args); - return { index, extractValue, type: numericType, data, pipes }; - }); - } - createPipesFn(pipes, paramsOptions) { - const pipesFn = async (args, ...params) => { - const resolveParamValue = async (param) => { - const { index, extractValue, type, data, metatype, pipes: paramPipes, } = param; - const value = extractValue(...params); - args[index] = await this.getParamValue(value, { metatype, type, data }, pipes.concat(paramPipes)); - }; - await Promise.all(paramsOptions.map(resolveParamValue)); - }; - return paramsOptions.length ? pipesFn : null; - } - async getParamValue(value, { metatype, type, data }, pipes) { - return (0, shared_utils_1.isEmpty)(pipes) - ? value - : this.pipesConsumer.apply(value, { metatype, type, data }, pipes); - } - async transformToResult(resultOrDeferred) { - if ((0, rxjs_1.isObservable)(resultOrDeferred)) { - return (0, rxjs_1.lastValueFrom)(resultOrDeferred); - } - return resultOrDeferred; - } - createGuardsFn(guards, instance, callback, contextType) { - const canActivateFn = async (args) => { - const canActivate = await this.guardsConsumer.tryActivate(guards, args, instance, callback, contextType); - if (!canActivate) { - throw new common_1.ForbiddenException(constants_2.FORBIDDEN_MESSAGE); - } - }; - return guards.length ? canActivateFn : null; - } - registerRequestProvider(request, contextId) { - this.container.registerRequestProvider(request, contextId); - } -} -exports.ExternalContextCreator = ExternalContextCreator; diff --git a/node_modules/@nestjs/core/helpers/external-proxy.d.ts b/node_modules/@nestjs/core/helpers/external-proxy.d.ts deleted file mode 100644 index d7ffd12..0000000 --- a/node_modules/@nestjs/core/helpers/external-proxy.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ContextType } from '@nestjs/common/interfaces'; -import { ExternalExceptionsHandler } from '../exceptions/external-exceptions-handler'; -export declare class ExternalErrorProxy { - createProxy(targetCallback: (...args: any[]) => any, exceptionsHandler: ExternalExceptionsHandler, type?: TContext): (...args: any[]) => Promise; -} diff --git a/node_modules/@nestjs/core/helpers/external-proxy.js b/node_modules/@nestjs/core/helpers/external-proxy.js deleted file mode 100644 index d66c091..0000000 --- a/node_modules/@nestjs/core/helpers/external-proxy.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ExternalErrorProxy = void 0; -const execution_context_host_1 = require("../helpers/execution-context-host"); -class ExternalErrorProxy { - createProxy(targetCallback, exceptionsHandler, type) { - return async (...args) => { - try { - return await targetCallback(...args); - } - catch (e) { - const host = new execution_context_host_1.ExecutionContextHost(args); - host.setType(type); - return exceptionsHandler.next(e, host); - } - }; - } -} -exports.ExternalErrorProxy = ExternalErrorProxy; diff --git a/node_modules/@nestjs/core/helpers/get-class-scope.d.ts b/node_modules/@nestjs/core/helpers/get-class-scope.d.ts deleted file mode 100644 index 628d47b..0000000 --- a/node_modules/@nestjs/core/helpers/get-class-scope.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { Scope } from '@nestjs/common'; -import { Type } from '@nestjs/common/interfaces/type.interface'; -export declare function getClassScope(provider: Type): Scope; diff --git a/node_modules/@nestjs/core/helpers/get-class-scope.js b/node_modules/@nestjs/core/helpers/get-class-scope.js deleted file mode 100644 index d449718..0000000 --- a/node_modules/@nestjs/core/helpers/get-class-scope.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getClassScope = getClassScope; -const constants_1 = require("@nestjs/common/constants"); -function getClassScope(provider) { - const metadata = Reflect.getMetadata(constants_1.SCOPE_OPTIONS_METADATA, provider); - return metadata && metadata.scope; -} diff --git a/node_modules/@nestjs/core/helpers/handler-metadata-storage.d.ts b/node_modules/@nestjs/core/helpers/handler-metadata-storage.d.ts deleted file mode 100644 index cde187d..0000000 --- a/node_modules/@nestjs/core/helpers/handler-metadata-storage.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Type } from '@nestjs/common/interfaces'; -import { IncomingMessage } from 'http'; -import { Observable } from 'rxjs'; -import { ContextId } from '../injector/instance-wrapper'; -import { HeaderStream } from '../router/sse-stream'; -import { ParamProperties } from './context-utils'; -export declare const HANDLER_METADATA_SYMBOL: unique symbol; -export type HandleResponseFn = HandlerResponseBasicFn | HandleSseResponseFn; -export type HandlerResponseBasicFn = (result: TResult, res: TResponse, req?: any) => any; -export type HandleSseResponseFn = = any, TResponse extends HeaderStream = any, TRequest extends IncomingMessage = any>(result: TResult, res: TResponse, req: TRequest) => any; -export interface HandlerMetadata { - argsLength: number; - paramtypes: any[]; - httpStatusCode: number; - responseHeaders: any[]; - hasCustomHeaders: boolean; - getParamsMetadata: (moduleKey: string, contextId?: ContextId, inquirerId?: string) => (ParamProperties & { - metatype?: any; - })[]; - fnHandleResponse: HandleResponseFn; -} -export declare class HandlerMetadataStorage = any> { - private readonly [HANDLER_METADATA_SYMBOL]; - set(controller: TKey, methodName: string, metadata: TValue): void; - get(controller: TKey, methodName: string): TValue | undefined; - private getMetadataKey; -} diff --git a/node_modules/@nestjs/core/helpers/handler-metadata-storage.js b/node_modules/@nestjs/core/helpers/handler-metadata-storage.js deleted file mode 100644 index a3a4200..0000000 --- a/node_modules/@nestjs/core/helpers/handler-metadata-storage.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -var _a; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.HandlerMetadataStorage = exports.HANDLER_METADATA_SYMBOL = void 0; -const constants_1 = require("../injector/constants"); -exports.HANDLER_METADATA_SYMBOL = Symbol.for('handler_metadata:cache'); -class HandlerMetadataStorage { - constructor() { - this[_a] = new Map(); - } - set(controller, methodName, metadata) { - const metadataKey = this.getMetadataKey(controller, methodName); - this[exports.HANDLER_METADATA_SYMBOL].set(metadataKey, metadata); - } - get(controller, methodName) { - const metadataKey = this.getMetadataKey(controller, methodName); - return this[exports.HANDLER_METADATA_SYMBOL].get(metadataKey); - } - getMetadataKey(controller, methodName) { - const ctor = controller.constructor; - const controllerKey = ctor && (ctor[constants_1.CONTROLLER_ID_KEY] || ctor.name); - return controllerKey + methodName; - } -} -exports.HandlerMetadataStorage = HandlerMetadataStorage; -_a = exports.HANDLER_METADATA_SYMBOL; diff --git a/node_modules/@nestjs/core/helpers/http-adapter-host.d.ts b/node_modules/@nestjs/core/helpers/http-adapter-host.d.ts deleted file mode 100644 index 1150da5..0000000 --- a/node_modules/@nestjs/core/helpers/http-adapter-host.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { Observable } from 'rxjs'; -import { AbstractHttpAdapter } from '../adapters/http-adapter'; -/** - * Defines the `HttpAdapterHost` object. - * - * `HttpAdapterHost` wraps the underlying - * platform-specific `HttpAdapter`. The `HttpAdapter` is a wrapper around the underlying - * native HTTP server library (e.g., Express). The `HttpAdapterHost` object - * provides methods to `get` and `set` the underlying HttpAdapter. - * - * @see [Http adapter](https://docs.nestjs.com/faq/http-adapter) - * - * @publicApi - */ -export declare class HttpAdapterHost { - private _httpAdapter?; - private _listen$; - private _init$; - private isListening; - /** - * Accessor for the underlying `HttpAdapter` - * - * @param httpAdapter reference to the `HttpAdapter` to be set - */ - set httpAdapter(httpAdapter: T); - /** - * Accessor for the underlying `HttpAdapter` - * - * @example - * `const httpAdapter = adapterHost.httpAdapter;` - */ - get httpAdapter(): T; - /** - * Observable that allows to subscribe to the `listen` event. - * This event is emitted when the HTTP application is listening for incoming requests. - */ - get listen$(): Observable; - /** - * Observable that allows to subscribe to the `init` event. - * This event is emitted when the HTTP application is initialized. - */ - get init$(): Observable; - /** - * Sets the listening state of the application. - */ - set listening(listening: boolean); - /** - * Returns a boolean indicating whether the application is listening for incoming requests. - */ - get listening(): boolean; -} diff --git a/node_modules/@nestjs/core/helpers/http-adapter-host.js b/node_modules/@nestjs/core/helpers/http-adapter-host.js deleted file mode 100644 index d75dd75..0000000 --- a/node_modules/@nestjs/core/helpers/http-adapter-host.js +++ /dev/null @@ -1,73 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.HttpAdapterHost = void 0; -const rxjs_1 = require("rxjs"); -/** - * Defines the `HttpAdapterHost` object. - * - * `HttpAdapterHost` wraps the underlying - * platform-specific `HttpAdapter`. The `HttpAdapter` is a wrapper around the underlying - * native HTTP server library (e.g., Express). The `HttpAdapterHost` object - * provides methods to `get` and `set` the underlying HttpAdapter. - * - * @see [Http adapter](https://docs.nestjs.com/faq/http-adapter) - * - * @publicApi - */ -class HttpAdapterHost { - constructor() { - this._listen$ = new rxjs_1.Subject(); - this._init$ = new rxjs_1.ReplaySubject(); - this.isListening = false; - } - /** - * Accessor for the underlying `HttpAdapter` - * - * @param httpAdapter reference to the `HttpAdapter` to be set - */ - set httpAdapter(httpAdapter) { - this._httpAdapter = httpAdapter; - this._init$.next(); - this._init$.complete(); - } - /** - * Accessor for the underlying `HttpAdapter` - * - * @example - * `const httpAdapter = adapterHost.httpAdapter;` - */ - get httpAdapter() { - return this._httpAdapter; - } - /** - * Observable that allows to subscribe to the `listen` event. - * This event is emitted when the HTTP application is listening for incoming requests. - */ - get listen$() { - return this._listen$.asObservable(); - } - /** - * Observable that allows to subscribe to the `init` event. - * This event is emitted when the HTTP application is initialized. - */ - get init$() { - return this._init$.asObservable(); - } - /** - * Sets the listening state of the application. - */ - set listening(listening) { - this.isListening = listening; - if (listening) { - this._listen$.next(); - this._listen$.complete(); - } - } - /** - * Returns a boolean indicating whether the application is listening for incoming requests. - */ - get listening() { - return this.isListening; - } -} -exports.HttpAdapterHost = HttpAdapterHost; diff --git a/node_modules/@nestjs/core/helpers/index.d.ts b/node_modules/@nestjs/core/helpers/index.d.ts deleted file mode 100644 index 76f8546..0000000 --- a/node_modules/@nestjs/core/helpers/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './context-id-factory'; -export * from './external-context-creator'; -export * from './http-adapter-host'; diff --git a/node_modules/@nestjs/core/helpers/index.js b/node_modules/@nestjs/core/helpers/index.js deleted file mode 100644 index 38ef85e..0000000 --- a/node_modules/@nestjs/core/helpers/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./context-id-factory"), exports); -tslib_1.__exportStar(require("./external-context-creator"), exports); -tslib_1.__exportStar(require("./http-adapter-host"), exports); diff --git a/node_modules/@nestjs/core/helpers/interfaces/external-handler-metadata.interface.d.ts b/node_modules/@nestjs/core/helpers/interfaces/external-handler-metadata.interface.d.ts deleted file mode 100644 index 682411b..0000000 --- a/node_modules/@nestjs/core/helpers/interfaces/external-handler-metadata.interface.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ContextId } from '../../injector'; -import { ParamProperties } from '../context-utils'; -type ParamPropertiesWithMetatype = ParamProperties & { - metatype?: T; -}; -export interface ExternalHandlerMetadata { - argsLength: number; - paramtypes: any[]; - getParamsMetadata: (moduleKey: string, contextId?: ContextId, inquirerId?: string) => ParamPropertiesWithMetatype[]; -} -export {}; diff --git a/node_modules/@nestjs/core/helpers/interfaces/external-handler-metadata.interface.js b/node_modules/@nestjs/core/helpers/interfaces/external-handler-metadata.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/core/helpers/interfaces/external-handler-metadata.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/core/helpers/interfaces/index.d.ts b/node_modules/@nestjs/core/helpers/interfaces/index.d.ts deleted file mode 100644 index 85e6252..0000000 --- a/node_modules/@nestjs/core/helpers/interfaces/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './external-handler-metadata.interface'; -export * from './params-metadata.interface'; diff --git a/node_modules/@nestjs/core/helpers/interfaces/index.js b/node_modules/@nestjs/core/helpers/interfaces/index.js deleted file mode 100644 index fac61f9..0000000 --- a/node_modules/@nestjs/core/helpers/interfaces/index.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./external-handler-metadata.interface"), exports); -tslib_1.__exportStar(require("./params-metadata.interface"), exports); diff --git a/node_modules/@nestjs/core/helpers/interfaces/params-metadata.interface.d.ts b/node_modules/@nestjs/core/helpers/interfaces/params-metadata.interface.d.ts deleted file mode 100644 index d39802c..0000000 --- a/node_modules/@nestjs/core/helpers/interfaces/params-metadata.interface.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ParamData } from '@nestjs/common'; -export type ParamsMetadata = Record; -export interface ParamMetadata { - index: number; - data?: ParamData; -} diff --git a/node_modules/@nestjs/core/helpers/interfaces/params-metadata.interface.js b/node_modules/@nestjs/core/helpers/interfaces/params-metadata.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/core/helpers/interfaces/params-metadata.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/core/helpers/is-durable.d.ts b/node_modules/@nestjs/core/helpers/is-durable.d.ts deleted file mode 100644 index d480507..0000000 --- a/node_modules/@nestjs/core/helpers/is-durable.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Type } from '@nestjs/common/interfaces/type.interface'; -export declare function isDurable(provider: Type): boolean | undefined; diff --git a/node_modules/@nestjs/core/helpers/is-durable.js b/node_modules/@nestjs/core/helpers/is-durable.js deleted file mode 100644 index b25d84f..0000000 --- a/node_modules/@nestjs/core/helpers/is-durable.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isDurable = isDurable; -const constants_1 = require("@nestjs/common/constants"); -function isDurable(provider) { - const metadata = Reflect.getMetadata(constants_1.SCOPE_OPTIONS_METADATA, provider); - return metadata && metadata.durable; -} diff --git a/node_modules/@nestjs/core/helpers/load-adapter.d.ts b/node_modules/@nestjs/core/helpers/load-adapter.d.ts deleted file mode 100644 index 8c8b452..0000000 --- a/node_modules/@nestjs/core/helpers/load-adapter.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function loadAdapter(defaultPlatform: string, transport: string, loaderFn?: Function): any; diff --git a/node_modules/@nestjs/core/helpers/load-adapter.js b/node_modules/@nestjs/core/helpers/load-adapter.js deleted file mode 100644 index cc6224e..0000000 --- a/node_modules/@nestjs/core/helpers/load-adapter.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.loadAdapter = loadAdapter; -const common_1 = require("@nestjs/common"); -const MISSING_REQUIRED_DEPENDENCY = (defaultPlatform, transport) => `No driver (${transport}) has been selected. In order to take advantage of the default driver, please, ensure to install the "${defaultPlatform}" package ($ npm install ${defaultPlatform}).`; -const logger = new common_1.Logger('PackageLoader'); -function loadAdapter(defaultPlatform, transport, loaderFn) { - try { - return loaderFn ? loaderFn() : require(defaultPlatform); - } - catch (e) { - logger.error(MISSING_REQUIRED_DEPENDENCY(defaultPlatform, transport)); - process.exit(1); - } -} diff --git a/node_modules/@nestjs/core/helpers/messages.d.ts b/node_modules/@nestjs/core/helpers/messages.d.ts deleted file mode 100644 index 9f91f97..0000000 --- a/node_modules/@nestjs/core/helpers/messages.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { VersionValue } from '@nestjs/common/interfaces/version-options.interface'; -export declare const MODULE_INIT_MESSAGE: (text: TemplateStringsArray, module: string) => string; -export declare const ROUTE_MAPPED_MESSAGE: (path: string, method: string | number) => string; -export declare const VERSIONED_ROUTE_MAPPED_MESSAGE: (path: string, method: string | number, version: VersionValue) => string; -export declare const CONTROLLER_MAPPING_MESSAGE: (name: string, path: string) => string; -export declare const VERSIONED_CONTROLLER_MAPPING_MESSAGE: (name: string, path: string, version: VersionValue) => string; -export declare const INVALID_EXECUTION_CONTEXT: (methodName: string, currentContext: string) => string; diff --git a/node_modules/@nestjs/core/helpers/messages.js b/node_modules/@nestjs/core/helpers/messages.js deleted file mode 100644 index 6c00ed9..0000000 --- a/node_modules/@nestjs/core/helpers/messages.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.INVALID_EXECUTION_CONTEXT = exports.VERSIONED_CONTROLLER_MAPPING_MESSAGE = exports.CONTROLLER_MAPPING_MESSAGE = exports.VERSIONED_ROUTE_MAPPED_MESSAGE = exports.ROUTE_MAPPED_MESSAGE = exports.MODULE_INIT_MESSAGE = void 0; -const request_method_enum_1 = require("@nestjs/common/enums/request-method.enum"); -const version_options_interface_1 = require("@nestjs/common/interfaces/version-options.interface"); -const MODULE_INIT_MESSAGE = (text, module) => `${module} dependencies initialized`; -exports.MODULE_INIT_MESSAGE = MODULE_INIT_MESSAGE; -const ROUTE_MAPPED_MESSAGE = (path, method) => `Mapped {${path}, ${request_method_enum_1.RequestMethod[method]}} route`; -exports.ROUTE_MAPPED_MESSAGE = ROUTE_MAPPED_MESSAGE; -const VERSIONED_ROUTE_MAPPED_MESSAGE = (path, method, version) => { - const controllerVersions = Array.isArray(version) ? version : [version]; - const versions = controllerVersions - .map(version => (version === version_options_interface_1.VERSION_NEUTRAL ? 'Neutral' : version)) - .join(','); - return `Mapped {${path}, ${request_method_enum_1.RequestMethod[method]}} (version: ${versions}) route`; -}; -exports.VERSIONED_ROUTE_MAPPED_MESSAGE = VERSIONED_ROUTE_MAPPED_MESSAGE; -const CONTROLLER_MAPPING_MESSAGE = (name, path) => `${name} {${path}}:`; -exports.CONTROLLER_MAPPING_MESSAGE = CONTROLLER_MAPPING_MESSAGE; -const VERSIONED_CONTROLLER_MAPPING_MESSAGE = (name, path, version) => { - const controllerVersions = Array.isArray(version) ? version : [version]; - const versions = controllerVersions - .map(version => (version === version_options_interface_1.VERSION_NEUTRAL ? 'Neutral' : version)) - .join(','); - return `${name} {${path}} (version: ${versions}):`; -}; -exports.VERSIONED_CONTROLLER_MAPPING_MESSAGE = VERSIONED_CONTROLLER_MAPPING_MESSAGE; -const INVALID_EXECUTION_CONTEXT = (methodName, currentContext) => `Calling ${methodName} is not allowed in this context. Your current execution context is "${currentContext}".`; -exports.INVALID_EXECUTION_CONTEXT = INVALID_EXECUTION_CONTEXT; diff --git a/node_modules/@nestjs/core/helpers/optional-require.d.ts b/node_modules/@nestjs/core/helpers/optional-require.d.ts deleted file mode 100644 index a590eb8..0000000 --- a/node_modules/@nestjs/core/helpers/optional-require.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function optionalRequire(packageName: string, loaderFn?: Function): any; diff --git a/node_modules/@nestjs/core/helpers/optional-require.js b/node_modules/@nestjs/core/helpers/optional-require.js deleted file mode 100644 index f6af572..0000000 --- a/node_modules/@nestjs/core/helpers/optional-require.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.optionalRequire = optionalRequire; -function optionalRequire(packageName, loaderFn) { - try { - return loaderFn ? loaderFn() : require(packageName); - } - catch (e) { - return {}; - } -} diff --git a/node_modules/@nestjs/core/helpers/rethrow.d.ts b/node_modules/@nestjs/core/helpers/rethrow.d.ts deleted file mode 100644 index 605d5de..0000000 --- a/node_modules/@nestjs/core/helpers/rethrow.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const rethrow: (err: unknown) => never; diff --git a/node_modules/@nestjs/core/helpers/rethrow.js b/node_modules/@nestjs/core/helpers/rethrow.js deleted file mode 100644 index 835cf24..0000000 --- a/node_modules/@nestjs/core/helpers/rethrow.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.rethrow = void 0; -const rethrow = (err) => { - throw err; -}; -exports.rethrow = rethrow; diff --git a/node_modules/@nestjs/core/helpers/router-method-factory.d.ts b/node_modules/@nestjs/core/helpers/router-method-factory.d.ts deleted file mode 100644 index b4ae38c..0000000 --- a/node_modules/@nestjs/core/helpers/router-method-factory.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { HttpServer } from '@nestjs/common'; -import { RequestMethod } from '@nestjs/common/enums/request-method.enum'; -export declare const REQUEST_METHOD_MAP: { - readonly 0: "get"; - readonly 1: "post"; - readonly 2: "put"; - readonly 3: "delete"; - readonly 4: "patch"; - readonly 5: "all"; - readonly 6: "options"; - readonly 7: "head"; - readonly 8: "search"; - readonly 9: "propfind"; - readonly 10: "proppatch"; - readonly 11: "mkcol"; - readonly 12: "copy"; - readonly 13: "move"; - readonly 14: "lock"; - readonly 15: "unlock"; -}; -export declare class RouterMethodFactory { - get(target: HttpServer, requestMethod: RequestMethod): Function; -} diff --git a/node_modules/@nestjs/core/helpers/router-method-factory.js b/node_modules/@nestjs/core/helpers/router-method-factory.js deleted file mode 100644 index 4d8516c..0000000 --- a/node_modules/@nestjs/core/helpers/router-method-factory.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RouterMethodFactory = exports.REQUEST_METHOD_MAP = void 0; -const request_method_enum_1 = require("@nestjs/common/enums/request-method.enum"); -exports.REQUEST_METHOD_MAP = { - [request_method_enum_1.RequestMethod.GET]: 'get', - [request_method_enum_1.RequestMethod.POST]: 'post', - [request_method_enum_1.RequestMethod.PUT]: 'put', - [request_method_enum_1.RequestMethod.DELETE]: 'delete', - [request_method_enum_1.RequestMethod.PATCH]: 'patch', - [request_method_enum_1.RequestMethod.ALL]: 'all', - [request_method_enum_1.RequestMethod.OPTIONS]: 'options', - [request_method_enum_1.RequestMethod.HEAD]: 'head', - [request_method_enum_1.RequestMethod.SEARCH]: 'search', - [request_method_enum_1.RequestMethod.PROPFIND]: 'propfind', - [request_method_enum_1.RequestMethod.PROPPATCH]: 'proppatch', - [request_method_enum_1.RequestMethod.MKCOL]: 'mkcol', - [request_method_enum_1.RequestMethod.COPY]: 'copy', - [request_method_enum_1.RequestMethod.MOVE]: 'move', - [request_method_enum_1.RequestMethod.LOCK]: 'lock', - [request_method_enum_1.RequestMethod.UNLOCK]: 'unlock', -}; -class RouterMethodFactory { - get(target, requestMethod) { - const methodName = exports.REQUEST_METHOD_MAP[requestMethod]; - const method = target[methodName]; - if (!method) { - return target.use; - } - return method; - } -} -exports.RouterMethodFactory = RouterMethodFactory; diff --git a/node_modules/@nestjs/core/hooks/before-app-shutdown.hook.d.ts b/node_modules/@nestjs/core/hooks/before-app-shutdown.hook.d.ts deleted file mode 100644 index 03f9750..0000000 --- a/node_modules/@nestjs/core/hooks/before-app-shutdown.hook.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Module } from '../injector/module'; -/** - * Calls the `beforeApplicationShutdown` function on the module and its children - * (providers / controllers). - * - * @param module The module which will be initialized - * @param signal The signal which caused the shutdown - */ -export declare function callBeforeAppShutdownHook(module: Module, signal?: string): Promise; diff --git a/node_modules/@nestjs/core/hooks/before-app-shutdown.hook.js b/node_modules/@nestjs/core/hooks/before-app-shutdown.hook.js deleted file mode 100644 index 5c5e531..0000000 --- a/node_modules/@nestjs/core/hooks/before-app-shutdown.hook.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.callBeforeAppShutdownHook = callBeforeAppShutdownHook; -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const iterare_1 = require("iterare"); -const transient_instances_1 = require("../injector/helpers/transient-instances"); -/** - * Checks if the given instance has the `beforeApplicationShutdown` function - * - * @param instance The instance which should be checked - */ -function hasBeforeApplicationShutdownHook(instance) { - return (0, shared_utils_1.isFunction)(instance.beforeApplicationShutdown); -} -/** - * Calls the given instances - */ -function callOperator(instances, signal) { - return (0, iterare_1.iterate)(instances) - .filter(instance => !(0, shared_utils_1.isNil)(instance)) - .filter(hasBeforeApplicationShutdownHook) - .map(async (instance) => instance.beforeApplicationShutdown(signal)) - .toArray(); -} -/** - * Calls the `beforeApplicationShutdown` function on the module and its children - * (providers / controllers). - * - * @param module The module which will be initialized - * @param signal The signal which caused the shutdown - */ -async function callBeforeAppShutdownHook(module, signal) { - const providers = module.getNonAliasProviders(); - const [_, moduleClassHost] = providers.shift(); - const instances = [ - ...module.controllers, - ...providers, - ...module.injectables, - ...module.middlewares, - ]; - const nonTransientInstances = (0, transient_instances_1.getNonTransientInstances)(instances); - await Promise.all(callOperator(nonTransientInstances, signal)); - const transientInstances = (0, transient_instances_1.getTransientInstances)(instances); - await Promise.all(callOperator(transientInstances, signal)); - const moduleClassInstance = moduleClassHost.instance; - if (moduleClassInstance && - hasBeforeApplicationShutdownHook(moduleClassInstance) && - moduleClassHost.isDependencyTreeStatic()) { - await moduleClassInstance.beforeApplicationShutdown(signal); - } -} diff --git a/node_modules/@nestjs/core/hooks/index.d.ts b/node_modules/@nestjs/core/hooks/index.d.ts deleted file mode 100644 index 0e7a3ac..0000000 --- a/node_modules/@nestjs/core/hooks/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './on-app-bootstrap.hook'; -export * from './on-app-shutdown.hook'; -export * from './on-module-destroy.hook'; -export * from './on-module-init.hook'; -export * from './before-app-shutdown.hook'; diff --git a/node_modules/@nestjs/core/hooks/index.js b/node_modules/@nestjs/core/hooks/index.js deleted file mode 100644 index 7815545..0000000 --- a/node_modules/@nestjs/core/hooks/index.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./on-app-bootstrap.hook"), exports); -tslib_1.__exportStar(require("./on-app-shutdown.hook"), exports); -tslib_1.__exportStar(require("./on-module-destroy.hook"), exports); -tslib_1.__exportStar(require("./on-module-init.hook"), exports); -tslib_1.__exportStar(require("./before-app-shutdown.hook"), exports); diff --git a/node_modules/@nestjs/core/hooks/on-app-bootstrap.hook.d.ts b/node_modules/@nestjs/core/hooks/on-app-bootstrap.hook.d.ts deleted file mode 100644 index be4783a..0000000 --- a/node_modules/@nestjs/core/hooks/on-app-bootstrap.hook.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Module } from '../injector/module'; -/** - * Calls the `onApplicationBootstrap` function on the module and its children - * (providers / controllers). - * - * @param module The module which will be initialized - */ -export declare function callModuleBootstrapHook(module: Module): Promise; diff --git a/node_modules/@nestjs/core/hooks/on-app-bootstrap.hook.js b/node_modules/@nestjs/core/hooks/on-app-bootstrap.hook.js deleted file mode 100644 index 827a90b..0000000 --- a/node_modules/@nestjs/core/hooks/on-app-bootstrap.hook.js +++ /dev/null @@ -1,53 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.callModuleBootstrapHook = callModuleBootstrapHook; -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const iterare_1 = require("iterare"); -const transient_instances_1 = require("../injector/helpers/transient-instances"); -/** - * Checks if the given instance has the `onApplicationBootstrap` function - * - * @param instance The instance which should be checked - */ -function hasOnAppBootstrapHook(instance) { - return (0, shared_utils_1.isFunction)(instance.onApplicationBootstrap); -} -/** - * Calls the given instances - */ -function callOperator(instances) { - return (0, iterare_1.iterate)(instances) - .filter(instance => !(0, shared_utils_1.isNil)(instance)) - .filter(hasOnAppBootstrapHook) - .map(async (instance) => instance.onApplicationBootstrap()) - .toArray(); -} -/** - * Calls the `onApplicationBootstrap` function on the module and its children - * (providers / controllers). - * - * @param module The module which will be initialized - */ -async function callModuleBootstrapHook(module) { - const providers = module.getNonAliasProviders(); - // Module (class) instance is the first element of the providers array - // Lifecycle hook has to be called once all classes are properly initialized - const [_, moduleClassHost] = providers.shift(); - const instances = [ - ...module.controllers, - ...providers, - ...module.injectables, - ...module.middlewares, - ]; - const nonTransientInstances = (0, transient_instances_1.getNonTransientInstances)(instances); - await Promise.all(callOperator(nonTransientInstances)); - const transientInstances = (0, transient_instances_1.getTransientInstances)(instances); - await Promise.all(callOperator(transientInstances)); - // Call the instance itself - const moduleClassInstance = moduleClassHost.instance; - if (moduleClassInstance && - hasOnAppBootstrapHook(moduleClassInstance) && - moduleClassHost.isDependencyTreeStatic()) { - await moduleClassInstance.onApplicationBootstrap(); - } -} diff --git a/node_modules/@nestjs/core/hooks/on-app-shutdown.hook.d.ts b/node_modules/@nestjs/core/hooks/on-app-shutdown.hook.d.ts deleted file mode 100644 index 847d253..0000000 --- a/node_modules/@nestjs/core/hooks/on-app-shutdown.hook.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Module } from '../injector/module'; -/** - * Calls the `onApplicationShutdown` function on the module and its children - * (providers / controllers). - * - * @param module The module which will be initialized - * @param signal - */ -export declare function callAppShutdownHook(module: Module, signal?: string): Promise; diff --git a/node_modules/@nestjs/core/hooks/on-app-shutdown.hook.js b/node_modules/@nestjs/core/hooks/on-app-shutdown.hook.js deleted file mode 100644 index 3c3cd1f..0000000 --- a/node_modules/@nestjs/core/hooks/on-app-shutdown.hook.js +++ /dev/null @@ -1,54 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.callAppShutdownHook = callAppShutdownHook; -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const iterare_1 = require("iterare"); -const transient_instances_1 = require("../injector/helpers/transient-instances"); -/** - * Checks if the given instance has the `onApplicationShutdown` function - * - * @param instance The instance which should be checked - */ -function hasOnAppShutdownHook(instance) { - return (0, shared_utils_1.isFunction)(instance.onApplicationShutdown); -} -/** - * Calls the given instances - */ -function callOperator(instances, signal) { - return (0, iterare_1.iterate)(instances) - .filter(instance => !(0, shared_utils_1.isNil)(instance)) - .filter(hasOnAppShutdownHook) - .map(async (instance) => instance.onApplicationShutdown(signal)) - .toArray(); -} -/** - * Calls the `onApplicationShutdown` function on the module and its children - * (providers / controllers). - * - * @param module The module which will be initialized - * @param signal - */ -async function callAppShutdownHook(module, signal) { - const providers = module.getNonAliasProviders(); - // Module (class) instance is the first element of the providers array - // Lifecycle hook has to be called once all classes are properly initialized - const [_, moduleClassHost] = providers.shift(); - const instances = [ - ...module.controllers, - ...providers, - ...module.injectables, - ...module.middlewares, - ]; - const nonTransientInstances = (0, transient_instances_1.getNonTransientInstances)(instances); - await Promise.all(callOperator(nonTransientInstances, signal)); - const transientInstances = (0, transient_instances_1.getTransientInstances)(instances); - await Promise.all(callOperator(transientInstances, signal)); - // Call the instance itself - const moduleClassInstance = moduleClassHost.instance; - if (moduleClassInstance && - hasOnAppShutdownHook(moduleClassInstance) && - moduleClassHost.isDependencyTreeStatic()) { - await moduleClassInstance.onApplicationShutdown(signal); - } -} diff --git a/node_modules/@nestjs/core/hooks/on-module-destroy.hook.d.ts b/node_modules/@nestjs/core/hooks/on-module-destroy.hook.d.ts deleted file mode 100644 index 10a9668..0000000 --- a/node_modules/@nestjs/core/hooks/on-module-destroy.hook.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Module } from '../injector/module'; -/** - * Calls the `onModuleDestroy` function on the module and its children - * (providers / controllers). - * - * @param module The module which will be initialized - */ -export declare function callModuleDestroyHook(module: Module): Promise; diff --git a/node_modules/@nestjs/core/hooks/on-module-destroy.hook.js b/node_modules/@nestjs/core/hooks/on-module-destroy.hook.js deleted file mode 100644 index fddd328..0000000 --- a/node_modules/@nestjs/core/hooks/on-module-destroy.hook.js +++ /dev/null @@ -1,53 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.callModuleDestroyHook = callModuleDestroyHook; -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const iterare_1 = require("iterare"); -const transient_instances_1 = require("../injector/helpers/transient-instances"); -/** - * Returns true or false if the given instance has a `onModuleDestroy` function - * - * @param instance The instance which should be checked - */ -function hasOnModuleDestroyHook(instance) { - return (0, shared_utils_1.isFunction)(instance.onModuleDestroy); -} -/** - * Calls the given instances onModuleDestroy hook - */ -function callOperator(instances) { - return (0, iterare_1.iterate)(instances) - .filter(instance => !(0, shared_utils_1.isNil)(instance)) - .filter(hasOnModuleDestroyHook) - .map(async (instance) => instance.onModuleDestroy()) - .toArray(); -} -/** - * Calls the `onModuleDestroy` function on the module and its children - * (providers / controllers). - * - * @param module The module which will be initialized - */ -async function callModuleDestroyHook(module) { - const providers = module.getNonAliasProviders(); - // Module (class) instance is the first element of the providers array - // Lifecycle hook has to be called once all classes are properly destroyed - const [_, moduleClassHost] = providers.shift(); - const instances = [ - ...module.controllers, - ...providers, - ...module.injectables, - ...module.middlewares, - ]; - const nonTransientInstances = (0, transient_instances_1.getNonTransientInstances)(instances); - await Promise.all(callOperator(nonTransientInstances)); - const transientInstances = (0, transient_instances_1.getTransientInstances)(instances); - await Promise.all(callOperator(transientInstances)); - // Call the module instance itself - const moduleClassInstance = moduleClassHost.instance; - if (moduleClassInstance && - hasOnModuleDestroyHook(moduleClassInstance) && - moduleClassHost.isDependencyTreeStatic()) { - await moduleClassInstance.onModuleDestroy(); - } -} diff --git a/node_modules/@nestjs/core/hooks/on-module-init.hook.d.ts b/node_modules/@nestjs/core/hooks/on-module-init.hook.d.ts deleted file mode 100644 index 2d9ef37..0000000 --- a/node_modules/@nestjs/core/hooks/on-module-init.hook.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Module } from '../injector/module'; -/** - * Calls the `onModuleInit` function on the module and its children - * (providers / controllers). - * - * @param module The module which will be initialized - */ -export declare function callModuleInitHook(module: Module): Promise; diff --git a/node_modules/@nestjs/core/hooks/on-module-init.hook.js b/node_modules/@nestjs/core/hooks/on-module-init.hook.js deleted file mode 100644 index 53f94b1..0000000 --- a/node_modules/@nestjs/core/hooks/on-module-init.hook.js +++ /dev/null @@ -1,53 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.callModuleInitHook = callModuleInitHook; -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const iterare_1 = require("iterare"); -const transient_instances_1 = require("../injector/helpers/transient-instances"); -/** - * Returns true or false if the given instance has a `onModuleInit` function - * - * @param instance The instance which should be checked - */ -function hasOnModuleInitHook(instance) { - return (0, shared_utils_1.isFunction)(instance.onModuleInit); -} -/** - * Calls the given instances - */ -function callOperator(instances) { - return (0, iterare_1.iterate)(instances) - .filter(instance => !(0, shared_utils_1.isNil)(instance)) - .filter(hasOnModuleInitHook) - .map(async (instance) => instance.onModuleInit()) - .toArray(); -} -/** - * Calls the `onModuleInit` function on the module and its children - * (providers / controllers). - * - * @param module The module which will be initialized - */ -async function callModuleInitHook(module) { - const providers = module.getNonAliasProviders(); - // Module (class) instance is the first element of the providers array - // Lifecycle hook has to be called once all classes are properly initialized - const [_, moduleClassHost] = providers.shift(); - const instances = [ - ...module.controllers, - ...providers, - ...module.injectables, - ...module.middlewares, - ]; - const nonTransientInstances = (0, transient_instances_1.getNonTransientInstances)(instances); - await Promise.all(callOperator(nonTransientInstances)); - const transientInstances = (0, transient_instances_1.getTransientInstances)(instances); - await Promise.all(callOperator(transientInstances)); - // Call the instance itself - const moduleClassInstance = moduleClassHost.instance; - if (moduleClassInstance && - hasOnModuleInitHook(moduleClassInstance) && - moduleClassHost.isDependencyTreeStatic()) { - await moduleClassInstance.onModuleInit(); - } -} diff --git a/node_modules/@nestjs/core/hooks/utils/get-instances-grouped-by-hierarchy-level.d.ts b/node_modules/@nestjs/core/hooks/utils/get-instances-grouped-by-hierarchy-level.d.ts deleted file mode 100644 index 4fff474..0000000 --- a/node_modules/@nestjs/core/hooks/utils/get-instances-grouped-by-hierarchy-level.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { InjectionToken } from '@nestjs/common'; -import { InstanceWrapper } from '../../injector/instance-wrapper.js'; -export declare function getInstancesGroupedByHierarchyLevel(...collections: Array | Array<[InjectionToken, InstanceWrapper]>>): Map; diff --git a/node_modules/@nestjs/core/hooks/utils/get-instances-grouped-by-hierarchy-level.js b/node_modules/@nestjs/core/hooks/utils/get-instances-grouped-by-hierarchy-level.js deleted file mode 100644 index e2f699b..0000000 --- a/node_modules/@nestjs/core/hooks/utils/get-instances-grouped-by-hierarchy-level.js +++ /dev/null @@ -1,27 +0,0 @@ -export function getInstancesGroupedByHierarchyLevel(...collections) { - const groupedByHierarchyLevel = new Map(); - for (const collection of collections) { - for (const [_, wrapper] of collection) { - if (!wrapper.isDependencyTreeStatic()) { - continue; - } - const level = wrapper.hierarchyLevel; - if (!groupedByHierarchyLevel.has(level)) { - groupedByHierarchyLevel.set(level, []); - } - const byHierarchyLevelGroup = groupedByHierarchyLevel.get(level); - if (wrapper.isTransient) { - const staticTransientInstances = wrapper - .getStaticTransientInstances() - .filter(i => !!i) - .map(i => i.instance); - byHierarchyLevelGroup.push(...staticTransientInstances); - continue; - } - if (wrapper.instance) { - byHierarchyLevelGroup.push(wrapper.instance); - } - } - } - return groupedByHierarchyLevel; -} diff --git a/node_modules/@nestjs/core/hooks/utils/get-sorted-hierarchy-levels.d.ts b/node_modules/@nestjs/core/hooks/utils/get-sorted-hierarchy-levels.d.ts deleted file mode 100644 index 9755476..0000000 --- a/node_modules/@nestjs/core/hooks/utils/get-sorted-hierarchy-levels.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function getSortedHierarchyLevels(groups: Map, order?: 'ASC' | 'DESC'): number[]; diff --git a/node_modules/@nestjs/core/hooks/utils/get-sorted-hierarchy-levels.js b/node_modules/@nestjs/core/hooks/utils/get-sorted-hierarchy-levels.js deleted file mode 100644 index 7257668..0000000 --- a/node_modules/@nestjs/core/hooks/utils/get-sorted-hierarchy-levels.js +++ /dev/null @@ -1,7 +0,0 @@ -export function getSortedHierarchyLevels(groups, order = 'ASC') { - const comparator = order === 'ASC' - ? (a, b) => a - b - : (a, b) => b - a; - const levels = Array.from(groups.keys()).sort(comparator); - return levels; -} diff --git a/node_modules/@nestjs/core/index.d.ts b/node_modules/@nestjs/core/index.d.ts deleted file mode 100644 index 42f3543..0000000 --- a/node_modules/@nestjs/core/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import 'reflect-metadata'; -export * from './adapters'; -export * from './application-config'; -export { APP_FILTER, APP_GUARD, APP_INTERCEPTOR, APP_PIPE } from './constants'; -export * from './discovery'; -export * from './exceptions'; -export * from './helpers'; -export * from './injector'; -export * from './inspector'; -export * from './metadata-scanner'; -export * from './middleware'; -export * from './nest-application'; -export * from './nest-application-context'; -export { NestFactory } from './nest-factory'; -export * from './repl'; -export * from './router'; -export * from './services'; diff --git a/node_modules/@nestjs/core/index.js b/node_modules/@nestjs/core/index.js deleted file mode 100644 index 18fcb8b..0000000 --- a/node_modules/@nestjs/core/index.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NestFactory = exports.APP_PIPE = exports.APP_INTERCEPTOR = exports.APP_GUARD = exports.APP_FILTER = void 0; -const tslib_1 = require("tslib"); -/* - * Nest @core - * Copyright(c) 2017 - 2025 Kamil Mysliwiec - * https://nestjs.com - * MIT Licensed - */ -require("reflect-metadata"); -tslib_1.__exportStar(require("./adapters"), exports); -tslib_1.__exportStar(require("./application-config"), exports); -var constants_1 = require("./constants"); -Object.defineProperty(exports, "APP_FILTER", { enumerable: true, get: function () { return constants_1.APP_FILTER; } }); -Object.defineProperty(exports, "APP_GUARD", { enumerable: true, get: function () { return constants_1.APP_GUARD; } }); -Object.defineProperty(exports, "APP_INTERCEPTOR", { enumerable: true, get: function () { return constants_1.APP_INTERCEPTOR; } }); -Object.defineProperty(exports, "APP_PIPE", { enumerable: true, get: function () { return constants_1.APP_PIPE; } }); -tslib_1.__exportStar(require("./discovery"), exports); -tslib_1.__exportStar(require("./exceptions"), exports); -tslib_1.__exportStar(require("./helpers"), exports); -tslib_1.__exportStar(require("./injector"), exports); -tslib_1.__exportStar(require("./inspector"), exports); -tslib_1.__exportStar(require("./metadata-scanner"), exports); -tslib_1.__exportStar(require("./middleware"), exports); -tslib_1.__exportStar(require("./nest-application"), exports); -tslib_1.__exportStar(require("./nest-application-context"), exports); -var nest_factory_1 = require("./nest-factory"); -Object.defineProperty(exports, "NestFactory", { enumerable: true, get: function () { return nest_factory_1.NestFactory; } }); -tslib_1.__exportStar(require("./repl"), exports); -tslib_1.__exportStar(require("./router"), exports); -tslib_1.__exportStar(require("./services"), exports); diff --git a/node_modules/@nestjs/core/injector/abstract-instance-resolver.d.ts b/node_modules/@nestjs/core/injector/abstract-instance-resolver.d.ts deleted file mode 100644 index 23332e5..0000000 --- a/node_modules/@nestjs/core/injector/abstract-instance-resolver.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Abstract, Type } from '@nestjs/common'; -import { GetOrResolveOptions } from '@nestjs/common/interfaces'; -import { Injector } from './injector'; -import { InstanceLinksHost } from './instance-links-host'; -import { ContextId } from './instance-wrapper'; -import { Module } from './module'; -export declare abstract class AbstractInstanceResolver { - protected abstract instanceLinksHost: InstanceLinksHost; - protected abstract injector: Injector; - protected abstract get(typeOrToken: Type | Function | string | symbol, options?: GetOrResolveOptions): TResult | Array; - protected find(typeOrToken: Type | Abstract | string | symbol, options: { - moduleId?: string; - each?: boolean; - }): TResult | Array; - protected resolvePerContext(typeOrToken: Type | Abstract | string | symbol, contextModule: Module, contextId: ContextId, options?: GetOrResolveOptions): Promise>; -} diff --git a/node_modules/@nestjs/core/injector/abstract-instance-resolver.js b/node_modules/@nestjs/core/injector/abstract-instance-resolver.js deleted file mode 100644 index e82974e..0000000 --- a/node_modules/@nestjs/core/injector/abstract-instance-resolver.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AbstractInstanceResolver = void 0; -const common_1 = require("@nestjs/common"); -const exceptions_1 = require("../errors/exceptions"); -class AbstractInstanceResolver { - find(typeOrToken, options) { - const instanceLinkOrArray = this.instanceLinksHost.get(typeOrToken, options); - const pluckInstance = ({ wrapperRef }) => { - if (wrapperRef.scope === common_1.Scope.REQUEST || - wrapperRef.scope === common_1.Scope.TRANSIENT || - !wrapperRef.isDependencyTreeStatic()) { - throw new exceptions_1.InvalidClassScopeException(typeOrToken); - } - return wrapperRef.instance; - }; - if (Array.isArray(instanceLinkOrArray)) { - return instanceLinkOrArray.map(pluckInstance); - } - return pluckInstance(instanceLinkOrArray); - } - async resolvePerContext(typeOrToken, contextModule, contextId, options) { - const instanceLinkOrArray = options?.strict - ? this.instanceLinksHost.get(typeOrToken, { - moduleId: contextModule.id, - each: options.each, - }) - : this.instanceLinksHost.get(typeOrToken, { - each: options?.each, - }); - const pluckInstance = async (instanceLink) => { - const { wrapperRef, collection } = instanceLink; - if (wrapperRef.isDependencyTreeStatic() && !wrapperRef.isTransient) { - return wrapperRef.instance; - } - const ctorHost = wrapperRef.instance || { constructor: typeOrToken }; - const instance = await this.injector.loadPerContext(ctorHost, wrapperRef.host, collection, contextId, wrapperRef); - if (!instance) { - throw new exceptions_1.UnknownElementException(); - } - return instance; - }; - if (Array.isArray(instanceLinkOrArray)) { - return Promise.all(instanceLinkOrArray.map(instanceLink => pluckInstance(instanceLink))); - } - return pluckInstance(instanceLinkOrArray); - } -} -exports.AbstractInstanceResolver = AbstractInstanceResolver; diff --git a/node_modules/@nestjs/core/injector/compiler.d.ts b/node_modules/@nestjs/core/injector/compiler.d.ts deleted file mode 100644 index 15aecb6..0000000 --- a/node_modules/@nestjs/core/injector/compiler.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { DynamicModule, ForwardReference, Type } from '@nestjs/common/interfaces'; -import { ModuleOpaqueKeyFactory } from './opaque-key-factory/interfaces/module-opaque-key-factory.interface'; -export interface ModuleFactory { - type: Type; - token: string; - dynamicMetadata?: Partial; -} -export declare class ModuleCompiler { - private readonly _moduleOpaqueKeyFactory; - constructor(_moduleOpaqueKeyFactory: ModuleOpaqueKeyFactory); - get moduleOpaqueKeyFactory(): ModuleOpaqueKeyFactory; - compile(moduleClsOrDynamic: Type | DynamicModule | ForwardReference | Promise): Promise; - extractMetadata(moduleClsOrDynamic: Type | ForwardReference | DynamicModule): { - type: Type; - dynamicMetadata: Omit | undefined; - }; - isDynamicModule(moduleClsOrDynamic: Type | DynamicModule | ForwardReference): moduleClsOrDynamic is DynamicModule; -} diff --git a/node_modules/@nestjs/core/injector/compiler.js b/node_modules/@nestjs/core/injector/compiler.js deleted file mode 100644 index 581affe..0000000 --- a/node_modules/@nestjs/core/injector/compiler.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ModuleCompiler = void 0; -class ModuleCompiler { - constructor(_moduleOpaqueKeyFactory) { - this._moduleOpaqueKeyFactory = _moduleOpaqueKeyFactory; - } - get moduleOpaqueKeyFactory() { - return this._moduleOpaqueKeyFactory; - } - async compile(moduleClsOrDynamic) { - moduleClsOrDynamic = await moduleClsOrDynamic; - const { type, dynamicMetadata } = this.extractMetadata(moduleClsOrDynamic); - const token = dynamicMetadata - ? this._moduleOpaqueKeyFactory.createForDynamic(type, dynamicMetadata, moduleClsOrDynamic) - : this._moduleOpaqueKeyFactory.createForStatic(type, moduleClsOrDynamic); - return { type, dynamicMetadata, token }; - } - extractMetadata(moduleClsOrDynamic) { - if (!this.isDynamicModule(moduleClsOrDynamic)) { - return { - type: moduleClsOrDynamic?.forwardRef - ? moduleClsOrDynamic.forwardRef() - : moduleClsOrDynamic, - dynamicMetadata: undefined, - }; - } - const { module: type, ...dynamicMetadata } = moduleClsOrDynamic; - return { type, dynamicMetadata }; - } - isDynamicModule(moduleClsOrDynamic) { - return !!moduleClsOrDynamic.module; - } -} -exports.ModuleCompiler = ModuleCompiler; diff --git a/node_modules/@nestjs/core/injector/constants.d.ts b/node_modules/@nestjs/core/injector/constants.d.ts deleted file mode 100644 index 6d54338..0000000 --- a/node_modules/@nestjs/core/injector/constants.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { ContextId } from './instance-wrapper'; -export declare const CONTROLLER_ID_KEY = "CONTROLLER_ID"; -export declare const STATIC_CONTEXT: ContextId; diff --git a/node_modules/@nestjs/core/injector/constants.js b/node_modules/@nestjs/core/injector/constants.js deleted file mode 100644 index 7bf96e0..0000000 --- a/node_modules/@nestjs/core/injector/constants.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.STATIC_CONTEXT = exports.CONTROLLER_ID_KEY = void 0; -exports.CONTROLLER_ID_KEY = 'CONTROLLER_ID'; -const STATIC_CONTEXT_ID = 1; -exports.STATIC_CONTEXT = Object.freeze({ - id: STATIC_CONTEXT_ID, -}); diff --git a/node_modules/@nestjs/core/injector/container.d.ts b/node_modules/@nestjs/core/injector/container.d.ts deleted file mode 100644 index bf3be05..0000000 --- a/node_modules/@nestjs/core/injector/container.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { DynamicModule, Provider } from '@nestjs/common'; -import { EnhancerSubtype } from '@nestjs/common/constants'; -import { Injectable, Type } from '@nestjs/common/interfaces'; -import { NestApplicationContextOptions } from '@nestjs/common/interfaces/nest-application-context-options.interface'; -import { ApplicationConfig } from '../application-config'; -import { SerializedGraph } from '../inspector/serialized-graph'; -import { ModuleCompiler } from './compiler'; -import { ContextId } from './instance-wrapper'; -import { Module } from './module'; -import { ModulesContainer } from './modules-container'; -import { ModuleOpaqueKeyFactory } from './opaque-key-factory/interfaces/module-opaque-key-factory.interface'; -type ModuleMetatype = Type | DynamicModule | Promise; -type ModuleScope = Type[]; -export declare class NestContainer { - private readonly _applicationConfig; - private readonly _contextOptions; - private readonly globalModules; - private readonly modules; - private readonly dynamicModulesMetadata; - private readonly internalProvidersStorage; - private readonly _serializedGraph; - private moduleCompiler; - private internalCoreModule; - constructor(_applicationConfig?: ApplicationConfig | undefined, _contextOptions?: NestApplicationContextOptions | undefined); - get serializedGraph(): SerializedGraph; - get applicationConfig(): ApplicationConfig | undefined; - get contextOptions(): NestApplicationContextOptions | undefined; - setHttpAdapter(httpAdapter: any): void; - getHttpAdapterRef(): import("..").AbstractHttpAdapter; - getHttpAdapterHostRef(): import("..").HttpAdapterHost>; - addModule(metatype: ModuleMetatype, scope: ModuleScope): Promise<{ - moduleRef: Module; - inserted: boolean; - } | undefined>; - replaceModule(metatypeToReplace: ModuleMetatype, newMetatype: ModuleMetatype, scope: ModuleScope): Promise<{ - moduleRef: Module; - inserted: boolean; - } | undefined>; - private setModule; - addDynamicMetadata(token: string, dynamicModuleMetadata: Partial, scope: Type[]): Promise; - addDynamicModules(modules: any[], scope: Type[]): Promise; - isGlobalModule(metatype: Type, dynamicMetadata?: Partial): boolean; - addGlobalModule(module: Module): void; - getModules(): ModulesContainer; - getModuleCompiler(): ModuleCompiler; - getModuleByKey(moduleKey: string): Module | undefined; - getInternalCoreModuleRef(): Module | undefined; - addImport(relatedModule: Type | DynamicModule, token: string): Promise; - addProvider(provider: Provider, token: string, enhancerSubtype?: EnhancerSubtype): string | symbol | Function; - addInjectable(injectable: Provider, token: string, enhancerSubtype: EnhancerSubtype, host?: Type): string | symbol | Function | import("./instance-wrapper").InstanceWrapper; - addExportedProviderOrModule(toExport: Type | DynamicModule, token: string): void; - addController(controller: Type, token: string): void; - clear(): void; - replace(toReplace: any, options: { - scope: any[] | null; - }): void; - bindGlobalScope(): void; - bindGlobalsToImports(moduleRef: Module): void; - bindGlobalModuleToModule(target: Module, globalModule: Module): void; - getDynamicMetadataByToken(token: string): Partial; - getDynamicMetadataByToken>(token: string, metadataKey: K): DynamicModule[K]; - registerCoreModuleRef(moduleRef: Module): void; - getModuleTokenFactory(): ModuleOpaqueKeyFactory; - registerRequestProvider(request: T, contextId: ContextId): void; - private shouldInitOnPreview; -} -export {}; diff --git a/node_modules/@nestjs/core/injector/container.js b/node_modules/@nestjs/core/injector/container.js deleted file mode 100644 index 17bc021..0000000 --- a/node_modules/@nestjs/core/injector/container.js +++ /dev/null @@ -1,233 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NestContainer = void 0; -const constants_1 = require("@nestjs/common/constants"); -const discoverable_meta_host_collection_1 = require("../discovery/discoverable-meta-host-collection"); -const exceptions_1 = require("../errors/exceptions"); -const initialize_on_preview_allowlist_1 = require("../inspector/initialize-on-preview.allowlist"); -const serialized_graph_1 = require("../inspector/serialized-graph"); -const request_constants_1 = require("../router/request/request-constants"); -const compiler_1 = require("./compiler"); -const internal_core_module_1 = require("./internal-core-module/internal-core-module"); -const internal_providers_storage_1 = require("./internal-providers-storage"); -const module_1 = require("./module"); -const modules_container_1 = require("./modules-container"); -const by_reference_module_opaque_key_factory_1 = require("./opaque-key-factory/by-reference-module-opaque-key-factory"); -const deep_hashed_module_opaque_key_factory_1 = require("./opaque-key-factory/deep-hashed-module-opaque-key-factory"); -class NestContainer { - constructor(_applicationConfig = undefined, _contextOptions = undefined) { - this._applicationConfig = _applicationConfig; - this._contextOptions = _contextOptions; - this.globalModules = new Set(); - this.modules = new modules_container_1.ModulesContainer(); - this.dynamicModulesMetadata = new Map(); - this.internalProvidersStorage = new internal_providers_storage_1.InternalProvidersStorage(); - this._serializedGraph = new serialized_graph_1.SerializedGraph(); - const moduleOpaqueKeyFactory = this._contextOptions?.moduleIdGeneratorAlgorithm === 'deep-hash' - ? new deep_hashed_module_opaque_key_factory_1.DeepHashedModuleOpaqueKeyFactory() - : new by_reference_module_opaque_key_factory_1.ByReferenceModuleOpaqueKeyFactory({ - keyGenerationStrategy: this._contextOptions?.snapshot - ? 'shallow' - : 'random', - }); - this.moduleCompiler = new compiler_1.ModuleCompiler(moduleOpaqueKeyFactory); - } - get serializedGraph() { - return this._serializedGraph; - } - get applicationConfig() { - return this._applicationConfig; - } - get contextOptions() { - return this._contextOptions; - } - setHttpAdapter(httpAdapter) { - this.internalProvidersStorage.httpAdapter = httpAdapter; - if (!this.internalProvidersStorage.httpAdapterHost) { - return; - } - const host = this.internalProvidersStorage.httpAdapterHost; - host.httpAdapter = httpAdapter; - } - getHttpAdapterRef() { - return this.internalProvidersStorage.httpAdapter; - } - getHttpAdapterHostRef() { - return this.internalProvidersStorage.httpAdapterHost; - } - async addModule(metatype, scope) { - // In DependenciesScanner#scanForModules we already check for undefined or invalid modules - // We still need to catch the edge-case of `forwardRef(() => undefined)` - if (!metatype) { - throw new exceptions_1.UndefinedForwardRefException(scope); - } - const { type, dynamicMetadata, token } = await this.moduleCompiler.compile(metatype); - if (this.modules.has(token)) { - return { - moduleRef: this.modules.get(token), - inserted: true, - }; - } - return { - moduleRef: await this.setModule({ - token, - type, - dynamicMetadata, - }, scope), - inserted: true, - }; - } - async replaceModule(metatypeToReplace, newMetatype, scope) { - // In DependenciesScanner#scanForModules we already check for undefined or invalid modules - // We still need to catch the edge-case of `forwardRef(() => undefined)` - if (!metatypeToReplace || !newMetatype) { - throw new exceptions_1.UndefinedForwardRefException(scope); - } - const { token } = await this.moduleCompiler.compile(metatypeToReplace); - const { type, dynamicMetadata } = await this.moduleCompiler.compile(newMetatype); - return { - moduleRef: await this.setModule({ - token, - type, - dynamicMetadata, - }, scope), - inserted: false, - }; - } - async setModule({ token, dynamicMetadata, type }, scope) { - const moduleRef = new module_1.Module(type, this); - moduleRef.token = token; - moduleRef.initOnPreview = this.shouldInitOnPreview(type); - this.modules.set(token, moduleRef); - const updatedScope = [].concat(scope, type); - await this.addDynamicMetadata(token, dynamicMetadata, updatedScope); - if (this.isGlobalModule(type, dynamicMetadata)) { - moduleRef.isGlobal = true; - // Set global module distance to MAX_VALUE to ensure their lifecycle hooks - // are always executed first (when initializing the application) - moduleRef.distance = Number.MAX_VALUE; - this.addGlobalModule(moduleRef); - } - return moduleRef; - } - async addDynamicMetadata(token, dynamicModuleMetadata, scope) { - if (!dynamicModuleMetadata) { - return; - } - this.dynamicModulesMetadata.set(token, dynamicModuleMetadata); - const { imports } = dynamicModuleMetadata; - await this.addDynamicModules(imports, scope); - } - async addDynamicModules(modules, scope) { - if (!modules) { - return; - } - await Promise.all(modules.map(module => this.addModule(module, scope))); - } - isGlobalModule(metatype, dynamicMetadata) { - if (dynamicMetadata && dynamicMetadata.global) { - return true; - } - return !!Reflect.getMetadata(constants_1.GLOBAL_MODULE_METADATA, metatype); - } - addGlobalModule(module) { - this.globalModules.add(module); - } - getModules() { - return this.modules; - } - getModuleCompiler() { - return this.moduleCompiler; - } - getModuleByKey(moduleKey) { - return this.modules.get(moduleKey); - } - getInternalCoreModuleRef() { - return this.internalCoreModule; - } - async addImport(relatedModule, token) { - if (!this.modules.has(token)) { - return; - } - const moduleRef = this.modules.get(token); - const { token: relatedModuleToken } = await this.moduleCompiler.compile(relatedModule); - const related = this.modules.get(relatedModuleToken); - moduleRef.addImport(related); - } - addProvider(provider, token, enhancerSubtype) { - const moduleRef = this.modules.get(token); - if (!provider) { - throw new exceptions_1.CircularDependencyException(moduleRef?.metatype.name); - } - if (!moduleRef) { - throw new exceptions_1.UnknownModuleException(); - } - const providerKey = moduleRef.addProvider(provider, enhancerSubtype); - const providerRef = moduleRef.getProviderByKey(providerKey); - discoverable_meta_host_collection_1.DiscoverableMetaHostCollection.inspectProvider(this.modules, providerRef); - return providerKey; - } - addInjectable(injectable, token, enhancerSubtype, host) { - if (!this.modules.has(token)) { - throw new exceptions_1.UnknownModuleException(); - } - const moduleRef = this.modules.get(token); - return moduleRef.addInjectable(injectable, enhancerSubtype, host); - } - addExportedProviderOrModule(toExport, token) { - if (!this.modules.has(token)) { - throw new exceptions_1.UnknownModuleException(); - } - const moduleRef = this.modules.get(token); - moduleRef.addExportedProviderOrModule(toExport); - } - addController(controller, token) { - if (!this.modules.has(token)) { - throw new exceptions_1.UnknownModuleException(); - } - const moduleRef = this.modules.get(token); - moduleRef.addController(controller); - const controllerRef = moduleRef.controllers.get(controller); - discoverable_meta_host_collection_1.DiscoverableMetaHostCollection.inspectController(this.modules, controllerRef); - } - clear() { - this.modules.clear(); - } - replace(toReplace, options) { - this.modules.forEach(moduleRef => moduleRef.replace(toReplace, options)); - } - bindGlobalScope() { - this.modules.forEach(moduleRef => this.bindGlobalsToImports(moduleRef)); - } - bindGlobalsToImports(moduleRef) { - this.globalModules.forEach(globalModule => this.bindGlobalModuleToModule(moduleRef, globalModule)); - } - bindGlobalModuleToModule(target, globalModule) { - if (target === globalModule || target === this.internalCoreModule) { - return; - } - target.addImport(globalModule); - } - getDynamicMetadataByToken(token, metadataKey) { - const metadata = this.dynamicModulesMetadata.get(token); - return metadataKey ? (metadata?.[metadataKey] ?? []) : metadata; - } - registerCoreModuleRef(moduleRef) { - this.internalCoreModule = moduleRef; - this.modules[internal_core_module_1.InternalCoreModule.name] = moduleRef; - } - getModuleTokenFactory() { - return this.moduleCompiler.moduleOpaqueKeyFactory; - } - registerRequestProvider(request, contextId) { - const wrapper = this.internalCoreModule.getProviderByKey(request_constants_1.REQUEST); - wrapper.setInstanceByContextId(contextId, { - instance: request, - isResolved: true, - }); - } - shouldInitOnPreview(type) { - return initialize_on_preview_allowlist_1.InitializeOnPreviewAllowlist.has(type); - } -} -exports.NestContainer = NestContainer; diff --git a/node_modules/@nestjs/core/injector/helpers/provider-classifier.d.ts b/node_modules/@nestjs/core/injector/helpers/provider-classifier.d.ts deleted file mode 100644 index 098d2cd..0000000 --- a/node_modules/@nestjs/core/injector/helpers/provider-classifier.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { ClassProvider, FactoryProvider, Provider, ValueProvider } from '@nestjs/common'; -export declare function isClassProvider(provider: Provider): provider is ClassProvider; -export declare function isValueProvider(provider: Provider): provider is ValueProvider; -export declare function isFactoryProvider(provider: Provider): provider is FactoryProvider; diff --git a/node_modules/@nestjs/core/injector/helpers/provider-classifier.js b/node_modules/@nestjs/core/injector/helpers/provider-classifier.js deleted file mode 100644 index 1bd2728..0000000 --- a/node_modules/@nestjs/core/injector/helpers/provider-classifier.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isClassProvider = isClassProvider; -exports.isValueProvider = isValueProvider; -exports.isFactoryProvider = isFactoryProvider; -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -function isClassProvider(provider) { - return Boolean(provider?.useClass); -} -function isValueProvider(provider) { - const providerValue = provider?.useValue; - return !(0, shared_utils_1.isUndefined)(providerValue); -} -function isFactoryProvider(provider) { - return Boolean(provider.useFactory); -} diff --git a/node_modules/@nestjs/core/injector/helpers/silent-logger.d.ts b/node_modules/@nestjs/core/injector/helpers/silent-logger.d.ts deleted file mode 100644 index f209eba..0000000 --- a/node_modules/@nestjs/core/injector/helpers/silent-logger.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Logger } from '@nestjs/common'; -export declare class SilentLogger extends Logger { - log: () => void; - error: () => void; - warn: () => void; - debug: () => void; - verbose: () => void; - fatal: () => void; - setLogLevels: () => void; -} diff --git a/node_modules/@nestjs/core/injector/helpers/silent-logger.js b/node_modules/@nestjs/core/injector/helpers/silent-logger.js deleted file mode 100644 index 588eabb..0000000 --- a/node_modules/@nestjs/core/injector/helpers/silent-logger.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SilentLogger = void 0; -const common_1 = require("@nestjs/common"); -const noop = () => { }; -class SilentLogger extends common_1.Logger { - constructor() { - super(...arguments); - this.log = noop; - this.error = noop; - this.warn = noop; - this.debug = noop; - this.verbose = noop; - this.fatal = noop; - this.setLogLevels = noop; - } -} -exports.SilentLogger = SilentLogger; diff --git a/node_modules/@nestjs/core/injector/helpers/transient-instances.d.ts b/node_modules/@nestjs/core/injector/helpers/transient-instances.d.ts deleted file mode 100644 index 8b9131c..0000000 --- a/node_modules/@nestjs/core/injector/helpers/transient-instances.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { InjectionToken } from '@nestjs/common'; -import { InstanceWrapper } from '../instance-wrapper'; -/** - * Returns the instances which are transient - * @param instances The instances which should be checked whether they are transient - */ -export declare function getTransientInstances(instances: [InjectionToken, InstanceWrapper][]): InstanceWrapper[]; -/** - * Returns the instances which are not transient - * @param instances The instances which should be checked whether they are transient - */ -export declare function getNonTransientInstances(instances: [InjectionToken, InstanceWrapper][]): InstanceWrapper[]; diff --git a/node_modules/@nestjs/core/injector/helpers/transient-instances.js b/node_modules/@nestjs/core/injector/helpers/transient-instances.js deleted file mode 100644 index 976d30c..0000000 --- a/node_modules/@nestjs/core/injector/helpers/transient-instances.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getTransientInstances = getTransientInstances; -exports.getNonTransientInstances = getNonTransientInstances; -const iterare_1 = require("iterare"); -/** - * Returns the instances which are transient - * @param instances The instances which should be checked whether they are transient - */ -function getTransientInstances(instances) { - return (0, iterare_1.iterate)(instances) - .filter(([_, wrapper]) => wrapper.isDependencyTreeStatic()) - .map(([_, wrapper]) => wrapper.getStaticTransientInstances()) - .flatten() - .filter(item => !!item) - .map(({ instance }) => instance) - .toArray(); -} -/** - * Returns the instances which are not transient - * @param instances The instances which should be checked whether they are transient - */ -function getNonTransientInstances(instances) { - return (0, iterare_1.iterate)(instances) - .filter(([key, wrapper]) => wrapper.isDependencyTreeStatic() && !wrapper.isTransient) - .map(([key, { instance }]) => instance) - .toArray(); -} diff --git a/node_modules/@nestjs/core/injector/index.d.ts b/node_modules/@nestjs/core/injector/index.d.ts deleted file mode 100644 index 21e406d..0000000 --- a/node_modules/@nestjs/core/injector/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './container'; -export * from './inquirer'; -export { ContextId, HostComponentInfo } from './instance-wrapper'; -export * from './lazy-module-loader/lazy-module-loader'; -export * from './module-ref'; -export * from './modules-container'; diff --git a/node_modules/@nestjs/core/injector/index.js b/node_modules/@nestjs/core/injector/index.js deleted file mode 100644 index 6d2c476..0000000 --- a/node_modules/@nestjs/core/injector/index.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./container"), exports); -tslib_1.__exportStar(require("./inquirer"), exports); -tslib_1.__exportStar(require("./lazy-module-loader/lazy-module-loader"), exports); -tslib_1.__exportStar(require("./module-ref"), exports); -tslib_1.__exportStar(require("./modules-container"), exports); diff --git a/node_modules/@nestjs/core/injector/injector.d.ts b/node_modules/@nestjs/core/injector/injector.d.ts deleted file mode 100644 index 74d1308..0000000 --- a/node_modules/@nestjs/core/injector/injector.d.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { InjectionToken } from '@nestjs/common'; -import { Controller, ForwardReference, Injectable, Type } from '@nestjs/common/interfaces'; -import { ContextId, InstancePerContext, InstanceWrapper, PropertyMetadata } from './instance-wrapper'; -import { Module } from './module'; -import { SettlementSignal } from './settlement-signal'; -/** - * The type of an injectable dependency - */ -export type InjectorDependency = InjectionToken; -/** - * The property-based dependency - */ -export interface PropertyDependency { - key: symbol | string; - name: InjectorDependency; - isOptional?: boolean; - instance?: any; -} -/** - * Context of a dependency which gets injected by - * the injector - */ -export interface InjectorDependencyContext { - /** - * The name of the property key (property-based injection) - */ - key?: string | symbol; - /** - * The function itself, the name of the function, or injection token. - */ - name?: Function | string | symbol; - /** - * The index of the dependency which gets injected - * from the dependencies array - */ - index?: number; - /** - * The dependency array which gets injected - */ - dependencies?: InjectorDependency[]; -} -export declare class Injector { - private readonly options?; - private logger; - private readonly instanceDecorator; - constructor(options?: { - /** - * Whether to enable preview mode. - */ - preview: boolean; - /** - * Function to decorate a freshly created instance. - */ - instanceDecorator?: (target: unknown) => unknown; - } | undefined); - loadPrototype({ token }: InstanceWrapper, collection: Map>, contextId?: ContextId): void; - loadInstance(wrapper: InstanceWrapper, collection: Map, moduleRef: Module, contextId?: ContextId, inquirer?: InstanceWrapper): Promise; - loadMiddleware(wrapper: InstanceWrapper, collection: Map, moduleRef: Module, contextId?: ContextId, inquirer?: InstanceWrapper): Promise; - loadController(wrapper: InstanceWrapper, moduleRef: Module, contextId?: ContextId): Promise; - loadInjectable(wrapper: InstanceWrapper, moduleRef: Module, contextId?: ContextId, inquirer?: InstanceWrapper): Promise; - loadProvider(wrapper: InstanceWrapper, moduleRef: Module, contextId?: ContextId, inquirer?: InstanceWrapper): Promise; - applySettlementSignal(instancePerContext: InstancePerContext, host: InstanceWrapper): SettlementSignal; - resolveConstructorParams(wrapper: InstanceWrapper, moduleRef: Module, inject: InjectorDependency[] | undefined, callback: (args: unknown[]) => void | Promise, contextId?: ContextId, inquirer?: InstanceWrapper, parentInquirer?: InstanceWrapper): Promise; - getClassDependencies(wrapper: InstanceWrapper): [InjectorDependency[], number[]]; - getFactoryProviderDependencies(wrapper: InstanceWrapper): [InjectorDependency[], number[]]; - reflectConstructorParams(type: Type): any[]; - reflectOptionalParams(type: Type): any[]; - reflectSelfParams(type: Type): any[]; - resolveSingleParam(wrapper: InstanceWrapper, param: Type | string | symbol, dependencyContext: InjectorDependencyContext, moduleRef: Module, contextId?: ContextId, inquirer?: InstanceWrapper, keyOrIndex?: symbol | string | number): Promise>; - resolveParamToken(wrapper: InstanceWrapper, param: Type | string | symbol | ForwardReference): any; - resolveComponentWrapper(moduleRef: Module, token: InjectionToken, dependencyContext: InjectorDependencyContext, wrapper: InstanceWrapper, contextId?: ContextId, inquirer?: InstanceWrapper, keyOrIndex?: symbol | string | number): Promise; - resolveComponentHost(moduleRef: Module, instanceWrapper: InstanceWrapper>, contextId?: ContextId, inquirer?: InstanceWrapper): Promise; - lookupComponent(providers: Map, moduleRef: Module, dependencyContext: InjectorDependencyContext, wrapper: InstanceWrapper, contextId?: ContextId, inquirer?: InstanceWrapper, keyOrIndex?: symbol | string | number): Promise>; - lookupComponentInParentModules(dependencyContext: InjectorDependencyContext, moduleRef: Module, wrapper: InstanceWrapper, contextId?: ContextId, inquirer?: InstanceWrapper, keyOrIndex?: symbol | string | number): Promise; - lookupComponentInImports(moduleRef: Module, name: InjectionToken, wrapper: InstanceWrapper, moduleRegistry?: Set, contextId?: ContextId, inquirer?: InstanceWrapper, keyOrIndex?: symbol | string | number, isTraversing?: boolean): Promise; - resolveProperties(wrapper: InstanceWrapper, moduleRef: Module, inject?: InjectorDependency[], contextId?: ContextId, inquirer?: InstanceWrapper, parentInquirer?: InstanceWrapper): Promise; - reflectProperties(type: Type): PropertyDependency[]; - applyProperties(instance: T, properties: PropertyDependency[]): void; - instantiateClass(instances: any[], wrapper: InstanceWrapper, targetMetatype: InstanceWrapper, contextId?: ContextId, inquirer?: InstanceWrapper): Promise; - loadPerContext(instance: T, moduleRef: Module, collection: Map, ctx: ContextId, wrapper?: InstanceWrapper): Promise; - loadEnhancersPerContext(wrapper: InstanceWrapper, ctx: ContextId, inquirer?: InstanceWrapper): Promise; - loadCtorMetadata(metadata: InstanceWrapper[], contextId: ContextId, inquirer?: InstanceWrapper, parentInquirer?: InstanceWrapper): Promise; - loadPropertiesMetadata(metadata: PropertyMetadata[], contextId: ContextId, inquirer?: InstanceWrapper): Promise; - private getInquirerId; - /** - * For nested TRANSIENT dependencies (TRANSIENT -> TRANSIENT) in non-static contexts, - * returns parentInquirer to ensure each parent TRANSIENT gets its own instance. - * This is necessary because in REQUEST/DURABLE scopes, the same TRANSIENT wrapper - * can be used by multiple parents, causing nested TRANSIENTs to be shared incorrectly. - * For non-TRANSIENT -> TRANSIENT, returns inquirer (current wrapper being created). - */ - private getEffectiveInquirer; - private resolveScopedComponentHost; - private isInquirerRequest; - private isInquirer; - protected addDependencyMetadata(keyOrIndex: symbol | string | number, hostWrapper: InstanceWrapper, instanceWrapper: InstanceWrapper): void; - private getTokenName; - private printResolvingDependenciesLog; - private printLookingForProviderLog; - private printFoundInModuleLog; - private isDebugMode; - private getContextId; - private getNowTimestamp; -} diff --git a/node_modules/@nestjs/core/injector/injector.js b/node_modules/@nestjs/core/injector/injector.js deleted file mode 100644 index 6c48afa..0000000 --- a/node_modules/@nestjs/core/injector/injector.js +++ /dev/null @@ -1,554 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Injector = void 0; -const common_1 = require("@nestjs/common"); -const constants_1 = require("@nestjs/common/constants"); -const cli_colors_util_1 = require("@nestjs/common/utils/cli-colors.util"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const iterare_1 = require("iterare"); -const perf_hooks_1 = require("perf_hooks"); -const exceptions_1 = require("../errors/exceptions"); -const runtime_exception_1 = require("../errors/exceptions/runtime.exception"); -const undefined_dependency_exception_1 = require("../errors/exceptions/undefined-dependency.exception"); -const unknown_dependencies_exception_1 = require("../errors/exceptions/unknown-dependencies.exception"); -const barrier_1 = require("../helpers/barrier"); -const constants_2 = require("./constants"); -const inquirer_1 = require("./inquirer"); -const instance_wrapper_1 = require("./instance-wrapper"); -const settlement_signal_1 = require("./settlement-signal"); -class Injector { - constructor(options) { - this.options = options; - this.logger = new common_1.Logger('InjectorLogger'); - this.instanceDecorator = (target) => target; - if (options?.instanceDecorator) { - this.instanceDecorator = options.instanceDecorator; - } - } - loadPrototype({ token }, collection, contextId = constants_2.STATIC_CONTEXT) { - if (!collection) { - return; - } - const target = collection.get(token); - const instance = target.createPrototype(contextId); - if (instance) { - const wrapper = new instance_wrapper_1.InstanceWrapper({ - ...target, - instance, - }); - collection.set(token, wrapper); - } - } - async loadInstance(wrapper, collection, moduleRef, contextId = constants_2.STATIC_CONTEXT, inquirer) { - const inquirerId = this.getInquirerId(inquirer); - const instanceHost = wrapper.getInstanceByContextId(this.getContextId(contextId, wrapper), inquirerId); - if (instanceHost.isPending) { - const settlementSignal = wrapper.settlementSignal; - if (inquirer && settlementSignal?.isCycle(inquirer.id)) { - throw new exceptions_1.CircularDependencyException(`"${wrapper.name}"`); - } - return instanceHost.donePromise.then((err) => { - if (err) { - throw err; - } - }); - } - const settlementSignal = this.applySettlementSignal(instanceHost, wrapper); - const token = wrapper.token || wrapper.name; - const { inject } = wrapper; - const targetWrapper = collection.get(token); - if ((0, shared_utils_1.isUndefined)(targetWrapper)) { - throw new runtime_exception_1.RuntimeException(); - } - if (instanceHost.isResolved) { - return settlementSignal.complete(); - } - try { - const t0 = this.getNowTimestamp(); - const callback = async (instances) => { - const properties = await this.resolveProperties(wrapper, moduleRef, inject, contextId, wrapper, inquirer); - const instance = await this.instantiateClass(instances, wrapper, targetWrapper, contextId, inquirer); - this.applyProperties(instance, properties); - wrapper.initTime = this.getNowTimestamp() - t0; - settlementSignal.complete(); - }; - await this.resolveConstructorParams(wrapper, moduleRef, inject, callback, contextId, wrapper, inquirer); - } - catch (err) { - wrapper.removeInstanceByContextId(this.getContextId(contextId, wrapper), inquirerId); - settlementSignal.error(err); - throw err; - } - } - async loadMiddleware(wrapper, collection, moduleRef, contextId = constants_2.STATIC_CONTEXT, inquirer) { - const { metatype, token } = wrapper; - const targetWrapper = collection.get(token); - if (!(0, shared_utils_1.isUndefined)(targetWrapper.instance)) { - return; - } - targetWrapper.instance = Object.create(metatype.prototype); - await this.loadInstance(wrapper, collection, moduleRef, contextId, inquirer || wrapper); - } - async loadController(wrapper, moduleRef, contextId = constants_2.STATIC_CONTEXT) { - const controllers = moduleRef.controllers; - await this.loadInstance(wrapper, controllers, moduleRef, contextId, wrapper); - await this.loadEnhancersPerContext(wrapper, contextId, wrapper); - } - async loadInjectable(wrapper, moduleRef, contextId = constants_2.STATIC_CONTEXT, inquirer) { - const injectables = moduleRef.injectables; - await this.loadInstance(wrapper, injectables, moduleRef, contextId, inquirer); - } - async loadProvider(wrapper, moduleRef, contextId = constants_2.STATIC_CONTEXT, inquirer) { - const providers = moduleRef.providers; - await this.loadInstance(wrapper, providers, moduleRef, contextId, inquirer); - await this.loadEnhancersPerContext(wrapper, contextId, wrapper); - } - applySettlementSignal(instancePerContext, host) { - const settlementSignal = new settlement_signal_1.SettlementSignal(); - instancePerContext.donePromise = settlementSignal.asPromise(); - instancePerContext.isPending = true; - host.settlementSignal = settlementSignal; - return settlementSignal; - } - async resolveConstructorParams(wrapper, moduleRef, inject, callback, contextId = constants_2.STATIC_CONTEXT, inquirer, parentInquirer) { - const metadata = wrapper.getCtorMetadata(); - if (metadata && contextId !== constants_2.STATIC_CONTEXT) { - const deps = await this.loadCtorMetadata(metadata, contextId, inquirer, parentInquirer); - return callback(deps); - } - const isFactoryProvider = !(0, shared_utils_1.isNil)(inject); - const [dependencies, optionalDependenciesIds] = isFactoryProvider - ? this.getFactoryProviderDependencies(wrapper) - : this.getClassDependencies(wrapper); - const paramBarrier = new barrier_1.Barrier(dependencies.length); - let isResolved = true; - const resolveParam = async (param, index) => { - try { - if (this.isInquirer(param, parentInquirer)) { - /* - * Signal the barrier to make sure other dependencies do not get stuck waiting forever. - */ - paramBarrier.signal(); - return parentInquirer && parentInquirer.instance; - } - if (inquirer?.isTransient && parentInquirer) { - // When `inquirer` is transient too, inherit the parent inquirer - // This is required to ensure that transient providers are only resolved - // when requested - inquirer.attachRootInquirer(parentInquirer); - } - const paramWrapper = await this.resolveSingleParam(wrapper, param, { index, dependencies }, moduleRef, contextId, inquirer, index); - /* - * Ensure that all instance wrappers are resolved at this point before we continue. - * Otherwise the staticity of `wrapper`'s dependency tree may be evaluated incorrectly - * and result in undefined / null injection. - */ - await paramBarrier.signalAndWait(); - const effectiveInquirer = this.getEffectiveInquirer(paramWrapper, inquirer, parentInquirer, contextId); - const paramWrapperWithInstance = await this.resolveComponentHost(moduleRef, paramWrapper, contextId, effectiveInquirer); - const instanceHost = paramWrapperWithInstance.getInstanceByContextId(this.getContextId(contextId, paramWrapperWithInstance), this.getInquirerId(effectiveInquirer)); - if (!instanceHost.isResolved && !paramWrapperWithInstance.forwardRef) { - isResolved = false; - } - return instanceHost?.instance; - } - catch (err) { - /* - * Signal the barrier to make sure other dependencies do not get stuck waiting forever. We - * do not care if this occurs after `Barrier.signalAndWait()` is called in the `try` block - * because the barrier will always have been resolved by then. - */ - paramBarrier.signal(); - const isOptional = optionalDependenciesIds.includes(index); - if (!isOptional) { - throw err; - } - return undefined; - } - }; - const instances = await Promise.all(dependencies.map(resolveParam)); - isResolved && (await callback(instances)); - } - getClassDependencies(wrapper) { - const ctorRef = wrapper.metatype; - return [ - this.reflectConstructorParams(ctorRef), - this.reflectOptionalParams(ctorRef), - ]; - } - getFactoryProviderDependencies(wrapper) { - const optionalDependenciesIds = []; - /** - * Same as the internal utility function `isOptionalFactoryDependency` from `@nestjs/common`. - * We are duplicating it here because that one is not supposed to be exported. - */ - function isOptionalFactoryDependency(value) { - return (!(0, shared_utils_1.isUndefined)(value.token) && - !(0, shared_utils_1.isUndefined)(value.optional) && - !value.prototype); - } - const mapFactoryProviderInjectArray = (item, index) => { - if (typeof item !== 'object') { - return item; - } - if (isOptionalFactoryDependency(item)) { - if (item.optional) { - optionalDependenciesIds.push(index); - } - return item?.token; - } - return item; - }; - return [ - wrapper.inject?.map?.(mapFactoryProviderInjectArray), - optionalDependenciesIds, - ]; - } - reflectConstructorParams(type) { - const paramtypes = [ - ...(Reflect.getMetadata(constants_1.PARAMTYPES_METADATA, type) || []), - ]; - const selfParams = this.reflectSelfParams(type); - selfParams.forEach(({ index, param }) => (paramtypes[index] = param)); - return paramtypes; - } - reflectOptionalParams(type) { - return Reflect.getMetadata(constants_1.OPTIONAL_DEPS_METADATA, type) || []; - } - reflectSelfParams(type) { - return Reflect.getMetadata(constants_1.SELF_DECLARED_DEPS_METADATA, type) || []; - } - async resolveSingleParam(wrapper, param, dependencyContext, moduleRef, contextId = constants_2.STATIC_CONTEXT, inquirer, keyOrIndex) { - if ((0, shared_utils_1.isUndefined)(param)) { - this.logger.log('Nest encountered an undefined dependency. This may be due to a circular import or a missing dependency declaration.'); - throw new undefined_dependency_exception_1.UndefinedDependencyException(wrapper.name, dependencyContext, moduleRef); - } - const token = this.resolveParamToken(wrapper, param); - return this.resolveComponentWrapper(moduleRef, token, dependencyContext, wrapper, contextId, inquirer, keyOrIndex); - } - resolveParamToken(wrapper, param) { - if (typeof param === 'object' && 'forwardRef' in param) { - wrapper.forwardRef = true; - return param.forwardRef(); - } - return param; - } - async resolveComponentWrapper(moduleRef, token, dependencyContext, wrapper, contextId = constants_2.STATIC_CONTEXT, inquirer, keyOrIndex) { - this.printResolvingDependenciesLog(token, inquirer); - this.printLookingForProviderLog(token, moduleRef); - const providers = moduleRef.providers; - return this.lookupComponent(providers, moduleRef, { ...dependencyContext, name: token }, wrapper, contextId, inquirer, keyOrIndex); - } - async resolveComponentHost(moduleRef, instanceWrapper, contextId = constants_2.STATIC_CONTEXT, inquirer) { - const inquirerId = this.getInquirerId(inquirer); - const instanceHost = instanceWrapper.getInstanceByContextId(this.getContextId(contextId, instanceWrapper), inquirerId); - if (!instanceHost.isResolved && !instanceWrapper.forwardRef) { - inquirer?.settlementSignal?.insertRef(instanceWrapper.id); - await this.loadProvider(instanceWrapper, instanceWrapper.host ?? moduleRef, contextId, inquirer); - } - else if (!instanceHost.isResolved && - instanceWrapper.forwardRef && - (contextId !== constants_2.STATIC_CONTEXT || !!inquirerId)) { - /** - * When circular dependency has been detected between - * either request/transient providers, we have to asynchronously - * resolve instance host for a specific contextId or inquirer, to ensure - * that eventual lazily created instance will be merged with the prototype - * instantiated beforehand. - */ - instanceHost.donePromise && - void instanceHost.donePromise - .then(() => this.loadProvider(instanceWrapper, moduleRef, contextId, inquirer)) - .catch(err => { - instanceWrapper.settlementSignal?.error(err); - }); - } - if (instanceWrapper.async) { - const host = instanceWrapper.getInstanceByContextId(this.getContextId(contextId, instanceWrapper), inquirerId); - host.instance = await host.instance; - instanceWrapper.setInstanceByContextId(contextId, host, inquirerId); - } - return instanceWrapper; - } - async lookupComponent(providers, moduleRef, dependencyContext, wrapper, contextId = constants_2.STATIC_CONTEXT, inquirer, keyOrIndex) { - const token = wrapper.token || wrapper.name; - const { name } = dependencyContext; - if (wrapper && token === name) { - throw new unknown_dependencies_exception_1.UnknownDependenciesException(wrapper.name, dependencyContext, moduleRef, { id: wrapper.id }); - } - if (name && providers.has(name)) { - const instanceWrapper = providers.get(name); - this.printFoundInModuleLog(name, moduleRef); - this.addDependencyMetadata(keyOrIndex, wrapper, instanceWrapper); - return instanceWrapper; - } - return this.lookupComponentInParentModules(dependencyContext, moduleRef, wrapper, contextId, inquirer, keyOrIndex); - } - async lookupComponentInParentModules(dependencyContext, moduleRef, wrapper, contextId = constants_2.STATIC_CONTEXT, inquirer, keyOrIndex) { - const instanceWrapper = await this.lookupComponentInImports(moduleRef, dependencyContext.name, wrapper, new Set(), contextId, inquirer, keyOrIndex); - if ((0, shared_utils_1.isNil)(instanceWrapper)) { - throw new unknown_dependencies_exception_1.UnknownDependenciesException(wrapper.name, dependencyContext, moduleRef, { id: wrapper.id }); - } - return instanceWrapper; - } - async lookupComponentInImports(moduleRef, name, wrapper, moduleRegistry = new Set(), contextId = constants_2.STATIC_CONTEXT, inquirer, keyOrIndex, isTraversing) { - let instanceWrapperRef = null; - const imports = moduleRef.imports || new Set(); - const identity = (item) => item; - let children = [...imports.values()].filter(identity); - if (isTraversing) { - const contextModuleExports = moduleRef.exports; - children = children.filter(child => contextModuleExports.has(child.metatype)); - } - for (const relatedModule of children) { - if (moduleRegistry.has(relatedModule.id)) { - continue; - } - this.printLookingForProviderLog(name, relatedModule); - moduleRegistry.add(relatedModule.id); - const { providers, exports } = relatedModule; - if (!exports.has(name) || !providers.has(name)) { - const instanceRef = await this.lookupComponentInImports(relatedModule, name, wrapper, moduleRegistry, contextId, inquirer, keyOrIndex, true); - if (instanceRef) { - this.addDependencyMetadata(keyOrIndex, wrapper, instanceRef); - return instanceRef; - } - continue; - } - this.printFoundInModuleLog(name, relatedModule); - instanceWrapperRef = providers.get(name); - this.addDependencyMetadata(keyOrIndex, wrapper, instanceWrapperRef); - const inquirerId = this.getInquirerId(inquirer); - const instanceHost = instanceWrapperRef.getInstanceByContextId(this.getContextId(contextId, instanceWrapperRef), inquirerId); - if (!instanceHost.isResolved && !instanceWrapperRef.forwardRef) { - /* - * Provider will be loaded shortly in resolveComponentHost() once we pass the current - * Barrier. We cannot load it here because doing so could incorrectly evaluate the - * staticity of the dependency tree and lead to undefined / null injection. - */ - break; - } - } - return instanceWrapperRef; - } - async resolveProperties(wrapper, moduleRef, inject, contextId = constants_2.STATIC_CONTEXT, inquirer, parentInquirer) { - if (!(0, shared_utils_1.isNil)(inject)) { - return []; - } - const metadata = wrapper.getPropertiesMetadata(); - if (metadata && contextId !== constants_2.STATIC_CONTEXT) { - return this.loadPropertiesMetadata(metadata, contextId, inquirer); - } - const properties = this.reflectProperties(wrapper.metatype); - const propertyBarrier = new barrier_1.Barrier(properties.length); - const instances = await Promise.all(properties.map(async (item) => { - try { - const dependencyContext = { - key: item.key, - name: item.name, - }; - if (this.isInquirer(item.name, parentInquirer)) { - /* - * Signal the barrier to make sure other dependencies do not get stuck waiting forever. - */ - propertyBarrier.signal(); - return parentInquirer && parentInquirer.instance; - } - const paramWrapper = await this.resolveSingleParam(wrapper, item.name, dependencyContext, moduleRef, contextId, inquirer, item.key); - /* - * Ensure that all instance wrappers are resolved at this point before we continue. - * Otherwise the staticity of `wrapper`'s dependency tree may be evaluated incorrectly - * and result in undefined / null injection. - */ - await propertyBarrier.signalAndWait(); - const effectivePropertyInquirer = this.getEffectiveInquirer(paramWrapper, inquirer, parentInquirer, contextId); - const paramWrapperWithInstance = await this.resolveComponentHost(moduleRef, paramWrapper, contextId, effectivePropertyInquirer); - if (!paramWrapperWithInstance) { - return undefined; - } - const instanceHost = paramWrapperWithInstance.getInstanceByContextId(this.getContextId(contextId, paramWrapperWithInstance), this.getInquirerId(effectivePropertyInquirer)); - return instanceHost.instance; - } - catch (err) { - /* - * Signal the barrier to make sure other dependencies do not get stuck waiting forever. We - * do not care if this occurs after `Barrier.signalAndWait()` is called in the `try` block - * because the barrier will always have been resolved by then. - */ - propertyBarrier.signal(); - if (!item.isOptional) { - throw err; - } - return undefined; - } - })); - return properties.map((item, index) => ({ - ...item, - instance: instances[index], - })); - } - reflectProperties(type) { - const properties = Reflect.getMetadata(constants_1.PROPERTY_DEPS_METADATA, type) || []; - const optionalKeys = Reflect.getMetadata(constants_1.OPTIONAL_PROPERTY_DEPS_METADATA, type) || []; - return properties.map((item) => ({ - ...item, - name: item.type, - isOptional: optionalKeys.includes(item.key), - })); - } - applyProperties(instance, properties) { - if (!(0, shared_utils_1.isObject)(instance)) { - return undefined; - } - (0, iterare_1.iterate)(properties) - .filter(item => !(0, shared_utils_1.isNil)(item.instance)) - .forEach(item => (instance[item.key] = item.instance)); - } - async instantiateClass(instances, wrapper, targetMetatype, contextId = constants_2.STATIC_CONTEXT, inquirer) { - const { metatype, inject } = wrapper; - const inquirerId = this.getInquirerId(inquirer); - const instanceHost = targetMetatype.getInstanceByContextId(this.getContextId(contextId, targetMetatype), inquirerId); - const isInContext = wrapper.isStatic(contextId, inquirer) || - wrapper.isInRequestScope(contextId, inquirer) || - wrapper.isLazyTransient(contextId, inquirer) || - wrapper.isExplicitlyRequested(contextId, inquirer); - if (this.options?.preview && !wrapper.host?.initOnPreview) { - instanceHost.isResolved = true; - return instanceHost.instance; - } - if ((0, shared_utils_1.isNil)(inject) && isInContext) { - instanceHost.instance = wrapper.forwardRef - ? Object.assign(instanceHost.instance, new metatype(...instances)) - : new metatype(...instances); - instanceHost.instance = this.instanceDecorator(instanceHost.instance); - instanceHost.isConstructorCalled = true; - } - else if (isInContext) { - const factoryReturnValue = targetMetatype.metatype(...instances); - instanceHost.instance = await factoryReturnValue; - instanceHost.instance = this.instanceDecorator(instanceHost.instance); - instanceHost.isConstructorCalled = true; - } - instanceHost.isResolved = true; - return instanceHost.instance; - } - async loadPerContext(instance, moduleRef, collection, ctx, wrapper) { - if (!wrapper) { - const injectionToken = instance.constructor; - wrapper = collection.get(injectionToken); - } - await this.loadInstance(wrapper, collection, moduleRef, ctx, wrapper); - await this.loadEnhancersPerContext(wrapper, ctx, wrapper); - const host = wrapper.getInstanceByContextId(this.getContextId(ctx, wrapper), wrapper.id); - return host && host.instance; - } - async loadEnhancersPerContext(wrapper, ctx, inquirer) { - const enhancers = wrapper.getEnhancersMetadata() || []; - const loadEnhancer = (item) => { - const hostModule = item.host; - return this.loadInstance(item, hostModule.injectables, hostModule, ctx, inquirer); - }; - await Promise.all(enhancers.map(loadEnhancer)); - } - async loadCtorMetadata(metadata, contextId, inquirer, parentInquirer) { - const hosts = await Promise.all(metadata.map(async (item) => this.resolveScopedComponentHost(item, contextId, inquirer, parentInquirer))); - return hosts.map((item, index) => { - const dependency = metadata[index]; - const effectiveInquirer = this.getEffectiveInquirer(dependency, inquirer, parentInquirer, contextId); - return item?.getInstanceByContextId(this.getContextId(contextId, item), this.getInquirerId(effectiveInquirer)).instance; - }); - } - async loadPropertiesMetadata(metadata, contextId, inquirer) { - const dependenciesHosts = await Promise.all(metadata.map(async ({ wrapper: item, key }) => ({ - key, - host: await this.resolveComponentHost(item.host, item, contextId, inquirer), - }))); - const inquirerId = this.getInquirerId(inquirer); - return dependenciesHosts.map(({ key, host }) => ({ - key, - name: key, - instance: host.getInstanceByContextId(this.getContextId(contextId, host), inquirerId).instance, - })); - } - getInquirerId(inquirer) { - return inquirer ? inquirer.id : undefined; - } - /** - * For nested TRANSIENT dependencies (TRANSIENT -> TRANSIENT) in non-static contexts, - * returns parentInquirer to ensure each parent TRANSIENT gets its own instance. - * This is necessary because in REQUEST/DURABLE scopes, the same TRANSIENT wrapper - * can be used by multiple parents, causing nested TRANSIENTs to be shared incorrectly. - * For non-TRANSIENT -> TRANSIENT, returns inquirer (current wrapper being created). - */ - getEffectiveInquirer(dependency, inquirer, parentInquirer, contextId) { - return dependency?.isTransient && - inquirer?.isTransient && - parentInquirer && - contextId !== constants_2.STATIC_CONTEXT - ? parentInquirer - : inquirer; - } - resolveScopedComponentHost(item, contextId, inquirer, parentInquirer) { - return this.isInquirerRequest(item, parentInquirer) - ? parentInquirer - : this.resolveComponentHost(item.host, item, contextId, this.getEffectiveInquirer(item, inquirer, parentInquirer, contextId)); - } - isInquirerRequest(item, parentInquirer) { - return item.isTransient && item.name === inquirer_1.INQUIRER && parentInquirer; - } - isInquirer(param, parentInquirer) { - return param === inquirer_1.INQUIRER && parentInquirer; - } - addDependencyMetadata(keyOrIndex, hostWrapper, instanceWrapper) { - if ((0, shared_utils_1.isSymbol)(keyOrIndex) || (0, shared_utils_1.isString)(keyOrIndex)) { - hostWrapper.addPropertiesMetadata(keyOrIndex, instanceWrapper); - } - else { - hostWrapper.addCtorMetadata(keyOrIndex, instanceWrapper); - } - } - getTokenName(token) { - return (0, shared_utils_1.isFunction)(token) ? token.name : token.toString(); - } - printResolvingDependenciesLog(token, inquirer) { - if (!this.isDebugMode()) { - return; - } - const tokenName = this.getTokenName(token); - const dependentName = (inquirer?.name && inquirer.name.toString?.()) ?? 'unknown'; - const isAlias = dependentName === tokenName; - const messageToPrint = `Resolving dependency ${cli_colors_util_1.clc.cyanBright(tokenName)}${cli_colors_util_1.clc.green(' in the ')}${cli_colors_util_1.clc.yellow(dependentName)}${cli_colors_util_1.clc.green(` provider ${isAlias ? '(alias)' : ''}`)}`; - this.logger.log(messageToPrint); - } - printLookingForProviderLog(token, moduleRef) { - if (!this.isDebugMode()) { - return; - } - const tokenName = this.getTokenName(token); - const moduleRefName = moduleRef?.metatype?.name ?? 'unknown'; - this.logger.log(`Looking for ${cli_colors_util_1.clc.cyanBright(tokenName)}${cli_colors_util_1.clc.green(' in ')}${cli_colors_util_1.clc.magentaBright(moduleRefName)}`); - } - printFoundInModuleLog(token, moduleRef) { - if (!this.isDebugMode()) { - return; - } - const tokenName = this.getTokenName(token); - const moduleRefName = moduleRef?.metatype?.name ?? 'unknown'; - this.logger.log(`Found ${cli_colors_util_1.clc.cyanBright(tokenName)}${cli_colors_util_1.clc.green(' in ')}${cli_colors_util_1.clc.magentaBright(moduleRefName)}`); - } - isDebugMode() { - return !!process.env.NEST_DEBUG; - } - getContextId(contextId, instanceWrapper) { - return contextId.getParent - ? contextId.getParent({ - token: instanceWrapper.token, - isTreeDurable: instanceWrapper.isDependencyTreeDurable(), - }) - : contextId; - } - getNowTimestamp() { - return perf_hooks_1.performance.now(); - } -} -exports.Injector = Injector; diff --git a/node_modules/@nestjs/core/injector/inquirer/index.d.ts b/node_modules/@nestjs/core/injector/inquirer/index.d.ts deleted file mode 100644 index cec511a..0000000 --- a/node_modules/@nestjs/core/injector/inquirer/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './inquirer-constants'; diff --git a/node_modules/@nestjs/core/injector/inquirer/index.js b/node_modules/@nestjs/core/injector/inquirer/index.js deleted file mode 100644 index cb2d7de..0000000 --- a/node_modules/@nestjs/core/injector/inquirer/index.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./inquirer-constants"), exports); diff --git a/node_modules/@nestjs/core/injector/inquirer/inquirer-constants.d.ts b/node_modules/@nestjs/core/injector/inquirer/inquirer-constants.d.ts deleted file mode 100644 index 8812636..0000000 --- a/node_modules/@nestjs/core/injector/inquirer/inquirer-constants.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const INQUIRER = "INQUIRER"; diff --git a/node_modules/@nestjs/core/injector/inquirer/inquirer-constants.js b/node_modules/@nestjs/core/injector/inquirer/inquirer-constants.js deleted file mode 100644 index ba023a1..0000000 --- a/node_modules/@nestjs/core/injector/inquirer/inquirer-constants.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.INQUIRER = void 0; -exports.INQUIRER = 'INQUIRER'; diff --git a/node_modules/@nestjs/core/injector/inquirer/inquirer-providers.d.ts b/node_modules/@nestjs/core/injector/inquirer/inquirer-providers.d.ts deleted file mode 100644 index 3a1d98d..0000000 --- a/node_modules/@nestjs/core/injector/inquirer/inquirer-providers.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Provider } from '@nestjs/common'; -export declare const inquirerProvider: Provider; diff --git a/node_modules/@nestjs/core/injector/inquirer/inquirer-providers.js b/node_modules/@nestjs/core/injector/inquirer/inquirer-providers.js deleted file mode 100644 index f70e4ee..0000000 --- a/node_modules/@nestjs/core/injector/inquirer/inquirer-providers.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.inquirerProvider = void 0; -const common_1 = require("@nestjs/common"); -const inquirer_constants_1 = require("./inquirer-constants"); -const noop = () => { }; -exports.inquirerProvider = { - provide: inquirer_constants_1.INQUIRER, - scope: common_1.Scope.TRANSIENT, - useFactory: noop, -}; diff --git a/node_modules/@nestjs/core/injector/instance-links-host.d.ts b/node_modules/@nestjs/core/injector/instance-links-host.d.ts deleted file mode 100644 index afcbc7a..0000000 --- a/node_modules/@nestjs/core/injector/instance-links-host.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { InjectionToken } from '@nestjs/common'; -import { NestContainer } from './container'; -import { InstanceWrapper } from './instance-wrapper'; -export interface InstanceLink { - token: InjectionToken; - wrapperRef: InstanceWrapper; - collection: Map; - moduleId: string; -} -export declare class InstanceLinksHost { - private readonly container; - private readonly instanceLinks; - constructor(container: NestContainer); - get(token: InjectionToken): InstanceLink; - get(token: InjectionToken, options?: { - moduleId?: string; - each?: boolean; - }): InstanceLink | Array>; - private initialize; - private addLink; - private getInstanceNameByToken; -} diff --git a/node_modules/@nestjs/core/injector/instance-links-host.js b/node_modules/@nestjs/core/injector/instance-links-host.js deleted file mode 100644 index 6a1b7e4..0000000 --- a/node_modules/@nestjs/core/injector/instance-links-host.js +++ /dev/null @@ -1,56 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.InstanceLinksHost = void 0; -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const unknown_element_exception_1 = require("../errors/exceptions/unknown-element.exception"); -class InstanceLinksHost { - constructor(container) { - this.container = container; - this.instanceLinks = new Map(); - this.initialize(); - } - get(token, options = {}) { - const instanceLinksForGivenToken = this.instanceLinks.get(token); - if (!instanceLinksForGivenToken) { - throw new unknown_element_exception_1.UnknownElementException(this.getInstanceNameByToken(token)); - } - if (options.each) { - return instanceLinksForGivenToken; - } - const instanceLink = options.moduleId - ? instanceLinksForGivenToken.find(item => item.moduleId === options.moduleId) - : instanceLinksForGivenToken[instanceLinksForGivenToken.length - 1]; - if (!instanceLink) { - throw new unknown_element_exception_1.UnknownElementException(this.getInstanceNameByToken(token)); - } - return instanceLink; - } - initialize() { - const modules = this.container.getModules(); - modules.forEach(moduleRef => { - const { providers, injectables, controllers } = moduleRef; - providers.forEach((wrapper, token) => this.addLink(wrapper, token, moduleRef, 'providers')); - injectables.forEach((wrapper, token) => this.addLink(wrapper, token, moduleRef, 'injectables')); - controllers.forEach((wrapper, token) => this.addLink(wrapper, token, moduleRef, 'controllers')); - }); - } - addLink(wrapper, token, moduleRef, collectionName) { - const instanceLink = { - moduleId: moduleRef.id, - wrapperRef: wrapper, - collection: moduleRef[collectionName], - token, - }; - const existingLinks = this.instanceLinks.get(token); - if (!existingLinks) { - this.instanceLinks.set(token, [instanceLink]); - } - else { - existingLinks.push(instanceLink); - } - } - getInstanceNameByToken(token) { - return (0, shared_utils_1.isFunction)(token) ? token?.name : token; - } -} -exports.InstanceLinksHost = InstanceLinksHost; diff --git a/node_modules/@nestjs/core/injector/instance-loader.d.ts b/node_modules/@nestjs/core/injector/instance-loader.d.ts deleted file mode 100644 index d0a8fe5..0000000 --- a/node_modules/@nestjs/core/injector/instance-loader.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Logger, LoggerService } from '@nestjs/common'; -import { GraphInspector } from '../inspector/graph-inspector'; -import { NestContainer } from './container'; -import { Injector } from './injector'; -import { Module } from './module'; -export declare class InstanceLoader { - protected readonly container: NestContainer; - protected readonly injector: TInjector; - protected readonly graphInspector: GraphInspector; - private logger; - constructor(container: NestContainer, injector: TInjector, graphInspector: GraphInspector, logger?: LoggerService); - setLogger(logger: Logger): void; - createInstancesOfDependencies(modules?: Map): Promise; - private createPrototypes; - private createInstances; - private createPrototypesOfProviders; - private createInstancesOfProviders; - private createPrototypesOfControllers; - private createInstancesOfControllers; - private createPrototypesOfInjectables; - private createInstancesOfInjectables; - private isModuleWhitelisted; -} diff --git a/node_modules/@nestjs/core/injector/instance-loader.js b/node_modules/@nestjs/core/injector/instance-loader.js deleted file mode 100644 index 33e149a..0000000 --- a/node_modules/@nestjs/core/injector/instance-loader.js +++ /dev/null @@ -1,88 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.InstanceLoader = void 0; -const common_1 = require("@nestjs/common"); -const messages_1 = require("../helpers/messages"); -const internal_core_module_1 = require("./internal-core-module/internal-core-module"); -class InstanceLoader { - constructor(container, injector, graphInspector, logger = new common_1.Logger(InstanceLoader.name, { - timestamp: true, - })) { - this.container = container; - this.injector = injector; - this.graphInspector = graphInspector; - this.logger = logger; - } - setLogger(logger) { - this.logger = logger; - } - async createInstancesOfDependencies(modules = this.container.getModules()) { - this.createPrototypes(modules); - try { - await this.createInstances(modules); - } - catch (err) { - this.graphInspector.inspectModules(modules); - this.graphInspector.registerPartial(err); - throw err; - } - this.graphInspector.inspectModules(modules); - } - createPrototypes(modules) { - modules.forEach(moduleRef => { - this.createPrototypesOfProviders(moduleRef); - this.createPrototypesOfInjectables(moduleRef); - this.createPrototypesOfControllers(moduleRef); - }); - } - async createInstances(modules) { - await Promise.all([...modules.values()].map(async (moduleRef) => { - await this.createInstancesOfProviders(moduleRef); - await this.createInstancesOfInjectables(moduleRef); - await this.createInstancesOfControllers(moduleRef); - const { name } = moduleRef; - this.isModuleWhitelisted(name) && - this.logger.log((0, messages_1.MODULE_INIT_MESSAGE) `${name}`); - })); - } - createPrototypesOfProviders(moduleRef) { - const { providers } = moduleRef; - providers.forEach(wrapper => this.injector.loadPrototype(wrapper, providers)); - } - async createInstancesOfProviders(moduleRef) { - const { providers } = moduleRef; - const wrappers = [...providers.values()]; - await Promise.all(wrappers.map(async (item) => { - await this.injector.loadProvider(item, moduleRef); - this.graphInspector.inspectInstanceWrapper(item, moduleRef); - })); - } - createPrototypesOfControllers(moduleRef) { - const { controllers } = moduleRef; - controllers.forEach(wrapper => this.injector.loadPrototype(wrapper, controllers)); - } - async createInstancesOfControllers(moduleRef) { - const { controllers } = moduleRef; - const wrappers = [...controllers.values()]; - await Promise.all(wrappers.map(async (item) => { - await this.injector.loadController(item, moduleRef); - this.graphInspector.inspectInstanceWrapper(item, moduleRef); - })); - } - createPrototypesOfInjectables(moduleRef) { - const { injectables } = moduleRef; - injectables.forEach(wrapper => this.injector.loadPrototype(wrapper, injectables)); - } - async createInstancesOfInjectables(moduleRef) { - const { injectables } = moduleRef; - const wrappers = [...injectables.values()]; - await Promise.all(wrappers.map(async (item) => { - await this.injector.loadInjectable(item, moduleRef); - this.graphInspector.inspectInstanceWrapper(item, moduleRef); - })); - } - isModuleWhitelisted(name) { - return name !== internal_core_module_1.InternalCoreModule.name; - } -} -exports.InstanceLoader = InstanceLoader; diff --git a/node_modules/@nestjs/core/injector/instance-wrapper.d.ts b/node_modules/@nestjs/core/injector/instance-wrapper.d.ts deleted file mode 100644 index 2f64977..0000000 --- a/node_modules/@nestjs/core/injector/instance-wrapper.d.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { Provider, Scope, Type } from '@nestjs/common'; -import { EnhancerSubtype } from '@nestjs/common/constants'; -import { FactoryProvider, InjectionToken } from '@nestjs/common/interfaces'; -import { Module } from './module'; -import { SettlementSignal } from './settlement-signal'; -export declare const INSTANCE_METADATA_SYMBOL: unique symbol; -export declare const INSTANCE_ID_SYMBOL: unique symbol; -export interface HostComponentInfo { - /** - * Injection token (or class reference) - */ - token: InjectionToken; - /** - * Flag that indicates whether DI subtree is durable - */ - isTreeDurable: boolean; -} -export interface ContextId { - readonly id: number; - payload?: unknown; - getParent?(info: HostComponentInfo): ContextId; -} -export interface InstancePerContext { - instance: T; - isResolved?: boolean; - isPending?: boolean; - donePromise?: Promise; - isConstructorCalled?: boolean; -} -export interface PropertyMetadata { - key: symbol | string; - wrapper: InstanceWrapper; -} -export declare class InstanceWrapper { - readonly name: any; - readonly token: InjectionToken; - readonly async?: boolean; - readonly host?: Module; - readonly isAlias: boolean; - readonly subtype?: EnhancerSubtype; - scope?: Scope; - metatype: Type | Function | null; - inject?: FactoryProvider['inject'] | null; - forwardRef?: boolean; - durable?: boolean; - initTime?: number; - settlementSignal?: SettlementSignal; - private static logger; - private readonly values; - private readonly [INSTANCE_METADATA_SYMBOL]; - private readonly [INSTANCE_ID_SYMBOL]; - private transientMap?; - private isTreeStatic; - private isTreeDurable; - /** - * The root inquirer reference. Present only if child instance wrapper - * is transient and has a parent inquirer. - */ - private rootInquirer; - constructor(metadata?: Partial> & Partial>); - get id(): string; - set instance(value: T); - get instance(): T; - get isNotMetatype(): boolean; - get isFactory(): boolean; - get isTransient(): boolean; - getInstanceByContextId(contextId: ContextId, inquirerId?: string): InstancePerContext; - getInstanceByInquirerId(contextId: ContextId, inquirerId: string): InstancePerContext; - setInstanceByContextId(contextId: ContextId, value: InstancePerContext, inquirerId?: string): void; - setInstanceByInquirerId(contextId: ContextId, inquirerId: string, value: InstancePerContext): void; - removeInstanceByContextId(contextId: ContextId, inquirerId?: string): void; - removeInstanceByInquirerId(contextId: ContextId, inquirerId: string): void; - addCtorMetadata(index: number, wrapper: InstanceWrapper): void; - getCtorMetadata(): InstanceWrapper[]; - addPropertiesMetadata(key: symbol | string, wrapper: InstanceWrapper): void; - getPropertiesMetadata(): PropertyMetadata[]; - addEnhancerMetadata(wrapper: InstanceWrapper): void; - getEnhancersMetadata(): InstanceWrapper[]; - isDependencyTreeDurable(lookupRegistry?: string[]): boolean; - introspectDepsAttribute(callback: (collection: InstanceWrapper[], lookupRegistry: string[]) => boolean, lookupRegistry?: string[]): boolean; - isDependencyTreeStatic(lookupRegistry?: string[]): boolean; - cloneStaticInstance(contextId: ContextId): InstancePerContext; - cloneTransientInstance(contextId: ContextId, inquirerId: string): InstancePerContext; - createPrototype(contextId: ContextId): any; - isInRequestScope(contextId: ContextId, inquirer?: InstanceWrapper): boolean; - isLazyTransient(contextId: ContextId, inquirer: InstanceWrapper | undefined): boolean; - isExplicitlyRequested(contextId: ContextId, inquirer?: InstanceWrapper): boolean; - isStatic(contextId: ContextId, inquirer: InstanceWrapper | undefined): boolean; - attachRootInquirer(inquirer: InstanceWrapper): void; - getRootInquirer(): InstanceWrapper | undefined; - getStaticTransientInstances(): (InstancePerContext | undefined)[]; - mergeWith(provider: Provider): void; - private isNewable; - private initialize; - private printIntrospectedAsRequestScoped; - private printIntrospectedAsDurable; - private isDebugMode; - private generateUuid; -} diff --git a/node_modules/@nestjs/core/injector/instance-wrapper.js b/node_modules/@nestjs/core/injector/instance-wrapper.js deleted file mode 100644 index d388d39..0000000 --- a/node_modules/@nestjs/core/injector/instance-wrapper.js +++ /dev/null @@ -1,350 +0,0 @@ -"use strict"; -var _a; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.InstanceWrapper = exports.INSTANCE_ID_SYMBOL = exports.INSTANCE_METADATA_SYMBOL = void 0; -const common_1 = require("@nestjs/common"); -const cli_colors_util_1 = require("@nestjs/common/utils/cli-colors.util"); -const random_string_generator_util_1 = require("@nestjs/common/utils/random-string-generator.util"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const iterare_1 = require("iterare"); -const uuid_factory_1 = require("../inspector/uuid-factory"); -const constants_1 = require("./constants"); -const provider_classifier_1 = require("./helpers/provider-classifier"); -exports.INSTANCE_METADATA_SYMBOL = Symbol.for('instance_metadata:cache'); -exports.INSTANCE_ID_SYMBOL = Symbol.for('instance_metadata:id'); -class InstanceWrapper { - constructor(metadata = {}) { - this.isAlias = false; - this.scope = common_1.Scope.DEFAULT; - this.values = new WeakMap(); - this[_a] = {}; - this.initialize(metadata); - this[exports.INSTANCE_ID_SYMBOL] = - metadata[exports.INSTANCE_ID_SYMBOL] ?? this.generateUuid(); - } - get id() { - return this[exports.INSTANCE_ID_SYMBOL]; - } - set instance(value) { - this.values.set(constants_1.STATIC_CONTEXT, { instance: value }); - } - get instance() { - const instancePerContext = this.getInstanceByContextId(constants_1.STATIC_CONTEXT); - return instancePerContext.instance; - } - get isNotMetatype() { - return !this.metatype || this.isFactory; - } - get isFactory() { - return !!this.metatype && !(0, shared_utils_1.isNil)(this.inject); - } - get isTransient() { - return this.scope === common_1.Scope.TRANSIENT; - } - getInstanceByContextId(contextId, inquirerId) { - if (this.scope === common_1.Scope.TRANSIENT && inquirerId) { - return this.getInstanceByInquirerId(contextId, inquirerId); - } - const instancePerContext = this.values.get(contextId); - return instancePerContext - ? instancePerContext - : contextId !== constants_1.STATIC_CONTEXT - ? this.cloneStaticInstance(contextId) - : { - instance: null, - isResolved: true, - isPending: false, - }; - } - getInstanceByInquirerId(contextId, inquirerId) { - let collectionPerContext = this.transientMap.get(inquirerId); - if (!collectionPerContext) { - collectionPerContext = new WeakMap(); - this.transientMap.set(inquirerId, collectionPerContext); - } - const instancePerContext = collectionPerContext.get(contextId); - return instancePerContext - ? instancePerContext - : this.cloneTransientInstance(contextId, inquirerId); - } - setInstanceByContextId(contextId, value, inquirerId) { - if (this.scope === common_1.Scope.TRANSIENT && inquirerId) { - return this.setInstanceByInquirerId(contextId, inquirerId, value); - } - this.values.set(contextId, value); - } - setInstanceByInquirerId(contextId, inquirerId, value) { - let collection = this.transientMap.get(inquirerId); - if (!collection) { - collection = new WeakMap(); - this.transientMap.set(inquirerId, collection); - } - collection.set(contextId, value); - } - removeInstanceByContextId(contextId, inquirerId) { - if (this.scope === common_1.Scope.TRANSIENT && inquirerId) { - return this.removeInstanceByInquirerId(contextId, inquirerId); - } - this.values.delete(contextId); - } - removeInstanceByInquirerId(contextId, inquirerId) { - const collection = this.transientMap.get(inquirerId); - if (!collection) { - return; - } - collection.delete(contextId); - } - addCtorMetadata(index, wrapper) { - if (!this[exports.INSTANCE_METADATA_SYMBOL].dependencies) { - this[exports.INSTANCE_METADATA_SYMBOL].dependencies = []; - } - this[exports.INSTANCE_METADATA_SYMBOL].dependencies[index] = wrapper; - } - getCtorMetadata() { - return this[exports.INSTANCE_METADATA_SYMBOL].dependencies; - } - addPropertiesMetadata(key, wrapper) { - if (!this[exports.INSTANCE_METADATA_SYMBOL].properties) { - this[exports.INSTANCE_METADATA_SYMBOL].properties = []; - } - this[exports.INSTANCE_METADATA_SYMBOL].properties.push({ - key, - wrapper, - }); - } - getPropertiesMetadata() { - return this[exports.INSTANCE_METADATA_SYMBOL].properties; - } - addEnhancerMetadata(wrapper) { - if (!this[exports.INSTANCE_METADATA_SYMBOL].enhancers) { - this[exports.INSTANCE_METADATA_SYMBOL].enhancers = []; - } - this[exports.INSTANCE_METADATA_SYMBOL].enhancers.push(wrapper); - } - getEnhancersMetadata() { - return this[exports.INSTANCE_METADATA_SYMBOL].enhancers; - } - isDependencyTreeDurable(lookupRegistry = []) { - if (!(0, shared_utils_1.isUndefined)(this.isTreeDurable)) { - return this.isTreeDurable; - } - if (this.scope === common_1.Scope.REQUEST) { - this.isTreeDurable = this.durable === undefined ? false : this.durable; - if (this.isTreeDurable) { - this.printIntrospectedAsDurable(); - } - return this.isTreeDurable; - } - const isStatic = this.isDependencyTreeStatic(); - if (isStatic) { - return false; - } - const isTreeNonDurable = this.introspectDepsAttribute((collection, registry) => collection.some((item) => !item.isDependencyTreeStatic() && - !item.isDependencyTreeDurable(registry)), lookupRegistry); - this.isTreeDurable = !isTreeNonDurable; - if (this.isTreeDurable) { - this.printIntrospectedAsDurable(); - } - return this.isTreeDurable; - } - introspectDepsAttribute(callback, lookupRegistry = []) { - if (lookupRegistry.includes(this[exports.INSTANCE_ID_SYMBOL])) { - return false; - } - lookupRegistry = lookupRegistry.concat(this[exports.INSTANCE_ID_SYMBOL]); - const { dependencies, properties, enhancers } = this[exports.INSTANCE_METADATA_SYMBOL]; - let introspectionResult = dependencies - ? callback(dependencies, lookupRegistry) - : false; - if (introspectionResult || !(properties || enhancers)) { - return introspectionResult; - } - introspectionResult = properties - ? callback(properties.map(item => item.wrapper), lookupRegistry) - : false; - if (introspectionResult || !enhancers) { - return introspectionResult; - } - return enhancers ? callback(enhancers, lookupRegistry) : false; - } - isDependencyTreeStatic(lookupRegistry = []) { - if (!(0, shared_utils_1.isUndefined)(this.isTreeStatic)) { - return this.isTreeStatic; - } - if (this.scope === common_1.Scope.REQUEST) { - this.isTreeStatic = false; - this.printIntrospectedAsRequestScoped(); - return this.isTreeStatic; - } - this.isTreeStatic = !this.introspectDepsAttribute((collection, registry) => collection.some((item) => !item.isDependencyTreeStatic(registry)), lookupRegistry); - if (!this.isTreeStatic) { - this.printIntrospectedAsRequestScoped(); - } - return this.isTreeStatic; - } - cloneStaticInstance(contextId) { - const staticInstance = this.getInstanceByContextId(constants_1.STATIC_CONTEXT); - if (this.isDependencyTreeStatic()) { - return staticInstance; - } - const instancePerContext = { - ...staticInstance, - instance: undefined, - isResolved: false, - isPending: false, - }; - if (this.isNewable()) { - instancePerContext.instance = Object.create(this.metatype.prototype); - } - this.setInstanceByContextId(contextId, instancePerContext); - return instancePerContext; - } - cloneTransientInstance(contextId, inquirerId) { - const staticInstance = this.getInstanceByContextId(constants_1.STATIC_CONTEXT); - const instancePerContext = { - ...staticInstance, - instance: undefined, - isResolved: false, - isPending: false, - }; - if (this.isNewable()) { - instancePerContext.instance = Object.create(this.metatype.prototype); - } - this.setInstanceByInquirerId(contextId, inquirerId, instancePerContext); - return instancePerContext; - } - createPrototype(contextId) { - const host = this.getInstanceByContextId(contextId); - if (!this.isNewable() || host.isResolved) { - return; - } - return Object.create(this.metatype.prototype); - } - isInRequestScope(contextId, inquirer) { - const isDependencyTreeStatic = this.isDependencyTreeStatic(); - return (!isDependencyTreeStatic && - contextId !== constants_1.STATIC_CONTEXT && - (!this.isTransient || (this.isTransient && !!inquirer))); - } - isLazyTransient(contextId, inquirer) { - const isInquirerRequestScoped = !!(inquirer && !inquirer.isDependencyTreeStatic()); - return (this.isDependencyTreeStatic() && - contextId !== constants_1.STATIC_CONTEXT && - this.isTransient && - isInquirerRequestScoped); - } - isExplicitlyRequested(contextId, inquirer) { - const isSelfRequested = inquirer === this; - return (this.isDependencyTreeStatic() && - contextId !== constants_1.STATIC_CONTEXT && - (isSelfRequested || !!(inquirer && inquirer.scope === common_1.Scope.TRANSIENT))); - } - isStatic(contextId, inquirer) { - if (!this.isDependencyTreeStatic() || contextId !== constants_1.STATIC_CONTEXT) { - return false; - } - // Non-transient provider in static context - if (!this.isTransient) { - return true; - } - const isInquirerRequestScoped = inquirer && !inquirer.isDependencyTreeStatic(); - const isStaticTransient = this.isTransient && !isInquirerRequestScoped; - const rootInquirer = inquirer?.getRootInquirer(); - // Transient provider inquired by non-transient (e.g., DEFAULT -> TRANSIENT) - if (isStaticTransient && inquirer && !inquirer.isTransient) { - return true; - } - // Nested transient with non-transient root (e.g., DEFAULT -> TRANSIENT -> TRANSIENT) - if (isStaticTransient && rootInquirer && !rootInquirer.isTransient) { - return true; - } - // Nested transient during initial instantiation (rootInquirer not yet set) - if (isStaticTransient && inquirer?.isTransient && !rootInquirer) { - return true; - } - return false; - } - attachRootInquirer(inquirer) { - if (!this.isTransient) { - // Only attach root inquirer if the instance wrapper is transient - return; - } - this.rootInquirer = inquirer.getRootInquirer() ?? inquirer; - } - getRootInquirer() { - return this.rootInquirer; - } - getStaticTransientInstances() { - if (!this.transientMap) { - return []; - } - const instances = [...this.transientMap.values()]; - return (0, iterare_1.iterate)(instances) - .map(item => item.get(constants_1.STATIC_CONTEXT)) - .filter(item => { - // Only return items where constructor has been actually called - // This prevents calling lifecycle hooks on non-instantiated transient services - return !!(item && item.isConstructorCalled); - }) - .toArray(); - } - mergeWith(provider) { - if ((0, provider_classifier_1.isValueProvider)(provider)) { - this.metatype = null; - this.inject = null; - this.scope = common_1.Scope.DEFAULT; - this.setInstanceByContextId(constants_1.STATIC_CONTEXT, { - instance: provider.useValue, - isResolved: true, - isPending: false, - }); - } - else if ((0, provider_classifier_1.isClassProvider)(provider)) { - this.inject = null; - this.metatype = provider.useClass; - } - else if ((0, provider_classifier_1.isFactoryProvider)(provider)) { - this.metatype = provider.useFactory; - this.inject = provider.inject || []; - } - } - isNewable() { - return (0, shared_utils_1.isNil)(this.inject) && this.metatype && this.metatype.prototype; - } - initialize(metadata) { - const { instance, isResolved, ...wrapperPartial } = metadata; - Object.assign(this, wrapperPartial); - this.setInstanceByContextId(constants_1.STATIC_CONTEXT, { - instance: instance, - isResolved, - }); - this.scope === common_1.Scope.TRANSIENT && (this.transientMap = new Map()); - } - printIntrospectedAsRequestScoped() { - if (!this.isDebugMode() || this.name === 'REQUEST') { - return; - } - if ((0, shared_utils_1.isString)(this.name)) { - InstanceWrapper.logger.log(`${cli_colors_util_1.clc.cyanBright(this.name)}${cli_colors_util_1.clc.green(' introspected as ')}${cli_colors_util_1.clc.magentaBright('request-scoped')}`); - } - } - printIntrospectedAsDurable() { - if (!this.isDebugMode()) { - return; - } - if ((0, shared_utils_1.isString)(this.name)) { - InstanceWrapper.logger.log(`${cli_colors_util_1.clc.cyanBright(this.name)}${cli_colors_util_1.clc.green(' introspected as ')}${cli_colors_util_1.clc.magentaBright('durable')}`); - } - } - isDebugMode() { - return !!process.env.NEST_DEBUG; - } - generateUuid() { - let key = this.name?.toString() ?? this.token?.toString(); - key += this.host?.name ?? ''; - return key ? uuid_factory_1.UuidFactory.get(key) : (0, random_string_generator_util_1.randomStringGenerator)(); - } -} -exports.InstanceWrapper = InstanceWrapper; -_a = exports.INSTANCE_METADATA_SYMBOL; -InstanceWrapper.logger = new common_1.Logger(InstanceWrapper.name); diff --git a/node_modules/@nestjs/core/injector/internal-core-module/index.d.ts b/node_modules/@nestjs/core/injector/internal-core-module/index.d.ts deleted file mode 100644 index a863c21..0000000 --- a/node_modules/@nestjs/core/injector/internal-core-module/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './internal-core-module'; diff --git a/node_modules/@nestjs/core/injector/internal-core-module/index.js b/node_modules/@nestjs/core/injector/internal-core-module/index.js deleted file mode 100644 index 6f75711..0000000 --- a/node_modules/@nestjs/core/injector/internal-core-module/index.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./internal-core-module"), exports); diff --git a/node_modules/@nestjs/core/injector/internal-core-module/internal-core-module-factory.d.ts b/node_modules/@nestjs/core/injector/internal-core-module/internal-core-module-factory.d.ts deleted file mode 100644 index 18f5015..0000000 --- a/node_modules/@nestjs/core/injector/internal-core-module/internal-core-module-factory.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { HttpAdapterHost } from '../../helpers/http-adapter-host'; -import { GraphInspector } from '../../inspector/graph-inspector'; -import { ModuleOverride } from '../../interfaces/module-override.interface'; -import { DependenciesScanner } from '../../scanner'; -import { ModuleCompiler } from '../compiler'; -import { NestContainer } from '../container'; -export declare class InternalCoreModuleFactory { - static create(container: NestContainer, scanner: DependenciesScanner, moduleCompiler: ModuleCompiler, httpAdapterHost: HttpAdapterHost, graphInspector: GraphInspector, moduleOverrides?: ModuleOverride[]): import("@nestjs/common").DynamicModule; -} diff --git a/node_modules/@nestjs/core/injector/internal-core-module/internal-core-module-factory.js b/node_modules/@nestjs/core/injector/internal-core-module/internal-core-module-factory.js deleted file mode 100644 index 17765e5..0000000 --- a/node_modules/@nestjs/core/injector/internal-core-module/internal-core-module-factory.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.InternalCoreModuleFactory = void 0; -const common_1 = require("@nestjs/common"); -const external_context_creator_1 = require("../../helpers/external-context-creator"); -const http_adapter_host_1 = require("../../helpers/http-adapter-host"); -const initialize_on_preview_allowlist_1 = require("../../inspector/initialize-on-preview.allowlist"); -const serialized_graph_1 = require("../../inspector/serialized-graph"); -const injector_1 = require("../injector"); -const instance_loader_1 = require("../instance-loader"); -const lazy_module_loader_1 = require("../lazy-module-loader/lazy-module-loader"); -const modules_container_1 = require("../modules-container"); -const internal_core_module_1 = require("./internal-core-module"); -class InternalCoreModuleFactory { - static create(container, scanner, moduleCompiler, httpAdapterHost, graphInspector, moduleOverrides) { - const lazyModuleLoaderFactory = () => { - const logger = new common_1.Logger(lazy_module_loader_1.LazyModuleLoader.name, { - timestamp: false, - }); - const injector = new injector_1.Injector({ - preview: container.contextOptions?.preview, - instanceDecorator: container.contextOptions?.instrument?.instanceDecorator, - }); - const instanceLoader = new instance_loader_1.InstanceLoader(container, injector, graphInspector, logger); - return new lazy_module_loader_1.LazyModuleLoader(scanner, instanceLoader, moduleCompiler, container.getModules(), moduleOverrides); - }; - initialize_on_preview_allowlist_1.InitializeOnPreviewAllowlist.add(internal_core_module_1.InternalCoreModule); - return internal_core_module_1.InternalCoreModule.register([ - { - provide: external_context_creator_1.ExternalContextCreator, - useFactory: () => external_context_creator_1.ExternalContextCreator.fromContainer(container), - }, - { - provide: modules_container_1.ModulesContainer, - useFactory: () => container.getModules(), - }, - { - provide: http_adapter_host_1.HttpAdapterHost, - useFactory: () => httpAdapterHost, - }, - { - provide: lazy_module_loader_1.LazyModuleLoader, - useFactory: lazyModuleLoaderFactory, - }, - { - provide: serialized_graph_1.SerializedGraph, - useFactory: () => container.serializedGraph, - }, - ]); - } -} -exports.InternalCoreModuleFactory = InternalCoreModuleFactory; diff --git a/node_modules/@nestjs/core/injector/internal-core-module/internal-core-module.d.ts b/node_modules/@nestjs/core/injector/internal-core-module/internal-core-module.d.ts deleted file mode 100644 index 39f4d50..0000000 --- a/node_modules/@nestjs/core/injector/internal-core-module/internal-core-module.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { DynamicModule } from '@nestjs/common'; -import { ExistingProvider, FactoryProvider, ValueProvider } from '@nestjs/common/interfaces'; -export declare class InternalCoreModule { - static register(providers: Array): DynamicModule; -} diff --git a/node_modules/@nestjs/core/injector/internal-core-module/internal-core-module.js b/node_modules/@nestjs/core/injector/internal-core-module/internal-core-module.js deleted file mode 100644 index e8eda19..0000000 --- a/node_modules/@nestjs/core/injector/internal-core-module/internal-core-module.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -var InternalCoreModule_1; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.InternalCoreModule = void 0; -const tslib_1 = require("tslib"); -const common_1 = require("@nestjs/common"); -const request_providers_1 = require("../../router/request/request-providers"); -const services_1 = require("../../services"); -const inquirer_providers_1 = require("../inquirer/inquirer-providers"); -const ReflectorAliasProvider = { - provide: services_1.Reflector.name, - useExisting: services_1.Reflector, -}; -let InternalCoreModule = InternalCoreModule_1 = class InternalCoreModule { - static register(providers) { - return { - module: InternalCoreModule_1, - providers: [...providers], - exports: [...providers.map(item => item.provide)], - }; - } -}; -exports.InternalCoreModule = InternalCoreModule; -exports.InternalCoreModule = InternalCoreModule = InternalCoreModule_1 = tslib_1.__decorate([ - (0, common_1.Global)(), - (0, common_1.Module)({ - providers: [ - services_1.Reflector, - ReflectorAliasProvider, - request_providers_1.requestProvider, - inquirer_providers_1.inquirerProvider, - ], - exports: [ - services_1.Reflector, - ReflectorAliasProvider, - request_providers_1.requestProvider, - inquirer_providers_1.inquirerProvider, - ], - }) -], InternalCoreModule); diff --git a/node_modules/@nestjs/core/injector/internal-providers-storage.d.ts b/node_modules/@nestjs/core/injector/internal-providers-storage.d.ts deleted file mode 100644 index cba5609..0000000 --- a/node_modules/@nestjs/core/injector/internal-providers-storage.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { AbstractHttpAdapter } from '../adapters'; -import { HttpAdapterHost } from '../helpers/http-adapter-host'; -export declare class InternalProvidersStorage { - private readonly _httpAdapterHost; - private _httpAdapter; - get httpAdapterHost(): HttpAdapterHost; - get httpAdapter(): AbstractHttpAdapter; - set httpAdapter(httpAdapter: AbstractHttpAdapter); -} diff --git a/node_modules/@nestjs/core/injector/internal-providers-storage.js b/node_modules/@nestjs/core/injector/internal-providers-storage.js deleted file mode 100644 index c9dbdac..0000000 --- a/node_modules/@nestjs/core/injector/internal-providers-storage.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.InternalProvidersStorage = void 0; -const http_adapter_host_1 = require("../helpers/http-adapter-host"); -class InternalProvidersStorage { - constructor() { - this._httpAdapterHost = new http_adapter_host_1.HttpAdapterHost(); - } - get httpAdapterHost() { - return this._httpAdapterHost; - } - get httpAdapter() { - return this._httpAdapter; - } - set httpAdapter(httpAdapter) { - this._httpAdapter = httpAdapter; - } -} -exports.InternalProvidersStorage = InternalProvidersStorage; diff --git a/node_modules/@nestjs/core/injector/lazy-module-loader/lazy-module-loader-options.interface.d.ts b/node_modules/@nestjs/core/injector/lazy-module-loader/lazy-module-loader-options.interface.d.ts deleted file mode 100644 index fc2d3d5..0000000 --- a/node_modules/@nestjs/core/injector/lazy-module-loader/lazy-module-loader-options.interface.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface LazyModuleLoaderLoadOptions { - /** - * If `false`, no logs will be generated when loading some module lazily. - */ - logger?: boolean; -} diff --git a/node_modules/@nestjs/core/injector/lazy-module-loader/lazy-module-loader-options.interface.js b/node_modules/@nestjs/core/injector/lazy-module-loader/lazy-module-loader-options.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/core/injector/lazy-module-loader/lazy-module-loader-options.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/core/injector/lazy-module-loader/lazy-module-loader.d.ts b/node_modules/@nestjs/core/injector/lazy-module-loader/lazy-module-loader.d.ts deleted file mode 100644 index 72590d8..0000000 --- a/node_modules/@nestjs/core/injector/lazy-module-loader/lazy-module-loader.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { DynamicModule, Type } from '@nestjs/common'; -import { ModuleOverride } from '../../interfaces/module-override.interface'; -import { DependenciesScanner } from '../../scanner'; -import { ModuleCompiler } from '../compiler'; -import { InstanceLoader } from '../instance-loader'; -import { ModuleRef } from '../module-ref'; -import { ModulesContainer } from '../modules-container'; -import { LazyModuleLoaderLoadOptions } from './lazy-module-loader-options.interface'; -export declare class LazyModuleLoader { - private readonly dependenciesScanner; - private readonly instanceLoader; - private readonly moduleCompiler; - private readonly modulesContainer; - private readonly moduleOverrides?; - constructor(dependenciesScanner: DependenciesScanner, instanceLoader: InstanceLoader, moduleCompiler: ModuleCompiler, modulesContainer: ModulesContainer, moduleOverrides?: ModuleOverride[] | undefined); - load(loaderFn: () => Promise | DynamicModule> | Type | DynamicModule, loadOpts?: LazyModuleLoaderLoadOptions): Promise; - private registerLoggerConfiguration; - private createLazyModulesContainer; - private getTargetModuleRef; -} diff --git a/node_modules/@nestjs/core/injector/lazy-module-loader/lazy-module-loader.js b/node_modules/@nestjs/core/injector/lazy-module-loader/lazy-module-loader.js deleted file mode 100644 index f6f52e8..0000000 --- a/node_modules/@nestjs/core/injector/lazy-module-loader/lazy-module-loader.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LazyModuleLoader = void 0; -const silent_logger_1 = require("../helpers/silent-logger"); -const module_ref_1 = require("../module-ref"); -class LazyModuleLoader { - constructor(dependenciesScanner, instanceLoader, moduleCompiler, modulesContainer, moduleOverrides) { - this.dependenciesScanner = dependenciesScanner; - this.instanceLoader = instanceLoader; - this.moduleCompiler = moduleCompiler; - this.modulesContainer = modulesContainer; - this.moduleOverrides = moduleOverrides; - } - async load(loaderFn, loadOpts) { - this.registerLoggerConfiguration(loadOpts); - const moduleClassOrDynamicDefinition = await loaderFn(); - const moduleInstances = await this.dependenciesScanner.scanForModules({ - moduleDefinition: moduleClassOrDynamicDefinition, - overrides: this.moduleOverrides, - lazy: true, - }); - if (moduleInstances.length === 0) { - // The module has been loaded already. In this case, we must - // retrieve a module reference from the existing container. - const { token } = await this.moduleCompiler.compile(moduleClassOrDynamicDefinition); - const moduleInstance = this.modulesContainer.get(token); - return moduleInstance && this.getTargetModuleRef(moduleInstance); - } - const lazyModulesContainer = this.createLazyModulesContainer(moduleInstances); - await this.dependenciesScanner.scanModulesForDependencies(lazyModulesContainer); - await this.instanceLoader.createInstancesOfDependencies(lazyModulesContainer); - const [targetModule] = moduleInstances; - return this.getTargetModuleRef(targetModule); - } - registerLoggerConfiguration(loadOpts) { - if (loadOpts?.logger === false) { - this.instanceLoader.setLogger(new silent_logger_1.SilentLogger()); - } - } - createLazyModulesContainer(moduleInstances) { - moduleInstances = Array.from(new Set(moduleInstances)); - return new Map(moduleInstances.map(ref => [ref.token, ref])); - } - getTargetModuleRef(moduleInstance) { - const moduleRefInstanceWrapper = moduleInstance.getProviderByKey(module_ref_1.ModuleRef); - return moduleRefInstanceWrapper.instance; - } -} -exports.LazyModuleLoader = LazyModuleLoader; diff --git a/node_modules/@nestjs/core/injector/module-ref.d.ts b/node_modules/@nestjs/core/injector/module-ref.d.ts deleted file mode 100644 index b846f07..0000000 --- a/node_modules/@nestjs/core/injector/module-ref.d.ts +++ /dev/null @@ -1,106 +0,0 @@ -import { IntrospectionResult, Type } from '@nestjs/common'; -import { AbstractInstanceResolver } from './abstract-instance-resolver'; -import { NestContainer } from './container'; -import { Injector } from './injector'; -import { InstanceLinksHost } from './instance-links-host'; -import { ContextId } from './instance-wrapper'; -import { Module } from './module'; -export interface ModuleRefGetOrResolveOpts { - /** - * If enabled, lookup will only be performed in the host module. - * @default true - */ - strict?: boolean; - /** - * If enabled, instead of returning a first instance registered under a given token, - * a list of instances will be returned. - * @default false - */ - each?: boolean; -} -export declare abstract class ModuleRef extends AbstractInstanceResolver { - protected readonly container: NestContainer; - protected readonly injector: Injector; - private _instanceLinksHost; - protected get instanceLinksHost(): InstanceLinksHost; - constructor(container: NestContainer); - /** - * Retrieves an instance of either injectable or controller, otherwise, throws exception. - * @returns {TResult} - */ - abstract get(typeOrToken: Type | Function | string | symbol): TResult; - /** - * Retrieves an instance of either injectable or controller, otherwise, throws exception. - * @returns {TResult} - */ - abstract get(typeOrToken: Type | Function | string | symbol, options: { - /** - * If enabled, lookup will only be performed in the host module. - * @default true - */ - strict?: boolean; - /** This indicates that only the first instance registered will be returned. */ - each?: undefined | false; - }): TResult; - /** - * Retrieves a list of instances of either injectables or controllers, otherwise, throws exception. - * @returns {Array} - */ - abstract get(typeOrToken: Type | Function | string | symbol, options: { - /** - * If enabled, lookup will only be performed in the host module. - * @default true - */ - strict?: boolean; - /** This indicates that a list of instances will be returned. */ - each: true; - }): Array; - /** - * Retrieves an instance (or a list of instances) of either injectable or controller, otherwise, throws exception. - * @returns {TResult | Array} - */ - abstract get(typeOrToken: Type | Function | string | symbol, options?: ModuleRefGetOrResolveOpts): TResult | Array; - /** - * Resolves transient or request-scoped instance of either injectable or controller, otherwise, throws exception. - * @returns {Array} - */ - abstract resolve(typeOrToken: Type | Function | string | symbol): Promise; - /** - * Resolves transient or request-scoped instance of either injectable or controller, otherwise, throws exception. - * @returns {Array} - */ - abstract resolve(typeOrToken: Type | Function | string | symbol, contextId?: { - id: number; - }): Promise; - /** - * Resolves transient or request-scoped instance of either injectable or controller, otherwise, throws exception. - * @returns {Array} - */ - abstract resolve(typeOrToken: Type | Function | string | symbol, contextId?: { - id: number; - }, options?: { - strict?: boolean; - each?: undefined | false; - }): Promise; - /** - * Resolves transient or request-scoped instances of either injectables or controllers, otherwise, throws exception. - * @returns {Array} - */ - abstract resolve(typeOrToken: Type | Function | string | symbol, contextId?: { - id: number; - }, options?: { - strict?: boolean; - each: true; - }): Promise>; - /** - * Resolves transient or request-scoped instance (or a list of instances) of either injectable or controller, otherwise, throws exception. - * @returns {Promise>} - */ - abstract resolve(typeOrToken: Type | Function | string | symbol, contextId?: { - id: number; - }, options?: ModuleRefGetOrResolveOpts): Promise>; - abstract create(type: Type, contextId?: ContextId): Promise; - introspect(token: Type | string | symbol): IntrospectionResult; - registerRequestByContextId(request: T, contextId: ContextId): void; - protected instantiateClass(type: Type, moduleRef: Module, contextId?: ContextId): Promise; -} diff --git a/node_modules/@nestjs/core/injector/module-ref.js b/node_modules/@nestjs/core/injector/module-ref.js deleted file mode 100644 index 0f4c0fb..0000000 --- a/node_modules/@nestjs/core/injector/module-ref.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ModuleRef = void 0; -const common_1 = require("@nestjs/common"); -const get_class_scope_1 = require("../helpers/get-class-scope"); -const is_durable_1 = require("../helpers/is-durable"); -const abstract_instance_resolver_1 = require("./abstract-instance-resolver"); -const injector_1 = require("./injector"); -const instance_links_host_1 = require("./instance-links-host"); -const instance_wrapper_1 = require("./instance-wrapper"); -class ModuleRef extends abstract_instance_resolver_1.AbstractInstanceResolver { - get instanceLinksHost() { - if (!this._instanceLinksHost) { - this._instanceLinksHost = new instance_links_host_1.InstanceLinksHost(this.container); - } - return this._instanceLinksHost; - } - constructor(container) { - super(); - this.container = container; - this.injector = new injector_1.Injector({ - preview: container.contextOptions?.preview, - instanceDecorator: container.contextOptions?.instrument?.instanceDecorator, - }); - } - introspect(token) { - const { wrapperRef } = this.instanceLinksHost.get(token); - let scope = common_1.Scope.DEFAULT; - if (!wrapperRef.isDependencyTreeStatic()) { - scope = common_1.Scope.REQUEST; - } - else if (wrapperRef.isTransient) { - scope = common_1.Scope.TRANSIENT; - } - return { scope }; - } - registerRequestByContextId(request, contextId) { - this.container.registerRequestProvider(request, contextId); - } - async instantiateClass(type, moduleRef, contextId) { - const wrapper = new instance_wrapper_1.InstanceWrapper({ - name: type && type.name, - metatype: type, - isResolved: false, - scope: (0, get_class_scope_1.getClassScope)(type), - durable: (0, is_durable_1.isDurable)(type), - host: moduleRef, - }); - /* eslint-disable-next-line no-async-promise-executor */ - return new Promise(async (resolve, reject) => { - try { - const callback = async (instances) => { - const properties = await this.injector.resolveProperties(wrapper, moduleRef, undefined, contextId); - const instance = new type(...instances); - this.injector.applyProperties(instance, properties); - resolve(instance); - }; - await this.injector.resolveConstructorParams(wrapper, moduleRef, undefined, callback, contextId); - } - catch (err) { - reject(err); - } - }); - } -} -exports.ModuleRef = ModuleRef; diff --git a/node_modules/@nestjs/core/injector/module.d.ts b/node_modules/@nestjs/core/injector/module.d.ts deleted file mode 100644 index 200d54c..0000000 --- a/node_modules/@nestjs/core/injector/module.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { EnhancerSubtype } from '@nestjs/common/constants'; -import { ClassProvider, Controller, DynamicModule, ExistingProvider, FactoryProvider, Injectable, InjectionToken, NestModule, Provider, Type, ValueProvider } from '@nestjs/common/interfaces'; -import { NestContainer } from './container'; -import { InstanceWrapper } from './instance-wrapper'; -import { ModuleRef } from './module-ref'; -export declare class Module { - private readonly _metatype; - private readonly container; - private readonly _id; - private readonly _imports; - private readonly _providers; - private readonly _injectables; - private readonly _middlewares; - private readonly _controllers; - private readonly _entryProviderKeys; - private readonly _exports; - private _distance; - private _initOnPreview; - private _isGlobal; - private _token; - constructor(_metatype: Type, container: NestContainer); - get id(): string; - get token(): string; - set token(token: string); - get name(): string; - get isGlobal(): boolean; - set isGlobal(global: boolean); - get initOnPreview(): boolean; - set initOnPreview(initOnPreview: boolean); - get providers(): Map>; - get middlewares(): Map>; - get imports(): Set; - get injectables(): Map>; - get controllers(): Map>; - get entryProviders(): Array>; - get exports(): Set; - get instance(): NestModule; - get metatype(): Type; - get distance(): number; - set distance(value: number); - addCoreProviders(): void; - addModuleRef(): void; - addModuleAsProvider(): void; - addApplicationConfig(): void; - addInjectable(injectable: Provider, enhancerSubtype: EnhancerSubtype, host?: Type): string | symbol | Function | InstanceWrapper; - addProvider(provider: Provider): InjectionToken; - addProvider(provider: Provider, enhancerSubtype: EnhancerSubtype): InjectionToken; - isCustomProvider(provider: Provider): provider is ClassProvider | FactoryProvider | ValueProvider | ExistingProvider; - addCustomProvider(provider: ClassProvider | FactoryProvider | ValueProvider | ExistingProvider, collection: Map, enhancerSubtype?: EnhancerSubtype): InjectionToken; - isCustomClass(provider: any): provider is ClassProvider; - isCustomValue(provider: any): provider is ValueProvider; - isCustomFactory(provider: any): provider is FactoryProvider; - isCustomUseExisting(provider: any): provider is ExistingProvider; - isDynamicModule(exported: any): exported is DynamicModule; - addCustomClass(provider: ClassProvider, collection: Map, enhancerSubtype?: EnhancerSubtype): void; - addCustomValue(provider: ValueProvider, collection: Map, enhancerSubtype?: EnhancerSubtype): void; - addCustomFactory(provider: FactoryProvider, collection: Map, enhancerSubtype?: EnhancerSubtype): void; - addCustomUseExisting(provider: ExistingProvider, collection: Map, enhancerSubtype?: EnhancerSubtype): void; - addExportedProviderOrModule(toExport: Provider | string | symbol | DynamicModule): Set | undefined; - addCustomExportedProvider(provider: FactoryProvider | ValueProvider | ClassProvider | ExistingProvider): Set | undefined; - validateExportedProvider(token: InjectionToken): InjectionToken; - addController(controller: Type): void; - assignControllerUniqueId(controller: Type): void; - addImport(moduleRef: Module): void; - replace(toReplace: InjectionToken, options: any): void; - hasProvider(token: InjectionToken): boolean; - hasInjectable(token: InjectionToken): boolean; - getProviderByKey(name: InjectionToken): InstanceWrapper; - getProviderById(id: string): InstanceWrapper | undefined; - getControllerById(id: string): InstanceWrapper | undefined; - getInjectableById(id: string): InstanceWrapper | undefined; - getMiddlewareById(id: string): InstanceWrapper | undefined; - getNonAliasProviders(): Array<[ - InjectionToken, - InstanceWrapper - ]>; - createModuleReferenceType(): Type; - private isEntryProvider; - private generateUuid; - private isTransientProvider; - private isRequestScopeProvider; -} diff --git a/node_modules/@nestjs/core/injector/module.js b/node_modules/@nestjs/core/injector/module.js deleted file mode 100644 index b208a82..0000000 --- a/node_modules/@nestjs/core/injector/module.js +++ /dev/null @@ -1,432 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Module = void 0; -const constants_1 = require("@nestjs/common/constants"); -const interfaces_1 = require("@nestjs/common/interfaces"); -const random_string_generator_util_1 = require("@nestjs/common/utils/random-string-generator.util"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const iterare_1 = require("iterare"); -const application_config_1 = require("../application-config"); -const exceptions_1 = require("../errors/exceptions"); -const context_id_factory_1 = require("../helpers/context-id-factory"); -const get_class_scope_1 = require("../helpers/get-class-scope"); -const is_durable_1 = require("../helpers/is-durable"); -const uuid_factory_1 = require("../inspector/uuid-factory"); -const constants_2 = require("./constants"); -const instance_wrapper_1 = require("./instance-wrapper"); -const module_ref_1 = require("./module-ref"); -class Module { - constructor(_metatype, container) { - this._metatype = _metatype; - this.container = container; - this._imports = new Set(); - this._providers = new Map(); - this._injectables = new Map(); - this._middlewares = new Map(); - this._controllers = new Map(); - this._entryProviderKeys = new Set(); - this._exports = new Set(); - this._distance = 0; - this._initOnPreview = false; - this._isGlobal = false; - this.addCoreProviders(); - this._id = this.generateUuid(); - } - get id() { - return this._id; - } - get token() { - return this._token; - } - set token(token) { - this._token = token; - } - get name() { - return this.metatype.name; - } - get isGlobal() { - return this._isGlobal; - } - set isGlobal(global) { - this._isGlobal = global; - } - get initOnPreview() { - return this._initOnPreview; - } - set initOnPreview(initOnPreview) { - this._initOnPreview = initOnPreview; - } - get providers() { - return this._providers; - } - get middlewares() { - return this._middlewares; - } - get imports() { - return this._imports; - } - get injectables() { - return this._injectables; - } - get controllers() { - return this._controllers; - } - get entryProviders() { - return Array.from(this._entryProviderKeys).map(token => this.providers.get(token)); - } - get exports() { - return this._exports; - } - get instance() { - if (!this._providers.has(this._metatype)) { - throw new exceptions_1.RuntimeException(); - } - const moduleRef = this._providers.get(this._metatype); - return moduleRef.instance; - } - get metatype() { - return this._metatype; - } - get distance() { - return this._distance; - } - set distance(value) { - this._distance = value; - } - addCoreProviders() { - this.addModuleAsProvider(); - this.addModuleRef(); - this.addApplicationConfig(); - } - addModuleRef() { - const moduleRef = this.createModuleReferenceType(); - this._providers.set(module_ref_1.ModuleRef, new instance_wrapper_1.InstanceWrapper({ - token: module_ref_1.ModuleRef, - name: module_ref_1.ModuleRef.name, - metatype: module_ref_1.ModuleRef, - isResolved: true, - instance: new moduleRef(), - host: this, - })); - } - addModuleAsProvider() { - this._providers.set(this._metatype, new instance_wrapper_1.InstanceWrapper({ - token: this._metatype, - name: this._metatype.name, - metatype: this._metatype, - isResolved: false, - instance: null, - host: this, - })); - } - addApplicationConfig() { - this._providers.set(application_config_1.ApplicationConfig, new instance_wrapper_1.InstanceWrapper({ - token: application_config_1.ApplicationConfig, - name: application_config_1.ApplicationConfig.name, - isResolved: true, - instance: this.container.applicationConfig, - host: this, - })); - } - addInjectable(injectable, enhancerSubtype, host) { - if (this.isCustomProvider(injectable)) { - return this.addCustomProvider(injectable, this._injectables, enhancerSubtype); - } - let instanceWrapper = this.injectables.get(injectable); - if (!instanceWrapper) { - instanceWrapper = new instance_wrapper_1.InstanceWrapper({ - token: injectable, - name: injectable.name, - metatype: injectable, - instance: null, - isResolved: false, - scope: (0, get_class_scope_1.getClassScope)(injectable), - durable: (0, is_durable_1.isDurable)(injectable), - subtype: enhancerSubtype, - host: this, - }); - this._injectables.set(injectable, instanceWrapper); - } - if (host) { - const hostWrapper = this._controllers.get(host) || this._providers.get(host); - hostWrapper && hostWrapper.addEnhancerMetadata(instanceWrapper); - } - return instanceWrapper; - } - addProvider(provider, enhancerSubtype) { - if (this.isCustomProvider(provider)) { - if (this.isEntryProvider(provider.provide)) { - this._entryProviderKeys.add(provider.provide); - } - return this.addCustomProvider(provider, this._providers, enhancerSubtype); - } - const isAlreadyDeclared = this._providers.has(provider); - if ((this.isTransientProvider(provider) || - this.isRequestScopeProvider(provider)) && - isAlreadyDeclared) { - return provider; - } - this._providers.set(provider, new instance_wrapper_1.InstanceWrapper({ - token: provider, - name: provider.name, - metatype: provider, - instance: null, - isResolved: false, - scope: (0, get_class_scope_1.getClassScope)(provider), - durable: (0, is_durable_1.isDurable)(provider), - host: this, - })); - if (this.isEntryProvider(provider)) { - this._entryProviderKeys.add(provider); - } - return provider; - } - isCustomProvider(provider) { - return !(0, shared_utils_1.isNil)(provider.provide); - } - addCustomProvider(provider, collection, enhancerSubtype) { - if (this.isCustomClass(provider)) { - this.addCustomClass(provider, collection, enhancerSubtype); - } - else if (this.isCustomValue(provider)) { - this.addCustomValue(provider, collection, enhancerSubtype); - } - else if (this.isCustomFactory(provider)) { - this.addCustomFactory(provider, collection, enhancerSubtype); - } - else if (this.isCustomUseExisting(provider)) { - this.addCustomUseExisting(provider, collection, enhancerSubtype); - } - return provider.provide; - } - isCustomClass(provider) { - return !(0, shared_utils_1.isUndefined)(provider.useClass); - } - isCustomValue(provider) { - return ((0, shared_utils_1.isObject)(provider) && - Object.prototype.hasOwnProperty.call(provider, 'useValue')); - } - isCustomFactory(provider) { - return !(0, shared_utils_1.isUndefined)(provider.useFactory); - } - isCustomUseExisting(provider) { - return !(0, shared_utils_1.isUndefined)(provider.useExisting); - } - isDynamicModule(exported) { - return exported && exported.module; - } - addCustomClass(provider, collection, enhancerSubtype) { - let { scope, durable } = provider; - const { useClass } = provider; - if ((0, shared_utils_1.isUndefined)(scope)) { - scope = (0, get_class_scope_1.getClassScope)(useClass); - } - if ((0, shared_utils_1.isUndefined)(durable)) { - durable = (0, is_durable_1.isDurable)(useClass); - } - const token = provider.provide; - collection.set(token, new instance_wrapper_1.InstanceWrapper({ - token, - name: useClass?.name || useClass, - metatype: useClass, - instance: null, - isResolved: false, - scope, - durable, - host: this, - subtype: enhancerSubtype, - })); - } - addCustomValue(provider, collection, enhancerSubtype) { - const { useValue: value, provide: providerToken } = provider; - const instanceDecorator = this.container.contextOptions?.instrument?.instanceDecorator; - collection.set(providerToken, new instance_wrapper_1.InstanceWrapper({ - token: providerToken, - name: providerToken?.name || providerToken, - metatype: null, - instance: instanceDecorator ? instanceDecorator(value) : value, - isResolved: true, - async: value instanceof Promise, - host: this, - subtype: enhancerSubtype, - })); - } - addCustomFactory(provider, collection, enhancerSubtype) { - const { useFactory: factory, inject, scope, durable, provide: providerToken, } = provider; - collection.set(providerToken, new instance_wrapper_1.InstanceWrapper({ - token: providerToken, - name: providerToken?.name || providerToken, - metatype: factory, - instance: null, - isResolved: false, - inject: inject || [], - scope, - durable, - host: this, - subtype: enhancerSubtype, - })); - } - addCustomUseExisting(provider, collection, enhancerSubtype) { - const { useExisting, provide: providerToken } = provider; - collection.set(providerToken, new instance_wrapper_1.InstanceWrapper({ - token: providerToken, - name: providerToken?.name || providerToken, - metatype: (instance => instance), - instance: null, - isResolved: false, - inject: [useExisting], - host: this, - isAlias: true, - subtype: enhancerSubtype, - })); - } - addExportedProviderOrModule(toExport) { - const addExportedUnit = (token) => this._exports.add(this.validateExportedProvider(token)); - if (this.isCustomProvider(toExport)) { - return this.addCustomExportedProvider(toExport); - } - else if ((0, shared_utils_1.isString)(toExport) || (0, shared_utils_1.isSymbol)(toExport)) { - return addExportedUnit(toExport); - } - else if (this.isDynamicModule(toExport)) { - const { module: moduleClassRef } = toExport; - return addExportedUnit(moduleClassRef); - } - addExportedUnit(toExport); - } - addCustomExportedProvider(provider) { - const provide = provider.provide; - if ((0, shared_utils_1.isString)(provide) || (0, shared_utils_1.isSymbol)(provide)) { - return this._exports.add(this.validateExportedProvider(provide)); - } - this._exports.add(this.validateExportedProvider(provide)); - } - validateExportedProvider(token) { - if (this._providers.has(token)) { - return token; - } - const imports = (0, iterare_1.iterate)(this._imports.values()) - .filter(item => !!item) - .map(({ metatype }) => metatype) - .filter(metatype => !!metatype) - .toArray(); - if (!imports.includes(token)) { - const { name } = this.metatype; - const providerName = (0, shared_utils_1.isFunction)(token) ? token.name : token; - throw new exceptions_1.UnknownExportException(providerName, name); - } - return token; - } - addController(controller) { - this._controllers.set(controller, new instance_wrapper_1.InstanceWrapper({ - token: controller, - name: controller.name, - metatype: controller, - instance: null, - isResolved: false, - scope: (0, get_class_scope_1.getClassScope)(controller), - durable: (0, is_durable_1.isDurable)(controller), - host: this, - })); - this.assignControllerUniqueId(controller); - } - assignControllerUniqueId(controller) { - Object.defineProperty(controller, constants_2.CONTROLLER_ID_KEY, { - enumerable: false, - writable: false, - configurable: true, - value: (0, random_string_generator_util_1.randomStringGenerator)(), - }); - } - addImport(moduleRef) { - this._imports.add(moduleRef); - } - replace(toReplace, options) { - if (options.isProvider && this.hasProvider(toReplace)) { - const originalProvider = this._providers.get(toReplace); - return originalProvider.mergeWith({ provide: toReplace, ...options }); - } - else if (!options.isProvider && this.hasInjectable(toReplace)) { - const originalInjectable = this._injectables.get(toReplace); - return originalInjectable.mergeWith({ - provide: toReplace, - ...options, - }); - } - } - hasProvider(token) { - return this._providers.has(token); - } - hasInjectable(token) { - return this._injectables.has(token); - } - getProviderByKey(name) { - return this._providers.get(name); - } - getProviderById(id) { - return Array.from(this._providers.values()).find(item => item.id === id); - } - getControllerById(id) { - return Array.from(this._controllers.values()).find(item => item.id === id); - } - getInjectableById(id) { - return Array.from(this._injectables.values()).find(item => item.id === id); - } - getMiddlewareById(id) { - return Array.from(this._middlewares.values()).find(item => item.id === id); - } - getNonAliasProviders() { - return [...this._providers].filter(([_, wrapper]) => !wrapper.isAlias); - } - createModuleReferenceType() { - // eslint-disable-next-line @typescript-eslint/no-this-alias - const self = this; - return class extends module_ref_1.ModuleRef { - constructor() { - super(self.container); - } - get(typeOrToken, options = {}) { - options.strict ??= true; - options.each ??= false; - return this.find(typeOrToken, options.strict - ? { - moduleId: self.id, - each: options.each, - } - : options); - } - resolve(typeOrToken, contextId = (0, context_id_factory_1.createContextId)(), options = {}) { - options.strict ??= true; - options.each ??= false; - return this.resolvePerContext(typeOrToken, self, contextId, options); - } - async create(type, contextId) { - if (!(type && (0, shared_utils_1.isFunction)(type) && type.prototype)) { - throw new exceptions_1.InvalidClassException(type); - } - return this.instantiateClass(type, self, contextId); - } - }; - } - isEntryProvider(metatype) { - return typeof metatype === 'function' - ? !!Reflect.getMetadata(constants_1.ENTRY_PROVIDER_WATERMARK, metatype) - : false; - } - generateUuid() { - const prefix = 'M_'; - const key = this.token - ? this.token.includes(':') - ? this.token.split(':')[1] - : this.token - : this.name; - return key ? uuid_factory_1.UuidFactory.get(`${prefix}_${key}`) : (0, random_string_generator_util_1.randomStringGenerator)(); - } - isTransientProvider(provider) { - return (0, get_class_scope_1.getClassScope)(provider) === interfaces_1.Scope.TRANSIENT; - } - isRequestScopeProvider(provider) { - return (0, get_class_scope_1.getClassScope)(provider) === interfaces_1.Scope.REQUEST; - } -} -exports.Module = Module; diff --git a/node_modules/@nestjs/core/injector/modules-container.d.ts b/node_modules/@nestjs/core/injector/modules-container.d.ts deleted file mode 100644 index 738b958..0000000 --- a/node_modules/@nestjs/core/injector/modules-container.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Observable } from 'rxjs'; -import { Module } from './module'; -export declare class ModulesContainer extends Map { - private readonly _applicationId; - private readonly _rpcTargetRegistry$; - /** - * Unique identifier of the application instance. - */ - get applicationId(): string; - /** - * Retrieves a module by its identifier. - * @param id The identifier of the module to retrieve. - * @returns The module instance if found, otherwise undefined. - */ - getById(id: string): Module | undefined; - /** - * Returns the RPC target registry as an observable. - * This registry contains all RPC targets registered in the application. - * @returns An observable that emits the RPC target registry. - */ - getRpcTargetRegistry(): Observable; - /** - * Adds an RPC target to the registry. - * @param target The RPC target to add. - */ - addRpcTarget(target: T): void; -} diff --git a/node_modules/@nestjs/core/injector/modules-container.js b/node_modules/@nestjs/core/injector/modules-container.js deleted file mode 100644 index bf5bf0d..0000000 --- a/node_modules/@nestjs/core/injector/modules-container.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ModulesContainer = void 0; -const rxjs_1 = require("rxjs"); -const uid_1 = require("uid"); -class ModulesContainer extends Map { - constructor() { - super(...arguments); - this._applicationId = (0, uid_1.uid)(21); - this._rpcTargetRegistry$ = new rxjs_1.ReplaySubject(); - } - /** - * Unique identifier of the application instance. - */ - get applicationId() { - return this._applicationId; - } - /** - * Retrieves a module by its identifier. - * @param id The identifier of the module to retrieve. - * @returns The module instance if found, otherwise undefined. - */ - getById(id) { - return Array.from(this.values()).find(moduleRef => moduleRef.id === id); - } - /** - * Returns the RPC target registry as an observable. - * This registry contains all RPC targets registered in the application. - * @returns An observable that emits the RPC target registry. - */ - getRpcTargetRegistry() { - return this._rpcTargetRegistry$.asObservable(); - } - /** - * Adds an RPC target to the registry. - * @param target The RPC target to add. - */ - addRpcTarget(target) { - this._rpcTargetRegistry$.next(target); - } -} -exports.ModulesContainer = ModulesContainer; diff --git a/node_modules/@nestjs/core/injector/opaque-key-factory/by-reference-module-opaque-key-factory.d.ts b/node_modules/@nestjs/core/injector/opaque-key-factory/by-reference-module-opaque-key-factory.d.ts deleted file mode 100644 index beaaabb..0000000 --- a/node_modules/@nestjs/core/injector/opaque-key-factory/by-reference-module-opaque-key-factory.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { DynamicModule } from '@nestjs/common/interfaces/modules/dynamic-module.interface'; -import { ForwardReference } from '@nestjs/common/interfaces/modules/forward-reference.interface'; -import { Type } from '@nestjs/common/interfaces/type.interface'; -import { ModuleOpaqueKeyFactory } from './interfaces/module-opaque-key-factory.interface'; -export declare class ByReferenceModuleOpaqueKeyFactory implements ModuleOpaqueKeyFactory { - private readonly keyGenerationStrategy; - constructor(options?: { - keyGenerationStrategy: 'random' | 'shallow'; - }); - createForStatic(moduleCls: Type, originalRef?: Type | ForwardReference): string; - createForDynamic(moduleCls: Type, dynamicMetadata: Omit, originalRef: DynamicModule | ForwardReference): string; - private getOrCreateModuleId; - private hashString; - private generateRandomString; -} diff --git a/node_modules/@nestjs/core/injector/opaque-key-factory/by-reference-module-opaque-key-factory.js b/node_modules/@nestjs/core/injector/opaque-key-factory/by-reference-module-opaque-key-factory.js deleted file mode 100644 index bbd1d2d..0000000 --- a/node_modules/@nestjs/core/injector/opaque-key-factory/by-reference-module-opaque-key-factory.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ByReferenceModuleOpaqueKeyFactory = void 0; -const random_string_generator_util_1 = require("@nestjs/common/utils/random-string-generator.util"); -const crypto_1 = require("crypto"); -const K_MODULE_ID = Symbol('K_MODULE_ID'); -class ByReferenceModuleOpaqueKeyFactory { - constructor(options) { - this.keyGenerationStrategy = options?.keyGenerationStrategy ?? 'random'; - } - createForStatic(moduleCls, originalRef = moduleCls) { - return this.getOrCreateModuleId(moduleCls, undefined, originalRef); - } - createForDynamic(moduleCls, dynamicMetadata, originalRef) { - return this.getOrCreateModuleId(moduleCls, dynamicMetadata, originalRef); - } - getOrCreateModuleId(moduleCls, dynamicMetadata, originalRef) { - if (originalRef[K_MODULE_ID]) { - return originalRef[K_MODULE_ID]; - } - let moduleId; - if (this.keyGenerationStrategy === 'random') { - moduleId = this.generateRandomString(); - } - else { - const delimiter = ':'; - moduleId = dynamicMetadata - ? `${this.generateRandomString()}${delimiter}${this.hashString(moduleCls.name + JSON.stringify(dynamicMetadata))}` - : `${this.generateRandomString()}${delimiter}${this.hashString(moduleCls.toString())}`; - } - originalRef[K_MODULE_ID] = moduleId; - return moduleId; - } - hashString(value) { - return (0, crypto_1.createHash)('sha256').update(value).digest('hex'); - } - generateRandomString() { - return (0, random_string_generator_util_1.randomStringGenerator)(); - } -} -exports.ByReferenceModuleOpaqueKeyFactory = ByReferenceModuleOpaqueKeyFactory; diff --git a/node_modules/@nestjs/core/injector/opaque-key-factory/deep-hashed-module-opaque-key-factory.d.ts b/node_modules/@nestjs/core/injector/opaque-key-factory/deep-hashed-module-opaque-key-factory.d.ts deleted file mode 100644 index a5789a1..0000000 --- a/node_modules/@nestjs/core/injector/opaque-key-factory/deep-hashed-module-opaque-key-factory.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { DynamicModule } from '@nestjs/common/interfaces/modules/dynamic-module.interface'; -import { Type } from '@nestjs/common/interfaces/type.interface'; -import { ModuleOpaqueKeyFactory } from './interfaces/module-opaque-key-factory.interface'; -export declare class DeepHashedModuleOpaqueKeyFactory implements ModuleOpaqueKeyFactory { - private readonly moduleIdsCache; - private readonly moduleTokenCache; - private readonly logger; - createForStatic(moduleCls: Type): string; - createForDynamic(moduleCls: Type, dynamicMetadata: Omit): string; - getStringifiedOpaqueToken(opaqueToken: object | undefined): string; - getModuleId(metatype: Type): string; - getModuleName(metatype: Type): string; - private hashString; - private replacer; -} diff --git a/node_modules/@nestjs/core/injector/opaque-key-factory/deep-hashed-module-opaque-key-factory.js b/node_modules/@nestjs/core/injector/opaque-key-factory/deep-hashed-module-opaque-key-factory.js deleted file mode 100644 index d01dec8..0000000 --- a/node_modules/@nestjs/core/injector/opaque-key-factory/deep-hashed-module-opaque-key-factory.js +++ /dev/null @@ -1,83 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DeepHashedModuleOpaqueKeyFactory = void 0; -const logger_service_1 = require("@nestjs/common/services/logger.service"); -const random_string_generator_util_1 = require("@nestjs/common/utils/random-string-generator.util"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const crypto_1 = require("crypto"); -const fast_safe_stringify_1 = require("fast-safe-stringify"); -const CLASS_STR = 'class '; -const CLASS_STR_LEN = CLASS_STR.length; -class DeepHashedModuleOpaqueKeyFactory { - constructor() { - this.moduleIdsCache = new WeakMap(); - this.moduleTokenCache = new Map(); - this.logger = new logger_service_1.Logger(DeepHashedModuleOpaqueKeyFactory.name, { - timestamp: true, - }); - } - createForStatic(moduleCls) { - const moduleId = this.getModuleId(moduleCls); - const moduleName = this.getModuleName(moduleCls); - const key = `${moduleId}_${moduleName}`; - if (this.moduleTokenCache.has(key)) { - return this.moduleTokenCache.get(key); - } - const hash = this.hashString(key); - this.moduleTokenCache.set(key, hash); - return hash; - } - createForDynamic(moduleCls, dynamicMetadata) { - const moduleId = this.getModuleId(moduleCls); - const moduleName = this.getModuleName(moduleCls); - const opaqueToken = { - id: moduleId, - module: moduleName, - dynamic: dynamicMetadata, - }; - const start = performance.now(); - const opaqueTokenString = this.getStringifiedOpaqueToken(opaqueToken); - const timeSpentInMs = performance.now() - start; - if (timeSpentInMs > 10) { - const formattedTimeSpent = timeSpentInMs.toFixed(2); - this.logger.warn(`The module "${opaqueToken.module}" is taking ${formattedTimeSpent}ms to serialize, this may be caused by larger objects statically assigned to the module. Consider changing the "moduleIdGeneratorAlgorithm" option to "reference" to improve the performance.`); - } - return this.hashString(opaqueTokenString); - } - getStringifiedOpaqueToken(opaqueToken) { - // Uses safeStringify instead of JSON.stringify to support circular dynamic modules - // The replacer function is also required in order to obtain real class names - // instead of the unified "Function" key - return opaqueToken ? (0, fast_safe_stringify_1.default)(opaqueToken, this.replacer) : ''; - } - getModuleId(metatype) { - let moduleId = this.moduleIdsCache.get(metatype); - if (moduleId) { - return moduleId; - } - moduleId = (0, random_string_generator_util_1.randomStringGenerator)(); - this.moduleIdsCache.set(metatype, moduleId); - return moduleId; - } - getModuleName(metatype) { - return metatype.name; - } - hashString(value) { - return (0, crypto_1.createHash)('sha256').update(value).digest('hex'); - } - replacer(key, value) { - if ((0, shared_utils_1.isFunction)(value)) { - const funcAsString = value.toString(); - const isClass = funcAsString.slice(0, CLASS_STR_LEN) === CLASS_STR; - if (isClass) { - return value.name; - } - return funcAsString; - } - if ((0, shared_utils_1.isSymbol)(value)) { - return value.toString(); - } - return value; - } -} -exports.DeepHashedModuleOpaqueKeyFactory = DeepHashedModuleOpaqueKeyFactory; diff --git a/node_modules/@nestjs/core/injector/opaque-key-factory/interfaces/module-opaque-key-factory.interface.d.ts b/node_modules/@nestjs/core/injector/opaque-key-factory/interfaces/module-opaque-key-factory.interface.d.ts deleted file mode 100644 index b3585b2..0000000 --- a/node_modules/@nestjs/core/injector/opaque-key-factory/interfaces/module-opaque-key-factory.interface.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { DynamicModule } from '@nestjs/common/interfaces/modules/dynamic-module.interface'; -import { ForwardReference } from '@nestjs/common/interfaces/modules/forward-reference.interface'; -import { Type } from '@nestjs/common/interfaces/type.interface'; -export interface ModuleOpaqueKeyFactory { - /** - * Creates a unique opaque key for the given static module. - * @param moduleCls A static module class. - * @param originalRef Original object reference. In most cases, it's the same as `moduleCls`. - */ - createForStatic(moduleCls: Type, originalRef: Type | ForwardReference): string; - /** - * Creates a unique opaque key for the given dynamic module. - * @param moduleCls A dynamic module class reference. - * @param dynamicMetadata Dynamic module metadata. - * @param originalRef Original object reference. - */ - createForDynamic(moduleCls: Type, dynamicMetadata: Omit, originalRef: DynamicModule | ForwardReference): string; -} diff --git a/node_modules/@nestjs/core/injector/opaque-key-factory/interfaces/module-opaque-key-factory.interface.js b/node_modules/@nestjs/core/injector/opaque-key-factory/interfaces/module-opaque-key-factory.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/core/injector/opaque-key-factory/interfaces/module-opaque-key-factory.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/core/injector/settlement-signal.d.ts b/node_modules/@nestjs/core/injector/settlement-signal.d.ts deleted file mode 100644 index a04ccbe..0000000 --- a/node_modules/@nestjs/core/injector/settlement-signal.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * SettlementSignal is used to signal the resolution of a provider/instance. - * Calling `complete` or `error` will resolve the promise returned by `asPromise`. - * Can be used to detect circular dependencies. - */ -export declare class SettlementSignal { - private readonly _refs; - private readonly settledPromise; - private settleFn; - private completed; - constructor(); - /** - * Resolves the promise returned by `asPromise`. - */ - complete(): void; - /** - * Rejects the promise returned by `asPromise` with the given error. - * @param err Error to reject the promise returned by `asPromise` with. - */ - error(err: unknown): void; - /** - * Returns a promise that will be resolved when `complete` or `error` is called. - * @returns Promise that will be resolved when `complete` or `error` is called. - */ - asPromise(): Promise; - /** - * Inserts a wrapper id that the host of this signal depends on. - * @param wrapperId Wrapper id to insert. - */ - insertRef(wrapperId: string): void; - /** - * Check if relationship is circular. - * @param wrapperId Wrapper id to check. - * @returns True if relationship is circular, false otherwise. - */ - isCycle(wrapperId: string): boolean; -} diff --git a/node_modules/@nestjs/core/injector/settlement-signal.js b/node_modules/@nestjs/core/injector/settlement-signal.js deleted file mode 100644 index 8878288..0000000 --- a/node_modules/@nestjs/core/injector/settlement-signal.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SettlementSignal = void 0; -/** - * SettlementSignal is used to signal the resolution of a provider/instance. - * Calling `complete` or `error` will resolve the promise returned by `asPromise`. - * Can be used to detect circular dependencies. - */ -class SettlementSignal { - constructor() { - this._refs = new Set(); - this.completed = false; - this.settledPromise = new Promise(resolve => { - this.settleFn = resolve; - }); - } - /** - * Resolves the promise returned by `asPromise`. - */ - complete() { - this.completed = true; - this.settleFn(); - } - /** - * Rejects the promise returned by `asPromise` with the given error. - * @param err Error to reject the promise returned by `asPromise` with. - */ - error(err) { - this.completed = true; - this.settleFn(err); - } - /** - * Returns a promise that will be resolved when `complete` or `error` is called. - * @returns Promise that will be resolved when `complete` or `error` is called. - */ - asPromise() { - return this.settledPromise; - } - /** - * Inserts a wrapper id that the host of this signal depends on. - * @param wrapperId Wrapper id to insert. - */ - insertRef(wrapperId) { - this._refs.add(wrapperId); - } - /** - * Check if relationship is circular. - * @param wrapperId Wrapper id to check. - * @returns True if relationship is circular, false otherwise. - */ - isCycle(wrapperId) { - return !this.completed && this._refs.has(wrapperId); - } -} -exports.SettlementSignal = SettlementSignal; diff --git a/node_modules/@nestjs/core/injector/topology-tree/topology-tree.d.ts b/node_modules/@nestjs/core/injector/topology-tree/topology-tree.d.ts deleted file mode 100644 index f97216e..0000000 --- a/node_modules/@nestjs/core/injector/topology-tree/topology-tree.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Module } from '../module'; -export declare class TopologyTree { - private root; - private links; - constructor(moduleRef: Module); - walk(callback: (value: Module, depth: number) => void): void; - private traverseAndMapToTree; -} diff --git a/node_modules/@nestjs/core/injector/topology-tree/topology-tree.js b/node_modules/@nestjs/core/injector/topology-tree/topology-tree.js deleted file mode 100644 index 00a4ca6..0000000 --- a/node_modules/@nestjs/core/injector/topology-tree/topology-tree.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TopologyTree = void 0; -const tree_node_1 = require("./tree-node"); -class TopologyTree { - constructor(moduleRef) { - this.links = new Map(); - this.root = new tree_node_1.TreeNode({ - value: moduleRef, - parent: null, - }); - this.links.set(moduleRef, this.root); - this.traverseAndMapToTree(this.root); - } - walk(callback) { - function walkNode(node, depth = 1) { - callback(node.value, depth); - node.children.forEach(child => walkNode(child, depth + 1)); - } - walkNode(this.root); - } - traverseAndMapToTree(node, depth = 1) { - if (!node.value.imports) { - return; - } - node.value.imports.forEach(child => { - if (!child) { - return; - } - if (this.links.has(child)) { - const existingSubtree = this.links.get(child); - if (node.hasCycleWith(child)) { - return; - } - const existingDepth = existingSubtree.getDepth(); - if (existingDepth < depth) { - existingSubtree.relink(node); - } - return; - } - const childNode = new tree_node_1.TreeNode({ - value: child, - parent: node, - }); - node.addChild(childNode); - this.links.set(child, childNode); - this.traverseAndMapToTree(childNode, depth + 1); - }); - } -} -exports.TopologyTree = TopologyTree; diff --git a/node_modules/@nestjs/core/injector/topology-tree/tree-node.d.ts b/node_modules/@nestjs/core/injector/topology-tree/tree-node.d.ts deleted file mode 100644 index 7ea92fd..0000000 --- a/node_modules/@nestjs/core/injector/topology-tree/tree-node.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export declare class TreeNode { - readonly value: T; - readonly children: Set>; - private parent; - constructor({ value, parent }: { - value: T; - parent: TreeNode | null; - }); - addChild(child: TreeNode): void; - removeChild(child: TreeNode): void; - relink(parent: TreeNode): void; - getDepth(): number; - hasCycleWith(target: T): boolean; -} diff --git a/node_modules/@nestjs/core/injector/topology-tree/tree-node.js b/node_modules/@nestjs/core/injector/topology-tree/tree-node.js deleted file mode 100644 index 591e310..0000000 --- a/node_modules/@nestjs/core/injector/topology-tree/tree-node.js +++ /dev/null @@ -1,54 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TreeNode = void 0; -class TreeNode { - constructor({ value, parent }) { - this.children = new Set(); - this.value = value; - this.parent = parent; - } - addChild(child) { - this.children.add(child); - } - removeChild(child) { - this.children.delete(child); - } - relink(parent) { - this.parent?.removeChild(this); - this.parent = parent; - this.parent.addChild(this); - } - getDepth() { - const visited = new Set(); - let depth = 0; - // eslint-disable-next-line @typescript-eslint/no-this-alias - let current = this; - while (current) { - depth++; - current = current.parent; - // Stop on cycle - if (visited.has(current)) { - return -1; - } - visited.add(current); - } - return depth; - } - hasCycleWith(target) { - const visited = new Set(); - // eslint-disable-next-line @typescript-eslint/no-this-alias - let current = this; - while (current) { - if (current.value === target) { - return true; - } - current = current.parent; - if (visited.has(current)) { - return false; - } - visited.add(current); - } - return false; - } -} -exports.TreeNode = TreeNode; diff --git a/node_modules/@nestjs/core/inspector/deterministic-uuid-registry.d.ts b/node_modules/@nestjs/core/inspector/deterministic-uuid-registry.d.ts deleted file mode 100644 index d9db1b0..0000000 --- a/node_modules/@nestjs/core/inspector/deterministic-uuid-registry.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare class DeterministicUuidRegistry { - private static readonly registry; - static get(str: string, inc?: number): any; - static clear(): void; - private static hashCode; -} diff --git a/node_modules/@nestjs/core/inspector/deterministic-uuid-registry.js b/node_modules/@nestjs/core/inspector/deterministic-uuid-registry.js deleted file mode 100644 index f2d3a85..0000000 --- a/node_modules/@nestjs/core/inspector/deterministic-uuid-registry.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DeterministicUuidRegistry = void 0; -class DeterministicUuidRegistry { - static get(str, inc = 0) { - const id = inc ? this.hashCode(`${str}_${inc}`) : this.hashCode(str); - if (this.registry.has(id)) { - return this.get(str, inc + 1); - } - this.registry.set(id, true); - return id; - } - static clear() { - this.registry.clear(); - } - static hashCode(s) { - let h = 0; - for (let i = 0; i < s.length; i++) - h = (Math.imul(31, h) + s.charCodeAt(i)) | 0; - return h.toString(); - } -} -exports.DeterministicUuidRegistry = DeterministicUuidRegistry; -DeterministicUuidRegistry.registry = new Map(); diff --git a/node_modules/@nestjs/core/inspector/graph-inspector.d.ts b/node_modules/@nestjs/core/inspector/graph-inspector.d.ts deleted file mode 100644 index a9e9177..0000000 --- a/node_modules/@nestjs/core/inspector/graph-inspector.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { NestContainer } from '../injector/container'; -import { InstanceWrapper } from '../injector/instance-wrapper'; -import { Module } from '../injector/module'; -import { EnhancerMetadataCacheEntry } from './interfaces/enhancer-metadata-cache-entry.interface'; -import { Entrypoint } from './interfaces/entrypoint.interface'; -import { OrphanedEnhancerDefinition } from './interfaces/extras.interface'; -import { Node } from './interfaces/node.interface'; -export declare class GraphInspector { - private readonly container; - private readonly graph; - private readonly enhancersMetadataCache; - constructor(container: NestContainer); - inspectModules(modules?: Map): void; - registerPartial(error: unknown): void; - inspectInstanceWrapper(source: InstanceWrapper, moduleRef: Module): void; - insertEnhancerMetadataCache(entry: EnhancerMetadataCacheEntry): void; - insertOrphanedEnhancer(entry: OrphanedEnhancerDefinition): void; - insertAttachedEnhancer(wrapper: InstanceWrapper): void; - insertEntrypointDefinition(definition: Entrypoint, parentId: string): void; - insertClassNode(moduleRef: Module, wrapper: InstanceWrapper, type: Exclude): void; - private insertModuleNode; - private insertModuleToModuleEdges; - private insertEnhancerEdge; - private insertClassToClassEdge; - private insertClassNodes; -} diff --git a/node_modules/@nestjs/core/inspector/graph-inspector.js b/node_modules/@nestjs/core/inspector/graph-inspector.js deleted file mode 100644 index 596ac9d..0000000 --- a/node_modules/@nestjs/core/inspector/graph-inspector.js +++ /dev/null @@ -1,166 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GraphInspector = void 0; -const unknown_dependencies_exception_1 = require("../errors/exceptions/unknown-dependencies.exception"); -const deterministic_uuid_registry_1 = require("./deterministic-uuid-registry"); -const partial_graph_host_1 = require("./partial-graph.host"); -class GraphInspector { - constructor(container) { - this.container = container; - this.enhancersMetadataCache = new Array(); - this.graph = container.serializedGraph; - } - inspectModules(modules = this.container.getModules()) { - for (const moduleRef of modules.values()) { - this.insertModuleNode(moduleRef); - this.insertClassNodes(moduleRef); - this.insertModuleToModuleEdges(moduleRef); - } - this.enhancersMetadataCache.forEach(entry => this.insertEnhancerEdge(entry)); - deterministic_uuid_registry_1.DeterministicUuidRegistry.clear(); - } - registerPartial(error) { - this.graph.status = 'partial'; - if (error instanceof unknown_dependencies_exception_1.UnknownDependenciesException) { - this.graph.metadata = { - cause: { - type: 'unknown-dependencies', - context: error.context, - moduleId: error.moduleRef?.id, - nodeId: error.metadata?.id, - }, - }; - } - else { - this.graph.metadata = { - cause: { - type: 'unknown', - error, - }, - }; - } - partial_graph_host_1.PartialGraphHost.register(this.graph); - } - inspectInstanceWrapper(source, moduleRef) { - const ctorMetadata = source.getCtorMetadata(); - ctorMetadata?.forEach((target, index) => this.insertClassToClassEdge(source, target, moduleRef, index, 'constructor')); - const propertiesMetadata = source.getPropertiesMetadata(); - propertiesMetadata?.forEach(({ key, wrapper: target }) => this.insertClassToClassEdge(source, target, moduleRef, key, 'property')); - } - insertEnhancerMetadataCache(entry) { - this.enhancersMetadataCache.push(entry); - } - insertOrphanedEnhancer(entry) { - this.graph.insertOrphanedEnhancer({ - ...entry, - ref: entry.ref?.constructor?.name ?? 'Object', - }); - } - insertAttachedEnhancer(wrapper) { - const existingNode = this.graph.getNodeById(wrapper.id); - existingNode.metadata.global = true; - this.graph.insertAttachedEnhancer(existingNode.id); - } - insertEntrypointDefinition(definition, parentId) { - definition = { - ...definition, - id: `${definition.classNodeId}_${definition.methodName}`, - }; - this.graph.insertEntrypoint(definition, parentId); - } - insertClassNode(moduleRef, wrapper, type) { - this.graph.insertNode({ - id: wrapper.id, - label: wrapper.name, - parent: moduleRef.id, - metadata: { - type, - internal: wrapper.metatype === moduleRef.metatype, - sourceModuleName: moduleRef.name, - durable: wrapper.isDependencyTreeDurable(), - static: wrapper.isDependencyTreeStatic(), - scope: wrapper.scope, - transient: wrapper.isTransient, - exported: moduleRef.exports.has(wrapper.token), - token: wrapper.token, - subtype: wrapper.subtype, - initTime: wrapper.initTime, - }, - }); - } - insertModuleNode(moduleRef) { - const dynamicMetadata = this.container.getDynamicMetadataByToken(moduleRef.token); - const node = { - id: moduleRef.id, - label: moduleRef.name, - metadata: { - type: 'module', - global: moduleRef.isGlobal, - dynamic: !!dynamicMetadata, - internal: moduleRef.name === 'InternalCoreModule', - }, - }; - this.graph.insertNode(node); - } - insertModuleToModuleEdges(moduleRef) { - for (const targetModuleRef of moduleRef.imports) { - this.graph.insertEdge({ - source: moduleRef.id, - target: targetModuleRef.id, - metadata: { - type: 'module-to-module', - sourceModuleName: moduleRef.name, - targetModuleName: targetModuleRef.name, - }, - }); - } - } - insertEnhancerEdge(entry) { - const moduleRef = this.container.getModuleByKey(entry.moduleToken); - const sourceInstanceWrapper = moduleRef.controllers.get(entry.classRef) ?? - moduleRef.providers.get(entry.classRef); - const existingSourceNode = this.graph.getNodeById(sourceInstanceWrapper.id); - const enhancers = existingSourceNode.metadata.enhancers ?? []; - if (entry.enhancerInstanceWrapper) { - this.insertClassToClassEdge(sourceInstanceWrapper, entry.enhancerInstanceWrapper, moduleRef, undefined, 'decorator'); - enhancers.push({ - id: entry.enhancerInstanceWrapper.id, - methodKey: entry.methodKey, - subtype: entry.subtype, - }); - } - else { - const name = entry.enhancerRef.constructor?.name ?? - entry.enhancerRef.name; - enhancers.push({ - name, - methodKey: entry.methodKey, - subtype: entry.subtype, - }); - } - existingSourceNode.metadata.enhancers = enhancers; - } - insertClassToClassEdge(source, target, moduleRef, keyOrIndex, injectionType) { - this.graph.insertEdge({ - source: source.id, - target: target.id, - metadata: { - type: 'class-to-class', - sourceModuleName: moduleRef.name, - sourceClassName: source.name, - targetClassName: target.name, - sourceClassToken: source.token, - targetClassToken: target.token, - targetModuleName: target.host?.name, - keyOrIndex, - injectionType, - }, - }); - } - insertClassNodes(moduleRef) { - moduleRef.providers.forEach(value => this.insertClassNode(moduleRef, value, 'provider')); - moduleRef.injectables.forEach(value => this.insertClassNode(moduleRef, value, 'injectable')); - moduleRef.controllers.forEach(value => this.insertClassNode(moduleRef, value, 'controller')); - } -} -exports.GraphInspector = GraphInspector; diff --git a/node_modules/@nestjs/core/inspector/index.d.ts b/node_modules/@nestjs/core/inspector/index.d.ts deleted file mode 100644 index db830f6..0000000 --- a/node_modules/@nestjs/core/inspector/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './graph-inspector'; -export * from './initialize-on-preview.allowlist'; -export * from './partial-graph.host'; -export * from './serialized-graph'; diff --git a/node_modules/@nestjs/core/inspector/index.js b/node_modules/@nestjs/core/inspector/index.js deleted file mode 100644 index 9e6c524..0000000 --- a/node_modules/@nestjs/core/inspector/index.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./graph-inspector"), exports); -tslib_1.__exportStar(require("./initialize-on-preview.allowlist"), exports); -tslib_1.__exportStar(require("./partial-graph.host"), exports); -tslib_1.__exportStar(require("./serialized-graph"), exports); diff --git a/node_modules/@nestjs/core/inspector/initialize-on-preview.allowlist.d.ts b/node_modules/@nestjs/core/inspector/initialize-on-preview.allowlist.d.ts deleted file mode 100644 index 8dbd9b8..0000000 --- a/node_modules/@nestjs/core/inspector/initialize-on-preview.allowlist.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Type } from '@nestjs/common'; -export declare class InitializeOnPreviewAllowlist { - private static readonly allowlist; - static add(type: Type): void; - static has(type: Type): boolean; -} diff --git a/node_modules/@nestjs/core/inspector/initialize-on-preview.allowlist.js b/node_modules/@nestjs/core/inspector/initialize-on-preview.allowlist.js deleted file mode 100644 index 9f3713b..0000000 --- a/node_modules/@nestjs/core/inspector/initialize-on-preview.allowlist.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.InitializeOnPreviewAllowlist = void 0; -class InitializeOnPreviewAllowlist { - static add(type) { - this.allowlist.set(type, true); - } - static has(type) { - return this.allowlist.has(type); - } -} -exports.InitializeOnPreviewAllowlist = InitializeOnPreviewAllowlist; -InitializeOnPreviewAllowlist.allowlist = new WeakMap(); diff --git a/node_modules/@nestjs/core/inspector/interfaces/edge.interface.d.ts b/node_modules/@nestjs/core/inspector/interfaces/edge.interface.d.ts deleted file mode 100644 index 2a809cc..0000000 --- a/node_modules/@nestjs/core/inspector/interfaces/edge.interface.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { InjectionToken } from '@nestjs/common'; -type CommonEdgeMetadata = { - sourceModuleName: string; - targetModuleName: string; -}; -type ModuleToModuleEdgeMetadata = { - type: 'module-to-module'; -} & CommonEdgeMetadata; -type ClassToClassEdgeMetadata = { - type: 'class-to-class'; - sourceClassName: string; - targetClassName: string; - sourceClassToken: InjectionToken; - targetClassToken: InjectionToken; - injectionType: 'constructor' | 'property' | 'decorator'; - keyOrIndex?: string | number | symbol; - /** - * If true, indicates that this edge represents an internal providers connection - */ - internal?: boolean; -} & CommonEdgeMetadata; -export interface Edge { - id: string; - source: string; - target: string; - metadata: ModuleToModuleEdgeMetadata | ClassToClassEdgeMetadata; -} -export {}; diff --git a/node_modules/@nestjs/core/inspector/interfaces/edge.interface.js b/node_modules/@nestjs/core/inspector/interfaces/edge.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/core/inspector/interfaces/edge.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/core/inspector/interfaces/enhancer-metadata-cache-entry.interface.d.ts b/node_modules/@nestjs/core/inspector/interfaces/enhancer-metadata-cache-entry.interface.d.ts deleted file mode 100644 index 410a278..0000000 --- a/node_modules/@nestjs/core/inspector/interfaces/enhancer-metadata-cache-entry.interface.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Type } from '@nestjs/common'; -import { EnhancerSubtype } from '@nestjs/common/constants'; -import { InstanceWrapper } from '../../injector/instance-wrapper'; -export interface EnhancerMetadataCacheEntry { - targetNodeId?: string; - moduleToken: string; - classRef: Type; - methodKey: string | undefined; - enhancerRef?: unknown; - enhancerInstanceWrapper?: InstanceWrapper; - subtype: EnhancerSubtype; -} diff --git a/node_modules/@nestjs/core/inspector/interfaces/enhancer-metadata-cache-entry.interface.js b/node_modules/@nestjs/core/inspector/interfaces/enhancer-metadata-cache-entry.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/core/inspector/interfaces/enhancer-metadata-cache-entry.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/core/inspector/interfaces/entrypoint.interface.d.ts b/node_modules/@nestjs/core/inspector/interfaces/entrypoint.interface.d.ts deleted file mode 100644 index 078360a..0000000 --- a/node_modules/@nestjs/core/inspector/interfaces/entrypoint.interface.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { RequestMethod } from '@nestjs/common'; -import { VersionValue } from '@nestjs/common/interfaces'; -export type HttpEntrypointMetadata = { - path: string; - requestMethod: keyof typeof RequestMethod; - methodVersion?: VersionValue; - controllerVersion?: VersionValue; -}; -export type MiddlewareEntrypointMetadata = { - path: string; - requestMethod: keyof typeof RequestMethod; - version?: VersionValue; -}; -export type Entrypoint = { - id?: string; - type: string; - methodName: string; - className: string; - classNodeId: string; - metadata: { - key: string; - } & T; -}; diff --git a/node_modules/@nestjs/core/inspector/interfaces/entrypoint.interface.js b/node_modules/@nestjs/core/inspector/interfaces/entrypoint.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/core/inspector/interfaces/entrypoint.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/core/inspector/interfaces/extras.interface.d.ts b/node_modules/@nestjs/core/inspector/interfaces/extras.interface.d.ts deleted file mode 100644 index 424b7b7..0000000 --- a/node_modules/@nestjs/core/inspector/interfaces/extras.interface.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { EnhancerSubtype } from '@nestjs/common/constants'; -/** - * Enhancers attached through APP_PIPE, APP_GUARD, APP_INTERCEPTOR, and APP_FILTER tokens. - */ -export interface AttachedEnhancerDefinition { - nodeId: string; -} -/** - * Enhancers registered through "app.useGlobalPipes()", "app.useGlobalGuards()", "app.useGlobalInterceptors()", and "app.useGlobalFilters()" methods. - */ -export interface OrphanedEnhancerDefinition { - subtype: EnhancerSubtype; - ref: unknown; -} -export interface Extras { - orphanedEnhancers: Array; - attachedEnhancers: Array; -} diff --git a/node_modules/@nestjs/core/inspector/interfaces/extras.interface.js b/node_modules/@nestjs/core/inspector/interfaces/extras.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/core/inspector/interfaces/extras.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/core/inspector/interfaces/node.interface.d.ts b/node_modules/@nestjs/core/inspector/interfaces/node.interface.d.ts deleted file mode 100644 index bfe4228..0000000 --- a/node_modules/@nestjs/core/inspector/interfaces/node.interface.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { InjectionToken, Scope } from '@nestjs/common'; -import { EnhancerSubtype } from '@nestjs/common/constants'; -export type ModuleNode = { - metadata: { - type: 'module'; - global: boolean; - dynamic: boolean; - internal: boolean; - }; -}; -export type ClassNode = { - parent: string; - metadata: { - type: 'provider' | 'controller' | 'middleware' | 'injectable'; - subtype?: EnhancerSubtype; - sourceModuleName: string; - durable: boolean; - static: boolean; - transient: boolean; - exported: boolean; - scope: Scope; - token: InjectionToken; - initTime: number; - /** - * Enhancers metadata collection - */ - enhancers?: Array<{ - id: string; - subtype: EnhancerSubtype; - } | { - name: string; - methodKey?: string; - subtype: EnhancerSubtype; - }>; - /** - * If true, node is a globally registered enhancer - */ - global?: boolean; - /** - * If true, indicates that this node represents an internal provider - */ - internal?: boolean; - }; -}; -export type Node = { - id: string; - label: string; -} & (ClassNode | ModuleNode); diff --git a/node_modules/@nestjs/core/inspector/interfaces/node.interface.js b/node_modules/@nestjs/core/inspector/interfaces/node.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/core/inspector/interfaces/node.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/core/inspector/interfaces/serialized-graph-json.interface.d.ts b/node_modules/@nestjs/core/inspector/interfaces/serialized-graph-json.interface.d.ts deleted file mode 100644 index 22e9367..0000000 --- a/node_modules/@nestjs/core/inspector/interfaces/serialized-graph-json.interface.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { SerializedGraphStatus } from '../serialized-graph'; -import { Edge } from './edge.interface'; -import { Entrypoint } from './entrypoint.interface'; -import { Extras } from './extras.interface'; -import { Node } from './node.interface'; -import { SerializedGraphMetadata } from './serialized-graph-metadata.interface'; -export interface SerializedGraphJson { - nodes: Record; - edges: Record; - entrypoints: Record[]>; - extras: Extras; - status?: SerializedGraphStatus; - metadata?: SerializedGraphMetadata; -} diff --git a/node_modules/@nestjs/core/inspector/interfaces/serialized-graph-json.interface.js b/node_modules/@nestjs/core/inspector/interfaces/serialized-graph-json.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/core/inspector/interfaces/serialized-graph-json.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/core/inspector/interfaces/serialized-graph-metadata.interface.d.ts b/node_modules/@nestjs/core/inspector/interfaces/serialized-graph-metadata.interface.d.ts deleted file mode 100644 index 1d480f8..0000000 --- a/node_modules/@nestjs/core/inspector/interfaces/serialized-graph-metadata.interface.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { InjectorDependencyContext } from '../../injector/injector'; -export interface SerializedGraphMetadata { - cause: { - type: 'unknown-dependencies' | 'unknown'; - context?: InjectorDependencyContext; - moduleId?: string; - nodeId?: string; - error?: any; - }; -} diff --git a/node_modules/@nestjs/core/inspector/interfaces/serialized-graph-metadata.interface.js b/node_modules/@nestjs/core/inspector/interfaces/serialized-graph-metadata.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/core/inspector/interfaces/serialized-graph-metadata.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/core/inspector/noop-graph-inspector.d.ts b/node_modules/@nestjs/core/inspector/noop-graph-inspector.d.ts deleted file mode 100644 index c7e02c8..0000000 --- a/node_modules/@nestjs/core/inspector/noop-graph-inspector.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { GraphInspector } from './graph-inspector'; -export declare const NoopGraphInspector: GraphInspector; diff --git a/node_modules/@nestjs/core/inspector/noop-graph-inspector.js b/node_modules/@nestjs/core/inspector/noop-graph-inspector.js deleted file mode 100644 index ac7a865..0000000 --- a/node_modules/@nestjs/core/inspector/noop-graph-inspector.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NoopGraphInspector = void 0; -const graph_inspector_1 = require("./graph-inspector"); -const noop = () => { }; -exports.NoopGraphInspector = new Proxy(graph_inspector_1.GraphInspector.prototype, { - get: () => noop, -}); diff --git a/node_modules/@nestjs/core/inspector/partial-graph.host.d.ts b/node_modules/@nestjs/core/inspector/partial-graph.host.d.ts deleted file mode 100644 index a372972..0000000 --- a/node_modules/@nestjs/core/inspector/partial-graph.host.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { SerializedGraph } from './serialized-graph'; -export declare class PartialGraphHost { - private static partialGraph; - static toJSON(): import("./interfaces/serialized-graph-json.interface").SerializedGraphJson; - static toString(): string; - static register(partialGraph: SerializedGraph): void; -} diff --git a/node_modules/@nestjs/core/inspector/partial-graph.host.js b/node_modules/@nestjs/core/inspector/partial-graph.host.js deleted file mode 100644 index 8ea5e2c..0000000 --- a/node_modules/@nestjs/core/inspector/partial-graph.host.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PartialGraphHost = void 0; -class PartialGraphHost { - static toJSON() { - return this.partialGraph?.toJSON(); - } - static toString() { - return this.partialGraph?.toString(); - } - static register(partialGraph) { - this.partialGraph = partialGraph; - } -} -exports.PartialGraphHost = PartialGraphHost; diff --git a/node_modules/@nestjs/core/inspector/serialized-graph.d.ts b/node_modules/@nestjs/core/inspector/serialized-graph.d.ts deleted file mode 100644 index 9bc261e..0000000 --- a/node_modules/@nestjs/core/inspector/serialized-graph.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { InjectionToken } from '@nestjs/common'; -import { Edge } from './interfaces/edge.interface'; -import { Entrypoint } from './interfaces/entrypoint.interface'; -import { OrphanedEnhancerDefinition } from './interfaces/extras.interface'; -import { Node } from './interfaces/node.interface'; -import { SerializedGraphJson } from './interfaces/serialized-graph-json.interface'; -import { SerializedGraphMetadata } from './interfaces/serialized-graph-metadata.interface'; -export type SerializedGraphStatus = 'partial' | 'complete'; -type WithOptionalId> = Omit & Partial>; -export declare class SerializedGraph { - private readonly nodes; - private readonly edges; - private readonly entrypoints; - private readonly extras; - private _status; - private _metadata?; - private static readonly INTERNAL_PROVIDERS; - set status(status: SerializedGraphStatus); - set metadata(metadata: SerializedGraphMetadata); - insertNode(nodeDefinition: Node): Node | undefined; - insertEdge(edgeDefinition: WithOptionalId): { - id: string; - source: string; - target: string; - metadata: ({ - type: "module-to-module"; - } & { - sourceModuleName: string; - targetModuleName: string; - }) | ({ - type: "class-to-class"; - sourceClassName: string; - targetClassName: string; - sourceClassToken: InjectionToken; - targetClassToken: InjectionToken; - injectionType: "constructor" | "property" | "decorator"; - keyOrIndex?: string | number | symbol; - internal?: boolean; - } & { - sourceModuleName: string; - targetModuleName: string; - }); - }; - insertEntrypoint(definition: Entrypoint, parentId: string): void; - insertOrphanedEnhancer(entry: OrphanedEnhancerDefinition): void; - insertAttachedEnhancer(nodeId: string): void; - getNodeById(id: string): Node | undefined; - toJSON(): SerializedGraphJson; - toString(): string; - private generateUuidByEdgeDefinition; -} -export {}; diff --git a/node_modules/@nestjs/core/inspector/serialized-graph.js b/node_modules/@nestjs/core/inspector/serialized-graph.js deleted file mode 100644 index 92a47f0..0000000 --- a/node_modules/@nestjs/core/inspector/serialized-graph.js +++ /dev/null @@ -1,124 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SerializedGraph = void 0; -const application_config_1 = require("../application-config"); -const external_context_creator_1 = require("../helpers/external-context-creator"); -const http_adapter_host_1 = require("../helpers/http-adapter-host"); -const inquirer_constants_1 = require("../injector/inquirer/inquirer-constants"); -const lazy_module_loader_1 = require("../injector/lazy-module-loader/lazy-module-loader"); -const module_ref_1 = require("../injector/module-ref"); -const modules_container_1 = require("../injector/modules-container"); -const request_constants_1 = require("../router/request/request-constants"); -const reflector_service_1 = require("../services/reflector.service"); -const deterministic_uuid_registry_1 = require("./deterministic-uuid-registry"); -class SerializedGraph { - constructor() { - this.nodes = new Map(); - this.edges = new Map(); - this.entrypoints = new Map(); - this.extras = { - orphanedEnhancers: [], - attachedEnhancers: [], - }; - this._status = 'complete'; - } - set status(status) { - this._status = status; - } - set metadata(metadata) { - this._metadata = metadata; - } - insertNode(nodeDefinition) { - if (nodeDefinition.metadata.type === 'provider' && - SerializedGraph.INTERNAL_PROVIDERS.includes(nodeDefinition.metadata.token)) { - nodeDefinition.metadata = { - ...nodeDefinition.metadata, - internal: true, - }; - } - if (this.nodes.has(nodeDefinition.id)) { - return this.nodes.get(nodeDefinition.id); - } - this.nodes.set(nodeDefinition.id, nodeDefinition); - return nodeDefinition; - } - insertEdge(edgeDefinition) { - if (edgeDefinition.metadata.type === 'class-to-class' && - (SerializedGraph.INTERNAL_PROVIDERS.includes(edgeDefinition.metadata.sourceClassToken) || - SerializedGraph.INTERNAL_PROVIDERS.includes(edgeDefinition.metadata.targetClassToken))) { - edgeDefinition.metadata = { - ...edgeDefinition.metadata, - internal: true, - }; - } - const id = edgeDefinition.id ?? this.generateUuidByEdgeDefinition(edgeDefinition); - const edge = { - ...edgeDefinition, - id, - }; - this.edges.set(id, edge); - return edge; - } - insertEntrypoint(definition, parentId) { - if (this.entrypoints.has(parentId)) { - const existingCollection = this.entrypoints.get(parentId); - existingCollection.push(definition); - } - else { - this.entrypoints.set(parentId, [definition]); - } - } - insertOrphanedEnhancer(entry) { - this.extras.orphanedEnhancers.push(entry); - } - insertAttachedEnhancer(nodeId) { - this.extras.attachedEnhancers.push({ - nodeId, - }); - } - getNodeById(id) { - return this.nodes.get(id); - } - toJSON() { - const json = { - nodes: Object.fromEntries(this.nodes), - edges: Object.fromEntries(this.edges), - entrypoints: Object.fromEntries(this.entrypoints), - extras: this.extras, - }; - if (this._status) { - json['status'] = this._status; - } - if (this._metadata) { - json['metadata'] = this._metadata; - } - return json; - } - toString() { - const replacer = (key, value) => { - if (typeof value === 'symbol') { - return value.toString(); - } - return typeof value === 'function' ? (value.name ?? 'Function') : value; - }; - return JSON.stringify(this.toJSON(), replacer, 2); - } - generateUuidByEdgeDefinition(edgeDefinition) { - return deterministic_uuid_registry_1.DeterministicUuidRegistry.get(JSON.stringify(edgeDefinition)); - } -} -exports.SerializedGraph = SerializedGraph; -SerializedGraph.INTERNAL_PROVIDERS = [ - application_config_1.ApplicationConfig, - module_ref_1.ModuleRef, - http_adapter_host_1.HttpAdapterHost, - lazy_module_loader_1.LazyModuleLoader, - external_context_creator_1.ExternalContextCreator, - modules_container_1.ModulesContainer, - reflector_service_1.Reflector, - SerializedGraph, - http_adapter_host_1.HttpAdapterHost.name, - reflector_service_1.Reflector.name, - request_constants_1.REQUEST, - inquirer_constants_1.INQUIRER, -]; diff --git a/node_modules/@nestjs/core/inspector/uuid-factory.d.ts b/node_modules/@nestjs/core/inspector/uuid-factory.d.ts deleted file mode 100644 index 43039d0..0000000 --- a/node_modules/@nestjs/core/inspector/uuid-factory.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export declare enum UuidFactoryMode { - Random = "random", - Deterministic = "deterministic" -} -export declare class UuidFactory { - private static _mode; - static set mode(value: UuidFactoryMode); - static get(key?: string): any; -} diff --git a/node_modules/@nestjs/core/inspector/uuid-factory.js b/node_modules/@nestjs/core/inspector/uuid-factory.js deleted file mode 100644 index 5cfe1b3..0000000 --- a/node_modules/@nestjs/core/inspector/uuid-factory.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UuidFactory = exports.UuidFactoryMode = void 0; -const random_string_generator_util_1 = require("@nestjs/common/utils/random-string-generator.util"); -const deterministic_uuid_registry_1 = require("./deterministic-uuid-registry"); -var UuidFactoryMode; -(function (UuidFactoryMode) { - UuidFactoryMode["Random"] = "random"; - UuidFactoryMode["Deterministic"] = "deterministic"; -})(UuidFactoryMode || (exports.UuidFactoryMode = UuidFactoryMode = {})); -class UuidFactory { - static set mode(value) { - this._mode = value; - } - static get(key = '') { - return this._mode === UuidFactoryMode.Deterministic - ? deterministic_uuid_registry_1.DeterministicUuidRegistry.get(key) - : (0, random_string_generator_util_1.randomStringGenerator)(); - } -} -exports.UuidFactory = UuidFactory; -UuidFactory._mode = UuidFactoryMode.Random; diff --git a/node_modules/@nestjs/core/interceptors/index.d.ts b/node_modules/@nestjs/core/interceptors/index.d.ts deleted file mode 100644 index 7835bb2..0000000 --- a/node_modules/@nestjs/core/interceptors/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './interceptors-consumer'; -export * from './interceptors-context-creator'; diff --git a/node_modules/@nestjs/core/interceptors/index.js b/node_modules/@nestjs/core/interceptors/index.js deleted file mode 100644 index 4889ba3..0000000 --- a/node_modules/@nestjs/core/interceptors/index.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./interceptors-consumer"), exports); -tslib_1.__exportStar(require("./interceptors-context-creator"), exports); diff --git a/node_modules/@nestjs/core/interceptors/interceptors-consumer.d.ts b/node_modules/@nestjs/core/interceptors/interceptors-consumer.d.ts deleted file mode 100644 index af85243..0000000 --- a/node_modules/@nestjs/core/interceptors/interceptors-consumer.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { NestInterceptor } from '@nestjs/common'; -import { ContextType, Controller } from '@nestjs/common/interfaces'; -import { Observable } from 'rxjs'; -import { ExecutionContextHost } from '../helpers/execution-context-host'; -export declare class InterceptorsConsumer { - intercept(interceptors: NestInterceptor[], args: unknown[], instance: Controller, callback: (...args: unknown[]) => unknown, next: () => Promise, type?: TContext): Promise; - createContext(args: unknown[], instance: Controller, callback: (...args: unknown[]) => unknown): ExecutionContextHost; - transformDeferred(next: () => Promise): Observable; -} diff --git a/node_modules/@nestjs/core/interceptors/interceptors-consumer.js b/node_modules/@nestjs/core/interceptors/interceptors-consumer.js deleted file mode 100644 index 7c5130c..0000000 --- a/node_modules/@nestjs/core/interceptors/interceptors-consumer.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.InterceptorsConsumer = void 0; -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const async_hooks_1 = require("async_hooks"); -const rxjs_1 = require("rxjs"); -const operators_1 = require("rxjs/operators"); -const execution_context_host_1 = require("../helpers/execution-context-host"); -class InterceptorsConsumer { - async intercept(interceptors, args, instance, callback, next, type) { - if ((0, shared_utils_1.isEmpty)(interceptors)) { - return next(); - } - const context = this.createContext(args, instance, callback); - context.setType(type); - const nextFn = async (i = 0) => { - if (i >= interceptors.length) { - return (0, rxjs_1.defer)(async_hooks_1.AsyncResource.bind(() => this.transformDeferred(next))); - } - const handler = { - handle: () => (0, rxjs_1.defer)(async_hooks_1.AsyncResource.bind(() => nextFn(i + 1))).pipe((0, operators_1.mergeAll)()), - }; - return interceptors[i].intercept(context, handler); - }; - return (0, rxjs_1.defer)(() => nextFn()).pipe((0, operators_1.mergeAll)()); - } - createContext(args, instance, callback) { - return new execution_context_host_1.ExecutionContextHost(args, instance.constructor, callback); - } - transformDeferred(next) { - return (0, rxjs_1.from)(next()).pipe((0, operators_1.switchMap)(res => { - const isDeferred = res instanceof Promise || res instanceof rxjs_1.Observable; - return isDeferred ? res : Promise.resolve(res); - })); - } -} -exports.InterceptorsConsumer = InterceptorsConsumer; diff --git a/node_modules/@nestjs/core/interceptors/interceptors-context-creator.d.ts b/node_modules/@nestjs/core/interceptors/interceptors-context-creator.d.ts deleted file mode 100644 index 573176d..0000000 --- a/node_modules/@nestjs/core/interceptors/interceptors-context-creator.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Controller, NestInterceptor, Type } from '@nestjs/common/interfaces'; -import { ApplicationConfig } from '../application-config'; -import { ContextCreator } from '../helpers/context-creator'; -import { NestContainer } from '../injector/container'; -import { InstanceWrapper } from '../injector/instance-wrapper'; -export declare class InterceptorsContextCreator extends ContextCreator { - private readonly container; - private readonly config?; - private moduleContext; - constructor(container: NestContainer, config?: ApplicationConfig | undefined); - create(instance: Controller, callback: (...args: unknown[]) => unknown, module: string, contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): NestInterceptor[]; - createConcreteContext(metadata: T, contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): R; - getInterceptorInstance(metatype: Function | NestInterceptor, contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): NestInterceptor | null; - getInstanceByMetatype(metatype: Type): InstanceWrapper | undefined; - getGlobalMetadata(contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): T; -} diff --git a/node_modules/@nestjs/core/interceptors/interceptors-context-creator.js b/node_modules/@nestjs/core/interceptors/interceptors-context-creator.js deleted file mode 100644 index 02d19cc..0000000 --- a/node_modules/@nestjs/core/interceptors/interceptors-context-creator.js +++ /dev/null @@ -1,69 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.InterceptorsContextCreator = void 0; -const constants_1 = require("@nestjs/common/constants"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const iterare_1 = require("iterare"); -const context_creator_1 = require("../helpers/context-creator"); -const constants_2 = require("../injector/constants"); -class InterceptorsContextCreator extends context_creator_1.ContextCreator { - constructor(container, config) { - super(); - this.container = container; - this.config = config; - } - create(instance, callback, module, contextId = constants_2.STATIC_CONTEXT, inquirerId) { - this.moduleContext = module; - return this.createContext(instance, callback, constants_1.INTERCEPTORS_METADATA, contextId, inquirerId); - } - createConcreteContext(metadata, contextId = constants_2.STATIC_CONTEXT, inquirerId) { - if ((0, shared_utils_1.isEmpty)(metadata)) { - return []; - } - return (0, iterare_1.iterate)(metadata) - .filter(interceptor => interceptor && (interceptor.name || interceptor.intercept)) - .map(interceptor => this.getInterceptorInstance(interceptor, contextId, inquirerId)) - .filter((interceptor) => interceptor ? (0, shared_utils_1.isFunction)(interceptor.intercept) : false) - .toArray(); - } - getInterceptorInstance(metatype, contextId = constants_2.STATIC_CONTEXT, inquirerId) { - const isObject = !!metatype.intercept; - if (isObject) { - return metatype; - } - const instanceWrapper = this.getInstanceByMetatype(metatype); - if (!instanceWrapper) { - return null; - } - const instanceHost = instanceWrapper.getInstanceByContextId(this.getContextId(contextId, instanceWrapper), inquirerId); - return instanceHost && instanceHost.instance; - } - getInstanceByMetatype(metatype) { - if (!this.moduleContext) { - return; - } - const collection = this.container.getModules(); - const moduleRef = collection.get(this.moduleContext); - if (!moduleRef) { - return; - } - return moduleRef.injectables.get(metatype); - } - getGlobalMetadata(contextId = constants_2.STATIC_CONTEXT, inquirerId) { - if (!this.config) { - return []; - } - const globalInterceptors = this.config.getGlobalInterceptors(); - if (contextId === constants_2.STATIC_CONTEXT && !inquirerId) { - return globalInterceptors; - } - const scopedInterceptorWrappers = this.config.getGlobalRequestInterceptors(); - const scopedInterceptors = (0, iterare_1.iterate)(scopedInterceptorWrappers) - .map(wrapper => wrapper.getInstanceByContextId(this.getContextId(contextId, wrapper), inquirerId)) - .filter(host => !!host) - .map(host => host.instance) - .toArray(); - return globalInterceptors.concat(scopedInterceptors); - } -} -exports.InterceptorsContextCreator = InterceptorsContextCreator; diff --git a/node_modules/@nestjs/core/interfaces/index.d.ts b/node_modules/@nestjs/core/interfaces/index.d.ts deleted file mode 100644 index 448bd8e..0000000 --- a/node_modules/@nestjs/core/interfaces/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './module-definition.interface.js'; -export * from './module-override.interface.js'; diff --git a/node_modules/@nestjs/core/interfaces/index.js b/node_modules/@nestjs/core/interfaces/index.js deleted file mode 100644 index 448bd8e..0000000 --- a/node_modules/@nestjs/core/interfaces/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export * from './module-definition.interface.js'; -export * from './module-override.interface.js'; diff --git a/node_modules/@nestjs/core/interfaces/module-definition.interface.d.ts b/node_modules/@nestjs/core/interfaces/module-definition.interface.d.ts deleted file mode 100644 index 8537d64..0000000 --- a/node_modules/@nestjs/core/interfaces/module-definition.interface.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { DynamicModule, ForwardReference } from '@nestjs/common'; -import { Type } from '@nestjs/common/interfaces'; -export type ModuleDefinition = ForwardReference | Type | DynamicModule | Promise; diff --git a/node_modules/@nestjs/core/interfaces/module-definition.interface.js b/node_modules/@nestjs/core/interfaces/module-definition.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/core/interfaces/module-definition.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/core/interfaces/module-override.interface.d.ts b/node_modules/@nestjs/core/interfaces/module-override.interface.d.ts deleted file mode 100644 index 8d33e72..0000000 --- a/node_modules/@nestjs/core/interfaces/module-override.interface.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ModuleDefinition } from './module-definition.interface'; -export interface ModuleOverride { - moduleToReplace: ModuleDefinition; - newModule: ModuleDefinition; -} diff --git a/node_modules/@nestjs/core/interfaces/module-override.interface.js b/node_modules/@nestjs/core/interfaces/module-override.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/core/interfaces/module-override.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/core/internal.d.ts b/node_modules/@nestjs/core/internal.d.ts deleted file mode 100644 index 358cee2..0000000 --- a/node_modules/@nestjs/core/internal.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Internal module - not part of the public API. - * These exports are used by sibling @nestjs packages. - * Do not depend on these in your application code. - * @internal - * @module - */ -export { RuntimeException } from './errors/exceptions/runtime.exception.js'; -export { InvalidExceptionFilterException } from './errors/exceptions/invalid-exception-filter.exception.js'; -export { MESSAGES } from './constants.js'; -export { DependenciesScanner } from './scanner.js'; -export { Injector, InjectorDependencyContext } from './injector/injector.js'; -export { InstanceLoader } from './injector/instance-loader.js'; -export { InstanceWrapper } from './injector/instance-wrapper.js'; -export { Module } from './injector/module.js'; -export { STATIC_CONTEXT } from './injector/constants.js'; -export { ExecutionContextHost } from './helpers/execution-context-host.js'; -export { ContextUtils, ParamProperties } from './helpers/context-utils.js'; -export { HandlerMetadataStorage } from './helpers/handler-metadata-storage.js'; -export { RouterMethodFactory } from './helpers/router-method-factory.js'; -export { loadAdapter } from './helpers/load-adapter.js'; -export { optionalRequire } from './helpers/optional-require.js'; -export { ParamsMetadata } from './helpers/interfaces/index.js'; -export { GuardsConsumer } from './guards/guards-consumer.js'; -export { GuardsContextCreator } from './guards/guards-context-creator.js'; -export { FORBIDDEN_MESSAGE } from './guards/constants.js'; -export { PipesConsumer } from './pipes/pipes-consumer.js'; -export { PipesContextCreator } from './pipes/pipes-context-creator.js'; -export { ParamsTokenFactory } from './pipes/params-token-factory.js'; -export { InterceptorsConsumer } from './interceptors/interceptors-consumer.js'; -export { InterceptorsContextCreator } from './interceptors/interceptors-context-creator.js'; -export { BaseExceptionFilterContext } from './exceptions/base-exception-filter-context.js'; -export { LegacyRouteConverter } from './router/legacy-route-converter.js'; -export { REQUEST_CONTEXT_ID } from './router/request/request-constants.js'; -export { NoopGraphInspector } from './inspector/noop-graph-inspector.js'; -export { UuidFactory, UuidFactoryMode } from './inspector/uuid-factory.js'; -export { ModuleDefinition } from './interfaces/module-definition.interface.js'; -export { ModuleOverride } from './interfaces/module-override.interface.js'; diff --git a/node_modules/@nestjs/core/internal.js b/node_modules/@nestjs/core/internal.js deleted file mode 100644 index bc3531a..0000000 --- a/node_modules/@nestjs/core/internal.js +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Internal module - not part of the public API. - * These exports are used by sibling @nestjs packages. - * Do not depend on these in your application code. - * @internal - * @module - */ -// Errors -export { RuntimeException } from './errors/exceptions/runtime.exception.js'; -export { InvalidExceptionFilterException } from './errors/exceptions/invalid-exception-filter.exception.js'; -// Constants -export { MESSAGES } from './constants.js'; -// Scanner -export { DependenciesScanner } from './scanner.js'; -// Injector -export { Injector } from './injector/injector.js'; -export { InstanceLoader } from './injector/instance-loader.js'; -export { InstanceWrapper } from './injector/instance-wrapper.js'; -export { Module } from './injector/module.js'; -export { STATIC_CONTEXT } from './injector/constants.js'; -// Helpers -export { ExecutionContextHost } from './helpers/execution-context-host.js'; -export { ContextUtils } from './helpers/context-utils.js'; -export { HandlerMetadataStorage } from './helpers/handler-metadata-storage.js'; -export { RouterMethodFactory } from './helpers/router-method-factory.js'; -export { loadAdapter } from './helpers/load-adapter.js'; -export { optionalRequire } from './helpers/optional-require.js'; -// Guards -export { GuardsConsumer } from './guards/guards-consumer.js'; -export { GuardsContextCreator } from './guards/guards-context-creator.js'; -export { FORBIDDEN_MESSAGE } from './guards/constants.js'; -// Pipes -export { PipesConsumer } from './pipes/pipes-consumer.js'; -export { PipesContextCreator } from './pipes/pipes-context-creator.js'; -export { ParamsTokenFactory } from './pipes/params-token-factory.js'; -// Interceptors -export { InterceptorsConsumer } from './interceptors/interceptors-consumer.js'; -export { InterceptorsContextCreator } from './interceptors/interceptors-context-creator.js'; -// Exceptions -export { BaseExceptionFilterContext } from './exceptions/base-exception-filter-context.js'; -// Router -export { LegacyRouteConverter } from './router/legacy-route-converter.js'; -export { REQUEST_CONTEXT_ID } from './router/request/request-constants.js'; -// Inspector -export { NoopGraphInspector } from './inspector/noop-graph-inspector.js'; -export { UuidFactory, UuidFactoryMode } from './inspector/uuid-factory.js'; diff --git a/node_modules/@nestjs/core/metadata-scanner.d.ts b/node_modules/@nestjs/core/metadata-scanner.d.ts deleted file mode 100644 index 9593e77..0000000 --- a/node_modules/@nestjs/core/metadata-scanner.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Injectable } from '@nestjs/common/interfaces/injectable.interface'; -export declare class MetadataScanner { - private readonly cachedScannedPrototypes; - /** - * @deprecated - * @see {@link getAllMethodNames} - * @see getAllMethodNames - */ - scanFromPrototype(instance: T, prototype: object | null, callback: (name: string) => R): R[]; - /** - * @deprecated - * @see {@link getAllMethodNames} - * @see getAllMethodNames - */ - getAllFilteredMethodNames(prototype: object): IterableIterator; - getAllMethodNames(prototype: object | null): string[]; -} diff --git a/node_modules/@nestjs/core/metadata-scanner.js b/node_modules/@nestjs/core/metadata-scanner.js deleted file mode 100644 index 84f9648..0000000 --- a/node_modules/@nestjs/core/metadata-scanner.js +++ /dev/null @@ -1,83 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MetadataScanner = void 0; -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -class MetadataScanner { - constructor() { - this.cachedScannedPrototypes = new Map(); - } - /** - * @deprecated - * @see {@link getAllMethodNames} - * @see getAllMethodNames - */ - scanFromPrototype(instance, prototype, callback) { - if (!prototype) { - return []; - } - const visitedNames = new Map(); - const result = []; - do { - for (const property of Object.getOwnPropertyNames(prototype)) { - if (visitedNames.has(property)) { - continue; - } - visitedNames.set(property, true); - // reason: https://github.com/nestjs/nest/pull/10821#issuecomment-1411916533 - const descriptor = Object.getOwnPropertyDescriptor(prototype, property); - if (descriptor.set || - descriptor.get || - (0, shared_utils_1.isConstructor)(property) || - !(0, shared_utils_1.isFunction)(prototype[property])) { - continue; - } - const value = callback(property); - if ((0, shared_utils_1.isNil)(value)) { - continue; - } - result.push(value); - } - } while ((prototype = Reflect.getPrototypeOf(prototype)) && - prototype !== Object.prototype); - return result; - } - /** - * @deprecated - * @see {@link getAllMethodNames} - * @see getAllMethodNames - */ - *getAllFilteredMethodNames(prototype) { - yield* this.getAllMethodNames(prototype); - } - getAllMethodNames(prototype) { - if (!prototype) { - return []; - } - if (this.cachedScannedPrototypes.has(prototype)) { - return this.cachedScannedPrototypes.get(prototype); - } - const visitedNames = new Map(); - const result = []; - this.cachedScannedPrototypes.set(prototype, result); - do { - for (const property of Object.getOwnPropertyNames(prototype)) { - if (visitedNames.has(property)) { - continue; - } - visitedNames.set(property, true); - // reason: https://github.com/nestjs/nest/pull/10821#issuecomment-1411916533 - const descriptor = Object.getOwnPropertyDescriptor(prototype, property); - if (descriptor.set || - descriptor.get || - (0, shared_utils_1.isConstructor)(property) || - !(0, shared_utils_1.isFunction)(prototype[property])) { - continue; - } - result.push(property); - } - } while ((prototype = Reflect.getPrototypeOf(prototype)) && - prototype !== Object.prototype); - return result; - } -} -exports.MetadataScanner = MetadataScanner; diff --git a/node_modules/@nestjs/core/middleware/builder.d.ts b/node_modules/@nestjs/core/middleware/builder.d.ts deleted file mode 100644 index 789710f..0000000 --- a/node_modules/@nestjs/core/middleware/builder.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { HttpServer, MiddlewareConsumer, Type } from '@nestjs/common/interfaces'; -import { MiddlewareConfigProxy, MiddlewareConfiguration } from '@nestjs/common/interfaces/middleware'; -import { RouteInfoPathExtractor } from './route-info-path-extractor'; -import { RoutesMapper } from './routes-mapper'; -export declare class MiddlewareBuilder implements MiddlewareConsumer { - private readonly routesMapper; - private readonly httpAdapter; - private readonly routeInfoPathExtractor; - private readonly middlewareCollection; - constructor(routesMapper: RoutesMapper, httpAdapter: HttpServer, routeInfoPathExtractor: RouteInfoPathExtractor); - apply(...middleware: Array | Function | Array | Function>>): MiddlewareConfigProxy; - build(): MiddlewareConfiguration[]; - getHttpAdapter(): HttpServer; - private static readonly ConfigProxy; -} diff --git a/node_modules/@nestjs/core/middleware/builder.js b/node_modules/@nestjs/core/middleware/builder.js deleted file mode 100644 index 3aacb29..0000000 --- a/node_modules/@nestjs/core/middleware/builder.js +++ /dev/null @@ -1,91 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MiddlewareBuilder = void 0; -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const iterare_1 = require("iterare"); -const utils_1 = require("./utils"); -class MiddlewareBuilder { - constructor(routesMapper, httpAdapter, routeInfoPathExtractor) { - this.routesMapper = routesMapper; - this.httpAdapter = httpAdapter; - this.routeInfoPathExtractor = routeInfoPathExtractor; - this.middlewareCollection = new Set(); - } - apply(...middleware) { - return new MiddlewareBuilder.ConfigProxy(this, middleware.flat(), this.routeInfoPathExtractor); - } - build() { - return [...this.middlewareCollection]; - } - getHttpAdapter() { - return this.httpAdapter; - } -} -exports.MiddlewareBuilder = MiddlewareBuilder; -MiddlewareBuilder.ConfigProxy = class { - constructor(builder, middleware, routeInfoPathExtractor) { - this.builder = builder; - this.middleware = middleware; - this.routeInfoPathExtractor = routeInfoPathExtractor; - this.excludedRoutes = []; - } - getExcludedRoutes() { - return this.excludedRoutes; - } - exclude(...routes) { - this.excludedRoutes = [ - ...this.excludedRoutes, - ...this.getRoutesFlatList(routes).reduce((excludedRoutes, route) => { - for (const routePath of this.routeInfoPathExtractor.extractPathFrom(route)) { - excludedRoutes.push({ - ...route, - path: routePath, - }); - } - return excludedRoutes; - }, []), - ]; - return this; - } - forRoutes(...routes) { - const { middlewareCollection } = this.builder; - const flattedRoutes = this.getRoutesFlatList(routes); - const forRoutes = this.removeOverlappedRoutes(flattedRoutes); - const configuration = { - middleware: (0, utils_1.filterMiddleware)(this.middleware, this.excludedRoutes, this.builder.getHttpAdapter()), - forRoutes, - }; - middlewareCollection.add(configuration); - return this.builder; - } - getRoutesFlatList(routes) { - const { routesMapper } = this.builder; - return (0, iterare_1.iterate)(routes) - .map(route => routesMapper.mapRouteToRouteInfo(route)) - .flatten() - .toArray(); - } - removeOverlappedRoutes(routes) { - const regexMatchParams = /(:[^/]*)/g; - const wildcard = '([^/]*)'; - const routesWithRegex = routes - .filter(route => route.path.includes(':')) - .map(route => ({ - method: route.method, - path: route.path, - regex: new RegExp('^(' + route.path.replace(regexMatchParams, wildcard) + ')$', 'g'), - })); - return routes.filter(route => { - const isOverlapped = (item) => { - if (route.method !== item.method) { - return false; - } - const normalizedRoutePath = (0, shared_utils_1.stripEndSlash)(route.path); - return (normalizedRoutePath !== item.path && - item.regex.test(normalizedRoutePath)); - }; - const routeMatch = routesWithRegex.find(isOverlapped); - return routeMatch === undefined; - }); - } -}; diff --git a/node_modules/@nestjs/core/middleware/container.d.ts b/node_modules/@nestjs/core/middleware/container.d.ts deleted file mode 100644 index ad464df..0000000 --- a/node_modules/@nestjs/core/middleware/container.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { InjectionToken } from '@nestjs/common'; -import { MiddlewareConfiguration } from '@nestjs/common/interfaces/middleware/middleware-configuration.interface'; -import { NestContainer } from '../injector/container'; -import { InstanceWrapper } from '../injector/instance-wrapper'; -export declare class MiddlewareContainer { - private readonly container; - private readonly middleware; - private readonly configurationSets; - constructor(container: NestContainer); - getMiddlewareCollection(moduleKey: string): Map; - getConfigurations(): Map>; - insertConfig(configList: MiddlewareConfiguration[], moduleKey: string): void; - private getTargetConfig; -} diff --git a/node_modules/@nestjs/core/middleware/container.js b/node_modules/@nestjs/core/middleware/container.js deleted file mode 100644 index 98c0793..0000000 --- a/node_modules/@nestjs/core/middleware/container.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MiddlewareContainer = void 0; -const get_class_scope_1 = require("../helpers/get-class-scope"); -const is_durable_1 = require("../helpers/is-durable"); -const instance_wrapper_1 = require("../injector/instance-wrapper"); -class MiddlewareContainer { - constructor(container) { - this.container = container; - this.middleware = new Map(); - this.configurationSets = new Map(); - } - getMiddlewareCollection(moduleKey) { - if (!this.middleware.has(moduleKey)) { - const moduleRef = this.container.getModuleByKey(moduleKey); - this.middleware.set(moduleKey, moduleRef.middlewares); - } - return this.middleware.get(moduleKey); - } - getConfigurations() { - return this.configurationSets; - } - insertConfig(configList, moduleKey) { - const middleware = this.getMiddlewareCollection(moduleKey); - const targetConfig = this.getTargetConfig(moduleKey); - const configurations = configList || []; - const insertMiddleware = (metatype) => { - const token = metatype; - middleware.set(token, new instance_wrapper_1.InstanceWrapper({ - scope: (0, get_class_scope_1.getClassScope)(metatype), - durable: (0, is_durable_1.isDurable)(metatype), - name: token?.name ?? token, - metatype, - token, - })); - }; - configurations.forEach(config => { - [].concat(config.middleware).map(insertMiddleware); - targetConfig.add(config); - }); - } - getTargetConfig(moduleName) { - if (!this.configurationSets.has(moduleName)) { - this.configurationSets.set(moduleName, new Set()); - } - return this.configurationSets.get(moduleName); - } -} -exports.MiddlewareContainer = MiddlewareContainer; diff --git a/node_modules/@nestjs/core/middleware/index.d.ts b/node_modules/@nestjs/core/middleware/index.d.ts deleted file mode 100644 index ecea700..0000000 --- a/node_modules/@nestjs/core/middleware/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './builder'; diff --git a/node_modules/@nestjs/core/middleware/index.js b/node_modules/@nestjs/core/middleware/index.js deleted file mode 100644 index a0aa0aa..0000000 --- a/node_modules/@nestjs/core/middleware/index.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./builder"), exports); diff --git a/node_modules/@nestjs/core/middleware/middleware-module.d.ts b/node_modules/@nestjs/core/middleware/middleware-module.d.ts deleted file mode 100644 index ac3b172..0000000 --- a/node_modules/@nestjs/core/middleware/middleware-module.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { HttpServer } from '@nestjs/common'; -import { MiddlewareConfiguration, RouteInfo } from '@nestjs/common/interfaces/middleware'; -import { NestApplicationContextOptions } from '@nestjs/common/interfaces/nest-application-context-options.interface'; -import { ApplicationConfig } from '../application-config'; -import { NestContainer } from '../injector/container'; -import { Injector } from '../injector/injector'; -import { Module } from '../injector/module'; -import { GraphInspector } from '../inspector/graph-inspector'; -import { MiddlewareContainer } from './container'; -export declare class MiddlewareModule { - private readonly routerProxy; - private readonly exceptionFiltersCache; - private readonly logger; - private injector; - private routerExceptionFilter; - private routesMapper; - private resolver; - private container; - private httpAdapter; - private graphInspector; - private appOptions; - private routeInfoPathExtractor; - register(middlewareContainer: MiddlewareContainer, container: NestContainer, config: ApplicationConfig, injector: Injector, httpAdapter: HttpServer, graphInspector: GraphInspector, options: TAppOptions): Promise; - resolveMiddleware(middlewareContainer: MiddlewareContainer, modules: Map): Promise; - loadConfiguration(middlewareContainer: MiddlewareContainer, moduleRef: Module, moduleKey: string): Promise; - registerMiddleware(middlewareContainer: MiddlewareContainer, applicationRef: any): Promise; - registerMiddlewareConfig(middlewareContainer: MiddlewareContainer, config: MiddlewareConfiguration, moduleKey: string, applicationRef: any): Promise; - registerRouteMiddleware(middlewareContainer: MiddlewareContainer, routeInfo: RouteInfo, config: MiddlewareConfiguration, moduleKey: string, applicationRef: any): Promise; - private bindHandler; - private createProxy; - private registerHandler; - private getContextId; -} diff --git a/node_modules/@nestjs/core/middleware/middleware-module.js b/node_modules/@nestjs/core/middleware/middleware-module.js deleted file mode 100644 index ec9603f..0000000 --- a/node_modules/@nestjs/core/middleware/middleware-module.js +++ /dev/null @@ -1,208 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MiddlewareModule = void 0; -const common_1 = require("@nestjs/common"); -const request_method_enum_1 = require("@nestjs/common/enums/request-method.enum"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const invalid_middleware_exception_1 = require("../errors/exceptions/invalid-middleware.exception"); -const runtime_exception_1 = require("../errors/exceptions/runtime.exception"); -const context_id_factory_1 = require("../helpers/context-id-factory"); -const execution_context_host_1 = require("../helpers/execution-context-host"); -const constants_1 = require("../injector/constants"); -const request_constants_1 = require("../router/request/request-constants"); -const router_exception_filters_1 = require("../router/router-exception-filters"); -const router_proxy_1 = require("../router/router-proxy"); -const utils_1 = require("../router/utils"); -const builder_1 = require("./builder"); -const resolver_1 = require("./resolver"); -const route_info_path_extractor_1 = require("./route-info-path-extractor"); -const routes_mapper_1 = require("./routes-mapper"); -class MiddlewareModule { - constructor() { - this.routerProxy = new router_proxy_1.RouterProxy(); - this.exceptionFiltersCache = new WeakMap(); - this.logger = new common_1.Logger(MiddlewareModule.name); - } - async register(middlewareContainer, container, config, injector, httpAdapter, graphInspector, options) { - this.appOptions = options; - const appRef = container.getHttpAdapterRef(); - this.routerExceptionFilter = new router_exception_filters_1.RouterExceptionFilters(container, config, appRef); - this.routesMapper = new routes_mapper_1.RoutesMapper(container, config); - this.resolver = new resolver_1.MiddlewareResolver(middlewareContainer, injector); - this.routeInfoPathExtractor = new route_info_path_extractor_1.RouteInfoPathExtractor(config); - this.injector = injector; - this.container = container; - this.httpAdapter = httpAdapter; - this.graphInspector = graphInspector; - const modules = container.getModules(); - await this.resolveMiddleware(middlewareContainer, modules); - } - async resolveMiddleware(middlewareContainer, modules) { - const moduleEntries = [...modules.entries()]; - const loadMiddlewareConfiguration = async ([moduleName, moduleRef]) => { - await this.loadConfiguration(middlewareContainer, moduleRef, moduleName); - await this.resolver.resolveInstances(moduleRef, moduleName); - }; - await Promise.all(moduleEntries.map(loadMiddlewareConfiguration)); - } - async loadConfiguration(middlewareContainer, moduleRef, moduleKey) { - const { instance } = moduleRef; - if (!instance.configure) { - return; - } - const middlewareBuilder = new builder_1.MiddlewareBuilder(this.routesMapper, this.httpAdapter, this.routeInfoPathExtractor); - try { - await instance.configure(middlewareBuilder); - } - catch (err) { - if (!this.appOptions.preview) { - throw err; - } - const warningMessage = `Warning! "${moduleRef.name}" module exposes a "configure" method that throws an exception in the preview mode` + - ` (possibly due to missing dependencies). Note: you can ignore this message, just be aware that some of those conditional middlewares will not be reflected in your graph.`; - this.logger.warn(warningMessage); - } - if (!(middlewareBuilder instanceof builder_1.MiddlewareBuilder)) { - return; - } - const config = middlewareBuilder.build(); - middlewareContainer.insertConfig(config, moduleKey); - } - async registerMiddleware(middlewareContainer, applicationRef) { - const configs = middlewareContainer.getConfigurations(); - const registerAllConfigs = async (moduleKey, middlewareConfig) => { - for (const config of middlewareConfig) { - await this.registerMiddlewareConfig(middlewareContainer, config, moduleKey, applicationRef); - } - }; - const entriesSortedByDistance = [...configs.entries()].sort(([moduleA], [moduleB]) => { - const moduleARef = this.container.getModuleByKey(moduleA); - const moduleBRef = this.container.getModuleByKey(moduleB); - const isModuleAGlobal = moduleARef.distance === Number.MAX_VALUE; - const isModuleBGlobal = moduleBRef.distance === Number.MAX_VALUE; - if (isModuleAGlobal && isModuleBGlobal) { - return 0; - } - if (isModuleAGlobal) { - return -1; - } - if (isModuleBGlobal) { - return 1; - } - return moduleARef.distance - moduleBRef.distance; - }); - for (const [moduleRef, moduleConfigurations] of entriesSortedByDistance) { - await registerAllConfigs(moduleRef, [...moduleConfigurations]); - } - } - async registerMiddlewareConfig(middlewareContainer, config, moduleKey, applicationRef) { - const { forRoutes } = config; - for (const routeInfo of forRoutes) { - await this.registerRouteMiddleware(middlewareContainer, routeInfo, config, moduleKey, applicationRef); - } - } - async registerRouteMiddleware(middlewareContainer, routeInfo, config, moduleKey, applicationRef) { - const middlewareCollection = [].concat(config.middleware); - const moduleRef = this.container.getModuleByKey(moduleKey); - for (const metatype of middlewareCollection) { - const collection = middlewareContainer.getMiddlewareCollection(moduleKey); - const instanceWrapper = collection.get(metatype); - if ((0, shared_utils_1.isUndefined)(instanceWrapper)) { - throw new runtime_exception_1.RuntimeException(); - } - if (instanceWrapper.isTransient) { - return; - } - this.graphInspector.insertClassNode(moduleRef, instanceWrapper, 'middleware'); - const middlewareDefinition = { - type: 'middleware', - methodName: 'use', - className: instanceWrapper.name, - classNodeId: instanceWrapper.id, - metadata: { - key: routeInfo.path, - path: routeInfo.path, - requestMethod: request_method_enum_1.RequestMethod[routeInfo.method] ?? - 'ALL', - version: routeInfo.version, - }, - }; - this.graphInspector.insertEntrypointDefinition(middlewareDefinition, instanceWrapper.id); - await this.bindHandler(instanceWrapper, applicationRef, routeInfo, moduleRef, collection); - } - } - async bindHandler(wrapper, applicationRef, routeInfo, moduleRef, collection) { - const { instance, metatype } = wrapper; - if ((0, shared_utils_1.isUndefined)(instance?.use)) { - throw new invalid_middleware_exception_1.InvalidMiddlewareException(metatype.name); - } - const isStatic = wrapper.isDependencyTreeStatic(); - if (isStatic) { - const proxy = await this.createProxy(instance); - return this.registerHandler(applicationRef, routeInfo, proxy); - } - const isTreeDurable = wrapper.isDependencyTreeDurable(); - await this.registerHandler(applicationRef, routeInfo, async (req, res, next) => { - try { - const contextId = this.getContextId(req, isTreeDurable); - const contextInstance = await this.injector.loadPerContext(instance, moduleRef, collection, contextId); - const proxy = await this.createProxy(contextInstance, contextId); - return proxy(req, res, next); - } - catch (err) { - let exceptionsHandler = this.exceptionFiltersCache.get(instance.use); - if (!exceptionsHandler) { - exceptionsHandler = this.routerExceptionFilter.create(instance, instance.use, undefined); - this.exceptionFiltersCache.set(instance.use, exceptionsHandler); - } - const host = new execution_context_host_1.ExecutionContextHost([req, res, next]); - exceptionsHandler.next(err, host); - } - }); - } - async createProxy(instance, contextId = constants_1.STATIC_CONTEXT) { - const exceptionsHandler = this.routerExceptionFilter.create(instance, instance.use, undefined, contextId); - const middleware = instance.use.bind(instance); - return this.routerProxy.createProxy(middleware, exceptionsHandler); - } - async registerHandler(applicationRef, routeInfo, proxy) { - const { method } = routeInfo; - const paths = this.routeInfoPathExtractor.extractPathsFrom(routeInfo); - const isMethodAll = (0, utils_1.isRequestMethodAll)(method); - const requestMethod = request_method_enum_1.RequestMethod[method]; - const router = await applicationRef.createMiddlewareFactory(method); - const middlewareFunction = isMethodAll - ? proxy - : (req, res, next) => { - const actualRequestMethod = applicationRef.getRequestMethod?.(req); - if (actualRequestMethod === requestMethod || - (actualRequestMethod === request_method_enum_1.RequestMethod[request_method_enum_1.RequestMethod.HEAD] && - requestMethod === request_method_enum_1.RequestMethod[request_method_enum_1.RequestMethod.GET])) { - return proxy(req, res, next); - } - return next(); - }; - const pathsToApplyMiddleware = []; - paths.some(path => path.match(/^\/?$/)) - ? pathsToApplyMiddleware.push('/') - : pathsToApplyMiddleware.push(...paths); - pathsToApplyMiddleware.forEach(path => router(path, middlewareFunction)); - } - getContextId(request, isTreeDurable) { - const contextId = context_id_factory_1.ContextIdFactory.getByRequest(request); - if (!request[request_constants_1.REQUEST_CONTEXT_ID]) { - Object.defineProperty(request, request_constants_1.REQUEST_CONTEXT_ID, { - value: contextId, - enumerable: false, - writable: false, - configurable: false, - }); - const requestProviderValue = isTreeDurable - ? contextId.payload - : Object.assign(request, contextId.payload); - this.container.registerRequestProvider(requestProviderValue, contextId); - } - return contextId; - } -} -exports.MiddlewareModule = MiddlewareModule; diff --git a/node_modules/@nestjs/core/middleware/resolver.d.ts b/node_modules/@nestjs/core/middleware/resolver.d.ts deleted file mode 100644 index f9c0f3a..0000000 --- a/node_modules/@nestjs/core/middleware/resolver.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Injector } from '../injector/injector'; -import { Module } from '../injector/module'; -import { MiddlewareContainer } from './container'; -export declare class MiddlewareResolver { - private readonly middlewareContainer; - private readonly injector; - constructor(middlewareContainer: MiddlewareContainer, injector: Injector); - resolveInstances(moduleRef: Module, moduleName: string): Promise; - private resolveMiddlewareInstance; -} diff --git a/node_modules/@nestjs/core/middleware/resolver.js b/node_modules/@nestjs/core/middleware/resolver.js deleted file mode 100644 index e8df718..0000000 --- a/node_modules/@nestjs/core/middleware/resolver.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MiddlewareResolver = void 0; -class MiddlewareResolver { - constructor(middlewareContainer, injector) { - this.middlewareContainer = middlewareContainer; - this.injector = injector; - } - async resolveInstances(moduleRef, moduleName) { - const middlewareMap = this.middlewareContainer.getMiddlewareCollection(moduleName); - const resolveInstance = async (wrapper) => this.resolveMiddlewareInstance(wrapper, middlewareMap, moduleRef); - await Promise.all([...middlewareMap.values()].map(resolveInstance)); - } - async resolveMiddlewareInstance(wrapper, middlewareMap, moduleRef) { - await this.injector.loadMiddleware(wrapper, middlewareMap, moduleRef); - } -} -exports.MiddlewareResolver = MiddlewareResolver; diff --git a/node_modules/@nestjs/core/middleware/route-info-path-extractor.d.ts b/node_modules/@nestjs/core/middleware/route-info-path-extractor.d.ts deleted file mode 100644 index 4fa7af6..0000000 --- a/node_modules/@nestjs/core/middleware/route-info-path-extractor.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { RouteInfo } from '@nestjs/common/interfaces'; -import { ApplicationConfig } from '../application-config'; -export declare class RouteInfoPathExtractor { - private readonly applicationConfig; - private readonly routePathFactory; - private readonly prefixPath; - private readonly excludedGlobalPrefixRoutes; - private readonly versioningConfig?; - constructor(applicationConfig: ApplicationConfig); - extractPathsFrom({ path, method, version }: RouteInfo): string[]; - extractPathFrom(route: RouteInfo): string[]; - private isAWildcard; - private extractNonWildcardPathsFrom; - private extractVersionPathFrom; -} diff --git a/node_modules/@nestjs/core/middleware/route-info-path-extractor.js b/node_modules/@nestjs/core/middleware/route-info-path-extractor.js deleted file mode 100644 index 0d4777e..0000000 --- a/node_modules/@nestjs/core/middleware/route-info-path-extractor.js +++ /dev/null @@ -1,81 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RouteInfoPathExtractor = void 0; -const common_1 = require("@nestjs/common"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const utils_1 = require("../router/utils"); -const route_path_factory_1 = require("./../router/route-path-factory"); -class RouteInfoPathExtractor { - constructor(applicationConfig) { - this.applicationConfig = applicationConfig; - this.routePathFactory = new route_path_factory_1.RoutePathFactory(applicationConfig); - this.prefixPath = (0, shared_utils_1.stripEndSlash)((0, shared_utils_1.addLeadingSlash)(this.applicationConfig.getGlobalPrefix())); - this.excludedGlobalPrefixRoutes = - this.applicationConfig.getGlobalPrefixOptions().exclude; - this.versioningConfig = this.applicationConfig.getVersioning(); - } - extractPathsFrom({ path, method, version }) { - const versionPaths = this.extractVersionPathFrom(version); - if (this.isAWildcard(path)) { - const entries = versionPaths.length > 0 - ? versionPaths - .map(versionPath => [ - this.prefixPath + versionPath + '$', - this.prefixPath + versionPath + (0, shared_utils_1.addLeadingSlash)(path), - ]) - .flat() - : this.prefixPath - ? [this.prefixPath + '$', this.prefixPath + (0, shared_utils_1.addLeadingSlash)(path)] - : [(0, shared_utils_1.addLeadingSlash)(path)]; - return Array.isArray(this.excludedGlobalPrefixRoutes) - ? [ - ...entries, - ...this.excludedGlobalPrefixRoutes - .map(route => Array.isArray(versionPaths) && versionPaths.length > 0 - ? versionPaths.map(v => v + (0, shared_utils_1.addLeadingSlash)(route.path)) - : (0, shared_utils_1.addLeadingSlash)(route.path)) - .flat(), - ] - : entries; - } - return this.extractNonWildcardPathsFrom({ path, method, version }); - } - extractPathFrom(route) { - if (this.isAWildcard(route.path) && !route.version) { - return [(0, shared_utils_1.addLeadingSlash)(route.path)]; - } - return this.extractNonWildcardPathsFrom(route); - } - isAWildcard(path) { - const isSimpleWildcard = ['*', '/*', '/*/', '(.*)', '/(.*)']; - if (isSimpleWildcard.includes(path)) { - return true; - } - const wildcardRegexp = /^\/\{.*\}.*|^\/\*.*$/; - return wildcardRegexp.test(path); - } - extractNonWildcardPathsFrom({ path, method, version, }) { - const versionPaths = this.extractVersionPathFrom(version); - if (Array.isArray(this.excludedGlobalPrefixRoutes) && - (0, utils_1.isRouteExcluded)(this.excludedGlobalPrefixRoutes, path, method)) { - if (!versionPaths.length) { - return [(0, shared_utils_1.addLeadingSlash)(path)]; - } - return versionPaths.map(versionPath => versionPath + (0, shared_utils_1.addLeadingSlash)(path)); - } - if (!versionPaths.length) { - return [this.prefixPath + (0, shared_utils_1.addLeadingSlash)(path)]; - } - return versionPaths.map(versionPath => this.prefixPath + versionPath + (0, shared_utils_1.addLeadingSlash)(path)); - } - extractVersionPathFrom(versionValue) { - if (!versionValue || this.versioningConfig?.type !== common_1.VersioningType.URI) - return []; - const versionPrefix = this.routePathFactory.getVersionPrefix(this.versioningConfig); - if (Array.isArray(versionValue)) { - return versionValue.map(version => (0, shared_utils_1.addLeadingSlash)(versionPrefix + version.toString())); - } - return [(0, shared_utils_1.addLeadingSlash)(versionPrefix + versionValue.toString())]; - } -} -exports.RouteInfoPathExtractor = RouteInfoPathExtractor; diff --git a/node_modules/@nestjs/core/middleware/routes-mapper.d.ts b/node_modules/@nestjs/core/middleware/routes-mapper.d.ts deleted file mode 100644 index dfd9bce..0000000 --- a/node_modules/@nestjs/core/middleware/routes-mapper.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { RouteInfo, Type } from '@nestjs/common/interfaces'; -import { ApplicationConfig } from '../application-config'; -import { NestContainer } from '../injector/container'; -export declare class RoutesMapper { - private readonly container; - private readonly applicationConfig; - private readonly pathsExplorer; - constructor(container: NestContainer, applicationConfig: ApplicationConfig); - mapRouteToRouteInfo(controllerOrRoute: Type | RouteInfo | string): RouteInfo[]; - private getRouteInfoFromPath; - private getRouteInfoFromObject; - private getRouteInfoFromController; - private isRouteInfo; - private normalizeGlobalPath; - private getRoutePath; - private getHostModuleOfController; - private getModulePath; - private getVersionMetadata; -} diff --git a/node_modules/@nestjs/core/middleware/routes-mapper.js b/node_modules/@nestjs/core/middleware/routes-mapper.js deleted file mode 100644 index 62045a0..0000000 --- a/node_modules/@nestjs/core/middleware/routes-mapper.js +++ /dev/null @@ -1,117 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RoutesMapper = void 0; -const constants_1 = require("@nestjs/common/constants"); -const interfaces_1 = require("@nestjs/common/interfaces"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const metadata_scanner_1 = require("../metadata-scanner"); -const paths_explorer_1 = require("../router/paths-explorer"); -const router_module_1 = require("../router/router-module"); -class RoutesMapper { - constructor(container, applicationConfig) { - this.container = container; - this.applicationConfig = applicationConfig; - this.pathsExplorer = new paths_explorer_1.PathsExplorer(new metadata_scanner_1.MetadataScanner()); - } - mapRouteToRouteInfo(controllerOrRoute) { - if ((0, shared_utils_1.isString)(controllerOrRoute)) { - return this.getRouteInfoFromPath(controllerOrRoute); - } - const routePathOrPaths = this.getRoutePath(controllerOrRoute); - if (this.isRouteInfo(routePathOrPaths, controllerOrRoute)) { - return this.getRouteInfoFromObject(controllerOrRoute); - } - return this.getRouteInfoFromController(controllerOrRoute, routePathOrPaths); - } - getRouteInfoFromPath(routePath) { - const defaultRequestMethod = -1; - return [ - { - path: (0, shared_utils_1.addLeadingSlash)(routePath), - method: defaultRequestMethod, - }, - ]; - } - getRouteInfoFromObject(routeInfoObject) { - const routeInfo = { - path: (0, shared_utils_1.addLeadingSlash)(routeInfoObject.path), - method: routeInfoObject.method, - }; - if (routeInfoObject.version) { - routeInfo.version = routeInfoObject.version; - } - return [routeInfo]; - } - getRouteInfoFromController(controller, routePath) { - const controllerPaths = this.pathsExplorer.scanForPaths(Object.create(controller), controller.prototype); - const controllerVersion = this.getVersionMetadata(controller); - const versioningConfig = this.applicationConfig.getVersioning(); - const moduleRef = this.getHostModuleOfController(controller); - const modulePath = this.getModulePath(moduleRef?.metatype); - const concatPaths = (acc, currentValue) => acc.concat(currentValue); - const toUndefinedIfNeural = (version) => version === interfaces_1.VERSION_NEUTRAL ? undefined : version; - const toRouteInfo = (item, prefix) => item.path?.flatMap(p => { - let endpointPath = modulePath ?? ''; - endpointPath += this.normalizeGlobalPath(prefix) + (0, shared_utils_1.addLeadingSlash)(p); - const routeInfo = { - path: endpointPath, - method: item.requestMethod, - }; - const version = item.version ?? controllerVersion; - if (version && versioningConfig) { - if (typeof version !== 'string' && Array.isArray(version)) { - return version.map(v => ({ - ...routeInfo, - version: toUndefinedIfNeural(v), - })); - } - routeInfo.version = toUndefinedIfNeural(version); - } - return routeInfo; - }); - return [] - .concat(routePath) - .map(routePath => controllerPaths - .map(item => toRouteInfo(item, routePath)) - .reduce(concatPaths, [])) - .reduce(concatPaths, []); - } - isRouteInfo(path, objectOrClass) { - return (0, shared_utils_1.isUndefined)(path); - } - normalizeGlobalPath(path) { - const prefix = (0, shared_utils_1.addLeadingSlash)(path); - return prefix === '/' ? '' : prefix; - } - getRoutePath(route) { - return Reflect.getMetadata(constants_1.PATH_METADATA, route); - } - getHostModuleOfController(metatype) { - if (!metatype) { - return; - } - const modulesContainer = this.container.getModules(); - const moduleRefsSet = router_module_1.targetModulesByContainer.get(modulesContainer); - if (!moduleRefsSet) { - return; - } - const modules = Array.from(modulesContainer.values()).filter(moduleRef => moduleRefsSet.has(moduleRef)); - return modules.find(({ controllers }) => controllers.has(metatype)); - } - getModulePath(metatype) { - if (!metatype) { - return; - } - const modulesContainer = this.container.getModules(); - const modulePath = Reflect.getMetadata(constants_1.MODULE_PATH + modulesContainer.applicationId, metatype); - return modulePath ?? Reflect.getMetadata(constants_1.MODULE_PATH, metatype); - } - getVersionMetadata(metatype) { - const versioningConfig = this.applicationConfig.getVersioning(); - if (versioningConfig) { - return (Reflect.getMetadata(constants_1.VERSION_METADATA, metatype) ?? - versioningConfig.defaultVersion); - } - } -} -exports.RoutesMapper = RoutesMapper; diff --git a/node_modules/@nestjs/core/middleware/utils.d.ts b/node_modules/@nestjs/core/middleware/utils.d.ts deleted file mode 100644 index 1f6cc2b..0000000 --- a/node_modules/@nestjs/core/middleware/utils.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { HttpServer, RouteInfo, Type } from '@nestjs/common/interfaces'; -import { ExcludeRouteMetadata } from '../router/interfaces/exclude-route-metadata.interface'; -export declare const mapToExcludeRoute: (routes: (string | RouteInfo)[]) => ExcludeRouteMetadata[]; -export declare const filterMiddleware: = any>(middleware: T[], routes: RouteInfo[], httpAdapter: HttpServer) => Type[]; -export declare const mapToClass: >(middleware: T, excludedRoutes: ExcludeRouteMetadata[], httpAdapter: HttpServer) => Type; -export declare function isMiddlewareClass(middleware: any): middleware is Type; -export declare function assignToken(metatype: Type, token?: string): Type; -export declare function isMiddlewareRouteExcluded(req: Record, excludedRoutes: ExcludeRouteMetadata[], httpAdapter: HttpServer): boolean; diff --git a/node_modules/@nestjs/core/middleware/utils.js b/node_modules/@nestjs/core/middleware/utils.js deleted file mode 100644 index e132dee..0000000 --- a/node_modules/@nestjs/core/middleware/utils.js +++ /dev/null @@ -1,106 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.mapToClass = exports.filterMiddleware = exports.mapToExcludeRoute = void 0; -exports.isMiddlewareClass = isMiddlewareClass; -exports.assignToken = assignToken; -exports.isMiddlewareRouteExcluded = isMiddlewareRouteExcluded; -const common_1 = require("@nestjs/common"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const iterare_1 = require("iterare"); -const path_to_regexp_1 = require("path-to-regexp"); -const uid_1 = require("uid"); -const legacy_route_converter_1 = require("../router/legacy-route-converter"); -const utils_1 = require("../router/utils"); -const mapToExcludeRoute = (routes) => { - return routes.map(route => { - const originalPath = (0, shared_utils_1.isString)(route) ? route : route.path; - const path = legacy_route_converter_1.LegacyRouteConverter.tryConvert(originalPath); - try { - if ((0, shared_utils_1.isString)(route)) { - return { - path, - requestMethod: common_1.RequestMethod.ALL, - pathRegex: (0, path_to_regexp_1.pathToRegexp)((0, shared_utils_1.addLeadingSlash)(path)).regexp, - }; - } - return { - path, - requestMethod: route.method, - pathRegex: (0, path_to_regexp_1.pathToRegexp)((0, shared_utils_1.addLeadingSlash)(path)).regexp, - }; - } - catch (e) { - if (e instanceof TypeError) { - legacy_route_converter_1.LegacyRouteConverter.printError(originalPath); - } - throw e; - } - }); -}; -exports.mapToExcludeRoute = mapToExcludeRoute; -const filterMiddleware = (middleware, routes, httpAdapter) => { - const excludedRoutes = (0, exports.mapToExcludeRoute)(routes); - return (0, iterare_1.iterate)([]) - .concat(middleware) - .filter(shared_utils_1.isFunction) - .map((item) => (0, exports.mapToClass)(item, excludedRoutes, httpAdapter)) - .toArray(); -}; -exports.filterMiddleware = filterMiddleware; -const mapToClass = (middleware, excludedRoutes, httpAdapter) => { - if (isMiddlewareClass(middleware)) { - if (excludedRoutes.length <= 0) { - return middleware; - } - const MiddlewareHost = class extends middleware { - use(...params) { - const [req, _, next] = params; - const isExcluded = isMiddlewareRouteExcluded(req, excludedRoutes, httpAdapter); - if (isExcluded) { - return next(); - } - return super.use(...params); - } - }; - return assignToken(MiddlewareHost, middleware.name); - } - return assignToken(class { - constructor() { - this.use = (...params) => { - const [req, _, next] = params; - const isExcluded = isMiddlewareRouteExcluded(req, excludedRoutes, httpAdapter); - if (isExcluded) { - return next(); - } - return middleware(...params); - }; - } - }); -}; -exports.mapToClass = mapToClass; -function isMiddlewareClass(middleware) { - const middlewareStr = middleware.toString(); - if (middlewareStr.substring(0, 5) === 'class') { - return true; - } - const middlewareArr = middlewareStr.split(' '); - return (middlewareArr[0] === 'function' && - /[A-Z]/.test(middlewareArr[1]?.[0]) && - (0, shared_utils_1.isFunction)(middleware.prototype?.use)); -} -function assignToken(metatype, token = (0, uid_1.uid)(21)) { - Object.defineProperty(metatype, 'name', { value: token }); - return metatype; -} -function isMiddlewareRouteExcluded(req, excludedRoutes, httpAdapter) { - if (excludedRoutes.length <= 0) { - return false; - } - const reqMethod = httpAdapter.getRequestMethod(req); - const originalUrl = httpAdapter.getRequestUrl(req); - const queryParamsIndex = originalUrl ? originalUrl.indexOf('?') : -1; - const pathname = queryParamsIndex >= 0 - ? originalUrl.slice(0, queryParamsIndex) - : originalUrl; - return (0, utils_1.isRouteExcluded)(excludedRoutes, pathname, common_1.RequestMethod[reqMethod]); -} diff --git a/node_modules/@nestjs/core/nest-application-context.d.ts b/node_modules/@nestjs/core/nest-application-context.d.ts deleted file mode 100644 index 6d26ebf..0000000 --- a/node_modules/@nestjs/core/nest-application-context.d.ts +++ /dev/null @@ -1,173 +0,0 @@ -import { INestApplicationContext, Logger, LoggerService, LogLevel, ShutdownSignal } from '@nestjs/common'; -import { DynamicModule, SelectOptions, ShutdownHooksOptions, Type } from '@nestjs/common/interfaces'; -import { NestApplicationContextOptions } from '@nestjs/common/interfaces/nest-application-context-options.interface'; -import { AbstractInstanceResolver } from './injector/abstract-instance-resolver'; -import { NestContainer } from './injector/container'; -import { Injector } from './injector/injector'; -import { InstanceLinksHost } from './injector/instance-links-host'; -import { ContextId } from './injector/instance-wrapper'; -import { Module } from './injector/module'; -/** - * @publicApi - */ -export declare class NestApplicationContext extends AbstractInstanceResolver implements INestApplicationContext { - protected readonly container: NestContainer; - protected readonly appOptions: TOptions; - private contextModule; - private readonly scope; - protected isInitialized: boolean; - protected injector: Injector; - protected readonly logger: Logger; - private shouldFlushLogsOnOverride; - private readonly activeShutdownSignals; - private readonly moduleCompiler; - private shutdownCleanupRef?; - private _instanceLinksHost; - private _moduleRefsForHooksByDistance?; - private initializationPromise?; - protected get instanceLinksHost(): InstanceLinksHost; - constructor(container: NestContainer, appOptions?: TOptions, contextModule?: Module | null, scope?: Type[]); - selectContextModule(): void; - /** - * Allows navigating through the modules tree, for example, to pull out a specific instance from the selected module. - * @returns {INestApplicationContext} - */ - select(moduleType: Type | DynamicModule, selectOptions?: SelectOptions): INestApplicationContext; - /** - * Retrieves an instance of either injectable or controller, otherwise, throws exception. - * @returns {TResult} - */ - get(typeOrToken: Type | Function | string | symbol): TResult; - /** - * Retrieves an instance of either injectable or controller, otherwise, throws exception. - * @returns {TResult} - */ - get(typeOrToken: Type | Function | string | symbol, options: { - strict?: boolean; - each?: undefined | false; - }): TResult; - /** - * Retrieves a list of instances of either injectables or controllers, otherwise, throws exception. - * @returns {Array} - */ - get(typeOrToken: Type | Function | string | symbol, options: { - strict?: boolean; - each: true; - }): Array; - /** - * Resolves transient or request-scoped instance of either injectable or controller, otherwise, throws exception. - * @returns {Array} - */ - resolve(typeOrToken: Type | Function | string | symbol): Promise; - /** - * Resolves transient or request-scoped instance of either injectable or controller, otherwise, throws exception. - * @returns {Array} - */ - resolve(typeOrToken: Type | Function | string | symbol, contextId?: { - id: number; - }): Promise; - /** - * Resolves transient or request-scoped instance of either injectable or controller, otherwise, throws exception. - * @returns {Array} - */ - resolve(typeOrToken: Type | Function | string | symbol, contextId?: { - id: number; - }, options?: { - strict?: boolean; - each?: undefined | false; - }): Promise; - /** - * Resolves transient or request-scoped instances of either injectables or controllers, otherwise, throws exception. - * @returns {Array} - */ - resolve(typeOrToken: Type | Function | string | symbol, contextId?: { - id: number; - }, options?: { - strict?: boolean; - each: true; - }): Promise>; - /** - * Registers the request/context object for a given context ID (DI container sub-tree). - * @returns {void} - */ - registerRequestByContextId(request: T, contextId: ContextId): void; - /** - * Initializes the Nest application. - * Calls the Nest lifecycle events. - * - * @returns {Promise} The NestApplicationContext instance as Promise - */ - init(): Promise; - /** - * Terminates the application - * @returns {Promise} - */ - close(signal?: string): Promise; - /** - * Sets custom logger service. - * Flushes buffered logs if auto flush is on. - * @returns {void} - */ - useLogger(logger: LoggerService | LogLevel[] | false): void; - /** - * Prints buffered logs and detaches buffer. - * @returns {void} - */ - flushLogs(): void; - /** - * Define that it must flush logs right after defining a custom logger. - */ - flushLogsOnOverride(): void; - /** - * Enables the usage of shutdown hooks. Will call the - * `onApplicationShutdown` function of a provider if the - * process receives a shutdown signal. - * - * @param {ShutdownSignal[]} [signals=[]] The system signals it should listen to - * @param {ShutdownHooksOptions} [options={}] Options for configuring shutdown hooks behavior - * - * @returns {this} The Nest application context instance - */ - enableShutdownHooks(signals?: (ShutdownSignal | string)[], options?: ShutdownHooksOptions): this; - protected dispose(): Promise; - /** - * Listens to shutdown signals by listening to - * process events - * - * @param {string[]} signals The system signals it should listen to - * @param {ShutdownHooksOptions} options Options for configuring shutdown hooks behavior - */ - protected listenToShutdownSignals(signals: string[], options?: ShutdownHooksOptions): void; - /** - * Unsubscribes from shutdown signals (process events) - */ - protected unsubscribeFromProcessSignals(): void; - /** - * Calls the `onModuleInit` function on the registered - * modules and its children. - */ - protected callInitHook(): Promise; - /** - * Calls the `onModuleDestroy` function on the registered - * modules and its children. - */ - protected callDestroyHook(): Promise; - /** - * Calls the `onApplicationBootstrap` function on the registered - * modules and its children. - */ - protected callBootstrapHook(): Promise; - /** - * Calls the `onApplicationShutdown` function on the registered - * modules and children. - */ - protected callShutdownHook(signal?: string): Promise; - /** - * Calls the `beforeApplicationShutdown` function on the registered - * modules and children. - */ - protected callBeforeShutdownHook(signal?: string): Promise; - protected assertNotInPreviewMode(methodName: string): void; - private getModulesToTriggerHooksOn; - private printInPreviewModeWarning; -} diff --git a/node_modules/@nestjs/core/nest-application-context.js b/node_modules/@nestjs/core/nest-application-context.js deleted file mode 100644 index bc289a0..0000000 --- a/node_modules/@nestjs/core/nest-application-context.js +++ /dev/null @@ -1,327 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NestApplicationContext = void 0; -const common_1 = require("@nestjs/common"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const iterare_1 = require("iterare"); -const constants_1 = require("./constants"); -const exceptions_1 = require("./errors/exceptions"); -const context_id_factory_1 = require("./helpers/context-id-factory"); -const hooks_1 = require("./hooks"); -const abstract_instance_resolver_1 = require("./injector/abstract-instance-resolver"); -const injector_1 = require("./injector/injector"); -const instance_links_host_1 = require("./injector/instance-links-host"); -/** - * @publicApi - */ -class NestApplicationContext extends abstract_instance_resolver_1.AbstractInstanceResolver { - get instanceLinksHost() { - if (!this._instanceLinksHost) { - this._instanceLinksHost = new instance_links_host_1.InstanceLinksHost(this.container); - } - return this._instanceLinksHost; - } - constructor(container, appOptions = {}, contextModule = null, scope = new Array()) { - super(); - this.container = container; - this.appOptions = appOptions; - this.contextModule = contextModule; - this.scope = scope; - this.isInitialized = false; - this.logger = new common_1.Logger(NestApplicationContext.name, { - timestamp: true, - }); - this.shouldFlushLogsOnOverride = false; - this.activeShutdownSignals = new Array(); - this.injector = new injector_1.Injector(); - this.moduleCompiler = container.getModuleCompiler(); - if (this.appOptions.preview) { - this.printInPreviewModeWarning(); - } - } - selectContextModule() { - const modules = this.container.getModules().values(); - this.contextModule = modules.next().value; - } - /** - * Allows navigating through the modules tree, for example, to pull out a specific instance from the selected module. - * @returns {INestApplicationContext} - */ - select(moduleType, selectOptions) { - const modulesContainer = this.container.getModules(); - const contextModuleCtor = this.contextModule.metatype; - const scope = this.scope.concat(contextModuleCtor); - const moduleTokenFactory = this.container.getModuleTokenFactory(); - const { type, dynamicMetadata } = this.moduleCompiler.extractMetadata(moduleType); - const token = dynamicMetadata - ? moduleTokenFactory.createForDynamic(type, dynamicMetadata, moduleType) - : moduleTokenFactory.createForStatic(type, moduleType); - const selectedModule = modulesContainer.get(token); - if (!selectedModule) { - throw new exceptions_1.UnknownModuleException(type.name); - } - const options = typeof selectOptions?.abortOnError !== 'undefined' - ? { - ...this.appOptions, - ...selectOptions, - } - : this.appOptions; - return new NestApplicationContext(this.container, options, selectedModule, scope); - } - /** - * Retrieves an instance (or a list of instances) of either injectable or controller, otherwise, throws exception. - * @returns {TResult | Array} - */ - get(typeOrToken, options = { strict: false }) { - return !(options && options.strict) - ? this.find(typeOrToken, options) - : this.find(typeOrToken, { - moduleId: this.contextModule?.id, - each: options.each, - }); - } - /** - * Resolves transient or request-scoped instance (or a list of instances) of either injectable or controller, otherwise, throws exception. - * @returns {Promise>} - */ - resolve(typeOrToken, contextId = (0, context_id_factory_1.createContextId)(), options = { strict: false }) { - return this.resolvePerContext(typeOrToken, this.contextModule, contextId, options); - } - /** - * Registers the request/context object for a given context ID (DI container sub-tree). - * @returns {void} - */ - registerRequestByContextId(request, contextId) { - this.container.registerRequestProvider(request, contextId); - } - /** - * Initializes the Nest application. - * Calls the Nest lifecycle events. - * - * @returns {Promise} The NestApplicationContext instance as Promise - */ - async init() { - if (this.isInitialized) { - return this; - } - /* eslint-disable-next-line no-async-promise-executor */ - this.initializationPromise = new Promise(async (resolve, reject) => { - try { - await this.callInitHook(); - await this.callBootstrapHook(); - resolve(); - } - catch (err) { - reject(err); - } - }); - await this.initializationPromise; - this.isInitialized = true; - return this; - } - /** - * Terminates the application - * @returns {Promise} - */ - async close(signal) { - await this.initializationPromise; - await this.callDestroyHook(); - await this.callBeforeShutdownHook(signal); - await this.dispose(); - await this.callShutdownHook(signal); - this.unsubscribeFromProcessSignals(); - } - /** - * Sets custom logger service. - * Flushes buffered logs if auto flush is on. - * @returns {void} - */ - useLogger(logger) { - common_1.Logger.overrideLogger(logger); - if (this.shouldFlushLogsOnOverride) { - this.flushLogs(); - } - } - /** - * Prints buffered logs and detaches buffer. - * @returns {void} - */ - flushLogs() { - common_1.Logger.flush(); - } - /** - * Define that it must flush logs right after defining a custom logger. - */ - flushLogsOnOverride() { - this.shouldFlushLogsOnOverride = true; - } - /** - * Enables the usage of shutdown hooks. Will call the - * `onApplicationShutdown` function of a provider if the - * process receives a shutdown signal. - * - * @param {ShutdownSignal[]} [signals=[]] The system signals it should listen to - * @param {ShutdownHooksOptions} [options={}] Options for configuring shutdown hooks behavior - * - * @returns {this} The Nest application context instance - */ - enableShutdownHooks(signals = [], options = {}) { - if ((0, shared_utils_1.isEmpty)(signals)) { - signals = Object.keys(common_1.ShutdownSignal).map((key) => common_1.ShutdownSignal[key]); - } - else { - // given signals array should be unique because - // process shouldn't listen to the same signal more than once. - signals = Array.from(new Set(signals)); - } - signals = (0, iterare_1.iterate)(signals) - .map((signal) => signal.toString().toUpperCase().trim()) - // filter out the signals which is already listening to - .filter(signal => !this.activeShutdownSignals.includes(signal)) - .toArray(); - this.listenToShutdownSignals(signals, options); - return this; - } - async dispose() { - // Nest application context has no server - // to dispose, therefore just call a noop - return Promise.resolve(); - } - /** - * Listens to shutdown signals by listening to - * process events - * - * @param {string[]} signals The system signals it should listen to - * @param {ShutdownHooksOptions} options Options for configuring shutdown hooks behavior - */ - listenToShutdownSignals(signals, options = {}) { - let receivedSignal = false; - const cleanup = async (signal) => { - try { - if (receivedSignal) { - // If we receive another signal while we're waiting - // for the server to stop, just ignore it. - return; - } - receivedSignal = true; - await this.initializationPromise; - await this.callDestroyHook(); - await this.callBeforeShutdownHook(signal); - await this.dispose(); - await this.callShutdownHook(signal); - signals.forEach(sig => process.removeListener(sig, cleanup)); - if (options.useProcessExit) { - // Use process.exit() to ensure the 'exit' event is properly triggered. - // This is required for async loggers (like Pino with transports) - // to flush their buffers before the process terminates. - process.exit(0); - } - else { - process.kill(process.pid, signal); - } - } - catch (err) { - common_1.Logger.error(constants_1.MESSAGES.ERROR_DURING_SHUTDOWN, err?.stack, NestApplicationContext.name); - process.exit(1); - } - }; - this.shutdownCleanupRef = cleanup; - signals.forEach((signal) => { - this.activeShutdownSignals.push(signal); - process.on(signal, cleanup); - }); - } - /** - * Unsubscribes from shutdown signals (process events) - */ - unsubscribeFromProcessSignals() { - if (!this.shutdownCleanupRef) { - return; - } - this.activeShutdownSignals.forEach(signal => { - process.removeListener(signal, this.shutdownCleanupRef); - }); - } - /** - * Calls the `onModuleInit` function on the registered - * modules and its children. - */ - async callInitHook() { - const modulesSortedByDistance = this.getModulesToTriggerHooksOn(); - for (const module of modulesSortedByDistance) { - await (0, hooks_1.callModuleInitHook)(module); - } - } - /** - * Calls the `onModuleDestroy` function on the registered - * modules and its children. - */ - async callDestroyHook() { - const modulesSortedByDistance = [ - ...this.getModulesToTriggerHooksOn(), - ].reverse(); - for (const module of modulesSortedByDistance) { - await (0, hooks_1.callModuleDestroyHook)(module); - } - } - /** - * Calls the `onApplicationBootstrap` function on the registered - * modules and its children. - */ - async callBootstrapHook() { - const modulesSortedByDistance = this.getModulesToTriggerHooksOn(); - for (const module of modulesSortedByDistance) { - await (0, hooks_1.callModuleBootstrapHook)(module); - } - } - /** - * Calls the `onApplicationShutdown` function on the registered - * modules and children. - */ - async callShutdownHook(signal) { - const modulesSortedByDistance = [ - ...this.getModulesToTriggerHooksOn(), - ].reverse(); - for (const module of modulesSortedByDistance) { - await (0, hooks_1.callAppShutdownHook)(module, signal); - } - } - /** - * Calls the `beforeApplicationShutdown` function on the registered - * modules and children. - */ - async callBeforeShutdownHook(signal) { - const modulesSortedByDistance = [ - ...this.getModulesToTriggerHooksOn(), - ].reverse(); - for (const module of modulesSortedByDistance) { - await (0, hooks_1.callBeforeAppShutdownHook)(module, signal); - } - } - assertNotInPreviewMode(methodName) { - if (this.appOptions.preview) { - const error = `Calling the "${methodName}" in the preview mode is not supported.`; - this.logger.error(error); - throw new Error(error); - } - } - getModulesToTriggerHooksOn() { - if (this._moduleRefsForHooksByDistance) { - return this._moduleRefsForHooksByDistance; - } - const modulesContainer = this.container.getModules(); - const compareFn = (a, b) => b.distance - a.distance; - const modulesSortedByDistance = Array.from(modulesContainer.values()).sort(compareFn); - this._moduleRefsForHooksByDistance = this.appOptions?.preview - ? modulesSortedByDistance.filter(moduleRef => moduleRef.initOnPreview) - : modulesSortedByDistance; - return this._moduleRefsForHooksByDistance; - } - printInPreviewModeWarning() { - this.logger.warn('------------------------------------------------'); - this.logger.warn('Application is running in the PREVIEW mode!'); - this.logger.warn('Providers/controllers will not be instantiated.'); - this.logger.warn('------------------------------------------------'); - } -} -exports.NestApplicationContext = NestApplicationContext; diff --git a/node_modules/@nestjs/core/nest-application.d.ts b/node_modules/@nestjs/core/nest-application.d.ts deleted file mode 100644 index b4a9ffd..0000000 --- a/node_modules/@nestjs/core/nest-application.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { CanActivate, ExceptionFilter, HttpServer, INestApplication, INestMicroservice, NestHybridApplicationOptions, NestInterceptor, PipeTransform, VersioningOptions, WebSocketAdapter } from '@nestjs/common'; -import { GlobalPrefixOptions, NestApplicationOptions } from '@nestjs/common/interfaces'; -import { Logger } from '@nestjs/common/services/logger.service'; -import { AbstractHttpAdapter } from './adapters'; -import { ApplicationConfig } from './application-config'; -import { NestContainer } from './injector/container'; -import { GraphInspector } from './inspector/graph-inspector'; -import { NestApplicationContext } from './nest-application-context'; -/** - * @publicApi - */ -export declare class NestApplication extends NestApplicationContext implements INestApplication { - private readonly httpAdapter; - private readonly config; - private readonly graphInspector; - protected readonly logger: Logger; - private readonly middlewareModule; - private readonly middlewareContainer; - private readonly microservicesModule; - private readonly socketModule; - private readonly routesResolver; - private readonly microservices; - private httpServer; - private isListening; - constructor(container: NestContainer, httpAdapter: HttpServer, config: ApplicationConfig, graphInspector: GraphInspector, appOptions?: NestApplicationOptions); - protected dispose(): Promise; - getHttpAdapter(): AbstractHttpAdapter; - registerHttpServer(): void; - getUnderlyingHttpServer(): T; - applyOptions(): void; - createServer(): T; - registerModules(): Promise; - registerWsModule(): void; - init(): Promise; - registerParserMiddleware(): void; - registerRouter(): Promise; - registerRouterHooks(): Promise; - connectMicroservice(microserviceOptions: T, hybridAppOptions?: NestHybridApplicationOptions): INestMicroservice; - getMicroservices(): INestMicroservice[]; - getHttpServer(): any; - startAllMicroservices(): Promise; - use(...args: [any, any?]): this; - useBodyParser(...args: [any, any?]): this; - enableCors(options?: any): void; - enableVersioning(options?: VersioningOptions): this; - listen(port: number | string): Promise; - listen(port: number | string, hostname: string): Promise; - getUrl(): Promise; - private formatAddress; - setGlobalPrefix(prefix: string, options?: GlobalPrefixOptions): this; - useWebSocketAdapter(adapter: WebSocketAdapter): this; - useGlobalFilters(...filters: ExceptionFilter[]): this; - useGlobalPipes(...pipes: PipeTransform[]): this; - useGlobalInterceptors(...interceptors: NestInterceptor[]): this; - useGlobalGuards(...guards: CanActivate[]): this; - useStaticAssets(options: any): this; - useStaticAssets(path: string, options?: any): this; - setBaseViewsDir(path: string | string[]): this; - setViewEngine(engineOrOptions: any): this; - private host; - private getProtocol; - private registerMiddleware; - private applyInstanceDecoratorIfRegistered; -} diff --git a/node_modules/@nestjs/core/nest-application.js b/node_modules/@nestjs/core/nest-application.js deleted file mode 100644 index 542e3b5..0000000 --- a/node_modules/@nestjs/core/nest-application.js +++ /dev/null @@ -1,328 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NestApplication = void 0; -const common_1 = require("@nestjs/common"); -const logger_service_1 = require("@nestjs/common/services/logger.service"); -const load_package_util_1 = require("@nestjs/common/utils/load-package.util"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const iterare_1 = require("iterare"); -const os_1 = require("os"); -const application_config_1 = require("./application-config"); -const constants_1 = require("./constants"); -const optional_require_1 = require("./helpers/optional-require"); -const injector_1 = require("./injector/injector"); -const container_1 = require("./middleware/container"); -const middleware_module_1 = require("./middleware/middleware-module"); -const utils_1 = require("./middleware/utils"); -const nest_application_context_1 = require("./nest-application-context"); -const routes_resolver_1 = require("./router/routes-resolver"); -const { SocketModule } = (0, optional_require_1.optionalRequire)('@nestjs/websockets/socket-module', () => require('@nestjs/websockets/socket-module')); -const { MicroservicesModule } = (0, optional_require_1.optionalRequire)('@nestjs/microservices/microservices-module', () => require('@nestjs/microservices/microservices-module')); -/** - * @publicApi - */ -class NestApplication extends nest_application_context_1.NestApplicationContext { - constructor(container, httpAdapter, config, graphInspector, appOptions = {}) { - super(container, appOptions); - this.httpAdapter = httpAdapter; - this.config = config; - this.graphInspector = graphInspector; - this.logger = new logger_service_1.Logger(NestApplication.name, { - timestamp: true, - }); - this.middlewareContainer = new container_1.MiddlewareContainer(this.container); - this.microservicesModule = MicroservicesModule && new MicroservicesModule(); - this.socketModule = SocketModule && new SocketModule(); - this.microservices = []; - this.isListening = false; - this.selectContextModule(); - this.registerHttpServer(); - this.injector = new injector_1.Injector({ - preview: this.appOptions.preview, - instanceDecorator: appOptions.instrument?.instanceDecorator, - }); - this.middlewareModule = new middleware_module_1.MiddlewareModule(); - this.routesResolver = new routes_resolver_1.RoutesResolver(this.container, this.config, this.injector, this.graphInspector); - } - async dispose() { - this.socketModule && (await this.socketModule.close()); - this.microservicesModule && (await this.microservicesModule.close()); - this.httpAdapter && (await this.httpAdapter.close()); - await Promise.all((0, iterare_1.iterate)(this.microservices).map(async (microservice) => { - microservice.setIsTerminated(true); - await microservice.close(); - })); - } - getHttpAdapter() { - return this.httpAdapter; - } - registerHttpServer() { - this.httpServer = this.createServer(); - } - getUnderlyingHttpServer() { - return this.httpAdapter.getHttpServer(); - } - applyOptions() { - if (!this.appOptions || !this.appOptions.cors) { - return undefined; - } - const passCustomOptions = (0, shared_utils_1.isObject)(this.appOptions.cors) || (0, shared_utils_1.isFunction)(this.appOptions.cors); - if (!passCustomOptions) { - return this.enableCors(); - } - return this.enableCors(this.appOptions.cors); - } - createServer() { - this.httpAdapter.initHttpServer(this.appOptions); - return this.httpAdapter.getHttpServer(); - } - async registerModules() { - this.registerWsModule(); - if (this.microservicesModule) { - this.microservicesModule.register(this.container, this.graphInspector, this.config, this.appOptions); - this.microservicesModule.setupClients(this.container); - } - await this.middlewareModule.register(this.middlewareContainer, this.container, this.config, this.injector, this.httpAdapter, this.graphInspector, this.appOptions); - } - registerWsModule() { - if (!this.socketModule) { - return; - } - this.socketModule.register(this.container, this.config, this.graphInspector, this.appOptions, this.httpServer); - } - async init() { - if (this.isInitialized) { - return this; - } - this.applyOptions(); - await this.httpAdapter?.init?.(); - const useBodyParser = this.appOptions && this.appOptions.bodyParser !== false; - useBodyParser && this.registerParserMiddleware(); - await this.registerModules(); - await this.registerRouter(); - await this.callInitHook(); - await this.registerRouterHooks(); - await this.callBootstrapHook(); - this.isInitialized = true; - this.logger.log(constants_1.MESSAGES.APPLICATION_READY); - return this; - } - registerParserMiddleware() { - const prefix = this.config.getGlobalPrefix(); - const rawBody = !!this.appOptions?.rawBody; - this.httpAdapter.registerParserMiddleware(prefix, rawBody); - } - async registerRouter() { - await this.registerMiddleware(this.httpAdapter); - const prefix = this.config.getGlobalPrefix(); - const basePath = (0, shared_utils_1.addLeadingSlash)(prefix); - this.routesResolver.resolve(this.httpAdapter, basePath); - } - async registerRouterHooks() { - this.routesResolver.registerNotFoundHandler(); - this.routesResolver.registerExceptionHandler(); - } - connectMicroservice(microserviceOptions, hybridAppOptions = {}) { - const { NestMicroservice } = (0, load_package_util_1.loadPackage)('@nestjs/microservices', 'NestFactory', () => require('@nestjs/microservices')); - const { inheritAppConfig } = hybridAppOptions; - const applicationConfig = inheritAppConfig - ? this.config - : new application_config_1.ApplicationConfig(); - const instance = new NestMicroservice(this.container, microserviceOptions, this.graphInspector, applicationConfig); - if (!hybridAppOptions.deferInitialization) { - instance.registerListeners(); - instance.setIsInitialized(true); - instance.setIsInitHookCalled(true); - } - this.microservices.push(instance); - return instance; - } - getMicroservices() { - return this.microservices; - } - getHttpServer() { - return this.httpServer; - } - async startAllMicroservices() { - this.assertNotInPreviewMode('startAllMicroservices'); - await Promise.all(this.microservices.map(msvc => msvc.listen())); - return this; - } - use(...args) { - this.httpAdapter.use(...args); - return this; - } - useBodyParser(...args) { - if (!('useBodyParser' in this.httpAdapter)) { - this.logger.warn('Your HTTP Adapter does not support `.useBodyParser`.'); - return this; - } - const [parserType, ...otherArgs] = args; - const rawBody = !!this.appOptions.rawBody; - this.httpAdapter.useBodyParser?.(...[parserType, rawBody, ...otherArgs]); - return this; - } - enableCors(options) { - this.httpAdapter.enableCors(options); - } - enableVersioning(options = { type: common_1.VersioningType.URI }) { - this.config.enableVersioning(options); - return this; - } - async listen(port, ...args) { - this.assertNotInPreviewMode('listen'); - if (!this.isInitialized) { - await this.init(); - } - const httpAdapterHost = this.container.getHttpAdapterHostRef(); - return new Promise((resolve, reject) => { - const errorHandler = (e) => { - this.logger.error(e?.toString?.()); - reject(e); - }; - this.httpServer.once('error', errorHandler); - const isCallbackInOriginalArgs = (0, shared_utils_1.isFunction)(args[args.length - 1]); - const listenFnArgs = isCallbackInOriginalArgs - ? args.slice(0, args.length - 1) - : args; - this.httpAdapter.listen(port, ...listenFnArgs, (...originalCallbackArgs) => { - if (this.appOptions?.autoFlushLogs ?? true) { - this.flushLogs(); - } - if (originalCallbackArgs[0] instanceof Error) { - return reject(originalCallbackArgs[0]); - } - const address = this.httpServer.address(); - if (address) { - this.httpServer.removeListener('error', errorHandler); - this.isListening = true; - httpAdapterHost.listening = true; - resolve(this.httpServer); - } - if (isCallbackInOriginalArgs) { - args[args.length - 1](...originalCallbackArgs); - } - }); - }); - } - async getUrl() { - return new Promise((resolve, reject) => { - if (!this.isListening) { - this.logger.error(constants_1.MESSAGES.CALL_LISTEN_FIRST); - reject(constants_1.MESSAGES.CALL_LISTEN_FIRST); - return; - } - const address = this.httpServer.address(); - resolve(this.formatAddress(address)); - }); - } - formatAddress(address) { - if ((0, shared_utils_1.isString)(address)) { - if ((0, os_1.platform)() === 'win32') { - return address; - } - const basePath = encodeURIComponent(address); - return `${this.getProtocol()}+unix://${basePath}`; - } - let host = this.host(); - if (address && address.family === 'IPv6') { - if (host === '::') { - host = '[::1]'; - } - else { - host = `[${host}]`; - } - } - else if (host === '0.0.0.0') { - host = '127.0.0.1'; - } - return `${this.getProtocol()}://${host}:${address.port}`; - } - setGlobalPrefix(prefix, options) { - this.config.setGlobalPrefix(prefix); - if (options) { - const exclude = options?.exclude - ? (0, utils_1.mapToExcludeRoute)(options.exclude) - : []; - this.config.setGlobalPrefixOptions({ - ...options, - exclude, - }); - } - return this; - } - useWebSocketAdapter(adapter) { - this.config.setIoAdapter(adapter); - return this; - } - useGlobalFilters(...filters) { - filters = this.applyInstanceDecoratorIfRegistered(...filters); - this.config.useGlobalFilters(...filters); - filters.forEach(item => this.graphInspector.insertOrphanedEnhancer({ - subtype: 'filter', - ref: item, - })); - return this; - } - useGlobalPipes(...pipes) { - pipes = this.applyInstanceDecoratorIfRegistered(...pipes); - this.config.useGlobalPipes(...pipes); - pipes.forEach(item => this.graphInspector.insertOrphanedEnhancer({ - subtype: 'pipe', - ref: item, - })); - return this; - } - useGlobalInterceptors(...interceptors) { - interceptors = this.applyInstanceDecoratorIfRegistered(...interceptors); - this.config.useGlobalInterceptors(...interceptors); - interceptors.forEach(item => this.graphInspector.insertOrphanedEnhancer({ - subtype: 'interceptor', - ref: item, - })); - return this; - } - useGlobalGuards(...guards) { - guards = this.applyInstanceDecoratorIfRegistered(...guards); - this.config.useGlobalGuards(...guards); - guards.forEach(item => this.graphInspector.insertOrphanedEnhancer({ - subtype: 'guard', - ref: item, - })); - return this; - } - useStaticAssets(pathOrOptions, options) { - this.httpAdapter.useStaticAssets && - this.httpAdapter.useStaticAssets(pathOrOptions, options); - return this; - } - setBaseViewsDir(path) { - this.httpAdapter.setBaseViewsDir && this.httpAdapter.setBaseViewsDir(path); - return this; - } - setViewEngine(engineOrOptions) { - this.httpAdapter.setViewEngine && - this.httpAdapter.setViewEngine(engineOrOptions); - return this; - } - host() { - const address = this.httpServer.address(); - if ((0, shared_utils_1.isString)(address)) { - return undefined; - } - return address && address.address; - } - getProtocol() { - return this.appOptions && this.appOptions.httpsOptions ? 'https' : 'http'; - } - async registerMiddleware(instance) { - await this.middlewareModule.registerMiddleware(this.middlewareContainer, instance); - } - applyInstanceDecoratorIfRegistered(...instances) { - if (this.appOptions.instrument?.instanceDecorator) { - return instances.map(instance => this.appOptions.instrument.instanceDecorator(instance)); - } - return instances; - } -} -exports.NestApplication = NestApplication; diff --git a/node_modules/@nestjs/core/nest-factory.d.ts b/node_modules/@nestjs/core/nest-factory.d.ts deleted file mode 100644 index 7c2ec31..0000000 --- a/node_modules/@nestjs/core/nest-factory.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { DynamicModule, ForwardReference, INestApplication, INestApplicationContext, INestMicroservice, Type } from '@nestjs/common'; -import { NestMicroserviceOptions } from '@nestjs/common/interfaces/microservices/nest-microservice-options.interface'; -import { NestApplicationContextOptions } from '@nestjs/common/interfaces/nest-application-context-options.interface'; -import { NestApplicationOptions } from '@nestjs/common/interfaces/nest-application-options.interface'; -import { AbstractHttpAdapter } from './adapters/http-adapter'; -type IEntryNestModule = Type | DynamicModule | ForwardReference | Promise; -/** - * @publicApi - */ -export declare class NestFactoryStatic { - private readonly logger; - private abortOnError; - private autoFlushLogs; - /** - * Creates an instance of NestApplication. - * - * @param module Entry (root) application module class - * @param options List of options to initialize NestApplication - * - * @returns A promise that, when resolved, - * contains a reference to the NestApplication instance. - */ - create(module: IEntryNestModule, options?: NestApplicationOptions): Promise; - /** - * Creates an instance of NestApplication with the specified `httpAdapter`. - * - * @param module Entry (root) application module class - * @param httpAdapter Adapter to proxy the request/response cycle to - * the underlying HTTP server - * @param options List of options to initialize NestApplication - * - * @returns A promise that, when resolved, - * contains a reference to the NestApplication instance. - */ - create(module: IEntryNestModule, httpAdapter: AbstractHttpAdapter, options?: NestApplicationOptions): Promise; - /** - * Creates an instance of NestMicroservice. - * - * @param moduleCls Entry (root) application module class - * @param options Optional microservice configuration - * - * @returns A promise that, when resolved, - * contains a reference to the NestMicroservice instance. - */ - createMicroservice(moduleCls: IEntryNestModule, options?: NestMicroserviceOptions & T): Promise; - /** - * Creates an instance of NestApplicationContext. - * - * @param moduleCls Entry (root) application module class - * @param options Optional Nest application configuration - * - * @returns A promise that, when resolved, - * contains a reference to the NestApplicationContext instance. - */ - createApplicationContext(moduleCls: IEntryNestModule, options?: NestApplicationContextOptions): Promise; - private createNestInstance; - private initialize; - private handleInitializationError; - private createProxy; - private createExceptionProxy; - private createExceptionZone; - private registerLoggerConfiguration; - private createHttpAdapter; - private isHttpServer; - private setAbortOnError; - private createAdapterProxy; - private createGraphInspector; -} -/** - * Use NestFactory to create an application instance. - * - * ### Specifying an entry module - * - * Pass the required *root module* for the application via the module parameter. - * By convention, it is usually called `ApplicationModule`. Starting with this - * module, Nest assembles the dependency graph and begins the process of - * Dependency Injection and instantiates the classes needed to launch your - * application. - * - * @publicApi - */ -export declare const NestFactory: NestFactoryStatic; -export {}; diff --git a/node_modules/@nestjs/core/nest-factory.js b/node_modules/@nestjs/core/nest-factory.js deleted file mode 100644 index 4dcf1e7..0000000 --- a/node_modules/@nestjs/core/nest-factory.js +++ /dev/null @@ -1,232 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NestFactory = exports.NestFactoryStatic = void 0; -const console_logger_service_1 = require("@nestjs/common/services/console-logger.service"); -const logger_service_1 = require("@nestjs/common/services/logger.service"); -const load_package_util_1 = require("@nestjs/common/utils/load-package.util"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const application_config_1 = require("./application-config"); -const constants_1 = require("./constants"); -const exceptions_zone_1 = require("./errors/exceptions-zone"); -const load_adapter_1 = require("./helpers/load-adapter"); -const rethrow_1 = require("./helpers/rethrow"); -const container_1 = require("./injector/container"); -const injector_1 = require("./injector/injector"); -const instance_loader_1 = require("./injector/instance-loader"); -const graph_inspector_1 = require("./inspector/graph-inspector"); -const noop_graph_inspector_1 = require("./inspector/noop-graph-inspector"); -const uuid_factory_1 = require("./inspector/uuid-factory"); -const metadata_scanner_1 = require("./metadata-scanner"); -const nest_application_1 = require("./nest-application"); -const nest_application_context_1 = require("./nest-application-context"); -const scanner_1 = require("./scanner"); -/** - * @publicApi - */ -class NestFactoryStatic { - constructor() { - this.logger = new logger_service_1.Logger('NestFactory', { - timestamp: true, - }); - this.abortOnError = true; - this.autoFlushLogs = false; - } - async create(moduleCls, serverOrOptions, options) { - const [httpServer, appOptions] = this.isHttpServer(serverOrOptions) - ? [serverOrOptions, options] - : [this.createHttpAdapter(), serverOrOptions]; - const applicationConfig = new application_config_1.ApplicationConfig(); - const container = new container_1.NestContainer(applicationConfig, appOptions); - const graphInspector = this.createGraphInspector(appOptions, container); - this.setAbortOnError(serverOrOptions, options); - this.registerLoggerConfiguration(appOptions); - await this.initialize(moduleCls, container, graphInspector, applicationConfig, appOptions, httpServer); - const instance = new nest_application_1.NestApplication(container, httpServer, applicationConfig, graphInspector, appOptions); - const target = this.createNestInstance(instance); - return this.createAdapterProxy(target, httpServer); - } - /** - * Creates an instance of NestMicroservice. - * - * @param moduleCls Entry (root) application module class - * @param options Optional microservice configuration - * - * @returns A promise that, when resolved, - * contains a reference to the NestMicroservice instance. - */ - async createMicroservice(moduleCls, options) { - const { NestMicroservice } = (0, load_package_util_1.loadPackage)('@nestjs/microservices', 'NestFactory', () => require('@nestjs/microservices')); - const applicationConfig = new application_config_1.ApplicationConfig(); - const container = new container_1.NestContainer(applicationConfig, options); - const graphInspector = this.createGraphInspector(options, container); - this.setAbortOnError(options); - this.registerLoggerConfiguration(options); - await this.initialize(moduleCls, container, graphInspector, applicationConfig, options); - return this.createNestInstance(new NestMicroservice(container, options, graphInspector, applicationConfig)); - } - /** - * Creates an instance of NestApplicationContext. - * - * @param moduleCls Entry (root) application module class - * @param options Optional Nest application configuration - * - * @returns A promise that, when resolved, - * contains a reference to the NestApplicationContext instance. - */ - async createApplicationContext(moduleCls, options) { - const applicationConfig = new application_config_1.ApplicationConfig(); - const container = new container_1.NestContainer(applicationConfig, options); - const graphInspector = this.createGraphInspector(options, container); - this.setAbortOnError(options); - this.registerLoggerConfiguration(options); - await this.initialize(moduleCls, container, graphInspector, applicationConfig, options); - const modules = container.getModules().values(); - const root = modules.next().value; - const context = this.createNestInstance(new nest_application_context_1.NestApplicationContext(container, options, root)); - if (this.autoFlushLogs) { - context.flushLogsOnOverride(); - } - return context.init(); - } - createNestInstance(instance) { - return this.createProxy(instance); - } - async initialize(module, container, graphInspector, config = new application_config_1.ApplicationConfig(), options = {}, httpServer = null) { - uuid_factory_1.UuidFactory.mode = options.snapshot - ? uuid_factory_1.UuidFactoryMode.Deterministic - : uuid_factory_1.UuidFactoryMode.Random; - const injector = new injector_1.Injector({ - preview: options.preview, - instanceDecorator: options.instrument?.instanceDecorator, - }); - const instanceLoader = new instance_loader_1.InstanceLoader(container, injector, graphInspector); - const metadataScanner = new metadata_scanner_1.MetadataScanner(); - const dependenciesScanner = new scanner_1.DependenciesScanner(container, metadataScanner, graphInspector, config); - container.setHttpAdapter(httpServer); - const teardown = this.abortOnError === false ? rethrow_1.rethrow : undefined; - await httpServer?.init?.(); - try { - this.logger.log(constants_1.MESSAGES.APPLICATION_START); - await exceptions_zone_1.ExceptionsZone.asyncRun(async () => { - await dependenciesScanner.scan(module); - await instanceLoader.createInstancesOfDependencies(); - dependenciesScanner.applyApplicationProviders(); - }, teardown, this.autoFlushLogs); - } - catch (e) { - this.handleInitializationError(e); - } - } - handleInitializationError(err) { - if (this.abortOnError) { - process.abort(); - } - (0, rethrow_1.rethrow)(err); - } - createProxy(target) { - const proxy = this.createExceptionProxy(); - return new Proxy(target, { - get: proxy, - set: proxy, - }); - } - createExceptionProxy() { - return (receiver, prop) => { - if (!(prop in receiver)) { - return; - } - if ((0, shared_utils_1.isFunction)(receiver[prop])) { - return this.createExceptionZone(receiver, prop); - } - return receiver[prop]; - }; - } - createExceptionZone(receiver, prop) { - const teardown = this.abortOnError === false ? rethrow_1.rethrow : undefined; - return (...args) => { - let result; - exceptions_zone_1.ExceptionsZone.run(() => { - result = receiver[prop](...args); - }, teardown, this.autoFlushLogs); - return result; - }; - } - registerLoggerConfiguration(options) { - if (!options) { - return; - } - const { logger, bufferLogs, autoFlushLogs, forceConsole } = options; - if (logger !== true && !(0, shared_utils_1.isNil)(logger)) { - logger_service_1.Logger.overrideLogger(logger); - } - else if (forceConsole) { - // If no custom logger is provided but forceConsole is true, - // create a ConsoleLogger with forceConsole option - const consoleLogger = new console_logger_service_1.ConsoleLogger({ forceConsole: true }); - logger_service_1.Logger.overrideLogger(consoleLogger); - } - if (bufferLogs) { - logger_service_1.Logger.attachBuffer(); - } - this.autoFlushLogs = autoFlushLogs ?? true; - } - createHttpAdapter(httpServer) { - const { ExpressAdapter } = (0, load_adapter_1.loadAdapter)('@nestjs/platform-express', 'HTTP', () => require('@nestjs/platform-express')); - return new ExpressAdapter(httpServer); - } - isHttpServer(serverOrOptions) { - return !!(serverOrOptions && serverOrOptions.patch); - } - setAbortOnError(serverOrOptions, options) { - this.abortOnError = this.isHttpServer(serverOrOptions) - ? !(options && options.abortOnError === false) - : !(serverOrOptions && serverOrOptions.abortOnError === false); - } - createAdapterProxy(app, adapter) { - const proxy = new Proxy(app, { - get: (receiver, prop) => { - const mapToProxy = (result) => { - return result instanceof Promise - ? result.then(mapToProxy) - : result instanceof nest_application_1.NestApplication - ? proxy - : result; - }; - if (!(prop in receiver) && prop in adapter) { - return (...args) => { - const result = this.createExceptionZone(adapter, prop)(...args); - return mapToProxy(result); - }; - } - if ((0, shared_utils_1.isFunction)(receiver[prop])) { - return (...args) => { - const result = receiver[prop](...args); - return mapToProxy(result); - }; - } - return receiver[prop]; - }, - }); - return proxy; - } - createGraphInspector(appOptions, container) { - return appOptions?.snapshot - ? new graph_inspector_1.GraphInspector(container) - : noop_graph_inspector_1.NoopGraphInspector; - } -} -exports.NestFactoryStatic = NestFactoryStatic; -/** - * Use NestFactory to create an application instance. - * - * ### Specifying an entry module - * - * Pass the required *root module* for the application via the module parameter. - * By convention, it is usually called `ApplicationModule`. Starting with this - * module, Nest assembles the dependency graph and begins the process of - * Dependency Injection and instantiates the classes needed to launch your - * application. - * - * @publicApi - */ -exports.NestFactory = new NestFactoryStatic(); diff --git a/node_modules/@nestjs/core/package.json b/node_modules/@nestjs/core/package.json deleted file mode 100644 index c7817f3..0000000 --- a/node_modules/@nestjs/core/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "@nestjs/core", - "version": "11.1.17", - "description": "Nest - modern, fast, powerful node.js web framework (@core)", - "author": "Kamil Mysliwiec", - "license": "MIT", - "homepage": "https://nestjs.com", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/nest" - }, - "engines": { - "node": ">= 20" - }, - "repository": { - "type": "git", - "url": "https://github.com/nestjs/nest.git", - "directory": "packages/core" - }, - "publishConfig": { - "access": "public" - }, - "scripts": { - "postinstall": "opencollective || exit 0" - }, - "collective": { - "type": "opencollective", - "url": "https://opencollective.com/nest", - "donation": { - "text": "Become a partner:" - } - }, - "dependencies": { - "@nuxt/opencollective": "0.4.1", - "fast-safe-stringify": "2.1.1", - "iterare": "1.2.1", - "path-to-regexp": "8.3.0", - "tslib": "2.8.1", - "uid": "2.0.2" - }, - "devDependencies": { - "@nestjs/common": "11.1.17" - }, - "peerDependencies": { - "@nestjs/common": "^11.0.0", - "@nestjs/microservices": "^11.0.0", - "@nestjs/platform-express": "^11.0.0", - "@nestjs/websockets": "^11.0.0", - "reflect-metadata": "^0.1.12 || ^0.2.0", - "rxjs": "^7.1.0" - }, - "peerDependenciesMeta": { - "@nestjs/websockets": { - "optional": true - }, - "@nestjs/microservices": { - "optional": true - }, - "@nestjs/platform-express": { - "optional": true - } - }, - "gitHead": "447a373ebebd2c58b5b3c8d718f25922a025f2fe" -} diff --git a/node_modules/@nestjs/core/pipes/index.d.ts b/node_modules/@nestjs/core/pipes/index.d.ts deleted file mode 100644 index ce7301a..0000000 --- a/node_modules/@nestjs/core/pipes/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './params-token-factory'; -export * from './pipes-consumer'; -export * from './pipes-context-creator'; diff --git a/node_modules/@nestjs/core/pipes/index.js b/node_modules/@nestjs/core/pipes/index.js deleted file mode 100644 index 07d3e5f..0000000 --- a/node_modules/@nestjs/core/pipes/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./params-token-factory"), exports); -tslib_1.__exportStar(require("./pipes-consumer"), exports); -tslib_1.__exportStar(require("./pipes-context-creator"), exports); diff --git a/node_modules/@nestjs/core/pipes/params-token-factory.d.ts b/node_modules/@nestjs/core/pipes/params-token-factory.d.ts deleted file mode 100644 index 6a4483c..0000000 --- a/node_modules/@nestjs/core/pipes/params-token-factory.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Paramtype } from '@nestjs/common'; -import { RouteParamtypes } from '@nestjs/common/enums/route-paramtypes.enum'; -export declare class ParamsTokenFactory { - exchangeEnumForString(type: RouteParamtypes): Paramtype; -} diff --git a/node_modules/@nestjs/core/pipes/params-token-factory.js b/node_modules/@nestjs/core/pipes/params-token-factory.js deleted file mode 100644 index 84f482e..0000000 --- a/node_modules/@nestjs/core/pipes/params-token-factory.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ParamsTokenFactory = void 0; -const route_paramtypes_enum_1 = require("@nestjs/common/enums/route-paramtypes.enum"); -class ParamsTokenFactory { - exchangeEnumForString(type) { - switch (type) { - case route_paramtypes_enum_1.RouteParamtypes.BODY: - return 'body'; - case route_paramtypes_enum_1.RouteParamtypes.PARAM: - return 'param'; - case route_paramtypes_enum_1.RouteParamtypes.QUERY: - return 'query'; - default: - return 'custom'; - } - } -} -exports.ParamsTokenFactory = ParamsTokenFactory; diff --git a/node_modules/@nestjs/core/pipes/pipes-consumer.d.ts b/node_modules/@nestjs/core/pipes/pipes-consumer.d.ts deleted file mode 100644 index 02a07fc..0000000 --- a/node_modules/@nestjs/core/pipes/pipes-consumer.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ArgumentMetadata, PipeTransform } from '@nestjs/common/interfaces'; -export declare class PipesConsumer { - private readonly paramsTokenFactory; - apply(value: TInput, { metatype, type, data }: ArgumentMetadata, pipes: PipeTransform[]): Promise; - applyPipes(value: TInput, { metatype, type, data }: { - metatype: any; - type?: any; - data?: any; - }, transforms: PipeTransform[]): Promise; -} diff --git a/node_modules/@nestjs/core/pipes/pipes-consumer.js b/node_modules/@nestjs/core/pipes/pipes-consumer.js deleted file mode 100644 index 278ec1e..0000000 --- a/node_modules/@nestjs/core/pipes/pipes-consumer.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PipesConsumer = void 0; -const params_token_factory_1 = require("./params-token-factory"); -class PipesConsumer { - constructor() { - this.paramsTokenFactory = new params_token_factory_1.ParamsTokenFactory(); - } - async apply(value, { metatype, type, data }, pipes) { - const token = this.paramsTokenFactory.exchangeEnumForString(type); - return this.applyPipes(value, { metatype, type: token, data }, pipes); - } - async applyPipes(value, { metatype, type, data }, transforms) { - return transforms.reduce(async (deferredValue, pipe) => { - const val = await deferredValue; - const result = pipe.transform(val, { metatype, type, data }); - return result; - }, Promise.resolve(value)); - } -} -exports.PipesConsumer = PipesConsumer; diff --git a/node_modules/@nestjs/core/pipes/pipes-context-creator.d.ts b/node_modules/@nestjs/core/pipes/pipes-context-creator.d.ts deleted file mode 100644 index e5152a6..0000000 --- a/node_modules/@nestjs/core/pipes/pipes-context-creator.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Controller, PipeTransform, Type } from '@nestjs/common/interfaces'; -import { ApplicationConfig } from '../application-config'; -import { ContextCreator } from '../helpers/context-creator'; -import { NestContainer } from '../injector/container'; -import { InstanceWrapper } from '../injector/instance-wrapper'; -export declare class PipesContextCreator extends ContextCreator { - private readonly container; - private readonly config?; - private moduleContext; - constructor(container: NestContainer, config?: ApplicationConfig | undefined); - create(instance: Controller, callback: (...args: unknown[]) => unknown, moduleKey: string, contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): PipeTransform[]; - createConcreteContext(metadata: T, contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): R; - getPipeInstance(pipe: Function | PipeTransform, contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): PipeTransform | null; - getInstanceByMetatype(metatype: Type): InstanceWrapper | undefined; - getGlobalMetadata(contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): T; - setModuleContext(context: string): void; -} diff --git a/node_modules/@nestjs/core/pipes/pipes-context-creator.js b/node_modules/@nestjs/core/pipes/pipes-context-creator.js deleted file mode 100644 index cd72bd9..0000000 --- a/node_modules/@nestjs/core/pipes/pipes-context-creator.js +++ /dev/null @@ -1,72 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PipesContextCreator = void 0; -const constants_1 = require("@nestjs/common/constants"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const iterare_1 = require("iterare"); -const context_creator_1 = require("../helpers/context-creator"); -const constants_2 = require("../injector/constants"); -class PipesContextCreator extends context_creator_1.ContextCreator { - constructor(container, config) { - super(); - this.container = container; - this.config = config; - } - create(instance, callback, moduleKey, contextId = constants_2.STATIC_CONTEXT, inquirerId) { - this.moduleContext = moduleKey; - return this.createContext(instance, callback, constants_1.PIPES_METADATA, contextId, inquirerId); - } - createConcreteContext(metadata, contextId = constants_2.STATIC_CONTEXT, inquirerId) { - if ((0, shared_utils_1.isEmpty)(metadata)) { - return []; - } - return (0, iterare_1.iterate)(metadata) - .filter((pipe) => pipe && (pipe.name || pipe.transform)) - .map(pipe => this.getPipeInstance(pipe, contextId, inquirerId)) - .filter(pipe => !!pipe && pipe.transform && (0, shared_utils_1.isFunction)(pipe.transform)) - .toArray(); - } - getPipeInstance(pipe, contextId = constants_2.STATIC_CONTEXT, inquirerId) { - const isObject = !!pipe.transform; - if (isObject) { - return pipe; - } - const instanceWrapper = this.getInstanceByMetatype(pipe); - if (!instanceWrapper) { - return null; - } - const instanceHost = instanceWrapper.getInstanceByContextId(this.getContextId(contextId, instanceWrapper), inquirerId); - return instanceHost && instanceHost.instance; - } - getInstanceByMetatype(metatype) { - if (!this.moduleContext) { - return; - } - const collection = this.container.getModules(); - const moduleRef = collection.get(this.moduleContext); - if (!moduleRef) { - return; - } - return moduleRef.injectables.get(metatype); - } - getGlobalMetadata(contextId = constants_2.STATIC_CONTEXT, inquirerId) { - if (!this.config) { - return []; - } - const globalPipes = this.config.getGlobalPipes(); - if (contextId === constants_2.STATIC_CONTEXT && !inquirerId) { - return globalPipes; - } - const scopedPipeWrappers = this.config.getGlobalRequestPipes(); - const scopedPipes = (0, iterare_1.iterate)(scopedPipeWrappers) - .map(wrapper => wrapper.getInstanceByContextId(this.getContextId(contextId, wrapper), inquirerId)) - .filter(host => !!host) - .map(host => host.instance) - .toArray(); - return globalPipes.concat(scopedPipes); - } - setModuleContext(context) { - this.moduleContext = context; - } -} -exports.PipesContextCreator = PipesContextCreator; diff --git a/node_modules/@nestjs/core/repl/assign-to-object.util.d.ts b/node_modules/@nestjs/core/repl/assign-to-object.util.d.ts deleted file mode 100644 index 85c24a1..0000000 --- a/node_modules/@nestjs/core/repl/assign-to-object.util.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * Similar to `Object.assign` but copying properties descriptors from `source` - * as well. - */ -export declare function assignToObject(target: T, source: U): T & U; diff --git a/node_modules/@nestjs/core/repl/assign-to-object.util.js b/node_modules/@nestjs/core/repl/assign-to-object.util.js deleted file mode 100644 index 3b751e0..0000000 --- a/node_modules/@nestjs/core/repl/assign-to-object.util.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.assignToObject = assignToObject; -/** - * Similar to `Object.assign` but copying properties descriptors from `source` - * as well. - */ -function assignToObject(target, source) { - Object.defineProperties(target, Object.keys(source).reduce((descriptors, key) => { - descriptors[key] = Object.getOwnPropertyDescriptor(source, key); - return descriptors; - }, Object.create(null))); - return target; -} diff --git a/node_modules/@nestjs/core/repl/constants.d.ts b/node_modules/@nestjs/core/repl/constants.d.ts deleted file mode 100644 index 708d91a..0000000 --- a/node_modules/@nestjs/core/repl/constants.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const REPL_INITIALIZED_MESSAGE = "REPL initialized"; diff --git a/node_modules/@nestjs/core/repl/constants.js b/node_modules/@nestjs/core/repl/constants.js deleted file mode 100644 index 9f191a7..0000000 --- a/node_modules/@nestjs/core/repl/constants.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.REPL_INITIALIZED_MESSAGE = void 0; -exports.REPL_INITIALIZED_MESSAGE = 'REPL initialized'; diff --git a/node_modules/@nestjs/core/repl/index.d.ts b/node_modules/@nestjs/core/repl/index.d.ts deleted file mode 100644 index 8a399bd..0000000 --- a/node_modules/@nestjs/core/repl/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './repl'; diff --git a/node_modules/@nestjs/core/repl/index.js b/node_modules/@nestjs/core/repl/index.js deleted file mode 100644 index ca8ee87..0000000 --- a/node_modules/@nestjs/core/repl/index.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./repl"), exports); diff --git a/node_modules/@nestjs/core/repl/native-functions/debug-repl-fn.d.ts b/node_modules/@nestjs/core/repl/native-functions/debug-repl-fn.d.ts deleted file mode 100644 index 03b5403..0000000 --- a/node_modules/@nestjs/core/repl/native-functions/debug-repl-fn.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { Type } from '@nestjs/common'; -import { ReplFunction } from '../repl-function'; -import type { ReplFnDefinition } from '../repl.interfaces'; -export declare class DebugReplFn extends ReplFunction { - fnDefinition: ReplFnDefinition; - action(moduleCls?: Type | string): void; - private printCtrlsAndProviders; - private printCollection; -} diff --git a/node_modules/@nestjs/core/repl/native-functions/debug-repl-fn.js b/node_modules/@nestjs/core/repl/native-functions/debug-repl-fn.js deleted file mode 100644 index 3686004..0000000 --- a/node_modules/@nestjs/core/repl/native-functions/debug-repl-fn.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DebugReplFn = void 0; -const cli_colors_util_1 = require("@nestjs/common/utils/cli-colors.util"); -const repl_function_1 = require("../repl-function"); -class DebugReplFn extends repl_function_1.ReplFunction { - constructor() { - super(...arguments); - this.fnDefinition = { - name: 'debug', - description: 'Print all registered modules as a list together with their controllers and providers.\nIf the argument is passed in, for example, "debug(MyModule)" then it will only print components of this specific module.', - signature: '(moduleCls?: ClassRef | string) => void', - }; - } - action(moduleCls) { - this.ctx.writeToStdout('\n'); - if (moduleCls) { - const token = typeof moduleCls === 'function' ? moduleCls.name : moduleCls; - const moduleEntry = this.ctx.debugRegistry[token]; - if (!moduleEntry) { - return this.logger.error(`"${token}" has not been found in the modules registry`); - } - this.printCtrlsAndProviders(token, moduleEntry); - } - else { - Object.keys(this.ctx.debugRegistry).forEach(moduleKey => { - this.printCtrlsAndProviders(moduleKey, this.ctx.debugRegistry[moduleKey]); - }); - } - this.ctx.writeToStdout('\n'); - } - printCtrlsAndProviders(moduleName, moduleDebugEntry) { - this.ctx.writeToStdout(`${cli_colors_util_1.clc.green(moduleName)}:\n`); - this.printCollection('controllers', moduleDebugEntry['controllers']); - this.printCollection('providers', moduleDebugEntry['providers']); - } - printCollection(title, collectionValue) { - const collectionEntries = Object.keys(collectionValue); - if (collectionEntries.length <= 0) { - return; - } - this.ctx.writeToStdout(` ${cli_colors_util_1.clc.yellow(`- ${title}`)}:\n`); - collectionEntries.forEach(provider => this.ctx.writeToStdout(` ${cli_colors_util_1.clc.green('◻')} ${provider}\n`)); - } -} -exports.DebugReplFn = DebugReplFn; diff --git a/node_modules/@nestjs/core/repl/native-functions/get-repl-fn.d.ts b/node_modules/@nestjs/core/repl/native-functions/get-repl-fn.d.ts deleted file mode 100644 index 27dbcb3..0000000 --- a/node_modules/@nestjs/core/repl/native-functions/get-repl-fn.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { Type } from '@nestjs/common'; -import { ReplFunction } from '../repl-function'; -import type { ReplFnDefinition } from '../repl.interfaces'; -export declare class GetReplFn extends ReplFunction { - fnDefinition: ReplFnDefinition; - action(token: string | symbol | Function | Type): any; -} diff --git a/node_modules/@nestjs/core/repl/native-functions/get-repl-fn.js b/node_modules/@nestjs/core/repl/native-functions/get-repl-fn.js deleted file mode 100644 index b2aaeb4..0000000 --- a/node_modules/@nestjs/core/repl/native-functions/get-repl-fn.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GetReplFn = void 0; -const repl_function_1 = require("../repl-function"); -class GetReplFn extends repl_function_1.ReplFunction { - constructor() { - super(...arguments); - this.fnDefinition = { - name: 'get', - signature: '(token: InjectionToken) => any', - description: 'Retrieves an instance of either injectable or controller, otherwise, throws exception.', - aliases: ['$'], - }; - } - action(token) { - return this.ctx.app.get(token); - } -} -exports.GetReplFn = GetReplFn; diff --git a/node_modules/@nestjs/core/repl/native-functions/help-repl-fn.d.ts b/node_modules/@nestjs/core/repl/native-functions/help-repl-fn.d.ts deleted file mode 100644 index e370e36..0000000 --- a/node_modules/@nestjs/core/repl/native-functions/help-repl-fn.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { ReplFunction } from '../repl-function'; -import type { ReplFnDefinition } from '../repl.interfaces'; -export declare class HelpReplFn extends ReplFunction { - fnDefinition: ReplFnDefinition; - static buildHelpMessage: ({ name, description }: ReplFnDefinition) => string; - action(): void; -} diff --git a/node_modules/@nestjs/core/repl/native-functions/help-repl-fn.js b/node_modules/@nestjs/core/repl/native-functions/help-repl-fn.js deleted file mode 100644 index 7e1a067..0000000 --- a/node_modules/@nestjs/core/repl/native-functions/help-repl-fn.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.HelpReplFn = void 0; -const iterare_1 = require("iterare"); -const cli_colors_util_1 = require("@nestjs/common/utils/cli-colors.util"); -const repl_function_1 = require("../repl-function"); -class HelpReplFn extends repl_function_1.ReplFunction { - constructor() { - super(...arguments); - this.fnDefinition = { - name: 'help', - signature: '() => void', - description: 'Display all available REPL native functions.', - }; - } - action() { - const sortedNativeFunctions = (0, iterare_1.iterate)(this.ctx.nativeFunctions) - .map(([, nativeFunction]) => nativeFunction.fnDefinition) - .toArray() - .sort((a, b) => (a.name < b.name ? -1 : 1)); - this.ctx.writeToStdout(`You can call ${cli_colors_util_1.clc.bold('.help')} on any function listed below (e.g.: ${cli_colors_util_1.clc.bold('help.help')}):\n\n` + - sortedNativeFunctions.map(HelpReplFn.buildHelpMessage).join('\n') + - // Without the following LF the last item won't be displayed - '\n'); - } -} -exports.HelpReplFn = HelpReplFn; -HelpReplFn.buildHelpMessage = ({ name, description }) => cli_colors_util_1.clc.cyanBright(name) + - (description ? ` ${cli_colors_util_1.clc.bold('-')} ${description}` : ''); diff --git a/node_modules/@nestjs/core/repl/native-functions/index.d.ts b/node_modules/@nestjs/core/repl/native-functions/index.d.ts deleted file mode 100644 index b552bc5..0000000 --- a/node_modules/@nestjs/core/repl/native-functions/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './help-repl-fn'; -export * from './get-repl-fn'; -export * from './resolve-repl-fn'; -export * from './select-relp-fn'; -export * from './debug-repl-fn'; -export * from './methods-repl-fn'; diff --git a/node_modules/@nestjs/core/repl/native-functions/index.js b/node_modules/@nestjs/core/repl/native-functions/index.js deleted file mode 100644 index 6e694c6..0000000 --- a/node_modules/@nestjs/core/repl/native-functions/index.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./help-repl-fn"), exports); -tslib_1.__exportStar(require("./get-repl-fn"), exports); -tslib_1.__exportStar(require("./resolve-repl-fn"), exports); -tslib_1.__exportStar(require("./select-relp-fn"), exports); -tslib_1.__exportStar(require("./debug-repl-fn"), exports); -tslib_1.__exportStar(require("./methods-repl-fn"), exports); diff --git a/node_modules/@nestjs/core/repl/native-functions/methods-repl-fn.d.ts b/node_modules/@nestjs/core/repl/native-functions/methods-repl-fn.d.ts deleted file mode 100644 index 9c8dcb7..0000000 --- a/node_modules/@nestjs/core/repl/native-functions/methods-repl-fn.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { Type } from '@nestjs/common'; -import { ReplFunction } from '../repl-function'; -import type { ReplFnDefinition } from '../repl.interfaces'; -export declare class MethodsReplFn extends ReplFunction { - fnDefinition: ReplFnDefinition; - private readonly metadataScanner; - action(token: Type | string): void; -} diff --git a/node_modules/@nestjs/core/repl/native-functions/methods-repl-fn.js b/node_modules/@nestjs/core/repl/native-functions/methods-repl-fn.js deleted file mode 100644 index d5a05ce..0000000 --- a/node_modules/@nestjs/core/repl/native-functions/methods-repl-fn.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MethodsReplFn = void 0; -const cli_colors_util_1 = require("@nestjs/common/utils/cli-colors.util"); -const metadata_scanner_1 = require("../../metadata-scanner"); -const repl_function_1 = require("../repl-function"); -class MethodsReplFn extends repl_function_1.ReplFunction { - constructor() { - super(...arguments); - this.fnDefinition = { - name: 'methods', - description: 'Display all public methods available on a given provider or controller.', - signature: '(token: ClassRef | string) => void', - }; - this.metadataScanner = new metadata_scanner_1.MetadataScanner(); - } - action(token) { - const proto = typeof token !== 'function' - ? Object.getPrototypeOf(this.ctx.app.get(token)) - : token?.prototype; - const methods = this.metadataScanner.getAllMethodNames(proto); - this.ctx.writeToStdout('\n'); - this.ctx.writeToStdout(`${cli_colors_util_1.clc.green('Methods')}:\n`); - methods.forEach(methodName => this.ctx.writeToStdout(` ${cli_colors_util_1.clc.yellow('◻')} ${methodName}\n`)); - this.ctx.writeToStdout('\n'); - } -} -exports.MethodsReplFn = MethodsReplFn; diff --git a/node_modules/@nestjs/core/repl/native-functions/resolve-repl-fn.d.ts b/node_modules/@nestjs/core/repl/native-functions/resolve-repl-fn.d.ts deleted file mode 100644 index 2271e2f..0000000 --- a/node_modules/@nestjs/core/repl/native-functions/resolve-repl-fn.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { Type } from '@nestjs/common'; -import { ReplFunction } from '../repl-function'; -import type { ReplFnDefinition } from '../repl.interfaces'; -export declare class ResolveReplFn extends ReplFunction { - fnDefinition: ReplFnDefinition; - action(token: string | symbol | Function | Type, contextId: any): Promise; -} diff --git a/node_modules/@nestjs/core/repl/native-functions/resolve-repl-fn.js b/node_modules/@nestjs/core/repl/native-functions/resolve-repl-fn.js deleted file mode 100644 index 8856333..0000000 --- a/node_modules/@nestjs/core/repl/native-functions/resolve-repl-fn.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ResolveReplFn = void 0; -const repl_function_1 = require("../repl-function"); -class ResolveReplFn extends repl_function_1.ReplFunction { - constructor() { - super(...arguments); - this.fnDefinition = { - name: 'resolve', - description: 'Resolves transient or request-scoped instance of either injectable or controller, otherwise, throws exception.', - signature: '(token: InjectionToken, contextId: any) => Promise', - }; - } - action(token, contextId) { - return this.ctx.app.resolve(token, contextId); - } -} -exports.ResolveReplFn = ResolveReplFn; diff --git a/node_modules/@nestjs/core/repl/native-functions/select-relp-fn.d.ts b/node_modules/@nestjs/core/repl/native-functions/select-relp-fn.d.ts deleted file mode 100644 index e633b09..0000000 --- a/node_modules/@nestjs/core/repl/native-functions/select-relp-fn.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { DynamicModule, INestApplicationContext, Type } from '@nestjs/common'; -import { ReplFunction } from '../repl-function'; -import type { ReplFnDefinition } from '../repl.interfaces'; -export declare class SelectReplFn extends ReplFunction { - fnDefinition: ReplFnDefinition; - action(token: DynamicModule | Type): INestApplicationContext; -} diff --git a/node_modules/@nestjs/core/repl/native-functions/select-relp-fn.js b/node_modules/@nestjs/core/repl/native-functions/select-relp-fn.js deleted file mode 100644 index dfca2ce..0000000 --- a/node_modules/@nestjs/core/repl/native-functions/select-relp-fn.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SelectReplFn = void 0; -const repl_function_1 = require("../repl-function"); -class SelectReplFn extends repl_function_1.ReplFunction { - constructor() { - super(...arguments); - this.fnDefinition = { - name: 'select', - description: 'Allows navigating through the modules tree, for example, to pull out a specific instance from the selected module.', - signature: '(token: DynamicModule | ClassRef) => INestApplicationContext', - }; - } - action(token) { - return this.ctx.app.select(token); - } -} -exports.SelectReplFn = SelectReplFn; diff --git a/node_modules/@nestjs/core/repl/repl-context.d.ts b/node_modules/@nestjs/core/repl/repl-context.d.ts deleted file mode 100644 index 4d71c21..0000000 --- a/node_modules/@nestjs/core/repl/repl-context.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { INestApplicationContext, InjectionToken, Logger } from '@nestjs/common'; -import { ReplFunction } from './repl-function'; -import type { ReplFunctionClass } from './repl.interfaces'; -type ModuleKey = string; -export type ModuleDebugEntry = { - controllers: Record; - providers: Record; -}; -type ReplScope = Record; -export declare class ReplContext { - readonly app: INestApplicationContext; - readonly logger: Logger; - debugRegistry: Record; - readonly globalScope: ReplScope; - readonly nativeFunctions: Map>; - private readonly container; - constructor(app: INestApplicationContext, nativeFunctionsClassRefs?: ReplFunctionClass[]); - writeToStdout(text: string): void; - private initializeContext; - private introspectCollection; - private stringifyToken; - private addNativeFunction; - private registerFunctionIntoGlobalScope; - private initializeNativeFunctions; -} -export {}; diff --git a/node_modules/@nestjs/core/repl/repl-context.js b/node_modules/@nestjs/core/repl/repl-context.js deleted file mode 100644 index 53f1b56..0000000 --- a/node_modules/@nestjs/core/repl/repl-context.js +++ /dev/null @@ -1,126 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ReplContext = void 0; -const common_1 = require("@nestjs/common"); -const application_config_1 = require("../application-config"); -const injector_1 = require("../injector"); -const internal_core_module_1 = require("../injector/internal-core-module/internal-core-module"); -const native_functions_1 = require("./native-functions"); -class ReplContext { - constructor(app, nativeFunctionsClassRefs) { - this.app = app; - this.logger = new common_1.Logger(ReplContext.name); - this.debugRegistry = {}; - this.globalScope = Object.create(null); - this.nativeFunctions = new Map(); - this.container = app.container; // Using `any` because `app.container` is not public. - this.initializeContext(); - this.initializeNativeFunctions(nativeFunctionsClassRefs || []); - } - writeToStdout(text) { - process.stdout.write(text); - } - initializeContext() { - const modules = this.container.getModules(); - modules.forEach(moduleRef => { - let moduleName = moduleRef.metatype.name; - if (moduleName === internal_core_module_1.InternalCoreModule.name) { - return; - } - if (this.globalScope[moduleName]) { - moduleName += ` (${moduleRef.token})`; - } - this.introspectCollection(moduleRef, moduleName, 'providers'); - this.introspectCollection(moduleRef, moduleName, 'controllers'); - // For in REPL auto-complete functionality - Object.defineProperty(this.globalScope, moduleName, { - value: moduleRef.metatype, - configurable: false, - enumerable: true, - }); - }); - } - introspectCollection(moduleRef, moduleKey, collection) { - const moduleDebugEntry = {}; - moduleRef[collection].forEach(({ token }) => { - const stringifiedToken = this.stringifyToken(token); - if (stringifiedToken === application_config_1.ApplicationConfig.name || - stringifiedToken === moduleRef.metatype.name) { - return; - } - if (!this.globalScope[stringifiedToken]) { - // For in REPL auto-complete functionality - Object.defineProperty(this.globalScope, stringifiedToken, { - value: token, - configurable: false, - enumerable: true, - }); - } - if (stringifiedToken === injector_1.ModuleRef.name) { - return; - } - moduleDebugEntry[stringifiedToken] = token; - }); - this.debugRegistry[moduleKey] = { - ...this.debugRegistry?.[moduleKey], - [collection]: moduleDebugEntry, - }; - } - stringifyToken(token) { - return typeof token !== 'string' - ? typeof token === 'function' - ? token.name - : token?.toString() - : `"${token}"`; - } - addNativeFunction(NativeFunctionRef) { - const nativeFunction = new NativeFunctionRef(this); - const nativeFunctions = [nativeFunction]; - this.nativeFunctions.set(nativeFunction.fnDefinition.name, nativeFunction); - nativeFunction.fnDefinition.aliases?.forEach(aliasName => { - const aliasNativeFunction = Object.create(nativeFunction); - aliasNativeFunction.fnDefinition = { - name: aliasName, - description: aliasNativeFunction.fnDefinition.description, - signature: aliasNativeFunction.fnDefinition.signature, - }; - this.nativeFunctions.set(aliasName, aliasNativeFunction); - nativeFunctions.push(aliasNativeFunction); - }); - return nativeFunctions; - } - registerFunctionIntoGlobalScope(nativeFunction) { - // Bind the method to REPL's context: - this.globalScope[nativeFunction.fnDefinition.name] = - nativeFunction.action.bind(nativeFunction); - // Load the help trigger as a `help` getter on each native function: - const functionBoundRef = this.globalScope[nativeFunction.fnDefinition.name]; - Object.defineProperty(functionBoundRef, 'help', { - enumerable: false, - configurable: false, - get: () => - // Dynamically builds the help message as will unlikely to be called - // several times. - this.writeToStdout(nativeFunction.makeHelpMessage()), - }); - } - initializeNativeFunctions(nativeFunctionsClassRefs) { - const builtInFunctionsClassRefs = [ - native_functions_1.HelpReplFn, - native_functions_1.GetReplFn, - native_functions_1.ResolveReplFn, - native_functions_1.SelectReplFn, - native_functions_1.DebugReplFn, - native_functions_1.MethodsReplFn, - ]; - builtInFunctionsClassRefs - .concat(nativeFunctionsClassRefs) - .forEach(NativeFunction => { - const nativeFunctions = this.addNativeFunction(NativeFunction); - nativeFunctions.forEach(nativeFunction => { - this.registerFunctionIntoGlobalScope(nativeFunction); - }); - }); - } -} -exports.ReplContext = ReplContext; diff --git a/node_modules/@nestjs/core/repl/repl-function.d.ts b/node_modules/@nestjs/core/repl/repl-function.d.ts deleted file mode 100644 index 5a693e8..0000000 --- a/node_modules/@nestjs/core/repl/repl-function.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Logger } from '@nestjs/common'; -import { ReplContext } from './repl-context'; -import type { ReplFnDefinition } from './repl.interfaces'; -export declare abstract class ReplFunction = Array, ActionReturn = any> { - protected readonly ctx: ReplContext; - /** Metadata that describes the built-in function itself. */ - abstract fnDefinition: ReplFnDefinition; - protected readonly logger: Logger; - constructor(ctx: ReplContext); - /** - * Method called when the function is invoked from the REPL by the user. - */ - abstract action(...args: ActionParams): ActionReturn; - /** - * @returns A message displayed by calling `.help` - */ - makeHelpMessage(): string; -} diff --git a/node_modules/@nestjs/core/repl/repl-function.js b/node_modules/@nestjs/core/repl/repl-function.js deleted file mode 100644 index ef70687..0000000 --- a/node_modules/@nestjs/core/repl/repl-function.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ReplFunction = void 0; -const cli_colors_util_1 = require("@nestjs/common/utils/cli-colors.util"); -class ReplFunction { - constructor(ctx) { - this.ctx = ctx; - this.logger = ctx.logger; - } - /** - * @returns A message displayed by calling `.help` - */ - makeHelpMessage() { - const { description, name, signature } = this.fnDefinition; - const fnSignatureWithName = `${name}${signature}`; - return `${cli_colors_util_1.clc.yellow(description)}\n${cli_colors_util_1.clc.magentaBright('Interface:')} ${cli_colors_util_1.clc.bold(fnSignatureWithName)}\n`; - } -} -exports.ReplFunction = ReplFunction; diff --git a/node_modules/@nestjs/core/repl/repl-logger.d.ts b/node_modules/@nestjs/core/repl/repl-logger.d.ts deleted file mode 100644 index cd03587..0000000 --- a/node_modules/@nestjs/core/repl/repl-logger.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { ConsoleLogger } from '@nestjs/common'; -export declare class ReplLogger extends ConsoleLogger { - private static readonly ignoredContexts; - log(_message: any, context?: string): void; -} diff --git a/node_modules/@nestjs/core/repl/repl-logger.js b/node_modules/@nestjs/core/repl/repl-logger.js deleted file mode 100644 index f95a2e1..0000000 --- a/node_modules/@nestjs/core/repl/repl-logger.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ReplLogger = void 0; -const common_1 = require("@nestjs/common"); -const nest_application_1 = require("../nest-application"); -const router_explorer_1 = require("../router/router-explorer"); -const routes_resolver_1 = require("../router/routes-resolver"); -class ReplLogger extends common_1.ConsoleLogger { - log(_message, context) { - if (ReplLogger.ignoredContexts.includes(context)) { - return; - } - // eslint-disable-next-line - return super.log.apply(this, Array.from(arguments)); - } -} -exports.ReplLogger = ReplLogger; -ReplLogger.ignoredContexts = [ - routes_resolver_1.RoutesResolver.name, - router_explorer_1.RouterExplorer.name, - nest_application_1.NestApplication.name, -]; diff --git a/node_modules/@nestjs/core/repl/repl-native-commands.d.ts b/node_modules/@nestjs/core/repl/repl-native-commands.d.ts deleted file mode 100644 index 87bffd7..0000000 --- a/node_modules/@nestjs/core/repl/repl-native-commands.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { REPLServer } from 'repl'; -export declare function defineDefaultCommandsOnRepl(replServer: REPLServer): void; diff --git a/node_modules/@nestjs/core/repl/repl-native-commands.js b/node_modules/@nestjs/core/repl/repl-native-commands.js deleted file mode 100644 index 02b11bd..0000000 --- a/node_modules/@nestjs/core/repl/repl-native-commands.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.defineDefaultCommandsOnRepl = defineDefaultCommandsOnRepl; -/** - * Displays a list of available commands in the REPL alongside with their - * descriptions. - * (c) This code was inspired by the 'help' command from Node.js core: - * {@link https://github.com/nodejs/node/blob/58b60c1393dd65cd228a8b0084a19acd2c1d16aa/lib/repl.js#L1741-L1759} - */ -function listAllCommands(replServer) { - Object.keys(replServer.commands) - .sort() - .forEach(name => { - const cmd = replServer.commands[name]; - if (cmd) { - replServer.output.write(`${name}\t${cmd.help || ''}\n`); - } - }); -} -function defineDefaultCommandsOnRepl(replServer) { - replServer.defineCommand('help', { - help: 'Show REPL options', - action(name) { - this.clearBufferedCommand(); - if (name) { - // Considering native commands before native nestjs injected functions. - const nativeCommandOrFunction = this.commands[name] || this.context[name]; - // NOTE: If the command was retrieve from the context, it will have a `help` - // getter property that outputs the helper message and returns undefined. - // But if the command was retrieve from the `commands` object, it will - // have a `help` property that returns the helper message. - const helpMessage = nativeCommandOrFunction?.help; - if (helpMessage) { - this.output.write(`${helpMessage}\n`); - } - } - else { - listAllCommands(this); - this.output.write('\n\n'); - this.context.help(); - this.output.write('\nPress Ctrl+C to abort current expression, Ctrl+D to exit the REPL\n'); - } - this.displayPrompt(); - }, - }); -} diff --git a/node_modules/@nestjs/core/repl/repl.d.ts b/node_modules/@nestjs/core/repl/repl.d.ts deleted file mode 100644 index 6fce6f7..0000000 --- a/node_modules/@nestjs/core/repl/repl.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { DynamicModule, Type } from '@nestjs/common'; -import type { ReplOptions } from 'repl'; -export declare function repl(module: Type | DynamicModule, replOptions?: ReplOptions): Promise; diff --git a/node_modules/@nestjs/core/repl/repl.interfaces.d.ts b/node_modules/@nestjs/core/repl/repl.interfaces.d.ts deleted file mode 100644 index 778fa6c..0000000 --- a/node_modules/@nestjs/core/repl/repl.interfaces.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { ReplContext } from './repl-context'; -import type { ReplFunction } from './repl-function'; -export type ReplFnDefinition = { - /** Function's name. Note that this should be a valid JavaScript function name. */ - name: string; - /** Alternative names to the function. */ - aliases?: ReplFnDefinition['name'][]; - /** Function's description to display when `.help` is entered. */ - description: string; - /** - * Function's signature following TypeScript _function type expression_ syntax. - * @example '(token: InjectionToken) => any' - */ - signature: string; -}; -export type ReplFunctionClass = new (replContext: ReplContext) => ReplFunction; diff --git a/node_modules/@nestjs/core/repl/repl.interfaces.js b/node_modules/@nestjs/core/repl/repl.interfaces.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/core/repl/repl.interfaces.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/core/repl/repl.js b/node_modules/@nestjs/core/repl/repl.js deleted file mode 100644 index 6fd80a4..0000000 --- a/node_modules/@nestjs/core/repl/repl.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.repl = repl; -const common_1 = require("@nestjs/common"); -const cli_colors_util_1 = require("@nestjs/common/utils/cli-colors.util"); -const nest_factory_1 = require("../nest-factory"); -const assign_to_object_util_1 = require("./assign-to-object.util"); -const constants_1 = require("./constants"); -const repl_context_1 = require("./repl-context"); -const repl_logger_1 = require("./repl-logger"); -const repl_native_commands_1 = require("./repl-native-commands"); -async function repl(module, replOptions = {}) { - const app = await nest_factory_1.NestFactory.createApplicationContext(module, { - abortOnError: false, - logger: new repl_logger_1.ReplLogger(), - }); - await app.init(); - const replContext = new repl_context_1.ReplContext(app); - common_1.Logger.log(constants_1.REPL_INITIALIZED_MESSAGE); - const _repl = await Promise.resolve().then(() => require('repl')); - const replServer = _repl.start({ - prompt: cli_colors_util_1.clc.green('> '), - ignoreUndefined: true, - ...replOptions, - }); - (0, assign_to_object_util_1.assignToObject)(replServer.context, replContext.globalScope); - (0, repl_native_commands_1.defineDefaultCommandsOnRepl)(replServer); - replServer.on('exit', async () => { - await app.close(); - }); - return replServer; -} diff --git a/node_modules/@nestjs/core/router/index.d.ts b/node_modules/@nestjs/core/router/index.d.ts deleted file mode 100644 index 5e2cc66..0000000 --- a/node_modules/@nestjs/core/router/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './interfaces'; -export * from './request'; -export { RouterModule } from './router-module'; diff --git a/node_modules/@nestjs/core/router/index.js b/node_modules/@nestjs/core/router/index.js deleted file mode 100644 index d4ac439..0000000 --- a/node_modules/@nestjs/core/router/index.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RouterModule = void 0; -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./interfaces"), exports); -tslib_1.__exportStar(require("./request"), exports); -var router_module_1 = require("./router-module"); -Object.defineProperty(exports, "RouterModule", { enumerable: true, get: function () { return router_module_1.RouterModule; } }); diff --git a/node_modules/@nestjs/core/router/interfaces/exceptions-filter.interface.d.ts b/node_modules/@nestjs/core/router/interfaces/exceptions-filter.interface.d.ts deleted file mode 100644 index 61e6b10..0000000 --- a/node_modules/@nestjs/core/router/interfaces/exceptions-filter.interface.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Controller } from '@nestjs/common/interfaces/controllers/controller.interface'; -import { ExceptionsHandler } from '../../exceptions/exceptions-handler'; -import { ContextId } from '../../injector/instance-wrapper'; -export interface ExceptionsFilter { - create(instance: Controller, callback: Function, module: string, contextId?: ContextId, inquirerId?: string): ExceptionsHandler; -} diff --git a/node_modules/@nestjs/core/router/interfaces/exceptions-filter.interface.js b/node_modules/@nestjs/core/router/interfaces/exceptions-filter.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/core/router/interfaces/exceptions-filter.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/core/router/interfaces/exclude-route-metadata.interface.d.ts b/node_modules/@nestjs/core/router/interfaces/exclude-route-metadata.interface.d.ts deleted file mode 100644 index 850b611..0000000 --- a/node_modules/@nestjs/core/router/interfaces/exclude-route-metadata.interface.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { RequestMethod } from '@nestjs/common'; -export interface ExcludeRouteMetadata { - /** - * Route path. - */ - path: string; - /** - * Regular expression representing the route path. - */ - pathRegex: RegExp; - /** - * HTTP request method (e.g., GET, POST). - */ - requestMethod: RequestMethod; -} diff --git a/node_modules/@nestjs/core/router/interfaces/exclude-route-metadata.interface.js b/node_modules/@nestjs/core/router/interfaces/exclude-route-metadata.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/core/router/interfaces/exclude-route-metadata.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/core/router/interfaces/index.d.ts b/node_modules/@nestjs/core/router/interfaces/index.d.ts deleted file mode 100644 index 65ccbce..0000000 --- a/node_modules/@nestjs/core/router/interfaces/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './routes.interface'; diff --git a/node_modules/@nestjs/core/router/interfaces/index.js b/node_modules/@nestjs/core/router/interfaces/index.js deleted file mode 100644 index 9d938ae..0000000 --- a/node_modules/@nestjs/core/router/interfaces/index.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./routes.interface"), exports); diff --git a/node_modules/@nestjs/core/router/interfaces/resolver.interface.d.ts b/node_modules/@nestjs/core/router/interfaces/resolver.interface.d.ts deleted file mode 100644 index 318a012..0000000 --- a/node_modules/@nestjs/core/router/interfaces/resolver.interface.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface Resolver { - resolve(instance: any, basePath: string): void; - registerNotFoundHandler(): void; - registerExceptionHandler(): void; -} diff --git a/node_modules/@nestjs/core/router/interfaces/resolver.interface.js b/node_modules/@nestjs/core/router/interfaces/resolver.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/core/router/interfaces/resolver.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/core/router/interfaces/route-params-factory.interface.d.ts b/node_modules/@nestjs/core/router/interfaces/route-params-factory.interface.d.ts deleted file mode 100644 index a1e0843..0000000 --- a/node_modules/@nestjs/core/router/interfaces/route-params-factory.interface.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { RouteParamtypes } from '@nestjs/common/enums/route-paramtypes.enum'; -export interface IRouteParamsFactory { - exchangeKeyForValue = any, TResponse = any, TResult = any>(key: RouteParamtypes | string, data: any, { req, res, next }: { - req: TRequest; - res: TResponse; - next: Function; - }): TResult | null; -} diff --git a/node_modules/@nestjs/core/router/interfaces/route-params-factory.interface.js b/node_modules/@nestjs/core/router/interfaces/route-params-factory.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/core/router/interfaces/route-params-factory.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/core/router/interfaces/route-path-metadata.interface.d.ts b/node_modules/@nestjs/core/router/interfaces/route-path-metadata.interface.d.ts deleted file mode 100644 index 9862c10..0000000 --- a/node_modules/@nestjs/core/router/interfaces/route-path-metadata.interface.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { VersioningOptions } from '@nestjs/common'; -import { VersionValue } from '@nestjs/common/interfaces'; -export interface RoutePathMetadata { - /** - * Controller-level path (e.g., @Controller('resource') = "resource"). - */ - ctrlPath?: string; - /** - * Method-level path (e.g., @Get('resource') = "resource"). - */ - methodPath?: string; - /** - * Global route prefix specified with the "NestApplication#setGlobalPrefix" method. - */ - globalPrefix?: string; - /** - * Module-level path registered through the "RouterModule". - */ - modulePath?: string; - /** - * Controller-level version (e.g., @Controller({ version: '1.0' }) = "1.0"). - */ - controllerVersion?: VersionValue; - /** - * Method-level version (e.g., @Version('1.0') = "1.0"). - */ - methodVersion?: VersionValue; - /** - * API versioning options object. - */ - versioningOptions?: VersioningOptions; -} diff --git a/node_modules/@nestjs/core/router/interfaces/route-path-metadata.interface.js b/node_modules/@nestjs/core/router/interfaces/route-path-metadata.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/core/router/interfaces/route-path-metadata.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/core/router/interfaces/routes.interface.d.ts b/node_modules/@nestjs/core/router/interfaces/routes.interface.d.ts deleted file mode 100644 index ab62e52..0000000 --- a/node_modules/@nestjs/core/router/interfaces/routes.interface.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Type } from '@nestjs/common'; -export interface RouteTree { - path: string; - module?: Type; - children?: (RouteTree | Type)[]; -} -export type Routes = RouteTree[]; diff --git a/node_modules/@nestjs/core/router/interfaces/routes.interface.js b/node_modules/@nestjs/core/router/interfaces/routes.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/core/router/interfaces/routes.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/core/router/legacy-route-converter.d.ts b/node_modules/@nestjs/core/router/legacy-route-converter.d.ts deleted file mode 100644 index 6fb46b4..0000000 --- a/node_modules/@nestjs/core/router/legacy-route-converter.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export declare class LegacyRouteConverter { - private static readonly logger; - /** - * Convert legacy routes to the new format (syntax). - * path-to-regexp used by Express>=v5 and @fastify/middie>=v9 no longer support unnamed wildcards. - * This method attempts to convert the old syntax to the new one, and logs an error if it fails. - * @param route The route to convert. - * @param options Options object. - * @returns The converted route, or the original route if it cannot be converted. - */ - static tryConvert(route: string, options?: { - logs?: boolean; - }): string; - static printError(route: string): void; - static printWarning(route: string): void; -} diff --git a/node_modules/@nestjs/core/router/legacy-route-converter.js b/node_modules/@nestjs/core/router/legacy-route-converter.js deleted file mode 100644 index 889cc80..0000000 --- a/node_modules/@nestjs/core/router/legacy-route-converter.js +++ /dev/null @@ -1,61 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LegacyRouteConverter = void 0; -const common_1 = require("@nestjs/common"); -const UNSUPPORTED_PATH_MESSAGE = (text, route) => `Unsupported route path: "${route}". In previous versions, the symbols ?, *, and + were used to denote optional or repeating path parameters. The latest version of "path-to-regexp" now requires the use of named parameters. For example, instead of using a route like /users/* to capture all routes starting with "/users", you should use /users/*path. For more details, refer to the migration guide.`; -class LegacyRouteConverter { - /** - * Convert legacy routes to the new format (syntax). - * path-to-regexp used by Express>=v5 and @fastify/middie>=v9 no longer support unnamed wildcards. - * This method attempts to convert the old syntax to the new one, and logs an error if it fails. - * @param route The route to convert. - * @param options Options object. - * @returns The converted route, or the original route if it cannot be converted. - */ - static tryConvert(route, options) { - // Normalize path to eliminate additional if statements. - const routeWithLeadingSlash = route.startsWith('/') ? route : `/${route}`; - const normalizedRoute = route.endsWith('/') - ? routeWithLeadingSlash - : `${routeWithLeadingSlash}/`; - const loggingEnabled = options?.logs ?? true; - const printWarning = loggingEnabled - ? this.printWarning.bind(this) - : () => { }; - if (normalizedRoute.endsWith('/(.*)/')) { - // Skip printing warning for the "all" wildcard. - if (normalizedRoute !== '/(.*)/') { - printWarning(route); - } - return route.replace('(.*)', '{*path}'); - } - if (normalizedRoute.endsWith('/*/')) { - // Skip printing warning for the "all" wildcard. - if (normalizedRoute !== '/*/') { - printWarning(route); - } - return route.replace('*', '{*path}'); - } - if (normalizedRoute.endsWith('/+/')) { - printWarning(route); - return route.replace('/+', '/*path'); - } - // When route includes any wildcard segments in the middle. - if (normalizedRoute.includes('/*/')) { - printWarning(route); - // Replace each /*/ segment with a named parameter using different name for each segment. - return route.replaceAll('/*/', (match, offset) => { - return `/*path${offset}/`; - }); - } - return route; - } - static printError(route) { - this.logger.error(UNSUPPORTED_PATH_MESSAGE `${route}`); - } - static printWarning(route) { - this.logger.warn(UNSUPPORTED_PATH_MESSAGE `${route}` + ' Attempting to auto-convert...'); - } -} -exports.LegacyRouteConverter = LegacyRouteConverter; -LegacyRouteConverter.logger = new common_1.Logger(LegacyRouteConverter.name); diff --git a/node_modules/@nestjs/core/router/paths-explorer.d.ts b/node_modules/@nestjs/core/router/paths-explorer.d.ts deleted file mode 100644 index 4451e74..0000000 --- a/node_modules/@nestjs/core/router/paths-explorer.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { RequestMethod } from '@nestjs/common/enums'; -import { Controller } from '@nestjs/common/interfaces/controllers/controller.interface'; -import { VersionValue } from '@nestjs/common/interfaces/version-options.interface'; -import { MetadataScanner } from '../metadata-scanner'; -import { RouterProxyCallback } from './router-proxy'; -export interface RouteDefinition { - path: string[]; - requestMethod: RequestMethod; - targetCallback: RouterProxyCallback; - methodName: string; - version?: VersionValue; -} -export declare class PathsExplorer { - private readonly metadataScanner; - constructor(metadataScanner: MetadataScanner); - scanForPaths(instance: Controller, prototype?: object): RouteDefinition[]; - exploreMethodMetadata(instance: Controller, prototype: object, methodName: string): RouteDefinition | null; -} diff --git a/node_modules/@nestjs/core/router/paths-explorer.js b/node_modules/@nestjs/core/router/paths-explorer.js deleted file mode 100644 index fe08bf2..0000000 --- a/node_modules/@nestjs/core/router/paths-explorer.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PathsExplorer = void 0; -const constants_1 = require("@nestjs/common/constants"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -class PathsExplorer { - constructor(metadataScanner) { - this.metadataScanner = metadataScanner; - } - scanForPaths(instance, prototype) { - const instancePrototype = (0, shared_utils_1.isUndefined)(prototype) - ? Object.getPrototypeOf(instance) - : prototype; - return this.metadataScanner - .getAllMethodNames(instancePrototype) - .reduce((acc, method) => { - const route = this.exploreMethodMetadata(instance, instancePrototype, method); - if (route) { - acc.push(route); - } - return acc; - }, []); - } - exploreMethodMetadata(instance, prototype, methodName) { - const instanceCallback = instance[methodName]; - const prototypeCallback = prototype[methodName]; - const routePath = Reflect.getMetadata(constants_1.PATH_METADATA, prototypeCallback); - if ((0, shared_utils_1.isUndefined)(routePath)) { - return null; - } - const requestMethod = Reflect.getMetadata(constants_1.METHOD_METADATA, prototypeCallback); - const version = Reflect.getMetadata(constants_1.VERSION_METADATA, prototypeCallback); - const path = (0, shared_utils_1.isString)(routePath) - ? [(0, shared_utils_1.addLeadingSlash)(routePath)] - : routePath.map((p) => (0, shared_utils_1.addLeadingSlash)(p)); - return { - path, - requestMethod, - targetCallback: instanceCallback, - methodName, - version, - }; - } -} -exports.PathsExplorer = PathsExplorer; diff --git a/node_modules/@nestjs/core/router/request/index.d.ts b/node_modules/@nestjs/core/router/request/index.d.ts deleted file mode 100644 index 9424999..0000000 --- a/node_modules/@nestjs/core/router/request/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export { REQUEST } from './request-constants'; diff --git a/node_modules/@nestjs/core/router/request/index.js b/node_modules/@nestjs/core/router/request/index.js deleted file mode 100644 index 6b63e4a..0000000 --- a/node_modules/@nestjs/core/router/request/index.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.REQUEST = void 0; -var request_constants_1 = require("./request-constants"); -Object.defineProperty(exports, "REQUEST", { enumerable: true, get: function () { return request_constants_1.REQUEST; } }); diff --git a/node_modules/@nestjs/core/router/request/request-constants.d.ts b/node_modules/@nestjs/core/router/request/request-constants.d.ts deleted file mode 100644 index abb7a28..0000000 --- a/node_modules/@nestjs/core/router/request/request-constants.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare const REQUEST = "REQUEST"; -export declare const REQUEST_CONTEXT_ID: unique symbol; diff --git a/node_modules/@nestjs/core/router/request/request-constants.js b/node_modules/@nestjs/core/router/request/request-constants.js deleted file mode 100644 index db9383d..0000000 --- a/node_modules/@nestjs/core/router/request/request-constants.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.REQUEST_CONTEXT_ID = exports.REQUEST = void 0; -exports.REQUEST = 'REQUEST'; -exports.REQUEST_CONTEXT_ID = Symbol('REQUEST_CONTEXT_ID'); diff --git a/node_modules/@nestjs/core/router/request/request-providers.d.ts b/node_modules/@nestjs/core/router/request/request-providers.d.ts deleted file mode 100644 index 40b9cbb..0000000 --- a/node_modules/@nestjs/core/router/request/request-providers.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Provider } from '@nestjs/common'; -export declare const requestProvider: Provider; diff --git a/node_modules/@nestjs/core/router/request/request-providers.js b/node_modules/@nestjs/core/router/request/request-providers.js deleted file mode 100644 index 9c63757..0000000 --- a/node_modules/@nestjs/core/router/request/request-providers.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.requestProvider = void 0; -const common_1 = require("@nestjs/common"); -const request_constants_1 = require("./request-constants"); -const noop = () => { }; -exports.requestProvider = { - provide: request_constants_1.REQUEST, - scope: common_1.Scope.REQUEST, - useFactory: noop, -}; diff --git a/node_modules/@nestjs/core/router/route-params-factory.d.ts b/node_modules/@nestjs/core/router/route-params-factory.d.ts deleted file mode 100644 index c0079e5..0000000 --- a/node_modules/@nestjs/core/router/route-params-factory.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { RouteParamtypes } from '@nestjs/common/enums/route-paramtypes.enum'; -import { IRouteParamsFactory } from './interfaces/route-params-factory.interface'; -export declare class RouteParamsFactory implements IRouteParamsFactory { - exchangeKeyForValue = any, TResponse = any, TResult = any>(key: RouteParamtypes | string, data: string, { req, res, next }: { - req: TRequest; - res: TResponse; - next: Function; - }): TResult | null; -} diff --git a/node_modules/@nestjs/core/router/route-params-factory.js b/node_modules/@nestjs/core/router/route-params-factory.js deleted file mode 100644 index dde5bf8..0000000 --- a/node_modules/@nestjs/core/router/route-params-factory.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RouteParamsFactory = void 0; -const route_paramtypes_enum_1 = require("@nestjs/common/enums/route-paramtypes.enum"); -class RouteParamsFactory { - exchangeKeyForValue(key, data, { req, res, next }) { - switch (key) { - case route_paramtypes_enum_1.RouteParamtypes.NEXT: - return next; - case route_paramtypes_enum_1.RouteParamtypes.REQUEST: - return req; - case route_paramtypes_enum_1.RouteParamtypes.RESPONSE: - return res; - case route_paramtypes_enum_1.RouteParamtypes.BODY: - return data && req.body ? req.body[data] : req.body; - case route_paramtypes_enum_1.RouteParamtypes.RAW_BODY: - return req.rawBody; - case route_paramtypes_enum_1.RouteParamtypes.PARAM: - return data ? req.params[data] : req.params; - case route_paramtypes_enum_1.RouteParamtypes.HOST: - /* eslint-disable-next-line no-case-declarations */ - const hosts = req.hosts || {}; - return data ? hosts[data] : hosts; - case route_paramtypes_enum_1.RouteParamtypes.QUERY: - return data ? req.query[data] : req.query; - case route_paramtypes_enum_1.RouteParamtypes.HEADERS: - return data ? req.headers[data.toLowerCase()] : req.headers; - case route_paramtypes_enum_1.RouteParamtypes.SESSION: - return req.session; - case route_paramtypes_enum_1.RouteParamtypes.FILE: - return req[data || 'file']; - case route_paramtypes_enum_1.RouteParamtypes.FILES: - return req.files; - case route_paramtypes_enum_1.RouteParamtypes.IP: - return req.ip; - default: - return null; - } - } -} -exports.RouteParamsFactory = RouteParamsFactory; diff --git a/node_modules/@nestjs/core/router/route-path-factory.d.ts b/node_modules/@nestjs/core/router/route-path-factory.d.ts deleted file mode 100644 index 527166e..0000000 --- a/node_modules/@nestjs/core/router/route-path-factory.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { RequestMethod, VersioningOptions } from '@nestjs/common'; -import { VersionValue } from '@nestjs/common/interfaces'; -import { ApplicationConfig } from '../application-config'; -import { RoutePathMetadata } from './interfaces/route-path-metadata.interface'; -export declare class RoutePathFactory { - private readonly applicationConfig; - constructor(applicationConfig: ApplicationConfig); - create(metadata: RoutePathMetadata, requestMethod?: RequestMethod): string[]; - getVersion(metadata: RoutePathMetadata): VersionValue | undefined; - getVersionPrefix(versioningOptions: VersioningOptions): string; - appendToAllIfDefined(paths: string[], fragmentToAppend: string | string[] | undefined): string[]; - isExcludedFromGlobalPrefix(path: string, requestMethod?: RequestMethod, versionOrVersions?: VersionValue, versioningOptions?: VersioningOptions): boolean; - private truncateVersionPrefixFromPath; -} diff --git a/node_modules/@nestjs/core/router/route-path-factory.js b/node_modules/@nestjs/core/router/route-path-factory.js deleted file mode 100644 index c022cda..0000000 --- a/node_modules/@nestjs/core/router/route-path-factory.js +++ /dev/null @@ -1,101 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RoutePathFactory = void 0; -const common_1 = require("@nestjs/common"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const utils_1 = require("./utils"); -class RoutePathFactory { - constructor(applicationConfig) { - this.applicationConfig = applicationConfig; - } - create(metadata, requestMethod) { - let paths = ['']; - const versionOrVersions = this.getVersion(metadata); - if (versionOrVersions && - metadata.versioningOptions?.type === common_1.VersioningType.URI) { - const versionPrefix = this.getVersionPrefix(metadata.versioningOptions); - if (Array.isArray(versionOrVersions)) { - paths = (0, common_1.flatten)(paths.map(path => versionOrVersions.map(version => - // Version Neutral - Do not include version in URL - version === common_1.VERSION_NEUTRAL - ? path - : `${path}/${versionPrefix}${version}`))); - } - else { - // Version Neutral - Do not include version in URL - if (versionOrVersions !== common_1.VERSION_NEUTRAL) { - paths = paths.map(path => `${path}/${versionPrefix}${versionOrVersions}`); - } - } - } - paths = this.appendToAllIfDefined(paths, metadata.modulePath); - paths = this.appendToAllIfDefined(paths, metadata.ctrlPath); - paths = this.appendToAllIfDefined(paths, metadata.methodPath); - if (metadata.globalPrefix) { - paths = paths.map(path => { - if (this.isExcludedFromGlobalPrefix(path, requestMethod, versionOrVersions, metadata.versioningOptions)) { - return path; - } - return (0, shared_utils_1.stripEndSlash)(metadata.globalPrefix || '') + path; - }); - } - return paths - .map(path => (0, shared_utils_1.addLeadingSlash)(path || '/')) - .map(path => (path !== '/' ? (0, shared_utils_1.stripEndSlash)(path) : path)); - } - getVersion(metadata) { - // The version will be either the path version or the controller version, - // with the pathVersion taking priority. - return metadata.methodVersion || metadata.controllerVersion; - } - getVersionPrefix(versioningOptions) { - const defaultPrefix = 'v'; - if (versioningOptions.type === common_1.VersioningType.URI) { - if (versioningOptions.prefix === false) { - return ''; - } - else if (versioningOptions.prefix !== undefined) { - return versioningOptions.prefix; - } - } - return defaultPrefix; - } - appendToAllIfDefined(paths, fragmentToAppend) { - if (!fragmentToAppend) { - return paths; - } - const concatPaths = (a, b) => (0, shared_utils_1.stripEndSlash)(a) + (0, shared_utils_1.addLeadingSlash)(b); - if (Array.isArray(fragmentToAppend)) { - const paths2dArray = paths.map(path => fragmentToAppend.map(fragment => concatPaths(path, fragment))); - return (0, common_1.flatten)(paths2dArray); - } - return paths.map(path => concatPaths(path, fragmentToAppend)); - } - isExcludedFromGlobalPrefix(path, requestMethod, versionOrVersions, versioningOptions) { - if ((0, shared_utils_1.isUndefined)(requestMethod)) { - return false; - } - const options = this.applicationConfig.getGlobalPrefixOptions(); - const excludedRoutes = options.exclude; - if (versionOrVersions && - versionOrVersions !== common_1.VERSION_NEUTRAL && - versioningOptions?.type === common_1.VersioningType.URI) { - path = this.truncateVersionPrefixFromPath(path, versionOrVersions, versioningOptions); - } - return (Array.isArray(excludedRoutes) && - (0, utils_1.isRouteExcluded)(excludedRoutes, path, requestMethod)); - } - truncateVersionPrefixFromPath(path, versionValue, versioningOptions) { - if (typeof versionValue !== 'string') { - versionValue.forEach(version => { - if (typeof version === 'string') { - path = this.truncateVersionPrefixFromPath(path, version, versioningOptions); - } - }); - return path; - } - const prefix = `/${this.getVersionPrefix(versioningOptions)}${versionValue}`; - return path.startsWith(prefix) ? path.replace(prefix, '') : path; - } -} -exports.RoutePathFactory = RoutePathFactory; diff --git a/node_modules/@nestjs/core/router/router-exception-filters.d.ts b/node_modules/@nestjs/core/router/router-exception-filters.d.ts deleted file mode 100644 index 58e20dd..0000000 --- a/node_modules/@nestjs/core/router/router-exception-filters.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { HttpServer } from '@nestjs/common'; -import { Controller } from '@nestjs/common/interfaces/controllers/controller.interface'; -import { ApplicationConfig } from '../application-config'; -import { BaseExceptionFilterContext } from '../exceptions/base-exception-filter-context'; -import { ExceptionsHandler } from '../exceptions/exceptions-handler'; -import { NestContainer } from '../injector/container'; -import { RouterProxyCallback } from './router-proxy'; -export declare class RouterExceptionFilters extends BaseExceptionFilterContext { - private readonly config; - private readonly applicationRef; - constructor(container: NestContainer, config: ApplicationConfig, applicationRef: HttpServer); - create(instance: Controller, callback: RouterProxyCallback, moduleKey: string | undefined, contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): ExceptionsHandler; - getGlobalMetadata(contextId?: import("../injector/instance-wrapper").ContextId, inquirerId?: string): T; -} diff --git a/node_modules/@nestjs/core/router/router-exception-filters.js b/node_modules/@nestjs/core/router/router-exception-filters.js deleted file mode 100644 index 605be22..0000000 --- a/node_modules/@nestjs/core/router/router-exception-filters.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RouterExceptionFilters = void 0; -const constants_1 = require("@nestjs/common/constants"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const iterare_1 = require("iterare"); -const base_exception_filter_context_1 = require("../exceptions/base-exception-filter-context"); -const exceptions_handler_1 = require("../exceptions/exceptions-handler"); -const constants_2 = require("../injector/constants"); -class RouterExceptionFilters extends base_exception_filter_context_1.BaseExceptionFilterContext { - constructor(container, config, applicationRef) { - super(container); - this.config = config; - this.applicationRef = applicationRef; - } - create(instance, callback, moduleKey, contextId = constants_2.STATIC_CONTEXT, inquirerId) { - this.moduleContext = moduleKey; - const exceptionHandler = new exceptions_handler_1.ExceptionsHandler(this.applicationRef); - const filters = this.createContext(instance, callback, constants_1.EXCEPTION_FILTERS_METADATA, contextId, inquirerId); - if ((0, shared_utils_1.isEmpty)(filters)) { - return exceptionHandler; - } - exceptionHandler.setCustomFilters(filters.reverse()); - return exceptionHandler; - } - getGlobalMetadata(contextId = constants_2.STATIC_CONTEXT, inquirerId) { - const globalFilters = this.config.getGlobalFilters(); - if (contextId === constants_2.STATIC_CONTEXT && !inquirerId) { - return globalFilters; - } - const scopedFilterWrappers = this.config.getGlobalRequestFilters(); - const scopedFilters = (0, iterare_1.iterate)(scopedFilterWrappers) - .map(wrapper => wrapper.getInstanceByContextId(contextId, inquirerId)) - .filter(host => !!host) - .map(host => host.instance) - .toArray(); - return globalFilters.concat(scopedFilters); - } -} -exports.RouterExceptionFilters = RouterExceptionFilters; diff --git a/node_modules/@nestjs/core/router/router-execution-context.d.ts b/node_modules/@nestjs/core/router/router-execution-context.d.ts deleted file mode 100644 index ee10ab0..0000000 --- a/node_modules/@nestjs/core/router/router-execution-context.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { CanActivate, HttpServer, ParamData, PipeTransform, RequestMethod } from '@nestjs/common'; -import { RouteParamMetadata } from '@nestjs/common/decorators'; -import { RouteParamtypes } from '@nestjs/common/enums/route-paramtypes.enum'; -import { ContextType, Controller } from '@nestjs/common/interfaces'; -import { GuardsConsumer, GuardsContextCreator } from '../guards'; -import { ExecutionContextHost } from '../helpers/execution-context-host'; -import { HandleResponseFn, HandlerMetadata } from '../helpers/handler-metadata-storage'; -import { InterceptorsConsumer } from '../interceptors/interceptors-consumer'; -import { InterceptorsContextCreator } from '../interceptors/interceptors-context-creator'; -import { PipesConsumer } from '../pipes/pipes-consumer'; -import { PipesContextCreator } from '../pipes/pipes-context-creator'; -import { IRouteParamsFactory } from './interfaces/route-params-factory.interface'; -import { CustomHeader, RedirectResponse } from './router-response-controller'; -export interface ParamProperties { - index: number; - type: RouteParamtypes | string; - data: ParamData; - pipes: PipeTransform[]; - extractValue: (req: TRequest, res: TResponse, next: Function) => any; -} -export declare class RouterExecutionContext { - private readonly paramsFactory; - private readonly pipesContextCreator; - private readonly pipesConsumer; - private readonly guardsContextCreator; - private readonly guardsConsumer; - private readonly interceptorsContextCreator; - private readonly interceptorsConsumer; - readonly applicationRef: HttpServer; - private readonly handlerMetadataStorage; - private readonly contextUtils; - private readonly responseController; - constructor(paramsFactory: IRouteParamsFactory, pipesContextCreator: PipesContextCreator, pipesConsumer: PipesConsumer, guardsContextCreator: GuardsContextCreator, guardsConsumer: GuardsConsumer, interceptorsContextCreator: InterceptorsContextCreator, interceptorsConsumer: InterceptorsConsumer, applicationRef: HttpServer); - create(instance: Controller, callback: (...args: any[]) => unknown, methodName: string, moduleKey: string, requestMethod: RequestMethod, contextId?: import("..").ContextId, inquirerId?: string): (req: TRequest, res: TResponse, next: Function) => Promise; - getMetadata(instance: Controller, callback: (...args: any[]) => any, methodName: string, moduleKey: string, requestMethod: RequestMethod, contextType: TContext): HandlerMetadata; - reflectRedirect(callback: (...args: unknown[]) => unknown): RedirectResponse; - reflectHttpStatusCode(callback: (...args: unknown[]) => unknown): number; - reflectRenderTemplate(callback: (...args: unknown[]) => unknown): string; - reflectResponseHeaders(callback: (...args: unknown[]) => unknown): CustomHeader[]; - reflectSse(callback: (...args: unknown[]) => unknown): string; - exchangeKeysForValues(keys: string[], metadata: Record, moduleContext: string, contextId?: import("..").ContextId, inquirerId?: string, contextFactory?: (args: unknown[]) => ExecutionContextHost): ParamProperties[]; - getParamValue(value: T, { metatype, type, data, }: { - metatype: unknown; - type: RouteParamtypes; - data: unknown; - }, pipes: PipeTransform[]): Promise; - isPipeable(type: number | string): boolean; - createGuardsFn(guards: CanActivate[], instance: Controller, callback: (...args: any[]) => any, contextType?: TContext): ((args: any[]) => Promise) | null; - createPipesFn(pipes: PipeTransform[], paramsOptions: (ParamProperties & { - metatype?: any; - })[]): ((args: any[], req: TRequest, res: TResponse, next: Function) => Promise) | null; - createHandleResponseFn(callback: (...args: unknown[]) => unknown, isResponseHandled: boolean, redirectResponse?: RedirectResponse, httpStatusCode?: number): HandleResponseFn; - private isResponseHandled; -} diff --git a/node_modules/@nestjs/core/router/router-execution-context.js b/node_modules/@nestjs/core/router/router-execution-context.js deleted file mode 100644 index 5d99e48..0000000 --- a/node_modules/@nestjs/core/router/router-execution-context.js +++ /dev/null @@ -1,186 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RouterExecutionContext = void 0; -const common_1 = require("@nestjs/common"); -const constants_1 = require("@nestjs/common/constants"); -const route_paramtypes_enum_1 = require("@nestjs/common/enums/route-paramtypes.enum"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const guards_1 = require("../guards"); -const context_utils_1 = require("../helpers/context-utils"); -const handler_metadata_storage_1 = require("../helpers/handler-metadata-storage"); -const constants_2 = require("../injector/constants"); -const router_response_controller_1 = require("./router-response-controller"); -class RouterExecutionContext { - constructor(paramsFactory, pipesContextCreator, pipesConsumer, guardsContextCreator, guardsConsumer, interceptorsContextCreator, interceptorsConsumer, applicationRef) { - this.paramsFactory = paramsFactory; - this.pipesContextCreator = pipesContextCreator; - this.pipesConsumer = pipesConsumer; - this.guardsContextCreator = guardsContextCreator; - this.guardsConsumer = guardsConsumer; - this.interceptorsContextCreator = interceptorsContextCreator; - this.interceptorsConsumer = interceptorsConsumer; - this.applicationRef = applicationRef; - this.handlerMetadataStorage = new handler_metadata_storage_1.HandlerMetadataStorage(); - this.contextUtils = new context_utils_1.ContextUtils(); - this.responseController = new router_response_controller_1.RouterResponseController(applicationRef); - } - create(instance, callback, methodName, moduleKey, requestMethod, contextId = constants_2.STATIC_CONTEXT, inquirerId) { - const contextType = 'http'; - const { argsLength, fnHandleResponse, paramtypes, getParamsMetadata, httpStatusCode, responseHeaders, hasCustomHeaders, } = this.getMetadata(instance, callback, methodName, moduleKey, requestMethod, contextType); - const paramsOptions = this.contextUtils.mergeParamsMetatypes(getParamsMetadata(moduleKey, contextId, inquirerId), paramtypes); - const pipes = this.pipesContextCreator.create(instance, callback, moduleKey, contextId, inquirerId); - const guards = this.guardsContextCreator.create(instance, callback, moduleKey, contextId, inquirerId); - const interceptors = this.interceptorsContextCreator.create(instance, callback, moduleKey, contextId, inquirerId); - const fnCanActivate = this.createGuardsFn(guards, instance, callback, contextType); - const fnApplyPipes = this.createPipesFn(pipes, paramsOptions); - const handler = (args, req, res, next) => async () => { - fnApplyPipes && (await fnApplyPipes(args, req, res, next)); - return callback.apply(instance, args); - }; - return async (req, res, next) => { - const args = this.contextUtils.createNullArray(argsLength); - fnCanActivate && (await fnCanActivate([req, res, next])); - this.responseController.setStatus(res, httpStatusCode); - hasCustomHeaders && - this.responseController.setHeaders(res, responseHeaders); - const result = await this.interceptorsConsumer.intercept(interceptors, [req, res, next], instance, callback, handler(args, req, res, next), contextType); - await fnHandleResponse(result, res, req); - }; - } - getMetadata(instance, callback, methodName, moduleKey, requestMethod, contextType) { - const cacheMetadata = this.handlerMetadataStorage.get(instance, methodName); - if (cacheMetadata) { - return cacheMetadata; - } - const metadata = this.contextUtils.reflectCallbackMetadata(instance, methodName, constants_1.ROUTE_ARGS_METADATA) || {}; - const keys = Object.keys(metadata); - const argsLength = this.contextUtils.getArgumentsLength(keys, metadata); - const paramtypes = this.contextUtils.reflectCallbackParamtypes(instance, methodName); - const contextFactory = this.contextUtils.getContextFactory(contextType, instance, callback); - const getParamsMetadata = (moduleKey, contextId = constants_2.STATIC_CONTEXT, inquirerId) => this.exchangeKeysForValues(keys, metadata, moduleKey, contextId, inquirerId, contextFactory); - const paramsMetadata = getParamsMetadata(moduleKey); - const isResponseHandled = this.isResponseHandled(instance, methodName, paramsMetadata); - const httpRedirectResponse = this.reflectRedirect(callback); - const fnHandleResponse = this.createHandleResponseFn(callback, isResponseHandled, httpRedirectResponse); - const httpCode = this.reflectHttpStatusCode(callback); - const httpStatusCode = httpCode - ? httpCode - : this.responseController.getStatusByMethod(requestMethod); - const responseHeaders = this.reflectResponseHeaders(callback); - const hasCustomHeaders = !(0, shared_utils_1.isEmpty)(responseHeaders); - const handlerMetadata = { - argsLength, - fnHandleResponse, - paramtypes, - getParamsMetadata, - httpStatusCode, - hasCustomHeaders, - responseHeaders, - }; - this.handlerMetadataStorage.set(instance, methodName, handlerMetadata); - return handlerMetadata; - } - reflectRedirect(callback) { - return Reflect.getMetadata(constants_1.REDIRECT_METADATA, callback); - } - reflectHttpStatusCode(callback) { - return Reflect.getMetadata(constants_1.HTTP_CODE_METADATA, callback); - } - reflectRenderTemplate(callback) { - return Reflect.getMetadata(constants_1.RENDER_METADATA, callback); - } - reflectResponseHeaders(callback) { - return Reflect.getMetadata(constants_1.HEADERS_METADATA, callback) || []; - } - reflectSse(callback) { - return Reflect.getMetadata(constants_1.SSE_METADATA, callback); - } - exchangeKeysForValues(keys, metadata, moduleContext, contextId = constants_2.STATIC_CONTEXT, inquirerId, contextFactory) { - this.pipesContextCreator.setModuleContext(moduleContext); - return keys.map(key => { - const { index, data, pipes: pipesCollection } = metadata[key]; - const pipes = this.pipesContextCreator.createConcreteContext(pipesCollection, contextId, inquirerId); - const type = this.contextUtils.mapParamType(key); - if (key.includes(constants_1.CUSTOM_ROUTE_ARGS_METADATA)) { - const { factory } = metadata[key]; - const customExtractValue = this.contextUtils.getCustomFactory(factory, data, contextFactory); - return { index, extractValue: customExtractValue, type, data, pipes }; - } - const numericType = Number(type); - const extractValue = (req, res, next) => this.paramsFactory.exchangeKeyForValue(numericType, data, { - req: req, - res, - next, - }); - return { index, extractValue, type: numericType, data, pipes }; - }); - } - async getParamValue(value, { metatype, type, data, }, pipes) { - if (!(0, shared_utils_1.isEmpty)(pipes)) { - return this.pipesConsumer.apply(value, { metatype, type, data }, pipes); - } - return value; - } - isPipeable(type) { - return (type === route_paramtypes_enum_1.RouteParamtypes.BODY || - type === route_paramtypes_enum_1.RouteParamtypes.RAW_BODY || - type === route_paramtypes_enum_1.RouteParamtypes.QUERY || - type === route_paramtypes_enum_1.RouteParamtypes.PARAM || - type === route_paramtypes_enum_1.RouteParamtypes.FILE || - type === route_paramtypes_enum_1.RouteParamtypes.FILES || - (0, shared_utils_1.isString)(type)); - } - createGuardsFn(guards, instance, callback, contextType) { - const canActivateFn = async (args) => { - const canActivate = await this.guardsConsumer.tryActivate(guards, args, instance, callback, contextType); - if (!canActivate) { - throw new common_1.ForbiddenException(guards_1.FORBIDDEN_MESSAGE); - } - }; - return guards.length ? canActivateFn : null; - } - createPipesFn(pipes, paramsOptions) { - const pipesFn = async (args, req, res, next) => { - const resolveParamValue = async (param) => { - const { index, extractValue, type, data, metatype, pipes: paramPipes, } = param; - const value = extractValue(req, res, next); - args[index] = this.isPipeable(type) - ? await this.getParamValue(value, { metatype, type, data }, pipes.concat(paramPipes)) - : value; - }; - await Promise.all(paramsOptions.map(resolveParamValue)); - }; - return paramsOptions.length ? pipesFn : null; - } - createHandleResponseFn(callback, isResponseHandled, redirectResponse, httpStatusCode) { - const renderTemplate = this.reflectRenderTemplate(callback); - if (renderTemplate) { - return async (result, res) => { - return await this.responseController.render(result, res, renderTemplate); - }; - } - if (redirectResponse && (0, shared_utils_1.isString)(redirectResponse.url)) { - return async (result, res) => { - await this.responseController.redirect(result, res, redirectResponse); - }; - } - const isSseHandler = !!this.reflectSse(callback); - if (isSseHandler) { - return async (result, res, req) => { - await this.responseController.sse(result, res.raw || res, req.raw || req, { additionalHeaders: res.getHeaders?.() }); - }; - } - return async (result, res) => { - result = await this.responseController.transformToResult(result); - !isResponseHandled && - (await this.responseController.apply(result, res, httpStatusCode)); - return res; - }; - } - isResponseHandled(instance, methodName, paramsMetadata) { - const hasResponseOrNextDecorator = paramsMetadata.some(({ type }) => type === route_paramtypes_enum_1.RouteParamtypes.RESPONSE || type === route_paramtypes_enum_1.RouteParamtypes.NEXT); - const isPassthroughEnabled = this.contextUtils.reflectPassthrough(instance, methodName); - return hasResponseOrNextDecorator && !isPassthroughEnabled; - } -} -exports.RouterExecutionContext = RouterExecutionContext; diff --git a/node_modules/@nestjs/core/router/router-explorer.d.ts b/node_modules/@nestjs/core/router/router-explorer.d.ts deleted file mode 100644 index 7ff095b..0000000 --- a/node_modules/@nestjs/core/router/router-explorer.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { HttpServer } from '@nestjs/common'; -import { RequestMethod } from '@nestjs/common/enums'; -import { Controller } from '@nestjs/common/interfaces/controllers/controller.interface'; -import { Type } from '@nestjs/common/interfaces/type.interface'; -import { VersionValue } from '@nestjs/common/interfaces/version-options.interface'; -import { ApplicationConfig } from '../application-config'; -import { NestContainer } from '../injector/container'; -import { Injector } from '../injector/injector'; -import { InstanceWrapper } from '../injector/instance-wrapper'; -import { Module } from '../injector/module'; -import { GraphInspector } from '../inspector/graph-inspector'; -import { MetadataScanner } from '../metadata-scanner'; -import { ExceptionsFilter } from './interfaces/exceptions-filter.interface'; -import { RoutePathMetadata } from './interfaces/route-path-metadata.interface'; -import { RoutePathFactory } from './route-path-factory'; -import { RouterProxy, RouterProxyCallback } from './router-proxy'; -export interface RouteDefinition { - path: string[]; - requestMethod: RequestMethod; - targetCallback: RouterProxyCallback; - methodName: string; - version?: VersionValue; -} -export declare class RouterExplorer { - private readonly container; - private readonly injector; - private readonly routerProxy; - private readonly exceptionsFilter; - private readonly routePathFactory; - private readonly graphInspector; - private readonly executionContextCreator; - private readonly pathsExplorer; - private readonly routerMethodFactory; - private readonly logger; - private readonly exceptionFiltersCache; - constructor(metadataScanner: MetadataScanner, container: NestContainer, injector: Injector, routerProxy: RouterProxy, exceptionsFilter: ExceptionsFilter, config: ApplicationConfig, routePathFactory: RoutePathFactory, graphInspector: GraphInspector); - explore(instanceWrapper: InstanceWrapper, moduleKey: string, httpAdapterRef: T, host: string | RegExp | Array, routePathMetadata: RoutePathMetadata): void; - extractRouterPath(metatype: Type): string[]; - applyPathsToRouterProxy(router: T, routeDefinitions: RouteDefinition[], instanceWrapper: InstanceWrapper, moduleKey: string, routePathMetadata: RoutePathMetadata, host: string | RegExp | Array): void; - private applyCallbackToRouter; - private applyHostFilter; - private applyVersionFilter; - private createCallbackProxy; - createRequestScopedHandler(instanceWrapper: InstanceWrapper, requestMethod: RequestMethod, moduleRef: Module, moduleKey: string, methodName: string): , TResponse>(req: TRequest, res: TResponse, next: () => void) => Promise; - private getContextId; - private copyMetadataToCallback; -} diff --git a/node_modules/@nestjs/core/router/router-explorer.js b/node_modules/@nestjs/core/router/router-explorer.js deleted file mode 100644 index 6a6182f..0000000 --- a/node_modules/@nestjs/core/router/router-explorer.js +++ /dev/null @@ -1,234 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RouterExplorer = void 0; -const constants_1 = require("@nestjs/common/constants"); -const enums_1 = require("@nestjs/common/enums"); -const exceptions_1 = require("@nestjs/common/exceptions"); -const logger_service_1 = require("@nestjs/common/services/logger.service"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const path_to_regexp_1 = require("path-to-regexp"); -const unknown_request_mapping_exception_1 = require("../errors/exceptions/unknown-request-mapping.exception"); -const guards_1 = require("../guards"); -const context_id_factory_1 = require("../helpers/context-id-factory"); -const execution_context_host_1 = require("../helpers/execution-context-host"); -const messages_1 = require("../helpers/messages"); -const router_method_factory_1 = require("../helpers/router-method-factory"); -const constants_2 = require("../injector/constants"); -const interceptors_1 = require("../interceptors"); -const pipes_1 = require("../pipes"); -const paths_explorer_1 = require("./paths-explorer"); -const request_constants_1 = require("./request/request-constants"); -const route_params_factory_1 = require("./route-params-factory"); -const router_execution_context_1 = require("./router-execution-context"); -class RouterExplorer { - constructor(metadataScanner, container, injector, routerProxy, exceptionsFilter, config, routePathFactory, graphInspector) { - this.container = container; - this.injector = injector; - this.routerProxy = routerProxy; - this.exceptionsFilter = exceptionsFilter; - this.routePathFactory = routePathFactory; - this.graphInspector = graphInspector; - this.routerMethodFactory = new router_method_factory_1.RouterMethodFactory(); - this.logger = new logger_service_1.Logger(RouterExplorer.name, { - timestamp: true, - }); - this.exceptionFiltersCache = new WeakMap(); - this.pathsExplorer = new paths_explorer_1.PathsExplorer(metadataScanner); - const routeParamsFactory = new route_params_factory_1.RouteParamsFactory(); - const pipesContextCreator = new pipes_1.PipesContextCreator(container, config); - const pipesConsumer = new pipes_1.PipesConsumer(); - const guardsContextCreator = new guards_1.GuardsContextCreator(container, config); - const guardsConsumer = new guards_1.GuardsConsumer(); - const interceptorsContextCreator = new interceptors_1.InterceptorsContextCreator(container, config); - const interceptorsConsumer = new interceptors_1.InterceptorsConsumer(); - this.executionContextCreator = new router_execution_context_1.RouterExecutionContext(routeParamsFactory, pipesContextCreator, pipesConsumer, guardsContextCreator, guardsConsumer, interceptorsContextCreator, interceptorsConsumer, container.getHttpAdapterRef()); - } - explore(instanceWrapper, moduleKey, httpAdapterRef, host, routePathMetadata) { - const { instance } = instanceWrapper; - const routerPaths = this.pathsExplorer.scanForPaths(instance); - this.applyPathsToRouterProxy(httpAdapterRef, routerPaths, instanceWrapper, moduleKey, routePathMetadata, host); - } - extractRouterPath(metatype) { - const path = Reflect.getMetadata(constants_1.PATH_METADATA, metatype); - if ((0, shared_utils_1.isUndefined)(path)) { - throw new unknown_request_mapping_exception_1.UnknownRequestMappingException(metatype); - } - if (Array.isArray(path)) { - return path.map(p => (0, shared_utils_1.addLeadingSlash)(p)); - } - return [(0, shared_utils_1.addLeadingSlash)(path)]; - } - applyPathsToRouterProxy(router, routeDefinitions, instanceWrapper, moduleKey, routePathMetadata, host) { - (routeDefinitions || []).forEach(routeDefinition => { - const { version: methodVersion } = routeDefinition; - routePathMetadata.methodVersion = methodVersion; - this.applyCallbackToRouter(router, routeDefinition, instanceWrapper, moduleKey, routePathMetadata, host); - }); - } - applyCallbackToRouter(router, routeDefinition, instanceWrapper, moduleKey, routePathMetadata, host) { - const { path: paths, requestMethod, targetCallback, methodName, } = routeDefinition; - const { instance } = instanceWrapper; - const routerMethodRef = this.routerMethodFactory - .get(router, requestMethod) - .bind(router); - const isRequestScoped = !instanceWrapper.isDependencyTreeStatic(); - const proxy = isRequestScoped - ? this.createRequestScopedHandler(instanceWrapper, requestMethod, this.container.getModuleByKey(moduleKey), moduleKey, methodName) - : this.createCallbackProxy(instance, targetCallback, methodName, moduleKey, requestMethod); - const isVersioned = (routePathMetadata.methodVersion || - routePathMetadata.controllerVersion) && - routePathMetadata.versioningOptions; - let routeHandler = this.applyHostFilter(host, proxy); - paths.forEach(path => { - if (isVersioned && - routePathMetadata.versioningOptions.type !== enums_1.VersioningType.URI) { - // All versioning (except for URI Versioning) is done via the "Version Filter" - routeHandler = this.applyVersionFilter(router, routePathMetadata, routeHandler); - } - routePathMetadata.methodPath = path; - const pathsToRegister = this.routePathFactory.create(routePathMetadata, requestMethod); - pathsToRegister.forEach(path => { - const entrypointDefinition = { - type: 'http-endpoint', - methodName, - className: instanceWrapper.name, - classNodeId: instanceWrapper.id, - metadata: { - key: path, - path, - requestMethod: enums_1.RequestMethod[requestMethod], - methodVersion: routePathMetadata.methodVersion, - controllerVersion: routePathMetadata.controllerVersion, - }, - }; - this.copyMetadataToCallback(targetCallback, routeHandler); - const normalizedPath = router.normalizePath - ? router.normalizePath(path) - : path; - const httpAdapter = this.container.getHttpAdapterRef(); - const onRouteTriggered = httpAdapter.getOnRouteTriggered?.(); - if (onRouteTriggered) { - routerMethodRef(normalizedPath, (...args) => { - onRouteTriggered(requestMethod, path); - return routeHandler(...args); - }); - } - else { - routerMethodRef(normalizedPath, routeHandler); - } - this.graphInspector.insertEntrypointDefinition(entrypointDefinition, instanceWrapper.id); - }); - const pathsToLog = this.routePathFactory.create({ - ...routePathMetadata, - versioningOptions: undefined, - }, requestMethod); - pathsToLog.forEach(path => { - if (isVersioned) { - const version = this.routePathFactory.getVersion(routePathMetadata); - this.logger.log((0, messages_1.VERSIONED_ROUTE_MAPPED_MESSAGE)(path, requestMethod, version)); - } - else { - this.logger.log((0, messages_1.ROUTE_MAPPED_MESSAGE)(path, requestMethod)); - } - }); - }); - } - applyHostFilter(host, handler) { - if (!host) { - return handler; - } - const httpAdapterRef = this.container.getHttpAdapterRef(); - const hosts = Array.isArray(host) ? host : [host]; - const hostRegExps = hosts.map((host) => { - if (typeof host === 'string') { - try { - return (0, path_to_regexp_1.pathToRegexp)(host); - } - catch (e) { - if (e instanceof TypeError) { - this.logger.error(`Unsupported host "${host}" syntax. In past releases, ?, *, and + were used to denote optional or repeating path parameters. The latest version of "path-to-regexp" now requires the use of named parameters. For example, instead of using a route like /users/* to capture all routes starting with "/users", you should use /users/*path. Please see the migration guide for more information.`); - } - throw e; - } - } - return { regexp: host, keys: [] }; - }); - const unsupportedFilteringErrorMessage = Array.isArray(host) - ? `HTTP adapter does not support filtering on hosts: ["${host.join('", "')}"]` - : `HTTP adapter does not support filtering on host: "${host}"`; - return (req, res, next) => { - req.hosts = {}; - const hostname = httpAdapterRef.getRequestHostname(req) || ''; - for (const exp of hostRegExps) { - const match = hostname.match(exp.regexp); - if (match) { - if (exp.keys.length > 0) { - exp.keys.forEach((key, i) => (req.hosts[key.name] = match[i + 1])); - } - else if (exp.regexp && match.groups) { - for (const groupName in match.groups) { - req.hosts[groupName] = match.groups[groupName]; - } - } - return handler(req, res, next); - } - } - if (!next) { - throw new exceptions_1.InternalServerErrorException(unsupportedFilteringErrorMessage); - } - return next(); - }; - } - applyVersionFilter(router, routePathMetadata, handler) { - const version = this.routePathFactory.getVersion(routePathMetadata); - return router.applyVersionFilter(handler, version, routePathMetadata.versioningOptions); - } - createCallbackProxy(instance, callback, methodName, moduleRef, requestMethod, contextId = constants_2.STATIC_CONTEXT, inquirerId) { - const executionContext = this.executionContextCreator.create(instance, callback, methodName, moduleRef, requestMethod, contextId, inquirerId); - const exceptionFilter = this.exceptionsFilter.create(instance, callback, moduleRef, contextId, inquirerId); - return this.routerProxy.createProxy(executionContext, exceptionFilter); - } - createRequestScopedHandler(instanceWrapper, requestMethod, moduleRef, moduleKey, methodName) { - const { instance } = instanceWrapper; - const collection = moduleRef.controllers; - const isTreeDurable = instanceWrapper.isDependencyTreeDurable(); - return async (req, res, next) => { - try { - const contextId = this.getContextId(req, isTreeDurable); - const contextInstance = await this.injector.loadPerContext(instance, moduleRef, collection, contextId); - await this.createCallbackProxy(contextInstance, contextInstance[methodName], methodName, moduleKey, requestMethod, contextId, instanceWrapper.id)(req, res, next); - } - catch (err) { - let exceptionFilter = this.exceptionFiltersCache.get(instance[methodName]); - if (!exceptionFilter) { - exceptionFilter = this.exceptionsFilter.create(instance, instance[methodName], moduleKey); - this.exceptionFiltersCache.set(instance[methodName], exceptionFilter); - } - const host = new execution_context_host_1.ExecutionContextHost([req, res, next]); - exceptionFilter.next(err, host); - } - }; - } - getContextId(request, isTreeDurable) { - const contextId = context_id_factory_1.ContextIdFactory.getByRequest(request); - if (!request[request_constants_1.REQUEST_CONTEXT_ID]) { - Object.defineProperty(request, request_constants_1.REQUEST_CONTEXT_ID, { - value: contextId, - enumerable: false, - writable: false, - configurable: false, - }); - const requestProviderValue = isTreeDurable - ? contextId.payload - : Object.assign(request, contextId.payload); - this.container.registerRequestProvider(requestProviderValue, contextId); - } - return contextId; - } - copyMetadataToCallback(originalCallback, targetCallback) { - for (const key of Reflect.getMetadataKeys(originalCallback)) { - Reflect.defineMetadata(key, Reflect.getMetadata(key, originalCallback), targetCallback); - } - } -} -exports.RouterExplorer = RouterExplorer; diff --git a/node_modules/@nestjs/core/router/router-module.d.ts b/node_modules/@nestjs/core/router/router-module.d.ts deleted file mode 100644 index 1f5c8e7..0000000 --- a/node_modules/@nestjs/core/router/router-module.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { DynamicModule } from '@nestjs/common'; -import { Module as ModuleClass } from '../injector/module'; -import { ModulesContainer } from '../injector/modules-container'; -import { Routes } from './interfaces'; -export declare const ROUTES: unique symbol; -export declare const targetModulesByContainer: WeakMap>; -/** - * @publicApi - */ -export declare class RouterModule { - private readonly modulesContainer; - private readonly routes; - constructor(modulesContainer: ModulesContainer, routes: Routes); - static register(routes: Routes): DynamicModule; - private deepCloneRoutes; - private initialize; - private registerModulePathMetadata; - private updateTargetModulesCache; -} diff --git a/node_modules/@nestjs/core/router/router-module.js b/node_modules/@nestjs/core/router/router-module.js deleted file mode 100644 index 27c9dc9..0000000 --- a/node_modules/@nestjs/core/router/router-module.js +++ /dev/null @@ -1,80 +0,0 @@ -"use strict"; -var RouterModule_1; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RouterModule = exports.targetModulesByContainer = exports.ROUTES = void 0; -const tslib_1 = require("tslib"); -const common_1 = require("@nestjs/common"); -const constants_1 = require("@nestjs/common/constants"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const modules_container_1 = require("../injector/modules-container"); -const utils_1 = require("./utils"); -exports.ROUTES = Symbol('ROUTES'); -exports.targetModulesByContainer = new WeakMap(); -/** - * @publicApi - */ -let RouterModule = RouterModule_1 = class RouterModule { - constructor(modulesContainer, routes) { - this.modulesContainer = modulesContainer; - this.routes = routes; - this.routes = this.deepCloneRoutes(routes); - this.initialize(); - } - static register(routes) { - return { - module: RouterModule_1, - providers: [ - { - provide: exports.ROUTES, - useValue: routes, - }, - ], - }; - } - deepCloneRoutes(routes) { - return routes.map((routeOrType) => { - if (typeof routeOrType === 'function') { - return routeOrType; - } - if (routeOrType.children) { - return { - ...routeOrType, - children: this.deepCloneRoutes(routeOrType.children), - }; - } - return { ...routeOrType }; - }); - } - initialize() { - const flattenedRoutes = (0, utils_1.flattenRoutePaths)(this.routes); - flattenedRoutes.forEach(route => { - const modulePath = (0, shared_utils_1.normalizePath)(route.path); - this.registerModulePathMetadata(route.module, modulePath); - this.updateTargetModulesCache(route.module); - }); - } - registerModulePathMetadata(moduleCtor, modulePath) { - Reflect.defineMetadata(constants_1.MODULE_PATH + this.modulesContainer.applicationId, modulePath, moduleCtor); - } - updateTargetModulesCache(moduleCtor) { - let moduleClassSet; - if (exports.targetModulesByContainer.has(this.modulesContainer)) { - moduleClassSet = exports.targetModulesByContainer.get(this.modulesContainer); - } - else { - moduleClassSet = new WeakSet(); - exports.targetModulesByContainer.set(this.modulesContainer, moduleClassSet); - } - const moduleRef = Array.from(this.modulesContainer.values()).find(item => item?.metatype === moduleCtor); - if (!moduleRef) { - return; - } - moduleClassSet.add(moduleRef); - } -}; -exports.RouterModule = RouterModule; -exports.RouterModule = RouterModule = RouterModule_1 = tslib_1.__decorate([ - (0, common_1.Module)({}), - tslib_1.__param(1, (0, common_1.Inject)(exports.ROUTES)), - tslib_1.__metadata("design:paramtypes", [modules_container_1.ModulesContainer, Array]) -], RouterModule); diff --git a/node_modules/@nestjs/core/router/router-proxy.d.ts b/node_modules/@nestjs/core/router/router-proxy.d.ts deleted file mode 100644 index 0cfdbcc..0000000 --- a/node_modules/@nestjs/core/router/router-proxy.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ExceptionsHandler } from '../exceptions/exceptions-handler'; -export type RouterProxyCallback = (req: TRequest, res: TResponse, next: () => void) => void | Promise; -export declare class RouterProxy { - createProxy(targetCallback: RouterProxyCallback, exceptionsHandler: ExceptionsHandler): (req: TRequest, res: TResponse, next: () => void) => Promise; - createExceptionLayerProxy(targetCallback: (err: TError, req: TRequest, res: TResponse, next: () => void) => void | Promise, exceptionsHandler: ExceptionsHandler): (err: TError, req: TRequest, res: TResponse, next: () => void) => Promise; -} diff --git a/node_modules/@nestjs/core/router/router-proxy.js b/node_modules/@nestjs/core/router/router-proxy.js deleted file mode 100644 index 1bf1577..0000000 --- a/node_modules/@nestjs/core/router/router-proxy.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RouterProxy = void 0; -const execution_context_host_1 = require("../helpers/execution-context-host"); -class RouterProxy { - createProxy(targetCallback, exceptionsHandler) { - return async (req, res, next) => { - try { - await targetCallback(req, res, next); - } - catch (e) { - const host = new execution_context_host_1.ExecutionContextHost([req, res, next]); - exceptionsHandler.next(e, host); - return res; - } - }; - } - createExceptionLayerProxy(targetCallback, exceptionsHandler) { - return async (err, req, res, next) => { - try { - await targetCallback(err, req, res, next); - } - catch (e) { - const host = new execution_context_host_1.ExecutionContextHost([req, res, next]); - exceptionsHandler.next(e, host); - return res; - } - }; - } -} -exports.RouterProxy = RouterProxy; diff --git a/node_modules/@nestjs/core/router/router-response-controller.d.ts b/node_modules/@nestjs/core/router/router-response-controller.d.ts deleted file mode 100644 index cb712d8..0000000 --- a/node_modules/@nestjs/core/router/router-response-controller.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { HttpServer, RequestMethod } from '@nestjs/common'; -import { IncomingMessage } from 'http'; -import { Observable } from 'rxjs'; -import { AdditionalHeaders, WritableHeaderStream } from './sse-stream'; -export interface CustomHeader { - name: string; - value: string | (() => string); -} -export interface RedirectResponse { - url: string; - statusCode?: number; -} -export declare class RouterResponseController { - private readonly applicationRef; - private readonly logger; - constructor(applicationRef: HttpServer); - apply(result: TInput, response: TResponse, httpStatusCode?: number): Promise; - redirect(resultOrDeferred: TInput, response: TResponse, redirectResponse: RedirectResponse): Promise; - render(resultOrDeferred: TInput, response: TResponse, template: string): Promise; - transformToResult(resultOrDeferred: any): Promise; - getStatusByMethod(requestMethod: RequestMethod): number; - setHeaders(response: TResponse, headers: CustomHeader[]): void; - setStatus(response: TResponse, statusCode: number): void; - sse = any, TResponse extends WritableHeaderStream = any, TRequest extends IncomingMessage = any>(result: TInput | Promise, response: TResponse, request: TRequest, options?: { - additionalHeaders: AdditionalHeaders; - }): Promise; - private assertObservable; -} diff --git a/node_modules/@nestjs/core/router/router-response-controller.js b/node_modules/@nestjs/core/router/router-response-controller.js deleted file mode 100644 index e1d73e8..0000000 --- a/node_modules/@nestjs/core/router/router-response-controller.js +++ /dev/null @@ -1,98 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RouterResponseController = void 0; -const common_1 = require("@nestjs/common"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const rxjs_1 = require("rxjs"); -const operators_1 = require("rxjs/operators"); -const sse_stream_1 = require("./sse-stream"); -class RouterResponseController { - constructor(applicationRef) { - this.applicationRef = applicationRef; - this.logger = new common_1.Logger(RouterResponseController.name); - } - async apply(result, response, httpStatusCode) { - return this.applicationRef.reply(response, result, httpStatusCode); - } - async redirect(resultOrDeferred, response, redirectResponse) { - const result = await this.transformToResult(resultOrDeferred); - const statusCode = result && result.statusCode - ? result.statusCode - : redirectResponse.statusCode - ? redirectResponse.statusCode - : common_1.HttpStatus.FOUND; - const url = result && result.url ? result.url : redirectResponse.url; - this.applicationRef.redirect(response, statusCode, url); - } - async render(resultOrDeferred, response, template) { - const result = await this.transformToResult(resultOrDeferred); - return this.applicationRef.render(response, template, result); - } - async transformToResult(resultOrDeferred) { - if ((0, rxjs_1.isObservable)(resultOrDeferred)) { - return (0, rxjs_1.lastValueFrom)(resultOrDeferred); - } - return resultOrDeferred; - } - getStatusByMethod(requestMethod) { - switch (requestMethod) { - case common_1.RequestMethod.POST: - return common_1.HttpStatus.CREATED; - default: - return common_1.HttpStatus.OK; - } - } - setHeaders(response, headers) { - headers.forEach(({ name, value }) => this.applicationRef.setHeader(response, name, typeof value === 'function' ? value() : value)); - } - setStatus(response, statusCode) { - this.applicationRef.status(response, statusCode); - } - async sse(result, response, request, options) { - // It's possible that we sent headers already so don't use a stream - if (response.writableEnded) { - return; - } - const observableResult = await Promise.resolve(result); - this.assertObservable(observableResult); - const stream = new sse_stream_1.SseStream(request); - // Extract custom status code from response if it was set - const customStatusCode = response.statusCode; - const pipeOptions = typeof customStatusCode !== 'undefined' - ? { ...options, statusCode: customStatusCode } - : options; - stream.pipe(response, pipeOptions); - const subscription = observableResult - .pipe((0, operators_1.map)((message) => { - if ((0, shared_utils_1.isObject)(message)) { - return message; - } - return { data: message }; - }), (0, operators_1.concatMap)(message => new Promise(resolve => stream.writeMessage(message, () => resolve()))), (0, operators_1.catchError)(err => { - const data = err instanceof Error ? err.message : err; - stream.writeMessage({ type: 'error', data }, writeError => { - if (writeError) { - this.logger.error(writeError); - } - }); - return rxjs_1.EMPTY; - })) - .subscribe({ - complete: () => { - response.end(); - }, - }); - request.on('close', () => { - subscription.unsubscribe(); - if (!stream.writableEnded) { - stream.end(); - } - }); - } - assertObservable(value) { - if (!(0, rxjs_1.isObservable)(value)) { - throw new ReferenceError('You must return an Observable stream to use Server-Sent Events (SSE).'); - } - } -} -exports.RouterResponseController = RouterResponseController; diff --git a/node_modules/@nestjs/core/router/routes-resolver.d.ts b/node_modules/@nestjs/core/router/routes-resolver.d.ts deleted file mode 100644 index b9d6865..0000000 --- a/node_modules/@nestjs/core/router/routes-resolver.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Controller, HttpServer } from '@nestjs/common/interfaces'; -import { ApplicationConfig } from '../application-config'; -import { NestContainer } from '../injector/container'; -import { Injector } from '../injector/injector'; -import { InstanceWrapper } from '../injector/instance-wrapper'; -import { GraphInspector } from '../inspector/graph-inspector'; -import { Resolver } from './interfaces/resolver.interface'; -export declare class RoutesResolver implements Resolver { - private readonly container; - private readonly applicationConfig; - private readonly injector; - private readonly logger; - private readonly routerProxy; - private readonly routePathFactory; - private readonly routerExceptionsFilter; - private readonly routerExplorer; - constructor(container: NestContainer, applicationConfig: ApplicationConfig, injector: Injector, graphInspector: GraphInspector); - resolve(applicationRef: T, globalPrefix: string): void; - registerRouters(routes: Map>, moduleName: string, globalPrefix: string, modulePath: string, applicationRef: HttpServer): void; - registerNotFoundHandler(): void; - registerExceptionHandler(): void; - mapExternalException(err: any): any; - private isHttpFastifyError; - private getModulePathMetadata; - private getHostMetadata; - private getVersionMetadata; -} diff --git a/node_modules/@nestjs/core/router/routes-resolver.js b/node_modules/@nestjs/core/router/routes-resolver.js deleted file mode 100644 index 55d31ee..0000000 --- a/node_modules/@nestjs/core/router/routes-resolver.js +++ /dev/null @@ -1,129 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RoutesResolver = void 0; -const common_1 = require("@nestjs/common"); -const constants_1 = require("@nestjs/common/constants"); -const logger_service_1 = require("@nestjs/common/services/logger.service"); -const messages_1 = require("../helpers/messages"); -const metadata_scanner_1 = require("../metadata-scanner"); -const route_path_factory_1 = require("./route-path-factory"); -const router_exception_filters_1 = require("./router-exception-filters"); -const router_explorer_1 = require("./router-explorer"); -const router_proxy_1 = require("./router-proxy"); -class RoutesResolver { - constructor(container, applicationConfig, injector, graphInspector) { - this.container = container; - this.applicationConfig = applicationConfig; - this.injector = injector; - this.logger = new logger_service_1.Logger(RoutesResolver.name, { - timestamp: true, - }); - this.routerProxy = new router_proxy_1.RouterProxy(); - const httpAdapterRef = container.getHttpAdapterRef(); - this.routerExceptionsFilter = new router_exception_filters_1.RouterExceptionFilters(container, applicationConfig, httpAdapterRef); - this.routePathFactory = new route_path_factory_1.RoutePathFactory(this.applicationConfig); - const metadataScanner = new metadata_scanner_1.MetadataScanner(); - this.routerExplorer = new router_explorer_1.RouterExplorer(metadataScanner, this.container, this.injector, this.routerProxy, this.routerExceptionsFilter, this.applicationConfig, this.routePathFactory, graphInspector); - } - resolve(applicationRef, globalPrefix) { - const modules = this.container.getModules(); - modules.forEach(({ controllers, metatype }, moduleName) => { - const modulePath = this.getModulePathMetadata(metatype); - this.registerRouters(controllers, moduleName, globalPrefix, modulePath, applicationRef); - }); - } - registerRouters(routes, moduleName, globalPrefix, modulePath, applicationRef) { - routes.forEach(instanceWrapper => { - const { metatype } = instanceWrapper; - const host = this.getHostMetadata(metatype); - const routerPaths = this.routerExplorer.extractRouterPath(metatype); - const controllerVersion = this.getVersionMetadata(metatype); - const controllerName = metatype.name; - routerPaths.forEach(path => { - const pathsToLog = this.routePathFactory.create({ - ctrlPath: path, - modulePath, - globalPrefix, - }); - if (!controllerVersion) { - pathsToLog.forEach(path => { - const logMessage = (0, messages_1.CONTROLLER_MAPPING_MESSAGE)(controllerName, path); - this.logger.log(logMessage); - }); - } - else { - pathsToLog.forEach(path => { - const logMessage = (0, messages_1.VERSIONED_CONTROLLER_MAPPING_MESSAGE)(controllerName, path, controllerVersion); - this.logger.log(logMessage); - }); - } - const versioningOptions = this.applicationConfig.getVersioning(); - const routePathMetadata = { - ctrlPath: path, - modulePath, - globalPrefix, - controllerVersion, - versioningOptions, - }; - this.routerExplorer.explore(instanceWrapper, moduleName, applicationRef, host, routePathMetadata); - }); - }); - } - registerNotFoundHandler() { - const applicationRef = this.container.getHttpAdapterRef(); - const callback = (req, res) => { - const method = applicationRef.getRequestMethod(req); - const url = applicationRef.getRequestUrl(req); - throw new common_1.NotFoundException(`Cannot ${method} ${url}`); - }; - const handler = this.routerExceptionsFilter.create({}, callback, undefined); - const proxy = this.routerProxy.createProxy(callback, handler); - applicationRef.setNotFoundHandler && - applicationRef.setNotFoundHandler(proxy, this.applicationConfig.getGlobalPrefix()); - } - registerExceptionHandler() { - const callback = (err, req, res, next) => { - throw this.mapExternalException(err); - }; - const handler = this.routerExceptionsFilter.create({}, callback, undefined); - const proxy = this.routerProxy.createExceptionLayerProxy(callback, handler); - const applicationRef = this.container.getHttpAdapterRef(); - applicationRef.setErrorHandler && - applicationRef.setErrorHandler(proxy, this.applicationConfig.getGlobalPrefix()); - } - mapExternalException(err) { - switch (true) { - // SyntaxError is thrown by Express body-parser when given invalid JSON (#422, #430) - // URIError is thrown by Express when given a path parameter with an invalid percentage - // encoding, e.g. '%FF' (#8915) - case err instanceof SyntaxError || err instanceof URIError: - return new common_1.BadRequestException(err.message); - case this.isHttpFastifyError(err): - return new common_1.HttpException(err.message, err.statusCode); - default: - return err; - } - } - isHttpFastifyError(error) { - // condition based on this code - https://github.com/fastify/fastify-error/blob/d669b150a82968322f9f7be992b2f6b463272de3/index.js#L22 - return (error.statusCode !== undefined && - error instanceof Error && - error.name === 'FastifyError'); - } - getModulePathMetadata(metatype) { - const modulesContainer = this.container.getModules(); - const modulePath = Reflect.getMetadata(constants_1.MODULE_PATH + modulesContainer.applicationId, metatype); - return modulePath ?? Reflect.getMetadata(constants_1.MODULE_PATH, metatype); - } - getHostMetadata(metatype) { - return Reflect.getMetadata(constants_1.HOST_METADATA, metatype); - } - getVersionMetadata(metatype) { - const versioningConfig = this.applicationConfig.getVersioning(); - if (versioningConfig) { - return (Reflect.getMetadata(constants_1.VERSION_METADATA, metatype) ?? - versioningConfig.defaultVersion); - } - } -} -exports.RoutesResolver = RoutesResolver; diff --git a/node_modules/@nestjs/core/router/sse-stream.d.ts b/node_modules/@nestjs/core/router/sse-stream.d.ts deleted file mode 100644 index e1a9cd8..0000000 --- a/node_modules/@nestjs/core/router/sse-stream.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { MessageEvent } from '@nestjs/common/interfaces'; -import { IncomingMessage, OutgoingHttpHeaders } from 'http'; -import { Transform } from 'stream'; -export type AdditionalHeaders = Record; -interface ReadHeaders { - getHeaders?(): AdditionalHeaders; -} -interface WriteHeaders { - writableEnded?: boolean; - writeHead?(statusCode: number, reasonPhrase?: string, headers?: OutgoingHttpHeaders): void; - writeHead?(statusCode: number, headers?: OutgoingHttpHeaders): void; - flushHeaders?(): void; -} -export type WritableHeaderStream = NodeJS.WritableStream & WriteHeaders; -export type HeaderStream = WritableHeaderStream & ReadHeaders; -/** - * Adapted from https://raw.githubusercontent.com/EventSource/node-ssestream - * Transforms "messages" to W3C event stream content. - * See https://html.spec.whatwg.org/multipage/server-sent-events.html - * A message is an object with one or more of the following properties: - * - data (String or object, which gets turned into JSON) - * - type - * - id - * - retry - * - * If constructed with a HTTP Request, it will optimise the socket for streaming. - * If this stream is piped to an HTTP Response, it will set appropriate headers. - */ -export declare class SseStream extends Transform { - private lastEventId; - constructor(req?: IncomingMessage); - pipe(destination: T, options?: { - additionalHeaders?: AdditionalHeaders; - statusCode?: number; - end?: boolean; - }): T; - _transform(message: MessageEvent, encoding: string, callback: (error?: Error | null, data?: any) => void): void; - /** - * Calls `.write` but handles the drain if needed - */ - writeMessage(message: MessageEvent, cb: (error: Error | null | undefined) => void): void; -} -export {}; diff --git a/node_modules/@nestjs/core/router/sse-stream.js b/node_modules/@nestjs/core/router/sse-stream.js deleted file mode 100644 index 4651402..0000000 --- a/node_modules/@nestjs/core/router/sse-stream.js +++ /dev/null @@ -1,83 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SseStream = void 0; -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const stream_1 = require("stream"); -function toDataString(data) { - if ((0, shared_utils_1.isObject)(data)) { - return toDataString(JSON.stringify(data)); - } - return data - .split(/\r\n|\r|\n/) - .map(line => `data: ${line}\n`) - .join(''); -} -/** - * Adapted from https://raw.githubusercontent.com/EventSource/node-ssestream - * Transforms "messages" to W3C event stream content. - * See https://html.spec.whatwg.org/multipage/server-sent-events.html - * A message is an object with one or more of the following properties: - * - data (String or object, which gets turned into JSON) - * - type - * - id - * - retry - * - * If constructed with a HTTP Request, it will optimise the socket for streaming. - * If this stream is piped to an HTTP Response, it will set appropriate headers. - */ -class SseStream extends stream_1.Transform { - constructor(req) { - super({ objectMode: true }); - this.lastEventId = null; - if (req && req.socket) { - req.socket.setKeepAlive(true); - req.socket.setNoDelay(true); - req.socket.setTimeout(0); - } - } - pipe(destination, options) { - if (destination.writeHead) { - const statusCode = options?.statusCode ?? 200; - destination.writeHead(statusCode, { - ...options?.additionalHeaders, - // See https://github.com/dunglas/mercure/blob/master/hub/subscribe.go#L124-L130 - 'Content-Type': 'text/event-stream', - Connection: 'keep-alive', - // Disable cache, even for old browsers and proxies - 'Cache-Control': 'private, no-cache, no-store, must-revalidate, max-age=0, no-transform', - Pragma: 'no-cache', - Expire: '0', - // NGINX support https://www.nginx.com/resources/wiki/start/topics/examples/x-accel/#x-accel-buffering - 'X-Accel-Buffering': 'no', - }); - destination.flushHeaders?.(); - } - destination.write('\n'); - return super.pipe(destination, options); - } - _transform(message, encoding, callback) { - let data = message.type ? `event: ${message.type}\n` : ''; - data += message.id ? `id: ${message.id}\n` : ''; - data += message.retry ? `retry: ${message.retry}\n` : ''; - data += message.data ? toDataString(message.data) : ''; - data += '\n'; - this.push(data); - callback(); - } - /** - * Calls `.write` but handles the drain if needed - */ - writeMessage(message, cb) { - if (!message.id) { - this.lastEventId++; - message.id = this.lastEventId.toString(); - } - if (!this.write(message, 'utf-8')) { - this.once('drain', cb); - } - else { - process.nextTick(cb); - } - } -} -exports.SseStream = SseStream; diff --git a/node_modules/@nestjs/core/router/utils/exclude-route.util.d.ts b/node_modules/@nestjs/core/router/utils/exclude-route.util.d.ts deleted file mode 100644 index 1c76db5..0000000 --- a/node_modules/@nestjs/core/router/utils/exclude-route.util.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { RequestMethod } from '@nestjs/common'; -import { ExcludeRouteMetadata } from '../interfaces/exclude-route-metadata.interface'; -export declare const isRequestMethodAll: (method: RequestMethod) => boolean; -export declare function isRouteExcluded(excludedRoutes: ExcludeRouteMetadata[], path: string, requestMethod?: RequestMethod): boolean; diff --git a/node_modules/@nestjs/core/router/utils/exclude-route.util.js b/node_modules/@nestjs/core/router/utils/exclude-route.util.js deleted file mode 100644 index 2d341e4..0000000 --- a/node_modules/@nestjs/core/router/utils/exclude-route.util.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isRequestMethodAll = void 0; -exports.isRouteExcluded = isRouteExcluded; -const common_1 = require("@nestjs/common"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const isRequestMethodAll = (method) => { - return common_1.RequestMethod.ALL === method || method === -1; -}; -exports.isRequestMethodAll = isRequestMethodAll; -function isRouteExcluded(excludedRoutes, path, requestMethod) { - return excludedRoutes.some(route => { - if ((0, exports.isRequestMethodAll)(route.requestMethod) || - route.requestMethod === requestMethod) { - return route.pathRegex.exec((0, shared_utils_1.addLeadingSlash)(path)); - } - return false; - }); -} diff --git a/node_modules/@nestjs/core/router/utils/flatten-route-paths.util.d.ts b/node_modules/@nestjs/core/router/utils/flatten-route-paths.util.d.ts deleted file mode 100644 index 1ba9ad1..0000000 --- a/node_modules/@nestjs/core/router/utils/flatten-route-paths.util.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Type } from '@nestjs/common'; -import { Routes } from '../interfaces/routes.interface'; -export declare function flattenRoutePaths(routes: Routes): { - module: Type; - path: string; -}[]; diff --git a/node_modules/@nestjs/core/router/utils/flatten-route-paths.util.js b/node_modules/@nestjs/core/router/utils/flatten-route-paths.util.js deleted file mode 100644 index 4f0e3a9..0000000 --- a/node_modules/@nestjs/core/router/utils/flatten-route-paths.util.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.flattenRoutePaths = flattenRoutePaths; -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -function flattenRoutePaths(routes) { - const result = []; - routes.forEach(item => { - if (item.module && item.path) { - result.push({ module: item.module, path: item.path }); - } - if (item.children) { - const childrenRef = item.children; - childrenRef.forEach(child => { - if (!(0, shared_utils_1.isString)(child) && (0, shared_utils_1.isString)(child.path)) { - child.path = (0, shared_utils_1.normalizePath)((0, shared_utils_1.normalizePath)(item.path) + (0, shared_utils_1.normalizePath)(child.path)); - } - else { - result.push({ path: item.path, module: child }); - } - }); - result.push(...flattenRoutePaths(childrenRef)); - } - }); - return result; -} diff --git a/node_modules/@nestjs/core/router/utils/index.d.ts b/node_modules/@nestjs/core/router/utils/index.d.ts deleted file mode 100644 index a3524ed..0000000 --- a/node_modules/@nestjs/core/router/utils/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './exclude-route.util'; -export * from './flatten-route-paths.util'; diff --git a/node_modules/@nestjs/core/router/utils/index.js b/node_modules/@nestjs/core/router/utils/index.js deleted file mode 100644 index 6ac6c86..0000000 --- a/node_modules/@nestjs/core/router/utils/index.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./exclude-route.util"), exports); -tslib_1.__exportStar(require("./flatten-route-paths.util"), exports); diff --git a/node_modules/@nestjs/core/scanner.d.ts b/node_modules/@nestjs/core/scanner.d.ts deleted file mode 100644 index 970bd95..0000000 --- a/node_modules/@nestjs/core/scanner.d.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { DynamicModule, ForwardReference, Provider } from '@nestjs/common'; -import { EnhancerSubtype } from '@nestjs/common/constants'; -import { ClassProvider, Controller, ExistingProvider, FactoryProvider, Injectable, Type, ValueProvider } from '@nestjs/common/interfaces'; -import { ApplicationConfig } from './application-config'; -import { NestContainer } from './injector/container'; -import { InstanceWrapper } from './injector/instance-wrapper'; -import { Module } from './injector/module'; -import { GraphInspector } from './inspector/graph-inspector'; -import { ModuleDefinition } from './interfaces/module-definition.interface'; -import { ModuleOverride } from './interfaces/module-override.interface'; -import { MetadataScanner } from './metadata-scanner'; -interface ModulesScanParameters { - moduleDefinition: ModuleDefinition; - scope?: Type[]; - ctxRegistry?: (ForwardReference | DynamicModule | Type)[]; - overrides?: ModuleOverride[]; - lazy?: boolean; -} -export declare class DependenciesScanner { - private readonly container; - private readonly metadataScanner; - private readonly graphInspector; - private readonly applicationConfig; - private readonly applicationProvidersApplyMap; - constructor(container: NestContainer, metadataScanner: MetadataScanner, graphInspector: GraphInspector, applicationConfig?: ApplicationConfig); - scan(module: Type, options?: { - overrides?: ModuleOverride[]; - }): Promise; - scanForModules({ moduleDefinition, lazy, scope, ctxRegistry, overrides, }: ModulesScanParameters): Promise; - insertModule(moduleDefinition: any, scope: Type[]): Promise<{ - moduleRef: Module; - inserted: boolean; - } | undefined>; - scanModulesForDependencies(modules?: Map): Promise; - reflectImports(module: Type, token: string, context: string): Promise; - reflectProviders(module: Type, token: string): void; - reflectControllers(module: Type, token: string): void; - reflectDynamicMetadata(cls: Type, token: string): void; - reflectExports(module: Type, token: string): void; - reflectInjectables(component: Type, token: string, metadataKey: string): void; - reflectParamInjectables(component: Type, token: string, metadataKey: string): void; - reflectKeyMetadata(component: Type, key: string, methodKey: string): { - methodKey: string; - metadata: any; - } | undefined; - calculateModulesDistance(): void; - insertImport(related: any, token: string, context: string): Promise; - isCustomProvider(provider: Provider): provider is ClassProvider | ValueProvider | FactoryProvider | ExistingProvider; - insertProvider(provider: Provider, token: string): string | symbol | Function | InstanceWrapper | undefined; - insertInjectable(injectable: Type | object, token: string, host: Type, subtype: EnhancerSubtype, methodKey?: string): InstanceWrapper | undefined; - insertExportedProviderOrModule(toExport: ForwardReference | DynamicModule | Type, token: string): void; - insertController(controller: Type, token: string): void; - private insertOrOverrideModule; - private getOverrideModuleByModule; - private overrideModule; - reflectMetadata(metadataKey: string, metatype: Type): T[]; - registerCoreModule(overrides?: ModuleOverride[]): Promise; - /** - * Add either request or transient globally scoped enhancers - * to all controllers metadata storage - */ - addScopedEnhancersMetadata(): void; - applyApplicationProviders(): void; - getApplyProvidersMap(): { - [type: string]: Function; - }; - getApplyRequestProvidersMap(): { - [type: string]: Function; - }; - isDynamicModule(module: Type | DynamicModule): module is DynamicModule; - /** - * @param metatype - * @returns `true` if `metatype` is annotated with the `@Injectable()` decorator. - */ - private isInjectable; - /** - * @param metatype - * @returns `true` if `metatype` is annotated with the `@Controller()` decorator. - */ - private isController; - /** - * @param metatype - * @returns `true` if `metatype` is annotated with the `@Catch()` decorator. - */ - private isExceptionFilter; - private isForwardReference; - private isRequestOrTransient; -} -export {}; diff --git a/node_modules/@nestjs/core/scanner.js b/node_modules/@nestjs/core/scanner.js deleted file mode 100644 index 20247a6..0000000 --- a/node_modules/@nestjs/core/scanner.js +++ /dev/null @@ -1,416 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DependenciesScanner = void 0; -const constants_1 = require("@nestjs/common/constants"); -const interfaces_1 = require("@nestjs/common/interfaces"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const iterare_1 = require("iterare"); -const application_config_1 = require("./application-config"); -const constants_2 = require("./constants"); -const circular_dependency_exception_1 = require("./errors/exceptions/circular-dependency.exception"); -const invalid_class_module_exception_1 = require("./errors/exceptions/invalid-class-module.exception"); -const invalid_module_exception_1 = require("./errors/exceptions/invalid-module.exception"); -const undefined_module_exception_1 = require("./errors/exceptions/undefined-module.exception"); -const get_class_scope_1 = require("./helpers/get-class-scope"); -const internal_core_module_factory_1 = require("./injector/internal-core-module/internal-core-module-factory"); -const topology_tree_1 = require("./injector/topology-tree/topology-tree"); -const uuid_factory_1 = require("./inspector/uuid-factory"); -class DependenciesScanner { - constructor(container, metadataScanner, graphInspector, applicationConfig = new application_config_1.ApplicationConfig()) { - this.container = container; - this.metadataScanner = metadataScanner; - this.graphInspector = graphInspector; - this.applicationConfig = applicationConfig; - this.applicationProvidersApplyMap = []; - } - async scan(module, options) { - await this.registerCoreModule(options?.overrides); - await this.scanForModules({ - moduleDefinition: module, - overrides: options?.overrides, - }); - await this.scanModulesForDependencies(); - this.addScopedEnhancersMetadata(); - // Modules distance calculation should be done after all modules are scanned - // but before global modules are registered (linked to all modules). - // Global modules have their distance set to MAX anyway. - this.calculateModulesDistance(); - this.container.bindGlobalScope(); - } - async scanForModules({ moduleDefinition, lazy, scope = [], ctxRegistry = [], overrides = [], }) { - const { moduleRef: moduleInstance, inserted: moduleInserted } = (await this.insertOrOverrideModule(moduleDefinition, overrides, scope)) ?? - {}; - moduleDefinition = - this.getOverrideModuleByModule(moduleDefinition, overrides)?.newModule ?? - moduleDefinition; - moduleDefinition = - moduleDefinition instanceof Promise - ? await moduleDefinition - : moduleDefinition; - ctxRegistry.push(moduleDefinition); - if (this.isForwardReference(moduleDefinition)) { - moduleDefinition = moduleDefinition.forwardRef(); - } - const modules = !this.isDynamicModule(moduleDefinition) - ? this.reflectMetadata(constants_1.MODULE_METADATA.IMPORTS, moduleDefinition) - : [ - ...this.reflectMetadata(constants_1.MODULE_METADATA.IMPORTS, moduleDefinition.module), - ...(moduleDefinition.imports || []), - ]; - let registeredModuleRefs = []; - for (const [index, innerModule] of modules.entries()) { - // In case of a circular dependency (ES module system), JavaScript will resolve the type to `undefined`. - if (innerModule === undefined) { - throw new undefined_module_exception_1.UndefinedModuleException(moduleDefinition, index, scope); - } - if (!innerModule) { - throw new invalid_module_exception_1.InvalidModuleException(moduleDefinition, index, scope); - } - if (ctxRegistry.includes(innerModule)) { - continue; - } - const moduleRefs = await this.scanForModules({ - moduleDefinition: innerModule, - scope: [].concat(scope, moduleDefinition), - ctxRegistry, - overrides, - lazy, - }); - registeredModuleRefs = registeredModuleRefs.concat(moduleRefs); - } - if (!moduleInstance) { - return registeredModuleRefs; - } - if (lazy && moduleInserted) { - this.container.bindGlobalsToImports(moduleInstance); - } - return [moduleInstance].concat(registeredModuleRefs); - } - async insertModule(moduleDefinition, scope) { - const moduleToAdd = this.isForwardReference(moduleDefinition) - ? moduleDefinition.forwardRef() - : moduleDefinition; - if (this.isInjectable(moduleToAdd) || - this.isController(moduleToAdd) || - this.isExceptionFilter(moduleToAdd)) { - throw new invalid_class_module_exception_1.InvalidClassModuleException(moduleDefinition, scope); - } - return this.container.addModule(moduleToAdd, scope); - } - async scanModulesForDependencies(modules = this.container.getModules()) { - for (const [token, { metatype }] of modules) { - await this.reflectImports(metatype, token, metatype.name); - this.reflectProviders(metatype, token); - this.reflectControllers(metatype, token); - this.reflectExports(metatype, token); - } - } - async reflectImports(module, token, context) { - const modules = [ - ...this.reflectMetadata(constants_1.MODULE_METADATA.IMPORTS, module), - ...this.container.getDynamicMetadataByToken(token, constants_1.MODULE_METADATA.IMPORTS), - ]; - for (const related of modules) { - await this.insertImport(related, token, context); - } - } - reflectProviders(module, token) { - const providers = [ - ...this.reflectMetadata(constants_1.MODULE_METADATA.PROVIDERS, module), - ...this.container.getDynamicMetadataByToken(token, constants_1.MODULE_METADATA.PROVIDERS), - ]; - providers.forEach(provider => { - this.insertProvider(provider, token); - this.reflectDynamicMetadata(provider, token); - }); - } - reflectControllers(module, token) { - const controllers = [ - ...this.reflectMetadata(constants_1.MODULE_METADATA.CONTROLLERS, module), - ...this.container.getDynamicMetadataByToken(token, constants_1.MODULE_METADATA.CONTROLLERS), - ]; - controllers.forEach(item => { - this.insertController(item, token); - this.reflectDynamicMetadata(item, token); - }); - } - reflectDynamicMetadata(cls, token) { - if (!cls || !cls.prototype) { - return; - } - this.reflectInjectables(cls, token, constants_1.GUARDS_METADATA); - this.reflectInjectables(cls, token, constants_1.INTERCEPTORS_METADATA); - this.reflectInjectables(cls, token, constants_1.EXCEPTION_FILTERS_METADATA); - this.reflectInjectables(cls, token, constants_1.PIPES_METADATA); - this.reflectParamInjectables(cls, token, constants_1.ROUTE_ARGS_METADATA); - } - reflectExports(module, token) { - const exports = [ - ...this.reflectMetadata(constants_1.MODULE_METADATA.EXPORTS, module), - ...this.container.getDynamicMetadataByToken(token, constants_1.MODULE_METADATA.EXPORTS), - ]; - exports.forEach(exportedProvider => this.insertExportedProviderOrModule(exportedProvider, token)); - } - reflectInjectables(component, token, metadataKey) { - const controllerInjectables = this.reflectMetadata(metadataKey, component); - const methodInjectables = this.metadataScanner - .getAllMethodNames(component.prototype) - .reduce((acc, method) => { - const methodInjectable = this.reflectKeyMetadata(component, metadataKey, method); - if (methodInjectable) { - acc.push(methodInjectable); - } - return acc; - }, []); - controllerInjectables.forEach(injectable => this.insertInjectable(injectable, token, component, constants_1.ENHANCER_KEY_TO_SUBTYPE_MAP[metadataKey])); - methodInjectables.forEach(methodInjectable => { - methodInjectable.metadata.forEach(injectable => this.insertInjectable(injectable, token, component, constants_1.ENHANCER_KEY_TO_SUBTYPE_MAP[metadataKey], methodInjectable.methodKey)); - }); - } - reflectParamInjectables(component, token, metadataKey) { - const paramsMethods = this.metadataScanner.getAllMethodNames(component.prototype); - paramsMethods.forEach(methodKey => { - const metadata = Reflect.getMetadata(metadataKey, component, methodKey); - if (!metadata) { - return; - } - const params = Object.values(metadata); - params - .map(item => item.pipes) - .flat(1) - .forEach(injectable => this.insertInjectable(injectable, token, component, 'pipe', methodKey)); - }); - } - reflectKeyMetadata(component, key, methodKey) { - let prototype = component.prototype; - do { - const descriptor = Reflect.getOwnPropertyDescriptor(prototype, methodKey); - if (!descriptor) { - continue; - } - const metadata = Reflect.getMetadata(key, descriptor.value); - if (!metadata) { - return; - } - return { methodKey, metadata }; - } while ((prototype = Reflect.getPrototypeOf(prototype)) && - prototype !== Object.prototype && - prototype); - return undefined; - } - calculateModulesDistance() { - const modulesGenerator = this.container.getModules().values(); - // Skip "InternalCoreModule" - // The second element is the actual root module - modulesGenerator.next(); - const rootModule = modulesGenerator.next().value; - if (!rootModule) { - return; - } - // Convert modules to an acyclic connected graph - const tree = new topology_tree_1.TopologyTree(rootModule); - tree.walk((moduleRef, depth) => { - if (moduleRef.isGlobal) { - return; - } - moduleRef.distance = depth; - }); - } - async insertImport(related, token, context) { - if ((0, shared_utils_1.isUndefined)(related)) { - throw new circular_dependency_exception_1.CircularDependencyException(context); - } - if (this.isForwardReference(related)) { - return this.container.addImport(related.forwardRef(), token); - } - await this.container.addImport(related, token); - } - isCustomProvider(provider) { - return provider && !(0, shared_utils_1.isNil)(provider.provide); - } - insertProvider(provider, token) { - const isCustomProvider = this.isCustomProvider(provider); - if (!isCustomProvider) { - return this.container.addProvider(provider, token); - } - const applyProvidersMap = this.getApplyProvidersMap(); - const providersKeys = Object.keys(applyProvidersMap); - const type = provider.provide; - if (!providersKeys.includes(type)) { - return this.container.addProvider(provider, token); - } - const uuid = uuid_factory_1.UuidFactory.get(type.toString()); - const providerToken = `${type} (UUID: ${uuid})`; - let scope = provider.scope; - if ((0, shared_utils_1.isNil)(scope) && provider.useClass) { - scope = (0, get_class_scope_1.getClassScope)(provider.useClass); - } - this.applicationProvidersApplyMap.push({ - type, - moduleKey: token, - providerKey: providerToken, - scope, - }); - const newProvider = { - ...provider, - provide: providerToken, - scope, - }; - const enhancerSubtype = constants_2.ENHANCER_TOKEN_TO_SUBTYPE_MAP[type]; - const factoryOrClassProvider = newProvider; - if (this.isRequestOrTransient(factoryOrClassProvider.scope)) { - return this.container.addInjectable(newProvider, token, enhancerSubtype); - } - this.container.addProvider(newProvider, token, enhancerSubtype); - } - insertInjectable(injectable, token, host, subtype, methodKey) { - if ((0, shared_utils_1.isFunction)(injectable)) { - const instanceWrapper = this.container.addInjectable(injectable, token, subtype, host); - this.graphInspector.insertEnhancerMetadataCache({ - moduleToken: token, - classRef: host, - enhancerInstanceWrapper: instanceWrapper, - targetNodeId: instanceWrapper.id, - subtype, - methodKey, - }); - return instanceWrapper; - } - else { - this.graphInspector.insertEnhancerMetadataCache({ - moduleToken: token, - classRef: host, - enhancerRef: injectable, - methodKey, - subtype, - }); - } - } - insertExportedProviderOrModule(toExport, token) { - const fulfilledProvider = this.isForwardReference(toExport) - ? toExport.forwardRef() - : toExport; - this.container.addExportedProviderOrModule(fulfilledProvider, token); - } - insertController(controller, token) { - this.container.addController(controller, token); - } - insertOrOverrideModule(moduleDefinition, overrides, scope) { - const overrideModule = this.getOverrideModuleByModule(moduleDefinition, overrides); - if (overrideModule !== undefined) { - return this.overrideModule(moduleDefinition, overrideModule.newModule, scope); - } - return this.insertModule(moduleDefinition, scope); - } - getOverrideModuleByModule(module, overrides) { - if (this.isForwardReference(module)) { - return overrides.find(moduleToOverride => { - return (moduleToOverride.moduleToReplace === module.forwardRef() || - moduleToOverride.moduleToReplace.forwardRef?.() === module.forwardRef()); - }); - } - return overrides.find(moduleToOverride => moduleToOverride.moduleToReplace === module); - } - async overrideModule(moduleToOverride, newModule, scope) { - return this.container.replaceModule(this.isForwardReference(moduleToOverride) - ? moduleToOverride.forwardRef() - : moduleToOverride, this.isForwardReference(newModule) ? newModule.forwardRef() : newModule, scope); - } - reflectMetadata(metadataKey, metatype) { - return Reflect.getMetadata(metadataKey, metatype) || []; - } - async registerCoreModule(overrides) { - const moduleDefinition = internal_core_module_factory_1.InternalCoreModuleFactory.create(this.container, this, this.container.getModuleCompiler(), this.container.getHttpAdapterHostRef(), this.graphInspector, overrides); - const [instance] = await this.scanForModules({ - moduleDefinition, - overrides, - }); - this.container.registerCoreModuleRef(instance); - } - /** - * Add either request or transient globally scoped enhancers - * to all controllers metadata storage - */ - addScopedEnhancersMetadata() { - (0, iterare_1.iterate)(this.applicationProvidersApplyMap) - .filter(wrapper => this.isRequestOrTransient(wrapper.scope)) - .forEach(({ moduleKey, providerKey }) => { - const modulesContainer = this.container.getModules(); - const { injectables } = modulesContainer.get(moduleKey); - const instanceWrapper = injectables.get(providerKey); - const iterableIterator = modulesContainer.values(); - (0, iterare_1.iterate)(iterableIterator) - .map(moduleRef => Array.from(moduleRef.controllers.values()).concat(moduleRef.entryProviders)) - .flatten() - .forEach(controllerOrEntryProvider => controllerOrEntryProvider.addEnhancerMetadata(instanceWrapper)); - }); - } - applyApplicationProviders() { - const applyProvidersMap = this.getApplyProvidersMap(); - const applyRequestProvidersMap = this.getApplyRequestProvidersMap(); - const getInstanceWrapper = (moduleKey, providerKey, collectionKey) => { - const modules = this.container.getModules(); - const collection = modules.get(moduleKey)[collectionKey]; - return collection.get(providerKey); - }; - // Add global enhancers to the application config - this.applicationProvidersApplyMap.forEach(({ moduleKey, providerKey, type, scope }) => { - let instanceWrapper; - if (this.isRequestOrTransient(scope)) { - instanceWrapper = getInstanceWrapper(moduleKey, providerKey, 'injectables'); - this.graphInspector.insertAttachedEnhancer(instanceWrapper); - return applyRequestProvidersMap[type](instanceWrapper); - } - instanceWrapper = getInstanceWrapper(moduleKey, providerKey, 'providers'); - this.graphInspector.insertAttachedEnhancer(instanceWrapper); - applyProvidersMap[type](instanceWrapper.instance); - }); - } - getApplyProvidersMap() { - return { - [constants_2.APP_INTERCEPTOR]: (interceptor) => this.applicationConfig.addGlobalInterceptor(interceptor), - [constants_2.APP_PIPE]: (pipe) => this.applicationConfig.addGlobalPipe(pipe), - [constants_2.APP_GUARD]: (guard) => this.applicationConfig.addGlobalGuard(guard), - [constants_2.APP_FILTER]: (filter) => this.applicationConfig.addGlobalFilter(filter), - }; - } - getApplyRequestProvidersMap() { - return { - [constants_2.APP_INTERCEPTOR]: (interceptor) => this.applicationConfig.addGlobalRequestInterceptor(interceptor), - [constants_2.APP_PIPE]: (pipe) => this.applicationConfig.addGlobalRequestPipe(pipe), - [constants_2.APP_GUARD]: (guard) => this.applicationConfig.addGlobalRequestGuard(guard), - [constants_2.APP_FILTER]: (filter) => this.applicationConfig.addGlobalRequestFilter(filter), - }; - } - isDynamicModule(module) { - return module && !!module.module; - } - /** - * @param metatype - * @returns `true` if `metatype` is annotated with the `@Injectable()` decorator. - */ - isInjectable(metatype) { - return !!Reflect.getMetadata(constants_1.INJECTABLE_WATERMARK, metatype); - } - /** - * @param metatype - * @returns `true` if `metatype` is annotated with the `@Controller()` decorator. - */ - isController(metatype) { - return !!Reflect.getMetadata(constants_1.CONTROLLER_WATERMARK, metatype); - } - /** - * @param metatype - * @returns `true` if `metatype` is annotated with the `@Catch()` decorator. - */ - isExceptionFilter(metatype) { - return !!Reflect.getMetadata(constants_1.CATCH_WATERMARK, metatype); - } - isForwardReference(module) { - return module && !!module.forwardRef; - } - isRequestOrTransient(scope) { - return scope === interfaces_1.Scope.REQUEST || scope === interfaces_1.Scope.TRANSIENT; - } -} -exports.DependenciesScanner = DependenciesScanner; diff --git a/node_modules/@nestjs/core/services/index.d.ts b/node_modules/@nestjs/core/services/index.d.ts deleted file mode 100644 index b81014c..0000000 --- a/node_modules/@nestjs/core/services/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './reflector.service'; diff --git a/node_modules/@nestjs/core/services/index.js b/node_modules/@nestjs/core/services/index.js deleted file mode 100644 index 99f6ba9..0000000 --- a/node_modules/@nestjs/core/services/index.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./reflector.service"), exports); diff --git a/node_modules/@nestjs/core/services/reflector.service.d.ts b/node_modules/@nestjs/core/services/reflector.service.d.ts deleted file mode 100644 index 0c989c7..0000000 --- a/node_modules/@nestjs/core/services/reflector.service.d.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { CustomDecorator, Type } from '@nestjs/common'; -/** - * @publicApi - */ -export interface CreateDecoratorOptions { - /** - * The key for the metadata. - * @default uid(21) - */ - key?: string; - /** - * The transform function to apply to the metadata value. - * @default value => value - */ - transform?: (value: TParam) => TTransformed; -} -type CreateDecoratorWithTransformOptions = CreateDecoratorOptions & Required, 'transform'>>; -/** - * @publicApi - */ -export type ReflectableDecorator = ((opts?: TParam) => CustomDecorator) & { - KEY: string; -}; -/** - * Helper class providing Nest reflection capabilities. - * - * @see [Reflection](https://docs.nestjs.com/guards#putting-it-all-together) - * - * @publicApi - */ -export declare class Reflector { - /** - * Creates a decorator that can be used to decorate classes and methods with metadata. - * Can be used as a strongly-typed alternative to `@SetMetadata`. - * @param options Decorator options. - * @returns A decorator function. - */ - static createDecorator(options?: CreateDecoratorOptions): ReflectableDecorator; - static createDecorator(options: CreateDecoratorWithTransformOptions): ReflectableDecorator; - /** - * Retrieve metadata for a reflectable decorator for a specified target. - * - * @example - * `const roles = this.reflector.get(Roles, context.getHandler());` - * - * @param decorator reflectable decorator created through `Reflector.createDecorator` - * @param target context (decorated object) to retrieve metadata from - * - */ - get>(decorator: T, target: Type | Function): T extends ReflectableDecorator ? R : unknown; - /** - * Retrieve metadata for a specified key for a specified target. - * - * @example - * `const roles = this.reflector.get('roles', context.getHandler());` - * - * @param metadataKey lookup key for metadata to retrieve - * @param target context (decorated object) to retrieve metadata from - * - */ - get(metadataKey: TKey, target: Type | Function): TResult; - /** - * Retrieve metadata for a specified decorator for a specified set of targets. - * - * @param decorator lookup decorator for metadata to retrieve - * @param targets context (decorated objects) to retrieve metadata from - * - */ - getAll(decorator: ReflectableDecorator, targets: (Type | Function)[]): TTransformed extends Array ? TTransformed : TTransformed[]; - /** - * Retrieve metadata for a specified key for a specified set of targets. - * - * @param metadataKey lookup key for metadata to retrieve - * @param targets context (decorated objects) to retrieve metadata from - * - */ - getAll(metadataKey: TKey, targets: (Type | Function)[]): TResult; - /** - * Retrieve metadata for a specified decorator for a specified set of targets and merge results. - * - * @param decorator lookup decorator for metadata to retrieve - * @param targets context (decorated objects) to retrieve metadata from - * - */ - getAllAndMerge(decorator: ReflectableDecorator, targets: (Type | Function)[]): TTransformed extends Array ? TTransformed : TTransformed extends object ? TTransformed : TTransformed[]; - /** - * Retrieve metadata for a specified key for a specified set of targets and merge results. - * - * @param metadataKey lookup key for metadata to retrieve - * @param targets context (decorated objects) to retrieve metadata from - * - */ - getAllAndMerge(metadataKey: TKey, targets: (Type | Function)[]): TResult; - /** - * Retrieve metadata for a specified decorator for a specified set of targets and return a first not undefined value. - * - * @param decorator lookup decorator for metadata to retrieve - * @param targets context (decorated objects) to retrieve metadata from - * - */ - getAllAndOverride(decorator: ReflectableDecorator, targets: (Type | Function)[]): TTransformed; - /** - * Retrieve metadata for a specified key for a specified set of targets and return a first not undefined value. - * - * @param metadataKey lookup key for metadata to retrieve - * @param targets context (decorated objects) to retrieve metadata from - * - */ - getAllAndOverride(metadataKey: TKey, targets: (Type | Function)[]): TResult; -} -export {}; diff --git a/node_modules/@nestjs/core/services/reflector.service.js b/node_modules/@nestjs/core/services/reflector.service.js deleted file mode 100644 index f0f97f4..0000000 --- a/node_modules/@nestjs/core/services/reflector.service.js +++ /dev/null @@ -1,100 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Reflector = void 0; -const common_1 = require("@nestjs/common"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const uid_1 = require("uid"); -/** - * Helper class providing Nest reflection capabilities. - * - * @see [Reflection](https://docs.nestjs.com/guards#putting-it-all-together) - * - * @publicApi - */ -class Reflector { - static createDecorator(options = {}) { - const metadataKey = options.key ?? (0, uid_1.uid)(21); - const decoratorFn = (metadataValue) => (target, key, descriptor) => { - const value = options.transform - ? options.transform(metadataValue) - : metadataValue; - (0, common_1.SetMetadata)(metadataKey, value ?? {})(target, key, descriptor); - }; - decoratorFn.KEY = metadataKey; - return decoratorFn; - } - /** - * Retrieve metadata for a specified key or decorator for a specified target. - * - * @example - * `const roles = this.reflector.get('roles', context.getHandler());` - * - * @param metadataKey lookup key or decorator for metadata to retrieve - * @param target context (decorated object) to retrieve metadata from - * - */ - get(metadataKeyOrDecorator, target) { - const metadataKey = metadataKeyOrDecorator.KEY ?? - metadataKeyOrDecorator; - return Reflect.getMetadata(metadataKey, target); - } - /** - * Retrieve metadata for a specified key or decorator for a specified set of targets. - * - * @param metadataKeyOrDecorator lookup key or decorator for metadata to retrieve - * @param targets context (decorated objects) to retrieve metadata from - * - */ - getAll(metadataKeyOrDecorator, targets) { - return (targets || []).map(target => this.get(metadataKeyOrDecorator, target)); - } - /** - * Retrieve metadata for a specified key or decorator for a specified set of targets and merge results. - * - * @param metadataKeyOrDecorator lookup key for metadata to retrieve - * @param targets context (decorated objects) to retrieve metadata from - * - */ - getAllAndMerge(metadataKeyOrDecorator, targets) { - const metadataCollection = this.getAll(metadataKeyOrDecorator, targets).filter(item => item !== undefined); - if ((0, shared_utils_1.isEmpty)(metadataCollection)) { - return metadataCollection; - } - if (metadataCollection.length === 1) { - const value = metadataCollection[0]; - if ((0, shared_utils_1.isObject)(value)) { - return value; - } - return metadataCollection; - } - return metadataCollection.reduce((a, b) => { - if (Array.isArray(a)) { - return a.concat(b); - } - if ((0, shared_utils_1.isObject)(a) && (0, shared_utils_1.isObject)(b)) { - return { - ...a, - ...b, - }; - } - return [a, b]; - }); - } - /** - * Retrieve metadata for a specified key or decorator for a specified set of targets and return a first not undefined value. - * - * @param metadataKeyOrDecorator lookup key or metadata for metadata to retrieve - * @param targets context (decorated objects) to retrieve metadata from - * - */ - getAllAndOverride(metadataKeyOrDecorator, targets) { - for (const target of targets) { - const result = this.get(metadataKeyOrDecorator, target); - if (result !== undefined) { - return result; - } - } - return undefined; - } -} -exports.Reflector = Reflector; diff --git a/node_modules/@nestjs/core/tsconfig.build.json b/node_modules/@nestjs/core/tsconfig.build.json deleted file mode 100644 index 99c1337..0000000 --- a/node_modules/@nestjs/core/tsconfig.build.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extends": "../tsconfig.build.json", - "compilerOptions": { - "outDir": ".", - "rootDir": ".", - "paths": { - "@nestjs/common": ["../common"], - "@nestjs/common/*": ["../common/*"], - "@nestjs/microservices": ["../microservices"], - "@nestjs/microservices/*": ["../microservices/*"], - "@nestjs/websockets": ["../websockets"], - "@nestjs/websockets/*": ["../websockets/*"] - } - }, - "exclude": ["node_modules", "dist", "test/**/*", "*.spec.ts"], - "references": [ - { - "path": "../common/tsconfig.build.json" - } - ] -} diff --git a/node_modules/@nestjs/event-emitter/.commitlintrc.json b/node_modules/@nestjs/event-emitter/.commitlintrc.json deleted file mode 100644 index 5c5e64d..0000000 --- a/node_modules/@nestjs/event-emitter/.commitlintrc.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": ["@commitlint/config-angular"], - "rules": { - "subject-case": [ - 2, - "always", - ["sentence-case", "start-case", "pascal-case", "upper-case", "lower-case"] - ], - "type-enum": [ - 2, - "always", - [ - "build", - "chore", - "ci", - "docs", - "feat", - "fix", - "perf", - "refactor", - "revert", - "style", - "test", - "sample" - ] - ] - } -} diff --git a/node_modules/@nestjs/event-emitter/.husky/commit-msg b/node_modules/@nestjs/event-emitter/.husky/commit-msg deleted file mode 100644 index d2f293a..0000000 --- a/node_modules/@nestjs/event-emitter/.husky/commit-msg +++ /dev/null @@ -1 +0,0 @@ -npx --no-install commitlint -c --config .commitlintrc.json -E --edit $1 diff --git a/node_modules/@nestjs/event-emitter/.husky/pre-commit b/node_modules/@nestjs/event-emitter/.husky/pre-commit deleted file mode 100644 index 041c660..0000000 --- a/node_modules/@nestjs/event-emitter/.husky/pre-commit +++ /dev/null @@ -1 +0,0 @@ -npx --no-install lint-staged diff --git a/node_modules/@nestjs/event-emitter/.release-it.json b/node_modules/@nestjs/event-emitter/.release-it.json deleted file mode 100644 index 40451bf..0000000 --- a/node_modules/@nestjs/event-emitter/.release-it.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "git": { - "commitMessage": "chore(): release v${version}" - }, - "github": { - "release": true - } -} diff --git a/node_modules/@nestjs/event-emitter/LICENSE b/node_modules/@nestjs/event-emitter/LICENSE deleted file mode 100644 index d26aa19..0000000 --- a/node_modules/@nestjs/event-emitter/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020-2022 Kamil Mysliwiec - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@nestjs/event-emitter/README.md b/node_modules/@nestjs/event-emitter/README.md deleted file mode 100644 index c9f42c2..0000000 --- a/node_modules/@nestjs/event-emitter/README.md +++ /dev/null @@ -1,51 +0,0 @@ -

- Nest Logo -

- -[travis-image]: https://api.travis-ci.org/nestjs/nest.svg?branch=master -[travis-url]: https://travis-ci.org/nestjs/nest -[linux-image]: https://img.shields.io/travis/nestjs/nest/master.svg?label=linux -[linux-url]: https://travis-ci.org/nestjs/nest - -

A progressive Node.js framework for building efficient and scalable server-side applications.

-

-NPM Version -Package License -NPM Downloads -Coverage -Discord -Backers on Open Collective -Sponsors on Open Collective - - -

- - -## Description - -Events module for [Nest](https://github.com/nestjs/nest) built on top of the [eventemitter2](https://github.com/EventEmitter2/EventEmitter2) package. - -## Installation - -```bash -$ npm i --save @nestjs/event-emitter -``` - -## Quick Start - -[Overview & Tutorial](https://docs.nestjs.com/techniques/events) - -## Support - -Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support). - -## Stay in touch - -- Author - [Kamil Myśliwiec](https://twitter.com/kammysliwiec) -- Website - [https://nestjs.com](https://nestjs.com/) -- Twitter - [@nestframework](https://twitter.com/nestframework) - -## License - -Nest is [MIT licensed](LICENSE). diff --git a/node_modules/@nestjs/event-emitter/dist/constants.d.ts b/node_modules/@nestjs/event-emitter/dist/constants.d.ts deleted file mode 100644 index d569ce4..0000000 --- a/node_modules/@nestjs/event-emitter/dist/constants.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare const EVENT_LISTENER_METADATA = "EVENT_LISTENER_METADATA"; -export declare const EVENT_PAYLOAD = "REQUEST"; diff --git a/node_modules/@nestjs/event-emitter/dist/constants.js b/node_modules/@nestjs/event-emitter/dist/constants.js deleted file mode 100644 index ec39316..0000000 --- a/node_modules/@nestjs/event-emitter/dist/constants.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.EVENT_PAYLOAD = exports.EVENT_LISTENER_METADATA = void 0; -const core_1 = require("@nestjs/core"); -exports.EVENT_LISTENER_METADATA = 'EVENT_LISTENER_METADATA'; -exports.EVENT_PAYLOAD = core_1.REQUEST; -//# sourceMappingURL=constants.js.map \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/dist/constants.js.map b/node_modules/@nestjs/event-emitter/dist/constants.js.map deleted file mode 100644 index a7877bc..0000000 --- a/node_modules/@nestjs/event-emitter/dist/constants.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"constants.js","sourceRoot":"","sources":["../lib/constants.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AAE1B,QAAA,uBAAuB,GAAG,yBAAyB,CAAC;AACpD,QAAA,aAAa,GAAG,cAAO,CAAC"} \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/dist/decorators/index.d.ts b/node_modules/@nestjs/event-emitter/dist/decorators/index.d.ts deleted file mode 100644 index dda1a01..0000000 --- a/node_modules/@nestjs/event-emitter/dist/decorators/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './on-event.decorator'; diff --git a/node_modules/@nestjs/event-emitter/dist/decorators/index.js b/node_modules/@nestjs/event-emitter/dist/decorators/index.js deleted file mode 100644 index ae0af34..0000000 --- a/node_modules/@nestjs/event-emitter/dist/decorators/index.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./on-event.decorator"), exports); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/dist/decorators/index.js.map b/node_modules/@nestjs/event-emitter/dist/decorators/index.js.map deleted file mode 100644 index cde4fe3..0000000 --- a/node_modules/@nestjs/event-emitter/dist/decorators/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/decorators/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC"} \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/dist/decorators/on-event.decorator.d.ts b/node_modules/@nestjs/event-emitter/dist/decorators/on-event.decorator.d.ts deleted file mode 100644 index c99ae03..0000000 --- a/node_modules/@nestjs/event-emitter/dist/decorators/on-event.decorator.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { OnEventOptions } from '../interfaces'; -export interface OnEventMetadata { - event: string | symbol | Array; - options?: OnEventOptions; -} -export type OnEventType = string | symbol | Array; -export declare const OnEvent: (event: OnEventType, options?: OnEventOptions) => MethodDecorator; diff --git a/node_modules/@nestjs/event-emitter/dist/decorators/on-event.decorator.js b/node_modules/@nestjs/event-emitter/dist/decorators/on-event.decorator.js deleted file mode 100644 index 7edacc6..0000000 --- a/node_modules/@nestjs/event-emitter/dist/decorators/on-event.decorator.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OnEvent = void 0; -const extend_metadata_util_1 = require("@nestjs/common/utils/extend-metadata.util"); -const constants_1 = require("../constants"); -const OnEvent = (event, options) => { - const decoratorFactory = (target, key, descriptor) => { - (0, extend_metadata_util_1.extendArrayMetadata)(constants_1.EVENT_LISTENER_METADATA, [{ event, options }], descriptor.value); - return descriptor; - }; - decoratorFactory.KEY = constants_1.EVENT_LISTENER_METADATA; - return decoratorFactory; -}; -exports.OnEvent = OnEvent; -//# sourceMappingURL=on-event.decorator.js.map \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/dist/decorators/on-event.decorator.js.map b/node_modules/@nestjs/event-emitter/dist/decorators/on-event.decorator.js.map deleted file mode 100644 index 7d6c9b1..0000000 --- a/node_modules/@nestjs/event-emitter/dist/decorators/on-event.decorator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"on-event.decorator.js","sourceRoot":"","sources":["../../lib/decorators/on-event.decorator.ts"],"names":[],"mappings":";;;AAAA,oFAAgF;AAChF,4CAAuD;AA4BhD,MAAM,OAAO,GAAG,CACrB,KAAkB,EAClB,OAAwB,EACP,EAAE;IACnB,MAAM,gBAAgB,GAAG,CACvB,MAAc,EACd,GAAS,EACT,UAAyC,EACzC,EAAE;QACF,IAAA,0CAAmB,EACjB,mCAAuB,EACvB,CAAC,EAAE,KAAK,EAAE,OAAO,EAAqB,CAAC,EACvC,UAAW,CAAC,KAAgC,CAC7C,CAAC;QACF,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;IACF,gBAAgB,CAAC,GAAG,GAAG,mCAAuB,CAAC;IAC/C,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAlBW,QAAA,OAAO,WAkBlB"} \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/dist/event-emitter-readiness.watcher.d.ts b/node_modules/@nestjs/event-emitter/dist/event-emitter-readiness.watcher.d.ts deleted file mode 100644 index 4bdb427..0000000 --- a/node_modules/@nestjs/event-emitter/dist/event-emitter-readiness.watcher.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare class EventEmitterReadinessWatcher { - private readonly readyPromise; - waitUntilReady(): Promise; - setReady(): void; - setErrored(error: Error): void; -} diff --git a/node_modules/@nestjs/event-emitter/dist/event-emitter-readiness.watcher.js b/node_modules/@nestjs/event-emitter/dist/event-emitter-readiness.watcher.js deleted file mode 100644 index a1d8fc4..0000000 --- a/node_modules/@nestjs/event-emitter/dist/event-emitter-readiness.watcher.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.EventEmitterReadinessWatcher = void 0; -const common_1 = require("@nestjs/common"); -const promise_with_resolvers_1 = require("./utils/promise-with-resolvers"); -let EventEmitterReadinessWatcher = class EventEmitterReadinessWatcher { - constructor() { - this.readyPromise = (0, promise_with_resolvers_1.promiseWithResolvers)(); - } - waitUntilReady() { - return this.readyPromise.promise; - } - setReady() { - this.readyPromise.resolve(); - } - setErrored(error) { - this.readyPromise.reject(error); - } -}; -exports.EventEmitterReadinessWatcher = EventEmitterReadinessWatcher; -exports.EventEmitterReadinessWatcher = EventEmitterReadinessWatcher = __decorate([ - (0, common_1.Injectable)() -], EventEmitterReadinessWatcher); -//# sourceMappingURL=event-emitter-readiness.watcher.js.map \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/dist/event-emitter-readiness.watcher.js.map b/node_modules/@nestjs/event-emitter/dist/event-emitter-readiness.watcher.js.map deleted file mode 100644 index 40588e2..0000000 --- a/node_modules/@nestjs/event-emitter/dist/event-emitter-readiness.watcher.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"event-emitter-readiness.watcher.js","sourceRoot":"","sources":["../lib/event-emitter-readiness.watcher.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAC5C,2EAAsE;AAG/D,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAAlC;QACY,iBAAY,GAAG,IAAA,6CAAoB,GAAE,CAAC;IAazD,CAAC;IAXC,cAAc;QACZ,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC;IACnC,CAAC;IAED,QAAQ;QACN,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;IAC9B,CAAC;IAED,UAAU,CAAC,KAAY;QACrB,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;CACF,CAAA;AAdY,oEAA4B;uCAA5B,4BAA4B;IADxC,IAAA,mBAAU,GAAE;GACA,4BAA4B,CAcxC"} \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/dist/event-emitter.module.d.ts b/node_modules/@nestjs/event-emitter/dist/event-emitter.module.d.ts deleted file mode 100644 index 82c3524..0000000 --- a/node_modules/@nestjs/event-emitter/dist/event-emitter.module.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { DynamicModule } from '@nestjs/common'; -import { EventEmitterModuleOptions } from './interfaces'; -export declare class EventEmitterModule { - static forRoot(options?: EventEmitterModuleOptions): DynamicModule; -} diff --git a/node_modules/@nestjs/event-emitter/dist/event-emitter.module.js b/node_modules/@nestjs/event-emitter/dist/event-emitter.module.js deleted file mode 100644 index 6c0a2bc..0000000 --- a/node_modules/@nestjs/event-emitter/dist/event-emitter.module.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var EventEmitterModule_1; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.EventEmitterModule = void 0; -const common_1 = require("@nestjs/common"); -const core_1 = require("@nestjs/core"); -const eventemitter2_1 = require("eventemitter2"); -const event_emitter_readiness_watcher_1 = require("./event-emitter-readiness.watcher"); -const event_subscribers_loader_1 = require("./event-subscribers.loader"); -const events_metadata_accessor_1 = require("./events-metadata.accessor"); -let EventEmitterModule = EventEmitterModule_1 = class EventEmitterModule { - static forRoot(options) { - return { - global: options?.global ?? true, - module: EventEmitterModule_1, - imports: [core_1.DiscoveryModule], - providers: [ - event_subscribers_loader_1.EventSubscribersLoader, - events_metadata_accessor_1.EventsMetadataAccessor, - event_emitter_readiness_watcher_1.EventEmitterReadinessWatcher, - { - provide: eventemitter2_1.EventEmitter2, - useFactory: () => new eventemitter2_1.EventEmitter2(options), - }, - ], - exports: [eventemitter2_1.EventEmitter2, event_emitter_readiness_watcher_1.EventEmitterReadinessWatcher], - }; - } -}; -exports.EventEmitterModule = EventEmitterModule; -exports.EventEmitterModule = EventEmitterModule = EventEmitterModule_1 = __decorate([ - (0, common_1.Module)({}) -], EventEmitterModule); -//# sourceMappingURL=event-emitter.module.js.map \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/dist/event-emitter.module.js.map b/node_modules/@nestjs/event-emitter/dist/event-emitter.module.js.map deleted file mode 100644 index c5d4b7e..0000000 --- a/node_modules/@nestjs/event-emitter/dist/event-emitter.module.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"event-emitter.module.js","sourceRoot":"","sources":["../lib/event-emitter.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAAuD;AACvD,uCAA+C;AAC/C,iDAA8C;AAC9C,uFAAiF;AACjF,yEAAoE;AACpE,yEAAoE;AAI7D,IAAM,kBAAkB,0BAAxB,MAAM,kBAAkB;IAC7B,MAAM,CAAC,OAAO,CAAC,OAAmC;QAChD,OAAO;YACL,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,IAAI;YAC/B,MAAM,EAAE,oBAAkB;YAC1B,OAAO,EAAE,CAAC,sBAAe,CAAC;YAC1B,SAAS,EAAE;gBACT,iDAAsB;gBACtB,iDAAsB;gBACtB,8DAA4B;gBAC5B;oBACE,OAAO,EAAE,6BAAa;oBACtB,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,6BAAa,CAAC,OAAO,CAAC;iBAC7C;aACF;YACD,OAAO,EAAE,CAAC,6BAAa,EAAE,8DAA4B,CAAC;SACvD,CAAC;IACJ,CAAC;CACF,CAAA;AAlBY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,kBAAkB,CAkB9B"} \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/dist/event-subscribers.loader.d.ts b/node_modules/@nestjs/event-emitter/dist/event-subscribers.loader.d.ts deleted file mode 100644 index 67d11d1..0000000 --- a/node_modules/@nestjs/event-emitter/dist/event-subscribers.loader.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { OnApplicationBootstrap, OnApplicationShutdown } from '@nestjs/common'; -import { DiscoveryService, MetadataScanner, ModuleRef } from '@nestjs/core'; -import { EventEmitter2 } from 'eventemitter2'; -import { EventEmitterReadinessWatcher } from './event-emitter-readiness.watcher'; -import { EventsMetadataAccessor } from './events-metadata.accessor'; -export declare class EventSubscribersLoader implements OnApplicationBootstrap, OnApplicationShutdown { - private readonly discoveryService; - private readonly eventEmitter; - private readonly metadataAccessor; - private readonly metadataScanner; - private readonly moduleRef; - private readonly eventEmitterReadinessWatcher; - private readonly injector; - private readonly logger; - constructor(discoveryService: DiscoveryService, eventEmitter: EventEmitter2, metadataAccessor: EventsMetadataAccessor, metadataScanner: MetadataScanner, moduleRef: ModuleRef, eventEmitterReadinessWatcher: EventEmitterReadinessWatcher); - onApplicationBootstrap(): void; - onApplicationShutdown(): void; - loadEventListeners(): void; - private subscribeToEventIfListener; - private getRegisterListenerMethodBasedOn; - private registerRequestScopedListener; - private getRequestFromEventPayload; - private wrapFunctionInTryCatchBlocks; -} diff --git a/node_modules/@nestjs/event-emitter/dist/event-subscribers.loader.js b/node_modules/@nestjs/event-emitter/dist/event-subscribers.loader.js deleted file mode 100644 index 951261f..0000000 --- a/node_modules/@nestjs/event-emitter/dist/event-subscribers.loader.js +++ /dev/null @@ -1,120 +0,0 @@ -"use strict"; -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.EventSubscribersLoader = void 0; -const common_1 = require("@nestjs/common"); -const core_1 = require("@nestjs/core"); -const injector_1 = require("@nestjs/core/injector/injector"); -const eventemitter2_1 = require("eventemitter2"); -const event_emitter_readiness_watcher_1 = require("./event-emitter-readiness.watcher"); -const events_metadata_accessor_1 = require("./events-metadata.accessor"); -let EventSubscribersLoader = class EventSubscribersLoader { - constructor(discoveryService, eventEmitter, metadataAccessor, metadataScanner, moduleRef, eventEmitterReadinessWatcher) { - this.discoveryService = discoveryService; - this.eventEmitter = eventEmitter; - this.metadataAccessor = metadataAccessor; - this.metadataScanner = metadataScanner; - this.moduleRef = moduleRef; - this.eventEmitterReadinessWatcher = eventEmitterReadinessWatcher; - this.injector = new injector_1.Injector(); - this.logger = new common_1.Logger('Event'); - } - onApplicationBootstrap() { - try { - this.loadEventListeners(); - this.eventEmitterReadinessWatcher.setReady(); - } - catch (e) { - this.eventEmitterReadinessWatcher.setErrored(e); - } - } - onApplicationShutdown() { - this.eventEmitter.removeAllListeners(); - } - loadEventListeners() { - const providers = this.discoveryService.getProviders(); - const controllers = this.discoveryService.getControllers(); - [...providers, ...controllers] - .filter(wrapper => wrapper.instance && !wrapper.isAlias) - .forEach((wrapper) => { - const { instance } = wrapper; - const prototype = Object.getPrototypeOf(instance) || {}; - const isRequestScoped = !wrapper.isDependencyTreeStatic(); - this.metadataScanner.scanFromPrototype(instance, prototype, (methodKey) => this.subscribeToEventIfListener(instance, methodKey, isRequestScoped, wrapper.host)); - }); - } - subscribeToEventIfListener(instance, methodKey, isRequestScoped, moduleRef) { - const eventListenerMetadatas = this.metadataAccessor.getEventHandlerMetadata(instance[methodKey]); - if (!eventListenerMetadatas) { - return; - } - for (const eventListenerMetadata of eventListenerMetadatas) { - const { event, options } = eventListenerMetadata; - const listenerMethod = this.getRegisterListenerMethodBasedOn(options); - if (isRequestScoped) { - this.registerRequestScopedListener({ - event, - eventListenerInstance: instance, - listenerMethod, - listenerMethodKey: methodKey, - moduleRef, - options, - }); - } - else { - listenerMethod(event, (...args) => this.wrapFunctionInTryCatchBlocks(instance, methodKey, args, options), options); - } - } - } - getRegisterListenerMethodBasedOn(options) { - return options?.prependListener - ? this.eventEmitter.prependListener.bind(this.eventEmitter) - : this.eventEmitter.on.bind(this.eventEmitter); - } - registerRequestScopedListener(eventListenerContext) { - const { listenerMethod, event, eventListenerInstance, moduleRef, listenerMethodKey, options, } = eventListenerContext; - listenerMethod(event, async (...args) => { - const request = this.getRequestFromEventPayload(args); - const contextId = core_1.ContextIdFactory.getByRequest({ payload: request }); - this.moduleRef.registerRequestByContextId(request, contextId); - const contextInstance = await this.injector.loadPerContext(eventListenerInstance, moduleRef, moduleRef.providers, contextId); - return this.wrapFunctionInTryCatchBlocks(contextInstance, listenerMethodKey, args, options); - }, options); - } - getRequestFromEventPayload(eventPayload) { - return eventPayload.length > 1 ? eventPayload : eventPayload[0]; - } - async wrapFunctionInTryCatchBlocks(instance, methodKey, args, options) { - try { - return await instance[methodKey].call(instance, ...args); - } - catch (e) { - if (options?.suppressErrors ?? true) { - const error = e; - this.logger.error(error.message, error.stack); - } - else { - throw e; - } - } - } -}; -exports.EventSubscribersLoader = EventSubscribersLoader; -exports.EventSubscribersLoader = EventSubscribersLoader = __decorate([ - (0, common_1.Injectable)(), - __metadata("design:paramtypes", [core_1.DiscoveryService, - eventemitter2_1.EventEmitter2, - events_metadata_accessor_1.EventsMetadataAccessor, - core_1.MetadataScanner, - core_1.ModuleRef, - event_emitter_readiness_watcher_1.EventEmitterReadinessWatcher]) -], EventSubscribersLoader); -//# sourceMappingURL=event-subscribers.loader.js.map \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/dist/event-subscribers.loader.js.map b/node_modules/@nestjs/event-emitter/dist/event-subscribers.loader.js.map deleted file mode 100644 index ee0cce9..0000000 --- a/node_modules/@nestjs/event-emitter/dist/event-subscribers.loader.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"event-subscribers.loader.js","sourceRoot":"","sources":["../lib/event-subscribers.loader.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAKwB;AACxB,uCAKsB;AACtB,6DAA0D;AAG1D,iDAA8C;AAC9C,uFAAiF;AACjF,yEAAoE;AAK7D,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAMjC,YACmB,gBAAkC,EAClC,YAA2B,EAC3B,gBAAwC,EACxC,eAAgC,EAChC,SAAoB,EACpB,4BAA0D;QAL1D,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,iBAAY,GAAZ,YAAY,CAAe;QAC3B,qBAAgB,GAAhB,gBAAgB,CAAwB;QACxC,oBAAe,GAAf,eAAe,CAAiB;QAChC,cAAS,GAAT,SAAS,CAAW;QACpB,iCAA4B,GAA5B,4BAA4B,CAA8B;QAT5D,aAAQ,GAAG,IAAI,mBAAQ,EAAE,CAAC;QAC1B,WAAM,GAAG,IAAI,eAAM,CAAC,OAAO,CAAC,CAAC;IAS3C,CAAC;IAEJ,sBAAsB;QACpB,IAAI,CAAC;YACH,IAAI,CAAC,kBAAkB,EAAE,CAAC;YAC1B,IAAI,CAAC,4BAA4B,CAAC,QAAQ,EAAE,CAAC;QAC/C,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAU,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC;IAED,qBAAqB;QACnB,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE,CAAC;IACzC,CAAC;IAED,kBAAkB;QAChB,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC;QACvD,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC;QAC3D,CAAC,GAAG,SAAS,EAAE,GAAG,WAAW,CAAC;aAC3B,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;aACvD,OAAO,CAAC,CAAC,OAAwB,EAAE,EAAE;YACpC,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;YAC7B,MAAM,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACxD,MAAM,eAAe,GAAG,CAAC,OAAO,CAAC,sBAAsB,EAAE,CAAC;YAC1D,IAAI,CAAC,eAAe,CAAC,iBAAiB,CACpC,QAAQ,EACR,SAAS,EACT,CAAC,SAAiB,EAAE,EAAE,CACpB,IAAI,CAAC,0BAA0B,CAC7B,QAAQ,EACR,SAAS,EACT,eAAe,EACf,OAAO,CAAC,IAAc,CACvB,CACJ,CAAC;QACJ,CAAC,CAAC,CAAC;IACP,CAAC;IAEO,0BAA0B,CAChC,QAA6B,EAC7B,SAAiB,EACjB,eAAwB,EACxB,SAAiB;QAEjB,MAAM,sBAAsB,GAC1B,IAAI,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;QACrE,IAAI,CAAC,sBAAsB,EAAE,CAAC;YAC5B,OAAO;QACT,CAAC;QAED,KAAK,MAAM,qBAAqB,IAAI,sBAAsB,EAAE,CAAC;YAC3D,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,qBAAqB,CAAC;YACjD,MAAM,cAAc,GAAG,IAAI,CAAC,gCAAgC,CAAC,OAAO,CAAC,CAAC;YAEtE,IAAI,eAAe,EAAE,CAAC;gBACpB,IAAI,CAAC,6BAA6B,CAAC;oBACjC,KAAK;oBACL,qBAAqB,EAAE,QAAQ;oBAC/B,cAAc;oBACd,iBAAiB,EAAE,SAAS;oBAC5B,SAAS;oBACT,OAAO;iBACR,CAAC,CAAC;YACL,CAAC;iBAAM,CAAC;gBACN,cAAc,CACZ,KAAK,EACL,CAAC,GAAG,IAAe,EAAE,EAAE,CACrB,IAAI,CAAC,4BAA4B,CAC/B,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,OAAO,CACR,EACH,OAAO,CACR,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAEO,gCAAgC,CAAC,OAAwB;QAC/D,OAAO,OAAO,EAAE,eAAe;YAC7B,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC;YAC3D,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACnD,CAAC;IAEO,6BAA6B,CAAC,oBAOrC;QACC,MAAM,EACJ,cAAc,EACd,KAAK,EACL,qBAAqB,EACrB,SAAS,EACT,iBAAiB,EACjB,OAAO,GACR,GAAG,oBAAoB,CAAC;QAEzB,cAAc,CACZ,KAAK,EACL,KAAK,EAAE,GAAG,IAAe,EAAE,EAAE;YAC3B,MAAM,OAAO,GAAG,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC,CAAC;YACtD,MAAM,SAAS,GAAG,uBAAgB,CAAC,YAAY,CAE7C,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;YAExB,IAAI,CAAC,SAAS,CAAC,0BAA0B,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;YAE9D,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,cAAc,CACxD,qBAAqB,EACrB,SAAS,EACT,SAAS,CAAC,SAAS,EACnB,SAAS,CACV,CAAC;YACF,OAAO,IAAI,CAAC,4BAA4B,CACtC,eAAe,EACf,iBAAiB,EACjB,IAAI,EACJ,OAAO,CACR,CAAC;QACJ,CAAC,EACD,OAAO,CACR,CAAC;IACJ,CAAC;IAEO,0BAA0B,CAAC,YAAuB;QAexD,OAAO,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAClE,CAAC;IAEO,KAAK,CAAC,4BAA4B,CACxC,QAAyD,EACzD,SAAiB,EACjB,IAAe,EACf,OAAwB;QAExB,IAAI,CAAC;YACH,OAAO,MAAM,QAAQ,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,CAAC;QAC3D,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,OAAO,EAAE,cAAc,IAAI,IAAI,EAAE,CAAC;gBACpC,MAAM,KAAK,GAAG,CAAU,CAAC;gBACzB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;YAChD,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,CAAC;YACV,CAAC;QACH,CAAC;IACH,CAAC;CACF,CAAA;AAjLY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;qCAQ0B,uBAAgB;QACpB,6BAAa;QACT,iDAAsB;QACvB,sBAAe;QACrB,gBAAS;QACU,8DAA4B;GAZlE,sBAAsB,CAiLlC"} \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/dist/events-metadata.accessor.d.ts b/node_modules/@nestjs/event-emitter/dist/events-metadata.accessor.d.ts deleted file mode 100644 index 517bebe..0000000 --- a/node_modules/@nestjs/event-emitter/dist/events-metadata.accessor.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Type } from '@nestjs/common'; -import { Reflector } from '@nestjs/core'; -import { OnEventMetadata } from './decorators'; -export declare class EventsMetadataAccessor { - private readonly reflector; - constructor(reflector: Reflector); - getEventHandlerMetadata(target: Type): OnEventMetadata[] | undefined; -} diff --git a/node_modules/@nestjs/event-emitter/dist/events-metadata.accessor.js b/node_modules/@nestjs/event-emitter/dist/events-metadata.accessor.js deleted file mode 100644 index 973f248..0000000 --- a/node_modules/@nestjs/event-emitter/dist/events-metadata.accessor.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.EventsMetadataAccessor = void 0; -const common_1 = require("@nestjs/common"); -const core_1 = require("@nestjs/core"); -const constants_1 = require("./constants"); -let EventsMetadataAccessor = class EventsMetadataAccessor { - constructor(reflector) { - this.reflector = reflector; - } - getEventHandlerMetadata(target) { - if (!target || - (typeof target !== 'function' && typeof target !== 'object')) { - return undefined; - } - const metadata = this.reflector.get(constants_1.EVENT_LISTENER_METADATA, target); - if (!metadata) { - return undefined; - } - return Array.isArray(metadata) ? metadata : [metadata]; - } -}; -exports.EventsMetadataAccessor = EventsMetadataAccessor; -exports.EventsMetadataAccessor = EventsMetadataAccessor = __decorate([ - (0, common_1.Injectable)(), - __metadata("design:paramtypes", [core_1.Reflector]) -], EventsMetadataAccessor); -//# sourceMappingURL=events-metadata.accessor.js.map \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/dist/events-metadata.accessor.js.map b/node_modules/@nestjs/event-emitter/dist/events-metadata.accessor.js.map deleted file mode 100644 index ed6e0a1..0000000 --- a/node_modules/@nestjs/event-emitter/dist/events-metadata.accessor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"events-metadata.accessor.js","sourceRoot":"","sources":["../lib/events-metadata.accessor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAkD;AAClD,uCAAyC;AACzC,2CAAsD;AAI/C,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACjC,YAA6B,SAAoB;QAApB,cAAS,GAAT,SAAS,CAAW;IAAG,CAAC;IAErD,uBAAuB,CACrB,MAAqB;QAIrB,IACE,CAAC,MAAM;YACP,CAAC,OAAO,MAAM,KAAK,UAAU,IAAI,OAAO,MAAM,KAAK,QAAQ,CAAC,EAC5D,CAAC;YACD,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,mCAAuB,EAAE,MAAM,CAAC,CAAC;QACrE,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,OAAO,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACzD,CAAC;CACF,CAAA;AArBY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;qCAE6B,gBAAS;GADtC,sBAAsB,CAqBlC"} \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/dist/index.d.ts b/node_modules/@nestjs/event-emitter/dist/index.d.ts deleted file mode 100644 index b30e805..0000000 --- a/node_modules/@nestjs/event-emitter/dist/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { EventEmitter2 } from 'eventemitter2'; -export { EVENT_PAYLOAD } from './constants'; -export * from './decorators'; -export * from './event-emitter-readiness.watcher'; -export * from './event-emitter.module'; diff --git a/node_modules/@nestjs/event-emitter/dist/index.js b/node_modules/@nestjs/event-emitter/dist/index.js deleted file mode 100644 index de02e5a..0000000 --- a/node_modules/@nestjs/event-emitter/dist/index.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.EVENT_PAYLOAD = exports.EventEmitter2 = void 0; -var eventemitter2_1 = require("eventemitter2"); -Object.defineProperty(exports, "EventEmitter2", { enumerable: true, get: function () { return eventemitter2_1.EventEmitter2; } }); -var constants_1 = require("./constants"); -Object.defineProperty(exports, "EVENT_PAYLOAD", { enumerable: true, get: function () { return constants_1.EVENT_PAYLOAD; } }); -__exportStar(require("./decorators"), exports); -__exportStar(require("./event-emitter-readiness.watcher"), exports); -__exportStar(require("./event-emitter.module"), exports); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/dist/index.js.map b/node_modules/@nestjs/event-emitter/dist/index.js.map deleted file mode 100644 index 5754d89..0000000 --- a/node_modules/@nestjs/event-emitter/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+CAA8C;AAArC,8GAAA,aAAa,OAAA;AACtB,yCAA4C;AAAnC,0GAAA,aAAa,OAAA;AACtB,+CAA6B;AAC7B,oEAAkD;AAClD,yDAAuC"} \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/dist/interfaces/event-emitter-options.interface.d.ts b/node_modules/@nestjs/event-emitter/dist/interfaces/event-emitter-options.interface.d.ts deleted file mode 100644 index 7097682..0000000 --- a/node_modules/@nestjs/event-emitter/dist/interfaces/event-emitter-options.interface.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { ConstructorOptions } from 'eventemitter2'; -export interface EventEmitterModuleOptions extends ConstructorOptions { - global?: boolean; -} diff --git a/node_modules/@nestjs/event-emitter/dist/interfaces/event-emitter-options.interface.js b/node_modules/@nestjs/event-emitter/dist/interfaces/event-emitter-options.interface.js deleted file mode 100644 index 3f74a06..0000000 --- a/node_modules/@nestjs/event-emitter/dist/interfaces/event-emitter-options.interface.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=event-emitter-options.interface.js.map \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/dist/interfaces/event-emitter-options.interface.js.map b/node_modules/@nestjs/event-emitter/dist/interfaces/event-emitter-options.interface.js.map deleted file mode 100644 index 771117b..0000000 --- a/node_modules/@nestjs/event-emitter/dist/interfaces/event-emitter-options.interface.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"event-emitter-options.interface.js","sourceRoot":"","sources":["../../lib/interfaces/event-emitter-options.interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/dist/interfaces/event-payload-host.interface.d.ts b/node_modules/@nestjs/event-emitter/dist/interfaces/event-payload-host.interface.d.ts deleted file mode 100644 index 8d79692..0000000 --- a/node_modules/@nestjs/event-emitter/dist/interfaces/event-payload-host.interface.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type EventPayloadHost = { - payload: T; -}; diff --git a/node_modules/@nestjs/event-emitter/dist/interfaces/event-payload-host.interface.js b/node_modules/@nestjs/event-emitter/dist/interfaces/event-payload-host.interface.js deleted file mode 100644 index 148adad..0000000 --- a/node_modules/@nestjs/event-emitter/dist/interfaces/event-payload-host.interface.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=event-payload-host.interface.js.map \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/dist/interfaces/event-payload-host.interface.js.map b/node_modules/@nestjs/event-emitter/dist/interfaces/event-payload-host.interface.js.map deleted file mode 100644 index 1f4d105..0000000 --- a/node_modules/@nestjs/event-emitter/dist/interfaces/event-payload-host.interface.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"event-payload-host.interface.js","sourceRoot":"","sources":["../../lib/interfaces/event-payload-host.interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/dist/interfaces/index.d.ts b/node_modules/@nestjs/event-emitter/dist/interfaces/index.d.ts deleted file mode 100644 index bcdbc69..0000000 --- a/node_modules/@nestjs/event-emitter/dist/interfaces/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './event-emitter-options.interface'; -export * from './on-event-options.interface'; -export * from './event-payload-host.interface'; diff --git a/node_modules/@nestjs/event-emitter/dist/interfaces/index.js b/node_modules/@nestjs/event-emitter/dist/interfaces/index.js deleted file mode 100644 index a2cd989..0000000 --- a/node_modules/@nestjs/event-emitter/dist/interfaces/index.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./event-emitter-options.interface"), exports); -__exportStar(require("./on-event-options.interface"), exports); -__exportStar(require("./event-payload-host.interface"), exports); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/dist/interfaces/index.js.map b/node_modules/@nestjs/event-emitter/dist/interfaces/index.js.map deleted file mode 100644 index bb30e8d..0000000 --- a/node_modules/@nestjs/event-emitter/dist/interfaces/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oEAAkD;AAClD,+DAA6C;AAC7C,iEAA+C"} \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/dist/interfaces/on-event-options.interface.d.ts b/node_modules/@nestjs/event-emitter/dist/interfaces/on-event-options.interface.d.ts deleted file mode 100644 index b2c4152..0000000 --- a/node_modules/@nestjs/event-emitter/dist/interfaces/on-event-options.interface.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { OnOptions } from 'eventemitter2'; -export type OnEventOptions = OnOptions & { - prependListener?: boolean; - suppressErrors?: boolean; -}; diff --git a/node_modules/@nestjs/event-emitter/dist/interfaces/on-event-options.interface.js b/node_modules/@nestjs/event-emitter/dist/interfaces/on-event-options.interface.js deleted file mode 100644 index f30b26a..0000000 --- a/node_modules/@nestjs/event-emitter/dist/interfaces/on-event-options.interface.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=on-event-options.interface.js.map \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/dist/interfaces/on-event-options.interface.js.map b/node_modules/@nestjs/event-emitter/dist/interfaces/on-event-options.interface.js.map deleted file mode 100644 index fcaa3db..0000000 --- a/node_modules/@nestjs/event-emitter/dist/interfaces/on-event-options.interface.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"on-event-options.interface.js","sourceRoot":"","sources":["../../lib/interfaces/on-event-options.interface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/dist/utils/promise-with-resolvers.d.ts b/node_modules/@nestjs/event-emitter/dist/utils/promise-with-resolvers.d.ts deleted file mode 100644 index 32fef28..0000000 --- a/node_modules/@nestjs/event-emitter/dist/utils/promise-with-resolvers.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare function promiseWithResolvers(): { - promise: Promise; - resolve: () => void; - reject: (reason?: any) => void; -}; diff --git a/node_modules/@nestjs/event-emitter/dist/utils/promise-with-resolvers.js b/node_modules/@nestjs/event-emitter/dist/utils/promise-with-resolvers.js deleted file mode 100644 index 0437115..0000000 --- a/node_modules/@nestjs/event-emitter/dist/utils/promise-with-resolvers.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.promiseWithResolvers = promiseWithResolvers; -function promiseWithResolvers() { - let resolve; - let reject; - const promise = new Promise((res, rej) => { - resolve = res; - reject = rej; - }); - return { promise, resolve, reject }; -} -//# sourceMappingURL=promise-with-resolvers.js.map \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/dist/utils/promise-with-resolvers.js.map b/node_modules/@nestjs/event-emitter/dist/utils/promise-with-resolvers.js.map deleted file mode 100644 index 48a4102..0000000 --- a/node_modules/@nestjs/event-emitter/dist/utils/promise-with-resolvers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"promise-with-resolvers.js","sourceRoot":"","sources":["../../lib/utils/promise-with-resolvers.ts"],"names":[],"mappings":";;AAIA,oDAUC;AAVD,SAAgB,oBAAoB;IAClC,IAAI,OAAmB,CAAC;IACxB,IAAI,MAA8B,CAAC;IACnC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAO,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAC7C,OAAO,GAAG,GAAG,CAAC;QACd,MAAM,GAAG,GAAG,CAAC;IACf,CAAC,CAAC,CAAC;IAGH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;AACtC,CAAC"} \ No newline at end of file diff --git a/node_modules/@nestjs/event-emitter/eslint.config.mjs b/node_modules/@nestjs/event-emitter/eslint.config.mjs deleted file mode 100644 index 829269a..0000000 --- a/node_modules/@nestjs/event-emitter/eslint.config.mjs +++ /dev/null @@ -1,42 +0,0 @@ -// @ts-check -import eslint from '@eslint/js'; -import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; -import globals from 'globals'; -import tseslint from 'typescript-eslint'; - -export default tseslint.config( - { - ignores: ['eslint.config.mjs', 'tests/**/*'], - }, - eslint.configs.recommended, - ...tseslint.configs.recommendedTypeChecked, - eslintPluginPrettierRecommended, - { - languageOptions: { - globals: { - ...globals.node, - ...globals.jest, - }, - ecmaVersion: 5, - sourceType: 'module', - parserOptions: { - projectService: true, - tsconfigRootDir: import.meta.dirname, - }, - }, - }, - { - rules: { - '@typescript-eslint/interface-name-prefix': 'off', - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/no-unsafe-assignment': 'off', - '@typescript-eslint/no-unsafe-return': 'off', - '@typescript-eslint/no-misused-promises': 'off', - '@typescript-eslint/no-unsafe-argument': 'off', - '@typescript-eslint/no-unsafe-call': 'off', - '@typescript-eslint/no-unsafe-member-access': 'off', - }, - }, -); diff --git a/node_modules/@nestjs/event-emitter/package.json b/node_modules/@nestjs/event-emitter/package.json deleted file mode 100644 index 97cd548..0000000 --- a/node_modules/@nestjs/event-emitter/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "@nestjs/event-emitter", - "version": "3.0.1", - "description": "Nest - modern, fast, powerful node.js web framework (@event-emitter)", - "author": "Kamil Mysliwiec", - "license": "MIT", - "url": "https://github.com/nestjs/event-emitter#readme", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", - "scripts": { - "build": "rimraf -rf dist && tsc -p tsconfig.json", - "format": "prettier --write \"{lib,test}/**/*.ts\"", - "lint": "eslint 'lib/**/*.ts' --fix", - "prepublish:npm": "npm run build", - "publish:npm": "npm publish --access public", - "prepublish:next": "npm run build", - "publish:next": "npm publish --access public --tag next", - "test:e2e": "jest --config ./tests/jest-e2e.json --runInBand", - "prerelease": "npm run build", - "release": "release-it", - "prepare": "husky install" - }, - "dependencies": { - "eventemitter2": "6.4.9" - }, - "devDependencies": { - "@commitlint/cli": "19.7.1", - "@commitlint/config-angular": "19.7.1", - "@eslint/js": "9.21.0", - "@nestjs/common": "11.0.10", - "@nestjs/core": "11.0.10", - "@nestjs/platform-express": "11.0.10", - "@nestjs/testing": "11.0.10", - "@types/jest": "29.5.14", - "@types/node": "22.13.5", - "@typescript-eslint/eslint-plugin": "8.24.1", - "@typescript-eslint/parser": "8.24.1", - "eslint": "9.21.0", - "eslint-config-prettier": "10.0.1", - "eslint-plugin-import": "2.31.0", - "eslint-plugin-prettier": "5.2.3", - "husky": "9.1.7", - "jest": "29.7.0", - "lint-staged": "15.4.3", - "prettier": "3.5.2", - "reflect-metadata": "0.2.2", - "release-it": "18.1.2", - "rimraf": "6.0.1", - "rxjs": "7.8.2", - "ts-jest": "29.2.6", - "typescript": "5.7.3", - "typescript-eslint": "8.24.1" - }, - "peerDependencies": { - "@nestjs/common": "^10.0.0 || ^11.0.0", - "@nestjs/core": "^10.0.0 || ^11.0.0" - }, - "lint-staged": { - "*.ts": [ - "prettier --write", - "eslint --fix" - ] - }, - "repository": { - "type": "git", - "url": "https://github.com/nestjs/event-emitter" - } -} diff --git a/node_modules/@nestjs/platform-express/LICENSE b/node_modules/@nestjs/platform-express/LICENSE deleted file mode 100644 index d209764..0000000 --- a/node_modules/@nestjs/platform-express/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2017-present Kamil Mysliwiec - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@nestjs/platform-express/Readme.md b/node_modules/@nestjs/platform-express/Readme.md deleted file mode 100644 index 72d4b89..0000000 --- a/node_modules/@nestjs/platform-express/Readme.md +++ /dev/null @@ -1,146 +0,0 @@ -

- Nest Logo -

- -[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456 -[circleci-url]: https://circleci.com/gh/nestjs/nest - -

A progressive Node.js framework for building efficient and scalable server-side applications.

-

-NPM Version -Package License -NPM Downloads -CircleCI -Discord -Backers on Open Collective -Sponsors on Open Collective - - Support us - -

- - -## Description - -Nest is a framework for building efficient, scalable Node.js server-side applications. It uses modern JavaScript, is built with TypeScript (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming). - -

Under the hood, Nest makes use of Express, but also provides compatibility with a wide range of other libraries, like Fastify, allowing for easy use of the myriad of third-party plugins which are available.

- -## Philosophy - -

In recent years, thanks to Node.js, JavaScript has become the “lingua franca” of the web for both front-end and back-end applications, giving rise to awesome projects like Angular, React, and Vue, which improve developer productivity and enable the construction of fast, testable, and extensible frontend applications. However, on the server-side, while there are a lot of superb libraries, helpers, and tools for Node, none of them effectively solve the main problem - the architecture.

-

Nest aims to provide an application architecture out of the box which allows for effortless creation of highly testable, scalable, and loosely coupled and easily maintainable applications. The architecture is heavily inspired by Angular.

- -## Getting started - -- To check out the [guide](https://docs.nestjs.com), visit [docs.nestjs.com](https://docs.nestjs.com). :books: -- 要查看中文 [指南](readme_zh.md), 请访问 [docs.nestjs.cn](https://docs.nestjs.cn). :books: -- [가이드](readme_kr.md) 문서는 [docs.nestjs.com](https://docs.nestjs.com)에서 확인하실 수 있습니다. :books: -- [ガイド](readme_jp.md)は [docs.nestjs.com](https://docs.nestjs.com)でご確認ください。 :books: - -## Questions - -For questions and support please use the official [Discord channel](https://discord.gg/G7Qnnhy). The issue list of this repo is **exclusively** for bug reports and feature requests. - -## Issues - -Please make sure to read the [Issue Reporting Checklist](https://github.com/nestjs/nest/blob/master/CONTRIBUTING.md#-submitting-an-issue) before opening an issue. Issues not conforming to the guidelines may be closed immediately. - -## Consulting - -With official support, you can get expert help straight from the Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://enterprise.nestjs.com). - -## Support - -Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support from the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support). - -#### Principal Sponsors - - - - - - - - - -
- -#### Gold Sponsors - - - - - - - - - - - - - -
- -#### Silver Sponsors - - - - - - - - - - - - -
- -#### Sponsors - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -## Backers - - - -## Stay in touch - -- Author - [Kamil Myśliwiec](https://x.com/kammysliwiec) -- Website - [https://nestjs.com](https://nestjs.com/) -- X - [@nestframework](https://x.com/nestframework) - -## License - -Nest is [MIT licensed](LICENSE). diff --git a/node_modules/@nestjs/platform-express/adapters/express-adapter.d.ts b/node_modules/@nestjs/platform-express/adapters/express-adapter.d.ts deleted file mode 100644 index 3ce65c5..0000000 --- a/node_modules/@nestjs/platform-express/adapters/express-adapter.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { RequestMethod, VersioningOptions } from '@nestjs/common'; -import { VersionValue } from '@nestjs/common/interfaces'; -import { CorsOptions, CorsOptionsDelegate } from '@nestjs/common/interfaces/external/cors-options.interface'; -import { NestApplicationOptions } from '@nestjs/common/interfaces/nest-application-options.interface'; -import { AbstractHttpAdapter } from '@nestjs/core/adapters/http-adapter'; -import * as express from 'express'; -import type { Server } from 'http'; -import * as http from 'http'; -import * as https from 'https'; -import { NestExpressBodyParserOptions } from '../interfaces/nest-express-body-parser-options.interface'; -import { NestExpressBodyParserType } from '../interfaces/nest-express-body-parser.interface'; -import { ServeStaticOptions } from '../interfaces/serve-static-options.interface'; -type VersionedRoute = = any, TResponse = any>(req: TRequest, res: TResponse, next: () => void) => any; -/** - * @publicApi - */ -export declare class ExpressAdapter extends AbstractHttpAdapter { - private readonly routerMethodFactory; - private readonly logger; - private readonly openConnections; - private onRequestHook?; - private onResponseHook?; - constructor(instance?: any); - setOnRequestHook(onRequestHook: (req: express.Request, res: express.Response, done: () => void) => Promise | void): void; - setOnResponseHook(onResponseHook: (req: express.Request, res: express.Response) => Promise | void): void; - reply(response: any, body: any, statusCode?: number): any; - status(response: any, statusCode: number): any; - end(response: any, message?: string): any; - render(response: any, view: string, options: any): any; - redirect(response: any, statusCode: number, url: string): any; - setErrorHandler(handler: Function, prefix?: string): any; - setNotFoundHandler(handler: Function, prefix?: string): any; - isHeadersSent(response: any): boolean; - getHeader(response: any, name: string): any; - setHeader(response: any, name: string, value: string): any; - appendHeader(response: any, name: string, value: string): any; - normalizePath(path: string): string; - listen(port: string | number, callback?: () => void): Server; - listen(port: string | number, hostname: string, callback?: () => void): Server; - close(): Promise | undefined; - set(...args: any[]): any; - enable(...args: any[]): any; - disable(...args: any[]): any; - engine(...args: any[]): any; - useStaticAssets(path: string, options: ServeStaticOptions): any; - setBaseViewsDir(path: string | string[]): any; - setViewEngine(engine: string): any; - getRequestHostname(request: any): string; - getRequestMethod(request: any): string; - getRequestUrl(request: any): string; - enableCors(options: CorsOptions | CorsOptionsDelegate): any; - createMiddlewareFactory(requestMethod: RequestMethod): (path: string, callback: Function) => any; - initHttpServer(options: NestApplicationOptions): void; - registerParserMiddleware(prefix?: string, rawBody?: boolean): void; - useBodyParser(type: NestExpressBodyParserType, rawBody: boolean, options?: Omit): this; - setLocal(key: string, value: any): this; - getType(): string; - applyVersionFilter(handler: Function, version: VersionValue, versioningOptions: VersioningOptions): VersionedRoute; - private trackOpenConnections; - private closeOpenConnections; - private isMiddlewareApplied; -} -export {}; diff --git a/node_modules/@nestjs/platform-express/adapters/express-adapter.js b/node_modules/@nestjs/platform-express/adapters/express-adapter.js deleted file mode 100644 index fd11a17..0000000 --- a/node_modules/@nestjs/platform-express/adapters/express-adapter.js +++ /dev/null @@ -1,355 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ExpressAdapter = void 0; -const common_1 = require("@nestjs/common"); -const shared_utils_1 = require("@nestjs/common/utils/shared.utils"); -const http_adapter_1 = require("@nestjs/core/adapters/http-adapter"); -const router_method_factory_1 = require("@nestjs/core/helpers/router-method-factory"); -const legacy_route_converter_1 = require("@nestjs/core/router/legacy-route-converter"); -const cors = require("cors"); -const express = require("express"); -const http = require("http"); -const https = require("https"); -const path_to_regexp_1 = require("path-to-regexp"); -const get_body_parser_options_util_1 = require("./utils/get-body-parser-options.util"); -/** - * @publicApi - */ -class ExpressAdapter extends http_adapter_1.AbstractHttpAdapter { - constructor(instance) { - super(instance || express()); - this.routerMethodFactory = new router_method_factory_1.RouterMethodFactory(); - this.logger = new common_1.Logger(ExpressAdapter.name); - this.openConnections = new Set(); - this.instance.use((req, res, next) => { - if (this.onResponseHook) { - res.on('finish', () => { - void this.onResponseHook.apply(this, [req, res]); - }); - } - if (this.onRequestHook) { - void this.onRequestHook.apply(this, [req, res, next]); - } - else { - next(); - } - }); - } - setOnRequestHook(onRequestHook) { - this.onRequestHook = onRequestHook; - } - setOnResponseHook(onResponseHook) { - this.onResponseHook = onResponseHook; - } - reply(response, body, statusCode) { - if (statusCode) { - response.status(statusCode); - } - if ((0, shared_utils_1.isNil)(body)) { - return response.send(); - } - if (body instanceof common_1.StreamableFile) { - const streamHeaders = body.getHeaders(); - if (response.getHeader('Content-Type') === undefined && - streamHeaders.type !== undefined) { - response.setHeader('Content-Type', streamHeaders.type); - } - if (response.getHeader('Content-Disposition') === undefined && - streamHeaders.disposition !== undefined) { - response.setHeader('Content-Disposition', streamHeaders.disposition); - } - if (response.getHeader('Content-Length') === undefined && - streamHeaders.length !== undefined) { - response.setHeader('Content-Length', streamHeaders.length); - } - const stream = body.getStream(); - stream.once('error', err => { - body.errorHandler(err, response); - }); - return stream - .pipe(response) - .on('error', (err) => body.errorLogger(err)); - } - const responseContentType = response.getHeader('Content-Type'); - if (typeof responseContentType === 'string' && - !responseContentType.startsWith('application/json') && - body?.statusCode >= common_1.HttpStatus.BAD_REQUEST) { - this.logger.warn("Content-Type doesn't match Reply body, you might need a custom ExceptionFilter for non-JSON responses"); - response.setHeader('Content-Type', 'application/json'); - } - return (0, shared_utils_1.isObject)(body) ? response.json(body) : response.send(String(body)); - } - status(response, statusCode) { - return response.status(statusCode); - } - end(response, message) { - return response.end(message); - } - render(response, view, options) { - return response.render(view, options); - } - redirect(response, statusCode, url) { - return response.redirect(statusCode, url); - } - setErrorHandler(handler, prefix) { - return this.use(handler); - } - setNotFoundHandler(handler, prefix) { - return this.use(handler); - } - isHeadersSent(response) { - return response.headersSent; - } - getHeader(response, name) { - return response.get(name); - } - setHeader(response, name, value) { - return response.set(name, value); - } - appendHeader(response, name, value) { - return response.append(name, value); - } - normalizePath(path) { - try { - const convertedPath = legacy_route_converter_1.LegacyRouteConverter.tryConvert(path); - // Call "pathToRegexp" to trigger a TypeError if the path is invalid - (0, path_to_regexp_1.pathToRegexp)(convertedPath); - return convertedPath; - } - catch (e) { - if (e instanceof TypeError) { - legacy_route_converter_1.LegacyRouteConverter.printError(path); - } - throw e; - } - } - listen(port, ...args) { - return this.httpServer.listen(port, ...args); - } - close() { - this.closeOpenConnections(); - if (!this.httpServer) { - return undefined; - } - return new Promise(resolve => this.httpServer.close(resolve)); - } - set(...args) { - return this.instance.set(...args); - } - enable(...args) { - return this.instance.enable(...args); - } - disable(...args) { - return this.instance.disable(...args); - } - engine(...args) { - return this.instance.engine(...args); - } - useStaticAssets(path, options) { - if (options && options.prefix) { - return this.use(options.prefix, express.static(path, options)); - } - return this.use(express.static(path, options)); - } - setBaseViewsDir(path) { - return this.set('views', path); - } - setViewEngine(engine) { - return this.set('view engine', engine); - } - getRequestHostname(request) { - return request.hostname; - } - getRequestMethod(request) { - return request.method; - } - getRequestUrl(request) { - return request.originalUrl; - } - enableCors(options) { - return this.use(cors(options)); - } - createMiddlewareFactory(requestMethod) { - return (path, callback) => { - try { - const convertedPath = legacy_route_converter_1.LegacyRouteConverter.tryConvert(path); - return this.routerMethodFactory - .get(this.instance, requestMethod) - .call(this.instance, convertedPath, callback); - } - catch (e) { - if (e instanceof TypeError) { - legacy_route_converter_1.LegacyRouteConverter.printError(path); - } - throw e; - } - }; - } - initHttpServer(options) { - const isHttpsEnabled = options && options.httpsOptions; - if (isHttpsEnabled) { - this.httpServer = https.createServer(options.httpsOptions, this.getInstance()); - } - else { - this.httpServer = http.createServer(this.getInstance()); - } - if (options?.forceCloseConnections) { - this.trackOpenConnections(); - } - } - registerParserMiddleware(prefix, rawBody) { - const bodyParserJsonOptions = (0, get_body_parser_options_util_1.getBodyParserOptions)(rawBody); - const bodyParserUrlencodedOptions = (0, get_body_parser_options_util_1.getBodyParserOptions)(rawBody, { - extended: true, - }); - const parserMiddleware = { - jsonParser: express.json(bodyParserJsonOptions), - urlencodedParser: express.urlencoded(bodyParserUrlencodedOptions), - }; - Object.keys(parserMiddleware) - .filter(parser => !this.isMiddlewareApplied(parser)) - .forEach(parserKey => this.use(parserMiddleware[parserKey])); - } - useBodyParser(type, rawBody, options) { - const parserOptions = (0, get_body_parser_options_util_1.getBodyParserOptions)(rawBody, options); - const parser = express[type](parserOptions); - this.use(parser); - return this; - } - setLocal(key, value) { - this.instance.locals[key] = value; - return this; - } - getType() { - return 'express'; - } - applyVersionFilter(handler, version, versioningOptions) { - const callNextHandler = (req, res, next) => { - if (!next) { - throw new common_1.InternalServerErrorException('HTTP adapter does not support filtering on version'); - } - return next(); - }; - if (version === common_1.VERSION_NEUTRAL || - // URL Versioning is done via the path, so the filter continues forward - versioningOptions.type === common_1.VersioningType.URI) { - const handlerForNoVersioning = (req, res, next) => handler(req, res, next); - return handlerForNoVersioning; - } - // Custom Extractor Versioning Handler - if (versioningOptions.type === common_1.VersioningType.CUSTOM) { - const handlerForCustomVersioning = (req, res, next) => { - const extractedVersion = versioningOptions.extractor(req); - if (Array.isArray(version)) { - if (Array.isArray(extractedVersion) && - version.filter(v => extractedVersion.includes(v)).length) { - return handler(req, res, next); - } - if ((0, shared_utils_1.isString)(extractedVersion) && - version.includes(extractedVersion)) { - return handler(req, res, next); - } - } - else if ((0, shared_utils_1.isString)(version)) { - // Known bug here - if there are multiple versions supported across separate - // handlers/controllers, we can't select the highest matching handler. - // Since this code is evaluated per-handler, then we can't see if the highest - // specified version exists in a different handler. - if (Array.isArray(extractedVersion) && - extractedVersion.includes(version)) { - return handler(req, res, next); - } - if ((0, shared_utils_1.isString)(extractedVersion) && version === extractedVersion) { - return handler(req, res, next); - } - } - return callNextHandler(req, res, next); - }; - return handlerForCustomVersioning; - } - // Media Type (Accept Header) Versioning Handler - if (versioningOptions.type === common_1.VersioningType.MEDIA_TYPE) { - const handlerForMediaTypeVersioning = (req, res, next) => { - const MEDIA_TYPE_HEADER = 'Accept'; - const acceptHeaderValue = req.headers?.[MEDIA_TYPE_HEADER] || - req.headers?.[MEDIA_TYPE_HEADER.toLowerCase()]; - const acceptHeaderVersionParameter = acceptHeaderValue - ? acceptHeaderValue.split(';')[1] - : undefined; - // No version was supplied - if ((0, shared_utils_1.isUndefined)(acceptHeaderVersionParameter)) { - if (Array.isArray(version)) { - if (version.includes(common_1.VERSION_NEUTRAL)) { - return handler(req, res, next); - } - } - } - else { - const headerVersion = acceptHeaderVersionParameter.split(versioningOptions.key)[1]; - if (Array.isArray(version)) { - if (version.includes(headerVersion)) { - return handler(req, res, next); - } - } - else if ((0, shared_utils_1.isString)(version)) { - if (version === headerVersion) { - return handler(req, res, next); - } - } - } - return callNextHandler(req, res, next); - }; - return handlerForMediaTypeVersioning; - } - // Header Versioning Handler - if (versioningOptions.type === common_1.VersioningType.HEADER) { - const handlerForHeaderVersioning = (req, res, next) => { - const customHeaderVersionParameter = req.headers?.[versioningOptions.header] || - req.headers?.[versioningOptions.header.toLowerCase()]; - // No version was supplied - if ((0, shared_utils_1.isUndefined)(customHeaderVersionParameter)) { - if (Array.isArray(version)) { - if (version.includes(common_1.VERSION_NEUTRAL)) { - return handler(req, res, next); - } - } - } - else { - if (Array.isArray(version)) { - if (version.includes(customHeaderVersionParameter)) { - return handler(req, res, next); - } - } - else if ((0, shared_utils_1.isString)(version)) { - if (version === customHeaderVersionParameter) { - return handler(req, res, next); - } - } - } - return callNextHandler(req, res, next); - }; - return handlerForHeaderVersioning; - } - throw new Error('Unsupported versioning options'); - } - trackOpenConnections() { - this.httpServer.on('connection', (socket) => { - this.openConnections.add(socket); - socket.on('close', () => this.openConnections.delete(socket)); - }); - } - closeOpenConnections() { - for (const socket of this.openConnections) { - socket.destroy(); - this.openConnections.delete(socket); - } - } - isMiddlewareApplied(name) { - const app = this.getInstance(); - return (!!app.router && - !!app.router.stack && - (0, shared_utils_1.isFunction)(app.router.stack.filter) && - app.router.stack.some((layer) => layer && layer.handle && layer.handle.name === name)); - } -} -exports.ExpressAdapter = ExpressAdapter; diff --git a/node_modules/@nestjs/platform-express/adapters/index.d.ts b/node_modules/@nestjs/platform-express/adapters/index.d.ts deleted file mode 100644 index 3644487..0000000 --- a/node_modules/@nestjs/platform-express/adapters/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './express-adapter'; diff --git a/node_modules/@nestjs/platform-express/adapters/index.js b/node_modules/@nestjs/platform-express/adapters/index.js deleted file mode 100644 index a379795..0000000 --- a/node_modules/@nestjs/platform-express/adapters/index.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./express-adapter"), exports); diff --git a/node_modules/@nestjs/platform-express/adapters/utils/get-body-parser-options.util.d.ts b/node_modules/@nestjs/platform-express/adapters/utils/get-body-parser-options.util.d.ts deleted file mode 100644 index 6f4d9cf..0000000 --- a/node_modules/@nestjs/platform-express/adapters/utils/get-body-parser-options.util.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { NestExpressBodyParserOptions } from '../../interfaces'; -export declare function getBodyParserOptions(rawBody: boolean, options?: Omit): Options; diff --git a/node_modules/@nestjs/platform-express/adapters/utils/get-body-parser-options.util.js b/node_modules/@nestjs/platform-express/adapters/utils/get-body-parser-options.util.js deleted file mode 100644 index 6d060f5..0000000 --- a/node_modules/@nestjs/platform-express/adapters/utils/get-body-parser-options.util.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getBodyParserOptions = getBodyParserOptions; -const rawBodyParser = (req, _res, buffer) => { - if (Buffer.isBuffer(buffer)) { - req.rawBody = buffer; - } - return true; -}; -function getBodyParserOptions(rawBody, options) { - let parserOptions = (options || {}); - if (rawBody === true) { - parserOptions = { - ...parserOptions, - verify: rawBodyParser, - }; - } - return parserOptions; -} diff --git a/node_modules/@nestjs/platform-express/index.d.ts b/node_modules/@nestjs/platform-express/index.d.ts deleted file mode 100644 index 604e6cb..0000000 --- a/node_modules/@nestjs/platform-express/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './adapters'; -export * from './interfaces'; -export * from './multer'; diff --git a/node_modules/@nestjs/platform-express/index.js b/node_modules/@nestjs/platform-express/index.js deleted file mode 100644 index d6ae1b7..0000000 --- a/node_modules/@nestjs/platform-express/index.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -/* - * Nest @platform-express - * Copyright(c) 2017 - 2025 Kamil Mysliwiec - * https://nestjs.com - * MIT Licensed - */ -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./adapters"), exports); -tslib_1.__exportStar(require("./interfaces"), exports); -tslib_1.__exportStar(require("./multer"), exports); diff --git a/node_modules/@nestjs/platform-express/interfaces/index.d.ts b/node_modules/@nestjs/platform-express/interfaces/index.d.ts deleted file mode 100644 index ac05743..0000000 --- a/node_modules/@nestjs/platform-express/interfaces/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './nest-express-application.interface'; -export { NestExpressBodyParserOptions } from './nest-express-body-parser-options.interface'; -export * from './nest-express-body-parser.interface'; diff --git a/node_modules/@nestjs/platform-express/interfaces/index.js b/node_modules/@nestjs/platform-express/interfaces/index.js deleted file mode 100644 index 91c867f..0000000 --- a/node_modules/@nestjs/platform-express/interfaces/index.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./nest-express-application.interface"), exports); -tslib_1.__exportStar(require("./nest-express-body-parser.interface"), exports); diff --git a/node_modules/@nestjs/platform-express/interfaces/nest-express-application.interface.d.ts b/node_modules/@nestjs/platform-express/interfaces/nest-express-application.interface.d.ts deleted file mode 100644 index 25ffa63..0000000 --- a/node_modules/@nestjs/platform-express/interfaces/nest-express-application.interface.d.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { HttpServer, INestApplication } from '@nestjs/common'; -import type { CorsOptions, CorsOptionsDelegate } from '@nestjs/common/interfaces/external/cors-options.interface'; -import type { Express } from 'express'; -import type { Server as CoreHttpServer } from 'http'; -import type { Server as CoreHttpsServer } from 'https'; -import { NestExpressBodyParserOptions } from './nest-express-body-parser-options.interface'; -import { NestExpressBodyParserType } from './nest-express-body-parser.interface'; -import { ServeStaticOptions } from './serve-static-options.interface'; -/** - * Interface describing methods on NestExpressApplication. - * - * @see [Platform](https://docs.nestjs.com/first-steps#platform) - * - * @publicApi - */ -export interface NestExpressApplication extends INestApplication { - /** - * Returns the underlying HTTP adapter bounded to the Express.js app. - * - * @returns {HttpServer} - */ - getHttpAdapter(): HttpServer; - /** - * Starts the application. - * - * @param {number|string} port - * @param {string} [hostname] - * @param {Function} [callback] Optional callback - * @returns {Promise} A Promise that, when resolved, is a reference to the underlying HttpServer. - */ - listen(port: number | string, callback?: () => void): Promise; - listen(port: number | string, hostname: string, callback?: () => void): Promise; - /** - * A wrapper function around native `express.set()` method. - * - * @example - * app.set('trust proxy', 'loopback') - * - * @returns {this} - */ - set(...args: any[]): this; - /** - * A wrapper function around native `express.engine()` method. - * @example - * app.engine('mustache', mustacheExpress()) - * - * @returns {this} - */ - engine(...args: any[]): this; - /** - * A wrapper function around native `express.enable()` method. - * @example - * app.enable('x-powered-by') - * - * @returns {this} - */ - enable(...args: any[]): this; - /** - * A wrapper function around native `express.disable()` method. - * - * @example - * app.disable('x-powered-by') - * - * @returns {this} - */ - disable(...args: any[]): this; - useStaticAssets(options: ServeStaticOptions): this; - /** - * Sets a base directory for public assets. - * @example - * app.useStaticAssets('public') - * - * @returns {this} - */ - useStaticAssets(path: string, options?: ServeStaticOptions): this; - enableCors(options?: CorsOptions | CorsOptionsDelegate): void; - /** - * Register Express body parsers on the fly. Will respect - * the application's `rawBody` option. - * - * @example - * const app = await NestFactory.create( - * AppModule, - * { rawBody: true } - * ); - * app.useBodyParser('json', { limit: '50mb' }); - * - * @returns {this} - */ - useBodyParser(parser: NestExpressBodyParserType, options?: Omit): this; - /** - * Sets one or multiple base directories for templates (views). - * - * @example - * app.setBaseViewsDir('views') - * - * @returns {this} - */ - setBaseViewsDir(path: string | string[]): this; - /** - * Sets a view engine for templates (views). - * @example - * app.setViewEngine('pug') - * - * @returns {this} - */ - setViewEngine(engine: string): this; - /** - * Sets app-level globals for view templates. - * - * @example - * app.setLocal('title', 'My Site') - * - * @see https://expressjs.com/en/4x/api.html#app.locals - * - * @returns {this} - */ - setLocal(key: string, value: any): this; -} diff --git a/node_modules/@nestjs/platform-express/interfaces/nest-express-application.interface.js b/node_modules/@nestjs/platform-express/interfaces/nest-express-application.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/platform-express/interfaces/nest-express-application.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/platform-express/interfaces/nest-express-body-parser-options.interface.d.ts b/node_modules/@nestjs/platform-express/interfaces/nest-express-body-parser-options.interface.d.ts deleted file mode 100644 index 8120be3..0000000 --- a/node_modules/@nestjs/platform-express/interfaces/nest-express-body-parser-options.interface.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { IncomingMessage } from 'http'; -/** - * Type alias to keep compatibility with @types/body-parser - * @see https://github.com/DefinitelyTyped/DefinitelyTyped/blob/dcd1673c4fa18a15ea8cd8ff8af7d563bb6dc8e6/types/body-parser/index.d.ts#L48-L66#L48-L66 - * @publicApi - */ -export interface NestExpressBodyParserOptions { - /** When set to true, then deflated (compressed) bodies will be inflated; when false, deflated bodies are rejected. Defaults to true. */ - inflate?: boolean | undefined; - /** - * Controls the maximum request body size. If this is a number, - * then the value specifies the number of bytes; if it is a string, - * the value is passed to the bytes library for parsing. Defaults to '100kb'. - */ - limit?: number | string | undefined; - /** - * The type option is used to determine what media type the middleware will parse - */ - type?: string | string[] | ((req: IncomingMessage) => any) | undefined; - [key: string]: unknown; -} diff --git a/node_modules/@nestjs/platform-express/interfaces/nest-express-body-parser-options.interface.js b/node_modules/@nestjs/platform-express/interfaces/nest-express-body-parser-options.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/platform-express/interfaces/nest-express-body-parser-options.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/platform-express/interfaces/nest-express-body-parser.interface.d.ts b/node_modules/@nestjs/platform-express/interfaces/nest-express-body-parser.interface.d.ts deleted file mode 100644 index 9cb0030..0000000 --- a/node_modules/@nestjs/platform-express/interfaces/nest-express-body-parser.interface.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Interface defining possible body parser types, to be used with `NestExpressApplication.useBodyParser()`. - */ -export type NestExpressBodyParserType = 'json' | 'urlencoded' | 'text' | 'raw'; diff --git a/node_modules/@nestjs/platform-express/interfaces/nest-express-body-parser.interface.js b/node_modules/@nestjs/platform-express/interfaces/nest-express-body-parser.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/platform-express/interfaces/nest-express-body-parser.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/platform-express/interfaces/serve-static-options.interface.d.ts b/node_modules/@nestjs/platform-express/interfaces/serve-static-options.interface.d.ts deleted file mode 100644 index 26b98f4..0000000 --- a/node_modules/@nestjs/platform-express/interfaces/serve-static-options.interface.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Interface describing options for serving static assets. - * - * @see [Serving static files in Express](https://expressjs.com/en/starter/static-files.html) - * @see [Model-View-Controller](https://docs.nestjs.com/techniques/mvc) - * - * @publicApi - */ -export interface ServeStaticOptions { - /** - * Set how "dotfiles" are treated when encountered. A dotfile is a file or directory that begins with a dot ("."). - * Note this check is done on the path itself without checking if the path actually exists on the disk. - * If root is specified, only the dotfiles above the root are checked (i.e. the root itself can be within a dotfile when when set to "deny"). - * The default value is 'ignore'. - * 'allow' No special treatment for dotfiles - * 'deny' Send a 403 for any request for a dotfile - * 'ignore' Pretend like the dotfile does not exist and call next() - */ - dotfiles?: string; - /** - * Enable or disable etag generation, defaults to true. - */ - etag?: boolean; - /** - * Set file extension fallbacks. When set, if a file is not found, the given extensions will be added to the file name and search for. - * The first that exists will be served. Example: ['html', 'htm']. - * The default value is false. - */ - extensions?: string[]; - /** - * Let client errors fall-through as unhandled requests, otherwise forward a client error. - * The default value is false. - */ - fallthrough?: boolean; - /** - * Enable or disable the immutable directive in the Cache-Control response header. - * If enabled, the maxAge option should also be specified to enable caching. The immutable directive will prevent supported clients from making conditional requests during the life of the maxAge option to check if the file has changed. - */ - immutable?: boolean; - /** - * By default this module will send "index.html" files in response to a request on a directory. - * To disable this set false or to supply a new index pass a string or an array in preferred order. - */ - index?: boolean | string | string[]; - /** - * Enable or disable Last-Modified header, defaults to true. Uses the file system's last modified value. - */ - lastModified?: boolean; - /** - * Provide a max-age in milliseconds for http caching, defaults to 0. This can also be a string accepted by the ms module. - */ - maxAge?: number | string; - /** - * Redirect to trailing "/" when the pathname is a dir. Defaults to true. - */ - redirect?: boolean; - /** - * Function to set custom headers on response. Alterations to the headers need to occur synchronously. - * The function is called as `fn(res, path, stat)`, where the arguments are: - * `res` - the response object - * `path` - the file path that is being sent - * `stat` - the stat object of the file that is being sent - */ - setHeaders?: (res: any, path: string, stat: any) => any; - /** - * Creates a virtual path prefix - */ - prefix?: string; -} diff --git a/node_modules/@nestjs/platform-express/interfaces/serve-static-options.interface.js b/node_modules/@nestjs/platform-express/interfaces/serve-static-options.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/platform-express/interfaces/serve-static-options.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/platform-express/multer/files.constants.d.ts b/node_modules/@nestjs/platform-express/multer/files.constants.d.ts deleted file mode 100644 index e7346ea..0000000 --- a/node_modules/@nestjs/platform-express/multer/files.constants.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const MULTER_MODULE_OPTIONS = "MULTER_MODULE_OPTIONS"; diff --git a/node_modules/@nestjs/platform-express/multer/files.constants.js b/node_modules/@nestjs/platform-express/multer/files.constants.js deleted file mode 100644 index 0ddf1e6..0000000 --- a/node_modules/@nestjs/platform-express/multer/files.constants.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MULTER_MODULE_OPTIONS = void 0; -exports.MULTER_MODULE_OPTIONS = 'MULTER_MODULE_OPTIONS'; diff --git a/node_modules/@nestjs/platform-express/multer/index.d.ts b/node_modules/@nestjs/platform-express/multer/index.d.ts deleted file mode 100644 index 7afd4aa..0000000 --- a/node_modules/@nestjs/platform-express/multer/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './interceptors'; -export * from './interfaces'; -export * from './multer.module'; diff --git a/node_modules/@nestjs/platform-express/multer/index.js b/node_modules/@nestjs/platform-express/multer/index.js deleted file mode 100644 index 00a6451..0000000 --- a/node_modules/@nestjs/platform-express/multer/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./interceptors"), exports); -tslib_1.__exportStar(require("./interfaces"), exports); -tslib_1.__exportStar(require("./multer.module"), exports); diff --git a/node_modules/@nestjs/platform-express/multer/interceptors/any-files.interceptor.d.ts b/node_modules/@nestjs/platform-express/multer/interceptors/any-files.interceptor.d.ts deleted file mode 100644 index 18f946a..0000000 --- a/node_modules/@nestjs/platform-express/multer/interceptors/any-files.interceptor.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { NestInterceptor, Type } from '@nestjs/common'; -import { MulterOptions } from '../interfaces/multer-options.interface'; -/** - * @param localOptions - * - * @publicApi - */ -export declare function AnyFilesInterceptor(localOptions?: MulterOptions): Type; diff --git a/node_modules/@nestjs/platform-express/multer/interceptors/any-files.interceptor.js b/node_modules/@nestjs/platform-express/multer/interceptors/any-files.interceptor.js deleted file mode 100644 index 751ae2c..0000000 --- a/node_modules/@nestjs/platform-express/multer/interceptors/any-files.interceptor.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AnyFilesInterceptor = AnyFilesInterceptor; -const tslib_1 = require("tslib"); -const common_1 = require("@nestjs/common"); -const multer = require("multer"); -const files_constants_1 = require("../files.constants"); -const multer_utils_1 = require("../multer/multer.utils"); -/** - * @param localOptions - * - * @publicApi - */ -function AnyFilesInterceptor(localOptions) { - let MixinInterceptor = class MixinInterceptor { - constructor(options = {}) { - this.multer = multer({ - ...options, - ...localOptions, - }); - } - async intercept(context, next) { - const ctx = context.switchToHttp(); - await new Promise((resolve, reject) => this.multer.any()(ctx.getRequest(), ctx.getResponse(), (err) => { - if (err) { - const error = (0, multer_utils_1.transformException)(err); - return reject(error); - } - resolve(); - })); - return next.handle(); - } - }; - MixinInterceptor = tslib_1.__decorate([ - tslib_1.__param(0, (0, common_1.Optional)()), - tslib_1.__param(0, (0, common_1.Inject)(files_constants_1.MULTER_MODULE_OPTIONS)), - tslib_1.__metadata("design:paramtypes", [Object]) - ], MixinInterceptor); - const Interceptor = (0, common_1.mixin)(MixinInterceptor); - return Interceptor; -} diff --git a/node_modules/@nestjs/platform-express/multer/interceptors/file-fields.interceptor.d.ts b/node_modules/@nestjs/platform-express/multer/interceptors/file-fields.interceptor.d.ts deleted file mode 100644 index 15e571b..0000000 --- a/node_modules/@nestjs/platform-express/multer/interceptors/file-fields.interceptor.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { NestInterceptor, Type } from '@nestjs/common'; -import { MulterField, MulterOptions } from '../interfaces/multer-options.interface'; -/** - * @param uploadFields - * @param localOptions - * @publicApi - */ -export declare function FileFieldsInterceptor(uploadFields: MulterField[], localOptions?: MulterOptions): Type; diff --git a/node_modules/@nestjs/platform-express/multer/interceptors/file-fields.interceptor.js b/node_modules/@nestjs/platform-express/multer/interceptors/file-fields.interceptor.js deleted file mode 100644 index 31a772e..0000000 --- a/node_modules/@nestjs/platform-express/multer/interceptors/file-fields.interceptor.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.FileFieldsInterceptor = FileFieldsInterceptor; -const tslib_1 = require("tslib"); -const common_1 = require("@nestjs/common"); -const multer = require("multer"); -const files_constants_1 = require("../files.constants"); -const multer_utils_1 = require("../multer/multer.utils"); -/** - * @param uploadFields - * @param localOptions - * @publicApi - */ -function FileFieldsInterceptor(uploadFields, localOptions) { - let MixinInterceptor = class MixinInterceptor { - constructor(options = {}) { - this.multer = multer({ - ...options, - ...localOptions, - }); - } - async intercept(context, next) { - const ctx = context.switchToHttp(); - await new Promise((resolve, reject) => this.multer.fields(uploadFields)(ctx.getRequest(), ctx.getResponse(), (err) => { - if (err) { - const error = (0, multer_utils_1.transformException)(err); - return reject(error); - } - resolve(); - })); - return next.handle(); - } - }; - MixinInterceptor = tslib_1.__decorate([ - tslib_1.__param(0, (0, common_1.Optional)()), - tslib_1.__param(0, (0, common_1.Inject)(files_constants_1.MULTER_MODULE_OPTIONS)), - tslib_1.__metadata("design:paramtypes", [Object]) - ], MixinInterceptor); - const Interceptor = (0, common_1.mixin)(MixinInterceptor); - return Interceptor; -} diff --git a/node_modules/@nestjs/platform-express/multer/interceptors/file.interceptor.d.ts b/node_modules/@nestjs/platform-express/multer/interceptors/file.interceptor.d.ts deleted file mode 100644 index 0a83416..0000000 --- a/node_modules/@nestjs/platform-express/multer/interceptors/file.interceptor.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { NestInterceptor, Type } from '@nestjs/common'; -import { MulterOptions } from '../interfaces/multer-options.interface'; -/** - * @param fieldName - * @param localOptions - * - * @publicApi - */ -export declare function FileInterceptor(fieldName: string, localOptions?: MulterOptions): Type; diff --git a/node_modules/@nestjs/platform-express/multer/interceptors/file.interceptor.js b/node_modules/@nestjs/platform-express/multer/interceptors/file.interceptor.js deleted file mode 100644 index fbafa85..0000000 --- a/node_modules/@nestjs/platform-express/multer/interceptors/file.interceptor.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.FileInterceptor = FileInterceptor; -const tslib_1 = require("tslib"); -const common_1 = require("@nestjs/common"); -const multer = require("multer"); -const files_constants_1 = require("../files.constants"); -const multer_utils_1 = require("../multer/multer.utils"); -/** - * @param fieldName - * @param localOptions - * - * @publicApi - */ -function FileInterceptor(fieldName, localOptions) { - let MixinInterceptor = class MixinInterceptor { - constructor(options = {}) { - this.multer = multer({ - ...options, - ...localOptions, - }); - } - async intercept(context, next) { - const ctx = context.switchToHttp(); - await new Promise((resolve, reject) => this.multer.single(fieldName)(ctx.getRequest(), ctx.getResponse(), (err) => { - if (err) { - const error = (0, multer_utils_1.transformException)(err); - return reject(error); - } - resolve(); - })); - return next.handle(); - } - }; - MixinInterceptor = tslib_1.__decorate([ - tslib_1.__param(0, (0, common_1.Optional)()), - tslib_1.__param(0, (0, common_1.Inject)(files_constants_1.MULTER_MODULE_OPTIONS)), - tslib_1.__metadata("design:paramtypes", [Object]) - ], MixinInterceptor); - const Interceptor = (0, common_1.mixin)(MixinInterceptor); - return Interceptor; -} diff --git a/node_modules/@nestjs/platform-express/multer/interceptors/files.interceptor.d.ts b/node_modules/@nestjs/platform-express/multer/interceptors/files.interceptor.d.ts deleted file mode 100644 index b3519ef..0000000 --- a/node_modules/@nestjs/platform-express/multer/interceptors/files.interceptor.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { NestInterceptor, Type } from '@nestjs/common'; -import { MulterOptions } from '../interfaces/multer-options.interface'; -/** - * - * @param fieldName - * @param maxCount - * @param localOptions - * - * @publicApi - */ -export declare function FilesInterceptor(fieldName: string, maxCount?: number, localOptions?: MulterOptions): Type; diff --git a/node_modules/@nestjs/platform-express/multer/interceptors/files.interceptor.js b/node_modules/@nestjs/platform-express/multer/interceptors/files.interceptor.js deleted file mode 100644 index 974e34f..0000000 --- a/node_modules/@nestjs/platform-express/multer/interceptors/files.interceptor.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.FilesInterceptor = FilesInterceptor; -const tslib_1 = require("tslib"); -const common_1 = require("@nestjs/common"); -const multer = require("multer"); -const files_constants_1 = require("../files.constants"); -const multer_utils_1 = require("../multer/multer.utils"); -/** - * - * @param fieldName - * @param maxCount - * @param localOptions - * - * @publicApi - */ -function FilesInterceptor(fieldName, maxCount, localOptions) { - let MixinInterceptor = class MixinInterceptor { - constructor(options = {}) { - this.multer = multer({ - ...options, - ...localOptions, - }); - } - async intercept(context, next) { - const ctx = context.switchToHttp(); - await new Promise((resolve, reject) => this.multer.array(fieldName, maxCount)(ctx.getRequest(), ctx.getResponse(), (err) => { - if (err) { - const error = (0, multer_utils_1.transformException)(err); - return reject(error); - } - resolve(); - })); - return next.handle(); - } - }; - MixinInterceptor = tslib_1.__decorate([ - tslib_1.__param(0, (0, common_1.Optional)()), - tslib_1.__param(0, (0, common_1.Inject)(files_constants_1.MULTER_MODULE_OPTIONS)), - tslib_1.__metadata("design:paramtypes", [Object]) - ], MixinInterceptor); - const Interceptor = (0, common_1.mixin)(MixinInterceptor); - return Interceptor; -} diff --git a/node_modules/@nestjs/platform-express/multer/interceptors/index.d.ts b/node_modules/@nestjs/platform-express/multer/interceptors/index.d.ts deleted file mode 100644 index 855620d..0000000 --- a/node_modules/@nestjs/platform-express/multer/interceptors/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './any-files.interceptor'; -export * from './file-fields.interceptor'; -export * from './file.interceptor'; -export * from './files.interceptor'; -export * from './no-files.interceptor'; diff --git a/node_modules/@nestjs/platform-express/multer/interceptors/index.js b/node_modules/@nestjs/platform-express/multer/interceptors/index.js deleted file mode 100644 index e79efda..0000000 --- a/node_modules/@nestjs/platform-express/multer/interceptors/index.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./any-files.interceptor"), exports); -tslib_1.__exportStar(require("./file-fields.interceptor"), exports); -tslib_1.__exportStar(require("./file.interceptor"), exports); -tslib_1.__exportStar(require("./files.interceptor"), exports); -tslib_1.__exportStar(require("./no-files.interceptor"), exports); diff --git a/node_modules/@nestjs/platform-express/multer/interceptors/no-files.interceptor.d.ts b/node_modules/@nestjs/platform-express/multer/interceptors/no-files.interceptor.d.ts deleted file mode 100644 index 036604f..0000000 --- a/node_modules/@nestjs/platform-express/multer/interceptors/no-files.interceptor.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { NestInterceptor, Type } from '@nestjs/common'; -import { MulterOptions } from '../interfaces/multer-options.interface'; -/** - * - * @param localOptions - * @publicApi - */ -export declare function NoFilesInterceptor(localOptions?: MulterOptions): Type; diff --git a/node_modules/@nestjs/platform-express/multer/interceptors/no-files.interceptor.js b/node_modules/@nestjs/platform-express/multer/interceptors/no-files.interceptor.js deleted file mode 100644 index c1ef581..0000000 --- a/node_modules/@nestjs/platform-express/multer/interceptors/no-files.interceptor.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NoFilesInterceptor = NoFilesInterceptor; -const tslib_1 = require("tslib"); -const common_1 = require("@nestjs/common"); -const multer = require("multer"); -const files_constants_1 = require("../files.constants"); -const multer_utils_1 = require("../multer/multer.utils"); -/** - * - * @param localOptions - * @publicApi - */ -function NoFilesInterceptor(localOptions) { - let MixinInterceptor = class MixinInterceptor { - constructor(options = {}) { - this.multer = multer({ - ...options, - ...localOptions, - }); - } - async intercept(context, next) { - const ctx = context.switchToHttp(); - await new Promise((resolve, reject) => this.multer.none()(ctx.getRequest(), ctx.getResponse(), (err) => { - if (err) { - const error = (0, multer_utils_1.transformException)(err); - return reject(error); - } - resolve(); - })); - return next.handle(); - } - }; - MixinInterceptor = tslib_1.__decorate([ - tslib_1.__param(0, (0, common_1.Optional)()), - tslib_1.__param(0, (0, common_1.Inject)(files_constants_1.MULTER_MODULE_OPTIONS)), - tslib_1.__metadata("design:paramtypes", [Object]) - ], MixinInterceptor); - const Interceptor = (0, common_1.mixin)(MixinInterceptor); - return Interceptor; -} diff --git a/node_modules/@nestjs/platform-express/multer/interfaces/files-upload-module.interface.d.ts b/node_modules/@nestjs/platform-express/multer/interfaces/files-upload-module.interface.d.ts deleted file mode 100644 index b52bdb3..0000000 --- a/node_modules/@nestjs/platform-express/multer/interfaces/files-upload-module.interface.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ModuleMetadata, Type } from '@nestjs/common/interfaces'; -import { MulterOptions } from './multer-options.interface'; -export type MulterModuleOptions = MulterOptions; -/** - * @publicApi - */ -export interface MulterOptionsFactory { - createMulterOptions(): Promise | MulterModuleOptions; -} -/** - * @publicApi - */ -export interface MulterModuleAsyncOptions extends Pick { - useExisting?: Type; - useClass?: Type; - useFactory?: (...args: any[]) => Promise | MulterModuleOptions; - inject?: any[]; -} diff --git a/node_modules/@nestjs/platform-express/multer/interfaces/files-upload-module.interface.js b/node_modules/@nestjs/platform-express/multer/interfaces/files-upload-module.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/platform-express/multer/interfaces/files-upload-module.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/platform-express/multer/interfaces/index.d.ts b/node_modules/@nestjs/platform-express/multer/interfaces/index.d.ts deleted file mode 100644 index be94ec2..0000000 --- a/node_modules/@nestjs/platform-express/multer/interfaces/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './files-upload-module.interface'; diff --git a/node_modules/@nestjs/platform-express/multer/interfaces/index.js b/node_modules/@nestjs/platform-express/multer/interfaces/index.js deleted file mode 100644 index 0e48ce8..0000000 --- a/node_modules/@nestjs/platform-express/multer/interfaces/index.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const tslib_1 = require("tslib"); -tslib_1.__exportStar(require("./files-upload-module.interface"), exports); diff --git a/node_modules/@nestjs/platform-express/multer/interfaces/multer-options.interface.d.ts b/node_modules/@nestjs/platform-express/multer/interfaces/multer-options.interface.d.ts deleted file mode 100644 index b4f11b4..0000000 --- a/node_modules/@nestjs/platform-express/multer/interfaces/multer-options.interface.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * @see https://github.com/expressjs/multer - * - * @publicApi - */ -export interface MulterOptions { - dest?: string | Function; - /** The storage engine to use for uploaded files. */ - storage?: any; - /** - * An object specifying the size limits of the following optional properties. This object is passed to busboy - * directly, and the details of properties can be found on https://github.com/mscdex/busboy#busboy-methods - */ - limits?: { - /** Max field name size (Default: 100 bytes) */ - fieldNameSize?: number; - /** Max field value size (Default: 1MB) */ - fieldSize?: number; - /** Max number of non- file fields (Default: Infinity) */ - fields?: number; - /** For multipart forms, the max file size (in bytes)(Default: Infinity) */ - fileSize?: number; - /** For multipart forms, the max number of file fields (Default: Infinity) */ - files?: number; - /** For multipart forms, the max number of parts (fields + files)(Default: Infinity) */ - parts?: number; - /** For multipart forms, the max number of header key=> value pairs to parse Default: 2000(same as node's http). */ - headerPairs?: number; - }; - /** Keep the full path of files instead of just the base name (Default: false) */ - preservePath?: boolean; - fileFilter?(req: any, file: { - /** Field name specified in the form */ - fieldname: string; - /** Name of the file on the user's computer */ - originalname: string; - /** Encoding type of the file */ - encoding: string; - /** Mime type of the file */ - mimetype: string; - /** Size of the file in bytes */ - size: number; - /** The folder to which the file has been saved (DiskStorage) */ - destination: string; - /** The name of the file within the destination (DiskStorage) */ - filename: string; - /** Location of the uploaded file (DiskStorage) */ - path: string; - /** A Buffer of the entire file (MemoryStorage) */ - buffer: Buffer; - }, callback: (error: Error | null, acceptFile: boolean) => void): void; -} -/** - * @publicApi - */ -export interface MulterField { - /** The field name. */ - name: string; - /** Optional maximum number of files per field to accept. */ - maxCount?: number; -} diff --git a/node_modules/@nestjs/platform-express/multer/interfaces/multer-options.interface.js b/node_modules/@nestjs/platform-express/multer/interfaces/multer-options.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/platform-express/multer/interfaces/multer-options.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/platform-express/multer/multer.constants.d.ts b/node_modules/@nestjs/platform-express/multer/multer.constants.d.ts deleted file mode 100644 index b333b27..0000000 --- a/node_modules/@nestjs/platform-express/multer/multer.constants.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const MULTER_MODULE_ID = "MULTER_MODULE_ID"; diff --git a/node_modules/@nestjs/platform-express/multer/multer.constants.js b/node_modules/@nestjs/platform-express/multer/multer.constants.js deleted file mode 100644 index 6a96132..0000000 --- a/node_modules/@nestjs/platform-express/multer/multer.constants.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MULTER_MODULE_ID = void 0; -exports.MULTER_MODULE_ID = 'MULTER_MODULE_ID'; diff --git a/node_modules/@nestjs/platform-express/multer/multer.module.d.ts b/node_modules/@nestjs/platform-express/multer/multer.module.d.ts deleted file mode 100644 index 5088802..0000000 --- a/node_modules/@nestjs/platform-express/multer/multer.module.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { DynamicModule } from '@nestjs/common'; -import { MulterModuleAsyncOptions, MulterModuleOptions } from './interfaces/files-upload-module.interface'; -/** - * @publicApi - */ -export declare class MulterModule { - static register(options?: MulterModuleOptions): DynamicModule; - static registerAsync(options: MulterModuleAsyncOptions): DynamicModule; - private static createAsyncProviders; - private static createAsyncOptionsProvider; -} diff --git a/node_modules/@nestjs/platform-express/multer/multer.module.js b/node_modules/@nestjs/platform-express/multer/multer.module.js deleted file mode 100644 index 808568f..0000000 --- a/node_modules/@nestjs/platform-express/multer/multer.module.js +++ /dev/null @@ -1,71 +0,0 @@ -"use strict"; -var MulterModule_1; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MulterModule = void 0; -const tslib_1 = require("tslib"); -const common_1 = require("@nestjs/common"); -const random_string_generator_util_1 = require("@nestjs/common/utils/random-string-generator.util"); -const files_constants_1 = require("./files.constants"); -const multer_constants_1 = require("./multer.constants"); -/** - * @publicApi - */ -let MulterModule = MulterModule_1 = class MulterModule { - static register(options = {}) { - return { - module: MulterModule_1, - providers: [ - { provide: files_constants_1.MULTER_MODULE_OPTIONS, useFactory: () => options }, - { - provide: multer_constants_1.MULTER_MODULE_ID, - useValue: (0, random_string_generator_util_1.randomStringGenerator)(), - }, - ], - exports: [files_constants_1.MULTER_MODULE_OPTIONS], - }; - } - static registerAsync(options) { - return { - module: MulterModule_1, - imports: options.imports, - providers: [ - ...this.createAsyncProviders(options), - { - provide: multer_constants_1.MULTER_MODULE_ID, - useValue: (0, random_string_generator_util_1.randomStringGenerator)(), - }, - ], - exports: [files_constants_1.MULTER_MODULE_OPTIONS], - }; - } - static createAsyncProviders(options) { - if (options.useExisting || options.useFactory) { - return [this.createAsyncOptionsProvider(options)]; - } - return [ - this.createAsyncOptionsProvider(options), - { - provide: options.useClass, - useClass: options.useClass, - }, - ]; - } - static createAsyncOptionsProvider(options) { - if (options.useFactory) { - return { - provide: files_constants_1.MULTER_MODULE_OPTIONS, - useFactory: options.useFactory, - inject: options.inject || [], - }; - } - return { - provide: files_constants_1.MULTER_MODULE_OPTIONS, - useFactory: async (optionsFactory) => optionsFactory.createMulterOptions(), - inject: [options.useExisting || options.useClass], - }; - } -}; -exports.MulterModule = MulterModule; -exports.MulterModule = MulterModule = MulterModule_1 = tslib_1.__decorate([ - (0, common_1.Module)({}) -], MulterModule); diff --git a/node_modules/@nestjs/platform-express/multer/multer/multer.constants.d.ts b/node_modules/@nestjs/platform-express/multer/multer/multer.constants.d.ts deleted file mode 100644 index c007c3a..0000000 --- a/node_modules/@nestjs/platform-express/multer/multer/multer.constants.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export declare const multerExceptions: { - LIMIT_PART_COUNT: string; - LIMIT_FILE_SIZE: string; - LIMIT_FILE_COUNT: string; - LIMIT_FIELD_KEY: string; - LIMIT_FIELD_VALUE: string; - LIMIT_FIELD_COUNT: string; - LIMIT_UNEXPECTED_FILE: string; - MISSING_FIELD_NAME: string; -}; -export declare const busboyExceptions: { - MULTIPART_BOUNDARY_NOT_FOUND: string; - MULTIPART_MALFORMED_PART_HEADER: string; - MULTIPART_UNEXPECTED_END_OF_FORM: string; - MULTIPART_UNEXPECTED_END_OF_FILE: string; -}; diff --git a/node_modules/@nestjs/platform-express/multer/multer/multer.constants.js b/node_modules/@nestjs/platform-express/multer/multer/multer.constants.js deleted file mode 100644 index 70a0a7c..0000000 --- a/node_modules/@nestjs/platform-express/multer/multer/multer.constants.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.busboyExceptions = exports.multerExceptions = void 0; -exports.multerExceptions = { - // from https://github.com/expressjs/multer/blob/master/lib/multer-error.js - LIMIT_PART_COUNT: 'Too many parts', - LIMIT_FILE_SIZE: 'File too large', - LIMIT_FILE_COUNT: 'Too many files', - LIMIT_FIELD_KEY: 'Field name too long', - LIMIT_FIELD_VALUE: 'Field value too long', - LIMIT_FIELD_COUNT: 'Too many fields', - LIMIT_UNEXPECTED_FILE: 'Unexpected field', - MISSING_FIELD_NAME: 'Field name missing', -}; -exports.busboyExceptions = { - // from https://github.com/mscdex/busboy/blob/master/lib/types/multipart.js - MULTIPART_BOUNDARY_NOT_FOUND: 'Multipart: Boundary not found', - MULTIPART_MALFORMED_PART_HEADER: 'Malformed part header', - MULTIPART_UNEXPECTED_END_OF_FORM: 'Unexpected end of form', - MULTIPART_UNEXPECTED_END_OF_FILE: 'Unexpected end of file', -}; diff --git a/node_modules/@nestjs/platform-express/multer/multer/multer.utils.d.ts b/node_modules/@nestjs/platform-express/multer/multer/multer.utils.d.ts deleted file mode 100644 index 91ebc65..0000000 --- a/node_modules/@nestjs/platform-express/multer/multer/multer.utils.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { HttpException } from '@nestjs/common'; -export declare function transformException(error: (Error & { - field?: string; -}) | undefined): HttpException | (Error & { - field?: string; -}) | undefined; diff --git a/node_modules/@nestjs/platform-express/multer/multer/multer.utils.js b/node_modules/@nestjs/platform-express/multer/multer/multer.utils.js deleted file mode 100644 index e83a636..0000000 --- a/node_modules/@nestjs/platform-express/multer/multer/multer.utils.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.transformException = transformException; -const common_1 = require("@nestjs/common"); -const multer_constants_1 = require("./multer.constants"); -// Multer may add in a 'field' property to the error -// https://github.com/expressjs/multer/blob/aa42bea6ac7d0cb8fcb279b15a7278cda805dc63/lib/multer-error.js#L19 -function transformException(error) { - if (!error || error instanceof common_1.HttpException) { - return error; - } - switch (error.message) { - case multer_constants_1.multerExceptions.LIMIT_FILE_SIZE: - return new common_1.PayloadTooLargeException(error.message); - case multer_constants_1.multerExceptions.LIMIT_FILE_COUNT: - case multer_constants_1.multerExceptions.LIMIT_FIELD_KEY: - case multer_constants_1.multerExceptions.LIMIT_FIELD_VALUE: - case multer_constants_1.multerExceptions.LIMIT_FIELD_COUNT: - case multer_constants_1.multerExceptions.LIMIT_UNEXPECTED_FILE: - case multer_constants_1.multerExceptions.LIMIT_PART_COUNT: - case multer_constants_1.multerExceptions.MISSING_FIELD_NAME: - if (error.field) { - return new common_1.BadRequestException(`${error.message} - ${error.field}`); - } - return new common_1.BadRequestException(error.message); - case multer_constants_1.busboyExceptions.MULTIPART_BOUNDARY_NOT_FOUND: - return new common_1.BadRequestException(error.message); - case multer_constants_1.busboyExceptions.MULTIPART_MALFORMED_PART_HEADER: - case multer_constants_1.busboyExceptions.MULTIPART_UNEXPECTED_END_OF_FORM: - case multer_constants_1.busboyExceptions.MULTIPART_UNEXPECTED_END_OF_FILE: - return new common_1.BadRequestException(`Multipart: ${error.message}`); - } - return error; -} diff --git a/node_modules/@nestjs/platform-express/node_modules/accepts/HISTORY.md b/node_modules/@nestjs/platform-express/node_modules/accepts/HISTORY.md deleted file mode 100644 index 627a81d..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/accepts/HISTORY.md +++ /dev/null @@ -1,250 +0,0 @@ -2.0.0 / 2024-08-31 -================== - - * Drop node <18 support - * deps: mime-types@^3.0.0 - * deps: negotiator@^1.0.0 - -1.3.8 / 2022-02-02 -================== - - * deps: mime-types@~2.1.34 - - deps: mime-db@~1.51.0 - * deps: negotiator@0.6.3 - -1.3.7 / 2019-04-29 -================== - - * deps: negotiator@0.6.2 - - Fix sorting charset, encoding, and language with extra parameters - -1.3.6 / 2019-04-28 -================== - - * deps: mime-types@~2.1.24 - - deps: mime-db@~1.40.0 - -1.3.5 / 2018-02-28 -================== - - * deps: mime-types@~2.1.18 - - deps: mime-db@~1.33.0 - -1.3.4 / 2017-08-22 -================== - - * deps: mime-types@~2.1.16 - - deps: mime-db@~1.29.0 - -1.3.3 / 2016-05-02 -================== - - * deps: mime-types@~2.1.11 - - deps: mime-db@~1.23.0 - * deps: negotiator@0.6.1 - - perf: improve `Accept` parsing speed - - perf: improve `Accept-Charset` parsing speed - - perf: improve `Accept-Encoding` parsing speed - - perf: improve `Accept-Language` parsing speed - -1.3.2 / 2016-03-08 -================== - - * deps: mime-types@~2.1.10 - - Fix extension of `application/dash+xml` - - Update primary extension for `audio/mp4` - - deps: mime-db@~1.22.0 - -1.3.1 / 2016-01-19 -================== - - * deps: mime-types@~2.1.9 - - deps: mime-db@~1.21.0 - -1.3.0 / 2015-09-29 -================== - - * deps: mime-types@~2.1.7 - - deps: mime-db@~1.19.0 - * deps: negotiator@0.6.0 - - Fix including type extensions in parameters in `Accept` parsing - - Fix parsing `Accept` parameters with quoted equals - - Fix parsing `Accept` parameters with quoted semicolons - - Lazy-load modules from main entry point - - perf: delay type concatenation until needed - - perf: enable strict mode - - perf: hoist regular expressions - - perf: remove closures getting spec properties - - perf: remove a closure from media type parsing - - perf: remove property delete from media type parsing - -1.2.13 / 2015-09-06 -=================== - - * deps: mime-types@~2.1.6 - - deps: mime-db@~1.18.0 - -1.2.12 / 2015-07-30 -=================== - - * deps: mime-types@~2.1.4 - - deps: mime-db@~1.16.0 - -1.2.11 / 2015-07-16 -=================== - - * deps: mime-types@~2.1.3 - - deps: mime-db@~1.15.0 - -1.2.10 / 2015-07-01 -=================== - - * deps: mime-types@~2.1.2 - - deps: mime-db@~1.14.0 - -1.2.9 / 2015-06-08 -================== - - * deps: mime-types@~2.1.1 - - perf: fix deopt during mapping - -1.2.8 / 2015-06-07 -================== - - * deps: mime-types@~2.1.0 - - deps: mime-db@~1.13.0 - * perf: avoid argument reassignment & argument slice - * perf: avoid negotiator recursive construction - * perf: enable strict mode - * perf: remove unnecessary bitwise operator - -1.2.7 / 2015-05-10 -================== - - * deps: negotiator@0.5.3 - - Fix media type parameter matching to be case-insensitive - -1.2.6 / 2015-05-07 -================== - - * deps: mime-types@~2.0.11 - - deps: mime-db@~1.9.1 - * deps: negotiator@0.5.2 - - Fix comparing media types with quoted values - - Fix splitting media types with quoted commas - -1.2.5 / 2015-03-13 -================== - - * deps: mime-types@~2.0.10 - - deps: mime-db@~1.8.0 - -1.2.4 / 2015-02-14 -================== - - * Support Node.js 0.6 - * deps: mime-types@~2.0.9 - - deps: mime-db@~1.7.0 - * deps: negotiator@0.5.1 - - Fix preference sorting to be stable for long acceptable lists - -1.2.3 / 2015-01-31 -================== - - * deps: mime-types@~2.0.8 - - deps: mime-db@~1.6.0 - -1.2.2 / 2014-12-30 -================== - - * deps: mime-types@~2.0.7 - - deps: mime-db@~1.5.0 - -1.2.1 / 2014-12-30 -================== - - * deps: mime-types@~2.0.5 - - deps: mime-db@~1.3.1 - -1.2.0 / 2014-12-19 -================== - - * deps: negotiator@0.5.0 - - Fix list return order when large accepted list - - Fix missing identity encoding when q=0 exists - - Remove dynamic building of Negotiator class - -1.1.4 / 2014-12-10 -================== - - * deps: mime-types@~2.0.4 - - deps: mime-db@~1.3.0 - -1.1.3 / 2014-11-09 -================== - - * deps: mime-types@~2.0.3 - - deps: mime-db@~1.2.0 - -1.1.2 / 2014-10-14 -================== - - * deps: negotiator@0.4.9 - - Fix error when media type has invalid parameter - -1.1.1 / 2014-09-28 -================== - - * deps: mime-types@~2.0.2 - - deps: mime-db@~1.1.0 - * deps: negotiator@0.4.8 - - Fix all negotiations to be case-insensitive - - Stable sort preferences of same quality according to client order - -1.1.0 / 2014-09-02 -================== - - * update `mime-types` - -1.0.7 / 2014-07-04 -================== - - * Fix wrong type returned from `type` when match after unknown extension - -1.0.6 / 2014-06-24 -================== - - * deps: negotiator@0.4.7 - -1.0.5 / 2014-06-20 -================== - - * fix crash when unknown extension given - -1.0.4 / 2014-06-19 -================== - - * use `mime-types` - -1.0.3 / 2014-06-11 -================== - - * deps: negotiator@0.4.6 - - Order by specificity when quality is the same - -1.0.2 / 2014-05-29 -================== - - * Fix interpretation when header not in request - * deps: pin negotiator@0.4.5 - -1.0.1 / 2014-01-18 -================== - - * Identity encoding isn't always acceptable - * deps: negotiator@~0.4.0 - -1.0.0 / 2013-12-27 -================== - - * Genesis diff --git a/node_modules/@nestjs/platform-express/node_modules/accepts/LICENSE b/node_modules/@nestjs/platform-express/node_modules/accepts/LICENSE deleted file mode 100644 index 0616607..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/accepts/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@nestjs/platform-express/node_modules/accepts/README.md b/node_modules/@nestjs/platform-express/node_modules/accepts/README.md deleted file mode 100644 index f3f10c4..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/accepts/README.md +++ /dev/null @@ -1,140 +0,0 @@ -# accepts - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][github-actions-ci-image]][github-actions-ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator). -Extracted from [koa](https://www.npmjs.com/package/koa) for general use. - -In addition to negotiator, it allows: - -- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])` - as well as `('text/html', 'application/json')`. -- Allows type shorthands such as `json`. -- Returns `false` when no types match -- Treats non-existent headers as `*` - -## Installation - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install accepts -``` - -## API - -```js -var accepts = require('accepts') -``` - -### accepts(req) - -Create a new `Accepts` object for the given `req`. - -#### .charset(charsets) - -Return the first accepted charset. If nothing in `charsets` is accepted, -then `false` is returned. - -#### .charsets() - -Return the charsets that the request accepts, in the order of the client's -preference (most preferred first). - -#### .encoding(encodings) - -Return the first accepted encoding. If nothing in `encodings` is accepted, -then `false` is returned. - -#### .encodings() - -Return the encodings that the request accepts, in the order of the client's -preference (most preferred first). - -#### .language(languages) - -Return the first accepted language. If nothing in `languages` is accepted, -then `false` is returned. - -#### .languages() - -Return the languages that the request accepts, in the order of the client's -preference (most preferred first). - -#### .type(types) - -Return the first accepted type (and it is returned as the same text as what -appears in the `types` array). If nothing in `types` is accepted, then `false` -is returned. - -The `types` array can contain full MIME types or file extensions. Any value -that is not a full MIME type is passed to `require('mime-types').lookup`. - -#### .types() - -Return the types that the request accepts, in the order of the client's -preference (most preferred first). - -## Examples - -### Simple type negotiation - -This simple example shows how to use `accepts` to return a different typed -respond body based on what the client wants to accept. The server lists it's -preferences in order and will get back the best match between the client and -server. - -```js -var accepts = require('accepts') -var http = require('http') - -function app (req, res) { - var accept = accepts(req) - - // the order of this list is significant; should be server preferred order - switch (accept.type(['json', 'html'])) { - case 'json': - res.setHeader('Content-Type', 'application/json') - res.write('{"hello":"world!"}') - break - case 'html': - res.setHeader('Content-Type', 'text/html') - res.write('hello, world!') - break - default: - // the fallback is text/plain, so no need to specify it above - res.setHeader('Content-Type', 'text/plain') - res.write('hello, world!') - break - } - - res.end() -} - -http.createServer(app).listen(3000) -``` - -You can test this out with the cURL program: -```sh -curl -I -H'Accept: text/html' http://localhost:3000/ -``` - -## License - -[MIT](LICENSE) - -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/accepts/master -[coveralls-url]: https://coveralls.io/r/jshttp/accepts?branch=master -[github-actions-ci-image]: https://badgen.net/github/checks/jshttp/accepts/master?label=ci -[github-actions-ci-url]: https://github.com/jshttp/accepts/actions/workflows/ci.yml -[node-version-image]: https://badgen.net/npm/node/accepts -[node-version-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/accepts -[npm-url]: https://npmjs.org/package/accepts -[npm-version-image]: https://badgen.net/npm/v/accepts diff --git a/node_modules/@nestjs/platform-express/node_modules/accepts/index.js b/node_modules/@nestjs/platform-express/node_modules/accepts/index.js deleted file mode 100644 index 4f2840c..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/accepts/index.js +++ /dev/null @@ -1,238 +0,0 @@ -/*! - * accepts - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var Negotiator = require('negotiator') -var mime = require('mime-types') - -/** - * Module exports. - * @public - */ - -module.exports = Accepts - -/** - * Create a new Accepts object for the given req. - * - * @param {object} req - * @public - */ - -function Accepts (req) { - if (!(this instanceof Accepts)) { - return new Accepts(req) - } - - this.headers = req.headers - this.negotiator = new Negotiator(req) -} - -/** - * Check if the given `type(s)` is acceptable, returning - * the best match when true, otherwise `undefined`, in which - * case you should respond with 406 "Not Acceptable". - * - * The `type` value may be a single mime type string - * such as "application/json", the extension name - * such as "json" or an array `["json", "html", "text/plain"]`. When a list - * or array is given the _best_ match, if any is returned. - * - * Examples: - * - * // Accept: text/html - * this.types('html'); - * // => "html" - * - * // Accept: text/*, application/json - * this.types('html'); - * // => "html" - * this.types('text/html'); - * // => "text/html" - * this.types('json', 'text'); - * // => "json" - * this.types('application/json'); - * // => "application/json" - * - * // Accept: text/*, application/json - * this.types('image/png'); - * this.types('png'); - * // => undefined - * - * // Accept: text/*;q=.5, application/json - * this.types(['html', 'json']); - * this.types('html', 'json'); - * // => "json" - * - * @param {String|Array} types... - * @return {String|Array|Boolean} - * @public - */ - -Accepts.prototype.type = -Accepts.prototype.types = function (types_) { - var types = types_ - - // support flattened arguments - if (types && !Array.isArray(types)) { - types = new Array(arguments.length) - for (var i = 0; i < types.length; i++) { - types[i] = arguments[i] - } - } - - // no types, return all requested types - if (!types || types.length === 0) { - return this.negotiator.mediaTypes() - } - - // no accept header, return first given type - if (!this.headers.accept) { - return types[0] - } - - var mimes = types.map(extToMime) - var accepts = this.negotiator.mediaTypes(mimes.filter(validMime)) - var first = accepts[0] - - return first - ? types[mimes.indexOf(first)] - : false -} - -/** - * Return accepted encodings or best fit based on `encodings`. - * - * Given `Accept-Encoding: gzip, deflate` - * an array sorted by quality is returned: - * - * ['gzip', 'deflate'] - * - * @param {String|Array} encodings... - * @return {String|Array} - * @public - */ - -Accepts.prototype.encoding = -Accepts.prototype.encodings = function (encodings_) { - var encodings = encodings_ - - // support flattened arguments - if (encodings && !Array.isArray(encodings)) { - encodings = new Array(arguments.length) - for (var i = 0; i < encodings.length; i++) { - encodings[i] = arguments[i] - } - } - - // no encodings, return all requested encodings - if (!encodings || encodings.length === 0) { - return this.negotiator.encodings() - } - - return this.negotiator.encodings(encodings)[0] || false -} - -/** - * Return accepted charsets or best fit based on `charsets`. - * - * Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5` - * an array sorted by quality is returned: - * - * ['utf-8', 'utf-7', 'iso-8859-1'] - * - * @param {String|Array} charsets... - * @return {String|Array} - * @public - */ - -Accepts.prototype.charset = -Accepts.prototype.charsets = function (charsets_) { - var charsets = charsets_ - - // support flattened arguments - if (charsets && !Array.isArray(charsets)) { - charsets = new Array(arguments.length) - for (var i = 0; i < charsets.length; i++) { - charsets[i] = arguments[i] - } - } - - // no charsets, return all requested charsets - if (!charsets || charsets.length === 0) { - return this.negotiator.charsets() - } - - return this.negotiator.charsets(charsets)[0] || false -} - -/** - * Return accepted languages or best fit based on `langs`. - * - * Given `Accept-Language: en;q=0.8, es, pt` - * an array sorted by quality is returned: - * - * ['es', 'pt', 'en'] - * - * @param {String|Array} langs... - * @return {Array|String} - * @public - */ - -Accepts.prototype.lang = -Accepts.prototype.langs = -Accepts.prototype.language = -Accepts.prototype.languages = function (languages_) { - var languages = languages_ - - // support flattened arguments - if (languages && !Array.isArray(languages)) { - languages = new Array(arguments.length) - for (var i = 0; i < languages.length; i++) { - languages[i] = arguments[i] - } - } - - // no languages, return all requested languages - if (!languages || languages.length === 0) { - return this.negotiator.languages() - } - - return this.negotiator.languages(languages)[0] || false -} - -/** - * Convert extnames to mime. - * - * @param {String} type - * @return {String} - * @private - */ - -function extToMime (type) { - return type.indexOf('/') === -1 - ? mime.lookup(type) - : type -} - -/** - * Check if mime is valid. - * - * @param {String} type - * @return {Boolean} - * @private - */ - -function validMime (type) { - return typeof type === 'string' -} diff --git a/node_modules/@nestjs/platform-express/node_modules/accepts/package.json b/node_modules/@nestjs/platform-express/node_modules/accepts/package.json deleted file mode 100644 index b35b262..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/accepts/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "accepts", - "description": "Higher-level content negotiation", - "version": "2.0.0", - "contributors": [ - "Douglas Christopher Wilson ", - "Jonathan Ong (http://jongleberry.com)" - ], - "license": "MIT", - "repository": "jshttp/accepts", - "dependencies": { - "mime-types": "^3.0.0", - "negotiator": "^1.0.0" - }, - "devDependencies": { - "deep-equal": "1.0.1", - "eslint": "7.32.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.25.4", - "eslint-plugin-markdown": "2.2.1", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "4.3.1", - "eslint-plugin-standard": "4.1.0", - "mocha": "9.2.0", - "nyc": "15.1.0" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "lint": "eslint .", - "test": "mocha --reporter spec --check-leaks --bail test/", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test" - }, - "keywords": [ - "content", - "negotiation", - "accept", - "accepts" - ] -} diff --git a/node_modules/@nestjs/platform-express/node_modules/body-parser/LICENSE b/node_modules/@nestjs/platform-express/node_modules/body-parser/LICENSE deleted file mode 100644 index 386b7b6..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/body-parser/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2014-2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@nestjs/platform-express/node_modules/body-parser/README.md b/node_modules/@nestjs/platform-express/node_modules/body-parser/README.md deleted file mode 100644 index 39d320f..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/body-parser/README.md +++ /dev/null @@ -1,494 +0,0 @@ -# body-parser - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Build Status][ci-image]][ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] -[![OpenSSF Scorecard Badge][ossf-scorecard-badge]][ossf-scorecard-visualizer] - -Node.js body parsing middleware. - -Parse incoming request bodies in a middleware before your handlers, available -under the `req.body` property. - -**Note** As `req.body`'s shape is based on user-controlled input, all -properties and values in this object are untrusted and should be validated -before trusting. For example, `req.body.foo.toString()` may fail in multiple -ways, for example the `foo` property may not be there or may not be a string, -and `toString` may not be a function and instead a string or other user input. - -[Learn about the anatomy of an HTTP transaction in Node.js](https://nodejs.org/en/learn/http/anatomy-of-an-http-transaction). - -_This does not handle multipart bodies_, due to their complex and typically -large nature. For multipart bodies, you may be interested in the following -modules: - - * [busboy](https://www.npmjs.com/package/busboy#readme) and - [connect-busboy](https://www.npmjs.com/package/connect-busboy#readme) - * [multiparty](https://www.npmjs.com/package/multiparty#readme) and - [connect-multiparty](https://www.npmjs.com/package/connect-multiparty#readme) - * [formidable](https://www.npmjs.com/package/formidable#readme) - * [multer](https://www.npmjs.com/package/multer#readme) - -This module provides the following parsers: - - * [JSON body parser](#bodyparserjsonoptions) - * [Raw body parser](#bodyparserrawoptions) - * [Text body parser](#bodyparsertextoptions) - * [URL-encoded form body parser](#bodyparserurlencodedoptions) - -Other body parsers you might be interested in: - -- [body](https://www.npmjs.com/package/body#readme) -- [co-body](https://www.npmjs.com/package/co-body#readme) - -## Installation - -```sh -$ npm install body-parser -``` - -## API - -```js -const bodyParser = require('body-parser') -``` - -The `bodyParser` object exposes various factories to create middlewares. All -middlewares will populate the `req.body` property with the parsed body when -the `Content-Type` request header matches the `type` option. - -The various errors returned by this module are described in the -[errors section](#errors). - -### bodyParser.json([options]) - -Returns middleware that only parses `json` and only looks at requests where -the `Content-Type` header matches the `type` option. This parser accepts any -Unicode encoding of the body and supports automatic inflation of `gzip`, -`br` (brotli) and `deflate` encodings. - -A new `body` object containing the parsed data is populated on the `request` -object after the middleware (i.e. `req.body`). - -#### Options - -The `json` function takes an optional `options` object that may contain any of -the following keys: - -##### defaultCharset - -Specify the default character set for the json content if the charset is not -specified in the `Content-Type` header of the request. Defaults to `utf-8`. - -##### inflate - -When set to `true`, then deflated (compressed) bodies will be inflated; when -`false`, deflated bodies are rejected. Defaults to `true`. - -##### limit - -Controls the maximum request body size. If this is a number, then the value -specifies the number of bytes; if it is a string, the value is passed to the -[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults -to `'100kb'`. - -##### reviver - -The `reviver` option is passed directly to `JSON.parse` as the second -argument. You can find more information on this argument -[in the MDN documentation about JSON.parse](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Example.3A_Using_the_reviver_parameter). - -##### strict - -When set to `true`, will only accept arrays and objects; when `false` will -accept anything `JSON.parse` accepts. Defaults to `true`. - -##### type - -The `type` option is used to determine what media type the middleware will -parse. This option can be a string, array of strings, or a function. If not a -function, `type` option is passed directly to the -[type-is](https://www.npmjs.com/package/type-is#readme) library and this can -be an extension name (like `json`), a mime type (like `application/json`), or -a mime type with a wildcard (like `*/*` or `*/json`). If a function, the `type` -option is called as `fn(req)` and the request is parsed if it returns a truthy -value. Defaults to `application/json`. - -##### verify - -The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`, -where `buf` is a `Buffer` of the raw request body and `encoding` is the -encoding of the request. The parsing can be aborted by throwing an error. - -### bodyParser.raw([options]) - -Returns middleware that parses all bodies as a `Buffer` and only looks at -requests where the `Content-Type` header matches the `type` option. This -parser supports automatic inflation of `gzip`, `br` (brotli) and `deflate` -encodings. - -A new `body` object containing the parsed data is populated on the `request` -object after the middleware (i.e. `req.body`). This will be a `Buffer` object -of the body. - -#### Options - -The `raw` function takes an optional `options` object that may contain any of -the following keys: - -##### inflate - -When set to `true`, then deflated (compressed) bodies will be inflated; when -`false`, deflated bodies are rejected. Defaults to `true`. - -##### limit - -Controls the maximum request body size. If this is a number, then the value -specifies the number of bytes; if it is a string, the value is passed to the -[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults -to `'100kb'`. - -##### type - -The `type` option is used to determine what media type the middleware will -parse. This option can be a string, array of strings, or a function. -If not a function, `type` option is passed directly to the -[type-is](https://www.npmjs.com/package/type-is#readme) library and this -can be an extension name (like `bin`), a mime type (like -`application/octet-stream`), or a mime type with a wildcard (like `*/*` or -`application/*`). If a function, the `type` option is called as `fn(req)` -and the request is parsed if it returns a truthy value. Defaults to -`application/octet-stream`. - -##### verify - -The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`, -where `buf` is a `Buffer` of the raw request body and `encoding` is the -encoding of the request. The parsing can be aborted by throwing an error. - -### bodyParser.text([options]) - -Returns middleware that parses all bodies as a string and only looks at -requests where the `Content-Type` header matches the `type` option. This -parser supports automatic inflation of `gzip`, `br` (brotli) and `deflate` -encodings. - -A new `body` string containing the parsed data is populated on the `request` -object after the middleware (i.e. `req.body`). This will be a string of the -body. - -#### Options - -The `text` function takes an optional `options` object that may contain any of -the following keys: - -##### defaultCharset - -Specify the default character set for the text content if the charset is not -specified in the `Content-Type` header of the request. Defaults to `utf-8`. - -##### inflate - -When set to `true`, then deflated (compressed) bodies will be inflated; when -`false`, deflated bodies are rejected. Defaults to `true`. - -##### limit - -Controls the maximum request body size. If this is a number, then the value -specifies the number of bytes; if it is a string, the value is passed to the -[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults -to `'100kb'`. - -##### type - -The `type` option is used to determine what media type the middleware will -parse. This option can be a string, array of strings, or a function. If not -a function, `type` option is passed directly to the -[type-is](https://www.npmjs.com/package/type-is#readme) library and this can -be an extension name (like `txt`), a mime type (like `text/plain`), or a mime -type with a wildcard (like `*/*` or `text/*`). If a function, the `type` -option is called as `fn(req)` and the request is parsed if it returns a -truthy value. Defaults to `text/plain`. - -##### verify - -The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`, -where `buf` is a `Buffer` of the raw request body and `encoding` is the -encoding of the request. The parsing can be aborted by throwing an error. - -### bodyParser.urlencoded([options]) - -Returns middleware that only parses `urlencoded` bodies and only looks at -requests where the `Content-Type` header matches the `type` option. This -parser accepts only UTF-8 and ISO-8859-1 encodings of the body and supports -automatic inflation of `gzip`, `br` (brotli) and `deflate` encodings. - -A new `body` object containing the parsed data is populated on the `request` -object after the middleware (i.e. `req.body`). This object will contain -key-value pairs, where the value can be a string or array (when `extended` is -`false`), or any type (when `extended` is `true`). - -#### Options - -The `urlencoded` function takes an optional `options` object that may contain -any of the following keys: - -##### extended - -The "extended" syntax allows for rich objects and arrays to be encoded into the -URL-encoded format, allowing for a JSON-like experience with URL-encoded. For -more information, please [see the qs -library](https://www.npmjs.com/package/qs#readme). - -Defaults to `false`. - -##### inflate - -When set to `true`, then deflated (compressed) bodies will be inflated; when -`false`, deflated bodies are rejected. Defaults to `true`. - -##### limit - -Controls the maximum request body size. If this is a number, then the value -specifies the number of bytes; if it is a string, the value is passed to the -[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults -to `'100kb'`. - -##### parameterLimit - -The `parameterLimit` option controls the maximum number of parameters that -are allowed in the URL-encoded data. If a request contains more parameters -than this value, a 413 will be returned to the client. Defaults to `1000`. - -##### type - -The `type` option is used to determine what media type the middleware will -parse. This option can be a string, array of strings, or a function. If not -a function, `type` option is passed directly to the -[type-is](https://www.npmjs.com/package/type-is#readme) library and this can -be an extension name (like `urlencoded`), a mime type (like -`application/x-www-form-urlencoded`), or a mime type with a wildcard (like -`*/x-www-form-urlencoded`). If a function, the `type` option is called as -`fn(req)` and the request is parsed if it returns a truthy value. Defaults -to `application/x-www-form-urlencoded`. - -##### verify - -The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`, -where `buf` is a `Buffer` of the raw request body and `encoding` is the -encoding of the request. The parsing can be aborted by throwing an error. - -##### defaultCharset - -The default charset to parse as, if not specified in content-type. Must be -either `utf-8` or `iso-8859-1`. Defaults to `utf-8`. - -##### charsetSentinel - -Whether to let the value of the `utf8` parameter take precedence as the charset -selector. It requires the form to contain a parameter named `utf8` with a value -of `✓`. Defaults to `false`. - -##### interpretNumericEntities - -Whether to decode numeric entities such as `☺` when parsing an iso-8859-1 -form. Defaults to `false`. - - -##### depth - -The `depth` option is used to configure the maximum depth of the `qs` library when `extended` is `true`. This allows you to limit the amount of keys that are parsed and can be useful to prevent certain types of abuse. Defaults to `32`. It is recommended to keep this value as low as possible. - -## Errors - -The middlewares provided by this module create errors using the -[`http-errors` module](https://www.npmjs.com/package/http-errors). The errors -will typically have a `status`/`statusCode` property that contains the suggested -HTTP response code, an `expose` property to determine if the `message` property -should be displayed to the client, a `type` property to determine the type of -error without matching against the `message`, and a `body` property containing -the read body, if available. - -The following are the common errors created, though any error can come through -for various reasons. - -### content encoding unsupported - -This error will occur when the request had a `Content-Encoding` header that -contained an encoding but the "inflation" option was set to `false`. The -`status` property is set to `415`, the `type` property is set to -`'encoding.unsupported'`, and the `charset` property will be set to the -encoding that is unsupported. - -### entity parse failed - -This error will occur when the request contained an entity that could not be -parsed by the middleware. The `status` property is set to `400`, the `type` -property is set to `'entity.parse.failed'`, and the `body` property is set to -the entity value that failed parsing. - -### entity verify failed - -This error will occur when the request contained an entity that could not be -failed verification by the defined `verify` option. The `status` property is -set to `403`, the `type` property is set to `'entity.verify.failed'`, and the -`body` property is set to the entity value that failed verification. - -### request aborted - -This error will occur when the request is aborted by the client before reading -the body has finished. The `received` property will be set to the number of -bytes received before the request was aborted and the `expected` property is -set to the number of expected bytes. The `status` property is set to `400` -and `type` property is set to `'request.aborted'`. - -### request entity too large - -This error will occur when the request body's size is larger than the "limit" -option. The `limit` property will be set to the byte limit and the `length` -property will be set to the request body's length. The `status` property is -set to `413` and the `type` property is set to `'entity.too.large'`. - -### request size did not match content length - -This error will occur when the request's length did not match the length from -the `Content-Length` header. This typically occurs when the request is malformed, -typically when the `Content-Length` header was calculated based on characters -instead of bytes. The `status` property is set to `400` and the `type` property -is set to `'request.size.invalid'`. - -### stream encoding should not be set - -This error will occur when something called the `req.setEncoding` method prior -to this middleware. This module operates directly on bytes only and you cannot -call `req.setEncoding` when using this module. The `status` property is set to -`500` and the `type` property is set to `'stream.encoding.set'`. - -### stream is not readable - -This error will occur when the request is no longer readable when this middleware -attempts to read it. This typically means something other than a middleware from -this module read the request body already and the middleware was also configured to -read the same request. The `status` property is set to `500` and the `type` -property is set to `'stream.not.readable'`. - -### too many parameters - -This error will occur when the content of the request exceeds the configured -`parameterLimit` for the `urlencoded` parser. The `status` property is set to -`413` and the `type` property is set to `'parameters.too.many'`. - -### unsupported charset "BOGUS" - -This error will occur when the request had a charset parameter in the -`Content-Type` header, but the `iconv-lite` module does not support it OR the -parser does not support it. The charset is contained in the message as well -as in the `charset` property. The `status` property is set to `415`, the -`type` property is set to `'charset.unsupported'`, and the `charset` property -is set to the charset that is unsupported. - -### unsupported content encoding "bogus" - -This error will occur when the request had a `Content-Encoding` header that -contained an unsupported encoding. The encoding is contained in the message -as well as in the `encoding` property. The `status` property is set to `415`, -the `type` property is set to `'encoding.unsupported'`, and the `encoding` -property is set to the encoding that is unsupported. - -### The input exceeded the depth - -This error occurs when using `bodyParser.urlencoded` with the `extended` property set to `true` and the input exceeds the configured `depth` option. The `status` property is set to `400`. It is recommended to review the `depth` option and evaluate if it requires a higher value. When the `depth` option is set to `32` (default value), the error will not be thrown. - -## Examples - -### Express/Connect top-level generic - -This example demonstrates adding a generic JSON and URL-encoded parser as a -top-level middleware, which will parse the bodies of all incoming requests. -This is the simplest setup. - -```js -const express = require('express') -const bodyParser = require('body-parser') - -const app = express() - -// parse application/x-www-form-urlencoded -app.use(bodyParser.urlencoded()) - -// parse application/json -app.use(bodyParser.json()) - -app.use(function (req, res) { - res.setHeader('Content-Type', 'text/plain') - res.write('you posted:\n') - res.end(String(JSON.stringify(req.body, null, 2))) -}) -``` - -### Express route-specific - -This example demonstrates adding body parsers specifically to the routes that -need them. In general, this is the most recommended way to use body-parser with -Express. - -```js -const express = require('express') -const bodyParser = require('body-parser') - -const app = express() - -// create application/json parser -const jsonParser = bodyParser.json() - -// create application/x-www-form-urlencoded parser -const urlencodedParser = bodyParser.urlencoded() - -// POST /login gets urlencoded bodies -app.post('/login', urlencodedParser, function (req, res) { - if (!req.body || !req.body.username) res.sendStatus(400) - res.send('welcome, ' + req.body.username) -}) - -// POST /api/users gets JSON bodies -app.post('/api/users', jsonParser, function (req, res) { - if (!req.body) res.sendStatus(400) - // create user in req.body -}) -``` - -### Change accepted type for parsers - -All the parsers accept a `type` option which allows you to change the -`Content-Type` that the middleware will parse. - -```js -const express = require('express') -const bodyParser = require('body-parser') - -const app = express() - -// parse various different custom JSON types as JSON -app.use(bodyParser.json({ type: 'application/*+json' })) - -// parse some custom thing into a Buffer -app.use(bodyParser.raw({ type: 'application/vnd.custom-type' })) - -// parse an HTML body into a string -app.use(bodyParser.text({ type: 'text/html' })) -``` - -## License - -[MIT](LICENSE) - -[ci-image]: https://img.shields.io/github/actions/workflow/status/expressjs/body-parser/ci.yml?branch=master&label=ci -[ci-url]: https://github.com/expressjs/body-parser/actions/workflows/ci.yml -[coveralls-image]: https://img.shields.io/coverallsCoverage/github/expressjs/body-parser?branch=master -[coveralls-url]: https://coveralls.io/r/expressjs/body-parser?branch=master -[npm-downloads-image]: https://img.shields.io/npm/dm/body-parser -[npm-url]: https://npmjs.com/package/body-parser -[npm-version-image]: https://img.shields.io/npm/v/body-parser -[ossf-scorecard-badge]: https://api.scorecard.dev/projects/github.com/expressjs/body-parser/badge -[ossf-scorecard-visualizer]: https://ossf.github.io/scorecard-visualizer/#/projects/github.com/expressjs/body-parser diff --git a/node_modules/@nestjs/platform-express/node_modules/body-parser/index.js b/node_modules/@nestjs/platform-express/node_modules/body-parser/index.js deleted file mode 100644 index 013ce5c..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/body-parser/index.js +++ /dev/null @@ -1,71 +0,0 @@ -/*! - * body-parser - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * @typedef {Object} Parsers - * @property {Function} json JSON parser - * @property {Function} raw Raw parser - * @property {Function} text Text parser - * @property {Function} urlencoded URL-encoded parser - */ - -/** - * Module exports. - * @type {Function & Parsers} - */ -exports = module.exports = bodyParser - -/** - * JSON parser. - * @public - */ -Object.defineProperty(exports, 'json', { - configurable: true, - enumerable: true, - get: () => require('./lib/types/json') -}) - -/** - * Raw parser. - * @public - */ -Object.defineProperty(exports, 'raw', { - configurable: true, - enumerable: true, - get: () => require('./lib/types/raw') -}) - -/** - * Text parser. - * @public - */ -Object.defineProperty(exports, 'text', { - configurable: true, - enumerable: true, - get: () => require('./lib/types/text') -}) - -/** - * URL-encoded parser. - * @public - */ -Object.defineProperty(exports, 'urlencoded', { - configurable: true, - enumerable: true, - get: () => require('./lib/types/urlencoded') -}) - -/** - * Create a middleware to parse json and urlencoded bodies. - * - * @deprecated - * @public - */ -function bodyParser () { - throw new Error('The bodyParser() generic has been split into individual middleware to use instead.') -} diff --git a/node_modules/@nestjs/platform-express/node_modules/body-parser/lib/read.js b/node_modules/@nestjs/platform-express/node_modules/body-parser/lib/read.js deleted file mode 100644 index d1f3f48..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/body-parser/lib/read.js +++ /dev/null @@ -1,247 +0,0 @@ -/*! - * body-parser - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var createError = require('http-errors') -var getBody = require('raw-body') -var iconv = require('iconv-lite') -var onFinished = require('on-finished') -var zlib = require('node:zlib') -var hasBody = require('type-is').hasBody -var { getCharset } = require('./utils') - -/** - * Module exports. - */ - -module.exports = read - -/** - * Read a request into a buffer and parse. - * - * @param {Object} req - * @param {Object} res - * @param {Function} next - * @param {Function} parse - * @param {Function} debug - * @param {Object} options - * @private - */ -function read (req, res, next, parse, debug, options) { - if (onFinished.isFinished(req)) { - debug('body already parsed') - next() - return - } - - if (!('body' in req)) { - req.body = undefined - } - - // skip requests without bodies - if (!hasBody(req)) { - debug('skip empty body') - next() - return - } - - debug('content-type %j', req.headers['content-type']) - - // determine if request should be parsed - if (!options.shouldParse(req)) { - debug('skip parsing') - next() - return - } - - var encoding = null - if (options?.skipCharset !== true) { - encoding = getCharset(req) || options.defaultCharset - - // validate charset - if (!!options?.isValidCharset && !options.isValidCharset(encoding)) { - debug('invalid charset') - next(createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', { - charset: encoding, - type: 'charset.unsupported' - })) - return - } - } - - var length - var opts = options - var stream - - // read options - var verify = opts.verify - - try { - // get the content stream - stream = contentstream(req, debug, opts.inflate) - length = stream.length - stream.length = undefined - } catch (err) { - return next(err) - } - - // set raw-body options - opts.length = length - opts.encoding = verify - ? null - : encoding - - // assert charset is supported - if (opts.encoding === null && encoding !== null && !iconv.encodingExists(encoding)) { - return next(createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', { - charset: encoding.toLowerCase(), - type: 'charset.unsupported' - })) - } - - // read body - debug('read body') - getBody(stream, opts, function (error, body) { - if (error) { - var _error - - if (error.type === 'encoding.unsupported') { - // echo back charset - _error = createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', { - charset: encoding.toLowerCase(), - type: 'charset.unsupported' - }) - } else { - // set status code on error - _error = createError(400, error) - } - - // unpipe from stream and destroy - if (stream !== req) { - req.unpipe() - stream.destroy() - } - - // read off entire request - dump(req, function onfinished () { - next(createError(400, _error)) - }) - return - } - - // verify - if (verify) { - try { - debug('verify body') - verify(req, res, body, encoding) - } catch (err) { - next(createError(403, err, { - body: body, - type: err.type || 'entity.verify.failed' - })) - return - } - } - - // parse - var str = body - try { - debug('parse body') - str = typeof body !== 'string' && encoding !== null - ? iconv.decode(body, encoding) - : body - req.body = parse(str, encoding) - } catch (err) { - next(createError(400, err, { - body: str, - type: err.type || 'entity.parse.failed' - })) - return - } - - next() - }) -} - -/** - * Get the content stream of the request. - * - * @param {Object} req - * @param {Function} debug - * @param {boolean} inflate - * @returns {Object} - * @private - */ -function contentstream (req, debug, inflate) { - var encoding = (req.headers['content-encoding'] || 'identity').toLowerCase() - var length = req.headers['content-length'] - - debug('content-encoding "%s"', encoding) - - if (inflate === false && encoding !== 'identity') { - throw createError(415, 'content encoding unsupported', { - encoding: encoding, - type: 'encoding.unsupported' - }) - } - - if (encoding === 'identity') { - req.length = length - return req - } - - var stream = createDecompressionStream(encoding, debug) - req.pipe(stream) - return stream -} - -/** - * Create a decompression stream for the given encoding. - * @param {string} encoding - * @param {Function} debug - * @returns {Object} - * @private - */ -function createDecompressionStream (encoding, debug) { - switch (encoding) { - case 'deflate': - debug('inflate body') - return zlib.createInflate() - case 'gzip': - debug('gunzip body') - return zlib.createGunzip() - case 'br': - debug('brotli decompress body') - return zlib.createBrotliDecompress() - default: - throw createError(415, 'unsupported content encoding "' + encoding + '"', { - encoding: encoding, - type: 'encoding.unsupported' - }) - } -} - -/** - * Dump the contents of a request. - * - * @param {Object} req - * @param {Function} callback - * @private - */ -function dump (req, callback) { - if (onFinished.isFinished(req)) { - callback(null) - } else { - onFinished(req, callback) - req.resume() - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/body-parser/lib/types/json.js b/node_modules/@nestjs/platform-express/node_modules/body-parser/lib/types/json.js deleted file mode 100644 index 23c7357..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/body-parser/lib/types/json.js +++ /dev/null @@ -1,158 +0,0 @@ -/*! - * body-parser - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var debug = require('debug')('body-parser:json') -var read = require('../read') -var { normalizeOptions } = require('../utils') - -/** - * Module exports. - */ - -module.exports = json - -/** - * RegExp to match the first non-space in a string. - * - * Allowed whitespace is defined in RFC 7159: - * - * ws = *( - * %x20 / ; Space - * %x09 / ; Horizontal tab - * %x0A / ; Line feed or New line - * %x0D ) ; Carriage return - */ -var FIRST_CHAR_REGEXP = /^[\x20\x09\x0a\x0d]*([^\x20\x09\x0a\x0d])/ // eslint-disable-line no-control-regex - -var JSON_SYNTAX_CHAR = '#' -var JSON_SYNTAX_REGEXP = /#+/g - -/** - * Create a middleware to parse JSON bodies. - * - * @param {Object} [options] - * @returns {Function} - * @public - */ -function json (options) { - const normalizedOptions = normalizeOptions(options, 'application/json') - - var reviver = options?.reviver - var strict = options?.strict !== false - - function parse (body) { - if (body.length === 0) { - // special-case empty json body, as it's a common client-side mistake - // TODO: maybe make this configurable or part of "strict" option - return {} - } - - if (strict) { - var first = firstchar(body) - - if (first !== '{' && first !== '[') { - debug('strict violation') - throw createStrictSyntaxError(body, first) - } - } - - try { - debug('parse json') - return JSON.parse(body, reviver) - } catch (e) { - throw normalizeJsonSyntaxError(e, { - message: e.message, - stack: e.stack - }) - } - } - - const readOptions = { - ...normalizedOptions, - // assert charset per RFC 7159 sec 8.1 - isValidCharset: (charset) => charset.slice(0, 4) === 'utf-' - } - - return function jsonParser (req, res, next) { - read(req, res, next, parse, debug, readOptions) - } -} - -/** - * Create strict violation syntax error matching native error. - * - * @param {string} str - * @param {string} char - * @returns {Error} - * @private - */ -function createStrictSyntaxError (str, char) { - var index = str.indexOf(char) - var partial = '' - - if (index !== -1) { - partial = str.substring(0, index) + JSON_SYNTAX_CHAR.repeat(str.length - index) - } - - try { - JSON.parse(partial); /* istanbul ignore next */ throw new SyntaxError('strict violation') - } catch (e) { - return normalizeJsonSyntaxError(e, { - message: e.message.replace(JSON_SYNTAX_REGEXP, function (placeholder) { - return str.substring(index, index + placeholder.length) - }), - stack: e.stack - }) - } -} - -/** - * Get the first non-whitespace character in a string. - * - * @param {string} str - * @returns {string|undefined} - * @private - */ -function firstchar (str) { - var match = FIRST_CHAR_REGEXP.exec(str) - - return match - ? match[1] - : undefined -} - -/** - * Normalize a SyntaxError for JSON.parse. - * - * @param {SyntaxError} error - * @param {Object} obj - * @returns {SyntaxError} - * @private - */ -function normalizeJsonSyntaxError (error, obj) { - var keys = Object.getOwnPropertyNames(error) - - for (var i = 0; i < keys.length; i++) { - var key = keys[i] - if (key !== 'stack' && key !== 'message') { - delete error[key] - } - } - - // replace stack before message for Node.js 0.10 and below - error.stack = obj.stack.replace(error.message, obj.message) - error.message = obj.message - - return error -} diff --git a/node_modules/@nestjs/platform-express/node_modules/body-parser/lib/types/raw.js b/node_modules/@nestjs/platform-express/node_modules/body-parser/lib/types/raw.js deleted file mode 100644 index ad4854d..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/body-parser/lib/types/raw.js +++ /dev/null @@ -1,42 +0,0 @@ -/*! - * body-parser - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - */ - -var debug = require('debug')('body-parser:raw') -var read = require('../read') -var { normalizeOptions, passthrough } = require('../utils') - -/** - * Module exports. - */ - -module.exports = raw - -/** - * Create a middleware to parse raw bodies. - * - * @param {Object} [options] - * @returns {Function} - * @public - */ -function raw (options) { - const normalizedOptions = normalizeOptions(options, 'application/octet-stream') - - const readOptions = { - ...normalizedOptions, - // Skip charset validation and parse the body as is - skipCharset: true - } - - return function rawParser (req, res, next) { - read(req, res, next, passthrough, debug, readOptions) - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/body-parser/lib/types/text.js b/node_modules/@nestjs/platform-express/node_modules/body-parser/lib/types/text.js deleted file mode 100644 index 9df73be..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/body-parser/lib/types/text.js +++ /dev/null @@ -1,36 +0,0 @@ -/*! - * body-parser - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - */ - -var debug = require('debug')('body-parser:text') -var read = require('../read') -var { normalizeOptions, passthrough } = require('../utils') - -/** - * Module exports. - */ - -module.exports = text - -/** - * Create a middleware to parse text bodies. - * - * @param {Object} [options] - * @returns {Function} - * @public - */ -function text (options) { - const normalizedOptions = normalizeOptions(options, 'text/plain') - - return function textParser (req, res, next) { - read(req, res, next, passthrough, debug, normalizedOptions) - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/body-parser/lib/types/urlencoded.js b/node_modules/@nestjs/platform-express/node_modules/body-parser/lib/types/urlencoded.js deleted file mode 100644 index 4a3227c..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/body-parser/lib/types/urlencoded.js +++ /dev/null @@ -1,142 +0,0 @@ -/*! - * body-parser - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var createError = require('http-errors') -var debug = require('debug')('body-parser:urlencoded') -var read = require('../read') -var qs = require('qs') -var { normalizeOptions } = require('../utils') - -/** - * Module exports. - */ - -module.exports = urlencoded - -/** - * Create a middleware to parse urlencoded bodies. - * - * @param {Object} [options] - * @returns {Function} - * @public - */ -function urlencoded (options) { - const normalizedOptions = normalizeOptions(options, 'application/x-www-form-urlencoded') - - if (normalizedOptions.defaultCharset !== 'utf-8' && normalizedOptions.defaultCharset !== 'iso-8859-1') { - throw new TypeError('option defaultCharset must be either utf-8 or iso-8859-1') - } - - // create the appropriate query parser - var queryparse = createQueryParser(options) - - function parse (body, encoding) { - return body.length - ? queryparse(body, encoding) - : {} - } - - const readOptions = { - ...normalizedOptions, - // assert charset - isValidCharset: (charset) => charset === 'utf-8' || charset === 'iso-8859-1' - } - - return function urlencodedParser (req, res, next) { - read(req, res, next, parse, debug, readOptions) - } -} - -/** - * Get the extended query parser. - * - * @param {Object} options - * @returns {Function} - * @private - */ -function createQueryParser (options) { - var extended = Boolean(options?.extended) - var parameterLimit = options?.parameterLimit !== undefined - ? options?.parameterLimit - : 1000 - var charsetSentinel = options?.charsetSentinel - var interpretNumericEntities = options?.interpretNumericEntities - var depth = extended ? (options?.depth !== undefined ? options?.depth : 32) : 0 - - if (isNaN(parameterLimit) || parameterLimit < 1) { - throw new TypeError('option parameterLimit must be a positive number') - } - - if (isNaN(depth) || depth < 0) { - throw new TypeError('option depth must be a zero or a positive number') - } - - if (isFinite(parameterLimit)) { - parameterLimit = parameterLimit | 0 - } - - return function queryparse (body, encoding) { - var paramCount = parameterCount(body, parameterLimit) - - if (paramCount === undefined) { - debug('too many parameters') - throw createError(413, 'too many parameters', { - type: 'parameters.too.many' - }) - } - - var arrayLimit = extended ? Math.max(100, paramCount) : paramCount - - debug('parse ' + (extended ? 'extended ' : '') + 'urlencoding') - try { - return qs.parse(body, { - allowPrototypes: true, - arrayLimit: arrayLimit, - depth: depth, - charsetSentinel: charsetSentinel, - interpretNumericEntities: interpretNumericEntities, - charset: encoding, - parameterLimit: parameterLimit, - strictDepth: true - }) - } catch (err) { - if (err instanceof RangeError) { - throw createError(400, 'The input exceeded the depth', { - type: 'querystring.parse.rangeError' - }) - } else { - throw err - } - } - } -} - -/** - * Count the number of parameters, stopping once limit reached - * - * @param {string} body - * @param {number} limit - * @returns {number|undefined} Returns undefined if limit exceeded - * @private - */ -function parameterCount (body, limit) { - let count = 0 - let index = -1 - do { - count++ - if (count > limit) return undefined // Early exit if limit exceeded - index = body.indexOf('&', index + 1) - } while (index !== -1) - return count -} diff --git a/node_modules/@nestjs/platform-express/node_modules/body-parser/lib/utils.js b/node_modules/@nestjs/platform-express/node_modules/body-parser/lib/utils.js deleted file mode 100644 index e0bf974..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/body-parser/lib/utils.js +++ /dev/null @@ -1,98 +0,0 @@ -'use strict' - -/** - * Module dependencies. - */ - -var bytes = require('bytes') -var contentType = require('content-type') -var typeis = require('type-is') - -/** - * Module exports. - */ -module.exports = { - getCharset, - normalizeOptions, - passthrough -} - -/** - * Get the charset of a request. - * - * @param {Object} req - * @returns {string | undefined} - * @private - */ -function getCharset (req) { - try { - return (contentType.parse(req).parameters.charset || '').toLowerCase() - } catch { - return undefined - } -} - -/** - * Get the simple type checker. - * - * @param {string | string[]} type - * @returns {Function} - * @private - */ -function typeChecker (type) { - return function checkType (req) { - return Boolean(typeis(req, type)) - } -} - -/** - * Normalizes the common options for all parsers. - * - * @param {Object} options options to normalize - * @param {string | string[] | Function} defaultType default content type(s) or a function to determine it - * @returns {Object} - * @private - */ -function normalizeOptions (options, defaultType) { - if (!defaultType) { - // Parsers must define a default content type - throw new TypeError('defaultType must be provided') - } - - var inflate = options?.inflate !== false - var limit = typeof options?.limit !== 'number' - ? bytes.parse(options?.limit || '100kb') - : options?.limit - var type = options?.type || defaultType - var verify = options?.verify || false - var defaultCharset = options?.defaultCharset || 'utf-8' - - if (verify !== false && typeof verify !== 'function') { - throw new TypeError('option verify must be function') - } - - // create the appropriate type checking function - var shouldParse = typeof type !== 'function' - ? typeChecker(type) - : type - - return { - inflate, - limit, - verify, - defaultCharset, - shouldParse - } -} - -/** - * Passthrough function that returns input unchanged. - * Used by parsers that don't need to transform the data. - * - * @param {*} value - * @returns {*} - * @private - */ -function passthrough (value) { - return value -} diff --git a/node_modules/@nestjs/platform-express/node_modules/body-parser/package.json b/node_modules/@nestjs/platform-express/node_modules/body-parser/package.json deleted file mode 100644 index 486878a..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/body-parser/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "body-parser", - "description": "Node.js body parsing middleware", - "version": "2.2.2", - "contributors": [ - "Douglas Christopher Wilson ", - "Jonathan Ong (http://jongleberry.com)" - ], - "license": "MIT", - "repository": "expressjs/body-parser", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - }, - "dependencies": { - "bytes": "^3.1.2", - "content-type": "^1.0.5", - "debug": "^4.4.3", - "http-errors": "^2.0.0", - "iconv-lite": "^0.7.0", - "on-finished": "^2.4.1", - "qs": "^6.14.1", - "raw-body": "^3.0.1", - "type-is": "^2.0.1" - }, - "devDependencies": { - "eslint": "^8.57.1", - "eslint-config-standard": "^14.1.1", - "eslint-plugin-import": "^2.31.0", - "eslint-plugin-markdown": "^3.0.1", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^6.6.0", - "eslint-plugin-standard": "^4.1.0", - "mocha": "^11.1.0", - "nyc": "^17.1.0", - "supertest": "^7.0.0" - }, - "files": [ - "lib/", - "LICENSE", - "index.js" - ], - "engines": { - "node": ">=18" - }, - "scripts": { - "lint": "eslint .", - "test": "mocha --reporter spec --check-leaks test/", - "test-ci": "nyc --reporter=lcovonly --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test" - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/content-disposition/HISTORY.md b/node_modules/@nestjs/platform-express/node_modules/content-disposition/HISTORY.md deleted file mode 100644 index 1a3b308..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/content-disposition/HISTORY.md +++ /dev/null @@ -1,72 +0,0 @@ -1.0.1 / 2025-11-18 -================= - - * Updated `engines` field to Node@18 or higher (fixed reference, see 1.0.0) - * Remove dependency `safe-buffer` - -1.0.0 / 2024-08-31 -================== - - * drop node <18 - * allow utf8 as alias for utf-8 - -0.5.4 / 2021-12-10 -================== - - * deps: safe-buffer@5.2.1 - -0.5.3 / 2018-12-17 -================== - - * Use `safe-buffer` for improved Buffer API - -0.5.2 / 2016-12-08 -================== - - * Fix `parse` to accept any linear whitespace character - -0.5.1 / 2016-01-17 -================== - - * perf: enable strict mode - -0.5.0 / 2014-10-11 -================== - - * Add `parse` function - -0.4.0 / 2014-09-21 -================== - - * Expand non-Unicode `filename` to the full ISO-8859-1 charset - -0.3.0 / 2014-09-20 -================== - - * Add `fallback` option - * Add `type` option - -0.2.0 / 2014-09-19 -================== - - * Reduce ambiguity of file names with hex escape in buggy browsers - -0.1.2 / 2014-09-19 -================== - - * Fix periodic invalid Unicode filename header - -0.1.1 / 2014-09-19 -================== - - * Fix invalid characters appearing in `filename*` parameter - -0.1.0 / 2014-09-18 -================== - - * Make the `filename` argument optional - -0.0.0 / 2014-09-18 -================== - - * Initial release diff --git a/node_modules/@nestjs/platform-express/node_modules/content-disposition/LICENSE b/node_modules/@nestjs/platform-express/node_modules/content-disposition/LICENSE deleted file mode 100644 index 84441fb..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/content-disposition/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2014-2017 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@nestjs/platform-express/node_modules/content-disposition/README.md b/node_modules/@nestjs/platform-express/node_modules/content-disposition/README.md deleted file mode 100644 index fbedc2f..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/content-disposition/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# content-disposition - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][github-actions-ci-image]][github-actions-ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Create and parse HTTP `Content-Disposition` header - -## Installation - -```sh -$ npm install content-disposition -``` - -## API - -```js -const contentDisposition = require('content-disposition') -``` - -### contentDisposition(filename, options) - -Create an attachment `Content-Disposition` header value using the given file name, -if supplied. The `filename` is optional and if no file name is desired, but you -want to specify `options`, set `filename` to `undefined`. - -```js -res.setHeader('Content-Disposition', contentDisposition('∫ maths.pdf')) -``` - -**note** HTTP headers are of the ISO-8859-1 character set. If you are writing this -header through a means different from `setHeader` in Node.js, you'll want to specify -the `'binary'` encoding in Node.js. - -#### Options - -`contentDisposition` accepts these properties in the options object. - -##### fallback - -If the `filename` option is outside ISO-8859-1, then the file name is actually -stored in a supplemental field for clients that support Unicode file names and -a ISO-8859-1 version of the file name is automatically generated. - -This specifies the ISO-8859-1 file name to override the automatic generation or -disables the generation all together, defaults to `true`. - - - A string will specify the ISO-8859-1 file name to use in place of automatic - generation. - - `false` will disable including a ISO-8859-1 file name and only include the - Unicode version (unless the file name is already ISO-8859-1). - - `true` will enable automatic generation if the file name is outside ISO-8859-1. - -If the `filename` option is ISO-8859-1 and this option is specified and has a -different value, then the `filename` option is encoded in the extended field -and this set as the fallback field, even though they are both ISO-8859-1. - -##### type - -Specifies the disposition type, defaults to `"attachment"`. This can also be -`"inline"`, or any other value (all values except inline are treated like -`attachment`, but can convey additional information if both parties agree to -it). The type is normalized to lower-case. - -### contentDisposition.parse(string) - -```js -const disposition = contentDisposition.parse('attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt') -``` - -Parse a `Content-Disposition` header string. This automatically handles extended -("Unicode") parameters by decoding them and providing them under the standard -parameter name. This will return an object with the following properties (examples -are shown for the string `'attachment; filename="EURO rates.txt"; filename*=UTF-8\'\'%e2%82%ac%20rates.txt'`): - - - `type`: The disposition type (always lower case). Example: `'attachment'` - - - `parameters`: An object of the parameters in the disposition (name of parameter - always lower case and extended versions replace non-extended versions). Example: - `{filename: "€ rates.txt"}` - -## Examples - -### Send a file for download - -```js -const contentDisposition = require('content-disposition') -const destroy = require('destroy') -const fs = require('fs') -const http = require('http') -const onFinished = require('on-finished') - -const filePath = '/path/to/public/plans.pdf' - -http.createServer(function onRequest (req, res) { - // set headers - res.setHeader('Content-Type', 'application/pdf') - res.setHeader('Content-Disposition', contentDisposition(filePath)) - - // send file - const stream = fs.createReadStream(filePath) - stream.pipe(res) - onFinished(res, function () { - destroy(stream) - }) -}) -``` - -## Testing - -```sh -$ npm test -``` - -## References - -- [RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1][rfc-2616] -- [RFC 5987: Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters][rfc-5987] -- [RFC 6266: Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)][rfc-6266] -- [Test Cases for HTTP Content-Disposition header field (RFC 6266) and the Encodings defined in RFCs 2047, 2231 and 5987][tc-2231] - -[rfc-2616]: https://tools.ietf.org/html/rfc2616 -[rfc-5987]: https://tools.ietf.org/html/rfc5987 -[rfc-6266]: https://tools.ietf.org/html/rfc6266 -[tc-2231]: http://greenbytes.de/tech/tc2231/ - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/content-disposition -[npm-url]: https://npmjs.org/package/content-disposition -[node-version-image]: https://img.shields.io/node/v/content-disposition -[node-version-url]: https://nodejs.org/en/download -[coveralls-image]: https://img.shields.io/coverallsCoverage/github/jshttp/content-disposition -[coveralls-url]: https://coveralls.io/r/jshttp/content-disposition?branch=master -[downloads-image]: https://img.shields.io/npm/dm/content-disposition -[downloads-url]: https://npmjs.org/package/content-disposition -[github-actions-ci-image]: https://img.shields.io/github/actions/workflow/status/jshttp/content-disposition/ci.yml -[github-actions-ci-url]: https://github.com/jshttp/content-disposition/actions/workflows/ci.yml diff --git a/node_modules/@nestjs/platform-express/node_modules/content-disposition/index.js b/node_modules/@nestjs/platform-express/node_modules/content-disposition/index.js deleted file mode 100644 index efcd9ca..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/content-disposition/index.js +++ /dev/null @@ -1,458 +0,0 @@ -/*! - * content-disposition - * Copyright(c) 2014-2017 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module exports. - * @public - */ - -module.exports = contentDisposition -module.exports.parse = parse - -/** - * Module dependencies. - * @private - */ - -var basename = require('path').basename - -/** - * RegExp to match non attr-char, *after* encodeURIComponent (i.e. not including "%") - * @private - */ - -var ENCODE_URL_ATTR_CHAR_REGEXP = /[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g // eslint-disable-line no-control-regex - -/** - * RegExp to match percent encoding escape. - * @private - */ - -var HEX_ESCAPE_REGEXP = /%[0-9A-Fa-f]{2}/ -var HEX_ESCAPE_REPLACE_REGEXP = /%([0-9A-Fa-f]{2})/g - -/** - * RegExp to match non-latin1 characters. - * @private - */ - -var NON_LATIN1_REGEXP = /[^\x20-\x7e\xa0-\xff]/g - -/** - * RegExp to match quoted-pair in RFC 2616 - * - * quoted-pair = "\" CHAR - * CHAR = - * @private - */ - -var QESC_REGEXP = /\\([\u0000-\u007f])/g // eslint-disable-line no-control-regex - -/** - * RegExp to match chars that must be quoted-pair in RFC 2616 - * @private - */ - -var QUOTE_REGEXP = /([\\"])/g - -/** - * RegExp for various RFC 2616 grammar - * - * parameter = token "=" ( token | quoted-string ) - * token = 1* - * separators = "(" | ")" | "<" | ">" | "@" - * | "," | ";" | ":" | "\" | <"> - * | "/" | "[" | "]" | "?" | "=" - * | "{" | "}" | SP | HT - * quoted-string = ( <"> *(qdtext | quoted-pair ) <"> ) - * qdtext = > - * quoted-pair = "\" CHAR - * CHAR = - * TEXT = - * LWS = [CRLF] 1*( SP | HT ) - * CRLF = CR LF - * CR = - * LF = - * SP = - * HT = - * CTL = - * OCTET = - * @private - */ - -var PARAM_REGEXP = /;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g // eslint-disable-line no-control-regex -var TEXT_REGEXP = /^[\x20-\x7e\x80-\xff]+$/ -var TOKEN_REGEXP = /^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/ - -/** - * RegExp for various RFC 5987 grammar - * - * ext-value = charset "'" [ language ] "'" value-chars - * charset = "UTF-8" / "ISO-8859-1" / mime-charset - * mime-charset = 1*mime-charsetc - * mime-charsetc = ALPHA / DIGIT - * / "!" / "#" / "$" / "%" / "&" - * / "+" / "-" / "^" / "_" / "`" - * / "{" / "}" / "~" - * language = ( 2*3ALPHA [ extlang ] ) - * / 4ALPHA - * / 5*8ALPHA - * extlang = *3( "-" 3ALPHA ) - * value-chars = *( pct-encoded / attr-char ) - * pct-encoded = "%" HEXDIG HEXDIG - * attr-char = ALPHA / DIGIT - * / "!" / "#" / "$" / "&" / "+" / "-" / "." - * / "^" / "_" / "`" / "|" / "~" - * @private - */ - -var EXT_VALUE_REGEXP = /^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/ - -/** - * RegExp for various RFC 6266 grammar - * - * disposition-type = "inline" | "attachment" | disp-ext-type - * disp-ext-type = token - * disposition-parm = filename-parm | disp-ext-parm - * filename-parm = "filename" "=" value - * | "filename*" "=" ext-value - * disp-ext-parm = token "=" value - * | ext-token "=" ext-value - * ext-token = - * @private - */ - -var DISPOSITION_TYPE_REGEXP = /^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/ // eslint-disable-line no-control-regex - -/** - * Create an attachment Content-Disposition header. - * - * @param {string} [filename] - * @param {object} [options] - * @param {string} [options.type=attachment] - * @param {string|boolean} [options.fallback=true] - * @return {string} - * @public - */ - -function contentDisposition (filename, options) { - var opts = options || {} - - // get type - var type = opts.type || 'attachment' - - // get parameters - var params = createparams(filename, opts.fallback) - - // format into string - return format(new ContentDisposition(type, params)) -} - -/** - * Create parameters object from filename and fallback. - * - * @param {string} [filename] - * @param {string|boolean} [fallback=true] - * @return {object} - * @private - */ - -function createparams (filename, fallback) { - if (filename === undefined) { - return - } - - var params = {} - - if (typeof filename !== 'string') { - throw new TypeError('filename must be a string') - } - - // fallback defaults to true - if (fallback === undefined) { - fallback = true - } - - if (typeof fallback !== 'string' && typeof fallback !== 'boolean') { - throw new TypeError('fallback must be a string or boolean') - } - - if (typeof fallback === 'string' && NON_LATIN1_REGEXP.test(fallback)) { - throw new TypeError('fallback must be ISO-8859-1 string') - } - - // restrict to file base name - var name = basename(filename) - - // determine if name is suitable for quoted string - var isQuotedString = TEXT_REGEXP.test(name) - - // generate fallback name - var fallbackName = typeof fallback !== 'string' - ? fallback && getlatin1(name) - : basename(fallback) - var hasFallback = typeof fallbackName === 'string' && fallbackName !== name - - // set extended filename parameter - if (hasFallback || !isQuotedString || HEX_ESCAPE_REGEXP.test(name)) { - params['filename*'] = name - } - - // set filename parameter - if (isQuotedString || hasFallback) { - params.filename = hasFallback - ? fallbackName - : name - } - - return params -} - -/** - * Format object to Content-Disposition header. - * - * @param {object} obj - * @param {string} obj.type - * @param {object} [obj.parameters] - * @return {string} - * @private - */ - -function format (obj) { - var parameters = obj.parameters - var type = obj.type - - if (!type || typeof type !== 'string' || !TOKEN_REGEXP.test(type)) { - throw new TypeError('invalid type') - } - - // start with normalized type - var string = String(type).toLowerCase() - - // append parameters - if (parameters && typeof parameters === 'object') { - var param - var params = Object.keys(parameters).sort() - - for (var i = 0; i < params.length; i++) { - param = params[i] - - var val = param.slice(-1) === '*' - ? ustring(parameters[param]) - : qstring(parameters[param]) - - string += '; ' + param + '=' + val - } - } - - return string -} - -/** - * Decode a RFC 5987 field value (gracefully). - * - * @param {string} str - * @return {string} - * @private - */ - -function decodefield (str) { - var match = EXT_VALUE_REGEXP.exec(str) - - if (!match) { - throw new TypeError('invalid extended field value') - } - - var charset = match[1].toLowerCase() - var encoded = match[2] - var value - - // to binary string - var binary = encoded.replace(HEX_ESCAPE_REPLACE_REGEXP, pdecode) - - switch (charset) { - case 'iso-8859-1': - value = getlatin1(binary) - break - case 'utf-8': - case 'utf8': - value = Buffer.from(binary, 'binary').toString('utf8') - break - default: - throw new TypeError('unsupported charset in extended field') - } - - return value -} - -/** - * Get ISO-8859-1 version of string. - * - * @param {string} val - * @return {string} - * @private - */ - -function getlatin1 (val) { - // simple Unicode -> ISO-8859-1 transformation - return String(val).replace(NON_LATIN1_REGEXP, '?') -} - -/** - * Parse Content-Disposition header string. - * - * @param {string} string - * @return {object} - * @public - */ - -function parse (string) { - if (!string || typeof string !== 'string') { - throw new TypeError('argument string is required') - } - - var match = DISPOSITION_TYPE_REGEXP.exec(string) - - if (!match) { - throw new TypeError('invalid type format') - } - - // normalize type - var index = match[0].length - var type = match[1].toLowerCase() - - var key - var names = [] - var params = {} - var value - - // calculate index to start at - index = PARAM_REGEXP.lastIndex = match[0].slice(-1) === ';' - ? index - 1 - : index - - // match parameters - while ((match = PARAM_REGEXP.exec(string))) { - if (match.index !== index) { - throw new TypeError('invalid parameter format') - } - - index += match[0].length - key = match[1].toLowerCase() - value = match[2] - - if (names.indexOf(key) !== -1) { - throw new TypeError('invalid duplicate parameter') - } - - names.push(key) - - if (key.indexOf('*') + 1 === key.length) { - // decode extended value - key = key.slice(0, -1) - value = decodefield(value) - - // overwrite existing value - params[key] = value - continue - } - - if (typeof params[key] === 'string') { - continue - } - - if (value[0] === '"') { - // remove quotes and escapes - value = value - .slice(1, -1) - .replace(QESC_REGEXP, '$1') - } - - params[key] = value - } - - if (index !== -1 && index !== string.length) { - throw new TypeError('invalid parameter format') - } - - return new ContentDisposition(type, params) -} - -/** - * Percent decode a single character. - * - * @param {string} str - * @param {string} hex - * @return {string} - * @private - */ - -function pdecode (str, hex) { - return String.fromCharCode(parseInt(hex, 16)) -} - -/** - * Percent encode a single character. - * - * @param {string} char - * @return {string} - * @private - */ - -function pencode (char) { - return '%' + String(char) - .charCodeAt(0) - .toString(16) - .toUpperCase() -} - -/** - * Quote a string for HTTP. - * - * @param {string} val - * @return {string} - * @private - */ - -function qstring (val) { - var str = String(val) - - return '"' + str.replace(QUOTE_REGEXP, '\\$1') + '"' -} - -/** - * Encode a Unicode string for HTTP (RFC 5987). - * - * @param {string} val - * @return {string} - * @private - */ - -function ustring (val) { - var str = String(val) - - // percent encode as UTF-8 - var encoded = encodeURIComponent(str) - .replace(ENCODE_URL_ATTR_CHAR_REGEXP, pencode) - - return 'UTF-8\'\'' + encoded -} - -/** - * Class for parsed Content-Disposition header for v8 optimization - * - * @public - * @param {string} type - * @param {object} parameters - * @constructor - */ - -function ContentDisposition (type, parameters) { - this.type = type - this.parameters = parameters -} diff --git a/node_modules/@nestjs/platform-express/node_modules/content-disposition/package.json b/node_modules/@nestjs/platform-express/node_modules/content-disposition/package.json deleted file mode 100644 index a44034c..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/content-disposition/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "content-disposition", - "description": "Create and parse Content-Disposition header", - "version": "1.0.1", - "author": "Douglas Christopher Wilson ", - "license": "MIT", - "keywords": [ - "content-disposition", - "http", - "rfc6266", - "res" - ], - "repository": "jshttp/content-disposition", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - }, - "devDependencies": { - "c8": "^10.1.2", - "eslint": "7.32.0", - "eslint-config-standard": "13.0.1", - "eslint-plugin-import": "2.25.3", - "eslint-plugin-markdown": "2.2.1", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "5.2.0", - "eslint-plugin-standard": "4.1.0" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "README.md", - "index.js" - ], - "engines": { - "node": ">=18" - }, - "scripts": { - "lint": "eslint .", - "test": "node --test --test-reporter spec", - "test-ci": "c8 --reporter=lcovonly --reporter=text npm test", - "test-cov": "c8 --reporter=html --reporter=text npm test" - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/cookie-signature/History.md b/node_modules/@nestjs/platform-express/node_modules/cookie-signature/History.md deleted file mode 100644 index 479211a..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/cookie-signature/History.md +++ /dev/null @@ -1,70 +0,0 @@ -1.2.2 / 2024-10-29 -================== - -* various metadata/documentation tweaks (incl. #51) - - -1.2.1 / 2023-02-27 -================== - -* update annotations for allowed secret key types (#44, thanks @jyasskin!) - - -1.2.0 / 2022-02-17 -================== - -* allow buffer and other node-supported types as key (#33) -* be pickier about extra content after signed portion (#40) -* some internal code clarity/cleanup improvements (#26) - - -1.1.0 / 2018-01-18 -================== - -* switch to built-in `crypto.timingSafeEqual` for validation instead of previous double-hash method (thank you @jodevsa!) - - -1.0.7 / 2023-04-12 -================== - -Later release for older node.js versions. See the [v1.0.x branch notes](https://github.com/tj/node-cookie-signature/blob/v1.0.x/History.md#107--2023-04-12). - - -1.0.6 / 2015-02-03 -================== - -* use `npm test` instead of `make test` to run tests -* clearer assertion messages when checking input - - -1.0.5 / 2014-09-05 -================== - -* add license to package.json - -1.0.4 / 2014-06-25 -================== - - * corrected avoidance of timing attacks (thanks @tenbits!) - -1.0.3 / 2014-01-28 -================== - - * [incorrect] fix for timing attacks - -1.0.2 / 2014-01-28 -================== - - * fix missing repository warning - * fix typo in test - -1.0.1 / 2013-04-15 -================== - - * Revert "Changed underlying HMAC algo. to sha512." - * Revert "Fix for timing attacks on MAC verification." - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/@nestjs/platform-express/node_modules/cookie-signature/LICENSE b/node_modules/@nestjs/platform-express/node_modules/cookie-signature/LICENSE deleted file mode 100644 index a2671bf..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/cookie-signature/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2012–2024 LearnBoost and other contributors; - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@nestjs/platform-express/node_modules/cookie-signature/Readme.md b/node_modules/@nestjs/platform-express/node_modules/cookie-signature/Readme.md deleted file mode 100644 index 369af15..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/cookie-signature/Readme.md +++ /dev/null @@ -1,23 +0,0 @@ - -# cookie-signature - - Sign and unsign cookies. - -## Example - -```js -var cookie = require('cookie-signature'); - -var val = cookie.sign('hello', 'tobiiscool'); -val.should.equal('hello.DGDUkGlIkCzPz+C0B064FNgHdEjox7ch8tOBGslZ5QI'); - -var val = cookie.sign('hello', 'tobiiscool'); -cookie.unsign(val, 'tobiiscool').should.equal('hello'); -cookie.unsign(val, 'luna').should.be.false; -``` - -## License - -MIT. - -See LICENSE file for details. diff --git a/node_modules/@nestjs/platform-express/node_modules/cookie-signature/index.js b/node_modules/@nestjs/platform-express/node_modules/cookie-signature/index.js deleted file mode 100644 index 3fbbddb..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/cookie-signature/index.js +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Module dependencies. - */ - -var crypto = require('crypto'); - -/** - * Sign the given `val` with `secret`. - * - * @param {String} val - * @param {String|NodeJS.ArrayBufferView|crypto.KeyObject} secret - * @return {String} - * @api private - */ - -exports.sign = function(val, secret){ - if ('string' != typeof val) throw new TypeError("Cookie value must be provided as a string."); - if (null == secret) throw new TypeError("Secret key must be provided."); - return val + '.' + crypto - .createHmac('sha256', secret) - .update(val) - .digest('base64') - .replace(/\=+$/, ''); -}; - -/** - * Unsign and decode the given `input` with `secret`, - * returning `false` if the signature is invalid. - * - * @param {String} input - * @param {String|NodeJS.ArrayBufferView|crypto.KeyObject} secret - * @return {String|Boolean} - * @api private - */ - -exports.unsign = function(input, secret){ - if ('string' != typeof input) throw new TypeError("Signed cookie string must be provided."); - if (null == secret) throw new TypeError("Secret key must be provided."); - var tentativeValue = input.slice(0, input.lastIndexOf('.')), - expectedInput = exports.sign(tentativeValue, secret), - expectedBuffer = Buffer.from(expectedInput), - inputBuffer = Buffer.from(input); - return ( - expectedBuffer.length === inputBuffer.length && - crypto.timingSafeEqual(expectedBuffer, inputBuffer) - ) ? tentativeValue : false; -}; diff --git a/node_modules/@nestjs/platform-express/node_modules/cookie-signature/package.json b/node_modules/@nestjs/platform-express/node_modules/cookie-signature/package.json deleted file mode 100644 index a160040..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/cookie-signature/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "cookie-signature", - "version": "1.2.2", - "main": "index.js", - "description": "Sign and unsign cookies", - "keywords": ["cookie", "sign", "unsign"], - "author": "TJ Holowaychuk ", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/visionmedia/node-cookie-signature.git" - }, - "dependencies": {}, - "engines": { - "node": ">=6.6.0" - }, - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "scripts": { - "test": "mocha --require should --reporter spec" - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/debug/LICENSE b/node_modules/@nestjs/platform-express/node_modules/debug/LICENSE deleted file mode 100644 index 1a9820e..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/debug/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -(The MIT License) - -Copyright (c) 2014-2017 TJ Holowaychuk -Copyright (c) 2018-2021 Josh Junon - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/@nestjs/platform-express/node_modules/debug/README.md b/node_modules/@nestjs/platform-express/node_modules/debug/README.md deleted file mode 100644 index 9ebdfbf..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/debug/README.md +++ /dev/null @@ -1,481 +0,0 @@ -# debug -[![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) -[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) - - - -A tiny JavaScript debugging utility modelled after Node.js core's debugging -technique. Works in Node.js and web browsers. - -## Installation - -```bash -$ npm install debug -``` - -## Usage - -`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. - -Example [_app.js_](./examples/node/app.js): - -```js -var debug = require('debug')('http') - , http = require('http') - , name = 'My App'; - -// fake app - -debug('booting %o', name); - -http.createServer(function(req, res){ - debug(req.method + ' ' + req.url); - res.end('hello\n'); -}).listen(3000, function(){ - debug('listening'); -}); - -// fake worker of some kind - -require('./worker'); -``` - -Example [_worker.js_](./examples/node/worker.js): - -```js -var a = require('debug')('worker:a') - , b = require('debug')('worker:b'); - -function work() { - a('doing lots of uninteresting work'); - setTimeout(work, Math.random() * 1000); -} - -work(); - -function workb() { - b('doing some work'); - setTimeout(workb, Math.random() * 2000); -} - -workb(); -``` - -The `DEBUG` environment variable is then used to enable these based on space or -comma-delimited names. - -Here are some examples: - -screen shot 2017-08-08 at 12 53 04 pm -screen shot 2017-08-08 at 12 53 38 pm -screen shot 2017-08-08 at 12 53 25 pm - -#### Windows command prompt notes - -##### CMD - -On Windows the environment variable is set using the `set` command. - -```cmd -set DEBUG=*,-not_this -``` - -Example: - -```cmd -set DEBUG=* & node app.js -``` - -##### PowerShell (VS Code default) - -PowerShell uses different syntax to set environment variables. - -```cmd -$env:DEBUG = "*,-not_this" -``` - -Example: - -```cmd -$env:DEBUG='app';node app.js -``` - -Then, run the program to be debugged as usual. - -npm script example: -```js - "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", -``` - -## Namespace Colors - -Every debug instance has a color generated for it based on its namespace name. -This helps when visually parsing the debug output to identify which debug instance -a debug line belongs to. - -#### Node.js - -In Node.js, colors are enabled when stderr is a TTY. You also _should_ install -the [`supports-color`](https://npmjs.org/supports-color) module alongside debug, -otherwise debug will only use a small handful of basic colors. - - - -#### Web Browser - -Colors are also enabled on "Web Inspectors" that understand the `%c` formatting -option. These are WebKit web inspectors, Firefox ([since version -31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) -and the Firebug plugin for Firefox (any version). - - - - -## Millisecond diff - -When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - - - -When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below: - - - - -## Conventions - -If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output. - -## Wildcards - -The `*` character may be used as a wildcard. Suppose for example your library has -debuggers named "connect:bodyParser", "connect:compress", "connect:session", -instead of listing all three with -`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do -`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. - -You can also exclude specific debuggers by prefixing them with a "-" character. -For example, `DEBUG=*,-connect:*` would include all debuggers except those -starting with "connect:". - -## Environment Variables - -When running through Node.js, you can set a few environment variables that will -change the behavior of the debug logging: - -| Name | Purpose | -|-----------|-------------------------------------------------| -| `DEBUG` | Enables/disables specific debugging namespaces. | -| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). | -| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | -| `DEBUG_DEPTH` | Object inspection depth. | -| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | - - -__Note:__ The environment variables beginning with `DEBUG_` end up being -converted into an Options object that gets used with `%o`/`%O` formatters. -See the Node.js documentation for -[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) -for the complete list. - -## Formatters - -Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. -Below are the officially supported formatters: - -| Formatter | Representation | -|-----------|----------------| -| `%O` | Pretty-print an Object on multiple lines. | -| `%o` | Pretty-print an Object all on a single line. | -| `%s` | String. | -| `%d` | Number (both integer and float). | -| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | -| `%%` | Single percent sign ('%'). This does not consume an argument. | - - -### Custom formatters - -You can add custom formatters by extending the `debug.formatters` object. -For example, if you wanted to add support for rendering a Buffer as hex with -`%h`, you could do something like: - -```js -const createDebug = require('debug') -createDebug.formatters.h = (v) => { - return v.toString('hex') -} - -// …elsewhere -const debug = createDebug('foo') -debug('this is hex: %h', new Buffer('hello world')) -// foo this is hex: 68656c6c6f20776f726c6421 +0ms -``` - - -## Browser Support - -You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), -or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), -if you don't want to build it yourself. - -Debug's enable state is currently persisted by `localStorage`. -Consider the situation shown below where you have `worker:a` and `worker:b`, -and wish to debug both. You can enable this using `localStorage.debug`: - -```js -localStorage.debug = 'worker:*' -``` - -And then refresh the page. - -```js -a = debug('worker:a'); -b = debug('worker:b'); - -setInterval(function(){ - a('doing some work'); -}, 1000); - -setInterval(function(){ - b('doing some work'); -}, 1200); -``` - -In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_. - - - -## Output streams - - By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: - -Example [_stdout.js_](./examples/node/stdout.js): - -```js -var debug = require('debug'); -var error = debug('app:error'); - -// by default stderr is used -error('goes to stderr!'); - -var log = debug('app:log'); -// set this namespace to log via console.log -log.log = console.log.bind(console); // don't forget to bind to console! -log('goes to stdout'); -error('still goes to stderr!'); - -// set all output to go via console.info -// overrides all per-namespace log settings -debug.log = console.info.bind(console); -error('now goes to stdout via console.info'); -log('still goes to stdout, but via console.info now'); -``` - -## Extend -You can simply extend debugger -```js -const log = require('debug')('auth'); - -//creates new debug instance with extended namespace -const logSign = log.extend('sign'); -const logLogin = log.extend('login'); - -log('hello'); // auth hello -logSign('hello'); //auth:sign hello -logLogin('hello'); //auth:login hello -``` - -## Set dynamically - -You can also enable debug dynamically by calling the `enable()` method : - -```js -let debug = require('debug'); - -console.log(1, debug.enabled('test')); - -debug.enable('test'); -console.log(2, debug.enabled('test')); - -debug.disable(); -console.log(3, debug.enabled('test')); - -``` - -print : -``` -1 false -2 true -3 false -``` - -Usage : -`enable(namespaces)` -`namespaces` can include modes separated by a colon and wildcards. - -Note that calling `enable()` completely overrides previously set DEBUG variable : - -``` -$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))' -=> false -``` - -`disable()` - -Will disable all namespaces. The functions returns the namespaces currently -enabled (and skipped). This can be useful if you want to disable debugging -temporarily without knowing what was enabled to begin with. - -For example: - -```js -let debug = require('debug'); -debug.enable('foo:*,-foo:bar'); -let namespaces = debug.disable(); -debug.enable(namespaces); -``` - -Note: There is no guarantee that the string will be identical to the initial -enable string, but semantically they will be identical. - -## Checking whether a debug target is enabled - -After you've created a debug instance, you can determine whether or not it is -enabled by checking the `enabled` property: - -```javascript -const debug = require('debug')('http'); - -if (debug.enabled) { - // do stuff... -} -``` - -You can also manually toggle this property to force the debug instance to be -enabled or disabled. - -## Usage in child processes - -Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process. -For example: - -```javascript -worker = fork(WORKER_WRAP_PATH, [workerPath], { - stdio: [ - /* stdin: */ 0, - /* stdout: */ 'pipe', - /* stderr: */ 'pipe', - 'ipc', - ], - env: Object.assign({}, process.env, { - DEBUG_COLORS: 1 // without this settings, colors won't be shown - }), -}); - -worker.stderr.pipe(process.stderr, { end: false }); -``` - - -## Authors - - - TJ Holowaychuk - - Nathan Rajlich - - Andrew Rhyne - - Josh Junon - -## Backers - -Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Sponsors - -Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## License - -(The MIT License) - -Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> -Copyright (c) 2018-2021 Josh Junon - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@nestjs/platform-express/node_modules/debug/package.json b/node_modules/@nestjs/platform-express/node_modules/debug/package.json deleted file mode 100644 index ee8abb5..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/debug/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "debug", - "version": "4.4.3", - "repository": { - "type": "git", - "url": "git://github.com/debug-js/debug.git" - }, - "description": "Lightweight debugging utility for Node.js and the browser", - "keywords": [ - "debug", - "log", - "debugger" - ], - "files": [ - "src", - "LICENSE", - "README.md" - ], - "author": "Josh Junon (https://github.com/qix-)", - "contributors": [ - "TJ Holowaychuk ", - "Nathan Rajlich (http://n8.io)", - "Andrew Rhyne " - ], - "license": "MIT", - "scripts": { - "lint": "xo", - "test": "npm run test:node && npm run test:browser && npm run lint", - "test:node": "mocha test.js test.node.js", - "test:browser": "karma start --single-run", - "test:coverage": "cat ./coverage/lcov.info | coveralls" - }, - "dependencies": { - "ms": "^2.1.3" - }, - "devDependencies": { - "brfs": "^2.0.1", - "browserify": "^16.2.3", - "coveralls": "^3.0.2", - "karma": "^3.1.4", - "karma-browserify": "^6.0.0", - "karma-chrome-launcher": "^2.2.0", - "karma-mocha": "^1.3.0", - "mocha": "^5.2.0", - "mocha-lcov-reporter": "^1.2.0", - "sinon": "^14.0.0", - "xo": "^0.23.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - }, - "main": "./src/index.js", - "browser": "./src/browser.js", - "engines": { - "node": ">=6.0" - }, - "xo": { - "rules": { - "import/extensions": "off" - } - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/debug/src/browser.js b/node_modules/@nestjs/platform-express/node_modules/debug/src/browser.js deleted file mode 100644 index 5993451..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/debug/src/browser.js +++ /dev/null @@ -1,272 +0,0 @@ -/* eslint-env browser */ - -/** - * This is the web browser implementation of `debug()`. - */ - -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = localstorage(); -exports.destroy = (() => { - let warned = false; - - return () => { - if (!warned) { - warned = true; - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - }; -})(); - -/** - * Colors. - */ - -exports.colors = [ - '#0000CC', - '#0000FF', - '#0033CC', - '#0033FF', - '#0066CC', - '#0066FF', - '#0099CC', - '#0099FF', - '#00CC00', - '#00CC33', - '#00CC66', - '#00CC99', - '#00CCCC', - '#00CCFF', - '#3300CC', - '#3300FF', - '#3333CC', - '#3333FF', - '#3366CC', - '#3366FF', - '#3399CC', - '#3399FF', - '#33CC00', - '#33CC33', - '#33CC66', - '#33CC99', - '#33CCCC', - '#33CCFF', - '#6600CC', - '#6600FF', - '#6633CC', - '#6633FF', - '#66CC00', - '#66CC33', - '#9900CC', - '#9900FF', - '#9933CC', - '#9933FF', - '#99CC00', - '#99CC33', - '#CC0000', - '#CC0033', - '#CC0066', - '#CC0099', - '#CC00CC', - '#CC00FF', - '#CC3300', - '#CC3333', - '#CC3366', - '#CC3399', - '#CC33CC', - '#CC33FF', - '#CC6600', - '#CC6633', - '#CC9900', - '#CC9933', - '#CCCC00', - '#CCCC33', - '#FF0000', - '#FF0033', - '#FF0066', - '#FF0099', - '#FF00CC', - '#FF00FF', - '#FF3300', - '#FF3333', - '#FF3366', - '#FF3399', - '#FF33CC', - '#FF33FF', - '#FF6600', - '#FF6633', - '#FF9900', - '#FF9933', - '#FFCC00', - '#FFCC33' -]; - -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - -// eslint-disable-next-line complexity -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } - - // Internet Explorer and Edge do not support colors. - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - - let m; - - // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - // eslint-disable-next-line no-return-assign - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // Is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) || - // Double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); -} - -/** - * Colorize log arguments if enabled. - * - * @api public - */ - -function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + - this.namespace + - (this.useColors ? ' %c' : ' ') + - args[0] + - (this.useColors ? '%c ' : ' ') + - '+' + module.exports.humanize(this.diff); - - if (!this.useColors) { - return; - } - - const c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); - - // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, match => { - if (match === '%%') { - return; - } - index++; - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); -} - -/** - * Invokes `console.debug()` when available. - * No-op when `console.debug` is not a "function". - * If `console.debug` is not available, falls back - * to `console.log`. - * - * @api public - */ -exports.log = console.debug || console.log || (() => {}); - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ -function load() { - let r; - try { - r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } - - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; -} - -/** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - -function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -module.exports = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } -}; diff --git a/node_modules/@nestjs/platform-express/node_modules/debug/src/common.js b/node_modules/@nestjs/platform-express/node_modules/debug/src/common.js deleted file mode 100644 index 141cb57..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/debug/src/common.js +++ /dev/null @@ -1,292 +0,0 @@ - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - */ - -function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = require('ms'); - createDebug.destroy = destroy; - - Object.keys(env).forEach(key => { - createDebug[key] = env[key]; - }); - - /** - * The currently active debug mode names, and names to skip. - */ - - createDebug.names = []; - createDebug.skips = []; - - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - createDebug.formatters = {}; - - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - function selectColor(namespace) { - let hash = 0; - - for (let i = 0; i < namespace.length; i++) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; - - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; - - function debug(...args) { - // Disabled? - if (!debug.enabled) { - return; - } - - const self = debug; - - // Set `diff` timestamp - const curr = Number(new Date()); - const ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - args[0] = createDebug.coerce(args[0]); - - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } - - // Apply any `formatters` transformations - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return '%'; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === 'function') { - const val = args[index]; - match = formatter.call(self, val); - - // Now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // Apply env-specific formatting (colors, etc.) - createDebug.formatArgs.call(self, args); - - const logFn = self.log || createDebug.log; - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.useColors = createDebug.useColors(); - debug.color = createDebug.selectColor(namespace); - debug.extend = extend; - debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. - - Object.defineProperty(debug, 'enabled', { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } - - return enabledCache; - }, - set: v => { - enableOverride = v; - } - }); - - // Env-specific initialization logic for debug instances - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } - - return debug; - } - - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; - - createDebug.names = []; - createDebug.skips = []; - - const split = (typeof namespaces === 'string' ? namespaces : '') - .trim() - .replace(/\s+/g, ',') - .split(',') - .filter(Boolean); - - for (const ns of split) { - if (ns[0] === '-') { - createDebug.skips.push(ns.slice(1)); - } else { - createDebug.names.push(ns); - } - } - } - - /** - * Checks if the given string matches a namespace template, honoring - * asterisks as wildcards. - * - * @param {String} search - * @param {String} template - * @return {Boolean} - */ - function matchesTemplate(search, template) { - let searchIndex = 0; - let templateIndex = 0; - let starIndex = -1; - let matchIndex = 0; - - while (searchIndex < search.length) { - if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) { - // Match character or proceed with wildcard - if (template[templateIndex] === '*') { - starIndex = templateIndex; - matchIndex = searchIndex; - templateIndex++; // Skip the '*' - } else { - searchIndex++; - templateIndex++; - } - } else if (starIndex !== -1) { // eslint-disable-line no-negated-condition - // Backtrack to the last '*' and try to match more characters - templateIndex = starIndex + 1; - matchIndex++; - searchIndex = matchIndex; - } else { - return false; // No match - } - } - - // Handle trailing '*' in template - while (templateIndex < template.length && template[templateIndex] === '*') { - templateIndex++; - } - - return templateIndex === template.length; - } - - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - function disable() { - const namespaces = [ - ...createDebug.names, - ...createDebug.skips.map(namespace => '-' + namespace) - ].join(','); - createDebug.enable(''); - return namespaces; - } - - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - function enabled(name) { - for (const skip of createDebug.skips) { - if (matchesTemplate(name, skip)) { - return false; - } - } - - for (const ns of createDebug.names) { - if (matchesTemplate(name, ns)) { - return true; - } - } - - return false; - } - - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } - - /** - * XXX DO NOT USE. This is a temporary stub function. - * XXX It WILL be removed in the next major release. - */ - function destroy() { - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - - createDebug.enable(createDebug.load()); - - return createDebug; -} - -module.exports = setup; diff --git a/node_modules/@nestjs/platform-express/node_modules/debug/src/index.js b/node_modules/@nestjs/platform-express/node_modules/debug/src/index.js deleted file mode 100644 index bf4c57f..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/debug/src/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Detect Electron renderer / nwjs process, which is node, but we should - * treat as a browser. - */ - -if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { - module.exports = require('./browser.js'); -} else { - module.exports = require('./node.js'); -} diff --git a/node_modules/@nestjs/platform-express/node_modules/debug/src/node.js b/node_modules/@nestjs/platform-express/node_modules/debug/src/node.js deleted file mode 100644 index 715560a..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/debug/src/node.js +++ /dev/null @@ -1,263 +0,0 @@ -/** - * Module dependencies. - */ - -const tty = require('tty'); -const util = require('util'); - -/** - * This is the Node.js implementation of `debug()`. - */ - -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.destroy = util.deprecate( - () => {}, - 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' -); - -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -try { - // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) - // eslint-disable-next-line import/no-extraneous-dependencies - const supportsColor = require('supports-color'); - - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } -} catch (error) { - // Swallow - we only care if `supports-color` is available; it doesn't have to be. -} - -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - -exports.inspectOpts = Object.keys(process.env).filter(key => { - return /^debug_/i.test(key); -}).reduce((obj, key) => { - // Camel-case - const prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); - - // Coerce string value into JS value - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === 'null') { - val = null; - } else { - val = Number(val); - } - - obj[prop] = val; - return obj; -}, {}); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - return 'colors' in exports.inspectOpts ? - Boolean(exports.inspectOpts.colors) : - tty.isatty(process.stderr.fd); -} - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs(args) { - const {namespace: name, useColors} = this; - - if (useColors) { - const c = this.color; - const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); - const prefix = ` ${colorCode};1m${name} \u001B[0m`; - - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } -} - -function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } - return new Date().toISOString() + ' '; -} - -/** - * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr. - */ - -function log(...args) { - return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - -function init(debug) { - debug.inspectOpts = {}; - - const keys = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -module.exports = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n') - .map(str => str.trim()) - .join(' '); -}; - -/** - * Map %O to `util.inspect()`, allowing multiple lines if needed. - */ - -formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; diff --git a/node_modules/@nestjs/platform-express/node_modules/express/LICENSE b/node_modules/@nestjs/platform-express/node_modules/express/LICENSE deleted file mode 100644 index aa927e4..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/express/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2009-2014 TJ Holowaychuk -Copyright (c) 2013-2014 Roman Shtylman -Copyright (c) 2014-2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@nestjs/platform-express/node_modules/express/Readme.md b/node_modules/@nestjs/platform-express/node_modules/express/Readme.md deleted file mode 100644 index 4c5b6f7..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/express/Readme.md +++ /dev/null @@ -1,276 +0,0 @@ -[![Express Logo](https://i.cloudup.com/zfY6lL7eFa-3000x3000.png)](https://expressjs.com/) - -**Fast, unopinionated, minimalist web framework for [Node.js](https://nodejs.org).** - -**This project has a [Code of Conduct].** - -## Table of contents - -- [Table of contents](#table-of-contents) -- [Installation](#installation) -- [Features](#features) -- [Docs \& Community](#docs--community) -- [Quick Start](#quick-start) -- [Philosophy](#philosophy) -- [Examples](#examples) -- [Contributing](#contributing) - - [Security Issues](#security-issues) - - [Running Tests](#running-tests) -- [Current project team members](#current-project-team-members) - - [TC (Technical Committee)](#tc-technical-committee) - - [TC emeriti members](#tc-emeriti-members) - - [Triagers](#triagers) - - [Emeritus Triagers](#emeritus-triagers) -- [License](#license) - - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-downloads-url] -[![Linux Build][github-actions-ci-image]][github-actions-ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] -[![OpenSSF Scorecard Badge][ossf-scorecard-badge]][ossf-scorecard-visualizer] - - -```js -import express from 'express' - -const app = express() - -app.get('/', (req, res) => { - res.send('Hello World') -}) - -app.listen(3000, () => { - console.log('Server is running on http://localhost:3000') -}) -``` - -## Installation - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). - -Before installing, [download and install Node.js](https://nodejs.org/en/download/). -Node.js 18 or higher is required. - -If this is a brand new project, make sure to create a `package.json` first with -the [`npm init` command](https://docs.npmjs.com/creating-a-package-json-file). - -Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```bash -npm install express -``` - -Follow [our installing guide](https://expressjs.com/en/starter/installing.html) -for more information. - -## Features - - * Robust routing - * Focus on high performance - * Super-high test coverage - * HTTP helpers (redirection, caching, etc) - * View system supporting 14+ template engines - * Content negotiation - * Executable for generating applications quickly - -## Docs & Community - - * [Website and Documentation](https://expressjs.com/) - [[website repo](https://github.com/expressjs/expressjs.com)] - * [GitHub Organization](https://github.com/expressjs) for Official Middleware & Modules - * [Github Discussions](https://github.com/expressjs/discussions) for discussion on the development and usage of Express - -**PROTIP** Be sure to read the [migration guide to v5](https://expressjs.com/en/guide/migrating-5) - -## Quick Start - - The quickest way to get started with express is to utilize the executable [`express(1)`](https://github.com/expressjs/generator) to generate an application as shown below: - - Install the executable. The executable's major version will match Express's: - -```bash -npm install -g express-generator@4 -``` - - Create the app: - -```bash -express /tmp/foo && cd /tmp/foo -``` - - Install dependencies: - -```bash -npm install -``` - - Start the server: - -```bash -npm start -``` - - View the website at: http://localhost:3000 - -## Philosophy - - The Express philosophy is to provide small, robust tooling for HTTP servers, making - it a great solution for single page applications, websites, hybrids, or public - HTTP APIs. - - Express does not force you to use any specific ORM or template engine. With support for over - 14 template engines via [@ladjs/consolidate](https://github.com/ladjs/consolidate), - you can quickly craft your perfect framework. - -## Examples - - To view the examples, clone the Express repository: - -```bash -git clone https://github.com/expressjs/express.git --depth 1 && cd express -``` - - Then install the dependencies: - -```bash -npm install -``` - - Then run whichever example you want: - -```bash -node examples/content-negotiation -``` - -## Contributing - -The Express.js project welcomes all constructive contributions. Contributions take many forms, -from code for bug fixes and enhancements, to additions and fixes to documentation, additional -tests, triaging incoming pull requests and issues, and more! - -See the [Contributing Guide] for more technical details on contributing. - -### Security Issues - -If you discover a security vulnerability in Express, please see [Security Policies and Procedures](SECURITY.md). - -### Running Tests - -To run the test suite, first install the dependencies: - -```bash -npm install -``` - -Then run `npm test`: - -```bash -npm test -``` - -## Current project team members - -For information about the governance of the express.js project, see [GOVERNANCE.md](https://github.com/expressjs/discussions/blob/HEAD/docs/GOVERNANCE.md). - -The original author of Express is [TJ Holowaychuk](https://github.com/tj) - -[List of all contributors](https://github.com/expressjs/express/graphs/contributors) - -### TC (Technical Committee) - -* [UlisesGascon](https://github.com/UlisesGascon) - **Ulises Gascón** (he/him) -* [jonchurch](https://github.com/jonchurch) - **Jon Church** -* [wesleytodd](https://github.com/wesleytodd) - **Wes Todd** -* [LinusU](https://github.com/LinusU) - **Linus Unnebäck** -* [blakeembrey](https://github.com/blakeembrey) - **Blake Embrey** -* [sheplu](https://github.com/sheplu) - **Jean Burellier** -* [crandmck](https://github.com/crandmck) - **Rand McKinney** -* [ctcpip](https://github.com/ctcpip) - **Chris de Almeida** - -
-TC emeriti members - -#### TC emeriti members - - * [dougwilson](https://github.com/dougwilson) - **Douglas Wilson** - * [hacksparrow](https://github.com/hacksparrow) - **Hage Yaapa** - * [jonathanong](https://github.com/jonathanong) - **jongleberry** - * [niftylettuce](https://github.com/niftylettuce) - **niftylettuce** - * [troygoode](https://github.com/troygoode) - **Troy Goode** -
- - -### Triagers - -* [aravindvnair99](https://github.com/aravindvnair99) - **Aravind Nair** -* [bjohansebas](https://github.com/bjohansebas) - **Sebastian Beltran** -* [carpasse](https://github.com/carpasse) - **Carlos Serrano** -* [CBID2](https://github.com/CBID2) - **Christine Belzie** -* [UlisesGascon](https://github.com/UlisesGascon) - **Ulises Gascón** (he/him) -* [IamLizu](https://github.com/IamLizu) - **S M Mahmudul Hasan** (he/him) -* [Phillip9587](https://github.com/Phillip9587) - **Phillip Barta** -* [efekrskl](https://github.com/efekrskl) - **Efe Karasakal** - - -
-Triagers emeriti members - -#### Emeritus Triagers - - * [AuggieH](https://github.com/AuggieH) - **Auggie Hudak** - * [G-Rath](https://github.com/G-Rath) - **Gareth Jones** - * [MohammadXroid](https://github.com/MohammadXroid) - **Mohammad Ayashi** - * [NawafSwe](https://github.com/NawafSwe) - **Nawaf Alsharqi** - * [NotMoni](https://github.com/NotMoni) - **Moni** - * [VigneshMurugan](https://github.com/VigneshMurugan) - **Vignesh Murugan** - * [davidmashe](https://github.com/davidmashe) - **David Ashe** - * [digitaIfabric](https://github.com/digitaIfabric) - **David** - * [e-l-i-s-e](https://github.com/e-l-i-s-e) - **Elise Bonner** - * [fed135](https://github.com/fed135) - **Frederic Charette** - * [firmanJS](https://github.com/firmanJS) - **Firman Abdul Hakim** - * [getspooky](https://github.com/getspooky) - **Yasser Ameur** - * [ghinks](https://github.com/ghinks) - **Glenn** - * [ghousemohamed](https://github.com/ghousemohamed) - **Ghouse Mohamed** - * [gireeshpunathil](https://github.com/gireeshpunathil) - **Gireesh Punathil** - * [jake32321](https://github.com/jake32321) - **Jake Reed** - * [jonchurch](https://github.com/jonchurch) - **Jon Church** - * [lekanikotun](https://github.com/lekanikotun) - **Troy Goode** - * [marsonya](https://github.com/marsonya) - **Lekan Ikotun** - * [mastermatt](https://github.com/mastermatt) - **Matt R. Wilson** - * [maxakuru](https://github.com/maxakuru) - **Max Edell** - * [mlrawlings](https://github.com/mlrawlings) - **Michael Rawlings** - * [rodion-arr](https://github.com/rodion-arr) - **Rodion Abdurakhimov** - * [sheplu](https://github.com/sheplu) - **Jean Burellier** - * [tarunyadav1](https://github.com/tarunyadav1) - **Tarun yadav** - * [tunniclm](https://github.com/tunniclm) - **Mike Tunnicliffe** - * [enyoghasim](https://github.com/enyoghasim) - **David Enyoghasim** - * [0ss](https://github.com/0ss) - **Salah** - * [import-brain](https://github.com/import-brain) - **Eric Cheng** (he/him) - * [dakshkhetan](https://github.com/dakshkhetan) - **Daksh Khetan** (he/him) - * [lucasraziel](https://github.com/lucasraziel) - **Lucas Soares Do Rego** - * [mertcanaltin](https://github.com/mertcanaltin) - **Mert Can Altin** - * [dpopp07](https://github.com/dpopp07) - **Dustin Popp** - * [Sushmeet](https://github.com/Sushmeet) - **Sushmeet Sunger** - * [3imed-jaberi](https://github.com/3imed-jaberi) - **Imed Jaberi** - -
- - -## License - - [MIT](LICENSE) - -[coveralls-image]: https://img.shields.io/coverallsCoverage/github/expressjs/express?branch=master -[coveralls-url]: https://coveralls.io/r/expressjs/express?branch=master -[github-actions-ci-image]: https://img.shields.io/github/actions/workflow/status/expressjs/express/ci.yml?branch=master&label=ci -[github-actions-ci-url]: https://github.com/expressjs/express/actions/workflows/ci.yml -[npm-downloads-image]: https://img.shields.io/npm/dm/express -[npm-downloads-url]: https://npmcharts.com/compare/express?minimal=true -[npm-url]: https://npmjs.org/package/express -[npm-version-image]: https://img.shields.io/npm/v/express -[ossf-scorecard-badge]: https://api.scorecard.dev/projects/github.com/expressjs/express/badge -[ossf-scorecard-visualizer]: https://ossf.github.io/scorecard-visualizer/#/projects/github.com/expressjs/express -[Code of Conduct]: https://github.com/expressjs/.github/blob/HEAD/CODE_OF_CONDUCT.md -[Contributing Guide]: https://github.com/expressjs/.github/blob/HEAD/CONTRIBUTING.md diff --git a/node_modules/@nestjs/platform-express/node_modules/express/index.js b/node_modules/@nestjs/platform-express/node_modules/express/index.js deleted file mode 100644 index d219b0c..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/express/index.js +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * express - * Copyright(c) 2009-2013 TJ Holowaychuk - * Copyright(c) 2013 Roman Shtylman - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -module.exports = require('./lib/express'); diff --git a/node_modules/@nestjs/platform-express/node_modules/express/lib/application.js b/node_modules/@nestjs/platform-express/node_modules/express/lib/application.js deleted file mode 100644 index 838b882..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/express/lib/application.js +++ /dev/null @@ -1,631 +0,0 @@ -/*! - * express - * Copyright(c) 2009-2013 TJ Holowaychuk - * Copyright(c) 2013 Roman Shtylman - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module dependencies. - * @private - */ - -var finalhandler = require('finalhandler'); -var debug = require('debug')('express:application'); -var View = require('./view'); -var http = require('node:http'); -var methods = require('./utils').methods; -var compileETag = require('./utils').compileETag; -var compileQueryParser = require('./utils').compileQueryParser; -var compileTrust = require('./utils').compileTrust; -var resolve = require('node:path').resolve; -var once = require('once') -var Router = require('router'); - -/** - * Module variables. - * @private - */ - -var slice = Array.prototype.slice; -var flatten = Array.prototype.flat; - -/** - * Application prototype. - */ - -var app = exports = module.exports = {}; - -/** - * Variable for trust proxy inheritance back-compat - * @private - */ - -var trustProxyDefaultSymbol = '@@symbol:trust_proxy_default'; - -/** - * Initialize the server. - * - * - setup default configuration - * - setup default middleware - * - setup route reflection methods - * - * @private - */ - -app.init = function init() { - var router = null; - - this.cache = Object.create(null); - this.engines = Object.create(null); - this.settings = Object.create(null); - - this.defaultConfiguration(); - - // Setup getting to lazily add base router - Object.defineProperty(this, 'router', { - configurable: true, - enumerable: true, - get: function getrouter() { - if (router === null) { - router = new Router({ - caseSensitive: this.enabled('case sensitive routing'), - strict: this.enabled('strict routing') - }); - } - - return router; - } - }); -}; - -/** - * Initialize application configuration. - * @private - */ - -app.defaultConfiguration = function defaultConfiguration() { - var env = process.env.NODE_ENV || 'development'; - - // default settings - this.enable('x-powered-by'); - this.set('etag', 'weak'); - this.set('env', env); - this.set('query parser', 'simple') - this.set('subdomain offset', 2); - this.set('trust proxy', false); - - // trust proxy inherit back-compat - Object.defineProperty(this.settings, trustProxyDefaultSymbol, { - configurable: true, - value: true - }); - - debug('booting in %s mode', env); - - this.on('mount', function onmount(parent) { - // inherit trust proxy - if (this.settings[trustProxyDefaultSymbol] === true - && typeof parent.settings['trust proxy fn'] === 'function') { - delete this.settings['trust proxy']; - delete this.settings['trust proxy fn']; - } - - // inherit protos - Object.setPrototypeOf(this.request, parent.request) - Object.setPrototypeOf(this.response, parent.response) - Object.setPrototypeOf(this.engines, parent.engines) - Object.setPrototypeOf(this.settings, parent.settings) - }); - - // setup locals - this.locals = Object.create(null); - - // top-most app is mounted at / - this.mountpath = '/'; - - // default locals - this.locals.settings = this.settings; - - // default configuration - this.set('view', View); - this.set('views', resolve('views')); - this.set('jsonp callback name', 'callback'); - - if (env === 'production') { - this.enable('view cache'); - } -}; - -/** - * Dispatch a req, res pair into the application. Starts pipeline processing. - * - * If no callback is provided, then default error handlers will respond - * in the event of an error bubbling through the stack. - * - * @private - */ - -app.handle = function handle(req, res, callback) { - // final handler - var done = callback || finalhandler(req, res, { - env: this.get('env'), - onerror: logerror.bind(this) - }); - - // set powered by header - if (this.enabled('x-powered-by')) { - res.setHeader('X-Powered-By', 'Express'); - } - - // set circular references - req.res = res; - res.req = req; - - // alter the prototypes - Object.setPrototypeOf(req, this.request) - Object.setPrototypeOf(res, this.response) - - // setup locals - if (!res.locals) { - res.locals = Object.create(null); - } - - this.router.handle(req, res, done); -}; - -/** - * Proxy `Router#use()` to add middleware to the app router. - * See Router#use() documentation for details. - * - * If the _fn_ parameter is an express app, then it will be - * mounted at the _route_ specified. - * - * @public - */ - -app.use = function use(fn) { - var offset = 0; - var path = '/'; - - // default path to '/' - // disambiguate app.use([fn]) - if (typeof fn !== 'function') { - var arg = fn; - - while (Array.isArray(arg) && arg.length !== 0) { - arg = arg[0]; - } - - // first arg is the path - if (typeof arg !== 'function') { - offset = 1; - path = fn; - } - } - - var fns = flatten.call(slice.call(arguments, offset), Infinity); - - if (fns.length === 0) { - throw new TypeError('app.use() requires a middleware function') - } - - // get router - var router = this.router; - - fns.forEach(function (fn) { - // non-express app - if (!fn || !fn.handle || !fn.set) { - return router.use(path, fn); - } - - debug('.use app under %s', path); - fn.mountpath = path; - fn.parent = this; - - // restore .app property on req and res - router.use(path, function mounted_app(req, res, next) { - var orig = req.app; - fn.handle(req, res, function (err) { - Object.setPrototypeOf(req, orig.request) - Object.setPrototypeOf(res, orig.response) - next(err); - }); - }); - - // mounted an app - fn.emit('mount', this); - }, this); - - return this; -}; - -/** - * Proxy to the app `Router#route()` - * Returns a new `Route` instance for the _path_. - * - * Routes are isolated middleware stacks for specific paths. - * See the Route api docs for details. - * - * @public - */ - -app.route = function route(path) { - return this.router.route(path); -}; - -/** - * Register the given template engine callback `fn` - * as `ext`. - * - * By default will `require()` the engine based on the - * file extension. For example if you try to render - * a "foo.ejs" file Express will invoke the following internally: - * - * app.engine('ejs', require('ejs').__express); - * - * For engines that do not provide `.__express` out of the box, - * or if you wish to "map" a different extension to the template engine - * you may use this method. For example mapping the EJS template engine to - * ".html" files: - * - * app.engine('html', require('ejs').renderFile); - * - * In this case EJS provides a `.renderFile()` method with - * the same signature that Express expects: `(path, options, callback)`, - * though note that it aliases this method as `ejs.__express` internally - * so if you're using ".ejs" extensions you don't need to do anything. - * - * Some template engines do not follow this convention, the - * [Consolidate.js](https://github.com/tj/consolidate.js) - * library was created to map all of node's popular template - * engines to follow this convention, thus allowing them to - * work seamlessly within Express. - * - * @param {String} ext - * @param {Function} fn - * @return {app} for chaining - * @public - */ - -app.engine = function engine(ext, fn) { - if (typeof fn !== 'function') { - throw new Error('callback function required'); - } - - // get file extension - var extension = ext[0] !== '.' - ? '.' + ext - : ext; - - // store engine - this.engines[extension] = fn; - - return this; -}; - -/** - * Proxy to `Router#param()` with one added api feature. The _name_ parameter - * can be an array of names. - * - * See the Router#param() docs for more details. - * - * @param {String|Array} name - * @param {Function} fn - * @return {app} for chaining - * @public - */ - -app.param = function param(name, fn) { - if (Array.isArray(name)) { - for (var i = 0; i < name.length; i++) { - this.param(name[i], fn); - } - - return this; - } - - this.router.param(name, fn); - - return this; -}; - -/** - * Assign `setting` to `val`, or return `setting`'s value. - * - * app.set('foo', 'bar'); - * app.set('foo'); - * // => "bar" - * - * Mounted servers inherit their parent server's settings. - * - * @param {String} setting - * @param {*} [val] - * @return {Server} for chaining - * @public - */ - -app.set = function set(setting, val) { - if (arguments.length === 1) { - // app.get(setting) - return this.settings[setting]; - } - - debug('set "%s" to %o', setting, val); - - // set value - this.settings[setting] = val; - - // trigger matched settings - switch (setting) { - case 'etag': - this.set('etag fn', compileETag(val)); - break; - case 'query parser': - this.set('query parser fn', compileQueryParser(val)); - break; - case 'trust proxy': - this.set('trust proxy fn', compileTrust(val)); - - // trust proxy inherit back-compat - Object.defineProperty(this.settings, trustProxyDefaultSymbol, { - configurable: true, - value: false - }); - - break; - } - - return this; -}; - -/** - * Return the app's absolute pathname - * based on the parent(s) that have - * mounted it. - * - * For example if the application was - * mounted as "/admin", which itself - * was mounted as "/blog" then the - * return value would be "/blog/admin". - * - * @return {String} - * @private - */ - -app.path = function path() { - return this.parent - ? this.parent.path() + this.mountpath - : ''; -}; - -/** - * Check if `setting` is enabled (truthy). - * - * app.enabled('foo') - * // => false - * - * app.enable('foo') - * app.enabled('foo') - * // => true - * - * @param {String} setting - * @return {Boolean} - * @public - */ - -app.enabled = function enabled(setting) { - return Boolean(this.set(setting)); -}; - -/** - * Check if `setting` is disabled. - * - * app.disabled('foo') - * // => true - * - * app.enable('foo') - * app.disabled('foo') - * // => false - * - * @param {String} setting - * @return {Boolean} - * @public - */ - -app.disabled = function disabled(setting) { - return !this.set(setting); -}; - -/** - * Enable `setting`. - * - * @param {String} setting - * @return {app} for chaining - * @public - */ - -app.enable = function enable(setting) { - return this.set(setting, true); -}; - -/** - * Disable `setting`. - * - * @param {String} setting - * @return {app} for chaining - * @public - */ - -app.disable = function disable(setting) { - return this.set(setting, false); -}; - -/** - * Delegate `.VERB(...)` calls to `router.VERB(...)`. - */ - -methods.forEach(function (method) { - app[method] = function (path) { - if (method === 'get' && arguments.length === 1) { - // app.get(setting) - return this.set(path); - } - - var route = this.route(path); - route[method].apply(route, slice.call(arguments, 1)); - return this; - }; -}); - -/** - * Special-cased "all" method, applying the given route `path`, - * middleware, and callback to _every_ HTTP method. - * - * @param {String} path - * @param {Function} ... - * @return {app} for chaining - * @public - */ - -app.all = function all(path) { - var route = this.route(path); - var args = slice.call(arguments, 1); - - for (var i = 0; i < methods.length; i++) { - route[methods[i]].apply(route, args); - } - - return this; -}; - -/** - * Render the given view `name` name with `options` - * and a callback accepting an error and the - * rendered template string. - * - * Example: - * - * app.render('email', { name: 'Tobi' }, function(err, html){ - * // ... - * }) - * - * @param {String} name - * @param {Object|Function} options or fn - * @param {Function} callback - * @public - */ - -app.render = function render(name, options, callback) { - var cache = this.cache; - var done = callback; - var engines = this.engines; - var opts = options; - var view; - - // support callback function as second arg - if (typeof options === 'function') { - done = options; - opts = {}; - } - - // merge options - var renderOptions = { ...this.locals, ...opts._locals, ...opts }; - - // set .cache unless explicitly provided - if (renderOptions.cache == null) { - renderOptions.cache = this.enabled('view cache'); - } - - // primed cache - if (renderOptions.cache) { - view = cache[name]; - } - - // view - if (!view) { - var View = this.get('view'); - - view = new View(name, { - defaultEngine: this.get('view engine'), - root: this.get('views'), - engines: engines - }); - - if (!view.path) { - var dirs = Array.isArray(view.root) && view.root.length > 1 - ? 'directories "' + view.root.slice(0, -1).join('", "') + '" or "' + view.root[view.root.length - 1] + '"' - : 'directory "' + view.root + '"' - var err = new Error('Failed to lookup view "' + name + '" in views ' + dirs); - err.view = view; - return done(err); - } - - // prime the cache - if (renderOptions.cache) { - cache[name] = view; - } - } - - // render - tryRender(view, renderOptions, done); -}; - -/** - * Listen for connections. - * - * A node `http.Server` is returned, with this - * application (which is a `Function`) as its - * callback. If you wish to create both an HTTP - * and HTTPS server you may do so with the "http" - * and "https" modules as shown here: - * - * var http = require('node:http') - * , https = require('node:https') - * , express = require('express') - * , app = express(); - * - * http.createServer(app).listen(80); - * https.createServer({ ... }, app).listen(443); - * - * @return {http.Server} - * @public - */ - -app.listen = function listen() { - var server = http.createServer(this) - var args = slice.call(arguments) - if (typeof args[args.length - 1] === 'function') { - var done = args[args.length - 1] = once(args[args.length - 1]) - server.once('error', done) - } - return server.listen.apply(server, args) -} - -/** - * Log error using console.error. - * - * @param {Error} err - * @private - */ - -function logerror(err) { - /* istanbul ignore next */ - if (this.get('env') !== 'test') console.error(err.stack || err.toString()); -} - -/** - * Try rendering a view. - * @private - */ - -function tryRender(view, options, callback) { - try { - view.render(options, callback); - } catch (err) { - callback(err); - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/express/lib/express.js b/node_modules/@nestjs/platform-express/node_modules/express/lib/express.js deleted file mode 100644 index 2d502eb..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/express/lib/express.js +++ /dev/null @@ -1,81 +0,0 @@ -/*! - * express - * Copyright(c) 2009-2013 TJ Holowaychuk - * Copyright(c) 2013 Roman Shtylman - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module dependencies. - */ - -var bodyParser = require('body-parser') -var EventEmitter = require('node:events').EventEmitter; -var mixin = require('merge-descriptors'); -var proto = require('./application'); -var Router = require('router'); -var req = require('./request'); -var res = require('./response'); - -/** - * Expose `createApplication()`. - */ - -exports = module.exports = createApplication; - -/** - * Create an express application. - * - * @return {Function} - * @api public - */ - -function createApplication() { - var app = function(req, res, next) { - app.handle(req, res, next); - }; - - mixin(app, EventEmitter.prototype, false); - mixin(app, proto, false); - - // expose the prototype that will get set on requests - app.request = Object.create(req, { - app: { configurable: true, enumerable: true, writable: true, value: app } - }) - - // expose the prototype that will get set on responses - app.response = Object.create(res, { - app: { configurable: true, enumerable: true, writable: true, value: app } - }) - - app.init(); - return app; -} - -/** - * Expose the prototypes. - */ - -exports.application = proto; -exports.request = req; -exports.response = res; - -/** - * Expose constructors. - */ - -exports.Route = Router.Route; -exports.Router = Router; - -/** - * Expose middleware - */ - -exports.json = bodyParser.json -exports.raw = bodyParser.raw -exports.static = require('serve-static'); -exports.text = bodyParser.text -exports.urlencoded = bodyParser.urlencoded diff --git a/node_modules/@nestjs/platform-express/node_modules/express/lib/request.js b/node_modules/@nestjs/platform-express/node_modules/express/lib/request.js deleted file mode 100644 index 69990da..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/express/lib/request.js +++ /dev/null @@ -1,514 +0,0 @@ -/*! - * express - * Copyright(c) 2009-2013 TJ Holowaychuk - * Copyright(c) 2013 Roman Shtylman - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module dependencies. - * @private - */ - -var accepts = require('accepts'); -var isIP = require('node:net').isIP; -var typeis = require('type-is'); -var http = require('node:http'); -var fresh = require('fresh'); -var parseRange = require('range-parser'); -var parse = require('parseurl'); -var proxyaddr = require('proxy-addr'); - -/** - * Request prototype. - * @public - */ - -var req = Object.create(http.IncomingMessage.prototype) - -/** - * Module exports. - * @public - */ - -module.exports = req - -/** - * Return request header. - * - * The `Referrer` header field is special-cased, - * both `Referrer` and `Referer` are interchangeable. - * - * Examples: - * - * req.get('Content-Type'); - * // => "text/plain" - * - * req.get('content-type'); - * // => "text/plain" - * - * req.get('Something'); - * // => undefined - * - * Aliased as `req.header()`. - * - * @param {String} name - * @return {String} - * @public - */ - -req.get = -req.header = function header(name) { - if (!name) { - throw new TypeError('name argument is required to req.get'); - } - - if (typeof name !== 'string') { - throw new TypeError('name must be a string to req.get'); - } - - var lc = name.toLowerCase(); - - switch (lc) { - case 'referer': - case 'referrer': - return this.headers.referrer - || this.headers.referer; - default: - return this.headers[lc]; - } -}; - -/** - * To do: update docs. - * - * Check if the given `type(s)` is acceptable, returning - * the best match when true, otherwise `undefined`, in which - * case you should respond with 406 "Not Acceptable". - * - * The `type` value may be a single MIME type string - * such as "application/json", an extension name - * such as "json", a comma-delimited list such as "json, html, text/plain", - * an argument list such as `"json", "html", "text/plain"`, - * or an array `["json", "html", "text/plain"]`. When a list - * or array is given, the _best_ match, if any is returned. - * - * Examples: - * - * // Accept: text/html - * req.accepts('html'); - * // => "html" - * - * // Accept: text/*, application/json - * req.accepts('html'); - * // => "html" - * req.accepts('text/html'); - * // => "text/html" - * req.accepts('json, text'); - * // => "json" - * req.accepts('application/json'); - * // => "application/json" - * - * // Accept: text/*, application/json - * req.accepts('image/png'); - * req.accepts('png'); - * // => undefined - * - * // Accept: text/*;q=.5, application/json - * req.accepts(['html', 'json']); - * req.accepts('html', 'json'); - * req.accepts('html, json'); - * // => "json" - * - * @param {String|Array} type(s) - * @return {String|Array|Boolean} - * @public - */ - -req.accepts = function(){ - var accept = accepts(this); - return accept.types.apply(accept, arguments); -}; - -/** - * Check if the given `encoding`s are accepted. - * - * @param {String} ...encoding - * @return {String|Array} - * @public - */ - -req.acceptsEncodings = function(){ - var accept = accepts(this); - return accept.encodings.apply(accept, arguments); -}; - -/** - * Check if the given `charset`s are acceptable, - * otherwise you should respond with 406 "Not Acceptable". - * - * @param {String} ...charset - * @return {String|Array} - * @public - */ - -req.acceptsCharsets = function(){ - var accept = accepts(this); - return accept.charsets.apply(accept, arguments); -}; - -/** - * Check if the given `lang`s are acceptable, - * otherwise you should respond with 406 "Not Acceptable". - * - * @param {String} ...lang - * @return {String|Array} - * @public - */ - -req.acceptsLanguages = function(...languages) { - return accepts(this).languages(...languages); -}; - -/** - * Parse Range header field, capping to the given `size`. - * - * Unspecified ranges such as "0-" require knowledge of your resource length. In - * the case of a byte range this is of course the total number of bytes. If the - * Range header field is not given `undefined` is returned, `-1` when unsatisfiable, - * and `-2` when syntactically invalid. - * - * When ranges are returned, the array has a "type" property which is the type of - * range that is required (most commonly, "bytes"). Each array element is an object - * with a "start" and "end" property for the portion of the range. - * - * The "combine" option can be set to `true` and overlapping & adjacent ranges - * will be combined into a single range. - * - * NOTE: remember that ranges are inclusive, so for example "Range: users=0-3" - * should respond with 4 users when available, not 3. - * - * @param {number} size - * @param {object} [options] - * @param {boolean} [options.combine=false] - * @return {number|array} - * @public - */ - -req.range = function range(size, options) { - var range = this.get('Range'); - if (!range) return; - return parseRange(size, range, options); -}; - -/** - * Parse the query string of `req.url`. - * - * This uses the "query parser" setting to parse the raw - * string into an object. - * - * @return {String} - * @api public - */ - -defineGetter(req, 'query', function query(){ - var queryparse = this.app.get('query parser fn'); - - if (!queryparse) { - // parsing is disabled - return Object.create(null); - } - - var querystring = parse(this).query; - - return queryparse(querystring); -}); - -/** - * Check if the incoming request contains the "Content-Type" - * header field, and it contains the given mime `type`. - * - * Examples: - * - * // With Content-Type: text/html; charset=utf-8 - * req.is('html'); - * req.is('text/html'); - * req.is('text/*'); - * // => true - * - * // When Content-Type is application/json - * req.is('json'); - * req.is('application/json'); - * req.is('application/*'); - * // => true - * - * req.is('html'); - * // => false - * - * @param {String|Array} types... - * @return {String|false|null} - * @public - */ - -req.is = function is(types) { - var arr = types; - - // support flattened arguments - if (!Array.isArray(types)) { - arr = new Array(arguments.length); - for (var i = 0; i < arr.length; i++) { - arr[i] = arguments[i]; - } - } - - return typeis(this, arr); -}; - -/** - * Return the protocol string "http" or "https" - * when requested with TLS. When the "trust proxy" - * setting trusts the socket address, the - * "X-Forwarded-Proto" header field will be trusted - * and used if present. - * - * If you're running behind a reverse proxy that - * supplies https for you this may be enabled. - * - * @return {String} - * @public - */ - -defineGetter(req, 'protocol', function protocol(){ - var proto = this.socket.encrypted - ? 'https' - : 'http'; - var trust = this.app.get('trust proxy fn'); - - if (!trust(this.socket.remoteAddress, 0)) { - return proto; - } - - // Note: X-Forwarded-Proto is normally only ever a - // single value, but this is to be safe. - var header = this.get('X-Forwarded-Proto') || proto - var index = header.indexOf(',') - - return index !== -1 - ? header.substring(0, index).trim() - : header.trim() -}); - -/** - * Short-hand for: - * - * req.protocol === 'https' - * - * @return {Boolean} - * @public - */ - -defineGetter(req, 'secure', function secure(){ - return this.protocol === 'https'; -}); - -/** - * Return the remote address from the trusted proxy. - * - * The is the remote address on the socket unless - * "trust proxy" is set. - * - * @return {String} - * @public - */ - -defineGetter(req, 'ip', function ip(){ - var trust = this.app.get('trust proxy fn'); - return proxyaddr(this, trust); -}); - -/** - * When "trust proxy" is set, trusted proxy addresses + client. - * - * For example if the value were "client, proxy1, proxy2" - * you would receive the array `["client", "proxy1", "proxy2"]` - * where "proxy2" is the furthest down-stream and "proxy1" and - * "proxy2" were trusted. - * - * @return {Array} - * @public - */ - -defineGetter(req, 'ips', function ips() { - var trust = this.app.get('trust proxy fn'); - var addrs = proxyaddr.all(this, trust); - - // reverse the order (to farthest -> closest) - // and remove socket address - addrs.reverse().pop() - - return addrs -}); - -/** - * Return subdomains as an array. - * - * Subdomains are the dot-separated parts of the host before the main domain of - * the app. By default, the domain of the app is assumed to be the last two - * parts of the host. This can be changed by setting "subdomain offset". - * - * For example, if the domain is "tobi.ferrets.example.com": - * If "subdomain offset" is not set, req.subdomains is `["ferrets", "tobi"]`. - * If "subdomain offset" is 3, req.subdomains is `["tobi"]`. - * - * @return {Array} - * @public - */ - -defineGetter(req, 'subdomains', function subdomains() { - var hostname = this.hostname; - - if (!hostname) return []; - - var offset = this.app.get('subdomain offset'); - var subdomains = !isIP(hostname) - ? hostname.split('.').reverse() - : [hostname]; - - return subdomains.slice(offset); -}); - -/** - * Short-hand for `url.parse(req.url).pathname`. - * - * @return {String} - * @public - */ - -defineGetter(req, 'path', function path() { - return parse(this).pathname; -}); - -/** - * Parse the "Host" header field to a host. - * - * When the "trust proxy" setting trusts the socket - * address, the "X-Forwarded-Host" header field will - * be trusted. - * - * @return {String} - * @public - */ - -defineGetter(req, 'host', function host(){ - var trust = this.app.get('trust proxy fn'); - var val = this.get('X-Forwarded-Host'); - - if (!val || !trust(this.socket.remoteAddress, 0)) { - val = this.get('Host'); - } else if (val.indexOf(',') !== -1) { - // Note: X-Forwarded-Host is normally only ever a - // single value, but this is to be safe. - val = val.substring(0, val.indexOf(',')).trimRight() - } - - return val || undefined; -}); - -/** - * Parse the "Host" header field to a hostname. - * - * When the "trust proxy" setting trusts the socket - * address, the "X-Forwarded-Host" header field will - * be trusted. - * - * @return {String} - * @api public - */ - -defineGetter(req, 'hostname', function hostname(){ - var host = this.host; - - if (!host) return; - - // IPv6 literal support - var offset = host[0] === '[' - ? host.indexOf(']') + 1 - : 0; - var index = host.indexOf(':', offset); - - return index !== -1 - ? host.substring(0, index) - : host; -}); - -/** - * Check if the request is fresh, aka - * Last-Modified or the ETag - * still match. - * - * @return {Boolean} - * @public - */ - -defineGetter(req, 'fresh', function(){ - var method = this.method; - var res = this.res - var status = res.statusCode - - // GET or HEAD for weak freshness validation only - if ('GET' !== method && 'HEAD' !== method) return false; - - // 2xx or 304 as per rfc2616 14.26 - if ((status >= 200 && status < 300) || 304 === status) { - return fresh(this.headers, { - 'etag': res.get('ETag'), - 'last-modified': res.get('Last-Modified') - }) - } - - return false; -}); - -/** - * Check if the request is stale, aka - * "Last-Modified" and / or the "ETag" for the - * resource has changed. - * - * @return {Boolean} - * @public - */ - -defineGetter(req, 'stale', function stale(){ - return !this.fresh; -}); - -/** - * Check if the request was an _XMLHttpRequest_. - * - * @return {Boolean} - * @public - */ - -defineGetter(req, 'xhr', function xhr(){ - var val = this.get('X-Requested-With') || ''; - return val.toLowerCase() === 'xmlhttprequest'; -}); - -/** - * Helper function for creating a getter on an object. - * - * @param {Object} obj - * @param {String} name - * @param {Function} getter - * @private - */ -function defineGetter(obj, name, getter) { - Object.defineProperty(obj, name, { - configurable: true, - enumerable: true, - get: getter - }); -} diff --git a/node_modules/@nestjs/platform-express/node_modules/express/lib/response.js b/node_modules/@nestjs/platform-express/node_modules/express/lib/response.js deleted file mode 100644 index 7a2f0ec..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/express/lib/response.js +++ /dev/null @@ -1,1053 +0,0 @@ -/*! - * express - * Copyright(c) 2009-2013 TJ Holowaychuk - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module dependencies. - * @private - */ - -var contentDisposition = require('content-disposition'); -var createError = require('http-errors') -var deprecate = require('depd')('express'); -var encodeUrl = require('encodeurl'); -var escapeHtml = require('escape-html'); -var http = require('node:http'); -var onFinished = require('on-finished'); -var mime = require('mime-types') -var path = require('node:path'); -var pathIsAbsolute = require('node:path').isAbsolute; -var statuses = require('statuses') -var sign = require('cookie-signature').sign; -var normalizeType = require('./utils').normalizeType; -var normalizeTypes = require('./utils').normalizeTypes; -var setCharset = require('./utils').setCharset; -var cookie = require('cookie'); -var send = require('send'); -var extname = path.extname; -var resolve = path.resolve; -var vary = require('vary'); -const { Buffer } = require('node:buffer'); - -/** - * Response prototype. - * @public - */ - -var res = Object.create(http.ServerResponse.prototype) - -/** - * Module exports. - * @public - */ - -module.exports = res - -/** - * Set the HTTP status code for the response. - * - * Expects an integer value between 100 and 999 inclusive. - * Throws an error if the provided status code is not an integer or if it's outside the allowable range. - * - * @param {number} code - The HTTP status code to set. - * @return {ServerResponse} - Returns itself for chaining methods. - * @throws {TypeError} If `code` is not an integer. - * @throws {RangeError} If `code` is outside the range 100 to 999. - * @public - */ - -res.status = function status(code) { - // Check if the status code is not an integer - if (!Number.isInteger(code)) { - throw new TypeError(`Invalid status code: ${JSON.stringify(code)}. Status code must be an integer.`); - } - // Check if the status code is outside of Node's valid range - if (code < 100 || code > 999) { - throw new RangeError(`Invalid status code: ${JSON.stringify(code)}. Status code must be greater than 99 and less than 1000.`); - } - - this.statusCode = code; - return this; -}; - -/** - * Set Link header field with the given `links`. - * - * Examples: - * - * res.links({ - * next: 'http://api.example.com/users?page=2', - * last: 'http://api.example.com/users?page=5', - * pages: [ - * 'http://api.example.com/users?page=1', - * 'http://api.example.com/users?page=2' - * ] - * }); - * - * @param {Object} links - * @return {ServerResponse} - * @public - */ - -res.links = function(links) { - var link = this.get('Link') || ''; - if (link) link += ', '; - return this.set('Link', link + Object.keys(links).map(function(rel) { - // Allow multiple links if links[rel] is an array - if (Array.isArray(links[rel])) { - return links[rel].map(function (singleLink) { - return `<${singleLink}>; rel="${rel}"`; - }).join(', '); - } else { - return `<${links[rel]}>; rel="${rel}"`; - } - }).join(', ')); -}; - -/** - * Send a response. - * - * Examples: - * - * res.send(Buffer.from('wahoo')); - * res.send({ some: 'json' }); - * res.send('

some html

'); - * - * @param {string|number|boolean|object|Buffer} body - * @public - */ - -res.send = function send(body) { - var chunk = body; - var encoding; - var req = this.req; - var type; - - // settings - var app = this.app; - - switch (typeof chunk) { - // string defaulting to html - case 'string': - if (!this.get('Content-Type')) { - this.type('html'); - } - break; - case 'boolean': - case 'number': - case 'object': - if (chunk === null) { - chunk = ''; - } else if (ArrayBuffer.isView(chunk)) { - if (!this.get('Content-Type')) { - this.type('bin'); - } - } else { - return this.json(chunk); - } - break; - } - - // write strings in utf-8 - if (typeof chunk === 'string') { - encoding = 'utf8'; - type = this.get('Content-Type'); - - // reflect this in content-type - if (typeof type === 'string') { - this.set('Content-Type', setCharset(type, 'utf-8')); - } - } - - // determine if ETag should be generated - var etagFn = app.get('etag fn') - var generateETag = !this.get('ETag') && typeof etagFn === 'function' - - // populate Content-Length - var len - if (chunk !== undefined) { - if (Buffer.isBuffer(chunk)) { - // get length of Buffer - len = chunk.length - } else if (!generateETag && chunk.length < 1000) { - // just calculate length when no ETag + small chunk - len = Buffer.byteLength(chunk, encoding) - } else { - // convert chunk to Buffer and calculate - chunk = Buffer.from(chunk, encoding) - encoding = undefined; - len = chunk.length - } - - this.set('Content-Length', len); - } - - // populate ETag - var etag; - if (generateETag && len !== undefined) { - if ((etag = etagFn(chunk, encoding))) { - this.set('ETag', etag); - } - } - - // freshness - if (req.fresh) this.status(304); - - // strip irrelevant headers - if (204 === this.statusCode || 304 === this.statusCode) { - this.removeHeader('Content-Type'); - this.removeHeader('Content-Length'); - this.removeHeader('Transfer-Encoding'); - chunk = ''; - } - - // alter headers for 205 - if (this.statusCode === 205) { - this.set('Content-Length', '0') - this.removeHeader('Transfer-Encoding') - chunk = '' - } - - if (req.method === 'HEAD') { - // skip body for HEAD - this.end(); - } else { - // respond - this.end(chunk, encoding); - } - - return this; -}; - -/** - * Send JSON response. - * - * Examples: - * - * res.json(null); - * res.json({ user: 'tj' }); - * - * @param {string|number|boolean|object} obj - * @public - */ - -res.json = function json(obj) { - // settings - var app = this.app; - var escape = app.get('json escape') - var replacer = app.get('json replacer'); - var spaces = app.get('json spaces'); - var body = stringify(obj, replacer, spaces, escape) - - // content-type - if (!this.get('Content-Type')) { - this.set('Content-Type', 'application/json'); - } - - return this.send(body); -}; - -/** - * Send JSON response with JSONP callback support. - * - * Examples: - * - * res.jsonp(null); - * res.jsonp({ user: 'tj' }); - * - * @param {string|number|boolean|object} obj - * @public - */ - -res.jsonp = function jsonp(obj) { - // settings - var app = this.app; - var escape = app.get('json escape') - var replacer = app.get('json replacer'); - var spaces = app.get('json spaces'); - var body = stringify(obj, replacer, spaces, escape) - var callback = this.req.query[app.get('jsonp callback name')]; - - // content-type - if (!this.get('Content-Type')) { - this.set('X-Content-Type-Options', 'nosniff'); - this.set('Content-Type', 'application/json'); - } - - // fixup callback - if (Array.isArray(callback)) { - callback = callback[0]; - } - - // jsonp - if (typeof callback === 'string' && callback.length !== 0) { - this.set('X-Content-Type-Options', 'nosniff'); - this.set('Content-Type', 'text/javascript'); - - // restrict callback charset - callback = callback.replace(/[^\[\]\w$.]/g, ''); - - if (body === undefined) { - // empty argument - body = '' - } else if (typeof body === 'string') { - // replace chars not allowed in JavaScript that are in JSON - body = body - .replace(/\u2028/g, '\\u2028') - .replace(/\u2029/g, '\\u2029') - } - - // the /**/ is a specific security mitigation for "Rosetta Flash JSONP abuse" - // the typeof check is just to reduce client error noise - body = '/**/ typeof ' + callback + ' === \'function\' && ' + callback + '(' + body + ');'; - } - - return this.send(body); -}; - -/** - * Send given HTTP status code. - * - * Sets the response status to `statusCode` and the body of the - * response to the standard description from node's http.STATUS_CODES - * or the statusCode number if no description. - * - * Examples: - * - * res.sendStatus(200); - * - * @param {number} statusCode - * @public - */ - -res.sendStatus = function sendStatus(statusCode) { - var body = statuses.message[statusCode] || String(statusCode) - - this.status(statusCode); - this.type('txt'); - - return this.send(body); -}; - -/** - * Transfer the file at the given `path`. - * - * Automatically sets the _Content-Type_ response header field. - * The callback `callback(err)` is invoked when the transfer is complete - * or when an error occurs. Be sure to check `res.headersSent` - * if you wish to attempt responding, as the header and some data - * may have already been transferred. - * - * Options: - * - * - `maxAge` defaulting to 0 (can be string converted by `ms`) - * - `root` root directory for relative filenames - * - `headers` object of headers to serve with file - * - `dotfiles` serve dotfiles, defaulting to false; can be `"allow"` to send them - * - * Other options are passed along to `send`. - * - * Examples: - * - * The following example illustrates how `res.sendFile()` may - * be used as an alternative for the `static()` middleware for - * dynamic situations. The code backing `res.sendFile()` is actually - * the same code, so HTTP cache support etc is identical. - * - * app.get('/user/:uid/photos/:file', function(req, res){ - * var uid = req.params.uid - * , file = req.params.file; - * - * req.user.mayViewFilesFrom(uid, function(yes){ - * if (yes) { - * res.sendFile('/uploads/' + uid + '/' + file); - * } else { - * res.send(403, 'Sorry! you cant see that.'); - * } - * }); - * }); - * - * @public - */ - -res.sendFile = function sendFile(path, options, callback) { - var done = callback; - var req = this.req; - var res = this; - var next = req.next; - var opts = options || {}; - - if (!path) { - throw new TypeError('path argument is required to res.sendFile'); - } - - if (typeof path !== 'string') { - throw new TypeError('path must be a string to res.sendFile') - } - - // support function as second arg - if (typeof options === 'function') { - done = options; - opts = {}; - } - - if (!opts.root && !pathIsAbsolute(path)) { - throw new TypeError('path must be absolute or specify root to res.sendFile'); - } - - // create file stream - var pathname = encodeURI(path); - - // wire application etag option to send - opts.etag = this.app.enabled('etag'); - var file = send(req, pathname, opts); - - // transfer - sendfile(res, file, opts, function (err) { - if (done) return done(err); - if (err && err.code === 'EISDIR') return next(); - - // next() all but write errors - if (err && err.code !== 'ECONNABORTED' && err.syscall !== 'write') { - next(err); - } - }); -}; - -/** - * Transfer the file at the given `path` as an attachment. - * - * Optionally providing an alternate attachment `filename`, - * and optional callback `callback(err)`. The callback is invoked - * when the data transfer is complete, or when an error has - * occurred. Be sure to check `res.headersSent` if you plan to respond. - * - * Optionally providing an `options` object to use with `res.sendFile()`. - * This function will set the `Content-Disposition` header, overriding - * any `Content-Disposition` header passed as header options in order - * to set the attachment and filename. - * - * This method uses `res.sendFile()`. - * - * @public - */ - -res.download = function download (path, filename, options, callback) { - var done = callback; - var name = filename; - var opts = options || null - - // support function as second or third arg - if (typeof filename === 'function') { - done = filename; - name = null; - opts = null - } else if (typeof options === 'function') { - done = options - opts = null - } - - // support optional filename, where options may be in it's place - if (typeof filename === 'object' && - (typeof options === 'function' || options === undefined)) { - name = null - opts = filename - } - - // set Content-Disposition when file is sent - var headers = { - 'Content-Disposition': contentDisposition(name || path) - }; - - // merge user-provided headers - if (opts && opts.headers) { - var keys = Object.keys(opts.headers) - for (var i = 0; i < keys.length; i++) { - var key = keys[i] - if (key.toLowerCase() !== 'content-disposition') { - headers[key] = opts.headers[key] - } - } - } - - // merge user-provided options - opts = Object.create(opts) - opts.headers = headers - - // Resolve the full path for sendFile - var fullPath = !opts.root - ? resolve(path) - : path - - // send file - return this.sendFile(fullPath, opts, done) -}; - -/** - * Set _Content-Type_ response header with `type` through `mime.contentType()` - * when it does not contain "/", or set the Content-Type to `type` otherwise. - * When no mapping is found though `mime.contentType()`, the type is set to - * "application/octet-stream". - * - * Examples: - * - * res.type('.html'); - * res.type('html'); - * res.type('json'); - * res.type('application/json'); - * res.type('png'); - * - * @param {String} type - * @return {ServerResponse} for chaining - * @public - */ - -res.contentType = -res.type = function contentType(type) { - var ct = type.indexOf('/') === -1 - ? (mime.contentType(type) || 'application/octet-stream') - : type; - - return this.set('Content-Type', ct); -}; - -/** - * Respond to the Acceptable formats using an `obj` - * of mime-type callbacks. - * - * This method uses `req.accepted`, an array of - * acceptable types ordered by their quality values. - * When "Accept" is not present the _first_ callback - * is invoked, otherwise the first match is used. When - * no match is performed the server responds with - * 406 "Not Acceptable". - * - * Content-Type is set for you, however if you choose - * you may alter this within the callback using `res.type()` - * or `res.set('Content-Type', ...)`. - * - * res.format({ - * 'text/plain': function(){ - * res.send('hey'); - * }, - * - * 'text/html': function(){ - * res.send('

hey

'); - * }, - * - * 'application/json': function () { - * res.send({ message: 'hey' }); - * } - * }); - * - * In addition to canonicalized MIME types you may - * also use extnames mapped to these types: - * - * res.format({ - * text: function(){ - * res.send('hey'); - * }, - * - * html: function(){ - * res.send('

hey

'); - * }, - * - * json: function(){ - * res.send({ message: 'hey' }); - * } - * }); - * - * By default Express passes an `Error` - * with a `.status` of 406 to `next(err)` - * if a match is not made. If you provide - * a `.default` callback it will be invoked - * instead. - * - * @param {Object} obj - * @return {ServerResponse} for chaining - * @public - */ - -res.format = function(obj){ - var req = this.req; - var next = req.next; - - var keys = Object.keys(obj) - .filter(function (v) { return v !== 'default' }) - - var key = keys.length > 0 - ? req.accepts(keys) - : false; - - this.vary("Accept"); - - if (key) { - this.set('Content-Type', normalizeType(key).value); - obj[key](req, this, next); - } else if (obj.default) { - obj.default(req, this, next) - } else { - next(createError(406, { - types: normalizeTypes(keys).map(function (o) { return o.value }) - })) - } - - return this; -}; - -/** - * Set _Content-Disposition_ header to _attachment_ with optional `filename`. - * - * @param {String} filename - * @return {ServerResponse} - * @public - */ - -res.attachment = function attachment(filename) { - if (filename) { - this.type(extname(filename)); - } - - this.set('Content-Disposition', contentDisposition(filename)); - - return this; -}; - -/** - * Append additional header `field` with value `val`. - * - * Example: - * - * res.append('Link', ['', '']); - * res.append('Set-Cookie', 'foo=bar; Path=/; HttpOnly'); - * res.append('Warning', '199 Miscellaneous warning'); - * - * @param {String} field - * @param {String|Array} val - * @return {ServerResponse} for chaining - * @public - */ - -res.append = function append(field, val) { - var prev = this.get(field); - var value = val; - - if (prev) { - // concat the new and prev vals - value = Array.isArray(prev) ? prev.concat(val) - : Array.isArray(val) ? [prev].concat(val) - : [prev, val] - } - - return this.set(field, value); -}; - -/** - * Set header `field` to `val`, or pass - * an object of header fields. - * - * Examples: - * - * res.set('Foo', ['bar', 'baz']); - * res.set('Accept', 'application/json'); - * res.set({ Accept: 'text/plain', 'X-API-Key': 'tobi' }); - * - * Aliased as `res.header()`. - * - * When the set header is "Content-Type", the type is expanded to include - * the charset if not present using `mime.contentType()`. - * - * @param {String|Object} field - * @param {String|Array} val - * @return {ServerResponse} for chaining - * @public - */ - -res.set = -res.header = function header(field, val) { - if (arguments.length === 2) { - var value = Array.isArray(val) - ? val.map(String) - : String(val); - - // add charset to content-type - if (field.toLowerCase() === 'content-type') { - if (Array.isArray(value)) { - throw new TypeError('Content-Type cannot be set to an Array'); - } - value = mime.contentType(value) - } - - this.setHeader(field, value); - } else { - for (var key in field) { - this.set(key, field[key]); - } - } - return this; -}; - -/** - * Get value for header `field`. - * - * @param {String} field - * @return {String} - * @public - */ - -res.get = function(field){ - return this.getHeader(field); -}; - -/** - * Clear cookie `name`. - * - * @param {String} name - * @param {Object} [options] - * @return {ServerResponse} for chaining - * @public - */ - -res.clearCookie = function clearCookie(name, options) { - // Force cookie expiration by setting expires to the past - const opts = { path: '/', ...options, expires: new Date(1)}; - // ensure maxAge is not passed - delete opts.maxAge - - return this.cookie(name, '', opts); -}; - -/** - * Set cookie `name` to `value`, with the given `options`. - * - * Options: - * - * - `maxAge` max-age in milliseconds, converted to `expires` - * - `signed` sign the cookie - * - `path` defaults to "/" - * - * Examples: - * - * // "Remember Me" for 15 minutes - * res.cookie('rememberme', '1', { expires: new Date(Date.now() + 900000), httpOnly: true }); - * - * // same as above - * res.cookie('rememberme', '1', { maxAge: 900000, httpOnly: true }) - * - * @param {String} name - * @param {String|Object} value - * @param {Object} [options] - * @return {ServerResponse} for chaining - * @public - */ - -res.cookie = function (name, value, options) { - var opts = { ...options }; - var secret = this.req.secret; - var signed = opts.signed; - - if (signed && !secret) { - throw new Error('cookieParser("secret") required for signed cookies'); - } - - var val = typeof value === 'object' - ? 'j:' + JSON.stringify(value) - : String(value); - - if (signed) { - val = 's:' + sign(val, secret); - } - - if (opts.maxAge != null) { - var maxAge = opts.maxAge - 0 - - if (!isNaN(maxAge)) { - opts.expires = new Date(Date.now() + maxAge) - opts.maxAge = Math.floor(maxAge / 1000) - } - } - - if (opts.path == null) { - opts.path = '/'; - } - - this.append('Set-Cookie', cookie.serialize(name, String(val), opts)); - - return this; -}; - -/** - * Set the location header to `url`. - * - * The given `url` can also be "back", which redirects - * to the _Referrer_ or _Referer_ headers or "/". - * - * Examples: - * - * res.location('/foo/bar').; - * res.location('http://example.com'); - * res.location('../login'); - * - * @param {String} url - * @return {ServerResponse} for chaining - * @public - */ - -res.location = function location(url) { - return this.set('Location', encodeUrl(url)); -}; - -/** - * Redirect to the given `url` with optional response `status` - * defaulting to 302. - * - * Examples: - * - * res.redirect('/foo/bar'); - * res.redirect('http://example.com'); - * res.redirect(301, 'http://example.com'); - * res.redirect('../login'); // /blog/post/1 -> /blog/login - * - * @public - */ - -res.redirect = function redirect(url) { - var address = url; - var body; - var status = 302; - - // allow status / url - if (arguments.length === 2) { - status = arguments[0] - address = arguments[1] - } - - if (!address) { - deprecate('Provide a url argument'); - } - - if (typeof address !== 'string') { - deprecate('Url must be a string'); - } - - if (typeof status !== 'number') { - deprecate('Status must be a number'); - } - - // Set location header - address = this.location(address).get('Location'); - - // Support text/{plain,html} by default - this.format({ - text: function(){ - body = statuses.message[status] + '. Redirecting to ' + address - }, - - html: function(){ - var u = escapeHtml(address); - body = '

' + statuses.message[status] + '. Redirecting to ' + u + '

' - }, - - default: function(){ - body = ''; - } - }); - - // Respond - this.status(status); - this.set('Content-Length', Buffer.byteLength(body)); - - if (this.req.method === 'HEAD') { - this.end(); - } else { - this.end(body); - } -}; - -/** - * Add `field` to Vary. If already present in the Vary set, then - * this call is simply ignored. - * - * @param {Array|String} field - * @return {ServerResponse} for chaining - * @public - */ - -res.vary = function(field){ - vary(this, field); - - return this; -}; - -/** - * Render `view` with the given `options` and optional callback `fn`. - * When a callback function is given a response will _not_ be made - * automatically, otherwise a response of _200_ and _text/html_ is given. - * - * Options: - * - * - `cache` boolean hinting to the engine it should cache - * - `filename` filename of the view being rendered - * - * @public - */ - -res.render = function render(view, options, callback) { - var app = this.req.app; - var done = callback; - var opts = options || {}; - var req = this.req; - var self = this; - - // support callback function as second arg - if (typeof options === 'function') { - done = options; - opts = {}; - } - - // merge res.locals - opts._locals = self.locals; - - // default callback to respond - done = done || function (err, str) { - if (err) return req.next(err); - self.send(str); - }; - - // render - app.render(view, opts, done); -}; - -// pipe the send file stream -function sendfile(res, file, options, callback) { - var done = false; - var streaming; - - // request aborted - function onaborted() { - if (done) return; - done = true; - - var err = new Error('Request aborted'); - err.code = 'ECONNABORTED'; - callback(err); - } - - // directory - function ondirectory() { - if (done) return; - done = true; - - var err = new Error('EISDIR, read'); - err.code = 'EISDIR'; - callback(err); - } - - // errors - function onerror(err) { - if (done) return; - done = true; - callback(err); - } - - // ended - function onend() { - if (done) return; - done = true; - callback(); - } - - // file - function onfile() { - streaming = false; - } - - // finished - function onfinish(err) { - if (err && err.code === 'ECONNRESET') return onaborted(); - if (err) return onerror(err); - if (done) return; - - setImmediate(function () { - if (streaming !== false && !done) { - onaborted(); - return; - } - - if (done) return; - done = true; - callback(); - }); - } - - // streaming - function onstream() { - streaming = true; - } - - file.on('directory', ondirectory); - file.on('end', onend); - file.on('error', onerror); - file.on('file', onfile); - file.on('stream', onstream); - onFinished(res, onfinish); - - if (options.headers) { - // set headers on successful transfer - file.on('headers', function headers(res) { - var obj = options.headers; - var keys = Object.keys(obj); - - for (var i = 0; i < keys.length; i++) { - var k = keys[i]; - res.setHeader(k, obj[k]); - } - }); - } - - // pipe - file.pipe(res); -} - -/** - * Stringify JSON, like JSON.stringify, but v8 optimized, with the - * ability to escape characters that can trigger HTML sniffing. - * - * @param {*} value - * @param {function} replacer - * @param {number} spaces - * @param {boolean} escape - * @returns {string} - * @private - */ - -function stringify (value, replacer, spaces, escape) { - // v8 checks arguments.length for optimizing simple call - // https://bugs.chromium.org/p/v8/issues/detail?id=4730 - var json = replacer || spaces - ? JSON.stringify(value, replacer, spaces) - : JSON.stringify(value); - - if (escape && typeof json === 'string') { - json = json.replace(/[<>&]/g, function (c) { - switch (c.charCodeAt(0)) { - case 0x3c: - return '\\u003c' - case 0x3e: - return '\\u003e' - case 0x26: - return '\\u0026' - /* istanbul ignore next: unreachable default */ - default: - return c - } - }) - } - - return json -} diff --git a/node_modules/@nestjs/platform-express/node_modules/express/lib/utils.js b/node_modules/@nestjs/platform-express/node_modules/express/lib/utils.js deleted file mode 100644 index 4f21e7e..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/express/lib/utils.js +++ /dev/null @@ -1,271 +0,0 @@ -/*! - * express - * Copyright(c) 2009-2013 TJ Holowaychuk - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module dependencies. - * @api private - */ - -var { METHODS } = require('node:http'); -var contentType = require('content-type'); -var etag = require('etag'); -var mime = require('mime-types') -var proxyaddr = require('proxy-addr'); -var qs = require('qs'); -var querystring = require('node:querystring'); -const { Buffer } = require('node:buffer'); - - -/** - * A list of lowercased HTTP methods that are supported by Node.js. - * @api private - */ -exports.methods = METHODS.map((method) => method.toLowerCase()); - -/** - * Return strong ETag for `body`. - * - * @param {String|Buffer} body - * @param {String} [encoding] - * @return {String} - * @api private - */ - -exports.etag = createETagGenerator({ weak: false }) - -/** - * Return weak ETag for `body`. - * - * @param {String|Buffer} body - * @param {String} [encoding] - * @return {String} - * @api private - */ - -exports.wetag = createETagGenerator({ weak: true }) - -/** - * Normalize the given `type`, for example "html" becomes "text/html". - * - * @param {String} type - * @return {Object} - * @api private - */ - -exports.normalizeType = function(type){ - return ~type.indexOf('/') - ? acceptParams(type) - : { value: (mime.lookup(type) || 'application/octet-stream'), params: {} } -}; - -/** - * Normalize `types`, for example "html" becomes "text/html". - * - * @param {Array} types - * @return {Array} - * @api private - */ - -exports.normalizeTypes = function(types) { - return types.map(exports.normalizeType); -}; - - -/** - * Parse accept params `str` returning an - * object with `.value`, `.quality` and `.params`. - * - * @param {String} str - * @return {Object} - * @api private - */ - -function acceptParams (str) { - var length = str.length; - var colonIndex = str.indexOf(';'); - var index = colonIndex === -1 ? length : colonIndex; - var ret = { value: str.slice(0, index).trim(), quality: 1, params: {} }; - - while (index < length) { - var splitIndex = str.indexOf('=', index); - if (splitIndex === -1) break; - - var colonIndex = str.indexOf(';', index); - var endIndex = colonIndex === -1 ? length : colonIndex; - - if (splitIndex > endIndex) { - index = str.lastIndexOf(';', splitIndex - 1) + 1; - continue; - } - - var key = str.slice(index, splitIndex).trim(); - var value = str.slice(splitIndex + 1, endIndex).trim(); - - if (key === 'q') { - ret.quality = parseFloat(value); - } else { - ret.params[key] = value; - } - - index = endIndex + 1; - } - - return ret; -} - -/** - * Compile "etag" value to function. - * - * @param {Boolean|String|Function} val - * @return {Function} - * @api private - */ - -exports.compileETag = function(val) { - var fn; - - if (typeof val === 'function') { - return val; - } - - switch (val) { - case true: - case 'weak': - fn = exports.wetag; - break; - case false: - break; - case 'strong': - fn = exports.etag; - break; - default: - throw new TypeError('unknown value for etag function: ' + val); - } - - return fn; -} - -/** - * Compile "query parser" value to function. - * - * @param {String|Function} val - * @return {Function} - * @api private - */ - -exports.compileQueryParser = function compileQueryParser(val) { - var fn; - - if (typeof val === 'function') { - return val; - } - - switch (val) { - case true: - case 'simple': - fn = querystring.parse; - break; - case false: - break; - case 'extended': - fn = parseExtendedQueryString; - break; - default: - throw new TypeError('unknown value for query parser function: ' + val); - } - - return fn; -} - -/** - * Compile "proxy trust" value to function. - * - * @param {Boolean|String|Number|Array|Function} val - * @return {Function} - * @api private - */ - -exports.compileTrust = function(val) { - if (typeof val === 'function') return val; - - if (val === true) { - // Support plain true/false - return function(){ return true }; - } - - if (typeof val === 'number') { - // Support trusting hop count - return function(a, i){ return i < val }; - } - - if (typeof val === 'string') { - // Support comma-separated values - val = val.split(',') - .map(function (v) { return v.trim() }) - } - - return proxyaddr.compile(val || []); -} - -/** - * Set the charset in a given Content-Type string. - * - * @param {String} type - * @param {String} charset - * @return {String} - * @api private - */ - -exports.setCharset = function setCharset(type, charset) { - if (!type || !charset) { - return type; - } - - // parse type - var parsed = contentType.parse(type); - - // set charset - parsed.parameters.charset = charset; - - // format type - return contentType.format(parsed); -}; - -/** - * Create an ETag generator function, generating ETags with - * the given options. - * - * @param {object} options - * @return {function} - * @private - */ - -function createETagGenerator (options) { - return function generateETag (body, encoding) { - var buf = !Buffer.isBuffer(body) - ? Buffer.from(body, encoding) - : body - - return etag(buf, options) - } -} - -/** - * Parse an extended query string with qs. - * - * @param {String} str - * @return {Object} - * @private - */ - -function parseExtendedQueryString(str) { - return qs.parse(str, { - allowPrototypes: true - }); -} diff --git a/node_modules/@nestjs/platform-express/node_modules/express/lib/view.js b/node_modules/@nestjs/platform-express/node_modules/express/lib/view.js deleted file mode 100644 index d66b4a2..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/express/lib/view.js +++ /dev/null @@ -1,205 +0,0 @@ -/*! - * express - * Copyright(c) 2009-2013 TJ Holowaychuk - * Copyright(c) 2013 Roman Shtylman - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module dependencies. - * @private - */ - -var debug = require('debug')('express:view'); -var path = require('node:path'); -var fs = require('node:fs'); - -/** - * Module variables. - * @private - */ - -var dirname = path.dirname; -var basename = path.basename; -var extname = path.extname; -var join = path.join; -var resolve = path.resolve; - -/** - * Module exports. - * @public - */ - -module.exports = View; - -/** - * Initialize a new `View` with the given `name`. - * - * Options: - * - * - `defaultEngine` the default template engine name - * - `engines` template engine require() cache - * - `root` root path for view lookup - * - * @param {string} name - * @param {object} options - * @public - */ - -function View(name, options) { - var opts = options || {}; - - this.defaultEngine = opts.defaultEngine; - this.ext = extname(name); - this.name = name; - this.root = opts.root; - - if (!this.ext && !this.defaultEngine) { - throw new Error('No default engine was specified and no extension was provided.'); - } - - var fileName = name; - - if (!this.ext) { - // get extension from default engine name - this.ext = this.defaultEngine[0] !== '.' - ? '.' + this.defaultEngine - : this.defaultEngine; - - fileName += this.ext; - } - - if (!opts.engines[this.ext]) { - // load engine - var mod = this.ext.slice(1) - debug('require "%s"', mod) - - // default engine export - var fn = require(mod).__express - - if (typeof fn !== 'function') { - throw new Error('Module "' + mod + '" does not provide a view engine.') - } - - opts.engines[this.ext] = fn - } - - // store loaded engine - this.engine = opts.engines[this.ext]; - - // lookup path - this.path = this.lookup(fileName); -} - -/** - * Lookup view by the given `name` - * - * @param {string} name - * @private - */ - -View.prototype.lookup = function lookup(name) { - var path; - var roots = [].concat(this.root); - - debug('lookup "%s"', name); - - for (var i = 0; i < roots.length && !path; i++) { - var root = roots[i]; - - // resolve the path - var loc = resolve(root, name); - var dir = dirname(loc); - var file = basename(loc); - - // resolve the file - path = this.resolve(dir, file); - } - - return path; -}; - -/** - * Render with the given options. - * - * @param {object} options - * @param {function} callback - * @private - */ - -View.prototype.render = function render(options, callback) { - var sync = true; - - debug('render "%s"', this.path); - - // render, normalizing sync callbacks - this.engine(this.path, options, function onRender() { - if (!sync) { - return callback.apply(this, arguments); - } - - // copy arguments - var args = new Array(arguments.length); - var cntx = this; - - for (var i = 0; i < arguments.length; i++) { - args[i] = arguments[i]; - } - - // force callback to be async - return process.nextTick(function renderTick() { - return callback.apply(cntx, args); - }); - }); - - sync = false; -}; - -/** - * Resolve the file within the given directory. - * - * @param {string} dir - * @param {string} file - * @private - */ - -View.prototype.resolve = function resolve(dir, file) { - var ext = this.ext; - - // . - var path = join(dir, file); - var stat = tryStat(path); - - if (stat && stat.isFile()) { - return path; - } - - // /index. - path = join(dir, basename(file, ext), 'index' + ext); - stat = tryStat(path); - - if (stat && stat.isFile()) { - return path; - } -}; - -/** - * Return a stat, maybe. - * - * @param {string} path - * @return {fs.Stats} - * @private - */ - -function tryStat(path) { - debug('stat "%s"', path); - - try { - return fs.statSync(path); - } catch (e) { - return undefined; - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/express/package.json b/node_modules/@nestjs/platform-express/node_modules/express/package.json deleted file mode 100644 index 8f35883..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/express/package.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "name": "express", - "description": "Fast, unopinionated, minimalist web framework", - "version": "5.2.1", - "author": "TJ Holowaychuk ", - "contributors": [ - "Aaron Heckmann ", - "Ciaran Jessup ", - "Douglas Christopher Wilson ", - "Guillermo Rauch ", - "Jonathan Ong ", - "Roman Shtylman ", - "Young Jae Sim " - ], - "license": "MIT", - "repository": "expressjs/express", - "homepage": "https://expressjs.com/", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - }, - "keywords": [ - "express", - "framework", - "sinatra", - "web", - "http", - "rest", - "restful", - "router", - "app", - "api" - ], - "dependencies": { - "accepts": "^2.0.0", - "body-parser": "^2.2.1", - "content-disposition": "^1.0.0", - "content-type": "^1.0.5", - "cookie": "^0.7.1", - "cookie-signature": "^1.2.1", - "debug": "^4.4.0", - "depd": "^2.0.0", - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "etag": "^1.8.1", - "finalhandler": "^2.1.0", - "fresh": "^2.0.0", - "http-errors": "^2.0.0", - "merge-descriptors": "^2.0.0", - "mime-types": "^3.0.0", - "on-finished": "^2.4.1", - "once": "^1.4.0", - "parseurl": "^1.3.3", - "proxy-addr": "^2.0.7", - "qs": "^6.14.0", - "range-parser": "^1.2.1", - "router": "^2.2.0", - "send": "^1.1.0", - "serve-static": "^2.2.0", - "statuses": "^2.0.1", - "type-is": "^2.0.1", - "vary": "^1.1.2" - }, - "devDependencies": { - "after": "0.8.2", - "connect-redis": "^8.0.1", - "cookie-parser": "1.4.7", - "cookie-session": "2.1.1", - "ejs": "^3.1.10", - "eslint": "8.47.0", - "express-session": "^1.18.1", - "hbs": "4.2.0", - "marked": "^15.0.3", - "method-override": "3.0.0", - "mocha": "^10.7.3", - "morgan": "1.10.1", - "nyc": "^17.1.0", - "pbkdf2-password": "1.2.1", - "supertest": "^6.3.0", - "vhost": "~3.0.2" - }, - "engines": { - "node": ">= 18" - }, - "files": [ - "LICENSE", - "Readme.md", - "index.js", - "lib/" - ], - "scripts": { - "lint": "eslint .", - "lint:fix": "eslint . --fix", - "test": "mocha --require test/support/env --reporter spec --check-leaks test/ test/acceptance/", - "test-ci": "nyc --exclude examples --exclude test --exclude benchmarks --reporter=lcovonly --reporter=text npm test", - "test-cov": "nyc --exclude examples --exclude test --exclude benchmarks --reporter=html --reporter=text npm test", - "test-tap": "mocha --require test/support/env --reporter tap --check-leaks test/ test/acceptance/" - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/finalhandler/HISTORY.md b/node_modules/@nestjs/platform-express/node_modules/finalhandler/HISTORY.md deleted file mode 100644 index 8b011be..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/finalhandler/HISTORY.md +++ /dev/null @@ -1,239 +0,0 @@ -v2.1.1. / 2025-12-01 -================== - -* update engines field in the package.json to reflect the current compatibility (Node <18). See: 2.0.0 -* Minor changes (package metadata) - -v2.1.0 / 2025-03-05 -================== - - * deps: - * use caret notation for dependency versions - * encodeurl@^2.0.0 - * debug@^4.4.0 - * remove `ServerResponse.headersSent` support check - * remove setImmediate support check - * update test dependencies - * remove unnecessary devDependency `safe-buffer` - * remove `unpipe` package and use native `unpipe()` method - * remove unnecessary devDependency `readable-stream` - * refactor: use object spread to copy error headers - * refactor: use replaceAll instead of replace with a regex - * refactor: replace setHeaders function with optimized inline header setting - -v2.0.0 / 2024-09-02 -================== - - * drop support for node <18 - * ignore status message for HTTP/2 (#53) - -v1.3.1 / 2024-09-11 -================== - - * deps: encodeurl@~2.0.0 - -v1.3.0 / 2024-09-03 -================== - - * ignore status message for HTTP/2 (#53) - -v1.2.1 / 2024-09-02 -================== - - * Gracefully handle when handling an error and socket is null - -1.2.0 / 2022-03-22 -================== - - * Remove set content headers that break response - * deps: on-finished@2.4.1 - * deps: statuses@2.0.1 - - Rename `425 Unordered Collection` to standard `425 Too Early` - -1.1.2 / 2019-05-09 -================== - - * Set stricter `Content-Security-Policy` header - * deps: parseurl@~1.3.3 - * deps: statuses@~1.5.0 - -1.1.1 / 2018-03-06 -================== - - * Fix 404 output for bad / missing pathnames - * deps: encodeurl@~1.0.2 - - Fix encoding `%` as last character - * deps: statuses@~1.4.0 - -1.1.0 / 2017-09-24 -================== - - * Use `res.headersSent` when available - -1.0.6 / 2017-09-22 -================== - - * deps: debug@2.6.9 - -1.0.5 / 2017-09-15 -================== - - * deps: parseurl@~1.3.2 - - perf: reduce overhead for full URLs - - perf: unroll the "fast-path" `RegExp` - -1.0.4 / 2017-08-03 -================== - - * deps: debug@2.6.8 - -1.0.3 / 2017-05-16 -================== - - * deps: debug@2.6.7 - - deps: ms@2.0.0 - -1.0.2 / 2017-04-22 -================== - - * deps: debug@2.6.4 - - deps: ms@0.7.3 - -1.0.1 / 2017-03-21 -================== - - * Fix missing `` in HTML document - * deps: debug@2.6.3 - - Fix: `DEBUG_MAX_ARRAY_LENGTH` - -1.0.0 / 2017-02-15 -================== - - * Fix exception when `err` cannot be converted to a string - * Fully URL-encode the pathname in the 404 message - * Only include the pathname in the 404 message - * Send complete HTML document - * Set `Content-Security-Policy: default-src 'self'` header - * deps: debug@2.6.1 - - Allow colors in workers - - Deprecated `DEBUG_FD` environment variable set to `3` or higher - - Fix error when running under React Native - - Use same color for same namespace - - deps: ms@0.7.2 - -0.5.1 / 2016-11-12 -================== - - * Fix exception when `err.headers` is not an object - * deps: statuses@~1.3.1 - * perf: hoist regular expressions - * perf: remove duplicate validation path - -0.5.0 / 2016-06-15 -================== - - * Change invalid or non-numeric status code to 500 - * Overwrite status message to match set status code - * Prefer `err.statusCode` if `err.status` is invalid - * Set response headers from `err.headers` object - * Use `statuses` instead of `http` module for status messages - - Includes all defined status messages - -0.4.1 / 2015-12-02 -================== - - * deps: escape-html@~1.0.3 - - perf: enable strict mode - - perf: optimize string replacement - - perf: use faster string coercion - -0.4.0 / 2015-06-14 -================== - - * Fix a false-positive when unpiping in Node.js 0.8 - * Support `statusCode` property on `Error` objects - * Use `unpipe` module for unpiping requests - * deps: escape-html@1.0.2 - * deps: on-finished@~2.3.0 - - Add defined behavior for HTTP `CONNECT` requests - - Add defined behavior for HTTP `Upgrade` requests - - deps: ee-first@1.1.1 - * perf: enable strict mode - * perf: remove argument reassignment - -0.3.6 / 2015-05-11 -================== - - * deps: debug@~2.2.0 - - deps: ms@0.7.1 - -0.3.5 / 2015-04-22 -================== - - * deps: on-finished@~2.2.1 - - Fix `isFinished(req)` when data buffered - -0.3.4 / 2015-03-15 -================== - - * deps: debug@~2.1.3 - - Fix high intensity foreground color for bold - - deps: ms@0.7.0 - -0.3.3 / 2015-01-01 -================== - - * deps: debug@~2.1.1 - * deps: on-finished@~2.2.0 - -0.3.2 / 2014-10-22 -================== - - * deps: on-finished@~2.1.1 - - Fix handling of pipelined requests - -0.3.1 / 2014-10-16 -================== - - * deps: debug@~2.1.0 - - Implement `DEBUG_FD` env variable support - -0.3.0 / 2014-09-17 -================== - - * Terminate in progress response only on error - * Use `on-finished` to determine request status - -0.2.0 / 2014-09-03 -================== - - * Set `X-Content-Type-Options: nosniff` header - * deps: debug@~2.0.0 - -0.1.0 / 2014-07-16 -================== - - * Respond after request fully read - - prevents hung responses and socket hang ups - * deps: debug@1.0.4 - -0.0.3 / 2014-07-11 -================== - - * deps: debug@1.0.3 - - Add support for multiple wildcards in namespaces - -0.0.2 / 2014-06-19 -================== - - * Handle invalid status codes - -0.0.1 / 2014-06-05 -================== - - * deps: debug@1.0.2 - -0.0.0 / 2014-06-05 -================== - - * Extracted from connect/express diff --git a/node_modules/@nestjs/platform-express/node_modules/finalhandler/LICENSE b/node_modules/@nestjs/platform-express/node_modules/finalhandler/LICENSE deleted file mode 100644 index 6022106..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/finalhandler/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2014-2022 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@nestjs/platform-express/node_modules/finalhandler/README.md b/node_modules/@nestjs/platform-express/node_modules/finalhandler/README.md deleted file mode 100644 index e40f729..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/finalhandler/README.md +++ /dev/null @@ -1,150 +0,0 @@ -# finalhandler - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-image]][node-url] -[![Build Status][github-actions-ci-image]][github-actions-ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] -[![OpenSSF Scorecard Badge][ossf-scorecard-badge]][ossf-scorecard-visualizer] - -Node.js function to invoke as the final step to respond to HTTP request. - -## Installation - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install finalhandler -``` - -## API - -```js -const finalhandler = require('finalhandler') -``` - -### finalhandler(req, res, [options]) - -Returns function to be invoked as the final step for the given `req` and `res`. -This function is to be invoked as `fn(err)`. If `err` is falsy, the handler will -write out a 404 response to the `res`. If it is truthy, an error response will -be written out to the `res` or `res` will be terminated if a response has already -started. - -When an error is written, the following information is added to the response: - - * The `res.statusCode` is set from `err.status` (or `err.statusCode`). If - this value is outside the 4xx or 5xx range, it will be set to 500. - * The `res.statusMessage` is set according to the status code. - * The body will be the HTML of the status code message if `env` is - `'production'`, otherwise will be `err.stack`. - * Any headers specified in an `err.headers` object. - -The final handler will also unpipe anything from `req` when it is invoked. - -#### options.env - -By default, the environment is determined by `NODE_ENV` variable, but it can be -overridden by this option. - -#### options.onerror - -Provide a function to be called with the `err` when it exists. Can be used for -writing errors to a central location without excessive function generation. Called -as `onerror(err, req, res)`. - -## Examples - -### always 404 - -```js -const finalhandler = require('finalhandler') -const http = require('http') - -const server = http.createServer((req, res) => { - const done = finalhandler(req, res) - done() -}) - -server.listen(3000) -``` - -### perform simple action - -```js -const finalhandler = require('finalhandler') -const fs = require('fs') -const http = require('http') - -const server = http.createServer((req, res) => { - const done = finalhandler(req, res) - - fs.readFile('index.html', (err, buf) => { - if (err) return done(err) - res.setHeader('Content-Type', 'text/html') - res.end(buf) - }) -}) - -server.listen(3000) -``` - -### use with middleware-style functions - -```js -const finalhandler = require('finalhandler') -const http = require('http') -const serveStatic = require('serve-static') - -const serve = serveStatic('public') - -const server = http.createServer((req, res) => { - const done = finalhandler(req, res) - serve(req, res, done) -}) - -server.listen(3000) -``` - -### keep log of all errors - -```js -const finalhandler = require('finalhandler') -const fs = require('fs') -const http = require('http') - -const server = http.createServer((req, res) => { - const done = finalhandler(req, res, { onerror: logerror }) - - fs.readFile('index.html', (err, buf) => { - if (err) return done(err) - res.setHeader('Content-Type', 'text/html') - res.end(buf) - }) -}) - -server.listen(3000) - -function logerror (err) { - console.error(err.stack || err.toString()) -} -``` - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/finalhandler.svg -[npm-url]: https://npmjs.org/package/finalhandler -[node-image]: https://img.shields.io/node/v/finalhandler.svg -[node-url]: https://nodejs.org/en/download -[coveralls-image]: https://img.shields.io/coveralls/pillarjs/finalhandler.svg -[coveralls-url]: https://coveralls.io/r/pillarjs/finalhandler?branch=master -[downloads-image]: https://img.shields.io/npm/dm/finalhandler.svg -[downloads-url]: https://npmjs.org/package/finalhandler -[github-actions-ci-image]: https://github.com/pillarjs/finalhandler/actions/workflows/ci.yml/badge.svg -[github-actions-ci-url]: https://github.com/pillarjs/finalhandler/actions/workflows/ci.yml -[ossf-scorecard-badge]: https://api.scorecard.dev/projects/github.com/pillarjs/finalhandler/badge -[ossf-scorecard-visualizer]: https://ossf.github.io/scorecard-visualizer/#/projects/github.com/pillarjs/finalhandler \ No newline at end of file diff --git a/node_modules/@nestjs/platform-express/node_modules/finalhandler/index.js b/node_modules/@nestjs/platform-express/node_modules/finalhandler/index.js deleted file mode 100644 index bf15e48..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/finalhandler/index.js +++ /dev/null @@ -1,293 +0,0 @@ -/*! - * finalhandler - * Copyright(c) 2014-2022 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var debug = require('debug')('finalhandler') -var encodeUrl = require('encodeurl') -var escapeHtml = require('escape-html') -var onFinished = require('on-finished') -var parseUrl = require('parseurl') -var statuses = require('statuses') - -/** - * Module variables. - * @private - */ - -var isFinished = onFinished.isFinished - -/** - * Create a minimal HTML document. - * - * @param {string} message - * @private - */ - -function createHtmlDocument (message) { - var body = escapeHtml(message) - .replaceAll('\n', '
') - .replaceAll(' ', '  ') - - return '\n' + - '\n' + - '\n' + - '\n' + - 'Error\n' + - '\n' + - '\n' + - '
' + body + '
\n' + - '\n' + - '\n' -} - -/** - * Module exports. - * @public - */ - -module.exports = finalhandler - -/** - * Create a function to handle the final response. - * - * @param {Request} req - * @param {Response} res - * @param {Object} [options] - * @return {Function} - * @public - */ - -function finalhandler (req, res, options) { - var opts = options || {} - - // get environment - var env = opts.env || process.env.NODE_ENV || 'development' - - // get error callback - var onerror = opts.onerror - - return function (err) { - var headers - var msg - var status - - // ignore 404 on in-flight response - if (!err && res.headersSent) { - debug('cannot 404 after headers sent') - return - } - - // unhandled error - if (err) { - // respect status code from error - status = getErrorStatusCode(err) - - if (status === undefined) { - // fallback to status code on response - status = getResponseStatusCode(res) - } else { - // respect headers from error - headers = getErrorHeaders(err) - } - - // get error message - msg = getErrorMessage(err, status, env) - } else { - // not found - status = 404 - msg = 'Cannot ' + req.method + ' ' + encodeUrl(getResourceName(req)) - } - - debug('default %s', status) - - // schedule onerror callback - if (err && onerror) { - setImmediate(onerror, err, req, res) - } - - // cannot actually respond - if (res.headersSent) { - debug('cannot %d after headers sent', status) - if (req.socket) { - req.socket.destroy() - } - return - } - - // send response - send(req, res, status, headers, msg) - } -} - -/** - * Get headers from Error object. - * - * @param {Error} err - * @return {object} - * @private - */ - -function getErrorHeaders (err) { - if (!err.headers || typeof err.headers !== 'object') { - return undefined - } - - return { ...err.headers } -} - -/** - * Get message from Error object, fallback to status message. - * - * @param {Error} err - * @param {number} status - * @param {string} env - * @return {string} - * @private - */ - -function getErrorMessage (err, status, env) { - var msg - - if (env !== 'production') { - // use err.stack, which typically includes err.message - msg = err.stack - - // fallback to err.toString() when possible - if (!msg && typeof err.toString === 'function') { - msg = err.toString() - } - } - - return msg || statuses.message[status] -} - -/** - * Get status code from Error object. - * - * @param {Error} err - * @return {number} - * @private - */ - -function getErrorStatusCode (err) { - // check err.status - if (typeof err.status === 'number' && err.status >= 400 && err.status < 600) { - return err.status - } - - // check err.statusCode - if (typeof err.statusCode === 'number' && err.statusCode >= 400 && err.statusCode < 600) { - return err.statusCode - } - - return undefined -} - -/** - * Get resource name for the request. - * - * This is typically just the original pathname of the request - * but will fallback to "resource" is that cannot be determined. - * - * @param {IncomingMessage} req - * @return {string} - * @private - */ - -function getResourceName (req) { - try { - return parseUrl.original(req).pathname - } catch (e) { - return 'resource' - } -} - -/** - * Get status code from response. - * - * @param {OutgoingMessage} res - * @return {number} - * @private - */ - -function getResponseStatusCode (res) { - var status = res.statusCode - - // default status code to 500 if outside valid range - if (typeof status !== 'number' || status < 400 || status > 599) { - status = 500 - } - - return status -} - -/** - * Send response. - * - * @param {IncomingMessage} req - * @param {OutgoingMessage} res - * @param {number} status - * @param {object} headers - * @param {string} message - * @private - */ - -function send (req, res, status, headers, message) { - function write () { - // response body - var body = createHtmlDocument(message) - - // response status - res.statusCode = status - - if (req.httpVersionMajor < 2) { - res.statusMessage = statuses.message[status] - } - - // remove any content headers - res.removeHeader('Content-Encoding') - res.removeHeader('Content-Language') - res.removeHeader('Content-Range') - - // response headers - for (const [key, value] of Object.entries(headers ?? {})) { - res.setHeader(key, value) - } - - // security headers - res.setHeader('Content-Security-Policy', "default-src 'none'") - res.setHeader('X-Content-Type-Options', 'nosniff') - - // standard headers - res.setHeader('Content-Type', 'text/html; charset=utf-8') - res.setHeader('Content-Length', Buffer.byteLength(body, 'utf8')) - - if (req.method === 'HEAD') { - res.end() - return - } - - res.end(body, 'utf8') - } - - if (isFinished(req)) { - write() - return - } - - // unpipe everything from the request - req.unpipe() - - // flush the request - onFinished(req, write) - req.resume() -} diff --git a/node_modules/@nestjs/platform-express/node_modules/finalhandler/package.json b/node_modules/@nestjs/platform-express/node_modules/finalhandler/package.json deleted file mode 100644 index 869ddc2..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/finalhandler/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "finalhandler", - "description": "Node.js final http responder", - "version": "2.1.1", - "author": "Douglas Christopher Wilson ", - "license": "MIT", - "repository": "pillarjs/finalhandler", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - }, - "dependencies": { - "debug": "^4.4.0", - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "on-finished": "^2.4.1", - "parseurl": "^1.3.3", - "statuses": "^2.0.1" - }, - "devDependencies": { - "eslint": "^7.32.0", - "eslint-config-standard": "^14.1.1", - "eslint-plugin-import": "^2.31.0", - "eslint-plugin-markdown": "^2.2.1", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^5.2.0", - "eslint-plugin-standard": "^4.1.0", - "mocha": "^11.0.1", - "nyc": "^17.1.0", - "supertest": "^7.0.0" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "index.js" - ], - "engines": { - "node": ">= 18.0.0" - }, - "scripts": { - "lint": "eslint .", - "test": "mocha --reporter spec --check-leaks test/", - "test-ci": "nyc --reporter=lcovonly --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "test-inspect": "mocha --reporter spec --inspect --inspect-brk test/" - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/fresh/HISTORY.md b/node_modules/@nestjs/platform-express/node_modules/fresh/HISTORY.md deleted file mode 100644 index fd3888a..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/fresh/HISTORY.md +++ /dev/null @@ -1,80 +0,0 @@ -2.0.0 - 2024-09-04 -========== - * Drop support for Node.js <18 - -1.0.0 - 2024-09-04 -========== - - * Drop support for Node.js below 0.8 - * Fix: Ignore `If-Modified-Since` in the presence of `If-None-Match`, according to [spec](https://www.rfc-editor.org/rfc/rfc9110.html#section-13.1.3-5). Fixes [#35](https://github.com/jshttp/fresh/issues/35) - -0.5.2 / 2017-09-13 -================== - - * Fix regression matching multiple ETags in `If-None-Match` - * perf: improve `If-None-Match` token parsing - -0.5.1 / 2017-09-11 -================== - - * Fix handling of modified headers with invalid dates - * perf: improve ETag match loop - -0.5.0 / 2017-02-21 -================== - - * Fix incorrect result when `If-None-Match` has both `*` and ETags - * Fix weak `ETag` matching to match spec - * perf: delay reading header values until needed - * perf: skip checking modified time if ETag check failed - * perf: skip parsing `If-None-Match` when no `ETag` header - * perf: use `Date.parse` instead of `new Date` - -0.4.0 / 2017-02-05 -================== - - * Fix false detection of `no-cache` request directive - * perf: enable strict mode - * perf: hoist regular expressions - * perf: remove duplicate conditional - * perf: remove unnecessary boolean coercions - -0.3.0 / 2015-05-12 -================== - - * Add weak `ETag` matching support - -0.2.4 / 2014-09-07 -================== - - * Support Node.js 0.6 - -0.2.3 / 2014-09-07 -================== - - * Move repository to jshttp - -0.2.2 / 2014-02-19 -================== - - * Revert "Fix for blank page on Safari reload" - -0.2.1 / 2014-01-29 -================== - - * Fix for blank page on Safari reload - -0.2.0 / 2013-08-11 -================== - - * Return stale for `Cache-Control: no-cache` - -0.1.0 / 2012-06-15 -================== - - * Add `If-None-Match: *` support - -0.0.1 / 2012-06-10 -================== - - * Initial release diff --git a/node_modules/@nestjs/platform-express/node_modules/fresh/LICENSE b/node_modules/@nestjs/platform-express/node_modules/fresh/LICENSE deleted file mode 100644 index 1434ade..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/fresh/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2012 TJ Holowaychuk -Copyright (c) 2016-2017 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@nestjs/platform-express/node_modules/fresh/README.md b/node_modules/@nestjs/platform-express/node_modules/fresh/README.md deleted file mode 100644 index fd79c5b..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/fresh/README.md +++ /dev/null @@ -1,117 +0,0 @@ -# fresh - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][ci-image]][ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -HTTP response freshness testing - -## Installation - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -``` -$ npm install fresh -``` - -## API - -```js -var fresh = require('fresh') -``` - -### fresh(reqHeaders, resHeaders) - -Check freshness of the response using request and response headers. - -When the response is still "fresh" in the client's cache `true` is -returned, otherwise `false` is returned to indicate that the client -cache is now stale and the full response should be sent. - -When a client sends the `Cache-Control: no-cache` request header to -indicate an end-to-end reload request, this module will return `false` -to make handling these requests transparent. - -## Known Issues - -This module is designed to only follow the HTTP specifications, not -to work-around all kinda of client bugs (especially since this module -typically does not receive enough information to understand what the -client actually is). - -There is a known issue that in certain versions of Safari, Safari -will incorrectly make a request that allows this module to validate -freshness of the resource even when Safari does not have a -representation of the resource in the cache. The module -[jumanji](https://www.npmjs.com/package/jumanji) can be used in -an Express application to work-around this issue and also provides -links to further reading on this Safari bug. - -## Example - -### API usage - - - -```js -var reqHeaders = { 'if-none-match': '"foo"' } -var resHeaders = { etag: '"bar"' } -fresh(reqHeaders, resHeaders) -// => false - -var reqHeaders = { 'if-none-match': '"foo"' } -var resHeaders = { etag: '"foo"' } -fresh(reqHeaders, resHeaders) -// => true -``` - -### Using with Node.js http server - -```js -var fresh = require('fresh') -var http = require('http') - -var server = http.createServer(function (req, res) { - // perform server logic - // ... including adding ETag / Last-Modified response headers - - if (isFresh(req, res)) { - // client has a fresh copy of resource - res.statusCode = 304 - res.end() - return - } - - // send the resource - res.statusCode = 200 - res.end('hello, world!') -}) - -function isFresh (req, res) { - return fresh(req.headers, { - etag: res.getHeader('ETag'), - 'last-modified': res.getHeader('Last-Modified') - }) -} - -server.listen(3000) -``` - -## License - -[MIT](LICENSE) - -[ci-image]: https://img.shields.io/github/workflow/status/jshttp/fresh/ci/master?label=ci -[ci-url]: https://github.com/jshttp/fresh/actions/workflows/ci.yml -[npm-image]: https://img.shields.io/npm/v/fresh.svg -[npm-url]: https://npmjs.org/package/fresh -[node-version-image]: https://img.shields.io/node/v/fresh.svg -[node-version-url]: https://nodejs.org/en/ -[coveralls-image]: https://img.shields.io/coveralls/jshttp/fresh/master.svg -[coveralls-url]: https://coveralls.io/r/jshttp/fresh?branch=master -[downloads-image]: https://img.shields.io/npm/dm/fresh.svg -[downloads-url]: https://npmjs.org/package/fresh diff --git a/node_modules/@nestjs/platform-express/node_modules/fresh/index.js b/node_modules/@nestjs/platform-express/node_modules/fresh/index.js deleted file mode 100644 index fc3dea7..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/fresh/index.js +++ /dev/null @@ -1,136 +0,0 @@ -/*! - * fresh - * Copyright(c) 2012 TJ Holowaychuk - * Copyright(c) 2016-2017 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * RegExp to check for no-cache token in Cache-Control. - * @private - */ - -var CACHE_CONTROL_NO_CACHE_REGEXP = /(?:^|,)\s*?no-cache\s*?(?:,|$)/ - -/** - * Module exports. - * @public - */ - -module.exports = fresh - -/** - * Check freshness of the response using request and response headers. - * - * @param {Object} reqHeaders - * @param {Object} resHeaders - * @return {Boolean} - * @public - */ - -function fresh (reqHeaders, resHeaders) { - // fields - var modifiedSince = reqHeaders['if-modified-since'] - var noneMatch = reqHeaders['if-none-match'] - - // unconditional request - if (!modifiedSince && !noneMatch) { - return false - } - - // Always return stale when Cache-Control: no-cache - // to support end-to-end reload requests - // https://tools.ietf.org/html/rfc2616#section-14.9.4 - var cacheControl = reqHeaders['cache-control'] - if (cacheControl && CACHE_CONTROL_NO_CACHE_REGEXP.test(cacheControl)) { - return false - } - - // if-none-match takes precedent over if-modified-since - if (noneMatch) { - if (noneMatch === '*') { - return true - } - var etag = resHeaders.etag - - if (!etag) { - return false - } - - var matches = parseTokenList(noneMatch) - for (var i = 0; i < matches.length; i++) { - var match = matches[i] - if (match === etag || match === 'W/' + etag || 'W/' + match === etag) { - return true - } - } - - return false - } - - // if-modified-since - if (modifiedSince) { - var lastModified = resHeaders['last-modified'] - var modifiedStale = !lastModified || !(parseHttpDate(lastModified) <= parseHttpDate(modifiedSince)) - - if (modifiedStale) { - return false - } - } - - return true -} - -/** - * Parse an HTTP Date into a number. - * - * @param {string} date - * @private - */ - -function parseHttpDate (date) { - var timestamp = date && Date.parse(date) - - // istanbul ignore next: guard against date.js Date.parse patching - return typeof timestamp === 'number' - ? timestamp - : NaN -} - -/** - * Parse a HTTP token list. - * - * @param {string} str - * @private - */ - -function parseTokenList (str) { - var end = 0 - var list = [] - var start = 0 - - // gather tokens - for (var i = 0, len = str.length; i < len; i++) { - switch (str.charCodeAt(i)) { - case 0x20: /* */ - if (start === end) { - start = end = i + 1 - } - break - case 0x2c: /* , */ - list.push(str.substring(start, end)) - start = end = i + 1 - break - default: - end = i + 1 - break - } - } - - // final token - list.push(str.substring(start, end)) - - return list -} diff --git a/node_modules/@nestjs/platform-express/node_modules/fresh/package.json b/node_modules/@nestjs/platform-express/node_modules/fresh/package.json deleted file mode 100644 index 5d7e215..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/fresh/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "fresh", - "description": "HTTP response freshness testing", - "version": "2.0.0", - "author": "TJ Holowaychuk (http://tjholowaychuk.com)", - "contributors": [ - "Douglas Christopher Wilson ", - "Jonathan Ong (http://jongleberry.com)" - ], - "license": "MIT", - "keywords": [ - "fresh", - "http", - "conditional", - "cache" - ], - "repository": "jshttp/fresh", - "devDependencies": { - "beautify-benchmark": "0.2.4", - "benchmark": "2.1.4", - "eslint": "8.12.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.25.4", - "eslint-plugin-markdown": "2.2.1", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "6.0.0", - "eslint-plugin-standard": "4.1.0", - "mocha": "9.2.0", - "nyc": "15.1.0" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "index.js" - ], - "engines": { - "node": ">= 0.8" - }, - "scripts": { - "bench": "node benchmark/index.js", - "lint": "eslint .", - "test": "mocha --reporter spec --check-leaks --bail test/", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test" - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/LICENSE b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/LICENSE deleted file mode 100644 index d518d83..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2011 Alexander Shtuchkin - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/README.md b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/README.md deleted file mode 100644 index 78a7a5f..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/README.md +++ /dev/null @@ -1,138 +0,0 @@ -## iconv-lite: Pure JS character encoding conversion - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-downloads-url] -[![License][license-image]][license-url] -[![NPM Install Size][npm-install-size-image]][npm-install-size-url] - -* No need for native code compilation. Quick to install, works on Windows, Web, and in sandboxed environments. -* Used in popular projects like [Express.js (body_parser)](https://github.com/expressjs/body-parser), - [Grunt](http://gruntjs.com/), [Nodemailer](http://www.nodemailer.com/), [Yeoman](http://yeoman.io/) and others. -* Faster than [node-iconv](https://github.com/bnoordhuis/node-iconv) (see below for performance comparison). -* Intuitive encode/decode API, including Streaming support. -* In-browser usage via [browserify](https://github.com/substack/node-browserify) or [webpack](https://webpack.js.org/) (~180kb gzip compressed with Buffer shim included). -* Typescript [type definition file](https://github.com/ashtuchkin/iconv-lite/blob/master/lib/index.d.ts) included. -* React Native is supported (need to install `stream` module to enable Streaming API). - -## Usage - -### Basic API - -```javascript -var iconv = require('iconv-lite'); - -// Convert from an encoded buffer to a js string. -str = iconv.decode(Buffer.from([0x68, 0x65, 0x6c, 0x6c, 0x6f]), 'win1251'); - -// Convert from a js string to an encoded buffer. -buf = iconv.encode("Sample input string", 'win1251'); - -// Check if encoding is supported -iconv.encodingExists("us-ascii") -``` - -### Streaming API - -```javascript -// Decode stream (from binary data stream to js strings) -http.createServer(function(req, res) { - var converterStream = iconv.decodeStream('win1251'); - req.pipe(converterStream); - - converterStream.on('data', function(str) { - console.log(str); // Do something with decoded strings, chunk-by-chunk. - }); -}); - -// Convert encoding streaming example -fs.createReadStream('file-in-win1251.txt') - .pipe(iconv.decodeStream('win1251')) - .pipe(iconv.encodeStream('ucs2')) - .pipe(fs.createWriteStream('file-in-ucs2.txt')); - -// Sugar: all encode/decode streams have .collect(cb) method to accumulate data. -http.createServer(function(req, res) { - req.pipe(iconv.decodeStream('win1251')).collect(function(err, body) { - assert(typeof body == 'string'); - console.log(body); // full request body string - }); -}); -``` - -## Supported encodings - - * All node.js native encodings: utf8, ucs2 / utf16-le, ascii, binary, base64, hex. - * Additional unicode encodings: utf16, utf16-be, utf-7, utf-7-imap, utf32, utf32-le, and utf32-be. - * All widespread singlebyte encodings: Windows 125x family, ISO-8859 family, - IBM/DOS codepages, Macintosh family, KOI8 family, all others supported by iconv library. - Aliases like 'latin1', 'us-ascii' also supported. - * All widespread multibyte encodings: CP932, CP936, CP949, CP950, GB2312, GBK, GB18030, Big5, Shift_JIS, EUC-JP. - -See [all supported encodings on wiki](https://github.com/ashtuchkin/iconv-lite/wiki/Supported-Encodings). - -Most singlebyte encodings are generated automatically from [node-iconv](https://github.com/bnoordhuis/node-iconv). Thank you Ben Noordhuis and libiconv authors! - -Multibyte encodings are generated from [Unicode.org mappings](http://www.unicode.org/Public/MAPPINGS/) and [WHATWG Encoding Standard mappings](http://encoding.spec.whatwg.org/). Thank you, respective authors! - -## Encoding/decoding speed - -Comparison with node-iconv module (1000x256kb, on MacBook Pro, Core i5/2.6 GHz, Node v0.12.0). -Note: your results may vary, so please always check on your hardware. - - operation iconv@2.1.4 iconv-lite@0.4.7 - ---------------------------------------------------------- - encode('win1251') ~96 Mb/s ~320 Mb/s - decode('win1251') ~95 Mb/s ~246 Mb/s - -## BOM handling - - * Decoding: BOM is stripped by default, unless overridden by passing `stripBOM: false` in options - (f.ex. `iconv.decode(buf, enc, {stripBOM: false})`). - A callback might also be given as a `stripBOM` parameter - it'll be called if BOM character was actually found. - * If you want to detect UTF-8 BOM when decoding other encodings, use [node-autodetect-decoder-stream](https://github.com/danielgindi/node-autodetect-decoder-stream) module. - * Encoding: No BOM added, unless overridden by `addBOM: true` option. - -## UTF-16 Encodings - -This library supports UTF-16LE, UTF-16BE and UTF-16 encodings. First two are straightforward, but UTF-16 is trying to be -smart about endianness in the following ways: - * Decoding: uses BOM and 'spaces heuristic' to determine input endianness. Default is UTF-16LE, but can be - overridden with `defaultEncoding: 'utf-16be'` option. Strips BOM unless `stripBOM: false`. - * Encoding: uses UTF-16LE and writes BOM by default. Use `addBOM: false` to override. - -## UTF-32 Encodings - -This library supports UTF-32LE, UTF-32BE and UTF-32 encodings. Like the UTF-16 encoding above, UTF-32 defaults to UTF-32LE, but uses BOM and 'spaces heuristics' to determine input endianness. - * The default of UTF-32LE can be overridden with the `defaultEncoding: 'utf-32be'` option. Strips BOM unless `stripBOM: false`. - * Encoding: uses UTF-32LE and writes BOM by default. Use `addBOM: false` to override. (`defaultEncoding: 'utf-32be'` can also be used here to change encoding.) - -## Other notes - -When decoding, be sure to supply a Buffer to decode() method, otherwise [bad things usually happen](https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding). -Untranslatable characters are set to � or ?. No transliteration is currently supported. -Node versions 0.10.31 and 0.11.13 are buggy, don't use them (see [#65](https://github.com/ashtuchkin/iconv-lite/issues/65), [#77](https://github.com/ashtuchkin/iconv-lite/issues/77)). - -## Testing - -```sh -git clone git@github.com:ashtuchkin/iconv-lite.git -cd iconv-lite -npm install -npm test - -# To view performance: -npm run test:performance - -# To view test coverage: -npm run test:cov -open coverage/index.html -``` - -[npm-downloads-image]: https://badgen.net/npm/dm/iconv-lite -[npm-downloads-url]: https://npmcharts.com/compare/iconv-lite?minimal=true -[npm-url]: https://npmjs.org/package/iconv-lite -[npm-version-image]: https://badgen.net/npm/v/iconv-lite -[npm-install-size-image]: https://badgen.net/packagephobia/install/iconv-lite -[npm-install-size-url]: https://packagephobia.com/result?p=iconv-lite -[license-image]: https://img.shields.io/npm/l/iconv-lite.svg -[license-url]: https://github.com/ashtuchkin/iconv-lite/blob/HEAD/LICENSE \ No newline at end of file diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/dbcs-codec.js b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/dbcs-codec.js deleted file mode 100644 index bfec7f2..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/dbcs-codec.js +++ /dev/null @@ -1,532 +0,0 @@ -"use strict" -var Buffer = require("safer-buffer").Buffer - -// Multibyte codec. In this scheme, a character is represented by 1 or more bytes. -// Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences. -// To save memory and loading time, we read table files only when requested. - -exports._dbcs = DBCSCodec - -var UNASSIGNED = -1 -var GB18030_CODE = -2 -var SEQ_START = -10 -var NODE_START = -1000 -var UNASSIGNED_NODE = new Array(0x100) -var DEF_CHAR = -1 - -for (var i = 0; i < 0x100; i++) { UNASSIGNED_NODE[i] = UNASSIGNED } - -// Class DBCSCodec reads and initializes mapping tables. -function DBCSCodec (codecOptions, iconv) { - this.encodingName = codecOptions.encodingName - if (!codecOptions) { throw new Error("DBCS codec is called without the data.") } - if (!codecOptions.table) { throw new Error("Encoding '" + this.encodingName + "' has no data.") } - - // Load tables. - var mappingTable = codecOptions.table() - - // Decode tables: MBCS -> Unicode. - - // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256. - // Trie root is decodeTables[0]. - // Values: >= 0 -> unicode character code. can be > 0xFFFF - // == UNASSIGNED -> unknown/unassigned sequence. - // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence. - // <= NODE_START -> index of the next node in our trie to process next byte. - // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq. - this.decodeTables = [] - this.decodeTables[0] = UNASSIGNED_NODE.slice(0) // Create root node. - - // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here. - this.decodeTableSeq = [] - - // Actual mapping tables consist of chunks. Use them to fill up decode tables. - for (var i = 0; i < mappingTable.length; i++) { this._addDecodeChunk(mappingTable[i]) } - - // Load & create GB18030 tables when needed. - if (typeof codecOptions.gb18030 === "function") { - this.gb18030 = codecOptions.gb18030() // Load GB18030 ranges. - - // Add GB18030 common decode nodes. - var commonThirdByteNodeIdx = this.decodeTables.length - this.decodeTables.push(UNASSIGNED_NODE.slice(0)) - - var commonFourthByteNodeIdx = this.decodeTables.length - this.decodeTables.push(UNASSIGNED_NODE.slice(0)) - - // Fill out the tree - var firstByteNode = this.decodeTables[0] - for (var i = 0x81; i <= 0xFE; i++) { - var secondByteNode = this.decodeTables[NODE_START - firstByteNode[i]] - for (var j = 0x30; j <= 0x39; j++) { - if (secondByteNode[j] === UNASSIGNED) { - secondByteNode[j] = NODE_START - commonThirdByteNodeIdx - } else if (secondByteNode[j] > NODE_START) { - throw new Error("gb18030 decode tables conflict at byte 2") - } - - var thirdByteNode = this.decodeTables[NODE_START - secondByteNode[j]] - for (var k = 0x81; k <= 0xFE; k++) { - if (thirdByteNode[k] === UNASSIGNED) { - thirdByteNode[k] = NODE_START - commonFourthByteNodeIdx - } else if (thirdByteNode[k] === NODE_START - commonFourthByteNodeIdx) { - continue - } else if (thirdByteNode[k] > NODE_START) { - throw new Error("gb18030 decode tables conflict at byte 3") - } - - var fourthByteNode = this.decodeTables[NODE_START - thirdByteNode[k]] - for (var l = 0x30; l <= 0x39; l++) { - if (fourthByteNode[l] === UNASSIGNED) { fourthByteNode[l] = GB18030_CODE } - } - } - } - } - } - - this.defaultCharUnicode = iconv.defaultCharUnicode - - // Encode tables: Unicode -> DBCS. - - // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance. - // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null. - // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.). - // == UNASSIGNED -> no conversion found. Output a default char. - // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence. - this.encodeTable = [] - - // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of - // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key - // means end of sequence (needed when one sequence is a strict subsequence of another). - // Objects are kept separately from encodeTable to increase performance. - this.encodeTableSeq = [] - - // Some chars can be decoded, but need not be encoded. - var skipEncodeChars = {} - if (codecOptions.encodeSkipVals) { - for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) { - var val = codecOptions.encodeSkipVals[i] - if (typeof val === "number") { skipEncodeChars[val] = true } else { - for (var j = val.from; j <= val.to; j++) { skipEncodeChars[j] = true } - } - } - } - - // Use decode trie to recursively fill out encode tables. - this._fillEncodeTable(0, 0, skipEncodeChars) - - // Add more encoding pairs when needed. - if (codecOptions.encodeAdd) { - for (var uChar in codecOptions.encodeAdd) { - if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar)) { this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]) } - } - } - - this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)] - if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]["?"] - if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0) -} - -DBCSCodec.prototype.encoder = DBCSEncoder -DBCSCodec.prototype.decoder = DBCSDecoder - -// Decoder helpers -DBCSCodec.prototype._getDecodeTrieNode = function (addr) { - var bytes = [] - for (; addr > 0; addr >>>= 8) { bytes.push(addr & 0xFF) } - if (bytes.length == 0) { bytes.push(0) } - - var node = this.decodeTables[0] - for (var i = bytes.length - 1; i > 0; i--) { // Traverse nodes deeper into the trie. - var val = node[bytes[i]] - - if (val == UNASSIGNED) { // Create new node. - node[bytes[i]] = NODE_START - this.decodeTables.length - this.decodeTables.push(node = UNASSIGNED_NODE.slice(0)) - } else if (val <= NODE_START) { // Existing node. - node = this.decodeTables[NODE_START - val] - } else { throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16)) } - } - return node -} - -DBCSCodec.prototype._addDecodeChunk = function (chunk) { - // First element of chunk is the hex mbcs code where we start. - var curAddr = parseInt(chunk[0], 16) - - // Choose the decoding node where we'll write our chars. - var writeTable = this._getDecodeTrieNode(curAddr) - curAddr = curAddr & 0xFF - - // Write all other elements of the chunk to the table. - for (var k = 1; k < chunk.length; k++) { - var part = chunk[k] - if (typeof part === "string") { // String, write as-is. - for (var l = 0; l < part.length;) { - var code = part.charCodeAt(l++) - if (code >= 0xD800 && code < 0xDC00) { // Decode surrogate - var codeTrail = part.charCodeAt(l++) - if (codeTrail >= 0xDC00 && codeTrail < 0xE000) { writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00) } else { throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]) } - } else if (code > 0x0FF0 && code <= 0x0FFF) { // Character sequence (our own encoding used) - var len = 0xFFF - code + 2 - var seq = [] - for (var m = 0; m < len; m++) { seq.push(part.charCodeAt(l++)) } // Simple variation: don't support surrogates or subsequences in seq. - - writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length - this.decodeTableSeq.push(seq) - } else { writeTable[curAddr++] = code } // Basic char - } - } else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character. - var charCode = writeTable[curAddr - 1] + 1 - for (var l = 0; l < part; l++) { writeTable[curAddr++] = charCode++ } - } else { throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]) } - } - if (curAddr > 0xFF) { throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr) } -} - -// Encoder helpers -DBCSCodec.prototype._getEncodeBucket = function (uCode) { - var high = uCode >> 8 // This could be > 0xFF because of astral characters. - if (this.encodeTable[high] === undefined) { - this.encodeTable[high] = UNASSIGNED_NODE.slice(0) - } // Create bucket on demand. - return this.encodeTable[high] -} - -DBCSCodec.prototype._setEncodeChar = function (uCode, dbcsCode) { - var bucket = this._getEncodeBucket(uCode) - var low = uCode & 0xFF - if (bucket[low] <= SEQ_START) { this.encodeTableSeq[SEQ_START - bucket[low]][DEF_CHAR] = dbcsCode } // There's already a sequence, set a single-char subsequence of it. - else if (bucket[low] == UNASSIGNED) { bucket[low] = dbcsCode } -} - -DBCSCodec.prototype._setEncodeSequence = function (seq, dbcsCode) { - // Get the root of character tree according to first character of the sequence. - var uCode = seq[0] - var bucket = this._getEncodeBucket(uCode) - var low = uCode & 0xFF - - var node - if (bucket[low] <= SEQ_START) { - // There's already a sequence with - use it. - node = this.encodeTableSeq[SEQ_START - bucket[low]] - } else { - // There was no sequence object - allocate a new one. - node = {} - if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low] // If a char was set before - make it a single-char subsequence. - bucket[low] = SEQ_START - this.encodeTableSeq.length - this.encodeTableSeq.push(node) - } - - // Traverse the character tree, allocating new nodes as needed. - for (var j = 1; j < seq.length - 1; j++) { - var oldVal = node[uCode] - if (typeof oldVal === "object") { node = oldVal } else { - node = node[uCode] = {} - if (oldVal !== undefined) { node[DEF_CHAR] = oldVal } - } - } - - // Set the leaf to given dbcsCode. - uCode = seq[seq.length - 1] - node[uCode] = dbcsCode -} - -DBCSCodec.prototype._fillEncodeTable = function (nodeIdx, prefix, skipEncodeChars) { - var node = this.decodeTables[nodeIdx] - var hasValues = false - var subNodeEmpty = {} - for (var i = 0; i < 0x100; i++) { - var uCode = node[i] - var mbCode = prefix + i - if (skipEncodeChars[mbCode]) { continue } - - if (uCode >= 0) { - this._setEncodeChar(uCode, mbCode) - hasValues = true - } else if (uCode <= NODE_START) { - var subNodeIdx = NODE_START - uCode - if (!subNodeEmpty[subNodeIdx]) { // Skip empty subtrees (they are too large in gb18030). - var newPrefix = (mbCode << 8) >>> 0 // NOTE: '>>> 0' keeps 32-bit num positive. - if (this._fillEncodeTable(subNodeIdx, newPrefix, skipEncodeChars)) { hasValues = true } else { subNodeEmpty[subNodeIdx] = true } - } - } else if (uCode <= SEQ_START) { - this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode) - hasValues = true - } - } - return hasValues -} - -// == Encoder ================================================================== - -function DBCSEncoder (options, codec) { - // Encoder state - this.leadSurrogate = -1 - this.seqObj = undefined - - // Static data - this.encodeTable = codec.encodeTable - this.encodeTableSeq = codec.encodeTableSeq - this.defaultCharSingleByte = codec.defCharSB - this.gb18030 = codec.gb18030 -} - -DBCSEncoder.prototype.write = function (str) { - var newBuf = Buffer.alloc(str.length * (this.gb18030 ? 4 : 3)) - var leadSurrogate = this.leadSurrogate - var seqObj = this.seqObj - var nextChar = -1 - var i = 0; var j = 0 - - while (true) { - // 0. Get next character. - if (nextChar === -1) { - if (i == str.length) break - var uCode = str.charCodeAt(i++) - } else { - var uCode = nextChar - nextChar = -1 - } - - // 1. Handle surrogates. - if (uCode >= 0xD800 && uCode < 0xE000) { // Char is one of surrogates. - if (uCode < 0xDC00) { // We've got lead surrogate. - if (leadSurrogate === -1) { - leadSurrogate = uCode - continue - } else { - leadSurrogate = uCode - // Double lead surrogate found. - uCode = UNASSIGNED - } - } else { // We've got trail surrogate. - if (leadSurrogate !== -1) { - uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00) - leadSurrogate = -1 - } else { - // Incomplete surrogate pair - only trail surrogate found. - uCode = UNASSIGNED - } - } - } else if (leadSurrogate !== -1) { - // Incomplete surrogate pair - only lead surrogate found. - nextChar = uCode; uCode = UNASSIGNED // Write an error, then current char. - leadSurrogate = -1 - } - - // 2. Convert uCode character. - var dbcsCode = UNASSIGNED - if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence - var resCode = seqObj[uCode] - if (typeof resCode === "object") { // Sequence continues. - seqObj = resCode - continue - } else if (typeof resCode === "number") { // Sequence finished. Write it. - dbcsCode = resCode - } else if (resCode == undefined) { // Current character is not part of the sequence. - // Try default character for this sequence - resCode = seqObj[DEF_CHAR] - if (resCode !== undefined) { - dbcsCode = resCode // Found. Write it. - nextChar = uCode // Current character will be written too in the next iteration. - } else { - // TODO: What if we have no default? (resCode == undefined) - // Then, we should write first char of the sequence as-is and try the rest recursively. - // Didn't do it for now because no encoding has this situation yet. - // Currently, just skip the sequence and write current char. - } - } - seqObj = undefined - } else if (uCode >= 0) { // Regular character - var subtable = this.encodeTable[uCode >> 8] - if (subtable !== undefined) { dbcsCode = subtable[uCode & 0xFF] } - - if (dbcsCode <= SEQ_START) { // Sequence start - seqObj = this.encodeTableSeq[SEQ_START - dbcsCode] - continue - } - - if (dbcsCode == UNASSIGNED && this.gb18030) { - // Use GB18030 algorithm to find character(s) to write. - var idx = findIdx(this.gb18030.uChars, uCode) - if (idx != -1) { - var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]) - newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600 - newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260 - newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10 - newBuf[j++] = 0x30 + dbcsCode - continue - } - } - } - - // 3. Write dbcsCode character. - if (dbcsCode === UNASSIGNED) { dbcsCode = this.defaultCharSingleByte } - - if (dbcsCode < 0x100) { - newBuf[j++] = dbcsCode - } else if (dbcsCode < 0x10000) { - newBuf[j++] = dbcsCode >> 8 // high byte - newBuf[j++] = dbcsCode & 0xFF // low byte - } else if (dbcsCode < 0x1000000) { - newBuf[j++] = dbcsCode >> 16 - newBuf[j++] = (dbcsCode >> 8) & 0xFF - newBuf[j++] = dbcsCode & 0xFF - } else { - newBuf[j++] = dbcsCode >>> 24 - newBuf[j++] = (dbcsCode >>> 16) & 0xFF - newBuf[j++] = (dbcsCode >>> 8) & 0xFF - newBuf[j++] = dbcsCode & 0xFF - } - } - - this.seqObj = seqObj - this.leadSurrogate = leadSurrogate - return newBuf.slice(0, j) -} - -DBCSEncoder.prototype.end = function () { - if (this.leadSurrogate === -1 && this.seqObj === undefined) { return } // All clean. Most often case. - - var newBuf = Buffer.alloc(10); var j = 0 - - if (this.seqObj) { // We're in the sequence. - var dbcsCode = this.seqObj[DEF_CHAR] - if (dbcsCode !== undefined) { // Write beginning of the sequence. - if (dbcsCode < 0x100) { - newBuf[j++] = dbcsCode - } else { - newBuf[j++] = dbcsCode >> 8 // high byte - newBuf[j++] = dbcsCode & 0xFF // low byte - } - } else { - // See todo above. - } - this.seqObj = undefined - } - - if (this.leadSurrogate !== -1) { - // Incomplete surrogate pair - only lead surrogate found. - newBuf[j++] = this.defaultCharSingleByte - this.leadSurrogate = -1 - } - - return newBuf.slice(0, j) -} - -// Export for testing -DBCSEncoder.prototype.findIdx = findIdx - -// == Decoder ================================================================== - -function DBCSDecoder (options, codec) { - // Decoder state - this.nodeIdx = 0 - this.prevBytes = [] - - // Static data - this.decodeTables = codec.decodeTables - this.decodeTableSeq = codec.decodeTableSeq - this.defaultCharUnicode = codec.defaultCharUnicode - this.gb18030 = codec.gb18030 -} - -DBCSDecoder.prototype.write = function (buf) { - var newBuf = Buffer.alloc(buf.length * 2) - var nodeIdx = this.nodeIdx - var prevBytes = this.prevBytes; var prevOffset = this.prevBytes.length - var seqStart = -this.prevBytes.length // idx of the start of current parsed sequence. - var uCode - - for (var i = 0, j = 0; i < buf.length; i++) { - var curByte = (i >= 0) ? buf[i] : prevBytes[i + prevOffset] - - // Lookup in current trie node. - var uCode = this.decodeTables[nodeIdx][curByte] - - if (uCode >= 0) { - // Normal character, just use it. - } else if (uCode === UNASSIGNED) { // Unknown char. - // TODO: Callback with seq. - uCode = this.defaultCharUnicode.charCodeAt(0) - i = seqStart // Skip one byte ('i' will be incremented by the for loop) and try to parse again. - } else if (uCode === GB18030_CODE) { - if (i >= 3) { - var ptr = (buf[i - 3] - 0x81) * 12600 + (buf[i - 2] - 0x30) * 1260 + (buf[i - 1] - 0x81) * 10 + (curByte - 0x30) - } else { - var ptr = (prevBytes[i - 3 + prevOffset] - 0x81) * 12600 + - (((i - 2 >= 0) ? buf[i - 2] : prevBytes[i - 2 + prevOffset]) - 0x30) * 1260 + - (((i - 1 >= 0) ? buf[i - 1] : prevBytes[i - 1 + prevOffset]) - 0x81) * 10 + - (curByte - 0x30) - } - var idx = findIdx(this.gb18030.gbChars, ptr) - uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx] - } else if (uCode <= NODE_START) { // Go to next trie node. - nodeIdx = NODE_START - uCode - continue - } else if (uCode <= SEQ_START) { // Output a sequence of chars. - var seq = this.decodeTableSeq[SEQ_START - uCode] - for (var k = 0; k < seq.length - 1; k++) { - uCode = seq[k] - newBuf[j++] = uCode & 0xFF - newBuf[j++] = uCode >> 8 - } - uCode = seq[seq.length - 1] - } else { throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte) } - - // Write the character to buffer, handling higher planes using surrogate pair. - if (uCode >= 0x10000) { - uCode -= 0x10000 - var uCodeLead = 0xD800 | (uCode >> 10) - newBuf[j++] = uCodeLead & 0xFF - newBuf[j++] = uCodeLead >> 8 - - uCode = 0xDC00 | (uCode & 0x3FF) - } - newBuf[j++] = uCode & 0xFF - newBuf[j++] = uCode >> 8 - - // Reset trie node. - nodeIdx = 0; seqStart = i + 1 - } - - this.nodeIdx = nodeIdx - this.prevBytes = (seqStart >= 0) - ? Array.prototype.slice.call(buf, seqStart) - : prevBytes.slice(seqStart + prevOffset).concat(Array.prototype.slice.call(buf)) - - return newBuf.slice(0, j).toString("ucs2") -} - -DBCSDecoder.prototype.end = function () { - var ret = "" - - // Try to parse all remaining chars. - while (this.prevBytes.length > 0) { - // Skip 1 character in the buffer. - ret += this.defaultCharUnicode - var bytesArr = this.prevBytes.slice(1) - - // Parse remaining as usual. - this.prevBytes = [] - this.nodeIdx = 0 - if (bytesArr.length > 0) { ret += this.write(bytesArr) } - } - - this.prevBytes = [] - this.nodeIdx = 0 - return ret -} - -// Binary search for GB18030. Returns largest i such that table[i] <= val. -function findIdx (table, val) { - if (table[0] > val) { return -1 } - - var l = 0; var r = table.length - while (l < r - 1) { // always table[l] <= val < table[r] - var mid = l + ((r - l + 1) >> 1) - if (table[mid] <= val) { l = mid } else { r = mid } - } - return l -} diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/dbcs-data.js b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/dbcs-data.js deleted file mode 100644 index a3858d4..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/dbcs-data.js +++ /dev/null @@ -1,185 +0,0 @@ -"use strict" - -// Description of supported double byte encodings and aliases. -// Tables are not require()-d until they are needed to speed up library load. -// require()-s are direct to support Browserify. - -module.exports = { - - // == Japanese/ShiftJIS ==================================================== - // All japanese encodings are based on JIS X set of standards: - // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF. - // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes. - // Has several variations in 1978, 1983, 1990 and 1997. - // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead. - // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233. - // 2 planes, first is superset of 0208, second - revised 0212. - // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx) - - // Byte encodings are: - // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte - // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC. - // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI. - // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes. - // 0x00-0x7F - lower part of 0201 - // 0x8E, 0xA1-0xDF - upper part of 0201 - // (0xA1-0xFE)x2 - 0208 plane (94x94). - // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94). - // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon. - // Used as-is in ISO2022 family. - // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII, - // 0201-1976 Roman, 0208-1978, 0208-1983. - // * ISO2022-JP-1: Adds esc seq for 0212-1990. - // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7. - // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2. - // * ISO2022-JP-2004: Adds 0213-2004 Plane 1. - // - // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes. - // - // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html - - shiftjis: { - type: "_dbcs", - table: function () { return require("./tables/shiftjis.json") }, - encodeAdd: { "\u00a5": 0x5C, "\u203E": 0x7E }, - encodeSkipVals: [{ from: 0xED40, to: 0xF940 }] - }, - csshiftjis: "shiftjis", - mskanji: "shiftjis", - sjis: "shiftjis", - windows31j: "shiftjis", - ms31j: "shiftjis", - xsjis: "shiftjis", - windows932: "shiftjis", - ms932: "shiftjis", - 932: "shiftjis", - cp932: "shiftjis", - - eucjp: { - type: "_dbcs", - table: function () { return require("./tables/eucjp.json") }, - encodeAdd: { "\u00a5": 0x5C, "\u203E": 0x7E } - }, - - // TODO: KDDI extension to Shift_JIS - // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes. - // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars. - - // == Chinese/GBK ========================================================== - // http://en.wikipedia.org/wiki/GBK - // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder - - // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936 - gb2312: "cp936", - gb231280: "cp936", - gb23121980: "cp936", - csgb2312: "cp936", - csiso58gb231280: "cp936", - euccn: "cp936", - - // Microsoft's CP936 is a subset and approximation of GBK. - windows936: "cp936", - ms936: "cp936", - 936: "cp936", - cp936: { - type: "_dbcs", - table: function () { return require("./tables/cp936.json") } - }, - - // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other. - gbk: { - type: "_dbcs", - table: function () { return require("./tables/cp936.json").concat(require("./tables/gbk-added.json")) } - }, - xgbk: "gbk", - isoir58: "gbk", - - // GB18030 is an algorithmic extension of GBK. - // Main source: https://www.w3.org/TR/encoding/#gbk-encoder - // http://icu-project.org/docs/papers/gb18030.html - // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml - // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0 - gb18030: { - type: "_dbcs", - table: function () { return require("./tables/cp936.json").concat(require("./tables/gbk-added.json")) }, - gb18030: function () { return require("./tables/gb18030-ranges.json") }, - encodeSkipVals: [0x80], - encodeAdd: { "€": 0xA2E3 } - }, - - chinese: "gb18030", - - // == Korean =============================================================== - // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same. - windows949: "cp949", - ms949: "cp949", - 949: "cp949", - cp949: { - type: "_dbcs", - table: function () { return require("./tables/cp949.json") } - }, - - cseuckr: "cp949", - csksc56011987: "cp949", - euckr: "cp949", - isoir149: "cp949", - korean: "cp949", - ksc56011987: "cp949", - ksc56011989: "cp949", - ksc5601: "cp949", - - // == Big5/Taiwan/Hong Kong ================================================ - // There are lots of tables for Big5 and cp950. Please see the following links for history: - // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html - // Variations, in roughly number of defined chars: - // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT - // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/ - // * Big5-2003 (Taiwan standard) almost superset of cp950. - // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers. - // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard. - // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years. - // Plus, it has 4 combining sequences. - // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299 - // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way. - // Implementations are not consistent within browsers; sometimes labeled as just big5. - // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied. - // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31 - // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s. - // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt - // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt - // - // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder - // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong. - - windows950: "cp950", - ms950: "cp950", - 950: "cp950", - cp950: { - type: "_dbcs", - table: function () { return require("./tables/cp950.json") } - }, - - // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus. - big5: "big5hkscs", - big5hkscs: { - type: "_dbcs", - table: function () { return require("./tables/cp950.json").concat(require("./tables/big5-added.json")) }, - encodeSkipVals: [ - // Although Encoding Standard says we should avoid encoding to HKSCS area (See Step 1 of - // https://encoding.spec.whatwg.org/#index-big5-pointer), we still do it to increase compatibility with ICU. - // But if a single unicode point can be encoded both as HKSCS and regular Big5, we prefer the latter. - 0x8e69, 0x8e6f, 0x8e7e, 0x8eab, 0x8eb4, 0x8ecd, 0x8ed0, 0x8f57, 0x8f69, 0x8f6e, 0x8fcb, 0x8ffe, - 0x906d, 0x907a, 0x90c4, 0x90dc, 0x90f1, 0x91bf, 0x92af, 0x92b0, 0x92b1, 0x92b2, 0x92d1, 0x9447, 0x94ca, - 0x95d9, 0x96fc, 0x9975, 0x9b76, 0x9b78, 0x9b7b, 0x9bc6, 0x9bde, 0x9bec, 0x9bf6, 0x9c42, 0x9c53, 0x9c62, - 0x9c68, 0x9c6b, 0x9c77, 0x9cbc, 0x9cbd, 0x9cd0, 0x9d57, 0x9d5a, 0x9dc4, 0x9def, 0x9dfb, 0x9ea9, 0x9eef, - 0x9efd, 0x9f60, 0x9fcb, 0xa077, 0xa0dc, 0xa0df, 0x8fcc, 0x92c8, 0x9644, 0x96ed, - - // Step 2 of https://encoding.spec.whatwg.org/#index-big5-pointer: Use last pointer for U+2550, U+255E, U+2561, U+256A, U+5341, or U+5345 - 0xa2a4, 0xa2a5, 0xa2a7, 0xa2a6, 0xa2cc, 0xa2ce - ] - }, - - cnbig5: "big5hkscs", - csbig5: "big5hkscs", - xxbig5: "big5hkscs" -} diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/index.js b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/index.js deleted file mode 100644 index 9d90e3c..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/index.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict" - -var mergeModules = require("../lib/helpers/merge-exports") - -// Update this array if you add/rename/remove files in this directory. -// We support Browserify by skipping automatic module discovery and requiring modules directly. -var modules = [ - require("./internal"), - require("./utf32"), - require("./utf16"), - require("./utf7"), - require("./sbcs-codec"), - require("./sbcs-data"), - require("./sbcs-data-generated"), - require("./dbcs-codec"), - require("./dbcs-data") -] - -// Put all encoding/alias/codec definitions to single object and export it. -for (var i = 0; i < modules.length; i++) { - var module = modules[i] - mergeModules(exports, module) -} diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/internal.js b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/internal.js deleted file mode 100644 index 4e5c3ff..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/internal.js +++ /dev/null @@ -1,218 +0,0 @@ -"use strict" -var Buffer = require("safer-buffer").Buffer - -// Export Node.js internal encodings. - -module.exports = { - // Encodings - utf8: { type: "_internal", bomAware: true }, - cesu8: { type: "_internal", bomAware: true }, - unicode11utf8: "utf8", - - ucs2: { type: "_internal", bomAware: true }, - utf16le: "ucs2", - - binary: { type: "_internal" }, - base64: { type: "_internal" }, - hex: { type: "_internal" }, - - // Codec. - _internal: InternalCodec -} - -// ------------------------------------------------------------------------------ - -function InternalCodec (codecOptions, iconv) { - this.enc = codecOptions.encodingName - this.bomAware = codecOptions.bomAware - - if (this.enc === "base64") { this.encoder = InternalEncoderBase64 } else if (this.enc === "utf8") { this.encoder = InternalEncoderUtf8 } else if (this.enc === "cesu8") { - this.enc = "utf8" // Use utf8 for decoding. - this.encoder = InternalEncoderCesu8 - - // Add decoder for versions of Node not supporting CESU-8 - if (Buffer.from("eda0bdedb2a9", "hex").toString() !== "💩") { - this.decoder = InternalDecoderCesu8 - this.defaultCharUnicode = iconv.defaultCharUnicode - } - } -} - -InternalCodec.prototype.encoder = InternalEncoder -InternalCodec.prototype.decoder = InternalDecoder - -// ------------------------------------------------------------------------------ - -// We use node.js internal decoder. Its signature is the same as ours. -var StringDecoder = require("string_decoder").StringDecoder - -function InternalDecoder (options, codec) { - this.decoder = new StringDecoder(codec.enc) -} - -InternalDecoder.prototype.write = function (buf) { - if (!Buffer.isBuffer(buf)) { - buf = Buffer.from(buf) - } - - return this.decoder.write(buf) -} - -InternalDecoder.prototype.end = function () { - return this.decoder.end() -} - -// ------------------------------------------------------------------------------ -// Encoder is mostly trivial - -function InternalEncoder (options, codec) { - this.enc = codec.enc -} - -InternalEncoder.prototype.write = function (str) { - return Buffer.from(str, this.enc) -} - -InternalEncoder.prototype.end = function () { -} - -// ------------------------------------------------------------------------------ -// Except base64 encoder, which must keep its state. - -function InternalEncoderBase64 (options, codec) { - this.prevStr = "" -} - -InternalEncoderBase64.prototype.write = function (str) { - str = this.prevStr + str - var completeQuads = str.length - (str.length % 4) - this.prevStr = str.slice(completeQuads) - str = str.slice(0, completeQuads) - - return Buffer.from(str, "base64") -} - -InternalEncoderBase64.prototype.end = function () { - return Buffer.from(this.prevStr, "base64") -} - -// ------------------------------------------------------------------------------ -// CESU-8 encoder is also special. - -function InternalEncoderCesu8 (options, codec) { -} - -InternalEncoderCesu8.prototype.write = function (str) { - var buf = Buffer.alloc(str.length * 3); var bufIdx = 0 - for (var i = 0; i < str.length; i++) { - var charCode = str.charCodeAt(i) - // Naive implementation, but it works because CESU-8 is especially easy - // to convert from UTF-16 (which all JS strings are encoded in). - if (charCode < 0x80) { buf[bufIdx++] = charCode } else if (charCode < 0x800) { - buf[bufIdx++] = 0xC0 + (charCode >>> 6) - buf[bufIdx++] = 0x80 + (charCode & 0x3f) - } else { // charCode will always be < 0x10000 in javascript. - buf[bufIdx++] = 0xE0 + (charCode >>> 12) - buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f) - buf[bufIdx++] = 0x80 + (charCode & 0x3f) - } - } - return buf.slice(0, bufIdx) -} - -InternalEncoderCesu8.prototype.end = function () { -} - -// ------------------------------------------------------------------------------ -// CESU-8 decoder is not implemented in Node v4.0+ - -function InternalDecoderCesu8 (options, codec) { - this.acc = 0 - this.contBytes = 0 - this.accBytes = 0 - this.defaultCharUnicode = codec.defaultCharUnicode -} - -InternalDecoderCesu8.prototype.write = function (buf) { - var acc = this.acc; var contBytes = this.contBytes; var accBytes = this.accBytes - var res = "" - for (var i = 0; i < buf.length; i++) { - var curByte = buf[i] - if ((curByte & 0xC0) !== 0x80) { // Leading byte - if (contBytes > 0) { // Previous code is invalid - res += this.defaultCharUnicode - contBytes = 0 - } - - if (curByte < 0x80) { // Single-byte code - res += String.fromCharCode(curByte) - } else if (curByte < 0xE0) { // Two-byte code - acc = curByte & 0x1F - contBytes = 1; accBytes = 1 - } else if (curByte < 0xF0) { // Three-byte code - acc = curByte & 0x0F - contBytes = 2; accBytes = 1 - } else { // Four or more are not supported for CESU-8. - res += this.defaultCharUnicode - } - } else { // Continuation byte - if (contBytes > 0) { // We're waiting for it. - acc = (acc << 6) | (curByte & 0x3f) - contBytes--; accBytes++ - if (contBytes === 0) { - // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80) - if (accBytes === 2 && acc < 0x80 && acc > 0) { - res += this.defaultCharUnicode - } else if (accBytes === 3 && acc < 0x800) { - res += this.defaultCharUnicode - } else { - // Actually add character. - res += String.fromCharCode(acc) - } - } - } else { // Unexpected continuation byte - res += this.defaultCharUnicode - } - } - } - this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes - return res -} - -InternalDecoderCesu8.prototype.end = function () { - var res = 0 - if (this.contBytes > 0) { res += this.defaultCharUnicode } - return res -} - -// ------------------------------------------------------------------------------ -// check the chunk boundaries for surrogate pair - -function InternalEncoderUtf8 (options, codec) { - this.highSurrogate = "" -} - -InternalEncoderUtf8.prototype.write = function (str) { - if (this.highSurrogate) { - str = this.highSurrogate + str - this.highSurrogate = "" - } - - if (str.length > 0) { - var charCode = str.charCodeAt(str.length - 1) - if (charCode >= 0xd800 && charCode < 0xdc00) { - this.highSurrogate = str[str.length - 1] - str = str.slice(0, str.length - 1) - } - } - - return Buffer.from(str, this.enc) -} - -InternalEncoderUtf8.prototype.end = function () { - if (this.highSurrogate) { - var str = this.highSurrogate - this.highSurrogate = "" - return Buffer.from(str, this.enc) - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/sbcs-codec.js b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/sbcs-codec.js deleted file mode 100644 index 0e2fc92..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/sbcs-codec.js +++ /dev/null @@ -1,75 +0,0 @@ -"use strict" -var Buffer = require("safer-buffer").Buffer - -// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that -// correspond to encoded bytes (if 128 - then lower half is ASCII). - -exports._sbcs = SBCSCodec -function SBCSCodec (codecOptions, iconv) { - if (!codecOptions) { - throw new Error("SBCS codec is called without the data.") - } - - // Prepare char buffer for decoding. - if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256)) { - throw new Error("Encoding '" + codecOptions.type + "' has incorrect 'chars' (must be of len 128 or 256)") - } - - if (codecOptions.chars.length === 128) { - var asciiString = "" - for (var i = 0; i < 128; i++) { - asciiString += String.fromCharCode(i) - } - codecOptions.chars = asciiString + codecOptions.chars - } - - this.decodeBuf = Buffer.from(codecOptions.chars, "ucs2") - - // Encoding buffer. - var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0)) - - for (var i = 0; i < codecOptions.chars.length; i++) { - encodeBuf[codecOptions.chars.charCodeAt(i)] = i - } - - this.encodeBuf = encodeBuf -} - -SBCSCodec.prototype.encoder = SBCSEncoder -SBCSCodec.prototype.decoder = SBCSDecoder - -function SBCSEncoder (options, codec) { - this.encodeBuf = codec.encodeBuf -} - -SBCSEncoder.prototype.write = function (str) { - var buf = Buffer.alloc(str.length) - for (var i = 0; i < str.length; i++) { - buf[i] = this.encodeBuf[str.charCodeAt(i)] - } - - return buf -} - -SBCSEncoder.prototype.end = function () { -} - -function SBCSDecoder (options, codec) { - this.decodeBuf = codec.decodeBuf -} - -SBCSDecoder.prototype.write = function (buf) { - // Strings are immutable in JS -> we use ucs2 buffer to speed up computations. - var decodeBuf = this.decodeBuf - var newBuf = Buffer.alloc(buf.length * 2) - var idx1 = 0; var idx2 = 0 - for (var i = 0; i < buf.length; i++) { - idx1 = buf[i] * 2; idx2 = i * 2 - newBuf[idx2] = decodeBuf[idx1] - newBuf[idx2 + 1] = decodeBuf[idx1 + 1] - } - return newBuf.toString("ucs2") -} - -SBCSDecoder.prototype.end = function () { -} diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/sbcs-data-generated.js b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/sbcs-data-generated.js deleted file mode 100644 index 9b48236..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/sbcs-data-generated.js +++ /dev/null @@ -1,451 +0,0 @@ -"use strict"; - -// Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script. -module.exports = { - "437": "cp437", - "737": "cp737", - "775": "cp775", - "850": "cp850", - "852": "cp852", - "855": "cp855", - "856": "cp856", - "857": "cp857", - "858": "cp858", - "860": "cp860", - "861": "cp861", - "862": "cp862", - "863": "cp863", - "864": "cp864", - "865": "cp865", - "866": "cp866", - "869": "cp869", - "874": "windows874", - "922": "cp922", - "1046": "cp1046", - "1124": "cp1124", - "1125": "cp1125", - "1129": "cp1129", - "1133": "cp1133", - "1161": "cp1161", - "1162": "cp1162", - "1163": "cp1163", - "1250": "windows1250", - "1251": "windows1251", - "1252": "windows1252", - "1253": "windows1253", - "1254": "windows1254", - "1255": "windows1255", - "1256": "windows1256", - "1257": "windows1257", - "1258": "windows1258", - "28591": "iso88591", - "28592": "iso88592", - "28593": "iso88593", - "28594": "iso88594", - "28595": "iso88595", - "28596": "iso88596", - "28597": "iso88597", - "28598": "iso88598", - "28599": "iso88599", - "28600": "iso885910", - "28601": "iso885911", - "28603": "iso885913", - "28604": "iso885914", - "28605": "iso885915", - "28606": "iso885916", - "windows874": { - "type": "_sbcs", - "chars": "€����…�����������‘’“”•–—�������� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - }, - "win874": "windows874", - "cp874": "windows874", - "windows1250": { - "type": "_sbcs", - "chars": "€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“”•–—�™š›śťžź ˇ˘Ł¤Ą¦§¨©Ş«¬­®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" - }, - "win1250": "windows1250", - "cp1250": "windows1250", - "windows1251": { - "type": "_sbcs", - "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—�™љ›њќћџ ЎўЈ¤Ґ¦§Ё©Є«¬­®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" - }, - "win1251": "windows1251", - "cp1251": "windows1251", - "windows1252": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "win1252": "windows1252", - "cp1252": "windows1252", - "windows1253": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡�‰�‹�����‘’“”•–—�™�›���� ΅Ά£¤¥¦§¨©�«¬­®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" - }, - "win1253": "windows1253", - "cp1253": "windows1253", - "windows1254": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“”•–—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖרÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" - }, - "win1254": "windows1254", - "cp1254": "windows1254", - "windows1255": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰�‹�����‘’“”•–—˜™�›���� ¡¢£₪¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹֺֻּֽ־ֿ׀ׁׂ׃װױײ׳״�������אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" - }, - "win1255": "windows1255", - "cp1255": "windows1255", - "windows1256": { - "type": "_sbcs", - "chars": "€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œ‌‍ں ،¢£¤¥¦§¨©ھ«¬­®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûü‎‏ے" - }, - "win1256": "windows1256", - "cp1256": "windows1256", - "windows1257": { - "type": "_sbcs", - "chars": "€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“”•–—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬­®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙" - }, - "win1257": "windows1257", - "cp1257": "windows1257", - "windows1258": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“”•–—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "win1258": "windows1258", - "cp1258": "windows1258", - "iso88591": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "cp28591": "iso88591", - "iso88592": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" - }, - "cp28592": "iso88592", - "iso88593": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ħ˘£¤�Ĥ§¨İŞĞĴ­�ݰħ²³´µĥ·¸ışğĵ½�żÀÁÂ�ÄĊĈÇÈÉÊËÌÍÎÏ�ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ�äċĉçèéêëìíîï�ñòóôġö÷ĝùúûüŭŝ˙" - }, - "cp28593": "iso88593", - "iso88594": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĸŖ¤Ĩϧ¨ŠĒĢŦ­Ž¯°ą˛ŗ´ĩšēģŧŊžŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎĪĐŅŌĶÔÕÖרŲÚÛÜŨŪßāáâãäåæįčéęëėíîīđņōķôõö÷øųúûüũū˙" - }, - "cp28594": "iso88594", - "iso88595": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєѕіїјљњћќ§ўџ" - }, - "cp28595": "iso88595", - "iso88596": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ���¤�������،­�������������؛���؟�ءآأؤإئابةتثجحخدذرزسشصضطظعغ�����ـفقكلمنهوىيًٌٍَُِّْ�������������" - }, - "cp28596": "iso88596", - "iso88597": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ‘’£€₯¦§¨©ͺ«¬­�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" - }, - "cp28597": "iso88597", - "iso88598": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �¢£¤¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" - }, - "cp28598": "iso88598", - "iso88599": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖרÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" - }, - "cp28599": "iso88599", - "iso885910": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨͧĻĐŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ" - }, - "cp28600": "iso885910", - "iso885911": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - }, - "cp28601": "iso885911", - "iso885913": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’" - }, - "cp28603": "iso885913", - "iso885914": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ­®ŸḞḟĠġṀṁ¶ṖẁṗẃṠỳẄẅṡÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŴÑÒÓÔÕÖṪØÙÚÛÜÝŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ" - }, - "cp28604": "iso885914", - "iso885915": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "cp28605": "iso885915", - "iso885916": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄąŁ€„Чš©Ș«Ź­źŻ°±ČłŽ”¶·žčș»ŒœŸżÀÁÂĂÄĆÆÇÈÉÊËÌÍÎÏĐŃÒÓÔŐÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ" - }, - "cp28606": "iso885916", - "cp437": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm437": "cp437", - "csibm437": "cp437", - "cp737": { - "type": "_sbcs", - "chars": "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ " - }, - "ibm737": "cp737", - "csibm737": "cp737", - "cp775": { - "type": "_sbcs", - "chars": "ĆüéāäģåćłēŖŗīŹÄÅÉæÆōöĢ¢ŚśÖÜø£Ø×¤ĀĪóŻżź”¦©®¬½¼Ł«»░▒▓│┤ĄČĘĖ╣║╗╝ĮŠ┐└┴┬├─┼ŲŪ╚╔╩╦╠═╬Žąčęėįšųūž┘┌█▄▌▐▀ÓßŌŃõÕµńĶķĻļņĒŅ’­±“¾¶§÷„°∙·¹³²■ " - }, - "ibm775": "cp775", - "csibm775": "cp775", - "cp850": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø×ƒáíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm850": "cp850", - "csibm850": "cp850", - "cp852": { - "type": "_sbcs", - "chars": "ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘§÷¸°¨˙űŘř■ " - }, - "ibm852": "cp852", - "csibm852": "cp852", - "cp855": { - "type": "_sbcs", - "chars": "ђЂѓЃёЁєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџЏюЮъЪаАбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗╝йЙ┐└┴┬├─┼кК╚╔╩╦╠═╬¤лЛмМнНоОп┘┌█▄Пя▀ЯрРсСтТуУжЖвВьЬ№­ыЫзЗшШэЭщЩчЧ§■ " - }, - "ibm855": "cp855", - "csibm855": "cp855", - "cp856": { - "type": "_sbcs", - "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת�£�×����������®¬½¼�«»░▒▓│┤���©╣║╗╝¢¥┐└┴┬├─┼��╚╔╩╦╠═╬¤���������┘┌█▄¦�▀������µ�������¯´­±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm856": "cp856", - "csibm856": "cp856", - "cp857": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ�ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´­±�¾¶§÷¸°¨·¹³²■ " - }, - "ibm857": "cp857", - "csibm857": "cp857", - "cp858": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø×ƒáíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm858": "cp858", - "csibm858": "cp858", - "cp860": { - "type": "_sbcs", - "chars": "ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm860": "cp860", - "csibm860": "cp860", - "cp861": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm861": "cp861", - "csibm861": "cp861", - "cp862": { - "type": "_sbcs", - "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm862": "cp862", - "csibm862": "cp862", - "cp863": { - "type": "_sbcs", - "chars": "ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÏûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯Î⌐¬½¼¾«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm863": "cp863", - "csibm863": "cp863", - "cp864": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�" - }, - "ibm864": "cp864", - "csibm864": "cp864", - "cp865": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm865": "cp865", - "csibm865": "cp865", - "cp866": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ " - }, - "ibm866": "cp866", - "csibm866": "cp866", - "cp869": { - "type": "_sbcs", - "chars": "������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ " - }, - "ibm869": "cp869", - "csibm869": "cp869", - "cp922": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖרÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ" - }, - "ibm922": "cp922", - "csibm922": "cp922", - "cp1046": { - "type": "_sbcs", - "chars": "ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�" - }, - "ibm1046": "cp1046", - "csibm1046": "cp1046", - "cp1124": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ" - }, - "ibm1124": "cp1124", - "csibm1124": "cp1124", - "cp1125": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ " - }, - "ibm1125": "cp1125", - "csibm1125": "cp1125", - "cp1129": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "ibm1129": "cp1129", - "csibm1129": "cp1129", - "cp1133": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�" - }, - "ibm1133": "cp1133", - "csibm1133": "cp1133", - "cp1161": { - "type": "_sbcs", - "chars": "��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ " - }, - "ibm1161": "cp1161", - "csibm1161": "cp1161", - "cp1162": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - }, - "ibm1162": "cp1162", - "csibm1162": "cp1162", - "cp1163": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "ibm1163": "cp1163", - "csibm1163": "cp1163", - "maccroatian": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈ƫȅ ÀÃÕŒœĐ—“”‘’÷◊�©⁄¤‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ" - }, - "maccyrillic": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" - }, - "macgreek": { - "type": "_sbcs", - "chars": "Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦­ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�" - }, - "maciceland": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macroman": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macromania": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›Ţţ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macthai": { - "type": "_sbcs", - "chars": "«»…“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู​–—฿เแโใไๅๆ็่้๊๋์ํ™๏๐๑๒๓๔๕๖๗๘๙®©����" - }, - "macturkish": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macukraine": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" - }, - "koi8r": { - "type": "_sbcs", - "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "koi8u": { - "type": "_sbcs", - "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "koi8ru": { - "type": "_sbcs", - "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "koi8t": { - "type": "_sbcs", - "chars": "қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“”•–—�™�›�����ӯӮё¤ӣ¦§���«¬­®�°±²Ё�Ӣ¶·�№�»���©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "armscii8": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚�" - }, - "rk1048": { - "type": "_sbcs", - "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺЏђ‘’“”•–—�™љ›њқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬­®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" - }, - "tcvn": { - "type": "_sbcs", - "chars": "\u0000ÚỤ\u0003ỪỬỮ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010ỨỰỲỶỸÝỴ\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ" - }, - "georgianacademy": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "georgianps": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "pt154": { - "type": "_sbcs", - "chars": "ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" - }, - "viscii": { - "type": "_sbcs", - "chars": "\u0000\u0001Ẳ\u0003\u0004ẴẪ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013Ỷ\u0015\u0016\u0017\u0018Ỹ\u001a\u001b\u001c\u001dỴ\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ" - }, - "iso646cn": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" - }, - "iso646jp": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" - }, - "hproman8": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�" - }, - "macintosh": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "ascii": { - "type": "_sbcs", - "chars": "��������������������������������������������������������������������������������������������������������������������������������" - }, - "tis620": { - "type": "_sbcs", - "chars": "���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - } -} \ No newline at end of file diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/sbcs-data.js b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/sbcs-data.js deleted file mode 100644 index d8f8e17..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/sbcs-data.js +++ /dev/null @@ -1,178 +0,0 @@ -"use strict" - -// Manually added data to be used by sbcs codec in addition to generated one. - -module.exports = { - // Not supported by iconv, not sure why. - 10029: "maccenteuro", - maccenteuro: { - type: "_sbcs", - chars: "ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ" - }, - - 808: "cp808", - ibm808: "cp808", - cp808: { - type: "_sbcs", - chars: "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ " - }, - - mik: { - type: "_sbcs", - chars: "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя└┴┬├─┼╣║╚╔╩╦╠═╬┐░▒▓│┤№§╗╝┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - - cp720: { - type: "_sbcs", - chars: "\x80\x81éâ\x84à\x86çêëèïî\x8d\x8e\x8f\x90\u0651\u0652ô¤ـûùءآأؤ£إئابةتثجحخدذرزسشص«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ضطظعغفµقكلمنهوىي≡\u064b\u064c\u064d\u064e\u064f\u0650≈°∙·√ⁿ²■\u00a0" - }, - - // Aliases of generated encodings. - ascii8bit: "ascii", - usascii: "ascii", - ansix34: "ascii", - ansix341968: "ascii", - ansix341986: "ascii", - csascii: "ascii", - cp367: "ascii", - ibm367: "ascii", - isoir6: "ascii", - iso646us: "ascii", - iso646irv: "ascii", - us: "ascii", - - latin1: "iso88591", - latin2: "iso88592", - latin3: "iso88593", - latin4: "iso88594", - latin5: "iso88599", - latin6: "iso885910", - latin7: "iso885913", - latin8: "iso885914", - latin9: "iso885915", - latin10: "iso885916", - - csisolatin1: "iso88591", - csisolatin2: "iso88592", - csisolatin3: "iso88593", - csisolatin4: "iso88594", - csisolatincyrillic: "iso88595", - csisolatinarabic: "iso88596", - csisolatingreek: "iso88597", - csisolatinhebrew: "iso88598", - csisolatin5: "iso88599", - csisolatin6: "iso885910", - - l1: "iso88591", - l2: "iso88592", - l3: "iso88593", - l4: "iso88594", - l5: "iso88599", - l6: "iso885910", - l7: "iso885913", - l8: "iso885914", - l9: "iso885915", - l10: "iso885916", - - isoir14: "iso646jp", - isoir57: "iso646cn", - isoir100: "iso88591", - isoir101: "iso88592", - isoir109: "iso88593", - isoir110: "iso88594", - isoir144: "iso88595", - isoir127: "iso88596", - isoir126: "iso88597", - isoir138: "iso88598", - isoir148: "iso88599", - isoir157: "iso885910", - isoir166: "tis620", - isoir179: "iso885913", - isoir199: "iso885914", - isoir203: "iso885915", - isoir226: "iso885916", - - cp819: "iso88591", - ibm819: "iso88591", - - cyrillic: "iso88595", - - arabic: "iso88596", - arabic8: "iso88596", - ecma114: "iso88596", - asmo708: "iso88596", - - greek: "iso88597", - greek8: "iso88597", - ecma118: "iso88597", - elot928: "iso88597", - - hebrew: "iso88598", - hebrew8: "iso88598", - - turkish: "iso88599", - turkish8: "iso88599", - - thai: "iso885911", - thai8: "iso885911", - - celtic: "iso885914", - celtic8: "iso885914", - isoceltic: "iso885914", - - tis6200: "tis620", - tis62025291: "tis620", - tis62025330: "tis620", - - 10000: "macroman", - 10006: "macgreek", - 10007: "maccyrillic", - 10079: "maciceland", - 10081: "macturkish", - - cspc8codepage437: "cp437", - cspc775baltic: "cp775", - cspc850multilingual: "cp850", - cspcp852: "cp852", - cspc862latinhebrew: "cp862", - cpgr: "cp869", - - msee: "cp1250", - mscyrl: "cp1251", - msansi: "cp1252", - msgreek: "cp1253", - msturk: "cp1254", - mshebr: "cp1255", - msarab: "cp1256", - winbaltrim: "cp1257", - - cp20866: "koi8r", - 20866: "koi8r", - ibm878: "koi8r", - cskoi8r: "koi8r", - - cp21866: "koi8u", - 21866: "koi8u", - ibm1168: "koi8u", - - strk10482002: "rk1048", - - tcvn5712: "tcvn", - tcvn57121: "tcvn", - - gb198880: "iso646cn", - cn: "iso646cn", - - csiso14jisc6220ro: "iso646jp", - jisc62201969ro: "iso646jp", - jp: "iso646jp", - - cshproman8: "hproman8", - r8: "hproman8", - roman8: "hproman8", - xroman8: "hproman8", - ibm1051: "hproman8", - - mac: "macintosh", - csmacintosh: "macintosh" -} diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/tables/big5-added.json b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/tables/big5-added.json deleted file mode 100644 index 3c3d3c2..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/tables/big5-added.json +++ /dev/null @@ -1,122 +0,0 @@ -[ -["8740","䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"], -["8767","綕夝𨮹㷴霴𧯯寛𡵞媤㘥𩺰嫑宷峼杮薓𩥅瑡璝㡵𡵓𣚞𦀡㻬"], -["87a1","𥣞㫵竼龗𤅡𨤍𣇪𠪊𣉞䌊蒄龖鐯䤰蘓墖靊鈘秐稲晠権袝瑌篅枂稬剏遆㓦珄𥶹瓆鿇垳䤯呌䄱𣚎堘穲𧭥讏䚮𦺈䆁𥶙箮𢒼鿈𢓁𢓉𢓌鿉蔄𣖻䂴鿊䓡𪷿拁灮鿋"], -["8840","㇀",4,"𠄌㇅𠃑𠃍㇆㇇𠃋𡿨㇈𠃊㇉㇊㇋㇌𠄎㇍㇎ĀÁǍÀĒÉĚÈŌÓǑÒ࿿Ê̄Ế࿿Ê̌ỀÊāáǎàɑēéěèīíǐìōóǒòūúǔùǖǘǚ"], -["88a1","ǜü࿿ê̄ế࿿ê̌ềêɡ⏚⏛"], -["8940","𪎩𡅅"], -["8943","攊"], -["8946","丽滝鵎釟"], -["894c","𧜵撑会伨侨兖兴农凤务动医华发变团声处备夲头学实実岚庆总斉柾栄桥济炼电纤纬纺织经统缆缷艺苏药视设询车轧轮"], -["89a1","琑糼緍楆竉刧"], -["89ab","醌碸酞肼"], -["89b0","贋胶𠧧"], -["89b5","肟黇䳍鷉鸌䰾𩷶𧀎鸊𪄳㗁"], -["89c1","溚舾甙"], -["89c5","䤑马骏龙禇𨑬𡷊𠗐𢫦两亁亀亇亿仫伷㑌侽㹈倃傈㑽㒓㒥円夅凛凼刅争剹劐匧㗇厩㕑厰㕓参吣㕭㕲㚁咓咣咴咹哐哯唘唣唨㖘唿㖥㖿嗗㗅"], -["8a40","𧶄唥"], -["8a43","𠱂𠴕𥄫喐𢳆㧬𠍁蹆𤶸𩓥䁓𨂾睺𢰸㨴䟕𨅝𦧲𤷪擝𠵼𠾴𠳕𡃴撍蹾𠺖𠰋𠽤𢲩𨉖𤓓"], -["8a64","𠵆𩩍𨃩䟴𤺧𢳂骲㩧𩗴㿭㔆𥋇𩟔𧣈𢵄鵮頕"], -["8a76","䏙𦂥撴哣𢵌𢯊𡁷㧻𡁯"], -["8aa1","𦛚𦜖𧦠擪𥁒𠱃蹨𢆡𨭌𠜱"], -["8aac","䠋𠆩㿺塳𢶍"], -["8ab2","𤗈𠓼𦂗𠽌𠶖啹䂻䎺"], -["8abb","䪴𢩦𡂝膪飵𠶜捹㧾𢝵跀嚡摼㹃"], -["8ac9","𪘁𠸉𢫏𢳉"], -["8ace","𡃈𣧂㦒㨆𨊛㕸𥹉𢃇噒𠼱𢲲𩜠㒼氽𤸻"], -["8adf","𧕴𢺋𢈈𪙛𨳍𠹺𠰴𦠜羓𡃏𢠃𢤹㗻𥇣𠺌𠾍𠺪㾓𠼰𠵇𡅏𠹌"], -["8af6","𠺫𠮩𠵈𡃀𡄽㿹𢚖搲𠾭"], -["8b40","𣏴𧘹𢯎𠵾𠵿𢱑𢱕㨘𠺘𡃇𠼮𪘲𦭐𨳒𨶙𨳊閪哌苄喹"], -["8b55","𩻃鰦骶𧝞𢷮煀腭胬尜𦕲脴㞗卟𨂽醶𠻺𠸏𠹷𠻻㗝𤷫㘉𠳖嚯𢞵𡃉𠸐𠹸𡁸𡅈𨈇𡑕𠹹𤹐𢶤婔𡀝𡀞𡃵𡃶垜𠸑"], -["8ba1","𧚔𨋍𠾵𠹻𥅾㜃𠾶𡆀𥋘𪊽𤧚𡠺𤅷𨉼墙剨㘚𥜽箲孨䠀䬬鼧䧧鰟鮍𥭴𣄽嗻㗲嚉丨夂𡯁屮靑𠂆乛亻㔾尣彑忄㣺扌攵歺氵氺灬爫丬犭𤣩罒礻糹罓𦉪㓁"], -["8bde","𦍋耂肀𦘒𦥑卝衤见𧢲讠贝钅镸长门𨸏韦页风飞饣𩠐鱼鸟黄歯龜丷𠂇阝户钢"], -["8c40","倻淾𩱳龦㷉袏𤅎灷峵䬠𥇍㕙𥴰愢𨨲辧釶熑朙玺𣊁𪄇㲋𡦀䬐磤琂冮𨜏䀉橣𪊺䈣蘏𠩯稪𩥇𨫪靕灍匤𢁾鏴盙𨧣龧矝亣俰傼丯众龨吴綋墒壐𡶶庒庙忂𢜒斋"], -["8ca1","𣏹椙橃𣱣泿"], -["8ca7","爀𤔅玌㻛𤨓嬕璹讃𥲤𥚕窓篬糃繬苸薗龩袐龪躹龫迏蕟駠鈡龬𨶹𡐿䁱䊢娚"], -["8cc9","顨杫䉶圽"], -["8cce","藖𤥻芿𧄍䲁𦵴嵻𦬕𦾾龭龮宖龯曧繛湗秊㶈䓃𣉖𢞖䎚䔶"], -["8ce6","峕𣬚諹屸㴒𣕑嵸龲煗䕘𤃬𡸣䱷㥸㑊𠆤𦱁諌侴𠈹妿腬顖𩣺弻"], -["8d40","𠮟"], -["8d42","𢇁𨥭䄂䚻𩁹㼇龳𪆵䃸㟖䛷𦱆䅼𨚲𧏿䕭㣔𥒚䕡䔛䶉䱻䵶䗪㿈𤬏㙡䓞䒽䇭崾嵈嵖㷼㠏嶤嶹㠠㠸幂庽弥徃㤈㤔㤿㥍惗愽峥㦉憷憹懏㦸戬抐拥挘㧸嚱"], -["8da1","㨃揢揻搇摚㩋擀崕嘡龟㪗斆㪽旿晓㫲暒㬢朖㭂枤栀㭘桊梄㭲㭱㭻椉楃牜楤榟榅㮼槖㯝橥橴橱檂㯬檙㯲檫檵櫔櫶殁毁毪汵沪㳋洂洆洦涁㳯涤涱渕渘温溆𨧀溻滢滚齿滨滩漤漴㵆𣽁澁澾㵪㵵熷岙㶊瀬㶑灐灔灯灿炉𠌥䏁㗱𠻘"], -["8e40","𣻗垾𦻓焾𥟠㙎榢𨯩孴穉𥣡𩓙穥穽𥦬窻窰竂竃燑𦒍䇊竚竝竪䇯咲𥰁笋筕笩𥌎𥳾箢筯莜𥮴𦱿篐萡箒箸𥴠㶭𥱥蒒篺簆簵𥳁籄粃𤢂粦晽𤕸糉糇糦籴糳糵糎"], -["8ea1","繧䔝𦹄絝𦻖璍綉綫焵綳緒𤁗𦀩緤㴓緵𡟹緥𨍭縝𦄡𦅚繮纒䌫鑬縧罀罁罇礶𦋐駡羗𦍑羣𡙡𠁨䕜𣝦䔃𨌺翺𦒉者耈耝耨耯𪂇𦳃耻耼聡𢜔䦉𦘦𣷣𦛨朥肧𨩈脇脚墰𢛶汿𦒘𤾸擧𡒊舘𡡞橓𤩥𤪕䑺舩𠬍𦩒𣵾俹𡓽蓢荢𦬊𤦧𣔰𡝳𣷸芪椛芳䇛"], -["8f40","蕋苐茚𠸖𡞴㛁𣅽𣕚艻苢茘𣺋𦶣𦬅𦮗𣗎㶿茝嗬莅䔋𦶥莬菁菓㑾𦻔橗蕚㒖𦹂𢻯葘𥯤葱㷓䓤檧葊𣲵祘蒨𦮖𦹷𦹃蓞萏莑䒠蒓蓤𥲑䉀𥳀䕃蔴嫲𦺙䔧蕳䔖枿蘖"], -["8fa1","𨘥𨘻藁𧂈蘂𡖂𧃍䕫䕪蘨㙈𡢢号𧎚虾蝱𪃸蟮𢰧螱蟚蠏噡虬桖䘏衅衆𧗠𣶹𧗤衞袜䙛袴袵揁装睷𧜏覇覊覦覩覧覼𨨥觧𧤤𧪽誜瞓釾誐𧩙竩𧬺𣾏䜓𧬸煼謌謟𥐰𥕥謿譌譍誩𤩺讐讛誯𡛟䘕衏貛𧵔𧶏貫㜥𧵓賖𧶘𧶽贒贃𡤐賛灜贑𤳉㻐起"], -["9040","趩𨀂𡀔𤦊㭼𨆼𧄌竧躭躶軃鋔輙輭𨍥𨐒辥錃𪊟𠩐辳䤪𨧞𨔽𣶻廸𣉢迹𪀔𨚼𨔁𢌥㦀𦻗逷𨔼𧪾遡𨕬𨘋邨𨜓郄𨛦邮都酧㫰醩釄粬𨤳𡺉鈎沟鉁鉢𥖹銹𨫆𣲛𨬌𥗛"], -["90a1","𠴱錬鍫𨫡𨯫炏嫃𨫢𨫥䥥鉄𨯬𨰹𨯿鍳鑛躼閅閦鐦閠濶䊹𢙺𨛘𡉼𣸮䧟氜陻隖䅬隣𦻕懚隶磵𨫠隽双䦡𦲸𠉴𦐐𩂯𩃥𤫑𡤕𣌊霱虂霶䨏䔽䖅𤫩灵孁霛靜𩇕靗孊𩇫靟鐥僐𣂷𣂼鞉鞟鞱鞾韀韒韠𥑬韮琜𩐳響韵𩐝𧥺䫑頴頳顋顦㬎𧅵㵑𠘰𤅜"], -["9140","𥜆飊颷飈飇䫿𦴧𡛓喰飡飦飬鍸餹𤨩䭲𩡗𩤅駵騌騻騐驘𥜥㛄𩂱𩯕髠髢𩬅髴䰎鬔鬭𨘀倴鬴𦦨㣃𣁽魐魀𩴾婅𡡣鮎𤉋鰂鯿鰌𩹨鷔𩾷𪆒𪆫𪃡𪄣𪇟鵾鶃𪄴鸎梈"], -["91a1","鷄𢅛𪆓𪈠𡤻𪈳鴹𪂹𪊴麐麕麞麢䴴麪麯𤍤黁㭠㧥㴝伲㞾𨰫鼂鼈䮖鐤𦶢鼗鼖鼹嚟嚊齅馸𩂋韲葿齢齩竜龎爖䮾𤥵𤦻煷𤧸𤍈𤩑玞𨯚𡣺禟𨥾𨸶鍩鏳𨩄鋬鎁鏋𨥬𤒹爗㻫睲穃烐𤑳𤏸煾𡟯炣𡢾𣖙㻇𡢅𥐯𡟸㜢𡛻𡠹㛡𡝴𡣑𥽋㜣𡛀坛𤨥𡏾𡊨"], -["9240","𡏆𡒶蔃𣚦蔃葕𤦔𧅥𣸱𥕜𣻻𧁒䓴𣛮𩦝𦼦柹㜳㰕㷧塬𡤢栐䁗𣜿𤃡𤂋𤄏𦰡哋嚞𦚱嚒𠿟𠮨𠸍鏆𨬓鎜仸儫㠙𤐶亼𠑥𠍿佋侊𥙑婨𠆫𠏋㦙𠌊𠐔㐵伩𠋀𨺳𠉵諚𠈌亘"], -["92a1","働儍侢伃𤨎𣺊佂倮偬傁俌俥偘僼兙兛兝兞湶𣖕𣸹𣺿浲𡢄𣺉冨凃𠗠䓝𠒣𠒒𠒑赺𨪜𠜎剙劤𠡳勡鍮䙺熌𤎌𠰠𤦬𡃤槑𠸝瑹㻞璙琔瑖玘䮎𤪼𤂍叐㖄爏𤃉喴𠍅响𠯆圝鉝雴鍦埝垍坿㘾壋媙𨩆𡛺𡝯𡜐娬妸銏婾嫏娒𥥆𡧳𡡡𤊕㛵洅瑃娡𥺃"], -["9340","媁𨯗𠐓鏠璌𡌃焅䥲鐈𨧻鎽㞠尞岞幞幈𡦖𡥼𣫮廍孏𡤃𡤄㜁𡢠㛝𡛾㛓脪𨩇𡶺𣑲𨦨弌弎𡤧𡞫婫𡜻孄蘔𧗽衠恾𢡠𢘫忛㺸𢖯𢖾𩂈𦽳懀𠀾𠁆𢘛憙憘恵𢲛𢴇𤛔𩅍"], -["93a1","摱𤙥𢭪㨩𢬢𣑐𩣪𢹸挷𪑛撶挱揑𤧣𢵧护𢲡搻敫楲㯴𣂎𣊭𤦉𣊫唍𣋠𡣙𩐿曎𣊉𣆳㫠䆐𥖄𨬢𥖏𡛼𥕛𥐥磮𣄃𡠪𣈴㑤𣈏𣆂𤋉暎𦴤晫䮓昰𧡰𡷫晣𣋒𣋡昞𥡲㣑𣠺𣞼㮙𣞢𣏾瓐㮖枏𤘪梶栞㯄檾㡣𣟕𤒇樳橒櫉欅𡤒攑梘橌㯗橺歗𣿀𣲚鎠鋲𨯪𨫋"], -["9440","銉𨀞𨧜鑧涥漋𤧬浧𣽿㶏渄𤀼娽渊塇洤硂焻𤌚𤉶烱牐犇犔𤞏𤜥兹𤪤𠗫瑺𣻸𣙟𤩊𤤗𥿡㼆㺱𤫟𨰣𣼵悧㻳瓌琼鎇琷䒟𦷪䕑疃㽣𤳙𤴆㽘畕癳𪗆㬙瑨𨫌𤦫𤦎㫻"], -["94a1","㷍𤩎㻿𤧅𤣳釺圲鍂𨫣𡡤僟𥈡𥇧睸𣈲眎眏睻𤚗𣞁㩞𤣰琸璛㺿𤪺𤫇䃈𤪖𦆮錇𥖁砞碍碈磒珐祙𧝁𥛣䄎禛蒖禥樭𣻺稺秴䅮𡛦䄲鈵秱𠵌𤦌𠊙𣶺𡝮㖗啫㕰㚪𠇔𠰍竢婙𢛵𥪯𥪜娍𠉛磰娪𥯆竾䇹籝籭䈑𥮳𥺼𥺦糍𤧹𡞰粎籼粮檲緜縇緓罎𦉡"], -["9540","𦅜𧭈綗𥺂䉪𦭵𠤖柖𠁎𣗏埄𦐒𦏸𤥢翝笧𠠬𥫩𥵃笌𥸎駦虅驣樜𣐿㧢𤧷𦖭騟𦖠蒀𧄧𦳑䓪脷䐂胆脉腂𦞴飃𦩂艢艥𦩑葓𦶧蘐𧈛媆䅿𡡀嬫𡢡嫤𡣘蚠蜨𣶏蠭𧐢娂"], -["95a1","衮佅袇袿裦襥襍𥚃襔𧞅𧞄𨯵𨯙𨮜𨧹㺭蒣䛵䛏㟲訽訜𩑈彍鈫𤊄旔焩烄𡡅鵭貟賩𧷜妚矃姰䍮㛔踪躧𤰉輰轊䋴汘澻𢌡䢛潹溋𡟚鯩㚵𤤯邻邗啱䤆醻鐄𨩋䁢𨫼鐧𨰝𨰻蓥訫閙閧閗閖𨴴瑅㻂𤣿𤩂𤏪㻧𣈥随𨻧𨹦𨹥㻌𤧭𤩸𣿮琒瑫㻼靁𩂰"], -["9640","桇䨝𩂓𥟟靝鍨𨦉𨰦𨬯𦎾銺嬑譩䤼珹𤈛鞛靱餸𠼦巁𨯅𤪲頟𩓚鋶𩗗釥䓀𨭐𤩧𨭤飜𨩅㼀鈪䤥萔餻饍𧬆㷽馛䭯馪驜𨭥𥣈檏騡嫾騯𩣱䮐𩥈馼䮽䮗鍽塲𡌂堢𤦸"], -["96a1","𡓨硄𢜟𣶸棅㵽鑘㤧慐𢞁𢥫愇鱏鱓鱻鰵鰐魿鯏𩸭鮟𪇵𪃾鴡䲮𤄄鸘䲰鴌𪆴𪃭𪃳𩤯鶥蒽𦸒𦿟𦮂藼䔳𦶤𦺄𦷰萠藮𦸀𣟗𦁤秢𣖜𣙀䤭𤧞㵢鏛銾鍈𠊿碹鉷鑍俤㑀遤𥕝砽硔碶硋𡝗𣇉𤥁㚚佲濚濙瀞瀞吔𤆵垻壳垊鴖埗焴㒯𤆬燫𦱀𤾗嬨𡞵𨩉"], -["9740","愌嫎娋䊼𤒈㜬䭻𨧼鎻鎸𡣖𠼝葲𦳀𡐓𤋺𢰦𤏁妔𣶷𦝁綨𦅛𦂤𤦹𤦋𨧺鋥珢㻩璴𨭣𡢟㻡𤪳櫘珳珻㻖𤨾𤪔𡟙𤩦𠎧𡐤𤧥瑈𤤖炥𤥶銄珦鍟𠓾錱𨫎𨨖鎆𨯧𥗕䤵𨪂煫"], -["97a1","𤥃𠳿嚤𠘚𠯫𠲸唂秄𡟺緾𡛂𤩐𡡒䔮鐁㜊𨫀𤦭妰𡢿𡢃𧒄媡㛢𣵛㚰鉟婹𨪁𡡢鍴㳍𠪴䪖㦊僴㵩㵌𡎜煵䋻𨈘渏𩃤䓫浗𧹏灧沯㳖𣿭𣸭渂漌㵯𠏵畑㚼㓈䚀㻚䡱姄鉮䤾轁𨰜𦯀堒埈㛖𡑒烾𤍢𤩱𢿣𡊰𢎽梹楧𡎘𣓥𧯴𣛟𨪃𣟖𣏺𤲟樚𣚭𦲷萾䓟䓎"], -["9840","𦴦𦵑𦲂𦿞漗𧄉茽𡜺菭𦲀𧁓𡟛妉媂𡞳婡婱𡤅𤇼㜭姯𡜼㛇熎鎐暚𤊥婮娫𤊓樫𣻹𧜶𤑛𤋊焝𤉙𨧡侰𦴨峂𤓎𧹍𤎽樌𤉖𡌄炦焳𤏩㶥泟勇𤩏繥姫崯㷳彜𤩝𡟟綤萦"], -["98a1","咅𣫺𣌀𠈔坾𠣕𠘙㿥𡾞𪊶瀃𩅛嵰玏糓𨩙𩐠俈翧狍猐𧫴猸猹𥛶獁獈㺩𧬘遬燵𤣲珡臶㻊県㻑沢国琙琞琟㻢㻰㻴㻺瓓㼎㽓畂畭畲疍㽼痈痜㿀癍㿗癴㿜発𤽜熈嘣覀塩䀝睃䀹条䁅㗛瞘䁪䁯属瞾矋売砘点砜䂨砹硇硑硦葈𥔵礳栃礲䄃"], -["9940","䄉禑禙辻稆込䅧窑䆲窼艹䇄竏竛䇏両筢筬筻簒簛䉠䉺类粜䊌粸䊔糭输烀𠳏総緔緐緽羮羴犟䎗耠耥笹耮耱联㷌垴炠肷胩䏭脌猪脎脒畠脔䐁㬹腖腙腚"], -["99a1","䐓堺腼膄䐥膓䐭膥埯臁臤艔䒏芦艶苊苘苿䒰荗险榊萅烵葤惣蒈䔄蒾蓡蓸蔐蔸蕒䔻蕯蕰藠䕷虲蚒蚲蛯际螋䘆䘗袮裿褤襇覑𧥧訩訸誔誴豑賔賲贜䞘塟跃䟭仮踺嗘坔蹱嗵躰䠷軎転軤軭軲辷迁迊迌逳駄䢭飠鈓䤞鈨鉘鉫銱銮銿"], -["9a40","鋣鋫鋳鋴鋽鍃鎄鎭䥅䥑麿鐗匁鐝鐭鐾䥪鑔鑹锭関䦧间阳䧥枠䨤靀䨵鞲韂噔䫤惨颹䬙飱塄餎餙冴餜餷饂饝饢䭰駅䮝騼鬏窃魩鮁鯝鯱鯴䱭鰠㝯𡯂鵉鰺"], -["9aa1","黾噐鶓鶽鷀鷼银辶鹻麬麱麽黆铜黢黱黸竈齄𠂔𠊷𠎠椚铃妬𠓗塀铁㞹𠗕𠘕𠙶𡚺块煳𠫂𠫍𠮿呪吆𠯋咞𠯻𠰻𠱓𠱥𠱼惧𠲍噺𠲵𠳝𠳭𠵯𠶲𠷈楕鰯螥𠸄𠸎𠻗𠾐𠼭𠹳尠𠾼帋𡁜𡁏𡁶朞𡁻𡂈𡂖㙇𡂿𡃓𡄯𡄻卤蒭𡋣𡍵𡌶讁𡕷𡘙𡟃𡟇乸炻𡠭𡥪"], -["9b40","𡨭𡩅𡰪𡱰𡲬𡻈拃𡻕𡼕熘桕𢁅槩㛈𢉼𢏗𢏺𢜪𢡱𢥏苽𢥧𢦓𢫕覥𢫨辠𢬎鞸𢬿顇骽𢱌"], -["9b62","𢲈𢲷𥯨𢴈𢴒𢶷𢶕𢹂𢽴𢿌𣀳𣁦𣌟𣏞徱晈暿𧩹𣕧𣗳爁𤦺矗𣘚𣜖纇𠍆墵朎"], -["9ba1","椘𣪧𧙗𥿢𣸑𣺹𧗾𢂚䣐䪸𤄙𨪚𤋮𤌍𤀻𤌴𤎖𤩅𠗊凒𠘑妟𡺨㮾𣳿𤐄𤓖垈𤙴㦛𤜯𨗨𩧉㝢𢇃譞𨭎駖𤠒𤣻𤨕爉𤫀𠱸奥𤺥𤾆𠝹軚𥀬劏圿煱𥊙𥐙𣽊𤪧喼𥑆𥑮𦭒釔㑳𥔿𧘲𥕞䜘𥕢𥕦𥟇𤤿𥡝偦㓻𣏌惞𥤃䝼𨥈𥪮𥮉𥰆𡶐垡煑澶𦄂𧰒遖𦆲𤾚譢𦐂𦑊"], -["9c40","嵛𦯷輶𦒄𡤜諪𤧶𦒈𣿯𦔒䯀𦖿𦚵𢜛鑥𥟡憕娧晉侻嚹𤔡𦛼乪𤤴陖涏𦲽㘘襷𦞙𦡮𦐑𦡞營𦣇筂𩃀𠨑𦤦鄄𦤹穅鷰𦧺騦𦨭㙟𦑩𠀡禃𦨴𦭛崬𣔙菏𦮝䛐𦲤画补𦶮墶"], -["9ca1","㜜𢖍𧁋𧇍㱔𧊀𧊅銁𢅺𧊋錰𧋦𤧐氹钟𧑐𠻸蠧裵𢤦𨑳𡞱溸𤨪𡠠㦤㚹尐秣䔿暶𩲭𩢤襃𧟌𧡘囖䃟𡘊㦡𣜯𨃨𡏅熭荦𧧝𩆨婧䲷𧂯𨦫𧧽𧨊𧬋𧵦𤅺筃祾𨀉澵𪋟樃𨌘厢𦸇鎿栶靝𨅯𨀣𦦵𡏭𣈯𨁈嶅𨰰𨂃圕頣𨥉嶫𤦈斾槕叒𤪥𣾁㰑朶𨂐𨃴𨄮𡾡𨅏"], -["9d40","𨆉𨆯𨈚𨌆𨌯𨎊㗊𨑨𨚪䣺揦𨥖砈鉕𨦸䏲𨧧䏟𨧨𨭆𨯔姸𨰉輋𨿅𩃬筑𩄐𩄼㷷𩅞𤫊运犏嚋𩓧𩗩𩖰𩖸𩜲𩣑𩥉𩥪𩧃𩨨𩬎𩵚𩶛纟𩻸𩼣䲤镇𪊓熢𪋿䶑递𪗋䶜𠲜达嗁"], -["9da1","辺𢒰边𤪓䔉繿潖檱仪㓤𨬬𧢝㜺躀𡟵𨀤𨭬𨮙𧨾𦚯㷫𧙕𣲷𥘵𥥖亚𥺁𦉘嚿𠹭踎孭𣺈𤲞揞拐𡟶𡡻攰嘭𥱊吚𥌑㷆𩶘䱽嘢嘞罉𥻘奵𣵀蝰东𠿪𠵉𣚺脗鵞贘瘻鱅癎瞹鍅吲腈苷嘥脲萘肽嗪祢噃吖𠺝㗎嘅嗱曱𨋢㘭甴嗰喺咗啲𠱁𠲖廐𥅈𠹶𢱢"], -["9e40","𠺢麫絚嗞𡁵抝靭咔賍燶酶揼掹揾啩𢭃鱲𢺳冚㓟𠶧冧呍唞唓癦踭𦢊疱肶蠄螆裇膶萜𡃁䓬猄𤜆宐茋𦢓噻𢛴𧴯𤆣𧵳𦻐𧊶酰𡇙鈈𣳼𪚩𠺬𠻹牦𡲢䝎𤿂𧿹𠿫䃺"], -["9ea1","鱝攟𢶠䣳𤟠𩵼𠿬𠸊恢𧖣𠿭"], -["9ead","𦁈𡆇熣纎鵐业丄㕷嬍沲卧㚬㧜卽㚥𤘘墚𤭮舭呋垪𥪕𠥹"], -["9ec5","㩒𢑥獴𩺬䴉鯭𣳾𩼰䱛𤾩𩖞𩿞葜𣶶𧊲𦞳𣜠挮紥𣻷𣸬㨪逈勌㹴㙺䗩𠒎癀嫰𠺶硺𧼮墧䂿噼鮋嵴癔𪐴麅䳡痹㟻愙𣃚𤏲"], -["9ef5","噝𡊩垧𤥣𩸆刴𧂮㖭汊鵼"], -["9f40","籖鬹埞𡝬屓擓𩓐𦌵𧅤蚭𠴨𦴢𤫢𠵱"], -["9f4f","凾𡼏嶎霃𡷑麁遌笟鬂峑箣扨挵髿篏鬪籾鬮籂粆鰕篼鬉鼗鰛𤤾齚啳寃俽麘俲剠㸆勑坧偖妷帒韈鶫轜呩鞴饀鞺匬愰"], -["9fa1","椬叚鰊鴂䰻陁榀傦畆𡝭駚剳"], -["9fae","酙隁酜"], -["9fb2","酑𨺗捿𦴣櫊嘑醎畺抅𠏼獏籰𥰡𣳽"], -["9fc1","𤤙盖鮝个𠳔莾衂"], -["9fc9","届槀僭坺刟巵从氱𠇲伹咜哚劚趂㗾弌㗳"], -["9fdb","歒酼龥鮗頮颴骺麨麄煺笔"], -["9fe7","毺蠘罸"], -["9feb","嘠𪙊蹷齓"], -["9ff0","跔蹏鸜踁抂𨍽踨蹵竓𤩷稾磘泪詧瘇"], -["a040","𨩚鼦泎蟖痃𪊲硓咢贌狢獱謭猂瓱賫𤪻蘯徺袠䒷"], -["a055","𡠻𦸅"], -["a058","詾𢔛"], -["a05b","惽癧髗鵄鍮鮏蟵"], -["a063","蠏賷猬霡鮰㗖犲䰇籑饊𦅙慙䰄麖慽"], -["a073","坟慯抦戹拎㩜懢厪𣏵捤栂㗒"], -["a0a1","嵗𨯂迚𨸹"], -["a0a6","僙𡵆礆匲阸𠼻䁥"], -["a0ae","矾"], -["a0b0","糂𥼚糚稭聦聣絍甅瓲覔舚朌聢𧒆聛瓰脃眤覉𦟌畓𦻑螩蟎臈螌詉貭譃眫瓸蓚㘵榲趦"], -["a0d4","覩瑨涹蟁𤀑瓧㷛煶悤憜㳑煢恷"], -["a0e2","罱𨬭牐惩䭾删㰘𣳇𥻗𧙖𥔱𡥄𡋾𩤃𦷜𧂭峁𦆭𨨏𣙷𠃮𦡆𤼎䕢嬟𦍌齐麦𦉫"], -["a3c0","␀",31,"␡"], -["c6a1","①",9,"⑴",9,"ⅰ",9,"丶丿亅亠冂冖冫勹匸卩厶夊宀巛⼳广廴彐彡攴无疒癶辵隶¨ˆヽヾゝゞ〃仝々〆〇ー[]✽ぁ",23], -["c740","す",58,"ァアィイ"], -["c7a1","ゥ",81,"А",5,"ЁЖ",4], -["c840","Л",26,"ёж",25,"⇧↸↹㇏𠃌乚𠂊刂䒑"], -["c8a1","龰冈龱𧘇"], -["c8cd","¬¦'"㈱№℡゛゜⺀⺄⺆⺇⺈⺊⺌⺍⺕⺜⺝⺥⺧⺪⺬⺮⺶⺼⺾⻆⻊⻌⻍⻏⻖⻗⻞⻣"], -["c8f5","ʃɐɛɔɵœøŋʊɪ"], -["f9fe","■"], -["fa40","𠕇鋛𠗟𣿅蕌䊵珯况㙉𤥂𨧤鍄𡧛苮𣳈砼杄拟𤤳𨦪𠊠𦮳𡌅侫𢓭倈𦴩𧪄𣘀𤪱𢔓倩𠍾徤𠎀𠍇滛𠐟偽儁㑺儎顬㝃萖𤦤𠒇兠𣎴兪𠯿𢃼𠋥𢔰𠖎𣈳𡦃宂蝽𠖳𣲙冲冸"], -["faa1","鴴凉减凑㳜凓𤪦决凢卂凭菍椾𣜭彻刋刦刼劵剗劔効勅簕蕂勠蘍𦬓包𨫞啉滙𣾀𠥔𣿬匳卄𠯢泋𡜦栛珕恊㺪㣌𡛨燝䒢卭却𨚫卾卿𡖖𡘓矦厓𨪛厠厫厮玧𥝲㽙玜叁叅汉义埾叙㪫𠮏叠𣿫𢶣叶𠱷吓灹唫晗浛呭𦭓𠵴啝咏咤䞦𡜍𠻝㶴𠵍"], -["fb40","𨦼𢚘啇䳭启琗喆喩嘅𡣗𤀺䕒𤐵暳𡂴嘷曍𣊊暤暭噍噏磱囱鞇叾圀囯园𨭦㘣𡉏坆𤆥汮炋坂㚱𦱾埦𡐖堃𡑔𤍣堦𤯵塜墪㕡壠壜𡈼壻寿坃𪅐𤉸鏓㖡够梦㛃湙"], -["fba1","𡘾娤啓𡚒蔅姉𠵎𦲁𦴪𡟜姙𡟻𡞲𦶦浱𡠨𡛕姹𦹅媫婣㛦𤦩婷㜈媖瑥嫓𦾡𢕔㶅𡤑㜲𡚸広勐孶斈孼𧨎䀄䡝𠈄寕慠𡨴𥧌𠖥寳宝䴐尅𡭄尓珎尔𡲥𦬨屉䣝岅峩峯嶋𡷹𡸷崐崘嵆𡺤岺巗苼㠭𤤁𢁉𢅳芇㠶㯂帮檊幵幺𤒼𠳓厦亷廐厨𡝱帉廴𨒂"], -["fc40","廹廻㢠廼栾鐛弍𠇁弢㫞䢮𡌺强𦢈𢏐彘𢑱彣鞽𦹮彲鍀𨨶徧嶶㵟𥉐𡽪𧃸𢙨釖𠊞𨨩怱暅𡡷㥣㷇㘹垐𢞴祱㹀悞悤悳𤦂𤦏𧩓璤僡媠慤萤慂慈𦻒憁凴𠙖憇宪𣾷"], -["fca1","𢡟懓𨮝𩥝懐㤲𢦀𢣁怣慜攞掋𠄘担𡝰拕𢸍捬𤧟㨗搸揸𡎎𡟼撐澊𢸶頔𤂌𥜝擡擥鑻㩦携㩗敍漖𤨨𤨣斅敭敟𣁾斵𤥀䬷旑䃘𡠩无旣忟𣐀昘𣇷𣇸晄𣆤𣆥晋𠹵晧𥇦晳晴𡸽𣈱𨗴𣇈𥌓矅𢣷馤朂𤎜𤨡㬫槺𣟂杞杧杢𤇍𩃭柗䓩栢湐鈼栁𣏦𦶠桝"], -["fd40","𣑯槡樋𨫟楳棃𣗍椁椀㴲㨁𣘼㮀枬楡𨩊䋼椶榘㮡𠏉荣傐槹𣙙𢄪橅𣜃檝㯳枱櫈𩆜㰍欝𠤣惞欵歴𢟍溵𣫛𠎵𡥘㝀吡𣭚毡𣻼毜氷𢒋𤣱𦭑汚舦汹𣶼䓅𣶽𤆤𤤌𤤀"], -["fda1","𣳉㛥㳫𠴲鮃𣇹𢒑羏样𦴥𦶡𦷫涖浜湼漄𤥿𤂅𦹲蔳𦽴凇沜渝萮𨬡港𣸯瑓𣾂秌湏媑𣁋濸㜍澝𣸰滺𡒗𤀽䕕鏰潄潜㵎潴𩅰㴻澟𤅄濓𤂑𤅕𤀹𣿰𣾴𤄿凟𤅖𤅗𤅀𦇝灋灾炧炁烌烕烖烟䄄㷨熴熖𤉷焫煅媈煊煮岜𤍥煏鍢𤋁焬𤑚𤨧𤨢熺𨯨炽爎"], -["fe40","鑂爕夑鑃爤鍁𥘅爮牀𤥴梽牕牗㹕𣁄栍漽犂猪猫𤠣𨠫䣭𨠄猨献珏玪𠰺𦨮珉瑉𤇢𡛧𤨤昣㛅𤦷𤦍𤧻珷琕椃𤨦琹𠗃㻗瑜𢢭瑠𨺲瑇珤瑶莹瑬㜰瑴鏱樬璂䥓𤪌"], -["fea1","𤅟𤩹𨮏孆𨰃𡢞瓈𡦈甎瓩甞𨻙𡩋寗𨺬鎅畍畊畧畮𤾂㼄𤴓疎瑝疞疴瘂瘬癑癏癯癶𦏵皐臯㟸𦤑𦤎皡皥皷盌𦾟葢𥂝𥅽𡸜眞眦着撯𥈠睘𣊬瞯𨥤𨥨𡛁矴砉𡍶𤨒棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗禝𧬹礼禩渪𧄦㺨秆𩄍秔"] -] diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/tables/cp936.json b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/tables/cp936.json deleted file mode 100644 index 49ddb9a..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/tables/cp936.json +++ /dev/null @@ -1,264 +0,0 @@ -[ -["0","\u0000",127,"€"], -["8140","丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪",5,"乲乴",9,"乿",6,"亇亊"], -["8180","亐亖亗亙亜亝亞亣亪亯亰亱亴亶亷亸亹亼亽亾仈仌仏仐仒仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂",6,"伋伌伒",4,"伜伝伡伣伨伩伬伭伮伱伳伵伷伹伻伾",4,"佄佅佇",5,"佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀侁侂侅來侇侊侌侎侐侒侓侕侖侘侙侚侜侞侟価侢"], -["8240","侤侫侭侰",4,"侶",8,"俀俁係俆俇俈俉俋俌俍俒",4,"俙俛俠俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿",11], -["8280","個倎倐們倓倕倖倗倛倝倞倠倢倣値倧倫倯",10,"倻倽倿偀偁偂偄偅偆偉偊偋偍偐",4,"偖偗偘偙偛偝",7,"偦",5,"偭",8,"偸偹偺偼偽傁傂傃傄傆傇傉傊傋傌傎",20,"傤傦傪傫傭",4,"傳",6,"傼"], -["8340","傽",17,"僐",5,"僗僘僙僛",10,"僨僩僪僫僯僰僱僲僴僶",4,"僼",9,"儈"], -["8380","儉儊儌",5,"儓",13,"儢",28,"兂兇兊兌兎兏児兒兓兗兘兙兛兝",4,"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎冏冐冑冓冔冘冚冝冞冟冡冣冦",4,"冭冮冴冸冹冺冾冿凁凂凃凅凈凊凍凎凐凒",5], -["8440","凘凙凚凜凞凟凢凣凥",5,"凬凮凱凲凴凷凾刄刅刉刋刌刏刐刓刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄",5,"剋剎剏剒剓剕剗剘"], -["8480","剙剚剛剝剟剠剢剣剤剦剨剫剬剭剮剰剱剳",9,"剾劀劃",4,"劉",6,"劑劒劔",6,"劜劤劥劦劧劮劯劰労",9,"勀勁勂勄勅勆勈勊勌勍勎勏勑勓勔動勗務",5,"勠勡勢勣勥",10,"勱",7,"勻勼勽匁匂匃匄匇匉匊匋匌匎"], -["8540","匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬匭匯",9,"匼匽區卂卄卆卋卌卍卐協単卙卛卝卥卨卪卬卭卲卶卹卻卼卽卾厀厁厃厇厈厊厎厏"], -["8580","厐",4,"厖厗厙厛厜厞厠厡厤厧厪厫厬厭厯",6,"厷厸厹厺厼厽厾叀參",4,"収叏叐叒叓叕叚叜叝叞叡叢叧叴叺叾叿吀吂吅吇吋吔吘吙吚吜吢吤吥吪吰吳吶吷吺吽吿呁呂呄呅呇呉呌呍呎呏呑呚呝",4,"呣呥呧呩",7,"呴呹呺呾呿咁咃咅咇咈咉咊咍咑咓咗咘咜咞咟咠咡"], -["8640","咢咥咮咰咲咵咶咷咹咺咼咾哃哅哊哋哖哘哛哠",4,"哫哬哯哰哱哴",5,"哻哾唀唂唃唄唅唈唊",4,"唒唓唕",5,"唜唝唞唟唡唥唦"], -["8680","唨唩唫唭唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋",4,"啑啒啓啔啗",4,"啝啞啟啠啢啣啨啩啫啯",5,"啹啺啽啿喅喆喌喍喎喐喒喓喕喖喗喚喛喞喠",6,"喨",8,"喲喴営喸喺喼喿",4,"嗆嗇嗈嗊嗋嗎嗏嗐嗕嗗",4,"嗞嗠嗢嗧嗩嗭嗮嗰嗱嗴嗶嗸",4,"嗿嘂嘃嘄嘅"], -["8740","嘆嘇嘊嘋嘍嘐",7,"嘙嘚嘜嘝嘠嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀",11,"噏",4,"噕噖噚噛噝",4], -["8780","噣噥噦噧噭噮噯噰噲噳噴噵噷噸噹噺噽",7,"嚇",6,"嚐嚑嚒嚔",14,"嚤",10,"嚰",6,"嚸嚹嚺嚻嚽",12,"囋",8,"囕囖囘囙囜団囥",5,"囬囮囯囲図囶囷囸囻囼圀圁圂圅圇國",6], -["8840","園",9,"圝圞圠圡圢圤圥圦圧圫圱圲圴",4,"圼圽圿坁坃坄坅坆坈坉坋坒",4,"坘坙坢坣坥坧坬坮坰坱坲坴坵坸坹坺坽坾坿垀"], -["8880","垁垇垈垉垊垍",4,"垔",6,"垜垝垞垟垥垨垪垬垯垰垱垳垵垶垷垹",8,"埄",6,"埌埍埐埑埓埖埗埛埜埞埡埢埣埥",7,"埮埰埱埲埳埵埶執埻埼埾埿堁堃堄堅堈堉堊堌堎堏堐堒堓堔堖堗堘堚堛堜堝堟堢堣堥",4,"堫",4,"報堲堳場堶",7], -["8940","堾",5,"塅",6,"塎塏塐塒塓塕塖塗塙",4,"塟",5,"塦",4,"塭",16,"塿墂墄墆墇墈墊墋墌"], -["8980","墍",4,"墔",4,"墛墜墝墠",7,"墪",17,"墽墾墿壀壂壃壄壆",10,"壒壓壔壖",13,"壥",5,"壭壯壱売壴壵壷壸壺",7,"夃夅夆夈",4,"夎夐夑夒夓夗夘夛夝夞夠夡夢夣夦夨夬夰夲夳夵夶夻"], -["8a40","夽夾夿奀奃奅奆奊奌奍奐奒奓奙奛",4,"奡奣奤奦",12,"奵奷奺奻奼奾奿妀妅妉妋妌妎妏妐妑妔妕妘妚妛妜妝妟妠妡妢妦"], -["8a80","妧妬妭妰妱妳",5,"妺妼妽妿",6,"姇姈姉姌姍姎姏姕姖姙姛姞",4,"姤姦姧姩姪姫姭",11,"姺姼姽姾娀娂娊娋娍娎娏娐娒娔娕娖娗娙娚娛娝娞娡娢娤娦娧娨娪",6,"娳娵娷",4,"娽娾娿婁",4,"婇婈婋",9,"婖婗婘婙婛",5], -["8b40","婡婣婤婥婦婨婩婫",8,"婸婹婻婼婽婾媀",17,"媓",6,"媜",13,"媫媬"], -["8b80","媭",4,"媴媶媷媹",4,"媿嫀嫃",5,"嫊嫋嫍",4,"嫓嫕嫗嫙嫚嫛嫝嫞嫟嫢嫤嫥嫧嫨嫪嫬",4,"嫲",22,"嬊",11,"嬘",25,"嬳嬵嬶嬸",7,"孁",6], -["8c40","孈",7,"孒孖孞孠孡孧孨孫孭孮孯孲孴孶孷學孹孻孼孾孿宂宆宊宍宎宐宑宒宔宖実宧宨宩宬宭宮宯宱宲宷宺宻宼寀寁寃寈寉寊寋寍寎寏"], -["8c80","寑寔",8,"寠寢寣實寧審",4,"寯寱",6,"寽対尀専尃尅將專尋尌對導尐尒尓尗尙尛尞尟尠尡尣尦尨尩尪尫尭尮尯尰尲尳尵尶尷屃屄屆屇屌屍屒屓屔屖屗屘屚屛屜屝屟屢層屧",6,"屰屲",6,"屻屼屽屾岀岃",4,"岉岊岋岎岏岒岓岕岝",4,"岤",4], -["8d40","岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅",5,"峌",5,"峓",5,"峚",6,"峢峣峧峩峫峬峮峯峱",9,"峼",4], -["8d80","崁崄崅崈",5,"崏",4,"崕崗崘崙崚崜崝崟",4,"崥崨崪崫崬崯",4,"崵",7,"崿",7,"嵈嵉嵍",10,"嵙嵚嵜嵞",10,"嵪嵭嵮嵰嵱嵲嵳嵵",12,"嶃",21,"嶚嶛嶜嶞嶟嶠"], -["8e40","嶡",21,"嶸",12,"巆",6,"巎",12,"巜巟巠巣巤巪巬巭"], -["8e80","巰巵巶巸",4,"巿帀帄帇帉帊帋帍帎帒帓帗帞",7,"帨",4,"帯帰帲",4,"帹帺帾帿幀幁幃幆",5,"幍",6,"幖",4,"幜幝幟幠幣",14,"幵幷幹幾庁庂広庅庈庉庌庍庎庒庘庛庝庡庢庣庤庨",4,"庮",4,"庴庺庻庼庽庿",6], -["8f40","廆廇廈廋",5,"廔廕廗廘廙廚廜",11,"廩廫",8,"廵廸廹廻廼廽弅弆弇弉弌弍弎弐弒弔弖弙弚弜弝弞弡弢弣弤"], -["8f80","弨弫弬弮弰弲",6,"弻弽弾弿彁",14,"彑彔彙彚彛彜彞彟彠彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿徃徆徍徎徏徑従徔徖徚徛徝從徟徠徢",5,"復徫徬徯",5,"徶徸徹徺徻徾",4,"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇"], -["9040","怈怉怋怌怐怑怓怗怘怚怞怟怢怣怤怬怭怮怰",4,"怶",4,"怽怾恀恄",6,"恌恎恏恑恓恔恖恗恘恛恜恞恟恠恡恥恦恮恱恲恴恵恷恾悀"], -["9080","悁悂悅悆悇悈悊悋悎悏悐悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽",7,"惇惈惉惌",4,"惒惓惔惖惗惙惛惞惡",4,"惪惱惲惵惷惸惻",4,"愂愃愄愅愇愊愋愌愐",4,"愖愗愘愙愛愜愝愞愡愢愥愨愩愪愬",18,"慀",6], -["9140","慇慉態慍慏慐慒慓慔慖",6,"慞慟慠慡慣慤慥慦慩",6,"慱慲慳慴慶慸",18,"憌憍憏",4,"憕"], -["9180","憖",6,"憞",8,"憪憫憭",9,"憸",5,"憿懀懁懃",4,"應懌",4,"懓懕",16,"懧",13,"懶",8,"戀",5,"戇戉戓戔戙戜戝戞戠戣戦戧戨戩戫戭戯戰戱戲戵戶戸",4,"扂扄扅扆扊"], -["9240","扏扐払扖扗扙扚扜",6,"扤扥扨扱扲扴扵扷扸扺扻扽抁抂抃抅抆抇抈抋",5,"抔抙抜抝択抣抦抧抩抪抭抮抯抰抲抳抴抶抷抸抺抾拀拁"], -["9280","拃拋拏拑拕拝拞拠拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌挍挏挐挒挓挔挕挗挘挙挜挦挧挩挬挭挮挰挱挳",5,"挻挼挾挿捀捁捄捇捈捊捑捒捓捔捖",7,"捠捤捥捦捨捪捫捬捯捰捲捳捴捵捸捹捼捽捾捿掁掃掄掅掆掋掍掑掓掔掕掗掙",6,"採掤掦掫掯掱掲掵掶掹掻掽掿揀"], -["9340","揁揂揃揅揇揈揊揋揌揑揓揔揕揗",6,"揟揢揤",4,"揫揬揮揯揰揱揳揵揷揹揺揻揼揾搃搄搆",4,"損搎搑搒搕",5,"搝搟搢搣搤"], -["9380","搥搧搨搩搫搮",5,"搵",4,"搻搼搾摀摂摃摉摋",6,"摓摕摖摗摙",4,"摟",7,"摨摪摫摬摮",9,"摻",6,"撃撆撈",8,"撓撔撗撘撚撛撜撝撟",4,"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿擁擃擄擆",6,"擏擑擓擔擕擖擙據"], -["9440","擛擜擝擟擠擡擣擥擧",24,"攁",7,"攊",7,"攓",4,"攙",8], -["9480","攢攣攤攦",4,"攬攭攰攱攲攳攷攺攼攽敀",4,"敆敇敊敋敍敎敐敒敓敔敗敘敚敜敟敠敡敤敥敧敨敩敪敭敮敯敱敳敵敶數",14,"斈斉斊斍斎斏斒斔斕斖斘斚斝斞斠斢斣斦斨斪斬斮斱",7,"斺斻斾斿旀旂旇旈旉旊旍旐旑旓旔旕旘",7,"旡旣旤旪旫"], -["9540","旲旳旴旵旸旹旻",4,"昁昄昅昇昈昉昋昍昐昑昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷",4,"昽昿晀時晄",6,"晍晎晐晑晘"], -["9580","晙晛晜晝晞晠晢晣晥晧晩",4,"晱晲晳晵晸晹晻晼晽晿暀暁暃暅暆暈暉暊暋暍暎暏暐暒暓暔暕暘",4,"暞",8,"暩",4,"暯",4,"暵暶暷暸暺暻暼暽暿",25,"曚曞",7,"曧曨曪",5,"曱曵曶書曺曻曽朁朂會"], -["9640","朄朅朆朇朌朎朏朑朒朓朖朘朙朚朜朞朠",5,"朧朩朮朰朲朳朶朷朸朹朻朼朾朿杁杄杅杇杊杋杍杒杔杕杗",4,"杝杢杣杤杦杧杫杬杮東杴杶"], -["9680","杸杹杺杻杽枀枂枃枅枆枈枊枌枍枎枏枑枒枓枔枖枙枛枟枠枡枤枦枩枬枮枱枲枴枹",7,"柂柅",9,"柕柖柗柛柟柡柣柤柦柧柨柪柫柭柮柲柵",7,"柾栁栂栃栄栆栍栐栒栔栕栘",4,"栞栟栠栢",6,"栫",6,"栴栵栶栺栻栿桇桋桍桏桒桖",5], -["9740","桜桝桞桟桪桬",7,"桵桸",8,"梂梄梇",7,"梐梑梒梔梕梖梘",9,"梣梤梥梩梪梫梬梮梱梲梴梶梷梸"], -["9780","梹",6,"棁棃",5,"棊棌棎棏棐棑棓棔棖棗棙棛",4,"棡棢棤",9,"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆",4,"椌椏椑椓",11,"椡椢椣椥",7,"椮椯椱椲椳椵椶椷椸椺椻椼椾楀楁楃",16,"楕楖楘楙楛楜楟"], -["9840","楡楢楤楥楧楨楩楪楬業楯楰楲",4,"楺楻楽楾楿榁榃榅榊榋榌榎",5,"榖榗榙榚榝",9,"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽"], -["9880","榾榿槀槂",7,"構槍槏槑槒槓槕",5,"槜槝槞槡",11,"槮槯槰槱槳",9,"槾樀",9,"樋",11,"標",5,"樠樢",5,"権樫樬樭樮樰樲樳樴樶",6,"樿",4,"橅橆橈",7,"橑",6,"橚"], -["9940","橜",4,"橢橣橤橦",10,"橲",6,"橺橻橽橾橿檁檂檃檅",8,"檏檒",4,"檘",7,"檡",5], -["9980","檧檨檪檭",114,"欥欦欨",6], -["9a40","欯欰欱欳欴欵欶欸欻欼欽欿歀歁歂歄歅歈歊歋歍",11,"歚",7,"歨歩歫",13,"歺歽歾歿殀殅殈"], -["9a80","殌殎殏殐殑殔殕殗殘殙殜",4,"殢",7,"殫",7,"殶殸",6,"毀毃毄毆",4,"毌毎毐毑毘毚毜",4,"毢",7,"毬毭毮毰毱毲毴毶毷毸毺毻毼毾",6,"氈",4,"氎氒気氜氝氞氠氣氥氫氬氭氱氳氶氷氹氺氻氼氾氿汃汄汅汈汋",4,"汑汒汓汖汘"], -["9b40","汙汚汢汣汥汦汧汫",4,"汱汳汵汷汸決汻汼汿沀沄沇沊沋沍沎沑沒沕沖沗沘沚沜沝沞沠沢沨沬沯沰沴沵沶沷沺泀況泂泃泆泇泈泋泍泎泏泑泒泘"], -["9b80","泙泚泜泝泟泤泦泧泩泬泭泲泴泹泿洀洂洃洅洆洈洉洊洍洏洐洑洓洔洕洖洘洜洝洟",5,"洦洨洩洬洭洯洰洴洶洷洸洺洿浀浂浄浉浌浐浕浖浗浘浛浝浟浡浢浤浥浧浨浫浬浭浰浱浲浳浵浶浹浺浻浽",4,"涃涄涆涇涊涋涍涏涐涒涖",4,"涜涢涥涬涭涰涱涳涴涶涷涹",5,"淁淂淃淈淉淊"], -["9c40","淍淎淏淐淒淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪淭淯淰淲淴淵淶淸淺淽",7,"渆渇済渉渋渏渒渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵"], -["9c80","渶渷渹渻",7,"湅",7,"湏湐湑湒湕湗湙湚湜湝湞湠",10,"湬湭湯",14,"満溁溂溄溇溈溊",4,"溑",6,"溙溚溛溝溞溠溡溣溤溦溨溩溫溬溭溮溰溳溵溸溹溼溾溿滀滃滄滅滆滈滉滊滌滍滎滐滒滖滘滙滛滜滝滣滧滪",5], -["9d40","滰滱滲滳滵滶滷滸滺",7,"漃漄漅漇漈漊",4,"漐漑漒漖",9,"漡漢漣漥漦漧漨漬漮漰漲漴漵漷",6,"漿潀潁潂"], -["9d80","潃潄潅潈潉潊潌潎",9,"潙潚潛潝潟潠潡潣潤潥潧",5,"潯潰潱潳潵潶潷潹潻潽",6,"澅澆澇澊澋澏",12,"澝澞澟澠澢",4,"澨",10,"澴澵澷澸澺",5,"濁濃",5,"濊",6,"濓",10,"濟濢濣濤濥"], -["9e40","濦",7,"濰",32,"瀒",7,"瀜",6,"瀤",6], -["9e80","瀫",9,"瀶瀷瀸瀺",17,"灍灎灐",13,"灟",11,"灮灱灲灳灴灷灹灺灻災炁炂炃炄炆炇炈炋炌炍炏炐炑炓炗炘炚炛炞",12,"炰炲炴炵炶為炾炿烄烅烆烇烉烋",12,"烚"], -["9f40","烜烝烞烠烡烢烣烥烪烮烰",6,"烸烺烻烼烾",10,"焋",4,"焑焒焔焗焛",10,"焧",7,"焲焳焴"], -["9f80","焵焷",13,"煆煇煈煉煋煍煏",12,"煝煟",4,"煥煩",4,"煯煰煱煴煵煶煷煹煻煼煾",5,"熅",4,"熋熌熍熎熐熑熒熓熕熖熗熚",4,"熡",6,"熩熪熫熭",5,"熴熶熷熸熺",8,"燄",9,"燏",4], -["a040","燖",9,"燡燢燣燤燦燨",5,"燯",9,"燺",11,"爇",19], -["a080","爛爜爞",9,"爩爫爭爮爯爲爳爴爺爼爾牀",6,"牉牊牋牎牏牐牑牓牔牕牗牘牚牜牞牠牣牤牥牨牪牫牬牭牰牱牳牴牶牷牸牻牼牽犂犃犅",4,"犌犎犐犑犓",11,"犠",11,"犮犱犲犳犵犺",6,"狅狆狇狉狊狋狌狏狑狓狔狕狖狘狚狛"], -["a1a1"," 、。·ˉˇ¨〃々—~‖…‘’“”〔〕〈",7,"〖〗【】±×÷∶∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°′″℃$¤¢£‰§№☆★○●◎◇◆□■△▲※→←↑↓〓"], -["a2a1","ⅰ",9], -["a2b1","⒈",19,"⑴",19,"①",9], -["a2e5","㈠",9], -["a2f1","Ⅰ",11], -["a3a1","!"#¥%",88," ̄"], -["a4a1","ぁ",82], -["a5a1","ァ",85], -["a6a1","Α",16,"Σ",6], -["a6c1","α",16,"σ",6], -["a6e0","︵︶︹︺︿﹀︽︾﹁﹂﹃﹄"], -["a6ee","︻︼︷︸︱"], -["a6f4","︳︴"], -["a7a1","А",5,"ЁЖ",25], -["a7d1","а",5,"ёж",25], -["a840","ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿═",35,"▁",6], -["a880","█",7,"▓▔▕▼▽◢◣◤◥☉⊕〒〝〞"], -["a8a1","āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüêɑ"], -["a8bd","ńň"], -["a8c0","ɡ"], -["a8c5","ㄅ",36], -["a940","〡",8,"㊣㎎㎏㎜㎝㎞㎡㏄㏎㏑㏒㏕︰¬¦"], -["a959","℡㈱"], -["a95c","‐"], -["a960","ー゛゜ヽヾ〆ゝゞ﹉",9,"﹔﹕﹖﹗﹙",8], -["a980","﹢",4,"﹨﹩﹪﹫"], -["a996","〇"], -["a9a4","─",75], -["aa40","狜狝狟狢",5,"狪狫狵狶狹狽狾狿猀猂猄",5,"猋猌猍猏猐猑猒猔猘猙猚猟猠猣猤猦猧猨猭猯猰猲猳猵猶猺猻猼猽獀",8], -["aa80","獉獊獋獌獎獏獑獓獔獕獖獘",7,"獡",10,"獮獰獱"], -["ab40","獲",11,"獿",4,"玅玆玈玊玌玍玏玐玒玓玔玕玗玘玙玚玜玝玞玠玡玣",5,"玪玬玭玱玴玵玶玸玹玼玽玾玿珁珃",4], -["ab80","珋珌珎珒",6,"珚珛珜珝珟珡珢珣珤珦珨珪珫珬珮珯珰珱珳",4], -["ac40","珸",10,"琄琇琈琋琌琍琎琑",8,"琜",5,"琣琤琧琩琫琭琯琱琲琷",4,"琽琾琿瑀瑂",11], -["ac80","瑎",6,"瑖瑘瑝瑠",12,"瑮瑯瑱",4,"瑸瑹瑺"], -["ad40","瑻瑼瑽瑿璂璄璅璆璈璉璊璌璍璏璑",10,"璝璟",7,"璪",15,"璻",12], -["ad80","瓈",9,"瓓",8,"瓝瓟瓡瓥瓧",6,"瓰瓱瓲"], -["ae40","瓳瓵瓸",6,"甀甁甂甃甅",7,"甎甐甒甔甕甖甗甛甝甞甠",4,"甦甧甪甮甴甶甹甼甽甿畁畂畃畄畆畇畉畊畍畐畑畒畓畕畖畗畘"], -["ae80","畝",7,"畧畨畩畫",6,"畳畵當畷畺",4,"疀疁疂疄疅疇"], -["af40","疈疉疊疌疍疎疐疓疕疘疛疜疞疢疦",4,"疭疶疷疺疻疿痀痁痆痋痌痎痏痐痑痓痗痙痚痜痝痟痠痡痥痩痬痭痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇"], -["af80","瘈瘉瘋瘍瘎瘏瘑瘒瘓瘔瘖瘚瘜瘝瘞瘡瘣瘧瘨瘬瘮瘯瘱瘲瘶瘷瘹瘺瘻瘽癁療癄"], -["b040","癅",6,"癎",5,"癕癗",4,"癝癟癠癡癢癤",6,"癬癭癮癰",7,"癹発發癿皀皁皃皅皉皊皌皍皏皐皒皔皕皗皘皚皛"], -["b080","皜",7,"皥",8,"皯皰皳皵",9,"盀盁盃啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥"], -["b140","盄盇盉盋盌盓盕盙盚盜盝盞盠",4,"盦",7,"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎",10,"眛眜眝眞眡眣眤眥眧眪眫"], -["b180","眬眮眰",4,"眹眻眽眾眿睂睄睅睆睈",7,"睒",7,"睜薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳"], -["b240","睝睞睟睠睤睧睩睪睭",11,"睺睻睼瞁瞂瞃瞆",5,"瞏瞐瞓",11,"瞡瞣瞤瞦瞨瞫瞭瞮瞯瞱瞲瞴瞶",4], -["b280","瞼瞾矀",12,"矎",8,"矘矙矚矝",4,"矤病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖"], -["b340","矦矨矪矯矰矱矲矴矵矷矹矺矻矼砃",5,"砊砋砎砏砐砓砕砙砛砞砠砡砢砤砨砪砫砮砯砱砲砳砵砶砽砿硁硂硃硄硆硈硉硊硋硍硏硑硓硔硘硙硚"], -["b380","硛硜硞",11,"硯",7,"硸硹硺硻硽",6,"场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚"], -["b440","碄碅碆碈碊碋碏碐碒碔碕碖碙碝碞碠碢碤碦碨",7,"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌磍磎磏磑磒磓磖磗磘磚",9], -["b480","磤磥磦磧磩磪磫磭",4,"磳磵磶磸磹磻",5,"礂礃礄礆",6,"础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮"], -["b540","礍",5,"礔",9,"礟",4,"礥",14,"礵",4,"礽礿祂祃祄祅祇祊",8,"祔祕祘祙祡祣"], -["b580","祤祦祩祪祫祬祮祰",6,"祹祻",4,"禂禃禆禇禈禉禋禌禍禎禐禑禒怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠"], -["b640","禓",6,"禛",11,"禨",10,"禴",4,"禼禿秂秄秅秇秈秊秌秎秏秐秓秔秖秗秙",5,"秠秡秢秥秨秪"], -["b680","秬秮秱",6,"秹秺秼秾秿稁稄稅稇稈稉稊稌稏",4,"稕稖稘稙稛稜丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二"], -["b740","稝稟稡稢稤",14,"稴稵稶稸稺稾穀",5,"穇",9,"穒",4,"穘",16], -["b780","穩",6,"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎窏窐窓窔窙窚窛窞窡窢贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服"], -["b840","窣窤窧窩窪窫窮",4,"窴",10,"竀",10,"竌",9,"竗竘竚竛竜竝竡竢竤竧",5,"竮竰竱竲竳"], -["b880","竴",4,"竻竼竾笀笁笂笅笇笉笌笍笎笐笒笓笖笗笘笚笜笝笟笡笢笣笧笩笭浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹"], -["b940","笯笰笲笴笵笶笷笹笻笽笿",5,"筆筈筊筍筎筓筕筗筙筜筞筟筡筣",10,"筯筰筳筴筶筸筺筼筽筿箁箂箃箄箆",6,"箎箏"], -["b980","箑箒箓箖箘箙箚箛箞箟箠箣箤箥箮箯箰箲箳箵箶箷箹",7,"篂篃範埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈"], -["ba40","篅篈築篊篋篍篎篏篐篒篔",4,"篛篜篞篟篠篢篣篤篧篨篩篫篬篭篯篰篲",4,"篸篹篺篻篽篿",7,"簈簉簊簍簎簐",5,"簗簘簙"], -["ba80","簚",4,"簠",5,"簨簩簫",12,"簹",5,"籂骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖"], -["bb40","籃",9,"籎",36,"籵",5,"籾",9], -["bb80","粈粊",6,"粓粔粖粙粚粛粠粡粣粦粧粨粩粫粬粭粯粰粴",4,"粺粻弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕"], -["bc40","粿糀糂糃糄糆糉糋糎",6,"糘糚糛糝糞糡",6,"糩",5,"糰",7,"糹糺糼",13,"紋",5], -["bc80","紑",14,"紡紣紤紥紦紨紩紪紬紭紮細",6,"肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件"], -["bd40","紷",54,"絯",7], -["bd80","絸",32,"健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸"], -["be40","継",12,"綧",6,"綯",42], -["be80","線",32,"尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻"], -["bf40","緻",62], -["bf80","縺縼",4,"繂",4,"繈",21,"俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀"], -["c040","繞",35,"纃",23,"纜纝纞"], -["c080","纮纴纻纼绖绤绬绹缊缐缞缷缹缻",6,"罃罆",9,"罒罓馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐"], -["c140","罖罙罛罜罝罞罠罣",4,"罫罬罭罯罰罳罵罶罷罸罺罻罼罽罿羀羂",7,"羋羍羏",4,"羕",4,"羛羜羠羢羣羥羦羨",6,"羱"], -["c180","羳",4,"羺羻羾翀翂翃翄翆翇翈翉翋翍翏",4,"翖翗翙",5,"翢翣痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿"], -["c240","翤翧翨翪翫翬翭翯翲翴",6,"翽翾翿耂耇耈耉耊耎耏耑耓耚耛耝耞耟耡耣耤耫",5,"耲耴耹耺耼耾聀聁聄聅聇聈聉聎聏聐聑聓聕聖聗"], -["c280","聙聛",13,"聫",5,"聲",11,"隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫"], -["c340","聾肁肂肅肈肊肍",5,"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇",4,"胏",6,"胘胟胠胢胣胦胮胵胷胹胻胾胿脀脁脃脄脅脇脈脋"], -["c380","脌脕脗脙脛脜脝脟",12,"脭脮脰脳脴脵脷脹",4,"脿谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸"], -["c440","腀",5,"腇腉腍腎腏腒腖腗腘腛",4,"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸膁膃",4,"膉膋膌膍膎膐膒",5,"膙膚膞",4,"膤膥"], -["c480","膧膩膫",7,"膴",5,"膼膽膾膿臄臅臇臈臉臋臍",6,"摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁"], -["c540","臔",14,"臤臥臦臨臩臫臮",4,"臵",5,"臽臿舃與",4,"舎舏舑舓舕",5,"舝舠舤舥舦舧舩舮舲舺舼舽舿"], -["c580","艀艁艂艃艅艆艈艊艌艍艎艐",7,"艙艛艜艝艞艠",7,"艩拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗"], -["c640","艪艫艬艭艱艵艶艷艸艻艼芀芁芃芅芆芇芉芌芐芓芔芕芖芚芛芞芠芢芣芧芲芵芶芺芻芼芿苀苂苃苅苆苉苐苖苙苚苝苢苧苨苩苪苬苭苮苰苲苳苵苶苸"], -["c680","苺苼",4,"茊茋茍茐茒茓茖茘茙茝",9,"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐"], -["c740","茾茿荁荂荄荅荈荊",4,"荓荕",4,"荝荢荰",6,"荹荺荾",6,"莇莈莊莋莌莍莏莐莑莔莕莖莗莙莚莝莟莡",6,"莬莭莮"], -["c780","莯莵莻莾莿菂菃菄菆菈菉菋菍菎菐菑菒菓菕菗菙菚菛菞菢菣菤菦菧菨菫菬菭恰洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠"], -["c840","菮華菳",4,"菺菻菼菾菿萀萂萅萇萈萉萊萐萒",5,"萙萚萛萞",5,"萩",7,"萲",5,"萹萺萻萾",7,"葇葈葉"], -["c880","葊",6,"葒",4,"葘葝葞葟葠葢葤",4,"葪葮葯葰葲葴葷葹葻葼取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁"], -["c940","葽",4,"蒃蒄蒅蒆蒊蒍蒏",7,"蒘蒚蒛蒝蒞蒟蒠蒢",12,"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎蓏蓒蓔蓕蓗"], -["c980","蓘",4,"蓞蓡蓢蓤蓧",4,"蓭蓮蓯蓱",10,"蓽蓾蔀蔁蔂伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳"], -["ca40","蔃",8,"蔍蔎蔏蔐蔒蔔蔕蔖蔘蔙蔛蔜蔝蔞蔠蔢",8,"蔭",9,"蔾",4,"蕄蕅蕆蕇蕋",10], -["ca80","蕗蕘蕚蕛蕜蕝蕟",4,"蕥蕦蕧蕩",8,"蕳蕵蕶蕷蕸蕼蕽蕿薀薁省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱"], -["cb40","薂薃薆薈",6,"薐",10,"薝",6,"薥薦薧薩薫薬薭薱",5,"薸薺",6,"藂",6,"藊",4,"藑藒"], -["cb80","藔藖",5,"藝",6,"藥藦藧藨藪",14,"恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔"], -["cc40","藹藺藼藽藾蘀",4,"蘆",10,"蘒蘓蘔蘕蘗",15,"蘨蘪",13,"蘹蘺蘻蘽蘾蘿虀"], -["cc80","虁",11,"虒虓處",4,"虛虜虝號虠虡虣",7,"獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃"], -["cd40","虭虯虰虲",6,"蚃",6,"蚎",4,"蚔蚖",5,"蚞",4,"蚥蚦蚫蚭蚮蚲蚳蚷蚸蚹蚻",4,"蛁蛂蛃蛅蛈蛌蛍蛒蛓蛕蛖蛗蛚蛜"], -["cd80","蛝蛠蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿蜁蜄蜅蜆蜋蜌蜎蜏蜐蜑蜔蜖汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威"], -["ce40","蜙蜛蜝蜟蜠蜤蜦蜧蜨蜪蜫蜬蜭蜯蜰蜲蜳蜵蜶蜸蜹蜺蜼蜽蝀",6,"蝊蝋蝍蝏蝐蝑蝒蝔蝕蝖蝘蝚",5,"蝡蝢蝦",7,"蝯蝱蝲蝳蝵"], -["ce80","蝷蝸蝹蝺蝿螀螁螄螆螇螉螊螌螎",4,"螔螕螖螘",6,"螠",4,"巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺"], -["cf40","螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿蟁",4,"蟇蟈蟉蟌",4,"蟔",6,"蟜蟝蟞蟟蟡蟢蟣蟤蟦蟧蟨蟩蟫蟬蟭蟯",9], -["cf80","蟺蟻蟼蟽蟿蠀蠁蠂蠄",5,"蠋",7,"蠔蠗蠘蠙蠚蠜",4,"蠣稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓"], -["d040","蠤",13,"蠳",5,"蠺蠻蠽蠾蠿衁衂衃衆",5,"衎",5,"衕衖衘衚",6,"衦衧衪衭衯衱衳衴衵衶衸衹衺"], -["d080","衻衼袀袃袆袇袉袊袌袎袏袐袑袓袔袕袗",4,"袝",4,"袣袥",5,"小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄"], -["d140","袬袮袯袰袲",4,"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌裍裏裐裑裓裖裗裚",4,"裠裡裦裧裩",6,"裲裵裶裷裺裻製裿褀褁褃",5], -["d180","褉褋",4,"褑褔",4,"褜",4,"褢褣褤褦褧褨褩褬褭褮褯褱褲褳褵褷选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶"], -["d240","褸",8,"襂襃襅",24,"襠",5,"襧",19,"襼"], -["d280","襽襾覀覂覄覅覇",26,"摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐"], -["d340","覢",30,"觃觍觓觔觕觗觘觙觛觝觟觠觡觢觤觧觨觩觪觬觭觮觰觱觲觴",6], -["d380","觻",4,"訁",5,"計",21,"印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉"], -["d440","訞",31,"訿",8,"詉",21], -["d480","詟",25,"詺",6,"浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧"], -["d540","誁",7,"誋",7,"誔",46], -["d580","諃",32,"铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政"], -["d640","諤",34,"謈",27], -["d680","謤謥謧",30,"帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑"], -["d740","譆",31,"譧",4,"譭",25], -["d780","讇",24,"讬讱讻诇诐诪谉谞住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座"], -["d840","谸",8,"豂豃豄豅豈豊豋豍",7,"豖豗豘豙豛",5,"豣",6,"豬",6,"豴豵豶豷豻",6,"貃貄貆貇"], -["d880","貈貋貍",6,"貕貖貗貙",20,"亍丌兀丐廿卅丕亘丞鬲孬噩丨禺丿匕乇夭爻卮氐囟胤馗毓睾鼗丶亟鼐乜乩亓芈孛啬嘏仄厍厝厣厥厮靥赝匚叵匦匮匾赜卦卣刂刈刎刭刳刿剀剌剞剡剜蒯剽劂劁劐劓冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚佝"], -["d940","貮",62], -["d980","賭",32,"佟佗伲伽佶佴侑侉侃侏佾佻侪佼侬侔俦俨俪俅俚俣俜俑俟俸倩偌俳倬倏倮倭俾倜倌倥倨偾偃偕偈偎偬偻傥傧傩傺僖儆僭僬僦僮儇儋仝氽佘佥俎龠汆籴兮巽黉馘冁夔勹匍訇匐凫夙兕亠兖亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼"], -["da40","贎",14,"贠赑赒赗赟赥赨赩赪赬赮赯赱赲赸",8,"趂趃趆趇趈趉趌",4,"趒趓趕",9,"趠趡"], -["da80","趢趤",12,"趲趶趷趹趻趽跀跁跂跅跇跈跉跊跍跐跒跓跔凇冖冢冥讠讦讧讪讴讵讷诂诃诋诏诎诒诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌谏谑谒谔谕谖谙谛谘谝谟谠谡谥谧谪谫谮谯谲谳谵谶卩卺阝阢阡阱阪阽阼陂陉陔陟陧陬陲陴隈隍隗隰邗邛邝邙邬邡邴邳邶邺"], -["db40","跕跘跙跜跠跡跢跥跦跧跩跭跮跰跱跲跴跶跼跾",6,"踆踇踈踋踍踎踐踑踒踓踕",7,"踠踡踤",4,"踫踭踰踲踳踴踶踷踸踻踼踾"], -["db80","踿蹃蹅蹆蹌",4,"蹓",5,"蹚",11,"蹧蹨蹪蹫蹮蹱邸邰郏郅邾郐郄郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆刍奂劢劬劭劾哿勐勖勰叟燮矍廴凵凼鬯厶弁畚巯坌垩垡塾墼壅壑圩圬圪圳圹圮圯坜圻坂坩垅坫垆坼坻坨坭坶坳垭垤垌垲埏垧垴垓垠埕埘埚埙埒垸埴埯埸埤埝"], -["dc40","蹳蹵蹷",4,"蹽蹾躀躂躃躄躆躈",6,"躑躒躓躕",6,"躝躟",11,"躭躮躰躱躳",6,"躻",7], -["dc80","軃",10,"軏",21,"堋堍埽埭堀堞堙塄堠塥塬墁墉墚墀馨鼙懿艹艽艿芏芊芨芄芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌苁芩芴芡芪芟苄苎芤苡茉苷苤茏茇苜苴苒苘茌苻苓茑茚茆茔茕苠苕茜荑荛荜茈莒茼茴茱莛荞茯荏荇荃荟荀茗荠茭茺茳荦荥"], -["dd40","軥",62], -["dd80","輤",32,"荨茛荩荬荪荭荮莰荸莳莴莠莪莓莜莅荼莶莩荽莸荻莘莞莨莺莼菁萁菥菘堇萘萋菝菽菖萜萸萑萆菔菟萏萃菸菹菪菅菀萦菰菡葜葑葚葙葳蒇蒈葺蒉葸萼葆葩葶蒌蒎萱葭蓁蓍蓐蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌甍蔸蓰蔹蔟蔺"], -["de40","轅",32,"轪辀辌辒辝辠辡辢辤辥辦辧辪辬辭辮辯農辳辴辵辷辸辺辻込辿迀迃迆"], -["de80","迉",4,"迏迒迖迗迚迠迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿逇逈逌逎逓逕逘蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇薏蕹薮薜薅薹薷薰藓藁藜藿蘧蘅蘩蘖蘼廾弈夼奁耷奕奚奘匏尢尥尬尴扌扪抟抻拊拚拗拮挢拶挹捋捃掭揶捱捺掎掴捭掬掊捩掮掼揲揸揠揿揄揞揎摒揆掾摅摁搋搛搠搌搦搡摞撄摭撖"], -["df40","這逜連逤逥逧",5,"逰",4,"逷逹逺逽逿遀遃遅遆遈",4,"過達違遖遙遚遜",5,"遤遦遧適遪遫遬遯",4,"遶",6,"遾邁"], -["df80","還邅邆邇邉邊邌",4,"邒邔邖邘邚邜邞邟邠邤邥邧邨邩邫邭邲邷邼邽邿郀摺撷撸撙撺擀擐擗擤擢攉攥攮弋忒甙弑卟叱叽叩叨叻吒吖吆呋呒呓呔呖呃吡呗呙吣吲咂咔呷呱呤咚咛咄呶呦咝哐咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤哝哏哞唛哧唠哽唔哳唢唣唏唑唧唪啧喏喵啉啭啁啕唿啐唼"], -["e040","郂郃郆郈郉郋郌郍郒郔郕郖郘郙郚郞郟郠郣郤郥郩郪郬郮郰郱郲郳郵郶郷郹郺郻郼郿鄀鄁鄃鄅",19,"鄚鄛鄜"], -["e080","鄝鄟鄠鄡鄤",10,"鄰鄲",6,"鄺",8,"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈喁喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦嗝嗄嗯嗥嗲嗳嗌嗍嗨嗵嗤辔嘞嘈嘌嘁嘤嘣嗾嘀嘧嘭噘嘹噗嘬噍噢噙噜噌噔嚆噤噱噫噻噼嚅嚓嚯囔囗囝囡囵囫囹囿圄圊圉圜帏帙帔帑帱帻帼"], -["e140","酅酇酈酑酓酔酕酖酘酙酛酜酟酠酦酧酨酫酭酳酺酻酼醀",4,"醆醈醊醎醏醓",6,"醜",5,"醤",5,"醫醬醰醱醲醳醶醷醸醹醻"], -["e180","醼",10,"釈釋釐釒",9,"針",8,"帷幄幔幛幞幡岌屺岍岐岖岈岘岙岑岚岜岵岢岽岬岫岱岣峁岷峄峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯嵝嵫嵋嵊嵩嵴嶂嶙嶝豳嶷巅彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃狁狎狍狒狨狯狩狲狴狷猁狳猃狺"], -["e240","釦",62], -["e280","鈥",32,"狻猗猓猡猊猞猝猕猢猹猥猬猸猱獐獍獗獠獬獯獾舛夥飧夤夂饣饧",5,"饴饷饽馀馄馇馊馍馐馑馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖忏怃忮怄忡忤忾怅怆忪忭忸怙怵怦怛怏怍怩怫怊怿怡恸恹恻恺恂"], -["e340","鉆",45,"鉵",16], -["e380","銆",7,"銏",24,"恪恽悖悚悭悝悃悒悌悛惬悻悱惝惘惆惚悴愠愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵忝隳闩闫闱闳闵闶闼闾阃阄阆阈阊阋阌阍阏阒阕阖阗阙阚丬爿戕氵汔汜汊沣沅沐沔沌汨汩汴汶沆沩泐泔沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾"], -["e440","銨",5,"銯",24,"鋉",31], -["e480","鋩",32,"洹洧洌浃浈洇洄洙洎洫浍洮洵洚浏浒浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦淝淙渖涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴滏溏滂溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉澍澌潸潲潼潺濑"], -["e540","錊",51,"錿",10], -["e580","鍊",31,"鍫濉澧澹澶濂濡濮濞濠濯瀚瀣瀛瀹瀵灏灞宀宄宕宓宥宸甯骞搴寤寮褰寰蹇謇辶迓迕迥迮迤迩迦迳迨逅逄逋逦逑逍逖逡逵逶逭逯遄遑遒遐遨遘遢遛暹遴遽邂邈邃邋彐彗彖彘尻咫屐屙孱屣屦羼弪弩弭艴弼鬻屮妁妃妍妩妪妣"], -["e640","鍬",34,"鎐",27], -["e680","鎬",29,"鏋鏌鏍妗姊妫妞妤姒妲妯姗妾娅娆姝娈姣姘姹娌娉娲娴娑娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀骁骅骈骊骐骒骓骖骘骛骜骝骟骠骢骣骥骧纟纡纣纥纨纩"], -["e740","鏎",7,"鏗",54], -["e780","鐎",32,"纭纰纾绀绁绂绉绋绌绐绔绗绛绠绡绨绫绮绯绱绲缍绶绺绻绾缁缂缃缇缈缋缌缏缑缒缗缙缜缛缟缡",6,"缪缫缬缭缯",4,"缵幺畿巛甾邕玎玑玮玢玟珏珂珑玷玳珀珉珈珥珙顼琊珩珧珞玺珲琏琪瑛琦琥琨琰琮琬"], -["e840","鐯",14,"鐿",43,"鑬鑭鑮鑯"], -["e880","鑰",20,"钑钖钘铇铏铓铔铚铦铻锜锠琛琚瑁瑜瑗瑕瑙瑷瑭瑾璜璎璀璁璇璋璞璨璩璐璧瓒璺韪韫韬杌杓杞杈杩枥枇杪杳枘枧杵枨枞枭枋杷杼柰栉柘栊柩枰栌柙枵柚枳柝栀柃枸柢栎柁柽栲栳桠桡桎桢桄桤梃栝桕桦桁桧桀栾桊桉栩梵梏桴桷梓桫棂楮棼椟椠棹"], -["e940","锧锳锽镃镈镋镕镚镠镮镴镵長",7,"門",42], -["e980","閫",32,"椤棰椋椁楗棣椐楱椹楠楂楝榄楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱槁槊槟榕槠榍槿樯槭樗樘橥槲橄樾檠橐橛樵檎橹樽樨橘橼檑檐檩檗檫猷獒殁殂殇殄殒殓殍殚殛殡殪轫轭轱轲轳轵轶轸轷轹轺轼轾辁辂辄辇辋"], -["ea40","闌",27,"闬闿阇阓阘阛阞阠阣",6,"阫阬阭阯阰阷阸阹阺阾陁陃陊陎陏陑陒陓陖陗"], -["ea80","陘陙陚陜陝陞陠陣陥陦陫陭",4,"陳陸",12,"隇隉隊辍辎辏辘辚軎戋戗戛戟戢戡戥戤戬臧瓯瓴瓿甏甑甓攴旮旯旰昊昙杲昃昕昀炅曷昝昴昱昶昵耆晟晔晁晏晖晡晗晷暄暌暧暝暾曛曜曦曩贲贳贶贻贽赀赅赆赈赉赇赍赕赙觇觊觋觌觎觏觐觑牮犟牝牦牯牾牿犄犋犍犏犒挈挲掰"], -["eb40","隌階隑隒隓隕隖隚際隝",9,"隨",7,"隱隲隴隵隷隸隺隻隿雂雃雈雊雋雐雑雓雔雖",9,"雡",6,"雫"], -["eb80","雬雭雮雰雱雲雴雵雸雺電雼雽雿霂霃霅霊霋霌霐霑霒霔霕霗",4,"霝霟霠搿擘耄毪毳毽毵毹氅氇氆氍氕氘氙氚氡氩氤氪氲攵敕敫牍牒牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙胍胗朐胝胫胱胴胭脍脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧塍媵膈膂膑滕膣膪臌朦臊膻"], -["ec40","霡",8,"霫霬霮霯霱霳",4,"霺霻霼霽霿",18,"靔靕靗靘靚靜靝靟靣靤靦靧靨靪",7], -["ec80","靲靵靷",4,"靽",7,"鞆",4,"鞌鞎鞏鞐鞓鞕鞖鞗鞙",4,"臁膦欤欷欹歃歆歙飑飒飓飕飙飚殳彀毂觳斐齑斓於旆旄旃旌旎旒旖炀炜炖炝炻烀炷炫炱烨烊焐焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹爝爨灬焘煦熹戾戽扃扈扉礻祀祆祉祛祜祓祚祢祗祠祯祧祺禅禊禚禧禳忑忐"], -["ed40","鞞鞟鞡鞢鞤",6,"鞬鞮鞰鞱鞳鞵",46], -["ed80","韤韥韨韮",4,"韴韷",23,"怼恝恚恧恁恙恣悫愆愍慝憩憝懋懑戆肀聿沓泶淼矶矸砀砉砗砘砑斫砭砜砝砹砺砻砟砼砥砬砣砩硎硭硖硗砦硐硇硌硪碛碓碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄眍盹眇眈眚眢眙眭眦眵眸睐睑睇睃睚睨"], -["ee40","頏",62], -["ee80","顎",32,"睢睥睿瞍睽瞀瞌瞑瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹羁罾盍盥蠲钅钆钇钋钊钌钍钏钐钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶",4,"钼钽钿铄铈",6,"铐铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪"], -["ef40","顯",5,"颋颎颒颕颙颣風",37,"飏飐飔飖飗飛飜飝飠",4], -["ef80","飥飦飩",30,"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊锍锎锏锒",4,"锘锛锝锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎镏镒镓镔镖镗镘镙镛镞镟镝镡镢镤",8,"镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔"], -["f040","餈",4,"餎餏餑",28,"餯",26], -["f080","饊",9,"饖",12,"饤饦饳饸饹饻饾馂馃馉稹稷穑黏馥穰皈皎皓皙皤瓞瓠甬鸠鸢鸨",4,"鸲鸱鸶鸸鸷鸹鸺鸾鹁鹂鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦",6,"鹱鹭鹳疒疔疖疠疝疬疣疳疴疸痄疱疰痃痂痖痍痣痨痦痤痫痧瘃痱痼痿瘐瘀瘅瘌瘗瘊瘥瘘瘕瘙"], -["f140","馌馎馚",10,"馦馧馩",47], -["f180","駙",32,"瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳癍癞癔癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶襁襦襻疋胥皲皴矜耒耔耖耜耠耢耥耦耧耩耨耱耋耵聃聆聍聒聩聱覃顸颀颃"], -["f240","駺",62], -["f280","騹",32,"颉颌颍颏颔颚颛颞颟颡颢颥颦虍虔虬虮虿虺虼虻蚨蚍蚋蚬蚝蚧蚣蚪蚓蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉蛏蚴蛩蛱蛲蛭蛳蛐蜓蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊蜍蜉蜣蜻蜞蜥蜮蜚蜾蝈蜴蜱蜩蜷蜿螂蜢蝽蝾蝻蝠蝰蝌蝮螋蝓蝣蝼蝤蝙蝥螓螯螨蟒"], -["f340","驚",17,"驲骃骉骍骎骔骕骙骦骩",6,"骲骳骴骵骹骻骽骾骿髃髄髆",4,"髍髎髏髐髒體髕髖髗髙髚髛髜"], -["f380","髝髞髠髢髣髤髥髧髨髩髪髬髮髰",8,"髺髼",6,"鬄鬅鬆蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅舐竺竽笈笃笄笕笊笫笏筇笸笪笙笮笱笠笥笤笳笾笞筘筚筅筵筌筝筠筮筻筢筲筱箐箦箧箸箬箝箨箅箪箜箢箫箴篑篁篌篝篚篥篦篪簌篾篼簏簖簋"], -["f440","鬇鬉",5,"鬐鬑鬒鬔",10,"鬠鬡鬢鬤",10,"鬰鬱鬳",7,"鬽鬾鬿魀魆魊魋魌魎魐魒魓魕",5], -["f480","魛",32,"簟簪簦簸籁籀臾舁舂舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋艏艚艟艨衾袅袈裘裟襞羝羟羧羯羰羲籼敉粑粝粜粞粢粲粼粽糁糇糌糍糈糅糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊酐酎酏酤"], -["f540","魼",62], -["f580","鮻",32,"酢酡酰酩酯酽酾酲酴酹醌醅醐醍醑醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎跏跛跆跬跷跸跣跹跻跤踉跽踔踝踟踬踮踣踯踺蹀踹踵踽踱蹉蹁蹂蹑蹒蹊蹰蹶蹼蹯蹴躅躏躔躐躜躞豸貂貊貅貘貔斛觖觞觚觜"], -["f640","鯜",62], -["f680","鰛",32,"觥觫觯訾謦靓雩雳雯霆霁霈霏霎霪霭霰霾龀龃龅",5,"龌黾鼋鼍隹隼隽雎雒瞿雠銎銮鋈錾鍪鏊鎏鐾鑫鱿鲂鲅鲆鲇鲈稣鲋鲎鲐鲑鲒鲔鲕鲚鲛鲞",5,"鲥",4,"鲫鲭鲮鲰",7,"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋"], -["f740","鰼",62], -["f780","鱻鱽鱾鲀鲃鲄鲉鲊鲌鲏鲓鲖鲗鲘鲙鲝鲪鲬鲯鲹鲾",4,"鳈鳉鳑鳒鳚鳛鳠鳡鳌",4,"鳓鳔鳕鳗鳘鳙鳜鳝鳟鳢靼鞅鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼髁髀髅髂髋髌髑魅魃魇魉魈魍魑飨餍餮饕饔髟髡髦髯髫髻髭髹鬈鬏鬓鬟鬣麽麾縻麂麇麈麋麒鏖麝麟黛黜黝黠黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄"], -["f840","鳣",62], -["f880","鴢",32], -["f940","鵃",62], -["f980","鶂",32], -["fa40","鶣",62], -["fa80","鷢",32], -["fb40","鸃",27,"鸤鸧鸮鸰鸴鸻鸼鹀鹍鹐鹒鹓鹔鹖鹙鹝鹟鹠鹡鹢鹥鹮鹯鹲鹴",9,"麀"], -["fb80","麁麃麄麅麆麉麊麌",5,"麔",8,"麞麠",5,"麧麨麩麪"], -["fc40","麫",8,"麵麶麷麹麺麼麿",4,"黅黆黇黈黊黋黌黐黒黓黕黖黗黙黚點黡黣黤黦黨黫黬黭黮黰",8,"黺黽黿",6], -["fc80","鼆",4,"鼌鼏鼑鼒鼔鼕鼖鼘鼚",5,"鼡鼣",8,"鼭鼮鼰鼱"], -["fd40","鼲",4,"鼸鼺鼼鼿",4,"齅",10,"齒",38], -["fd80","齹",5,"龁龂龍",11,"龜龝龞龡",4,"郎凉秊裏隣"], -["fe40","兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩"] -] diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/tables/cp949.json b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/tables/cp949.json deleted file mode 100644 index 2022a00..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/tables/cp949.json +++ /dev/null @@ -1,273 +0,0 @@ -[ -["0","\u0000",127], -["8141","갂갃갅갆갋",4,"갘갞갟갡갢갣갥",6,"갮갲갳갴"], -["8161","갵갶갷갺갻갽갾갿걁",9,"걌걎",5,"걕"], -["8181","걖걗걙걚걛걝",18,"걲걳걵걶걹걻",4,"겂겇겈겍겎겏겑겒겓겕",6,"겞겢",5,"겫겭겮겱",6,"겺겾겿곀곂곃곅곆곇곉곊곋곍",7,"곖곘",7,"곢곣곥곦곩곫곭곮곲곴곷",4,"곾곿괁괂괃괅괇",4,"괎괐괒괓"], -["8241","괔괕괖괗괙괚괛괝괞괟괡",7,"괪괫괮",5], -["8261","괶괷괹괺괻괽",6,"굆굈굊",5,"굑굒굓굕굖굗"], -["8281","굙",7,"굢굤",7,"굮굯굱굲굷굸굹굺굾궀궃",4,"궊궋궍궎궏궑",10,"궞",5,"궥",17,"궸",7,"귂귃귅귆귇귉",6,"귒귔",7,"귝귞귟귡귢귣귥",18], -["8341","귺귻귽귾긂",5,"긊긌긎",5,"긕",7], -["8361","긝",18,"긲긳긵긶긹긻긼"], -["8381","긽긾긿깂깄깇깈깉깋깏깑깒깓깕깗",4,"깞깢깣깤깦깧깪깫깭깮깯깱",6,"깺깾",5,"꺆",5,"꺍",46,"꺿껁껂껃껅",6,"껎껒",5,"껚껛껝",8], -["8441","껦껧껩껪껬껮",5,"껵껶껷껹껺껻껽",8], -["8461","꼆꼉꼊꼋꼌꼎꼏꼑",18], -["8481","꼤",7,"꼮꼯꼱꼳꼵",6,"꼾꽀꽄꽅꽆꽇꽊",5,"꽑",10,"꽞",5,"꽦",18,"꽺",5,"꾁꾂꾃꾅꾆꾇꾉",6,"꾒꾓꾔꾖",5,"꾝",26,"꾺꾻꾽꾾"], -["8541","꾿꿁",5,"꿊꿌꿏",4,"꿕",6,"꿝",4], -["8561","꿢",5,"꿪",5,"꿲꿳꿵꿶꿷꿹",6,"뀂뀃"], -["8581","뀅",6,"뀍뀎뀏뀑뀒뀓뀕",6,"뀞",9,"뀩",26,"끆끇끉끋끍끏끐끑끒끖끘끚끛끜끞",29,"끾끿낁낂낃낅",6,"낎낐낒",5,"낛낝낞낣낤"], -["8641","낥낦낧낪낰낲낶낷낹낺낻낽",6,"냆냊",5,"냒"], -["8661","냓냕냖냗냙",6,"냡냢냣냤냦",10], -["8681","냱",22,"넊넍넎넏넑넔넕넖넗넚넞",4,"넦넧넩넪넫넭",6,"넶넺",5,"녂녃녅녆녇녉",6,"녒녓녖녗녙녚녛녝녞녟녡",22,"녺녻녽녾녿놁놃",4,"놊놌놎놏놐놑놕놖놗놙놚놛놝"], -["8741","놞",9,"놩",15], -["8761","놹",18,"뇍뇎뇏뇑뇒뇓뇕"], -["8781","뇖",5,"뇞뇠",7,"뇪뇫뇭뇮뇯뇱",7,"뇺뇼뇾",5,"눆눇눉눊눍",6,"눖눘눚",5,"눡",18,"눵",6,"눽",26,"뉙뉚뉛뉝뉞뉟뉡",6,"뉪",4], -["8841","뉯",4,"뉶",5,"뉽",6,"늆늇늈늊",4], -["8861","늏늒늓늕늖늗늛",4,"늢늤늧늨늩늫늭늮늯늱늲늳늵늶늷"], -["8881","늸",15,"닊닋닍닎닏닑닓",4,"닚닜닞닟닠닡닣닧닩닪닰닱닲닶닼닽닾댂댃댅댆댇댉",6,"댒댖",5,"댝",54,"덗덙덚덝덠덡덢덣"], -["8941","덦덨덪덬덭덯덲덳덵덶덷덹",6,"뎂뎆",5,"뎍"], -["8961","뎎뎏뎑뎒뎓뎕",10,"뎢",5,"뎩뎪뎫뎭"], -["8981","뎮",21,"돆돇돉돊돍돏돑돒돓돖돘돚돜돞돟돡돢돣돥돦돧돩",18,"돽",18,"됑",6,"됙됚됛됝됞됟됡",6,"됪됬",7,"됵",15], -["8a41","둅",10,"둒둓둕둖둗둙",6,"둢둤둦"], -["8a61","둧",4,"둭",18,"뒁뒂"], -["8a81","뒃",4,"뒉",19,"뒞",5,"뒥뒦뒧뒩뒪뒫뒭",7,"뒶뒸뒺",5,"듁듂듃듅듆듇듉",6,"듑듒듓듔듖",5,"듞듟듡듢듥듧",4,"듮듰듲",5,"듹",26,"딖딗딙딚딝"], -["8b41","딞",5,"딦딫",4,"딲딳딵딶딷딹",6,"땂땆"], -["8b61","땇땈땉땊땎땏땑땒땓땕",6,"땞땢",8], -["8b81","땫",52,"떢떣떥떦떧떩떬떭떮떯떲떶",4,"떾떿뗁뗂뗃뗅",6,"뗎뗒",5,"뗙",18,"뗭",18], -["8c41","똀",15,"똒똓똕똖똗똙",4], -["8c61","똞",6,"똦",5,"똭",6,"똵",5], -["8c81","똻",12,"뙉",26,"뙥뙦뙧뙩",50,"뚞뚟뚡뚢뚣뚥",5,"뚭뚮뚯뚰뚲",16], -["8d41","뛃",16,"뛕",8], -["8d61","뛞",17,"뛱뛲뛳뛵뛶뛷뛹뛺"], -["8d81","뛻",4,"뜂뜃뜄뜆",33,"뜪뜫뜭뜮뜱",6,"뜺뜼",7,"띅띆띇띉띊띋띍",6,"띖",9,"띡띢띣띥띦띧띩",6,"띲띴띶",5,"띾띿랁랂랃랅",6,"랎랓랔랕랚랛랝랞"], -["8e41","랟랡",6,"랪랮",5,"랶랷랹",8], -["8e61","럂",4,"럈럊",19], -["8e81","럞",13,"럮럯럱럲럳럵",6,"럾렂",4,"렊렋렍렎렏렑",6,"렚렜렞",5,"렦렧렩렪렫렭",6,"렶렺",5,"롁롂롃롅",11,"롒롔",7,"롞롟롡롢롣롥",6,"롮롰롲",5,"롹롺롻롽",7], -["8f41","뢅",7,"뢎",17], -["8f61","뢠",7,"뢩",6,"뢱뢲뢳뢵뢶뢷뢹",4], -["8f81","뢾뢿룂룄룆",5,"룍룎룏룑룒룓룕",7,"룞룠룢",5,"룪룫룭룮룯룱",6,"룺룼룾",5,"뤅",18,"뤙",6,"뤡",26,"뤾뤿륁륂륃륅",6,"륍륎륐륒",5], -["9041","륚륛륝륞륟륡",6,"륪륬륮",5,"륶륷륹륺륻륽"], -["9061","륾",5,"릆릈릋릌릏",15], -["9081","릟",12,"릮릯릱릲릳릵",6,"릾맀맂",5,"맊맋맍맓",4,"맚맜맟맠맢맦맧맩맪맫맭",6,"맶맻",4,"먂",5,"먉",11,"먖",33,"먺먻먽먾먿멁멃멄멅멆"], -["9141","멇멊멌멏멐멑멒멖멗멙멚멛멝",6,"멦멪",5], -["9161","멲멳멵멶멷멹",9,"몆몈몉몊몋몍",5], -["9181","몓",20,"몪몭몮몯몱몳",4,"몺몼몾",5,"뫅뫆뫇뫉",14,"뫚",33,"뫽뫾뫿묁묂묃묅",7,"묎묐묒",5,"묙묚묛묝묞묟묡",6], -["9241","묨묪묬",7,"묷묹묺묿",4,"뭆뭈뭊뭋뭌뭎뭑뭒"], -["9261","뭓뭕뭖뭗뭙",7,"뭢뭤",7,"뭭",4], -["9281","뭲",21,"뮉뮊뮋뮍뮎뮏뮑",18,"뮥뮦뮧뮩뮪뮫뮭",6,"뮵뮶뮸",7,"믁믂믃믅믆믇믉",6,"믑믒믔",35,"믺믻믽믾밁"], -["9341","밃",4,"밊밎밐밒밓밙밚밠밡밢밣밦밨밪밫밬밮밯밲밳밵"], -["9361","밶밷밹",6,"뱂뱆뱇뱈뱊뱋뱎뱏뱑",8], -["9381","뱚뱛뱜뱞",37,"벆벇벉벊벍벏",4,"벖벘벛",4,"벢벣벥벦벩",6,"벲벶",5,"벾벿볁볂볃볅",7,"볎볒볓볔볖볗볙볚볛볝",22,"볷볹볺볻볽"], -["9441","볾",5,"봆봈봊",5,"봑봒봓봕",8], -["9461","봞",5,"봥",6,"봭",12], -["9481","봺",5,"뵁",6,"뵊뵋뵍뵎뵏뵑",6,"뵚",9,"뵥뵦뵧뵩",22,"붂붃붅붆붋",4,"붒붔붖붗붘붛붝",6,"붥",10,"붱",6,"붹",24], -["9541","뷒뷓뷖뷗뷙뷚뷛뷝",11,"뷪",5,"뷱"], -["9561","뷲뷳뷵뷶뷷뷹",6,"븁븂븄븆",5,"븎븏븑븒븓"], -["9581","븕",6,"븞븠",35,"빆빇빉빊빋빍빏",4,"빖빘빜빝빞빟빢빣빥빦빧빩빫",4,"빲빶",4,"빾빿뺁뺂뺃뺅",6,"뺎뺒",5,"뺚",13,"뺩",14], -["9641","뺸",23,"뻒뻓"], -["9661","뻕뻖뻙",6,"뻡뻢뻦",5,"뻭",8], -["9681","뻶",10,"뼂",5,"뼊",13,"뼚뼞",33,"뽂뽃뽅뽆뽇뽉",6,"뽒뽓뽔뽖",44], -["9741","뾃",16,"뾕",8], -["9761","뾞",17,"뾱",7], -["9781","뾹",11,"뿆",5,"뿎뿏뿑뿒뿓뿕",6,"뿝뿞뿠뿢",89,"쀽쀾쀿"], -["9841","쁀",16,"쁒",5,"쁙쁚쁛"], -["9861","쁝쁞쁟쁡",6,"쁪",15], -["9881","쁺",21,"삒삓삕삖삗삙",6,"삢삤삦",5,"삮삱삲삷",4,"삾샂샃샄샆샇샊샋샍샎샏샑",6,"샚샞",5,"샦샧샩샪샫샭",6,"샶샸샺",5,"섁섂섃섅섆섇섉",6,"섑섒섓섔섖",5,"섡섢섥섨섩섪섫섮"], -["9941","섲섳섴섵섷섺섻섽섾섿셁",6,"셊셎",5,"셖셗"], -["9961","셙셚셛셝",6,"셦셪",5,"셱셲셳셵셶셷셹셺셻"], -["9981","셼",8,"솆",5,"솏솑솒솓솕솗",4,"솞솠솢솣솤솦솧솪솫솭솮솯솱",11,"솾",5,"쇅쇆쇇쇉쇊쇋쇍",6,"쇕쇖쇙",6,"쇡쇢쇣쇥쇦쇧쇩",6,"쇲쇴",7,"쇾쇿숁숂숃숅",6,"숎숐숒",5,"숚숛숝숞숡숢숣"], -["9a41","숤숥숦숧숪숬숮숰숳숵",16], -["9a61","쉆쉇쉉",6,"쉒쉓쉕쉖쉗쉙",6,"쉡쉢쉣쉤쉦"], -["9a81","쉧",4,"쉮쉯쉱쉲쉳쉵",6,"쉾슀슂",5,"슊",5,"슑",6,"슙슚슜슞",5,"슦슧슩슪슫슮",5,"슶슸슺",33,"싞싟싡싢싥",5,"싮싰싲싳싴싵싷싺싽싾싿쌁",6,"쌊쌋쌎쌏"], -["9b41","쌐쌑쌒쌖쌗쌙쌚쌛쌝",6,"쌦쌧쌪",8], -["9b61","쌳",17,"썆",7], -["9b81","썎",25,"썪썫썭썮썯썱썳",4,"썺썻썾",5,"쎅쎆쎇쎉쎊쎋쎍",50,"쏁",22,"쏚"], -["9c41","쏛쏝쏞쏡쏣",4,"쏪쏫쏬쏮",5,"쏶쏷쏹",5], -["9c61","쏿",8,"쐉",6,"쐑",9], -["9c81","쐛",8,"쐥",6,"쐭쐮쐯쐱쐲쐳쐵",6,"쐾",9,"쑉",26,"쑦쑧쑩쑪쑫쑭",6,"쑶쑷쑸쑺",5,"쒁",18,"쒕",6,"쒝",12], -["9d41","쒪",13,"쒹쒺쒻쒽",8], -["9d61","쓆",25], -["9d81","쓠",8,"쓪",5,"쓲쓳쓵쓶쓷쓹쓻쓼쓽쓾씂",9,"씍씎씏씑씒씓씕",6,"씝",10,"씪씫씭씮씯씱",6,"씺씼씾",5,"앆앇앋앏앐앑앒앖앚앛앜앟앢앣앥앦앧앩",6,"앲앶",5,"앾앿얁얂얃얅얆얈얉얊얋얎얐얒얓얔"], -["9e41","얖얙얚얛얝얞얟얡",7,"얪",9,"얶"], -["9e61","얷얺얿",4,"엋엍엏엒엓엕엖엗엙",6,"엢엤엦엧"], -["9e81","엨엩엪엫엯엱엲엳엵엸엹엺엻옂옃옄옉옊옋옍옎옏옑",6,"옚옝",6,"옦옧옩옪옫옯옱옲옶옸옺옼옽옾옿왂왃왅왆왇왉",6,"왒왖",5,"왞왟왡",10,"왭왮왰왲",5,"왺왻왽왾왿욁",6,"욊욌욎",5,"욖욗욙욚욛욝",6,"욦"], -["9f41","욨욪",5,"욲욳욵욶욷욻",4,"웂웄웆",5,"웎"], -["9f61","웏웑웒웓웕",6,"웞웟웢",5,"웪웫웭웮웯웱웲"], -["9f81","웳",4,"웺웻웼웾",5,"윆윇윉윊윋윍",6,"윖윘윚",5,"윢윣윥윦윧윩",6,"윲윴윶윸윹윺윻윾윿읁읂읃읅",4,"읋읎읐읙읚읛읝읞읟읡",6,"읩읪읬",7,"읶읷읹읺읻읿잀잁잂잆잋잌잍잏잒잓잕잙잛",4,"잢잧",4,"잮잯잱잲잳잵잶잷"], -["a041","잸잹잺잻잾쟂",5,"쟊쟋쟍쟏쟑",6,"쟙쟚쟛쟜"], -["a061","쟞",5,"쟥쟦쟧쟩쟪쟫쟭",13], -["a081","쟻",4,"젂젃젅젆젇젉젋",4,"젒젔젗",4,"젞젟젡젢젣젥",6,"젮젰젲",5,"젹젺젻젽젾젿졁",6,"졊졋졎",5,"졕",26,"졲졳졵졶졷졹졻",4,"좂좄좈좉좊좎",5,"좕",7,"좞좠좢좣좤"], -["a141","좥좦좧좩",18,"좾좿죀죁"], -["a161","죂죃죅죆죇죉죊죋죍",6,"죖죘죚",5,"죢죣죥"], -["a181","죦",14,"죶",5,"죾죿줁줂줃줇",4,"줎 、。·‥…¨〃­―∥\∼‘’“”〔〕〈",9,"±×÷≠≤≥∞∴°′″℃Å¢£¥♂♀∠⊥⌒∂∇≡≒§※☆★○●◎◇◆□■△▲▽▼→←↑↓↔〓≪≫√∽∝∵∫∬∈∋⊆⊇⊂⊃∪∩∧∨¬"], -["a241","줐줒",5,"줙",18], -["a261","줭",6,"줵",18], -["a281","쥈",7,"쥒쥓쥕쥖쥗쥙",6,"쥢쥤",7,"쥭쥮쥯⇒⇔∀∃´~ˇ˘˝˚˙¸˛¡¿ː∮∑∏¤℉‰◁◀▷▶♤♠♡♥♧♣⊙◈▣◐◑▒▤▥▨▧▦▩♨☏☎☜☞¶†‡↕↗↙↖↘♭♩♪♬㉿㈜№㏇™㏂㏘℡€®"], -["a341","쥱쥲쥳쥵",6,"쥽",10,"즊즋즍즎즏"], -["a361","즑",6,"즚즜즞",16], -["a381","즯",16,"짂짃짅짆짉짋",4,"짒짔짗짘짛!",58,"₩]",32," ̄"], -["a441","짞짟짡짣짥짦짨짩짪짫짮짲",5,"짺짻짽짾짿쨁쨂쨃쨄"], -["a461","쨅쨆쨇쨊쨎",5,"쨕쨖쨗쨙",12], -["a481","쨦쨧쨨쨪",28,"ㄱ",93], -["a541","쩇",4,"쩎쩏쩑쩒쩓쩕",6,"쩞쩢",5,"쩩쩪"], -["a561","쩫",17,"쩾",5,"쪅쪆"], -["a581","쪇",16,"쪙",14,"ⅰ",9], -["a5b0","Ⅰ",9], -["a5c1","Α",16,"Σ",6], -["a5e1","α",16,"σ",6], -["a641","쪨",19,"쪾쪿쫁쫂쫃쫅"], -["a661","쫆",5,"쫎쫐쫒쫔쫕쫖쫗쫚",5,"쫡",6], -["a681","쫨쫩쫪쫫쫭",6,"쫵",18,"쬉쬊─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂┒┑┚┙┖┕┎┍┞┟┡┢┦┧┩┪┭┮┱┲┵┶┹┺┽┾╀╁╃",7], -["a741","쬋",4,"쬑쬒쬓쬕쬖쬗쬙",6,"쬢",7], -["a761","쬪",22,"쭂쭃쭄"], -["a781","쭅쭆쭇쭊쭋쭍쭎쭏쭑",6,"쭚쭛쭜쭞",5,"쭥",7,"㎕㎖㎗ℓ㎘㏄㎣㎤㎥㎦㎙",9,"㏊㎍㎎㎏㏏㎈㎉㏈㎧㎨㎰",9,"㎀",4,"㎺",5,"㎐",4,"Ω㏀㏁㎊㎋㎌㏖㏅㎭㎮㎯㏛㎩㎪㎫㎬㏝㏐㏓㏃㏉㏜㏆"], -["a841","쭭",10,"쭺",14], -["a861","쮉",18,"쮝",6], -["a881","쮤",19,"쮹",11,"ÆÐªĦ"], -["a8a6","IJ"], -["a8a8","ĿŁØŒºÞŦŊ"], -["a8b1","㉠",27,"ⓐ",25,"①",14,"½⅓⅔¼¾⅛⅜⅝⅞"], -["a941","쯅",14,"쯕",10], -["a961","쯠쯡쯢쯣쯥쯦쯨쯪",18], -["a981","쯽",14,"찎찏찑찒찓찕",6,"찞찟찠찣찤æđðħıijĸŀłøœßþŧŋʼn㈀",27,"⒜",25,"⑴",14,"¹²³⁴ⁿ₁₂₃₄"], -["aa41","찥찦찪찫찭찯찱",6,"찺찿",4,"챆챇챉챊챋챍챎"], -["aa61","챏",4,"챖챚",5,"챡챢챣챥챧챩",6,"챱챲"], -["aa81","챳챴챶",29,"ぁ",82], -["ab41","첔첕첖첗첚첛첝첞첟첡",6,"첪첮",5,"첶첷첹"], -["ab61","첺첻첽",6,"쳆쳈쳊",5,"쳑쳒쳓쳕",5], -["ab81","쳛",8,"쳥",6,"쳭쳮쳯쳱",12,"ァ",85], -["ac41","쳾쳿촀촂",5,"촊촋촍촎촏촑",6,"촚촜촞촟촠"], -["ac61","촡촢촣촥촦촧촩촪촫촭",11,"촺",4], -["ac81","촿",28,"쵝쵞쵟А",5,"ЁЖ",25], -["acd1","а",5,"ёж",25], -["ad41","쵡쵢쵣쵥",6,"쵮쵰쵲",5,"쵹",7], -["ad61","춁",6,"춉",10,"춖춗춙춚춛춝춞춟"], -["ad81","춠춡춢춣춦춨춪",5,"춱",18,"췅"], -["ae41","췆",5,"췍췎췏췑",16], -["ae61","췢",5,"췩췪췫췭췮췯췱",6,"췺췼췾",4], -["ae81","츃츅츆츇츉츊츋츍",6,"츕츖츗츘츚",5,"츢츣츥츦츧츩츪츫"], -["af41","츬츭츮츯츲츴츶",19], -["af61","칊",13,"칚칛칝칞칢",5,"칪칬"], -["af81","칮",5,"칶칷칹칺칻칽",6,"캆캈캊",5,"캒캓캕캖캗캙"], -["b041","캚",5,"캢캦",5,"캮",12], -["b061","캻",5,"컂",19], -["b081","컖",13,"컦컧컩컪컭",6,"컶컺",5,"가각간갇갈갉갊감",7,"같",4,"갠갤갬갭갯갰갱갸갹갼걀걋걍걔걘걜거걱건걷걸걺검겁것겄겅겆겉겊겋게겐겔겜겝겟겠겡겨격겪견겯결겸겹겻겼경곁계곈곌곕곗고곡곤곧골곪곬곯곰곱곳공곶과곽관괄괆"], -["b141","켂켃켅켆켇켉",6,"켒켔켖",5,"켝켞켟켡켢켣"], -["b161","켥",6,"켮켲",5,"켹",11], -["b181","콅",14,"콖콗콙콚콛콝",6,"콦콨콪콫콬괌괍괏광괘괜괠괩괬괭괴괵괸괼굄굅굇굉교굔굘굡굣구국군굳굴굵굶굻굼굽굿궁궂궈궉권궐궜궝궤궷귀귁귄귈귐귑귓규균귤그극근귿글긁금급긋긍긔기긱긴긷길긺김깁깃깅깆깊까깍깎깐깔깖깜깝깟깠깡깥깨깩깬깰깸"], -["b241","콭콮콯콲콳콵콶콷콹",6,"쾁쾂쾃쾄쾆",5,"쾍"], -["b261","쾎",18,"쾢",5,"쾩"], -["b281","쾪",5,"쾱",18,"쿅",6,"깹깻깼깽꺄꺅꺌꺼꺽꺾껀껄껌껍껏껐껑께껙껜껨껫껭껴껸껼꼇꼈꼍꼐꼬꼭꼰꼲꼴꼼꼽꼿꽁꽂꽃꽈꽉꽐꽜꽝꽤꽥꽹꾀꾄꾈꾐꾑꾕꾜꾸꾹꾼꿀꿇꿈꿉꿋꿍꿎꿔꿜꿨꿩꿰꿱꿴꿸뀀뀁뀄뀌뀐뀔뀜뀝뀨끄끅끈끊끌끎끓끔끕끗끙"], -["b341","쿌",19,"쿢쿣쿥쿦쿧쿩"], -["b361","쿪",5,"쿲쿴쿶",5,"쿽쿾쿿퀁퀂퀃퀅",5], -["b381","퀋",5,"퀒",5,"퀙",19,"끝끼끽낀낄낌낍낏낑나낙낚난낟날낡낢남납낫",4,"낱낳내낵낸낼냄냅냇냈냉냐냑냔냘냠냥너넉넋넌널넒넓넘넙넛넜넝넣네넥넨넬넴넵넷넸넹녀녁년녈념녑녔녕녘녜녠노녹논놀놂놈놉놋농높놓놔놘놜놨뇌뇐뇔뇜뇝"], -["b441","퀮",5,"퀶퀷퀹퀺퀻퀽",6,"큆큈큊",5], -["b461","큑큒큓큕큖큗큙",6,"큡",10,"큮큯"], -["b481","큱큲큳큵",6,"큾큿킀킂",18,"뇟뇨뇩뇬뇰뇹뇻뇽누눅눈눋눌눔눕눗눙눠눴눼뉘뉜뉠뉨뉩뉴뉵뉼늄늅늉느늑는늘늙늚늠늡늣능늦늪늬늰늴니닉닌닐닒님닙닛닝닢다닥닦단닫",4,"닳담답닷",4,"닿대댁댄댈댐댑댓댔댕댜더덕덖던덛덜덞덟덤덥"], -["b541","킕",14,"킦킧킩킪킫킭",5], -["b561","킳킶킸킺",5,"탂탃탅탆탇탊",5,"탒탖",4], -["b581","탛탞탟탡탢탣탥",6,"탮탲",5,"탹",11,"덧덩덫덮데덱덴델뎀뎁뎃뎄뎅뎌뎐뎔뎠뎡뎨뎬도독돈돋돌돎돐돔돕돗동돛돝돠돤돨돼됐되된될됨됩됫됴두둑둔둘둠둡둣둥둬뒀뒈뒝뒤뒨뒬뒵뒷뒹듀듄듈듐듕드득든듣들듦듬듭듯등듸디딕딘딛딜딤딥딧딨딩딪따딱딴딸"], -["b641","턅",7,"턎",17], -["b661","턠",15,"턲턳턵턶턷턹턻턼턽턾"], -["b681","턿텂텆",5,"텎텏텑텒텓텕",6,"텞텠텢",5,"텩텪텫텭땀땁땃땄땅땋때땍땐땔땜땝땟땠땡떠떡떤떨떪떫떰떱떳떴떵떻떼떽뗀뗄뗌뗍뗏뗐뗑뗘뗬또똑똔똘똥똬똴뙈뙤뙨뚜뚝뚠뚤뚫뚬뚱뛔뛰뛴뛸뜀뜁뜅뜨뜩뜬뜯뜰뜸뜹뜻띄띈띌띔띕띠띤띨띰띱띳띵라락란랄람랍랏랐랑랒랖랗"], -["b741","텮",13,"텽",6,"톅톆톇톉톊"], -["b761","톋",20,"톢톣톥톦톧"], -["b781","톩",6,"톲톴톶톷톸톹톻톽톾톿퇁",14,"래랙랜랠램랩랫랬랭랴략랸럇량러럭런럴럼럽럿렀렁렇레렉렌렐렘렙렛렝려력련렬렴렵렷렸령례롄롑롓로록론롤롬롭롯롱롸롼뢍뢨뢰뢴뢸룀룁룃룅료룐룔룝룟룡루룩룬룰룸룹룻룽뤄뤘뤠뤼뤽륀륄륌륏륑류륙륜률륨륩"], -["b841","퇐",7,"퇙",17], -["b861","퇫",8,"퇵퇶퇷퇹",13], -["b881","툈툊",5,"툑",24,"륫륭르륵른를름릅릇릉릊릍릎리릭린릴림립릿링마막만많",4,"맘맙맛망맞맡맣매맥맨맬맴맵맷맸맹맺먀먁먈먕머먹먼멀멂멈멉멋멍멎멓메멕멘멜멤멥멧멨멩며멱면멸몃몄명몇몌모목몫몬몰몲몸몹못몽뫄뫈뫘뫙뫼"], -["b941","툪툫툮툯툱툲툳툵",6,"툾퉀퉂",5,"퉉퉊퉋퉌"], -["b961","퉍",14,"퉝",6,"퉥퉦퉧퉨"], -["b981","퉩",22,"튂튃튅튆튇튉튊튋튌묀묄묍묏묑묘묜묠묩묫무묵묶문묻물묽묾뭄뭅뭇뭉뭍뭏뭐뭔뭘뭡뭣뭬뮈뮌뮐뮤뮨뮬뮴뮷므믄믈믐믓미믹민믿밀밂밈밉밋밌밍및밑바",4,"받",4,"밤밥밧방밭배백밴밸뱀뱁뱃뱄뱅뱉뱌뱍뱐뱝버벅번벋벌벎범법벗"], -["ba41","튍튎튏튒튓튔튖",5,"튝튞튟튡튢튣튥",6,"튭"], -["ba61","튮튯튰튲",5,"튺튻튽튾틁틃",4,"틊틌",5], -["ba81","틒틓틕틖틗틙틚틛틝",6,"틦",9,"틲틳틵틶틷틹틺벙벚베벡벤벧벨벰벱벳벴벵벼벽변별볍볏볐병볕볘볜보복볶본볼봄봅봇봉봐봔봤봬뵀뵈뵉뵌뵐뵘뵙뵤뵨부북분붇불붉붊붐붑붓붕붙붚붜붤붰붸뷔뷕뷘뷜뷩뷰뷴뷸븀븃븅브븍븐블븜븝븟비빅빈빌빎빔빕빗빙빚빛빠빡빤"], -["bb41","틻",4,"팂팄팆",5,"팏팑팒팓팕팗",4,"팞팢팣"], -["bb61","팤팦팧팪팫팭팮팯팱",6,"팺팾",5,"퍆퍇퍈퍉"], -["bb81","퍊",31,"빨빪빰빱빳빴빵빻빼빽뺀뺄뺌뺍뺏뺐뺑뺘뺙뺨뻐뻑뻔뻗뻘뻠뻣뻤뻥뻬뼁뼈뼉뼘뼙뼛뼜뼝뽀뽁뽄뽈뽐뽑뽕뾔뾰뿅뿌뿍뿐뿔뿜뿟뿡쀼쁑쁘쁜쁠쁨쁩삐삑삔삘삠삡삣삥사삭삯산삳살삵삶삼삽삿샀상샅새색샌샐샘샙샛샜생샤"], -["bc41","퍪",17,"퍾퍿펁펂펃펅펆펇"], -["bc61","펈펉펊펋펎펒",5,"펚펛펝펞펟펡",6,"펪펬펮"], -["bc81","펯",4,"펵펶펷펹펺펻펽",6,"폆폇폊",5,"폑",5,"샥샨샬샴샵샷샹섀섄섈섐섕서",4,"섣설섦섧섬섭섯섰성섶세섹센셀셈셉셋셌셍셔셕션셜셤셥셧셨셩셰셴셸솅소속솎손솔솖솜솝솟송솥솨솩솬솰솽쇄쇈쇌쇔쇗쇘쇠쇤쇨쇰쇱쇳쇼쇽숀숄숌숍숏숑수숙순숟술숨숩숫숭"], -["bd41","폗폙",7,"폢폤",7,"폮폯폱폲폳폵폶폷"], -["bd61","폸폹폺폻폾퐀퐂",5,"퐉",13], -["bd81","퐗",5,"퐞",25,"숯숱숲숴쉈쉐쉑쉔쉘쉠쉥쉬쉭쉰쉴쉼쉽쉿슁슈슉슐슘슛슝스슥슨슬슭슴습슷승시식신싣실싫심십싯싱싶싸싹싻싼쌀쌈쌉쌌쌍쌓쌔쌕쌘쌜쌤쌥쌨쌩썅써썩썬썰썲썸썹썼썽쎄쎈쎌쏀쏘쏙쏜쏟쏠쏢쏨쏩쏭쏴쏵쏸쐈쐐쐤쐬쐰"], -["be41","퐸",7,"푁푂푃푅",14], -["be61","푔",7,"푝푞푟푡푢푣푥",7,"푮푰푱푲"], -["be81","푳",4,"푺푻푽푾풁풃",4,"풊풌풎",5,"풕",8,"쐴쐼쐽쑈쑤쑥쑨쑬쑴쑵쑹쒀쒔쒜쒸쒼쓩쓰쓱쓴쓸쓺쓿씀씁씌씐씔씜씨씩씬씰씸씹씻씽아악안앉않알앍앎앓암압앗았앙앝앞애액앤앨앰앱앳앴앵야약얀얄얇얌얍얏양얕얗얘얜얠얩어억언얹얻얼얽얾엄",6,"엌엎"], -["bf41","풞",10,"풪",14], -["bf61","풹",18,"퓍퓎퓏퓑퓒퓓퓕"], -["bf81","퓖",5,"퓝퓞퓠",7,"퓩퓪퓫퓭퓮퓯퓱",6,"퓹퓺퓼에엑엔엘엠엡엣엥여역엮연열엶엷염",5,"옅옆옇예옌옐옘옙옛옜오옥온올옭옮옰옳옴옵옷옹옻와왁완왈왐왑왓왔왕왜왝왠왬왯왱외왹왼욀욈욉욋욍요욕욘욜욤욥욧용우욱운울욹욺움웁웃웅워웍원월웜웝웠웡웨"], -["c041","퓾",5,"픅픆픇픉픊픋픍",6,"픖픘",5], -["c061","픞",25], -["c081","픸픹픺픻픾픿핁핂핃핅",6,"핎핐핒",5,"핚핛핝핞핟핡핢핣웩웬웰웸웹웽위윅윈윌윔윕윗윙유육윤율윰윱윳융윷으윽은을읊음읍읏응",7,"읜읠읨읫이익인일읽읾잃임입잇있잉잊잎자작잔잖잗잘잚잠잡잣잤장잦재잭잰잴잼잽잿쟀쟁쟈쟉쟌쟎쟐쟘쟝쟤쟨쟬저적전절젊"], -["c141","핤핦핧핪핬핮",5,"핶핷핹핺핻핽",6,"햆햊햋"], -["c161","햌햍햎햏햑",19,"햦햧"], -["c181","햨",31,"점접젓정젖제젝젠젤젬젭젯젱져젼졀졈졉졌졍졔조족존졸졺좀좁좃종좆좇좋좌좍좔좝좟좡좨좼좽죄죈죌죔죕죗죙죠죡죤죵주죽준줄줅줆줌줍줏중줘줬줴쥐쥑쥔쥘쥠쥡쥣쥬쥰쥴쥼즈즉즌즐즘즙즛증지직진짇질짊짐집짓"], -["c241","헊헋헍헎헏헑헓",4,"헚헜헞",5,"헦헧헩헪헫헭헮"], -["c261","헯",4,"헶헸헺",5,"혂혃혅혆혇혉",6,"혒"], -["c281","혖",5,"혝혞혟혡혢혣혥",7,"혮",9,"혺혻징짖짙짚짜짝짠짢짤짧짬짭짯짰짱째짹짼쨀쨈쨉쨋쨌쨍쨔쨘쨩쩌쩍쩐쩔쩜쩝쩟쩠쩡쩨쩽쪄쪘쪼쪽쫀쫄쫌쫍쫏쫑쫓쫘쫙쫠쫬쫴쬈쬐쬔쬘쬠쬡쭁쭈쭉쭌쭐쭘쭙쭝쭤쭸쭹쮜쮸쯔쯤쯧쯩찌찍찐찔찜찝찡찢찧차착찬찮찰참찹찻"], -["c341","혽혾혿홁홂홃홄홆홇홊홌홎홏홐홒홓홖홗홙홚홛홝",4], -["c361","홢",4,"홨홪",5,"홲홳홵",11], -["c381","횁횂횄횆",5,"횎횏횑횒횓횕",7,"횞횠횢",5,"횩횪찼창찾채책챈챌챔챕챗챘챙챠챤챦챨챰챵처척천철첨첩첫첬청체첵첸첼쳄쳅쳇쳉쳐쳔쳤쳬쳰촁초촉촌촐촘촙촛총촤촨촬촹최쵠쵤쵬쵭쵯쵱쵸춈추축춘출춤춥춧충춰췄췌췐취췬췰췸췹췻췽츄츈츌츔츙츠측츤츨츰츱츳층"], -["c441","횫횭횮횯횱",7,"횺횼",7,"훆훇훉훊훋"], -["c461","훍훎훏훐훒훓훕훖훘훚",5,"훡훢훣훥훦훧훩",4], -["c481","훮훯훱훲훳훴훶",5,"훾훿휁휂휃휅",11,"휒휓휔치칙친칟칠칡침칩칫칭카칵칸칼캄캅캇캉캐캑캔캘캠캡캣캤캥캬캭컁커컥컨컫컬컴컵컷컸컹케켁켄켈켐켑켓켕켜켠켤켬켭켯켰켱켸코콕콘콜콤콥콧콩콰콱콴콸쾀쾅쾌쾡쾨쾰쿄쿠쿡쿤쿨쿰쿱쿳쿵쿼퀀퀄퀑퀘퀭퀴퀵퀸퀼"], -["c541","휕휖휗휚휛휝휞휟휡",6,"휪휬휮",5,"휶휷휹"], -["c561","휺휻휽",6,"흅흆흈흊",5,"흒흓흕흚",4], -["c581","흟흢흤흦흧흨흪흫흭흮흯흱흲흳흵",6,"흾흿힀힂",5,"힊힋큄큅큇큉큐큔큘큠크큭큰클큼큽킁키킥킨킬킴킵킷킹타탁탄탈탉탐탑탓탔탕태택탠탤탬탭탯탰탱탸턍터턱턴털턺텀텁텃텄텅테텍텐텔템텝텟텡텨텬텼톄톈토톡톤톨톰톱톳통톺톼퇀퇘퇴퇸툇툉툐투툭툰툴툼툽툿퉁퉈퉜"], -["c641","힍힎힏힑",6,"힚힜힞",5], -["c6a1","퉤튀튁튄튈튐튑튕튜튠튤튬튱트특튼튿틀틂틈틉틋틔틘틜틤틥티틱틴틸팀팁팃팅파팍팎판팔팖팜팝팟팠팡팥패팩팬팰팸팹팻팼팽퍄퍅퍼퍽펀펄펌펍펏펐펑페펙펜펠펨펩펫펭펴편펼폄폅폈평폐폘폡폣포폭폰폴폼폽폿퐁"], -["c7a1","퐈퐝푀푄표푠푤푭푯푸푹푼푿풀풂품풉풋풍풔풩퓌퓐퓔퓜퓟퓨퓬퓰퓸퓻퓽프픈플픔픕픗피픽핀필핌핍핏핑하학한할핥함합핫항해핵핸핼햄햅햇했행햐향허헉헌헐헒험헙헛헝헤헥헨헬헴헵헷헹혀혁현혈혐협혓혔형혜혠"], -["c8a1","혤혭호혹혼홀홅홈홉홋홍홑화확환활홧황홰홱홴횃횅회획횐횔횝횟횡효횬횰횹횻후훅훈훌훑훔훗훙훠훤훨훰훵훼훽휀휄휑휘휙휜휠휨휩휫휭휴휵휸휼흄흇흉흐흑흔흖흗흘흙흠흡흣흥흩희흰흴흼흽힁히힉힌힐힘힙힛힝"], -["caa1","伽佳假價加可呵哥嘉嫁家暇架枷柯歌珂痂稼苛茄街袈訶賈跏軻迦駕刻却各恪慤殼珏脚覺角閣侃刊墾奸姦干幹懇揀杆柬桿澗癎看磵稈竿簡肝艮艱諫間乫喝曷渴碣竭葛褐蝎鞨勘坎堪嵌感憾戡敢柑橄減甘疳監瞰紺邯鑑鑒龕"], -["cba1","匣岬甲胛鉀閘剛堈姜岡崗康强彊慷江畺疆糠絳綱羌腔舡薑襁講鋼降鱇介价個凱塏愷愾慨改槪漑疥皆盖箇芥蓋豈鎧開喀客坑更粳羹醵倨去居巨拒据據擧渠炬祛距踞車遽鉅鋸乾件健巾建愆楗腱虔蹇鍵騫乞傑杰桀儉劍劒檢"], -["cca1","瞼鈐黔劫怯迲偈憩揭擊格檄激膈覡隔堅牽犬甄絹繭肩見譴遣鵑抉決潔結缺訣兼慊箝謙鉗鎌京俓倞傾儆勁勍卿坰境庚徑慶憬擎敬景暻更梗涇炅烱璟璥瓊痙硬磬竟競絅經耕耿脛莖警輕逕鏡頃頸驚鯨係啓堺契季屆悸戒桂械"], -["cda1","棨溪界癸磎稽系繫繼計誡谿階鷄古叩告呱固姑孤尻庫拷攷故敲暠枯槁沽痼皐睾稿羔考股膏苦苽菰藁蠱袴誥賈辜錮雇顧高鼓哭斛曲梏穀谷鵠困坤崑昆梱棍滾琨袞鯤汨滑骨供公共功孔工恐恭拱控攻珙空蚣貢鞏串寡戈果瓜"], -["cea1","科菓誇課跨過鍋顆廓槨藿郭串冠官寬慣棺款灌琯瓘管罐菅觀貫關館刮恝括适侊光匡壙廣曠洸炚狂珖筐胱鑛卦掛罫乖傀塊壞怪愧拐槐魁宏紘肱轟交僑咬喬嬌嶠巧攪敎校橋狡皎矯絞翹膠蕎蛟較轎郊餃驕鮫丘久九仇俱具勾"], -["cfa1","區口句咎嘔坵垢寇嶇廐懼拘救枸柩構歐毆毬求溝灸狗玖球瞿矩究絿耉臼舅舊苟衢謳購軀逑邱鉤銶駒驅鳩鷗龜國局菊鞠鞫麴君窘群裙軍郡堀屈掘窟宮弓穹窮芎躬倦券勸卷圈拳捲權淃眷厥獗蕨蹶闕机櫃潰詭軌饋句晷歸貴"], -["d0a1","鬼龜叫圭奎揆槻珪硅窺竅糾葵規赳逵閨勻均畇筠菌鈞龜橘克剋劇戟棘極隙僅劤勤懃斤根槿瑾筋芹菫覲謹近饉契今妗擒昑檎琴禁禽芩衾衿襟金錦伋及急扱汲級給亘兢矜肯企伎其冀嗜器圻基埼夔奇妓寄岐崎己幾忌技旗旣"], -["d1a1","朞期杞棋棄機欺氣汽沂淇玘琦琪璂璣畸畿碁磯祁祇祈祺箕紀綺羈耆耭肌記譏豈起錡錤飢饑騎騏驥麒緊佶吉拮桔金喫儺喇奈娜懦懶拏拿癩",5,"那樂",4,"諾酪駱亂卵暖欄煖爛蘭難鸞捏捺南嵐枏楠湳濫男藍襤拉"], -["d2a1","納臘蠟衲囊娘廊",4,"乃來內奈柰耐冷女年撚秊念恬拈捻寧寗努勞奴弩怒擄櫓爐瑙盧",5,"駑魯",10,"濃籠聾膿農惱牢磊腦賂雷尿壘",7,"嫩訥杻紐勒",5,"能菱陵尼泥匿溺多茶"], -["d3a1","丹亶但單團壇彖斷旦檀段湍短端簞緞蛋袒鄲鍛撻澾獺疸達啖坍憺擔曇淡湛潭澹痰聃膽蕁覃談譚錟沓畓答踏遝唐堂塘幢戇撞棠當糖螳黨代垈坮大對岱帶待戴擡玳臺袋貸隊黛宅德悳倒刀到圖堵塗導屠島嶋度徒悼挑掉搗桃"], -["d4a1","棹櫂淘渡滔濤燾盜睹禱稻萄覩賭跳蹈逃途道都鍍陶韜毒瀆牘犢獨督禿篤纛讀墩惇敦旽暾沌焞燉豚頓乭突仝冬凍動同憧東桐棟洞潼疼瞳童胴董銅兜斗杜枓痘竇荳讀豆逗頭屯臀芚遁遯鈍得嶝橙燈登等藤謄鄧騰喇懶拏癩羅"], -["d5a1","蘿螺裸邏樂洛烙珞絡落諾酪駱丹亂卵欄欒瀾爛蘭鸞剌辣嵐擥攬欖濫籃纜藍襤覽拉臘蠟廊朗浪狼琅瑯螂郞來崍徠萊冷掠略亮倆兩凉梁樑粮粱糧良諒輛量侶儷勵呂廬慮戾旅櫚濾礪藜蠣閭驢驪麗黎力曆歷瀝礫轢靂憐戀攣漣"], -["d6a1","煉璉練聯蓮輦連鍊冽列劣洌烈裂廉斂殮濂簾獵令伶囹寧岺嶺怜玲笭羚翎聆逞鈴零靈領齡例澧禮醴隷勞怒撈擄櫓潞瀘爐盧老蘆虜路輅露魯鷺鹵碌祿綠菉錄鹿麓論壟弄朧瀧瓏籠聾儡瀨牢磊賂賚賴雷了僚寮廖料燎療瞭聊蓼"], -["d7a1","遼鬧龍壘婁屢樓淚漏瘻累縷蔞褸鏤陋劉旒柳榴流溜瀏琉瑠留瘤硫謬類六戮陸侖倫崙淪綸輪律慄栗率隆勒肋凜凌楞稜綾菱陵俚利厘吏唎履悧李梨浬犁狸理璃異痢籬罹羸莉裏裡里釐離鯉吝潾燐璘藺躪隣鱗麟林淋琳臨霖砬"], -["d8a1","立笠粒摩瑪痲碼磨馬魔麻寞幕漠膜莫邈万卍娩巒彎慢挽晩曼滿漫灣瞞萬蔓蠻輓饅鰻唜抹末沫茉襪靺亡妄忘忙望網罔芒茫莽輞邙埋妹媒寐昧枚梅每煤罵買賣邁魅脈貊陌驀麥孟氓猛盲盟萌冪覓免冕勉棉沔眄眠綿緬面麵滅"], -["d9a1","蔑冥名命明暝椧溟皿瞑茗蓂螟酩銘鳴袂侮冒募姆帽慕摸摹暮某模母毛牟牡瑁眸矛耗芼茅謀謨貌木沐牧目睦穆鶩歿沒夢朦蒙卯墓妙廟描昴杳渺猫竗苗錨務巫憮懋戊拇撫无楙武毋無珷畝繆舞茂蕪誣貿霧鵡墨默們刎吻問文"], -["daa1","汶紊紋聞蚊門雯勿沕物味媚尾嵋彌微未梶楣渼湄眉米美薇謎迷靡黴岷悶愍憫敏旻旼民泯玟珉緡閔密蜜謐剝博拍搏撲朴樸泊珀璞箔粕縛膊舶薄迫雹駁伴半反叛拌搬攀斑槃泮潘班畔瘢盤盼磐磻礬絆般蟠返頒飯勃拔撥渤潑"], -["dba1","發跋醱鉢髮魃倣傍坊妨尨幇彷房放方旁昉枋榜滂磅紡肪膀舫芳蒡蚌訪謗邦防龐倍俳北培徘拜排杯湃焙盃背胚裴裵褙賠輩配陪伯佰帛柏栢白百魄幡樊煩燔番磻繁蕃藩飜伐筏罰閥凡帆梵氾汎泛犯範范法琺僻劈壁擘檗璧癖"], -["dca1","碧蘗闢霹便卞弁變辨辯邊別瞥鱉鼈丙倂兵屛幷昞昺柄棅炳甁病秉竝輧餠騈保堡報寶普步洑湺潽珤甫菩補褓譜輔伏僕匐卜宓復服福腹茯蔔複覆輹輻馥鰒本乶俸奉封峯峰捧棒烽熢琫縫蓬蜂逢鋒鳳不付俯傅剖副否咐埠夫婦"], -["dda1","孚孵富府復扶敷斧浮溥父符簿缶腐腑膚艀芙莩訃負賦賻赴趺部釜阜附駙鳧北分吩噴墳奔奮忿憤扮昐汾焚盆粉糞紛芬賁雰不佛弗彿拂崩朋棚硼繃鵬丕備匕匪卑妃婢庇悲憊扉批斐枇榧比毖毗毘沸泌琵痺砒碑秕秘粃緋翡肥"], -["dea1","脾臂菲蜚裨誹譬費鄙非飛鼻嚬嬪彬斌檳殯浜濱瀕牝玭貧賓頻憑氷聘騁乍事些仕伺似使俟僿史司唆嗣四士奢娑寫寺射巳師徙思捨斜斯柶査梭死沙泗渣瀉獅砂社祀祠私篩紗絲肆舍莎蓑蛇裟詐詞謝賜赦辭邪飼駟麝削數朔索"], -["dfa1","傘刪山散汕珊産疝算蒜酸霰乷撒殺煞薩三參杉森渗芟蔘衫揷澁鈒颯上傷像償商喪嘗孀尙峠常床庠廂想桑橡湘爽牀狀相祥箱翔裳觴詳象賞霜塞璽賽嗇塞穡索色牲生甥省笙墅壻嶼序庶徐恕抒捿敍暑曙書栖棲犀瑞筮絮緖署"], -["e0a1","胥舒薯西誓逝鋤黍鼠夕奭席惜昔晳析汐淅潟石碩蓆釋錫仙僊先善嬋宣扇敾旋渲煽琁瑄璇璿癬禪線繕羨腺膳船蘚蟬詵跣選銑鐥饍鮮卨屑楔泄洩渫舌薛褻設說雪齧剡暹殲纖蟾贍閃陝攝涉燮葉城姓宬性惺成星晟猩珹盛省筬"], -["e1a1","聖聲腥誠醒世勢歲洗稅笹細說貰召嘯塑宵小少巢所掃搔昭梳沼消溯瀟炤燒甦疏疎瘙笑篠簫素紹蔬蕭蘇訴逍遡邵銷韶騷俗屬束涑粟續謖贖速孫巽損蓀遜飡率宋悚松淞訟誦送頌刷殺灑碎鎖衰釗修受嗽囚垂壽嫂守岫峀帥愁"], -["e2a1","戍手授搜收數樹殊水洙漱燧狩獸琇璲瘦睡秀穗竪粹綏綬繡羞脩茱蒐蓚藪袖誰讐輸遂邃酬銖銹隋隧隨雖需須首髓鬚叔塾夙孰宿淑潚熟琡璹肅菽巡徇循恂旬栒楯橓殉洵淳珣盾瞬筍純脣舜荀蓴蕣詢諄醇錞順馴戌術述鉥崇崧"], -["e3a1","嵩瑟膝蝨濕拾習褶襲丞乘僧勝升承昇繩蠅陞侍匙嘶始媤尸屎屍市弑恃施是時枾柴猜矢示翅蒔蓍視試詩諡豕豺埴寔式息拭植殖湜熄篒蝕識軾食飾伸侁信呻娠宸愼新晨燼申神紳腎臣莘薪藎蜃訊身辛辰迅失室實悉審尋心沁"], -["e4a1","沈深瀋甚芯諶什十拾雙氏亞俄兒啞娥峨我牙芽莪蛾衙訝阿雅餓鴉鵝堊岳嶽幄惡愕握樂渥鄂鍔顎鰐齷安岸按晏案眼雁鞍顔鮟斡謁軋閼唵岩巖庵暗癌菴闇壓押狎鴨仰央怏昻殃秧鴦厓哀埃崖愛曖涯碍艾隘靄厄扼掖液縊腋額"], -["e5a1","櫻罌鶯鸚也倻冶夜惹揶椰爺耶若野弱掠略約若葯蒻藥躍亮佯兩凉壤孃恙揚攘敭暘梁楊樣洋瀁煬痒瘍禳穰糧羊良襄諒讓釀陽量養圄御於漁瘀禦語馭魚齬億憶抑檍臆偃堰彦焉言諺孼蘖俺儼嚴奄掩淹嶪業円予余勵呂女如廬"], -["e6a1","旅歟汝濾璵礖礪與艅茹輿轝閭餘驪麗黎亦力域役易曆歷疫繹譯轢逆驛嚥堧姸娟宴年延憐戀捐挻撚椽沇沿涎涓淵演漣烟然煙煉燃燕璉硏硯秊筵緣練縯聯衍軟輦蓮連鉛鍊鳶列劣咽悅涅烈熱裂說閱厭廉念捻染殮炎焰琰艶苒"], -["e7a1","簾閻髥鹽曄獵燁葉令囹塋寧嶺嶸影怜映暎楹榮永泳渶潁濚瀛瀯煐營獰玲瑛瑩瓔盈穎纓羚聆英詠迎鈴鍈零霙靈領乂倪例刈叡曳汭濊猊睿穢芮藝蘂禮裔詣譽豫醴銳隸霓預五伍俉傲午吾吳嗚塢墺奧娛寤悟惡懊敖旿晤梧汚澳"], -["e8a1","烏熬獒筽蜈誤鰲鼇屋沃獄玉鈺溫瑥瘟穩縕蘊兀壅擁瓮甕癰翁邕雍饔渦瓦窩窪臥蛙蝸訛婉完宛梡椀浣玩琓琬碗緩翫脘腕莞豌阮頑曰往旺枉汪王倭娃歪矮外嵬巍猥畏了僚僥凹堯夭妖姚寥寮尿嶢拗搖撓擾料曜樂橈燎燿瑤療"], -["e9a1","窈窯繇繞耀腰蓼蟯要謠遙遼邀饒慾欲浴縟褥辱俑傭冗勇埇墉容庸慂榕涌湧溶熔瑢用甬聳茸蓉踊鎔鏞龍于佑偶優又友右宇寓尤愚憂旴牛玗瑀盂祐禑禹紆羽芋藕虞迂遇郵釪隅雨雩勖彧旭昱栯煜稶郁頊云暈橒殞澐熉耘芸蕓"], -["eaa1","運隕雲韻蔚鬱亐熊雄元原員圓園垣媛嫄寃怨愿援沅洹湲源爰猿瑗苑袁轅遠阮院願鴛月越鉞位偉僞危圍委威尉慰暐渭爲瑋緯胃萎葦蔿蝟衛褘謂違韋魏乳侑儒兪劉唯喩孺宥幼幽庾悠惟愈愉揄攸有杻柔柚柳楡楢油洧流游溜"], -["eba1","濡猶猷琉瑜由留癒硫紐維臾萸裕誘諛諭踰蹂遊逾遺酉釉鍮類六堉戮毓肉育陸倫允奫尹崙淪潤玧胤贇輪鈗閏律慄栗率聿戎瀜絨融隆垠恩慇殷誾銀隱乙吟淫蔭陰音飮揖泣邑凝應膺鷹依倚儀宜意懿擬椅毅疑矣義艤薏蟻衣誼"], -["eca1","議醫二以伊利吏夷姨履已弛彛怡易李梨泥爾珥理異痍痢移罹而耳肄苡荑裏裡貽貳邇里離飴餌匿溺瀷益翊翌翼謚人仁刃印吝咽因姻寅引忍湮燐璘絪茵藺蚓認隣靭靷鱗麟一佚佾壹日溢逸鎰馹任壬妊姙恁林淋稔臨荏賃入卄"], -["eda1","立笠粒仍剩孕芿仔刺咨姉姿子字孜恣慈滋炙煮玆瓷疵磁紫者自茨蔗藉諮資雌作勺嚼斫昨灼炸爵綽芍酌雀鵲孱棧殘潺盞岑暫潛箴簪蠶雜丈仗匠場墻壯奬將帳庄張掌暲杖樟檣欌漿牆狀獐璋章粧腸臟臧莊葬蔣薔藏裝贓醬長"], -["eea1","障再哉在宰才材栽梓渽滓災縡裁財載齋齎爭箏諍錚佇低儲咀姐底抵杵楮樗沮渚狙猪疽箸紵苧菹著藷詛貯躇這邸雎齟勣吊嫡寂摘敵滴狄炙的積笛籍績翟荻謫賊赤跡蹟迪迹適鏑佃佺傳全典前剪塡塼奠專展廛悛戰栓殿氈澱"], -["efa1","煎琠田甸畑癲筌箋箭篆纏詮輾轉鈿銓錢鐫電顚顫餞切截折浙癤竊節絶占岾店漸点粘霑鮎點接摺蝶丁井亭停偵呈姃定幀庭廷征情挺政整旌晶晸柾楨檉正汀淀淨渟湞瀞炡玎珽町睛碇禎程穽精綎艇訂諪貞鄭酊釘鉦鋌錠霆靖"], -["f0a1","靜頂鼎制劑啼堤帝弟悌提梯濟祭第臍薺製諸蹄醍除際霽題齊俎兆凋助嘲弔彫措操早晁曺曹朝條棗槽漕潮照燥爪璪眺祖祚租稠窕粗糟組繰肇藻蚤詔調趙躁造遭釣阻雕鳥族簇足鏃存尊卒拙猝倧宗從悰慫棕淙琮種終綜縱腫"], -["f1a1","踪踵鍾鐘佐坐左座挫罪主住侏做姝胄呪周嗾奏宙州廚晝朱柱株注洲湊澍炷珠疇籌紂紬綢舟蛛註誅走躊輳週酎酒鑄駐竹粥俊儁准埈寯峻晙樽浚準濬焌畯竣蠢逡遵雋駿茁中仲衆重卽櫛楫汁葺增憎曾拯烝甑症繒蒸證贈之只"], -["f2a1","咫地址志持指摯支旨智枝枳止池沚漬知砥祉祗紙肢脂至芝芷蜘誌識贄趾遲直稙稷織職唇嗔塵振搢晉晋桭榛殄津溱珍瑨璡畛疹盡眞瞋秦縉縝臻蔯袗診賑軫辰進鎭陣陳震侄叱姪嫉帙桎瓆疾秩窒膣蛭質跌迭斟朕什執潗緝輯"], -["f3a1","鏶集徵懲澄且侘借叉嗟嵯差次此磋箚茶蹉車遮捉搾着窄錯鑿齪撰澯燦璨瓚竄簒纂粲纘讚贊鑽餐饌刹察擦札紮僭參塹慘慙懺斬站讒讖倉倡創唱娼廠彰愴敞昌昶暢槍滄漲猖瘡窓脹艙菖蒼債埰寀寨彩採砦綵菜蔡采釵冊柵策"], -["f4a1","責凄妻悽處倜刺剔尺慽戚拓擲斥滌瘠脊蹠陟隻仟千喘天川擅泉淺玔穿舛薦賤踐遷釧闡阡韆凸哲喆徹撤澈綴輟轍鐵僉尖沾添甛瞻簽籤詹諂堞妾帖捷牒疊睫諜貼輒廳晴淸聽菁請靑鯖切剃替涕滯締諦逮遞體初剿哨憔抄招梢"], -["f5a1","椒楚樵炒焦硝礁礎秒稍肖艸苕草蕉貂超酢醋醮促囑燭矗蜀觸寸忖村邨叢塚寵悤憁摠總聰蔥銃撮催崔最墜抽推椎楸樞湫皺秋芻萩諏趨追鄒酋醜錐錘鎚雛騶鰍丑畜祝竺筑築縮蓄蹙蹴軸逐春椿瑃出朮黜充忠沖蟲衝衷悴膵萃"], -["f6a1","贅取吹嘴娶就炊翠聚脆臭趣醉驟鷲側仄厠惻測層侈値嗤峙幟恥梔治淄熾痔痴癡稚穉緇緻置致蚩輜雉馳齒則勅飭親七柒漆侵寢枕沈浸琛砧針鍼蟄秤稱快他咤唾墮妥惰打拖朶楕舵陀馱駝倬卓啄坼度托拓擢晫柝濁濯琢琸託"], -["f7a1","鐸呑嘆坦彈憚歎灘炭綻誕奪脫探眈耽貪塔搭榻宕帑湯糖蕩兌台太怠態殆汰泰笞胎苔跆邰颱宅擇澤撑攄兎吐土討慟桶洞痛筒統通堆槌腿褪退頹偸套妬投透鬪慝特闖坡婆巴把播擺杷波派爬琶破罷芭跛頗判坂板版瓣販辦鈑"], -["f8a1","阪八叭捌佩唄悖敗沛浿牌狽稗覇貝彭澎烹膨愎便偏扁片篇編翩遍鞭騙貶坪平枰萍評吠嬖幣廢弊斃肺蔽閉陛佈包匍匏咆哺圃布怖抛抱捕暴泡浦疱砲胞脯苞葡蒲袍褒逋鋪飽鮑幅暴曝瀑爆輻俵剽彪慓杓標漂瓢票表豹飇飄驃"], -["f9a1","品稟楓諷豊風馮彼披疲皮被避陂匹弼必泌珌畢疋筆苾馝乏逼下何厦夏廈昰河瑕荷蝦賀遐霞鰕壑學虐謔鶴寒恨悍旱汗漢澣瀚罕翰閑閒限韓割轄函含咸啣喊檻涵緘艦銜陷鹹合哈盒蛤閤闔陜亢伉姮嫦巷恒抗杭桁沆港缸肛航"], -["faa1","行降項亥偕咳垓奚孩害懈楷海瀣蟹解該諧邂駭骸劾核倖幸杏荇行享向嚮珦鄕響餉饗香噓墟虛許憲櫶獻軒歇險驗奕爀赫革俔峴弦懸晛泫炫玄玹現眩睍絃絢縣舷衒見賢鉉顯孑穴血頁嫌俠協夾峽挾浹狹脅脇莢鋏頰亨兄刑型"], -["fba1","形泂滎瀅灐炯熒珩瑩荊螢衡逈邢鎣馨兮彗惠慧暳蕙蹊醯鞋乎互呼壕壺好岵弧戶扈昊晧毫浩淏湖滸澔濠濩灝狐琥瑚瓠皓祜糊縞胡芦葫蒿虎號蝴護豪鎬頀顥惑或酷婚昏混渾琿魂忽惚笏哄弘汞泓洪烘紅虹訌鴻化和嬅樺火畵"], -["fca1","禍禾花華話譁貨靴廓擴攫確碻穫丸喚奐宦幻患換歡晥桓渙煥環紈還驩鰥活滑猾豁闊凰幌徨恍惶愰慌晃晄榥況湟滉潢煌璜皇篁簧荒蝗遑隍黃匯回廻徊恢悔懷晦會檜淮澮灰獪繪膾茴蛔誨賄劃獲宖橫鐄哮嚆孝效斅曉梟涍淆"], -["fda1","爻肴酵驍侯候厚后吼喉嗅帿後朽煦珝逅勛勳塤壎焄熏燻薰訓暈薨喧暄煊萱卉喙毁彙徽揮暉煇諱輝麾休携烋畦虧恤譎鷸兇凶匈洶胸黑昕欣炘痕吃屹紇訖欠欽歆吸恰洽翕興僖凞喜噫囍姬嬉希憙憘戱晞曦熙熹熺犧禧稀羲詰"] -] diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/tables/cp950.json b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/tables/cp950.json deleted file mode 100644 index d8bc871..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/tables/cp950.json +++ /dev/null @@ -1,177 +0,0 @@ -[ -["0","\u0000",127], -["a140"," ,、。.‧;:?!︰…‥﹐﹑﹒·﹔﹕﹖﹗|–︱—︳╴︴﹏()︵︶{}︷︸〔〕︹︺【】︻︼《》︽︾〈〉︿﹀「」﹁﹂『』﹃﹄﹙﹚"], -["a1a1","﹛﹜﹝﹞‘’“”〝〞‵′#&*※§〃○●△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_ˍ﹉﹊﹍﹎﹋﹌﹟﹠﹡+-×÷±√<>=≦≧≠∞≒≡﹢",4,"~∩∪⊥∠∟⊿㏒㏑∫∮∵∴♀♂⊕⊙↑↓←→↖↗↙↘∥∣/"], -["a240","\∕﹨$¥〒¢£%@℃℉﹩﹪﹫㏕㎜㎝㎞㏎㎡㎎㎏㏄°兙兛兞兝兡兣嗧瓩糎▁",7,"▏▎▍▌▋▊▉┼┴┬┤├▔─│▕┌┐└┘╭"], -["a2a1","╮╰╯═╞╪╡◢◣◥◤╱╲╳0",9,"Ⅰ",9,"〡",8,"十卄卅A",25,"a",21], -["a340","wxyzΑ",16,"Σ",6,"α",16,"σ",6,"ㄅ",10], -["a3a1","ㄐ",25,"˙ˉˊˇˋ"], -["a3e1","€"], -["a440","一乙丁七乃九了二人儿入八几刀刁力匕十卜又三下丈上丫丸凡久么也乞于亡兀刃勺千叉口土士夕大女子孑孓寸小尢尸山川工己已巳巾干廾弋弓才"], -["a4a1","丑丐不中丰丹之尹予云井互五亢仁什仃仆仇仍今介仄元允內六兮公冗凶分切刈勻勾勿化匹午升卅卞厄友及反壬天夫太夭孔少尤尺屯巴幻廿弔引心戈戶手扎支文斗斤方日曰月木欠止歹毋比毛氏水火爪父爻片牙牛犬王丙"], -["a540","世丕且丘主乍乏乎以付仔仕他仗代令仙仞充兄冉冊冬凹出凸刊加功包匆北匝仟半卉卡占卯卮去可古右召叮叩叨叼司叵叫另只史叱台句叭叻四囚外"], -["a5a1","央失奴奶孕它尼巨巧左市布平幼弁弘弗必戊打扔扒扑斥旦朮本未末札正母民氐永汁汀氾犯玄玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕伍伐休伏仲件任仰仳份企伋光兇兆先全"], -["a640","共再冰列刑划刎刖劣匈匡匠印危吉吏同吊吐吁吋各向名合吃后吆吒因回囝圳地在圭圬圯圩夙多夷夸妄奸妃好她如妁字存宇守宅安寺尖屹州帆并年"], -["a6a1","式弛忙忖戎戌戍成扣扛托收早旨旬旭曲曳有朽朴朱朵次此死氖汝汗汙江池汐汕污汛汍汎灰牟牝百竹米糸缶羊羽老考而耒耳聿肉肋肌臣自至臼舌舛舟艮色艾虫血行衣西阡串亨位住佇佗佞伴佛何估佐佑伽伺伸佃佔似但佣"], -["a740","作你伯低伶余佝佈佚兌克免兵冶冷別判利刪刨劫助努劬匣即卵吝吭吞吾否呎吧呆呃吳呈呂君吩告吹吻吸吮吵吶吠吼呀吱含吟听囪困囤囫坊坑址坍"], -["a7a1","均坎圾坐坏圻壯夾妝妒妨妞妣妙妖妍妤妓妊妥孝孜孚孛完宋宏尬局屁尿尾岐岑岔岌巫希序庇床廷弄弟彤形彷役忘忌志忍忱快忸忪戒我抄抗抖技扶抉扭把扼找批扳抒扯折扮投抓抑抆改攻攸旱更束李杏材村杜杖杞杉杆杠"], -["a840","杓杗步每求汞沙沁沈沉沅沛汪決沐汰沌汨沖沒汽沃汲汾汴沆汶沍沔沘沂灶灼災灸牢牡牠狄狂玖甬甫男甸皂盯矣私秀禿究系罕肖肓肝肘肛肚育良芒"], -["a8a1","芋芍見角言谷豆豕貝赤走足身車辛辰迂迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯依侍佳使佬供例來侃佰併侈佩佻侖佾侏侑佺兔兒兕兩具其典冽函刻券刷刺到刮制剁劾劻卒協卓卑卦卷卸卹取叔受味呵"], -["a940","咖呸咕咀呻呷咄咒咆呼咐呱呶和咚呢周咋命咎固垃坷坪坩坡坦坤坼夜奉奇奈奄奔妾妻委妹妮姑姆姐姍始姓姊妯妳姒姅孟孤季宗定官宜宙宛尚屈居"], -["a9a1","屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往征彿彼忝忠忽念忿怏怔怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押拐拙拇拍抵拚抱拘拖拗拆抬拎放斧於旺昔易昌昆昂明昀昏昕昊"], -["aa40","昇服朋杭枋枕東果杳杷枇枝林杯杰板枉松析杵枚枓杼杪杲欣武歧歿氓氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油況沮泗泅泱沿治泡泛泊沬泯泜泖泠"], -["aaa1","炕炎炒炊炙爬爭爸版牧物狀狎狙狗狐玩玨玟玫玥甽疝疙疚的盂盲直知矽社祀祁秉秈空穹竺糾罔羌羋者肺肥肢肱股肫肩肴肪肯臥臾舍芳芝芙芭芽芟芹花芬芥芯芸芣芰芾芷虎虱初表軋迎返近邵邸邱邶采金長門阜陀阿阻附"], -["ab40","陂隹雨青非亟亭亮信侵侯便俠俑俏保促侶俘俟俊俗侮俐俄係俚俎俞侷兗冒冑冠剎剃削前剌剋則勇勉勃勁匍南卻厚叛咬哀咨哎哉咸咦咳哇哂咽咪品"], -["aba1","哄哈咯咫咱咻咩咧咿囿垂型垠垣垢城垮垓奕契奏奎奐姜姘姿姣姨娃姥姪姚姦威姻孩宣宦室客宥封屎屏屍屋峙峒巷帝帥帟幽庠度建弈弭彥很待徊律徇後徉怒思怠急怎怨恍恰恨恢恆恃恬恫恪恤扁拜挖按拼拭持拮拽指拱拷"], -["ac40","拯括拾拴挑挂政故斫施既春昭映昧是星昨昱昤曷柿染柱柔某柬架枯柵柩柯柄柑枴柚查枸柏柞柳枰柙柢柝柒歪殃殆段毒毗氟泉洋洲洪流津洌洱洞洗"], -["aca1","活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯炭炸炮炤爰牲牯牴狩狠狡玷珊玻玲珍珀玳甚甭畏界畎畋疫疤疥疢疣癸皆皇皈盈盆盃盅省盹相眉看盾盼眇矜砂研砌砍祆祉祈祇禹禺科秒秋穿突竿竽籽紂紅紀紉紇約紆缸美羿耄"], -["ad40","耐耍耑耶胖胥胚胃胄背胡胛胎胞胤胝致舢苧范茅苣苛苦茄若茂茉苒苗英茁苜苔苑苞苓苟苯茆虐虹虻虺衍衫要觔計訂訃貞負赴赳趴軍軌述迦迢迪迥"], -["ada1","迭迫迤迨郊郎郁郃酋酊重閂限陋陌降面革韋韭音頁風飛食首香乘亳倌倍倣俯倦倥俸倩倖倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉兼冤冥冢凍凌准凋剖剜剔剛剝匪卿原厝叟哨唐唁唷哼哥哲唆哺唔哩哭員唉哮哪"], -["ae40","哦唧唇哽唏圃圄埂埔埋埃堉夏套奘奚娑娘娜娟娛娓姬娠娣娩娥娌娉孫屘宰害家宴宮宵容宸射屑展屐峭峽峻峪峨峰島崁峴差席師庫庭座弱徒徑徐恙"], -["aea1","恣恥恐恕恭恩息悄悟悚悍悔悌悅悖扇拳挈拿捎挾振捕捂捆捏捉挺捐挽挪挫挨捍捌效敉料旁旅時晉晏晃晒晌晅晁書朔朕朗校核案框桓根桂桔栩梳栗桌桑栽柴桐桀格桃株桅栓栘桁殊殉殷氣氧氨氦氤泰浪涕消涇浦浸海浙涓"], -["af40","浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈烏爹特狼狹狽狸狷玆班琉珮珠珪珞畔畝畜畚留疾病症疲疳疽疼疹痂疸皋皰益盍盎眩真眠眨矩砰砧砸砝破砷"], -["afa1","砥砭砠砟砲祕祐祠祟祖神祝祗祚秤秣秧租秦秩秘窄窈站笆笑粉紡紗紋紊素索純紐紕級紜納紙紛缺罟羔翅翁耆耘耕耙耗耽耿胱脂胰脅胭胴脆胸胳脈能脊胼胯臭臬舀舐航舫舨般芻茫荒荔荊茸荐草茵茴荏茲茹茶茗荀茱茨荃"], -["b040","虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷袁袂衽衹記訐討訌訕訊託訓訖訏訑豈豺豹財貢起躬軒軔軏辱送逆迷退迺迴逃追逅迸邕郡郝郢酒配酌釘針釗釜釙閃院陣陡"], -["b0a1","陛陝除陘陞隻飢馬骨高鬥鬲鬼乾偺偽停假偃偌做偉健偶偎偕偵側偷偏倏偯偭兜冕凰剪副勒務勘動匐匏匙匿區匾參曼商啪啦啄啞啡啃啊唱啖問啕唯啤唸售啜唬啣唳啁啗圈國圉域堅堊堆埠埤基堂堵執培夠奢娶婁婉婦婪婀"], -["b140","娼婢婚婆婊孰寇寅寄寂宿密尉專將屠屜屝崇崆崎崛崖崢崑崩崔崙崤崧崗巢常帶帳帷康庸庶庵庾張強彗彬彩彫得徙從徘御徠徜恿患悉悠您惋悴惦悽"], -["b1a1","情悻悵惜悼惘惕惆惟悸惚惇戚戛扈掠控捲掖探接捷捧掘措捱掩掉掃掛捫推掄授掙採掬排掏掀捻捩捨捺敝敖救教敗啟敏敘敕敔斜斛斬族旋旌旎晝晚晤晨晦晞曹勗望梁梯梢梓梵桿桶梱梧梗械梃棄梭梆梅梔條梨梟梡梂欲殺"], -["b240","毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽犁猜猛猖猓猙率琅琊球理現琍瓠瓶"], -["b2a1","瓷甜產略畦畢異疏痔痕疵痊痍皎盔盒盛眷眾眼眶眸眺硫硃硎祥票祭移窒窕笠笨笛第符笙笞笮粒粗粕絆絃統紮紹紼絀細紳組累終紲紱缽羞羚翌翎習耜聊聆脯脖脣脫脩脰脤舂舵舷舶船莎莞莘荸莢莖莽莫莒莊莓莉莠荷荻荼"], -["b340","莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖袍袋覓規訪訝訣訥許設訟訛訢豉豚販責貫貨貪貧赧赦趾趺軛軟這逍通逗連速逝逐逕逞造透逢逖逛途"], -["b3a1","部郭都酗野釵釦釣釧釭釩閉陪陵陳陸陰陴陶陷陬雀雪雩章竟頂頃魚鳥鹵鹿麥麻傢傍傅備傑傀傖傘傚最凱割剴創剩勞勝勛博厥啻喀喧啼喊喝喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙圍堯堪場堤堰報堡堝堠壹壺奠"], -["b440","婷媚婿媒媛媧孳孱寒富寓寐尊尋就嵌嵐崴嵇巽幅帽幀幃幾廊廁廂廄弼彭復循徨惑惡悲悶惠愜愣惺愕惰惻惴慨惱愎惶愉愀愒戟扉掣掌描揀揩揉揆揍"], -["b4a1","插揣提握揖揭揮捶援揪換摒揚揹敞敦敢散斑斐斯普晰晴晶景暑智晾晷曾替期朝棺棕棠棘棗椅棟棵森棧棹棒棲棣棋棍植椒椎棉棚楮棻款欺欽殘殖殼毯氮氯氬港游湔渡渲湧湊渠渥渣減湛湘渤湖湮渭渦湯渴湍渺測湃渝渾滋"], -["b540","溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩琺琪琳琢琥琵琶琴琯琛琦琨甥甦畫番痢痛痣痙痘痞痠登發皖皓皴盜睏短硝硬硯稍稈程稅稀窘"], -["b5a1","窗窖童竣等策筆筐筒答筍筋筏筑粟粥絞結絨絕紫絮絲絡給絢絰絳善翔翕耋聒肅腕腔腋腑腎脹腆脾腌腓腴舒舜菩萃菸萍菠菅萋菁華菱菴著萊菰萌菌菽菲菊萸萎萄菜萇菔菟虛蛟蛙蛭蛔蛛蛤蛐蛞街裁裂袱覃視註詠評詞証詁"], -["b640","詔詛詐詆訴診訶詖象貂貯貼貳貽賁費賀貴買貶貿貸越超趁跎距跋跚跑跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥量鈔鈕鈣鈉鈞鈍鈐鈇鈑閔閏開閑"], -["b6a1","間閒閎隊階隋陽隅隆隍陲隄雁雅雄集雇雯雲韌項順須飧飪飯飩飲飭馮馭黃黍黑亂傭債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌塭塊塢塒塋奧嫁嫉嫌媾媽媼"], -["b740","媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚意慈感想愛惹愁愈慎慌慄慍愾愴愧愍愆愷戡戢搓搾搞搪搭搽搬搏搜搔損搶搖搗搆敬斟新暗暉暇暈暖暄暘暍會榔業"], -["b7a1","楚楷楠楔極椰概楊楨楫楞楓楹榆楝楣楛歇歲毀殿毓毽溢溯滓溶滂源溝滇滅溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷獅猿猾瑯瑚瑕瑟瑞瑁琿瑙瑛瑜當畸瘀痰瘁痲痱痺痿痴痳盞盟睛睫睦睞督"], -["b840","睹睪睬睜睥睨睢矮碎碰碗碘碌碉硼碑碓硿祺祿禁萬禽稜稚稠稔稟稞窟窠筷節筠筮筧粱粳粵經絹綑綁綏絛置罩罪署義羨群聖聘肆肄腱腰腸腥腮腳腫"], -["b8a1","腹腺腦舅艇蒂葷落萱葵葦葫葉葬葛萼萵葡董葩葭葆虞虜號蛹蜓蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘裝裡裊裕裒覜解詫該詳試詩詰誇詼詣誠話誅詭詢詮詬詹詻訾詨豢貊貉賊資賈賄貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊"], -["b940","辟農運遊道遂達逼違遐遇遏過遍遑逾遁鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉鉍鉅鈹鈿鉚閘隘隔隕雍雋雉雊雷電雹零靖靴靶預頑頓頊頒頌飼飴"], -["b9a1","飽飾馳馱馴髡鳩麂鼎鼓鼠僧僮僥僖僭僚僕像僑僱僎僩兢凳劃劂匱厭嗾嘀嘛嘗嗽嘔嘆嘉嘍嘎嗷嘖嘟嘈嘐嗶團圖塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣孵寞寧寡寥實寨寢寤察對屢嶄嶇幛幣幕幗幔廓廖弊彆彰徹慇"], -["ba40","愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧搴摭摻敲斡旗旖暢暨暝榜榨榕槁榮槓構榛榷榻榫榴槐槍榭槌榦槃榣歉歌氳漳演滾漓滴漩漾漠漬漏漂漢"], -["baa1","滿滯漆漱漸漲漣漕漫漯澈漪滬漁滲滌滷熔熙煽熊熄熒爾犒犖獄獐瑤瑣瑪瑰瑭甄疑瘧瘍瘋瘉瘓盡監瞄睽睿睡磁碟碧碳碩碣禎福禍種稱窪窩竭端管箕箋筵算箝箔箏箸箇箄粹粽精綻綰綜綽綾綠緊綴網綱綺綢綿綵綸維緒緇綬"], -["bb40","罰翠翡翟聞聚肇腐膀膏膈膊腿膂臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓蒐蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘蝕蜷蜩裳褂裴裹裸製裨褚裯誦誌語誣認誡誓誤"], -["bba1","說誥誨誘誑誚誧豪貍貌賓賑賒赫趙趕跼輔輒輕輓辣遠遘遜遣遙遞遢遝遛鄙鄘鄞酵酸酷酴鉸銀銅銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需靼鞅韶頗領颯颱餃餅餌餉駁骯骰髦魁魂鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜"], -["bc40","劇劈劉劍劊勰厲嘮嘻嘹嘲嘿嘴嘩噓噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦奭嬉嫻嬋嫵嬌嬈寮寬審寫層履嶝嶔幢幟幡廢廚廟廝廣廠彈影德徵慶慧慮慝慕憂"], -["bca1","慼慰慫慾憧憐憫憎憬憚憤憔憮戮摩摯摹撞撲撈撐撰撥撓撕撩撒撮播撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨樁樞標槽模樓樊槳樂樅槭樑歐歎殤毅毆漿潼澄潑潦潔澆潭潛潸潮澎潺潰潤澗潘滕潯潠潟熟熬熱熨牖犛獎獗瑩璋璃"], -["bd40","瑾璀畿瘠瘩瘟瘤瘦瘡瘢皚皺盤瞎瞇瞌瞑瞋磋磅確磊碾磕碼磐稿稼穀稽稷稻窯窮箭箱範箴篆篇篁箠篌糊締練緯緻緘緬緝編緣線緞緩綞緙緲緹罵罷羯"], -["bda1","翩耦膛膜膝膠膚膘蔗蔽蔚蓮蔬蔭蔓蔑蔣蔡蔔蓬蔥蓿蔆螂蝴蝶蝠蝦蝸蝨蝙蝗蝌蝓衛衝褐複褒褓褕褊誼諒談諄誕請諸課諉諂調誰論諍誶誹諛豌豎豬賠賞賦賤賬賭賢賣賜質賡赭趟趣踫踐踝踢踏踩踟踡踞躺輝輛輟輩輦輪輜輞"], -["be40","輥適遮遨遭遷鄰鄭鄧鄱醇醉醋醃鋅銻銷鋪銬鋤鋁銳銼鋒鋇鋰銲閭閱霄霆震霉靠鞍鞋鞏頡頫頜颳養餓餒餘駝駐駟駛駑駕駒駙骷髮髯鬧魅魄魷魯鴆鴉"], -["bea1","鴃麩麾黎墨齒儒儘儔儐儕冀冪凝劑劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶壁墾壇壅奮嬝嬴學寰導彊憲憑憩憊懍憶憾懊懈戰擅擁擋撻撼據擄擇擂操撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈歙歷氅濂澱澡"], -["bf40","濃澤濁澧澳激澹澶澦澠澴熾燉燐燒燈燕熹燎燙燜燃燄獨璜璣璘璟璞瓢甌甍瘴瘸瘺盧盥瞠瞞瞟瞥磨磚磬磧禦積穎穆穌穋窺篙簑築篤篛篡篩篦糕糖縊"], -["bfa1","縑縈縛縣縞縝縉縐罹羲翰翱翮耨膳膩膨臻興艘艙蕊蕙蕈蕨蕩蕃蕉蕭蕪蕞螃螟螞螢融衡褪褲褥褫褡親覦諦諺諫諱謀諜諧諮諾謁謂諷諭諳諶諼豫豭貓賴蹄踱踴蹂踹踵輻輯輸輳辨辦遵遴選遲遼遺鄴醒錠錶鋸錳錯錢鋼錫錄錚"], -["c040","錐錦錡錕錮錙閻隧隨險雕霎霑霖霍霓霏靛靜靦鞘頰頸頻頷頭頹頤餐館餞餛餡餚駭駢駱骸骼髻髭鬨鮑鴕鴣鴦鴨鴒鴛默黔龍龜優償儡儲勵嚎嚀嚐嚅嚇"], -["c0a1","嚏壕壓壑壎嬰嬪嬤孺尷屨嶼嶺嶽嶸幫彌徽應懂懇懦懋戲戴擎擊擘擠擰擦擬擱擢擭斂斃曙曖檀檔檄檢檜櫛檣橾檗檐檠歜殮毚氈濘濱濟濠濛濤濫濯澀濬濡濩濕濮濰燧營燮燦燥燭燬燴燠爵牆獰獲璩環璦璨癆療癌盪瞳瞪瞰瞬"], -["c140","瞧瞭矯磷磺磴磯礁禧禪穗窿簇簍篾篷簌篠糠糜糞糢糟糙糝縮績繆縷縲繃縫總縱繅繁縴縹繈縵縿縯罄翳翼聱聲聰聯聳臆臃膺臂臀膿膽臉膾臨舉艱薪"], -["c1a1","薄蕾薜薑薔薯薛薇薨薊虧蟀蟑螳蟒蟆螫螻螺蟈蟋褻褶襄褸褽覬謎謗謙講謊謠謝謄謐豁谿豳賺賽購賸賻趨蹉蹋蹈蹊轄輾轂轅輿避遽還邁邂邀鄹醣醞醜鍍鎂錨鍵鍊鍥鍋錘鍾鍬鍛鍰鍚鍔闊闋闌闈闆隱隸雖霜霞鞠韓顆颶餵騁"], -["c240","駿鮮鮫鮪鮭鴻鴿麋黏點黜黝黛鼾齋叢嚕嚮壙壘嬸彝懣戳擴擲擾攆擺擻擷斷曜朦檳檬櫃檻檸櫂檮檯歟歸殯瀉瀋濾瀆濺瀑瀏燻燼燾燸獷獵璧璿甕癖癘"], -["c2a1","癒瞽瞿瞻瞼礎禮穡穢穠竄竅簫簧簪簞簣簡糧織繕繞繚繡繒繙罈翹翻職聶臍臏舊藏薩藍藐藉薰薺薹薦蟯蟬蟲蟠覆覲觴謨謹謬謫豐贅蹙蹣蹦蹤蹟蹕軀轉轍邇邃邈醫醬釐鎔鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖闐闕離雜雙雛雞霤鞣鞦"], -["c340","鞭韹額顏題顎顓颺餾餿餽餮馥騎髁鬃鬆魏魎魍鯊鯉鯽鯈鯀鵑鵝鵠黠鼕鼬儳嚥壞壟壢寵龐廬懲懷懶懵攀攏曠曝櫥櫝櫚櫓瀛瀟瀨瀚瀝瀕瀘爆爍牘犢獸"], -["c3a1","獺璽瓊瓣疇疆癟癡矇礙禱穫穩簾簿簸簽簷籀繫繭繹繩繪羅繳羶羹羸臘藩藝藪藕藤藥藷蟻蠅蠍蟹蟾襠襟襖襞譁譜識證譚譎譏譆譙贈贊蹼蹲躇蹶蹬蹺蹴轔轎辭邊邋醱醮鏡鏑鏟鏃鏈鏜鏝鏖鏢鏍鏘鏤鏗鏨關隴難霪霧靡韜韻類"], -["c440","願顛颼饅饉騖騙鬍鯨鯧鯖鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤孀孃孽寶巉懸懺攘攔攙曦朧櫬瀾瀰瀲爐獻瓏癢癥礦礪礬礫竇競籌籃籍糯糰辮繽繼"], -["c4a1","纂罌耀臚艦藻藹蘑藺蘆蘋蘇蘊蠔蠕襤覺觸議譬警譯譟譫贏贍躉躁躅躂醴釋鐘鐃鏽闡霰飄饒饑馨騫騰騷騵鰓鰍鹹麵黨鼯齟齣齡儷儸囁囀囂夔屬巍懼懾攝攜斕曩櫻欄櫺殲灌爛犧瓖瓔癩矓籐纏續羼蘗蘭蘚蠣蠢蠡蠟襪襬覽譴"], -["c540","護譽贓躊躍躋轟辯醺鐮鐳鐵鐺鐸鐲鐫闢霸霹露響顧顥饗驅驃驀騾髏魔魑鰭鰥鶯鶴鷂鶸麝黯鼙齜齦齧儼儻囈囊囉孿巔巒彎懿攤權歡灑灘玀瓤疊癮癬"], -["c5a1","禳籠籟聾聽臟襲襯觼讀贖贗躑躓轡酈鑄鑑鑒霽霾韃韁顫饕驕驍髒鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬欐瓚竊籤籣籥纓纖纔臢蘸蘿蠱變邐邏鑣鑠鑤靨顯饜驚驛驗髓體髑鱔鱗鱖鷥麟黴囑壩攬灞癱癲矗罐羈蠶蠹衢讓讒"], -["c640","讖艷贛釀鑪靂靈靄韆顰驟鬢魘鱟鷹鷺鹼鹽鼇齷齲廳欖灣籬籮蠻觀躡釁鑲鑰顱饞髖鬣黌灤矚讚鑷韉驢驥纜讜躪釅鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲"], -["c940","乂乜凵匚厂万丌乇亍囗兀屮彳丏冇与丮亓仂仉仈冘勼卬厹圠夃夬尐巿旡殳毌气爿丱丼仨仜仩仡仝仚刌匜卌圢圣夗夯宁宄尒尻屴屳帄庀庂忉戉扐氕"], -["c9a1","氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈伝伂伅伢伓伄仴伒冱刓刉刐劦匢匟卍厊吇囡囟圮圪圴夼妀奼妅奻奾奷奿孖尕尥屼屺屻屾巟幵庄异弚彴忕忔忏扜扞扤扡扦扢扙扠扚扥旯旮朾朹朸朻机朿朼朳氘汆汒汜汏汊汔汋"], -["ca40","汌灱牞犴犵玎甪癿穵网艸艼芀艽艿虍襾邙邗邘邛邔阢阤阠阣佖伻佢佉体佤伾佧佒佟佁佘伭伳伿佡冏冹刜刞刡劭劮匉卣卲厎厏吰吷吪呔呅吙吜吥吘"], -["caa1","吽呏呁吨吤呇囮囧囥坁坅坌坉坋坒夆奀妦妘妠妗妎妢妐妏妧妡宎宒尨尪岍岏岈岋岉岒岊岆岓岕巠帊帎庋庉庌庈庍弅弝彸彶忒忑忐忭忨忮忳忡忤忣忺忯忷忻怀忴戺抃抌抎抏抔抇扱扻扺扰抁抈扷扽扲扴攷旰旴旳旲旵杅杇"], -["cb40","杙杕杌杈杝杍杚杋毐氙氚汸汧汫沄沋沏汱汯汩沚汭沇沕沜汦汳汥汻沎灴灺牣犿犽狃狆狁犺狅玕玗玓玔玒町甹疔疕皁礽耴肕肙肐肒肜芐芏芅芎芑芓"], -["cba1","芊芃芄豸迉辿邟邡邥邞邧邠阰阨阯阭丳侘佼侅佽侀侇佶佴侉侄佷佌侗佪侚佹侁佸侐侜侔侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿咁咑咂咈呫呺呾呥呬呴呦咍呯呡呠咘呣呧呤囷囹坯坲坭坫坱坰坶垀坵坻坳坴坢"], -["cc40","坨坽夌奅妵妺姏姎妲姌姁妶妼姃姖妱妽姀姈妴姇孢孥宓宕屄屇岮岤岠岵岯岨岬岟岣岭岢岪岧岝岥岶岰岦帗帔帙弨弢弣弤彔徂彾彽忞忥怭怦怙怲怋"], -["cca1","怴怊怗怳怚怞怬怢怍怐怮怓怑怌怉怜戔戽抭抴拑抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋昍昅旽昑昐曶朊枅杬枎枒杶杻枘枆构杴枍枌杺枟枑枙枃杽极杸杹枔欥殀歾毞氝沓泬泫泮泙沶泔沭泧沷泐泂沺泃泆泭泲"], -["cd40","泒泝沴沊沝沀泞泀洰泍泇沰泹泏泩泑炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡玭玦玢玠玬玝瓝瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺"], -["cda1","矷祂礿秅穸穻竻籵糽耵肏肮肣肸肵肭舠芠苀芫芚芘芛芵芧芮芼芞芺芴芨芡芩苂芤苃芶芢虰虯虭虮豖迒迋迓迍迖迕迗邲邴邯邳邰阹阽阼阺陃俍俅俓侲俉俋俁俔俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽卼厗厖厙厘咺咡咭咥哏"], -["ce40","哃茍咷咮哖咶哅哆咠呰咼咢咾呲哞咰垵垞垟垤垌垗垝垛垔垘垏垙垥垚垕壴复奓姡姞姮娀姱姝姺姽姼姶姤姲姷姛姩姳姵姠姾姴姭宨屌峐峘峌峗峋峛"], -["cea1","峞峚峉峇峊峖峓峔峏峈峆峎峟峸巹帡帢帣帠帤庰庤庢庛庣庥弇弮彖徆怷怹恔恲恞恅恓恇恉恛恌恀恂恟怤恄恘恦恮扂扃拏挍挋拵挎挃拫拹挏挌拸拶挀挓挔拺挕拻拰敁敃斪斿昶昡昲昵昜昦昢昳昫昺昝昴昹昮朏朐柁柲柈枺"], -["cf40","柜枻柸柘柀枷柅柫柤柟枵柍枳柷柶柮柣柂枹柎柧柰枲柼柆柭柌枮柦柛柺柉柊柃柪柋欨殂殄殶毖毘毠氠氡洨洴洭洟洼洿洒洊泚洳洄洙洺洚洑洀洝浂"], -["cfa1","洁洘洷洃洏浀洇洠洬洈洢洉洐炷炟炾炱炰炡炴炵炩牁牉牊牬牰牳牮狊狤狨狫狟狪狦狣玅珌珂珈珅玹玶玵玴珫玿珇玾珃珆玸珋瓬瓮甮畇畈疧疪癹盄眈眃眄眅眊盷盻盺矧矨砆砑砒砅砐砏砎砉砃砓祊祌祋祅祄秕种秏秖秎窀"], -["d040","穾竑笀笁籺籸籹籿粀粁紃紈紁罘羑羍羾耇耎耏耔耷胘胇胠胑胈胂胐胅胣胙胜胊胕胉胏胗胦胍臿舡芔苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪"], -["d0a1","苤苠苺苳苭虷虴虼虳衁衎衧衪衩觓訄訇赲迣迡迮迠郱邽邿郕郅邾郇郋郈釔釓陔陏陑陓陊陎倞倅倇倓倢倰倛俵俴倳倷倬俶俷倗倜倠倧倵倯倱倎党冔冓凊凄凅凈凎剡剚剒剞剟剕剢勍匎厞唦哢唗唒哧哳哤唚哿唄唈哫唑唅哱"], -["d140","唊哻哷哸哠唎唃唋圁圂埌堲埕埒垺埆垽垼垸垶垿埇埐垹埁夎奊娙娖娭娮娕娏娗娊娞娳孬宧宭宬尃屖屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧恝恚恧"], -["d1a1","恁悢悈悀悒悁悝悃悕悛悗悇悜悎戙扆拲挐捖挬捄捅挶捃揤挹捋捊挼挩捁挴捘捔捙挭捇挳捚捑挸捗捀捈敊敆旆旃旄旂晊晟晇晑朒朓栟栚桉栲栳栻桋桏栖栱栜栵栫栭栯桎桄栴栝栒栔栦栨栮桍栺栥栠欬欯欭欱欴歭肂殈毦毤"], -["d240","毨毣毢毧氥浺浣浤浶洍浡涒浘浢浭浯涑涍淯浿涆浞浧浠涗浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵涐烜烓烑烝烋缹烢烗烒烞烠烔烍烅烆烇烚烎烡牂牸"], -["d2a1","牷牶猀狺狴狾狶狳狻猁珓珙珥珖玼珧珣珩珜珒珛珔珝珚珗珘珨瓞瓟瓴瓵甡畛畟疰痁疻痄痀疿疶疺皊盉眝眛眐眓眒眣眑眕眙眚眢眧砣砬砢砵砯砨砮砫砡砩砳砪砱祔祛祏祜祓祒祑秫秬秠秮秭秪秜秞秝窆窉窅窋窌窊窇竘笐"], -["d340","笄笓笅笏笈笊笎笉笒粄粑粊粌粈粍粅紞紝紑紎紘紖紓紟紒紏紌罜罡罞罠罝罛羖羒翃翂翀耖耾耹胺胲胹胵脁胻脀舁舯舥茳茭荄茙荑茥荖茿荁茦茜茢"], -["d3a1","荂荎茛茪茈茼荍茖茤茠茷茯茩荇荅荌荓茞茬荋茧荈虓虒蚢蚨蚖蚍蚑蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎蚝蚐蚔衃衄衭衵衶衲袀衱衿衯袃衾衴衼訒豇豗豻貤貣赶赸趵趷趶軑軓迾迵适迿迻逄迼迶郖郠郙郚郣郟郥郘郛郗郜郤酐"], -["d440","酎酏釕釢釚陜陟隼飣髟鬯乿偰偪偡偞偠偓偋偝偲偈偍偁偛偊偢倕偅偟偩偫偣偤偆偀偮偳偗偑凐剫剭剬剮勖勓匭厜啵啶唼啍啐唴唪啑啢唶唵唰啒啅"], -["d4a1","唌唲啥啎唹啈唭唻啀啋圊圇埻堔埢埶埜埴堀埭埽堈埸堋埳埏堇埮埣埲埥埬埡堎埼堐埧堁堌埱埩埰堍堄奜婠婘婕婧婞娸娵婭婐婟婥婬婓婤婗婃婝婒婄婛婈媎娾婍娹婌婰婩婇婑婖婂婜孲孮寁寀屙崞崋崝崚崠崌崨崍崦崥崏"], -["d540","崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊悐悆悾悰悺惓惔惏惤惙惝惈悱惛悷惊悿惃惍惀挲捥掊掂捽掽掞掭掝掗掫掎捯掇掐据掯捵掜捭掮捼掤挻掟"], -["d5a1","捸掅掁掑掍捰敓旍晥晡晛晙晜晢朘桹梇梐梜桭桮梮梫楖桯梣梬梩桵桴梲梏桷梒桼桫桲梪梀桱桾梛梖梋梠梉梤桸桻梑梌梊桽欶欳欷欸殑殏殍殎殌氪淀涫涴涳湴涬淩淢涷淶淔渀淈淠淟淖涾淥淜淝淛淴淊涽淭淰涺淕淂淏淉"], -["d640","淐淲淓淽淗淍淣涻烺焍烷焗烴焌烰焄烳焐烼烿焆焓焀烸烶焋焂焎牾牻牼牿猝猗猇猑猘猊猈狿猏猞玈珶珸珵琄琁珽琇琀珺珼珿琌琋珴琈畤畣痎痒痏"], -["d6a1","痋痌痑痐皏皉盓眹眯眭眱眲眴眳眽眥眻眵硈硒硉硍硊硌砦硅硐祤祧祩祪祣祫祡离秺秸秶秷窏窔窐笵筇笴笥笰笢笤笳笘笪笝笱笫笭笯笲笸笚笣粔粘粖粣紵紽紸紶紺絅紬紩絁絇紾紿絊紻紨罣羕羜羝羛翊翋翍翐翑翇翏翉耟"], -["d740","耞耛聇聃聈脘脥脙脛脭脟脬脞脡脕脧脝脢舑舸舳舺舴舲艴莐莣莨莍荺荳莤荴莏莁莕莙荵莔莩荽莃莌莝莛莪莋荾莥莯莈莗莰荿莦莇莮荶莚虙虖蚿蚷"], -["d7a1","蛂蛁蛅蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜豝豽貥赽赻赹趼跂趹趿跁軘軞軝軜軗軠軡逤逋逑逜逌逡郯郪郰郴郲郳郔郫郬郩酖酘酚酓酕釬釴釱釳釸釤釹釪"], -["d840","釫釷釨釮镺閆閈陼陭陫陱陯隿靪頄飥馗傛傕傔傞傋傣傃傌傎傝偨傜傒傂傇兟凔匒匑厤厧喑喨喥喭啷噅喢喓喈喏喵喁喣喒喤啽喌喦啿喕喡喎圌堩堷"], -["d8a1","堙堞堧堣堨埵塈堥堜堛堳堿堶堮堹堸堭堬堻奡媯媔媟婺媢媞婸媦婼媥媬媕媮娷媄媊媗媃媋媩婻婽媌媜媏媓媝寪寍寋寔寑寊寎尌尰崷嵃嵫嵁嵋崿崵嵑嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄幁彘徦徥徫惉悹惌惢惎惄愔"], -["d940","惲愊愖愅惵愓惸惼惾惁愃愘愝愐惿愄愋扊掔掱掰揎揥揨揯揃撝揳揊揠揶揕揲揵摡揟掾揝揜揄揘揓揂揇揌揋揈揰揗揙攲敧敪敤敜敨敥斌斝斞斮旐旒"], -["d9a1","晼晬晻暀晱晹晪晲朁椌棓椄棜椪棬棪棱椏棖棷棫棤棶椓椐棳棡椇棌椈楰梴椑棯棆椔棸棐棽棼棨椋椊椗棎棈棝棞棦棴棑椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿湁湝湳渜渳湋湀湑渻渃渮湞"], -["da40","湨湜湡渱渨湠湱湫渹渢渰湓湥渧湸湤湷湕湹湒湦渵渶湚焠焞焯烻焮焱焣焥焢焲焟焨焺焛牋牚犈犉犆犅犋猒猋猰猢猱猳猧猲猭猦猣猵猌琮琬琰琫琖"], -["daa1","琚琡琭琱琤琣琝琩琠琲瓻甯畯畬痧痚痡痦痝痟痤痗皕皒盚睆睇睄睍睅睊睎睋睌矞矬硠硤硥硜硭硱硪确硰硩硨硞硢祴祳祲祰稂稊稃稌稄窙竦竤筊笻筄筈筌筎筀筘筅粢粞粨粡絘絯絣絓絖絧絪絏絭絜絫絒絔絩絑絟絎缾缿罥"], -["db40","罦羢羠羡翗聑聏聐胾胔腃腊腒腏腇脽腍脺臦臮臷臸臹舄舼舽舿艵茻菏菹萣菀菨萒菧菤菼菶萐菆菈菫菣莿萁菝菥菘菿菡菋菎菖菵菉萉萏菞萑萆菂菳"], -["dba1","菕菺菇菑菪萓菃菬菮菄菻菗菢萛菛菾蛘蛢蛦蛓蛣蛚蛪蛝蛫蛜蛬蛩蛗蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲褁裉覕覘覗觝觚觛詎詍訹詙詀詗詘詄詅詒詈詑詊詌詏豟貁貀貺貾貰貹貵趄趀趉跘跓跍跇跖跜跏跕跙跈跗跅軯軷軺"], -["dc40","軹軦軮軥軵軧軨軶軫軱軬軴軩逭逴逯鄆鄬鄄郿郼鄈郹郻鄁鄀鄇鄅鄃酡酤酟酢酠鈁鈊鈥鈃鈚鈦鈏鈌鈀鈒釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻閍閌閐隇陾隈"], -["dca1","隉隃隀雂雈雃雱雰靬靰靮頇颩飫鳦黹亃亄亶傽傿僆傮僄僊傴僈僂傰僁傺傱僋僉傶傸凗剺剸剻剼嗃嗛嗌嗐嗋嗊嗝嗀嗔嗄嗩喿嗒喍嗏嗕嗢嗖嗈嗲嗍嗙嗂圔塓塨塤塏塍塉塯塕塎塝塙塥塛堽塣塱壼嫇嫄嫋媺媸媱媵媰媿嫈媻嫆"], -["dd40","媷嫀嫊媴媶嫍媹媐寖寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰幏幎幊幍幋廅廌廆廋廇彀徯徭惷慉慊愫慅愶愲愮慆愯慏愩慀戠酨戣戥戤揅揱揫搐搒搉搠搤"], -["dda1","搳摃搟搕搘搹搷搢搣搌搦搰搨摁搵搯搊搚摀搥搧搋揧搛搮搡搎敯斒旓暆暌暕暐暋暊暙暔晸朠楦楟椸楎楢楱椿楅楪椹楂楗楙楺楈楉椵楬椳椽楥棰楸椴楩楀楯楄楶楘楁楴楌椻楋椷楜楏楑椲楒椯楻椼歆歅歃歂歈歁殛嗀毻毼"], -["de40","毹毷毸溛滖滈溏滀溟溓溔溠溱溹滆滒溽滁溞滉溷溰滍溦滏溲溾滃滜滘溙溒溎溍溤溡溿溳滐滊溗溮溣煇煔煒煣煠煁煝煢煲煸煪煡煂煘煃煋煰煟煐煓"], -["dea1","煄煍煚牏犍犌犑犐犎猼獂猻猺獀獊獉瑄瑊瑋瑒瑑瑗瑀瑏瑐瑎瑂瑆瑍瑔瓡瓿瓾瓽甝畹畷榃痯瘏瘃痷痾痼痹痸瘐痻痶痭痵痽皙皵盝睕睟睠睒睖睚睩睧睔睙睭矠碇碚碔碏碄碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓"], -["df40","稛稐窣窢窞竫筦筤筭筴筩筲筥筳筱筰筡筸筶筣粲粴粯綈綆綀綍絿綅絺綎絻綃絼綌綔綄絽綒罭罫罧罨罬羦羥羧翛翜耡腤腠腷腜腩腛腢腲朡腞腶腧腯"], -["dfa1","腄腡舝艉艄艀艂艅蓱萿葖葶葹蒏蒍葥葑葀蒆葧萰葍葽葚葙葴葳葝蔇葞萷萺萴葺葃葸萲葅萩菙葋萯葂萭葟葰萹葎葌葒葯蓅蒎萻葇萶萳葨葾葄萫葠葔葮葐蜋蜄蛷蜌蛺蛖蛵蝍蛸蜎蜉蜁蛶蜍蜅裖裋裍裎裞裛裚裌裐覅覛觟觥觤"], -["e040","觡觠觢觜触詶誆詿詡訿詷誂誄詵誃誁詴詺谼豋豊豥豤豦貆貄貅賌赨赩趑趌趎趏趍趓趔趐趒跰跠跬跱跮跐跩跣跢跧跲跫跴輆軿輁輀輅輇輈輂輋遒逿"], -["e0a1","遄遉逽鄐鄍鄏鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆鉭鉬鉏鉠鉧鉯鈶鉡鉰鈱鉔鉣鉐鉲鉎鉓鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵靳靷靸靲頏頍頎颬飶飹馯馲馰馵骭骫魛鳪鳭鳧麀黽僦僔僗僨僳僛僪僝僤僓僬僰僯僣僠"], -["e140","凘劀劁勩勫匰厬嘧嘕嘌嘒嗼嘏嘜嘁嘓嘂嗺嘝嘄嗿嗹墉塼墐墘墆墁塿塴墋塺墇墑墎塶墂墈塻墔墏壾奫嫜嫮嫥嫕嫪嫚嫭嫫嫳嫢嫠嫛嫬嫞嫝嫙嫨嫟孷寠"], -["e1a1","寣屣嶂嶀嵽嶆嵺嶁嵷嶊嶉嶈嵾嵼嶍嵹嵿幘幙幓廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨慁慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫搫摍摛摝摴摶摲摳摽摵摦撦摎撂摞摜摋摓摠摐摿搿摬摫摙摥摷敳斠暡暠暟朅朄朢榱榶槉"], -["e240","榠槎榖榰榬榼榑榙榎榧榍榩榾榯榿槄榽榤槔榹槊榚槏榳榓榪榡榞槙榗榐槂榵榥槆歊歍歋殞殟殠毃毄毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒滭漊"], -["e2a1","漶潳滹滮漭潀漰漼漵滫漇漎潃漅滽滶漹漜滼漺漟漍漞漈漡熇熐熉熀熅熂熏煻熆熁熗牄牓犗犕犓獃獍獑獌瑢瑳瑱瑵瑲瑧瑮甀甂甃畽疐瘖瘈瘌瘕瘑瘊瘔皸瞁睼瞅瞂睮瞀睯睾瞃碲碪碴碭碨硾碫碞碥碠碬碢碤禘禊禋禖禕禔禓"], -["e340","禗禈禒禐稫穊稰稯稨稦窨窫窬竮箈箜箊箑箐箖箍箌箛箎箅箘劄箙箤箂粻粿粼粺綧綷緂綣綪緁緀緅綝緎緄緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞"], -["e3a1","耤聝聜膉膆膃膇膍膌膋舕蒗蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴蓁蓍蒪蒚蒱蓐蒝蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶蓏蒠蓗蓔蓒蓛蒰蒑虡蜳蜣蜨蝫蝀蜮蜞蜡蜙蜛蝃蜬蝁蜾蝆蜠蜲蜪蜭蜼蜒蜺蜱蜵蝂蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻"], -["e440","裰裬裫覝覡覟覞觩觫觨誫誙誋誒誏誖谽豨豩賕賏賗趖踉踂跿踍跽踊踃踇踆踅跾踀踄輐輑輎輍鄣鄜鄠鄢鄟鄝鄚鄤鄡鄛酺酲酹酳銥銤鉶銛鉺銠銔銪銍"], -["e4a1","銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩銝銋鈭隞隡雿靘靽靺靾鞃鞀鞂靻鞄鞁靿韎韍頖颭颮餂餀餇馝馜駃馹馻馺駂馽駇骱髣髧鬾鬿魠魡魟鳱鳲鳵麧僿儃儰僸儆儇僶僾儋儌僽儊劋劌勱勯噈噂噌嘵噁噊噉噆噘"], -["e540","噚噀嘳嘽嘬嘾嘸嘪嘺圚墫墝墱墠墣墯墬墥墡壿嫿嫴嫽嫷嫶嬃嫸嬂嫹嬁嬇嬅嬏屧嶙嶗嶟嶒嶢嶓嶕嶠嶜嶡嶚嶞幩幝幠幜緳廛廞廡彉徲憋憃慹憱憰憢憉"], -["e5a1","憛憓憯憭憟憒憪憡憍慦憳戭摮摰撖撠撅撗撜撏撋撊撌撣撟摨撱撘敶敺敹敻斲斳暵暰暩暲暷暪暯樀樆樗槥槸樕槱槤樠槿槬槢樛樝槾樧槲槮樔槷槧橀樈槦槻樍槼槫樉樄樘樥樏槶樦樇槴樖歑殥殣殢殦氁氀毿氂潁漦潾澇濆澒"], -["e640","澍澉澌潢潏澅潚澖潶潬澂潕潲潒潐潗澔澓潝漀潡潫潽潧澐潓澋潩潿澕潣潷潪潻熲熯熛熰熠熚熩熵熝熥熞熤熡熪熜熧熳犘犚獘獒獞獟獠獝獛獡獚獙"], -["e6a1","獢璇璉璊璆璁瑽璅璈瑼瑹甈甇畾瘥瘞瘙瘝瘜瘣瘚瘨瘛皜皝皞皛瞍瞏瞉瞈磍碻磏磌磑磎磔磈磃磄磉禚禡禠禜禢禛歶稹窲窴窳箷篋箾箬篎箯箹篊箵糅糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰羭翭翫翪翬翦翨聤聧膣膟"], -["e740","膞膕膢膙膗舖艏艓艒艐艎艑蔤蔻蔏蔀蔩蔎蔉蔍蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨蔝蔮蔂蓽蔞蓶蔱蔦蓧蓨蓰蓯蓹蔘蔠蔰蔋蔙蔯虢"], -["e7a1","蝖蝣蝤蝷蟡蝳蝘蝔蝛蝒蝡蝚蝑蝞蝭蝪蝐蝎蝟蝝蝯蝬蝺蝮蝜蝥蝏蝻蝵蝢蝧蝩衚褅褌褔褋褗褘褙褆褖褑褎褉覢覤覣觭觰觬諏諆誸諓諑諔諕誻諗誾諀諅諘諃誺誽諙谾豍貏賥賟賙賨賚賝賧趠趜趡趛踠踣踥踤踮踕踛踖踑踙踦踧"], -["e840","踔踒踘踓踜踗踚輬輤輘輚輠輣輖輗遳遰遯遧遫鄯鄫鄩鄪鄲鄦鄮醅醆醊醁醂醄醀鋐鋃鋄鋀鋙銶鋏鋱鋟鋘鋩鋗鋝鋌鋯鋂鋨鋊鋈鋎鋦鋍鋕鋉鋠鋞鋧鋑鋓"], -["e8a1","銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂靚鞊鞎鞈韐韏頞頝頦頩頨頠頛頧颲餈飺餑餔餖餗餕駜駍駏駓駔駎駉駖駘駋駗駌骳髬髫髳髲髱魆魃魧魴魱魦魶魵魰魨魤魬鳼鳺鳽鳿鳷鴇鴀鳹鳻鴈鴅鴄麃黓鼏鼐儜儓儗儚儑凞匴叡噰噠噮"], -["e940","噳噦噣噭噲噞噷圜圛壈墽壉墿墺壂墼壆嬗嬙嬛嬡嬔嬓嬐嬖嬨嬚嬠嬞寯嶬嶱嶩嶧嶵嶰嶮嶪嶨嶲嶭嶯嶴幧幨幦幯廩廧廦廨廥彋徼憝憨憖懅憴懆懁懌憺"], -["e9a1","憿憸憌擗擖擐擏擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋曏暽暻暺曌朣樴橦橉橧樲橨樾橝橭橶橛橑樨橚樻樿橁橪橤橐橏橔橯橩橠樼橞橖橕橍橎橆歕歔歖殧殪殫毈毇氄氃氆澭濋澣濇澼濎濈潞濄澽澞濊澨瀄澥澮澺澬澪濏澿澸"], -["ea40","澢濉澫濍澯澲澰燅燂熿熸燖燀燁燋燔燊燇燏熽燘熼燆燚燛犝犞獩獦獧獬獥獫獪瑿璚璠璔璒璕璡甋疀瘯瘭瘱瘽瘳瘼瘵瘲瘰皻盦瞚瞝瞡瞜瞛瞢瞣瞕瞙"], -["eaa1","瞗磝磩磥磪磞磣磛磡磢磭磟磠禤穄穈穇窶窸窵窱窷篞篣篧篝篕篥篚篨篹篔篪篢篜篫篘篟糒糔糗糐糑縒縡縗縌縟縠縓縎縜縕縚縢縋縏縖縍縔縥縤罃罻罼罺羱翯耪耩聬膱膦膮膹膵膫膰膬膴膲膷膧臲艕艖艗蕖蕅蕫蕍蕓蕡蕘"], -["eb40","蕀蕆蕤蕁蕢蕄蕑蕇蕣蔾蕛蕱蕎蕮蕵蕕蕧蕠薌蕦蕝蕔蕥蕬虣虥虤螛螏螗螓螒螈螁螖螘蝹螇螣螅螐螑螝螄螔螜螚螉褞褦褰褭褮褧褱褢褩褣褯褬褟觱諠"], -["eba1","諢諲諴諵諝謔諤諟諰諈諞諡諨諿諯諻貑貒貐賵賮賱賰賳赬赮趥趧踳踾踸蹀蹅踶踼踽蹁踰踿躽輶輮輵輲輹輷輴遶遹遻邆郺鄳鄵鄶醓醐醑醍醏錧錞錈錟錆錏鍺錸錼錛錣錒錁鍆錭錎錍鋋錝鋺錥錓鋹鋷錴錂錤鋿錩錹錵錪錔錌"], -["ec40","錋鋾錉錀鋻錖閼闍閾閹閺閶閿閵閽隩雔霋霒霐鞙鞗鞔韰韸頵頯頲餤餟餧餩馞駮駬駥駤駰駣駪駩駧骹骿骴骻髶髺髹髷鬳鮀鮅鮇魼魾魻鮂鮓鮒鮐魺鮕"], -["eca1","魽鮈鴥鴗鴠鴞鴔鴩鴝鴘鴢鴐鴙鴟麈麆麇麮麭黕黖黺鼒鼽儦儥儢儤儠儩勴嚓嚌嚍嚆嚄嚃噾嚂噿嚁壖壔壏壒嬭嬥嬲嬣嬬嬧嬦嬯嬮孻寱寲嶷幬幪徾徻懃憵憼懧懠懥懤懨懞擯擩擣擫擤擨斁斀斶旚曒檍檖檁檥檉檟檛檡檞檇檓檎"], -["ed40","檕檃檨檤檑橿檦檚檅檌檒歛殭氉濌澩濴濔濣濜濭濧濦濞濲濝濢濨燡燱燨燲燤燰燢獳獮獯璗璲璫璐璪璭璱璥璯甐甑甒甏疄癃癈癉癇皤盩瞵瞫瞲瞷瞶"], -["eda1","瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀竁簅簏篲簀篿篻簎篴簋篳簂簉簃簁篸篽簆篰篱簐簊糨縭縼繂縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀薏薧薕薠薋薣蕻薤薚薞"], -["ee40","蕷蕼薉薡蕺蕸蕗薎薖薆薍薙薝薁薢薂薈薅蕹蕶薘薐薟虨螾螪螭蟅螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾襁襒褷襂覭覯覮觲觳謞"], -["eea1","謘謖謑謅謋謢謏謒謕謇謍謈謆謜謓謚豏豰豲豱豯貕貔賹赯蹎蹍蹓蹐蹌蹇轃轀邅遾鄸醚醢醛醙醟醡醝醠鎡鎃鎯鍤鍖鍇鍼鍘鍜鍶鍉鍐鍑鍠鍭鎏鍌鍪鍹鍗鍕鍒鍏鍱鍷鍻鍡鍞鍣鍧鎀鍎鍙闇闀闉闃闅閷隮隰隬霠霟霘霝霙鞚鞡鞜"], -["ef40","鞞鞝韕韔韱顁顄顊顉顅顃餥餫餬餪餳餲餯餭餱餰馘馣馡騂駺駴駷駹駸駶駻駽駾駼騃骾髾髽鬁髼魈鮚鮨鮞鮛鮦鮡鮥鮤鮆鮢鮠鮯鴳鵁鵧鴶鴮鴯鴱鴸鴰"], -["efa1","鵅鵂鵃鴾鴷鵀鴽翵鴭麊麉麍麰黈黚黻黿鼤鼣鼢齔龠儱儭儮嚘嚜嚗嚚嚝嚙奰嬼屩屪巀幭幮懘懟懭懮懱懪懰懫懖懩擿攄擽擸攁攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴檭歞毉氋瀇瀌瀍瀁瀅瀔瀎濿瀀濻瀦濼濷瀊爁燿燹爃燽獶"], -["f040","璸瓀璵瓁璾璶璻瓂甔甓癜癤癙癐癓癗癚皦皽盬矂瞺磿礌礓礔礉礐礒礑禭禬穟簜簩簙簠簟簭簝簦簨簢簥簰繜繐繖繣繘繢繟繑繠繗繓羵羳翷翸聵臑臒"], -["f0a1","臐艟艞薴藆藀藃藂薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓蟭蟘蟣螤蟗蟙蠁蟴蟨蟝襓襋襏襌襆襐襑襉謪謧謣謳謰謵譇謯謼謾謱謥謷謦謶謮謤謻謽謺豂豵貙貘貗賾贄贂贀蹜蹢蹠蹗蹖蹞蹥蹧"], -["f140","蹛蹚蹡蹝蹩蹔轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛鎝鎉鎧鎎鎪鎞鎦鎕鎈鎙鎟鎍鎱鎑鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘雝霣霢霥鞬鞮鞨鞫鞤鞪"], -["f1a1","鞢鞥韗韙韖韘韺顐顑顒颸饁餼餺騏騋騉騍騄騑騊騅騇騆髀髜鬈鬄鬅鬩鬵魊魌魋鯇鯆鯃鮿鯁鮵鮸鯓鮶鯄鮹鮽鵜鵓鵏鵊鵛鵋鵙鵖鵌鵗鵒鵔鵟鵘鵚麎麌黟鼁鼀鼖鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫嚭嚦嚧嚪嚬壚壝壛夒嬽嬾嬿巃幰"], -["f240","徿懻攇攐攍攉攌攎斄旞旝曞櫧櫠櫌櫑櫙櫋櫟櫜櫐櫫櫏櫍櫞歠殰氌瀙瀧瀠瀖瀫瀡瀢瀣瀩瀗瀤瀜瀪爌爊爇爂爅犥犦犤犣犡瓋瓅璷瓃甖癠矉矊矄矱礝礛"], -["f2a1","礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾聸臗臕艤艡艣藫藱藭藙藡藨藚藗藬藲藸藘藟藣藜藑藰藦藯藞藢蠀蟺蠃蟶蟷蠉蠌蠋蠆蟼蠈蟿蠊蠂襢襚襛襗襡襜襘襝襙覈覷覶觶譐譈譊譀譓譖譔譋譕"], -["f340","譑譂譒譗豃豷豶貚贆贇贉趬趪趭趫蹭蹸蹳蹪蹯蹻軂轒轑轏轐轓辴酀鄿醰醭鏞鏇鏏鏂鏚鏐鏹鏬鏌鏙鎩鏦鏊鏔鏮鏣鏕鏄鏎鏀鏒鏧镽闚闛雡霩霫霬霨霦"], -["f3a1","鞳鞷鞶韝韞韟顜顙顝顗颿颽颻颾饈饇饃馦馧騚騕騥騝騤騛騢騠騧騣騞騜騔髂鬋鬊鬎鬌鬷鯪鯫鯠鯞鯤鯦鯢鯰鯔鯗鯬鯜鯙鯥鯕鯡鯚鵷鶁鶊鶄鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼鼭齀齁齍齖齗齘匷嚲"], -["f440","嚵嚳壣孅巆巇廮廯忀忁懹攗攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱灂瀸瀿瀺瀹灀瀻瀳灁爓爔犨獽獼璺皫皪皾盭矌矎矏矍矲礥礣礧礨礤礩"], -["f4a1","禲穮穬穭竷籉籈籊籇籅糮繻繾纁纀羺翿聹臛臙舋艨艩蘢藿蘁藾蘛蘀藶蘄蘉蘅蘌藽蠙蠐蠑蠗蠓蠖襣襦覹觷譠譪譝譨譣譥譧譭趮躆躈躄轙轖轗轕轘轚邍酃酁醷醵醲醳鐋鐓鏻鐠鐏鐔鏾鐕鐐鐨鐙鐍鏵鐀鏷鐇鐎鐖鐒鏺鐉鏸鐊鏿"], -["f540","鏼鐌鏶鐑鐆闞闠闟霮霯鞹鞻韽韾顠顢顣顟飁飂饐饎饙饌饋饓騲騴騱騬騪騶騩騮騸騭髇髊髆鬐鬒鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤鶝鶒鶘鶐鶛"], -["f5a1","鶠鶔鶜鶪鶗鶡鶚鶢鶨鶞鶣鶿鶩鶖鶦鶧麙麛麚黥黤黧黦鼰鼮齛齠齞齝齙龑儺儹劘劗囃嚽嚾孈孇巋巏廱懽攛欂櫼欃櫸欀灃灄灊灈灉灅灆爝爚爙獾甗癪矐礭礱礯籔籓糲纊纇纈纋纆纍罍羻耰臝蘘蘪蘦蘟蘣蘜蘙蘧蘮蘡蘠蘩蘞蘥"], -["f640","蠩蠝蠛蠠蠤蠜蠫衊襭襩襮襫觺譹譸譅譺譻贐贔趯躎躌轞轛轝酆酄酅醹鐿鐻鐶鐩鐽鐼鐰鐹鐪鐷鐬鑀鐱闥闤闣霵霺鞿韡顤飉飆飀饘饖騹騽驆驄驂驁騺"], -["f6a1","騿髍鬕鬗鬘鬖鬺魒鰫鰝鰜鰬鰣鰨鰩鰤鰡鶷鶶鶼鷁鷇鷊鷏鶾鷅鷃鶻鶵鷎鶹鶺鶬鷈鶱鶭鷌鶳鷍鶲鹺麜黫黮黭鼛鼘鼚鼱齎齥齤龒亹囆囅囋奱孋孌巕巑廲攡攠攦攢欋欈欉氍灕灖灗灒爞爟犩獿瓘瓕瓙瓗癭皭礵禴穰穱籗籜籙籛籚"], -["f740","糴糱纑罏羇臞艫蘴蘵蘳蘬蘲蘶蠬蠨蠦蠪蠥襱覿覾觻譾讄讂讆讅譿贕躕躔躚躒躐躖躗轠轢酇鑌鑐鑊鑋鑏鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌驏驈驊"], -["f7a1","驉驒驐髐鬙鬫鬻魖魕鱆鱈鰿鱄鰹鰳鱁鰼鰷鰴鰲鰽鰶鷛鷒鷞鷚鷋鷐鷜鷑鷟鷩鷙鷘鷖鷵鷕鷝麶黰鼵鼳鼲齂齫龕龢儽劙壨壧奲孍巘蠯彏戁戃戄攩攥斖曫欑欒欏毊灛灚爢玂玁玃癰矔籧籦纕艬蘺虀蘹蘼蘱蘻蘾蠰蠲蠮蠳襶襴襳觾"], -["f840","讌讎讋讈豅贙躘轤轣醼鑢鑕鑝鑗鑞韄韅頀驖驙鬞鬟鬠鱒鱘鱐鱊鱍鱋鱕鱙鱌鱎鷻鷷鷯鷣鷫鷸鷤鷶鷡鷮鷦鷲鷰鷢鷬鷴鷳鷨鷭黂黐黲黳鼆鼜鼸鼷鼶齃齏"], -["f8a1","齱齰齮齯囓囍孎屭攭曭曮欓灟灡灝灠爣瓛瓥矕礸禷禶籪纗羉艭虃蠸蠷蠵衋讔讕躞躟躠躝醾醽釂鑫鑨鑩雥靆靃靇韇韥驞髕魙鱣鱧鱦鱢鱞鱠鸂鷾鸇鸃鸆鸅鸀鸁鸉鷿鷽鸄麠鼞齆齴齵齶囔攮斸欘欙欗欚灢爦犪矘矙礹籩籫糶纚"], -["f940","纘纛纙臠臡虆虇虈襹襺襼襻觿讘讙躥躤躣鑮鑭鑯鑱鑳靉顲饟鱨鱮鱭鸋鸍鸐鸏鸒鸑麡黵鼉齇齸齻齺齹圞灦籯蠼趲躦釃鑴鑸鑶鑵驠鱴鱳鱱鱵鸔鸓黶鼊"], -["f9a1","龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓"] -] diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/tables/eucjp.json b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/tables/eucjp.json deleted file mode 100644 index 4fa61ca..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/tables/eucjp.json +++ /dev/null @@ -1,182 +0,0 @@ -[ -["0","\u0000",127], -["8ea1","。",62], -["a1a1"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇"], -["a2a1","◆□■△▲▽▼※〒→←↑↓〓"], -["a2ba","∈∋⊆⊇⊂⊃∪∩"], -["a2ca","∧∨¬⇒⇔∀∃"], -["a2dc","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"], -["a2f2","ʼn♯♭♪†‡¶"], -["a2fe","◯"], -["a3b0","0",9], -["a3c1","A",25], -["a3e1","a",25], -["a4a1","ぁ",82], -["a5a1","ァ",85], -["a6a1","Α",16,"Σ",6], -["a6c1","α",16,"σ",6], -["a7a1","А",5,"ЁЖ",25], -["a7d1","а",5,"ёж",25], -["a8a1","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"], -["ada1","①",19,"Ⅰ",9], -["adc0","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"], -["addf","㍻〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"], -["b0a1","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"], -["b1a1","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応"], -["b2a1","押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"], -["b3a1","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱"], -["b4a1","粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"], -["b5a1","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京"], -["b6a1","供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"], -["b7a1","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲"], -["b8a1","検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"], -["b9a1","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込"], -["baa1","此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"], -["bba1","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時"], -["bca1","次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"], -["bda1","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償"], -["bea1","勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"], -["bfa1","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾"], -["c0a1","澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"], -["c1a1","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎"], -["c2a1","臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"], -["c3a1","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵"], -["c4a1","帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"], -["c5a1","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到"], -["c6a1","董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"], -["c7a1","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦"], -["c8a1","函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"], -["c9a1","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服"], -["caa1","福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"], -["cba1","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満"], -["cca1","漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"], -["cda1","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃"], -["cea1","痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"], -["cfa1","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"], -["d0a1","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"], -["d1a1","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨"], -["d2a1","辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"], -["d3a1","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉"], -["d4a1","圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"], -["d5a1","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓"], -["d6a1","屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"], -["d7a1","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚"], -["d8a1","悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"], -["d9a1","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼"], -["daa1","據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"], -["dba1","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍"], -["dca1","棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"], -["dda1","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾"], -["dea1","沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"], -["dfa1","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼"], -["e0a1","燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"], -["e1a1","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰"], -["e2a1","癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"], -["e3a1","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐"], -["e4a1","筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"], -["e5a1","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺"], -["e6a1","罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"], -["e7a1","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙"], -["e8a1","茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"], -["e9a1","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙"], -["eaa1","蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"], -["eba1","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫"], -["eca1","譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"], -["eda1","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸"], -["eea1","遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"], -["efa1","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞"], -["f0a1","陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"], -["f1a1","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷"], -["f2a1","髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"], -["f3a1","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠"], -["f4a1","堯槇遙瑤凜熙"], -["f9a1","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德"], -["faa1","忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"], -["fba1","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚"], -["fca1","釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"], -["fcf1","ⅰ",9,"¬¦'""], -["8fa2af","˘ˇ¸˙˝¯˛˚~΄΅"], -["8fa2c2","¡¦¿"], -["8fa2eb","ºª©®™¤№"], -["8fa6e1","ΆΈΉΊΪ"], -["8fa6e7","Ό"], -["8fa6e9","ΎΫ"], -["8fa6ec","Ώ"], -["8fa6f1","άέήίϊΐόςύϋΰώ"], -["8fa7c2","Ђ",10,"ЎЏ"], -["8fa7f2","ђ",10,"ўџ"], -["8fa9a1","ÆĐ"], -["8fa9a4","Ħ"], -["8fa9a6","IJ"], -["8fa9a8","ŁĿ"], -["8fa9ab","ŊØŒ"], -["8fa9af","ŦÞ"], -["8fa9c1","æđðħıijĸłŀʼnŋøœßŧþ"], -["8faaa1","ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈËÊĚĖĒĘ"], -["8faaba","ĜĞĢĠĤÍÌÏÎǏİĪĮĨĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙǕŴÝŸŶŹŽŻ"], -["8faba1","áàäâăǎāąåãćĉčçċďéèëêěėēęǵĝğ"], -["8fabbd","ġĥíìïîǐ"], -["8fabc5","īįĩĵķĺľļńňņñóòöôǒőōõŕřŗśŝšşťţúùüûŭǔűūųůũǘǜǚǖŵýÿŷźžż"], -["8fb0a1","丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄"], -["8fb1a1","侅侉侊侌侎侐侒侓侔侗侙侚侞侟侲侷侹侻侼侽侾俀俁俅俆俈俉俋俌俍俏俒俜俠俢俰俲俼俽俿倀倁倄倇倊倌倎倐倓倗倘倛倜倝倞倢倧倮倰倲倳倵偀偁偂偅偆偊偌偎偑偒偓偗偙偟偠偢偣偦偧偪偭偰偱倻傁傃傄傆傊傎傏傐"], -["8fb2a1","傒傓傔傖傛傜傞",4,"傪傯傰傹傺傽僀僃僄僇僌僎僐僓僔僘僜僝僟僢僤僦僨僩僯僱僶僺僾儃儆儇儈儋儌儍儎僲儐儗儙儛儜儝儞儣儧儨儬儭儯儱儳儴儵儸儹兂兊兏兓兕兗兘兟兤兦兾冃冄冋冎冘冝冡冣冭冸冺冼冾冿凂"], -["8fb3a1","凈减凑凒凓凕凘凞凢凥凮凲凳凴凷刁刂刅划刓刕刖刘刢刨刱刲刵刼剅剉剕剗剘剚剜剟剠剡剦剮剷剸剹劀劂劅劊劌劓劕劖劗劘劚劜劤劥劦劧劯劰劶劷劸劺劻劽勀勄勆勈勌勏勑勔勖勛勜勡勥勨勩勪勬勰勱勴勶勷匀匃匊匋"], -["8fb4a1","匌匑匓匘匛匜匞匟匥匧匨匩匫匬匭匰匲匵匼匽匾卂卌卋卙卛卡卣卥卬卭卲卹卾厃厇厈厎厓厔厙厝厡厤厪厫厯厲厴厵厷厸厺厽叀叅叏叒叓叕叚叝叞叠另叧叵吂吓吚吡吧吨吪启吱吴吵呃呄呇呍呏呞呢呤呦呧呩呫呭呮呴呿"], -["8fb5a1","咁咃咅咈咉咍咑咕咖咜咟咡咦咧咩咪咭咮咱咷咹咺咻咿哆哊响哎哠哪哬哯哶哼哾哿唀唁唅唈唉唌唍唎唕唪唫唲唵唶唻唼唽啁啇啉啊啍啐啑啘啚啛啞啠啡啤啦啿喁喂喆喈喎喏喑喒喓喔喗喣喤喭喲喿嗁嗃嗆嗉嗋嗌嗎嗑嗒"], -["8fb6a1","嗓嗗嗘嗛嗞嗢嗩嗶嗿嘅嘈嘊嘍",5,"嘙嘬嘰嘳嘵嘷嘹嘻嘼嘽嘿噀噁噃噄噆噉噋噍噏噔噞噠噡噢噣噦噩噭噯噱噲噵嚄嚅嚈嚋嚌嚕嚙嚚嚝嚞嚟嚦嚧嚨嚩嚫嚬嚭嚱嚳嚷嚾囅囉囊囋囏囐囌囍囙囜囝囟囡囤",4,"囱囫园"], -["8fb7a1","囶囷圁圂圇圊圌圑圕圚圛圝圠圢圣圤圥圩圪圬圮圯圳圴圽圾圿坅坆坌坍坒坢坥坧坨坫坭",4,"坳坴坵坷坹坺坻坼坾垁垃垌垔垗垙垚垜垝垞垟垡垕垧垨垩垬垸垽埇埈埌埏埕埝埞埤埦埧埩埭埰埵埶埸埽埾埿堃堄堈堉埡"], -["8fb8a1","堌堍堛堞堟堠堦堧堭堲堹堿塉塌塍塏塐塕塟塡塤塧塨塸塼塿墀墁墇墈墉墊墌墍墏墐墔墖墝墠墡墢墦墩墱墲壄墼壂壈壍壎壐壒壔壖壚壝壡壢壩壳夅夆夋夌夒夓夔虁夝夡夣夤夨夯夰夳夵夶夿奃奆奒奓奙奛奝奞奟奡奣奫奭"], -["8fb9a1","奯奲奵奶她奻奼妋妌妎妒妕妗妟妤妧妭妮妯妰妳妷妺妼姁姃姄姈姊姍姒姝姞姟姣姤姧姮姯姱姲姴姷娀娄娌娍娎娒娓娞娣娤娧娨娪娭娰婄婅婇婈婌婐婕婞婣婥婧婭婷婺婻婾媋媐媓媖媙媜媞媟媠媢媧媬媱媲媳媵媸媺媻媿"], -["8fbaa1","嫄嫆嫈嫏嫚嫜嫠嫥嫪嫮嫵嫶嫽嬀嬁嬈嬗嬴嬙嬛嬝嬡嬥嬭嬸孁孋孌孒孖孞孨孮孯孼孽孾孿宁宄宆宊宎宐宑宓宔宖宨宩宬宭宯宱宲宷宺宼寀寁寍寏寖",4,"寠寯寱寴寽尌尗尞尟尣尦尩尫尬尮尰尲尵尶屙屚屜屢屣屧屨屩"], -["8fbba1","屭屰屴屵屺屻屼屽岇岈岊岏岒岝岟岠岢岣岦岪岲岴岵岺峉峋峒峝峗峮峱峲峴崁崆崍崒崫崣崤崦崧崱崴崹崽崿嵂嵃嵆嵈嵕嵑嵙嵊嵟嵠嵡嵢嵤嵪嵭嵰嵹嵺嵾嵿嶁嶃嶈嶊嶒嶓嶔嶕嶙嶛嶟嶠嶧嶫嶰嶴嶸嶹巃巇巋巐巎巘巙巠巤"], -["8fbca1","巩巸巹帀帇帍帒帔帕帘帟帠帮帨帲帵帾幋幐幉幑幖幘幛幜幞幨幪",4,"幰庀庋庎庢庤庥庨庪庬庱庳庽庾庿廆廌廋廎廑廒廔廕廜廞廥廫异弆弇弈弎弙弜弝弡弢弣弤弨弫弬弮弰弴弶弻弽弿彀彄彅彇彍彐彔彘彛彠彣彤彧"], -["8fbda1","彯彲彴彵彸彺彽彾徉徍徏徖徜徝徢徧徫徤徬徯徰徱徸忄忇忈忉忋忐",4,"忞忡忢忨忩忪忬忭忮忯忲忳忶忺忼怇怊怍怓怔怗怘怚怟怤怭怳怵恀恇恈恉恌恑恔恖恗恝恡恧恱恾恿悂悆悈悊悎悑悓悕悘悝悞悢悤悥您悰悱悷"], -["8fbea1","悻悾惂惄惈惉惊惋惎惏惔惕惙惛惝惞惢惥惲惵惸惼惽愂愇愊愌愐",4,"愖愗愙愜愞愢愪愫愰愱愵愶愷愹慁慅慆慉慞慠慬慲慸慻慼慿憀憁憃憄憋憍憒憓憗憘憜憝憟憠憥憨憪憭憸憹憼懀懁懂懎懏懕懜懝懞懟懡懢懧懩懥"], -["8fbfa1","懬懭懯戁戃戄戇戓戕戜戠戢戣戧戩戫戹戽扂扃扄扆扌扐扑扒扔扖扚扜扤扭扯扳扺扽抍抎抏抐抦抨抳抶抷抺抾抿拄拎拕拖拚拪拲拴拼拽挃挄挊挋挍挐挓挖挘挩挪挭挵挶挹挼捁捂捃捄捆捊捋捎捒捓捔捘捛捥捦捬捭捱捴捵"], -["8fc0a1","捸捼捽捿掂掄掇掊掐掔掕掙掚掞掤掦掭掮掯掽揁揅揈揎揑揓揔揕揜揠揥揪揬揲揳揵揸揹搉搊搐搒搔搘搞搠搢搤搥搩搪搯搰搵搽搿摋摏摑摒摓摔摚摛摜摝摟摠摡摣摭摳摴摻摽撅撇撏撐撑撘撙撛撝撟撡撣撦撨撬撳撽撾撿"], -["8fc1a1","擄擉擊擋擌擎擐擑擕擗擤擥擩擪擭擰擵擷擻擿攁攄攈攉攊攏攓攔攖攙攛攞攟攢攦攩攮攱攺攼攽敃敇敉敐敒敔敟敠敧敫敺敽斁斅斊斒斕斘斝斠斣斦斮斲斳斴斿旂旈旉旎旐旔旖旘旟旰旲旴旵旹旾旿昀昄昈昉昍昑昒昕昖昝"], -["8fc2a1","昞昡昢昣昤昦昩昪昫昬昮昰昱昳昹昷晀晅晆晊晌晑晎晗晘晙晛晜晠晡曻晪晫晬晾晳晵晿晷晸晹晻暀晼暋暌暍暐暒暙暚暛暜暟暠暤暭暱暲暵暻暿曀曂曃曈曌曎曏曔曛曟曨曫曬曮曺朅朇朎朓朙朜朠朢朳朾杅杇杈杌杔杕杝"], -["8fc3a1","杦杬杮杴杶杻极构枎枏枑枓枖枘枙枛枰枱枲枵枻枼枽柹柀柂柃柅柈柉柒柗柙柜柡柦柰柲柶柷桒栔栙栝栟栨栧栬栭栯栰栱栳栻栿桄桅桊桌桕桗桘桛桫桮",4,"桵桹桺桻桼梂梄梆梈梖梘梚梜梡梣梥梩梪梮梲梻棅棈棌棏"], -["8fc4a1","棐棑棓棖棙棜棝棥棨棪棫棬棭棰棱棵棶棻棼棽椆椉椊椐椑椓椖椗椱椳椵椸椻楂楅楉楎楗楛楣楤楥楦楨楩楬楰楱楲楺楻楿榀榍榒榖榘榡榥榦榨榫榭榯榷榸榺榼槅槈槑槖槗槢槥槮槯槱槳槵槾樀樁樃樏樑樕樚樝樠樤樨樰樲"], -["8fc5a1","樴樷樻樾樿橅橆橉橊橎橐橑橒橕橖橛橤橧橪橱橳橾檁檃檆檇檉檋檑檛檝檞檟檥檫檯檰檱檴檽檾檿櫆櫉櫈櫌櫐櫔櫕櫖櫜櫝櫤櫧櫬櫰櫱櫲櫼櫽欂欃欆欇欉欏欐欑欗欛欞欤欨欫欬欯欵欶欻欿歆歊歍歒歖歘歝歠歧歫歮歰歵歽"], -["8fc6a1","歾殂殅殗殛殟殠殢殣殨殩殬殭殮殰殸殹殽殾毃毄毉毌毖毚毡毣毦毧毮毱毷毹毿氂氄氅氉氍氎氐氒氙氟氦氧氨氬氮氳氵氶氺氻氿汊汋汍汏汒汔汙汛汜汫汭汯汴汶汸汹汻沅沆沇沉沔沕沗沘沜沟沰沲沴泂泆泍泏泐泑泒泔泖"], -["8fc7a1","泚泜泠泧泩泫泬泮泲泴洄洇洊洎洏洑洓洚洦洧洨汧洮洯洱洹洼洿浗浞浟浡浥浧浯浰浼涂涇涑涒涔涖涗涘涪涬涴涷涹涽涿淄淈淊淎淏淖淛淝淟淠淢淥淩淯淰淴淶淼渀渄渞渢渧渲渶渹渻渼湄湅湈湉湋湏湑湒湓湔湗湜湝湞"], -["8fc8a1","湢湣湨湳湻湽溍溓溙溠溧溭溮溱溳溻溿滀滁滃滇滈滊滍滎滏滫滭滮滹滻滽漄漈漊漌漍漖漘漚漛漦漩漪漯漰漳漶漻漼漭潏潑潒潓潗潙潚潝潞潡潢潨潬潽潾澃澇澈澋澌澍澐澒澓澔澖澚澟澠澥澦澧澨澮澯澰澵澶澼濅濇濈濊"], -["8fc9a1","濚濞濨濩濰濵濹濼濽瀀瀅瀆瀇瀍瀗瀠瀣瀯瀴瀷瀹瀼灃灄灈灉灊灋灔灕灝灞灎灤灥灬灮灵灶灾炁炅炆炔",4,"炛炤炫炰炱炴炷烊烑烓烔烕烖烘烜烤烺焃",4,"焋焌焏焞焠焫焭焯焰焱焸煁煅煆煇煊煋煐煒煗煚煜煞煠"], -["8fcaa1","煨煹熀熅熇熌熒熚熛熠熢熯熰熲熳熺熿燀燁燄燋燌燓燖燙燚燜燸燾爀爇爈爉爓爗爚爝爟爤爫爯爴爸爹牁牂牃牅牎牏牐牓牕牖牚牜牞牠牣牨牫牮牯牱牷牸牻牼牿犄犉犍犎犓犛犨犭犮犱犴犾狁狇狉狌狕狖狘狟狥狳狴狺狻"], -["8fcba1","狾猂猄猅猇猋猍猒猓猘猙猞猢猤猧猨猬猱猲猵猺猻猽獃獍獐獒獖獘獝獞獟獠獦獧獩獫獬獮獯獱獷獹獼玀玁玃玅玆玎玐玓玕玗玘玜玞玟玠玢玥玦玪玫玭玵玷玹玼玽玿珅珆珉珋珌珏珒珓珖珙珝珡珣珦珧珩珴珵珷珹珺珻珽"], -["8fcca1","珿琀琁琄琇琊琑琚琛琤琦琨",9,"琹瑀瑃瑄瑆瑇瑋瑍瑑瑒瑗瑝瑢瑦瑧瑨瑫瑭瑮瑱瑲璀璁璅璆璇璉璏璐璑璒璘璙璚璜璟璠璡璣璦璨璩璪璫璮璯璱璲璵璹璻璿瓈瓉瓌瓐瓓瓘瓚瓛瓞瓟瓤瓨瓪瓫瓯瓴瓺瓻瓼瓿甆"], -["8fcda1","甒甖甗甠甡甤甧甩甪甯甶甹甽甾甿畀畃畇畈畎畐畒畗畞畟畡畯畱畹",5,"疁疅疐疒疓疕疙疜疢疤疴疺疿痀痁痄痆痌痎痏痗痜痟痠痡痤痧痬痮痯痱痹瘀瘂瘃瘄瘇瘈瘊瘌瘏瘒瘓瘕瘖瘙瘛瘜瘝瘞瘣瘥瘦瘩瘭瘲瘳瘵瘸瘹"], -["8fcea1","瘺瘼癊癀癁癃癄癅癉癋癕癙癟癤癥癭癮癯癱癴皁皅皌皍皕皛皜皝皟皠皢",6,"皪皭皽盁盅盉盋盌盎盔盙盠盦盨盬盰盱盶盹盼眀眆眊眎眒眔眕眗眙眚眜眢眨眭眮眯眴眵眶眹眽眾睂睅睆睊睍睎睏睒睖睗睜睞睟睠睢"], -["8fcfa1","睤睧睪睬睰睲睳睴睺睽瞀瞄瞌瞍瞔瞕瞖瞚瞟瞢瞧瞪瞮瞯瞱瞵瞾矃矉矑矒矕矙矞矟矠矤矦矪矬矰矱矴矸矻砅砆砉砍砎砑砝砡砢砣砭砮砰砵砷硃硄硇硈硌硎硒硜硞硠硡硣硤硨硪确硺硾碊碏碔碘碡碝碞碟碤碨碬碭碰碱碲碳"], -["8fd0a1","碻碽碿磇磈磉磌磎磒磓磕磖磤磛磟磠磡磦磪磲磳礀磶磷磺磻磿礆礌礐礚礜礞礟礠礥礧礩礭礱礴礵礻礽礿祄祅祆祊祋祏祑祔祘祛祜祧祩祫祲祹祻祼祾禋禌禑禓禔禕禖禘禛禜禡禨禩禫禯禱禴禸离秂秄秇秈秊秏秔秖秚秝秞"], -["8fd1a1","秠秢秥秪秫秭秱秸秼稂稃稇稉稊稌稑稕稛稞稡稧稫稭稯稰稴稵稸稹稺穄穅穇穈穌穕穖穙穜穝穟穠穥穧穪穭穵穸穾窀窂窅窆窊窋窐窑窔窞窠窣窬窳窵窹窻窼竆竉竌竎竑竛竨竩竫竬竱竴竻竽竾笇笔笟笣笧笩笪笫笭笮笯笰"], -["8fd2a1","笱笴笽笿筀筁筇筎筕筠筤筦筩筪筭筯筲筳筷箄箉箎箐箑箖箛箞箠箥箬箯箰箲箵箶箺箻箼箽篂篅篈篊篔篖篗篙篚篛篨篪篲篴篵篸篹篺篼篾簁簂簃簄簆簉簋簌簎簏簙簛簠簥簦簨簬簱簳簴簶簹簺籆籊籕籑籒籓籙",5], -["8fd3a1","籡籣籧籩籭籮籰籲籹籼籽粆粇粏粔粞粠粦粰粶粷粺粻粼粿糄糇糈糉糍糏糓糔糕糗糙糚糝糦糩糫糵紃紇紈紉紏紑紒紓紖紝紞紣紦紪紭紱紼紽紾絀絁絇絈絍絑絓絗絙絚絜絝絥絧絪絰絸絺絻絿綁綂綃綅綆綈綋綌綍綑綖綗綝"], -["8fd4a1","綞綦綧綪綳綶綷綹緂",4,"緌緍緎緗緙縀緢緥緦緪緫緭緱緵緶緹緺縈縐縑縕縗縜縝縠縧縨縬縭縯縳縶縿繄繅繇繎繐繒繘繟繡繢繥繫繮繯繳繸繾纁纆纇纊纍纑纕纘纚纝纞缼缻缽缾缿罃罄罇罏罒罓罛罜罝罡罣罤罥罦罭"], -["8fd5a1","罱罽罾罿羀羋羍羏羐羑羖羗羜羡羢羦羪羭羴羼羿翀翃翈翎翏翛翟翣翥翨翬翮翯翲翺翽翾翿耇耈耊耍耎耏耑耓耔耖耝耞耟耠耤耦耬耮耰耴耵耷耹耺耼耾聀聄聠聤聦聭聱聵肁肈肎肜肞肦肧肫肸肹胈胍胏胒胔胕胗胘胠胭胮"], -["8fd6a1","胰胲胳胶胹胺胾脃脋脖脗脘脜脞脠脤脧脬脰脵脺脼腅腇腊腌腒腗腠腡腧腨腩腭腯腷膁膐膄膅膆膋膎膖膘膛膞膢膮膲膴膻臋臃臅臊臎臏臕臗臛臝臞臡臤臫臬臰臱臲臵臶臸臹臽臿舀舃舏舓舔舙舚舝舡舢舨舲舴舺艃艄艅艆"], -["8fd7a1","艋艎艏艑艖艜艠艣艧艭艴艻艽艿芀芁芃芄芇芉芊芎芑芔芖芘芚芛芠芡芣芤芧芨芩芪芮芰芲芴芷芺芼芾芿苆苐苕苚苠苢苤苨苪苭苯苶苷苽苾茀茁茇茈茊茋荔茛茝茞茟茡茢茬茭茮茰茳茷茺茼茽荂荃荄荇荍荎荑荕荖荗荰荸"], -["8fd8a1","荽荿莀莂莄莆莍莒莔莕莘莙莛莜莝莦莧莩莬莾莿菀菇菉菏菐菑菔菝荓菨菪菶菸菹菼萁萆萊萏萑萕萙莭萯萹葅葇葈葊葍葏葑葒葖葘葙葚葜葠葤葥葧葪葰葳葴葶葸葼葽蒁蒅蒒蒓蒕蒞蒦蒨蒩蒪蒯蒱蒴蒺蒽蒾蓀蓂蓇蓈蓌蓏蓓"], -["8fd9a1","蓜蓧蓪蓯蓰蓱蓲蓷蔲蓺蓻蓽蔂蔃蔇蔌蔎蔐蔜蔞蔢蔣蔤蔥蔧蔪蔫蔯蔳蔴蔶蔿蕆蕏",4,"蕖蕙蕜",6,"蕤蕫蕯蕹蕺蕻蕽蕿薁薅薆薉薋薌薏薓薘薝薟薠薢薥薧薴薶薷薸薼薽薾薿藂藇藊藋藎薭藘藚藟藠藦藨藭藳藶藼"], -["8fdaa1","藿蘀蘄蘅蘍蘎蘐蘑蘒蘘蘙蘛蘞蘡蘧蘩蘶蘸蘺蘼蘽虀虂虆虒虓虖虗虘虙虝虠",4,"虩虬虯虵虶虷虺蚍蚑蚖蚘蚚蚜蚡蚦蚧蚨蚭蚱蚳蚴蚵蚷蚸蚹蚿蛀蛁蛃蛅蛑蛒蛕蛗蛚蛜蛠蛣蛥蛧蚈蛺蛼蛽蜄蜅蜇蜋蜎蜏蜐蜓蜔蜙蜞蜟蜡蜣"], -["8fdba1","蜨蜮蜯蜱蜲蜹蜺蜼蜽蜾蝀蝃蝅蝍蝘蝝蝡蝤蝥蝯蝱蝲蝻螃",6,"螋螌螐螓螕螗螘螙螞螠螣螧螬螭螮螱螵螾螿蟁蟈蟉蟊蟎蟕蟖蟙蟚蟜蟟蟢蟣蟤蟪蟫蟭蟱蟳蟸蟺蟿蠁蠃蠆蠉蠊蠋蠐蠙蠒蠓蠔蠘蠚蠛蠜蠞蠟蠨蠭蠮蠰蠲蠵"], -["8fdca1","蠺蠼衁衃衅衈衉衊衋衎衑衕衖衘衚衜衟衠衤衩衱衹衻袀袘袚袛袜袟袠袨袪袺袽袾裀裊",4,"裑裒裓裛裞裧裯裰裱裵裷褁褆褍褎褏褕褖褘褙褚褜褠褦褧褨褰褱褲褵褹褺褾襀襂襅襆襉襏襒襗襚襛襜襡襢襣襫襮襰襳襵襺"], -["8fdda1","襻襼襽覉覍覐覔覕覛覜覟覠覥覰覴覵覶覷覼觔",4,"觥觩觫觭觱觳觶觹觽觿訄訅訇訏訑訒訔訕訞訠訢訤訦訫訬訯訵訷訽訾詀詃詅詇詉詍詎詓詖詗詘詜詝詡詥詧詵詶詷詹詺詻詾詿誀誃誆誋誏誐誒誖誗誙誟誧誩誮誯誳"], -["8fdea1","誶誷誻誾諃諆諈諉諊諑諓諔諕諗諝諟諬諰諴諵諶諼諿謅謆謋謑謜謞謟謊謭謰謷謼譂",4,"譈譒譓譔譙譍譞譣譭譶譸譹譼譾讁讄讅讋讍讏讔讕讜讞讟谸谹谽谾豅豇豉豋豏豑豓豔豗豘豛豝豙豣豤豦豨豩豭豳豵豶豻豾貆"], -["8fdfa1","貇貋貐貒貓貙貛貜貤貹貺賅賆賉賋賏賖賕賙賝賡賨賬賯賰賲賵賷賸賾賿贁贃贉贒贗贛赥赩赬赮赿趂趄趈趍趐趑趕趞趟趠趦趫趬趯趲趵趷趹趻跀跅跆跇跈跊跎跑跔跕跗跙跤跥跧跬跰趼跱跲跴跽踁踄踅踆踋踑踔踖踠踡踢"], -["8fe0a1","踣踦踧踱踳踶踷踸踹踽蹀蹁蹋蹍蹎蹏蹔蹛蹜蹝蹞蹡蹢蹩蹬蹭蹯蹰蹱蹹蹺蹻躂躃躉躐躒躕躚躛躝躞躢躧躩躭躮躳躵躺躻軀軁軃軄軇軏軑軔軜軨軮軰軱軷軹軺軭輀輂輇輈輏輐輖輗輘輞輠輡輣輥輧輨輬輭輮輴輵輶輷輺轀轁"], -["8fe1a1","轃轇轏轑",4,"轘轝轞轥辝辠辡辤辥辦辵辶辸达迀迁迆迊迋迍运迒迓迕迠迣迤迨迮迱迵迶迻迾适逄逈逌逘逛逨逩逯逪逬逭逳逴逷逿遃遄遌遛遝遢遦遧遬遰遴遹邅邈邋邌邎邐邕邗邘邙邛邠邡邢邥邰邲邳邴邶邽郌邾郃"], -["8fe2a1","郄郅郇郈郕郗郘郙郜郝郟郥郒郶郫郯郰郴郾郿鄀鄄鄅鄆鄈鄍鄐鄔鄖鄗鄘鄚鄜鄞鄠鄥鄢鄣鄧鄩鄮鄯鄱鄴鄶鄷鄹鄺鄼鄽酃酇酈酏酓酗酙酚酛酡酤酧酭酴酹酺酻醁醃醅醆醊醎醑醓醔醕醘醞醡醦醨醬醭醮醰醱醲醳醶醻醼醽醿"], -["8fe3a1","釂釃釅釓釔釗釙釚釞釤釥釩釪釬",5,"釷釹釻釽鈀鈁鈄鈅鈆鈇鈉鈊鈌鈐鈒鈓鈖鈘鈜鈝鈣鈤鈥鈦鈨鈮鈯鈰鈳鈵鈶鈸鈹鈺鈼鈾鉀鉂鉃鉆鉇鉊鉍鉎鉏鉑鉘鉙鉜鉝鉠鉡鉥鉧鉨鉩鉮鉯鉰鉵",4,"鉻鉼鉽鉿銈銉銊銍銎銒銗"], -["8fe4a1","銙銟銠銤銥銧銨銫銯銲銶銸銺銻銼銽銿",4,"鋅鋆鋇鋈鋋鋌鋍鋎鋐鋓鋕鋗鋘鋙鋜鋝鋟鋠鋡鋣鋥鋧鋨鋬鋮鋰鋹鋻鋿錀錂錈錍錑錔錕錜錝錞錟錡錤錥錧錩錪錳錴錶錷鍇鍈鍉鍐鍑鍒鍕鍗鍘鍚鍞鍤鍥鍧鍩鍪鍭鍯鍰鍱鍳鍴鍶"], -["8fe5a1","鍺鍽鍿鎀鎁鎂鎈鎊鎋鎍鎏鎒鎕鎘鎛鎞鎡鎣鎤鎦鎨鎫鎴鎵鎶鎺鎩鏁鏄鏅鏆鏇鏉",4,"鏓鏙鏜鏞鏟鏢鏦鏧鏹鏷鏸鏺鏻鏽鐁鐂鐄鐈鐉鐍鐎鐏鐕鐖鐗鐟鐮鐯鐱鐲鐳鐴鐻鐿鐽鑃鑅鑈鑊鑌鑕鑙鑜鑟鑡鑣鑨鑫鑭鑮鑯鑱鑲钄钃镸镹"], -["8fe6a1","镾閄閈閌閍閎閝閞閟閡閦閩閫閬閴閶閺閽閿闆闈闉闋闐闑闒闓闙闚闝闞闟闠闤闦阝阞阢阤阥阦阬阱阳阷阸阹阺阼阽陁陒陔陖陗陘陡陮陴陻陼陾陿隁隂隃隄隉隑隖隚隝隟隤隥隦隩隮隯隳隺雊雒嶲雘雚雝雞雟雩雯雱雺霂"], -["8fe7a1","霃霅霉霚霛霝霡霢霣霨霱霳靁靃靊靎靏靕靗靘靚靛靣靧靪靮靳靶靷靸靻靽靿鞀鞉鞕鞖鞗鞙鞚鞞鞟鞢鞬鞮鞱鞲鞵鞶鞸鞹鞺鞼鞾鞿韁韄韅韇韉韊韌韍韎韐韑韔韗韘韙韝韞韠韛韡韤韯韱韴韷韸韺頇頊頙頍頎頔頖頜頞頠頣頦"], -["8fe8a1","頫頮頯頰頲頳頵頥頾顄顇顊顑顒顓顖顗顙顚顢顣顥顦顪顬颫颭颮颰颴颷颸颺颻颿飂飅飈飌飡飣飥飦飧飪飳飶餂餇餈餑餕餖餗餚餛餜餟餢餦餧餫餱",4,"餹餺餻餼饀饁饆饇饈饍饎饔饘饙饛饜饞饟饠馛馝馟馦馰馱馲馵"], -["8fe9a1","馹馺馽馿駃駉駓駔駙駚駜駞駧駪駫駬駰駴駵駹駽駾騂騃騄騋騌騐騑騖騞騠騢騣騤騧騭騮騳騵騶騸驇驁驄驊驋驌驎驑驔驖驝骪骬骮骯骲骴骵骶骹骻骾骿髁髃髆髈髎髐髒髕髖髗髛髜髠髤髥髧髩髬髲髳髵髹髺髽髿",4], -["8feaa1","鬄鬅鬈鬉鬋鬌鬍鬎鬐鬒鬖鬙鬛鬜鬠鬦鬫鬭鬳鬴鬵鬷鬹鬺鬽魈魋魌魕魖魗魛魞魡魣魥魦魨魪",4,"魳魵魷魸魹魿鮀鮄鮅鮆鮇鮉鮊鮋鮍鮏鮐鮔鮚鮝鮞鮦鮧鮩鮬鮰鮱鮲鮷鮸鮻鮼鮾鮿鯁鯇鯈鯎鯐鯗鯘鯝鯟鯥鯧鯪鯫鯯鯳鯷鯸"], -["8feba1","鯹鯺鯽鯿鰀鰂鰋鰏鰑鰖鰘鰙鰚鰜鰞鰢鰣鰦",4,"鰱鰵鰶鰷鰽鱁鱃鱄鱅鱉鱊鱎鱏鱐鱓鱔鱖鱘鱛鱝鱞鱟鱣鱩鱪鱜鱫鱨鱮鱰鱲鱵鱷鱻鳦鳲鳷鳹鴋鴂鴑鴗鴘鴜鴝鴞鴯鴰鴲鴳鴴鴺鴼鵅鴽鵂鵃鵇鵊鵓鵔鵟鵣鵢鵥鵩鵪鵫鵰鵶鵷鵻"], -["8feca1","鵼鵾鶃鶄鶆鶊鶍鶎鶒鶓鶕鶖鶗鶘鶡鶪鶬鶮鶱鶵鶹鶼鶿鷃鷇鷉鷊鷔鷕鷖鷗鷚鷞鷟鷠鷥鷧鷩鷫鷮鷰鷳鷴鷾鸊鸂鸇鸎鸐鸑鸒鸕鸖鸙鸜鸝鹺鹻鹼麀麂麃麄麅麇麎麏麖麘麛麞麤麨麬麮麯麰麳麴麵黆黈黋黕黟黤黧黬黭黮黰黱黲黵"], -["8feda1","黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃",4,"齓齕齖齗齘齚齝齞齨齩齭",4,"齳齵齺齽龏龐龑龒龔龖龗龞龡龢龣龥"] -] diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json deleted file mode 100644 index 85c6934..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +++ /dev/null @@ -1 +0,0 @@ -{"uChars":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],"gbChars":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]} \ No newline at end of file diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/tables/gbk-added.json b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/tables/gbk-added.json deleted file mode 100644 index b742e36..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/tables/gbk-added.json +++ /dev/null @@ -1,56 +0,0 @@ -[ -["a140","",62], -["a180","",32], -["a240","",62], -["a280","",32], -["a2ab","",5], -["a2e3","€"], -["a2ef",""], -["a2fd",""], -["a340","",62], -["a380","",31," "], -["a440","",62], -["a480","",32], -["a4f4","",10], -["a540","",62], -["a580","",32], -["a5f7","",7], -["a640","",62], -["a680","",32], -["a6b9","",7], -["a6d9","",6], -["a6ec",""], -["a6f3",""], -["a6f6","",8], -["a740","",62], -["a780","",32], -["a7c2","",14], -["a7f2","",12], -["a896","",10], -["a8bc","ḿ"], -["a8bf","ǹ"], -["a8c1",""], -["a8ea","",20], -["a958",""], -["a95b",""], -["a95d",""], -["a989","〾⿰",11], -["a997","",12], -["a9f0","",14], -["aaa1","",93], -["aba1","",93], -["aca1","",93], -["ada1","",93], -["aea1","",93], -["afa1","",93], -["d7fa","",4], -["f8a1","",93], -["f9a1","",93], -["faa1","",93], -["fba1","",93], -["fca1","",93], -["fda1","",93], -["fe50","⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌"], -["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93], -["8135f437",""] -] diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/tables/shiftjis.json b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/tables/shiftjis.json deleted file mode 100644 index 5a3a43c..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/tables/shiftjis.json +++ /dev/null @@ -1,125 +0,0 @@ -[ -["0","\u0000",128], -["a1","。",62], -["8140"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×"], -["8180","÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇◆□■△▲▽▼※〒→←↑↓〓"], -["81b8","∈∋⊆⊇⊂⊃∪∩"], -["81c8","∧∨¬⇒⇔∀∃"], -["81da","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"], -["81f0","ʼn♯♭♪†‡¶"], -["81fc","◯"], -["824f","0",9], -["8260","A",25], -["8281","a",25], -["829f","ぁ",82], -["8340","ァ",62], -["8380","ム",22], -["839f","Α",16,"Σ",6], -["83bf","α",16,"σ",6], -["8440","А",5,"ЁЖ",25], -["8470","а",5,"ёж",7], -["8480","о",17], -["849f","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"], -["8740","①",19,"Ⅰ",9], -["875f","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"], -["877e","㍻"], -["8780","〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"], -["889f","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"], -["8940","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円"], -["8980","園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"], -["8a40","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫"], -["8a80","橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"], -["8b40","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救"], -["8b80","朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"], -["8c40","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨"], -["8c80","劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"], -["8d40","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降"], -["8d80","項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"], -["8e40","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止"], -["8e80","死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"], -["8f40","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳"], -["8f80","準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"], -["9040","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨"], -["9080","逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"], -["9140","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻"], -["9180","操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"], -["9240","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄"], -["9280","逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"], -["9340","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬"], -["9380","凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"], -["9440","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅"], -["9480","楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"], -["9540","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷"], -["9580","斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"], -["9640","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆"], -["9680","摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"], -["9740","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲"], -["9780","沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"], -["9840","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"], -["989f","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"], -["9940","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭"], -["9980","凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"], -["9a40","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸"], -["9a80","噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"], -["9b40","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀"], -["9b80","它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"], -["9c40","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠"], -["9c80","怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"], -["9d40","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫"], -["9d80","捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"], -["9e40","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎"], -["9e80","梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"], -["9f40","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯"], -["9f80","麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"], -["e040","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝"], -["e080","烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"], -["e140","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿"], -["e180","痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"], -["e240","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰"], -["e280","窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"], -["e340","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷"], -["e380","縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"], -["e440","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤"], -["e480","艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"], -["e540","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬"], -["e580","蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"], -["e640","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧"], -["e680","諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"], -["e740","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜"], -["e780","轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"], -["e840","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙"], -["e880","閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"], -["e940","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃"], -["e980","騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"], -["ea40","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯"], -["ea80","黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇遙瑤凜熙"], -["ed40","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏"], -["ed80","塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"], -["ee40","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙"], -["ee80","蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"], -["eeef","ⅰ",9,"¬¦'""], -["f040","",62], -["f080","",124], -["f140","",62], -["f180","",124], -["f240","",62], -["f280","",124], -["f340","",62], -["f380","",124], -["f440","",62], -["f480","",124], -["f540","",62], -["f580","",124], -["f640","",62], -["f680","",124], -["f740","",62], -["f780","",124], -["f840","",62], -["f880","",124], -["f940",""], -["fa40","ⅰ",9,"Ⅰ",9,"¬¦'"㈱№℡∵纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊"], -["fa80","兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯"], -["fb40","涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神"], -["fb80","祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙"], -["fc40","髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"] -] diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/utf16.js b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/utf16.js deleted file mode 100644 index ae60d98..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/utf16.js +++ /dev/null @@ -1,187 +0,0 @@ -"use strict" -var Buffer = require("safer-buffer").Buffer - -// Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js - -// == UTF16-BE codec. ========================================================== - -exports.utf16be = Utf16BECodec -function Utf16BECodec () { -} - -Utf16BECodec.prototype.encoder = Utf16BEEncoder -Utf16BECodec.prototype.decoder = Utf16BEDecoder -Utf16BECodec.prototype.bomAware = true - -// -- Encoding - -function Utf16BEEncoder () { -} - -Utf16BEEncoder.prototype.write = function (str) { - var buf = Buffer.from(str, "ucs2") - for (var i = 0; i < buf.length; i += 2) { - var tmp = buf[i]; buf[i] = buf[i + 1]; buf[i + 1] = tmp - } - return buf -} - -Utf16BEEncoder.prototype.end = function () { -} - -// -- Decoding - -function Utf16BEDecoder () { - this.overflowByte = -1 -} - -Utf16BEDecoder.prototype.write = function (buf) { - if (buf.length == 0) { return "" } - - var buf2 = Buffer.alloc(buf.length + 1) - var i = 0; var j = 0 - - if (this.overflowByte !== -1) { - buf2[0] = buf[0] - buf2[1] = this.overflowByte - i = 1; j = 2 - } - - for (; i < buf.length - 1; i += 2, j += 2) { - buf2[j] = buf[i + 1] - buf2[j + 1] = buf[i] - } - - this.overflowByte = (i == buf.length - 1) ? buf[buf.length - 1] : -1 - - return buf2.slice(0, j).toString("ucs2") -} - -Utf16BEDecoder.prototype.end = function () { - this.overflowByte = -1 -} - -// == UTF-16 codec ============================================================= -// Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic. -// Defaults to UTF-16LE, as it's prevalent and default in Node. -// http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le -// Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'}); - -// Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false). - -exports.utf16 = Utf16Codec -function Utf16Codec (codecOptions, iconv) { - this.iconv = iconv -} - -Utf16Codec.prototype.encoder = Utf16Encoder -Utf16Codec.prototype.decoder = Utf16Decoder - -// -- Encoding (pass-through) - -function Utf16Encoder (options, codec) { - options = options || {} - if (options.addBOM === undefined) { options.addBOM = true } - this.encoder = codec.iconv.getEncoder("utf-16le", options) -} - -Utf16Encoder.prototype.write = function (str) { - return this.encoder.write(str) -} - -Utf16Encoder.prototype.end = function () { - return this.encoder.end() -} - -// -- Decoding - -function Utf16Decoder (options, codec) { - this.decoder = null - this.initialBufs = [] - this.initialBufsLen = 0 - - this.options = options || {} - this.iconv = codec.iconv -} - -Utf16Decoder.prototype.write = function (buf) { - if (!this.decoder) { - // Codec is not chosen yet. Accumulate initial bytes. - this.initialBufs.push(buf) - this.initialBufsLen += buf.length - - if (this.initialBufsLen < 16) // We need more bytes to use space heuristic (see below) - { return "" } - - // We have enough bytes -> detect endianness. - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding) - this.decoder = this.iconv.getDecoder(encoding, this.options) - - var resStr = "" - for (var i = 0; i < this.initialBufs.length; i++) { resStr += this.decoder.write(this.initialBufs[i]) } - - this.initialBufs.length = this.initialBufsLen = 0 - return resStr - } - - return this.decoder.write(buf) -} - -Utf16Decoder.prototype.end = function () { - if (!this.decoder) { - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding) - this.decoder = this.iconv.getDecoder(encoding, this.options) - - var resStr = "" - for (var i = 0; i < this.initialBufs.length; i++) { resStr += this.decoder.write(this.initialBufs[i]) } - - var trail = this.decoder.end() - if (trail) { resStr += trail } - - this.initialBufs.length = this.initialBufsLen = 0 - return resStr - } - return this.decoder.end() -} - -function detectEncoding (bufs, defaultEncoding) { - var b = [] - var charsProcessed = 0 - // Number of ASCII chars when decoded as LE or BE. - var asciiCharsLE = 0 - var asciiCharsBE = 0 - - outerLoop: - for (var i = 0; i < bufs.length; i++) { - var buf = bufs[i] - for (var j = 0; j < buf.length; j++) { - b.push(buf[j]) - if (b.length === 2) { - if (charsProcessed === 0) { - // Check BOM first. - if (b[0] === 0xFF && b[1] === 0xFE) return "utf-16le" - if (b[0] === 0xFE && b[1] === 0xFF) return "utf-16be" - } - - if (b[0] === 0 && b[1] !== 0) asciiCharsBE++ - if (b[0] !== 0 && b[1] === 0) asciiCharsLE++ - - b.length = 0 - charsProcessed++ - - if (charsProcessed >= 100) { - break outerLoop - } - } - } - } - - // Make decisions. - // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon. - // So, we count ASCII as if it was LE or BE, and decide from that. - if (asciiCharsBE > asciiCharsLE) return "utf-16be" - if (asciiCharsBE < asciiCharsLE) return "utf-16le" - - // Couldn't decide (likely all zeros or not enough data). - return defaultEncoding || "utf-16le" -} diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/utf32.js b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/utf32.js deleted file mode 100644 index 7231789..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/utf32.js +++ /dev/null @@ -1,307 +0,0 @@ -"use strict" - -var Buffer = require("safer-buffer").Buffer - -// == UTF32-LE/BE codec. ========================================================== - -exports._utf32 = Utf32Codec - -function Utf32Codec (codecOptions, iconv) { - this.iconv = iconv - this.bomAware = true - this.isLE = codecOptions.isLE -} - -exports.utf32le = { type: "_utf32", isLE: true } -exports.utf32be = { type: "_utf32", isLE: false } - -// Aliases -exports.ucs4le = "utf32le" -exports.ucs4be = "utf32be" - -Utf32Codec.prototype.encoder = Utf32Encoder -Utf32Codec.prototype.decoder = Utf32Decoder - -// -- Encoding - -function Utf32Encoder (options, codec) { - this.isLE = codec.isLE - this.highSurrogate = 0 -} - -Utf32Encoder.prototype.write = function (str) { - var src = Buffer.from(str, "ucs2") - var dst = Buffer.alloc(src.length * 2) - var write32 = this.isLE ? dst.writeUInt32LE : dst.writeUInt32BE - var offset = 0 - - for (var i = 0; i < src.length; i += 2) { - var code = src.readUInt16LE(i) - var isHighSurrogate = (code >= 0xD800 && code < 0xDC00) - var isLowSurrogate = (code >= 0xDC00 && code < 0xE000) - - if (this.highSurrogate) { - if (isHighSurrogate || !isLowSurrogate) { - // There shouldn't be two high surrogates in a row, nor a high surrogate which isn't followed by a low - // surrogate. If this happens, keep the pending high surrogate as a stand-alone semi-invalid character - // (technically wrong, but expected by some applications, like Windows file names). - write32.call(dst, this.highSurrogate, offset) - offset += 4 - } else { - // Create 32-bit value from high and low surrogates; - var codepoint = (((this.highSurrogate - 0xD800) << 10) | (code - 0xDC00)) + 0x10000 - - write32.call(dst, codepoint, offset) - offset += 4 - this.highSurrogate = 0 - - continue - } - } - - if (isHighSurrogate) { this.highSurrogate = code } else { - // Even if the current character is a low surrogate, with no previous high surrogate, we'll - // encode it as a semi-invalid stand-alone character for the same reasons expressed above for - // unpaired high surrogates. - write32.call(dst, code, offset) - offset += 4 - this.highSurrogate = 0 - } - } - - if (offset < dst.length) { dst = dst.slice(0, offset) } - - return dst -} - -Utf32Encoder.prototype.end = function () { - // Treat any leftover high surrogate as a semi-valid independent character. - if (!this.highSurrogate) { return } - - var buf = Buffer.alloc(4) - - if (this.isLE) { buf.writeUInt32LE(this.highSurrogate, 0) } else { buf.writeUInt32BE(this.highSurrogate, 0) } - - this.highSurrogate = 0 - - return buf -} - -// -- Decoding - -function Utf32Decoder (options, codec) { - this.isLE = codec.isLE - this.badChar = codec.iconv.defaultCharUnicode.charCodeAt(0) - this.overflow = [] -} - -Utf32Decoder.prototype.write = function (src) { - if (src.length === 0) { return "" } - - var i = 0 - var codepoint = 0 - var dst = Buffer.alloc(src.length + 4) - var offset = 0 - var isLE = this.isLE - var overflow = this.overflow - var badChar = this.badChar - - if (overflow.length > 0) { - for (; i < src.length && overflow.length < 4; i++) { overflow.push(src[i]) } - - if (overflow.length === 4) { - // NOTE: codepoint is a signed int32 and can be negative. - // NOTE: We copied this block from below to help V8 optimize it (it works with array, not buffer). - if (isLE) { - codepoint = overflow[i] | (overflow[i + 1] << 8) | (overflow[i + 2] << 16) | (overflow[i + 3] << 24) - } else { - codepoint = overflow[i + 3] | (overflow[i + 2] << 8) | (overflow[i + 1] << 16) | (overflow[i] << 24) - } - overflow.length = 0 - - offset = _writeCodepoint(dst, offset, codepoint, badChar) - } - } - - // Main loop. Should be as optimized as possible. - for (; i < src.length - 3; i += 4) { - // NOTE: codepoint is a signed int32 and can be negative. - if (isLE) { - codepoint = src[i] | (src[i + 1] << 8) | (src[i + 2] << 16) | (src[i + 3] << 24) - } else { - codepoint = src[i + 3] | (src[i + 2] << 8) | (src[i + 1] << 16) | (src[i] << 24) - } - offset = _writeCodepoint(dst, offset, codepoint, badChar) - } - - // Keep overflowing bytes. - for (; i < src.length; i++) { - overflow.push(src[i]) - } - - return dst.slice(0, offset).toString("ucs2") -} - -function _writeCodepoint (dst, offset, codepoint, badChar) { - // NOTE: codepoint is signed int32 and can be negative. We keep it that way to help V8 with optimizations. - if (codepoint < 0 || codepoint > 0x10FFFF) { - // Not a valid Unicode codepoint - codepoint = badChar - } - - // Ephemeral Planes: Write high surrogate. - if (codepoint >= 0x10000) { - codepoint -= 0x10000 - - var high = 0xD800 | (codepoint >> 10) - dst[offset++] = high & 0xff - dst[offset++] = high >> 8 - - // Low surrogate is written below. - var codepoint = 0xDC00 | (codepoint & 0x3FF) - } - - // Write BMP char or low surrogate. - dst[offset++] = codepoint & 0xff - dst[offset++] = codepoint >> 8 - - return offset -}; - -Utf32Decoder.prototype.end = function () { - this.overflow.length = 0 -} - -// == UTF-32 Auto codec ============================================================= -// Decoder chooses automatically from UTF-32LE and UTF-32BE using BOM and space-based heuristic. -// Defaults to UTF-32LE. http://en.wikipedia.org/wiki/UTF-32 -// Encoder/decoder default can be changed: iconv.decode(buf, 'utf32', {defaultEncoding: 'utf-32be'}); - -// Encoder prepends BOM (which can be overridden with (addBOM: false}). - -exports.utf32 = Utf32AutoCodec -exports.ucs4 = "utf32" - -function Utf32AutoCodec (options, iconv) { - this.iconv = iconv -} - -Utf32AutoCodec.prototype.encoder = Utf32AutoEncoder -Utf32AutoCodec.prototype.decoder = Utf32AutoDecoder - -// -- Encoding - -function Utf32AutoEncoder (options, codec) { - options = options || {} - - if (options.addBOM === undefined) { - options.addBOM = true - } - - this.encoder = codec.iconv.getEncoder(options.defaultEncoding || "utf-32le", options) -} - -Utf32AutoEncoder.prototype.write = function (str) { - return this.encoder.write(str) -} - -Utf32AutoEncoder.prototype.end = function () { - return this.encoder.end() -} - -// -- Decoding - -function Utf32AutoDecoder (options, codec) { - this.decoder = null - this.initialBufs = [] - this.initialBufsLen = 0 - this.options = options || {} - this.iconv = codec.iconv -} - -Utf32AutoDecoder.prototype.write = function (buf) { - if (!this.decoder) { - // Codec is not chosen yet. Accumulate initial bytes. - this.initialBufs.push(buf) - this.initialBufsLen += buf.length - - if (this.initialBufsLen < 32) // We need more bytes to use space heuristic (see below) - { return "" } - - // We have enough bytes -> detect endianness. - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding) - this.decoder = this.iconv.getDecoder(encoding, this.options) - - var resStr = "" - for (var i = 0; i < this.initialBufs.length; i++) { resStr += this.decoder.write(this.initialBufs[i]) } - - this.initialBufs.length = this.initialBufsLen = 0 - return resStr - } - - return this.decoder.write(buf) -} - -Utf32AutoDecoder.prototype.end = function () { - if (!this.decoder) { - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding) - this.decoder = this.iconv.getDecoder(encoding, this.options) - - var resStr = "" - for (var i = 0; i < this.initialBufs.length; i++) { resStr += this.decoder.write(this.initialBufs[i]) } - - var trail = this.decoder.end() - if (trail) { resStr += trail } - - this.initialBufs.length = this.initialBufsLen = 0 - return resStr - } - - return this.decoder.end() -} - -function detectEncoding (bufs, defaultEncoding) { - var b = [] - var charsProcessed = 0 - var invalidLE = 0; var invalidBE = 0 // Number of invalid chars when decoded as LE or BE. - var bmpCharsLE = 0; var bmpCharsBE = 0 // Number of BMP chars when decoded as LE or BE. - - outerLoop: - for (var i = 0; i < bufs.length; i++) { - var buf = bufs[i] - for (var j = 0; j < buf.length; j++) { - b.push(buf[j]) - if (b.length === 4) { - if (charsProcessed === 0) { - // Check BOM first. - if (b[0] === 0xFF && b[1] === 0xFE && b[2] === 0 && b[3] === 0) { - return "utf-32le" - } - if (b[0] === 0 && b[1] === 0 && b[2] === 0xFE && b[3] === 0xFF) { - return "utf-32be" - } - } - - if (b[0] !== 0 || b[1] > 0x10) invalidBE++ - if (b[3] !== 0 || b[2] > 0x10) invalidLE++ - - if (b[0] === 0 && b[1] === 0 && (b[2] !== 0 || b[3] !== 0)) bmpCharsBE++ - if ((b[0] !== 0 || b[1] !== 0) && b[2] === 0 && b[3] === 0) bmpCharsLE++ - - b.length = 0 - charsProcessed++ - - if (charsProcessed >= 100) { - break outerLoop - } - } - } - } - - // Make decisions. - if (bmpCharsBE - invalidBE > bmpCharsLE - invalidLE) return "utf-32be" - if (bmpCharsBE - invalidBE < bmpCharsLE - invalidLE) return "utf-32le" - - // Couldn't decide (likely all zeros or not enough data). - return defaultEncoding || "utf-32le" -} diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/utf7.js b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/utf7.js deleted file mode 100644 index fe72a9d..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/encodings/utf7.js +++ /dev/null @@ -1,283 +0,0 @@ -"use strict" -var Buffer = require("safer-buffer").Buffer - -// UTF-7 codec, according to https://tools.ietf.org/html/rfc2152 -// See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3 - -exports.utf7 = Utf7Codec -exports.unicode11utf7 = "utf7" // Alias UNICODE-1-1-UTF-7 -function Utf7Codec (codecOptions, iconv) { - this.iconv = iconv -}; - -Utf7Codec.prototype.encoder = Utf7Encoder -Utf7Codec.prototype.decoder = Utf7Decoder -Utf7Codec.prototype.bomAware = true - -// -- Encoding - -// Why scape ()?./? -// eslint-disable-next-line no-useless-escape -var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g - -function Utf7Encoder (options, codec) { - this.iconv = codec.iconv -} - -Utf7Encoder.prototype.write = function (str) { - // Naive implementation. - // Non-direct chars are encoded as "+-"; single "+" char is encoded as "+-". - return Buffer.from(str.replace(nonDirectChars, function (chunk) { - return "+" + (chunk === "+" - ? "" - : this.iconv.encode(chunk, "utf16-be").toString("base64").replace(/=+$/, "")) + - "-" - }.bind(this))) -} - -Utf7Encoder.prototype.end = function () { -} - -// -- Decoding - -function Utf7Decoder (options, codec) { - this.iconv = codec.iconv - this.inBase64 = false - this.base64Accum = "" -} - -// Why scape /? -// eslint-disable-next-line no-useless-escape -var base64Regex = /[A-Za-z0-9\/+]/ -var base64Chars = [] -for (var i = 0; i < 256; i++) { base64Chars[i] = base64Regex.test(String.fromCharCode(i)) } - -var plusChar = "+".charCodeAt(0) -var minusChar = "-".charCodeAt(0) -var andChar = "&".charCodeAt(0) - -Utf7Decoder.prototype.write = function (buf) { - var res = ""; var lastI = 0 - var inBase64 = this.inBase64 - var base64Accum = this.base64Accum - - // The decoder is more involved as we must handle chunks in stream. - - for (var i = 0; i < buf.length; i++) { - if (!inBase64) { // We're in direct mode. - // Write direct chars until '+' - if (buf[i] == plusChar) { - res += this.iconv.decode(buf.slice(lastI, i), "ascii") // Write direct chars. - lastI = i + 1 - inBase64 = true - } - } else { // We decode base64. - if (!base64Chars[buf[i]]) { // Base64 ended. - if (i == lastI && buf[i] == minusChar) { // "+-" -> "+" - res += "+" - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii") - res += this.iconv.decode(Buffer.from(b64str, "base64"), "utf16-be") - } - - if (buf[i] != minusChar) // Minus is absorbed after base64. - { i-- } - - lastI = i + 1 - inBase64 = false - base64Accum = "" - } - } - } - - if (!inBase64) { - res += this.iconv.decode(buf.slice(lastI), "ascii") // Write direct chars. - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii") - - var canBeDecoded = b64str.length - (b64str.length % 8) // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. - base64Accum = b64str.slice(canBeDecoded) // The rest will be decoded in future. - b64str = b64str.slice(0, canBeDecoded) - - res += this.iconv.decode(Buffer.from(b64str, "base64"), "utf16-be") - } - - this.inBase64 = inBase64 - this.base64Accum = base64Accum - - return res -} - -Utf7Decoder.prototype.end = function () { - var res = "" - if (this.inBase64 && this.base64Accum.length > 0) { res = this.iconv.decode(Buffer.from(this.base64Accum, "base64"), "utf16-be") } - - this.inBase64 = false - this.base64Accum = "" - return res -} - -// UTF-7-IMAP codec. -// RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3) -// Differences: -// * Base64 part is started by "&" instead of "+" -// * Direct characters are 0x20-0x7E, except "&" (0x26) -// * In Base64, "," is used instead of "/" -// * Base64 must not be used to represent direct characters. -// * No implicit shift back from Base64 (should always end with '-') -// * String must end in non-shifted position. -// * "-&" while in base64 is not allowed. - -exports.utf7imap = Utf7IMAPCodec -function Utf7IMAPCodec (codecOptions, iconv) { - this.iconv = iconv -}; - -Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder -Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder -Utf7IMAPCodec.prototype.bomAware = true - -// -- Encoding - -function Utf7IMAPEncoder (options, codec) { - this.iconv = codec.iconv - this.inBase64 = false - this.base64Accum = Buffer.alloc(6) - this.base64AccumIdx = 0 -} - -Utf7IMAPEncoder.prototype.write = function (str) { - var inBase64 = this.inBase64 - var base64Accum = this.base64Accum - var base64AccumIdx = this.base64AccumIdx - var buf = Buffer.alloc(str.length * 5 + 10); var bufIdx = 0 - - for (var i = 0; i < str.length; i++) { - var uChar = str.charCodeAt(i) - if (uChar >= 0x20 && uChar <= 0x7E) { // Direct character or '&'. - if (inBase64) { - if (base64AccumIdx > 0) { - bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString("base64").replace(/\//g, ",").replace(/=+$/, ""), bufIdx) - base64AccumIdx = 0 - } - - buf[bufIdx++] = minusChar // Write '-', then go to direct mode. - inBase64 = false - } - - if (!inBase64) { - buf[bufIdx++] = uChar // Write direct character - - if (uChar === andChar) // Ampersand -> '&-' - { buf[bufIdx++] = minusChar } - } - } else { // Non-direct character - if (!inBase64) { - buf[bufIdx++] = andChar // Write '&', then go to base64 mode. - inBase64 = true - } - if (inBase64) { - base64Accum[base64AccumIdx++] = uChar >> 8 - base64Accum[base64AccumIdx++] = uChar & 0xFF - - if (base64AccumIdx == base64Accum.length) { - bufIdx += buf.write(base64Accum.toString("base64").replace(/\//g, ","), bufIdx) - base64AccumIdx = 0 - } - } - } - } - - this.inBase64 = inBase64 - this.base64AccumIdx = base64AccumIdx - - return buf.slice(0, bufIdx) -} - -Utf7IMAPEncoder.prototype.end = function () { - var buf = Buffer.alloc(10); var bufIdx = 0 - if (this.inBase64) { - if (this.base64AccumIdx > 0) { - bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString("base64").replace(/\//g, ",").replace(/=+$/, ""), bufIdx) - this.base64AccumIdx = 0 - } - - buf[bufIdx++] = minusChar // Write '-', then go to direct mode. - this.inBase64 = false - } - - return buf.slice(0, bufIdx) -} - -// -- Decoding - -function Utf7IMAPDecoder (options, codec) { - this.iconv = codec.iconv - this.inBase64 = false - this.base64Accum = "" -} - -var base64IMAPChars = base64Chars.slice() -base64IMAPChars[",".charCodeAt(0)] = true - -Utf7IMAPDecoder.prototype.write = function (buf) { - var res = ""; var lastI = 0 - var inBase64 = this.inBase64 - var base64Accum = this.base64Accum - - // The decoder is more involved as we must handle chunks in stream. - // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end). - - for (var i = 0; i < buf.length; i++) { - if (!inBase64) { // We're in direct mode. - // Write direct chars until '&' - if (buf[i] == andChar) { - res += this.iconv.decode(buf.slice(lastI, i), "ascii") // Write direct chars. - lastI = i + 1 - inBase64 = true - } - } else { // We decode base64. - if (!base64IMAPChars[buf[i]]) { // Base64 ended. - if (i == lastI && buf[i] == minusChar) { // "&-" -> "&" - res += "&" - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii").replace(/,/g, "/") - res += this.iconv.decode(Buffer.from(b64str, "base64"), "utf16-be") - } - - if (buf[i] != minusChar) // Minus may be absorbed after base64. - { i-- } - - lastI = i + 1 - inBase64 = false - base64Accum = "" - } - } - } - - if (!inBase64) { - res += this.iconv.decode(buf.slice(lastI), "ascii") // Write direct chars. - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii").replace(/,/g, "/") - - var canBeDecoded = b64str.length - (b64str.length % 8) // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. - base64Accum = b64str.slice(canBeDecoded) // The rest will be decoded in future. - b64str = b64str.slice(0, canBeDecoded) - - res += this.iconv.decode(Buffer.from(b64str, "base64"), "utf16-be") - } - - this.inBase64 = inBase64 - this.base64Accum = base64Accum - - return res -} - -Utf7IMAPDecoder.prototype.end = function () { - var res = "" - if (this.inBase64 && this.base64Accum.length > 0) { res = this.iconv.decode(Buffer.from(this.base64Accum, "base64"), "utf16-be") } - - this.inBase64 = false - this.base64Accum = "" - return res -} diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/lib/bom-handling.js b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/lib/bom-handling.js deleted file mode 100644 index a86a6b5..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/lib/bom-handling.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict" - -var BOMChar = "\uFEFF" - -exports.PrependBOM = PrependBOMWrapper -function PrependBOMWrapper (encoder, options) { - this.encoder = encoder - this.addBOM = true -} - -PrependBOMWrapper.prototype.write = function (str) { - if (this.addBOM) { - str = BOMChar + str - this.addBOM = false - } - - return this.encoder.write(str) -} - -PrependBOMWrapper.prototype.end = function () { - return this.encoder.end() -} - -// ------------------------------------------------------------------------------ - -exports.StripBOM = StripBOMWrapper -function StripBOMWrapper (decoder, options) { - this.decoder = decoder - this.pass = false - this.options = options || {} -} - -StripBOMWrapper.prototype.write = function (buf) { - var res = this.decoder.write(buf) - if (this.pass || !res) { return res } - - if (res[0] === BOMChar) { - res = res.slice(1) - if (typeof this.options.stripBOM === "function") { this.options.stripBOM() } - } - - this.pass = true - return res -} - -StripBOMWrapper.prototype.end = function () { - return this.decoder.end() -} diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/lib/helpers/merge-exports.js b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/lib/helpers/merge-exports.js deleted file mode 100644 index e79e041..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/lib/helpers/merge-exports.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict" - -var hasOwn = typeof Object.hasOwn === "undefined" ? Function.call.bind(Object.prototype.hasOwnProperty) : Object.hasOwn - -function mergeModules (target, module) { - for (var key in module) { - if (hasOwn(module, key)) { - target[key] = module[key] - } - } -} - -module.exports = mergeModules diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/lib/index.d.ts b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/lib/index.d.ts deleted file mode 100644 index b11d99e..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/lib/index.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -/* --------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - * REQUIREMENT: This definition is dependent on the @types/node definition. - * Install with `npm install @types/node --save-dev` - *-------------------------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------------------------------- - * This file provides detailed typings for the public API of iconv-lite - *-------------------------------------------------------------------------------------------- */ - -import type Stream = require("stream") -import type { Encoding } from "../types/encodings" - -declare namespace iconv { - export interface DecodeOptions { - /** - * Strip the Byte Order Mark (BOM) from the input, - * when decoding, if the codec is BOM-aware. @default true - */ - stripBOM?: boolean; - /** Override the default endianness for `UTF-16` and `UTF-32` decodings. */ - defaultEncoding?: "utf16be" | "utf32be"; - } - - export interface EncodeOptions { - /** - * Add a Byte Order Mark (BOM) to the output, when encoding, - * if the codec is BOM-aware. @default false - */ - addBOM?: boolean; - /** Override the default endianness for `UTF-32` encoding. */ - defaultEncoding?: "utf32be"; - } - - export interface EncoderStream { - write(str: string): Buffer; - end(): Buffer | undefined; - } - - export interface DecoderStream { - write(buf: Buffer): string; - end(): string | undefined; - } - - export interface Codec { - encoder: new (options?: EncodeOptions, codec?: Codec) => EncoderStream; - decoder: new (options?: DecodeOptions, codec?: Codec) => DecoderStream; - bomAware?: boolean; - [key: string]: any; - } - - /** Encodes a `string` into a `Buffer`, using the provided `encoding`. */ - export function encode (content: string, encoding: Encoding, options?: EncodeOptions): Buffer - - /** Decodes a `Buffer` into a `string`, using the provided `encoding`. */ - export function decode (buffer: Buffer | Uint8Array, encoding: Encoding, options?: DecodeOptions): string - - /** Checks if a given encoding is supported by `iconv-lite`. */ - export function encodingExists (encoding: string): encoding is Encoding - - /** Legacy alias for {@link iconv.encode}. */ - export const toEncoding: typeof iconv.encode - - /** Legacy alias for {@link iconv.decode}. */ - export const fromEncoding: typeof iconv.decode - - /** Creates a stream that decodes binary data from a given `encoding` into strings. */ - export function decodeStream (encoding: Encoding, options?: DecodeOptions): NodeJS.ReadWriteStream - - /** Creates a stream that encodes strings into binary data in a given `encoding`. */ - export function encodeStream (encoding: Encoding, options?: EncodeOptions): NodeJS.ReadWriteStream - - /** - * Explicitly enable Streaming API in browser environments by passing in: - * ```js - * require('stream') - * ``` - * @example iconv.enableStreamingAPI(require('stream')); - */ - export function enableStreamingAPI (stream_module: { Transform: typeof Stream.Transform }): void - - /** Creates and returns a low-level encoder stream. */ - export function getEncoder (encoding: Encoding, options?: EncodeOptions): EncoderStream - - /** Creates and returns a low-level decoder stream. */ - export function getDecoder (encoding: Encoding, options?: DecodeOptions): DecoderStream - - /** - * Returns a codec object for the given `encoding`. - * @throws If the `encoding` is not recognized. - */ - export function getCodec (encoding: Encoding): Codec - - /** Strips all non-alphanumeric characters and appended year from `encoding`. */ - export function _canonicalizeEncoding (encoding: Encoding): string - - /** A cache of all loaded encoding definitions. */ - export let encodings: Record< - Encoding, - | string - | { - type: string; - [key: string]: any; - } - > | null - - /** A cache of initialized codec objects. */ - export let _codecDataCache: Record - - /** The character used for untranslatable `Unicode` characters. @default "�" */ - export let defaultCharUnicode: string - - /** The character used for untranslatable `single-byte` characters. @default "?" */ - export let defaultCharSingleByte: string - - /** - * Skip deprecation warning when strings are used instead of Buffers during decoding. - * Note: {@link iconv.decode} converts the string to Buffer regardless. - */ - export let skipDecodeWarning: boolean - - /** @readonly Whether or not, Streaming API is enabled. */ - export const supportsStreams: boolean - - export type { iconv as Iconv, Encoding } -} - -export = iconv diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/lib/index.js b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/lib/index.js deleted file mode 100644 index bd5d6bc..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/lib/index.js +++ /dev/null @@ -1,182 +0,0 @@ -"use strict" - -var Buffer = require("safer-buffer").Buffer - -var bomHandling = require("./bom-handling") -var mergeModules = require("./helpers/merge-exports") - -// All codecs and aliases are kept here, keyed by encoding name/alias. -// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`. -// Cannot initialize with { __proto__: null } because Boolean({ __proto__: null }) === true -module.exports.encodings = null - -// Characters emitted in case of error. -module.exports.defaultCharUnicode = "�" -module.exports.defaultCharSingleByte = "?" - -// Public API. -module.exports.encode = function encode (str, encoding, options) { - str = "" + (str || "") // Ensure string. - - var encoder = module.exports.getEncoder(encoding, options) - - var res = encoder.write(str) - var trail = encoder.end() - - return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res -} - -module.exports.decode = function decode (buf, encoding, options) { - if (typeof buf === "string") { - if (!module.exports.skipDecodeWarning) { - console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding") - module.exports.skipDecodeWarning = true - } - - buf = Buffer.from("" + (buf || ""), "binary") // Ensure buffer. - } - - var decoder = module.exports.getDecoder(encoding, options) - - var res = decoder.write(buf) - var trail = decoder.end() - - return trail ? (res + trail) : res -} - -module.exports.encodingExists = function encodingExists (enc) { - try { - module.exports.getCodec(enc) - return true - } catch (e) { - return false - } -} - -// Legacy aliases to convert functions -module.exports.toEncoding = module.exports.encode -module.exports.fromEncoding = module.exports.decode - -// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache. -module.exports._codecDataCache = { __proto__: null } - -module.exports.getCodec = function getCodec (encoding) { - if (!module.exports.encodings) { - var raw = require("../encodings") - // TODO: In future versions when old nodejs support is removed can use object.assign - module.exports.encodings = { __proto__: null } // Initialize as empty object. - mergeModules(module.exports.encodings, raw) - } - - // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. - var enc = module.exports._canonicalizeEncoding(encoding) - - // Traverse iconv.encodings to find actual codec. - var codecOptions = {} - while (true) { - var codec = module.exports._codecDataCache[enc] - - if (codec) { return codec } - - var codecDef = module.exports.encodings[enc] - - switch (typeof codecDef) { - case "string": // Direct alias to other encoding. - enc = codecDef - break - - case "object": // Alias with options. Can be layered. - for (var key in codecDef) { codecOptions[key] = codecDef[key] } - - if (!codecOptions.encodingName) { codecOptions.encodingName = enc } - - enc = codecDef.type - break - - case "function": // Codec itself. - if (!codecOptions.encodingName) { codecOptions.encodingName = enc } - - // The codec function must load all tables and return object with .encoder and .decoder methods. - // It'll be called only once (for each different options object). - // - codec = new codecDef(codecOptions, module.exports) - - module.exports._codecDataCache[codecOptions.encodingName] = codec // Save it to be reused later. - return codec - - default: - throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '" + enc + "')") - } - } -} - -module.exports._canonicalizeEncoding = function (encoding) { - // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. - return ("" + encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, "") -} - -module.exports.getEncoder = function getEncoder (encoding, options) { - var codec = module.exports.getCodec(encoding) - var encoder = new codec.encoder(options, codec) - - if (codec.bomAware && options && options.addBOM) { encoder = new bomHandling.PrependBOM(encoder, options) } - - return encoder -} - -module.exports.getDecoder = function getDecoder (encoding, options) { - var codec = module.exports.getCodec(encoding) - var decoder = new codec.decoder(options, codec) - - if (codec.bomAware && !(options && options.stripBOM === false)) { decoder = new bomHandling.StripBOM(decoder, options) } - - return decoder -} - -// Streaming API -// NOTE: Streaming API naturally depends on 'stream' module from Node.js. Unfortunately in browser environments this module can add -// up to 100Kb to the output bundle. To avoid unnecessary code bloat, we don't enable Streaming API in browser by default. -// If you would like to enable it explicitly, please add the following code to your app: -// > iconv.enableStreamingAPI(require('stream')); -module.exports.enableStreamingAPI = function enableStreamingAPI (streamModule) { - if (module.exports.supportsStreams) { return } - - // Dependency-inject stream module to create IconvLite stream classes. - var streams = require("./streams")(streamModule) - - // Not public API yet, but expose the stream classes. - module.exports.IconvLiteEncoderStream = streams.IconvLiteEncoderStream - module.exports.IconvLiteDecoderStream = streams.IconvLiteDecoderStream - - // Streaming API. - module.exports.encodeStream = function encodeStream (encoding, options) { - return new module.exports.IconvLiteEncoderStream(module.exports.getEncoder(encoding, options), options) - } - - module.exports.decodeStream = function decodeStream (encoding, options) { - return new module.exports.IconvLiteDecoderStream(module.exports.getDecoder(encoding, options), options) - } - - module.exports.supportsStreams = true -} - -// Enable Streaming API automatically if 'stream' module is available and non-empty (the majority of environments). -var streamModule -try { - streamModule = require("stream") -} catch (e) {} - -if (streamModule && streamModule.Transform) { - module.exports.enableStreamingAPI(streamModule) -} else { - // In rare cases where 'stream' module is not available by default, throw a helpful exception. - module.exports.encodeStream = module.exports.decodeStream = function () { - throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it.") - } -} - -// Some environments, such as browsers, may not load JavaScript files as UTF-8 -// eslint-disable-next-line no-constant-condition -if ("Ā" !== "\u0100") { - console.error("iconv-lite warning: js files use non-utf8 encoding. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info.") -} diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/lib/streams.js b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/lib/streams.js deleted file mode 100644 index ebfed8e..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/lib/streams.js +++ /dev/null @@ -1,105 +0,0 @@ -"use strict" - -var Buffer = require("safer-buffer").Buffer - -// NOTE: Due to 'stream' module being pretty large (~100Kb, significant in browser environments), -// we opt to dependency-inject it instead of creating a hard dependency. -module.exports = function (streamModule) { - var Transform = streamModule.Transform - - // == Encoder stream ======================================================= - - function IconvLiteEncoderStream (conv, options) { - this.conv = conv - options = options || {} - options.decodeStrings = false // We accept only strings, so we don't need to decode them. - Transform.call(this, options) - } - - IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { - constructor: { value: IconvLiteEncoderStream } - }) - - IconvLiteEncoderStream.prototype._transform = function (chunk, encoding, done) { - if (typeof chunk !== "string") { - return done(new Error("Iconv encoding stream needs strings as its input.")) - } - - try { - var res = this.conv.write(chunk) - if (res && res.length) this.push(res) - done() - } catch (e) { - done(e) - } - } - - IconvLiteEncoderStream.prototype._flush = function (done) { - try { - var res = this.conv.end() - if (res && res.length) this.push(res) - done() - } catch (e) { - done(e) - } - } - - IconvLiteEncoderStream.prototype.collect = function (cb) { - var chunks = [] - this.on("error", cb) - this.on("data", function (chunk) { chunks.push(chunk) }) - this.on("end", function () { - cb(null, Buffer.concat(chunks)) - }) - return this - } - - // == Decoder stream ======================================================= - - function IconvLiteDecoderStream (conv, options) { - this.conv = conv - options = options || {} - options.encoding = this.encoding = "utf8" // We output strings. - Transform.call(this, options) - } - - IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { - constructor: { value: IconvLiteDecoderStream } - }) - - IconvLiteDecoderStream.prototype._transform = function (chunk, encoding, done) { - if (!Buffer.isBuffer(chunk) && !(chunk instanceof Uint8Array)) { return done(new Error("Iconv decoding stream needs buffers as its input.")) } - try { - var res = this.conv.write(chunk) - if (res && res.length) this.push(res, this.encoding) - done() - } catch (e) { - done(e) - } - } - - IconvLiteDecoderStream.prototype._flush = function (done) { - try { - var res = this.conv.end() - if (res && res.length) this.push(res, this.encoding) - done() - } catch (e) { - done(e) - } - } - - IconvLiteDecoderStream.prototype.collect = function (cb) { - var res = "" - this.on("error", cb) - this.on("data", function (chunk) { res += chunk }) - this.on("end", function () { - cb(null, res) - }) - return this - } - - return { - IconvLiteEncoderStream: IconvLiteEncoderStream, - IconvLiteDecoderStream: IconvLiteDecoderStream - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/package.json b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/package.json deleted file mode 100644 index 2a57357..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "iconv-lite", - "description": "Convert character encodings in pure javascript.", - "version": "0.7.2", - "license": "MIT", - "keywords": [ - "iconv", - "convert", - "charset", - "icu" - ], - "author": "Alexander Shtuchkin ", - "main": "./lib/index.js", - "typings": "./lib/index.d.ts", - "homepage": "https://github.com/pillarjs/iconv-lite", - "bugs": "https://github.com/pillarjs/iconv-lite/issues", - "files": [ - "lib/", - "encodings/", - "types/" - ], - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - }, - "repository": { - "type": "git", - "url": "https://github.com/pillarjs/iconv-lite.git" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "lint": "eslint", - "lint:fix": "eslint --fix", - "test": "mocha --reporter spec --check-leaks --grep .", - "test:ci": "nyc --exclude test --reporter=lcovonly --reporter=text npm test", - "test:cov": "nyc --exclude test --reporter=html --reporter=text npm test", - "test:performance": "node --allow-natives-syntax performance/index.js", - "test:tap": "mocha --reporter tap --check-leaks --grep .", - "test:typescript": "tsc && attw --pack", - "test:webpack": "npm pack && mv iconv-lite-*.tgz test/webpack/iconv-lite.tgz && cd test/webpack && npm install && npm run test && rm iconv-lite.tgz", - "typegen": "node generation/gen-typings.js" - }, - "browser": { - "stream": false - }, - "devDependencies": { - "@arethetypeswrong/cli": "^0.17.4", - "@stylistic/eslint-plugin": "^5.1.0", - "@stylistic/eslint-plugin-js": "^4.1.0", - "@types/node": "^24.0.12", - "async": "^3.2.0", - "bench-node": "^0.10.0", - "eslint": "^9.0.0", - "errto": "^0.2.1", - "expect-type": "^1.2.0", - "iconv": "^2.3.5", - "mocha": "^6.2.2", - "neostandard": "^0.12.0", - "nyc": "^14.1.1", - "request": "^2.88.2", - "semver": "^6.3.0", - "typescript": "~5.9.2", - "unorm": "^1.6.0" - }, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/types/encodings.d.ts b/node_modules/@nestjs/platform-express/node_modules/iconv-lite/types/encodings.d.ts deleted file mode 100644 index bedbe33..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/iconv-lite/types/encodings.d.ts +++ /dev/null @@ -1,423 +0,0 @@ -/* - * --------------------------------------------------------------------------------------------- - * DO NOT EDIT THIS FILE MANUALLY. - * THIS FILE IS AUTOMATICALLY GENERATED. - * TO UPDATE, RUN `npm run typegen` AND COMMIT THE CHANGES. - * --------------------------------------------------------------------------------------------- - */ - -/** A union of all supported encoding strings in `iconv-lite`. */ -export type Encoding = - | "10000" - | "10006" - | "10007" - | "10029" - | "10079" - | "10081" - | "1046" - | "1124" - | "1125" - | "1129" - | "1133" - | "1161" - | "1162" - | "1163" - | "1250" - | "1251" - | "1252" - | "1253" - | "1254" - | "1255" - | "1256" - | "1257" - | "1258" - | "20866" - | "21866" - | "28591" - | "28592" - | "28593" - | "28594" - | "28595" - | "28596" - | "28597" - | "28598" - | "28599" - | "28600" - | "28601" - | "28603" - | "28604" - | "28605" - | "28606" - | "437" - | "737" - | "775" - | "808" - | "850" - | "852" - | "855" - | "856" - | "857" - | "858" - | "860" - | "861" - | "862" - | "863" - | "864" - | "865" - | "866" - | "869" - | "874" - | "922" - | "932" - | "936" - | "949" - | "950" - | "ansix34" - | "ansix341968" - | "ansix341986" - | "arabic" - | "arabic8" - | "armscii8" - | "ascii" - | "ascii8bit" - | "asmo708" - | "base64" - | "big5" - | "big5hkscs" - | "binary" - | "celtic" - | "celtic8" - | "cesu8" - | "chinese" - | "cn" - | "cnbig5" - | "cp1046" - | "cp1124" - | "cp1125" - | "cp1129" - | "cp1133" - | "cp1161" - | "cp1162" - | "cp1163" - | "cp1250" - | "cp1251" - | "cp1252" - | "cp1253" - | "cp1254" - | "cp1255" - | "cp1256" - | "cp1257" - | "cp1258" - | "cp20866" - | "cp21866" - | "cp28591" - | "cp28592" - | "cp28593" - | "cp28594" - | "cp28595" - | "cp28596" - | "cp28597" - | "cp28598" - | "cp28599" - | "cp28600" - | "cp28601" - | "cp28603" - | "cp28604" - | "cp28605" - | "cp28606" - | "cp367" - | "cp437" - | "cp720" - | "cp737" - | "cp775" - | "cp808" - | "cp819" - | "cp850" - | "cp852" - | "cp855" - | "cp856" - | "cp857" - | "cp858" - | "cp860" - | "cp861" - | "cp862" - | "cp863" - | "cp864" - | "cp865" - | "cp866" - | "cp869" - | "cp874" - | "cp922" - | "cp932" - | "cp936" - | "cp949" - | "cp950" - | "cpgr" - | "csascii" - | "csbig5" - | "cseuckr" - | "csgb2312" - | "cshproman8" - | "csibm1046" - | "csibm1124" - | "csibm1125" - | "csibm1129" - | "csibm1133" - | "csibm1161" - | "csibm1162" - | "csibm1163" - | "csibm437" - | "csibm737" - | "csibm775" - | "csibm850" - | "csibm852" - | "csibm855" - | "csibm856" - | "csibm857" - | "csibm858" - | "csibm860" - | "csibm861" - | "csibm862" - | "csibm863" - | "csibm864" - | "csibm865" - | "csibm866" - | "csibm869" - | "csibm922" - | "csiso14jisc6220ro" - | "csiso58gb231280" - | "csisolatin1" - | "csisolatin2" - | "csisolatin3" - | "csisolatin4" - | "csisolatin5" - | "csisolatin6" - | "csisolatinarabic" - | "csisolatincyrillic" - | "csisolatingreek" - | "csisolatinhebrew" - | "cskoi8r" - | "csksc56011987" - | "csmacintosh" - | "cspc775baltic" - | "cspc850multilingual" - | "cspc862latinhebrew" - | "cspc8codepage437" - | "cspcp852" - | "csshiftjis" - | "cyrillic" - | "ecma114" - | "ecma118" - | "elot928" - | "euccn" - | "eucjp" - | "euckr" - | "gb18030" - | "gb198880" - | "gb2312" - | "gb23121980" - | "gb231280" - | "gbk" - | "georgianacademy" - | "georgianps" - | "greek" - | "greek8" - | "hebrew" - | "hebrew8" - | "hex" - | "hproman8" - | "ibm1046" - | "ibm1051" - | "ibm1124" - | "ibm1125" - | "ibm1129" - | "ibm1133" - | "ibm1161" - | "ibm1162" - | "ibm1163" - | "ibm1168" - | "ibm367" - | "ibm437" - | "ibm737" - | "ibm775" - | "ibm808" - | "ibm819" - | "ibm850" - | "ibm852" - | "ibm855" - | "ibm856" - | "ibm857" - | "ibm858" - | "ibm860" - | "ibm861" - | "ibm862" - | "ibm863" - | "ibm864" - | "ibm865" - | "ibm866" - | "ibm869" - | "ibm878" - | "ibm922" - | "iso646cn" - | "iso646irv" - | "iso646jp" - | "iso646us" - | "iso88591" - | "iso885910" - | "iso885911" - | "iso885913" - | "iso885914" - | "iso885915" - | "iso885916" - | "iso88592" - | "iso88593" - | "iso88594" - | "iso88595" - | "iso88596" - | "iso88597" - | "iso88598" - | "iso88599" - | "isoceltic" - | "isoir100" - | "isoir101" - | "isoir109" - | "isoir110" - | "isoir126" - | "isoir127" - | "isoir138" - | "isoir14" - | "isoir144" - | "isoir148" - | "isoir149" - | "isoir157" - | "isoir166" - | "isoir179" - | "isoir199" - | "isoir203" - | "isoir226" - | "isoir57" - | "isoir58" - | "isoir6" - | "jisc62201969ro" - | "jp" - | "koi8r" - | "koi8ru" - | "koi8t" - | "koi8u" - | "korean" - | "ksc5601" - | "ksc56011987" - | "ksc56011989" - | "l1" - | "l10" - | "l2" - | "l3" - | "l4" - | "l5" - | "l6" - | "l7" - | "l8" - | "l9" - | "latin1" - | "latin10" - | "latin2" - | "latin3" - | "latin4" - | "latin5" - | "latin6" - | "latin7" - | "latin8" - | "latin9" - | "mac" - | "maccenteuro" - | "maccroatian" - | "maccyrillic" - | "macgreek" - | "maciceland" - | "macintosh" - | "macroman" - | "macromania" - | "macthai" - | "macturkish" - | "macukraine" - | "mik" - | "ms31j" - | "ms932" - | "ms936" - | "ms949" - | "ms950" - | "msansi" - | "msarab" - | "mscyrl" - | "msee" - | "msgreek" - | "mshebr" - | "mskanji" - | "msturk" - | "pt154" - | "r8" - | "rk1048" - | "roman8" - | "shiftjis" - | "sjis" - | "strk10482002" - | "tcvn" - | "tcvn5712" - | "tcvn57121" - | "thai" - | "thai8" - | "tis620" - | "tis6200" - | "tis62025291" - | "tis62025330" - | "turkish" - | "turkish8" - | "ucs2" - | "ucs4" - | "ucs4be" - | "ucs4le" - | "unicode11utf7" - | "unicode11utf8" - | "us" - | "usascii" - | "utf16" - | "utf16be" - | "utf16le" - | "utf32" - | "utf32be" - | "utf32le" - | "utf7" - | "utf7imap" - | "utf8" - | "viscii" - | "win1250" - | "win1251" - | "win1252" - | "win1253" - | "win1254" - | "win1255" - | "win1256" - | "win1257" - | "win1258" - | "win874" - | "winbaltrim" - | "windows1250" - | "windows1251" - | "windows1252" - | "windows1253" - | "windows1254" - | "windows1255" - | "windows1256" - | "windows1257" - | "windows1258" - | "windows31j" - | "windows874" - | "windows932" - | "windows936" - | "windows949" - | "windows950" - | "xgbk" - | "xroman8" - | "xsjis" - | "xxbig5" - | (string & {}) diff --git a/node_modules/@nestjs/platform-express/node_modules/media-typer/HISTORY.md b/node_modules/@nestjs/platform-express/node_modules/media-typer/HISTORY.md deleted file mode 100644 index 538ade1..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/media-typer/HISTORY.md +++ /dev/null @@ -1,50 +0,0 @@ -1.1.0 / 2019-04-24 -================== - - * Add `test(string)` function - -1.0.2 / 2019-04-19 -================== - - * Fix JSDoc comment for `parse` function - -1.0.1 / 2018-10-20 -================== - - * Remove left over `parameters` property from class - -1.0.0 / 2018-10-20 -================== - -This major release brings the module back to it's RFC 6838 roots. If you want -a module to parse the `Content-Type` or similar HTTP headers, use the -`content-type` module instead. - - * Drop support for Node.js below 0.8 - * Remove parameter handling, which is outside RFC 6838 scope - * Remove `parse(req)` and `parse(res)` signatures - * perf: enable strict mode - * perf: use a class for object creation - -0.3.0 / 2014-09-07 -================== - - * Support Node.js 0.6 - * Throw error when parameter format invalid on parse - -0.2.0 / 2014-06-18 -================== - - * Add `typer.format()` to format media types - -0.1.0 / 2014-06-17 -================== - - * Accept `req` as argument to `parse` - * Accept `res` as argument to `parse` - * Parse media type with extra LWS between type and first parameter - -0.0.0 / 2014-06-13 -================== - - * Initial implementation diff --git a/node_modules/@nestjs/platform-express/node_modules/media-typer/LICENSE b/node_modules/@nestjs/platform-express/node_modules/media-typer/LICENSE deleted file mode 100644 index 84441fb..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/media-typer/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2014-2017 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@nestjs/platform-express/node_modules/media-typer/README.md b/node_modules/@nestjs/platform-express/node_modules/media-typer/README.md deleted file mode 100644 index 37edad1..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/media-typer/README.md +++ /dev/null @@ -1,93 +0,0 @@ -# media-typer - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Simple RFC 6838 media type parser. - -This module will parse a given media type into it's component parts, like type, -subtype, and suffix. A formatter is also provided to put them back together and -the two can be combined to normalize media types into a canonical form. - -If you are looking to parse the string that represents a media type and it's -parameters in HTTP (for example, the `Content-Type` header), use the -[content-type module](https://www.npmjs.com/package/content-type). - -## Installation - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install media-typer -``` - -## API - - - -```js -var typer = require('media-typer') -``` - -### typer.parse(string) - - - -```js -var obj = typer.parse('image/svg+xml') -``` - -Parse a media type string. This will return an object with the following -properties (examples are shown for the string `'image/svg+xml; charset=utf-8'`): - - - `type`: The type of the media type (always lower case). Example: `'image'` - - - `subtype`: The subtype of the media type (always lower case). Example: `'svg'` - - - `suffix`: The suffix of the media type (always lower case). Example: `'xml'` - -If the given type string is invalid, then a `TypeError` is thrown. - -### typer.format(obj) - - - -```js -var obj = typer.format({ type: 'image', subtype: 'svg', suffix: 'xml' }) -``` - -Format an object into a media type string. This will return a string of the -mime type for the given object. For the properties of the object, see the -documentation for `typer.parse(string)`. - -If any of the given object values are invalid, then a `TypeError` is thrown. - -### typer.test(string) - - - -```js -var valid = typer.test('image/svg+xml') -``` - -Validate a media type string. This will return `true` is the string is a well- -formatted media type, or `false` otherwise. - -## License - -[MIT](LICENSE) - -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/media-typer/master -[coveralls-url]: https://coveralls.io/r/jshttp/media-typer?branch=master -[node-version-image]: https://badgen.net/npm/node/media-typer -[node-version-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/media-typer -[npm-url]: https://npmjs.org/package/media-typer -[npm-version-image]: https://badgen.net/npm/v/media-typer -[travis-image]: https://badgen.net/travis/jshttp/media-typer/master -[travis-url]: https://travis-ci.org/jshttp/media-typer diff --git a/node_modules/@nestjs/platform-express/node_modules/media-typer/index.js b/node_modules/@nestjs/platform-express/node_modules/media-typer/index.js deleted file mode 100644 index 897cae1..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/media-typer/index.js +++ /dev/null @@ -1,143 +0,0 @@ -/*! - * media-typer - * Copyright(c) 2014-2017 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * RegExp to match type in RFC 6838 - * - * type-name = restricted-name - * subtype-name = restricted-name - * restricted-name = restricted-name-first *126restricted-name-chars - * restricted-name-first = ALPHA / DIGIT - * restricted-name-chars = ALPHA / DIGIT / "!" / "#" / - * "$" / "&" / "-" / "^" / "_" - * restricted-name-chars =/ "." ; Characters before first dot always - * ; specify a facet name - * restricted-name-chars =/ "+" ; Characters after last plus always - * ; specify a structured syntax suffix - * ALPHA = %x41-5A / %x61-7A ; A-Z / a-z - * DIGIT = %x30-39 ; 0-9 - */ -var SUBTYPE_NAME_REGEXP = /^[A-Za-z0-9][A-Za-z0-9!#$&^_.-]{0,126}$/ -var TYPE_NAME_REGEXP = /^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/ -var TYPE_REGEXP = /^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/ - -/** - * Module exports. - */ - -exports.format = format -exports.parse = parse -exports.test = test - -/** - * Format object to media type. - * - * @param {object} obj - * @return {string} - * @public - */ - -function format (obj) { - if (!obj || typeof obj !== 'object') { - throw new TypeError('argument obj is required') - } - - var subtype = obj.subtype - var suffix = obj.suffix - var type = obj.type - - if (!type || !TYPE_NAME_REGEXP.test(type)) { - throw new TypeError('invalid type') - } - - if (!subtype || !SUBTYPE_NAME_REGEXP.test(subtype)) { - throw new TypeError('invalid subtype') - } - - // format as type/subtype - var string = type + '/' + subtype - - // append +suffix - if (suffix) { - if (!TYPE_NAME_REGEXP.test(suffix)) { - throw new TypeError('invalid suffix') - } - - string += '+' + suffix - } - - return string -} - -/** - * Test media type. - * - * @param {string} string - * @return {object} - * @public - */ - -function test (string) { - if (!string) { - throw new TypeError('argument string is required') - } - - if (typeof string !== 'string') { - throw new TypeError('argument string is required to be a string') - } - - return TYPE_REGEXP.test(string.toLowerCase()) -} - -/** - * Parse media type to object. - * - * @param {string} string - * @return {object} - * @public - */ - -function parse (string) { - if (!string) { - throw new TypeError('argument string is required') - } - - if (typeof string !== 'string') { - throw new TypeError('argument string is required to be a string') - } - - var match = TYPE_REGEXP.exec(string.toLowerCase()) - - if (!match) { - throw new TypeError('invalid media type') - } - - var type = match[1] - var subtype = match[2] - var suffix - - // suffix after last + - var index = subtype.lastIndexOf('+') - if (index !== -1) { - suffix = subtype.substr(index + 1) - subtype = subtype.substr(0, index) - } - - return new MediaType(type, subtype, suffix) -} - -/** - * Class for MediaType object. - * @public - */ - -function MediaType (type, subtype, suffix) { - this.type = type - this.subtype = subtype - this.suffix = suffix -} diff --git a/node_modules/@nestjs/platform-express/node_modules/media-typer/package.json b/node_modules/@nestjs/platform-express/node_modules/media-typer/package.json deleted file mode 100644 index 1dca712..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/media-typer/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "media-typer", - "description": "Simple RFC 6838 media type parser and formatter", - "version": "1.1.0", - "author": "Douglas Christopher Wilson ", - "license": "MIT", - "repository": "jshttp/media-typer", - "devDependencies": { - "eslint": "5.16.0", - "eslint-config-standard": "12.0.0", - "eslint-plugin-import": "2.17.2", - "eslint-plugin-markdown": "1.0.0", - "eslint-plugin-node": "8.0.1", - "eslint-plugin-promise": "4.1.1", - "eslint-plugin-standard": "4.0.0", - "mocha": "6.1.4", - "nyc": "14.0.0" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "index.js" - ], - "engines": { - "node": ">= 0.8" - }, - "scripts": { - "lint": "eslint --plugin markdown --ext js,md .", - "test": "mocha --reporter spec --check-leaks --bail test/", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "test-travis": "nyc --reporter=text npm test" - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/merge-descriptors/index.d.ts b/node_modules/@nestjs/platform-express/node_modules/merge-descriptors/index.d.ts deleted file mode 100644 index df8f91f..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/merge-descriptors/index.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** -Merges "own" properties from a source to a destination object, including non-enumerable and accessor-defined properties. It retains original values and descriptors, ensuring the destination receives a complete and accurate copy of the source's properties. - -@param destination - The object to receive properties. -@param source - The object providing properties. -@param overwrite - Optional boolean to control overwriting of existing properties. Defaults to true. -@returns The modified destination object. -*/ -declare function mergeDescriptors(destination: T, source: U, overwrite?: boolean): T & U; - -export = mergeDescriptors; diff --git a/node_modules/@nestjs/platform-express/node_modules/merge-descriptors/index.js b/node_modules/@nestjs/platform-express/node_modules/merge-descriptors/index.js deleted file mode 100644 index 51228e5..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/merge-descriptors/index.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -function mergeDescriptors(destination, source, overwrite = true) { - if (!destination) { - throw new TypeError('The `destination` argument is required.'); - } - - if (!source) { - throw new TypeError('The `source` argument is required.'); - } - - for (const name of Object.getOwnPropertyNames(source)) { - if (!overwrite && Object.hasOwn(destination, name)) { - // Skip descriptor - continue; - } - - // Copy descriptor - const descriptor = Object.getOwnPropertyDescriptor(source, name); - Object.defineProperty(destination, name, descriptor); - } - - return destination; -} - -module.exports = mergeDescriptors; diff --git a/node_modules/@nestjs/platform-express/node_modules/merge-descriptors/license b/node_modules/@nestjs/platform-express/node_modules/merge-descriptors/license deleted file mode 100644 index c509d45..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/merge-descriptors/license +++ /dev/null @@ -1,11 +0,0 @@ -MIT License - -Copyright (c) Jonathan Ong -Copyright (c) Douglas Christopher Wilson -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@nestjs/platform-express/node_modules/merge-descriptors/package.json b/node_modules/@nestjs/platform-express/node_modules/merge-descriptors/package.json deleted file mode 100644 index 9bedb25..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/merge-descriptors/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "merge-descriptors", - "version": "2.0.0", - "description": "Merge objects using their property descriptors", - "license": "MIT", - "repository": "sindresorhus/merge-descriptors", - "funding": "https://github.com/sponsors/sindresorhus", - "contributors": [ - "Jonathan Ong ", - "Douglas Christopher Wilson ", - "Mike Grabowski ", - "Sindre Sorhus " - ], - "exports": { - "types": "./index.d.ts", - "default": "./index.js" - }, - "main": "./index.js", - "types": "./index.d.ts", - "sideEffects": false, - "engines": { - "node": ">=18" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "merge", - "descriptors", - "object", - "property", - "properties", - "merging", - "getter", - "setter" - ], - "devDependencies": { - "ava": "^5.3.1", - "xo": "^0.56.0" - }, - "xo": { - "rules": { - "unicorn/prefer-module": "off" - } - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/merge-descriptors/readme.md b/node_modules/@nestjs/platform-express/node_modules/merge-descriptors/readme.md deleted file mode 100644 index 1dee67d..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/merge-descriptors/readme.md +++ /dev/null @@ -1,55 +0,0 @@ -# merge-descriptors - -> Merge objects using their property descriptors - -## Install - -```sh -npm install merge-descriptors -``` - -## Usage - -```js -import mergeDescriptors from 'merge-descriptors'; - -const thing = { - get name() { - return 'John' - } -} - -const animal = {}; - -mergeDescriptors(animal, thing); - -console.log(animal.name); -//=> 'John' -``` - -## API - -### merge(destination, source, overwrite?) - -Merges "own" properties from a source to a destination object, including non-enumerable and accessor-defined properties. It retains original values and descriptors, ensuring the destination receives a complete and accurate copy of the source's properties. - -Returns the modified destination object. - -#### destination - -Type: `object` - -The object to receive properties. - -#### source - -Type: `object` - -The object providing properties. - -#### overwrite - -Type: `boolean`\ -Default: `true` - -A boolean to control overwriting of existing properties. diff --git a/node_modules/@nestjs/platform-express/node_modules/mime-db/HISTORY.md b/node_modules/@nestjs/platform-express/node_modules/mime-db/HISTORY.md deleted file mode 100644 index fb35bec..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/mime-db/HISTORY.md +++ /dev/null @@ -1,541 +0,0 @@ -1.54.0 / 2025-03-17 -=================== - - * Update mime type for DCM format (#362) - * mark application/octet-stream as compressible (#163) - * Fix typo in application/x-zip-compressed mimetype (#359) - * Add mime-type for Jupyter notebooks (#282) - * Add Google Drive MIME types (#311) - * Add .blend file type (#338) - * Add support for the FBX file extension (#342) - * Add Adobe DNG file (#340) - * Add Procreate Brush and Brush Set file Types (#339) - * Add support for Procreate Dreams (#341) - * replace got with undici (#352) - * Added extensions list for model/step (#293) - * Add m4b as a type of audio/mp4 (#357) - * windows 11 application/x-zip-compressed (#346) - * add dotLottie mime type (#351) - * Add some MS-related extensions and types (#336) - -1.53.0 / 2024-07-12 -=================== - - * Add extension `.sql` to `application/sql` - * Add extensions `.aac` and `.adts` to `audio/aac` - * Add extensions `.js` and `.mjs` to `text/javascript` - * Add extensions for `application/mp4` from IANA - * Add extensions from IANA for more MIME types - * Add Microsoft app installer types and extensions - * Add new upstream MIME types - * Fix extensions for `text/markdown` to match IANA - * Remove extension `.mjs` from `application/javascript` - * Remove obsolete MIME types from IANA data - -1.52.0 / 2022-02-21 -=================== - - * Add extensions from IANA for more `image/*` types - * Add extension `.asc` to `application/pgp-keys` - * Add extensions to various XML types - * Add new upstream MIME types - -1.51.0 / 2021-11-08 -=================== - - * Add new upstream MIME types - * Mark `image/vnd.microsoft.icon` as compressible - * Mark `image/vnd.ms-dds` as compressible - -1.50.0 / 2021-09-15 -=================== - - * Add deprecated iWorks mime types and extensions - * Add new upstream MIME types - -1.49.0 / 2021-07-26 -=================== - - * Add extension `.trig` to `application/trig` - * Add new upstream MIME types - -1.48.0 / 2021-05-30 -=================== - - * Add extension `.mvt` to `application/vnd.mapbox-vector-tile` - * Add new upstream MIME types - * Mark `text/yaml` as compressible - -1.47.0 / 2021-04-01 -=================== - - * Add new upstream MIME types - * Remove ambiguous extensions from IANA for `application/*+xml` types - * Update primary extension to `.es` for `application/ecmascript` - -1.46.0 / 2021-02-13 -=================== - - * Add extension `.amr` to `audio/amr` - * Add extension `.m4s` to `video/iso.segment` - * Add extension `.opus` to `audio/ogg` - * Add new upstream MIME types - -1.45.0 / 2020-09-22 -=================== - - * Add `application/ubjson` with extension `.ubj` - * Add `image/avif` with extension `.avif` - * Add `image/ktx2` with extension `.ktx2` - * Add extension `.dbf` to `application/vnd.dbf` - * Add extension `.rar` to `application/vnd.rar` - * Add extension `.td` to `application/urc-targetdesc+xml` - * Add new upstream MIME types - * Fix extension of `application/vnd.apple.keynote` to be `.key` - -1.44.0 / 2020-04-22 -=================== - - * Add charsets from IANA - * Add extension `.cjs` to `application/node` - * Add new upstream MIME types - -1.43.0 / 2020-01-05 -=================== - - * Add `application/x-keepass2` with extension `.kdbx` - * Add extension `.mxmf` to `audio/mobile-xmf` - * Add extensions from IANA for `application/*+xml` types - * Add new upstream MIME types - -1.42.0 / 2019-09-25 -=================== - - * Add `image/vnd.ms-dds` with extension `.dds` - * Add new upstream MIME types - * Remove compressible from `multipart/mixed` - -1.41.0 / 2019-08-30 -=================== - - * Add new upstream MIME types - * Add `application/toml` with extension `.toml` - * Mark `font/ttf` as compressible - -1.40.0 / 2019-04-20 -=================== - - * Add extensions from IANA for `model/*` types - * Add `text/mdx` with extension `.mdx` - -1.39.0 / 2019-04-04 -=================== - - * Add extensions `.siv` and `.sieve` to `application/sieve` - * Add new upstream MIME types - -1.38.0 / 2019-02-04 -=================== - - * Add extension `.nq` to `application/n-quads` - * Add extension `.nt` to `application/n-triples` - * Add new upstream MIME types - * Mark `text/less` as compressible - -1.37.0 / 2018-10-19 -=================== - - * Add extensions to HEIC image types - * Add new upstream MIME types - -1.36.0 / 2018-08-20 -=================== - - * Add Apple file extensions from IANA - * Add extensions from IANA for `image/*` types - * Add new upstream MIME types - -1.35.0 / 2018-07-15 -=================== - - * Add extension `.owl` to `application/rdf+xml` - * Add new upstream MIME types - - Removes extension `.woff` from `application/font-woff` - -1.34.0 / 2018-06-03 -=================== - - * Add extension `.csl` to `application/vnd.citationstyles.style+xml` - * Add extension `.es` to `application/ecmascript` - * Add new upstream MIME types - * Add `UTF-8` as default charset for `text/turtle` - * Mark all XML-derived types as compressible - -1.33.0 / 2018-02-15 -=================== - - * Add extensions from IANA for `message/*` types - * Add new upstream MIME types - * Fix some incorrect OOXML types - * Remove `application/font-woff2` - -1.32.0 / 2017-11-29 -=================== - - * Add new upstream MIME types - * Update `text/hjson` to registered `application/hjson` - * Add `text/shex` with extension `.shex` - -1.31.0 / 2017-10-25 -=================== - - * Add `application/raml+yaml` with extension `.raml` - * Add `application/wasm` with extension `.wasm` - * Add new `font` type from IANA - * Add new upstream font extensions - * Add new upstream MIME types - * Add extensions for JPEG-2000 images - -1.30.0 / 2017-08-27 -=================== - - * Add `application/vnd.ms-outlook` - * Add `application/x-arj` - * Add extension `.mjs` to `application/javascript` - * Add glTF types and extensions - * Add new upstream MIME types - * Add `text/x-org` - * Add VirtualBox MIME types - * Fix `source` records for `video/*` types that are IANA - * Update `font/opentype` to registered `font/otf` - -1.29.0 / 2017-07-10 -=================== - - * Add `application/fido.trusted-apps+json` - * Add extension `.wadl` to `application/vnd.sun.wadl+xml` - * Add new upstream MIME types - * Add `UTF-8` as default charset for `text/css` - -1.28.0 / 2017-05-14 -=================== - - * Add new upstream MIME types - * Add extension `.gz` to `application/gzip` - * Update extensions `.md` and `.markdown` to be `text/markdown` - -1.27.0 / 2017-03-16 -=================== - - * Add new upstream MIME types - * Add `image/apng` with extension `.apng` - -1.26.0 / 2017-01-14 -=================== - - * Add new upstream MIME types - * Add extension `.geojson` to `application/geo+json` - -1.25.0 / 2016-11-11 -=================== - - * Add new upstream MIME types - -1.24.0 / 2016-09-18 -=================== - - * Add `audio/mp3` - * Add new upstream MIME types - -1.23.0 / 2016-05-01 -=================== - - * Add new upstream MIME types - * Add extension `.3gpp` to `audio/3gpp` - -1.22.0 / 2016-02-15 -=================== - - * Add `text/slim` - * Add extension `.rng` to `application/xml` - * Add new upstream MIME types - * Fix extension of `application/dash+xml` to be `.mpd` - * Update primary extension to `.m4a` for `audio/mp4` - -1.21.0 / 2016-01-06 -=================== - - * Add Google document types - * Add new upstream MIME types - -1.20.0 / 2015-11-10 -=================== - - * Add `text/x-suse-ymp` - * Add new upstream MIME types - -1.19.0 / 2015-09-17 -=================== - - * Add `application/vnd.apple.pkpass` - * Add new upstream MIME types - -1.18.0 / 2015-09-03 -=================== - - * Add new upstream MIME types - -1.17.0 / 2015-08-13 -=================== - - * Add `application/x-msdos-program` - * Add `audio/g711-0` - * Add `image/vnd.mozilla.apng` - * Add extension `.exe` to `application/x-msdos-program` - -1.16.0 / 2015-07-29 -=================== - - * Add `application/vnd.uri-map` - -1.15.0 / 2015-07-13 -=================== - - * Add `application/x-httpd-php` - -1.14.0 / 2015-06-25 -=================== - - * Add `application/scim+json` - * Add `application/vnd.3gpp.ussd+xml` - * Add `application/vnd.biopax.rdf+xml` - * Add `text/x-processing` - -1.13.0 / 2015-06-07 -=================== - - * Add nginx as a source - * Add `application/x-cocoa` - * Add `application/x-java-archive-diff` - * Add `application/x-makeself` - * Add `application/x-perl` - * Add `application/x-pilot` - * Add `application/x-redhat-package-manager` - * Add `application/x-sea` - * Add `audio/x-m4a` - * Add `audio/x-realaudio` - * Add `image/x-jng` - * Add `text/mathml` - -1.12.0 / 2015-06-05 -=================== - - * Add `application/bdoc` - * Add `application/vnd.hyperdrive+json` - * Add `application/x-bdoc` - * Add extension `.rtf` to `text/rtf` - -1.11.0 / 2015-05-31 -=================== - - * Add `audio/wav` - * Add `audio/wave` - * Add extension `.litcoffee` to `text/coffeescript` - * Add extension `.sfd-hdstx` to `application/vnd.hydrostatix.sof-data` - * Add extension `.n-gage` to `application/vnd.nokia.n-gage.symbian.install` - -1.10.0 / 2015-05-19 -=================== - - * Add `application/vnd.balsamiq.bmpr` - * Add `application/vnd.microsoft.portable-executable` - * Add `application/x-ns-proxy-autoconfig` - -1.9.1 / 2015-04-19 -================== - - * Remove `.json` extension from `application/manifest+json` - - This is causing bugs downstream - -1.9.0 / 2015-04-19 -================== - - * Add `application/manifest+json` - * Add `application/vnd.micro+json` - * Add `image/vnd.zbrush.pcx` - * Add `image/x-ms-bmp` - -1.8.0 / 2015-03-13 -================== - - * Add `application/vnd.citationstyles.style+xml` - * Add `application/vnd.fastcopy-disk-image` - * Add `application/vnd.gov.sk.xmldatacontainer+xml` - * Add extension `.jsonld` to `application/ld+json` - -1.7.0 / 2015-02-08 -================== - - * Add `application/vnd.gerber` - * Add `application/vnd.msa-disk-image` - -1.6.1 / 2015-02-05 -================== - - * Community extensions ownership transferred from `node-mime` - -1.6.0 / 2015-01-29 -================== - - * Add `application/jose` - * Add `application/jose+json` - * Add `application/json-seq` - * Add `application/jwk+json` - * Add `application/jwk-set+json` - * Add `application/jwt` - * Add `application/rdap+json` - * Add `application/vnd.gov.sk.e-form+xml` - * Add `application/vnd.ims.imsccv1p3` - -1.5.0 / 2014-12-30 -================== - - * Add `application/vnd.oracle.resource+json` - * Fix various invalid MIME type entries - - `application/mbox+xml` - - `application/oscp-response` - - `application/vwg-multiplexed` - - `audio/g721` - -1.4.0 / 2014-12-21 -================== - - * Add `application/vnd.ims.imsccv1p2` - * Fix various invalid MIME type entries - - `application/vnd-acucobol` - - `application/vnd-curl` - - `application/vnd-dart` - - `application/vnd-dxr` - - `application/vnd-fdf` - - `application/vnd-mif` - - `application/vnd-sema` - - `application/vnd-wap-wmlc` - - `application/vnd.adobe.flash-movie` - - `application/vnd.dece-zip` - - `application/vnd.dvb_service` - - `application/vnd.micrografx-igx` - - `application/vnd.sealed-doc` - - `application/vnd.sealed-eml` - - `application/vnd.sealed-mht` - - `application/vnd.sealed-ppt` - - `application/vnd.sealed-tiff` - - `application/vnd.sealed-xls` - - `application/vnd.sealedmedia.softseal-html` - - `application/vnd.sealedmedia.softseal-pdf` - - `application/vnd.wap-slc` - - `application/vnd.wap-wbxml` - - `audio/vnd.sealedmedia.softseal-mpeg` - - `image/vnd-djvu` - - `image/vnd-svf` - - `image/vnd-wap-wbmp` - - `image/vnd.sealed-png` - - `image/vnd.sealedmedia.softseal-gif` - - `image/vnd.sealedmedia.softseal-jpg` - - `model/vnd-dwf` - - `model/vnd.parasolid.transmit-binary` - - `model/vnd.parasolid.transmit-text` - - `text/vnd-a` - - `text/vnd-curl` - - `text/vnd.wap-wml` - * Remove example template MIME types - - `application/example` - - `audio/example` - - `image/example` - - `message/example` - - `model/example` - - `multipart/example` - - `text/example` - - `video/example` - -1.3.1 / 2014-12-16 -================== - - * Fix missing extensions - - `application/json5` - - `text/hjson` - -1.3.0 / 2014-12-07 -================== - - * Add `application/a2l` - * Add `application/aml` - * Add `application/atfx` - * Add `application/atxml` - * Add `application/cdfx+xml` - * Add `application/dii` - * Add `application/json5` - * Add `application/lxf` - * Add `application/mf4` - * Add `application/vnd.apache.thrift.compact` - * Add `application/vnd.apache.thrift.json` - * Add `application/vnd.coffeescript` - * Add `application/vnd.enphase.envoy` - * Add `application/vnd.ims.imsccv1p1` - * Add `text/csv-schema` - * Add `text/hjson` - * Add `text/markdown` - * Add `text/yaml` - -1.2.0 / 2014-11-09 -================== - - * Add `application/cea` - * Add `application/dit` - * Add `application/vnd.gov.sk.e-form+zip` - * Add `application/vnd.tmd.mediaflex.api+xml` - * Type `application/epub+zip` is now IANA-registered - -1.1.2 / 2014-10-23 -================== - - * Rebuild database for `application/x-www-form-urlencoded` change - -1.1.1 / 2014-10-20 -================== - - * Mark `application/x-www-form-urlencoded` as compressible. - -1.1.0 / 2014-09-28 -================== - - * Add `application/font-woff2` - -1.0.3 / 2014-09-25 -================== - - * Fix engine requirement in package - -1.0.2 / 2014-09-25 -================== - - * Add `application/coap-group+json` - * Add `application/dcd` - * Add `application/vnd.apache.thrift.binary` - * Add `image/vnd.tencent.tap` - * Mark all JSON-derived types as compressible - * Update `text/vtt` data - -1.0.1 / 2014-08-30 -================== - - * Fix extension ordering - -1.0.0 / 2014-08-30 -================== - - * Add `application/atf` - * Add `application/merge-patch+json` - * Add `multipart/x-mixed-replace` - * Add `source: 'apache'` metadata - * Add `source: 'iana'` metadata - * Remove badly-assumed charset data diff --git a/node_modules/@nestjs/platform-express/node_modules/mime-db/LICENSE b/node_modules/@nestjs/platform-express/node_modules/mime-db/LICENSE deleted file mode 100644 index 0751cb1..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/mime-db/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2015-2022 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@nestjs/platform-express/node_modules/mime-db/README.md b/node_modules/@nestjs/platform-express/node_modules/mime-db/README.md deleted file mode 100644 index ee93fa0..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/mime-db/README.md +++ /dev/null @@ -1,109 +0,0 @@ -# mime-db - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-image]][node-url] -[![Build Status][ci-image]][ci-url] -[![Coverage Status][coveralls-image]][coveralls-url] - -This is a large database of mime types and information about them. -It consists of a single, public JSON file and does not include any logic, -allowing it to remain as un-opinionated as possible with an API. -It aggregates data from the following sources: - -- https://www.iana.org/assignments/media-types/media-types.xhtml -- https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types -- https://hg.nginx.org/nginx/raw-file/default/conf/mime.types - -## Installation - -```bash -npm install mime-db -``` - -### Database Download - -If you intend to use this in a web browser, you can conveniently access the JSON file via [jsDelivr](https://www.jsdelivr.com/), a popular CDN (Content Delivery Network). To ensure stability and compatibility, it is advisable to specify [a release tag](https://github.com/jshttp/mime-db/tags) instead of using the 'master' branch. This is because the JSON file's format might change in future updates, and relying on a specific release tag will prevent potential issues arising from these changes. - -``` -https://cdn.jsdelivr.net/gh/jshttp/mime-db@master/db.json -``` - -## Usage - -```js -var db = require('mime-db') - -// grab data on .js files -var data = db['application/javascript'] -``` - -## Data Structure - -The JSON file is a map lookup for lowercased mime types. -Each mime type has the following properties: - -- `.source` - where the mime type is defined. - If not set, it's probably a custom media type. - - `apache` - [Apache common media types](https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types) - - `iana` - [IANA-defined media types](https://www.iana.org/assignments/media-types/media-types.xhtml) - - `nginx` - [nginx media types](https://hg.nginx.org/nginx/raw-file/default/conf/mime.types) -- `.extensions[]` - known extensions associated with this mime type. -- `.compressible` - whether a file of this type can be gzipped. -- `.charset` - the default charset associated with this type, if any. - -If unknown, every property could be `undefined`. - -## Note on MIME Type Data and Semver - -This package considers the programmatic api as the semver compatibility. This means the MIME type resolution is *not* considered -in the semver bumps. This means that if you want to pin your `mime-db` data you will need to do it in your application. While -this expectation was not set in docs until now, it is how the pacakge operated, so we do not feel this is a breaking change. - -## Contributing - -The primary way to contribute to this database is by updating the data in -one of the upstream sources. The database is updated from the upstreams -periodically and will pull in any changes. - -### Registering Media Types - -The best way to get new media types included in this library is to register -them with the IANA. The community registration procedure is outlined in -[RFC 6838 section 5](https://tools.ietf.org/html/rfc6838#section-5). Types -registered with the IANA are automatically pulled into this library. - -### Direct Inclusion - -If that is not possible / feasible, they can be added directly here as a -"custom" type. To do this, it is required to have a primary source that -definitively lists the media type. If an extension is going to be listed as -associated with this media type, the source must definitively link the -media type and extension as well. - -To edit the database, only make PRs against `src/custom-types.json` or -`src/custom-suffix.json`. - -The `src/custom-types.json` file is a JSON object with the MIME type as the -keys and the values being an object with the following keys: - -- `compressible` - leave out if you don't know, otherwise `true`/`false` to - indicate whether the data represented by the type is typically compressible. -- `extensions` - include an array of file extensions that are associated with - the type. -- `notes` - human-readable notes about the type, typically what the type is. -- `sources` - include an array of URLs of where the MIME type and the associated - extensions are sourced from. This needs to be a [primary source](https://en.wikipedia.org/wiki/Primary_source); - links to type aggregating sites and Wikipedia are _not acceptable_. - -To update the build, run `npm run build`. - -[ci-image]: https://badgen.net/github/checks/jshttp/mime-db/master?label=ci -[ci-url]: https://github.com/jshttp/mime-db/actions/workflows/ci.yml -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-db/master -[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master -[node-image]: https://badgen.net/npm/node/mime-db -[node-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/mime-db -[npm-url]: https://npmjs.org/package/mime-db -[npm-version-image]: https://badgen.net/npm/v/mime-db diff --git a/node_modules/@nestjs/platform-express/node_modules/mime-db/db.json b/node_modules/@nestjs/platform-express/node_modules/mime-db/db.json deleted file mode 100644 index 7e74733..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/mime-db/db.json +++ /dev/null @@ -1,9342 +0,0 @@ -{ - "application/1d-interleaved-parityfec": { - "source": "iana" - }, - "application/3gpdash-qoe-report+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/3gpp-ims+xml": { - "source": "iana", - "compressible": true - }, - "application/3gpphal+json": { - "source": "iana", - "compressible": true - }, - "application/3gpphalforms+json": { - "source": "iana", - "compressible": true - }, - "application/a2l": { - "source": "iana" - }, - "application/ace+cbor": { - "source": "iana" - }, - "application/ace+json": { - "source": "iana", - "compressible": true - }, - "application/ace-groupcomm+cbor": { - "source": "iana" - }, - "application/ace-trl+cbor": { - "source": "iana" - }, - "application/activemessage": { - "source": "iana" - }, - "application/activity+json": { - "source": "iana", - "compressible": true - }, - "application/aif+cbor": { - "source": "iana" - }, - "application/aif+json": { - "source": "iana", - "compressible": true - }, - "application/alto-cdni+json": { - "source": "iana", - "compressible": true - }, - "application/alto-cdnifilter+json": { - "source": "iana", - "compressible": true - }, - "application/alto-costmap+json": { - "source": "iana", - "compressible": true - }, - "application/alto-costmapfilter+json": { - "source": "iana", - "compressible": true - }, - "application/alto-directory+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointcost+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointcostparams+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointprop+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointpropparams+json": { - "source": "iana", - "compressible": true - }, - "application/alto-error+json": { - "source": "iana", - "compressible": true - }, - "application/alto-networkmap+json": { - "source": "iana", - "compressible": true - }, - "application/alto-networkmapfilter+json": { - "source": "iana", - "compressible": true - }, - "application/alto-propmap+json": { - "source": "iana", - "compressible": true - }, - "application/alto-propmapparams+json": { - "source": "iana", - "compressible": true - }, - "application/alto-tips+json": { - "source": "iana", - "compressible": true - }, - "application/alto-tipsparams+json": { - "source": "iana", - "compressible": true - }, - "application/alto-updatestreamcontrol+json": { - "source": "iana", - "compressible": true - }, - "application/alto-updatestreamparams+json": { - "source": "iana", - "compressible": true - }, - "application/aml": { - "source": "iana" - }, - "application/andrew-inset": { - "source": "iana", - "extensions": ["ez"] - }, - "application/appinstaller": { - "compressible": false, - "extensions": ["appinstaller"] - }, - "application/applefile": { - "source": "iana" - }, - "application/applixware": { - "source": "apache", - "extensions": ["aw"] - }, - "application/appx": { - "compressible": false, - "extensions": ["appx"] - }, - "application/appxbundle": { - "compressible": false, - "extensions": ["appxbundle"] - }, - "application/at+jwt": { - "source": "iana" - }, - "application/atf": { - "source": "iana" - }, - "application/atfx": { - "source": "iana" - }, - "application/atom+xml": { - "source": "iana", - "compressible": true, - "extensions": ["atom"] - }, - "application/atomcat+xml": { - "source": "iana", - "compressible": true, - "extensions": ["atomcat"] - }, - "application/atomdeleted+xml": { - "source": "iana", - "compressible": true, - "extensions": ["atomdeleted"] - }, - "application/atomicmail": { - "source": "iana" - }, - "application/atomsvc+xml": { - "source": "iana", - "compressible": true, - "extensions": ["atomsvc"] - }, - "application/atsc-dwd+xml": { - "source": "iana", - "compressible": true, - "extensions": ["dwd"] - }, - "application/atsc-dynamic-event-message": { - "source": "iana" - }, - "application/atsc-held+xml": { - "source": "iana", - "compressible": true, - "extensions": ["held"] - }, - "application/atsc-rdt+json": { - "source": "iana", - "compressible": true - }, - "application/atsc-rsat+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rsat"] - }, - "application/atxml": { - "source": "iana" - }, - "application/auth-policy+xml": { - "source": "iana", - "compressible": true - }, - "application/automationml-aml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["aml"] - }, - "application/automationml-amlx+zip": { - "source": "iana", - "compressible": false, - "extensions": ["amlx"] - }, - "application/bacnet-xdd+zip": { - "source": "iana", - "compressible": false - }, - "application/batch-smtp": { - "source": "iana" - }, - "application/bdoc": { - "compressible": false, - "extensions": ["bdoc"] - }, - "application/beep+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/bufr": { - "source": "iana" - }, - "application/c2pa": { - "source": "iana" - }, - "application/calendar+json": { - "source": "iana", - "compressible": true - }, - "application/calendar+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xcs"] - }, - "application/call-completion": { - "source": "iana" - }, - "application/cals-1840": { - "source": "iana" - }, - "application/captive+json": { - "source": "iana", - "compressible": true - }, - "application/cbor": { - "source": "iana" - }, - "application/cbor-seq": { - "source": "iana" - }, - "application/cccex": { - "source": "iana" - }, - "application/ccmp+xml": { - "source": "iana", - "compressible": true - }, - "application/ccxml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["ccxml"] - }, - "application/cda+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/cdfx+xml": { - "source": "iana", - "compressible": true, - "extensions": ["cdfx"] - }, - "application/cdmi-capability": { - "source": "iana", - "extensions": ["cdmia"] - }, - "application/cdmi-container": { - "source": "iana", - "extensions": ["cdmic"] - }, - "application/cdmi-domain": { - "source": "iana", - "extensions": ["cdmid"] - }, - "application/cdmi-object": { - "source": "iana", - "extensions": ["cdmio"] - }, - "application/cdmi-queue": { - "source": "iana", - "extensions": ["cdmiq"] - }, - "application/cdni": { - "source": "iana" - }, - "application/ce+cbor": { - "source": "iana" - }, - "application/cea": { - "source": "iana" - }, - "application/cea-2018+xml": { - "source": "iana", - "compressible": true - }, - "application/cellml+xml": { - "source": "iana", - "compressible": true - }, - "application/cfw": { - "source": "iana" - }, - "application/cid-edhoc+cbor-seq": { - "source": "iana" - }, - "application/city+json": { - "source": "iana", - "compressible": true - }, - "application/city+json-seq": { - "source": "iana" - }, - "application/clr": { - "source": "iana" - }, - "application/clue+xml": { - "source": "iana", - "compressible": true - }, - "application/clue_info+xml": { - "source": "iana", - "compressible": true - }, - "application/cms": { - "source": "iana" - }, - "application/cnrp+xml": { - "source": "iana", - "compressible": true - }, - "application/coap-eap": { - "source": "iana" - }, - "application/coap-group+json": { - "source": "iana", - "compressible": true - }, - "application/coap-payload": { - "source": "iana" - }, - "application/commonground": { - "source": "iana" - }, - "application/concise-problem-details+cbor": { - "source": "iana" - }, - "application/conference-info+xml": { - "source": "iana", - "compressible": true - }, - "application/cose": { - "source": "iana" - }, - "application/cose-key": { - "source": "iana" - }, - "application/cose-key-set": { - "source": "iana" - }, - "application/cose-x509": { - "source": "iana" - }, - "application/cpl+xml": { - "source": "iana", - "compressible": true, - "extensions": ["cpl"] - }, - "application/csrattrs": { - "source": "iana" - }, - "application/csta+xml": { - "source": "iana", - "compressible": true - }, - "application/cstadata+xml": { - "source": "iana", - "compressible": true - }, - "application/csvm+json": { - "source": "iana", - "compressible": true - }, - "application/cu-seeme": { - "source": "apache", - "extensions": ["cu"] - }, - "application/cwl": { - "source": "iana", - "extensions": ["cwl"] - }, - "application/cwl+json": { - "source": "iana", - "compressible": true - }, - "application/cwl+yaml": { - "source": "iana" - }, - "application/cwt": { - "source": "iana" - }, - "application/cybercash": { - "source": "iana" - }, - "application/dart": { - "compressible": true - }, - "application/dash+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mpd"] - }, - "application/dash-patch+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mpp"] - }, - "application/dashdelta": { - "source": "iana" - }, - "application/davmount+xml": { - "source": "iana", - "compressible": true, - "extensions": ["davmount"] - }, - "application/dca-rft": { - "source": "iana" - }, - "application/dcd": { - "source": "iana" - }, - "application/dec-dx": { - "source": "iana" - }, - "application/dialog-info+xml": { - "source": "iana", - "compressible": true - }, - "application/dicom": { - "source": "iana", - "extensions": ["dcm"] - }, - "application/dicom+json": { - "source": "iana", - "compressible": true - }, - "application/dicom+xml": { - "source": "iana", - "compressible": true - }, - "application/dii": { - "source": "iana" - }, - "application/dit": { - "source": "iana" - }, - "application/dns": { - "source": "iana" - }, - "application/dns+json": { - "source": "iana", - "compressible": true - }, - "application/dns-message": { - "source": "iana" - }, - "application/docbook+xml": { - "source": "apache", - "compressible": true, - "extensions": ["dbk"] - }, - "application/dots+cbor": { - "source": "iana" - }, - "application/dpop+jwt": { - "source": "iana" - }, - "application/dskpp+xml": { - "source": "iana", - "compressible": true - }, - "application/dssc+der": { - "source": "iana", - "extensions": ["dssc"] - }, - "application/dssc+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xdssc"] - }, - "application/dvcs": { - "source": "iana" - }, - "application/eat+cwt": { - "source": "iana" - }, - "application/eat+jwt": { - "source": "iana" - }, - "application/eat-bun+cbor": { - "source": "iana" - }, - "application/eat-bun+json": { - "source": "iana", - "compressible": true - }, - "application/eat-ucs+cbor": { - "source": "iana" - }, - "application/eat-ucs+json": { - "source": "iana", - "compressible": true - }, - "application/ecmascript": { - "source": "apache", - "compressible": true, - "extensions": ["ecma"] - }, - "application/edhoc+cbor-seq": { - "source": "iana" - }, - "application/edi-consent": { - "source": "iana" - }, - "application/edi-x12": { - "source": "iana", - "compressible": false - }, - "application/edifact": { - "source": "iana", - "compressible": false - }, - "application/efi": { - "source": "iana" - }, - "application/elm+json": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/elm+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.cap+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/emergencycalldata.comment+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.control+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.deviceinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.ecall.msd": { - "source": "iana" - }, - "application/emergencycalldata.legacyesn+json": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.providerinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.serviceinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.subscriberinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.veds+xml": { - "source": "iana", - "compressible": true - }, - "application/emma+xml": { - "source": "iana", - "compressible": true, - "extensions": ["emma"] - }, - "application/emotionml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["emotionml"] - }, - "application/encaprtp": { - "source": "iana" - }, - "application/entity-statement+jwt": { - "source": "iana" - }, - "application/epp+xml": { - "source": "iana", - "compressible": true - }, - "application/epub+zip": { - "source": "iana", - "compressible": false, - "extensions": ["epub"] - }, - "application/eshop": { - "source": "iana" - }, - "application/exi": { - "source": "iana", - "extensions": ["exi"] - }, - "application/expect-ct-report+json": { - "source": "iana", - "compressible": true - }, - "application/express": { - "source": "iana", - "extensions": ["exp"] - }, - "application/fastinfoset": { - "source": "iana" - }, - "application/fastsoap": { - "source": "iana" - }, - "application/fdf": { - "source": "iana", - "extensions": ["fdf"] - }, - "application/fdt+xml": { - "source": "iana", - "compressible": true, - "extensions": ["fdt"] - }, - "application/fhir+json": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/fhir+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/fido.trusted-apps+json": { - "compressible": true - }, - "application/fits": { - "source": "iana" - }, - "application/flexfec": { - "source": "iana" - }, - "application/font-sfnt": { - "source": "iana" - }, - "application/font-tdpfr": { - "source": "iana", - "extensions": ["pfr"] - }, - "application/font-woff": { - "source": "iana", - "compressible": false - }, - "application/framework-attributes+xml": { - "source": "iana", - "compressible": true - }, - "application/geo+json": { - "source": "iana", - "compressible": true, - "extensions": ["geojson"] - }, - "application/geo+json-seq": { - "source": "iana" - }, - "application/geopackage+sqlite3": { - "source": "iana" - }, - "application/geopose+json": { - "source": "iana", - "compressible": true - }, - "application/geoxacml+json": { - "source": "iana", - "compressible": true - }, - "application/geoxacml+xml": { - "source": "iana", - "compressible": true - }, - "application/gltf-buffer": { - "source": "iana" - }, - "application/gml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["gml"] - }, - "application/gnap-binding-jws": { - "source": "iana" - }, - "application/gnap-binding-jwsd": { - "source": "iana" - }, - "application/gnap-binding-rotation-jws": { - "source": "iana" - }, - "application/gnap-binding-rotation-jwsd": { - "source": "iana" - }, - "application/gpx+xml": { - "source": "apache", - "compressible": true, - "extensions": ["gpx"] - }, - "application/grib": { - "source": "iana" - }, - "application/gxf": { - "source": "apache", - "extensions": ["gxf"] - }, - "application/gzip": { - "source": "iana", - "compressible": false, - "extensions": ["gz"] - }, - "application/h224": { - "source": "iana" - }, - "application/held+xml": { - "source": "iana", - "compressible": true - }, - "application/hjson": { - "extensions": ["hjson"] - }, - "application/hl7v2+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/http": { - "source": "iana" - }, - "application/hyperstudio": { - "source": "iana", - "extensions": ["stk"] - }, - "application/ibe-key-request+xml": { - "source": "iana", - "compressible": true - }, - "application/ibe-pkg-reply+xml": { - "source": "iana", - "compressible": true - }, - "application/ibe-pp-data": { - "source": "iana" - }, - "application/iges": { - "source": "iana" - }, - "application/im-iscomposing+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/index": { - "source": "iana" - }, - "application/index.cmd": { - "source": "iana" - }, - "application/index.obj": { - "source": "iana" - }, - "application/index.response": { - "source": "iana" - }, - "application/index.vnd": { - "source": "iana" - }, - "application/inkml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["ink","inkml"] - }, - "application/iotp": { - "source": "iana" - }, - "application/ipfix": { - "source": "iana", - "extensions": ["ipfix"] - }, - "application/ipp": { - "source": "iana" - }, - "application/isup": { - "source": "iana" - }, - "application/its+xml": { - "source": "iana", - "compressible": true, - "extensions": ["its"] - }, - "application/java-archive": { - "source": "iana", - "compressible": false, - "extensions": ["jar","war","ear"] - }, - "application/java-serialized-object": { - "source": "apache", - "compressible": false, - "extensions": ["ser"] - }, - "application/java-vm": { - "source": "apache", - "compressible": false, - "extensions": ["class"] - }, - "application/javascript": { - "source": "apache", - "charset": "UTF-8", - "compressible": true, - "extensions": ["js"] - }, - "application/jf2feed+json": { - "source": "iana", - "compressible": true - }, - "application/jose": { - "source": "iana" - }, - "application/jose+json": { - "source": "iana", - "compressible": true - }, - "application/jrd+json": { - "source": "iana", - "compressible": true - }, - "application/jscalendar+json": { - "source": "iana", - "compressible": true - }, - "application/jscontact+json": { - "source": "iana", - "compressible": true - }, - "application/json": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["json","map"] - }, - "application/json-patch+json": { - "source": "iana", - "compressible": true - }, - "application/json-seq": { - "source": "iana" - }, - "application/json5": { - "extensions": ["json5"] - }, - "application/jsonml+json": { - "source": "apache", - "compressible": true, - "extensions": ["jsonml"] - }, - "application/jsonpath": { - "source": "iana" - }, - "application/jwk+json": { - "source": "iana", - "compressible": true - }, - "application/jwk-set+json": { - "source": "iana", - "compressible": true - }, - "application/jwk-set+jwt": { - "source": "iana" - }, - "application/jwt": { - "source": "iana" - }, - "application/kpml-request+xml": { - "source": "iana", - "compressible": true - }, - "application/kpml-response+xml": { - "source": "iana", - "compressible": true - }, - "application/ld+json": { - "source": "iana", - "compressible": true, - "extensions": ["jsonld"] - }, - "application/lgr+xml": { - "source": "iana", - "compressible": true, - "extensions": ["lgr"] - }, - "application/link-format": { - "source": "iana" - }, - "application/linkset": { - "source": "iana" - }, - "application/linkset+json": { - "source": "iana", - "compressible": true - }, - "application/load-control+xml": { - "source": "iana", - "compressible": true - }, - "application/logout+jwt": { - "source": "iana" - }, - "application/lost+xml": { - "source": "iana", - "compressible": true, - "extensions": ["lostxml"] - }, - "application/lostsync+xml": { - "source": "iana", - "compressible": true - }, - "application/lpf+zip": { - "source": "iana", - "compressible": false - }, - "application/lxf": { - "source": "iana" - }, - "application/mac-binhex40": { - "source": "iana", - "extensions": ["hqx"] - }, - "application/mac-compactpro": { - "source": "apache", - "extensions": ["cpt"] - }, - "application/macwriteii": { - "source": "iana" - }, - "application/mads+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mads"] - }, - "application/manifest+json": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["webmanifest"] - }, - "application/marc": { - "source": "iana", - "extensions": ["mrc"] - }, - "application/marcxml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mrcx"] - }, - "application/mathematica": { - "source": "iana", - "extensions": ["ma","nb","mb"] - }, - "application/mathml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mathml"] - }, - "application/mathml-content+xml": { - "source": "iana", - "compressible": true - }, - "application/mathml-presentation+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-associated-procedure-description+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-deregister+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-envelope+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-msk+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-msk-response+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-protection-description+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-reception-report+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-register+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-register-response+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-schedule+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-user-service-description+xml": { - "source": "iana", - "compressible": true - }, - "application/mbox": { - "source": "iana", - "extensions": ["mbox"] - }, - "application/media-policy-dataset+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mpf"] - }, - "application/media_control+xml": { - "source": "iana", - "compressible": true - }, - "application/mediaservercontrol+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mscml"] - }, - "application/merge-patch+json": { - "source": "iana", - "compressible": true - }, - "application/metalink+xml": { - "source": "apache", - "compressible": true, - "extensions": ["metalink"] - }, - "application/metalink4+xml": { - "source": "iana", - "compressible": true, - "extensions": ["meta4"] - }, - "application/mets+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mets"] - }, - "application/mf4": { - "source": "iana" - }, - "application/mikey": { - "source": "iana" - }, - "application/mipc": { - "source": "iana" - }, - "application/missing-blocks+cbor-seq": { - "source": "iana" - }, - "application/mmt-aei+xml": { - "source": "iana", - "compressible": true, - "extensions": ["maei"] - }, - "application/mmt-usd+xml": { - "source": "iana", - "compressible": true, - "extensions": ["musd"] - }, - "application/mods+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mods"] - }, - "application/moss-keys": { - "source": "iana" - }, - "application/moss-signature": { - "source": "iana" - }, - "application/mosskey-data": { - "source": "iana" - }, - "application/mosskey-request": { - "source": "iana" - }, - "application/mp21": { - "source": "iana", - "extensions": ["m21","mp21"] - }, - "application/mp4": { - "source": "iana", - "extensions": ["mp4","mpg4","mp4s","m4p"] - }, - "application/mpeg4-generic": { - "source": "iana" - }, - "application/mpeg4-iod": { - "source": "iana" - }, - "application/mpeg4-iod-xmt": { - "source": "iana" - }, - "application/mrb-consumer+xml": { - "source": "iana", - "compressible": true - }, - "application/mrb-publish+xml": { - "source": "iana", - "compressible": true - }, - "application/msc-ivr+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/msc-mixer+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/msix": { - "compressible": false, - "extensions": ["msix"] - }, - "application/msixbundle": { - "compressible": false, - "extensions": ["msixbundle"] - }, - "application/msword": { - "source": "iana", - "compressible": false, - "extensions": ["doc","dot"] - }, - "application/mud+json": { - "source": "iana", - "compressible": true - }, - "application/multipart-core": { - "source": "iana" - }, - "application/mxf": { - "source": "iana", - "extensions": ["mxf"] - }, - "application/n-quads": { - "source": "iana", - "extensions": ["nq"] - }, - "application/n-triples": { - "source": "iana", - "extensions": ["nt"] - }, - "application/nasdata": { - "source": "iana" - }, - "application/news-checkgroups": { - "source": "iana", - "charset": "US-ASCII" - }, - "application/news-groupinfo": { - "source": "iana", - "charset": "US-ASCII" - }, - "application/news-transmission": { - "source": "iana" - }, - "application/nlsml+xml": { - "source": "iana", - "compressible": true - }, - "application/node": { - "source": "iana", - "extensions": ["cjs"] - }, - "application/nss": { - "source": "iana" - }, - "application/oauth-authz-req+jwt": { - "source": "iana" - }, - "application/oblivious-dns-message": { - "source": "iana" - }, - "application/ocsp-request": { - "source": "iana" - }, - "application/ocsp-response": { - "source": "iana" - }, - "application/octet-stream": { - "source": "iana", - "compressible": true, - "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"] - }, - "application/oda": { - "source": "iana", - "extensions": ["oda"] - }, - "application/odm+xml": { - "source": "iana", - "compressible": true - }, - "application/odx": { - "source": "iana" - }, - "application/oebps-package+xml": { - "source": "iana", - "compressible": true, - "extensions": ["opf"] - }, - "application/ogg": { - "source": "iana", - "compressible": false, - "extensions": ["ogx"] - }, - "application/ohttp-keys": { - "source": "iana" - }, - "application/omdoc+xml": { - "source": "apache", - "compressible": true, - "extensions": ["omdoc"] - }, - "application/onenote": { - "source": "apache", - "extensions": ["onetoc","onetoc2","onetmp","onepkg","one","onea"] - }, - "application/opc-nodeset+xml": { - "source": "iana", - "compressible": true - }, - "application/oscore": { - "source": "iana" - }, - "application/oxps": { - "source": "iana", - "extensions": ["oxps"] - }, - "application/p21": { - "source": "iana" - }, - "application/p21+zip": { - "source": "iana", - "compressible": false - }, - "application/p2p-overlay+xml": { - "source": "iana", - "compressible": true, - "extensions": ["relo"] - }, - "application/parityfec": { - "source": "iana" - }, - "application/passport": { - "source": "iana" - }, - "application/patch-ops-error+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xer"] - }, - "application/pdf": { - "source": "iana", - "compressible": false, - "extensions": ["pdf"] - }, - "application/pdx": { - "source": "iana" - }, - "application/pem-certificate-chain": { - "source": "iana" - }, - "application/pgp-encrypted": { - "source": "iana", - "compressible": false, - "extensions": ["pgp"] - }, - "application/pgp-keys": { - "source": "iana", - "extensions": ["asc"] - }, - "application/pgp-signature": { - "source": "iana", - "extensions": ["sig","asc"] - }, - "application/pics-rules": { - "source": "apache", - "extensions": ["prf"] - }, - "application/pidf+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/pidf-diff+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/pkcs10": { - "source": "iana", - "extensions": ["p10"] - }, - "application/pkcs12": { - "source": "iana" - }, - "application/pkcs7-mime": { - "source": "iana", - "extensions": ["p7m","p7c"] - }, - "application/pkcs7-signature": { - "source": "iana", - "extensions": ["p7s"] - }, - "application/pkcs8": { - "source": "iana", - "extensions": ["p8"] - }, - "application/pkcs8-encrypted": { - "source": "iana" - }, - "application/pkix-attr-cert": { - "source": "iana", - "extensions": ["ac"] - }, - "application/pkix-cert": { - "source": "iana", - "extensions": ["cer"] - }, - "application/pkix-crl": { - "source": "iana", - "extensions": ["crl"] - }, - "application/pkix-pkipath": { - "source": "iana", - "extensions": ["pkipath"] - }, - "application/pkixcmp": { - "source": "iana", - "extensions": ["pki"] - }, - "application/pls+xml": { - "source": "iana", - "compressible": true, - "extensions": ["pls"] - }, - "application/poc-settings+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/postscript": { - "source": "iana", - "compressible": true, - "extensions": ["ai","eps","ps"] - }, - "application/ppsp-tracker+json": { - "source": "iana", - "compressible": true - }, - "application/private-token-issuer-directory": { - "source": "iana" - }, - "application/private-token-request": { - "source": "iana" - }, - "application/private-token-response": { - "source": "iana" - }, - "application/problem+json": { - "source": "iana", - "compressible": true - }, - "application/problem+xml": { - "source": "iana", - "compressible": true - }, - "application/provenance+xml": { - "source": "iana", - "compressible": true, - "extensions": ["provx"] - }, - "application/provided-claims+jwt": { - "source": "iana" - }, - "application/prs.alvestrand.titrax-sheet": { - "source": "iana" - }, - "application/prs.cww": { - "source": "iana", - "extensions": ["cww"] - }, - "application/prs.cyn": { - "source": "iana", - "charset": "7-BIT" - }, - "application/prs.hpub+zip": { - "source": "iana", - "compressible": false - }, - "application/prs.implied-document+xml": { - "source": "iana", - "compressible": true - }, - "application/prs.implied-executable": { - "source": "iana" - }, - "application/prs.implied-object+json": { - "source": "iana", - "compressible": true - }, - "application/prs.implied-object+json-seq": { - "source": "iana" - }, - "application/prs.implied-object+yaml": { - "source": "iana" - }, - "application/prs.implied-structure": { - "source": "iana" - }, - "application/prs.mayfile": { - "source": "iana" - }, - "application/prs.nprend": { - "source": "iana" - }, - "application/prs.plucker": { - "source": "iana" - }, - "application/prs.rdf-xml-crypt": { - "source": "iana" - }, - "application/prs.vcfbzip2": { - "source": "iana" - }, - "application/prs.xsf+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xsf"] - }, - "application/pskc+xml": { - "source": "iana", - "compressible": true, - "extensions": ["pskcxml"] - }, - "application/pvd+json": { - "source": "iana", - "compressible": true - }, - "application/qsig": { - "source": "iana" - }, - "application/raml+yaml": { - "compressible": true, - "extensions": ["raml"] - }, - "application/raptorfec": { - "source": "iana" - }, - "application/rdap+json": { - "source": "iana", - "compressible": true - }, - "application/rdf+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rdf","owl"] - }, - "application/reginfo+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rif"] - }, - "application/relax-ng-compact-syntax": { - "source": "iana", - "extensions": ["rnc"] - }, - "application/remote-printing": { - "source": "apache" - }, - "application/reputon+json": { - "source": "iana", - "compressible": true - }, - "application/resolve-response+jwt": { - "source": "iana" - }, - "application/resource-lists+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rl"] - }, - "application/resource-lists-diff+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rld"] - }, - "application/rfc+xml": { - "source": "iana", - "compressible": true - }, - "application/riscos": { - "source": "iana" - }, - "application/rlmi+xml": { - "source": "iana", - "compressible": true - }, - "application/rls-services+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rs"] - }, - "application/route-apd+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rapd"] - }, - "application/route-s-tsid+xml": { - "source": "iana", - "compressible": true, - "extensions": ["sls"] - }, - "application/route-usd+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rusd"] - }, - "application/rpki-checklist": { - "source": "iana" - }, - "application/rpki-ghostbusters": { - "source": "iana", - "extensions": ["gbr"] - }, - "application/rpki-manifest": { - "source": "iana", - "extensions": ["mft"] - }, - "application/rpki-publication": { - "source": "iana" - }, - "application/rpki-roa": { - "source": "iana", - "extensions": ["roa"] - }, - "application/rpki-signed-tal": { - "source": "iana" - }, - "application/rpki-updown": { - "source": "iana" - }, - "application/rsd+xml": { - "source": "apache", - "compressible": true, - "extensions": ["rsd"] - }, - "application/rss+xml": { - "source": "apache", - "compressible": true, - "extensions": ["rss"] - }, - "application/rtf": { - "source": "iana", - "compressible": true, - "extensions": ["rtf"] - }, - "application/rtploopback": { - "source": "iana" - }, - "application/rtx": { - "source": "iana" - }, - "application/samlassertion+xml": { - "source": "iana", - "compressible": true - }, - "application/samlmetadata+xml": { - "source": "iana", - "compressible": true - }, - "application/sarif+json": { - "source": "iana", - "compressible": true - }, - "application/sarif-external-properties+json": { - "source": "iana", - "compressible": true - }, - "application/sbe": { - "source": "iana" - }, - "application/sbml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["sbml"] - }, - "application/scaip+xml": { - "source": "iana", - "compressible": true - }, - "application/scim+json": { - "source": "iana", - "compressible": true - }, - "application/scvp-cv-request": { - "source": "iana", - "extensions": ["scq"] - }, - "application/scvp-cv-response": { - "source": "iana", - "extensions": ["scs"] - }, - "application/scvp-vp-request": { - "source": "iana", - "extensions": ["spq"] - }, - "application/scvp-vp-response": { - "source": "iana", - "extensions": ["spp"] - }, - "application/sdp": { - "source": "iana", - "extensions": ["sdp"] - }, - "application/secevent+jwt": { - "source": "iana" - }, - "application/senml+cbor": { - "source": "iana" - }, - "application/senml+json": { - "source": "iana", - "compressible": true - }, - "application/senml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["senmlx"] - }, - "application/senml-etch+cbor": { - "source": "iana" - }, - "application/senml-etch+json": { - "source": "iana", - "compressible": true - }, - "application/senml-exi": { - "source": "iana" - }, - "application/sensml+cbor": { - "source": "iana" - }, - "application/sensml+json": { - "source": "iana", - "compressible": true - }, - "application/sensml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["sensmlx"] - }, - "application/sensml-exi": { - "source": "iana" - }, - "application/sep+xml": { - "source": "iana", - "compressible": true - }, - "application/sep-exi": { - "source": "iana" - }, - "application/session-info": { - "source": "iana" - }, - "application/set-payment": { - "source": "iana" - }, - "application/set-payment-initiation": { - "source": "iana", - "extensions": ["setpay"] - }, - "application/set-registration": { - "source": "iana" - }, - "application/set-registration-initiation": { - "source": "iana", - "extensions": ["setreg"] - }, - "application/sgml": { - "source": "iana" - }, - "application/sgml-open-catalog": { - "source": "iana" - }, - "application/shf+xml": { - "source": "iana", - "compressible": true, - "extensions": ["shf"] - }, - "application/sieve": { - "source": "iana", - "extensions": ["siv","sieve"] - }, - "application/simple-filter+xml": { - "source": "iana", - "compressible": true - }, - "application/simple-message-summary": { - "source": "iana" - }, - "application/simplesymbolcontainer": { - "source": "iana" - }, - "application/sipc": { - "source": "iana" - }, - "application/slate": { - "source": "iana" - }, - "application/smil": { - "source": "apache" - }, - "application/smil+xml": { - "source": "iana", - "compressible": true, - "extensions": ["smi","smil"] - }, - "application/smpte336m": { - "source": "iana" - }, - "application/soap+fastinfoset": { - "source": "iana" - }, - "application/soap+xml": { - "source": "iana", - "compressible": true - }, - "application/sparql-query": { - "source": "iana", - "extensions": ["rq"] - }, - "application/sparql-results+xml": { - "source": "iana", - "compressible": true, - "extensions": ["srx"] - }, - "application/spdx+json": { - "source": "iana", - "compressible": true - }, - "application/spirits-event+xml": { - "source": "iana", - "compressible": true - }, - "application/sql": { - "source": "iana", - "extensions": ["sql"] - }, - "application/srgs": { - "source": "iana", - "extensions": ["gram"] - }, - "application/srgs+xml": { - "source": "iana", - "compressible": true, - "extensions": ["grxml"] - }, - "application/sru+xml": { - "source": "iana", - "compressible": true, - "extensions": ["sru"] - }, - "application/ssdl+xml": { - "source": "apache", - "compressible": true, - "extensions": ["ssdl"] - }, - "application/sslkeylogfile": { - "source": "iana" - }, - "application/ssml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["ssml"] - }, - "application/st2110-41": { - "source": "iana" - }, - "application/stix+json": { - "source": "iana", - "compressible": true - }, - "application/stratum": { - "source": "iana" - }, - "application/swid+cbor": { - "source": "iana" - }, - "application/swid+xml": { - "source": "iana", - "compressible": true, - "extensions": ["swidtag"] - }, - "application/tamp-apex-update": { - "source": "iana" - }, - "application/tamp-apex-update-confirm": { - "source": "iana" - }, - "application/tamp-community-update": { - "source": "iana" - }, - "application/tamp-community-update-confirm": { - "source": "iana" - }, - "application/tamp-error": { - "source": "iana" - }, - "application/tamp-sequence-adjust": { - "source": "iana" - }, - "application/tamp-sequence-adjust-confirm": { - "source": "iana" - }, - "application/tamp-status-query": { - "source": "iana" - }, - "application/tamp-status-response": { - "source": "iana" - }, - "application/tamp-update": { - "source": "iana" - }, - "application/tamp-update-confirm": { - "source": "iana" - }, - "application/tar": { - "compressible": true - }, - "application/taxii+json": { - "source": "iana", - "compressible": true - }, - "application/td+json": { - "source": "iana", - "compressible": true - }, - "application/tei+xml": { - "source": "iana", - "compressible": true, - "extensions": ["tei","teicorpus"] - }, - "application/tetra_isi": { - "source": "iana" - }, - "application/thraud+xml": { - "source": "iana", - "compressible": true, - "extensions": ["tfi"] - }, - "application/timestamp-query": { - "source": "iana" - }, - "application/timestamp-reply": { - "source": "iana" - }, - "application/timestamped-data": { - "source": "iana", - "extensions": ["tsd"] - }, - "application/tlsrpt+gzip": { - "source": "iana" - }, - "application/tlsrpt+json": { - "source": "iana", - "compressible": true - }, - "application/tm+json": { - "source": "iana", - "compressible": true - }, - "application/tnauthlist": { - "source": "iana" - }, - "application/toc+cbor": { - "source": "iana" - }, - "application/token-introspection+jwt": { - "source": "iana" - }, - "application/toml": { - "source": "iana", - "compressible": true, - "extensions": ["toml"] - }, - "application/trickle-ice-sdpfrag": { - "source": "iana" - }, - "application/trig": { - "source": "iana", - "extensions": ["trig"] - }, - "application/trust-chain+json": { - "source": "iana", - "compressible": true - }, - "application/trust-mark+jwt": { - "source": "iana" - }, - "application/trust-mark-delegation+jwt": { - "source": "iana" - }, - "application/ttml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["ttml"] - }, - "application/tve-trigger": { - "source": "iana" - }, - "application/tzif": { - "source": "iana" - }, - "application/tzif-leap": { - "source": "iana" - }, - "application/ubjson": { - "compressible": false, - "extensions": ["ubj"] - }, - "application/uccs+cbor": { - "source": "iana" - }, - "application/ujcs+json": { - "source": "iana", - "compressible": true - }, - "application/ulpfec": { - "source": "iana" - }, - "application/urc-grpsheet+xml": { - "source": "iana", - "compressible": true - }, - "application/urc-ressheet+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rsheet"] - }, - "application/urc-targetdesc+xml": { - "source": "iana", - "compressible": true, - "extensions": ["td"] - }, - "application/urc-uisocketdesc+xml": { - "source": "iana", - "compressible": true - }, - "application/vc": { - "source": "iana" - }, - "application/vc+cose": { - "source": "iana" - }, - "application/vc+jwt": { - "source": "iana" - }, - "application/vcard+json": { - "source": "iana", - "compressible": true - }, - "application/vcard+xml": { - "source": "iana", - "compressible": true - }, - "application/vemmi": { - "source": "iana" - }, - "application/vividence.scriptfile": { - "source": "apache" - }, - "application/vnd.1000minds.decision-model+xml": { - "source": "iana", - "compressible": true, - "extensions": ["1km"] - }, - "application/vnd.1ob": { - "source": "iana" - }, - "application/vnd.3gpp-prose+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp-prose-pc3a+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp-prose-pc3ach+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp-prose-pc3ch+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp-prose-pc8+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp-v2x-local-service-information": { - "source": "iana" - }, - "application/vnd.3gpp.5gnas": { - "source": "iana" - }, - "application/vnd.3gpp.5gsa2x": { - "source": "iana" - }, - "application/vnd.3gpp.5gsa2x-local-service-information": { - "source": "iana" - }, - "application/vnd.3gpp.5gsv2x": { - "source": "iana" - }, - "application/vnd.3gpp.5gsv2x-local-service-information": { - "source": "iana" - }, - "application/vnd.3gpp.access-transfer-events+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.bsf+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.crs+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.current-location-discovery+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.gmop+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.gtpc": { - "source": "iana" - }, - "application/vnd.3gpp.interworking-data": { - "source": "iana" - }, - "application/vnd.3gpp.lpp": { - "source": "iana" - }, - "application/vnd.3gpp.mc-signalling-ear": { - "source": "iana" - }, - "application/vnd.3gpp.mcdata-affiliation-command+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcdata-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcdata-msgstore-ctrl-request+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcdata-payload": { - "source": "iana" - }, - "application/vnd.3gpp.mcdata-regroup+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcdata-service-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcdata-signalling": { - "source": "iana" - }, - "application/vnd.3gpp.mcdata-ue-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcdata-user-profile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-affiliation-command+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-floor-request+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-location-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-mbms-usage-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-regroup+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-service-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-signed+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-ue-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-ue-init-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-user-profile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-affiliation-command+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-location-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-mbms-usage-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-regroup+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-service-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-transmission-request+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-ue-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-user-profile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mid-call+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.ngap": { - "source": "iana" - }, - "application/vnd.3gpp.pfcp": { - "source": "iana" - }, - "application/vnd.3gpp.pic-bw-large": { - "source": "iana", - "extensions": ["plb"] - }, - "application/vnd.3gpp.pic-bw-small": { - "source": "iana", - "extensions": ["psb"] - }, - "application/vnd.3gpp.pic-bw-var": { - "source": "iana", - "extensions": ["pvb"] - }, - "application/vnd.3gpp.pinapp-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.s1ap": { - "source": "iana" - }, - "application/vnd.3gpp.seal-group-doc+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.seal-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.seal-location-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.seal-mbms-usage-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.seal-network-qos-management-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.seal-ue-config-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.seal-unicast-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.seal-user-profile-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.sms": { - "source": "iana" - }, - "application/vnd.3gpp.sms+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.srvcc-ext+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.srvcc-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.state-and-event-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.ussd+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.v2x": { - "source": "iana" - }, - "application/vnd.3gpp.vae-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp2.bcmcsinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp2.sms": { - "source": "iana" - }, - "application/vnd.3gpp2.tcap": { - "source": "iana", - "extensions": ["tcap"] - }, - "application/vnd.3lightssoftware.imagescal": { - "source": "iana" - }, - "application/vnd.3m.post-it-notes": { - "source": "iana", - "extensions": ["pwn"] - }, - "application/vnd.accpac.simply.aso": { - "source": "iana", - "extensions": ["aso"] - }, - "application/vnd.accpac.simply.imp": { - "source": "iana", - "extensions": ["imp"] - }, - "application/vnd.acm.addressxfer+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.acm.chatbot+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.acucobol": { - "source": "iana", - "extensions": ["acu"] - }, - "application/vnd.acucorp": { - "source": "iana", - "extensions": ["atc","acutc"] - }, - "application/vnd.adobe.air-application-installer-package+zip": { - "source": "apache", - "compressible": false, - "extensions": ["air"] - }, - "application/vnd.adobe.flash.movie": { - "source": "iana" - }, - "application/vnd.adobe.formscentral.fcdt": { - "source": "iana", - "extensions": ["fcdt"] - }, - "application/vnd.adobe.fxp": { - "source": "iana", - "extensions": ["fxp","fxpl"] - }, - "application/vnd.adobe.partial-upload": { - "source": "iana" - }, - "application/vnd.adobe.xdp+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xdp"] - }, - "application/vnd.adobe.xfdf": { - "source": "apache", - "extensions": ["xfdf"] - }, - "application/vnd.aether.imp": { - "source": "iana" - }, - "application/vnd.afpc.afplinedata": { - "source": "iana" - }, - "application/vnd.afpc.afplinedata-pagedef": { - "source": "iana" - }, - "application/vnd.afpc.cmoca-cmresource": { - "source": "iana" - }, - "application/vnd.afpc.foca-charset": { - "source": "iana" - }, - "application/vnd.afpc.foca-codedfont": { - "source": "iana" - }, - "application/vnd.afpc.foca-codepage": { - "source": "iana" - }, - "application/vnd.afpc.modca": { - "source": "iana" - }, - "application/vnd.afpc.modca-cmtable": { - "source": "iana" - }, - "application/vnd.afpc.modca-formdef": { - "source": "iana" - }, - "application/vnd.afpc.modca-mediummap": { - "source": "iana" - }, - "application/vnd.afpc.modca-objectcontainer": { - "source": "iana" - }, - "application/vnd.afpc.modca-overlay": { - "source": "iana" - }, - "application/vnd.afpc.modca-pagesegment": { - "source": "iana" - }, - "application/vnd.age": { - "source": "iana", - "extensions": ["age"] - }, - "application/vnd.ah-barcode": { - "source": "apache" - }, - "application/vnd.ahead.space": { - "source": "iana", - "extensions": ["ahead"] - }, - "application/vnd.airzip.filesecure.azf": { - "source": "iana", - "extensions": ["azf"] - }, - "application/vnd.airzip.filesecure.azs": { - "source": "iana", - "extensions": ["azs"] - }, - "application/vnd.amadeus+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.amazon.ebook": { - "source": "apache", - "extensions": ["azw"] - }, - "application/vnd.amazon.mobi8-ebook": { - "source": "iana" - }, - "application/vnd.americandynamics.acc": { - "source": "iana", - "extensions": ["acc"] - }, - "application/vnd.amiga.ami": { - "source": "iana", - "extensions": ["ami"] - }, - "application/vnd.amundsen.maze+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.android.ota": { - "source": "iana" - }, - "application/vnd.android.package-archive": { - "source": "apache", - "compressible": false, - "extensions": ["apk"] - }, - "application/vnd.anki": { - "source": "iana" - }, - "application/vnd.anser-web-certificate-issue-initiation": { - "source": "iana", - "extensions": ["cii"] - }, - "application/vnd.anser-web-funds-transfer-initiation": { - "source": "apache", - "extensions": ["fti"] - }, - "application/vnd.antix.game-component": { - "source": "iana", - "extensions": ["atx"] - }, - "application/vnd.apache.arrow.file": { - "source": "iana" - }, - "application/vnd.apache.arrow.stream": { - "source": "iana" - }, - "application/vnd.apache.parquet": { - "source": "iana" - }, - "application/vnd.apache.thrift.binary": { - "source": "iana" - }, - "application/vnd.apache.thrift.compact": { - "source": "iana" - }, - "application/vnd.apache.thrift.json": { - "source": "iana" - }, - "application/vnd.apexlang": { - "source": "iana" - }, - "application/vnd.api+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.aplextor.warrp+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.apothekende.reservation+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.apple.installer+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mpkg"] - }, - "application/vnd.apple.keynote": { - "source": "iana", - "extensions": ["key"] - }, - "application/vnd.apple.mpegurl": { - "source": "iana", - "extensions": ["m3u8"] - }, - "application/vnd.apple.numbers": { - "source": "iana", - "extensions": ["numbers"] - }, - "application/vnd.apple.pages": { - "source": "iana", - "extensions": ["pages"] - }, - "application/vnd.apple.pkpass": { - "compressible": false, - "extensions": ["pkpass"] - }, - "application/vnd.arastra.swi": { - "source": "apache" - }, - "application/vnd.aristanetworks.swi": { - "source": "iana", - "extensions": ["swi"] - }, - "application/vnd.artisan+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.artsquare": { - "source": "iana" - }, - "application/vnd.astraea-software.iota": { - "source": "iana", - "extensions": ["iota"] - }, - "application/vnd.audiograph": { - "source": "iana", - "extensions": ["aep"] - }, - "application/vnd.autodesk.fbx": { - "extensions": ["fbx"] - }, - "application/vnd.autopackage": { - "source": "iana" - }, - "application/vnd.avalon+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.avistar+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.balsamiq.bmml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["bmml"] - }, - "application/vnd.balsamiq.bmpr": { - "source": "iana" - }, - "application/vnd.banana-accounting": { - "source": "iana" - }, - "application/vnd.bbf.usp.error": { - "source": "iana" - }, - "application/vnd.bbf.usp.msg": { - "source": "iana" - }, - "application/vnd.bbf.usp.msg+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.bekitzur-stech+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.belightsoft.lhzd+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.belightsoft.lhzl+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.bint.med-content": { - "source": "iana" - }, - "application/vnd.biopax.rdf+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.blink-idb-value-wrapper": { - "source": "iana" - }, - "application/vnd.blueice.multipass": { - "source": "iana", - "extensions": ["mpm"] - }, - "application/vnd.bluetooth.ep.oob": { - "source": "iana" - }, - "application/vnd.bluetooth.le.oob": { - "source": "iana" - }, - "application/vnd.bmi": { - "source": "iana", - "extensions": ["bmi"] - }, - "application/vnd.bpf": { - "source": "iana" - }, - "application/vnd.bpf3": { - "source": "iana" - }, - "application/vnd.businessobjects": { - "source": "iana", - "extensions": ["rep"] - }, - "application/vnd.byu.uapi+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.bzip3": { - "source": "iana" - }, - "application/vnd.c3voc.schedule+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.cab-jscript": { - "source": "iana" - }, - "application/vnd.canon-cpdl": { - "source": "iana" - }, - "application/vnd.canon-lips": { - "source": "iana" - }, - "application/vnd.capasystems-pg+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.cendio.thinlinc.clientconf": { - "source": "iana" - }, - "application/vnd.century-systems.tcp_stream": { - "source": "iana" - }, - "application/vnd.chemdraw+xml": { - "source": "iana", - "compressible": true, - "extensions": ["cdxml"] - }, - "application/vnd.chess-pgn": { - "source": "iana" - }, - "application/vnd.chipnuts.karaoke-mmd": { - "source": "iana", - "extensions": ["mmd"] - }, - "application/vnd.ciedi": { - "source": "iana" - }, - "application/vnd.cinderella": { - "source": "iana", - "extensions": ["cdy"] - }, - "application/vnd.cirpack.isdn-ext": { - "source": "iana" - }, - "application/vnd.citationstyles.style+xml": { - "source": "iana", - "compressible": true, - "extensions": ["csl"] - }, - "application/vnd.claymore": { - "source": "iana", - "extensions": ["cla"] - }, - "application/vnd.cloanto.rp9": { - "source": "iana", - "extensions": ["rp9"] - }, - "application/vnd.clonk.c4group": { - "source": "iana", - "extensions": ["c4g","c4d","c4f","c4p","c4u"] - }, - "application/vnd.cluetrust.cartomobile-config": { - "source": "iana", - "extensions": ["c11amc"] - }, - "application/vnd.cluetrust.cartomobile-config-pkg": { - "source": "iana", - "extensions": ["c11amz"] - }, - "application/vnd.cncf.helm.chart.content.v1.tar+gzip": { - "source": "iana" - }, - "application/vnd.cncf.helm.chart.provenance.v1.prov": { - "source": "iana" - }, - "application/vnd.cncf.helm.config.v1+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.coffeescript": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.document": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.document-template": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.presentation": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.presentation-template": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.spreadsheet": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.spreadsheet-template": { - "source": "iana" - }, - "application/vnd.collection+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.collection.doc+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.collection.next+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.comicbook+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.comicbook-rar": { - "source": "iana" - }, - "application/vnd.commerce-battelle": { - "source": "iana" - }, - "application/vnd.commonspace": { - "source": "iana", - "extensions": ["csp"] - }, - "application/vnd.contact.cmsg": { - "source": "iana", - "extensions": ["cdbcmsg"] - }, - "application/vnd.coreos.ignition+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.cosmocaller": { - "source": "iana", - "extensions": ["cmc"] - }, - "application/vnd.crick.clicker": { - "source": "iana", - "extensions": ["clkx"] - }, - "application/vnd.crick.clicker.keyboard": { - "source": "iana", - "extensions": ["clkk"] - }, - "application/vnd.crick.clicker.palette": { - "source": "iana", - "extensions": ["clkp"] - }, - "application/vnd.crick.clicker.template": { - "source": "iana", - "extensions": ["clkt"] - }, - "application/vnd.crick.clicker.wordbank": { - "source": "iana", - "extensions": ["clkw"] - }, - "application/vnd.criticaltools.wbs+xml": { - "source": "iana", - "compressible": true, - "extensions": ["wbs"] - }, - "application/vnd.cryptii.pipe+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.crypto-shade-file": { - "source": "iana" - }, - "application/vnd.cryptomator.encrypted": { - "source": "iana" - }, - "application/vnd.cryptomator.vault": { - "source": "iana" - }, - "application/vnd.ctc-posml": { - "source": "iana", - "extensions": ["pml"] - }, - "application/vnd.ctct.ws+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.cups-pdf": { - "source": "iana" - }, - "application/vnd.cups-postscript": { - "source": "iana" - }, - "application/vnd.cups-ppd": { - "source": "iana", - "extensions": ["ppd"] - }, - "application/vnd.cups-raster": { - "source": "iana" - }, - "application/vnd.cups-raw": { - "source": "iana" - }, - "application/vnd.curl": { - "source": "iana" - }, - "application/vnd.curl.car": { - "source": "apache", - "extensions": ["car"] - }, - "application/vnd.curl.pcurl": { - "source": "apache", - "extensions": ["pcurl"] - }, - "application/vnd.cyan.dean.root+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.cybank": { - "source": "iana" - }, - "application/vnd.cyclonedx+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.cyclonedx+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.d2l.coursepackage1p0+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.d3m-dataset": { - "source": "iana" - }, - "application/vnd.d3m-problem": { - "source": "iana" - }, - "application/vnd.dart": { - "source": "iana", - "compressible": true, - "extensions": ["dart"] - }, - "application/vnd.data-vision.rdz": { - "source": "iana", - "extensions": ["rdz"] - }, - "application/vnd.datalog": { - "source": "iana" - }, - "application/vnd.datapackage+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.dataresource+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.dbf": { - "source": "iana", - "extensions": ["dbf"] - }, - "application/vnd.dcmp+xml": { - "source": "iana", - "compressible": true, - "extensions": ["dcmp"] - }, - "application/vnd.debian.binary-package": { - "source": "iana" - }, - "application/vnd.dece.data": { - "source": "iana", - "extensions": ["uvf","uvvf","uvd","uvvd"] - }, - "application/vnd.dece.ttml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["uvt","uvvt"] - }, - "application/vnd.dece.unspecified": { - "source": "iana", - "extensions": ["uvx","uvvx"] - }, - "application/vnd.dece.zip": { - "source": "iana", - "extensions": ["uvz","uvvz"] - }, - "application/vnd.denovo.fcselayout-link": { - "source": "iana", - "extensions": ["fe_launch"] - }, - "application/vnd.desmume.movie": { - "source": "iana" - }, - "application/vnd.dir-bi.plate-dl-nosuffix": { - "source": "iana" - }, - "application/vnd.dm.delegation+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dna": { - "source": "iana", - "extensions": ["dna"] - }, - "application/vnd.document+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.dolby.mlp": { - "source": "apache", - "extensions": ["mlp"] - }, - "application/vnd.dolby.mobile.1": { - "source": "iana" - }, - "application/vnd.dolby.mobile.2": { - "source": "iana" - }, - "application/vnd.doremir.scorecloud-binary-document": { - "source": "iana" - }, - "application/vnd.dpgraph": { - "source": "iana", - "extensions": ["dpg"] - }, - "application/vnd.dreamfactory": { - "source": "iana", - "extensions": ["dfac"] - }, - "application/vnd.drive+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ds-keypoint": { - "source": "apache", - "extensions": ["kpxx"] - }, - "application/vnd.dtg.local": { - "source": "iana" - }, - "application/vnd.dtg.local.flash": { - "source": "iana" - }, - "application/vnd.dtg.local.html": { - "source": "iana" - }, - "application/vnd.dvb.ait": { - "source": "iana", - "extensions": ["ait"] - }, - "application/vnd.dvb.dvbisl+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.dvbj": { - "source": "iana" - }, - "application/vnd.dvb.esgcontainer": { - "source": "iana" - }, - "application/vnd.dvb.ipdcdftnotifaccess": { - "source": "iana" - }, - "application/vnd.dvb.ipdcesgaccess": { - "source": "iana" - }, - "application/vnd.dvb.ipdcesgaccess2": { - "source": "iana" - }, - "application/vnd.dvb.ipdcesgpdd": { - "source": "iana" - }, - "application/vnd.dvb.ipdcroaming": { - "source": "iana" - }, - "application/vnd.dvb.iptv.alfec-base": { - "source": "iana" - }, - "application/vnd.dvb.iptv.alfec-enhancement": { - "source": "iana" - }, - "application/vnd.dvb.notif-aggregate-root+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-container+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-generic+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-ia-msglist+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-ia-registration-request+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-ia-registration-response+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-init+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.pfr": { - "source": "iana" - }, - "application/vnd.dvb.service": { - "source": "iana", - "extensions": ["svc"] - }, - "application/vnd.dxr": { - "source": "iana" - }, - "application/vnd.dynageo": { - "source": "iana", - "extensions": ["geo"] - }, - "application/vnd.dzr": { - "source": "iana" - }, - "application/vnd.easykaraoke.cdgdownload": { - "source": "iana" - }, - "application/vnd.ecdis-update": { - "source": "iana" - }, - "application/vnd.ecip.rlp": { - "source": "iana" - }, - "application/vnd.eclipse.ditto+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ecowin.chart": { - "source": "iana", - "extensions": ["mag"] - }, - "application/vnd.ecowin.filerequest": { - "source": "iana" - }, - "application/vnd.ecowin.fileupdate": { - "source": "iana" - }, - "application/vnd.ecowin.series": { - "source": "iana" - }, - "application/vnd.ecowin.seriesrequest": { - "source": "iana" - }, - "application/vnd.ecowin.seriesupdate": { - "source": "iana" - }, - "application/vnd.efi.img": { - "source": "iana" - }, - "application/vnd.efi.iso": { - "source": "iana" - }, - "application/vnd.eln+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.emclient.accessrequest+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.enliven": { - "source": "iana", - "extensions": ["nml"] - }, - "application/vnd.enphase.envoy": { - "source": "iana" - }, - "application/vnd.eprints.data+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.epson.esf": { - "source": "iana", - "extensions": ["esf"] - }, - "application/vnd.epson.msf": { - "source": "iana", - "extensions": ["msf"] - }, - "application/vnd.epson.quickanime": { - "source": "iana", - "extensions": ["qam"] - }, - "application/vnd.epson.salt": { - "source": "iana", - "extensions": ["slt"] - }, - "application/vnd.epson.ssf": { - "source": "iana", - "extensions": ["ssf"] - }, - "application/vnd.ericsson.quickcall": { - "source": "iana" - }, - "application/vnd.erofs": { - "source": "iana" - }, - "application/vnd.espass-espass+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.eszigno3+xml": { - "source": "iana", - "compressible": true, - "extensions": ["es3","et3"] - }, - "application/vnd.etsi.aoc+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.asic-e+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.etsi.asic-s+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.etsi.cug+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvcommand+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvdiscovery+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvprofile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvsad-bc+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvsad-cod+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvsad-npvr+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvservice+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvsync+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvueprofile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.mcid+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.mheg5": { - "source": "iana" - }, - "application/vnd.etsi.overload-control-policy-dataset+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.pstn+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.sci+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.simservs+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.timestamp-token": { - "source": "iana" - }, - "application/vnd.etsi.tsl+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.tsl.der": { - "source": "iana" - }, - "application/vnd.eu.kasparian.car+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.eudora.data": { - "source": "iana" - }, - "application/vnd.evolv.ecig.profile": { - "source": "iana" - }, - "application/vnd.evolv.ecig.settings": { - "source": "iana" - }, - "application/vnd.evolv.ecig.theme": { - "source": "iana" - }, - "application/vnd.exstream-empower+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.exstream-package": { - "source": "iana" - }, - "application/vnd.ezpix-album": { - "source": "iana", - "extensions": ["ez2"] - }, - "application/vnd.ezpix-package": { - "source": "iana", - "extensions": ["ez3"] - }, - "application/vnd.f-secure.mobile": { - "source": "iana" - }, - "application/vnd.familysearch.gedcom+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.fastcopy-disk-image": { - "source": "iana" - }, - "application/vnd.fdf": { - "source": "apache", - "extensions": ["fdf"] - }, - "application/vnd.fdsn.mseed": { - "source": "iana", - "extensions": ["mseed"] - }, - "application/vnd.fdsn.seed": { - "source": "iana", - "extensions": ["seed","dataless"] - }, - "application/vnd.fdsn.stationxml+xml": { - "source": "iana", - "charset": "XML-BASED", - "compressible": true - }, - "application/vnd.ffsns": { - "source": "iana" - }, - "application/vnd.ficlab.flb+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.filmit.zfc": { - "source": "iana" - }, - "application/vnd.fints": { - "source": "iana" - }, - "application/vnd.firemonkeys.cloudcell": { - "source": "iana" - }, - "application/vnd.flographit": { - "source": "iana", - "extensions": ["gph"] - }, - "application/vnd.fluxtime.clip": { - "source": "iana", - "extensions": ["ftc"] - }, - "application/vnd.font-fontforge-sfd": { - "source": "iana" - }, - "application/vnd.framemaker": { - "source": "iana", - "extensions": ["fm","frame","maker","book"] - }, - "application/vnd.freelog.comic": { - "source": "iana" - }, - "application/vnd.frogans.fnc": { - "source": "apache", - "extensions": ["fnc"] - }, - "application/vnd.frogans.ltf": { - "source": "apache", - "extensions": ["ltf"] - }, - "application/vnd.fsc.weblaunch": { - "source": "iana", - "extensions": ["fsc"] - }, - "application/vnd.fujifilm.fb.docuworks": { - "source": "iana" - }, - "application/vnd.fujifilm.fb.docuworks.binder": { - "source": "iana" - }, - "application/vnd.fujifilm.fb.docuworks.container": { - "source": "iana" - }, - "application/vnd.fujifilm.fb.jfi+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.fujitsu.oasys": { - "source": "iana", - "extensions": ["oas"] - }, - "application/vnd.fujitsu.oasys2": { - "source": "iana", - "extensions": ["oa2"] - }, - "application/vnd.fujitsu.oasys3": { - "source": "iana", - "extensions": ["oa3"] - }, - "application/vnd.fujitsu.oasysgp": { - "source": "iana", - "extensions": ["fg5"] - }, - "application/vnd.fujitsu.oasysprs": { - "source": "iana", - "extensions": ["bh2"] - }, - "application/vnd.fujixerox.art-ex": { - "source": "iana" - }, - "application/vnd.fujixerox.art4": { - "source": "iana" - }, - "application/vnd.fujixerox.ddd": { - "source": "iana", - "extensions": ["ddd"] - }, - "application/vnd.fujixerox.docuworks": { - "source": "iana", - "extensions": ["xdw"] - }, - "application/vnd.fujixerox.docuworks.binder": { - "source": "iana", - "extensions": ["xbd"] - }, - "application/vnd.fujixerox.docuworks.container": { - "source": "iana" - }, - "application/vnd.fujixerox.hbpl": { - "source": "iana" - }, - "application/vnd.fut-misnet": { - "source": "iana" - }, - "application/vnd.futoin+cbor": { - "source": "iana" - }, - "application/vnd.futoin+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.fuzzysheet": { - "source": "iana", - "extensions": ["fzs"] - }, - "application/vnd.ga4gh.passport+jwt": { - "source": "iana" - }, - "application/vnd.genomatix.tuxedo": { - "source": "iana", - "extensions": ["txd"] - }, - "application/vnd.genozip": { - "source": "iana" - }, - "application/vnd.gentics.grd+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.gentoo.catmetadata+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.gentoo.ebuild": { - "source": "iana" - }, - "application/vnd.gentoo.eclass": { - "source": "iana" - }, - "application/vnd.gentoo.gpkg": { - "source": "iana" - }, - "application/vnd.gentoo.manifest": { - "source": "iana" - }, - "application/vnd.gentoo.pkgmetadata+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.gentoo.xpak": { - "source": "iana" - }, - "application/vnd.geo+json": { - "source": "apache", - "compressible": true - }, - "application/vnd.geocube+xml": { - "source": "apache", - "compressible": true - }, - "application/vnd.geogebra.file": { - "source": "iana", - "extensions": ["ggb"] - }, - "application/vnd.geogebra.pinboard": { - "source": "iana" - }, - "application/vnd.geogebra.slides": { - "source": "iana", - "extensions": ["ggs"] - }, - "application/vnd.geogebra.tool": { - "source": "iana", - "extensions": ["ggt"] - }, - "application/vnd.geometry-explorer": { - "source": "iana", - "extensions": ["gex","gre"] - }, - "application/vnd.geonext": { - "source": "iana", - "extensions": ["gxt"] - }, - "application/vnd.geoplan": { - "source": "iana", - "extensions": ["g2w"] - }, - "application/vnd.geospace": { - "source": "iana", - "extensions": ["g3w"] - }, - "application/vnd.gerber": { - "source": "iana" - }, - "application/vnd.globalplatform.card-content-mgt": { - "source": "iana" - }, - "application/vnd.globalplatform.card-content-mgt-response": { - "source": "iana" - }, - "application/vnd.gmx": { - "source": "iana", - "extensions": ["gmx"] - }, - "application/vnd.gnu.taler.exchange+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.gnu.taler.merchant+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.google-apps.audio": {}, - "application/vnd.google-apps.document": { - "compressible": false, - "extensions": ["gdoc"] - }, - "application/vnd.google-apps.drawing": { - "compressible": false, - "extensions": ["gdraw"] - }, - "application/vnd.google-apps.drive-sdk": { - "compressible": false - }, - "application/vnd.google-apps.file": {}, - "application/vnd.google-apps.folder": { - "compressible": false - }, - "application/vnd.google-apps.form": { - "compressible": false, - "extensions": ["gform"] - }, - "application/vnd.google-apps.fusiontable": {}, - "application/vnd.google-apps.jam": { - "compressible": false, - "extensions": ["gjam"] - }, - "application/vnd.google-apps.mail-layout": {}, - "application/vnd.google-apps.map": { - "compressible": false, - "extensions": ["gmap"] - }, - "application/vnd.google-apps.photo": {}, - "application/vnd.google-apps.presentation": { - "compressible": false, - "extensions": ["gslides"] - }, - "application/vnd.google-apps.script": { - "compressible": false, - "extensions": ["gscript"] - }, - "application/vnd.google-apps.shortcut": {}, - "application/vnd.google-apps.site": { - "compressible": false, - "extensions": ["gsite"] - }, - "application/vnd.google-apps.spreadsheet": { - "compressible": false, - "extensions": ["gsheet"] - }, - "application/vnd.google-apps.unknown": {}, - "application/vnd.google-apps.video": {}, - "application/vnd.google-earth.kml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["kml"] - }, - "application/vnd.google-earth.kmz": { - "source": "iana", - "compressible": false, - "extensions": ["kmz"] - }, - "application/vnd.gov.sk.e-form+xml": { - "source": "apache", - "compressible": true - }, - "application/vnd.gov.sk.e-form+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.gov.sk.xmldatacontainer+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xdcf"] - }, - "application/vnd.gpxsee.map+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.grafeq": { - "source": "iana", - "extensions": ["gqf","gqs"] - }, - "application/vnd.gridmp": { - "source": "iana" - }, - "application/vnd.groove-account": { - "source": "iana", - "extensions": ["gac"] - }, - "application/vnd.groove-help": { - "source": "iana", - "extensions": ["ghf"] - }, - "application/vnd.groove-identity-message": { - "source": "iana", - "extensions": ["gim"] - }, - "application/vnd.groove-injector": { - "source": "iana", - "extensions": ["grv"] - }, - "application/vnd.groove-tool-message": { - "source": "iana", - "extensions": ["gtm"] - }, - "application/vnd.groove-tool-template": { - "source": "iana", - "extensions": ["tpl"] - }, - "application/vnd.groove-vcard": { - "source": "iana", - "extensions": ["vcg"] - }, - "application/vnd.hal+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hal+xml": { - "source": "iana", - "compressible": true, - "extensions": ["hal"] - }, - "application/vnd.handheld-entertainment+xml": { - "source": "iana", - "compressible": true, - "extensions": ["zmm"] - }, - "application/vnd.hbci": { - "source": "iana", - "extensions": ["hbci"] - }, - "application/vnd.hc+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hcl-bireports": { - "source": "iana" - }, - "application/vnd.hdt": { - "source": "iana" - }, - "application/vnd.heroku+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hhe.lesson-player": { - "source": "iana", - "extensions": ["les"] - }, - "application/vnd.hp-hpgl": { - "source": "iana", - "extensions": ["hpgl"] - }, - "application/vnd.hp-hpid": { - "source": "iana", - "extensions": ["hpid"] - }, - "application/vnd.hp-hps": { - "source": "iana", - "extensions": ["hps"] - }, - "application/vnd.hp-jlyt": { - "source": "iana", - "extensions": ["jlt"] - }, - "application/vnd.hp-pcl": { - "source": "iana", - "extensions": ["pcl"] - }, - "application/vnd.hp-pclxl": { - "source": "iana", - "extensions": ["pclxl"] - }, - "application/vnd.hsl": { - "source": "iana" - }, - "application/vnd.httphone": { - "source": "iana" - }, - "application/vnd.hydrostatix.sof-data": { - "source": "iana", - "extensions": ["sfd-hdstx"] - }, - "application/vnd.hyper+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hyper-item+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hyperdrive+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hzn-3d-crossword": { - "source": "iana" - }, - "application/vnd.ibm.afplinedata": { - "source": "apache" - }, - "application/vnd.ibm.electronic-media": { - "source": "iana" - }, - "application/vnd.ibm.minipay": { - "source": "iana", - "extensions": ["mpy"] - }, - "application/vnd.ibm.modcap": { - "source": "apache", - "extensions": ["afp","listafp","list3820"] - }, - "application/vnd.ibm.rights-management": { - "source": "iana", - "extensions": ["irm"] - }, - "application/vnd.ibm.secure-container": { - "source": "iana", - "extensions": ["sc"] - }, - "application/vnd.iccprofile": { - "source": "iana", - "extensions": ["icc","icm"] - }, - "application/vnd.ieee.1905": { - "source": "iana" - }, - "application/vnd.igloader": { - "source": "iana", - "extensions": ["igl"] - }, - "application/vnd.imagemeter.folder+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.imagemeter.image+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.immervision-ivp": { - "source": "iana", - "extensions": ["ivp"] - }, - "application/vnd.immervision-ivu": { - "source": "iana", - "extensions": ["ivu"] - }, - "application/vnd.ims.imsccv1p1": { - "source": "iana" - }, - "application/vnd.ims.imsccv1p2": { - "source": "iana" - }, - "application/vnd.ims.imsccv1p3": { - "source": "iana" - }, - "application/vnd.ims.lis.v2.result+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolconsumerprofile+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolproxy+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolproxy.id+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolsettings+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolsettings.simple+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.informedcontrol.rms+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.informix-visionary": { - "source": "apache" - }, - "application/vnd.infotech.project": { - "source": "iana" - }, - "application/vnd.infotech.project+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.innopath.wamp.notification": { - "source": "iana" - }, - "application/vnd.insors.igm": { - "source": "iana", - "extensions": ["igm"] - }, - "application/vnd.intercon.formnet": { - "source": "iana", - "extensions": ["xpw","xpx"] - }, - "application/vnd.intergeo": { - "source": "iana", - "extensions": ["i2g"] - }, - "application/vnd.intertrust.digibox": { - "source": "iana" - }, - "application/vnd.intertrust.nncp": { - "source": "iana" - }, - "application/vnd.intu.qbo": { - "source": "iana", - "extensions": ["qbo"] - }, - "application/vnd.intu.qfx": { - "source": "iana", - "extensions": ["qfx"] - }, - "application/vnd.ipfs.ipns-record": { - "source": "iana" - }, - "application/vnd.ipld.car": { - "source": "iana" - }, - "application/vnd.ipld.dag-cbor": { - "source": "iana" - }, - "application/vnd.ipld.dag-json": { - "source": "iana" - }, - "application/vnd.ipld.raw": { - "source": "iana" - }, - "application/vnd.iptc.g2.catalogitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.conceptitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.knowledgeitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.newsitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.newsmessage+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.packageitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.planningitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.ipunplugged.rcprofile": { - "source": "iana", - "extensions": ["rcprofile"] - }, - "application/vnd.irepository.package+xml": { - "source": "iana", - "compressible": true, - "extensions": ["irp"] - }, - "application/vnd.is-xpr": { - "source": "iana", - "extensions": ["xpr"] - }, - "application/vnd.isac.fcs": { - "source": "iana", - "extensions": ["fcs"] - }, - "application/vnd.iso11783-10+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.jam": { - "source": "iana", - "extensions": ["jam"] - }, - "application/vnd.japannet-directory-service": { - "source": "iana" - }, - "application/vnd.japannet-jpnstore-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-payment-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-registration": { - "source": "iana" - }, - "application/vnd.japannet-registration-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-setstore-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-verification": { - "source": "iana" - }, - "application/vnd.japannet-verification-wakeup": { - "source": "iana" - }, - "application/vnd.jcp.javame.midlet-rms": { - "source": "iana", - "extensions": ["rms"] - }, - "application/vnd.jisp": { - "source": "iana", - "extensions": ["jisp"] - }, - "application/vnd.joost.joda-archive": { - "source": "iana", - "extensions": ["joda"] - }, - "application/vnd.jsk.isdn-ngn": { - "source": "iana" - }, - "application/vnd.kahootz": { - "source": "iana", - "extensions": ["ktz","ktr"] - }, - "application/vnd.kde.karbon": { - "source": "iana", - "extensions": ["karbon"] - }, - "application/vnd.kde.kchart": { - "source": "iana", - "extensions": ["chrt"] - }, - "application/vnd.kde.kformula": { - "source": "iana", - "extensions": ["kfo"] - }, - "application/vnd.kde.kivio": { - "source": "iana", - "extensions": ["flw"] - }, - "application/vnd.kde.kontour": { - "source": "iana", - "extensions": ["kon"] - }, - "application/vnd.kde.kpresenter": { - "source": "iana", - "extensions": ["kpr","kpt"] - }, - "application/vnd.kde.kspread": { - "source": "iana", - "extensions": ["ksp"] - }, - "application/vnd.kde.kword": { - "source": "iana", - "extensions": ["kwd","kwt"] - }, - "application/vnd.kdl": { - "source": "iana" - }, - "application/vnd.kenameaapp": { - "source": "iana", - "extensions": ["htke"] - }, - "application/vnd.keyman.kmp+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.keyman.kmx": { - "source": "iana" - }, - "application/vnd.kidspiration": { - "source": "iana", - "extensions": ["kia"] - }, - "application/vnd.kinar": { - "source": "iana", - "extensions": ["kne","knp"] - }, - "application/vnd.koan": { - "source": "iana", - "extensions": ["skp","skd","skt","skm"] - }, - "application/vnd.kodak-descriptor": { - "source": "iana", - "extensions": ["sse"] - }, - "application/vnd.las": { - "source": "iana" - }, - "application/vnd.las.las+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.las.las+xml": { - "source": "iana", - "compressible": true, - "extensions": ["lasxml"] - }, - "application/vnd.laszip": { - "source": "iana" - }, - "application/vnd.ldev.productlicensing": { - "source": "iana" - }, - "application/vnd.leap+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.liberty-request+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.llamagraphics.life-balance.desktop": { - "source": "iana", - "extensions": ["lbd"] - }, - "application/vnd.llamagraphics.life-balance.exchange+xml": { - "source": "iana", - "compressible": true, - "extensions": ["lbe"] - }, - "application/vnd.logipipe.circuit+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.loom": { - "source": "iana" - }, - "application/vnd.lotus-1-2-3": { - "source": "iana", - "extensions": ["123"] - }, - "application/vnd.lotus-approach": { - "source": "iana", - "extensions": ["apr"] - }, - "application/vnd.lotus-freelance": { - "source": "iana", - "extensions": ["pre"] - }, - "application/vnd.lotus-notes": { - "source": "iana", - "extensions": ["nsf"] - }, - "application/vnd.lotus-organizer": { - "source": "iana", - "extensions": ["org"] - }, - "application/vnd.lotus-screencam": { - "source": "iana", - "extensions": ["scm"] - }, - "application/vnd.lotus-wordpro": { - "source": "iana", - "extensions": ["lwp"] - }, - "application/vnd.macports.portpkg": { - "source": "iana", - "extensions": ["portpkg"] - }, - "application/vnd.mapbox-vector-tile": { - "source": "iana", - "extensions": ["mvt"] - }, - "application/vnd.marlin.drm.actiontoken+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.marlin.drm.conftoken+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.marlin.drm.license+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.marlin.drm.mdcf": { - "source": "iana" - }, - "application/vnd.mason+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.maxar.archive.3tz+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.maxmind.maxmind-db": { - "source": "iana" - }, - "application/vnd.mcd": { - "source": "iana", - "extensions": ["mcd"] - }, - "application/vnd.mdl": { - "source": "iana" - }, - "application/vnd.mdl-mbsdf": { - "source": "iana" - }, - "application/vnd.medcalcdata": { - "source": "iana", - "extensions": ["mc1"] - }, - "application/vnd.mediastation.cdkey": { - "source": "iana", - "extensions": ["cdkey"] - }, - "application/vnd.medicalholodeck.recordxr": { - "source": "iana" - }, - "application/vnd.meridian-slingshot": { - "source": "iana" - }, - "application/vnd.mermaid": { - "source": "iana" - }, - "application/vnd.mfer": { - "source": "iana", - "extensions": ["mwf"] - }, - "application/vnd.mfmp": { - "source": "iana", - "extensions": ["mfm"] - }, - "application/vnd.micro+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.micrografx.flo": { - "source": "iana", - "extensions": ["flo"] - }, - "application/vnd.micrografx.igx": { - "source": "iana", - "extensions": ["igx"] - }, - "application/vnd.microsoft.portable-executable": { - "source": "iana" - }, - "application/vnd.microsoft.windows.thumbnail-cache": { - "source": "iana" - }, - "application/vnd.miele+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.mif": { - "source": "iana", - "extensions": ["mif"] - }, - "application/vnd.minisoft-hp3000-save": { - "source": "iana" - }, - "application/vnd.mitsubishi.misty-guard.trustweb": { - "source": "iana" - }, - "application/vnd.mobius.daf": { - "source": "iana", - "extensions": ["daf"] - }, - "application/vnd.mobius.dis": { - "source": "iana", - "extensions": ["dis"] - }, - "application/vnd.mobius.mbk": { - "source": "iana", - "extensions": ["mbk"] - }, - "application/vnd.mobius.mqy": { - "source": "iana", - "extensions": ["mqy"] - }, - "application/vnd.mobius.msl": { - "source": "iana", - "extensions": ["msl"] - }, - "application/vnd.mobius.plc": { - "source": "iana", - "extensions": ["plc"] - }, - "application/vnd.mobius.txf": { - "source": "iana", - "extensions": ["txf"] - }, - "application/vnd.modl": { - "source": "iana" - }, - "application/vnd.mophun.application": { - "source": "iana", - "extensions": ["mpn"] - }, - "application/vnd.mophun.certificate": { - "source": "iana", - "extensions": ["mpc"] - }, - "application/vnd.motorola.flexsuite": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.adsi": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.fis": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.gotap": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.kmr": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.ttc": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.wem": { - "source": "iana" - }, - "application/vnd.motorola.iprm": { - "source": "iana" - }, - "application/vnd.mozilla.xul+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xul"] - }, - "application/vnd.ms-3mfdocument": { - "source": "iana" - }, - "application/vnd.ms-artgalry": { - "source": "iana", - "extensions": ["cil"] - }, - "application/vnd.ms-asf": { - "source": "iana" - }, - "application/vnd.ms-cab-compressed": { - "source": "iana", - "extensions": ["cab"] - }, - "application/vnd.ms-color.iccprofile": { - "source": "apache" - }, - "application/vnd.ms-excel": { - "source": "iana", - "compressible": false, - "extensions": ["xls","xlm","xla","xlc","xlt","xlw"] - }, - "application/vnd.ms-excel.addin.macroenabled.12": { - "source": "iana", - "extensions": ["xlam"] - }, - "application/vnd.ms-excel.sheet.binary.macroenabled.12": { - "source": "iana", - "extensions": ["xlsb"] - }, - "application/vnd.ms-excel.sheet.macroenabled.12": { - "source": "iana", - "extensions": ["xlsm"] - }, - "application/vnd.ms-excel.template.macroenabled.12": { - "source": "iana", - "extensions": ["xltm"] - }, - "application/vnd.ms-fontobject": { - "source": "iana", - "compressible": true, - "extensions": ["eot"] - }, - "application/vnd.ms-htmlhelp": { - "source": "iana", - "extensions": ["chm"] - }, - "application/vnd.ms-ims": { - "source": "iana", - "extensions": ["ims"] - }, - "application/vnd.ms-lrm": { - "source": "iana", - "extensions": ["lrm"] - }, - "application/vnd.ms-office.activex+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.ms-officetheme": { - "source": "iana", - "extensions": ["thmx"] - }, - "application/vnd.ms-opentype": { - "source": "apache", - "compressible": true - }, - "application/vnd.ms-outlook": { - "compressible": false, - "extensions": ["msg"] - }, - "application/vnd.ms-package.obfuscated-opentype": { - "source": "apache" - }, - "application/vnd.ms-pki.seccat": { - "source": "apache", - "extensions": ["cat"] - }, - "application/vnd.ms-pki.stl": { - "source": "apache", - "extensions": ["stl"] - }, - "application/vnd.ms-playready.initiator+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.ms-powerpoint": { - "source": "iana", - "compressible": false, - "extensions": ["ppt","pps","pot"] - }, - "application/vnd.ms-powerpoint.addin.macroenabled.12": { - "source": "iana", - "extensions": ["ppam"] - }, - "application/vnd.ms-powerpoint.presentation.macroenabled.12": { - "source": "iana", - "extensions": ["pptm"] - }, - "application/vnd.ms-powerpoint.slide.macroenabled.12": { - "source": "iana", - "extensions": ["sldm"] - }, - "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { - "source": "iana", - "extensions": ["ppsm"] - }, - "application/vnd.ms-powerpoint.template.macroenabled.12": { - "source": "iana", - "extensions": ["potm"] - }, - "application/vnd.ms-printdevicecapabilities+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.ms-printing.printticket+xml": { - "source": "apache", - "compressible": true - }, - "application/vnd.ms-printschematicket+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.ms-project": { - "source": "iana", - "extensions": ["mpp","mpt"] - }, - "application/vnd.ms-tnef": { - "source": "iana" - }, - "application/vnd.ms-visio.viewer": { - "extensions": ["vdx"] - }, - "application/vnd.ms-windows.devicepairing": { - "source": "iana" - }, - "application/vnd.ms-windows.nwprinting.oob": { - "source": "iana" - }, - "application/vnd.ms-windows.printerpairing": { - "source": "iana" - }, - "application/vnd.ms-windows.wsd.oob": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.lic-chlg-req": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.lic-resp": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.meter-chlg-req": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.meter-resp": { - "source": "iana" - }, - "application/vnd.ms-word.document.macroenabled.12": { - "source": "iana", - "extensions": ["docm"] - }, - "application/vnd.ms-word.template.macroenabled.12": { - "source": "iana", - "extensions": ["dotm"] - }, - "application/vnd.ms-works": { - "source": "iana", - "extensions": ["wps","wks","wcm","wdb"] - }, - "application/vnd.ms-wpl": { - "source": "iana", - "extensions": ["wpl"] - }, - "application/vnd.ms-xpsdocument": { - "source": "iana", - "compressible": false, - "extensions": ["xps"] - }, - "application/vnd.msa-disk-image": { - "source": "iana" - }, - "application/vnd.mseq": { - "source": "iana", - "extensions": ["mseq"] - }, - "application/vnd.msgpack": { - "source": "iana" - }, - "application/vnd.msign": { - "source": "iana" - }, - "application/vnd.multiad.creator": { - "source": "iana" - }, - "application/vnd.multiad.creator.cif": { - "source": "iana" - }, - "application/vnd.music-niff": { - "source": "iana" - }, - "application/vnd.musician": { - "source": "iana", - "extensions": ["mus"] - }, - "application/vnd.muvee.style": { - "source": "iana", - "extensions": ["msty"] - }, - "application/vnd.mynfc": { - "source": "iana", - "extensions": ["taglet"] - }, - "application/vnd.nacamar.ybrid+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.nato.bindingdataobject+cbor": { - "source": "iana" - }, - "application/vnd.nato.bindingdataobject+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.nato.bindingdataobject+xml": { - "source": "iana", - "compressible": true, - "extensions": ["bdo"] - }, - "application/vnd.nato.openxmlformats-package.iepd+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.ncd.control": { - "source": "iana" - }, - "application/vnd.ncd.reference": { - "source": "iana" - }, - "application/vnd.nearst.inv+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.nebumind.line": { - "source": "iana" - }, - "application/vnd.nervana": { - "source": "iana" - }, - "application/vnd.netfpx": { - "source": "iana" - }, - "application/vnd.neurolanguage.nlu": { - "source": "iana", - "extensions": ["nlu"] - }, - "application/vnd.nimn": { - "source": "iana" - }, - "application/vnd.nintendo.nitro.rom": { - "source": "iana" - }, - "application/vnd.nintendo.snes.rom": { - "source": "iana" - }, - "application/vnd.nitf": { - "source": "iana", - "extensions": ["ntf","nitf"] - }, - "application/vnd.noblenet-directory": { - "source": "iana", - "extensions": ["nnd"] - }, - "application/vnd.noblenet-sealer": { - "source": "iana", - "extensions": ["nns"] - }, - "application/vnd.noblenet-web": { - "source": "iana", - "extensions": ["nnw"] - }, - "application/vnd.nokia.catalogs": { - "source": "iana" - }, - "application/vnd.nokia.conml+wbxml": { - "source": "iana" - }, - "application/vnd.nokia.conml+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.iptv.config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.isds-radio-presets": { - "source": "iana" - }, - "application/vnd.nokia.landmark+wbxml": { - "source": "iana" - }, - "application/vnd.nokia.landmark+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.landmarkcollection+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.n-gage.ac+xml": { - "source": "iana", - "compressible": true, - "extensions": ["ac"] - }, - "application/vnd.nokia.n-gage.data": { - "source": "iana", - "extensions": ["ngdat"] - }, - "application/vnd.nokia.n-gage.symbian.install": { - "source": "apache", - "extensions": ["n-gage"] - }, - "application/vnd.nokia.ncd": { - "source": "iana" - }, - "application/vnd.nokia.pcd+wbxml": { - "source": "iana" - }, - "application/vnd.nokia.pcd+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.radio-preset": { - "source": "iana", - "extensions": ["rpst"] - }, - "application/vnd.nokia.radio-presets": { - "source": "iana", - "extensions": ["rpss"] - }, - "application/vnd.novadigm.edm": { - "source": "iana", - "extensions": ["edm"] - }, - "application/vnd.novadigm.edx": { - "source": "iana", - "extensions": ["edx"] - }, - "application/vnd.novadigm.ext": { - "source": "iana", - "extensions": ["ext"] - }, - "application/vnd.ntt-local.content-share": { - "source": "iana" - }, - "application/vnd.ntt-local.file-transfer": { - "source": "iana" - }, - "application/vnd.ntt-local.ogw_remote-access": { - "source": "iana" - }, - "application/vnd.ntt-local.sip-ta_remote": { - "source": "iana" - }, - "application/vnd.ntt-local.sip-ta_tcp_stream": { - "source": "iana" - }, - "application/vnd.oai.workflows": { - "source": "iana" - }, - "application/vnd.oai.workflows+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.oai.workflows+yaml": { - "source": "iana" - }, - "application/vnd.oasis.opendocument.base": { - "source": "iana" - }, - "application/vnd.oasis.opendocument.chart": { - "source": "iana", - "extensions": ["odc"] - }, - "application/vnd.oasis.opendocument.chart-template": { - "source": "iana", - "extensions": ["otc"] - }, - "application/vnd.oasis.opendocument.database": { - "source": "apache", - "extensions": ["odb"] - }, - "application/vnd.oasis.opendocument.formula": { - "source": "iana", - "extensions": ["odf"] - }, - "application/vnd.oasis.opendocument.formula-template": { - "source": "iana", - "extensions": ["odft"] - }, - "application/vnd.oasis.opendocument.graphics": { - "source": "iana", - "compressible": false, - "extensions": ["odg"] - }, - "application/vnd.oasis.opendocument.graphics-template": { - "source": "iana", - "extensions": ["otg"] - }, - "application/vnd.oasis.opendocument.image": { - "source": "iana", - "extensions": ["odi"] - }, - "application/vnd.oasis.opendocument.image-template": { - "source": "iana", - "extensions": ["oti"] - }, - "application/vnd.oasis.opendocument.presentation": { - "source": "iana", - "compressible": false, - "extensions": ["odp"] - }, - "application/vnd.oasis.opendocument.presentation-template": { - "source": "iana", - "extensions": ["otp"] - }, - "application/vnd.oasis.opendocument.spreadsheet": { - "source": "iana", - "compressible": false, - "extensions": ["ods"] - }, - "application/vnd.oasis.opendocument.spreadsheet-template": { - "source": "iana", - "extensions": ["ots"] - }, - "application/vnd.oasis.opendocument.text": { - "source": "iana", - "compressible": false, - "extensions": ["odt"] - }, - "application/vnd.oasis.opendocument.text-master": { - "source": "iana", - "extensions": ["odm"] - }, - "application/vnd.oasis.opendocument.text-master-template": { - "source": "iana" - }, - "application/vnd.oasis.opendocument.text-template": { - "source": "iana", - "extensions": ["ott"] - }, - "application/vnd.oasis.opendocument.text-web": { - "source": "iana", - "extensions": ["oth"] - }, - "application/vnd.obn": { - "source": "iana" - }, - "application/vnd.ocf+cbor": { - "source": "iana" - }, - "application/vnd.oci.image.manifest.v1+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.oftn.l10n+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.contentaccessdownload+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.contentaccessstreaming+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.cspg-hexbinary": { - "source": "iana" - }, - "application/vnd.oipf.dae.svg+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.dae.xhtml+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.mippvcontrolmessage+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.pae.gem": { - "source": "iana" - }, - "application/vnd.oipf.spdiscovery+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.spdlist+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.ueprofile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.userprofile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.olpc-sugar": { - "source": "iana", - "extensions": ["xo"] - }, - "application/vnd.oma-scws-config": { - "source": "iana" - }, - "application/vnd.oma-scws-http-request": { - "source": "iana" - }, - "application/vnd.oma-scws-http-response": { - "source": "iana" - }, - "application/vnd.oma.bcast.associated-procedure-parameter+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.drm-trigger+xml": { - "source": "apache", - "compressible": true - }, - "application/vnd.oma.bcast.imd+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.ltkm": { - "source": "iana" - }, - "application/vnd.oma.bcast.notification+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.provisioningtrigger": { - "source": "iana" - }, - "application/vnd.oma.bcast.sgboot": { - "source": "iana" - }, - "application/vnd.oma.bcast.sgdd+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.sgdu": { - "source": "iana" - }, - "application/vnd.oma.bcast.simple-symbol-container": { - "source": "iana" - }, - "application/vnd.oma.bcast.smartcard-trigger+xml": { - "source": "apache", - "compressible": true - }, - "application/vnd.oma.bcast.sprov+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.stkm": { - "source": "iana" - }, - "application/vnd.oma.cab-address-book+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.cab-feature-handler+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.cab-pcc+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.cab-subs-invite+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.cab-user-prefs+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.dcd": { - "source": "iana" - }, - "application/vnd.oma.dcdc": { - "source": "iana" - }, - "application/vnd.oma.dd2+xml": { - "source": "iana", - "compressible": true, - "extensions": ["dd2"] - }, - "application/vnd.oma.drm.risd+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.group-usage-list+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.lwm2m+cbor": { - "source": "iana" - }, - "application/vnd.oma.lwm2m+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.lwm2m+tlv": { - "source": "iana" - }, - "application/vnd.oma.pal+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.poc.detailed-progress-report+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.poc.final-report+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.poc.groups+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.poc.invocation-descriptor+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.poc.optimized-progress-report+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.push": { - "source": "iana" - }, - "application/vnd.oma.scidm.messages+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.xcap-directory+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.omads-email+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/vnd.omads-file+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/vnd.omads-folder+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/vnd.omaloc-supl-init": { - "source": "iana" - }, - "application/vnd.onepager": { - "source": "iana" - }, - "application/vnd.onepagertamp": { - "source": "iana" - }, - "application/vnd.onepagertamx": { - "source": "iana" - }, - "application/vnd.onepagertat": { - "source": "iana" - }, - "application/vnd.onepagertatp": { - "source": "iana" - }, - "application/vnd.onepagertatx": { - "source": "iana" - }, - "application/vnd.onvif.metadata": { - "source": "iana" - }, - "application/vnd.openblox.game+xml": { - "source": "iana", - "compressible": true, - "extensions": ["obgx"] - }, - "application/vnd.openblox.game-binary": { - "source": "iana" - }, - "application/vnd.openeye.oeb": { - "source": "iana" - }, - "application/vnd.openofficeorg.extension": { - "source": "apache", - "extensions": ["oxt"] - }, - "application/vnd.openstreetmap.data+xml": { - "source": "iana", - "compressible": true, - "extensions": ["osm"] - }, - "application/vnd.opentimestamps.ots": { - "source": "iana" - }, - "application/vnd.openvpi.dspx+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.custom-properties+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawing+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.extended-properties+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.presentation": { - "source": "iana", - "compressible": false, - "extensions": ["pptx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.slide": { - "source": "iana", - "extensions": ["sldx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { - "source": "iana", - "extensions": ["ppsx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.template": { - "source": "iana", - "extensions": ["potx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { - "source": "iana", - "compressible": false, - "extensions": ["xlsx"] - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { - "source": "iana", - "extensions": ["xltx"] - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.theme+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.themeoverride+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.vmldrawing": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { - "source": "iana", - "compressible": false, - "extensions": ["docx"] - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { - "source": "iana", - "extensions": ["dotx"] - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-package.core-properties+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-package.relationships+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oracle.resource+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.orange.indata": { - "source": "iana" - }, - "application/vnd.osa.netdeploy": { - "source": "iana" - }, - "application/vnd.osgeo.mapguide.package": { - "source": "iana", - "extensions": ["mgp"] - }, - "application/vnd.osgi.bundle": { - "source": "iana" - }, - "application/vnd.osgi.dp": { - "source": "iana", - "extensions": ["dp"] - }, - "application/vnd.osgi.subsystem": { - "source": "iana", - "extensions": ["esa"] - }, - "application/vnd.otps.ct-kip+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oxli.countgraph": { - "source": "iana" - }, - "application/vnd.pagerduty+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.palm": { - "source": "iana", - "extensions": ["pdb","pqa","oprc"] - }, - "application/vnd.panoply": { - "source": "iana" - }, - "application/vnd.paos.xml": { - "source": "iana" - }, - "application/vnd.patentdive": { - "source": "iana" - }, - "application/vnd.patientecommsdoc": { - "source": "iana" - }, - "application/vnd.pawaafile": { - "source": "iana", - "extensions": ["paw"] - }, - "application/vnd.pcos": { - "source": "iana" - }, - "application/vnd.pg.format": { - "source": "iana", - "extensions": ["str"] - }, - "application/vnd.pg.osasli": { - "source": "iana", - "extensions": ["ei6"] - }, - "application/vnd.piaccess.application-licence": { - "source": "iana" - }, - "application/vnd.picsel": { - "source": "iana", - "extensions": ["efif"] - }, - "application/vnd.pmi.widget": { - "source": "iana", - "extensions": ["wg"] - }, - "application/vnd.poc.group-advertisement+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.pocketlearn": { - "source": "iana", - "extensions": ["plf"] - }, - "application/vnd.powerbuilder6": { - "source": "iana", - "extensions": ["pbd"] - }, - "application/vnd.powerbuilder6-s": { - "source": "iana" - }, - "application/vnd.powerbuilder7": { - "source": "iana" - }, - "application/vnd.powerbuilder7-s": { - "source": "iana" - }, - "application/vnd.powerbuilder75": { - "source": "iana" - }, - "application/vnd.powerbuilder75-s": { - "source": "iana" - }, - "application/vnd.preminet": { - "source": "iana" - }, - "application/vnd.previewsystems.box": { - "source": "iana", - "extensions": ["box"] - }, - "application/vnd.procrate.brushset": { - "extensions": ["brushset"] - }, - "application/vnd.procreate.brush": { - "extensions": ["brush"] - }, - "application/vnd.procreate.dream": { - "extensions": ["drm"] - }, - "application/vnd.proteus.magazine": { - "source": "iana", - "extensions": ["mgz"] - }, - "application/vnd.psfs": { - "source": "iana" - }, - "application/vnd.pt.mundusmundi": { - "source": "iana" - }, - "application/vnd.publishare-delta-tree": { - "source": "iana", - "extensions": ["qps"] - }, - "application/vnd.pvi.ptid1": { - "source": "iana", - "extensions": ["ptid"] - }, - "application/vnd.pwg-multiplexed": { - "source": "iana" - }, - "application/vnd.pwg-xhtml-print+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xhtm"] - }, - "application/vnd.qualcomm.brew-app-res": { - "source": "iana" - }, - "application/vnd.quarantainenet": { - "source": "iana" - }, - "application/vnd.quark.quarkxpress": { - "source": "iana", - "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"] - }, - "application/vnd.quobject-quoxdocument": { - "source": "iana" - }, - "application/vnd.radisys.moml+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-audit+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-audit-conf+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-audit-conn+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-audit-dialog+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-audit-stream+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-conf+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-base+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-fax-detect+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-group+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-speech+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-transform+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.rainstor.data": { - "source": "iana" - }, - "application/vnd.rapid": { - "source": "iana" - }, - "application/vnd.rar": { - "source": "iana", - "extensions": ["rar"] - }, - "application/vnd.realvnc.bed": { - "source": "iana", - "extensions": ["bed"] - }, - "application/vnd.recordare.musicxml": { - "source": "iana", - "extensions": ["mxl"] - }, - "application/vnd.recordare.musicxml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["musicxml"] - }, - "application/vnd.relpipe": { - "source": "iana" - }, - "application/vnd.renlearn.rlprint": { - "source": "iana" - }, - "application/vnd.resilient.logic": { - "source": "iana" - }, - "application/vnd.restful+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.rig.cryptonote": { - "source": "iana", - "extensions": ["cryptonote"] - }, - "application/vnd.rim.cod": { - "source": "apache", - "extensions": ["cod"] - }, - "application/vnd.rn-realmedia": { - "source": "apache", - "extensions": ["rm"] - }, - "application/vnd.rn-realmedia-vbr": { - "source": "apache", - "extensions": ["rmvb"] - }, - "application/vnd.route66.link66+xml": { - "source": "iana", - "compressible": true, - "extensions": ["link66"] - }, - "application/vnd.rs-274x": { - "source": "iana" - }, - "application/vnd.ruckus.download": { - "source": "iana" - }, - "application/vnd.s3sms": { - "source": "iana" - }, - "application/vnd.sailingtracker.track": { - "source": "iana", - "extensions": ["st"] - }, - "application/vnd.sar": { - "source": "iana" - }, - "application/vnd.sbm.cid": { - "source": "iana" - }, - "application/vnd.sbm.mid2": { - "source": "iana" - }, - "application/vnd.scribus": { - "source": "iana" - }, - "application/vnd.sealed.3df": { - "source": "iana" - }, - "application/vnd.sealed.csf": { - "source": "iana" - }, - "application/vnd.sealed.doc": { - "source": "iana" - }, - "application/vnd.sealed.eml": { - "source": "iana" - }, - "application/vnd.sealed.mht": { - "source": "iana" - }, - "application/vnd.sealed.net": { - "source": "iana" - }, - "application/vnd.sealed.ppt": { - "source": "iana" - }, - "application/vnd.sealed.tiff": { - "source": "iana" - }, - "application/vnd.sealed.xls": { - "source": "iana" - }, - "application/vnd.sealedmedia.softseal.html": { - "source": "iana" - }, - "application/vnd.sealedmedia.softseal.pdf": { - "source": "iana" - }, - "application/vnd.seemail": { - "source": "iana", - "extensions": ["see"] - }, - "application/vnd.seis+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.sema": { - "source": "iana", - "extensions": ["sema"] - }, - "application/vnd.semd": { - "source": "iana", - "extensions": ["semd"] - }, - "application/vnd.semf": { - "source": "iana", - "extensions": ["semf"] - }, - "application/vnd.shade-save-file": { - "source": "iana" - }, - "application/vnd.shana.informed.formdata": { - "source": "iana", - "extensions": ["ifm"] - }, - "application/vnd.shana.informed.formtemplate": { - "source": "iana", - "extensions": ["itp"] - }, - "application/vnd.shana.informed.interchange": { - "source": "iana", - "extensions": ["iif"] - }, - "application/vnd.shana.informed.package": { - "source": "iana", - "extensions": ["ipk"] - }, - "application/vnd.shootproof+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.shopkick+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.shp": { - "source": "iana" - }, - "application/vnd.shx": { - "source": "iana" - }, - "application/vnd.sigrok.session": { - "source": "iana" - }, - "application/vnd.simtech-mindmapper": { - "source": "iana", - "extensions": ["twd","twds"] - }, - "application/vnd.siren+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.sketchometry": { - "source": "iana" - }, - "application/vnd.smaf": { - "source": "iana", - "extensions": ["mmf"] - }, - "application/vnd.smart.notebook": { - "source": "iana" - }, - "application/vnd.smart.teacher": { - "source": "iana", - "extensions": ["teacher"] - }, - "application/vnd.smintio.portals.archive": { - "source": "iana" - }, - "application/vnd.snesdev-page-table": { - "source": "iana" - }, - "application/vnd.software602.filler.form+xml": { - "source": "iana", - "compressible": true, - "extensions": ["fo"] - }, - "application/vnd.software602.filler.form-xml-zip": { - "source": "iana" - }, - "application/vnd.solent.sdkm+xml": { - "source": "iana", - "compressible": true, - "extensions": ["sdkm","sdkd"] - }, - "application/vnd.spotfire.dxp": { - "source": "iana", - "extensions": ["dxp"] - }, - "application/vnd.spotfire.sfs": { - "source": "iana", - "extensions": ["sfs"] - }, - "application/vnd.sqlite3": { - "source": "iana" - }, - "application/vnd.sss-cod": { - "source": "iana" - }, - "application/vnd.sss-dtf": { - "source": "iana" - }, - "application/vnd.sss-ntf": { - "source": "iana" - }, - "application/vnd.stardivision.calc": { - "source": "apache", - "extensions": ["sdc"] - }, - "application/vnd.stardivision.draw": { - "source": "apache", - "extensions": ["sda"] - }, - "application/vnd.stardivision.impress": { - "source": "apache", - "extensions": ["sdd"] - }, - "application/vnd.stardivision.math": { - "source": "apache", - "extensions": ["smf"] - }, - "application/vnd.stardivision.writer": { - "source": "apache", - "extensions": ["sdw","vor"] - }, - "application/vnd.stardivision.writer-global": { - "source": "apache", - "extensions": ["sgl"] - }, - "application/vnd.stepmania.package": { - "source": "iana", - "extensions": ["smzip"] - }, - "application/vnd.stepmania.stepchart": { - "source": "iana", - "extensions": ["sm"] - }, - "application/vnd.street-stream": { - "source": "iana" - }, - "application/vnd.sun.wadl+xml": { - "source": "iana", - "compressible": true, - "extensions": ["wadl"] - }, - "application/vnd.sun.xml.calc": { - "source": "apache", - "extensions": ["sxc"] - }, - "application/vnd.sun.xml.calc.template": { - "source": "apache", - "extensions": ["stc"] - }, - "application/vnd.sun.xml.draw": { - "source": "apache", - "extensions": ["sxd"] - }, - "application/vnd.sun.xml.draw.template": { - "source": "apache", - "extensions": ["std"] - }, - "application/vnd.sun.xml.impress": { - "source": "apache", - "extensions": ["sxi"] - }, - "application/vnd.sun.xml.impress.template": { - "source": "apache", - "extensions": ["sti"] - }, - "application/vnd.sun.xml.math": { - "source": "apache", - "extensions": ["sxm"] - }, - "application/vnd.sun.xml.writer": { - "source": "apache", - "extensions": ["sxw"] - }, - "application/vnd.sun.xml.writer.global": { - "source": "apache", - "extensions": ["sxg"] - }, - "application/vnd.sun.xml.writer.template": { - "source": "apache", - "extensions": ["stw"] - }, - "application/vnd.sus-calendar": { - "source": "iana", - "extensions": ["sus","susp"] - }, - "application/vnd.svd": { - "source": "iana", - "extensions": ["svd"] - }, - "application/vnd.swiftview-ics": { - "source": "iana" - }, - "application/vnd.sybyl.mol2": { - "source": "iana" - }, - "application/vnd.sycle+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.syft+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.symbian.install": { - "source": "apache", - "extensions": ["sis","sisx"] - }, - "application/vnd.syncml+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["xsm"] - }, - "application/vnd.syncml.dm+wbxml": { - "source": "iana", - "charset": "UTF-8", - "extensions": ["bdm"] - }, - "application/vnd.syncml.dm+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["xdm"] - }, - "application/vnd.syncml.dm.notification": { - "source": "iana" - }, - "application/vnd.syncml.dmddf+wbxml": { - "source": "iana" - }, - "application/vnd.syncml.dmddf+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["ddf"] - }, - "application/vnd.syncml.dmtnds+wbxml": { - "source": "iana" - }, - "application/vnd.syncml.dmtnds+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/vnd.syncml.ds.notification": { - "source": "iana" - }, - "application/vnd.tableschema+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.tao.intent-module-archive": { - "source": "iana", - "extensions": ["tao"] - }, - "application/vnd.tcpdump.pcap": { - "source": "iana", - "extensions": ["pcap","cap","dmp"] - }, - "application/vnd.think-cell.ppttc+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.tmd.mediaflex.api+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.tml": { - "source": "iana" - }, - "application/vnd.tmobile-livetv": { - "source": "iana", - "extensions": ["tmo"] - }, - "application/vnd.tri.onesource": { - "source": "iana" - }, - "application/vnd.trid.tpt": { - "source": "iana", - "extensions": ["tpt"] - }, - "application/vnd.triscape.mxs": { - "source": "iana", - "extensions": ["mxs"] - }, - "application/vnd.trueapp": { - "source": "iana", - "extensions": ["tra"] - }, - "application/vnd.truedoc": { - "source": "iana" - }, - "application/vnd.ubisoft.webplayer": { - "source": "iana" - }, - "application/vnd.ufdl": { - "source": "iana", - "extensions": ["ufd","ufdl"] - }, - "application/vnd.uic.osdm+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.uiq.theme": { - "source": "iana", - "extensions": ["utz"] - }, - "application/vnd.umajin": { - "source": "iana", - "extensions": ["umj"] - }, - "application/vnd.unity": { - "source": "iana", - "extensions": ["unityweb"] - }, - "application/vnd.uoml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["uoml","uo"] - }, - "application/vnd.uplanet.alert": { - "source": "iana" - }, - "application/vnd.uplanet.alert-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.bearer-choice": { - "source": "iana" - }, - "application/vnd.uplanet.bearer-choice-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.cacheop": { - "source": "iana" - }, - "application/vnd.uplanet.cacheop-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.channel": { - "source": "iana" - }, - "application/vnd.uplanet.channel-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.list": { - "source": "iana" - }, - "application/vnd.uplanet.list-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.listcmd": { - "source": "iana" - }, - "application/vnd.uplanet.listcmd-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.signal": { - "source": "iana" - }, - "application/vnd.uri-map": { - "source": "iana" - }, - "application/vnd.valve.source.material": { - "source": "iana" - }, - "application/vnd.vcx": { - "source": "iana", - "extensions": ["vcx"] - }, - "application/vnd.vd-study": { - "source": "iana" - }, - "application/vnd.vectorworks": { - "source": "iana" - }, - "application/vnd.vel+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.veraison.tsm-report+cbor": { - "source": "iana" - }, - "application/vnd.veraison.tsm-report+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.verimatrix.vcas": { - "source": "iana" - }, - "application/vnd.veritone.aion+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.veryant.thin": { - "source": "iana" - }, - "application/vnd.ves.encrypted": { - "source": "iana" - }, - "application/vnd.vidsoft.vidconference": { - "source": "iana" - }, - "application/vnd.visio": { - "source": "iana", - "extensions": ["vsd","vst","vss","vsw","vsdx","vtx"] - }, - "application/vnd.visionary": { - "source": "iana", - "extensions": ["vis"] - }, - "application/vnd.vividence.scriptfile": { - "source": "iana" - }, - "application/vnd.vocalshaper.vsp4": { - "source": "iana" - }, - "application/vnd.vsf": { - "source": "iana", - "extensions": ["vsf"] - }, - "application/vnd.wap.sic": { - "source": "iana" - }, - "application/vnd.wap.slc": { - "source": "iana" - }, - "application/vnd.wap.wbxml": { - "source": "iana", - "charset": "UTF-8", - "extensions": ["wbxml"] - }, - "application/vnd.wap.wmlc": { - "source": "iana", - "extensions": ["wmlc"] - }, - "application/vnd.wap.wmlscriptc": { - "source": "iana", - "extensions": ["wmlsc"] - }, - "application/vnd.wasmflow.wafl": { - "source": "iana" - }, - "application/vnd.webturbo": { - "source": "iana", - "extensions": ["wtb"] - }, - "application/vnd.wfa.dpp": { - "source": "iana" - }, - "application/vnd.wfa.p2p": { - "source": "iana" - }, - "application/vnd.wfa.wsc": { - "source": "iana" - }, - "application/vnd.windows.devicepairing": { - "source": "iana" - }, - "application/vnd.wmc": { - "source": "iana" - }, - "application/vnd.wmf.bootstrap": { - "source": "iana" - }, - "application/vnd.wolfram.mathematica": { - "source": "iana" - }, - "application/vnd.wolfram.mathematica.package": { - "source": "iana" - }, - "application/vnd.wolfram.player": { - "source": "iana", - "extensions": ["nbp"] - }, - "application/vnd.wordlift": { - "source": "iana" - }, - "application/vnd.wordperfect": { - "source": "iana", - "extensions": ["wpd"] - }, - "application/vnd.wqd": { - "source": "iana", - "extensions": ["wqd"] - }, - "application/vnd.wrq-hp3000-labelled": { - "source": "iana" - }, - "application/vnd.wt.stf": { - "source": "iana", - "extensions": ["stf"] - }, - "application/vnd.wv.csp+wbxml": { - "source": "iana" - }, - "application/vnd.wv.csp+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.wv.ssp+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.xacml+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.xara": { - "source": "iana", - "extensions": ["xar"] - }, - "application/vnd.xarin.cpj": { - "source": "iana" - }, - "application/vnd.xecrets-encrypted": { - "source": "iana" - }, - "application/vnd.xfdl": { - "source": "iana", - "extensions": ["xfdl"] - }, - "application/vnd.xfdl.webform": { - "source": "iana" - }, - "application/vnd.xmi+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.xmpie.cpkg": { - "source": "iana" - }, - "application/vnd.xmpie.dpkg": { - "source": "iana" - }, - "application/vnd.xmpie.plan": { - "source": "iana" - }, - "application/vnd.xmpie.ppkg": { - "source": "iana" - }, - "application/vnd.xmpie.xlim": { - "source": "iana" - }, - "application/vnd.yamaha.hv-dic": { - "source": "iana", - "extensions": ["hvd"] - }, - "application/vnd.yamaha.hv-script": { - "source": "iana", - "extensions": ["hvs"] - }, - "application/vnd.yamaha.hv-voice": { - "source": "iana", - "extensions": ["hvp"] - }, - "application/vnd.yamaha.openscoreformat": { - "source": "iana", - "extensions": ["osf"] - }, - "application/vnd.yamaha.openscoreformat.osfpvg+xml": { - "source": "iana", - "compressible": true, - "extensions": ["osfpvg"] - }, - "application/vnd.yamaha.remote-setup": { - "source": "iana" - }, - "application/vnd.yamaha.smaf-audio": { - "source": "iana", - "extensions": ["saf"] - }, - "application/vnd.yamaha.smaf-phrase": { - "source": "iana", - "extensions": ["spf"] - }, - "application/vnd.yamaha.through-ngn": { - "source": "iana" - }, - "application/vnd.yamaha.tunnel-udpencap": { - "source": "iana" - }, - "application/vnd.yaoweme": { - "source": "iana" - }, - "application/vnd.yellowriver-custom-menu": { - "source": "iana", - "extensions": ["cmp"] - }, - "application/vnd.zul": { - "source": "iana", - "extensions": ["zir","zirz"] - }, - "application/vnd.zzazz.deck+xml": { - "source": "iana", - "compressible": true, - "extensions": ["zaz"] - }, - "application/voicexml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["vxml"] - }, - "application/voucher-cms+json": { - "source": "iana", - "compressible": true - }, - "application/voucher-jws+json": { - "source": "iana", - "compressible": true - }, - "application/vp": { - "source": "iana" - }, - "application/vp+cose": { - "source": "iana" - }, - "application/vp+jwt": { - "source": "iana" - }, - "application/vq-rtcpxr": { - "source": "iana" - }, - "application/wasm": { - "source": "iana", - "compressible": true, - "extensions": ["wasm"] - }, - "application/watcherinfo+xml": { - "source": "iana", - "compressible": true, - "extensions": ["wif"] - }, - "application/webpush-options+json": { - "source": "iana", - "compressible": true - }, - "application/whoispp-query": { - "source": "iana" - }, - "application/whoispp-response": { - "source": "iana" - }, - "application/widget": { - "source": "iana", - "extensions": ["wgt"] - }, - "application/winhlp": { - "source": "apache", - "extensions": ["hlp"] - }, - "application/wita": { - "source": "iana" - }, - "application/wordperfect5.1": { - "source": "iana" - }, - "application/wsdl+xml": { - "source": "iana", - "compressible": true, - "extensions": ["wsdl"] - }, - "application/wspolicy+xml": { - "source": "iana", - "compressible": true, - "extensions": ["wspolicy"] - }, - "application/x-7z-compressed": { - "source": "apache", - "compressible": false, - "extensions": ["7z"] - }, - "application/x-abiword": { - "source": "apache", - "extensions": ["abw"] - }, - "application/x-ace-compressed": { - "source": "apache", - "extensions": ["ace"] - }, - "application/x-amf": { - "source": "apache" - }, - "application/x-apple-diskimage": { - "source": "apache", - "extensions": ["dmg"] - }, - "application/x-arj": { - "compressible": false, - "extensions": ["arj"] - }, - "application/x-authorware-bin": { - "source": "apache", - "extensions": ["aab","x32","u32","vox"] - }, - "application/x-authorware-map": { - "source": "apache", - "extensions": ["aam"] - }, - "application/x-authorware-seg": { - "source": "apache", - "extensions": ["aas"] - }, - "application/x-bcpio": { - "source": "apache", - "extensions": ["bcpio"] - }, - "application/x-bdoc": { - "compressible": false, - "extensions": ["bdoc"] - }, - "application/x-bittorrent": { - "source": "apache", - "extensions": ["torrent"] - }, - "application/x-blender": { - "extensions": ["blend"] - }, - "application/x-blorb": { - "source": "apache", - "extensions": ["blb","blorb"] - }, - "application/x-bzip": { - "source": "apache", - "compressible": false, - "extensions": ["bz"] - }, - "application/x-bzip2": { - "source": "apache", - "compressible": false, - "extensions": ["bz2","boz"] - }, - "application/x-cbr": { - "source": "apache", - "extensions": ["cbr","cba","cbt","cbz","cb7"] - }, - "application/x-cdlink": { - "source": "apache", - "extensions": ["vcd"] - }, - "application/x-cfs-compressed": { - "source": "apache", - "extensions": ["cfs"] - }, - "application/x-chat": { - "source": "apache", - "extensions": ["chat"] - }, - "application/x-chess-pgn": { - "source": "apache", - "extensions": ["pgn"] - }, - "application/x-chrome-extension": { - "extensions": ["crx"] - }, - "application/x-cocoa": { - "source": "nginx", - "extensions": ["cco"] - }, - "application/x-compress": { - "source": "apache" - }, - "application/x-compressed": { - "extensions": ["rar"] - }, - "application/x-conference": { - "source": "apache", - "extensions": ["nsc"] - }, - "application/x-cpio": { - "source": "apache", - "extensions": ["cpio"] - }, - "application/x-csh": { - "source": "apache", - "extensions": ["csh"] - }, - "application/x-deb": { - "compressible": false - }, - "application/x-debian-package": { - "source": "apache", - "extensions": ["deb","udeb"] - }, - "application/x-dgc-compressed": { - "source": "apache", - "extensions": ["dgc"] - }, - "application/x-director": { - "source": "apache", - "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"] - }, - "application/x-doom": { - "source": "apache", - "extensions": ["wad"] - }, - "application/x-dtbncx+xml": { - "source": "apache", - "compressible": true, - "extensions": ["ncx"] - }, - "application/x-dtbook+xml": { - "source": "apache", - "compressible": true, - "extensions": ["dtb"] - }, - "application/x-dtbresource+xml": { - "source": "apache", - "compressible": true, - "extensions": ["res"] - }, - "application/x-dvi": { - "source": "apache", - "compressible": false, - "extensions": ["dvi"] - }, - "application/x-envoy": { - "source": "apache", - "extensions": ["evy"] - }, - "application/x-eva": { - "source": "apache", - "extensions": ["eva"] - }, - "application/x-font-bdf": { - "source": "apache", - "extensions": ["bdf"] - }, - "application/x-font-dos": { - "source": "apache" - }, - "application/x-font-framemaker": { - "source": "apache" - }, - "application/x-font-ghostscript": { - "source": "apache", - "extensions": ["gsf"] - }, - "application/x-font-libgrx": { - "source": "apache" - }, - "application/x-font-linux-psf": { - "source": "apache", - "extensions": ["psf"] - }, - "application/x-font-pcf": { - "source": "apache", - "extensions": ["pcf"] - }, - "application/x-font-snf": { - "source": "apache", - "extensions": ["snf"] - }, - "application/x-font-speedo": { - "source": "apache" - }, - "application/x-font-sunos-news": { - "source": "apache" - }, - "application/x-font-type1": { - "source": "apache", - "extensions": ["pfa","pfb","pfm","afm"] - }, - "application/x-font-vfont": { - "source": "apache" - }, - "application/x-freearc": { - "source": "apache", - "extensions": ["arc"] - }, - "application/x-futuresplash": { - "source": "apache", - "extensions": ["spl"] - }, - "application/x-gca-compressed": { - "source": "apache", - "extensions": ["gca"] - }, - "application/x-glulx": { - "source": "apache", - "extensions": ["ulx"] - }, - "application/x-gnumeric": { - "source": "apache", - "extensions": ["gnumeric"] - }, - "application/x-gramps-xml": { - "source": "apache", - "extensions": ["gramps"] - }, - "application/x-gtar": { - "source": "apache", - "extensions": ["gtar"] - }, - "application/x-gzip": { - "source": "apache" - }, - "application/x-hdf": { - "source": "apache", - "extensions": ["hdf"] - }, - "application/x-httpd-php": { - "compressible": true, - "extensions": ["php"] - }, - "application/x-install-instructions": { - "source": "apache", - "extensions": ["install"] - }, - "application/x-ipynb+json": { - "compressible": true, - "extensions": ["ipynb"] - }, - "application/x-iso9660-image": { - "source": "apache", - "extensions": ["iso"] - }, - "application/x-iwork-keynote-sffkey": { - "extensions": ["key"] - }, - "application/x-iwork-numbers-sffnumbers": { - "extensions": ["numbers"] - }, - "application/x-iwork-pages-sffpages": { - "extensions": ["pages"] - }, - "application/x-java-archive-diff": { - "source": "nginx", - "extensions": ["jardiff"] - }, - "application/x-java-jnlp-file": { - "source": "apache", - "compressible": false, - "extensions": ["jnlp"] - }, - "application/x-javascript": { - "compressible": true - }, - "application/x-keepass2": { - "extensions": ["kdbx"] - }, - "application/x-latex": { - "source": "apache", - "compressible": false, - "extensions": ["latex"] - }, - "application/x-lua-bytecode": { - "extensions": ["luac"] - }, - "application/x-lzh-compressed": { - "source": "apache", - "extensions": ["lzh","lha"] - }, - "application/x-makeself": { - "source": "nginx", - "extensions": ["run"] - }, - "application/x-mie": { - "source": "apache", - "extensions": ["mie"] - }, - "application/x-mobipocket-ebook": { - "source": "apache", - "extensions": ["prc","mobi"] - }, - "application/x-mpegurl": { - "compressible": false - }, - "application/x-ms-application": { - "source": "apache", - "extensions": ["application"] - }, - "application/x-ms-shortcut": { - "source": "apache", - "extensions": ["lnk"] - }, - "application/x-ms-wmd": { - "source": "apache", - "extensions": ["wmd"] - }, - "application/x-ms-wmz": { - "source": "apache", - "extensions": ["wmz"] - }, - "application/x-ms-xbap": { - "source": "apache", - "extensions": ["xbap"] - }, - "application/x-msaccess": { - "source": "apache", - "extensions": ["mdb"] - }, - "application/x-msbinder": { - "source": "apache", - "extensions": ["obd"] - }, - "application/x-mscardfile": { - "source": "apache", - "extensions": ["crd"] - }, - "application/x-msclip": { - "source": "apache", - "extensions": ["clp"] - }, - "application/x-msdos-program": { - "extensions": ["exe"] - }, - "application/x-msdownload": { - "source": "apache", - "extensions": ["exe","dll","com","bat","msi"] - }, - "application/x-msmediaview": { - "source": "apache", - "extensions": ["mvb","m13","m14"] - }, - "application/x-msmetafile": { - "source": "apache", - "extensions": ["wmf","wmz","emf","emz"] - }, - "application/x-msmoney": { - "source": "apache", - "extensions": ["mny"] - }, - "application/x-mspublisher": { - "source": "apache", - "extensions": ["pub"] - }, - "application/x-msschedule": { - "source": "apache", - "extensions": ["scd"] - }, - "application/x-msterminal": { - "source": "apache", - "extensions": ["trm"] - }, - "application/x-mswrite": { - "source": "apache", - "extensions": ["wri"] - }, - "application/x-netcdf": { - "source": "apache", - "extensions": ["nc","cdf"] - }, - "application/x-ns-proxy-autoconfig": { - "compressible": true, - "extensions": ["pac"] - }, - "application/x-nzb": { - "source": "apache", - "extensions": ["nzb"] - }, - "application/x-perl": { - "source": "nginx", - "extensions": ["pl","pm"] - }, - "application/x-pilot": { - "source": "nginx", - "extensions": ["prc","pdb"] - }, - "application/x-pkcs12": { - "source": "apache", - "compressible": false, - "extensions": ["p12","pfx"] - }, - "application/x-pkcs7-certificates": { - "source": "apache", - "extensions": ["p7b","spc"] - }, - "application/x-pkcs7-certreqresp": { - "source": "apache", - "extensions": ["p7r"] - }, - "application/x-pki-message": { - "source": "iana" - }, - "application/x-rar-compressed": { - "source": "apache", - "compressible": false, - "extensions": ["rar"] - }, - "application/x-redhat-package-manager": { - "source": "nginx", - "extensions": ["rpm"] - }, - "application/x-research-info-systems": { - "source": "apache", - "extensions": ["ris"] - }, - "application/x-sea": { - "source": "nginx", - "extensions": ["sea"] - }, - "application/x-sh": { - "source": "apache", - "compressible": true, - "extensions": ["sh"] - }, - "application/x-shar": { - "source": "apache", - "extensions": ["shar"] - }, - "application/x-shockwave-flash": { - "source": "apache", - "compressible": false, - "extensions": ["swf"] - }, - "application/x-silverlight-app": { - "source": "apache", - "extensions": ["xap"] - }, - "application/x-sql": { - "source": "apache", - "extensions": ["sql"] - }, - "application/x-stuffit": { - "source": "apache", - "compressible": false, - "extensions": ["sit"] - }, - "application/x-stuffitx": { - "source": "apache", - "extensions": ["sitx"] - }, - "application/x-subrip": { - "source": "apache", - "extensions": ["srt"] - }, - "application/x-sv4cpio": { - "source": "apache", - "extensions": ["sv4cpio"] - }, - "application/x-sv4crc": { - "source": "apache", - "extensions": ["sv4crc"] - }, - "application/x-t3vm-image": { - "source": "apache", - "extensions": ["t3"] - }, - "application/x-tads": { - "source": "apache", - "extensions": ["gam"] - }, - "application/x-tar": { - "source": "apache", - "compressible": true, - "extensions": ["tar"] - }, - "application/x-tcl": { - "source": "apache", - "extensions": ["tcl","tk"] - }, - "application/x-tex": { - "source": "apache", - "extensions": ["tex"] - }, - "application/x-tex-tfm": { - "source": "apache", - "extensions": ["tfm"] - }, - "application/x-texinfo": { - "source": "apache", - "extensions": ["texinfo","texi"] - }, - "application/x-tgif": { - "source": "apache", - "extensions": ["obj"] - }, - "application/x-ustar": { - "source": "apache", - "extensions": ["ustar"] - }, - "application/x-virtualbox-hdd": { - "compressible": true, - "extensions": ["hdd"] - }, - "application/x-virtualbox-ova": { - "compressible": true, - "extensions": ["ova"] - }, - "application/x-virtualbox-ovf": { - "compressible": true, - "extensions": ["ovf"] - }, - "application/x-virtualbox-vbox": { - "compressible": true, - "extensions": ["vbox"] - }, - "application/x-virtualbox-vbox-extpack": { - "compressible": false, - "extensions": ["vbox-extpack"] - }, - "application/x-virtualbox-vdi": { - "compressible": true, - "extensions": ["vdi"] - }, - "application/x-virtualbox-vhd": { - "compressible": true, - "extensions": ["vhd"] - }, - "application/x-virtualbox-vmdk": { - "compressible": true, - "extensions": ["vmdk"] - }, - "application/x-wais-source": { - "source": "apache", - "extensions": ["src"] - }, - "application/x-web-app-manifest+json": { - "compressible": true, - "extensions": ["webapp"] - }, - "application/x-www-form-urlencoded": { - "source": "iana", - "compressible": true - }, - "application/x-x509-ca-cert": { - "source": "iana", - "extensions": ["der","crt","pem"] - }, - "application/x-x509-ca-ra-cert": { - "source": "iana" - }, - "application/x-x509-next-ca-cert": { - "source": "iana" - }, - "application/x-xfig": { - "source": "apache", - "extensions": ["fig"] - }, - "application/x-xliff+xml": { - "source": "apache", - "compressible": true, - "extensions": ["xlf"] - }, - "application/x-xpinstall": { - "source": "apache", - "compressible": false, - "extensions": ["xpi"] - }, - "application/x-xz": { - "source": "apache", - "extensions": ["xz"] - }, - "application/x-zip-compressed": { - "extensions": ["zip"] - }, - "application/x-zmachine": { - "source": "apache", - "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"] - }, - "application/x400-bp": { - "source": "iana" - }, - "application/xacml+xml": { - "source": "iana", - "compressible": true - }, - "application/xaml+xml": { - "source": "apache", - "compressible": true, - "extensions": ["xaml"] - }, - "application/xcap-att+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xav"] - }, - "application/xcap-caps+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xca"] - }, - "application/xcap-diff+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xdf"] - }, - "application/xcap-el+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xel"] - }, - "application/xcap-error+xml": { - "source": "iana", - "compressible": true - }, - "application/xcap-ns+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xns"] - }, - "application/xcon-conference-info+xml": { - "source": "iana", - "compressible": true - }, - "application/xcon-conference-info-diff+xml": { - "source": "iana", - "compressible": true - }, - "application/xenc+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xenc"] - }, - "application/xfdf": { - "source": "iana", - "extensions": ["xfdf"] - }, - "application/xhtml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xhtml","xht"] - }, - "application/xhtml-voice+xml": { - "source": "apache", - "compressible": true - }, - "application/xliff+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xlf"] - }, - "application/xml": { - "source": "iana", - "compressible": true, - "extensions": ["xml","xsl","xsd","rng"] - }, - "application/xml-dtd": { - "source": "iana", - "compressible": true, - "extensions": ["dtd"] - }, - "application/xml-external-parsed-entity": { - "source": "iana" - }, - "application/xml-patch+xml": { - "source": "iana", - "compressible": true - }, - "application/xmpp+xml": { - "source": "iana", - "compressible": true - }, - "application/xop+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xop"] - }, - "application/xproc+xml": { - "source": "apache", - "compressible": true, - "extensions": ["xpl"] - }, - "application/xslt+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xsl","xslt"] - }, - "application/xspf+xml": { - "source": "apache", - "compressible": true, - "extensions": ["xspf"] - }, - "application/xv+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mxml","xhvml","xvml","xvm"] - }, - "application/yaml": { - "source": "iana" - }, - "application/yang": { - "source": "iana", - "extensions": ["yang"] - }, - "application/yang-data+cbor": { - "source": "iana" - }, - "application/yang-data+json": { - "source": "iana", - "compressible": true - }, - "application/yang-data+xml": { - "source": "iana", - "compressible": true - }, - "application/yang-patch+json": { - "source": "iana", - "compressible": true - }, - "application/yang-patch+xml": { - "source": "iana", - "compressible": true - }, - "application/yang-sid+json": { - "source": "iana", - "compressible": true - }, - "application/yin+xml": { - "source": "iana", - "compressible": true, - "extensions": ["yin"] - }, - "application/zip": { - "source": "iana", - "compressible": false, - "extensions": ["zip"] - }, - "application/zip+dotlottie": { - "extensions": ["lottie"] - }, - "application/zlib": { - "source": "iana" - }, - "application/zstd": { - "source": "iana" - }, - "audio/1d-interleaved-parityfec": { - "source": "iana" - }, - "audio/32kadpcm": { - "source": "iana" - }, - "audio/3gpp": { - "source": "iana", - "compressible": false, - "extensions": ["3gpp"] - }, - "audio/3gpp2": { - "source": "iana" - }, - "audio/aac": { - "source": "iana", - "extensions": ["adts","aac"] - }, - "audio/ac3": { - "source": "iana" - }, - "audio/adpcm": { - "source": "apache", - "extensions": ["adp"] - }, - "audio/amr": { - "source": "iana", - "extensions": ["amr"] - }, - "audio/amr-wb": { - "source": "iana" - }, - "audio/amr-wb+": { - "source": "iana" - }, - "audio/aptx": { - "source": "iana" - }, - "audio/asc": { - "source": "iana" - }, - "audio/atrac-advanced-lossless": { - "source": "iana" - }, - "audio/atrac-x": { - "source": "iana" - }, - "audio/atrac3": { - "source": "iana" - }, - "audio/basic": { - "source": "iana", - "compressible": false, - "extensions": ["au","snd"] - }, - "audio/bv16": { - "source": "iana" - }, - "audio/bv32": { - "source": "iana" - }, - "audio/clearmode": { - "source": "iana" - }, - "audio/cn": { - "source": "iana" - }, - "audio/dat12": { - "source": "iana" - }, - "audio/dls": { - "source": "iana" - }, - "audio/dsr-es201108": { - "source": "iana" - }, - "audio/dsr-es202050": { - "source": "iana" - }, - "audio/dsr-es202211": { - "source": "iana" - }, - "audio/dsr-es202212": { - "source": "iana" - }, - "audio/dv": { - "source": "iana" - }, - "audio/dvi4": { - "source": "iana" - }, - "audio/eac3": { - "source": "iana" - }, - "audio/encaprtp": { - "source": "iana" - }, - "audio/evrc": { - "source": "iana" - }, - "audio/evrc-qcp": { - "source": "iana" - }, - "audio/evrc0": { - "source": "iana" - }, - "audio/evrc1": { - "source": "iana" - }, - "audio/evrcb": { - "source": "iana" - }, - "audio/evrcb0": { - "source": "iana" - }, - "audio/evrcb1": { - "source": "iana" - }, - "audio/evrcnw": { - "source": "iana" - }, - "audio/evrcnw0": { - "source": "iana" - }, - "audio/evrcnw1": { - "source": "iana" - }, - "audio/evrcwb": { - "source": "iana" - }, - "audio/evrcwb0": { - "source": "iana" - }, - "audio/evrcwb1": { - "source": "iana" - }, - "audio/evs": { - "source": "iana" - }, - "audio/flac": { - "source": "iana" - }, - "audio/flexfec": { - "source": "iana" - }, - "audio/fwdred": { - "source": "iana" - }, - "audio/g711-0": { - "source": "iana" - }, - "audio/g719": { - "source": "iana" - }, - "audio/g722": { - "source": "iana" - }, - "audio/g7221": { - "source": "iana" - }, - "audio/g723": { - "source": "iana" - }, - "audio/g726-16": { - "source": "iana" - }, - "audio/g726-24": { - "source": "iana" - }, - "audio/g726-32": { - "source": "iana" - }, - "audio/g726-40": { - "source": "iana" - }, - "audio/g728": { - "source": "iana" - }, - "audio/g729": { - "source": "iana" - }, - "audio/g7291": { - "source": "iana" - }, - "audio/g729d": { - "source": "iana" - }, - "audio/g729e": { - "source": "iana" - }, - "audio/gsm": { - "source": "iana" - }, - "audio/gsm-efr": { - "source": "iana" - }, - "audio/gsm-hr-08": { - "source": "iana" - }, - "audio/ilbc": { - "source": "iana" - }, - "audio/ip-mr_v2.5": { - "source": "iana" - }, - "audio/isac": { - "source": "apache" - }, - "audio/l16": { - "source": "iana" - }, - "audio/l20": { - "source": "iana" - }, - "audio/l24": { - "source": "iana", - "compressible": false - }, - "audio/l8": { - "source": "iana" - }, - "audio/lpc": { - "source": "iana" - }, - "audio/matroska": { - "source": "iana" - }, - "audio/melp": { - "source": "iana" - }, - "audio/melp1200": { - "source": "iana" - }, - "audio/melp2400": { - "source": "iana" - }, - "audio/melp600": { - "source": "iana" - }, - "audio/mhas": { - "source": "iana" - }, - "audio/midi": { - "source": "apache", - "extensions": ["mid","midi","kar","rmi"] - }, - "audio/midi-clip": { - "source": "iana" - }, - "audio/mobile-xmf": { - "source": "iana", - "extensions": ["mxmf"] - }, - "audio/mp3": { - "compressible": false, - "extensions": ["mp3"] - }, - "audio/mp4": { - "source": "iana", - "compressible": false, - "extensions": ["m4a","mp4a","m4b"] - }, - "audio/mp4a-latm": { - "source": "iana" - }, - "audio/mpa": { - "source": "iana" - }, - "audio/mpa-robust": { - "source": "iana" - }, - "audio/mpeg": { - "source": "iana", - "compressible": false, - "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"] - }, - "audio/mpeg4-generic": { - "source": "iana" - }, - "audio/musepack": { - "source": "apache" - }, - "audio/ogg": { - "source": "iana", - "compressible": false, - "extensions": ["oga","ogg","spx","opus"] - }, - "audio/opus": { - "source": "iana" - }, - "audio/parityfec": { - "source": "iana" - }, - "audio/pcma": { - "source": "iana" - }, - "audio/pcma-wb": { - "source": "iana" - }, - "audio/pcmu": { - "source": "iana" - }, - "audio/pcmu-wb": { - "source": "iana" - }, - "audio/prs.sid": { - "source": "iana" - }, - "audio/qcelp": { - "source": "iana" - }, - "audio/raptorfec": { - "source": "iana" - }, - "audio/red": { - "source": "iana" - }, - "audio/rtp-enc-aescm128": { - "source": "iana" - }, - "audio/rtp-midi": { - "source": "iana" - }, - "audio/rtploopback": { - "source": "iana" - }, - "audio/rtx": { - "source": "iana" - }, - "audio/s3m": { - "source": "apache", - "extensions": ["s3m"] - }, - "audio/scip": { - "source": "iana" - }, - "audio/silk": { - "source": "apache", - "extensions": ["sil"] - }, - "audio/smv": { - "source": "iana" - }, - "audio/smv-qcp": { - "source": "iana" - }, - "audio/smv0": { - "source": "iana" - }, - "audio/sofa": { - "source": "iana" - }, - "audio/sp-midi": { - "source": "iana" - }, - "audio/speex": { - "source": "iana" - }, - "audio/t140c": { - "source": "iana" - }, - "audio/t38": { - "source": "iana" - }, - "audio/telephone-event": { - "source": "iana" - }, - "audio/tetra_acelp": { - "source": "iana" - }, - "audio/tetra_acelp_bb": { - "source": "iana" - }, - "audio/tone": { - "source": "iana" - }, - "audio/tsvcis": { - "source": "iana" - }, - "audio/uemclip": { - "source": "iana" - }, - "audio/ulpfec": { - "source": "iana" - }, - "audio/usac": { - "source": "iana" - }, - "audio/vdvi": { - "source": "iana" - }, - "audio/vmr-wb": { - "source": "iana" - }, - "audio/vnd.3gpp.iufp": { - "source": "iana" - }, - "audio/vnd.4sb": { - "source": "iana" - }, - "audio/vnd.audiokoz": { - "source": "iana" - }, - "audio/vnd.celp": { - "source": "iana" - }, - "audio/vnd.cisco.nse": { - "source": "iana" - }, - "audio/vnd.cmles.radio-events": { - "source": "iana" - }, - "audio/vnd.cns.anp1": { - "source": "iana" - }, - "audio/vnd.cns.inf1": { - "source": "iana" - }, - "audio/vnd.dece.audio": { - "source": "iana", - "extensions": ["uva","uvva"] - }, - "audio/vnd.digital-winds": { - "source": "iana", - "extensions": ["eol"] - }, - "audio/vnd.dlna.adts": { - "source": "iana" - }, - "audio/vnd.dolby.heaac.1": { - "source": "iana" - }, - "audio/vnd.dolby.heaac.2": { - "source": "iana" - }, - "audio/vnd.dolby.mlp": { - "source": "iana" - }, - "audio/vnd.dolby.mps": { - "source": "iana" - }, - "audio/vnd.dolby.pl2": { - "source": "iana" - }, - "audio/vnd.dolby.pl2x": { - "source": "iana" - }, - "audio/vnd.dolby.pl2z": { - "source": "iana" - }, - "audio/vnd.dolby.pulse.1": { - "source": "iana" - }, - "audio/vnd.dra": { - "source": "iana", - "extensions": ["dra"] - }, - "audio/vnd.dts": { - "source": "iana", - "extensions": ["dts"] - }, - "audio/vnd.dts.hd": { - "source": "iana", - "extensions": ["dtshd"] - }, - "audio/vnd.dts.uhd": { - "source": "iana" - }, - "audio/vnd.dvb.file": { - "source": "iana" - }, - "audio/vnd.everad.plj": { - "source": "iana" - }, - "audio/vnd.hns.audio": { - "source": "iana" - }, - "audio/vnd.lucent.voice": { - "source": "iana", - "extensions": ["lvp"] - }, - "audio/vnd.ms-playready.media.pya": { - "source": "iana", - "extensions": ["pya"] - }, - "audio/vnd.nokia.mobile-xmf": { - "source": "iana" - }, - "audio/vnd.nortel.vbk": { - "source": "iana" - }, - "audio/vnd.nuera.ecelp4800": { - "source": "iana", - "extensions": ["ecelp4800"] - }, - "audio/vnd.nuera.ecelp7470": { - "source": "iana", - "extensions": ["ecelp7470"] - }, - "audio/vnd.nuera.ecelp9600": { - "source": "iana", - "extensions": ["ecelp9600"] - }, - "audio/vnd.octel.sbc": { - "source": "iana" - }, - "audio/vnd.presonus.multitrack": { - "source": "iana" - }, - "audio/vnd.qcelp": { - "source": "apache" - }, - "audio/vnd.rhetorex.32kadpcm": { - "source": "iana" - }, - "audio/vnd.rip": { - "source": "iana", - "extensions": ["rip"] - }, - "audio/vnd.rn-realaudio": { - "compressible": false - }, - "audio/vnd.sealedmedia.softseal.mpeg": { - "source": "iana" - }, - "audio/vnd.vmx.cvsd": { - "source": "iana" - }, - "audio/vnd.wave": { - "compressible": false - }, - "audio/vorbis": { - "source": "iana", - "compressible": false - }, - "audio/vorbis-config": { - "source": "iana" - }, - "audio/wav": { - "compressible": false, - "extensions": ["wav"] - }, - "audio/wave": { - "compressible": false, - "extensions": ["wav"] - }, - "audio/webm": { - "source": "apache", - "compressible": false, - "extensions": ["weba"] - }, - "audio/x-aac": { - "source": "apache", - "compressible": false, - "extensions": ["aac"] - }, - "audio/x-aiff": { - "source": "apache", - "extensions": ["aif","aiff","aifc"] - }, - "audio/x-caf": { - "source": "apache", - "compressible": false, - "extensions": ["caf"] - }, - "audio/x-flac": { - "source": "apache", - "extensions": ["flac"] - }, - "audio/x-m4a": { - "source": "nginx", - "extensions": ["m4a"] - }, - "audio/x-matroska": { - "source": "apache", - "extensions": ["mka"] - }, - "audio/x-mpegurl": { - "source": "apache", - "extensions": ["m3u"] - }, - "audio/x-ms-wax": { - "source": "apache", - "extensions": ["wax"] - }, - "audio/x-ms-wma": { - "source": "apache", - "extensions": ["wma"] - }, - "audio/x-pn-realaudio": { - "source": "apache", - "extensions": ["ram","ra"] - }, - "audio/x-pn-realaudio-plugin": { - "source": "apache", - "extensions": ["rmp"] - }, - "audio/x-realaudio": { - "source": "nginx", - "extensions": ["ra"] - }, - "audio/x-tta": { - "source": "apache" - }, - "audio/x-wav": { - "source": "apache", - "extensions": ["wav"] - }, - "audio/xm": { - "source": "apache", - "extensions": ["xm"] - }, - "chemical/x-cdx": { - "source": "apache", - "extensions": ["cdx"] - }, - "chemical/x-cif": { - "source": "apache", - "extensions": ["cif"] - }, - "chemical/x-cmdf": { - "source": "apache", - "extensions": ["cmdf"] - }, - "chemical/x-cml": { - "source": "apache", - "extensions": ["cml"] - }, - "chemical/x-csml": { - "source": "apache", - "extensions": ["csml"] - }, - "chemical/x-pdb": { - "source": "apache" - }, - "chemical/x-xyz": { - "source": "apache", - "extensions": ["xyz"] - }, - "font/collection": { - "source": "iana", - "extensions": ["ttc"] - }, - "font/otf": { - "source": "iana", - "compressible": true, - "extensions": ["otf"] - }, - "font/sfnt": { - "source": "iana" - }, - "font/ttf": { - "source": "iana", - "compressible": true, - "extensions": ["ttf"] - }, - "font/woff": { - "source": "iana", - "extensions": ["woff"] - }, - "font/woff2": { - "source": "iana", - "extensions": ["woff2"] - }, - "image/aces": { - "source": "iana", - "extensions": ["exr"] - }, - "image/apng": { - "source": "iana", - "compressible": false, - "extensions": ["apng"] - }, - "image/avci": { - "source": "iana", - "extensions": ["avci"] - }, - "image/avcs": { - "source": "iana", - "extensions": ["avcs"] - }, - "image/avif": { - "source": "iana", - "compressible": false, - "extensions": ["avif"] - }, - "image/bmp": { - "source": "iana", - "compressible": true, - "extensions": ["bmp","dib"] - }, - "image/cgm": { - "source": "iana", - "extensions": ["cgm"] - }, - "image/dicom-rle": { - "source": "iana", - "extensions": ["drle"] - }, - "image/dpx": { - "source": "iana", - "extensions": ["dpx"] - }, - "image/emf": { - "source": "iana", - "extensions": ["emf"] - }, - "image/fits": { - "source": "iana", - "extensions": ["fits"] - }, - "image/g3fax": { - "source": "iana", - "extensions": ["g3"] - }, - "image/gif": { - "source": "iana", - "compressible": false, - "extensions": ["gif"] - }, - "image/heic": { - "source": "iana", - "extensions": ["heic"] - }, - "image/heic-sequence": { - "source": "iana", - "extensions": ["heics"] - }, - "image/heif": { - "source": "iana", - "extensions": ["heif"] - }, - "image/heif-sequence": { - "source": "iana", - "extensions": ["heifs"] - }, - "image/hej2k": { - "source": "iana", - "extensions": ["hej2"] - }, - "image/ief": { - "source": "iana", - "extensions": ["ief"] - }, - "image/j2c": { - "source": "iana" - }, - "image/jaii": { - "source": "iana", - "extensions": ["jaii"] - }, - "image/jais": { - "source": "iana", - "extensions": ["jais"] - }, - "image/jls": { - "source": "iana", - "extensions": ["jls"] - }, - "image/jp2": { - "source": "iana", - "compressible": false, - "extensions": ["jp2","jpg2"] - }, - "image/jpeg": { - "source": "iana", - "compressible": false, - "extensions": ["jpg","jpeg","jpe"] - }, - "image/jph": { - "source": "iana", - "extensions": ["jph"] - }, - "image/jphc": { - "source": "iana", - "extensions": ["jhc"] - }, - "image/jpm": { - "source": "iana", - "compressible": false, - "extensions": ["jpm","jpgm"] - }, - "image/jpx": { - "source": "iana", - "compressible": false, - "extensions": ["jpx","jpf"] - }, - "image/jxl": { - "source": "iana", - "extensions": ["jxl"] - }, - "image/jxr": { - "source": "iana", - "extensions": ["jxr"] - }, - "image/jxra": { - "source": "iana", - "extensions": ["jxra"] - }, - "image/jxrs": { - "source": "iana", - "extensions": ["jxrs"] - }, - "image/jxs": { - "source": "iana", - "extensions": ["jxs"] - }, - "image/jxsc": { - "source": "iana", - "extensions": ["jxsc"] - }, - "image/jxsi": { - "source": "iana", - "extensions": ["jxsi"] - }, - "image/jxss": { - "source": "iana", - "extensions": ["jxss"] - }, - "image/ktx": { - "source": "iana", - "extensions": ["ktx"] - }, - "image/ktx2": { - "source": "iana", - "extensions": ["ktx2"] - }, - "image/naplps": { - "source": "iana" - }, - "image/pjpeg": { - "compressible": false, - "extensions": ["jfif"] - }, - "image/png": { - "source": "iana", - "compressible": false, - "extensions": ["png"] - }, - "image/prs.btif": { - "source": "iana", - "extensions": ["btif","btf"] - }, - "image/prs.pti": { - "source": "iana", - "extensions": ["pti"] - }, - "image/pwg-raster": { - "source": "iana" - }, - "image/sgi": { - "source": "apache", - "extensions": ["sgi"] - }, - "image/svg+xml": { - "source": "iana", - "compressible": true, - "extensions": ["svg","svgz"] - }, - "image/t38": { - "source": "iana", - "extensions": ["t38"] - }, - "image/tiff": { - "source": "iana", - "compressible": false, - "extensions": ["tif","tiff"] - }, - "image/tiff-fx": { - "source": "iana", - "extensions": ["tfx"] - }, - "image/vnd.adobe.photoshop": { - "source": "iana", - "compressible": true, - "extensions": ["psd"] - }, - "image/vnd.airzip.accelerator.azv": { - "source": "iana", - "extensions": ["azv"] - }, - "image/vnd.clip": { - "source": "iana" - }, - "image/vnd.cns.inf2": { - "source": "iana" - }, - "image/vnd.dece.graphic": { - "source": "iana", - "extensions": ["uvi","uvvi","uvg","uvvg"] - }, - "image/vnd.djvu": { - "source": "iana", - "extensions": ["djvu","djv"] - }, - "image/vnd.dvb.subtitle": { - "source": "iana", - "extensions": ["sub"] - }, - "image/vnd.dwg": { - "source": "iana", - "extensions": ["dwg"] - }, - "image/vnd.dxf": { - "source": "iana", - "extensions": ["dxf"] - }, - "image/vnd.fastbidsheet": { - "source": "iana", - "extensions": ["fbs"] - }, - "image/vnd.fpx": { - "source": "iana", - "extensions": ["fpx"] - }, - "image/vnd.fst": { - "source": "iana", - "extensions": ["fst"] - }, - "image/vnd.fujixerox.edmics-mmr": { - "source": "iana", - "extensions": ["mmr"] - }, - "image/vnd.fujixerox.edmics-rlc": { - "source": "iana", - "extensions": ["rlc"] - }, - "image/vnd.globalgraphics.pgb": { - "source": "iana" - }, - "image/vnd.microsoft.icon": { - "source": "iana", - "compressible": true, - "extensions": ["ico"] - }, - "image/vnd.mix": { - "source": "iana" - }, - "image/vnd.mozilla.apng": { - "source": "iana" - }, - "image/vnd.ms-dds": { - "compressible": true, - "extensions": ["dds"] - }, - "image/vnd.ms-modi": { - "source": "iana", - "extensions": ["mdi"] - }, - "image/vnd.ms-photo": { - "source": "apache", - "extensions": ["wdp"] - }, - "image/vnd.net-fpx": { - "source": "iana", - "extensions": ["npx"] - }, - "image/vnd.pco.b16": { - "source": "iana", - "extensions": ["b16"] - }, - "image/vnd.radiance": { - "source": "iana" - }, - "image/vnd.sealed.png": { - "source": "iana" - }, - "image/vnd.sealedmedia.softseal.gif": { - "source": "iana" - }, - "image/vnd.sealedmedia.softseal.jpg": { - "source": "iana" - }, - "image/vnd.svf": { - "source": "iana" - }, - "image/vnd.tencent.tap": { - "source": "iana", - "extensions": ["tap"] - }, - "image/vnd.valve.source.texture": { - "source": "iana", - "extensions": ["vtf"] - }, - "image/vnd.wap.wbmp": { - "source": "iana", - "extensions": ["wbmp"] - }, - "image/vnd.xiff": { - "source": "iana", - "extensions": ["xif"] - }, - "image/vnd.zbrush.pcx": { - "source": "iana", - "extensions": ["pcx"] - }, - "image/webp": { - "source": "iana", - "extensions": ["webp"] - }, - "image/wmf": { - "source": "iana", - "extensions": ["wmf"] - }, - "image/x-3ds": { - "source": "apache", - "extensions": ["3ds"] - }, - "image/x-adobe-dng": { - "extensions": ["dng"] - }, - "image/x-cmu-raster": { - "source": "apache", - "extensions": ["ras"] - }, - "image/x-cmx": { - "source": "apache", - "extensions": ["cmx"] - }, - "image/x-emf": { - "source": "iana" - }, - "image/x-freehand": { - "source": "apache", - "extensions": ["fh","fhc","fh4","fh5","fh7"] - }, - "image/x-icon": { - "source": "apache", - "compressible": true, - "extensions": ["ico"] - }, - "image/x-jng": { - "source": "nginx", - "extensions": ["jng"] - }, - "image/x-mrsid-image": { - "source": "apache", - "extensions": ["sid"] - }, - "image/x-ms-bmp": { - "source": "nginx", - "compressible": true, - "extensions": ["bmp"] - }, - "image/x-pcx": { - "source": "apache", - "extensions": ["pcx"] - }, - "image/x-pict": { - "source": "apache", - "extensions": ["pic","pct"] - }, - "image/x-portable-anymap": { - "source": "apache", - "extensions": ["pnm"] - }, - "image/x-portable-bitmap": { - "source": "apache", - "extensions": ["pbm"] - }, - "image/x-portable-graymap": { - "source": "apache", - "extensions": ["pgm"] - }, - "image/x-portable-pixmap": { - "source": "apache", - "extensions": ["ppm"] - }, - "image/x-rgb": { - "source": "apache", - "extensions": ["rgb"] - }, - "image/x-tga": { - "source": "apache", - "extensions": ["tga"] - }, - "image/x-wmf": { - "source": "iana" - }, - "image/x-xbitmap": { - "source": "apache", - "extensions": ["xbm"] - }, - "image/x-xcf": { - "compressible": false - }, - "image/x-xpixmap": { - "source": "apache", - "extensions": ["xpm"] - }, - "image/x-xwindowdump": { - "source": "apache", - "extensions": ["xwd"] - }, - "message/bhttp": { - "source": "iana" - }, - "message/cpim": { - "source": "iana" - }, - "message/delivery-status": { - "source": "iana" - }, - "message/disposition-notification": { - "source": "iana", - "extensions": [ - "disposition-notification" - ] - }, - "message/external-body": { - "source": "iana" - }, - "message/feedback-report": { - "source": "iana" - }, - "message/global": { - "source": "iana", - "extensions": ["u8msg"] - }, - "message/global-delivery-status": { - "source": "iana", - "extensions": ["u8dsn"] - }, - "message/global-disposition-notification": { - "source": "iana", - "extensions": ["u8mdn"] - }, - "message/global-headers": { - "source": "iana", - "extensions": ["u8hdr"] - }, - "message/http": { - "source": "iana", - "compressible": false - }, - "message/imdn+xml": { - "source": "iana", - "compressible": true - }, - "message/mls": { - "source": "iana" - }, - "message/news": { - "source": "apache" - }, - "message/ohttp-req": { - "source": "iana" - }, - "message/ohttp-res": { - "source": "iana" - }, - "message/partial": { - "source": "iana", - "compressible": false - }, - "message/rfc822": { - "source": "iana", - "compressible": true, - "extensions": ["eml","mime","mht","mhtml"] - }, - "message/s-http": { - "source": "apache" - }, - "message/sip": { - "source": "iana" - }, - "message/sipfrag": { - "source": "iana" - }, - "message/tracking-status": { - "source": "iana" - }, - "message/vnd.si.simp": { - "source": "apache" - }, - "message/vnd.wfa.wsc": { - "source": "iana", - "extensions": ["wsc"] - }, - "model/3mf": { - "source": "iana", - "extensions": ["3mf"] - }, - "model/e57": { - "source": "iana" - }, - "model/gltf+json": { - "source": "iana", - "compressible": true, - "extensions": ["gltf"] - }, - "model/gltf-binary": { - "source": "iana", - "compressible": true, - "extensions": ["glb"] - }, - "model/iges": { - "source": "iana", - "compressible": false, - "extensions": ["igs","iges"] - }, - "model/jt": { - "source": "iana", - "extensions": ["jt"] - }, - "model/mesh": { - "source": "iana", - "compressible": false, - "extensions": ["msh","mesh","silo"] - }, - "model/mtl": { - "source": "iana", - "extensions": ["mtl"] - }, - "model/obj": { - "source": "iana", - "extensions": ["obj"] - }, - "model/prc": { - "source": "iana", - "extensions": ["prc"] - }, - "model/step": { - "source": "iana", - "extensions": ["step","stp","stpnc","p21","210"] - }, - "model/step+xml": { - "source": "iana", - "compressible": true, - "extensions": ["stpx"] - }, - "model/step+zip": { - "source": "iana", - "compressible": false, - "extensions": ["stpz"] - }, - "model/step-xml+zip": { - "source": "iana", - "compressible": false, - "extensions": ["stpxz"] - }, - "model/stl": { - "source": "iana", - "extensions": ["stl"] - }, - "model/u3d": { - "source": "iana", - "extensions": ["u3d"] - }, - "model/vnd.bary": { - "source": "iana", - "extensions": ["bary"] - }, - "model/vnd.cld": { - "source": "iana", - "extensions": ["cld"] - }, - "model/vnd.collada+xml": { - "source": "iana", - "compressible": true, - "extensions": ["dae"] - }, - "model/vnd.dwf": { - "source": "iana", - "extensions": ["dwf"] - }, - "model/vnd.flatland.3dml": { - "source": "iana" - }, - "model/vnd.gdl": { - "source": "iana", - "extensions": ["gdl"] - }, - "model/vnd.gs-gdl": { - "source": "apache" - }, - "model/vnd.gs.gdl": { - "source": "iana" - }, - "model/vnd.gtw": { - "source": "iana", - "extensions": ["gtw"] - }, - "model/vnd.moml+xml": { - "source": "iana", - "compressible": true - }, - "model/vnd.mts": { - "source": "iana", - "extensions": ["mts"] - }, - "model/vnd.opengex": { - "source": "iana", - "extensions": ["ogex"] - }, - "model/vnd.parasolid.transmit.binary": { - "source": "iana", - "extensions": ["x_b"] - }, - "model/vnd.parasolid.transmit.text": { - "source": "iana", - "extensions": ["x_t"] - }, - "model/vnd.pytha.pyox": { - "source": "iana", - "extensions": ["pyo","pyox"] - }, - "model/vnd.rosette.annotated-data-model": { - "source": "iana" - }, - "model/vnd.sap.vds": { - "source": "iana", - "extensions": ["vds"] - }, - "model/vnd.usda": { - "source": "iana", - "extensions": ["usda"] - }, - "model/vnd.usdz+zip": { - "source": "iana", - "compressible": false, - "extensions": ["usdz"] - }, - "model/vnd.valve.source.compiled-map": { - "source": "iana", - "extensions": ["bsp"] - }, - "model/vnd.vtu": { - "source": "iana", - "extensions": ["vtu"] - }, - "model/vrml": { - "source": "iana", - "compressible": false, - "extensions": ["wrl","vrml"] - }, - "model/x3d+binary": { - "source": "apache", - "compressible": false, - "extensions": ["x3db","x3dbz"] - }, - "model/x3d+fastinfoset": { - "source": "iana", - "extensions": ["x3db"] - }, - "model/x3d+vrml": { - "source": "apache", - "compressible": false, - "extensions": ["x3dv","x3dvz"] - }, - "model/x3d+xml": { - "source": "iana", - "compressible": true, - "extensions": ["x3d","x3dz"] - }, - "model/x3d-vrml": { - "source": "iana", - "extensions": ["x3dv"] - }, - "multipart/alternative": { - "source": "iana", - "compressible": false - }, - "multipart/appledouble": { - "source": "iana" - }, - "multipart/byteranges": { - "source": "iana" - }, - "multipart/digest": { - "source": "iana" - }, - "multipart/encrypted": { - "source": "iana", - "compressible": false - }, - "multipart/form-data": { - "source": "iana", - "compressible": false - }, - "multipart/header-set": { - "source": "iana" - }, - "multipart/mixed": { - "source": "iana" - }, - "multipart/multilingual": { - "source": "iana" - }, - "multipart/parallel": { - "source": "iana" - }, - "multipart/related": { - "source": "iana", - "compressible": false - }, - "multipart/report": { - "source": "iana" - }, - "multipart/signed": { - "source": "iana", - "compressible": false - }, - "multipart/vnd.bint.med-plus": { - "source": "iana" - }, - "multipart/voice-message": { - "source": "iana" - }, - "multipart/x-mixed-replace": { - "source": "iana" - }, - "text/1d-interleaved-parityfec": { - "source": "iana" - }, - "text/cache-manifest": { - "source": "iana", - "compressible": true, - "extensions": ["appcache","manifest"] - }, - "text/calendar": { - "source": "iana", - "extensions": ["ics","ifb"] - }, - "text/calender": { - "compressible": true - }, - "text/cmd": { - "compressible": true - }, - "text/coffeescript": { - "extensions": ["coffee","litcoffee"] - }, - "text/cql": { - "source": "iana" - }, - "text/cql-expression": { - "source": "iana" - }, - "text/cql-identifier": { - "source": "iana" - }, - "text/css": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["css"] - }, - "text/csv": { - "source": "iana", - "compressible": true, - "extensions": ["csv"] - }, - "text/csv-schema": { - "source": "iana" - }, - "text/directory": { - "source": "iana" - }, - "text/dns": { - "source": "iana" - }, - "text/ecmascript": { - "source": "apache" - }, - "text/encaprtp": { - "source": "iana" - }, - "text/enriched": { - "source": "iana" - }, - "text/fhirpath": { - "source": "iana" - }, - "text/flexfec": { - "source": "iana" - }, - "text/fwdred": { - "source": "iana" - }, - "text/gff3": { - "source": "iana" - }, - "text/grammar-ref-list": { - "source": "iana" - }, - "text/hl7v2": { - "source": "iana" - }, - "text/html": { - "source": "iana", - "compressible": true, - "extensions": ["html","htm","shtml"] - }, - "text/jade": { - "extensions": ["jade"] - }, - "text/javascript": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["js","mjs"] - }, - "text/jcr-cnd": { - "source": "iana" - }, - "text/jsx": { - "compressible": true, - "extensions": ["jsx"] - }, - "text/less": { - "compressible": true, - "extensions": ["less"] - }, - "text/markdown": { - "source": "iana", - "compressible": true, - "extensions": ["md","markdown"] - }, - "text/mathml": { - "source": "nginx", - "extensions": ["mml"] - }, - "text/mdx": { - "compressible": true, - "extensions": ["mdx"] - }, - "text/mizar": { - "source": "iana" - }, - "text/n3": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["n3"] - }, - "text/parameters": { - "source": "iana", - "charset": "UTF-8" - }, - "text/parityfec": { - "source": "iana" - }, - "text/plain": { - "source": "iana", - "compressible": true, - "extensions": ["txt","text","conf","def","list","log","in","ini"] - }, - "text/provenance-notation": { - "source": "iana", - "charset": "UTF-8" - }, - "text/prs.fallenstein.rst": { - "source": "iana" - }, - "text/prs.lines.tag": { - "source": "iana", - "extensions": ["dsc"] - }, - "text/prs.prop.logic": { - "source": "iana" - }, - "text/prs.texi": { - "source": "iana" - }, - "text/raptorfec": { - "source": "iana" - }, - "text/red": { - "source": "iana" - }, - "text/rfc822-headers": { - "source": "iana" - }, - "text/richtext": { - "source": "iana", - "compressible": true, - "extensions": ["rtx"] - }, - "text/rtf": { - "source": "iana", - "compressible": true, - "extensions": ["rtf"] - }, - "text/rtp-enc-aescm128": { - "source": "iana" - }, - "text/rtploopback": { - "source": "iana" - }, - "text/rtx": { - "source": "iana" - }, - "text/sgml": { - "source": "iana", - "extensions": ["sgml","sgm"] - }, - "text/shaclc": { - "source": "iana" - }, - "text/shex": { - "source": "iana", - "extensions": ["shex"] - }, - "text/slim": { - "extensions": ["slim","slm"] - }, - "text/spdx": { - "source": "iana", - "extensions": ["spdx"] - }, - "text/strings": { - "source": "iana" - }, - "text/stylus": { - "extensions": ["stylus","styl"] - }, - "text/t140": { - "source": "iana" - }, - "text/tab-separated-values": { - "source": "iana", - "compressible": true, - "extensions": ["tsv"] - }, - "text/troff": { - "source": "iana", - "extensions": ["t","tr","roff","man","me","ms"] - }, - "text/turtle": { - "source": "iana", - "charset": "UTF-8", - "extensions": ["ttl"] - }, - "text/ulpfec": { - "source": "iana" - }, - "text/uri-list": { - "source": "iana", - "compressible": true, - "extensions": ["uri","uris","urls"] - }, - "text/vcard": { - "source": "iana", - "compressible": true, - "extensions": ["vcard"] - }, - "text/vnd.a": { - "source": "iana" - }, - "text/vnd.abc": { - "source": "iana" - }, - "text/vnd.ascii-art": { - "source": "iana" - }, - "text/vnd.curl": { - "source": "iana", - "extensions": ["curl"] - }, - "text/vnd.curl.dcurl": { - "source": "apache", - "extensions": ["dcurl"] - }, - "text/vnd.curl.mcurl": { - "source": "apache", - "extensions": ["mcurl"] - }, - "text/vnd.curl.scurl": { - "source": "apache", - "extensions": ["scurl"] - }, - "text/vnd.debian.copyright": { - "source": "iana", - "charset": "UTF-8" - }, - "text/vnd.dmclientscript": { - "source": "iana" - }, - "text/vnd.dvb.subtitle": { - "source": "iana", - "extensions": ["sub"] - }, - "text/vnd.esmertec.theme-descriptor": { - "source": "iana", - "charset": "UTF-8" - }, - "text/vnd.exchangeable": { - "source": "iana" - }, - "text/vnd.familysearch.gedcom": { - "source": "iana", - "extensions": ["ged"] - }, - "text/vnd.ficlab.flt": { - "source": "iana" - }, - "text/vnd.fly": { - "source": "iana", - "extensions": ["fly"] - }, - "text/vnd.fmi.flexstor": { - "source": "iana", - "extensions": ["flx"] - }, - "text/vnd.gml": { - "source": "iana" - }, - "text/vnd.graphviz": { - "source": "iana", - "extensions": ["gv"] - }, - "text/vnd.hans": { - "source": "iana" - }, - "text/vnd.hgl": { - "source": "iana" - }, - "text/vnd.in3d.3dml": { - "source": "iana", - "extensions": ["3dml"] - }, - "text/vnd.in3d.spot": { - "source": "iana", - "extensions": ["spot"] - }, - "text/vnd.iptc.newsml": { - "source": "iana" - }, - "text/vnd.iptc.nitf": { - "source": "iana" - }, - "text/vnd.latex-z": { - "source": "iana" - }, - "text/vnd.motorola.reflex": { - "source": "iana" - }, - "text/vnd.ms-mediapackage": { - "source": "iana" - }, - "text/vnd.net2phone.commcenter.command": { - "source": "iana" - }, - "text/vnd.radisys.msml-basic-layout": { - "source": "iana" - }, - "text/vnd.senx.warpscript": { - "source": "iana" - }, - "text/vnd.si.uricatalogue": { - "source": "apache" - }, - "text/vnd.sosi": { - "source": "iana" - }, - "text/vnd.sun.j2me.app-descriptor": { - "source": "iana", - "charset": "UTF-8", - "extensions": ["jad"] - }, - "text/vnd.trolltech.linguist": { - "source": "iana", - "charset": "UTF-8" - }, - "text/vnd.vcf": { - "source": "iana" - }, - "text/vnd.wap.si": { - "source": "iana" - }, - "text/vnd.wap.sl": { - "source": "iana" - }, - "text/vnd.wap.wml": { - "source": "iana", - "extensions": ["wml"] - }, - "text/vnd.wap.wmlscript": { - "source": "iana", - "extensions": ["wmls"] - }, - "text/vnd.zoo.kcl": { - "source": "iana" - }, - "text/vtt": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["vtt"] - }, - "text/wgsl": { - "source": "iana", - "extensions": ["wgsl"] - }, - "text/x-asm": { - "source": "apache", - "extensions": ["s","asm"] - }, - "text/x-c": { - "source": "apache", - "extensions": ["c","cc","cxx","cpp","h","hh","dic"] - }, - "text/x-component": { - "source": "nginx", - "extensions": ["htc"] - }, - "text/x-fortran": { - "source": "apache", - "extensions": ["f","for","f77","f90"] - }, - "text/x-gwt-rpc": { - "compressible": true - }, - "text/x-handlebars-template": { - "extensions": ["hbs"] - }, - "text/x-java-source": { - "source": "apache", - "extensions": ["java"] - }, - "text/x-jquery-tmpl": { - "compressible": true - }, - "text/x-lua": { - "extensions": ["lua"] - }, - "text/x-markdown": { - "compressible": true, - "extensions": ["mkd"] - }, - "text/x-nfo": { - "source": "apache", - "extensions": ["nfo"] - }, - "text/x-opml": { - "source": "apache", - "extensions": ["opml"] - }, - "text/x-org": { - "compressible": true, - "extensions": ["org"] - }, - "text/x-pascal": { - "source": "apache", - "extensions": ["p","pas"] - }, - "text/x-processing": { - "compressible": true, - "extensions": ["pde"] - }, - "text/x-sass": { - "extensions": ["sass"] - }, - "text/x-scss": { - "extensions": ["scss"] - }, - "text/x-setext": { - "source": "apache", - "extensions": ["etx"] - }, - "text/x-sfv": { - "source": "apache", - "extensions": ["sfv"] - }, - "text/x-suse-ymp": { - "compressible": true, - "extensions": ["ymp"] - }, - "text/x-uuencode": { - "source": "apache", - "extensions": ["uu"] - }, - "text/x-vcalendar": { - "source": "apache", - "extensions": ["vcs"] - }, - "text/x-vcard": { - "source": "apache", - "extensions": ["vcf"] - }, - "text/xml": { - "source": "iana", - "compressible": true, - "extensions": ["xml"] - }, - "text/xml-external-parsed-entity": { - "source": "iana" - }, - "text/yaml": { - "compressible": true, - "extensions": ["yaml","yml"] - }, - "video/1d-interleaved-parityfec": { - "source": "iana" - }, - "video/3gpp": { - "source": "iana", - "extensions": ["3gp","3gpp"] - }, - "video/3gpp-tt": { - "source": "iana" - }, - "video/3gpp2": { - "source": "iana", - "extensions": ["3g2"] - }, - "video/av1": { - "source": "iana" - }, - "video/bmpeg": { - "source": "iana" - }, - "video/bt656": { - "source": "iana" - }, - "video/celb": { - "source": "iana" - }, - "video/dv": { - "source": "iana" - }, - "video/encaprtp": { - "source": "iana" - }, - "video/evc": { - "source": "iana" - }, - "video/ffv1": { - "source": "iana" - }, - "video/flexfec": { - "source": "iana" - }, - "video/h261": { - "source": "iana", - "extensions": ["h261"] - }, - "video/h263": { - "source": "iana", - "extensions": ["h263"] - }, - "video/h263-1998": { - "source": "iana" - }, - "video/h263-2000": { - "source": "iana" - }, - "video/h264": { - "source": "iana", - "extensions": ["h264"] - }, - "video/h264-rcdo": { - "source": "iana" - }, - "video/h264-svc": { - "source": "iana" - }, - "video/h265": { - "source": "iana" - }, - "video/h266": { - "source": "iana" - }, - "video/iso.segment": { - "source": "iana", - "extensions": ["m4s"] - }, - "video/jpeg": { - "source": "iana", - "extensions": ["jpgv"] - }, - "video/jpeg2000": { - "source": "iana" - }, - "video/jpm": { - "source": "apache", - "extensions": ["jpm","jpgm"] - }, - "video/jxsv": { - "source": "iana" - }, - "video/lottie+json": { - "source": "iana", - "compressible": true - }, - "video/matroska": { - "source": "iana" - }, - "video/matroska-3d": { - "source": "iana" - }, - "video/mj2": { - "source": "iana", - "extensions": ["mj2","mjp2"] - }, - "video/mp1s": { - "source": "iana" - }, - "video/mp2p": { - "source": "iana" - }, - "video/mp2t": { - "source": "iana", - "extensions": ["ts","m2t","m2ts","mts"] - }, - "video/mp4": { - "source": "iana", - "compressible": false, - "extensions": ["mp4","mp4v","mpg4"] - }, - "video/mp4v-es": { - "source": "iana" - }, - "video/mpeg": { - "source": "iana", - "compressible": false, - "extensions": ["mpeg","mpg","mpe","m1v","m2v"] - }, - "video/mpeg4-generic": { - "source": "iana" - }, - "video/mpv": { - "source": "iana" - }, - "video/nv": { - "source": "iana" - }, - "video/ogg": { - "source": "iana", - "compressible": false, - "extensions": ["ogv"] - }, - "video/parityfec": { - "source": "iana" - }, - "video/pointer": { - "source": "iana" - }, - "video/quicktime": { - "source": "iana", - "compressible": false, - "extensions": ["qt","mov"] - }, - "video/raptorfec": { - "source": "iana" - }, - "video/raw": { - "source": "iana" - }, - "video/rtp-enc-aescm128": { - "source": "iana" - }, - "video/rtploopback": { - "source": "iana" - }, - "video/rtx": { - "source": "iana" - }, - "video/scip": { - "source": "iana" - }, - "video/smpte291": { - "source": "iana" - }, - "video/smpte292m": { - "source": "iana" - }, - "video/ulpfec": { - "source": "iana" - }, - "video/vc1": { - "source": "iana" - }, - "video/vc2": { - "source": "iana" - }, - "video/vnd.cctv": { - "source": "iana" - }, - "video/vnd.dece.hd": { - "source": "iana", - "extensions": ["uvh","uvvh"] - }, - "video/vnd.dece.mobile": { - "source": "iana", - "extensions": ["uvm","uvvm"] - }, - "video/vnd.dece.mp4": { - "source": "iana" - }, - "video/vnd.dece.pd": { - "source": "iana", - "extensions": ["uvp","uvvp"] - }, - "video/vnd.dece.sd": { - "source": "iana", - "extensions": ["uvs","uvvs"] - }, - "video/vnd.dece.video": { - "source": "iana", - "extensions": ["uvv","uvvv"] - }, - "video/vnd.directv.mpeg": { - "source": "iana" - }, - "video/vnd.directv.mpeg-tts": { - "source": "iana" - }, - "video/vnd.dlna.mpeg-tts": { - "source": "iana" - }, - "video/vnd.dvb.file": { - "source": "iana", - "extensions": ["dvb"] - }, - "video/vnd.fvt": { - "source": "iana", - "extensions": ["fvt"] - }, - "video/vnd.hns.video": { - "source": "iana" - }, - "video/vnd.iptvforum.1dparityfec-1010": { - "source": "iana" - }, - "video/vnd.iptvforum.1dparityfec-2005": { - "source": "iana" - }, - "video/vnd.iptvforum.2dparityfec-1010": { - "source": "iana" - }, - "video/vnd.iptvforum.2dparityfec-2005": { - "source": "iana" - }, - "video/vnd.iptvforum.ttsavc": { - "source": "iana" - }, - "video/vnd.iptvforum.ttsmpeg2": { - "source": "iana" - }, - "video/vnd.motorola.video": { - "source": "iana" - }, - "video/vnd.motorola.videop": { - "source": "iana" - }, - "video/vnd.mpegurl": { - "source": "iana", - "extensions": ["mxu","m4u"] - }, - "video/vnd.ms-playready.media.pyv": { - "source": "iana", - "extensions": ["pyv"] - }, - "video/vnd.nokia.interleaved-multimedia": { - "source": "iana" - }, - "video/vnd.nokia.mp4vr": { - "source": "iana" - }, - "video/vnd.nokia.videovoip": { - "source": "iana" - }, - "video/vnd.objectvideo": { - "source": "iana" - }, - "video/vnd.planar": { - "source": "iana" - }, - "video/vnd.radgamettools.bink": { - "source": "iana" - }, - "video/vnd.radgamettools.smacker": { - "source": "apache" - }, - "video/vnd.sealed.mpeg1": { - "source": "iana" - }, - "video/vnd.sealed.mpeg4": { - "source": "iana" - }, - "video/vnd.sealed.swf": { - "source": "iana" - }, - "video/vnd.sealedmedia.softseal.mov": { - "source": "iana" - }, - "video/vnd.uvvu.mp4": { - "source": "iana", - "extensions": ["uvu","uvvu"] - }, - "video/vnd.vivo": { - "source": "iana", - "extensions": ["viv"] - }, - "video/vnd.youtube.yt": { - "source": "iana" - }, - "video/vp8": { - "source": "iana" - }, - "video/vp9": { - "source": "iana" - }, - "video/webm": { - "source": "apache", - "compressible": false, - "extensions": ["webm"] - }, - "video/x-f4v": { - "source": "apache", - "extensions": ["f4v"] - }, - "video/x-fli": { - "source": "apache", - "extensions": ["fli"] - }, - "video/x-flv": { - "source": "apache", - "compressible": false, - "extensions": ["flv"] - }, - "video/x-m4v": { - "source": "apache", - "extensions": ["m4v"] - }, - "video/x-matroska": { - "source": "apache", - "compressible": false, - "extensions": ["mkv","mk3d","mks"] - }, - "video/x-mng": { - "source": "apache", - "extensions": ["mng"] - }, - "video/x-ms-asf": { - "source": "apache", - "extensions": ["asf","asx"] - }, - "video/x-ms-vob": { - "source": "apache", - "extensions": ["vob"] - }, - "video/x-ms-wm": { - "source": "apache", - "extensions": ["wm"] - }, - "video/x-ms-wmv": { - "source": "apache", - "compressible": false, - "extensions": ["wmv"] - }, - "video/x-ms-wmx": { - "source": "apache", - "extensions": ["wmx"] - }, - "video/x-ms-wvx": { - "source": "apache", - "extensions": ["wvx"] - }, - "video/x-msvideo": { - "source": "apache", - "extensions": ["avi"] - }, - "video/x-sgi-movie": { - "source": "apache", - "extensions": ["movie"] - }, - "video/x-smv": { - "source": "apache", - "extensions": ["smv"] - }, - "x-conference/x-cooltalk": { - "source": "apache", - "extensions": ["ice"] - }, - "x-shader/x-fragment": { - "compressible": true - }, - "x-shader/x-vertex": { - "compressible": true - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/mime-db/index.js b/node_modules/@nestjs/platform-express/node_modules/mime-db/index.js deleted file mode 100644 index ec2be30..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/mime-db/index.js +++ /dev/null @@ -1,12 +0,0 @@ -/*! - * mime-db - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015-2022 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * Module exports. - */ - -module.exports = require('./db.json') diff --git a/node_modules/@nestjs/platform-express/node_modules/mime-db/package.json b/node_modules/@nestjs/platform-express/node_modules/mime-db/package.json deleted file mode 100644 index 289a370..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/mime-db/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "mime-db", - "description": "Media Type Database", - "version": "1.54.0", - "contributors": [ - "Douglas Christopher Wilson ", - "Jonathan Ong (http://jongleberry.com)", - "Robert Kieffer (http://github.com/broofa)" - ], - "license": "MIT", - "keywords": [ - "mime", - "db", - "type", - "types", - "database", - "charset", - "charsets" - ], - "repository": "jshttp/mime-db", - "devDependencies": { - "csv-parse": "4.16.3", - "eslint": "8.32.0", - "eslint-config-standard": "15.0.1", - "eslint-plugin-import": "2.27.5", - "eslint-plugin-markdown": "3.0.0", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "6.1.1", - "eslint-plugin-standard": "4.1.0", - "media-typer": "1.1.0", - "mocha": "10.2.0", - "nyc": "15.1.0", - "stream-to-array": "2.3.0", - "undici": "7.1.0" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "README.md", - "db.json", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "build": "node scripts/build", - "fetch": "node scripts/fetch-apache && node scripts/fetch-iana && node scripts/fetch-nginx", - "lint": "eslint .", - "test": "mocha --reporter spec --check-leaks test/", - "test-ci": "nyc --reporter=lcovonly --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "update": "npm run fetch && npm run build", - "version": "node scripts/version-history.js && git add HISTORY.md" - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/mime-types/HISTORY.md b/node_modules/@nestjs/platform-express/node_modules/mime-types/HISTORY.md deleted file mode 100644 index 9ba2dc0..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/mime-types/HISTORY.md +++ /dev/null @@ -1,428 +0,0 @@ -3.0.2 / 2025-11-20 -=================== - -* Fix: update JSDoc to reflect that functions return only `false` or `string`, not `boolean|string`. -* Fix: refined mime-score logic so `.mp4` resolves correctly -* Fix:reflect the current Node.js version supported to ≥ 18 (See 3.0.0 for more details). - -3.0.1 / 2025-03-26 -=================== - -* deps: mime-db@1.54.0 - -3.0.0 / 2024-08-31 -=================== - -* Drop support for node <18 -* deps: mime-db@1.53.0 -* resolve extension conflicts with mime-score (#119) - * asc -> application/pgp-signature is now application/pgp-keys - * mpp -> application/vnd.ms-project is now application/dash-patch+xml - * ac -> application/vnd.nokia.n-gage.ac+xml is now application/pkix-attr-cert - * bdoc -> application/x-bdoc is now application/bdoc - * wmz -> application/x-msmetafile is now application/x-ms-wmz - * xsl -> application/xslt+xml is now application/xml - * wav -> audio/wave is now audio/wav - * rtf -> text/rtf is now application/rtf - * xml -> text/xml is now application/xml - * mp4 -> video/mp4 is now application/mp4 - * mpg4 -> video/mp4 is now application/mp4 - - -2.1.35 / 2022-03-12 -=================== - - * deps: mime-db@1.52.0 - - Add extensions from IANA for more `image/*` types - - Add extension `.asc` to `application/pgp-keys` - - Add extensions to various XML types - - Add new upstream MIME types - -2.1.34 / 2021-11-08 -=================== - - * deps: mime-db@1.51.0 - - Add new upstream MIME types - -2.1.33 / 2021-10-01 -=================== - - * deps: mime-db@1.50.0 - - Add deprecated iWorks mime types and extensions - - Add new upstream MIME types - -2.1.32 / 2021-07-27 -=================== - - * deps: mime-db@1.49.0 - - Add extension `.trig` to `application/trig` - - Add new upstream MIME types - -2.1.31 / 2021-06-01 -=================== - - * deps: mime-db@1.48.0 - - Add extension `.mvt` to `application/vnd.mapbox-vector-tile` - - Add new upstream MIME types - -2.1.30 / 2021-04-02 -=================== - - * deps: mime-db@1.47.0 - - Add extension `.amr` to `audio/amr` - - Remove ambigious extensions from IANA for `application/*+xml` types - - Update primary extension to `.es` for `application/ecmascript` - -2.1.29 / 2021-02-17 -=================== - - * deps: mime-db@1.46.0 - - Add extension `.amr` to `audio/amr` - - Add extension `.m4s` to `video/iso.segment` - - Add extension `.opus` to `audio/ogg` - - Add new upstream MIME types - -2.1.28 / 2021-01-01 -=================== - - * deps: mime-db@1.45.0 - - Add `application/ubjson` with extension `.ubj` - - Add `image/avif` with extension `.avif` - - Add `image/ktx2` with extension `.ktx2` - - Add extension `.dbf` to `application/vnd.dbf` - - Add extension `.rar` to `application/vnd.rar` - - Add extension `.td` to `application/urc-targetdesc+xml` - - Add new upstream MIME types - - Fix extension of `application/vnd.apple.keynote` to be `.key` - -2.1.27 / 2020-04-23 -=================== - - * deps: mime-db@1.44.0 - - Add charsets from IANA - - Add extension `.cjs` to `application/node` - - Add new upstream MIME types - -2.1.26 / 2020-01-05 -=================== - - * deps: mime-db@1.43.0 - - Add `application/x-keepass2` with extension `.kdbx` - - Add extension `.mxmf` to `audio/mobile-xmf` - - Add extensions from IANA for `application/*+xml` types - - Add new upstream MIME types - -2.1.25 / 2019-11-12 -=================== - - * deps: mime-db@1.42.0 - - Add new upstream MIME types - - Add `application/toml` with extension `.toml` - - Add `image/vnd.ms-dds` with extension `.dds` - -2.1.24 / 2019-04-20 -=================== - - * deps: mime-db@1.40.0 - - Add extensions from IANA for `model/*` types - - Add `text/mdx` with extension `.mdx` - -2.1.23 / 2019-04-17 -=================== - - * deps: mime-db@~1.39.0 - - Add extensions `.siv` and `.sieve` to `application/sieve` - - Add new upstream MIME types - -2.1.22 / 2019-02-14 -=================== - - * deps: mime-db@~1.38.0 - - Add extension `.nq` to `application/n-quads` - - Add extension `.nt` to `application/n-triples` - - Add new upstream MIME types - -2.1.21 / 2018-10-19 -=================== - - * deps: mime-db@~1.37.0 - - Add extensions to HEIC image types - - Add new upstream MIME types - -2.1.20 / 2018-08-26 -=================== - - * deps: mime-db@~1.36.0 - - Add Apple file extensions from IANA - - Add extensions from IANA for `image/*` types - - Add new upstream MIME types - -2.1.19 / 2018-07-17 -=================== - - * deps: mime-db@~1.35.0 - - Add extension `.csl` to `application/vnd.citationstyles.style+xml` - - Add extension `.es` to `application/ecmascript` - - Add extension `.owl` to `application/rdf+xml` - - Add new upstream MIME types - - Add UTF-8 as default charset for `text/turtle` - -2.1.18 / 2018-02-16 -=================== - - * deps: mime-db@~1.33.0 - - Add `application/raml+yaml` with extension `.raml` - - Add `application/wasm` with extension `.wasm` - - Add `text/shex` with extension `.shex` - - Add extensions for JPEG-2000 images - - Add extensions from IANA for `message/*` types - - Add new upstream MIME types - - Update font MIME types - - Update `text/hjson` to registered `application/hjson` - -2.1.17 / 2017-09-01 -=================== - - * deps: mime-db@~1.30.0 - - Add `application/vnd.ms-outlook` - - Add `application/x-arj` - - Add extension `.mjs` to `application/javascript` - - Add glTF types and extensions - - Add new upstream MIME types - - Add `text/x-org` - - Add VirtualBox MIME types - - Fix `source` records for `video/*` types that are IANA - - Update `font/opentype` to registered `font/otf` - -2.1.16 / 2017-07-24 -=================== - - * deps: mime-db@~1.29.0 - - Add `application/fido.trusted-apps+json` - - Add extension `.wadl` to `application/vnd.sun.wadl+xml` - - Add extension `.gz` to `application/gzip` - - Add new upstream MIME types - - Update extensions `.md` and `.markdown` to be `text/markdown` - -2.1.15 / 2017-03-23 -=================== - - * deps: mime-db@~1.27.0 - - Add new mime types - - Add `image/apng` - -2.1.14 / 2017-01-14 -=================== - - * deps: mime-db@~1.26.0 - - Add new mime types - -2.1.13 / 2016-11-18 -=================== - - * deps: mime-db@~1.25.0 - - Add new mime types - -2.1.12 / 2016-09-18 -=================== - - * deps: mime-db@~1.24.0 - - Add new mime types - - Add `audio/mp3` - -2.1.11 / 2016-05-01 -=================== - - * deps: mime-db@~1.23.0 - - Add new mime types - -2.1.10 / 2016-02-15 -=================== - - * deps: mime-db@~1.22.0 - - Add new mime types - - Fix extension of `application/dash+xml` - - Update primary extension for `audio/mp4` - -2.1.9 / 2016-01-06 -================== - - * deps: mime-db@~1.21.0 - - Add new mime types - -2.1.8 / 2015-11-30 -================== - - * deps: mime-db@~1.20.0 - - Add new mime types - -2.1.7 / 2015-09-20 -================== - - * deps: mime-db@~1.19.0 - - Add new mime types - -2.1.6 / 2015-09-03 -================== - - * deps: mime-db@~1.18.0 - - Add new mime types - -2.1.5 / 2015-08-20 -================== - - * deps: mime-db@~1.17.0 - - Add new mime types - -2.1.4 / 2015-07-30 -================== - - * deps: mime-db@~1.16.0 - - Add new mime types - -2.1.3 / 2015-07-13 -================== - - * deps: mime-db@~1.15.0 - - Add new mime types - -2.1.2 / 2015-06-25 -================== - - * deps: mime-db@~1.14.0 - - Add new mime types - -2.1.1 / 2015-06-08 -================== - - * perf: fix deopt during mapping - -2.1.0 / 2015-06-07 -================== - - * Fix incorrectly treating extension-less file name as extension - - i.e. `'path/to/json'` will no longer return `application/json` - * Fix `.charset(type)` to accept parameters - * Fix `.charset(type)` to match case-insensitive - * Improve generation of extension to MIME mapping - * Refactor internals for readability and no argument reassignment - * Prefer `application/*` MIME types from the same source - * Prefer any type over `application/octet-stream` - * deps: mime-db@~1.13.0 - - Add nginx as a source - - Add new mime types - -2.0.14 / 2015-06-06 -=================== - - * deps: mime-db@~1.12.0 - - Add new mime types - -2.0.13 / 2015-05-31 -=================== - - * deps: mime-db@~1.11.0 - - Add new mime types - -2.0.12 / 2015-05-19 -=================== - - * deps: mime-db@~1.10.0 - - Add new mime types - -2.0.11 / 2015-05-05 -=================== - - * deps: mime-db@~1.9.1 - - Add new mime types - -2.0.10 / 2015-03-13 -=================== - - * deps: mime-db@~1.8.0 - - Add new mime types - -2.0.9 / 2015-02-09 -================== - - * deps: mime-db@~1.7.0 - - Add new mime types - - Community extensions ownership transferred from `node-mime` - -2.0.8 / 2015-01-29 -================== - - * deps: mime-db@~1.6.0 - - Add new mime types - -2.0.7 / 2014-12-30 -================== - - * deps: mime-db@~1.5.0 - - Add new mime types - - Fix various invalid MIME type entries - -2.0.6 / 2014-12-30 -================== - - * deps: mime-db@~1.4.0 - - Add new mime types - - Fix various invalid MIME type entries - - Remove example template MIME types - -2.0.5 / 2014-12-29 -================== - - * deps: mime-db@~1.3.1 - - Fix missing extensions - -2.0.4 / 2014-12-10 -================== - - * deps: mime-db@~1.3.0 - - Add new mime types - -2.0.3 / 2014-11-09 -================== - - * deps: mime-db@~1.2.0 - - Add new mime types - -2.0.2 / 2014-09-28 -================== - - * deps: mime-db@~1.1.0 - - Add new mime types - - Update charsets - -2.0.1 / 2014-09-07 -================== - - * Support Node.js 0.6 - -2.0.0 / 2014-09-02 -================== - - * Use `mime-db` - * Remove `.define()` - -1.0.2 / 2014-08-04 -================== - - * Set charset=utf-8 for `text/javascript` - -1.0.1 / 2014-06-24 -================== - - * Add `text/jsx` type - -1.0.0 / 2014-05-12 -================== - - * Return `false` for unknown types - * Set charset=utf-8 for `application/json` - -0.1.0 / 2014-05-02 -================== - - * Initial release diff --git a/node_modules/@nestjs/platform-express/node_modules/mime-types/LICENSE b/node_modules/@nestjs/platform-express/node_modules/mime-types/LICENSE deleted file mode 100644 index 0616607..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/mime-types/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@nestjs/platform-express/node_modules/mime-types/README.md b/node_modules/@nestjs/platform-express/node_modules/mime-types/README.md deleted file mode 100644 index 222d2b5..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/mime-types/README.md +++ /dev/null @@ -1,126 +0,0 @@ -# mime-types - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][ci-image]][ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -The ultimate javascript content-type utility. - -Similar to [the `mime@1.x` module](https://www.npmjs.com/package/mime), except: - -- __No fallbacks.__ Instead of naively returning the first available type, - `mime-types` simply returns `false`, so do - `var type = mime.lookup('unrecognized') || 'application/octet-stream'`. -- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`. -- No `.define()` functionality -- Bug fixes for `.lookup(path)` - -Otherwise, the API is compatible with `mime` 1.x. - -## Install - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install mime-types -``` - -## Note on MIME Type Data and Semver - -This package considers the programmatic api as the semver compatibility. Additionally, the package which provides the MIME data -for this package (`mime-db`) *also* considers it's programmatic api as the semver contract. This means the MIME type resolution is *not* considered -in the semver bumps. - -In the past the version of `mime-db` was pinned to give two decision points when adopting MIME data changes. This is no longer true. We still update the -`mime-db` package here as a `minor` release when necessary, but will use a `^` range going forward. This means that if you want to pin your `mime-db` data -you will need to do it in your application. While this expectation was not set in docs until now, it is how the pacakge operated, so we do not feel this is -a breaking change. - -If you wish to pin your `mime-db` version you can do that with overrides via your package manager of choice. See their documentation for how to correctly configure that. - -## Adding Types - -All mime types are based on [mime-db](https://www.npmjs.com/package/mime-db), -so open a PR there if you'd like to add mime types. - -## API - -```js -var mime = require('mime-types') -``` - -All functions return `false` if input is invalid or not found. - -### mime.lookup(path) - -Lookup the content-type associated with a file. - -```js -mime.lookup('json') // 'application/json' -mime.lookup('.md') // 'text/markdown' -mime.lookup('file.html') // 'text/html' -mime.lookup('folder/file.js') // 'application/javascript' -mime.lookup('folder/.htaccess') // false - -mime.lookup('cats') // false -``` - -### mime.contentType(type) - -Create a full content-type header given a content-type or extension. -When given an extension, `mime.lookup` is used to get the matching -content-type, otherwise the given content-type is used. Then if the -content-type does not already have a `charset` parameter, `mime.charset` -is used to get the default charset and add to the returned content-type. - -```js -mime.contentType('markdown') // 'text/x-markdown; charset=utf-8' -mime.contentType('file.json') // 'application/json; charset=utf-8' -mime.contentType('text/html') // 'text/html; charset=utf-8' -mime.contentType('text/html; charset=iso-8859-1') // 'text/html; charset=iso-8859-1' - -// from a full path -mime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8' -``` - -### mime.extension(type) - -Get the default extension for a content-type. - -```js -mime.extension('application/octet-stream') // 'bin' -``` - -### mime.charset(type) - -Lookup the implied default charset of a content-type. - -```js -mime.charset('text/markdown') // 'UTF-8' -``` - -### var type = mime.types[extension] - -A map of content-types by extension. - -### [extensions...] = mime.extensions[type] - -A map of extensions by content-type. - -## License - -[MIT](LICENSE) - -[ci-image]: https://badgen.net/github/checks/jshttp/mime-types/master?label=ci -[ci-url]: https://github.com/jshttp/mime-types/actions/workflows/ci.yml -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-types/master -[coveralls-url]: https://coveralls.io/r/jshttp/mime-types?branch=master -[node-version-image]: https://badgen.net/npm/node/mime-types -[node-version-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/mime-types -[npm-url]: https://npmjs.org/package/mime-types -[npm-version-image]: https://badgen.net/npm/v/mime-types diff --git a/node_modules/@nestjs/platform-express/node_modules/mime-types/index.js b/node_modules/@nestjs/platform-express/node_modules/mime-types/index.js deleted file mode 100644 index 9725ddf..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/mime-types/index.js +++ /dev/null @@ -1,211 +0,0 @@ -/*! - * mime-types - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var db = require('mime-db') -var extname = require('path').extname -var mimeScore = require('./mimeScore') - -/** - * Module variables. - * @private - */ - -var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ -var TEXT_TYPE_REGEXP = /^text\//i - -/** - * Module exports. - * @public - */ - -exports.charset = charset -exports.charsets = { lookup: charset } -exports.contentType = contentType -exports.extension = extension -exports.extensions = Object.create(null) -exports.lookup = lookup -exports.types = Object.create(null) -exports._extensionConflicts = [] - -// Populate the extensions/types maps -populateMaps(exports.extensions, exports.types) - -/** - * Get the default charset for a MIME type. - * - * @param {string} type - * @return {false|string} - */ - -function charset (type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - var mime = match && db[match[1].toLowerCase()] - - if (mime && mime.charset) { - return mime.charset - } - - // default text/* to utf-8 - if (match && TEXT_TYPE_REGEXP.test(match[1])) { - return 'UTF-8' - } - - return false -} - -/** - * Create a full Content-Type header given a MIME type or extension. - * - * @param {string} str - * @return {false|string} - */ - -function contentType (str) { - // TODO: should this even be in this module? - if (!str || typeof str !== 'string') { - return false - } - - var mime = str.indexOf('/') === -1 ? exports.lookup(str) : str - - if (!mime) { - return false - } - - // TODO: use content-type or other module - if (mime.indexOf('charset') === -1) { - var charset = exports.charset(mime) - if (charset) mime += '; charset=' + charset.toLowerCase() - } - - return mime -} - -/** - * Get the default extension for a MIME type. - * - * @param {string} type - * @return {false|string} - */ - -function extension (type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - - // get extensions - var exts = match && exports.extensions[match[1].toLowerCase()] - - if (!exts || !exts.length) { - return false - } - - return exts[0] -} - -/** - * Lookup the MIME type for a file path/extension. - * - * @param {string} path - * @return {false|string} - */ - -function lookup (path) { - if (!path || typeof path !== 'string') { - return false - } - - // get the extension ("ext" or ".ext" or full path) - var extension = extname('x.' + path) - .toLowerCase() - .slice(1) - - if (!extension) { - return false - } - - return exports.types[extension] || false -} - -/** - * Populate the extensions and types maps. - * @private - */ - -function populateMaps (extensions, types) { - Object.keys(db).forEach(function forEachMimeType (type) { - var mime = db[type] - var exts = mime.extensions - - if (!exts || !exts.length) { - return - } - - // mime -> extensions - extensions[type] = exts - - // extension -> mime - for (var i = 0; i < exts.length; i++) { - var extension = exts[i] - types[extension] = _preferredType(extension, types[extension], type) - - // DELETE (eventually): Capture extension->type maps that change as a - // result of switching to mime-score. This is just to help make reviewing - // PR #119 easier, and can be removed once that PR is approved. - const legacyType = _preferredTypeLegacy( - extension, - types[extension], - type - ) - if (legacyType !== types[extension]) { - exports._extensionConflicts.push([extension, legacyType, types[extension]]) - } - } - }) -} - -// Resolve type conflict using mime-score -function _preferredType (ext, type0, type1) { - var score0 = type0 ? mimeScore(type0, db[type0].source) : 0 - var score1 = type1 ? mimeScore(type1, db[type1].source) : 0 - - return score0 > score1 ? type0 : type1 -} - -// Resolve type conflict using pre-mime-score logic -function _preferredTypeLegacy (ext, type0, type1) { - var SOURCE_RANK = ['nginx', 'apache', undefined, 'iana'] - - var score0 = type0 ? SOURCE_RANK.indexOf(db[type0].source) : 0 - var score1 = type1 ? SOURCE_RANK.indexOf(db[type1].source) : 0 - - if ( - exports.types[extension] !== 'application/octet-stream' && - (score0 > score1 || - (score0 === score1 && - exports.types[extension]?.slice(0, 12) === 'application/')) - ) { - return type0 - } - - return score0 > score1 ? type0 : type1 -} diff --git a/node_modules/@nestjs/platform-express/node_modules/mime-types/mimeScore.js b/node_modules/@nestjs/platform-express/node_modules/mime-types/mimeScore.js deleted file mode 100644 index fc2e665..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/mime-types/mimeScore.js +++ /dev/null @@ -1,57 +0,0 @@ -// 'mime-score' back-ported to CommonJS - -// Score RFC facets (see https://tools.ietf.org/html/rfc6838#section-3) -var FACET_SCORES = { - 'prs.': 100, - 'x-': 200, - 'x.': 300, - 'vnd.': 400, - default: 900 -} - -// Score mime source (Logic originally from `jshttp/mime-types` module) -var SOURCE_SCORES = { - nginx: 10, - apache: 20, - iana: 40, - default: 30 // definitions added by `jshttp/mime-db` project? -} - -var TYPE_SCORES = { - // prefer application/xml over text/xml - // prefer application/rtf over text/rtf - application: 1, - - // prefer font/woff over application/font-woff - font: 2, - - // prefer video/mp4 over audio/mp4 over application/mp4 - // See https://www.rfc-editor.org/rfc/rfc4337.html#section-2 - audio: 2, - video: 3, - - default: 0 -} - -/** - * Get each component of the score for a mime type. The sum of these is the - * total score. The higher the score, the more "official" the type. - */ -module.exports = function mimeScore (mimeType, source = 'default') { - if (mimeType === 'application/octet-stream') { - return 0 - } - - const [type, subtype] = mimeType.split('/') - - const facet = subtype.replace(/(\.|x-).*/, '$1') - - const facetScore = FACET_SCORES[facet] || FACET_SCORES.default - const sourceScore = SOURCE_SCORES[source] || SOURCE_SCORES.default - const typeScore = TYPE_SCORES[type] || TYPE_SCORES.default - - // All else being equal prefer shorter types - const lengthScore = 1 - mimeType.length / 100 - - return facetScore + sourceScore + typeScore + lengthScore -} diff --git a/node_modules/@nestjs/platform-express/node_modules/mime-types/package.json b/node_modules/@nestjs/platform-express/node_modules/mime-types/package.json deleted file mode 100644 index 6c58c27..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/mime-types/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "mime-types", - "description": "The ultimate javascript content-type utility.", - "version": "3.0.2", - "contributors": [ - "Douglas Christopher Wilson ", - "Jeremiah Senkpiel (https://searchbeam.jit.su)", - "Jonathan Ong (http://jongleberry.com)" - ], - "license": "MIT", - "keywords": [ - "mime", - "types" - ], - "repository": "jshttp/mime-types", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - }, - "dependencies": { - "mime-db": "^1.54.0" - }, - "devDependencies": { - "eslint": "8.33.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.32.0", - "eslint-plugin-markdown": "3.0.1", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "6.6.0", - "eslint-plugin-standard": "4.1.0", - "mocha": "10.8.2", - "nyc": "15.1.0" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "index.js", - "mimeScore.js" - ], - "engines": { - "node": ">=18" - }, - "scripts": { - "lint": "eslint .", - "test": "mocha --reporter spec test/test.js", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test" - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/negotiator/HISTORY.md b/node_modules/@nestjs/platform-express/node_modules/negotiator/HISTORY.md deleted file mode 100644 index 63d537d..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/negotiator/HISTORY.md +++ /dev/null @@ -1,114 +0,0 @@ -1.0.0 / 2024-08-31 -================== - - * Drop support for node <18 - * Added an option preferred encodings array #59 - -0.6.3 / 2022-01-22 -================== - - * Revert "Lazy-load modules from main entry point" - -0.6.2 / 2019-04-29 -================== - - * Fix sorting charset, encoding, and language with extra parameters - -0.6.1 / 2016-05-02 -================== - - * perf: improve `Accept` parsing speed - * perf: improve `Accept-Charset` parsing speed - * perf: improve `Accept-Encoding` parsing speed - * perf: improve `Accept-Language` parsing speed - -0.6.0 / 2015-09-29 -================== - - * Fix including type extensions in parameters in `Accept` parsing - * Fix parsing `Accept` parameters with quoted equals - * Fix parsing `Accept` parameters with quoted semicolons - * Lazy-load modules from main entry point - * perf: delay type concatenation until needed - * perf: enable strict mode - * perf: hoist regular expressions - * perf: remove closures getting spec properties - * perf: remove a closure from media type parsing - * perf: remove property delete from media type parsing - -0.5.3 / 2015-05-10 -================== - - * Fix media type parameter matching to be case-insensitive - -0.5.2 / 2015-05-06 -================== - - * Fix comparing media types with quoted values - * Fix splitting media types with quoted commas - -0.5.1 / 2015-02-14 -================== - - * Fix preference sorting to be stable for long acceptable lists - -0.5.0 / 2014-12-18 -================== - - * Fix list return order when large accepted list - * Fix missing identity encoding when q=0 exists - * Remove dynamic building of Negotiator class - -0.4.9 / 2014-10-14 -================== - - * Fix error when media type has invalid parameter - -0.4.8 / 2014-09-28 -================== - - * Fix all negotiations to be case-insensitive - * Stable sort preferences of same quality according to client order - * Support Node.js 0.6 - -0.4.7 / 2014-06-24 -================== - - * Handle invalid provided languages - * Handle invalid provided media types - -0.4.6 / 2014-06-11 -================== - - * Order by specificity when quality is the same - -0.4.5 / 2014-05-29 -================== - - * Fix regression in empty header handling - -0.4.4 / 2014-05-29 -================== - - * Fix behaviors when headers are not present - -0.4.3 / 2014-04-16 -================== - - * Handle slashes on media params correctly - -0.4.2 / 2014-02-28 -================== - - * Fix media type sorting - * Handle media types params strictly - -0.4.1 / 2014-01-16 -================== - - * Use most specific matches - -0.4.0 / 2014-01-09 -================== - - * Remove preferred prefix from methods diff --git a/node_modules/@nestjs/platform-express/node_modules/negotiator/LICENSE b/node_modules/@nestjs/platform-express/node_modules/negotiator/LICENSE deleted file mode 100644 index ea6b9e2..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/negotiator/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2012-2014 Federico Romero -Copyright (c) 2012-2014 Isaac Z. Schlueter -Copyright (c) 2014-2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@nestjs/platform-express/node_modules/negotiator/README.md b/node_modules/@nestjs/platform-express/node_modules/negotiator/README.md deleted file mode 100644 index 6fb7f2d..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/negotiator/README.md +++ /dev/null @@ -1,212 +0,0 @@ -# negotiator - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][github-actions-ci-image]][github-actions-ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -An HTTP content negotiator for Node.js - -## Installation - -```sh -$ npm install negotiator -``` - -## API - -```js -var Negotiator = require('negotiator') -``` - -### Accept Negotiation - -```js -availableMediaTypes = ['text/html', 'text/plain', 'application/json'] - -// The negotiator constructor receives a request object -negotiator = new Negotiator(request) - -// Let's say Accept header is 'text/html, application/*;q=0.2, image/jpeg;q=0.8' - -negotiator.mediaTypes() -// -> ['text/html', 'image/jpeg', 'application/*'] - -negotiator.mediaTypes(availableMediaTypes) -// -> ['text/html', 'application/json'] - -negotiator.mediaType(availableMediaTypes) -// -> 'text/html' -``` - -You can check a working example at `examples/accept.js`. - -#### Methods - -##### mediaType() - -Returns the most preferred media type from the client. - -##### mediaType(availableMediaType) - -Returns the most preferred media type from a list of available media types. - -##### mediaTypes() - -Returns an array of preferred media types ordered by the client preference. - -##### mediaTypes(availableMediaTypes) - -Returns an array of preferred media types ordered by priority from a list of -available media types. - -### Accept-Language Negotiation - -```js -negotiator = new Negotiator(request) - -availableLanguages = ['en', 'es', 'fr'] - -// Let's say Accept-Language header is 'en;q=0.8, es, pt' - -negotiator.languages() -// -> ['es', 'pt', 'en'] - -negotiator.languages(availableLanguages) -// -> ['es', 'en'] - -language = negotiator.language(availableLanguages) -// -> 'es' -``` - -You can check a working example at `examples/language.js`. - -#### Methods - -##### language() - -Returns the most preferred language from the client. - -##### language(availableLanguages) - -Returns the most preferred language from a list of available languages. - -##### languages() - -Returns an array of preferred languages ordered by the client preference. - -##### languages(availableLanguages) - -Returns an array of preferred languages ordered by priority from a list of -available languages. - -### Accept-Charset Negotiation - -```js -availableCharsets = ['utf-8', 'iso-8859-1', 'iso-8859-5'] - -negotiator = new Negotiator(request) - -// Let's say Accept-Charset header is 'utf-8, iso-8859-1;q=0.8, utf-7;q=0.2' - -negotiator.charsets() -// -> ['utf-8', 'iso-8859-1', 'utf-7'] - -negotiator.charsets(availableCharsets) -// -> ['utf-8', 'iso-8859-1'] - -negotiator.charset(availableCharsets) -// -> 'utf-8' -``` - -You can check a working example at `examples/charset.js`. - -#### Methods - -##### charset() - -Returns the most preferred charset from the client. - -##### charset(availableCharsets) - -Returns the most preferred charset from a list of available charsets. - -##### charsets() - -Returns an array of preferred charsets ordered by the client preference. - -##### charsets(availableCharsets) - -Returns an array of preferred charsets ordered by priority from a list of -available charsets. - -### Accept-Encoding Negotiation - -```js -availableEncodings = ['identity', 'gzip'] - -negotiator = new Negotiator(request) - -// Let's say Accept-Encoding header is 'gzip, compress;q=0.2, identity;q=0.5' - -negotiator.encodings() -// -> ['gzip', 'identity', 'compress'] - -negotiator.encodings(availableEncodings) -// -> ['gzip', 'identity'] - -negotiator.encoding(availableEncodings) -// -> 'gzip' -``` - -You can check a working example at `examples/encoding.js`. - -#### Methods - -##### encoding() - -Returns the most preferred encoding from the client. - -##### encoding(availableEncodings) - -Returns the most preferred encoding from a list of available encodings. - -##### encoding(availableEncodings, { preferred }) - -Returns the most preferred encoding from a list of available encodings, while prioritizing based on `preferred` array between same-quality encodings. - -##### encodings() - -Returns an array of preferred encodings ordered by the client preference. - -##### encodings(availableEncodings) - -Returns an array of preferred encodings ordered by priority from a list of -available encodings. - -##### encodings(availableEncodings, { preferred }) - -Returns an array of preferred encodings ordered by priority from a list of -available encodings, while prioritizing based on `preferred` array between same-quality encodings. - -## See Also - -The [accepts](https://npmjs.org/package/accepts#readme) module builds on -this module and provides an alternative interface, mime type validation, -and more. - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/negotiator.svg -[npm-url]: https://npmjs.org/package/negotiator -[node-version-image]: https://img.shields.io/node/v/negotiator.svg -[node-version-url]: https://nodejs.org/en/download/ -[coveralls-image]: https://img.shields.io/coveralls/jshttp/negotiator/master.svg -[coveralls-url]: https://coveralls.io/r/jshttp/negotiator?branch=master -[downloads-image]: https://img.shields.io/npm/dm/negotiator.svg -[downloads-url]: https://npmjs.org/package/negotiator -[github-actions-ci-image]: https://img.shields.io/github/workflow/status/jshttp/negotiator/ci/master?label=ci -[github-actions-ci-url]: https://github.com/jshttp/negotiator/actions/workflows/ci.yml diff --git a/node_modules/@nestjs/platform-express/node_modules/negotiator/index.js b/node_modules/@nestjs/platform-express/node_modules/negotiator/index.js deleted file mode 100644 index 4f51315..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/negotiator/index.js +++ /dev/null @@ -1,83 +0,0 @@ -/*! - * negotiator - * Copyright(c) 2012 Federico Romero - * Copyright(c) 2012-2014 Isaac Z. Schlueter - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -var preferredCharsets = require('./lib/charset') -var preferredEncodings = require('./lib/encoding') -var preferredLanguages = require('./lib/language') -var preferredMediaTypes = require('./lib/mediaType') - -/** - * Module exports. - * @public - */ - -module.exports = Negotiator; -module.exports.Negotiator = Negotiator; - -/** - * Create a Negotiator instance from a request. - * @param {object} request - * @public - */ - -function Negotiator(request) { - if (!(this instanceof Negotiator)) { - return new Negotiator(request); - } - - this.request = request; -} - -Negotiator.prototype.charset = function charset(available) { - var set = this.charsets(available); - return set && set[0]; -}; - -Negotiator.prototype.charsets = function charsets(available) { - return preferredCharsets(this.request.headers['accept-charset'], available); -}; - -Negotiator.prototype.encoding = function encoding(available, opts) { - var set = this.encodings(available, opts); - return set && set[0]; -}; - -Negotiator.prototype.encodings = function encodings(available, options) { - var opts = options || {}; - return preferredEncodings(this.request.headers['accept-encoding'], available, opts.preferred); -}; - -Negotiator.prototype.language = function language(available) { - var set = this.languages(available); - return set && set[0]; -}; - -Negotiator.prototype.languages = function languages(available) { - return preferredLanguages(this.request.headers['accept-language'], available); -}; - -Negotiator.prototype.mediaType = function mediaType(available) { - var set = this.mediaTypes(available); - return set && set[0]; -}; - -Negotiator.prototype.mediaTypes = function mediaTypes(available) { - return preferredMediaTypes(this.request.headers.accept, available); -}; - -// Backwards compatibility -Negotiator.prototype.preferredCharset = Negotiator.prototype.charset; -Negotiator.prototype.preferredCharsets = Negotiator.prototype.charsets; -Negotiator.prototype.preferredEncoding = Negotiator.prototype.encoding; -Negotiator.prototype.preferredEncodings = Negotiator.prototype.encodings; -Negotiator.prototype.preferredLanguage = Negotiator.prototype.language; -Negotiator.prototype.preferredLanguages = Negotiator.prototype.languages; -Negotiator.prototype.preferredMediaType = Negotiator.prototype.mediaType; -Negotiator.prototype.preferredMediaTypes = Negotiator.prototype.mediaTypes; diff --git a/node_modules/@nestjs/platform-express/node_modules/negotiator/lib/charset.js b/node_modules/@nestjs/platform-express/node_modules/negotiator/lib/charset.js deleted file mode 100644 index cdd0148..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/negotiator/lib/charset.js +++ /dev/null @@ -1,169 +0,0 @@ -/** - * negotiator - * Copyright(c) 2012 Isaac Z. Schlueter - * Copyright(c) 2014 Federico Romero - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module exports. - * @public - */ - -module.exports = preferredCharsets; -module.exports.preferredCharsets = preferredCharsets; - -/** - * Module variables. - * @private - */ - -var simpleCharsetRegExp = /^\s*([^\s;]+)\s*(?:;(.*))?$/; - -/** - * Parse the Accept-Charset header. - * @private - */ - -function parseAcceptCharset(accept) { - var accepts = accept.split(','); - - for (var i = 0, j = 0; i < accepts.length; i++) { - var charset = parseCharset(accepts[i].trim(), i); - - if (charset) { - accepts[j++] = charset; - } - } - - // trim accepts - accepts.length = j; - - return accepts; -} - -/** - * Parse a charset from the Accept-Charset header. - * @private - */ - -function parseCharset(str, i) { - var match = simpleCharsetRegExp.exec(str); - if (!match) return null; - - var charset = match[1]; - var q = 1; - if (match[2]) { - var params = match[2].split(';') - for (var j = 0; j < params.length; j++) { - var p = params[j].trim().split('='); - if (p[0] === 'q') { - q = parseFloat(p[1]); - break; - } - } - } - - return { - charset: charset, - q: q, - i: i - }; -} - -/** - * Get the priority of a charset. - * @private - */ - -function getCharsetPriority(charset, accepted, index) { - var priority = {o: -1, q: 0, s: 0}; - - for (var i = 0; i < accepted.length; i++) { - var spec = specify(charset, accepted[i], index); - - if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { - priority = spec; - } - } - - return priority; -} - -/** - * Get the specificity of the charset. - * @private - */ - -function specify(charset, spec, index) { - var s = 0; - if(spec.charset.toLowerCase() === charset.toLowerCase()){ - s |= 1; - } else if (spec.charset !== '*' ) { - return null - } - - return { - i: index, - o: spec.i, - q: spec.q, - s: s - } -} - -/** - * Get the preferred charsets from an Accept-Charset header. - * @public - */ - -function preferredCharsets(accept, provided) { - // RFC 2616 sec 14.2: no header = * - var accepts = parseAcceptCharset(accept === undefined ? '*' : accept || ''); - - if (!provided) { - // sorted list of all charsets - return accepts - .filter(isQuality) - .sort(compareSpecs) - .map(getFullCharset); - } - - var priorities = provided.map(function getPriority(type, index) { - return getCharsetPriority(type, accepts, index); - }); - - // sorted list of accepted charsets - return priorities.filter(isQuality).sort(compareSpecs).map(function getCharset(priority) { - return provided[priorities.indexOf(priority)]; - }); -} - -/** - * Compare two specs. - * @private - */ - -function compareSpecs(a, b) { - return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0; -} - -/** - * Get full charset string. - * @private - */ - -function getFullCharset(spec) { - return spec.charset; -} - -/** - * Check if a spec has any quality. - * @private - */ - -function isQuality(spec) { - return spec.q > 0; -} diff --git a/node_modules/@nestjs/platform-express/node_modules/negotiator/lib/encoding.js b/node_modules/@nestjs/platform-express/node_modules/negotiator/lib/encoding.js deleted file mode 100644 index 9ebb633..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/negotiator/lib/encoding.js +++ /dev/null @@ -1,205 +0,0 @@ -/** - * negotiator - * Copyright(c) 2012 Isaac Z. Schlueter - * Copyright(c) 2014 Federico Romero - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module exports. - * @public - */ - -module.exports = preferredEncodings; -module.exports.preferredEncodings = preferredEncodings; - -/** - * Module variables. - * @private - */ - -var simpleEncodingRegExp = /^\s*([^\s;]+)\s*(?:;(.*))?$/; - -/** - * Parse the Accept-Encoding header. - * @private - */ - -function parseAcceptEncoding(accept) { - var accepts = accept.split(','); - var hasIdentity = false; - var minQuality = 1; - - for (var i = 0, j = 0; i < accepts.length; i++) { - var encoding = parseEncoding(accepts[i].trim(), i); - - if (encoding) { - accepts[j++] = encoding; - hasIdentity = hasIdentity || specify('identity', encoding); - minQuality = Math.min(minQuality, encoding.q || 1); - } - } - - if (!hasIdentity) { - /* - * If identity doesn't explicitly appear in the accept-encoding header, - * it's added to the list of acceptable encoding with the lowest q - */ - accepts[j++] = { - encoding: 'identity', - q: minQuality, - i: i - }; - } - - // trim accepts - accepts.length = j; - - return accepts; -} - -/** - * Parse an encoding from the Accept-Encoding header. - * @private - */ - -function parseEncoding(str, i) { - var match = simpleEncodingRegExp.exec(str); - if (!match) return null; - - var encoding = match[1]; - var q = 1; - if (match[2]) { - var params = match[2].split(';'); - for (var j = 0; j < params.length; j++) { - var p = params[j].trim().split('='); - if (p[0] === 'q') { - q = parseFloat(p[1]); - break; - } - } - } - - return { - encoding: encoding, - q: q, - i: i - }; -} - -/** - * Get the priority of an encoding. - * @private - */ - -function getEncodingPriority(encoding, accepted, index) { - var priority = {encoding: encoding, o: -1, q: 0, s: 0}; - - for (var i = 0; i < accepted.length; i++) { - var spec = specify(encoding, accepted[i], index); - - if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { - priority = spec; - } - } - - return priority; -} - -/** - * Get the specificity of the encoding. - * @private - */ - -function specify(encoding, spec, index) { - var s = 0; - if(spec.encoding.toLowerCase() === encoding.toLowerCase()){ - s |= 1; - } else if (spec.encoding !== '*' ) { - return null - } - - return { - encoding: encoding, - i: index, - o: spec.i, - q: spec.q, - s: s - } -}; - -/** - * Get the preferred encodings from an Accept-Encoding header. - * @public - */ - -function preferredEncodings(accept, provided, preferred) { - var accepts = parseAcceptEncoding(accept || ''); - - var comparator = preferred ? function comparator (a, b) { - if (a.q !== b.q) { - return b.q - a.q // higher quality first - } - - var aPreferred = preferred.indexOf(a.encoding) - var bPreferred = preferred.indexOf(b.encoding) - - if (aPreferred === -1 && bPreferred === -1) { - // consider the original specifity/order - return (b.s - a.s) || (a.o - b.o) || (a.i - b.i) - } - - if (aPreferred !== -1 && bPreferred !== -1) { - return aPreferred - bPreferred // consider the preferred order - } - - return aPreferred === -1 ? 1 : -1 // preferred first - } : compareSpecs; - - if (!provided) { - // sorted list of all encodings - return accepts - .filter(isQuality) - .sort(comparator) - .map(getFullEncoding); - } - - var priorities = provided.map(function getPriority(type, index) { - return getEncodingPriority(type, accepts, index); - }); - - // sorted list of accepted encodings - return priorities.filter(isQuality).sort(comparator).map(function getEncoding(priority) { - return provided[priorities.indexOf(priority)]; - }); -} - -/** - * Compare two specs. - * @private - */ - -function compareSpecs(a, b) { - return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i); -} - -/** - * Get full encoding string. - * @private - */ - -function getFullEncoding(spec) { - return spec.encoding; -} - -/** - * Check if a spec has any quality. - * @private - */ - -function isQuality(spec) { - return spec.q > 0; -} diff --git a/node_modules/@nestjs/platform-express/node_modules/negotiator/lib/language.js b/node_modules/@nestjs/platform-express/node_modules/negotiator/lib/language.js deleted file mode 100644 index a231672..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/negotiator/lib/language.js +++ /dev/null @@ -1,179 +0,0 @@ -/** - * negotiator - * Copyright(c) 2012 Isaac Z. Schlueter - * Copyright(c) 2014 Federico Romero - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module exports. - * @public - */ - -module.exports = preferredLanguages; -module.exports.preferredLanguages = preferredLanguages; - -/** - * Module variables. - * @private - */ - -var simpleLanguageRegExp = /^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/; - -/** - * Parse the Accept-Language header. - * @private - */ - -function parseAcceptLanguage(accept) { - var accepts = accept.split(','); - - for (var i = 0, j = 0; i < accepts.length; i++) { - var language = parseLanguage(accepts[i].trim(), i); - - if (language) { - accepts[j++] = language; - } - } - - // trim accepts - accepts.length = j; - - return accepts; -} - -/** - * Parse a language from the Accept-Language header. - * @private - */ - -function parseLanguage(str, i) { - var match = simpleLanguageRegExp.exec(str); - if (!match) return null; - - var prefix = match[1] - var suffix = match[2] - var full = prefix - - if (suffix) full += "-" + suffix; - - var q = 1; - if (match[3]) { - var params = match[3].split(';') - for (var j = 0; j < params.length; j++) { - var p = params[j].split('='); - if (p[0] === 'q') q = parseFloat(p[1]); - } - } - - return { - prefix: prefix, - suffix: suffix, - q: q, - i: i, - full: full - }; -} - -/** - * Get the priority of a language. - * @private - */ - -function getLanguagePriority(language, accepted, index) { - var priority = {o: -1, q: 0, s: 0}; - - for (var i = 0; i < accepted.length; i++) { - var spec = specify(language, accepted[i], index); - - if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { - priority = spec; - } - } - - return priority; -} - -/** - * Get the specificity of the language. - * @private - */ - -function specify(language, spec, index) { - var p = parseLanguage(language) - if (!p) return null; - var s = 0; - if(spec.full.toLowerCase() === p.full.toLowerCase()){ - s |= 4; - } else if (spec.prefix.toLowerCase() === p.full.toLowerCase()) { - s |= 2; - } else if (spec.full.toLowerCase() === p.prefix.toLowerCase()) { - s |= 1; - } else if (spec.full !== '*' ) { - return null - } - - return { - i: index, - o: spec.i, - q: spec.q, - s: s - } -}; - -/** - * Get the preferred languages from an Accept-Language header. - * @public - */ - -function preferredLanguages(accept, provided) { - // RFC 2616 sec 14.4: no header = * - var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || ''); - - if (!provided) { - // sorted list of all languages - return accepts - .filter(isQuality) - .sort(compareSpecs) - .map(getFullLanguage); - } - - var priorities = provided.map(function getPriority(type, index) { - return getLanguagePriority(type, accepts, index); - }); - - // sorted list of accepted languages - return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) { - return provided[priorities.indexOf(priority)]; - }); -} - -/** - * Compare two specs. - * @private - */ - -function compareSpecs(a, b) { - return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0; -} - -/** - * Get full language string. - * @private - */ - -function getFullLanguage(spec) { - return spec.full; -} - -/** - * Check if a spec has any quality. - * @private - */ - -function isQuality(spec) { - return spec.q > 0; -} diff --git a/node_modules/@nestjs/platform-express/node_modules/negotiator/lib/mediaType.js b/node_modules/@nestjs/platform-express/node_modules/negotiator/lib/mediaType.js deleted file mode 100644 index 8e402ea..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/negotiator/lib/mediaType.js +++ /dev/null @@ -1,294 +0,0 @@ -/** - * negotiator - * Copyright(c) 2012 Isaac Z. Schlueter - * Copyright(c) 2014 Federico Romero - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module exports. - * @public - */ - -module.exports = preferredMediaTypes; -module.exports.preferredMediaTypes = preferredMediaTypes; - -/** - * Module variables. - * @private - */ - -var simpleMediaTypeRegExp = /^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/; - -/** - * Parse the Accept header. - * @private - */ - -function parseAccept(accept) { - var accepts = splitMediaTypes(accept); - - for (var i = 0, j = 0; i < accepts.length; i++) { - var mediaType = parseMediaType(accepts[i].trim(), i); - - if (mediaType) { - accepts[j++] = mediaType; - } - } - - // trim accepts - accepts.length = j; - - return accepts; -} - -/** - * Parse a media type from the Accept header. - * @private - */ - -function parseMediaType(str, i) { - var match = simpleMediaTypeRegExp.exec(str); - if (!match) return null; - - var params = Object.create(null); - var q = 1; - var subtype = match[2]; - var type = match[1]; - - if (match[3]) { - var kvps = splitParameters(match[3]).map(splitKeyValuePair); - - for (var j = 0; j < kvps.length; j++) { - var pair = kvps[j]; - var key = pair[0].toLowerCase(); - var val = pair[1]; - - // get the value, unwrapping quotes - var value = val && val[0] === '"' && val[val.length - 1] === '"' - ? val.slice(1, -1) - : val; - - if (key === 'q') { - q = parseFloat(value); - break; - } - - // store parameter - params[key] = value; - } - } - - return { - type: type, - subtype: subtype, - params: params, - q: q, - i: i - }; -} - -/** - * Get the priority of a media type. - * @private - */ - -function getMediaTypePriority(type, accepted, index) { - var priority = {o: -1, q: 0, s: 0}; - - for (var i = 0; i < accepted.length; i++) { - var spec = specify(type, accepted[i], index); - - if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { - priority = spec; - } - } - - return priority; -} - -/** - * Get the specificity of the media type. - * @private - */ - -function specify(type, spec, index) { - var p = parseMediaType(type); - var s = 0; - - if (!p) { - return null; - } - - if(spec.type.toLowerCase() == p.type.toLowerCase()) { - s |= 4 - } else if(spec.type != '*') { - return null; - } - - if(spec.subtype.toLowerCase() == p.subtype.toLowerCase()) { - s |= 2 - } else if(spec.subtype != '*') { - return null; - } - - var keys = Object.keys(spec.params); - if (keys.length > 0) { - if (keys.every(function (k) { - return spec.params[k] == '*' || (spec.params[k] || '').toLowerCase() == (p.params[k] || '').toLowerCase(); - })) { - s |= 1 - } else { - return null - } - } - - return { - i: index, - o: spec.i, - q: spec.q, - s: s, - } -} - -/** - * Get the preferred media types from an Accept header. - * @public - */ - -function preferredMediaTypes(accept, provided) { - // RFC 2616 sec 14.2: no header = */* - var accepts = parseAccept(accept === undefined ? '*/*' : accept || ''); - - if (!provided) { - // sorted list of all types - return accepts - .filter(isQuality) - .sort(compareSpecs) - .map(getFullType); - } - - var priorities = provided.map(function getPriority(type, index) { - return getMediaTypePriority(type, accepts, index); - }); - - // sorted list of accepted types - return priorities.filter(isQuality).sort(compareSpecs).map(function getType(priority) { - return provided[priorities.indexOf(priority)]; - }); -} - -/** - * Compare two specs. - * @private - */ - -function compareSpecs(a, b) { - return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0; -} - -/** - * Get full type string. - * @private - */ - -function getFullType(spec) { - return spec.type + '/' + spec.subtype; -} - -/** - * Check if a spec has any quality. - * @private - */ - -function isQuality(spec) { - return spec.q > 0; -} - -/** - * Count the number of quotes in a string. - * @private - */ - -function quoteCount(string) { - var count = 0; - var index = 0; - - while ((index = string.indexOf('"', index)) !== -1) { - count++; - index++; - } - - return count; -} - -/** - * Split a key value pair. - * @private - */ - -function splitKeyValuePair(str) { - var index = str.indexOf('='); - var key; - var val; - - if (index === -1) { - key = str; - } else { - key = str.slice(0, index); - val = str.slice(index + 1); - } - - return [key, val]; -} - -/** - * Split an Accept header into media types. - * @private - */ - -function splitMediaTypes(accept) { - var accepts = accept.split(','); - - for (var i = 1, j = 0; i < accepts.length; i++) { - if (quoteCount(accepts[j]) % 2 == 0) { - accepts[++j] = accepts[i]; - } else { - accepts[j] += ',' + accepts[i]; - } - } - - // trim accepts - accepts.length = j + 1; - - return accepts; -} - -/** - * Split a string of parameters. - * @private - */ - -function splitParameters(str) { - var parameters = str.split(';'); - - for (var i = 1, j = 0; i < parameters.length; i++) { - if (quoteCount(parameters[j]) % 2 == 0) { - parameters[++j] = parameters[i]; - } else { - parameters[j] += ';' + parameters[i]; - } - } - - // trim parameters - parameters.length = j + 1; - - for (var i = 0; i < parameters.length; i++) { - parameters[i] = parameters[i].trim(); - } - - return parameters; -} diff --git a/node_modules/@nestjs/platform-express/node_modules/negotiator/package.json b/node_modules/@nestjs/platform-express/node_modules/negotiator/package.json deleted file mode 100644 index e4bdc1e..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/negotiator/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "negotiator", - "description": "HTTP content negotiation", - "version": "1.0.0", - "contributors": [ - "Douglas Christopher Wilson ", - "Federico Romero ", - "Isaac Z. Schlueter (http://blog.izs.me/)" - ], - "license": "MIT", - "keywords": [ - "http", - "content negotiation", - "accept", - "accept-language", - "accept-encoding", - "accept-charset" - ], - "repository": "jshttp/negotiator", - "devDependencies": { - "eslint": "7.32.0", - "eslint-plugin-markdown": "2.2.1", - "mocha": "9.1.3", - "nyc": "15.1.0" - }, - "files": [ - "lib/", - "HISTORY.md", - "LICENSE", - "index.js", - "README.md" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "lint": "eslint .", - "test": "mocha --reporter spec --check-leaks --bail test/", - "test:debug": "mocha --reporter spec --check-leaks --inspect --inspect-brk test/", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test" - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/raw-body/LICENSE b/node_modules/@nestjs/platform-express/node_modules/raw-body/LICENSE deleted file mode 100644 index 1029a7a..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/raw-body/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013-2014 Jonathan Ong -Copyright (c) 2014-2022 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/@nestjs/platform-express/node_modules/raw-body/README.md b/node_modules/@nestjs/platform-express/node_modules/raw-body/README.md deleted file mode 100644 index d9b36d6..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/raw-body/README.md +++ /dev/null @@ -1,223 +0,0 @@ -# raw-body - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build status][github-actions-ci-image]][github-actions-ci-url] -[![Test coverage][coveralls-image]][coveralls-url] - -Gets the entire buffer of a stream either as a `Buffer` or a string. -Validates the stream's length against an expected length and maximum limit. -Ideal for parsing request bodies. - -## Install - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install raw-body -``` - -### TypeScript - -This module includes a [TypeScript](https://www.typescriptlang.org/) -declaration file to enable auto complete in compatible editors and type -information for TypeScript projects. This module depends on the Node.js -types, so install `@types/node`: - -```sh -$ npm install @types/node -``` - -## API - -```js -var getRawBody = require('raw-body') -``` - -### getRawBody(stream, [options], [callback]) - -**Returns a promise if no callback specified and global `Promise` exists.** - -Options: - -- `length` - The length of the stream. - If the contents of the stream do not add up to this length, - an `400` error code is returned. -- `limit` - The byte limit of the body. - This is the number of bytes or any string format supported by - [bytes](https://www.npmjs.com/package/bytes), - for example `1000`, `'500kb'` or `'3mb'`. - If the body ends up being larger than this limit, - a `413` error code is returned. -- `encoding` - The encoding to use to decode the body into a string. - By default, a `Buffer` instance will be returned when no encoding is specified. - Most likely, you want `utf-8`, so setting `encoding` to `true` will decode as `utf-8`. - You can use any type of encoding supported by [iconv-lite](https://www.npmjs.org/package/iconv-lite#readme). - -You can also pass a string in place of options to just specify the encoding. - -If an error occurs, the stream will be paused, everything unpiped, -and you are responsible for correctly disposing the stream. -For HTTP requests, you may need to finish consuming the stream if -you want to keep the socket open for future requests. For streams -that use file descriptors, you should `stream.destroy()` or -`stream.close()` to prevent leaks. - -## Errors - -This module creates errors depending on the error condition during reading. -The error may be an error from the underlying Node.js implementation, but is -otherwise an error created by this module, which has the following attributes: - - * `limit` - the limit in bytes - * `length` and `expected` - the expected length of the stream - * `received` - the received bytes - * `encoding` - the invalid encoding - * `status` and `statusCode` - the corresponding status code for the error - * `type` - the error type - -### Types - -The errors from this module have a `type` property which allows for the programmatic -determination of the type of error returned. - -#### encoding.unsupported - -This error will occur when the `encoding` option is specified, but the value does -not map to an encoding supported by the [iconv-lite](https://www.npmjs.org/package/iconv-lite#readme) -module. - -#### entity.too.large - -This error will occur when the `limit` option is specified, but the stream has -an entity that is larger. - -#### request.aborted - -This error will occur when the request stream is aborted by the client before -reading the body has finished. - -#### request.size.invalid - -This error will occur when the `length` option is specified, but the stream has -emitted more bytes. - -#### stream.encoding.set - -This error will occur when the given stream has an encoding set on it, making it -a decoded stream. The stream should not have an encoding set and is expected to -emit `Buffer` objects. - -#### stream.not.readable - -This error will occur when the given stream is not readable. - -## Examples - -### Simple Express example - -```js -var contentType = require('content-type') -var express = require('express') -var getRawBody = require('raw-body') - -var app = express() - -app.use(function (req, res, next) { - getRawBody(req, { - length: req.headers['content-length'], - limit: '1mb', - encoding: contentType.parse(req).parameters.charset - }, function (err, string) { - if (err) return next(err) - req.text = string - next() - }) -}) - -// now access req.text -``` - -### Simple Koa example - -```js -var contentType = require('content-type') -var getRawBody = require('raw-body') -var koa = require('koa') - -var app = koa() - -app.use(function * (next) { - this.text = yield getRawBody(this.req, { - length: this.req.headers['content-length'], - limit: '1mb', - encoding: contentType.parse(this.req).parameters.charset - }) - yield next -}) - -// now access this.text -``` - -### Using as a promise - -To use this library as a promise, simply omit the `callback` and a promise is -returned, provided that a global `Promise` is defined. - -```js -var getRawBody = require('raw-body') -var http = require('http') - -var server = http.createServer(function (req, res) { - getRawBody(req) - .then(function (buf) { - res.statusCode = 200 - res.end(buf.length + ' bytes submitted') - }) - .catch(function (err) { - res.statusCode = 500 - res.end(err.message) - }) -}) - -server.listen(3000) -``` - -### Using with TypeScript - -```ts -import * as getRawBody from 'raw-body'; -import * as http from 'http'; - -const server = http.createServer((req, res) => { - getRawBody(req) - .then((buf) => { - res.statusCode = 200; - res.end(buf.length + ' bytes submitted'); - }) - .catch((err) => { - res.statusCode = err.statusCode; - res.end(err.message); - }); -}); - -server.listen(3000); -``` - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/raw-body.svg -[npm-url]: https://npmjs.org/package/raw-body -[node-version-image]: https://img.shields.io/node/v/raw-body.svg -[node-version-url]: https://nodejs.org/en/download/ -[coveralls-image]: https://img.shields.io/coveralls/stream-utils/raw-body/master.svg -[coveralls-url]: https://coveralls.io/r/stream-utils/raw-body?branch=master -[downloads-image]: https://img.shields.io/npm/dm/raw-body.svg -[downloads-url]: https://npmjs.org/package/raw-body -[github-actions-ci-image]: https://img.shields.io/github/actions/workflow/status/stream-utils/raw-body/ci.yml?branch=master&label=ci -[github-actions-ci-url]: https://github.com/jshttp/stream-utils/raw-body?query=workflow%3Aci diff --git a/node_modules/@nestjs/platform-express/node_modules/raw-body/index.d.ts b/node_modules/@nestjs/platform-express/node_modules/raw-body/index.d.ts deleted file mode 100644 index b504611..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/raw-body/index.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -declare namespace getRawBody { - export type Encoding = string | true; - - export interface Options { - /** - * The expected length of the stream. - */ - length?: number | string | null; - /** - * The byte limit of the body. This is the number of bytes or any string - * format supported by `bytes`, for example `1000`, `'500kb'` or `'3mb'`. - */ - limit?: number | string | null; - /** - * The encoding to use to decode the body into a string. By default, a - * `Buffer` instance will be returned when no encoding is specified. Most - * likely, you want `utf-8`, so setting encoding to `true` will decode as - * `utf-8`. You can use any type of encoding supported by `iconv-lite`. - */ - encoding?: Encoding | null; - } - - export interface RawBodyError extends Error { - /** - * The limit in bytes. - */ - limit?: number; - /** - * The expected length of the stream. - */ - length?: number; - expected?: number; - /** - * The received bytes. - */ - received?: number; - /** - * The encoding. - */ - encoding?: string; - /** - * The corresponding status code for the error. - */ - status: number; - statusCode: number; - /** - * The error type. - */ - type: string; - } -} - -/** - * Gets the entire buffer of a stream either as a `Buffer` or a string. - * Validates the stream's length against an expected length and maximum - * limit. Ideal for parsing request bodies. - */ -declare function getRawBody( - stream: NodeJS.ReadableStream, - callback: (err: getRawBody.RawBodyError, body: Buffer) => void -): void; - -declare function getRawBody( - stream: NodeJS.ReadableStream, - options: (getRawBody.Options & { encoding: getRawBody.Encoding }) | getRawBody.Encoding, - callback: (err: getRawBody.RawBodyError, body: string) => void -): void; - -declare function getRawBody( - stream: NodeJS.ReadableStream, - options: getRawBody.Options, - callback: (err: getRawBody.RawBodyError, body: Buffer) => void -): void; - -declare function getRawBody( - stream: NodeJS.ReadableStream, - options: (getRawBody.Options & { encoding: getRawBody.Encoding }) | getRawBody.Encoding -): Promise; - -declare function getRawBody( - stream: NodeJS.ReadableStream, - options?: getRawBody.Options -): Promise; - -export = getRawBody; diff --git a/node_modules/@nestjs/platform-express/node_modules/raw-body/index.js b/node_modules/@nestjs/platform-express/node_modules/raw-body/index.js deleted file mode 100644 index 9cdcd12..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/raw-body/index.js +++ /dev/null @@ -1,336 +0,0 @@ -/*! - * raw-body - * Copyright(c) 2013-2014 Jonathan Ong - * Copyright(c) 2014-2022 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var asyncHooks = tryRequireAsyncHooks() -var bytes = require('bytes') -var createError = require('http-errors') -var iconv = require('iconv-lite') -var unpipe = require('unpipe') - -/** - * Module exports. - * @public - */ - -module.exports = getRawBody - -/** - * Module variables. - * @private - */ - -var ICONV_ENCODING_MESSAGE_REGEXP = /^Encoding not recognized: / - -/** - * Get the decoder for a given encoding. - * - * @param {string} encoding - * @private - */ - -function getDecoder (encoding) { - if (!encoding) return null - - try { - return iconv.getDecoder(encoding) - } catch (e) { - // error getting decoder - if (!ICONV_ENCODING_MESSAGE_REGEXP.test(e.message)) throw e - - // the encoding was not found - throw createError(415, 'specified encoding unsupported', { - encoding: encoding, - type: 'encoding.unsupported' - }) - } -} - -/** - * Get the raw body of a stream (typically HTTP). - * - * @param {object} stream - * @param {object|string|function} [options] - * @param {function} [callback] - * @public - */ - -function getRawBody (stream, options, callback) { - var done = callback - var opts = options || {} - - // light validation - if (stream === undefined) { - throw new TypeError('argument stream is required') - } else if (typeof stream !== 'object' || stream === null || typeof stream.on !== 'function') { - throw new TypeError('argument stream must be a stream') - } - - if (options === true || typeof options === 'string') { - // short cut for encoding - opts = { - encoding: options - } - } - - if (typeof options === 'function') { - done = options - opts = {} - } - - // validate callback is a function, if provided - if (done !== undefined && typeof done !== 'function') { - throw new TypeError('argument callback must be a function') - } - - // require the callback without promises - if (!done && !global.Promise) { - throw new TypeError('argument callback is required') - } - - // get encoding - var encoding = opts.encoding !== true - ? opts.encoding - : 'utf-8' - - // convert the limit to an integer - var limit = bytes.parse(opts.limit) - - // convert the expected length to an integer - var length = opts.length != null && !isNaN(opts.length) - ? parseInt(opts.length, 10) - : null - - if (done) { - // classic callback style - return readStream(stream, encoding, length, limit, wrap(done)) - } - - return new Promise(function executor (resolve, reject) { - readStream(stream, encoding, length, limit, function onRead (err, buf) { - if (err) return reject(err) - resolve(buf) - }) - }) -} - -/** - * Halt a stream. - * - * @param {Object} stream - * @private - */ - -function halt (stream) { - // unpipe everything from the stream - unpipe(stream) - - // pause stream - if (typeof stream.pause === 'function') { - stream.pause() - } -} - -/** - * Read the data from the stream. - * - * @param {object} stream - * @param {string} encoding - * @param {number} length - * @param {number} limit - * @param {function} callback - * @public - */ - -function readStream (stream, encoding, length, limit, callback) { - var complete = false - var sync = true - - // check the length and limit options. - // note: we intentionally leave the stream paused, - // so users should handle the stream themselves. - if (limit !== null && length !== null && length > limit) { - return done(createError(413, 'request entity too large', { - expected: length, - length: length, - limit: limit, - type: 'entity.too.large' - })) - } - - // streams1: assert request encoding is buffer. - // streams2+: assert the stream encoding is buffer. - // stream._decoder: streams1 - // state.encoding: streams2 - // state.decoder: streams2, specifically < 0.10.6 - var state = stream._readableState - if (stream._decoder || (state && (state.encoding || state.decoder))) { - // developer error - return done(createError(500, 'stream encoding should not be set', { - type: 'stream.encoding.set' - })) - } - - if (typeof stream.readable !== 'undefined' && !stream.readable) { - return done(createError(500, 'stream is not readable', { - type: 'stream.not.readable' - })) - } - - var received = 0 - var decoder - - try { - decoder = getDecoder(encoding) - } catch (err) { - return done(err) - } - - var buffer = decoder - ? '' - : [] - - // attach listeners - stream.on('aborted', onAborted) - stream.on('close', cleanup) - stream.on('data', onData) - stream.on('end', onEnd) - stream.on('error', onEnd) - - // mark sync section complete - sync = false - - function done () { - var args = new Array(arguments.length) - - // copy arguments - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - - // mark complete - complete = true - - if (sync) { - process.nextTick(invokeCallback) - } else { - invokeCallback() - } - - function invokeCallback () { - cleanup() - - if (args[0]) { - // halt the stream on error - halt(stream) - } - - callback.apply(null, args) - } - } - - function onAborted () { - if (complete) return - - done(createError(400, 'request aborted', { - code: 'ECONNABORTED', - expected: length, - length: length, - received: received, - type: 'request.aborted' - })) - } - - function onData (chunk) { - if (complete) return - - received += chunk.length - - if (limit !== null && received > limit) { - done(createError(413, 'request entity too large', { - limit: limit, - received: received, - type: 'entity.too.large' - })) - } else if (decoder) { - buffer += decoder.write(chunk) - } else { - buffer.push(chunk) - } - } - - function onEnd (err) { - if (complete) return - if (err) return done(err) - - if (length !== null && received !== length) { - done(createError(400, 'request size did not match content length', { - expected: length, - length: length, - received: received, - type: 'request.size.invalid' - })) - } else { - var string = decoder - ? buffer + (decoder.end() || '') - : Buffer.concat(buffer) - done(null, string) - } - } - - function cleanup () { - buffer = null - - stream.removeListener('aborted', onAborted) - stream.removeListener('data', onData) - stream.removeListener('end', onEnd) - stream.removeListener('error', onEnd) - stream.removeListener('close', cleanup) - } -} - -/** - * Try to require async_hooks - * @private - */ - -function tryRequireAsyncHooks () { - try { - return require('async_hooks') - } catch (e) { - return {} - } -} - -/** - * Wrap function with async resource, if possible. - * AsyncResource.bind static method backported. - * @private - */ - -function wrap (fn) { - var res - - // create anonymous resource - if (asyncHooks.AsyncResource) { - res = new asyncHooks.AsyncResource(fn.name || 'bound-anonymous-fn') - } - - // incompatible node.js - if (!res || !res.runInAsyncScope) { - return fn - } - - // return bound function - return res.runInAsyncScope.bind(res, fn, null) -} diff --git a/node_modules/@nestjs/platform-express/node_modules/raw-body/package.json b/node_modules/@nestjs/platform-express/node_modules/raw-body/package.json deleted file mode 100644 index eab819f..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/raw-body/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "raw-body", - "description": "Get and validate the raw body of a readable stream.", - "version": "3.0.2", - "author": "Jonathan Ong (http://jongleberry.com)", - "contributors": [ - "Douglas Christopher Wilson ", - "Raynos " - ], - "license": "MIT", - "repository": "stream-utils/raw-body", - "dependencies": { - "bytes": "~3.1.2", - "http-errors": "~2.0.1", - "iconv-lite": "~0.7.0", - "unpipe": "~1.0.0" - }, - "devDependencies": { - "@stylistic/eslint-plugin": "^5.1.0", - "@stylistic/eslint-plugin-js": "^4.1.0", - "bluebird": "3.7.2", - "eslint": "^9.0.0", - "mocha": "10.7.0", - "neostandard": "^0.12.0", - "nyc": "17.0.0", - "readable-stream": "2.3.7", - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.10" - }, - "files": [ - "LICENSE", - "README.md", - "index.d.ts", - "index.js" - ], - "scripts": { - "lint": "eslint", - "lint:fix": "eslint --fix", - "test": "mocha --trace-deprecation --reporter spec --check-leaks test/", - "test:ci": "nyc --reporter=lcovonly --reporter=text npm test", - "test:cov": "nyc --reporter=html --reporter=text npm test", - "version": "node scripts/version-history.js && git add HISTORY.md" - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/send/LICENSE b/node_modules/@nestjs/platform-express/node_modules/send/LICENSE deleted file mode 100644 index b6ea1c1..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/send/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2012 TJ Holowaychuk -Copyright (c) 2014-2022 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@nestjs/platform-express/node_modules/send/README.md b/node_modules/@nestjs/platform-express/node_modules/send/README.md deleted file mode 100644 index 350fccd..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/send/README.md +++ /dev/null @@ -1,317 +0,0 @@ -# send - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![CI][github-actions-ci-image]][github-actions-ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Send is a library for streaming files from the file system as a http response -supporting partial responses (Ranges), conditional-GET negotiation (If-Match, -If-Unmodified-Since, If-None-Match, If-Modified-Since), high test coverage, -and granular events which may be leveraged to take appropriate actions in your -application or framework. - -Looking to serve up entire folders mapped to URLs? Try [serve-static](https://www.npmjs.org/package/serve-static). - -## Installation - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```bash -$ npm install send -``` - -## API - -```js -var send = require('send') -``` - -### send(req, path, [options]) - -Create a new `SendStream` for the given path to send to a `res`. The `req` is -the Node.js HTTP request and the `path` is a urlencoded path to send (urlencoded, -not the actual file-system path). - -#### Options - -##### acceptRanges - -Enable or disable accepting ranged requests, defaults to true. -Disabling this will not send `Accept-Ranges` and ignore the contents -of the `Range` request header. - -##### cacheControl - -Enable or disable setting `Cache-Control` response header, defaults to -true. Disabling this will ignore the `immutable` and `maxAge` options. - -##### dotfiles - -Set how "dotfiles" are treated when encountered. A dotfile is a file -or directory that begins with a dot ("."). Note this check is done on -the path itself without checking if the path actually exists on the -disk. If `root` is specified, only the dotfiles above the root are -checked (i.e. the root itself can be within a dotfile when set -to "deny"). - - - `'allow'` No special treatment for dotfiles. - - `'deny'` Send a 403 for any request for a dotfile. - - `'ignore'` Pretend like the dotfile does not exist and 404. - -The default value is _similar_ to `'ignore'`, with the exception that -this default will not ignore the files within a directory that begins -with a dot, for backward-compatibility. - -##### end - -Byte offset at which the stream ends, defaults to the length of the file -minus 1. The end is inclusive in the stream, meaning `end: 3` will include -the 4th byte in the stream. - -##### etag - -Enable or disable etag generation, defaults to true. - -##### extensions - -If a given file doesn't exist, try appending one of the given extensions, -in the given order. By default, this is disabled (set to `false`). An -example value that will serve extension-less HTML files: `['html', 'htm']`. -This is skipped if the requested file already has an extension. - -##### immutable - -Enable or disable the `immutable` directive in the `Cache-Control` response -header, defaults to `false`. If set to `true`, the `maxAge` option should -also be specified to enable caching. The `immutable` directive will prevent -supported clients from making conditional requests during the life of the -`maxAge` option to check if the file has changed. - -##### index - -By default send supports "index.html" files, to disable this -set `false` or to supply a new index pass a string or an array -in preferred order. - -##### lastModified - -Enable or disable `Last-Modified` header, defaults to true. Uses the file -system's last modified value. - -##### maxAge - -Provide a max-age in milliseconds for http caching, defaults to 0. -This can also be a string accepted by the -[ms](https://www.npmjs.org/package/ms#readme) module. - -##### root - -Serve files relative to `path`. - -##### start - -Byte offset at which the stream starts, defaults to 0. The start is inclusive, -meaning `start: 2` will include the 3rd byte in the stream. - -#### Events - -The `SendStream` is an event emitter and will emit the following events: - - - `error` an error occurred `(err)` - - `directory` a directory was requested `(res, path)` - - `file` a file was requested `(path, stat)` - - `headers` the headers are about to be set on a file `(res, path, stat)` - - `stream` file streaming has started `(stream)` - - `end` streaming has completed - -#### .pipe - -The `pipe` method is used to pipe the response into the Node.js HTTP response -object, typically `send(req, path, options).pipe(res)`. - -## Error-handling - -By default when no `error` listeners are present an automatic response will be -made, otherwise you have full control over the response, aka you may show a 5xx -page etc. - -## Caching - -It does _not_ perform internal caching, you should use a reverse proxy cache -such as Varnish for this, or those fancy things called CDNs. If your -application is small enough that it would benefit from single-node memory -caching, it's small enough that it does not need caching at all ;). - -## Debugging - -To enable `debug()` instrumentation output export __DEBUG__: - -``` -$ DEBUG=send node app -``` - -## Running tests - -``` -$ npm install -$ npm test -``` - -## Examples - -### Serve a specific file - -This simple example will send a specific file to all requests. - -```js -var http = require('http') -var send = require('send') - -var server = http.createServer(function onRequest (req, res) { - send(req, '/path/to/index.html') - .pipe(res) -}) - -server.listen(3000) -``` - -### Serve all files from a directory - -This simple example will just serve up all the files in a -given directory as the top-level. For example, a request -`GET /foo.txt` will send back `/www/public/foo.txt`. - -```js -var http = require('http') -var parseUrl = require('parseurl') -var send = require('send') - -var server = http.createServer(function onRequest (req, res) { - send(req, parseUrl(req).pathname, { root: '/www/public' }) - .pipe(res) -}) - -server.listen(3000) -``` - -### Custom file types - -```js -var extname = require('path').extname -var http = require('http') -var parseUrl = require('parseurl') -var send = require('send') - -var server = http.createServer(function onRequest (req, res) { - send(req, parseUrl(req).pathname, { root: '/www/public' }) - .on('headers', function (res, path) { - switch (extname(path)) { - case '.x-mt': - case '.x-mtt': - // custom type for these extensions - res.setHeader('Content-Type', 'application/x-my-type') - break - } - }) - .pipe(res) -}) - -server.listen(3000) -``` - -### Custom directory index view - -This is an example of serving up a structure of directories with a -custom function to render a listing of a directory. - -```js -var http = require('http') -var fs = require('fs') -var parseUrl = require('parseurl') -var send = require('send') - -// Transfer arbitrary files from within /www/example.com/public/* -// with a custom handler for directory listing -var server = http.createServer(function onRequest (req, res) { - send(req, parseUrl(req).pathname, { index: false, root: '/www/public' }) - .once('directory', directory) - .pipe(res) -}) - -server.listen(3000) - -// Custom directory handler -function directory (res, path) { - var stream = this - - // redirect to trailing slash for consistent url - if (!stream.hasTrailingSlash()) { - return stream.redirect(path) - } - - // get directory list - fs.readdir(path, function onReaddir (err, list) { - if (err) return stream.error(err) - - // render an index for the directory - res.setHeader('Content-Type', 'text/plain; charset=UTF-8') - res.end(list.join('\n') + '\n') - }) -} -``` - -### Serving from a root directory with custom error-handling - -```js -var http = require('http') -var parseUrl = require('parseurl') -var send = require('send') - -var server = http.createServer(function onRequest (req, res) { - // your custom error-handling logic: - function error (err) { - res.statusCode = err.status || 500 - res.end(err.message) - } - - // your custom headers - function headers (res, path, stat) { - // serve all files for download - res.setHeader('Content-Disposition', 'attachment') - } - - // your custom directory handling logic: - function redirect () { - res.statusCode = 301 - res.setHeader('Location', req.url + '/') - res.end('Redirecting to ' + req.url + '/') - } - - // transfer arbitrary files from within - // /www/example.com/public/* - send(req, parseUrl(req).pathname, { root: '/www/public' }) - .on('error', error) - .on('directory', redirect) - .on('headers', headers) - .pipe(res) -}) - -server.listen(3000) -``` - -## License - -[MIT](LICENSE) - -[coveralls-image]: https://badgen.net/coveralls/c/github/pillarjs/send/master -[coveralls-url]: https://coveralls.io/r/pillarjs/send?branch=master -[github-actions-ci-image]: https://badgen.net/github/checks/pillarjs/send/master?label=linux -[github-actions-ci-url]: https://github.com/pillarjs/send/actions/workflows/ci.yml -[node-image]: https://badgen.net/npm/node/send -[node-url]: https://nodejs.org/en/download/ -[npm-downloads-image]: https://badgen.net/npm/dm/send -[npm-url]: https://npmjs.org/package/send -[npm-version-image]: https://badgen.net/npm/v/send diff --git a/node_modules/@nestjs/platform-express/node_modules/send/index.js b/node_modules/@nestjs/platform-express/node_modules/send/index.js deleted file mode 100644 index 1655053..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/send/index.js +++ /dev/null @@ -1,997 +0,0 @@ -/*! - * send - * Copyright(c) 2012 TJ Holowaychuk - * Copyright(c) 2014-2022 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var createError = require('http-errors') -var debug = require('debug')('send') -var encodeUrl = require('encodeurl') -var escapeHtml = require('escape-html') -var etag = require('etag') -var fresh = require('fresh') -var fs = require('fs') -var mime = require('mime-types') -var ms = require('ms') -var onFinished = require('on-finished') -var parseRange = require('range-parser') -var path = require('path') -var statuses = require('statuses') -var Stream = require('stream') -var util = require('util') - -/** - * Path function references. - * @private - */ - -var extname = path.extname -var join = path.join -var normalize = path.normalize -var resolve = path.resolve -var sep = path.sep - -/** - * Regular expression for identifying a bytes Range header. - * @private - */ - -var BYTES_RANGE_REGEXP = /^ *bytes=/ - -/** - * Maximum value allowed for the max age. - * @private - */ - -var MAX_MAXAGE = 60 * 60 * 24 * 365 * 1000 // 1 year - -/** - * Regular expression to match a path with a directory up component. - * @private - */ - -var UP_PATH_REGEXP = /(?:^|[\\/])\.\.(?:[\\/]|$)/ - -/** - * Module exports. - * @public - */ - -module.exports = send - -/** - * Return a `SendStream` for `req` and `path`. - * - * @param {object} req - * @param {string} path - * @param {object} [options] - * @return {SendStream} - * @public - */ - -function send (req, path, options) { - return new SendStream(req, path, options) -} - -/** - * Initialize a `SendStream` with the given `path`. - * - * @param {Request} req - * @param {String} path - * @param {object} [options] - * @private - */ - -function SendStream (req, path, options) { - Stream.call(this) - - var opts = options || {} - - this.options = opts - this.path = path - this.req = req - - this._acceptRanges = opts.acceptRanges !== undefined - ? Boolean(opts.acceptRanges) - : true - - this._cacheControl = opts.cacheControl !== undefined - ? Boolean(opts.cacheControl) - : true - - this._etag = opts.etag !== undefined - ? Boolean(opts.etag) - : true - - this._dotfiles = opts.dotfiles !== undefined - ? opts.dotfiles - : 'ignore' - - if (this._dotfiles !== 'ignore' && this._dotfiles !== 'allow' && this._dotfiles !== 'deny') { - throw new TypeError('dotfiles option must be "allow", "deny", or "ignore"') - } - - this._extensions = opts.extensions !== undefined - ? normalizeList(opts.extensions, 'extensions option') - : [] - - this._immutable = opts.immutable !== undefined - ? Boolean(opts.immutable) - : false - - this._index = opts.index !== undefined - ? normalizeList(opts.index, 'index option') - : ['index.html'] - - this._lastModified = opts.lastModified !== undefined - ? Boolean(opts.lastModified) - : true - - this._maxage = opts.maxAge || opts.maxage - this._maxage = typeof this._maxage === 'string' - ? ms(this._maxage) - : Number(this._maxage) - this._maxage = !isNaN(this._maxage) - ? Math.min(Math.max(0, this._maxage), MAX_MAXAGE) - : 0 - - this._root = opts.root - ? resolve(opts.root) - : null -} - -/** - * Inherits from `Stream`. - */ - -util.inherits(SendStream, Stream) - -/** - * Emit error with `status`. - * - * @param {number} status - * @param {Error} [err] - * @private - */ - -SendStream.prototype.error = function error (status, err) { - // emit if listeners instead of responding - if (hasListeners(this, 'error')) { - return this.emit('error', createHttpError(status, err)) - } - - var res = this.res - var msg = statuses.message[status] || String(status) - var doc = createHtmlDocument('Error', escapeHtml(msg)) - - // clear existing headers - clearHeaders(res) - - // add error headers - if (err && err.headers) { - setHeaders(res, err.headers) - } - - // send basic response - res.statusCode = status - res.setHeader('Content-Type', 'text/html; charset=UTF-8') - res.setHeader('Content-Length', Buffer.byteLength(doc)) - res.setHeader('Content-Security-Policy', "default-src 'none'") - res.setHeader('X-Content-Type-Options', 'nosniff') - res.end(doc) -} - -/** - * Check if the pathname ends with "/". - * - * @return {boolean} - * @private - */ - -SendStream.prototype.hasTrailingSlash = function hasTrailingSlash () { - return this.path[this.path.length - 1] === '/' -} - -/** - * Check if this is a conditional GET request. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isConditionalGET = function isConditionalGET () { - return this.req.headers['if-match'] || - this.req.headers['if-unmodified-since'] || - this.req.headers['if-none-match'] || - this.req.headers['if-modified-since'] -} - -/** - * Check if the request preconditions failed. - * - * @return {boolean} - * @private - */ - -SendStream.prototype.isPreconditionFailure = function isPreconditionFailure () { - var req = this.req - var res = this.res - - // if-match - var match = req.headers['if-match'] - if (match) { - var etag = res.getHeader('ETag') - return !etag || (match !== '*' && parseTokenList(match).every(function (match) { - return match !== etag && match !== 'W/' + etag && 'W/' + match !== etag - })) - } - - // if-unmodified-since - var unmodifiedSince = parseHttpDate(req.headers['if-unmodified-since']) - if (!isNaN(unmodifiedSince)) { - var lastModified = parseHttpDate(res.getHeader('Last-Modified')) - return isNaN(lastModified) || lastModified > unmodifiedSince - } - - return false -} - -/** - * Strip various content header fields for a change in entity. - * - * @private - */ - -SendStream.prototype.removeContentHeaderFields = function removeContentHeaderFields () { - var res = this.res - - res.removeHeader('Content-Encoding') - res.removeHeader('Content-Language') - res.removeHeader('Content-Length') - res.removeHeader('Content-Range') - res.removeHeader('Content-Type') -} - -/** - * Respond with 304 not modified. - * - * @api private - */ - -SendStream.prototype.notModified = function notModified () { - var res = this.res - debug('not modified') - this.removeContentHeaderFields() - res.statusCode = 304 - res.end() -} - -/** - * Raise error that headers already sent. - * - * @api private - */ - -SendStream.prototype.headersAlreadySent = function headersAlreadySent () { - var err = new Error('Can\'t set headers after they are sent.') - debug('headers already sent') - this.error(500, err) -} - -/** - * Check if the request is cacheable, aka - * responded with 2xx or 304 (see RFC 2616 section 14.2{5,6}). - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isCachable = function isCachable () { - var statusCode = this.res.statusCode - return (statusCode >= 200 && statusCode < 300) || - statusCode === 304 -} - -/** - * Handle stat() error. - * - * @param {Error} error - * @private - */ - -SendStream.prototype.onStatError = function onStatError (error) { - switch (error.code) { - case 'ENAMETOOLONG': - case 'ENOENT': - case 'ENOTDIR': - this.error(404, error) - break - default: - this.error(500, error) - break - } -} - -/** - * Check if the cache is fresh. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isFresh = function isFresh () { - return fresh(this.req.headers, { - etag: this.res.getHeader('ETag'), - 'last-modified': this.res.getHeader('Last-Modified') - }) -} - -/** - * Check if the range is fresh. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isRangeFresh = function isRangeFresh () { - var ifRange = this.req.headers['if-range'] - - if (!ifRange) { - return true - } - - // if-range as etag - if (ifRange.indexOf('"') !== -1) { - var etag = this.res.getHeader('ETag') - return Boolean(etag && ifRange.indexOf(etag) !== -1) - } - - // if-range as modified date - var lastModified = this.res.getHeader('Last-Modified') - return parseHttpDate(lastModified) <= parseHttpDate(ifRange) -} - -/** - * Redirect to path. - * - * @param {string} path - * @private - */ - -SendStream.prototype.redirect = function redirect (path) { - var res = this.res - - if (hasListeners(this, 'directory')) { - this.emit('directory', res, path) - return - } - - if (this.hasTrailingSlash()) { - this.error(403) - return - } - - var loc = encodeUrl(collapseLeadingSlashes(this.path + '/')) - var doc = createHtmlDocument('Redirecting', 'Redirecting to ' + escapeHtml(loc)) - - // redirect - res.statusCode = 301 - res.setHeader('Content-Type', 'text/html; charset=UTF-8') - res.setHeader('Content-Length', Buffer.byteLength(doc)) - res.setHeader('Content-Security-Policy', "default-src 'none'") - res.setHeader('X-Content-Type-Options', 'nosniff') - res.setHeader('Location', loc) - res.end(doc) -} - -/** - * Pipe to `res. - * - * @param {Stream} res - * @return {Stream} res - * @api public - */ - -SendStream.prototype.pipe = function pipe (res) { - // root path - var root = this._root - - // references - this.res = res - - // decode the path - var path = decode(this.path) - if (path === -1) { - this.error(400) - return res - } - - // null byte(s) - if (~path.indexOf('\0')) { - this.error(400) - return res - } - - var parts - if (root !== null) { - // normalize - if (path) { - path = normalize('.' + sep + path) - } - - // malicious path - if (UP_PATH_REGEXP.test(path)) { - debug('malicious path "%s"', path) - this.error(403) - return res - } - - // explode path parts - parts = path.split(sep) - - // join / normalize from optional root dir - path = normalize(join(root, path)) - } else { - // ".." is malicious without "root" - if (UP_PATH_REGEXP.test(path)) { - debug('malicious path "%s"', path) - this.error(403) - return res - } - - // explode path parts - parts = normalize(path).split(sep) - - // resolve the path - path = resolve(path) - } - - // dotfile handling - if (containsDotFile(parts)) { - debug('%s dotfile "%s"', this._dotfiles, path) - switch (this._dotfiles) { - case 'allow': - break - case 'deny': - this.error(403) - return res - case 'ignore': - default: - this.error(404) - return res - } - } - - // index file support - if (this._index.length && this.hasTrailingSlash()) { - this.sendIndex(path) - return res - } - - this.sendFile(path) - return res -} - -/** - * Transfer `path`. - * - * @param {String} path - * @api public - */ - -SendStream.prototype.send = function send (path, stat) { - var len = stat.size - var options = this.options - var opts = {} - var res = this.res - var req = this.req - var ranges = req.headers.range - var offset = options.start || 0 - - if (res.headersSent) { - // impossible to send now - this.headersAlreadySent() - return - } - - debug('pipe "%s"', path) - - // set header fields - this.setHeader(path, stat) - - // set content-type - this.type(path) - - // conditional GET support - if (this.isConditionalGET()) { - if (this.isPreconditionFailure()) { - this.error(412) - return - } - - if (this.isCachable() && this.isFresh()) { - this.notModified() - return - } - } - - // adjust len to start/end options - len = Math.max(0, len - offset) - if (options.end !== undefined) { - var bytes = options.end - offset + 1 - if (len > bytes) len = bytes - } - - // Range support - if (this._acceptRanges && BYTES_RANGE_REGEXP.test(ranges)) { - // parse - ranges = parseRange(len, ranges, { - combine: true - }) - - // If-Range support - if (!this.isRangeFresh()) { - debug('range stale') - ranges = -2 - } - - // unsatisfiable - if (ranges === -1) { - debug('range unsatisfiable') - - // Content-Range - res.setHeader('Content-Range', contentRange('bytes', len)) - - // 416 Requested Range Not Satisfiable - return this.error(416, { - headers: { 'Content-Range': res.getHeader('Content-Range') } - }) - } - - // valid (syntactically invalid/multiple ranges are treated as a regular response) - if (ranges !== -2 && ranges.length === 1) { - debug('range %j', ranges) - - // Content-Range - res.statusCode = 206 - res.setHeader('Content-Range', contentRange('bytes', len, ranges[0])) - - // adjust for requested range - offset += ranges[0].start - len = ranges[0].end - ranges[0].start + 1 - } - } - - // clone options - for (var prop in options) { - opts[prop] = options[prop] - } - - // set read options - opts.start = offset - opts.end = Math.max(offset, offset + len - 1) - - // content-length - res.setHeader('Content-Length', len) - - // HEAD support - if (req.method === 'HEAD') { - res.end() - return - } - - this.stream(path, opts) -} - -/** - * Transfer file for `path`. - * - * @param {String} path - * @api private - */ -SendStream.prototype.sendFile = function sendFile (path) { - var i = 0 - var self = this - - debug('stat "%s"', path) - fs.stat(path, function onstat (err, stat) { - var pathEndsWithSep = path[path.length - 1] === sep - if (err && err.code === 'ENOENT' && !extname(path) && !pathEndsWithSep) { - // not found, check extensions - return next(err) - } - if (err) return self.onStatError(err) - if (stat.isDirectory()) return self.redirect(path) - if (pathEndsWithSep) return self.error(404) - self.emit('file', path, stat) - self.send(path, stat) - }) - - function next (err) { - if (self._extensions.length <= i) { - return err - ? self.onStatError(err) - : self.error(404) - } - - var p = path + '.' + self._extensions[i++] - - debug('stat "%s"', p) - fs.stat(p, function (err, stat) { - if (err) return next(err) - if (stat.isDirectory()) return next() - self.emit('file', p, stat) - self.send(p, stat) - }) - } -} - -/** - * Transfer index for `path`. - * - * @param {String} path - * @api private - */ -SendStream.prototype.sendIndex = function sendIndex (path) { - var i = -1 - var self = this - - function next (err) { - if (++i >= self._index.length) { - if (err) return self.onStatError(err) - return self.error(404) - } - - var p = join(path, self._index[i]) - - debug('stat "%s"', p) - fs.stat(p, function (err, stat) { - if (err) return next(err) - if (stat.isDirectory()) return next() - self.emit('file', p, stat) - self.send(p, stat) - }) - } - - next() -} - -/** - * Stream `path` to the response. - * - * @param {String} path - * @param {Object} options - * @api private - */ - -SendStream.prototype.stream = function stream (path, options) { - var self = this - var res = this.res - - // pipe - var stream = fs.createReadStream(path, options) - this.emit('stream', stream) - stream.pipe(res) - - // cleanup - function cleanup () { - stream.destroy() - } - - // response finished, cleanup - onFinished(res, cleanup) - - // error handling - stream.on('error', function onerror (err) { - // clean up stream early - cleanup() - - // error - self.onStatError(err) - }) - - // end - stream.on('end', function onend () { - self.emit('end') - }) -} - -/** - * Set content-type based on `path` - * if it hasn't been explicitly set. - * - * @param {String} path - * @api private - */ - -SendStream.prototype.type = function type (path) { - var res = this.res - - if (res.getHeader('Content-Type')) return - - var ext = extname(path) - var type = mime.contentType(ext) || 'application/octet-stream' - - debug('content-type %s', type) - res.setHeader('Content-Type', type) -} - -/** - * Set response header fields, most - * fields may be pre-defined. - * - * @param {String} path - * @param {Object} stat - * @api private - */ - -SendStream.prototype.setHeader = function setHeader (path, stat) { - var res = this.res - - this.emit('headers', res, path, stat) - - if (this._acceptRanges && !res.getHeader('Accept-Ranges')) { - debug('accept ranges') - res.setHeader('Accept-Ranges', 'bytes') - } - - if (this._cacheControl && !res.getHeader('Cache-Control')) { - var cacheControl = 'public, max-age=' + Math.floor(this._maxage / 1000) - - if (this._immutable) { - cacheControl += ', immutable' - } - - debug('cache-control %s', cacheControl) - res.setHeader('Cache-Control', cacheControl) - } - - if (this._lastModified && !res.getHeader('Last-Modified')) { - var modified = stat.mtime.toUTCString() - debug('modified %s', modified) - res.setHeader('Last-Modified', modified) - } - - if (this._etag && !res.getHeader('ETag')) { - var val = etag(stat) - debug('etag %s', val) - res.setHeader('ETag', val) - } -} - -/** - * Clear all headers from a response. - * - * @param {object} res - * @private - */ - -function clearHeaders (res) { - for (const header of res.getHeaderNames()) { - res.removeHeader(header) - } -} - -/** - * Collapse all leading slashes into a single slash - * - * @param {string} str - * @private - */ -function collapseLeadingSlashes (str) { - for (var i = 0; i < str.length; i++) { - if (str[i] !== '/') { - break - } - } - - return i > 1 - ? '/' + str.substr(i) - : str -} - -/** - * Determine if path parts contain a dotfile. - * - * @api private - */ - -function containsDotFile (parts) { - for (var i = 0; i < parts.length; i++) { - var part = parts[i] - if (part.length > 1 && part[0] === '.') { - return true - } - } - - return false -} - -/** - * Create a Content-Range header. - * - * @param {string} type - * @param {number} size - * @param {array} [range] - */ - -function contentRange (type, size, range) { - return type + ' ' + (range ? range.start + '-' + range.end : '*') + '/' + size -} - -/** - * Create a minimal HTML document. - * - * @param {string} title - * @param {string} body - * @private - */ - -function createHtmlDocument (title, body) { - return '\n' + - '\n' + - '\n' + - '\n' + - '' + title + '\n' + - '\n' + - '\n' + - '
' + body + '
\n' + - '\n' + - '\n' -} - -/** - * Create a HttpError object from simple arguments. - * - * @param {number} status - * @param {Error|object} err - * @private - */ - -function createHttpError (status, err) { - if (!err) { - return createError(status) - } - - return err instanceof Error - ? createError(status, err, { expose: false }) - : createError(status, err) -} - -/** - * decodeURIComponent. - * - * Allows V8 to only deoptimize this fn instead of all - * of send(). - * - * @param {String} path - * @api private - */ - -function decode (path) { - try { - return decodeURIComponent(path) - } catch (err) { - return -1 - } -} - -/** - * Determine if emitter has listeners of a given type. - * - * The way to do this check is done three different ways in Node.js >= 0.10 - * so this consolidates them into a minimal set using instance methods. - * - * @param {EventEmitter} emitter - * @param {string} type - * @returns {boolean} - * @private - */ - -function hasListeners (emitter, type) { - var count = typeof emitter.listenerCount !== 'function' - ? emitter.listeners(type).length - : emitter.listenerCount(type) - - return count > 0 -} - -/** - * Normalize the index option into an array. - * - * @param {boolean|string|array} val - * @param {string} name - * @private - */ - -function normalizeList (val, name) { - var list = [].concat(val || []) - - for (var i = 0; i < list.length; i++) { - if (typeof list[i] !== 'string') { - throw new TypeError(name + ' must be array of strings or false') - } - } - - return list -} - -/** - * Parse an HTTP Date into a number. - * - * @param {string} date - * @private - */ - -function parseHttpDate (date) { - var timestamp = date && Date.parse(date) - - return typeof timestamp === 'number' - ? timestamp - : NaN -} - -/** - * Parse a HTTP token list. - * - * @param {string} str - * @private - */ - -function parseTokenList (str) { - var end = 0 - var list = [] - var start = 0 - - // gather tokens - for (var i = 0, len = str.length; i < len; i++) { - switch (str.charCodeAt(i)) { - case 0x20: /* */ - if (start === end) { - start = end = i + 1 - } - break - case 0x2c: /* , */ - if (start !== end) { - list.push(str.substring(start, end)) - } - start = end = i + 1 - break - default: - end = i + 1 - break - } - } - - // final token - if (start !== end) { - list.push(str.substring(start, end)) - } - - return list -} - -/** - * Set an object of headers on a response. - * - * @param {object} res - * @param {object} headers - * @private - */ - -function setHeaders (res, headers) { - var keys = Object.keys(headers) - - for (var i = 0; i < keys.length; i++) { - var key = keys[i] - res.setHeader(key, headers[key]) - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/send/package.json b/node_modules/@nestjs/platform-express/node_modules/send/package.json deleted file mode 100644 index e9d3cc2..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/send/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "send", - "description": "Better streaming static file server with Range and conditional-GET support", - "version": "1.2.1", - "author": "TJ Holowaychuk ", - "contributors": [ - "Douglas Christopher Wilson ", - "James Wyatt Cready ", - "Jesús Leganés Combarro " - ], - "license": "MIT", - "repository": "pillarjs/send", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - }, - "keywords": [ - "static", - "file", - "server" - ], - "dependencies": { - "debug": "^4.4.3", - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "etag": "^1.8.1", - "fresh": "^2.0.0", - "http-errors": "^2.0.1", - "mime-types": "^3.0.2", - "ms": "^2.1.3", - "on-finished": "^2.4.1", - "range-parser": "^1.2.1", - "statuses": "^2.0.2" - }, - "devDependencies": { - "after": "^0.8.2", - "eslint": "7.32.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.32.0", - "eslint-plugin-markdown": "2.2.1", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "5.2.0", - "eslint-plugin-standard": "4.1.0", - "mocha": "^10.7.0", - "nyc": "^17.0.0", - "supertest": "6.3.4" - }, - "files": [ - "LICENSE", - "README.md", - "index.js" - ], - "engines": { - "node": ">= 18" - }, - "scripts": { - "lint": "eslint .", - "test": "mocha --check-leaks --reporter spec", - "test-ci": "nyc --reporter=lcovonly --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "version": "node scripts/version-history.js && git add HISTORY.md" - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/serve-static/LICENSE b/node_modules/@nestjs/platform-express/node_modules/serve-static/LICENSE deleted file mode 100644 index cbe62e8..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/serve-static/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -(The MIT License) - -Copyright (c) 2010 Sencha Inc. -Copyright (c) 2011 LearnBoost -Copyright (c) 2011 TJ Holowaychuk -Copyright (c) 2014-2016 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@nestjs/platform-express/node_modules/serve-static/README.md b/node_modules/@nestjs/platform-express/node_modules/serve-static/README.md deleted file mode 100644 index 3ff1f1f..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/serve-static/README.md +++ /dev/null @@ -1,253 +0,0 @@ -# serve-static - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![CI][github-actions-ci-image]][github-actions-ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -## Install - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install serve-static -``` - -## API - -```js -const serveStatic = require('serve-static') -``` - -### serveStatic(root, options) - -Create a new middleware function to serve files from within a given root -directory. The file to serve will be determined by combining `req.url` -with the provided root directory. When a file is not found, instead of -sending a 404 response, this module will instead call `next()` to move on -to the next middleware, allowing for stacking and fall-backs. - -#### Options - -##### acceptRanges - -Enable or disable accepting ranged requests, defaults to true. -Disabling this will not send `Accept-Ranges` and ignore the contents -of the `Range` request header. - -##### cacheControl - -Enable or disable setting `Cache-Control` response header, defaults to -true. Disabling this will ignore the `immutable` and `maxAge` options. - -##### dotfiles - -Set how "dotfiles" are treated when encountered. A dotfile is a file -or directory that begins with a dot ("."). Note this check is done on -the path itself without checking if the path actually exists on the -disk. If `root` is specified, only the dotfiles above the root are -checked (i.e. the root itself can be within a dotfile when set -to "deny"). - - - `'allow'` No special treatment for dotfiles. - - `'deny'` Deny a request for a dotfile and 403/`next()`. - - `'ignore'` Pretend like the dotfile does not exist and 404/`next()`. - -The default value is `'ignore'`. - -##### etag - -Enable or disable etag generation, defaults to true. - -##### extensions - -Set file extension fallbacks. When set, if a file is not found, the given -extensions will be added to the file name and search for. The first that -exists will be served. Example: `['html', 'htm']`. - -The default value is `false`. - -##### fallthrough - -Set the middleware to have client errors fall-through as just unhandled -requests, otherwise forward a client error. The difference is that client -errors like a bad request or a request to a non-existent file will cause -this middleware to simply `next()` to your next middleware when this value -is `true`. When this value is `false`, these errors (even 404s), will invoke -`next(err)`. - -Typically `true` is desired such that multiple physical directories can be -mapped to the same web address or for routes to fill in non-existent files. - -The value `false` can be used if this middleware is mounted at a path that -is designed to be strictly a single file system directory, which allows for -short-circuiting 404s for less overhead. This middleware will also reply to -all methods. - -The default value is `true`. - -##### immutable - -Enable or disable the `immutable` directive in the `Cache-Control` response -header, defaults to `false`. If set to `true`, the `maxAge` option should -also be specified to enable caching. The `immutable` directive will prevent -supported clients from making conditional requests during the life of the -`maxAge` option to check if the file has changed. - -##### index - -By default this module will send "index.html" files in response to a request -on a directory. To disable this set `false` or to supply a new index pass a -string or an array in preferred order. - -##### lastModified - -Enable or disable `Last-Modified` header, defaults to true. Uses the file -system's last modified value. - -##### maxAge - -Provide a max-age in milliseconds for http caching, defaults to 0. This -can also be a string accepted by the [ms](https://www.npmjs.org/package/ms#readme) -module. - -##### redirect - -Redirect to trailing "/" when the pathname is a dir. Defaults to `true`. - -##### setHeaders - -Function to set custom headers on response. Alterations to the headers need to -occur synchronously. The function is called as `fn(res, path, stat)`, where -the arguments are: - - - `res` the response object - - `path` the file path that is being sent - - `stat` the stat object of the file that is being sent - -## Examples - -### Serve files with vanilla node.js http server - -```js -const finalhandler = require('finalhandler') -const http = require('http') -const serveStatic = require('serve-static') - -// Serve up public/ftp folder -const serve = serveStatic('public/ftp', { index: ['index.html', 'index.htm'] }) - -// Create server -const server = http.createServer((req, res) => { - serve(req, res, finalhandler(req, res)) -}) - -// Listen -server.listen(3000) -``` - -### Serve all files as downloads - -```js -const contentDisposition = require('content-disposition') -const finalhandler = require('finalhandler') -const http = require('http') -const serveStatic = require('serve-static') - -// Serve up public/ftp folder -const serve = serveStatic('public/ftp', { - index: false, - setHeaders: setHeaders -}) - -// Set header to force download -function setHeaders (res, path) { - res.setHeader('Content-Disposition', contentDisposition(path)) -} - -// Create server -const server = http.createServer((req, res) => { - serve(req, res, finalhandler(req, res)) -}) - -// Listen -server.listen(3000) -``` - -### Serving using express - -#### Simple - -This is a simple example of using Express. - -```js -const express = require('express') -const serveStatic = require('serve-static') - -const app = express() - -app.use(serveStatic('public/ftp', { index: ['default.html', 'default.htm'] })) -app.listen(3000) -``` - -#### Multiple roots - -This example shows a simple way to search through multiple directories. -Files are searched for in `public-optimized/` first, then `public/` second -as a fallback. - -```js -const express = require('express') -const path = require('path') -const serveStatic = require('serve-static') - -const app = express() - -app.use(serveStatic(path.join(__dirname, 'public-optimized'))) -app.use(serveStatic(path.join(__dirname, 'public'))) -app.listen(3000) -``` - -#### Different settings for paths - -This example shows how to set a different max age depending on the served -file. In this example, HTML files are not cached, while everything else -is for 1 day. - -```js -const express = require('express') -const path = require('path') -const serveStatic = require('serve-static') - -const app = express() - -app.use(serveStatic(path.join(__dirname, 'public'), { - maxAge: '1d', - setHeaders: setCustomCacheControl -})) - -app.listen(3000) - -function setCustomCacheControl (res, file) { - if (path.extname(file) === '.html') { - // Custom Cache-Control for HTML files - res.setHeader('Cache-Control', 'public, max-age=0') - } -} -``` - -## License - -[MIT](LICENSE) - -[coveralls-image]: https://badgen.net/coveralls/c/github/expressjs/serve-static/master -[coveralls-url]: https://coveralls.io/r/expressjs/serve-static?branch=master -[github-actions-ci-image]: https://badgen.net/github/checks/expressjs/serve-static/master?label=linux -[github-actions-ci-url]: https://github.com/expressjs/serve-static/actions/workflows/ci.yml -[node-image]: https://badgen.net/npm/node/serve-static -[node-url]: https://nodejs.org/en/download/ -[npm-downloads-image]: https://badgen.net/npm/dm/serve-static -[npm-url]: https://npmjs.org/package/serve-static -[npm-version-image]: https://badgen.net/npm/v/serve-static diff --git a/node_modules/@nestjs/platform-express/node_modules/serve-static/index.js b/node_modules/@nestjs/platform-express/node_modules/serve-static/index.js deleted file mode 100644 index 1bee463..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/serve-static/index.js +++ /dev/null @@ -1,208 +0,0 @@ -/*! - * serve-static - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * Copyright(c) 2014-2016 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var encodeUrl = require('encodeurl') -var escapeHtml = require('escape-html') -var parseUrl = require('parseurl') -var resolve = require('path').resolve -var send = require('send') -var url = require('url') - -/** - * Module exports. - * @public - */ - -module.exports = serveStatic - -/** - * @param {string} root - * @param {object} [options] - * @return {function} - * @public - */ - -function serveStatic (root, options) { - if (!root) { - throw new TypeError('root path required') - } - - if (typeof root !== 'string') { - throw new TypeError('root path must be a string') - } - - // copy options object - var opts = Object.create(options || null) - - // fall-though - var fallthrough = opts.fallthrough !== false - - // default redirect - var redirect = opts.redirect !== false - - // headers listener - var setHeaders = opts.setHeaders - - if (setHeaders && typeof setHeaders !== 'function') { - throw new TypeError('option setHeaders must be function') - } - - // setup options for send - opts.maxage = opts.maxage || opts.maxAge || 0 - opts.root = resolve(root) - - // construct directory listener - var onDirectory = redirect - ? createRedirectDirectoryListener() - : createNotFoundDirectoryListener() - - return function serveStatic (req, res, next) { - if (req.method !== 'GET' && req.method !== 'HEAD') { - if (fallthrough) { - return next() - } - - // method not allowed - res.statusCode = 405 - res.setHeader('Allow', 'GET, HEAD') - res.setHeader('Content-Length', '0') - res.end() - return - } - - var forwardError = !fallthrough - var originalUrl = parseUrl.original(req) - var path = parseUrl(req).pathname - - // make sure redirect occurs at mount - if (path === '/' && originalUrl.pathname.substr(-1) !== '/') { - path = '' - } - - // create send stream - var stream = send(req, path, opts) - - // add directory handler - stream.on('directory', onDirectory) - - // add headers listener - if (setHeaders) { - stream.on('headers', setHeaders) - } - - // add file listener for fallthrough - if (fallthrough) { - stream.on('file', function onFile () { - // once file is determined, always forward error - forwardError = true - }) - } - - // forward errors - stream.on('error', function error (err) { - if (forwardError || !(err.statusCode < 500)) { - next(err) - return - } - - next() - }) - - // pipe - stream.pipe(res) - } -} - -/** - * Collapse all leading slashes into a single slash - * @private - */ -function collapseLeadingSlashes (str) { - for (var i = 0; i < str.length; i++) { - if (str.charCodeAt(i) !== 0x2f /* / */) { - break - } - } - - return i > 1 - ? '/' + str.substr(i) - : str -} - -/** - * Create a minimal HTML document. - * - * @param {string} title - * @param {string} body - * @private - */ - -function createHtmlDocument (title, body) { - return '\n' + - '\n' + - '\n' + - '\n' + - '' + title + '\n' + - '\n' + - '\n' + - '
' + body + '
\n' + - '\n' + - '\n' -} - -/** - * Create a directory listener that just 404s. - * @private - */ - -function createNotFoundDirectoryListener () { - return function notFound () { - this.error(404) - } -} - -/** - * Create a directory listener that performs a redirect. - * @private - */ - -function createRedirectDirectoryListener () { - return function redirect (res) { - if (this.hasTrailingSlash()) { - this.error(404) - return - } - - // get original URL - var originalUrl = parseUrl.original(this.req) - - // append trailing slash - originalUrl.path = null - originalUrl.pathname = collapseLeadingSlashes(originalUrl.pathname + '/') - - // reformat the URL - var loc = encodeUrl(url.format(originalUrl)) - var doc = createHtmlDocument('Redirecting', 'Redirecting to ' + escapeHtml(loc)) - - // send redirect response - res.statusCode = 301 - res.setHeader('Content-Type', 'text/html; charset=UTF-8') - res.setHeader('Content-Length', Buffer.byteLength(doc)) - res.setHeader('Content-Security-Policy', "default-src 'none'") - res.setHeader('X-Content-Type-Options', 'nosniff') - res.setHeader('Location', loc) - res.end(doc) - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/serve-static/package.json b/node_modules/@nestjs/platform-express/node_modules/serve-static/package.json deleted file mode 100644 index 5fb5b02..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/serve-static/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "serve-static", - "description": "Serve static files", - "version": "2.2.1", - "author": "Douglas Christopher Wilson ", - "license": "MIT", - "repository": "expressjs/serve-static", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - }, - "dependencies": { - "encodeurl": "^2.0.0", - "escape-html": "^1.0.3", - "parseurl": "^1.3.3", - "send": "^1.2.0" - }, - "devDependencies": { - "eslint": "7.32.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.32.0", - "eslint-plugin-markdown": "2.2.1", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "5.2.0", - "eslint-plugin-standard": "4.1.0", - "mocha": "^10.7.0", - "nyc": "^17.0.0", - "supertest": "^6.3.4" - }, - "files": [ - "LICENSE", - "index.js" - ], - "engines": { - "node": ">= 18" - }, - "scripts": { - "lint": "eslint .", - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "version": "node scripts/version-history.js && git add HISTORY.md" - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/type-is/HISTORY.md b/node_modules/@nestjs/platform-express/node_modules/type-is/HISTORY.md deleted file mode 100644 index 6812655..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/type-is/HISTORY.md +++ /dev/null @@ -1,292 +0,0 @@ -2.0.1 / 2025-03-27 -========== - -2.0.0 / 2024-08-31 -========== - - * Drop node <18 - * Use `content-type@^1.0.5` and `media-typer@^1.0.0` for type validation - - No behavior changes, upgrades `media-typer` - * deps: mime-types@^3.0.0 - - Add `application/toml` with extension `.toml` - - Add `application/ubjson` with extension `.ubj` - - Add `application/x-keepass2` with extension `.kdbx` - - Add deprecated iWorks mime types and extensions - - Add extension `.amr` to `audio/amr` - - Add extension `.cjs` to `application/node` - - Add extension `.dbf` to `application/vnd.dbf` - - Add extension `.m4s` to `video/iso.segment` - - Add extension `.mvt` to `application/vnd.mapbox-vector-tile` - - Add extension `.mxmf` to `audio/mobile-xmf` - - Add extension `.opus` to `audio/ogg` - - Add extension `.rar` to `application/vnd.rar` - - Add extension `.td` to `application/urc-targetdesc+xml` - - Add extension `.trig` to `application/trig` - - Add extensions from IANA for `application/*+xml` types - - Add `image/avif` with extension `.avif` - - Add `image/ktx2` with extension `.ktx2` - - Add `image/vnd.ms-dds` with extension `.dds` - - Add new upstream MIME types - - Fix extension of `application/vnd.apple.keynote` to be `.key` - - Remove ambigious extensions from IANA for `application/*+xml` types - - Update primary extension to `.es` for `application/ecmascript` - -1.6.18 / 2019-04-26 -=================== - - * Fix regression passing request object to `typeis.is` - -1.6.17 / 2019-04-25 -=================== - - * deps: mime-types@~2.1.24 - - Add Apple file extensions from IANA - - Add extension `.csl` to `application/vnd.citationstyles.style+xml` - - Add extension `.es` to `application/ecmascript` - - Add extension `.nq` to `application/n-quads` - - Add extension `.nt` to `application/n-triples` - - Add extension `.owl` to `application/rdf+xml` - - Add extensions `.siv` and `.sieve` to `application/sieve` - - Add extensions from IANA for `image/*` types - - Add extensions from IANA for `model/*` types - - Add extensions to HEIC image types - - Add new mime types - - Add `text/mdx` with extension `.mdx` - * perf: prevent internal `throw` on invalid type - -1.6.16 / 2018-02-16 -=================== - - * deps: mime-types@~2.1.18 - - Add `application/raml+yaml` with extension `.raml` - - Add `application/wasm` with extension `.wasm` - - Add `text/shex` with extension `.shex` - - Add extensions for JPEG-2000 images - - Add extensions from IANA for `message/*` types - - Add extension `.mjs` to `application/javascript` - - Add extension `.wadl` to `application/vnd.sun.wadl+xml` - - Add extension `.gz` to `application/gzip` - - Add glTF types and extensions - - Add new mime types - - Update extensions `.md` and `.markdown` to be `text/markdown` - - Update font MIME types - - Update `text/hjson` to registered `application/hjson` - -1.6.15 / 2017-03-31 -=================== - - * deps: mime-types@~2.1.15 - - Add new mime types - -1.6.14 / 2016-11-18 -=================== - - * deps: mime-types@~2.1.13 - - Add new mime types - -1.6.13 / 2016-05-18 -=================== - - * deps: mime-types@~2.1.11 - - Add new mime types - -1.6.12 / 2016-02-28 -=================== - - * deps: mime-types@~2.1.10 - - Add new mime types - - Fix extension of `application/dash+xml` - - Update primary extension for `audio/mp4` - -1.6.11 / 2016-01-29 -=================== - - * deps: mime-types@~2.1.9 - - Add new mime types - -1.6.10 / 2015-12-01 -=================== - - * deps: mime-types@~2.1.8 - - Add new mime types - -1.6.9 / 2015-09-27 -================== - - * deps: mime-types@~2.1.7 - - Add new mime types - -1.6.8 / 2015-09-04 -================== - - * deps: mime-types@~2.1.6 - - Add new mime types - -1.6.7 / 2015-08-20 -================== - - * Fix type error when given invalid type to match against - * deps: mime-types@~2.1.5 - - Add new mime types - -1.6.6 / 2015-07-31 -================== - - * deps: mime-types@~2.1.4 - - Add new mime types - -1.6.5 / 2015-07-16 -================== - - * deps: mime-types@~2.1.3 - - Add new mime types - -1.6.4 / 2015-07-01 -================== - - * deps: mime-types@~2.1.2 - - Add new mime types - * perf: enable strict mode - * perf: remove argument reassignment - -1.6.3 / 2015-06-08 -================== - - * deps: mime-types@~2.1.1 - - Add new mime types - * perf: reduce try block size - * perf: remove bitwise operations - -1.6.2 / 2015-05-10 -================== - - * deps: mime-types@~2.0.11 - - Add new mime types - -1.6.1 / 2015-03-13 -================== - - * deps: mime-types@~2.0.10 - - Add new mime types - -1.6.0 / 2015-02-12 -================== - - * fix false-positives in `hasBody` `Transfer-Encoding` check - * support wildcard for both type and subtype (`*/*`) - -1.5.7 / 2015-02-09 -================== - - * fix argument reassignment - * deps: mime-types@~2.0.9 - - Add new mime types - -1.5.6 / 2015-01-29 -================== - - * deps: mime-types@~2.0.8 - - Add new mime types - -1.5.5 / 2014-12-30 -================== - - * deps: mime-types@~2.0.7 - - Add new mime types - - Fix missing extensions - - Fix various invalid MIME type entries - - Remove example template MIME types - - deps: mime-db@~1.5.0 - -1.5.4 / 2014-12-10 -================== - - * deps: mime-types@~2.0.4 - - Add new mime types - - deps: mime-db@~1.3.0 - -1.5.3 / 2014-11-09 -================== - - * deps: mime-types@~2.0.3 - - Add new mime types - - deps: mime-db@~1.2.0 - -1.5.2 / 2014-09-28 -================== - - * deps: mime-types@~2.0.2 - - Add new mime types - - deps: mime-db@~1.1.0 - -1.5.1 / 2014-09-07 -================== - - * Support Node.js 0.6 - * deps: media-typer@0.3.0 - * deps: mime-types@~2.0.1 - - Support Node.js 0.6 - -1.5.0 / 2014-09-05 -================== - - * fix `hasbody` to be true for `content-length: 0` - -1.4.0 / 2014-09-02 -================== - - * update mime-types - -1.3.2 / 2014-06-24 -================== - - * use `~` range on mime-types - -1.3.1 / 2014-06-19 -================== - - * fix global variable leak - -1.3.0 / 2014-06-19 -================== - - * improve type parsing - - - invalid media type never matches - - media type not case-sensitive - - extra LWS does not affect results - -1.2.2 / 2014-06-19 -================== - - * fix behavior on unknown type argument - -1.2.1 / 2014-06-03 -================== - - * switch dependency from `mime` to `mime-types@1.0.0` - -1.2.0 / 2014-05-11 -================== - - * support suffix matching: - - - `+json` matches `application/vnd+json` - - `*/vnd+json` matches `application/vnd+json` - - `application/*+json` matches `application/vnd+json` - -1.1.0 / 2014-04-12 -================== - - * add non-array values support - * expose internal utilities: - - - `.is()` - - `.hasBody()` - - `.normalize()` - - `.match()` - -1.0.1 / 2014-03-30 -================== - - * add `multipart` as a shorthand diff --git a/node_modules/@nestjs/platform-express/node_modules/type-is/LICENSE b/node_modules/@nestjs/platform-express/node_modules/type-is/LICENSE deleted file mode 100644 index 386b7b6..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/type-is/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2014-2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@nestjs/platform-express/node_modules/type-is/README.md b/node_modules/@nestjs/platform-express/node_modules/type-is/README.md deleted file mode 100644 index d23946e..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/type-is/README.md +++ /dev/null @@ -1,198 +0,0 @@ -# type-is - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][ci-image]][ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Infer the content-type of a request. - -## Install - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install type-is -``` - -## API - -```js -var http = require('http') -var typeis = require('type-is') - -http.createServer(function (req, res) { - var istext = typeis(req, ['text/*']) - res.end('you ' + (istext ? 'sent' : 'did not send') + ' me text') -}) -``` - -### typeis(request, types) - -Checks if the `request` is one of the `types`. If the request has no body, -even if there is a `Content-Type` header, then `null` is returned. If the -`Content-Type` header is invalid or does not matches any of the `types`, then -`false` is returned. Otherwise, a string of the type that matched is returned. - -The `request` argument is expected to be a Node.js HTTP request. The `types` -argument is an array of type strings. - -Each type in the `types` array can be one of the following: - -- A file extension name such as `json`. This name will be returned if matched. -- A mime type such as `application/json`. -- A mime type with a wildcard such as `*/*` or `*/json` or `application/*`. - The full mime type will be returned if matched. -- A suffix such as `+json`. This can be combined with a wildcard such as - `*/vnd+json` or `application/*+json`. The full mime type will be returned - if matched. - -Some examples to illustrate the inputs and returned value: - -```js -// req.headers.content-type = 'application/json' - -typeis(req, ['json']) // => 'json' -typeis(req, ['html', 'json']) // => 'json' -typeis(req, ['application/*']) // => 'application/json' -typeis(req, ['application/json']) // => 'application/json' - -typeis(req, ['html']) // => false -``` - -### typeis.hasBody(request) - -Returns a Boolean if the given `request` has a body, regardless of the -`Content-Type` header. - -Having a body has no relation to how large the body is (it may be 0 bytes). -This is similar to how file existence works. If a body does exist, then this -indicates that there is data to read from the Node.js request stream. - -```js -if (typeis.hasBody(req)) { - // read the body, since there is one - - req.on('data', function (chunk) { - // ... - }) -} -``` - -### typeis.is(mediaType, types) - -Checks if the `mediaType` is one of the `types`. If the `mediaType` is invalid -or does not matches any of the `types`, then `false` is returned. Otherwise, a -string of the type that matched is returned. - -The `mediaType` argument is expected to be a -[media type](https://tools.ietf.org/html/rfc6838) string. The `types` argument -is an array of type strings. - -Each type in the `types` array can be one of the following: - -- A file extension name such as `json`. This name will be returned if matched. -- A mime type such as `application/json`. -- A mime type with a wildcard such as `*/*` or `*/json` or `application/*`. - The full mime type will be returned if matched. -- A suffix such as `+json`. This can be combined with a wildcard such as - `*/vnd+json` or `application/*+json`. The full mime type will be returned - if matched. - -Some examples to illustrate the inputs and returned value: - -```js -var mediaType = 'application/json' - -typeis.is(mediaType, ['json']) // => 'json' -typeis.is(mediaType, ['html', 'json']) // => 'json' -typeis.is(mediaType, ['application/*']) // => 'application/json' -typeis.is(mediaType, ['application/json']) // => 'application/json' - -typeis.is(mediaType, ['html']) // => false -``` - -### typeis.match(expected, actual) - -Match the type string `expected` with `actual`, taking in to account wildcards. -A wildcard can only be in the type of the subtype part of a media type and only -in the `expected` value (as `actual` should be the real media type to match). A -suffix can still be included even with a wildcard subtype. If an input is -malformed, `false` will be returned. - -```js -typeis.match('text/html', 'text/html') // => true -typeis.match('*/html', 'text/html') // => true -typeis.match('text/*', 'text/html') // => true -typeis.match('*/*', 'text/html') // => true -typeis.match('*/*+json', 'application/x-custom+json') // => true -``` - -### typeis.normalize(type) - -Normalize a `type` string. This works by performing the following: - -- If the `type` is not a string, `false` is returned. -- If the string starts with `+` (so it is a `+suffix` shorthand like `+json`), - then it is expanded to contain the complete wildcard notation of `*/*+suffix`. -- If the string contains a `/`, then it is returned as the type. -- Else the string is assumed to be a file extension and the mapped media type is - returned, or `false` is there is no mapping. - -This includes two special mappings: - -- `'multipart'` -> `'multipart/*'` -- `'urlencoded'` -> `'application/x-www-form-urlencoded'` - -## Examples - -### Example body parser - -```js -var express = require('express') -var typeis = require('type-is') - -var app = express() - -app.use(function bodyParser (req, res, next) { - if (!typeis.hasBody(req)) { - return next() - } - - switch (typeis(req, ['urlencoded', 'json', 'multipart'])) { - case 'urlencoded': - // parse urlencoded body - throw new Error('implement urlencoded body parsing') - case 'json': - // parse json body - throw new Error('implement json body parsing') - case 'multipart': - // parse multipart body - throw new Error('implement multipart body parsing') - default: - // 415 error code - res.statusCode = 415 - res.end() - break - } -}) -``` - -## License - -[MIT](LICENSE) - -[ci-image]: https://badgen.net/github/checks/jshttp/type-is/master?label=ci -[ci-url]: https://github.com/jshttp/type-is/actions/workflows/ci.yml -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/type-is/master -[coveralls-url]: https://coveralls.io/r/jshttp/type-is?branch=master -[node-version-image]: https://badgen.net/npm/node/type-is -[node-version-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/type-is -[npm-url]: https://npmjs.org/package/type-is -[npm-version-image]: https://badgen.net/npm/v/type-is -[travis-image]: https://badgen.net/travis/jshttp/type-is/master -[travis-url]: https://travis-ci.org/jshttp/type-is diff --git a/node_modules/@nestjs/platform-express/node_modules/type-is/index.js b/node_modules/@nestjs/platform-express/node_modules/type-is/index.js deleted file mode 100644 index e773845..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/type-is/index.js +++ /dev/null @@ -1,250 +0,0 @@ -/*! - * type-is - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var contentType = require('content-type') -var mime = require('mime-types') -var typer = require('media-typer') - -/** - * Module exports. - * @public - */ - -module.exports = typeofrequest -module.exports.is = typeis -module.exports.hasBody = hasbody -module.exports.normalize = normalize -module.exports.match = mimeMatch - -/** - * Compare a `value` content-type with `types`. - * Each `type` can be an extension like `html`, - * a special shortcut like `multipart` or `urlencoded`, - * or a mime type. - * - * If no types match, `false` is returned. - * Otherwise, the first `type` that matches is returned. - * - * @param {String} value - * @param {Array} types - * @public - */ - -function typeis (value, types_) { - var i - var types = types_ - - // remove parameters and normalize - var val = tryNormalizeType(value) - - // no type or invalid - if (!val) { - return false - } - - // support flattened arguments - if (types && !Array.isArray(types)) { - types = new Array(arguments.length - 1) - for (i = 0; i < types.length; i++) { - types[i] = arguments[i + 1] - } - } - - // no types, return the content type - if (!types || !types.length) { - return val - } - - var type - for (i = 0; i < types.length; i++) { - if (mimeMatch(normalize(type = types[i]), val)) { - return type[0] === '+' || type.indexOf('*') !== -1 - ? val - : type - } - } - - // no matches - return false -} - -/** - * Check if a request has a request body. - * A request with a body __must__ either have `transfer-encoding` - * or `content-length` headers set. - * http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.3 - * - * @param {Object} request - * @return {Boolean} - * @public - */ - -function hasbody (req) { - return req.headers['transfer-encoding'] !== undefined || - !isNaN(req.headers['content-length']) -} - -/** - * Check if the incoming request contains the "Content-Type" - * header field, and it contains any of the give mime `type`s. - * If there is no request body, `null` is returned. - * If there is no content type, `false` is returned. - * Otherwise, it returns the first `type` that matches. - * - * Examples: - * - * // With Content-Type: text/html; charset=utf-8 - * this.is('html'); // => 'html' - * this.is('text/html'); // => 'text/html' - * this.is('text/*', 'application/json'); // => 'text/html' - * - * // When Content-Type is application/json - * this.is('json', 'urlencoded'); // => 'json' - * this.is('application/json'); // => 'application/json' - * this.is('html', 'application/*'); // => 'application/json' - * - * this.is('html'); // => false - * - * @param {Object} req - * @param {(String|Array)} types... - * @return {(String|false|null)} - * @public - */ - -function typeofrequest (req, types_) { - // no body - if (!hasbody(req)) return null - // support flattened arguments - var types = arguments.length > 2 - ? Array.prototype.slice.call(arguments, 1) - : types_ - // request content type - var value = req.headers['content-type'] - - return typeis(value, types) -} - -/** - * Normalize a mime type. - * If it's a shorthand, expand it to a valid mime type. - * - * In general, you probably want: - * - * var type = is(req, ['urlencoded', 'json', 'multipart']); - * - * Then use the appropriate body parsers. - * These three are the most common request body types - * and are thus ensured to work. - * - * @param {String} type - * @return {String|false|null} - * @public - */ - -function normalize (type) { - if (typeof type !== 'string') { - // invalid type - return false - } - - switch (type) { - case 'urlencoded': - return 'application/x-www-form-urlencoded' - case 'multipart': - return 'multipart/*' - } - - if (type[0] === '+') { - // "+json" -> "*/*+json" expando - return '*/*' + type - } - - return type.indexOf('/') === -1 - ? mime.lookup(type) - : type -} - -/** - * Check if `expected` mime type - * matches `actual` mime type with - * wildcard and +suffix support. - * - * @param {String} expected - * @param {String} actual - * @return {Boolean} - * @public - */ - -function mimeMatch (expected, actual) { - // invalid type - if (expected === false) { - return false - } - - // split types - var actualParts = actual.split('/') - var expectedParts = expected.split('/') - - // invalid format - if (actualParts.length !== 2 || expectedParts.length !== 2) { - return false - } - - // validate type - if (expectedParts[0] !== '*' && expectedParts[0] !== actualParts[0]) { - return false - } - - // validate suffix wildcard - if (expectedParts[1].slice(0, 2) === '*+') { - return expectedParts[1].length <= actualParts[1].length + 1 && - expectedParts[1].slice(1) === actualParts[1].slice(1 - expectedParts[1].length) - } - - // validate subtype - if (expectedParts[1] !== '*' && expectedParts[1] !== actualParts[1]) { - return false - } - - return true -} - -/** - * Normalize a type and remove parameters. - * - * @param {string} value - * @return {(string|null)} - * @private - */ -function normalizeType (value) { - // Parse the type - var type = contentType.parse(value).type - - return typer.test(type) ? type : null -} - -/** - * Try to normalize a type and remove parameters. - * - * @param {string} value - * @return {(string|null)} - * @private - */ -function tryNormalizeType (value) { - try { - return value ? normalizeType(value) : null - } catch (err) { - return null - } -} diff --git a/node_modules/@nestjs/platform-express/node_modules/type-is/package.json b/node_modules/@nestjs/platform-express/node_modules/type-is/package.json deleted file mode 100644 index 08586d2..0000000 --- a/node_modules/@nestjs/platform-express/node_modules/type-is/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "type-is", - "description": "Infer the content-type of a request.", - "version": "2.0.1", - "contributors": [ - "Douglas Christopher Wilson ", - "Jonathan Ong (http://jongleberry.com)" - ], - "license": "MIT", - "repository": "jshttp/type-is", - "dependencies": { - "content-type": "^1.0.5", - "media-typer": "^1.1.0", - "mime-types": "^3.0.0" - }, - "devDependencies": { - "eslint": "7.32.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.25.4", - "eslint-plugin-markdown": "2.2.1", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "5.2.0", - "eslint-plugin-standard": "4.1.0", - "mocha": "9.2.1", - "nyc": "15.1.0" - }, - "engines": { - "node": ">= 0.6" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "index.js" - ], - "scripts": { - "lint": "eslint .", - "test": "mocha --reporter spec --check-leaks --bail test/", - "test:debug": "mocha --reporter spec --check-leaks --inspect --inspect-brk test/", - "test-ci": "nyc --reporter=lcovonly --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test" - }, - "keywords": [ - "content", - "type", - "checking" - ] -} diff --git a/node_modules/@nestjs/platform-express/package.json b/node_modules/@nestjs/platform-express/package.json deleted file mode 100644 index dc9af36..0000000 --- a/node_modules/@nestjs/platform-express/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "@nestjs/platform-express", - "version": "11.1.17", - "description": "Nest - modern, fast, powerful node.js web framework (@platform-express)", - "author": "Kamil Mysliwiec", - "license": "MIT", - "homepage": "https://nestjs.com", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/nest" - }, - "repository": { - "type": "git", - "url": "https://github.com/nestjs/nest.git", - "directory": "packages/platform-express" - }, - "publishConfig": { - "access": "public" - }, - "dependencies": { - "cors": "2.8.6", - "express": "5.2.1", - "multer": "2.1.1", - "path-to-regexp": "8.3.0", - "tslib": "2.8.1" - }, - "devDependencies": { - "@nestjs/common": "11.1.17", - "@nestjs/core": "11.1.17" - }, - "peerDependencies": { - "@nestjs/common": "^11.0.0", - "@nestjs/core": "^11.0.0" - }, - "gitHead": "447a373ebebd2c58b5b3c8d718f25922a025f2fe" -} diff --git a/node_modules/@nestjs/platform-express/tsconfig.build.json b/node_modules/@nestjs/platform-express/tsconfig.build.json deleted file mode 100644 index 732ca00..0000000 --- a/node_modules/@nestjs/platform-express/tsconfig.build.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "../tsconfig.build.json", - "compilerOptions": { - "outDir": ".", - "rootDir": ".", - "paths": { - "@nestjs/common": ["../common"], - "@nestjs/common/*": ["../common/*"], - "@nestjs/core": ["../core"], - "@nestjs/core/*": ["../core/*"] - } - }, - "exclude": ["node_modules", "dist", "test/**/*", "*.spec.ts"], - "references": [ - { - "path": "../common/tsconfig.build.json" - }, - { - "path": "../core/tsconfig.build.json" - } - ] -} diff --git a/node_modules/@nestjs/serve-static/.circleci/config.yml b/node_modules/@nestjs/serve-static/.circleci/config.yml deleted file mode 100644 index 94bdd87..0000000 --- a/node_modules/@nestjs/serve-static/.circleci/config.yml +++ /dev/null @@ -1,55 +0,0 @@ -version: 2 - -aliases: - - &restore-cache - restore_cache: - key: dependency-cache-{{ checksum "package.json" }} - - &install-deps - run: - name: Install dependencies - command: npm install --ignore-scripts - - &build-packages - run: - name: Build - command: npm run build - -jobs: - build: - working_directory: ~/nest - docker: - - image: cimg/node:22.20.0 - steps: - - checkout - - restore_cache: - key: dependency-cache-{{ checksum "package.json" }} - - run: - name: Install dependencies - command: npm install --ignore-scripts - - save_cache: - key: dependency-cache-{{ checksum "package.json" }} - paths: - - ./node_modules - - run: - name: Build - command: npm run build - - e2e_test: - working_directory: ~/nest - docker: - - image: cimg/node:22.20.0 - steps: - - checkout - - *restore-cache - - *install-deps - - run: - name: E2E tests - command: npm run test:e2e - -workflows: - version: 2 - build-and-test: - jobs: - - build - - e2e_test: - requires: - - build diff --git a/node_modules/@nestjs/serve-static/.husky/commit-msg b/node_modules/@nestjs/serve-static/.husky/commit-msg deleted file mode 100644 index d468455..0000000 --- a/node_modules/@nestjs/serve-static/.husky/commit-msg +++ /dev/null @@ -1 +0,0 @@ -npx --no-install commitlint --edit $1 \ No newline at end of file diff --git a/node_modules/@nestjs/serve-static/.husky/pre-commit b/node_modules/@nestjs/serve-static/.husky/pre-commit deleted file mode 100644 index 041c660..0000000 --- a/node_modules/@nestjs/serve-static/.husky/pre-commit +++ /dev/null @@ -1 +0,0 @@ -npx --no-install lint-staged diff --git a/node_modules/@nestjs/serve-static/LICENSE b/node_modules/@nestjs/serve-static/LICENSE deleted file mode 100644 index d857afb..0000000 --- a/node_modules/@nestjs/serve-static/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - diff --git a/node_modules/@nestjs/serve-static/README.md b/node_modules/@nestjs/serve-static/README.md deleted file mode 100644 index cebb02e..0000000 --- a/node_modules/@nestjs/serve-static/README.md +++ /dev/null @@ -1,82 +0,0 @@ -

- Nest Logo -

- -[travis-image]: https://api.travis-ci.org/nestjs/nest.svg?branch=master -[travis-url]: https://travis-ci.org/nestjs/nest -[linux-image]: https://img.shields.io/travis/nestjs/nest/master.svg?label=linux -[linux-url]: https://travis-ci.org/nestjs/nest - -

A progressive Node.js framework for building efficient and scalable server-side applications.

-

-NPM Version -Package License -NPM Downloads -Discord -Backers on Open Collective -Sponsors on Open Collective - - -

- - -## Description - -`@nestjs/serve-static` package for [Nest](https://github.com/nestjs/nest), useful to serve static content like Single Page Applications (SPA). However, if you are building MVC application or want to serve assets files (images, docs), use the `useStaticAssets()` method (read more [here](https://docs.nestjs.com/techniques/mvc)) instead. - -## Installation - -```bash -$ npm i --save @nestjs/serve-static -``` - -## Example - -See full example [here](https://github.com/nestjs/nest/tree/master/sample/24-serve-static). - -## Usage - -Simply import `ServeStaticModule` in your Nest application. - -```typescript -import { Module } from '@nestjs/common'; -import { join } from 'path'; -import { ServeStaticModule } from '@nestjs/serve-static'; - -@Module({ - imports: [ - ServeStaticModule.forRoot({ - rootPath: join(__dirname, '..', 'client') - }) - ] -}) -export class ApplicationModule {} -``` - -## API Spec - -The `forRoot()` method takes an options object with a few useful properties. - -| Property | Type | Description | -| -------------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `rootPath` | string | Static files root directory. Default: `"client"` | -| `serveRoot` | string | Root path under which static app will be served. Default: `""` | -| `renderPath` | string / RegExp | Path to render static app (concatenated with the `serveRoot` value). Default: \* (wildcard - all paths). Note: `RegExp` is not supported by the `@nestjs/platform-fastify`. | -| `exclude` | string[] | Paths to exclude when serving the static app. WARNING! Not supported by `fastify`. If you use `fastify`, you can exclude routes using regexp (set the `renderPath` to a regular expression) instead. | -| `serveStaticOptions` | Object | Serve static options (static files) | -| `useGlobalPrefix` | boolean | If `true`, static app will be prefixed by the global prefix set through `setGlobalPrefix()`. Default: `false` https://docs.nestjs.com/faq/global-prefix | - -## Support - -Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support). - -## Stay in touch - -- Author - [Kamil Myśliwiec](https://twitter.com/kammysliwiec) -- Website - [https://nestjs.com](https://nestjs.com/) -- Twitter - [@nestframework](https://twitter.com/nestframework) - -## License - -Nest is [MIT licensed](LICENSE). diff --git a/node_modules/@nestjs/serve-static/dist/index.d.ts b/node_modules/@nestjs/serve-static/dist/index.d.ts deleted file mode 100644 index 97b7439..0000000 --- a/node_modules/@nestjs/serve-static/dist/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export * from './interfaces/serve-static-options.interface'; -export * from './loaders/abstract.loader'; -export * from './loaders/express.loader'; -export * from './loaders/fastify.loader'; -export * from './loaders/noop.loader'; -export * from './serve-static.constants'; -export * from './serve-static.module'; -export * from './serve-static.providers'; diff --git a/node_modules/@nestjs/serve-static/dist/index.js b/node_modules/@nestjs/serve-static/dist/index.js deleted file mode 100644 index 7d22a9e..0000000 --- a/node_modules/@nestjs/serve-static/dist/index.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./interfaces/serve-static-options.interface"), exports); -__exportStar(require("./loaders/abstract.loader"), exports); -__exportStar(require("./loaders/express.loader"), exports); -__exportStar(require("./loaders/fastify.loader"), exports); -__exportStar(require("./loaders/noop.loader"), exports); -__exportStar(require("./serve-static.constants"), exports); -__exportStar(require("./serve-static.module"), exports); -__exportStar(require("./serve-static.providers"), exports); diff --git a/node_modules/@nestjs/serve-static/dist/interfaces/serve-static-options.interface.d.ts b/node_modules/@nestjs/serve-static/dist/interfaces/serve-static-options.interface.d.ts deleted file mode 100644 index ab70bd4..0000000 --- a/node_modules/@nestjs/serve-static/dist/interfaces/serve-static-options.interface.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Provider, Type } from '@nestjs/common'; -import { ModuleMetadata } from '@nestjs/common/interfaces'; -export interface ServeStaticModuleOptions { - rootPath?: string; - renderPath?: string | RegExp; - useGlobalPrefix?: boolean; - serveRoot?: string; - exclude?: string[]; - serveStaticOptions?: { - acceptRanges?: boolean; - cacheControl?: boolean; - dotfiles?: string; - etag?: boolean; - fallthrough?: boolean; - extensions?: string[]; - immutable?: boolean; - index?: boolean | string | string[]; - lastModified?: boolean; - maxAge?: number | string; - redirect?: boolean; - setHeaders?: (res: any, path: string, stat: any) => any; - preCompressed?: boolean; - decorateReply?: boolean; - }; -} -export interface ServeStaticModuleOptionsFactory { - createLoggerOptions(): Promise | ServeStaticModuleOptions[]; -} -export interface ServeStaticModuleAsyncOptions extends Pick { - isGlobal?: boolean; - useExisting?: Type; - useClass?: Type; - useFactory?: (...args: any[]) => Promise | ServeStaticModuleOptions[]; - inject?: any[]; - extraProviders?: Provider[]; -} diff --git a/node_modules/@nestjs/serve-static/dist/interfaces/serve-static-options.interface.js b/node_modules/@nestjs/serve-static/dist/interfaces/serve-static-options.interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/@nestjs/serve-static/dist/interfaces/serve-static-options.interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/@nestjs/serve-static/dist/loaders/abstract.loader.d.ts b/node_modules/@nestjs/serve-static/dist/loaders/abstract.loader.d.ts deleted file mode 100644 index d1565ed..0000000 --- a/node_modules/@nestjs/serve-static/dist/loaders/abstract.loader.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { AbstractHttpAdapter, ApplicationConfig } from '@nestjs/core'; -import { ServeStaticModuleOptions } from '../interfaces/serve-static-options.interface'; -export declare abstract class AbstractLoader { - abstract register(httpAdapter: AbstractHttpAdapter, config: ApplicationConfig, options: ServeStaticModuleOptions[]): any; - getIndexFilePath(clientPath: string): string; -} diff --git a/node_modules/@nestjs/serve-static/dist/loaders/abstract.loader.js b/node_modules/@nestjs/serve-static/dist/loaders/abstract.loader.js deleted file mode 100644 index f39fdf2..0000000 --- a/node_modules/@nestjs/serve-static/dist/loaders/abstract.loader.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AbstractLoader = void 0; -const common_1 = require("@nestjs/common"); -const path_1 = require("path"); -let AbstractLoader = class AbstractLoader { - getIndexFilePath(clientPath) { - return (0, path_1.join)(clientPath, 'index.html'); - } -}; -exports.AbstractLoader = AbstractLoader; -exports.AbstractLoader = AbstractLoader = __decorate([ - (0, common_1.Injectable)() -], AbstractLoader); diff --git a/node_modules/@nestjs/serve-static/dist/loaders/express.loader.d.ts b/node_modules/@nestjs/serve-static/dist/loaders/express.loader.d.ts deleted file mode 100644 index c522fbe..0000000 --- a/node_modules/@nestjs/serve-static/dist/loaders/express.loader.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { AbstractHttpAdapter, ApplicationConfig } from '@nestjs/core'; -import { ServeStaticModuleOptions } from '../interfaces/serve-static-options.interface'; -import { AbstractLoader } from './abstract.loader'; -export declare class ExpressLoader extends AbstractLoader { - register(httpAdapter: AbstractHttpAdapter, config: ApplicationConfig, optionsArr: ServeStaticModuleOptions[]): void; -} diff --git a/node_modules/@nestjs/serve-static/dist/loaders/express.loader.js b/node_modules/@nestjs/serve-static/dist/loaders/express.loader.js deleted file mode 100644 index 7010659..0000000 --- a/node_modules/@nestjs/serve-static/dist/loaders/express.loader.js +++ /dev/null @@ -1,118 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ExpressLoader = void 0; -const common_1 = require("@nestjs/common"); -const load_package_util_1 = require("@nestjs/common/utils/load-package.util"); -const fs = __importStar(require("fs")); -const serve_static_constants_1 = require("../serve-static.constants"); -const is_route_excluded_util_1 = require("../utils/is-route-excluded.util"); -const validate_global_prefix_util_1 = require("../utils/validate-global-prefix.util"); -const validate_path_util_1 = require("../utils/validate-path.util"); -const abstract_loader_1 = require("./abstract.loader"); -let ExpressLoader = class ExpressLoader extends abstract_loader_1.AbstractLoader { - register(httpAdapter, config, optionsArr) { - const app = httpAdapter.getInstance(); - const globalPrefix = config.getGlobalPrefix(); - const express = (0, load_package_util_1.loadPackage)('express', 'ServeStaticModule', () => require('express')); - optionsArr.forEach((options) => { - options.renderPath = options.renderPath ?? serve_static_constants_1.DEFAULT_EXPRESS_RENDER_PATH; - const clientPath = options.rootPath ?? serve_static_constants_1.DEFAULT_ROOT_PATH; - const indexFilePath = this.getIndexFilePath(clientPath); - const renderFn = (req, res, next) => { - if (!(0, is_route_excluded_util_1.isRouteExcluded)(req, options.exclude)) { - if (options.serveStaticOptions?.setHeaders) { - const stat = fs.statSync(indexFilePath); - options.serveStaticOptions.setHeaders(res, indexFilePath, stat); - } - res.sendFile(indexFilePath, null, (err) => { - if (err) { - const error = new common_1.NotFoundException(err.message); - res.status(error.getStatus()).send(error.getResponse()); - } - }); - } - else { - next(); - } - }; - if (globalPrefix && - options.useGlobalPrefix && - (0, validate_global_prefix_util_1.validateGlobalPrefix)(globalPrefix)) { - options.serveRoot = `/${globalPrefix}${options.serveRoot || ''}`; - } - if (options.serveRoot) { - app.use(options.serveRoot, express.static(clientPath, options.serveStaticOptions)); - const renderPath = typeof options.serveRoot === 'string' - ? options.serveRoot + (0, validate_path_util_1.validatePath)(options.renderPath) - : options.serveRoot; - app.get(renderPath, renderFn); - } - else { - app.use(express.static(clientPath, options.serveStaticOptions)); - app.get(options.renderPath, renderFn); - } - app.use((err, req, _res, next) => { - if ((0, is_route_excluded_util_1.isRouteExcluded)(req, options.exclude)) { - const method = httpAdapter.getRequestMethod(req); - const url = httpAdapter.getRequestUrl(req); - return next(new common_1.NotFoundException(`Cannot ${method} ${url}`)); - } - if (err instanceof common_1.HttpException) { - throw err; - } - else if (err?.message?.includes('ENOENT')) { - throw new common_1.NotFoundException(err.message); - } - else if (err?.code === 'ENOENT') { - throw new common_1.NotFoundException(`ENOENT: ${err.message}`); - } - else { - next(err); - } - }); - }); - } -}; -exports.ExpressLoader = ExpressLoader; -exports.ExpressLoader = ExpressLoader = __decorate([ - (0, common_1.Injectable)() -], ExpressLoader); diff --git a/node_modules/@nestjs/serve-static/dist/loaders/fastify.loader.d.ts b/node_modules/@nestjs/serve-static/dist/loaders/fastify.loader.d.ts deleted file mode 100644 index 21c0dbf..0000000 --- a/node_modules/@nestjs/serve-static/dist/loaders/fastify.loader.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { AbstractHttpAdapter, ApplicationConfig } from '@nestjs/core'; -import { ServeStaticModuleOptions } from '../interfaces/serve-static-options.interface'; -import { AbstractLoader } from './abstract.loader'; -export declare class FastifyLoader extends AbstractLoader { - register(httpAdapter: AbstractHttpAdapter, config: ApplicationConfig, optionsArr: ServeStaticModuleOptions[]): void; -} diff --git a/node_modules/@nestjs/serve-static/dist/loaders/fastify.loader.js b/node_modules/@nestjs/serve-static/dist/loaders/fastify.loader.js deleted file mode 100644 index f0abd97..0000000 --- a/node_modules/@nestjs/serve-static/dist/loaders/fastify.loader.js +++ /dev/null @@ -1,109 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.FastifyLoader = void 0; -const common_1 = require("@nestjs/common"); -const load_package_util_1 = require("@nestjs/common/utils/load-package.util"); -const fs = __importStar(require("fs")); -const serve_static_constants_1 = require("../serve-static.constants"); -const validate_global_prefix_util_1 = require("../utils/validate-global-prefix.util"); -const validate_path_util_1 = require("../utils/validate-path.util"); -const abstract_loader_1 = require("./abstract.loader"); -let FastifyLoader = class FastifyLoader extends abstract_loader_1.AbstractLoader { - register(httpAdapter, config, optionsArr) { - const app = httpAdapter.getInstance(); - const globalPrefix = config.getGlobalPrefix(); - const fastifyStatic = (0, load_package_util_1.loadPackage)('@fastify/static', 'ServeStaticModule', () => require('@fastify/static')); - optionsArr.forEach((options) => { - options.renderPath = options.renderPath ?? serve_static_constants_1.DEFAULT_FASTIFY_RENDER_PATH; - const clientPath = options.rootPath ?? serve_static_constants_1.DEFAULT_ROOT_PATH; - const indexFilePath = this.getIndexFilePath(clientPath); - if (globalPrefix && - options.useGlobalPrefix && - (0, validate_global_prefix_util_1.validateGlobalPrefix)(globalPrefix)) { - options.serveRoot = `/${globalPrefix}${options.serveRoot || ''}`; - } - const renderFn = (req, res) => { - if (!options.serveStaticOptions?.fallthrough) { - const error = new common_1.NotFoundException(); - res.status(error.getStatus()).send(error.getResponse()); - return; - } - fs.stat(indexFilePath, (err, stat) => { - if (err) { - const error = new common_1.NotFoundException(); - res.status(error.getStatus()).send(error.getResponse()); - return; - } - const stream = fs.createReadStream(indexFilePath); - if (options.serveStaticOptions?.setHeaders) { - options.serveStaticOptions.setHeaders(res, indexFilePath, stat); - } - res.type('text/html').send(stream); - }); - }; - if (options.serveRoot) { - app.register(fastifyStatic, { - root: clientPath, - ...(options.serveStaticOptions || {}), - wildcard: false, - prefix: options.serveRoot - }); - const renderPath = typeof options.serveRoot === 'string' - ? options.serveRoot + (0, validate_path_util_1.validatePath)(options.renderPath) - : options.serveRoot; - app.get(renderPath, renderFn); - } - else { - app.register(fastifyStatic, { - root: clientPath, - ...(options.serveStaticOptions || {}), - wildcard: false - }); - app.get(options.renderPath, renderFn); - } - }); - } -}; -exports.FastifyLoader = FastifyLoader; -exports.FastifyLoader = FastifyLoader = __decorate([ - (0, common_1.Injectable)() -], FastifyLoader); diff --git a/node_modules/@nestjs/serve-static/dist/loaders/noop.loader.d.ts b/node_modules/@nestjs/serve-static/dist/loaders/noop.loader.d.ts deleted file mode 100644 index ef5ba45..0000000 --- a/node_modules/@nestjs/serve-static/dist/loaders/noop.loader.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { AbstractHttpAdapter, ApplicationConfig } from '@nestjs/core'; -import { ServeStaticModuleOptions } from '../interfaces/serve-static-options.interface'; -import { AbstractLoader } from './abstract.loader'; -export declare class NoopLoader extends AbstractLoader { - register(httpAdapter: AbstractHttpAdapter, config: ApplicationConfig, options: ServeStaticModuleOptions[]): void; -} diff --git a/node_modules/@nestjs/serve-static/dist/loaders/noop.loader.js b/node_modules/@nestjs/serve-static/dist/loaders/noop.loader.js deleted file mode 100644 index efc7a89..0000000 --- a/node_modules/@nestjs/serve-static/dist/loaders/noop.loader.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NoopLoader = void 0; -const common_1 = require("@nestjs/common"); -const abstract_loader_1 = require("./abstract.loader"); -let NoopLoader = class NoopLoader extends abstract_loader_1.AbstractLoader { - register(httpAdapter, config, options) { } -}; -exports.NoopLoader = NoopLoader; -exports.NoopLoader = NoopLoader = __decorate([ - (0, common_1.Injectable)() -], NoopLoader); diff --git a/node_modules/@nestjs/serve-static/dist/serve-static.constants.d.ts b/node_modules/@nestjs/serve-static/dist/serve-static.constants.d.ts deleted file mode 100644 index 154b9a0..0000000 --- a/node_modules/@nestjs/serve-static/dist/serve-static.constants.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare const SERVE_STATIC_MODULE_OPTIONS = "SERVE_STATIC_MODULE_OPTIONS"; -export declare const DEFAULT_ROOT_PATH = "client"; -export declare const DEFAULT_EXPRESS_RENDER_PATH = "{*any}"; -export declare const DEFAULT_FASTIFY_RENDER_PATH = "*"; diff --git a/node_modules/@nestjs/serve-static/dist/serve-static.constants.js b/node_modules/@nestjs/serve-static/dist/serve-static.constants.js deleted file mode 100644 index f7b326b..0000000 --- a/node_modules/@nestjs/serve-static/dist/serve-static.constants.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DEFAULT_FASTIFY_RENDER_PATH = exports.DEFAULT_EXPRESS_RENDER_PATH = exports.DEFAULT_ROOT_PATH = exports.SERVE_STATIC_MODULE_OPTIONS = void 0; -exports.SERVE_STATIC_MODULE_OPTIONS = 'SERVE_STATIC_MODULE_OPTIONS'; -exports.DEFAULT_ROOT_PATH = 'client'; -exports.DEFAULT_EXPRESS_RENDER_PATH = '{*any}'; -exports.DEFAULT_FASTIFY_RENDER_PATH = '*'; diff --git a/node_modules/@nestjs/serve-static/dist/serve-static.module.d.ts b/node_modules/@nestjs/serve-static/dist/serve-static.module.d.ts deleted file mode 100644 index af75459..0000000 --- a/node_modules/@nestjs/serve-static/dist/serve-static.module.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { DynamicModule, OnModuleInit } from '@nestjs/common'; -import { ApplicationConfig, HttpAdapterHost } from '@nestjs/core'; -import { ServeStaticModuleAsyncOptions, ServeStaticModuleOptions } from './interfaces/serve-static-options.interface'; -import { AbstractLoader } from './loaders/abstract.loader'; -export declare class ServeStaticModule implements OnModuleInit { - private readonly moduleOptions; - private readonly loader; - private readonly config; - private readonly httpAdapterHost; - constructor(moduleOptions: ServeStaticModuleOptions[], loader: AbstractLoader, config: ApplicationConfig, httpAdapterHost: HttpAdapterHost); - static forRoot(...options: ServeStaticModuleOptions[]): DynamicModule; - static forRootAsync(options: ServeStaticModuleAsyncOptions): DynamicModule; - private static createAsyncProviders; - private static createAsyncOptionsProvider; - onModuleInit(): void; -} diff --git a/node_modules/@nestjs/serve-static/dist/serve-static.module.js b/node_modules/@nestjs/serve-static/dist/serve-static.module.js deleted file mode 100644 index c9286b5..0000000 --- a/node_modules/@nestjs/serve-static/dist/serve-static.module.js +++ /dev/null @@ -1,91 +0,0 @@ -"use strict"; -var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -}; -var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); -}; -var __param = (this && this.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } -}; -var ServeStaticModule_1; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ServeStaticModule = void 0; -const common_1 = require("@nestjs/common"); -const core_1 = require("@nestjs/core"); -const abstract_loader_1 = require("./loaders/abstract.loader"); -const serve_static_constants_1 = require("./serve-static.constants"); -const serve_static_providers_1 = require("./serve-static.providers"); -let ServeStaticModule = ServeStaticModule_1 = class ServeStaticModule { - constructor(moduleOptions, loader, config, httpAdapterHost) { - this.moduleOptions = moduleOptions; - this.loader = loader; - this.config = config; - this.httpAdapterHost = httpAdapterHost; - } - static forRoot(...options) { - return { - module: ServeStaticModule_1, - providers: [ - { - provide: serve_static_constants_1.SERVE_STATIC_MODULE_OPTIONS, - useValue: options - } - ] - }; - } - static forRootAsync(options) { - return { - module: ServeStaticModule_1, - imports: options.imports, - providers: [ - ...this.createAsyncProviders(options), - ...(options.extraProviders || []) - ], - exports: [serve_static_constants_1.SERVE_STATIC_MODULE_OPTIONS] - }; - } - static createAsyncProviders(options) { - if (options.useExisting || options.useFactory) { - return [this.createAsyncOptionsProvider(options)]; - } - return [ - this.createAsyncOptionsProvider(options), - { - provide: options.useClass, - useClass: options.useClass - } - ]; - } - static createAsyncOptionsProvider(options) { - if (options.useFactory) { - return { - provide: serve_static_constants_1.SERVE_STATIC_MODULE_OPTIONS, - useFactory: options.useFactory, - inject: options.inject || [] - }; - } - return { - provide: serve_static_constants_1.SERVE_STATIC_MODULE_OPTIONS, - useFactory: async (optionsFactory) => optionsFactory.createLoggerOptions(), - inject: [options.useExisting || options.useClass] - }; - } - onModuleInit() { - const httpAdapter = this.httpAdapterHost.httpAdapter; - this.loader.register(httpAdapter, this.config, this.moduleOptions); - } -}; -exports.ServeStaticModule = ServeStaticModule; -exports.ServeStaticModule = ServeStaticModule = ServeStaticModule_1 = __decorate([ - (0, common_1.Module)({ - providers: [...serve_static_providers_1.serveStaticProviders] - }), - __param(0, (0, common_1.Inject)(serve_static_constants_1.SERVE_STATIC_MODULE_OPTIONS)), - __metadata("design:paramtypes", [Array, abstract_loader_1.AbstractLoader, - core_1.ApplicationConfig, - core_1.HttpAdapterHost]) -], ServeStaticModule); diff --git a/node_modules/@nestjs/serve-static/dist/serve-static.providers.d.ts b/node_modules/@nestjs/serve-static/dist/serve-static.providers.d.ts deleted file mode 100644 index 0cd415b..0000000 --- a/node_modules/@nestjs/serve-static/dist/serve-static.providers.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Provider } from '@nestjs/common'; -export declare const serveStaticProviders: Provider[]; diff --git a/node_modules/@nestjs/serve-static/dist/serve-static.providers.js b/node_modules/@nestjs/serve-static/dist/serve-static.providers.js deleted file mode 100644 index dbdba77..0000000 --- a/node_modules/@nestjs/serve-static/dist/serve-static.providers.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.serveStaticProviders = void 0; -const core_1 = require("@nestjs/core"); -const abstract_loader_1 = require("./loaders/abstract.loader"); -const express_loader_1 = require("./loaders/express.loader"); -const fastify_loader_1 = require("./loaders/fastify.loader"); -const noop_loader_1 = require("./loaders/noop.loader"); -exports.serveStaticProviders = [ - { - provide: abstract_loader_1.AbstractLoader, - useFactory: (httpAdapterHost) => { - if (!httpAdapterHost || !httpAdapterHost.httpAdapter) { - return new noop_loader_1.NoopLoader(); - } - const httpAdapter = httpAdapterHost.httpAdapter; - if (httpAdapter && - httpAdapter.constructor && - httpAdapter.constructor.name === 'FastifyAdapter') { - return new fastify_loader_1.FastifyLoader(); - } - return new express_loader_1.ExpressLoader(); - }, - inject: [core_1.HttpAdapterHost] - } -]; diff --git a/node_modules/@nestjs/serve-static/dist/utils/is-route-excluded.util.d.ts b/node_modules/@nestjs/serve-static/dist/utils/is-route-excluded.util.d.ts deleted file mode 100644 index eb6c2f8..0000000 --- a/node_modules/@nestjs/serve-static/dist/utils/is-route-excluded.util.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const isRouteExcluded: (req: any, paths?: string[]) => boolean; diff --git a/node_modules/@nestjs/serve-static/dist/utils/is-route-excluded.util.js b/node_modules/@nestjs/serve-static/dist/utils/is-route-excluded.util.js deleted file mode 100644 index 6089cf2..0000000 --- a/node_modules/@nestjs/serve-static/dist/utils/is-route-excluded.util.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isRouteExcluded = void 0; -const path_to_regexp_1 = require("path-to-regexp"); -const isRouteExcluded = (req, paths = []) => { - return paths.some((path) => { - const { regexp } = (0, path_to_regexp_1.pathToRegexp)(path); - const queryParamsIndex = req.originalUrl.indexOf('?'); - const pathname = queryParamsIndex >= 0 - ? req.originalUrl.slice(0, queryParamsIndex) - : req.originalUrl; - if (!regexp.exec(pathname + '/')) { - return false; - } - return true; - }); -}; -exports.isRouteExcluded = isRouteExcluded; diff --git a/node_modules/@nestjs/serve-static/dist/utils/service-static.utils.d.ts b/node_modules/@nestjs/serve-static/dist/utils/service-static.utils.d.ts deleted file mode 100644 index 130922c..0000000 --- a/node_modules/@nestjs/serve-static/dist/utils/service-static.utils.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare function loadPackage( - packageName: string, - context: string, - loaderFn?: () => T -): T; diff --git a/node_modules/@nestjs/serve-static/dist/utils/service-static.utils.js b/node_modules/@nestjs/serve-static/dist/utils/service-static.utils.js deleted file mode 100644 index 2024059..0000000 --- a/node_modules/@nestjs/serve-static/dist/utils/service-static.utils.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const common_1 = require("@nestjs/common"); -const MISSING_REQUIRED_DEPENDENCY = (name, reason) => `The "${name}" package is missing. Please, make sure to install this library ($ npm install ${name}) to take advantage of ${reason}.`; -const logger = new common_1.Logger('PackageLoader'); -function loadPackage(packageName, context, loaderFn) { - try { - return loaderFn ? loaderFn() : require(packageName); - } - catch (e) { - logger.error(MISSING_REQUIRED_DEPENDENCY(packageName, context)); - process.exit(1); - } -} -exports.loadPackage = loadPackage; diff --git a/node_modules/@nestjs/serve-static/dist/utils/validate-global-prefix.util.d.ts b/node_modules/@nestjs/serve-static/dist/utils/validate-global-prefix.util.d.ts deleted file mode 100644 index a8ad70d..0000000 --- a/node_modules/@nestjs/serve-static/dist/utils/validate-global-prefix.util.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const validateGlobalPrefix: (globalPrefix: string) => boolean; diff --git a/node_modules/@nestjs/serve-static/dist/utils/validate-global-prefix.util.js b/node_modules/@nestjs/serve-static/dist/utils/validate-global-prefix.util.js deleted file mode 100644 index 3d8d37d..0000000 --- a/node_modules/@nestjs/serve-static/dist/utils/validate-global-prefix.util.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.validateGlobalPrefix = void 0; -const validateGlobalPrefix = (globalPrefix) => !globalPrefix.match(/^(\/?)$/); -exports.validateGlobalPrefix = validateGlobalPrefix; diff --git a/node_modules/@nestjs/serve-static/dist/utils/validate-path.util.d.ts b/node_modules/@nestjs/serve-static/dist/utils/validate-path.util.d.ts deleted file mode 100644 index 350d020..0000000 --- a/node_modules/@nestjs/serve-static/dist/utils/validate-path.util.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const validatePath: (path: string) => string; diff --git a/node_modules/@nestjs/serve-static/dist/utils/validate-path.util.js b/node_modules/@nestjs/serve-static/dist/utils/validate-path.util.js deleted file mode 100644 index 38f1a55..0000000 --- a/node_modules/@nestjs/serve-static/dist/utils/validate-path.util.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.validatePath = void 0; -const validatePath = (path) => path && path.charAt(0) !== '/' ? `/${path}` : path; -exports.validatePath = validatePath; diff --git a/node_modules/@nestjs/serve-static/eslint.config.mjs b/node_modules/@nestjs/serve-static/eslint.config.mjs deleted file mode 100644 index b5364b0..0000000 --- a/node_modules/@nestjs/serve-static/eslint.config.mjs +++ /dev/null @@ -1,41 +0,0 @@ -// @ts-check -import eslint from '@eslint/js'; -import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; -import globals from 'globals'; -import tseslint from 'typescript-eslint'; - -export default tseslint.config( - { - ignores: ['tests/**'], - }, - eslint.configs.recommended, - ...tseslint.configs.recommendedTypeChecked, - eslintPluginPrettierRecommended, - { - languageOptions: { - globals: { - ...globals.node, - ...globals.jest, - }, - ecmaVersion: 5, - sourceType: 'module', - parserOptions: { - projectService: true, - tsconfigRootDir: import.meta.dirname, - }, - }, - }, - { - rules: { - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/no-unsafe-assignment': 'off', - '@typescript-eslint/no-unsafe-call': 'off', - '@typescript-eslint/no-unsafe-member-access': 'off', - '@typescript-eslint/no-unsafe-function-type': 'off', - '@typescript-eslint/no-unsafe-argument': 'off', - '@typescript-eslint/no-unsafe-return': 'off', - '@typescript-eslint/require-await': 'warn', - '@typescript-eslint/no-require-imports': 'off', - }, - }, -); \ No newline at end of file diff --git a/node_modules/@nestjs/serve-static/index.d.ts b/node_modules/@nestjs/serve-static/index.d.ts deleted file mode 100644 index 5703fb5..0000000 --- a/node_modules/@nestjs/serve-static/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './dist'; diff --git a/node_modules/@nestjs/serve-static/index.js b/node_modules/@nestjs/serve-static/index.js deleted file mode 100644 index 9368dd3..0000000 --- a/node_modules/@nestjs/serve-static/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("./dist")); diff --git a/node_modules/@nestjs/serve-static/package.json b/node_modules/@nestjs/serve-static/package.json deleted file mode 100644 index 6fecabd..0000000 --- a/node_modules/@nestjs/serve-static/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "@nestjs/serve-static", - "version": "5.0.4", - "description": "Nest - modern, fast, powerful node.js web framework (@serve-static)", - "author": "Kamil Mysliwiec", - "license": "MIT", - "scripts": { - "build": "npm run build:lib", - "build:lib": "tsc -p tsconfig.json", - "format": "prettier --write \"**/*.ts\"", - "lint": "eslint 'lib/**/*.ts' --fix", - "prepublish:npm": "npm run build", - "publish:npm": "npm publish --access public", - "prepublish:next": "npm run build", - "publish:next": "npm publish --access public --tag next", - "prerelease": "npm run build", - "release": "release-it", - "test:e2e": "jest --config ./tests/jest-e2e.json --runInBand", - "prepare": "husky" - }, - "peerDependencies": { - "@fastify/static": "^8.0.4", - "@nestjs/common": "^11.0.2", - "@nestjs/core": "^11.0.2", - "express": "^5.0.1", - "fastify": "^5.2.1" - }, - "peerDependenciesMeta": { - "express": { - "optional": true - }, - "fastify": { - "optional": true - }, - "@fastify/static": { - "optional": true - } - }, - "devDependencies": { - "@commitlint/cli": "20.1.0", - "@commitlint/config-angular": "20.0.0", - "@eslint/eslintrc": "3.3.1", - "@eslint/js": "9.37.0", - "@fastify/static": "8.2.0", - "@nestjs/common": "11.1.6", - "@nestjs/core": "11.1.6", - "@nestjs/platform-express": "11.1.6", - "@nestjs/platform-fastify": "11.1.6", - "@nestjs/testing": "11.1.6", - "@types/jest": "30.0.0", - "@types/node": "22.18.9", - "@types/supertest": "6.0.3", - "eslint": "9.37.0", - "eslint-config-prettier": "10.1.8", - "eslint-plugin-prettier": "5.5.4", - "express": "5.1.0", - "fastify": "5.6.1", - "globals": "16.4.0", - "husky": "9.1.7", - "jest": "30.2.0", - "lint-staged": "16.2.3", - "prettier": "3.6.2", - "reflect-metadata": "0.2.2", - "release-it": "19.0.5", - "rxjs": "7.8.2", - "supertest": "7.1.4", - "ts-jest": "29.4.5", - "typescript": "5.9.3", - "typescript-eslint": "8.46.0" - }, - "lint-staged": { - "*.ts": [ - "prettier --write" - ] - }, - "repository": { - "type": "git", - "url": "https://github.com/nestjs/serve-static" - }, - "dependencies": { - "path-to-regexp": "8.3.0" - } -} diff --git a/node_modules/@nestjs/serve-static/tests/client/index.html b/node_modules/@nestjs/serve-static/tests/client/index.html deleted file mode 100644 index dd6eb71..0000000 --- a/node_modules/@nestjs/serve-static/tests/client/index.html +++ /dev/null @@ -1,7 +0,0 @@ - -

Static website

- diff --git a/node_modules/@nestjs/serve-static/tests/client/logo.svg b/node_modules/@nestjs/serve-static/tests/client/logo.svg deleted file mode 100644 index 45d625a..0000000 --- a/node_modules/@nestjs/serve-static/tests/client/logo.svg +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/node_modules/@nestjs/serve-static/tests/e2e/express-adapter.e2e-spec.ts b/node_modules/@nestjs/serve-static/tests/e2e/express-adapter.e2e-spec.ts deleted file mode 100644 index 822713f..0000000 --- a/node_modules/@nestjs/serve-static/tests/e2e/express-adapter.e2e-spec.ts +++ /dev/null @@ -1,159 +0,0 @@ -import { INestApplication } from '@nestjs/common'; -import { NestFactory } from '@nestjs/core'; -import { Server } from 'net'; -import request from 'supertest'; -import { AppModule } from '../src/app.module'; -import { NoopLogger } from '../utils/noop-logger'; - -describe('Express adapter', () => { - let server: Server; - let app: INestApplication; - - describe('when middleware throws generic error', () => { - beforeAll(async () => { - app = await NestFactory.create(AppModule.withDefaults(), { - logger: new NoopLogger() - }); - app.use((_req, _res, next) => next(new Error('Something went wrong'))); - - server = app.getHttpServer(); - await app.init(); - }); - - describe('GET /index.html', () => { - it('should return Iternal Server Error', async () => { - return request(server).get('/index.html').expect(500); - }); - }); - }); - - describe('when "fallthrough" option is set to "true"', () => { - beforeAll(async () => { - app = await NestFactory.create(AppModule.withFallthrough(), { - logger: new NoopLogger() - }); - app.setGlobalPrefix('api'); - - server = app.getHttpServer(); - await app.init(); - }); - - describe('GET /api', () => { - it('should return "Hello, world!"', async () => { - return request(server).get('/api').expect(200).expect('Hello, world!'); - }); - }); - - describe('GET /', () => { - it('should return HTML file', async () => { - return request(server) - .get('/') - .expect(200) - .expect('Content-Type', /html/); - }); - }); - - describe('GET /index.html', () => { - it('should return index page', async () => { - return request(server) - .get('/index.html') - .expect(200) - .expect('Content-Type', /html/) - .expect(/Static website/); - }); - }); - - describe('GET /logo.svg', () => { - it('should return logo', async () => { - return request(server) - .get('/logo.svg') - .expect(200) - .expect('Content-Type', /image/); - }); - }); - - describe('when trying to get a non-existing file', () => { - it('should return index page', async () => { - return request(server) - .get('/404') - .expect(200) - .expect('Content-Type', /html/) - .expect(/Static website/); - }); - }); - - afterAll(async () => { - await app.close(); - }); - }); - - describe('when "fallthrough" option is set to "false"', () => { - beforeAll(async () => { - app = await NestFactory.create(AppModule.withoutFallthrough(), { - logger: new NoopLogger() - }); - app.setGlobalPrefix('api'); - - server = app.getHttpServer(); - await app.init(); - }); - - describe('GET /api', () => { - it('should return "Hello, world!"', async () => { - return request(server).get('/api').expect(200).expect('Hello, world!'); - }); - }); - - describe('GET /', () => { - it('should return HTML file', async () => { - return request(server) - .get('/') - .expect(200) - .expect('Content-Type', /html/); - }); - }); - - describe('GET /index.html', () => { - it('should return index page', async () => { - return request(server) - .get('/index.html') - .expect(200) - .expect('Content-Type', /html/) - .expect(/Static website/); - }); - }); - - describe('GET /logo.svg', () => { - it('should return logo', async () => { - return request(server) - .get('/logo.svg') - .expect(200) - .expect('Content-Type', /image/); - }); - }); - - describe('when trying to get a non-existing file', () => { - it('should return 404', async () => { - return request(server) - .get('/404') - .expect(404) - .expect(/Not Found/) - .expect(/ENOENT/); - }); - }); - - describe('when trying to hit a non-existing route under the excluded path', () => { - it('should return 404', async () => { - return request(server) - .get('/api/404') - .expect(404) - .expect(/Not Found/) - .expect(/Cannot GET \/api\/404/); - }); - }); - - afterAll(async () => { - await app.close(); - }); - }); -}); diff --git a/node_modules/@nestjs/serve-static/tests/e2e/fastify-adapter.e2e-spec.ts b/node_modules/@nestjs/serve-static/tests/e2e/fastify-adapter.e2e-spec.ts deleted file mode 100644 index b8a3e60..0000000 --- a/node_modules/@nestjs/serve-static/tests/e2e/fastify-adapter.e2e-spec.ts +++ /dev/null @@ -1,193 +0,0 @@ -import { NestFactory } from '@nestjs/core'; -import { - FastifyAdapter, - NestFastifyApplication -} from '@nestjs/platform-fastify'; -import { AppModule } from '../src/app.module'; -import { NoopLogger } from '../utils/noop-logger'; -import request from 'supertest'; - -describe('Fastify adapter', () => { - let app: NestFastifyApplication; - - describe('when "fallthrough" option is set to "true"', () => { - beforeAll(async () => { - app = await NestFactory.create( - AppModule.withFallthrough(), - new FastifyAdapter(), - { - logger: new NoopLogger() - } - ); - app.setGlobalPrefix('api'); - - await app.init(); - await app.getHttpAdapter().getInstance().ready(); - }); - - describe('GET /api', () => { - it('should return "Hello, world!"', async () => { - return app - .inject({ - method: 'GET', - url: '/api' - }) - .then((result) => { - expect(result.statusCode).toEqual(200); - expect(result.payload).toEqual('Hello, world!'); - }); - }); - }); - - describe('GET /', () => { - it('should return HTML file', async () => { - return app - .inject({ - method: 'GET', - url: '/' - }) - .then((result) => { - expect(result.statusCode).toEqual(200); - expect(result.headers['content-type']).toMatch(/html/); - expect(result.payload).toContain('Static website'); - }); - }); - }); - - describe('GET /index.html', () => { - it('should return index page', async () => { - return app - .inject({ - method: 'GET', - url: '/index.html' - }) - .then((result) => { - expect(result.statusCode).toEqual(200); - expect(result.payload).toContain('Static website'); - }); - }); - }); - - describe('GET /logo.svg', () => { - it('should return logo', async () => { - return app - .inject({ - method: 'GET', - url: '/logo.svg' - }) - .then((result) => { - expect(result.statusCode).toEqual(200); - expect(result.headers['content-type']).toMatch(/image/); - }); - }); - }); - - describe('when trying to get a non-existing file', () => { - it('should returns index page', async () => { - return app - .inject({ - method: 'GET', - url: '/404' - }) - .then((result) => { - expect(result.statusCode).toEqual(200); - expect(result.payload).toContain('Static website'); - }); - }); - }); - - afterAll(async () => { - await app.close(); - }); - }); - - describe('when "fallthrough" option is set to "false"', () => { - beforeAll(async () => { - app = await NestFactory.create( - AppModule.withoutFallthrough(), - new FastifyAdapter(), - { - logger: new NoopLogger() - } - ); - app.setGlobalPrefix('api'); - - await app.init(); - await app.getHttpAdapter().getInstance().ready(); - }); - - describe('GET /api', () => { - it('should return "Hello, world!"', async () => { - return app - .inject({ - method: 'GET', - url: '/api' - }) - .then((result) => { - expect(result.statusCode).toEqual(200); - expect(result.payload).toEqual('Hello, world!'); - }); - }); - }); - - describe('GET /', () => { - it('should return HTML file', async () => { - return app - .inject({ - method: 'GET', - url: '/' - }) - .then((result) => { - expect(result.statusCode).toEqual(200); - expect(result.headers['content-type']).toMatch(/html/); - expect(result.payload).toContain('Static website'); - }); - }); - }); - - describe('GET /index.html', () => { - it('should return index page', async () => { - return app - .inject({ - method: 'GET', - url: '/index.html' - }) - .then((result) => { - expect(result.statusCode).toEqual(200); - expect(result.payload).toContain('Static website'); - }); - }); - }); - - describe('GET /logo.svg', () => { - it('should return logo', async () => { - return app - .inject({ - method: 'GET', - url: '/logo.svg' - }) - .then((result) => { - expect(result.statusCode).toEqual(200); - expect(result.headers['content-type']).toMatch(/image/); - }); - }); - }); - - describe('when trying to get a non-existing file', () => { - it('should return 404', async () => { - return app - .inject({ - method: 'GET', - url: '/404' - }) - .then((result) => { - expect(result.statusCode).toEqual(404); - }); - }); - }); - - afterAll(async () => { - await app.close(); - }); - }); -}); diff --git a/node_modules/@nestjs/serve-static/tests/jest-e2e.json b/node_modules/@nestjs/serve-static/tests/jest-e2e.json deleted file mode 100644 index 4ca0d87..0000000 --- a/node_modules/@nestjs/serve-static/tests/jest-e2e.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "moduleFileExtensions": ["js", "json", "ts"], - "rootDir": ".", - "testEnvironment": "node", - "testRegex": ".spec.ts$", - "transform": { - "^.+\\.(t|j)s$": "ts-jest" - } -} diff --git a/node_modules/@nestjs/serve-static/tests/src/app.controller.ts b/node_modules/@nestjs/serve-static/tests/src/app.controller.ts deleted file mode 100644 index eb4ffb8..0000000 --- a/node_modules/@nestjs/serve-static/tests/src/app.controller.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Controller, Get } from '@nestjs/common'; - -@Controller() -export class AppController { - @Get() - getHello() { - return 'Hello, world!'; - } -} diff --git a/node_modules/@nestjs/serve-static/tests/src/app.module.ts b/node_modules/@nestjs/serve-static/tests/src/app.module.ts deleted file mode 100644 index fc63321..0000000 --- a/node_modules/@nestjs/serve-static/tests/src/app.module.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { Module } from '@nestjs/common'; -import { join } from 'path'; -import { ServeStaticModule } from '../../lib'; -import { AppController } from './app.controller'; - -@Module({ - controllers: [AppController] -}) -export class AppModule { - static withDefaults() { - return { - module: AppModule, - imports: [ - ServeStaticModule.forRoot({ - rootPath: join(__dirname, '..', 'client'), - exclude: ['/api/{*any}'] - }) - ] - }; - } - - static withFallthrough() { - return { - module: AppModule, - imports: [ - ServeStaticModule.forRoot({ - rootPath: join(__dirname, '..', 'client'), - exclude: ['/api/{*any}'], - serveStaticOptions: { - fallthrough: true - } - }) - ] - }; - } - - static withoutFallthrough() { - return { - module: AppModule, - imports: [ - ServeStaticModule.forRoot({ - rootPath: join(__dirname, '..', 'client'), - exclude: ['/api/{*any}'], - serveStaticOptions: { - fallthrough: false - } - }) - ] - }; - } -} diff --git a/node_modules/@nestjs/serve-static/tests/src/main.ts b/node_modules/@nestjs/serve-static/tests/src/main.ts deleted file mode 100644 index bbab0a3..0000000 --- a/node_modules/@nestjs/serve-static/tests/src/main.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { NestFactory } from '@nestjs/core'; -import { AppModule } from './app.module'; - -async function bootstrap() { - const app = await NestFactory.create(AppModule.withoutFallthrough()); - app.setGlobalPrefix('api'); - - await app.listen(3000); - console.log(`Application is running on: ${await app.getUrl()}`); -} -bootstrap(); diff --git a/node_modules/@nestjs/serve-static/tests/utils/noop-logger.ts b/node_modules/@nestjs/serve-static/tests/utils/noop-logger.ts deleted file mode 100644 index 8165a18..0000000 --- a/node_modules/@nestjs/serve-static/tests/utils/noop-logger.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ConsoleLogger } from '@nestjs/common'; - -export class NoopLogger extends ConsoleLogger { - error(message: any, trace?: string, context?: string) {} - warn(message: any, context?: string) {} - log(message: any, context?: string) {} - debug(message: any, context?: string) {} - verbose(message: any, context?: string) {} -} diff --git a/node_modules/@nuxt/opencollective/LICENSE b/node_modules/@nuxt/opencollective/LICENSE deleted file mode 100644 index 3d0a849..0000000 --- a/node_modules/@nuxt/opencollective/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 Nuxt Community - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@nuxt/opencollective/README.md b/node_modules/@nuxt/opencollective/README.md deleted file mode 100644 index 863b936..0000000 --- a/node_modules/@nuxt/opencollective/README.md +++ /dev/null @@ -1,121 +0,0 @@ -# @nuxtjs/opencollective 🤝 Pretty opencollective stats on postinstall! -[![npm version][npm-v-src]][npm-v-href] -[![npm downloads][npm-d-src]][npm-d-href] -[![status][github-actions-src]][github-actions-href] - -![Showcase](https://i.imgur.com/PZqyT3x.jpg) - -> - -[📖 **Release Notes**](./CHANGELOG.md) - -## Features - -Displaying **opencollective** statistics and a donation URL after users install a package -is important for many creators. After problems with current packages that offer similar -features, we decided to spin off our one own. Our key goals are: - -* No interference/problems when installing packages. Never break installation because of the package -* Pretty output for all information -* Decent configurability -* Seamless drop-in for [common](https://github.com/opencollective/opencollective-cli) [solutions](https://github.com/opencollective/opencollective-postinstall) - -## Setup - -- Add `@nuxtjs/opencollective` dependency using yarn or npm to your project -- Add the script to `postinstall` in your package.json - -```js -{ - // ... - "scripts": { - "postinstall": "opencollective || exit 0" - }, - "collective": { - "url": "https://opencollective.com/nuxtjs" - } - // ... -} -``` - -- Configure it - -## Configuration - -Configuration is applied through your project's `package.json`. - -A full configuration looks like: - -```json -{ - "collective": { - "url": "https://opencollective.com/nuxtjs", - "logoUrl": "https://opencollective.com/nuxtjs/logo.txt?reverse=true&variant=variant2", - "donation": { - "slug": "/order/591", - "amount": "50", - "text": "Please donate:" - } - } -} -``` - ---- - -| Attribute | Optional | Default | Comment | -| --- | --- | --- | --- | -| url | ❌ | - | The URL to your opencollective page -| logo | ✅ | - | **LEGACY**: The URL to the logo that should be displayed. Please use `logoUrl` instead. -| logoUrl | ✅ | - | The URL to the ASCII-logo that should be displayed. -| donation.slug | ✅ | '/donate' | The slug that should be appended to `url`. Can be used to setup a specific order. -| donation.amount | ✅ | - | The default amount that should be selected on the opencollective page. -| donation.text | ✅ | 'Donate:' | The text that will be displayed before your donation url. - -## Disable message - -We know the postinstall messages can be annoying when deploying in -production or running a CI pipeline. That's why the message is -**disabled** in those environments by default. - -**Enabled** when one the following environment variables is set: - -* `NODE_ENV=dev` -* `NODE_ENV=development` -* `OPENCOLLECTIVE_FORCE` - -**Strictly Disabled** when one the following environment variables is set: - -- `OC_POSTINSTALL_TEST` -- `OPENCOLLECTIVE_HIDE` -- `CI` -- `CONTINUOUS_INTEGRATION` -- `NODE_ENV` (set and **not** `dev` or `development`) -- `DISABLE_OPENCOLLECTIVE` (set to any string value that is not `'false'` or `'0'`, - for compatibility with - [opencollective-postinstall](https://github.com/opencollective/opencollective-postinstall)) - -## Development - -- Clone this repository -- Install dependencies using `pnpm install` -- Run it manually `path/to/project/root/src/index.js path/to/package/you/want/to/try` -- Run tests with `npm t` or `pnpm test` - -## Inspiration - -This project is heavily inspired by [opencollective-cli](https://github.com/opencollective/opencollective-cli). - -## License - -[MIT License](./LICENSE) -MIT. Made with 💖 - - -[npm-v-src]: https://img.shields.io/npm/v/@nuxtjs/opencollective?style=flat-square -[npm-v-href]: https://npmjs.com/package/@nuxtjs/opencollective - -[npm-d-src]: https://img.shields.io/npm/dm/@nuxtjs/opencollective?style=flat-square -[npm-d-href]: https://npmjs.com/package/@nuxtjs/opencollective - -[github-actions-src]: https://img.shields.io/github/workflow/status/nuxt-contrib/opencollective/ci/main?style=flat-square -[github-actions-href]: https://github.com/nuxt-contrib/opencollective/actions?query=workflow%3Aci diff --git a/node_modules/@nuxt/opencollective/bin/opencollective.js b/node_modules/@nuxt/opencollective/bin/opencollective.js deleted file mode 100644 index ef5cee1..0000000 --- a/node_modules/@nuxt/opencollective/bin/opencollective.js +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env node -require('../dist/index.js') - .init(process.argv.length > 2 ? process.argv[2] : '.') - .then(() => process.exit(0)) - .catch(() => process.exit(1)) diff --git a/node_modules/@nuxt/opencollective/dist/index.js b/node_modules/@nuxt/opencollective/dist/index.js deleted file mode 100644 index fa4fb2e..0000000 --- a/node_modules/@nuxt/opencollective/dist/index.js +++ /dev/null @@ -1,397 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var child_process = require('child_process'); -var utils = require('consola/utils'); -var consola = require('consola'); -var path = require('path'); -var fs = require('fs'); - -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - -var path__default = /*#__PURE__*/_interopDefaultLegacy(path); -var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs); - -// eslint-disable-next-line import/named -var reportAndThrowError = function reportAndThrowError(msg) { - report(msg); - throw new Error(msg); -}; -var report = function report(message) { - consola.consola.debug({ - message: String(message), - tag: 'opencollective' - }); -}; -var hideMessage = function hideMessage() { - var env = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : process.env; - // Show message if it is forced - if (env.OPENCOLLECTIVE_FORCE) { - return false; - } - - // Don't show after oracle postinstall - if (env.OC_POSTINSTALL_TEST) { - return true; - } - // Don't show if opted-out - if (env.OPENCOLLECTIVE_HIDE) { - return true; - } - - // Compatability with opencollective-postinstall - if (!!env.DISABLE_OPENCOLLECTIVE && env.DISABLE_OPENCOLLECTIVE !== '0' && env.DISABLE_OPENCOLLECTIVE !== 'false') { - return true; - } - - // Don't show if on CI - if (env.CI || env.CONTINUOUS_INTEGRATION) { - return true; - } - - // Only show in dev environment - return Boolean(env.NODE_ENV) && !['dev', 'development'].includes(env.NODE_ENV); -}; -var formatMoney = function formatMoney(currency) { - return function (amount) { - amount = amount / 100; // converting cents - - var precision = 0; - return amount.toLocaleString(currency, { - style: 'currency', - currency: currency, - minimumFractionDigits: precision, - maximumFractionDigits: precision - }); - }; -}; -var isWin32 = process.platform === 'win32'; -var stripLeadingSlash = function stripLeadingSlash(s) { - return s.startsWith('/') ? s.substring(1) : s; -}; -var stripTrailingSlash = function stripTrailingSlash(s) { - return s.endsWith('/') ? s.slice(0, -1) : s; -}; - -/* eslint-disable no-console */ -var print = function print() { - var color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - return function () { - var str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; - var terminalCols = retrieveCols(); - var strLength = str.replace(/\u001B\[[0-9]{2}m/g, '').length; - var leftPaddingLength = Math.floor((terminalCols - strLength) / 2); - var leftPadding = ' '.repeat(Math.max(leftPaddingLength, 0)); - if (color) { - str = utils.colors[color] ? utils.colors[color](str) : str; - } - console.log(leftPadding, str); - }; -}; -var retrieveCols = function () { - var result = false; - return function () { - if (result) { - return result; - } - var defaultCols = 80; - try { - var terminalCols = child_process.execSync('tput cols', { - stdio: ['pipe', 'pipe', 'ignore'] - }); - result = parseInt(terminalCols.toString()) || defaultCols; - } catch (e) { - result = defaultCols; - } - return result; - }; -}(); -var printStats = function printStats(stats, color) { - if (!stats) { - return; - } - var colored = print(color); - var bold = print('bold'); - var formatWithCurrency = formatMoney(stats.currency); - colored("Number of contributors: ".concat(stats.contributorsCount)); - colored("Number of backers: ".concat(stats.backersCount)); - colored("Annual budget: ".concat(formatWithCurrency(stats.yearlyIncome))); - bold("Current balance: ".concat(formatWithCurrency(stats.balance)), 'bold'); -}; -var printLogo = function printLogo(logoText) { - if (!logoText) { - return; - } - logoText.split('\n').forEach(print('blue')); -}; - -/** - * Only show emoji on OSx (Windows shell doesn't like them that much ¯\_(ツ)_/¯ ) - * @param {*} emoji - */ -var emoji = function emoji(_emoji) { - return process.stdout.isTTY && !isWin32 ? _emoji : ''; -}; -function printFooter(collective) { - var dim = print('dim'); - var yellow = print('yellow'); - var emptyLine = print(); - yellow("Thanks for installing ".concat(collective.slug, " ").concat(emoji('🙏'))); - dim('Please consider donating to our open collective'); - dim('to help us maintain this package.'); - emptyLine(); - printStats(collective.stats); - emptyLine(); - print()("".concat(utils.colors.bold("".concat(emoji('👉 '), " ").concat(collective.donationText)), " ").concat(utils.colors.underline(collective.donationUrl))); - emptyLine(); -} - -function _arrayLikeToArray(r, a) { - (null == a || a > r.length) && (a = r.length); - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; - return n; -} -function _arrayWithHoles(r) { - if (Array.isArray(r)) return r; -} -function _iterableToArrayLimit(r, l) { - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; - if (null != t) { - var e, - n, - i, - u, - a = [], - f = !0, - o = !1; - try { - if (i = (t = t.call(r)).next, 0 === l) { - if (Object(t) !== t) return; - f = !1; - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); - } catch (r) { - o = !0, n = r; - } finally { - try { - if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; - } finally { - if (o) throw n; - } - } - return a; - } -} -function _nonIterableRest() { - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} -function _slicedToArray(r, e) { - return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); -} -function _unsupportedIterableToArray(r, a) { - if (r) { - if ("string" == typeof r) return _arrayLikeToArray(r, a); - var t = {}.toString.call(r).slice(8, -1); - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; - } -} - -function _await$2(value, then, direct) { - if (direct) { - return then ? then(value) : value; - } - if (!value || !value.then) { - value = Promise.resolve(value); - } - return then ? value.then(then) : value; -} -var FETCH_TIMEOUT = 3000; -function _catch(body, recover) { - try { - var result = body(); - } catch (e) { - return recover(e); - } - if (result && result.then) { - return result.then(void 0, recover); - } - return result; -} -var fetchJson = _async$2(function (url) { - return _catch(function () { - return _await$2(global.fetch("".concat(url, ".json"), { - timeout: FETCH_TIMEOUT - }), function (_global$fetch) { - return _global$fetch.json(); - }); - }, function (e) { - report(e); - reportAndThrowError("Could not fetch ".concat(url, ".json")); - }); -}); -function _async$2(f) { - return function () { - for (var args = [], i = 0; i < arguments.length; i++) { - args[i] = arguments[i]; - } - try { - return Promise.resolve(f.apply(this, args)); - } catch (e) { - return Promise.reject(e); - } - }; -} -var fetchStats = _async$2(function (collectiveUrl) { - return _catch(function () { - return _await$2(fetchJson(collectiveUrl)); - }, function (e) { - report(e); - report("Could not load the stats for ".concat(collectiveSlugFromUrl(collectiveUrl))); - }); -}); -var fetchLogo = _async$2(function (logoUrl) { - if (!logoUrl) { - // Silent return if no logo has been provided - return; - } - if (!logoUrl.match(/^https?:\/\//)) { - reportAndThrowError("Your logo URL isn't well-formatted - ".concat(logoUrl)); - } - return _catch(function () { - return _await$2(global.fetch(logoUrl, { - timeout: FETCH_TIMEOUT - }), function (res) { - if (isLogoResponseWellFormatted(res)) { - return res.text(); - } - report("Error while fetching logo from ".concat(logoUrl, ". The response wasn't well-formatted")); - }); - }, function () { - report("Error while fetching logo from ".concat(logoUrl)); - }); -}); -var isLogoResponseWellFormatted = function isLogoResponseWellFormatted(res) { - return res.status === 200 && res.headers.get('content-type').match(/^text\/plain/); -}; -var fetchPkg = function fetchPkg(pathToPkg) { - var fullPathToPkg = path__default["default"].resolve("".concat(pathToPkg, "/package.json")); - try { - return JSON.parse(fs__default["default"].readFileSync(fullPathToPkg, 'utf8')); - } catch (e) { - reportAndThrowError("Could not find package.json at ".concat(fullPathToPkg)); - } -}; - -function _await$1(value, then, direct) { - if (direct) { - return then ? then(value) : value; - } - if (!value || !value.then) { - value = Promise.resolve(value); - } - return then ? value.then(then) : value; -} -function _async$1(f) { - return function () { - for (var args = [], i = 0; i < arguments.length; i++) { - args[i] = arguments[i]; - } - try { - return Promise.resolve(f.apply(this, args)); - } catch (e) { - return Promise.reject(e); - } - }; -} -var collectiveSlugFromUrl = function collectiveSlugFromUrl(url) { - return url.substr(url.lastIndexOf('/') + 1).toLowerCase().replace(/\.json/g, ''); -}; -var collectiveUrl = function collectiveUrl(pkg) { - var url = pkg.collective && pkg.collective.url; - if (!url) { - reportAndThrowError('No collective URL set!'); - } - return stripTrailingSlash(url); -}; - -// use pkg.collective.logo for "legacy"/compatibility reasons -var collectiveLogoUrl = function collectiveLogoUrl(pkg) { - return pkg.collective.logo || pkg.collective.logoUrl || false; -}; -var collectiveDonationText = function collectiveDonationText(pkg) { - return pkg.collective.donation && pkg.collective.donation.text || 'Donate:'; -}; -var getCollective = _async$1(function (pkgPath) { - var pkg = fetchPkg(pkgPath); - var url = collectiveUrl(pkg); - var baseCollective = { - url: url, - slug: collectiveSlugFromUrl(url), - logoUrl: collectiveLogoUrl(pkg), - donationUrl: collectiveDonationUrl(pkg), - donationText: collectiveDonationText(pkg) - }; - var logoUrl = baseCollective.logoUrl; - var promises = [fetchStats(url)].concat(logoUrl ? fetchLogo(logoUrl) : []); - return _await$1(Promise.all(promises), function (_ref) { - var _ref2 = _slicedToArray(_ref, 2), - stats = _ref2[0], - logo = _ref2[1]; - return Object.assign(baseCollective, { - stats: stats, - logo: logo - }); - }); -}); -var collectiveDonationUrl = function collectiveDonationUrl(pkg) { - var defaultDonationAmount = pkg.collective.donation && pkg.collective.donation.amount; - var donateUrl = "".concat(collectiveUrl(pkg), "/").concat(retrieveDonationSlug(pkg)); - if (defaultDonationAmount) { - return "".concat(donateUrl, "/").concat(defaultDonationAmount); - } - return donateUrl; -}; -var retrieveDonationSlug = function retrieveDonationSlug(pkg) { - var rawDonationSlug = pkg.collective.donation && pkg.collective.donation.slug; - if (!rawDonationSlug) { - return 'donate'; - } - return stripLeadingSlash(rawDonationSlug); -}; - -function _await(value, then, direct) { - if (direct) { - return then ? then(value) : value; - } - if (!value || !value.then) { - value = Promise.resolve(value); - } - return then ? value.then(then) : value; -} -function _async(f) { - return function () { - for (var args = [], i = 0; i < arguments.length; i++) { - args[i] = arguments[i]; - } - try { - return Promise.resolve(f.apply(this, args)); - } catch (e) { - return Promise.reject(e); - } - }; -} -var init = _async(function (path, hide) { - if (hide === undefined) hide = hideMessage(); - if (hide) { - return; - } - if (!(globalThis.fetch || global.fetch)) { - return; - } - return _await(getCollective(path), function (collective) { - printLogo(collective.logo); - printFooter(collective); - }); -}); - -exports.init = init; diff --git a/node_modules/@nuxt/opencollective/package.json b/node_modules/@nuxt/opencollective/package.json deleted file mode 100644 index 097f60d..0000000 --- a/node_modules/@nuxt/opencollective/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "@nuxt/opencollective", - "version": "0.4.1", - "repository": "nuxt-contrib/opencollective", - "license": "MIT", - "main": "dist/index.js", - "bin": "bin/opencollective.js", - "files": [ - "bin", - "dist" - ], - "scripts": { - "build": "bili -t node --format cjs src/index.js", - "lint": "eslint src test", - "lint:engines": "installed-check -d", - "prepublish": "pnpm build", - "release": "standard-version && git push --follow-tags && npm publish", - "test": "pnpm lint && pnpm test:coverage", - "test:ava": "nyc ava --verbose", - "test:coverage": "nyc --reporter=lcov --reporter=html ava" - }, - "ava": { - "require": [ - "jiti/register" - ] - }, - "dependencies": { - "consola": "^3.2.3" - }, - "devDependencies": { - "@commitlint/cli": "^17.8.1", - "@commitlint/config-conventional": "^17.8.1", - "@nuxtjs/eslint-config": "^12.0.0", - "ava": "^5.3.1", - "bili": "latest", - "eslint": "^8.57.1", - "fetch-mock": "^9.11.0", - "installed-check": "^9.3.0", - "jiti": "^1.21.6", - "node-fetch": "npm:node-fetch-native@^1.6.4", - "nyc": "latest", - "sinon": "^17.0.1", - "standard-version": "^9.5.0" - }, - "engines": { - "node": "^14.18.0 || >=16.10.0", - "npm": ">=5.10.0" - }, - "packageManager": "pnpm@9.15.0" -} diff --git a/node_modules/@tokenizer/inflate/LICENSE b/node_modules/@tokenizer/inflate/LICENSE deleted file mode 100644 index 1149e9e..0000000 --- a/node_modules/@tokenizer/inflate/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -Copyright (c) 2024, Borewit -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@tokenizer/inflate/README.md b/node_modules/@tokenizer/inflate/README.md deleted file mode 100644 index 2f33e2d..0000000 --- a/node_modules/@tokenizer/inflate/README.md +++ /dev/null @@ -1,114 +0,0 @@ -[![Node.js CI](https://github.com/Borewit/tokenizer-inflate/actions/workflows/nodejs-ci.yml/badge.svg)](https://github.com/Borewit/tokenizer-inflate/actions/workflows/nodejs-ci.yml) -[![NPM version](https://badge.fury.io/js/%40tokenizer%2Finflate.svg)](https://npmjs.org/package/@tokenizer/inflate) -[![npm downloads](https://img.shields.io/npm/dm/@tokenizer%2Finflate.svg)](https://npmcharts.com/compare/%40tokenizer%2Finflate?start=1200&interval=30) - -# @tokenizer/inflate - -`@tokenizer/inflate` is a package designed for handling and extracting data from ZIP files efficiently using a tokenizer-based approach. -The library provides a customizable way to parse ZIP archives and extract compressed data while minimizing memory usage. - -## Features -- Efficient Decompression: Handles streams compressed with DEFLATE and related formats (e.g., gzip). -- Tokenizer Compatibility: Seamlessly integrates with [strtok3](https://github.com/Borewit/strtok3). For example, use [@tokenizer/s3](https://github.com/Borewit/tokenizer-s3) for efficient partial extraction of a Zip stored on AWS S3 cloud file storage. -- Streamlined Interface: Provides an intuitive API for working with compressed data in streaming and random-access scenarios. -- Chunked Data Access: Leverages the underlying media's capabilities to offer chunked or random access to data, unlike traditional streams. -- Plug-and-Play: Easily integrate with existing tokenizer-based workflows for parsing file metadata or binary structures. -- Interrupt the extraction process conditionally. - -## Installation -```bash -npm install @tokenizer/inflate -``` - -## Usage - -### Example: Extracting Specific Files - -The following example demonstrates how to use the library to extract .txt files and stop processing when encountering a .stop file. - -```js -import { ZipHandler } from '@tokenizer/inflate'; -import { fromFile } from 'strtok3'; - -const fileFilter = (file) => { - console.log(`Processing file: ${file.filename}`); - - if (file.filename?.endsWith(".stop")) { - console.log(`Stopping processing due to file: ${file.filename}`); - return { handler: false, stop: true }; // Stop the unzip process - } - - if (file.filename?.endsWith(".txt")) { - return { - handler: async (data) => { - console.log(`Extracted text file: ${file.filename}`); - console.log(new TextDecoder().decode(data)); - }, - }; - } - - return { handler: false }; // Ignore other files -}; - -async function extractFiles(zipFilePath) { - const tokenizer = await fromFile(zipFilePath); - const zipHandler = new ZipHandler(tokenizer); - await zipHandler.unzip(fileFilter); -} - -extractFiles('example.zip').catch(console.error); -``` - -## API - -### `ZipHandler` -A class for handling ZIP file parsing and extraction. -#### Constructor -```ts -new ZipHandler(tokenizer: ITokenizer) -``` -- **tokenizer**: An instance of ITokenizer to read the ZIP archive. -#### Methods - -- `isZip(): Promise` - - Determines whether the input file is a ZIP archive. - -- `unzip(fileCb: InflateFileFilter): Promise` - - Extracts files from the ZIP archive, applying the provided `InflateFileFilter` callback to each file. - -```InflatedDataHandler``` - -## Types - -### `InflateFileFilter` -```ts -type InflateFileFilter = (file: IFullZipHeader) => InflateFileFilterResult; -``` -Callback function to determine whether a file should be handled or ignored. - -### `InflateFileFilterResult` -```ts -type InflateFileFilterResult = { - handler: InflatedDataHandler | false; // Handle file data or ignore - stop?: boolean; // Stop processing further files -}; - -``` -Returned from `InflateFileFilter` to control file handling and extraction flow. - -### `InflatedDataHandler` -```ts -type InflatedDataHandler = (fileData: Uint8Array) => Promise; -``` -Handler for processing uncompressed file data. - -## Compatibility - -This module is a [pure ECMAScript Module (ESM)](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c). -The distributed JavaScript codebase is compliant with the [ECMAScript 2020 (11th Edition)](https://en.wikipedia.org/wiki/ECMAScript_version_history#11th_Edition_%E2%80%93_ECMAScript_2020) standard. -If used with Node.js, it requires version ≥ 18. - -## License -This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. \ No newline at end of file diff --git a/node_modules/@tokenizer/inflate/lib/GzipHandler.d.ts b/node_modules/@tokenizer/inflate/lib/GzipHandler.d.ts deleted file mode 100644 index 98fd5dc..0000000 --- a/node_modules/@tokenizer/inflate/lib/GzipHandler.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { ITokenizer } from 'strtok3'; -export declare class GzipHandler { - private tokenizer; - constructor(tokenizer: ITokenizer); - inflate(): ReadableStream; -} diff --git a/node_modules/@tokenizer/inflate/lib/GzipHandler.js b/node_modules/@tokenizer/inflate/lib/GzipHandler.js deleted file mode 100644 index 50d8a0e..0000000 --- a/node_modules/@tokenizer/inflate/lib/GzipHandler.js +++ /dev/null @@ -1,19 +0,0 @@ -export class GzipHandler { - constructor(tokenizer) { - this.tokenizer = tokenizer; - } - inflate() { - const tokenizer = this.tokenizer; - return new ReadableStream({ - async pull(controller) { - const buffer = new Uint8Array(1024); - const size = await tokenizer.readBuffer(buffer, { mayBeLess: true }); - if (size === 0) { - controller.close(); - return; - } - controller.enqueue(buffer.subarray(0, size)); - } - }).pipeThrough(new DecompressionStream("gzip")); - } -} diff --git a/node_modules/@tokenizer/inflate/lib/ZipHandler.d.ts b/node_modules/@tokenizer/inflate/lib/ZipHandler.d.ts deleted file mode 100644 index 1bbc15c..0000000 --- a/node_modules/@tokenizer/inflate/lib/ZipHandler.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import type { ITokenizer } from 'strtok3'; -import { type IFileHeader, type ILocalFileHeader } from "./ZipToken.js"; -export type InflateFileFilterResult = { - handler: InflatedDataHandler | false; - stop?: boolean; -}; -export type { ILocalFileHeader } from './ZipToken.js'; -/** - * Return false when to ignore the file, return `InflatedDataHandler` to handle extracted data - */ -export type InflateFileFilter = (file: ILocalFileHeader) => InflateFileFilterResult; -export type InflatedDataHandler = (fileData: Uint8Array) => Promise; -export declare class ZipHandler { - private tokenizer; - private syncBuffer; - constructor(tokenizer: ITokenizer); - isZip(): Promise; - private peekSignature; - findEndOfCentralDirectoryLocator(): Promise; - readCentralDirectory(): Promise; - unzip(fileCb: InflateFileFilter): Promise; - private iterateOverCentralDirectory; - private inflate; - private static decompressDeflateRaw; - private readLocalFileHeader; -} diff --git a/node_modules/@tokenizer/inflate/lib/ZipHandler.js b/node_modules/@tokenizer/inflate/lib/ZipHandler.js deleted file mode 100644 index d960367..0000000 --- a/node_modules/@tokenizer/inflate/lib/ZipHandler.js +++ /dev/null @@ -1,233 +0,0 @@ -import { StringType, UINT32_LE } from 'token-types'; -import initDebug from 'debug'; -import { DataDescriptor, EndOfCentralDirectoryRecordToken, FileHeader, LocalFileHeaderToken, Signature } from "./ZipToken.js"; -function signatureToArray(signature) { - const signatureBytes = new Uint8Array(UINT32_LE.len); - UINT32_LE.put(signatureBytes, 0, signature); - return signatureBytes; -} -const debug = initDebug('tokenizer:inflate'); -const syncBufferSize = 256 * 1024; -const ddSignatureArray = signatureToArray(Signature.DataDescriptor); -const eocdSignatureBytes = signatureToArray(Signature.EndOfCentralDirectory); -export class ZipHandler { - constructor(tokenizer) { - this.tokenizer = tokenizer; - this.syncBuffer = new Uint8Array(syncBufferSize); - } - async isZip() { - return await this.peekSignature() === Signature.LocalFileHeader; - } - peekSignature() { - return this.tokenizer.peekToken(UINT32_LE); - } - async findEndOfCentralDirectoryLocator() { - const randomReadTokenizer = this.tokenizer; - const chunkLength = Math.min(16 * 1024, randomReadTokenizer.fileInfo.size); - const buffer = this.syncBuffer.subarray(0, chunkLength); - await this.tokenizer.readBuffer(buffer, { position: randomReadTokenizer.fileInfo.size - chunkLength }); - // Search the buffer from end to beginning for EOCD signature - // const signature = 0x06054b50; - for (let i = buffer.length - 4; i >= 0; i--) { - // Compare 4 bytes directly without calling readUInt32LE - if (buffer[i] === eocdSignatureBytes[0] && - buffer[i + 1] === eocdSignatureBytes[1] && - buffer[i + 2] === eocdSignatureBytes[2] && - buffer[i + 3] === eocdSignatureBytes[3]) { - return randomReadTokenizer.fileInfo.size - chunkLength + i; - } - } - return -1; - } - async readCentralDirectory() { - if (!this.tokenizer.supportsRandomAccess()) { - debug('Cannot reading central-directory without random-read support'); - return; - } - debug('Reading central-directory...'); - const pos = this.tokenizer.position; - const offset = await this.findEndOfCentralDirectoryLocator(); - if (offset > 0) { - debug('Central-directory 32-bit signature found'); - const eocdHeader = await this.tokenizer.readToken(EndOfCentralDirectoryRecordToken, offset); - const files = []; - this.tokenizer.setPosition(eocdHeader.offsetOfStartOfCd); - for (let n = 0; n < eocdHeader.nrOfEntriesOfSize; ++n) { - const entry = await this.tokenizer.readToken(FileHeader); - if (entry.signature !== Signature.CentralFileHeader) { - throw new Error('Expected Central-File-Header signature'); - } - entry.filename = await this.tokenizer.readToken(new StringType(entry.filenameLength, 'utf-8')); - await this.tokenizer.ignore(entry.extraFieldLength); - await this.tokenizer.ignore(entry.fileCommentLength); - files.push(entry); - debug(`Add central-directory file-entry: n=${n + 1}/${files.length}: filename=${files[n].filename}`); - } - this.tokenizer.setPosition(pos); - return files; - } - this.tokenizer.setPosition(pos); - } - async unzip(fileCb) { - const entries = await this.readCentralDirectory(); - if (entries) { - // Use Central Directory to iterate over files - return this.iterateOverCentralDirectory(entries, fileCb); - } - // Scan Zip files for local-file-header - let stop = false; - do { - const zipHeader = await this.readLocalFileHeader(); - if (!zipHeader) - break; - const next = fileCb(zipHeader); - stop = !!next.stop; - let fileData; - await this.tokenizer.ignore(zipHeader.extraFieldLength); - if (zipHeader.dataDescriptor && zipHeader.compressedSize === 0) { - const chunks = []; - let len = syncBufferSize; - debug('Compressed-file-size unknown, scanning for next data-descriptor-signature....'); - let nextHeaderIndex = -1; - while (nextHeaderIndex < 0 && len === syncBufferSize) { - len = await this.tokenizer.peekBuffer(this.syncBuffer, { mayBeLess: true }); - nextHeaderIndex = indexOf(this.syncBuffer.subarray(0, len), ddSignatureArray); - const size = nextHeaderIndex >= 0 ? nextHeaderIndex : len; - if (next.handler) { - const data = new Uint8Array(size); - await this.tokenizer.readBuffer(data); - chunks.push(data); - } - else { - // Move position to the next header if found, skip the whole buffer otherwise - await this.tokenizer.ignore(size); - } - } - debug(`Found data-descriptor-signature at pos=${this.tokenizer.position}`); - if (next.handler) { - await this.inflate(zipHeader, mergeArrays(chunks), next.handler); - } - } - else { - if (next.handler) { - debug(`Reading compressed-file-data: ${zipHeader.compressedSize} bytes`); - fileData = new Uint8Array(zipHeader.compressedSize); - await this.tokenizer.readBuffer(fileData); - await this.inflate(zipHeader, fileData, next.handler); - } - else { - debug(`Ignoring compressed-file-data: ${zipHeader.compressedSize} bytes`); - await this.tokenizer.ignore(zipHeader.compressedSize); - } - } - debug(`Reading data-descriptor at pos=${this.tokenizer.position}`); - if (zipHeader.dataDescriptor) { - // await this.tokenizer.ignore(DataDescriptor.len); - const dataDescriptor = await this.tokenizer.readToken(DataDescriptor); - if (dataDescriptor.signature !== 0x08074b50) { - throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position - DataDescriptor.len}`); - } - } - } while (!stop); - } - async iterateOverCentralDirectory(entries, fileCb) { - for (const fileHeader of entries) { - const next = fileCb(fileHeader); - if (next.handler) { - this.tokenizer.setPosition(fileHeader.relativeOffsetOfLocalHeader); - const zipHeader = await this.readLocalFileHeader(); - if (zipHeader) { - await this.tokenizer.ignore(zipHeader.extraFieldLength); - const fileData = new Uint8Array(fileHeader.compressedSize); - await this.tokenizer.readBuffer(fileData); - await this.inflate(zipHeader, fileData, next.handler); - } - } - if (next.stop) - break; - } - } - async inflate(zipHeader, fileData, cb) { - if (zipHeader.compressedMethod === 0) { - // Stored (uncompressed) - return cb(fileData); - } - if (zipHeader.compressedMethod !== 8) { - throw new Error(`Unsupported ZIP compression method: ${zipHeader.compressedMethod}`); - } - debug(`Decompress filename=${zipHeader.filename}, compressed-size=${fileData.length}`); - const uncompressedData = await ZipHandler.decompressDeflateRaw(fileData); - return cb(uncompressedData); - } - static async decompressDeflateRaw(data) { - // Wrap Uint8Array in a ReadableStream without copying - const input = new ReadableStream({ - start(controller) { - controller.enqueue(data); - controller.close(); - } - }); - const ds = new DecompressionStream("deflate-raw"); - const output = input.pipeThrough(ds); - try { - // Collect decompressed bytes from the output stream - const response = new Response(output); - const buffer = await response.arrayBuffer(); - return new Uint8Array(buffer); - } - catch (err) { - // Provide ZIP-specific error context - const message = err instanceof Error - ? `Failed to deflate ZIP entry: ${err.message}` - : "Unknown decompression error in ZIP entry"; - throw new TypeError(message); - } - } - async readLocalFileHeader() { - const signature = await this.tokenizer.peekToken(UINT32_LE); - if (signature === Signature.LocalFileHeader) { - const header = await this.tokenizer.readToken(LocalFileHeaderToken); - header.filename = await this.tokenizer.readToken(new StringType(header.filenameLength, 'utf-8')); - return header; - } - if (signature === Signature.CentralFileHeader) { - return false; - } - if (signature === 0xE011CFD0) { - throw new Error('Encrypted ZIP'); - } - throw new Error('Unexpected signature'); - } -} -function indexOf(buffer, portion) { - const bufferLength = buffer.length; - const portionLength = portion.length; - // Return -1 if the portion is longer than the buffer - if (portionLength > bufferLength) - return -1; - // Search for the portion in the buffer - for (let i = 0; i <= bufferLength - portionLength; i++) { - let found = true; - for (let j = 0; j < portionLength; j++) { - if (buffer[i + j] !== portion[j]) { - found = false; - break; - } - } - if (found) { - return i; // Return the starting offset - } - } - return -1; // Not found -} -function mergeArrays(chunks) { - // Concatenate chunks into a single Uint8Array - const totalLength = chunks.reduce((acc, curr) => acc + curr.length, 0); - const mergedArray = new Uint8Array(totalLength); - let offset = 0; - for (const chunk of chunks) { - mergedArray.set(chunk, offset); - offset += chunk.length; - } - return mergedArray; -} diff --git a/node_modules/@tokenizer/inflate/lib/ZipToken.d.ts b/node_modules/@tokenizer/inflate/lib/ZipToken.d.ts deleted file mode 100644 index 3798026..0000000 --- a/node_modules/@tokenizer/inflate/lib/ZipToken.d.ts +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Ref https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT - */ -import type { IGetToken } from "strtok3"; -export declare const Signature: { - LocalFileHeader: number; - DataDescriptor: number; - CentralFileHeader: number; - EndOfCentralDirectory: number; -}; -interface IDataDescriptor { - signature: number; - compressedSize: number; - uncompressedSize: number; -} -export interface ILocalFileHeader extends IDataDescriptor { - minVersion: number; - dataDescriptor: boolean; - compressedMethod: number; - compressedSize: number; - uncompressedSize: number; - filenameLength: number; - extraFieldLength: number; - filename: string; -} -export declare const DataDescriptor: IGetToken; -/** - * First part of the ZIP Local File Header - * Offset | Bytes| Description - * -------|------+------------------------------------------------------------------- - * 0 | 4 | Signature (0x04034b50) - * 4 | 2 | Minimum version needed to extract - * 6 | 2 | Bit flag - * 8 | 2 | Compression method - * 10 | 2 | File last modification time (MS-DOS format) - * 12 | 2 | File last modification date (MS-DOS format) - * 14 | 4 | CRC-32 of uncompressed data - * 18 | 4 | Compressed size - * 22 | 4 | Uncompressed size - * 26 | 2 | File name length (n) - * 28 | 2 | Extra field length (m) - * 30 | n | File name - * 30 + n | m | Extra field - */ -export declare const LocalFileHeaderToken: IGetToken; -interface IEndOfCentralDirectoryRecord { - signature: number; - nrOfThisDisk: number; - nrOfThisDiskWithTheStart: number; - nrOfEntriesOnThisDisk: number; - nrOfEntriesOfSize: number; - sizeOfCd: number; - offsetOfStartOfCd: number; - zipFileCommentLength: number; -} -/** - * 4.3.16 End of central directory record: - * end of central dir signature (0x06064b50) 4 bytes - * number of this disk 2 bytes - * number of the disk with the start of the central directory 2 bytes - * total number of entries in the central directory on this disk 2 bytes - * total number of entries in the size of the central directory 2 bytes - * sizeOfTheCentralDirectory 4 bytes - * offset of start of central directory with respect to the starting disk number 4 bytes - * .ZIP file comment length 2 bytes - * .ZIP file comment (variable size) - */ -export declare const EndOfCentralDirectoryRecordToken: IGetToken; -export interface IFileHeader extends ILocalFileHeader { - fileCommentLength: number; - relativeOffsetOfLocalHeader: number; -} -/** - * File header: - * central file header signature 4 bytes 0 (0x02014b50) - * version made by 2 bytes 4 - * version needed to extract 2 bytes 6 - * general purpose bit flag 2 bytes 8 - * compression method 2 bytes 10 - * last mod file time 2 bytes 12 - * last mod file date 2 bytes 14 - * crc-32 4 bytes 16 - * compressed size 4 bytes 20 - * uncompressed size 4 bytes 24 - * file name length 2 bytes 28 - * extra field length 2 bytes 30 - * file comment length 2 bytes 32 - * disk number start 2 bytes 34 - * internal file attributes 2 bytes 36 - * external file attributes 4 bytes 38 - * relative offset of local header 4 bytes 42 - */ -export declare const FileHeader: IGetToken; -export {}; diff --git a/node_modules/@tokenizer/inflate/lib/ZipToken.js b/node_modules/@tokenizer/inflate/lib/ZipToken.js deleted file mode 100644 index c6f3894..0000000 --- a/node_modules/@tokenizer/inflate/lib/ZipToken.js +++ /dev/null @@ -1,117 +0,0 @@ -/** - * Ref https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT - */ -import { UINT16_LE, UINT32_LE } from "token-types"; -export const Signature = { - LocalFileHeader: 0x04034b50, - DataDescriptor: 0x08074b50, - CentralFileHeader: 0x02014b50, - EndOfCentralDirectory: 0x06054b50 -}; -export const DataDescriptor = { - get(array) { - return { - signature: UINT32_LE.get(array, 0), - compressedSize: UINT32_LE.get(array, 8), - uncompressedSize: UINT32_LE.get(array, 12), - }; - }, len: 16 -}; -/** - * First part of the ZIP Local File Header - * Offset | Bytes| Description - * -------|------+------------------------------------------------------------------- - * 0 | 4 | Signature (0x04034b50) - * 4 | 2 | Minimum version needed to extract - * 6 | 2 | Bit flag - * 8 | 2 | Compression method - * 10 | 2 | File last modification time (MS-DOS format) - * 12 | 2 | File last modification date (MS-DOS format) - * 14 | 4 | CRC-32 of uncompressed data - * 18 | 4 | Compressed size - * 22 | 4 | Uncompressed size - * 26 | 2 | File name length (n) - * 28 | 2 | Extra field length (m) - * 30 | n | File name - * 30 + n | m | Extra field - */ -export const LocalFileHeaderToken = { - get(array) { - const flags = UINT16_LE.get(array, 6); - return { - signature: UINT32_LE.get(array, 0), - minVersion: UINT16_LE.get(array, 4), - dataDescriptor: !!(flags & 0x0008), - compressedMethod: UINT16_LE.get(array, 8), - compressedSize: UINT32_LE.get(array, 18), - uncompressedSize: UINT32_LE.get(array, 22), - filenameLength: UINT16_LE.get(array, 26), - extraFieldLength: UINT16_LE.get(array, 28), - filename: null - }; - }, len: 30 -}; -/** - * 4.3.16 End of central directory record: - * end of central dir signature (0x06064b50) 4 bytes - * number of this disk 2 bytes - * number of the disk with the start of the central directory 2 bytes - * total number of entries in the central directory on this disk 2 bytes - * total number of entries in the size of the central directory 2 bytes - * sizeOfTheCentralDirectory 4 bytes - * offset of start of central directory with respect to the starting disk number 4 bytes - * .ZIP file comment length 2 bytes - * .ZIP file comment (variable size) - */ -export const EndOfCentralDirectoryRecordToken = { - get(array) { - return { - signature: UINT32_LE.get(array, 0), - nrOfThisDisk: UINT16_LE.get(array, 4), - nrOfThisDiskWithTheStart: UINT16_LE.get(array, 6), - nrOfEntriesOnThisDisk: UINT16_LE.get(array, 8), - nrOfEntriesOfSize: UINT16_LE.get(array, 10), - sizeOfCd: UINT32_LE.get(array, 12), - offsetOfStartOfCd: UINT32_LE.get(array, 16), - zipFileCommentLength: UINT16_LE.get(array, 20), - }; - }, len: 22 -}; -/** - * File header: - * central file header signature 4 bytes 0 (0x02014b50) - * version made by 2 bytes 4 - * version needed to extract 2 bytes 6 - * general purpose bit flag 2 bytes 8 - * compression method 2 bytes 10 - * last mod file time 2 bytes 12 - * last mod file date 2 bytes 14 - * crc-32 4 bytes 16 - * compressed size 4 bytes 20 - * uncompressed size 4 bytes 24 - * file name length 2 bytes 28 - * extra field length 2 bytes 30 - * file comment length 2 bytes 32 - * disk number start 2 bytes 34 - * internal file attributes 2 bytes 36 - * external file attributes 4 bytes 38 - * relative offset of local header 4 bytes 42 - */ -export const FileHeader = { - get(array) { - const flags = UINT16_LE.get(array, 8); - return { - signature: UINT32_LE.get(array, 0), - minVersion: UINT16_LE.get(array, 6), - dataDescriptor: !!(flags & 0x0008), - compressedMethod: UINT16_LE.get(array, 10), - compressedSize: UINT32_LE.get(array, 20), - uncompressedSize: UINT32_LE.get(array, 24), - filenameLength: UINT16_LE.get(array, 28), - extraFieldLength: UINT16_LE.get(array, 30), - fileCommentLength: UINT16_LE.get(array, 32), - relativeOffsetOfLocalHeader: UINT32_LE.get(array, 42), - filename: null - }; - }, len: 46 -}; diff --git a/node_modules/@tokenizer/inflate/lib/index.d.ts b/node_modules/@tokenizer/inflate/lib/index.d.ts deleted file mode 100644 index 73e6618..0000000 --- a/node_modules/@tokenizer/inflate/lib/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { ZipHandler } from './ZipHandler.js'; -export { GzipHandler } from './GzipHandler.js'; -export type { ILocalFileHeader } from './ZipToken.js'; diff --git a/node_modules/@tokenizer/inflate/lib/index.js b/node_modules/@tokenizer/inflate/lib/index.js deleted file mode 100644 index 4b675bc..0000000 --- a/node_modules/@tokenizer/inflate/lib/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export { ZipHandler } from './ZipHandler.js'; -export { GzipHandler } from './GzipHandler.js'; diff --git a/node_modules/@tokenizer/inflate/node_modules/debug/LICENSE b/node_modules/@tokenizer/inflate/node_modules/debug/LICENSE deleted file mode 100644 index 1a9820e..0000000 --- a/node_modules/@tokenizer/inflate/node_modules/debug/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -(The MIT License) - -Copyright (c) 2014-2017 TJ Holowaychuk -Copyright (c) 2018-2021 Josh Junon - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/@tokenizer/inflate/node_modules/debug/README.md b/node_modules/@tokenizer/inflate/node_modules/debug/README.md deleted file mode 100644 index 9ebdfbf..0000000 --- a/node_modules/@tokenizer/inflate/node_modules/debug/README.md +++ /dev/null @@ -1,481 +0,0 @@ -# debug -[![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) -[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) - - - -A tiny JavaScript debugging utility modelled after Node.js core's debugging -technique. Works in Node.js and web browsers. - -## Installation - -```bash -$ npm install debug -``` - -## Usage - -`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. - -Example [_app.js_](./examples/node/app.js): - -```js -var debug = require('debug')('http') - , http = require('http') - , name = 'My App'; - -// fake app - -debug('booting %o', name); - -http.createServer(function(req, res){ - debug(req.method + ' ' + req.url); - res.end('hello\n'); -}).listen(3000, function(){ - debug('listening'); -}); - -// fake worker of some kind - -require('./worker'); -``` - -Example [_worker.js_](./examples/node/worker.js): - -```js -var a = require('debug')('worker:a') - , b = require('debug')('worker:b'); - -function work() { - a('doing lots of uninteresting work'); - setTimeout(work, Math.random() * 1000); -} - -work(); - -function workb() { - b('doing some work'); - setTimeout(workb, Math.random() * 2000); -} - -workb(); -``` - -The `DEBUG` environment variable is then used to enable these based on space or -comma-delimited names. - -Here are some examples: - -screen shot 2017-08-08 at 12 53 04 pm -screen shot 2017-08-08 at 12 53 38 pm -screen shot 2017-08-08 at 12 53 25 pm - -#### Windows command prompt notes - -##### CMD - -On Windows the environment variable is set using the `set` command. - -```cmd -set DEBUG=*,-not_this -``` - -Example: - -```cmd -set DEBUG=* & node app.js -``` - -##### PowerShell (VS Code default) - -PowerShell uses different syntax to set environment variables. - -```cmd -$env:DEBUG = "*,-not_this" -``` - -Example: - -```cmd -$env:DEBUG='app';node app.js -``` - -Then, run the program to be debugged as usual. - -npm script example: -```js - "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", -``` - -## Namespace Colors - -Every debug instance has a color generated for it based on its namespace name. -This helps when visually parsing the debug output to identify which debug instance -a debug line belongs to. - -#### Node.js - -In Node.js, colors are enabled when stderr is a TTY. You also _should_ install -the [`supports-color`](https://npmjs.org/supports-color) module alongside debug, -otherwise debug will only use a small handful of basic colors. - - - -#### Web Browser - -Colors are also enabled on "Web Inspectors" that understand the `%c` formatting -option. These are WebKit web inspectors, Firefox ([since version -31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) -and the Firebug plugin for Firefox (any version). - - - - -## Millisecond diff - -When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - - - -When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below: - - - - -## Conventions - -If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output. - -## Wildcards - -The `*` character may be used as a wildcard. Suppose for example your library has -debuggers named "connect:bodyParser", "connect:compress", "connect:session", -instead of listing all three with -`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do -`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. - -You can also exclude specific debuggers by prefixing them with a "-" character. -For example, `DEBUG=*,-connect:*` would include all debuggers except those -starting with "connect:". - -## Environment Variables - -When running through Node.js, you can set a few environment variables that will -change the behavior of the debug logging: - -| Name | Purpose | -|-----------|-------------------------------------------------| -| `DEBUG` | Enables/disables specific debugging namespaces. | -| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). | -| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | -| `DEBUG_DEPTH` | Object inspection depth. | -| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | - - -__Note:__ The environment variables beginning with `DEBUG_` end up being -converted into an Options object that gets used with `%o`/`%O` formatters. -See the Node.js documentation for -[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) -for the complete list. - -## Formatters - -Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. -Below are the officially supported formatters: - -| Formatter | Representation | -|-----------|----------------| -| `%O` | Pretty-print an Object on multiple lines. | -| `%o` | Pretty-print an Object all on a single line. | -| `%s` | String. | -| `%d` | Number (both integer and float). | -| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | -| `%%` | Single percent sign ('%'). This does not consume an argument. | - - -### Custom formatters - -You can add custom formatters by extending the `debug.formatters` object. -For example, if you wanted to add support for rendering a Buffer as hex with -`%h`, you could do something like: - -```js -const createDebug = require('debug') -createDebug.formatters.h = (v) => { - return v.toString('hex') -} - -// …elsewhere -const debug = createDebug('foo') -debug('this is hex: %h', new Buffer('hello world')) -// foo this is hex: 68656c6c6f20776f726c6421 +0ms -``` - - -## Browser Support - -You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), -or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), -if you don't want to build it yourself. - -Debug's enable state is currently persisted by `localStorage`. -Consider the situation shown below where you have `worker:a` and `worker:b`, -and wish to debug both. You can enable this using `localStorage.debug`: - -```js -localStorage.debug = 'worker:*' -``` - -And then refresh the page. - -```js -a = debug('worker:a'); -b = debug('worker:b'); - -setInterval(function(){ - a('doing some work'); -}, 1000); - -setInterval(function(){ - b('doing some work'); -}, 1200); -``` - -In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_. - - - -## Output streams - - By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: - -Example [_stdout.js_](./examples/node/stdout.js): - -```js -var debug = require('debug'); -var error = debug('app:error'); - -// by default stderr is used -error('goes to stderr!'); - -var log = debug('app:log'); -// set this namespace to log via console.log -log.log = console.log.bind(console); // don't forget to bind to console! -log('goes to stdout'); -error('still goes to stderr!'); - -// set all output to go via console.info -// overrides all per-namespace log settings -debug.log = console.info.bind(console); -error('now goes to stdout via console.info'); -log('still goes to stdout, but via console.info now'); -``` - -## Extend -You can simply extend debugger -```js -const log = require('debug')('auth'); - -//creates new debug instance with extended namespace -const logSign = log.extend('sign'); -const logLogin = log.extend('login'); - -log('hello'); // auth hello -logSign('hello'); //auth:sign hello -logLogin('hello'); //auth:login hello -``` - -## Set dynamically - -You can also enable debug dynamically by calling the `enable()` method : - -```js -let debug = require('debug'); - -console.log(1, debug.enabled('test')); - -debug.enable('test'); -console.log(2, debug.enabled('test')); - -debug.disable(); -console.log(3, debug.enabled('test')); - -``` - -print : -``` -1 false -2 true -3 false -``` - -Usage : -`enable(namespaces)` -`namespaces` can include modes separated by a colon and wildcards. - -Note that calling `enable()` completely overrides previously set DEBUG variable : - -``` -$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))' -=> false -``` - -`disable()` - -Will disable all namespaces. The functions returns the namespaces currently -enabled (and skipped). This can be useful if you want to disable debugging -temporarily without knowing what was enabled to begin with. - -For example: - -```js -let debug = require('debug'); -debug.enable('foo:*,-foo:bar'); -let namespaces = debug.disable(); -debug.enable(namespaces); -``` - -Note: There is no guarantee that the string will be identical to the initial -enable string, but semantically they will be identical. - -## Checking whether a debug target is enabled - -After you've created a debug instance, you can determine whether or not it is -enabled by checking the `enabled` property: - -```javascript -const debug = require('debug')('http'); - -if (debug.enabled) { - // do stuff... -} -``` - -You can also manually toggle this property to force the debug instance to be -enabled or disabled. - -## Usage in child processes - -Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process. -For example: - -```javascript -worker = fork(WORKER_WRAP_PATH, [workerPath], { - stdio: [ - /* stdin: */ 0, - /* stdout: */ 'pipe', - /* stderr: */ 'pipe', - 'ipc', - ], - env: Object.assign({}, process.env, { - DEBUG_COLORS: 1 // without this settings, colors won't be shown - }), -}); - -worker.stderr.pipe(process.stderr, { end: false }); -``` - - -## Authors - - - TJ Holowaychuk - - Nathan Rajlich - - Andrew Rhyne - - Josh Junon - -## Backers - -Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Sponsors - -Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## License - -(The MIT License) - -Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> -Copyright (c) 2018-2021 Josh Junon - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@tokenizer/inflate/node_modules/debug/package.json b/node_modules/@tokenizer/inflate/node_modules/debug/package.json deleted file mode 100644 index ee8abb5..0000000 --- a/node_modules/@tokenizer/inflate/node_modules/debug/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "debug", - "version": "4.4.3", - "repository": { - "type": "git", - "url": "git://github.com/debug-js/debug.git" - }, - "description": "Lightweight debugging utility for Node.js and the browser", - "keywords": [ - "debug", - "log", - "debugger" - ], - "files": [ - "src", - "LICENSE", - "README.md" - ], - "author": "Josh Junon (https://github.com/qix-)", - "contributors": [ - "TJ Holowaychuk ", - "Nathan Rajlich (http://n8.io)", - "Andrew Rhyne " - ], - "license": "MIT", - "scripts": { - "lint": "xo", - "test": "npm run test:node && npm run test:browser && npm run lint", - "test:node": "mocha test.js test.node.js", - "test:browser": "karma start --single-run", - "test:coverage": "cat ./coverage/lcov.info | coveralls" - }, - "dependencies": { - "ms": "^2.1.3" - }, - "devDependencies": { - "brfs": "^2.0.1", - "browserify": "^16.2.3", - "coveralls": "^3.0.2", - "karma": "^3.1.4", - "karma-browserify": "^6.0.0", - "karma-chrome-launcher": "^2.2.0", - "karma-mocha": "^1.3.0", - "mocha": "^5.2.0", - "mocha-lcov-reporter": "^1.2.0", - "sinon": "^14.0.0", - "xo": "^0.23.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - }, - "main": "./src/index.js", - "browser": "./src/browser.js", - "engines": { - "node": ">=6.0" - }, - "xo": { - "rules": { - "import/extensions": "off" - } - } -} diff --git a/node_modules/@tokenizer/inflate/node_modules/debug/src/browser.js b/node_modules/@tokenizer/inflate/node_modules/debug/src/browser.js deleted file mode 100644 index 5993451..0000000 --- a/node_modules/@tokenizer/inflate/node_modules/debug/src/browser.js +++ /dev/null @@ -1,272 +0,0 @@ -/* eslint-env browser */ - -/** - * This is the web browser implementation of `debug()`. - */ - -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = localstorage(); -exports.destroy = (() => { - let warned = false; - - return () => { - if (!warned) { - warned = true; - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - }; -})(); - -/** - * Colors. - */ - -exports.colors = [ - '#0000CC', - '#0000FF', - '#0033CC', - '#0033FF', - '#0066CC', - '#0066FF', - '#0099CC', - '#0099FF', - '#00CC00', - '#00CC33', - '#00CC66', - '#00CC99', - '#00CCCC', - '#00CCFF', - '#3300CC', - '#3300FF', - '#3333CC', - '#3333FF', - '#3366CC', - '#3366FF', - '#3399CC', - '#3399FF', - '#33CC00', - '#33CC33', - '#33CC66', - '#33CC99', - '#33CCCC', - '#33CCFF', - '#6600CC', - '#6600FF', - '#6633CC', - '#6633FF', - '#66CC00', - '#66CC33', - '#9900CC', - '#9900FF', - '#9933CC', - '#9933FF', - '#99CC00', - '#99CC33', - '#CC0000', - '#CC0033', - '#CC0066', - '#CC0099', - '#CC00CC', - '#CC00FF', - '#CC3300', - '#CC3333', - '#CC3366', - '#CC3399', - '#CC33CC', - '#CC33FF', - '#CC6600', - '#CC6633', - '#CC9900', - '#CC9933', - '#CCCC00', - '#CCCC33', - '#FF0000', - '#FF0033', - '#FF0066', - '#FF0099', - '#FF00CC', - '#FF00FF', - '#FF3300', - '#FF3333', - '#FF3366', - '#FF3399', - '#FF33CC', - '#FF33FF', - '#FF6600', - '#FF6633', - '#FF9900', - '#FF9933', - '#FFCC00', - '#FFCC33' -]; - -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - -// eslint-disable-next-line complexity -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } - - // Internet Explorer and Edge do not support colors. - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - - let m; - - // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - // eslint-disable-next-line no-return-assign - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // Is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) || - // Double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); -} - -/** - * Colorize log arguments if enabled. - * - * @api public - */ - -function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + - this.namespace + - (this.useColors ? ' %c' : ' ') + - args[0] + - (this.useColors ? '%c ' : ' ') + - '+' + module.exports.humanize(this.diff); - - if (!this.useColors) { - return; - } - - const c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); - - // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, match => { - if (match === '%%') { - return; - } - index++; - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); -} - -/** - * Invokes `console.debug()` when available. - * No-op when `console.debug` is not a "function". - * If `console.debug` is not available, falls back - * to `console.log`. - * - * @api public - */ -exports.log = console.debug || console.log || (() => {}); - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ -function load() { - let r; - try { - r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } - - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; -} - -/** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - -function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -module.exports = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } -}; diff --git a/node_modules/@tokenizer/inflate/node_modules/debug/src/common.js b/node_modules/@tokenizer/inflate/node_modules/debug/src/common.js deleted file mode 100644 index 141cb57..0000000 --- a/node_modules/@tokenizer/inflate/node_modules/debug/src/common.js +++ /dev/null @@ -1,292 +0,0 @@ - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - */ - -function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = require('ms'); - createDebug.destroy = destroy; - - Object.keys(env).forEach(key => { - createDebug[key] = env[key]; - }); - - /** - * The currently active debug mode names, and names to skip. - */ - - createDebug.names = []; - createDebug.skips = []; - - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - createDebug.formatters = {}; - - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - function selectColor(namespace) { - let hash = 0; - - for (let i = 0; i < namespace.length; i++) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; - - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; - - function debug(...args) { - // Disabled? - if (!debug.enabled) { - return; - } - - const self = debug; - - // Set `diff` timestamp - const curr = Number(new Date()); - const ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - args[0] = createDebug.coerce(args[0]); - - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } - - // Apply any `formatters` transformations - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return '%'; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === 'function') { - const val = args[index]; - match = formatter.call(self, val); - - // Now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // Apply env-specific formatting (colors, etc.) - createDebug.formatArgs.call(self, args); - - const logFn = self.log || createDebug.log; - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.useColors = createDebug.useColors(); - debug.color = createDebug.selectColor(namespace); - debug.extend = extend; - debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. - - Object.defineProperty(debug, 'enabled', { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } - - return enabledCache; - }, - set: v => { - enableOverride = v; - } - }); - - // Env-specific initialization logic for debug instances - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } - - return debug; - } - - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; - - createDebug.names = []; - createDebug.skips = []; - - const split = (typeof namespaces === 'string' ? namespaces : '') - .trim() - .replace(/\s+/g, ',') - .split(',') - .filter(Boolean); - - for (const ns of split) { - if (ns[0] === '-') { - createDebug.skips.push(ns.slice(1)); - } else { - createDebug.names.push(ns); - } - } - } - - /** - * Checks if the given string matches a namespace template, honoring - * asterisks as wildcards. - * - * @param {String} search - * @param {String} template - * @return {Boolean} - */ - function matchesTemplate(search, template) { - let searchIndex = 0; - let templateIndex = 0; - let starIndex = -1; - let matchIndex = 0; - - while (searchIndex < search.length) { - if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) { - // Match character or proceed with wildcard - if (template[templateIndex] === '*') { - starIndex = templateIndex; - matchIndex = searchIndex; - templateIndex++; // Skip the '*' - } else { - searchIndex++; - templateIndex++; - } - } else if (starIndex !== -1) { // eslint-disable-line no-negated-condition - // Backtrack to the last '*' and try to match more characters - templateIndex = starIndex + 1; - matchIndex++; - searchIndex = matchIndex; - } else { - return false; // No match - } - } - - // Handle trailing '*' in template - while (templateIndex < template.length && template[templateIndex] === '*') { - templateIndex++; - } - - return templateIndex === template.length; - } - - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - function disable() { - const namespaces = [ - ...createDebug.names, - ...createDebug.skips.map(namespace => '-' + namespace) - ].join(','); - createDebug.enable(''); - return namespaces; - } - - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - function enabled(name) { - for (const skip of createDebug.skips) { - if (matchesTemplate(name, skip)) { - return false; - } - } - - for (const ns of createDebug.names) { - if (matchesTemplate(name, ns)) { - return true; - } - } - - return false; - } - - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } - - /** - * XXX DO NOT USE. This is a temporary stub function. - * XXX It WILL be removed in the next major release. - */ - function destroy() { - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - - createDebug.enable(createDebug.load()); - - return createDebug; -} - -module.exports = setup; diff --git a/node_modules/@tokenizer/inflate/node_modules/debug/src/index.js b/node_modules/@tokenizer/inflate/node_modules/debug/src/index.js deleted file mode 100644 index bf4c57f..0000000 --- a/node_modules/@tokenizer/inflate/node_modules/debug/src/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Detect Electron renderer / nwjs process, which is node, but we should - * treat as a browser. - */ - -if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { - module.exports = require('./browser.js'); -} else { - module.exports = require('./node.js'); -} diff --git a/node_modules/@tokenizer/inflate/node_modules/debug/src/node.js b/node_modules/@tokenizer/inflate/node_modules/debug/src/node.js deleted file mode 100644 index 715560a..0000000 --- a/node_modules/@tokenizer/inflate/node_modules/debug/src/node.js +++ /dev/null @@ -1,263 +0,0 @@ -/** - * Module dependencies. - */ - -const tty = require('tty'); -const util = require('util'); - -/** - * This is the Node.js implementation of `debug()`. - */ - -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.destroy = util.deprecate( - () => {}, - 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' -); - -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -try { - // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) - // eslint-disable-next-line import/no-extraneous-dependencies - const supportsColor = require('supports-color'); - - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } -} catch (error) { - // Swallow - we only care if `supports-color` is available; it doesn't have to be. -} - -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - -exports.inspectOpts = Object.keys(process.env).filter(key => { - return /^debug_/i.test(key); -}).reduce((obj, key) => { - // Camel-case - const prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); - - // Coerce string value into JS value - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === 'null') { - val = null; - } else { - val = Number(val); - } - - obj[prop] = val; - return obj; -}, {}); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - return 'colors' in exports.inspectOpts ? - Boolean(exports.inspectOpts.colors) : - tty.isatty(process.stderr.fd); -} - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs(args) { - const {namespace: name, useColors} = this; - - if (useColors) { - const c = this.color; - const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); - const prefix = ` ${colorCode};1m${name} \u001B[0m`; - - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } -} - -function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } - return new Date().toISOString() + ' '; -} - -/** - * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr. - */ - -function log(...args) { - return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - -function init(debug) { - debug.inspectOpts = {}; - - const keys = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -module.exports = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n') - .map(str => str.trim()) - .join(' '); -}; - -/** - * Map %O to `util.inspect()`, allowing multiple lines if needed. - */ - -formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; diff --git a/node_modules/@tokenizer/inflate/package.json b/node_modules/@tokenizer/inflate/package.json deleted file mode 100644 index 521040f..0000000 --- a/node_modules/@tokenizer/inflate/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "@tokenizer/inflate", - "version": "0.4.1", - "description": "Tokenized zip support", - "type": "module", - "exports": "./lib/index.js", - "files": [ - "lib/**/*.js", - "lib/**/*.d.ts" - ], - "scripts": { - "clean": "del-cli 'lib/**/*.js' 'lib/**/*.js.map' 'lib/**/*.d.ts' 'test/**/*.js' 'test/**/*.js.map'", - "compile-src": "tsc -p lib", - "compile-test": "tsc -p test", - "compile": "yarn run compile-src && yarn run compile-test", - "build": "yarn run clean && yarn run compile", - "prepublishOnly": "yarn run build", - "eslint": "eslint lib test", - "lint:md": "remark -u preset-lint-recommended .", - "lint:ts": "biome check", - "fix": "yarn run biome lint --write", - "test": "mocha", - "start": "yarn run compile && yarn run lint && yarn run cover-test", - "update-biome": "yarn add -D --exact @biomejs/biome && npx @biomejs/biome migrate --write" - }, - "engines": { - "node": ">=18" - }, - "author": { - "name": "Borewit", - "url": "https://github.com/Borewit" - }, - "license": "MIT", - "packageManager": "yarn@4.9.1", - "devDependencies": { - "@aws-sdk/client-s3": "^3.934.0", - "@biomejs/biome": "2.3.6", - "@tokenizer/s3": "^1.0.1", - "@types/chai": "^5.2.3", - "@types/debug": "^4", - "@types/mocha": "^10.0.10", - "@types/node": "^24.10.1", - "chai": "^6.2.1", - "del-cli": "^7.0.0", - "file-type": "^21.1.0", - "mocha": "^11.7.5", - "strtok3": "^10.3.4", - "ts-node": "^10.9.2", - "typescript": "^5.9.3" - }, - "dependencies": { - "debug": "^4.4.3", - "token-types": "^6.1.1" - }, - "repository": { - "type": "git", - "url": "https://github.com/Borewit/tokenizer-inflate.git" - }, - "bugs": { - "url": "hhttps://github.com/Borewit/tokenizer-inflate/issues" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - }, - "keywords": [ - "zip", - "unzip", - "decompress", - "inflate", - "strtok3", - "tokenizer", - "stream", - "S3" - ] -} diff --git a/node_modules/@tokenizer/token/README.md b/node_modules/@tokenizer/token/README.md deleted file mode 100644 index 1c1ba32..0000000 --- a/node_modules/@tokenizer/token/README.md +++ /dev/null @@ -1,19 +0,0 @@ -[![npm version](https://badge.fury.io/js/%40tokenizer%2Ftoken.svg)](https://www.npmjs.com/package/@tokenizer/token) -[![npm downloads](http://img.shields.io/npm/dm/@tokenizer/token.svg)](https://npmcharts.com/compare/@tokenizer/token?interval=30) - -# @tokenizer/token - -TypeScript definition of an [strtok3](https://github.com/Borewit/strtok3) token. - -## Licence - -(The MIT License) - -Copyright (c) 2020 Borewit - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/@tokenizer/token/index.d.ts b/node_modules/@tokenizer/token/index.d.ts deleted file mode 100644 index d6c8122..0000000 --- a/node_modules/@tokenizer/token/index.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Read-only token - * See https://github.com/Borewit/strtok3 for more information - */ -export interface IGetToken { - - /** - * Length of encoded token in bytes - */ - len: number; - - /** - * Decode value from buffer at offset - * @param array - Uint8Array to read the decoded value from - * @param offset - Decode offset - * @return decoded value - */ - get(array: Array, offset: number): Value; -} - -export interface IToken extends IGetToken { - /** - * Encode value to buffer - * @param array - Uint8Array to write the encoded value to - * @param offset - Buffer write offset - * @param value - Value to decode of type T - * @return offset plus number of bytes written - */ - put(array: Array, offset: number, value: Value): number -} diff --git a/node_modules/@tokenizer/token/package.json b/node_modules/@tokenizer/token/package.json deleted file mode 100644 index ad87e5b..0000000 --- a/node_modules/@tokenizer/token/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "@tokenizer/token", - "version": "0.3.0", - "description": "TypeScript definition for strtok3 token", - "main": "", - "types": "index.d.ts", - "files": [ - "index.d.ts" - ], - "keywords": [ - "token", - "interface", - "tokenizer", - "TypeScript" - ], - "author": { - "name": "Borewit", - "url": "https://github.com/Borewit" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/Borewit/tokenizer-token.git" - }, - "bugs": { - "url": "https://github.com/Borewit/tokenizer-token/issues" - }, - "typeScriptVersion": "3.0", - "dependencies": {}, - "devDependencies": { - "@types/node": "^13.1.0" - } -} diff --git a/node_modules/@tsconfig/node10/LICENSE b/node_modules/@tsconfig/node10/LICENSE deleted file mode 100644 index 48ea661..0000000 --- a/node_modules/@tsconfig/node10/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE diff --git a/node_modules/@tsconfig/node10/README.md b/node_modules/@tsconfig/node10/README.md deleted file mode 100644 index 1d7df8a..0000000 --- a/node_modules/@tsconfig/node10/README.md +++ /dev/null @@ -1,38 +0,0 @@ -### A base TSConfig for working with Node 10. - -Add the package to your `"devDependencies"`: - -```sh -npm install --save-dev @tsconfig/node10 -yarn add --dev @tsconfig/node10 -``` - -Add to your `tsconfig.json`: - -```json -"extends": "@tsconfig/node10/tsconfig.json" -``` - ---- - -The `tsconfig.json`: - -```jsonc -{ - "$schema": "https://www.schemastore.org/tsconfig", - - "compilerOptions": { - "lib": ["es2018"], - "module": "commonjs", - "target": "es2018", - - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "moduleResolution": "node" - } -} - -``` - -You can find the [code here](https://github.com/tsconfig/bases/blob/master/bases/node10.json). diff --git a/node_modules/@tsconfig/node10/package.json b/node_modules/@tsconfig/node10/package.json deleted file mode 100644 index 7a7729e..0000000 --- a/node_modules/@tsconfig/node10/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "@tsconfig/node10", - "repository": { - "type": "git", - "url": "https://github.com/tsconfig/bases.git", - "directory": "bases" - }, - "license": "MIT", - "description": "A base TSConfig for working with Node 10.", - "keywords": [ - "tsconfig", - "node10" - ], - "version": "1.0.12" -} \ No newline at end of file diff --git a/node_modules/@tsconfig/node10/tsconfig.json b/node_modules/@tsconfig/node10/tsconfig.json deleted file mode 100644 index ec3fba3..0000000 --- a/node_modules/@tsconfig/node10/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://www.schemastore.org/tsconfig", - - "compilerOptions": { - "lib": ["es2018"], - "module": "commonjs", - "target": "es2018", - - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "moduleResolution": "node" - } -} diff --git a/node_modules/@tsconfig/node12/LICENSE b/node_modules/@tsconfig/node12/LICENSE deleted file mode 100644 index 48ea661..0000000 --- a/node_modules/@tsconfig/node12/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE diff --git a/node_modules/@tsconfig/node12/README.md b/node_modules/@tsconfig/node12/README.md deleted file mode 100644 index 6352ccd..0000000 --- a/node_modules/@tsconfig/node12/README.md +++ /dev/null @@ -1,40 +0,0 @@ -### A base TSConfig for working with Node 12. - -Add the package to your `"devDependencies"`: - -```sh -npm install --save-dev @tsconfig/node12 -yarn add --dev @tsconfig/node12 -``` - -Add to your `tsconfig.json`: - -```json -"extends": "@tsconfig/node12/tsconfig.json" -``` - ---- - -The `tsconfig.json`: - -```jsonc -{ - "$schema": "https://json.schemastore.org/tsconfig", - "display": "Node 12", - - "compilerOptions": { - "lib": ["es2019", "es2020.promise", "es2020.bigint", "es2020.string"], - "module": "commonjs", - "target": "es2019", - - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "moduleResolution": "node" - } -} - -``` - -You can find the [code here](https://github.com/tsconfig/bases/blob/master/bases/node12.json). diff --git a/node_modules/@tsconfig/node12/package.json b/node_modules/@tsconfig/node12/package.json deleted file mode 100644 index 56aad61..0000000 --- a/node_modules/@tsconfig/node12/package.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"@tsconfig/node12","repository":{"type":"git","url":"https://github.com/tsconfig/bases.git","directory":"bases"},"license":"MIT","description":"A base TSConfig for working with Node 12.","keywords":["tsconfig","node12"],"version":"1.0.11"} \ No newline at end of file diff --git a/node_modules/@tsconfig/node12/tsconfig.json b/node_modules/@tsconfig/node12/tsconfig.json deleted file mode 100644 index eeaf944..0000000 --- a/node_modules/@tsconfig/node12/tsconfig.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "display": "Node 12", - - "compilerOptions": { - "lib": ["es2019", "es2020.promise", "es2020.bigint", "es2020.string"], - "module": "commonjs", - "target": "es2019", - - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "moduleResolution": "node" - } -} diff --git a/node_modules/@tsconfig/node14/LICENSE b/node_modules/@tsconfig/node14/LICENSE deleted file mode 100644 index 48ea661..0000000 --- a/node_modules/@tsconfig/node14/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE diff --git a/node_modules/@tsconfig/node14/README.md b/node_modules/@tsconfig/node14/README.md deleted file mode 100644 index dad7f02..0000000 --- a/node_modules/@tsconfig/node14/README.md +++ /dev/null @@ -1,40 +0,0 @@ -### A base TSConfig for working with Node 14. - -Add the package to your `"devDependencies"`: - -```sh -npm install --save-dev @tsconfig/node14 -yarn add --dev @tsconfig/node14 -``` - -Add to your `tsconfig.json`: - -```json -"extends": "@tsconfig/node14/tsconfig.json" -``` - ---- - -The `tsconfig.json`: - -```jsonc -{ - "$schema": "https://json.schemastore.org/tsconfig", - "display": "Node 14", - - "compilerOptions": { - "lib": ["es2020"], - "module": "commonjs", - "target": "es2020", - - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "moduleResolution": "node" - } -} - -``` - -You can find the [code here](https://github.com/tsconfig/bases/blob/master/bases/node14.json). diff --git a/node_modules/@tsconfig/node14/package.json b/node_modules/@tsconfig/node14/package.json deleted file mode 100644 index 742f97b..0000000 --- a/node_modules/@tsconfig/node14/package.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"@tsconfig/node14","repository":{"type":"git","url":"https://github.com/tsconfig/bases.git","directory":"bases"},"license":"MIT","description":"A base TSConfig for working with Node 14.","keywords":["tsconfig","node14"],"version":"1.0.3"} \ No newline at end of file diff --git a/node_modules/@tsconfig/node14/tsconfig.json b/node_modules/@tsconfig/node14/tsconfig.json deleted file mode 100644 index d1d7551..0000000 --- a/node_modules/@tsconfig/node14/tsconfig.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "display": "Node 14", - - "compilerOptions": { - "lib": ["es2020"], - "module": "commonjs", - "target": "es2020", - - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "moduleResolution": "node" - } -} diff --git a/node_modules/@tsconfig/node16/LICENSE b/node_modules/@tsconfig/node16/LICENSE deleted file mode 100644 index 48ea661..0000000 --- a/node_modules/@tsconfig/node16/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE diff --git a/node_modules/@tsconfig/node16/README.md b/node_modules/@tsconfig/node16/README.md deleted file mode 100644 index 2946b2f..0000000 --- a/node_modules/@tsconfig/node16/README.md +++ /dev/null @@ -1,40 +0,0 @@ -### A base TSConfig for working with Node 16. - -Add the package to your `"devDependencies"`: - -```sh -npm install --save-dev @tsconfig/node16 -yarn add --dev @tsconfig/node16 -``` - -Add to your `tsconfig.json`: - -```json -"extends": "@tsconfig/node16/tsconfig.json" -``` - ---- - -The `tsconfig.json`: - -```jsonc -{ - "$schema": "https://json.schemastore.org/tsconfig", - "display": "Node 16", - - "compilerOptions": { - "lib": ["es2021"], - "module": "Node16", - "target": "es2021", - - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "moduleResolution": "node" - } -} - -``` - -You can find the [code here](https://github.com/tsconfig/bases/blob/master/bases/node16.json). diff --git a/node_modules/@tsconfig/node16/package.json b/node_modules/@tsconfig/node16/package.json deleted file mode 100644 index 8ccc97f..0000000 --- a/node_modules/@tsconfig/node16/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "@tsconfig/node16", - "repository": { - "type": "git", - "url": "https://github.com/tsconfig/bases.git", - "directory": "bases" - }, - "license": "MIT", - "description": "A base TSConfig for working with Node 16.", - "keywords": [ - "tsconfig", - "node16" - ], - "version": "1.0.4" -} \ No newline at end of file diff --git a/node_modules/@tsconfig/node16/tsconfig.json b/node_modules/@tsconfig/node16/tsconfig.json deleted file mode 100644 index 2671912..0000000 --- a/node_modules/@tsconfig/node16/tsconfig.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - "display": "Node 16", - - "compilerOptions": { - "lib": ["es2021"], - "module": "Node16", - "target": "es2021", - - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "moduleResolution": "node" - } -} diff --git a/node_modules/@types/body-parser/LICENSE b/node_modules/@types/body-parser/LICENSE deleted file mode 100644 index 9e841e7..0000000 --- a/node_modules/@types/body-parser/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/body-parser/README.md b/node_modules/@types/body-parser/README.md deleted file mode 100644 index e801582..0000000 --- a/node_modules/@types/body-parser/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Installation -> `npm install --save @types/body-parser` - -# Summary -This package contains type definitions for body-parser (https://github.com/expressjs/body-parser). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/body-parser. - -### Additional Details - * Last updated: Sat, 07 Jun 2025 02:15:25 GMT - * Dependencies: [@types/connect](https://npmjs.com/package/@types/connect), [@types/node](https://npmjs.com/package/@types/node) - -# Credits -These definitions were written by [Santi Albo](https://github.com/santialbo), [Vilic Vane](https://github.com/vilic), [Jonathan Häberle](https://github.com/dreampulse), [Gevik Babakhani](https://github.com/blendsdk), [Tomasz Łaziuk](https://github.com/tlaziuk), [Jason Walton](https://github.com/jwalton), [Piotr Błażejewicz](https://github.com/peterblazejewicz), and [Sebastian Beltran](https://github.com/bjohansebas). diff --git a/node_modules/@types/body-parser/index.d.ts b/node_modules/@types/body-parser/index.d.ts deleted file mode 100644 index 96feda8..0000000 --- a/node_modules/@types/body-parser/index.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -/// - -import { NextHandleFunction } from "connect"; -import * as http from "http"; - -// for docs go to https://github.com/expressjs/body-parser/tree/1.19.0#body-parser - -declare namespace bodyParser { - interface BodyParser { - /** - * @deprecated use individual json/urlencoded middlewares - */ - (options?: OptionsJson & OptionsText & OptionsUrlencoded): NextHandleFunction; - /** - * Returns middleware that only parses json and only looks at requests - * where the Content-Type header matches the type option. - */ - json(options?: OptionsJson): NextHandleFunction; - /** - * Returns middleware that parses all bodies as a Buffer and only looks at requests - * where the Content-Type header matches the type option. - */ - raw(options?: Options): NextHandleFunction; - - /** - * Returns middleware that parses all bodies as a string and only looks at requests - * where the Content-Type header matches the type option. - */ - text(options?: OptionsText): NextHandleFunction; - /** - * Returns middleware that only parses urlencoded bodies and only looks at requests - * where the Content-Type header matches the type option - */ - urlencoded(options?: OptionsUrlencoded): NextHandleFunction; - } - - interface Options { - /** When set to true, then deflated (compressed) bodies will be inflated; when false, deflated bodies are rejected. Defaults to true. */ - inflate?: boolean | undefined; - /** - * Controls the maximum request body size. If this is a number, - * then the value specifies the number of bytes; if it is a string, - * the value is passed to the bytes library for parsing. Defaults to '100kb'. - */ - limit?: number | string | undefined; - /** - * The type option is used to determine what media type the middleware will parse - */ - type?: string | string[] | ((req: http.IncomingMessage) => any) | undefined; - /** - * The verify option, if supplied, is called as verify(req, res, buf, encoding), - * where buf is a Buffer of the raw request body and encoding is the encoding of the request. - */ - verify?(req: http.IncomingMessage, res: http.ServerResponse, buf: Buffer, encoding: string): void; - } - - interface OptionsJson extends Options { - /** - * The reviver option is passed directly to JSON.parse as the second argument. - */ - reviver?(key: string, value: any): any; - /** - * When set to `true`, will only accept arrays and objects; - * when `false` will accept anything JSON.parse accepts. Defaults to `true`. - */ - strict?: boolean | undefined; - } - - interface OptionsText extends Options { - /** - * Specify the default character set for the text content if the charset - * is not specified in the Content-Type header of the request. - * Defaults to `utf-8`. - */ - defaultCharset?: string | undefined; - } - - interface OptionsUrlencoded extends Options { - /** - * The extended option allows to choose between parsing the URL-encoded data - * with the querystring library (when `false`) or the qs library (when `true`). - */ - extended?: boolean | undefined; - /** - * The parameterLimit option controls the maximum number of parameters - * that are allowed in the URL-encoded data. If a request contains more parameters than this value, - * a 413 will be returned to the client. Defaults to 1000. - */ - parameterLimit?: number | undefined; - } -} - -declare const bodyParser: bodyParser.BodyParser; - -export = bodyParser; diff --git a/node_modules/@types/body-parser/package.json b/node_modules/@types/body-parser/package.json deleted file mode 100644 index 15e2dd6..0000000 --- a/node_modules/@types/body-parser/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "@types/body-parser", - "version": "1.19.6", - "description": "TypeScript definitions for body-parser", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/body-parser", - "license": "MIT", - "contributors": [ - { - "name": "Santi Albo", - "githubUsername": "santialbo", - "url": "https://github.com/santialbo" - }, - { - "name": "Vilic Vane", - "githubUsername": "vilic", - "url": "https://github.com/vilic" - }, - { - "name": "Jonathan Häberle", - "githubUsername": "dreampulse", - "url": "https://github.com/dreampulse" - }, - { - "name": "Gevik Babakhani", - "githubUsername": "blendsdk", - "url": "https://github.com/blendsdk" - }, - { - "name": "Tomasz Łaziuk", - "githubUsername": "tlaziuk", - "url": "https://github.com/tlaziuk" - }, - { - "name": "Jason Walton", - "githubUsername": "jwalton", - "url": "https://github.com/jwalton" - }, - { - "name": "Piotr Błażejewicz", - "githubUsername": "peterblazejewicz", - "url": "https://github.com/peterblazejewicz" - }, - { - "name": "Sebastian Beltran", - "githubUsername": "bjohansebas", - "url": "https://github.com/bjohansebas" - } - ], - "main": "", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/body-parser" - }, - "scripts": {}, - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - }, - "peerDependencies": {}, - "typesPublisherContentHash": "d788c843f427d6ca19640ee90eb433324a18f23aed05402a82c4e47e6d60b29d", - "typeScriptVersion": "5.1" -} \ No newline at end of file diff --git a/node_modules/@types/connect/LICENSE b/node_modules/@types/connect/LICENSE deleted file mode 100644 index 9e841e7..0000000 --- a/node_modules/@types/connect/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/connect/README.md b/node_modules/@types/connect/README.md deleted file mode 100644 index e229a83..0000000 --- a/node_modules/@types/connect/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Installation -> `npm install --save @types/connect` - -# Summary -This package contains type definitions for connect (https://github.com/senchalabs/connect). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/connect. - -### Additional Details - * Last updated: Mon, 06 Nov 2023 22:41:05 GMT - * Dependencies: [@types/node](https://npmjs.com/package/@types/node) - -# Credits -These definitions were written by [Maxime LUCE](https://github.com/SomaticIT), and [Evan Hahn](https://github.com/EvanHahn). diff --git a/node_modules/@types/connect/index.d.ts b/node_modules/@types/connect/index.d.ts deleted file mode 100644 index 8355d78..0000000 --- a/node_modules/@types/connect/index.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -/// - -import * as http from "http"; - -/** - * Create a new connect server. - */ -declare function createServer(): createServer.Server; - -declare namespace createServer { - export type ServerHandle = HandleFunction | http.Server; - - export class IncomingMessage extends http.IncomingMessage { - originalUrl?: http.IncomingMessage["url"] | undefined; - } - - type NextFunction = (err?: any) => void; - - export type SimpleHandleFunction = (req: IncomingMessage, res: http.ServerResponse) => void; - export type NextHandleFunction = (req: IncomingMessage, res: http.ServerResponse, next: NextFunction) => void; - export type ErrorHandleFunction = ( - err: any, - req: IncomingMessage, - res: http.ServerResponse, - next: NextFunction, - ) => void; - export type HandleFunction = SimpleHandleFunction | NextHandleFunction | ErrorHandleFunction; - - export interface ServerStackItem { - route: string; - handle: ServerHandle; - } - - export interface Server extends NodeJS.EventEmitter { - (req: http.IncomingMessage, res: http.ServerResponse, next?: Function): void; - - route: string; - stack: ServerStackItem[]; - - /** - * Utilize the given middleware `handle` to the given `route`, - * defaulting to _/_. This "route" is the mount-point for the - * middleware, when given a value other than _/_ the middleware - * is only effective when that segment is present in the request's - * pathname. - * - * For example if we were to mount a function at _/admin_, it would - * be invoked on _/admin_, and _/admin/settings_, however it would - * not be invoked for _/_, or _/posts_. - */ - use(fn: NextHandleFunction): Server; - use(fn: HandleFunction): Server; - use(route: string, fn: NextHandleFunction): Server; - use(route: string, fn: HandleFunction): Server; - - /** - * Handle server requests, punting them down - * the middleware stack. - */ - handle(req: http.IncomingMessage, res: http.ServerResponse, next: Function): void; - - /** - * Listen for connections. - * - * This method takes the same arguments - * as node's `http.Server#listen()`. - * - * HTTP and HTTPS: - * - * If you run your application both as HTTP - * and HTTPS you may wrap them individually, - * since your Connect "server" is really just - * a JavaScript `Function`. - * - * var connect = require('connect') - * , http = require('http') - * , https = require('https'); - * - * var app = connect(); - * - * http.createServer(app).listen(80); - * https.createServer(options, app).listen(443); - */ - listen(port: number, hostname?: string, backlog?: number, callback?: Function): http.Server; - listen(port: number, hostname?: string, callback?: Function): http.Server; - listen(path: string, callback?: Function): http.Server; - listen(handle: any, listeningListener?: Function): http.Server; - } -} - -export = createServer; diff --git a/node_modules/@types/connect/package.json b/node_modules/@types/connect/package.json deleted file mode 100644 index 207078e..0000000 --- a/node_modules/@types/connect/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@types/connect", - "version": "3.4.38", - "description": "TypeScript definitions for connect", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/connect", - "license": "MIT", - "contributors": [ - { - "name": "Maxime LUCE", - "githubUsername": "SomaticIT", - "url": "https://github.com/SomaticIT" - }, - { - "name": "Evan Hahn", - "githubUsername": "EvanHahn", - "url": "https://github.com/EvanHahn" - } - ], - "main": "", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/connect" - }, - "scripts": {}, - "dependencies": { - "@types/node": "*" - }, - "typesPublisherContentHash": "8990242237504bdec53088b79e314b94bec69286df9de56db31f22de403b4092", - "typeScriptVersion": "4.5" -} \ No newline at end of file diff --git a/node_modules/@types/express-serve-static-core/LICENSE b/node_modules/@types/express-serve-static-core/LICENSE deleted file mode 100644 index 9e841e7..0000000 --- a/node_modules/@types/express-serve-static-core/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/express-serve-static-core/README.md b/node_modules/@types/express-serve-static-core/README.md deleted file mode 100644 index e1ad2af..0000000 --- a/node_modules/@types/express-serve-static-core/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Installation -> `npm install --save @types/express-serve-static-core` - -# Summary -This package contains type definitions for express-serve-static-core (http://expressjs.com). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-serve-static-core/v4. - -### Additional Details - * Last updated: Sat, 10 Jan 2026 09:35:12 GMT - * Dependencies: [@types/node](https://npmjs.com/package/@types/node), [@types/qs](https://npmjs.com/package/@types/qs), [@types/range-parser](https://npmjs.com/package/@types/range-parser), [@types/send](https://npmjs.com/package/@types/send) - -# Credits -These definitions were written by [Boris Yankov](https://github.com/borisyankov), [Satana Charuwichitratana](https://github.com/micksatana), [Jose Luis Leon](https://github.com/JoseLion), [David Stephens](https://github.com/dwrss), and [Shin Ando](https://github.com/andoshin11). diff --git a/node_modules/@types/express-serve-static-core/index.d.ts b/node_modules/@types/express-serve-static-core/index.d.ts deleted file mode 100644 index 878b4e8..0000000 --- a/node_modules/@types/express-serve-static-core/index.d.ts +++ /dev/null @@ -1,1281 +0,0 @@ -// This extracts the core definitions from express to prevent a circular dependency between express and serve-static -/// - -import { SendOptions } from "send"; - -declare global { - namespace Express { - // These open interfaces may be extended in an application-specific manner via declaration merging. - // See for example method-override.d.ts (https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/method-override/index.d.ts) - interface Request {} - interface Response {} - interface Locals {} - interface Application {} - } -} - -import { EventEmitter } from "events"; -import * as http from "http"; -import { ParsedQs } from "qs"; -import { Options as RangeParserOptions, Ranges as RangeParserRanges, Result as RangeParserResult } from "range-parser"; - -export {}; - -export type Query = ParsedQs; - -export interface NextFunction { - (err?: any): void; - /** - * "Break-out" of a router by calling {next('router')}; - * @see {https://expressjs.com/en/guide/using-middleware.html#middleware.router} - */ - (deferToNext: "router"): void; - /** - * "Break-out" of a route by calling {next('route')}; - * @see {https://expressjs.com/en/guide/using-middleware.html#middleware.application} - */ - (deferToNext: "route"): void; -} - -export interface Dictionary { - [key: string]: T; -} - -export interface ParamsDictionary { - [key: string | number]: string; -} -export type Params = ParamsDictionary; - -export interface Locals extends Express.Locals {} - -export interface RequestHandler< - P = ParamsDictionary, - ResBody = any, - ReqBody = any, - ReqQuery = ParsedQs, - LocalsObj extends Record = Record, -> { - // tslint:disable-next-line callable-types (This is extended from and can't extend from a type alias in ts<2.2) - ( - req: Request, - res: Response, - next: NextFunction, - ): void; -} - -export type ErrorRequestHandler< - P = ParamsDictionary, - ResBody = any, - ReqBody = any, - ReqQuery = ParsedQs, - LocalsObj extends Record = Record, -> = ( - err: any, - req: Request, - res: Response, - next: NextFunction, -) => void; - -export type PathParams = string | RegExp | Array; - -export type RequestHandlerParams< - P = ParamsDictionary, - ResBody = any, - ReqBody = any, - ReqQuery = ParsedQs, - LocalsObj extends Record = Record, -> = - | RequestHandler - | ErrorRequestHandler - | Array | ErrorRequestHandler

>; - -type RemoveTail = S extends `${infer P}${Tail}` ? P : S; -type GetRouteParameter = RemoveTail< - RemoveTail, `-${string}`>, - `.${string}` ->; - -// prettier-ignore -export type RouteParameters = string extends Route ? ParamsDictionary - : Route extends `${string}(${string}` ? ParamsDictionary // TODO: handling for regex parameters - : Route extends `${string}:${infer Rest}` ? - & ( - GetRouteParameter extends never ? ParamsDictionary - : GetRouteParameter extends `${infer ParamName}?` ? { [P in ParamName]?: string } - : { [P in GetRouteParameter]: string } - ) - & (Rest extends `${GetRouteParameter}${infer Next}` ? RouteParameters : unknown) - : {}; - -/* eslint-disable @definitelytyped/no-unnecessary-generics */ -export interface IRouterMatcher< - T, - Method extends "all" | "get" | "post" | "put" | "delete" | "patch" | "options" | "head" = any, -> { - < - Route extends string, - P = RouteParameters, - ResBody = any, - ReqBody = any, - ReqQuery = ParsedQs, - LocalsObj extends Record = Record, - >( - // (it's used as the default type parameter for P) - path: Route, - // (This generic is meant to be passed explicitly.) - ...handlers: Array> - ): T; - < - Path extends string, - P = RouteParameters, - ResBody = any, - ReqBody = any, - ReqQuery = ParsedQs, - LocalsObj extends Record = Record, - >( - // (it's used as the default type parameter for P) - path: Path, - // (This generic is meant to be passed explicitly.) - ...handlers: Array> - ): T; - < - P = ParamsDictionary, - ResBody = any, - ReqBody = any, - ReqQuery = ParsedQs, - LocalsObj extends Record = Record, - >( - path: PathParams, - // (This generic is meant to be passed explicitly.) - ...handlers: Array> - ): T; - < - P = ParamsDictionary, - ResBody = any, - ReqBody = any, - ReqQuery = ParsedQs, - LocalsObj extends Record = Record, - >( - path: PathParams, - // (This generic is meant to be passed explicitly.) - ...handlers: Array> - ): T; - (path: PathParams, subApplication: Application): T; -} - -export interface IRouterHandler { - (...handlers: Array>>): T; - (...handlers: Array>>): T; - < - P = RouteParameters, - ResBody = any, - ReqBody = any, - ReqQuery = ParsedQs, - LocalsObj extends Record = Record, - >( - // (This generic is meant to be passed explicitly.) - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - ...handlers: Array> - ): T; - < - P = RouteParameters, - ResBody = any, - ReqBody = any, - ReqQuery = ParsedQs, - LocalsObj extends Record = Record, - >( - // (This generic is meant to be passed explicitly.) - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - ...handlers: Array> - ): T; - < - P = ParamsDictionary, - ResBody = any, - ReqBody = any, - ReqQuery = ParsedQs, - LocalsObj extends Record = Record, - >( - // (This generic is meant to be passed explicitly.) - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - ...handlers: Array> - ): T; - < - P = ParamsDictionary, - ResBody = any, - ReqBody = any, - ReqQuery = ParsedQs, - LocalsObj extends Record = Record, - >( - // (This generic is meant to be passed explicitly.) - // eslint-disable-next-line @definitelytyped/no-unnecessary-generics - ...handlers: Array> - ): T; -} -/* eslint-enable @definitelytyped/no-unnecessary-generics */ - -export interface IRouter extends RequestHandler { - /** - * Map the given param placeholder `name`(s) to the given callback(s). - * - * Parameter mapping is used to provide pre-conditions to routes - * which use normalized placeholders. For example a _:user_id_ parameter - * could automatically load a user's information from the database without - * any additional code, - * - * The callback uses the samesignature as middleware, the only differencing - * being that the value of the placeholder is passed, in this case the _id_ - * of the user. Once the `next()` function is invoked, just like middleware - * it will continue on to execute the route, or subsequent parameter functions. - * - * app.param('user_id', function(req, res, next, id){ - * User.find(id, function(err, user){ - * if (err) { - * next(err); - * } else if (user) { - * req.user = user; - * next(); - * } else { - * next(new Error('failed to load user')); - * } - * }); - * }); - */ - param(name: string, handler: RequestParamHandler): this; - - /** - * Alternatively, you can pass only a callback, in which case you have the opportunity to alter the app.param() - * - * @deprecated since version 4.11 - */ - param(callback: (name: string, matcher: RegExp) => RequestParamHandler): this; - - /** - * Special-cased "all" method, applying the given route `path`, - * middleware, and callback to _every_ HTTP method. - */ - all: IRouterMatcher; - get: IRouterMatcher; - post: IRouterMatcher; - put: IRouterMatcher; - delete: IRouterMatcher; - patch: IRouterMatcher; - options: IRouterMatcher; - head: IRouterMatcher; - - checkout: IRouterMatcher; - connect: IRouterMatcher; - copy: IRouterMatcher; - lock: IRouterMatcher; - merge: IRouterMatcher; - mkactivity: IRouterMatcher; - mkcol: IRouterMatcher; - move: IRouterMatcher; - "m-search": IRouterMatcher; - notify: IRouterMatcher; - propfind: IRouterMatcher; - proppatch: IRouterMatcher; - purge: IRouterMatcher; - report: IRouterMatcher; - search: IRouterMatcher; - subscribe: IRouterMatcher; - trace: IRouterMatcher; - unlock: IRouterMatcher; - unsubscribe: IRouterMatcher; - link: IRouterMatcher; - unlink: IRouterMatcher; - - use: IRouterHandler & IRouterMatcher; - - route(prefix: T): IRoute; - route(prefix: PathParams): IRoute; - /** - * Stack of configured routes - */ - stack: ILayer[]; -} - -export interface ILayer { - route?: IRoute; - name: string | ""; - params?: Record; - keys: string[]; - path?: string; - method: string; - regexp: RegExp; - handle: (req: Request, res: Response, next: NextFunction) => any; -} - -export interface IRoute { - path: string; - stack: ILayer[]; - all: IRouterHandler; - get: IRouterHandler; - post: IRouterHandler; - put: IRouterHandler; - delete: IRouterHandler; - patch: IRouterHandler; - options: IRouterHandler; - head: IRouterHandler; - - checkout: IRouterHandler; - copy: IRouterHandler; - lock: IRouterHandler; - merge: IRouterHandler; - mkactivity: IRouterHandler; - mkcol: IRouterHandler; - move: IRouterHandler; - "m-search": IRouterHandler; - notify: IRouterHandler; - purge: IRouterHandler; - report: IRouterHandler; - search: IRouterHandler; - subscribe: IRouterHandler; - trace: IRouterHandler; - unlock: IRouterHandler; - unsubscribe: IRouterHandler; -} - -export interface Router extends IRouter {} - -/** - * Options passed down into `res.cookie` - * @link https://expressjs.com/en/api.html#res.cookie - */ -export interface CookieOptions { - /** Convenient option for setting the expiry time relative to the current time in **milliseconds**. */ - maxAge?: number | undefined; - /** Indicates if the cookie should be signed. */ - signed?: boolean | undefined; - /** Expiry date of the cookie in GMT. If not specified or set to 0, creates a session cookie. */ - expires?: Date | undefined; - /** Flags the cookie to be accessible only by the web server. */ - httpOnly?: boolean | undefined; - /** Path for the cookie. Defaults to “/”. */ - path?: string | undefined; - /** Domain name for the cookie. Defaults to the domain name of the app. */ - domain?: string | undefined; - /** Marks the cookie to be used with HTTPS only. */ - secure?: boolean | undefined; - /** A synchronous function used for cookie value encoding. Defaults to encodeURIComponent. */ - encode?: ((val: string) => string) | undefined; - /** - * Value of the “SameSite” Set-Cookie attribute. - * @link https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00#section-4.1.1. - */ - sameSite?: boolean | "lax" | "strict" | "none" | undefined; - /** - * Value of the “Priority” Set-Cookie attribute. - * @link https://datatracker.ietf.org/doc/html/draft-west-cookie-priority-00#section-4.3 - */ - priority?: "low" | "medium" | "high"; - /** Marks the cookie to use partioned storage. */ - partitioned?: boolean | undefined; -} - -export interface ByteRange { - start: number; - end: number; -} - -export interface RequestRanges extends RangeParserRanges {} - -export type Errback = (err: Error) => void; - -export interface Request< - P = ParamsDictionary, - ResBody = any, - ReqBody = any, - ReqQuery = ParsedQs, - LocalsObj extends Record = Record, -> extends http.IncomingMessage, Express.Request { - /** - * Return request header. - * - * The `Referrer` header field is special-cased, - * both `Referrer` and `Referer` are interchangeable. - * - * Examples: - * - * req.get('Content-Type'); - * // => "text/plain" - * - * req.get('content-type'); - * // => "text/plain" - * - * req.get('Something'); - * // => undefined - * - * Aliased as `req.header()`. - */ - get(name: "set-cookie"): string[] | undefined; - get(name: string): string | undefined; - - header(name: "set-cookie"): string[] | undefined; - header(name: string): string | undefined; - - /** - * Check if the given `type(s)` is acceptable, returning - * the best match when true, otherwise `undefined`, in which - * case you should respond with 406 "Not Acceptable". - * - * The `type` value may be a single mime type string - * such as "application/json", the extension name - * such as "json", a comma-delimted list such as "json, html, text/plain", - * or an array `["json", "html", "text/plain"]`. When a list - * or array is given the _best_ match, if any is returned. - * - * Examples: - * - * // Accept: text/html - * req.accepts('html'); - * // => "html" - * - * // Accept: text/*, application/json - * req.accepts('html'); - * // => "html" - * req.accepts('text/html'); - * // => "text/html" - * req.accepts('json, text'); - * // => "json" - * req.accepts('application/json'); - * // => "application/json" - * - * // Accept: text/*, application/json - * req.accepts('image/png'); - * req.accepts('png'); - * // => false - * - * // Accept: text/*;q=.5, application/json - * req.accepts(['html', 'json']); - * req.accepts('html, json'); - * // => "json" - */ - accepts(): string[]; - accepts(type: string): string | false; - accepts(type: string[]): string | false; - accepts(...type: string[]): string | false; - - /** - * Returns the first accepted charset of the specified character sets, - * based on the request's Accept-Charset HTTP header field. - * If none of the specified charsets is accepted, returns false. - * - * For more information, or if you have issues or concerns, see accepts. - */ - acceptsCharsets(): string[]; - acceptsCharsets(charset: string): string | false; - acceptsCharsets(charset: string[]): string | false; - acceptsCharsets(...charset: string[]): string | false; - - /** - * Returns the first accepted encoding of the specified encodings, - * based on the request's Accept-Encoding HTTP header field. - * If none of the specified encodings is accepted, returns false. - * - * For more information, or if you have issues or concerns, see accepts. - */ - acceptsEncodings(): string[]; - acceptsEncodings(encoding: string): string | false; - acceptsEncodings(encoding: string[]): string | false; - acceptsEncodings(...encoding: string[]): string | false; - - /** - * Returns the first accepted language of the specified languages, - * based on the request's Accept-Language HTTP header field. - * If none of the specified languages is accepted, returns false. - * - * For more information, or if you have issues or concerns, see accepts. - */ - acceptsLanguages(): string[]; - acceptsLanguages(lang: string): string | false; - acceptsLanguages(lang: string[]): string | false; - acceptsLanguages(...lang: string[]): string | false; - - /** - * Parse Range header field, capping to the given `size`. - * - * Unspecified ranges such as "0-" require knowledge of your resource length. In - * the case of a byte range this is of course the total number of bytes. - * If the Range header field is not given `undefined` is returned. - * If the Range header field is given, return value is a result of range-parser. - * See more ./types/range-parser/index.d.ts - * - * NOTE: remember that ranges are inclusive, so for example "Range: users=0-3" - * should respond with 4 users when available, not 3. - */ - range(size: number, options?: RangeParserOptions): RangeParserRanges | RangeParserResult | undefined; - - /** - * Return an array of Accepted media types - * ordered from highest quality to lowest. - */ - accepted: MediaType[]; - - /** - * @deprecated since 4.11 Use either req.params, req.body or req.query, as applicable. - * - * Return the value of param `name` when present or `defaultValue`. - * - * - Checks route placeholders, ex: _/user/:id_ - * - Checks body params, ex: id=12, {"id":12} - * - Checks query string params, ex: ?id=12 - * - * To utilize request bodies, `req.body` - * should be an object. This can be done by using - * the `connect.bodyParser()` middleware. - */ - param(name: string, defaultValue?: any): string; - - /** - * Check if the incoming request contains the "Content-Type" - * header field, and it contains the give mime `type`. - * - * Examples: - * - * // With Content-Type: text/html; charset=utf-8 - * req.is('html'); - * req.is('text/html'); - * req.is('text/*'); - * // => true - * - * // When Content-Type is application/json - * req.is('json'); - * req.is('application/json'); - * req.is('application/*'); - * // => true - * - * req.is('html'); - * // => false - */ - is(type: string | string[]): string | false | null; - - /** - * Return the protocol string "http" or "https" - * when requested with TLS. When the "trust proxy" - * setting is enabled the "X-Forwarded-Proto" header - * field will be trusted. If you're running behind - * a reverse proxy that supplies https for you this - * may be enabled. - */ - readonly protocol: string; - - /** - * Short-hand for: - * - * req.protocol == 'https' - */ - readonly secure: boolean; - - /** - * Return the remote address, or when - * "trust proxy" is `true` return - * the upstream addr. - * - * Value may be undefined if the `req.socket` is destroyed - * (for example, if the client disconnected). - */ - readonly ip: string | undefined; - - /** - * When "trust proxy" is `true`, parse - * the "X-Forwarded-For" ip address list. - * - * For example if the value were "client, proxy1, proxy2" - * you would receive the array `["client", "proxy1", "proxy2"]` - * where "proxy2" is the furthest down-stream. - */ - readonly ips: string[]; - - /** - * Return subdomains as an array. - * - * Subdomains are the dot-separated parts of the host before the main domain of - * the app. By default, the domain of the app is assumed to be the last two - * parts of the host. This can be changed by setting "subdomain offset". - * - * For example, if the domain is "tobi.ferrets.example.com": - * If "subdomain offset" is not set, req.subdomains is `["ferrets", "tobi"]`. - * If "subdomain offset" is 3, req.subdomains is `["tobi"]`. - */ - readonly subdomains: string[]; - - /** - * Short-hand for `url.parse(req.url).pathname`. - */ - readonly path: string; - - /** - * Parse the "Host" header field hostname. - */ - readonly hostname: string; - - /** - * @deprecated Use hostname instead. - */ - readonly host: string; - - /** - * Check if the request is fresh, aka - * Last-Modified and/or the ETag - * still match. - */ - readonly fresh: boolean; - - /** - * Check if the request is stale, aka - * "Last-Modified" and / or the "ETag" for the - * resource has changed. - */ - readonly stale: boolean; - - /** - * Check if the request was an _XMLHttpRequest_. - */ - readonly xhr: boolean; - - // body: { username: string; password: string; remember: boolean; title: string; }; - body: ReqBody; - - // cookies: { string; remember: boolean; }; - cookies: any; - - method: string; - - params: P; - - query: ReqQuery; - - route: any; - - signedCookies: any; - - originalUrl: string; - - url: string; - - baseUrl: string; - - app: Application; - - /** - * After middleware.init executed, Request will contain res and next properties - * See: express/lib/middleware/init.js - */ - res?: Response | undefined; - next?: NextFunction | undefined; -} - -export interface MediaType { - value: string; - quality: number; - type: string; - subtype: string; -} - -export type Send> = (body?: ResBody) => T; - -export interface SendFileOptions extends SendOptions { - /** Object containing HTTP headers to serve with the file. */ - headers?: Record; -} - -export interface DownloadOptions extends SendOptions { - /** Object containing HTTP headers to serve with the file. The header `Content-Disposition` will be overridden by the filename argument. */ - headers?: Record; -} - -export interface Response< - ResBody = any, - LocalsObj extends Record = Record, - StatusCode extends number = number, -> extends http.ServerResponse, Express.Response { - /** - * Set status `code`. - */ - status(code: StatusCode): this; - - /** - * Set the response HTTP status code to `statusCode` and send its string representation as the response body. - * @link http://expressjs.com/4x/api.html#res.sendStatus - * - * Examples: - * - * res.sendStatus(200); // equivalent to res.status(200).send('OK') - * res.sendStatus(403); // equivalent to res.status(403).send('Forbidden') - * res.sendStatus(404); // equivalent to res.status(404).send('Not Found') - * res.sendStatus(500); // equivalent to res.status(500).send('Internal Server Error') - */ - sendStatus(code: StatusCode): this; - - /** - * Set Link header field with the given `links`. - * - * Examples: - * - * res.links({ - * next: 'http://api.example.com/users?page=2', - * last: 'http://api.example.com/users?page=5' - * }); - */ - links(links: any): this; - - /** - * Send a response. - * - * Examples: - * - * res.send(new Buffer('wahoo')); - * res.send({ some: 'json' }); - * res.send('

some html

'); - * res.status(404).send('Sorry, cant find that'); - */ - send: Send; - - /** - * Send JSON response. - * - * Examples: - * - * res.json(null); - * res.json({ user: 'tj' }); - * res.status(500).json('oh noes!'); - * res.status(404).json('I dont have that'); - */ - json: Send; - - /** - * Send JSON response with JSONP callback support. - * - * Examples: - * - * res.jsonp(null); - * res.jsonp({ user: 'tj' }); - * res.status(500).jsonp('oh noes!'); - * res.status(404).jsonp('I dont have that'); - */ - jsonp: Send; - - /** - * Transfer the file at the given `path`. - * - * Automatically sets the _Content-Type_ response header field. - * The callback `fn(err)` is invoked when the transfer is complete - * or when an error occurs. Be sure to check `res.headersSent` - * if you wish to attempt responding, as the header and some data - * may have already been transferred. - * - * Options: - * - * - `maxAge` defaulting to 0 (can be string converted by `ms`) - * - `root` root directory for relative filenames - * - `headers` object of headers to serve with file - * - `dotfiles` serve dotfiles, defaulting to false; can be `"allow"` to send them - * - * Other options are passed along to `send`. - * - * Examples: - * - * The following example illustrates how `res.sendFile()` may - * be used as an alternative for the `static()` middleware for - * dynamic situations. The code backing `res.sendFile()` is actually - * the same code, so HTTP cache support etc is identical. - * - * app.get('/user/:uid/photos/:file', function(req, res){ - * var uid = req.params.uid - * , file = req.params.file; - * - * req.user.mayViewFilesFrom(uid, function(yes){ - * if (yes) { - * res.sendFile('/uploads/' + uid + '/' + file); - * } else { - * res.send(403, 'Sorry! you cant see that.'); - * } - * }); - * }); - * - * @api public - */ - sendFile(path: string, fn?: Errback): void; - sendFile(path: string, options: SendFileOptions, fn?: Errback): void; - - /** - * @deprecated Use sendFile instead. - */ - sendfile(path: string): void; - /** - * @deprecated Use sendFile instead. - */ - sendfile(path: string, options: SendFileOptions): void; - /** - * @deprecated Use sendFile instead. - */ - sendfile(path: string, fn: Errback): void; - /** - * @deprecated Use sendFile instead. - */ - sendfile(path: string, options: SendFileOptions, fn: Errback): void; - - /** - * Transfer the file at the given `path` as an attachment. - * - * Optionally providing an alternate attachment `filename`, - * and optional callback `fn(err)`. The callback is invoked - * when the data transfer is complete, or when an error has - * ocurred. Be sure to check `res.headersSent` if you plan to respond. - * - * The optional options argument passes through to the underlying - * res.sendFile() call, and takes the exact same parameters. - * - * This method uses `res.sendfile()`. - */ - download(path: string, fn?: Errback): void; - download(path: string, filename: string, fn?: Errback): void; - download(path: string, filename: string, options: DownloadOptions, fn?: Errback): void; - - /** - * Set _Content-Type_ response header with `type` through `mime.lookup()` - * when it does not contain "/", or set the Content-Type to `type` otherwise. - * - * Examples: - * - * res.type('.html'); - * res.type('html'); - * res.type('json'); - * res.type('application/json'); - * res.type('png'); - */ - contentType(type: string): this; - - /** - * Set _Content-Type_ response header with `type` through `mime.lookup()` - * when it does not contain "/", or set the Content-Type to `type` otherwise. - * - * Examples: - * - * res.type('.html'); - * res.type('html'); - * res.type('json'); - * res.type('application/json'); - * res.type('png'); - */ - type(type: string): this; - - /** - * Respond to the Acceptable formats using an `obj` - * of mime-type callbacks. - * - * This method uses `req.accepted`, an array of - * acceptable types ordered by their quality values. - * When "Accept" is not present the _first_ callback - * is invoked, otherwise the first match is used. When - * no match is performed the server responds with - * 406 "Not Acceptable". - * - * Content-Type is set for you, however if you choose - * you may alter this within the callback using `res.type()` - * or `res.set('Content-Type', ...)`. - * - * res.format({ - * 'text/plain': function(){ - * res.send('hey'); - * }, - * - * 'text/html': function(){ - * res.send('

hey

'); - * }, - * - * 'appliation/json': function(){ - * res.send({ message: 'hey' }); - * } - * }); - * - * In addition to canonicalized MIME types you may - * also use extnames mapped to these types: - * - * res.format({ - * text: function(){ - * res.send('hey'); - * }, - * - * html: function(){ - * res.send('

hey

'); - * }, - * - * json: function(){ - * res.send({ message: 'hey' }); - * } - * }); - * - * By default Express passes an `Error` - * with a `.status` of 406 to `next(err)` - * if a match is not made. If you provide - * a `.default` callback it will be invoked - * instead. - */ - format(obj: any): this; - - /** - * Set _Content-Disposition_ header to _attachment_ with optional `filename`. - */ - attachment(filename?: string): this; - - /** - * Set header `field` to `val`, or pass - * an object of header fields. - * - * Examples: - * - * res.set('Foo', ['bar', 'baz']); - * res.set('Accept', 'application/json'); - * res.set({ Accept: 'text/plain', 'X-API-Key': 'tobi' }); - * - * Aliased as `res.header()`. - */ - set(field: any): this; - set(field: string, value?: string | string[]): this; - - header(field: any): this; - header(field: string, value?: string | string[]): this; - - // Property indicating if HTTP headers has been sent for the response. - headersSent: boolean; - - /** Get value for header `field`. */ - get(field: string): string | undefined; - - /** Clear cookie `name`. */ - clearCookie(name: string, options?: CookieOptions): this; - - /** - * Set cookie `name` to `val`, with the given `options`. - * - * Options: - * - * - `maxAge` max-age in milliseconds, converted to `expires` - * - `signed` sign the cookie - * - `path` defaults to "/" - * - * Examples: - * - * // "Remember Me" for 15 minutes - * res.cookie('rememberme', '1', { expires: new Date(Date.now() + 900000), httpOnly: true }); - * - * // save as above - * res.cookie('rememberme', '1', { maxAge: 900000, httpOnly: true }) - */ - cookie(name: string, val: string, options: CookieOptions): this; - cookie(name: string, val: any, options: CookieOptions): this; - cookie(name: string, val: any): this; - - /** - * Set the location header to `url`. - * - * The given `url` can also be the name of a mapped url, for - * example by default express supports "back" which redirects - * to the _Referrer_ or _Referer_ headers or "/". - * - * Examples: - * - * res.location('/foo/bar').; - * res.location('http://example.com'); - * res.location('../login'); // /blog/post/1 -> /blog/login - * - * Mounting: - * - * When an application is mounted and `res.location()` - * is given a path that does _not_ lead with "/" it becomes - * relative to the mount-point. For example if the application - * is mounted at "/blog", the following would become "/blog/login". - * - * res.location('login'); - * - * While the leading slash would result in a location of "/login": - * - * res.location('/login'); - */ - location(url: string): this; - - /** - * Redirect to the given `url` with optional response `status` - * defaulting to 302. - * - * The resulting `url` is determined by `res.location()`, so - * it will play nicely with mounted apps, relative paths, - * `"back"` etc. - * - * Examples: - * - * res.redirect('back'); - * res.redirect('/foo/bar'); - * res.redirect('http://example.com'); - * res.redirect(301, 'http://example.com'); - * res.redirect('http://example.com', 301); - * res.redirect('../login'); // /blog/post/1 -> /blog/login - */ - redirect(url: string): void; - redirect(status: number, url: string): void; - /** @deprecated use res.redirect(status, url) instead */ - redirect(url: string, status: number): void; - - /** - * Render `view` with the given `options` and optional callback `fn`. - * When a callback function is given a response will _not_ be made - * automatically, otherwise a response of _200_ and _text/html_ is given. - * - * Options: - * - * - `cache` boolean hinting to the engine it should cache - * - `filename` filename of the view being rendered - */ - render(view: string, options?: object, callback?: (err: Error, html: string) => void): void; - render(view: string, callback?: (err: Error, html: string) => void): void; - - locals: LocalsObj & Locals; - - charset: string; - - /** - * Adds the field to the Vary response header, if it is not there already. - * Examples: - * - * res.vary('User-Agent').render('docs'); - */ - vary(field: string): this; - - app: Application; - - /** - * Appends the specified value to the HTTP response header field. - * If the header is not already set, it creates the header with the specified value. - * The value parameter can be a string or an array. - * - * Note: calling res.set() after res.append() will reset the previously-set header value. - * - * @since 4.11.0 - */ - append(field: string, value?: string[] | string): this; - - /** - * After middleware.init executed, Response will contain req property - * See: express/lib/middleware/init.js - */ - req: Request; -} - -export interface Handler extends RequestHandler {} - -export type RequestParamHandler = (req: Request, res: Response, next: NextFunction, value: any, name: string) => any; - -export type ApplicationRequestHandler = - & IRouterHandler - & IRouterMatcher - & ((...handlers: RequestHandlerParams[]) => T); - -export interface Application< - LocalsObj extends Record = Record, -> extends EventEmitter, IRouter, Express.Application { - /** - * Express instance itself is a request handler, which could be invoked without - * third argument. - */ - (req: Request | http.IncomingMessage, res: Response | http.ServerResponse): any; - - /** - * Initialize the server. - * - * - setup default configuration - * - setup default middleware - * - setup route reflection methods - */ - init(): void; - - /** - * Initialize application configuration. - */ - defaultConfiguration(): void; - - /** - * Register the given template engine callback `fn` - * as `ext`. - * - * By default will `require()` the engine based on the - * file extension. For example if you try to render - * a "foo.jade" file Express will invoke the following internally: - * - * app.engine('jade', require('jade').__express); - * - * For engines that do not provide `.__express` out of the box, - * or if you wish to "map" a different extension to the template engine - * you may use this method. For example mapping the EJS template engine to - * ".html" files: - * - * app.engine('html', require('ejs').renderFile); - * - * In this case EJS provides a `.renderFile()` method with - * the same signature that Express expects: `(path, options, callback)`, - * though note that it aliases this method as `ejs.__express` internally - * so if you're using ".ejs" extensions you dont need to do anything. - * - * Some template engines do not follow this convention, the - * [Consolidate.js](https://github.com/visionmedia/consolidate.js) - * library was created to map all of node's popular template - * engines to follow this convention, thus allowing them to - * work seamlessly within Express. - */ - engine( - ext: string, - fn: (path: string, options: object, callback: (e: any, rendered?: string) => void) => void, - ): this; - - /** - * Assign `setting` to `val`, or return `setting`'s value. - * - * app.set('foo', 'bar'); - * app.get('foo'); - * // => "bar" - * app.set('foo', ['bar', 'baz']); - * app.get('foo'); - * // => ["bar", "baz"] - * - * Mounted servers inherit their parent server's settings. - */ - set(setting: string, val: any): this; - get: ((name: string) => any) & IRouterMatcher; - - param(name: string | string[], handler: RequestParamHandler): this; - - /** - * Alternatively, you can pass only a callback, in which case you have the opportunity to alter the app.param() - * - * @deprecated since version 4.11 - */ - param(callback: (name: string, matcher: RegExp) => RequestParamHandler): this; - - /** - * Return the app's absolute pathname - * based on the parent(s) that have - * mounted it. - * - * For example if the application was - * mounted as "/admin", which itself - * was mounted as "/blog" then the - * return value would be "/blog/admin". - */ - path(): string; - - /** - * Check if `setting` is enabled (truthy). - * - * app.enabled('foo') - * // => false - * - * app.enable('foo') - * app.enabled('foo') - * // => true - */ - enabled(setting: string): boolean; - - /** - * Check if `setting` is disabled. - * - * app.disabled('foo') - * // => true - * - * app.enable('foo') - * app.disabled('foo') - * // => false - */ - disabled(setting: string): boolean; - - /** Enable `setting`. */ - enable(setting: string): this; - - /** Disable `setting`. */ - disable(setting: string): this; - - /** - * Render the given view `name` name with `options` - * and a callback accepting an error and the - * rendered template string. - * - * Example: - * - * app.render('email', { name: 'Tobi' }, function(err, html){ - * // ... - * }) - */ - render(name: string, options?: object, callback?: (err: Error, html: string) => void): void; - render(name: string, callback: (err: Error, html: string) => void): void; - - /** - * Listen for connections. - * - * A node `http.Server` is returned, with this - * application (which is a `Function`) as its - * callback. If you wish to create both an HTTP - * and HTTPS server you may do so with the "http" - * and "https" modules as shown here: - * - * var http = require('http') - * , https = require('https') - * , express = require('express') - * , app = express(); - * - * http.createServer(app).listen(80); - * https.createServer({ ... }, app).listen(443); - */ - listen(port: number, hostname: string, backlog: number, callback?: () => void): http.Server; - listen(port: number, hostname: string, callback?: () => void): http.Server; - listen(port: number, callback?: () => void): http.Server; - listen(callback?: () => void): http.Server; - listen(path: string, callback?: () => void): http.Server; - listen(handle: any, listeningListener?: () => void): http.Server; - - router: string; - - settings: any; - - resource: any; - - map: any; - - locals: LocalsObj & Locals; - - /** - * The app.routes object houses all of the routes defined mapped by the - * associated HTTP verb. This object may be used for introspection - * capabilities, for example Express uses this internally not only for - * routing but to provide default OPTIONS behaviour unless app.options() - * is used. Your application or framework may also remove routes by - * simply by removing them from this object. - */ - routes: any; - - /** - * Used to get all registered routes in Express Application - */ - _router: any; - - use: ApplicationRequestHandler; - - /** - * The mount event is fired on a sub-app, when it is mounted on a parent app. - * The parent app is passed to the callback function. - * - * NOTE: - * Sub-apps will: - * - Not inherit the value of settings that have a default value. You must set the value in the sub-app. - * - Inherit the value of settings with no default value. - */ - on: (event: "mount", callback: (parent: Application) => void) => this; - - /** - * The app.mountpath property contains one or more path patterns on which a sub-app was mounted. - */ - mountpath: string | string[]; -} - -export interface Express extends Application { - request: Request; - response: Response; -} diff --git a/node_modules/@types/express-serve-static-core/package.json b/node_modules/@types/express-serve-static-core/package.json deleted file mode 100644 index 4933535..0000000 --- a/node_modules/@types/express-serve-static-core/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "@types/express-serve-static-core", - "version": "4.19.8", - "description": "TypeScript definitions for express-serve-static-core", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-serve-static-core", - "license": "MIT", - "contributors": [ - { - "name": "Boris Yankov", - "githubUsername": "borisyankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "Satana Charuwichitratana", - "githubUsername": "micksatana", - "url": "https://github.com/micksatana" - }, - { - "name": "Jose Luis Leon", - "githubUsername": "JoseLion", - "url": "https://github.com/JoseLion" - }, - { - "name": "David Stephens", - "githubUsername": "dwrss", - "url": "https://github.com/dwrss" - }, - { - "name": "Shin Ando", - "githubUsername": "andoshin11", - "url": "https://github.com/andoshin11" - } - ], - "main": "", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/express-serve-static-core" - }, - "scripts": {}, - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*", - "@types/send": "*" - }, - "peerDependencies": {}, - "typesPublisherContentHash": "239eaebf1ca974a76fca799db9b418767c926de37604da25b62ea51f1919676a", - "typeScriptVersion": "5.2" -} \ No newline at end of file diff --git a/node_modules/@types/express/LICENSE b/node_modules/@types/express/LICENSE deleted file mode 100644 index 9e841e7..0000000 --- a/node_modules/@types/express/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/express/README.md b/node_modules/@types/express/README.md deleted file mode 100644 index 6e0e31e..0000000 --- a/node_modules/@types/express/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Installation -> `npm install --save @types/express` - -# Summary -This package contains type definitions for express (http://expressjs.com). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express/v4. - -### Additional Details - * Last updated: Mon, 27 Oct 2025 20:34:59 GMT - * Dependencies: [@types/body-parser](https://npmjs.com/package/@types/body-parser), [@types/express-serve-static-core](https://npmjs.com/package/@types/express-serve-static-core), [@types/qs](https://npmjs.com/package/@types/qs), [@types/serve-static](https://npmjs.com/package/@types/serve-static) - -# Credits -These definitions were written by [Boris Yankov](https://github.com/borisyankov), [Puneet Arora](https://github.com/puneetar), [Dylan Frankland](https://github.com/dfrankland), and [Sebastian Beltran](https://github.com/bjohansebas). diff --git a/node_modules/@types/express/index.d.ts b/node_modules/@types/express/index.d.ts deleted file mode 100644 index dc2934d..0000000 --- a/node_modules/@types/express/index.d.ts +++ /dev/null @@ -1,128 +0,0 @@ -/* =================== USAGE =================== - - import express = require("express"); - var app = express(); - - =============================================== */ - -/// -/// - -import bodyParser = require("body-parser"); -import * as core from "express-serve-static-core"; -import * as qs from "qs"; -import serveStatic = require("serve-static"); - -/** - * Creates an Express application. The express() function is a top-level function exported by the express module. - */ -declare function e(): core.Express; - -declare namespace e { - /** - * This is a built-in middleware function in Express. It parses incoming requests with JSON payloads and is based on body-parser. - * @since 4.16.0 - */ - var json: typeof bodyParser.json; - - /** - * This is a built-in middleware function in Express. It parses incoming requests with Buffer payloads and is based on body-parser. - * @since 4.17.0 - */ - var raw: typeof bodyParser.raw; - - /** - * This is a built-in middleware function in Express. It parses incoming requests with text payloads and is based on body-parser. - * @since 4.17.0 - */ - var text: typeof bodyParser.text; - - /** - * These are the exposed prototypes. - */ - var application: Application; - var request: Request; - var response: Response; - - /** - * This is a built-in middleware function in Express. It serves static files and is based on serve-static. - */ - var static: serveStatic.RequestHandlerConstructor; - - /** - * This is a built-in middleware function in Express. It parses incoming requests with urlencoded payloads and is based on body-parser. - * @since 4.16.0 - */ - var urlencoded: typeof bodyParser.urlencoded; - - /** - * This is a built-in middleware function in Express. It parses incoming request query parameters. - */ - export function query(options: qs.IParseOptions | typeof qs.parse): Handler; - - export function Router(options?: RouterOptions): core.Router; - - interface RouterOptions { - /** - * Enable case sensitivity. - */ - caseSensitive?: boolean | undefined; - - /** - * Preserve the req.params values from the parent router. - * If the parent and the child have conflicting param names, the child’s value take precedence. - * - * @default false - * @since 4.5.0 - */ - mergeParams?: boolean | undefined; - - /** - * Enable strict routing. - */ - strict?: boolean | undefined; - } - - interface Application extends core.Application {} - interface CookieOptions extends core.CookieOptions {} - interface Errback extends core.Errback {} - interface ErrorRequestHandler< - P = core.ParamsDictionary, - ResBody = any, - ReqBody = any, - ReqQuery = core.Query, - Locals extends Record = Record, - > extends core.ErrorRequestHandler {} - interface Express extends core.Express {} - interface Handler extends core.Handler {} - interface IRoute extends core.IRoute {} - interface IRouter extends core.IRouter {} - interface IRouterHandler extends core.IRouterHandler {} - interface IRouterMatcher extends core.IRouterMatcher {} - interface MediaType extends core.MediaType {} - interface NextFunction extends core.NextFunction {} - interface Locals extends core.Locals {} - interface Request< - P = core.ParamsDictionary, - ResBody = any, - ReqBody = any, - ReqQuery = core.Query, - Locals extends Record = Record, - > extends core.Request {} - interface RequestHandler< - P = core.ParamsDictionary, - ResBody = any, - ReqBody = any, - ReqQuery = core.Query, - Locals extends Record = Record, - > extends core.RequestHandler {} - interface RequestParamHandler extends core.RequestParamHandler {} - interface Response< - ResBody = any, - Locals extends Record = Record, - > extends core.Response {} - interface Router extends core.Router {} - interface Send extends core.Send {} -} - -export = e; diff --git a/node_modules/@types/express/package.json b/node_modules/@types/express/package.json deleted file mode 100644 index 9fc06fb..0000000 --- a/node_modules/@types/express/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "@types/express", - "version": "4.17.25", - "description": "TypeScript definitions for express", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express", - "license": "MIT", - "contributors": [ - { - "name": "Boris Yankov", - "githubUsername": "borisyankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "Puneet Arora", - "githubUsername": "puneetar", - "url": "https://github.com/puneetar" - }, - { - "name": "Dylan Frankland", - "githubUsername": "dfrankland", - "url": "https://github.com/dfrankland" - }, - { - "name": "Sebastian Beltran", - "githubUsername": "bjohansebas", - "url": "https://github.com/bjohansebas" - } - ], - "main": "", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/express" - }, - "scripts": {}, - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.33", - "@types/qs": "*", - "@types/serve-static": "^1" - }, - "peerDependencies": {}, - "typesPublisherContentHash": "875cd41acf5e799aefe604cb91b2b033db9e38e44df52044870814402a054994", - "typeScriptVersion": "5.2" -} \ No newline at end of file diff --git a/node_modules/@types/http-errors/LICENSE b/node_modules/@types/http-errors/LICENSE deleted file mode 100644 index 9e841e7..0000000 --- a/node_modules/@types/http-errors/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/http-errors/README.md b/node_modules/@types/http-errors/README.md deleted file mode 100644 index d64e3dc..0000000 --- a/node_modules/@types/http-errors/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Installation -> `npm install --save @types/http-errors` - -# Summary -This package contains type definitions for http-errors (https://github.com/jshttp/http-errors). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-errors. - -### Additional Details - * Last updated: Sat, 07 Jun 2025 02:15:25 GMT - * Dependencies: none - -# Credits -These definitions were written by [Tanguy Krotoff](https://github.com/tkrotoff), [BendingBender](https://github.com/BendingBender), and [Sebastian Beltran](https://github.com/bjohansebas). diff --git a/node_modules/@types/http-errors/index.d.ts b/node_modules/@types/http-errors/index.d.ts deleted file mode 100644 index e7fb2a8..0000000 --- a/node_modules/@types/http-errors/index.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -export = createHttpError; - -declare const createHttpError: createHttpError.CreateHttpError & createHttpError.NamedConstructors & { - isHttpError: createHttpError.IsHttpError; -}; - -declare namespace createHttpError { - interface HttpError extends Error { - status: N; - statusCode: N; - expose: boolean; - headers?: { - [key: string]: string; - } | undefined; - [key: string]: any; - } - - type UnknownError = Error | string | { [key: string]: any }; - - interface HttpErrorConstructor { - (msg?: string): HttpError; - new(msg?: string): HttpError; - } - - interface CreateHttpError { - (arg: N, ...rest: UnknownError[]): HttpError; - (...rest: UnknownError[]): HttpError; - } - - type IsHttpError = (error: unknown) => error is HttpError; - - type NamedConstructors = - & { - HttpError: HttpErrorConstructor; - } - & Record<"BadRequest" | "400", HttpErrorConstructor<400>> - & Record<"Unauthorized" | "401", HttpErrorConstructor<401>> - & Record<"PaymentRequired" | "402", HttpErrorConstructor<402>> - & Record<"Forbidden" | "403", HttpErrorConstructor<403>> - & Record<"NotFound" | "404", HttpErrorConstructor<404>> - & Record<"MethodNotAllowed" | "405", HttpErrorConstructor<405>> - & Record<"NotAcceptable" | "406", HttpErrorConstructor<406>> - & Record<"ProxyAuthenticationRequired" | "407", HttpErrorConstructor<407>> - & Record<"RequestTimeout" | "408", HttpErrorConstructor<408>> - & Record<"Conflict" | "409", HttpErrorConstructor<409>> - & Record<"Gone" | "410", HttpErrorConstructor<410>> - & Record<"LengthRequired" | "411", HttpErrorConstructor<411>> - & Record<"PreconditionFailed" | "412", HttpErrorConstructor<412>> - & Record<"PayloadTooLarge" | "413", HttpErrorConstructor<413>> - & Record<"URITooLong" | "414", HttpErrorConstructor<414>> - & Record<"UnsupportedMediaType" | "415", HttpErrorConstructor<415>> - & Record<"RangeNotSatisfiable" | "416", HttpErrorConstructor<416>> - & Record<"ExpectationFailed" | "417", HttpErrorConstructor<417>> - & Record<"ImATeapot" | "418", HttpErrorConstructor<418>> - & Record<"MisdirectedRequest" | "421", HttpErrorConstructor<421>> - & Record<"UnprocessableEntity" | "422", HttpErrorConstructor<422>> - & Record<"Locked" | "423", HttpErrorConstructor<423>> - & Record<"FailedDependency" | "424", HttpErrorConstructor<424>> - & Record<"TooEarly" | "425", HttpErrorConstructor<425>> - & Record<"UpgradeRequired" | "426", HttpErrorConstructor<426>> - & Record<"PreconditionRequired" | "428", HttpErrorConstructor<428>> - & Record<"TooManyRequests" | "429", HttpErrorConstructor<429>> - & Record<"RequestHeaderFieldsTooLarge" | "431", HttpErrorConstructor<431>> - & Record<"UnavailableForLegalReasons" | "451", HttpErrorConstructor<451>> - & Record<"InternalServerError" | "500", HttpErrorConstructor<500>> - & Record<"NotImplemented" | "501", HttpErrorConstructor<501>> - & Record<"BadGateway" | "502", HttpErrorConstructor<502>> - & Record<"ServiceUnavailable" | "503", HttpErrorConstructor<503>> - & Record<"GatewayTimeout" | "504", HttpErrorConstructor<504>> - & Record<"HTTPVersionNotSupported" | "505", HttpErrorConstructor<505>> - & Record<"VariantAlsoNegotiates" | "506", HttpErrorConstructor<506>> - & Record<"InsufficientStorage" | "507", HttpErrorConstructor<507>> - & Record<"LoopDetected" | "508", HttpErrorConstructor<508>> - & Record<"BandwidthLimitExceeded" | "509", HttpErrorConstructor<509>> - & Record<"NotExtended" | "510", HttpErrorConstructor<510>> - & Record<"NetworkAuthenticationRequire" | "511", HttpErrorConstructor<511>>; -} diff --git a/node_modules/@types/http-errors/package.json b/node_modules/@types/http-errors/package.json deleted file mode 100644 index 91d49cf..0000000 --- a/node_modules/@types/http-errors/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "@types/http-errors", - "version": "2.0.5", - "description": "TypeScript definitions for http-errors", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-errors", - "license": "MIT", - "contributors": [ - { - "name": "Tanguy Krotoff", - "githubUsername": "tkrotoff", - "url": "https://github.com/tkrotoff" - }, - { - "name": "BendingBender", - "githubUsername": "BendingBender", - "url": "https://github.com/BendingBender" - }, - { - "name": "Sebastian Beltran", - "githubUsername": "bjohansebas", - "url": "https://github.com/bjohansebas" - } - ], - "main": "", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/http-errors" - }, - "scripts": {}, - "dependencies": {}, - "peerDependencies": {}, - "typesPublisherContentHash": "621b9125a6493a2fa928b9150e335cb57429fb00e3bc0257426f1173903f7a4a", - "typeScriptVersion": "5.1" -} \ No newline at end of file diff --git a/node_modules/@types/jsonwebtoken/LICENSE b/node_modules/@types/jsonwebtoken/LICENSE deleted file mode 100644 index 9e841e7..0000000 --- a/node_modules/@types/jsonwebtoken/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/jsonwebtoken/README.md b/node_modules/@types/jsonwebtoken/README.md deleted file mode 100644 index 79dea4d..0000000 --- a/node_modules/@types/jsonwebtoken/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Installation -> `npm install --save @types/jsonwebtoken` - -# Summary -This package contains type definitions for jsonwebtoken (https://github.com/auth0/node-jsonwebtoken). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsonwebtoken. - -### Additional Details - * Last updated: Mon, 16 Jun 2025 07:35:37 GMT - * Dependencies: [@types/ms](https://npmjs.com/package/@types/ms), [@types/node](https://npmjs.com/package/@types/node) - -# Credits -These definitions were written by [Maxime LUCE](https://github.com/SomaticIT), [Daniel Heim](https://github.com/danielheim), [Brice BERNARD](https://github.com/brikou), [Veli-Pekka Kestilä](https://github.com/vpk), [Daniel Parker](https://github.com/GeneralistDev), [Kjell Dießel](https://github.com/kettil), [Robert Gajda](https://github.com/RunAge), [Nico Flaig](https://github.com/nflaig), [Linus Unnebäck](https://github.com/LinusU), [Ivan Sieder](https://github.com/ivansieder), [Piotr Błażejewicz](https://github.com/peterblazejewicz), and [Nandor Kraszlan](https://github.com/nandi95). diff --git a/node_modules/@types/jsonwebtoken/index.d.ts b/node_modules/@types/jsonwebtoken/index.d.ts deleted file mode 100644 index accb78c..0000000 --- a/node_modules/@types/jsonwebtoken/index.d.ts +++ /dev/null @@ -1,271 +0,0 @@ -/// - -import type { createPrivateKey, createPublicKey, KeyObject } from "crypto"; -import type { StringValue } from "ms"; - -export class JsonWebTokenError extends Error { - inner: Error; - - constructor(message: string, error?: Error); -} - -export class TokenExpiredError extends JsonWebTokenError { - expiredAt: Date; - - constructor(message: string, expiredAt: Date); -} - -/** - * Thrown if current time is before the nbf claim. - */ -export class NotBeforeError extends JsonWebTokenError { - date: Date; - - constructor(message: string, date: Date); -} - -export interface SignOptions { - /** - * Signature algorithm. Could be one of these values : - * - HS256: HMAC using SHA-256 hash algorithm (default) - * - HS384: HMAC using SHA-384 hash algorithm - * - HS512: HMAC using SHA-512 hash algorithm - * - RS256: RSASSA using SHA-256 hash algorithm - * - RS384: RSASSA using SHA-384 hash algorithm - * - RS512: RSASSA using SHA-512 hash algorithm - * - ES256: ECDSA using P-256 curve and SHA-256 hash algorithm - * - ES384: ECDSA using P-384 curve and SHA-384 hash algorithm - * - ES512: ECDSA using P-521 curve and SHA-512 hash algorithm - * - none: No digital signature or MAC value included - */ - algorithm?: Algorithm | undefined; - keyid?: string | undefined; - expiresIn?: StringValue | number; - notBefore?: StringValue | number | undefined; - audience?: string | string[] | undefined; - subject?: string | undefined; - issuer?: string | undefined; - jwtid?: string | undefined; - mutatePayload?: boolean | undefined; - noTimestamp?: boolean | undefined; - header?: JwtHeader | undefined; - encoding?: string | undefined; - allowInsecureKeySizes?: boolean | undefined; - allowInvalidAsymmetricKeyTypes?: boolean | undefined; -} - -export interface VerifyOptions { - algorithms?: Algorithm[] | undefined; - audience?: string | RegExp | [string | RegExp, ...(string | RegExp)[]] | undefined; - clockTimestamp?: number | undefined; - clockTolerance?: number | undefined; - /** return an object with the decoded `{ payload, header, signature }` instead of only the usual content of the payload. */ - complete?: boolean | undefined; - issuer?: string | [string, ...(string[])] | undefined; - ignoreExpiration?: boolean | undefined; - ignoreNotBefore?: boolean | undefined; - jwtid?: string | undefined; - /** - * If you want to check `nonce` claim, provide a string value here. - * It is used on Open ID for the ID Tokens. ([Open ID implementation notes](https://openid.net/specs/openid-connect-core-1_0.html#NonceNotes)) - */ - nonce?: string | undefined; - subject?: string | undefined; - maxAge?: string | number | undefined; - allowInvalidAsymmetricKeyTypes?: boolean | undefined; -} - -export interface DecodeOptions { - complete?: boolean | undefined; - json?: boolean | undefined; -} -export type VerifyErrors = - | JsonWebTokenError - | NotBeforeError - | TokenExpiredError; -export type VerifyCallback = ( - error: VerifyErrors | null, - decoded?: T | undefined, -) => void; - -export type SignCallback = ( - error: Error | null, - encoded?: string | undefined, -) => void; - -// standard names https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1 -export interface JwtHeader { - alg: string | Algorithm; - typ?: string | undefined; - cty?: string | undefined; - crit?: Array> | undefined; - kid?: string | undefined; - jku?: string | undefined; - x5u?: string | string[] | undefined; - "x5t#S256"?: string | undefined; - x5t?: string | undefined; - x5c?: string | string[] | undefined; -} - -// standard claims https://datatracker.ietf.org/doc/html/rfc7519#section-4.1 -export interface JwtPayload { - [key: string]: any; - iss?: string | undefined; - sub?: string | undefined; - aud?: string | string[] | undefined; - exp?: number | undefined; - nbf?: number | undefined; - iat?: number | undefined; - jti?: string | undefined; -} - -export interface Jwt { - header: JwtHeader; - payload: JwtPayload | string; - signature: string; -} - -// https://github.com/auth0/node-jsonwebtoken#algorithms-supported -export type Algorithm = - | "HS256" - | "HS384" - | "HS512" - | "RS256" - | "RS384" - | "RS512" - | "ES256" - | "ES384" - | "ES512" - | "PS256" - | "PS384" - | "PS512" - | "none"; - -export type SigningKeyCallback = ( - error: Error | null, - signingKey?: Secret | PublicKey, -) => void; - -export type GetPublicKeyOrSecret = ( - header: JwtHeader, - callback: SigningKeyCallback, -) => void; - -export type PublicKey = Parameters[0]; - -export type PrivateKey = Parameters[0]; - -export type Secret = - | string - | Buffer - | KeyObject - | { key: string | Buffer; passphrase: string }; - -/** - * Synchronously sign the given payload into a JSON Web Token string - * payload - Payload to sign, could be an literal, buffer or string - * secretOrPrivateKey - Either the secret for HMAC algorithms, or the PEM encoded private key for RSA and ECDSA. - * [options] - Options for the signature - * returns - The JSON Web Token string - */ -export function sign( - payload: string | Buffer | object, - secretOrPrivateKey: Secret | PrivateKey, - options?: SignOptions, -): string; -export function sign( - payload: string | Buffer | object, - secretOrPrivateKey: null, - options?: SignOptions & { algorithm: "none" }, -): string; - -/** - * Sign the given payload into a JSON Web Token string - * payload - Payload to sign, could be an literal, buffer or string - * secretOrPrivateKey - Either the secret for HMAC algorithms, or the PEM encoded private key for RSA and ECDSA. - * [options] - Options for the signature - * callback - Callback to get the encoded token on - */ -export function sign( - payload: string | Buffer | object, - secretOrPrivateKey: Secret | PrivateKey, - callback: SignCallback, -): void; -export function sign( - payload: string | Buffer | object, - secretOrPrivateKey: Secret | PrivateKey, - options: SignOptions, - callback: SignCallback, -): void; -export function sign( - payload: string | Buffer | object, - secretOrPrivateKey: null, - options: SignOptions & { algorithm: "none" }, - callback: SignCallback, -): void; - -/** - * Synchronously verify given token using a secret or a public key to get a decoded token - * token - JWT string to verify - * secretOrPublicKey - Either the secret for HMAC algorithms, or the PEM encoded public key for RSA and ECDSA. - * [options] - Options for the verification - * returns - The decoded token. - */ -export function verify( - token: string, - secretOrPublicKey: Secret | PublicKey, - options: VerifyOptions & { complete: true }, -): Jwt; -export function verify( - token: string, - secretOrPublicKey: Secret | PublicKey, - options?: VerifyOptions & { complete?: false }, -): JwtPayload | string; -export function verify( - token: string, - secretOrPublicKey: Secret | PublicKey, - options?: VerifyOptions, -): Jwt | JwtPayload | string; - -/** - * Asynchronously verify given token using a secret or a public key to get a decoded token - * token - JWT string to verify - * secretOrPublicKey - A string or buffer containing either the secret for HMAC algorithms, - * or the PEM encoded public key for RSA and ECDSA. If jwt.verify is called asynchronous, - * secretOrPublicKey can be a function that should fetch the secret or public key - * [options] - Options for the verification - * callback - Callback to get the decoded token on - */ -export function verify( - token: string, - secretOrPublicKey: Secret | PublicKey | GetPublicKeyOrSecret, - callback?: VerifyCallback, -): void; -export function verify( - token: string, - secretOrPublicKey: Secret | PublicKey | GetPublicKeyOrSecret, - options: VerifyOptions & { complete: true }, - callback?: VerifyCallback, -): void; -export function verify( - token: string, - secretOrPublicKey: Secret | PublicKey | GetPublicKeyOrSecret, - options?: VerifyOptions & { complete?: false }, - callback?: VerifyCallback, -): void; -export function verify( - token: string, - secretOrPublicKey: Secret | PublicKey | GetPublicKeyOrSecret, - options?: VerifyOptions, - callback?: VerifyCallback, -): void; - -/** - * Returns the decoded payload without verifying if the signature is valid. - * token - JWT string to decode - * [options] - Options for decoding - * returns - The decoded Token - */ -export function decode(token: string, options: DecodeOptions & { complete: true }): null | Jwt; -export function decode(token: string, options: DecodeOptions & { json: true }): null | JwtPayload; -export function decode(token: string, options?: DecodeOptions): null | JwtPayload | string; diff --git a/node_modules/@types/jsonwebtoken/package.json b/node_modules/@types/jsonwebtoken/package.json deleted file mode 100644 index cd5f33d..0000000 --- a/node_modules/@types/jsonwebtoken/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "name": "@types/jsonwebtoken", - "version": "9.0.10", - "description": "TypeScript definitions for jsonwebtoken", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsonwebtoken", - "license": "MIT", - "contributors": [ - { - "name": "Maxime LUCE", - "githubUsername": "SomaticIT", - "url": "https://github.com/SomaticIT" - }, - { - "name": "Daniel Heim", - "githubUsername": "danielheim", - "url": "https://github.com/danielheim" - }, - { - "name": "Brice BERNARD", - "githubUsername": "brikou", - "url": "https://github.com/brikou" - }, - { - "name": "Veli-Pekka Kestilä", - "githubUsername": "vpk", - "url": "https://github.com/vpk" - }, - { - "name": "Daniel Parker", - "githubUsername": "GeneralistDev", - "url": "https://github.com/GeneralistDev" - }, - { - "name": "Kjell Dießel", - "githubUsername": "kettil", - "url": "https://github.com/kettil" - }, - { - "name": "Robert Gajda", - "githubUsername": "RunAge", - "url": "https://github.com/RunAge" - }, - { - "name": "Nico Flaig", - "githubUsername": "nflaig", - "url": "https://github.com/nflaig" - }, - { - "name": "Linus Unnebäck", - "githubUsername": "LinusU", - "url": "https://github.com/LinusU" - }, - { - "name": "Ivan Sieder", - "githubUsername": "ivansieder", - "url": "https://github.com/ivansieder" - }, - { - "name": "Piotr Błażejewicz", - "githubUsername": "peterblazejewicz", - "url": "https://github.com/peterblazejewicz" - }, - { - "name": "Nandor Kraszlan", - "githubUsername": "nandi95", - "url": "https://github.com/nandi95" - } - ], - "main": "", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/jsonwebtoken" - }, - "scripts": {}, - "dependencies": { - "@types/ms": "*", - "@types/node": "*" - }, - "peerDependencies": {}, - "typesPublisherContentHash": "d51483f13412c41d8e77e914b45268c47b0cde11c20fa17f2dee720012292dca", - "typeScriptVersion": "5.1" -} \ No newline at end of file diff --git a/node_modules/@types/mime/LICENSE b/node_modules/@types/mime/LICENSE deleted file mode 100644 index 9e841e7..0000000 --- a/node_modules/@types/mime/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/mime/Mime.d.ts b/node_modules/@types/mime/Mime.d.ts deleted file mode 100644 index a516bd4..0000000 --- a/node_modules/@types/mime/Mime.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { TypeMap } from "./index"; - -export default class Mime { - constructor(mimes: TypeMap); - - lookup(path: string, fallback?: string): string; - extension(mime: string): string | undefined; - load(filepath: string): void; - define(mimes: TypeMap): void; -} diff --git a/node_modules/@types/mime/README.md b/node_modules/@types/mime/README.md deleted file mode 100644 index ab21c24..0000000 --- a/node_modules/@types/mime/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Installation -> `npm install --save @types/mime` - -# Summary -This package contains type definitions for mime (https://github.com/broofa/node-mime). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mime/v1. - -### Additional Details - * Last updated: Tue, 07 Nov 2023 20:08:00 GMT - * Dependencies: none - -# Credits -These definitions were written by [Jeff Goddard](https://github.com/jedigo), and [Daniel Hritzkiv](https://github.com/dhritzkiv). diff --git a/node_modules/@types/mime/index.d.ts b/node_modules/@types/mime/index.d.ts deleted file mode 100644 index 93e8259..0000000 --- a/node_modules/@types/mime/index.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Originally imported from: https://github.com/soywiz/typescript-node-definitions/mime.d.ts - -export as namespace mime; - -export interface TypeMap { - [key: string]: string[]; -} - -/** - * Look up a mime type based on extension. - * - * If not found, uses the fallback argument if provided, and otherwise - * uses `default_type`. - */ -export function lookup(path: string, fallback?: string): string; -/** - * Return a file extensions associated with a mime type. - */ -export function extension(mime: string): string | undefined; -/** - * Load an Apache2-style ".types" file. - */ -export function load(filepath: string): void; -export function define(mimes: TypeMap): void; - -export interface Charsets { - lookup(mime: string, fallback: string): string; -} - -export const charsets: Charsets; -export const default_type: string; diff --git a/node_modules/@types/mime/lite.d.ts b/node_modules/@types/mime/lite.d.ts deleted file mode 100644 index ffebaec..0000000 --- a/node_modules/@types/mime/lite.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { default as Mime } from "./Mime"; - -declare const mimelite: Mime; - -export as namespace mimelite; - -export = mimelite; diff --git a/node_modules/@types/mime/package.json b/node_modules/@types/mime/package.json deleted file mode 100644 index 98a29ff..0000000 --- a/node_modules/@types/mime/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "@types/mime", - "version": "1.3.5", - "description": "TypeScript definitions for mime", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mime", - "license": "MIT", - "contributors": [ - { - "name": "Jeff Goddard", - "githubUsername": "jedigo", - "url": "https://github.com/jedigo" - }, - { - "name": "Daniel Hritzkiv", - "githubUsername": "dhritzkiv", - "url": "https://github.com/dhritzkiv" - } - ], - "main": "", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/mime" - }, - "scripts": {}, - "dependencies": {}, - "typesPublisherContentHash": "2ad7ee9a549e6721825e733c6a1a7e8bee0ca7ba93d9ab922c8f4558def52d77", - "typeScriptVersion": "4.5" -} \ No newline at end of file diff --git a/node_modules/@types/ms/LICENSE b/node_modules/@types/ms/LICENSE deleted file mode 100644 index 9e841e7..0000000 --- a/node_modules/@types/ms/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/ms/README.md b/node_modules/@types/ms/README.md deleted file mode 100644 index 8b7446f..0000000 --- a/node_modules/@types/ms/README.md +++ /dev/null @@ -1,82 +0,0 @@ -# Installation -> `npm install --save @types/ms` - -# Summary -This package contains type definitions for ms (https://github.com/vercel/ms). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ms. -## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ms/index.d.ts) -````ts -/** - * Short/Long format for `value`. - * - * @param {Number} value - * @param {{long: boolean}} options - * @return {String} - */ -declare function ms(value: number, options?: { long: boolean }): string; - -/** - * Parse the given `value` and return milliseconds. - * - * @param {ms.StringValue} value - * @return {Number} - */ -declare function ms(value: ms.StringValue): number; - -declare namespace ms { - // Unit, UnitAnyCase, and StringValue are backported from ms@3 - // https://github.com/vercel/ms/blob/8b5923d1d86c84a9f6aba8022d416dcf2361aa8d/src/index.ts - - type Unit = - | "Years" - | "Year" - | "Yrs" - | "Yr" - | "Y" - | "Weeks" - | "Week" - | "W" - | "Days" - | "Day" - | "D" - | "Hours" - | "Hour" - | "Hrs" - | "Hr" - | "H" - | "Minutes" - | "Minute" - | "Mins" - | "Min" - | "M" - | "Seconds" - | "Second" - | "Secs" - | "Sec" - | "s" - | "Milliseconds" - | "Millisecond" - | "Msecs" - | "Msec" - | "Ms"; - - type UnitAnyCase = Unit | Uppercase | Lowercase; - - type StringValue = - | `${number}` - | `${number}${UnitAnyCase}` - | `${number} ${UnitAnyCase}`; -} - -export = ms; - -```` - -### Additional Details - * Last updated: Thu, 16 Jan 2025 21:02:45 GMT - * Dependencies: none - -# Credits -These definitions were written by [Zhiyuan Wang](https://github.com/danny8002). diff --git a/node_modules/@types/ms/index.d.ts b/node_modules/@types/ms/index.d.ts deleted file mode 100644 index b1b1f51..0000000 --- a/node_modules/@types/ms/index.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Short/Long format for `value`. - * - * @param {Number} value - * @param {{long: boolean}} options - * @return {String} - */ -declare function ms(value: number, options?: { long: boolean }): string; - -/** - * Parse the given `value` and return milliseconds. - * - * @param {ms.StringValue} value - * @return {Number} - */ -declare function ms(value: ms.StringValue): number; - -declare namespace ms { - // Unit, UnitAnyCase, and StringValue are backported from ms@3 - // https://github.com/vercel/ms/blob/8b5923d1d86c84a9f6aba8022d416dcf2361aa8d/src/index.ts - - type Unit = - | "Years" - | "Year" - | "Yrs" - | "Yr" - | "Y" - | "Weeks" - | "Week" - | "W" - | "Days" - | "Day" - | "D" - | "Hours" - | "Hour" - | "Hrs" - | "Hr" - | "H" - | "Minutes" - | "Minute" - | "Mins" - | "Min" - | "M" - | "Seconds" - | "Second" - | "Secs" - | "Sec" - | "s" - | "Milliseconds" - | "Millisecond" - | "Msecs" - | "Msec" - | "Ms"; - - type UnitAnyCase = Unit | Uppercase | Lowercase; - - type StringValue = - | `${number}` - | `${number}${UnitAnyCase}` - | `${number} ${UnitAnyCase}`; -} - -export = ms; diff --git a/node_modules/@types/ms/package.json b/node_modules/@types/ms/package.json deleted file mode 100644 index 0f547d0..0000000 --- a/node_modules/@types/ms/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "@types/ms", - "version": "2.1.0", - "description": "TypeScript definitions for ms", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ms", - "license": "MIT", - "contributors": [ - { - "name": "Zhiyuan Wang", - "githubUsername": "danny8002", - "url": "https://github.com/danny8002" - } - ], - "main": "", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/ms" - }, - "scripts": {}, - "dependencies": {}, - "peerDependencies": {}, - "typesPublisherContentHash": "2c8651ce1714fdc6bcbc0f262c93a790f1d127fb1c2dc8edbb583decef56fd39", - "typeScriptVersion": "5.0" -} \ No newline at end of file diff --git a/node_modules/@types/node/LICENSE b/node_modules/@types/node/LICENSE deleted file mode 100644 index 9e841e7..0000000 --- a/node_modules/@types/node/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/node/README.md b/node_modules/@types/node/README.md deleted file mode 100644 index 79fafa8..0000000 --- a/node_modules/@types/node/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Installation -> `npm install --save @types/node` - -# Summary -This package contains type definitions for node (https://nodejs.org/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v20. - -### Additional Details - * Last updated: Fri, 06 Mar 2026 00:57:44 GMT - * Dependencies: [undici-types](https://npmjs.com/package/undici-types) - -# Credits -These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [David Junger](https://github.com/touffy), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Sebastian Silbermann](https://github.com/eps1lon), [Wilco Bakker](https://github.com/WilcoBakker), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), and [Dmitry Semigradsky](https://github.com/Semigradsky). diff --git a/node_modules/@types/node/assert.d.ts b/node_modules/@types/node/assert.d.ts deleted file mode 100644 index c32c903..0000000 --- a/node_modules/@types/node/assert.d.ts +++ /dev/null @@ -1,1062 +0,0 @@ -/** - * The `node:assert` module provides a set of assertion functions for verifying - * invariants. - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/assert.js) - */ -declare module "assert" { - /** - * An alias of {@link ok}. - * @since v0.5.9 - * @param value The input that is checked for being truthy. - */ - function assert(value: unknown, message?: string | Error): asserts value; - namespace assert { - type AssertMethodNames = - | "deepEqual" - | "deepStrictEqual" - | "doesNotMatch" - | "doesNotReject" - | "doesNotThrow" - | "equal" - | "fail" - | "ifError" - | "match" - | "notDeepEqual" - | "notDeepStrictEqual" - | "notEqual" - | "notStrictEqual" - | "ok" - | "rejects" - | "strictEqual" - | "throws"; - /** - * Indicates the failure of an assertion. All errors thrown by the `node:assert` module will be instances of the `AssertionError` class. - */ - class AssertionError extends Error { - /** - * Set to the `actual` argument for methods such as {@link assert.strictEqual()}. - */ - actual: unknown; - /** - * Set to the `expected` argument for methods such as {@link assert.strictEqual()}. - */ - expected: unknown; - /** - * Set to the passed in operator value. - */ - operator: string; - /** - * Indicates if the message was auto-generated (`true`) or not. - */ - generatedMessage: boolean; - /** - * Value is always `ERR_ASSERTION` to show that the error is an assertion error. - */ - code: "ERR_ASSERTION"; - constructor(options?: { - /** If provided, the error message is set to this value. */ - message?: string | undefined; - /** The `actual` property on the error instance. */ - actual?: unknown | undefined; - /** The `expected` property on the error instance. */ - expected?: unknown | undefined; - /** The `operator` property on the error instance. */ - operator?: string | undefined; - /** If provided, the generated stack trace omits frames before this function. */ - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - stackStartFn?: Function | undefined; - }); - } - /** - * This feature is deprecated and will be removed in a future version. - * Please consider using alternatives such as the `mock` helper function. - * @since v14.2.0, v12.19.0 - * @deprecated Deprecated - */ - class CallTracker { - /** - * The wrapper function is expected to be called exactly `exact` times. If the - * function has not been called exactly `exact` times when `tracker.verify()` is called, then `tracker.verify()` will throw an - * error. - * - * ```js - * import assert from 'node:assert'; - * - * // Creates call tracker. - * const tracker = new assert.CallTracker(); - * - * function func() {} - * - * // Returns a function that wraps func() that must be called exact times - * // before tracker.verify(). - * const callsfunc = tracker.calls(func); - * ``` - * @since v14.2.0, v12.19.0 - * @param [fn='A no-op function'] - * @param [exact=1] - * @return A function that wraps `fn`. - */ - calls(exact?: number): () => void; - calls(fn: undefined, exact?: number): () => void; - calls any>(fn: Func, exact?: number): Func; - calls any>(fn?: Func, exact?: number): Func | (() => void); - /** - * Example: - * - * ```js - * import assert from 'node:assert'; - * - * const tracker = new assert.CallTracker(); - * - * function func() {} - * const callsfunc = tracker.calls(func); - * callsfunc(1, 2, 3); - * - * assert.deepStrictEqual(tracker.getCalls(callsfunc), - * [{ thisArg: undefined, arguments: [1, 2, 3] }]); - * ``` - * @since v18.8.0, v16.18.0 - * @return An array with all the calls to a tracked function. - */ - getCalls(fn: Function): CallTrackerCall[]; - /** - * The arrays contains information about the expected and actual number of calls of - * the functions that have not been called the expected number of times. - * - * ```js - * import assert from 'node:assert'; - * - * // Creates call tracker. - * const tracker = new assert.CallTracker(); - * - * function func() {} - * - * // Returns a function that wraps func() that must be called exact times - * // before tracker.verify(). - * const callsfunc = tracker.calls(func, 2); - * - * // Returns an array containing information on callsfunc() - * console.log(tracker.report()); - * // [ - * // { - * // message: 'Expected the func function to be executed 2 time(s) but was - * // executed 0 time(s).', - * // actual: 0, - * // expected: 2, - * // operator: 'func', - * // stack: stack trace - * // } - * // ] - * ``` - * @since v14.2.0, v12.19.0 - * @return An array of objects containing information about the wrapper functions returned by {@link tracker.calls()}. - */ - report(): CallTrackerReportInformation[]; - /** - * Reset calls of the call tracker. If a tracked function is passed as an argument, the calls will be reset for it. - * If no arguments are passed, all tracked functions will be reset. - * - * ```js - * import assert from 'node:assert'; - * - * const tracker = new assert.CallTracker(); - * - * function func() {} - * const callsfunc = tracker.calls(func); - * - * callsfunc(); - * // Tracker was called once - * assert.strictEqual(tracker.getCalls(callsfunc).length, 1); - * - * tracker.reset(callsfunc); - * assert.strictEqual(tracker.getCalls(callsfunc).length, 0); - * ``` - * @since v18.8.0, v16.18.0 - * @param fn a tracked function to reset. - */ - reset(fn?: Function): void; - /** - * Iterates through the list of functions passed to {@link tracker.calls()} and will throw an error for functions that - * have not been called the expected number of times. - * - * ```js - * import assert from 'node:assert'; - * - * // Creates call tracker. - * const tracker = new assert.CallTracker(); - * - * function func() {} - * - * // Returns a function that wraps func() that must be called exact times - * // before tracker.verify(). - * const callsfunc = tracker.calls(func, 2); - * - * callsfunc(); - * - * // Will throw an error since callsfunc() was only called once. - * tracker.verify(); - * ``` - * @since v14.2.0, v12.19.0 - */ - verify(): void; - } - interface CallTrackerCall { - thisArg: object; - arguments: unknown[]; - } - interface CallTrackerReportInformation { - message: string; - /** The actual number of times the function was called. */ - actual: number; - /** The number of times the function was expected to be called. */ - expected: number; - /** The name of the function that is wrapped. */ - operator: string; - /** A stack trace of the function. */ - stack: object; - } - type AssertPredicate = RegExp | (new() => object) | ((thrown: unknown) => boolean) | object | Error; - /** - * Throws an `AssertionError` with the provided error message or a default - * error message. If the `message` parameter is an instance of an `Error` then - * it will be thrown instead of the `AssertionError`. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.fail(); - * // AssertionError [ERR_ASSERTION]: Failed - * - * assert.fail('boom'); - * // AssertionError [ERR_ASSERTION]: boom - * - * assert.fail(new TypeError('need array')); - * // TypeError: need array - * ``` - * - * Using `assert.fail()` with more than two arguments is possible but deprecated. - * See below for further details. - * @since v0.1.21 - * @param [message='Failed'] - */ - function fail(message?: string | Error): never; - /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */ - function fail( - actual: unknown, - expected: unknown, - message?: string | Error, - operator?: string, - // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type - stackStartFn?: Function, - ): never; - /** - * Tests if `value` is truthy. It is equivalent to `assert.equal(!!value, true, message)`. - * - * If `value` is not truthy, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is `undefined`, a default - * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`. - * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``. - * - * Be aware that in the `repl` the error message will be different to the one - * thrown in a file! See below for further details. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.ok(true); - * // OK - * assert.ok(1); - * // OK - * - * assert.ok(); - * // AssertionError: No value argument passed to `assert.ok()` - * - * assert.ok(false, 'it\'s false'); - * // AssertionError: it's false - * - * // In the repl: - * assert.ok(typeof 123 === 'string'); - * // AssertionError: false == true - * - * // In a file (e.g. test.js): - * assert.ok(typeof 123 === 'string'); - * // AssertionError: The expression evaluated to a falsy value: - * // - * // assert.ok(typeof 123 === 'string') - * - * assert.ok(false); - * // AssertionError: The expression evaluated to a falsy value: - * // - * // assert.ok(false) - * - * assert.ok(0); - * // AssertionError: The expression evaluated to a falsy value: - * // - * // assert.ok(0) - * ``` - * - * ```js - * import assert from 'node:assert/strict'; - * - * // Using `assert()` works the same: - * assert(0); - * // AssertionError: The expression evaluated to a falsy value: - * // - * // assert(0) - * ``` - * @since v0.1.21 - */ - function ok(value: unknown, message?: string | Error): asserts value; - /** - * **Strict assertion mode** - * - * An alias of {@link strictEqual}. - * - * **Legacy assertion mode** - * - * > Stability: 3 - Legacy: Use {@link strictEqual} instead. - * - * Tests shallow, coercive equality between the `actual` and `expected` parameters - * using the [`==` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality). `NaN` is specially handled - * and treated as being identical if both sides are `NaN`. - * - * ```js - * import assert from 'node:assert'; - * - * assert.equal(1, 1); - * // OK, 1 == 1 - * assert.equal(1, '1'); - * // OK, 1 == '1' - * assert.equal(NaN, NaN); - * // OK - * - * assert.equal(1, 2); - * // AssertionError: 1 == 2 - * assert.equal({ a: { b: 1 } }, { a: { b: 1 } }); - * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } } - * ``` - * - * If the values are not equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default - * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`. - * @since v0.1.21 - */ - function equal(actual: unknown, expected: unknown, message?: string | Error): void; - /** - * **Strict assertion mode** - * - * An alias of {@link notStrictEqual}. - * - * **Legacy assertion mode** - * - * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead. - * - * Tests shallow, coercive inequality with the [`!=` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality). `NaN` is - * specially handled and treated as being identical if both sides are `NaN`. - * - * ```js - * import assert from 'node:assert'; - * - * assert.notEqual(1, 2); - * // OK - * - * assert.notEqual(1, 1); - * // AssertionError: 1 != 1 - * - * assert.notEqual(1, '1'); - * // AssertionError: 1 != '1' - * ``` - * - * If the values are equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default error - * message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`. - * @since v0.1.21 - */ - function notEqual(actual: unknown, expected: unknown, message?: string | Error): void; - /** - * **Strict assertion mode** - * - * An alias of {@link deepStrictEqual}. - * - * **Legacy assertion mode** - * - * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead. - * - * Tests for deep equality between the `actual` and `expected` parameters. Consider - * using {@link deepStrictEqual} instead. {@link deepEqual} can have - * surprising results. - * - * _Deep equality_ means that the enumerable "own" properties of child objects - * are also recursively evaluated by the following rules. - * @since v0.1.21 - */ - function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void; - /** - * **Strict assertion mode** - * - * An alias of {@link notDeepStrictEqual}. - * - * **Legacy assertion mode** - * - * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead. - * - * Tests for any deep inequality. Opposite of {@link deepEqual}. - * - * ```js - * import assert from 'node:assert'; - * - * const obj1 = { - * a: { - * b: 1, - * }, - * }; - * const obj2 = { - * a: { - * b: 2, - * }, - * }; - * const obj3 = { - * a: { - * b: 1, - * }, - * }; - * const obj4 = { __proto__: obj1 }; - * - * assert.notDeepEqual(obj1, obj1); - * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } } - * - * assert.notDeepEqual(obj1, obj2); - * // OK - * - * assert.notDeepEqual(obj1, obj3); - * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } } - * - * assert.notDeepEqual(obj1, obj4); - * // OK - * ``` - * - * If the values are deeply equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default - * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown - * instead of the `AssertionError`. - * @since v0.1.21 - */ - function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void; - /** - * Tests strict equality between the `actual` and `expected` parameters as - * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.strictEqual(1, 2); - * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal: - * // - * // 1 !== 2 - * - * assert.strictEqual(1, 1); - * // OK - * - * assert.strictEqual('Hello foobar', 'Hello World!'); - * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal: - * // + actual - expected - * // - * // + 'Hello foobar' - * // - 'Hello World!' - * // ^ - * - * const apples = 1; - * const oranges = 2; - * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`); - * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2 - * - * assert.strictEqual(1, '1', new TypeError('Inputs are not identical')); - * // TypeError: Inputs are not identical - * ``` - * - * If the values are not strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a - * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown - * instead of the `AssertionError`. - * @since v0.1.21 - */ - function strictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T; - /** - * Tests strict inequality between the `actual` and `expected` parameters as - * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is). - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.notStrictEqual(1, 2); - * // OK - * - * assert.notStrictEqual(1, 1); - * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to: - * // - * // 1 - * - * assert.notStrictEqual(1, '1'); - * // OK - * ``` - * - * If the values are strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a - * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown - * instead of the `AssertionError`. - * @since v0.1.21 - */ - function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void; - /** - * Tests for deep equality between the `actual` and `expected` parameters. - * "Deep" equality means that the enumerable "own" properties of child objects - * are recursively evaluated also by the following rules. - * @since v1.2.0 - */ - function deepStrictEqual(actual: unknown, expected: T, message?: string | Error): asserts actual is T; - /** - * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.notDeepStrictEqual({ a: 1 }, { a: '1' }); - * // OK - * ``` - * - * If the values are deeply and strictly equal, an `AssertionError` is thrown - * with a `message` property set equal to the value of the `message` parameter. If - * the `message` parameter is undefined, a default error message is assigned. If - * the `message` parameter is an instance of an `Error` then it will be thrown - * instead of the `AssertionError`. - * @since v1.2.0 - */ - function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void; - /** - * Expects the function `fn` to throw an error. - * - * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), - * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function, - * a validation object where each property will be tested for strict deep equality, - * or an instance of error where each property will be tested for strict deep - * equality including the non-enumerable `message` and `name` properties. When - * using an object, it is also possible to use a regular expression, when - * validating against a string property. See below for examples. - * - * If specified, `message` will be appended to the message provided by the `AssertionError` if the `fn` call fails to throw or in case the error validation - * fails. - * - * Custom validation object/error instance: - * - * ```js - * import assert from 'node:assert/strict'; - * - * const err = new TypeError('Wrong value'); - * err.code = 404; - * err.foo = 'bar'; - * err.info = { - * nested: true, - * baz: 'text', - * }; - * err.reg = /abc/i; - * - * assert.throws( - * () => { - * throw err; - * }, - * { - * name: 'TypeError', - * message: 'Wrong value', - * info: { - * nested: true, - * baz: 'text', - * }, - * // Only properties on the validation object will be tested for. - * // Using nested objects requires all properties to be present. Otherwise - * // the validation is going to fail. - * }, - * ); - * - * // Using regular expressions to validate error properties: - * assert.throws( - * () => { - * throw err; - * }, - * { - * // The `name` and `message` properties are strings and using regular - * // expressions on those will match against the string. If they fail, an - * // error is thrown. - * name: /^TypeError$/, - * message: /Wrong/, - * foo: 'bar', - * info: { - * nested: true, - * // It is not possible to use regular expressions for nested properties! - * baz: 'text', - * }, - * // The `reg` property contains a regular expression and only if the - * // validation object contains an identical regular expression, it is going - * // to pass. - * reg: /abc/i, - * }, - * ); - * - * // Fails due to the different `message` and `name` properties: - * assert.throws( - * () => { - * const otherErr = new Error('Not found'); - * // Copy all enumerable properties from `err` to `otherErr`. - * for (const [key, value] of Object.entries(err)) { - * otherErr[key] = value; - * } - * throw otherErr; - * }, - * // The error's `message` and `name` properties will also be checked when using - * // an error as validation object. - * err, - * ); - * ``` - * - * Validate instanceof using constructor: - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.throws( - * () => { - * throw new Error('Wrong value'); - * }, - * Error, - * ); - * ``` - * - * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions): - * - * Using a regular expression runs `.toString` on the error object, and will - * therefore also include the error name. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.throws( - * () => { - * throw new Error('Wrong value'); - * }, - * /^Error: Wrong value$/, - * ); - * ``` - * - * Custom error validation: - * - * The function must return `true` to indicate all internal validations passed. - * It will otherwise fail with an `AssertionError`. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.throws( - * () => { - * throw new Error('Wrong value'); - * }, - * (err) => { - * assert(err instanceof Error); - * assert(/value/.test(err)); - * // Avoid returning anything from validation functions besides `true`. - * // Otherwise, it's not clear what part of the validation failed. Instead, - * // throw an error about the specific validation that failed (as done in this - * // example) and add as much helpful debugging information to that error as - * // possible. - * return true; - * }, - * 'unexpected error', - * ); - * ``` - * - * `error` cannot be a string. If a string is provided as the second - * argument, then `error` is assumed to be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Using the same - * message as the thrown error message is going to result in an `ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using - * a string as the second argument gets considered: - * - * ```js - * import assert from 'node:assert/strict'; - * - * function throwingFirst() { - * throw new Error('First'); - * } - * - * function throwingSecond() { - * throw new Error('Second'); - * } - * - * function notThrowing() {} - * - * // The second argument is a string and the input function threw an Error. - * // The first case will not throw as it does not match for the error message - * // thrown by the input function! - * assert.throws(throwingFirst, 'Second'); - * // In the next example the message has no benefit over the message from the - * // error and since it is not clear if the user intended to actually match - * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error. - * assert.throws(throwingSecond, 'Second'); - * // TypeError [ERR_AMBIGUOUS_ARGUMENT] - * - * // The string is only used (as message) in case the function does not throw: - * assert.throws(notThrowing, 'Second'); - * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second - * - * // If it was intended to match for the error message do this instead: - * // It does not throw because the error messages match. - * assert.throws(throwingSecond, /Second$/); - * - * // If the error message does not match, an AssertionError is thrown. - * assert.throws(throwingFirst, /Second$/); - * // AssertionError [ERR_ASSERTION] - * ``` - * - * Due to the confusing error-prone notation, avoid a string as the second - * argument. - * @since v0.1.21 - */ - function throws(block: () => unknown, message?: string | Error): void; - function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void; - /** - * Asserts that the function `fn` does not throw an error. - * - * Using `assert.doesNotThrow()` is actually not useful because there - * is no benefit in catching an error and then rethrowing it. Instead, consider - * adding a comment next to the specific code path that should not throw and keep - * error messages as expressive as possible. - * - * When `assert.doesNotThrow()` is called, it will immediately call the `fn` function. - * - * If an error is thrown and it is the same type as that specified by the `error` parameter, then an `AssertionError` is thrown. If the error is of a - * different type, or if the `error` parameter is undefined, the error is - * propagated back to the caller. - * - * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), - * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation - * function. See {@link throws} for more details. - * - * The following, for instance, will throw the `TypeError` because there is no - * matching error type in the assertion: - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.doesNotThrow( - * () => { - * throw new TypeError('Wrong value'); - * }, - * SyntaxError, - * ); - * ``` - * - * However, the following will result in an `AssertionError` with the message - * 'Got unwanted exception...': - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.doesNotThrow( - * () => { - * throw new TypeError('Wrong value'); - * }, - * TypeError, - * ); - * ``` - * - * If an `AssertionError` is thrown and a value is provided for the `message` parameter, the value of `message` will be appended to the `AssertionError` message: - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.doesNotThrow( - * () => { - * throw new TypeError('Wrong value'); - * }, - * /Wrong value/, - * 'Whoops', - * ); - * // Throws: AssertionError: Got unwanted exception: Whoops - * ``` - * @since v0.1.21 - */ - function doesNotThrow(block: () => unknown, message?: string | Error): void; - function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void; - /** - * Throws `value` if `value` is not `undefined` or `null`. This is useful when - * testing the `error` argument in callbacks. The stack trace contains all frames - * from the error passed to `ifError()` including the potential new frames for `ifError()` itself. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.ifError(null); - * // OK - * assert.ifError(0); - * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0 - * assert.ifError('error'); - * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error' - * assert.ifError(new Error()); - * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error - * - * // Create some random error frames. - * let err; - * (function errorFrame() { - * err = new Error('test error'); - * })(); - * - * (function ifErrorFrame() { - * assert.ifError(err); - * })(); - * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error - * // at ifErrorFrame - * // at errorFrame - * ``` - * @since v0.1.97 - */ - function ifError(value: unknown): asserts value is null | undefined; - /** - * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately - * calls the function and awaits the returned promise to complete. It will then - * check that the promise is rejected. - * - * If `asyncFn` is a function and it throws an error synchronously, `assert.rejects()` will return a rejected `Promise` with that error. If the - * function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v20.x/api/errors.html#err_invalid_return_value) - * error. In both cases the error handler is skipped. - * - * Besides the async nature to await the completion behaves identically to {@link throws}. - * - * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), - * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function, - * an object where each property will be tested for, or an instance of error where - * each property will be tested for including the non-enumerable `message` and `name` properties. - * - * If specified, `message` will be the message provided by the `{@link AssertionError}` if the `asyncFn` fails to reject. - * - * ```js - * import assert from 'node:assert/strict'; - * - * await assert.rejects( - * async () => { - * throw new TypeError('Wrong value'); - * }, - * { - * name: 'TypeError', - * message: 'Wrong value', - * }, - * ); - * ``` - * - * ```js - * import assert from 'node:assert/strict'; - * - * await assert.rejects( - * async () => { - * throw new TypeError('Wrong value'); - * }, - * (err) => { - * assert.strictEqual(err.name, 'TypeError'); - * assert.strictEqual(err.message, 'Wrong value'); - * return true; - * }, - * ); - * ``` - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.rejects( - * Promise.reject(new Error('Wrong value')), - * Error, - * ).then(() => { - * // ... - * }); - * ``` - * - * `error` cannot be a string. If a string is provided as the second argument, then `error` is assumed to - * be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Please read the - * example in {@link throws} carefully if using a string as the second argument gets considered. - * @since v10.0.0 - */ - function rejects(block: (() => Promise) | Promise, message?: string | Error): Promise; - function rejects( - block: (() => Promise) | Promise, - error: AssertPredicate, - message?: string | Error, - ): Promise; - /** - * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately - * calls the function and awaits the returned promise to complete. It will then - * check that the promise is not rejected. - * - * If `asyncFn` is a function and it throws an error synchronously, `assert.doesNotReject()` will return a rejected `Promise` with that error. If - * the function does not return a promise, `assert.doesNotReject()` will return a - * rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v20.x/api/errors.html#err_invalid_return_value) error. In both cases - * the error handler is skipped. - * - * Using `assert.doesNotReject()` is actually not useful because there is little - * benefit in catching a rejection and then rejecting it again. Instead, consider - * adding a comment next to the specific code path that should not reject and keep - * error messages as expressive as possible. - * - * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes), - * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation - * function. See {@link throws} for more details. - * - * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}. - * - * ```js - * import assert from 'node:assert/strict'; - * - * await assert.doesNotReject( - * async () => { - * throw new TypeError('Wrong value'); - * }, - * SyntaxError, - * ); - * ``` - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.doesNotReject(Promise.reject(new TypeError('Wrong value'))) - * .then(() => { - * // ... - * }); - * ``` - * @since v10.0.0 - */ - function doesNotReject( - block: (() => Promise) | Promise, - message?: string | Error, - ): Promise; - function doesNotReject( - block: (() => Promise) | Promise, - error: AssertPredicate, - message?: string | Error, - ): Promise; - /** - * Expects the `string` input to match the regular expression. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.match('I will fail', /pass/); - * // AssertionError [ERR_ASSERTION]: The input did not match the regular ... - * - * assert.match(123, /pass/); - * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string. - * - * assert.match('I will pass', /pass/); - * // OK - * ``` - * - * If the values do not match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal - * to the value of the `message` parameter. If the `message` parameter is - * undefined, a default error message is assigned. If the `message` parameter is an - * instance of an [Error](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`. - * @since v13.6.0, v12.16.0 - */ - function match(value: string, regExp: RegExp, message?: string | Error): void; - /** - * Expects the `string` input not to match the regular expression. - * - * ```js - * import assert from 'node:assert/strict'; - * - * assert.doesNotMatch('I will fail', /fail/); - * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ... - * - * assert.doesNotMatch(123, /pass/); - * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string. - * - * assert.doesNotMatch('I will pass', /different/); - * // OK - * ``` - * - * If the values do match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal - * to the value of the `message` parameter. If the `message` parameter is - * undefined, a default error message is assigned. If the `message` parameter is an - * instance of an [Error](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`. - * @since v13.6.0, v12.16.0 - */ - function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void; - /** - * In strict assertion mode, non-strict methods behave like their corresponding strict methods. For example, - * {@link deepEqual} will behave like {@link deepStrictEqual}. - * - * In strict assertion mode, error messages for objects display a diff. In legacy assertion mode, error - * messages for objects display the objects, often truncated. - * - * To use strict assertion mode: - * - * ```js - * import { strict as assert } from 'node:assert';COPY - * import assert from 'node:assert/strict'; - * ``` - * - * Example error diff: - * - * ```js - * import { strict as assert } from 'node:assert'; - * - * assert.deepEqual([[[1, 2, 3]], 4, 5], [[[1, 2, '3']], 4, 5]); - * // AssertionError: Expected inputs to be strictly deep-equal: - * // + actual - expected ... Lines skipped - * // - * // [ - * // [ - * // ... - * // 2, - * // + 3 - * // - '3' - * // ], - * // ... - * // 5 - * // ] - * ``` - * - * To deactivate the colors, use the `NO_COLOR` or `NODE_DISABLE_COLORS` environment variables. This will also - * deactivate the colors in the REPL. For more on color support in terminal environments, read the tty - * `getColorDepth()` documentation. - * - * @since v15.0.0, v13.9.0, v12.16.2, v9.9.0 - */ - namespace strict { - type AssertionError = assert.AssertionError; - type AssertPredicate = assert.AssertPredicate; - type CallTrackerCall = assert.CallTrackerCall; - type CallTrackerReportInformation = assert.CallTrackerReportInformation; - } - const strict: - & Omit< - typeof assert, - | "equal" - | "notEqual" - | "deepEqual" - | "notDeepEqual" - | "ok" - | "strictEqual" - | "deepStrictEqual" - | "ifError" - | "strict" - | "AssertionError" - > - & { - (value: unknown, message?: string | Error): asserts value; - equal: typeof strictEqual; - notEqual: typeof notStrictEqual; - deepEqual: typeof deepStrictEqual; - notDeepEqual: typeof notDeepStrictEqual; - // Mapped types and assertion functions are incompatible? - // TS2775: Assertions require every name in the call target - // to be declared with an explicit type annotation. - ok: typeof ok; - strictEqual: typeof strictEqual; - deepStrictEqual: typeof deepStrictEqual; - ifError: typeof ifError; - strict: typeof strict; - AssertionError: typeof AssertionError; - }; - } - export = assert; -} -declare module "node:assert" { - import assert = require("assert"); - export = assert; -} diff --git a/node_modules/@types/node/assert/strict.d.ts b/node_modules/@types/node/assert/strict.d.ts deleted file mode 100644 index f333913..0000000 --- a/node_modules/@types/node/assert/strict.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -declare module "assert/strict" { - import { strict } from "node:assert"; - export = strict; -} -declare module "node:assert/strict" { - import { strict } from "node:assert"; - export = strict; -} diff --git a/node_modules/@types/node/async_hooks.d.ts b/node_modules/@types/node/async_hooks.d.ts deleted file mode 100644 index fd9d2aa..0000000 --- a/node_modules/@types/node/async_hooks.d.ts +++ /dev/null @@ -1,605 +0,0 @@ -/** - * We strongly discourage the use of the `async_hooks` API. - * Other APIs that can cover most of its use cases include: - * - * * [`AsyncLocalStorage`](https://nodejs.org/docs/latest-v20.x/api/async_context.html#class-asynclocalstorage) tracks async context - * * [`process.getActiveResourcesInfo()`](https://nodejs.org/docs/latest-v20.x/api/process.html#processgetactiveresourcesinfo) tracks active resources - * - * The `node:async_hooks` module provides an API to track asynchronous resources. - * It can be accessed using: - * - * ```js - * import async_hooks from 'node:async_hooks'; - * ``` - * @experimental - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/async_hooks.js) - */ -declare module "async_hooks" { - /** - * ```js - * import { executionAsyncId } from 'node:async_hooks'; - * import fs from 'node:fs'; - * - * console.log(executionAsyncId()); // 1 - bootstrap - * const path = '.'; - * fs.open(path, 'r', (err, fd) => { - * console.log(executionAsyncId()); // 6 - open() - * }); - * ``` - * - * The ID returned from `executionAsyncId()` is related to execution timing, not - * causality (which is covered by `triggerAsyncId()`): - * - * ```js - * const server = net.createServer((conn) => { - * // Returns the ID of the server, not of the new connection, because the - * // callback runs in the execution scope of the server's MakeCallback(). - * async_hooks.executionAsyncId(); - * - * }).listen(port, () => { - * // Returns the ID of a TickObject (process.nextTick()) because all - * // callbacks passed to .listen() are wrapped in a nextTick(). - * async_hooks.executionAsyncId(); - * }); - * ``` - * - * Promise contexts may not get precise `executionAsyncIds` by default. - * See the section on [promise execution tracking](https://nodejs.org/docs/latest-v20.x/api/async_hooks.html#promise-execution-tracking). - * @since v8.1.0 - * @return The `asyncId` of the current execution context. Useful to track when something calls. - */ - function executionAsyncId(): number; - /** - * Resource objects returned by `executionAsyncResource()` are most often internal - * Node.js handle objects with undocumented APIs. Using any functions or properties - * on the object is likely to crash your application and should be avoided. - * - * Using `executionAsyncResource()` in the top-level execution context will - * return an empty object as there is no handle or request object to use, - * but having an object representing the top-level can be helpful. - * - * ```js - * import { open } from 'node:fs'; - * import { executionAsyncId, executionAsyncResource } from 'node:async_hooks'; - * - * console.log(executionAsyncId(), executionAsyncResource()); // 1 {} - * open(new URL(import.meta.url), 'r', (err, fd) => { - * console.log(executionAsyncId(), executionAsyncResource()); // 7 FSReqWrap - * }); - * ``` - * - * This can be used to implement continuation local storage without the - * use of a tracking `Map` to store the metadata: - * - * ```js - * import { createServer } from 'node:http'; - * import { - * executionAsyncId, - * executionAsyncResource, - * createHook, - * } from 'async_hooks'; - * const sym = Symbol('state'); // Private symbol to avoid pollution - * - * createHook({ - * init(asyncId, type, triggerAsyncId, resource) { - * const cr = executionAsyncResource(); - * if (cr) { - * resource[sym] = cr[sym]; - * } - * }, - * }).enable(); - * - * const server = createServer((req, res) => { - * executionAsyncResource()[sym] = { state: req.url }; - * setTimeout(function() { - * res.end(JSON.stringify(executionAsyncResource()[sym])); - * }, 100); - * }).listen(3000); - * ``` - * @since v13.9.0, v12.17.0 - * @return The resource representing the current execution. Useful to store data within the resource. - */ - function executionAsyncResource(): object; - /** - * ```js - * const server = net.createServer((conn) => { - * // The resource that caused (or triggered) this callback to be called - * // was that of the new connection. Thus the return value of triggerAsyncId() - * // is the asyncId of "conn". - * async_hooks.triggerAsyncId(); - * - * }).listen(port, () => { - * // Even though all callbacks passed to .listen() are wrapped in a nextTick() - * // the callback itself exists because the call to the server's .listen() - * // was made. So the return value would be the ID of the server. - * async_hooks.triggerAsyncId(); - * }); - * ``` - * - * Promise contexts may not get valid `triggerAsyncId`s by default. See - * the section on [promise execution tracking](https://nodejs.org/docs/latest-v20.x/api/async_hooks.html#promise-execution-tracking). - * @return The ID of the resource responsible for calling the callback that is currently being executed. - */ - function triggerAsyncId(): number; - interface HookCallbacks { - /** - * Called when a class is constructed that has the possibility to emit an asynchronous event. - * @param asyncId A unique ID for the async resource - * @param type The type of the async resource - * @param triggerAsyncId The unique ID of the async resource in whose execution context this async resource was created - * @param resource Reference to the resource representing the async operation, needs to be released during destroy - */ - init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void; - /** - * When an asynchronous operation is initiated or completes a callback is called to notify the user. - * The before callback is called just before said callback is executed. - * @param asyncId the unique identifier assigned to the resource about to execute the callback. - */ - before?(asyncId: number): void; - /** - * Called immediately after the callback specified in `before` is completed. - * - * If an uncaught exception occurs during execution of the callback, then `after` will run after the `'uncaughtException'` event is emitted or a `domain`'s handler runs. - * @param asyncId the unique identifier assigned to the resource which has executed the callback. - */ - after?(asyncId: number): void; - /** - * Called when a promise has resolve() called. This may not be in the same execution id - * as the promise itself. - * @param asyncId the unique id for the promise that was resolve()d. - */ - promiseResolve?(asyncId: number): void; - /** - * Called after the resource corresponding to asyncId is destroyed - * @param asyncId a unique ID for the async resource - */ - destroy?(asyncId: number): void; - } - interface AsyncHook { - /** - * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop. - */ - enable(): this; - /** - * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled. - */ - disable(): this; - } - /** - * Registers functions to be called for different lifetime events of each async - * operation. - * - * The callbacks `init()`/`before()`/`after()`/`destroy()` are called for the - * respective asynchronous event during a resource's lifetime. - * - * All callbacks are optional. For example, if only resource cleanup needs to - * be tracked, then only the `destroy` callback needs to be passed. The - * specifics of all functions that can be passed to `callbacks` is in the `Hook Callbacks` section. - * - * ```js - * import { createHook } from 'node:async_hooks'; - * - * const asyncHook = createHook({ - * init(asyncId, type, triggerAsyncId, resource) { }, - * destroy(asyncId) { }, - * }); - * ``` - * - * The callbacks will be inherited via the prototype chain: - * - * ```js - * class MyAsyncCallbacks { - * init(asyncId, type, triggerAsyncId, resource) { } - * destroy(asyncId) {} - * } - * - * class MyAddedCallbacks extends MyAsyncCallbacks { - * before(asyncId) { } - * after(asyncId) { } - * } - * - * const asyncHook = async_hooks.createHook(new MyAddedCallbacks()); - * ``` - * - * Because promises are asynchronous resources whose lifecycle is tracked - * via the async hooks mechanism, the `init()`, `before()`, `after()`, and`destroy()` callbacks _must not_ be async functions that return promises. - * @since v8.1.0 - * @param callbacks The `Hook Callbacks` to register - * @return Instance used for disabling and enabling hooks - */ - function createHook(callbacks: HookCallbacks): AsyncHook; - interface AsyncResourceOptions { - /** - * The ID of the execution context that created this async event. - * @default executionAsyncId() - */ - triggerAsyncId?: number | undefined; - /** - * Disables automatic `emitDestroy` when the object is garbage collected. - * This usually does not need to be set (even if `emitDestroy` is called - * manually), unless the resource's `asyncId` is retrieved and the - * sensitive API's `emitDestroy` is called with it. - * @default false - */ - requireManualDestroy?: boolean | undefined; - } - /** - * The class `AsyncResource` is designed to be extended by the embedder's async - * resources. Using this, users can easily trigger the lifetime events of their - * own resources. - * - * The `init` hook will trigger when an `AsyncResource` is instantiated. - * - * The following is an overview of the `AsyncResource` API. - * - * ```js - * import { AsyncResource, executionAsyncId } from 'node:async_hooks'; - * - * // AsyncResource() is meant to be extended. Instantiating a - * // new AsyncResource() also triggers init. If triggerAsyncId is omitted then - * // async_hook.executionAsyncId() is used. - * const asyncResource = new AsyncResource( - * type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false }, - * ); - * - * // Run a function in the execution context of the resource. This will - * // * establish the context of the resource - * // * trigger the AsyncHooks before callbacks - * // * call the provided function `fn` with the supplied arguments - * // * trigger the AsyncHooks after callbacks - * // * restore the original execution context - * asyncResource.runInAsyncScope(fn, thisArg, ...args); - * - * // Call AsyncHooks destroy callbacks. - * asyncResource.emitDestroy(); - * - * // Return the unique ID assigned to the AsyncResource instance. - * asyncResource.asyncId(); - * - * // Return the trigger ID for the AsyncResource instance. - * asyncResource.triggerAsyncId(); - * ``` - */ - class AsyncResource { - /** - * AsyncResource() is meant to be extended. Instantiating a - * new AsyncResource() also triggers init. If triggerAsyncId is omitted then - * async_hook.executionAsyncId() is used. - * @param type The type of async event. - * @param triggerAsyncId The ID of the execution context that created - * this async event (default: `executionAsyncId()`), or an - * AsyncResourceOptions object (since v9.3.0) - */ - constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions); - /** - * Binds the given function to the current execution context. - * @since v14.8.0, v12.19.0 - * @param fn The function to bind to the current execution context. - * @param type An optional name to associate with the underlying `AsyncResource`. - */ - static bind any, ThisArg>( - fn: Func, - type?: string, - thisArg?: ThisArg, - ): Func; - /** - * Binds the given function to execute to this `AsyncResource`'s scope. - * @since v14.8.0, v12.19.0 - * @param fn The function to bind to the current `AsyncResource`. - */ - bind any>(fn: Func): Func; - /** - * Call the provided function with the provided arguments in the execution context - * of the async resource. This will establish the context, trigger the AsyncHooks - * before callbacks, call the function, trigger the AsyncHooks after callbacks, and - * then restore the original execution context. - * @since v9.6.0 - * @param fn The function to call in the execution context of this async resource. - * @param thisArg The receiver to be used for the function call. - * @param args Optional arguments to pass to the function. - */ - runInAsyncScope( - fn: (this: This, ...args: any[]) => Result, - thisArg?: This, - ...args: any[] - ): Result; - /** - * Call all `destroy` hooks. This should only ever be called once. An error will - * be thrown if it is called more than once. This **must** be manually called. If - * the resource is left to be collected by the GC then the `destroy` hooks will - * never be called. - * @return A reference to `asyncResource`. - */ - emitDestroy(): this; - /** - * @return The unique `asyncId` assigned to the resource. - */ - asyncId(): number; - /** - * @return The same `triggerAsyncId` that is passed to the `AsyncResource` constructor. - */ - triggerAsyncId(): number; - } - /** - * This class creates stores that stay coherent through asynchronous operations. - * - * While you can create your own implementation on top of the `node:async_hooks` module, `AsyncLocalStorage` should be preferred as it is a performant and memory - * safe implementation that involves significant optimizations that are non-obvious - * to implement. - * - * The following example uses `AsyncLocalStorage` to build a simple logger - * that assigns IDs to incoming HTTP requests and includes them in messages - * logged within each request. - * - * ```js - * import http from 'node:http'; - * import { AsyncLocalStorage } from 'node:async_hooks'; - * - * const asyncLocalStorage = new AsyncLocalStorage(); - * - * function logWithId(msg) { - * const id = asyncLocalStorage.getStore(); - * console.log(`${id !== undefined ? id : '-'}:`, msg); - * } - * - * let idSeq = 0; - * http.createServer((req, res) => { - * asyncLocalStorage.run(idSeq++, () => { - * logWithId('start'); - * // Imagine any chain of async operations here - * setImmediate(() => { - * logWithId('finish'); - * res.end(); - * }); - * }); - * }).listen(8080); - * - * http.get('http://localhost:8080'); - * http.get('http://localhost:8080'); - * // Prints: - * // 0: start - * // 1: start - * // 0: finish - * // 1: finish - * ``` - * - * Each instance of `AsyncLocalStorage` maintains an independent storage context. - * Multiple instances can safely exist simultaneously without risk of interfering - * with each other's data. - * @since v13.10.0, v12.17.0 - */ - class AsyncLocalStorage { - /** - * Binds the given function to the current execution context. - * @since v19.8.0 - * @experimental - * @param fn The function to bind to the current execution context. - * @return A new function that calls `fn` within the captured execution context. - */ - static bind any>(fn: Func): Func; - /** - * Captures the current execution context and returns a function that accepts a - * function as an argument. Whenever the returned function is called, it - * calls the function passed to it within the captured context. - * - * ```js - * const asyncLocalStorage = new AsyncLocalStorage(); - * const runInAsyncScope = asyncLocalStorage.run(123, () => AsyncLocalStorage.snapshot()); - * const result = asyncLocalStorage.run(321, () => runInAsyncScope(() => asyncLocalStorage.getStore())); - * console.log(result); // returns 123 - * ``` - * - * AsyncLocalStorage.snapshot() can replace the use of AsyncResource for simple - * async context tracking purposes, for example: - * - * ```js - * class Foo { - * #runInAsyncScope = AsyncLocalStorage.snapshot(); - * - * get() { return this.#runInAsyncScope(() => asyncLocalStorage.getStore()); } - * } - * - * const foo = asyncLocalStorage.run(123, () => new Foo()); - * console.log(asyncLocalStorage.run(321, () => foo.get())); // returns 123 - * ``` - * @since v19.8.0 - * @experimental - * @return A new function with the signature `(fn: (...args) : R, ...args) : R`. - */ - static snapshot(): (fn: (...args: TArgs) => R, ...args: TArgs) => R; - /** - * Disables the instance of `AsyncLocalStorage`. All subsequent calls - * to `asyncLocalStorage.getStore()` will return `undefined` until `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()` is called again. - * - * When calling `asyncLocalStorage.disable()`, all current contexts linked to the - * instance will be exited. - * - * Calling `asyncLocalStorage.disable()` is required before the `asyncLocalStorage` can be garbage collected. This does not apply to stores - * provided by the `asyncLocalStorage`, as those objects are garbage collected - * along with the corresponding async resources. - * - * Use this method when the `asyncLocalStorage` is not in use anymore - * in the current process. - * @since v13.10.0, v12.17.0 - * @experimental - */ - disable(): void; - /** - * Returns the current store. - * If called outside of an asynchronous context initialized by - * calling `asyncLocalStorage.run()` or `asyncLocalStorage.enterWith()`, it - * returns `undefined`. - * @since v13.10.0, v12.17.0 - */ - getStore(): T | undefined; - /** - * Runs a function synchronously within a context and returns its - * return value. The store is not accessible outside of the callback function. - * The store is accessible to any asynchronous operations created within the - * callback. - * - * The optional `args` are passed to the callback function. - * - * If the callback function throws an error, the error is thrown by `run()` too. - * The stacktrace is not impacted by this call and the context is exited. - * - * Example: - * - * ```js - * const store = { id: 2 }; - * try { - * asyncLocalStorage.run(store, () => { - * asyncLocalStorage.getStore(); // Returns the store object - * setTimeout(() => { - * asyncLocalStorage.getStore(); // Returns the store object - * }, 200); - * throw new Error(); - * }); - * } catch (e) { - * asyncLocalStorage.getStore(); // Returns undefined - * // The error will be caught here - * } - * ``` - * @since v13.10.0, v12.17.0 - */ - run(store: T, callback: () => R): R; - run(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R; - /** - * Runs a function synchronously outside of a context and returns its - * return value. The store is not accessible within the callback function or - * the asynchronous operations created within the callback. Any `getStore()` call done within the callback function will always return `undefined`. - * - * The optional `args` are passed to the callback function. - * - * If the callback function throws an error, the error is thrown by `exit()` too. - * The stacktrace is not impacted by this call and the context is re-entered. - * - * Example: - * - * ```js - * // Within a call to run - * try { - * asyncLocalStorage.getStore(); // Returns the store object or value - * asyncLocalStorage.exit(() => { - * asyncLocalStorage.getStore(); // Returns undefined - * throw new Error(); - * }); - * } catch (e) { - * asyncLocalStorage.getStore(); // Returns the same object or value - * // The error will be caught here - * } - * ``` - * @since v13.10.0, v12.17.0 - * @experimental - */ - exit(callback: (...args: TArgs) => R, ...args: TArgs): R; - /** - * Transitions into the context for the remainder of the current - * synchronous execution and then persists the store through any following - * asynchronous calls. - * - * Example: - * - * ```js - * const store = { id: 1 }; - * // Replaces previous store with the given store object - * asyncLocalStorage.enterWith(store); - * asyncLocalStorage.getStore(); // Returns the store object - * someAsyncOperation(() => { - * asyncLocalStorage.getStore(); // Returns the same object - * }); - * ``` - * - * This transition will continue for the _entire_ synchronous execution. - * This means that if, for example, the context is entered within an event - * handler subsequent event handlers will also run within that context unless - * specifically bound to another context with an `AsyncResource`. That is why `run()` should be preferred over `enterWith()` unless there are strong reasons - * to use the latter method. - * - * ```js - * const store = { id: 1 }; - * - * emitter.on('my-event', () => { - * asyncLocalStorage.enterWith(store); - * }); - * emitter.on('my-event', () => { - * asyncLocalStorage.getStore(); // Returns the same object - * }); - * - * asyncLocalStorage.getStore(); // Returns undefined - * emitter.emit('my-event'); - * asyncLocalStorage.getStore(); // Returns the same object - * ``` - * @since v13.11.0, v12.17.0 - * @experimental - */ - enterWith(store: T): void; - } - /** - * @since v17.2.0, v16.14.0 - * @return A map of provider types to the corresponding numeric id. - * This map contains all the event types that might be emitted by the `async_hooks.init()` event. - */ - namespace asyncWrapProviders { - const NONE: number; - const DIRHANDLE: number; - const DNSCHANNEL: number; - const ELDHISTOGRAM: number; - const FILEHANDLE: number; - const FILEHANDLECLOSEREQ: number; - const FIXEDSIZEBLOBCOPY: number; - const FSEVENTWRAP: number; - const FSREQCALLBACK: number; - const FSREQPROMISE: number; - const GETADDRINFOREQWRAP: number; - const GETNAMEINFOREQWRAP: number; - const HEAPSNAPSHOT: number; - const HTTP2SESSION: number; - const HTTP2STREAM: number; - const HTTP2PING: number; - const HTTP2SETTINGS: number; - const HTTPINCOMINGMESSAGE: number; - const HTTPCLIENTREQUEST: number; - const JSSTREAM: number; - const JSUDPWRAP: number; - const MESSAGEPORT: number; - const PIPECONNECTWRAP: number; - const PIPESERVERWRAP: number; - const PIPEWRAP: number; - const PROCESSWRAP: number; - const PROMISE: number; - const QUERYWRAP: number; - const SHUTDOWNWRAP: number; - const SIGNALWRAP: number; - const STATWATCHER: number; - const STREAMPIPE: number; - const TCPCONNECTWRAP: number; - const TCPSERVERWRAP: number; - const TCPWRAP: number; - const TTYWRAP: number; - const UDPSENDWRAP: number; - const UDPWRAP: number; - const SIGINTWATCHDOG: number; - const WORKER: number; - const WORKERHEAPSNAPSHOT: number; - const WRITEWRAP: number; - const ZLIB: number; - const CHECKPRIMEREQUEST: number; - const PBKDF2REQUEST: number; - const KEYPAIRGENREQUEST: number; - const KEYGENREQUEST: number; - const KEYEXPORTREQUEST: number; - const CIPHERREQUEST: number; - const DERIVEBITSREQUEST: number; - const HASHREQUEST: number; - const RANDOMBYTESREQUEST: number; - const RANDOMPRIMEREQUEST: number; - const SCRYPTREQUEST: number; - const SIGNREQUEST: number; - const TLSWRAP: number; - const VERIFYREQUEST: number; - } -} -declare module "node:async_hooks" { - export * from "async_hooks"; -} diff --git a/node_modules/@types/node/buffer.buffer.d.ts b/node_modules/@types/node/buffer.buffer.d.ts deleted file mode 100644 index 023bb0f..0000000 --- a/node_modules/@types/node/buffer.buffer.d.ts +++ /dev/null @@ -1,471 +0,0 @@ -declare module "buffer" { - type ImplicitArrayBuffer> = T extends - { valueOf(): infer V extends ArrayBufferLike } ? V : T; - global { - interface BufferConstructor { - // see buffer.d.ts for implementation shared with all TypeScript versions - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. - */ - new(str: string, encoding?: BufferEncoding): Buffer; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). - */ - new(size: number): Buffer; - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. - */ - new(array: ArrayLike): Buffer; - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}/{SharedArrayBuffer}. - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. - */ - new(arrayBuffer: TArrayBuffer): Buffer; - /** - * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`. - * Array entries outside that range will be truncated to fit into it. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'. - * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]); - * ``` - * - * If `array` is an `Array`-like object (that is, one with a `length` property of - * type `number`), it is treated as if it is an array, unless it is a `Buffer` or - * a `Uint8Array`. This means all other `TypedArray` variants get treated as an - * `Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use - * `Buffer.copyBytesFrom()`. - * - * A `TypeError` will be thrown if `array` is not an `Array` or another type - * appropriate for `Buffer.from()` variants. - * - * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal - * `Buffer` pool like `Buffer.allocUnsafe()` does. - * @since v5.10.0 - */ - from(array: WithImplicitCoercion>): Buffer; - /** - * This creates a view of the `ArrayBuffer` without copying the underlying - * memory. For example, when passed a reference to the `.buffer` property of a - * `TypedArray` instance, the newly created `Buffer` will share the same - * allocated memory as the `TypedArray`'s underlying `ArrayBuffer`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const arr = new Uint16Array(2); - * - * arr[0] = 5000; - * arr[1] = 4000; - * - * // Shares memory with `arr`. - * const buf = Buffer.from(arr.buffer); - * - * console.log(buf); - * // Prints: - * - * // Changing the original Uint16Array changes the Buffer also. - * arr[1] = 6000; - * - * console.log(buf); - * // Prints: - * ``` - * - * The optional `byteOffset` and `length` arguments specify a memory range within - * the `arrayBuffer` that will be shared by the `Buffer`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const ab = new ArrayBuffer(10); - * const buf = Buffer.from(ab, 0, 2); - * - * console.log(buf.length); - * // Prints: 2 - * ``` - * - * A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer` or a - * `SharedArrayBuffer` or another type appropriate for `Buffer.from()` - * variants. - * - * It is important to remember that a backing `ArrayBuffer` can cover a range - * of memory that extends beyond the bounds of a `TypedArray` view. A new - * `Buffer` created using the `buffer` property of a `TypedArray` may extend - * beyond the range of the `TypedArray`: - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const arrA = Uint8Array.from([0x63, 0x64, 0x65, 0x66]); // 4 elements - * const arrB = new Uint8Array(arrA.buffer, 1, 2); // 2 elements - * console.log(arrA.buffer === arrB.buffer); // true - * - * const buf = Buffer.from(arrB.buffer); - * console.log(buf); - * // Prints: - * ``` - * @since v5.10.0 - * @param arrayBuffer An `ArrayBuffer`, `SharedArrayBuffer`, for example the - * `.buffer` property of a `TypedArray`. - * @param byteOffset Index of first byte to expose. **Default:** `0`. - * @param length Number of bytes to expose. **Default:** - * `arrayBuffer.byteLength - byteOffset`. - */ - from>( - arrayBuffer: TArrayBuffer, - byteOffset?: number, - length?: number, - ): Buffer>; - /** - * Creates a new `Buffer` containing `string`. The `encoding` parameter identifies - * the character encoding to be used when converting `string` into bytes. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from('this is a tést'); - * const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); - * - * console.log(buf1.toString()); - * // Prints: this is a tést - * console.log(buf2.toString()); - * // Prints: this is a tést - * console.log(buf1.toString('latin1')); - * // Prints: this is a tést - * ``` - * - * A `TypeError` will be thrown if `string` is not a string or another type - * appropriate for `Buffer.from()` variants. - * - * `Buffer.from(string)` may also use the internal `Buffer` pool like - * `Buffer.allocUnsafe()` does. - * @since v5.10.0 - * @param string A string to encode. - * @param encoding The encoding of `string`. **Default:** `'utf8'`. - */ - from(string: WithImplicitCoercion, encoding?: BufferEncoding): Buffer; - from(arrayOrString: WithImplicitCoercion | string>): Buffer; - /** - * Creates a new Buffer using the passed {data} - * @param values to create a new Buffer - */ - of(...items: number[]): Buffer; - /** - * Returns a new `Buffer` which is the result of concatenating all the `Buffer` instances in the `list` together. - * - * If the list has no items, or if the `totalLength` is 0, then a new zero-length `Buffer` is returned. - * - * If `totalLength` is not provided, it is calculated from the `Buffer` instances - * in `list` by adding their lengths. - * - * If `totalLength` is provided, it is coerced to an unsigned integer. If the - * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is - * truncated to `totalLength`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Create a single `Buffer` from a list of three `Buffer` instances. - * - * const buf1 = Buffer.alloc(10); - * const buf2 = Buffer.alloc(14); - * const buf3 = Buffer.alloc(18); - * const totalLength = buf1.length + buf2.length + buf3.length; - * - * console.log(totalLength); - * // Prints: 42 - * - * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength); - * - * console.log(bufA); - * // Prints: - * console.log(bufA.length); - * // Prints: 42 - * ``` - * - * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does. - * @since v0.7.11 - * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate. - * @param totalLength Total length of the `Buffer` instances in `list` when concatenated. - */ - concat(list: readonly Uint8Array[], totalLength?: number): Buffer; - /** - * Copies the underlying memory of `view` into a new `Buffer`. - * - * ```js - * const u16 = new Uint16Array([0, 0xffff]); - * const buf = Buffer.copyBytesFrom(u16, 1, 1); - * u16[1] = 0; - * console.log(buf.length); // 2 - * console.log(buf[0]); // 255 - * console.log(buf[1]); // 255 - * ``` - * @since v19.8.0 - * @param view The {TypedArray} to copy. - * @param [offset=0] The starting offset within `view`. - * @param [length=view.length - offset] The number of elements from `view` to copy. - */ - copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer; - /** - * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(5); - * - * console.log(buf); - * // Prints: - * ``` - * - * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. - * - * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(5, 'a'); - * - * console.log(buf); - * // Prints: - * ``` - * - * If both `fill` and `encoding` are specified, the allocated `Buffer` will be - * initialized by calling `buf.fill(fill, encoding)`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); - * - * console.log(buf); - * // Prints: - * ``` - * - * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance - * contents will never contain sensitive data from previous allocations, including - * data that might not have been allocated for `Buffer`s. - * - * A `TypeError` will be thrown if `size` is not a number. - * @since v5.10.0 - * @param size The desired length of the new `Buffer`. - * @param [fill=0] A value to pre-fill the new `Buffer` with. - * @param [encoding='utf8'] If `fill` is a string, this is its encoding. - */ - alloc(size: number, fill?: string | Uint8Array | number, encoding?: BufferEncoding): Buffer; - /** - * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. - * - * The underlying memory for `Buffer` instances created in this way is _not_ - * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(10); - * - * console.log(buf); - * // Prints (contents may vary): - * - * buf.fill(0); - * - * console.log(buf); - * // Prints: - * ``` - * - * A `TypeError` will be thrown if `size` is not a number. - * - * The `Buffer` module pre-allocates an internal `Buffer` instance of - * size `Buffer.poolSize` that is used as a pool for the fast allocation of new `Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`, - * and `Buffer.concat()` only when `size` is less than `Buffer.poolSize >>> 1` (floor of `Buffer.poolSize` divided by two). - * - * Use of this pre-allocated internal memory pool is a key difference between - * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. - * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less - * than or equal to half `Buffer.poolSize`. The - * difference is subtle but can be important when an application requires the - * additional performance that `Buffer.allocUnsafe()` provides. - * @since v5.10.0 - * @param size The desired length of the new `Buffer`. - */ - allocUnsafe(size: number): Buffer; - /** - * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. A zero-length `Buffer` is created if - * `size` is 0. - * - * The underlying memory for `Buffer` instances created in this way is _not_ - * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize - * such `Buffer` instances with zeroes. - * - * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, - * allocations under 4 KiB are sliced from a single pre-allocated `Buffer`. This - * allows applications to avoid the garbage collection overhead of creating many - * individually allocated `Buffer` instances. This approach improves both - * performance and memory usage by eliminating the need to track and clean up as - * many individual `ArrayBuffer` objects. - * - * However, in the case where a developer may need to retain a small chunk of - * memory from a pool for an indeterminate amount of time, it may be appropriate - * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and - * then copying out the relevant bits. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Need to keep around a few small chunks of memory. - * const store = []; - * - * socket.on('readable', () => { - * let data; - * while (null !== (data = readable.read())) { - * // Allocate for retained data. - * const sb = Buffer.allocUnsafeSlow(10); - * - * // Copy the data into the new allocation. - * data.copy(sb, 0, 0, 10); - * - * store.push(sb); - * } - * }); - * ``` - * - * A `TypeError` will be thrown if `size` is not a number. - * @since v5.12.0 - * @param size The desired length of the new `Buffer`. - */ - allocUnsafeSlow(size: number): Buffer; - } - interface Buffer extends Uint8Array { - // see buffer.d.ts for implementation shared with all TypeScript versions - - /** - * Returns a new `Buffer` that references the same memory as the original, but - * offset and cropped by the `start` and `end` indices. - * - * This method is not compatible with the `Uint8Array.prototype.slice()`, - * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('buffer'); - * - * const copiedBuf = Uint8Array.prototype.slice.call(buf); - * copiedBuf[0]++; - * console.log(copiedBuf.toString()); - * // Prints: cuffer - * - * console.log(buf.toString()); - * // Prints: buffer - * - * // With buf.slice(), the original buffer is modified. - * const notReallyCopiedBuf = buf.slice(); - * notReallyCopiedBuf[0]++; - * console.log(notReallyCopiedBuf.toString()); - * // Prints: cuffer - * console.log(buf.toString()); - * // Also prints: cuffer (!) - * ``` - * @since v0.3.0 - * @deprecated Use `subarray` instead. - * @param [start=0] Where the new `Buffer` will start. - * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). - */ - slice(start?: number, end?: number): Buffer; - /** - * Returns a new `Buffer` that references the same memory as the original, but - * offset and cropped by the `start` and `end` indices. - * - * Specifying `end` greater than `buf.length` will return the same result as - * that of `end` equal to `buf.length`. - * - * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray). - * - * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte - * // from the original `Buffer`. - * - * const buf1 = Buffer.allocUnsafe(26); - * - * for (let i = 0; i < 26; i++) { - * // 97 is the decimal ASCII value for 'a'. - * buf1[i] = i + 97; - * } - * - * const buf2 = buf1.subarray(0, 3); - * - * console.log(buf2.toString('ascii', 0, buf2.length)); - * // Prints: abc - * - * buf1[0] = 33; - * - * console.log(buf2.toString('ascii', 0, buf2.length)); - * // Prints: !bc - * ``` - * - * Specifying negative indexes causes the slice to be generated relative to the - * end of `buf` rather than the beginning. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('buffer'); - * - * console.log(buf.subarray(-6, -1).toString()); - * // Prints: buffe - * // (Equivalent to buf.subarray(0, 5).) - * - * console.log(buf.subarray(-6, -2).toString()); - * // Prints: buff - * // (Equivalent to buf.subarray(0, 4).) - * - * console.log(buf.subarray(-5, -2).toString()); - * // Prints: uff - * // (Equivalent to buf.subarray(1, 4).) - * ``` - * @since v3.0.0 - * @param [start=0] Where the new `Buffer` will start. - * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). - */ - subarray(start?: number, end?: number): Buffer; - } - // TODO: remove globals in future version - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedBuffer = Buffer; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type AllowSharedBuffer = Buffer; - } - /** @deprecated Use `Buffer.allocUnsafeSlow()` instead. */ - var SlowBuffer: { - /** @deprecated Use `Buffer.allocUnsafeSlow()` instead. */ - new(size: number): Buffer; - prototype: Buffer; - }; -} diff --git a/node_modules/@types/node/buffer.d.ts b/node_modules/@types/node/buffer.d.ts deleted file mode 100644 index 7c2e873..0000000 --- a/node_modules/@types/node/buffer.d.ts +++ /dev/null @@ -1,1936 +0,0 @@ -// If lib.dom.d.ts or lib.webworker.d.ts is loaded, then use the global types. -// Otherwise, use the types from node. -type _Blob = typeof globalThis extends { onmessage: any; Blob: any } ? {} : import("buffer").Blob; -type _File = typeof globalThis extends { onmessage: any; File: any } ? {} : import("buffer").File; - -/** - * `Buffer` objects are used to represent a fixed-length sequence of bytes. Many - * Node.js APIs support `Buffer`s. - * - * The `Buffer` class is a subclass of JavaScript's [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) class and - * extends it with methods that cover additional use cases. Node.js APIs accept - * plain [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) s wherever `Buffer`s are supported as well. - * - * While the `Buffer` class is available within the global scope, it is still - * recommended to explicitly reference it via an import or require statement. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Creates a zero-filled Buffer of length 10. - * const buf1 = Buffer.alloc(10); - * - * // Creates a Buffer of length 10, - * // filled with bytes which all have the value `1`. - * const buf2 = Buffer.alloc(10, 1); - * - * // Creates an uninitialized buffer of length 10. - * // This is faster than calling Buffer.alloc() but the returned - * // Buffer instance might contain old data that needs to be - * // overwritten using fill(), write(), or other functions that fill the Buffer's - * // contents. - * const buf3 = Buffer.allocUnsafe(10); - * - * // Creates a Buffer containing the bytes [1, 2, 3]. - * const buf4 = Buffer.from([1, 2, 3]); - * - * // Creates a Buffer containing the bytes [1, 1, 1, 1] – the entries - * // are all truncated using `(value & 255)` to fit into the range 0–255. - * const buf5 = Buffer.from([257, 257.5, -255, '1']); - * - * // Creates a Buffer containing the UTF-8-encoded bytes for the string 'tést': - * // [0x74, 0xc3, 0xa9, 0x73, 0x74] (in hexadecimal notation) - * // [116, 195, 169, 115, 116] (in decimal notation) - * const buf6 = Buffer.from('tést'); - * - * // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74]. - * const buf7 = Buffer.from('tést', 'latin1'); - * ``` - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/buffer.js) - */ -declare module "buffer" { - import { BinaryLike } from "node:crypto"; - import { ReadableStream as WebReadableStream } from "node:stream/web"; - /** - * This function returns `true` if `input` contains only valid UTF-8-encoded data, - * including the case in which `input` is empty. - * - * Throws if the `input` is a detached array buffer. - * @since v19.4.0, v18.14.0 - * @param input The input to validate. - */ - export function isUtf8(input: ArrayBuffer | NodeJS.TypedArray): boolean; - /** - * This function returns `true` if `input` contains only valid ASCII-encoded data, - * including the case in which `input` is empty. - * - * Throws if the `input` is a detached array buffer. - * @since v19.6.0, v18.15.0 - * @param input The input to validate. - */ - export function isAscii(input: ArrayBuffer | NodeJS.TypedArray): boolean; - export let INSPECT_MAX_BYTES: number; - export const kMaxLength: number; - export const kStringMaxLength: number; - export const constants: { - MAX_LENGTH: number; - MAX_STRING_LENGTH: number; - }; - export type TranscodeEncoding = - | "ascii" - | "utf8" - | "utf-8" - | "utf16le" - | "utf-16le" - | "ucs2" - | "ucs-2" - | "latin1" - | "binary"; - /** - * Re-encodes the given `Buffer` or `Uint8Array` instance from one character - * encoding to another. Returns a new `Buffer` instance. - * - * Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if - * conversion from `fromEnc` to `toEnc` is not permitted. - * - * Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`, `'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`. - * - * The transcoding process will use substitution characters if a given byte - * sequence cannot be adequately represented in the target encoding. For instance: - * - * ```js - * import { Buffer, transcode } from 'node:buffer'; - * - * const newBuf = transcode(Buffer.from('€'), 'utf8', 'ascii'); - * console.log(newBuf.toString('ascii')); - * // Prints: '?' - * ``` - * - * Because the Euro (`€`) sign is not representable in US-ASCII, it is replaced - * with `?` in the transcoded `Buffer`. - * @since v7.1.0 - * @param source A `Buffer` or `Uint8Array` instance. - * @param fromEnc The current encoding. - * @param toEnc To target encoding. - */ - export function transcode( - source: Uint8Array, - fromEnc: TranscodeEncoding, - toEnc: TranscodeEncoding, - ): NonSharedBuffer; - /** - * Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using - * a prior call to `URL.createObjectURL()`. - * @since v16.7.0 - * @experimental - * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`. - */ - export function resolveObjectURL(id: string): Blob | undefined; - export { type AllowSharedBuffer, Buffer, type NonSharedBuffer }; - /** - * @experimental - */ - export interface BlobOptions { - /** - * One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts - * will be converted to the platform native line-ending as specified by `import { EOL } from 'node:node:os'`. - */ - endings?: "transparent" | "native"; - /** - * The Blob content-type. The intent is for `type` to convey - * the MIME media type of the data, however no validation of the type format - * is performed. - */ - type?: string | undefined; - } - /** - * A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) encapsulates immutable, raw data that can be safely shared across - * multiple worker threads. - * @since v15.7.0, v14.18.0 - */ - export class Blob { - /** - * The total size of the `Blob` in bytes. - * @since v15.7.0, v14.18.0 - */ - readonly size: number; - /** - * The content-type of the `Blob`. - * @since v15.7.0, v14.18.0 - */ - readonly type: string; - /** - * Creates a new `Blob` object containing a concatenation of the given sources. - * - * {ArrayBuffer}, {TypedArray}, {DataView}, and {Buffer} sources are copied into - * the 'Blob' and can therefore be safely modified after the 'Blob' is created. - * - * String sources are also copied into the `Blob`. - */ - constructor(sources: Array, options?: BlobOptions); - /** - * Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of - * the `Blob` data. - * @since v15.7.0, v14.18.0 - */ - arrayBuffer(): Promise; - /** - * The `blob.bytes()` method returns the byte of the `Blob` object as a `Promise`. - * - * ```js - * const blob = new Blob(['hello']); - * blob.bytes().then((bytes) => { - * console.log(bytes); // Outputs: Uint8Array(5) [ 104, 101, 108, 108, 111 ] - * }); - * ``` - * @since v20.16.0 - */ - bytes(): Promise; - /** - * Creates and returns a new `Blob` containing a subset of this `Blob` objects - * data. The original `Blob` is not altered. - * @since v15.7.0, v14.18.0 - * @param start The starting index. - * @param end The ending index. - * @param type The content-type for the new `Blob` - */ - slice(start?: number, end?: number, type?: string): Blob; - /** - * Returns a promise that fulfills with the contents of the `Blob` decoded as a - * UTF-8 string. - * @since v15.7.0, v14.18.0 - */ - text(): Promise; - /** - * Returns a new `ReadableStream` that allows the content of the `Blob` to be read. - * @since v16.7.0 - */ - stream(): WebReadableStream; - } - export interface FileOptions { - /** - * One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts will be - * converted to the platform native line-ending as specified by `import { EOL } from 'node:node:os'`. - */ - endings?: "native" | "transparent"; - /** The File content-type. */ - type?: string; - /** The last modified date of the file. `Default`: Date.now(). */ - lastModified?: number; - } - /** - * A [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) provides information about files. - * @since v19.2.0, v18.13.0 - */ - export class File extends Blob { - constructor(sources: Array, fileName: string, options?: FileOptions); - /** - * The name of the `File`. - * @since v19.2.0, v18.13.0 - */ - readonly name: string; - /** - * The last modified date of the `File`. - * @since v19.2.0, v18.13.0 - */ - readonly lastModified: number; - } - export import atob = globalThis.atob; - export import btoa = globalThis.btoa; - export type WithImplicitCoercion = - | T - | { valueOf(): T } - | (T extends string ? { [Symbol.toPrimitive](hint: "string"): T } : never); - global { - namespace NodeJS { - export { BufferEncoding }; - } - // Buffer class - type BufferEncoding = - | "ascii" - | "utf8" - | "utf-8" - | "utf16le" - | "utf-16le" - | "ucs2" - | "ucs-2" - | "base64" - | "base64url" - | "latin1" - | "binary" - | "hex"; - /** - * Raw data is stored in instances of the Buffer class. - * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. - * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex' - */ - interface BufferConstructor { - // see buffer.buffer.d.ts for implementation specific to TypeScript 5.7 and later - // see ts5.6/buffer.buffer.d.ts for implementation specific to TypeScript 5.6 and earlier - - /** - * Returns `true` if `obj` is a `Buffer`, `false` otherwise. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * Buffer.isBuffer(Buffer.alloc(10)); // true - * Buffer.isBuffer(Buffer.from('foo')); // true - * Buffer.isBuffer('a string'); // false - * Buffer.isBuffer([]); // false - * Buffer.isBuffer(new Uint8Array(1024)); // false - * ``` - * @since v0.1.101 - */ - isBuffer(obj: any): obj is Buffer; - /** - * Returns `true` if `encoding` is the name of a supported character encoding, - * or `false` otherwise. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * console.log(Buffer.isEncoding('utf8')); - * // Prints: true - * - * console.log(Buffer.isEncoding('hex')); - * // Prints: true - * - * console.log(Buffer.isEncoding('utf/8')); - * // Prints: false - * - * console.log(Buffer.isEncoding('')); - * // Prints: false - * ``` - * @since v0.9.1 - * @param encoding A character encoding name to check. - */ - isEncoding(encoding: string): encoding is BufferEncoding; - /** - * Returns the byte length of a string when encoded using `encoding`. - * This is not the same as [`String.prototype.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length), which does not account - * for the encoding that is used to convert the string into bytes. - * - * For `'base64'`, `'base64url'`, and `'hex'`, this function assumes valid input. - * For strings that contain non-base64/hex-encoded data (e.g. whitespace), the - * return value might be greater than the length of a `Buffer` created from the - * string. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const str = '\u00bd + \u00bc = \u00be'; - * - * console.log(`${str}: ${str.length} characters, ` + - * `${Buffer.byteLength(str, 'utf8')} bytes`); - * // Prints: ½ + ¼ = ¾: 9 characters, 12 bytes - * ``` - * - * When `string` is a - * `Buffer`/[`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)/[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/- - * Reference/Global_Objects/TypedArray)/[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)/[`SharedArrayBuffer`](https://develop- - * er.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer), the byte length as reported by `.byteLength`is returned. - * @since v0.1.90 - * @param string A value to calculate the length of. - * @param [encoding='utf8'] If `string` is a string, this is its encoding. - * @return The number of bytes contained within `string`. - */ - byteLength( - string: string | NodeJS.ArrayBufferView | ArrayBufferLike, - encoding?: BufferEncoding, - ): number; - /** - * Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of `Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from('1234'); - * const buf2 = Buffer.from('0123'); - * const arr = [buf1, buf2]; - * - * console.log(arr.sort(Buffer.compare)); - * // Prints: [ , ] - * // (This result is equal to: [buf2, buf1].) - * ``` - * @since v0.11.13 - * @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details. - */ - compare(buf1: Uint8Array, buf2: Uint8Array): -1 | 0 | 1; - /** - * This is the size (in bytes) of pre-allocated internal `Buffer` instances used - * for pooling. This value may be modified. - * @since v0.11.3 - */ - poolSize: number; - } - interface Buffer { - // see buffer.buffer.d.ts for implementation specific to TypeScript 5.7 and later - // see ts5.6/buffer.buffer.d.ts for implementation specific to TypeScript 5.6 and earlier - - /** - * Writes `string` to `buf` at `offset` according to the character encoding in`encoding`. The `length` parameter is the number of bytes to write. If `buf` did - * not contain enough space to fit the entire string, only part of `string` will be - * written. However, partially encoded characters will not be written. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(256); - * - * const len = buf.write('\u00bd + \u00bc = \u00be', 0); - * - * console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`); - * // Prints: 12 bytes: ½ + ¼ = ¾ - * - * const buffer = Buffer.alloc(10); - * - * const length = buffer.write('abcd', 8); - * - * console.log(`${length} bytes: ${buffer.toString('utf8', 8, 10)}`); - * // Prints: 2 bytes : ab - * ``` - * @since v0.1.90 - * @param string String to write to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write `string`. - * @param [length=buf.length - offset] Maximum number of bytes to write (written bytes will not exceed `buf.length - offset`). - * @param [encoding='utf8'] The character encoding of `string`. - * @return Number of bytes written. - */ - write(string: string, encoding?: BufferEncoding): number; - write(string: string, offset: number, encoding?: BufferEncoding): number; - write(string: string, offset: number, length: number, encoding?: BufferEncoding): number; - /** - * Decodes `buf` to a string according to the specified character encoding in`encoding`. `start` and `end` may be passed to decode only a subset of `buf`. - * - * If `encoding` is `'utf8'` and a byte sequence in the input is not valid UTF-8, - * then each invalid byte is replaced with the replacement character `U+FFFD`. - * - * The maximum length of a string instance (in UTF-16 code units) is available - * as {@link constants.MAX_STRING_LENGTH}. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.allocUnsafe(26); - * - * for (let i = 0; i < 26; i++) { - * // 97 is the decimal ASCII value for 'a'. - * buf1[i] = i + 97; - * } - * - * console.log(buf1.toString('utf8')); - * // Prints: abcdefghijklmnopqrstuvwxyz - * console.log(buf1.toString('utf8', 0, 5)); - * // Prints: abcde - * - * const buf2 = Buffer.from('tést'); - * - * console.log(buf2.toString('hex')); - * // Prints: 74c3a97374 - * console.log(buf2.toString('utf8', 0, 3)); - * // Prints: té - * console.log(buf2.toString(undefined, 0, 3)); - * // Prints: té - * ``` - * @since v0.1.90 - * @param [encoding='utf8'] The character encoding to use. - * @param [start=0] The byte offset to start decoding at. - * @param [end=buf.length] The byte offset to stop decoding at (not inclusive). - */ - toString(encoding?: BufferEncoding, start?: number, end?: number): string; - /** - * Returns a JSON representation of `buf`. [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) implicitly calls - * this function when stringifying a `Buffer` instance. - * - * `Buffer.from()` accepts objects in the format returned from this method. - * In particular, `Buffer.from(buf.toJSON())` works like `Buffer.from(buf)`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5]); - * const json = JSON.stringify(buf); - * - * console.log(json); - * // Prints: {"type":"Buffer","data":[1,2,3,4,5]} - * - * const copy = JSON.parse(json, (key, value) => { - * return value && value.type === 'Buffer' ? - * Buffer.from(value) : - * value; - * }); - * - * console.log(copy); - * // Prints: - * ``` - * @since v0.9.2 - */ - toJSON(): { - type: "Buffer"; - data: number[]; - }; - /** - * Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes,`false` otherwise. Equivalent to `buf.compare(otherBuffer) === 0`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from('ABC'); - * const buf2 = Buffer.from('414243', 'hex'); - * const buf3 = Buffer.from('ABCD'); - * - * console.log(buf1.equals(buf2)); - * // Prints: true - * console.log(buf1.equals(buf3)); - * // Prints: false - * ``` - * @since v0.11.13 - * @param otherBuffer A `Buffer` or {@link Uint8Array} with which to compare `buf`. - */ - equals(otherBuffer: Uint8Array): boolean; - /** - * Compares `buf` with `target` and returns a number indicating whether `buf`comes before, after, or is the same as `target` in sort order. - * Comparison is based on the actual sequence of bytes in each `Buffer`. - * - * * `0` is returned if `target` is the same as `buf` - * * `1` is returned if `target` should come _before_`buf` when sorted. - * * `-1` is returned if `target` should come _after_`buf` when sorted. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from('ABC'); - * const buf2 = Buffer.from('BCD'); - * const buf3 = Buffer.from('ABCD'); - * - * console.log(buf1.compare(buf1)); - * // Prints: 0 - * console.log(buf1.compare(buf2)); - * // Prints: -1 - * console.log(buf1.compare(buf3)); - * // Prints: -1 - * console.log(buf2.compare(buf1)); - * // Prints: 1 - * console.log(buf2.compare(buf3)); - * // Prints: 1 - * console.log([buf1, buf2, buf3].sort(Buffer.compare)); - * // Prints: [ , , ] - * // (This result is equal to: [buf1, buf3, buf2].) - * ``` - * - * The optional `targetStart`, `targetEnd`, `sourceStart`, and `sourceEnd` arguments can be used to limit the comparison to specific ranges within `target` and `buf` respectively. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8, 9]); - * const buf2 = Buffer.from([5, 6, 7, 8, 9, 1, 2, 3, 4]); - * - * console.log(buf1.compare(buf2, 5, 9, 0, 4)); - * // Prints: 0 - * console.log(buf1.compare(buf2, 0, 6, 4)); - * // Prints: -1 - * console.log(buf1.compare(buf2, 5, 6, 5)); - * // Prints: 1 - * ``` - * - * `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`, `targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`. - * @since v0.11.13 - * @param target A `Buffer` or {@link Uint8Array} with which to compare `buf`. - * @param [targetStart=0] The offset within `target` at which to begin comparison. - * @param [targetEnd=target.length] The offset within `target` at which to end comparison (not inclusive). - * @param [sourceStart=0] The offset within `buf` at which to begin comparison. - * @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive). - */ - compare( - target: Uint8Array, - targetStart?: number, - targetEnd?: number, - sourceStart?: number, - sourceEnd?: number, - ): -1 | 0 | 1; - /** - * Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`. - * - * [`TypedArray.prototype.set()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set) performs the same operation, and is available - * for all TypedArrays, including Node.js `Buffer`s, although it takes - * different function arguments. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Create two `Buffer` instances. - * const buf1 = Buffer.allocUnsafe(26); - * const buf2 = Buffer.allocUnsafe(26).fill('!'); - * - * for (let i = 0; i < 26; i++) { - * // 97 is the decimal ASCII value for 'a'. - * buf1[i] = i + 97; - * } - * - * // Copy `buf1` bytes 16 through 19 into `buf2` starting at byte 8 of `buf2`. - * buf1.copy(buf2, 8, 16, 20); - * // This is equivalent to: - * // buf2.set(buf1.subarray(16, 20), 8); - * - * console.log(buf2.toString('ascii', 0, 25)); - * // Prints: !!!!!!!!qrst!!!!!!!!!!!!! - * ``` - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Create a `Buffer` and copy data from one region to an overlapping region - * // within the same `Buffer`. - * - * const buf = Buffer.allocUnsafe(26); - * - * for (let i = 0; i < 26; i++) { - * // 97 is the decimal ASCII value for 'a'. - * buf[i] = i + 97; - * } - * - * buf.copy(buf, 0, 4, 10); - * - * console.log(buf.toString()); - * // Prints: efghijghijklmnopqrstuvwxyz - * ``` - * @since v0.1.90 - * @param target A `Buffer` or {@link Uint8Array} to copy into. - * @param [targetStart=0] The offset within `target` at which to begin writing. - * @param [sourceStart=0] The offset within `buf` from which to begin copying. - * @param [sourceEnd=buf.length] The offset within `buf` at which to stop copying (not inclusive). - * @return The number of bytes copied. - */ - copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. - * - * `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(8); - * - * buf.writeBigInt64BE(0x0102030405060708n, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v12.0.0, v10.20.0 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. - * @return `offset` plus the number of bytes written. - */ - writeBigInt64BE(value: bigint, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. - * - * `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(8); - * - * buf.writeBigInt64LE(0x0102030405060708n, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v12.0.0, v10.20.0 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. - * @return `offset` plus the number of bytes written. - */ - writeBigInt64LE(value: bigint, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. - * - * This function is also available under the `writeBigUint64BE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(8); - * - * buf.writeBigUInt64BE(0xdecafafecacefaden, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v12.0.0, v10.20.0 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. - * @return `offset` plus the number of bytes written. - */ - writeBigUInt64BE(value: bigint, offset?: number): number; - /** - * @alias Buffer.writeBigUInt64BE - * @since v14.10.0, v12.19.0 - */ - writeBigUint64BE(value: bigint, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(8); - * - * buf.writeBigUInt64LE(0xdecafafecacefaden, 0); - * - * console.log(buf); - * // Prints: - * ``` - * - * This function is also available under the `writeBigUint64LE` alias. - * @since v12.0.0, v10.20.0 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`. - * @return `offset` plus the number of bytes written. - */ - writeBigUInt64LE(value: bigint, offset?: number): number; - /** - * @alias Buffer.writeBigUInt64LE - * @since v14.10.0, v12.19.0 - */ - writeBigUint64LE(value: bigint, offset?: number): number; - /** - * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined - * when `value` is anything other than an unsigned integer. - * - * This function is also available under the `writeUintLE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(6); - * - * buf.writeUIntLE(0x1234567890ab, 0, 6); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. - * @return `offset` plus the number of bytes written. - */ - writeUIntLE(value: number, offset: number, byteLength: number): number; - /** - * @alias Buffer.writeUIntLE - * @since v14.9.0, v12.19.0 - */ - writeUintLE(value: number, offset: number, byteLength: number): number; - /** - * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined - * when `value` is anything other than an unsigned integer. - * - * This function is also available under the `writeUintBE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(6); - * - * buf.writeUIntBE(0x1234567890ab, 0, 6); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. - * @return `offset` plus the number of bytes written. - */ - writeUIntBE(value: number, offset: number, byteLength: number): number; - /** - * @alias Buffer.writeUIntBE - * @since v14.9.0, v12.19.0 - */ - writeUintBE(value: number, offset: number, byteLength: number): number; - /** - * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined - * when `value` is anything other than a signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(6); - * - * buf.writeIntLE(0x1234567890ab, 0, 6); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.11.15 - * @param value Number to be written to `buf`. - * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. - * @return `offset` plus the number of bytes written. - */ - writeIntLE(value: number, offset: number, byteLength: number): number; - /** - * Writes `byteLength` bytes of `value` to `buf` at the specified `offset`as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined when`value` is anything other than a - * signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(6); - * - * buf.writeIntBE(0x1234567890ab, 0, 6); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.11.15 - * @param value Number to be written to `buf`. - * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to write. Must satisfy `0 < byteLength <= 6`. - * @return `offset` plus the number of bytes written. - */ - writeIntBE(value: number, offset: number, byteLength: number): number; - /** - * Reads an unsigned, big-endian 64-bit integer from `buf` at the specified`offset`. - * - * This function is also available under the `readBigUint64BE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]); - * - * console.log(buf.readBigUInt64BE(0)); - * // Prints: 4294967295n - * ``` - * @since v12.0.0, v10.20.0 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. - */ - readBigUInt64BE(offset?: number): bigint; - /** - * @alias Buffer.readBigUInt64BE - * @since v14.10.0, v12.19.0 - */ - readBigUint64BE(offset?: number): bigint; - /** - * Reads an unsigned, little-endian 64-bit integer from `buf` at the specified`offset`. - * - * This function is also available under the `readBigUint64LE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff]); - * - * console.log(buf.readBigUInt64LE(0)); - * // Prints: 18446744069414584320n - * ``` - * @since v12.0.0, v10.20.0 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. - */ - readBigUInt64LE(offset?: number): bigint; - /** - * @alias Buffer.readBigUInt64LE - * @since v14.10.0, v12.19.0 - */ - readBigUint64LE(offset?: number): bigint; - /** - * Reads a signed, big-endian 64-bit integer from `buf` at the specified `offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed - * values. - * @since v12.0.0, v10.20.0 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. - */ - readBigInt64BE(offset?: number): bigint; - /** - * Reads a signed, little-endian 64-bit integer from `buf` at the specified`offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed - * values. - * @since v12.0.0, v10.20.0 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`. - */ - readBigInt64LE(offset?: number): bigint; - /** - * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned, little-endian integer supporting - * up to 48 bits of accuracy. - * - * This function is also available under the `readUintLE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); - * - * console.log(buf.readUIntLE(0, 6).toString(16)); - * // Prints: ab9078563412 - * ``` - * @since v0.11.15 - * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. - */ - readUIntLE(offset: number, byteLength: number): number; - /** - * @alias Buffer.readUIntLE - * @since v14.9.0, v12.19.0 - */ - readUintLE(offset: number, byteLength: number): number; - /** - * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned big-endian integer supporting - * up to 48 bits of accuracy. - * - * This function is also available under the `readUintBE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); - * - * console.log(buf.readUIntBE(0, 6).toString(16)); - * // Prints: 1234567890ab - * console.log(buf.readUIntBE(1, 6).toString(16)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.11.15 - * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. - */ - readUIntBE(offset: number, byteLength: number): number; - /** - * @alias Buffer.readUIntBE - * @since v14.9.0, v12.19.0 - */ - readUintBE(offset: number, byteLength: number): number; - /** - * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a little-endian, two's complement signed value - * supporting up to 48 bits of accuracy. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); - * - * console.log(buf.readIntLE(0, 6).toString(16)); - * // Prints: -546f87a9cbee - * ``` - * @since v0.11.15 - * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. - */ - readIntLE(offset: number, byteLength: number): number; - /** - * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a big-endian, two's complement signed value - * supporting up to 48 bits of accuracy. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78, 0x90, 0xab]); - * - * console.log(buf.readIntBE(0, 6).toString(16)); - * // Prints: 1234567890ab - * console.log(buf.readIntBE(1, 6).toString(16)); - * // Throws ERR_OUT_OF_RANGE. - * console.log(buf.readIntBE(1, 0).toString(16)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.11.15 - * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`. - * @param byteLength Number of bytes to read. Must satisfy `0 < byteLength <= 6`. - */ - readIntBE(offset: number, byteLength: number): number; - /** - * Reads an unsigned 8-bit integer from `buf` at the specified `offset`. - * - * This function is also available under the `readUint8` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([1, -2]); - * - * console.log(buf.readUInt8(0)); - * // Prints: 1 - * console.log(buf.readUInt8(1)); - * // Prints: 254 - * console.log(buf.readUInt8(2)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.5.0 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`. - */ - readUInt8(offset?: number): number; - /** - * @alias Buffer.readUInt8 - * @since v14.9.0, v12.19.0 - */ - readUint8(offset?: number): number; - /** - * Reads an unsigned, little-endian 16-bit integer from `buf` at the specified `offset`. - * - * This function is also available under the `readUint16LE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56]); - * - * console.log(buf.readUInt16LE(0).toString(16)); - * // Prints: 3412 - * console.log(buf.readUInt16LE(1).toString(16)); - * // Prints: 5634 - * console.log(buf.readUInt16LE(2).toString(16)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. - */ - readUInt16LE(offset?: number): number; - /** - * @alias Buffer.readUInt16LE - * @since v14.9.0, v12.19.0 - */ - readUint16LE(offset?: number): number; - /** - * Reads an unsigned, big-endian 16-bit integer from `buf` at the specified`offset`. - * - * This function is also available under the `readUint16BE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56]); - * - * console.log(buf.readUInt16BE(0).toString(16)); - * // Prints: 1234 - * console.log(buf.readUInt16BE(1).toString(16)); - * // Prints: 3456 - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. - */ - readUInt16BE(offset?: number): number; - /** - * @alias Buffer.readUInt16BE - * @since v14.9.0, v12.19.0 - */ - readUint16BE(offset?: number): number; - /** - * Reads an unsigned, little-endian 32-bit integer from `buf` at the specified`offset`. - * - * This function is also available under the `readUint32LE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]); - * - * console.log(buf.readUInt32LE(0).toString(16)); - * // Prints: 78563412 - * console.log(buf.readUInt32LE(1).toString(16)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. - */ - readUInt32LE(offset?: number): number; - /** - * @alias Buffer.readUInt32LE - * @since v14.9.0, v12.19.0 - */ - readUint32LE(offset?: number): number; - /** - * Reads an unsigned, big-endian 32-bit integer from `buf` at the specified`offset`. - * - * This function is also available under the `readUint32BE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0x12, 0x34, 0x56, 0x78]); - * - * console.log(buf.readUInt32BE(0).toString(16)); - * // Prints: 12345678 - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. - */ - readUInt32BE(offset?: number): number; - /** - * @alias Buffer.readUInt32BE - * @since v14.9.0, v12.19.0 - */ - readUint32BE(offset?: number): number; - /** - * Reads a signed 8-bit integer from `buf` at the specified `offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed values. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([-1, 5]); - * - * console.log(buf.readInt8(0)); - * // Prints: -1 - * console.log(buf.readInt8(1)); - * // Prints: 5 - * console.log(buf.readInt8(2)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.5.0 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`. - */ - readInt8(offset?: number): number; - /** - * Reads a signed, little-endian 16-bit integer from `buf` at the specified`offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed values. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0, 5]); - * - * console.log(buf.readInt16LE(0)); - * // Prints: 1280 - * console.log(buf.readInt16LE(1)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. - */ - readInt16LE(offset?: number): number; - /** - * Reads a signed, big-endian 16-bit integer from `buf` at the specified `offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed values. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0, 5]); - * - * console.log(buf.readInt16BE(0)); - * // Prints: 5 - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`. - */ - readInt16BE(offset?: number): number; - /** - * Reads a signed, little-endian 32-bit integer from `buf` at the specified`offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed values. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0, 0, 0, 5]); - * - * console.log(buf.readInt32LE(0)); - * // Prints: 83886080 - * console.log(buf.readInt32LE(1)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. - */ - readInt32LE(offset?: number): number; - /** - * Reads a signed, big-endian 32-bit integer from `buf` at the specified `offset`. - * - * Integers read from a `Buffer` are interpreted as two's complement signed values. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([0, 0, 0, 5]); - * - * console.log(buf.readInt32BE(0)); - * // Prints: 5 - * ``` - * @since v0.5.5 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. - */ - readInt32BE(offset?: number): number; - /** - * Reads a 32-bit, little-endian float from `buf` at the specified `offset`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([1, 2, 3, 4]); - * - * console.log(buf.readFloatLE(0)); - * // Prints: 1.539989614439558e-36 - * console.log(buf.readFloatLE(1)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.11.15 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. - */ - readFloatLE(offset?: number): number; - /** - * Reads a 32-bit, big-endian float from `buf` at the specified `offset`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([1, 2, 3, 4]); - * - * console.log(buf.readFloatBE(0)); - * // Prints: 2.387939260590663e-38 - * ``` - * @since v0.11.15 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`. - */ - readFloatBE(offset?: number): number; - /** - * Reads a 64-bit, little-endian double from `buf` at the specified `offset`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); - * - * console.log(buf.readDoubleLE(0)); - * // Prints: 5.447603722011605e-270 - * console.log(buf.readDoubleLE(1)); - * // Throws ERR_OUT_OF_RANGE. - * ``` - * @since v0.11.15 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`. - */ - readDoubleLE(offset?: number): number; - /** - * Reads a 64-bit, big-endian double from `buf` at the specified `offset`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); - * - * console.log(buf.readDoubleBE(0)); - * // Prints: 8.20788039913184e-304 - * ``` - * @since v0.11.15 - * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`. - */ - readDoubleBE(offset?: number): number; - reverse(): this; - /** - * Interprets `buf` as an array of unsigned 16-bit integers and swaps the - * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 2. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); - * - * console.log(buf1); - * // Prints: - * - * buf1.swap16(); - * - * console.log(buf1); - * // Prints: - * - * const buf2 = Buffer.from([0x1, 0x2, 0x3]); - * - * buf2.swap16(); - * // Throws ERR_INVALID_BUFFER_SIZE. - * ``` - * - * One convenient use of `buf.swap16()` is to perform a fast in-place conversion - * between UTF-16 little-endian and UTF-16 big-endian: - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('This is little-endian UTF-16', 'utf16le'); - * buf.swap16(); // Convert to big-endian UTF-16 text. - * ``` - * @since v5.10.0 - * @return A reference to `buf`. - */ - swap16(): this; - /** - * Interprets `buf` as an array of unsigned 32-bit integers and swaps the - * byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 4. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); - * - * console.log(buf1); - * // Prints: - * - * buf1.swap32(); - * - * console.log(buf1); - * // Prints: - * - * const buf2 = Buffer.from([0x1, 0x2, 0x3]); - * - * buf2.swap32(); - * // Throws ERR_INVALID_BUFFER_SIZE. - * ``` - * @since v5.10.0 - * @return A reference to `buf`. - */ - swap32(): this; - /** - * Interprets `buf` as an array of 64-bit numbers and swaps byte order _in-place_. - * Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 8. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from([0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8]); - * - * console.log(buf1); - * // Prints: - * - * buf1.swap64(); - * - * console.log(buf1); - * // Prints: - * - * const buf2 = Buffer.from([0x1, 0x2, 0x3]); - * - * buf2.swap64(); - * // Throws ERR_INVALID_BUFFER_SIZE. - * ``` - * @since v6.3.0 - * @return A reference to `buf`. - */ - swap64(): this; - /** - * Writes `value` to `buf` at the specified `offset`. `value` must be a - * valid unsigned 8-bit integer. Behavior is undefined when `value` is anything - * other than an unsigned 8-bit integer. - * - * This function is also available under the `writeUint8` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeUInt8(0x3, 0); - * buf.writeUInt8(0x4, 1); - * buf.writeUInt8(0x23, 2); - * buf.writeUInt8(0x42, 3); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.0 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`. - * @return `offset` plus the number of bytes written. - */ - writeUInt8(value: number, offset?: number): number; - /** - * @alias Buffer.writeUInt8 - * @since v14.9.0, v12.19.0 - */ - writeUint8(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is - * anything other than an unsigned 16-bit integer. - * - * This function is also available under the `writeUint16LE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeUInt16LE(0xdead, 0); - * buf.writeUInt16LE(0xbeef, 2); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. - * @return `offset` plus the number of bytes written. - */ - writeUInt16LE(value: number, offset?: number): number; - /** - * @alias Buffer.writeUInt16LE - * @since v14.9.0, v12.19.0 - */ - writeUint16LE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value`is anything other than an - * unsigned 16-bit integer. - * - * This function is also available under the `writeUint16BE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeUInt16BE(0xdead, 0); - * buf.writeUInt16BE(0xbeef, 2); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. - * @return `offset` plus the number of bytes written. - */ - writeUInt16BE(value: number, offset?: number): number; - /** - * @alias Buffer.writeUInt16BE - * @since v14.9.0, v12.19.0 - */ - writeUint16BE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is - * anything other than an unsigned 32-bit integer. - * - * This function is also available under the `writeUint32LE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeUInt32LE(0xfeedface, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. - * @return `offset` plus the number of bytes written. - */ - writeUInt32LE(value: number, offset?: number): number; - /** - * @alias Buffer.writeUInt32LE - * @since v14.9.0, v12.19.0 - */ - writeUint32LE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value`is anything other than an - * unsigned 32-bit integer. - * - * This function is also available under the `writeUint32BE` alias. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeUInt32BE(0xfeedface, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. - * @return `offset` plus the number of bytes written. - */ - writeUInt32BE(value: number, offset?: number): number; - /** - * @alias Buffer.writeUInt32BE - * @since v14.9.0, v12.19.0 - */ - writeUint32BE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset`. `value` must be a valid - * signed 8-bit integer. Behavior is undefined when `value` is anything other than - * a signed 8-bit integer. - * - * `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(2); - * - * buf.writeInt8(2, 0); - * buf.writeInt8(-2, 1); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.0 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`. - * @return `offset` plus the number of bytes written. - */ - writeInt8(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is - * anything other than a signed 16-bit integer. - * - * The `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(2); - * - * buf.writeInt16LE(0x0304, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. - * @return `offset` plus the number of bytes written. - */ - writeInt16LE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is - * anything other than a signed 16-bit integer. - * - * The `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(2); - * - * buf.writeInt16BE(0x0102, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`. - * @return `offset` plus the number of bytes written. - */ - writeInt16BE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is - * anything other than a signed 32-bit integer. - * - * The `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeInt32LE(0x05060708, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. - * @return `offset` plus the number of bytes written. - */ - writeInt32LE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is - * anything other than a signed 32-bit integer. - * - * The `value` is interpreted and written as a two's complement signed integer. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeInt32BE(0x01020304, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.5.5 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. - * @return `offset` plus the number of bytes written. - */ - writeInt32BE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. Behavior is - * undefined when `value` is anything other than a JavaScript number. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeFloatLE(0xcafebabe, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.11.15 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. - * @return `offset` plus the number of bytes written. - */ - writeFloatLE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. Behavior is - * undefined when `value` is anything other than a JavaScript number. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(4); - * - * buf.writeFloatBE(0xcafebabe, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.11.15 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`. - * @return `offset` plus the number of bytes written. - */ - writeFloatBE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything - * other than a JavaScript number. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(8); - * - * buf.writeDoubleLE(123.456, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.11.15 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`. - * @return `offset` plus the number of bytes written. - */ - writeDoubleLE(value: number, offset?: number): number; - /** - * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything - * other than a JavaScript number. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(8); - * - * buf.writeDoubleBE(123.456, 0); - * - * console.log(buf); - * // Prints: - * ``` - * @since v0.11.15 - * @param value Number to be written to `buf`. - * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`. - * @return `offset` plus the number of bytes written. - */ - writeDoubleBE(value: number, offset?: number): number; - /** - * Fills `buf` with the specified `value`. If the `offset` and `end` are not given, - * the entire `buf` will be filled: - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Fill a `Buffer` with the ASCII character 'h'. - * - * const b = Buffer.allocUnsafe(50).fill('h'); - * - * console.log(b.toString()); - * // Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh - * - * // Fill a buffer with empty string - * const c = Buffer.allocUnsafe(5).fill(''); - * - * console.log(c.fill('')); - * // Prints: - * ``` - * - * `value` is coerced to a `uint32` value if it is not a string, `Buffer`, or - * integer. If the resulting integer is greater than `255` (decimal), `buf` will be - * filled with `value & 255`. - * - * If the final write of a `fill()` operation falls on a multi-byte character, - * then only the bytes of that character that fit into `buf` are written: - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Fill a `Buffer` with character that takes up two bytes in UTF-8. - * - * console.log(Buffer.allocUnsafe(5).fill('\u0222')); - * // Prints: - * ``` - * - * If `value` contains invalid characters, it is truncated; if no valid - * fill data remains, an exception is thrown: - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(5); - * - * console.log(buf.fill('a')); - * // Prints: - * console.log(buf.fill('aazz', 'hex')); - * // Prints: - * console.log(buf.fill('zz', 'hex')); - * // Throws an exception. - * ``` - * @since v0.5.0 - * @param value The value with which to fill `buf`. Empty value (string, Uint8Array, Buffer) is coerced to `0`. - * @param [offset=0] Number of bytes to skip before starting to fill `buf`. - * @param [end=buf.length] Where to stop filling `buf` (not inclusive). - * @param [encoding='utf8'] The encoding for `value` if `value` is a string. - * @return A reference to `buf`. - */ - fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this; - fill(value: string | Uint8Array | number, offset: number, encoding: BufferEncoding): this; - fill(value: string | Uint8Array | number, encoding: BufferEncoding): this; - /** - * If `value` is: - * - * * a string, `value` is interpreted according to the character encoding in `encoding`. - * * a `Buffer` or [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array), `value` will be used in its entirety. - * To compare a partial `Buffer`, use `buf.subarray`. - * * a number, `value` will be interpreted as an unsigned 8-bit integer - * value between `0` and `255`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('this is a buffer'); - * - * console.log(buf.indexOf('this')); - * // Prints: 0 - * console.log(buf.indexOf('is')); - * // Prints: 2 - * console.log(buf.indexOf(Buffer.from('a buffer'))); - * // Prints: 8 - * console.log(buf.indexOf(97)); - * // Prints: 8 (97 is the decimal ASCII value for 'a') - * console.log(buf.indexOf(Buffer.from('a buffer example'))); - * // Prints: -1 - * console.log(buf.indexOf(Buffer.from('a buffer example').slice(0, 8))); - * // Prints: 8 - * - * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le'); - * - * console.log(utf16Buffer.indexOf('\u03a3', 0, 'utf16le')); - * // Prints: 4 - * console.log(utf16Buffer.indexOf('\u03a3', -4, 'utf16le')); - * // Prints: 6 - * ``` - * - * If `value` is not a string, number, or `Buffer`, this method will throw a `TypeError`. If `value` is a number, it will be coerced to a valid byte value, - * an integer between 0 and 255. - * - * If `byteOffset` is not a number, it will be coerced to a number. If the result - * of coercion is `NaN` or `0`, then the entire buffer will be searched. This - * behavior matches [`String.prototype.indexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf). - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const b = Buffer.from('abcdef'); - * - * // Passing a value that's a number, but not a valid byte. - * // Prints: 2, equivalent to searching for 99 or 'c'. - * console.log(b.indexOf(99.9)); - * console.log(b.indexOf(256 + 99)); - * - * // Passing a byteOffset that coerces to NaN or 0. - * // Prints: 1, searching the whole buffer. - * console.log(b.indexOf('b', undefined)); - * console.log(b.indexOf('b', {})); - * console.log(b.indexOf('b', null)); - * console.log(b.indexOf('b', [])); - * ``` - * - * If `value` is an empty string or empty `Buffer` and `byteOffset` is less - * than `buf.length`, `byteOffset` will be returned. If `value` is empty and`byteOffset` is at least `buf.length`, `buf.length` will be returned. - * @since v1.5.0 - * @param value What to search for. - * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`. - * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`. - * @return The index of the first occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`. - */ - indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; - indexOf(value: string | number | Uint8Array, encoding: BufferEncoding): number; - /** - * Identical to `buf.indexOf()`, except the last occurrence of `value` is found - * rather than the first occurrence. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('this buffer is a buffer'); - * - * console.log(buf.lastIndexOf('this')); - * // Prints: 0 - * console.log(buf.lastIndexOf('buffer')); - * // Prints: 17 - * console.log(buf.lastIndexOf(Buffer.from('buffer'))); - * // Prints: 17 - * console.log(buf.lastIndexOf(97)); - * // Prints: 15 (97 is the decimal ASCII value for 'a') - * console.log(buf.lastIndexOf(Buffer.from('yolo'))); - * // Prints: -1 - * console.log(buf.lastIndexOf('buffer', 5)); - * // Prints: 5 - * console.log(buf.lastIndexOf('buffer', 4)); - * // Prints: -1 - * - * const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'utf16le'); - * - * console.log(utf16Buffer.lastIndexOf('\u03a3', undefined, 'utf16le')); - * // Prints: 6 - * console.log(utf16Buffer.lastIndexOf('\u03a3', -5, 'utf16le')); - * // Prints: 4 - * ``` - * - * If `value` is not a string, number, or `Buffer`, this method will throw a `TypeError`. If `value` is a number, it will be coerced to a valid byte value, - * an integer between 0 and 255. - * - * If `byteOffset` is not a number, it will be coerced to a number. Any arguments - * that coerce to `NaN`, like `{}` or `undefined`, will search the whole buffer. - * This behavior matches [`String.prototype.lastIndexOf()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf). - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const b = Buffer.from('abcdef'); - * - * // Passing a value that's a number, but not a valid byte. - * // Prints: 2, equivalent to searching for 99 or 'c'. - * console.log(b.lastIndexOf(99.9)); - * console.log(b.lastIndexOf(256 + 99)); - * - * // Passing a byteOffset that coerces to NaN. - * // Prints: 1, searching the whole buffer. - * console.log(b.lastIndexOf('b', undefined)); - * console.log(b.lastIndexOf('b', {})); - * - * // Passing a byteOffset that coerces to 0. - * // Prints: -1, equivalent to passing 0. - * console.log(b.lastIndexOf('b', null)); - * console.log(b.lastIndexOf('b', [])); - * ``` - * - * If `value` is an empty string or empty `Buffer`, `byteOffset` will be returned. - * @since v6.0.0 - * @param value What to search for. - * @param [byteOffset=buf.length - 1] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`. - * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`. - * @return The index of the last occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`. - */ - lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; - lastIndexOf(value: string | number | Uint8Array, encoding: BufferEncoding): number; - /** - * Equivalent to `buf.indexOf() !== -1`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('this is a buffer'); - * - * console.log(buf.includes('this')); - * // Prints: true - * console.log(buf.includes('is')); - * // Prints: true - * console.log(buf.includes(Buffer.from('a buffer'))); - * // Prints: true - * console.log(buf.includes(97)); - * // Prints: true (97 is the decimal ASCII value for 'a') - * console.log(buf.includes(Buffer.from('a buffer example'))); - * // Prints: false - * console.log(buf.includes(Buffer.from('a buffer example').slice(0, 8))); - * // Prints: true - * console.log(buf.includes('this', 4)); - * // Prints: false - * ``` - * @since v5.3.0 - * @param value What to search for. - * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`. - * @param [encoding='utf8'] If `value` is a string, this is its encoding. - * @return `true` if `value` was found in `buf`, `false` otherwise. - */ - includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean; - includes(value: string | number | Buffer, encoding: BufferEncoding): boolean; - } - var Buffer: BufferConstructor; - /** - * Decodes a string of Base64-encoded data into bytes, and encodes those bytes - * into a string using Latin-1 (ISO-8859-1). - * - * The `data` may be any JavaScript-value that can be coerced into a string. - * - * **This function is only provided for compatibility with legacy web platform APIs** - * **and should never be used in new code, because they use strings to represent** - * **binary data and predate the introduction of typed arrays in JavaScript.** - * **For code running using Node.js APIs, converting between base64-encoded strings** - * **and binary data should be performed using `Buffer.from(str, 'base64')` and `buf.toString('base64')`.** - * @since v15.13.0, v14.17.0 - * @legacy Use `Buffer.from(data, 'base64')` instead. - * @param data The Base64-encoded input string. - */ - function atob(data: string): string; - /** - * Decodes a string into bytes using Latin-1 (ISO-8859), and encodes those bytes - * into a string using Base64. - * - * The `data` may be any JavaScript-value that can be coerced into a string. - * - * **This function is only provided for compatibility with legacy web platform APIs** - * **and should never be used in new code, because they use strings to represent** - * **binary data and predate the introduction of typed arrays in JavaScript.** - * **For code running using Node.js APIs, converting between base64-encoded strings** - * **and binary data should be performed using `Buffer.from(str, 'base64')` and `buf.toString('base64')`.** - * @since v15.13.0, v14.17.0 - * @legacy Use `buf.toString('base64')` instead. - * @param data An ASCII (Latin1) string. - */ - function btoa(data: string): string; - interface Blob extends _Blob {} - /** - * `Blob` class is a global reference for `import { Blob } from 'node:node:buffer'` - * https://nodejs.org/api/buffer.html#class-blob - * @since v18.0.0 - */ - var Blob: typeof globalThis extends { onmessage: any; Blob: infer T } ? T - : typeof import("buffer").Blob; - interface File extends _File {} - /** - * `File` class is a global reference for `import { File } from 'node:node:buffer'` - * https://nodejs.org/api/buffer.html#class-file - * @since v20.0.0 - */ - var File: typeof globalThis extends { onmessage: any; File: infer T } ? T - : typeof import("buffer").File; - } -} -declare module "node:buffer" { - export * from "buffer"; -} diff --git a/node_modules/@types/node/child_process.d.ts b/node_modules/@types/node/child_process.d.ts deleted file mode 100644 index 5089071..0000000 --- a/node_modules/@types/node/child_process.d.ts +++ /dev/null @@ -1,1475 +0,0 @@ -/** - * The `node:child_process` module provides the ability to spawn subprocesses in - * a manner that is similar, but not identical, to [`popen(3)`](http://man7.org/linux/man-pages/man3/popen.3.html). This capability - * is primarily provided by the {@link spawn} function: - * - * ```js - * import { spawn } from 'node:child_process'; - * const ls = spawn('ls', ['-lh', '/usr']); - * - * ls.stdout.on('data', (data) => { - * console.log(`stdout: ${data}`); - * }); - * - * ls.stderr.on('data', (data) => { - * console.error(`stderr: ${data}`); - * }); - * - * ls.on('close', (code) => { - * console.log(`child process exited with code ${code}`); - * }); - * ``` - * - * By default, pipes for `stdin`, `stdout`, and `stderr` are established between - * the parent Node.js process and the spawned subprocess. These pipes have - * limited (and platform-specific) capacity. If the subprocess writes to - * stdout in excess of that limit without the output being captured, the - * subprocess blocks waiting for the pipe buffer to accept more data. This is - * identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }` option if the output will not be consumed. - * - * The command lookup is performed using the `options.env.PATH` environment - * variable if `env` is in the `options` object. Otherwise, `process.env.PATH` is - * used. If `options.env` is set without `PATH`, lookup on Unix is performed - * on a default search path search of `/usr/bin:/bin` (see your operating system's - * manual for execvpe/execvp), on Windows the current processes environment - * variable `PATH` is used. - * - * On Windows, environment variables are case-insensitive. Node.js - * lexicographically sorts the `env` keys and uses the first one that - * case-insensitively matches. Only first (in lexicographic order) entry will be - * passed to the subprocess. This might lead to issues on Windows when passing - * objects to the `env` option that have multiple variants of the same key, such as `PATH` and `Path`. - * - * The {@link spawn} method spawns the child process asynchronously, - * without blocking the Node.js event loop. The {@link spawnSync} function provides equivalent functionality in a synchronous manner that blocks - * the event loop until the spawned process either exits or is terminated. - * - * For convenience, the `node:child_process` module provides a handful of - * synchronous and asynchronous alternatives to {@link spawn} and {@link spawnSync}. Each of these alternatives are implemented on - * top of {@link spawn} or {@link spawnSync}. - * - * * {@link exec}: spawns a shell and runs a command within that - * shell, passing the `stdout` and `stderr` to a callback function when - * complete. - * * {@link execFile}: similar to {@link exec} except - * that it spawns the command directly without first spawning a shell by - * default. - * * {@link fork}: spawns a new Node.js process and invokes a - * specified module with an IPC communication channel established that allows - * sending messages between parent and child. - * * {@link execSync}: a synchronous version of {@link exec} that will block the Node.js event loop. - * * {@link execFileSync}: a synchronous version of {@link execFile} that will block the Node.js event loop. - * - * For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however, - * the synchronous methods can have significant impact on performance due to - * stalling the event loop while spawned processes complete. - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/child_process.js) - */ -declare module "child_process" { - import { NonSharedBuffer } from "node:buffer"; - import { Abortable, EventEmitter } from "node:events"; - import * as dgram from "node:dgram"; - import * as net from "node:net"; - import { Readable, Stream, Writable } from "node:stream"; - import { URL } from "node:url"; - type Serializable = string | object | number | boolean | bigint; - type SendHandle = net.Socket | net.Server | dgram.Socket | undefined; - /** - * Instances of the `ChildProcess` represent spawned child processes. - * - * Instances of `ChildProcess` are not intended to be created directly. Rather, - * use the {@link spawn}, {@link exec},{@link execFile}, or {@link fork} methods to create - * instances of `ChildProcess`. - * @since v2.2.0 - */ - class ChildProcess extends EventEmitter { - /** - * A `Writable Stream` that represents the child process's `stdin`. - * - * If a child process waits to read all of its input, the child will not continue - * until this stream has been closed via `end()`. - * - * If the child was spawned with `stdio[0]` set to anything other than `'pipe'`, - * then this will be `null`. - * - * `subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will - * refer to the same value. - * - * The `subprocess.stdin` property can be `null` or `undefined` if the child process could not be successfully spawned. - * @since v0.1.90 - */ - stdin: Writable | null; - /** - * A `Readable Stream` that represents the child process's `stdout`. - * - * If the child was spawned with `stdio[1]` set to anything other than `'pipe'`, - * then this will be `null`. - * - * `subprocess.stdout` is an alias for `subprocess.stdio[1]`. Both properties will - * refer to the same value. - * - * ```js - * import { spawn } from 'node:child_process'; - * - * const subprocess = spawn('ls'); - * - * subprocess.stdout.on('data', (data) => { - * console.log(`Received chunk ${data}`); - * }); - * ``` - * - * The `subprocess.stdout` property can be `null` or `undefined` if the child process could not be successfully spawned. - * @since v0.1.90 - */ - stdout: Readable | null; - /** - * A `Readable Stream` that represents the child process's `stderr`. - * - * If the child was spawned with `stdio[2]` set to anything other than `'pipe'`, - * then this will be `null`. - * - * `subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will - * refer to the same value. - * - * The `subprocess.stderr` property can be `null` or `undefined` if the child process could not be successfully spawned. - * @since v0.1.90 - */ - stderr: Readable | null; - /** - * The `subprocess.channel` property is a reference to the child's IPC channel. If - * no IPC channel exists, this property is `undefined`. - * @since v7.1.0 - */ - readonly channel?: Control | null; - /** - * A sparse array of pipes to the child process, corresponding with positions in - * the `stdio` option passed to {@link spawn} that have been set - * to the value `'pipe'`. `subprocess.stdio[0]`, `subprocess.stdio[1]`, and `subprocess.stdio[2]` are also available as `subprocess.stdin`, `subprocess.stdout`, and `subprocess.stderr`, - * respectively. - * - * In the following example, only the child's fd `1` (stdout) is configured as a - * pipe, so only the parent's `subprocess.stdio[1]` is a stream, all other values - * in the array are `null`. - * - * ```js - * import assert from 'node:assert'; - * import fs from 'node:fs'; - * import child_process from 'node:child_process'; - * - * const subprocess = child_process.spawn('ls', { - * stdio: [ - * 0, // Use parent's stdin for child. - * 'pipe', // Pipe child's stdout to parent. - * fs.openSync('err.out', 'w'), // Direct child's stderr to a file. - * ], - * }); - * - * assert.strictEqual(subprocess.stdio[0], null); - * assert.strictEqual(subprocess.stdio[0], subprocess.stdin); - * - * assert(subprocess.stdout); - * assert.strictEqual(subprocess.stdio[1], subprocess.stdout); - * - * assert.strictEqual(subprocess.stdio[2], null); - * assert.strictEqual(subprocess.stdio[2], subprocess.stderr); - * ``` - * - * The `subprocess.stdio` property can be `undefined` if the child process could - * not be successfully spawned. - * @since v0.7.10 - */ - readonly stdio: [ - Writable | null, - // stdin - Readable | null, - // stdout - Readable | null, - // stderr - Readable | Writable | null | undefined, - // extra - Readable | Writable | null | undefined, // extra - ]; - /** - * The `subprocess.killed` property indicates whether the child process - * successfully received a signal from `subprocess.kill()`. The `killed` property - * does not indicate that the child process has been terminated. - * @since v0.5.10 - */ - readonly killed: boolean; - /** - * Returns the process identifier (PID) of the child process. If the child process - * fails to spawn due to errors, then the value is `undefined` and `error` is - * emitted. - * - * ```js - * import { spawn } from 'node:child_process'; - * const grep = spawn('grep', ['ssh']); - * - * console.log(`Spawned child pid: ${grep.pid}`); - * grep.stdin.end(); - * ``` - * @since v0.1.90 - */ - readonly pid?: number | undefined; - /** - * The `subprocess.connected` property indicates whether it is still possible to - * send and receive messages from a child process. When `subprocess.connected` is `false`, it is no longer possible to send or receive messages. - * @since v0.7.2 - */ - readonly connected: boolean; - /** - * The `subprocess.exitCode` property indicates the exit code of the child process. - * If the child process is still running, the field will be `null`. - */ - readonly exitCode: number | null; - /** - * The `subprocess.signalCode` property indicates the signal received by - * the child process if any, else `null`. - */ - readonly signalCode: NodeJS.Signals | null; - /** - * The `subprocess.spawnargs` property represents the full list of command-line - * arguments the child process was launched with. - */ - readonly spawnargs: string[]; - /** - * The `subprocess.spawnfile` property indicates the executable file name of - * the child process that is launched. - * - * For {@link fork}, its value will be equal to `process.execPath`. - * For {@link spawn}, its value will be the name of - * the executable file. - * For {@link exec}, its value will be the name of the shell - * in which the child process is launched. - */ - readonly spawnfile: string; - /** - * The `subprocess.kill()` method sends a signal to the child process. If no - * argument is given, the process will be sent the `'SIGTERM'` signal. See [`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html) for a list of available signals. This function - * returns `true` if [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) succeeds, and `false` otherwise. - * - * ```js - * import { spawn } from 'node:child_process'; - * const grep = spawn('grep', ['ssh']); - * - * grep.on('close', (code, signal) => { - * console.log( - * `child process terminated due to receipt of signal ${signal}`); - * }); - * - * // Send SIGHUP to process. - * grep.kill('SIGHUP'); - * ``` - * - * The `ChildProcess` object may emit an `'error'` event if the signal - * cannot be delivered. Sending a signal to a child process that has already exited - * is not an error but may have unforeseen consequences. Specifically, if the - * process identifier (PID) has been reassigned to another process, the signal will - * be delivered to that process instead which can have unexpected results. - * - * While the function is called `kill`, the signal delivered to the child process - * may not actually terminate the process. - * - * See [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for reference. - * - * On Windows, where POSIX signals do not exist, the `signal` argument will be - * ignored, and the process will be killed forcefully and abruptly (similar to `'SIGKILL'`). - * See `Signal Events` for more details. - * - * On Linux, child processes of child processes will not be terminated - * when attempting to kill their parent. This is likely to happen when running a - * new process in a shell or with the use of the `shell` option of `ChildProcess`: - * - * ```js - * 'use strict'; - * import { spawn } from 'node:child_process'; - * - * const subprocess = spawn( - * 'sh', - * [ - * '-c', - * `node -e "setInterval(() => { - * console.log(process.pid, 'is alive') - * }, 500);"`, - * ], { - * stdio: ['inherit', 'inherit', 'inherit'], - * }, - * ); - * - * setTimeout(() => { - * subprocess.kill(); // Does not terminate the Node.js process in the shell. - * }, 2000); - * ``` - * @since v0.1.90 - */ - kill(signal?: NodeJS.Signals | number): boolean; - /** - * Calls {@link ChildProcess.kill} with `'SIGTERM'`. - * @since v20.5.0 - */ - [Symbol.dispose](): void; - /** - * When an IPC channel has been established between the parent and child ( - * i.e. when using {@link fork}), the `subprocess.send()` method can - * be used to send messages to the child process. When the child process is a - * Node.js instance, these messages can be received via the `'message'` event. - * - * The message goes through serialization and parsing. The resulting - * message might not be the same as what is originally sent. - * - * For example, in the parent script: - * - * ```js - * import cp from 'node:child_process'; - * const n = cp.fork(`${__dirname}/sub.js`); - * - * n.on('message', (m) => { - * console.log('PARENT got message:', m); - * }); - * - * // Causes the child to print: CHILD got message: { hello: 'world' } - * n.send({ hello: 'world' }); - * ``` - * - * And then the child script, `'sub.js'` might look like this: - * - * ```js - * process.on('message', (m) => { - * console.log('CHILD got message:', m); - * }); - * - * // Causes the parent to print: PARENT got message: { foo: 'bar', baz: null } - * process.send({ foo: 'bar', baz: NaN }); - * ``` - * - * Child Node.js processes will have a `process.send()` method of their own - * that allows the child to send messages back to the parent. - * - * There is a special case when sending a `{cmd: 'NODE_foo'}` message. Messages - * containing a `NODE_` prefix in the `cmd` property are reserved for use within - * Node.js core and will not be emitted in the child's `'message'` event. Rather, such messages are emitted using the `'internalMessage'` event and are consumed internally by Node.js. - * Applications should avoid using such messages or listening for `'internalMessage'` events as it is subject to change without notice. - * - * The optional `sendHandle` argument that may be passed to `subprocess.send()` is - * for passing a TCP server or socket object to the child process. The child will - * receive the object as the second argument passed to the callback function - * registered on the `'message'` event. Any data that is received and buffered in - * the socket will not be sent to the child. Sending IPC sockets is not supported on Windows. - * - * The optional `callback` is a function that is invoked after the message is - * sent but before the child may have received it. The function is called with a - * single argument: `null` on success, or an `Error` object on failure. - * - * If no `callback` function is provided and the message cannot be sent, an `'error'` event will be emitted by the `ChildProcess` object. This can - * happen, for instance, when the child process has already exited. - * - * `subprocess.send()` will return `false` if the channel has closed or when the - * backlog of unsent messages exceeds a threshold that makes it unwise to send - * more. Otherwise, the method returns `true`. The `callback` function can be - * used to implement flow control. - * - * #### Example: sending a server object - * - * The `sendHandle` argument can be used, for instance, to pass the handle of - * a TCP server object to the child process as illustrated in the example below: - * - * ```js - * import child_process from 'node:child_process'; - * const subprocess = child_process.fork('subprocess.js'); - * - * // Open up the server object and send the handle. - * import net from 'node:net'; - * const server = net.createServer(); - * server.on('connection', (socket) => { - * socket.end('handled by parent'); - * }); - * server.listen(1337, () => { - * subprocess.send('server', server); - * }); - * ``` - * - * The child would then receive the server object as: - * - * ```js - * process.on('message', (m, server) => { - * if (m === 'server') { - * server.on('connection', (socket) => { - * socket.end('handled by child'); - * }); - * } - * }); - * ``` - * - * Once the server is now shared between the parent and child, some connections - * can be handled by the parent and some by the child. - * - * While the example above uses a server created using the `node:net` module, `node:dgram` module servers use exactly the same workflow with the exceptions of - * listening on a `'message'` event instead of `'connection'` and using `server.bind()` instead of `server.listen()`. This is, however, only - * supported on Unix platforms. - * - * #### Example: sending a socket object - * - * Similarly, the `sendHandler` argument can be used to pass the handle of a - * socket to the child process. The example below spawns two children that each - * handle connections with "normal" or "special" priority: - * - * ```js - * import { fork } from 'node:child_process'; - * const normal = fork('subprocess.js', ['normal']); - * const special = fork('subprocess.js', ['special']); - * - * // Open up the server and send sockets to child. Use pauseOnConnect to prevent - * // the sockets from being read before they are sent to the child process. - * import net from 'node:net'; - * const server = net.createServer({ pauseOnConnect: true }); - * server.on('connection', (socket) => { - * - * // If this is special priority... - * if (socket.remoteAddress === '74.125.127.100') { - * special.send('socket', socket); - * return; - * } - * // This is normal priority. - * normal.send('socket', socket); - * }); - * server.listen(1337); - * ``` - * - * The `subprocess.js` would receive the socket handle as the second argument - * passed to the event callback function: - * - * ```js - * process.on('message', (m, socket) => { - * if (m === 'socket') { - * if (socket) { - * // Check that the client socket exists. - * // It is possible for the socket to be closed between the time it is - * // sent and the time it is received in the child process. - * socket.end(`Request handled with ${process.argv[2]} priority`); - * } - * } - * }); - * ``` - * - * Do not use `.maxConnections` on a socket that has been passed to a subprocess. - * The parent cannot track when the socket is destroyed. - * - * Any `'message'` handlers in the subprocess should verify that `socket` exists, - * as the connection may have been closed during the time it takes to send the - * connection to the child. - * @since v0.5.9 - * @param sendHandle `undefined`, or a [`net.Socket`](https://nodejs.org/docs/latest-v20.x/api/net.html#class-netsocket), [`net.Server`](https://nodejs.org/docs/latest-v20.x/api/net.html#class-netserver), or [`dgram.Socket`](https://nodejs.org/docs/latest-v20.x/api/dgram.html#class-dgramsocket) object. - * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties: - */ - send(message: Serializable, callback?: (error: Error | null) => void): boolean; - send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean; - send( - message: Serializable, - sendHandle?: SendHandle, - options?: MessageOptions, - callback?: (error: Error | null) => void, - ): boolean; - /** - * Closes the IPC channel between parent and child, allowing the child to exit - * gracefully once there are no other connections keeping it alive. After calling - * this method the `subprocess.connected` and `process.connected` properties in - * both the parent and child (respectively) will be set to `false`, and it will be - * no longer possible to pass messages between the processes. - * - * The `'disconnect'` event will be emitted when there are no messages in the - * process of being received. This will most often be triggered immediately after - * calling `subprocess.disconnect()`. - * - * When the child process is a Node.js instance (e.g. spawned using {@link fork}), the `process.disconnect()` method can be invoked - * within the child process to close the IPC channel as well. - * @since v0.7.2 - */ - disconnect(): void; - /** - * By default, the parent will wait for the detached child to exit. To prevent the - * parent from waiting for a given `subprocess` to exit, use the `subprocess.unref()` method. Doing so will cause the parent's event loop to not - * include the child in its reference count, allowing the parent to exit - * independently of the child, unless there is an established IPC channel between - * the child and the parent. - * - * ```js - * import { spawn } from 'node:child_process'; - * - * const subprocess = spawn(process.argv[0], ['child_program.js'], { - * detached: true, - * stdio: 'ignore', - * }); - * - * subprocess.unref(); - * ``` - * @since v0.7.10 - */ - unref(): void; - /** - * Calling `subprocess.ref()` after making a call to `subprocess.unref()` will - * restore the removed reference count for the child process, forcing the parent - * to wait for the child to exit before exiting itself. - * - * ```js - * import { spawn } from 'node:child_process'; - * - * const subprocess = spawn(process.argv[0], ['child_program.js'], { - * detached: true, - * stdio: 'ignore', - * }); - * - * subprocess.unref(); - * subprocess.ref(); - * ``` - * @since v0.7.10 - */ - ref(): void; - /** - * events.EventEmitter - * 1. close - * 2. disconnect - * 3. error - * 4. exit - * 5. message - * 6. spawn - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - addListener(event: "disconnect", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - addListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this; - addListener(event: "spawn", listener: () => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "close", code: number | null, signal: NodeJS.Signals | null): boolean; - emit(event: "disconnect"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "exit", code: number | null, signal: NodeJS.Signals | null): boolean; - emit(event: "message", message: Serializable, sendHandle: SendHandle): boolean; - emit(event: "spawn", listener: () => void): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - on(event: "disconnect", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - on(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this; - on(event: "spawn", listener: () => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - once(event: "disconnect", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - once(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this; - once(event: "spawn", listener: () => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - prependListener(event: "disconnect", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this; - prependListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this; - prependListener(event: "spawn", listener: () => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener( - event: "close", - listener: (code: number | null, signal: NodeJS.Signals | null) => void, - ): this; - prependOnceListener(event: "disconnect", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener( - event: "exit", - listener: (code: number | null, signal: NodeJS.Signals | null) => void, - ): this; - prependOnceListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this; - prependOnceListener(event: "spawn", listener: () => void): this; - } - // return this object when stdio option is undefined or not specified - interface ChildProcessWithoutNullStreams extends ChildProcess { - stdin: Writable; - stdout: Readable; - stderr: Readable; - readonly stdio: [ - Writable, - Readable, - Readable, - // stderr - Readable | Writable | null | undefined, - // extra, no modification - Readable | Writable | null | undefined, // extra, no modification - ]; - } - // return this object when stdio option is a tuple of 3 - interface ChildProcessByStdio - extends ChildProcess - { - stdin: I; - stdout: O; - stderr: E; - readonly stdio: [ - I, - O, - E, - Readable | Writable | null | undefined, - // extra, no modification - Readable | Writable | null | undefined, // extra, no modification - ]; - } - interface Control extends EventEmitter { - ref(): void; - unref(): void; - } - interface MessageOptions { - keepOpen?: boolean | undefined; - } - type IOType = "overlapped" | "pipe" | "ignore" | "inherit"; - type StdioOptions = IOType | Array; - type SerializationType = "json" | "advanced"; - interface MessagingOptions extends Abortable { - /** - * Specify the kind of serialization used for sending messages between processes. - * @default 'json' - */ - serialization?: SerializationType | undefined; - /** - * The signal value to be used when the spawned process will be killed by the abort signal. - * @default 'SIGTERM' - */ - killSignal?: NodeJS.Signals | number | undefined; - /** - * In milliseconds the maximum amount of time the process is allowed to run. - */ - timeout?: number | undefined; - } - interface ProcessEnvOptions { - uid?: number | undefined; - gid?: number | undefined; - cwd?: string | URL | undefined; - env?: NodeJS.ProcessEnv | undefined; - } - interface CommonOptions extends ProcessEnvOptions { - /** - * @default false - */ - windowsHide?: boolean | undefined; - /** - * @default 0 - */ - timeout?: number | undefined; - } - interface CommonSpawnOptions extends CommonOptions, MessagingOptions, Abortable { - argv0?: string | undefined; - /** - * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings. - * If passed as an array, the first element is used for `stdin`, the second for - * `stdout`, and the third for `stderr`. A fourth element can be used to - * specify the `stdio` behavior beyond the standard streams. See - * {@link ChildProcess.stdio} for more information. - * - * @default 'pipe' - */ - stdio?: StdioOptions | undefined; - shell?: boolean | string | undefined; - windowsVerbatimArguments?: boolean | undefined; - } - interface SpawnOptions extends CommonSpawnOptions { - detached?: boolean | undefined; - } - interface SpawnOptionsWithoutStdio extends SpawnOptions { - stdio?: StdioPipeNamed | StdioPipe[] | undefined; - } - type StdioNull = "inherit" | "ignore" | Stream; - type StdioPipeNamed = "pipe" | "overlapped"; - type StdioPipe = undefined | null | StdioPipeNamed; - interface SpawnOptionsWithStdioTuple< - Stdin extends StdioNull | StdioPipe, - Stdout extends StdioNull | StdioPipe, - Stderr extends StdioNull | StdioPipe, - > extends SpawnOptions { - stdio: [Stdin, Stdout, Stderr]; - } - /** - * The `child_process.spawn()` method spawns a new process using the given `command`, with command-line arguments in `args`. If omitted, `args` defaults - * to an empty array. - * - * **If the `shell` option is enabled, do not pass unsanitized user input to this** - * **function. Any input containing shell metacharacters may be used to trigger** - * **arbitrary command execution.** - * - * A third argument may be used to specify additional options, with these defaults: - * - * ```js - * const defaults = { - * cwd: undefined, - * env: process.env, - * }; - * ``` - * - * Use `cwd` to specify the working directory from which the process is spawned. - * If not given, the default is to inherit the current working directory. If given, - * but the path does not exist, the child process emits an `ENOENT` error - * and exits immediately. `ENOENT` is also emitted when the command - * does not exist. - * - * Use `env` to specify environment variables that will be visible to the new - * process, the default is `process.env`. - * - * `undefined` values in `env` will be ignored. - * - * Example of running `ls -lh /usr`, capturing `stdout`, `stderr`, and the - * exit code: - * - * ```js - * import { spawn } from 'node:child_process'; - * const ls = spawn('ls', ['-lh', '/usr']); - * - * ls.stdout.on('data', (data) => { - * console.log(`stdout: ${data}`); - * }); - * - * ls.stderr.on('data', (data) => { - * console.error(`stderr: ${data}`); - * }); - * - * ls.on('close', (code) => { - * console.log(`child process exited with code ${code}`); - * }); - * ``` - * - * Example: A very elaborate way to run `ps ax | grep ssh` - * - * ```js - * import { spawn } from 'node:child_process'; - * const ps = spawn('ps', ['ax']); - * const grep = spawn('grep', ['ssh']); - * - * ps.stdout.on('data', (data) => { - * grep.stdin.write(data); - * }); - * - * ps.stderr.on('data', (data) => { - * console.error(`ps stderr: ${data}`); - * }); - * - * ps.on('close', (code) => { - * if (code !== 0) { - * console.log(`ps process exited with code ${code}`); - * } - * grep.stdin.end(); - * }); - * - * grep.stdout.on('data', (data) => { - * console.log(data.toString()); - * }); - * - * grep.stderr.on('data', (data) => { - * console.error(`grep stderr: ${data}`); - * }); - * - * grep.on('close', (code) => { - * if (code !== 0) { - * console.log(`grep process exited with code ${code}`); - * } - * }); - * ``` - * - * Example of checking for failed `spawn`: - * - * ```js - * import { spawn } from 'node:child_process'; - * const subprocess = spawn('bad_command'); - * - * subprocess.on('error', (err) => { - * console.error('Failed to start subprocess.'); - * }); - * ``` - * - * Certain platforms (macOS, Linux) will use the value of `argv[0]` for the process - * title while others (Windows, SunOS) will use `command`. - * - * Node.js overwrites `argv[0]` with `process.execPath` on startup, so `process.argv[0]` in a Node.js child process will not match the `argv0` parameter passed to `spawn` from the parent. Retrieve - * it with the `process.argv0` property instead. - * - * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except - * the error passed to the callback will be an `AbortError`: - * - * ```js - * import { spawn } from 'node:child_process'; - * const controller = new AbortController(); - * const { signal } = controller; - * const grep = spawn('grep', ['ssh'], { signal }); - * grep.on('error', (err) => { - * // This will be called with err being an AbortError if the controller aborts - * }); - * controller.abort(); // Stops the child process - * ``` - * @since v0.1.90 - * @param command The command to run. - * @param args List of string arguments. - */ - function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn(command: string, options: SpawnOptions): ChildProcess; - // overloads of spawn with 'args' - function spawn( - command: string, - args?: readonly string[], - options?: SpawnOptionsWithoutStdio, - ): ChildProcessWithoutNullStreams; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn( - command: string, - args: readonly string[], - options: SpawnOptionsWithStdioTuple, - ): ChildProcessByStdio; - function spawn(command: string, args: readonly string[], options: SpawnOptions): ChildProcess; - interface ExecOptions extends CommonOptions { - shell?: string | undefined; - signal?: AbortSignal | undefined; - maxBuffer?: number | undefined; - killSignal?: NodeJS.Signals | number | undefined; - encoding?: string | null | undefined; - } - interface ExecOptionsWithStringEncoding extends ExecOptions { - encoding?: BufferEncoding | undefined; - } - interface ExecOptionsWithBufferEncoding extends ExecOptions { - encoding: "buffer" | null; // specify `null`. - } - // TODO: Just Plain Wrong™ (see also nodejs/node#57392) - interface ExecException extends Error { - cmd?: string; - killed?: boolean; - code?: number; - signal?: NodeJS.Signals; - stdout?: string; - stderr?: string; - } - /** - * Spawns a shell then executes the `command` within that shell, buffering any - * generated output. The `command` string passed to the exec function is processed - * directly by the shell and special characters (vary based on [shell](https://en.wikipedia.org/wiki/List_of_command-line_interpreters)) - * need to be dealt with accordingly: - * - * ```js - * import { exec } from 'node:child_process'; - * - * exec('"/path/to/test file/test.sh" arg1 arg2'); - * // Double quotes are used so that the space in the path is not interpreted as - * // a delimiter of multiple arguments. - * - * exec('echo "The \\$HOME variable is $HOME"'); - * // The $HOME variable is escaped in the first instance, but not in the second. - * ``` - * - * **Never pass unsanitized user input to this function. Any input containing shell** - * **metacharacters may be used to trigger arbitrary command execution.** - * - * If a `callback` function is provided, it is called with the arguments `(error, stdout, stderr)`. On success, `error` will be `null`. On error, `error` will be an instance of `Error`. The - * `error.code` property will be - * the exit code of the process. By convention, any exit code other than `0` indicates an error. `error.signal` will be the signal that terminated the - * process. - * - * The `stdout` and `stderr` arguments passed to the callback will contain the - * stdout and stderr output of the child process. By default, Node.js will decode - * the output as UTF-8 and pass strings to the callback. The `encoding` option - * can be used to specify the character encoding used to decode the stdout and - * stderr output. If `encoding` is `'buffer'`, or an unrecognized character - * encoding, `Buffer` objects will be passed to the callback instead. - * - * ```js - * import { exec } from 'node:child_process'; - * exec('cat *.js missing_file | wc -l', (error, stdout, stderr) => { - * if (error) { - * console.error(`exec error: ${error}`); - * return; - * } - * console.log(`stdout: ${stdout}`); - * console.error(`stderr: ${stderr}`); - * }); - * ``` - * - * If `timeout` is greater than `0`, the parent will send the signal - * identified by the `killSignal` property (the default is `'SIGTERM'`) if the - * child runs longer than `timeout` milliseconds. - * - * Unlike the [`exec(3)`](http://man7.org/linux/man-pages/man3/exec.3.html) POSIX system call, `child_process.exec()` does not replace - * the existing process and uses a shell to execute the command. - * - * If this method is invoked as its `util.promisify()` ed version, it returns - * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned `ChildProcess` instance is attached to the `Promise` as a `child` property. In - * case of an error (including any error resulting in an exit code other than 0), a - * rejected promise is returned, with the same `error` object given in the - * callback, but with two additional properties `stdout` and `stderr`. - * - * ```js - * import util from 'node:util'; - * import child_process from 'node:child_process'; - * const exec = util.promisify(child_process.exec); - * - * async function lsExample() { - * const { stdout, stderr } = await exec('ls'); - * console.log('stdout:', stdout); - * console.error('stderr:', stderr); - * } - * lsExample(); - * ``` - * - * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except - * the error passed to the callback will be an `AbortError`: - * - * ```js - * import { exec } from 'node:child_process'; - * const controller = new AbortController(); - * const { signal } = controller; - * const child = exec('grep ssh', { signal }, (error) => { - * console.error(error); // an AbortError - * }); - * controller.abort(); - * ``` - * @since v0.1.90 - * @param command The command to run, with space-separated arguments. - * @param callback called with the output when process terminates. - */ - function exec( - command: string, - callback?: (error: ExecException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. - function exec( - command: string, - options: ExecOptionsWithBufferEncoding, - callback?: (error: ExecException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void, - ): ChildProcess; - // `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`. - function exec( - command: string, - options: ExecOptionsWithStringEncoding, - callback?: (error: ExecException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - // fallback if nothing else matches. Worst case is always `string | Buffer`. - function exec( - command: string, - options: ExecOptions | undefined | null, - callback?: ( - error: ExecException | null, - stdout: string | NonSharedBuffer, - stderr: string | NonSharedBuffer, - ) => void, - ): ChildProcess; - interface PromiseWithChild extends Promise { - child: ChildProcess; - } - namespace exec { - function __promisify__(command: string): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - command: string, - options: ExecOptionsWithBufferEncoding, - ): PromiseWithChild<{ - stdout: NonSharedBuffer; - stderr: NonSharedBuffer; - }>; - function __promisify__( - command: string, - options: ExecOptionsWithStringEncoding, - ): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - command: string, - options: ExecOptions | undefined | null, - ): PromiseWithChild<{ - stdout: string | NonSharedBuffer; - stderr: string | NonSharedBuffer; - }>; - } - interface ExecFileOptions extends CommonOptions, Abortable { - maxBuffer?: number | undefined; - killSignal?: NodeJS.Signals | number | undefined; - windowsVerbatimArguments?: boolean | undefined; - shell?: boolean | string | undefined; - signal?: AbortSignal | undefined; - encoding?: string | null | undefined; - } - interface ExecFileOptionsWithStringEncoding extends ExecFileOptions { - encoding?: BufferEncoding | undefined; - } - interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions { - encoding: "buffer" | null; - } - /** @deprecated Use `ExecFileOptions` instead. */ - interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {} - // TODO: execFile exceptions can take many forms... this accurately describes none of them - type ExecFileException = - & Omit - & Omit - & { code?: string | number | null }; - /** - * The `child_process.execFile()` function is similar to {@link exec} except that it does not spawn a shell by default. Rather, the specified - * executable `file` is spawned directly as a new process making it slightly more - * efficient than {@link exec}. - * - * The same options as {@link exec} are supported. Since a shell is - * not spawned, behaviors such as I/O redirection and file globbing are not - * supported. - * - * ```js - * import { execFile } from 'node:child_process'; - * const child = execFile('node', ['--version'], (error, stdout, stderr) => { - * if (error) { - * throw error; - * } - * console.log(stdout); - * }); - * ``` - * - * The `stdout` and `stderr` arguments passed to the callback will contain the - * stdout and stderr output of the child process. By default, Node.js will decode - * the output as UTF-8 and pass strings to the callback. The `encoding` option - * can be used to specify the character encoding used to decode the stdout and - * stderr output. If `encoding` is `'buffer'`, or an unrecognized character - * encoding, `Buffer` objects will be passed to the callback instead. - * - * If this method is invoked as its `util.promisify()` ed version, it returns - * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned `ChildProcess` instance is attached to the `Promise` as a `child` property. In - * case of an error (including any error resulting in an exit code other than 0), a - * rejected promise is returned, with the same `error` object given in the - * callback, but with two additional properties `stdout` and `stderr`. - * - * ```js - * import util from 'node:util'; - * const execFile = util.promisify(require('node:child_process').execFile); - * async function getVersion() { - * const { stdout } = await execFile('node', ['--version']); - * console.log(stdout); - * } - * getVersion(); - * ``` - * - * **If the `shell` option is enabled, do not pass unsanitized user input to this** - * **function. Any input containing shell metacharacters may be used to trigger** - * **arbitrary command execution.** - * - * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except - * the error passed to the callback will be an `AbortError`: - * - * ```js - * import { execFile } from 'node:child_process'; - * const controller = new AbortController(); - * const { signal } = controller; - * const child = execFile('node', ['--version'], { signal }, (error) => { - * console.error(error); // an AbortError - * }); - * controller.abort(); - * ``` - * @since v0.1.91 - * @param file The name or path of the executable file to run. - * @param args List of string arguments. - * @param callback Called with the output when process terminates. - */ - // no `options` definitely means stdout/stderr are `string`. - function execFile( - file: string, - callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - function execFile( - file: string, - args: readonly string[] | undefined | null, - callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`. - function execFile( - file: string, - options: ExecFileOptionsWithBufferEncoding, - callback?: (error: ExecFileException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void, - ): ChildProcess; - function execFile( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptionsWithBufferEncoding, - callback?: (error: ExecFileException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void, - ): ChildProcess; - // `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`. - function execFile( - file: string, - options: ExecFileOptionsWithStringEncoding, - callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - function execFile( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptionsWithStringEncoding, - callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void, - ): ChildProcess; - // fallback if nothing else matches. Worst case is always `string | Buffer`. - function execFile( - file: string, - options: ExecFileOptions | undefined | null, - callback: - | (( - error: ExecFileException | null, - stdout: string | NonSharedBuffer, - stderr: string | NonSharedBuffer, - ) => void) - | undefined - | null, - ): ChildProcess; - function execFile( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptions | undefined | null, - callback: - | (( - error: ExecFileException | null, - stdout: string | NonSharedBuffer, - stderr: string | NonSharedBuffer, - ) => void) - | undefined - | null, - ): ChildProcess; - namespace execFile { - function __promisify__(file: string): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - file: string, - args: readonly string[] | undefined | null, - ): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - file: string, - options: ExecFileOptionsWithBufferEncoding, - ): PromiseWithChild<{ - stdout: NonSharedBuffer; - stderr: NonSharedBuffer; - }>; - function __promisify__( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptionsWithBufferEncoding, - ): PromiseWithChild<{ - stdout: NonSharedBuffer; - stderr: NonSharedBuffer; - }>; - function __promisify__( - file: string, - options: ExecFileOptionsWithStringEncoding, - ): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptionsWithStringEncoding, - ): PromiseWithChild<{ - stdout: string; - stderr: string; - }>; - function __promisify__( - file: string, - options: ExecFileOptions | undefined | null, - ): PromiseWithChild<{ - stdout: string | NonSharedBuffer; - stderr: string | NonSharedBuffer; - }>; - function __promisify__( - file: string, - args: readonly string[] | undefined | null, - options: ExecFileOptions | undefined | null, - ): PromiseWithChild<{ - stdout: string | NonSharedBuffer; - stderr: string | NonSharedBuffer; - }>; - } - interface ForkOptions extends ProcessEnvOptions, MessagingOptions, Abortable { - execPath?: string | undefined; - execArgv?: string[] | undefined; - silent?: boolean | undefined; - /** - * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings. - * If passed as an array, the first element is used for `stdin`, the second for - * `stdout`, and the third for `stderr`. A fourth element can be used to - * specify the `stdio` behavior beyond the standard streams. See - * {@link ChildProcess.stdio} for more information. - * - * @default 'pipe' - */ - stdio?: StdioOptions | undefined; - detached?: boolean | undefined; - windowsVerbatimArguments?: boolean | undefined; - } - /** - * The `child_process.fork()` method is a special case of {@link spawn} used specifically to spawn new Node.js processes. - * Like {@link spawn}, a `ChildProcess` object is returned. The - * returned `ChildProcess` will have an additional communication channel - * built-in that allows messages to be passed back and forth between the parent and - * child. See `subprocess.send()` for details. - * - * Keep in mind that spawned Node.js child processes are - * independent of the parent with exception of the IPC communication channel - * that is established between the two. Each process has its own memory, with - * their own V8 instances. Because of the additional resource allocations - * required, spawning a large number of child Node.js processes is not - * recommended. - * - * By default, `child_process.fork()` will spawn new Node.js instances using the `process.execPath` of the parent process. The `execPath` property in the `options` object allows for an alternative - * execution path to be used. - * - * Node.js processes launched with a custom `execPath` will communicate with the - * parent process using the file descriptor (fd) identified using the - * environment variable `NODE_CHANNEL_FD` on the child process. - * - * Unlike the [`fork(2)`](http://man7.org/linux/man-pages/man2/fork.2.html) POSIX system call, `child_process.fork()` does not clone the - * current process. - * - * The `shell` option available in {@link spawn} is not supported by `child_process.fork()` and will be ignored if set. - * - * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except - * the error passed to the callback will be an `AbortError`: - * - * ```js - * if (process.argv[2] === 'child') { - * setTimeout(() => { - * console.log(`Hello from ${process.argv[2]}!`); - * }, 1_000); - * } else { - * import { fork } from 'node:child_process'; - * const controller = new AbortController(); - * const { signal } = controller; - * const child = fork(__filename, ['child'], { signal }); - * child.on('error', (err) => { - * // This will be called with err being an AbortError if the controller aborts - * }); - * controller.abort(); // Stops the child process - * } - * ``` - * @since v0.5.0 - * @param modulePath The module to run in the child. - * @param args List of string arguments. - */ - function fork(modulePath: string | URL, options?: ForkOptions): ChildProcess; - function fork(modulePath: string | URL, args?: readonly string[], options?: ForkOptions): ChildProcess; - interface SpawnSyncOptions extends CommonSpawnOptions { - input?: string | NodeJS.ArrayBufferView | undefined; - maxBuffer?: number | undefined; - encoding?: BufferEncoding | "buffer" | null | undefined; - } - interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions { - encoding: BufferEncoding; - } - interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions { - encoding?: "buffer" | null | undefined; - } - interface SpawnSyncReturns { - pid: number; - output: Array; - stdout: T; - stderr: T; - status: number | null; - signal: NodeJS.Signals | null; - error?: Error; - } - /** - * The `child_process.spawnSync()` method is generally identical to {@link spawn} with the exception that the function will not return - * until the child process has fully closed. When a timeout has been encountered - * and `killSignal` is sent, the method won't return until the process has - * completely exited. If the process intercepts and handles the `SIGTERM` signal - * and doesn't exit, the parent process will wait until the child process has - * exited. - * - * **If the `shell` option is enabled, do not pass unsanitized user input to this** - * **function. Any input containing shell metacharacters may be used to trigger** - * **arbitrary command execution.** - * @since v0.11.12 - * @param command The command to run. - * @param args List of string arguments. - */ - function spawnSync(command: string): SpawnSyncReturns; - function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns; - function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns; - function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns; - function spawnSync(command: string, args: readonly string[]): SpawnSyncReturns; - function spawnSync( - command: string, - args: readonly string[], - options: SpawnSyncOptionsWithStringEncoding, - ): SpawnSyncReturns; - function spawnSync( - command: string, - args: readonly string[], - options: SpawnSyncOptionsWithBufferEncoding, - ): SpawnSyncReturns; - function spawnSync( - command: string, - args?: readonly string[], - options?: SpawnSyncOptions, - ): SpawnSyncReturns; - interface CommonExecOptions extends CommonOptions { - input?: string | NodeJS.ArrayBufferView | undefined; - /** - * Can be set to 'pipe', 'inherit, or 'ignore', or an array of these strings. - * If passed as an array, the first element is used for `stdin`, the second for - * `stdout`, and the third for `stderr`. A fourth element can be used to - * specify the `stdio` behavior beyond the standard streams. See - * {@link ChildProcess.stdio} for more information. - * - * @default 'pipe' - */ - stdio?: StdioOptions | undefined; - killSignal?: NodeJS.Signals | number | undefined; - maxBuffer?: number | undefined; - encoding?: BufferEncoding | "buffer" | null | undefined; - } - interface ExecSyncOptions extends CommonExecOptions { - shell?: string | undefined; - } - interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions { - encoding: BufferEncoding; - } - interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions { - encoding?: "buffer" | null | undefined; - } - /** - * The `child_process.execSync()` method is generally identical to {@link exec} with the exception that the method will not return - * until the child process has fully closed. When a timeout has been encountered - * and `killSignal` is sent, the method won't return until the process has - * completely exited. If the child process intercepts and handles the `SIGTERM` signal and doesn't exit, the parent process will wait until the child process - * has exited. - * - * If the process times out or has a non-zero exit code, this method will throw. - * The `Error` object will contain the entire result from {@link spawnSync}. - * - * **Never pass unsanitized user input to this function. Any input containing shell** - * **metacharacters may be used to trigger arbitrary command execution.** - * @since v0.11.12 - * @param command The command to run. - * @return The stdout from the command. - */ - function execSync(command: string): NonSharedBuffer; - function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string; - function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): NonSharedBuffer; - function execSync(command: string, options?: ExecSyncOptions): string | NonSharedBuffer; - interface ExecFileSyncOptions extends CommonExecOptions { - shell?: boolean | string | undefined; - } - interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions { - encoding: BufferEncoding; - } - interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions { - encoding?: "buffer" | null | undefined; // specify `null`. - } - /** - * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not - * return until the child process has fully closed. When a timeout has been - * encountered and `killSignal` is sent, the method won't return until the process - * has completely exited. - * - * If the child process intercepts and handles the `SIGTERM` signal and - * does not exit, the parent process will still wait until the child process has - * exited. - * - * If the process times out or has a non-zero exit code, this method will throw an `Error` that will include the full result of the underlying {@link spawnSync}. - * - * **If the `shell` option is enabled, do not pass unsanitized user input to this** - * **function. Any input containing shell metacharacters may be used to trigger** - * **arbitrary command execution.** - * @since v0.11.12 - * @param file The name or path of the executable file to run. - * @param args List of string arguments. - * @return The stdout from the command. - */ - function execFileSync(file: string): NonSharedBuffer; - function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string; - function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): NonSharedBuffer; - function execFileSync(file: string, options?: ExecFileSyncOptions): string | NonSharedBuffer; - function execFileSync(file: string, args: readonly string[]): NonSharedBuffer; - function execFileSync( - file: string, - args: readonly string[], - options: ExecFileSyncOptionsWithStringEncoding, - ): string; - function execFileSync( - file: string, - args: readonly string[], - options: ExecFileSyncOptionsWithBufferEncoding, - ): NonSharedBuffer; - function execFileSync( - file: string, - args?: readonly string[], - options?: ExecFileSyncOptions, - ): string | NonSharedBuffer; -} -declare module "node:child_process" { - export * from "child_process"; -} diff --git a/node_modules/@types/node/cluster.d.ts b/node_modules/@types/node/cluster.d.ts deleted file mode 100644 index 42b21bf..0000000 --- a/node_modules/@types/node/cluster.d.ts +++ /dev/null @@ -1,577 +0,0 @@ -/** - * Clusters of Node.js processes can be used to run multiple instances of Node.js - * that can distribute workloads among their application threads. When process isolation - * is not needed, use the [`worker_threads`](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html) - * module instead, which allows running multiple application threads within a single Node.js instance. - * - * The cluster module allows easy creation of child processes that all share - * server ports. - * - * ```js - * import cluster from 'node:cluster'; - * import http from 'node:http'; - * import { availableParallelism } from 'node:os'; - * import process from 'node:process'; - * - * const numCPUs = availableParallelism(); - * - * if (cluster.isPrimary) { - * console.log(`Primary ${process.pid} is running`); - * - * // Fork workers. - * for (let i = 0; i < numCPUs; i++) { - * cluster.fork(); - * } - * - * cluster.on('exit', (worker, code, signal) => { - * console.log(`worker ${worker.process.pid} died`); - * }); - * } else { - * // Workers can share any TCP connection - * // In this case it is an HTTP server - * http.createServer((req, res) => { - * res.writeHead(200); - * res.end('hello world\n'); - * }).listen(8000); - * - * console.log(`Worker ${process.pid} started`); - * } - * ``` - * - * Running Node.js will now share port 8000 between the workers: - * - * ```console - * $ node server.js - * Primary 3596 is running - * Worker 4324 started - * Worker 4520 started - * Worker 6056 started - * Worker 5644 started - * ``` - * - * On Windows, it is not yet possible to set up a named pipe server in a worker. - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/cluster.js) - */ -declare module "cluster" { - import * as child from "node:child_process"; - import EventEmitter = require("node:events"); - import * as net from "node:net"; - type SerializationType = "json" | "advanced"; - export interface ClusterSettings { - /** - * List of string arguments passed to the Node.js executable. - * @default process.execArgv - */ - execArgv?: string[] | undefined; - /** - * File path to worker file. - * @default process.argv[1] - */ - exec?: string | undefined; - /** - * String arguments passed to worker. - * @default process.argv.slice(2) - */ - args?: readonly string[] | undefined; - /** - * Whether or not to send output to parent's stdio. - * @default false - */ - silent?: boolean | undefined; - /** - * Configures the stdio of forked processes. Because the cluster module relies on IPC to function, this configuration must - * contain an `'ipc'` entry. When this option is provided, it overrides `silent`. See [`child_prcess.spawn()`](https://nodejs.org/docs/latest-v20.x/api/child_process.html#child_processspawncommand-args-options)'s - * [`stdio`](https://nodejs.org/docs/latest-v20.x/api/child_process.html#optionsstdio). - */ - stdio?: any[] | undefined; - /** - * Sets the user identity of the process. (See [`setuid(2)`](https://man7.org/linux/man-pages/man2/setuid.2.html).) - */ - uid?: number | undefined; - /** - * Sets the group identity of the process. (See [`setgid(2)`](https://man7.org/linux/man-pages/man2/setgid.2.html).) - */ - gid?: number | undefined; - /** - * Sets inspector port of worker. This can be a number, or a function that takes no arguments and returns a number. - * By default each worker gets its own port, incremented from the primary's `process.debugPort`. - */ - inspectPort?: number | (() => number) | undefined; - /** - * Specify the kind of serialization used for sending messages between processes. Possible values are `'json'` and `'advanced'`. - * See [Advanced serialization for `child_process`](https://nodejs.org/docs/latest-v20.x/api/child_process.html#advanced-serialization) for more details. - * @default false - */ - serialization?: SerializationType | undefined; - /** - * Current working directory of the worker process. - * @default undefined (inherits from parent process) - */ - cwd?: string | undefined; - /** - * Hide the forked processes console window that would normally be created on Windows systems. - * @default false - */ - windowsHide?: boolean | undefined; - } - export interface Address { - address: string; - port: number; - /** - * The `addressType` is one of: - * - * * `4` (TCPv4) - * * `6` (TCPv6) - * * `-1` (Unix domain socket) - * * `'udp4'` or `'udp6'` (UDPv4 or UDPv6) - */ - addressType: 4 | 6 | -1 | "udp4" | "udp6"; - } - /** - * A `Worker` object contains all public information and method about a worker. - * In the primary it can be obtained using `cluster.workers`. In a worker - * it can be obtained using `cluster.worker`. - * @since v0.7.0 - */ - export class Worker extends EventEmitter { - /** - * Each new worker is given its own unique id, this id is stored in the `id`. - * - * While a worker is alive, this is the key that indexes it in `cluster.workers`. - * @since v0.8.0 - */ - id: number; - /** - * All workers are created using [`child_process.fork()`](https://nodejs.org/docs/latest-v20.x/api/child_process.html#child_processforkmodulepath-args-options), the returned object - * from this function is stored as `.process`. In a worker, the global `process` is stored. - * - * See: [Child Process module](https://nodejs.org/docs/latest-v20.x/api/child_process.html#child_processforkmodulepath-args-options). - * - * Workers will call `process.exit(0)` if the `'disconnect'` event occurs - * on `process` and `.exitedAfterDisconnect` is not `true`. This protects against - * accidental disconnection. - * @since v0.7.0 - */ - process: child.ChildProcess; - /** - * Send a message to a worker or primary, optionally with a handle. - * - * In the primary, this sends a message to a specific worker. It is identical to [`ChildProcess.send()`](https://nodejs.org/docs/latest-v20.x/api/child_process.html#subprocesssendmessage-sendhandle-options-callback). - * - * In a worker, this sends a message to the primary. It is identical to `process.send()`. - * - * This example will echo back all messages from the primary: - * - * ```js - * if (cluster.isPrimary) { - * const worker = cluster.fork(); - * worker.send('hi there'); - * - * } else if (cluster.isWorker) { - * process.on('message', (msg) => { - * process.send(msg); - * }); - * } - * ``` - * @since v0.7.0 - * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. - */ - send(message: child.Serializable, callback?: (error: Error | null) => void): boolean; - send( - message: child.Serializable, - sendHandle: child.SendHandle, - callback?: (error: Error | null) => void, - ): boolean; - send( - message: child.Serializable, - sendHandle: child.SendHandle, - options?: child.MessageOptions, - callback?: (error: Error | null) => void, - ): boolean; - /** - * This function will kill the worker. In the primary worker, it does this by - * disconnecting the `worker.process`, and once disconnected, killing with `signal`. In the worker, it does it by killing the process with `signal`. - * - * The `kill()` function kills the worker process without waiting for a graceful - * disconnect, it has the same behavior as `worker.process.kill()`. - * - * This method is aliased as `worker.destroy()` for backwards compatibility. - * - * In a worker, `process.kill()` exists, but it is not this function; - * it is [`kill()`](https://nodejs.org/docs/latest-v20.x/api/process.html#processkillpid-signal). - * @since v0.9.12 - * @param [signal='SIGTERM'] Name of the kill signal to send to the worker process. - */ - kill(signal?: string): void; - destroy(signal?: string): void; - /** - * In a worker, this function will close all servers, wait for the `'close'` event - * on those servers, and then disconnect the IPC channel. - * - * In the primary, an internal message is sent to the worker causing it to call `.disconnect()` on itself. - * - * Causes `.exitedAfterDisconnect` to be set. - * - * After a server is closed, it will no longer accept new connections, - * but connections may be accepted by any other listening worker. Existing - * connections will be allowed to close as usual. When no more connections exist, - * see `server.close()`, the IPC channel to the worker will close allowing it - * to die gracefully. - * - * The above applies _only_ to server connections, client connections are not - * automatically closed by workers, and disconnect does not wait for them to close - * before exiting. - * - * In a worker, `process.disconnect` exists, but it is not this function; - * it is `disconnect()`. - * - * Because long living server connections may block workers from disconnecting, it - * may be useful to send a message, so application specific actions may be taken to - * close them. It also may be useful to implement a timeout, killing a worker if - * the `'disconnect'` event has not been emitted after some time. - * - * ```js - * import net from 'node:net'; - * if (cluster.isPrimary) { - * const worker = cluster.fork(); - * let timeout; - * - * worker.on('listening', (address) => { - * worker.send('shutdown'); - * worker.disconnect(); - * timeout = setTimeout(() => { - * worker.kill(); - * }, 2000); - * }); - * - * worker.on('disconnect', () => { - * clearTimeout(timeout); - * }); - * - * } else if (cluster.isWorker) { - * const server = net.createServer((socket) => { - * // Connections never end - * }); - * - * server.listen(8000); - * - * process.on('message', (msg) => { - * if (msg === 'shutdown') { - * // Initiate graceful close of any connections to server - * } - * }); - * } - * ``` - * @since v0.7.7 - * @return A reference to `worker`. - */ - disconnect(): this; - /** - * This function returns `true` if the worker is connected to its primary via its - * IPC channel, `false` otherwise. A worker is connected to its primary after it - * has been created. It is disconnected after the `'disconnect'` event is emitted. - * @since v0.11.14 - */ - isConnected(): boolean; - /** - * This function returns `true` if the worker's process has terminated (either - * because of exiting or being signaled). Otherwise, it returns `false`. - * - * ```js - * import cluster from 'node:cluster'; - * import http from 'node:http'; - * import { availableParallelism } from 'node:os'; - * import process from 'node:process'; - * - * const numCPUs = availableParallelism(); - * - * if (cluster.isPrimary) { - * console.log(`Primary ${process.pid} is running`); - * - * // Fork workers. - * for (let i = 0; i < numCPUs; i++) { - * cluster.fork(); - * } - * - * cluster.on('fork', (worker) => { - * console.log('worker is dead:', worker.isDead()); - * }); - * - * cluster.on('exit', (worker, code, signal) => { - * console.log('worker is dead:', worker.isDead()); - * }); - * } else { - * // Workers can share any TCP connection. In this case, it is an HTTP server. - * http.createServer((req, res) => { - * res.writeHead(200); - * res.end(`Current process\n ${process.pid}`); - * process.kill(process.pid); - * }).listen(8000); - * } - * ``` - * @since v0.11.14 - */ - isDead(): boolean; - /** - * This property is `true` if the worker exited due to `.disconnect()`. - * If the worker exited any other way, it is `false`. If the - * worker has not exited, it is `undefined`. - * - * The boolean `worker.exitedAfterDisconnect` allows distinguishing between - * voluntary and accidental exit, the primary may choose not to respawn a worker - * based on this value. - * - * ```js - * cluster.on('exit', (worker, code, signal) => { - * if (worker.exitedAfterDisconnect === true) { - * console.log('Oh, it was just voluntary – no need to worry'); - * } - * }); - * - * // kill worker - * worker.kill(); - * ``` - * @since v6.0.0 - */ - exitedAfterDisconnect: boolean; - /** - * events.EventEmitter - * 1. disconnect - * 2. error - * 3. exit - * 4. listening - * 5. message - * 6. online - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "disconnect", listener: () => void): this; - addListener(event: "error", listener: (error: Error) => void): this; - addListener(event: "exit", listener: (code: number, signal: string) => void): this; - addListener(event: "listening", listener: (address: Address) => void): this; - addListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - addListener(event: "online", listener: () => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "disconnect"): boolean; - emit(event: "error", error: Error): boolean; - emit(event: "exit", code: number, signal: string): boolean; - emit(event: "listening", address: Address): boolean; - emit(event: "message", message: any, handle: net.Socket | net.Server): boolean; - emit(event: "online"): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "disconnect", listener: () => void): this; - on(event: "error", listener: (error: Error) => void): this; - on(event: "exit", listener: (code: number, signal: string) => void): this; - on(event: "listening", listener: (address: Address) => void): this; - on(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - on(event: "online", listener: () => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "disconnect", listener: () => void): this; - once(event: "error", listener: (error: Error) => void): this; - once(event: "exit", listener: (code: number, signal: string) => void): this; - once(event: "listening", listener: (address: Address) => void): this; - once(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - once(event: "online", listener: () => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "disconnect", listener: () => void): this; - prependListener(event: "error", listener: (error: Error) => void): this; - prependListener(event: "exit", listener: (code: number, signal: string) => void): this; - prependListener(event: "listening", listener: (address: Address) => void): this; - prependListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - prependListener(event: "online", listener: () => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "disconnect", listener: () => void): this; - prependOnceListener(event: "error", listener: (error: Error) => void): this; - prependOnceListener(event: "exit", listener: (code: number, signal: string) => void): this; - prependOnceListener(event: "listening", listener: (address: Address) => void): this; - prependOnceListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - prependOnceListener(event: "online", listener: () => void): this; - } - export interface Cluster extends EventEmitter { - disconnect(callback?: () => void): void; - /** - * Spawn a new worker process. - * - * This can only be called from the primary process. - * @param env Key/value pairs to add to worker process environment. - * @since v0.6.0 - */ - fork(env?: any): Worker; - /** @deprecated since v16.0.0 - use isPrimary. */ - readonly isMaster: boolean; - /** - * True if the process is a primary. This is determined by the `process.env.NODE_UNIQUE_ID`. If `process.env.NODE_UNIQUE_ID` - * is undefined, then `isPrimary` is `true`. - * @since v16.0.0 - */ - readonly isPrimary: boolean; - /** - * True if the process is not a primary (it is the negation of `cluster.isPrimary`). - * @since v0.6.0 - */ - readonly isWorker: boolean; - /** - * The scheduling policy, either `cluster.SCHED_RR` for round-robin or `cluster.SCHED_NONE` to leave it to the operating system. This is a - * global setting and effectively frozen once either the first worker is spawned, or [`.setupPrimary()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clustersetupprimarysettings) - * is called, whichever comes first. - * - * `SCHED_RR` is the default on all operating systems except Windows. Windows will change to `SCHED_RR` once libuv is able to effectively distribute - * IOCP handles without incurring a large performance hit. - * - * `cluster.schedulingPolicy` can also be set through the `NODE_CLUSTER_SCHED_POLICY` environment variable. Valid values are `'rr'` and `'none'`. - * @since v0.11.2 - */ - schedulingPolicy: number; - /** - * After calling [`.setupPrimary()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clustersetupprimarysettings) - * (or [`.fork()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clusterforkenv)) this settings object will contain - * the settings, including the default values. - * - * This object is not intended to be changed or set manually. - * @since v0.7.1 - */ - readonly settings: ClusterSettings; - /** @deprecated since v16.0.0 - use [`.setupPrimary()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clustersetupprimarysettings) instead. */ - setupMaster(settings?: ClusterSettings): void; - /** - * `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in `cluster.settings`. - * - * Any settings changes only affect future calls to [`.fork()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clusterforkenv) - * and have no effect on workers that are already running. - * - * The only attribute of a worker that cannot be set via `.setupPrimary()` is the `env` passed to - * [`.fork()`](https://nodejs.org/docs/latest-v20.x/api/cluster.html#clusterforkenv). - * - * The defaults above apply to the first call only; the defaults for later calls are the current values at the time of - * `cluster.setupPrimary()` is called. - * - * ```js - * import cluster from 'node:cluster'; - * - * cluster.setupPrimary({ - * exec: 'worker.js', - * args: ['--use', 'https'], - * silent: true, - * }); - * cluster.fork(); // https worker - * cluster.setupPrimary({ - * exec: 'worker.js', - * args: ['--use', 'http'], - * }); - * cluster.fork(); // http worker - * ``` - * - * This can only be called from the primary process. - * @since v16.0.0 - */ - setupPrimary(settings?: ClusterSettings): void; - /** - * A reference to the current worker object. Not available in the primary process. - * - * ```js - * import cluster from 'node:cluster'; - * - * if (cluster.isPrimary) { - * console.log('I am primary'); - * cluster.fork(); - * cluster.fork(); - * } else if (cluster.isWorker) { - * console.log(`I am worker #${cluster.worker.id}`); - * } - * ``` - * @since v0.7.0 - */ - readonly worker?: Worker; - /** - * A hash that stores the active worker objects, keyed by `id` field. This makes it easy to loop through all the workers. It is only available in the primary process. - * - * A worker is removed from `cluster.workers` after the worker has disconnected _and_ exited. The order between these two events cannot be determined in advance. However, it - * is guaranteed that the removal from the `cluster.workers` list happens before the last `'disconnect'` or `'exit'` event is emitted. - * - * ```js - * import cluster from 'node:cluster'; - * - * for (const worker of Object.values(cluster.workers)) { - * worker.send('big announcement to all workers'); - * } - * ``` - * @since v0.7.0 - */ - readonly workers?: NodeJS.Dict; - readonly SCHED_NONE: number; - readonly SCHED_RR: number; - /** - * events.EventEmitter - * 1. disconnect - * 2. exit - * 3. fork - * 4. listening - * 5. message - * 6. online - * 7. setup - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "disconnect", listener: (worker: Worker) => void): this; - addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - addListener(event: "fork", listener: (worker: Worker) => void): this; - addListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; - addListener( - event: "message", - listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void, - ): this; // the handle is a net.Socket or net.Server object, or undefined. - addListener(event: "online", listener: (worker: Worker) => void): this; - addListener(event: "setup", listener: (settings: ClusterSettings) => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "disconnect", worker: Worker): boolean; - emit(event: "exit", worker: Worker, code: number, signal: string): boolean; - emit(event: "fork", worker: Worker): boolean; - emit(event: "listening", worker: Worker, address: Address): boolean; - emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean; - emit(event: "online", worker: Worker): boolean; - emit(event: "setup", settings: ClusterSettings): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "disconnect", listener: (worker: Worker) => void): this; - on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - on(event: "fork", listener: (worker: Worker) => void): this; - on(event: "listening", listener: (worker: Worker, address: Address) => void): this; - on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - on(event: "online", listener: (worker: Worker) => void): this; - on(event: "setup", listener: (settings: ClusterSettings) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "disconnect", listener: (worker: Worker) => void): this; - once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - once(event: "fork", listener: (worker: Worker) => void): this; - once(event: "listening", listener: (worker: Worker, address: Address) => void): this; - once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined. - once(event: "online", listener: (worker: Worker) => void): this; - once(event: "setup", listener: (settings: ClusterSettings) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "disconnect", listener: (worker: Worker) => void): this; - prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - prependListener(event: "fork", listener: (worker: Worker) => void): this; - prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; - prependListener( - event: "message", - listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void, - ): this; - prependListener(event: "online", listener: (worker: Worker) => void): this; - prependListener(event: "setup", listener: (settings: ClusterSettings) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): this; - prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this; - prependOnceListener(event: "fork", listener: (worker: Worker) => void): this; - prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): this; - // the handle is a net.Socket or net.Server object, or undefined. - prependOnceListener( - event: "message", - listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void, - ): this; - prependOnceListener(event: "online", listener: (worker: Worker) => void): this; - prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): this; - } - const cluster: Cluster; - export default cluster; -} -declare module "node:cluster" { - export * from "cluster"; - export { default as default } from "cluster"; -} diff --git a/node_modules/@types/node/compatibility/disposable.d.ts b/node_modules/@types/node/compatibility/disposable.d.ts deleted file mode 100644 index 5fff612..0000000 --- a/node_modules/@types/node/compatibility/disposable.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -// Polyfills for the explicit resource management types added in TypeScript 5.2. -// TODO: remove once this package no longer supports TS 5.1, and replace with a -// to TypeScript's disposable library in index.d.ts. - -interface SymbolConstructor { - readonly dispose: unique symbol; - readonly asyncDispose: unique symbol; -} - -interface Disposable { - [Symbol.dispose](): void; -} - -interface AsyncDisposable { - [Symbol.asyncDispose](): PromiseLike; -} diff --git a/node_modules/@types/node/compatibility/index.d.ts b/node_modules/@types/node/compatibility/index.d.ts deleted file mode 100644 index 5c41e37..0000000 --- a/node_modules/@types/node/compatibility/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -// Declaration files in this directory contain types relating to TypeScript library features -// that are not included in all TypeScript versions supported by DefinitelyTyped, but -// which can be made backwards-compatible without needing `typesVersions`. -// If adding declarations to this directory, please specify which versions of TypeScript require them, -// so that they can be removed when no longer needed. - -/// -/// -/// diff --git a/node_modules/@types/node/compatibility/indexable.d.ts b/node_modules/@types/node/compatibility/indexable.d.ts deleted file mode 100644 index 262ba09..0000000 --- a/node_modules/@types/node/compatibility/indexable.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -// Polyfill for ES2022's .at() method on string/array prototypes, added to TypeScript in 4.6. - -interface RelativeIndexable { - at(index: number): T | undefined; -} - -interface String extends RelativeIndexable {} -interface Array extends RelativeIndexable {} -interface ReadonlyArray extends RelativeIndexable {} -interface Int8Array extends RelativeIndexable {} -interface Uint8Array extends RelativeIndexable {} -interface Uint8ClampedArray extends RelativeIndexable {} -interface Int16Array extends RelativeIndexable {} -interface Uint16Array extends RelativeIndexable {} -interface Int32Array extends RelativeIndexable {} -interface Uint32Array extends RelativeIndexable {} -interface Float32Array extends RelativeIndexable {} -interface Float64Array extends RelativeIndexable {} -interface BigInt64Array extends RelativeIndexable {} -interface BigUint64Array extends RelativeIndexable {} diff --git a/node_modules/@types/node/compatibility/iterators.d.ts b/node_modules/@types/node/compatibility/iterators.d.ts deleted file mode 100644 index 156e785..0000000 --- a/node_modules/@types/node/compatibility/iterators.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -// Backwards-compatible iterator interfaces, augmented with iterator helper methods by lib.esnext.iterator in TypeScript 5.6. -// The IterableIterator interface does not contain these methods, which creates assignability issues in places where IteratorObjects -// are expected (eg. DOM-compatible APIs) if lib.esnext.iterator is loaded. -// Also ensures that iterators returned by the Node API, which inherit from Iterator.prototype, correctly expose the iterator helper methods -// if lib.esnext.iterator is loaded. -// TODO: remove once this package no longer supports TS 5.5, and replace NodeJS.BuiltinIteratorReturn with BuiltinIteratorReturn. - -// Placeholders for TS <5.6 -interface IteratorObject {} -interface AsyncIteratorObject {} - -declare namespace NodeJS { - // Populate iterator methods for TS <5.6 - interface Iterator extends globalThis.Iterator {} - interface AsyncIterator extends globalThis.AsyncIterator {} - - // Polyfill for TS 5.6's instrinsic BuiltinIteratorReturn type, required for DOM-compatible iterators - type BuiltinIteratorReturn = ReturnType extends - globalThis.Iterator ? TReturn - : any; -} diff --git a/node_modules/@types/node/console.d.ts b/node_modules/@types/node/console.d.ts deleted file mode 100644 index 206e3fc..0000000 --- a/node_modules/@types/node/console.d.ts +++ /dev/null @@ -1,452 +0,0 @@ -/** - * The `node:console` module provides a simple debugging console that is similar to - * the JavaScript console mechanism provided by web browsers. - * - * The module exports two specific components: - * - * * A `Console` class with methods such as `console.log()`, `console.error()`, and `console.warn()` that can be used to write to any Node.js stream. - * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstdout) and - * [`process.stderr`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module. - * - * _**Warning**_: The global console object's methods are neither consistently - * synchronous like the browser APIs they resemble, nor are they consistently - * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v20.x/api/process.html#a-note-on-process-io) for - * more information. - * - * Example using the global `console`: - * - * ```js - * console.log('hello world'); - * // Prints: hello world, to stdout - * console.log('hello %s', 'world'); - * // Prints: hello world, to stdout - * console.error(new Error('Whoops, something bad happened')); - * // Prints error message and stack trace to stderr: - * // Error: Whoops, something bad happened - * // at [eval]:5:15 - * // at Script.runInThisContext (node:vm:132:18) - * // at Object.runInThisContext (node:vm:309:38) - * // at node:internal/process/execution:77:19 - * // at [eval]-wrapper:6:22 - * // at evalScript (node:internal/process/execution:76:60) - * // at node:internal/main/eval_string:23:3 - * - * const name = 'Will Robinson'; - * console.warn(`Danger ${name}! Danger!`); - * // Prints: Danger Will Robinson! Danger!, to stderr - * ``` - * - * Example using the `Console` class: - * - * ```js - * const out = getStreamSomehow(); - * const err = getStreamSomehow(); - * const myConsole = new console.Console(out, err); - * - * myConsole.log('hello world'); - * // Prints: hello world, to out - * myConsole.log('hello %s', 'world'); - * // Prints: hello world, to out - * myConsole.error(new Error('Whoops, something bad happened')); - * // Prints: [Error: Whoops, something bad happened], to err - * - * const name = 'Will Robinson'; - * myConsole.warn(`Danger ${name}! Danger!`); - * // Prints: Danger Will Robinson! Danger!, to err - * ``` - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/console.js) - */ -declare module "console" { - import console = require("node:console"); - export = console; -} -declare module "node:console" { - import { InspectOptions } from "node:util"; - global { - // This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build - interface Console { - Console: console.ConsoleConstructor; - /** - * `console.assert()` writes a message if `value` is [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) or omitted. It only - * writes a message and does not otherwise affect execution. The output always - * starts with `"Assertion failed"`. If provided, `message` is formatted using - * [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args). - * - * If `value` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy), nothing happens. - * - * ```js - * console.assert(true, 'does nothing'); - * - * console.assert(false, 'Whoops %s work', 'didn\'t'); - * // Assertion failed: Whoops didn't work - * - * console.assert(); - * // Assertion failed - * ``` - * @since v0.1.101 - * @param value The value tested for being truthy. - * @param message All arguments besides `value` are used as error message. - */ - assert(value: any, message?: string, ...optionalParams: any[]): void; - /** - * When `stdout` is a TTY, calling `console.clear()` will attempt to clear the - * TTY. When `stdout` is not a TTY, this method does nothing. - * - * The specific operation of `console.clear()` can vary across operating systems - * and terminal types. For most Linux operating systems, `console.clear()` operates similarly to the `clear` shell command. On Windows, `console.clear()` will clear only the output in the - * current terminal viewport for the Node.js - * binary. - * @since v8.3.0 - */ - clear(): void; - /** - * Maintains an internal counter specific to `label` and outputs to `stdout` the - * number of times `console.count()` has been called with the given `label`. - * - * ```js - * > console.count() - * default: 1 - * undefined - * > console.count('default') - * default: 2 - * undefined - * > console.count('abc') - * abc: 1 - * undefined - * > console.count('xyz') - * xyz: 1 - * undefined - * > console.count('abc') - * abc: 2 - * undefined - * > console.count() - * default: 3 - * undefined - * > - * ``` - * @since v8.3.0 - * @param [label='default'] The display label for the counter. - */ - count(label?: string): void; - /** - * Resets the internal counter specific to `label`. - * - * ```js - * > console.count('abc'); - * abc: 1 - * undefined - * > console.countReset('abc'); - * undefined - * > console.count('abc'); - * abc: 1 - * undefined - * > - * ``` - * @since v8.3.0 - * @param [label='default'] The display label for the counter. - */ - countReset(label?: string): void; - /** - * The `console.debug()` function is an alias for {@link log}. - * @since v8.0.0 - */ - debug(message?: any, ...optionalParams: any[]): void; - /** - * Uses [`util.inspect()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilinspectobject-options) on `obj` and prints the resulting string to `stdout`. - * This function bypasses any custom `inspect()` function defined on `obj`. - * @since v0.1.101 - */ - dir(obj: any, options?: InspectOptions): void; - /** - * This method calls `console.log()` passing it the arguments received. - * This method does not produce any XML formatting. - * @since v8.0.0 - */ - dirxml(...data: any[]): void; - /** - * Prints to `stderr` with newline. Multiple arguments can be passed, with the - * first used as the primary message and all additional used as substitution - * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) - * (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args)). - * - * ```js - * const code = 5; - * console.error('error #%d', code); - * // Prints: error #5, to stderr - * console.error('error', code); - * // Prints: error 5, to stderr - * ``` - * - * If formatting elements (e.g. `%d`) are not found in the first string then - * [`util.inspect()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilinspectobject-options) is called on each argument and the - * resulting string values are concatenated. See [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args) - * for more information. - * @since v0.1.100 - */ - error(message?: any, ...optionalParams: any[]): void; - /** - * Increases indentation of subsequent lines by spaces for `groupIndentation` length. - * - * If one or more `label`s are provided, those are printed first without the - * additional indentation. - * @since v8.5.0 - */ - group(...label: any[]): void; - /** - * An alias for {@link group}. - * @since v8.5.0 - */ - groupCollapsed(...label: any[]): void; - /** - * Decreases indentation of subsequent lines by spaces for `groupIndentation` length. - * @since v8.5.0 - */ - groupEnd(): void; - /** - * The `console.info()` function is an alias for {@link log}. - * @since v0.1.100 - */ - info(message?: any, ...optionalParams: any[]): void; - /** - * Prints to `stdout` with newline. Multiple arguments can be passed, with the - * first used as the primary message and all additional used as substitution - * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) - * (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args)). - * - * ```js - * const count = 5; - * console.log('count: %d', count); - * // Prints: count: 5, to stdout - * console.log('count:', count); - * // Prints: count: 5, to stdout - * ``` - * - * See [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args) for more information. - * @since v0.1.100 - */ - log(message?: any, ...optionalParams: any[]): void; - /** - * Try to construct a table with the columns of the properties of `tabularData` (or use `properties`) and rows of `tabularData` and log it. Falls back to just - * logging the argument if it can't be parsed as tabular. - * - * ```js - * // These can't be parsed as tabular data - * console.table(Symbol()); - * // Symbol() - * - * console.table(undefined); - * // undefined - * - * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }]); - * // ┌─────────┬─────┬─────┐ - * // │ (index) │ a │ b │ - * // ├─────────┼─────┼─────┤ - * // │ 0 │ 1 │ 'Y' │ - * // │ 1 │ 'Z' │ 2 │ - * // └─────────┴─────┴─────┘ - * - * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']); - * // ┌─────────┬─────┐ - * // │ (index) │ a │ - * // ├─────────┼─────┤ - * // │ 0 │ 1 │ - * // │ 1 │ 'Z' │ - * // └─────────┴─────┘ - * ``` - * @since v10.0.0 - * @param properties Alternate properties for constructing the table. - */ - table(tabularData: any, properties?: readonly string[]): void; - /** - * Starts a timer that can be used to compute the duration of an operation. Timers - * are identified by a unique `label`. Use the same `label` when calling {@link timeEnd} to stop the timer and output the elapsed time in - * suitable time units to `stdout`. For example, if the elapsed - * time is 3869ms, `console.timeEnd()` displays "3.869s". - * @since v0.1.104 - * @param [label='default'] - */ - time(label?: string): void; - /** - * Stops a timer that was previously started by calling {@link time} and - * prints the result to `stdout`: - * - * ```js - * console.time('bunch-of-stuff'); - * // Do a bunch of stuff. - * console.timeEnd('bunch-of-stuff'); - * // Prints: bunch-of-stuff: 225.438ms - * ``` - * @since v0.1.104 - * @param [label='default'] - */ - timeEnd(label?: string): void; - /** - * For a timer that was previously started by calling {@link time}, prints - * the elapsed time and other `data` arguments to `stdout`: - * - * ```js - * console.time('process'); - * const value = expensiveProcess1(); // Returns 42 - * console.timeLog('process', value); - * // Prints "process: 365.227ms 42". - * doExpensiveProcess2(value); - * console.timeEnd('process'); - * ``` - * @since v10.7.0 - * @param [label='default'] - */ - timeLog(label?: string, ...data: any[]): void; - /** - * Prints to `stderr` the string `'Trace: '`, followed by the [`util.format()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilformatformat-args) - * formatted message and stack trace to the current position in the code. - * - * ```js - * console.trace('Show me'); - * // Prints: (stack trace will vary based on where trace is called) - * // Trace: Show me - * // at repl:2:9 - * // at REPLServer.defaultEval (repl.js:248:27) - * // at bound (domain.js:287:14) - * // at REPLServer.runBound [as eval] (domain.js:300:12) - * // at REPLServer. (repl.js:412:12) - * // at emitOne (events.js:82:20) - * // at REPLServer.emit (events.js:169:7) - * // at REPLServer.Interface._onLine (readline.js:210:10) - * // at REPLServer.Interface._line (readline.js:549:8) - * // at REPLServer.Interface._ttyWrite (readline.js:826:14) - * ``` - * @since v0.1.104 - */ - trace(message?: any, ...optionalParams: any[]): void; - /** - * The `console.warn()` function is an alias for {@link error}. - * @since v0.1.100 - */ - warn(message?: any, ...optionalParams: any[]): void; - // --- Inspector mode only --- - /** - * This method does not display anything unless used in the inspector. The `console.profile()` - * method starts a JavaScript CPU profile with an optional label until {@link profileEnd} - * is called. The profile is then added to the Profile panel of the inspector. - * - * ```js - * console.profile('MyLabel'); - * // Some code - * console.profileEnd('MyLabel'); - * // Adds the profile 'MyLabel' to the Profiles panel of the inspector. - * ``` - * @since v8.0.0 - */ - profile(label?: string): void; - /** - * This method does not display anything unless used in the inspector. Stops the current - * JavaScript CPU profiling session if one has been started and prints the report to the - * Profiles panel of the inspector. See {@link profile} for an example. - * - * If this method is called without a label, the most recently started profile is stopped. - * @since v8.0.0 - */ - profileEnd(label?: string): void; - /** - * This method does not display anything unless used in the inspector. The `console.timeStamp()` - * method adds an event with the label `'label'` to the Timeline panel of the inspector. - * @since v8.0.0 - */ - timeStamp(label?: string): void; - } - /** - * The `console` module provides a simple debugging console that is similar to the - * JavaScript console mechanism provided by web browsers. - * - * The module exports two specific components: - * - * * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream. - * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstdout) and - * [`process.stderr`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module. - * - * _**Warning**_: The global console object's methods are neither consistently - * synchronous like the browser APIs they resemble, nor are they consistently - * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v20.x/api/process.html#a-note-on-process-io) for - * more information. - * - * Example using the global `console`: - * - * ```js - * console.log('hello world'); - * // Prints: hello world, to stdout - * console.log('hello %s', 'world'); - * // Prints: hello world, to stdout - * console.error(new Error('Whoops, something bad happened')); - * // Prints error message and stack trace to stderr: - * // Error: Whoops, something bad happened - * // at [eval]:5:15 - * // at Script.runInThisContext (node:vm:132:18) - * // at Object.runInThisContext (node:vm:309:38) - * // at node:internal/process/execution:77:19 - * // at [eval]-wrapper:6:22 - * // at evalScript (node:internal/process/execution:76:60) - * // at node:internal/main/eval_string:23:3 - * - * const name = 'Will Robinson'; - * console.warn(`Danger ${name}! Danger!`); - * // Prints: Danger Will Robinson! Danger!, to stderr - * ``` - * - * Example using the `Console` class: - * - * ```js - * const out = getStreamSomehow(); - * const err = getStreamSomehow(); - * const myConsole = new console.Console(out, err); - * - * myConsole.log('hello world'); - * // Prints: hello world, to out - * myConsole.log('hello %s', 'world'); - * // Prints: hello world, to out - * myConsole.error(new Error('Whoops, something bad happened')); - * // Prints: [Error: Whoops, something bad happened], to err - * - * const name = 'Will Robinson'; - * myConsole.warn(`Danger ${name}! Danger!`); - * // Prints: Danger Will Robinson! Danger!, to err - * ``` - * @see [source](https://github.com/nodejs/node/blob/v20.11.1/lib/console.js) - */ - namespace console { - interface ConsoleConstructorOptions { - stdout: NodeJS.WritableStream; - stderr?: NodeJS.WritableStream | undefined; - /** - * Ignore errors when writing to the underlying streams. - * @default true - */ - ignoreErrors?: boolean | undefined; - /** - * Set color support for this `Console` instance. Setting to true enables coloring while inspecting - * values. Setting to `false` disables coloring while inspecting values. Setting to `'auto'` makes color - * support depend on the value of the `isTTY` property and the value returned by `getColorDepth()` on the - * respective stream. This option can not be used, if `inspectOptions.colors` is set as well. - * @default auto - */ - colorMode?: boolean | "auto" | undefined; - /** - * Specifies options that are passed along to - * [`util.inspect()`](https://nodejs.org/docs/latest-v20.x/api/util.html#utilinspectobject-options). - */ - inspectOptions?: InspectOptions | undefined; - /** - * Set group indentation. - * @default 2 - */ - groupIndentation?: number | undefined; - } - interface ConsoleConstructor { - prototype: Console; - new(stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console; - new(options: ConsoleConstructorOptions): Console; - } - } - var console: Console; - } - export = globalThis.console; -} diff --git a/node_modules/@types/node/constants.d.ts b/node_modules/@types/node/constants.d.ts deleted file mode 100644 index 5685a9d..0000000 --- a/node_modules/@types/node/constants.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * @deprecated The `node:constants` module is deprecated. When requiring access to constants - * relevant to specific Node.js builtin modules, developers should instead refer - * to the `constants` property exposed by the relevant module. For instance, - * `require('node:fs').constants` and `require('node:os').constants`. - */ -declare module "constants" { - const constants: - & typeof import("node:os").constants.dlopen - & typeof import("node:os").constants.errno - & typeof import("node:os").constants.priority - & typeof import("node:os").constants.signals - & typeof import("node:fs").constants - & typeof import("node:crypto").constants; - export = constants; -} - -declare module "node:constants" { - import constants = require("constants"); - export = constants; -} diff --git a/node_modules/@types/node/crypto.d.ts b/node_modules/@types/node/crypto.d.ts deleted file mode 100644 index 036cf8c..0000000 --- a/node_modules/@types/node/crypto.d.ts +++ /dev/null @@ -1,4590 +0,0 @@ -/** - * The `node:crypto` module provides cryptographic functionality that includes a - * set of wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign, and verify - * functions. - * - * ```js - * const { createHmac } = await import('node:crypto'); - * - * const secret = 'abcdefg'; - * const hash = createHmac('sha256', secret) - * .update('I love cupcakes') - * .digest('hex'); - * console.log(hash); - * // Prints: - * // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e - * ``` - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/crypto.js) - */ -declare module "crypto" { - import { NonSharedBuffer } from "node:buffer"; - import * as stream from "node:stream"; - import { PeerCertificate } from "node:tls"; - /** - * SPKAC is a Certificate Signing Request mechanism originally implemented by - * Netscape and was specified formally as part of HTML5's `keygen` element. - * - * `` is deprecated since [HTML 5.2](https://www.w3.org/TR/html52/changes.html#features-removed) and new projects - * should not use this element anymore. - * - * The `node:crypto` module provides the `Certificate` class for working with SPKAC - * data. The most common usage is handling output generated by the HTML5 `` element. Node.js uses [OpenSSL's SPKAC - * implementation](https://www.openssl.org/docs/man3.0/man1/openssl-spkac.html) internally. - * @since v0.11.8 - */ - class Certificate { - /** - * ```js - * const { Certificate } = await import('node:crypto'); - * const spkac = getSpkacSomehow(); - * const challenge = Certificate.exportChallenge(spkac); - * console.log(challenge.toString('utf8')); - * // Prints: the challenge as a UTF8 string - * ``` - * @since v9.0.0 - * @param encoding The `encoding` of the `spkac` string. - * @return The challenge component of the `spkac` data structure, which includes a public key and a challenge. - */ - static exportChallenge(spkac: BinaryLike): NonSharedBuffer; - /** - * ```js - * const { Certificate } = await import('node:crypto'); - * const spkac = getSpkacSomehow(); - * const publicKey = Certificate.exportPublicKey(spkac); - * console.log(publicKey); - * // Prints: the public key as - * ``` - * @since v9.0.0 - * @param encoding The `encoding` of the `spkac` string. - * @return The public key component of the `spkac` data structure, which includes a public key and a challenge. - */ - static exportPublicKey(spkac: BinaryLike, encoding?: string): NonSharedBuffer; - /** - * ```js - * import { Buffer } from 'node:buffer'; - * const { Certificate } = await import('node:crypto'); - * - * const spkac = getSpkacSomehow(); - * console.log(Certificate.verifySpkac(Buffer.from(spkac))); - * // Prints: true or false - * ``` - * @since v9.0.0 - * @param encoding The `encoding` of the `spkac` string. - * @return `true` if the given `spkac` data structure is valid, `false` otherwise. - */ - static verifySpkac(spkac: NodeJS.ArrayBufferView): boolean; - /** - * @deprecated - * @param spkac - * @returns The challenge component of the `spkac` data structure, - * which includes a public key and a challenge. - */ - exportChallenge(spkac: BinaryLike): NonSharedBuffer; - /** - * @deprecated - * @param spkac - * @param encoding The encoding of the spkac string. - * @returns The public key component of the `spkac` data structure, - * which includes a public key and a challenge. - */ - exportPublicKey(spkac: BinaryLike, encoding?: string): NonSharedBuffer; - /** - * @deprecated - * @param spkac - * @returns `true` if the given `spkac` data structure is valid, - * `false` otherwise. - */ - verifySpkac(spkac: NodeJS.ArrayBufferView): boolean; - } - namespace constants { - // https://nodejs.org/dist/latest-v20.x/docs/api/crypto.html#crypto-constants - const OPENSSL_VERSION_NUMBER: number; - /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */ - const SSL_OP_ALL: number; - /** Instructs OpenSSL to allow a non-[EC]DHE-based key exchange mode for TLS v1.3 */ - const SSL_OP_ALLOW_NO_DHE_KEX: number; - /** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */ - const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number; - /** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */ - const SSL_OP_CIPHER_SERVER_PREFERENCE: number; - /** Instructs OpenSSL to use Cisco's version identifier of DTLS_BAD_VER. */ - const SSL_OP_CISCO_ANYCONNECT: number; - /** Instructs OpenSSL to turn on cookie exchange. */ - const SSL_OP_COOKIE_EXCHANGE: number; - /** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */ - const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number; - /** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */ - const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number; - /** Allows initial connection to servers that do not support RI. */ - const SSL_OP_LEGACY_SERVER_CONNECT: number; - /** Instructs OpenSSL to disable support for SSL/TLS compression. */ - const SSL_OP_NO_COMPRESSION: number; - /** Instructs OpenSSL to disable encrypt-then-MAC. */ - const SSL_OP_NO_ENCRYPT_THEN_MAC: number; - const SSL_OP_NO_QUERY_MTU: number; - /** Instructs OpenSSL to disable renegotiation. */ - const SSL_OP_NO_RENEGOTIATION: number; - /** Instructs OpenSSL to always start a new session when performing renegotiation. */ - const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number; - /** Instructs OpenSSL to turn off SSL v2 */ - const SSL_OP_NO_SSLv2: number; - /** Instructs OpenSSL to turn off SSL v3 */ - const SSL_OP_NO_SSLv3: number; - /** Instructs OpenSSL to disable use of RFC4507bis tickets. */ - const SSL_OP_NO_TICKET: number; - /** Instructs OpenSSL to turn off TLS v1 */ - const SSL_OP_NO_TLSv1: number; - /** Instructs OpenSSL to turn off TLS v1.1 */ - const SSL_OP_NO_TLSv1_1: number; - /** Instructs OpenSSL to turn off TLS v1.2 */ - const SSL_OP_NO_TLSv1_2: number; - /** Instructs OpenSSL to turn off TLS v1.3 */ - const SSL_OP_NO_TLSv1_3: number; - /** Instructs OpenSSL server to prioritize ChaCha20-Poly1305 when the client does. This option has no effect if `SSL_OP_CIPHER_SERVER_PREFERENCE` is not enabled. */ - const SSL_OP_PRIORITIZE_CHACHA: number; - /** Instructs OpenSSL to disable version rollback attack detection. */ - const SSL_OP_TLS_ROLLBACK_BUG: number; - const ENGINE_METHOD_RSA: number; - const ENGINE_METHOD_DSA: number; - const ENGINE_METHOD_DH: number; - const ENGINE_METHOD_RAND: number; - const ENGINE_METHOD_EC: number; - const ENGINE_METHOD_CIPHERS: number; - const ENGINE_METHOD_DIGESTS: number; - const ENGINE_METHOD_PKEY_METHS: number; - const ENGINE_METHOD_PKEY_ASN1_METHS: number; - const ENGINE_METHOD_ALL: number; - const ENGINE_METHOD_NONE: number; - const DH_CHECK_P_NOT_SAFE_PRIME: number; - const DH_CHECK_P_NOT_PRIME: number; - const DH_UNABLE_TO_CHECK_GENERATOR: number; - const DH_NOT_SUITABLE_GENERATOR: number; - const RSA_PKCS1_PADDING: number; - const RSA_SSLV23_PADDING: number; - const RSA_NO_PADDING: number; - const RSA_PKCS1_OAEP_PADDING: number; - const RSA_X931_PADDING: number; - const RSA_PKCS1_PSS_PADDING: number; - /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */ - const RSA_PSS_SALTLEN_DIGEST: number; - /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */ - const RSA_PSS_SALTLEN_MAX_SIGN: number; - /** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */ - const RSA_PSS_SALTLEN_AUTO: number; - const POINT_CONVERSION_COMPRESSED: number; - const POINT_CONVERSION_UNCOMPRESSED: number; - const POINT_CONVERSION_HYBRID: number; - /** Specifies the built-in default cipher list used by Node.js (colon-separated values). */ - const defaultCoreCipherList: string; - /** Specifies the active default cipher list used by the current Node.js process (colon-separated values). */ - const defaultCipherList: string; - } - interface HashOptions extends stream.TransformOptions { - /** - * For XOF hash functions such as `shake256`, the - * outputLength option can be used to specify the desired output length in bytes. - */ - outputLength?: number | undefined; - } - /** @deprecated since v10.0.0 */ - const fips: boolean; - /** - * Creates and returns a `Hash` object that can be used to generate hash digests - * using the given `algorithm`. Optional `options` argument controls stream - * behavior. For XOF hash functions such as `'shake256'`, the `outputLength` option - * can be used to specify the desired output length in bytes. - * - * The `algorithm` is dependent on the available algorithms supported by the - * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. - * On recent releases of OpenSSL, `openssl list -digest-algorithms` will - * display the available digest algorithms. - * - * Example: generating the sha256 sum of a file - * - * ```js - * import { - * createReadStream, - * } from 'node:fs'; - * import { argv } from 'node:process'; - * const { - * createHash, - * } = await import('node:crypto'); - * - * const filename = argv[2]; - * - * const hash = createHash('sha256'); - * - * const input = createReadStream(filename); - * input.on('readable', () => { - * // Only one element is going to be produced by the - * // hash stream. - * const data = input.read(); - * if (data) - * hash.update(data); - * else { - * console.log(`${hash.digest('hex')} ${filename}`); - * } - * }); - * ``` - * @since v0.1.92 - * @param options `stream.transform` options - */ - function createHash(algorithm: string, options?: HashOptions): Hash; - /** - * Creates and returns an `Hmac` object that uses the given `algorithm` and `key`. - * Optional `options` argument controls stream behavior. - * - * The `algorithm` is dependent on the available algorithms supported by the - * version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. - * On recent releases of OpenSSL, `openssl list -digest-algorithms` will - * display the available digest algorithms. - * - * The `key` is the HMAC key used to generate the cryptographic HMAC hash. If it is - * a `KeyObject`, its type must be `secret`. If it is a string, please consider `caveats when using strings as inputs to cryptographic APIs`. If it was - * obtained from a cryptographically secure source of entropy, such as {@link randomBytes} or {@link generateKey}, its length should not - * exceed the block size of `algorithm` (e.g., 512 bits for SHA-256). - * - * Example: generating the sha256 HMAC of a file - * - * ```js - * import { - * createReadStream, - * } from 'node:fs'; - * import { argv } from 'node:process'; - * const { - * createHmac, - * } = await import('node:crypto'); - * - * const filename = argv[2]; - * - * const hmac = createHmac('sha256', 'a secret'); - * - * const input = createReadStream(filename); - * input.on('readable', () => { - * // Only one element is going to be produced by the - * // hash stream. - * const data = input.read(); - * if (data) - * hmac.update(data); - * else { - * console.log(`${hmac.digest('hex')} ${filename}`); - * } - * }); - * ``` - * @since v0.1.94 - * @param options `stream.transform` options - */ - function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac; - // https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings - type BinaryToTextEncoding = "base64" | "base64url" | "hex" | "binary"; - type CharacterEncoding = "utf8" | "utf-8" | "utf16le" | "utf-16le" | "latin1"; - type LegacyCharacterEncoding = "ascii" | "binary" | "ucs2" | "ucs-2"; - type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding; - type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid"; - /** - * The `Hash` class is a utility for creating hash digests of data. It can be - * used in one of two ways: - * - * * As a `stream` that is both readable and writable, where data is written - * to produce a computed hash digest on the readable side, or - * * Using the `hash.update()` and `hash.digest()` methods to produce the - * computed hash. - * - * The {@link createHash} method is used to create `Hash` instances. `Hash`objects are not to be created directly using the `new` keyword. - * - * Example: Using `Hash` objects as streams: - * - * ```js - * const { - * createHash, - * } = await import('node:crypto'); - * - * const hash = createHash('sha256'); - * - * hash.on('readable', () => { - * // Only one element is going to be produced by the - * // hash stream. - * const data = hash.read(); - * if (data) { - * console.log(data.toString('hex')); - * // Prints: - * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50 - * } - * }); - * - * hash.write('some data to hash'); - * hash.end(); - * ``` - * - * Example: Using `Hash` and piped streams: - * - * ```js - * import { createReadStream } from 'node:fs'; - * import { stdout } from 'node:process'; - * const { createHash } = await import('node:crypto'); - * - * const hash = createHash('sha256'); - * - * const input = createReadStream('test.js'); - * input.pipe(hash).setEncoding('hex').pipe(stdout); - * ``` - * - * Example: Using the `hash.update()` and `hash.digest()` methods: - * - * ```js - * const { - * createHash, - * } = await import('node:crypto'); - * - * const hash = createHash('sha256'); - * - * hash.update('some data to hash'); - * console.log(hash.digest('hex')); - * // Prints: - * // 6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50 - * ``` - * @since v0.1.92 - */ - class Hash extends stream.Transform { - private constructor(); - /** - * Creates a new `Hash` object that contains a deep copy of the internal state - * of the current `Hash` object. - * - * The optional `options` argument controls stream behavior. For XOF hash - * functions such as `'shake256'`, the `outputLength` option can be used to - * specify the desired output length in bytes. - * - * An error is thrown when an attempt is made to copy the `Hash` object after - * its `hash.digest()` method has been called. - * - * ```js - * // Calculate a rolling hash. - * const { - * createHash, - * } = await import('node:crypto'); - * - * const hash = createHash('sha256'); - * - * hash.update('one'); - * console.log(hash.copy().digest('hex')); - * - * hash.update('two'); - * console.log(hash.copy().digest('hex')); - * - * hash.update('three'); - * console.log(hash.copy().digest('hex')); - * - * // Etc. - * ``` - * @since v13.1.0 - * @param options `stream.transform` options - */ - copy(options?: HashOptions): Hash; - /** - * Updates the hash content with the given `data`, the encoding of which - * is given in `inputEncoding`. - * If `encoding` is not provided, and the `data` is a string, an - * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. - * - * This can be called many times with new data as it is streamed. - * @since v0.1.92 - * @param inputEncoding The `encoding` of the `data` string. - */ - update(data: BinaryLike): Hash; - update(data: string, inputEncoding: Encoding): Hash; - /** - * Calculates the digest of all of the data passed to be hashed (using the `hash.update()` method). - * If `encoding` is provided a string will be returned; otherwise - * a `Buffer` is returned. - * - * The `Hash` object can not be used again after `hash.digest()` method has been - * called. Multiple calls will cause an error to be thrown. - * @since v0.1.92 - * @param encoding The `encoding` of the return value. - */ - digest(): NonSharedBuffer; - digest(encoding: BinaryToTextEncoding): string; - } - /** - * The `Hmac` class is a utility for creating cryptographic HMAC digests. It can - * be used in one of two ways: - * - * * As a `stream` that is both readable and writable, where data is written - * to produce a computed HMAC digest on the readable side, or - * * Using the `hmac.update()` and `hmac.digest()` methods to produce the - * computed HMAC digest. - * - * The {@link createHmac} method is used to create `Hmac` instances. `Hmac`objects are not to be created directly using the `new` keyword. - * - * Example: Using `Hmac` objects as streams: - * - * ```js - * const { - * createHmac, - * } = await import('node:crypto'); - * - * const hmac = createHmac('sha256', 'a secret'); - * - * hmac.on('readable', () => { - * // Only one element is going to be produced by the - * // hash stream. - * const data = hmac.read(); - * if (data) { - * console.log(data.toString('hex')); - * // Prints: - * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e - * } - * }); - * - * hmac.write('some data to hash'); - * hmac.end(); - * ``` - * - * Example: Using `Hmac` and piped streams: - * - * ```js - * import { createReadStream } from 'node:fs'; - * import { stdout } from 'node:process'; - * const { - * createHmac, - * } = await import('node:crypto'); - * - * const hmac = createHmac('sha256', 'a secret'); - * - * const input = createReadStream('test.js'); - * input.pipe(hmac).pipe(stdout); - * ``` - * - * Example: Using the `hmac.update()` and `hmac.digest()` methods: - * - * ```js - * const { - * createHmac, - * } = await import('node:crypto'); - * - * const hmac = createHmac('sha256', 'a secret'); - * - * hmac.update('some data to hash'); - * console.log(hmac.digest('hex')); - * // Prints: - * // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e - * ``` - * @since v0.1.94 - * @deprecated Since v20.13.0 Calling `Hmac` class directly with `Hmac()` or `new Hmac()` is deprecated due to being internals, not intended for public use. Please use the {@link createHmac} method to create Hmac instances. - */ - class Hmac extends stream.Transform { - private constructor(); - /** - * Updates the `Hmac` content with the given `data`, the encoding of which - * is given in `inputEncoding`. - * If `encoding` is not provided, and the `data` is a string, an - * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. - * - * This can be called many times with new data as it is streamed. - * @since v0.1.94 - * @param inputEncoding The `encoding` of the `data` string. - */ - update(data: BinaryLike): Hmac; - update(data: string, inputEncoding: Encoding): Hmac; - /** - * Calculates the HMAC digest of all of the data passed using `hmac.update()`. - * If `encoding` is - * provided a string is returned; otherwise a `Buffer` is returned; - * - * The `Hmac` object can not be used again after `hmac.digest()` has been - * called. Multiple calls to `hmac.digest()` will result in an error being thrown. - * @since v0.1.94 - * @param encoding The `encoding` of the return value. - */ - digest(): NonSharedBuffer; - digest(encoding: BinaryToTextEncoding): string; - } - type KeyObjectType = "secret" | "public" | "private"; - interface KeyExportOptions { - type: "pkcs1" | "spki" | "pkcs8" | "sec1"; - format: T; - cipher?: string | undefined; - passphrase?: string | Buffer | undefined; - } - interface JwkKeyExportOptions { - format: "jwk"; - } - interface JsonWebKey { - crv?: string; - d?: string; - dp?: string; - dq?: string; - e?: string; - k?: string; - kty?: string; - n?: string; - p?: string; - q?: string; - qi?: string; - x?: string; - y?: string; - [key: string]: unknown; - } - interface AsymmetricKeyDetails { - /** - * Key size in bits (RSA, DSA). - */ - modulusLength?: number; - /** - * Public exponent (RSA). - */ - publicExponent?: bigint; - /** - * Name of the message digest (RSA-PSS). - */ - hashAlgorithm?: string; - /** - * Name of the message digest used by MGF1 (RSA-PSS). - */ - mgf1HashAlgorithm?: string; - /** - * Minimal salt length in bytes (RSA-PSS). - */ - saltLength?: number; - /** - * Size of q in bits (DSA). - */ - divisorLength?: number; - /** - * Name of the curve (EC). - */ - namedCurve?: string; - } - /** - * Node.js uses a `KeyObject` class to represent a symmetric or asymmetric key, - * and each kind of key exposes different functions. The {@link createSecretKey}, {@link createPublicKey} and {@link createPrivateKey} methods are used to create `KeyObject`instances. `KeyObject` - * objects are not to be created directly using the `new`keyword. - * - * Most applications should consider using the new `KeyObject` API instead of - * passing keys as strings or `Buffer`s due to improved security features. - * - * `KeyObject` instances can be passed to other threads via `postMessage()`. - * The receiver obtains a cloned `KeyObject`, and the `KeyObject` does not need to - * be listed in the `transferList` argument. - * @since v11.6.0 - */ - class KeyObject { - private constructor(); - /** - * Example: Converting a `CryptoKey` instance to a `KeyObject`: - * - * ```js - * const { KeyObject } = await import('node:crypto'); - * const { subtle } = globalThis.crypto; - * - * const key = await subtle.generateKey({ - * name: 'HMAC', - * hash: 'SHA-256', - * length: 256, - * }, true, ['sign', 'verify']); - * - * const keyObject = KeyObject.from(key); - * console.log(keyObject.symmetricKeySize); - * // Prints: 32 (symmetric key size in bytes) - * ``` - * @since v15.0.0 - */ - static from(key: webcrypto.CryptoKey): KeyObject; - /** - * For asymmetric keys, this property represents the type of the key. Supported key - * types are: - * - * * `'rsa'` (OID 1.2.840.113549.1.1.1) - * * `'rsa-pss'` (OID 1.2.840.113549.1.1.10) - * * `'dsa'` (OID 1.2.840.10040.4.1) - * * `'ec'` (OID 1.2.840.10045.2.1) - * * `'x25519'` (OID 1.3.101.110) - * * `'x448'` (OID 1.3.101.111) - * * `'ed25519'` (OID 1.3.101.112) - * * `'ed448'` (OID 1.3.101.113) - * * `'dh'` (OID 1.2.840.113549.1.3.1) - * - * This property is `undefined` for unrecognized `KeyObject` types and symmetric - * keys. - * @since v11.6.0 - */ - asymmetricKeyType?: KeyType; - /** - * This property exists only on asymmetric keys. Depending on the type of the key, - * this object contains information about the key. None of the information obtained - * through this property can be used to uniquely identify a key or to compromise - * the security of the key. - * - * For RSA-PSS keys, if the key material contains a `RSASSA-PSS-params` sequence, - * the `hashAlgorithm`, `mgf1HashAlgorithm`, and `saltLength` properties will be - * set. - * - * Other key details might be exposed via this API using additional attributes. - * @since v15.7.0 - */ - asymmetricKeyDetails?: AsymmetricKeyDetails; - /** - * For symmetric keys, the following encoding options can be used: - * - * For public keys, the following encoding options can be used: - * - * For private keys, the following encoding options can be used: - * - * The result type depends on the selected encoding format, when PEM the - * result is a string, when DER it will be a buffer containing the data - * encoded as DER, when [JWK](https://tools.ietf.org/html/rfc7517) it will be an object. - * - * When [JWK](https://tools.ietf.org/html/rfc7517) encoding format was selected, all other encoding options are - * ignored. - * - * PKCS#1, SEC1, and PKCS#8 type keys can be encrypted by using a combination of - * the `cipher` and `format` options. The PKCS#8 `type` can be used with any`format` to encrypt any key algorithm (RSA, EC, or DH) by specifying a`cipher`. PKCS#1 and SEC1 can only be - * encrypted by specifying a `cipher`when the PEM `format` is used. For maximum compatibility, use PKCS#8 for - * encrypted private keys. Since PKCS#8 defines its own - * encryption mechanism, PEM-level encryption is not supported when encrypting - * a PKCS#8 key. See [RFC 5208](https://www.rfc-editor.org/rfc/rfc5208.txt) for PKCS#8 encryption and [RFC 1421](https://www.rfc-editor.org/rfc/rfc1421.txt) for - * PKCS#1 and SEC1 encryption. - * @since v11.6.0 - */ - export(options: KeyExportOptions<"pem">): string | NonSharedBuffer; - export(options?: KeyExportOptions<"der">): NonSharedBuffer; - export(options?: JwkKeyExportOptions): JsonWebKey; - /** - * Returns `true` or `false` depending on whether the keys have exactly the same - * type, value, and parameters. This method is not [constant time](https://en.wikipedia.org/wiki/Timing_attack). - * @since v17.7.0, v16.15.0 - * @param otherKeyObject A `KeyObject` with which to compare `keyObject`. - */ - equals(otherKeyObject: KeyObject): boolean; - /** - * For secret keys, this property represents the size of the key in bytes. This - * property is `undefined` for asymmetric keys. - * @since v11.6.0 - */ - symmetricKeySize?: number; - /** - * Depending on the type of this `KeyObject`, this property is either`'secret'` for secret (symmetric) keys, `'public'` for public (asymmetric) keys - * or `'private'` for private (asymmetric) keys. - * @since v11.6.0 - */ - type: KeyObjectType; - } - type CipherCCMTypes = "aes-128-ccm" | "aes-192-ccm" | "aes-256-ccm"; - type CipherGCMTypes = "aes-128-gcm" | "aes-192-gcm" | "aes-256-gcm"; - type CipherOCBTypes = "aes-128-ocb" | "aes-192-ocb" | "aes-256-ocb"; - type CipherChaCha20Poly1305Types = "chacha20-poly1305"; - type BinaryLike = string | NodeJS.ArrayBufferView; - type CipherKey = BinaryLike | KeyObject; - interface CipherCCMOptions extends stream.TransformOptions { - authTagLength: number; - } - interface CipherGCMOptions extends stream.TransformOptions { - authTagLength?: number | undefined; - } - interface CipherOCBOptions extends stream.TransformOptions { - authTagLength: number; - } - interface CipherChaCha20Poly1305Options extends stream.TransformOptions { - /** @default 16 */ - authTagLength?: number | undefined; - } - /** - * Creates and returns a `Cipher` object that uses the given `algorithm` and `password`. - * - * The `options` argument controls stream behavior and is optional except when a - * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the - * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication - * tag that will be returned by `getAuthTag()` and defaults to 16 bytes. - * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. - * - * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On - * recent OpenSSL releases, `openssl list -cipher-algorithms` will - * display the available cipher algorithms. - * - * The `password` is used to derive the cipher key and initialization vector (IV). - * The value must be either a `'latin1'` encoded string, a `Buffer`, a`TypedArray`, or a `DataView`. - * - * **This function is semantically insecure for all** - * **supported ciphers and fatally flawed for ciphers in counter mode (such as CTR,** - * **GCM, or CCM).** - * - * The implementation of `crypto.createCipher()` derives keys using the OpenSSL - * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man3.0/man3/EVP_BytesToKey.html) with the digest algorithm set to MD5, one - * iteration, and no salt. The lack of salt allows dictionary attacks as the same - * password always creates the same key. The low iteration count and - * non-cryptographically secure hash algorithm allow passwords to be tested very - * rapidly. - * - * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man3.0/man3/EVP_BytesToKey.html) it is recommended that - * developers derive a key and IV on - * their own using {@link scrypt} and to use {@link createCipheriv} to create the `Cipher` object. Users should not use ciphers with counter mode - * (e.g. CTR, GCM, or CCM) in `crypto.createCipher()`. A warning is emitted when - * they are used in order to avoid the risk of IV reuse that causes - * vulnerabilities. For the case when IV is reused in GCM, see [Nonce-Disrespecting Adversaries](https://github.com/nonce-disrespect/nonce-disrespect) for details. - * @since v0.1.94 - * @deprecated Since v10.0.0 - Use {@link createCipheriv} instead. - * @param options `stream.transform` options - */ - function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM; - /** @deprecated since v10.0.0 use `createCipheriv()` */ - function createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): CipherGCM; - /** @deprecated since v10.0.0 use `createCipheriv()` */ - function createCipher(algorithm: CipherOCBTypes, password: BinaryLike, options: CipherOCBOptions): CipherOCB; - /** @deprecated since v10.0.0 use `createCipheriv()` */ - function createCipher( - algorithm: CipherChaCha20Poly1305Types, - password: BinaryLike, - options?: CipherChaCha20Poly1305Options, - ): CipherChaCha20Poly1305; - /** @deprecated since v10.0.0 use `createCipheriv()` */ - function createCipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Cipher; - /** - * Creates and returns a `Cipher` object, with the given `algorithm`, `key` and - * initialization vector (`iv`). - * - * The `options` argument controls stream behavior and is optional except when a - * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the - * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to set the length of the authentication - * tag that will be returned by `getAuthTag()` and defaults to 16 bytes. - * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. - * - * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On - * recent OpenSSL releases, `openssl list -cipher-algorithms` will - * display the available cipher algorithms. - * - * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded - * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be - * a `KeyObject` of type `secret`. If the cipher does not need - * an initialization vector, `iv` may be `null`. - * - * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`. - * - * Initialization vectors should be unpredictable and unique; ideally, they will be - * cryptographically random. They do not have to be secret: IVs are typically just - * added to ciphertext messages unencrypted. It may sound contradictory that - * something has to be unpredictable and unique, but does not have to be secret; - * remember that an attacker must not be able to predict ahead of time what a - * given IV will be. - * @since v0.1.94 - * @param options `stream.transform` options - */ - function createCipheriv( - algorithm: CipherCCMTypes, - key: CipherKey, - iv: BinaryLike, - options: CipherCCMOptions, - ): CipherCCM; - function createCipheriv( - algorithm: CipherOCBTypes, - key: CipherKey, - iv: BinaryLike, - options: CipherOCBOptions, - ): CipherOCB; - function createCipheriv( - algorithm: CipherGCMTypes, - key: CipherKey, - iv: BinaryLike, - options?: CipherGCMOptions, - ): CipherGCM; - function createCipheriv( - algorithm: CipherChaCha20Poly1305Types, - key: CipherKey, - iv: BinaryLike, - options?: CipherChaCha20Poly1305Options, - ): CipherChaCha20Poly1305; - function createCipheriv( - algorithm: string, - key: CipherKey, - iv: BinaryLike | null, - options?: stream.TransformOptions, - ): Cipher; - /** - * Instances of the `Cipher` class are used to encrypt data. The class can be - * used in one of two ways: - * - * * As a `stream` that is both readable and writable, where plain unencrypted - * data is written to produce encrypted data on the readable side, or - * * Using the `cipher.update()` and `cipher.final()` methods to produce - * the encrypted data. - * - * The {@link createCipher} or {@link createCipheriv} methods are - * used to create `Cipher` instances. `Cipher` objects are not to be created - * directly using the `new` keyword. - * - * Example: Using `Cipher` objects as streams: - * - * ```js - * const { - * scrypt, - * randomFill, - * createCipheriv, - * } = await import('node:crypto'); - * - * const algorithm = 'aes-192-cbc'; - * const password = 'Password used to generate key'; - * - * // First, we'll generate the key. The key length is dependent on the algorithm. - * // In this case for aes192, it is 24 bytes (192 bits). - * scrypt(password, 'salt', 24, (err, key) => { - * if (err) throw err; - * // Then, we'll generate a random initialization vector - * randomFill(new Uint8Array(16), (err, iv) => { - * if (err) throw err; - * - * // Once we have the key and iv, we can create and use the cipher... - * const cipher = createCipheriv(algorithm, key, iv); - * - * let encrypted = ''; - * cipher.setEncoding('hex'); - * - * cipher.on('data', (chunk) => encrypted += chunk); - * cipher.on('end', () => console.log(encrypted)); - * - * cipher.write('some clear text data'); - * cipher.end(); - * }); - * }); - * ``` - * - * Example: Using `Cipher` and piped streams: - * - * ```js - * import { - * createReadStream, - * createWriteStream, - * } from 'node:fs'; - * - * import { - * pipeline, - * } from 'node:stream'; - * - * const { - * scrypt, - * randomFill, - * createCipheriv, - * } = await import('node:crypto'); - * - * const algorithm = 'aes-192-cbc'; - * const password = 'Password used to generate key'; - * - * // First, we'll generate the key. The key length is dependent on the algorithm. - * // In this case for aes192, it is 24 bytes (192 bits). - * scrypt(password, 'salt', 24, (err, key) => { - * if (err) throw err; - * // Then, we'll generate a random initialization vector - * randomFill(new Uint8Array(16), (err, iv) => { - * if (err) throw err; - * - * const cipher = createCipheriv(algorithm, key, iv); - * - * const input = createReadStream('test.js'); - * const output = createWriteStream('test.enc'); - * - * pipeline(input, cipher, output, (err) => { - * if (err) throw err; - * }); - * }); - * }); - * ``` - * - * Example: Using the `cipher.update()` and `cipher.final()` methods: - * - * ```js - * const { - * scrypt, - * randomFill, - * createCipheriv, - * } = await import('node:crypto'); - * - * const algorithm = 'aes-192-cbc'; - * const password = 'Password used to generate key'; - * - * // First, we'll generate the key. The key length is dependent on the algorithm. - * // In this case for aes192, it is 24 bytes (192 bits). - * scrypt(password, 'salt', 24, (err, key) => { - * if (err) throw err; - * // Then, we'll generate a random initialization vector - * randomFill(new Uint8Array(16), (err, iv) => { - * if (err) throw err; - * - * const cipher = createCipheriv(algorithm, key, iv); - * - * let encrypted = cipher.update('some clear text data', 'utf8', 'hex'); - * encrypted += cipher.final('hex'); - * console.log(encrypted); - * }); - * }); - * ``` - * @since v0.1.94 - */ - class Cipher extends stream.Transform { - private constructor(); - /** - * Updates the cipher with `data`. If the `inputEncoding` argument is given, - * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`, `TypedArray`, or `DataView`. If `data` is a `Buffer`, - * `TypedArray`, or `DataView`, then `inputEncoding` is ignored. - * - * The `outputEncoding` specifies the output format of the enciphered - * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned. - * - * The `cipher.update()` method can be called multiple times with new data until `cipher.final()` is called. Calling `cipher.update()` after `cipher.final()` will result in an error being - * thrown. - * @since v0.1.94 - * @param inputEncoding The `encoding` of the data. - * @param outputEncoding The `encoding` of the return value. - */ - update(data: BinaryLike): NonSharedBuffer; - update(data: string, inputEncoding: Encoding): NonSharedBuffer; - update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string; - update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string; - /** - * Once the `cipher.final()` method has been called, the `Cipher` object can no - * longer be used to encrypt data. Attempts to call `cipher.final()` more than - * once will result in an error being thrown. - * @since v0.1.94 - * @param outputEncoding The `encoding` of the return value. - * @return Any remaining enciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned. - */ - final(): NonSharedBuffer; - final(outputEncoding: BufferEncoding): string; - /** - * When using block encryption algorithms, the `Cipher` class will automatically - * add padding to the input data to the appropriate block size. To disable the - * default padding call `cipher.setAutoPadding(false)`. - * - * When `autoPadding` is `false`, the length of the entire input data must be a - * multiple of the cipher's block size or `cipher.final()` will throw an error. - * Disabling automatic padding is useful for non-standard padding, for instance - * using `0x0` instead of PKCS padding. - * - * The `cipher.setAutoPadding()` method must be called before `cipher.final()`. - * @since v0.7.1 - * @param [autoPadding=true] - * @return for method chaining. - */ - setAutoPadding(autoPadding?: boolean): this; - } - interface CipherCCM extends Cipher { - setAAD( - buffer: NodeJS.ArrayBufferView, - options: { - plaintextLength: number; - }, - ): this; - getAuthTag(): NonSharedBuffer; - } - interface CipherGCM extends Cipher { - setAAD( - buffer: NodeJS.ArrayBufferView, - options?: { - plaintextLength: number; - }, - ): this; - getAuthTag(): NonSharedBuffer; - } - interface CipherOCB extends Cipher { - setAAD( - buffer: NodeJS.ArrayBufferView, - options?: { - plaintextLength: number; - }, - ): this; - getAuthTag(): NonSharedBuffer; - } - interface CipherChaCha20Poly1305 extends Cipher { - setAAD( - buffer: NodeJS.ArrayBufferView, - options: { - plaintextLength: number; - }, - ): this; - getAuthTag(): NonSharedBuffer; - } - /** - * Creates and returns a `Decipher` object that uses the given `algorithm` and `password` (key). - * - * The `options` argument controls stream behavior and is optional except when a - * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the `authTagLength` option is required and specifies the length of the - * authentication tag in bytes, see `CCM mode`. - * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. - * - * **This function is semantically insecure for all** - * **supported ciphers and fatally flawed for ciphers in counter mode (such as CTR,** - * **GCM, or CCM).** - * - * The implementation of `crypto.createDecipher()` derives keys using the OpenSSL - * function [`EVP_BytesToKey`](https://www.openssl.org/docs/man3.0/man3/EVP_BytesToKey.html) with the digest algorithm set to MD5, one - * iteration, and no salt. The lack of salt allows dictionary attacks as the same - * password always creates the same key. The low iteration count and - * non-cryptographically secure hash algorithm allow passwords to be tested very - * rapidly. - * - * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man3.0/man3/EVP_BytesToKey.html) it is recommended that - * developers derive a key and IV on - * their own using {@link scrypt} and to use {@link createDecipheriv} to create the `Decipher` object. - * @since v0.1.94 - * @deprecated Since v10.0.0 - Use {@link createDecipheriv} instead. - * @param options `stream.transform` options - */ - function createDecipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): DecipherCCM; - /** @deprecated since v10.0.0 use `createDecipheriv()` */ - function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM; - /** @deprecated since v10.0.0 use `createDecipheriv()` */ - function createDecipher(algorithm: CipherOCBTypes, password: BinaryLike, options: CipherOCBOptions): DecipherOCB; - /** @deprecated since v10.0.0 use `createDecipheriv()` */ - function createDecipher( - algorithm: CipherChaCha20Poly1305Types, - password: BinaryLike, - options?: CipherChaCha20Poly1305Options, - ): DecipherChaCha20Poly1305; - /** @deprecated since v10.0.0 use `createDecipheriv()` */ - function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher; - /** - * Creates and returns a `Decipher` object that uses the given `algorithm`, `key` and initialization vector (`iv`). - * - * The `options` argument controls stream behavior and is optional except when a - * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the `authTagLength` option is required and specifies the length of the - * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength` option is not required but can be used to restrict accepted authentication tags - * to those with the specified length. - * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes. - * - * The `algorithm` is dependent on OpenSSL, examples are `'aes192'`, etc. On - * recent OpenSSL releases, `openssl list -cipher-algorithms` will - * display the available cipher algorithms. - * - * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded - * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be - * a `KeyObject` of type `secret`. If the cipher does not need - * an initialization vector, `iv` may be `null`. - * - * When passing strings for `key` or `iv`, please consider `caveats when using strings as inputs to cryptographic APIs`. - * - * Initialization vectors should be unpredictable and unique; ideally, they will be - * cryptographically random. They do not have to be secret: IVs are typically just - * added to ciphertext messages unencrypted. It may sound contradictory that - * something has to be unpredictable and unique, but does not have to be secret; - * remember that an attacker must not be able to predict ahead of time what a given - * IV will be. - * @since v0.1.94 - * @param options `stream.transform` options - */ - function createDecipheriv( - algorithm: CipherCCMTypes, - key: CipherKey, - iv: BinaryLike, - options: CipherCCMOptions, - ): DecipherCCM; - function createDecipheriv( - algorithm: CipherOCBTypes, - key: CipherKey, - iv: BinaryLike, - options: CipherOCBOptions, - ): DecipherOCB; - function createDecipheriv( - algorithm: CipherGCMTypes, - key: CipherKey, - iv: BinaryLike, - options?: CipherGCMOptions, - ): DecipherGCM; - function createDecipheriv( - algorithm: CipherChaCha20Poly1305Types, - key: CipherKey, - iv: BinaryLike, - options?: CipherChaCha20Poly1305Options, - ): DecipherChaCha20Poly1305; - function createDecipheriv( - algorithm: string, - key: CipherKey, - iv: BinaryLike | null, - options?: stream.TransformOptions, - ): Decipher; - /** - * Instances of the `Decipher` class are used to decrypt data. The class can be - * used in one of two ways: - * - * * As a `stream` that is both readable and writable, where plain encrypted - * data is written to produce unencrypted data on the readable side, or - * * Using the `decipher.update()` and `decipher.final()` methods to - * produce the unencrypted data. - * - * The {@link createDecipher} or {@link createDecipheriv} methods are - * used to create `Decipher` instances. `Decipher` objects are not to be created - * directly using the `new` keyword. - * - * Example: Using `Decipher` objects as streams: - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { - * scryptSync, - * createDecipheriv, - * } = await import('node:crypto'); - * - * const algorithm = 'aes-192-cbc'; - * const password = 'Password used to generate key'; - * // Key length is dependent on the algorithm. In this case for aes192, it is - * // 24 bytes (192 bits). - * // Use the async `crypto.scrypt()` instead. - * const key = scryptSync(password, 'salt', 24); - * // The IV is usually passed along with the ciphertext. - * const iv = Buffer.alloc(16, 0); // Initialization vector. - * - * const decipher = createDecipheriv(algorithm, key, iv); - * - * let decrypted = ''; - * decipher.on('readable', () => { - * let chunk; - * while (null !== (chunk = decipher.read())) { - * decrypted += chunk.toString('utf8'); - * } - * }); - * decipher.on('end', () => { - * console.log(decrypted); - * // Prints: some clear text data - * }); - * - * // Encrypted with same algorithm, key and iv. - * const encrypted = - * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa'; - * decipher.write(encrypted, 'hex'); - * decipher.end(); - * ``` - * - * Example: Using `Decipher` and piped streams: - * - * ```js - * import { - * createReadStream, - * createWriteStream, - * } from 'node:fs'; - * import { Buffer } from 'node:buffer'; - * const { - * scryptSync, - * createDecipheriv, - * } = await import('node:crypto'); - * - * const algorithm = 'aes-192-cbc'; - * const password = 'Password used to generate key'; - * // Use the async `crypto.scrypt()` instead. - * const key = scryptSync(password, 'salt', 24); - * // The IV is usually passed along with the ciphertext. - * const iv = Buffer.alloc(16, 0); // Initialization vector. - * - * const decipher = createDecipheriv(algorithm, key, iv); - * - * const input = createReadStream('test.enc'); - * const output = createWriteStream('test.js'); - * - * input.pipe(decipher).pipe(output); - * ``` - * - * Example: Using the `decipher.update()` and `decipher.final()` methods: - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { - * scryptSync, - * createDecipheriv, - * } = await import('node:crypto'); - * - * const algorithm = 'aes-192-cbc'; - * const password = 'Password used to generate key'; - * // Use the async `crypto.scrypt()` instead. - * const key = scryptSync(password, 'salt', 24); - * // The IV is usually passed along with the ciphertext. - * const iv = Buffer.alloc(16, 0); // Initialization vector. - * - * const decipher = createDecipheriv(algorithm, key, iv); - * - * // Encrypted using same algorithm, key and iv. - * const encrypted = - * 'e5f79c5915c02171eec6b212d5520d44480993d7d622a7c4c2da32f6efda0ffa'; - * let decrypted = decipher.update(encrypted, 'hex', 'utf8'); - * decrypted += decipher.final('utf8'); - * console.log(decrypted); - * // Prints: some clear text data - * ``` - * @since v0.1.94 - */ - class Decipher extends stream.Transform { - private constructor(); - /** - * Updates the decipher with `data`. If the `inputEncoding` argument is given, - * the `data` argument is a string using the specified encoding. If the `inputEncoding` argument is not given, `data` must be a `Buffer`. If `data` is a `Buffer` then `inputEncoding` is - * ignored. - * - * The `outputEncoding` specifies the output format of the enciphered - * data. If the `outputEncoding` is specified, a string using the specified encoding is returned. If no `outputEncoding` is provided, a `Buffer` is returned. - * - * The `decipher.update()` method can be called multiple times with new data until `decipher.final()` is called. Calling `decipher.update()` after `decipher.final()` will result in an error - * being thrown. - * @since v0.1.94 - * @param inputEncoding The `encoding` of the `data` string. - * @param outputEncoding The `encoding` of the return value. - */ - update(data: NodeJS.ArrayBufferView): NonSharedBuffer; - update(data: string, inputEncoding: Encoding): NonSharedBuffer; - update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string; - update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string; - /** - * Once the `decipher.final()` method has been called, the `Decipher` object can - * no longer be used to decrypt data. Attempts to call `decipher.final()` more - * than once will result in an error being thrown. - * @since v0.1.94 - * @param outputEncoding The `encoding` of the return value. - * @return Any remaining deciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned. - */ - final(): NonSharedBuffer; - final(outputEncoding: BufferEncoding): string; - /** - * When data has been encrypted without standard block padding, calling `decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and - * removing padding. - * - * Turning auto padding off will only work if the input data's length is a - * multiple of the ciphers block size. - * - * The `decipher.setAutoPadding()` method must be called before `decipher.final()`. - * @since v0.7.1 - * @param [autoPadding=true] - * @return for method chaining. - */ - setAutoPadding(auto_padding?: boolean): this; - } - interface DecipherCCM extends Decipher { - setAuthTag(buffer: NodeJS.ArrayBufferView): this; - setAAD( - buffer: NodeJS.ArrayBufferView, - options: { - plaintextLength: number; - }, - ): this; - } - interface DecipherGCM extends Decipher { - setAuthTag(buffer: NodeJS.ArrayBufferView): this; - setAAD( - buffer: NodeJS.ArrayBufferView, - options?: { - plaintextLength: number; - }, - ): this; - } - interface DecipherOCB extends Decipher { - setAuthTag(buffer: NodeJS.ArrayBufferView): this; - setAAD( - buffer: NodeJS.ArrayBufferView, - options?: { - plaintextLength: number; - }, - ): this; - } - interface DecipherChaCha20Poly1305 extends Decipher { - setAuthTag(buffer: NodeJS.ArrayBufferView): this; - setAAD( - buffer: NodeJS.ArrayBufferView, - options: { - plaintextLength: number; - }, - ): this; - } - interface PrivateKeyInput { - key: string | Buffer; - format?: KeyFormat | undefined; - type?: "pkcs1" | "pkcs8" | "sec1" | undefined; - passphrase?: string | Buffer | undefined; - encoding?: string | undefined; - } - interface PublicKeyInput { - key: string | Buffer; - format?: KeyFormat | undefined; - type?: "pkcs1" | "spki" | undefined; - encoding?: string | undefined; - } - /** - * Asynchronously generates a new random secret key of the given `length`. The `type` will determine which validations will be performed on the `length`. - * - * ```js - * const { - * generateKey, - * } = await import('node:crypto'); - * - * generateKey('hmac', { length: 512 }, (err, key) => { - * if (err) throw err; - * console.log(key.export().toString('hex')); // 46e..........620 - * }); - * ``` - * - * The size of a generated HMAC key should not exceed the block size of the - * underlying hash function. See {@link createHmac} for more information. - * @since v15.0.0 - * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`. - */ - function generateKey( - type: "hmac" | "aes", - options: { - length: number; - }, - callback: (err: Error | null, key: KeyObject) => void, - ): void; - /** - * Synchronously generates a new random secret key of the given `length`. The `type` will determine which validations will be performed on the `length`. - * - * ```js - * const { - * generateKeySync, - * } = await import('node:crypto'); - * - * const key = generateKeySync('hmac', { length: 512 }); - * console.log(key.export().toString('hex')); // e89..........41e - * ``` - * - * The size of a generated HMAC key should not exceed the block size of the - * underlying hash function. See {@link createHmac} for more information. - * @since v15.0.0 - * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`. - */ - function generateKeySync( - type: "hmac" | "aes", - options: { - length: number; - }, - ): KeyObject; - interface JsonWebKeyInput { - key: JsonWebKey; - format: "jwk"; - } - /** - * Creates and returns a new key object containing a private key. If `key` is a - * string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key` must be an object with the properties described above. - * - * If the private key is encrypted, a `passphrase` must be specified. The length - * of the passphrase is limited to 1024 bytes. - * @since v11.6.0 - */ - function createPrivateKey(key: PrivateKeyInput | string | Buffer | JsonWebKeyInput): KeyObject; - /** - * Creates and returns a new key object containing a public key. If `key` is a - * string or `Buffer`, `format` is assumed to be `'pem'`; if `key` is a `KeyObject` with type `'private'`, the public key is derived from the given private key; - * otherwise, `key` must be an object with the properties described above. - * - * If the format is `'pem'`, the `'key'` may also be an X.509 certificate. - * - * Because public keys can be derived from private keys, a private key may be - * passed instead of a public key. In that case, this function behaves as if {@link createPrivateKey} had been called, except that the type of the - * returned `KeyObject` will be `'public'` and that the private key cannot be - * extracted from the returned `KeyObject`. Similarly, if a `KeyObject` with type `'private'` is given, a new `KeyObject` with type `'public'` will be returned - * and it will be impossible to extract the private key from the returned object. - * @since v11.6.0 - */ - function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject | JsonWebKeyInput): KeyObject; - /** - * Creates and returns a new key object containing a secret key for symmetric - * encryption or `Hmac`. - * @since v11.6.0 - * @param encoding The string encoding when `key` is a string. - */ - function createSecretKey(key: NodeJS.ArrayBufferView): KeyObject; - function createSecretKey(key: string, encoding: BufferEncoding): KeyObject; - /** - * Creates and returns a `Sign` object that uses the given `algorithm`. Use {@link getHashes} to obtain the names of the available digest algorithms. - * Optional `options` argument controls the `stream.Writable` behavior. - * - * In some cases, a `Sign` instance can be created using the name of a signature - * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use - * the corresponding digest algorithm. This does not work for all signature - * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest - * algorithm names. - * @since v0.1.92 - * @param options `stream.Writable` options - */ - function createSign(algorithm: string, options?: stream.WritableOptions): Sign; - type DSAEncoding = "der" | "ieee-p1363"; - interface SigningOptions { - /** - * @see crypto.constants.RSA_PKCS1_PADDING - */ - padding?: number | undefined; - saltLength?: number | undefined; - dsaEncoding?: DSAEncoding | undefined; - } - interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {} - interface SignKeyObjectInput extends SigningOptions { - key: KeyObject; - } - interface SignJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {} - interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {} - interface VerifyKeyObjectInput extends SigningOptions { - key: KeyObject; - } - interface VerifyJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {} - type KeyLike = string | Buffer | KeyObject; - /** - * The `Sign` class is a utility for generating signatures. It can be used in one - * of two ways: - * - * * As a writable `stream`, where data to be signed is written and the `sign.sign()` method is used to generate and return the signature, or - * * Using the `sign.update()` and `sign.sign()` methods to produce the - * signature. - * - * The {@link createSign} method is used to create `Sign` instances. The - * argument is the string name of the hash function to use. `Sign` objects are not - * to be created directly using the `new` keyword. - * - * Example: Using `Sign` and `Verify` objects as streams: - * - * ```js - * const { - * generateKeyPairSync, - * createSign, - * createVerify, - * } = await import('node:crypto'); - * - * const { privateKey, publicKey } = generateKeyPairSync('ec', { - * namedCurve: 'sect239k1', - * }); - * - * const sign = createSign('SHA256'); - * sign.write('some data to sign'); - * sign.end(); - * const signature = sign.sign(privateKey, 'hex'); - * - * const verify = createVerify('SHA256'); - * verify.write('some data to sign'); - * verify.end(); - * console.log(verify.verify(publicKey, signature, 'hex')); - * // Prints: true - * ``` - * - * Example: Using the `sign.update()` and `verify.update()` methods: - * - * ```js - * const { - * generateKeyPairSync, - * createSign, - * createVerify, - * } = await import('node:crypto'); - * - * const { privateKey, publicKey } = generateKeyPairSync('rsa', { - * modulusLength: 2048, - * }); - * - * const sign = createSign('SHA256'); - * sign.update('some data to sign'); - * sign.end(); - * const signature = sign.sign(privateKey); - * - * const verify = createVerify('SHA256'); - * verify.update('some data to sign'); - * verify.end(); - * console.log(verify.verify(publicKey, signature)); - * // Prints: true - * ``` - * @since v0.1.92 - */ - class Sign extends stream.Writable { - private constructor(); - /** - * Updates the `Sign` content with the given `data`, the encoding of which - * is given in `inputEncoding`. - * If `encoding` is not provided, and the `data` is a string, an - * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored. - * - * This can be called many times with new data as it is streamed. - * @since v0.1.92 - * @param inputEncoding The `encoding` of the `data` string. - */ - update(data: BinaryLike): this; - update(data: string, inputEncoding: Encoding): this; - /** - * Calculates the signature on all the data passed through using either `sign.update()` or `sign.write()`. - * - * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an - * object, the following additional properties can be passed: - * - * If `outputEncoding` is provided a string is returned; otherwise a `Buffer` is returned. - * - * The `Sign` object can not be again used after `sign.sign()` method has been - * called. Multiple calls to `sign.sign()` will result in an error being thrown. - * @since v0.1.92 - */ - sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput): NonSharedBuffer; - sign( - privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput, - outputFormat: BinaryToTextEncoding, - ): string; - } - /** - * Creates and returns a `Verify` object that uses the given algorithm. - * Use {@link getHashes} to obtain an array of names of the available - * signing algorithms. Optional `options` argument controls the `stream.Writable` behavior. - * - * In some cases, a `Verify` instance can be created using the name of a signature - * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use - * the corresponding digest algorithm. This does not work for all signature - * algorithms, such as `'ecdsa-with-SHA256'`, so it is best to always use digest - * algorithm names. - * @since v0.1.92 - * @param options `stream.Writable` options - */ - function createVerify(algorithm: string, options?: stream.WritableOptions): Verify; - /** - * The `Verify` class is a utility for verifying signatures. It can be used in one - * of two ways: - * - * * As a writable `stream` where written data is used to validate against the - * supplied signature, or - * * Using the `verify.update()` and `verify.verify()` methods to verify - * the signature. - * - * The {@link createVerify} method is used to create `Verify` instances. `Verify` objects are not to be created directly using the `new` keyword. - * - * See `Sign` for examples. - * @since v0.1.92 - */ - class Verify extends stream.Writable { - private constructor(); - /** - * Updates the `Verify` content with the given `data`, the encoding of which - * is given in `inputEncoding`. - * If `inputEncoding` is not provided, and the `data` is a string, an - * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or `DataView`, then `inputEncoding` is ignored. - * - * This can be called many times with new data as it is streamed. - * @since v0.1.92 - * @param inputEncoding The `encoding` of the `data` string. - */ - update(data: BinaryLike): Verify; - update(data: string, inputEncoding: Encoding): Verify; - /** - * Verifies the provided data using the given `object` and `signature`. - * - * If `object` is not a `KeyObject`, this function behaves as if `object` had been passed to {@link createPublicKey}. If it is an - * object, the following additional properties can be passed: - * - * The `signature` argument is the previously calculated signature for the data, in - * the `signatureEncoding`. - * If a `signatureEncoding` is specified, the `signature` is expected to be a - * string; otherwise `signature` is expected to be a `Buffer`, `TypedArray`, or `DataView`. - * - * The `verify` object can not be used again after `verify.verify()` has been - * called. Multiple calls to `verify.verify()` will result in an error being - * thrown. - * - * Because public keys can be derived from private keys, a private key may - * be passed instead of a public key. - * @since v0.1.92 - */ - verify( - object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, - signature: NodeJS.ArrayBufferView, - ): boolean; - verify( - object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, - signature: string, - signature_format?: BinaryToTextEncoding, - ): boolean; - } - /** - * Creates a `DiffieHellman` key exchange object using the supplied `prime` and an - * optional specific `generator`. - * - * The `generator` argument can be a number, string, or `Buffer`. If `generator` is not specified, the value `2` is used. - * - * If `primeEncoding` is specified, `prime` is expected to be a string; otherwise - * a `Buffer`, `TypedArray`, or `DataView` is expected. - * - * If `generatorEncoding` is specified, `generator` is expected to be a string; - * otherwise a number, `Buffer`, `TypedArray`, or `DataView` is expected. - * @since v0.11.12 - * @param primeEncoding The `encoding` of the `prime` string. - * @param [generator=2] - * @param generatorEncoding The `encoding` of the `generator` string. - */ - function createDiffieHellman(primeLength: number, generator?: number): DiffieHellman; - function createDiffieHellman( - prime: ArrayBuffer | NodeJS.ArrayBufferView, - generator?: number | ArrayBuffer | NodeJS.ArrayBufferView, - ): DiffieHellman; - function createDiffieHellman( - prime: ArrayBuffer | NodeJS.ArrayBufferView, - generator: string, - generatorEncoding: BinaryToTextEncoding, - ): DiffieHellman; - function createDiffieHellman( - prime: string, - primeEncoding: BinaryToTextEncoding, - generator?: number | ArrayBuffer | NodeJS.ArrayBufferView, - ): DiffieHellman; - function createDiffieHellman( - prime: string, - primeEncoding: BinaryToTextEncoding, - generator: string, - generatorEncoding: BinaryToTextEncoding, - ): DiffieHellman; - /** - * The `DiffieHellman` class is a utility for creating Diffie-Hellman key - * exchanges. - * - * Instances of the `DiffieHellman` class can be created using the {@link createDiffieHellman} function. - * - * ```js - * import assert from 'node:assert'; - * - * const { - * createDiffieHellman, - * } = await import('node:crypto'); - * - * // Generate Alice's keys... - * const alice = createDiffieHellman(2048); - * const aliceKey = alice.generateKeys(); - * - * // Generate Bob's keys... - * const bob = createDiffieHellman(alice.getPrime(), alice.getGenerator()); - * const bobKey = bob.generateKeys(); - * - * // Exchange and generate the secret... - * const aliceSecret = alice.computeSecret(bobKey); - * const bobSecret = bob.computeSecret(aliceKey); - * - * // OK - * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex')); - * ``` - * @since v0.5.0 - */ - class DiffieHellman { - private constructor(); - /** - * Generates private and public Diffie-Hellman key values unless they have been - * generated or computed already, and returns - * the public key in the specified `encoding`. This key should be - * transferred to the other party. - * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned. - * - * This function is a thin wrapper around [`DH_generate_key()`](https://www.openssl.org/docs/man3.0/man3/DH_generate_key.html). In particular, - * once a private key has been generated or set, calling this function only updates - * the public key but does not generate a new private key. - * @since v0.5.0 - * @param encoding The `encoding` of the return value. - */ - generateKeys(): NonSharedBuffer; - generateKeys(encoding: BinaryToTextEncoding): string; - /** - * Computes the shared secret using `otherPublicKey` as the other - * party's public key and returns the computed shared secret. The supplied - * key is interpreted using the specified `inputEncoding`, and secret is - * encoded using specified `outputEncoding`. - * If the `inputEncoding` is not - * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`. - * - * If `outputEncoding` is given a string is returned; otherwise, a `Buffer` is returned. - * @since v0.5.0 - * @param inputEncoding The `encoding` of an `otherPublicKey` string. - * @param outputEncoding The `encoding` of the return value. - */ - computeSecret( - otherPublicKey: NodeJS.ArrayBufferView, - inputEncoding?: null, - outputEncoding?: null, - ): NonSharedBuffer; - computeSecret( - otherPublicKey: string, - inputEncoding: BinaryToTextEncoding, - outputEncoding?: null, - ): NonSharedBuffer; - computeSecret( - otherPublicKey: NodeJS.ArrayBufferView, - inputEncoding: null, - outputEncoding: BinaryToTextEncoding, - ): string; - computeSecret( - otherPublicKey: string, - inputEncoding: BinaryToTextEncoding, - outputEncoding: BinaryToTextEncoding, - ): string; - /** - * Returns the Diffie-Hellman prime in the specified `encoding`. - * If `encoding` is provided a string is - * returned; otherwise a `Buffer` is returned. - * @since v0.5.0 - * @param encoding The `encoding` of the return value. - */ - getPrime(): NonSharedBuffer; - getPrime(encoding: BinaryToTextEncoding): string; - /** - * Returns the Diffie-Hellman generator in the specified `encoding`. - * If `encoding` is provided a string is - * returned; otherwise a `Buffer` is returned. - * @since v0.5.0 - * @param encoding The `encoding` of the return value. - */ - getGenerator(): NonSharedBuffer; - getGenerator(encoding: BinaryToTextEncoding): string; - /** - * Returns the Diffie-Hellman public key in the specified `encoding`. - * If `encoding` is provided a - * string is returned; otherwise a `Buffer` is returned. - * @since v0.5.0 - * @param encoding The `encoding` of the return value. - */ - getPublicKey(): NonSharedBuffer; - getPublicKey(encoding: BinaryToTextEncoding): string; - /** - * Returns the Diffie-Hellman private key in the specified `encoding`. - * If `encoding` is provided a - * string is returned; otherwise a `Buffer` is returned. - * @since v0.5.0 - * @param encoding The `encoding` of the return value. - */ - getPrivateKey(): NonSharedBuffer; - getPrivateKey(encoding: BinaryToTextEncoding): string; - /** - * Sets the Diffie-Hellman public key. If the `encoding` argument is provided, `publicKey` is expected - * to be a string. If no `encoding` is provided, `publicKey` is expected - * to be a `Buffer`, `TypedArray`, or `DataView`. - * @since v0.5.0 - * @param encoding The `encoding` of the `publicKey` string. - */ - setPublicKey(publicKey: NodeJS.ArrayBufferView): void; - setPublicKey(publicKey: string, encoding: BufferEncoding): void; - /** - * Sets the Diffie-Hellman private key. If the `encoding` argument is provided,`privateKey` is expected - * to be a string. If no `encoding` is provided, `privateKey` is expected - * to be a `Buffer`, `TypedArray`, or `DataView`. - * - * This function does not automatically compute the associated public key. Either `diffieHellman.setPublicKey()` or `diffieHellman.generateKeys()` can be - * used to manually provide the public key or to automatically derive it. - * @since v0.5.0 - * @param encoding The `encoding` of the `privateKey` string. - */ - setPrivateKey(privateKey: NodeJS.ArrayBufferView): void; - setPrivateKey(privateKey: string, encoding: BufferEncoding): void; - /** - * A bit field containing any warnings and/or errors resulting from a check - * performed during initialization of the `DiffieHellman` object. - * - * The following values are valid for this property (as defined in `node:constants` module): - * - * * `DH_CHECK_P_NOT_SAFE_PRIME` - * * `DH_CHECK_P_NOT_PRIME` - * * `DH_UNABLE_TO_CHECK_GENERATOR` - * * `DH_NOT_SUITABLE_GENERATOR` - * @since v0.11.12 - */ - verifyError: number; - } - /** - * The `DiffieHellmanGroup` class takes a well-known modp group as its argument. - * It works the same as `DiffieHellman`, except that it does not allow changing its keys after creation. - * In other words, it does not implement `setPublicKey()` or `setPrivateKey()` methods. - * - * ```js - * const { createDiffieHellmanGroup } = await import('node:crypto'); - * const dh = createDiffieHellmanGroup('modp1'); - * ``` - * The name (e.g. `'modp1'`) is taken from [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt) (modp1 and 2) and [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt): - * ```bash - * $ perl -ne 'print "$1\n" if /"(modp\d+)"/' src/node_crypto_groups.h - * modp1 # 768 bits - * modp2 # 1024 bits - * modp5 # 1536 bits - * modp14 # 2048 bits - * modp15 # etc. - * modp16 - * modp17 - * modp18 - * ``` - * @since v0.7.5 - */ - const DiffieHellmanGroup: DiffieHellmanGroupConstructor; - interface DiffieHellmanGroupConstructor { - new(name: string): DiffieHellmanGroup; - (name: string): DiffieHellmanGroup; - readonly prototype: DiffieHellmanGroup; - } - type DiffieHellmanGroup = Omit; - /** - * Creates a predefined `DiffieHellmanGroup` key exchange object. The - * supported groups are listed in the documentation for `DiffieHellmanGroup`. - * - * The returned object mimics the interface of objects created by {@link createDiffieHellman}, but will not allow changing - * the keys (with `diffieHellman.setPublicKey()`, for example). The - * advantage of using this method is that the parties do not have to - * generate nor exchange a group modulus beforehand, saving both processor - * and communication time. - * - * Example (obtaining a shared secret): - * - * ```js - * const { - * getDiffieHellman, - * } = await import('node:crypto'); - * const alice = getDiffieHellman('modp14'); - * const bob = getDiffieHellman('modp14'); - * - * alice.generateKeys(); - * bob.generateKeys(); - * - * const aliceSecret = alice.computeSecret(bob.getPublicKey(), null, 'hex'); - * const bobSecret = bob.computeSecret(alice.getPublicKey(), null, 'hex'); - * - * // aliceSecret and bobSecret should be the same - * console.log(aliceSecret === bobSecret); - * ``` - * @since v0.7.5 - */ - function getDiffieHellman(groupName: string): DiffieHellmanGroup; - /** - * An alias for {@link getDiffieHellman} - * @since v0.9.3 - */ - function createDiffieHellmanGroup(name: string): DiffieHellmanGroup; - /** - * Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2) - * implementation. A selected HMAC digest algorithm specified by `digest` is - * applied to derive a key of the requested byte length (`keylen`) from the `password`, `salt` and `iterations`. - * - * The supplied `callback` function is called with two arguments: `err` and `derivedKey`. If an error occurs while deriving the key, `err` will be set; - * otherwise `err` will be `null`. By default, the successfully generated `derivedKey` will be passed to the callback as a `Buffer`. An error will be - * thrown if any of the input arguments specify invalid values or types. - * - * The `iterations` argument must be a number set as high as possible. The - * higher the number of iterations, the more secure the derived key will be, - * but will take a longer amount of time to complete. - * - * The `salt` should be as unique as possible. It is recommended that a salt is - * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. - * - * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. - * - * ```js - * const { - * pbkdf2, - * } = await import('node:crypto'); - * - * pbkdf2('secret', 'salt', 100000, 64, 'sha512', (err, derivedKey) => { - * if (err) throw err; - * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae' - * }); - * ``` - * - * An array of supported digest functions can be retrieved using {@link getHashes}. - * - * This API uses libuv's threadpool, which can have surprising and - * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. - * @since v0.5.5 - */ - function pbkdf2( - password: BinaryLike, - salt: BinaryLike, - iterations: number, - keylen: number, - digest: string, - callback: (err: Error | null, derivedKey: NonSharedBuffer) => void, - ): void; - /** - * Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2) - * implementation. A selected HMAC digest algorithm specified by `digest` is - * applied to derive a key of the requested byte length (`keylen`) from the `password`, `salt` and `iterations`. - * - * If an error occurs an `Error` will be thrown, otherwise the derived key will be - * returned as a `Buffer`. - * - * The `iterations` argument must be a number set as high as possible. The - * higher the number of iterations, the more secure the derived key will be, - * but will take a longer amount of time to complete. - * - * The `salt` should be as unique as possible. It is recommended that a salt is - * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. - * - * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. - * - * ```js - * const { - * pbkdf2Sync, - * } = await import('node:crypto'); - * - * const key = pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512'); - * console.log(key.toString('hex')); // '3745e48...08d59ae' - * ``` - * - * An array of supported digest functions can be retrieved using {@link getHashes}. - * @since v0.9.3 - */ - function pbkdf2Sync( - password: BinaryLike, - salt: BinaryLike, - iterations: number, - keylen: number, - digest: string, - ): NonSharedBuffer; - /** - * Generates cryptographically strong pseudorandom data. The `size` argument - * is a number indicating the number of bytes to generate. - * - * If a `callback` function is provided, the bytes are generated asynchronously - * and the `callback` function is invoked with two arguments: `err` and `buf`. - * If an error occurs, `err` will be an `Error` object; otherwise it is `null`. The `buf` argument is a `Buffer` containing the generated bytes. - * - * ```js - * // Asynchronous - * const { - * randomBytes, - * } = await import('node:crypto'); - * - * randomBytes(256, (err, buf) => { - * if (err) throw err; - * console.log(`${buf.length} bytes of random data: ${buf.toString('hex')}`); - * }); - * ``` - * - * If the `callback` function is not provided, the random bytes are generated - * synchronously and returned as a `Buffer`. An error will be thrown if - * there is a problem generating the bytes. - * - * ```js - * // Synchronous - * const { - * randomBytes, - * } = await import('node:crypto'); - * - * const buf = randomBytes(256); - * console.log( - * `${buf.length} bytes of random data: ${buf.toString('hex')}`); - * ``` - * - * The `crypto.randomBytes()` method will not complete until there is - * sufficient entropy available. - * This should normally never take longer than a few milliseconds. The only time - * when generating the random bytes may conceivably block for a longer period of - * time is right after boot, when the whole system is still low on entropy. - * - * This API uses libuv's threadpool, which can have surprising and - * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. - * - * The asynchronous version of `crypto.randomBytes()` is carried out in a single - * threadpool request. To minimize threadpool task length variation, partition - * large `randomBytes` requests when doing so as part of fulfilling a client - * request. - * @since v0.5.8 - * @param size The number of bytes to generate. The `size` must not be larger than `2**31 - 1`. - * @return if the `callback` function is not provided. - */ - function randomBytes(size: number): NonSharedBuffer; - function randomBytes(size: number, callback: (err: Error | null, buf: NonSharedBuffer) => void): void; - function pseudoRandomBytes(size: number): NonSharedBuffer; - function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: NonSharedBuffer) => void): void; - /** - * Return a random integer `n` such that `min <= n < max`. This - * implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias). - * - * The range (`max - min`) must be less than 2**48. `min` and `max` must - * be [safe integers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger). - * - * If the `callback` function is not provided, the random integer is - * generated synchronously. - * - * ```js - * // Asynchronous - * const { - * randomInt, - * } = await import('node:crypto'); - * - * randomInt(3, (err, n) => { - * if (err) throw err; - * console.log(`Random number chosen from (0, 1, 2): ${n}`); - * }); - * ``` - * - * ```js - * // Synchronous - * const { - * randomInt, - * } = await import('node:crypto'); - * - * const n = randomInt(3); - * console.log(`Random number chosen from (0, 1, 2): ${n}`); - * ``` - * - * ```js - * // With `min` argument - * const { - * randomInt, - * } = await import('node:crypto'); - * - * const n = randomInt(1, 7); - * console.log(`The dice rolled: ${n}`); - * ``` - * @since v14.10.0, v12.19.0 - * @param [min=0] Start of random range (inclusive). - * @param max End of random range (exclusive). - * @param callback `function(err, n) {}`. - */ - function randomInt(max: number): number; - function randomInt(min: number, max: number): number; - function randomInt(max: number, callback: (err: Error | null, value: number) => void): void; - function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void; - /** - * Synchronous version of {@link randomFill}. - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { randomFillSync } = await import('node:crypto'); - * - * const buf = Buffer.alloc(10); - * console.log(randomFillSync(buf).toString('hex')); - * - * randomFillSync(buf, 5); - * console.log(buf.toString('hex')); - * - * // The above is equivalent to the following: - * randomFillSync(buf, 5, 5); - * console.log(buf.toString('hex')); - * ``` - * - * Any `ArrayBuffer`, `TypedArray` or `DataView` instance may be passed as`buffer`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { randomFillSync } = await import('node:crypto'); - * - * const a = new Uint32Array(10); - * console.log(Buffer.from(randomFillSync(a).buffer, - * a.byteOffset, a.byteLength).toString('hex')); - * - * const b = new DataView(new ArrayBuffer(10)); - * console.log(Buffer.from(randomFillSync(b).buffer, - * b.byteOffset, b.byteLength).toString('hex')); - * - * const c = new ArrayBuffer(10); - * console.log(Buffer.from(randomFillSync(c)).toString('hex')); - * ``` - * @since v7.10.0, v6.13.0 - * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`. - * @param [offset=0] - * @param [size=buffer.length - offset] - * @return The object passed as `buffer` argument. - */ - function randomFillSync(buffer: T, offset?: number, size?: number): T; - /** - * This function is similar to {@link randomBytes} but requires the first - * argument to be a `Buffer` that will be filled. It also - * requires that a callback is passed in. - * - * If the `callback` function is not provided, an error will be thrown. - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { randomFill } = await import('node:crypto'); - * - * const buf = Buffer.alloc(10); - * randomFill(buf, (err, buf) => { - * if (err) throw err; - * console.log(buf.toString('hex')); - * }); - * - * randomFill(buf, 5, (err, buf) => { - * if (err) throw err; - * console.log(buf.toString('hex')); - * }); - * - * // The above is equivalent to the following: - * randomFill(buf, 5, 5, (err, buf) => { - * if (err) throw err; - * console.log(buf.toString('hex')); - * }); - * ``` - * - * Any `ArrayBuffer`, `TypedArray`, or `DataView` instance may be passed as `buffer`. - * - * While this includes instances of `Float32Array` and `Float64Array`, this - * function should not be used to generate random floating-point numbers. The - * result may contain `+Infinity`, `-Infinity`, and `NaN`, and even if the array - * contains finite numbers only, they are not drawn from a uniform random - * distribution and have no meaningful lower or upper bounds. - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { randomFill } = await import('node:crypto'); - * - * const a = new Uint32Array(10); - * randomFill(a, (err, buf) => { - * if (err) throw err; - * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength) - * .toString('hex')); - * }); - * - * const b = new DataView(new ArrayBuffer(10)); - * randomFill(b, (err, buf) => { - * if (err) throw err; - * console.log(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength) - * .toString('hex')); - * }); - * - * const c = new ArrayBuffer(10); - * randomFill(c, (err, buf) => { - * if (err) throw err; - * console.log(Buffer.from(buf).toString('hex')); - * }); - * ``` - * - * This API uses libuv's threadpool, which can have surprising and - * negative performance implications for some applications; see the `UV_THREADPOOL_SIZE` documentation for more information. - * - * The asynchronous version of `crypto.randomFill()` is carried out in a single - * threadpool request. To minimize threadpool task length variation, partition - * large `randomFill` requests when doing so as part of fulfilling a client - * request. - * @since v7.10.0, v6.13.0 - * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`. - * @param [offset=0] - * @param [size=buffer.length - offset] - * @param callback `function(err, buf) {}`. - */ - function randomFill( - buffer: T, - callback: (err: Error | null, buf: T) => void, - ): void; - function randomFill( - buffer: T, - offset: number, - callback: (err: Error | null, buf: T) => void, - ): void; - function randomFill( - buffer: T, - offset: number, - size: number, - callback: (err: Error | null, buf: T) => void, - ): void; - interface ScryptOptions { - cost?: number | undefined; - blockSize?: number | undefined; - parallelization?: number | undefined; - N?: number | undefined; - r?: number | undefined; - p?: number | undefined; - maxmem?: number | undefined; - } - /** - * Provides an asynchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based - * key derivation function that is designed to be expensive computationally and - * memory-wise in order to make brute-force attacks unrewarding. - * - * The `salt` should be as unique as possible. It is recommended that a salt is - * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. - * - * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. - * - * The `callback` function is called with two arguments: `err` and `derivedKey`. `err` is an exception object when key derivation fails, otherwise `err` is `null`. `derivedKey` is passed to the - * callback as a `Buffer`. - * - * An exception is thrown when any of the input arguments specify invalid values - * or types. - * - * ```js - * const { - * scrypt, - * } = await import('node:crypto'); - * - * // Using the factory defaults. - * scrypt('password', 'salt', 64, (err, derivedKey) => { - * if (err) throw err; - * console.log(derivedKey.toString('hex')); // '3745e48...08d59ae' - * }); - * // Using a custom N parameter. Must be a power of two. - * scrypt('password', 'salt', 64, { N: 1024 }, (err, derivedKey) => { - * if (err) throw err; - * console.log(derivedKey.toString('hex')); // '3745e48...aa39b34' - * }); - * ``` - * @since v10.5.0 - */ - function scrypt( - password: BinaryLike, - salt: BinaryLike, - keylen: number, - callback: (err: Error | null, derivedKey: NonSharedBuffer) => void, - ): void; - function scrypt( - password: BinaryLike, - salt: BinaryLike, - keylen: number, - options: ScryptOptions, - callback: (err: Error | null, derivedKey: NonSharedBuffer) => void, - ): void; - /** - * Provides a synchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based - * key derivation function that is designed to be expensive computationally and - * memory-wise in order to make brute-force attacks unrewarding. - * - * The `salt` should be as unique as possible. It is recommended that a salt is - * random and at least 16 bytes long. See [NIST SP 800-132](https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf) for details. - * - * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`. - * - * An exception is thrown when key derivation fails, otherwise the derived key is - * returned as a `Buffer`. - * - * An exception is thrown when any of the input arguments specify invalid values - * or types. - * - * ```js - * const { - * scryptSync, - * } = await import('node:crypto'); - * // Using the factory defaults. - * - * const key1 = scryptSync('password', 'salt', 64); - * console.log(key1.toString('hex')); // '3745e48...08d59ae' - * // Using a custom N parameter. Must be a power of two. - * const key2 = scryptSync('password', 'salt', 64, { N: 1024 }); - * console.log(key2.toString('hex')); // '3745e48...aa39b34' - * ``` - * @since v10.5.0 - */ - function scryptSync( - password: BinaryLike, - salt: BinaryLike, - keylen: number, - options?: ScryptOptions, - ): NonSharedBuffer; - interface RsaPublicKey { - key: KeyLike; - padding?: number | undefined; - } - interface RsaPrivateKey { - key: KeyLike; - passphrase?: string | undefined; - /** - * @default 'sha1' - */ - oaepHash?: string | undefined; - oaepLabel?: NodeJS.TypedArray | undefined; - padding?: number | undefined; - } - /** - * Encrypts the content of `buffer` with `key` and returns a new `Buffer` with encrypted content. The returned data can be decrypted using - * the corresponding private key, for example using {@link privateDecrypt}. - * - * If `key` is not a `KeyObject`, this function behaves as if `key` had been passed to {@link createPublicKey}. If it is an - * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`. - * - * Because RSA public keys can be derived from private keys, a private key may - * be passed instead of a public key. - * @since v0.11.14 - */ - function publicEncrypt( - key: RsaPublicKey | RsaPrivateKey | KeyLike, - buffer: NodeJS.ArrayBufferView, - ): NonSharedBuffer; - /** - * Decrypts `buffer` with `key`.`buffer` was previously encrypted using - * the corresponding private key, for example using {@link privateEncrypt}. - * - * If `key` is not a `KeyObject`, this function behaves as if `key` had been passed to {@link createPublicKey}. If it is an - * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`. - * - * Because RSA public keys can be derived from private keys, a private key may - * be passed instead of a public key. - * @since v1.1.0 - */ - function publicDecrypt( - key: RsaPublicKey | RsaPrivateKey | KeyLike, - buffer: NodeJS.ArrayBufferView, - ): NonSharedBuffer; - /** - * Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using - * the corresponding public key, for example using {@link publicEncrypt}. - * - * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an - * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`. - * @since v0.11.14 - */ - function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): NonSharedBuffer; - /** - * Encrypts `buffer` with `privateKey`. The returned data can be decrypted using - * the corresponding public key, for example using {@link publicDecrypt}. - * - * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an - * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`. - * @since v1.1.0 - */ - function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): NonSharedBuffer; - /** - * ```js - * const { - * getCiphers, - * } = await import('node:crypto'); - * - * console.log(getCiphers()); // ['aes-128-cbc', 'aes-128-ccm', ...] - * ``` - * @since v0.9.3 - * @return An array with the names of the supported cipher algorithms. - */ - function getCiphers(): string[]; - /** - * ```js - * const { - * getCurves, - * } = await import('node:crypto'); - * - * console.log(getCurves()); // ['Oakley-EC2N-3', 'Oakley-EC2N-4', ...] - * ``` - * @since v2.3.0 - * @return An array with the names of the supported elliptic curves. - */ - function getCurves(): string[]; - /** - * @since v10.0.0 - * @return `1` if and only if a FIPS compliant crypto provider is currently in use, `0` otherwise. A future semver-major release may change the return type of this API to a {boolean}. - */ - function getFips(): 1 | 0; - /** - * Enables the FIPS compliant crypto provider in a FIPS-enabled Node.js build. - * Throws an error if FIPS mode is not available. - * @since v10.0.0 - * @param bool `true` to enable FIPS mode. - */ - function setFips(bool: boolean): void; - /** - * ```js - * const { - * getHashes, - * } = await import('node:crypto'); - * - * console.log(getHashes()); // ['DSA', 'DSA-SHA', 'DSA-SHA1', ...] - * ``` - * @since v0.9.3 - * @return An array of the names of the supported hash algorithms, such as `'RSA-SHA256'`. Hash algorithms are also called "digest" algorithms. - */ - function getHashes(): string[]; - /** - * The `ECDH` class is a utility for creating Elliptic Curve Diffie-Hellman (ECDH) - * key exchanges. - * - * Instances of the `ECDH` class can be created using the {@link createECDH} function. - * - * ```js - * import assert from 'node:assert'; - * - * const { - * createECDH, - * } = await import('node:crypto'); - * - * // Generate Alice's keys... - * const alice = createECDH('secp521r1'); - * const aliceKey = alice.generateKeys(); - * - * // Generate Bob's keys... - * const bob = createECDH('secp521r1'); - * const bobKey = bob.generateKeys(); - * - * // Exchange and generate the secret... - * const aliceSecret = alice.computeSecret(bobKey); - * const bobSecret = bob.computeSecret(aliceKey); - * - * assert.strictEqual(aliceSecret.toString('hex'), bobSecret.toString('hex')); - * // OK - * ``` - * @since v0.11.14 - */ - class ECDH { - private constructor(); - /** - * Converts the EC Diffie-Hellman public key specified by `key` and `curve` to the - * format specified by `format`. The `format` argument specifies point encoding - * and can be `'compressed'`, `'uncompressed'` or `'hybrid'`. The supplied key is - * interpreted using the specified `inputEncoding`, and the returned key is encoded - * using the specified `outputEncoding`. - * - * Use {@link getCurves} to obtain a list of available curve names. - * On recent OpenSSL releases, `openssl ecparam -list_curves` will also display - * the name and description of each available elliptic curve. - * - * If `format` is not specified the point will be returned in `'uncompressed'` format. - * - * If the `inputEncoding` is not provided, `key` is expected to be a `Buffer`, `TypedArray`, or `DataView`. - * - * Example (uncompressing a key): - * - * ```js - * const { - * createECDH, - * ECDH, - * } = await import('node:crypto'); - * - * const ecdh = createECDH('secp256k1'); - * ecdh.generateKeys(); - * - * const compressedKey = ecdh.getPublicKey('hex', 'compressed'); - * - * const uncompressedKey = ECDH.convertKey(compressedKey, - * 'secp256k1', - * 'hex', - * 'hex', - * 'uncompressed'); - * - * // The converted key and the uncompressed public key should be the same - * console.log(uncompressedKey === ecdh.getPublicKey('hex')); - * ``` - * @since v10.0.0 - * @param inputEncoding The `encoding` of the `key` string. - * @param outputEncoding The `encoding` of the return value. - * @param [format='uncompressed'] - */ - static convertKey( - key: BinaryLike, - curve: string, - inputEncoding?: BinaryToTextEncoding, - outputEncoding?: "latin1" | "hex" | "base64" | "base64url", - format?: "uncompressed" | "compressed" | "hybrid", - ): NonSharedBuffer | string; - /** - * Generates private and public EC Diffie-Hellman key values, and returns - * the public key in the specified `format` and `encoding`. This key should be - * transferred to the other party. - * - * The `format` argument specifies point encoding and can be `'compressed'` or `'uncompressed'`. If `format` is not specified, the point will be returned in`'uncompressed'` format. - * - * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned. - * @since v0.11.14 - * @param encoding The `encoding` of the return value. - * @param [format='uncompressed'] - */ - generateKeys(): NonSharedBuffer; - generateKeys(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string; - /** - * Computes the shared secret using `otherPublicKey` as the other - * party's public key and returns the computed shared secret. The supplied - * key is interpreted using specified `inputEncoding`, and the returned secret - * is encoded using the specified `outputEncoding`. - * If the `inputEncoding` is not - * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`. - * - * If `outputEncoding` is given a string will be returned; otherwise a `Buffer` is returned. - * - * `ecdh.computeSecret` will throw an`ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY` error when `otherPublicKey` lies outside of the elliptic curve. Since `otherPublicKey` is - * usually supplied from a remote user over an insecure network, - * be sure to handle this exception accordingly. - * @since v0.11.14 - * @param inputEncoding The `encoding` of the `otherPublicKey` string. - * @param outputEncoding The `encoding` of the return value. - */ - computeSecret(otherPublicKey: NodeJS.ArrayBufferView): NonSharedBuffer; - computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): NonSharedBuffer; - computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string; - computeSecret( - otherPublicKey: string, - inputEncoding: BinaryToTextEncoding, - outputEncoding: BinaryToTextEncoding, - ): string; - /** - * If `encoding` is specified, a string is returned; otherwise a `Buffer` is - * returned. - * @since v0.11.14 - * @param encoding The `encoding` of the return value. - * @return The EC Diffie-Hellman in the specified `encoding`. - */ - getPrivateKey(): NonSharedBuffer; - getPrivateKey(encoding: BinaryToTextEncoding): string; - /** - * The `format` argument specifies point encoding and can be `'compressed'` or `'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format. - * - * If `encoding` is specified, a string is returned; otherwise a `Buffer` is - * returned. - * @since v0.11.14 - * @param encoding The `encoding` of the return value. - * @param [format='uncompressed'] - * @return The EC Diffie-Hellman public key in the specified `encoding` and `format`. - */ - getPublicKey(encoding?: null, format?: ECDHKeyFormat): NonSharedBuffer; - getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string; - /** - * Sets the EC Diffie-Hellman private key. - * If `encoding` is provided, `privateKey` is expected - * to be a string; otherwise `privateKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`. - * - * If `privateKey` is not valid for the curve specified when the `ECDH` object was - * created, an error is thrown. Upon setting the private key, the associated - * public point (key) is also generated and set in the `ECDH` object. - * @since v0.11.14 - * @param encoding The `encoding` of the `privateKey` string. - */ - setPrivateKey(privateKey: NodeJS.ArrayBufferView): void; - setPrivateKey(privateKey: string, encoding: BinaryToTextEncoding): void; - } - /** - * Creates an Elliptic Curve Diffie-Hellman (`ECDH`) key exchange object using a - * predefined curve specified by the `curveName` string. Use {@link getCurves} to obtain a list of available curve names. On recent - * OpenSSL releases, `openssl ecparam -list_curves` will also display the name - * and description of each available elliptic curve. - * @since v0.11.14 - */ - function createECDH(curveName: string): ECDH; - /** - * This function compares the underlying bytes that represent the given `ArrayBuffer`, `TypedArray`, or `DataView` instances using a constant-time - * algorithm. - * - * This function does not leak timing information that - * would allow an attacker to guess one of the values. This is suitable for - * comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/). - * - * `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they - * must have the same byte length. An error is thrown if `a` and `b` have - * different byte lengths. - * - * If at least one of `a` and `b` is a `TypedArray` with more than one byte per - * entry, such as `Uint16Array`, the result will be computed using the platform - * byte order. - * - * **When both of the inputs are `Float32Array`s or `Float64Array`s, this function might return unexpected results due to IEEE 754** - * **encoding of floating-point numbers. In particular, neither `x === y` nor `Object.is(x, y)` implies that the byte representations of two floating-point** - * **numbers `x` and `y` are equal.** - * - * Use of `crypto.timingSafeEqual` does not guarantee that the _surrounding_ code - * is timing-safe. Care should be taken to ensure that the surrounding code does - * not introduce timing vulnerabilities. - * @since v6.6.0 - */ - function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean; - type KeyType = "rsa" | "rsa-pss" | "dsa" | "ec" | "ed25519" | "ed448" | "x25519" | "x448"; - type KeyFormat = "pem" | "der" | "jwk"; - interface BasePrivateKeyEncodingOptions { - format: T; - cipher?: string | undefined; - passphrase?: string | undefined; - } - interface KeyPairKeyObjectResult { - publicKey: KeyObject; - privateKey: KeyObject; - } - interface ED25519KeyPairKeyObjectOptions {} - interface ED448KeyPairKeyObjectOptions {} - interface X25519KeyPairKeyObjectOptions {} - interface X448KeyPairKeyObjectOptions {} - interface ECKeyPairKeyObjectOptions { - /** - * Name of the curve to use - */ - namedCurve: string; - /** - * Must be `'named'` or `'explicit'`. Default: `'named'`. - */ - paramEncoding?: "explicit" | "named" | undefined; - } - interface RSAKeyPairKeyObjectOptions { - /** - * Key size in bits - */ - modulusLength: number; - /** - * Public exponent - * @default 0x10001 - */ - publicExponent?: number | undefined; - } - interface RSAPSSKeyPairKeyObjectOptions { - /** - * Key size in bits - */ - modulusLength: number; - /** - * Public exponent - * @default 0x10001 - */ - publicExponent?: number | undefined; - /** - * Name of the message digest - */ - hashAlgorithm?: string | undefined; - /** - * Name of the message digest used by MGF1 - */ - mgf1HashAlgorithm?: string | undefined; - /** - * Minimal salt length in bytes - */ - saltLength?: string | undefined; - } - interface DSAKeyPairKeyObjectOptions { - /** - * Key size in bits - */ - modulusLength: number; - /** - * Size of q in bits - */ - divisorLength: number; - } - interface RSAKeyPairOptions { - /** - * Key size in bits - */ - modulusLength: number; - /** - * Public exponent - * @default 0x10001 - */ - publicExponent?: number | undefined; - publicKeyEncoding: { - type: "pkcs1" | "spki"; - format: PubF; - }; - privateKeyEncoding: BasePrivateKeyEncodingOptions & { - type: "pkcs1" | "pkcs8"; - }; - } - interface RSAPSSKeyPairOptions { - /** - * Key size in bits - */ - modulusLength: number; - /** - * Public exponent - * @default 0x10001 - */ - publicExponent?: number | undefined; - /** - * Name of the message digest - */ - hashAlgorithm?: string | undefined; - /** - * Name of the message digest used by MGF1 - */ - mgf1HashAlgorithm?: string | undefined; - /** - * Minimal salt length in bytes - */ - saltLength?: string | undefined; - publicKeyEncoding: { - type: "spki"; - format: PubF; - }; - privateKeyEncoding: BasePrivateKeyEncodingOptions & { - type: "pkcs8"; - }; - } - interface DSAKeyPairOptions { - /** - * Key size in bits - */ - modulusLength: number; - /** - * Size of q in bits - */ - divisorLength: number; - publicKeyEncoding: { - type: "spki"; - format: PubF; - }; - privateKeyEncoding: BasePrivateKeyEncodingOptions & { - type: "pkcs8"; - }; - } - interface ECKeyPairOptions extends ECKeyPairKeyObjectOptions { - publicKeyEncoding: { - type: "pkcs1" | "spki"; - format: PubF; - }; - privateKeyEncoding: BasePrivateKeyEncodingOptions & { - type: "sec1" | "pkcs8"; - }; - } - interface ED25519KeyPairOptions { - publicKeyEncoding: { - type: "spki"; - format: PubF; - }; - privateKeyEncoding: BasePrivateKeyEncodingOptions & { - type: "pkcs8"; - }; - } - interface ED448KeyPairOptions { - publicKeyEncoding: { - type: "spki"; - format: PubF; - }; - privateKeyEncoding: BasePrivateKeyEncodingOptions & { - type: "pkcs8"; - }; - } - interface X25519KeyPairOptions { - publicKeyEncoding: { - type: "spki"; - format: PubF; - }; - privateKeyEncoding: BasePrivateKeyEncodingOptions & { - type: "pkcs8"; - }; - } - interface X448KeyPairOptions { - publicKeyEncoding: { - type: "spki"; - format: PubF; - }; - privateKeyEncoding: BasePrivateKeyEncodingOptions & { - type: "pkcs8"; - }; - } - interface KeyPairSyncResult { - publicKey: T1; - privateKey: T2; - } - /** - * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC, - * Ed25519, Ed448, X25519, X448, and DH are currently supported. - * - * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function - * behaves as if `keyObject.export()` had been called on its result. Otherwise, - * the respective part of the key is returned as a `KeyObject`. - * - * When encoding public keys, it is recommended to use `'spki'`. When encoding - * private keys, it is recommended to use `'pkcs8'` with a strong passphrase, - * and to keep the passphrase confidential. - * - * ```js - * const { - * generateKeyPairSync, - * } = await import('node:crypto'); - * - * const { - * publicKey, - * privateKey, - * } = generateKeyPairSync('rsa', { - * modulusLength: 4096, - * publicKeyEncoding: { - * type: 'spki', - * format: 'pem', - * }, - * privateKeyEncoding: { - * type: 'pkcs8', - * format: 'pem', - * cipher: 'aes-256-cbc', - * passphrase: 'top secret', - * }, - * }); - * ``` - * - * The return value `{ publicKey, privateKey }` represents the generated key pair. - * When PEM encoding was selected, the respective key will be a string, otherwise - * it will be a buffer containing the data encoded as DER. - * @since v10.12.0 - * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`. - */ - function generateKeyPairSync( - type: "rsa", - options: RSAKeyPairOptions<"pem", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "rsa", - options: RSAKeyPairOptions<"pem", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "rsa", - options: RSAKeyPairOptions<"der", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "rsa", - options: RSAKeyPairOptions<"der", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync(type: "rsa", options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult; - function generateKeyPairSync( - type: "rsa-pss", - options: RSAPSSKeyPairOptions<"pem", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "rsa-pss", - options: RSAPSSKeyPairOptions<"pem", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "rsa-pss", - options: RSAPSSKeyPairOptions<"der", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "rsa-pss", - options: RSAPSSKeyPairOptions<"der", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync(type: "rsa-pss", options: RSAPSSKeyPairKeyObjectOptions): KeyPairKeyObjectResult; - function generateKeyPairSync( - type: "dsa", - options: DSAKeyPairOptions<"pem", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "dsa", - options: DSAKeyPairOptions<"pem", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "dsa", - options: DSAKeyPairOptions<"der", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "dsa", - options: DSAKeyPairOptions<"der", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync(type: "dsa", options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult; - function generateKeyPairSync( - type: "ec", - options: ECKeyPairOptions<"pem", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "ec", - options: ECKeyPairOptions<"pem", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "ec", - options: ECKeyPairOptions<"der", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "ec", - options: ECKeyPairOptions<"der", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync(type: "ec", options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult; - function generateKeyPairSync( - type: "ed25519", - options: ED25519KeyPairOptions<"pem", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "ed25519", - options: ED25519KeyPairOptions<"pem", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "ed25519", - options: ED25519KeyPairOptions<"der", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "ed25519", - options: ED25519KeyPairOptions<"der", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync(type: "ed25519", options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult; - function generateKeyPairSync( - type: "ed448", - options: ED448KeyPairOptions<"pem", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "ed448", - options: ED448KeyPairOptions<"pem", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "ed448", - options: ED448KeyPairOptions<"der", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "ed448", - options: ED448KeyPairOptions<"der", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync(type: "ed448", options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult; - function generateKeyPairSync( - type: "x25519", - options: X25519KeyPairOptions<"pem", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "x25519", - options: X25519KeyPairOptions<"pem", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "x25519", - options: X25519KeyPairOptions<"der", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "x25519", - options: X25519KeyPairOptions<"der", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync(type: "x25519", options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult; - function generateKeyPairSync( - type: "x448", - options: X448KeyPairOptions<"pem", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "x448", - options: X448KeyPairOptions<"pem", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "x448", - options: X448KeyPairOptions<"der", "pem">, - ): KeyPairSyncResult; - function generateKeyPairSync( - type: "x448", - options: X448KeyPairOptions<"der", "der">, - ): KeyPairSyncResult; - function generateKeyPairSync(type: "x448", options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult; - /** - * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC, - * Ed25519, Ed448, X25519, X448, and DH are currently supported. - * - * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function - * behaves as if `keyObject.export()` had been called on its result. Otherwise, - * the respective part of the key is returned as a `KeyObject`. - * - * It is recommended to encode public keys as `'spki'` and private keys as `'pkcs8'` with encryption for long-term storage: - * - * ```js - * const { - * generateKeyPair, - * } = await import('node:crypto'); - * - * generateKeyPair('rsa', { - * modulusLength: 4096, - * publicKeyEncoding: { - * type: 'spki', - * format: 'pem', - * }, - * privateKeyEncoding: { - * type: 'pkcs8', - * format: 'pem', - * cipher: 'aes-256-cbc', - * passphrase: 'top secret', - * }, - * }, (err, publicKey, privateKey) => { - * // Handle errors and use the generated key pair. - * }); - * ``` - * - * On completion, `callback` will be called with `err` set to `undefined` and `publicKey` / `privateKey` representing the generated key pair. - * - * If this method is invoked as its `util.promisify()` ed version, it returns - * a `Promise` for an `Object` with `publicKey` and `privateKey` properties. - * @since v10.12.0 - * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`. - */ - function generateKeyPair( - type: "rsa", - options: RSAKeyPairOptions<"pem", "pem">, - callback: (err: Error | null, publicKey: string, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "rsa", - options: RSAKeyPairOptions<"pem", "der">, - callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void, - ): void; - function generateKeyPair( - type: "rsa", - options: RSAKeyPairOptions<"der", "pem">, - callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "rsa", - options: RSAKeyPairOptions<"der", "der">, - callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void, - ): void; - function generateKeyPair( - type: "rsa", - options: RSAKeyPairKeyObjectOptions, - callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, - ): void; - function generateKeyPair( - type: "rsa-pss", - options: RSAPSSKeyPairOptions<"pem", "pem">, - callback: (err: Error | null, publicKey: string, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "rsa-pss", - options: RSAPSSKeyPairOptions<"pem", "der">, - callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void, - ): void; - function generateKeyPair( - type: "rsa-pss", - options: RSAPSSKeyPairOptions<"der", "pem">, - callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "rsa-pss", - options: RSAPSSKeyPairOptions<"der", "der">, - callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void, - ): void; - function generateKeyPair( - type: "rsa-pss", - options: RSAPSSKeyPairKeyObjectOptions, - callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, - ): void; - function generateKeyPair( - type: "dsa", - options: DSAKeyPairOptions<"pem", "pem">, - callback: (err: Error | null, publicKey: string, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "dsa", - options: DSAKeyPairOptions<"pem", "der">, - callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void, - ): void; - function generateKeyPair( - type: "dsa", - options: DSAKeyPairOptions<"der", "pem">, - callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "dsa", - options: DSAKeyPairOptions<"der", "der">, - callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void, - ): void; - function generateKeyPair( - type: "dsa", - options: DSAKeyPairKeyObjectOptions, - callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, - ): void; - function generateKeyPair( - type: "ec", - options: ECKeyPairOptions<"pem", "pem">, - callback: (err: Error | null, publicKey: string, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "ec", - options: ECKeyPairOptions<"pem", "der">, - callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void, - ): void; - function generateKeyPair( - type: "ec", - options: ECKeyPairOptions<"der", "pem">, - callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "ec", - options: ECKeyPairOptions<"der", "der">, - callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void, - ): void; - function generateKeyPair( - type: "ec", - options: ECKeyPairKeyObjectOptions, - callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, - ): void; - function generateKeyPair( - type: "ed25519", - options: ED25519KeyPairOptions<"pem", "pem">, - callback: (err: Error | null, publicKey: string, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "ed25519", - options: ED25519KeyPairOptions<"pem", "der">, - callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void, - ): void; - function generateKeyPair( - type: "ed25519", - options: ED25519KeyPairOptions<"der", "pem">, - callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "ed25519", - options: ED25519KeyPairOptions<"der", "der">, - callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void, - ): void; - function generateKeyPair( - type: "ed25519", - options: ED25519KeyPairKeyObjectOptions | undefined, - callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, - ): void; - function generateKeyPair( - type: "ed448", - options: ED448KeyPairOptions<"pem", "pem">, - callback: (err: Error | null, publicKey: string, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "ed448", - options: ED448KeyPairOptions<"pem", "der">, - callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void, - ): void; - function generateKeyPair( - type: "ed448", - options: ED448KeyPairOptions<"der", "pem">, - callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "ed448", - options: ED448KeyPairOptions<"der", "der">, - callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void, - ): void; - function generateKeyPair( - type: "ed448", - options: ED448KeyPairKeyObjectOptions | undefined, - callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, - ): void; - function generateKeyPair( - type: "x25519", - options: X25519KeyPairOptions<"pem", "pem">, - callback: (err: Error | null, publicKey: string, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "x25519", - options: X25519KeyPairOptions<"pem", "der">, - callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void, - ): void; - function generateKeyPair( - type: "x25519", - options: X25519KeyPairOptions<"der", "pem">, - callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "x25519", - options: X25519KeyPairOptions<"der", "der">, - callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void, - ): void; - function generateKeyPair( - type: "x25519", - options: X25519KeyPairKeyObjectOptions | undefined, - callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, - ): void; - function generateKeyPair( - type: "x448", - options: X448KeyPairOptions<"pem", "pem">, - callback: (err: Error | null, publicKey: string, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "x448", - options: X448KeyPairOptions<"pem", "der">, - callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void, - ): void; - function generateKeyPair( - type: "x448", - options: X448KeyPairOptions<"der", "pem">, - callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void, - ): void; - function generateKeyPair( - type: "x448", - options: X448KeyPairOptions<"der", "der">, - callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void, - ): void; - function generateKeyPair( - type: "x448", - options: X448KeyPairKeyObjectOptions | undefined, - callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void, - ): void; - namespace generateKeyPair { - function __promisify__( - type: "rsa", - options: RSAKeyPairOptions<"pem", "pem">, - ): Promise<{ - publicKey: string; - privateKey: string; - }>; - function __promisify__( - type: "rsa", - options: RSAKeyPairOptions<"pem", "der">, - ): Promise<{ - publicKey: string; - privateKey: NonSharedBuffer; - }>; - function __promisify__( - type: "rsa", - options: RSAKeyPairOptions<"der", "pem">, - ): Promise<{ - publicKey: NonSharedBuffer; - privateKey: string; - }>; - function __promisify__( - type: "rsa", - options: RSAKeyPairOptions<"der", "der">, - ): Promise<{ - publicKey: NonSharedBuffer; - privateKey: NonSharedBuffer; - }>; - function __promisify__(type: "rsa", options: RSAKeyPairKeyObjectOptions): Promise; - function __promisify__( - type: "rsa-pss", - options: RSAPSSKeyPairOptions<"pem", "pem">, - ): Promise<{ - publicKey: string; - privateKey: string; - }>; - function __promisify__( - type: "rsa-pss", - options: RSAPSSKeyPairOptions<"pem", "der">, - ): Promise<{ - publicKey: string; - privateKey: NonSharedBuffer; - }>; - function __promisify__( - type: "rsa-pss", - options: RSAPSSKeyPairOptions<"der", "pem">, - ): Promise<{ - publicKey: NonSharedBuffer; - privateKey: string; - }>; - function __promisify__( - type: "rsa-pss", - options: RSAPSSKeyPairOptions<"der", "der">, - ): Promise<{ - publicKey: NonSharedBuffer; - privateKey: NonSharedBuffer; - }>; - function __promisify__( - type: "rsa-pss", - options: RSAPSSKeyPairKeyObjectOptions, - ): Promise; - function __promisify__( - type: "dsa", - options: DSAKeyPairOptions<"pem", "pem">, - ): Promise<{ - publicKey: string; - privateKey: string; - }>; - function __promisify__( - type: "dsa", - options: DSAKeyPairOptions<"pem", "der">, - ): Promise<{ - publicKey: string; - privateKey: NonSharedBuffer; - }>; - function __promisify__( - type: "dsa", - options: DSAKeyPairOptions<"der", "pem">, - ): Promise<{ - publicKey: NonSharedBuffer; - privateKey: string; - }>; - function __promisify__( - type: "dsa", - options: DSAKeyPairOptions<"der", "der">, - ): Promise<{ - publicKey: NonSharedBuffer; - privateKey: NonSharedBuffer; - }>; - function __promisify__(type: "dsa", options: DSAKeyPairKeyObjectOptions): Promise; - function __promisify__( - type: "ec", - options: ECKeyPairOptions<"pem", "pem">, - ): Promise<{ - publicKey: string; - privateKey: string; - }>; - function __promisify__( - type: "ec", - options: ECKeyPairOptions<"pem", "der">, - ): Promise<{ - publicKey: string; - privateKey: NonSharedBuffer; - }>; - function __promisify__( - type: "ec", - options: ECKeyPairOptions<"der", "pem">, - ): Promise<{ - publicKey: NonSharedBuffer; - privateKey: string; - }>; - function __promisify__( - type: "ec", - options: ECKeyPairOptions<"der", "der">, - ): Promise<{ - publicKey: NonSharedBuffer; - privateKey: NonSharedBuffer; - }>; - function __promisify__(type: "ec", options: ECKeyPairKeyObjectOptions): Promise; - function __promisify__( - type: "ed25519", - options: ED25519KeyPairOptions<"pem", "pem">, - ): Promise<{ - publicKey: string; - privateKey: string; - }>; - function __promisify__( - type: "ed25519", - options: ED25519KeyPairOptions<"pem", "der">, - ): Promise<{ - publicKey: string; - privateKey: NonSharedBuffer; - }>; - function __promisify__( - type: "ed25519", - options: ED25519KeyPairOptions<"der", "pem">, - ): Promise<{ - publicKey: NonSharedBuffer; - privateKey: string; - }>; - function __promisify__( - type: "ed25519", - options: ED25519KeyPairOptions<"der", "der">, - ): Promise<{ - publicKey: NonSharedBuffer; - privateKey: NonSharedBuffer; - }>; - function __promisify__( - type: "ed25519", - options?: ED25519KeyPairKeyObjectOptions, - ): Promise; - function __promisify__( - type: "ed448", - options: ED448KeyPairOptions<"pem", "pem">, - ): Promise<{ - publicKey: string; - privateKey: string; - }>; - function __promisify__( - type: "ed448", - options: ED448KeyPairOptions<"pem", "der">, - ): Promise<{ - publicKey: string; - privateKey: NonSharedBuffer; - }>; - function __promisify__( - type: "ed448", - options: ED448KeyPairOptions<"der", "pem">, - ): Promise<{ - publicKey: NonSharedBuffer; - privateKey: string; - }>; - function __promisify__( - type: "ed448", - options: ED448KeyPairOptions<"der", "der">, - ): Promise<{ - publicKey: NonSharedBuffer; - privateKey: NonSharedBuffer; - }>; - function __promisify__(type: "ed448", options?: ED448KeyPairKeyObjectOptions): Promise; - function __promisify__( - type: "x25519", - options: X25519KeyPairOptions<"pem", "pem">, - ): Promise<{ - publicKey: string; - privateKey: string; - }>; - function __promisify__( - type: "x25519", - options: X25519KeyPairOptions<"pem", "der">, - ): Promise<{ - publicKey: string; - privateKey: NonSharedBuffer; - }>; - function __promisify__( - type: "x25519", - options: X25519KeyPairOptions<"der", "pem">, - ): Promise<{ - publicKey: NonSharedBuffer; - privateKey: string; - }>; - function __promisify__( - type: "x25519", - options: X25519KeyPairOptions<"der", "der">, - ): Promise<{ - publicKey: NonSharedBuffer; - privateKey: NonSharedBuffer; - }>; - function __promisify__( - type: "x25519", - options?: X25519KeyPairKeyObjectOptions, - ): Promise; - function __promisify__( - type: "x448", - options: X448KeyPairOptions<"pem", "pem">, - ): Promise<{ - publicKey: string; - privateKey: string; - }>; - function __promisify__( - type: "x448", - options: X448KeyPairOptions<"pem", "der">, - ): Promise<{ - publicKey: string; - privateKey: NonSharedBuffer; - }>; - function __promisify__( - type: "x448", - options: X448KeyPairOptions<"der", "pem">, - ): Promise<{ - publicKey: NonSharedBuffer; - privateKey: string; - }>; - function __promisify__( - type: "x448", - options: X448KeyPairOptions<"der", "der">, - ): Promise<{ - publicKey: NonSharedBuffer; - privateKey: NonSharedBuffer; - }>; - function __promisify__(type: "x448", options?: X448KeyPairKeyObjectOptions): Promise; - } - /** - * Calculates and returns the signature for `data` using the given private key and - * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is - * dependent upon the key type (especially Ed25519 and Ed448). - * - * If `key` is not a `KeyObject`, this function behaves as if `key` had been - * passed to {@link createPrivateKey}. If it is an object, the following - * additional properties can be passed: - * - * If the `callback` function is provided this function uses libuv's threadpool. - * @since v12.0.0 - */ - function sign( - algorithm: string | null | undefined, - data: NodeJS.ArrayBufferView, - key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput, - ): NonSharedBuffer; - function sign( - algorithm: string | null | undefined, - data: NodeJS.ArrayBufferView, - key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput, - callback: (error: Error | null, data: NonSharedBuffer) => void, - ): void; - /** - * Verifies the given signature for `data` using the given key and algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is dependent upon the - * key type (especially Ed25519 and Ed448). - * - * If `key` is not a `KeyObject`, this function behaves as if `key` had been - * passed to {@link createPublicKey}. If it is an object, the following - * additional properties can be passed: - * - * The `signature` argument is the previously calculated signature for the `data`. - * - * Because public keys can be derived from private keys, a private key or a public - * key may be passed for `key`. - * - * If the `callback` function is provided this function uses libuv's threadpool. - * @since v12.0.0 - */ - function verify( - algorithm: string | null | undefined, - data: NodeJS.ArrayBufferView, - key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, - signature: NodeJS.ArrayBufferView, - ): boolean; - function verify( - algorithm: string | null | undefined, - data: NodeJS.ArrayBufferView, - key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput, - signature: NodeJS.ArrayBufferView, - callback: (error: Error | null, result: boolean) => void, - ): void; - /** - * Computes the Diffie-Hellman secret based on a `privateKey` and a `publicKey`. - * Both keys must have the same `asymmetricKeyType`, which must be one of `'dh'` (for Diffie-Hellman), `'ec'` (for ECDH), `'x448'`, or `'x25519'` (for ECDH-ES). - * @since v13.9.0, v12.17.0 - */ - function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): NonSharedBuffer; - /** - * A utility for creating one-shot hash digests of data. It can be faster than the object-based `crypto.createHash()` when hashing a smaller amount of data - * (<= 5MB) that's readily available. If the data can be big or if it is streamed, it's still recommended to use `crypto.createHash()` instead. The `algorithm` - * is dependent on the available algorithms supported by the version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. On recent releases - * of OpenSSL, `openssl list -digest-algorithms` will display the available digest algorithms. - * - * Example: - * - * ```js - * import crypto from 'node:crypto'; - * import { Buffer } from 'node:buffer'; - * - * // Hashing a string and return the result as a hex-encoded string. - * const string = 'Node.js'; - * // 10b3493287f831e81a438811a1ffba01f8cec4b7 - * console.log(crypto.hash('sha1', string)); - * - * // Encode a base64-encoded string into a Buffer, hash it and return - * // the result as a buffer. - * const base64 = 'Tm9kZS5qcw=='; - * // - * console.log(crypto.hash('sha1', Buffer.from(base64, 'base64'), 'buffer')); - * ``` - * @since v21.7.0, v20.12.0 - * @param data When `data` is a string, it will be encoded as UTF-8 before being hashed. If a different input encoding is desired for a string input, user - * could encode the string into a `TypedArray` using either `TextEncoder` or `Buffer.from()` and passing the encoded `TypedArray` into this API instead. - * @param [outputEncoding='hex'] [Encoding](https://nodejs.org/docs/latest-v20.x/api/buffer.html#buffers-and-character-encodings) used to encode the returned digest. - */ - function hash(algorithm: string, data: BinaryLike, outputEncoding?: BinaryToTextEncoding): string; - function hash(algorithm: string, data: BinaryLike, outputEncoding: "buffer"): NonSharedBuffer; - function hash( - algorithm: string, - data: BinaryLike, - outputEncoding?: BinaryToTextEncoding | "buffer", - ): string | NonSharedBuffer; - type CipherMode = "cbc" | "ccm" | "cfb" | "ctr" | "ecb" | "gcm" | "ocb" | "ofb" | "stream" | "wrap" | "xts"; - interface CipherInfoOptions { - /** - * A test key length. - */ - keyLength?: number | undefined; - /** - * A test IV length. - */ - ivLength?: number | undefined; - } - interface CipherInfo { - /** - * The name of the cipher. - */ - name: string; - /** - * The nid of the cipher. - */ - nid: number; - /** - * The block size of the cipher in bytes. - * This property is omitted when mode is 'stream'. - */ - blockSize?: number | undefined; - /** - * The expected or default initialization vector length in bytes. - * This property is omitted if the cipher does not use an initialization vector. - */ - ivLength?: number | undefined; - /** - * The expected or default key length in bytes. - */ - keyLength: number; - /** - * The cipher mode. - */ - mode: CipherMode; - } - /** - * Returns information about a given cipher. - * - * Some ciphers accept variable length keys and initialization vectors. By default, - * the `crypto.getCipherInfo()` method will return the default values for these - * ciphers. To test if a given key length or iv length is acceptable for given - * cipher, use the `keyLength` and `ivLength` options. If the given values are - * unacceptable, `undefined` will be returned. - * @since v15.0.0 - * @param nameOrNid The name or nid of the cipher to query. - */ - function getCipherInfo(nameOrNid: string | number, options?: CipherInfoOptions): CipherInfo | undefined; - /** - * HKDF is a simple key derivation function defined in RFC 5869\. The given `ikm`, `salt` and `info` are used with the `digest` to derive a key of `keylen` bytes. - * - * The supplied `callback` function is called with two arguments: `err` and `derivedKey`. If an errors occurs while deriving the key, `err` will be set; - * otherwise `err` will be `null`. The successfully generated `derivedKey` will - * be passed to the callback as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). An error will be thrown if any - * of the input arguments specify invalid values or types. - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { - * hkdf, - * } = await import('node:crypto'); - * - * hkdf('sha512', 'key', 'salt', 'info', 64, (err, derivedKey) => { - * if (err) throw err; - * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653' - * }); - * ``` - * @since v15.0.0 - * @param digest The digest algorithm to use. - * @param ikm The input keying material. Must be provided but can be zero-length. - * @param salt The salt value. Must be provided but can be zero-length. - * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes. - * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512` - * generates 64-byte hashes, making the maximum HKDF output 16320 bytes). - */ - function hkdf( - digest: string, - irm: BinaryLike | KeyObject, - salt: BinaryLike, - info: BinaryLike, - keylen: number, - callback: (err: Error | null, derivedKey: ArrayBuffer) => void, - ): void; - /** - * Provides a synchronous HKDF key derivation function as defined in RFC 5869\. The - * given `ikm`, `salt` and `info` are used with the `digest` to derive a key of `keylen` bytes. - * - * The successfully generated `derivedKey` will be returned as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). - * - * An error will be thrown if any of the input arguments specify invalid values or - * types, or if the derived key cannot be generated. - * - * ```js - * import { Buffer } from 'node:buffer'; - * const { - * hkdfSync, - * } = await import('node:crypto'); - * - * const derivedKey = hkdfSync('sha512', 'key', 'salt', 'info', 64); - * console.log(Buffer.from(derivedKey).toString('hex')); // '24156e2...5391653' - * ``` - * @since v15.0.0 - * @param digest The digest algorithm to use. - * @param ikm The input keying material. Must be provided but can be zero-length. - * @param salt The salt value. Must be provided but can be zero-length. - * @param info Additional info value. Must be provided but can be zero-length, and cannot be more than 1024 bytes. - * @param keylen The length of the key to generate. Must be greater than 0. The maximum allowable value is `255` times the number of bytes produced by the selected digest function (e.g. `sha512` - * generates 64-byte hashes, making the maximum HKDF output 16320 bytes). - */ - function hkdfSync( - digest: string, - ikm: BinaryLike | KeyObject, - salt: BinaryLike, - info: BinaryLike, - keylen: number, - ): ArrayBuffer; - interface SecureHeapUsage { - /** - * The total allocated secure heap size as specified using the `--secure-heap=n` command-line flag. - */ - total: number; - /** - * The minimum allocation from the secure heap as specified using the `--secure-heap-min` command-line flag. - */ - min: number; - /** - * The total number of bytes currently allocated from the secure heap. - */ - used: number; - /** - * The calculated ratio of `used` to `total` allocated bytes. - */ - utilization: number; - } - /** - * @since v15.6.0 - */ - function secureHeapUsed(): SecureHeapUsage; - interface RandomUUIDOptions { - /** - * By default, to improve performance, - * Node.js will pre-emptively generate and persistently cache enough - * random data to generate up to 128 random UUIDs. To generate a UUID - * without using the cache, set `disableEntropyCache` to `true`. - * - * @default `false` - */ - disableEntropyCache?: boolean | undefined; - } - type UUID = `${string}-${string}-${string}-${string}-${string}`; - /** - * Generates a random [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122.txt) version 4 UUID. The UUID is generated using a - * cryptographic pseudorandom number generator. - * @since v15.6.0, v14.17.0 - */ - function randomUUID(options?: RandomUUIDOptions): UUID; - interface X509CheckOptions { - /** - * @default 'always' - */ - subject?: "always" | "default" | "never" | undefined; - /** - * @default true - */ - wildcards?: boolean | undefined; - /** - * @default true - */ - partialWildcards?: boolean | undefined; - /** - * @default false - */ - multiLabelWildcards?: boolean | undefined; - /** - * @default false - */ - singleLabelSubdomains?: boolean | undefined; - } - /** - * Encapsulates an X509 certificate and provides read-only access to - * its information. - * - * ```js - * const { X509Certificate } = await import('node:crypto'); - * - * const x509 = new X509Certificate('{... pem encoded cert ...}'); - * - * console.log(x509.subject); - * ``` - * @since v15.6.0 - */ - class X509Certificate { - /** - * Will be \`true\` if this is a Certificate Authority (CA) certificate. - * @since v15.6.0 - */ - readonly ca: boolean; - /** - * The SHA-1 fingerprint of this certificate. - * - * Because SHA-1 is cryptographically broken and because the security of SHA-1 is - * significantly worse than that of algorithms that are commonly used to sign - * certificates, consider using `x509.fingerprint256` instead. - * @since v15.6.0 - */ - readonly fingerprint: string; - /** - * The SHA-256 fingerprint of this certificate. - * @since v15.6.0 - */ - readonly fingerprint256: string; - /** - * The SHA-512 fingerprint of this certificate. - * - * Because computing the SHA-256 fingerprint is usually faster and because it is - * only half the size of the SHA-512 fingerprint, `x509.fingerprint256` may be - * a better choice. While SHA-512 presumably provides a higher level of security in - * general, the security of SHA-256 matches that of most algorithms that are - * commonly used to sign certificates. - * @since v17.2.0, v16.14.0 - */ - readonly fingerprint512: string; - /** - * The complete subject of this certificate. - * @since v15.6.0 - */ - readonly subject: string; - /** - * The subject alternative name specified for this certificate. - * - * This is a comma-separated list of subject alternative names. Each entry begins - * with a string identifying the kind of the subject alternative name followed by - * a colon and the value associated with the entry. - * - * Earlier versions of Node.js incorrectly assumed that it is safe to split this - * property at the two-character sequence `', '` (see [CVE-2021-44532](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44532)). However, - * both malicious and legitimate certificates can contain subject alternative names - * that include this sequence when represented as a string. - * - * After the prefix denoting the type of the entry, the remainder of each entry - * might be enclosed in quotes to indicate that the value is a JSON string literal. - * For backward compatibility, Node.js only uses JSON string literals within this - * property when necessary to avoid ambiguity. Third-party code should be prepared - * to handle both possible entry formats. - * @since v15.6.0 - */ - readonly subjectAltName: string | undefined; - /** - * A textual representation of the certificate's authority information access - * extension. - * - * This is a line feed separated list of access descriptions. Each line begins with - * the access method and the kind of the access location, followed by a colon and - * the value associated with the access location. - * - * After the prefix denoting the access method and the kind of the access location, - * the remainder of each line might be enclosed in quotes to indicate that the - * value is a JSON string literal. For backward compatibility, Node.js only uses - * JSON string literals within this property when necessary to avoid ambiguity. - * Third-party code should be prepared to handle both possible entry formats. - * @since v15.6.0 - */ - readonly infoAccess: string | undefined; - /** - * An array detailing the key usages for this certificate. - * @since v15.6.0 - */ - readonly keyUsage: string[]; - /** - * The issuer identification included in this certificate. - * @since v15.6.0 - */ - readonly issuer: string; - /** - * The issuer certificate or `undefined` if the issuer certificate is not - * available. - * @since v15.9.0 - */ - readonly issuerCertificate: X509Certificate | undefined; - /** - * The public key `KeyObject` for this certificate. - * @since v15.6.0 - */ - readonly publicKey: KeyObject; - /** - * A `Buffer` containing the DER encoding of this certificate. - * @since v15.6.0 - */ - readonly raw: NonSharedBuffer; - /** - * The serial number of this certificate. - * - * Serial numbers are assigned by certificate authorities and do not uniquely - * identify certificates. Consider using `x509.fingerprint256` as a unique - * identifier instead. - * @since v15.6.0 - */ - readonly serialNumber: string; - /** - * The date/time from which this certificate is considered valid. - * @since v15.6.0 - */ - readonly validFrom: string; - /** - * The date/time until which this certificate is considered valid. - * @since v15.6.0 - */ - readonly validTo: string; - constructor(buffer: BinaryLike); - /** - * Checks whether the certificate matches the given email address. - * - * If the `'subject'` option is undefined or set to `'default'`, the certificate - * subject is only considered if the subject alternative name extension either does - * not exist or does not contain any email addresses. - * - * If the `'subject'` option is set to `'always'` and if the subject alternative - * name extension either does not exist or does not contain a matching email - * address, the certificate subject is considered. - * - * If the `'subject'` option is set to `'never'`, the certificate subject is never - * considered, even if the certificate contains no subject alternative names. - * @since v15.6.0 - * @return Returns `email` if the certificate matches, `undefined` if it does not. - */ - checkEmail(email: string, options?: Pick): string | undefined; - /** - * Checks whether the certificate matches the given host name. - * - * If the certificate matches the given host name, the matching subject name is - * returned. The returned name might be an exact match (e.g., `foo.example.com`) - * or it might contain wildcards (e.g., `*.example.com`). Because host name - * comparisons are case-insensitive, the returned subject name might also differ - * from the given `name` in capitalization. - * - * If the `'subject'` option is undefined or set to `'default'`, the certificate - * subject is only considered if the subject alternative name extension either does - * not exist or does not contain any DNS names. This behavior is consistent with [RFC 2818](https://www.rfc-editor.org/rfc/rfc2818.txt) ("HTTP Over TLS"). - * - * If the `'subject'` option is set to `'always'` and if the subject alternative - * name extension either does not exist or does not contain a matching DNS name, - * the certificate subject is considered. - * - * If the `'subject'` option is set to `'never'`, the certificate subject is never - * considered, even if the certificate contains no subject alternative names. - * @since v15.6.0 - * @return Returns a subject name that matches `name`, or `undefined` if no subject name matches `name`. - */ - checkHost(name: string, options?: X509CheckOptions): string | undefined; - /** - * Checks whether the certificate matches the given IP address (IPv4 or IPv6). - * - * Only [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280.txt) `iPAddress` subject alternative names are considered, and they - * must match the given `ip` address exactly. Other subject alternative names as - * well as the subject field of the certificate are ignored. - * @since v15.6.0 - * @return Returns `ip` if the certificate matches, `undefined` if it does not. - */ - checkIP(ip: string): string | undefined; - /** - * Checks whether this certificate was issued by the given `otherCert`. - * @since v15.6.0 - */ - checkIssued(otherCert: X509Certificate): boolean; - /** - * Checks whether the public key for this certificate is consistent with - * the given private key. - * @since v15.6.0 - * @param privateKey A private key. - */ - checkPrivateKey(privateKey: KeyObject): boolean; - /** - * There is no standard JSON encoding for X509 certificates. The`toJSON()` method returns a string containing the PEM encoded - * certificate. - * @since v15.6.0 - */ - toJSON(): string; - /** - * Returns information about this certificate using the legacy `certificate object` encoding. - * @since v15.6.0 - */ - toLegacyObject(): PeerCertificate; - /** - * Returns the PEM-encoded certificate. - * @since v15.6.0 - */ - toString(): string; - /** - * Verifies that this certificate was signed by the given public key. - * Does not perform any other validation checks on the certificate. - * @since v15.6.0 - * @param publicKey A public key. - */ - verify(publicKey: KeyObject): boolean; - } - type LargeNumberLike = NodeJS.ArrayBufferView | SharedArrayBuffer | ArrayBuffer | bigint; - interface GeneratePrimeOptions { - add?: LargeNumberLike | undefined; - rem?: LargeNumberLike | undefined; - /** - * @default false - */ - safe?: boolean | undefined; - bigint?: boolean | undefined; - } - interface GeneratePrimeOptionsBigInt extends GeneratePrimeOptions { - bigint: true; - } - interface GeneratePrimeOptionsArrayBuffer extends GeneratePrimeOptions { - bigint?: false | undefined; - } - /** - * Generates a pseudorandom prime of `size` bits. - * - * If `options.safe` is `true`, the prime will be a safe prime -- that is, `(prime - 1) / 2` will also be a prime. - * - * The `options.add` and `options.rem` parameters can be used to enforce additional - * requirements, e.g., for Diffie-Hellman: - * - * * If `options.add` and `options.rem` are both set, the prime will satisfy the - * condition that `prime % add = rem`. - * * If only `options.add` is set and `options.safe` is not `true`, the prime will - * satisfy the condition that `prime % add = 1`. - * * If only `options.add` is set and `options.safe` is set to `true`, the prime - * will instead satisfy the condition that `prime % add = 3`. This is necessary - * because `prime % add = 1` for `options.add > 2` would contradict the condition - * enforced by `options.safe`. - * * `options.rem` is ignored if `options.add` is not given. - * - * Both `options.add` and `options.rem` must be encoded as big-endian sequences - * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or `DataView`. - * - * By default, the prime is encoded as a big-endian sequence of octets - * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a - * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided. - * @since v15.8.0 - * @param size The size (in bits) of the prime to generate. - */ - function generatePrime(size: number, callback: (err: Error | null, prime: ArrayBuffer) => void): void; - function generatePrime( - size: number, - options: GeneratePrimeOptionsBigInt, - callback: (err: Error | null, prime: bigint) => void, - ): void; - function generatePrime( - size: number, - options: GeneratePrimeOptionsArrayBuffer, - callback: (err: Error | null, prime: ArrayBuffer) => void, - ): void; - function generatePrime( - size: number, - options: GeneratePrimeOptions, - callback: (err: Error | null, prime: ArrayBuffer | bigint) => void, - ): void; - /** - * Generates a pseudorandom prime of `size` bits. - * - * If `options.safe` is `true`, the prime will be a safe prime -- that is, `(prime - 1) / 2` will also be a prime. - * - * The `options.add` and `options.rem` parameters can be used to enforce additional - * requirements, e.g., for Diffie-Hellman: - * - * * If `options.add` and `options.rem` are both set, the prime will satisfy the - * condition that `prime % add = rem`. - * * If only `options.add` is set and `options.safe` is not `true`, the prime will - * satisfy the condition that `prime % add = 1`. - * * If only `options.add` is set and `options.safe` is set to `true`, the prime - * will instead satisfy the condition that `prime % add = 3`. This is necessary - * because `prime % add = 1` for `options.add > 2` would contradict the condition - * enforced by `options.safe`. - * * `options.rem` is ignored if `options.add` is not given. - * - * Both `options.add` and `options.rem` must be encoded as big-endian sequences - * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or `DataView`. - * - * By default, the prime is encoded as a big-endian sequence of octets - * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a - * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided. - * @since v15.8.0 - * @param size The size (in bits) of the prime to generate. - */ - function generatePrimeSync(size: number): ArrayBuffer; - function generatePrimeSync(size: number, options: GeneratePrimeOptionsBigInt): bigint; - function generatePrimeSync(size: number, options: GeneratePrimeOptionsArrayBuffer): ArrayBuffer; - function generatePrimeSync(size: number, options: GeneratePrimeOptions): ArrayBuffer | bigint; - interface CheckPrimeOptions { - /** - * The number of Miller-Rabin probabilistic primality iterations to perform. - * When the value is 0 (zero), a number of checks is used that yields a false positive rate of at most `2**-64` for random input. - * Care must be used when selecting a number of checks. - * Refer to the OpenSSL documentation for the BN_is_prime_ex function nchecks options for more details. - * - * @default 0 - */ - checks?: number | undefined; - } - /** - * Checks the primality of the `candidate`. - * @since v15.8.0 - * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length. - */ - function checkPrime(value: LargeNumberLike, callback: (err: Error | null, result: boolean) => void): void; - function checkPrime( - value: LargeNumberLike, - options: CheckPrimeOptions, - callback: (err: Error | null, result: boolean) => void, - ): void; - /** - * Checks the primality of the `candidate`. - * @since v15.8.0 - * @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length. - * @return `true` if the candidate is a prime with an error probability less than `0.25 ** options.checks`. - */ - function checkPrimeSync(candidate: LargeNumberLike, options?: CheckPrimeOptions): boolean; - /** - * Load and set the `engine` for some or all OpenSSL functions (selected by flags). - * - * `engine` could be either an id or a path to the engine's shared library. - * - * The optional `flags` argument uses `ENGINE_METHOD_ALL` by default. The `flags` is a bit field taking one of or a mix of the following flags (defined in `crypto.constants`): - * - * * `crypto.constants.ENGINE_METHOD_RSA` - * * `crypto.constants.ENGINE_METHOD_DSA` - * * `crypto.constants.ENGINE_METHOD_DH` - * * `crypto.constants.ENGINE_METHOD_RAND` - * * `crypto.constants.ENGINE_METHOD_EC` - * * `crypto.constants.ENGINE_METHOD_CIPHERS` - * * `crypto.constants.ENGINE_METHOD_DIGESTS` - * * `crypto.constants.ENGINE_METHOD_PKEY_METHS` - * * `crypto.constants.ENGINE_METHOD_PKEY_ASN1_METHS` - * * `crypto.constants.ENGINE_METHOD_ALL` - * * `crypto.constants.ENGINE_METHOD_NONE` - * @since v0.11.11 - * @param flags - */ - function setEngine(engine: string, flags?: number): void; - /** - * A convenient alias for {@link webcrypto.getRandomValues}. This - * implementation is not compliant with the Web Crypto spec, to write - * web-compatible code use {@link webcrypto.getRandomValues} instead. - * @since v17.4.0 - * @return Returns `typedArray`. - */ - function getRandomValues(typedArray: T): T; - /** - * A convenient alias for `crypto.webcrypto.subtle`. - * @since v17.4.0 - */ - const subtle: webcrypto.SubtleCrypto; - /** - * An implementation of the Web Crypto API standard. - * - * See the {@link https://nodejs.org/docs/latest/api/webcrypto.html Web Crypto API documentation} for details. - * @since v15.0.0 - */ - const webcrypto: webcrypto.Crypto; - namespace webcrypto { - type BufferSource = ArrayBufferView | ArrayBuffer; - type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki"; - type KeyType = "private" | "public" | "secret"; - type KeyUsage = - | "decrypt" - | "deriveBits" - | "deriveKey" - | "encrypt" - | "sign" - | "unwrapKey" - | "verify" - | "wrapKey"; - type AlgorithmIdentifier = Algorithm | string; - type HashAlgorithmIdentifier = AlgorithmIdentifier; - type NamedCurve = string; - type BigInteger = Uint8Array; - interface AesCbcParams extends Algorithm { - iv: BufferSource; - } - interface AesCtrParams extends Algorithm { - counter: BufferSource; - length: number; - } - interface AesDerivedKeyParams extends Algorithm { - length: number; - } - interface AesGcmParams extends Algorithm { - additionalData?: BufferSource; - iv: BufferSource; - tagLength?: number; - } - interface AesKeyAlgorithm extends KeyAlgorithm { - length: number; - } - interface AesKeyGenParams extends Algorithm { - length: number; - } - interface Algorithm { - name: string; - } - interface EcKeyAlgorithm extends KeyAlgorithm { - namedCurve: NamedCurve; - } - interface EcKeyGenParams extends Algorithm { - namedCurve: NamedCurve; - } - interface EcKeyImportParams extends Algorithm { - namedCurve: NamedCurve; - } - interface EcdhKeyDeriveParams extends Algorithm { - public: CryptoKey; - } - interface EcdsaParams extends Algorithm { - hash: HashAlgorithmIdentifier; - } - interface Ed448Params extends Algorithm { - context?: BufferSource; - } - interface HkdfParams extends Algorithm { - hash: HashAlgorithmIdentifier; - info: BufferSource; - salt: BufferSource; - } - interface HmacImportParams extends Algorithm { - hash: HashAlgorithmIdentifier; - length?: number; - } - interface HmacKeyAlgorithm extends KeyAlgorithm { - hash: KeyAlgorithm; - length: number; - } - interface HmacKeyGenParams extends Algorithm { - hash: HashAlgorithmIdentifier; - length?: number; - } - interface JsonWebKey { - alg?: string; - crv?: string; - d?: string; - dp?: string; - dq?: string; - e?: string; - ext?: boolean; - k?: string; - key_ops?: string[]; - kty?: string; - n?: string; - oth?: RsaOtherPrimesInfo[]; - p?: string; - q?: string; - qi?: string; - use?: string; - x?: string; - y?: string; - } - interface KeyAlgorithm { - name: string; - } - interface Pbkdf2Params extends Algorithm { - hash: HashAlgorithmIdentifier; - iterations: number; - salt: BufferSource; - } - interface RsaHashedImportParams extends Algorithm { - hash: HashAlgorithmIdentifier; - } - interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm { - hash: KeyAlgorithm; - } - interface RsaHashedKeyGenParams extends RsaKeyGenParams { - hash: HashAlgorithmIdentifier; - } - interface RsaKeyAlgorithm extends KeyAlgorithm { - modulusLength: number; - publicExponent: BigInteger; - } - interface RsaKeyGenParams extends Algorithm { - modulusLength: number; - publicExponent: BigInteger; - } - interface RsaOaepParams extends Algorithm { - label?: BufferSource; - } - interface RsaOtherPrimesInfo { - d?: string; - r?: string; - t?: string; - } - interface RsaPssParams extends Algorithm { - saltLength: number; - } - /** - * Importing the `webcrypto` object (`import { webcrypto } from 'node:crypto'`) gives an instance of the `Crypto` class. - * `Crypto` is a singleton that provides access to the remainder of the crypto API. - * @since v15.0.0 - */ - interface Crypto { - /** - * Provides access to the `SubtleCrypto` API. - * @since v15.0.0 - */ - readonly subtle: SubtleCrypto; - /** - * Generates cryptographically strong random values. - * The given `typedArray` is filled with random values, and a reference to `typedArray` is returned. - * - * The given `typedArray` must be an integer-based instance of {@link NodeJS.TypedArray}, i.e. `Float32Array` and `Float64Array` are not accepted. - * - * An error will be thrown if the given `typedArray` is larger than 65,536 bytes. - * @since v15.0.0 - */ - getRandomValues>(typedArray: T): T; - /** - * Generates a random {@link https://www.rfc-editor.org/rfc/rfc4122.txt RFC 4122} version 4 UUID. - * The UUID is generated using a cryptographic pseudorandom number generator. - * @since v16.7.0 - */ - randomUUID(): UUID; - CryptoKey: CryptoKeyConstructor; - } - // This constructor throws ILLEGAL_CONSTRUCTOR so it should not be newable. - interface CryptoKeyConstructor { - /** Illegal constructor */ - (_: { readonly _: unique symbol }): never; // Allows instanceof to work but not be callable by the user. - readonly length: 0; - readonly name: "CryptoKey"; - readonly prototype: CryptoKey; - } - /** - * @since v15.0.0 - */ - interface CryptoKey { - /** - * An object detailing the algorithm for which the key can be used along with additional algorithm-specific parameters. - * @since v15.0.0 - */ - readonly algorithm: KeyAlgorithm; - /** - * When `true`, the {@link CryptoKey} can be extracted using either `subtleCrypto.exportKey()` or `subtleCrypto.wrapKey()`. - * @since v15.0.0 - */ - readonly extractable: boolean; - /** - * A string identifying whether the key is a symmetric (`'secret'`) or asymmetric (`'private'` or `'public'`) key. - * @since v15.0.0 - */ - readonly type: KeyType; - /** - * An array of strings identifying the operations for which the key may be used. - * - * The possible usages are: - * - `'encrypt'` - The key may be used to encrypt data. - * - `'decrypt'` - The key may be used to decrypt data. - * - `'sign'` - The key may be used to generate digital signatures. - * - `'verify'` - The key may be used to verify digital signatures. - * - `'deriveKey'` - The key may be used to derive a new key. - * - `'deriveBits'` - The key may be used to derive bits. - * - `'wrapKey'` - The key may be used to wrap another key. - * - `'unwrapKey'` - The key may be used to unwrap another key. - * - * Valid key usages depend on the key algorithm (identified by `cryptokey.algorithm.name`). - * @since v15.0.0 - */ - readonly usages: KeyUsage[]; - } - /** - * The `CryptoKeyPair` is a simple dictionary object with `publicKey` and `privateKey` properties, representing an asymmetric key pair. - * @since v15.0.0 - */ - interface CryptoKeyPair { - /** - * A {@link CryptoKey} whose type will be `'private'`. - * @since v15.0.0 - */ - privateKey: CryptoKey; - /** - * A {@link CryptoKey} whose type will be `'public'`. - * @since v15.0.0 - */ - publicKey: CryptoKey; - } - /** - * @since v15.0.0 - */ - interface SubtleCrypto { - /** - * Using the method and parameters specified in `algorithm` and the keying material provided by `key`, - * `subtle.decrypt()` attempts to decipher the provided `data`. If successful, - * the returned promise will be resolved with an `` containing the plaintext result. - * - * The algorithms currently supported include: - * - * - `'RSA-OAEP'` - * - `'AES-CTR'` - * - `'AES-CBC'` - * - `'AES-GCM'` - * @since v15.0.0 - */ - decrypt( - algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, - key: CryptoKey, - data: BufferSource, - ): Promise; - /** - * Using the method and parameters specified in `algorithm` and the keying material provided by `baseKey`, - * `subtle.deriveBits()` attempts to generate `length` bits. - * The Node.js implementation requires that when `length` is a number it must be multiple of `8`. - * When `length` is `null` the maximum number of bits for a given algorithm is generated. This is allowed - * for the `'ECDH'`, `'X25519'`, and `'X448'` algorithms. - * If successful, the returned promise will be resolved with an `` containing the generated data. - * - * The algorithms currently supported include: - * - * - `'ECDH'` - * - `'X25519'` - * - `'X448'` - * - `'HKDF'` - * - `'PBKDF2'` - * @since v15.0.0 - */ - deriveBits(algorithm: EcdhKeyDeriveParams, baseKey: CryptoKey, length: number | null): Promise; - deriveBits( - algorithm: AlgorithmIdentifier | HkdfParams | Pbkdf2Params, - baseKey: CryptoKey, - length: number, - ): Promise; - /** - * Using the method and parameters specified in `algorithm`, and the keying material provided by `baseKey`, - * `subtle.deriveKey()` attempts to generate a new ` based on the method and parameters in `derivedKeyAlgorithm`. - * - * Calling `subtle.deriveKey()` is equivalent to calling `subtle.deriveBits()` to generate raw keying material, - * then passing the result into the `subtle.importKey()` method using the `deriveKeyAlgorithm`, `extractable`, and `keyUsages` parameters as input. - * - * The algorithms currently supported include: - * - * - `'ECDH'` - * - `'X25519'` - * - `'X448'` - * - `'HKDF'` - * - `'PBKDF2'` - * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}. - * @since v15.0.0 - */ - deriveKey( - algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, - baseKey: CryptoKey, - derivedKeyAlgorithm: - | AlgorithmIdentifier - | AesDerivedKeyParams - | HmacImportParams - | HkdfParams - | Pbkdf2Params, - extractable: boolean, - keyUsages: readonly KeyUsage[], - ): Promise; - /** - * Using the method identified by `algorithm`, `subtle.digest()` attempts to generate a digest of `data`. - * If successful, the returned promise is resolved with an `` containing the computed digest. - * - * If `algorithm` is provided as a ``, it must be one of: - * - * - `'SHA-1'` - * - `'SHA-256'` - * - `'SHA-384'` - * - `'SHA-512'` - * - * If `algorithm` is provided as an ``, it must have a `name` property whose value is one of the above. - * @since v15.0.0 - */ - digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise; - /** - * Using the method and parameters specified by `algorithm` and the keying material provided by `key`, - * `subtle.encrypt()` attempts to encipher `data`. If successful, - * the returned promise is resolved with an `` containing the encrypted result. - * - * The algorithms currently supported include: - * - * - `'RSA-OAEP'` - * - `'AES-CTR'` - * - `'AES-CBC'` - * - `'AES-GCM'` - * @since v15.0.0 - */ - encrypt( - algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, - key: CryptoKey, - data: BufferSource, - ): Promise; - /** - * Exports the given key into the specified format, if supported. - * - * If the `` is not extractable, the returned promise will reject. - * - * When `format` is either `'pkcs8'` or `'spki'` and the export is successful, - * the returned promise will be resolved with an `` containing the exported key data. - * - * When `format` is `'jwk'` and the export is successful, the returned promise will be resolved with a - * JavaScript object conforming to the {@link https://tools.ietf.org/html/rfc7517 JSON Web Key} specification. - * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`. - * @returns `` containing ``. - * @since v15.0.0 - */ - exportKey(format: "jwk", key: CryptoKey): Promise; - exportKey(format: Exclude, key: CryptoKey): Promise; - /** - * Using the method and parameters provided in `algorithm`, - * `subtle.generateKey()` attempts to generate new keying material. - * Depending the method used, the method may generate either a single `` or a ``. - * - * The `` (public and private key) generating algorithms supported include: - * - * - `'RSASSA-PKCS1-v1_5'` - * - `'RSA-PSS'` - * - `'RSA-OAEP'` - * - `'ECDSA'` - * - `'Ed25519'` - * - `'Ed448'` - * - `'ECDH'` - * - `'X25519'` - * - `'X448'` - * The `` (secret key) generating algorithms supported include: - * - * - `'HMAC'` - * - `'AES-CTR'` - * - `'AES-CBC'` - * - `'AES-GCM'` - * - `'AES-KW'` - * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}. - * @since v15.0.0 - */ - generateKey( - algorithm: RsaHashedKeyGenParams | EcKeyGenParams, - extractable: boolean, - keyUsages: readonly KeyUsage[], - ): Promise; - generateKey( - algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, - extractable: boolean, - keyUsages: readonly KeyUsage[], - ): Promise; - generateKey( - algorithm: AlgorithmIdentifier, - extractable: boolean, - keyUsages: KeyUsage[], - ): Promise; - /** - * The `subtle.importKey()` method attempts to interpret the provided `keyData` as the given `format` - * to create a `` instance using the provided `algorithm`, `extractable`, and `keyUsages` arguments. - * If the import is successful, the returned promise will be resolved with the created ``. - * - * If importing a `'PBKDF2'` key, `extractable` must be `false`. - * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`. - * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}. - * @since v15.0.0 - */ - importKey( - format: "jwk", - keyData: JsonWebKey, - algorithm: - | AlgorithmIdentifier - | RsaHashedImportParams - | EcKeyImportParams - | HmacImportParams - | AesKeyAlgorithm, - extractable: boolean, - keyUsages: readonly KeyUsage[], - ): Promise; - importKey( - format: Exclude, - keyData: BufferSource, - algorithm: - | AlgorithmIdentifier - | RsaHashedImportParams - | EcKeyImportParams - | HmacImportParams - | AesKeyAlgorithm, - extractable: boolean, - keyUsages: KeyUsage[], - ): Promise; - /** - * Using the method and parameters given by `algorithm` and the keying material provided by `key`, - * `subtle.sign()` attempts to generate a cryptographic signature of `data`. If successful, - * the returned promise is resolved with an `` containing the generated signature. - * - * The algorithms currently supported include: - * - * - `'RSASSA-PKCS1-v1_5'` - * - `'RSA-PSS'` - * - `'ECDSA'` - * - `'Ed25519'` - * - `'Ed448'` - * - `'HMAC'` - * @since v15.0.0 - */ - sign( - algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params, - key: CryptoKey, - data: BufferSource, - ): Promise; - /** - * In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material. - * The `subtle.unwrapKey()` method attempts to decrypt a wrapped key and create a `` instance. - * It is equivalent to calling `subtle.decrypt()` first on the encrypted key data (using the `wrappedKey`, `unwrapAlgo`, and `unwrappingKey` arguments as input) - * then passing the results in to the `subtle.importKey()` method using the `unwrappedKeyAlgo`, `extractable`, and `keyUsages` arguments as inputs. - * If successful, the returned promise is resolved with a `` object. - * - * The wrapping algorithms currently supported include: - * - * - `'RSA-OAEP'` - * - `'AES-CTR'` - * - `'AES-CBC'` - * - `'AES-GCM'` - * - `'AES-KW'` - * - * The unwrapped key algorithms supported include: - * - * - `'RSASSA-PKCS1-v1_5'` - * - `'RSA-PSS'` - * - `'RSA-OAEP'` - * - `'ECDSA'` - * - `'Ed25519'` - * - `'Ed448'` - * - `'ECDH'` - * - `'X25519'` - * - `'X448'` - * - `'HMAC'` - * - `'AES-CTR'` - * - `'AES-CBC'` - * - `'AES-GCM'` - * - `'AES-KW'` - * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`. - * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}. - * @since v15.0.0 - */ - unwrapKey( - format: KeyFormat, - wrappedKey: BufferSource, - unwrappingKey: CryptoKey, - unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, - unwrappedKeyAlgorithm: - | AlgorithmIdentifier - | RsaHashedImportParams - | EcKeyImportParams - | HmacImportParams - | AesKeyAlgorithm, - extractable: boolean, - keyUsages: KeyUsage[], - ): Promise; - /** - * Using the method and parameters given in `algorithm` and the keying material provided by `key`, - * `subtle.verify()` attempts to verify that `signature` is a valid cryptographic signature of `data`. - * The returned promise is resolved with either `true` or `false`. - * - * The algorithms currently supported include: - * - * - `'RSASSA-PKCS1-v1_5'` - * - `'RSA-PSS'` - * - `'ECDSA'` - * - `'Ed25519'` - * - `'Ed448'` - * - `'HMAC'` - * @since v15.0.0 - */ - verify( - algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params, - key: CryptoKey, - signature: BufferSource, - data: BufferSource, - ): Promise; - /** - * In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material. - * The `subtle.wrapKey()` method exports the keying material into the format identified by `format`, - * then encrypts it using the method and parameters specified by `wrapAlgo` and the keying material provided by `wrappingKey`. - * It is the equivalent to calling `subtle.exportKey()` using `format` and `key` as the arguments, - * then passing the result to the `subtle.encrypt()` method using `wrappingKey` and `wrapAlgo` as inputs. - * If successful, the returned promise will be resolved with an `` containing the encrypted key data. - * - * The wrapping algorithms currently supported include: - * - * - `'RSA-OAEP'` - * - `'AES-CTR'` - * - `'AES-CBC'` - * - `'AES-GCM'` - * - `'AES-KW'` - * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, or `'jwk'`. - * @since v15.0.0 - */ - wrapKey( - format: KeyFormat, - key: CryptoKey, - wrappingKey: CryptoKey, - wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, - ): Promise; - } - } - - global { - var crypto: typeof globalThis extends { - crypto: infer T; - onmessage: any; - } ? T - : webcrypto.Crypto; - } -} -declare module "node:crypto" { - export * from "crypto"; -} diff --git a/node_modules/@types/node/dgram.d.ts b/node_modules/@types/node/dgram.d.ts deleted file mode 100644 index 4c74367..0000000 --- a/node_modules/@types/node/dgram.d.ts +++ /dev/null @@ -1,597 +0,0 @@ -/** - * The `node:dgram` module provides an implementation of UDP datagram sockets. - * - * ```js - * import dgram from 'node:dgram'; - * - * const server = dgram.createSocket('udp4'); - * - * server.on('error', (err) => { - * console.error(`server error:\n${err.stack}`); - * server.close(); - * }); - * - * server.on('message', (msg, rinfo) => { - * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); - * }); - * - * server.on('listening', () => { - * const address = server.address(); - * console.log(`server listening ${address.address}:${address.port}`); - * }); - * - * server.bind(41234); - * // Prints: server listening 0.0.0.0:41234 - * ``` - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/dgram.js) - */ -declare module "dgram" { - import { NonSharedBuffer } from "node:buffer"; - import { AddressInfo } from "node:net"; - import * as dns from "node:dns"; - import { Abortable, EventEmitter } from "node:events"; - interface RemoteInfo { - address: string; - family: "IPv4" | "IPv6"; - port: number; - size: number; - } - interface BindOptions { - port?: number | undefined; - address?: string | undefined; - exclusive?: boolean | undefined; - fd?: number | undefined; - } - type SocketType = "udp4" | "udp6"; - interface SocketOptions extends Abortable { - type: SocketType; - reuseAddr?: boolean | undefined; - /** - * @default false - */ - ipv6Only?: boolean | undefined; - recvBufferSize?: number | undefined; - sendBufferSize?: number | undefined; - lookup?: - | (( - hostname: string, - options: dns.LookupOneOptions, - callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, - ) => void) - | undefined; - } - /** - * Creates a `dgram.Socket` object. Once the socket is created, calling `socket.bind()` will instruct the socket to begin listening for datagram - * messages. When `address` and `port` are not passed to `socket.bind()` the - * method will bind the socket to the "all interfaces" address on a random port - * (it does the right thing for both `udp4` and `udp6` sockets). The bound address - * and port can be retrieved using `socket.address().address` and `socket.address().port`. - * - * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.close()` on the socket: - * - * ```js - * const controller = new AbortController(); - * const { signal } = controller; - * const server = dgram.createSocket({ type: 'udp4', signal }); - * server.on('message', (msg, rinfo) => { - * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); - * }); - * // Later, when you want to close the server. - * controller.abort(); - * ``` - * @since v0.11.13 - * @param options Available options are: - * @param callback Attached as a listener for `'message'` events. Optional. - */ - function createSocket(type: SocketType, callback?: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): Socket; - function createSocket(options: SocketOptions, callback?: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): Socket; - /** - * Encapsulates the datagram functionality. - * - * New instances of `dgram.Socket` are created using {@link createSocket}. - * The `new` keyword is not to be used to create `dgram.Socket` instances. - * @since v0.1.99 - */ - class Socket extends EventEmitter { - /** - * Tells the kernel to join a multicast group at the given `multicastAddress` and `multicastInterface` using the `IP_ADD_MEMBERSHIP` socket option. If the `multicastInterface` argument is not - * specified, the operating system will choose - * one interface and will add membership to it. To add membership to every - * available interface, call `addMembership` multiple times, once per interface. - * - * When called on an unbound socket, this method will implicitly bind to a random - * port, listening on all interfaces. - * - * When sharing a UDP socket across multiple `cluster` workers, the`socket.addMembership()` function must be called only once or an`EADDRINUSE` error will occur: - * - * ```js - * import cluster from 'node:cluster'; - * import dgram from 'node:dgram'; - * - * if (cluster.isPrimary) { - * cluster.fork(); // Works ok. - * cluster.fork(); // Fails with EADDRINUSE. - * } else { - * const s = dgram.createSocket('udp4'); - * s.bind(1234, () => { - * s.addMembership('224.0.0.114'); - * }); - * } - * ``` - * @since v0.6.9 - */ - addMembership(multicastAddress: string, multicastInterface?: string): void; - /** - * Returns an object containing the address information for a socket. - * For UDP sockets, this object will contain `address`, `family`, and `port` properties. - * - * This method throws `EBADF` if called on an unbound socket. - * @since v0.1.99 - */ - address(): AddressInfo; - /** - * For UDP sockets, causes the `dgram.Socket` to listen for datagram - * messages on a named `port` and optional `address`. If `port` is not - * specified or is `0`, the operating system will attempt to bind to a - * random port. If `address` is not specified, the operating system will - * attempt to listen on all addresses. Once binding is complete, a `'listening'` event is emitted and the optional `callback` function is - * called. - * - * Specifying both a `'listening'` event listener and passing a `callback` to the `socket.bind()` method is not harmful but not very - * useful. - * - * A bound datagram socket keeps the Node.js process running to receive - * datagram messages. - * - * If binding fails, an `'error'` event is generated. In rare case (e.g. - * attempting to bind with a closed socket), an `Error` may be thrown. - * - * Example of a UDP server listening on port 41234: - * - * ```js - * import dgram from 'node:dgram'; - * - * const server = dgram.createSocket('udp4'); - * - * server.on('error', (err) => { - * console.error(`server error:\n${err.stack}`); - * server.close(); - * }); - * - * server.on('message', (msg, rinfo) => { - * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); - * }); - * - * server.on('listening', () => { - * const address = server.address(); - * console.log(`server listening ${address.address}:${address.port}`); - * }); - * - * server.bind(41234); - * // Prints: server listening 0.0.0.0:41234 - * ``` - * @since v0.1.99 - * @param callback with no parameters. Called when binding is complete. - */ - bind(port?: number, address?: string, callback?: () => void): this; - bind(port?: number, callback?: () => void): this; - bind(callback?: () => void): this; - bind(options: BindOptions, callback?: () => void): this; - /** - * Close the underlying socket and stop listening for data on it. If a callback is - * provided, it is added as a listener for the `'close'` event. - * @since v0.1.99 - * @param callback Called when the socket has been closed. - */ - close(callback?: () => void): this; - /** - * Associates the `dgram.Socket` to a remote address and port. Every - * message sent by this handle is automatically sent to that destination. Also, - * the socket will only receive messages from that remote peer. - * Trying to call `connect()` on an already connected socket will result - * in an `ERR_SOCKET_DGRAM_IS_CONNECTED` exception. If `address` is not - * provided, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets) - * will be used by default. Once the connection is complete, a `'connect'` event - * is emitted and the optional `callback` function is called. In case of failure, - * the `callback` is called or, failing this, an `'error'` event is emitted. - * @since v12.0.0 - * @param callback Called when the connection is completed or on error. - */ - connect(port: number, address?: string, callback?: () => void): void; - connect(port: number, callback: () => void): void; - /** - * A synchronous function that disassociates a connected `dgram.Socket` from - * its remote address. Trying to call `disconnect()` on an unbound or already - * disconnected socket will result in an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception. - * @since v12.0.0 - */ - disconnect(): void; - /** - * Instructs the kernel to leave a multicast group at `multicastAddress` using the `IP_DROP_MEMBERSHIP` socket option. This method is automatically called by the - * kernel when the socket is closed or the process terminates, so most apps will - * never have reason to call this. - * - * If `multicastInterface` is not specified, the operating system will attempt to - * drop membership on all valid interfaces. - * @since v0.6.9 - */ - dropMembership(multicastAddress: string, multicastInterface?: string): void; - /** - * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. - * @since v8.7.0 - * @return the `SO_RCVBUF` socket receive buffer size in bytes. - */ - getRecvBufferSize(): number; - /** - * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. - * @since v8.7.0 - * @return the `SO_SNDBUF` socket send buffer size in bytes. - */ - getSendBufferSize(): number; - /** - * @since v18.8.0, v16.19.0 - * @return Number of bytes queued for sending. - */ - getSendQueueSize(): number; - /** - * @since v18.8.0, v16.19.0 - * @return Number of send requests currently in the queue awaiting to be processed. - */ - getSendQueueCount(): number; - /** - * By default, binding a socket will cause it to block the Node.js process from - * exiting as long as the socket is open. The `socket.unref()` method can be used - * to exclude the socket from the reference counting that keeps the Node.js - * process active. The `socket.ref()` method adds the socket back to the reference - * counting and restores the default behavior. - * - * Calling `socket.ref()` multiples times will have no additional effect. - * - * The `socket.ref()` method returns a reference to the socket so calls can be - * chained. - * @since v0.9.1 - */ - ref(): this; - /** - * Returns an object containing the `address`, `family`, and `port` of the remote - * endpoint. This method throws an `ERR_SOCKET_DGRAM_NOT_CONNECTED` exception - * if the socket is not connected. - * @since v12.0.0 - */ - remoteAddress(): AddressInfo; - /** - * Broadcasts a datagram on the socket. - * For connectionless sockets, the destination `port` and `address` must be - * specified. Connected sockets, on the other hand, will use their associated - * remote endpoint, so the `port` and `address` arguments must not be set. - * - * The `msg` argument contains the message to be sent. - * Depending on its type, different behavior can apply. If `msg` is a `Buffer`, - * any `TypedArray` or a `DataView`, - * the `offset` and `length` specify the offset within the `Buffer` where the - * message begins and the number of bytes in the message, respectively. - * If `msg` is a `String`, then it is automatically converted to a `Buffer` with `'utf8'` encoding. With messages that - * contain multi-byte characters, `offset` and `length` will be calculated with - * respect to `byte length` and not the character position. - * If `msg` is an array, `offset` and `length` must not be specified. - * - * The `address` argument is a string. If the value of `address` is a host name, - * DNS will be used to resolve the address of the host. If `address` is not - * provided or otherwise nullish, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets) will be used by default. - * - * If the socket has not been previously bound with a call to `bind`, the socket - * is assigned a random port number and is bound to the "all interfaces" address - * (`'0.0.0.0'` for `udp4` sockets, `'::0'` for `udp6` sockets.) - * - * An optional `callback` function may be specified to as a way of reporting - * DNS errors or for determining when it is safe to reuse the `buf` object. - * DNS lookups delay the time to send for at least one tick of the - * Node.js event loop. - * - * The only way to know for sure that the datagram has been sent is by using a `callback`. If an error occurs and a `callback` is given, the error will be - * passed as the first argument to the `callback`. If a `callback` is not given, - * the error is emitted as an `'error'` event on the `socket` object. - * - * Offset and length are optional but both _must_ be set if either are used. - * They are supported only when the first argument is a `Buffer`, a `TypedArray`, - * or a `DataView`. - * - * This method throws `ERR_SOCKET_BAD_PORT` if called on an unbound socket. - * - * Example of sending a UDP packet to a port on `localhost`; - * - * ```js - * import dgram from 'node:dgram'; - * import { Buffer } from 'node:buffer'; - * - * const message = Buffer.from('Some bytes'); - * const client = dgram.createSocket('udp4'); - * client.send(message, 41234, 'localhost', (err) => { - * client.close(); - * }); - * ``` - * - * Example of sending a UDP packet composed of multiple buffers to a port on`127.0.0.1`; - * - * ```js - * import dgram from 'node:dgram'; - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from('Some '); - * const buf2 = Buffer.from('bytes'); - * const client = dgram.createSocket('udp4'); - * client.send([buf1, buf2], 41234, (err) => { - * client.close(); - * }); - * ``` - * - * Sending multiple buffers might be faster or slower depending on the - * application and operating system. Run benchmarks to - * determine the optimal strategy on a case-by-case basis. Generally speaking, - * however, sending multiple buffers is faster. - * - * Example of sending a UDP packet using a socket connected to a port on `localhost`: - * - * ```js - * import dgram from 'node:dgram'; - * import { Buffer } from 'node:buffer'; - * - * const message = Buffer.from('Some bytes'); - * const client = dgram.createSocket('udp4'); - * client.connect(41234, 'localhost', (err) => { - * client.send(message, (err) => { - * client.close(); - * }); - * }); - * ``` - * @since v0.1.99 - * @param msg Message to be sent. - * @param offset Offset in the buffer where the message starts. - * @param length Number of bytes in the message. - * @param port Destination port. - * @param address Destination host name or IP address. - * @param callback Called when the message has been sent. - */ - send( - msg: string | NodeJS.ArrayBufferView | readonly any[], - port?: number, - address?: string, - callback?: (error: Error | null, bytes: number) => void, - ): void; - send( - msg: string | NodeJS.ArrayBufferView | readonly any[], - port?: number, - callback?: (error: Error | null, bytes: number) => void, - ): void; - send( - msg: string | NodeJS.ArrayBufferView | readonly any[], - callback?: (error: Error | null, bytes: number) => void, - ): void; - send( - msg: string | NodeJS.ArrayBufferView, - offset: number, - length: number, - port?: number, - address?: string, - callback?: (error: Error | null, bytes: number) => void, - ): void; - send( - msg: string | NodeJS.ArrayBufferView, - offset: number, - length: number, - port?: number, - callback?: (error: Error | null, bytes: number) => void, - ): void; - send( - msg: string | NodeJS.ArrayBufferView, - offset: number, - length: number, - callback?: (error: Error | null, bytes: number) => void, - ): void; - /** - * Sets or clears the `SO_BROADCAST` socket option. When set to `true`, UDP - * packets may be sent to a local interface's broadcast address. - * - * This method throws `EBADF` if called on an unbound socket. - * @since v0.6.9 - */ - setBroadcast(flag: boolean): void; - /** - * _All references to scope in this section are referring to [IPv6 Zone Indices](https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses), which are defined by [RFC - * 4007](https://tools.ietf.org/html/rfc4007). In string form, an IP_ - * _with a scope index is written as `'IP%scope'` where scope is an interface name_ - * _or interface number._ - * - * Sets the default outgoing multicast interface of the socket to a chosen - * interface or back to system interface selection. The `multicastInterface` must - * be a valid string representation of an IP from the socket's family. - * - * For IPv4 sockets, this should be the IP configured for the desired physical - * interface. All packets sent to multicast on the socket will be sent on the - * interface determined by the most recent successful use of this call. - * - * For IPv6 sockets, `multicastInterface` should include a scope to indicate the - * interface as in the examples that follow. In IPv6, individual `send` calls can - * also use explicit scope in addresses, so only packets sent to a multicast - * address without specifying an explicit scope are affected by the most recent - * successful use of this call. - * - * This method throws `EBADF` if called on an unbound socket. - * - * #### Example: IPv6 outgoing multicast interface - * - * On most systems, where scope format uses the interface name: - * - * ```js - * const socket = dgram.createSocket('udp6'); - * - * socket.bind(1234, () => { - * socket.setMulticastInterface('::%eth1'); - * }); - * ``` - * - * On Windows, where scope format uses an interface number: - * - * ```js - * const socket = dgram.createSocket('udp6'); - * - * socket.bind(1234, () => { - * socket.setMulticastInterface('::%2'); - * }); - * ``` - * - * #### Example: IPv4 outgoing multicast interface - * - * All systems use an IP of the host on the desired physical interface: - * - * ```js - * const socket = dgram.createSocket('udp4'); - * - * socket.bind(1234, () => { - * socket.setMulticastInterface('10.0.0.2'); - * }); - * ``` - * @since v8.6.0 - */ - setMulticastInterface(multicastInterface: string): void; - /** - * Sets or clears the `IP_MULTICAST_LOOP` socket option. When set to `true`, - * multicast packets will also be received on the local interface. - * - * This method throws `EBADF` if called on an unbound socket. - * @since v0.3.8 - */ - setMulticastLoopback(flag: boolean): boolean; - /** - * Sets the `IP_MULTICAST_TTL` socket option. While TTL generally stands for - * "Time to Live", in this context it specifies the number of IP hops that a - * packet is allowed to travel through, specifically for multicast traffic. Each - * router or gateway that forwards a packet decrements the TTL. If the TTL is - * decremented to 0 by a router, it will not be forwarded. - * - * The `ttl` argument may be between 0 and 255\. The default on most systems is `1`. - * - * This method throws `EBADF` if called on an unbound socket. - * @since v0.3.8 - */ - setMulticastTTL(ttl: number): number; - /** - * Sets the `SO_RCVBUF` socket option. Sets the maximum socket receive buffer - * in bytes. - * - * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. - * @since v8.7.0 - */ - setRecvBufferSize(size: number): void; - /** - * Sets the `SO_SNDBUF` socket option. Sets the maximum socket send buffer - * in bytes. - * - * This method throws `ERR_SOCKET_BUFFER_SIZE` if called on an unbound socket. - * @since v8.7.0 - */ - setSendBufferSize(size: number): void; - /** - * Sets the `IP_TTL` socket option. While TTL generally stands for "Time to Live", - * in this context it specifies the number of IP hops that a packet is allowed to - * travel through. Each router or gateway that forwards a packet decrements the - * TTL. If the TTL is decremented to 0 by a router, it will not be forwarded. - * Changing TTL values is typically done for network probes or when multicasting. - * - * The `ttl` argument may be between 1 and 255\. The default on most systems - * is 64. - * - * This method throws `EBADF` if called on an unbound socket. - * @since v0.1.101 - */ - setTTL(ttl: number): number; - /** - * By default, binding a socket will cause it to block the Node.js process from - * exiting as long as the socket is open. The `socket.unref()` method can be used - * to exclude the socket from the reference counting that keeps the Node.js - * process active, allowing the process to exit even if the socket is still - * listening. - * - * Calling `socket.unref()` multiple times will have no additional effect. - * - * The `socket.unref()` method returns a reference to the socket so calls can be - * chained. - * @since v0.9.1 - */ - unref(): this; - /** - * Tells the kernel to join a source-specific multicast channel at the given `sourceAddress` and `groupAddress`, using the `multicastInterface` with the `IP_ADD_SOURCE_MEMBERSHIP` socket - * option. If the `multicastInterface` argument - * is not specified, the operating system will choose one interface and will add - * membership to it. To add membership to every available interface, call `socket.addSourceSpecificMembership()` multiple times, once per interface. - * - * When called on an unbound socket, this method will implicitly bind to a random - * port, listening on all interfaces. - * @since v13.1.0, v12.16.0 - */ - addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void; - /** - * Instructs the kernel to leave a source-specific multicast channel at the given `sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP` socket option. This method is - * automatically called by the kernel when the - * socket is closed or the process terminates, so most apps will never have - * reason to call this. - * - * If `multicastInterface` is not specified, the operating system will attempt to - * drop membership on all valid interfaces. - * @since v13.1.0, v12.16.0 - */ - dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void; - /** - * events.EventEmitter - * 1. close - * 2. connect - * 3. error - * 4. listening - * 5. message - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "connect", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "listening", listener: () => void): this; - addListener(event: "message", listener: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "connect"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "listening"): boolean; - emit(event: "message", msg: NonSharedBuffer, rinfo: RemoteInfo): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: () => void): this; - on(event: "connect", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "listening", listener: () => void): this; - on(event: "message", listener: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "connect", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "listening", listener: () => void): this; - once(event: "message", listener: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "connect", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "listening", listener: () => void): this; - prependListener(event: "message", listener: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "connect", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "listening", listener: () => void): this; - prependOnceListener(event: "message", listener: (msg: NonSharedBuffer, rinfo: RemoteInfo) => void): this; - /** - * Calls `socket.close()` and returns a promise that fulfills when the socket has closed. - * @since v20.5.0 - */ - [Symbol.asyncDispose](): Promise; - } -} -declare module "node:dgram" { - export * from "dgram"; -} diff --git a/node_modules/@types/node/diagnostics_channel.d.ts b/node_modules/@types/node/diagnostics_channel.d.ts deleted file mode 100644 index f758aec..0000000 --- a/node_modules/@types/node/diagnostics_channel.d.ts +++ /dev/null @@ -1,578 +0,0 @@ -/** - * The `node:diagnostics_channel` module provides an API to create named channels - * to report arbitrary message data for diagnostics purposes. - * - * It can be accessed using: - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * ``` - * - * It is intended that a module writer wanting to report diagnostics messages - * will create one or many top-level channels to report messages through. - * Channels may also be acquired at runtime but it is not encouraged - * due to the additional overhead of doing so. Channels may be exported for - * convenience, but as long as the name is known it can be acquired anywhere. - * - * If you intend for your module to produce diagnostics data for others to - * consume it is recommended that you include documentation of what named - * channels are used along with the shape of the message data. Channel names - * should generally include the module name to avoid collisions with data from - * other modules. - * @since v15.1.0, v14.17.0 - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/diagnostics_channel.js) - */ -declare module "diagnostics_channel" { - import { AsyncLocalStorage } from "node:async_hooks"; - /** - * Check if there are active subscribers to the named channel. This is helpful if - * the message you want to send might be expensive to prepare. - * - * This API is optional but helpful when trying to publish messages from very - * performance-sensitive code. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * if (diagnostics_channel.hasSubscribers('my-channel')) { - * // There are subscribers, prepare and publish message - * } - * ``` - * @since v15.1.0, v14.17.0 - * @param name The channel name - * @return If there are active subscribers - */ - function hasSubscribers(name: string | symbol): boolean; - /** - * This is the primary entry-point for anyone wanting to publish to a named - * channel. It produces a channel object which is optimized to reduce overhead at - * publish time as much as possible. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channel = diagnostics_channel.channel('my-channel'); - * ``` - * @since v15.1.0, v14.17.0 - * @param name The channel name - * @return The named channel object - */ - function channel(name: string | symbol): Channel; - type ChannelListener = (message: unknown, name: string | symbol) => void; - /** - * Register a message handler to subscribe to this channel. This message handler - * will be run synchronously whenever a message is published to the channel. Any - * errors thrown in the message handler will trigger an `'uncaughtException'`. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * diagnostics_channel.subscribe('my-channel', (message, name) => { - * // Received data - * }); - * ``` - * @since v18.7.0, v16.17.0 - * @param name The channel name - * @param onMessage The handler to receive channel messages - */ - function subscribe(name: string | symbol, onMessage: ChannelListener): void; - /** - * Remove a message handler previously registered to this channel with {@link subscribe}. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * function onMessage(message, name) { - * // Received data - * } - * - * diagnostics_channel.subscribe('my-channel', onMessage); - * - * diagnostics_channel.unsubscribe('my-channel', onMessage); - * ``` - * @since v18.7.0, v16.17.0 - * @param name The channel name - * @param onMessage The previous subscribed handler to remove - * @return `true` if the handler was found, `false` otherwise. - */ - function unsubscribe(name: string | symbol, onMessage: ChannelListener): boolean; - /** - * Creates a `TracingChannel` wrapper for the given `TracingChannel Channels`. If a name is given, the corresponding tracing - * channels will be created in the form of `tracing:${name}:${eventType}` where `eventType` corresponds to the types of `TracingChannel Channels`. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channelsByName = diagnostics_channel.tracingChannel('my-channel'); - * - * // or... - * - * const channelsByCollection = diagnostics_channel.tracingChannel({ - * start: diagnostics_channel.channel('tracing:my-channel:start'), - * end: diagnostics_channel.channel('tracing:my-channel:end'), - * asyncStart: diagnostics_channel.channel('tracing:my-channel:asyncStart'), - * asyncEnd: diagnostics_channel.channel('tracing:my-channel:asyncEnd'), - * error: diagnostics_channel.channel('tracing:my-channel:error'), - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param nameOrChannels Channel name or object containing all the `TracingChannel Channels` - * @return Collection of channels to trace with - */ - function tracingChannel< - StoreType = unknown, - ContextType extends object = StoreType extends object ? StoreType : object, - >( - nameOrChannels: string | TracingChannelCollection, - ): TracingChannel; - /** - * The class `Channel` represents an individual named channel within the data - * pipeline. It is used to track subscribers and to publish messages when there - * are subscribers present. It exists as a separate object to avoid channel - * lookups at publish time, enabling very fast publish speeds and allowing - * for heavy use while incurring very minimal cost. Channels are created with {@link channel}, constructing a channel directly - * with `new Channel(name)` is not supported. - * @since v15.1.0, v14.17.0 - */ - class Channel { - readonly name: string | symbol; - /** - * Check if there are active subscribers to this channel. This is helpful if - * the message you want to send might be expensive to prepare. - * - * This API is optional but helpful when trying to publish messages from very - * performance-sensitive code. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * if (channel.hasSubscribers) { - * // There are subscribers, prepare and publish message - * } - * ``` - * @since v15.1.0, v14.17.0 - */ - readonly hasSubscribers: boolean; - private constructor(name: string | symbol); - /** - * Publish a message to any subscribers to the channel. This will trigger - * message handlers synchronously so they will execute within the same context. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * channel.publish({ - * some: 'message', - * }); - * ``` - * @since v15.1.0, v14.17.0 - * @param message The message to send to the channel subscribers - */ - publish(message: unknown): void; - /** - * Register a message handler to subscribe to this channel. This message handler - * will be run synchronously whenever a message is published to the channel. Any - * errors thrown in the message handler will trigger an `'uncaughtException'`. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * channel.subscribe((message, name) => { - * // Received data - * }); - * ``` - * @since v15.1.0, v14.17.0 - * @deprecated Since v18.7.0,v16.17.0 - Use {@link subscribe(name, onMessage)} - * @param onMessage The handler to receive channel messages - */ - subscribe(onMessage: ChannelListener): void; - /** - * Remove a message handler previously registered to this channel with `channel.subscribe(onMessage)`. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * function onMessage(message, name) { - * // Received data - * } - * - * channel.subscribe(onMessage); - * - * channel.unsubscribe(onMessage); - * ``` - * @since v15.1.0, v14.17.0 - * @deprecated Since v18.7.0,v16.17.0 - Use {@link unsubscribe(name, onMessage)} - * @param onMessage The previous subscribed handler to remove - * @return `true` if the handler was found, `false` otherwise. - */ - unsubscribe(onMessage: ChannelListener): void; - /** - * When `channel.runStores(context, ...)` is called, the given context data - * will be applied to any store bound to the channel. If the store has already been - * bound the previous `transform` function will be replaced with the new one. - * The `transform` function may be omitted to set the given context data as the - * context directly. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * import { AsyncLocalStorage } from 'node:async_hooks'; - * - * const store = new AsyncLocalStorage(); - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * channel.bindStore(store, (data) => { - * return { data }; - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param store The store to which to bind the context data - * @param transform Transform context data before setting the store context - */ - bindStore(store: AsyncLocalStorage, transform?: (context: ContextType) => StoreType): void; - /** - * Remove a message handler previously registered to this channel with `channel.bindStore(store)`. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * import { AsyncLocalStorage } from 'node:async_hooks'; - * - * const store = new AsyncLocalStorage(); - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * channel.bindStore(store); - * channel.unbindStore(store); - * ``` - * @since v19.9.0 - * @experimental - * @param store The store to unbind from the channel. - * @return `true` if the store was found, `false` otherwise. - */ - unbindStore(store: AsyncLocalStorage): boolean; - /** - * Applies the given data to any AsyncLocalStorage instances bound to the channel - * for the duration of the given function, then publishes to the channel within - * the scope of that data is applied to the stores. - * - * If a transform function was given to `channel.bindStore(store)` it will be - * applied to transform the message data before it becomes the context value for - * the store. The prior storage context is accessible from within the transform - * function in cases where context linking is required. - * - * The context applied to the store should be accessible in any async code which - * continues from execution which began during the given function, however - * there are some situations in which `context loss` may occur. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * import { AsyncLocalStorage } from 'node:async_hooks'; - * - * const store = new AsyncLocalStorage(); - * - * const channel = diagnostics_channel.channel('my-channel'); - * - * channel.bindStore(store, (message) => { - * const parent = store.getStore(); - * return new Span(message, parent); - * }); - * channel.runStores({ some: 'message' }, () => { - * store.getStore(); // Span({ some: 'message' }) - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param context Message to send to subscribers and bind to stores - * @param fn Handler to run within the entered storage context - * @param thisArg The receiver to be used for the function call. - * @param args Optional arguments to pass to the function. - */ - runStores( - context: ContextType, - fn: (this: ThisArg, ...args: Args) => Result, - thisArg?: ThisArg, - ...args: Args - ): Result; - } - interface TracingChannelSubscribers { - start: (message: ContextType) => void; - end: ( - message: ContextType & { - error?: unknown; - result?: unknown; - }, - ) => void; - asyncStart: ( - message: ContextType & { - error?: unknown; - result?: unknown; - }, - ) => void; - asyncEnd: ( - message: ContextType & { - error?: unknown; - result?: unknown; - }, - ) => void; - error: ( - message: ContextType & { - error: unknown; - }, - ) => void; - } - interface TracingChannelCollection { - start: Channel; - end: Channel; - asyncStart: Channel; - asyncEnd: Channel; - error: Channel; - } - /** - * The class `TracingChannel` is a collection of `TracingChannel Channels` which - * together express a single traceable action. It is used to formalize and - * simplify the process of producing events for tracing application flow. {@link tracingChannel} is used to construct a `TracingChannel`. As with `Channel` it is recommended to create and reuse a - * single `TracingChannel` at the top-level of the file rather than creating them - * dynamically. - * @since v19.9.0 - * @experimental - */ - class TracingChannel implements TracingChannelCollection { - start: Channel; - end: Channel; - asyncStart: Channel; - asyncEnd: Channel; - error: Channel; - /** - * Helper to subscribe a collection of functions to the corresponding channels. - * This is the same as calling `channel.subscribe(onMessage)` on each channel - * individually. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * - * channels.subscribe({ - * start(message) { - * // Handle start message - * }, - * end(message) { - * // Handle end message - * }, - * asyncStart(message) { - * // Handle asyncStart message - * }, - * asyncEnd(message) { - * // Handle asyncEnd message - * }, - * error(message) { - * // Handle error message - * }, - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param subscribers Set of `TracingChannel Channels` subscribers - */ - subscribe(subscribers: TracingChannelSubscribers): void; - /** - * Helper to unsubscribe a collection of functions from the corresponding channels. - * This is the same as calling `channel.unsubscribe(onMessage)` on each channel - * individually. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * - * channels.unsubscribe({ - * start(message) { - * // Handle start message - * }, - * end(message) { - * // Handle end message - * }, - * asyncStart(message) { - * // Handle asyncStart message - * }, - * asyncEnd(message) { - * // Handle asyncEnd message - * }, - * error(message) { - * // Handle error message - * }, - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param subscribers Set of `TracingChannel Channels` subscribers - * @return `true` if all handlers were successfully unsubscribed, and `false` otherwise. - */ - unsubscribe(subscribers: TracingChannelSubscribers): void; - /** - * Trace a synchronous function call. This will always produce a `start event` and `end event` around the execution and may produce an `error event` if the given function throws an error. - * This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all - * events should have any bound stores set to match this trace context. - * - * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions - * which are added after the trace begins will not receive future events from that trace, only future traces will be seen. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * - * channels.traceSync(() => { - * // Do something - * }, { - * some: 'thing', - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param fn Function to wrap a trace around - * @param context Shared object to correlate events through - * @param thisArg The receiver to be used for the function call - * @param args Optional arguments to pass to the function - * @return The return value of the given function - */ - traceSync( - fn: (this: ThisArg, ...args: Args) => Result, - context?: ContextType, - thisArg?: ThisArg, - ...args: Args - ): Result; - /** - * Trace a promise-returning function call. This will always produce a `start event` and `end event` around the synchronous portion of the - * function execution, and will produce an `asyncStart event` and `asyncEnd event` when a promise continuation is reached. It may also - * produce an `error event` if the given function throws an error or the - * returned promise rejects. This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all - * events should have any bound stores set to match this trace context. - * - * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions - * which are added after the trace begins will not receive future events from that trace, only future traces will be seen. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * - * channels.tracePromise(async () => { - * // Do something - * }, { - * some: 'thing', - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param fn Promise-returning function to wrap a trace around - * @param context Shared object to correlate trace events through - * @param thisArg The receiver to be used for the function call - * @param args Optional arguments to pass to the function - * @return Chained from promise returned by the given function - */ - tracePromise( - fn: (this: ThisArg, ...args: Args) => Promise, - context?: ContextType, - thisArg?: ThisArg, - ...args: Args - ): Promise; - /** - * Trace a callback-receiving function call. This will always produce a `start event` and `end event` around the synchronous portion of the - * function execution, and will produce a `asyncStart event` and `asyncEnd event` around the callback execution. It may also produce an `error event` if the given function throws an error or - * the returned - * promise rejects. This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all - * events should have any bound stores set to match this trace context. - * - * The `position` will be -1 by default to indicate the final argument should - * be used as the callback. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * - * channels.traceCallback((arg1, callback) => { - * // Do something - * callback(null, 'result'); - * }, 1, { - * some: 'thing', - * }, thisArg, arg1, callback); - * ``` - * - * The callback will also be run with `channel.runStores(context, ...)` which - * enables context loss recovery in some cases. - * - * To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions - * which are added after the trace begins will not receive future events from that trace, only future traces will be seen. - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * import { AsyncLocalStorage } from 'node:async_hooks'; - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * const myStore = new AsyncLocalStorage(); - * - * // The start channel sets the initial store data to something - * // and stores that store data value on the trace context object - * channels.start.bindStore(myStore, (data) => { - * const span = new Span(data); - * data.span = span; - * return span; - * }); - * - * // Then asyncStart can restore from that data it stored previously - * channels.asyncStart.bindStore(myStore, (data) => { - * return data.span; - * }); - * ``` - * @since v19.9.0 - * @experimental - * @param fn callback using function to wrap a trace around - * @param position Zero-indexed argument position of expected callback - * @param context Shared object to correlate trace events through - * @param thisArg The receiver to be used for the function call - * @param args Optional arguments to pass to the function - * @return The return value of the given function - */ - traceCallback( - fn: (this: ThisArg, ...args: Args) => Result, - position?: number, - context?: ContextType, - thisArg?: ThisArg, - ...args: Args - ): Result; - /** - * `true` if any of the individual channels has a subscriber, `false` if not. - * - * This is a helper method available on a {@link TracingChannel} instance to check - * if any of the [TracingChannel Channels](https://nodejs.org/api/diagnostics_channel.html#tracingchannel-channels) have subscribers. - * A `true` is returned if any of them have at least one subscriber, a `false` is returned otherwise. - * - * ```js - * const diagnostics_channel = require('node:diagnostics_channel'); - * - * const channels = diagnostics_channel.tracingChannel('my-channel'); - * - * if (channels.hasSubscribers) { - * // Do something - * } - * ``` - * @since v22.0.0, v20.13.0 - */ - readonly hasSubscribers: boolean; - } -} -declare module "node:diagnostics_channel" { - export * from "diagnostics_channel"; -} diff --git a/node_modules/@types/node/dns.d.ts b/node_modules/@types/node/dns.d.ts deleted file mode 100644 index acb5264..0000000 --- a/node_modules/@types/node/dns.d.ts +++ /dev/null @@ -1,871 +0,0 @@ -/** - * The `node:dns` module enables name resolution. For example, use it to look up IP - * addresses of host names. - * - * Although named for the [Domain Name System (DNS)](https://en.wikipedia.org/wiki/Domain_Name_System), it does not always use the - * DNS protocol for lookups. {@link lookup} uses the operating system - * facilities to perform name resolution. It may not need to perform any network - * communication. To perform name resolution the way other applications on the same - * system do, use {@link lookup}. - * - * ```js - * import dns from 'node:dns'; - * - * dns.lookup('example.org', (err, address, family) => { - * console.log('address: %j family: IPv%s', address, family); - * }); - * // address: "93.184.216.34" family: IPv4 - * ``` - * - * All other functions in the `node:dns` module connect to an actual DNS server to - * perform name resolution. They will always use the network to perform DNS - * queries. These functions do not use the same set of configuration files used by {@link lookup} (e.g. `/etc/hosts`). Use these functions to always perform - * DNS queries, bypassing other name-resolution facilities. - * - * ```js - * import dns from 'node:dns'; - * - * dns.resolve4('archive.org', (err, addresses) => { - * if (err) throw err; - * - * console.log(`addresses: ${JSON.stringify(addresses)}`); - * - * addresses.forEach((a) => { - * dns.reverse(a, (err, hostnames) => { - * if (err) { - * throw err; - * } - * console.log(`reverse for ${a}: ${JSON.stringify(hostnames)}`); - * }); - * }); - * }); - * ``` - * - * See the [Implementation considerations section](https://nodejs.org/docs/latest-v20.x/api/dns.html#implementation-considerations) for more information. - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/dns.js) - */ -declare module "dns" { - import * as dnsPromises from "node:dns/promises"; - // Supported getaddrinfo flags. - /** - * Limits returned address types to the types of non-loopback addresses configured on the system. For example, IPv4 addresses are - * only returned if the current system has at least one IPv4 address configured. - */ - export const ADDRCONFIG: number; - /** - * If the IPv6 family was specified, but no IPv6 addresses were found, then return IPv4 mapped IPv6 addresses. It is not supported - * on some operating systems (e.g. FreeBSD 10.1). - */ - export const V4MAPPED: number; - /** - * If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as - * well as IPv4 mapped IPv6 addresses. - */ - export const ALL: number; - export interface LookupOptions { - /** - * The record family. Must be `4`, `6`, or `0`. For backward compatibility reasons, `'IPv4'` and `'IPv6'` are interpreted - * as `4` and `6` respectively. The value 0 indicates that either an IPv4 or IPv6 address is returned. If the value `0` is used - * with `{ all: true } (see below)`, both IPv4 and IPv6 addresses are returned. - * @default 0 - */ - family?: number | "IPv4" | "IPv6" | undefined; - /** - * One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v20.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be - * passed by bitwise `OR`ing their values. - */ - hints?: number | undefined; - /** - * When `true`, the callback returns all resolved addresses in an array. Otherwise, returns a single address. - * @default false - */ - all?: boolean | undefined; - /** - * When `verbatim`, the resolved addresses are return unsorted. When `ipv4first`, the resolved addresses are sorted - * by placing IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved addresses are sorted by placing IPv6 - * addresses before IPv4 addresses. Default value is configurable using - * {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder). - * @default `verbatim` (addresses are not reordered) - */ - order?: "ipv4first" | "ipv6first" | "verbatim" | undefined; - /** - * When `true`, the callback receives IPv4 and IPv6 addresses in the order the DNS resolver returned them. When `false`, IPv4 - * addresses are placed before IPv6 addresses. This option will be deprecated in favor of `order`. When both are specified, - * `order` has higher precedence. New code should only use `order`. Default value is configurable using {@link setDefaultResultOrder} - * or [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder). - * @default true (addresses are not reordered) - */ - verbatim?: boolean | undefined; - } - export interface LookupOneOptions extends LookupOptions { - all?: false | undefined; - } - export interface LookupAllOptions extends LookupOptions { - all: true; - } - export interface LookupAddress { - /** - * A string representation of an IPv4 or IPv6 address. - */ - address: string; - /** - * `4` or `6`, denoting the family of `address`, or `0` if the address is not an IPv4 or IPv6 address. `0` is a likely indicator of a - * bug in the name resolution service used by the operating system. - */ - family: number; - } - /** - * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or - * AAAA (IPv6) record. All `option` properties are optional. If `options` is an - * integer, then it must be `4` or `6` – if `options` is `0` or not provided, then - * IPv4 and IPv6 addresses are both returned if found. - * - * With the `all` option set to `true`, the arguments for `callback` change to `(err, addresses)`, with `addresses` being an array of objects with the - * properties `address` and `family`. - * - * On error, `err` is an `Error` object, where `err.code` is the error code. - * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when - * the host name does not exist but also when the lookup fails in other ways - * such as no available file descriptors. - * - * `dns.lookup()` does not necessarily have anything to do with the DNS protocol. - * The implementation uses an operating system facility that can associate names - * with addresses and vice versa. This implementation can have subtle but - * important consequences on the behavior of any Node.js program. Please take some - * time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v20.x/api/dns.html#implementation-considerations) - * before using `dns.lookup()`. - * - * Example usage: - * - * ```js - * import dns from 'node:dns'; - * const options = { - * family: 6, - * hints: dns.ADDRCONFIG | dns.V4MAPPED, - * }; - * dns.lookup('example.com', options, (err, address, family) => - * console.log('address: %j family: IPv%s', address, family)); - * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6 - * - * // When options.all is true, the result will be an Array. - * options.all = true; - * dns.lookup('example.com', options, (err, addresses) => - * console.log('addresses: %j', addresses)); - * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}] - * ``` - * - * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v20.x/api/util.html#utilpromisifyoriginal) ed - * version, and `all` is not set to `true`, it returns a `Promise` for an `Object` with `address` and `family` properties. - * @since v0.1.90 - */ - export function lookup( - hostname: string, - family: number, - callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, - ): void; - export function lookup( - hostname: string, - options: LookupOneOptions, - callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, - ): void; - export function lookup( - hostname: string, - options: LookupAllOptions, - callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void, - ): void; - export function lookup( - hostname: string, - options: LookupOptions, - callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void, - ): void; - export function lookup( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, - ): void; - export namespace lookup { - function __promisify__(hostname: string, options: LookupAllOptions): Promise; - function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise; - function __promisify__(hostname: string, options: LookupOptions): Promise; - } - /** - * Resolves the given `address` and `port` into a host name and service using - * the operating system's underlying `getnameinfo` implementation. - * - * If `address` is not a valid IP address, a `TypeError` will be thrown. - * The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown. - * - * On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, - * where `err.code` is the error code. - * - * ```js - * import dns from 'node:dns'; - * dns.lookupService('127.0.0.1', 22, (err, hostname, service) => { - * console.log(hostname, service); - * // Prints: localhost ssh - * }); - * ``` - * - * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v20.x/api/util.html#utilpromisifyoriginal) ed - * version, it returns a `Promise` for an `Object` with `hostname` and `service` properties. - * @since v0.11.14 - */ - export function lookupService( - address: string, - port: number, - callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void, - ): void; - export namespace lookupService { - function __promisify__( - address: string, - port: number, - ): Promise<{ - hostname: string; - service: string; - }>; - } - export interface ResolveOptions { - ttl: boolean; - } - export interface ResolveWithTtlOptions extends ResolveOptions { - ttl: true; - } - export interface RecordWithTtl { - address: string; - ttl: number; - } - /** @deprecated Use `AnyARecord` or `AnyAaaaRecord` instead. */ - export type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord; - export interface AnyARecord extends RecordWithTtl { - type: "A"; - } - export interface AnyAaaaRecord extends RecordWithTtl { - type: "AAAA"; - } - export interface CaaRecord { - critical: number; - issue?: string | undefined; - issuewild?: string | undefined; - iodef?: string | undefined; - contactemail?: string | undefined; - contactphone?: string | undefined; - } - export interface AnyCaaRecord extends CaaRecord { - type: "CAA"; - } - export interface MxRecord { - priority: number; - exchange: string; - } - export interface AnyMxRecord extends MxRecord { - type: "MX"; - } - export interface NaptrRecord { - flags: string; - service: string; - regexp: string; - replacement: string; - order: number; - preference: number; - } - export interface AnyNaptrRecord extends NaptrRecord { - type: "NAPTR"; - } - export interface SoaRecord { - nsname: string; - hostmaster: string; - serial: number; - refresh: number; - retry: number; - expire: number; - minttl: number; - } - export interface AnySoaRecord extends SoaRecord { - type: "SOA"; - } - export interface SrvRecord { - priority: number; - weight: number; - port: number; - name: string; - } - export interface AnySrvRecord extends SrvRecord { - type: "SRV"; - } - export interface AnyTxtRecord { - type: "TXT"; - entries: string[]; - } - export interface AnyNsRecord { - type: "NS"; - value: string; - } - export interface AnyPtrRecord { - type: "PTR"; - value: string; - } - export interface AnyCnameRecord { - type: "CNAME"; - value: string; - } - export type AnyRecord = - | AnyARecord - | AnyAaaaRecord - | AnyCaaRecord - | AnyCnameRecord - | AnyMxRecord - | AnyNaptrRecord - | AnyNsRecord - | AnyPtrRecord - | AnySoaRecord - | AnySrvRecord - | AnyTxtRecord; - /** - * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array - * of the resource records. The `callback` function has arguments `(err, records)`. When successful, `records` will be an array of resource - * records. The type and structure of individual results varies based on `rrtype`: - * - * - * - * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, - * where `err.code` is one of the `DNS error codes`. - * @since v0.1.27 - * @param hostname Host name to resolve. - * @param [rrtype='A'] Resource record type. - */ - export function resolve( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - export function resolve( - hostname: string, - rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR", - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - export function resolve( - hostname: string, - rrtype: "ANY", - callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void, - ): void; - export function resolve( - hostname: string, - rrtype: "CAA", - callback: (err: NodeJS.ErrnoException | null, address: CaaRecord[]) => void, - ): void; - export function resolve( - hostname: string, - rrtype: "MX", - callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void, - ): void; - export function resolve( - hostname: string, - rrtype: "NAPTR", - callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void, - ): void; - export function resolve( - hostname: string, - rrtype: "SOA", - callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void, - ): void; - export function resolve( - hostname: string, - rrtype: "SRV", - callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void, - ): void; - export function resolve( - hostname: string, - rrtype: "TXT", - callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void, - ): void; - export function resolve( - hostname: string, - rrtype: string, - callback: ( - err: NodeJS.ErrnoException | null, - addresses: - | string[] - | CaaRecord[] - | MxRecord[] - | NaptrRecord[] - | SoaRecord - | SrvRecord[] - | string[][] - | AnyRecord[], - ) => void, - ): void; - export namespace resolve { - function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise; - function __promisify__(hostname: string, rrtype: "ANY"): Promise; - function __promisify__(hostname: string, rrtype: "CAA"): Promise; - function __promisify__(hostname: string, rrtype: "MX"): Promise; - function __promisify__(hostname: string, rrtype: "NAPTR"): Promise; - function __promisify__(hostname: string, rrtype: "SOA"): Promise; - function __promisify__(hostname: string, rrtype: "SRV"): Promise; - function __promisify__(hostname: string, rrtype: "TXT"): Promise; - function __promisify__( - hostname: string, - rrtype: string, - ): Promise< - | string[] - | CaaRecord[] - | MxRecord[] - | NaptrRecord[] - | SoaRecord - | SrvRecord[] - | string[][] - | AnyRecord[] - >; - } - /** - * Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the `hostname`. The `addresses` argument passed to the `callback` function - * will contain an array of IPv4 addresses (e.g.`['74.125.79.104', '74.125.79.105', '74.125.79.106']`). - * @since v0.1.16 - * @param hostname Host name to resolve. - */ - export function resolve4( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - export function resolve4( - hostname: string, - options: ResolveWithTtlOptions, - callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void, - ): void; - export function resolve4( - hostname: string, - options: ResolveOptions, - callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void, - ): void; - export namespace resolve4 { - function __promisify__(hostname: string): Promise; - function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; - function __promisify__(hostname: string, options?: ResolveOptions): Promise; - } - /** - * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. The `addresses` argument passed to the `callback` function - * will contain an array of IPv6 addresses. - * @since v0.1.16 - * @param hostname Host name to resolve. - */ - export function resolve6( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - export function resolve6( - hostname: string, - options: ResolveWithTtlOptions, - callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void, - ): void; - export function resolve6( - hostname: string, - options: ResolveOptions, - callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void, - ): void; - export namespace resolve6 { - function __promisify__(hostname: string): Promise; - function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise; - function __promisify__(hostname: string, options?: ResolveOptions): Promise; - } - /** - * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The `addresses` argument passed to the `callback` function - * will contain an array of canonical name records available for the `hostname` (e.g. `['bar.example.com']`). - * @since v0.3.2 - */ - export function resolveCname( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - export namespace resolveCname { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve `CAA` records for the `hostname`. The `addresses` argument passed to the `callback` function - * will contain an array of certification authority authorization records - * available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`). - * @since v15.0.0, v14.17.0 - */ - export function resolveCaa( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void, - ): void; - export namespace resolveCaa { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. The `addresses` argument passed to the `callback` function will - * contain an array of objects containing both a `priority` and `exchange` property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`). - * @since v0.1.27 - */ - export function resolveMx( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void, - ): void; - export namespace resolveMx { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will contain an array of - * objects with the following properties: - * - * * `flags` - * * `service` - * * `regexp` - * * `replacement` - * * `order` - * * `preference` - * - * ```js - * { - * flags: 's', - * service: 'SIP+D2U', - * regexp: '', - * replacement: '_sip._udp.example.com', - * order: 30, - * preference: 100 - * } - * ``` - * @since v0.9.12 - */ - export function resolveNaptr( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void, - ): void; - export namespace resolveNaptr { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. The `addresses` argument passed to the `callback` function will - * contain an array of name server records available for `hostname` (e.g. `['ns1.example.com', 'ns2.example.com']`). - * @since v0.1.90 - */ - export function resolveNs( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - export namespace resolveNs { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. The `addresses` argument passed to the `callback` function will - * be an array of strings containing the reply records. - * @since v6.0.0 - */ - export function resolvePtr( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void, - ): void; - export namespace resolvePtr { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for - * the `hostname`. The `address` argument passed to the `callback` function will - * be an object with the following properties: - * - * * `nsname` - * * `hostmaster` - * * `serial` - * * `refresh` - * * `retry` - * * `expire` - * * `minttl` - * - * ```js - * { - * nsname: 'ns.example.com', - * hostmaster: 'root.example.com', - * serial: 2013101809, - * refresh: 10000, - * retry: 2400, - * expire: 604800, - * minttl: 3600 - * } - * ``` - * @since v0.11.10 - */ - export function resolveSoa( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void, - ): void; - export namespace resolveSoa { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. The `addresses` argument passed to the `callback` function will - * be an array of objects with the following properties: - * - * * `priority` - * * `weight` - * * `port` - * * `name` - * - * ```js - * { - * priority: 10, - * weight: 5, - * port: 21223, - * name: 'service.example.com' - * } - * ``` - * @since v0.1.27 - */ - export function resolveSrv( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void, - ): void; - export namespace resolveSrv { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. The `records` argument passed to the `callback` function is a - * two-dimensional array of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of - * one record. Depending on the use case, these could be either joined together or - * treated separately. - * @since v0.1.27 - */ - export function resolveTxt( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void, - ): void; - export namespace resolveTxt { - function __promisify__(hostname: string): Promise; - } - /** - * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query). - * The `ret` argument passed to the `callback` function will be an array containing - * various types of records. Each object has a property `type` that indicates the - * type of the current record. And depending on the `type`, additional properties - * will be present on the object: - * - * - * - * Here is an example of the `ret` object passed to the callback: - * - * ```js - * [ { type: 'A', address: '127.0.0.1', ttl: 299 }, - * { type: 'CNAME', value: 'example.com' }, - * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 }, - * { type: 'NS', value: 'ns1.example.com' }, - * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] }, - * { type: 'SOA', - * nsname: 'ns1.example.com', - * hostmaster: 'admin.example.com', - * serial: 156696742, - * refresh: 900, - * retry: 900, - * expire: 1800, - * minttl: 60 } ] - * ``` - * - * DNS server operators may choose not to respond to `ANY` queries. It may be better to call individual methods like {@link resolve4}, {@link resolveMx}, and so on. For more details, see - * [RFC 8482](https://tools.ietf.org/html/rfc8482). - */ - export function resolveAny( - hostname: string, - callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void, - ): void; - export namespace resolveAny { - function __promisify__(hostname: string): Promise; - } - /** - * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an - * array of host names. - * - * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is - * one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes). - * @since v0.1.16 - */ - export function reverse( - ip: string, - callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void, - ): void; - /** - * Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options). - * The value could be: - * - * * `ipv4first`: for `order` defaulting to `ipv4first`. - * * `ipv6first`: for `order` defaulting to `ipv6first`. - * * `verbatim`: for `order` defaulting to `verbatim`. - * @since v18.17.0 - */ - export function getDefaultResultOrder(): "ipv4first" | "ipv6first" | "verbatim"; - /** - * Sets the IP address and port of servers to be used when performing DNS - * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted - * addresses. If the port is the IANA default DNS port (53) it can be omitted. - * - * ```js - * dns.setServers([ - * '4.4.4.4', - * '[2001:4860:4860::8888]', - * '4.4.4.4:1053', - * '[2001:4860:4860::8888]:1053', - * ]); - * ``` - * - * An error will be thrown if an invalid address is provided. - * - * The `dns.setServers()` method must not be called while a DNS query is in - * progress. - * - * The {@link setServers} method affects only {@link resolve}, `dns.resolve*()` and {@link reverse} (and specifically _not_ {@link lookup}). - * - * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html). - * That is, if attempting to resolve with the first server provided results in a `NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with - * subsequent servers provided. Fallback DNS servers will only be used if the - * earlier ones time out or result in some other error. - * @since v0.11.3 - * @param servers array of [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952#section-6) formatted addresses - */ - export function setServers(servers: readonly string[]): void; - /** - * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6), - * that are currently configured for DNS resolution. A string will include a port - * section if a custom port is used. - * - * ```js - * [ - * '4.4.4.4', - * '2001:4860:4860::8888', - * '4.4.4.4:1053', - * '[2001:4860:4860::8888]:1053', - * ] - * ``` - * @since v0.11.3 - */ - export function getServers(): string[]; - /** - * Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options). - * The value could be: - * - * * `ipv4first`: sets default `order` to `ipv4first`. - * * `ipv6first`: sets default `order` to `ipv6first`. - * * `verbatim`: sets default `order` to `verbatim`. - * - * The default is `verbatim` and {@link setDefaultResultOrder} have higher - * priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder). When using - * [worker threads](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main - * thread won't affect the default dns orders in workers. - * @since v16.4.0, v14.18.0 - * @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`. - */ - export function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void; - // Error codes - export const NODATA: "ENODATA"; - export const FORMERR: "EFORMERR"; - export const SERVFAIL: "ESERVFAIL"; - export const NOTFOUND: "ENOTFOUND"; - export const NOTIMP: "ENOTIMP"; - export const REFUSED: "EREFUSED"; - export const BADQUERY: "EBADQUERY"; - export const BADNAME: "EBADNAME"; - export const BADFAMILY: "EBADFAMILY"; - export const BADRESP: "EBADRESP"; - export const CONNREFUSED: "ECONNREFUSED"; - export const TIMEOUT: "ETIMEOUT"; - export const EOF: "EOF"; - export const FILE: "EFILE"; - export const NOMEM: "ENOMEM"; - export const DESTRUCTION: "EDESTRUCTION"; - export const BADSTR: "EBADSTR"; - export const BADFLAGS: "EBADFLAGS"; - export const NONAME: "ENONAME"; - export const BADHINTS: "EBADHINTS"; - export const NOTINITIALIZED: "ENOTINITIALIZED"; - export const LOADIPHLPAPI: "ELOADIPHLPAPI"; - export const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS"; - export const CANCELLED: "ECANCELLED"; - export interface ResolverOptions { - /** - * Query timeout in milliseconds, or `-1` to use the default timeout. - */ - timeout?: number | undefined; - /** - * The number of tries the resolver will try contacting each name server before giving up. - * @default 4 - */ - tries?: number | undefined; - } - /** - * An independent resolver for DNS requests. - * - * Creating a new resolver uses the default server settings. Setting - * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnssetserversservers) does not affect - * other resolvers: - * - * ```js - * import { Resolver } from 'node:dns'; - * const resolver = new Resolver(); - * resolver.setServers(['4.4.4.4']); - * - * // This request will use the server at 4.4.4.4, independent of global settings. - * resolver.resolve4('example.org', (err, addresses) => { - * // ... - * }); - * ``` - * - * The following methods from the `node:dns` module are available: - * - * * `resolver.getServers()` - * * `resolver.resolve()` - * * `resolver.resolve4()` - * * `resolver.resolve6()` - * * `resolver.resolveAny()` - * * `resolver.resolveCaa()` - * * `resolver.resolveCname()` - * * `resolver.resolveMx()` - * * `resolver.resolveNaptr()` - * * `resolver.resolveNs()` - * * `resolver.resolvePtr()` - * * `resolver.resolveSoa()` - * * `resolver.resolveSrv()` - * * `resolver.resolveTxt()` - * * `resolver.reverse()` - * * `resolver.setServers()` - * @since v8.3.0 - */ - export class Resolver { - constructor(options?: ResolverOptions); - /** - * Cancel all outstanding DNS queries made by this resolver. The corresponding - * callbacks will be called with an error with code `ECANCELLED`. - * @since v8.3.0 - */ - cancel(): void; - getServers: typeof getServers; - resolve: typeof resolve; - resolve4: typeof resolve4; - resolve6: typeof resolve6; - resolveAny: typeof resolveAny; - resolveCaa: typeof resolveCaa; - resolveCname: typeof resolveCname; - resolveMx: typeof resolveMx; - resolveNaptr: typeof resolveNaptr; - resolveNs: typeof resolveNs; - resolvePtr: typeof resolvePtr; - resolveSoa: typeof resolveSoa; - resolveSrv: typeof resolveSrv; - resolveTxt: typeof resolveTxt; - reverse: typeof reverse; - /** - * The resolver instance will send its requests from the specified IP address. - * This allows programs to specify outbound interfaces when used on multi-homed - * systems. - * - * If a v4 or v6 address is not specified, it is set to the default and the - * operating system will choose a local address automatically. - * - * The resolver will use the v4 local address when making requests to IPv4 DNS - * servers, and the v6 local address when making requests to IPv6 DNS servers. - * The `rrtype` of resolution requests has no impact on the local address used. - * @since v15.1.0, v14.17.0 - * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address. - * @param [ipv6='::0'] A string representation of an IPv6 address. - */ - setLocalAddress(ipv4?: string, ipv6?: string): void; - setServers: typeof setServers; - } - export { dnsPromises as promises }; -} -declare module "node:dns" { - export * from "dns"; -} diff --git a/node_modules/@types/node/dns/promises.d.ts b/node_modules/@types/node/dns/promises.d.ts deleted file mode 100644 index 29ae2ba..0000000 --- a/node_modules/@types/node/dns/promises.d.ts +++ /dev/null @@ -1,479 +0,0 @@ -/** - * The `dns.promises` API provides an alternative set of asynchronous DNS methods - * that return `Promise` objects rather than using callbacks. The API is accessible - * via `import { promises } from 'node:dns'` or `import dnsPromises from 'node:dns/promises'`. - * @since v10.6.0 - */ -declare module "dns/promises" { - import { - AnyRecord, - CaaRecord, - LookupAddress, - LookupAllOptions, - LookupOneOptions, - LookupOptions, - MxRecord, - NaptrRecord, - RecordWithTtl, - ResolveOptions, - ResolverOptions, - ResolveWithTtlOptions, - SoaRecord, - SrvRecord, - } from "node:dns"; - /** - * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6), - * that are currently configured for DNS resolution. A string will include a port - * section if a custom port is used. - * - * ```js - * [ - * '4.4.4.4', - * '2001:4860:4860::8888', - * '4.4.4.4:1053', - * '[2001:4860:4860::8888]:1053', - * ] - * ``` - * @since v10.6.0 - */ - function getServers(): string[]; - /** - * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or - * AAAA (IPv6) record. All `option` properties are optional. If `options` is an - * integer, then it must be `4` or `6` – if `options` is not provided, then IPv4 - * and IPv6 addresses are both returned if found. - * - * With the `all` option set to `true`, the `Promise` is resolved with `addresses` being an array of objects with the properties `address` and `family`. - * - * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code. - * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when - * the host name does not exist but also when the lookup fails in other ways - * such as no available file descriptors. - * - * [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options) does not necessarily have anything to do with the DNS - * protocol. The implementation uses an operating system facility that can - * associate names with addresses and vice versa. This implementation can have - * subtle but important consequences on the behavior of any Node.js program. Please - * take some time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v20.x/api/dns.html#implementation-considerations) before - * using `dnsPromises.lookup()`. - * - * Example usage: - * - * ```js - * import dns from 'node:dns'; - * const dnsPromises = dns.promises; - * const options = { - * family: 6, - * hints: dns.ADDRCONFIG | dns.V4MAPPED, - * }; - * - * dnsPromises.lookup('example.com', options).then((result) => { - * console.log('address: %j family: IPv%s', result.address, result.family); - * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6 - * }); - * - * // When options.all is true, the result will be an Array. - * options.all = true; - * dnsPromises.lookup('example.com', options).then((result) => { - * console.log('addresses: %j', result); - * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}] - * }); - * ``` - * @since v10.6.0 - */ - function lookup(hostname: string, family: number): Promise; - function lookup(hostname: string, options: LookupOneOptions): Promise; - function lookup(hostname: string, options: LookupAllOptions): Promise; - function lookup(hostname: string, options: LookupOptions): Promise; - function lookup(hostname: string): Promise; - /** - * Resolves the given `address` and `port` into a host name and service using - * the operating system's underlying `getnameinfo` implementation. - * - * If `address` is not a valid IP address, a `TypeError` will be thrown. - * The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown. - * - * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is the error code. - * - * ```js - * import dns from 'node:dns'; - * dns.promises.lookupService('127.0.0.1', 22).then((result) => { - * console.log(result.hostname, result.service); - * // Prints: localhost ssh - * }); - * ``` - * @since v10.6.0 - */ - function lookupService( - address: string, - port: number, - ): Promise<{ - hostname: string; - service: string; - }>; - /** - * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array - * of the resource records. When successful, the `Promise` is resolved with an - * array of resource records. The type and structure of individual results vary - * based on `rrtype`: - * - * - * - * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` - * is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes). - * @since v10.6.0 - * @param hostname Host name to resolve. - * @param [rrtype='A'] Resource record type. - */ - function resolve(hostname: string): Promise; - function resolve(hostname: string, rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise; - function resolve(hostname: string, rrtype: "ANY"): Promise; - function resolve(hostname: string, rrtype: "CAA"): Promise; - function resolve(hostname: string, rrtype: "MX"): Promise; - function resolve(hostname: string, rrtype: "NAPTR"): Promise; - function resolve(hostname: string, rrtype: "SOA"): Promise; - function resolve(hostname: string, rrtype: "SRV"): Promise; - function resolve(hostname: string, rrtype: "TXT"): Promise; - function resolve(hostname: string, rrtype: string): Promise< - | string[] - | CaaRecord[] - | MxRecord[] - | NaptrRecord[] - | SoaRecord - | SrvRecord[] - | string[][] - | AnyRecord[] - >; - /** - * Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv4 - * addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`). - * @since v10.6.0 - * @param hostname Host name to resolve. - */ - function resolve4(hostname: string): Promise; - function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise; - function resolve4(hostname: string, options: ResolveOptions): Promise; - /** - * Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv6 - * addresses. - * @since v10.6.0 - * @param hostname Host name to resolve. - */ - function resolve6(hostname: string): Promise; - function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise; - function resolve6(hostname: string, options: ResolveOptions): Promise; - /** - * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query). - * On success, the `Promise` is resolved with an array containing various types of - * records. Each object has a property `type` that indicates the type of the - * current record. And depending on the `type`, additional properties will be - * present on the object: - * - * - * - * Here is an example of the result object: - * - * ```js - * [ { type: 'A', address: '127.0.0.1', ttl: 299 }, - * { type: 'CNAME', value: 'example.com' }, - * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 }, - * { type: 'NS', value: 'ns1.example.com' }, - * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] }, - * { type: 'SOA', - * nsname: 'ns1.example.com', - * hostmaster: 'admin.example.com', - * serial: 156696742, - * refresh: 900, - * retry: 900, - * expire: 1800, - * minttl: 60 } ] - * ``` - * @since v10.6.0 - */ - function resolveAny(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve `CAA` records for the `hostname`. On success, - * the `Promise` is resolved with an array of objects containing available - * certification authority authorization records available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'},{critical: 128, issue: 'pki.example.com'}]`). - * @since v15.0.0, v14.17.0 - */ - function resolveCaa(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. On success, - * the `Promise` is resolved with an array of canonical name records available for - * the `hostname` (e.g. `['bar.example.com']`). - * @since v10.6.0 - */ - function resolveCname(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects - * containing both a `priority` and `exchange` property (e.g.`[{priority: 10, exchange: 'mx.example.com'}, ...]`). - * @since v10.6.0 - */ - function resolveMx(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve regular expression-based records (`NAPTR` records) for the `hostname`. On success, the `Promise` is resolved with an array - * of objects with the following properties: - * - * * `flags` - * * `service` - * * `regexp` - * * `replacement` - * * `order` - * * `preference` - * - * ```js - * { - * flags: 's', - * service: 'SIP+D2U', - * regexp: '', - * replacement: '_sip._udp.example.com', - * order: 30, - * preference: 100 - * } - * ``` - * @since v10.6.0 - */ - function resolveNaptr(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve name server records (`NS` records) for the `hostname`. On success, the `Promise` is resolved with an array of name server - * records available for `hostname` (e.g.`['ns1.example.com', 'ns2.example.com']`). - * @since v10.6.0 - */ - function resolveNs(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve pointer records (`PTR` records) for the `hostname`. On success, the `Promise` is resolved with an array of strings - * containing the reply records. - * @since v10.6.0 - */ - function resolvePtr(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for - * the `hostname`. On success, the `Promise` is resolved with an object with the - * following properties: - * - * * `nsname` - * * `hostmaster` - * * `serial` - * * `refresh` - * * `retry` - * * `expire` - * * `minttl` - * - * ```js - * { - * nsname: 'ns.example.com', - * hostmaster: 'root.example.com', - * serial: 2013101809, - * refresh: 10000, - * retry: 2400, - * expire: 604800, - * minttl: 3600 - * } - * ``` - * @since v10.6.0 - */ - function resolveSoa(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve service records (`SRV` records) for the `hostname`. On success, the `Promise` is resolved with an array of objects with - * the following properties: - * - * * `priority` - * * `weight` - * * `port` - * * `name` - * - * ```js - * { - * priority: 10, - * weight: 5, - * port: 21223, - * name: 'service.example.com' - * } - * ``` - * @since v10.6.0 - */ - function resolveSrv(hostname: string): Promise; - /** - * Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. On success, the `Promise` is resolved with a two-dimensional array - * of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of - * one record. Depending on the use case, these could be either joined together or - * treated separately. - * @since v10.6.0 - */ - function resolveTxt(hostname: string): Promise; - /** - * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an - * array of host names. - * - * On error, the `Promise` is rejected with an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` - * is one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes). - * @since v10.6.0 - */ - function reverse(ip: string): Promise; - /** - * Get the default value for `verbatim` in {@link lookup} and [dnsPromises.lookup()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options). - * The value could be: - * - * * `ipv4first`: for `verbatim` defaulting to `false`. - * * `verbatim`: for `verbatim` defaulting to `true`. - * @since v20.1.0 - */ - function getDefaultResultOrder(): "ipv4first" | "verbatim"; - /** - * Sets the IP address and port of servers to be used when performing DNS - * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted - * addresses. If the port is the IANA default DNS port (53) it can be omitted. - * - * ```js - * dnsPromises.setServers([ - * '4.4.4.4', - * '[2001:4860:4860::8888]', - * '4.4.4.4:1053', - * '[2001:4860:4860::8888]:1053', - * ]); - * ``` - * - * An error will be thrown if an invalid address is provided. - * - * The `dnsPromises.setServers()` method must not be called while a DNS query is in - * progress. - * - * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html). - * That is, if attempting to resolve with the first server provided results in a `NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with - * subsequent servers provided. Fallback DNS servers will only be used if the - * earlier ones time out or result in some other error. - * @since v10.6.0 - * @param servers array of `RFC 5952` formatted addresses - */ - function setServers(servers: readonly string[]): void; - /** - * Set the default value of `order` in `dns.lookup()` and `{@link lookup}`. The value could be: - * - * * `ipv4first`: sets default `order` to `ipv4first`. - * * `ipv6first`: sets default `order` to `ipv6first`. - * * `verbatim`: sets default `order` to `verbatim`. - * - * The default is `verbatim` and [dnsPromises.setDefaultResultOrder()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder) - * have higher priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder). - * When using [worker threads](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html), [`dnsPromises.setDefaultResultOrder()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder) - * from the main thread won't affect the default dns orders in workers. - * @since v16.4.0, v14.18.0 - * @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`. - */ - function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void; - // Error codes - const NODATA: "ENODATA"; - const FORMERR: "EFORMERR"; - const SERVFAIL: "ESERVFAIL"; - const NOTFOUND: "ENOTFOUND"; - const NOTIMP: "ENOTIMP"; - const REFUSED: "EREFUSED"; - const BADQUERY: "EBADQUERY"; - const BADNAME: "EBADNAME"; - const BADFAMILY: "EBADFAMILY"; - const BADRESP: "EBADRESP"; - const CONNREFUSED: "ECONNREFUSED"; - const TIMEOUT: "ETIMEOUT"; - const EOF: "EOF"; - const FILE: "EFILE"; - const NOMEM: "ENOMEM"; - const DESTRUCTION: "EDESTRUCTION"; - const BADSTR: "EBADSTR"; - const BADFLAGS: "EBADFLAGS"; - const NONAME: "ENONAME"; - const BADHINTS: "EBADHINTS"; - const NOTINITIALIZED: "ENOTINITIALIZED"; - const LOADIPHLPAPI: "ELOADIPHLPAPI"; - const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS"; - const CANCELLED: "ECANCELLED"; - - /** - * An independent resolver for DNS requests. - * - * Creating a new resolver uses the default server settings. Setting - * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetserversservers) does not affect - * other resolvers: - * - * ```js - * import dns from 'node:dns'; - * const { Resolver } = dns.promises; - * const resolver = new Resolver(); - * resolver.setServers(['4.4.4.4']); - * - * // This request will use the server at 4.4.4.4, independent of global settings. - * resolver.resolve4('example.org').then((addresses) => { - * // ... - * }); - * - * // Alternatively, the same code can be written using async-await style. - * (async function() { - * const addresses = await resolver.resolve4('example.org'); - * })(); - * ``` - * - * The following methods from the `dnsPromises` API are available: - * - * * `resolver.getServers()` - * * `resolver.resolve()` - * * `resolver.resolve4()` - * * `resolver.resolve6()` - * * `resolver.resolveAny()` - * * `resolver.resolveCaa()` - * * `resolver.resolveCname()` - * * `resolver.resolveMx()` - * * `resolver.resolveNaptr()` - * * `resolver.resolveNs()` - * * `resolver.resolvePtr()` - * * `resolver.resolveSoa()` - * * `resolver.resolveSrv()` - * * `resolver.resolveTxt()` - * * `resolver.reverse()` - * * `resolver.setServers()` - * @since v10.6.0 - */ - class Resolver { - constructor(options?: ResolverOptions); - /** - * Cancel all outstanding DNS queries made by this resolver. The corresponding - * callbacks will be called with an error with code `ECANCELLED`. - * @since v8.3.0 - */ - cancel(): void; - getServers: typeof getServers; - resolve: typeof resolve; - resolve4: typeof resolve4; - resolve6: typeof resolve6; - resolveAny: typeof resolveAny; - resolveCaa: typeof resolveCaa; - resolveCname: typeof resolveCname; - resolveMx: typeof resolveMx; - resolveNaptr: typeof resolveNaptr; - resolveNs: typeof resolveNs; - resolvePtr: typeof resolvePtr; - resolveSoa: typeof resolveSoa; - resolveSrv: typeof resolveSrv; - resolveTxt: typeof resolveTxt; - reverse: typeof reverse; - /** - * The resolver instance will send its requests from the specified IP address. - * This allows programs to specify outbound interfaces when used on multi-homed - * systems. - * - * If a v4 or v6 address is not specified, it is set to the default and the - * operating system will choose a local address automatically. - * - * The resolver will use the v4 local address when making requests to IPv4 DNS - * servers, and the v6 local address when making requests to IPv6 DNS servers. - * The `rrtype` of resolution requests has no impact on the local address used. - * @since v15.1.0, v14.17.0 - * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address. - * @param [ipv6='::0'] A string representation of an IPv6 address. - */ - setLocalAddress(ipv4?: string, ipv6?: string): void; - setServers: typeof setServers; - } -} -declare module "node:dns/promises" { - export * from "dns/promises"; -} diff --git a/node_modules/@types/node/domain.d.ts b/node_modules/@types/node/domain.d.ts deleted file mode 100644 index d83b0f0..0000000 --- a/node_modules/@types/node/domain.d.ts +++ /dev/null @@ -1,170 +0,0 @@ -/** - * **This module is pending deprecation.** Once a replacement API has been - * finalized, this module will be fully deprecated. Most developers should - * **not** have cause to use this module. Users who absolutely must have - * the functionality that domains provide may rely on it for the time being - * but should expect to have to migrate to a different solution - * in the future. - * - * Domains provide a way to handle multiple different IO operations as a - * single group. If any of the event emitters or callbacks registered to a - * domain emit an `'error'` event, or throw an error, then the domain object - * will be notified, rather than losing the context of the error in the `process.on('uncaughtException')` handler, or causing the program to - * exit immediately with an error code. - * @deprecated Since v1.4.2 - Deprecated - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/domain.js) - */ -declare module "domain" { - import EventEmitter = require("node:events"); - /** - * The `Domain` class encapsulates the functionality of routing errors and - * uncaught exceptions to the active `Domain` object. - * - * To handle the errors that it catches, listen to its `'error'` event. - */ - class Domain extends EventEmitter { - /** - * An array of timers and event emitters that have been explicitly added - * to the domain. - */ - members: Array; - /** - * The `enter()` method is plumbing used by the `run()`, `bind()`, and `intercept()` methods to set the active domain. It sets `domain.active` and `process.domain` to the domain, and implicitly - * pushes the domain onto the domain - * stack managed by the domain module (see {@link exit} for details on the - * domain stack). The call to `enter()` delimits the beginning of a chain of - * asynchronous calls and I/O operations bound to a domain. - * - * Calling `enter()` changes only the active domain, and does not alter the domain - * itself. `enter()` and `exit()` can be called an arbitrary number of times on a - * single domain. - */ - enter(): void; - /** - * The `exit()` method exits the current domain, popping it off the domain stack. - * Any time execution is going to switch to the context of a different chain of - * asynchronous calls, it's important to ensure that the current domain is exited. - * The call to `exit()` delimits either the end of or an interruption to the chain - * of asynchronous calls and I/O operations bound to a domain. - * - * If there are multiple, nested domains bound to the current execution context, `exit()` will exit any domains nested within this domain. - * - * Calling `exit()` changes only the active domain, and does not alter the domain - * itself. `enter()` and `exit()` can be called an arbitrary number of times on a - * single domain. - */ - exit(): void; - /** - * Run the supplied function in the context of the domain, implicitly - * binding all event emitters, timers, and low-level requests that are - * created in that context. Optionally, arguments can be passed to - * the function. - * - * This is the most basic way to use a domain. - * - * ```js - * import domain from 'node:domain'; - * import fs from 'node:fs'; - * const d = domain.create(); - * d.on('error', (er) => { - * console.error('Caught error!', er); - * }); - * d.run(() => { - * process.nextTick(() => { - * setTimeout(() => { // Simulating some various async stuff - * fs.open('non-existent file', 'r', (er, fd) => { - * if (er) throw er; - * // proceed... - * }); - * }, 100); - * }); - * }); - * ``` - * - * In this example, the `d.on('error')` handler will be triggered, rather - * than crashing the program. - */ - run(fn: (...args: any[]) => T, ...args: any[]): T; - /** - * Explicitly adds an emitter to the domain. If any event handlers called by - * the emitter throw an error, or if the emitter emits an `'error'` event, it - * will be routed to the domain's `'error'` event, just like with implicit - * binding. - * - * This also works with timers that are returned from `setInterval()` and `setTimeout()`. If their callback function throws, it will be caught by - * the domain `'error'` handler. - * - * If the Timer or `EventEmitter` was already bound to a domain, it is removed - * from that one, and bound to this one instead. - * @param emitter emitter or timer to be added to the domain - */ - add(emitter: EventEmitter | NodeJS.Timer): void; - /** - * The opposite of {@link add}. Removes domain handling from the - * specified emitter. - * @param emitter emitter or timer to be removed from the domain - */ - remove(emitter: EventEmitter | NodeJS.Timer): void; - /** - * The returned function will be a wrapper around the supplied callback - * function. When the returned function is called, any errors that are - * thrown will be routed to the domain's `'error'` event. - * - * ```js - * const d = domain.create(); - * - * function readSomeFile(filename, cb) { - * fs.readFile(filename, 'utf8', d.bind((er, data) => { - * // If this throws, it will also be passed to the domain. - * return cb(er, data ? JSON.parse(data) : null); - * })); - * } - * - * d.on('error', (er) => { - * // An error occurred somewhere. If we throw it now, it will crash the program - * // with the normal line number and stack message. - * }); - * ``` - * @param callback The callback function - * @return The bound function - */ - bind(callback: T): T; - /** - * This method is almost identical to {@link bind}. However, in - * addition to catching thrown errors, it will also intercept `Error` objects sent as the first argument to the function. - * - * In this way, the common `if (err) return callback(err);` pattern can be replaced - * with a single error handler in a single place. - * - * ```js - * const d = domain.create(); - * - * function readSomeFile(filename, cb) { - * fs.readFile(filename, 'utf8', d.intercept((data) => { - * // Note, the first argument is never passed to the - * // callback since it is assumed to be the 'Error' argument - * // and thus intercepted by the domain. - * - * // If this throws, it will also be passed to the domain - * // so the error-handling logic can be moved to the 'error' - * // event on the domain instead of being repeated throughout - * // the program. - * return cb(null, JSON.parse(data)); - * })); - * } - * - * d.on('error', (er) => { - * // An error occurred somewhere. If we throw it now, it will crash the program - * // with the normal line number and stack message. - * }); - * ``` - * @param callback The callback function - * @return The intercepted function - */ - intercept(callback: T): T; - } - function create(): Domain; -} -declare module "node:domain" { - export * from "domain"; -} diff --git a/node_modules/@types/node/events.d.ts b/node_modules/@types/node/events.d.ts deleted file mode 100644 index 31ab3ca..0000000 --- a/node_modules/@types/node/events.d.ts +++ /dev/null @@ -1,977 +0,0 @@ -/** - * Much of the Node.js core API is built around an idiomatic asynchronous - * event-driven architecture in which certain kinds of objects (called "emitters") - * emit named events that cause `Function` objects ("listeners") to be called. - * - * For instance: a `net.Server` object emits an event each time a peer - * connects to it; a `fs.ReadStream` emits an event when the file is opened; - * a `stream` emits an event whenever data is available to be read. - * - * All objects that emit events are instances of the `EventEmitter` class. These - * objects expose an `eventEmitter.on()` function that allows one or more - * functions to be attached to named events emitted by the object. Typically, - * event names are camel-cased strings but any valid JavaScript property key - * can be used. - * - * When the `EventEmitter` object emits an event, all of the functions attached - * to that specific event are called _synchronously_. Any values returned by the - * called listeners are _ignored_ and discarded. - * - * The following example shows a simple `EventEmitter` instance with a single - * listener. The `eventEmitter.on()` method is used to register listeners, while - * the `eventEmitter.emit()` method is used to trigger the event. - * - * ```js - * import { EventEmitter } from 'node:events'; - * - * class MyEmitter extends EventEmitter {} - * - * const myEmitter = new MyEmitter(); - * myEmitter.on('event', () => { - * console.log('an event occurred!'); - * }); - * myEmitter.emit('event'); - * ``` - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/events.js) - */ -declare module "events" { - import { AsyncResource, AsyncResourceOptions } from "node:async_hooks"; - interface EventEmitterOptions { - /** - * Enables automatic capturing of promise rejection. - */ - captureRejections?: boolean | undefined; - } - interface StaticEventEmitterOptions { - /** - * Can be used to cancel awaiting events. - */ - signal?: AbortSignal | undefined; - } - interface StaticEventEmitterIteratorOptions extends StaticEventEmitterOptions { - /** - * Names of events that will end the iteration. - */ - close?: string[] | undefined; - /** - * The high watermark. The emitter is paused every time the size of events being buffered is higher than it. - * Supported only on emitters implementing `pause()` and `resume()` methods. - * @default Number.MAX_SAFE_INTEGER - */ - highWaterMark?: number | undefined; - /** - * The low watermark. The emitter is resumed every time the size of events being buffered is lower than it. - * Supported only on emitters implementing `pause()` and `resume()` methods. - * @default 1 - */ - lowWaterMark?: number | undefined; - } - interface EventEmitter = DefaultEventMap> extends NodeJS.EventEmitter {} - type EventMap = Record | DefaultEventMap; - type DefaultEventMap = [never]; - type AnyRest = [...args: any[]]; - type Args = T extends DefaultEventMap ? AnyRest : ( - K extends keyof T ? T[K] : never - ); - type Key = T extends DefaultEventMap ? string | symbol : K | keyof T; - type Key2 = T extends DefaultEventMap ? string | symbol : K & keyof T; - type Listener = T extends DefaultEventMap ? F : ( - K extends keyof T ? ( - T[K] extends unknown[] ? (...args: T[K]) => void : never - ) - : never - ); - type Listener1 = Listener void>; - type Listener2 = Listener; - - /** - * The `EventEmitter` class is defined and exposed by the `node:events` module: - * - * ```js - * import { EventEmitter } from 'node:events'; - * ``` - * - * All `EventEmitter`s emit the event `'newListener'` when new listeners are - * added and `'removeListener'` when existing listeners are removed. - * - * It supports the following option: - * @since v0.1.26 - */ - class EventEmitter = DefaultEventMap> { - constructor(options?: EventEmitterOptions); - - [EventEmitter.captureRejectionSymbol]?(error: Error, event: Key, ...args: Args): void; - - /** - * Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given - * event or that is rejected if the `EventEmitter` emits `'error'` while waiting. - * The `Promise` will resolve with an array of all the arguments emitted to the - * given event. - * - * This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event - * semantics and does not listen to the `'error'` event. - * - * ```js - * import { once, EventEmitter } from 'node:events'; - * import process from 'node:process'; - * - * const ee = new EventEmitter(); - * - * process.nextTick(() => { - * ee.emit('myevent', 42); - * }); - * - * const [value] = await once(ee, 'myevent'); - * console.log(value); - * - * const err = new Error('kaboom'); - * process.nextTick(() => { - * ee.emit('error', err); - * }); - * - * try { - * await once(ee, 'myevent'); - * } catch (err) { - * console.error('error happened', err); - * } - * ``` - * - * The special handling of the `'error'` event is only used when `events.once()` is used to wait for another event. If `events.once()` is used to wait for the - * '`error'` event itself, then it is treated as any other kind of event without - * special handling: - * - * ```js - * import { EventEmitter, once } from 'node:events'; - * - * const ee = new EventEmitter(); - * - * once(ee, 'error') - * .then(([err]) => console.log('ok', err.message)) - * .catch((err) => console.error('error', err.message)); - * - * ee.emit('error', new Error('boom')); - * - * // Prints: ok boom - * ``` - * - * An `AbortSignal` can be used to cancel waiting for the event: - * - * ```js - * import { EventEmitter, once } from 'node:events'; - * - * const ee = new EventEmitter(); - * const ac = new AbortController(); - * - * async function foo(emitter, event, signal) { - * try { - * await once(emitter, event, { signal }); - * console.log('event emitted!'); - * } catch (error) { - * if (error.name === 'AbortError') { - * console.error('Waiting for the event was canceled!'); - * } else { - * console.error('There was an error', error.message); - * } - * } - * } - * - * foo(ee, 'foo', ac.signal); - * ac.abort(); // Abort waiting for the event - * ee.emit('foo'); // Prints: Waiting for the event was canceled! - * ``` - * @since v11.13.0, v10.16.0 - */ - static once( - emitter: NodeJS.EventEmitter, - eventName: string | symbol, - options?: StaticEventEmitterOptions, - ): Promise; - static once(emitter: EventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise; - /** - * ```js - * import { on, EventEmitter } from 'node:events'; - * import process from 'node:process'; - * - * const ee = new EventEmitter(); - * - * // Emit later on - * process.nextTick(() => { - * ee.emit('foo', 'bar'); - * ee.emit('foo', 42); - * }); - * - * for await (const event of on(ee, 'foo')) { - * // The execution of this inner block is synchronous and it - * // processes one event at a time (even with await). Do not use - * // if concurrent execution is required. - * console.log(event); // prints ['bar'] [42] - * } - * // Unreachable here - * ``` - * - * Returns an `AsyncIterator` that iterates `eventName` events. It will throw - * if the `EventEmitter` emits `'error'`. It removes all listeners when - * exiting the loop. The `value` returned by each iteration is an array - * composed of the emitted event arguments. - * - * An `AbortSignal` can be used to cancel waiting on events: - * - * ```js - * import { on, EventEmitter } from 'node:events'; - * import process from 'node:process'; - * - * const ac = new AbortController(); - * - * (async () => { - * const ee = new EventEmitter(); - * - * // Emit later on - * process.nextTick(() => { - * ee.emit('foo', 'bar'); - * ee.emit('foo', 42); - * }); - * - * for await (const event of on(ee, 'foo', { signal: ac.signal })) { - * // The execution of this inner block is synchronous and it - * // processes one event at a time (even with await). Do not use - * // if concurrent execution is required. - * console.log(event); // prints ['bar'] [42] - * } - * // Unreachable here - * })(); - * - * process.nextTick(() => ac.abort()); - * ``` - * - * Use the `close` option to specify an array of event names that will end the iteration: - * - * ```js - * import { on, EventEmitter } from 'node:events'; - * import process from 'node:process'; - * - * const ee = new EventEmitter(); - * - * // Emit later on - * process.nextTick(() => { - * ee.emit('foo', 'bar'); - * ee.emit('foo', 42); - * ee.emit('close'); - * }); - * - * for await (const event of on(ee, 'foo', { close: ['close'] })) { - * console.log(event); // prints ['bar'] [42] - * } - * // the loop will exit after 'close' is emitted - * console.log('done'); // prints 'done' - * ``` - * @since v13.6.0, v12.16.0 - * @return An `AsyncIterator` that iterates `eventName` events emitted by the `emitter` - */ - static on( - emitter: NodeJS.EventEmitter, - eventName: string | symbol, - options?: StaticEventEmitterIteratorOptions, - ): NodeJS.AsyncIterator; - static on( - emitter: EventTarget, - eventName: string, - options?: StaticEventEmitterIteratorOptions, - ): NodeJS.AsyncIterator; - /** - * A class method that returns the number of listeners for the given `eventName` registered on the given `emitter`. - * - * ```js - * import { EventEmitter, listenerCount } from 'node:events'; - * - * const myEmitter = new EventEmitter(); - * myEmitter.on('event', () => {}); - * myEmitter.on('event', () => {}); - * console.log(listenerCount(myEmitter, 'event')); - * // Prints: 2 - * ``` - * @since v0.9.12 - * @deprecated Since v3.2.0 - Use `listenerCount` instead. - * @param emitter The emitter to query - * @param eventName The event name - */ - static listenerCount(emitter: NodeJS.EventEmitter, eventName: string | symbol): number; - /** - * Returns a copy of the array of listeners for the event named `eventName`. - * - * For `EventEmitter`s this behaves exactly the same as calling `.listeners` on - * the emitter. - * - * For `EventTarget`s this is the only way to get the event listeners for the - * event target. This is useful for debugging and diagnostic purposes. - * - * ```js - * import { getEventListeners, EventEmitter } from 'node:events'; - * - * { - * const ee = new EventEmitter(); - * const listener = () => console.log('Events are fun'); - * ee.on('foo', listener); - * console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ] - * } - * { - * const et = new EventTarget(); - * const listener = () => console.log('Events are fun'); - * et.addEventListener('foo', listener); - * console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ] - * } - * ``` - * @since v15.2.0, v14.17.0 - */ - static getEventListeners(emitter: EventTarget | NodeJS.EventEmitter, name: string | symbol): Function[]; - /** - * Returns the currently set max amount of listeners. - * - * For `EventEmitter`s this behaves exactly the same as calling `.getMaxListeners` on - * the emitter. - * - * For `EventTarget`s this is the only way to get the max event listeners for the - * event target. If the number of event handlers on a single EventTarget exceeds - * the max set, the EventTarget will print a warning. - * - * ```js - * import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events'; - * - * { - * const ee = new EventEmitter(); - * console.log(getMaxListeners(ee)); // 10 - * setMaxListeners(11, ee); - * console.log(getMaxListeners(ee)); // 11 - * } - * { - * const et = new EventTarget(); - * console.log(getMaxListeners(et)); // 10 - * setMaxListeners(11, et); - * console.log(getMaxListeners(et)); // 11 - * } - * ``` - * @since v19.9.0 - */ - static getMaxListeners(emitter: EventTarget | NodeJS.EventEmitter): number; - /** - * ```js - * import { setMaxListeners, EventEmitter } from 'node:events'; - * - * const target = new EventTarget(); - * const emitter = new EventEmitter(); - * - * setMaxListeners(5, target, emitter); - * ``` - * @since v15.4.0 - * @param n A non-negative number. The maximum number of listeners per `EventTarget` event. - * @param eventTargets Zero or more {EventTarget} or {EventEmitter} instances. If none are specified, `n` is set as the default max for all newly created {EventTarget} and {EventEmitter} - * objects. - */ - static setMaxListeners(n?: number, ...eventTargets: Array): void; - /** - * Listens once to the `abort` event on the provided `signal`. - * - * Listening to the `abort` event on abort signals is unsafe and may - * lead to resource leaks since another third party with the signal can - * call `e.stopImmediatePropagation()`. Unfortunately Node.js cannot change - * this since it would violate the web standard. Additionally, the original - * API makes it easy to forget to remove listeners. - * - * This API allows safely using `AbortSignal`s in Node.js APIs by solving these - * two issues by listening to the event such that `stopImmediatePropagation` does - * not prevent the listener from running. - * - * Returns a disposable so that it may be unsubscribed from more easily. - * - * ```js - * import { addAbortListener } from 'node:events'; - * - * function example(signal) { - * let disposable; - * try { - * signal.addEventListener('abort', (e) => e.stopImmediatePropagation()); - * disposable = addAbortListener(signal, (e) => { - * // Do something when signal is aborted. - * }); - * } finally { - * disposable?.[Symbol.dispose](); - * } - * } - * ``` - * @since v20.5.0 - * @experimental - * @return Disposable that removes the `abort` listener. - */ - static addAbortListener(signal: AbortSignal, resource: (event: Event) => void): Disposable; - /** - * This symbol shall be used to install a listener for only monitoring `'error'` events. Listeners installed using this symbol are called before the regular `'error'` listeners are called. - * - * Installing a listener using this symbol does not change the behavior once an `'error'` event is emitted. Therefore, the process will still crash if no - * regular `'error'` listener is installed. - * @since v13.6.0, v12.17.0 - */ - static readonly errorMonitor: unique symbol; - /** - * Value: `Symbol.for('nodejs.rejection')` - * - * See how to write a custom `rejection handler`. - * @since v13.4.0, v12.16.0 - */ - static readonly captureRejectionSymbol: unique symbol; - /** - * Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) - * - * Change the default `captureRejections` option on all new `EventEmitter` objects. - * @since v13.4.0, v12.16.0 - */ - static captureRejections: boolean; - /** - * By default, a maximum of `10` listeners can be registered for any single - * event. This limit can be changed for individual `EventEmitter` instances - * using the `emitter.setMaxListeners(n)` method. To change the default - * for _all_`EventEmitter` instances, the `events.defaultMaxListeners` property - * can be used. If this value is not a positive number, a `RangeError` is thrown. - * - * Take caution when setting the `events.defaultMaxListeners` because the - * change affects _all_ `EventEmitter` instances, including those created before - * the change is made. However, calling `emitter.setMaxListeners(n)` still has - * precedence over `events.defaultMaxListeners`. - * - * This is not a hard limit. The `EventEmitter` instance will allow - * more listeners to be added but will output a trace warning to stderr indicating - * that a "possible EventEmitter memory leak" has been detected. For any single - * `EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()` methods can be used to - * temporarily avoid this warning: - * - * ```js - * import { EventEmitter } from 'node:events'; - * const emitter = new EventEmitter(); - * emitter.setMaxListeners(emitter.getMaxListeners() + 1); - * emitter.once('event', () => { - * // do stuff - * emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0)); - * }); - * ``` - * - * The `--trace-warnings` command-line flag can be used to display the - * stack trace for such warnings. - * - * The emitted warning can be inspected with `process.on('warning')` and will - * have the additional `emitter`, `type`, and `count` properties, referring to - * the event emitter instance, the event's name and the number of attached - * listeners, respectively. - * Its `name` property is set to `'MaxListenersExceededWarning'`. - * @since v0.11.2 - */ - static defaultMaxListeners: number; - } - import internal = require("node:events"); - namespace EventEmitter { - // Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4 - export { internal as EventEmitter }; - export interface Abortable { - /** - * When provided the corresponding `AbortController` can be used to cancel an asynchronous action. - */ - signal?: AbortSignal | undefined; - } - - export interface EventEmitterReferencingAsyncResource extends AsyncResource { - readonly eventEmitter: EventEmitterAsyncResource; - } - - export interface EventEmitterAsyncResourceOptions extends AsyncResourceOptions, EventEmitterOptions { - /** - * The type of async event, this is required when instantiating `EventEmitterAsyncResource` - * directly rather than as a child class. - * @default new.target.name if instantiated as a child class. - */ - name?: string | undefined; - } - - /** - * Integrates `EventEmitter` with `AsyncResource` for `EventEmitter`s that - * require manual async tracking. Specifically, all events emitted by instances - * of `events.EventEmitterAsyncResource` will run within its `async context`. - * - * ```js - * import { EventEmitterAsyncResource, EventEmitter } from 'node:events'; - * import { notStrictEqual, strictEqual } from 'node:assert'; - * import { executionAsyncId, triggerAsyncId } from 'node:async_hooks'; - * - * // Async tracking tooling will identify this as 'Q'. - * const ee1 = new EventEmitterAsyncResource({ name: 'Q' }); - * - * // 'foo' listeners will run in the EventEmitters async context. - * ee1.on('foo', () => { - * strictEqual(executionAsyncId(), ee1.asyncId); - * strictEqual(triggerAsyncId(), ee1.triggerAsyncId); - * }); - * - * const ee2 = new EventEmitter(); - * - * // 'foo' listeners on ordinary EventEmitters that do not track async - * // context, however, run in the same async context as the emit(). - * ee2.on('foo', () => { - * notStrictEqual(executionAsyncId(), ee2.asyncId); - * notStrictEqual(triggerAsyncId(), ee2.triggerAsyncId); - * }); - * - * Promise.resolve().then(() => { - * ee1.emit('foo'); - * ee2.emit('foo'); - * }); - * ``` - * - * The `EventEmitterAsyncResource` class has the same methods and takes the - * same options as `EventEmitter` and `AsyncResource` themselves. - * @since v17.4.0, v16.14.0 - */ - export class EventEmitterAsyncResource extends EventEmitter { - /** - * @param options Only optional in child class. - */ - constructor(options?: EventEmitterAsyncResourceOptions); - /** - * Call all `destroy` hooks. This should only ever be called once. An error will - * be thrown if it is called more than once. This **must** be manually called. If - * the resource is left to be collected by the GC then the `destroy` hooks will - * never be called. - */ - emitDestroy(): void; - /** - * The unique `asyncId` assigned to the resource. - */ - readonly asyncId: number; - /** - * The same triggerAsyncId that is passed to the AsyncResource constructor. - */ - readonly triggerAsyncId: number; - /** - * The returned `AsyncResource` object has an additional `eventEmitter` property - * that provides a reference to this `EventEmitterAsyncResource`. - */ - readonly asyncResource: EventEmitterReferencingAsyncResource; - } - /** - * The `NodeEventTarget` is a Node.js-specific extension to `EventTarget` - * that emulates a subset of the `EventEmitter` API. - * @since v14.5.0 - */ - export interface NodeEventTarget extends EventTarget { - /** - * Node.js-specific extension to the `EventTarget` class that emulates the - * equivalent `EventEmitter` API. The only difference between `addListener()` and - * `addEventListener()` is that `addListener()` will return a reference to the - * `EventTarget`. - * @since v14.5.0 - */ - addListener(type: string, listener: (arg: any) => void): this; - /** - * Node.js-specific extension to the `EventTarget` class that dispatches the - * `arg` to the list of handlers for `type`. - * @since v15.2.0 - * @returns `true` if event listeners registered for the `type` exist, - * otherwise `false`. - */ - emit(type: string, arg: any): boolean; - /** - * Node.js-specific extension to the `EventTarget` class that returns an array - * of event `type` names for which event listeners are registered. - * @since 14.5.0 - */ - eventNames(): string[]; - /** - * Node.js-specific extension to the `EventTarget` class that returns the number - * of event listeners registered for the `type`. - * @since v14.5.0 - */ - listenerCount(type: string): number; - /** - * Node.js-specific extension to the `EventTarget` class that sets the number - * of max event listeners as `n`. - * @since v14.5.0 - */ - setMaxListeners(n: number): void; - /** - * Node.js-specific extension to the `EventTarget` class that returns the number - * of max event listeners. - * @since v14.5.0 - */ - getMaxListeners(): number; - /** - * Node.js-specific alias for `eventTarget.removeEventListener()`. - * @since v14.5.0 - */ - off(type: string, listener: (arg: any) => void, options?: EventListenerOptions): this; - /** - * Node.js-specific alias for `eventTarget.addEventListener()`. - * @since v14.5.0 - */ - on(type: string, listener: (arg: any) => void): this; - /** - * Node.js-specific extension to the `EventTarget` class that adds a `once` - * listener for the given event `type`. This is equivalent to calling `on` - * with the `once` option set to `true`. - * @since v14.5.0 - */ - once(type: string, listener: (arg: any) => void): this; - /** - * Node.js-specific extension to the `EventTarget` class. If `type` is specified, - * removes all registered listeners for `type`, otherwise removes all registered - * listeners. - * @since v14.5.0 - */ - removeAllListeners(type?: string): this; - /** - * Node.js-specific extension to the `EventTarget` class that removes the - * `listener` for the given `type`. The only difference between `removeListener()` - * and `removeEventListener()` is that `removeListener()` will return a reference - * to the `EventTarget`. - * @since v14.5.0 - */ - removeListener(type: string, listener: (arg: any) => void, options?: EventListenerOptions): this; - } - } - global { - namespace NodeJS { - interface EventEmitter = DefaultEventMap> { - [EventEmitter.captureRejectionSymbol]?(error: Error, event: Key, ...args: Args): void; - /** - * Alias for `emitter.on(eventName, listener)`. - * @since v0.1.26 - */ - addListener(eventName: Key, listener: Listener1): this; - /** - * Adds the `listener` function to the end of the listeners array for the event - * named `eventName`. No checks are made to see if the `listener` has already - * been added. Multiple calls passing the same combination of `eventName` and - * `listener` will result in the `listener` being added, and called, multiple times. - * - * ```js - * server.on('connection', (stream) => { - * console.log('someone connected!'); - * }); - * ``` - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * - * By default, event listeners are invoked in the order they are added. The `emitter.prependListener()` method can be used as an alternative to add the - * event listener to the beginning of the listeners array. - * - * ```js - * import { EventEmitter } from 'node:events'; - * const myEE = new EventEmitter(); - * myEE.on('foo', () => console.log('a')); - * myEE.prependListener('foo', () => console.log('b')); - * myEE.emit('foo'); - * // Prints: - * // b - * // a - * ``` - * @since v0.1.101 - * @param eventName The name of the event. - * @param listener The callback function - */ - on(eventName: Key, listener: Listener1): this; - /** - * Adds a **one-time** `listener` function for the event named `eventName`. The - * next time `eventName` is triggered, this listener is removed and then invoked. - * - * ```js - * server.once('connection', (stream) => { - * console.log('Ah, we have our first user!'); - * }); - * ``` - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * - * By default, event listeners are invoked in the order they are added. The `emitter.prependOnceListener()` method can be used as an alternative to add the - * event listener to the beginning of the listeners array. - * - * ```js - * import { EventEmitter } from 'node:events'; - * const myEE = new EventEmitter(); - * myEE.once('foo', () => console.log('a')); - * myEE.prependOnceListener('foo', () => console.log('b')); - * myEE.emit('foo'); - * // Prints: - * // b - * // a - * ``` - * @since v0.3.0 - * @param eventName The name of the event. - * @param listener The callback function - */ - once(eventName: Key, listener: Listener1): this; - /** - * Removes the specified `listener` from the listener array for the event named `eventName`. - * - * ```js - * const callback = (stream) => { - * console.log('someone connected!'); - * }; - * server.on('connection', callback); - * // ... - * server.removeListener('connection', callback); - * ``` - * - * `removeListener()` will remove, at most, one instance of a listener from the - * listener array. If any single listener has been added multiple times to the - * listener array for the specified `eventName`, then `removeListener()` must be - * called multiple times to remove each instance. - * - * Once an event is emitted, all listeners attached to it at the - * time of emitting are called in order. This implies that any `removeListener()` or `removeAllListeners()` calls _after_ emitting and _before_ the last listener finishes execution - * will not remove them from`emit()` in progress. Subsequent events behave as expected. - * - * ```js - * import { EventEmitter } from 'node:events'; - * class MyEmitter extends EventEmitter {} - * const myEmitter = new MyEmitter(); - * - * const callbackA = () => { - * console.log('A'); - * myEmitter.removeListener('event', callbackB); - * }; - * - * const callbackB = () => { - * console.log('B'); - * }; - * - * myEmitter.on('event', callbackA); - * - * myEmitter.on('event', callbackB); - * - * // callbackA removes listener callbackB but it will still be called. - * // Internal listener array at time of emit [callbackA, callbackB] - * myEmitter.emit('event'); - * // Prints: - * // A - * // B - * - * // callbackB is now removed. - * // Internal listener array [callbackA] - * myEmitter.emit('event'); - * // Prints: - * // A - * ``` - * - * Because listeners are managed using an internal array, calling this will - * change the position indices of any listener registered _after_ the listener - * being removed. This will not impact the order in which listeners are called, - * but it means that any copies of the listener array as returned by - * the `emitter.listeners()` method will need to be recreated. - * - * When a single function has been added as a handler multiple times for a single - * event (as in the example below), `removeListener()` will remove the most - * recently added instance. In the example the `once('ping')` listener is removed: - * - * ```js - * import { EventEmitter } from 'node:events'; - * const ee = new EventEmitter(); - * - * function pong() { - * console.log('pong'); - * } - * - * ee.on('ping', pong); - * ee.once('ping', pong); - * ee.removeListener('ping', pong); - * - * ee.emit('ping'); - * ee.emit('ping'); - * ``` - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * @since v0.1.26 - */ - removeListener(eventName: Key, listener: Listener1): this; - /** - * Alias for `emitter.removeListener()`. - * @since v10.0.0 - */ - off(eventName: Key, listener: Listener1): this; - /** - * Removes all listeners, or those of the specified `eventName`. - * - * It is bad practice to remove listeners added elsewhere in the code, - * particularly when the `EventEmitter` instance was created by some other - * component or module (e.g. sockets or file streams). - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * @since v0.1.26 - */ - removeAllListeners(eventName?: Key): this; - /** - * By default `EventEmitter`s will print a warning if more than `10` listeners are - * added for a particular event. This is a useful default that helps finding - * memory leaks. The `emitter.setMaxListeners()` method allows the limit to be - * modified for this specific `EventEmitter` instance. The value can be set to `Infinity` (or `0`) to indicate an unlimited number of listeners. - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * @since v0.3.5 - */ - setMaxListeners(n: number): this; - /** - * Returns the current max listener value for the `EventEmitter` which is either - * set by `emitter.setMaxListeners(n)` or defaults to {@link EventEmitter.defaultMaxListeners}. - * @since v1.0.0 - */ - getMaxListeners(): number; - /** - * Returns a copy of the array of listeners for the event named `eventName`. - * - * ```js - * server.on('connection', (stream) => { - * console.log('someone connected!'); - * }); - * console.log(util.inspect(server.listeners('connection'))); - * // Prints: [ [Function] ] - * ``` - * @since v0.1.26 - */ - listeners(eventName: Key): Array>; - /** - * Returns a copy of the array of listeners for the event named `eventName`, - * including any wrappers (such as those created by `.once()`). - * - * ```js - * import { EventEmitter } from 'node:events'; - * const emitter = new EventEmitter(); - * emitter.once('log', () => console.log('log once')); - * - * // Returns a new Array with a function `onceWrapper` which has a property - * // `listener` which contains the original listener bound above - * const listeners = emitter.rawListeners('log'); - * const logFnWrapper = listeners[0]; - * - * // Logs "log once" to the console and does not unbind the `once` event - * logFnWrapper.listener(); - * - * // Logs "log once" to the console and removes the listener - * logFnWrapper(); - * - * emitter.on('log', () => console.log('log persistently')); - * // Will return a new Array with a single function bound by `.on()` above - * const newListeners = emitter.rawListeners('log'); - * - * // Logs "log persistently" twice - * newListeners[0](); - * emitter.emit('log'); - * ``` - * @since v9.4.0 - */ - rawListeners(eventName: Key): Array>; - /** - * Synchronously calls each of the listeners registered for the event named `eventName`, in the order they were registered, passing the supplied arguments - * to each. - * - * Returns `true` if the event had listeners, `false` otherwise. - * - * ```js - * import { EventEmitter } from 'node:events'; - * const myEmitter = new EventEmitter(); - * - * // First listener - * myEmitter.on('event', function firstListener() { - * console.log('Helloooo! first listener'); - * }); - * // Second listener - * myEmitter.on('event', function secondListener(arg1, arg2) { - * console.log(`event with parameters ${arg1}, ${arg2} in second listener`); - * }); - * // Third listener - * myEmitter.on('event', function thirdListener(...args) { - * const parameters = args.join(', '); - * console.log(`event with parameters ${parameters} in third listener`); - * }); - * - * console.log(myEmitter.listeners('event')); - * - * myEmitter.emit('event', 1, 2, 3, 4, 5); - * - * // Prints: - * // [ - * // [Function: firstListener], - * // [Function: secondListener], - * // [Function: thirdListener] - * // ] - * // Helloooo! first listener - * // event with parameters 1, 2 in second listener - * // event with parameters 1, 2, 3, 4, 5 in third listener - * ``` - * @since v0.1.26 - */ - emit(eventName: Key, ...args: Args): boolean; - /** - * Returns the number of listeners listening for the event named `eventName`. - * If `listener` is provided, it will return how many times the listener is found - * in the list of the listeners of the event. - * @since v3.2.0 - * @param eventName The name of the event being listened for - * @param listener The event handler function - */ - listenerCount(eventName: Key, listener?: Listener2): number; - /** - * Adds the `listener` function to the _beginning_ of the listeners array for the - * event named `eventName`. No checks are made to see if the `listener` has - * already been added. Multiple calls passing the same combination of `eventName` - * and `listener` will result in the `listener` being added, and called, multiple times. - * - * ```js - * server.prependListener('connection', (stream) => { - * console.log('someone connected!'); - * }); - * ``` - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * @since v6.0.0 - * @param eventName The name of the event. - * @param listener The callback function - */ - prependListener(eventName: Key, listener: Listener1): this; - /** - * Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this - * listener is removed, and then invoked. - * - * ```js - * server.prependOnceListener('connection', (stream) => { - * console.log('Ah, we have our first user!'); - * }); - * ``` - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * @since v6.0.0 - * @param eventName The name of the event. - * @param listener The callback function - */ - prependOnceListener(eventName: Key, listener: Listener1): this; - /** - * Returns an array listing the events for which the emitter has registered - * listeners. The values in the array are strings or `Symbol`s. - * - * ```js - * import { EventEmitter } from 'node:events'; - * - * const myEE = new EventEmitter(); - * myEE.on('foo', () => {}); - * myEE.on('bar', () => {}); - * - * const sym = Symbol('symbol'); - * myEE.on(sym, () => {}); - * - * console.log(myEE.eventNames()); - * // Prints: [ 'foo', 'bar', Symbol(symbol) ] - * ``` - * @since v6.0.0 - */ - eventNames(): Array<(string | symbol) & Key2>; - } - } - } - export = EventEmitter; -} -declare module "node:events" { - import events = require("events"); - export = events; -} diff --git a/node_modules/@types/node/fs.d.ts b/node_modules/@types/node/fs.d.ts deleted file mode 100644 index 4115ffe..0000000 --- a/node_modules/@types/node/fs.d.ts +++ /dev/null @@ -1,4375 +0,0 @@ -/** - * The `node:fs` module enables interacting with the file system in a - * way modeled on standard POSIX functions. - * - * To use the promise-based APIs: - * - * ```js - * import * as fs from 'node:fs/promises'; - * ``` - * - * To use the callback and sync APIs: - * - * ```js - * import * as fs from 'node:fs'; - * ``` - * - * All file system operations have synchronous, callback, and promise-based - * forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM). - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/fs.js) - */ -declare module "fs" { - import { NonSharedBuffer } from "node:buffer"; - import * as stream from "node:stream"; - import { Abortable, EventEmitter } from "node:events"; - import { URL } from "node:url"; - import * as promises from "node:fs/promises"; - export { promises }; - /** - * Valid types for path values in "fs". - */ - export type PathLike = string | Buffer | URL; - export type PathOrFileDescriptor = PathLike | number; - export type TimeLike = string | number | Date; - export type NoParamCallback = (err: NodeJS.ErrnoException | null) => void; - export type BufferEncodingOption = - | "buffer" - | { - encoding: "buffer"; - }; - export interface ObjectEncodingOptions { - encoding?: BufferEncoding | null | undefined; - } - export type EncodingOption = ObjectEncodingOptions | BufferEncoding | undefined | null; - export type OpenMode = number | string; - export type Mode = number | string; - export interface StatsBase { - isFile(): boolean; - isDirectory(): boolean; - isBlockDevice(): boolean; - isCharacterDevice(): boolean; - isSymbolicLink(): boolean; - isFIFO(): boolean; - isSocket(): boolean; - dev: T; - ino: T; - mode: T; - nlink: T; - uid: T; - gid: T; - rdev: T; - size: T; - blksize: T; - blocks: T; - atimeMs: T; - mtimeMs: T; - ctimeMs: T; - birthtimeMs: T; - atime: Date; - mtime: Date; - ctime: Date; - birthtime: Date; - } - export interface Stats extends StatsBase {} - /** - * A `fs.Stats` object provides information about a file. - * - * Objects returned from {@link stat}, {@link lstat}, {@link fstat}, and - * their synchronous counterparts are of this type. - * If `bigint` in the `options` passed to those methods is true, the numeric values - * will be `bigint` instead of `number`, and the object will contain additional - * nanosecond-precision properties suffixed with `Ns`. `Stat` objects are not to be created directly using the `new` keyword. - * - * ```console - * Stats { - * dev: 2114, - * ino: 48064969, - * mode: 33188, - * nlink: 1, - * uid: 85, - * gid: 100, - * rdev: 0, - * size: 527, - * blksize: 4096, - * blocks: 8, - * atimeMs: 1318289051000.1, - * mtimeMs: 1318289051000.1, - * ctimeMs: 1318289051000.1, - * birthtimeMs: 1318289051000.1, - * atime: Mon, 10 Oct 2011 23:24:11 GMT, - * mtime: Mon, 10 Oct 2011 23:24:11 GMT, - * ctime: Mon, 10 Oct 2011 23:24:11 GMT, - * birthtime: Mon, 10 Oct 2011 23:24:11 GMT } - * ``` - * - * `bigint` version: - * - * ```console - * BigIntStats { - * dev: 2114n, - * ino: 48064969n, - * mode: 33188n, - * nlink: 1n, - * uid: 85n, - * gid: 100n, - * rdev: 0n, - * size: 527n, - * blksize: 4096n, - * blocks: 8n, - * atimeMs: 1318289051000n, - * mtimeMs: 1318289051000n, - * ctimeMs: 1318289051000n, - * birthtimeMs: 1318289051000n, - * atimeNs: 1318289051000000000n, - * mtimeNs: 1318289051000000000n, - * ctimeNs: 1318289051000000000n, - * birthtimeNs: 1318289051000000000n, - * atime: Mon, 10 Oct 2011 23:24:11 GMT, - * mtime: Mon, 10 Oct 2011 23:24:11 GMT, - * ctime: Mon, 10 Oct 2011 23:24:11 GMT, - * birthtime: Mon, 10 Oct 2011 23:24:11 GMT } - * ``` - * @since v0.1.21 - */ - export class Stats {} - export interface StatsFsBase { - /** Type of file system. */ - type: T; - /** Optimal transfer block size. */ - bsize: T; - /** Total data blocks in file system. */ - blocks: T; - /** Free blocks in file system. */ - bfree: T; - /** Available blocks for unprivileged users */ - bavail: T; - /** Total file nodes in file system. */ - files: T; - /** Free file nodes in file system. */ - ffree: T; - } - export interface StatsFs extends StatsFsBase {} - /** - * Provides information about a mounted file system. - * - * Objects returned from {@link statfs} and its synchronous counterpart are of - * this type. If `bigint` in the `options` passed to those methods is `true`, the - * numeric values will be `bigint` instead of `number`. - * - * ```console - * StatFs { - * type: 1397114950, - * bsize: 4096, - * blocks: 121938943, - * bfree: 61058895, - * bavail: 61058895, - * files: 999, - * ffree: 1000000 - * } - * ``` - * - * `bigint` version: - * - * ```console - * StatFs { - * type: 1397114950n, - * bsize: 4096n, - * blocks: 121938943n, - * bfree: 61058895n, - * bavail: 61058895n, - * files: 999n, - * ffree: 1000000n - * } - * ``` - * @since v19.6.0, v18.15.0 - */ - export class StatsFs {} - export interface BigIntStatsFs extends StatsFsBase {} - export interface StatFsOptions { - bigint?: boolean | undefined; - } - /** - * A representation of a directory entry, which can be a file or a subdirectory - * within the directory, as returned by reading from an `fs.Dir`. The - * directory entry is a combination of the file name and file type pairs. - * - * Additionally, when {@link readdir} or {@link readdirSync} is called with - * the `withFileTypes` option set to `true`, the resulting array is filled with `fs.Dirent` objects, rather than strings or `Buffer` s. - * @since v10.10.0 - */ - export class Dirent { - /** - * Returns `true` if the `fs.Dirent` object describes a regular file. - * @since v10.10.0 - */ - isFile(): boolean; - /** - * Returns `true` if the `fs.Dirent` object describes a file system - * directory. - * @since v10.10.0 - */ - isDirectory(): boolean; - /** - * Returns `true` if the `fs.Dirent` object describes a block device. - * @since v10.10.0 - */ - isBlockDevice(): boolean; - /** - * Returns `true` if the `fs.Dirent` object describes a character device. - * @since v10.10.0 - */ - isCharacterDevice(): boolean; - /** - * Returns `true` if the `fs.Dirent` object describes a symbolic link. - * @since v10.10.0 - */ - isSymbolicLink(): boolean; - /** - * Returns `true` if the `fs.Dirent` object describes a first-in-first-out - * (FIFO) pipe. - * @since v10.10.0 - */ - isFIFO(): boolean; - /** - * Returns `true` if the `fs.Dirent` object describes a socket. - * @since v10.10.0 - */ - isSocket(): boolean; - /** - * The file name that this `fs.Dirent` object refers to. The type of this - * value is determined by the `options.encoding` passed to {@link readdir} or {@link readdirSync}. - * @since v10.10.0 - */ - name: Name; - /** - * The base path that this `fs.Dirent` object refers to. - * @since v20.12.0 - */ - parentPath: string; - /** - * Alias for `dirent.parentPath`. - * @since v20.1.0 - * @deprecated Since v20.12.0 - */ - path: string; - } - /** - * A class representing a directory stream. - * - * Created by {@link opendir}, {@link opendirSync}, or `fsPromises.opendir()`. - * - * ```js - * import { opendir } from 'node:fs/promises'; - * - * try { - * const dir = await opendir('./'); - * for await (const dirent of dir) - * console.log(dirent.name); - * } catch (err) { - * console.error(err); - * } - * ``` - * - * When using the async iterator, the `fs.Dir` object will be automatically - * closed after the iterator exits. - * @since v12.12.0 - */ - export class Dir implements AsyncIterable { - /** - * The read-only path of this directory as was provided to {@link opendir},{@link opendirSync}, or `fsPromises.opendir()`. - * @since v12.12.0 - */ - readonly path: string; - /** - * Asynchronously iterates over the directory via `readdir(3)` until all entries have been read. - */ - [Symbol.asyncIterator](): NodeJS.AsyncIterator; - /** - * Asynchronously close the directory's underlying resource handle. - * Subsequent reads will result in errors. - * - * A promise is returned that will be fulfilled after the resource has been - * closed. - * @since v12.12.0 - */ - close(): Promise; - close(cb: NoParamCallback): void; - /** - * Synchronously close the directory's underlying resource handle. - * Subsequent reads will result in errors. - * @since v12.12.0 - */ - closeSync(): void; - /** - * Asynchronously read the next directory entry via [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) as an `fs.Dirent`. - * - * A promise is returned that will be fulfilled with an `fs.Dirent`, or `null` if there are no more directory entries to read. - * - * Directory entries returned by this function are in no particular order as - * provided by the operating system's underlying directory mechanisms. - * Entries added or removed while iterating over the directory might not be - * included in the iteration results. - * @since v12.12.0 - * @return containing {fs.Dirent|null} - */ - read(): Promise; - read(cb: (err: NodeJS.ErrnoException | null, dirEnt: Dirent | null) => void): void; - /** - * Synchronously read the next directory entry as an `fs.Dirent`. See the - * POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more detail. - * - * If there are no more directory entries to read, `null` will be returned. - * - * Directory entries returned by this function are in no particular order as - * provided by the operating system's underlying directory mechanisms. - * Entries added or removed while iterating over the directory might not be - * included in the iteration results. - * @since v12.12.0 - */ - readSync(): Dirent | null; - } - /** - * Class: fs.StatWatcher - * @since v14.3.0, v12.20.0 - * Extends `EventEmitter` - * A successful call to {@link watchFile} method will return a new fs.StatWatcher object. - */ - export interface StatWatcher extends EventEmitter { - /** - * When called, requests that the Node.js event loop _not_ exit so long as the `fs.StatWatcher` is active. Calling `watcher.ref()` multiple times will have - * no effect. - * - * By default, all `fs.StatWatcher` objects are "ref'ed", making it normally - * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been - * called previously. - * @since v14.3.0, v12.20.0 - */ - ref(): this; - /** - * When called, the active `fs.StatWatcher` object will not require the Node.js - * event loop to remain active. If there is no other activity keeping the - * event loop running, the process may exit before the `fs.StatWatcher` object's - * callback is invoked. Calling `watcher.unref()` multiple times will have - * no effect. - * @since v14.3.0, v12.20.0 - */ - unref(): this; - } - export interface FSWatcher extends EventEmitter { - /** - * Stop watching for changes on the given `fs.FSWatcher`. Once stopped, the `fs.FSWatcher` object is no longer usable. - * @since v0.5.8 - */ - close(): void; - /** - * When called, requests that the Node.js event loop _not_ exit so long as the `fs.FSWatcher` is active. Calling `watcher.ref()` multiple times will have - * no effect. - * - * By default, all `fs.FSWatcher` objects are "ref'ed", making it normally - * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been - * called previously. - * @since v14.3.0, v12.20.0 - */ - ref(): this; - /** - * When called, the active `fs.FSWatcher` object will not require the Node.js - * event loop to remain active. If there is no other activity keeping the - * event loop running, the process may exit before the `fs.FSWatcher` object's - * callback is invoked. Calling `watcher.unref()` multiple times will have - * no effect. - * @since v14.3.0, v12.20.0 - */ - unref(): this; - /** - * events.EventEmitter - * 1. change - * 2. close - * 3. error - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "change", listener: (eventType: string, filename: string | NonSharedBuffer) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "error", listener: (error: Error) => void): this; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "change", listener: (eventType: string, filename: string | NonSharedBuffer) => void): this; - on(event: "close", listener: () => void): this; - on(event: "error", listener: (error: Error) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "change", listener: (eventType: string, filename: string | NonSharedBuffer) => void): this; - once(event: "close", listener: () => void): this; - once(event: "error", listener: (error: Error) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener( - event: "change", - listener: (eventType: string, filename: string | NonSharedBuffer) => void, - ): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "error", listener: (error: Error) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener( - event: "change", - listener: (eventType: string, filename: string | NonSharedBuffer) => void, - ): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "error", listener: (error: Error) => void): this; - } - /** - * Instances of `fs.ReadStream` are created and returned using the {@link createReadStream} function. - * @since v0.1.93 - */ - export class ReadStream extends stream.Readable { - close(callback?: (err?: NodeJS.ErrnoException | null) => void): void; - /** - * The number of bytes that have been read so far. - * @since v6.4.0 - */ - bytesRead: number; - /** - * The path to the file the stream is reading from as specified in the first - * argument to `fs.createReadStream()`. If `path` is passed as a string, then`readStream.path` will be a string. If `path` is passed as a `Buffer`, then`readStream.path` will be a - * `Buffer`. If `fd` is specified, then`readStream.path` will be `undefined`. - * @since v0.1.93 - */ - path: string | Buffer; - /** - * This property is `true` if the underlying file has not been opened yet, - * i.e. before the `'ready'` event is emitted. - * @since v11.2.0, v10.16.0 - */ - pending: boolean; - /** - * events.EventEmitter - * 1. open - * 2. close - * 3. ready - */ - addListener(event: K, listener: ReadStreamEvents[K]): this; - on(event: K, listener: ReadStreamEvents[K]): this; - once(event: K, listener: ReadStreamEvents[K]): this; - prependListener(event: K, listener: ReadStreamEvents[K]): this; - prependOnceListener(event: K, listener: ReadStreamEvents[K]): this; - } - - /** - * The Keys are events of the ReadStream and the values are the functions that are called when the event is emitted. - */ - type ReadStreamEvents = { - close: () => void; - data: (chunk: Buffer | string) => void; - end: () => void; - error: (err: Error) => void; - open: (fd: number) => void; - pause: () => void; - readable: () => void; - ready: () => void; - resume: () => void; - } & CustomEvents; - - /** - * string & {} allows to allow any kind of strings for the event - * but still allows to have auto completion for the normal events. - */ - type CustomEvents = { [Key in string & {} | symbol]: (...args: any[]) => void }; - - /** - * The Keys are events of the WriteStream and the values are the functions that are called when the event is emitted. - */ - type WriteStreamEvents = { - close: () => void; - drain: () => void; - error: (err: Error) => void; - finish: () => void; - open: (fd: number) => void; - pipe: (src: stream.Readable) => void; - ready: () => void; - unpipe: (src: stream.Readable) => void; - } & CustomEvents; - /** - * * Extends `stream.Writable` - * - * Instances of `fs.WriteStream` are created and returned using the {@link createWriteStream} function. - * @since v0.1.93 - */ - export class WriteStream extends stream.Writable { - /** - * Closes `writeStream`. Optionally accepts a - * callback that will be executed once the `writeStream`is closed. - * @since v0.9.4 - */ - close(callback?: (err?: NodeJS.ErrnoException | null) => void): void; - /** - * The number of bytes written so far. Does not include data that is still queued - * for writing. - * @since v0.4.7 - */ - bytesWritten: number; - /** - * The path to the file the stream is writing to as specified in the first - * argument to {@link createWriteStream}. If `path` is passed as a string, then`writeStream.path` will be a string. If `path` is passed as a `Buffer`, then`writeStream.path` will be a - * `Buffer`. - * @since v0.1.93 - */ - path: string | Buffer; - /** - * This property is `true` if the underlying file has not been opened yet, - * i.e. before the `'ready'` event is emitted. - * @since v11.2.0 - */ - pending: boolean; - /** - * events.EventEmitter - * 1. open - * 2. close - * 3. ready - */ - addListener(event: K, listener: WriteStreamEvents[K]): this; - on(event: K, listener: WriteStreamEvents[K]): this; - once(event: K, listener: WriteStreamEvents[K]): this; - prependListener(event: K, listener: WriteStreamEvents[K]): this; - prependOnceListener(event: K, listener: WriteStreamEvents[K]): this; - } - /** - * Asynchronously rename file at `oldPath` to the pathname provided - * as `newPath`. In the case that `newPath` already exists, it will - * be overwritten. If there is a directory at `newPath`, an error will - * be raised instead. No arguments other than a possible exception are - * given to the completion callback. - * - * See also: [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html). - * - * ```js - * import { rename } from 'node:fs'; - * - * rename('oldFile.txt', 'newFile.txt', (err) => { - * if (err) throw err; - * console.log('Rename complete!'); - * }); - * ``` - * @since v0.0.2 - */ - export function rename(oldPath: PathLike, newPath: PathLike, callback: NoParamCallback): void; - export namespace rename { - /** - * Asynchronous rename(2) - Change the name or location of a file or directory. - * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function __promisify__(oldPath: PathLike, newPath: PathLike): Promise; - } - /** - * Renames the file from `oldPath` to `newPath`. Returns `undefined`. - * - * See the POSIX [`rename(2)`](http://man7.org/linux/man-pages/man2/rename.2.html) documentation for more details. - * @since v0.1.21 - */ - export function renameSync(oldPath: PathLike, newPath: PathLike): void; - /** - * Truncates the file. No arguments other than a possible exception are - * given to the completion callback. A file descriptor can also be passed as the - * first argument. In this case, `fs.ftruncate()` is called. - * - * ```js - * import { truncate } from 'node:fs'; - * // Assuming that 'path/file.txt' is a regular file. - * truncate('path/file.txt', (err) => { - * if (err) throw err; - * console.log('path/file.txt was truncated'); - * }); - * ``` - * - * Passing a file descriptor is deprecated and may result in an error being thrown - * in the future. - * - * See the POSIX [`truncate(2)`](http://man7.org/linux/man-pages/man2/truncate.2.html) documentation for more details. - * @since v0.8.6 - * @param [len=0] - */ - export function truncate(path: PathLike, len: number | undefined, callback: NoParamCallback): void; - /** - * Asynchronous truncate(2) - Truncate a file to a specified length. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - export function truncate(path: PathLike, callback: NoParamCallback): void; - export namespace truncate { - /** - * Asynchronous truncate(2) - Truncate a file to a specified length. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param len If not specified, defaults to `0`. - */ - function __promisify__(path: PathLike, len?: number): Promise; - } - /** - * Truncates the file. Returns `undefined`. A file descriptor can also be - * passed as the first argument. In this case, `fs.ftruncateSync()` is called. - * - * Passing a file descriptor is deprecated and may result in an error being thrown - * in the future. - * @since v0.8.6 - * @param [len=0] - */ - export function truncateSync(path: PathLike, len?: number): void; - /** - * Truncates the file descriptor. No arguments other than a possible exception are - * given to the completion callback. - * - * See the POSIX [`ftruncate(2)`](http://man7.org/linux/man-pages/man2/ftruncate.2.html) documentation for more detail. - * - * If the file referred to by the file descriptor was larger than `len` bytes, only - * the first `len` bytes will be retained in the file. - * - * For example, the following program retains only the first four bytes of the - * file: - * - * ```js - * import { open, close, ftruncate } from 'node:fs'; - * - * function closeFd(fd) { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * - * open('temp.txt', 'r+', (err, fd) => { - * if (err) throw err; - * - * try { - * ftruncate(fd, 4, (err) => { - * closeFd(fd); - * if (err) throw err; - * }); - * } catch (err) { - * closeFd(fd); - * if (err) throw err; - * } - * }); - * ``` - * - * If the file previously was shorter than `len` bytes, it is extended, and the - * extended part is filled with null bytes (`'\0'`): - * - * If `len` is negative then `0` will be used. - * @since v0.8.6 - * @param [len=0] - */ - export function ftruncate(fd: number, len: number | undefined, callback: NoParamCallback): void; - /** - * Asynchronous ftruncate(2) - Truncate a file to a specified length. - * @param fd A file descriptor. - */ - export function ftruncate(fd: number, callback: NoParamCallback): void; - export namespace ftruncate { - /** - * Asynchronous ftruncate(2) - Truncate a file to a specified length. - * @param fd A file descriptor. - * @param len If not specified, defaults to `0`. - */ - function __promisify__(fd: number, len?: number): Promise; - } - /** - * Truncates the file descriptor. Returns `undefined`. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link ftruncate}. - * @since v0.8.6 - * @param [len=0] - */ - export function ftruncateSync(fd: number, len?: number): void; - /** - * Asynchronously changes owner and group of a file. No arguments other than a - * possible exception are given to the completion callback. - * - * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail. - * @since v0.1.97 - */ - export function chown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void; - export namespace chown { - /** - * Asynchronous chown(2) - Change ownership of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(path: PathLike, uid: number, gid: number): Promise; - } - /** - * Synchronously changes owner and group of a file. Returns `undefined`. - * This is the synchronous version of {@link chown}. - * - * See the POSIX [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html) documentation for more detail. - * @since v0.1.97 - */ - export function chownSync(path: PathLike, uid: number, gid: number): void; - /** - * Sets the owner of the file. No arguments other than a possible exception are - * given to the completion callback. - * - * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail. - * @since v0.4.7 - */ - export function fchown(fd: number, uid: number, gid: number, callback: NoParamCallback): void; - export namespace fchown { - /** - * Asynchronous fchown(2) - Change ownership of a file. - * @param fd A file descriptor. - */ - function __promisify__(fd: number, uid: number, gid: number): Promise; - } - /** - * Sets the owner of the file. Returns `undefined`. - * - * See the POSIX [`fchown(2)`](http://man7.org/linux/man-pages/man2/fchown.2.html) documentation for more detail. - * @since v0.4.7 - * @param uid The file's new owner's user id. - * @param gid The file's new group's group id. - */ - export function fchownSync(fd: number, uid: number, gid: number): void; - /** - * Set the owner of the symbolic link. No arguments other than a possible - * exception are given to the completion callback. - * - * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more detail. - */ - export function lchown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void; - export namespace lchown { - /** - * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(path: PathLike, uid: number, gid: number): Promise; - } - /** - * Set the owner for the path. Returns `undefined`. - * - * See the POSIX [`lchown(2)`](http://man7.org/linux/man-pages/man2/lchown.2.html) documentation for more details. - * @param uid The file's new owner's user id. - * @param gid The file's new group's group id. - */ - export function lchownSync(path: PathLike, uid: number, gid: number): void; - /** - * Changes the access and modification times of a file in the same way as {@link utimes}, with the difference that if the path refers to a symbolic - * link, then the link is not dereferenced: instead, the timestamps of the - * symbolic link itself are changed. - * - * No arguments other than a possible exception are given to the completion - * callback. - * @since v14.5.0, v12.19.0 - */ - export function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; - export namespace lutimes { - /** - * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, - * with the difference that if the path refers to a symbolic link, then the link is not - * dereferenced: instead, the timestamps of the symbolic link itself are changed. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. - */ - function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; - } - /** - * Change the file system timestamps of the symbolic link referenced by `path`. - * Returns `undefined`, or throws an exception when parameters are incorrect or - * the operation fails. This is the synchronous version of {@link lutimes}. - * @since v14.5.0, v12.19.0 - */ - export function lutimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void; - /** - * Asynchronously changes the permissions of a file. No arguments other than a - * possible exception are given to the completion callback. - * - * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail. - * - * ```js - * import { chmod } from 'node:fs'; - * - * chmod('my_file.txt', 0o775, (err) => { - * if (err) throw err; - * console.log('The permissions for file "my_file.txt" have been changed!'); - * }); - * ``` - * @since v0.1.30 - */ - export function chmod(path: PathLike, mode: Mode, callback: NoParamCallback): void; - export namespace chmod { - /** - * Asynchronous chmod(2) - Change permissions of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - function __promisify__(path: PathLike, mode: Mode): Promise; - } - /** - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link chmod}. - * - * See the POSIX [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html) documentation for more detail. - * @since v0.6.7 - */ - export function chmodSync(path: PathLike, mode: Mode): void; - /** - * Sets the permissions on the file. No arguments other than a possible exception - * are given to the completion callback. - * - * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail. - * @since v0.4.7 - */ - export function fchmod(fd: number, mode: Mode, callback: NoParamCallback): void; - export namespace fchmod { - /** - * Asynchronous fchmod(2) - Change permissions of a file. - * @param fd A file descriptor. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - function __promisify__(fd: number, mode: Mode): Promise; - } - /** - * Sets the permissions on the file. Returns `undefined`. - * - * See the POSIX [`fchmod(2)`](http://man7.org/linux/man-pages/man2/fchmod.2.html) documentation for more detail. - * @since v0.4.7 - */ - export function fchmodSync(fd: number, mode: Mode): void; - /** - * Changes the permissions on a symbolic link. No arguments other than a possible - * exception are given to the completion callback. - * - * This method is only implemented on macOS. - * - * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail. - * @deprecated Since v0.4.7 - */ - export function lchmod(path: PathLike, mode: Mode, callback: NoParamCallback): void; - /** @deprecated */ - export namespace lchmod { - /** - * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. - */ - function __promisify__(path: PathLike, mode: Mode): Promise; - } - /** - * Changes the permissions on a symbolic link. Returns `undefined`. - * - * This method is only implemented on macOS. - * - * See the POSIX [`lchmod(2)`](https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2) documentation for more detail. - * @deprecated Since v0.4.7 - */ - export function lchmodSync(path: PathLike, mode: Mode): void; - /** - * Asynchronous [`stat(2)`](http://man7.org/linux/man-pages/man2/stat.2.html). The callback gets two arguments `(err, stats)` where`stats` is an `fs.Stats` object. - * - * In case of an error, the `err.code` will be one of `Common System Errors`. - * - * {@link stat} follows symbolic links. Use {@link lstat} to look at the - * links themselves. - * - * Using `fs.stat()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended. - * Instead, user code should open/read/write the file directly and handle the - * error raised if the file is not available. - * - * To check if a file exists without manipulating it afterwards, {@link access} is recommended. - * - * For example, given the following directory structure: - * - * ```text - * - txtDir - * -- file.txt - * - app.js - * ``` - * - * The next program will check for the stats of the given paths: - * - * ```js - * import { stat } from 'node:fs'; - * - * const pathsToCheck = ['./txtDir', './txtDir/file.txt']; - * - * for (let i = 0; i < pathsToCheck.length; i++) { - * stat(pathsToCheck[i], (err, stats) => { - * console.log(stats.isDirectory()); - * console.log(stats); - * }); - * } - * ``` - * - * The resulting output will resemble: - * - * ```console - * true - * Stats { - * dev: 16777220, - * mode: 16877, - * nlink: 3, - * uid: 501, - * gid: 20, - * rdev: 0, - * blksize: 4096, - * ino: 14214262, - * size: 96, - * blocks: 0, - * atimeMs: 1561174653071.963, - * mtimeMs: 1561174614583.3518, - * ctimeMs: 1561174626623.5366, - * birthtimeMs: 1561174126937.2893, - * atime: 2019-06-22T03:37:33.072Z, - * mtime: 2019-06-22T03:36:54.583Z, - * ctime: 2019-06-22T03:37:06.624Z, - * birthtime: 2019-06-22T03:28:46.937Z - * } - * false - * Stats { - * dev: 16777220, - * mode: 33188, - * nlink: 1, - * uid: 501, - * gid: 20, - * rdev: 0, - * blksize: 4096, - * ino: 14214074, - * size: 8, - * blocks: 8, - * atimeMs: 1561174616618.8555, - * mtimeMs: 1561174614584, - * ctimeMs: 1561174614583.8145, - * birthtimeMs: 1561174007710.7478, - * atime: 2019-06-22T03:36:56.619Z, - * mtime: 2019-06-22T03:36:54.584Z, - * ctime: 2019-06-22T03:36:54.584Z, - * birthtime: 2019-06-22T03:26:47.711Z - * } - * ``` - * @since v0.0.2 - */ - export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; - export function stat( - path: PathLike, - options: - | (StatOptions & { - bigint?: false | undefined; - }) - | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void, - ): void; - export function stat( - path: PathLike, - options: StatOptions & { - bigint: true; - }, - callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void, - ): void; - export function stat( - path: PathLike, - options: StatOptions | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void, - ): void; - export namespace stat { - /** - * Asynchronous stat(2) - Get file status. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__( - path: PathLike, - options?: StatOptions & { - bigint?: false | undefined; - }, - ): Promise; - function __promisify__( - path: PathLike, - options: StatOptions & { - bigint: true; - }, - ): Promise; - function __promisify__(path: PathLike, options?: StatOptions): Promise; - } - export interface StatSyncFn extends Function { - (path: PathLike, options?: undefined): Stats; - ( - path: PathLike, - options?: StatSyncOptions & { - bigint?: false | undefined; - throwIfNoEntry: false; - }, - ): Stats | undefined; - ( - path: PathLike, - options: StatSyncOptions & { - bigint: true; - throwIfNoEntry: false; - }, - ): BigIntStats | undefined; - ( - path: PathLike, - options?: StatSyncOptions & { - bigint?: false | undefined; - }, - ): Stats; - ( - path: PathLike, - options: StatSyncOptions & { - bigint: true; - }, - ): BigIntStats; - ( - path: PathLike, - options: StatSyncOptions & { - bigint: boolean; - throwIfNoEntry?: false | undefined; - }, - ): Stats | BigIntStats; - (path: PathLike, options?: StatSyncOptions): Stats | BigIntStats | undefined; - } - /** - * Synchronous stat(2) - Get file status. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - export const statSync: StatSyncFn; - /** - * Invokes the callback with the `fs.Stats` for the file descriptor. - * - * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail. - * @since v0.1.95 - */ - export function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; - export function fstat( - fd: number, - options: - | (StatOptions & { - bigint?: false | undefined; - }) - | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void, - ): void; - export function fstat( - fd: number, - options: StatOptions & { - bigint: true; - }, - callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void, - ): void; - export function fstat( - fd: number, - options: StatOptions | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void, - ): void; - export namespace fstat { - /** - * Asynchronous fstat(2) - Get file status. - * @param fd A file descriptor. - */ - function __promisify__( - fd: number, - options?: StatOptions & { - bigint?: false | undefined; - }, - ): Promise; - function __promisify__( - fd: number, - options: StatOptions & { - bigint: true; - }, - ): Promise; - function __promisify__(fd: number, options?: StatOptions): Promise; - } - /** - * Retrieves the `fs.Stats` for the file descriptor. - * - * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail. - * @since v0.1.95 - */ - export function fstatSync( - fd: number, - options?: StatOptions & { - bigint?: false | undefined; - }, - ): Stats; - export function fstatSync( - fd: number, - options: StatOptions & { - bigint: true; - }, - ): BigIntStats; - export function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats; - /** - * Retrieves the `fs.Stats` for the symbolic link referred to by the path. - * The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. `lstat()` is identical to `stat()`, except that if `path` is a symbolic - * link, then the link itself is stat-ed, not the file that it refers to. - * - * See the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) documentation for more details. - * @since v0.1.30 - */ - export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; - export function lstat( - path: PathLike, - options: - | (StatOptions & { - bigint?: false | undefined; - }) - | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void, - ): void; - export function lstat( - path: PathLike, - options: StatOptions & { - bigint: true; - }, - callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void, - ): void; - export function lstat( - path: PathLike, - options: StatOptions | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void, - ): void; - export namespace lstat { - /** - * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__( - path: PathLike, - options?: StatOptions & { - bigint?: false | undefined; - }, - ): Promise; - function __promisify__( - path: PathLike, - options: StatOptions & { - bigint: true; - }, - ): Promise; - function __promisify__(path: PathLike, options?: StatOptions): Promise; - } - /** - * Asynchronous [`statfs(2)`](http://man7.org/linux/man-pages/man2/statfs.2.html). Returns information about the mounted file system which - * contains `path`. The callback gets two arguments `(err, stats)` where `stats`is an `fs.StatFs` object. - * - * In case of an error, the `err.code` will be one of `Common System Errors`. - * @since v19.6.0, v18.15.0 - * @param path A path to an existing file or directory on the file system to be queried. - */ - export function statfs(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void): void; - export function statfs( - path: PathLike, - options: - | (StatFsOptions & { - bigint?: false | undefined; - }) - | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void, - ): void; - export function statfs( - path: PathLike, - options: StatFsOptions & { - bigint: true; - }, - callback: (err: NodeJS.ErrnoException | null, stats: BigIntStatsFs) => void, - ): void; - export function statfs( - path: PathLike, - options: StatFsOptions | undefined, - callback: (err: NodeJS.ErrnoException | null, stats: StatsFs | BigIntStatsFs) => void, - ): void; - export namespace statfs { - /** - * Asynchronous statfs(2) - Returns information about the mounted file system which contains path. The callback gets two arguments (err, stats) where stats is an object. - * @param path A path to an existing file or directory on the file system to be queried. - */ - function __promisify__( - path: PathLike, - options?: StatFsOptions & { - bigint?: false | undefined; - }, - ): Promise; - function __promisify__( - path: PathLike, - options: StatFsOptions & { - bigint: true; - }, - ): Promise; - function __promisify__(path: PathLike, options?: StatFsOptions): Promise; - } - /** - * Synchronous [`statfs(2)`](http://man7.org/linux/man-pages/man2/statfs.2.html). Returns information about the mounted file system which - * contains `path`. - * - * In case of an error, the `err.code` will be one of `Common System Errors`. - * @since v19.6.0, v18.15.0 - * @param path A path to an existing file or directory on the file system to be queried. - */ - export function statfsSync( - path: PathLike, - options?: StatFsOptions & { - bigint?: false | undefined; - }, - ): StatsFs; - export function statfsSync( - path: PathLike, - options: StatFsOptions & { - bigint: true; - }, - ): BigIntStatsFs; - export function statfsSync(path: PathLike, options?: StatFsOptions): StatsFs | BigIntStatsFs; - /** - * Synchronous lstat(2) - Get file status. Does not dereference symbolic links. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - export const lstatSync: StatSyncFn; - /** - * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. No arguments other than - * a possible - * exception are given to the completion callback. - * @since v0.1.31 - */ - export function link(existingPath: PathLike, newPath: PathLike, callback: NoParamCallback): void; - export namespace link { - /** - * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. - * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(existingPath: PathLike, newPath: PathLike): Promise; - } - /** - * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. Returns `undefined`. - * @since v0.1.31 - */ - export function linkSync(existingPath: PathLike, newPath: PathLike): void; - /** - * Creates the link called `path` pointing to `target`. No arguments other than a - * possible exception are given to the completion callback. - * - * See the POSIX [`symlink(2)`](http://man7.org/linux/man-pages/man2/symlink.2.html) documentation for more details. - * - * The `type` argument is only available on Windows and ignored on other platforms. - * It can be set to `'dir'`, `'file'`, or `'junction'`. If the `type` argument is - * not a string, Node.js will autodetect `target` type and use `'file'` or `'dir'`. - * If the `target` does not exist, `'file'` will be used. Windows junction points - * require the destination path to be absolute. When using `'junction'`, the`target` argument will automatically be normalized to absolute path. Junction - * points on NTFS volumes can only point to directories. - * - * Relative targets are relative to the link's parent directory. - * - * ```js - * import { symlink } from 'node:fs'; - * - * symlink('./mew', './mewtwo', callback); - * ``` - * - * The above example creates a symbolic link `mewtwo` which points to `mew` in the - * same directory: - * - * ```bash - * $ tree . - * . - * ├── mew - * └── mewtwo -> ./mew - * ``` - * @since v0.1.31 - * @param [type='null'] - */ - export function symlink( - target: PathLike, - path: PathLike, - type: symlink.Type | undefined | null, - callback: NoParamCallback, - ): void; - /** - * Asynchronous symlink(2) - Create a new symbolic link to an existing file. - * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. - * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. - */ - export function symlink(target: PathLike, path: PathLike, callback: NoParamCallback): void; - export namespace symlink { - /** - * Asynchronous symlink(2) - Create a new symbolic link to an existing file. - * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol. - * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol. - * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms). - * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path. - */ - function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise; - type Type = "dir" | "file" | "junction"; - } - /** - * Returns `undefined`. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link symlink}. - * @since v0.1.31 - * @param [type='null'] - */ - export function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void; - /** - * Reads the contents of the symbolic link referred to by `path`. The callback gets - * two arguments `(err, linkString)`. - * - * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the link path passed to the callback. If the `encoding` is set to `'buffer'`, - * the link path returned will be passed as a `Buffer` object. - * @since v0.1.31 - */ - export function readlink( - path: PathLike, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, linkString: string) => void, - ): void; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function readlink( - path: PathLike, - options: BufferEncodingOption, - callback: (err: NodeJS.ErrnoException | null, linkString: NonSharedBuffer) => void, - ): void; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function readlink( - path: PathLike, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, linkString: string | NonSharedBuffer) => void, - ): void; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - export function readlink( - path: PathLike, - callback: (err: NodeJS.ErrnoException | null, linkString: string) => void, - ): void; - export namespace readlink { - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options?: EncodingOption): Promise; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options: BufferEncodingOption): Promise; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options?: EncodingOption): Promise; - } - /** - * Returns the symbolic link's string value. - * - * See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more details. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the link path returned. If the `encoding` is set to `'buffer'`, - * the link path returned will be passed as a `Buffer` object. - * @since v0.1.31 - */ - export function readlinkSync(path: PathLike, options?: EncodingOption): string; - /** - * Synchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function readlinkSync(path: PathLike, options: BufferEncodingOption): NonSharedBuffer; - /** - * Synchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function readlinkSync(path: PathLike, options?: EncodingOption): string | NonSharedBuffer; - /** - * Asynchronously computes the canonical pathname by resolving `.`, `..`, and - * symbolic links. - * - * A canonical pathname is not necessarily unique. Hard links and bind mounts can - * expose a file system entity through many pathnames. - * - * This function behaves like [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html), with some exceptions: - * - * 1. No case conversion is performed on case-insensitive file systems. - * 2. The maximum number of symbolic links is platform-independent and generally - * (much) higher than what the native [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html) implementation supports. - * - * The `callback` gets two arguments `(err, resolvedPath)`. May use `process.cwd` to resolve relative paths. - * - * Only paths that can be converted to UTF8 strings are supported. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the path passed to the callback. If the `encoding` is set to `'buffer'`, - * the path returned will be passed as a `Buffer` object. - * - * If `path` resolves to a socket or a pipe, the function will return a system - * dependent name for that object. - * @since v0.1.31 - */ - export function realpath( - path: PathLike, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, - ): void; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function realpath( - path: PathLike, - options: BufferEncodingOption, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: NonSharedBuffer) => void, - ): void; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function realpath( - path: PathLike, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | NonSharedBuffer) => void, - ): void; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - export function realpath( - path: PathLike, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, - ): void; - export namespace realpath { - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options?: EncodingOption): Promise; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options: BufferEncodingOption): Promise; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(path: PathLike, options?: EncodingOption): Promise; - /** - * Asynchronous [`realpath(3)`](http://man7.org/linux/man-pages/man3/realpath.3.html). - * - * The `callback` gets two arguments `(err, resolvedPath)`. - * - * Only paths that can be converted to UTF8 strings are supported. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the path passed to the callback. If the `encoding` is set to `'buffer'`, - * the path returned will be passed as a `Buffer` object. - * - * On Linux, when Node.js is linked against musl libc, the procfs file system must - * be mounted on `/proc` in order for this function to work. Glibc does not have - * this restriction. - * @since v9.2.0 - */ - function native( - path: PathLike, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, - ): void; - function native( - path: PathLike, - options: BufferEncodingOption, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: NonSharedBuffer) => void, - ): void; - function native( - path: PathLike, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | NonSharedBuffer) => void, - ): void; - function native( - path: PathLike, - callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void, - ): void; - } - /** - * Returns the resolved pathname. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link realpath}. - * @since v0.1.31 - */ - export function realpathSync(path: PathLike, options?: EncodingOption): string; - /** - * Synchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function realpathSync(path: PathLike, options: BufferEncodingOption): NonSharedBuffer; - /** - * Synchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function realpathSync(path: PathLike, options?: EncodingOption): string | NonSharedBuffer; - export namespace realpathSync { - function native(path: PathLike, options?: EncodingOption): string; - function native(path: PathLike, options: BufferEncodingOption): NonSharedBuffer; - function native(path: PathLike, options?: EncodingOption): string | NonSharedBuffer; - } - /** - * Asynchronously removes a file or symbolic link. No arguments other than a - * possible exception are given to the completion callback. - * - * ```js - * import { unlink } from 'node:fs'; - * // Assuming that 'path/file.txt' is a regular file. - * unlink('path/file.txt', (err) => { - * if (err) throw err; - * console.log('path/file.txt was deleted'); - * }); - * ``` - * - * `fs.unlink()` will not work on a directory, empty or otherwise. To remove a - * directory, use {@link rmdir}. - * - * See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more details. - * @since v0.0.2 - */ - export function unlink(path: PathLike, callback: NoParamCallback): void; - export namespace unlink { - /** - * Asynchronous unlink(2) - delete a name and possibly the file it refers to. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(path: PathLike): Promise; - } - /** - * Synchronous [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html). Returns `undefined`. - * @since v0.1.21 - */ - export function unlinkSync(path: PathLike): void; - export interface RmDirOptions { - /** - * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or - * `EPERM` error is encountered, Node.js will retry the operation with a linear - * backoff wait of `retryDelay` ms longer on each try. This option represents the - * number of retries. This option is ignored if the `recursive` option is not - * `true`. - * @default 0 - */ - maxRetries?: number | undefined; - /** - * @deprecated since v14.14.0 In future versions of Node.js and will trigger a warning - * `fs.rmdir(path, { recursive: true })` will throw if `path` does not exist or is a file. - * Use `fs.rm(path, { recursive: true, force: true })` instead. - * - * If `true`, perform a recursive directory removal. In - * recursive mode, operations are retried on failure. - * @default false - */ - recursive?: boolean | undefined; - /** - * The amount of time in milliseconds to wait between retries. - * This option is ignored if the `recursive` option is not `true`. - * @default 100 - */ - retryDelay?: number | undefined; - } - /** - * Asynchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). No arguments other than a possible exception are given - * to the completion callback. - * - * Using `fs.rmdir()` on a file (not a directory) results in an `ENOENT` error on - * Windows and an `ENOTDIR` error on POSIX. - * - * To get a behavior similar to the `rm -rf` Unix command, use {@link rm} with options `{ recursive: true, force: true }`. - * @since v0.0.2 - */ - export function rmdir(path: PathLike, callback: NoParamCallback): void; - export function rmdir(path: PathLike, options: RmDirOptions, callback: NoParamCallback): void; - export namespace rmdir { - /** - * Asynchronous rmdir(2) - delete a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - function __promisify__(path: PathLike, options?: RmDirOptions): Promise; - } - /** - * Synchronous [`rmdir(2)`](http://man7.org/linux/man-pages/man2/rmdir.2.html). Returns `undefined`. - * - * Using `fs.rmdirSync()` on a file (not a directory) results in an `ENOENT` error - * on Windows and an `ENOTDIR` error on POSIX. - * - * To get a behavior similar to the `rm -rf` Unix command, use {@link rmSync} with options `{ recursive: true, force: true }`. - * @since v0.1.21 - */ - export function rmdirSync(path: PathLike, options?: RmDirOptions): void; - export interface RmOptions { - /** - * When `true`, exceptions will be ignored if `path` does not exist. - * @default false - */ - force?: boolean | undefined; - /** - * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or - * `EPERM` error is encountered, Node.js will retry the operation with a linear - * backoff wait of `retryDelay` ms longer on each try. This option represents the - * number of retries. This option is ignored if the `recursive` option is not - * `true`. - * @default 0 - */ - maxRetries?: number | undefined; - /** - * If `true`, perform a recursive directory removal. In - * recursive mode, operations are retried on failure. - * @default false - */ - recursive?: boolean | undefined; - /** - * The amount of time in milliseconds to wait between retries. - * This option is ignored if the `recursive` option is not `true`. - * @default 100 - */ - retryDelay?: number | undefined; - } - /** - * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility). No arguments other than a possible exception are given to the - * completion callback. - * @since v14.14.0 - */ - export function rm(path: PathLike, callback: NoParamCallback): void; - export function rm(path: PathLike, options: RmOptions, callback: NoParamCallback): void; - export namespace rm { - /** - * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility). - */ - function __promisify__(path: PathLike, options?: RmOptions): Promise; - } - /** - * Synchronously removes files and directories (modeled on the standard POSIX `rm` utility). Returns `undefined`. - * @since v14.14.0 - */ - export function rmSync(path: PathLike, options?: RmOptions): void; - export interface MakeDirectoryOptions { - /** - * Indicates whether parent folders should be created. - * If a folder was created, the path to the first created folder will be returned. - * @default false - */ - recursive?: boolean | undefined; - /** - * A file mode. If a string is passed, it is parsed as an octal integer. If not specified - * @default 0o777 - */ - mode?: Mode | undefined; - } - /** - * Asynchronously creates a directory. - * - * The callback is given a possible exception and, if `recursive` is `true`, the - * first directory path created, `(err[, path])`.`path` can still be `undefined` when `recursive` is `true`, if no directory was - * created (for instance, if it was previously created). - * - * The optional `options` argument can be an integer specifying `mode` (permission - * and sticky bits), or an object with a `mode` property and a `recursive` property indicating whether parent directories should be created. Calling `fs.mkdir()` when `path` is a directory that - * exists results in an error only - * when `recursive` is false. If `recursive` is false and the directory exists, - * an `EEXIST` error occurs. - * - * ```js - * import { mkdir } from 'node:fs'; - * - * // Create ./tmp/a/apple, regardless of whether ./tmp and ./tmp/a exist. - * mkdir('./tmp/a/apple', { recursive: true }, (err) => { - * if (err) throw err; - * }); - * ``` - * - * On Windows, using `fs.mkdir()` on the root directory even with recursion will - * result in an error: - * - * ```js - * import { mkdir } from 'node:fs'; - * - * mkdir('/', { recursive: true }, (err) => { - * // => [Error: EPERM: operation not permitted, mkdir 'C:\'] - * }); - * ``` - * - * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details. - * @since v0.1.8 - */ - export function mkdir( - path: PathLike, - options: MakeDirectoryOptions & { - recursive: true; - }, - callback: (err: NodeJS.ErrnoException | null, path?: string) => void, - ): void; - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - export function mkdir( - path: PathLike, - options: - | Mode - | (MakeDirectoryOptions & { - recursive?: false | undefined; - }) - | null - | undefined, - callback: NoParamCallback, - ): void; - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - export function mkdir( - path: PathLike, - options: Mode | MakeDirectoryOptions | null | undefined, - callback: (err: NodeJS.ErrnoException | null, path?: string) => void, - ): void; - /** - * Asynchronous mkdir(2) - create a directory with a mode of `0o777`. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - export function mkdir(path: PathLike, callback: NoParamCallback): void; - export namespace mkdir { - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function __promisify__( - path: PathLike, - options: MakeDirectoryOptions & { - recursive: true; - }, - ): Promise; - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function __promisify__( - path: PathLike, - options?: - | Mode - | (MakeDirectoryOptions & { - recursive?: false | undefined; - }) - | null, - ): Promise; - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function __promisify__( - path: PathLike, - options?: Mode | MakeDirectoryOptions | null, - ): Promise; - } - /** - * Synchronously creates a directory. Returns `undefined`, or if `recursive` is `true`, the first directory path created. - * This is the synchronous version of {@link mkdir}. - * - * See the POSIX [`mkdir(2)`](http://man7.org/linux/man-pages/man2/mkdir.2.html) documentation for more details. - * @since v0.1.21 - */ - export function mkdirSync( - path: PathLike, - options: MakeDirectoryOptions & { - recursive: true; - }, - ): string | undefined; - /** - * Synchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - export function mkdirSync( - path: PathLike, - options?: - | Mode - | (MakeDirectoryOptions & { - recursive?: false | undefined; - }) - | null, - ): void; - /** - * Synchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - export function mkdirSync(path: PathLike, options?: Mode | MakeDirectoryOptions | null): string | undefined; - /** - * Creates a unique temporary directory. - * - * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. Due to platform - * inconsistencies, avoid trailing `X` characters in `prefix`. Some platforms, - * notably the BSDs, can return more than six random characters, and replace - * trailing `X` characters in `prefix` with random characters. - * - * The created directory path is passed as a string to the callback's second - * parameter. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use. - * - * ```js - * import { mkdtemp } from 'node:fs'; - * import { join } from 'node:path'; - * import { tmpdir } from 'node:os'; - * - * mkdtemp(join(tmpdir(), 'foo-'), (err, directory) => { - * if (err) throw err; - * console.log(directory); - * // Prints: /tmp/foo-itXde2 or C:\Users\...\AppData\Local\Temp\foo-itXde2 - * }); - * ``` - * - * The `fs.mkdtemp()` method will append the six randomly selected characters - * directly to the `prefix` string. For instance, given a directory `/tmp`, if the - * intention is to create a temporary directory _within_`/tmp`, the `prefix`must end with a trailing platform-specific path separator - * (`import { sep } from 'node:node:path'`). - * - * ```js - * import { tmpdir } from 'node:os'; - * import { mkdtemp } from 'node:fs'; - * - * // The parent directory for the new temporary directory - * const tmpDir = tmpdir(); - * - * // This method is *INCORRECT*: - * mkdtemp(tmpDir, (err, directory) => { - * if (err) throw err; - * console.log(directory); - * // Will print something similar to `/tmpabc123`. - * // A new temporary directory is created at the file system root - * // rather than *within* the /tmp directory. - * }); - * - * // This method is *CORRECT*: - * import { sep } from 'node:path'; - * mkdtemp(`${tmpDir}${sep}`, (err, directory) => { - * if (err) throw err; - * console.log(directory); - * // Will print something similar to `/tmp/abc123`. - * // A new temporary directory is created within - * // the /tmp directory. - * }); - * ``` - * @since v5.10.0 - */ - export function mkdtemp( - prefix: string, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, folder: string) => void, - ): void; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function mkdtemp( - prefix: string, - options: BufferEncodingOption, - callback: (err: NodeJS.ErrnoException | null, folder: NonSharedBuffer) => void, - ): void; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function mkdtemp( - prefix: string, - options: EncodingOption, - callback: (err: NodeJS.ErrnoException | null, folder: string | NonSharedBuffer) => void, - ): void; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - */ - export function mkdtemp( - prefix: string, - callback: (err: NodeJS.ErrnoException | null, folder: string) => void, - ): void; - export namespace mkdtemp { - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(prefix: string, options?: EncodingOption): Promise; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(prefix: string, options: BufferEncodingOption): Promise; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__(prefix: string, options?: EncodingOption): Promise; - } - /** - * Returns the created directory path. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link mkdtemp}. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use. - * @since v5.10.0 - */ - export function mkdtempSync(prefix: string, options?: EncodingOption): string; - /** - * Synchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function mkdtempSync(prefix: string, options: BufferEncodingOption): NonSharedBuffer; - /** - * Synchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required prefix to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function mkdtempSync(prefix: string, options?: EncodingOption): string | NonSharedBuffer; - /** - * Reads the contents of a directory. The callback gets two arguments `(err, files)` where `files` is an array of the names of the files in the directory excluding `'.'` and `'..'`. - * - * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the filenames passed to the callback. If the `encoding` is set to `'buffer'`, - * the filenames returned will be passed as `Buffer` objects. - * - * If `options.withFileTypes` is set to `true`, the `files` array will contain `fs.Dirent` objects. - * @since v0.1.8 - */ - export function readdir( - path: PathLike, - options: - | { - encoding: BufferEncoding | null; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - } - | BufferEncoding - | undefined - | null, - callback: (err: NodeJS.ErrnoException | null, files: string[]) => void, - ): void; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function readdir( - path: PathLike, - options: - | { - encoding: "buffer"; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - } - | "buffer", - callback: (err: NodeJS.ErrnoException | null, files: NonSharedBuffer[]) => void, - ): void; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function readdir( - path: PathLike, - options: - | (ObjectEncodingOptions & { - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - }) - | BufferEncoding - | undefined - | null, - callback: (err: NodeJS.ErrnoException | null, files: string[] | NonSharedBuffer[]) => void, - ): void; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - export function readdir( - path: PathLike, - callback: (err: NodeJS.ErrnoException | null, files: string[]) => void, - ): void; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. - */ - export function readdir( - path: PathLike, - options: ObjectEncodingOptions & { - withFileTypes: true; - recursive?: boolean | undefined; - }, - callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void, - ): void; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`. - */ - export function readdir( - path: PathLike, - options: { - encoding: "buffer"; - withFileTypes: true; - recursive?: boolean | undefined; - }, - callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void, - ): void; - export namespace readdir { - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__( - path: PathLike, - options?: - | { - encoding: BufferEncoding | null; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - } - | BufferEncoding - | null, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__( - path: PathLike, - options: - | "buffer" - | { - encoding: "buffer"; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - }, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function __promisify__( - path: PathLike, - options?: - | (ObjectEncodingOptions & { - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - }) - | BufferEncoding - | null, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options If called with `withFileTypes: true` the result data will be an array of Dirent - */ - function __promisify__( - path: PathLike, - options: ObjectEncodingOptions & { - withFileTypes: true; - recursive?: boolean | undefined; - }, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`. - */ - function __promisify__( - path: PathLike, - options: { - encoding: "buffer"; - withFileTypes: true; - recursive?: boolean | undefined; - }, - ): Promise[]>; - } - /** - * Reads the contents of the directory. - * - * See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more details. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the filenames returned. If the `encoding` is set to `'buffer'`, - * the filenames returned will be passed as `Buffer` objects. - * - * If `options.withFileTypes` is set to `true`, the result will contain `fs.Dirent` objects. - * @since v0.1.21 - */ - export function readdirSync( - path: PathLike, - options?: - | { - encoding: BufferEncoding | null; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - } - | BufferEncoding - | null, - ): string[]; - /** - * Synchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function readdirSync( - path: PathLike, - options: - | { - encoding: "buffer"; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - } - | "buffer", - ): NonSharedBuffer[]; - /** - * Synchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - export function readdirSync( - path: PathLike, - options?: - | (ObjectEncodingOptions & { - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - }) - | BufferEncoding - | null, - ): string[] | NonSharedBuffer[]; - /** - * Synchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. - */ - export function readdirSync( - path: PathLike, - options: ObjectEncodingOptions & { - withFileTypes: true; - recursive?: boolean | undefined; - }, - ): Dirent[]; - /** - * Synchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`. - */ - export function readdirSync( - path: PathLike, - options: { - encoding: "buffer"; - withFileTypes: true; - recursive?: boolean | undefined; - }, - ): Dirent[]; - /** - * Closes the file descriptor. No arguments other than a possible exception are - * given to the completion callback. - * - * Calling `fs.close()` on any file descriptor (`fd`) that is currently in use - * through any other `fs` operation may lead to undefined behavior. - * - * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail. - * @since v0.0.2 - */ - export function close(fd: number, callback?: NoParamCallback): void; - export namespace close { - /** - * Asynchronous close(2) - close a file descriptor. - * @param fd A file descriptor. - */ - function __promisify__(fd: number): Promise; - } - /** - * Closes the file descriptor. Returns `undefined`. - * - * Calling `fs.closeSync()` on any file descriptor (`fd`) that is currently in use - * through any other `fs` operation may lead to undefined behavior. - * - * See the POSIX [`close(2)`](http://man7.org/linux/man-pages/man2/close.2.html) documentation for more detail. - * @since v0.1.21 - */ - export function closeSync(fd: number): void; - /** - * Asynchronous file open. See the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more details. - * - * `mode` sets the file mode (permission and sticky bits), but only if the file was - * created. On Windows, only the write permission can be manipulated; see {@link chmod}. - * - * The callback gets two arguments `(err, fd)`. - * - * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented - * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains - * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams). - * - * Functions based on `fs.open()` exhibit this behavior as well:`fs.writeFile()`, `fs.readFile()`, etc. - * @since v0.0.2 - * @param [flags='r'] See `support of file system `flags``. - * @param [mode=0o666] - */ - export function open( - path: PathLike, - flags: OpenMode | undefined, - mode: Mode | undefined | null, - callback: (err: NodeJS.ErrnoException | null, fd: number) => void, - ): void; - /** - * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param [flags='r'] See `support of file system `flags``. - */ - export function open( - path: PathLike, - flags: OpenMode | undefined, - callback: (err: NodeJS.ErrnoException | null, fd: number) => void, - ): void; - /** - * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - */ - export function open(path: PathLike, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; - export namespace open { - /** - * Asynchronous open(2) - open and possibly create a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`. - */ - function __promisify__(path: PathLike, flags: OpenMode, mode?: Mode | null): Promise; - } - /** - * Returns an integer representing the file descriptor. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link open}. - * @since v0.1.21 - * @param [flags='r'] - * @param [mode=0o666] - */ - export function openSync(path: PathLike, flags: OpenMode, mode?: Mode | null): number; - /** - * Change the file system timestamps of the object referenced by `path`. - * - * The `atime` and `mtime` arguments follow these rules: - * - * * Values can be either numbers representing Unix epoch time in seconds, `Date`s, or a numeric string like `'123456789.0'`. - * * If the value can not be converted to a number, or is `NaN`, `Infinity`, or `-Infinity`, an `Error` will be thrown. - * @since v0.4.2 - */ - export function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; - export namespace utimes { - /** - * Asynchronously change file timestamps of the file referenced by the supplied path. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. - */ - function __promisify__(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; - } - /** - * Returns `undefined`. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link utimes}. - * @since v0.4.2 - */ - export function utimesSync(path: PathLike, atime: TimeLike, mtime: TimeLike): void; - /** - * Change the file system timestamps of the object referenced by the supplied file - * descriptor. See {@link utimes}. - * @since v0.4.2 - */ - export function futimes(fd: number, atime: TimeLike, mtime: TimeLike, callback: NoParamCallback): void; - export namespace futimes { - /** - * Asynchronously change file timestamps of the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param atime The last access time. If a string is provided, it will be coerced to number. - * @param mtime The last modified time. If a string is provided, it will be coerced to number. - */ - function __promisify__(fd: number, atime: TimeLike, mtime: TimeLike): Promise; - } - /** - * Synchronous version of {@link futimes}. Returns `undefined`. - * @since v0.4.2 - */ - export function futimesSync(fd: number, atime: TimeLike, mtime: TimeLike): void; - /** - * Request that all data for the open file descriptor is flushed to the storage - * device. The specific implementation is operating system and device specific. - * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. No arguments other - * than a possible exception are given to the completion callback. - * @since v0.1.96 - */ - export function fsync(fd: number, callback: NoParamCallback): void; - export namespace fsync { - /** - * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device. - * @param fd A file descriptor. - */ - function __promisify__(fd: number): Promise; - } - /** - * Request that all data for the open file descriptor is flushed to the storage - * device. The specific implementation is operating system and device specific. - * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. Returns `undefined`. - * @since v0.1.96 - */ - export function fsyncSync(fd: number): void; - export interface WriteOptions { - /** - * @default 0 - */ - offset?: number | undefined; - /** - * @default `buffer.byteLength - offset` - */ - length?: number | undefined; - /** - * @default null - */ - position?: number | null | undefined; - } - /** - * Write `buffer` to the file specified by `fd`. - * - * `offset` determines the part of the buffer to be written, and `length` is - * an integer specifying the number of bytes to write. - * - * `position` refers to the offset from the beginning of the file where this data - * should be written. If `typeof position !== 'number'`, the data will be written - * at the current position. See [`pwrite(2)`](http://man7.org/linux/man-pages/man2/pwrite.2.html). - * - * The callback will be given three arguments `(err, bytesWritten, buffer)` where `bytesWritten` specifies how many _bytes_ were written from `buffer`. - * - * If this method is invoked as its `util.promisify()` ed version, it returns - * a promise for an `Object` with `bytesWritten` and `buffer` properties. - * - * It is unsafe to use `fs.write()` multiple times on the same file without waiting - * for the callback. For this scenario, {@link createWriteStream} is - * recommended. - * - * On Linux, positional writes don't work when the file is opened in append mode. - * The kernel ignores the position argument and always appends the data to - * the end of the file. - * @since v0.0.2 - * @param [offset=0] - * @param [length=buffer.byteLength - offset] - * @param [position='null'] - */ - export function write( - fd: number, - buffer: TBuffer, - offset: number | undefined | null, - length: number | undefined | null, - position: number | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, - ): void; - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. - * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. - */ - export function write( - fd: number, - buffer: TBuffer, - offset: number | undefined | null, - length: number | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, - ): void; - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. - */ - export function write( - fd: number, - buffer: TBuffer, - offset: number | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, - ): void; - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - */ - export function write( - fd: number, - buffer: TBuffer, - callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, - ): void; - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param options An object with the following properties: - * * `offset` The part of the buffer to be written. If not supplied, defaults to `0`. - * * `length` The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. - * * `position` The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - */ - export function write( - fd: number, - buffer: TBuffer, - options: WriteOptions, - callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void, - ): void; - /** - * Asynchronously writes `string` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param string A string to write. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - * @param encoding The expected string encoding. - */ - export function write( - fd: number, - string: string, - position: number | undefined | null, - encoding: BufferEncoding | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, - ): void; - /** - * Asynchronously writes `string` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param string A string to write. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - */ - export function write( - fd: number, - string: string, - position: number | undefined | null, - callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, - ): void; - /** - * Asynchronously writes `string` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param string A string to write. - */ - export function write( - fd: number, - string: string, - callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void, - ): void; - export namespace write { - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param offset The part of the buffer to be written. If not supplied, defaults to `0`. - * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - */ - function __promisify__( - fd: number, - buffer?: TBuffer, - offset?: number, - length?: number, - position?: number | null, - ): Promise<{ - bytesWritten: number; - buffer: TBuffer; - }>; - /** - * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param options An object with the following properties: - * * `offset` The part of the buffer to be written. If not supplied, defaults to `0`. - * * `length` The number of bytes to write. If not supplied, defaults to `buffer.length - offset`. - * * `position` The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - */ - function __promisify__( - fd: number, - buffer?: TBuffer, - options?: WriteOptions, - ): Promise<{ - bytesWritten: number; - buffer: TBuffer; - }>; - /** - * Asynchronously writes `string` to the file referenced by the supplied file descriptor. - * @param fd A file descriptor. - * @param string A string to write. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - * @param encoding The expected string encoding. - */ - function __promisify__( - fd: number, - string: string, - position?: number | null, - encoding?: BufferEncoding | null, - ): Promise<{ - bytesWritten: number; - buffer: string; - }>; - } - /** - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link write}. - * @since v0.1.21 - * @param [offset=0] - * @param [length=buffer.byteLength - offset] - * @param [position='null'] - * @return The number of bytes written. - */ - export function writeSync( - fd: number, - buffer: NodeJS.ArrayBufferView, - offset?: number | null, - length?: number | null, - position?: number | null, - ): number; - /** - * Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written. - * @param fd A file descriptor. - * @param string A string to write. - * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position. - * @param encoding The expected string encoding. - */ - export function writeSync( - fd: number, - string: string, - position?: number | null, - encoding?: BufferEncoding | null, - ): number; - export type ReadPosition = number | bigint; - export interface ReadOptions { - /** - * @default 0 - */ - offset?: number | undefined; - /** - * @default `length of buffer` - */ - length?: number | undefined; - /** - * @default null - */ - position?: ReadPosition | null | undefined; - } - export interface ReadOptionsWithBuffer extends ReadOptions { - buffer?: T | undefined; - } - /** @deprecated Use `ReadOptions` instead. */ - // TODO: remove in future major - export interface ReadSyncOptions extends ReadOptions {} - /** @deprecated Use `ReadOptionsWithBuffer` instead. */ - // TODO: remove in future major - export interface ReadAsyncOptions extends ReadOptionsWithBuffer {} - /** - * Read data from the file specified by `fd`. - * - * The callback is given the three arguments, `(err, bytesRead, buffer)`. - * - * If the file is not modified concurrently, the end-of-file is reached when the - * number of bytes read is zero. - * - * If this method is invoked as its `util.promisify()` ed version, it returns - * a promise for an `Object` with `bytesRead` and `buffer` properties. - * @since v0.0.2 - * @param buffer The buffer that the data will be written to. - * @param offset The position in `buffer` to write the data to. - * @param length The number of bytes to read. - * @param position Specifies where to begin reading from in the file. If `position` is `null` or `-1 `, data will be read from the current file position, and the file position will be updated. If - * `position` is an integer, the file position will be unchanged. - */ - export function read( - fd: number, - buffer: TBuffer, - offset: number, - length: number, - position: ReadPosition | null, - callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, - ): void; - /** - * Similar to the above `fs.read` function, this version takes an optional `options` object. - * If not otherwise specified in an `options` object, - * `buffer` defaults to `Buffer.alloc(16384)`, - * `offset` defaults to `0`, - * `length` defaults to `buffer.byteLength`, `- offset` as of Node 17.6.0 - * `position` defaults to `null` - * @since v12.17.0, 13.11.0 - */ - export function read( - fd: number, - options: ReadOptionsWithBuffer, - callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, - ): void; - export function read( - fd: number, - buffer: TBuffer, - options: ReadOptions, - callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, - ): void; - export function read( - fd: number, - buffer: TBuffer, - callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void, - ): void; - export function read( - fd: number, - callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: NonSharedBuffer) => void, - ): void; - export namespace read { - /** - * @param fd A file descriptor. - * @param buffer The buffer that the data will be written to. - * @param offset The offset in the buffer at which to start writing. - * @param length The number of bytes to read. - * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position. - */ - function __promisify__( - fd: number, - buffer: TBuffer, - offset: number, - length: number, - position: number | null, - ): Promise<{ - bytesRead: number; - buffer: TBuffer; - }>; - function __promisify__( - fd: number, - options: ReadOptionsWithBuffer, - ): Promise<{ - bytesRead: number; - buffer: TBuffer; - }>; - function __promisify__(fd: number): Promise<{ - bytesRead: number; - buffer: NonSharedBuffer; - }>; - } - /** - * Returns the number of `bytesRead`. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link read}. - * @since v0.1.21 - * @param [position='null'] - */ - export function readSync( - fd: number, - buffer: NodeJS.ArrayBufferView, - offset: number, - length: number, - position: ReadPosition | null, - ): number; - /** - * Similar to the above `fs.readSync` function, this version takes an optional `options` object. - * If no `options` object is specified, it will default with the above values. - */ - export function readSync(fd: number, buffer: NodeJS.ArrayBufferView, opts?: ReadOptions): number; - /** - * Asynchronously reads the entire contents of a file. - * - * ```js - * import { readFile } from 'node:fs'; - * - * readFile('/etc/passwd', (err, data) => { - * if (err) throw err; - * console.log(data); - * }); - * ``` - * - * The callback is passed two arguments `(err, data)`, where `data` is the - * contents of the file. - * - * If no encoding is specified, then the raw buffer is returned. - * - * If `options` is a string, then it specifies the encoding: - * - * ```js - * import { readFile } from 'node:fs'; - * - * readFile('/etc/passwd', 'utf8', callback); - * ``` - * - * When the path is a directory, the behavior of `fs.readFile()` and {@link readFileSync} is platform-specific. On macOS, Linux, and Windows, an - * error will be returned. On FreeBSD, a representation of the directory's contents - * will be returned. - * - * ```js - * import { readFile } from 'node:fs'; - * - * // macOS, Linux, and Windows - * readFile('', (err, data) => { - * // => [Error: EISDIR: illegal operation on a directory, read ] - * }); - * - * // FreeBSD - * readFile('', (err, data) => { - * // => null, - * }); - * ``` - * - * It is possible to abort an ongoing request using an `AbortSignal`. If a - * request is aborted the callback is called with an `AbortError`: - * - * ```js - * import { readFile } from 'node:fs'; - * - * const controller = new AbortController(); - * const signal = controller.signal; - * readFile(fileInfo[0].name, { signal }, (err, buf) => { - * // ... - * }); - * // When you want to abort the request - * controller.abort(); - * ``` - * - * The `fs.readFile()` function buffers the entire file. To minimize memory costs, - * when possible prefer streaming via `fs.createReadStream()`. - * - * Aborting an ongoing request does not abort individual operating - * system requests but rather the internal buffering `fs.readFile` performs. - * @since v0.1.29 - * @param path filename or file descriptor - */ - export function readFile( - path: PathOrFileDescriptor, - options: - | ({ - encoding?: null | undefined; - flag?: string | undefined; - } & Abortable) - | undefined - | null, - callback: (err: NodeJS.ErrnoException | null, data: NonSharedBuffer) => void, - ): void; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - export function readFile( - path: PathOrFileDescriptor, - options: - | ({ - encoding: BufferEncoding; - flag?: string | undefined; - } & Abortable) - | BufferEncoding, - callback: (err: NodeJS.ErrnoException | null, data: string) => void, - ): void; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - export function readFile( - path: PathOrFileDescriptor, - options: - | (ObjectEncodingOptions & { - flag?: string | undefined; - } & Abortable) - | BufferEncoding - | undefined - | null, - callback: (err: NodeJS.ErrnoException | null, data: string | NonSharedBuffer) => void, - ): void; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - */ - export function readFile( - path: PathOrFileDescriptor, - callback: (err: NodeJS.ErrnoException | null, data: NonSharedBuffer) => void, - ): void; - export namespace readFile { - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options An object that may contain an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function __promisify__( - path: PathOrFileDescriptor, - options?: { - encoding?: null | undefined; - flag?: string | undefined; - } | null, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function __promisify__( - path: PathOrFileDescriptor, - options: - | { - encoding: BufferEncoding; - flag?: string | undefined; - } - | BufferEncoding, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function __promisify__( - path: PathOrFileDescriptor, - options?: - | (ObjectEncodingOptions & { - flag?: string | undefined; - }) - | BufferEncoding - | null, - ): Promise; - } - /** - * Returns the contents of the `path`. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link readFile}. - * - * If the `encoding` option is specified then this function returns a - * string. Otherwise it returns a buffer. - * - * Similar to {@link readFile}, when the path is a directory, the behavior of `fs.readFileSync()` is platform-specific. - * - * ```js - * import { readFileSync } from 'node:fs'; - * - * // macOS, Linux, and Windows - * readFileSync(''); - * // => [Error: EISDIR: illegal operation on a directory, read ] - * - * // FreeBSD - * readFileSync(''); // => - * ``` - * @since v0.1.8 - * @param path filename or file descriptor - */ - export function readFileSync( - path: PathOrFileDescriptor, - options?: { - encoding?: null | undefined; - flag?: string | undefined; - } | null, - ): NonSharedBuffer; - /** - * Synchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - export function readFileSync( - path: PathOrFileDescriptor, - options: - | { - encoding: BufferEncoding; - flag?: string | undefined; - } - | BufferEncoding, - ): string; - /** - * Synchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - export function readFileSync( - path: PathOrFileDescriptor, - options?: - | (ObjectEncodingOptions & { - flag?: string | undefined; - }) - | BufferEncoding - | null, - ): string | NonSharedBuffer; - export type WriteFileOptions = - | ( - & ObjectEncodingOptions - & Abortable - & { - mode?: Mode | undefined; - flag?: string | undefined; - flush?: boolean | undefined; - } - ) - | BufferEncoding - | null; - /** - * When `file` is a filename, asynchronously writes data to the file, replacing the - * file if it already exists. `data` can be a string or a buffer. - * - * When `file` is a file descriptor, the behavior is similar to calling `fs.write()` directly (which is recommended). See the notes below on using - * a file descriptor. - * - * The `encoding` option is ignored if `data` is a buffer. - * - * The `mode` option only affects the newly created file. See {@link open} for more details. - * - * ```js - * import { writeFile } from 'node:fs'; - * import { Buffer } from 'node:buffer'; - * - * const data = new Uint8Array(Buffer.from('Hello Node.js')); - * writeFile('message.txt', data, (err) => { - * if (err) throw err; - * console.log('The file has been saved!'); - * }); - * ``` - * - * If `options` is a string, then it specifies the encoding: - * - * ```js - * import { writeFile } from 'node:fs'; - * - * writeFile('message.txt', 'Hello Node.js', 'utf8', callback); - * ``` - * - * It is unsafe to use `fs.writeFile()` multiple times on the same file without - * waiting for the callback. For this scenario, {@link createWriteStream} is - * recommended. - * - * Similarly to `fs.readFile` \- `fs.writeFile` is a convenience method that - * performs multiple `write` calls internally to write the buffer passed to it. - * For performance sensitive code consider using {@link createWriteStream}. - * - * It is possible to use an `AbortSignal` to cancel an `fs.writeFile()`. - * Cancelation is "best effort", and some amount of data is likely still - * to be written. - * - * ```js - * import { writeFile } from 'node:fs'; - * import { Buffer } from 'node:buffer'; - * - * const controller = new AbortController(); - * const { signal } = controller; - * const data = new Uint8Array(Buffer.from('Hello Node.js')); - * writeFile('message.txt', data, { signal }, (err) => { - * // When a request is aborted - the callback is called with an AbortError - * }); - * // When the request should be aborted - * controller.abort(); - * ``` - * - * Aborting an ongoing request does not abort individual operating - * system requests but rather the internal buffering `fs.writeFile` performs. - * @since v0.1.29 - * @param file filename or file descriptor - */ - export function writeFile( - file: PathOrFileDescriptor, - data: string | NodeJS.ArrayBufferView, - options: WriteFileOptions, - callback: NoParamCallback, - ): void; - /** - * Asynchronously writes data to a file, replacing the file if it already exists. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - */ - export function writeFile( - path: PathOrFileDescriptor, - data: string | NodeJS.ArrayBufferView, - callback: NoParamCallback, - ): void; - export namespace writeFile { - /** - * Asynchronously writes data to a file, replacing the file if it already exists. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'w'` is used. - */ - function __promisify__( - path: PathOrFileDescriptor, - data: string | NodeJS.ArrayBufferView, - options?: WriteFileOptions, - ): Promise; - } - /** - * Returns `undefined`. - * - * The `mode` option only affects the newly created file. See {@link open} for more details. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link writeFile}. - * @since v0.1.29 - * @param file filename or file descriptor - */ - export function writeFileSync( - file: PathOrFileDescriptor, - data: string | NodeJS.ArrayBufferView, - options?: WriteFileOptions, - ): void; - /** - * Asynchronously append data to a file, creating the file if it does not yet - * exist. `data` can be a string or a `Buffer`. - * - * The `mode` option only affects the newly created file. See {@link open} for more details. - * - * ```js - * import { appendFile } from 'node:fs'; - * - * appendFile('message.txt', 'data to append', (err) => { - * if (err) throw err; - * console.log('The "data to append" was appended to file!'); - * }); - * ``` - * - * If `options` is a string, then it specifies the encoding: - * - * ```js - * import { appendFile } from 'node:fs'; - * - * appendFile('message.txt', 'data to append', 'utf8', callback); - * ``` - * - * The `path` may be specified as a numeric file descriptor that has been opened - * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will - * not be closed automatically. - * - * ```js - * import { open, close, appendFile } from 'node:fs'; - * - * function closeFd(fd) { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * - * open('message.txt', 'a', (err, fd) => { - * if (err) throw err; - * - * try { - * appendFile(fd, 'data to append', 'utf8', (err) => { - * closeFd(fd); - * if (err) throw err; - * }); - * } catch (err) { - * closeFd(fd); - * throw err; - * } - * }); - * ``` - * @since v0.6.7 - * @param path filename or file descriptor - */ - export function appendFile( - path: PathOrFileDescriptor, - data: string | Uint8Array, - options: WriteFileOptions, - callback: NoParamCallback, - ): void; - /** - * Asynchronously append data to a file, creating the file if it does not exist. - * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - */ - export function appendFile(file: PathOrFileDescriptor, data: string | Uint8Array, callback: NoParamCallback): void; - export namespace appendFile { - /** - * Asynchronously append data to a file, creating the file if it does not exist. - * @param file A path to a file. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - * If a file descriptor is provided, the underlying file will _not_ be closed automatically. - * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string. - * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `mode` is not supplied, the default of `0o666` is used. - * If `mode` is a string, it is parsed as an octal integer. - * If `flag` is not supplied, the default of `'a'` is used. - */ - function __promisify__( - file: PathOrFileDescriptor, - data: string | Uint8Array, - options?: WriteFileOptions, - ): Promise; - } - /** - * Synchronously append data to a file, creating the file if it does not yet - * exist. `data` can be a string or a `Buffer`. - * - * The `mode` option only affects the newly created file. See {@link open} for more details. - * - * ```js - * import { appendFileSync } from 'node:fs'; - * - * try { - * appendFileSync('message.txt', 'data to append'); - * console.log('The "data to append" was appended to file!'); - * } catch (err) { - * // Handle the error - * } - * ``` - * - * If `options` is a string, then it specifies the encoding: - * - * ```js - * import { appendFileSync } from 'node:fs'; - * - * appendFileSync('message.txt', 'data to append', 'utf8'); - * ``` - * - * The `path` may be specified as a numeric file descriptor that has been opened - * for appending (using `fs.open()` or `fs.openSync()`). The file descriptor will - * not be closed automatically. - * - * ```js - * import { openSync, closeSync, appendFileSync } from 'node:fs'; - * - * let fd; - * - * try { - * fd = openSync('message.txt', 'a'); - * appendFileSync(fd, 'data to append', 'utf8'); - * } catch (err) { - * // Handle the error - * } finally { - * if (fd !== undefined) - * closeSync(fd); - * } - * ``` - * @since v0.6.7 - * @param path filename or file descriptor - */ - export function appendFileSync( - path: PathOrFileDescriptor, - data: string | Uint8Array, - options?: WriteFileOptions, - ): void; - /** - * Watch for changes on `filename`. The callback `listener` will be called each - * time the file is accessed. - * - * The `options` argument may be omitted. If provided, it should be an object. The `options` object may contain a boolean named `persistent` that indicates - * whether the process should continue to run as long as files are being watched. - * The `options` object may specify an `interval` property indicating how often the - * target should be polled in milliseconds. - * - * The `listener` gets two arguments the current stat object and the previous - * stat object: - * - * ```js - * import { watchFile } from 'fs'; - * - * watchFile('message.text', (curr, prev) => { - * console.log(`the current mtime is: ${curr.mtime}`); - * console.log(`the previous mtime was: ${prev.mtime}`); - * }); - * ``` - * - * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`, - * the numeric values in these objects are specified as `BigInt`s. - * - * To be notified when the file was modified, not just accessed, it is necessary - * to compare `curr.mtimeMs` and `prev.mtimeMs`. - * - * When an `fs.watchFile` operation results in an `ENOENT` error, it - * will invoke the listener once, with all the fields zeroed (or, for dates, the - * Unix Epoch). If the file is created later on, the listener will be called - * again, with the latest stat objects. This is a change in functionality since - * v0.10. - * - * Using {@link watch} is more efficient than `fs.watchFile` and `fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and `fs.unwatchFile` when possible. - * - * When a file being watched by `fs.watchFile()` disappears and reappears, - * then the contents of `previous` in the second callback event (the file's - * reappearance) will be the same as the contents of `previous` in the first - * callback event (its disappearance). - * - * This happens when: - * - * * the file is deleted, followed by a restore - * * the file is renamed and then renamed a second time back to its original name - * @since v0.1.31 - */ - export interface WatchFileOptions { - bigint?: boolean | undefined; - persistent?: boolean | undefined; - interval?: number | undefined; - } - /** - * Watch for changes on `filename`. The callback `listener` will be called each - * time the file is accessed. - * - * The `options` argument may be omitted. If provided, it should be an object. The `options` object may contain a boolean named `persistent` that indicates - * whether the process should continue to run as long as files are being watched. - * The `options` object may specify an `interval` property indicating how often the - * target should be polled in milliseconds. - * - * The `listener` gets two arguments the current stat object and the previous - * stat object: - * - * ```js - * import { watchFile } from 'node:fs'; - * - * watchFile('message.text', (curr, prev) => { - * console.log(`the current mtime is: ${curr.mtime}`); - * console.log(`the previous mtime was: ${prev.mtime}`); - * }); - * ``` - * - * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`, - * the numeric values in these objects are specified as `BigInt`s. - * - * To be notified when the file was modified, not just accessed, it is necessary - * to compare `curr.mtimeMs` and `prev.mtimeMs`. - * - * When an `fs.watchFile` operation results in an `ENOENT` error, it - * will invoke the listener once, with all the fields zeroed (or, for dates, the - * Unix Epoch). If the file is created later on, the listener will be called - * again, with the latest stat objects. This is a change in functionality since - * v0.10. - * - * Using {@link watch} is more efficient than `fs.watchFile` and `fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and `fs.unwatchFile` when possible. - * - * When a file being watched by `fs.watchFile()` disappears and reappears, - * then the contents of `previous` in the second callback event (the file's - * reappearance) will be the same as the contents of `previous` in the first - * callback event (its disappearance). - * - * This happens when: - * - * * the file is deleted, followed by a restore - * * the file is renamed and then renamed a second time back to its original name - * @since v0.1.31 - */ - export function watchFile( - filename: PathLike, - options: - | (WatchFileOptions & { - bigint?: false | undefined; - }) - | undefined, - listener: StatsListener, - ): StatWatcher; - export function watchFile( - filename: PathLike, - options: - | (WatchFileOptions & { - bigint: true; - }) - | undefined, - listener: BigIntStatsListener, - ): StatWatcher; - /** - * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed. - * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - */ - export function watchFile(filename: PathLike, listener: StatsListener): StatWatcher; - /** - * Stop watching for changes on `filename`. If `listener` is specified, only that - * particular listener is removed. Otherwise, _all_ listeners are removed, - * effectively stopping watching of `filename`. - * - * Calling `fs.unwatchFile()` with a filename that is not being watched is a - * no-op, not an error. - * - * Using {@link watch} is more efficient than `fs.watchFile()` and `fs.unwatchFile()`. `fs.watch()` should be used instead of `fs.watchFile()` and `fs.unwatchFile()` when possible. - * @since v0.1.31 - * @param listener Optional, a listener previously attached using `fs.watchFile()` - */ - export function unwatchFile(filename: PathLike, listener?: StatsListener): void; - export function unwatchFile(filename: PathLike, listener?: BigIntStatsListener): void; - export interface WatchOptions extends Abortable { - encoding?: BufferEncoding | "buffer" | undefined; - persistent?: boolean | undefined; - recursive?: boolean | undefined; - } - export type WatchEventType = "rename" | "change"; - export type WatchListener = (event: WatchEventType, filename: T | null) => void; - export type StatsListener = (curr: Stats, prev: Stats) => void; - export type BigIntStatsListener = (curr: BigIntStats, prev: BigIntStats) => void; - /** - * Watch for changes on `filename`, where `filename` is either a file or a - * directory. - * - * The second argument is optional. If `options` is provided as a string, it - * specifies the `encoding`. Otherwise `options` should be passed as an object. - * - * The listener callback gets two arguments `(eventType, filename)`. `eventType`is either `'rename'` or `'change'`, and `filename` is the name of the file - * which triggered the event. - * - * On most platforms, `'rename'` is emitted whenever a filename appears or - * disappears in the directory. - * - * The listener callback is attached to the `'change'` event fired by `fs.FSWatcher`, but it is not the same thing as the `'change'` value of `eventType`. - * - * If a `signal` is passed, aborting the corresponding AbortController will close - * the returned `fs.FSWatcher`. - * @since v0.5.10 - * @param listener - */ - export function watch( - filename: PathLike, - options: - | (WatchOptions & { - encoding: "buffer"; - }) - | "buffer", - listener?: WatchListener, - ): FSWatcher; - /** - * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. - * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `persistent` is not supplied, the default of `true` is used. - * If `recursive` is not supplied, the default of `false` is used. - */ - export function watch( - filename: PathLike, - options?: WatchOptions | BufferEncoding | null, - listener?: WatchListener, - ): FSWatcher; - /** - * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. - * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `persistent` is not supplied, the default of `true` is used. - * If `recursive` is not supplied, the default of `false` is used. - */ - export function watch( - filename: PathLike, - options: WatchOptions | string, - listener?: WatchListener, - ): FSWatcher; - /** - * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. - * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - */ - export function watch(filename: PathLike, listener?: WatchListener): FSWatcher; - /** - * Test whether or not the given path exists by checking with the file system. - * Then call the `callback` argument with either true or false: - * - * ```js - * import { exists } from 'node:fs'; - * - * exists('/etc/passwd', (e) => { - * console.log(e ? 'it exists' : 'no passwd!'); - * }); - * ``` - * - * **The parameters for this callback are not consistent with other Node.js** - * **callbacks.** Normally, the first parameter to a Node.js callback is an `err` parameter, optionally followed by other parameters. The `fs.exists()` callback - * has only one boolean parameter. This is one reason `fs.access()` is recommended - * instead of `fs.exists()`. - * - * Using `fs.exists()` to check for the existence of a file before calling `fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended. Doing - * so introduces a race condition, since other processes may change the file's - * state between the two calls. Instead, user code should open/read/write the - * file directly and handle the error raised if the file does not exist. - * - * **write (NOT RECOMMENDED)** - * - * ```js - * import { exists, open, close } from 'node:fs'; - * - * exists('myfile', (e) => { - * if (e) { - * console.error('myfile already exists'); - * } else { - * open('myfile', 'wx', (err, fd) => { - * if (err) throw err; - * - * try { - * writeMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * } - * }); - * ``` - * - * **write (RECOMMENDED)** - * - * ```js - * import { open, close } from 'node:fs'; - * open('myfile', 'wx', (err, fd) => { - * if (err) { - * if (err.code === 'EEXIST') { - * console.error('myfile already exists'); - * return; - * } - * - * throw err; - * } - * - * try { - * writeMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * ``` - * - * **read (NOT RECOMMENDED)** - * - * ```js - * import { open, close, exists } from 'node:fs'; - * - * exists('myfile', (e) => { - * if (e) { - * open('myfile', 'r', (err, fd) => { - * if (err) throw err; - * - * try { - * readMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * } else { - * console.error('myfile does not exist'); - * } - * }); - * ``` - * - * **read (RECOMMENDED)** - * - * ```js - * import { open, close } from 'node:fs'; - * - * open('myfile', 'r', (err, fd) => { - * if (err) { - * if (err.code === 'ENOENT') { - * console.error('myfile does not exist'); - * return; - * } - * - * throw err; - * } - * - * try { - * readMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * ``` - * - * The "not recommended" examples above check for existence and then use the - * file; the "recommended" examples are better because they use the file directly - * and handle the error, if any. - * - * In general, check for the existence of a file only if the file won't be - * used directly, for example when its existence is a signal from another - * process. - * @since v0.0.2 - * @deprecated Since v1.0.0 - Use {@link stat} or {@link access} instead. - */ - export function exists(path: PathLike, callback: (exists: boolean) => void): void; - /** @deprecated */ - export namespace exists { - /** - * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function __promisify__(path: PathLike): Promise; - } - /** - * Returns `true` if the path exists, `false` otherwise. - * - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link exists}. - * - * `fs.exists()` is deprecated, but `fs.existsSync()` is not. The `callback` parameter to `fs.exists()` accepts parameters that are inconsistent with other - * Node.js callbacks. `fs.existsSync()` does not use a callback. - * - * ```js - * import { existsSync } from 'node:fs'; - * - * if (existsSync('/etc/passwd')) - * console.log('The path exists.'); - * ``` - * @since v0.1.21 - */ - export function existsSync(path: PathLike): boolean; - export namespace constants { - // File Access Constants - /** Constant for fs.access(). File is visible to the calling process. */ - const F_OK: number; - /** Constant for fs.access(). File can be read by the calling process. */ - const R_OK: number; - /** Constant for fs.access(). File can be written by the calling process. */ - const W_OK: number; - /** Constant for fs.access(). File can be executed by the calling process. */ - const X_OK: number; - // File Copy Constants - /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */ - const COPYFILE_EXCL: number; - /** - * Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink. - * If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used. - */ - const COPYFILE_FICLONE: number; - /** - * Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink. - * If the underlying platform does not support copy-on-write, then the operation will fail with an error. - */ - const COPYFILE_FICLONE_FORCE: number; - // File Open Constants - /** Constant for fs.open(). Flag indicating to open a file for read-only access. */ - const O_RDONLY: number; - /** Constant for fs.open(). Flag indicating to open a file for write-only access. */ - const O_WRONLY: number; - /** Constant for fs.open(). Flag indicating to open a file for read-write access. */ - const O_RDWR: number; - /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */ - const O_CREAT: number; - /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */ - const O_EXCL: number; - /** - * Constant for fs.open(). Flag indicating that if path identifies a terminal device, - * opening the path shall not cause that terminal to become the controlling terminal for the process - * (if the process does not already have one). - */ - const O_NOCTTY: number; - /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */ - const O_TRUNC: number; - /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */ - const O_APPEND: number; - /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */ - const O_DIRECTORY: number; - /** - * constant for fs.open(). - * Flag indicating reading accesses to the file system will no longer result in - * an update to the atime information associated with the file. - * This flag is available on Linux operating systems only. - */ - const O_NOATIME: number; - /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */ - const O_NOFOLLOW: number; - /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */ - const O_SYNC: number; - /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */ - const O_DSYNC: number; - /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */ - const O_SYMLINK: number; - /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */ - const O_DIRECT: number; - /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */ - const O_NONBLOCK: number; - // File Type Constants - /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */ - const S_IFMT: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */ - const S_IFREG: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */ - const S_IFDIR: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */ - const S_IFCHR: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */ - const S_IFBLK: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */ - const S_IFIFO: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */ - const S_IFLNK: number; - /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */ - const S_IFSOCK: number; - // File Mode Constants - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */ - const S_IRWXU: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */ - const S_IRUSR: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */ - const S_IWUSR: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */ - const S_IXUSR: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */ - const S_IRWXG: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */ - const S_IRGRP: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */ - const S_IWGRP: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */ - const S_IXGRP: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */ - const S_IRWXO: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */ - const S_IROTH: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */ - const S_IWOTH: number; - /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */ - const S_IXOTH: number; - /** - * When set, a memory file mapping is used to access the file. This flag - * is available on Windows operating systems only. On other operating systems, - * this flag is ignored. - */ - const UV_FS_O_FILEMAP: number; - } - /** - * Tests a user's permissions for the file or directory specified by `path`. - * The `mode` argument is an optional integer that specifies the accessibility - * checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and `fs.constants.X_OK` - * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for - * possible values of `mode`. - * - * The final argument, `callback`, is a callback function that is invoked with - * a possible error argument. If any of the accessibility checks fail, the error - * argument will be an `Error` object. The following examples check if `package.json` exists, and if it is readable or writable. - * - * ```js - * import { access, constants } from 'node:fs'; - * - * const file = 'package.json'; - * - * // Check if the file exists in the current directory. - * access(file, constants.F_OK, (err) => { - * console.log(`${file} ${err ? 'does not exist' : 'exists'}`); - * }); - * - * // Check if the file is readable. - * access(file, constants.R_OK, (err) => { - * console.log(`${file} ${err ? 'is not readable' : 'is readable'}`); - * }); - * - * // Check if the file is writable. - * access(file, constants.W_OK, (err) => { - * console.log(`${file} ${err ? 'is not writable' : 'is writable'}`); - * }); - * - * // Check if the file is readable and writable. - * access(file, constants.R_OK | constants.W_OK, (err) => { - * console.log(`${file} ${err ? 'is not' : 'is'} readable and writable`); - * }); - * ``` - * - * Do not use `fs.access()` to check for the accessibility of a file before calling `fs.open()`, `fs.readFile()`, or `fs.writeFile()`. Doing - * so introduces a race condition, since other processes may change the file's - * state between the two calls. Instead, user code should open/read/write the - * file directly and handle the error raised if the file is not accessible. - * - * **write (NOT RECOMMENDED)** - * - * ```js - * import { access, open, close } from 'node:fs'; - * - * access('myfile', (err) => { - * if (!err) { - * console.error('myfile already exists'); - * return; - * } - * - * open('myfile', 'wx', (err, fd) => { - * if (err) throw err; - * - * try { - * writeMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * }); - * ``` - * - * **write (RECOMMENDED)** - * - * ```js - * import { open, close } from 'node:fs'; - * - * open('myfile', 'wx', (err, fd) => { - * if (err) { - * if (err.code === 'EEXIST') { - * console.error('myfile already exists'); - * return; - * } - * - * throw err; - * } - * - * try { - * writeMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * ``` - * - * **read (NOT RECOMMENDED)** - * - * ```js - * import { access, open, close } from 'node:fs'; - * access('myfile', (err) => { - * if (err) { - * if (err.code === 'ENOENT') { - * console.error('myfile does not exist'); - * return; - * } - * - * throw err; - * } - * - * open('myfile', 'r', (err, fd) => { - * if (err) throw err; - * - * try { - * readMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * }); - * ``` - * - * **read (RECOMMENDED)** - * - * ```js - * import { open, close } from 'node:fs'; - * - * open('myfile', 'r', (err, fd) => { - * if (err) { - * if (err.code === 'ENOENT') { - * console.error('myfile does not exist'); - * return; - * } - * - * throw err; - * } - * - * try { - * readMyData(fd); - * } finally { - * close(fd, (err) => { - * if (err) throw err; - * }); - * } - * }); - * ``` - * - * The "not recommended" examples above check for accessibility and then use the - * file; the "recommended" examples are better because they use the file directly - * and handle the error, if any. - * - * In general, check for the accessibility of a file only if the file will not be - * used directly, for example when its accessibility is a signal from another - * process. - * - * On Windows, access-control policies (ACLs) on a directory may limit access to - * a file or directory. The `fs.access()` function, however, does not check the - * ACL and therefore may report that a path is accessible even if the ACL restricts - * the user from reading or writing to it. - * @since v0.11.15 - * @param [mode=fs.constants.F_OK] - */ - export function access(path: PathLike, mode: number | undefined, callback: NoParamCallback): void; - /** - * Asynchronously tests a user's permissions for the file specified by path. - * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - */ - export function access(path: PathLike, callback: NoParamCallback): void; - export namespace access { - /** - * Asynchronously tests a user's permissions for the file specified by path. - * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * URL support is _experimental_. - */ - function __promisify__(path: PathLike, mode?: number): Promise; - } - /** - * Synchronously tests a user's permissions for the file or directory specified - * by `path`. The `mode` argument is an optional integer that specifies the - * accessibility checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and - * `fs.constants.X_OK` (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for - * possible values of `mode`. - * - * If any of the accessibility checks fail, an `Error` will be thrown. Otherwise, - * the method will return `undefined`. - * - * ```js - * import { accessSync, constants } from 'node:fs'; - * - * try { - * accessSync('etc/passwd', constants.R_OK | constants.W_OK); - * console.log('can read/write'); - * } catch (err) { - * console.error('no access!'); - * } - * ``` - * @since v0.11.15 - * @param [mode=fs.constants.F_OK] - */ - export function accessSync(path: PathLike, mode?: number): void; - interface StreamOptions { - flags?: string | undefined; - encoding?: BufferEncoding | undefined; - fd?: number | promises.FileHandle | undefined; - mode?: number | undefined; - autoClose?: boolean | undefined; - emitClose?: boolean | undefined; - start?: number | undefined; - signal?: AbortSignal | null | undefined; - highWaterMark?: number | undefined; - } - interface FSImplementation { - open?: (...args: any[]) => any; - close?: (...args: any[]) => any; - } - interface CreateReadStreamFSImplementation extends FSImplementation { - read: (...args: any[]) => any; - } - interface CreateWriteStreamFSImplementation extends FSImplementation { - write: (...args: any[]) => any; - writev?: (...args: any[]) => any; - } - interface ReadStreamOptions extends StreamOptions { - fs?: CreateReadStreamFSImplementation | null | undefined; - end?: number | undefined; - } - interface WriteStreamOptions extends StreamOptions { - fs?: CreateWriteStreamFSImplementation | null | undefined; - flush?: boolean | undefined; - } - /** - * Unlike the 16 KiB default `highWaterMark` for a `stream.Readable`, the stream - * returned by this method has a default `highWaterMark` of 64 KiB. - * - * `options` can include `start` and `end` values to read a range of bytes from - * the file instead of the entire file. Both `start` and `end` are inclusive and - * start counting at 0, allowed values are in the - * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `fd` is specified and `start` is - * omitted or `undefined`, `fs.createReadStream()` reads sequentially from the - * current file position. The `encoding` can be any one of those accepted by `Buffer`. - * - * If `fd` is specified, `ReadStream` will ignore the `path` argument and will use - * the specified file descriptor. This means that no `'open'` event will be - * emitted. `fd` should be blocking; non-blocking `fd`s should be passed to `net.Socket`. - * - * If `fd` points to a character device that only supports blocking reads - * (such as keyboard or sound card), read operations do not finish until data is - * available. This can prevent the process from exiting and the stream from - * closing naturally. - * - * By default, the stream will emit a `'close'` event after it has been - * destroyed. Set the `emitClose` option to `false` to change this behavior. - * - * By providing the `fs` option, it is possible to override the corresponding `fs` implementations for `open`, `read`, and `close`. When providing the `fs` option, - * an override for `read` is required. If no `fd` is provided, an override for `open` is also required. If `autoClose` is `true`, an override for `close` is - * also required. - * - * ```js - * import { createReadStream } from 'node:fs'; - * - * // Create a stream from some character device. - * const stream = createReadStream('/dev/input/event0'); - * setTimeout(() => { - * stream.close(); // This may not close the stream. - * // Artificially marking end-of-stream, as if the underlying resource had - * // indicated end-of-file by itself, allows the stream to close. - * // This does not cancel pending read operations, and if there is such an - * // operation, the process may still not be able to exit successfully - * // until it finishes. - * stream.push(null); - * stream.read(0); - * }, 100); - * ``` - * - * If `autoClose` is false, then the file descriptor won't be closed, even if - * there's an error. It is the application's responsibility to close it and make - * sure there's no file descriptor leak. If `autoClose` is set to true (default - * behavior), on `'error'` or `'end'` the file descriptor will be closed - * automatically. - * - * `mode` sets the file mode (permission and sticky bits), but only if the - * file was created. - * - * An example to read the last 10 bytes of a file which is 100 bytes long: - * - * ```js - * import { createReadStream } from 'node:fs'; - * - * createReadStream('sample.txt', { start: 90, end: 99 }); - * ``` - * - * If `options` is a string, then it specifies the encoding. - * @since v0.1.31 - */ - export function createReadStream(path: PathLike, options?: BufferEncoding | ReadStreamOptions): ReadStream; - /** - * `options` may also include a `start` option to allow writing data at some - * position past the beginning of the file, allowed values are in the - * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than - * replacing it may require the `flags` option to be set to `r+` rather than the - * default `w`. The `encoding` can be any one of those accepted by `Buffer`. - * - * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'` the file descriptor will be closed automatically. If `autoClose` is false, - * then the file descriptor won't be closed, even if there's an error. - * It is the application's responsibility to close it and make sure there's no - * file descriptor leak. - * - * By default, the stream will emit a `'close'` event after it has been - * destroyed. Set the `emitClose` option to `false` to change this behavior. - * - * By providing the `fs` option it is possible to override the corresponding `fs` implementations for `open`, `write`, `writev`, and `close`. Overriding `write()` without `writev()` can reduce - * performance as some optimizations (`_writev()`) - * will be disabled. When providing the `fs` option, overrides for at least one of `write` and `writev` are required. If no `fd` option is supplied, an override - * for `open` is also required. If `autoClose` is `true`, an override for `close` is also required. - * - * Like `fs.ReadStream`, if `fd` is specified, `fs.WriteStream` will ignore the `path` argument and will use the specified file descriptor. This means that no `'open'` event will be - * emitted. `fd` should be blocking; non-blocking `fd`s - * should be passed to `net.Socket`. - * - * If `options` is a string, then it specifies the encoding. - * @since v0.1.31 - */ - export function createWriteStream(path: PathLike, options?: BufferEncoding | WriteStreamOptions): WriteStream; - /** - * Forces all currently queued I/O operations associated with the file to the - * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. No arguments other - * than a possible - * exception are given to the completion callback. - * @since v0.1.96 - */ - export function fdatasync(fd: number, callback: NoParamCallback): void; - export namespace fdatasync { - /** - * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device. - * @param fd A file descriptor. - */ - function __promisify__(fd: number): Promise; - } - /** - * Forces all currently queued I/O operations associated with the file to the - * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. Returns `undefined`. - * @since v0.1.96 - */ - export function fdatasyncSync(fd: number): void; - /** - * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it - * already exists. No arguments other than a possible exception are given to the - * callback function. Node.js makes no guarantees about the atomicity of the copy - * operation. If an error occurs after the destination file has been opened for - * writing, Node.js will attempt to remove the destination. - * - * `mode` is an optional integer that specifies the behavior - * of the copy operation. It is possible to create a mask consisting of the bitwise - * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`). - * - * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already - * exists. - * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a - * copy-on-write reflink. If the platform does not support copy-on-write, then a - * fallback copy mechanism is used. - * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to - * create a copy-on-write reflink. If the platform does not support - * copy-on-write, then the operation will fail. - * - * ```js - * import { copyFile, constants } from 'node:fs'; - * - * function callback(err) { - * if (err) throw err; - * console.log('source.txt was copied to destination.txt'); - * } - * - * // destination.txt will be created or overwritten by default. - * copyFile('source.txt', 'destination.txt', callback); - * - * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. - * copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL, callback); - * ``` - * @since v8.5.0 - * @param src source filename to copy - * @param dest destination filename of the copy operation - * @param [mode=0] modifiers for copy operation. - */ - export function copyFile(src: PathLike, dest: PathLike, callback: NoParamCallback): void; - export function copyFile(src: PathLike, dest: PathLike, mode: number, callback: NoParamCallback): void; - export namespace copyFile { - function __promisify__(src: PathLike, dst: PathLike, mode?: number): Promise; - } - /** - * Synchronously copies `src` to `dest`. By default, `dest` is overwritten if it - * already exists. Returns `undefined`. Node.js makes no guarantees about the - * atomicity of the copy operation. If an error occurs after the destination file - * has been opened for writing, Node.js will attempt to remove the destination. - * - * `mode` is an optional integer that specifies the behavior - * of the copy operation. It is possible to create a mask consisting of the bitwise - * OR of two or more values (e.g.`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`). - * - * * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already - * exists. - * * `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a - * copy-on-write reflink. If the platform does not support copy-on-write, then a - * fallback copy mechanism is used. - * * `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to - * create a copy-on-write reflink. If the platform does not support - * copy-on-write, then the operation will fail. - * - * ```js - * import { copyFileSync, constants } from 'node:fs'; - * - * // destination.txt will be created or overwritten by default. - * copyFileSync('source.txt', 'destination.txt'); - * console.log('source.txt was copied to destination.txt'); - * - * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. - * copyFileSync('source.txt', 'destination.txt', constants.COPYFILE_EXCL); - * ``` - * @since v8.5.0 - * @param src source filename to copy - * @param dest destination filename of the copy operation - * @param [mode=0] modifiers for copy operation. - */ - export function copyFileSync(src: PathLike, dest: PathLike, mode?: number): void; - /** - * Write an array of `ArrayBufferView`s to the file specified by `fd` using `writev()`. - * - * `position` is the offset from the beginning of the file where this data - * should be written. If `typeof position !== 'number'`, the data will be written - * at the current position. - * - * The callback will be given three arguments: `err`, `bytesWritten`, and `buffers`. `bytesWritten` is how many bytes were written from `buffers`. - * - * If this method is `util.promisify()` ed, it returns a promise for an `Object` with `bytesWritten` and `buffers` properties. - * - * It is unsafe to use `fs.writev()` multiple times on the same file without - * waiting for the callback. For this scenario, use {@link createWriteStream}. - * - * On Linux, positional writes don't work when the file is opened in append mode. - * The kernel ignores the position argument and always appends the data to - * the end of the file. - * @since v12.9.0 - * @param [position='null'] - */ - export function writev( - fd: number, - buffers: TBuffers, - cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: TBuffers) => void, - ): void; - export function writev( - fd: number, - buffers: TBuffers, - position: number | null, - cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: TBuffers) => void, - ): void; - // Providing a default type parameter doesn't provide true BC for userland consumers, but at least suppresses TS2314 - // TODO: remove default in future major version - export interface WriteVResult { - bytesWritten: number; - buffers: T; - } - export namespace writev { - function __promisify__( - fd: number, - buffers: TBuffers, - position?: number, - ): Promise>; - } - /** - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link writev}. - * @since v12.9.0 - * @param [position='null'] - * @return The number of bytes written. - */ - export function writevSync(fd: number, buffers: readonly NodeJS.ArrayBufferView[], position?: number): number; - /** - * Read from a file specified by `fd` and write to an array of `ArrayBufferView`s - * using `readv()`. - * - * `position` is the offset from the beginning of the file from where data - * should be read. If `typeof position !== 'number'`, the data will be read - * from the current position. - * - * The callback will be given three arguments: `err`, `bytesRead`, and `buffers`. `bytesRead` is how many bytes were read from the file. - * - * If this method is invoked as its `util.promisify()` ed version, it returns - * a promise for an `Object` with `bytesRead` and `buffers` properties. - * @since v13.13.0, v12.17.0 - * @param [position='null'] - */ - export function readv( - fd: number, - buffers: TBuffers, - cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: TBuffers) => void, - ): void; - export function readv( - fd: number, - buffers: TBuffers, - position: number | null, - cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: TBuffers) => void, - ): void; - // Providing a default type parameter doesn't provide true BC for userland consumers, but at least suppresses TS2314 - // TODO: remove default in future major version - export interface ReadVResult { - bytesRead: number; - buffers: T; - } - export namespace readv { - function __promisify__( - fd: number, - buffers: TBuffers, - position?: number, - ): Promise>; - } - /** - * For detailed information, see the documentation of the asynchronous version of - * this API: {@link readv}. - * @since v13.13.0, v12.17.0 - * @param [position='null'] - * @return The number of bytes read. - */ - export function readvSync(fd: number, buffers: readonly NodeJS.ArrayBufferView[], position?: number): number; - - export interface OpenAsBlobOptions { - /** - * An optional mime type for the blob. - * - * @default 'undefined' - */ - type?: string | undefined; - } - - /** - * Returns a `Blob` whose data is backed by the given file. - * - * The file must not be modified after the `Blob` is created. Any modifications - * will cause reading the `Blob` data to fail with a `DOMException` error. - * Synchronous stat operations on the file when the `Blob` is created, and before - * each read in order to detect whether the file data has been modified on disk. - * - * ```js - * import { openAsBlob } from 'node:fs'; - * - * const blob = await openAsBlob('the.file.txt'); - * const ab = await blob.arrayBuffer(); - * blob.stream(); - * ``` - * @since v19.8.0 - * @experimental - */ - export function openAsBlob(path: PathLike, options?: OpenAsBlobOptions): Promise; - - export interface OpenDirOptions { - /** - * @default 'utf8' - */ - encoding?: BufferEncoding | undefined; - /** - * Number of directory entries that are buffered - * internally when reading from the directory. Higher values lead to better - * performance but higher memory usage. - * @default 32 - */ - bufferSize?: number | undefined; - /** - * @default false - */ - recursive?: boolean | undefined; - } - /** - * Synchronously open a directory. See [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html). - * - * Creates an `fs.Dir`, which contains all further functions for reading from - * and cleaning up the directory. - * - * The `encoding` option sets the encoding for the `path` while opening the - * directory and subsequent read operations. - * @since v12.12.0 - */ - export function opendirSync(path: PathLike, options?: OpenDirOptions): Dir; - /** - * Asynchronously open a directory. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for - * more details. - * - * Creates an `fs.Dir`, which contains all further functions for reading from - * and cleaning up the directory. - * - * The `encoding` option sets the encoding for the `path` while opening the - * directory and subsequent read operations. - * @since v12.12.0 - */ - export function opendir(path: PathLike, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void; - export function opendir( - path: PathLike, - options: OpenDirOptions, - cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void, - ): void; - export namespace opendir { - function __promisify__(path: PathLike, options?: OpenDirOptions): Promise; - } - export interface BigIntStats extends StatsBase { - atimeNs: bigint; - mtimeNs: bigint; - ctimeNs: bigint; - birthtimeNs: bigint; - } - export interface BigIntOptions { - bigint: true; - } - export interface StatOptions { - bigint?: boolean | undefined; - } - export interface StatSyncOptions extends StatOptions { - throwIfNoEntry?: boolean | undefined; - } - interface CopyOptionsBase { - /** - * Dereference symlinks - * @default false - */ - dereference?: boolean | undefined; - /** - * When `force` is `false`, and the destination - * exists, throw an error. - * @default false - */ - errorOnExist?: boolean | undefined; - /** - * Overwrite existing file or directory. _The copy - * operation will ignore errors if you set this to false and the destination - * exists. Use the `errorOnExist` option to change this behavior. - * @default true - */ - force?: boolean | undefined; - /** - * Modifiers for copy operation. See `mode` flag of {@link copyFileSync()} - */ - mode?: number | undefined; - /** - * When `true` timestamps from `src` will - * be preserved. - * @default false - */ - preserveTimestamps?: boolean | undefined; - /** - * Copy directories recursively. - * @default false - */ - recursive?: boolean | undefined; - /** - * When true, path resolution for symlinks will be skipped - * @default false - */ - verbatimSymlinks?: boolean | undefined; - } - export interface CopyOptions extends CopyOptionsBase { - /** - * Function to filter copied files/directories. Return - * `true` to copy the item, `false` to ignore it. - */ - filter?: ((source: string, destination: string) => boolean | Promise) | undefined; - } - export interface CopySyncOptions extends CopyOptionsBase { - /** - * Function to filter copied files/directories. Return - * `true` to copy the item, `false` to ignore it. - */ - filter?: ((source: string, destination: string) => boolean) | undefined; - } - /** - * Asynchronously copies the entire directory structure from `src` to `dest`, - * including subdirectories and files. - * - * When copying a directory to another directory, globs are not supported and - * behavior is similar to `cp dir1/ dir2/`. - * @since v16.7.0 - * @experimental - * @param src source path to copy. - * @param dest destination path to copy to. - */ - export function cp( - source: string | URL, - destination: string | URL, - callback: (err: NodeJS.ErrnoException | null) => void, - ): void; - export function cp( - source: string | URL, - destination: string | URL, - opts: CopyOptions, - callback: (err: NodeJS.ErrnoException | null) => void, - ): void; - /** - * Synchronously copies the entire directory structure from `src` to `dest`, - * including subdirectories and files. - * - * When copying a directory to another directory, globs are not supported and - * behavior is similar to `cp dir1/ dir2/`. - * @since v16.7.0 - * @experimental - * @param src source path to copy. - * @param dest destination path to copy to. - */ - export function cpSync(source: string | URL, destination: string | URL, opts?: CopySyncOptions): void; -} -declare module "node:fs" { - export * from "fs"; -} diff --git a/node_modules/@types/node/fs/promises.d.ts b/node_modules/@types/node/fs/promises.d.ts deleted file mode 100644 index 7cc4dee..0000000 --- a/node_modules/@types/node/fs/promises.d.ts +++ /dev/null @@ -1,1270 +0,0 @@ -/** - * The `fs/promises` API provides asynchronous file system methods that return - * promises. - * - * The promise APIs use the underlying Node.js threadpool to perform file - * system operations off the event loop thread. These operations are not - * synchronized or threadsafe. Care must be taken when performing multiple - * concurrent modifications on the same file or data corruption may occur. - * @since v10.0.0 - */ -declare module "fs/promises" { - import { NonSharedBuffer } from "node:buffer"; - import { Abortable } from "node:events"; - import { Stream } from "node:stream"; - import { ReadableStream } from "node:stream/web"; - import { - BigIntStats, - BigIntStatsFs, - BufferEncodingOption, - constants as fsConstants, - CopyOptions, - Dir, - Dirent, - MakeDirectoryOptions, - Mode, - ObjectEncodingOptions, - OpenDirOptions, - OpenMode, - PathLike, - ReadOptions, - ReadOptionsWithBuffer, - ReadStream, - ReadVResult, - RmDirOptions, - RmOptions, - StatFsOptions, - StatOptions, - Stats, - StatsFs, - TimeLike, - WatchEventType, - WatchOptions, - WriteStream, - WriteVResult, - } from "node:fs"; - import { Interface as ReadlineInterface } from "node:readline"; - interface FileChangeInfo { - eventType: WatchEventType; - filename: T | null; - } - interface FlagAndOpenMode { - mode?: Mode | undefined; - flag?: OpenMode | undefined; - } - interface FileReadResult { - bytesRead: number; - buffer: T; - } - /** @deprecated This interface will be removed in a future version. Use `import { ReadOptionsWithBuffer } from "node:fs"` instead. */ - interface FileReadOptions { - /** - * @default `Buffer.alloc(0xffff)` - */ - buffer?: T; - /** - * @default 0 - */ - offset?: number | null; - /** - * @default `buffer.byteLength` - */ - length?: number | null; - position?: number | null; - } - interface CreateReadStreamOptions extends Abortable { - encoding?: BufferEncoding | null | undefined; - autoClose?: boolean | undefined; - emitClose?: boolean | undefined; - start?: number | undefined; - end?: number | undefined; - highWaterMark?: number | undefined; - } - interface CreateWriteStreamOptions { - encoding?: BufferEncoding | null | undefined; - autoClose?: boolean | undefined; - emitClose?: boolean | undefined; - start?: number | undefined; - highWaterMark?: number | undefined; - flush?: boolean | undefined; - } - interface ReadableWebStreamOptions { - /** - * Whether to open a normal or a `'bytes'` stream. - * @since v20.0.0 - */ - type?: "bytes" | undefined; - } - // TODO: Add `EventEmitter` close - interface FileHandle { - /** - * The numeric file descriptor managed by the {FileHandle} object. - * @since v10.0.0 - */ - readonly fd: number; - /** - * Alias of `filehandle.writeFile()`. - * - * When operating on file handles, the mode cannot be changed from what it was set - * to with `fsPromises.open()`. Therefore, this is equivalent to `filehandle.writeFile()`. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - appendFile( - data: string | Uint8Array, - options?: - | (ObjectEncodingOptions & Abortable) - | BufferEncoding - | null, - ): Promise; - /** - * Changes the ownership of the file. A wrapper for [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html). - * @since v10.0.0 - * @param uid The file's new owner's user id. - * @param gid The file's new group's group id. - * @return Fulfills with `undefined` upon success. - */ - chown(uid: number, gid: number): Promise; - /** - * Modifies the permissions on the file. See [`chmod(2)`](http://man7.org/linux/man-pages/man2/chmod.2.html). - * @since v10.0.0 - * @param mode the file mode bit mask. - * @return Fulfills with `undefined` upon success. - */ - chmod(mode: Mode): Promise; - /** - * Unlike the 16 KiB default `highWaterMark` for a `stream.Readable`, the stream - * returned by this method has a default `highWaterMark` of 64 KiB. - * - * `options` can include `start` and `end` values to read a range of bytes from - * the file instead of the entire file. Both `start` and `end` are inclusive and - * start counting at 0, allowed values are in the - * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `start` is - * omitted or `undefined`, `filehandle.createReadStream()` reads sequentially from - * the current file position. The `encoding` can be any one of those accepted by `Buffer`. - * - * If the `FileHandle` points to a character device that only supports blocking - * reads (such as keyboard or sound card), read operations do not finish until data - * is available. This can prevent the process from exiting and the stream from - * closing naturally. - * - * By default, the stream will emit a `'close'` event after it has been - * destroyed. Set the `emitClose` option to `false` to change this behavior. - * - * ```js - * import { open } from 'node:fs/promises'; - * - * const fd = await open('/dev/input/event0'); - * // Create a stream from some character device. - * const stream = fd.createReadStream(); - * setTimeout(() => { - * stream.close(); // This may not close the stream. - * // Artificially marking end-of-stream, as if the underlying resource had - * // indicated end-of-file by itself, allows the stream to close. - * // This does not cancel pending read operations, and if there is such an - * // operation, the process may still not be able to exit successfully - * // until it finishes. - * stream.push(null); - * stream.read(0); - * }, 100); - * ``` - * - * If `autoClose` is false, then the file descriptor won't be closed, even if - * there's an error. It is the application's responsibility to close it and make - * sure there's no file descriptor leak. If `autoClose` is set to true (default - * behavior), on `'error'` or `'end'` the file descriptor will be closed - * automatically. - * - * An example to read the last 10 bytes of a file which is 100 bytes long: - * - * ```js - * import { open } from 'node:fs/promises'; - * - * const fd = await open('sample.txt'); - * fd.createReadStream({ start: 90, end: 99 }); - * ``` - * @since v16.11.0 - */ - createReadStream(options?: CreateReadStreamOptions): ReadStream; - /** - * `options` may also include a `start` option to allow writing data at some - * position past the beginning of the file, allowed values are in the - * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than - * replacing it may require the `flags` `open` option to be set to `r+` rather than - * the default `r`. The `encoding` can be any one of those accepted by `Buffer`. - * - * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'` the file descriptor will be closed automatically. If `autoClose` is false, - * then the file descriptor won't be closed, even if there's an error. - * It is the application's responsibility to close it and make sure there's no - * file descriptor leak. - * - * By default, the stream will emit a `'close'` event after it has been - * destroyed. Set the `emitClose` option to `false` to change this behavior. - * @since v16.11.0 - */ - createWriteStream(options?: CreateWriteStreamOptions): WriteStream; - /** - * Forces all currently queued I/O operations associated with the file to the - * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. - * - * Unlike `filehandle.sync` this method does not flush modified metadata. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - datasync(): Promise; - /** - * Request that all data for the open file descriptor is flushed to the storage - * device. The specific implementation is operating system and device specific. - * Refer to the POSIX [`fsync(2)`](http://man7.org/linux/man-pages/man2/fsync.2.html) documentation for more detail. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - sync(): Promise; - /** - * Reads data from the file and stores that in the given buffer. - * - * If the file is not modified concurrently, the end-of-file is reached when the - * number of bytes read is zero. - * @since v10.0.0 - * @param buffer A buffer that will be filled with the file data read. - * @param offset The location in the buffer at which to start filling. - * @param length The number of bytes to read. - * @param position The location where to begin reading data from the file. If `null`, data will be read from the current file position, and the position will be updated. If `position` is an - * integer, the current file position will remain unchanged. - * @return Fulfills upon success with an object with two properties: - */ - read( - buffer: T, - offset?: number | null, - length?: number | null, - position?: number | null, - ): Promise>; - read( - buffer: T, - options?: ReadOptions, - ): Promise>; - read( - options?: ReadOptionsWithBuffer, - ): Promise>; - /** - * Returns a `ReadableStream` that may be used to read the files data. - * - * An error will be thrown if this method is called more than once or is called - * after the `FileHandle` is closed or closing. - * - * ```js - * import { - * open, - * } from 'node:fs/promises'; - * - * const file = await open('./some/file/to/read'); - * - * for await (const chunk of file.readableWebStream()) - * console.log(chunk); - * - * await file.close(); - * ``` - * - * While the `ReadableStream` will read the file to completion, it will not - * close the `FileHandle` automatically. User code must still call the`fileHandle.close()` method. - * @since v17.0.0 - * @experimental - */ - readableWebStream(options?: ReadableWebStreamOptions): ReadableStream; - /** - * Asynchronously reads the entire contents of a file. - * - * If `options` is a string, then it specifies the `encoding`. - * - * The `FileHandle` has to support reading. - * - * If one or more `filehandle.read()` calls are made on a file handle and then a `filehandle.readFile()` call is made, the data will be read from the current - * position till the end of the file. It doesn't always read from the beginning - * of the file. - * @since v10.0.0 - * @return Fulfills upon a successful read with the contents of the file. If no encoding is specified (using `options.encoding`), the data is returned as a {Buffer} object. Otherwise, the - * data will be a string. - */ - readFile( - options?: - | ({ encoding?: null | undefined } & Abortable) - | null, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. - * The `FileHandle` must have been opened for reading. - */ - readFile( - options: - | ({ encoding: BufferEncoding } & Abortable) - | BufferEncoding, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically. - * The `FileHandle` must have been opened for reading. - */ - readFile( - options?: - | (ObjectEncodingOptions & Abortable) - | BufferEncoding - | null, - ): Promise; - /** - * Convenience method to create a `readline` interface and stream over the file. - * See `filehandle.createReadStream()` for the options. - * - * ```js - * import { open } from 'node:fs/promises'; - * - * const file = await open('./some/file/to/read'); - * - * for await (const line of file.readLines()) { - * console.log(line); - * } - * ``` - * @since v18.11.0 - */ - readLines(options?: CreateReadStreamOptions): ReadlineInterface; - /** - * @since v10.0.0 - * @return Fulfills with an {fs.Stats} for the file. - */ - stat( - opts?: StatOptions & { - bigint?: false | undefined; - }, - ): Promise; - stat( - opts: StatOptions & { - bigint: true; - }, - ): Promise; - stat(opts?: StatOptions): Promise; - /** - * Truncates the file. - * - * If the file was larger than `len` bytes, only the first `len` bytes will be - * retained in the file. - * - * The following example retains only the first four bytes of the file: - * - * ```js - * import { open } from 'node:fs/promises'; - * - * let filehandle = null; - * try { - * filehandle = await open('temp.txt', 'r+'); - * await filehandle.truncate(4); - * } finally { - * await filehandle?.close(); - * } - * ``` - * - * If the file previously was shorter than `len` bytes, it is extended, and the - * extended part is filled with null bytes (`'\0'`): - * - * If `len` is negative then `0` will be used. - * @since v10.0.0 - * @param [len=0] - * @return Fulfills with `undefined` upon success. - */ - truncate(len?: number): Promise; - /** - * Change the file system timestamps of the object referenced by the `FileHandle` then fulfills the promise with no arguments upon success. - * @since v10.0.0 - */ - utimes(atime: TimeLike, mtime: TimeLike): Promise; - /** - * Asynchronously writes data to a file, replacing the file if it already exists. `data` can be a string, a buffer, an - * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an - * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object. - * The promise is fulfilled with no arguments upon success. - * - * If `options` is a string, then it specifies the `encoding`. - * - * The `FileHandle` has to support writing. - * - * It is unsafe to use `filehandle.writeFile()` multiple times on the same file - * without waiting for the promise to be fulfilled (or rejected). - * - * If one or more `filehandle.write()` calls are made on a file handle and then a`filehandle.writeFile()` call is made, the data will be written from the - * current position till the end of the file. It doesn't always write from the - * beginning of the file. - * @since v10.0.0 - */ - writeFile( - data: string | Uint8Array, - options?: - | (ObjectEncodingOptions & Abortable) - | BufferEncoding - | null, - ): Promise; - /** - * Write `buffer` to the file. - * - * The promise is fulfilled with an object containing two properties: - * - * It is unsafe to use `filehandle.write()` multiple times on the same file - * without waiting for the promise to be fulfilled (or rejected). For this - * scenario, use `filehandle.createWriteStream()`. - * - * On Linux, positional writes do not work when the file is opened in append mode. - * The kernel ignores the position argument and always appends the data to - * the end of the file. - * @since v10.0.0 - * @param offset The start position from within `buffer` where the data to write begins. - * @param [length=buffer.byteLength - offset] The number of bytes from `buffer` to write. - * @param [position='null'] The offset from the beginning of the file where the data from `buffer` should be written. If `position` is not a `number`, the data will be written at the current - * position. See the POSIX pwrite(2) documentation for more detail. - */ - write( - buffer: TBuffer, - offset?: number | null, - length?: number | null, - position?: number | null, - ): Promise<{ - bytesWritten: number; - buffer: TBuffer; - }>; - write( - data: string, - position?: number | null, - encoding?: BufferEncoding | null, - ): Promise<{ - bytesWritten: number; - buffer: string; - }>; - /** - * Write an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s to the file. - * - * The promise is fulfilled with an object containing a two properties: - * - * It is unsafe to call `writev()` multiple times on the same file without waiting - * for the promise to be fulfilled (or rejected). - * - * On Linux, positional writes don't work when the file is opened in append mode. - * The kernel ignores the position argument and always appends the data to - * the end of the file. - * @since v12.9.0 - * @param [position='null'] The offset from the beginning of the file where the data from `buffers` should be written. If `position` is not a `number`, the data will be written at the current - * position. - */ - writev( - buffers: TBuffers, - position?: number, - ): Promise>; - /** - * Read from a file and write to an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s - * @since v13.13.0, v12.17.0 - * @param [position='null'] The offset from the beginning of the file where the data should be read from. If `position` is not a `number`, the data will be read from the current position. - * @return Fulfills upon success an object containing two properties: - */ - readv( - buffers: TBuffers, - position?: number, - ): Promise>; - /** - * Closes the file handle after waiting for any pending operation on the handle to - * complete. - * - * ```js - * import { open } from 'node:fs/promises'; - * - * let filehandle; - * try { - * filehandle = await open('thefile.txt', 'r'); - * } finally { - * await filehandle?.close(); - * } - * ``` - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - close(): Promise; - /** - * An alias for {@link FileHandle.close()}. - * @since v20.4.0 - */ - [Symbol.asyncDispose](): Promise; - } - const constants: typeof fsConstants; - /** - * Tests a user's permissions for the file or directory specified by `path`. - * The `mode` argument is an optional integer that specifies the accessibility - * checks to be performed. `mode` should be either the value `fs.constants.F_OK` or a mask consisting of the bitwise OR of any of `fs.constants.R_OK`, `fs.constants.W_OK`, and `fs.constants.X_OK` - * (e.g.`fs.constants.W_OK | fs.constants.R_OK`). Check `File access constants` for - * possible values of `mode`. - * - * If the accessibility check is successful, the promise is fulfilled with no - * value. If any of the accessibility checks fail, the promise is rejected - * with an [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object. The following example checks if the file`/etc/passwd` can be read and - * written by the current process. - * - * ```js - * import { access, constants } from 'node:fs/promises'; - * - * try { - * await access('/etc/passwd', constants.R_OK | constants.W_OK); - * console.log('can access'); - * } catch { - * console.error('cannot access'); - * } - * ``` - * - * Using `fsPromises.access()` to check for the accessibility of a file before - * calling `fsPromises.open()` is not recommended. Doing so introduces a race - * condition, since other processes may change the file's state between the two - * calls. Instead, user code should open/read/write the file directly and handle - * the error raised if the file is not accessible. - * @since v10.0.0 - * @param [mode=fs.constants.F_OK] - * @return Fulfills with `undefined` upon success. - */ - function access(path: PathLike, mode?: number): Promise; - /** - * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it - * already exists. - * - * No guarantees are made about the atomicity of the copy operation. If an - * error occurs after the destination file has been opened for writing, an attempt - * will be made to remove the destination. - * - * ```js - * import { copyFile, constants } from 'node:fs/promises'; - * - * try { - * await copyFile('source.txt', 'destination.txt'); - * console.log('source.txt was copied to destination.txt'); - * } catch { - * console.error('The file could not be copied'); - * } - * - * // By using COPYFILE_EXCL, the operation will fail if destination.txt exists. - * try { - * await copyFile('source.txt', 'destination.txt', constants.COPYFILE_EXCL); - * console.log('source.txt was copied to destination.txt'); - * } catch { - * console.error('The file could not be copied'); - * } - * ``` - * @since v10.0.0 - * @param src source filename to copy - * @param dest destination filename of the copy operation - * @param [mode=0] Optional modifiers that specify the behavior of the copy operation. It is possible to create a mask consisting of the bitwise OR of two or more values (e.g. - * `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`) - * @return Fulfills with `undefined` upon success. - */ - function copyFile(src: PathLike, dest: PathLike, mode?: number): Promise; - /** - * Opens a `FileHandle`. - * - * Refer to the POSIX [`open(2)`](http://man7.org/linux/man-pages/man2/open.2.html) documentation for more detail. - * - * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented - * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains - * a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams). - * @since v10.0.0 - * @param [flags='r'] See `support of file system `flags``. - * @param [mode=0o666] Sets the file mode (permission and sticky bits) if the file is created. - * @return Fulfills with a {FileHandle} object. - */ - function open(path: PathLike, flags?: string | number, mode?: Mode): Promise; - /** - * Renames `oldPath` to `newPath`. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function rename(oldPath: PathLike, newPath: PathLike): Promise; - /** - * Truncates (shortens or extends the length) of the content at `path` to `len` bytes. - * @since v10.0.0 - * @param [len=0] - * @return Fulfills with `undefined` upon success. - */ - function truncate(path: PathLike, len?: number): Promise; - /** - * Removes the directory identified by `path`. - * - * Using `fsPromises.rmdir()` on a file (not a directory) results in the - * promise being rejected with an `ENOENT` error on Windows and an `ENOTDIR` error on POSIX. - * - * To get a behavior similar to the `rm -rf` Unix command, use `fsPromises.rm()` with options `{ recursive: true, force: true }`. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function rmdir(path: PathLike, options?: RmDirOptions): Promise; - /** - * Removes files and directories (modeled on the standard POSIX `rm` utility). - * @since v14.14.0 - * @return Fulfills with `undefined` upon success. - */ - function rm(path: PathLike, options?: RmOptions): Promise; - /** - * Asynchronously creates a directory. - * - * The optional `options` argument can be an integer specifying `mode` (permission - * and sticky bits), or an object with a `mode` property and a `recursive` property indicating whether parent directories should be created. Calling `fsPromises.mkdir()` when `path` is a directory - * that exists results in a - * rejection only when `recursive` is false. - * - * ```js - * import { mkdir } from 'node:fs/promises'; - * - * try { - * const projectFolder = new URL('./test/project/', import.meta.url); - * const createDir = await mkdir(projectFolder, { recursive: true }); - * - * console.log(`created ${createDir}`); - * } catch (err) { - * console.error(err.message); - * } - * ``` - * @since v10.0.0 - * @return Upon success, fulfills with `undefined` if `recursive` is `false`, or the first directory path created if `recursive` is `true`. - */ - function mkdir( - path: PathLike, - options: MakeDirectoryOptions & { - recursive: true; - }, - ): Promise; - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function mkdir( - path: PathLike, - options?: - | Mode - | (MakeDirectoryOptions & { - recursive?: false | undefined; - }) - | null, - ): Promise; - /** - * Asynchronous mkdir(2) - create a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders - * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`. - */ - function mkdir(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise; - /** - * Reads the contents of a directory. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the filenames. If the `encoding` is set to `'buffer'`, the filenames returned - * will be passed as `Buffer` objects. - * - * If `options.withFileTypes` is set to `true`, the returned array will contain `fs.Dirent` objects. - * - * ```js - * import { readdir } from 'node:fs/promises'; - * - * try { - * const files = await readdir(path); - * for (const file of files) - * console.log(file); - * } catch (err) { - * console.error(err); - * } - * ``` - * @since v10.0.0 - * @return Fulfills with an array of the names of the files in the directory excluding `'.'` and `'..'`. - */ - function readdir( - path: PathLike, - options?: - | (ObjectEncodingOptions & { - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - }) - | BufferEncoding - | null, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readdir( - path: PathLike, - options: - | { - encoding: "buffer"; - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - } - | "buffer", - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readdir( - path: PathLike, - options?: - | (ObjectEncodingOptions & { - withFileTypes?: false | undefined; - recursive?: boolean | undefined; - }) - | BufferEncoding - | null, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options If called with `withFileTypes: true` the result data will be an array of Dirent. - */ - function readdir( - path: PathLike, - options: ObjectEncodingOptions & { - withFileTypes: true; - recursive?: boolean | undefined; - }, - ): Promise; - /** - * Asynchronous readdir(3) - read a directory. - * @param path A path to a directory. If a URL is provided, it must use the `file:` protocol. - * @param options Must include `withFileTypes: true` and `encoding: 'buffer'`. - */ - function readdir( - path: PathLike, - options: { - encoding: "buffer"; - withFileTypes: true; - recursive?: boolean | undefined; - }, - ): Promise[]>; - /** - * Reads the contents of the symbolic link referred to by `path`. See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more detail. The promise is - * fulfilled with the`linkString` upon success. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the link path returned. If the `encoding` is set to `'buffer'`, the link path - * returned will be passed as a `Buffer` object. - * @since v10.0.0 - * @return Fulfills with the `linkString` upon success. - */ - function readlink(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readlink(path: PathLike, options: BufferEncodingOption): Promise; - /** - * Asynchronous readlink(2) - read value of a symbolic link. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function readlink( - path: PathLike, - options?: ObjectEncodingOptions | string | null, - ): Promise; - /** - * Creates a symbolic link. - * - * The `type` argument is only used on Windows platforms and can be one of `'dir'`, `'file'`, or `'junction'`. If the `type` argument is not a string, Node.js will - * autodetect `target` type and use `'file'` or `'dir'`. If the `target` does not - * exist, `'file'` will be used. Windows junction points require the destination - * path to be absolute. When using `'junction'`, the `target` argument will - * automatically be normalized to absolute path. Junction points on NTFS volumes - * can only point to directories. - * @since v10.0.0 - * @param [type='null'] - * @return Fulfills with `undefined` upon success. - */ - function symlink(target: PathLike, path: PathLike, type?: string | null): Promise; - /** - * Equivalent to `fsPromises.stat()` unless `path` refers to a symbolic link, - * in which case the link itself is stat-ed, not the file that it refers to. - * Refer to the POSIX [`lstat(2)`](http://man7.org/linux/man-pages/man2/lstat.2.html) document for more detail. - * @since v10.0.0 - * @return Fulfills with the {fs.Stats} object for the given symbolic link `path`. - */ - function lstat( - path: PathLike, - opts?: StatOptions & { - bigint?: false | undefined; - }, - ): Promise; - function lstat( - path: PathLike, - opts: StatOptions & { - bigint: true; - }, - ): Promise; - function lstat(path: PathLike, opts?: StatOptions): Promise; - /** - * @since v10.0.0 - * @return Fulfills with the {fs.Stats} object for the given `path`. - */ - function stat( - path: PathLike, - opts?: StatOptions & { - bigint?: false | undefined; - }, - ): Promise; - function stat( - path: PathLike, - opts: StatOptions & { - bigint: true; - }, - ): Promise; - function stat(path: PathLike, opts?: StatOptions): Promise; - /** - * @since v19.6.0, v18.15.0 - * @return Fulfills with the {fs.StatFs} object for the given `path`. - */ - function statfs( - path: PathLike, - opts?: StatFsOptions & { - bigint?: false | undefined; - }, - ): Promise; - function statfs( - path: PathLike, - opts: StatFsOptions & { - bigint: true; - }, - ): Promise; - function statfs(path: PathLike, opts?: StatFsOptions): Promise; - /** - * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function link(existingPath: PathLike, newPath: PathLike): Promise; - /** - * If `path` refers to a symbolic link, then the link is removed without affecting - * the file or directory to which that link refers. If the `path` refers to a file - * path that is not a symbolic link, the file is deleted. See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more detail. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function unlink(path: PathLike): Promise; - /** - * Changes the permissions of a file. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function chmod(path: PathLike, mode: Mode): Promise; - /** - * Changes the permissions on a symbolic link. - * - * This method is only implemented on macOS. - * @deprecated Since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function lchmod(path: PathLike, mode: Mode): Promise; - /** - * Changes the ownership on a symbolic link. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function lchown(path: PathLike, uid: number, gid: number): Promise; - /** - * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`, with the difference that if the path refers to a - * symbolic link, then the link is not dereferenced: instead, the timestamps of - * the symbolic link itself are changed. - * @since v14.5.0, v12.19.0 - * @return Fulfills with `undefined` upon success. - */ - function lutimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; - /** - * Changes the ownership of a file. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function chown(path: PathLike, uid: number, gid: number): Promise; - /** - * Change the file system timestamps of the object referenced by `path`. - * - * The `atime` and `mtime` arguments follow these rules: - * - * * Values can be either numbers representing Unix epoch time, `Date`s, or a - * numeric string like `'123456789.0'`. - * * If the value can not be converted to a number, or is `NaN`, `Infinity`, or `-Infinity`, an `Error` will be thrown. - * @since v10.0.0 - * @return Fulfills with `undefined` upon success. - */ - function utimes(path: PathLike, atime: TimeLike, mtime: TimeLike): Promise; - /** - * Determines the actual location of `path` using the same semantics as the `fs.realpath.native()` function. - * - * Only paths that can be converted to UTF8 strings are supported. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use for - * the path. If the `encoding` is set to `'buffer'`, the path returned will be - * passed as a `Buffer` object. - * - * On Linux, when Node.js is linked against musl libc, the procfs file system must - * be mounted on `/proc` in order for this function to work. Glibc does not have - * this restriction. - * @since v10.0.0 - * @return Fulfills with the resolved path upon success. - */ - function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function realpath(path: PathLike, options: BufferEncodingOption): Promise; - /** - * Asynchronous realpath(3) - return the canonicalized absolute pathname. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function realpath( - path: PathLike, - options?: ObjectEncodingOptions | BufferEncoding | null, - ): Promise; - /** - * Creates a unique temporary directory. A unique directory name is generated by - * appending six random characters to the end of the provided `prefix`. Due to - * platform inconsistencies, avoid trailing `X` characters in `prefix`. Some - * platforms, notably the BSDs, can return more than six random characters, and - * replace trailing `X` characters in `prefix` with random characters. - * - * The optional `options` argument can be a string specifying an encoding, or an - * object with an `encoding` property specifying the character encoding to use. - * - * ```js - * import { mkdtemp } from 'node:fs/promises'; - * import { join } from 'node:path'; - * import { tmpdir } from 'node:os'; - * - * try { - * await mkdtemp(join(tmpdir(), 'foo-')); - * } catch (err) { - * console.error(err); - * } - * ``` - * - * The `fsPromises.mkdtemp()` method will append the six randomly selected - * characters directly to the `prefix` string. For instance, given a directory `/tmp`, if the intention is to create a temporary directory _within_ `/tmp`, the `prefix` must end with a trailing - * platform-specific path separator - * (`import { sep } from 'node:node:path'`). - * @since v10.0.0 - * @return Fulfills with a string containing the file system path of the newly created temporary directory. - */ - function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function mkdtemp(prefix: string, options: BufferEncodingOption): Promise; - /** - * Asynchronously creates a unique temporary directory. - * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory. - * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used. - */ - function mkdtemp( - prefix: string, - options?: ObjectEncodingOptions | BufferEncoding | null, - ): Promise; - /** - * Asynchronously writes data to a file, replacing the file if it already exists. `data` can be a string, a buffer, an - * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an - * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object. - * - * The `encoding` option is ignored if `data` is a buffer. - * - * If `options` is a string, then it specifies the encoding. - * - * The `mode` option only affects the newly created file. See `fs.open()` for more details. - * - * Any specified `FileHandle` has to support writing. - * - * It is unsafe to use `fsPromises.writeFile()` multiple times on the same file - * without waiting for the promise to be settled. - * - * Similarly to `fsPromises.readFile` \- `fsPromises.writeFile` is a convenience - * method that performs multiple `write` calls internally to write the buffer - * passed to it. For performance sensitive code consider using `fs.createWriteStream()` or `filehandle.createWriteStream()`. - * - * It is possible to use an `AbortSignal` to cancel an `fsPromises.writeFile()`. - * Cancelation is "best effort", and some amount of data is likely still - * to be written. - * - * ```js - * import { writeFile } from 'node:fs/promises'; - * import { Buffer } from 'node:buffer'; - * - * try { - * const controller = new AbortController(); - * const { signal } = controller; - * const data = new Uint8Array(Buffer.from('Hello Node.js')); - * const promise = writeFile('message.txt', data, { signal }); - * - * // Abort the request before the promise settles. - * controller.abort(); - * - * await promise; - * } catch (err) { - * // When a request is aborted - err is an AbortError - * console.error(err); - * } - * ``` - * - * Aborting an ongoing request does not abort individual operating - * system requests but rather the internal buffering `fs.writeFile` performs. - * @since v10.0.0 - * @param file filename or `FileHandle` - * @return Fulfills with `undefined` upon success. - */ - function writeFile( - file: PathLike | FileHandle, - data: - | string - | NodeJS.ArrayBufferView - | Iterable - | AsyncIterable - | Stream, - options?: - | (ObjectEncodingOptions & { - mode?: Mode | undefined; - flag?: OpenMode | undefined; - /** - * If all data is successfully written to the file, and `flush` - * is `true`, `filehandle.sync()` is used to flush the data. - * @default false - */ - flush?: boolean | undefined; - } & Abortable) - | BufferEncoding - | null, - ): Promise; - /** - * Asynchronously append data to a file, creating the file if it does not yet - * exist. `data` can be a string or a `Buffer`. - * - * If `options` is a string, then it specifies the `encoding`. - * - * The `mode` option only affects the newly created file. See `fs.open()` for more details. - * - * The `path` may be specified as a `FileHandle` that has been opened - * for appending (using `fsPromises.open()`). - * @since v10.0.0 - * @param path filename or {FileHandle} - * @return Fulfills with `undefined` upon success. - */ - function appendFile( - path: PathLike | FileHandle, - data: string | Uint8Array, - options?: (ObjectEncodingOptions & FlagAndOpenMode & { flush?: boolean | undefined }) | BufferEncoding | null, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. - * - * If no encoding is specified (using `options.encoding`), the data is returned - * as a `Buffer` object. Otherwise, the data will be a string. - * - * If `options` is a string, then it specifies the encoding. - * - * When the `path` is a directory, the behavior of `fsPromises.readFile()` is - * platform-specific. On macOS, Linux, and Windows, the promise will be rejected - * with an error. On FreeBSD, a representation of the directory's contents will be - * returned. - * - * An example of reading a `package.json` file located in the same directory of the - * running code: - * - * ```js - * import { readFile } from 'node:fs/promises'; - * try { - * const filePath = new URL('./package.json', import.meta.url); - * const contents = await readFile(filePath, { encoding: 'utf8' }); - * console.log(contents); - * } catch (err) { - * console.error(err.message); - * } - * ``` - * - * It is possible to abort an ongoing `readFile` using an `AbortSignal`. If a - * request is aborted the promise returned is rejected with an `AbortError`: - * - * ```js - * import { readFile } from 'node:fs/promises'; - * - * try { - * const controller = new AbortController(); - * const { signal } = controller; - * const promise = readFile(fileName, { signal }); - * - * // Abort the request before the promise settles. - * controller.abort(); - * - * await promise; - * } catch (err) { - * // When a request is aborted - err is an AbortError - * console.error(err); - * } - * ``` - * - * Aborting an ongoing request does not abort individual operating - * system requests but rather the internal buffering `fs.readFile` performs. - * - * Any specified `FileHandle` has to support reading. - * @since v10.0.0 - * @param path filename or `FileHandle` - * @return Fulfills with the contents of the file. - */ - function readFile( - path: PathLike | FileHandle, - options?: - | ({ - encoding?: null | undefined; - flag?: OpenMode | undefined; - } & Abortable) - | null, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. - * @param options An object that may contain an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function readFile( - path: PathLike | FileHandle, - options: - | ({ - encoding: BufferEncoding; - flag?: OpenMode | undefined; - } & Abortable) - | BufferEncoding, - ): Promise; - /** - * Asynchronously reads the entire contents of a file. - * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. - * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically. - * @param options An object that may contain an optional flag. - * If a flag is not provided, it defaults to `'r'`. - */ - function readFile( - path: PathLike | FileHandle, - options?: - | ( - & ObjectEncodingOptions - & Abortable - & { - flag?: OpenMode | undefined; - } - ) - | BufferEncoding - | null, - ): Promise; - /** - * Asynchronously open a directory for iterative scanning. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for more detail. - * - * Creates an `fs.Dir`, which contains all further functions for reading from - * and cleaning up the directory. - * - * The `encoding` option sets the encoding for the `path` while opening the - * directory and subsequent read operations. - * - * Example using async iteration: - * - * ```js - * import { opendir } from 'node:fs/promises'; - * - * try { - * const dir = await opendir('./'); - * for await (const dirent of dir) - * console.log(dirent.name); - * } catch (err) { - * console.error(err); - * } - * ``` - * - * When using the async iterator, the `fs.Dir` object will be automatically - * closed after the iterator exits. - * @since v12.12.0 - * @return Fulfills with an {fs.Dir}. - */ - function opendir(path: PathLike, options?: OpenDirOptions): Promise; - /** - * Returns an async iterator that watches for changes on `filename`, where `filename`is either a file or a directory. - * - * ```js - * import { watch } from 'node:fs/promises'; - * - * const ac = new AbortController(); - * const { signal } = ac; - * setTimeout(() => ac.abort(), 10000); - * - * (async () => { - * try { - * const watcher = watch(__filename, { signal }); - * for await (const event of watcher) - * console.log(event); - * } catch (err) { - * if (err.name === 'AbortError') - * return; - * throw err; - * } - * })(); - * ``` - * - * On most platforms, `'rename'` is emitted whenever a filename appears or - * disappears in the directory. - * - * All the `caveats` for `fs.watch()` also apply to `fsPromises.watch()`. - * @since v15.9.0, v14.18.0 - * @return of objects with the properties: - */ - function watch( - filename: PathLike, - options: - | (WatchOptions & { - encoding: "buffer"; - }) - | "buffer", - ): AsyncIterable>; - /** - * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. - * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `persistent` is not supplied, the default of `true` is used. - * If `recursive` is not supplied, the default of `false` is used. - */ - function watch(filename: PathLike, options?: WatchOptions | BufferEncoding): AsyncIterable>; - /** - * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. - * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. - * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options. - * If `encoding` is not supplied, the default of `'utf8'` is used. - * If `persistent` is not supplied, the default of `true` is used. - * If `recursive` is not supplied, the default of `false` is used. - */ - function watch( - filename: PathLike, - options: WatchOptions | string, - ): AsyncIterable> | AsyncIterable>; - /** - * Asynchronously copies the entire directory structure from `src` to `dest`, - * including subdirectories and files. - * - * When copying a directory to another directory, globs are not supported and - * behavior is similar to `cp dir1/ dir2/`. - * @since v16.7.0 - * @experimental - * @param src source path to copy. - * @param dest destination path to copy to. - * @return Fulfills with `undefined` upon success. - */ - function cp(source: string | URL, destination: string | URL, opts?: CopyOptions): Promise; -} -declare module "node:fs/promises" { - export * from "fs/promises"; -} diff --git a/node_modules/@types/node/globals.d.ts b/node_modules/@types/node/globals.d.ts deleted file mode 100644 index 3bff22a..0000000 --- a/node_modules/@types/node/globals.d.ts +++ /dev/null @@ -1,172 +0,0 @@ -declare var global: typeof globalThis; - -declare var process: NodeJS.Process; -declare var console: Console; - -interface ErrorConstructor { - /** - * Creates a `.stack` property on `targetObject`, which when accessed returns - * a string representing the location in the code at which - * `Error.captureStackTrace()` was called. - * - * ```js - * const myObject = {}; - * Error.captureStackTrace(myObject); - * myObject.stack; // Similar to `new Error().stack` - * ``` - * - * The first line of the trace will be prefixed with - * `${myObject.name}: ${myObject.message}`. - * - * The optional `constructorOpt` argument accepts a function. If given, all frames - * above `constructorOpt`, including `constructorOpt`, will be omitted from the - * generated stack trace. - * - * The `constructorOpt` argument is useful for hiding implementation - * details of error generation from the user. For instance: - * - * ```js - * function a() { - * b(); - * } - * - * function b() { - * c(); - * } - * - * function c() { - * // Create an error without stack trace to avoid calculating the stack trace twice. - * const { stackTraceLimit } = Error; - * Error.stackTraceLimit = 0; - * const error = new Error(); - * Error.stackTraceLimit = stackTraceLimit; - * - * // Capture the stack trace above function b - * Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace - * throw error; - * } - * - * a(); - * ``` - */ - captureStackTrace(targetObject: object, constructorOpt?: Function): void; - /** - * @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces - */ - prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any; - /** - * The `Error.stackTraceLimit` property specifies the number of stack frames - * collected by a stack trace (whether generated by `new Error().stack` or - * `Error.captureStackTrace(obj)`). - * - * The default value is `10` but may be set to any valid JavaScript number. Changes - * will affect any stack trace captured _after_ the value has been changed. - * - * If set to a non-number value, or set to a negative number, stack traces will - * not capture any frames. - */ - stackTraceLimit: number; -} - -/** - * Enable this API with the `--expose-gc` CLI flag. - */ -declare var gc: NodeJS.GCFunction | undefined; - -declare namespace NodeJS { - interface CallSite { - getColumnNumber(): number | null; - getEnclosingColumnNumber(): number | null; - getEnclosingLineNumber(): number | null; - getEvalOrigin(): string | undefined; - getFileName(): string | null; - getFunction(): Function | undefined; - getFunctionName(): string | null; - getLineNumber(): number | null; - getMethodName(): string | null; - getPosition(): number; - getPromiseIndex(): number | null; - getScriptHash(): string; - getScriptNameOrSourceURL(): string | null; - getThis(): unknown; - getTypeName(): string | null; - isAsync(): boolean; - isConstructor(): boolean; - isEval(): boolean; - isNative(): boolean; - isPromiseAll(): boolean; - isToplevel(): boolean; - } - - interface ErrnoException extends Error { - errno?: number | undefined; - code?: string | undefined; - path?: string | undefined; - syscall?: string | undefined; - } - - interface ReadableStream extends EventEmitter { - readable: boolean; - read(size?: number): string | Buffer; - setEncoding(encoding: BufferEncoding): this; - pause(): this; - resume(): this; - isPaused(): boolean; - pipe(destination: T, options?: { end?: boolean | undefined }): T; - unpipe(destination?: WritableStream): this; - unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void; - wrap(oldStream: ReadableStream): this; - [Symbol.asyncIterator](): AsyncIterableIterator; - } - - interface WritableStream extends EventEmitter { - writable: boolean; - write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; - write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean; - end(cb?: () => void): this; - end(data: string | Uint8Array, cb?: () => void): this; - end(str: string, encoding?: BufferEncoding, cb?: () => void): this; - } - - interface ReadWriteStream extends ReadableStream, WritableStream {} - - interface RefCounted { - ref(): this; - unref(): this; - } - - interface Dict { - [key: string]: T | undefined; - } - - interface ReadOnlyDict { - readonly [key: string]: T | undefined; - } - - type PartialOptions = { [K in keyof T]?: T[K] | undefined }; - - interface GCFunction { - (minor?: boolean): void; - (options: NodeJS.GCOptions & { execution: "async" }): Promise; - (options: NodeJS.GCOptions): void; - } - - interface GCOptions { - execution?: "sync" | "async" | undefined; - flavor?: "regular" | "last-resort" | undefined; - type?: "major-snapshot" | "major" | "minor" | undefined; - filename?: string | undefined; - } - - /** An iterable iterator returned by the Node.js API. */ - // Default TReturn/TNext in v20 is `any`, for compatibility with the previously-used IterableIterator. - interface Iterator extends IteratorObject { - [Symbol.iterator](): NodeJS.Iterator; - } - - /** An async iterable iterator returned by the Node.js API. */ - // Default TReturn/TNext in v20 is `any`, for compatibility with the previously-used AsyncIterableIterator. - interface AsyncIterator extends AsyncIteratorObject { - [Symbol.asyncIterator](): NodeJS.AsyncIterator; - } -} diff --git a/node_modules/@types/node/globals.typedarray.d.ts b/node_modules/@types/node/globals.typedarray.d.ts deleted file mode 100644 index 8eafc3b..0000000 --- a/node_modules/@types/node/globals.typedarray.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -export {}; // Make this a module - -declare global { - namespace NodeJS { - type TypedArray = - | Uint8Array - | Uint8ClampedArray - | Uint16Array - | Uint32Array - | Int8Array - | Int16Array - | Int32Array - | BigUint64Array - | BigInt64Array - | Float32Array - | Float64Array; - type ArrayBufferView = - | TypedArray - | DataView; - - // The following aliases are required to allow use of non-shared ArrayBufferViews in @types/node - // while maintaining compatibility with TS <=5.6. - type NonSharedUint8Array = Uint8Array; - type NonSharedUint8ClampedArray = Uint8ClampedArray; - type NonSharedUint16Array = Uint16Array; - type NonSharedUint32Array = Uint32Array; - type NonSharedInt8Array = Int8Array; - type NonSharedInt16Array = Int16Array; - type NonSharedInt32Array = Int32Array; - type NonSharedBigUint64Array = BigUint64Array; - type NonSharedBigInt64Array = BigInt64Array; - type NonSharedFloat32Array = Float32Array; - type NonSharedFloat64Array = Float64Array; - type NonSharedDataView = DataView; - type NonSharedTypedArray = TypedArray; - type NonSharedArrayBufferView = ArrayBufferView; - } -} diff --git a/node_modules/@types/node/http.d.ts b/node_modules/@types/node/http.d.ts deleted file mode 100644 index 125de53..0000000 --- a/node_modules/@types/node/http.d.ts +++ /dev/null @@ -1,2049 +0,0 @@ -/** - * To use the HTTP server and client one must import the `node:http` module. - * - * The HTTP interfaces in Node.js are designed to support many features - * of the protocol which have been traditionally difficult to use. - * In particular, large, possibly chunk-encoded, messages. The interface is - * careful to never buffer entire requests or responses, so the - * user is able to stream data. - * - * HTTP message headers are represented by an object like this: - * - * ```json - * { "content-length": "123", - * "content-type": "text/plain", - * "connection": "keep-alive", - * "host": "example.com", - * "accept": "*" } - * ``` - * - * Keys are lowercased. Values are not modified. - * - * In order to support the full spectrum of possible HTTP applications, the Node.js - * HTTP API is very low-level. It deals with stream handling and message - * parsing only. It parses a message into headers and body but it does not - * parse the actual headers or the body. - * - * See `message.headers` for details on how duplicate headers are handled. - * - * The raw headers as they were received are retained in the `rawHeaders` property, which is an array of `[key, value, key2, value2, ...]`. For - * example, the previous message header object might have a `rawHeaders` list like the following: - * - * ```js - * [ 'ConTent-Length', '123456', - * 'content-LENGTH', '123', - * 'content-type', 'text/plain', - * 'CONNECTION', 'keep-alive', - * 'Host', 'example.com', - * 'accepT', '*' ] - * ``` - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/http.js) - */ -declare module "http" { - import { NonSharedBuffer } from "node:buffer"; - import * as stream from "node:stream"; - import { URL } from "node:url"; - import { LookupOptions } from "node:dns"; - import { EventEmitter } from "node:events"; - import { LookupFunction, Server as NetServer, Socket, TcpSocketConnectOpts } from "node:net"; - // incoming headers will never contain number - interface IncomingHttpHeaders extends NodeJS.Dict { - accept?: string | undefined; - "accept-encoding"?: string | undefined; - "accept-language"?: string | undefined; - "accept-patch"?: string | undefined; - "accept-ranges"?: string | undefined; - "access-control-allow-credentials"?: string | undefined; - "access-control-allow-headers"?: string | undefined; - "access-control-allow-methods"?: string | undefined; - "access-control-allow-origin"?: string | undefined; - "access-control-expose-headers"?: string | undefined; - "access-control-max-age"?: string | undefined; - "access-control-request-headers"?: string | undefined; - "access-control-request-method"?: string | undefined; - age?: string | undefined; - allow?: string | undefined; - "alt-svc"?: string | undefined; - authorization?: string | undefined; - "cache-control"?: string | undefined; - connection?: string | undefined; - "content-disposition"?: string | undefined; - "content-encoding"?: string | undefined; - "content-language"?: string | undefined; - "content-length"?: string | undefined; - "content-location"?: string | undefined; - "content-range"?: string | undefined; - "content-type"?: string | undefined; - cookie?: string | undefined; - date?: string | undefined; - etag?: string | undefined; - expect?: string | undefined; - expires?: string | undefined; - forwarded?: string | undefined; - from?: string | undefined; - host?: string | undefined; - "if-match"?: string | undefined; - "if-modified-since"?: string | undefined; - "if-none-match"?: string | undefined; - "if-unmodified-since"?: string | undefined; - "last-modified"?: string | undefined; - location?: string | undefined; - origin?: string | undefined; - pragma?: string | undefined; - "proxy-authenticate"?: string | undefined; - "proxy-authorization"?: string | undefined; - "public-key-pins"?: string | undefined; - range?: string | undefined; - referer?: string | undefined; - "retry-after"?: string | undefined; - "sec-fetch-site"?: string | undefined; - "sec-fetch-mode"?: string | undefined; - "sec-fetch-user"?: string | undefined; - "sec-fetch-dest"?: string | undefined; - "sec-websocket-accept"?: string | undefined; - "sec-websocket-extensions"?: string | undefined; - "sec-websocket-key"?: string | undefined; - "sec-websocket-protocol"?: string | undefined; - "sec-websocket-version"?: string | undefined; - "set-cookie"?: string[] | undefined; - "strict-transport-security"?: string | undefined; - tk?: string | undefined; - trailer?: string | undefined; - "transfer-encoding"?: string | undefined; - upgrade?: string | undefined; - "user-agent"?: string | undefined; - vary?: string | undefined; - via?: string | undefined; - warning?: string | undefined; - "www-authenticate"?: string | undefined; - } - // outgoing headers allows numbers (as they are converted internally to strings) - type OutgoingHttpHeader = number | string | string[]; - interface OutgoingHttpHeaders extends NodeJS.Dict { - accept?: string | string[] | undefined; - "accept-charset"?: string | string[] | undefined; - "accept-encoding"?: string | string[] | undefined; - "accept-language"?: string | string[] | undefined; - "accept-ranges"?: string | undefined; - "access-control-allow-credentials"?: string | undefined; - "access-control-allow-headers"?: string | undefined; - "access-control-allow-methods"?: string | undefined; - "access-control-allow-origin"?: string | undefined; - "access-control-expose-headers"?: string | undefined; - "access-control-max-age"?: string | undefined; - "access-control-request-headers"?: string | undefined; - "access-control-request-method"?: string | undefined; - age?: string | undefined; - allow?: string | undefined; - authorization?: string | undefined; - "cache-control"?: string | undefined; - "cdn-cache-control"?: string | undefined; - connection?: string | string[] | undefined; - "content-disposition"?: string | undefined; - "content-encoding"?: string | undefined; - "content-language"?: string | undefined; - "content-length"?: string | number | undefined; - "content-location"?: string | undefined; - "content-range"?: string | undefined; - "content-security-policy"?: string | undefined; - "content-security-policy-report-only"?: string | undefined; - cookie?: string | string[] | undefined; - dav?: string | string[] | undefined; - dnt?: string | undefined; - date?: string | undefined; - etag?: string | undefined; - expect?: string | undefined; - expires?: string | undefined; - forwarded?: string | undefined; - from?: string | undefined; - host?: string | undefined; - "if-match"?: string | undefined; - "if-modified-since"?: string | undefined; - "if-none-match"?: string | undefined; - "if-range"?: string | undefined; - "if-unmodified-since"?: string | undefined; - "last-modified"?: string | undefined; - link?: string | string[] | undefined; - location?: string | undefined; - "max-forwards"?: string | undefined; - origin?: string | undefined; - pragma?: string | string[] | undefined; - "proxy-authenticate"?: string | string[] | undefined; - "proxy-authorization"?: string | undefined; - "public-key-pins"?: string | undefined; - "public-key-pins-report-only"?: string | undefined; - range?: string | undefined; - referer?: string | undefined; - "referrer-policy"?: string | undefined; - refresh?: string | undefined; - "retry-after"?: string | undefined; - "sec-websocket-accept"?: string | undefined; - "sec-websocket-extensions"?: string | string[] | undefined; - "sec-websocket-key"?: string | undefined; - "sec-websocket-protocol"?: string | string[] | undefined; - "sec-websocket-version"?: string | undefined; - server?: string | undefined; - "set-cookie"?: string | string[] | undefined; - "strict-transport-security"?: string | undefined; - te?: string | undefined; - trailer?: string | undefined; - "transfer-encoding"?: string | undefined; - "user-agent"?: string | undefined; - upgrade?: string | undefined; - "upgrade-insecure-requests"?: string | undefined; - vary?: string | undefined; - via?: string | string[] | undefined; - warning?: string | undefined; - "www-authenticate"?: string | string[] | undefined; - "x-content-type-options"?: string | undefined; - "x-dns-prefetch-control"?: string | undefined; - "x-frame-options"?: string | undefined; - "x-xss-protection"?: string | undefined; - } - interface ClientRequestArgs extends Pick { - _defaultAgent?: Agent | undefined; - agent?: Agent | boolean | undefined; - auth?: string | null | undefined; - createConnection?: - | (( - options: ClientRequestArgs, - oncreate: (err: Error | null, socket: stream.Duplex) => void, - ) => stream.Duplex | null | undefined) - | undefined; - defaultPort?: number | string | undefined; - family?: number | undefined; - headers?: OutgoingHttpHeaders | readonly string[] | undefined; - host?: string | null | undefined; - hostname?: string | null | undefined; - insecureHTTPParser?: boolean | undefined; - localAddress?: string | undefined; - localPort?: number | undefined; - lookup?: LookupFunction | undefined; - /** - * @default 16384 - */ - maxHeaderSize?: number | undefined; - method?: string | undefined; - path?: string | null | undefined; - port?: number | string | null | undefined; - protocol?: string | null | undefined; - setHost?: boolean | undefined; - signal?: AbortSignal | undefined; - socketPath?: string | undefined; - timeout?: number | undefined; - uniqueHeaders?: Array | undefined; - joinDuplicateHeaders?: boolean | undefined; - } - interface ServerOptions< - Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse> = typeof ServerResponse, - > { - /** - * Specifies the `IncomingMessage` class to be used. Useful for extending the original `IncomingMessage`. - */ - IncomingMessage?: Request | undefined; - /** - * Specifies the `ServerResponse` class to be used. Useful for extending the original `ServerResponse`. - */ - ServerResponse?: Response | undefined; - /** - * Sets the timeout value in milliseconds for receiving the entire request from the client. - * @see Server.requestTimeout for more information. - * @default 300000 - * @since v18.0.0 - */ - requestTimeout?: number | undefined; - /** - * It joins the field line values of multiple headers in a request with `, ` instead of discarding the duplicates. - * @default false - * @since v18.14.0 - */ - joinDuplicateHeaders?: boolean | undefined; - /** - * The number of milliseconds of inactivity a server needs to wait for additional incoming data, - * after it has finished writing the last response, before a socket will be destroyed. - * @see Server.keepAliveTimeout for more information. - * @default 5000 - * @since v18.0.0 - */ - keepAliveTimeout?: number | undefined; - /** - * Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests. - * @default 30000 - */ - connectionsCheckingInterval?: number | undefined; - /** - * Sets the timeout value in milliseconds for receiving the complete HTTP headers from the client. - * See {@link Server.headersTimeout} for more information. - * @default 60000 - * @since 18.0.0 - */ - headersTimeout?: number | undefined; - /** - * Optionally overrides all `socket`s' `readableHighWaterMark` and `writableHighWaterMark`. - * This affects `highWaterMark` property of both `IncomingMessage` and `ServerResponse`. - * Default: @see stream.getDefaultHighWaterMark(). - * @since v20.1.0 - */ - highWaterMark?: number | undefined; - /** - * Use an insecure HTTP parser that accepts invalid HTTP headers when `true`. - * Using the insecure parser should be avoided. - * See --insecure-http-parser for more information. - * @default false - */ - insecureHTTPParser?: boolean | undefined; - /** - * Optionally overrides the value of `--max-http-header-size` for requests received by - * this server, i.e. the maximum length of request headers in bytes. - * @default 16384 - * @since v13.3.0 - */ - maxHeaderSize?: number | undefined; - /** - * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received. - * @default true - * @since v16.5.0 - */ - noDelay?: boolean | undefined; - /** - * If set to `true`, it forces the server to respond with a 400 (Bad Request) status code - * to any HTTP/1.1 request message that lacks a Host header (as mandated by the specification). - * @default true - * @since 20.0.0 - */ - requireHostHeader?: boolean | undefined; - /** - * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received, - * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`. - * @default false - * @since v16.5.0 - */ - keepAlive?: boolean | undefined; - /** - * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket. - * @default 0 - * @since v16.5.0 - */ - keepAliveInitialDelay?: number | undefined; - /** - * A list of response headers that should be sent only once. - * If the header's value is an array, the items will be joined using `; `. - */ - uniqueHeaders?: Array | undefined; - /** - * If set to `true`, an error is thrown when writing to an HTTP response which does not have a body. - * @default false - * @since v18.17.0, v20.2.0 - */ - rejectNonStandardBodyWrites?: boolean | undefined; - } - type RequestListener< - Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse> = typeof ServerResponse, - > = (req: InstanceType, res: InstanceType & { req: InstanceType }) => void; - /** - * @since v0.1.17 - */ - class Server< - Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse> = typeof ServerResponse, - > extends NetServer { - constructor(requestListener?: RequestListener); - constructor(options: ServerOptions, requestListener?: RequestListener); - /** - * Sets the timeout value for sockets, and emits a `'timeout'` event on - * the Server object, passing the socket as an argument, if a timeout - * occurs. - * - * If there is a `'timeout'` event listener on the Server object, then it - * will be called with the timed-out socket as an argument. - * - * By default, the Server does not timeout sockets. However, if a callback - * is assigned to the Server's `'timeout'` event, timeouts must be handled - * explicitly. - * @since v0.9.12 - * @param [msecs=0 (no timeout)] - */ - setTimeout(msecs?: number, callback?: (socket: Socket) => void): this; - setTimeout(callback: (socket: Socket) => void): this; - /** - * Limits maximum incoming headers count. If set to 0, no limit will be applied. - * @since v0.7.0 - */ - maxHeadersCount: number | null; - /** - * The maximum number of requests socket can handle - * before closing keep alive connection. - * - * A value of `0` will disable the limit. - * - * When the limit is reached it will set the `Connection` header value to `close`, - * but will not actually close the connection, subsequent requests sent - * after the limit is reached will get `503 Service Unavailable` as a response. - * @since v16.10.0 - */ - maxRequestsPerSocket: number | null; - /** - * The number of milliseconds of inactivity before a socket is presumed - * to have timed out. - * - * A value of `0` will disable the timeout behavior on incoming connections. - * - * The socket timeout logic is set up on connection, so changing this - * value only affects new connections to the server, not any existing connections. - * @since v0.9.12 - */ - timeout: number; - /** - * Limit the amount of time the parser will wait to receive the complete HTTP - * headers. - * - * If the timeout expires, the server responds with status 408 without - * forwarding the request to the request listener and then closes the connection. - * - * It must be set to a non-zero value (e.g. 120 seconds) to protect against - * potential Denial-of-Service attacks in case the server is deployed without a - * reverse proxy in front. - * @since v11.3.0, v10.14.0 - */ - headersTimeout: number; - /** - * The number of milliseconds of inactivity a server needs to wait for additional - * incoming data, after it has finished writing the last response, before a socket - * will be destroyed. If the server receives new data before the keep-alive - * timeout has fired, it will reset the regular inactivity timeout, i.e., `server.timeout`. - * - * A value of `0` will disable the keep-alive timeout behavior on incoming - * connections. - * A value of `0` makes the http server behave similarly to Node.js versions prior - * to 8.0.0, which did not have a keep-alive timeout. - * - * The socket timeout logic is set up on connection, so changing this value only - * affects new connections to the server, not any existing connections. - * @since v8.0.0 - */ - keepAliveTimeout: number; - /** - * Sets the timeout value in milliseconds for receiving the entire request from - * the client. - * - * If the timeout expires, the server responds with status 408 without - * forwarding the request to the request listener and then closes the connection. - * - * It must be set to a non-zero value (e.g. 120 seconds) to protect against - * potential Denial-of-Service attacks in case the server is deployed without a - * reverse proxy in front. - * @since v14.11.0 - */ - requestTimeout: number; - /** - * Closes all connections connected to this server. - * @since v18.2.0 - */ - closeAllConnections(): void; - /** - * Closes all connections connected to this server which are not sending a request - * or waiting for a response. - * @since v18.2.0 - */ - closeIdleConnections(): void; - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "connection", listener: (socket: Socket) => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "listening", listener: () => void): this; - addListener(event: "checkContinue", listener: RequestListener): this; - addListener(event: "checkExpectation", listener: RequestListener): this; - addListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this; - addListener( - event: "connect", - listener: (req: InstanceType, socket: stream.Duplex, head: NonSharedBuffer) => void, - ): this; - addListener(event: "dropRequest", listener: (req: InstanceType, socket: stream.Duplex) => void): this; - addListener(event: "request", listener: RequestListener): this; - addListener( - event: "upgrade", - listener: (req: InstanceType, socket: stream.Duplex, head: NonSharedBuffer) => void, - ): this; - emit(event: string, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "connection", socket: Socket): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "listening"): boolean; - emit( - event: "checkContinue", - req: InstanceType, - res: InstanceType & { req: InstanceType }, - ): boolean; - emit( - event: "checkExpectation", - req: InstanceType, - res: InstanceType & { req: InstanceType }, - ): boolean; - emit(event: "clientError", err: Error, socket: stream.Duplex): boolean; - emit(event: "connect", req: InstanceType, socket: stream.Duplex, head: NonSharedBuffer): boolean; - emit(event: "dropRequest", req: InstanceType, socket: stream.Duplex): boolean; - emit( - event: "request", - req: InstanceType, - res: InstanceType & { req: InstanceType }, - ): boolean; - emit(event: "upgrade", req: InstanceType, socket: stream.Duplex, head: NonSharedBuffer): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: () => void): this; - on(event: "connection", listener: (socket: Socket) => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "listening", listener: () => void): this; - on(event: "checkContinue", listener: RequestListener): this; - on(event: "checkExpectation", listener: RequestListener): this; - on(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this; - on( - event: "connect", - listener: (req: InstanceType, socket: stream.Duplex, head: NonSharedBuffer) => void, - ): this; - on(event: "dropRequest", listener: (req: InstanceType, socket: stream.Duplex) => void): this; - on(event: "request", listener: RequestListener): this; - on( - event: "upgrade", - listener: (req: InstanceType, socket: stream.Duplex, head: NonSharedBuffer) => void, - ): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "connection", listener: (socket: Socket) => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "listening", listener: () => void): this; - once(event: "checkContinue", listener: RequestListener): this; - once(event: "checkExpectation", listener: RequestListener): this; - once(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this; - once( - event: "connect", - listener: (req: InstanceType, socket: stream.Duplex, head: NonSharedBuffer) => void, - ): this; - once(event: "dropRequest", listener: (req: InstanceType, socket: stream.Duplex) => void): this; - once(event: "request", listener: RequestListener): this; - once( - event: "upgrade", - listener: (req: InstanceType, socket: stream.Duplex, head: NonSharedBuffer) => void, - ): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "connection", listener: (socket: Socket) => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "listening", listener: () => void): this; - prependListener(event: "checkContinue", listener: RequestListener): this; - prependListener(event: "checkExpectation", listener: RequestListener): this; - prependListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this; - prependListener( - event: "connect", - listener: (req: InstanceType, socket: stream.Duplex, head: NonSharedBuffer) => void, - ): this; - prependListener( - event: "dropRequest", - listener: (req: InstanceType, socket: stream.Duplex) => void, - ): this; - prependListener(event: "request", listener: RequestListener): this; - prependListener( - event: "upgrade", - listener: (req: InstanceType, socket: stream.Duplex, head: NonSharedBuffer) => void, - ): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "connection", listener: (socket: Socket) => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "listening", listener: () => void): this; - prependOnceListener(event: "checkContinue", listener: RequestListener): this; - prependOnceListener(event: "checkExpectation", listener: RequestListener): this; - prependOnceListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this; - prependOnceListener( - event: "connect", - listener: (req: InstanceType, socket: stream.Duplex, head: NonSharedBuffer) => void, - ): this; - prependOnceListener( - event: "dropRequest", - listener: (req: InstanceType, socket: stream.Duplex) => void, - ): this; - prependOnceListener(event: "request", listener: RequestListener): this; - prependOnceListener( - event: "upgrade", - listener: (req: InstanceType, socket: stream.Duplex, head: NonSharedBuffer) => void, - ): this; - } - /** - * This class serves as the parent class of {@link ClientRequest} and {@link ServerResponse}. It is an abstract outgoing message from - * the perspective of the participants of an HTTP transaction. - * @since v0.1.17 - */ - class OutgoingMessage extends stream.Writable { - readonly req: Request; - chunkedEncoding: boolean; - shouldKeepAlive: boolean; - useChunkedEncodingByDefault: boolean; - sendDate: boolean; - /** - * @deprecated Use `writableEnded` instead. - */ - finished: boolean; - /** - * Read-only. `true` if the headers were sent, otherwise `false`. - * @since v0.9.3 - */ - readonly headersSent: boolean; - /** - * Alias of `outgoingMessage.socket`. - * @since v0.3.0 - * @deprecated Since v15.12.0,v14.17.1 - Use `socket` instead. - */ - readonly connection: Socket | null; - /** - * Reference to the underlying socket. Usually, users will not want to access - * this property. - * - * After calling `outgoingMessage.end()`, this property will be nulled. - * @since v0.3.0 - */ - readonly socket: Socket | null; - constructor(); - /** - * Once a socket is associated with the message and is connected, `socket.setTimeout()` will be called with `msecs` as the first parameter. - * @since v0.9.12 - * @param callback Optional function to be called when a timeout occurs. Same as binding to the `timeout` event. - */ - setTimeout(msecs: number, callback?: () => void): this; - /** - * Sets a single header value. If the header already exists in the to-be-sent - * headers, its value will be replaced. Use an array of strings to send multiple - * headers with the same name. - * @since v0.4.0 - * @param name Header name - * @param value Header value - */ - setHeader(name: string, value: number | string | readonly string[]): this; - /** - * Sets multiple header values for implicit headers. headers must be an instance of - * `Headers` or `Map`, if a header already exists in the to-be-sent headers, its - * value will be replaced. - * - * ```js - * const headers = new Headers({ foo: 'bar' }); - * outgoingMessage.setHeaders(headers); - * ``` - * - * or - * - * ```js - * const headers = new Map([['foo', 'bar']]); - * outgoingMessage.setHeaders(headers); - * ``` - * - * When headers have been set with `outgoingMessage.setHeaders()`, they will be - * merged with any headers passed to `response.writeHead()`, with the headers passed - * to `response.writeHead()` given precedence. - * - * ```js - * // Returns content-type = text/plain - * const server = http.createServer((req, res) => { - * const headers = new Headers({ 'Content-Type': 'text/html' }); - * res.setHeaders(headers); - * res.writeHead(200, { 'Content-Type': 'text/plain' }); - * res.end('ok'); - * }); - * ``` - * - * @since v19.6.0, v18.15.0 - * @param name Header name - * @param value Header value - */ - setHeaders(headers: Headers | Map): this; - /** - * Append a single header value to the header object. - * - * If the value is an array, this is equivalent to calling this method multiple - * times. - * - * If there were no previous values for the header, this is equivalent to calling `outgoingMessage.setHeader(name, value)`. - * - * Depending of the value of `options.uniqueHeaders` when the client request or the - * server were created, this will end up in the header being sent multiple times or - * a single time with values joined using `; `. - * @since v18.3.0, v16.17.0 - * @param name Header name - * @param value Header value - */ - appendHeader(name: string, value: string | readonly string[]): this; - /** - * Gets the value of the HTTP header with the given name. If that header is not - * set, the returned value will be `undefined`. - * @since v0.4.0 - * @param name Name of header - */ - getHeader(name: string): number | string | string[] | undefined; - /** - * Returns a shallow copy of the current outgoing headers. Since a shallow - * copy is used, array values may be mutated without additional calls to - * various header-related HTTP module methods. The keys of the returned - * object are the header names and the values are the respective header - * values. All header names are lowercase. - * - * The object returned by the `outgoingMessage.getHeaders()` method does - * not prototypically inherit from the JavaScript `Object`. This means that - * typical `Object` methods such as `obj.toString()`, `obj.hasOwnProperty()`, - * and others are not defined and will not work. - * - * ```js - * outgoingMessage.setHeader('Foo', 'bar'); - * outgoingMessage.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); - * - * const headers = outgoingMessage.getHeaders(); - * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] } - * ``` - * @since v7.7.0 - */ - getHeaders(): OutgoingHttpHeaders; - /** - * Returns an array containing the unique names of the current outgoing headers. - * All names are lowercase. - * @since v7.7.0 - */ - getHeaderNames(): string[]; - /** - * Returns `true` if the header identified by `name` is currently set in the - * outgoing headers. The header name is case-insensitive. - * - * ```js - * const hasContentType = outgoingMessage.hasHeader('content-type'); - * ``` - * @since v7.7.0 - */ - hasHeader(name: string): boolean; - /** - * Removes a header that is queued for implicit sending. - * - * ```js - * outgoingMessage.removeHeader('Content-Encoding'); - * ``` - * @since v0.4.0 - * @param name Header name - */ - removeHeader(name: string): void; - /** - * Adds HTTP trailers (headers but at the end of the message) to the message. - * - * Trailers will **only** be emitted if the message is chunked encoded. If not, - * the trailers will be silently discarded. - * - * HTTP requires the `Trailer` header to be sent to emit trailers, - * with a list of header field names in its value, e.g. - * - * ```js - * message.writeHead(200, { 'Content-Type': 'text/plain', - * 'Trailer': 'Content-MD5' }); - * message.write(fileData); - * message.addTrailers({ 'Content-MD5': '7895bf4b8828b55ceaf47747b4bca667' }); - * message.end(); - * ``` - * - * Attempting to set a header field name or value that contains invalid characters - * will result in a `TypeError` being thrown. - * @since v0.3.0 - */ - addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void; - /** - * Flushes the message headers. - * - * For efficiency reason, Node.js normally buffers the message headers - * until `outgoingMessage.end()` is called or the first chunk of message data - * is written. It then tries to pack the headers and data into a single TCP - * packet. - * - * It is usually desired (it saves a TCP round-trip), but not when the first - * data is not sent until possibly much later. `outgoingMessage.flushHeaders()` bypasses the optimization and kickstarts the message. - * @since v1.6.0 - */ - flushHeaders(): void; - } - /** - * This object is created internally by an HTTP server, not by the user. It is - * passed as the second parameter to the `'request'` event. - * @since v0.1.17 - */ - class ServerResponse extends OutgoingMessage { - /** - * When using implicit headers (not calling `response.writeHead()` explicitly), - * this property controls the status code that will be sent to the client when - * the headers get flushed. - * - * ```js - * response.statusCode = 404; - * ``` - * - * After response header was sent to the client, this property indicates the - * status code which was sent out. - * @since v0.4.0 - */ - statusCode: number; - /** - * When using implicit headers (not calling `response.writeHead()` explicitly), - * this property controls the status message that will be sent to the client when - * the headers get flushed. If this is left as `undefined` then the standard - * message for the status code will be used. - * - * ```js - * response.statusMessage = 'Not found'; - * ``` - * - * After response header was sent to the client, this property indicates the - * status message which was sent out. - * @since v0.11.8 - */ - statusMessage: string; - /** - * If set to `true`, Node.js will check whether the `Content-Length` header value and the size of the body, in bytes, are equal. - * Mismatching the `Content-Length` header value will result - * in an `Error` being thrown, identified by `code:``'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`. - * @since v18.10.0, v16.18.0 - */ - strictContentLength: boolean; - constructor(req: Request); - assignSocket(socket: Socket): void; - detachSocket(socket: Socket): void; - /** - * Sends an HTTP/1.1 100 Continue message to the client, indicating that - * the request body should be sent. See the `'checkContinue'` event on `Server`. - * @since v0.3.0 - */ - writeContinue(callback?: () => void): void; - /** - * Sends an HTTP/1.1 103 Early Hints message to the client with a Link header, - * indicating that the user agent can preload/preconnect the linked resources. - * The `hints` is an object containing the values of headers to be sent with - * early hints message. The optional `callback` argument will be called when - * the response message has been written. - * - * **Example** - * - * ```js - * const earlyHintsLink = '; rel=preload; as=style'; - * response.writeEarlyHints({ - * 'link': earlyHintsLink, - * }); - * - * const earlyHintsLinks = [ - * '; rel=preload; as=style', - * '; rel=preload; as=script', - * ]; - * response.writeEarlyHints({ - * 'link': earlyHintsLinks, - * 'x-trace-id': 'id for diagnostics', - * }); - * - * const earlyHintsCallback = () => console.log('early hints message sent'); - * response.writeEarlyHints({ - * 'link': earlyHintsLinks, - * }, earlyHintsCallback); - * ``` - * @since v18.11.0 - * @param hints An object containing the values of headers - * @param callback Will be called when the response message has been written - */ - writeEarlyHints(hints: Record, callback?: () => void): void; - /** - * Sends a response header to the request. The status code is a 3-digit HTTP - * status code, like `404`. The last argument, `headers`, are the response headers. - * Optionally one can give a human-readable `statusMessage` as the second - * argument. - * - * `headers` may be an `Array` where the keys and values are in the same list. - * It is _not_ a list of tuples. So, the even-numbered offsets are key values, - * and the odd-numbered offsets are the associated values. The array is in the same - * format as `request.rawHeaders`. - * - * Returns a reference to the `ServerResponse`, so that calls can be chained. - * - * ```js - * const body = 'hello world'; - * response - * .writeHead(200, { - * 'Content-Length': Buffer.byteLength(body), - * 'Content-Type': 'text/plain', - * }) - * .end(body); - * ``` - * - * This method must only be called once on a message and it must - * be called before `response.end()` is called. - * - * If `response.write()` or `response.end()` are called before calling - * this, the implicit/mutable headers will be calculated and call this function. - * - * When headers have been set with `response.setHeader()`, they will be merged - * with any headers passed to `response.writeHead()`, with the headers passed - * to `response.writeHead()` given precedence. - * - * If this method is called and `response.setHeader()` has not been called, - * it will directly write the supplied header values onto the network channel - * without caching internally, and the `response.getHeader()` on the header - * will not yield the expected result. If progressive population of headers is - * desired with potential future retrieval and modification, use `response.setHeader()` instead. - * - * ```js - * // Returns content-type = text/plain - * const server = http.createServer((req, res) => { - * res.setHeader('Content-Type', 'text/html'); - * res.setHeader('X-Foo', 'bar'); - * res.writeHead(200, { 'Content-Type': 'text/plain' }); - * res.end('ok'); - * }); - * ``` - * - * `Content-Length` is read in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. Node.js - * will check whether `Content-Length` and the length of the body which has - * been transmitted are equal or not. - * - * Attempting to set a header field name or value that contains invalid characters - * will result in a `Error` being thrown. - * @since v0.1.30 - */ - writeHead( - statusCode: number, - statusMessage?: string, - headers?: OutgoingHttpHeaders | OutgoingHttpHeader[], - ): this; - writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this; - /** - * Sends a HTTP/1.1 102 Processing message to the client, indicating that - * the request body should be sent. - * @since v10.0.0 - */ - writeProcessing(callback?: () => void): void; - } - interface InformationEvent { - statusCode: number; - statusMessage: string; - httpVersion: string; - httpVersionMajor: number; - httpVersionMinor: number; - headers: IncomingHttpHeaders; - rawHeaders: string[]; - } - /** - * This object is created internally and returned from {@link request}. It - * represents an _in-progress_ request whose header has already been queued. The - * header is still mutable using the `setHeader(name, value)`, `getHeader(name)`, `removeHeader(name)` API. The actual header will - * be sent along with the first data chunk or when calling `request.end()`. - * - * To get the response, add a listener for `'response'` to the request object. `'response'` will be emitted from the request object when the response - * headers have been received. The `'response'` event is executed with one - * argument which is an instance of {@link IncomingMessage}. - * - * During the `'response'` event, one can add listeners to the - * response object; particularly to listen for the `'data'` event. - * - * If no `'response'` handler is added, then the response will be - * entirely discarded. However, if a `'response'` event handler is added, - * then the data from the response object **must** be consumed, either by - * calling `response.read()` whenever there is a `'readable'` event, or - * by adding a `'data'` handler, or by calling the `.resume()` method. - * Until the data is consumed, the `'end'` event will not fire. Also, until - * the data is read it will consume memory that can eventually lead to a - * 'process out of memory' error. - * - * For backward compatibility, `res` will only emit `'error'` if there is an `'error'` listener registered. - * - * Set `Content-Length` header to limit the response body size. - * If `response.strictContentLength` is set to `true`, mismatching the `Content-Length` header value will result in an `Error` being thrown, - * identified by `code:``'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`. - * - * `Content-Length` value should be in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. - * @since v0.1.17 - */ - class ClientRequest extends OutgoingMessage { - /** - * The `request.aborted` property will be `true` if the request has - * been aborted. - * @since v0.11.14 - * @deprecated Since v17.0.0, v16.12.0 - Check `destroyed` instead. - */ - aborted: boolean; - /** - * The request host. - * @since v14.5.0, v12.19.0 - */ - host: string; - /** - * The request protocol. - * @since v14.5.0, v12.19.0 - */ - protocol: string; - /** - * When sending request through a keep-alive enabled agent, the underlying socket - * might be reused. But if server closes connection at unfortunate time, client - * may run into a 'ECONNRESET' error. - * - * ```js - * import http from 'node:http'; - * - * // Server has a 5 seconds keep-alive timeout by default - * http - * .createServer((req, res) => { - * res.write('hello\n'); - * res.end(); - * }) - * .listen(3000); - * - * setInterval(() => { - * // Adapting a keep-alive agent - * http.get('http://localhost:3000', { agent }, (res) => { - * res.on('data', (data) => { - * // Do nothing - * }); - * }); - * }, 5000); // Sending request on 5s interval so it's easy to hit idle timeout - * ``` - * - * By marking a request whether it reused socket or not, we can do - * automatic error retry base on it. - * - * ```js - * import http from 'node:http'; - * const agent = new http.Agent({ keepAlive: true }); - * - * function retriableRequest() { - * const req = http - * .get('http://localhost:3000', { agent }, (res) => { - * // ... - * }) - * .on('error', (err) => { - * // Check if retry is needed - * if (req.reusedSocket && err.code === 'ECONNRESET') { - * retriableRequest(); - * } - * }); - * } - * - * retriableRequest(); - * ``` - * @since v13.0.0, v12.16.0 - */ - reusedSocket: boolean; - /** - * Limits maximum response headers count. If set to 0, no limit will be applied. - */ - maxHeadersCount: number; - constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void); - /** - * The request method. - * @since v0.1.97 - */ - method: string; - /** - * The request path. - * @since v0.4.0 - */ - path: string; - /** - * Marks the request as aborting. Calling this will cause remaining data - * in the response to be dropped and the socket to be destroyed. - * @since v0.3.8 - * @deprecated Since v14.1.0,v13.14.0 - Use `destroy` instead. - */ - abort(): void; - onSocket(socket: Socket): void; - /** - * Once a socket is assigned to this request and is connected `socket.setTimeout()` will be called. - * @since v0.5.9 - * @param timeout Milliseconds before a request times out. - * @param callback Optional function to be called when a timeout occurs. Same as binding to the `'timeout'` event. - */ - setTimeout(timeout: number, callback?: () => void): this; - /** - * Once a socket is assigned to this request and is connected `socket.setNoDelay()` will be called. - * @since v0.5.9 - */ - setNoDelay(noDelay?: boolean): void; - /** - * Once a socket is assigned to this request and is connected `socket.setKeepAlive()` will be called. - * @since v0.5.9 - */ - setSocketKeepAlive(enable?: boolean, initialDelay?: number): void; - /** - * Returns an array containing the unique names of the current outgoing raw - * headers. Header names are returned with their exact casing being set. - * - * ```js - * request.setHeader('Foo', 'bar'); - * request.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); - * - * const headerNames = request.getRawHeaderNames(); - * // headerNames === ['Foo', 'Set-Cookie'] - * ``` - * @since v15.13.0, v14.17.0 - */ - getRawHeaderNames(): string[]; - /** - * @deprecated - */ - addListener(event: "abort", listener: () => void): this; - addListener( - event: "connect", - listener: (response: IncomingMessage, socket: Socket, head: NonSharedBuffer) => void, - ): this; - addListener(event: "continue", listener: () => void): this; - addListener(event: "information", listener: (info: InformationEvent) => void): this; - addListener(event: "response", listener: (response: IncomingMessage) => void): this; - addListener(event: "socket", listener: (socket: Socket) => void): this; - addListener(event: "timeout", listener: () => void): this; - addListener( - event: "upgrade", - listener: (response: IncomingMessage, socket: Socket, head: NonSharedBuffer) => void, - ): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "finish", listener: () => void): this; - addListener(event: "pipe", listener: (src: stream.Readable) => void): this; - addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - /** - * @deprecated - */ - on(event: "abort", listener: () => void): this; - on( - event: "connect", - listener: (response: IncomingMessage, socket: Socket, head: NonSharedBuffer) => void, - ): this; - on(event: "continue", listener: () => void): this; - on(event: "information", listener: (info: InformationEvent) => void): this; - on(event: "response", listener: (response: IncomingMessage) => void): this; - on(event: "socket", listener: (socket: Socket) => void): this; - on(event: "timeout", listener: () => void): this; - on( - event: "upgrade", - listener: (response: IncomingMessage, socket: Socket, head: NonSharedBuffer) => void, - ): this; - on(event: "close", listener: () => void): this; - on(event: "drain", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "finish", listener: () => void): this; - on(event: "pipe", listener: (src: stream.Readable) => void): this; - on(event: "unpipe", listener: (src: stream.Readable) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - /** - * @deprecated - */ - once(event: "abort", listener: () => void): this; - once( - event: "connect", - listener: (response: IncomingMessage, socket: Socket, head: NonSharedBuffer) => void, - ): this; - once(event: "continue", listener: () => void): this; - once(event: "information", listener: (info: InformationEvent) => void): this; - once(event: "response", listener: (response: IncomingMessage) => void): this; - once(event: "socket", listener: (socket: Socket) => void): this; - once(event: "timeout", listener: () => void): this; - once( - event: "upgrade", - listener: (response: IncomingMessage, socket: Socket, head: NonSharedBuffer) => void, - ): this; - once(event: "close", listener: () => void): this; - once(event: "drain", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "finish", listener: () => void): this; - once(event: "pipe", listener: (src: stream.Readable) => void): this; - once(event: "unpipe", listener: (src: stream.Readable) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - /** - * @deprecated - */ - prependListener(event: "abort", listener: () => void): this; - prependListener( - event: "connect", - listener: (response: IncomingMessage, socket: Socket, head: NonSharedBuffer) => void, - ): this; - prependListener(event: "continue", listener: () => void): this; - prependListener(event: "information", listener: (info: InformationEvent) => void): this; - prependListener(event: "response", listener: (response: IncomingMessage) => void): this; - prependListener(event: "socket", listener: (socket: Socket) => void): this; - prependListener(event: "timeout", listener: () => void): this; - prependListener( - event: "upgrade", - listener: (response: IncomingMessage, socket: Socket, head: NonSharedBuffer) => void, - ): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "finish", listener: () => void): this; - prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; - prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - /** - * @deprecated - */ - prependOnceListener(event: "abort", listener: () => void): this; - prependOnceListener( - event: "connect", - listener: (response: IncomingMessage, socket: Socket, head: NonSharedBuffer) => void, - ): this; - prependOnceListener(event: "continue", listener: () => void): this; - prependOnceListener(event: "information", listener: (info: InformationEvent) => void): this; - prependOnceListener(event: "response", listener: (response: IncomingMessage) => void): this; - prependOnceListener(event: "socket", listener: (socket: Socket) => void): this; - prependOnceListener(event: "timeout", listener: () => void): this; - prependOnceListener( - event: "upgrade", - listener: (response: IncomingMessage, socket: Socket, head: NonSharedBuffer) => void, - ): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "finish", listener: () => void): this; - prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; - prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - /** - * An `IncomingMessage` object is created by {@link Server} or {@link ClientRequest} and passed as the first argument to the `'request'` and `'response'` event respectively. It may be used to - * access response - * status, headers, and data. - * - * Different from its `socket` value which is a subclass of `stream.Duplex`, the `IncomingMessage` itself extends `stream.Readable` and is created separately to - * parse and emit the incoming HTTP headers and payload, as the underlying socket - * may be reused multiple times in case of keep-alive. - * @since v0.1.17 - */ - class IncomingMessage extends stream.Readable { - constructor(socket: Socket); - /** - * The `message.aborted` property will be `true` if the request has - * been aborted. - * @since v10.1.0 - * @deprecated Since v17.0.0,v16.12.0 - Check `message.destroyed` from stream.Readable. - */ - aborted: boolean; - /** - * In case of server request, the HTTP version sent by the client. In the case of - * client response, the HTTP version of the connected-to server. - * Probably either `'1.1'` or `'1.0'`. - * - * Also `message.httpVersionMajor` is the first integer and `message.httpVersionMinor` is the second. - * @since v0.1.1 - */ - httpVersion: string; - httpVersionMajor: number; - httpVersionMinor: number; - /** - * The `message.complete` property will be `true` if a complete HTTP message has - * been received and successfully parsed. - * - * This property is particularly useful as a means of determining if a client or - * server fully transmitted a message before a connection was terminated: - * - * ```js - * const req = http.request({ - * host: '127.0.0.1', - * port: 8080, - * method: 'POST', - * }, (res) => { - * res.resume(); - * res.on('end', () => { - * if (!res.complete) - * console.error( - * 'The connection was terminated while the message was still being sent'); - * }); - * }); - * ``` - * @since v0.3.0 - */ - complete: boolean; - /** - * Alias for `message.socket`. - * @since v0.1.90 - * @deprecated Since v16.0.0 - Use `socket`. - */ - connection: Socket; - /** - * The `net.Socket` object associated with the connection. - * - * With HTTPS support, use `request.socket.getPeerCertificate()` to obtain the - * client's authentication details. - * - * This property is guaranteed to be an instance of the `net.Socket` class, - * a subclass of `stream.Duplex`, unless the user specified a socket - * type other than `net.Socket` or internally nulled. - * @since v0.3.0 - */ - socket: Socket; - /** - * The request/response headers object. - * - * Key-value pairs of header names and values. Header names are lower-cased. - * - * ```js - * // Prints something like: - * // - * // { 'user-agent': 'curl/7.22.0', - * // host: '127.0.0.1:8000', - * // accept: '*' } - * console.log(request.headers); - * ``` - * - * Duplicates in raw headers are handled in the following ways, depending on the - * header name: - * - * * Duplicates of `age`, `authorization`, `content-length`, `content-type`, `etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`, `last-modified`, `location`, - * `max-forwards`, `proxy-authorization`, `referer`, `retry-after`, `server`, or `user-agent` are discarded. - * To allow duplicate values of the headers listed above to be joined, - * use the option `joinDuplicateHeaders` in {@link request} and {@link createServer}. See RFC 9110 Section 5.3 for more - * information. - * * `set-cookie` is always an array. Duplicates are added to the array. - * * For duplicate `cookie` headers, the values are joined together with `; `. - * * For all other headers, the values are joined together with `, `. - * @since v0.1.5 - */ - headers: IncomingHttpHeaders; - /** - * Similar to `message.headers`, but there is no join logic and the values are - * always arrays of strings, even for headers received just once. - * - * ```js - * // Prints something like: - * // - * // { 'user-agent': ['curl/7.22.0'], - * // host: ['127.0.0.1:8000'], - * // accept: ['*'] } - * console.log(request.headersDistinct); - * ``` - * @since v18.3.0, v16.17.0 - */ - headersDistinct: NodeJS.Dict; - /** - * The raw request/response headers list exactly as they were received. - * - * The keys and values are in the same list. It is _not_ a - * list of tuples. So, the even-numbered offsets are key values, and the - * odd-numbered offsets are the associated values. - * - * Header names are not lowercased, and duplicates are not merged. - * - * ```js - * // Prints something like: - * // - * // [ 'user-agent', - * // 'this is invalid because there can be only one', - * // 'User-Agent', - * // 'curl/7.22.0', - * // 'Host', - * // '127.0.0.1:8000', - * // 'ACCEPT', - * // '*' ] - * console.log(request.rawHeaders); - * ``` - * @since v0.11.6 - */ - rawHeaders: string[]; - /** - * The request/response trailers object. Only populated at the `'end'` event. - * @since v0.3.0 - */ - trailers: NodeJS.Dict; - /** - * Similar to `message.trailers`, but there is no join logic and the values are - * always arrays of strings, even for headers received just once. - * Only populated at the `'end'` event. - * @since v18.3.0, v16.17.0 - */ - trailersDistinct: NodeJS.Dict; - /** - * The raw request/response trailer keys and values exactly as they were - * received. Only populated at the `'end'` event. - * @since v0.11.6 - */ - rawTrailers: string[]; - /** - * Calls `message.socket.setTimeout(msecs, callback)`. - * @since v0.5.9 - */ - setTimeout(msecs: number, callback?: () => void): this; - /** - * **Only valid for request obtained from {@link Server}.** - * - * The request method as a string. Read only. Examples: `'GET'`, `'DELETE'`. - * @since v0.1.1 - */ - method?: string | undefined; - /** - * **Only valid for request obtained from {@link Server}.** - * - * Request URL string. This contains only the URL that is present in the actual - * HTTP request. Take the following request: - * - * ```http - * GET /status?name=ryan HTTP/1.1 - * Accept: text/plain - * ``` - * - * To parse the URL into its parts: - * - * ```js - * new URL(`http://${process.env.HOST ?? 'localhost'}${request.url}`); - * ``` - * - * When `request.url` is `'/status?name=ryan'` and `process.env.HOST` is undefined: - * - * ```console - * $ node - * > new URL(`http://${process.env.HOST ?? 'localhost'}${request.url}`); - * URL { - * href: 'http://localhost/status?name=ryan', - * origin: 'http://localhost', - * protocol: 'http:', - * username: '', - * password: '', - * host: 'localhost', - * hostname: 'localhost', - * port: '', - * pathname: '/status', - * search: '?name=ryan', - * searchParams: URLSearchParams { 'name' => 'ryan' }, - * hash: '' - * } - * ``` - * - * Ensure that you set `process.env.HOST` to the server's host name, or consider replacing this part entirely. If using `req.headers.host`, ensure proper - * validation is used, as clients may specify a custom `Host` header. - * @since v0.1.90 - */ - url?: string | undefined; - /** - * **Only valid for response obtained from {@link ClientRequest}.** - * - * The 3-digit HTTP response status code. E.G. `404`. - * @since v0.1.1 - */ - statusCode?: number | undefined; - /** - * **Only valid for response obtained from {@link ClientRequest}.** - * - * The HTTP response status message (reason phrase). E.G. `OK` or `Internal Server Error`. - * @since v0.11.10 - */ - statusMessage?: string | undefined; - /** - * Calls `destroy()` on the socket that received the `IncomingMessage`. If `error` is provided, an `'error'` event is emitted on the socket and `error` is passed - * as an argument to any listeners on the event. - * @since v0.3.0 - */ - destroy(error?: Error): this; - } - interface AgentOptions extends NodeJS.PartialOptions { - /** - * Keep sockets around in a pool to be used by other requests in the future. Default = false - */ - keepAlive?: boolean | undefined; - /** - * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. - * Only relevant if keepAlive is set to true. - */ - keepAliveMsecs?: number | undefined; - /** - * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity - */ - maxSockets?: number | undefined; - /** - * Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity. - */ - maxTotalSockets?: number | undefined; - /** - * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256. - */ - maxFreeSockets?: number | undefined; - /** - * Socket timeout in milliseconds. This will set the timeout after the socket is connected. - */ - timeout?: number | undefined; - /** - * Scheduling strategy to apply when picking the next free socket to use. - * @default `lifo` - */ - scheduling?: "fifo" | "lifo" | undefined; - } - /** - * An `Agent` is responsible for managing connection persistence - * and reuse for HTTP clients. It maintains a queue of pending requests - * for a given host and port, reusing a single socket connection for each - * until the queue is empty, at which time the socket is either destroyed - * or put into a pool where it is kept to be used again for requests to the - * same host and port. Whether it is destroyed or pooled depends on the `keepAlive` `option`. - * - * Pooled connections have TCP Keep-Alive enabled for them, but servers may - * still close idle connections, in which case they will be removed from the - * pool and a new connection will be made when a new HTTP request is made for - * that host and port. Servers may also refuse to allow multiple requests - * over the same connection, in which case the connection will have to be - * remade for every request and cannot be pooled. The `Agent` will still make - * the requests to that server, but each one will occur over a new connection. - * - * When a connection is closed by the client or the server, it is removed - * from the pool. Any unused sockets in the pool will be unrefed so as not - * to keep the Node.js process running when there are no outstanding requests. - * (see `socket.unref()`). - * - * It is good practice, to `destroy()` an `Agent` instance when it is no - * longer in use, because unused sockets consume OS resources. - * - * Sockets are removed from an agent when the socket emits either - * a `'close'` event or an `'agentRemove'` event. When intending to keep one - * HTTP request open for a long time without keeping it in the agent, something - * like the following may be done: - * - * ```js - * http.get(options, (res) => { - * // Do stuff - * }).on('socket', (socket) => { - * socket.emit('agentRemove'); - * }); - * ``` - * - * An agent may also be used for an individual request. By providing `{agent: false}` as an option to the `http.get()` or `http.request()` functions, a one-time use `Agent` with default options - * will be used - * for the client connection. - * - * `agent:false`: - * - * ```js - * http.get({ - * hostname: 'localhost', - * port: 80, - * path: '/', - * agent: false, // Create a new agent just for this one request - * }, (res) => { - * // Do stuff with response - * }); - * ``` - * - * `options` in [`socket.connect()`](https://nodejs.org/docs/latest-v20.x/api/net.html#socketconnectoptions-connectlistener) are also supported. - * - * To configure any of them, a custom {@link Agent} instance must be created. - * - * ```js - * import http from 'node:http'; - * const keepAliveAgent = new http.Agent({ keepAlive: true }); - * options.agent = keepAliveAgent; - * http.request(options, onResponseCallback) - * ``` - * @since v0.3.4 - */ - class Agent extends EventEmitter { - /** - * By default set to 256. For agents with `keepAlive` enabled, this - * sets the maximum number of sockets that will be left open in the free - * state. - * @since v0.11.7 - */ - maxFreeSockets: number; - /** - * By default set to `Infinity`. Determines how many concurrent sockets the agent - * can have open per origin. Origin is the returned value of `agent.getName()`. - * @since v0.3.6 - */ - maxSockets: number; - /** - * By default set to `Infinity`. Determines how many concurrent sockets the agent - * can have open. Unlike `maxSockets`, this parameter applies across all origins. - * @since v14.5.0, v12.19.0 - */ - maxTotalSockets: number; - /** - * An object which contains arrays of sockets currently awaiting use by - * the agent when `keepAlive` is enabled. Do not modify. - * - * Sockets in the `freeSockets` list will be automatically destroyed and - * removed from the array on `'timeout'`. - * @since v0.11.4 - */ - readonly freeSockets: NodeJS.ReadOnlyDict; - /** - * An object which contains arrays of sockets currently in use by the - * agent. Do not modify. - * @since v0.3.6 - */ - readonly sockets: NodeJS.ReadOnlyDict; - /** - * An object which contains queues of requests that have not yet been assigned to - * sockets. Do not modify. - * @since v0.5.9 - */ - readonly requests: NodeJS.ReadOnlyDict; - constructor(opts?: AgentOptions); - /** - * Destroy any sockets that are currently in use by the agent. - * - * It is usually not necessary to do this. However, if using an - * agent with `keepAlive` enabled, then it is best to explicitly shut down - * the agent when it is no longer needed. Otherwise, - * sockets might stay open for quite a long time before the server - * terminates them. - * @since v0.11.4 - */ - destroy(): void; - /** - * Produces a socket/stream to be used for HTTP requests. - * - * By default, this function is the same as `net.createConnection()`. However, - * custom agents may override this method in case greater flexibility is desired. - * - * A socket/stream can be supplied in one of two ways: by returning the - * socket/stream from this function, or by passing the socket/stream to `callback`. - * - * This method is guaranteed to return an instance of the `net.Socket` class, - * a subclass of `stream.Duplex`, unless the user specifies a socket - * type other than `net.Socket`. - * - * `callback` has a signature of `(err, stream)`. - * @since v0.11.4 - * @param options Options containing connection details. Check `createConnection` for the format of the options - * @param callback Callback function that receives the created socket - */ - createConnection( - options: ClientRequestArgs, - callback?: (err: Error | null, stream: stream.Duplex) => void, - ): stream.Duplex | null | undefined; - /** - * Called when `socket` is detached from a request and could be persisted by the`Agent`. Default behavior is to: - * - * ```js - * socket.setKeepAlive(true, this.keepAliveMsecs); - * socket.unref(); - * return true; - * ``` - * - * This method can be overridden by a particular `Agent` subclass. If this - * method returns a falsy value, the socket will be destroyed instead of persisting - * it for use with the next request. - * - * The `socket` argument can be an instance of `net.Socket`, a subclass of `stream.Duplex`. - * @since v8.1.0 - */ - keepSocketAlive(socket: stream.Duplex): void; - /** - * Called when `socket` is attached to `request` after being persisted because of - * the keep-alive options. Default behavior is to: - * - * ```js - * socket.ref(); - * ``` - * - * This method can be overridden by a particular `Agent` subclass. - * - * The `socket` argument can be an instance of `net.Socket`, a subclass of `stream.Duplex`. - * @since v8.1.0 - */ - reuseSocket(socket: stream.Duplex, request: ClientRequest): void; - /** - * Get a unique name for a set of request options, to determine whether a - * connection can be reused. For an HTTP agent, this returns`host:port:localAddress` or `host:port:localAddress:family`. For an HTTPS agent, - * the name includes the CA, cert, ciphers, and other HTTPS/TLS-specific options - * that determine socket reusability. - * @since v0.11.4 - * @param options A set of options providing information for name generation - */ - getName(options?: ClientRequestArgs): string; - } - const METHODS: string[]; - const STATUS_CODES: { - [errorCode: number]: string | undefined; - [errorCode: string]: string | undefined; - }; - /** - * Returns a new instance of {@link Server}. - * - * The `requestListener` is a function which is automatically - * added to the `'request'` event. - * - * ```js - * import http from 'node:http'; - * - * // Create a local server to receive data from - * const server = http.createServer((req, res) => { - * res.writeHead(200, { 'Content-Type': 'application/json' }); - * res.end(JSON.stringify({ - * data: 'Hello World!', - * })); - * }); - * - * server.listen(8000); - * ``` - * - * ```js - * import http from 'node:http'; - * - * // Create a local server to receive data from - * const server = http.createServer(); - * - * // Listen to the request event - * server.on('request', (request, res) => { - * res.writeHead(200, { 'Content-Type': 'application/json' }); - * res.end(JSON.stringify({ - * data: 'Hello World!', - * })); - * }); - * - * server.listen(8000); - * ``` - * @since v0.1.13 - */ - function createServer< - Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse> = typeof ServerResponse, - >(requestListener?: RequestListener): Server; - function createServer< - Request extends typeof IncomingMessage = typeof IncomingMessage, - Response extends typeof ServerResponse> = typeof ServerResponse, - >( - options: ServerOptions, - requestListener?: RequestListener, - ): Server; - // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly, - // create interface RequestOptions would make the naming more clear to developers - interface RequestOptions extends ClientRequestArgs {} - /** - * `options` in `socket.connect()` are also supported. - * - * Node.js maintains several connections per server to make HTTP requests. - * This function allows one to transparently issue requests. - * - * `url` can be a string or a `URL` object. If `url` is a - * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. - * - * If both `url` and `options` are specified, the objects are merged, with the `options` properties taking precedence. - * - * The optional `callback` parameter will be added as a one-time listener for - * the `'response'` event. - * - * `http.request()` returns an instance of the {@link ClientRequest} class. The `ClientRequest` instance is a writable stream. If one needs to - * upload a file with a POST request, then write to the `ClientRequest` object. - * - * ```js - * import http from 'node:http'; - * import { Buffer } from 'node:buffer'; - * - * const postData = JSON.stringify({ - * 'msg': 'Hello World!', - * }); - * - * const options = { - * hostname: 'www.google.com', - * port: 80, - * path: '/upload', - * method: 'POST', - * headers: { - * 'Content-Type': 'application/json', - * 'Content-Length': Buffer.byteLength(postData), - * }, - * }; - * - * const req = http.request(options, (res) => { - * console.log(`STATUS: ${res.statusCode}`); - * console.log(`HEADERS: ${JSON.stringify(res.headers)}`); - * res.setEncoding('utf8'); - * res.on('data', (chunk) => { - * console.log(`BODY: ${chunk}`); - * }); - * res.on('end', () => { - * console.log('No more data in response.'); - * }); - * }); - * - * req.on('error', (e) => { - * console.error(`problem with request: ${e.message}`); - * }); - * - * // Write data to request body - * req.write(postData); - * req.end(); - * ``` - * - * In the example `req.end()` was called. With `http.request()` one - * must always call `req.end()` to signify the end of the request - - * even if there is no data being written to the request body. - * - * If any error is encountered during the request (be that with DNS resolution, - * TCP level errors, or actual HTTP parse errors) an `'error'` event is emitted - * on the returned request object. As with all `'error'` events, if no listeners - * are registered the error will be thrown. - * - * There are a few special headers that should be noted. - * - * * Sending a 'Connection: keep-alive' will notify Node.js that the connection to - * the server should be persisted until the next request. - * * Sending a 'Content-Length' header will disable the default chunked encoding. - * * Sending an 'Expect' header will immediately send the request headers. - * Usually, when sending 'Expect: 100-continue', both a timeout and a listener - * for the `'continue'` event should be set. See RFC 2616 Section 8.2.3 for more - * information. - * * Sending an Authorization header will override using the `auth` option - * to compute basic authentication. - * - * Example using a `URL` as `options`: - * - * ```js - * const options = new URL('http://abc:xyz@example.com'); - * - * const req = http.request(options, (res) => { - * // ... - * }); - * ``` - * - * In a successful request, the following events will be emitted in the following - * order: - * - * * `'socket'` - * * `'response'` - * * `'data'` any number of times, on the `res` object - * (`'data'` will not be emitted at all if the response body is empty, for - * instance, in most redirects) - * * `'end'` on the `res` object - * * `'close'` - * - * In the case of a connection error, the following events will be emitted: - * - * * `'socket'` - * * `'error'` - * * `'close'` - * - * In the case of a premature connection close before the response is received, - * the following events will be emitted in the following order: - * - * * `'socket'` - * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'` - * * `'close'` - * - * In the case of a premature connection close after the response is received, - * the following events will be emitted in the following order: - * - * * `'socket'` - * * `'response'` - * * `'data'` any number of times, on the `res` object - * * (connection closed here) - * * `'aborted'` on the `res` object - * * `'close'` - * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'` - * * `'close'` on the `res` object - * - * If `req.destroy()` is called before a socket is assigned, the following - * events will be emitted in the following order: - * - * * (`req.destroy()` called here) - * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called - * * `'close'` - * - * If `req.destroy()` is called before the connection succeeds, the following - * events will be emitted in the following order: - * - * * `'socket'` - * * (`req.destroy()` called here) - * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called - * * `'close'` - * - * If `req.destroy()` is called after the response is received, the following - * events will be emitted in the following order: - * - * * `'socket'` - * * `'response'` - * * `'data'` any number of times, on the `res` object - * * (`req.destroy()` called here) - * * `'aborted'` on the `res` object - * * `'close'` - * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called - * * `'close'` on the `res` object - * - * If `req.abort()` is called before a socket is assigned, the following - * events will be emitted in the following order: - * - * * (`req.abort()` called here) - * * `'abort'` - * * `'close'` - * - * If `req.abort()` is called before the connection succeeds, the following - * events will be emitted in the following order: - * - * * `'socket'` - * * (`req.abort()` called here) - * * `'abort'` - * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'` - * * `'close'` - * - * If `req.abort()` is called after the response is received, the following - * events will be emitted in the following order: - * - * * `'socket'` - * * `'response'` - * * `'data'` any number of times, on the `res` object - * * (`req.abort()` called here) - * * `'abort'` - * * `'aborted'` on the `res` object - * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'`. - * * `'close'` - * * `'close'` on the `res` object - * - * Setting the `timeout` option or using the `setTimeout()` function will - * not abort the request or do anything besides add a `'timeout'` event. - * - * Passing an `AbortSignal` and then calling `abort()` on the corresponding `AbortController` will behave the same way as calling `.destroy()` on the - * request. Specifically, the `'error'` event will be emitted with an error with - * the message `'AbortError: The operation was aborted'`, the code `'ABORT_ERR'` and the `cause`, if one was provided. - * @since v0.3.6 - */ - function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; - function request( - url: string | URL, - options: RequestOptions, - callback?: (res: IncomingMessage) => void, - ): ClientRequest; - /** - * Since most requests are GET requests without bodies, Node.js provides this - * convenience method. The only difference between this method and {@link request} is that it sets the method to GET by default and calls `req.end()` automatically. The callback must take care to - * consume the response - * data for reasons stated in {@link ClientRequest} section. - * - * The `callback` is invoked with a single argument that is an instance of {@link IncomingMessage}. - * - * JSON fetching example: - * - * ```js - * http.get('http://localhost:8000/', (res) => { - * const { statusCode } = res; - * const contentType = res.headers['content-type']; - * - * let error; - * // Any 2xx status code signals a successful response but - * // here we're only checking for 200. - * if (statusCode !== 200) { - * error = new Error('Request Failed.\n' + - * `Status Code: ${statusCode}`); - * } else if (!/^application\/json/.test(contentType)) { - * error = new Error('Invalid content-type.\n' + - * `Expected application/json but received ${contentType}`); - * } - * if (error) { - * console.error(error.message); - * // Consume response data to free up memory - * res.resume(); - * return; - * } - * - * res.setEncoding('utf8'); - * let rawData = ''; - * res.on('data', (chunk) => { rawData += chunk; }); - * res.on('end', () => { - * try { - * const parsedData = JSON.parse(rawData); - * console.log(parsedData); - * } catch (e) { - * console.error(e.message); - * } - * }); - * }).on('error', (e) => { - * console.error(`Got error: ${e.message}`); - * }); - * - * // Create a local server to receive data from - * const server = http.createServer((req, res) => { - * res.writeHead(200, { 'Content-Type': 'application/json' }); - * res.end(JSON.stringify({ - * data: 'Hello World!', - * })); - * }); - * - * server.listen(8000); - * ``` - * @since v0.3.6 - * @param options Accepts the same `options` as {@link request}, with the method set to GET by default. - */ - function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest; - function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest; - /** - * Performs the low-level validations on the provided `name` that are done when `res.setHeader(name, value)` is called. - * - * Passing illegal value as `name` will result in a `TypeError` being thrown, - * identified by `code: 'ERR_INVALID_HTTP_TOKEN'`. - * - * It is not necessary to use this method before passing headers to an HTTP request - * or response. The HTTP module will automatically validate such headers. - * - * Example: - * - * ```js - * import { validateHeaderName } from 'node:http'; - * - * try { - * validateHeaderName(''); - * } catch (err) { - * console.error(err instanceof TypeError); // --> true - * console.error(err.code); // --> 'ERR_INVALID_HTTP_TOKEN' - * console.error(err.message); // --> 'Header name must be a valid HTTP token [""]' - * } - * ``` - * @since v14.3.0 - * @param [label='Header name'] Label for error message. - */ - function validateHeaderName(name: string): void; - /** - * Performs the low-level validations on the provided `value` that are done when `res.setHeader(name, value)` is called. - * - * Passing illegal value as `value` will result in a `TypeError` being thrown. - * - * * Undefined value error is identified by `code: 'ERR_HTTP_INVALID_HEADER_VALUE'`. - * * Invalid value character error is identified by `code: 'ERR_INVALID_CHAR'`. - * - * It is not necessary to use this method before passing headers to an HTTP request - * or response. The HTTP module will automatically validate such headers. - * - * Examples: - * - * ```js - * import { validateHeaderValue } from 'node:http'; - * - * try { - * validateHeaderValue('x-my-header', undefined); - * } catch (err) { - * console.error(err instanceof TypeError); // --> true - * console.error(err.code === 'ERR_HTTP_INVALID_HEADER_VALUE'); // --> true - * console.error(err.message); // --> 'Invalid value "undefined" for header "x-my-header"' - * } - * - * try { - * validateHeaderValue('x-my-header', 'oʊmɪɡə'); - * } catch (err) { - * console.error(err instanceof TypeError); // --> true - * console.error(err.code === 'ERR_INVALID_CHAR'); // --> true - * console.error(err.message); // --> 'Invalid character in header content ["x-my-header"]' - * } - * ``` - * @since v14.3.0 - * @param name Header name - * @param value Header value - */ - function validateHeaderValue(name: string, value: string): void; - /** - * Set the maximum number of idle HTTP parsers. - * @since v18.8.0, v16.18.0 - * @param [max=1000] - */ - function setMaxIdleHTTPParsers(max: number): void; - /** - * Global instance of `Agent` which is used as the default for all HTTP client - * requests. Diverges from a default `Agent` configuration by having `keepAlive` - * enabled and a `timeout` of 5 seconds. - * @since v0.5.9 - */ - let globalAgent: Agent; - /** - * Read-only property specifying the maximum allowed size of HTTP headers in bytes. - * Defaults to 16KB. Configurable using the `--max-http-header-size` CLI option. - */ - const maxHeaderSize: number; -} -declare module "node:http" { - export * from "http"; -} diff --git a/node_modules/@types/node/http2.d.ts b/node_modules/@types/node/http2.d.ts deleted file mode 100644 index 9c69a19..0000000 --- a/node_modules/@types/node/http2.d.ts +++ /dev/null @@ -1,2631 +0,0 @@ -/** - * The `node:http2` module provides an implementation of the [HTTP/2](https://tools.ietf.org/html/rfc7540) protocol. - * It can be accessed using: - * - * ```js - * import http2 from 'node:http2'; - * ``` - * @since v8.4.0 - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/http2.js) - */ -declare module "http2" { - import { NonSharedBuffer } from "node:buffer"; - import EventEmitter = require("node:events"); - import * as fs from "node:fs"; - import * as net from "node:net"; - import * as stream from "node:stream"; - import * as tls from "node:tls"; - import * as url from "node:url"; - import { - IncomingHttpHeaders as Http1IncomingHttpHeaders, - IncomingMessage, - OutgoingHttpHeaders, - ServerResponse, - } from "node:http"; - export { OutgoingHttpHeaders } from "node:http"; - export interface IncomingHttpStatusHeader { - ":status"?: number | undefined; - } - export interface IncomingHttpHeaders extends Http1IncomingHttpHeaders { - ":path"?: string | undefined; - ":method"?: string | undefined; - ":authority"?: string | undefined; - ":scheme"?: string | undefined; - } - // Http2Stream - export interface StreamPriorityOptions { - exclusive?: boolean | undefined; - parent?: number | undefined; - weight?: number | undefined; - silent?: boolean | undefined; - } - export interface StreamState { - localWindowSize?: number | undefined; - state?: number | undefined; - localClose?: number | undefined; - remoteClose?: number | undefined; - sumDependencyWeight?: number | undefined; - weight?: number | undefined; - } - export interface ServerStreamResponseOptions { - endStream?: boolean | undefined; - waitForTrailers?: boolean | undefined; - } - export interface StatOptions { - offset: number; - length: number; - } - export interface ServerStreamFileResponseOptions { - statCheck?: - | ((stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions) => void) - | undefined; - waitForTrailers?: boolean | undefined; - offset?: number | undefined; - length?: number | undefined; - } - export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions { - onError?: ((err: NodeJS.ErrnoException) => void) | undefined; - } - export interface Http2Stream extends stream.Duplex { - /** - * Set to `true` if the `Http2Stream` instance was aborted abnormally. When set, - * the `'aborted'` event will have been emitted. - * @since v8.4.0 - */ - readonly aborted: boolean; - /** - * This property shows the number of characters currently buffered to be written. - * See `net.Socket.bufferSize` for details. - * @since v11.2.0, v10.16.0 - */ - readonly bufferSize: number; - /** - * Set to `true` if the `Http2Stream` instance has been closed. - * @since v9.4.0 - */ - readonly closed: boolean; - /** - * Set to `true` if the `Http2Stream` instance has been destroyed and is no longer - * usable. - * @since v8.4.0 - */ - readonly destroyed: boolean; - /** - * Set to `true` if the `END_STREAM` flag was set in the request or response - * HEADERS frame received, indicating that no additional data should be received - * and the readable side of the `Http2Stream` will be closed. - * @since v10.11.0 - */ - readonly endAfterHeaders: boolean; - /** - * The numeric stream identifier of this `Http2Stream` instance. Set to `undefined` if the stream identifier has not yet been assigned. - * @since v8.4.0 - */ - readonly id?: number | undefined; - /** - * Set to `true` if the `Http2Stream` instance has not yet been assigned a - * numeric stream identifier. - * @since v9.4.0 - */ - readonly pending: boolean; - /** - * Set to the `RST_STREAM` `error code` reported when the `Http2Stream` is - * destroyed after either receiving an `RST_STREAM` frame from the connected peer, - * calling `http2stream.close()`, or `http2stream.destroy()`. Will be `undefined` if the `Http2Stream` has not been closed. - * @since v8.4.0 - */ - readonly rstCode: number; - /** - * An object containing the outbound headers sent for this `Http2Stream`. - * @since v9.5.0 - */ - readonly sentHeaders: OutgoingHttpHeaders; - /** - * An array of objects containing the outbound informational (additional) headers - * sent for this `Http2Stream`. - * @since v9.5.0 - */ - readonly sentInfoHeaders?: OutgoingHttpHeaders[] | undefined; - /** - * An object containing the outbound trailers sent for this `HttpStream`. - * @since v9.5.0 - */ - readonly sentTrailers?: OutgoingHttpHeaders | undefined; - /** - * A reference to the `Http2Session` instance that owns this `Http2Stream`. The - * value will be `undefined` after the `Http2Stream` instance is destroyed. - * @since v8.4.0 - */ - readonly session: Http2Session | undefined; - /** - * Provides miscellaneous information about the current state of the `Http2Stream`. - * - * A current state of this `Http2Stream`. - * @since v8.4.0 - */ - readonly state: StreamState; - /** - * Closes the `Http2Stream` instance by sending an `RST_STREAM` frame to the - * connected HTTP/2 peer. - * @since v8.4.0 - * @param [code=http2.constants.NGHTTP2_NO_ERROR] Unsigned 32-bit integer identifying the error code. - * @param callback An optional function registered to listen for the `'close'` event. - */ - close(code?: number, callback?: () => void): void; - /** - * Updates the priority for this `Http2Stream` instance. - * @since v8.4.0 - */ - priority(options: StreamPriorityOptions): void; - /** - * ```js - * import http2 from 'node:http2'; - * const client = http2.connect('http://example.org:8000'); - * const { NGHTTP2_CANCEL } = http2.constants; - * const req = client.request({ ':path': '/' }); - * - * // Cancel the stream if there's no activity after 5 seconds - * req.setTimeout(5000, () => req.close(NGHTTP2_CANCEL)); - * ``` - * @since v8.4.0 - */ - setTimeout(msecs: number, callback?: () => void): void; - /** - * Sends a trailing `HEADERS` frame to the connected HTTP/2 peer. This method - * will cause the `Http2Stream` to be immediately closed and must only be - * called after the `'wantTrailers'` event has been emitted. When sending a - * request or sending a response, the `options.waitForTrailers` option must be set - * in order to keep the `Http2Stream` open after the final `DATA` frame so that - * trailers can be sent. - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * stream.respond(undefined, { waitForTrailers: true }); - * stream.on('wantTrailers', () => { - * stream.sendTrailers({ xyz: 'abc' }); - * }); - * stream.end('Hello World'); - * }); - * ``` - * - * The HTTP/1 specification forbids trailers from containing HTTP/2 pseudo-header - * fields (e.g. `':method'`, `':path'`, etc). - * @since v10.0.0 - */ - sendTrailers(headers: OutgoingHttpHeaders): void; - addListener(event: "aborted", listener: () => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "data", listener: (chunk: NonSharedBuffer | string) => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "finish", listener: () => void): this; - addListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; - addListener(event: "pipe", listener: (src: stream.Readable) => void): this; - addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - addListener(event: "streamClosed", listener: (code: number) => void): this; - addListener(event: "timeout", listener: () => void): this; - addListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; - addListener(event: "wantTrailers", listener: () => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit(event: "aborted"): boolean; - emit(event: "close"): boolean; - emit(event: "data", chunk: NonSharedBuffer | string): boolean; - emit(event: "drain"): boolean; - emit(event: "end"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "finish"): boolean; - emit(event: "frameError", frameType: number, errorCode: number): boolean; - emit(event: "pipe", src: stream.Readable): boolean; - emit(event: "unpipe", src: stream.Readable): boolean; - emit(event: "streamClosed", code: number): boolean; - emit(event: "timeout"): boolean; - emit(event: "trailers", trailers: IncomingHttpHeaders, flags: number): boolean; - emit(event: "wantTrailers"): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on(event: "aborted", listener: () => void): this; - on(event: "close", listener: () => void): this; - on(event: "data", listener: (chunk: NonSharedBuffer | string) => void): this; - on(event: "drain", listener: () => void): this; - on(event: "end", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "finish", listener: () => void): this; - on(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; - on(event: "pipe", listener: (src: stream.Readable) => void): this; - on(event: "unpipe", listener: (src: stream.Readable) => void): this; - on(event: "streamClosed", listener: (code: number) => void): this; - on(event: "timeout", listener: () => void): this; - on(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; - on(event: "wantTrailers", listener: () => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: "aborted", listener: () => void): this; - once(event: "close", listener: () => void): this; - once(event: "data", listener: (chunk: NonSharedBuffer | string) => void): this; - once(event: "drain", listener: () => void): this; - once(event: "end", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "finish", listener: () => void): this; - once(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; - once(event: "pipe", listener: (src: stream.Readable) => void): this; - once(event: "unpipe", listener: (src: stream.Readable) => void): this; - once(event: "streamClosed", listener: (code: number) => void): this; - once(event: "timeout", listener: () => void): this; - once(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; - once(event: "wantTrailers", listener: () => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener(event: "aborted", listener: () => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "data", listener: (chunk: NonSharedBuffer | string) => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "finish", listener: () => void): this; - prependListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; - prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; - prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - prependListener(event: "streamClosed", listener: (code: number) => void): this; - prependListener(event: "timeout", listener: () => void): this; - prependListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; - prependListener(event: "wantTrailers", listener: () => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(event: "aborted", listener: () => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "data", listener: (chunk: NonSharedBuffer | string) => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "finish", listener: () => void): this; - prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this; - prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; - prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - prependOnceListener(event: "streamClosed", listener: (code: number) => void): this; - prependOnceListener(event: "timeout", listener: () => void): this; - prependOnceListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this; - prependOnceListener(event: "wantTrailers", listener: () => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - export interface ClientHttp2Stream extends Http2Stream { - addListener(event: "continue", listener: () => {}): this; - addListener( - event: "headers", - listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, - ): this; - addListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; - addListener( - event: "response", - listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, - ): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit(event: "continue"): boolean; - emit(event: "headers", headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; - emit(event: "push", headers: IncomingHttpHeaders, flags: number): boolean; - emit(event: "response", headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on(event: "continue", listener: () => {}): this; - on( - event: "headers", - listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, - ): this; - on(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; - on( - event: "response", - listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, - ): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: "continue", listener: () => {}): this; - once( - event: "headers", - listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, - ): this; - once(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; - once( - event: "response", - listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, - ): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener(event: "continue", listener: () => {}): this; - prependListener( - event: "headers", - listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, - ): this; - prependListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; - prependListener( - event: "response", - listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, - ): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(event: "continue", listener: () => {}): this; - prependOnceListener( - event: "headers", - listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, - ): this; - prependOnceListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this; - prependOnceListener( - event: "response", - listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void, - ): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - export interface ServerHttp2Stream extends Http2Stream { - /** - * True if headers were sent, false otherwise (read-only). - * @since v8.4.0 - */ - readonly headersSent: boolean; - /** - * Read-only property mapped to the `SETTINGS_ENABLE_PUSH` flag of the remote - * client's most recent `SETTINGS` frame. Will be `true` if the remote peer - * accepts push streams, `false` otherwise. Settings are the same for every `Http2Stream` in the same `Http2Session`. - * @since v8.4.0 - */ - readonly pushAllowed: boolean; - /** - * Sends an additional informational `HEADERS` frame to the connected HTTP/2 peer. - * @since v8.4.0 - */ - additionalHeaders(headers: OutgoingHttpHeaders): void; - /** - * Initiates a push stream. The callback is invoked with the new `Http2Stream` instance created for the push stream passed as the second argument, or an `Error` passed as the first argument. - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * stream.respond({ ':status': 200 }); - * stream.pushStream({ ':path': '/' }, (err, pushStream, headers) => { - * if (err) throw err; - * pushStream.respond({ ':status': 200 }); - * pushStream.end('some pushed data'); - * }); - * stream.end('some data'); - * }); - * ``` - * - * Setting the weight of a push stream is not allowed in the `HEADERS` frame. Pass - * a `weight` value to `http2stream.priority` with the `silent` option set to `true` to enable server-side bandwidth balancing between concurrent streams. - * - * Calling `http2stream.pushStream()` from within a pushed stream is not permitted - * and will throw an error. - * @since v8.4.0 - * @param callback Callback that is called once the push stream has been initiated. - */ - pushStream( - headers: OutgoingHttpHeaders, - callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void, - ): void; - pushStream( - headers: OutgoingHttpHeaders, - options?: StreamPriorityOptions, - callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void, - ): void; - /** - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * stream.respond({ ':status': 200 }); - * stream.end('some data'); - * }); - * ``` - * - * Initiates a response. When the `options.waitForTrailers` option is set, the `'wantTrailers'` event - * will be emitted immediately after queuing the last chunk of payload data to be sent. - * The `http2stream.sendTrailers()` method can then be used to send trailing header fields to the peer. - * - * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically - * close when the final `DATA` frame is transmitted. User code must call either `http2stream.sendTrailers()` or `http2stream.close()` to close the `Http2Stream`. - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * stream.respond({ ':status': 200 }, { waitForTrailers: true }); - * stream.on('wantTrailers', () => { - * stream.sendTrailers({ ABC: 'some value to send' }); - * }); - * stream.end('some data'); - * }); - * ``` - * @since v8.4.0 - */ - respond(headers?: OutgoingHttpHeaders, options?: ServerStreamResponseOptions): void; - /** - * Initiates a response whose data is read from the given file descriptor. No - * validation is performed on the given file descriptor. If an error occurs while - * attempting to read data using the file descriptor, the `Http2Stream` will be - * closed using an `RST_STREAM` frame using the standard `INTERNAL_ERROR` code. - * - * When used, the `Http2Stream` object's `Duplex` interface will be closed - * automatically. - * - * ```js - * import http2 from 'node:http2'; - * import fs from 'node:fs'; - * - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * const fd = fs.openSync('/some/file', 'r'); - * - * const stat = fs.fstatSync(fd); - * const headers = { - * 'content-length': stat.size, - * 'last-modified': stat.mtime.toUTCString(), - * 'content-type': 'text/plain; charset=utf-8', - * }; - * stream.respondWithFD(fd, headers); - * stream.on('close', () => fs.closeSync(fd)); - * }); - * ``` - * - * The optional `options.statCheck` function may be specified to give user code - * an opportunity to set additional content headers based on the `fs.Stat` details - * of the given fd. If the `statCheck` function is provided, the `http2stream.respondWithFD()` method will - * perform an `fs.fstat()` call to collect details on the provided file descriptor. - * - * The `offset` and `length` options may be used to limit the response to a - * specific range subset. This can be used, for instance, to support HTTP Range - * requests. - * - * The file descriptor or `FileHandle` is not closed when the stream is closed, - * so it will need to be closed manually once it is no longer needed. - * Using the same file descriptor concurrently for multiple streams - * is not supported and may result in data loss. Re-using a file descriptor - * after a stream has finished is supported. - * - * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event - * will be emitted immediately after queuing the last chunk of payload data to be - * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing - * header fields to the peer. - * - * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically - * close when the final `DATA` frame is transmitted. User code _must_ call either `http2stream.sendTrailers()` - * or `http2stream.close()` to close the `Http2Stream`. - * - * ```js - * import http2 from 'node:http2'; - * import fs from 'node:fs'; - * - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * const fd = fs.openSync('/some/file', 'r'); - * - * const stat = fs.fstatSync(fd); - * const headers = { - * 'content-length': stat.size, - * 'last-modified': stat.mtime.toUTCString(), - * 'content-type': 'text/plain; charset=utf-8', - * }; - * stream.respondWithFD(fd, headers, { waitForTrailers: true }); - * stream.on('wantTrailers', () => { - * stream.sendTrailers({ ABC: 'some value to send' }); - * }); - * - * stream.on('close', () => fs.closeSync(fd)); - * }); - * ``` - * @since v8.4.0 - * @param fd A readable file descriptor. - */ - respondWithFD( - fd: number | fs.promises.FileHandle, - headers?: OutgoingHttpHeaders, - options?: ServerStreamFileResponseOptions, - ): void; - /** - * Sends a regular file as the response. The `path` must specify a regular file - * or an `'error'` event will be emitted on the `Http2Stream` object. - * - * When used, the `Http2Stream` object's `Duplex` interface will be closed - * automatically. - * - * The optional `options.statCheck` function may be specified to give user code - * an opportunity to set additional content headers based on the `fs.Stat` details - * of the given file: - * - * If an error occurs while attempting to read the file data, the `Http2Stream` will be closed using an - * `RST_STREAM` frame using the standard `INTERNAL_ERROR` code. - * If the `onError` callback is defined, then it will be called. Otherwise, the stream will be destroyed. - * - * Example using a file path: - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * function statCheck(stat, headers) { - * headers['last-modified'] = stat.mtime.toUTCString(); - * } - * - * function onError(err) { - * // stream.respond() can throw if the stream has been destroyed by - * // the other side. - * try { - * if (err.code === 'ENOENT') { - * stream.respond({ ':status': 404 }); - * } else { - * stream.respond({ ':status': 500 }); - * } - * } catch (err) { - * // Perform actual error handling. - * console.error(err); - * } - * stream.end(); - * } - * - * stream.respondWithFile('/some/file', - * { 'content-type': 'text/plain; charset=utf-8' }, - * { statCheck, onError }); - * }); - * ``` - * - * The `options.statCheck` function may also be used to cancel the send operation - * by returning `false`. For instance, a conditional request may check the stat - * results to determine if the file has been modified to return an appropriate `304` response: - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * function statCheck(stat, headers) { - * // Check the stat here... - * stream.respond({ ':status': 304 }); - * return false; // Cancel the send operation - * } - * stream.respondWithFile('/some/file', - * { 'content-type': 'text/plain; charset=utf-8' }, - * { statCheck }); - * }); - * ``` - * - * The `content-length` header field will be automatically set. - * - * The `offset` and `length` options may be used to limit the response to a - * specific range subset. This can be used, for instance, to support HTTP Range - * requests. - * - * The `options.onError` function may also be used to handle all the errors - * that could happen before the delivery of the file is initiated. The - * default behavior is to destroy the stream. - * - * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event - * will be emitted immediately after queuing the last chunk of payload data to be - * sent. The `http2stream.sendTrailers()` method can then be used to sent trailing - * header fields to the peer. - * - * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically - * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer(); - * server.on('stream', (stream) => { - * stream.respondWithFile('/some/file', - * { 'content-type': 'text/plain; charset=utf-8' }, - * { waitForTrailers: true }); - * stream.on('wantTrailers', () => { - * stream.sendTrailers({ ABC: 'some value to send' }); - * }); - * }); - * ``` - * @since v8.4.0 - */ - respondWithFile( - path: string, - headers?: OutgoingHttpHeaders, - options?: ServerStreamFileResponseOptionsWithError, - ): void; - } - // Http2Session - export interface Settings { - headerTableSize?: number | undefined; - enablePush?: boolean | undefined; - initialWindowSize?: number | undefined; - maxFrameSize?: number | undefined; - maxConcurrentStreams?: number | undefined; - maxHeaderListSize?: number | undefined; - enableConnectProtocol?: boolean | undefined; - } - export interface ClientSessionRequestOptions { - endStream?: boolean | undefined; - exclusive?: boolean | undefined; - parent?: number | undefined; - weight?: number | undefined; - waitForTrailers?: boolean | undefined; - signal?: AbortSignal | undefined; - } - export interface SessionState { - effectiveLocalWindowSize?: number | undefined; - effectiveRecvDataLength?: number | undefined; - nextStreamID?: number | undefined; - localWindowSize?: number | undefined; - lastProcStreamID?: number | undefined; - remoteWindowSize?: number | undefined; - outboundQueueSize?: number | undefined; - deflateDynamicTableSize?: number | undefined; - inflateDynamicTableSize?: number | undefined; - } - export interface Http2Session extends EventEmitter { - /** - * Value will be `undefined` if the `Http2Session` is not yet connected to a - * socket, `h2c` if the `Http2Session` is not connected to a `TLSSocket`, or - * will return the value of the connected `TLSSocket`'s own `alpnProtocol` property. - * @since v9.4.0 - */ - readonly alpnProtocol?: string | undefined; - /** - * Will be `true` if this `Http2Session` instance has been closed, otherwise `false`. - * @since v9.4.0 - */ - readonly closed: boolean; - /** - * Will be `true` if this `Http2Session` instance is still connecting, will be set - * to `false` before emitting `connect` event and/or calling the `http2.connect` callback. - * @since v10.0.0 - */ - readonly connecting: boolean; - /** - * Will be `true` if this `Http2Session` instance has been destroyed and must no - * longer be used, otherwise `false`. - * @since v8.4.0 - */ - readonly destroyed: boolean; - /** - * Value is `undefined` if the `Http2Session` session socket has not yet been - * connected, `true` if the `Http2Session` is connected with a `TLSSocket`, - * and `false` if the `Http2Session` is connected to any other kind of socket - * or stream. - * @since v9.4.0 - */ - readonly encrypted?: boolean | undefined; - /** - * A prototype-less object describing the current local settings of this `Http2Session`. - * The local settings are local to _this_`Http2Session` instance. - * @since v8.4.0 - */ - readonly localSettings: Settings; - /** - * If the `Http2Session` is connected to a `TLSSocket`, the `originSet` property - * will return an `Array` of origins for which the `Http2Session` may be - * considered authoritative. - * - * The `originSet` property is only available when using a secure TLS connection. - * @since v9.4.0 - */ - readonly originSet?: string[] | undefined; - /** - * Indicates whether the `Http2Session` is currently waiting for acknowledgment of - * a sent `SETTINGS` frame. Will be `true` after calling the `http2session.settings()` method. - * Will be `false` once all sent `SETTINGS` frames have been acknowledged. - * @since v8.4.0 - */ - readonly pendingSettingsAck: boolean; - /** - * A prototype-less object describing the current remote settings of this`Http2Session`. - * The remote settings are set by the _connected_ HTTP/2 peer. - * @since v8.4.0 - */ - readonly remoteSettings: Settings; - /** - * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but - * limits available methods to ones safe to use with HTTP/2. - * - * `destroy`, `emit`, `end`, `pause`, `read`, `resume`, and `write` will throw - * an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for more information. - * - * `setTimeout` method will be called on this `Http2Session`. - * - * All other interactions will be routed directly to the socket. - * @since v8.4.0 - */ - readonly socket: net.Socket | tls.TLSSocket; - /** - * Provides miscellaneous information about the current state of the`Http2Session`. - * - * An object describing the current status of this `Http2Session`. - * @since v8.4.0 - */ - readonly state: SessionState; - /** - * The `http2session.type` will be equal to `http2.constants.NGHTTP2_SESSION_SERVER` if this `Http2Session` instance is a - * server, and `http2.constants.NGHTTP2_SESSION_CLIENT` if the instance is a - * client. - * @since v8.4.0 - */ - readonly type: number; - /** - * Gracefully closes the `Http2Session`, allowing any existing streams to - * complete on their own and preventing new `Http2Stream` instances from being - * created. Once closed, `http2session.destroy()`_might_ be called if there - * are no open `Http2Stream` instances. - * - * If specified, the `callback` function is registered as a handler for the`'close'` event. - * @since v9.4.0 - */ - close(callback?: () => void): void; - /** - * Immediately terminates the `Http2Session` and the associated `net.Socket` or `tls.TLSSocket`. - * - * Once destroyed, the `Http2Session` will emit the `'close'` event. If `error` is not undefined, an `'error'` event will be emitted immediately before the `'close'` event. - * - * If there are any remaining open `Http2Streams` associated with the `Http2Session`, those will also be destroyed. - * @since v8.4.0 - * @param error An `Error` object if the `Http2Session` is being destroyed due to an error. - * @param code The HTTP/2 error code to send in the final `GOAWAY` frame. If unspecified, and `error` is not undefined, the default is `INTERNAL_ERROR`, otherwise defaults to `NO_ERROR`. - */ - destroy(error?: Error, code?: number): void; - /** - * Transmits a `GOAWAY` frame to the connected peer _without_ shutting down the`Http2Session`. - * @since v9.4.0 - * @param code An HTTP/2 error code - * @param lastStreamID The numeric ID of the last processed `Http2Stream` - * @param opaqueData A `TypedArray` or `DataView` instance containing additional data to be carried within the `GOAWAY` frame. - */ - goaway(code?: number, lastStreamID?: number, opaqueData?: NodeJS.ArrayBufferView): void; - /** - * Sends a `PING` frame to the connected HTTP/2 peer. A `callback` function must - * be provided. The method will return `true` if the `PING` was sent, `false` otherwise. - * - * The maximum number of outstanding (unacknowledged) pings is determined by the `maxOutstandingPings` configuration option. The default maximum is 10. - * - * If provided, the `payload` must be a `Buffer`, `TypedArray`, or `DataView` containing 8 bytes of data that will be transmitted with the `PING` and - * returned with the ping acknowledgment. - * - * The callback will be invoked with three arguments: an error argument that will - * be `null` if the `PING` was successfully acknowledged, a `duration` argument - * that reports the number of milliseconds elapsed since the ping was sent and the - * acknowledgment was received, and a `Buffer` containing the 8-byte `PING` payload. - * - * ```js - * session.ping(Buffer.from('abcdefgh'), (err, duration, payload) => { - * if (!err) { - * console.log(`Ping acknowledged in ${duration} milliseconds`); - * console.log(`With payload '${payload.toString()}'`); - * } - * }); - * ``` - * - * If the `payload` argument is not specified, the default payload will be the - * 64-bit timestamp (little endian) marking the start of the `PING` duration. - * @since v8.9.3 - * @param payload Optional ping payload. - */ - ping(callback: (err: Error | null, duration: number, payload: NonSharedBuffer) => void): boolean; - ping( - payload: NodeJS.ArrayBufferView, - callback: (err: Error | null, duration: number, payload: NonSharedBuffer) => void, - ): boolean; - /** - * Calls `ref()` on this `Http2Session` instance's underlying `net.Socket`. - * @since v9.4.0 - */ - ref(): void; - /** - * Sets the local endpoint's window size. - * The `windowSize` is the total window size to set, not - * the delta. - * - * ```js - * import http2 from 'node:http2'; - * - * const server = http2.createServer(); - * const expectedWindowSize = 2 ** 20; - * server.on('connect', (session) => { - * - * // Set local window size to be 2 ** 20 - * session.setLocalWindowSize(expectedWindowSize); - * }); - * ``` - * @since v15.3.0, v14.18.0 - */ - setLocalWindowSize(windowSize: number): void; - /** - * Used to set a callback function that is called when there is no activity on - * the `Http2Session` after `msecs` milliseconds. The given `callback` is - * registered as a listener on the `'timeout'` event. - * @since v8.4.0 - */ - setTimeout(msecs: number, callback?: () => void): void; - /** - * Updates the current local settings for this `Http2Session` and sends a new `SETTINGS` frame to the connected HTTP/2 peer. - * - * Once called, the `http2session.pendingSettingsAck` property will be `true` while the session is waiting for the remote peer to acknowledge the new - * settings. - * - * The new settings will not become effective until the `SETTINGS` acknowledgment - * is received and the `'localSettings'` event is emitted. It is possible to send - * multiple `SETTINGS` frames while acknowledgment is still pending. - * @since v8.4.0 - * @param callback Callback that is called once the session is connected or right away if the session is already connected. - */ - settings( - settings: Settings, - callback?: (err: Error | null, settings: Settings, duration: number) => void, - ): void; - /** - * Calls `unref()` on this `Http2Session`instance's underlying `net.Socket`. - * @since v9.4.0 - */ - unref(): void; - addListener(event: "close", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener( - event: "frameError", - listener: (frameType: number, errorCode: number, streamID: number) => void, - ): this; - addListener( - event: "goaway", - listener: (errorCode: number, lastStreamID: number, opaqueData?: NonSharedBuffer) => void, - ): this; - addListener(event: "localSettings", listener: (settings: Settings) => void): this; - addListener(event: "ping", listener: () => void): this; - addListener(event: "remoteSettings", listener: (settings: Settings) => void): this; - addListener(event: "timeout", listener: () => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit(event: "close"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "frameError", frameType: number, errorCode: number, streamID: number): boolean; - emit(event: "goaway", errorCode: number, lastStreamID: number, opaqueData?: NonSharedBuffer): boolean; - emit(event: "localSettings", settings: Settings): boolean; - emit(event: "ping"): boolean; - emit(event: "remoteSettings", settings: Settings): boolean; - emit(event: "timeout"): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on(event: "close", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; - on( - event: "goaway", - listener: (errorCode: number, lastStreamID: number, opaqueData?: NonSharedBuffer) => void, - ): this; - on(event: "localSettings", listener: (settings: Settings) => void): this; - on(event: "ping", listener: () => void): this; - on(event: "remoteSettings", listener: (settings: Settings) => void): this; - on(event: "timeout", listener: () => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this; - once( - event: "goaway", - listener: (errorCode: number, lastStreamID: number, opaqueData?: NonSharedBuffer) => void, - ): this; - once(event: "localSettings", listener: (settings: Settings) => void): this; - once(event: "ping", listener: () => void): this; - once(event: "remoteSettings", listener: (settings: Settings) => void): this; - once(event: "timeout", listener: () => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener( - event: "frameError", - listener: (frameType: number, errorCode: number, streamID: number) => void, - ): this; - prependListener( - event: "goaway", - listener: (errorCode: number, lastStreamID: number, opaqueData?: NonSharedBuffer) => void, - ): this; - prependListener(event: "localSettings", listener: (settings: Settings) => void): this; - prependListener(event: "ping", listener: () => void): this; - prependListener(event: "remoteSettings", listener: (settings: Settings) => void): this; - prependListener(event: "timeout", listener: () => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener( - event: "frameError", - listener: (frameType: number, errorCode: number, streamID: number) => void, - ): this; - prependOnceListener( - event: "goaway", - listener: (errorCode: number, lastStreamID: number, opaqueData?: NonSharedBuffer) => void, - ): this; - prependOnceListener(event: "localSettings", listener: (settings: Settings) => void): this; - prependOnceListener(event: "ping", listener: () => void): this; - prependOnceListener(event: "remoteSettings", listener: (settings: Settings) => void): this; - prependOnceListener(event: "timeout", listener: () => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - export interface ClientHttp2Session extends Http2Session { - /** - * For HTTP/2 Client `Http2Session` instances only, the `http2session.request()` creates and returns an `Http2Stream` instance that can be used to send an - * HTTP/2 request to the connected server. - * - * When a `ClientHttp2Session` is first created, the socket may not yet be - * connected. if `clienthttp2session.request()` is called during this time, the - * actual request will be deferred until the socket is ready to go. - * If the `session` is closed before the actual request be executed, an `ERR_HTTP2_GOAWAY_SESSION` is thrown. - * - * This method is only available if `http2session.type` is equal to `http2.constants.NGHTTP2_SESSION_CLIENT`. - * - * ```js - * import http2 from 'node:http2'; - * const clientSession = http2.connect('https://localhost:1234'); - * const { - * HTTP2_HEADER_PATH, - * HTTP2_HEADER_STATUS, - * } = http2.constants; - * - * const req = clientSession.request({ [HTTP2_HEADER_PATH]: '/' }); - * req.on('response', (headers) => { - * console.log(headers[HTTP2_HEADER_STATUS]); - * req.on('data', (chunk) => { // .. }); - * req.on('end', () => { // .. }); - * }); - * ``` - * - * When the `options.waitForTrailers` option is set, the `'wantTrailers'` event - * is emitted immediately after queuing the last chunk of payload data to be sent. - * The `http2stream.sendTrailers()` method can then be called to send trailing - * headers to the peer. - * - * When `options.waitForTrailers` is set, the `Http2Stream` will not automatically - * close when the final `DATA` frame is transmitted. User code must call either`http2stream.sendTrailers()` or `http2stream.close()` to close the`Http2Stream`. - * - * When `options.signal` is set with an `AbortSignal` and then `abort` on the - * corresponding `AbortController` is called, the request will emit an `'error'`event with an `AbortError` error. - * - * The `:method` and `:path` pseudo-headers are not specified within `headers`, - * they respectively default to: - * - * * `:method` \= `'GET'` - * * `:path` \= `/` - * @since v8.4.0 - */ - request(headers?: OutgoingHttpHeaders, options?: ClientSessionRequestOptions): ClientHttp2Stream; - addListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; - addListener(event: "origin", listener: (origins: string[]) => void): this; - addListener( - event: "connect", - listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, - ): this; - addListener( - event: "stream", - listener: ( - stream: ClientHttp2Stream, - headers: IncomingHttpHeaders & IncomingHttpStatusHeader, - flags: number, - ) => void, - ): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit(event: "altsvc", alt: string, origin: string, stream: number): boolean; - emit(event: "origin", origins: readonly string[]): boolean; - emit(event: "connect", session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean; - emit( - event: "stream", - stream: ClientHttp2Stream, - headers: IncomingHttpHeaders & IncomingHttpStatusHeader, - flags: number, - ): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; - on(event: "origin", listener: (origins: string[]) => void): this; - on(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this; - on( - event: "stream", - listener: ( - stream: ClientHttp2Stream, - headers: IncomingHttpHeaders & IncomingHttpStatusHeader, - flags: number, - ) => void, - ): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; - once(event: "origin", listener: (origins: string[]) => void): this; - once( - event: "connect", - listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, - ): this; - once( - event: "stream", - listener: ( - stream: ClientHttp2Stream, - headers: IncomingHttpHeaders & IncomingHttpStatusHeader, - flags: number, - ) => void, - ): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; - prependListener(event: "origin", listener: (origins: string[]) => void): this; - prependListener( - event: "connect", - listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, - ): this; - prependListener( - event: "stream", - listener: ( - stream: ClientHttp2Stream, - headers: IncomingHttpHeaders & IncomingHttpStatusHeader, - flags: number, - ) => void, - ): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this; - prependOnceListener(event: "origin", listener: (origins: string[]) => void): this; - prependOnceListener( - event: "connect", - listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, - ): this; - prependOnceListener( - event: "stream", - listener: ( - stream: ClientHttp2Stream, - headers: IncomingHttpHeaders & IncomingHttpStatusHeader, - flags: number, - ) => void, - ): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - export interface AlternativeServiceOptions { - origin: number | string | url.URL; - } - export interface ServerHttp2Session< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends Http2Session { - readonly server: - | Http2Server - | Http2SecureServer; - /** - * Submits an `ALTSVC` frame (as defined by [RFC 7838](https://tools.ietf.org/html/rfc7838)) to the connected client. - * - * ```js - * import http2 from 'node:http2'; - * - * const server = http2.createServer(); - * server.on('session', (session) => { - * // Set altsvc for origin https://example.org:80 - * session.altsvc('h2=":8000"', 'https://example.org:80'); - * }); - * - * server.on('stream', (stream) => { - * // Set altsvc for a specific stream - * stream.session.altsvc('h2=":8000"', stream.id); - * }); - * ``` - * - * Sending an `ALTSVC` frame with a specific stream ID indicates that the alternate - * service is associated with the origin of the given `Http2Stream`. - * - * The `alt` and origin string _must_ contain only ASCII bytes and are - * strictly interpreted as a sequence of ASCII bytes. The special value `'clear'`may be passed to clear any previously set alternative service for a given - * domain. - * - * When a string is passed for the `originOrStream` argument, it will be parsed as - * a URL and the origin will be derived. For instance, the origin for the - * HTTP URL `'https://example.org/foo/bar'` is the ASCII string`'https://example.org'`. An error will be thrown if either the given string - * cannot be parsed as a URL or if a valid origin cannot be derived. - * - * A `URL` object, or any object with an `origin` property, may be passed as`originOrStream`, in which case the value of the `origin` property will be - * used. The value of the `origin` property _must_ be a properly serialized - * ASCII origin. - * @since v9.4.0 - * @param alt A description of the alternative service configuration as defined by `RFC 7838`. - * @param originOrStream Either a URL string specifying the origin (or an `Object` with an `origin` property) or the numeric identifier of an active `Http2Stream` as given by the - * `http2stream.id` property. - */ - altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void; - /** - * Submits an `ORIGIN` frame (as defined by [RFC 8336](https://tools.ietf.org/html/rfc8336)) to the connected client - * to advertise the set of origins for which the server is capable of providing - * authoritative responses. - * - * ```js - * import http2 from 'node:http2'; - * const options = getSecureOptionsSomehow(); - * const server = http2.createSecureServer(options); - * server.on('stream', (stream) => { - * stream.respond(); - * stream.end('ok'); - * }); - * server.on('session', (session) => { - * session.origin('https://example.com', 'https://example.org'); - * }); - * ``` - * - * When a string is passed as an `origin`, it will be parsed as a URL and the - * origin will be derived. For instance, the origin for the HTTP URL `'https://example.org/foo/bar'` is the ASCII string` 'https://example.org'`. An error will be thrown if either the given - * string - * cannot be parsed as a URL or if a valid origin cannot be derived. - * - * A `URL` object, or any object with an `origin` property, may be passed as - * an `origin`, in which case the value of the `origin` property will be - * used. The value of the `origin` property _must_ be a properly serialized - * ASCII origin. - * - * Alternatively, the `origins` option may be used when creating a new HTTP/2 - * server using the `http2.createSecureServer()` method: - * - * ```js - * import http2 from 'node:http2'; - * const options = getSecureOptionsSomehow(); - * options.origins = ['https://example.com', 'https://example.org']; - * const server = http2.createSecureServer(options); - * server.on('stream', (stream) => { - * stream.respond(); - * stream.end('ok'); - * }); - * ``` - * @since v10.12.0 - * @param origins One or more URL Strings passed as separate arguments. - */ - origin( - ...origins: Array< - | string - | url.URL - | { - origin: string; - } - > - ): void; - addListener( - event: "connect", - listener: ( - session: ServerHttp2Session, - socket: net.Socket | tls.TLSSocket, - ) => void, - ): this; - addListener( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit( - event: "connect", - session: ServerHttp2Session, - socket: net.Socket | tls.TLSSocket, - ): boolean; - emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on( - event: "connect", - listener: ( - session: ServerHttp2Session, - socket: net.Socket | tls.TLSSocket, - ) => void, - ): this; - on( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once( - event: "connect", - listener: ( - session: ServerHttp2Session, - socket: net.Socket | tls.TLSSocket, - ) => void, - ): this; - once( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - event: "connect", - listener: ( - session: ServerHttp2Session, - socket: net.Socket | tls.TLSSocket, - ) => void, - ): this; - prependListener( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - event: "connect", - listener: ( - session: ServerHttp2Session, - socket: net.Socket | tls.TLSSocket, - ) => void, - ): this; - prependOnceListener( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - // Http2Server - export interface SessionOptions { - /** - * Sets the maximum dynamic table size for deflating header fields. - * @default 4Kib - */ - maxDeflateDynamicTableSize?: number | undefined; - /** - * Sets the maximum number of settings entries per `SETTINGS` frame. - * The minimum value allowed is `1`. - * @default 32 - */ - maxSettings?: number | undefined; - /** - * Sets the maximum memory that the `Http2Session` is permitted to use. - * The value is expressed in terms of number of megabytes, e.g. `1` equal 1 megabyte. - * The minimum value allowed is `1`. - * This is a credit based limit, existing `Http2Stream`s may cause this limit to be exceeded, - * but new `Http2Stream` instances will be rejected while this limit is exceeded. - * The current number of `Http2Stream` sessions, the current memory use of the header compression tables, - * current data queued to be sent, and unacknowledged `PING` and `SETTINGS` frames are all counted towards the current limit. - * @default 10 - */ - maxSessionMemory?: number | undefined; - /** - * Sets the maximum number of header entries. - * This is similar to `server.maxHeadersCount` or `request.maxHeadersCount` in the `node:http` module. - * The minimum value is `1`. - * @default 128 - */ - maxHeaderListPairs?: number | undefined; - /** - * Sets the maximum number of outstanding, unacknowledged pings. - * @default 10 - */ - maxOutstandingPings?: number | undefined; - /** - * Sets the maximum allowed size for a serialized, compressed block of headers. - * Attempts to send headers that exceed this limit will result in - * a `'frameError'` event being emitted and the stream being closed and destroyed. - */ - maxSendHeaderBlockLength?: number | undefined; - /** - * Strategy used for determining the amount of padding to use for `HEADERS` and `DATA` frames. - * @default http2.constants.PADDING_STRATEGY_NONE - */ - paddingStrategy?: number | undefined; - /** - * Sets the maximum number of concurrent streams for the remote peer as if a `SETTINGS` frame had been received. - * Will be overridden if the remote peer sets its own value for `maxConcurrentStreams`. - * @default 100 - */ - peerMaxConcurrentStreams?: number | undefined; - /** - * The initial settings to send to the remote peer upon connection. - */ - settings?: Settings | undefined; - /** - * The array of integer values determines the settings types, - * which are included in the `CustomSettings`-property of the received remoteSettings. - * Please see the `CustomSettings`-property of the `Http2Settings` object for more information, on the allowed setting types. - */ - remoteCustomSettings?: number[] | undefined; - /** - * Specifies a timeout in milliseconds that - * a server should wait when an [`'unknownProtocol'`][] is emitted. If the - * socket has not been destroyed by that time the server will destroy it. - * @default 100000 - */ - unknownProtocolTimeout?: number | undefined; - } - export interface ClientSessionOptions extends SessionOptions { - /** - * Sets the maximum number of reserved push streams the client will accept at any given time. - * Once the current number of currently reserved push streams exceeds reaches this limit, - * new push streams sent by the server will be automatically rejected. - * The minimum allowed value is 0. The maximum allowed value is 232-1. - * A negative value sets this option to the maximum allowed value. - * @default 200 - */ - maxReservedRemoteStreams?: number | undefined; - /** - * An optional callback that receives the `URL` instance passed to `connect` and the `options` object, - * and returns any `Duplex` stream that is to be used as the connection for this session. - */ - createConnection?: ((authority: url.URL, option: SessionOptions) => stream.Duplex) | undefined; - /** - * The protocol to connect with, if not set in the `authority`. - * Value may be either `'http:'` or `'https:'`. - * @default 'https:' - */ - protocol?: "http:" | "https:" | undefined; - } - export interface ServerSessionOptions< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends SessionOptions { - Http1IncomingMessage?: Http1Request | undefined; - Http1ServerResponse?: Http1Response | undefined; - Http2ServerRequest?: Http2Request | undefined; - Http2ServerResponse?: Http2Response | undefined; - } - export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions {} - export interface SecureServerSessionOptions< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends ServerSessionOptions, tls.TlsOptions {} - export interface ServerOptions< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends ServerSessionOptions {} - export interface SecureServerOptions< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends SecureServerSessionOptions { - allowHTTP1?: boolean | undefined; - origins?: string[] | undefined; - } - interface HTTP2ServerCommon { - setTimeout(msec?: number, callback?: () => void): this; - /** - * Throws ERR_HTTP2_INVALID_SETTING_VALUE for invalid settings values. - * Throws ERR_INVALID_ARG_TYPE for invalid settings argument. - */ - updateSettings(settings: Settings): void; - } - export interface Http2Server< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends net.Server, HTTP2ServerCommon { - addListener( - event: "checkContinue", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - addListener( - event: "request", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - addListener( - event: "session", - listener: (session: ServerHttp2Session) => void, - ): this; - addListener(event: "sessionError", listener: (err: Error) => void): this; - addListener( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - addListener(event: "timeout", listener: () => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit( - event: "checkContinue", - request: InstanceType, - response: InstanceType, - ): boolean; - emit(event: "request", request: InstanceType, response: InstanceType): boolean; - emit( - event: "session", - session: ServerHttp2Session, - ): boolean; - emit(event: "sessionError", err: Error): boolean; - emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; - emit(event: "timeout"): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on( - event: "checkContinue", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - on( - event: "request", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - on( - event: "session", - listener: (session: ServerHttp2Session) => void, - ): this; - on(event: "sessionError", listener: (err: Error) => void): this; - on( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - on(event: "timeout", listener: () => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once( - event: "checkContinue", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - once( - event: "request", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - once( - event: "session", - listener: (session: ServerHttp2Session) => void, - ): this; - once(event: "sessionError", listener: (err: Error) => void): this; - once( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - once(event: "timeout", listener: () => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - event: "checkContinue", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - prependListener( - event: "request", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - prependListener( - event: "session", - listener: (session: ServerHttp2Session) => void, - ): this; - prependListener(event: "sessionError", listener: (err: Error) => void): this; - prependListener( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - prependListener(event: "timeout", listener: () => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - event: "checkContinue", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - prependOnceListener( - event: "request", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - prependOnceListener( - event: "session", - listener: (session: ServerHttp2Session) => void, - ): this; - prependOnceListener(event: "sessionError", listener: (err: Error) => void): this; - prependOnceListener( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - prependOnceListener(event: "timeout", listener: () => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - export interface Http2SecureServer< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - > extends tls.Server, HTTP2ServerCommon { - addListener( - event: "checkContinue", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - addListener( - event: "request", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - addListener( - event: "session", - listener: (session: ServerHttp2Session) => void, - ): this; - addListener(event: "sessionError", listener: (err: Error) => void): this; - addListener( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - addListener(event: "timeout", listener: () => void): this; - addListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit( - event: "checkContinue", - request: InstanceType, - response: InstanceType, - ): boolean; - emit(event: "request", request: InstanceType, response: InstanceType): boolean; - emit( - event: "session", - session: ServerHttp2Session, - ): boolean; - emit(event: "sessionError", err: Error): boolean; - emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean; - emit(event: "timeout"): boolean; - emit(event: "unknownProtocol", socket: tls.TLSSocket): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on( - event: "checkContinue", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - on( - event: "request", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - on( - event: "session", - listener: (session: ServerHttp2Session) => void, - ): this; - on(event: "sessionError", listener: (err: Error) => void): this; - on( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - on(event: "timeout", listener: () => void): this; - on(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once( - event: "checkContinue", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - once( - event: "request", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - once( - event: "session", - listener: (session: ServerHttp2Session) => void, - ): this; - once(event: "sessionError", listener: (err: Error) => void): this; - once( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - once(event: "timeout", listener: () => void): this; - once(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener( - event: "checkContinue", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - prependListener( - event: "request", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - prependListener( - event: "session", - listener: (session: ServerHttp2Session) => void, - ): this; - prependListener(event: "sessionError", listener: (err: Error) => void): this; - prependListener( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - prependListener(event: "timeout", listener: () => void): this; - prependListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener( - event: "checkContinue", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - prependOnceListener( - event: "request", - listener: (request: InstanceType, response: InstanceType) => void, - ): this; - prependOnceListener( - event: "session", - listener: (session: ServerHttp2Session) => void, - ): this; - prependOnceListener(event: "sessionError", listener: (err: Error) => void): this; - prependOnceListener( - event: "stream", - listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void, - ): this; - prependOnceListener(event: "timeout", listener: () => void): this; - prependOnceListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - /** - * A `Http2ServerRequest` object is created by {@link Server} or {@link SecureServer} and passed as the first argument to the `'request'` event. It may be used to access a request status, - * headers, and - * data. - * @since v8.4.0 - */ - export class Http2ServerRequest extends stream.Readable { - constructor( - stream: ServerHttp2Stream, - headers: IncomingHttpHeaders, - options: stream.ReadableOptions, - rawHeaders: readonly string[], - ); - /** - * The `request.aborted` property will be `true` if the request has - * been aborted. - * @since v10.1.0 - */ - readonly aborted: boolean; - /** - * The request authority pseudo header field. Because HTTP/2 allows requests - * to set either `:authority` or `host`, this value is derived from `req.headers[':authority']` if present. Otherwise, it is derived from `req.headers['host']`. - * @since v8.4.0 - */ - readonly authority: string; - /** - * See `request.socket`. - * @since v8.4.0 - * @deprecated Since v13.0.0 - Use `socket`. - */ - readonly connection: net.Socket | tls.TLSSocket; - /** - * The `request.complete` property will be `true` if the request has - * been completed, aborted, or destroyed. - * @since v12.10.0 - */ - readonly complete: boolean; - /** - * The request/response headers object. - * - * Key-value pairs of header names and values. Header names are lower-cased. - * - * ```js - * // Prints something like: - * // - * // { 'user-agent': 'curl/7.22.0', - * // host: '127.0.0.1:8000', - * // accept: '*' } - * console.log(request.headers); - * ``` - * - * See `HTTP/2 Headers Object`. - * - * In HTTP/2, the request path, host name, protocol, and method are represented as - * special headers prefixed with the `:` character (e.g. `':path'`). These special - * headers will be included in the `request.headers` object. Care must be taken not - * to inadvertently modify these special headers or errors may occur. For instance, - * removing all headers from the request will cause errors to occur: - * - * ```js - * removeAllHeaders(request.headers); - * assert(request.url); // Fails because the :path header has been removed - * ``` - * @since v8.4.0 - */ - readonly headers: IncomingHttpHeaders; - /** - * In case of server request, the HTTP version sent by the client. In the case of - * client response, the HTTP version of the connected-to server. Returns `'2.0'`. - * - * Also `message.httpVersionMajor` is the first integer and `message.httpVersionMinor` is the second. - * @since v8.4.0 - */ - readonly httpVersion: string; - readonly httpVersionMinor: number; - readonly httpVersionMajor: number; - /** - * The request method as a string. Read-only. Examples: `'GET'`, `'DELETE'`. - * @since v8.4.0 - */ - readonly method: string; - /** - * The raw request/response headers list exactly as they were received. - * - * The keys and values are in the same list. It is _not_ a - * list of tuples. So, the even-numbered offsets are key values, and the - * odd-numbered offsets are the associated values. - * - * Header names are not lowercased, and duplicates are not merged. - * - * ```js - * // Prints something like: - * // - * // [ 'user-agent', - * // 'this is invalid because there can be only one', - * // 'User-Agent', - * // 'curl/7.22.0', - * // 'Host', - * // '127.0.0.1:8000', - * // 'ACCEPT', - * // '*' ] - * console.log(request.rawHeaders); - * ``` - * @since v8.4.0 - */ - readonly rawHeaders: string[]; - /** - * The raw request/response trailer keys and values exactly as they were - * received. Only populated at the `'end'` event. - * @since v8.4.0 - */ - readonly rawTrailers: string[]; - /** - * The request scheme pseudo header field indicating the scheme - * portion of the target URL. - * @since v8.4.0 - */ - readonly scheme: string; - /** - * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but - * applies getters, setters, and methods based on HTTP/2 logic. - * - * `destroyed`, `readable`, and `writable` properties will be retrieved from and - * set on `request.stream`. - * - * `destroy`, `emit`, `end`, `on` and `once` methods will be called on `request.stream`. - * - * `setTimeout` method will be called on `request.stream.session`. - * - * `pause`, `read`, `resume`, and `write` will throw an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for - * more information. - * - * All other interactions will be routed directly to the socket. With TLS support, - * use `request.socket.getPeerCertificate()` to obtain the client's - * authentication details. - * @since v8.4.0 - */ - readonly socket: net.Socket | tls.TLSSocket; - /** - * The `Http2Stream` object backing the request. - * @since v8.4.0 - */ - readonly stream: ServerHttp2Stream; - /** - * The request/response trailers object. Only populated at the `'end'` event. - * @since v8.4.0 - */ - readonly trailers: IncomingHttpHeaders; - /** - * Request URL string. This contains only the URL that is present in the actual - * HTTP request. If the request is: - * - * ```http - * GET /status?name=ryan HTTP/1.1 - * Accept: text/plain - * ``` - * - * Then `request.url` will be: - * - * ```js - * '/status?name=ryan' - * ``` - * - * To parse the url into its parts, `new URL()` can be used: - * - * ```console - * $ node - * > new URL('/status?name=ryan', 'http://example.com') - * URL { - * href: 'http://example.com/status?name=ryan', - * origin: 'http://example.com', - * protocol: 'http:', - * username: '', - * password: '', - * host: 'example.com', - * hostname: 'example.com', - * port: '', - * pathname: '/status', - * search: '?name=ryan', - * searchParams: URLSearchParams { 'name' => 'ryan' }, - * hash: '' - * } - * ``` - * @since v8.4.0 - */ - url: string; - /** - * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is - * provided, then it is added as a listener on the `'timeout'` event on - * the response object. - * - * If no `'timeout'` listener is added to the request, the response, or - * the server, then `Http2Stream`s are destroyed when they time out. If a - * handler is assigned to the request, the response, or the server's `'timeout'`events, timed out sockets must be handled explicitly. - * @since v8.4.0 - */ - setTimeout(msecs: number, callback?: () => void): void; - read(size?: number): NonSharedBuffer | string | null; - addListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "data", listener: (chunk: NonSharedBuffer | string) => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "readable", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit(event: "aborted", hadError: boolean, code: number): boolean; - emit(event: "close"): boolean; - emit(event: "data", chunk: NonSharedBuffer | string): boolean; - emit(event: "end"): boolean; - emit(event: "readable"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - on(event: "close", listener: () => void): this; - on(event: "data", listener: (chunk: NonSharedBuffer | string) => void): this; - on(event: "end", listener: () => void): this; - on(event: "readable", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - once(event: "close", listener: () => void): this; - once(event: "data", listener: (chunk: NonSharedBuffer | string) => void): this; - once(event: "end", listener: () => void): this; - once(event: "readable", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "data", listener: (chunk: NonSharedBuffer | string) => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "readable", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "data", listener: (chunk: NonSharedBuffer | string) => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "readable", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - /** - * This object is created internally by an HTTP server, not by the user. It is - * passed as the second parameter to the `'request'` event. - * @since v8.4.0 - */ - export class Http2ServerResponse extends stream.Writable { - constructor(stream: ServerHttp2Stream); - /** - * See `response.socket`. - * @since v8.4.0 - * @deprecated Since v13.0.0 - Use `socket`. - */ - readonly connection: net.Socket | tls.TLSSocket; - /** - * Append a single header value to the header object. - * - * If the value is an array, this is equivalent to calling this method multiple times. - * - * If there were no previous values for the header, this is equivalent to calling {@link setHeader}. - * - * Attempting to set a header field name or value that contains invalid characters will result in a - * [TypeError](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-typeerror) being thrown. - * - * ```js - * // Returns headers including "set-cookie: a" and "set-cookie: b" - * const server = http2.createServer((req, res) => { - * res.setHeader('set-cookie', 'a'); - * res.appendHeader('set-cookie', 'b'); - * res.writeHead(200); - * res.end('ok'); - * }); - * ``` - * @since v20.12.0 - */ - appendHeader(name: string, value: string | string[]): void; - /** - * Boolean value that indicates whether the response has completed. Starts - * as `false`. After `response.end()` executes, the value will be `true`. - * @since v8.4.0 - * @deprecated Since v13.4.0,v12.16.0 - Use `writableEnded`. - */ - readonly finished: boolean; - /** - * True if headers were sent, false otherwise (read-only). - * @since v8.4.0 - */ - readonly headersSent: boolean; - /** - * A reference to the original HTTP2 `request` object. - * @since v15.7.0 - */ - readonly req: Request; - /** - * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but - * applies getters, setters, and methods based on HTTP/2 logic. - * - * `destroyed`, `readable`, and `writable` properties will be retrieved from and - * set on `response.stream`. - * - * `destroy`, `emit`, `end`, `on` and `once` methods will be called on `response.stream`. - * - * `setTimeout` method will be called on `response.stream.session`. - * - * `pause`, `read`, `resume`, and `write` will throw an error with code `ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for - * more information. - * - * All other interactions will be routed directly to the socket. - * - * ```js - * import http2 from 'node:http2'; - * const server = http2.createServer((req, res) => { - * const ip = req.socket.remoteAddress; - * const port = req.socket.remotePort; - * res.end(`Your IP address is ${ip} and your source port is ${port}.`); - * }).listen(3000); - * ``` - * @since v8.4.0 - */ - readonly socket: net.Socket | tls.TLSSocket; - /** - * The `Http2Stream` object backing the response. - * @since v8.4.0 - */ - readonly stream: ServerHttp2Stream; - /** - * When true, the Date header will be automatically generated and sent in - * the response if it is not already present in the headers. Defaults to true. - * - * This should only be disabled for testing; HTTP requires the Date header - * in responses. - * @since v8.4.0 - */ - sendDate: boolean; - /** - * When using implicit headers (not calling `response.writeHead()` explicitly), - * this property controls the status code that will be sent to the client when - * the headers get flushed. - * - * ```js - * response.statusCode = 404; - * ``` - * - * After response header was sent to the client, this property indicates the - * status code which was sent out. - * @since v8.4.0 - */ - statusCode: number; - /** - * Status message is not supported by HTTP/2 (RFC 7540 8.1.2.4). It returns - * an empty string. - * @since v8.4.0 - */ - statusMessage: ""; - /** - * This method adds HTTP trailing headers (a header but at the end of the - * message) to the response. - * - * Attempting to set a header field name or value that contains invalid characters - * will result in a `TypeError` being thrown. - * @since v8.4.0 - */ - addTrailers(trailers: OutgoingHttpHeaders): void; - /** - * This method signals to the server that all of the response headers and body - * have been sent; that server should consider this message complete. - * The method, `response.end()`, MUST be called on each response. - * - * If `data` is specified, it is equivalent to calling `response.write(data, encoding)` followed by `response.end(callback)`. - * - * If `callback` is specified, it will be called when the response stream - * is finished. - * @since v8.4.0 - */ - end(callback?: () => void): this; - end(data: string | Uint8Array, callback?: () => void): this; - end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): this; - /** - * Reads out a header that has already been queued but not sent to the client. - * The name is case-insensitive. - * - * ```js - * const contentType = response.getHeader('content-type'); - * ``` - * @since v8.4.0 - */ - getHeader(name: string): string; - /** - * Returns an array containing the unique names of the current outgoing headers. - * All header names are lowercase. - * - * ```js - * response.setHeader('Foo', 'bar'); - * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); - * - * const headerNames = response.getHeaderNames(); - * // headerNames === ['foo', 'set-cookie'] - * ``` - * @since v8.4.0 - */ - getHeaderNames(): string[]; - /** - * Returns a shallow copy of the current outgoing headers. Since a shallow copy - * is used, array values may be mutated without additional calls to various - * header-related http module methods. The keys of the returned object are the - * header names and the values are the respective header values. All header names - * are lowercase. - * - * The object returned by the `response.getHeaders()` method _does not_ prototypically inherit from the JavaScript `Object`. This means that typical `Object` methods such as `obj.toString()`, - * `obj.hasOwnProperty()`, and others - * are not defined and _will not work_. - * - * ```js - * response.setHeader('Foo', 'bar'); - * response.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']); - * - * const headers = response.getHeaders(); - * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] } - * ``` - * @since v8.4.0 - */ - getHeaders(): OutgoingHttpHeaders; - /** - * Returns `true` if the header identified by `name` is currently set in the - * outgoing headers. The header name matching is case-insensitive. - * - * ```js - * const hasContentType = response.hasHeader('content-type'); - * ``` - * @since v8.4.0 - */ - hasHeader(name: string): boolean; - /** - * Removes a header that has been queued for implicit sending. - * - * ```js - * response.removeHeader('Content-Encoding'); - * ``` - * @since v8.4.0 - */ - removeHeader(name: string): void; - /** - * Sets a single header value for implicit headers. If this header already exists - * in the to-be-sent headers, its value will be replaced. Use an array of strings - * here to send multiple headers with the same name. - * - * ```js - * response.setHeader('Content-Type', 'text/html; charset=utf-8'); - * ``` - * - * or - * - * ```js - * response.setHeader('Set-Cookie', ['type=ninja', 'language=javascript']); - * ``` - * - * Attempting to set a header field name or value that contains invalid characters - * will result in a `TypeError` being thrown. - * - * When headers have been set with `response.setHeader()`, they will be merged - * with any headers passed to `response.writeHead()`, with the headers passed - * to `response.writeHead()` given precedence. - * - * ```js - * // Returns content-type = text/plain - * const server = http2.createServer((req, res) => { - * res.setHeader('Content-Type', 'text/html; charset=utf-8'); - * res.setHeader('X-Foo', 'bar'); - * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); - * res.end('ok'); - * }); - * ``` - * @since v8.4.0 - */ - setHeader(name: string, value: number | string | readonly string[]): void; - /** - * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is - * provided, then it is added as a listener on the `'timeout'` event on - * the response object. - * - * If no `'timeout'` listener is added to the request, the response, or - * the server, then `Http2Stream` s are destroyed when they time out. If a - * handler is assigned to the request, the response, or the server's `'timeout'` events, timed out sockets must be handled explicitly. - * @since v8.4.0 - */ - setTimeout(msecs: number, callback?: () => void): void; - /** - * If this method is called and `response.writeHead()` has not been called, - * it will switch to implicit header mode and flush the implicit headers. - * - * This sends a chunk of the response body. This method may - * be called multiple times to provide successive parts of the body. - * - * In the `node:http` module, the response body is omitted when the - * request is a HEAD request. Similarly, the `204` and `304` responses _must not_ include a message body. - * - * `chunk` can be a string or a buffer. If `chunk` is a string, - * the second parameter specifies how to encode it into a byte stream. - * By default the `encoding` is `'utf8'`. `callback` will be called when this chunk - * of data is flushed. - * - * This is the raw HTTP body and has nothing to do with higher-level multi-part - * body encodings that may be used. - * - * The first time `response.write()` is called, it will send the buffered - * header information and the first chunk of the body to the client. The second - * time `response.write()` is called, Node.js assumes data will be streamed, - * and sends the new data separately. That is, the response is buffered up to the - * first chunk of the body. - * - * Returns `true` if the entire data was flushed successfully to the kernel - * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is free again. - * @since v8.4.0 - */ - write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean; - write(chunk: string | Uint8Array, encoding: BufferEncoding, callback?: (err: Error) => void): boolean; - /** - * Sends a status `100 Continue` to the client, indicating that the request body - * should be sent. See the `'checkContinue'` event on `Http2Server` and `Http2SecureServer`. - * @since v8.4.0 - */ - writeContinue(): void; - /** - * Sends a status `103 Early Hints` to the client with a Link header, - * indicating that the user agent can preload/preconnect the linked resources. - * The `hints` is an object containing the values of headers to be sent with - * early hints message. - * - * **Example** - * - * ```js - * const earlyHintsLink = '; rel=preload; as=style'; - * response.writeEarlyHints({ - * 'link': earlyHintsLink, - * }); - * - * const earlyHintsLinks = [ - * '; rel=preload; as=style', - * '; rel=preload; as=script', - * ]; - * response.writeEarlyHints({ - * 'link': earlyHintsLinks, - * }); - * ``` - * @since v18.11.0 - */ - writeEarlyHints(hints: Record): void; - /** - * Sends a response header to the request. The status code is a 3-digit HTTP - * status code, like `404`. The last argument, `headers`, are the response headers. - * - * Returns a reference to the `Http2ServerResponse`, so that calls can be chained. - * - * For compatibility with `HTTP/1`, a human-readable `statusMessage` may be - * passed as the second argument. However, because the `statusMessage` has no - * meaning within HTTP/2, the argument will have no effect and a process warning - * will be emitted. - * - * ```js - * const body = 'hello world'; - * response.writeHead(200, { - * 'Content-Length': Buffer.byteLength(body), - * 'Content-Type': 'text/plain; charset=utf-8', - * }); - * ``` - * - * `Content-Length` is given in bytes not characters. The`Buffer.byteLength()` API may be used to determine the number of bytes in a - * given encoding. On outbound messages, Node.js does not check if Content-Length - * and the length of the body being transmitted are equal or not. However, when - * receiving messages, Node.js will automatically reject messages when the `Content-Length` does not match the actual payload size. - * - * This method may be called at most one time on a message before `response.end()` is called. - * - * If `response.write()` or `response.end()` are called before calling - * this, the implicit/mutable headers will be calculated and call this function. - * - * When headers have been set with `response.setHeader()`, they will be merged - * with any headers passed to `response.writeHead()`, with the headers passed - * to `response.writeHead()` given precedence. - * - * ```js - * // Returns content-type = text/plain - * const server = http2.createServer((req, res) => { - * res.setHeader('Content-Type', 'text/html; charset=utf-8'); - * res.setHeader('X-Foo', 'bar'); - * res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' }); - * res.end('ok'); - * }); - * ``` - * - * Attempting to set a header field name or value that contains invalid characters - * will result in a `TypeError` being thrown. - * @since v8.4.0 - */ - writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this; - writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders): this; - /** - * Call `http2stream.pushStream()` with the given headers, and wrap the - * given `Http2Stream` on a newly created `Http2ServerResponse` as the callback - * parameter if successful. When `Http2ServerRequest` is closed, the callback is - * called with an error `ERR_HTTP2_INVALID_STREAM`. - * @since v8.4.0 - * @param headers An object describing the headers - * @param callback Called once `http2stream.pushStream()` is finished, or either when the attempt to create the pushed `Http2Stream` has failed or has been rejected, or the state of - * `Http2ServerRequest` is closed prior to calling the `http2stream.pushStream()` method - */ - createPushResponse( - headers: OutgoingHttpHeaders, - callback: (err: Error | null, res: Http2ServerResponse) => void, - ): void; - addListener(event: "close", listener: () => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "error", listener: (error: Error) => void): this; - addListener(event: "finish", listener: () => void): this; - addListener(event: "pipe", listener: (src: stream.Readable) => void): this; - addListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit(event: "close"): boolean; - emit(event: "drain"): boolean; - emit(event: "error", error: Error): boolean; - emit(event: "finish"): boolean; - emit(event: "pipe", src: stream.Readable): boolean; - emit(event: "unpipe", src: stream.Readable): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on(event: "close", listener: () => void): this; - on(event: "drain", listener: () => void): this; - on(event: "error", listener: (error: Error) => void): this; - on(event: "finish", listener: () => void): this; - on(event: "pipe", listener: (src: stream.Readable) => void): this; - on(event: "unpipe", listener: (src: stream.Readable) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "drain", listener: () => void): this; - once(event: "error", listener: (error: Error) => void): this; - once(event: "finish", listener: () => void): this; - once(event: "pipe", listener: (src: stream.Readable) => void): this; - once(event: "unpipe", listener: (src: stream.Readable) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "error", listener: (error: Error) => void): this; - prependListener(event: "finish", listener: () => void): this; - prependListener(event: "pipe", listener: (src: stream.Readable) => void): this; - prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "error", listener: (error: Error) => void): this; - prependOnceListener(event: "finish", listener: () => void): this; - prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this; - prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - export namespace constants { - const NGHTTP2_SESSION_SERVER: number; - const NGHTTP2_SESSION_CLIENT: number; - const NGHTTP2_STREAM_STATE_IDLE: number; - const NGHTTP2_STREAM_STATE_OPEN: number; - const NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number; - const NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number; - const NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number; - const NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number; - const NGHTTP2_STREAM_STATE_CLOSED: number; - const NGHTTP2_NO_ERROR: number; - const NGHTTP2_PROTOCOL_ERROR: number; - const NGHTTP2_INTERNAL_ERROR: number; - const NGHTTP2_FLOW_CONTROL_ERROR: number; - const NGHTTP2_SETTINGS_TIMEOUT: number; - const NGHTTP2_STREAM_CLOSED: number; - const NGHTTP2_FRAME_SIZE_ERROR: number; - const NGHTTP2_REFUSED_STREAM: number; - const NGHTTP2_CANCEL: number; - const NGHTTP2_COMPRESSION_ERROR: number; - const NGHTTP2_CONNECT_ERROR: number; - const NGHTTP2_ENHANCE_YOUR_CALM: number; - const NGHTTP2_INADEQUATE_SECURITY: number; - const NGHTTP2_HTTP_1_1_REQUIRED: number; - const NGHTTP2_ERR_FRAME_SIZE_ERROR: number; - const NGHTTP2_FLAG_NONE: number; - const NGHTTP2_FLAG_END_STREAM: number; - const NGHTTP2_FLAG_END_HEADERS: number; - const NGHTTP2_FLAG_ACK: number; - const NGHTTP2_FLAG_PADDED: number; - const NGHTTP2_FLAG_PRIORITY: number; - const DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number; - const DEFAULT_SETTINGS_ENABLE_PUSH: number; - const DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number; - const DEFAULT_SETTINGS_MAX_FRAME_SIZE: number; - const MAX_MAX_FRAME_SIZE: number; - const MIN_MAX_FRAME_SIZE: number; - const MAX_INITIAL_WINDOW_SIZE: number; - const NGHTTP2_DEFAULT_WEIGHT: number; - const NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number; - const NGHTTP2_SETTINGS_ENABLE_PUSH: number; - const NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number; - const NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number; - const NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number; - const NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number; - const PADDING_STRATEGY_NONE: number; - const PADDING_STRATEGY_MAX: number; - const PADDING_STRATEGY_CALLBACK: number; - const HTTP2_HEADER_STATUS: string; - const HTTP2_HEADER_METHOD: string; - const HTTP2_HEADER_AUTHORITY: string; - const HTTP2_HEADER_SCHEME: string; - const HTTP2_HEADER_PATH: string; - const HTTP2_HEADER_ACCEPT_CHARSET: string; - const HTTP2_HEADER_ACCEPT_ENCODING: string; - const HTTP2_HEADER_ACCEPT_LANGUAGE: string; - const HTTP2_HEADER_ACCEPT_RANGES: string; - const HTTP2_HEADER_ACCEPT: string; - const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS: string; - const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_HEADERS: string; - const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_METHODS: string; - const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string; - const HTTP2_HEADER_ACCESS_CONTROL_EXPOSE_HEADERS: string; - const HTTP2_HEADER_ACCESS_CONTROL_REQUEST_HEADERS: string; - const HTTP2_HEADER_ACCESS_CONTROL_REQUEST_METHOD: string; - const HTTP2_HEADER_AGE: string; - const HTTP2_HEADER_ALLOW: string; - const HTTP2_HEADER_AUTHORIZATION: string; - const HTTP2_HEADER_CACHE_CONTROL: string; - const HTTP2_HEADER_CONNECTION: string; - const HTTP2_HEADER_CONTENT_DISPOSITION: string; - const HTTP2_HEADER_CONTENT_ENCODING: string; - const HTTP2_HEADER_CONTENT_LANGUAGE: string; - const HTTP2_HEADER_CONTENT_LENGTH: string; - const HTTP2_HEADER_CONTENT_LOCATION: string; - const HTTP2_HEADER_CONTENT_MD5: string; - const HTTP2_HEADER_CONTENT_RANGE: string; - const HTTP2_HEADER_CONTENT_TYPE: string; - const HTTP2_HEADER_COOKIE: string; - const HTTP2_HEADER_DATE: string; - const HTTP2_HEADER_ETAG: string; - const HTTP2_HEADER_EXPECT: string; - const HTTP2_HEADER_EXPIRES: string; - const HTTP2_HEADER_FROM: string; - const HTTP2_HEADER_HOST: string; - const HTTP2_HEADER_IF_MATCH: string; - const HTTP2_HEADER_IF_MODIFIED_SINCE: string; - const HTTP2_HEADER_IF_NONE_MATCH: string; - const HTTP2_HEADER_IF_RANGE: string; - const HTTP2_HEADER_IF_UNMODIFIED_SINCE: string; - const HTTP2_HEADER_LAST_MODIFIED: string; - const HTTP2_HEADER_LINK: string; - const HTTP2_HEADER_LOCATION: string; - const HTTP2_HEADER_MAX_FORWARDS: string; - const HTTP2_HEADER_PREFER: string; - const HTTP2_HEADER_PROXY_AUTHENTICATE: string; - const HTTP2_HEADER_PROXY_AUTHORIZATION: string; - const HTTP2_HEADER_RANGE: string; - const HTTP2_HEADER_REFERER: string; - const HTTP2_HEADER_REFRESH: string; - const HTTP2_HEADER_RETRY_AFTER: string; - const HTTP2_HEADER_SERVER: string; - const HTTP2_HEADER_SET_COOKIE: string; - const HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string; - const HTTP2_HEADER_TRANSFER_ENCODING: string; - const HTTP2_HEADER_TE: string; - const HTTP2_HEADER_UPGRADE: string; - const HTTP2_HEADER_USER_AGENT: string; - const HTTP2_HEADER_VARY: string; - const HTTP2_HEADER_VIA: string; - const HTTP2_HEADER_WWW_AUTHENTICATE: string; - const HTTP2_HEADER_HTTP2_SETTINGS: string; - const HTTP2_HEADER_KEEP_ALIVE: string; - const HTTP2_HEADER_PROXY_CONNECTION: string; - const HTTP2_METHOD_ACL: string; - const HTTP2_METHOD_BASELINE_CONTROL: string; - const HTTP2_METHOD_BIND: string; - const HTTP2_METHOD_CHECKIN: string; - const HTTP2_METHOD_CHECKOUT: string; - const HTTP2_METHOD_CONNECT: string; - const HTTP2_METHOD_COPY: string; - const HTTP2_METHOD_DELETE: string; - const HTTP2_METHOD_GET: string; - const HTTP2_METHOD_HEAD: string; - const HTTP2_METHOD_LABEL: string; - const HTTP2_METHOD_LINK: string; - const HTTP2_METHOD_LOCK: string; - const HTTP2_METHOD_MERGE: string; - const HTTP2_METHOD_MKACTIVITY: string; - const HTTP2_METHOD_MKCALENDAR: string; - const HTTP2_METHOD_MKCOL: string; - const HTTP2_METHOD_MKREDIRECTREF: string; - const HTTP2_METHOD_MKWORKSPACE: string; - const HTTP2_METHOD_MOVE: string; - const HTTP2_METHOD_OPTIONS: string; - const HTTP2_METHOD_ORDERPATCH: string; - const HTTP2_METHOD_PATCH: string; - const HTTP2_METHOD_POST: string; - const HTTP2_METHOD_PRI: string; - const HTTP2_METHOD_PROPFIND: string; - const HTTP2_METHOD_PROPPATCH: string; - const HTTP2_METHOD_PUT: string; - const HTTP2_METHOD_REBIND: string; - const HTTP2_METHOD_REPORT: string; - const HTTP2_METHOD_SEARCH: string; - const HTTP2_METHOD_TRACE: string; - const HTTP2_METHOD_UNBIND: string; - const HTTP2_METHOD_UNCHECKOUT: string; - const HTTP2_METHOD_UNLINK: string; - const HTTP2_METHOD_UNLOCK: string; - const HTTP2_METHOD_UPDATE: string; - const HTTP2_METHOD_UPDATEREDIRECTREF: string; - const HTTP2_METHOD_VERSION_CONTROL: string; - const HTTP_STATUS_CONTINUE: number; - const HTTP_STATUS_SWITCHING_PROTOCOLS: number; - const HTTP_STATUS_PROCESSING: number; - const HTTP_STATUS_OK: number; - const HTTP_STATUS_CREATED: number; - const HTTP_STATUS_ACCEPTED: number; - const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: number; - const HTTP_STATUS_NO_CONTENT: number; - const HTTP_STATUS_RESET_CONTENT: number; - const HTTP_STATUS_PARTIAL_CONTENT: number; - const HTTP_STATUS_MULTI_STATUS: number; - const HTTP_STATUS_ALREADY_REPORTED: number; - const HTTP_STATUS_IM_USED: number; - const HTTP_STATUS_MULTIPLE_CHOICES: number; - const HTTP_STATUS_MOVED_PERMANENTLY: number; - const HTTP_STATUS_FOUND: number; - const HTTP_STATUS_SEE_OTHER: number; - const HTTP_STATUS_NOT_MODIFIED: number; - const HTTP_STATUS_USE_PROXY: number; - const HTTP_STATUS_TEMPORARY_REDIRECT: number; - const HTTP_STATUS_PERMANENT_REDIRECT: number; - const HTTP_STATUS_BAD_REQUEST: number; - const HTTP_STATUS_UNAUTHORIZED: number; - const HTTP_STATUS_PAYMENT_REQUIRED: number; - const HTTP_STATUS_FORBIDDEN: number; - const HTTP_STATUS_NOT_FOUND: number; - const HTTP_STATUS_METHOD_NOT_ALLOWED: number; - const HTTP_STATUS_NOT_ACCEPTABLE: number; - const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: number; - const HTTP_STATUS_REQUEST_TIMEOUT: number; - const HTTP_STATUS_CONFLICT: number; - const HTTP_STATUS_GONE: number; - const HTTP_STATUS_LENGTH_REQUIRED: number; - const HTTP_STATUS_PRECONDITION_FAILED: number; - const HTTP_STATUS_PAYLOAD_TOO_LARGE: number; - const HTTP_STATUS_URI_TOO_LONG: number; - const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: number; - const HTTP_STATUS_RANGE_NOT_SATISFIABLE: number; - const HTTP_STATUS_EXPECTATION_FAILED: number; - const HTTP_STATUS_TEAPOT: number; - const HTTP_STATUS_MISDIRECTED_REQUEST: number; - const HTTP_STATUS_UNPROCESSABLE_ENTITY: number; - const HTTP_STATUS_LOCKED: number; - const HTTP_STATUS_FAILED_DEPENDENCY: number; - const HTTP_STATUS_UNORDERED_COLLECTION: number; - const HTTP_STATUS_UPGRADE_REQUIRED: number; - const HTTP_STATUS_PRECONDITION_REQUIRED: number; - const HTTP_STATUS_TOO_MANY_REQUESTS: number; - const HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: number; - const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: number; - const HTTP_STATUS_INTERNAL_SERVER_ERROR: number; - const HTTP_STATUS_NOT_IMPLEMENTED: number; - const HTTP_STATUS_BAD_GATEWAY: number; - const HTTP_STATUS_SERVICE_UNAVAILABLE: number; - const HTTP_STATUS_GATEWAY_TIMEOUT: number; - const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: number; - const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: number; - const HTTP_STATUS_INSUFFICIENT_STORAGE: number; - const HTTP_STATUS_LOOP_DETECTED: number; - const HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: number; - const HTTP_STATUS_NOT_EXTENDED: number; - const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: number; - } - /** - * This symbol can be set as a property on the HTTP/2 headers object with - * an array value in order to provide a list of headers considered sensitive. - */ - export const sensitiveHeaders: symbol; - /** - * Returns an object containing the default settings for an `Http2Session` instance. This method returns a new object instance every time it is called - * so instances returned may be safely modified for use. - * @since v8.4.0 - */ - export function getDefaultSettings(): Settings; - /** - * Returns a `Buffer` instance containing serialized representation of the given - * HTTP/2 settings as specified in the [HTTP/2](https://tools.ietf.org/html/rfc7540) specification. This is intended - * for use with the `HTTP2-Settings` header field. - * - * ```js - * import http2 from 'node:http2'; - * - * const packed = http2.getPackedSettings({ enablePush: false }); - * - * console.log(packed.toString('base64')); - * // Prints: AAIAAAAA - * ``` - * @since v8.4.0 - */ - export function getPackedSettings(settings: Settings): NonSharedBuffer; - /** - * Returns a `HTTP/2 Settings Object` containing the deserialized settings from - * the given `Buffer` as generated by `http2.getPackedSettings()`. - * @since v8.4.0 - * @param buf The packed settings. - */ - export function getUnpackedSettings(buf: Uint8Array): Settings; - /** - * Returns a `net.Server` instance that creates and manages `Http2Session` instances. - * - * Since there are no browsers known that support [unencrypted HTTP/2](https://http2.github.io/faq/#does-http2-require-encryption), the use of {@link createSecureServer} is necessary when - * communicating - * with browser clients. - * - * ```js - * import http2 from 'node:http2'; - * - * // Create an unencrypted HTTP/2 server. - * // Since there are no browsers known that support - * // unencrypted HTTP/2, the use of `http2.createSecureServer()` - * // is necessary when communicating with browser clients. - * const server = http2.createServer(); - * - * server.on('stream', (stream, headers) => { - * stream.respond({ - * 'content-type': 'text/html; charset=utf-8', - * ':status': 200, - * }); - * stream.end('

Hello World

'); - * }); - * - * server.listen(8000); - * ``` - * @since v8.4.0 - * @param onRequestHandler See `Compatibility API` - */ - export function createServer( - onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void, - ): Http2Server; - export function createServer< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - >( - options: ServerOptions, - onRequestHandler?: (request: InstanceType, response: InstanceType) => void, - ): Http2Server; - /** - * Returns a `tls.Server` instance that creates and manages `Http2Session` instances. - * - * ```js - * import http2 from 'node:http2'; - * import fs from 'node:fs'; - * - * const options = { - * key: fs.readFileSync('server-key.pem'), - * cert: fs.readFileSync('server-cert.pem'), - * }; - * - * // Create a secure HTTP/2 server - * const server = http2.createSecureServer(options); - * - * server.on('stream', (stream, headers) => { - * stream.respond({ - * 'content-type': 'text/html; charset=utf-8', - * ':status': 200, - * }); - * stream.end('

Hello World

'); - * }); - * - * server.listen(8443); - * ``` - * @since v8.4.0 - * @param onRequestHandler See `Compatibility API` - */ - export function createSecureServer( - onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void, - ): Http2SecureServer; - export function createSecureServer< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - >( - options: SecureServerOptions, - onRequestHandler?: (request: InstanceType, response: InstanceType) => void, - ): Http2SecureServer; - /** - * Returns a `ClientHttp2Session` instance. - * - * ```js - * import http2 from 'node:http2'; - * const client = http2.connect('https://localhost:1234'); - * - * // Use the client - * - * client.close(); - * ``` - * @since v8.4.0 - * @param authority The remote HTTP/2 server to connect to. This must be in the form of a minimal, valid URL with the `http://` or `https://` prefix, host name, and IP port (if a non-default port - * is used). Userinfo (user ID and password), path, querystring, and fragment details in the URL will be ignored. - * @param listener Will be registered as a one-time listener of the {@link 'connect'} event. - */ - export function connect( - authority: string | url.URL, - listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, - ): ClientHttp2Session; - export function connect( - authority: string | url.URL, - options?: ClientSessionOptions | SecureClientSessionOptions, - listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void, - ): ClientHttp2Session; - /** - * Create an HTTP/2 server session from an existing socket. - * @param socket A Duplex Stream - * @param options Any `{@link createServer}` options can be provided. - * @since v20.12.0 - */ - export function performServerHandshake< - Http1Request extends typeof IncomingMessage = typeof IncomingMessage, - Http1Response extends typeof ServerResponse> = typeof ServerResponse, - Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest, - Http2Response extends typeof Http2ServerResponse> = typeof Http2ServerResponse, - >( - socket: stream.Duplex, - options?: ServerOptions, - ): ServerHttp2Session; -} -declare module "node:http2" { - export * from "http2"; -} diff --git a/node_modules/@types/node/https.d.ts b/node_modules/@types/node/https.d.ts deleted file mode 100644 index 5ac4581..0000000 --- a/node_modules/@types/node/https.d.ts +++ /dev/null @@ -1,578 +0,0 @@ -/** - * HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a - * separate module. - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/https.js) - */ -declare module "https" { - import { NonSharedBuffer } from "node:buffer"; - import { Duplex } from "node:stream"; - import * as tls from "node:tls"; - import * as http from "node:http"; - import { URL } from "node:url"; - interface ServerOptions< - Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse> = typeof http.ServerResponse, - > extends http.ServerOptions, tls.TlsOptions {} - interface RequestOptions extends http.RequestOptions, tls.SecureContextOptions { - checkServerIdentity?: typeof tls.checkServerIdentity | undefined; - rejectUnauthorized?: boolean | undefined; // Defaults to true - servername?: string | undefined; // SNI TLS Extension - } - interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions { - rejectUnauthorized?: boolean | undefined; - maxCachedSessions?: number | undefined; - } - /** - * An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information. - * @since v0.4.5 - */ - class Agent extends http.Agent { - constructor(options?: AgentOptions); - options: AgentOptions; - createConnection( - options: RequestOptions, - callback?: (err: Error | null, stream: Duplex) => void, - ): Duplex | null | undefined; - getName(options?: RequestOptions): string; - } - interface Server< - Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse> = typeof http.ServerResponse, - > extends http.Server {} - /** - * See `http.Server` for more information. - * @since v0.3.4 - */ - class Server< - Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse> = typeof http.ServerResponse, - > extends tls.Server { - constructor(requestListener?: http.RequestListener); - constructor( - options: ServerOptions, - requestListener?: http.RequestListener, - ); - /** - * Closes all connections connected to this server. - * @since v18.2.0 - */ - closeAllConnections(): void; - /** - * Closes all connections connected to this server which are not sending a request or waiting for a response. - * @since v18.2.0 - */ - closeIdleConnections(): void; - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: tls.TLSSocket) => void): this; - addListener( - event: "newSession", - listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void, - ): this; - addListener( - event: "OCSPRequest", - listener: ( - certificate: NonSharedBuffer, - issuer: NonSharedBuffer, - callback: (err: Error | null, resp: Buffer | null) => void, - ) => void, - ): this; - addListener( - event: "resumeSession", - listener: ( - sessionId: NonSharedBuffer, - callback: (err: Error | null, sessionData: Buffer | null) => void, - ) => void, - ): this; - addListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this; - addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "connection", listener: (socket: Duplex) => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "listening", listener: () => void): this; - addListener(event: "checkContinue", listener: http.RequestListener): this; - addListener(event: "checkExpectation", listener: http.RequestListener): this; - addListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this; - addListener( - event: "connect", - listener: (req: InstanceType, socket: Duplex, head: NonSharedBuffer) => void, - ): this; - addListener(event: "request", listener: http.RequestListener): this; - addListener( - event: "upgrade", - listener: (req: InstanceType, socket: Duplex, head: NonSharedBuffer) => void, - ): this; - emit(event: string, ...args: any[]): boolean; - emit(event: "keylog", line: NonSharedBuffer, tlsSocket: tls.TLSSocket): boolean; - emit( - event: "newSession", - sessionId: NonSharedBuffer, - sessionData: NonSharedBuffer, - callback: () => void, - ): boolean; - emit( - event: "OCSPRequest", - certificate: NonSharedBuffer, - issuer: NonSharedBuffer, - callback: (err: Error | null, resp: Buffer | null) => void, - ): boolean; - emit( - event: "resumeSession", - sessionId: NonSharedBuffer, - callback: (err: Error | null, sessionData: Buffer | null) => void, - ): boolean; - emit(event: "secureConnection", tlsSocket: tls.TLSSocket): boolean; - emit(event: "tlsClientError", err: Error, tlsSocket: tls.TLSSocket): boolean; - emit(event: "close"): boolean; - emit(event: "connection", socket: Duplex): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "listening"): boolean; - emit( - event: "checkContinue", - req: InstanceType, - res: InstanceType, - ): boolean; - emit( - event: "checkExpectation", - req: InstanceType, - res: InstanceType, - ): boolean; - emit(event: "clientError", err: Error, socket: Duplex): boolean; - emit(event: "connect", req: InstanceType, socket: Duplex, head: NonSharedBuffer): boolean; - emit( - event: "request", - req: InstanceType, - res: InstanceType, - ): boolean; - emit(event: "upgrade", req: InstanceType, socket: Duplex, head: NonSharedBuffer): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: tls.TLSSocket) => void): this; - on( - event: "newSession", - listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void, - ): this; - on( - event: "OCSPRequest", - listener: ( - certificate: NonSharedBuffer, - issuer: NonSharedBuffer, - callback: (err: Error | null, resp: Buffer | null) => void, - ) => void, - ): this; - on( - event: "resumeSession", - listener: ( - sessionId: NonSharedBuffer, - callback: (err: Error | null, sessionData: Buffer | null) => void, - ) => void, - ): this; - on(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this; - on(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; - on(event: "close", listener: () => void): this; - on(event: "connection", listener: (socket: Duplex) => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "listening", listener: () => void): this; - on(event: "checkContinue", listener: http.RequestListener): this; - on(event: "checkExpectation", listener: http.RequestListener): this; - on(event: "clientError", listener: (err: Error, socket: Duplex) => void): this; - on( - event: "connect", - listener: (req: InstanceType, socket: Duplex, head: NonSharedBuffer) => void, - ): this; - on(event: "request", listener: http.RequestListener): this; - on( - event: "upgrade", - listener: (req: InstanceType, socket: Duplex, head: NonSharedBuffer) => void, - ): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: tls.TLSSocket) => void): this; - once( - event: "newSession", - listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void, - ): this; - once( - event: "OCSPRequest", - listener: ( - certificate: NonSharedBuffer, - issuer: NonSharedBuffer, - callback: (err: Error | null, resp: Buffer | null) => void, - ) => void, - ): this; - once( - event: "resumeSession", - listener: ( - sessionId: NonSharedBuffer, - callback: (err: Error | null, sessionData: Buffer | null) => void, - ) => void, - ): this; - once(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this; - once(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; - once(event: "close", listener: () => void): this; - once(event: "connection", listener: (socket: Duplex) => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "listening", listener: () => void): this; - once(event: "checkContinue", listener: http.RequestListener): this; - once(event: "checkExpectation", listener: http.RequestListener): this; - once(event: "clientError", listener: (err: Error, socket: Duplex) => void): this; - once( - event: "connect", - listener: (req: InstanceType, socket: Duplex, head: NonSharedBuffer) => void, - ): this; - once(event: "request", listener: http.RequestListener): this; - once( - event: "upgrade", - listener: (req: InstanceType, socket: Duplex, head: NonSharedBuffer) => void, - ): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: tls.TLSSocket) => void): this; - prependListener( - event: "newSession", - listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void, - ): this; - prependListener( - event: "OCSPRequest", - listener: ( - certificate: NonSharedBuffer, - issuer: NonSharedBuffer, - callback: (err: Error | null, resp: Buffer | null) => void, - ) => void, - ): this; - prependListener( - event: "resumeSession", - listener: ( - sessionId: NonSharedBuffer, - callback: (err: Error | null, sessionData: Buffer | null) => void, - ) => void, - ): this; - prependListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this; - prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "connection", listener: (socket: Duplex) => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "listening", listener: () => void): this; - prependListener(event: "checkContinue", listener: http.RequestListener): this; - prependListener(event: "checkExpectation", listener: http.RequestListener): this; - prependListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this; - prependListener( - event: "connect", - listener: (req: InstanceType, socket: Duplex, head: NonSharedBuffer) => void, - ): this; - prependListener(event: "request", listener: http.RequestListener): this; - prependListener( - event: "upgrade", - listener: (req: InstanceType, socket: Duplex, head: NonSharedBuffer) => void, - ): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: tls.TLSSocket) => void): this; - prependOnceListener( - event: "newSession", - listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void, - ): this; - prependOnceListener( - event: "OCSPRequest", - listener: ( - certificate: NonSharedBuffer, - issuer: NonSharedBuffer, - callback: (err: Error | null, resp: Buffer | null) => void, - ) => void, - ): this; - prependOnceListener( - event: "resumeSession", - listener: ( - sessionId: NonSharedBuffer, - callback: (err: Error | null, sessionData: Buffer | null) => void, - ) => void, - ): this; - prependOnceListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this; - prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "connection", listener: (socket: Duplex) => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "listening", listener: () => void): this; - prependOnceListener(event: "checkContinue", listener: http.RequestListener): this; - prependOnceListener(event: "checkExpectation", listener: http.RequestListener): this; - prependOnceListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this; - prependOnceListener( - event: "connect", - listener: (req: InstanceType, socket: Duplex, head: NonSharedBuffer) => void, - ): this; - prependOnceListener(event: "request", listener: http.RequestListener): this; - prependOnceListener( - event: "upgrade", - listener: (req: InstanceType, socket: Duplex, head: NonSharedBuffer) => void, - ): this; - } - /** - * ```js - * // curl -k https://localhost:8000/ - * import https from 'node:https'; - * import fs from 'node:fs'; - * - * const options = { - * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), - * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), - * }; - * - * https.createServer(options, (req, res) => { - * res.writeHead(200); - * res.end('hello world\n'); - * }).listen(8000); - * ``` - * - * Or - * - * ```js - * import https from 'node:https'; - * import fs from 'node:fs'; - * - * const options = { - * pfx: fs.readFileSync('test/fixtures/test_cert.pfx'), - * passphrase: 'sample', - * }; - * - * https.createServer(options, (req, res) => { - * res.writeHead(200); - * res.end('hello world\n'); - * }).listen(8000); - * ``` - * @since v0.3.4 - * @param options Accepts `options` from `createServer`, `createSecureContext` and `createServer`. - * @param requestListener A listener to be added to the `'request'` event. - */ - function createServer< - Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse> = typeof http.ServerResponse, - >(requestListener?: http.RequestListener): Server; - function createServer< - Request extends typeof http.IncomingMessage = typeof http.IncomingMessage, - Response extends typeof http.ServerResponse> = typeof http.ServerResponse, - >( - options: ServerOptions, - requestListener?: http.RequestListener, - ): Server; - /** - * Makes a request to a secure web server. - * - * The following additional `options` from `tls.connect()` are also accepted: `ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`, `honorCipherOrder`, `key`, `passphrase`, - * `pfx`, `rejectUnauthorized`, `secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`, `highWaterMark`. - * - * `options` can be an object, a string, or a `URL` object. If `options` is a - * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. - * - * `https.request()` returns an instance of the `http.ClientRequest` class. The `ClientRequest` instance is a writable stream. If one needs to - * upload a file with a POST request, then write to the `ClientRequest` object. - * - * ```js - * import https from 'node:https'; - * - * const options = { - * hostname: 'encrypted.google.com', - * port: 443, - * path: '/', - * method: 'GET', - * }; - * - * const req = https.request(options, (res) => { - * console.log('statusCode:', res.statusCode); - * console.log('headers:', res.headers); - * - * res.on('data', (d) => { - * process.stdout.write(d); - * }); - * }); - * - * req.on('error', (e) => { - * console.error(e); - * }); - * req.end(); - * ``` - * - * Example using options from `tls.connect()`: - * - * ```js - * const options = { - * hostname: 'encrypted.google.com', - * port: 443, - * path: '/', - * method: 'GET', - * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), - * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), - * }; - * options.agent = new https.Agent(options); - * - * const req = https.request(options, (res) => { - * // ... - * }); - * ``` - * - * Alternatively, opt out of connection pooling by not using an `Agent`. - * - * ```js - * const options = { - * hostname: 'encrypted.google.com', - * port: 443, - * path: '/', - * method: 'GET', - * key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), - * cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'), - * agent: false, - * }; - * - * const req = https.request(options, (res) => { - * // ... - * }); - * ``` - * - * Example using a `URL` as `options`: - * - * ```js - * const options = new URL('https://abc:xyz@example.com'); - * - * const req = https.request(options, (res) => { - * // ... - * }); - * ``` - * - * Example pinning on certificate fingerprint, or the public key (similar to`pin-sha256`): - * - * ```js - * import tls from 'node:tls'; - * import https from 'node:https'; - * import crypto from 'node:crypto'; - * - * function sha256(s) { - * return crypto.createHash('sha256').update(s).digest('base64'); - * } - * const options = { - * hostname: 'github.com', - * port: 443, - * path: '/', - * method: 'GET', - * checkServerIdentity: function(host, cert) { - * // Make sure the certificate is issued to the host we are connected to - * const err = tls.checkServerIdentity(host, cert); - * if (err) { - * return err; - * } - * - * // Pin the public key, similar to HPKP pin-sha256 pinning - * const pubkey256 = 'pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU='; - * if (sha256(cert.pubkey) !== pubkey256) { - * const msg = 'Certificate verification error: ' + - * `The public key of '${cert.subject.CN}' ` + - * 'does not match our pinned fingerprint'; - * return new Error(msg); - * } - * - * // Pin the exact certificate, rather than the pub key - * const cert256 = '25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:' + - * 'D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16'; - * if (cert.fingerprint256 !== cert256) { - * const msg = 'Certificate verification error: ' + - * `The certificate of '${cert.subject.CN}' ` + - * 'does not match our pinned fingerprint'; - * return new Error(msg); - * } - * - * // This loop is informational only. - * // Print the certificate and public key fingerprints of all certs in the - * // chain. Its common to pin the public key of the issuer on the public - * // internet, while pinning the public key of the service in sensitive - * // environments. - * do { - * console.log('Subject Common Name:', cert.subject.CN); - * console.log(' Certificate SHA256 fingerprint:', cert.fingerprint256); - * - * hash = crypto.createHash('sha256'); - * console.log(' Public key ping-sha256:', sha256(cert.pubkey)); - * - * lastprint256 = cert.fingerprint256; - * cert = cert.issuerCertificate; - * } while (cert.fingerprint256 !== lastprint256); - * - * }, - * }; - * - * options.agent = new https.Agent(options); - * const req = https.request(options, (res) => { - * console.log('All OK. Server matched our pinned cert or public key'); - * console.log('statusCode:', res.statusCode); - * // Print the HPKP values - * console.log('headers:', res.headers['public-key-pins']); - * - * res.on('data', (d) => {}); - * }); - * - * req.on('error', (e) => { - * console.error(e.message); - * }); - * req.end(); - * ``` - * - * Outputs for example: - * - * ```text - * Subject Common Name: github.com - * Certificate SHA256 fingerprint: 25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16 - * Public key ping-sha256: pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU= - * Subject Common Name: DigiCert SHA2 Extended Validation Server CA - * Certificate SHA256 fingerprint: 40:3E:06:2A:26:53:05:91:13:28:5B:AF:80:A0:D4:AE:42:2C:84:8C:9F:78:FA:D0:1F:C9:4B:C5:B8:7F:EF:1A - * Public key ping-sha256: RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho= - * Subject Common Name: DigiCert High Assurance EV Root CA - * Certificate SHA256 fingerprint: 74:31:E5:F4:C3:C1:CE:46:90:77:4F:0B:61:E0:54:40:88:3B:A9:A0:1E:D0:0B:A6:AB:D7:80:6E:D3:B1:18:CF - * Public key ping-sha256: WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18= - * All OK. Server matched our pinned cert or public key - * statusCode: 200 - * headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho="; - * pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4="; - * pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains - * ``` - * @since v0.3.6 - * @param options Accepts all `options` from `request`, with some differences in default values: - */ - function request( - options: RequestOptions | string | URL, - callback?: (res: http.IncomingMessage) => void, - ): http.ClientRequest; - function request( - url: string | URL, - options: RequestOptions, - callback?: (res: http.IncomingMessage) => void, - ): http.ClientRequest; - /** - * Like `http.get()` but for HTTPS. - * - * `options` can be an object, a string, or a `URL` object. If `options` is a - * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object. - * - * ```js - * import https from 'node:https'; - * - * https.get('https://encrypted.google.com/', (res) => { - * console.log('statusCode:', res.statusCode); - * console.log('headers:', res.headers); - * - * res.on('data', (d) => { - * process.stdout.write(d); - * }); - * - * }).on('error', (e) => { - * console.error(e); - * }); - * ``` - * @since v0.3.6 - * @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`. - */ - function get( - options: RequestOptions | string | URL, - callback?: (res: http.IncomingMessage) => void, - ): http.ClientRequest; - function get( - url: string | URL, - options: RequestOptions, - callback?: (res: http.IncomingMessage) => void, - ): http.ClientRequest; - let globalAgent: Agent; -} -declare module "node:https" { - export * from "https"; -} diff --git a/node_modules/@types/node/index.d.ts b/node_modules/@types/node/index.d.ts deleted file mode 100644 index 4676281..0000000 --- a/node_modules/@types/node/index.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -/** - * License for programmatically and manually incorporated - * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc - * - * Copyright Node.js contributors. All rights reserved. - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -// NOTE: These definitions support Node.js and TypeScript 5.7+. - -// Reference required TypeScript libs: -/// - -// TypeScript backwards-compatibility definitions: -/// - -// Definitions specific to TypeScript 5.7+: -/// -/// - -// Definitions for Node.js modules that are not specific to any version of TypeScript: -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// diff --git a/node_modules/@types/node/inspector.generated.d.ts b/node_modules/@types/node/inspector.generated.d.ts deleted file mode 100644 index 3303dba..0000000 --- a/node_modules/@types/node/inspector.generated.d.ts +++ /dev/null @@ -1,3966 +0,0 @@ -// These definitions are automatically generated by the generate-inspector script. -// Do not edit this file directly. -// See scripts/generate-inspector/README.md for information on how to update the protocol definitions. -// Changes to the module itself should be added to the generator template (scripts/generate-inspector/inspector.d.ts.template). - -/** - * The `node:inspector` module provides an API for interacting with the V8 - * inspector. - * @see [source](https://github.com/nodejs/node/blob/v20.x/lib/inspector.js) - */ -declare module 'inspector' { - import EventEmitter = require('node:events'); - - interface InspectorNotification { - method: string; - params: T; - } - - namespace Schema { - /** - * Description of the protocol domain. - */ - interface Domain { - /** - * Domain name. - */ - name: string; - /** - * Domain version. - */ - version: string; - } - interface GetDomainsReturnType { - /** - * List of supported domains. - */ - domains: Domain[]; - } - } - namespace Runtime { - /** - * Unique script identifier. - */ - type ScriptId = string; - /** - * Unique object identifier. - */ - type RemoteObjectId = string; - /** - * Primitive value which cannot be JSON-stringified. - */ - type UnserializableValue = string; - /** - * Mirror object referencing original JavaScript object. - */ - interface RemoteObject { - /** - * Object type. - */ - type: string; - /** - * Object subtype hint. Specified for object type values only. - */ - subtype?: string | undefined; - /** - * Object class (constructor) name. Specified for object type values only. - */ - className?: string | undefined; - /** - * 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 | undefined; - /** - * String representation of the object. - */ - description?: string | undefined; - /** - * Unique object identifier (for non-primitive values). - */ - objectId?: RemoteObjectId | undefined; - /** - * Preview containing abbreviated property values. Specified for object type values only. - * @experimental - */ - preview?: ObjectPreview | undefined; - /** - * @experimental - */ - customPreview?: CustomPreview | undefined; - } - /** - * @experimental - */ - interface CustomPreview { - header: string; - hasBody: boolean; - formatterObjectId: RemoteObjectId; - bindRemoteObjectFunctionId: RemoteObjectId; - configObjectId?: RemoteObjectId | undefined; - } - /** - * Object containing abbreviated remote object value. - * @experimental - */ - interface ObjectPreview { - /** - * Object type. - */ - type: string; - /** - * Object subtype hint. Specified for object type values only. - */ - subtype?: string | undefined; - /** - * String representation of the object. - */ - description?: string | undefined; - /** - * 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[] | undefined; - } - /** - * @experimental - */ - interface PropertyPreview { - /** - * Property name. - */ - name: string; - /** - * Object type. Accessor means that the property itself is an accessor property. - */ - type: string; - /** - * User-friendly property value string. - */ - value?: string | undefined; - /** - * Nested value preview. - */ - valuePreview?: ObjectPreview | undefined; - /** - * Object subtype hint. Specified for object type values only. - */ - subtype?: string | undefined; - } - /** - * @experimental - */ - interface EntryPreview { - /** - * Preview of the key. Specified for map-like collection entries. - */ - key?: ObjectPreview | undefined; - /** - * Preview of the value. - */ - value: ObjectPreview; - } - /** - * Object property descriptor. - */ - interface PropertyDescriptor { - /** - * Property name or symbol description. - */ - name: string; - /** - * The value associated with the property. - */ - value?: RemoteObject | undefined; - /** - * True if the value associated with the property may be changed (data descriptors only). - */ - writable?: boolean | undefined; - /** - * A function which serves as a getter for the property, or undefined if there is no getter (accessor descriptors only). - */ - get?: RemoteObject | undefined; - /** - * A function which serves as a setter for the property, or undefined if there is no setter (accessor descriptors only). - */ - set?: RemoteObject | undefined; - /** - * 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 | undefined; - /** - * True if the property is owned for the object. - */ - isOwn?: boolean | undefined; - /** - * Property symbol object, if the property is of the symbol type. - */ - symbol?: RemoteObject | undefined; - } - /** - * Object internal property descriptor. This property isn't normally visible in JavaScript code. - */ - interface InternalPropertyDescriptor { - /** - * Conventional property name. - */ - name: string; - /** - * The value associated with the property. - */ - value?: RemoteObject | undefined; - } - /** - * Represents function call argument. Either remote object id objectId, primitive value, unserializable primitive value or neither of (for undefined) them should be specified. - */ - interface CallArgument { - /** - * Primitive value or serializable javascript object. - */ - value?: any; - /** - * Primitive value which can not be JSON-stringified. - */ - unserializableValue?: UnserializableValue | undefined; - /** - * Remote object handle. - */ - objectId?: RemoteObjectId | undefined; - } - /** - * Id of an execution context. - */ - type ExecutionContextId = number; - /** - * Description of an isolated world. - */ - 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?: {} | undefined; - } - /** - * Detailed information about exception (or error) that was thrown during script compilation or execution. - */ - interface ExceptionDetails { - /** - * Exception id. - */ - exceptionId: number; - /** - * Exception text, which should be used together with exception object when available. - */ - text: string; - /** - * Line number of the exception location (0-based). - */ - lineNumber: number; - /** - * Column number of the exception location (0-based). - */ - columnNumber: number; - /** - * Script ID of the exception location. - */ - scriptId?: ScriptId | undefined; - /** - * URL of the exception location, to be used when the script was not reported. - */ - url?: string | undefined; - /** - * JavaScript stack trace if available. - */ - stackTrace?: StackTrace | undefined; - /** - * Exception object if available. - */ - exception?: RemoteObject | undefined; - /** - * Identifier of the context where exception happened. - */ - executionContextId?: ExecutionContextId | undefined; - } - /** - * Number of milliseconds since epoch. - */ - type Timestamp = number; - /** - * Stack entry for runtime errors and assertions. - */ - 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: number; - /** - * JavaScript script column number (0-based). - */ - columnNumber: number; - } - /** - * Call frames for assertions or error messages. - */ - 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 | undefined; - /** - * JavaScript function name. - */ - callFrames: CallFrame[]; - /** - * Asynchronous JavaScript stack trace that preceded this stack, if available. - */ - parent?: StackTrace | undefined; - /** - * Asynchronous JavaScript stack trace that preceded this stack, if available. - * @experimental - */ - parentId?: StackTraceId | undefined; - } - /** - * Unique identifier of current debugger. - * @experimental - */ - 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. - * @experimental - */ - interface StackTraceId { - id: string; - debuggerId?: UniqueDebuggerId | undefined; - } - interface EvaluateParameterType { - /** - * Expression to evaluate. - */ - expression: string; - /** - * Symbolic group name that can be used to release multiple objects. - */ - objectGroup?: string | undefined; - /** - * Determines whether Command Line API should be available during the evaluation. - */ - includeCommandLineAPI?: boolean | undefined; - /** - * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. - */ - silent?: boolean | undefined; - /** - * 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 | undefined; - /** - * Whether the result is expected to be a JSON object that should be sent by value. - */ - returnByValue?: boolean | undefined; - /** - * Whether preview should be generated for the result. - * @experimental - */ - generatePreview?: boolean | undefined; - /** - * Whether execution should be treated as initiated by user in the UI. - */ - userGesture?: boolean | undefined; - /** - * Whether execution should await for resulting value and return once awaited promise is resolved. - */ - awaitPromise?: boolean | undefined; - } - interface AwaitPromiseParameterType { - /** - * Identifier of the promise. - */ - promiseObjectId: RemoteObjectId; - /** - * Whether the result is expected to be a JSON object that should be sent by value. - */ - returnByValue?: boolean | undefined; - /** - * Whether preview should be generated for the result. - */ - generatePreview?: boolean | undefined; - } - interface CallFunctionOnParameterType { - /** - * 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 | undefined; - /** - * Call arguments. All call arguments must belong to the same JavaScript world as the target object. - */ - arguments?: CallArgument[] | undefined; - /** - * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. - */ - silent?: boolean | undefined; - /** - * Whether the result is expected to be a JSON object which should be sent by value. - */ - returnByValue?: boolean | undefined; - /** - * Whether preview should be generated for the result. - * @experimental - */ - generatePreview?: boolean | undefined; - /** - * Whether execution should be treated as initiated by user in the UI. - */ - userGesture?: boolean | undefined; - /** - * Whether execution should await for resulting value and return once awaited promise is resolved. - */ - awaitPromise?: boolean | undefined; - /** - * Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified. - */ - executionContextId?: ExecutionContextId | undefined; - /** - * 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 | undefined; - } - interface GetPropertiesParameterType { - /** - * 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 | undefined; - /** - * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either. - * @experimental - */ - accessorPropertiesOnly?: boolean | undefined; - /** - * Whether preview should be generated for the results. - * @experimental - */ - generatePreview?: boolean | undefined; - } - interface ReleaseObjectParameterType { - /** - * Identifier of the object to release. - */ - objectId: RemoteObjectId; - } - interface ReleaseObjectGroupParameterType { - /** - * Symbolic object group name. - */ - objectGroup: string; - } - interface SetCustomObjectFormatterEnabledParameterType { - enabled: boolean; - } - interface CompileScriptParameterType { - /** - * 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 | undefined; - } - interface RunScriptParameterType { - /** - * 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 | undefined; - /** - * Symbolic group name that can be used to release multiple objects. - */ - objectGroup?: string | undefined; - /** - * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. - */ - silent?: boolean | undefined; - /** - * Determines whether Command Line API should be available during the evaluation. - */ - includeCommandLineAPI?: boolean | undefined; - /** - * Whether the result is expected to be a JSON object which should be sent by value. - */ - returnByValue?: boolean | undefined; - /** - * Whether preview should be generated for the result. - */ - generatePreview?: boolean | undefined; - /** - * Whether execution should await for resulting value and return once awaited promise is resolved. - */ - awaitPromise?: boolean | undefined; - } - interface QueryObjectsParameterType { - /** - * Identifier of the prototype to return objects for. - */ - prototypeObjectId: RemoteObjectId; - } - interface GlobalLexicalScopeNamesParameterType { - /** - * Specifies in which execution context to lookup global scope variables. - */ - executionContextId?: ExecutionContextId | undefined; - } - interface EvaluateReturnType { - /** - * Evaluation result. - */ - result: RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails | undefined; - } - interface AwaitPromiseReturnType { - /** - * Promise result. Will contain rejected value if promise was rejected. - */ - result: RemoteObject; - /** - * Exception details if stack strace is available. - */ - exceptionDetails?: ExceptionDetails | undefined; - } - interface CallFunctionOnReturnType { - /** - * Call result. - */ - result: RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails | undefined; - } - interface GetPropertiesReturnType { - /** - * Object properties. - */ - result: PropertyDescriptor[]; - /** - * Internal object properties (only of the element itself). - */ - internalProperties?: InternalPropertyDescriptor[] | undefined; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails | undefined; - } - interface CompileScriptReturnType { - /** - * Id of the script. - */ - scriptId?: ScriptId | undefined; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails | undefined; - } - interface RunScriptReturnType { - /** - * Run result. - */ - result: RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: ExceptionDetails | undefined; - } - interface QueryObjectsReturnType { - /** - * Array with objects. - */ - objects: RemoteObject; - } - interface GlobalLexicalScopeNamesReturnType { - names: string[]; - } - interface ExecutionContextCreatedEventDataType { - /** - * A newly created execution context. - */ - context: ExecutionContextDescription; - } - interface ExecutionContextDestroyedEventDataType { - /** - * Id of the destroyed context - */ - executionContextId: ExecutionContextId; - } - interface ExceptionThrownEventDataType { - /** - * Timestamp of the exception. - */ - timestamp: Timestamp; - exceptionDetails: ExceptionDetails; - } - interface ExceptionRevokedEventDataType { - /** - * Reason describing why exception was revoked. - */ - reason: string; - /** - * The id of revoked exception, as reported in exceptionThrown. - */ - exceptionId: number; - } - interface ConsoleAPICalledEventDataType { - /** - * Type of the call. - */ - type: string; - /** - * 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. - */ - stackTrace?: StackTrace | undefined; - /** - * 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. - * @experimental - */ - context?: string | undefined; - } - interface InspectRequestedEventDataType { - object: RemoteObject; - hints: {}; - } - } - namespace Debugger { - /** - * Breakpoint identifier. - */ - type BreakpointId = string; - /** - * Call frame identifier. - */ - type CallFrameId = string; - /** - * Location in the source code. - */ - interface Location { - /** - * Script identifier as reported in the Debugger.scriptParsed. - */ - scriptId: Runtime.ScriptId; - /** - * Line number in the script (0-based). - */ - lineNumber: number; - /** - * Column number in the script (0-based). - */ - columnNumber?: number | undefined; - } - /** - * Location in the source code. - * @experimental - */ - interface ScriptPosition { - lineNumber: number; - columnNumber: number; - } - /** - * JavaScript call frame. Array of call frames form the call stack. - */ - 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 | undefined; - /** - * 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 | undefined; - } - /** - * Scope description. - */ - interface Scope { - /** - * Scope type. - */ - type: string; - /** - * 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 | undefined; - /** - * Location in the source code where scope starts - */ - startLocation?: Location | undefined; - /** - * Location in the source code where scope ends - */ - endLocation?: Location | undefined; - } - /** - * Search match for resource. - */ - interface SearchMatch { - /** - * Line number in resource content. - */ - lineNumber: number; - /** - * Line with match content. - */ - lineContent: string; - } - interface BreakLocation { - /** - * Script identifier as reported in the Debugger.scriptParsed. - */ - scriptId: Runtime.ScriptId; - /** - * Line number in the script (0-based). - */ - lineNumber: number; - /** - * Column number in the script (0-based). - */ - columnNumber?: number | undefined; - type?: string | undefined; - } - interface SetBreakpointsActiveParameterType { - /** - * New value for breakpoints active state. - */ - active: boolean; - } - interface SetSkipAllPausesParameterType { - /** - * New value for skip pauses state. - */ - skip: boolean; - } - interface SetBreakpointByUrlParameterType { - /** - * Line number to set breakpoint at. - */ - lineNumber: number; - /** - * URL of the resources to set breakpoint on. - */ - url?: string | undefined; - /** - * Regex pattern for the URLs of the resources to set breakpoints on. Either url or urlRegex must be specified. - */ - urlRegex?: string | undefined; - /** - * Script hash of the resources to set breakpoint on. - */ - scriptHash?: string | undefined; - /** - * Offset in the line to set breakpoint at. - */ - columnNumber?: number | undefined; - /** - * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. - */ - condition?: string | undefined; - } - interface SetBreakpointParameterType { - /** - * 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 | undefined; - } - interface RemoveBreakpointParameterType { - breakpointId: BreakpointId; - } - interface GetPossibleBreakpointsParameterType { - /** - * 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 | undefined; - /** - * Only consider locations which are in the same (non-nested) function as start. - */ - restrictToFunction?: boolean | undefined; - } - interface ContinueToLocationParameterType { - /** - * Location to continue to. - */ - location: Location; - targetCallFrames?: string | undefined; - } - interface PauseOnAsyncCallParameterType { - /** - * Debugger will pause when async call with given stack trace is started. - */ - parentStackTraceId: Runtime.StackTraceId; - } - interface StepIntoParameterType { - /** - * Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause. - * @experimental - */ - breakOnAsyncCall?: boolean | undefined; - } - interface GetStackTraceParameterType { - stackTraceId: Runtime.StackTraceId; - } - interface SearchInContentParameterType { - /** - * Id of the script to search in. - */ - scriptId: Runtime.ScriptId; - /** - * String to search for. - */ - query: string; - /** - * If true, search is case sensitive. - */ - caseSensitive?: boolean | undefined; - /** - * If true, treats string parameter as regex. - */ - isRegex?: boolean | undefined; - } - interface SetScriptSourceParameterType { - /** - * 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 | undefined; - } - interface RestartFrameParameterType { - /** - * Call frame identifier to evaluate on. - */ - callFrameId: CallFrameId; - } - interface GetScriptSourceParameterType { - /** - * Id of the script to get source for. - */ - scriptId: Runtime.ScriptId; - } - interface SetPauseOnExceptionsParameterType { - /** - * Pause on exceptions mode. - */ - state: string; - } - interface EvaluateOnCallFrameParameterType { - /** - * 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 | undefined; - /** - * Specifies whether command line API should be available to the evaluated expression, defaults to false. - */ - includeCommandLineAPI?: boolean | undefined; - /** - * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. - */ - silent?: boolean | undefined; - /** - * Whether the result is expected to be a JSON object that should be sent by value. - */ - returnByValue?: boolean | undefined; - /** - * Whether preview should be generated for the result. - * @experimental - */ - generatePreview?: boolean | undefined; - /** - * Whether to throw an exception if side effect cannot be ruled out during evaluation. - */ - throwOnSideEffect?: boolean | undefined; - } - interface SetVariableValueParameterType { - /** - * 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: number; - /** - * Variable name. - */ - variableName: string; - /** - * New variable value. - */ - newValue: Runtime.CallArgument; - /** - * Id of callframe that holds variable. - */ - callFrameId: CallFrameId; - } - interface SetReturnValueParameterType { - /** - * New return value. - */ - newValue: Runtime.CallArgument; - } - interface SetAsyncCallStackDepthParameterType { - /** - * Maximum depth of async call stacks. Setting to 0 will effectively disable collecting async call stacks (default). - */ - maxDepth: number; - } - interface SetBlackboxPatternsParameterType { - /** - * Array of regexps that will be used to check script url for blackbox state. - */ - patterns: string[]; - } - interface SetBlackboxedRangesParameterType { - /** - * Id of the script. - */ - scriptId: Runtime.ScriptId; - positions: ScriptPosition[]; - } - interface EnableReturnType { - /** - * Unique identifier of the debugger. - * @experimental - */ - debuggerId: Runtime.UniqueDebuggerId; - } - interface SetBreakpointByUrlReturnType { - /** - * Id of the created breakpoint for further reference. - */ - breakpointId: BreakpointId; - /** - * List of the locations this breakpoint resolved into upon addition. - */ - locations: Location[]; - } - interface SetBreakpointReturnType { - /** - * Id of the created breakpoint for further reference. - */ - breakpointId: BreakpointId; - /** - * Location this breakpoint resolved into. - */ - actualLocation: Location; - } - interface GetPossibleBreakpointsReturnType { - /** - * List of the possible breakpoint locations. - */ - locations: BreakLocation[]; - } - interface GetStackTraceReturnType { - stackTrace: Runtime.StackTrace; - } - interface SearchInContentReturnType { - /** - * List of search matches. - */ - result: SearchMatch[]; - } - interface SetScriptSourceReturnType { - /** - * New stack trace in case editing has happened while VM was stopped. - */ - callFrames?: CallFrame[] | undefined; - /** - * Whether current call stack was modified after applying the changes. - */ - stackChanged?: boolean | undefined; - /** - * Async stack trace, if any. - */ - asyncStackTrace?: Runtime.StackTrace | undefined; - /** - * Async stack trace, if any. - * @experimental - */ - asyncStackTraceId?: Runtime.StackTraceId | undefined; - /** - * Exception details if any. - */ - exceptionDetails?: Runtime.ExceptionDetails | undefined; - } - interface RestartFrameReturnType { - /** - * New stack trace. - */ - callFrames: CallFrame[]; - /** - * Async stack trace, if any. - */ - asyncStackTrace?: Runtime.StackTrace | undefined; - /** - * Async stack trace, if any. - * @experimental - */ - asyncStackTraceId?: Runtime.StackTraceId | undefined; - } - interface GetScriptSourceReturnType { - /** - * Script source. - */ - scriptSource: string; - } - interface EvaluateOnCallFrameReturnType { - /** - * Object wrapper for the evaluation result. - */ - result: Runtime.RemoteObject; - /** - * Exception details. - */ - exceptionDetails?: Runtime.ExceptionDetails | undefined; - } - interface ScriptParsedEventDataType { - /** - * 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: number; - /** - * Column offset of the script within the resource with given URL. - */ - startColumn: number; - /** - * Last line of the script. - */ - endLine: number; - /** - * Length of the last line of the script. - */ - endColumn: number; - /** - * Specifies script creation context. - */ - executionContextId: Runtime.ExecutionContextId; - /** - * Content hash of the script. - */ - hash: string; - /** - * Embedder-specific auxiliary data. - */ - executionContextAuxData?: {} | undefined; - /** - * True, if this script is generated as a result of the live edit operation. - * @experimental - */ - isLiveEdit?: boolean | undefined; - /** - * URL of source map associated with script (if any). - */ - sourceMapURL?: string | undefined; - /** - * True, if this script has sourceURL. - */ - hasSourceURL?: boolean | undefined; - /** - * True, if this script is ES6 module. - */ - isModule?: boolean | undefined; - /** - * This script length. - */ - length?: number | undefined; - /** - * JavaScript top stack frame of where the script parsed event was triggered if available. - * @experimental - */ - stackTrace?: Runtime.StackTrace | undefined; - } - interface ScriptFailedToParseEventDataType { - /** - * 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: number; - /** - * Column offset of the script within the resource with given URL. - */ - startColumn: number; - /** - * Last line of the script. - */ - endLine: number; - /** - * Length of the last line of the script. - */ - endColumn: number; - /** - * Specifies script creation context. - */ - executionContextId: Runtime.ExecutionContextId; - /** - * Content hash of the script. - */ - hash: string; - /** - * Embedder-specific auxiliary data. - */ - executionContextAuxData?: {} | undefined; - /** - * URL of source map associated with script (if any). - */ - sourceMapURL?: string | undefined; - /** - * True, if this script has sourceURL. - */ - hasSourceURL?: boolean | undefined; - /** - * True, if this script is ES6 module. - */ - isModule?: boolean | undefined; - /** - * This script length. - */ - length?: number | undefined; - /** - * JavaScript top stack frame of where the script parsed event was triggered if available. - * @experimental - */ - stackTrace?: Runtime.StackTrace | undefined; - } - interface BreakpointResolvedEventDataType { - /** - * Breakpoint unique identifier. - */ - breakpointId: BreakpointId; - /** - * Actual breakpoint location. - */ - location: Location; - } - interface PausedEventDataType { - /** - * Call stack the virtual machine stopped on. - */ - callFrames: CallFrame[]; - /** - * Pause reason. - */ - reason: string; - /** - * Object containing break-specific auxiliary properties. - */ - data?: {} | undefined; - /** - * Hit breakpoints IDs - */ - hitBreakpoints?: string[] | undefined; - /** - * Async stack trace, if any. - */ - asyncStackTrace?: Runtime.StackTrace | undefined; - /** - * Async stack trace, if any. - * @experimental - */ - asyncStackTraceId?: Runtime.StackTraceId | undefined; - /** - * Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after Debugger.stepInto call with breakOnAsynCall flag. - * @experimental - */ - asyncCallStackTraceId?: Runtime.StackTraceId | undefined; - } - } - namespace Console { - /** - * Console message. - */ - interface ConsoleMessage { - /** - * Message source. - */ - source: string; - /** - * Message severity. - */ - level: string; - /** - * Message text. - */ - text: string; - /** - * URL of the message origin. - */ - url?: string | undefined; - /** - * Line number in the resource that generated this message (1-based). - */ - line?: number | undefined; - /** - * Column number in the resource that generated this message (1-based). - */ - column?: number | undefined; - } - interface MessageAddedEventDataType { - /** - * Console message that has been added. - */ - message: ConsoleMessage; - } - } - namespace Profiler { - /** - * Profile node. Holds callsite information, execution statistics and child nodes. - */ - interface ProfileNode { - /** - * Unique id of the node. - */ - id: number; - /** - * Function location. - */ - callFrame: Runtime.CallFrame; - /** - * Number of samples where this node was on top of the call stack. - */ - hitCount?: number | undefined; - /** - * Child node ids. - */ - children?: number[] | undefined; - /** - * The reason of being not optimized. The function may be deoptimized or marked as don't optimize. - */ - deoptReason?: string | undefined; - /** - * An array of source position ticks. - */ - positionTicks?: PositionTickInfo[] | undefined; - } - /** - * Profile. - */ - 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?: number[] | undefined; - /** - * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime. - */ - timeDeltas?: number[] | undefined; - } - /** - * Specifies a number of samples attributed to a certain source position. - */ - interface PositionTickInfo { - /** - * Source line number (1-based). - */ - line: number; - /** - * Number of samples attributed to the source line. - */ - ticks: number; - } - /** - * Coverage data for a source range. - */ - interface CoverageRange { - /** - * JavaScript script source offset for the range start. - */ - startOffset: number; - /** - * JavaScript script source offset for the range end. - */ - endOffset: number; - /** - * Collected execution count of the source range. - */ - count: number; - } - /** - * Coverage data for a JavaScript function. - */ - 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. - */ - 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[]; - } - interface SetSamplingIntervalParameterType { - /** - * New sampling interval in microseconds. - */ - interval: number; - } - interface StartPreciseCoverageParameterType { - /** - * Collect accurate call counts beyond simple 'covered' or 'not covered'. - */ - callCount?: boolean | undefined; - /** - * Collect block-based coverage. - */ - detailed?: boolean | undefined; - } - interface StopReturnType { - /** - * Recorded profile. - */ - profile: Profile; - } - interface TakePreciseCoverageReturnType { - /** - * Coverage data for the current isolate. - */ - result: ScriptCoverage[]; - } - interface GetBestEffortCoverageReturnType { - /** - * Coverage data for the current isolate. - */ - result: ScriptCoverage[]; - } - interface ConsoleProfileStartedEventDataType { - id: string; - /** - * Location of console.profile(). - */ - location: Debugger.Location; - /** - * Profile title passed as an argument to console.profile(). - */ - title?: string | undefined; - } - interface ConsoleProfileFinishedEventDataType { - id: string; - /** - * Location of console.profileEnd(). - */ - location: Debugger.Location; - profile: Profile; - /** - * Profile title passed as an argument to console.profile(). - */ - title?: string | undefined; - } - } - namespace HeapProfiler { - /** - * Heap snapshot object id. - */ - type HeapSnapshotObjectId = string; - /** - * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes. - */ - interface SamplingHeapProfileNode { - /** - * Function location. - */ - callFrame: Runtime.CallFrame; - /** - * Allocations size in bytes for the node excluding children. - */ - selfSize: number; - /** - * Child nodes. - */ - children: SamplingHeapProfileNode[]; - } - /** - * Profile. - */ - interface SamplingHeapProfile { - head: SamplingHeapProfileNode; - } - interface StartTrackingHeapObjectsParameterType { - trackAllocations?: boolean | undefined; - } - interface StopTrackingHeapObjectsParameterType { - /** - * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped. - */ - reportProgress?: boolean | undefined; - } - interface TakeHeapSnapshotParameterType { - /** - * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. - */ - reportProgress?: boolean | undefined; - } - interface GetObjectByHeapObjectIdParameterType { - objectId: HeapSnapshotObjectId; - /** - * Symbolic group name that can be used to release multiple objects. - */ - objectGroup?: string | undefined; - } - interface AddInspectedHeapObjectParameterType { - /** - * Heap snapshot object id to be accessible by means of $x command line API. - */ - heapObjectId: HeapSnapshotObjectId; - } - interface GetHeapObjectIdParameterType { - /** - * Identifier of the object to get heap object id for. - */ - objectId: Runtime.RemoteObjectId; - } - interface StartSamplingParameterType { - /** - * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes. - */ - samplingInterval?: number | undefined; - } - interface GetObjectByHeapObjectIdReturnType { - /** - * Evaluation result. - */ - result: Runtime.RemoteObject; - } - interface GetHeapObjectIdReturnType { - /** - * Id of the heap snapshot object corresponding to the passed remote object id. - */ - heapSnapshotObjectId: HeapSnapshotObjectId; - } - interface StopSamplingReturnType { - /** - * Recorded sampling heap profile. - */ - profile: SamplingHeapProfile; - } - interface GetSamplingProfileReturnType { - /** - * Return the sampling profile being collected. - */ - profile: SamplingHeapProfile; - } - interface AddHeapSnapshotChunkEventDataType { - chunk: string; - } - interface ReportHeapSnapshotProgressEventDataType { - done: number; - total: number; - finished?: boolean | undefined; - } - interface LastSeenObjectIdEventDataType { - lastSeenObjectId: number; - timestamp: number; - } - interface HeapStatsUpdateEventDataType { - /** - * 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: number[]; - } - } - namespace NodeTracing { - interface TraceConfig { - /** - * Controls how the trace buffer stores data. - */ - recordMode?: string | undefined; - /** - * Included category filters. - */ - includedCategories: string[]; - } - interface StartParameterType { - traceConfig: TraceConfig; - } - interface GetCategoriesReturnType { - /** - * A list of supported tracing categories. - */ - categories: string[]; - } - interface DataCollectedEventDataType { - value: Array<{}>; - } - } - namespace NodeWorker { - type WorkerID = string; - /** - * Unique identifier of attached debugging session. - */ - type SessionID = string; - interface WorkerInfo { - workerId: WorkerID; - type: string; - title: string; - url: string; - } - interface SendMessageToWorkerParameterType { - message: string; - /** - * Identifier of the session. - */ - sessionId: SessionID; - } - interface EnableParameterType { - /** - * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger` - * message to run them. - */ - waitForDebuggerOnStart: boolean; - } - interface DetachParameterType { - sessionId: SessionID; - } - interface AttachedToWorkerEventDataType { - /** - * Identifier assigned to the session used to send/receive messages. - */ - sessionId: SessionID; - workerInfo: WorkerInfo; - waitingForDebugger: boolean; - } - interface DetachedFromWorkerEventDataType { - /** - * Detached session identifier. - */ - sessionId: SessionID; - } - interface ReceivedMessageFromWorkerEventDataType { - /** - * Identifier of a session which sends a message. - */ - sessionId: SessionID; - message: string; - } - } - namespace Network { - /** - * Resource type as it was perceived by the rendering engine. - */ - type ResourceType = string; - /** - * Unique request identifier. - */ - type RequestId = string; - /** - * UTC time in seconds, counted from January 1, 1970. - */ - type TimeSinceEpoch = number; - /** - * Monotonically increasing time in seconds since an arbitrary point in the past. - */ - type MonotonicTime = number; - /** - * HTTP request data. - */ - interface Request { - url: string; - method: string; - headers: Headers; - } - /** - * HTTP response data. - */ - interface Response { - url: string; - status: number; - statusText: string; - headers: Headers; - } - /** - * Request / response headers as keys / values of JSON object. - */ - interface Headers { - } - interface RequestWillBeSentEventDataType { - /** - * Request identifier. - */ - requestId: RequestId; - /** - * Request data. - */ - request: Request; - /** - * Timestamp. - */ - timestamp: MonotonicTime; - /** - * Timestamp. - */ - wallTime: TimeSinceEpoch; - } - interface ResponseReceivedEventDataType { - /** - * Request identifier. - */ - requestId: RequestId; - /** - * Timestamp. - */ - timestamp: MonotonicTime; - /** - * Resource type. - */ - type: ResourceType; - /** - * Response data. - */ - response: Response; - } - interface LoadingFailedEventDataType { - /** - * Request identifier. - */ - requestId: RequestId; - /** - * Timestamp. - */ - timestamp: MonotonicTime; - /** - * Resource type. - */ - type: ResourceType; - /** - * Error message. - */ - errorText: string; - } - interface LoadingFinishedEventDataType { - /** - * Request identifier. - */ - requestId: RequestId; - /** - * Timestamp. - */ - timestamp: MonotonicTime; - } - } - namespace NodeRuntime { - interface NotifyWhenWaitingForDisconnectParameterType { - enabled: boolean; - } - } - - /** - * The `inspector.Session` is used for dispatching messages to the V8 inspector - * back-end and receiving message responses and notifications. - */ - class Session extends EventEmitter { - /** - * Create a new instance of the inspector.Session class. - * The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend. - */ - constructor(); - - /** - * Connects a session to the inspector back-end. - */ - connect(): void; - - /** - * Connects a session to the inspector back-end. - * An exception will be thrown if this API was not called on a Worker thread. - * @since v12.11.0 - */ - connectToMainThread(): void; - - /** - * Immediately close the session. All pending message callbacks will be called with an error. - * `session.connect()` will need to be called to be able to send messages again. - * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints. - */ - disconnect(): void; - - /** - * Posts a message to the inspector back-end. `callback` will be notified when - * a response is received. `callback` is a function that accepts two optional - * arguments: error and message-specific result. - * - * ```js - * session.post('Runtime.evaluate', { expression: '2 + 2' }, - * (error, { result }) => console.log(result)); - * // Output: { type: 'number', value: 4, description: '4' } - * ``` - * - * The latest version of the V8 inspector protocol is published on the - * [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/). - * - * Node.js inspector supports all the Chrome DevTools Protocol domains declared - * by V8. Chrome DevTools Protocol domain provides an interface for interacting - * with one of the runtime agents used to inspect the application state and listen - * to the run-time events. - */ - post(method: string, callback?: (err: Error | null, params?: object) => void): void; - post(method: string, params?: object, callback?: (err: Error | null, params?: object) => void): void; - /** - * Returns supported domains. - */ - post(method: 'Schema.getDomains', callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void; - /** - * Evaluates expression on global object. - */ - post(method: 'Runtime.evaluate', params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; - post(method: 'Runtime.evaluate', callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; - /** - * Add handler to promise with given promise object id. - */ - post(method: 'Runtime.awaitPromise', params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; - post(method: 'Runtime.awaitPromise', callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; - /** - * Calls function with given declaration on the given object. Object group of the result is inherited from the target object. - */ - post(method: 'Runtime.callFunctionOn', params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; - post(method: 'Runtime.callFunctionOn', callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; - /** - * Returns properties of a given object. Object group of the result is inherited from the target object. - */ - post(method: 'Runtime.getProperties', params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; - post(method: 'Runtime.getProperties', callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; - /** - * Releases remote object with given id. - */ - post(method: 'Runtime.releaseObject', params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Runtime.releaseObject', callback?: (err: Error | null) => void): void; - /** - * Releases all remote objects that belong to a given group. - */ - post(method: 'Runtime.releaseObjectGroup', params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Runtime.releaseObjectGroup', callback?: (err: Error | null) => void): void; - /** - * Tells inspected instance to run if it was waiting for debugger to attach. - */ - post(method: 'Runtime.runIfWaitingForDebugger', callback?: (err: Error | null) => void): 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. - */ - post(method: 'Runtime.enable', callback?: (err: Error | null) => void): void; - /** - * Disables reporting of execution contexts creation. - */ - post(method: 'Runtime.disable', callback?: (err: Error | null) => void): void; - /** - * Discards collected exceptions and console API calls. - */ - post(method: 'Runtime.discardConsoleEntries', callback?: (err: Error | null) => void): void; - /** - * @experimental - */ - post(method: 'Runtime.setCustomObjectFormatterEnabled', params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Runtime.setCustomObjectFormatterEnabled', callback?: (err: Error | null) => void): void; - /** - * Compiles expression. - */ - post(method: 'Runtime.compileScript', params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; - post(method: 'Runtime.compileScript', callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; - /** - * Runs script with given id in a given context. - */ - post(method: 'Runtime.runScript', params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; - post(method: 'Runtime.runScript', callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; - post(method: 'Runtime.queryObjects', params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; - post(method: 'Runtime.queryObjects', callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void; - /** - * Returns all let, const and class variables from global scope. - */ - post( - method: 'Runtime.globalLexicalScopeNames', - params?: Runtime.GlobalLexicalScopeNamesParameterType, - callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void - ): void; - post(method: 'Runtime.globalLexicalScopeNames', callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): 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. - */ - post(method: 'Debugger.enable', callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void; - /** - * Disables debugger for given page. - */ - post(method: 'Debugger.disable', callback?: (err: Error | null) => void): void; - /** - * Activates / deactivates all breakpoints on the page. - */ - post(method: 'Debugger.setBreakpointsActive', params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Debugger.setBreakpointsActive', callback?: (err: Error | null) => void): void; - /** - * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). - */ - post(method: 'Debugger.setSkipAllPauses', params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Debugger.setSkipAllPauses', callback?: (err: Error | null) => void): void; - /** - * 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. - */ - post(method: 'Debugger.setBreakpointByUrl', params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; - post(method: 'Debugger.setBreakpointByUrl', callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; - /** - * Sets JavaScript breakpoint at a given location. - */ - post(method: 'Debugger.setBreakpoint', params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; - post(method: 'Debugger.setBreakpoint', callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; - /** - * Removes JavaScript breakpoint. - */ - post(method: 'Debugger.removeBreakpoint', params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Debugger.removeBreakpoint', callback?: (err: Error | null) => void): void; - /** - * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. - */ - post( - method: 'Debugger.getPossibleBreakpoints', - params?: Debugger.GetPossibleBreakpointsParameterType, - callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void - ): void; - post(method: 'Debugger.getPossibleBreakpoints', callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void; - /** - * Continues execution until specific location is reached. - */ - post(method: 'Debugger.continueToLocation', params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Debugger.continueToLocation', callback?: (err: Error | null) => void): void; - /** - * @experimental - */ - post(method: 'Debugger.pauseOnAsyncCall', params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Debugger.pauseOnAsyncCall', callback?: (err: Error | null) => void): void; - /** - * Steps over the statement. - */ - post(method: 'Debugger.stepOver', callback?: (err: Error | null) => void): void; - /** - * Steps into the function call. - */ - post(method: 'Debugger.stepInto', params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Debugger.stepInto', callback?: (err: Error | null) => void): void; - /** - * Steps out of the function call. - */ - post(method: 'Debugger.stepOut', callback?: (err: Error | null) => void): void; - /** - * Stops on the next JavaScript statement. - */ - post(method: 'Debugger.pause', callback?: (err: Error | null) => void): void; - /** - * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called. - * @experimental - */ - post(method: 'Debugger.scheduleStepIntoAsync', callback?: (err: Error | null) => void): void; - /** - * Resumes JavaScript execution. - */ - post(method: 'Debugger.resume', callback?: (err: Error | null) => void): void; - /** - * Returns stack trace with given stackTraceId. - * @experimental - */ - post(method: 'Debugger.getStackTrace', params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; - post(method: 'Debugger.getStackTrace', callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void; - /** - * Searches for given string in script content. - */ - post(method: 'Debugger.searchInContent', params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; - post(method: 'Debugger.searchInContent', callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; - /** - * Edits JavaScript source live. - */ - post(method: 'Debugger.setScriptSource', params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; - post(method: 'Debugger.setScriptSource', callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; - /** - * Restarts particular call frame from the beginning. - */ - post(method: 'Debugger.restartFrame', params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; - post(method: 'Debugger.restartFrame', callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; - /** - * Returns source for the script with given id. - */ - post(method: 'Debugger.getScriptSource', params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; - post(method: 'Debugger.getScriptSource', callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): 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. - */ - post(method: 'Debugger.setPauseOnExceptions', params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Debugger.setPauseOnExceptions', callback?: (err: Error | null) => void): void; - /** - * Evaluates expression on a given call frame. - */ - post(method: 'Debugger.evaluateOnCallFrame', params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; - post(method: 'Debugger.evaluateOnCallFrame', callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; - /** - * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. - */ - post(method: 'Debugger.setVariableValue', params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Debugger.setVariableValue', callback?: (err: Error | null) => void): void; - /** - * Changes return value in top frame. Available only at return break position. - * @experimental - */ - post(method: 'Debugger.setReturnValue', params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Debugger.setReturnValue', callback?: (err: Error | null) => void): void; - /** - * Enables or disables async call stacks tracking. - */ - post(method: 'Debugger.setAsyncCallStackDepth', params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Debugger.setAsyncCallStackDepth', callback?: (err: Error | null) => void): 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. - * @experimental - */ - post(method: 'Debugger.setBlackboxPatterns', params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Debugger.setBlackboxPatterns', callback?: (err: Error | null) => void): 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. - * @experimental - */ - post(method: 'Debugger.setBlackboxedRanges', params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Debugger.setBlackboxedRanges', callback?: (err: Error | null) => void): void; - /** - * Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification. - */ - post(method: 'Console.enable', callback?: (err: Error | null) => void): void; - /** - * Disables console domain, prevents further console messages from being reported to the client. - */ - post(method: 'Console.disable', callback?: (err: Error | null) => void): void; - /** - * Does nothing. - */ - post(method: 'Console.clearMessages', callback?: (err: Error | null) => void): void; - post(method: 'Profiler.enable', callback?: (err: Error | null) => void): void; - post(method: 'Profiler.disable', callback?: (err: Error | null) => void): void; - /** - * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. - */ - post(method: 'Profiler.setSamplingInterval', params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Profiler.setSamplingInterval', callback?: (err: Error | null) => void): void; - post(method: 'Profiler.start', callback?: (err: Error | null) => void): void; - post(method: 'Profiler.stop', callback?: (err: Error | null, params: Profiler.StopReturnType) => void): 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. - */ - post(method: 'Profiler.startPreciseCoverage', params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void; - post(method: 'Profiler.startPreciseCoverage', callback?: (err: Error | null) => void): void; - /** - * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. - */ - post(method: 'Profiler.stopPreciseCoverage', callback?: (err: Error | null) => void): void; - /** - * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. - */ - post(method: 'Profiler.takePreciseCoverage', callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void; - /** - * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. - */ - post(method: 'Profiler.getBestEffortCoverage', callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void; - post(method: 'HeapProfiler.enable', callback?: (err: Error | null) => void): void; - post(method: 'HeapProfiler.disable', callback?: (err: Error | null) => void): void; - post(method: 'HeapProfiler.startTrackingHeapObjects', params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; - post(method: 'HeapProfiler.startTrackingHeapObjects', callback?: (err: Error | null) => void): void; - post(method: 'HeapProfiler.stopTrackingHeapObjects', params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; - post(method: 'HeapProfiler.stopTrackingHeapObjects', callback?: (err: Error | null) => void): void; - post(method: 'HeapProfiler.takeHeapSnapshot', params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void; - post(method: 'HeapProfiler.takeHeapSnapshot', callback?: (err: Error | null) => void): void; - post(method: 'HeapProfiler.collectGarbage', callback?: (err: Error | null) => void): void; - post( - method: 'HeapProfiler.getObjectByHeapObjectId', - params?: HeapProfiler.GetObjectByHeapObjectIdParameterType, - callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void - ): void; - post(method: 'HeapProfiler.getObjectByHeapObjectId', callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void; - /** - * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). - */ - post(method: 'HeapProfiler.addInspectedHeapObject', params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void; - post(method: 'HeapProfiler.addInspectedHeapObject', callback?: (err: Error | null) => void): void; - post(method: 'HeapProfiler.getHeapObjectId', params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; - post(method: 'HeapProfiler.getHeapObjectId', callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; - post(method: 'HeapProfiler.startSampling', params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void; - post(method: 'HeapProfiler.startSampling', callback?: (err: Error | null) => void): void; - post(method: 'HeapProfiler.stopSampling', callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void; - post(method: 'HeapProfiler.getSamplingProfile', callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void; - /** - * Gets supported tracing categories. - */ - post(method: 'NodeTracing.getCategories', callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void; - /** - * Start trace events collection. - */ - post(method: 'NodeTracing.start', params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void; - post(method: 'NodeTracing.start', callback?: (err: Error | null) => void): void; - /** - * Stop trace events collection. Remaining collected events will be sent as a sequence of - * dataCollected events followed by tracingComplete event. - */ - post(method: 'NodeTracing.stop', callback?: (err: Error | null) => void): void; - /** - * Sends protocol message over session with given id. - */ - post(method: 'NodeWorker.sendMessageToWorker', params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void; - post(method: 'NodeWorker.sendMessageToWorker', callback?: (err: Error | null) => void): void; - /** - * Instructs the inspector to attach to running workers. Will also attach to new workers - * as they start - */ - post(method: 'NodeWorker.enable', params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void; - post(method: 'NodeWorker.enable', callback?: (err: Error | null) => void): void; - /** - * Detaches from all running workers and disables attaching to new workers as they are started. - */ - post(method: 'NodeWorker.disable', callback?: (err: Error | null) => void): void; - /** - * Detached from the worker with given sessionId. - */ - post(method: 'NodeWorker.detach', params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void; - post(method: 'NodeWorker.detach', callback?: (err: Error | null) => void): void; - /** - * Disables network tracking, prevents network events from being sent to the client. - */ - post(method: 'Network.disable', callback?: (err: Error | null) => void): void; - /** - * Enables network tracking, network events will now be delivered to the client. - */ - post(method: 'Network.enable', callback?: (err: Error | null) => void): void; - /** - * Enable the NodeRuntime events except by `NodeRuntime.waitingForDisconnect`. - */ - post(method: 'NodeRuntime.enable', callback?: (err: Error | null) => void): void; - /** - * Disable NodeRuntime events - */ - post(method: 'NodeRuntime.disable', callback?: (err: Error | null) => void): void; - /** - * Enable the `NodeRuntime.waitingForDisconnect`. - */ - post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void; - post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', callback?: (err: Error | null) => void): void; - - addListener(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - addListener(event: 'inspectorNotification', listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - addListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - addListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - addListener(event: 'Runtime.executionContextsCleared', listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - addListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - addListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - addListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - addListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - addListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - addListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - addListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - addListener(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - addListener(event: 'Debugger.resumed', listener: () => void): this; - /** - * Issued when new console message is added. - */ - addListener(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - addListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; - addListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; - addListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; - addListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this; - addListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; - /** - * 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. - */ - addListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - addListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - addListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - addListener(event: 'NodeTracing.tracingComplete', listener: () => void): this; - /** - * Issued when attached to a worker. - */ - addListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - addListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - addListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - addListener(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - addListener(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; - addListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; - addListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - addListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - addListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: 'inspectorNotification', message: InspectorNotification): boolean; - emit(event: 'Runtime.executionContextCreated', message: InspectorNotification): boolean; - emit(event: 'Runtime.executionContextDestroyed', message: InspectorNotification): boolean; - emit(event: 'Runtime.executionContextsCleared'): boolean; - emit(event: 'Runtime.exceptionThrown', message: InspectorNotification): boolean; - emit(event: 'Runtime.exceptionRevoked', message: InspectorNotification): boolean; - emit(event: 'Runtime.consoleAPICalled', message: InspectorNotification): boolean; - emit(event: 'Runtime.inspectRequested', message: InspectorNotification): boolean; - emit(event: 'Debugger.scriptParsed', message: InspectorNotification): boolean; - emit(event: 'Debugger.scriptFailedToParse', message: InspectorNotification): boolean; - emit(event: 'Debugger.breakpointResolved', message: InspectorNotification): boolean; - emit(event: 'Debugger.paused', message: InspectorNotification): boolean; - emit(event: 'Debugger.resumed'): boolean; - emit(event: 'Console.messageAdded', message: InspectorNotification): boolean; - emit(event: 'Profiler.consoleProfileStarted', message: InspectorNotification): boolean; - emit(event: 'Profiler.consoleProfileFinished', message: InspectorNotification): boolean; - emit(event: 'HeapProfiler.addHeapSnapshotChunk', message: InspectorNotification): boolean; - emit(event: 'HeapProfiler.resetProfiles'): boolean; - emit(event: 'HeapProfiler.reportHeapSnapshotProgress', message: InspectorNotification): boolean; - emit(event: 'HeapProfiler.lastSeenObjectId', message: InspectorNotification): boolean; - emit(event: 'HeapProfiler.heapStatsUpdate', message: InspectorNotification): boolean; - emit(event: 'NodeTracing.dataCollected', message: InspectorNotification): boolean; - emit(event: 'NodeTracing.tracingComplete'): boolean; - emit(event: 'NodeWorker.attachedToWorker', message: InspectorNotification): boolean; - emit(event: 'NodeWorker.detachedFromWorker', message: InspectorNotification): boolean; - emit(event: 'NodeWorker.receivedMessageFromWorker', message: InspectorNotification): boolean; - emit(event: 'Network.requestWillBeSent', message: InspectorNotification): boolean; - emit(event: 'Network.responseReceived', message: InspectorNotification): boolean; - emit(event: 'Network.loadingFailed', message: InspectorNotification): boolean; - emit(event: 'Network.loadingFinished', message: InspectorNotification): boolean; - emit(event: 'NodeRuntime.waitingForDisconnect'): boolean; - emit(event: 'NodeRuntime.waitingForDebugger'): boolean; - on(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - on(event: 'inspectorNotification', listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - on(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - on(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - on(event: 'Runtime.executionContextsCleared', listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - on(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - on(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - on(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - on(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - on(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - on(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - on(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - on(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - on(event: 'Debugger.resumed', listener: () => void): this; - /** - * Issued when new console message is added. - */ - on(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - on(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; - on(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; - on(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; - on(event: 'HeapProfiler.resetProfiles', listener: () => void): this; - on(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; - /** - * 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. - */ - on(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - on(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - on(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - on(event: 'NodeTracing.tracingComplete', listener: () => void): this; - /** - * Issued when attached to a worker. - */ - on(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - on(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - on(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - on(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - on(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; - on(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; - on(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - on(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - on(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this; - once(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - once(event: 'inspectorNotification', listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - once(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - once(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - once(event: 'Runtime.executionContextsCleared', listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - once(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - once(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - once(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - once(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - once(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - once(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - once(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - once(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - once(event: 'Debugger.resumed', listener: () => void): this; - /** - * Issued when new console message is added. - */ - once(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - once(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; - once(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; - once(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; - once(event: 'HeapProfiler.resetProfiles', listener: () => void): this; - once(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; - /** - * 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. - */ - once(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - once(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - once(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - once(event: 'NodeTracing.tracingComplete', listener: () => void): this; - /** - * Issued when attached to a worker. - */ - once(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - once(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - once(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - once(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - once(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; - once(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; - once(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - once(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - once(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - prependListener(event: 'inspectorNotification', listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - prependListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - prependListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - prependListener(event: 'Runtime.executionContextsCleared', listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - prependListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - prependListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - prependListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - prependListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - prependListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - prependListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - prependListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - prependListener(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - prependListener(event: 'Debugger.resumed', listener: () => void): this; - /** - * Issued when new console message is added. - */ - prependListener(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - prependListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; - prependListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; - prependListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; - prependListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this; - prependListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; - /** - * 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. - */ - prependListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - prependListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - prependListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - prependListener(event: 'NodeTracing.tracingComplete', listener: () => void): this; - /** - * Issued when attached to a worker. - */ - prependListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - prependListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - prependListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - prependListener(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - prependListener(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; - prependListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; - prependListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - prependListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - prependListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - prependOnceListener(event: 'inspectorNotification', listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - prependOnceListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - prependOnceListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - prependOnceListener(event: 'Runtime.executionContextsCleared', listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - prependOnceListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - prependOnceListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - prependOnceListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - prependOnceListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - prependOnceListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - prependOnceListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - prependOnceListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - prependOnceListener(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - prependOnceListener(event: 'Debugger.resumed', listener: () => void): this; - /** - * Issued when new console message is added. - */ - prependOnceListener(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - prependOnceListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this; - prependOnceListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; - /** - * 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. - */ - prependOnceListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - prependOnceListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - prependOnceListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - prependOnceListener(event: 'NodeTracing.tracingComplete', listener: () => void): this; - /** - * Issued when attached to a worker. - */ - prependOnceListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - prependOnceListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - prependOnceListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - prependOnceListener(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - prependOnceListener(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - prependOnceListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - prependOnceListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this; - } - - /** - * Activate inspector on host and port. Equivalent to `node --inspect=[[host:]port]`, but can be done programmatically after node has - * started. - * - * If wait is `true`, will block until a client has connected to the inspect port - * and flow control has been passed to the debugger client. - * - * See the [security warning](https://nodejs.org/docs/latest-v20.x/api/cli.html#warning-binding-inspector-to-a-public-ipport-combination-is-insecure) - * regarding the `host` parameter usage. - * @param port Port to listen on for inspector connections. Defaults to what was specified on the CLI. - * @param host Host to listen on for inspector connections. Defaults to what was specified on the CLI. - * @param wait Block until a client has connected. Defaults to what was specified on the CLI. - * @returns Disposable that calls `inspector.close()`. - */ - function open(port?: number, host?: string, wait?: boolean): Disposable; - - /** - * Deactivate the inspector. Blocks until there are no active connections. - */ - function close(): void; - - /** - * Return the URL of the active inspector, or `undefined` if there is none. - * - * ```console - * $ node --inspect -p 'inspector.url()' - * Debugger listening on ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34 - * For help, see: https://nodejs.org/en/docs/inspector - * ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34 - * - * $ node --inspect=localhost:3000 -p 'inspector.url()' - * Debugger listening on ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a - * For help, see: https://nodejs.org/en/docs/inspector - * ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a - * - * $ node -p 'inspector.url()' - * undefined - * ``` - */ - function url(): string | undefined; - - /** - * Blocks until a client (existing or connected later) has sent `Runtime.runIfWaitingForDebugger` command. - * - * An exception will be thrown if there is no active inspector. - * @since v12.7.0 - */ - function waitForDebugger(): void; - - // These methods are exposed by the V8 inspector console API (inspector/v8-console.h). - // The method signatures differ from those of the Node.js console, and are deliberately - // typed permissively. - interface InspectorConsole { - debug(...data: any[]): void; - error(...data: any[]): void; - info(...data: any[]): void; - log(...data: any[]): void; - warn(...data: any[]): void; - dir(...data: any[]): void; - dirxml(...data: any[]): void; - table(...data: any[]): void; - trace(...data: any[]): void; - group(...data: any[]): void; - groupCollapsed(...data: any[]): void; - groupEnd(...data: any[]): void; - clear(...data: any[]): void; - count(label?: any): void; - countReset(label?: any): void; - assert(value?: any, ...data: any[]): void; - profile(label?: any): void; - profileEnd(label?: any): void; - time(label?: any): void; - timeLog(label?: any): void; - timeStamp(label?: any): void; - } - - /** - * An object to send messages to the remote inspector console. - * @since v11.0.0 - */ - const console: InspectorConsole; - - // DevTools protocol event broadcast methods - namespace Network { - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Broadcasts the `Network.requestWillBeSent` event to connected frontends. This event indicates that - * the application is about to send an HTTP request. - * @since v22.6.0 - * @experimental - */ - function requestWillBeSent(params: RequestWillBeSentEventDataType): void; - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Broadcasts the `Network.responseReceived` event to connected frontends. This event indicates that - * HTTP response is available. - * @since v22.6.0 - * @experimental - */ - function responseReceived(params: ResponseReceivedEventDataType): void; - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Broadcasts the `Network.loadingFinished` event to connected frontends. This event indicates that - * HTTP request has finished loading. - * @since v22.6.0 - * @experimental - */ - function loadingFinished(params: LoadingFinishedEventDataType): void; - /** - * This feature is only available with the `--experimental-network-inspection` flag enabled. - * - * Broadcasts the `Network.loadingFailed` event to connected frontends. This event indicates that - * HTTP request has failed to load. - * @since v22.7.0 - * @experimental - */ - function loadingFailed(params: LoadingFailedEventDataType): void; - } -} - -/** - * The `node:inspector` module provides an API for interacting with the V8 - * inspector. - */ -declare module 'node:inspector' { - export * from 'inspector'; -} - -/** - * The `node:inspector/promises` module provides an API for interacting with the V8 - * inspector. - * @see [source](https://github.com/nodejs/node/blob/v20.x/lib/inspector/promises.js) - * @since v19.0.0 - */ -declare module 'inspector/promises' { - import EventEmitter = require('node:events'); - import { - open, - close, - url, - waitForDebugger, - console, - InspectorNotification, - Schema, - Runtime, - Debugger, - Console, - Profiler, - HeapProfiler, - NodeTracing, - NodeWorker, - Network, - NodeRuntime, - } from 'inspector'; - - /** - * The `inspector.Session` is used for dispatching messages to the V8 inspector - * back-end and receiving message responses and notifications. - * @since v19.0.0 - */ - class Session extends EventEmitter { - /** - * Create a new instance of the `inspector.Session` class. - * The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend. - */ - constructor(); - - /** - * Connects a session to the inspector back-end. - */ - connect(): void; - - /** - * Connects a session to the inspector back-end. - * An exception will be thrown if this API was not called on a Worker thread. - */ - connectToMainThread(): void; - - /** - * Immediately close the session. All pending message callbacks will be called with an error. - * `session.connect()` will need to be called to be able to send messages again. - * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints. - */ - disconnect(): void; - - /** - * Posts a message to the inspector back-end. - * - * ```js - * import { Session } from 'node:inspector/promises'; - * try { - * const session = new Session(); - * session.connect(); - * const result = await session.post('Runtime.evaluate', { expression: '2 + 2' }); - * console.log(result); - * } catch (error) { - * console.error(error); - * } - * // Output: { result: { type: 'number', value: 4, description: '4' } } - * ``` - * - * The latest version of the V8 inspector protocol is published on the - * [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/). - * - * Node.js inspector supports all the Chrome DevTools Protocol domains declared - * by V8. Chrome DevTools Protocol domain provides an interface for interacting - * with one of the runtime agents used to inspect the application state and listen - * to the run-time events. - */ - post(method: string, params?: object): Promise; - /** - * Returns supported domains. - */ - post(method: 'Schema.getDomains'): Promise; - /** - * Evaluates expression on global object. - */ - post(method: 'Runtime.evaluate', params?: Runtime.EvaluateParameterType): Promise; - /** - * Add handler to promise with given promise object id. - */ - post(method: 'Runtime.awaitPromise', params?: Runtime.AwaitPromiseParameterType): Promise; - /** - * Calls function with given declaration on the given object. Object group of the result is inherited from the target object. - */ - post(method: 'Runtime.callFunctionOn', params?: Runtime.CallFunctionOnParameterType): Promise; - /** - * Returns properties of a given object. Object group of the result is inherited from the target object. - */ - post(method: 'Runtime.getProperties', params?: Runtime.GetPropertiesParameterType): Promise; - /** - * Releases remote object with given id. - */ - post(method: 'Runtime.releaseObject', params?: Runtime.ReleaseObjectParameterType): Promise; - /** - * Releases all remote objects that belong to a given group. - */ - post(method: 'Runtime.releaseObjectGroup', params?: Runtime.ReleaseObjectGroupParameterType): Promise; - /** - * Tells inspected instance to run if it was waiting for debugger to attach. - */ - post(method: 'Runtime.runIfWaitingForDebugger'): Promise; - /** - * 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. - */ - post(method: 'Runtime.enable'): Promise; - /** - * Disables reporting of execution contexts creation. - */ - post(method: 'Runtime.disable'): Promise; - /** - * Discards collected exceptions and console API calls. - */ - post(method: 'Runtime.discardConsoleEntries'): Promise; - /** - * @experimental - */ - post(method: 'Runtime.setCustomObjectFormatterEnabled', params?: Runtime.SetCustomObjectFormatterEnabledParameterType): Promise; - /** - * Compiles expression. - */ - post(method: 'Runtime.compileScript', params?: Runtime.CompileScriptParameterType): Promise; - /** - * Runs script with given id in a given context. - */ - post(method: 'Runtime.runScript', params?: Runtime.RunScriptParameterType): Promise; - post(method: 'Runtime.queryObjects', params?: Runtime.QueryObjectsParameterType): Promise; - /** - * Returns all let, const and class variables from global scope. - */ - post(method: 'Runtime.globalLexicalScopeNames', params?: Runtime.GlobalLexicalScopeNamesParameterType): Promise; - /** - * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. - */ - post(method: 'Debugger.enable'): Promise; - /** - * Disables debugger for given page. - */ - post(method: 'Debugger.disable'): Promise; - /** - * Activates / deactivates all breakpoints on the page. - */ - post(method: 'Debugger.setBreakpointsActive', params?: Debugger.SetBreakpointsActiveParameterType): Promise; - /** - * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). - */ - post(method: 'Debugger.setSkipAllPauses', params?: Debugger.SetSkipAllPausesParameterType): Promise; - /** - * 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. - */ - post(method: 'Debugger.setBreakpointByUrl', params?: Debugger.SetBreakpointByUrlParameterType): Promise; - /** - * Sets JavaScript breakpoint at a given location. - */ - post(method: 'Debugger.setBreakpoint', params?: Debugger.SetBreakpointParameterType): Promise; - /** - * Removes JavaScript breakpoint. - */ - post(method: 'Debugger.removeBreakpoint', params?: Debugger.RemoveBreakpointParameterType): Promise; - /** - * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. - */ - post(method: 'Debugger.getPossibleBreakpoints', params?: Debugger.GetPossibleBreakpointsParameterType): Promise; - /** - * Continues execution until specific location is reached. - */ - post(method: 'Debugger.continueToLocation', params?: Debugger.ContinueToLocationParameterType): Promise; - /** - * @experimental - */ - post(method: 'Debugger.pauseOnAsyncCall', params?: Debugger.PauseOnAsyncCallParameterType): Promise; - /** - * Steps over the statement. - */ - post(method: 'Debugger.stepOver'): Promise; - /** - * Steps into the function call. - */ - post(method: 'Debugger.stepInto', params?: Debugger.StepIntoParameterType): Promise; - /** - * Steps out of the function call. - */ - post(method: 'Debugger.stepOut'): Promise; - /** - * Stops on the next JavaScript statement. - */ - post(method: 'Debugger.pause'): Promise; - /** - * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called. - * @experimental - */ - post(method: 'Debugger.scheduleStepIntoAsync'): Promise; - /** - * Resumes JavaScript execution. - */ - post(method: 'Debugger.resume'): Promise; - /** - * Returns stack trace with given stackTraceId. - * @experimental - */ - post(method: 'Debugger.getStackTrace', params?: Debugger.GetStackTraceParameterType): Promise; - /** - * Searches for given string in script content. - */ - post(method: 'Debugger.searchInContent', params?: Debugger.SearchInContentParameterType): Promise; - /** - * Edits JavaScript source live. - */ - post(method: 'Debugger.setScriptSource', params?: Debugger.SetScriptSourceParameterType): Promise; - /** - * Restarts particular call frame from the beginning. - */ - post(method: 'Debugger.restartFrame', params?: Debugger.RestartFrameParameterType): Promise; - /** - * Returns source for the script with given id. - */ - post(method: 'Debugger.getScriptSource', params?: Debugger.GetScriptSourceParameterType): Promise; - /** - * 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. - */ - post(method: 'Debugger.setPauseOnExceptions', params?: Debugger.SetPauseOnExceptionsParameterType): Promise; - /** - * Evaluates expression on a given call frame. - */ - post(method: 'Debugger.evaluateOnCallFrame', params?: Debugger.EvaluateOnCallFrameParameterType): Promise; - /** - * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. - */ - post(method: 'Debugger.setVariableValue', params?: Debugger.SetVariableValueParameterType): Promise; - /** - * Changes return value in top frame. Available only at return break position. - * @experimental - */ - post(method: 'Debugger.setReturnValue', params?: Debugger.SetReturnValueParameterType): Promise; - /** - * Enables or disables async call stacks tracking. - */ - post(method: 'Debugger.setAsyncCallStackDepth', params?: Debugger.SetAsyncCallStackDepthParameterType): Promise; - /** - * 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. - * @experimental - */ - post(method: 'Debugger.setBlackboxPatterns', params?: Debugger.SetBlackboxPatternsParameterType): Promise; - /** - * 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. - * @experimental - */ - post(method: 'Debugger.setBlackboxedRanges', params?: Debugger.SetBlackboxedRangesParameterType): Promise; - /** - * Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification. - */ - post(method: 'Console.enable'): Promise; - /** - * Disables console domain, prevents further console messages from being reported to the client. - */ - post(method: 'Console.disable'): Promise; - /** - * Does nothing. - */ - post(method: 'Console.clearMessages'): Promise; - post(method: 'Profiler.enable'): Promise; - post(method: 'Profiler.disable'): Promise; - /** - * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. - */ - post(method: 'Profiler.setSamplingInterval', params?: Profiler.SetSamplingIntervalParameterType): Promise; - post(method: 'Profiler.start'): Promise; - post(method: 'Profiler.stop'): Promise; - /** - * 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. - */ - post(method: 'Profiler.startPreciseCoverage', params?: Profiler.StartPreciseCoverageParameterType): Promise; - /** - * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. - */ - post(method: 'Profiler.stopPreciseCoverage'): Promise; - /** - * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. - */ - post(method: 'Profiler.takePreciseCoverage'): Promise; - /** - * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. - */ - post(method: 'Profiler.getBestEffortCoverage'): Promise; - post(method: 'HeapProfiler.enable'): Promise; - post(method: 'HeapProfiler.disable'): Promise; - post(method: 'HeapProfiler.startTrackingHeapObjects', params?: HeapProfiler.StartTrackingHeapObjectsParameterType): Promise; - post(method: 'HeapProfiler.stopTrackingHeapObjects', params?: HeapProfiler.StopTrackingHeapObjectsParameterType): Promise; - post(method: 'HeapProfiler.takeHeapSnapshot', params?: HeapProfiler.TakeHeapSnapshotParameterType): Promise; - post(method: 'HeapProfiler.collectGarbage'): Promise; - post(method: 'HeapProfiler.getObjectByHeapObjectId', params?: HeapProfiler.GetObjectByHeapObjectIdParameterType): Promise; - /** - * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). - */ - post(method: 'HeapProfiler.addInspectedHeapObject', params?: HeapProfiler.AddInspectedHeapObjectParameterType): Promise; - post(method: 'HeapProfiler.getHeapObjectId', params?: HeapProfiler.GetHeapObjectIdParameterType): Promise; - post(method: 'HeapProfiler.startSampling', params?: HeapProfiler.StartSamplingParameterType): Promise; - post(method: 'HeapProfiler.stopSampling'): Promise; - post(method: 'HeapProfiler.getSamplingProfile'): Promise; - /** - * Gets supported tracing categories. - */ - post(method: 'NodeTracing.getCategories'): Promise; - /** - * Start trace events collection. - */ - post(method: 'NodeTracing.start', params?: NodeTracing.StartParameterType): Promise; - /** - * Stop trace events collection. Remaining collected events will be sent as a sequence of - * dataCollected events followed by tracingComplete event. - */ - post(method: 'NodeTracing.stop'): Promise; - /** - * Sends protocol message over session with given id. - */ - post(method: 'NodeWorker.sendMessageToWorker', params?: NodeWorker.SendMessageToWorkerParameterType): Promise; - /** - * Instructs the inspector to attach to running workers. Will also attach to new workers - * as they start - */ - post(method: 'NodeWorker.enable', params?: NodeWorker.EnableParameterType): Promise; - /** - * Detaches from all running workers and disables attaching to new workers as they are started. - */ - post(method: 'NodeWorker.disable'): Promise; - /** - * Detached from the worker with given sessionId. - */ - post(method: 'NodeWorker.detach', params?: NodeWorker.DetachParameterType): Promise; - /** - * Disables network tracking, prevents network events from being sent to the client. - */ - post(method: 'Network.disable'): Promise; - /** - * Enables network tracking, network events will now be delivered to the client. - */ - post(method: 'Network.enable'): Promise; - /** - * Enable the NodeRuntime events except by `NodeRuntime.waitingForDisconnect`. - */ - post(method: 'NodeRuntime.enable'): Promise; - /** - * Disable NodeRuntime events - */ - post(method: 'NodeRuntime.disable'): Promise; - /** - * Enable the `NodeRuntime.waitingForDisconnect`. - */ - post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType): Promise; - - addListener(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - addListener(event: 'inspectorNotification', listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - addListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - addListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - addListener(event: 'Runtime.executionContextsCleared', listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - addListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - addListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - addListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - addListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - addListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - addListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - addListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - addListener(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - addListener(event: 'Debugger.resumed', listener: () => void): this; - /** - * Issued when new console message is added. - */ - addListener(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - addListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; - addListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; - addListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; - addListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this; - addListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; - /** - * 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. - */ - addListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - addListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - addListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - addListener(event: 'NodeTracing.tracingComplete', listener: () => void): this; - /** - * Issued when attached to a worker. - */ - addListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - addListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - addListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - addListener(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - addListener(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; - addListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; - addListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - addListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - addListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: 'inspectorNotification', message: InspectorNotification): boolean; - emit(event: 'Runtime.executionContextCreated', message: InspectorNotification): boolean; - emit(event: 'Runtime.executionContextDestroyed', message: InspectorNotification): boolean; - emit(event: 'Runtime.executionContextsCleared'): boolean; - emit(event: 'Runtime.exceptionThrown', message: InspectorNotification): boolean; - emit(event: 'Runtime.exceptionRevoked', message: InspectorNotification): boolean; - emit(event: 'Runtime.consoleAPICalled', message: InspectorNotification): boolean; - emit(event: 'Runtime.inspectRequested', message: InspectorNotification): boolean; - emit(event: 'Debugger.scriptParsed', message: InspectorNotification): boolean; - emit(event: 'Debugger.scriptFailedToParse', message: InspectorNotification): boolean; - emit(event: 'Debugger.breakpointResolved', message: InspectorNotification): boolean; - emit(event: 'Debugger.paused', message: InspectorNotification): boolean; - emit(event: 'Debugger.resumed'): boolean; - emit(event: 'Console.messageAdded', message: InspectorNotification): boolean; - emit(event: 'Profiler.consoleProfileStarted', message: InspectorNotification): boolean; - emit(event: 'Profiler.consoleProfileFinished', message: InspectorNotification): boolean; - emit(event: 'HeapProfiler.addHeapSnapshotChunk', message: InspectorNotification): boolean; - emit(event: 'HeapProfiler.resetProfiles'): boolean; - emit(event: 'HeapProfiler.reportHeapSnapshotProgress', message: InspectorNotification): boolean; - emit(event: 'HeapProfiler.lastSeenObjectId', message: InspectorNotification): boolean; - emit(event: 'HeapProfiler.heapStatsUpdate', message: InspectorNotification): boolean; - emit(event: 'NodeTracing.dataCollected', message: InspectorNotification): boolean; - emit(event: 'NodeTracing.tracingComplete'): boolean; - emit(event: 'NodeWorker.attachedToWorker', message: InspectorNotification): boolean; - emit(event: 'NodeWorker.detachedFromWorker', message: InspectorNotification): boolean; - emit(event: 'NodeWorker.receivedMessageFromWorker', message: InspectorNotification): boolean; - emit(event: 'Network.requestWillBeSent', message: InspectorNotification): boolean; - emit(event: 'Network.responseReceived', message: InspectorNotification): boolean; - emit(event: 'Network.loadingFailed', message: InspectorNotification): boolean; - emit(event: 'Network.loadingFinished', message: InspectorNotification): boolean; - emit(event: 'NodeRuntime.waitingForDisconnect'): boolean; - emit(event: 'NodeRuntime.waitingForDebugger'): boolean; - on(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - on(event: 'inspectorNotification', listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - on(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - on(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - on(event: 'Runtime.executionContextsCleared', listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - on(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - on(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - on(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - on(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - on(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - on(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - on(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - on(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - on(event: 'Debugger.resumed', listener: () => void): this; - /** - * Issued when new console message is added. - */ - on(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - on(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; - on(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; - on(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; - on(event: 'HeapProfiler.resetProfiles', listener: () => void): this; - on(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; - /** - * 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. - */ - on(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - on(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - on(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - on(event: 'NodeTracing.tracingComplete', listener: () => void): this; - /** - * Issued when attached to a worker. - */ - on(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - on(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - on(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - on(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - on(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; - on(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; - on(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - on(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - on(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this; - once(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - once(event: 'inspectorNotification', listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - once(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - once(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - once(event: 'Runtime.executionContextsCleared', listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - once(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - once(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - once(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - once(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - once(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - once(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - once(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - once(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - once(event: 'Debugger.resumed', listener: () => void): this; - /** - * Issued when new console message is added. - */ - once(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - once(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; - once(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; - once(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; - once(event: 'HeapProfiler.resetProfiles', listener: () => void): this; - once(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; - /** - * 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. - */ - once(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - once(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - once(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - once(event: 'NodeTracing.tracingComplete', listener: () => void): this; - /** - * Issued when attached to a worker. - */ - once(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - once(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - once(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - once(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - once(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; - once(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; - once(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - once(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - once(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - prependListener(event: 'inspectorNotification', listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - prependListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - prependListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - prependListener(event: 'Runtime.executionContextsCleared', listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - prependListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - prependListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - prependListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - prependListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - prependListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - prependListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - prependListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - prependListener(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - prependListener(event: 'Debugger.resumed', listener: () => void): this; - /** - * Issued when new console message is added. - */ - prependListener(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - prependListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; - prependListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; - prependListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; - prependListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this; - prependListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; - /** - * 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. - */ - prependListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - prependListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - prependListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - prependListener(event: 'NodeTracing.tracingComplete', listener: () => void): this; - /** - * Issued when attached to a worker. - */ - prependListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - prependListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - prependListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - prependListener(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - prependListener(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; - prependListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; - prependListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - prependListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - prependListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - /** - * Emitted when any notification from the V8 Inspector is received. - */ - prependOnceListener(event: 'inspectorNotification', listener: (message: InspectorNotification) => void): this; - /** - * Issued when new execution context is created. - */ - prependOnceListener(event: 'Runtime.executionContextCreated', listener: (message: InspectorNotification) => void): this; - /** - * Issued when execution context is destroyed. - */ - prependOnceListener(event: 'Runtime.executionContextDestroyed', listener: (message: InspectorNotification) => void): this; - /** - * Issued when all executionContexts were cleared in browser - */ - prependOnceListener(event: 'Runtime.executionContextsCleared', listener: () => void): this; - /** - * Issued when exception was thrown and unhandled. - */ - prependOnceListener(event: 'Runtime.exceptionThrown', listener: (message: InspectorNotification) => void): this; - /** - * Issued when unhandled exception was revoked. - */ - prependOnceListener(event: 'Runtime.exceptionRevoked', listener: (message: InspectorNotification) => void): this; - /** - * Issued when console API was called. - */ - prependOnceListener(event: 'Runtime.consoleAPICalled', listener: (message: InspectorNotification) => void): this; - /** - * Issued when object should be inspected (for example, as a result of inspect() command line API call). - */ - prependOnceListener(event: 'Runtime.inspectRequested', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. - */ - prependOnceListener(event: 'Debugger.scriptParsed', listener: (message: InspectorNotification) => void): this; - /** - * Fired when virtual machine fails to parse the script. - */ - prependOnceListener(event: 'Debugger.scriptFailedToParse', listener: (message: InspectorNotification) => void): this; - /** - * Fired when breakpoint is resolved to an actual script and location. - */ - prependOnceListener(event: 'Debugger.breakpointResolved', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. - */ - prependOnceListener(event: 'Debugger.paused', listener: (message: InspectorNotification) => void): this; - /** - * Fired when the virtual machine resumed execution. - */ - prependOnceListener(event: 'Debugger.resumed', listener: () => void): this; - /** - * Issued when new console message is added. - */ - prependOnceListener(event: 'Console.messageAdded', listener: (message: InspectorNotification) => void): this; - /** - * Sent when new profile recording is started using console.profile() call. - */ - prependOnceListener(event: 'Profiler.consoleProfileStarted', listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: 'Profiler.consoleProfileFinished', listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: 'HeapProfiler.addHeapSnapshotChunk', listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: 'HeapProfiler.resetProfiles', listener: () => void): this; - prependOnceListener(event: 'HeapProfiler.reportHeapSnapshotProgress', listener: (message: InspectorNotification) => void): this; - /** - * 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. - */ - prependOnceListener(event: 'HeapProfiler.lastSeenObjectId', listener: (message: InspectorNotification) => void): this; - /** - * If heap objects tracking has been started then backend may send update for one or more fragments - */ - prependOnceListener(event: 'HeapProfiler.heapStatsUpdate', listener: (message: InspectorNotification) => void): this; - /** - * Contains an bucket of collected trace events. - */ - prependOnceListener(event: 'NodeTracing.dataCollected', listener: (message: InspectorNotification) => void): this; - /** - * Signals that tracing is stopped and there is no trace buffers pending flush, all data were - * delivered via dataCollected events. - */ - prependOnceListener(event: 'NodeTracing.tracingComplete', listener: () => void): this; - /** - * Issued when attached to a worker. - */ - prependOnceListener(event: 'NodeWorker.attachedToWorker', listener: (message: InspectorNotification) => void): this; - /** - * Issued when detached from the worker. - */ - prependOnceListener(event: 'NodeWorker.detachedFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Notifies about a new protocol message received from the session - * (session ID is provided in attachedToWorker notification). - */ - prependOnceListener(event: 'NodeWorker.receivedMessageFromWorker', listener: (message: InspectorNotification) => void): this; - /** - * Fired when page is about to send HTTP request. - */ - prependOnceListener(event: 'Network.requestWillBeSent', listener: (message: InspectorNotification) => void): this; - /** - * Fired when HTTP response is available. - */ - prependOnceListener(event: 'Network.responseReceived', listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification) => void): this; - prependOnceListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification) => void): this; - /** - * This event is fired instead of `Runtime.executionContextDestroyed` when - * enabled. - * It is fired when the Node process finished all code execution and is - * waiting for all frontends to disconnect. - */ - prependOnceListener(event: 'NodeRuntime.waitingForDisconnect', listener: () => void): this; - /** - * This event is fired when the runtime is waiting for the debugger. For - * example, when inspector.waitingForDebugger is called - */ - prependOnceListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this; - } - - export { - Session, - open, - close, - url, - waitForDebugger, - console, - InspectorNotification, - Schema, - Runtime, - Debugger, - Console, - Profiler, - HeapProfiler, - NodeTracing, - NodeWorker, - Network, - NodeRuntime, - }; -} - -/** - * The `node:inspector/promises` module provides an API for interacting with the V8 - * inspector. - * @since v19.0.0 - */ -declare module 'node:inspector/promises' { - export * from 'inspector/promises'; -} diff --git a/node_modules/@types/node/module.d.ts b/node_modules/@types/node/module.d.ts deleted file mode 100644 index 36b86ff..0000000 --- a/node_modules/@types/node/module.d.ts +++ /dev/null @@ -1,539 +0,0 @@ -/** - * @since v0.3.7 - */ -declare module "module" { - import { URL } from "node:url"; - import { MessagePort } from "node:worker_threads"; - class Module { - constructor(id: string, parent?: Module); - } - interface Module extends NodeJS.Module {} - namespace Module { - export { Module }; - } - namespace Module { - /** - * A list of the names of all modules provided by Node.js. Can be used to verify - * if a module is maintained by a third party or not. - * - * Note: the list doesn't contain prefix-only modules like `node:test`. - * @since v9.3.0, v8.10.0, v6.13.0 - */ - const builtinModules: readonly string[]; - /** - * @since v12.2.0 - * @param path Filename to be used to construct the require - * function. Must be a file URL object, file URL string, or absolute path - * string. - */ - function createRequire(path: string | URL): NodeJS.Require; - /** - * @since v18.6.0, v16.17.0 - */ - function isBuiltin(moduleName: string): boolean; - interface RegisterOptions { - /** - * If you want to resolve `specifier` relative to a - * base URL, such as `import.meta.url`, you can pass that URL here. This - * property is ignored if the `parentURL` is supplied as the second argument. - * @default 'data:' - */ - parentURL?: string | URL | undefined; - /** - * Any arbitrary, cloneable JavaScript value to pass into the - * {@link initialize} hook. - */ - data?: Data | undefined; - /** - * [Transferable objects](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html#portpostmessagevalue-transferlist) - * to be passed into the `initialize` hook. - */ - transferList?: any[] | undefined; - } - /* eslint-disable @definitelytyped/no-unnecessary-generics */ - /** - * Register a module that exports hooks that customize Node.js module - * resolution and loading behavior. See - * [Customization hooks](https://nodejs.org/docs/latest-v20.x/api/module.html#customization-hooks). - * @since v20.6.0, v18.19.0 - * @param specifier Customization hooks to be registered; this should be - * the same string that would be passed to `import()`, except that if it is - * relative, it is resolved relative to `parentURL`. - * @param parentURL f you want to resolve `specifier` relative to a base - * URL, such as `import.meta.url`, you can pass that URL here. - */ - function register( - specifier: string | URL, - parentURL?: string | URL, - options?: RegisterOptions, - ): void; - function register(specifier: string | URL, options?: RegisterOptions): void; - /* eslint-enable @definitelytyped/no-unnecessary-generics */ - /** - * The `module.syncBuiltinESMExports()` method updates all the live bindings for - * builtin `ES Modules` to match the properties of the `CommonJS` exports. It - * does not add or remove exported names from the `ES Modules`. - * - * ```js - * import fs from 'node:fs'; - * import assert from 'node:assert'; - * import { syncBuiltinESMExports } from 'node:module'; - * - * fs.readFile = newAPI; - * - * delete fs.readFileSync; - * - * function newAPI() { - * // ... - * } - * - * fs.newAPI = newAPI; - * - * syncBuiltinESMExports(); - * - * import('node:fs').then((esmFS) => { - * // It syncs the existing readFile property with the new value - * assert.strictEqual(esmFS.readFile, newAPI); - * // readFileSync has been deleted from the required fs - * assert.strictEqual('readFileSync' in fs, false); - * // syncBuiltinESMExports() does not remove readFileSync from esmFS - * assert.strictEqual('readFileSync' in esmFS, true); - * // syncBuiltinESMExports() does not add names - * assert.strictEqual(esmFS.newAPI, undefined); - * }); - * ``` - * @since v12.12.0 - */ - function syncBuiltinESMExports(): void; - /** @deprecated Use `ImportAttributes` instead */ - interface ImportAssertions extends ImportAttributes {} - interface ImportAttributes extends NodeJS.Dict { - type?: string | undefined; - } - type ModuleFormat = "builtin" | "commonjs" | "json" | "module" | "wasm"; - type ModuleSource = string | ArrayBuffer | NodeJS.TypedArray; - /** - * The `initialize` hook provides a way to define a custom function that runs in - * the hooks thread when the hooks module is initialized. Initialization happens - * when the hooks module is registered via {@link register}. - * - * This hook can receive data from a {@link register} invocation, including - * ports and other transferable objects. The return value of `initialize` can be a - * `Promise`, in which case it will be awaited before the main application thread - * execution resumes. - */ - type InitializeHook = (data: Data) => void | Promise; - interface ResolveHookContext { - /** - * Export conditions of the relevant `package.json` - */ - conditions: string[]; - /** - * @deprecated Use `importAttributes` instead - */ - importAssertions: ImportAttributes; - /** - * An object whose key-value pairs represent the assertions for the module to import - */ - importAttributes: ImportAttributes; - /** - * The module importing this one, or undefined if this is the Node.js entry point - */ - parentURL: string | undefined; - } - interface ResolveFnOutput { - /** - * A hint to the load hook (it might be ignored) - */ - format?: ModuleFormat | null | undefined; - /** - * @deprecated Use `importAttributes` instead - */ - importAssertions?: ImportAttributes | undefined; - /** - * The import attributes to use when caching the module (optional; if excluded the input will be used) - */ - importAttributes?: ImportAttributes | undefined; - /** - * A signal that this hook intends to terminate the chain of `resolve` hooks. - * @default false - */ - shortCircuit?: boolean | undefined; - /** - * The absolute URL to which this input resolves - */ - url: string; - } - /** - * The `resolve` hook chain is responsible for telling Node.js where to find and - * how to cache a given `import` statement or expression, or `require` call. It can - * optionally return a format (such as `'module'`) as a hint to the `load` hook. If - * a format is specified, the `load` hook is ultimately responsible for providing - * the final `format` value (and it is free to ignore the hint provided by - * `resolve`); if `resolve` provides a `format`, a custom `load` hook is required - * even if only to pass the value to the Node.js default `load` hook. - */ - type ResolveHook = ( - specifier: string, - context: ResolveHookContext, - nextResolve: ( - specifier: string, - context?: Partial, - ) => ResolveFnOutput | Promise, - ) => ResolveFnOutput | Promise; - interface LoadHookContext { - /** - * Export conditions of the relevant `package.json` - */ - conditions: string[]; - /** - * The format optionally supplied by the `resolve` hook chain - */ - format: ModuleFormat | null | undefined; - /** - * @deprecated Use `importAttributes` instead - */ - importAssertions: ImportAttributes; - /** - * An object whose key-value pairs represent the assertions for the module to import - */ - importAttributes: ImportAttributes; - } - interface LoadFnOutput { - format: string | null | undefined; - /** - * A signal that this hook intends to terminate the chain of `resolve` hooks. - * @default false - */ - shortCircuit?: boolean | undefined; - /** - * The source for Node.js to evaluate - */ - source?: ModuleSource | undefined; - } - /** - * The `load` hook provides a way to define a custom method of determining how a - * URL should be interpreted, retrieved, and parsed. It is also in charge of - * validating the import attributes. - */ - type LoadHook = ( - url: string, - context: LoadHookContext, - nextLoad: ( - url: string, - context?: Partial, - ) => LoadFnOutput | Promise, - ) => LoadFnOutput | Promise; - interface GlobalPreloadContext { - port: MessagePort; - } - /** - * Sometimes it might be necessary to run some code inside of the same global - * scope that the application runs in. This hook allows the return of a string - * that is run as a sloppy-mode script on startup. - * @deprecated This hook will be removed in a future version. Use - * `initialize` instead. When a hooks module has an `initialize` export, - * `globalPreload` will be ignored. - */ - type GlobalPreloadHook = (context: GlobalPreloadContext) => string; - /** - * `path` is the resolved path for the file for which a corresponding source map - * should be fetched. - * @since v13.7.0, v12.17.0 - * @return Returns `module.SourceMap` if a source map is found, `undefined` otherwise. - */ - function findSourceMap(path: string): SourceMap | undefined; - interface SourceMapConstructorOptions { - /** - * @since v20.5.0 - */ - lineLengths?: readonly number[] | undefined; - } - interface SourceMapPayload { - file: string; - version: number; - sources: string[]; - sourcesContent: string[]; - names: string[]; - mappings: string; - sourceRoot: string; - } - interface SourceMapping { - generatedLine: number; - generatedColumn: number; - originalSource: string; - originalLine: number; - originalColumn: number; - } - interface SourceOrigin { - /** - * The name of the range in the source map, if one was provided - */ - name: string | undefined; - /** - * The file name of the original source, as reported in the SourceMap - */ - fileName: string; - /** - * The 1-indexed lineNumber of the corresponding call site in the original source - */ - lineNumber: number; - /** - * The 1-indexed columnNumber of the corresponding call site in the original source - */ - columnNumber: number; - } - /** - * @since v13.7.0, v12.17.0 - */ - class SourceMap { - constructor(payload: SourceMapPayload, options?: SourceMapConstructorOptions); - /** - * Getter for the payload used to construct the `SourceMap` instance. - */ - readonly payload: SourceMapPayload; - /** - * Given a line offset and column offset in the generated source - * file, returns an object representing the SourceMap range in the - * original file if found, or an empty object if not. - * - * The object returned contains the following keys: - * - * The returned value represents the raw range as it appears in the - * SourceMap, based on zero-indexed offsets, _not_ 1-indexed line and - * column numbers as they appear in Error messages and CallSite - * objects. - * - * To get the corresponding 1-indexed line and column numbers from a - * lineNumber and columnNumber as they are reported by Error stacks - * and CallSite objects, use `sourceMap.findOrigin(lineNumber, columnNumber)` - * @param lineOffset The zero-indexed line number offset in the generated source - * @param columnOffset The zero-indexed column number offset in the generated source - */ - findEntry(lineOffset: number, columnOffset: number): SourceMapping | {}; - /** - * Given a 1-indexed `lineNumber` and `columnNumber` from a call site in the generated source, - * find the corresponding call site location in the original source. - * - * If the `lineNumber` and `columnNumber` provided are not found in any source map, - * then an empty object is returned. - * @param lineNumber The 1-indexed line number of the call site in the generated source - * @param columnNumber The 1-indexed column number of the call site in the generated source - */ - findOrigin(lineNumber: number, columnNumber: number): SourceOrigin | {}; - } - function runMain(main?: string): void; - function wrap(script: string): string; - } - global { - interface ImportMeta { - /** - * The directory name of the current module. This is the same as the `path.dirname()` of the `import.meta.filename`. - * **Caveat:** only present on `file:` modules. - */ - dirname: string; - /** - * The full absolute path and filename of the current module, with symlinks resolved. - * This is the same as the `url.fileURLToPath()` of the `import.meta.url`. - * **Caveat:** only local modules support this property. Modules not using the `file:` protocol will not provide it. - */ - filename: string; - /** - * The absolute `file:` URL of the module. - */ - url: string; - /** - * Provides a module-relative resolution function scoped to each module, returning - * the URL string. - * - * Second `parent` parameter is only used when the `--experimental-import-meta-resolve` - * command flag enabled. - * - * @since v20.6.0 - * - * @param specifier The module specifier to resolve relative to `parent`. - * @param parent The absolute parent module URL to resolve from. - * @returns The absolute (`file:`) URL string for the resolved module. - */ - resolve(specifier: string, parent?: string | URL | undefined): string; - } - namespace NodeJS { - interface Module { - /** - * The module objects required for the first time by this one. - * @since v0.1.16 - */ - children: Module[]; - /** - * The `module.exports` object is created by the `Module` system. Sometimes this is - * not acceptable; many want their module to be an instance of some class. To do - * this, assign the desired export object to `module.exports`. - * @since v0.1.16 - */ - exports: any; - /** - * The fully resolved filename of the module. - * @since v0.1.16 - */ - filename: string; - /** - * The identifier for the module. Typically this is the fully resolved - * filename. - * @since v0.1.16 - */ - id: string; - /** - * `true` if the module is running during the Node.js preload - * phase. - * @since v15.4.0, v14.17.0 - */ - isPreloading: boolean; - /** - * Whether or not the module is done loading, or is in the process of - * loading. - * @since v0.1.16 - */ - loaded: boolean; - /** - * The module that first required this one, or `null` if the current module is the - * entry point of the current process, or `undefined` if the module was loaded by - * something that is not a CommonJS module (e.g. REPL or `import`). - * @since v0.1.16 - * @deprecated Please use `require.main` and `module.children` instead. - */ - parent: Module | null | undefined; - /** - * The directory name of the module. This is usually the same as the - * `path.dirname()` of the `module.id`. - * @since v11.14.0 - */ - path: string; - /** - * The search paths for the module. - * @since v0.4.0 - */ - paths: string[]; - /** - * The `module.require()` method provides a way to load a module as if - * `require()` was called from the original module. - * @since v0.5.1 - */ - require(id: string): any; - } - interface Require { - /** - * Used to import modules, `JSON`, and local files. - * @since v0.1.13 - */ - (id: string): any; - /** - * Modules are cached in this object when they are required. By deleting a key - * value from this object, the next `require` will reload the module. - * This does not apply to - * [native addons](https://nodejs.org/docs/latest-v20.x/api/addons.html), - * for which reloading will result in an error. - * @since v0.3.0 - */ - cache: Dict; - /** - * Instruct `require` on how to handle certain file extensions. - * @since v0.3.0 - * @deprecated - */ - extensions: RequireExtensions; - /** - * The `Module` object representing the entry script loaded when the Node.js - * process launched, or `undefined` if the entry point of the program is not a - * CommonJS module. - * @since v0.1.17 - */ - main: Module | undefined; - /** - * @since v0.3.0 - */ - resolve: RequireResolve; - } - /** @deprecated */ - interface RequireExtensions extends Dict<(module: Module, filename: string) => any> { - ".js": (module: Module, filename: string) => any; - ".json": (module: Module, filename: string) => any; - ".node": (module: Module, filename: string) => any; - } - interface RequireResolveOptions { - /** - * Paths to resolve module location from. If present, these - * paths are used instead of the default resolution paths, with the exception - * of - * [GLOBAL\_FOLDERS](https://nodejs.org/docs/latest-v20.x/api/modules.html#loading-from-the-global-folders) - * like `$HOME/.node_modules`, which are - * always included. Each of these paths is used as a starting point for - * the module resolution algorithm, meaning that the `node_modules` hierarchy - * is checked from this location. - * @since v8.9.0 - */ - paths?: string[] | undefined; - } - interface RequireResolve { - /** - * Use the internal `require()` machinery to look up the location of a module, - * but rather than loading the module, just return the resolved filename. - * - * If the module can not be found, a `MODULE_NOT_FOUND` error is thrown. - * @since v0.3.0 - * @param request The module path to resolve. - */ - (id: string, options?: RequireResolveOptions): string; - /** - * Returns an array containing the paths searched during resolution of `request` or - * `null` if the `request` string references a core module, for example `http` or - * `fs`. - * @since v8.9.0 - * @param request The module path whose lookup paths are being retrieved. - */ - paths(request: string): string[] | null; - } - } - /** - * The directory name of the current module. This is the same as the - * `path.dirname()` of the `__filename`. - * @since v0.1.27 - */ - var __dirname: string; - /** - * The file name of the current module. This is the current module file's absolute - * path with symlinks resolved. - * - * For a main program this is not necessarily the same as the file name used in the - * command line. - * @since v0.0.1 - */ - var __filename: string; - /** - * The `exports` variable is available within a module's file-level scope, and is - * assigned the value of `module.exports` before the module is evaluated. - * @since v0.1.16 - */ - var exports: NodeJS.Module["exports"]; - /** - * A reference to the current module. - * @since v0.1.16 - */ - var module: NodeJS.Module; - /** - * @since v0.1.13 - */ - var require: NodeJS.Require; - // Global-scope aliases for backwards compatibility with @types/node <13.0.x - /** @deprecated Use `NodeJS.Module` instead. */ - interface NodeModule extends NodeJS.Module {} - /** @deprecated Use `NodeJS.Require` instead. */ - interface NodeRequire extends NodeJS.Require {} - /** @deprecated Use `NodeJS.RequireResolve` instead. */ - interface RequireResolve extends NodeJS.RequireResolve {} - } - export = Module; -} -declare module "node:module" { - import module = require("module"); - export = module; -} diff --git a/node_modules/@types/node/net.d.ts b/node_modules/@types/node/net.d.ts deleted file mode 100644 index 0689472..0000000 --- a/node_modules/@types/node/net.d.ts +++ /dev/null @@ -1,1012 +0,0 @@ -/** - * > Stability: 2 - Stable - * - * The `node:net` module provides an asynchronous network API for creating stream-based - * TCP or `IPC` servers ({@link createServer}) and clients - * ({@link createConnection}). - * - * It can be accessed using: - * - * ```js - * import net from 'node:net'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/net.js) - */ -declare module "net" { - import { NonSharedBuffer } from "node:buffer"; - import * as stream from "node:stream"; - import { Abortable, EventEmitter } from "node:events"; - import * as dns from "node:dns"; - type LookupFunction = ( - hostname: string, - options: dns.LookupOptions, - callback: (err: NodeJS.ErrnoException | null, address: string | dns.LookupAddress[], family?: number) => void, - ) => void; - interface AddressInfo { - address: string; - family: string; - port: number; - } - interface SocketConstructorOpts { - fd?: number | undefined; - allowHalfOpen?: boolean | undefined; - readable?: boolean | undefined; - writable?: boolean | undefined; - signal?: AbortSignal | undefined; - } - interface OnReadOpts { - buffer: Uint8Array | (() => Uint8Array); - /** - * This function is called for every chunk of incoming data. - * Two arguments are passed to it: the number of bytes written to buffer and a reference to buffer. - * Return false from this function to implicitly pause() the socket. - */ - callback(bytesWritten: number, buf: Uint8Array): boolean; - } - interface ConnectOpts { - /** - * If specified, incoming data is stored in a single buffer and passed to the supplied callback when data arrives on the socket. - * Note: this will cause the streaming functionality to not provide any data, however events like 'error', 'end', and 'close' will - * still be emitted as normal and methods like pause() and resume() will also behave as expected. - */ - onread?: OnReadOpts | undefined; - } - interface TcpSocketConnectOpts extends ConnectOpts { - port: number; - host?: string | undefined; - localAddress?: string | undefined; - localPort?: number | undefined; - hints?: number | undefined; - family?: number | undefined; - lookup?: LookupFunction | undefined; - noDelay?: boolean | undefined; - keepAlive?: boolean | undefined; - keepAliveInitialDelay?: number | undefined; - /** - * @since v18.13.0 - */ - autoSelectFamily?: boolean | undefined; - /** - * @since v18.13.0 - */ - autoSelectFamilyAttemptTimeout?: number | undefined; - } - interface IpcSocketConnectOpts extends ConnectOpts { - path: string; - } - type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts; - type SocketReadyState = "opening" | "open" | "readOnly" | "writeOnly" | "closed"; - /** - * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint - * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also - * an `EventEmitter`. - * - * A `net.Socket` can be created by the user and used directly to interact with - * a server. For example, it is returned by {@link createConnection}, - * so the user can use it to talk to the server. - * - * It can also be created by Node.js and passed to the user when a connection - * is received. For example, it is passed to the listeners of a `'connection'` event emitted on a {@link Server}, so the user can use - * it to interact with the client. - * @since v0.3.4 - */ - class Socket extends stream.Duplex { - constructor(options?: SocketConstructorOpts); - /** - * Destroys the socket after all data is written. If the `finish` event was already emitted the socket is destroyed immediately. - * If the socket is still writable it implicitly calls `socket.end()`. - * @since v0.3.4 - */ - destroySoon(): void; - /** - * Sends data on the socket. The second parameter specifies the encoding in the - * case of a string. It defaults to UTF8 encoding. - * - * Returns `true` if the entire data was flushed successfully to the kernel - * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is again free. - * - * The optional `callback` parameter will be executed when the data is finally - * written out, which may not be immediately. - * - * See `Writable` stream `write()` method for more - * information. - * @since v0.1.90 - * @param [encoding='utf8'] Only used when data is `string`. - */ - write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; - write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean; - /** - * Initiate a connection on a given socket. - * - * Possible signatures: - * - * * `socket.connect(options[, connectListener])` - * * `socket.connect(path[, connectListener])` for `IPC` connections. - * * `socket.connect(port[, host][, connectListener])` for TCP connections. - * * Returns: `net.Socket` The socket itself. - * - * This function is asynchronous. When the connection is established, the `'connect'` event will be emitted. If there is a problem connecting, - * instead of a `'connect'` event, an `'error'` event will be emitted with - * the error passed to the `'error'` listener. - * The last parameter `connectListener`, if supplied, will be added as a listener - * for the `'connect'` event **once**. - * - * This function should only be used for reconnecting a socket after`'close'` has been emitted or otherwise it may lead to undefined - * behavior. - */ - connect(options: SocketConnectOpts, connectionListener?: () => void): this; - connect(port: number, host: string, connectionListener?: () => void): this; - connect(port: number, connectionListener?: () => void): this; - connect(path: string, connectionListener?: () => void): this; - /** - * Set the encoding for the socket as a `Readable Stream`. See `readable.setEncoding()` for more information. - * @since v0.1.90 - * @return The socket itself. - */ - setEncoding(encoding?: BufferEncoding): this; - /** - * Pauses the reading of data. That is, `'data'` events will not be emitted. - * Useful to throttle back an upload. - * @return The socket itself. - */ - pause(): this; - /** - * Close the TCP connection by sending an RST packet and destroy the stream. - * If this TCP socket is in connecting status, it will send an RST packet and destroy this TCP socket once it is connected. - * Otherwise, it will call `socket.destroy` with an `ERR_SOCKET_CLOSED` Error. - * If this is not a TCP socket (for example, a pipe), calling this method will immediately throw an `ERR_INVALID_HANDLE_TYPE` Error. - * @since v18.3.0, v16.17.0 - */ - resetAndDestroy(): this; - /** - * Resumes reading after a call to `socket.pause()`. - * @return The socket itself. - */ - resume(): this; - /** - * Sets the socket to timeout after `timeout` milliseconds of inactivity on - * the socket. By default `net.Socket` do not have a timeout. - * - * When an idle timeout is triggered the socket will receive a `'timeout'` event but the connection will not be severed. The user must manually call `socket.end()` or `socket.destroy()` to - * end the connection. - * - * ```js - * socket.setTimeout(3000); - * socket.on('timeout', () => { - * console.log('socket timeout'); - * socket.end(); - * }); - * ``` - * - * If `timeout` is 0, then the existing idle timeout is disabled. - * - * The optional `callback` parameter will be added as a one-time listener for the `'timeout'` event. - * @since v0.1.90 - * @return The socket itself. - */ - setTimeout(timeout: number, callback?: () => void): this; - /** - * Enable/disable the use of Nagle's algorithm. - * - * When a TCP connection is created, it will have Nagle's algorithm enabled. - * - * Nagle's algorithm delays data before it is sent via the network. It attempts - * to optimize throughput at the expense of latency. - * - * Passing `true` for `noDelay` or not passing an argument will disable Nagle's - * algorithm for the socket. Passing `false` for `noDelay` will enable Nagle's - * algorithm. - * @since v0.1.90 - * @param [noDelay=true] - * @return The socket itself. - */ - setNoDelay(noDelay?: boolean): this; - /** - * Enable/disable keep-alive functionality, and optionally set the initial - * delay before the first keepalive probe is sent on an idle socket. - * - * Set `initialDelay` (in milliseconds) to set the delay between the last - * data packet received and the first keepalive probe. Setting `0` for`initialDelay` will leave the value unchanged from the default - * (or previous) setting. - * - * Enabling the keep-alive functionality will set the following socket options: - * - * * `SO_KEEPALIVE=1` - * * `TCP_KEEPIDLE=initialDelay` - * * `TCP_KEEPCNT=10` - * * `TCP_KEEPINTVL=1` - * @since v0.1.92 - * @param [enable=false] - * @param [initialDelay=0] - * @return The socket itself. - */ - setKeepAlive(enable?: boolean, initialDelay?: number): this; - /** - * Returns the bound `address`, the address `family` name and `port` of the - * socket as reported by the operating system:`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }` - * @since v0.1.90 - */ - address(): AddressInfo | {}; - /** - * Calling `unref()` on a socket will allow the program to exit if this is the only - * active socket in the event system. If the socket is already `unref`ed calling`unref()` again will have no effect. - * @since v0.9.1 - * @return The socket itself. - */ - unref(): this; - /** - * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will _not_ let the program exit if it's the only socket left (the default behavior). - * If the socket is `ref`ed calling `ref` again will have no effect. - * @since v0.9.1 - * @return The socket itself. - */ - ref(): this; - /** - * This property is only present if the family autoselection algorithm is enabled in `socket.connect(options)` - * and it is an array of the addresses that have been attempted. - * - * Each address is a string in the form of `$IP:$PORT`. - * If the connection was successful, then the last address is the one that the socket is currently connected to. - * @since v19.4.0 - */ - readonly autoSelectFamilyAttemptedAddresses: string[]; - /** - * This property shows the number of characters buffered for writing. The buffer - * may contain strings whose length after encoding is not yet known. So this number - * is only an approximation of the number of bytes in the buffer. - * - * `net.Socket` has the property that `socket.write()` always works. This is to - * help users get up and running quickly. The computer cannot always keep up - * with the amount of data that is written to a socket. The network connection - * simply might be too slow. Node.js will internally queue up the data written to a - * socket and send it out over the wire when it is possible. - * - * The consequence of this internal buffering is that memory may grow. - * Users who experience large or growing `bufferSize` should attempt to - * "throttle" the data flows in their program with `socket.pause()` and `socket.resume()`. - * @since v0.3.8 - * @deprecated Since v14.6.0 - Use `writableLength` instead. - */ - readonly bufferSize: number; - /** - * The amount of received bytes. - * @since v0.5.3 - */ - readonly bytesRead: number; - /** - * The amount of bytes sent. - * @since v0.5.3 - */ - readonly bytesWritten: number; - /** - * If `true`, `socket.connect(options[, connectListener])` was - * called and has not yet finished. It will stay `true` until the socket becomes - * connected, then it is set to `false` and the `'connect'` event is emitted. Note - * that the `socket.connect(options[, connectListener])` callback is a listener for the `'connect'` event. - * @since v6.1.0 - */ - readonly connecting: boolean; - /** - * This is `true` if the socket is not connected yet, either because `.connect()`has not yet been called or because it is still in the process of connecting - * (see `socket.connecting`). - * @since v11.2.0, v10.16.0 - */ - readonly pending: boolean; - /** - * See `writable.destroyed` for further details. - */ - readonly destroyed: boolean; - /** - * The string representation of the local IP address the remote client is - * connecting on. For example, in a server listening on `'0.0.0.0'`, if a client - * connects on `'192.168.1.1'`, the value of `socket.localAddress` would be`'192.168.1.1'`. - * @since v0.9.6 - */ - readonly localAddress?: string; - /** - * The numeric representation of the local port. For example, `80` or `21`. - * @since v0.9.6 - */ - readonly localPort?: number; - /** - * The string representation of the local IP family. `'IPv4'` or `'IPv6'`. - * @since v18.8.0, v16.18.0 - */ - readonly localFamily?: string; - /** - * This property represents the state of the connection as a string. - * - * * If the stream is connecting `socket.readyState` is `opening`. - * * If the stream is readable and writable, it is `open`. - * * If the stream is readable and not writable, it is `readOnly`. - * * If the stream is not readable and writable, it is `writeOnly`. - * @since v0.5.0 - */ - readonly readyState: SocketReadyState; - /** - * The string representation of the remote IP address. For example,`'74.125.127.100'` or `'2001:4860:a005::68'`. Value may be `undefined` if - * the socket is destroyed (for example, if the client disconnected). - * @since v0.5.10 - */ - readonly remoteAddress: string | undefined; - /** - * The string representation of the remote IP family. `'IPv4'` or `'IPv6'`. Value may be `undefined` if - * the socket is destroyed (for example, if the client disconnected). - * @since v0.11.14 - */ - readonly remoteFamily: string | undefined; - /** - * The numeric representation of the remote port. For example, `80` or `21`. Value may be `undefined` if - * the socket is destroyed (for example, if the client disconnected). - * @since v0.5.10 - */ - readonly remotePort: number | undefined; - /** - * The socket timeout in milliseconds as set by `socket.setTimeout()`. - * It is `undefined` if a timeout has not been set. - * @since v10.7.0 - */ - readonly timeout?: number; - /** - * Half-closes the socket. i.e., it sends a FIN packet. It is possible the - * server will still send some data. - * - * See `writable.end()` for further details. - * @since v0.1.90 - * @param [encoding='utf8'] Only used when data is `string`. - * @param callback Optional callback for when the socket is finished. - * @return The socket itself. - */ - end(callback?: () => void): this; - end(buffer: Uint8Array | string, callback?: () => void): this; - end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this; - /** - * events.EventEmitter - * 1. close - * 2. connect - * 3. connectionAttempt - * 4. connectionAttemptFailed - * 5. connectionAttemptTimeout - * 6. data - * 7. drain - * 8. end - * 9. error - * 10. lookup - * 11. ready - * 12. timeout - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: (hadError: boolean) => void): this; - addListener(event: "connect", listener: () => void): this; - addListener(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this; - addListener( - event: "connectionAttemptFailed", - listener: (ip: string, port: number, family: number, error: Error) => void, - ): this; - addListener( - event: "connectionAttemptTimeout", - listener: (ip: string, port: number, family: number) => void, - ): this; - addListener(event: "data", listener: (data: NonSharedBuffer) => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener( - event: "lookup", - listener: (err: Error, address: string, family: string | number, host: string) => void, - ): this; - addListener(event: "ready", listener: () => void): this; - addListener(event: "timeout", listener: () => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "close", hadError: boolean): boolean; - emit(event: "connect"): boolean; - emit(event: "connectionAttempt", ip: string, port: number, family: number): boolean; - emit(event: "connectionAttemptFailed", ip: string, port: number, family: number, error: Error): boolean; - emit(event: "connectionAttemptTimeout", ip: string, port: number, family: number): boolean; - emit(event: "data", data: NonSharedBuffer): boolean; - emit(event: "drain"): boolean; - emit(event: "end"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "lookup", err: Error, address: string, family: string | number, host: string): boolean; - emit(event: "ready"): boolean; - emit(event: "timeout"): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: (hadError: boolean) => void): this; - on(event: "connect", listener: () => void): this; - on(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this; - on( - event: "connectionAttemptFailed", - listener: (ip: string, port: number, family: number, error: Error) => void, - ): this; - on(event: "connectionAttemptTimeout", listener: (ip: string, port: number, family: number) => void): this; - on(event: "data", listener: (data: NonSharedBuffer) => void): this; - on(event: "drain", listener: () => void): this; - on(event: "end", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on( - event: "lookup", - listener: (err: Error, address: string, family: string | number, host: string) => void, - ): this; - on(event: "ready", listener: () => void): this; - on(event: "timeout", listener: () => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: (hadError: boolean) => void): this; - once(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this; - once( - event: "connectionAttemptFailed", - listener: (ip: string, port: number, family: number, error: Error) => void, - ): this; - once(event: "connectionAttemptTimeout", listener: (ip: string, port: number, family: number) => void): this; - once(event: "connect", listener: () => void): this; - once(event: "data", listener: (data: NonSharedBuffer) => void): this; - once(event: "drain", listener: () => void): this; - once(event: "end", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once( - event: "lookup", - listener: (err: Error, address: string, family: string | number, host: string) => void, - ): this; - once(event: "ready", listener: () => void): this; - once(event: "timeout", listener: () => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: (hadError: boolean) => void): this; - prependListener(event: "connect", listener: () => void): this; - prependListener(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this; - prependListener( - event: "connectionAttemptFailed", - listener: (ip: string, port: number, family: number, error: Error) => void, - ): this; - prependListener( - event: "connectionAttemptTimeout", - listener: (ip: string, port: number, family: number) => void, - ): this; - prependListener(event: "data", listener: (data: NonSharedBuffer) => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener( - event: "lookup", - listener: (err: Error, address: string, family: string | number, host: string) => void, - ): this; - prependListener(event: "ready", listener: () => void): this; - prependListener(event: "timeout", listener: () => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: (hadError: boolean) => void): this; - prependOnceListener(event: "connect", listener: () => void): this; - prependOnceListener( - event: "connectionAttempt", - listener: (ip: string, port: number, family: number) => void, - ): this; - prependOnceListener( - event: "connectionAttemptFailed", - listener: (ip: string, port: number, family: number, error: Error) => void, - ): this; - prependOnceListener( - event: "connectionAttemptTimeout", - listener: (ip: string, port: number, family: number) => void, - ): this; - prependOnceListener(event: "data", listener: (data: NonSharedBuffer) => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener( - event: "lookup", - listener: (err: Error, address: string, family: string | number, host: string) => void, - ): this; - prependOnceListener(event: "ready", listener: () => void): this; - prependOnceListener(event: "timeout", listener: () => void): this; - } - interface ListenOptions extends Abortable { - port?: number | undefined; - host?: string | undefined; - backlog?: number | undefined; - path?: string | undefined; - exclusive?: boolean | undefined; - readableAll?: boolean | undefined; - writableAll?: boolean | undefined; - /** - * @default false - */ - ipv6Only?: boolean | undefined; - } - interface ServerOpts { - /** - * Indicates whether half-opened TCP connections are allowed. - * @default false - */ - allowHalfOpen?: boolean | undefined; - /** - * Indicates whether the socket should be paused on incoming connections. - * @default false - */ - pauseOnConnect?: boolean | undefined; - /** - * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received. - * @default false - * @since v16.5.0 - */ - noDelay?: boolean | undefined; - /** - * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received, - * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`. - * @default false - * @since v16.5.0 - */ - keepAlive?: boolean | undefined; - /** - * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket. - * @default 0 - * @since v16.5.0 - */ - keepAliveInitialDelay?: number | undefined; - /** - * Optionally overrides all `net.Socket`s' `readableHighWaterMark` and `writableHighWaterMark`. - * @default See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-v20.x/api/stream.html#streamgetdefaulthighwatermarkobjectmode). - * @since v18.17.0, v20.1.0 - */ - highWaterMark?: number | undefined; - } - interface DropArgument { - localAddress?: string; - localPort?: number; - localFamily?: string; - remoteAddress?: string; - remotePort?: number; - remoteFamily?: string; - } - /** - * This class is used to create a TCP or `IPC` server. - * @since v0.1.90 - */ - class Server extends EventEmitter { - constructor(connectionListener?: (socket: Socket) => void); - constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void); - /** - * Start a server listening for connections. A `net.Server` can be a TCP or - * an `IPC` server depending on what it listens to. - * - * Possible signatures: - * - * * `server.listen(handle[, backlog][, callback])` - * * `server.listen(options[, callback])` - * * `server.listen(path[, backlog][, callback])` for `IPC` servers - * * `server.listen([port[, host[, backlog]]][, callback])` for TCP servers - * - * This function is asynchronous. When the server starts listening, the `'listening'` event will be emitted. The last parameter `callback`will be added as a listener for the `'listening'` - * event. - * - * All `listen()` methods can take a `backlog` parameter to specify the maximum - * length of the queue of pending connections. The actual length will be determined - * by the OS through sysctl settings such as `tcp_max_syn_backlog` and `somaxconn` on Linux. The default value of this parameter is 511 (not 512). - * - * All {@link Socket} are set to `SO_REUSEADDR` (see [`socket(7)`](https://man7.org/linux/man-pages/man7/socket.7.html) for - * details). - * - * The `server.listen()` method can be called again if and only if there was an - * error during the first `server.listen()` call or `server.close()` has been - * called. Otherwise, an `ERR_SERVER_ALREADY_LISTEN` error will be thrown. - * - * One of the most common errors raised when listening is `EADDRINUSE`. - * This happens when another server is already listening on the requested`port`/`path`/`handle`. One way to handle this would be to retry - * after a certain amount of time: - * - * ```js - * server.on('error', (e) => { - * if (e.code === 'EADDRINUSE') { - * console.error('Address in use, retrying...'); - * setTimeout(() => { - * server.close(); - * server.listen(PORT, HOST); - * }, 1000); - * } - * }); - * ``` - */ - listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this; - listen(port?: number, hostname?: string, listeningListener?: () => void): this; - listen(port?: number, backlog?: number, listeningListener?: () => void): this; - listen(port?: number, listeningListener?: () => void): this; - listen(path: string, backlog?: number, listeningListener?: () => void): this; - listen(path: string, listeningListener?: () => void): this; - listen(options: ListenOptions, listeningListener?: () => void): this; - listen(handle: any, backlog?: number, listeningListener?: () => void): this; - listen(handle: any, listeningListener?: () => void): this; - /** - * Stops the server from accepting new connections and keeps existing - * connections. This function is asynchronous, the server is finally closed - * when all connections are ended and the server emits a `'close'` event. - * The optional `callback` will be called once the `'close'` event occurs. Unlike - * that event, it will be called with an `Error` as its only argument if the server - * was not open when it was closed. - * @since v0.1.90 - * @param callback Called when the server is closed. - */ - close(callback?: (err?: Error) => void): this; - /** - * Returns the bound `address`, the address `family` name, and `port` of the server - * as reported by the operating system if listening on an IP socket - * (useful to find which port was assigned when getting an OS-assigned address):`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`. - * - * For a server listening on a pipe or Unix domain socket, the name is returned - * as a string. - * - * ```js - * const server = net.createServer((socket) => { - * socket.end('goodbye\n'); - * }).on('error', (err) => { - * // Handle errors here. - * throw err; - * }); - * - * // Grab an arbitrary unused port. - * server.listen(() => { - * console.log('opened server on', server.address()); - * }); - * ``` - * - * `server.address()` returns `null` before the `'listening'` event has been - * emitted or after calling `server.close()`. - * @since v0.1.90 - */ - address(): AddressInfo | string | null; - /** - * Asynchronously get the number of concurrent connections on the server. Works - * when sockets were sent to forks. - * - * Callback should take two arguments `err` and `count`. - * @since v0.9.7 - */ - getConnections(cb: (error: Error | null, count: number) => void): this; - /** - * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will _not_ let the program exit if it's the only server left (the default behavior). - * If the server is `ref`ed calling `ref()` again will have no effect. - * @since v0.9.1 - */ - ref(): this; - /** - * Calling `unref()` on a server will allow the program to exit if this is the only - * active server in the event system. If the server is already `unref`ed calling`unref()` again will have no effect. - * @since v0.9.1 - */ - unref(): this; - /** - * Set this property to reject connections when the server's connection count gets - * high. - * - * It is not recommended to use this option once a socket has been sent to a child - * with `child_process.fork()`. - * @since v0.2.0 - */ - maxConnections: number; - connections: number; - /** - * Indicates whether or not the server is listening for connections. - * @since v5.7.0 - */ - readonly listening: boolean; - /** - * events.EventEmitter - * 1. close - * 2. connection - * 3. error - * 4. listening - * 5. drop - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "connection", listener: (socket: Socket) => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "listening", listener: () => void): this; - addListener(event: "drop", listener: (data?: DropArgument) => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "connection", socket: Socket): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "listening"): boolean; - emit(event: "drop", data?: DropArgument): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: () => void): this; - on(event: "connection", listener: (socket: Socket) => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "listening", listener: () => void): this; - on(event: "drop", listener: (data?: DropArgument) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "connection", listener: (socket: Socket) => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "listening", listener: () => void): this; - once(event: "drop", listener: (data?: DropArgument) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "connection", listener: (socket: Socket) => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "listening", listener: () => void): this; - prependListener(event: "drop", listener: (data?: DropArgument) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "connection", listener: (socket: Socket) => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "listening", listener: () => void): this; - prependOnceListener(event: "drop", listener: (data?: DropArgument) => void): this; - /** - * Calls {@link Server.close()} and returns a promise that fulfills when the server has closed. - * @since v20.5.0 - */ - [Symbol.asyncDispose](): Promise; - } - type IPVersion = "ipv4" | "ipv6"; - /** - * The `BlockList` object can be used with some network APIs to specify rules for - * disabling inbound or outbound access to specific IP addresses, IP ranges, or - * IP subnets. - * @since v15.0.0, v14.18.0 - */ - class BlockList { - /** - * Adds a rule to block the given IP address. - * @since v15.0.0, v14.18.0 - * @param address An IPv4 or IPv6 address. - * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. - */ - addAddress(address: string, type?: IPVersion): void; - addAddress(address: SocketAddress): void; - /** - * Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive). - * @since v15.0.0, v14.18.0 - * @param start The starting IPv4 or IPv6 address in the range. - * @param end The ending IPv4 or IPv6 address in the range. - * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. - */ - addRange(start: string, end: string, type?: IPVersion): void; - addRange(start: SocketAddress, end: SocketAddress): void; - /** - * Adds a rule to block a range of IP addresses specified as a subnet mask. - * @since v15.0.0, v14.18.0 - * @param net The network IPv4 or IPv6 address. - * @param prefix The number of CIDR prefix bits. For IPv4, this must be a value between `0` and `32`. For IPv6, this must be between `0` and `128`. - * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. - */ - addSubnet(net: SocketAddress, prefix: number): void; - addSubnet(net: string, prefix: number, type?: IPVersion): void; - /** - * Returns `true` if the given IP address matches any of the rules added to the`BlockList`. - * - * ```js - * const blockList = new net.BlockList(); - * blockList.addAddress('123.123.123.123'); - * blockList.addRange('10.0.0.1', '10.0.0.10'); - * blockList.addSubnet('8592:757c:efae:4e45::', 64, 'ipv6'); - * - * console.log(blockList.check('123.123.123.123')); // Prints: true - * console.log(blockList.check('10.0.0.3')); // Prints: true - * console.log(blockList.check('222.111.111.222')); // Prints: false - * - * // IPv6 notation for IPv4 addresses works: - * console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true - * console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true - * ``` - * @since v15.0.0, v14.18.0 - * @param address The IP address to check - * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`. - */ - check(address: SocketAddress): boolean; - check(address: string, type?: IPVersion): boolean; - /** - * The list of rules added to the blocklist. - * @since v15.0.0, v14.18.0 - */ - rules: readonly string[]; - } - interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts { - timeout?: number | undefined; - } - interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts { - timeout?: number | undefined; - } - type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts; - /** - * Creates a new TCP or `IPC` server. - * - * If `allowHalfOpen` is set to `true`, when the other end of the socket - * signals the end of transmission, the server will only send back the end of - * transmission when `socket.end()` is explicitly called. For example, in the - * context of TCP, when a FIN packed is received, a FIN packed is sent - * back only when `socket.end()` is explicitly called. Until then the - * connection is half-closed (non-readable but still writable). See `'end'` event and [RFC 1122](https://tools.ietf.org/html/rfc1122) (section 4.2.2.13) for more information. - * - * If `pauseOnConnect` is set to `true`, then the socket associated with each - * incoming connection will be paused, and no data will be read from its handle. - * This allows connections to be passed between processes without any data being - * read by the original process. To begin reading data from a paused socket, call `socket.resume()`. - * - * The server can be a TCP server or an `IPC` server, depending on what it `listen()` to. - * - * Here is an example of a TCP echo server which listens for connections - * on port 8124: - * - * ```js - * import net from 'node:net'; - * const server = net.createServer((c) => { - * // 'connection' listener. - * console.log('client connected'); - * c.on('end', () => { - * console.log('client disconnected'); - * }); - * c.write('hello\r\n'); - * c.pipe(c); - * }); - * server.on('error', (err) => { - * throw err; - * }); - * server.listen(8124, () => { - * console.log('server bound'); - * }); - * ``` - * - * Test this by using `telnet`: - * - * ```bash - * telnet localhost 8124 - * ``` - * - * To listen on the socket `/tmp/echo.sock`: - * - * ```js - * server.listen('/tmp/echo.sock', () => { - * console.log('server bound'); - * }); - * ``` - * - * Use `nc` to connect to a Unix domain socket server: - * - * ```bash - * nc -U /tmp/echo.sock - * ``` - * @since v0.5.0 - * @param connectionListener Automatically set as a listener for the {@link 'connection'} event. - */ - function createServer(connectionListener?: (socket: Socket) => void): Server; - function createServer(options?: ServerOpts, connectionListener?: (socket: Socket) => void): Server; - /** - * Aliases to {@link createConnection}. - * - * Possible signatures: - * - * * {@link connect} - * * {@link connect} for `IPC` connections. - * * {@link connect} for TCP connections. - */ - function connect(options: NetConnectOpts, connectionListener?: () => void): Socket; - function connect(port: number, host?: string, connectionListener?: () => void): Socket; - function connect(path: string, connectionListener?: () => void): Socket; - /** - * A factory function, which creates a new {@link Socket}, - * immediately initiates connection with `socket.connect()`, - * then returns the `net.Socket` that starts the connection. - * - * When the connection is established, a `'connect'` event will be emitted - * on the returned socket. The last parameter `connectListener`, if supplied, - * will be added as a listener for the `'connect'` event **once**. - * - * Possible signatures: - * - * * {@link createConnection} - * * {@link createConnection} for `IPC` connections. - * * {@link createConnection} for TCP connections. - * - * The {@link connect} function is an alias to this function. - */ - function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket; - function createConnection(port: number, host?: string, connectionListener?: () => void): Socket; - function createConnection(path: string, connectionListener?: () => void): Socket; - /** - * Gets the current default value of the `autoSelectFamily` option of `socket.connect(options)`. - * The initial default value is `true`, unless the command line option`--no-network-family-autoselection` is provided. - * @since v19.4.0 - */ - function getDefaultAutoSelectFamily(): boolean; - /** - * Sets the default value of the `autoSelectFamily` option of `socket.connect(options)`. - * @since v19.4.0 - */ - function setDefaultAutoSelectFamily(value: boolean): void; - /** - * Gets the current default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`. - * The initial default value is `250` or the value specified via the command line option `--network-family-autoselection-attempt-timeout`. - * @returns The current default value of the `autoSelectFamilyAttemptTimeout` option. - * @since v19.8.0, v18.8.0 - */ - function getDefaultAutoSelectFamilyAttemptTimeout(): number; - /** - * Sets the default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`. - * @param value The new default value, which must be a positive number. If the number is less than `10`, the value `10` is used instead. The initial default value is `250` or the value specified via the command line - * option `--network-family-autoselection-attempt-timeout`. - * @since v19.8.0, v18.8.0 - */ - function setDefaultAutoSelectFamilyAttemptTimeout(value: number): void; - /** - * Returns `6` if `input` is an IPv6 address. Returns `4` if `input` is an IPv4 - * address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no leading zeroes. Otherwise, returns`0`. - * - * ```js - * net.isIP('::1'); // returns 6 - * net.isIP('127.0.0.1'); // returns 4 - * net.isIP('127.000.000.001'); // returns 0 - * net.isIP('127.0.0.1/24'); // returns 0 - * net.isIP('fhqwhgads'); // returns 0 - * ``` - * @since v0.3.0 - */ - function isIP(input: string): number; - /** - * Returns `true` if `input` is an IPv4 address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no - * leading zeroes. Otherwise, returns `false`. - * - * ```js - * net.isIPv4('127.0.0.1'); // returns true - * net.isIPv4('127.000.000.001'); // returns false - * net.isIPv4('127.0.0.1/24'); // returns false - * net.isIPv4('fhqwhgads'); // returns false - * ``` - * @since v0.3.0 - */ - function isIPv4(input: string): boolean; - /** - * Returns `true` if `input` is an IPv6 address. Otherwise, returns `false`. - * - * ```js - * net.isIPv6('::1'); // returns true - * net.isIPv6('fhqwhgads'); // returns false - * ``` - * @since v0.3.0 - */ - function isIPv6(input: string): boolean; - interface SocketAddressInitOptions { - /** - * The network address as either an IPv4 or IPv6 string. - * @default 127.0.0.1 - */ - address?: string | undefined; - /** - * @default `'ipv4'` - */ - family?: IPVersion | undefined; - /** - * An IPv6 flow-label used only if `family` is `'ipv6'`. - * @default 0 - */ - flowlabel?: number | undefined; - /** - * An IP port. - * @default 0 - */ - port?: number | undefined; - } - /** - * @since v15.14.0, v14.18.0 - */ - class SocketAddress { - constructor(options: SocketAddressInitOptions); - /** - * Either \`'ipv4'\` or \`'ipv6'\`. - * @since v15.14.0, v14.18.0 - */ - readonly address: string; - /** - * Either \`'ipv4'\` or \`'ipv6'\`. - * @since v15.14.0, v14.18.0 - */ - readonly family: IPVersion; - /** - * @since v15.14.0, v14.18.0 - */ - readonly port: number; - /** - * @since v15.14.0, v14.18.0 - */ - readonly flowlabel: number; - } -} -declare module "node:net" { - export * from "net"; -} diff --git a/node_modules/@types/node/os.d.ts b/node_modules/@types/node/os.d.ts deleted file mode 100644 index 331df6e..0000000 --- a/node_modules/@types/node/os.d.ts +++ /dev/null @@ -1,506 +0,0 @@ -/** - * The `node:os` module provides operating system-related utility methods and - * properties. It can be accessed using: - * - * ```js - * import os from 'node:os'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/os.js) - */ -declare module "os" { - import { NonSharedBuffer } from "buffer"; - interface CpuInfo { - model: string; - speed: number; - times: { - /** The number of milliseconds the CPU has spent in user mode. */ - user: number; - /** The number of milliseconds the CPU has spent in nice mode. */ - nice: number; - /** The number of milliseconds the CPU has spent in sys mode. */ - sys: number; - /** The number of milliseconds the CPU has spent in idle mode. */ - idle: number; - /** The number of milliseconds the CPU has spent in irq mode. */ - irq: number; - }; - } - interface NetworkInterfaceBase { - address: string; - netmask: string; - mac: string; - internal: boolean; - cidr: string | null; - scopeid?: number; - } - interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase { - family: "IPv4"; - } - interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase { - family: "IPv6"; - scopeid: number; - } - interface UserInfo { - username: T; - uid: number; - gid: number; - shell: T | null; - homedir: T; - } - type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6; - /** - * Returns the host name of the operating system as a string. - * @since v0.3.3 - */ - function hostname(): string; - /** - * Returns an array containing the 1, 5, and 15 minute load averages. - * - * The load average is a measure of system activity calculated by the operating - * system and expressed as a fractional number. - * - * The load average is a Unix-specific concept. On Windows, the return value is - * always `[0, 0, 0]`. - * @since v0.3.3 - */ - function loadavg(): number[]; - /** - * Returns the system uptime in number of seconds. - * @since v0.3.3 - */ - function uptime(): number; - /** - * Returns the amount of free system memory in bytes as an integer. - * @since v0.3.3 - */ - function freemem(): number; - /** - * Returns the total amount of system memory in bytes as an integer. - * @since v0.3.3 - */ - function totalmem(): number; - /** - * Returns an array of objects containing information about each logical CPU core. - * The array will be empty if no CPU information is available, such as if the `/proc` file system is unavailable. - * - * The properties included on each object include: - * - * ```js - * [ - * { - * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', - * speed: 2926, - * times: { - * user: 252020, - * nice: 0, - * sys: 30340, - * idle: 1070356870, - * irq: 0, - * }, - * }, - * { - * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', - * speed: 2926, - * times: { - * user: 306960, - * nice: 0, - * sys: 26980, - * idle: 1071569080, - * irq: 0, - * }, - * }, - * { - * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', - * speed: 2926, - * times: { - * user: 248450, - * nice: 0, - * sys: 21750, - * idle: 1070919370, - * irq: 0, - * }, - * }, - * { - * model: 'Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz', - * speed: 2926, - * times: { - * user: 256880, - * nice: 0, - * sys: 19430, - * idle: 1070905480, - * irq: 20, - * }, - * }, - * ] - * ``` - * - * `nice` values are POSIX-only. On Windows, the `nice` values of all processors - * are always 0. - * - * `os.cpus().length` should not be used to calculate the amount of parallelism - * available to an application. Use {@link availableParallelism} for this purpose. - * @since v0.3.3 - */ - function cpus(): CpuInfo[]; - /** - * Returns an estimate of the default amount of parallelism a program should use. - * Always returns a value greater than zero. - * - * This function is a small wrapper about libuv's [`uv_available_parallelism()`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_available_parallelism). - * @since v19.4.0, v18.14.0 - */ - function availableParallelism(): number; - /** - * Returns the operating system name as returned by [`uname(3)`](https://linux.die.net/man/3/uname). For example, it - * returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows. - * - * See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for additional information - * about the output of running [`uname(3)`](https://linux.die.net/man/3/uname) on various operating systems. - * @since v0.3.3 - */ - function type(): string; - /** - * Returns the operating system as a string. - * - * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `GetVersionExW()` is used. See - * [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. - * @since v0.3.3 - */ - function release(): string; - /** - * Returns an object containing network interfaces that have been assigned a - * network address. - * - * Each key on the returned object identifies a network interface. The associated - * value is an array of objects that each describe an assigned network address. - * - * The properties available on the assigned network address object include: - * - * ```js - * { - * lo: [ - * { - * address: '127.0.0.1', - * netmask: '255.0.0.0', - * family: 'IPv4', - * mac: '00:00:00:00:00:00', - * internal: true, - * cidr: '127.0.0.1/8' - * }, - * { - * address: '::1', - * netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', - * family: 'IPv6', - * mac: '00:00:00:00:00:00', - * scopeid: 0, - * internal: true, - * cidr: '::1/128' - * } - * ], - * eth0: [ - * { - * address: '192.168.1.108', - * netmask: '255.255.255.0', - * family: 'IPv4', - * mac: '01:02:03:0a:0b:0c', - * internal: false, - * cidr: '192.168.1.108/24' - * }, - * { - * address: 'fe80::a00:27ff:fe4e:66a1', - * netmask: 'ffff:ffff:ffff:ffff::', - * family: 'IPv6', - * mac: '01:02:03:0a:0b:0c', - * scopeid: 1, - * internal: false, - * cidr: 'fe80::a00:27ff:fe4e:66a1/64' - * } - * ] - * } - * ``` - * @since v0.6.0 - */ - function networkInterfaces(): NodeJS.Dict; - /** - * Returns the string path of the current user's home directory. - * - * On POSIX, it uses the `$HOME` environment variable if defined. Otherwise it - * uses the [effective UID](https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID) to look up the user's home directory. - * - * On Windows, it uses the `USERPROFILE` environment variable if defined. - * Otherwise it uses the path to the profile directory of the current user. - * @since v2.3.0 - */ - function homedir(): string; - interface UserInfoOptions { - encoding?: BufferEncoding | "buffer" | undefined; - } - interface UserInfoOptionsWithBufferEncoding extends UserInfoOptions { - encoding: "buffer"; - } - interface UserInfoOptionsWithStringEncoding extends UserInfoOptions { - encoding?: BufferEncoding | undefined; - } - /** - * Returns information about the currently effective user. On POSIX platforms, - * this is typically a subset of the password file. The returned object includes - * the `username`, `uid`, `gid`, `shell`, and `homedir`. On Windows, the `uid` and `gid` fields are `-1`, and `shell` is `null`. - * - * The value of `homedir` returned by `os.userInfo()` is provided by the operating - * system. This differs from the result of `os.homedir()`, which queries - * environment variables for the home directory before falling back to the - * operating system response. - * - * Throws a [`SystemError`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`. - * @since v6.0.0 - */ - function userInfo(options?: UserInfoOptionsWithStringEncoding): UserInfo; - function userInfo(options: UserInfoOptionsWithBufferEncoding): UserInfo; - function userInfo(options: UserInfoOptions): UserInfo; - type SignalConstants = { - [key in NodeJS.Signals]: number; - }; - namespace constants { - const UV_UDP_REUSEADDR: number; - namespace signals {} - const signals: SignalConstants; - namespace errno { - const E2BIG: number; - const EACCES: number; - const EADDRINUSE: number; - const EADDRNOTAVAIL: number; - const EAFNOSUPPORT: number; - const EAGAIN: number; - const EALREADY: number; - const EBADF: number; - const EBADMSG: number; - const EBUSY: number; - const ECANCELED: number; - const ECHILD: number; - const ECONNABORTED: number; - const ECONNREFUSED: number; - const ECONNRESET: number; - const EDEADLK: number; - const EDESTADDRREQ: number; - const EDOM: number; - const EDQUOT: number; - const EEXIST: number; - const EFAULT: number; - const EFBIG: number; - const EHOSTUNREACH: number; - const EIDRM: number; - const EILSEQ: number; - const EINPROGRESS: number; - const EINTR: number; - const EINVAL: number; - const EIO: number; - const EISCONN: number; - const EISDIR: number; - const ELOOP: number; - const EMFILE: number; - const EMLINK: number; - const EMSGSIZE: number; - const EMULTIHOP: number; - const ENAMETOOLONG: number; - const ENETDOWN: number; - const ENETRESET: number; - const ENETUNREACH: number; - const ENFILE: number; - const ENOBUFS: number; - const ENODATA: number; - const ENODEV: number; - const ENOENT: number; - const ENOEXEC: number; - const ENOLCK: number; - const ENOLINK: number; - const ENOMEM: number; - const ENOMSG: number; - const ENOPROTOOPT: number; - const ENOSPC: number; - const ENOSR: number; - const ENOSTR: number; - const ENOSYS: number; - const ENOTCONN: number; - const ENOTDIR: number; - const ENOTEMPTY: number; - const ENOTSOCK: number; - const ENOTSUP: number; - const ENOTTY: number; - const ENXIO: number; - const EOPNOTSUPP: number; - const EOVERFLOW: number; - const EPERM: number; - const EPIPE: number; - const EPROTO: number; - const EPROTONOSUPPORT: number; - const EPROTOTYPE: number; - const ERANGE: number; - const EROFS: number; - const ESPIPE: number; - const ESRCH: number; - const ESTALE: number; - const ETIME: number; - const ETIMEDOUT: number; - const ETXTBSY: number; - const EWOULDBLOCK: number; - const EXDEV: number; - const WSAEINTR: number; - const WSAEBADF: number; - const WSAEACCES: number; - const WSAEFAULT: number; - const WSAEINVAL: number; - const WSAEMFILE: number; - const WSAEWOULDBLOCK: number; - const WSAEINPROGRESS: number; - const WSAEALREADY: number; - const WSAENOTSOCK: number; - const WSAEDESTADDRREQ: number; - const WSAEMSGSIZE: number; - const WSAEPROTOTYPE: number; - const WSAENOPROTOOPT: number; - const WSAEPROTONOSUPPORT: number; - const WSAESOCKTNOSUPPORT: number; - const WSAEOPNOTSUPP: number; - const WSAEPFNOSUPPORT: number; - const WSAEAFNOSUPPORT: number; - const WSAEADDRINUSE: number; - const WSAEADDRNOTAVAIL: number; - const WSAENETDOWN: number; - const WSAENETUNREACH: number; - const WSAENETRESET: number; - const WSAECONNABORTED: number; - const WSAECONNRESET: number; - const WSAENOBUFS: number; - const WSAEISCONN: number; - const WSAENOTCONN: number; - const WSAESHUTDOWN: number; - const WSAETOOMANYREFS: number; - const WSAETIMEDOUT: number; - const WSAECONNREFUSED: number; - const WSAELOOP: number; - const WSAENAMETOOLONG: number; - const WSAEHOSTDOWN: number; - const WSAEHOSTUNREACH: number; - const WSAENOTEMPTY: number; - const WSAEPROCLIM: number; - const WSAEUSERS: number; - const WSAEDQUOT: number; - const WSAESTALE: number; - const WSAEREMOTE: number; - const WSASYSNOTREADY: number; - const WSAVERNOTSUPPORTED: number; - const WSANOTINITIALISED: number; - const WSAEDISCON: number; - const WSAENOMORE: number; - const WSAECANCELLED: number; - const WSAEINVALIDPROCTABLE: number; - const WSAEINVALIDPROVIDER: number; - const WSAEPROVIDERFAILEDINIT: number; - const WSASYSCALLFAILURE: number; - const WSASERVICE_NOT_FOUND: number; - const WSATYPE_NOT_FOUND: number; - const WSA_E_NO_MORE: number; - const WSA_E_CANCELLED: number; - const WSAEREFUSED: number; - } - namespace dlopen { - const RTLD_LAZY: number; - const RTLD_NOW: number; - const RTLD_GLOBAL: number; - const RTLD_LOCAL: number; - const RTLD_DEEPBIND: number; - } - namespace priority { - const PRIORITY_LOW: number; - const PRIORITY_BELOW_NORMAL: number; - const PRIORITY_NORMAL: number; - const PRIORITY_ABOVE_NORMAL: number; - const PRIORITY_HIGH: number; - const PRIORITY_HIGHEST: number; - } - } - const devNull: string; - /** - * The operating system-specific end-of-line marker. - * * `\n` on POSIX - * * `\r\n` on Windows - */ - const EOL: string; - /** - * Returns the operating system CPU architecture for which the Node.js binary was - * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`, `'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`, - * and `'x64'`. - * - * The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v20.x/api/process.html#processarch). - * @since v0.5.0 - */ - function arch(): string; - /** - * Returns a string identifying the kernel version. - * - * On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not - * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. - * @since v13.11.0, v12.17.0 - */ - function version(): string; - /** - * Returns a string identifying the operating system platform for which - * the Node.js binary was compiled. The value is set at compile time. - * Possible values are `'aix'`, `'darwin'`, `'freebsd'`, `'linux'`, `'openbsd'`, `'sunos'`, and `'win32'`. - * - * The return value is equivalent to `process.platform`. - * - * The value `'android'` may also be returned if Node.js is built on the Android - * operating system. [Android support is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os). - * @since v0.5.0 - */ - function platform(): NodeJS.Platform; - /** - * Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`, `mips`, `mips64`, `ppc64`, `ppc64le`, `s390`, `s390x`, `i386`, `i686`, `x86_64`. - * - * On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not - * available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information. - * @since v18.9.0, v16.18.0 - */ - function machine(): string; - /** - * Returns the operating system's default directory for temporary files as a - * string. - * @since v0.9.9 - */ - function tmpdir(): string; - /** - * Returns a string identifying the endianness of the CPU for which the Node.js - * binary was compiled. - * - * Possible values are `'BE'` for big endian and `'LE'` for little endian. - * @since v0.9.4 - */ - function endianness(): "BE" | "LE"; - /** - * Returns the scheduling priority for the process specified by `pid`. If `pid` is - * not provided or is `0`, the priority of the current process is returned. - * @since v10.10.0 - * @param [pid=0] The process ID to retrieve scheduling priority for. - */ - function getPriority(pid?: number): number; - /** - * Attempts to set the scheduling priority for the process specified by `pid`. If `pid` is not provided or is `0`, the process ID of the current process is used. - * - * The `priority` input must be an integer between `-20` (high priority) and `19` (low priority). Due to differences between Unix priority levels and Windows - * priority classes, `priority` is mapped to one of six priority constants in `os.constants.priority`. When retrieving a process priority level, this range - * mapping may cause the return value to be slightly different on Windows. To avoid - * confusion, set `priority` to one of the priority constants. - * - * On Windows, setting priority to `PRIORITY_HIGHEST` requires elevated user - * privileges. Otherwise the set priority will be silently reduced to `PRIORITY_HIGH`. - * @since v10.10.0 - * @param [pid=0] The process ID to set scheduling priority for. - * @param priority The scheduling priority to assign to the process. - */ - function setPriority(priority: number): void; - function setPriority(pid: number, priority: number): void; -} -declare module "node:os" { - export * from "os"; -} diff --git a/node_modules/@types/node/package.json b/node_modules/@types/node/package.json deleted file mode 100644 index 7e93a0d..0000000 --- a/node_modules/@types/node/package.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "name": "@types/node", - "version": "20.19.37", - "description": "TypeScript definitions for node", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node", - "license": "MIT", - "contributors": [ - { - "name": "Microsoft TypeScript", - "githubUsername": "Microsoft", - "url": "https://github.com/Microsoft" - }, - { - "name": "Alberto Schiabel", - "githubUsername": "jkomyno", - "url": "https://github.com/jkomyno" - }, - { - "name": "Andrew Makarov", - "githubUsername": "r3nya", - "url": "https://github.com/r3nya" - }, - { - "name": "Benjamin Toueg", - "githubUsername": "btoueg", - "url": "https://github.com/btoueg" - }, - { - "name": "David Junger", - "githubUsername": "touffy", - "url": "https://github.com/touffy" - }, - { - "name": "Mohsen Azimi", - "githubUsername": "mohsen1", - "url": "https://github.com/mohsen1" - }, - { - "name": "Nikita Galkin", - "githubUsername": "galkin", - "url": "https://github.com/galkin" - }, - { - "name": "Sebastian Silbermann", - "githubUsername": "eps1lon", - "url": "https://github.com/eps1lon" - }, - { - "name": "Wilco Bakker", - "githubUsername": "WilcoBakker", - "url": "https://github.com/WilcoBakker" - }, - { - "name": "Marcin Kopacz", - "githubUsername": "chyzwar", - "url": "https://github.com/chyzwar" - }, - { - "name": "Trivikram Kamat", - "githubUsername": "trivikr", - "url": "https://github.com/trivikr" - }, - { - "name": "Junxiao Shi", - "githubUsername": "yoursunny", - "url": "https://github.com/yoursunny" - }, - { - "name": "Ilia Baryshnikov", - "githubUsername": "qwelias", - "url": "https://github.com/qwelias" - }, - { - "name": "ExE Boss", - "githubUsername": "ExE-Boss", - "url": "https://github.com/ExE-Boss" - }, - { - "name": "Piotr Błażejewicz", - "githubUsername": "peterblazejewicz", - "url": "https://github.com/peterblazejewicz" - }, - { - "name": "Anna Henningsen", - "githubUsername": "addaleax", - "url": "https://github.com/addaleax" - }, - { - "name": "Victor Perin", - "githubUsername": "victorperin", - "url": "https://github.com/victorperin" - }, - { - "name": "NodeJS Contributors", - "githubUsername": "NodeJS", - "url": "https://github.com/NodeJS" - }, - { - "name": "Linus Unnebäck", - "githubUsername": "LinusU", - "url": "https://github.com/LinusU" - }, - { - "name": "wafuwafu13", - "githubUsername": "wafuwafu13", - "url": "https://github.com/wafuwafu13" - }, - { - "name": "Matteo Collina", - "githubUsername": "mcollina", - "url": "https://github.com/mcollina" - }, - { - "name": "Dmitry Semigradsky", - "githubUsername": "Semigradsky", - "url": "https://github.com/Semigradsky" - } - ], - "main": "", - "types": "index.d.ts", - "typesVersions": { - "<=5.6": { - "*": [ - "ts5.6/*" - ] - } - }, - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/node" - }, - "scripts": {}, - "dependencies": { - "undici-types": "~6.21.0" - }, - "peerDependencies": {}, - "typesPublisherContentHash": "232436132f92bb9d0f77b98004c7a2477747cc93116b454e2d1ffaf892e9bdd2", - "typeScriptVersion": "5.2" -} \ No newline at end of file diff --git a/node_modules/@types/node/path.d.ts b/node_modules/@types/node/path.d.ts deleted file mode 100644 index dd69692..0000000 --- a/node_modules/@types/node/path.d.ts +++ /dev/null @@ -1,200 +0,0 @@ -declare module "path/posix" { - import path = require("path"); - export = path; -} -declare module "path/win32" { - import path = require("path"); - export = path; -} -/** - * The `node:path` module provides utilities for working with file and directory - * paths. It can be accessed using: - * - * ```js - * import path from 'node:path'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/path.js) - */ -declare module "path" { - namespace path { - /** - * A parsed path object generated by path.parse() or consumed by path.format(). - */ - 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; - } - interface FormatInputPathObject { - /** - * The root of the path such as '/' or 'c:\' - */ - root?: string | undefined; - /** - * The full directory path such as '/home/user/dir' or 'c:\path\dir' - */ - dir?: string | undefined; - /** - * The file name including extension (if any) such as 'index.html' - */ - base?: string | undefined; - /** - * The file extension (if any) such as '.html' - */ - ext?: string | undefined; - /** - * The file name without extension (if any) such as 'index' - */ - name?: string | undefined; - } - interface PlatformPath { - /** - * Normalize a string path, reducing '..' and '.' parts. - * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. If the path is a zero-length string, '.' is returned, representing the current working directory. - * - * @param path string path to normalize. - * @throws {TypeError} if `path` is not a string. - */ - normalize(path: string): string; - /** - * Join all arguments together and normalize the resulting path. - * - * @param paths paths to join. - * @throws {TypeError} if any of the path segments is not a string. - */ - join(...paths: string[]): string; - /** - * The right-most parameter is considered {to}. Other parameters are considered an array of {from}. - * - * Starting from leftmost {from} parameter, resolves {to} to an absolute path. - * - * If {to} isn't already absolute, {from} arguments are prepended in right to left order, - * until an absolute path is found. If after using all {from} paths still no absolute path is found, - * the current working directory is used as well. The resulting path is normalized, - * and trailing slashes are removed unless the path gets resolved to the root directory. - * - * @param paths A sequence of paths or path segments. - * @throws {TypeError} if any of the arguments is not a string. - */ - resolve(...paths: string[]): string; - /** - * The `path.matchesGlob()` method determines if `path` matches the `pattern`. - * @param path The path to glob-match against. - * @param pattern The glob to check the path against. - * @returns Whether or not the `path` matched the `pattern`. - * @throws {TypeError} if `path` or `pattern` are not strings. - * @since v20.17.0 - */ - matchesGlob(path: string, pattern: string): boolean; - /** - * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory. - * - * If the given {path} is a zero-length string, `false` will be returned. - * - * @param path path to test. - * @throws {TypeError} if `path` is not a string. - */ - isAbsolute(path: string): boolean; - /** - * Solve the relative path from {from} to {to} based on the current working directory. - * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve. - * - * @throws {TypeError} if either `from` or `to` is not a string. - */ - relative(from: string, to: string): string; - /** - * Return the directory name of a path. Similar to the Unix dirname command. - * - * @param path the path to evaluate. - * @throws {TypeError} if `path` is not a string. - */ - dirname(path: string): string; - /** - * Return the last portion of a path. Similar to the Unix basename command. - * Often used to extract the file name from a fully qualified path. - * - * @param path the path to evaluate. - * @param suffix optionally, an extension to remove from the result. - * @throws {TypeError} if `path` is not a string or if `ext` is given and is not a string. - */ - basename(path: string, suffix?: string): string; - /** - * Return the extension of the path, from the last '.' to end of string in the last portion of the path. - * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string. - * - * @param path the path to evaluate. - * @throws {TypeError} if `path` is not a string. - */ - extname(path: string): string; - /** - * The platform-specific file separator. '\\' or '/'. - */ - readonly sep: "\\" | "/"; - /** - * The platform-specific file delimiter. ';' or ':'. - */ - readonly delimiter: ";" | ":"; - /** - * Returns an object from a path string - the opposite of format(). - * - * @param path path to evaluate. - * @throws {TypeError} if `path` is not a string. - */ - parse(path: string): ParsedPath; - /** - * Returns a path string from an object - the opposite of parse(). - * - * @param pathObject path to evaluate. - */ - format(pathObject: FormatInputPathObject): string; - /** - * On Windows systems only, returns an equivalent namespace-prefixed path for the given path. - * If path is not a string, path will be returned without modifications. - * This method is meaningful only on Windows system. - * On POSIX systems, the method is non-operational and always returns path without modifications. - */ - toNamespacedPath(path: string): string; - /** - * Posix specific pathing. - * Same as parent object on posix. - */ - readonly posix: PlatformPath; - /** - * Windows specific pathing. - * Same as parent object on windows - */ - readonly win32: PlatformPath; - } - } - const path: path.PlatformPath; - export = path; -} -declare module "node:path" { - import path = require("path"); - export = path; -} -declare module "node:path/posix" { - import path = require("path/posix"); - export = path; -} -declare module "node:path/win32" { - import path = require("path/win32"); - export = path; -} diff --git a/node_modules/@types/node/perf_hooks.d.ts b/node_modules/@types/node/perf_hooks.d.ts deleted file mode 100644 index 730af9b..0000000 --- a/node_modules/@types/node/perf_hooks.d.ts +++ /dev/null @@ -1,961 +0,0 @@ -/** - * This module provides an implementation of a subset of the W3C [Web Performance APIs](https://w3c.github.io/perf-timing-primer/) as well as additional APIs for - * Node.js-specific performance measurements. - * - * Node.js supports the following [Web Performance APIs](https://w3c.github.io/perf-timing-primer/): - * - * * [High Resolution Time](https://www.w3.org/TR/hr-time-2) - * * [Performance Timeline](https://w3c.github.io/performance-timeline/) - * * [User Timing](https://www.w3.org/TR/user-timing/) - * * [Resource Timing](https://www.w3.org/TR/resource-timing-2/) - * - * ```js - * import { PerformanceObserver, performance } from 'node:perf_hooks'; - * - * const obs = new PerformanceObserver((items) => { - * console.log(items.getEntries()[0].duration); - * performance.clearMarks(); - * }); - * obs.observe({ type: 'measure' }); - * performance.measure('Start to Now'); - * - * performance.mark('A'); - * doSomeLongRunningProcess(() => { - * performance.measure('A to Now', 'A'); - * - * performance.mark('B'); - * performance.measure('A to B', 'A', 'B'); - * }); - * ``` - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/perf_hooks.js) - */ -declare module "perf_hooks" { - import { AsyncResource } from "node:async_hooks"; - type EntryType = - | "dns" // Node.js only - | "function" // Node.js only - | "gc" // Node.js only - | "http2" // Node.js only - | "http" // Node.js only - | "mark" // available on the Web - | "measure" // available on the Web - | "net" // Node.js only - | "node" // Node.js only - | "resource"; // available on the Web - interface NodeGCPerformanceDetail { - /** - * When `performanceEntry.entryType` is equal to 'gc', the `performance.kind` property identifies - * the type of garbage collection operation that occurred. - * See perf_hooks.constants for valid values. - */ - readonly kind: number; - /** - * When `performanceEntry.entryType` is equal to 'gc', the `performance.flags` - * property contains additional information about garbage collection operation. - * See perf_hooks.constants for valid values. - */ - readonly flags: number; - } - /** - * The constructor of this class is not exposed to users directly. - * @since v8.5.0 - */ - class PerformanceEntry { - protected constructor(); - /** - * The total number of milliseconds elapsed for this entry. This value will not - * be meaningful for all Performance Entry types. - * @since v8.5.0 - */ - readonly duration: number; - /** - * The name of the performance entry. - * @since v8.5.0 - */ - readonly name: string; - /** - * The high resolution millisecond timestamp marking the starting time of the - * Performance Entry. - * @since v8.5.0 - */ - readonly startTime: number; - /** - * The type of the performance entry. It may be one of: - * - * * `'node'` (Node.js only) - * * `'mark'` (available on the Web) - * * `'measure'` (available on the Web) - * * `'gc'` (Node.js only) - * * `'function'` (Node.js only) - * * `'http2'` (Node.js only) - * * `'http'` (Node.js only) - * @since v8.5.0 - */ - readonly entryType: EntryType; - toJSON(): any; - } - /** - * Exposes marks created via the `Performance.mark()` method. - * @since v18.2.0, v16.17.0 - */ - class PerformanceMark extends PerformanceEntry { - readonly detail: any; - readonly duration: 0; - readonly entryType: "mark"; - } - /** - * Exposes measures created via the `Performance.measure()` method. - * - * The constructor of this class is not exposed to users directly. - * @since v18.2.0, v16.17.0 - */ - class PerformanceMeasure extends PerformanceEntry { - readonly detail: any; - readonly entryType: "measure"; - } - interface UVMetrics { - /** - * Number of event loop iterations. - */ - readonly loopCount: number; - /** - * Number of events that have been processed by the event handler. - */ - readonly events: number; - /** - * Number of events that were waiting to be processed when the event provider was called. - */ - readonly eventsWaiting: number; - } - // TODO: PerformanceNodeEntry is missing - /** - * _This property is an extension by Node.js. It is not available in Web browsers._ - * - * Provides timing details for Node.js itself. The constructor of this class - * is not exposed to users. - * @since v8.5.0 - */ - class PerformanceNodeTiming extends PerformanceEntry { - /** - * The high resolution millisecond timestamp at which the Node.js process - * completed bootstrapping. If bootstrapping has not yet finished, the property - * has the value of -1. - * @since v8.5.0 - */ - readonly bootstrapComplete: number; - /** - * The high resolution millisecond timestamp at which the Node.js environment was - * initialized. - * @since v8.5.0 - */ - readonly environment: number; - /** - * The high resolution millisecond timestamp of the amount of time the event loop - * has been idle within the event loop's event provider (e.g. `epoll_wait`). This - * does not take CPU usage into consideration. If the event loop has not yet - * started (e.g., in the first tick of the main script), the property has the - * value of 0. - * @since v14.10.0, v12.19.0 - */ - readonly idleTime: number; - /** - * The high resolution millisecond timestamp at which the Node.js event loop - * exited. If the event loop has not yet exited, the property has the value of -1\. - * It can only have a value of not -1 in a handler of the `'exit'` event. - * @since v8.5.0 - */ - readonly loopExit: number; - /** - * The high resolution millisecond timestamp at which the Node.js event loop - * started. If the event loop has not yet started (e.g., in the first tick of the - * main script), the property has the value of -1. - * @since v8.5.0 - */ - readonly loopStart: number; - /** - * The high resolution millisecond timestamp at which the Node.js process was initialized. - * @since v8.5.0 - */ - readonly nodeStart: number; - /** - * This is a wrapper to the `uv_metrics_info` function. - * It returns the current set of event loop metrics. - * - * It is recommended to use this property inside a function whose execution was - * scheduled using `setImmediate` to avoid collecting metrics before finishing all - * operations scheduled during the current loop iteration. - * @since v20.18.0 - */ - readonly uvMetricsInfo: UVMetrics; - /** - * The high resolution millisecond timestamp at which the V8 platform was - * initialized. - * @since v8.5.0 - */ - readonly v8Start: number; - } - interface EventLoopUtilization { - idle: number; - active: number; - utilization: number; - } - /** - * @param utilization1 The result of a previous call to `eventLoopUtilization()`. - * @param utilization2 The result of a previous call to `eventLoopUtilization()` prior to `utilization1`. - */ - type EventLoopUtilityFunction = ( - utilization1?: EventLoopUtilization, - utilization2?: EventLoopUtilization, - ) => EventLoopUtilization; - interface MarkOptions { - /** - * Additional optional detail to include with the mark. - */ - detail?: unknown | undefined; - /** - * An optional timestamp to be used as the mark time. - * @default `performance.now()` - */ - startTime?: number | undefined; - } - interface MeasureOptions { - /** - * Additional optional detail to include with the mark. - */ - detail?: unknown; - /** - * Duration between start and end times. - */ - duration?: number | undefined; - /** - * Timestamp to be used as the end time, or a string identifying a previously recorded mark. - */ - end?: number | string | undefined; - /** - * Timestamp to be used as the start time, or a string identifying a previously recorded mark. - */ - start?: number | string | undefined; - } - interface TimerifyOptions { - /** - * A histogram object created using `perf_hooks.createHistogram()` that will record runtime - * durations in nanoseconds. - */ - histogram?: RecordableHistogram | undefined; - } - interface Performance { - /** - * If `name` is not provided, removes all `PerformanceMark` objects from the Performance Timeline. - * If `name` is provided, removes only the named mark. - * @since v8.5.0 - */ - clearMarks(name?: string): void; - /** - * If `name` is not provided, removes all `PerformanceMeasure` objects from the Performance Timeline. - * If `name` is provided, removes only the named measure. - * @since v16.7.0 - */ - clearMeasures(name?: string): void; - /** - * If `name` is not provided, removes all `PerformanceResourceTiming` objects from the Resource Timeline. - * If `name` is provided, removes only the named resource. - * @since v18.2.0, v16.17.0 - */ - clearResourceTimings(name?: string): void; - /** - * eventLoopUtilization is similar to CPU utilization except that it is calculated using high precision wall-clock time. - * It represents the percentage of time the event loop has spent outside the event loop's event provider (e.g. epoll_wait). - * No other CPU idle time is taken into consideration. - */ - eventLoopUtilization: EventLoopUtilityFunction; - /** - * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`. - * If you are only interested in performance entries of certain types or that have certain names, see - * `performance.getEntriesByType()` and `performance.getEntriesByName()`. - * @since v16.7.0 - */ - getEntries(): PerformanceEntry[]; - /** - * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime` - * whose `performanceEntry.name` is equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to `type`. - * @param name - * @param type - * @since v16.7.0 - */ - getEntriesByName(name: string, type?: EntryType): PerformanceEntry[]; - /** - * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime` - * whose `performanceEntry.entryType` is equal to `type`. - * @param type - * @since v16.7.0 - */ - getEntriesByType(type: EntryType): PerformanceEntry[]; - /** - * Creates a new `PerformanceMark` entry in the Performance Timeline. - * A `PerformanceMark` is a subclass of `PerformanceEntry` whose `performanceEntry.entryType` is always `'mark'`, - * and whose `performanceEntry.duration` is always `0`. - * Performance marks are used to mark specific significant moments in the Performance Timeline. - * - * The created `PerformanceMark` entry is put in the global Performance Timeline and can be queried with - * `performance.getEntries`, `performance.getEntriesByName`, and `performance.getEntriesByType`. When the observation is - * performed, the entries should be cleared from the global Performance Timeline manually with `performance.clearMarks`. - * @param name - */ - mark(name: string, options?: MarkOptions): PerformanceMark; - /** - * Creates a new `PerformanceResourceTiming` entry in the Resource Timeline. - * A `PerformanceResourceTiming` is a subclass of `PerformanceEntry` whose `performanceEntry.entryType` is always `'resource'`. - * Performance resources are used to mark moments in the Resource Timeline. - * @param timingInfo [Fetch Timing Info](https://fetch.spec.whatwg.org/#fetch-timing-info) - * @param requestedUrl The resource url - * @param initiatorType The initiator name, e.g: 'fetch' - * @param global - * @param cacheMode The cache mode must be an empty string ('') or 'local' - * @since v18.2.0, v16.17.0 - */ - markResourceTiming( - timingInfo: object, - requestedUrl: string, - initiatorType: string, - global: object, - cacheMode: "" | "local", - ): PerformanceResourceTiming; - /** - * Creates a new PerformanceMeasure entry in the Performance Timeline. - * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure', - * and whose performanceEntry.duration measures the number of milliseconds elapsed since startMark and endMark. - * - * The startMark argument may identify any existing PerformanceMark in the the Performance Timeline, or may identify - * any of the timestamp properties provided by the PerformanceNodeTiming class. If the named startMark does not exist, - * then startMark is set to timeOrigin by default. - * - * The endMark argument must identify any existing PerformanceMark in the the Performance Timeline or any of the timestamp - * properties provided by the PerformanceNodeTiming class. If the named endMark does not exist, an error will be thrown. - * @param name - * @param startMark - * @param endMark - * @return The PerformanceMeasure entry that was created - */ - measure(name: string, startMark?: string, endMark?: string): PerformanceMeasure; - measure(name: string, options: MeasureOptions): PerformanceMeasure; - /** - * _This property is an extension by Node.js. It is not available in Web browsers._ - * - * An instance of the `PerformanceNodeTiming` class that provides performance metrics for specific Node.js operational milestones. - * @since v8.5.0 - */ - readonly nodeTiming: PerformanceNodeTiming; - /** - * Returns the current high resolution millisecond timestamp, where 0 represents the start of the current `node` process. - * @since v8.5.0 - */ - now(): number; - /** - * Sets the global performance resource timing buffer size to the specified number of "resource" type performance entry objects. - * - * By default the max buffer size is set to 250. - * @since v18.8.0 - */ - setResourceTimingBufferSize(maxSize: number): void; - /** - * The [`timeOrigin`](https://w3c.github.io/hr-time/#dom-performance-timeorigin) specifies the high resolution millisecond timestamp - * at which the current `node` process began, measured in Unix time. - * @since v8.5.0 - */ - readonly timeOrigin: number; - /** - * _This property is an extension by Node.js. It is not available in Web browsers._ - * - * Wraps a function within a new function that measures the running time of the wrapped function. - * A `PerformanceObserver` must be subscribed to the `'function'` event type in order for the timing details to be accessed. - * - * ```js - * import { - * performance, - * PerformanceObserver, - * } from 'node:perf_hooks'; - * - * function someFunction() { - * console.log('hello world'); - * } - * - * const wrapped = performance.timerify(someFunction); - * - * const obs = new PerformanceObserver((list) => { - * console.log(list.getEntries()[0].duration); - * - * performance.clearMarks(); - * performance.clearMeasures(); - * obs.disconnect(); - * }); - * obs.observe({ entryTypes: ['function'] }); - * - * // A performance timeline entry will be created - * wrapped(); - * ``` - * - * If the wrapped function returns a promise, a finally handler will be attached to the promise and the duration will be reported - * once the finally handler is invoked. - * @param fn - */ - timerify any>(fn: T, options?: TimerifyOptions): T; - /** - * An object which is JSON representation of the performance object. It is similar to - * [`window.performance.toJSON`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/toJSON) in browsers. - * @since v16.1.0 - */ - toJSON(): any; - } - class PerformanceObserverEntryList { - /** - * Returns a list of `PerformanceEntry` objects in chronological order - * with respect to `performanceEntry.startTime`. - * - * ```js - * import { - * performance, - * PerformanceObserver, - * } from 'node:perf_hooks'; - * - * const obs = new PerformanceObserver((perfObserverList, observer) => { - * console.log(perfObserverList.getEntries()); - * - * * [ - * * PerformanceEntry { - * * name: 'test', - * * entryType: 'mark', - * * startTime: 81.465639, - * * duration: 0, - * * detail: null - * * }, - * * PerformanceEntry { - * * name: 'meow', - * * entryType: 'mark', - * * startTime: 81.860064, - * * duration: 0, - * * detail: null - * * } - * * ] - * - * performance.clearMarks(); - * performance.clearMeasures(); - * observer.disconnect(); - * }); - * obs.observe({ type: 'mark' }); - * - * performance.mark('test'); - * performance.mark('meow'); - * ``` - * @since v8.5.0 - */ - getEntries(): PerformanceEntry[]; - /** - * Returns a list of `PerformanceEntry` objects in chronological order - * with respect to `performanceEntry.startTime` whose `performanceEntry.name` is - * equal to `name`, and optionally, whose `performanceEntry.entryType` is equal to`type`. - * - * ```js - * import { - * performance, - * PerformanceObserver, - * } from 'node:perf_hooks'; - * - * const obs = new PerformanceObserver((perfObserverList, observer) => { - * console.log(perfObserverList.getEntriesByName('meow')); - * - * * [ - * * PerformanceEntry { - * * name: 'meow', - * * entryType: 'mark', - * * startTime: 98.545991, - * * duration: 0, - * * detail: null - * * } - * * ] - * - * console.log(perfObserverList.getEntriesByName('nope')); // [] - * - * console.log(perfObserverList.getEntriesByName('test', 'mark')); - * - * * [ - * * PerformanceEntry { - * * name: 'test', - * * entryType: 'mark', - * * startTime: 63.518931, - * * duration: 0, - * * detail: null - * * } - * * ] - * - * console.log(perfObserverList.getEntriesByName('test', 'measure')); // [] - * - * performance.clearMarks(); - * performance.clearMeasures(); - * observer.disconnect(); - * }); - * obs.observe({ entryTypes: ['mark', 'measure'] }); - * - * performance.mark('test'); - * performance.mark('meow'); - * ``` - * @since v8.5.0 - */ - getEntriesByName(name: string, type?: EntryType): PerformanceEntry[]; - /** - * Returns a list of `PerformanceEntry` objects in chronological order - * with respect to `performanceEntry.startTime` whose `performanceEntry.entryType` is equal to `type`. - * - * ```js - * import { - * performance, - * PerformanceObserver, - * } from 'node:perf_hooks'; - * - * const obs = new PerformanceObserver((perfObserverList, observer) => { - * console.log(perfObserverList.getEntriesByType('mark')); - * - * * [ - * * PerformanceEntry { - * * name: 'test', - * * entryType: 'mark', - * * startTime: 55.897834, - * * duration: 0, - * * detail: null - * * }, - * * PerformanceEntry { - * * name: 'meow', - * * entryType: 'mark', - * * startTime: 56.350146, - * * duration: 0, - * * detail: null - * * } - * * ] - * - * performance.clearMarks(); - * performance.clearMeasures(); - * observer.disconnect(); - * }); - * obs.observe({ type: 'mark' }); - * - * performance.mark('test'); - * performance.mark('meow'); - * ``` - * @since v8.5.0 - */ - getEntriesByType(type: EntryType): PerformanceEntry[]; - } - type PerformanceObserverCallback = (list: PerformanceObserverEntryList, observer: PerformanceObserver) => void; - /** - * @since v8.5.0 - */ - class PerformanceObserver extends AsyncResource { - constructor(callback: PerformanceObserverCallback); - /** - * Disconnects the `PerformanceObserver` instance from all notifications. - * @since v8.5.0 - */ - disconnect(): void; - /** - * Subscribes the `PerformanceObserver` instance to notifications of new `PerformanceEntry` instances identified either by `options.entryTypes` or `options.type`: - * - * ```js - * import { - * performance, - * PerformanceObserver, - * } from 'node:perf_hooks'; - * - * const obs = new PerformanceObserver((list, observer) => { - * // Called once asynchronously. `list` contains three items. - * }); - * obs.observe({ type: 'mark' }); - * - * for (let n = 0; n < 3; n++) - * performance.mark(`test${n}`); - * ``` - * @since v8.5.0 - */ - observe( - options: - | { - entryTypes: readonly EntryType[]; - buffered?: boolean | undefined; - } - | { - type: EntryType; - buffered?: boolean | undefined; - }, - ): void; - /** - * @since v16.0.0 - * @returns Current list of entries stored in the performance observer, emptying it out. - */ - takeRecords(): PerformanceEntry[]; - } - /** - * Provides detailed network timing data regarding the loading of an application's resources. - * - * The constructor of this class is not exposed to users directly. - * @since v18.2.0, v16.17.0 - */ - class PerformanceResourceTiming extends PerformanceEntry { - readonly entryType: "resource"; - protected constructor(); - /** - * The high resolution millisecond timestamp at immediately before dispatching the `fetch` - * request. If the resource is not intercepted by a worker the property will always return 0. - * @since v18.2.0, v16.17.0 - */ - readonly workerStart: number; - /** - * The high resolution millisecond timestamp that represents the start time of the fetch which - * initiates the redirect. - * @since v18.2.0, v16.17.0 - */ - readonly redirectStart: number; - /** - * The high resolution millisecond timestamp that will be created immediately after receiving - * the last byte of the response of the last redirect. - * @since v18.2.0, v16.17.0 - */ - readonly redirectEnd: number; - /** - * The high resolution millisecond timestamp immediately before the Node.js starts to fetch the resource. - * @since v18.2.0, v16.17.0 - */ - readonly fetchStart: number; - /** - * The high resolution millisecond timestamp immediately before the Node.js starts the domain name lookup - * for the resource. - * @since v18.2.0, v16.17.0 - */ - readonly domainLookupStart: number; - /** - * The high resolution millisecond timestamp representing the time immediately after the Node.js finished - * the domain name lookup for the resource. - * @since v18.2.0, v16.17.0 - */ - readonly domainLookupEnd: number; - /** - * The high resolution millisecond timestamp representing the time immediately before Node.js starts to - * establish the connection to the server to retrieve the resource. - * @since v18.2.0, v16.17.0 - */ - readonly connectStart: number; - /** - * The high resolution millisecond timestamp representing the time immediately after Node.js finishes - * establishing the connection to the server to retrieve the resource. - * @since v18.2.0, v16.17.0 - */ - readonly connectEnd: number; - /** - * The high resolution millisecond timestamp representing the time immediately before Node.js starts the - * handshake process to secure the current connection. - * @since v18.2.0, v16.17.0 - */ - readonly secureConnectionStart: number; - /** - * The high resolution millisecond timestamp representing the time immediately before Node.js receives the - * first byte of the response from the server. - * @since v18.2.0, v16.17.0 - */ - readonly requestStart: number; - /** - * The high resolution millisecond timestamp representing the time immediately after Node.js receives the - * last byte of the resource or immediately before the transport connection is closed, whichever comes first. - * @since v18.2.0, v16.17.0 - */ - readonly responseEnd: number; - /** - * A number representing the size (in octets) of the fetched resource. The size includes the response header - * fields plus the response payload body. - * @since v18.2.0, v16.17.0 - */ - readonly transferSize: number; - /** - * A number representing the size (in octets) received from the fetch (HTTP or cache), of the payload body, before - * removing any applied content-codings. - * @since v18.2.0, v16.17.0 - */ - readonly encodedBodySize: number; - /** - * A number representing the size (in octets) received from the fetch (HTTP or cache), of the message body, after - * removing any applied content-codings. - * @since v18.2.0, v16.17.0 - */ - readonly decodedBodySize: number; - /** - * Returns a `object` that is the JSON representation of the `PerformanceResourceTiming` object - * @since v18.2.0, v16.17.0 - */ - toJSON(): any; - } - namespace constants { - const NODE_PERFORMANCE_GC_MAJOR: number; - const NODE_PERFORMANCE_GC_MINOR: number; - const NODE_PERFORMANCE_GC_INCREMENTAL: number; - const NODE_PERFORMANCE_GC_WEAKCB: number; - const NODE_PERFORMANCE_GC_FLAGS_NO: number; - const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number; - const NODE_PERFORMANCE_GC_FLAGS_FORCED: number; - const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number; - const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number; - const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number; - const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number; - } - const performance: Performance; - interface EventLoopMonitorOptions { - /** - * The sampling rate in milliseconds. - * Must be greater than zero. - * @default 10 - */ - resolution?: number | undefined; - } - interface Histogram { - /** - * The number of samples recorded by the histogram. - * @since v17.4.0, v16.14.0 - */ - readonly count: number; - /** - * The number of samples recorded by the histogram. - * v17.4.0, v16.14.0 - */ - readonly countBigInt: bigint; - /** - * The number of times the event loop delay exceeded the maximum 1 hour event - * loop delay threshold. - * @since v11.10.0 - */ - readonly exceeds: number; - /** - * The number of times the event loop delay exceeded the maximum 1 hour event loop delay threshold. - * @since v17.4.0, v16.14.0 - */ - readonly exceedsBigInt: bigint; - /** - * The maximum recorded event loop delay. - * @since v11.10.0 - */ - readonly max: number; - /** - * The maximum recorded event loop delay. - * v17.4.0, v16.14.0 - */ - readonly maxBigInt: number; - /** - * The mean of the recorded event loop delays. - * @since v11.10.0 - */ - readonly mean: number; - /** - * The minimum recorded event loop delay. - * @since v11.10.0 - */ - readonly min: number; - /** - * The minimum recorded event loop delay. - * v17.4.0, v16.14.0 - */ - readonly minBigInt: bigint; - /** - * Returns the value at the given percentile. - * @since v11.10.0 - * @param percentile A percentile value in the range (0, 100]. - */ - percentile(percentile: number): number; - /** - * Returns the value at the given percentile. - * @since v17.4.0, v16.14.0 - * @param percentile A percentile value in the range (0, 100]. - */ - percentileBigInt(percentile: number): bigint; - /** - * Returns a `Map` object detailing the accumulated percentile distribution. - * @since v11.10.0 - */ - readonly percentiles: Map; - /** - * Returns a `Map` object detailing the accumulated percentile distribution. - * @since v17.4.0, v16.14.0 - */ - readonly percentilesBigInt: Map; - /** - * Resets the collected histogram data. - * @since v11.10.0 - */ - reset(): void; - /** - * The standard deviation of the recorded event loop delays. - * @since v11.10.0 - */ - readonly stddev: number; - } - interface IntervalHistogram extends Histogram { - /** - * Enables the update interval timer. Returns `true` if the timer was - * started, `false` if it was already started. - * @since v11.10.0 - */ - enable(): boolean; - /** - * Disables the update interval timer. Returns `true` if the timer was - * stopped, `false` if it was already stopped. - * @since v11.10.0 - */ - disable(): boolean; - } - interface RecordableHistogram extends Histogram { - /** - * @since v15.9.0, v14.18.0 - * @param val The amount to record in the histogram. - */ - record(val: number | bigint): void; - /** - * Calculates the amount of time (in nanoseconds) that has passed since the - * previous call to `recordDelta()` and records that amount in the histogram. - * @since v15.9.0, v14.18.0 - */ - recordDelta(): void; - /** - * Adds the values from `other` to this histogram. - * @since v17.4.0, v16.14.0 - */ - add(other: RecordableHistogram): void; - } - /** - * _This property is an extension by Node.js. It is not available in Web browsers._ - * - * Creates an `IntervalHistogram` object that samples and reports the event loop - * delay over time. The delays will be reported in nanoseconds. - * - * Using a timer to detect approximate event loop delay works because the - * execution of timers is tied specifically to the lifecycle of the libuv - * event loop. That is, a delay in the loop will cause a delay in the execution - * of the timer, and those delays are specifically what this API is intended to - * detect. - * - * ```js - * import { monitorEventLoopDelay } from 'node:perf_hooks'; - * const h = monitorEventLoopDelay({ resolution: 20 }); - * h.enable(); - * // Do something. - * h.disable(); - * console.log(h.min); - * console.log(h.max); - * console.log(h.mean); - * console.log(h.stddev); - * console.log(h.percentiles); - * console.log(h.percentile(50)); - * console.log(h.percentile(99)); - * ``` - * @since v11.10.0 - */ - function monitorEventLoopDelay(options?: EventLoopMonitorOptions): IntervalHistogram; - interface CreateHistogramOptions { - /** - * The minimum recordable value. Must be an integer value greater than 0. - * @default 1 - */ - lowest?: number | bigint | undefined; - /** - * The maximum recordable value. Must be an integer value greater than min. - * @default Number.MAX_SAFE_INTEGER - */ - highest?: number | bigint | undefined; - /** - * The number of accuracy digits. Must be a number between 1 and 5. - * @default 3 - */ - figures?: number | undefined; - } - /** - * Returns a `RecordableHistogram`. - * @since v15.9.0, v14.18.0 - */ - function createHistogram(options?: CreateHistogramOptions): RecordableHistogram; - import { - performance as _performance, - PerformanceEntry as _PerformanceEntry, - PerformanceMark as _PerformanceMark, - PerformanceMeasure as _PerformanceMeasure, - PerformanceObserver as _PerformanceObserver, - PerformanceObserverEntryList as _PerformanceObserverEntryList, - PerformanceResourceTiming as _PerformanceResourceTiming, - } from "perf_hooks"; - global { - /** - * `PerformanceEntry` is a global reference for `import { PerformanceEntry } from 'node:node:perf_hooks'` - * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performanceentry - * @since v19.0.0 - */ - var PerformanceEntry: typeof globalThis extends { - onmessage: any; - PerformanceEntry: infer T; - } ? T - : typeof _PerformanceEntry; - /** - * `PerformanceMark` is a global reference for `import { PerformanceMark } from 'node:node:perf_hooks'` - * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performancemark - * @since v19.0.0 - */ - var PerformanceMark: typeof globalThis extends { - onmessage: any; - PerformanceMark: infer T; - } ? T - : typeof _PerformanceMark; - /** - * `PerformanceMeasure` is a global reference for `import { PerformanceMeasure } from 'node:node:perf_hooks'` - * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performancemeasure - * @since v19.0.0 - */ - var PerformanceMeasure: typeof globalThis extends { - onmessage: any; - PerformanceMeasure: infer T; - } ? T - : typeof _PerformanceMeasure; - /** - * `PerformanceObserver` is a global reference for `import { PerformanceObserver } from 'node:node:perf_hooks'` - * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performanceobserver - * @since v19.0.0 - */ - var PerformanceObserver: typeof globalThis extends { - onmessage: any; - PerformanceObserver: infer T; - } ? T - : typeof _PerformanceObserver; - /** - * `PerformanceObserverEntryList` is a global reference for `import { PerformanceObserverEntryList } from 'node:node:perf_hooks'` - * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performanceobserverentrylist - * @since v19.0.0 - */ - var PerformanceObserverEntryList: typeof globalThis extends { - onmessage: any; - PerformanceObserverEntryList: infer T; - } ? T - : typeof _PerformanceObserverEntryList; - /** - * `PerformanceResourceTiming` is a global reference for `import { PerformanceResourceTiming } from 'node:node:perf_hooks'` - * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performanceresourcetiming - * @since v19.0.0 - */ - var PerformanceResourceTiming: typeof globalThis extends { - onmessage: any; - PerformanceResourceTiming: infer T; - } ? T - : typeof _PerformanceResourceTiming; - /** - * `performance` is a global reference for `import { performance } from 'node:node:perf_hooks'` - * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performance - * @since v16.0.0 - */ - var performance: typeof globalThis extends { - onmessage: any; - performance: infer T; - } ? T - : typeof _performance; - } -} -declare module "node:perf_hooks" { - export * from "perf_hooks"; -} diff --git a/node_modules/@types/node/process.d.ts b/node_modules/@types/node/process.d.ts deleted file mode 100644 index 1d5b738..0000000 --- a/node_modules/@types/node/process.d.ts +++ /dev/null @@ -1,1961 +0,0 @@ -declare module "process" { - import { Control, MessageOptions, SendHandle } from "node:child_process"; - import { PathLike } from "node:fs"; - import * as tty from "node:tty"; - import { Worker } from "node:worker_threads"; - - interface BuiltInModule { - "assert": typeof import("assert"); - "node:assert": typeof import("node:assert"); - "assert/strict": typeof import("assert/strict"); - "node:assert/strict": typeof import("node:assert/strict"); - "async_hooks": typeof import("async_hooks"); - "node:async_hooks": typeof import("node:async_hooks"); - "buffer": typeof import("buffer"); - "node:buffer": typeof import("node:buffer"); - "child_process": typeof import("child_process"); - "node:child_process": typeof import("node:child_process"); - "cluster": typeof import("cluster"); - "node:cluster": typeof import("node:cluster"); - "console": typeof import("console"); - "node:console": typeof import("node:console"); - "constants": typeof import("constants"); - "node:constants": typeof import("node:constants"); - "crypto": typeof import("crypto"); - "node:crypto": typeof import("node:crypto"); - "dgram": typeof import("dgram"); - "node:dgram": typeof import("node:dgram"); - "diagnostics_channel": typeof import("diagnostics_channel"); - "node:diagnostics_channel": typeof import("node:diagnostics_channel"); - "dns": typeof import("dns"); - "node:dns": typeof import("node:dns"); - "dns/promises": typeof import("dns/promises"); - "node:dns/promises": typeof import("node:dns/promises"); - "domain": typeof import("domain"); - "node:domain": typeof import("node:domain"); - "events": typeof import("events"); - "node:events": typeof import("node:events"); - "fs": typeof import("fs"); - "node:fs": typeof import("node:fs"); - "fs/promises": typeof import("fs/promises"); - "node:fs/promises": typeof import("node:fs/promises"); - "http": typeof import("http"); - "node:http": typeof import("node:http"); - "http2": typeof import("http2"); - "node:http2": typeof import("node:http2"); - "https": typeof import("https"); - "node:https": typeof import("node:https"); - "inspector": typeof import("inspector"); - "node:inspector": typeof import("node:inspector"); - "inspector/promises": typeof import("inspector/promises"); - "node:inspector/promises": typeof import("node:inspector/promises"); - "module": typeof import("module"); - "node:module": typeof import("node:module"); - "net": typeof import("net"); - "node:net": typeof import("node:net"); - "os": typeof import("os"); - "node:os": typeof import("node:os"); - "path": typeof import("path"); - "node:path": typeof import("node:path"); - "path/posix": typeof import("path/posix"); - "node:path/posix": typeof import("node:path/posix"); - "path/win32": typeof import("path/win32"); - "node:path/win32": typeof import("node:path/win32"); - "perf_hooks": typeof import("perf_hooks"); - "node:perf_hooks": typeof import("node:perf_hooks"); - "process": typeof import("process"); - "node:process": typeof import("node:process"); - "punycode": typeof import("punycode"); - "node:punycode": typeof import("node:punycode"); - "querystring": typeof import("querystring"); - "node:querystring": typeof import("node:querystring"); - "readline": typeof import("readline"); - "node:readline": typeof import("node:readline"); - "readline/promises": typeof import("readline/promises"); - "node:readline/promises": typeof import("node:readline/promises"); - "repl": typeof import("repl"); - "node:repl": typeof import("node:repl"); - "node:sea": typeof import("node:sea"); - "stream": typeof import("stream"); - "node:stream": typeof import("node:stream"); - "stream/consumers": typeof import("stream/consumers"); - "node:stream/consumers": typeof import("node:stream/consumers"); - "stream/promises": typeof import("stream/promises"); - "node:stream/promises": typeof import("node:stream/promises"); - "stream/web": typeof import("stream/web"); - "node:stream/web": typeof import("node:stream/web"); - "string_decoder": typeof import("string_decoder"); - "node:string_decoder": typeof import("node:string_decoder"); - "node:test": typeof import("node:test"); - "node:test/reporters": typeof import("node:test/reporters"); - "timers": typeof import("timers"); - "node:timers": typeof import("node:timers"); - "timers/promises": typeof import("timers/promises"); - "node:timers/promises": typeof import("node:timers/promises"); - "tls": typeof import("tls"); - "node:tls": typeof import("node:tls"); - "trace_events": typeof import("trace_events"); - "node:trace_events": typeof import("node:trace_events"); - "tty": typeof import("tty"); - "node:tty": typeof import("node:tty"); - "url": typeof import("url"); - "node:url": typeof import("node:url"); - "util": typeof import("util"); - "node:util": typeof import("node:util"); - "sys": typeof import("util"); - "node:sys": typeof import("node:util"); - "util/types": typeof import("util/types"); - "node:util/types": typeof import("node:util/types"); - "v8": typeof import("v8"); - "node:v8": typeof import("node:v8"); - "vm": typeof import("vm"); - "node:vm": typeof import("node:vm"); - "wasi": typeof import("wasi"); - "node:wasi": typeof import("node:wasi"); - "worker_threads": typeof import("worker_threads"); - "node:worker_threads": typeof import("node:worker_threads"); - "zlib": typeof import("zlib"); - "node:zlib": typeof import("node:zlib"); - } - - global { - var process: NodeJS.Process; - namespace NodeJS { - // this namespace merge is here because these are specifically used - // as the type for process.stdin, process.stdout, and process.stderr. - // they can't live in tty.d.ts because we need to disambiguate the imported name. - interface ReadStream extends tty.ReadStream {} - interface WriteStream extends tty.WriteStream {} - interface MemoryUsageFn { - /** - * The `process.memoryUsage()` method iterate over each page to gather informations about memory - * usage which can be slow depending on the program memory allocations. - */ - (): MemoryUsage; - /** - * method returns an integer representing the Resident Set Size (RSS) in bytes. - */ - rss(): number; - } - interface MemoryUsage { - /** - * Resident Set Size, is the amount of space occupied in the main memory device (that is a subset of the total allocated memory) for the - * process, including all C++ and JavaScript objects and code. - */ - rss: number; - /** - * Refers to V8's memory usage. - */ - heapTotal: number; - /** - * Refers to V8's memory usage. - */ - heapUsed: number; - external: number; - /** - * Refers to memory allocated for `ArrayBuffer`s and `SharedArrayBuffer`s, including all Node.js Buffers. This is also included - * in the external value. When Node.js is used as an embedded library, this value may be `0` because allocations for `ArrayBuffer`s - * may not be tracked in that case. - */ - arrayBuffers: number; - } - interface CpuUsage { - user: number; - system: number; - } - interface ProcessRelease { - name: string; - sourceUrl?: string | undefined; - headersUrl?: string | undefined; - libUrl?: string | undefined; - lts?: string | undefined; - } - interface ProcessFeatures { - /** - * A boolean value that is `true` if the current Node.js build is caching builtin modules. - * @since v12.0.0 - */ - readonly cached_builtins: boolean; - /** - * A boolean value that is `true` if the current Node.js build is a debug build. - * @since v0.5.5 - */ - readonly debug: boolean; - /** - * A boolean value that is `true` if the current Node.js build includes the inspector. - * @since v11.10.0 - */ - readonly inspector: boolean; - /** - * A boolean value that is `true` if the current Node.js build includes support for IPv6. - * @since v0.5.3 - */ - readonly ipv6: boolean; - /** - * A boolean value that is `true` if the current Node.js build supports - * [loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v20.x/api/modules.html#loading-ecmascript-modules-using-require). - * @since v20.19.0 - */ - readonly require_module: boolean; - /** - * A boolean value that is `true` if the current Node.js build includes support for TLS. - * @since v0.5.3 - */ - readonly tls: boolean; - /** - * A boolean value that is `true` if the current Node.js build includes support for ALPN in TLS. - * @since v4.8.0 - */ - readonly tls_alpn: boolean; - /** - * A boolean value that is `true` if the current Node.js build includes support for OCSP in TLS. - * @since v0.11.13 - */ - readonly tls_ocsp: boolean; - /** - * A boolean value that is `true` if the current Node.js build includes support for SNI in TLS. - * @since v0.5.3 - */ - readonly tls_sni: boolean; - /** - * A boolean value that is `true` if the current Node.js build includes support for libuv. - * @since v0.5.3 - */ - readonly uv: boolean; - } - interface ProcessVersions extends Dict { - http_parser: string; - node: string; - v8: string; - ares: string; - uv: string; - zlib: string; - modules: string; - openssl: string; - } - type Platform = - | "aix" - | "android" - | "darwin" - | "freebsd" - | "haiku" - | "linux" - | "openbsd" - | "sunos" - | "win32" - | "cygwin" - | "netbsd"; - type Architecture = - | "arm" - | "arm64" - | "ia32" - | "loong64" - | "mips" - | "mipsel" - | "ppc" - | "ppc64" - | "riscv64" - | "s390" - | "s390x" - | "x64"; - type Signals = - | "SIGABRT" - | "SIGALRM" - | "SIGBUS" - | "SIGCHLD" - | "SIGCONT" - | "SIGFPE" - | "SIGHUP" - | "SIGILL" - | "SIGINT" - | "SIGIO" - | "SIGIOT" - | "SIGKILL" - | "SIGPIPE" - | "SIGPOLL" - | "SIGPROF" - | "SIGPWR" - | "SIGQUIT" - | "SIGSEGV" - | "SIGSTKFLT" - | "SIGSTOP" - | "SIGSYS" - | "SIGTERM" - | "SIGTRAP" - | "SIGTSTP" - | "SIGTTIN" - | "SIGTTOU" - | "SIGUNUSED" - | "SIGURG" - | "SIGUSR1" - | "SIGUSR2" - | "SIGVTALRM" - | "SIGWINCH" - | "SIGXCPU" - | "SIGXFSZ" - | "SIGBREAK" - | "SIGLOST" - | "SIGINFO"; - type UncaughtExceptionOrigin = "uncaughtException" | "unhandledRejection"; - type MultipleResolveType = "resolve" | "reject"; - type BeforeExitListener = (code: number) => void; - type DisconnectListener = () => void; - type ExitListener = (code: number) => void; - type RejectionHandledListener = (promise: Promise) => void; - type UncaughtExceptionListener = (error: Error, origin: UncaughtExceptionOrigin) => void; - /** - * Most of the time the unhandledRejection will be an Error, but this should not be relied upon - * as *anything* can be thrown/rejected, it is therefore unsafe to assume that the value is an Error. - */ - type UnhandledRejectionListener = (reason: unknown, promise: Promise) => void; - type WarningListener = (warning: Error) => void; - type MessageListener = (message: unknown, sendHandle: SendHandle) => void; - type SignalsListener = (signal: Signals) => void; - type MultipleResolveListener = ( - type: MultipleResolveType, - promise: Promise, - value: unknown, - ) => void; - type WorkerListener = (worker: Worker) => void; - interface Socket extends ReadWriteStream { - isTTY?: true | undefined; - } - // Alias for compatibility - interface ProcessEnv extends Dict {} - interface HRTime { - /** - * This is the legacy version of {@link process.hrtime.bigint()} - * before bigint was introduced in JavaScript. - * - * The `process.hrtime()` method returns the current high-resolution real time in a `[seconds, nanoseconds]` tuple `Array`, - * where `nanoseconds` is the remaining part of the real time that can't be represented in second precision. - * - * `time` is an optional parameter that must be the result of a previous `process.hrtime()` call to diff with the current time. - * If the parameter passed in is not a tuple `Array`, a TypeError will be thrown. - * Passing in a user-defined array instead of the result of a previous call to `process.hrtime()` will lead to undefined behavior. - * - * These times are relative to an arbitrary time in the past, - * and not related to the time of day and therefore not subject to clock drift. - * The primary use is for measuring performance between intervals: - * ```js - * const { hrtime } = require('node:process'); - * const NS_PER_SEC = 1e9; - * const time = hrtime(); - * // [ 1800216, 25 ] - * - * setTimeout(() => { - * const diff = hrtime(time); - * // [ 1, 552 ] - * - * console.log(`Benchmark took ${diff[0] * NS_PER_SEC + diff[1]} nanoseconds`); - * // Benchmark took 1000000552 nanoseconds - * }, 1000); - * ``` - * @since 0.7.6 - * @legacy Use {@link process.hrtime.bigint()} instead. - * @param time The result of a previous call to `process.hrtime()` - */ - (time?: [number, number]): [number, number]; - /** - * The `bigint` version of the {@link process.hrtime()} method returning the current high-resolution real time in nanoseconds as a `bigint`. - * - * Unlike {@link process.hrtime()}, it does not support an additional time argument since the difference can just be computed directly by subtraction of the two `bigint`s. - * ```js - * import { hrtime } from 'node:process'; - * - * const start = hrtime.bigint(); - * // 191051479007711n - * - * setTimeout(() => { - * const end = hrtime.bigint(); - * // 191052633396993n - * - * console.log(`Benchmark took ${end - start} nanoseconds`); - * // Benchmark took 1154389282 nanoseconds - * }, 1000); - * ``` - * @since v10.7.0 - */ - bigint(): bigint; - } - interface ProcessPermission { - /** - * Verifies that the process is able to access the given scope and reference. - * If no reference is provided, a global scope is assumed, for instance, `process.permission.has('fs.read')` - * will check if the process has ALL file system read permissions. - * - * The reference has a meaning based on the provided scope. For example, the reference when the scope is File System means files and folders. - * - * The available scopes are: - * - * * `fs` - All File System - * * `fs.read` - File System read operations - * * `fs.write` - File System write operations - * * `child` - Child process spawning operations - * * `worker` - Worker thread spawning operation - * - * ```js - * // Check if the process has permission to read the README file - * process.permission.has('fs.read', './README.md'); - * // Check if the process has read permission operations - * process.permission.has('fs.read'); - * ``` - * @since v20.0.0 - */ - has(scope: string, reference?: string): boolean; - } - interface ProcessReport { - /** - * Write reports in a compact format, single-line JSON, more easily consumable by log processing systems - * than the default multi-line format designed for human consumption. - * @since v13.12.0, v12.17.0 - */ - compact: boolean; - /** - * Directory where the report is written. - * The default value is the empty string, indicating that reports are written to the current - * working directory of the Node.js process. - */ - directory: string; - /** - * Filename where the report is written. If set to the empty string, the output filename will be comprised - * of a timestamp, PID, and sequence number. The default value is the empty string. - */ - filename: string; - /** - * Returns a JavaScript Object representation of a diagnostic report for the running process. - * The report's JavaScript stack trace is taken from `err`, if present. - */ - getReport(err?: Error): object; - /** - * If true, a diagnostic report is generated on fatal errors, - * such as out of memory errors or failed C++ assertions. - * @default false - */ - reportOnFatalError: boolean; - /** - * If true, a diagnostic report is generated when the process - * receives the signal specified by process.report.signal. - * @default false - */ - reportOnSignal: boolean; - /** - * If true, a diagnostic report is generated on uncaught exception. - * @default false - */ - reportOnUncaughtException: boolean; - /** - * The signal used to trigger the creation of a diagnostic report. - * @default 'SIGUSR2' - */ - signal: Signals; - /** - * Writes a diagnostic report to a file. If filename is not provided, the default filename - * includes the date, time, PID, and a sequence number. - * The report's JavaScript stack trace is taken from `err`, if present. - * - * If the value of filename is set to `'stdout'` or `'stderr'`, the report is written - * to the stdout or stderr of the process respectively. - * @param fileName Name of the file where the report is written. - * This should be a relative path, that will be appended to the directory specified in - * `process.report.directory`, or the current working directory of the Node.js process, - * if unspecified. - * @param err A custom error used for reporting the JavaScript stack. - * @return Filename of the generated report. - */ - writeReport(fileName?: string, err?: Error): string; - writeReport(err?: Error): string; - } - interface ResourceUsage { - fsRead: number; - fsWrite: number; - involuntaryContextSwitches: number; - ipcReceived: number; - ipcSent: number; - majorPageFault: number; - maxRSS: number; - minorPageFault: number; - sharedMemorySize: number; - signalsCount: number; - swappedOut: number; - systemCPUTime: number; - unsharedDataSize: number; - unsharedStackSize: number; - userCPUTime: number; - voluntaryContextSwitches: number; - } - interface EmitWarningOptions { - /** - * When `warning` is a `string`, `type` is the name to use for the _type_ of warning being emitted. - * - * @default 'Warning' - */ - type?: string | undefined; - /** - * A unique identifier for the warning instance being emitted. - */ - code?: string | undefined; - /** - * When `warning` is a `string`, `ctor` is an optional function used to limit the generated stack trace. - * - * @default process.emitWarning - */ - ctor?: Function | undefined; - /** - * Additional text to include with the error. - */ - detail?: string | undefined; - } - interface ProcessConfig { - readonly target_defaults: { - readonly cflags: any[]; - readonly default_configuration: string; - readonly defines: string[]; - readonly include_dirs: string[]; - readonly libraries: string[]; - }; - readonly variables: { - readonly clang: number; - readonly host_arch: string; - readonly node_install_npm: boolean; - readonly node_install_waf: boolean; - readonly node_prefix: string; - readonly node_shared_openssl: boolean; - readonly node_shared_v8: boolean; - readonly node_shared_zlib: boolean; - readonly node_use_dtrace: boolean; - readonly node_use_etw: boolean; - readonly node_use_openssl: boolean; - readonly target_arch: string; - readonly v8_no_strict_aliasing: number; - readonly v8_use_snapshot: boolean; - readonly visibility: string; - }; - } - interface Process extends EventEmitter { - /** - * The `process.stdout` property returns a stream connected to`stdout` (fd `1`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `1` refers to a file, in which case it is - * a `Writable` stream. - * - * For example, to copy `process.stdin` to `process.stdout`: - * - * ```js - * import { stdin, stdout } from 'node:process'; - * - * stdin.pipe(stdout); - * ``` - * - * `process.stdout` differs from other Node.js streams in important ways. See `note on process I/O` for more information. - */ - stdout: WriteStream & { - fd: 1; - }; - /** - * The `process.stderr` property returns a stream connected to`stderr` (fd `2`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `2` refers to a file, in which case it is - * a `Writable` stream. - * - * `process.stderr` differs from other Node.js streams in important ways. See `note on process I/O` for more information. - */ - stderr: WriteStream & { - fd: 2; - }; - /** - * The `process.stdin` property returns a stream connected to`stdin` (fd `0`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `0` refers to a file, in which case it is - * a `Readable` stream. - * - * For details of how to read from `stdin` see `readable.read()`. - * - * As a `Duplex` stream, `process.stdin` can also be used in "old" mode that - * is compatible with scripts written for Node.js prior to v0.10\. - * For more information see `Stream compatibility`. - * - * In "old" streams mode the `stdin` stream is paused by default, so one - * must call `process.stdin.resume()` to read from it. Note also that calling `process.stdin.resume()` itself would switch stream to "old" mode. - */ - stdin: ReadStream & { - fd: 0; - }; - /** - * The `process.argv` property returns an array containing the command-line - * arguments passed when the Node.js process was launched. The first element will - * be {@link execPath}. See `process.argv0` if access to the original value - * of `argv[0]` is needed. The second element will be the path to the JavaScript - * file being executed. The remaining elements will be any additional command-line - * arguments. - * - * For example, assuming the following script for `process-args.js`: - * - * ```js - * import { argv } from 'node:process'; - * - * // print process.argv - * argv.forEach((val, index) => { - * console.log(`${index}: ${val}`); - * }); - * ``` - * - * Launching the Node.js process as: - * - * ```bash - * node process-args.js one two=three four - * ``` - * - * Would generate the output: - * - * ```text - * 0: /usr/local/bin/node - * 1: /Users/mjr/work/node/process-args.js - * 2: one - * 3: two=three - * 4: four - * ``` - * @since v0.1.27 - */ - argv: string[]; - /** - * The `process.argv0` property stores a read-only copy of the original value of`argv[0]` passed when Node.js starts. - * - * ```console - * $ bash -c 'exec -a customArgv0 ./node' - * > process.argv[0] - * '/Volumes/code/external/node/out/Release/node' - * > process.argv0 - * 'customArgv0' - * ``` - * @since v6.4.0 - */ - argv0: string; - /** - * The `process.execArgv` property returns the set of Node.js-specific command-line - * options passed when the Node.js process was launched. These options do not - * appear in the array returned by the {@link argv} property, and do not - * include the Node.js executable, the name of the script, or any options following - * the script name. These options are useful in order to spawn child processes with - * the same execution environment as the parent. - * - * ```bash - * node --icu-data-dir=./foo --require ./bar.js script.js --version - * ``` - * - * Results in `process.execArgv`: - * - * ```js - * ["--icu-data-dir=./foo", "--require", "./bar.js"] - * ``` - * - * And `process.argv`: - * - * ```js - * ['/usr/local/bin/node', 'script.js', '--version'] - * ``` - * - * Refer to `Worker constructor` for the detailed behavior of worker - * threads with this property. - * @since v0.7.7 - */ - execArgv: string[]; - /** - * The `process.execPath` property returns the absolute pathname of the executable - * that started the Node.js process. Symbolic links, if any, are resolved. - * - * ```js - * '/usr/local/bin/node' - * ``` - * @since v0.1.100 - */ - execPath: string; - /** - * The `process.abort()` method causes the Node.js process to exit immediately and - * generate a core file. - * - * This feature is not available in `Worker` threads. - * @since v0.7.0 - */ - abort(): never; - /** - * The `process.chdir()` method changes the current working directory of the - * Node.js process or throws an exception if doing so fails (for instance, if - * the specified `directory` does not exist). - * - * ```js - * import { chdir, cwd } from 'node:process'; - * - * console.log(`Starting directory: ${cwd()}`); - * try { - * chdir('/tmp'); - * console.log(`New directory: ${cwd()}`); - * } catch (err) { - * console.error(`chdir: ${err}`); - * } - * ``` - * - * This feature is not available in `Worker` threads. - * @since v0.1.17 - */ - chdir(directory: string): void; - /** - * The `process.cwd()` method returns the current working directory of the Node.js - * process. - * - * ```js - * import { cwd } from 'node:process'; - * - * console.log(`Current directory: ${cwd()}`); - * ``` - * @since v0.1.8 - */ - cwd(): string; - /** - * The port used by the Node.js debugger when enabled. - * - * ```js - * import process from 'node:process'; - * - * process.debugPort = 5858; - * ``` - * @since v0.7.2 - */ - debugPort: number; - /** - * The `process.dlopen()` method allows dynamically loading shared objects. It is primarily used by `require()` to load C++ Addons, and - * should not be used directly, except in special cases. In other words, `require()` should be preferred over `process.dlopen()` - * unless there are specific reasons such as custom dlopen flags or loading from ES modules. - * - * The `flags` argument is an integer that allows to specify dlopen behavior. See the `[os.constants.dlopen](https://nodejs.org/docs/latest-v20.x/api/os.html#dlopen-constants)` - * documentation for details. - * - * An important requirement when calling `process.dlopen()` is that the `module` instance must be passed. Functions exported by the C++ Addon - * are then accessible via `module.exports`. - * - * The example below shows how to load a C++ Addon, named `local.node`, that exports a `foo` function. All the symbols are loaded before the call returns, by passing the `RTLD_NOW` constant. - * In this example the constant is assumed to be available. - * - * ```js - * import { dlopen } from 'node:process'; - * import { constants } from 'node:os'; - * import { fileURLToPath } from 'node:url'; - * - * const module = { exports: {} }; - * dlopen(module, fileURLToPath(new URL('local.node', import.meta.url)), - * constants.dlopen.RTLD_NOW); - * module.exports.foo(); - * ``` - */ - dlopen(module: object, filename: string, flags?: number): void; - /** - * The `process.emitWarning()` method can be used to emit custom or application - * specific process warnings. These can be listened for by adding a handler to the `'warning'` event. - * - * ```js - * import { emitWarning } from 'node:process'; - * - * // Emit a warning using a string. - * emitWarning('Something happened!'); - * // Emits: (node: 56338) Warning: Something happened! - * ``` - * - * ```js - * import { emitWarning } from 'node:process'; - * - * // Emit a warning using a string and a type. - * emitWarning('Something Happened!', 'CustomWarning'); - * // Emits: (node:56338) CustomWarning: Something Happened! - * ``` - * - * ```js - * import { emitWarning } from 'node:process'; - * - * emitWarning('Something happened!', 'CustomWarning', 'WARN001'); - * // Emits: (node:56338) [WARN001] CustomWarning: Something happened! - * ```js - * - * In each of the previous examples, an `Error` object is generated internally by `process.emitWarning()` and passed through to the `'warning'` handler. - * - * ```js - * import process from 'node:process'; - * - * process.on('warning', (warning) => { - * console.warn(warning.name); // 'Warning' - * console.warn(warning.message); // 'Something happened!' - * console.warn(warning.code); // 'MY_WARNING' - * console.warn(warning.stack); // Stack trace - * console.warn(warning.detail); // 'This is some additional information' - * }); - * ``` - * - * If `warning` is passed as an `Error` object, it will be passed through to the `'warning'` event handler - * unmodified (and the optional `type`, `code` and `ctor` arguments will be ignored): - * - * ```js - * import { emitWarning } from 'node:process'; - * - * // Emit a warning using an Error object. - * const myWarning = new Error('Something happened!'); - * // Use the Error name property to specify the type name - * myWarning.name = 'CustomWarning'; - * myWarning.code = 'WARN001'; - * - * emitWarning(myWarning); - * // Emits: (node:56338) [WARN001] CustomWarning: Something happened! - * ``` - * - * A `TypeError` is thrown if `warning` is anything other than a string or `Error` object. - * - * While process warnings use `Error` objects, the process warning mechanism is not a replacement for normal error handling mechanisms. - * - * The following additional handling is implemented if the warning `type` is `'DeprecationWarning'`: - * * If the `--throw-deprecation` command-line flag is used, the deprecation warning is thrown as an exception rather than being emitted as an event. - * * If the `--no-deprecation` command-line flag is used, the deprecation warning is suppressed. - * * If the `--trace-deprecation` command-line flag is used, the deprecation warning is printed to `stderr` along with the full stack trace. - * @since v8.0.0 - * @param warning The warning to emit. - */ - emitWarning(warning: string | Error, ctor?: Function): void; - emitWarning(warning: string | Error, type?: string, ctor?: Function): void; - emitWarning(warning: string | Error, type?: string, code?: string, ctor?: Function): void; - emitWarning(warning: string | Error, options?: EmitWarningOptions): void; - /** - * The `process.env` property returns an object containing the user environment. - * See [`environ(7)`](http://man7.org/linux/man-pages/man7/environ.7.html). - * - * An example of this object looks like: - * - * ```js - * { - * TERM: 'xterm-256color', - * SHELL: '/usr/local/bin/bash', - * USER: 'maciej', - * PATH: '~/.bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin', - * PWD: '/Users/maciej', - * EDITOR: 'vim', - * SHLVL: '1', - * HOME: '/Users/maciej', - * LOGNAME: 'maciej', - * _: '/usr/local/bin/node' - * } - * ``` - * - * It is possible to modify this object, but such modifications will not be - * reflected outside the Node.js process, or (unless explicitly requested) - * to other `Worker` threads. - * In other words, the following example would not work: - * - * ```bash - * node -e 'process.env.foo = "bar"' && echo $foo - * ``` - * - * While the following will: - * - * ```js - * import { env } from 'node:process'; - * - * env.foo = 'bar'; - * console.log(env.foo); - * ``` - * - * Assigning a property on `process.env` will implicitly convert the value - * to a string. **This behavior is deprecated.** Future versions of Node.js may - * throw an error when the value is not a string, number, or boolean. - * - * ```js - * import { env } from 'node:process'; - * - * env.test = null; - * console.log(env.test); - * // => 'null' - * env.test = undefined; - * console.log(env.test); - * // => 'undefined' - * ``` - * - * Use `delete` to delete a property from `process.env`. - * - * ```js - * import { env } from 'node:process'; - * - * env.TEST = 1; - * delete env.TEST; - * console.log(env.TEST); - * // => undefined - * ``` - * - * On Windows operating systems, environment variables are case-insensitive. - * - * ```js - * import { env } from 'node:process'; - * - * env.TEST = 1; - * console.log(env.test); - * // => 1 - * ``` - * - * Unless explicitly specified when creating a `Worker` instance, - * each `Worker` thread has its own copy of `process.env`, based on its - * parent thread's `process.env`, or whatever was specified as the `env` option - * to the `Worker` constructor. Changes to `process.env` will not be visible - * across `Worker` threads, and only the main thread can make changes that - * are visible to the operating system or to native add-ons. On Windows, a copy of `process.env` on a `Worker` instance operates in a case-sensitive manner - * unlike the main thread. - * @since v0.1.27 - */ - env: ProcessEnv; - /** - * The `process.exit()` method instructs Node.js to terminate the process - * synchronously with an exit status of `code`. If `code` is omitted, exit uses - * either the 'success' code `0` or the value of `process.exitCode` if it has been - * set. Node.js will not terminate until all the `'exit'` event listeners are - * called. - * - * To exit with a 'failure' code: - * - * ```js - * import { exit } from 'node:process'; - * - * exit(1); - * ``` - * - * The shell that executed Node.js should see the exit code as `1`. - * - * Calling `process.exit()` will force the process to exit as quickly as possible - * even if there are still asynchronous operations pending that have not yet - * completed fully, including I/O operations to `process.stdout` and `process.stderr`. - * - * In most situations, it is not actually necessary to call `process.exit()` explicitly. The Node.js process will exit on its own _if there is no additional_ - * _work pending_ in the event loop. The `process.exitCode` property can be set to - * tell the process which exit code to use when the process exits gracefully. - * - * For instance, the following example illustrates a _misuse_ of the `process.exit()` method that could lead to data printed to stdout being - * truncated and lost: - * - * ```js - * import { exit } from 'node:process'; - * - * // This is an example of what *not* to do: - * if (someConditionNotMet()) { - * printUsageToStdout(); - * exit(1); - * } - * ``` - * - * The reason this is problematic is because writes to `process.stdout` in Node.js - * are sometimes _asynchronous_ and may occur over multiple ticks of the Node.js - * event loop. Calling `process.exit()`, however, forces the process to exit _before_ those additional writes to `stdout` can be performed. - * - * Rather than calling `process.exit()` directly, the code _should_ set the `process.exitCode` and allow the process to exit naturally by avoiding - * scheduling any additional work for the event loop: - * - * ```js - * import process from 'node:process'; - * - * // How to properly set the exit code while letting - * // the process exit gracefully. - * if (someConditionNotMet()) { - * printUsageToStdout(); - * process.exitCode = 1; - * } - * ``` - * - * If it is necessary to terminate the Node.js process due to an error condition, - * throwing an _uncaught_ error and allowing the process to terminate accordingly - * is safer than calling `process.exit()`. - * - * In `Worker` threads, this function stops the current thread rather - * than the current process. - * @since v0.1.13 - * @param [code=0] The exit code. For string type, only integer strings (e.g.,'1') are allowed. - */ - exit(code?: number | string | null): never; - /** - * A number which will be the process exit code, when the process either - * exits gracefully, or is exited via {@link exit} without specifying - * a code. - * - * Specifying a code to {@link exit} will override any - * previous setting of `process.exitCode`. - * @default undefined - * @since v0.11.8 - */ - exitCode: number | string | number | undefined; - /** - * The `process.getActiveResourcesInfo()` method returns an array of strings containing - * the types of the active resources that are currently keeping the event loop alive. - * - * ```js - * import { getActiveResourcesInfo } from 'node:process'; - * import { setTimeout } from 'node:timers'; - - * console.log('Before:', getActiveResourcesInfo()); - * setTimeout(() => {}, 1000); - * console.log('After:', getActiveResourcesInfo()); - * // Prints: - * // Before: [ 'TTYWrap', 'TTYWrap', 'TTYWrap' ] - * // After: [ 'TTYWrap', 'TTYWrap', 'TTYWrap', 'Timeout' ] - * ``` - * @since v17.3.0, v16.14.0 - */ - getActiveResourcesInfo(): string[]; - /** - * Provides a way to load built-in modules in a globally available function. - * @param id ID of the built-in module being requested. - * @since v20.16.0 - */ - getBuiltinModule(id: ID): BuiltInModule[ID]; - getBuiltinModule(id: string): object | undefined; - /** - * The `process.getgid()` method returns the numerical group identity of the - * process. (See [`getgid(2)`](http://man7.org/linux/man-pages/man2/getgid.2.html).) - * - * ```js - * import process from 'node:process'; - * - * if (process.getgid) { - * console.log(`Current gid: ${process.getgid()}`); - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * @since v0.1.31 - */ - getgid?: () => number; - /** - * The `process.setgid()` method sets the group identity of the process. (See [`setgid(2)`](http://man7.org/linux/man-pages/man2/setgid.2.html).) The `id` can be passed as either a - * numeric ID or a group name - * string. If a group name is specified, this method blocks while resolving the - * associated numeric ID. - * - * ```js - * import process from 'node:process'; - * - * if (process.getgid && process.setgid) { - * console.log(`Current gid: ${process.getgid()}`); - * try { - * process.setgid(501); - * console.log(`New gid: ${process.getgid()}`); - * } catch (err) { - * console.log(`Failed to set gid: ${err}`); - * } - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * This feature is not available in `Worker` threads. - * @since v0.1.31 - * @param id The group name or ID - */ - setgid?: (id: number | string) => void; - /** - * The `process.getuid()` method returns the numeric user identity of the process. - * (See [`getuid(2)`](http://man7.org/linux/man-pages/man2/getuid.2.html).) - * - * ```js - * import process from 'node:process'; - * - * if (process.getuid) { - * console.log(`Current uid: ${process.getuid()}`); - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * @since v0.1.28 - */ - getuid?: () => number; - /** - * The `process.setuid(id)` method sets the user identity of the process. (See [`setuid(2)`](http://man7.org/linux/man-pages/man2/setuid.2.html).) The `id` can be passed as either a - * numeric ID or a username string. - * If a username is specified, the method blocks while resolving the associated - * numeric ID. - * - * ```js - * import process from 'node:process'; - * - * if (process.getuid && process.setuid) { - * console.log(`Current uid: ${process.getuid()}`); - * try { - * process.setuid(501); - * console.log(`New uid: ${process.getuid()}`); - * } catch (err) { - * console.log(`Failed to set uid: ${err}`); - * } - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * This feature is not available in `Worker` threads. - * @since v0.1.28 - */ - setuid?: (id: number | string) => void; - /** - * The `process.geteuid()` method returns the numerical effective user identity of - * the process. (See [`geteuid(2)`](http://man7.org/linux/man-pages/man2/geteuid.2.html).) - * - * ```js - * import process from 'node:process'; - * - * if (process.geteuid) { - * console.log(`Current uid: ${process.geteuid()}`); - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * @since v2.0.0 - */ - geteuid?: () => number; - /** - * The `process.seteuid()` method sets the effective user identity of the process. - * (See [`seteuid(2)`](http://man7.org/linux/man-pages/man2/seteuid.2.html).) The `id` can be passed as either a numeric ID or a username - * string. If a username is specified, the method blocks while resolving the - * associated numeric ID. - * - * ```js - * import process from 'node:process'; - * - * if (process.geteuid && process.seteuid) { - * console.log(`Current uid: ${process.geteuid()}`); - * try { - * process.seteuid(501); - * console.log(`New uid: ${process.geteuid()}`); - * } catch (err) { - * console.log(`Failed to set uid: ${err}`); - * } - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * This feature is not available in `Worker` threads. - * @since v2.0.0 - * @param id A user name or ID - */ - seteuid?: (id: number | string) => void; - /** - * The `process.getegid()` method returns the numerical effective group identity - * of the Node.js process. (See [`getegid(2)`](http://man7.org/linux/man-pages/man2/getegid.2.html).) - * - * ```js - * import process from 'node:process'; - * - * if (process.getegid) { - * console.log(`Current gid: ${process.getegid()}`); - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * @since v2.0.0 - */ - getegid?: () => number; - /** - * The `process.setegid()` method sets the effective group identity of the process. - * (See [`setegid(2)`](http://man7.org/linux/man-pages/man2/setegid.2.html).) The `id` can be passed as either a numeric ID or a group - * name string. If a group name is specified, this method blocks while resolving - * the associated a numeric ID. - * - * ```js - * import process from 'node:process'; - * - * if (process.getegid && process.setegid) { - * console.log(`Current gid: ${process.getegid()}`); - * try { - * process.setegid(501); - * console.log(`New gid: ${process.getegid()}`); - * } catch (err) { - * console.log(`Failed to set gid: ${err}`); - * } - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * This feature is not available in `Worker` threads. - * @since v2.0.0 - * @param id A group name or ID - */ - setegid?: (id: number | string) => void; - /** - * The `process.getgroups()` method returns an array with the supplementary group - * IDs. POSIX leaves it unspecified if the effective group ID is included but - * Node.js ensures it always is. - * - * ```js - * import process from 'node:process'; - * - * if (process.getgroups) { - * console.log(process.getgroups()); // [ 16, 21, 297 ] - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * @since v0.9.4 - */ - getgroups?: () => number[]; - /** - * The `process.setgroups()` method sets the supplementary group IDs for the - * Node.js process. This is a privileged operation that requires the Node.js - * process to have `root` or the `CAP_SETGID` capability. - * - * The `groups` array can contain numeric group IDs, group names, or both. - * - * ```js - * import process from 'node:process'; - * - * if (process.getgroups && process.setgroups) { - * try { - * process.setgroups([501]); - * console.log(process.getgroups()); // new groups - * } catch (err) { - * console.log(`Failed to set groups: ${err}`); - * } - * } - * ``` - * - * This function is only available on POSIX platforms (i.e. not Windows or - * Android). - * This feature is not available in `Worker` threads. - * @since v0.9.4 - */ - setgroups?: (groups: ReadonlyArray) => void; - /** - * The `process.setUncaughtExceptionCaptureCallback()` function sets a function - * that will be invoked when an uncaught exception occurs, which will receive the - * exception value itself as its first argument. - * - * If such a function is set, the `'uncaughtException'` event will - * not be emitted. If `--abort-on-uncaught-exception` was passed from the - * command line or set through `v8.setFlagsFromString()`, the process will - * not abort. Actions configured to take place on exceptions such as report - * generations will be affected too - * - * To unset the capture function, `process.setUncaughtExceptionCaptureCallback(null)` may be used. Calling this - * method with a non-`null` argument while another capture function is set will - * throw an error. - * - * Using this function is mutually exclusive with using the deprecated `domain` built-in module. - * @since v9.3.0 - */ - setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void; - /** - * Indicates whether a callback has been set using {@link setUncaughtExceptionCaptureCallback}. - * @since v9.3.0 - */ - hasUncaughtExceptionCaptureCallback(): boolean; - /** - * The `process.sourceMapsEnabled` property returns whether the [Source Map v3](https://sourcemaps.info/spec.html) support for stack traces is enabled. - * @since v20.7.0 - * @experimental - */ - readonly sourceMapsEnabled: boolean; - /** - * This function enables or disables the [Source Map v3](https://sourcemaps.info/spec.html) support for - * stack traces. - * - * It provides same features as launching Node.js process with commandline options `--enable-source-maps`. - * - * Only source maps in JavaScript files that are loaded after source maps has been - * enabled will be parsed and loaded. - * @since v16.6.0, v14.18.0 - * @experimental - */ - setSourceMapsEnabled(value: boolean): void; - /** - * The `process.version` property contains the Node.js version string. - * - * ```js - * import { version } from 'node:process'; - * - * console.log(`Version: ${version}`); - * // Version: v14.8.0 - * ``` - * - * To get the version string without the prepended _v_, use`process.versions.node`. - * @since v0.1.3 - */ - readonly version: string; - /** - * The `process.versions` property returns an object listing the version strings of - * Node.js and its dependencies. `process.versions.modules` indicates the current - * ABI version, which is increased whenever a C++ API changes. Node.js will refuse - * to load modules that were compiled against a different module ABI version. - * - * ```js - * import { versions } from 'node:process'; - * - * console.log(versions); - * ``` - * - * Will generate an object similar to: - * - * ```console - * { node: '20.2.0', - * acorn: '8.8.2', - * ada: '2.4.0', - * ares: '1.19.0', - * base64: '0.5.0', - * brotli: '1.0.9', - * cjs_module_lexer: '1.2.2', - * cldr: '43.0', - * icu: '73.1', - * llhttp: '8.1.0', - * modules: '115', - * napi: '8', - * nghttp2: '1.52.0', - * nghttp3: '0.7.0', - * ngtcp2: '0.8.1', - * openssl: '3.0.8+quic', - * simdutf: '3.2.9', - * tz: '2023c', - * undici: '5.22.0', - * unicode: '15.0', - * uv: '1.44.2', - * uvwasi: '0.0.16', - * v8: '11.3.244.8-node.9', - * zlib: '1.2.13' } - * ``` - * @since v0.2.0 - */ - readonly versions: ProcessVersions; - /** - * The `process.config` property returns a frozen `Object` containing the - * JavaScript representation of the configure options used to compile the current - * Node.js executable. This is the same as the `config.gypi` file that was produced - * when running the `./configure` script. - * - * An example of the possible output looks like: - * - * ```js - * { - * target_defaults: - * { cflags: [], - * default_configuration: 'Release', - * defines: [], - * include_dirs: [], - * libraries: [] }, - * variables: - * { - * host_arch: 'x64', - * napi_build_version: 5, - * node_install_npm: 'true', - * node_prefix: '', - * node_shared_cares: 'false', - * node_shared_http_parser: 'false', - * node_shared_libuv: 'false', - * node_shared_zlib: 'false', - * node_use_openssl: 'true', - * node_shared_openssl: 'false', - * strict_aliasing: 'true', - * target_arch: 'x64', - * v8_use_snapshot: 1 - * } - * } - * ``` - * @since v0.7.7 - */ - readonly config: ProcessConfig; - /** - * The `process.kill()` method sends the `signal` to the process identified by`pid`. - * - * Signal names are strings such as `'SIGINT'` or `'SIGHUP'`. See `Signal Events` and [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for more information. - * - * This method will throw an error if the target `pid` does not exist. As a special - * case, a signal of `0` can be used to test for the existence of a process. - * Windows platforms will throw an error if the `pid` is used to kill a process - * group. - * - * Even though the name of this function is `process.kill()`, it is really just a - * signal sender, like the `kill` system call. The signal sent may do something - * other than kill the target process. - * - * ```js - * import process, { kill } from 'node:process'; - * - * process.on('SIGHUP', () => { - * console.log('Got SIGHUP signal.'); - * }); - * - * setTimeout(() => { - * console.log('Exiting.'); - * process.exit(0); - * }, 100); - * - * kill(process.pid, 'SIGHUP'); - * ``` - * - * When `SIGUSR1` is received by a Node.js process, Node.js will start the - * debugger. See `Signal Events`. - * @since v0.0.6 - * @param pid A process ID - * @param [signal='SIGTERM'] The signal to send, either as a string or number. - */ - kill(pid: number, signal?: string | number): true; - /** - * Loads the environment configuration from a `.env` file into `process.env`. If - * the file is not found, error will be thrown. - * - * To load a specific .env file by specifying its path, use the following code: - * - * ```js - * import { loadEnvFile } from 'node:process'; - * - * loadEnvFile('./development.env') - * ``` - * @since v20.12.0 - * @param path The path to the .env file - */ - loadEnvFile(path?: PathLike): void; - /** - * The `process.pid` property returns the PID of the process. - * - * ```js - * import { pid } from 'node:process'; - * - * console.log(`This process is pid ${pid}`); - * ``` - * @since v0.1.15 - */ - readonly pid: number; - /** - * The `process.ppid` property returns the PID of the parent of the - * current process. - * - * ```js - * import { ppid } from 'node:process'; - * - * console.log(`The parent process is pid ${ppid}`); - * ``` - * @since v9.2.0, v8.10.0, v6.13.0 - */ - readonly ppid: number; - /** - * The `process.title` property returns the current process title (i.e. returns - * the current value of `ps`). Assigning a new value to `process.title` modifies - * the current value of `ps`. - * - * When a new value is assigned, different platforms will impose different maximum - * length restrictions on the title. Usually such restrictions are quite limited. - * For instance, on Linux and macOS, `process.title` is limited to the size of the - * binary name plus the length of the command-line arguments because setting the `process.title` overwrites the `argv` memory of the process. Node.js v0.8 - * allowed for longer process title strings by also overwriting the `environ` memory but that was potentially insecure and confusing in some (rather obscure) - * cases. - * - * Assigning a value to `process.title` might not result in an accurate label - * within process manager applications such as macOS Activity Monitor or Windows - * Services Manager. - * @since v0.1.104 - */ - title: string; - /** - * The operating system CPU architecture for which the Node.js binary was compiled. - * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`, `'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`, and `'x64'`. - * - * ```js - * import { arch } from 'node:process'; - * - * console.log(`This processor architecture is ${arch}`); - * ``` - * @since v0.5.0 - */ - readonly arch: Architecture; - /** - * The `process.platform` property returns a string identifying the operating - * system platform for which the Node.js binary was compiled. - * - * Currently possible values are: - * - * * `'aix'` - * * `'darwin'` - * * `'freebsd'` - * * `'linux'` - * * `'openbsd'` - * * `'sunos'` - * * `'win32'` - * - * ```js - * import { platform } from 'node:process'; - * - * console.log(`This platform is ${platform}`); - * ``` - * - * The value `'android'` may also be returned if the Node.js is built on the - * Android operating system. However, Android support in Node.js [is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os). - * @since v0.1.16 - */ - readonly platform: Platform; - /** - * The `process.mainModule` property provides an alternative way of retrieving `require.main`. The difference is that if the main module changes at - * runtime, `require.main` may still refer to the original main module in - * modules that were required before the change occurred. Generally, it's - * safe to assume that the two refer to the same module. - * - * As with `require.main`, `process.mainModule` will be `undefined` if there - * is no entry script. - * @since v0.1.17 - * @deprecated Since v14.0.0 - Use `main` instead. - */ - mainModule?: Module; - memoryUsage: MemoryUsageFn; - /** - * Gets the amount of memory available to the process (in bytes) based on - * limits imposed by the OS. If there is no such constraint, or the constraint - * is unknown, `0` is returned. - * - * See [`uv_get_constrained_memory`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_get_constrained_memory) for more - * information. - * @since v19.6.0, v18.15.0 - * @experimental - */ - constrainedMemory(): number; - /** - * Gets the amount of free memory that is still available to the process (in bytes). - * See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v20.x/api/process.html#processavailablememory) for more information. - * @experimental - * @since v20.13.0 - */ - availableMemory(): number; - /** - * The `process.cpuUsage()` method returns the user and system CPU time usage of - * the current process, in an object with properties `user` and `system`, whose - * values are microsecond values (millionth of a second). These values measure time - * spent in user and system code respectively, and may end up being greater than - * actual elapsed time if multiple CPU cores are performing work for this process. - * - * The result of a previous call to `process.cpuUsage()` can be passed as the - * argument to the function, to get a diff reading. - * - * ```js - * import { cpuUsage } from 'node:process'; - * - * const startUsage = cpuUsage(); - * // { user: 38579, system: 6986 } - * - * // spin the CPU for 500 milliseconds - * const now = Date.now(); - * while (Date.now() - now < 500); - * - * console.log(cpuUsage(startUsage)); - * // { user: 514883, system: 11226 } - * ``` - * @since v6.1.0 - * @param previousValue A previous return value from calling `process.cpuUsage()` - */ - cpuUsage(previousValue?: CpuUsage): CpuUsage; - /** - * `process.nextTick()` adds `callback` to the "next tick queue". This queue is - * fully drained after the current operation on the JavaScript stack runs to - * completion and before the event loop is allowed to continue. It's possible to - * create an infinite loop if one were to recursively call `process.nextTick()`. - * See the [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#process-nexttick) guide for more background. - * - * ```js - * import { nextTick } from 'node:process'; - * - * console.log('start'); - * nextTick(() => { - * console.log('nextTick callback'); - * }); - * console.log('scheduled'); - * // Output: - * // start - * // scheduled - * // nextTick callback - * ``` - * - * This is important when developing APIs in order to give users the opportunity - * to assign event handlers _after_ an object has been constructed but before any - * I/O has occurred: - * - * ```js - * import { nextTick } from 'node:process'; - * - * function MyThing(options) { - * this.setupOptions(options); - * - * nextTick(() => { - * this.startDoingStuff(); - * }); - * } - * - * const thing = new MyThing(); - * thing.getReadyForStuff(); - * - * // thing.startDoingStuff() gets called now, not before. - * ``` - * - * It is very important for APIs to be either 100% synchronous or 100% - * asynchronous. Consider this example: - * - * ```js - * // WARNING! DO NOT USE! BAD UNSAFE HAZARD! - * function maybeSync(arg, cb) { - * if (arg) { - * cb(); - * return; - * } - * - * fs.stat('file', cb); - * } - * ``` - * - * This API is hazardous because in the following case: - * - * ```js - * const maybeTrue = Math.random() > 0.5; - * - * maybeSync(maybeTrue, () => { - * foo(); - * }); - * - * bar(); - * ``` - * - * It is not clear whether `foo()` or `bar()` will be called first. - * - * The following approach is much better: - * - * ```js - * import { nextTick } from 'node:process'; - * - * function definitelyAsync(arg, cb) { - * if (arg) { - * nextTick(cb); - * return; - * } - * - * fs.stat('file', cb); - * } - * ``` - * @since v0.1.26 - * @param args Additional arguments to pass when invoking the `callback` - */ - nextTick(callback: Function, ...args: any[]): void; - /** - * The process.noDeprecation property indicates whether the --no-deprecation flag is set on the current Node.js process. - * See the documentation for the ['warning' event](https://nodejs.org/docs/latest/api/process.html#event-warning) and the [emitWarning()](https://nodejs.org/docs/latest/api/process.html#processemitwarningwarning-type-code-ctor) method for more information about this flag's behavior. - */ - noDeprecation?: boolean; - /** - * This API is available through the [--experimental-permission](https://nodejs.org/api/cli.html#--experimental-permission) flag. - * - * `process.permission` is an object whose methods are used to manage permissions for the current process. - * Additional documentation is available in the [Permission Model](https://nodejs.org/api/permissions.html#permission-model). - * @since v20.0.0 - */ - permission: ProcessPermission; - /** - * The `process.release` property returns an `Object` containing metadata related - * to the current release, including URLs for the source tarball and headers-only - * tarball. - * - * `process.release` contains the following properties: - * - * ```js - * { - * name: 'node', - * lts: 'Hydrogen', - * sourceUrl: 'https://nodejs.org/download/release/v18.12.0/node-v18.12.0.tar.gz', - * headersUrl: 'https://nodejs.org/download/release/v18.12.0/node-v18.12.0-headers.tar.gz', - * libUrl: 'https://nodejs.org/download/release/v18.12.0/win-x64/node.lib' - * } - * ``` - * - * In custom builds from non-release versions of the source tree, only the `name` property may be present. The additional properties should not be - * relied upon to exist. - * @since v3.0.0 - */ - readonly release: ProcessRelease; - readonly features: ProcessFeatures; - /** - * `process.umask()` returns the Node.js process's file mode creation mask. Child - * processes inherit the mask from the parent process. - * @since v0.1.19 - * @deprecated Calling `process.umask()` with no argument causes the process-wide umask to be written twice. This introduces a race condition between threads, and is a potential - * security vulnerability. There is no safe, cross-platform alternative API. - */ - umask(): number; - /** - * Can only be set if not in worker thread. - */ - umask(mask: string | number): number; - /** - * The `process.uptime()` method returns the number of seconds the current Node.js - * process has been running. - * - * The return value includes fractions of a second. Use `Math.floor()` to get whole - * seconds. - * @since v0.5.0 - */ - uptime(): number; - hrtime: HRTime; - /** - * If the Node.js process was spawned with an IPC channel, the process.channel property is a reference to the IPC channel. - * If no IPC channel exists, this property is undefined. - * @since v7.1.0 - */ - channel?: Control; - /** - * If Node.js is spawned with an IPC channel, the `process.send()` method can be - * used to send messages to the parent process. Messages will be received as a `'message'` event on the parent's `ChildProcess` object. - * - * If Node.js was not spawned with an IPC channel, `process.send` will be `undefined`. - * - * The message goes through serialization and parsing. The resulting message might - * not be the same as what is originally sent. - * @since v0.5.9 - * @param options used to parameterize the sending of certain types of handles. `options` supports the following properties: - */ - send?( - message: any, - sendHandle?: SendHandle, - options?: MessageOptions, - callback?: (error: Error | null) => void, - ): boolean; - send?( - message: any, - sendHandle: SendHandle, - callback?: (error: Error | null) => void, - ): boolean; - send?( - message: any, - callback: (error: Error | null) => void, - ): boolean; - /** - * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.disconnect()` method will close the - * IPC channel to the parent process, allowing the child process to exit gracefully - * once there are no other connections keeping it alive. - * - * The effect of calling `process.disconnect()` is the same as calling `ChildProcess.disconnect()` from the parent process. - * - * If the Node.js process was not spawned with an IPC channel, `process.disconnect()` will be `undefined`. - * @since v0.7.2 - */ - disconnect(): void; - /** - * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.connected` property will return `true` so long as the IPC - * channel is connected and will return `false` after `process.disconnect()` is called. - * - * Once `process.connected` is `false`, it is no longer possible to send messages - * over the IPC channel using `process.send()`. - * @since v0.7.2 - */ - connected: boolean; - /** - * The `process.allowedNodeEnvironmentFlags` property is a special, - * read-only `Set` of flags allowable within the `NODE_OPTIONS` environment variable. - * - * `process.allowedNodeEnvironmentFlags` extends `Set`, but overrides `Set.prototype.has` to recognize several different possible flag - * representations. `process.allowedNodeEnvironmentFlags.has()` will - * return `true` in the following cases: - * - * * Flags may omit leading single (`-`) or double (`--`) dashes; e.g., `inspect-brk` for `--inspect-brk`, or `r` for `-r`. - * * Flags passed through to V8 (as listed in `--v8-options`) may replace - * one or more _non-leading_ dashes for an underscore, or vice-versa; - * e.g., `--perf_basic_prof`, `--perf-basic-prof`, `--perf_basic-prof`, - * etc. - * * Flags may contain one or more equals (`=`) characters; all - * characters after and including the first equals will be ignored; - * e.g., `--stack-trace-limit=100`. - * * Flags _must_ be allowable within `NODE_OPTIONS`. - * - * When iterating over `process.allowedNodeEnvironmentFlags`, flags will - * appear only _once_; each will begin with one or more dashes. Flags - * passed through to V8 will contain underscores instead of non-leading - * dashes: - * - * ```js - * import { allowedNodeEnvironmentFlags } from 'node:process'; - * - * allowedNodeEnvironmentFlags.forEach((flag) => { - * // -r - * // --inspect-brk - * // --abort_on_uncaught_exception - * // ... - * }); - * ``` - * - * The methods `add()`, `clear()`, and `delete()` of`process.allowedNodeEnvironmentFlags` do nothing, and will fail - * silently. - * - * If Node.js was compiled _without_ `NODE_OPTIONS` support (shown in {@link config}), `process.allowedNodeEnvironmentFlags` will - * contain what _would have_ been allowable. - * @since v10.10.0 - */ - allowedNodeEnvironmentFlags: ReadonlySet; - /** - * `process.report` is an object whose methods are used to generate diagnostic reports for the current process. - * Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v20.x/api/report.html). - * @since v11.8.0 - */ - report: ProcessReport; - /** - * ```js - * import { resourceUsage } from 'node:process'; - * - * console.log(resourceUsage()); - * /* - * Will output: - * { - * userCPUTime: 82872, - * systemCPUTime: 4143, - * maxRSS: 33164, - * sharedMemorySize: 0, - * unsharedDataSize: 0, - * unsharedStackSize: 0, - * minorPageFault: 2469, - * majorPageFault: 0, - * swappedOut: 0, - * fsRead: 0, - * fsWrite: 8, - * ipcSent: 0, - * ipcReceived: 0, - * signalsCount: 0, - * voluntaryContextSwitches: 79, - * involuntaryContextSwitches: 1 - * } - * - * ``` - * @since v12.6.0 - * @return the resource usage for the current process. All of these values come from the `uv_getrusage` call which returns a [`uv_rusage_t` struct][uv_rusage_t]. - */ - resourceUsage(): ResourceUsage; - /** - * The initial value of `process.throwDeprecation` indicates whether the `--throw-deprecation` flag is set on the current Node.js process. `process.throwDeprecation` - * is mutable, so whether or not deprecation warnings result in errors may be altered at runtime. See the documentation for the 'warning' event and the emitWarning() - * method for more information. - * - * ```bash - * $ node --throw-deprecation -p "process.throwDeprecation" - * true - * $ node -p "process.throwDeprecation" - * undefined - * $ node - * > process.emitWarning('test', 'DeprecationWarning'); - * undefined - * > (node:26598) DeprecationWarning: test - * > process.throwDeprecation = true; - * true - * > process.emitWarning('test', 'DeprecationWarning'); - * Thrown: - * [DeprecationWarning: test] { name: 'DeprecationWarning' } - * ``` - * @since v0.9.12 - */ - throwDeprecation: boolean; - /** - * The `process.traceDeprecation` property indicates whether the `--trace-deprecation` flag is set on the current Node.js process. See the - * documentation for the `'warning' event` and the `emitWarning() method` for more information about this - * flag's behavior. - * @since v0.8.0 - */ - traceDeprecation: boolean; - /* EventEmitter */ - addListener(event: "beforeExit", listener: BeforeExitListener): this; - addListener(event: "disconnect", listener: DisconnectListener): this; - addListener(event: "exit", listener: ExitListener): this; - addListener(event: "rejectionHandled", listener: RejectionHandledListener): this; - addListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; - addListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this; - addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; - addListener(event: "warning", listener: WarningListener): this; - addListener(event: "message", listener: MessageListener): this; - addListener(event: "workerMessage", listener: (value: any, source: number) => void): this; - addListener(event: Signals, listener: SignalsListener): this; - addListener(event: "multipleResolves", listener: MultipleResolveListener): this; - addListener(event: "worker", listener: WorkerListener): this; - emit(event: "beforeExit", code: number): boolean; - emit(event: "disconnect"): boolean; - emit(event: "exit", code: number): boolean; - emit(event: "rejectionHandled", promise: Promise): boolean; - emit(event: "uncaughtException", error: Error): boolean; - emit(event: "uncaughtExceptionMonitor", error: Error): boolean; - emit(event: "unhandledRejection", reason: unknown, promise: Promise): boolean; - emit(event: "warning", warning: Error): boolean; - emit(event: "message", message: unknown, sendHandle: SendHandle): this; - emit(event: "workerMessage", value: any, source: number): this; - emit(event: Signals, signal?: Signals): boolean; - emit( - event: "multipleResolves", - type: MultipleResolveType, - promise: Promise, - value: unknown, - ): this; - emit(event: "worker", listener: WorkerListener): this; - on(event: "beforeExit", listener: BeforeExitListener): this; - on(event: "disconnect", listener: DisconnectListener): this; - on(event: "exit", listener: ExitListener): this; - on(event: "rejectionHandled", listener: RejectionHandledListener): this; - on(event: "uncaughtException", listener: UncaughtExceptionListener): this; - on(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this; - on(event: "unhandledRejection", listener: UnhandledRejectionListener): this; - on(event: "warning", listener: WarningListener): this; - on(event: "message", listener: MessageListener): this; - on(event: "workerMessage", listener: (value: any, source: number) => void): this; - on(event: Signals, listener: SignalsListener): this; - on(event: "multipleResolves", listener: MultipleResolveListener): this; - on(event: "worker", listener: WorkerListener): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: "beforeExit", listener: BeforeExitListener): this; - once(event: "disconnect", listener: DisconnectListener): this; - once(event: "exit", listener: ExitListener): this; - once(event: "rejectionHandled", listener: RejectionHandledListener): this; - once(event: "uncaughtException", listener: UncaughtExceptionListener): this; - once(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this; - once(event: "unhandledRejection", listener: UnhandledRejectionListener): this; - once(event: "warning", listener: WarningListener): this; - once(event: "message", listener: MessageListener): this; - once(event: "workerMessage", listener: (value: any, source: number) => void): this; - once(event: Signals, listener: SignalsListener): this; - once(event: "multipleResolves", listener: MultipleResolveListener): this; - once(event: "worker", listener: WorkerListener): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener(event: "beforeExit", listener: BeforeExitListener): this; - prependListener(event: "disconnect", listener: DisconnectListener): this; - prependListener(event: "exit", listener: ExitListener): this; - prependListener(event: "rejectionHandled", listener: RejectionHandledListener): this; - prependListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; - prependListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this; - prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; - prependListener(event: "warning", listener: WarningListener): this; - prependListener(event: "message", listener: MessageListener): this; - prependListener(event: "workerMessage", listener: (value: any, source: number) => void): this; - prependListener(event: Signals, listener: SignalsListener): this; - prependListener(event: "multipleResolves", listener: MultipleResolveListener): this; - prependListener(event: "worker", listener: WorkerListener): this; - prependOnceListener(event: "beforeExit", listener: BeforeExitListener): this; - prependOnceListener(event: "disconnect", listener: DisconnectListener): this; - prependOnceListener(event: "exit", listener: ExitListener): this; - prependOnceListener(event: "rejectionHandled", listener: RejectionHandledListener): this; - prependOnceListener(event: "uncaughtException", listener: UncaughtExceptionListener): this; - prependOnceListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this; - prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this; - prependOnceListener(event: "warning", listener: WarningListener): this; - prependOnceListener(event: "message", listener: MessageListener): this; - prependOnceListener(event: "workerMessage", listener: (value: any, source: number) => void): this; - prependOnceListener(event: Signals, listener: SignalsListener): this; - prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this; - prependOnceListener(event: "worker", listener: WorkerListener): this; - listeners(event: "beforeExit"): BeforeExitListener[]; - listeners(event: "disconnect"): DisconnectListener[]; - listeners(event: "exit"): ExitListener[]; - listeners(event: "rejectionHandled"): RejectionHandledListener[]; - listeners(event: "uncaughtException"): UncaughtExceptionListener[]; - listeners(event: "uncaughtExceptionMonitor"): UncaughtExceptionListener[]; - listeners(event: "unhandledRejection"): UnhandledRejectionListener[]; - listeners(event: "warning"): WarningListener[]; - listeners(event: "message"): MessageListener[]; - listeners(event: "workerMessage"): ((value: any, source: number) => void)[]; - listeners(event: Signals): SignalsListener[]; - listeners(event: "multipleResolves"): MultipleResolveListener[]; - listeners(event: "worker"): WorkerListener[]; - } - } - } - export = process; -} -declare module "node:process" { - import process = require("process"); - export = process; -} diff --git a/node_modules/@types/node/punycode.d.ts b/node_modules/@types/node/punycode.d.ts deleted file mode 100644 index 394d611..0000000 --- a/node_modules/@types/node/punycode.d.ts +++ /dev/null @@ -1,117 +0,0 @@ -/** - * **The version of the punycode module bundled in Node.js is being deprecated. **In a future major version of Node.js this module will be removed. Users - * currently depending on the `punycode` module should switch to using the - * userland-provided [Punycode.js](https://github.com/bestiejs/punycode.js) module instead. For punycode-based URL - * encoding, see `url.domainToASCII` or, more generally, the `WHATWG URL API`. - * - * The `punycode` module is a bundled version of the [Punycode.js](https://github.com/bestiejs/punycode.js) module. It - * can be accessed using: - * - * ```js - * import punycode from 'node:punycode'; - * ``` - * - * [Punycode](https://tools.ietf.org/html/rfc3492) is a character encoding scheme defined by RFC 3492 that is - * primarily intended for use in Internationalized Domain Names. Because host - * names in URLs are limited to ASCII characters only, Domain Names that contain - * non-ASCII characters must be converted into ASCII using the Punycode scheme. - * For instance, the Japanese character that translates into the English word, `'example'` is `'例'`. The Internationalized Domain Name, `'例.com'` (equivalent - * to `'example.com'`) is represented by Punycode as the ASCII string `'xn--fsq.com'`. - * - * The `punycode` module provides a simple implementation of the Punycode standard. - * - * The `punycode` module is a third-party dependency used by Node.js and - * made available to developers as a convenience. Fixes or other modifications to - * the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project. - * @deprecated Since v7.0.0 - Deprecated - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/punycode.js) - */ -declare module "punycode" { - /** - * The `punycode.decode()` method converts a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only - * characters to the equivalent string of Unicode codepoints. - * - * ```js - * punycode.decode('maana-pta'); // 'mañana' - * punycode.decode('--dqo34k'); // '☃-⌘' - * ``` - * @since v0.5.1 - */ - function decode(string: string): string; - /** - * The `punycode.encode()` method converts a string of Unicode codepoints to a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only characters. - * - * ```js - * punycode.encode('mañana'); // 'maana-pta' - * punycode.encode('☃-⌘'); // '--dqo34k' - * ``` - * @since v0.5.1 - */ - function encode(string: string): string; - /** - * The `punycode.toUnicode()` method converts a string representing a domain name - * containing [Punycode](https://tools.ietf.org/html/rfc3492) encoded characters into Unicode. Only the [Punycode](https://tools.ietf.org/html/rfc3492) encoded parts of the domain name are be - * converted. - * - * ```js - * // decode domain names - * punycode.toUnicode('xn--maana-pta.com'); // 'mañana.com' - * punycode.toUnicode('xn----dqo34k.com'); // '☃-⌘.com' - * punycode.toUnicode('example.com'); // 'example.com' - * ``` - * @since v0.6.1 - */ - function toUnicode(domain: string): string; - /** - * The `punycode.toASCII()` method converts a Unicode string representing an - * Internationalized Domain Name to [Punycode](https://tools.ietf.org/html/rfc3492). Only the non-ASCII parts of the - * domain name will be converted. Calling `punycode.toASCII()` on a string that - * already only contains ASCII characters will have no effect. - * - * ```js - * // encode domain names - * punycode.toASCII('mañana.com'); // 'xn--maana-pta.com' - * punycode.toASCII('☃-⌘.com'); // 'xn----dqo34k.com' - * punycode.toASCII('example.com'); // 'example.com' - * ``` - * @since v0.6.1 - */ - function toASCII(domain: string): string; - /** - * @deprecated since v7.0.0 - * The version of the punycode module bundled in Node.js is being deprecated. - * In a future major version of Node.js this module will be removed. - * Users currently depending on the punycode module should switch to using - * the userland-provided Punycode.js module instead. - */ - const ucs2: ucs2; - interface ucs2 { - /** - * @deprecated since v7.0.0 - * The version of the punycode module bundled in Node.js is being deprecated. - * In a future major version of Node.js this module will be removed. - * Users currently depending on the punycode module should switch to using - * the userland-provided Punycode.js module instead. - */ - decode(string: string): number[]; - /** - * @deprecated since v7.0.0 - * The version of the punycode module bundled in Node.js is being deprecated. - * In a future major version of Node.js this module will be removed. - * Users currently depending on the punycode module should switch to using - * the userland-provided Punycode.js module instead. - */ - encode(codePoints: readonly number[]): string; - } - /** - * @deprecated since v7.0.0 - * The version of the punycode module bundled in Node.js is being deprecated. - * In a future major version of Node.js this module will be removed. - * Users currently depending on the punycode module should switch to using - * the userland-provided Punycode.js module instead. - */ - const version: string; -} -declare module "node:punycode" { - export * from "punycode"; -} diff --git a/node_modules/@types/node/querystring.d.ts b/node_modules/@types/node/querystring.d.ts deleted file mode 100644 index 27eaed2..0000000 --- a/node_modules/@types/node/querystring.d.ts +++ /dev/null @@ -1,152 +0,0 @@ -/** - * The `node:querystring` module provides utilities for parsing and formatting URL - * query strings. It can be accessed using: - * - * ```js - * import querystring from 'node:querystring'; - * ``` - * - * `querystring` is more performant than `URLSearchParams` but is not a - * standardized API. Use `URLSearchParams` when performance is not critical or - * when compatibility with browser code is desirable. - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/querystring.js) - */ -declare module "querystring" { - interface StringifyOptions { - /** - * The function to use when converting URL-unsafe characters to percent-encoding in the query string. - * @default `querystring.escape()` - */ - encodeURIComponent?: ((str: string) => string) | undefined; - } - interface ParseOptions { - /** - * Specifies the maximum number of keys to parse. Specify `0` to remove key counting limitations. - * @default 1000 - */ - maxKeys?: number | undefined; - /** - * The function to use when decoding percent-encoded characters in the query string. - * @default `querystring.unescape()` - */ - decodeURIComponent?: ((str: string) => string) | undefined; - } - interface ParsedUrlQuery extends NodeJS.Dict {} - interface ParsedUrlQueryInput extends - NodeJS.Dict< - | string - | number - | boolean - | bigint - | ReadonlyArray - | null - > - {} - /** - * The `querystring.stringify()` method produces a URL query string from a - * given `obj` by iterating through the object's "own properties". - * - * It serializes the following types of values passed in `obj`: [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | - * [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) | - * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) | - * [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) | - * [string\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) | - * [number\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) | - * [bigint\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) | - * [boolean\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) The numeric values must be finite. Any other input values will be coerced to - * empty strings. - * - * ```js - * querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' }); - * // Returns 'foo=bar&baz=qux&baz=quux&corge=' - * - * querystring.stringify({ foo: 'bar', baz: 'qux' }, ';', ':'); - * // Returns 'foo:bar;baz:qux' - * ``` - * - * By default, characters requiring percent-encoding within the query string will - * be encoded as UTF-8\. If an alternative encoding is required, then an alternative `encodeURIComponent` option will need to be specified: - * - * ```js - * // Assuming gbkEncodeURIComponent function already exists, - * - * querystring.stringify({ w: '中文', foo: 'bar' }, null, null, - * { encodeURIComponent: gbkEncodeURIComponent }); - * ``` - * @since v0.1.25 - * @param obj The object to serialize into a URL query string - * @param [sep='&'] The substring used to delimit key and value pairs in the query string. - * @param [eq='='] . The substring used to delimit keys and values in the query string. - */ - function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string; - /** - * The `querystring.parse()` method parses a URL query string (`str`) into a - * collection of key and value pairs. - * - * For example, the query string `'foo=bar&abc=xyz&abc=123'` is parsed into: - * - * ```json - * { - * "foo": "bar", - * "abc": ["xyz", "123"] - * } - * ``` - * - * The object returned by the `querystring.parse()` method _does not_ prototypically inherit from the JavaScript `Object`. This means that typical `Object` methods such as `obj.toString()`, - * `obj.hasOwnProperty()`, and others - * are not defined and _will not work_. - * - * By default, percent-encoded characters within the query string will be assumed - * to use UTF-8 encoding. If an alternative character encoding is used, then an - * alternative `decodeURIComponent` option will need to be specified: - * - * ```js - * // Assuming gbkDecodeURIComponent function already exists... - * - * querystring.parse('w=%D6%D0%CE%C4&foo=bar', null, null, - * { decodeURIComponent: gbkDecodeURIComponent }); - * ``` - * @since v0.1.25 - * @param str The URL query string to parse - * @param [sep='&'] The substring used to delimit key and value pairs in the query string. - * @param [eq='='] The substring used to delimit keys and values in the query string. - */ - function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery; - /** - * The querystring.encode() function is an alias for querystring.stringify(). - */ - const encode: typeof stringify; - /** - * The querystring.decode() function is an alias for querystring.parse(). - */ - const decode: typeof parse; - /** - * The `querystring.escape()` method performs URL percent-encoding on the given `str` in a manner that is optimized for the specific requirements of URL - * query strings. - * - * The `querystring.escape()` method is used by `querystring.stringify()` and is - * generally not expected to be used directly. It is exported primarily to allow - * application code to provide a replacement percent-encoding implementation if - * necessary by assigning `querystring.escape` to an alternative function. - * @since v0.1.25 - */ - function escape(str: string): string; - /** - * The `querystring.unescape()` method performs decoding of URL percent-encoded - * characters on the given `str`. - * - * The `querystring.unescape()` method is used by `querystring.parse()` and is - * generally not expected to be used directly. It is exported primarily to allow - * application code to provide a replacement decoding implementation if - * necessary by assigning `querystring.unescape` to an alternative function. - * - * By default, the `querystring.unescape()` method will attempt to use the - * JavaScript built-in `decodeURIComponent()` method to decode. If that fails, - * a safer equivalent that does not throw on malformed URLs will be used. - * @since v0.1.25 - */ - function unescape(str: string): string; -} -declare module "node:querystring" { - export * from "querystring"; -} diff --git a/node_modules/@types/node/readline.d.ts b/node_modules/@types/node/readline.d.ts deleted file mode 100644 index 1504c26..0000000 --- a/node_modules/@types/node/readline.d.ts +++ /dev/null @@ -1,589 +0,0 @@ -/** - * The `node:readline` module provides an interface for reading data from a [Readable](https://nodejs.org/docs/https://nodejs.org/docs/latest-v20.x/api/stream.html#readable-streams) stream - * (such as [`process.stdin`](https://nodejs.org/docs/https://nodejs.org/docs/latest-v20.x/api/process.html#processstdin)) one line at a time. - * - * To use the promise-based APIs: - * - * ```js - * import * as readline from 'node:readline/promises'; - * ``` - * - * To use the callback and sync APIs: - * - * ```js - * import * as readline from 'node:readline'; - * ``` - * - * The following simple example illustrates the basic use of the `node:readline` module. - * - * ```js - * import * as readline from 'node:readline/promises'; - * import { stdin as input, stdout as output } from 'node:process'; - * - * const rl = readline.createInterface({ input, output }); - * - * const answer = await rl.question('What do you think of Node.js? '); - * - * console.log(`Thank you for your valuable feedback: ${answer}`); - * - * rl.close(); - * ``` - * - * Once this code is invoked, the Node.js application will not terminate until the `readline.Interface` is closed because the interface waits for data to be - * received on the `input` stream. - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/readline.js) - */ -declare module "readline" { - import { Abortable, EventEmitter } from "node:events"; - import * as promises from "node:readline/promises"; - export { promises }; - export interface Key { - sequence?: string | undefined; - name?: string | undefined; - ctrl?: boolean | undefined; - meta?: boolean | undefined; - shift?: boolean | undefined; - } - /** - * Instances of the `readline.Interface` class are constructed using the `readline.createInterface()` method. Every instance is associated with a - * single `input` [Readable](https://nodejs.org/docs/https://nodejs.org/docs/latest-v20.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/https://nodejs.org/docs/latest-v20.x/api/stream.html#writable-streams) stream. - * The `output` stream is used to print prompts for user input that arrives on, - * and is read from, the `input` stream. - * @since v0.1.104 - */ - export class Interface extends EventEmitter { - readonly terminal: boolean; - /** - * The current input data being processed by node. - * - * This can be used when collecting input from a TTY stream to retrieve the - * current value that has been processed thus far, prior to the `line` event - * being emitted. Once the `line` event has been emitted, this property will - * be an empty string. - * - * Be aware that modifying the value during the instance runtime may have - * unintended consequences if `rl.cursor` is not also controlled. - * - * **If not using a TTY stream for input, use the `'line'` event.** - * - * One possible use case would be as follows: - * - * ```js - * const values = ['lorem ipsum', 'dolor sit amet']; - * const rl = readline.createInterface(process.stdin); - * const showResults = debounce(() => { - * console.log( - * '\n', - * values.filter((val) => val.startsWith(rl.line)).join(' '), - * ); - * }, 300); - * process.stdin.on('keypress', (c, k) => { - * showResults(); - * }); - * ``` - * @since v0.1.98 - */ - readonly line: string; - /** - * The cursor position relative to `rl.line`. - * - * This will track where the current cursor lands in the input string, when - * reading input from a TTY stream. The position of cursor determines the - * portion of the input string that will be modified as input is processed, - * as well as the column where the terminal caret will be rendered. - * @since v0.1.98 - */ - readonly cursor: number; - /** - * NOTE: According to the documentation: - * - * > Instances of the `readline.Interface` class are constructed using the - * > `readline.createInterface()` method. - * - * @see https://nodejs.org/docs/latest-v20.x/api/readline.html#class-interfaceconstructor - */ - protected constructor( - input: NodeJS.ReadableStream, - output?: NodeJS.WritableStream, - completer?: Completer | AsyncCompleter, - terminal?: boolean, - ); - /** - * NOTE: According to the documentation: - * - * > Instances of the `readline.Interface` class are constructed using the - * > `readline.createInterface()` method. - * - * @see https://nodejs.org/docs/latest-v20.x/api/readline.html#class-interfaceconstructor - */ - protected constructor(options: ReadLineOptions); - /** - * The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`. - * @since v15.3.0, v14.17.0 - * @return the current prompt string - */ - getPrompt(): string; - /** - * The `rl.setPrompt()` method sets the prompt that will be written to `output` whenever `rl.prompt()` is called. - * @since v0.1.98 - */ - setPrompt(prompt: string): void; - /** - * The `rl.prompt()` method writes the `Interface` instances configured`prompt` to a new line in `output` in order to provide a user with a new - * location at which to provide input. - * - * When called, `rl.prompt()` will resume the `input` stream if it has been - * paused. - * - * If the `Interface` was created with `output` set to `null` or `undefined` the prompt is not written. - * @since v0.1.98 - * @param preserveCursor If `true`, prevents the cursor placement from being reset to `0`. - */ - prompt(preserveCursor?: boolean): void; - /** - * The `rl.question()` method displays the `query` by writing it to the `output`, - * waits for user input to be provided on `input`, then invokes the `callback` function passing the provided input as the first argument. - * - * When called, `rl.question()` will resume the `input` stream if it has been - * paused. - * - * If the `Interface` was created with `output` set to `null` or `undefined` the `query` is not written. - * - * The `callback` function passed to `rl.question()` does not follow the typical - * pattern of accepting an `Error` object or `null` as the first argument. - * The `callback` is called with the provided answer as the only argument. - * - * An error will be thrown if calling `rl.question()` after `rl.close()`. - * - * Example usage: - * - * ```js - * rl.question('What is your favorite food? ', (answer) => { - * console.log(`Oh, so your favorite food is ${answer}`); - * }); - * ``` - * - * Using an `AbortController` to cancel a question. - * - * ```js - * const ac = new AbortController(); - * const signal = ac.signal; - * - * rl.question('What is your favorite food? ', { signal }, (answer) => { - * console.log(`Oh, so your favorite food is ${answer}`); - * }); - * - * signal.addEventListener('abort', () => { - * console.log('The food question timed out'); - * }, { once: true }); - * - * setTimeout(() => ac.abort(), 10000); - * ``` - * @since v0.3.3 - * @param query A statement or query to write to `output`, prepended to the prompt. - * @param callback A callback function that is invoked with the user's input in response to the `query`. - */ - question(query: string, callback: (answer: string) => void): void; - question(query: string, options: Abortable, callback: (answer: string) => void): void; - /** - * The `rl.pause()` method pauses the `input` stream, allowing it to be resumed - * later if necessary. - * - * Calling `rl.pause()` does not immediately pause other events (including `'line'`) from being emitted by the `Interface` instance. - * @since v0.3.4 - */ - pause(): this; - /** - * The `rl.resume()` method resumes the `input` stream if it has been paused. - * @since v0.3.4 - */ - resume(): this; - /** - * The `rl.close()` method closes the `Interface` instance and - * relinquishes control over the `input` and `output` streams. When called, - * the `'close'` event will be emitted. - * - * Calling `rl.close()` does not immediately stop other events (including `'line'`) - * from being emitted by the `Interface` instance. - * @since v0.1.98 - */ - close(): void; - /** - * The `rl.write()` method will write either `data` or a key sequence identified - * by `key` to the `output`. The `key` argument is supported only if `output` is - * a `TTY` text terminal. See `TTY keybindings` for a list of key - * combinations. - * - * If `key` is specified, `data` is ignored. - * - * When called, `rl.write()` will resume the `input` stream if it has been - * paused. - * - * If the `Interface` was created with `output` set to `null` or `undefined` the `data` and `key` are not written. - * - * ```js - * rl.write('Delete this!'); - * // Simulate Ctrl+U to delete the line written previously - * rl.write(null, { ctrl: true, name: 'u' }); - * ``` - * - * The `rl.write()` method will write the data to the `readline` `Interface`'s `input` _as if it were provided by the user_. - * @since v0.1.98 - */ - write(data: string | Buffer, key?: Key): void; - write(data: undefined | null | string | Buffer, key: Key): void; - /** - * Returns the real position of the cursor in relation to the input - * prompt + string. Long input (wrapping) strings, as well as multiple - * line prompts are included in the calculations. - * @since v13.5.0, v12.16.0 - */ - getCursorPos(): CursorPos; - /** - * events.EventEmitter - * 1. close - * 2. line - * 3. pause - * 4. resume - * 5. SIGCONT - * 6. SIGINT - * 7. SIGTSTP - * 8. history - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "line", listener: (input: string) => void): this; - addListener(event: "pause", listener: () => void): this; - addListener(event: "resume", listener: () => void): this; - addListener(event: "SIGCONT", listener: () => void): this; - addListener(event: "SIGINT", listener: () => void): this; - addListener(event: "SIGTSTP", listener: () => void): this; - addListener(event: "history", listener: (history: string[]) => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "line", input: string): boolean; - emit(event: "pause"): boolean; - emit(event: "resume"): boolean; - emit(event: "SIGCONT"): boolean; - emit(event: "SIGINT"): boolean; - emit(event: "SIGTSTP"): boolean; - emit(event: "history", history: string[]): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: () => void): this; - on(event: "line", listener: (input: string) => void): this; - on(event: "pause", listener: () => void): this; - on(event: "resume", listener: () => void): this; - on(event: "SIGCONT", listener: () => void): this; - on(event: "SIGINT", listener: () => void): this; - on(event: "SIGTSTP", listener: () => void): this; - on(event: "history", listener: (history: string[]) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "line", listener: (input: string) => void): this; - once(event: "pause", listener: () => void): this; - once(event: "resume", listener: () => void): this; - once(event: "SIGCONT", listener: () => void): this; - once(event: "SIGINT", listener: () => void): this; - once(event: "SIGTSTP", listener: () => void): this; - once(event: "history", listener: (history: string[]) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "line", listener: (input: string) => void): this; - prependListener(event: "pause", listener: () => void): this; - prependListener(event: "resume", listener: () => void): this; - prependListener(event: "SIGCONT", listener: () => void): this; - prependListener(event: "SIGINT", listener: () => void): this; - prependListener(event: "SIGTSTP", listener: () => void): this; - prependListener(event: "history", listener: (history: string[]) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "line", listener: (input: string) => void): this; - prependOnceListener(event: "pause", listener: () => void): this; - prependOnceListener(event: "resume", listener: () => void): this; - prependOnceListener(event: "SIGCONT", listener: () => void): this; - prependOnceListener(event: "SIGINT", listener: () => void): this; - prependOnceListener(event: "SIGTSTP", listener: () => void): this; - prependOnceListener(event: "history", listener: (history: string[]) => void): this; - [Symbol.asyncIterator](): NodeJS.AsyncIterator; - } - export type ReadLine = Interface; // type forwarded for backwards compatibility - export type Completer = (line: string) => CompleterResult; - export type AsyncCompleter = ( - line: string, - callback: (err?: null | Error, result?: CompleterResult) => void, - ) => void; - export type CompleterResult = [string[], string]; - export interface ReadLineOptions { - /** - * The [`Readable`](https://nodejs.org/docs/latest-v20.x/api/stream.html#readable-streams) stream to listen to - */ - input: NodeJS.ReadableStream; - /** - * The [`Writable`](https://nodejs.org/docs/latest-v20.x/api/stream.html#writable-streams) stream to write readline data to. - */ - output?: NodeJS.WritableStream | undefined; - /** - * An optional function used for Tab autocompletion. - */ - completer?: Completer | AsyncCompleter | undefined; - /** - * `true` if the `input` and `output` streams should be treated like a TTY, - * and have ANSI/VT100 escape codes written to it. - * Default: checking `isTTY` on the `output` stream upon instantiation. - */ - terminal?: boolean | undefined; - /** - * Initial list of history lines. - * This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check, - * otherwise the history caching mechanism is not initialized at all. - * @default [] - */ - history?: string[] | undefined; - /** - * Maximum number of history lines retained. - * To disable the history set this value to `0`. - * This option makes sense only if `terminal` is set to `true` by the user or by an internal `output` check, - * otherwise the history caching mechanism is not initialized at all. - * @default 30 - */ - historySize?: number | undefined; - /** - * If `true`, when a new input line added to the history list duplicates an older one, - * this removes the older line from the list. - * @default false - */ - removeHistoryDuplicates?: boolean | undefined; - /** - * The prompt string to use. - * @default "> " - */ - prompt?: string | undefined; - /** - * If the delay between `\r` and `\n` exceeds `crlfDelay` milliseconds, - * both `\r` and `\n` will be treated as separate end-of-line input. - * `crlfDelay` will be coerced to a number no less than `100`. - * It can be set to `Infinity`, in which case - * `\r` followed by `\n` will always be considered a single newline - * (which may be reasonable for [reading files](https://nodejs.org/docs/latest-v20.x/api/readline.html#example-read-file-stream-line-by-line) with `\r\n` line delimiter). - * @default 100 - */ - crlfDelay?: number | undefined; - /** - * The duration `readline` will wait for a character - * (when reading an ambiguous key sequence in milliseconds - * one that can both form a complete key sequence using the input read so far - * and can take additional input to complete a longer key sequence). - * @default 500 - */ - escapeCodeTimeout?: number | undefined; - /** - * The number of spaces a tab is equal to (minimum 1). - * @default 8 - */ - tabSize?: number | undefined; - /** - * Allows closing the interface using an AbortSignal. - * Aborting the signal will internally call `close` on the interface. - */ - signal?: AbortSignal | undefined; - } - /** - * The `readline.createInterface()` method creates a new `readline.Interface` instance. - * - * ```js - * import readline from 'node:readline'; - * const rl = readline.createInterface({ - * input: process.stdin, - * output: process.stdout, - * }); - * ``` - * - * Once the `readline.Interface` instance is created, the most common case is to - * listen for the `'line'` event: - * - * ```js - * rl.on('line', (line) => { - * console.log(`Received: ${line}`); - * }); - * ``` - * - * If `terminal` is `true` for this instance then the `output` stream will get - * the best compatibility if it defines an `output.columns` property and emits - * a `'resize'` event on the `output` if or when the columns ever change - * (`process.stdout` does this automatically when it is a TTY). - * - * When creating a `readline.Interface` using `stdin` as input, the program - * will not terminate until it receives an [EOF character](https://en.wikipedia.org/wiki/End-of-file#EOF_character). To exit without - * waiting for user input, call `process.stdin.unref()`. - * @since v0.1.98 - */ - export function createInterface( - input: NodeJS.ReadableStream, - output?: NodeJS.WritableStream, - completer?: Completer | AsyncCompleter, - terminal?: boolean, - ): Interface; - export function createInterface(options: ReadLineOptions): Interface; - /** - * The `readline.emitKeypressEvents()` method causes the given `Readable` stream to begin emitting `'keypress'` events corresponding to received input. - * - * Optionally, `interface` specifies a `readline.Interface` instance for which - * autocompletion is disabled when copy-pasted input is detected. - * - * If the `stream` is a `TTY`, then it must be in raw mode. - * - * This is automatically called by any readline instance on its `input` if the `input` is a terminal. Closing the `readline` instance does not stop - * the `input` from emitting `'keypress'` events. - * - * ```js - * readline.emitKeypressEvents(process.stdin); - * if (process.stdin.isTTY) - * process.stdin.setRawMode(true); - * ``` - * - * ## Example: Tiny CLI - * - * The following example illustrates the use of `readline.Interface` class to - * implement a small command-line interface: - * - * ```js - * import readline from 'node:readline'; - * const rl = readline.createInterface({ - * input: process.stdin, - * output: process.stdout, - * prompt: 'OHAI> ', - * }); - * - * rl.prompt(); - * - * rl.on('line', (line) => { - * switch (line.trim()) { - * case 'hello': - * console.log('world!'); - * break; - * default: - * console.log(`Say what? I might have heard '${line.trim()}'`); - * break; - * } - * rl.prompt(); - * }).on('close', () => { - * console.log('Have a great day!'); - * process.exit(0); - * }); - * ``` - * - * ## Example: Read file stream line-by-Line - * - * A common use case for `readline` is to consume an input file one line at a - * time. The easiest way to do so is leveraging the `fs.ReadStream` API as - * well as a `for await...of` loop: - * - * ```js - * import fs from 'node:fs'; - * import readline from 'node:readline'; - * - * async function processLineByLine() { - * const fileStream = fs.createReadStream('input.txt'); - * - * const rl = readline.createInterface({ - * input: fileStream, - * crlfDelay: Infinity, - * }); - * // Note: we use the crlfDelay option to recognize all instances of CR LF - * // ('\r\n') in input.txt as a single line break. - * - * for await (const line of rl) { - * // Each line in input.txt will be successively available here as `line`. - * console.log(`Line from file: ${line}`); - * } - * } - * - * processLineByLine(); - * ``` - * - * Alternatively, one could use the `'line'` event: - * - * ```js - * import fs from 'node:fs'; - * import readline from 'node:readline'; - * - * const rl = readline.createInterface({ - * input: fs.createReadStream('sample.txt'), - * crlfDelay: Infinity, - * }); - * - * rl.on('line', (line) => { - * console.log(`Line from file: ${line}`); - * }); - * ``` - * - * Currently, `for await...of` loop can be a bit slower. If `async` / `await` flow and speed are both essential, a mixed approach can be applied: - * - * ```js - * import { once } from 'node:events'; - * import { createReadStream } from 'node:fs'; - * import { createInterface } from 'node:readline'; - * - * (async function processLineByLine() { - * try { - * const rl = createInterface({ - * input: createReadStream('big-file.txt'), - * crlfDelay: Infinity, - * }); - * - * rl.on('line', (line) => { - * // Process the line. - * }); - * - * await once(rl, 'close'); - * - * console.log('File processed.'); - * } catch (err) { - * console.error(err); - * } - * })(); - * ``` - * @since v0.7.7 - */ - export function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void; - export type Direction = -1 | 0 | 1; - export interface CursorPos { - rows: number; - cols: number; - } - /** - * The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/https://nodejs.org/docs/latest-v20.x/api/tty.html) stream - * in a specified direction identified by `dir`. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - export function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean; - /** - * The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/https://nodejs.org/docs/latest-v20.x/api/tty.html) stream from - * the current position of the cursor down. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - export function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean; - /** - * The `readline.cursorTo()` method moves cursor to the specified position in a - * given [TTY](https://nodejs.org/docs/https://nodejs.org/docs/latest-v20.x/api/tty.html) `stream`. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean; - /** - * The `readline.moveCursor()` method moves the cursor _relative_ to its current - * position in a given [TTY](https://nodejs.org/docs/https://nodejs.org/docs/latest-v20.x/api/tty.html) `stream`. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - export function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean; -} -declare module "node:readline" { - export * from "readline"; -} diff --git a/node_modules/@types/node/readline/promises.d.ts b/node_modules/@types/node/readline/promises.d.ts deleted file mode 100644 index f6cdf66..0000000 --- a/node_modules/@types/node/readline/promises.d.ts +++ /dev/null @@ -1,162 +0,0 @@ -/** - * @since v17.0.0 - * @experimental - */ -declare module "readline/promises" { - import { Abortable } from "node:events"; - import { - CompleterResult, - Direction, - Interface as _Interface, - ReadLineOptions as _ReadLineOptions, - } from "node:readline"; - /** - * Instances of the `readlinePromises.Interface` class are constructed using the `readlinePromises.createInterface()` method. Every instance is associated with a - * single `input` `Readable` stream and a single `output` `Writable` stream. - * The `output` stream is used to print prompts for user input that arrives on, - * and is read from, the `input` stream. - * @since v17.0.0 - */ - class Interface extends _Interface { - /** - * The `rl.question()` method displays the `query` by writing it to the `output`, - * waits for user input to be provided on `input`, then invokes the `callback` function passing the provided input as the first argument. - * - * When called, `rl.question()` will resume the `input` stream if it has been - * paused. - * - * If the `Interface` was created with `output` set to `null` or `undefined` the `query` is not written. - * - * If the question is called after `rl.close()`, it returns a rejected promise. - * - * Example usage: - * - * ```js - * const answer = await rl.question('What is your favorite food? '); - * console.log(`Oh, so your favorite food is ${answer}`); - * ``` - * - * Using an `AbortSignal` to cancel a question. - * - * ```js - * const signal = AbortSignal.timeout(10_000); - * - * signal.addEventListener('abort', () => { - * console.log('The food question timed out'); - * }, { once: true }); - * - * const answer = await rl.question('What is your favorite food? ', { signal }); - * console.log(`Oh, so your favorite food is ${answer}`); - * ``` - * @since v17.0.0 - * @param query A statement or query to write to `output`, prepended to the prompt. - * @return A promise that is fulfilled with the user's input in response to the `query`. - */ - question(query: string): Promise; - question(query: string, options: Abortable): Promise; - } - /** - * @since v17.0.0 - */ - class Readline { - /** - * @param stream A TTY stream. - */ - constructor( - stream: NodeJS.WritableStream, - options?: { - autoCommit?: boolean | undefined; - }, - ); - /** - * The `rl.clearLine()` method adds to the internal list of pending action an - * action that clears current line of the associated `stream` in a specified - * direction identified by `dir`. - * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. - * @since v17.0.0 - * @return this - */ - clearLine(dir: Direction): this; - /** - * The `rl.clearScreenDown()` method adds to the internal list of pending action an - * action that clears the associated stream from the current position of the - * cursor down. - * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. - * @since v17.0.0 - * @return this - */ - clearScreenDown(): this; - /** - * The `rl.commit()` method sends all the pending actions to the associated `stream` and clears the internal list of pending actions. - * @since v17.0.0 - */ - commit(): Promise; - /** - * The `rl.cursorTo()` method adds to the internal list of pending action an action - * that moves cursor to the specified position in the associated `stream`. - * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. - * @since v17.0.0 - * @return this - */ - cursorTo(x: number, y?: number): this; - /** - * The `rl.moveCursor()` method adds to the internal list of pending action an - * action that moves the cursor _relative_ to its current position in the - * associated `stream`. - * Call `rl.commit()` to see the effect of this method, unless `autoCommit: true` was passed to the constructor. - * @since v17.0.0 - * @return this - */ - moveCursor(dx: number, dy: number): this; - /** - * The `rl.rollback` methods clears the internal list of pending actions without - * sending it to the associated `stream`. - * @since v17.0.0 - * @return this - */ - rollback(): this; - } - type Completer = (line: string) => CompleterResult | Promise; - interface ReadLineOptions extends Omit<_ReadLineOptions, "completer"> { - /** - * An optional function used for Tab autocompletion. - */ - completer?: Completer | undefined; - } - /** - * The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface` instance. - * - * ```js - * import readlinePromises from 'node:readline/promises'; - * const rl = readlinePromises.createInterface({ - * input: process.stdin, - * output: process.stdout, - * }); - * ``` - * - * Once the `readlinePromises.Interface` instance is created, the most common case - * is to listen for the `'line'` event: - * - * ```js - * rl.on('line', (line) => { - * console.log(`Received: ${line}`); - * }); - * ``` - * - * If `terminal` is `true` for this instance then the `output` stream will get - * the best compatibility if it defines an `output.columns` property and emits - * a `'resize'` event on the `output` if or when the columns ever change - * (`process.stdout` does this automatically when it is a TTY). - * @since v17.0.0 - */ - function createInterface( - input: NodeJS.ReadableStream, - output?: NodeJS.WritableStream, - completer?: Completer, - terminal?: boolean, - ): Interface; - function createInterface(options: ReadLineOptions): Interface; -} -declare module "node:readline/promises" { - export * from "readline/promises"; -} diff --git a/node_modules/@types/node/repl.d.ts b/node_modules/@types/node/repl.d.ts deleted file mode 100644 index 8b1bb6b..0000000 --- a/node_modules/@types/node/repl.d.ts +++ /dev/null @@ -1,430 +0,0 @@ -/** - * The `node:repl` module provides a Read-Eval-Print-Loop (REPL) implementation - * that is available both as a standalone program or includible in other - * applications. It can be accessed using: - * - * ```js - * import repl from 'node:repl'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/repl.js) - */ -declare module "repl" { - import { AsyncCompleter, Completer, Interface } from "node:readline"; - import { Context } from "node:vm"; - import { InspectOptions } from "node:util"; - interface ReplOptions { - /** - * The input prompt to display. - * @default "> " - */ - prompt?: string | undefined; - /** - * The `Readable` stream from which REPL input will be read. - * @default process.stdin - */ - input?: NodeJS.ReadableStream | undefined; - /** - * The `Writable` stream to which REPL output will be written. - * @default process.stdout - */ - output?: NodeJS.WritableStream | undefined; - /** - * If `true`, specifies that the output should be treated as a TTY terminal, and have - * ANSI/VT100 escape codes written to it. - * Default: checking the value of the `isTTY` property on the output stream upon - * instantiation. - */ - terminal?: boolean | undefined; - /** - * The function to be used when evaluating each given line of input. - * Default: an async wrapper for the JavaScript `eval()` function. An `eval` function can - * error with `repl.Recoverable` to indicate the input was incomplete and prompt for - * additional lines. - * - * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_default_evaluation - * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_custom_evaluation_functions - */ - eval?: REPLEval | undefined; - /** - * Defines if the repl prints output previews or not. - * @default `true` Always `false` in case `terminal` is falsy. - */ - preview?: boolean | undefined; - /** - * If `true`, specifies that the default `writer` function should include ANSI color - * styling to REPL output. If a custom `writer` function is provided then this has no - * effect. - * @default the REPL instance's `terminal` value - */ - useColors?: boolean | undefined; - /** - * If `true`, specifies that the default evaluation function will use the JavaScript - * `global` as the context as opposed to creating a new separate context for the REPL - * instance. The node CLI REPL sets this value to `true`. - * @default false - */ - useGlobal?: boolean | undefined; - /** - * If `true`, specifies that the default writer will not output the return value of a - * command if it evaluates to `undefined`. - * @default false - */ - ignoreUndefined?: boolean | undefined; - /** - * The function to invoke to format the output of each command before writing to `output`. - * @default a wrapper for `util.inspect` - * - * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_customizing_repl_output - */ - writer?: REPLWriter | undefined; - /** - * An optional function used for custom Tab auto completion. - * - * @see https://nodejs.org/dist/latest-v20.x/docs/api/readline.html#readline_use_of_the_completer_function - */ - completer?: Completer | AsyncCompleter | undefined; - /** - * A flag that specifies whether the default evaluator executes all JavaScript commands in - * strict mode or default (sloppy) mode. - * Accepted values are: - * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. - * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to - * prefacing every repl statement with `'use strict'`. - */ - replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT | undefined; - /** - * Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is - * pressed. This cannot be used together with a custom `eval` function. - * @default false - */ - breakEvalOnSigint?: boolean | undefined; - } - type REPLEval = ( - this: REPLServer, - evalCmd: string, - context: Context, - file: string, - cb: (err: Error | null, result: any) => void, - ) => void; - type REPLWriter = (this: REPLServer, obj: any) => string; - /** - * This is the default "writer" value, if none is passed in the REPL options, - * and it can be overridden by custom print functions. - */ - const writer: REPLWriter & { - options: InspectOptions; - }; - type REPLCommandAction = (this: REPLServer, text: string) => void; - interface REPLCommand { - /** - * Help text to be displayed when `.help` is entered. - */ - help?: string | undefined; - /** - * The function to execute, optionally accepting a single string argument. - */ - action: REPLCommandAction; - } - /** - * Instances of `repl.REPLServer` are created using the {@link start} method - * or directly using the JavaScript `new` keyword. - * - * ```js - * import repl from 'node:repl'; - * - * const options = { useColors: true }; - * - * const firstInstance = repl.start(options); - * const secondInstance = new repl.REPLServer(options); - * ``` - * @since v0.1.91 - */ - class REPLServer extends Interface { - /** - * The `vm.Context` provided to the `eval` function to be used for JavaScript - * evaluation. - */ - readonly context: Context; - /** - * @deprecated since v14.3.0 - Use `input` instead. - */ - readonly inputStream: NodeJS.ReadableStream; - /** - * @deprecated since v14.3.0 - Use `output` instead. - */ - readonly outputStream: NodeJS.WritableStream; - /** - * The `Readable` stream from which REPL input will be read. - */ - readonly input: NodeJS.ReadableStream; - /** - * The `Writable` stream to which REPL output will be written. - */ - readonly output: NodeJS.WritableStream; - /** - * The commands registered via `replServer.defineCommand()`. - */ - readonly commands: NodeJS.ReadOnlyDict; - /** - * A value indicating whether the REPL is currently in "editor mode". - * - * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_commands_and_special_keys - */ - readonly editorMode: boolean; - /** - * A value indicating whether the `_` variable has been assigned. - * - * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable - */ - readonly underscoreAssigned: boolean; - /** - * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL). - * - * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable - */ - readonly last: any; - /** - * A value indicating whether the `_error` variable has been assigned. - * - * @since v9.8.0 - * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable - */ - readonly underscoreErrAssigned: boolean; - /** - * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL). - * - * @since v9.8.0 - * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable - */ - readonly lastError: any; - /** - * Specified in the REPL options, this is the function to be used when evaluating each - * given line of input. If not specified in the REPL options, this is an async wrapper - * for the JavaScript `eval()` function. - */ - readonly eval: REPLEval; - /** - * Specified in the REPL options, this is a value indicating whether the default - * `writer` function should include ANSI color styling to REPL output. - */ - readonly useColors: boolean; - /** - * Specified in the REPL options, this is a value indicating whether the default `eval` - * function will use the JavaScript `global` as the context as opposed to creating a new - * separate context for the REPL instance. - */ - readonly useGlobal: boolean; - /** - * Specified in the REPL options, this is a value indicating whether the default `writer` - * function should output the result of a command if it evaluates to `undefined`. - */ - readonly ignoreUndefined: boolean; - /** - * Specified in the REPL options, this is the function to invoke to format the output of - * each command before writing to `outputStream`. If not specified in the REPL options, - * this will be a wrapper for `util.inspect`. - */ - readonly writer: REPLWriter; - /** - * Specified in the REPL options, this is the function to use for custom Tab auto-completion. - */ - readonly completer: Completer | AsyncCompleter; - /** - * Specified in the REPL options, this is a flag that specifies whether the default `eval` - * function should execute all JavaScript commands in strict mode or default (sloppy) mode. - * Possible values are: - * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode. - * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to - * prefacing every repl statement with `'use strict'`. - */ - readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT; - /** - * NOTE: According to the documentation: - * - * > Instances of `repl.REPLServer` are created using the `repl.start()` method and - * > _should not_ be created directly using the JavaScript `new` keyword. - * - * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS. - * - * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_class_replserver - */ - private constructor(); - /** - * The `replServer.defineCommand()` method is used to add new `.`\-prefixed commands - * to the REPL instance. Such commands are invoked by typing a `.` followed by the `keyword`. The `cmd` is either a `Function` or an `Object` with the following - * properties: - * - * The following example shows two new commands added to the REPL instance: - * - * ```js - * import repl from 'node:repl'; - * - * const replServer = repl.start({ prompt: '> ' }); - * replServer.defineCommand('sayhello', { - * help: 'Say hello', - * action(name) { - * this.clearBufferedCommand(); - * console.log(`Hello, ${name}!`); - * this.displayPrompt(); - * }, - * }); - * replServer.defineCommand('saybye', function saybye() { - * console.log('Goodbye!'); - * this.close(); - * }); - * ``` - * - * The new commands can then be used from within the REPL instance: - * - * ```console - * > .sayhello Node.js User - * Hello, Node.js User! - * > .saybye - * Goodbye! - * ``` - * @since v0.3.0 - * @param keyword The command keyword (_without_ a leading `.` character). - * @param cmd The function to invoke when the command is processed. - */ - defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void; - /** - * The `replServer.displayPrompt()` method readies the REPL instance for input - * from the user, printing the configured `prompt` to a new line in the `output` and resuming the `input` to accept new input. - * - * When multi-line input is being entered, an ellipsis is printed rather than the - * 'prompt'. - * - * When `preserveCursor` is `true`, the cursor placement will not be reset to `0`. - * - * The `replServer.displayPrompt` method is primarily intended to be called from - * within the action function for commands registered using the `replServer.defineCommand()` method. - * @since v0.1.91 - */ - displayPrompt(preserveCursor?: boolean): void; - /** - * The `replServer.clearBufferedCommand()` method clears any command that has been - * buffered but not yet executed. This method is primarily intended to be - * called from within the action function for commands registered using the `replServer.defineCommand()` method. - * @since v9.0.0 - */ - clearBufferedCommand(): void; - /** - * Initializes a history log file for the REPL instance. When executing the - * Node.js binary and using the command-line REPL, a history file is initialized - * by default. However, this is not the case when creating a REPL - * programmatically. Use this method to initialize a history log file when working - * with REPL instances programmatically. - * @since v11.10.0 - * @param historyPath the path to the history file - * @param callback called when history writes are ready or upon error - */ - setupHistory(path: string, callback: (err: Error | null, repl: this) => void): void; - /** - * events.EventEmitter - * 1. close - inherited from `readline.Interface` - * 2. line - inherited from `readline.Interface` - * 3. pause - inherited from `readline.Interface` - * 4. resume - inherited from `readline.Interface` - * 5. SIGCONT - inherited from `readline.Interface` - * 6. SIGINT - inherited from `readline.Interface` - * 7. SIGTSTP - inherited from `readline.Interface` - * 8. exit - * 9. reset - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "close", listener: () => void): this; - addListener(event: "line", listener: (input: string) => void): this; - addListener(event: "pause", listener: () => void): this; - addListener(event: "resume", listener: () => void): this; - addListener(event: "SIGCONT", listener: () => void): this; - addListener(event: "SIGINT", listener: () => void): this; - addListener(event: "SIGTSTP", listener: () => void): this; - addListener(event: "exit", listener: () => void): this; - addListener(event: "reset", listener: (context: Context) => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "close"): boolean; - emit(event: "line", input: string): boolean; - emit(event: "pause"): boolean; - emit(event: "resume"): boolean; - emit(event: "SIGCONT"): boolean; - emit(event: "SIGINT"): boolean; - emit(event: "SIGTSTP"): boolean; - emit(event: "exit"): boolean; - emit(event: "reset", context: Context): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "close", listener: () => void): this; - on(event: "line", listener: (input: string) => void): this; - on(event: "pause", listener: () => void): this; - on(event: "resume", listener: () => void): this; - on(event: "SIGCONT", listener: () => void): this; - on(event: "SIGINT", listener: () => void): this; - on(event: "SIGTSTP", listener: () => void): this; - on(event: "exit", listener: () => void): this; - on(event: "reset", listener: (context: Context) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "line", listener: (input: string) => void): this; - once(event: "pause", listener: () => void): this; - once(event: "resume", listener: () => void): this; - once(event: "SIGCONT", listener: () => void): this; - once(event: "SIGINT", listener: () => void): this; - once(event: "SIGTSTP", listener: () => void): this; - once(event: "exit", listener: () => void): this; - once(event: "reset", listener: (context: Context) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "line", listener: (input: string) => void): this; - prependListener(event: "pause", listener: () => void): this; - prependListener(event: "resume", listener: () => void): this; - prependListener(event: "SIGCONT", listener: () => void): this; - prependListener(event: "SIGINT", listener: () => void): this; - prependListener(event: "SIGTSTP", listener: () => void): this; - prependListener(event: "exit", listener: () => void): this; - prependListener(event: "reset", listener: (context: Context) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "line", listener: (input: string) => void): this; - prependOnceListener(event: "pause", listener: () => void): this; - prependOnceListener(event: "resume", listener: () => void): this; - prependOnceListener(event: "SIGCONT", listener: () => void): this; - prependOnceListener(event: "SIGINT", listener: () => void): this; - prependOnceListener(event: "SIGTSTP", listener: () => void): this; - prependOnceListener(event: "exit", listener: () => void): this; - prependOnceListener(event: "reset", listener: (context: Context) => void): this; - } - /** - * A flag passed in the REPL options. Evaluates expressions in sloppy mode. - */ - const REPL_MODE_SLOPPY: unique symbol; - /** - * A flag passed in the REPL options. Evaluates expressions in strict mode. - * This is equivalent to prefacing every repl statement with `'use strict'`. - */ - const REPL_MODE_STRICT: unique symbol; - /** - * The `repl.start()` method creates and starts a {@link REPLServer} instance. - * - * If `options` is a string, then it specifies the input prompt: - * - * ```js - * import repl from 'node:repl'; - * - * // a Unix style prompt - * repl.start('$ '); - * ``` - * @since v0.1.91 - */ - function start(options?: string | ReplOptions): REPLServer; - /** - * Indicates a recoverable error that a `REPLServer` can use to support multi-line input. - * - * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_recoverable_errors - */ - class Recoverable extends SyntaxError { - err: Error; - constructor(err: Error); - } -} -declare module "node:repl" { - export * from "repl"; -} diff --git a/node_modules/@types/node/sea.d.ts b/node_modules/@types/node/sea.d.ts deleted file mode 100644 index 6f1d1ea..0000000 --- a/node_modules/@types/node/sea.d.ts +++ /dev/null @@ -1,153 +0,0 @@ -/** - * This feature allows the distribution of a Node.js application conveniently to a - * system that does not have Node.js installed. - * - * Node.js supports the creation of [single executable applications](https://github.com/nodejs/single-executable) by allowing - * the injection of a blob prepared by Node.js, which can contain a bundled script, - * into the `node` binary. During start up, the program checks if anything has been - * injected. If the blob is found, it executes the script in the blob. Otherwise - * Node.js operates as it normally does. - * - * The single executable application feature currently only supports running a - * single embedded script using the `CommonJS` module system. - * - * Users can create a single executable application from their bundled script - * with the `node` binary itself and any tool which can inject resources into the - * binary. - * - * Here are the steps for creating a single executable application using one such - * tool, [postject](https://github.com/nodejs/postject): - * - * 1. Create a JavaScript file: - * ```bash - * echo 'console.log(`Hello, ${process.argv[2]}!`);' > hello.js - * ``` - * 2. Create a configuration file building a blob that can be injected into the - * single executable application (see `Generating single executable preparation blobs` for details): - * ```bash - * echo '{ "main": "hello.js", "output": "sea-prep.blob" }' > sea-config.json - * ``` - * 3. Generate the blob to be injected: - * ```bash - * node --experimental-sea-config sea-config.json - * ``` - * 4. Create a copy of the `node` executable and name it according to your needs: - * * On systems other than Windows: - * ```bash - * cp $(command -v node) hello - * ``` - * * On Windows: - * ```text - * node -e "require('fs').copyFileSync(process.execPath, 'hello.exe')" - * ``` - * The `.exe` extension is necessary. - * 5. Remove the signature of the binary (macOS and Windows only): - * * On macOS: - * ```bash - * codesign --remove-signature hello - * ``` - * * On Windows (optional): - * [signtool](https://learn.microsoft.com/en-us/windows/win32/seccrypto/signtool) can be used from the installed [Windows SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/). - * If this step is - * skipped, ignore any signature-related warning from postject. - * ```powershell - * signtool remove /s hello.exe - * ``` - * 6. Inject the blob into the copied binary by running `postject` with - * the following options: - * * `hello` / `hello.exe` \- The name of the copy of the `node` executable - * created in step 4. - * * `NODE_SEA_BLOB` \- The name of the resource / note / section in the binary - * where the contents of the blob will be stored. - * * `sea-prep.blob` \- The name of the blob created in step 1. - * * `--sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2` \- The [fuse](https://www.electronjs.org/docs/latest/tutorial/fuses) used by the Node.js project to detect if a file has been - * injected. - * * `--macho-segment-name NODE_SEA` (only needed on macOS) - The name of the - * segment in the binary where the contents of the blob will be - * stored. - * To summarize, here is the required command for each platform: - * * On Linux: - * ```bash - * npx postject hello NODE_SEA_BLOB sea-prep.blob \ - * --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 - * ``` - * * On Windows - PowerShell: - * ```powershell - * npx postject hello.exe NODE_SEA_BLOB sea-prep.blob ` - * --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 - * ``` - * * On Windows - Command Prompt: - * ```text - * npx postject hello.exe NODE_SEA_BLOB sea-prep.blob ^ - * --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 - * ``` - * * On macOS: - * ```bash - * npx postject hello NODE_SEA_BLOB sea-prep.blob \ - * --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 \ - * --macho-segment-name NODE_SEA - * ``` - * 7. Sign the binary (macOS and Windows only): - * * On macOS: - * ```bash - * codesign --sign - hello - * ``` - * * On Windows (optional): - * A certificate needs to be present for this to work. However, the unsigned - * binary would still be runnable. - * ```powershell - * signtool sign /fd SHA256 hello.exe - * ``` - * 8. Run the binary: - * * On systems other than Windows - * ```console - * $ ./hello world - * Hello, world! - * ``` - * * On Windows - * ```console - * $ .\hello.exe world - * Hello, world! - * ``` - * @since v19.7.0, v18.16.0 - * @experimental - * @see [source](https://github.com/nodejs/node/blob/v20.12.0/src/node_sea.cc) - */ -declare module "node:sea" { - type AssetKey = string; - /** - * @since v20.12.0 - * @return Whether this script is running inside a single-executable application. - */ - function isSea(): boolean; - /** - * This method can be used to retrieve the assets configured to be bundled into the - * single-executable application at build time. - * An error is thrown when no matching asset can be found. - * @since v20.12.0 - */ - function getAsset(key: AssetKey): ArrayBuffer; - function getAsset(key: AssetKey, encoding: string): string; - /** - * Similar to `sea.getAsset()`, but returns the result in a [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob). - * An error is thrown when no matching asset can be found. - * @since v20.12.0 - */ - function getAssetAsBlob(key: AssetKey, options?: { - type: string; - }): Blob; - /** - * This method can be used to retrieve the assets configured to be bundled into the - * single-executable application at build time. - * An error is thrown when no matching asset can be found. - * - * Unlike `sea.getRawAsset()` or `sea.getAssetAsBlob()`, this method does not - * return a copy. Instead, it returns the raw asset bundled inside the executable. - * - * For now, users should avoid writing to the returned array buffer. If the - * injected section is not marked as writable or not aligned properly, - * writes to the returned array buffer is likely to result in a crash. - * @since v20.12.0 - */ - function getRawAsset(key: AssetKey): string | ArrayBuffer; -} diff --git a/node_modules/@types/node/stream.d.ts b/node_modules/@types/node/stream.d.ts deleted file mode 100644 index 9d13d1b..0000000 --- a/node_modules/@types/node/stream.d.ts +++ /dev/null @@ -1,1675 +0,0 @@ -/** - * A stream is an abstract interface for working with streaming data in Node.js. - * The `node:stream` module provides an API for implementing the stream interface. - * - * There are many stream objects provided by Node.js. For instance, a [request to an HTTP server](https://nodejs.org/docs/latest-v20.x/api/http.html#class-httpincomingmessage) - * and [`process.stdout`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstdout) are both stream instances. - * - * Streams can be readable, writable, or both. All streams are instances of [`EventEmitter`](https://nodejs.org/docs/latest-v20.x/api/events.html#class-eventemitter). - * - * To access the `node:stream` module: - * - * ```js - * import stream from 'node:stream'; - * ``` - * - * The `node:stream` module is useful for creating new types of stream instances. - * It is usually not necessary to use the `node:stream` module to consume streams. - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/stream.js) - */ -declare module "stream" { - import { Abortable, EventEmitter } from "node:events"; - import { Blob as NodeBlob } from "node:buffer"; - import * as streamPromises from "node:stream/promises"; - import * as streamWeb from "node:stream/web"; - - type ComposeFnParam = (source: any) => void; - - class Stream extends EventEmitter { - pipe( - destination: T, - options?: { - end?: boolean | undefined; - }, - ): T; - compose( - stream: T | ComposeFnParam | Iterable | AsyncIterable, - options?: { signal: AbortSignal }, - ): T; - } - namespace Stream { - export { Stream, streamPromises as promises }; - } - namespace Stream { - interface StreamOptions extends Abortable { - emitClose?: boolean | undefined; - highWaterMark?: number | undefined; - objectMode?: boolean | undefined; - construct?: ((this: T, callback: (error?: Error | null) => void) => void) | undefined; - destroy?: ((this: T, error: Error | null, callback: (error?: Error | null) => void) => void) | undefined; - autoDestroy?: boolean | undefined; - } - interface ReadableOptions extends StreamOptions { - encoding?: BufferEncoding | undefined; - read?: ((this: T, size: number) => void) | undefined; - } - interface ArrayOptions { - /** - * The maximum concurrent invocations of `fn` to call on the stream at once. - * @default 1 - */ - concurrency?: number | undefined; - /** Allows destroying the stream if the signal is aborted. */ - signal?: AbortSignal | undefined; - } - /** - * @since v0.9.4 - */ - class Readable extends Stream implements NodeJS.ReadableStream { - /** - * A utility method for creating Readable Streams out of iterators. - * @since v12.3.0, v10.17.0 - * @param iterable Object implementing the `Symbol.asyncIterator` or `Symbol.iterator` iterable protocol. Emits an 'error' event if a null value is passed. - * @param options Options provided to `new stream.Readable([options])`. By default, `Readable.from()` will set `options.objectMode` to `true`, unless this is explicitly opted out by setting `options.objectMode` to `false`. - */ - static from(iterable: Iterable | AsyncIterable, options?: ReadableOptions): Readable; - /** - * A utility method for creating a `Readable` from a web `ReadableStream`. - * @since v17.0.0 - * @experimental - */ - static fromWeb( - readableStream: streamWeb.ReadableStream, - options?: Pick, - ): Readable; - /** - * A utility method for creating a web `ReadableStream` from a `Readable`. - * @since v17.0.0 - * @experimental - */ - static toWeb( - streamReadable: Readable, - options?: { - strategy?: streamWeb.QueuingStrategy | undefined; - }, - ): streamWeb.ReadableStream; - /** - * Returns whether the stream has been read from or cancelled. - * @since v16.8.0 - */ - static isDisturbed(stream: Readable | NodeJS.ReadableStream): boolean; - /** - * Returns whether the stream was destroyed or errored before emitting `'end'`. - * @since v16.8.0 - * @experimental - */ - readonly readableAborted: boolean; - /** - * Is `true` if it is safe to call {@link read}, which means - * the stream has not been destroyed or emitted `'error'` or `'end'`. - * @since v11.4.0 - */ - readable: boolean; - /** - * Returns whether `'data'` has been emitted. - * @since v16.7.0, v14.18.0 - * @experimental - */ - readonly readableDidRead: boolean; - /** - * Getter for the property `encoding` of a given `Readable` stream. The `encoding` property can be set using the {@link setEncoding} method. - * @since v12.7.0 - */ - readonly readableEncoding: BufferEncoding | null; - /** - * Becomes `true` when [`'end'`](https://nodejs.org/docs/latest-v20.x/api/stream.html#event-end) event is emitted. - * @since v12.9.0 - */ - readonly readableEnded: boolean; - /** - * This property reflects the current state of a `Readable` stream as described - * in the [Three states](https://nodejs.org/docs/latest-v20.x/api/stream.html#three-states) section. - * @since v9.4.0 - */ - readonly readableFlowing: boolean | null; - /** - * Returns the value of `highWaterMark` passed when creating this `Readable`. - * @since v9.3.0 - */ - readonly readableHighWaterMark: number; - /** - * This property contains the number of bytes (or objects) in the queue - * ready to be read. The value provides introspection data regarding - * the status of the `highWaterMark`. - * @since v9.4.0 - */ - readonly readableLength: number; - /** - * Getter for the property `objectMode` of a given `Readable` stream. - * @since v12.3.0 - */ - readonly readableObjectMode: boolean; - /** - * Is `true` after `readable.destroy()` has been called. - * @since v8.0.0 - */ - destroyed: boolean; - /** - * Is `true` after `'close'` has been emitted. - * @since v18.0.0 - */ - readonly closed: boolean; - /** - * Returns error if the stream has been destroyed with an error. - * @since v18.0.0 - */ - readonly errored: Error | null; - constructor(opts?: ReadableOptions); - _construct?(callback: (error?: Error | null) => void): void; - _read(size: number): void; - /** - * The `readable.read()` method reads data out of the internal buffer and - * returns it. If no data is available to be read, `null` is returned. By default, - * the data is returned as a `Buffer` object unless an encoding has been - * specified using the `readable.setEncoding()` method or the stream is operating - * in object mode. - * - * The optional `size` argument specifies a specific number of bytes to read. If - * `size` bytes are not available to be read, `null` will be returned _unless_ the - * stream has ended, in which case all of the data remaining in the internal buffer - * will be returned. - * - * If the `size` argument is not specified, all of the data contained in the - * internal buffer will be returned. - * - * The `size` argument must be less than or equal to 1 GiB. - * - * The `readable.read()` method should only be called on `Readable` streams - * operating in paused mode. In flowing mode, `readable.read()` is called - * automatically until the internal buffer is fully drained. - * - * ```js - * const readable = getReadableStreamSomehow(); - * - * // 'readable' may be triggered multiple times as data is buffered in - * readable.on('readable', () => { - * let chunk; - * console.log('Stream is readable (new data received in buffer)'); - * // Use a loop to make sure we read all currently available data - * while (null !== (chunk = readable.read())) { - * console.log(`Read ${chunk.length} bytes of data...`); - * } - * }); - * - * // 'end' will be triggered once when there is no more data available - * readable.on('end', () => { - * console.log('Reached end of stream.'); - * }); - * ``` - * - * Each call to `readable.read()` returns a chunk of data, or `null`. The chunks - * are not concatenated. A `while` loop is necessary to consume all data - * currently in the buffer. When reading a large file `.read()` may return `null`, - * having consumed all buffered content so far, but there is still more data to - * come not yet buffered. In this case a new `'readable'` event will be emitted - * when there is more data in the buffer. Finally the `'end'` event will be - * emitted when there is no more data to come. - * - * Therefore to read a file's whole contents from a `readable`, it is necessary - * to collect chunks across multiple `'readable'` events: - * - * ```js - * const chunks = []; - * - * readable.on('readable', () => { - * let chunk; - * while (null !== (chunk = readable.read())) { - * chunks.push(chunk); - * } - * }); - * - * readable.on('end', () => { - * const content = chunks.join(''); - * }); - * ``` - * - * A `Readable` stream in object mode will always return a single item from - * a call to `readable.read(size)`, regardless of the value of the `size` argument. - * - * If the `readable.read()` method returns a chunk of data, a `'data'` event will - * also be emitted. - * - * Calling {@link read} after the `'end'` event has - * been emitted will return `null`. No runtime error will be raised. - * @since v0.9.4 - * @param size Optional argument to specify how much data to read. - */ - read(size?: number): any; - /** - * The `readable.setEncoding()` method sets the character encoding for - * data read from the `Readable` stream. - * - * By default, no encoding is assigned and stream data will be returned as `Buffer` objects. Setting an encoding causes the stream data - * to be returned as strings of the specified encoding rather than as `Buffer` objects. For instance, calling `readable.setEncoding('utf8')` will cause the - * output data to be interpreted as UTF-8 data, and passed as strings. Calling `readable.setEncoding('hex')` will cause the data to be encoded in hexadecimal - * string format. - * - * The `Readable` stream will properly handle multi-byte characters delivered - * through the stream that would otherwise become improperly decoded if simply - * pulled from the stream as `Buffer` objects. - * - * ```js - * const readable = getReadableStreamSomehow(); - * readable.setEncoding('utf8'); - * readable.on('data', (chunk) => { - * assert.equal(typeof chunk, 'string'); - * console.log('Got %d characters of string data:', chunk.length); - * }); - * ``` - * @since v0.9.4 - * @param encoding The encoding to use. - */ - setEncoding(encoding: BufferEncoding): this; - /** - * The `readable.pause()` method will cause a stream in flowing mode to stop - * emitting `'data'` events, switching out of flowing mode. Any data that - * becomes available will remain in the internal buffer. - * - * ```js - * const readable = getReadableStreamSomehow(); - * readable.on('data', (chunk) => { - * console.log(`Received ${chunk.length} bytes of data.`); - * readable.pause(); - * console.log('There will be no additional data for 1 second.'); - * setTimeout(() => { - * console.log('Now data will start flowing again.'); - * readable.resume(); - * }, 1000); - * }); - * ``` - * - * The `readable.pause()` method has no effect if there is a `'readable'` event listener. - * @since v0.9.4 - */ - pause(): this; - /** - * The `readable.resume()` method causes an explicitly paused `Readable` stream to - * resume emitting `'data'` events, switching the stream into flowing mode. - * - * The `readable.resume()` method can be used to fully consume the data from a - * stream without actually processing any of that data: - * - * ```js - * getReadableStreamSomehow() - * .resume() - * .on('end', () => { - * console.log('Reached the end, but did not read anything.'); - * }); - * ``` - * - * The `readable.resume()` method has no effect if there is a `'readable'` event listener. - * @since v0.9.4 - */ - resume(): this; - /** - * The `readable.isPaused()` method returns the current operating state of the `Readable`. - * This is used primarily by the mechanism that underlies the `readable.pipe()` method. - * In most typical cases, there will be no reason to use this method directly. - * - * ```js - * const readable = new stream.Readable(); - * - * readable.isPaused(); // === false - * readable.pause(); - * readable.isPaused(); // === true - * readable.resume(); - * readable.isPaused(); // === false - * ``` - * @since v0.11.14 - */ - isPaused(): boolean; - /** - * The `readable.unpipe()` method detaches a `Writable` stream previously attached - * using the {@link pipe} method. - * - * If the `destination` is not specified, then _all_ pipes are detached. - * - * If the `destination` is specified, but no pipe is set up for it, then - * the method does nothing. - * - * ```js - * import fs from 'node:fs'; - * const readable = getReadableStreamSomehow(); - * const writable = fs.createWriteStream('file.txt'); - * // All the data from readable goes into 'file.txt', - * // but only for the first second. - * readable.pipe(writable); - * setTimeout(() => { - * console.log('Stop writing to file.txt.'); - * readable.unpipe(writable); - * console.log('Manually close the file stream.'); - * writable.end(); - * }, 1000); - * ``` - * @since v0.9.4 - * @param destination Optional specific stream to unpipe - */ - unpipe(destination?: NodeJS.WritableStream): this; - /** - * Passing `chunk` as `null` signals the end of the stream (EOF) and behaves the - * same as `readable.push(null)`, after which no more data can be written. The EOF - * signal is put at the end of the buffer and any buffered data will still be - * flushed. - * - * The `readable.unshift()` method pushes a chunk of data back into the internal - * buffer. This is useful in certain situations where a stream is being consumed by - * code that needs to "un-consume" some amount of data that it has optimistically - * pulled out of the source, so that the data can be passed on to some other party. - * - * The `stream.unshift(chunk)` method cannot be called after the `'end'` event - * has been emitted or a runtime error will be thrown. - * - * Developers using `stream.unshift()` often should consider switching to - * use of a `Transform` stream instead. See the `API for stream implementers` section for more information. - * - * ```js - * // Pull off a header delimited by \n\n. - * // Use unshift() if we get too much. - * // Call the callback with (error, header, stream). - * import { StringDecoder } from 'node:string_decoder'; - * function parseHeader(stream, callback) { - * stream.on('error', callback); - * stream.on('readable', onReadable); - * const decoder = new StringDecoder('utf8'); - * let header = ''; - * function onReadable() { - * let chunk; - * while (null !== (chunk = stream.read())) { - * const str = decoder.write(chunk); - * if (str.includes('\n\n')) { - * // Found the header boundary. - * const split = str.split(/\n\n/); - * header += split.shift(); - * const remaining = split.join('\n\n'); - * const buf = Buffer.from(remaining, 'utf8'); - * stream.removeListener('error', callback); - * // Remove the 'readable' listener before unshifting. - * stream.removeListener('readable', onReadable); - * if (buf.length) - * stream.unshift(buf); - * // Now the body of the message can be read from the stream. - * callback(null, header, stream); - * return; - * } - * // Still reading the header. - * header += str; - * } - * } - * } - * ``` - * - * Unlike {@link push}, `stream.unshift(chunk)` will not - * end the reading process by resetting the internal reading state of the stream. - * This can cause unexpected results if `readable.unshift()` is called during a - * read (i.e. from within a {@link _read} implementation on a - * custom stream). Following the call to `readable.unshift()` with an immediate {@link push} will reset the reading state appropriately, - * however it is best to simply avoid calling `readable.unshift()` while in the - * process of performing a read. - * @since v0.9.11 - * @param chunk Chunk of data to unshift onto the read queue. For streams not operating in object mode, `chunk` must - * be a {string}, {Buffer}, {TypedArray}, {DataView} or `null`. For object mode streams, `chunk` may be any JavaScript value. - * @param encoding Encoding of string chunks. Must be a valid `Buffer` encoding, such as `'utf8'` or `'ascii'`. - */ - unshift(chunk: any, encoding?: BufferEncoding): void; - /** - * Prior to Node.js 0.10, streams did not implement the entire `node:stream` module API as it is currently defined. (See `Compatibility` for more - * information.) - * - * When using an older Node.js library that emits `'data'` events and has a {@link pause} method that is advisory only, the `readable.wrap()` method can be used to create a `Readable` - * stream that uses - * the old stream as its data source. - * - * It will rarely be necessary to use `readable.wrap()` but the method has been - * provided as a convenience for interacting with older Node.js applications and - * libraries. - * - * ```js - * import { OldReader } from './old-api-module.js'; - * import { Readable } from 'node:stream'; - * const oreader = new OldReader(); - * const myReader = new Readable().wrap(oreader); - * - * myReader.on('readable', () => { - * myReader.read(); // etc. - * }); - * ``` - * @since v0.9.4 - * @param stream An "old style" readable stream - */ - wrap(stream: NodeJS.ReadableStream): this; - push(chunk: any, encoding?: BufferEncoding): boolean; - /** - * The iterator created by this method gives users the option to cancel the destruction - * of the stream if the `for await...of` loop is exited by `return`, `break`, or `throw`, - * or if the iterator should destroy the stream if the stream emitted an error during iteration. - * @since v16.3.0 - * @param options.destroyOnReturn When set to `false`, calling `return` on the async iterator, - * or exiting a `for await...of` iteration using a `break`, `return`, or `throw` will not destroy the stream. - * **Default: `true`**. - */ - iterator(options?: { destroyOnReturn?: boolean }): NodeJS.AsyncIterator; - /** - * This method allows mapping over the stream. The *fn* function will be called for every chunk in the stream. - * If the *fn* function returns a promise - that promise will be `await`ed before being passed to the result stream. - * @since v17.4.0, v16.14.0 - * @param fn a function to map over every chunk in the stream. Async or not. - * @returns a stream mapped with the function *fn*. - */ - map(fn: (data: any, options?: Pick) => any, options?: ArrayOptions): Readable; - /** - * This method allows filtering the stream. For each chunk in the stream the *fn* function will be called - * and if it returns a truthy value, the chunk will be passed to the result stream. - * If the *fn* function returns a promise - that promise will be `await`ed. - * @since v17.4.0, v16.14.0 - * @param fn a function to filter chunks from the stream. Async or not. - * @returns a stream filtered with the predicate *fn*. - */ - filter( - fn: (data: any, options?: Pick) => boolean | Promise, - options?: ArrayOptions, - ): Readable; - /** - * This method allows iterating a stream. For each chunk in the stream the *fn* function will be called. - * If the *fn* function returns a promise - that promise will be `await`ed. - * - * This method is different from `for await...of` loops in that it can optionally process chunks concurrently. - * In addition, a `forEach` iteration can only be stopped by having passed a `signal` option - * and aborting the related AbortController while `for await...of` can be stopped with `break` or `return`. - * In either case the stream will be destroyed. - * - * This method is different from listening to the `'data'` event in that it uses the `readable` event - * in the underlying machinary and can limit the number of concurrent *fn* calls. - * @since v17.5.0 - * @param fn a function to call on each chunk of the stream. Async or not. - * @returns a promise for when the stream has finished. - */ - forEach( - fn: (data: any, options?: Pick) => void | Promise, - options?: ArrayOptions, - ): Promise; - /** - * This method allows easily obtaining the contents of a stream. - * - * As this method reads the entire stream into memory, it negates the benefits of streams. It's intended - * for interoperability and convenience, not as the primary way to consume streams. - * @since v17.5.0 - * @returns a promise containing an array with the contents of the stream. - */ - toArray(options?: Pick): Promise; - /** - * This method is similar to `Array.prototype.some` and calls *fn* on each chunk in the stream - * until the awaited return value is `true` (or any truthy value). Once an *fn* call on a chunk - * `await`ed return value is truthy, the stream is destroyed and the promise is fulfilled with `true`. - * If none of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `false`. - * @since v17.5.0 - * @param fn a function to call on each chunk of the stream. Async or not. - * @returns a promise evaluating to `true` if *fn* returned a truthy value for at least one of the chunks. - */ - some( - fn: (data: any, options?: Pick) => boolean | Promise, - options?: ArrayOptions, - ): Promise; - /** - * This method is similar to `Array.prototype.find` and calls *fn* on each chunk in the stream - * to find a chunk with a truthy value for *fn*. Once an *fn* call's awaited return value is truthy, - * the stream is destroyed and the promise is fulfilled with value for which *fn* returned a truthy value. - * If all of the *fn* calls on the chunks return a falsy value, the promise is fulfilled with `undefined`. - * @since v17.5.0 - * @param fn a function to call on each chunk of the stream. Async or not. - * @returns a promise evaluating to the first chunk for which *fn* evaluated with a truthy value, - * or `undefined` if no element was found. - */ - find( - fn: (data: any, options?: Pick) => data is T, - options?: ArrayOptions, - ): Promise; - find( - fn: (data: any, options?: Pick) => boolean | Promise, - options?: ArrayOptions, - ): Promise; - /** - * This method is similar to `Array.prototype.every` and calls *fn* on each chunk in the stream - * to check if all awaited return values are truthy value for *fn*. Once an *fn* call on a chunk - * `await`ed return value is falsy, the stream is destroyed and the promise is fulfilled with `false`. - * If all of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `true`. - * @since v17.5.0 - * @param fn a function to call on each chunk of the stream. Async or not. - * @returns a promise evaluating to `true` if *fn* returned a truthy value for every one of the chunks. - */ - every( - fn: (data: any, options?: Pick) => boolean | Promise, - options?: ArrayOptions, - ): Promise; - /** - * This method returns a new stream by applying the given callback to each chunk of the stream - * and then flattening the result. - * - * It is possible to return a stream or another iterable or async iterable from *fn* and the result streams - * will be merged (flattened) into the returned stream. - * @since v17.5.0 - * @param fn a function to map over every chunk in the stream. May be async. May be a stream or generator. - * @returns a stream flat-mapped with the function *fn*. - */ - flatMap(fn: (data: any, options?: Pick) => any, options?: ArrayOptions): Readable; - /** - * This method returns a new stream with the first *limit* chunks dropped from the start. - * @since v17.5.0 - * @param limit the number of chunks to drop from the readable. - * @returns a stream with *limit* chunks dropped from the start. - */ - drop(limit: number, options?: Pick): Readable; - /** - * This method returns a new stream with the first *limit* chunks. - * @since v17.5.0 - * @param limit the number of chunks to take from the readable. - * @returns a stream with *limit* chunks taken. - */ - take(limit: number, options?: Pick): Readable; - /** - * This method returns a new stream with chunks of the underlying stream paired with a counter - * in the form `[index, chunk]`. The first index value is `0` and it increases by 1 for each chunk produced. - * @since v17.5.0 - * @returns a stream of indexed pairs. - */ - asIndexedPairs(options?: Pick): Readable; - /** - * This method calls *fn* on each chunk of the stream in order, passing it the result from the calculation - * on the previous element. It returns a promise for the final value of the reduction. - * - * If no *initial* value is supplied the first chunk of the stream is used as the initial value. - * If the stream is empty, the promise is rejected with a `TypeError` with the `ERR_INVALID_ARGS` code property. - * - * The reducer function iterates the stream element-by-element which means that there is no *concurrency* parameter - * or parallelism. To perform a reduce concurrently, you can extract the async function to `readable.map` method. - * @since v17.5.0 - * @param fn a reducer function to call over every chunk in the stream. Async or not. - * @param initial the initial value to use in the reduction. - * @returns a promise for the final value of the reduction. - */ - reduce( - fn: (previous: any, data: any, options?: Pick) => T, - initial?: undefined, - options?: Pick, - ): Promise; - reduce( - fn: (previous: T, data: any, options?: Pick) => T, - initial: T, - options?: Pick, - ): Promise; - _destroy(error: Error | null, callback: (error?: Error | null) => void): void; - /** - * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'` event (unless `emitClose` is set to `false`). After this call, the readable - * stream will release any internal resources and subsequent calls to `push()` will be ignored. - * - * Once `destroy()` has been called any further calls will be a no-op and no - * further errors except from `_destroy()` may be emitted as `'error'`. - * - * Implementors should not override this method, but instead implement `readable._destroy()`. - * @since v8.0.0 - * @param error Error which will be passed as payload in `'error'` event - */ - destroy(error?: Error): this; - /** - * Event emitter - * The defined events on documents including: - * 1. close - * 2. data - * 3. end - * 4. error - * 5. pause - * 6. readable - * 7. resume - */ - addListener(event: "close", listener: () => void): this; - addListener(event: "data", listener: (chunk: any) => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "pause", listener: () => void): this; - addListener(event: "readable", listener: () => void): this; - addListener(event: "resume", listener: () => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit(event: "close"): boolean; - emit(event: "data", chunk: any): boolean; - emit(event: "end"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "pause"): boolean; - emit(event: "readable"): boolean; - emit(event: "resume"): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on(event: "close", listener: () => void): this; - on(event: "data", listener: (chunk: any) => void): this; - on(event: "end", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "pause", listener: () => void): this; - on(event: "readable", listener: () => void): this; - on(event: "resume", listener: () => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "data", listener: (chunk: any) => void): this; - once(event: "end", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "pause", listener: () => void): this; - once(event: "readable", listener: () => void): this; - once(event: "resume", listener: () => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "data", listener: (chunk: any) => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "pause", listener: () => void): this; - prependListener(event: "readable", listener: () => void): this; - prependListener(event: "resume", listener: () => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "data", listener: (chunk: any) => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "pause", listener: () => void): this; - prependOnceListener(event: "readable", listener: () => void): this; - prependOnceListener(event: "resume", listener: () => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - removeListener(event: "close", listener: () => void): this; - removeListener(event: "data", listener: (chunk: any) => void): this; - removeListener(event: "end", listener: () => void): this; - removeListener(event: "error", listener: (err: Error) => void): this; - removeListener(event: "pause", listener: () => void): this; - removeListener(event: "readable", listener: () => void): this; - removeListener(event: "resume", listener: () => void): this; - removeListener(event: string | symbol, listener: (...args: any[]) => void): this; - [Symbol.asyncIterator](): NodeJS.AsyncIterator; - /** - * Calls `readable.destroy()` with an `AbortError` and returns a promise that fulfills when the stream is finished. - * @since v20.4.0 - */ - [Symbol.asyncDispose](): Promise; - } - interface WritableOptions extends StreamOptions { - decodeStrings?: boolean | undefined; - defaultEncoding?: BufferEncoding | undefined; - write?: - | (( - this: T, - chunk: any, - encoding: BufferEncoding, - callback: (error?: Error | null) => void, - ) => void) - | undefined; - writev?: - | (( - this: T, - chunks: Array<{ - chunk: any; - encoding: BufferEncoding; - }>, - callback: (error?: Error | null) => void, - ) => void) - | undefined; - final?: ((this: T, callback: (error?: Error | null) => void) => void) | undefined; - } - /** - * @since v0.9.4 - */ - class Writable extends Stream implements NodeJS.WritableStream { - /** - * A utility method for creating a `Writable` from a web `WritableStream`. - * @since v17.0.0 - * @experimental - */ - static fromWeb( - writableStream: streamWeb.WritableStream, - options?: Pick, - ): Writable; - /** - * A utility method for creating a web `WritableStream` from a `Writable`. - * @since v17.0.0 - * @experimental - */ - static toWeb(streamWritable: Writable): streamWeb.WritableStream; - /** - * Is `true` if it is safe to call `writable.write()`, which means - * the stream has not been destroyed, errored, or ended. - * @since v11.4.0 - */ - readonly writable: boolean; - /** - * Returns whether the stream was destroyed or errored before emitting `'finish'`. - * @since v18.0.0, v16.17.0 - * @experimental - */ - readonly writableAborted: boolean; - /** - * Is `true` after `writable.end()` has been called. This property - * does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead. - * @since v12.9.0 - */ - readonly writableEnded: boolean; - /** - * Is set to `true` immediately before the `'finish'` event is emitted. - * @since v12.6.0 - */ - readonly writableFinished: boolean; - /** - * Return the value of `highWaterMark` passed when creating this `Writable`. - * @since v9.3.0 - */ - readonly writableHighWaterMark: number; - /** - * This property contains the number of bytes (or objects) in the queue - * ready to be written. The value provides introspection data regarding - * the status of the `highWaterMark`. - * @since v9.4.0 - */ - readonly writableLength: number; - /** - * Getter for the property `objectMode` of a given `Writable` stream. - * @since v12.3.0 - */ - readonly writableObjectMode: boolean; - /** - * Number of times `writable.uncork()` needs to be - * called in order to fully uncork the stream. - * @since v13.2.0, v12.16.0 - */ - readonly writableCorked: number; - /** - * Is `true` after `writable.destroy()` has been called. - * @since v8.0.0 - */ - destroyed: boolean; - /** - * Is `true` after `'close'` has been emitted. - * @since v18.0.0 - */ - readonly closed: boolean; - /** - * Returns error if the stream has been destroyed with an error. - * @since v18.0.0 - */ - readonly errored: Error | null; - /** - * Is `true` if the stream's buffer has been full and stream will emit `'drain'`. - * @since v15.2.0, v14.17.0 - */ - readonly writableNeedDrain: boolean; - constructor(opts?: WritableOptions); - _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void; - _writev?( - chunks: Array<{ - chunk: any; - encoding: BufferEncoding; - }>, - callback: (error?: Error | null) => void, - ): void; - _construct?(callback: (error?: Error | null) => void): void; - _destroy(error: Error | null, callback: (error?: Error | null) => void): void; - _final(callback: (error?: Error | null) => void): void; - /** - * The `writable.write()` method writes some data to the stream, and calls the - * supplied `callback` once the data has been fully handled. If an error - * occurs, the `callback` will be called with the error as its - * first argument. The `callback` is called asynchronously and before `'error'` is - * emitted. - * - * The return value is `true` if the internal buffer is less than the `highWaterMark` configured when the stream was created after admitting `chunk`. - * If `false` is returned, further attempts to write data to the stream should - * stop until the `'drain'` event is emitted. - * - * While a stream is not draining, calls to `write()` will buffer `chunk`, and - * return false. Once all currently buffered chunks are drained (accepted for - * delivery by the operating system), the `'drain'` event will be emitted. - * Once `write()` returns false, do not write more chunks - * until the `'drain'` event is emitted. While calling `write()` on a stream that - * is not draining is allowed, Node.js will buffer all written chunks until - * maximum memory usage occurs, at which point it will abort unconditionally. - * Even before it aborts, high memory usage will cause poor garbage collector - * performance and high RSS (which is not typically released back to the system, - * even after the memory is no longer required). Since TCP sockets may never - * drain if the remote peer does not read the data, writing a socket that is - * not draining may lead to a remotely exploitable vulnerability. - * - * Writing data while the stream is not draining is particularly - * problematic for a `Transform`, because the `Transform` streams are paused - * by default until they are piped or a `'data'` or `'readable'` event handler - * is added. - * - * If the data to be written can be generated or fetched on demand, it is - * recommended to encapsulate the logic into a `Readable` and use {@link pipe}. However, if calling `write()` is preferred, it is - * possible to respect backpressure and avoid memory issues using the `'drain'` event: - * - * ```js - * function write(data, cb) { - * if (!stream.write(data)) { - * stream.once('drain', cb); - * } else { - * process.nextTick(cb); - * } - * } - * - * // Wait for cb to be called before doing any other write. - * write('hello', () => { - * console.log('Write completed, do more writes now.'); - * }); - * ``` - * - * A `Writable` stream in object mode will always ignore the `encoding` argument. - * @since v0.9.4 - * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer}, - * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`. - * @param [encoding='utf8'] The encoding, if `chunk` is a string. - * @param callback Callback for when this chunk of data is flushed. - * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - write(chunk: any, callback?: (error: Error | null | undefined) => void): boolean; - write(chunk: any, encoding: BufferEncoding, callback?: (error: Error | null | undefined) => void): boolean; - /** - * The `writable.setDefaultEncoding()` method sets the default `encoding` for a `Writable` stream. - * @since v0.11.15 - * @param encoding The new default encoding - */ - setDefaultEncoding(encoding: BufferEncoding): this; - /** - * Calling the `writable.end()` method signals that no more data will be written - * to the `Writable`. The optional `chunk` and `encoding` arguments allow one - * final additional chunk of data to be written immediately before closing the - * stream. - * - * Calling the {@link write} method after calling {@link end} will raise an error. - * - * ```js - * // Write 'hello, ' and then end with 'world!'. - * import fs from 'node:fs'; - * const file = fs.createWriteStream('example.txt'); - * file.write('hello, '); - * file.end('world!'); - * // Writing more now is not allowed! - * ``` - * @since v0.9.4 - * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer}, - * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`. - * @param encoding The encoding if `chunk` is a string - * @param callback Callback for when the stream is finished. - */ - end(cb?: () => void): this; - end(chunk: any, cb?: () => void): this; - end(chunk: any, encoding: BufferEncoding, cb?: () => void): this; - /** - * The `writable.cork()` method forces all written data to be buffered in memory. - * The buffered data will be flushed when either the {@link uncork} or {@link end} methods are called. - * - * The primary intent of `writable.cork()` is to accommodate a situation in which - * several small chunks are written to the stream in rapid succession. Instead of - * immediately forwarding them to the underlying destination, `writable.cork()` buffers all the chunks until `writable.uncork()` is called, which will pass them - * all to `writable._writev()`, if present. This prevents a head-of-line blocking - * situation where data is being buffered while waiting for the first small chunk - * to be processed. However, use of `writable.cork()` without implementing `writable._writev()` may have an adverse effect on throughput. - * - * See also: `writable.uncork()`, `writable._writev()`. - * @since v0.11.2 - */ - cork(): void; - /** - * The `writable.uncork()` method flushes all data buffered since {@link cork} was called. - * - * When using `writable.cork()` and `writable.uncork()` to manage the buffering - * of writes to a stream, defer calls to `writable.uncork()` using `process.nextTick()`. Doing so allows batching of all `writable.write()` calls that occur within a given Node.js event - * loop phase. - * - * ```js - * stream.cork(); - * stream.write('some '); - * stream.write('data '); - * process.nextTick(() => stream.uncork()); - * ``` - * - * If the `writable.cork()` method is called multiple times on a stream, the - * same number of calls to `writable.uncork()` must be called to flush the buffered - * data. - * - * ```js - * stream.cork(); - * stream.write('some '); - * stream.cork(); - * stream.write('data '); - * process.nextTick(() => { - * stream.uncork(); - * // The data will not be flushed until uncork() is called a second time. - * stream.uncork(); - * }); - * ``` - * - * See also: `writable.cork()`. - * @since v0.11.2 - */ - uncork(): void; - /** - * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'` event (unless `emitClose` is set to `false`). After this call, the writable - * stream has ended and subsequent calls to `write()` or `end()` will result in - * an `ERR_STREAM_DESTROYED` error. - * This is a destructive and immediate way to destroy a stream. Previous calls to `write()` may not have drained, and may trigger an `ERR_STREAM_DESTROYED` error. - * Use `end()` instead of destroy if data should flush before close, or wait for - * the `'drain'` event before destroying the stream. - * - * Once `destroy()` has been called any further calls will be a no-op and no - * further errors except from `_destroy()` may be emitted as `'error'`. - * - * Implementors should not override this method, - * but instead implement `writable._destroy()`. - * @since v8.0.0 - * @param error Optional, an error to emit with `'error'` event. - */ - destroy(error?: Error): this; - /** - * Event emitter - * The defined events on documents including: - * 1. close - * 2. drain - * 3. error - * 4. finish - * 5. pipe - * 6. unpipe - */ - addListener(event: "close", listener: () => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "finish", listener: () => void): this; - addListener(event: "pipe", listener: (src: Readable) => void): this; - addListener(event: "unpipe", listener: (src: Readable) => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit(event: "close"): boolean; - emit(event: "drain"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "finish"): boolean; - emit(event: "pipe", src: Readable): boolean; - emit(event: "unpipe", src: Readable): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on(event: "close", listener: () => void): this; - on(event: "drain", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "finish", listener: () => void): this; - on(event: "pipe", listener: (src: Readable) => void): this; - on(event: "unpipe", listener: (src: Readable) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "drain", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "finish", listener: () => void): this; - once(event: "pipe", listener: (src: Readable) => void): this; - once(event: "unpipe", listener: (src: Readable) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "finish", listener: () => void): this; - prependListener(event: "pipe", listener: (src: Readable) => void): this; - prependListener(event: "unpipe", listener: (src: Readable) => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "finish", listener: () => void): this; - prependOnceListener(event: "pipe", listener: (src: Readable) => void): this; - prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - removeListener(event: "close", listener: () => void): this; - removeListener(event: "drain", listener: () => void): this; - removeListener(event: "error", listener: (err: Error) => void): this; - removeListener(event: "finish", listener: () => void): this; - removeListener(event: "pipe", listener: (src: Readable) => void): this; - removeListener(event: "unpipe", listener: (src: Readable) => void): this; - removeListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - interface DuplexOptions extends ReadableOptions, WritableOptions { - allowHalfOpen?: boolean | undefined; - readableObjectMode?: boolean | undefined; - writableObjectMode?: boolean | undefined; - readableHighWaterMark?: number | undefined; - writableHighWaterMark?: number | undefined; - writableCorked?: number | undefined; - } - /** - * Duplex streams are streams that implement both the `Readable` and `Writable` interfaces. - * - * Examples of `Duplex` streams include: - * - * * `TCP sockets` - * * `zlib streams` - * * `crypto streams` - * @since v0.9.4 - */ - class Duplex extends Stream implements NodeJS.ReadWriteStream { - /** - * If `false` then the stream will automatically end the writable side when the - * readable side ends. Set initially by the `allowHalfOpen` constructor option, - * which defaults to `true`. - * - * This can be changed manually to change the half-open behavior of an existing - * `Duplex` stream instance, but must be changed before the `'end'` event is emitted. - * @since v0.9.4 - */ - allowHalfOpen: boolean; - constructor(opts?: DuplexOptions); - /** - * A utility method for creating duplex streams. - * - * - `Stream` converts writable stream into writable `Duplex` and readable stream - * to `Duplex`. - * - `Blob` converts into readable `Duplex`. - * - `string` converts into readable `Duplex`. - * - `ArrayBuffer` converts into readable `Duplex`. - * - `AsyncIterable` converts into a readable `Duplex`. Cannot yield `null`. - * - `AsyncGeneratorFunction` converts into a readable/writable transform - * `Duplex`. Must take a source `AsyncIterable` as first parameter. Cannot yield - * `null`. - * - `AsyncFunction` converts into a writable `Duplex`. Must return - * either `null` or `undefined` - * - `Object ({ writable, readable })` converts `readable` and - * `writable` into `Stream` and then combines them into `Duplex` where the - * `Duplex` will write to the `writable` and read from the `readable`. - * - `Promise` converts into readable `Duplex`. Value `null` is ignored. - * - * @since v16.8.0 - */ - static from( - src: - | Stream - | NodeBlob - | ArrayBuffer - | string - | Iterable - | AsyncIterable - | AsyncGeneratorFunction - | Promise - | Object, - ): Duplex; - /** - * A utility method for creating a web `ReadableStream` and `WritableStream` from a `Duplex`. - * @since v17.0.0 - * @experimental - */ - static toWeb(streamDuplex: Duplex): { - readable: streamWeb.ReadableStream; - writable: streamWeb.WritableStream; - }; - /** - * A utility method for creating a `Duplex` from a web `ReadableStream` and `WritableStream`. - * @since v17.0.0 - * @experimental - */ - static fromWeb( - duplexStream: { - readable: streamWeb.ReadableStream; - writable: streamWeb.WritableStream; - }, - options?: Pick< - DuplexOptions, - "allowHalfOpen" | "decodeStrings" | "encoding" | "highWaterMark" | "objectMode" | "signal" - >, - ): Duplex; - /** - * Event emitter - * The defined events on documents including: - * 1. close - * 2. data - * 3. drain - * 4. end - * 5. error - * 6. finish - * 7. pause - * 8. pipe - * 9. readable - * 10. resume - * 11. unpipe - */ - addListener(event: "close", listener: () => void): this; - addListener(event: "data", listener: (chunk: any) => void): this; - addListener(event: "drain", listener: () => void): this; - addListener(event: "end", listener: () => void): this; - addListener(event: "error", listener: (err: Error) => void): this; - addListener(event: "finish", listener: () => void): this; - addListener(event: "pause", listener: () => void): this; - addListener(event: "pipe", listener: (src: Readable) => void): this; - addListener(event: "readable", listener: () => void): this; - addListener(event: "resume", listener: () => void): this; - addListener(event: "unpipe", listener: (src: Readable) => void): this; - addListener(event: string | symbol, listener: (...args: any[]) => void): this; - emit(event: "close"): boolean; - emit(event: "data", chunk: any): boolean; - emit(event: "drain"): boolean; - emit(event: "end"): boolean; - emit(event: "error", err: Error): boolean; - emit(event: "finish"): boolean; - emit(event: "pause"): boolean; - emit(event: "pipe", src: Readable): boolean; - emit(event: "readable"): boolean; - emit(event: "resume"): boolean; - emit(event: "unpipe", src: Readable): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on(event: "close", listener: () => void): this; - on(event: "data", listener: (chunk: any) => void): this; - on(event: "drain", listener: () => void): this; - on(event: "end", listener: () => void): this; - on(event: "error", listener: (err: Error) => void): this; - on(event: "finish", listener: () => void): this; - on(event: "pause", listener: () => void): this; - on(event: "pipe", listener: (src: Readable) => void): this; - on(event: "readable", listener: () => void): this; - on(event: "resume", listener: () => void): this; - on(event: "unpipe", listener: (src: Readable) => void): this; - on(event: string | symbol, listener: (...args: any[]) => void): this; - once(event: "close", listener: () => void): this; - once(event: "data", listener: (chunk: any) => void): this; - once(event: "drain", listener: () => void): this; - once(event: "end", listener: () => void): this; - once(event: "error", listener: (err: Error) => void): this; - once(event: "finish", listener: () => void): this; - once(event: "pause", listener: () => void): this; - once(event: "pipe", listener: (src: Readable) => void): this; - once(event: "readable", listener: () => void): this; - once(event: "resume", listener: () => void): this; - once(event: "unpipe", listener: (src: Readable) => void): this; - once(event: string | symbol, listener: (...args: any[]) => void): this; - prependListener(event: "close", listener: () => void): this; - prependListener(event: "data", listener: (chunk: any) => void): this; - prependListener(event: "drain", listener: () => void): this; - prependListener(event: "end", listener: () => void): this; - prependListener(event: "error", listener: (err: Error) => void): this; - prependListener(event: "finish", listener: () => void): this; - prependListener(event: "pause", listener: () => void): this; - prependListener(event: "pipe", listener: (src: Readable) => void): this; - prependListener(event: "readable", listener: () => void): this; - prependListener(event: "resume", listener: () => void): this; - prependListener(event: "unpipe", listener: (src: Readable) => void): this; - prependListener(event: string | symbol, listener: (...args: any[]) => void): this; - prependOnceListener(event: "close", listener: () => void): this; - prependOnceListener(event: "data", listener: (chunk: any) => void): this; - prependOnceListener(event: "drain", listener: () => void): this; - prependOnceListener(event: "end", listener: () => void): this; - prependOnceListener(event: "error", listener: (err: Error) => void): this; - prependOnceListener(event: "finish", listener: () => void): this; - prependOnceListener(event: "pause", listener: () => void): this; - prependOnceListener(event: "pipe", listener: (src: Readable) => void): this; - prependOnceListener(event: "readable", listener: () => void): this; - prependOnceListener(event: "resume", listener: () => void): this; - prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this; - prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this; - removeListener(event: "close", listener: () => void): this; - removeListener(event: "data", listener: (chunk: any) => void): this; - removeListener(event: "drain", listener: () => void): this; - removeListener(event: "end", listener: () => void): this; - removeListener(event: "error", listener: (err: Error) => void): this; - removeListener(event: "finish", listener: () => void): this; - removeListener(event: "pause", listener: () => void): this; - removeListener(event: "pipe", listener: (src: Readable) => void): this; - removeListener(event: "readable", listener: () => void): this; - removeListener(event: "resume", listener: () => void): this; - removeListener(event: "unpipe", listener: (src: Readable) => void): this; - removeListener(event: string | symbol, listener: (...args: any[]) => void): this; - } - interface Duplex extends Readable, Writable {} - /** - * The utility function `duplexPair` returns an Array with two items, - * each being a `Duplex` stream connected to the other side: - * - * ```js - * const [ sideA, sideB ] = duplexPair(); - * ``` - * - * Whatever is written to one stream is made readable on the other. It provides - * behavior analogous to a network connection, where the data written by the client - * becomes readable by the server, and vice-versa. - * - * The Duplex streams are symmetrical; one or the other may be used without any - * difference in behavior. - * @param options A value to pass to both {@link Duplex} constructors, - * to set options such as buffering. - * @since v20.17.0 - */ - function duplexPair(options?: DuplexOptions): [Duplex, Duplex]; - type TransformCallback = (error?: Error | null, data?: any) => void; - interface TransformOptions extends DuplexOptions { - transform?: - | ((this: T, chunk: any, encoding: BufferEncoding, callback: TransformCallback) => void) - | undefined; - flush?: ((this: T, callback: TransformCallback) => void) | undefined; - } - /** - * Transform streams are `Duplex` streams where the output is in some way - * related to the input. Like all `Duplex` streams, `Transform` streams - * implement both the `Readable` and `Writable` interfaces. - * - * Examples of `Transform` streams include: - * - * * `zlib streams` - * * `crypto streams` - * @since v0.9.4 - */ - class Transform extends Duplex { - constructor(opts?: TransformOptions); - _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void; - _flush(callback: TransformCallback): void; - } - /** - * The `stream.PassThrough` class is a trivial implementation of a `Transform` stream that simply passes the input bytes across to the output. Its purpose is - * primarily for examples and testing, but there are some use cases where `stream.PassThrough` is useful as a building block for novel sorts of streams. - */ - class PassThrough extends Transform {} - /** - * A stream to attach a signal to. - * - * Attaches an AbortSignal to a readable or writeable stream. This lets code - * control stream destruction using an `AbortController`. - * - * Calling `abort` on the `AbortController` corresponding to the passed `AbortSignal` will behave the same way as calling `.destroy(new AbortError())` on the - * stream, and `controller.error(new AbortError())` for webstreams. - * - * ```js - * import fs from 'node:fs'; - * - * const controller = new AbortController(); - * const read = addAbortSignal( - * controller.signal, - * fs.createReadStream(('object.json')), - * ); - * // Later, abort the operation closing the stream - * controller.abort(); - * ``` - * - * Or using an `AbortSignal` with a readable stream as an async iterable: - * - * ```js - * const controller = new AbortController(); - * setTimeout(() => controller.abort(), 10_000); // set a timeout - * const stream = addAbortSignal( - * controller.signal, - * fs.createReadStream(('object.json')), - * ); - * (async () => { - * try { - * for await (const chunk of stream) { - * await process(chunk); - * } - * } catch (e) { - * if (e.name === 'AbortError') { - * // The operation was cancelled - * } else { - * throw e; - * } - * } - * })(); - * ``` - * - * Or using an `AbortSignal` with a ReadableStream: - * - * ```js - * const controller = new AbortController(); - * const rs = new ReadableStream({ - * start(controller) { - * controller.enqueue('hello'); - * controller.enqueue('world'); - * controller.close(); - * }, - * }); - * - * addAbortSignal(controller.signal, rs); - * - * finished(rs, (err) => { - * if (err) { - * if (err.name === 'AbortError') { - * // The operation was cancelled - * } - * } - * }); - * - * const reader = rs.getReader(); - * - * reader.read().then(({ value, done }) => { - * console.log(value); // hello - * console.log(done); // false - * controller.abort(); - * }); - * ``` - * @since v15.4.0 - * @param signal A signal representing possible cancellation - * @param stream A stream to attach a signal to. - */ - function addAbortSignal(signal: AbortSignal, stream: T): T; - /** - * Returns the default highWaterMark used by streams. - * Defaults to `16384` (16 KiB), or `16` for `objectMode`. - * @since v19.9.0 - */ - function getDefaultHighWaterMark(objectMode: boolean): number; - /** - * Sets the default highWaterMark used by streams. - * @since v19.9.0 - * @param value highWaterMark value - */ - function setDefaultHighWaterMark(objectMode: boolean, value: number): void; - interface FinishedOptions extends Abortable { - error?: boolean | undefined; - readable?: boolean | undefined; - writable?: boolean | undefined; - } - /** - * A readable and/or writable stream/webstream. - * - * A function to get notified when a stream is no longer readable, writable - * or has experienced an error or a premature close event. - * - * ```js - * import { finished } from 'node:stream'; - * import fs from 'node:fs'; - * - * const rs = fs.createReadStream('archive.tar'); - * - * finished(rs, (err) => { - * if (err) { - * console.error('Stream failed.', err); - * } else { - * console.log('Stream is done reading.'); - * } - * }); - * - * rs.resume(); // Drain the stream. - * ``` - * - * Especially useful in error handling scenarios where a stream is destroyed - * prematurely (like an aborted HTTP request), and will not emit `'end'` or `'finish'`. - * - * The `finished` API provides [`promise version`](https://nodejs.org/docs/latest-v20.x/api/stream.html#streamfinishedstream-options). - * - * `stream.finished()` leaves dangling event listeners (in particular `'error'`, `'end'`, `'finish'` and `'close'`) after `callback` has been - * invoked. The reason for this is so that unexpected `'error'` events (due to - * incorrect stream implementations) do not cause unexpected crashes. - * If this is unwanted behavior then the returned cleanup function needs to be - * invoked in the callback: - * - * ```js - * const cleanup = finished(rs, (err) => { - * cleanup(); - * // ... - * }); - * ``` - * @since v10.0.0 - * @param stream A readable and/or writable stream. - * @param callback A callback function that takes an optional error argument. - * @returns A cleanup function which removes all registered listeners. - */ - function finished( - stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, - options: FinishedOptions, - callback: (err?: NodeJS.ErrnoException | null) => void, - ): () => void; - function finished( - stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, - callback: (err?: NodeJS.ErrnoException | null) => void, - ): () => void; - namespace finished { - function __promisify__( - stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, - options?: FinishedOptions, - ): Promise; - } - type PipelineSourceFunction = () => Iterable | AsyncIterable; - type PipelineSource = Iterable | AsyncIterable | NodeJS.ReadableStream | PipelineSourceFunction; - type PipelineTransform, U> = - | NodeJS.ReadWriteStream - | (( - source: S extends (...args: any[]) => Iterable | AsyncIterable ? AsyncIterable - : S, - ) => AsyncIterable); - type PipelineTransformSource = PipelineSource | PipelineTransform; - type PipelineDestinationIterableFunction = (source: AsyncIterable) => AsyncIterable; - type PipelineDestinationPromiseFunction = (source: AsyncIterable) => Promise

; - type PipelineDestination, P> = S extends - PipelineTransformSource ? - | NodeJS.WritableStream - | PipelineDestinationIterableFunction - | PipelineDestinationPromiseFunction - : never; - type PipelineCallback> = S extends - PipelineDestinationPromiseFunction ? (err: NodeJS.ErrnoException | null, value: P) => void - : (err: NodeJS.ErrnoException | null) => void; - type PipelinePromise> = S extends - PipelineDestinationPromiseFunction ? Promise

: Promise; - interface PipelineOptions { - signal?: AbortSignal | undefined; - end?: boolean | undefined; - } - /** - * A module method to pipe between streams and generators forwarding errors and - * properly cleaning up and provide a callback when the pipeline is complete. - * - * ```js - * import { pipeline } from 'node:stream'; - * import fs from 'node:fs'; - * import zlib from 'node:zlib'; - * - * // Use the pipeline API to easily pipe a series of streams - * // together and get notified when the pipeline is fully done. - * - * // A pipeline to gzip a potentially huge tar file efficiently: - * - * pipeline( - * fs.createReadStream('archive.tar'), - * zlib.createGzip(), - * fs.createWriteStream('archive.tar.gz'), - * (err) => { - * if (err) { - * console.error('Pipeline failed.', err); - * } else { - * console.log('Pipeline succeeded.'); - * } - * }, - * ); - * ``` - * - * The `pipeline` API provides a [`promise version`](https://nodejs.org/docs/latest-v20.x/api/stream.html#streampipelinesource-transforms-destination-options). - * - * `stream.pipeline()` will call `stream.destroy(err)` on all streams except: - * - * * `Readable` streams which have emitted `'end'` or `'close'`. - * * `Writable` streams which have emitted `'finish'` or `'close'`. - * - * `stream.pipeline()` leaves dangling event listeners on the streams - * after the `callback` has been invoked. In the case of reuse of streams after - * failure, this can cause event listener leaks and swallowed errors. If the last - * stream is readable, dangling event listeners will be removed so that the last - * stream can be consumed later. - * - * `stream.pipeline()` closes all the streams when an error is raised. - * The `IncomingRequest` usage with `pipeline` could lead to an unexpected behavior - * once it would destroy the socket without sending the expected response. - * See the example below: - * - * ```js - * import fs from 'node:fs'; - * import http from 'node:http'; - * import { pipeline } from 'node:stream'; - * - * const server = http.createServer((req, res) => { - * const fileStream = fs.createReadStream('./fileNotExist.txt'); - * pipeline(fileStream, res, (err) => { - * if (err) { - * console.log(err); // No such file - * // this message can't be sent once `pipeline` already destroyed the socket - * return res.end('error!!!'); - * } - * }); - * }); - * ``` - * @since v10.0.0 - * @param callback Called when the pipeline is fully done. - */ - function pipeline, B extends PipelineDestination>( - source: A, - destination: B, - callback: PipelineCallback, - ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; - function pipeline< - A extends PipelineSource, - T1 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - destination: B, - callback: PipelineCallback, - ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; - function pipeline< - A extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - transform2: T2, - destination: B, - callback: PipelineCallback, - ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; - function pipeline< - A extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - T3 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - transform2: T2, - transform3: T3, - destination: B, - callback: PipelineCallback, - ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; - function pipeline< - A extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - T3 extends PipelineTransform, - T4 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - transform2: T2, - transform3: T3, - transform4: T4, - destination: B, - callback: PipelineCallback, - ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream; - function pipeline( - streams: ReadonlyArray, - callback: (err: NodeJS.ErrnoException | null) => void, - ): NodeJS.WritableStream; - function pipeline( - stream1: NodeJS.ReadableStream, - stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, - ...streams: Array< - NodeJS.ReadWriteStream | NodeJS.WritableStream | ((err: NodeJS.ErrnoException | null) => void) - > - ): NodeJS.WritableStream; - namespace pipeline { - function __promisify__, B extends PipelineDestination>( - source: A, - destination: B, - options?: PipelineOptions, - ): PipelinePromise; - function __promisify__< - A extends PipelineSource, - T1 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - destination: B, - options?: PipelineOptions, - ): PipelinePromise; - function __promisify__< - A extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - transform2: T2, - destination: B, - options?: PipelineOptions, - ): PipelinePromise; - function __promisify__< - A extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - T3 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - transform2: T2, - transform3: T3, - destination: B, - options?: PipelineOptions, - ): PipelinePromise; - function __promisify__< - A extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - T3 extends PipelineTransform, - T4 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - transform2: T2, - transform3: T3, - transform4: T4, - destination: B, - options?: PipelineOptions, - ): PipelinePromise; - function __promisify__( - streams: ReadonlyArray, - options?: PipelineOptions, - ): Promise; - function __promisify__( - stream1: NodeJS.ReadableStream, - stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, - ...streams: Array - ): Promise; - } - // TODO: this interface never existed; remove in next major - interface Pipe { - close(): void; - hasRef(): boolean; - ref(): void; - unref(): void; - } - /** - * Returns whether the stream has encountered an error. - * @since v17.3.0, v16.14.0 - * @experimental - */ - function isErrored(stream: Readable | Writable | NodeJS.ReadableStream | NodeJS.WritableStream): boolean; - /** - * Returns whether the stream is readable. - * @since v17.4.0, v16.14.0 - * @experimental - */ - function isReadable(stream: Readable | NodeJS.ReadableStream): boolean; - } - export = Stream; -} -declare module "node:stream" { - import stream = require("stream"); - export = stream; -} diff --git a/node_modules/@types/node/stream/consumers.d.ts b/node_modules/@types/node/stream/consumers.d.ts deleted file mode 100644 index 05db025..0000000 --- a/node_modules/@types/node/stream/consumers.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * The utility consumer functions provide common options for consuming - * streams. - * @since v16.7.0 - */ -declare module "stream/consumers" { - import { Blob as NodeBlob, NonSharedBuffer } from "node:buffer"; - import { ReadableStream as WebReadableStream } from "node:stream/web"; - /** - * @since v16.7.0 - * @returns Fulfills with an `ArrayBuffer` containing the full contents of the stream. - */ - function arrayBuffer(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; - /** - * @since v16.7.0 - * @returns Fulfills with a `Blob` containing the full contents of the stream. - */ - function blob(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; - /** - * @since v16.7.0 - * @returns Fulfills with a `Buffer` containing the full contents of the stream. - */ - function buffer(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; - /** - * @since v16.7.0 - * @returns Fulfills with the contents of the stream parsed as a - * UTF-8 encoded string that is then passed through `JSON.parse()`. - */ - function json(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; - /** - * @since v16.7.0 - * @returns Fulfills with the contents of the stream parsed as a UTF-8 encoded string. - */ - function text(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable): Promise; -} -declare module "node:stream/consumers" { - export * from "stream/consumers"; -} diff --git a/node_modules/@types/node/stream/promises.d.ts b/node_modules/@types/node/stream/promises.d.ts deleted file mode 100644 index d54c14c..0000000 --- a/node_modules/@types/node/stream/promises.d.ts +++ /dev/null @@ -1,90 +0,0 @@ -declare module "stream/promises" { - import { - FinishedOptions as _FinishedOptions, - PipelineDestination, - PipelineOptions, - PipelinePromise, - PipelineSource, - PipelineTransform, - } from "node:stream"; - interface FinishedOptions extends _FinishedOptions { - /** - * If true, removes the listeners registered by this function before the promise is fulfilled. - * @default false - */ - cleanup?: boolean | undefined; - } - function finished( - stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, - options?: FinishedOptions, - ): Promise; - function pipeline, B extends PipelineDestination>( - source: A, - destination: B, - options?: PipelineOptions, - ): PipelinePromise; - function pipeline< - A extends PipelineSource, - T1 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - destination: B, - options?: PipelineOptions, - ): PipelinePromise; - function pipeline< - A extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - transform2: T2, - destination: B, - options?: PipelineOptions, - ): PipelinePromise; - function pipeline< - A extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - T3 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - transform2: T2, - transform3: T3, - destination: B, - options?: PipelineOptions, - ): PipelinePromise; - function pipeline< - A extends PipelineSource, - T1 extends PipelineTransform, - T2 extends PipelineTransform, - T3 extends PipelineTransform, - T4 extends PipelineTransform, - B extends PipelineDestination, - >( - source: A, - transform1: T1, - transform2: T2, - transform3: T3, - transform4: T4, - destination: B, - options?: PipelineOptions, - ): PipelinePromise; - function pipeline( - streams: ReadonlyArray, - options?: PipelineOptions, - ): Promise; - function pipeline( - stream1: NodeJS.ReadableStream, - stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream, - ...streams: Array - ): Promise; -} -declare module "node:stream/promises" { - export * from "stream/promises"; -} diff --git a/node_modules/@types/node/stream/web.d.ts b/node_modules/@types/node/stream/web.d.ts deleted file mode 100644 index 039ddc9..0000000 --- a/node_modules/@types/node/stream/web.d.ts +++ /dev/null @@ -1,533 +0,0 @@ -type _ByteLengthQueuingStrategy = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").ByteLengthQueuingStrategy; -type _CompressionStream = typeof globalThis extends { onmessage: any; ReportingObserver: any } ? {} - : import("stream/web").CompressionStream; -type _CountQueuingStrategy = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").CountQueuingStrategy; -type _DecompressionStream = typeof globalThis extends { onmessage: any; ReportingObserver: any } ? {} - : import("stream/web").DecompressionStream; -type _QueuingStrategy = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").QueuingStrategy; -type _ReadableByteStreamController = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").ReadableByteStreamController; -type _ReadableStream = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").ReadableStream; -type _ReadableStreamBYOBReader = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").ReadableStreamBYOBReader; -type _ReadableStreamBYOBRequest = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").ReadableStreamBYOBRequest; -type _ReadableStreamDefaultController = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").ReadableStreamDefaultController; -type _ReadableStreamDefaultReader = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").ReadableStreamDefaultReader; -type _TextDecoderStream = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").TextDecoderStream; -type _TextEncoderStream = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").TextEncoderStream; -type _TransformStream = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").TransformStream; -type _TransformStreamDefaultController = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").TransformStreamDefaultController; -type _WritableStream = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").WritableStream; -type _WritableStreamDefaultController = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").WritableStreamDefaultController; -type _WritableStreamDefaultWriter = typeof globalThis extends { onmessage: any } ? {} - : import("stream/web").WritableStreamDefaultWriter; - -declare module "stream/web" { - // stub module, pending copy&paste from .d.ts or manual impl - // copy from lib.dom.d.ts - interface ReadableWritablePair { - readable: ReadableStream; - /** - * Provides a convenient, chainable way of piping this readable stream - * through a transform stream (or any other { writable, readable } - * pair). It simply pipes the stream into the writable side of the - * supplied pair, and returns the readable side for further use. - * - * Piping a stream will lock it for the duration of the pipe, preventing - * any other consumer from acquiring a reader. - */ - writable: WritableStream; - } - interface StreamPipeOptions { - preventAbort?: boolean; - preventCancel?: boolean; - /** - * Pipes this readable stream to a given writable stream destination. - * The way in which the piping process behaves under various error - * conditions can be customized with a number of passed options. It - * returns a promise that fulfills when the piping process completes - * successfully, or rejects if any errors were encountered. - * - * Piping a stream will lock it for the duration of the pipe, preventing - * any other consumer from acquiring a reader. - * - * Errors and closures of the source and destination streams propagate - * as follows: - * - * An error in this source readable stream will abort destination, - * unless preventAbort is truthy. The returned promise will be rejected - * with the source's error, or with any error that occurs during - * aborting the destination. - * - * An error in destination will cancel this source readable stream, - * unless preventCancel is truthy. The returned promise will be rejected - * with the destination's error, or with any error that occurs during - * canceling the source. - * - * When this source readable stream closes, destination will be closed, - * unless preventClose is truthy. The returned promise will be fulfilled - * once this process completes, unless an error is encountered while - * closing the destination, in which case it will be rejected with that - * error. - * - * If destination starts out closed or closing, this source readable - * stream will be canceled, unless preventCancel is true. The returned - * promise will be rejected with an error indicating piping to a closed - * stream failed, or with any error that occurs during canceling the - * source. - * - * The signal option can be set to an AbortSignal to allow aborting an - * ongoing pipe operation via the corresponding AbortController. In this - * case, this source readable stream will be canceled, and destination - * aborted, unless the respective options preventCancel or preventAbort - * are set. - */ - preventClose?: boolean; - signal?: AbortSignal; - } - interface ReadableStreamGenericReader { - readonly closed: Promise; - cancel(reason?: any): Promise; - } - type ReadableStreamController = ReadableStreamDefaultController; - interface ReadableStreamReadValueResult { - done: false; - value: T; - } - interface ReadableStreamReadDoneResult { - done: true; - value?: T; - } - type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableStreamReadDoneResult; - interface ReadableByteStreamControllerCallback { - (controller: ReadableByteStreamController): void | PromiseLike; - } - interface UnderlyingSinkAbortCallback { - (reason?: any): void | PromiseLike; - } - interface UnderlyingSinkCloseCallback { - (): void | PromiseLike; - } - interface UnderlyingSinkStartCallback { - (controller: WritableStreamDefaultController): any; - } - interface UnderlyingSinkWriteCallback { - (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike; - } - interface UnderlyingSourceCancelCallback { - (reason?: any): void | PromiseLike; - } - interface UnderlyingSourcePullCallback { - (controller: ReadableStreamController): void | PromiseLike; - } - interface UnderlyingSourceStartCallback { - (controller: ReadableStreamController): any; - } - interface TransformerFlushCallback { - (controller: TransformStreamDefaultController): void | PromiseLike; - } - interface TransformerStartCallback { - (controller: TransformStreamDefaultController): any; - } - interface TransformerTransformCallback { - (chunk: I, controller: TransformStreamDefaultController): void | PromiseLike; - } - interface UnderlyingByteSource { - autoAllocateChunkSize?: number; - cancel?: ReadableStreamErrorCallback; - pull?: ReadableByteStreamControllerCallback; - start?: ReadableByteStreamControllerCallback; - type: "bytes"; - } - interface UnderlyingSource { - cancel?: UnderlyingSourceCancelCallback; - pull?: UnderlyingSourcePullCallback; - start?: UnderlyingSourceStartCallback; - type?: undefined; - } - interface UnderlyingSink { - abort?: UnderlyingSinkAbortCallback; - close?: UnderlyingSinkCloseCallback; - start?: UnderlyingSinkStartCallback; - type?: undefined; - write?: UnderlyingSinkWriteCallback; - } - interface ReadableStreamErrorCallback { - (reason: any): void | PromiseLike; - } - interface ReadableStreamAsyncIterator extends NodeJS.AsyncIterator { - [Symbol.asyncIterator](): ReadableStreamAsyncIterator; - } - /** This Streams API interface represents a readable stream of byte data. */ - interface ReadableStream { - readonly locked: boolean; - cancel(reason?: any): Promise; - getReader(options: { mode: "byob" }): ReadableStreamBYOBReader; - getReader(): ReadableStreamDefaultReader; - getReader(options?: ReadableStreamGetReaderOptions): ReadableStreamReader; - pipeThrough(transform: ReadableWritablePair, options?: StreamPipeOptions): ReadableStream; - pipeTo(destination: WritableStream, options?: StreamPipeOptions): Promise; - tee(): [ReadableStream, ReadableStream]; - values(options?: { preventCancel?: boolean }): ReadableStreamAsyncIterator; - [Symbol.asyncIterator](): ReadableStreamAsyncIterator; - } - const ReadableStream: { - prototype: ReadableStream; - from(iterable: Iterable | AsyncIterable): ReadableStream; - new(underlyingSource: UnderlyingByteSource, strategy?: QueuingStrategy): ReadableStream; - new(underlyingSource?: UnderlyingSource, strategy?: QueuingStrategy): ReadableStream; - }; - type ReadableStreamReaderMode = "byob"; - interface ReadableStreamGetReaderOptions { - /** - * Creates a ReadableStreamBYOBReader and locks the stream to the new reader. - * - * This call behaves the same way as the no-argument variant, except that it only works on readable byte streams, i.e. streams which were constructed specifically with the ability to handle "bring your own buffer" reading. The returned BYOB reader provides the ability to directly read individual chunks from the stream via its read() method, into developer-supplied buffers, allowing more precise control over allocation. - */ - mode?: ReadableStreamReaderMode; - } - type ReadableStreamReader = ReadableStreamDefaultReader | ReadableStreamBYOBReader; - interface ReadableStreamDefaultReader extends ReadableStreamGenericReader { - read(): Promise>; - releaseLock(): void; - } - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) */ - interface ReadableStreamBYOBReader extends ReadableStreamGenericReader { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) */ - read( - view: T, - options?: { - min?: number; - }, - ): Promise>; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) */ - releaseLock(): void; - } - const ReadableStreamDefaultReader: { - prototype: ReadableStreamDefaultReader; - new(stream: ReadableStream): ReadableStreamDefaultReader; - }; - const ReadableStreamBYOBReader: { - prototype: ReadableStreamBYOBReader; - new(stream: ReadableStream): ReadableStreamBYOBReader; - }; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */ - interface ReadableStreamBYOBRequest { - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */ - readonly view: ArrayBufferView | null; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */ - respond(bytesWritten: number): void; - /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */ - respondWithNewView(view: ArrayBufferView): void; - } - const ReadableStreamBYOBRequest: { - prototype: ReadableStreamBYOBRequest; - new(): ReadableStreamBYOBRequest; - }; - interface ReadableByteStreamController { - readonly byobRequest: ReadableStreamBYOBRequest | null; - readonly desiredSize: number | null; - close(): void; - enqueue(chunk: ArrayBufferView): void; - error(error?: any): void; - } - const ReadableByteStreamController: { - prototype: ReadableByteStreamController; - new(): ReadableByteStreamController; - }; - interface ReadableStreamDefaultController { - readonly desiredSize: number | null; - close(): void; - enqueue(chunk?: R): void; - error(e?: any): void; - } - const ReadableStreamDefaultController: { - prototype: ReadableStreamDefaultController; - new(): ReadableStreamDefaultController; - }; - interface Transformer { - flush?: TransformerFlushCallback; - readableType?: undefined; - start?: TransformerStartCallback; - transform?: TransformerTransformCallback; - writableType?: undefined; - } - interface TransformStream { - readonly readable: ReadableStream; - readonly writable: WritableStream; - } - const TransformStream: { - prototype: TransformStream; - new( - transformer?: Transformer, - writableStrategy?: QueuingStrategy, - readableStrategy?: QueuingStrategy, - ): TransformStream; - }; - interface TransformStreamDefaultController { - readonly desiredSize: number | null; - enqueue(chunk?: O): void; - error(reason?: any): void; - terminate(): void; - } - const TransformStreamDefaultController: { - prototype: TransformStreamDefaultController; - new(): TransformStreamDefaultController; - }; - /** - * This Streams API interface provides a standard abstraction for writing - * streaming data to a destination, known as a sink. This object comes with - * built-in back pressure and queuing. - */ - interface WritableStream { - readonly locked: boolean; - abort(reason?: any): Promise; - close(): Promise; - getWriter(): WritableStreamDefaultWriter; - } - const WritableStream: { - prototype: WritableStream; - new(underlyingSink?: UnderlyingSink, strategy?: QueuingStrategy): WritableStream; - }; - /** - * This Streams API interface is the object returned by - * WritableStream.getWriter() and once created locks the < writer to the - * WritableStream ensuring that no other streams can write to the underlying - * sink. - */ - interface WritableStreamDefaultWriter { - readonly closed: Promise; - readonly desiredSize: number | null; - readonly ready: Promise; - abort(reason?: any): Promise; - close(): Promise; - releaseLock(): void; - write(chunk?: W): Promise; - } - const WritableStreamDefaultWriter: { - prototype: WritableStreamDefaultWriter; - new(stream: WritableStream): WritableStreamDefaultWriter; - }; - /** - * This Streams API interface represents a controller allowing control of a - * WritableStream's state. When constructing a WritableStream, the - * underlying sink is given a corresponding WritableStreamDefaultController - * instance to manipulate. - */ - interface WritableStreamDefaultController { - error(e?: any): void; - } - const WritableStreamDefaultController: { - prototype: WritableStreamDefaultController; - new(): WritableStreamDefaultController; - }; - interface QueuingStrategy { - highWaterMark?: number; - size?: QueuingStrategySize; - } - interface QueuingStrategySize { - (chunk?: T): number; - } - interface QueuingStrategyInit { - /** - * Creates a new ByteLengthQueuingStrategy with the provided high water - * mark. - * - * Note that the provided high water mark will not be validated ahead of - * time. Instead, if it is negative, NaN, or not a number, the resulting - * ByteLengthQueuingStrategy will cause the corresponding stream - * constructor to throw. - */ - highWaterMark: number; - } - /** - * This Streams API interface provides a built-in byte length queuing - * strategy that can be used when constructing streams. - */ - interface ByteLengthQueuingStrategy extends QueuingStrategy { - readonly highWaterMark: number; - readonly size: QueuingStrategySize; - } - const ByteLengthQueuingStrategy: { - prototype: ByteLengthQueuingStrategy; - new(init: QueuingStrategyInit): ByteLengthQueuingStrategy; - }; - /** - * This Streams API interface provides a built-in byte length queuing - * strategy that can be used when constructing streams. - */ - interface CountQueuingStrategy extends QueuingStrategy { - readonly highWaterMark: number; - readonly size: QueuingStrategySize; - } - const CountQueuingStrategy: { - prototype: CountQueuingStrategy; - new(init: QueuingStrategyInit): CountQueuingStrategy; - }; - interface TextEncoderStream { - /** Returns "utf-8". */ - readonly encoding: "utf-8"; - readonly readable: ReadableStream; - readonly writable: WritableStream; - readonly [Symbol.toStringTag]: string; - } - const TextEncoderStream: { - prototype: TextEncoderStream; - new(): TextEncoderStream; - }; - interface TextDecoderOptions { - fatal?: boolean; - ignoreBOM?: boolean; - } - type BufferSource = ArrayBufferView | ArrayBuffer; - interface TextDecoderStream { - /** Returns encoding's name, lower cased. */ - readonly encoding: string; - /** Returns `true` if error mode is "fatal", and `false` otherwise. */ - readonly fatal: boolean; - /** Returns `true` if ignore BOM flag is set, and `false` otherwise. */ - readonly ignoreBOM: boolean; - readonly readable: ReadableStream; - readonly writable: WritableStream; - readonly [Symbol.toStringTag]: string; - } - const TextDecoderStream: { - prototype: TextDecoderStream; - new(encoding?: string, options?: TextDecoderOptions): TextDecoderStream; - }; - interface CompressionStream { - readonly readable: ReadableStream; - readonly writable: WritableStream; - } - const CompressionStream: { - prototype: CompressionStream; - new(format: "deflate" | "deflate-raw" | "gzip"): CompressionStream; - }; - interface DecompressionStream { - readonly writable: WritableStream; - readonly readable: ReadableStream; - } - const DecompressionStream: { - prototype: DecompressionStream; - new(format: "deflate" | "deflate-raw" | "gzip"): DecompressionStream; - }; - - global { - interface ByteLengthQueuingStrategy extends _ByteLengthQueuingStrategy {} - var ByteLengthQueuingStrategy: typeof globalThis extends { onmessage: any; ByteLengthQueuingStrategy: infer T } - ? T - : typeof import("stream/web").ByteLengthQueuingStrategy; - - interface CompressionStream extends _CompressionStream {} - var CompressionStream: typeof globalThis extends { - onmessage: any; - // CompressionStream, DecompressionStream and ReportingObserver was introduced in the same commit. - // If ReportingObserver check is removed, the type here will form a circular reference in TS5.0+lib.dom.d.ts - ReportingObserver: any; - CompressionStream: infer T; - } ? T - // TS 4.8, 4.9, 5.0 - : typeof globalThis extends { onmessage: any; TransformStream: { prototype: infer T } } ? { - prototype: T; - new(format: "deflate" | "deflate-raw" | "gzip"): T; - } - : typeof import("stream/web").CompressionStream; - - interface CountQueuingStrategy extends _CountQueuingStrategy {} - var CountQueuingStrategy: typeof globalThis extends { onmessage: any; CountQueuingStrategy: infer T } ? T - : typeof import("stream/web").CountQueuingStrategy; - - interface DecompressionStream extends _DecompressionStream {} - var DecompressionStream: typeof globalThis extends { - onmessage: any; - // CompressionStream, DecompressionStream and ReportingObserver was introduced in the same commit. - // If ReportingObserver check is removed, the type here will form a circular reference in TS5.0+lib.dom.d.ts - ReportingObserver: any; - DecompressionStream: infer T; - } ? T - // TS 4.8, 4.9, 5.0 - : typeof globalThis extends { onmessage: any; TransformStream: { prototype: infer T } } ? { - prototype: T; - new(format: "deflate" | "deflate-raw" | "gzip"): T; - } - : typeof import("stream/web").DecompressionStream; - - interface QueuingStrategy extends _QueuingStrategy {} - - interface ReadableByteStreamController extends _ReadableByteStreamController {} - var ReadableByteStreamController: typeof globalThis extends - { onmessage: any; ReadableByteStreamController: infer T } ? T - : typeof import("stream/web").ReadableByteStreamController; - - interface ReadableStream extends _ReadableStream {} - var ReadableStream: typeof globalThis extends { onmessage: any; ReadableStream: infer T } ? T - : typeof import("stream/web").ReadableStream; - - interface ReadableStreamBYOBReader extends _ReadableStreamBYOBReader {} - var ReadableStreamBYOBReader: typeof globalThis extends { onmessage: any; ReadableStreamBYOBReader: infer T } - ? T - : typeof import("stream/web").ReadableStreamBYOBReader; - - interface ReadableStreamBYOBRequest extends _ReadableStreamBYOBRequest {} - var ReadableStreamBYOBRequest: typeof globalThis extends { onmessage: any; ReadableStreamBYOBRequest: infer T } - ? T - : typeof import("stream/web").ReadableStreamBYOBRequest; - - interface ReadableStreamDefaultController extends _ReadableStreamDefaultController {} - var ReadableStreamDefaultController: typeof globalThis extends - { onmessage: any; ReadableStreamDefaultController: infer T } ? T - : typeof import("stream/web").ReadableStreamDefaultController; - - interface ReadableStreamDefaultReader extends _ReadableStreamDefaultReader {} - var ReadableStreamDefaultReader: typeof globalThis extends - { onmessage: any; ReadableStreamDefaultReader: infer T } ? T - : typeof import("stream/web").ReadableStreamDefaultReader; - - interface TextDecoderStream extends _TextDecoderStream {} - var TextDecoderStream: typeof globalThis extends { onmessage: any; TextDecoderStream: infer T } ? T - : typeof import("stream/web").TextDecoderStream; - - interface TextEncoderStream extends _TextEncoderStream {} - var TextEncoderStream: typeof globalThis extends { onmessage: any; TextEncoderStream: infer T } ? T - : typeof import("stream/web").TextEncoderStream; - - interface TransformStream extends _TransformStream {} - var TransformStream: typeof globalThis extends { onmessage: any; TransformStream: infer T } ? T - : typeof import("stream/web").TransformStream; - - interface TransformStreamDefaultController extends _TransformStreamDefaultController {} - var TransformStreamDefaultController: typeof globalThis extends - { onmessage: any; TransformStreamDefaultController: infer T } ? T - : typeof import("stream/web").TransformStreamDefaultController; - - interface WritableStream extends _WritableStream {} - var WritableStream: typeof globalThis extends { onmessage: any; WritableStream: infer T } ? T - : typeof import("stream/web").WritableStream; - - interface WritableStreamDefaultController extends _WritableStreamDefaultController {} - var WritableStreamDefaultController: typeof globalThis extends - { onmessage: any; WritableStreamDefaultController: infer T } ? T - : typeof import("stream/web").WritableStreamDefaultController; - - interface WritableStreamDefaultWriter extends _WritableStreamDefaultWriter {} - var WritableStreamDefaultWriter: typeof globalThis extends - { onmessage: any; WritableStreamDefaultWriter: infer T } ? T - : typeof import("stream/web").WritableStreamDefaultWriter; - } -} -declare module "node:stream/web" { - export * from "stream/web"; -} diff --git a/node_modules/@types/node/string_decoder.d.ts b/node_modules/@types/node/string_decoder.d.ts deleted file mode 100644 index d08cbf6..0000000 --- a/node_modules/@types/node/string_decoder.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -/** - * The `node:string_decoder` module provides an API for decoding `Buffer` objects - * into strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16 - * characters. It can be accessed using: - * - * ```js - * import { StringDecoder } from 'node:string_decoder'; - * ``` - * - * The following example shows the basic use of the `StringDecoder` class. - * - * ```js - * import { StringDecoder } from 'node:string_decoder'; - * const decoder = new StringDecoder('utf8'); - * - * const cent = Buffer.from([0xC2, 0xA2]); - * console.log(decoder.write(cent)); // Prints: ¢ - * - * const euro = Buffer.from([0xE2, 0x82, 0xAC]); - * console.log(decoder.write(euro)); // Prints: € - * ``` - * - * When a `Buffer` instance is written to the `StringDecoder` instance, an - * internal buffer is used to ensure that the decoded string does not contain - * any incomplete multibyte characters. These are held in the buffer until the - * next call to `stringDecoder.write()` or until `stringDecoder.end()` is called. - * - * In the following example, the three UTF-8 encoded bytes of the European Euro - * symbol (`€`) are written over three separate operations: - * - * ```js - * import { StringDecoder } from 'node:string_decoder'; - * const decoder = new StringDecoder('utf8'); - * - * decoder.write(Buffer.from([0xE2])); - * decoder.write(Buffer.from([0x82])); - * console.log(decoder.end(Buffer.from([0xAC]))); // Prints: € - * ``` - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/string_decoder.js) - */ -declare module "string_decoder" { - class StringDecoder { - constructor(encoding?: BufferEncoding); - /** - * Returns a decoded string, ensuring that any incomplete multibyte characters at - * the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the - * returned string and stored in an internal buffer for the next call to `stringDecoder.write()` or `stringDecoder.end()`. - * @since v0.1.99 - * @param buffer The bytes to decode. - */ - write(buffer: string | NodeJS.ArrayBufferView): string; - /** - * Returns any remaining input stored in the internal buffer as a string. Bytes - * representing incomplete UTF-8 and UTF-16 characters will be replaced with - * substitution characters appropriate for the character encoding. - * - * If the `buffer` argument is provided, one final call to `stringDecoder.write()` is performed before returning the remaining input. - * After `end()` is called, the `stringDecoder` object can be reused for new input. - * @since v0.9.3 - * @param buffer The bytes to decode. - */ - end(buffer?: string | NodeJS.ArrayBufferView): string; - } -} -declare module "node:string_decoder" { - export * from "string_decoder"; -} diff --git a/node_modules/@types/node/test.d.ts b/node_modules/@types/node/test.d.ts deleted file mode 100644 index ec17fdf..0000000 --- a/node_modules/@types/node/test.d.ts +++ /dev/null @@ -1,1787 +0,0 @@ -/** - * The `node:test` module facilitates the creation of JavaScript tests. - * To access it: - * - * ```js - * import test from 'node:test'; - * ``` - * - * This module is only available under the `node:` scheme. The following will not - * work: - * - * ```js - * import test from 'test'; - * ``` - * - * Tests created via the `test` module consist of a single function that is - * processed in one of three ways: - * - * 1. A synchronous function that is considered failing if it throws an exception, - * and is considered passing otherwise. - * 2. A function that returns a `Promise` that is considered failing if the `Promise` rejects, and is considered passing if the `Promise` fulfills. - * 3. A function that receives a callback function. If the callback receives any - * truthy value as its first argument, the test is considered failing. If a - * falsy value is passed as the first argument to the callback, the test is - * considered passing. If the test function receives a callback function and - * also returns a `Promise`, the test will fail. - * - * The following example illustrates how tests are written using the `test` module. - * - * ```js - * test('synchronous passing test', (t) => { - * // This test passes because it does not throw an exception. - * assert.strictEqual(1, 1); - * }); - * - * test('synchronous failing test', (t) => { - * // This test fails because it throws an exception. - * assert.strictEqual(1, 2); - * }); - * - * test('asynchronous passing test', async (t) => { - * // This test passes because the Promise returned by the async - * // function is settled and not rejected. - * assert.strictEqual(1, 1); - * }); - * - * test('asynchronous failing test', async (t) => { - * // This test fails because the Promise returned by the async - * // function is rejected. - * assert.strictEqual(1, 2); - * }); - * - * test('failing test using Promises', (t) => { - * // Promises can be used directly as well. - * return new Promise((resolve, reject) => { - * setImmediate(() => { - * reject(new Error('this will cause the test to fail')); - * }); - * }); - * }); - * - * test('callback passing test', (t, done) => { - * // done() is the callback function. When the setImmediate() runs, it invokes - * // done() with no arguments. - * setImmediate(done); - * }); - * - * test('callback failing test', (t, done) => { - * // When the setImmediate() runs, done() is invoked with an Error object and - * // the test fails. - * setImmediate(() => { - * done(new Error('callback failure')); - * }); - * }); - * ``` - * - * If any tests fail, the process exit code is set to `1`. - * @since v18.0.0, v16.17.0 - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/test.js) - */ -declare module "node:test" { - import { AssertMethodNames } from "node:assert"; - import { Readable } from "node:stream"; - import TestFn = test.TestFn; - import TestOptions = test.TestOptions; - /** - * The `test()` function is the value imported from the `test` module. Each - * invocation of this function results in reporting the test to the `TestsStream`. - * - * The `TestContext` object passed to the `fn` argument can be used to perform - * actions related to the current test. Examples include skipping the test, adding - * additional diagnostic information, or creating subtests. - * - * `test()` returns a `Promise` that fulfills once the test completes. - * if `test()` is called within a suite, it fulfills immediately. - * The return value can usually be discarded for top level tests. - * However, the return value from subtests should be used to prevent the parent - * test from finishing first and cancelling the subtest - * as shown in the following example. - * - * ```js - * test('top level test', async (t) => { - * // The setTimeout() in the following subtest would cause it to outlive its - * // parent test if 'await' is removed on the next line. Once the parent test - * // completes, it will cancel any outstanding subtests. - * await t.test('longer running subtest', async (t) => { - * return new Promise((resolve, reject) => { - * setTimeout(resolve, 1000); - * }); - * }); - * }); - * ``` - * - * The `timeout` option can be used to fail the test if it takes longer than `timeout` milliseconds to complete. However, it is not a reliable mechanism for - * canceling tests because a running test might block the application thread and - * thus prevent the scheduled cancellation. - * @since v18.0.0, v16.17.0 - * @param name The name of the test, which is displayed when reporting test results. - * Defaults to the `name` property of `fn`, or `''` if `fn` does not have a name. - * @param options Configuration options for the test. - * @param fn The function under test. The first argument to this function is a {@link TestContext} object. - * If the test uses callbacks, the callback function is passed as the second argument. - * @return Fulfilled with `undefined` once the test completes, or immediately if the test runs within a suite. - */ - function test(name?: string, fn?: TestFn): Promise; - function test(name?: string, options?: TestOptions, fn?: TestFn): Promise; - function test(options?: TestOptions, fn?: TestFn): Promise; - function test(fn?: TestFn): Promise; - namespace test { - export { test }; - export { suite as describe, test as it }; - } - namespace test { - /** - * **Note:** `shard` is used to horizontally parallelize test running across - * machines or processes, ideal for large-scale executions across varied - * environments. It's incompatible with `watch` mode, tailored for rapid - * code iteration by automatically rerunning tests on file changes. - * - * ```js - * import { tap } from 'node:test/reporters'; - * import { run } from 'node:test'; - * import process from 'node:process'; - * import path from 'node:path'; - * - * run({ files: [path.resolve('./tests/test.js')] }) - * .compose(tap) - * .pipe(process.stdout); - * ``` - * @since v18.9.0, v16.19.0 - * @param options Configuration options for running tests. - */ - function run(options?: RunOptions): TestsStream; - /** - * The `suite()` function is imported from the `node:test` module. - * @param name The name of the suite, which is displayed when reporting test results. - * Defaults to the `name` property of `fn`, or `''` if `fn` does not have a name. - * @param options Configuration options for the suite. This supports the same options as {@link test}. - * @param fn The suite function declaring nested tests and suites. The first argument to this function is a {@link SuiteContext} object. - * @return Immediately fulfilled with `undefined`. - * @since v20.13.0 - */ - function suite(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; - function suite(name?: string, fn?: SuiteFn): Promise; - function suite(options?: TestOptions, fn?: SuiteFn): Promise; - function suite(fn?: SuiteFn): Promise; - namespace suite { - /** - * Shorthand for skipping a suite. This is the same as calling {@link suite} with `options.skip` set to `true`. - * @since v20.13.0 - */ - function skip(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; - function skip(name?: string, fn?: SuiteFn): Promise; - function skip(options?: TestOptions, fn?: SuiteFn): Promise; - function skip(fn?: SuiteFn): Promise; - /** - * Shorthand for marking a suite as `TODO`. This is the same as calling {@link suite} with `options.todo` set to `true`. - * @since v20.13.0 - */ - function todo(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; - function todo(name?: string, fn?: SuiteFn): Promise; - function todo(options?: TestOptions, fn?: SuiteFn): Promise; - function todo(fn?: SuiteFn): Promise; - /** - * Shorthand for marking a suite as `only`. This is the same as calling {@link suite} with `options.only` set to `true`. - * @since v20.13.0 - */ - function only(name?: string, options?: TestOptions, fn?: SuiteFn): Promise; - function only(name?: string, fn?: SuiteFn): Promise; - function only(options?: TestOptions, fn?: SuiteFn): Promise; - function only(fn?: SuiteFn): Promise; - } - /** - * Shorthand for skipping a test. This is the same as calling {@link test} with `options.skip` set to `true`. - * @since v20.2.0 - */ - function skip(name?: string, options?: TestOptions, fn?: TestFn): Promise; - function skip(name?: string, fn?: TestFn): Promise; - function skip(options?: TestOptions, fn?: TestFn): Promise; - function skip(fn?: TestFn): Promise; - /** - * Shorthand for marking a test as `TODO`. This is the same as calling {@link test} with `options.todo` set to `true`. - * @since v20.2.0 - */ - function todo(name?: string, options?: TestOptions, fn?: TestFn): Promise; - function todo(name?: string, fn?: TestFn): Promise; - function todo(options?: TestOptions, fn?: TestFn): Promise; - function todo(fn?: TestFn): Promise; - /** - * Shorthand for marking a test as `only`. This is the same as calling {@link test} with `options.only` set to `true`. - * @since v20.2.0 - */ - function only(name?: string, options?: TestOptions, fn?: TestFn): Promise; - function only(name?: string, fn?: TestFn): Promise; - function only(options?: TestOptions, fn?: TestFn): Promise; - function only(fn?: TestFn): Promise; - /** - * The type of a function passed to {@link test}. The first argument to this function is a {@link TestContext} object. - * If the test uses callbacks, the callback function is passed as the second argument. - */ - type TestFn = (t: TestContext, done: (result?: any) => void) => void | Promise; - /** - * The type of a suite test function. The argument to this function is a {@link SuiteContext} object. - */ - type SuiteFn = (s: SuiteContext) => void | Promise; - interface TestShard { - /** - * A positive integer between 1 and `total` that specifies the index of the shard to run. - */ - index: number; - /** - * A positive integer that specifies the total number of shards to split the test files to. - */ - total: number; - } - interface RunOptions { - /** - * If a number is provided, then that many test processes would run in parallel, where each process corresponds to one test file. - * If `true`, it would run `os.availableParallelism() - 1` test files in parallel. If `false`, it would only run one test file at a time. - * @default false - */ - concurrency?: number | boolean | undefined; - /** - * An array containing the list of files to run. If omitted, files are run according to the - * [test runner execution model](https://nodejs.org/docs/latest-v20.x/api/test.html#test-runner-execution-model). - */ - files?: readonly string[] | undefined; - /** - * Configures the test runner to exit the process once all known - * tests have finished executing even if the event loop would - * otherwise remain active. - * @default false - */ - forceExit?: boolean | undefined; - /** - * Sets inspector port of test child process. - * If a nullish value is provided, each process gets its own port, - * incremented from the primary's `process.debugPort`. - * @default undefined - */ - inspectPort?: number | (() => number) | undefined; - /** - * If truthy, the test context will only run tests that have the `only` option set - */ - only?: boolean | undefined; - /** - * A function that accepts the `TestsStream` instance and can be used to setup listeners before any tests are run. - * @default undefined - */ - setup?: ((reporter: TestsStream) => void | Promise) | undefined; - /** - * Allows aborting an in-progress test execution. - */ - signal?: AbortSignal | undefined; - /** - * If provided, only run tests whose name matches the provided pattern. - * Strings are interpreted as JavaScript regular expressions. - * @default undefined - */ - testNamePatterns?: string | RegExp | ReadonlyArray | undefined; - /** - * The number of milliseconds after which the test execution will fail. - * If unspecified, subtests inherit this value from their parent. - * @default Infinity - */ - timeout?: number | undefined; - /** - * Whether to run in watch mode or not. - * @default false - */ - watch?: boolean | undefined; - /** - * Running tests in a specific shard. - * @default undefined - */ - shard?: TestShard | undefined; - } - /** - * A successful call to `run()` will return a new `TestsStream` object, streaming a series of events representing the execution of the tests. - * - * Some of the events are guaranteed to be emitted in the same order as the tests are defined, while others are emitted in the order that the tests execute. - * @since v18.9.0, v16.19.0 - */ - interface TestsStream extends Readable { - addListener(event: "test:coverage", listener: (data: EventData.TestCoverage) => void): this; - addListener(event: "test:complete", listener: (data: EventData.TestComplete) => void): this; - addListener(event: "test:dequeue", listener: (data: EventData.TestDequeue) => void): this; - addListener(event: "test:diagnostic", listener: (data: EventData.TestDiagnostic) => void): this; - addListener(event: "test:enqueue", listener: (data: EventData.TestEnqueue) => void): this; - addListener(event: "test:fail", listener: (data: EventData.TestFail) => void): this; - addListener(event: "test:pass", listener: (data: EventData.TestPass) => void): this; - addListener(event: "test:plan", listener: (data: EventData.TestPlan) => void): this; - addListener(event: "test:start", listener: (data: EventData.TestStart) => void): this; - addListener(event: "test:stderr", listener: (data: EventData.TestStderr) => void): this; - addListener(event: "test:stdout", listener: (data: EventData.TestStdout) => void): this; - addListener(event: "test:watch:drained", listener: () => void): this; - addListener(event: string, listener: (...args: any[]) => void): this; - emit(event: "test:coverage", data: EventData.TestCoverage): boolean; - emit(event: "test:complete", data: EventData.TestComplete): boolean; - emit(event: "test:dequeue", data: EventData.TestDequeue): boolean; - emit(event: "test:diagnostic", data: EventData.TestDiagnostic): boolean; - emit(event: "test:enqueue", data: EventData.TestEnqueue): boolean; - emit(event: "test:fail", data: EventData.TestFail): boolean; - emit(event: "test:pass", data: EventData.TestPass): boolean; - emit(event: "test:plan", data: EventData.TestPlan): boolean; - emit(event: "test:start", data: EventData.TestStart): boolean; - emit(event: "test:stderr", data: EventData.TestStderr): boolean; - emit(event: "test:stdout", data: EventData.TestStdout): boolean; - emit(event: "test:watch:drained"): boolean; - emit(event: string | symbol, ...args: any[]): boolean; - on(event: "test:coverage", listener: (data: EventData.TestCoverage) => void): this; - on(event: "test:complete", listener: (data: EventData.TestComplete) => void): this; - on(event: "test:dequeue", listener: (data: EventData.TestDequeue) => void): this; - on(event: "test:diagnostic", listener: (data: EventData.TestDiagnostic) => void): this; - on(event: "test:enqueue", listener: (data: EventData.TestEnqueue) => void): this; - on(event: "test:fail", listener: (data: EventData.TestFail) => void): this; - on(event: "test:pass", listener: (data: EventData.TestPass) => void): this; - on(event: "test:plan", listener: (data: EventData.TestPlan) => void): this; - on(event: "test:start", listener: (data: EventData.TestStart) => void): this; - on(event: "test:stderr", listener: (data: EventData.TestStderr) => void): this; - on(event: "test:stdout", listener: (data: EventData.TestStdout) => void): this; - on(event: "test:watch:drained", listener: () => void): this; - on(event: string, listener: (...args: any[]) => void): this; - once(event: "test:coverage", listener: (data: EventData.TestCoverage) => void): this; - once(event: "test:complete", listener: (data: EventData.TestComplete) => void): this; - once(event: "test:dequeue", listener: (data: EventData.TestDequeue) => void): this; - once(event: "test:diagnostic", listener: (data: EventData.TestDiagnostic) => void): this; - once(event: "test:enqueue", listener: (data: EventData.TestEnqueue) => void): this; - once(event: "test:fail", listener: (data: EventData.TestFail) => void): this; - once(event: "test:pass", listener: (data: EventData.TestPass) => void): this; - once(event: "test:plan", listener: (data: EventData.TestPlan) => void): this; - once(event: "test:start", listener: (data: EventData.TestStart) => void): this; - once(event: "test:stderr", listener: (data: EventData.TestStderr) => void): this; - once(event: "test:stdout", listener: (data: EventData.TestStdout) => void): this; - once(event: "test:watch:drained", listener: () => void): this; - once(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "test:coverage", listener: (data: EventData.TestCoverage) => void): this; - prependListener(event: "test:complete", listener: (data: EventData.TestComplete) => void): this; - prependListener(event: "test:dequeue", listener: (data: EventData.TestDequeue) => void): this; - prependListener(event: "test:diagnostic", listener: (data: EventData.TestDiagnostic) => void): this; - prependListener(event: "test:enqueue", listener: (data: EventData.TestEnqueue) => void): this; - prependListener(event: "test:fail", listener: (data: EventData.TestFail) => void): this; - prependListener(event: "test:pass", listener: (data: EventData.TestPass) => void): this; - prependListener(event: "test:plan", listener: (data: EventData.TestPlan) => void): this; - prependListener(event: "test:start", listener: (data: EventData.TestStart) => void): this; - prependListener(event: "test:stderr", listener: (data: EventData.TestStderr) => void): this; - prependListener(event: "test:stdout", listener: (data: EventData.TestStdout) => void): this; - prependListener(event: "test:watch:drained", listener: () => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "test:coverage", listener: (data: EventData.TestCoverage) => void): this; - prependOnceListener(event: "test:complete", listener: (data: EventData.TestComplete) => void): this; - prependOnceListener(event: "test:dequeue", listener: (data: EventData.TestDequeue) => void): this; - prependOnceListener(event: "test:diagnostic", listener: (data: EventData.TestDiagnostic) => void): this; - prependOnceListener(event: "test:enqueue", listener: (data: EventData.TestEnqueue) => void): this; - prependOnceListener(event: "test:fail", listener: (data: EventData.TestFail) => void): this; - prependOnceListener(event: "test:pass", listener: (data: EventData.TestPass) => void): this; - prependOnceListener(event: "test:plan", listener: (data: EventData.TestPlan) => void): this; - prependOnceListener(event: "test:start", listener: (data: EventData.TestStart) => void): this; - prependOnceListener(event: "test:stderr", listener: (data: EventData.TestStderr) => void): this; - prependOnceListener(event: "test:stdout", listener: (data: EventData.TestStdout) => void): this; - prependOnceListener(event: "test:watch:drained", listener: () => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - } - namespace EventData { - interface Error extends globalThis.Error { - cause: globalThis.Error; - } - interface LocationInfo { - /** - * The column number where the test is defined, or - * `undefined` if the test was run through the REPL. - */ - column?: number; - /** - * The path of the test file, `undefined` if test was run through the REPL. - */ - file?: string; - /** - * The line number where the test is defined, or `undefined` if the test was run through the REPL. - */ - line?: number; - } - interface TestDiagnostic extends LocationInfo { - /** - * The diagnostic message. - */ - message: string; - /** - * The nesting level of the test. - */ - nesting: number; - } - interface TestCoverage { - /** - * An object containing the coverage report. - */ - summary: { - /** - * An array of coverage reports for individual files. - */ - files: Array<{ - /** - * The absolute path of the file. - */ - path: string; - /** - * The total number of lines. - */ - totalLineCount: number; - /** - * The total number of branches. - */ - totalBranchCount: number; - /** - * The total number of functions. - */ - totalFunctionCount: number; - /** - * The number of covered lines. - */ - coveredLineCount: number; - /** - * The number of covered branches. - */ - coveredBranchCount: number; - /** - * The number of covered functions. - */ - coveredFunctionCount: number; - /** - * The percentage of lines covered. - */ - coveredLinePercent: number; - /** - * The percentage of branches covered. - */ - coveredBranchPercent: number; - /** - * The percentage of functions covered. - */ - coveredFunctionPercent: number; - /** - * An array of functions representing function coverage. - */ - functions: Array<{ - /** - * The name of the function. - */ - name: string; - /** - * The line number where the function is defined. - */ - line: number; - /** - * The number of times the function was called. - */ - count: number; - }>; - /** - * An array of branches representing branch coverage. - */ - branches: Array<{ - /** - * The line number where the branch is defined. - */ - line: number; - /** - * The number of times the branch was taken. - */ - count: number; - }>; - /** - * An array of lines representing line numbers and the number of times they were covered. - */ - lines: Array<{ - /** - * The line number. - */ - line: number; - /** - * The number of times the line was covered. - */ - count: number; - }>; - }>; - /** - * An object containing a summary of coverage for all files. - */ - totals: { - /** - * The total number of lines. - */ - totalLineCount: number; - /** - * The total number of branches. - */ - totalBranchCount: number; - /** - * The total number of functions. - */ - totalFunctionCount: number; - /** - * The number of covered lines. - */ - coveredLineCount: number; - /** - * The number of covered branches. - */ - coveredBranchCount: number; - /** - * The number of covered functions. - */ - coveredFunctionCount: number; - /** - * The percentage of lines covered. - */ - coveredLinePercent: number; - /** - * The percentage of branches covered. - */ - coveredBranchPercent: number; - /** - * The percentage of functions covered. - */ - coveredFunctionPercent: number; - }; - /** - * The working directory when code coverage began. This - * is useful for displaying relative path names in case - * the tests changed the working directory of the Node.js process. - */ - workingDirectory: string; - }; - /** - * The nesting level of the test. - */ - nesting: number; - } - interface TestComplete extends LocationInfo { - /** - * Additional execution metadata. - */ - details: { - /** - * Whether the test passed or not. - */ - passed: boolean; - /** - * The duration of the test in milliseconds. - */ - duration_ms: number; - /** - * An error wrapping the error thrown by the test if it did not pass. - */ - error?: Error; - /** - * The type of the test, used to denote whether this is a suite. - */ - type?: "suite"; - }; - /** - * The test name. - */ - name: string; - /** - * The nesting level of the test. - */ - nesting: number; - /** - * The ordinal number of the test. - */ - testNumber: number; - /** - * Present if `context.todo` is called. - */ - todo?: string | boolean; - /** - * Present if `context.skip` is called. - */ - skip?: string | boolean; - } - interface TestDequeue extends LocationInfo { - /** - * The test name. - */ - name: string; - /** - * The nesting level of the test. - */ - nesting: number; - } - interface TestEnqueue extends LocationInfo { - /** - * The test name. - */ - name: string; - /** - * The nesting level of the test. - */ - nesting: number; - } - interface TestFail extends LocationInfo { - /** - * Additional execution metadata. - */ - details: { - /** - * The duration of the test in milliseconds. - */ - duration_ms: number; - /** - * An error wrapping the error thrown by the test. - */ - error: Error; - /** - * The type of the test, used to denote whether this is a suite. - * @since v20.0.0, v19.9.0, v18.17.0 - */ - type?: "suite"; - }; - /** - * The test name. - */ - name: string; - /** - * The nesting level of the test. - */ - nesting: number; - /** - * The ordinal number of the test. - */ - testNumber: number; - /** - * Present if `context.todo` is called. - */ - todo?: string | boolean; - /** - * Present if `context.skip` is called. - */ - skip?: string | boolean; - } - interface TestPass extends LocationInfo { - /** - * Additional execution metadata. - */ - details: { - /** - * The duration of the test in milliseconds. - */ - duration_ms: number; - /** - * The type of the test, used to denote whether this is a suite. - * @since 20.0.0, 19.9.0, 18.17.0 - */ - type?: "suite"; - }; - /** - * The test name. - */ - name: string; - /** - * The nesting level of the test. - */ - nesting: number; - /** - * The ordinal number of the test. - */ - testNumber: number; - /** - * Present if `context.todo` is called. - */ - todo?: string | boolean; - /** - * Present if `context.skip` is called. - */ - skip?: string | boolean; - } - interface TestPlan extends LocationInfo { - /** - * The nesting level of the test. - */ - nesting: number; - /** - * The number of subtests that have ran. - */ - count: number; - } - interface TestStart extends LocationInfo { - /** - * The test name. - */ - name: string; - /** - * The nesting level of the test. - */ - nesting: number; - } - interface TestStderr { - /** - * The path of the test file. - */ - file: string; - /** - * The message written to `stderr`. - */ - message: string; - } - interface TestStdout { - /** - * The path of the test file. - */ - file: string; - /** - * The message written to `stdout`. - */ - message: string; - } - } - /** - * An instance of `TestContext` is passed to each test function in order to - * interact with the test runner. However, the `TestContext` constructor is not - * exposed as part of the API. - * @since v18.0.0, v16.17.0 - */ - interface TestContext { - /** - * An object containing assertion methods bound to the test context. - * The top-level functions from the `node:assert` module are exposed here for the purpose of creating test plans. - * - * **Note:** Some of the functions from `node:assert` contain type assertions. If these are called via the - * TestContext `assert` object, then the context parameter in the test's function signature **must be explicitly typed** - * (ie. the parameter must have a type annotation), otherwise an error will be raised by the TypeScript compiler: - * ```ts - * import { test, type TestContext } from 'node:test'; - * - * // The test function's context parameter must have a type annotation. - * test('example', (t: TestContext) => { - * t.assert.deepStrictEqual(actual, expected); - * }); - * - * // Omitting the type annotation will result in a compilation error. - * test('example', t => { - * t.assert.deepStrictEqual(actual, expected); // Error: 't' needs an explicit type annotation. - * }); - * ``` - * @since v20.15.0 - */ - readonly assert: TestContextAssert; - /** - * This function is used to create a hook running before subtest of the current test. - * @param fn The hook function. The first argument to this function is a `TestContext` object. - * If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - * @since v20.1.0, v18.17.0 - */ - before(fn?: TestContextHookFn, options?: HookOptions): void; - /** - * This function is used to create a hook running before each subtest of the current test. - * @param fn The hook function. The first argument to this function is a `TestContext` object. - * If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - * @since v18.8.0 - */ - beforeEach(fn?: TestContextHookFn, options?: HookOptions): void; - /** - * This function is used to create a hook that runs after the current test finishes. - * @param fn The hook function. The first argument to this function is a `TestContext` object. - * If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - * @since v18.13.0 - */ - after(fn?: TestContextHookFn, options?: HookOptions): void; - /** - * This function is used to create a hook running after each subtest of the current test. - * @param fn The hook function. The first argument to this function is a `TestContext` object. - * If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - * @since v18.8.0 - */ - afterEach(fn?: TestContextHookFn, options?: HookOptions): void; - /** - * This function is used to write diagnostics to the output. Any diagnostic - * information is included at the end of the test's results. This function does - * not return a value. - * - * ```js - * test('top level test', (t) => { - * t.diagnostic('A diagnostic message'); - * }); - * ``` - * @since v18.0.0, v16.17.0 - * @param message Message to be reported. - */ - diagnostic(message: string): void; - /** - * The name of the test and each of its ancestors, separated by `>`. - * @since v20.16.0 - */ - readonly fullName: string; - /** - * The name of the test. - * @since v18.8.0, v16.18.0 - */ - readonly name: string; - /** - * Used to set the number of assertions and subtests that are expected to run within the test. - * If the number of assertions and subtests that run does not match the expected count, the test will fail. - * - * To make sure assertions are tracked, the assert functions on `context.assert` must be used, - * instead of importing from the `node:assert` module. - * ```js - * test('top level test', (t) => { - * t.plan(2); - * t.assert.ok('some relevant assertion here'); - * t.test('subtest', () => {}); - * }); - * ``` - * - * When working with asynchronous code, the `plan` function can be used to ensure that the correct number of assertions are run: - * ```js - * test('planning with streams', (t, done) => { - * function* generate() { - * yield 'a'; - * yield 'b'; - * yield 'c'; - * } - * const expected = ['a', 'b', 'c']; - * t.plan(expected.length); - * const stream = Readable.from(generate()); - * stream.on('data', (chunk) => { - * t.assert.strictEqual(chunk, expected.shift()); - * }); - * stream.on('end', () => { - * done(); - * }); - * }); - * ``` - * @since v20.15.0 - */ - plan(count: number): void; - /** - * If `shouldRunOnlyTests` is truthy, the test context will only run tests that - * have the `only` option set. Otherwise, all tests are run. If Node.js was not - * started with the `--test-only` command-line option, this function is a - * no-op. - * - * ```js - * test('top level test', (t) => { - * // The test context can be set to run subtests with the 'only' option. - * t.runOnly(true); - * return Promise.all([ - * t.test('this subtest is now skipped'), - * t.test('this subtest is run', { only: true }), - * ]); - * }); - * ``` - * @since v18.0.0, v16.17.0 - * @param shouldRunOnlyTests Whether or not to run `only` tests. - */ - runOnly(shouldRunOnlyTests: boolean): void; - /** - * ```js - * test('top level test', async (t) => { - * await fetch('some/uri', { signal: t.signal }); - * }); - * ``` - * @since v18.7.0, v16.17.0 - */ - readonly signal: AbortSignal; - /** - * This function causes the test's output to indicate the test as skipped. If `message` is provided, it is included in the output. Calling `skip()` does - * not terminate execution of the test function. This function does not return a - * value. - * - * ```js - * test('top level test', (t) => { - * // Make sure to return here as well if the test contains additional logic. - * t.skip('this is skipped'); - * }); - * ``` - * @since v18.0.0, v16.17.0 - * @param message Optional skip message. - */ - skip(message?: string): void; - /** - * This function adds a `TODO` directive to the test's output. If `message` is - * provided, it is included in the output. Calling `todo()` does not terminate - * execution of the test function. This function does not return a value. - * - * ```js - * test('top level test', (t) => { - * // This test is marked as `TODO` - * t.todo('this is a todo'); - * }); - * ``` - * @since v18.0.0, v16.17.0 - * @param message Optional `TODO` message. - */ - todo(message?: string): void; - /** - * This function is used to create subtests under the current test. This function behaves in - * the same fashion as the top level {@link test} function. - * @since v18.0.0 - * @param name The name of the test, which is displayed when reporting test results. - * Defaults to the `name` property of `fn`, or `''` if `fn` does not have a name. - * @param options Configuration options for the test. - * @param fn The function under test. This first argument to this function is a {@link TestContext} object. - * If the test uses callbacks, the callback function is passed as the second argument. - * @returns A {@link Promise} resolved with `undefined` once the test completes. - */ - test: typeof test; - /** - * Each test provides its own MockTracker instance. - */ - readonly mock: MockTracker; - } - interface TestContextAssert extends Pick {} - /** - * An instance of `SuiteContext` is passed to each suite function in order to - * interact with the test runner. However, the `SuiteContext` constructor is not - * exposed as part of the API. - * @since v18.7.0, v16.17.0 - */ - interface SuiteContext { - /** - * The name of the suite. - * @since v18.8.0, v16.18.0 - */ - readonly name: string; - /** - * Can be used to abort test subtasks when the test has been aborted. - * @since v18.7.0, v16.17.0 - */ - readonly signal: AbortSignal; - } - interface TestOptions { - /** - * If a number is provided, then that many tests would run in parallel. - * If truthy, it would run (number of cpu cores - 1) tests in parallel. - * For subtests, it will be `Infinity` tests in parallel. - * If falsy, it would only run one test at a time. - * If unspecified, subtests inherit this value from their parent. - * @default false - */ - concurrency?: number | boolean | undefined; - /** - * If truthy, and the test context is configured to run `only` tests, then this test will be - * run. Otherwise, the test is skipped. - * @default false - */ - only?: boolean | undefined; - /** - * Allows aborting an in-progress test. - * @since v18.8.0 - */ - signal?: AbortSignal | undefined; - /** - * If truthy, the test is skipped. If a string is provided, that string is displayed in the - * test results as the reason for skipping the test. - * @default false - */ - skip?: boolean | string | undefined; - /** - * A number of milliseconds the test will fail after. If unspecified, subtests inherit this - * value from their parent. - * @default Infinity - * @since v18.7.0 - */ - timeout?: number | undefined; - /** - * If truthy, the test marked as `TODO`. If a string is provided, that string is displayed in - * the test results as the reason why the test is `TODO`. - * @default false - */ - todo?: boolean | string | undefined; - /** - * The number of assertions and subtests expected to be run in the test. - * If the number of assertions run in the test does not match the number - * specified in the plan, the test will fail. - * @default undefined - * @since v20.15.0 - */ - plan?: number | undefined; - } - /** - * This function creates a hook that runs before executing a suite. - * - * ```js - * describe('tests', async () => { - * before(() => console.log('about to run some test')); - * it('is a subtest', () => { - * assert.ok('some relevant assertion here'); - * }); - * }); - * ``` - * @since v18.8.0, v16.18.0 - * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - */ - function before(fn?: HookFn, options?: HookOptions): void; - /** - * This function creates a hook that runs after executing a suite. - * - * ```js - * describe('tests', async () => { - * after(() => console.log('finished running tests')); - * it('is a subtest', () => { - * assert.ok('some relevant assertion here'); - * }); - * }); - * ``` - * @since v18.8.0, v16.18.0 - * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - */ - function after(fn?: HookFn, options?: HookOptions): void; - /** - * This function creates a hook that runs before each test in the current suite. - * - * ```js - * describe('tests', async () => { - * beforeEach(() => console.log('about to run a test')); - * it('is a subtest', () => { - * assert.ok('some relevant assertion here'); - * }); - * }); - * ``` - * @since v18.8.0, v16.18.0 - * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - */ - function beforeEach(fn?: HookFn, options?: HookOptions): void; - /** - * This function creates a hook that runs after each test in the current suite. - * The `afterEach()` hook is run even if the test fails. - * - * ```js - * describe('tests', async () => { - * afterEach(() => console.log('finished running a test')); - * it('is a subtest', () => { - * assert.ok('some relevant assertion here'); - * }); - * }); - * ``` - * @since v18.8.0, v16.18.0 - * @param fn The hook function. If the hook uses callbacks, the callback function is passed as the second argument. - * @param options Configuration options for the hook. - */ - function afterEach(fn?: HookFn, options?: HookOptions): void; - /** - * The hook function. The first argument is the context in which the hook is called. - * If the hook uses callbacks, the callback function is passed as the second argument. - */ - type HookFn = (c: TestContext | SuiteContext, done: (result?: any) => void) => any; - /** - * The hook function. The first argument is a `TestContext` object. - * If the hook uses callbacks, the callback function is passed as the second argument. - */ - type TestContextHookFn = (t: TestContext, done: (result?: any) => void) => any; - /** - * Configuration options for hooks. - * @since v18.8.0 - */ - interface HookOptions { - /** - * Allows aborting an in-progress hook. - */ - signal?: AbortSignal | undefined; - /** - * A number of milliseconds the hook will fail after. If unspecified, subtests inherit this - * value from their parent. - * @default Infinity - */ - timeout?: number | undefined; - } - interface MockFunctionOptions { - /** - * The number of times that the mock will use the behavior of `implementation`. - * Once the mock function has been called `times` times, - * it will automatically restore the behavior of `original`. - * This value must be an integer greater than zero. - * @default Infinity - */ - times?: number | undefined; - } - interface MockMethodOptions extends MockFunctionOptions { - /** - * If `true`, `object[methodName]` is treated as a getter. - * This option cannot be used with the `setter` option. - */ - getter?: boolean | undefined; - /** - * If `true`, `object[methodName]` is treated as a setter. - * This option cannot be used with the `getter` option. - */ - setter?: boolean | undefined; - } - type Mock = F & { - mock: MockFunctionContext; - }; - interface MockModuleOptions { - /** - * If false, each call to `require()` or `import()` generates a new mock module. - * If true, subsequent calls will return the same module mock, and the mock module is inserted into the CommonJS cache. - * @default false - */ - cache?: boolean | undefined; - /** - * The value to use as the mocked module's default export. - * - * If this value is not provided, ESM mocks do not include a default export. - * If the mock is a CommonJS or builtin module, this setting is used as the value of `module.exports`. - * If this value is not provided, CJS and builtin mocks use an empty object as the value of `module.exports`. - */ - defaultExport?: any; - /** - * An object whose keys and values are used to create the named exports of the mock module. - * - * If the mock is a CommonJS or builtin module, these values are copied onto `module.exports`. - * Therefore, if a mock is created with both named exports and a non-object default export, - * the mock will throw an exception when used as a CJS or builtin module. - */ - namedExports?: object | undefined; - } - /** - * The `MockTracker` class is used to manage mocking functionality. The test runner - * module provides a top level `mock` export which is a `MockTracker` instance. - * Each test also provides its own `MockTracker` instance via the test context's `mock` property. - * @since v19.1.0, v18.13.0 - */ - interface MockTracker { - /** - * This function is used to create a mock function. - * - * The following example creates a mock function that increments a counter by one - * on each invocation. The `times` option is used to modify the mock behavior such - * that the first two invocations add two to the counter instead of one. - * - * ```js - * test('mocks a counting function', (t) => { - * let cnt = 0; - * - * function addOne() { - * cnt++; - * return cnt; - * } - * - * function addTwo() { - * cnt += 2; - * return cnt; - * } - * - * const fn = t.mock.fn(addOne, addTwo, { times: 2 }); - * - * assert.strictEqual(fn(), 2); - * assert.strictEqual(fn(), 4); - * assert.strictEqual(fn(), 5); - * assert.strictEqual(fn(), 6); - * }); - * ``` - * @since v19.1.0, v18.13.0 - * @param original An optional function to create a mock on. - * @param implementation An optional function used as the mock implementation for `original`. This is useful for creating mocks that exhibit one behavior for a specified number of calls and - * then restore the behavior of `original`. - * @param options Optional configuration options for the mock function. - * @return The mocked function. The mocked function contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the - * behavior of the mocked function. - */ - fn undefined>( - original?: F, - options?: MockFunctionOptions, - ): Mock; - fn undefined, Implementation extends Function = F>( - original?: F, - implementation?: Implementation, - options?: MockFunctionOptions, - ): Mock; - /** - * This function is used to create a mock on an existing object method. The - * following example demonstrates how a mock is created on an existing object - * method. - * - * ```js - * test('spies on an object method', (t) => { - * const number = { - * value: 5, - * subtract(a) { - * return this.value - a; - * }, - * }; - * - * t.mock.method(number, 'subtract'); - * assert.strictEqual(number.subtract.mock.calls.length, 0); - * assert.strictEqual(number.subtract(3), 2); - * assert.strictEqual(number.subtract.mock.calls.length, 1); - * - * const call = number.subtract.mock.calls[0]; - * - * assert.deepStrictEqual(call.arguments, [3]); - * assert.strictEqual(call.result, 2); - * assert.strictEqual(call.error, undefined); - * assert.strictEqual(call.target, undefined); - * assert.strictEqual(call.this, number); - * }); - * ``` - * @since v19.1.0, v18.13.0 - * @param object The object whose method is being mocked. - * @param methodName The identifier of the method on `object` to mock. If `object[methodName]` is not a function, an error is thrown. - * @param implementation An optional function used as the mock implementation for `object[methodName]`. - * @param options Optional configuration options for the mock method. - * @return The mocked method. The mocked method contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the - * behavior of the mocked method. - */ - method< - MockedObject extends object, - MethodName extends FunctionPropertyNames, - >( - object: MockedObject, - methodName: MethodName, - options?: MockFunctionOptions, - ): MockedObject[MethodName] extends Function ? Mock - : never; - method< - MockedObject extends object, - MethodName extends FunctionPropertyNames, - Implementation extends Function, - >( - object: MockedObject, - methodName: MethodName, - implementation: Implementation, - options?: MockFunctionOptions, - ): MockedObject[MethodName] extends Function ? Mock - : never; - method( - object: MockedObject, - methodName: keyof MockedObject, - options: MockMethodOptions, - ): Mock; - method( - object: MockedObject, - methodName: keyof MockedObject, - implementation: Function, - options: MockMethodOptions, - ): Mock; - /** - * This function is syntax sugar for `MockTracker.method` with `options.getter` set to `true`. - * @since v19.3.0, v18.13.0 - */ - getter< - MockedObject extends object, - MethodName extends keyof MockedObject, - >( - object: MockedObject, - methodName: MethodName, - options?: MockFunctionOptions, - ): Mock<() => MockedObject[MethodName]>; - getter< - MockedObject extends object, - MethodName extends keyof MockedObject, - Implementation extends Function, - >( - object: MockedObject, - methodName: MethodName, - implementation?: Implementation, - options?: MockFunctionOptions, - ): Mock<(() => MockedObject[MethodName]) | Implementation>; - /** - * This function is syntax sugar for `MockTracker.method` with `options.setter` set to `true`. - * @since v19.3.0, v18.13.0 - */ - setter< - MockedObject extends object, - MethodName extends keyof MockedObject, - >( - object: MockedObject, - methodName: MethodName, - options?: MockFunctionOptions, - ): Mock<(value: MockedObject[MethodName]) => void>; - setter< - MockedObject extends object, - MethodName extends keyof MockedObject, - Implementation extends Function, - >( - object: MockedObject, - methodName: MethodName, - implementation?: Implementation, - options?: MockFunctionOptions, - ): Mock<((value: MockedObject[MethodName]) => void) | Implementation>; - /** - * This function is used to mock the exports of ECMAScript modules, CommonJS modules, and Node.js builtin modules. - * Any references to the original module prior to mocking are not impacted. - * - * Only available through the [--experimental-test-module-mocks](https://nodejs.org/api/cli.html#--experimental-test-module-mocks) flag. - * @since v20.18.0 - * @experimental - * @param specifier A string identifying the module to mock. - * @param options Optional configuration options for the mock module. - */ - module(specifier: string, options?: MockModuleOptions): MockModuleContext; - /** - * This function restores the default behavior of all mocks that were previously - * created by this `MockTracker` and disassociates the mocks from the `MockTracker` instance. Once disassociated, the mocks can still be used, but the `MockTracker` instance can no longer be - * used to reset their behavior or - * otherwise interact with them. - * - * After each test completes, this function is called on the test context's `MockTracker`. If the global `MockTracker` is used extensively, calling this - * function manually is recommended. - * @since v19.1.0, v18.13.0 - */ - reset(): void; - /** - * This function restores the default behavior of all mocks that were previously - * created by this `MockTracker`. Unlike `mock.reset()`, `mock.restoreAll()` does - * not disassociate the mocks from the `MockTracker` instance. - * @since v19.1.0, v18.13.0 - */ - restoreAll(): void; - readonly timers: MockTimers; - } - const mock: MockTracker; - interface MockFunctionCall< - F extends Function, - ReturnType = F extends (...args: any) => infer T ? T - : F extends abstract new(...args: any) => infer T ? T - : unknown, - Args = F extends (...args: infer Y) => any ? Y - : F extends abstract new(...args: infer Y) => any ? Y - : unknown[], - > { - /** - * An array of the arguments passed to the mock function. - */ - arguments: Args; - /** - * If the mocked function threw then this property contains the thrown value. - */ - error: unknown | undefined; - /** - * The value returned by the mocked function. - * - * If the mocked function threw, it will be `undefined`. - */ - result: ReturnType | undefined; - /** - * An `Error` object whose stack can be used to determine the callsite of the mocked function invocation. - */ - stack: Error; - /** - * If the mocked function is a constructor, this field contains the class being constructed. - * Otherwise this will be `undefined`. - */ - target: F extends abstract new(...args: any) => any ? F : undefined; - /** - * The mocked function's `this` value. - */ - this: unknown; - } - /** - * The `MockFunctionContext` class is used to inspect or manipulate the behavior of - * mocks created via the `MockTracker` APIs. - * @since v19.1.0, v18.13.0 - */ - interface MockFunctionContext { - /** - * A getter that returns a copy of the internal array used to track calls to the - * mock. Each entry in the array is an object with the following properties. - * @since v19.1.0, v18.13.0 - */ - readonly calls: MockFunctionCall[]; - /** - * This function returns the number of times that this mock has been invoked. This - * function is more efficient than checking `ctx.calls.length` because `ctx.calls` is a getter that creates a copy of the internal call tracking array. - * @since v19.1.0, v18.13.0 - * @return The number of times that this mock has been invoked. - */ - callCount(): number; - /** - * This function is used to change the behavior of an existing mock. - * - * The following example creates a mock function using `t.mock.fn()`, calls the - * mock function, and then changes the mock implementation to a different function. - * - * ```js - * test('changes a mock behavior', (t) => { - * let cnt = 0; - * - * function addOne() { - * cnt++; - * return cnt; - * } - * - * function addTwo() { - * cnt += 2; - * return cnt; - * } - * - * const fn = t.mock.fn(addOne); - * - * assert.strictEqual(fn(), 1); - * fn.mock.mockImplementation(addTwo); - * assert.strictEqual(fn(), 3); - * assert.strictEqual(fn(), 5); - * }); - * ``` - * @since v19.1.0, v18.13.0 - * @param implementation The function to be used as the mock's new implementation. - */ - mockImplementation(implementation: F): void; - /** - * This function is used to change the behavior of an existing mock for a single - * invocation. Once invocation `onCall` has occurred, the mock will revert to - * whatever behavior it would have used had `mockImplementationOnce()` not been - * called. - * - * The following example creates a mock function using `t.mock.fn()`, calls the - * mock function, changes the mock implementation to a different function for the - * next invocation, and then resumes its previous behavior. - * - * ```js - * test('changes a mock behavior once', (t) => { - * let cnt = 0; - * - * function addOne() { - * cnt++; - * return cnt; - * } - * - * function addTwo() { - * cnt += 2; - * return cnt; - * } - * - * const fn = t.mock.fn(addOne); - * - * assert.strictEqual(fn(), 1); - * fn.mock.mockImplementationOnce(addTwo); - * assert.strictEqual(fn(), 3); - * assert.strictEqual(fn(), 4); - * }); - * ``` - * @since v19.1.0, v18.13.0 - * @param implementation The function to be used as the mock's implementation for the invocation number specified by `onCall`. - * @param onCall The invocation number that will use `implementation`. If the specified invocation has already occurred then an exception is thrown. - */ - mockImplementationOnce(implementation: F, onCall?: number): void; - /** - * Resets the call history of the mock function. - * @since v19.3.0, v18.13.0 - */ - resetCalls(): void; - /** - * Resets the implementation of the mock function to its original behavior. The - * mock can still be used after calling this function. - * @since v19.1.0, v18.13.0 - */ - restore(): void; - } - /** - * @since v20.18.0 - * @experimental - */ - interface MockModuleContext { - /** - * Resets the implementation of the mock module. - * @since v20.18.0 - */ - restore(): void; - } - interface MockTimersOptions { - apis: ReadonlyArray<"setInterval" | "setTimeout" | "setImmediate" | "Date">; - now?: number | Date | undefined; - } - /** - * Mocking timers is a technique commonly used in software testing to simulate and - * control the behavior of timers, such as `setInterval` and `setTimeout`, - * without actually waiting for the specified time intervals. - * - * The MockTimers API also allows for mocking of the `Date` constructor and - * `setImmediate`/`clearImmediate` functions. - * - * The `MockTracker` provides a top-level `timers` export - * which is a `MockTimers` instance. - * @since v20.4.0 - * @experimental - */ - interface MockTimers { - /** - * Enables timer mocking for the specified timers. - * - * **Note:** When you enable mocking for a specific timer, its associated - * clear function will also be implicitly mocked. - * - * **Note:** Mocking `Date` will affect the behavior of the mocked timers - * as they use the same internal clock. - * - * Example usage without setting initial time: - * - * ```js - * import { mock } from 'node:test'; - * mock.timers.enable({ apis: ['setInterval', 'Date'], now: 1234 }); - * ``` - * - * The above example enables mocking for the `Date` constructor, `setInterval` timer and - * implicitly mocks the `clearInterval` function. Only the `Date` constructor from `globalThis`, - * `setInterval` and `clearInterval` functions from `node:timers`, `node:timers/promises`, and `globalThis` will be mocked. - * - * Example usage with initial time set - * - * ```js - * import { mock } from 'node:test'; - * mock.timers.enable({ apis: ['Date'], now: 1000 }); - * ``` - * - * Example usage with initial Date object as time set - * - * ```js - * import { mock } from 'node:test'; - * mock.timers.enable({ apis: ['Date'], now: new Date() }); - * ``` - * - * Alternatively, if you call `mock.timers.enable()` without any parameters: - * - * All timers (`'setInterval'`, `'clearInterval'`, `'Date'`, `'setImmediate'`, `'clearImmediate'`, `'setTimeout'`, and `'clearTimeout'`) - * will be mocked. - * - * The `setInterval`, `clearInterval`, `setTimeout`, and `clearTimeout` functions from `node:timers`, `node:timers/promises`, - * and `globalThis` will be mocked. - * The `Date` constructor from `globalThis` will be mocked. - * - * If there is no initial epoch set, the initial date will be based on 0 in the Unix epoch. This is `January 1st, 1970, 00:00:00 UTC`. You can - * set an initial date by passing a now property to the `.enable()` method. This value will be used as the initial date for the mocked Date - * object. It can either be a positive integer, or another Date object. - * @since v20.4.0 - */ - enable(options?: MockTimersOptions): void; - /** - * You can use the `.setTime()` method to manually move the mocked date to another time. This method only accepts a positive integer. - * Note: This method will execute any mocked timers that are in the past from the new time. - * In the below example we are setting a new time for the mocked date. - * ```js - * import assert from 'node:assert'; - * import { test } from 'node:test'; - * test('sets the time of a date object', (context) => { - * // Optionally choose what to mock - * context.mock.timers.enable({ apis: ['Date'], now: 100 }); - * assert.strictEqual(Date.now(), 100); - * // Advance in time will also advance the date - * context.mock.timers.setTime(1000); - * context.mock.timers.tick(200); - * assert.strictEqual(Date.now(), 1200); - * }); - * ``` - */ - setTime(time: number): void; - /** - * This function restores the default behavior of all mocks that were previously - * created by this `MockTimers` instance and disassociates the mocks - * from the `MockTracker` instance. - * - * **Note:** After each test completes, this function is called on - * the test context's `MockTracker`. - * - * ```js - * import { mock } from 'node:test'; - * mock.timers.reset(); - * ``` - * @since v20.4.0 - */ - reset(): void; - /** - * Advances time for all mocked timers. - * - * **Note:** This diverges from how `setTimeout` in Node.js behaves and accepts - * only positive numbers. In Node.js, `setTimeout` with negative numbers is - * only supported for web compatibility reasons. - * - * The following example mocks a `setTimeout` function and - * by using `.tick` advances in - * time triggering all pending timers. - * - * ```js - * import assert from 'node:assert'; - * import { test } from 'node:test'; - * - * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => { - * const fn = context.mock.fn(); - * - * context.mock.timers.enable({ apis: ['setTimeout'] }); - * - * setTimeout(fn, 9999); - * - * assert.strictEqual(fn.mock.callCount(), 0); - * - * // Advance in time - * context.mock.timers.tick(9999); - * - * assert.strictEqual(fn.mock.callCount(), 1); - * }); - * ``` - * - * Alternativelly, the `.tick` function can be called many times - * - * ```js - * import assert from 'node:assert'; - * import { test } from 'node:test'; - * - * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => { - * const fn = context.mock.fn(); - * context.mock.timers.enable({ apis: ['setTimeout'] }); - * const nineSecs = 9000; - * setTimeout(fn, nineSecs); - * - * const twoSeconds = 3000; - * context.mock.timers.tick(twoSeconds); - * context.mock.timers.tick(twoSeconds); - * context.mock.timers.tick(twoSeconds); - * - * assert.strictEqual(fn.mock.callCount(), 1); - * }); - * ``` - * - * Advancing time using `.tick` will also advance the time for any `Date` object - * created after the mock was enabled (if `Date` was also set to be mocked). - * - * ```js - * import assert from 'node:assert'; - * import { test } from 'node:test'; - * - * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => { - * const fn = context.mock.fn(); - * - * context.mock.timers.enable({ apis: ['setTimeout', 'Date'] }); - * setTimeout(fn, 9999); - * - * assert.strictEqual(fn.mock.callCount(), 0); - * assert.strictEqual(Date.now(), 0); - * - * // Advance in time - * context.mock.timers.tick(9999); - * assert.strictEqual(fn.mock.callCount(), 1); - * assert.strictEqual(Date.now(), 9999); - * }); - * ``` - * @since v20.4.0 - */ - tick(milliseconds: number): void; - /** - * Triggers all pending mocked timers immediately. If the `Date` object is also - * mocked, it will also advance the `Date` object to the furthest timer's time. - * - * The example below triggers all pending timers immediately, - * causing them to execute without any delay. - * - * ```js - * import assert from 'node:assert'; - * import { test } from 'node:test'; - * - * test('runAll functions following the given order', (context) => { - * context.mock.timers.enable({ apis: ['setTimeout', 'Date'] }); - * const results = []; - * setTimeout(() => results.push(1), 9999); - * - * // Notice that if both timers have the same timeout, - * // the order of execution is guaranteed - * setTimeout(() => results.push(3), 8888); - * setTimeout(() => results.push(2), 8888); - * - * assert.deepStrictEqual(results, []); - * - * context.mock.timers.runAll(); - * assert.deepStrictEqual(results, [3, 2, 1]); - * // The Date object is also advanced to the furthest timer's time - * assert.strictEqual(Date.now(), 9999); - * }); - * ``` - * - * **Note:** The `runAll()` function is specifically designed for - * triggering timers in the context of timer mocking. - * It does not have any effect on real-time system - * clocks or actual timers outside of the mocking environment. - * @since v20.4.0 - */ - runAll(): void; - /** - * Calls {@link MockTimers.reset()}. - */ - [Symbol.dispose](): void; - } - } - type FunctionPropertyNames = { - [K in keyof T]: T[K] extends Function ? K : never; - }[keyof T]; - export = test; -} - -/** - * The `node:test/reporters` module exposes the builtin-reporters for `node:test`. - * To access it: - * - * ```js - * import test from 'node:test/reporters'; - * ``` - * - * This module is only available under the `node:` scheme. The following will not - * work: - * - * ```js - * import test from 'test/reporters'; - * ``` - * @since v19.9.0 - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/test/reporters.js) - */ -declare module "node:test/reporters" { - import { Transform, TransformOptions } from "node:stream"; - import { EventData } from "node:test"; - - type TestEvent = - | { type: "test:coverage"; data: EventData.TestCoverage } - | { type: "test:complete"; data: EventData.TestComplete } - | { type: "test:dequeue"; data: EventData.TestDequeue } - | { type: "test:diagnostic"; data: EventData.TestDiagnostic } - | { type: "test:enqueue"; data: EventData.TestEnqueue } - | { type: "test:fail"; data: EventData.TestFail } - | { type: "test:pass"; data: EventData.TestPass } - | { type: "test:plan"; data: EventData.TestPlan } - | { type: "test:start"; data: EventData.TestStart } - | { type: "test:stderr"; data: EventData.TestStderr } - | { type: "test:stdout"; data: EventData.TestStdout } - | { type: "test:watch:drained"; data: undefined }; - type TestEventGenerator = AsyncGenerator; - - /** - * The `dot` reporter outputs the test results in a compact format, - * where each passing test is represented by a `.`, - * and each failing test is represented by a `X`. - * @since v20.0.0 - */ - function dot(source: TestEventGenerator): AsyncGenerator<"\n" | "." | "X", void>; - /** - * The `tap` reporter outputs the test results in the [TAP](https://testanything.org/) format. - * @since v20.0.0 - */ - function tap(source: TestEventGenerator): AsyncGenerator; - /** - * The `spec` reporter outputs the test results in a human-readable format. - * @since v20.0.0 - */ - class SpecReporter extends Transform { - constructor(); - } - /** - * The `junit` reporter outputs test results in a jUnit XML format. - * @since v21.0.0 - */ - function junit(source: TestEventGenerator): AsyncGenerator; - class LcovReporter extends Transform { - constructor(opts?: Omit); - } - /** - * The `lcov` reporter outputs test coverage when used with the - * [`--experimental-test-coverage`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--experimental-test-coverage) flag. - * @since v22.0.0 - */ - const lcov: LcovReporter; - - export { dot, junit, lcov, SpecReporter as spec, tap, TestEvent }; -} diff --git a/node_modules/@types/node/timers.d.ts b/node_modules/@types/node/timers.d.ts deleted file mode 100644 index 57a8d9f..0000000 --- a/node_modules/@types/node/timers.d.ts +++ /dev/null @@ -1,286 +0,0 @@ -/** - * The `timer` module exposes a global API for scheduling functions to - * be called at some future period of time. Because the timer functions are - * globals, there is no need to import `node:timers` to use the API. - * - * The timer functions within Node.js implement a similar API as the timers API - * provided by Web Browsers but use a different internal implementation that is - * built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout). - * @see [source](https://github.com/nodejs/node/blob/v20.x/lib/timers.js) - */ -declare module "timers" { - import { Abortable } from "node:events"; - import * as promises from "node:timers/promises"; - export interface TimerOptions extends Abortable { - /** - * Set to `false` to indicate that the scheduled `Timeout` - * should not require the Node.js event loop to remain active. - * @default true - */ - ref?: boolean | undefined; - } - global { - namespace NodeJS { - /** - * This object is created internally and is returned from `setImmediate()`. It - * can be passed to `clearImmediate()` in order to cancel the scheduled - * actions. - * - * By default, when an immediate is scheduled, the Node.js event loop will continue - * running as long as the immediate is active. The `Immediate` object returned by - * `setImmediate()` exports both `immediate.ref()` and `immediate.unref()` - * functions that can be used to control this default behavior. - */ - interface Immediate extends RefCounted, Disposable { - /** - * If true, the `Immediate` object will keep the Node.js event loop active. - * @since v11.0.0 - */ - hasRef(): boolean; - /** - * When called, requests that the Node.js event loop _not_ exit so long as the - * `Immediate` is active. Calling `immediate.ref()` multiple times will have no - * effect. - * - * By default, all `Immediate` objects are "ref'ed", making it normally unnecessary - * to call `immediate.ref()` unless `immediate.unref()` had been called previously. - * @since v9.7.0 - * @returns a reference to `immediate` - */ - ref(): this; - /** - * When called, the active `Immediate` object will not require the Node.js event - * loop to remain active. If there is no other activity keeping the event loop - * running, the process may exit before the `Immediate` object's callback is - * invoked. Calling `immediate.unref()` multiple times will have no effect. - * @since v9.7.0 - * @returns a reference to `immediate` - */ - unref(): this; - /** - * Cancels the immediate. This is similar to calling `clearImmediate()`. - * @since v20.5.0, v18.18.0 - * @experimental - */ - [Symbol.dispose](): void; - _onImmediate(...args: any[]): void; - } - // Legacy interface used in Node.js v9 and prior - /** @deprecated Use `NodeJS.Timeout` instead. */ - interface Timer extends RefCounted { - hasRef(): boolean; - refresh(): this; - [Symbol.toPrimitive](): number; - } - /** - * This object is created internally and is returned from `setTimeout()` and - * `setInterval()`. It can be passed to either `clearTimeout()` or - * `clearInterval()` in order to cancel the scheduled actions. - * - * By default, when a timer is scheduled using either `setTimeout()` or - * `setInterval()`, the Node.js event loop will continue running as long as the - * timer is active. Each of the `Timeout` objects returned by these functions - * export both `timeout.ref()` and `timeout.unref()` functions that can be used to - * control this default behavior. - */ - interface Timeout extends RefCounted, Disposable, Timer { - /** - * Cancels the timeout. - * @since v0.9.1 - * @legacy Use `clearTimeout()` instead. - * @returns a reference to `timeout` - */ - close(): this; - /** - * If true, the `Timeout` object will keep the Node.js event loop active. - * @since v11.0.0 - */ - hasRef(): boolean; - /** - * When called, requests that the Node.js event loop _not_ exit so long as the - * `Timeout` is active. Calling `timeout.ref()` multiple times will have no effect. - * - * By default, all `Timeout` objects are "ref'ed", making it normally unnecessary - * to call `timeout.ref()` unless `timeout.unref()` had been called previously. - * @since v0.9.1 - * @returns a reference to `timeout` - */ - ref(): this; - /** - * Sets the timer's start time to the current time, and reschedules the timer to - * call its callback at the previously specified duration adjusted to the current - * time. This is useful for refreshing a timer without allocating a new - * JavaScript object. - * - * Using this on a timer that has already called its callback will reactivate the - * timer. - * @since v10.2.0 - * @returns a reference to `timeout` - */ - refresh(): this; - /** - * When called, the active `Timeout` object will not require the Node.js event loop - * to remain active. If there is no other activity keeping the event loop running, - * the process may exit before the `Timeout` object's callback is invoked. Calling - * `timeout.unref()` multiple times will have no effect. - * @since v0.9.1 - * @returns a reference to `timeout` - */ - unref(): this; - /** - * Coerce a `Timeout` to a primitive. The primitive can be used to - * clear the `Timeout`. The primitive can only be used in the - * same thread where the timeout was created. Therefore, to use it - * across `worker_threads` it must first be passed to the correct - * thread. This allows enhanced compatibility with browser - * `setTimeout()` and `setInterval()` implementations. - * @since v14.9.0, v12.19.0 - */ - [Symbol.toPrimitive](): number; - /** - * Cancels the timeout. - * @since v20.5.0, v18.18.0 - * @experimental - */ - [Symbol.dispose](): void; - _onTimeout(...args: any[]): void; - } - } - /** - * Schedules the "immediate" execution of the `callback` after I/O events' - * callbacks. - * - * When multiple calls to `setImmediate()` are made, the `callback` functions are - * queued for execution in the order in which they are created. The entire callback - * queue is processed every event loop iteration. If an immediate timer is queued - * from inside an executing callback, that timer will not be triggered until the - * next event loop iteration. - * - * If `callback` is not a function, a `TypeError` will be thrown. - * - * This method has a custom variant for promises that is available using - * `timersPromises.setImmediate()`. - * @since v0.9.1 - * @param callback The function to call at the end of this turn of - * the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout) - * @param args Optional arguments to pass when the `callback` is called. - * @returns for use with `clearImmediate()` - */ - function setImmediate( - callback: (...args: TArgs) => void, - ...args: TArgs - ): NodeJS.Immediate; - // Allow a single void-accepting argument to be optional in arguments lists. - // Allows usage such as `new Promise(resolve => setTimeout(resolve, ms))` (#54258) - // eslint-disable-next-line @typescript-eslint/no-invalid-void-type - function setImmediate(callback: (_: void) => void): NodeJS.Immediate; - namespace setImmediate { - import __promisify__ = promises.setImmediate; - export { __promisify__ }; - } - /** - * Schedules repeated execution of `callback` every `delay` milliseconds. - * - * When `delay` is larger than `2147483647` or less than `1`, the `delay` will be - * set to `1`. Non-integer delays are truncated to an integer. - * - * If `callback` is not a function, a `TypeError` will be thrown. - * - * This method has a custom variant for promises that is available using - * `timersPromises.setInterval()`. - * @since v0.0.1 - * @param callback The function to call when the timer elapses. - * @param delay The number of milliseconds to wait before calling the - * `callback`. **Default:** `1`. - * @param args Optional arguments to pass when the `callback` is called. - * @returns for use with `clearInterval()` - */ - function setInterval( - callback: (...args: TArgs) => void, - delay?: number, - ...args: TArgs - ): NodeJS.Timeout; - // Allow a single void-accepting argument to be optional in arguments lists. - // Allows usage such as `new Promise(resolve => setTimeout(resolve, ms))` (#54258) - // eslint-disable-next-line @typescript-eslint/no-invalid-void-type - function setInterval(callback: (_: void) => void, delay?: number): NodeJS.Timeout; - /** - * Schedules execution of a one-time `callback` after `delay` milliseconds. - * - * The `callback` will likely not be invoked in precisely `delay` milliseconds. - * Node.js makes no guarantees about the exact timing of when callbacks will fire, - * nor of their ordering. The callback will be called as close as possible to the - * time specified. - * - * When `delay` is larger than `2147483647` or less than `1` or `NaN`, the `delay` - * will be set to `1`. Non-integer delays are truncated to an integer. - * - * If `callback` is not a function, a `TypeError` will be thrown. - * - * This method has a custom variant for promises that is available using - * `timersPromises.setTimeout()`. - * @since v0.0.1 - * @param callback The function to call when the timer elapses. - * @param delay The number of milliseconds to wait before calling the - * `callback`. **Default:** `1`. - * @param args Optional arguments to pass when the `callback` is called. - * @returns for use with `clearTimeout()` - */ - function setTimeout( - callback: (...args: TArgs) => void, - delay?: number, - ...args: TArgs - ): NodeJS.Timeout; - // Allow a single void-accepting argument to be optional in arguments lists. - // Allows usage such as `new Promise(resolve => setTimeout(resolve, ms))` (#54258) - // eslint-disable-next-line @typescript-eslint/no-invalid-void-type - function setTimeout(callback: (_: void) => void, delay?: number): NodeJS.Timeout; - namespace setTimeout { - import __promisify__ = promises.setTimeout; - export { __promisify__ }; - } - /** - * Cancels an `Immediate` object created by `setImmediate()`. - * @since v0.9.1 - * @param immediate An `Immediate` object as returned by `setImmediate()`. - */ - function clearImmediate(immediate: NodeJS.Immediate | undefined): void; - /** - * Cancels a `Timeout` object created by `setInterval()`. - * @since v0.0.1 - * @param timeout A `Timeout` object as returned by `setInterval()` - * or the primitive of the `Timeout` object as a string or a number. - */ - function clearInterval(timeout: NodeJS.Timeout | string | number | undefined): void; - /** - * Cancels a `Timeout` object created by `setTimeout()`. - * @since v0.0.1 - * @param timeout A `Timeout` object as returned by `setTimeout()` - * or the primitive of the `Timeout` object as a string or a number. - */ - function clearTimeout(timeout: NodeJS.Timeout | string | number | undefined): void; - /** - * The `queueMicrotask()` method queues a microtask to invoke `callback`. If - * `callback` throws an exception, the `process` object `'uncaughtException'` - * event will be emitted. - * - * The microtask queue is managed by V8 and may be used in a similar manner to - * the `process.nextTick()` queue, which is managed by Node.js. The - * `process.nextTick()` queue is always processed before the microtask queue - * within each turn of the Node.js event loop. - * @since v11.0.0 - * @param callback Function to be queued. - */ - function queueMicrotask(callback: () => void): void; - } - import clearImmediate = globalThis.clearImmediate; - import clearInterval = globalThis.clearInterval; - import clearTimeout = globalThis.clearTimeout; - import setImmediate = globalThis.setImmediate; - import setInterval = globalThis.setInterval; - import setTimeout = globalThis.setTimeout; - export { clearImmediate, clearInterval, clearTimeout, promises, setImmediate, setInterval, setTimeout }; -} -declare module "node:timers" { - export * from "timers"; -} diff --git a/node_modules/@types/node/timers/promises.d.ts b/node_modules/@types/node/timers/promises.d.ts deleted file mode 100644 index 29d7ff0..0000000 --- a/node_modules/@types/node/timers/promises.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -/** - * The `timers/promises` API provides an alternative set of timer functions - * that return `Promise` objects. The API is accessible via - * `require('node:timers/promises')`. - * - * ```js - * import { - * setTimeout, - * setImmediate, - * setInterval, - * } from 'node:timers/promises'; - * ``` - * @since v15.0.0 - * @see [source](https://github.com/nodejs/node/blob/v20.x/lib/timers/promises.js) - */ -declare module "timers/promises" { - import { TimerOptions } from "node:timers"; - /** - * ```js - * import { - * setTimeout, - * } from 'node:timers/promises'; - * - * const res = await setTimeout(100, 'result'); - * - * console.log(res); // Prints 'result' - * ``` - * @since v15.0.0 - * @param delay The number of milliseconds to wait before fulfilling the - * promise. **Default:** `1`. - * @param value A value with which the promise is fulfilled. - */ - function setTimeout(delay?: number, value?: T, options?: TimerOptions): Promise; - /** - * ```js - * import { - * setImmediate, - * } from 'node:timers/promises'; - * - * const res = await setImmediate('result'); - * - * console.log(res); // Prints 'result' - * ``` - * @since v15.0.0 - * @param value A value with which the promise is fulfilled. - */ - function setImmediate(value?: T, options?: TimerOptions): Promise; - /** - * Returns an async iterator that generates values in an interval of `delay` ms. - * If `ref` is `true`, you need to call `next()` of async iterator explicitly - * or implicitly to keep the event loop alive. - * - * ```js - * import { - * setInterval, - * } from 'node:timers/promises'; - * - * const interval = 100; - * for await (const startTime of setInterval(interval, Date.now())) { - * const now = Date.now(); - * console.log(now); - * if ((now - startTime) > 1000) - * break; - * } - * console.log(Date.now()); - * ``` - * @since v15.9.0 - * @param delay The number of milliseconds to wait between iterations. - * **Default:** `1`. - * @param value A value with which the iterator returns. - */ - function setInterval(delay?: number, value?: T, options?: TimerOptions): NodeJS.AsyncIterator; - interface Scheduler { - /** - * An experimental API defined by the [Scheduling APIs](https://github.com/WICG/scheduling-apis) draft specification - * being developed as a standard Web Platform API. - * - * Calling `timersPromises.scheduler.wait(delay, options)` is roughly equivalent - * to calling `timersPromises.setTimeout(delay, undefined, options)` except that - * the `ref` option is not supported. - * - * ```js - * import { scheduler } from 'node:timers/promises'; - * - * await scheduler.wait(1000); // Wait one second before continuing - * ``` - * @since v17.3.0, v16.14.0 - * @experimental - * @param delay The number of milliseconds to wait before resolving the - * promise. - */ - wait(delay: number, options?: { signal?: AbortSignal }): Promise; - /** - * An experimental API defined by the [Scheduling APIs](https://github.com/WICG/scheduling-apis) draft specification - * being developed as a standard Web Platform API. - * - * Calling `timersPromises.scheduler.yield()` is equivalent to calling - * `timersPromises.setImmediate()` with no arguments. - * @since v17.3.0, v16.14.0 - * @experimental - */ - yield(): Promise; - } - const scheduler: Scheduler; -} -declare module "node:timers/promises" { - export * from "timers/promises"; -} diff --git a/node_modules/@types/node/tls.d.ts b/node_modules/@types/node/tls.d.ts deleted file mode 100644 index 7ecc233..0000000 --- a/node_modules/@types/node/tls.d.ts +++ /dev/null @@ -1,1259 +0,0 @@ -/** - * The `node:tls` module provides an implementation of the Transport Layer Security - * (TLS) and Secure Socket Layer (SSL) protocols that is built on top of OpenSSL. - * The module can be accessed using: - * - * ```js - * import tls from 'node:tls'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/tls.js) - */ -declare module "tls" { - import { NonSharedBuffer } from "node:buffer"; - import { X509Certificate } from "node:crypto"; - import * as net from "node:net"; - import * as stream from "stream"; - const CLIENT_RENEG_LIMIT: number; - const CLIENT_RENEG_WINDOW: number; - interface Certificate extends NodeJS.Dict { - /** - * Country code. - */ - C?: string | string[]; - /** - * Street. - */ - ST?: string | string[]; - /** - * Locality. - */ - L?: string | string[]; - /** - * Organization. - */ - O?: string | string[]; - /** - * Organizational unit. - */ - OU?: string | string[]; - /** - * Common name. - */ - CN?: string | string[]; - } - interface PeerCertificate { - /** - * `true` if a Certificate Authority (CA), `false` otherwise. - * @since v18.13.0 - */ - ca: boolean; - /** - * The DER encoded X.509 certificate data. - */ - raw: NonSharedBuffer; - /** - * The certificate subject. - */ - subject: Certificate; - /** - * The certificate issuer, described in the same terms as the `subject`. - */ - issuer: Certificate; - /** - * The date-time the certificate is valid from. - */ - valid_from: string; - /** - * The date-time the certificate is valid to. - */ - valid_to: string; - /** - * The certificate serial number, as a hex string. - */ - serialNumber: string; - /** - * The SHA-1 digest of the DER encoded certificate. - * It is returned as a `:` separated hexadecimal string. - */ - fingerprint: string; - /** - * The SHA-256 digest of the DER encoded certificate. - * It is returned as a `:` separated hexadecimal string. - */ - fingerprint256: string; - /** - * The SHA-512 digest of the DER encoded certificate. - * It is returned as a `:` separated hexadecimal string. - */ - fingerprint512: string; - /** - * The extended key usage, a set of OIDs. - */ - ext_key_usage?: string[]; - /** - * A string containing concatenated names for the subject, - * an alternative to the `subject` names. - */ - subjectaltname?: string; - /** - * An array describing the AuthorityInfoAccess, used with OCSP. - */ - infoAccess?: NodeJS.Dict; - /** - * For RSA keys: The RSA bit size. - * - * For EC keys: The key size in bits. - */ - bits?: number; - /** - * The RSA exponent, as a string in hexadecimal number notation. - */ - exponent?: string; - /** - * The RSA modulus, as a hexadecimal string. - */ - modulus?: string; - /** - * The public key. - */ - pubkey?: NonSharedBuffer; - /** - * The ASN.1 name of the OID of the elliptic curve. - * Well-known curves are identified by an OID. - * While it is unusual, it is possible that the curve - * is identified by its mathematical properties, - * in which case it will not have an OID. - */ - asn1Curve?: string; - /** - * The NIST name for the elliptic curve, if it has one - * (not all well-known curves have been assigned names by NIST). - */ - nistCurve?: string; - } - interface DetailedPeerCertificate extends PeerCertificate { - /** - * The issuer certificate object. - * For self-signed certificates, this may be a circular reference. - */ - issuerCertificate: DetailedPeerCertificate; - } - interface CipherNameAndProtocol { - /** - * The cipher name. - */ - name: string; - /** - * SSL/TLS protocol version. - */ - version: string; - /** - * IETF name for the cipher suite. - */ - standardName: string; - } - interface EphemeralKeyInfo { - /** - * The supported types are 'DH' and 'ECDH'. - */ - type: string; - /** - * The name property is available only when type is 'ECDH'. - */ - name?: string | undefined; - /** - * The size of parameter of an ephemeral key exchange. - */ - size: number; - } - interface KeyObject { - /** - * Private keys in PEM format. - */ - pem: string | Buffer; - /** - * Optional passphrase. - */ - passphrase?: string | undefined; - } - interface PxfObject { - /** - * PFX or PKCS12 encoded private key and certificate chain. - */ - buf: string | Buffer; - /** - * Optional passphrase. - */ - passphrase?: string | undefined; - } - interface TLSSocketOptions extends SecureContextOptions, CommonConnectionOptions { - /** - * If true the TLS socket will be instantiated in server-mode. - * Defaults to false. - */ - isServer?: boolean | undefined; - /** - * An optional net.Server instance. - */ - server?: net.Server | undefined; - /** - * An optional Buffer instance containing a TLS session. - */ - session?: Buffer | undefined; - /** - * If true, specifies that the OCSP status request extension will be - * added to the client hello and an 'OCSPResponse' event will be - * emitted on the socket before establishing a secure communication - */ - requestOCSP?: boolean | undefined; - } - /** - * Performs transparent encryption of written data and all required TLS - * negotiation. - * - * Instances of `tls.TLSSocket` implement the duplex `Stream` interface. - * - * Methods that return TLS connection metadata (e.g.{@link TLSSocket.getPeerCertificate}) will only return data while the - * connection is open. - * @since v0.11.4 - */ - class TLSSocket extends net.Socket { - /** - * Construct a new tls.TLSSocket object from an existing TCP socket. - */ - constructor(socket: net.Socket | stream.Duplex, options?: TLSSocketOptions); - /** - * This property is `true` if the peer certificate was signed by one of the CAs - * specified when creating the `tls.TLSSocket` instance, otherwise `false`. - * @since v0.11.4 - */ - authorized: boolean; - /** - * Returns the reason why the peer's certificate was not been verified. This - * property is set only when `tlsSocket.authorized === false`. - * @since v0.11.4 - */ - authorizationError: Error; - /** - * Always returns `true`. This may be used to distinguish TLS sockets from regular`net.Socket` instances. - * @since v0.11.4 - */ - encrypted: true; - /** - * String containing the selected ALPN protocol. - * Before a handshake has completed, this value is always null. - * When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false. - */ - alpnProtocol: string | false | null; - /** - * String containing the server name requested via SNI (Server Name Indication) TLS extension. - */ - servername: string | false | null; - /** - * Returns an object representing the local certificate. The returned object has - * some properties corresponding to the fields of the certificate. - * - * See {@link TLSSocket.getPeerCertificate} for an example of the certificate - * structure. - * - * If there is no local certificate, an empty object will be returned. If the - * socket has been destroyed, `null` will be returned. - * @since v11.2.0 - */ - getCertificate(): PeerCertificate | object | null; - /** - * Returns an object containing information on the negotiated cipher suite. - * - * For example, a TLSv1.2 protocol with AES256-SHA cipher: - * - * ```json - * { - * "name": "AES256-SHA", - * "standardName": "TLS_RSA_WITH_AES_256_CBC_SHA", - * "version": "SSLv3" - * } - * ``` - * - * See [SSL\_CIPHER\_get\_name](https://www.openssl.org/docs/man1.1.1/man3/SSL_CIPHER_get_name.html) for more information. - * @since v0.11.4 - */ - getCipher(): CipherNameAndProtocol; - /** - * Returns an object representing the type, name, and size of parameter of - * an ephemeral key exchange in `perfect forward secrecy` on a client - * connection. It returns an empty object when the key exchange is not - * ephemeral. As this is only supported on a client socket; `null` is returned - * if called on a server socket. The supported types are `'DH'` and `'ECDH'`. The `name` property is available only when type is `'ECDH'`. - * - * For example: `{ type: 'ECDH', name: 'prime256v1', size: 256 }`. - * @since v5.0.0 - */ - getEphemeralKeyInfo(): EphemeralKeyInfo | object | null; - /** - * As the `Finished` messages are message digests of the complete handshake - * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can - * be used for external authentication procedures when the authentication - * provided by SSL/TLS is not desired or is not enough. - * - * Corresponds to the `SSL_get_finished` routine in OpenSSL and may be used - * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929). - * @since v9.9.0 - * @return The latest `Finished` message that has been sent to the socket as part of a SSL/TLS handshake, or `undefined` if no `Finished` message has been sent yet. - */ - getFinished(): NonSharedBuffer | undefined; - /** - * Returns an object representing the peer's certificate. If the peer does not - * provide a certificate, an empty object will be returned. If the socket has been - * destroyed, `null` will be returned. - * - * If the full certificate chain was requested, each certificate will include an`issuerCertificate` property containing an object representing its issuer's - * certificate. - * @since v0.11.4 - * @param detailed Include the full certificate chain if `true`, otherwise include just the peer's certificate. - * @return A certificate object. - */ - getPeerCertificate(detailed: true): DetailedPeerCertificate; - getPeerCertificate(detailed?: false): PeerCertificate; - getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate; - /** - * As the `Finished` messages are message digests of the complete handshake - * (with a total of 192 bits for TLS 1.0 and more for SSL 3.0), they can - * be used for external authentication procedures when the authentication - * provided by SSL/TLS is not desired or is not enough. - * - * Corresponds to the `SSL_get_peer_finished` routine in OpenSSL and may be used - * to implement the `tls-unique` channel binding from [RFC 5929](https://tools.ietf.org/html/rfc5929). - * @since v9.9.0 - * @return The latest `Finished` message that is expected or has actually been received from the socket as part of a SSL/TLS handshake, or `undefined` if there is no `Finished` message so - * far. - */ - getPeerFinished(): NonSharedBuffer | undefined; - /** - * Returns a string containing the negotiated SSL/TLS protocol version of the - * current connection. The value `'unknown'` will be returned for connected - * sockets that have not completed the handshaking process. The value `null` will - * be returned for server sockets or disconnected client sockets. - * - * Protocol versions are: - * - * * `'SSLv3'` - * * `'TLSv1'` - * * `'TLSv1.1'` - * * `'TLSv1.2'` - * * `'TLSv1.3'` - * - * See the OpenSSL [`SSL_get_version`](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html) documentation for more information. - * @since v5.7.0 - */ - getProtocol(): string | null; - /** - * Returns the TLS session data or `undefined` if no session was - * negotiated. On the client, the data can be provided to the `session` option of {@link connect} to resume the connection. On the server, it may be useful - * for debugging. - * - * See `Session Resumption` for more information. - * - * Note: `getSession()` works only for TLSv1.2 and below. For TLSv1.3, applications - * must use the `'session'` event (it also works for TLSv1.2 and below). - * @since v0.11.4 - */ - getSession(): NonSharedBuffer | undefined; - /** - * See [SSL\_get\_shared\_sigalgs](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_shared_sigalgs.html) for more information. - * @since v12.11.0 - * @return List of signature algorithms shared between the server and the client in the order of decreasing preference. - */ - getSharedSigalgs(): string[]; - /** - * For a client, returns the TLS session ticket if one is available, or`undefined`. For a server, always returns `undefined`. - * - * It may be useful for debugging. - * - * See `Session Resumption` for more information. - * @since v0.11.4 - */ - getTLSTicket(): NonSharedBuffer | undefined; - /** - * See `Session Resumption` for more information. - * @since v0.5.6 - * @return `true` if the session was reused, `false` otherwise. - */ - isSessionReused(): boolean; - /** - * The `tlsSocket.renegotiate()` method initiates a TLS renegotiation process. - * Upon completion, the `callback` function will be passed a single argument - * that is either an `Error` (if the request failed) or `null`. - * - * This method can be used to request a peer's certificate after the secure - * connection has been established. - * - * When running as the server, the socket will be destroyed with an error after `handshakeTimeout` timeout. - * - * For TLSv1.3, renegotiation cannot be initiated, it is not supported by the - * protocol. - * @since v0.11.8 - * @param callback If `renegotiate()` returned `true`, callback is attached once to the `'secure'` event. If `renegotiate()` returned `false`, `callback` will be called in the next tick with - * an error, unless the `tlsSocket` has been destroyed, in which case `callback` will not be called at all. - * @return `true` if renegotiation was initiated, `false` otherwise. - */ - renegotiate( - options: { - rejectUnauthorized?: boolean | undefined; - requestCert?: boolean | undefined; - }, - callback: (err: Error | null) => void, - ): undefined | boolean; - /** - * The `tlsSocket.setKeyCert()` method sets the private key and certificate to use for the socket. - * This is mainly useful if you wish to select a server certificate from a TLS server's `ALPNCallback`. - * @since v22.5.0, v20.17.0 - * @param context An object containing at least `key` and `cert` properties from the {@link createSecureContext()} `options`, - * or a TLS context object created with {@link createSecureContext()} itself. - */ - setKeyCert(context: SecureContextOptions | SecureContext): void; - /** - * The `tlsSocket.setMaxSendFragment()` method sets the maximum TLS fragment size. - * Returns `true` if setting the limit succeeded; `false` otherwise. - * - * Smaller fragment sizes decrease the buffering latency on the client: larger - * fragments are buffered by the TLS layer until the entire fragment is received - * and its integrity is verified; large fragments can span multiple roundtrips - * and their processing can be delayed due to packet loss or reordering. However, - * smaller fragments add extra TLS framing bytes and CPU overhead, which may - * decrease overall server throughput. - * @since v0.11.11 - * @param [size=16384] The maximum TLS fragment size. The maximum value is `16384`. - */ - setMaxSendFragment(size: number): boolean; - /** - * Disables TLS renegotiation for this `TLSSocket` instance. Once called, attempts - * to renegotiate will trigger an `'error'` event on the `TLSSocket`. - * @since v8.4.0 - */ - disableRenegotiation(): void; - /** - * When enabled, TLS packet trace information is written to `stderr`. This can be - * used to debug TLS connection problems. - * - * The format of the output is identical to the output of`openssl s_client -trace` or `openssl s_server -trace`. While it is produced by - * OpenSSL's `SSL_trace()` function, the format is undocumented, can change - * without notice, and should not be relied on. - * @since v12.2.0 - */ - enableTrace(): void; - /** - * Returns the peer certificate as an `X509Certificate` object. - * - * If there is no peer certificate, or the socket has been destroyed,`undefined` will be returned. - * @since v15.9.0 - */ - getPeerX509Certificate(): X509Certificate | undefined; - /** - * Returns the local certificate as an `X509Certificate` object. - * - * If there is no local certificate, or the socket has been destroyed,`undefined` will be returned. - * @since v15.9.0 - */ - getX509Certificate(): X509Certificate | undefined; - /** - * Keying material is used for validations to prevent different kind of attacks in - * network protocols, for example in the specifications of IEEE 802.1X. - * - * Example - * - * ```js - * const keyingMaterial = tlsSocket.exportKeyingMaterial( - * 128, - * 'client finished'); - * - * /* - * Example return value of keyingMaterial: - * - * - * ``` - * - * See the OpenSSL [`SSL_export_keying_material`](https://www.openssl.org/docs/man1.1.1/man3/SSL_export_keying_material.html) documentation for more - * information. - * @since v13.10.0, v12.17.0 - * @param length number of bytes to retrieve from keying material - * @param label an application specific label, typically this will be a value from the [IANA Exporter Label - * Registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels). - * @param context Optionally provide a context. - * @return requested bytes of the keying material - */ - exportKeyingMaterial(length: number, label: string, context: Buffer): NonSharedBuffer; - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "OCSPResponse", listener: (response: NonSharedBuffer) => void): this; - addListener(event: "secureConnect", listener: () => void): this; - addListener(event: "session", listener: (session: NonSharedBuffer) => void): this; - addListener(event: "keylog", listener: (line: NonSharedBuffer) => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "OCSPResponse", response: NonSharedBuffer): boolean; - emit(event: "secureConnect"): boolean; - emit(event: "session", session: NonSharedBuffer): boolean; - emit(event: "keylog", line: NonSharedBuffer): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "OCSPResponse", listener: (response: NonSharedBuffer) => void): this; - on(event: "secureConnect", listener: () => void): this; - on(event: "session", listener: (session: NonSharedBuffer) => void): this; - on(event: "keylog", listener: (line: NonSharedBuffer) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "OCSPResponse", listener: (response: NonSharedBuffer) => void): this; - once(event: "secureConnect", listener: () => void): this; - once(event: "session", listener: (session: NonSharedBuffer) => void): this; - once(event: "keylog", listener: (line: NonSharedBuffer) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "OCSPResponse", listener: (response: NonSharedBuffer) => void): this; - prependListener(event: "secureConnect", listener: () => void): this; - prependListener(event: "session", listener: (session: NonSharedBuffer) => void): this; - prependListener(event: "keylog", listener: (line: NonSharedBuffer) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "OCSPResponse", listener: (response: NonSharedBuffer) => void): this; - prependOnceListener(event: "secureConnect", listener: () => void): this; - prependOnceListener(event: "session", listener: (session: NonSharedBuffer) => void): this; - prependOnceListener(event: "keylog", listener: (line: NonSharedBuffer) => void): this; - } - interface CommonConnectionOptions { - /** - * An optional TLS context object from tls.createSecureContext() - */ - secureContext?: SecureContext | undefined; - /** - * When enabled, TLS packet trace information is written to `stderr`. This can be - * used to debug TLS connection problems. - * @default false - */ - enableTrace?: boolean | undefined; - /** - * If true the server will request a certificate from clients that - * connect and attempt to verify that certificate. Defaults to - * false. - */ - requestCert?: boolean | undefined; - /** - * An array of strings or a Buffer naming possible ALPN protocols. - * (Protocols should be ordered by their priority.) - */ - ALPNProtocols?: readonly string[] | NodeJS.ArrayBufferView | undefined; - /** - * SNICallback(servername, cb) A function that will be - * called if the client supports SNI TLS extension. Two arguments - * will be passed when called: servername and cb. SNICallback should - * invoke cb(null, ctx), where ctx is a SecureContext instance. - * (tls.createSecureContext(...) can be used to get a proper - * SecureContext.) If SNICallback wasn't provided the default callback - * with high-level API will be used (see below). - */ - SNICallback?: ((servername: string, cb: (err: Error | null, ctx?: SecureContext) => void) => void) | undefined; - /** - * If true the server will reject any connection which is not - * authorized with the list of supplied CAs. This option only has an - * effect if requestCert is true. - * @default true - */ - rejectUnauthorized?: boolean | undefined; - } - interface TlsOptions extends SecureContextOptions, CommonConnectionOptions, net.ServerOpts { - /** - * Abort the connection if the SSL/TLS handshake does not finish in the - * specified number of milliseconds. A 'tlsClientError' is emitted on - * the tls.Server object whenever a handshake times out. Default: - * 120000 (120 seconds). - */ - handshakeTimeout?: number | undefined; - /** - * The number of seconds after which a TLS session created by the - * server will no longer be resumable. See Session Resumption for more - * information. Default: 300. - */ - sessionTimeout?: number | undefined; - /** - * 48-bytes of cryptographically strong pseudo-random data. - */ - ticketKeys?: Buffer | undefined; - /** - * @param socket - * @param identity identity parameter sent from the client. - * @return pre-shared key that must either be - * a buffer or `null` to stop the negotiation process. Returned PSK must be - * compatible with the selected cipher's digest. - * - * When negotiating TLS-PSK (pre-shared keys), this function is called - * with the identity provided by the client. - * If the return value is `null` the negotiation process will stop and an - * "unknown_psk_identity" alert message will be sent to the other party. - * If the server wishes to hide the fact that the PSK identity was not known, - * the callback must provide some random data as `psk` to make the connection - * fail with "decrypt_error" before negotiation is finished. - * PSK ciphers are disabled by default, and using TLS-PSK thus - * requires explicitly specifying a cipher suite with the `ciphers` option. - * More information can be found in the RFC 4279. - */ - pskCallback?: ((socket: TLSSocket, identity: string) => NodeJS.ArrayBufferView | null) | undefined; - /** - * hint to send to a client to help - * with selecting the identity during TLS-PSK negotiation. Will be ignored - * in TLS 1.3. Upon failing to set pskIdentityHint `tlsClientError` will be - * emitted with `ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED` code. - */ - pskIdentityHint?: string | undefined; - } - interface PSKCallbackNegotation { - psk: NodeJS.ArrayBufferView; - identity: string; - } - interface ConnectionOptions extends SecureContextOptions, CommonConnectionOptions { - host?: string | undefined; - port?: number | undefined; - path?: string | undefined; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored. - socket?: stream.Duplex | undefined; // Establish secure connection on a given socket rather than creating a new socket - checkServerIdentity?: typeof checkServerIdentity | undefined; - servername?: string | undefined; // SNI TLS Extension - session?: Buffer | undefined; - minDHSize?: number | undefined; - lookup?: net.LookupFunction | undefined; - timeout?: number | undefined; - /** - * When negotiating TLS-PSK (pre-shared keys), this function is called - * with optional identity `hint` provided by the server or `null` - * in case of TLS 1.3 where `hint` was removed. - * It will be necessary to provide a custom `tls.checkServerIdentity()` - * for the connection as the default one will try to check hostname/IP - * of the server against the certificate but that's not applicable for PSK - * because there won't be a certificate present. - * More information can be found in the RFC 4279. - * - * @param hint message sent from the server to help client - * decide which identity to use during negotiation. - * Always `null` if TLS 1.3 is used. - * @returns Return `null` to stop the negotiation process. `psk` must be - * compatible with the selected cipher's digest. - * `identity` must use UTF-8 encoding. - */ - pskCallback?: ((hint: string | null) => PSKCallbackNegotation | null) | undefined; - } - /** - * Accepts encrypted connections using TLS or SSL. - * @since v0.3.2 - */ - class Server extends net.Server { - constructor(secureConnectionListener?: (socket: TLSSocket) => void); - constructor(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void); - /** - * The `server.addContext()` method adds a secure context that will be used if - * the client request's SNI name matches the supplied `hostname` (or wildcard). - * - * When there are multiple matching contexts, the most recently added one is - * used. - * @since v0.5.3 - * @param hostname A SNI host name or wildcard (e.g. `'*'`) - * @param context An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc), or a TLS context object created - * with {@link createSecureContext} itself. - */ - addContext(hostname: string, context: SecureContextOptions | SecureContext): void; - /** - * Returns the session ticket keys. - * - * See `Session Resumption` for more information. - * @since v3.0.0 - * @return A 48-byte buffer containing the session ticket keys. - */ - getTicketKeys(): NonSharedBuffer; - /** - * The `server.setSecureContext()` method replaces the secure context of an - * existing server. Existing connections to the server are not interrupted. - * @since v11.0.0 - * @param options An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc). - */ - setSecureContext(options: SecureContextOptions): void; - /** - * Sets the session ticket keys. - * - * Changes to the ticket keys are effective only for future server connections. - * Existing or currently pending server connections will use the previous keys. - * - * See `Session Resumption` for more information. - * @since v3.0.0 - * @param keys A 48-byte buffer containing the session ticket keys. - */ - setTicketKeys(keys: Buffer): void; - /** - * events.EventEmitter - * 1. tlsClientError - * 2. newSession - * 3. OCSPRequest - * 4. resumeSession - * 5. secureConnection - * 6. keylog - */ - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - addListener( - event: "newSession", - listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void, - ): this; - addListener( - event: "OCSPRequest", - listener: ( - certificate: NonSharedBuffer, - issuer: NonSharedBuffer, - callback: (err: Error | null, resp: Buffer | null) => void, - ) => void, - ): this; - addListener( - event: "resumeSession", - listener: ( - sessionId: NonSharedBuffer, - callback: (err: Error | null, sessionData: Buffer | null) => void, - ) => void, - ): this; - addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - addListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: TLSSocket) => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "tlsClientError", err: Error, tlsSocket: TLSSocket): boolean; - emit( - event: "newSession", - sessionId: NonSharedBuffer, - sessionData: NonSharedBuffer, - callback: () => void, - ): boolean; - emit( - event: "OCSPRequest", - certificate: NonSharedBuffer, - issuer: NonSharedBuffer, - callback: (err: Error | null, resp: Buffer | null) => void, - ): boolean; - emit( - event: "resumeSession", - sessionId: NonSharedBuffer, - callback: (err: Error | null, sessionData: Buffer | null) => void, - ): boolean; - emit(event: "secureConnection", tlsSocket: TLSSocket): boolean; - emit(event: "keylog", line: NonSharedBuffer, tlsSocket: TLSSocket): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - on( - event: "newSession", - listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void, - ): this; - on( - event: "OCSPRequest", - listener: ( - certificate: NonSharedBuffer, - issuer: NonSharedBuffer, - callback: (err: Error | null, resp: Buffer | null) => void, - ) => void, - ): this; - on( - event: "resumeSession", - listener: ( - sessionId: NonSharedBuffer, - callback: (err: Error | null, sessionData: Buffer | null) => void, - ) => void, - ): this; - on(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - on(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: TLSSocket) => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - once( - event: "newSession", - listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void, - ): this; - once( - event: "OCSPRequest", - listener: ( - certificate: NonSharedBuffer, - issuer: NonSharedBuffer, - callback: (err: Error | null, resp: Buffer | null) => void, - ) => void, - ): this; - once( - event: "resumeSession", - listener: ( - sessionId: NonSharedBuffer, - callback: (err: Error | null, sessionData: Buffer | null) => void, - ) => void, - ): this; - once(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - once(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: TLSSocket) => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - prependListener( - event: "newSession", - listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void, - ): this; - prependListener( - event: "OCSPRequest", - listener: ( - certificate: NonSharedBuffer, - issuer: NonSharedBuffer, - callback: (err: Error | null, resp: Buffer | null) => void, - ) => void, - ): this; - prependListener( - event: "resumeSession", - listener: ( - sessionId: NonSharedBuffer, - callback: (err: Error | null, sessionData: Buffer | null) => void, - ) => void, - ): this; - prependListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - prependListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: TLSSocket) => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this; - prependOnceListener( - event: "newSession", - listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void, - ): this; - prependOnceListener( - event: "OCSPRequest", - listener: ( - certificate: NonSharedBuffer, - issuer: NonSharedBuffer, - callback: (err: Error | null, resp: Buffer | null) => void, - ) => void, - ): this; - prependOnceListener( - event: "resumeSession", - listener: ( - sessionId: NonSharedBuffer, - callback: (err: Error | null, sessionData: Buffer | null) => void, - ) => void, - ): this; - prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this; - prependOnceListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: TLSSocket) => void): this; - } - /** - * @deprecated since v0.11.3 Use `tls.TLSSocket` instead. - */ - interface SecurePair { - encrypted: TLSSocket; - cleartext: TLSSocket; - } - type SecureVersion = "TLSv1.3" | "TLSv1.2" | "TLSv1.1" | "TLSv1"; - interface SecureContextOptions { - /** - * If set, this will be called when a client opens a connection using the ALPN extension. - * One argument will be passed to the callback: an object containing `servername` and `protocols` fields, - * respectively containing the server name from the SNI extension (if any) and an array of - * ALPN protocol name strings. The callback must return either one of the strings listed in `protocols`, - * which will be returned to the client as the selected ALPN protocol, or `undefined`, - * to reject the connection with a fatal alert. If a string is returned that does not match one of - * the client's ALPN protocols, an error will be thrown. - * This option cannot be used with the `ALPNProtocols` option, and setting both options will throw an error. - */ - ALPNCallback?: ((arg: { servername: string; protocols: string[] }) => string | undefined) | undefined; - /** - * Treat intermediate (non-self-signed) - * certificates in the trust CA certificate list as trusted. - * @since v22.9.0, v20.18.0 - */ - allowPartialTrustChain?: boolean | undefined; - /** - * Optionally override the trusted CA certificates. Default is to trust - * the well-known CAs curated by Mozilla. Mozilla's CAs are completely - * replaced when CAs are explicitly specified using this option. - */ - ca?: string | Buffer | Array | undefined; - /** - * Cert chains in PEM format. One cert chain should be provided per - * private key. Each cert chain should consist of the PEM formatted - * certificate for a provided private key, followed by the PEM - * formatted intermediate certificates (if any), in order, and not - * including the root CA (the root CA must be pre-known to the peer, - * see ca). When providing multiple cert chains, they do not have to - * be in the same order as their private keys in key. If the - * intermediate certificates are not provided, the peer will not be - * able to validate the certificate, and the handshake will fail. - */ - cert?: string | Buffer | Array | undefined; - /** - * Colon-separated list of supported signature algorithms. The list - * can contain digest algorithms (SHA256, MD5 etc.), public key - * algorithms (RSA-PSS, ECDSA etc.), combination of both (e.g - * 'RSA+SHA384') or TLS v1.3 scheme names (e.g. rsa_pss_pss_sha512). - */ - sigalgs?: string | undefined; - /** - * Cipher suite specification, replacing the default. For more - * information, see modifying the default cipher suite. Permitted - * ciphers can be obtained via tls.getCiphers(). Cipher names must be - * uppercased in order for OpenSSL to accept them. - */ - ciphers?: string | undefined; - /** - * Name of an OpenSSL engine which can provide the client certificate. - */ - clientCertEngine?: string | undefined; - /** - * PEM formatted CRLs (Certificate Revocation Lists). - */ - crl?: string | Buffer | Array | undefined; - /** - * `'auto'` or custom Diffie-Hellman parameters, required for non-ECDHE perfect forward secrecy. - * If omitted or invalid, the parameters are silently discarded and DHE ciphers will not be available. - * ECDHE-based perfect forward secrecy will still be available. - */ - dhparam?: string | Buffer | undefined; - /** - * A string describing a named curve or a colon separated list of curve - * NIDs or names, for example P-521:P-384:P-256, to use for ECDH key - * agreement. Set to auto to select the curve automatically. Use - * crypto.getCurves() to obtain a list of available curve names. On - * recent releases, openssl ecparam -list_curves will also display the - * name and description of each available elliptic curve. Default: - * tls.DEFAULT_ECDH_CURVE. - */ - ecdhCurve?: string | undefined; - /** - * Attempt to use the server's cipher suite preferences instead of the - * client's. When true, causes SSL_OP_CIPHER_SERVER_PREFERENCE to be - * set in secureOptions - */ - honorCipherOrder?: boolean | undefined; - /** - * Private keys in PEM format. PEM allows the option of private keys - * being encrypted. Encrypted keys will be decrypted with - * options.passphrase. Multiple keys using different algorithms can be - * provided either as an array of unencrypted key strings or buffers, - * or an array of objects in the form {pem: [, - * passphrase: ]}. The object form can only occur in an array. - * object.passphrase is optional. Encrypted keys will be decrypted with - * object.passphrase if provided, or options.passphrase if it is not. - */ - key?: string | Buffer | Array | undefined; - /** - * Name of an OpenSSL engine to get private key from. Should be used - * together with privateKeyIdentifier. - */ - privateKeyEngine?: string | undefined; - /** - * Identifier of a private key managed by an OpenSSL engine. Should be - * used together with privateKeyEngine. Should not be set together with - * key, because both options define a private key in different ways. - */ - privateKeyIdentifier?: string | undefined; - /** - * Optionally set the maximum TLS version to allow. One - * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the - * `secureProtocol` option, use one or the other. - * **Default:** `'TLSv1.3'`, unless changed using CLI options. Using - * `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to - * `'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used. - */ - maxVersion?: SecureVersion | undefined; - /** - * Optionally set the minimum TLS version to allow. One - * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the - * `secureProtocol` option, use one or the other. It is not recommended to use - * less than TLSv1.2, but it may be required for interoperability. - * **Default:** `'TLSv1.2'`, unless changed using CLI options. Using - * `--tls-v1.0` sets the default to `'TLSv1'`. Using `--tls-v1.1` sets the default to - * `'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to - * 'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used. - */ - minVersion?: SecureVersion | undefined; - /** - * Shared passphrase used for a single private key and/or a PFX. - */ - passphrase?: string | undefined; - /** - * PFX or PKCS12 encoded private key and certificate chain. pfx is an - * alternative to providing key and cert individually. PFX is usually - * encrypted, if it is, passphrase will be used to decrypt it. Multiple - * PFX can be provided either as an array of unencrypted PFX buffers, - * or an array of objects in the form {buf: [, - * passphrase: ]}. The object form can only occur in an array. - * object.passphrase is optional. Encrypted PFX will be decrypted with - * object.passphrase if provided, or options.passphrase if it is not. - */ - pfx?: string | Buffer | Array | undefined; - /** - * Optionally affect the OpenSSL protocol behavior, which is not - * usually necessary. This should be used carefully if at all! Value is - * a numeric bitmask of the SSL_OP_* options from OpenSSL Options - */ - secureOptions?: number | undefined; // Value is a numeric bitmask of the `SSL_OP_*` options - /** - * Legacy mechanism to select the TLS protocol version to use, it does - * not support independent control of the minimum and maximum version, - * and does not support limiting the protocol to TLSv1.3. Use - * minVersion and maxVersion instead. The possible values are listed as - * SSL_METHODS, use the function names as strings. For example, use - * 'TLSv1_1_method' to force TLS version 1.1, or 'TLS_method' to allow - * any TLS protocol version up to TLSv1.3. It is not recommended to use - * TLS versions less than 1.2, but it may be required for - * interoperability. Default: none, see minVersion. - */ - secureProtocol?: string | undefined; - /** - * Opaque identifier used by servers to ensure session state is not - * shared between applications. Unused by clients. - */ - sessionIdContext?: string | undefined; - /** - * 48-bytes of cryptographically strong pseudo-random data. - * See Session Resumption for more information. - */ - ticketKeys?: Buffer | undefined; - /** - * The number of seconds after which a TLS session created by the - * server will no longer be resumable. See Session Resumption for more - * information. Default: 300. - */ - sessionTimeout?: number | undefined; - } - interface SecureContext { - context: any; - } - /** - * Verifies the certificate `cert` is issued to `hostname`. - * - * Returns [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object, populating it with `reason`, `host`, and `cert` on - * failure. On success, returns [undefined](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type). - * - * This function is intended to be used in combination with the`checkServerIdentity` option that can be passed to {@link connect} and as - * such operates on a `certificate object`. For other purposes, consider using `x509.checkHost()` instead. - * - * This function can be overwritten by providing an alternative function as the `options.checkServerIdentity` option that is passed to `tls.connect()`. The - * overwriting function can call `tls.checkServerIdentity()` of course, to augment - * the checks done with additional verification. - * - * This function is only called if the certificate passed all other checks, such as - * being issued by trusted CA (`options.ca`). - * - * Earlier versions of Node.js incorrectly accepted certificates for a given`hostname` if a matching `uniformResourceIdentifier` subject alternative name - * was present (see [CVE-2021-44531](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44531)). Applications that wish to accept`uniformResourceIdentifier` subject alternative names can use - * a custom `options.checkServerIdentity` function that implements the desired behavior. - * @since v0.8.4 - * @param hostname The host name or IP address to verify the certificate against. - * @param cert A `certificate object` representing the peer's certificate. - */ - function checkServerIdentity(hostname: string, cert: PeerCertificate): Error | undefined; - /** - * Creates a new {@link Server}. The `secureConnectionListener`, if provided, is - * automatically set as a listener for the `'secureConnection'` event. - * - * The `ticketKeys` options is automatically shared between `node:cluster` module - * workers. - * - * The following illustrates a simple echo server: - * - * ```js - * import tls from 'node:tls'; - * import fs from 'node:fs'; - * - * const options = { - * key: fs.readFileSync('server-key.pem'), - * cert: fs.readFileSync('server-cert.pem'), - * - * // This is necessary only if using client certificate authentication. - * requestCert: true, - * - * // This is necessary only if the client uses a self-signed certificate. - * ca: [ fs.readFileSync('client-cert.pem') ], - * }; - * - * const server = tls.createServer(options, (socket) => { - * console.log('server connected', - * socket.authorized ? 'authorized' : 'unauthorized'); - * socket.write('welcome!\n'); - * socket.setEncoding('utf8'); - * socket.pipe(socket); - * }); - * server.listen(8000, () => { - * console.log('server bound'); - * }); - * ``` - * - * The server can be tested by connecting to it using the example client from {@link connect}. - * @since v0.3.2 - */ - function createServer(secureConnectionListener?: (socket: TLSSocket) => void): Server; - function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server; - /** - * The `callback` function, if specified, will be added as a listener for the `'secureConnect'` event. - * - * `tls.connect()` returns a {@link TLSSocket} object. - * - * Unlike the `https` API, `tls.connect()` does not enable the - * SNI (Server Name Indication) extension by default, which may cause some - * servers to return an incorrect certificate or reject the connection - * altogether. To enable SNI, set the `servername` option in addition - * to `host`. - * - * The following illustrates a client for the echo server example from {@link createServer}: - * - * ```js - * // Assumes an echo server that is listening on port 8000. - * import tls from 'node:tls'; - * import fs from 'node:fs'; - * - * const options = { - * // Necessary only if the server requires client certificate authentication. - * key: fs.readFileSync('client-key.pem'), - * cert: fs.readFileSync('client-cert.pem'), - * - * // Necessary only if the server uses a self-signed certificate. - * ca: [ fs.readFileSync('server-cert.pem') ], - * - * // Necessary only if the server's cert isn't for "localhost". - * checkServerIdentity: () => { return null; }, - * }; - * - * const socket = tls.connect(8000, options, () => { - * console.log('client connected', - * socket.authorized ? 'authorized' : 'unauthorized'); - * process.stdin.pipe(socket); - * process.stdin.resume(); - * }); - * socket.setEncoding('utf8'); - * socket.on('data', (data) => { - * console.log(data); - * }); - * socket.on('end', () => { - * console.log('server ends connection'); - * }); - * ``` - * @since v0.11.3 - */ - function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; - function connect( - port: number, - host?: string, - options?: ConnectionOptions, - secureConnectListener?: () => void, - ): TLSSocket; - function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; - /** - * Creates a new secure pair object with two streams, one of which reads and writes - * the encrypted data and the other of which reads and writes the cleartext data. - * Generally, the encrypted stream is piped to/from an incoming encrypted data - * stream and the cleartext one is used as a replacement for the initial encrypted - * stream. - * - * `tls.createSecurePair()` returns a `tls.SecurePair` object with `cleartext` and `encrypted` stream properties. - * - * Using `cleartext` has the same API as {@link TLSSocket}. - * - * The `tls.createSecurePair()` method is now deprecated in favor of`tls.TLSSocket()`. For example, the code: - * - * ```js - * pair = tls.createSecurePair(// ... ); - * pair.encrypted.pipe(socket); - * socket.pipe(pair.encrypted); - * ``` - * - * can be replaced by: - * - * ```js - * secureSocket = tls.TLSSocket(socket, options); - * ``` - * - * where `secureSocket` has the same API as `pair.cleartext`. - * @since v0.3.2 - * @deprecated Since v0.11.3 - Use {@link TLSSocket} instead. - * @param context A secure context object as returned by `tls.createSecureContext()` - * @param isServer `true` to specify that this TLS connection should be opened as a server. - * @param requestCert `true` to specify whether a server should request a certificate from a connecting client. Only applies when `isServer` is `true`. - * @param rejectUnauthorized If not `false` a server automatically reject clients with invalid certificates. Only applies when `isServer` is `true`. - */ - function createSecurePair( - context?: SecureContext, - isServer?: boolean, - requestCert?: boolean, - rejectUnauthorized?: boolean, - ): SecurePair; - /** - * `{@link createServer}` sets the default value of the `honorCipherOrder` option - * to `true`, other APIs that create secure contexts leave it unset. - * - * `{@link createServer}` uses a 128 bit truncated SHA1 hash value generated - * from `process.argv` as the default value of the `sessionIdContext` option, other - * APIs that create secure contexts have no default value. - * - * The `tls.createSecureContext()` method creates a `SecureContext` object. It is - * usable as an argument to several `tls` APIs, such as `server.addContext()`, - * but has no public methods. The {@link Server} constructor and the {@link createServer} method do not support the `secureContext` option. - * - * A key is _required_ for ciphers that use certificates. Either `key` or `pfx` can be used to provide it. - * - * If the `ca` option is not given, then Node.js will default to using [Mozilla's publicly trusted list of - * CAs](https://hg.mozilla.org/mozilla-central/raw-file/tip/security/nss/lib/ckfw/builtins/certdata.txt). - * - * Custom DHE parameters are discouraged in favor of the new `dhparam: 'auto' `option. When set to `'auto'`, well-known DHE parameters of sufficient strength - * will be selected automatically. Otherwise, if necessary, `openssl dhparam` can - * be used to create custom parameters. The key length must be greater than or - * equal to 1024 bits or else an error will be thrown. Although 1024 bits is - * permissible, use 2048 bits or larger for stronger security. - * @since v0.11.13 - */ - function createSecureContext(options?: SecureContextOptions): SecureContext; - /** - * Returns an array with the names of the supported TLS ciphers. The names are - * lower-case for historical reasons, but must be uppercased to be used in - * the `ciphers` option of `{@link createSecureContext}`. - * - * Not all supported ciphers are enabled by default. See - * [Modifying the default TLS cipher suite](https://nodejs.org/docs/latest-v20.x/api/tls.html#modifying-the-default-tls-cipher-suite). - * - * Cipher names that start with `'tls_'` are for TLSv1.3, all the others are for - * TLSv1.2 and below. - * - * ```js - * console.log(tls.getCiphers()); // ['aes128-gcm-sha256', 'aes128-sha', ...] - * ``` - * @since v0.10.2 - */ - function getCiphers(): string[]; - /** - * The default curve name to use for ECDH key agreement in a tls server. - * The default value is `'auto'`. See `{@link createSecureContext()}` for further - * information. - * @since v0.11.13 - */ - let DEFAULT_ECDH_CURVE: string; - /** - * The default value of the `maxVersion` option of `{@link createSecureContext()}`. - * It can be assigned any of the supported TLS protocol versions, - * `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. **Default:** `'TLSv1.3'`, unless - * changed using CLI options. Using `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using - * `--tls-max-v1.3` sets the default to `'TLSv1.3'`. If multiple of the options - * are provided, the highest maximum is used. - * @since v11.4.0 - */ - let DEFAULT_MAX_VERSION: SecureVersion; - /** - * The default value of the `minVersion` option of `{@link createSecureContext()}`. - * It can be assigned any of the supported TLS protocol versions, - * `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. **Default:** `'TLSv1.2'`, unless - * changed using CLI options. Using `--tls-min-v1.0` sets the default to - * `'TLSv1'`. Using `--tls-min-v1.1` sets the default to `'TLSv1.1'`. Using - * `--tls-min-v1.3` sets the default to `'TLSv1.3'`. If multiple of the options - * are provided, the lowest minimum is used. - * @since v11.4.0 - */ - let DEFAULT_MIN_VERSION: SecureVersion; - /** - * The default value of the `ciphers` option of `{@link createSecureContext()}`. - * It can be assigned any of the supported OpenSSL ciphers. - * Defaults to the content of `crypto.constants.defaultCoreCipherList`, unless - * changed using CLI options using `--tls-default-ciphers`. - * @since v19.8.0 - */ - let DEFAULT_CIPHERS: string; - /** - * An immutable array of strings representing the root certificates (in PEM format) - * from the bundled Mozilla CA store as supplied by the current Node.js version. - * - * The bundled CA store, as supplied by Node.js, is a snapshot of Mozilla CA store - * that is fixed at release time. It is identical on all supported platforms. - * @since v12.3.0 - */ - const rootCertificates: readonly string[]; -} -declare module "node:tls" { - export * from "tls"; -} diff --git a/node_modules/@types/node/trace_events.d.ts b/node_modules/@types/node/trace_events.d.ts deleted file mode 100644 index 6d4aece..0000000 --- a/node_modules/@types/node/trace_events.d.ts +++ /dev/null @@ -1,197 +0,0 @@ -/** - * The `node:trace_events` module provides a mechanism to centralize tracing information - * generated by V8, Node.js core, and userspace code. - * - * Tracing can be enabled with the `--trace-event-categories` command-line flag - * or by using the `trace_events` module. The `--trace-event-categories` flag - * accepts a list of comma-separated category names. - * - * The available categories are: - * - * * `node`: An empty placeholder. - * * `node.async_hooks`: Enables capture of detailed [`async_hooks`](https://nodejs.org/docs/latest-v20.x/api/async_hooks.html) trace data. - * The [`async_hooks`](https://nodejs.org/docs/latest-v20.x/api/async_hooks.html) events have a unique `asyncId` and a special `triggerId` `triggerAsyncId` property. - * * `node.bootstrap`: Enables capture of Node.js bootstrap milestones. - * * `node.console`: Enables capture of `console.time()` and `console.count()` output. - * * `node.threadpoolwork.sync`: Enables capture of trace data for threadpool synchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`. - * * `node.threadpoolwork.async`: Enables capture of trace data for threadpool asynchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`. - * * `node.dns.native`: Enables capture of trace data for DNS queries. - * * `node.net.native`: Enables capture of trace data for network. - * * `node.environment`: Enables capture of Node.js Environment milestones. - * * `node.fs.sync`: Enables capture of trace data for file system sync methods. - * * `node.fs_dir.sync`: Enables capture of trace data for file system sync directory methods. - * * `node.fs.async`: Enables capture of trace data for file system async methods. - * * `node.fs_dir.async`: Enables capture of trace data for file system async directory methods. - * * `node.perf`: Enables capture of [Performance API](https://nodejs.org/docs/latest-v20.x/api/perf_hooks.html) measurements. - * * `node.perf.usertiming`: Enables capture of only Performance API User Timing - * measures and marks. - * * `node.perf.timerify`: Enables capture of only Performance API timerify - * measurements. - * * `node.promises.rejections`: Enables capture of trace data tracking the number - * of unhandled Promise rejections and handled-after-rejections. - * * `node.vm.script`: Enables capture of trace data for the `node:vm` module's `runInNewContext()`, `runInContext()`, and `runInThisContext()` methods. - * * `v8`: The [V8](https://nodejs.org/docs/latest-v20.x/api/v8.html) events are GC, compiling, and execution related. - * * `node.http`: Enables capture of trace data for http request / response. - * - * By default the `node`, `node.async_hooks`, and `v8` categories are enabled. - * - * ```bash - * node --trace-event-categories v8,node,node.async_hooks server.js - * ``` - * - * Prior versions of Node.js required the use of the `--trace-events-enabled` flag to enable trace events. This requirement has been removed. However, the `--trace-events-enabled` flag _may_ still be - * used and will enable the `node`, `node.async_hooks`, and `v8` trace event categories by default. - * - * ```bash - * node --trace-events-enabled - * - * # is equivalent to - * - * node --trace-event-categories v8,node,node.async_hooks - * ``` - * - * Alternatively, trace events may be enabled using the `node:trace_events` module: - * - * ```js - * import trace_events from 'node:trace_events'; - * const tracing = trace_events.createTracing({ categories: ['node.perf'] }); - * tracing.enable(); // Enable trace event capture for the 'node.perf' category - * - * // do work - * - * tracing.disable(); // Disable trace event capture for the 'node.perf' category - * ``` - * - * Running Node.js with tracing enabled will produce log files that can be opened - * in the [`chrome://tracing`](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) tab of Chrome. - * - * The logging file is by default called `node_trace.${rotation}.log`, where `${rotation}` is an incrementing log-rotation id. The filepath pattern can - * be specified with `--trace-event-file-pattern` that accepts a template - * string that supports `${rotation}` and `${pid}`: - * - * ```bash - * node --trace-event-categories v8 --trace-event-file-pattern '${pid}-${rotation}.log' server.js - * ``` - * - * To guarantee that the log file is properly generated after signal events like `SIGINT`, `SIGTERM`, or `SIGBREAK`, make sure to have the appropriate handlers - * in your code, such as: - * - * ```js - * process.on('SIGINT', function onSigint() { - * console.info('Received SIGINT.'); - * process.exit(130); // Or applicable exit code depending on OS and signal - * }); - * ``` - * - * The tracing system uses the same time source - * as the one used by `process.hrtime()`. - * However the trace-event timestamps are expressed in microseconds, - * unlike `process.hrtime()` which returns nanoseconds. - * - * The features from this module are not available in [`Worker`](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html#class-worker) threads. - * @experimental - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/trace_events.js) - */ -declare module "trace_events" { - /** - * The `Tracing` object is used to enable or disable tracing for sets of - * categories. Instances are created using the - * `trace_events.createTracing()` method. - * - * When created, the `Tracing` object is disabled. Calling the - * `tracing.enable()` method adds the categories to the set of enabled trace - * event categories. Calling `tracing.disable()` will remove the categories - * from the set of enabled trace event categories. - */ - interface Tracing { - /** - * A comma-separated list of the trace event categories covered by this - * `Tracing` object. - * @since v10.0.0 - */ - readonly categories: string; - /** - * Disables this `Tracing` object. - * - * Only trace event categories _not_ covered by other enabled `Tracing` - * objects and _not_ specified by the `--trace-event-categories` flag - * will be disabled. - * - * ```js - * import trace_events from 'node:trace_events'; - * const t1 = trace_events.createTracing({ categories: ['node', 'v8'] }); - * const t2 = trace_events.createTracing({ categories: ['node.perf', 'node'] }); - * t1.enable(); - * t2.enable(); - * - * // Prints 'node,node.perf,v8' - * console.log(trace_events.getEnabledCategories()); - * - * t2.disable(); // Will only disable emission of the 'node.perf' category - * - * // Prints 'node,v8' - * console.log(trace_events.getEnabledCategories()); - * ``` - * @since v10.0.0 - */ - disable(): void; - /** - * Enables this `Tracing` object for the set of categories covered by - * the `Tracing` object. - * @since v10.0.0 - */ - enable(): void; - /** - * `true` only if the `Tracing` object has been enabled. - * @since v10.0.0 - */ - readonly enabled: boolean; - } - interface CreateTracingOptions { - /** - * An array of trace category names. Values included in the array are - * coerced to a string when possible. An error will be thrown if the - * value cannot be coerced. - */ - categories: string[]; - } - /** - * Creates and returns a `Tracing` object for the given set of `categories`. - * - * ```js - * import trace_events from 'node:trace_events'; - * const categories = ['node.perf', 'node.async_hooks']; - * const tracing = trace_events.createTracing({ categories }); - * tracing.enable(); - * // do stuff - * tracing.disable(); - * ``` - * @since v10.0.0 - */ - function createTracing(options: CreateTracingOptions): Tracing; - /** - * Returns a comma-separated list of all currently-enabled trace event - * categories. The current set of enabled trace event categories is determined - * by the _union_ of all currently-enabled `Tracing` objects and any categories - * enabled using the `--trace-event-categories` flag. - * - * Given the file `test.js` below, the command `node --trace-event-categories node.perf test.js` will print `'node.async_hooks,node.perf'` to the console. - * - * ```js - * import trace_events from 'node:trace_events'; - * const t1 = trace_events.createTracing({ categories: ['node.async_hooks'] }); - * const t2 = trace_events.createTracing({ categories: ['node.perf'] }); - * const t3 = trace_events.createTracing({ categories: ['v8'] }); - * - * t1.enable(); - * t2.enable(); - * - * console.log(trace_events.getEnabledCategories()); - * ``` - * @since v10.0.0 - */ - function getEnabledCategories(): string | undefined; -} -declare module "node:trace_events" { - export * from "trace_events"; -} diff --git a/node_modules/@types/node/ts5.6/buffer.buffer.d.ts b/node_modules/@types/node/ts5.6/buffer.buffer.d.ts deleted file mode 100644 index a5f67d7..0000000 --- a/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +++ /dev/null @@ -1,468 +0,0 @@ -declare module "buffer" { - global { - interface BufferConstructor { - // see ../buffer.d.ts for implementation shared with all TypeScript versions - - /** - * Allocates a new buffer containing the given {str}. - * - * @param str String to store in buffer. - * @param encoding encoding to use, optional. Default is 'utf8' - * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead. - */ - new(str: string, encoding?: BufferEncoding): Buffer; - /** - * Allocates a new buffer of {size} octets. - * - * @param size count of octets to allocate. - * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`). - */ - new(size: number): Buffer; - /** - * Allocates a new buffer containing the given {array} of octets. - * - * @param array The octets to store. - * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead. - */ - new(array: ArrayLike): Buffer; - /** - * Produces a Buffer backed by the same allocated memory as - * the given {ArrayBuffer}/{SharedArrayBuffer}. - * - * @param arrayBuffer The ArrayBuffer with which to share memory. - * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead. - */ - new(arrayBuffer: ArrayBufferLike): Buffer; - /** - * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`. - * Array entries outside that range will be truncated to fit into it. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'. - * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]); - * ``` - * - * If `array` is an `Array`-like object (that is, one with a `length` property of - * type `number`), it is treated as if it is an array, unless it is a `Buffer` or - * a `Uint8Array`. This means all other `TypedArray` variants get treated as an - * `Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use - * `Buffer.copyBytesFrom()`. - * - * A `TypeError` will be thrown if `array` is not an `Array` or another type - * appropriate for `Buffer.from()` variants. - * - * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal - * `Buffer` pool like `Buffer.allocUnsafe()` does. - * @since v5.10.0 - */ - from(array: WithImplicitCoercion>): Buffer; - /** - * This creates a view of the `ArrayBuffer` without copying the underlying - * memory. For example, when passed a reference to the `.buffer` property of a - * `TypedArray` instance, the newly created `Buffer` will share the same - * allocated memory as the `TypedArray`'s underlying `ArrayBuffer`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const arr = new Uint16Array(2); - * - * arr[0] = 5000; - * arr[1] = 4000; - * - * // Shares memory with `arr`. - * const buf = Buffer.from(arr.buffer); - * - * console.log(buf); - * // Prints: - * - * // Changing the original Uint16Array changes the Buffer also. - * arr[1] = 6000; - * - * console.log(buf); - * // Prints: - * ``` - * - * The optional `byteOffset` and `length` arguments specify a memory range within - * the `arrayBuffer` that will be shared by the `Buffer`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const ab = new ArrayBuffer(10); - * const buf = Buffer.from(ab, 0, 2); - * - * console.log(buf.length); - * // Prints: 2 - * ``` - * - * A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer` or a - * `SharedArrayBuffer` or another type appropriate for `Buffer.from()` - * variants. - * - * It is important to remember that a backing `ArrayBuffer` can cover a range - * of memory that extends beyond the bounds of a `TypedArray` view. A new - * `Buffer` created using the `buffer` property of a `TypedArray` may extend - * beyond the range of the `TypedArray`: - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const arrA = Uint8Array.from([0x63, 0x64, 0x65, 0x66]); // 4 elements - * const arrB = new Uint8Array(arrA.buffer, 1, 2); // 2 elements - * console.log(arrA.buffer === arrB.buffer); // true - * - * const buf = Buffer.from(arrB.buffer); - * console.log(buf); - * // Prints: - * ``` - * @since v5.10.0 - * @param arrayBuffer An `ArrayBuffer`, `SharedArrayBuffer`, for example the - * `.buffer` property of a `TypedArray`. - * @param byteOffset Index of first byte to expose. **Default:** `0`. - * @param length Number of bytes to expose. **Default:** - * `arrayBuffer.byteLength - byteOffset`. - */ - from( - arrayBuffer: WithImplicitCoercion, - byteOffset?: number, - length?: number, - ): Buffer; - /** - * Creates a new `Buffer` containing `string`. The `encoding` parameter identifies - * the character encoding to be used when converting `string` into bytes. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf1 = Buffer.from('this is a tést'); - * const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); - * - * console.log(buf1.toString()); - * // Prints: this is a tést - * console.log(buf2.toString()); - * // Prints: this is a tést - * console.log(buf1.toString('latin1')); - * // Prints: this is a tést - * ``` - * - * A `TypeError` will be thrown if `string` is not a string or another type - * appropriate for `Buffer.from()` variants. - * - * `Buffer.from(string)` may also use the internal `Buffer` pool like - * `Buffer.allocUnsafe()` does. - * @since v5.10.0 - * @param string A string to encode. - * @param encoding The encoding of `string`. **Default:** `'utf8'`. - */ - from(string: WithImplicitCoercion, encoding?: BufferEncoding): Buffer; - from(arrayOrString: WithImplicitCoercion | string>): Buffer; - /** - * Creates a new Buffer using the passed {data} - * @param values to create a new Buffer - */ - of(...items: number[]): Buffer; - /** - * Returns a new `Buffer` which is the result of concatenating all the `Buffer` instances in the `list` together. - * - * If the list has no items, or if the `totalLength` is 0, then a new zero-length `Buffer` is returned. - * - * If `totalLength` is not provided, it is calculated from the `Buffer` instances - * in `list` by adding their lengths. - * - * If `totalLength` is provided, it is coerced to an unsigned integer. If the - * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is - * truncated to `totalLength`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Create a single `Buffer` from a list of three `Buffer` instances. - * - * const buf1 = Buffer.alloc(10); - * const buf2 = Buffer.alloc(14); - * const buf3 = Buffer.alloc(18); - * const totalLength = buf1.length + buf2.length + buf3.length; - * - * console.log(totalLength); - * // Prints: 42 - * - * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength); - * - * console.log(bufA); - * // Prints: - * console.log(bufA.length); - * // Prints: 42 - * ``` - * - * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does. - * @since v0.7.11 - * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate. - * @param totalLength Total length of the `Buffer` instances in `list` when concatenated. - */ - concat(list: readonly Uint8Array[], totalLength?: number): Buffer; - /** - * Copies the underlying memory of `view` into a new `Buffer`. - * - * ```js - * const u16 = new Uint16Array([0, 0xffff]); - * const buf = Buffer.copyBytesFrom(u16, 1, 1); - * u16[1] = 0; - * console.log(buf.length); // 2 - * console.log(buf[0]); // 255 - * console.log(buf[1]); // 255 - * ``` - * @since v19.8.0 - * @param view The {TypedArray} to copy. - * @param [offset=0] The starting offset within `view`. - * @param [length=view.length - offset] The number of elements from `view` to copy. - */ - copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer; - /** - * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(5); - * - * console.log(buf); - * // Prints: - * ``` - * - * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. - * - * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(5, 'a'); - * - * console.log(buf); - * // Prints: - * ``` - * - * If both `fill` and `encoding` are specified, the allocated `Buffer` will be - * initialized by calling `buf.fill(fill, encoding)`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); - * - * console.log(buf); - * // Prints: - * ``` - * - * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance - * contents will never contain sensitive data from previous allocations, including - * data that might not have been allocated for `Buffer`s. - * - * A `TypeError` will be thrown if `size` is not a number. - * @since v5.10.0 - * @param size The desired length of the new `Buffer`. - * @param [fill=0] A value to pre-fill the new `Buffer` with. - * @param [encoding='utf8'] If `fill` is a string, this is its encoding. - */ - alloc(size: number, fill?: string | Uint8Array | number, encoding?: BufferEncoding): Buffer; - /** - * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. - * - * The underlying memory for `Buffer` instances created in this way is _not_ - * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.allocUnsafe(10); - * - * console.log(buf); - * // Prints (contents may vary): - * - * buf.fill(0); - * - * console.log(buf); - * // Prints: - * ``` - * - * A `TypeError` will be thrown if `size` is not a number. - * - * The `Buffer` module pre-allocates an internal `Buffer` instance of - * size `Buffer.poolSize` that is used as a pool for the fast allocation of new `Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`, - * and `Buffer.concat()` only when `size` is less than `Buffer.poolSize >>> 1` (floor of `Buffer.poolSize` divided by two). - * - * Use of this pre-allocated internal memory pool is a key difference between - * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. - * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less - * than or equal to half `Buffer.poolSize`. The - * difference is subtle but can be important when an application requires the - * additional performance that `Buffer.allocUnsafe()` provides. - * @since v5.10.0 - * @param size The desired length of the new `Buffer`. - */ - allocUnsafe(size: number): Buffer; - /** - * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. A zero-length `Buffer` is created if - * `size` is 0. - * - * The underlying memory for `Buffer` instances created in this way is _not_ - * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize - * such `Buffer` instances with zeroes. - * - * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, - * allocations under 4 KiB are sliced from a single pre-allocated `Buffer`. This - * allows applications to avoid the garbage collection overhead of creating many - * individually allocated `Buffer` instances. This approach improves both - * performance and memory usage by eliminating the need to track and clean up as - * many individual `ArrayBuffer` objects. - * - * However, in the case where a developer may need to retain a small chunk of - * memory from a pool for an indeterminate amount of time, it may be appropriate - * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and - * then copying out the relevant bits. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Need to keep around a few small chunks of memory. - * const store = []; - * - * socket.on('readable', () => { - * let data; - * while (null !== (data = readable.read())) { - * // Allocate for retained data. - * const sb = Buffer.allocUnsafeSlow(10); - * - * // Copy the data into the new allocation. - * data.copy(sb, 0, 0, 10); - * - * store.push(sb); - * } - * }); - * ``` - * - * A `TypeError` will be thrown if `size` is not a number. - * @since v5.12.0 - * @param size The desired length of the new `Buffer`. - */ - allocUnsafeSlow(size: number): Buffer; - } - interface Buffer extends Uint8Array { - // see ../buffer.d.ts for implementation shared with all TypeScript versions - - /** - * Returns a new `Buffer` that references the same memory as the original, but - * offset and cropped by the `start` and `end` indices. - * - * This method is not compatible with the `Uint8Array.prototype.slice()`, - * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('buffer'); - * - * const copiedBuf = Uint8Array.prototype.slice.call(buf); - * copiedBuf[0]++; - * console.log(copiedBuf.toString()); - * // Prints: cuffer - * - * console.log(buf.toString()); - * // Prints: buffer - * - * // With buf.slice(), the original buffer is modified. - * const notReallyCopiedBuf = buf.slice(); - * notReallyCopiedBuf[0]++; - * console.log(notReallyCopiedBuf.toString()); - * // Prints: cuffer - * console.log(buf.toString()); - * // Also prints: cuffer (!) - * ``` - * @since v0.3.0 - * @deprecated Use `subarray` instead. - * @param [start=0] Where the new `Buffer` will start. - * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). - */ - slice(start?: number, end?: number): Buffer; - /** - * Returns a new `Buffer` that references the same memory as the original, but - * offset and cropped by the `start` and `end` indices. - * - * Specifying `end` greater than `buf.length` will return the same result as - * that of `end` equal to `buf.length`. - * - * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray). - * - * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte - * // from the original `Buffer`. - * - * const buf1 = Buffer.allocUnsafe(26); - * - * for (let i = 0; i < 26; i++) { - * // 97 is the decimal ASCII value for 'a'. - * buf1[i] = i + 97; - * } - * - * const buf2 = buf1.subarray(0, 3); - * - * console.log(buf2.toString('ascii', 0, buf2.length)); - * // Prints: abc - * - * buf1[0] = 33; - * - * console.log(buf2.toString('ascii', 0, buf2.length)); - * // Prints: !bc - * ``` - * - * Specifying negative indexes causes the slice to be generated relative to the - * end of `buf` rather than the beginning. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * const buf = Buffer.from('buffer'); - * - * console.log(buf.subarray(-6, -1).toString()); - * // Prints: buffe - * // (Equivalent to buf.subarray(0, 5).) - * - * console.log(buf.subarray(-6, -2).toString()); - * // Prints: buff - * // (Equivalent to buf.subarray(0, 4).) - * - * console.log(buf.subarray(-5, -2).toString()); - * // Prints: uff - * // (Equivalent to buf.subarray(1, 4).) - * ``` - * @since v3.0.0 - * @param [start=0] Where the new `Buffer` will start. - * @param [end=buf.length] Where the new `Buffer` will end (not inclusive). - */ - subarray(start?: number, end?: number): Buffer; - } - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type NonSharedBuffer = Buffer; - /** - * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports - * TypeScript versions earlier than 5.7. - */ - type AllowSharedBuffer = Buffer; - } - /** @deprecated Use `Buffer.allocUnsafeSlow()` instead. */ - var SlowBuffer: { - /** @deprecated Use `Buffer.allocUnsafeSlow()` instead. */ - new(size: number): Buffer; - prototype: Buffer; - }; -} diff --git a/node_modules/@types/node/ts5.6/globals.typedarray.d.ts b/node_modules/@types/node/ts5.6/globals.typedarray.d.ts deleted file mode 100644 index f1c444d..0000000 --- a/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -export {}; // Make this a module - -declare global { - namespace NodeJS { - type TypedArray = - | Uint8Array - | Uint8ClampedArray - | Uint16Array - | Uint32Array - | Int8Array - | Int16Array - | Int32Array - | BigUint64Array - | BigInt64Array - | Float32Array - | Float64Array; - type ArrayBufferView = TypedArray | DataView; - - type NonSharedUint8Array = Uint8Array; - type NonSharedUint8ClampedArray = Uint8ClampedArray; - type NonSharedUint16Array = Uint16Array; - type NonSharedUint32Array = Uint32Array; - type NonSharedInt8Array = Int8Array; - type NonSharedInt16Array = Int16Array; - type NonSharedInt32Array = Int32Array; - type NonSharedBigUint64Array = BigUint64Array; - type NonSharedBigInt64Array = BigInt64Array; - type NonSharedFloat32Array = Float32Array; - type NonSharedFloat64Array = Float64Array; - type NonSharedDataView = DataView; - type NonSharedTypedArray = TypedArray; - type NonSharedArrayBufferView = ArrayBufferView; - } -} diff --git a/node_modules/@types/node/ts5.6/index.d.ts b/node_modules/@types/node/ts5.6/index.d.ts deleted file mode 100644 index 291308f..0000000 --- a/node_modules/@types/node/ts5.6/index.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -/** - * License for programmatically and manually incorporated - * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc - * - * Copyright Node.js contributors. All rights reserved. - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -// NOTE: These definitions support Node.js and TypeScript 4.9 through 5.6. - -// Reference required TypeScript libs: -/// - -// TypeScript backwards-compatibility definitions: -/// - -// Definitions specific to TypeScript 4.9 through 5.6: -/// -/// - -// Definitions for Node.js modules that are not specific to any version of TypeScript: -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// diff --git a/node_modules/@types/node/tty.d.ts b/node_modules/@types/node/tty.d.ts deleted file mode 100644 index d4b9313..0000000 --- a/node_modules/@types/node/tty.d.ts +++ /dev/null @@ -1,208 +0,0 @@ -/** - * The `node:tty` module provides the `tty.ReadStream` and `tty.WriteStream` classes. In most cases, it will not be necessary or possible to use this module - * directly. However, it can be accessed using: - * - * ```js - * import tty from 'node:tty'; - * ``` - * - * When Node.js detects that it is being run with a text terminal ("TTY") - * attached, `process.stdin` will, by default, be initialized as an instance of `tty.ReadStream` and both `process.stdout` and `process.stderr` will, by - * default, be instances of `tty.WriteStream`. The preferred method of determining - * whether Node.js is being run within a TTY context is to check that the value of - * the `process.stdout.isTTY` property is `true`: - * - * ```console - * $ node -p -e "Boolean(process.stdout.isTTY)" - * true - * $ node -p -e "Boolean(process.stdout.isTTY)" | cat - * false - * ``` - * - * In most cases, there should be little to no reason for an application to - * manually create instances of the `tty.ReadStream` and `tty.WriteStream` classes. - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/tty.js) - */ -declare module "tty" { - import * as net from "node:net"; - /** - * The `tty.isatty()` method returns `true` if the given `fd` is associated with - * a TTY and `false` if it is not, including whenever `fd` is not a non-negative - * integer. - * @since v0.5.8 - * @param fd A numeric file descriptor - */ - function isatty(fd: number): boolean; - /** - * Represents the readable side of a TTY. In normal circumstances `process.stdin` will be the only `tty.ReadStream` instance in a Node.js - * process and there should be no reason to create additional instances. - * @since v0.5.8 - */ - class ReadStream extends net.Socket { - constructor(fd: number, options?: net.SocketConstructorOpts); - /** - * A `boolean` that is `true` if the TTY is currently configured to operate as a - * raw device. - * - * This flag is always `false` when a process starts, even if the terminal is - * operating in raw mode. Its value will change with subsequent calls to `setRawMode`. - * @since v0.7.7 - */ - isRaw: boolean; - /** - * Allows configuration of `tty.ReadStream` so that it operates as a raw device. - * - * When in raw mode, input is always available character-by-character, not - * including modifiers. Additionally, all special processing of characters by the - * terminal is disabled, including echoing input - * characters. Ctrl+C will no longer cause a `SIGINT` when - * in this mode. - * @since v0.7.7 - * @param mode If `true`, configures the `tty.ReadStream` to operate as a raw device. If `false`, configures the `tty.ReadStream` to operate in its default mode. The `readStream.isRaw` - * property will be set to the resulting mode. - * @return The read stream instance. - */ - setRawMode(mode: boolean): this; - /** - * A `boolean` that is always `true` for `tty.ReadStream` instances. - * @since v0.5.8 - */ - isTTY: boolean; - } - /** - * -1 - to the left from cursor - * 0 - the entire line - * 1 - to the right from cursor - */ - type Direction = -1 | 0 | 1; - /** - * Represents the writable side of a TTY. In normal circumstances, `process.stdout` and `process.stderr` will be the only`tty.WriteStream` instances created for a Node.js process and there - * should be no reason to create additional instances. - * @since v0.5.8 - */ - class WriteStream extends net.Socket { - constructor(fd: number); - addListener(event: string, listener: (...args: any[]) => void): this; - addListener(event: "resize", listener: () => void): this; - emit(event: string | symbol, ...args: any[]): boolean; - emit(event: "resize"): boolean; - on(event: string, listener: (...args: any[]) => void): this; - on(event: "resize", listener: () => void): this; - once(event: string, listener: (...args: any[]) => void): this; - once(event: "resize", listener: () => void): this; - prependListener(event: string, listener: (...args: any[]) => void): this; - prependListener(event: "resize", listener: () => void): this; - prependOnceListener(event: string, listener: (...args: any[]) => void): this; - prependOnceListener(event: "resize", listener: () => void): this; - /** - * `writeStream.clearLine()` clears the current line of this `WriteStream` in a - * direction identified by `dir`. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - clearLine(dir: Direction, callback?: () => void): boolean; - /** - * `writeStream.clearScreenDown()` clears this `WriteStream` from the current - * cursor down. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - clearScreenDown(callback?: () => void): boolean; - /** - * `writeStream.cursorTo()` moves this `WriteStream`'s cursor to the specified - * position. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - cursorTo(x: number, y?: number, callback?: () => void): boolean; - cursorTo(x: number, callback: () => void): boolean; - /** - * `writeStream.moveCursor()` moves this `WriteStream`'s cursor _relative_ to its - * current position. - * @since v0.7.7 - * @param callback Invoked once the operation completes. - * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`. - */ - moveCursor(dx: number, dy: number, callback?: () => void): boolean; - /** - * Returns: - * - * * `1` for 2, - * * `4` for 16, - * * `8` for 256, - * * `24` for 16,777,216 colors supported. - * - * Use this to determine what colors the terminal supports. Due to the nature of - * colors in terminals it is possible to either have false positives or false - * negatives. It depends on process information and the environment variables that - * may lie about what terminal is used. - * It is possible to pass in an `env` object to simulate the usage of a specific - * terminal. This can be useful to check how specific environment settings behave. - * - * To enforce a specific color support, use one of the below environment settings. - * - * * 2 colors: `FORCE_COLOR = 0` (Disables colors) - * * 16 colors: `FORCE_COLOR = 1` - * * 256 colors: `FORCE_COLOR = 2` - * * 16,777,216 colors: `FORCE_COLOR = 3` - * - * Disabling color support is also possible by using the `NO_COLOR` and `NODE_DISABLE_COLORS` environment variables. - * @since v9.9.0 - * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal. - */ - getColorDepth(env?: object): number; - /** - * Returns `true` if the `writeStream` supports at least as many colors as provided - * in `count`. Minimum support is 2 (black and white). - * - * This has the same false positives and negatives as described in `writeStream.getColorDepth()`. - * - * ```js - * process.stdout.hasColors(); - * // Returns true or false depending on if `stdout` supports at least 16 colors. - * process.stdout.hasColors(256); - * // Returns true or false depending on if `stdout` supports at least 256 colors. - * process.stdout.hasColors({ TMUX: '1' }); - * // Returns true. - * process.stdout.hasColors(2 ** 24, { TMUX: '1' }); - * // Returns false (the environment setting pretends to support 2 ** 8 colors). - * ``` - * @since v11.13.0, v10.16.0 - * @param [count=16] The number of colors that are requested (minimum 2). - * @param [env=process.env] An object containing the environment variables to check. This enables simulating the usage of a specific terminal. - */ - hasColors(count?: number): boolean; - hasColors(env?: object): boolean; - hasColors(count: number, env?: object): boolean; - /** - * `writeStream.getWindowSize()` returns the size of the TTY - * corresponding to this `WriteStream`. The array is of the type `[numColumns, numRows]` where `numColumns` and `numRows` represent the number - * of columns and rows in the corresponding TTY. - * @since v0.7.7 - */ - getWindowSize(): [number, number]; - /** - * A `number` specifying the number of columns the TTY currently has. This property - * is updated whenever the `'resize'` event is emitted. - * @since v0.7.7 - */ - columns: number; - /** - * A `number` specifying the number of rows the TTY currently has. This property - * is updated whenever the `'resize'` event is emitted. - * @since v0.7.7 - */ - rows: number; - /** - * A `boolean` that is always `true`. - * @since v0.5.8 - */ - isTTY: boolean; - } -} -declare module "node:tty" { - export * from "tty"; -} diff --git a/node_modules/@types/node/url.d.ts b/node_modules/@types/node/url.d.ts deleted file mode 100644 index 4d83629..0000000 --- a/node_modules/@types/node/url.d.ts +++ /dev/null @@ -1,964 +0,0 @@ -/** - * The `node:url` module provides utilities for URL resolution and parsing. It can - * be accessed using: - * - * ```js - * import url from 'node:url'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/url.js) - */ -declare module "url" { - import { Blob as NodeBlob, NonSharedBuffer } from "node:buffer"; - import { ClientRequestArgs } from "node:http"; - import { ParsedUrlQuery, ParsedUrlQueryInput } from "node:querystring"; - // Input to `url.format` - interface UrlObject { - auth?: string | null | undefined; - hash?: string | null | undefined; - host?: string | null | undefined; - hostname?: string | null | undefined; - href?: string | null | undefined; - pathname?: string | null | undefined; - protocol?: string | null | undefined; - search?: string | null | undefined; - slashes?: boolean | null | undefined; - port?: string | number | null | undefined; - query?: string | null | ParsedUrlQueryInput | undefined; - } - // Output of `url.parse` - interface Url { - auth: string | null; - hash: string | null; - host: string | null; - hostname: string | null; - href: string; - path: string | null; - pathname: string | null; - protocol: string | null; - search: string | null; - slashes: boolean | null; - port: string | null; - query: string | null | ParsedUrlQuery; - } - interface UrlWithParsedQuery extends Url { - query: ParsedUrlQuery; - } - interface UrlWithStringQuery extends Url { - query: string | null; - } - interface FileUrlToPathOptions { - /** - * `true` if the `path` should be return as a windows filepath, `false` for posix, and `undefined` for the system default. - * @default undefined - */ - windows?: boolean | undefined; - } - interface PathToFileUrlOptions extends FileUrlToPathOptions {} - /** - * The `url.parse()` method takes a URL string, parses it, and returns a URL - * object. - * - * A `TypeError` is thrown if `urlString` is not a string. - * - * A `URIError` is thrown if the `auth` property is present but cannot be decoded. - * - * `url.parse()` uses a lenient, non-standard algorithm for parsing URL - * strings. It is prone to security issues such as [host name spoofing](https://hackerone.com/reports/678487) and incorrect handling of usernames and passwords. Do not use with untrusted - * input. CVEs are not issued for `url.parse()` vulnerabilities. Use the `WHATWG URL` API instead. - * @since v0.1.25 - * @deprecated Use the WHATWG URL API instead. - * @param urlString The URL string to parse. - * @param [parseQueryString=false] If `true`, the `query` property will always be set to an object returned by the {@link querystring} module's `parse()` method. If `false`, the `query` property - * on the returned URL object will be an unparsed, undecoded string. - * @param [slashesDenoteHost=false] If `true`, the first token after the literal string `//` and preceding the next `/` will be interpreted as the `host`. For instance, given `//foo/bar`, the - * result would be `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`. - */ - function parse(urlString: string): UrlWithStringQuery; - function parse( - urlString: string, - parseQueryString: false | undefined, - slashesDenoteHost?: boolean, - ): UrlWithStringQuery; - function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery; - function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url; - /** - * The `url.format()` method returns a formatted URL string derived from `urlObject`. - * - * ```js - * import url from 'node:url'; - * url.format({ - * protocol: 'https', - * hostname: 'example.com', - * pathname: '/some/path', - * query: { - * page: 1, - * format: 'json', - * }, - * }); - * - * // => 'https://example.com/some/path?page=1&format=json' - * ``` - * - * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`. - * - * The formatting process operates as follows: - * - * * A new empty string `result` is created. - * * If `urlObject.protocol` is a string, it is appended as-is to `result`. - * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown. - * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII - * colon (`:`) character, the literal string `:` will be appended to `result`. - * * If either of the following conditions is true, then the literal string `//` will be appended to `result`: - * * `urlObject.slashes` property is true; - * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or `file`; - * * If the value of the `urlObject.auth` property is truthy, and either `urlObject.host` or `urlObject.hostname` are not `undefined`, the value of `urlObject.auth` will be coerced into a string - * and appended to `result` followed by the literal string `@`. - * * If the `urlObject.host` property is `undefined` then: - * * If the `urlObject.hostname` is a string, it is appended to `result`. - * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string, - * an `Error` is thrown. - * * If the `urlObject.port` property value is truthy, and `urlObject.hostname` is not `undefined`: - * * The literal string `:` is appended to `result`, and - * * The value of `urlObject.port` is coerced to a string and appended to `result`. - * * Otherwise, if the `urlObject.host` property value is truthy, the value of `urlObject.host` is coerced to a string and appended to `result`. - * * If the `urlObject.pathname` property is a string that is not an empty string: - * * If the `urlObject.pathname` _does not start_ with an ASCII forward slash - * (`/`), then the literal string `'/'` is appended to `result`. - * * The value of `urlObject.pathname` is appended to `result`. - * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown. - * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result` followed by the output of calling the - * `querystring` module's `stringify()` method passing the value of `urlObject.query`. - * * Otherwise, if `urlObject.search` is a string: - * * If the value of `urlObject.search` _does not start_ with the ASCII question - * mark (`?`) character, the literal string `?` is appended to `result`. - * * The value of `urlObject.search` is appended to `result`. - * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown. - * * If the `urlObject.hash` property is a string: - * * If the value of `urlObject.hash` _does not start_ with the ASCII hash (`#`) - * character, the literal string `#` is appended to `result`. - * * The value of `urlObject.hash` is appended to `result`. - * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a - * string, an `Error` is thrown. - * * `result` is returned. - * @since v0.1.25 - * @legacy Use the WHATWG URL API instead. - * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`. - */ - function format(urlObject: URL, options?: URLFormatOptions): string; - /** - * The `url.format()` method returns a formatted URL string derived from `urlObject`. - * - * ```js - * import url from 'node:url'; - * url.format({ - * protocol: 'https', - * hostname: 'example.com', - * pathname: '/some/path', - * query: { - * page: 1, - * format: 'json', - * }, - * }); - * - * // => 'https://example.com/some/path?page=1&format=json' - * ``` - * - * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`. - * - * The formatting process operates as follows: - * - * * A new empty string `result` is created. - * * If `urlObject.protocol` is a string, it is appended as-is to `result`. - * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown. - * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII - * colon (`:`) character, the literal string `:` will be appended to `result`. - * * If either of the following conditions is true, then the literal string `//` will be appended to `result`: - * * `urlObject.slashes` property is true; - * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or `file`; - * * If the value of the `urlObject.auth` property is truthy, and either `urlObject.host` or `urlObject.hostname` are not `undefined`, the value of `urlObject.auth` will be coerced into a string - * and appended to `result` followed by the literal string `@`. - * * If the `urlObject.host` property is `undefined` then: - * * If the `urlObject.hostname` is a string, it is appended to `result`. - * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string, - * an `Error` is thrown. - * * If the `urlObject.port` property value is truthy, and `urlObject.hostname` is not `undefined`: - * * The literal string `:` is appended to `result`, and - * * The value of `urlObject.port` is coerced to a string and appended to `result`. - * * Otherwise, if the `urlObject.host` property value is truthy, the value of `urlObject.host` is coerced to a string and appended to `result`. - * * If the `urlObject.pathname` property is a string that is not an empty string: - * * If the `urlObject.pathname` _does not start_ with an ASCII forward slash - * (`/`), then the literal string `'/'` is appended to `result`. - * * The value of `urlObject.pathname` is appended to `result`. - * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown. - * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result` followed by the output of calling the - * `querystring` module's `stringify()` method passing the value of `urlObject.query`. - * * Otherwise, if `urlObject.search` is a string: - * * If the value of `urlObject.search` _does not start_ with the ASCII question - * mark (`?`) character, the literal string `?` is appended to `result`. - * * The value of `urlObject.search` is appended to `result`. - * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown. - * * If the `urlObject.hash` property is a string: - * * If the value of `urlObject.hash` _does not start_ with the ASCII hash (`#`) - * character, the literal string `#` is appended to `result`. - * * The value of `urlObject.hash` is appended to `result`. - * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a - * string, an `Error` is thrown. - * * `result` is returned. - * @since v0.1.25 - * @legacy Use the WHATWG URL API instead. - * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`. - */ - function format(urlObject: UrlObject | string): string; - /** - * The `url.resolve()` method resolves a target URL relative to a base URL in a - * manner similar to that of a web browser resolving an anchor tag. - * - * ```js - * import url from 'node:url'; - * url.resolve('/one/two/three', 'four'); // '/one/two/four' - * url.resolve('http://example.com/', '/one'); // 'http://example.com/one' - * url.resolve('http://example.com/one', '/two'); // 'http://example.com/two' - * ``` - * - * To achieve the same result using the WHATWG URL API: - * - * ```js - * function resolve(from, to) { - * const resolvedUrl = new URL(to, new URL(from, 'resolve://')); - * if (resolvedUrl.protocol === 'resolve:') { - * // `from` is a relative URL. - * const { pathname, search, hash } = resolvedUrl; - * return pathname + search + hash; - * } - * return resolvedUrl.toString(); - * } - * - * resolve('/one/two/three', 'four'); // '/one/two/four' - * resolve('http://example.com/', '/one'); // 'http://example.com/one' - * resolve('http://example.com/one', '/two'); // 'http://example.com/two' - * ``` - * @since v0.1.25 - * @legacy Use the WHATWG URL API instead. - * @param from The base URL to use if `to` is a relative URL. - * @param to The target URL to resolve. - */ - function resolve(from: string, to: string): string; - /** - * Returns the [Punycode](https://tools.ietf.org/html/rfc5891#section-4.4) ASCII serialization of the `domain`. If `domain` is an - * invalid domain, the empty string is returned. - * - * It performs the inverse operation to {@link domainToUnicode}. - * - * ```js - * import url from 'node:url'; - * - * console.log(url.domainToASCII('español.com')); - * // Prints xn--espaol-zwa.com - * console.log(url.domainToASCII('中文.com')); - * // Prints xn--fiq228c.com - * console.log(url.domainToASCII('xn--iñvalid.com')); - * // Prints an empty string - * ``` - * @since v7.4.0, v6.13.0 - */ - function domainToASCII(domain: string): string; - /** - * Returns the Unicode serialization of the `domain`. If `domain` is an invalid - * domain, the empty string is returned. - * - * It performs the inverse operation to {@link domainToASCII}. - * - * ```js - * import url from 'node:url'; - * - * console.log(url.domainToUnicode('xn--espaol-zwa.com')); - * // Prints español.com - * console.log(url.domainToUnicode('xn--fiq228c.com')); - * // Prints 中文.com - * console.log(url.domainToUnicode('xn--iñvalid.com')); - * // Prints an empty string - * ``` - * @since v7.4.0, v6.13.0 - */ - function domainToUnicode(domain: string): string; - /** - * This function ensures the correct decodings of percent-encoded characters as - * well as ensuring a cross-platform valid absolute path string. - * - * ```js - * import { fileURLToPath } from 'node:url'; - * - * const __filename = fileURLToPath(import.meta.url); - * - * new URL('file:///C:/path/').pathname; // Incorrect: /C:/path/ - * fileURLToPath('file:///C:/path/'); // Correct: C:\path\ (Windows) - * - * new URL('file://nas/foo.txt').pathname; // Incorrect: /foo.txt - * fileURLToPath('file://nas/foo.txt'); // Correct: \\nas\foo.txt (Windows) - * - * new URL('file:///你好.txt').pathname; // Incorrect: /%E4%BD%A0%E5%A5%BD.txt - * fileURLToPath('file:///你好.txt'); // Correct: /你好.txt (POSIX) - * - * new URL('file:///hello world').pathname; // Incorrect: /hello%20world - * fileURLToPath('file:///hello world'); // Correct: /hello world (POSIX) - * ``` - * @since v10.12.0 - * @param url The file URL string or URL object to convert to a path. - * @return The fully-resolved platform-specific Node.js file path. - */ - function fileURLToPath(url: string | URL, options?: FileUrlToPathOptions): string; - /** - * This function ensures that `path` is resolved absolutely, and that the URL - * control characters are correctly encoded when converting into a File URL. - * - * ```js - * import { pathToFileURL } from 'node:url'; - * - * new URL('/foo#1', 'file:'); // Incorrect: file:///foo#1 - * pathToFileURL('/foo#1'); // Correct: file:///foo%231 (POSIX) - * - * new URL('/some/path%.c', 'file:'); // Incorrect: file:///some/path%.c - * pathToFileURL('/some/path%.c'); // Correct: file:///some/path%25.c (POSIX) - * ``` - * @since v10.12.0 - * @param path The path to convert to a File URL. - * @return The file URL object. - */ - function pathToFileURL(path: string, options?: PathToFileUrlOptions): URL; - /** - * This utility function converts a URL object into an ordinary options object as - * expected by the `http.request()` and `https.request()` APIs. - * - * ```js - * import { urlToHttpOptions } from 'node:url'; - * const myURL = new URL('https://a:b@測試?abc#foo'); - * - * console.log(urlToHttpOptions(myURL)); - * /* - * { - * protocol: 'https:', - * hostname: 'xn--g6w251d', - * hash: '#foo', - * search: '?abc', - * pathname: '/', - * path: '/?abc', - * href: 'https://a:b@xn--g6w251d/?abc#foo', - * auth: 'a:b' - * } - * - * ``` - * @since v15.7.0, v14.18.0 - * @param url The `WHATWG URL` object to convert to an options object. - * @return Options object - */ - function urlToHttpOptions(url: URL): ClientRequestArgs; - interface URLFormatOptions { - /** - * `true` if the serialized URL string should include the username and password, `false` otherwise. - * @default true - */ - auth?: boolean | undefined; - /** - * `true` if the serialized URL string should include the fragment, `false` otherwise. - * @default true - */ - fragment?: boolean | undefined; - /** - * `true` if the serialized URL string should include the search query, `false` otherwise. - * @default true - */ - search?: boolean | undefined; - /** - * `true` if Unicode characters appearing in the host component of the URL string should be encoded directly as opposed to - * being Punycode encoded. - * @default false - */ - unicode?: boolean | undefined; - } - /** - * Browser-compatible `URL` class, implemented by following the WHATWG URL - * Standard. [Examples of parsed URLs](https://url.spec.whatwg.org/#example-url-parsing) may be found in the Standard itself. - * The `URL` class is also available on the global object. - * - * In accordance with browser conventions, all properties of `URL` objects - * are implemented as getters and setters on the class prototype, rather than as - * data properties on the object itself. Thus, unlike `legacy urlObject`s, - * using the `delete` keyword on any properties of `URL` objects (e.g. `delete myURL.protocol`, `delete myURL.pathname`, etc) has no effect but will still - * return `true`. - * @since v7.0.0, v6.13.0 - */ - class URL { - /** - * Creates a `'blob:nodedata:...'` URL string that represents the given `Blob` object and can be used to retrieve the `Blob` later. - * - * ```js - * import { - * Blob, - * resolveObjectURL, - * } from 'node:buffer'; - * - * const blob = new Blob(['hello']); - * const id = URL.createObjectURL(blob); - * - * // later... - * - * const otherBlob = resolveObjectURL(id); - * console.log(otherBlob.size); - * ``` - * - * The data stored by the registered `Blob` will be retained in memory until `URL.revokeObjectURL()` is called to remove it. - * - * `Blob` objects are registered within the current thread. If using Worker - * Threads, `Blob` objects registered within one Worker will not be available - * to other workers or the main thread. - * @since v16.7.0 - * @experimental - */ - static createObjectURL(blob: NodeBlob): string; - /** - * Removes the stored `Blob` identified by the given ID. Attempting to revoke a - * ID that isn't registered will silently fail. - * @since v16.7.0 - * @experimental - * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`. - */ - static revokeObjectURL(id: string): void; - /** - * Checks if an `input` relative to the `base` can be parsed to a `URL`. - * - * ```js - * const isValid = URL.canParse('/foo', 'https://example.org/'); // true - * - * const isNotValid = URL.canParse('/foo'); // false - * ``` - * @since v19.9.0 - * @param input The absolute or relative input URL to parse. If `input` is relative, then `base` is required. If `input` is absolute, the `base` is ignored. If `input` is not a string, it is - * `converted to a string` first. - * @param base The base URL to resolve against if the `input` is not absolute. If `base` is not a string, it is `converted to a string` first. - */ - static canParse(input: string, base?: string): boolean; - /** - * Parses a string as a URL. If `base` is provided, it will be used as the base URL for the purpose of resolving non-absolute `input` URLs. - * Returns `null` if `input` is not a valid. - * @param input The absolute or relative input URL to parse. If `input` is relative, then `base` is required. If `input` is absolute, the `base` is ignored. If `input` is not a string, it is - * `converted to a string` first. - * @param base The base URL to resolve against if the `input` is not absolute. If `base` is not a string, it is `converted to a string` first. - * @since v20.18.0 - */ - static parse(input: string, base?: string): URL | null; - constructor(input: string | { toString: () => string }, base?: string | URL); - /** - * Gets and sets the fragment portion of the URL. - * - * ```js - * const myURL = new URL('https://example.org/foo#bar'); - * console.log(myURL.hash); - * // Prints #bar - * - * myURL.hash = 'baz'; - * console.log(myURL.href); - * // Prints https://example.org/foo#baz - * ``` - * - * Invalid URL characters included in the value assigned to the `hash` property - * are `percent-encoded`. The selection of which characters to - * percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce. - */ - hash: string; - /** - * Gets and sets the host portion of the URL. - * - * ```js - * const myURL = new URL('https://example.org:81/foo'); - * console.log(myURL.host); - * // Prints example.org:81 - * - * myURL.host = 'example.com:82'; - * console.log(myURL.href); - * // Prints https://example.com:82/foo - * ``` - * - * Invalid host values assigned to the `host` property are ignored. - */ - host: string; - /** - * Gets and sets the host name portion of the URL. The key difference between`url.host` and `url.hostname` is that `url.hostname` does _not_ include the - * port. - * - * ```js - * const myURL = new URL('https://example.org:81/foo'); - * console.log(myURL.hostname); - * // Prints example.org - * - * // Setting the hostname does not change the port - * myURL.hostname = 'example.com'; - * console.log(myURL.href); - * // Prints https://example.com:81/foo - * - * // Use myURL.host to change the hostname and port - * myURL.host = 'example.org:82'; - * console.log(myURL.href); - * // Prints https://example.org:82/foo - * ``` - * - * Invalid host name values assigned to the `hostname` property are ignored. - */ - hostname: string; - /** - * Gets and sets the serialized URL. - * - * ```js - * const myURL = new URL('https://example.org/foo'); - * console.log(myURL.href); - * // Prints https://example.org/foo - * - * myURL.href = 'https://example.com/bar'; - * console.log(myURL.href); - * // Prints https://example.com/bar - * ``` - * - * Getting the value of the `href` property is equivalent to calling {@link toString}. - * - * Setting the value of this property to a new value is equivalent to creating a - * new `URL` object using `new URL(value)`. Each of the `URL` object's properties will be modified. - * - * If the value assigned to the `href` property is not a valid URL, a `TypeError` will be thrown. - */ - href: string; - /** - * Gets the read-only serialization of the URL's origin. - * - * ```js - * const myURL = new URL('https://example.org/foo/bar?baz'); - * console.log(myURL.origin); - * // Prints https://example.org - * ``` - * - * ```js - * const idnURL = new URL('https://測試'); - * console.log(idnURL.origin); - * // Prints https://xn--g6w251d - * - * console.log(idnURL.hostname); - * // Prints xn--g6w251d - * ``` - */ - readonly origin: string; - /** - * Gets and sets the password portion of the URL. - * - * ```js - * const myURL = new URL('https://abc:xyz@example.com'); - * console.log(myURL.password); - * // Prints xyz - * - * myURL.password = '123'; - * console.log(myURL.href); - * // Prints https://abc:123@example.com/ - * ``` - * - * Invalid URL characters included in the value assigned to the `password` property - * are `percent-encoded`. The selection of which characters to - * percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce. - */ - password: string; - /** - * Gets and sets the path portion of the URL. - * - * ```js - * const myURL = new URL('https://example.org/abc/xyz?123'); - * console.log(myURL.pathname); - * // Prints /abc/xyz - * - * myURL.pathname = '/abcdef'; - * console.log(myURL.href); - * // Prints https://example.org/abcdef?123 - * ``` - * - * Invalid URL characters included in the value assigned to the `pathname` property are `percent-encoded`. The selection of which characters - * to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce. - */ - pathname: string; - /** - * Gets and sets the port portion of the URL. - * - * The port value may be a number or a string containing a number in the range `0` to `65535` (inclusive). Setting the value to the default port of the `URL` objects given `protocol` will - * result in the `port` value becoming - * the empty string (`''`). - * - * The port value can be an empty string in which case the port depends on - * the protocol/scheme: - * - * - * - * Upon assigning a value to the port, the value will first be converted to a - * string using `.toString()`. - * - * If that string is invalid but it begins with a number, the leading number is - * assigned to `port`. - * If the number lies outside the range denoted above, it is ignored. - * - * ```js - * const myURL = new URL('https://example.org:8888'); - * console.log(myURL.port); - * // Prints 8888 - * - * // Default ports are automatically transformed to the empty string - * // (HTTPS protocol's default port is 443) - * myURL.port = '443'; - * console.log(myURL.port); - * // Prints the empty string - * console.log(myURL.href); - * // Prints https://example.org/ - * - * myURL.port = 1234; - * console.log(myURL.port); - * // Prints 1234 - * console.log(myURL.href); - * // Prints https://example.org:1234/ - * - * // Completely invalid port strings are ignored - * myURL.port = 'abcd'; - * console.log(myURL.port); - * // Prints 1234 - * - * // Leading numbers are treated as a port number - * myURL.port = '5678abcd'; - * console.log(myURL.port); - * // Prints 5678 - * - * // Non-integers are truncated - * myURL.port = 1234.5678; - * console.log(myURL.port); - * // Prints 1234 - * - * // Out-of-range numbers which are not represented in scientific notation - * // will be ignored. - * myURL.port = 1e10; // 10000000000, will be range-checked as described below - * console.log(myURL.port); - * // Prints 1234 - * ``` - * - * Numbers which contain a decimal point, - * such as floating-point numbers or numbers in scientific notation, - * are not an exception to this rule. - * Leading numbers up to the decimal point will be set as the URL's port, - * assuming they are valid: - * - * ```js - * myURL.port = 4.567e21; - * console.log(myURL.port); - * // Prints 4 (because it is the leading number in the string '4.567e21') - * ``` - */ - port: string; - /** - * Gets and sets the protocol portion of the URL. - * - * ```js - * const myURL = new URL('https://example.org'); - * console.log(myURL.protocol); - * // Prints https: - * - * myURL.protocol = 'ftp'; - * console.log(myURL.href); - * // Prints ftp://example.org/ - * ``` - * - * Invalid URL protocol values assigned to the `protocol` property are ignored. - */ - protocol: string; - /** - * Gets and sets the serialized query portion of the URL. - * - * ```js - * const myURL = new URL('https://example.org/abc?123'); - * console.log(myURL.search); - * // Prints ?123 - * - * myURL.search = 'abc=xyz'; - * console.log(myURL.href); - * // Prints https://example.org/abc?abc=xyz - * ``` - * - * Any invalid URL characters appearing in the value assigned the `search` property will be `percent-encoded`. The selection of which - * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce. - */ - search: string; - /** - * Gets the `URLSearchParams` object representing the query parameters of the - * URL. This property is read-only but the `URLSearchParams` object it provides - * can be used to mutate the URL instance; to replace the entirety of query - * parameters of the URL, use the {@link search} setter. See `URLSearchParams` documentation for details. - * - * Use care when using `.searchParams` to modify the `URL` because, - * per the WHATWG specification, the `URLSearchParams` object uses - * different rules to determine which characters to percent-encode. For - * instance, the `URL` object will not percent encode the ASCII tilde (`~`) - * character, while `URLSearchParams` will always encode it: - * - * ```js - * const myURL = new URL('https://example.org/abc?foo=~bar'); - * - * console.log(myURL.search); // prints ?foo=~bar - * - * // Modify the URL via searchParams... - * myURL.searchParams.sort(); - * - * console.log(myURL.search); // prints ?foo=%7Ebar - * ``` - */ - readonly searchParams: URLSearchParams; - /** - * Gets and sets the username portion of the URL. - * - * ```js - * const myURL = new URL('https://abc:xyz@example.com'); - * console.log(myURL.username); - * // Prints abc - * - * myURL.username = '123'; - * console.log(myURL.href); - * // Prints https://123:xyz@example.com/ - * ``` - * - * Any invalid URL characters appearing in the value assigned the `username` property will be `percent-encoded`. The selection of which - * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce. - */ - username: string; - /** - * The `toString()` method on the `URL` object returns the serialized URL. The - * value returned is equivalent to that of {@link href} and {@link toJSON}. - */ - toString(): string; - /** - * The `toJSON()` method on the `URL` object returns the serialized URL. The - * value returned is equivalent to that of {@link href} and {@link toString}. - * - * This method is automatically called when an `URL` object is serialized - * with [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). - * - * ```js - * const myURLs = [ - * new URL('https://www.example.com'), - * new URL('https://test.example.org'), - * ]; - * console.log(JSON.stringify(myURLs)); - * // Prints ["https://www.example.com/","https://test.example.org/"] - * ``` - */ - toJSON(): string; - } - interface URLSearchParamsIterator extends NodeJS.Iterator { - [Symbol.iterator](): URLSearchParamsIterator; - } - /** - * The `URLSearchParams` API provides read and write access to the query of a `URL`. The `URLSearchParams` class can also be used standalone with one of the - * four following constructors. - * The `URLSearchParams` class is also available on the global object. - * - * The WHATWG `URLSearchParams` interface and the `querystring` module have - * similar purpose, but the purpose of the `querystring` module is more - * general, as it allows the customization of delimiter characters (`&` and `=`). - * On the other hand, this API is designed purely for URL query strings. - * - * ```js - * const myURL = new URL('https://example.org/?abc=123'); - * console.log(myURL.searchParams.get('abc')); - * // Prints 123 - * - * myURL.searchParams.append('abc', 'xyz'); - * console.log(myURL.href); - * // Prints https://example.org/?abc=123&abc=xyz - * - * myURL.searchParams.delete('abc'); - * myURL.searchParams.set('a', 'b'); - * console.log(myURL.href); - * // Prints https://example.org/?a=b - * - * const newSearchParams = new URLSearchParams(myURL.searchParams); - * // The above is equivalent to - * // const newSearchParams = new URLSearchParams(myURL.search); - * - * newSearchParams.append('a', 'c'); - * console.log(myURL.href); - * // Prints https://example.org/?a=b - * console.log(newSearchParams.toString()); - * // Prints a=b&a=c - * - * // newSearchParams.toString() is implicitly called - * myURL.search = newSearchParams; - * console.log(myURL.href); - * // Prints https://example.org/?a=b&a=c - * newSearchParams.delete('a'); - * console.log(myURL.href); - * // Prints https://example.org/?a=b&a=c - * ``` - * @since v7.5.0, v6.13.0 - */ - class URLSearchParams implements Iterable<[string, string]> { - constructor( - init?: - | URLSearchParams - | string - | Record - | Iterable<[string, string]> - | ReadonlyArray<[string, string]>, - ); - /** - * Append a new name-value pair to the query string. - */ - append(name: string, value: string): void; - /** - * If `value` is provided, removes all name-value pairs - * where name is `name` and value is `value`. - * - * If `value` is not provided, removes all name-value pairs whose name is `name`. - */ - delete(name: string, value?: string): void; - /** - * Returns an ES6 `Iterator` over each of the name-value pairs in the query. - * Each item of the iterator is a JavaScript `Array`. The first item of the `Array` is the `name`, the second item of the `Array` is the `value`. - * - * Alias for `urlSearchParams[@@iterator]()`. - */ - entries(): URLSearchParamsIterator<[string, string]>; - /** - * Iterates over each name-value pair in the query and invokes the given function. - * - * ```js - * const myURL = new URL('https://example.org/?a=b&c=d'); - * myURL.searchParams.forEach((value, name, searchParams) => { - * console.log(name, value, myURL.searchParams === searchParams); - * }); - * // Prints: - * // a b true - * // c d true - * ``` - * @param fn Invoked for each name-value pair in the query - * @param thisArg To be used as `this` value for when `fn` is called - */ - forEach( - fn: (this: TThis, value: string, name: string, searchParams: URLSearchParams) => void, - thisArg?: TThis, - ): void; - /** - * Returns the value of the first name-value pair whose name is `name`. If there - * are no such pairs, `null` is returned. - * @return or `null` if there is no name-value pair with the given `name`. - */ - get(name: string): string | null; - /** - * Returns the values of all name-value pairs whose name is `name`. If there are - * no such pairs, an empty array is returned. - */ - getAll(name: string): string[]; - /** - * Checks if the `URLSearchParams` object contains key-value pair(s) based on `name` and an optional `value` argument. - * - * If `value` is provided, returns `true` when name-value pair with - * same `name` and `value` exists. - * - * If `value` is not provided, returns `true` if there is at least one name-value - * pair whose name is `name`. - */ - has(name: string, value?: string): boolean; - /** - * Returns an ES6 `Iterator` over the names of each name-value pair. - * - * ```js - * const params = new URLSearchParams('foo=bar&foo=baz'); - * for (const name of params.keys()) { - * console.log(name); - * } - * // Prints: - * // foo - * // foo - * ``` - */ - keys(): URLSearchParamsIterator; - /** - * Sets the value in the `URLSearchParams` object associated with `name` to `value`. If there are any pre-existing name-value pairs whose names are `name`, - * set the first such pair's value to `value` and remove all others. If not, - * append the name-value pair to the query string. - * - * ```js - * const params = new URLSearchParams(); - * params.append('foo', 'bar'); - * params.append('foo', 'baz'); - * params.append('abc', 'def'); - * console.log(params.toString()); - * // Prints foo=bar&foo=baz&abc=def - * - * params.set('foo', 'def'); - * params.set('xyz', 'opq'); - * console.log(params.toString()); - * // Prints foo=def&abc=def&xyz=opq - * ``` - */ - set(name: string, value: string): void; - /** - * The total number of parameter entries. - * @since v19.8.0 - */ - readonly size: number; - /** - * Sort all existing name-value pairs in-place by their names. Sorting is done - * with a [stable sorting algorithm](https://en.wikipedia.org/wiki/Sorting_algorithm#Stability), so relative order between name-value pairs - * with the same name is preserved. - * - * This method can be used, in particular, to increase cache hits. - * - * ```js - * const params = new URLSearchParams('query[]=abc&type=search&query[]=123'); - * params.sort(); - * console.log(params.toString()); - * // Prints query%5B%5D=abc&query%5B%5D=123&type=search - * ``` - * @since v7.7.0, v6.13.0 - */ - sort(): void; - /** - * Returns the search parameters serialized as a string, with characters - * percent-encoded where necessary. - */ - toString(): string; - /** - * Returns an ES6 `Iterator` over the values of each name-value pair. - */ - values(): URLSearchParamsIterator; - [Symbol.iterator](): URLSearchParamsIterator<[string, string]>; - } - import { URL as _URL, URLSearchParams as _URLSearchParams } from "url"; - global { - interface URLSearchParams extends _URLSearchParams {} - interface URL extends _URL {} - interface Global { - URL: typeof _URL; - URLSearchParams: typeof _URLSearchParams; - } - /** - * `URL` class is a global reference for `import { URL } from 'node:url'` - * https://nodejs.org/api/url.html#the-whatwg-url-api - * @since v10.0.0 - */ - var URL: typeof globalThis extends { - onmessage: any; - URL: infer T; - } ? T - : typeof _URL; - /** - * `URLSearchParams` class is a global reference for `import { URLSearchParams } from 'node:url'` - * https://nodejs.org/api/url.html#class-urlsearchparams - * @since v10.0.0 - */ - var URLSearchParams: typeof globalThis extends { - onmessage: any; - URLSearchParams: infer T; - } ? T - : typeof _URLSearchParams; - } -} -declare module "node:url" { - export * from "url"; -} diff --git a/node_modules/@types/node/util.d.ts b/node_modules/@types/node/util.d.ts deleted file mode 100644 index e5e2cb6..0000000 --- a/node_modules/@types/node/util.d.ts +++ /dev/null @@ -1,2331 +0,0 @@ -/** - * The `node:util` module supports the needs of Node.js internal APIs. Many of the - * utilities are useful for application and module developers as well. To access - * it: - * - * ```js - * import util from 'node:util'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/util.js) - */ -declare module "util" { - import * as types from "node:util/types"; - export interface InspectOptions { - /** - * If `true`, object's non-enumerable symbols and properties are included in the formatted result. - * `WeakMap` and `WeakSet` entries are also included as well as user defined prototype properties (excluding method properties). - * @default false - */ - showHidden?: boolean | undefined; - /** - * Specifies the number of times to recurse while formatting object. - * This is useful for inspecting large objects. - * To recurse up to the maximum call stack size pass `Infinity` or `null`. - * @default 2 - */ - depth?: number | null | undefined; - /** - * If `true`, the output is styled with ANSI color codes. Colors are customizable. - */ - colors?: boolean | undefined; - /** - * If `false`, `[util.inspect.custom](depth, opts, inspect)` functions are not invoked. - * @default true - */ - customInspect?: boolean | undefined; - /** - * If `true`, `Proxy` inspection includes the target and handler objects. - * @default false - */ - showProxy?: boolean | undefined; - /** - * Specifies the maximum number of `Array`, `TypedArray`, `WeakMap`, and `WeakSet` elements - * to include when formatting. Set to `null` or `Infinity` to show all elements. - * Set to `0` or negative to show no elements. - * @default 100 - */ - maxArrayLength?: number | null | undefined; - /** - * Specifies the maximum number of characters to - * include when formatting. Set to `null` or `Infinity` to show all elements. - * Set to `0` or negative to show no characters. - * @default 10000 - */ - maxStringLength?: number | null | undefined; - /** - * The length at which input values are split across multiple lines. - * Set to `Infinity` to format the input as a single line - * (in combination with `compact` set to `true` or any number >= `1`). - * @default 80 - */ - breakLength?: number | undefined; - /** - * Setting this to `false` causes each object key - * to be displayed on a new line. It will also add new lines to text that is - * longer than `breakLength`. If set to a number, the most `n` inner elements - * are united on a single line as long as all properties fit into - * `breakLength`. Short array elements are also grouped together. Note that no - * text will be reduced below 16 characters, no matter the `breakLength` size. - * For more information, see the example below. - * @default true - */ - compact?: boolean | number | undefined; - /** - * If set to `true` or a function, all properties of an object, and `Set` and `Map` - * entries are sorted in the resulting string. - * If set to `true` the default sort is used. - * If set to a function, it is used as a compare function. - */ - sorted?: boolean | ((a: string, b: string) => number) | undefined; - /** - * If set to `true`, getters are going to be - * inspected as well. If set to `'get'` only getters without setter are going - * to be inspected. If set to `'set'` only getters having a corresponding - * setter are going to be inspected. This might cause side effects depending on - * the getter function. - * @default false - */ - getters?: "get" | "set" | boolean | undefined; - /** - * If set to `true`, an underscore is used to separate every three digits in all bigints and numbers. - * @default false - */ - numericSeparator?: boolean | undefined; - } - export type Style = - | "special" - | "number" - | "bigint" - | "boolean" - | "undefined" - | "null" - | "string" - | "symbol" - | "date" - | "regexp" - | "module"; - export type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => any; // TODO: , inspect: inspect - export interface InspectOptionsStylized extends InspectOptions { - stylize(text: string, styleType: Style): string; - } - /** - * The `util.format()` method returns a formatted string using the first argument - * as a `printf`-like format string which can contain zero or more format - * specifiers. Each specifier is replaced with the converted value from the - * corresponding argument. Supported specifiers are: - * - * If a specifier does not have a corresponding argument, it is not replaced: - * - * ```js - * util.format('%s:%s', 'foo'); - * // Returns: 'foo:%s' - * ``` - * - * Values that are not part of the format string are formatted using `util.inspect()` if their type is not `string`. - * - * If there are more arguments passed to the `util.format()` method than the - * number of specifiers, the extra arguments are concatenated to the returned - * string, separated by spaces: - * - * ```js - * util.format('%s:%s', 'foo', 'bar', 'baz'); - * // Returns: 'foo:bar baz' - * ``` - * - * If the first argument does not contain a valid format specifier, `util.format()` returns a string that is the concatenation of all arguments separated by spaces: - * - * ```js - * util.format(1, 2, 3); - * // Returns: '1 2 3' - * ``` - * - * If only one argument is passed to `util.format()`, it is returned as it is - * without any formatting: - * - * ```js - * util.format('%% %s'); - * // Returns: '%% %s' - * ``` - * - * `util.format()` is a synchronous method that is intended as a debugging tool. - * Some input values can have a significant performance overhead that can block the - * event loop. Use this function with care and never in a hot code path. - * @since v0.5.3 - * @param format A `printf`-like format string. - */ - export function format(format?: any, ...param: any[]): string; - /** - * This function is identical to {@link format}, except in that it takes - * an `inspectOptions` argument which specifies options that are passed along to {@link inspect}. - * - * ```js - * util.formatWithOptions({ colors: true }, 'See object %O', { foo: 42 }); - * // Returns 'See object { foo: 42 }', where `42` is colored as a number - * // when printed to a terminal. - * ``` - * @since v10.0.0 - */ - export function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string; - /** - * Returns the string name for a numeric error code that comes from a Node.js API. - * The mapping between error codes and error names is platform-dependent. - * See `Common System Errors` for the names of common errors. - * - * ```js - * fs.access('file/that/does/not/exist', (err) => { - * const name = util.getSystemErrorName(err.errno); - * console.error(name); // ENOENT - * }); - * ``` - * @since v9.7.0 - */ - export function getSystemErrorName(err: number): string; - /** - * Returns a Map of all system error codes available from the Node.js API. - * The mapping between error codes and error names is platform-dependent. - * See `Common System Errors` for the names of common errors. - * - * ```js - * fs.access('file/that/does/not/exist', (err) => { - * const errorMap = util.getSystemErrorMap(); - * const name = errorMap.get(err.errno); - * console.error(name); // ENOENT - * }); - * ``` - * @since v16.0.0, v14.17.0 - */ - export function getSystemErrorMap(): Map; - /** - * The `util.log()` method prints the given `string` to `stdout` with an included - * timestamp. - * - * ```js - * import util from 'node:util'; - * - * util.log('Timestamped message.'); - * ``` - * @since v0.3.0 - * @deprecated Since v6.0.0 - Use a third party module instead. - */ - export function log(string: string): void; - /** - * Returns the `string` after replacing any surrogate code points - * (or equivalently, any unpaired surrogate code units) with the - * Unicode "replacement character" U+FFFD. - * @since v16.8.0, v14.18.0 - */ - export function toUSVString(string: string): string; - /** - * Creates and returns an `AbortController` instance whose `AbortSignal` is marked - * as transferable and can be used with `structuredClone()` or `postMessage()`. - * @since v18.11.0 - * @experimental - * @returns A transferable AbortController - */ - export function transferableAbortController(): AbortController; - /** - * Marks the given `AbortSignal` as transferable so that it can be used with`structuredClone()` and `postMessage()`. - * - * ```js - * const signal = transferableAbortSignal(AbortSignal.timeout(100)); - * const channel = new MessageChannel(); - * channel.port2.postMessage(signal, [signal]); - * ``` - * @since v18.11.0 - * @experimental - * @param signal The AbortSignal - * @returns The same AbortSignal - */ - export function transferableAbortSignal(signal: AbortSignal): AbortSignal; - /** - * Listens to abort event on the provided `signal` and - * returns a promise that is fulfilled when the `signal` is - * aborted. If the passed `resource` is garbage collected before the `signal` is - * aborted, the returned promise shall remain pending indefinitely. - * - * ```js - * import { aborted } from 'node:util'; - * - * const dependent = obtainSomethingAbortable(); - * - * aborted(dependent.signal, dependent).then(() => { - * // Do something when dependent is aborted. - * }); - * - * dependent.on('event', () => { - * dependent.abort(); - * }); - * ``` - * @since v19.7.0 - * @experimental - * @param resource Any non-null entity, reference to which is held weakly. - */ - export function aborted(signal: AbortSignal, resource: any): Promise; - /** - * The `util.inspect()` method returns a string representation of `object` that is - * intended for debugging. The output of `util.inspect` may change at any time - * and should not be depended upon programmatically. Additional `options` may be - * passed that alter the result. `util.inspect()` will use the constructor's name and/or `@@toStringTag` to make - * an identifiable tag for an inspected value. - * - * ```js - * class Foo { - * get [Symbol.toStringTag]() { - * return 'bar'; - * } - * } - * - * class Bar {} - * - * const baz = Object.create(null, { [Symbol.toStringTag]: { value: 'foo' } }); - * - * util.inspect(new Foo()); // 'Foo [bar] {}' - * util.inspect(new Bar()); // 'Bar {}' - * util.inspect(baz); // '[foo] {}' - * ``` - * - * Circular references point to their anchor by using a reference index: - * - * ```js - * import { inspect } from 'node:util'; - * - * const obj = {}; - * obj.a = [obj]; - * obj.b = {}; - * obj.b.inner = obj.b; - * obj.b.obj = obj; - * - * console.log(inspect(obj)); - * // { - * // a: [ [Circular *1] ], - * // b: { inner: [Circular *2], obj: [Circular *1] } - * // } - * ``` - * - * The following example inspects all properties of the `util` object: - * - * ```js - * import util from 'node:util'; - * - * console.log(util.inspect(util, { showHidden: true, depth: null })); - * ``` - * - * The following example highlights the effect of the `compact` option: - * - * ```js - * import util from 'node:util'; - * - * const o = { - * a: [1, 2, [[ - * 'Lorem ipsum dolor sit amet,\nconsectetur adipiscing elit, sed do ' + - * 'eiusmod \ntempor incididunt ut labore et dolore magna aliqua.', - * 'test', - * 'foo']], 4], - * b: new Map([['za', 1], ['zb', 'test']]), - * }; - * console.log(util.inspect(o, { compact: true, depth: 5, breakLength: 80 })); - * - * // { a: - * // [ 1, - * // 2, - * // [ [ 'Lorem ipsum dolor sit amet,\nconsectetur [...]', // A long line - * // 'test', - * // 'foo' ] ], - * // 4 ], - * // b: Map(2) { 'za' => 1, 'zb' => 'test' } } - * - * // Setting `compact` to false or an integer creates more reader friendly output. - * console.log(util.inspect(o, { compact: false, depth: 5, breakLength: 80 })); - * - * // { - * // a: [ - * // 1, - * // 2, - * // [ - * // [ - * // 'Lorem ipsum dolor sit amet,\n' + - * // 'consectetur adipiscing elit, sed do eiusmod \n' + - * // 'tempor incididunt ut labore et dolore magna aliqua.', - * // 'test', - * // 'foo' - * // ] - * // ], - * // 4 - * // ], - * // b: Map(2) { - * // 'za' => 1, - * // 'zb' => 'test' - * // } - * // } - * - * // Setting `breakLength` to e.g. 150 will print the "Lorem ipsum" text in a - * // single line. - * ``` - * - * The `showHidden` option allows [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) and - * [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) entries to be - * inspected. If there are more entries than `maxArrayLength`, there is no - * guarantee which entries are displayed. That means retrieving the same [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) entries twice may - * result in different output. Furthermore, entries - * with no remaining strong references may be garbage collected at any time. - * - * ```js - * import { inspect } from 'node:util'; - * - * const obj = { a: 1 }; - * const obj2 = { b: 2 }; - * const weakSet = new WeakSet([obj, obj2]); - * - * console.log(inspect(weakSet, { showHidden: true })); - * // WeakSet { { a: 1 }, { b: 2 } } - * ``` - * - * The `sorted` option ensures that an object's property insertion order does not - * impact the result of `util.inspect()`. - * - * ```js - * import { inspect } from 'node:util'; - * import assert from 'node:assert'; - * - * const o1 = { - * b: [2, 3, 1], - * a: '`a` comes before `b`', - * c: new Set([2, 3, 1]), - * }; - * console.log(inspect(o1, { sorted: true })); - * // { a: '`a` comes before `b`', b: [ 2, 3, 1 ], c: Set(3) { 1, 2, 3 } } - * console.log(inspect(o1, { sorted: (a, b) => b.localeCompare(a) })); - * // { c: Set(3) { 3, 2, 1 }, b: [ 2, 3, 1 ], a: '`a` comes before `b`' } - * - * const o2 = { - * c: new Set([2, 1, 3]), - * a: '`a` comes before `b`', - * b: [2, 3, 1], - * }; - * assert.strict.equal( - * inspect(o1, { sorted: true }), - * inspect(o2, { sorted: true }), - * ); - * ``` - * - * The `numericSeparator` option adds an underscore every three digits to all - * numbers. - * - * ```js - * import { inspect } from 'node:util'; - * - * const thousand = 1_000; - * const million = 1_000_000; - * const bigNumber = 123_456_789n; - * const bigDecimal = 1_234.123_45; - * - * console.log(inspect(thousand, { numericSeparator: true })); - * // 1_000 - * console.log(inspect(million, { numericSeparator: true })); - * // 1_000_000 - * console.log(inspect(bigNumber, { numericSeparator: true })); - * // 123_456_789n - * console.log(inspect(bigDecimal, { numericSeparator: true })); - * // 1_234.123_45 - * ``` - * - * `util.inspect()` is a synchronous method intended for debugging. Its maximum - * output length is approximately 128 MiB. Inputs that result in longer output will - * be truncated. - * @since v0.3.0 - * @param object Any JavaScript primitive or `Object`. - * @return The representation of `object`. - */ - export function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string; - export function inspect(object: any, options?: InspectOptions): string; - export namespace inspect { - let colors: NodeJS.Dict<[number, number]>; - let styles: { - [K in Style]: string; - }; - let defaultOptions: InspectOptions; - /** - * Allows changing inspect settings from the repl. - */ - let replDefaults: InspectOptions; - /** - * That can be used to declare custom inspect functions. - */ - const custom: unique symbol; - } - /** - * Alias for [`Array.isArray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray). - * - * Returns `true` if the given `object` is an `Array`. Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * util.isArray([]); - * // Returns: true - * util.isArray(new Array()); - * // Returns: true - * util.isArray({}); - * // Returns: false - * ``` - * @since v0.6.0 - * @deprecated Since v4.0.0 - Use `isArray` instead. - */ - export function isArray(object: unknown): object is unknown[]; - /** - * Returns `true` if the given `object` is a `RegExp`. Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * util.isRegExp(/some regexp/); - * // Returns: true - * util.isRegExp(new RegExp('another regexp')); - * // Returns: true - * util.isRegExp({}); - * // Returns: false - * ``` - * @since v0.6.0 - * @deprecated Since v4.0.0 - Deprecated - */ - export function isRegExp(object: unknown): object is RegExp; - /** - * Returns `true` if the given `object` is a `Date`. Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * util.isDate(new Date()); - * // Returns: true - * util.isDate(Date()); - * // false (without 'new' returns a String) - * util.isDate({}); - * // Returns: false - * ``` - * @since v0.6.0 - * @deprecated Since v4.0.0 - Use {@link types.isDate} instead. - */ - export function isDate(object: unknown): object is Date; - /** - * Returns `true` if the given `object` is an `Error`. Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * util.isError(new Error()); - * // Returns: true - * util.isError(new TypeError()); - * // Returns: true - * util.isError({ name: 'Error', message: 'an error occurred' }); - * // Returns: false - * ``` - * - * This method relies on `Object.prototype.toString()` behavior. It is - * possible to obtain an incorrect result when the `object` argument manipulates `@@toStringTag`. - * - * ```js - * import util from 'node:util'; - * const obj = { name: 'Error', message: 'an error occurred' }; - * - * util.isError(obj); - * // Returns: false - * obj[Symbol.toStringTag] = 'Error'; - * util.isError(obj); - * // Returns: true - * ``` - * @since v0.6.0 - * @deprecated Since v4.0.0 - Use {@link types.isNativeError} instead. - */ - export function isError(object: unknown): object is Error; - /** - * Usage of `util.inherits()` is discouraged. Please use the ES6 `class` and `extends` keywords to get language level inheritance support. Also note - * that the two styles are [semantically incompatible](https://github.com/nodejs/node/issues/4179). - * - * Inherit the prototype methods from one [constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor) into another. The - * prototype of `constructor` will be set to a new object created from `superConstructor`. - * - * This mainly adds some input validation on top of`Object.setPrototypeOf(constructor.prototype, superConstructor.prototype)`. - * As an additional convenience, `superConstructor` will be accessible - * through the `constructor.super_` property. - * - * ```js - * import util from 'node:util'; - * import EventEmitter from 'node:events'; - * - * function MyStream() { - * EventEmitter.call(this); - * } - * - * util.inherits(MyStream, EventEmitter); - * - * MyStream.prototype.write = function(data) { - * this.emit('data', data); - * }; - * - * const stream = new MyStream(); - * - * console.log(stream instanceof EventEmitter); // true - * console.log(MyStream.super_ === EventEmitter); // true - * - * stream.on('data', (data) => { - * console.log(`Received data: "${data}"`); - * }); - * stream.write('It works!'); // Received data: "It works!" - * ``` - * - * ES6 example using `class` and `extends`: - * - * ```js - * import EventEmitter from 'node:events'; - * - * class MyStream extends EventEmitter { - * write(data) { - * this.emit('data', data); - * } - * } - * - * const stream = new MyStream(); - * - * stream.on('data', (data) => { - * console.log(`Received data: "${data}"`); - * }); - * stream.write('With ES6'); - * ``` - * @since v0.3.0 - * @legacy Use ES2015 class syntax and `extends` keyword instead. - */ - export function inherits(constructor: unknown, superConstructor: unknown): void; - export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void; - export interface DebugLogger extends DebugLoggerFunction { - enabled: boolean; - } - /** - * The `util.debuglog()` method is used to create a function that conditionally - * writes debug messages to `stderr` based on the existence of the `NODE_DEBUG`environment variable. If the `section` name appears within the value of that - * environment variable, then the returned function operates similar to `console.error()`. If not, then the returned function is a no-op. - * - * ```js - * import util from 'node:util'; - * const debuglog = util.debuglog('foo'); - * - * debuglog('hello from foo [%d]', 123); - * ``` - * - * If this program is run with `NODE_DEBUG=foo` in the environment, then - * it will output something like: - * - * ```console - * FOO 3245: hello from foo [123] - * ``` - * - * where `3245` is the process id. If it is not run with that - * environment variable set, then it will not print anything. - * - * The `section` supports wildcard also: - * - * ```js - * import util from 'node:util'; - * const debuglog = util.debuglog('foo-bar'); - * - * debuglog('hi there, it\'s foo-bar [%d]', 2333); - * ``` - * - * if it is run with `NODE_DEBUG=foo*` in the environment, then it will output - * something like: - * - * ```console - * FOO-BAR 3257: hi there, it's foo-bar [2333] - * ``` - * - * Multiple comma-separated `section` names may be specified in the `NODE_DEBUG`environment variable: `NODE_DEBUG=fs,net,tls`. - * - * The optional `callback` argument can be used to replace the logging function - * with a different function that doesn't have any initialization or - * unnecessary wrapping. - * - * ```js - * import util from 'node:util'; - * let debuglog = util.debuglog('internals', (debug) => { - * // Replace with a logging function that optimizes out - * // testing if the section is enabled - * debuglog = debug; - * }); - * ``` - * @since v0.11.3 - * @param section A string identifying the portion of the application for which the `debuglog` function is being created. - * @param callback A callback invoked the first time the logging function is called with a function argument that is a more optimized logging function. - * @return The logging function - */ - export function debuglog(section: string, callback?: (fn: DebugLoggerFunction) => void): DebugLogger; - export const debug: typeof debuglog; - /** - * Returns `true` if the given `object` is a `Boolean`. Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * util.isBoolean(1); - * // Returns: false - * util.isBoolean(0); - * // Returns: false - * util.isBoolean(false); - * // Returns: true - * ``` - * @since v0.11.5 - * @deprecated Since v4.0.0 - Use `typeof value === 'boolean'` instead. - */ - export function isBoolean(object: unknown): object is boolean; - /** - * Returns `true` if the given `object` is a `Buffer`. Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * util.isBuffer({ length: 0 }); - * // Returns: false - * util.isBuffer([]); - * // Returns: false - * util.isBuffer(Buffer.from('hello world')); - * // Returns: true - * ``` - * @since v0.11.5 - * @deprecated Since v4.0.0 - Use `isBuffer` instead. - */ - export function isBuffer(object: unknown): object is Buffer; - /** - * Returns `true` if the given `object` is a `Function`. Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * function Foo() {} - * const Bar = () => {}; - * - * util.isFunction({}); - * // Returns: false - * util.isFunction(Foo); - * // Returns: true - * util.isFunction(Bar); - * // Returns: true - * ``` - * @since v0.11.5 - * @deprecated Since v4.0.0 - Use `typeof value === 'function'` instead. - */ - export function isFunction(object: unknown): boolean; - /** - * Returns `true` if the given `object` is strictly `null`. Otherwise, returns`false`. - * - * ```js - * import util from 'node:util'; - * - * util.isNull(0); - * // Returns: false - * util.isNull(undefined); - * // Returns: false - * util.isNull(null); - * // Returns: true - * ``` - * @since v0.11.5 - * @deprecated Since v4.0.0 - Use `value === null` instead. - */ - export function isNull(object: unknown): object is null; - /** - * Returns `true` if the given `object` is `null` or `undefined`. Otherwise, - * returns `false`. - * - * ```js - * import util from 'node:util'; - * - * util.isNullOrUndefined(0); - * // Returns: false - * util.isNullOrUndefined(undefined); - * // Returns: true - * util.isNullOrUndefined(null); - * // Returns: true - * ``` - * @since v0.11.5 - * @deprecated Since v4.0.0 - Use `value === undefined || value === null` instead. - */ - export function isNullOrUndefined(object: unknown): object is null | undefined; - /** - * Returns `true` if the given `object` is a `Number`. Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * util.isNumber(false); - * // Returns: false - * util.isNumber(Infinity); - * // Returns: true - * util.isNumber(0); - * // Returns: true - * util.isNumber(NaN); - * // Returns: true - * ``` - * @since v0.11.5 - * @deprecated Since v4.0.0 - Use `typeof value === 'number'` instead. - */ - export function isNumber(object: unknown): object is number; - /** - * Returns `true` if the given `object` is strictly an `Object`**and** not a`Function` (even though functions are objects in JavaScript). - * Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * util.isObject(5); - * // Returns: false - * util.isObject(null); - * // Returns: false - * util.isObject({}); - * // Returns: true - * util.isObject(() => {}); - * // Returns: false - * ``` - * @since v0.11.5 - * @deprecated Since v4.0.0 - Use `value !== null && typeof value === 'object'` instead. - */ - export function isObject(object: unknown): boolean; - /** - * Returns `true` if the given `object` is a primitive type. Otherwise, returns`false`. - * - * ```js - * import util from 'node:util'; - * - * util.isPrimitive(5); - * // Returns: true - * util.isPrimitive('foo'); - * // Returns: true - * util.isPrimitive(false); - * // Returns: true - * util.isPrimitive(null); - * // Returns: true - * util.isPrimitive(undefined); - * // Returns: true - * util.isPrimitive({}); - * // Returns: false - * util.isPrimitive(() => {}); - * // Returns: false - * util.isPrimitive(/^$/); - * // Returns: false - * util.isPrimitive(new Date()); - * // Returns: false - * ``` - * @since v0.11.5 - * @deprecated Since v4.0.0 - Use `(typeof value !== 'object' && typeof value !== 'function') || value === null` instead. - */ - export function isPrimitive(object: unknown): boolean; - /** - * Returns `true` if the given `object` is a `string`. Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * util.isString(''); - * // Returns: true - * util.isString('foo'); - * // Returns: true - * util.isString(String('foo')); - * // Returns: true - * util.isString(5); - * // Returns: false - * ``` - * @since v0.11.5 - * @deprecated Since v4.0.0 - Use `typeof value === 'string'` instead. - */ - export function isString(object: unknown): object is string; - /** - * Returns `true` if the given `object` is a `Symbol`. Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * util.isSymbol(5); - * // Returns: false - * util.isSymbol('foo'); - * // Returns: false - * util.isSymbol(Symbol('foo')); - * // Returns: true - * ``` - * @since v0.11.5 - * @deprecated Since v4.0.0 - Use `typeof value === 'symbol'` instead. - */ - export function isSymbol(object: unknown): object is symbol; - /** - * Returns `true` if the given `object` is `undefined`. Otherwise, returns `false`. - * - * ```js - * import util from 'node:util'; - * - * const foo = undefined; - * util.isUndefined(5); - * // Returns: false - * util.isUndefined(foo); - * // Returns: true - * util.isUndefined(null); - * // Returns: false - * ``` - * @since v0.11.5 - * @deprecated Since v4.0.0 - Use `value === undefined` instead. - */ - export function isUndefined(object: unknown): object is undefined; - /** - * The `util.deprecate()` method wraps `fn` (which may be a function or class) in - * such a way that it is marked as deprecated. - * - * ```js - * import util from 'node:util'; - * - * exports.obsoleteFunction = util.deprecate(() => { - * // Do something here. - * }, 'obsoleteFunction() is deprecated. Use newShinyFunction() instead.'); - * ``` - * - * When called, `util.deprecate()` will return a function that will emit a `DeprecationWarning` using the `'warning'` event. The warning will - * be emitted and printed to `stderr` the first time the returned function is - * called. After the warning is emitted, the wrapped function is called without - * emitting a warning. - * - * If the same optional `code` is supplied in multiple calls to `util.deprecate()`, - * the warning will be emitted only once for that `code`. - * - * ```js - * import util from 'node:util'; - * - * const fn1 = util.deprecate(someFunction, someMessage, 'DEP0001'); - * const fn2 = util.deprecate(someOtherFunction, someOtherMessage, 'DEP0001'); - * fn1(); // Emits a deprecation warning with code DEP0001 - * fn2(); // Does not emit a deprecation warning because it has the same code - * ``` - * - * If either the `--no-deprecation` or `--no-warnings` command-line flags are - * used, or if the `process.noDeprecation` property is set to `true`_prior_ to - * the first deprecation warning, the `util.deprecate()` method does nothing. - * - * If the `--trace-deprecation` or `--trace-warnings` command-line flags are set, - * or the `process.traceDeprecation` property is set to `true`, a warning and a - * stack trace are printed to `stderr` the first time the deprecated function is - * called. - * - * If the `--throw-deprecation` command-line flag is set, or the `process.throwDeprecation` property is set to `true`, then an exception will be - * thrown when the deprecated function is called. - * - * The `--throw-deprecation` command-line flag and `process.throwDeprecation` property take precedence over `--trace-deprecation` and `process.traceDeprecation`. - * @since v0.8.0 - * @param fn The function that is being deprecated. - * @param msg A warning message to display when the deprecated function is invoked. - * @param code A deprecation code. See the `list of deprecated APIs` for a list of codes. - * @return The deprecated function wrapped to emit a warning. - */ - export function deprecate(fn: T, msg: string, code?: string): T; - /** - * Returns `true` if there is deep strict equality between `val1` and `val2`. - * Otherwise, returns `false`. - * - * See `assert.deepStrictEqual()` for more information about deep strict - * equality. - * @since v9.0.0 - */ - export function isDeepStrictEqual(val1: unknown, val2: unknown): boolean; - /** - * Returns `str` with any ANSI escape codes removed. - * - * ```js - * console.log(util.stripVTControlCharacters('\u001B[4mvalue\u001B[0m')); - * // Prints "value" - * ``` - * @since v16.11.0 - */ - export function stripVTControlCharacters(str: string): string; - /** - * Takes an `async` function (or a function that returns a `Promise`) and returns a - * function following the error-first callback style, i.e. taking - * an `(err, value) => ...` callback as the last argument. In the callback, the - * first argument will be the rejection reason (or `null` if the `Promise` resolved), and the second argument will be the resolved value. - * - * ```js - * import util from 'node:util'; - * - * async function fn() { - * return 'hello world'; - * } - * const callbackFunction = util.callbackify(fn); - * - * callbackFunction((err, ret) => { - * if (err) throw err; - * console.log(ret); - * }); - * ``` - * - * Will print: - * - * ```text - * hello world - * ``` - * - * The callback is executed asynchronously, and will have a limited stack trace. - * If the callback throws, the process will emit an `'uncaughtException'` event, and if not handled will exit. - * - * Since `null` has a special meaning as the first argument to a callback, if a - * wrapped function rejects a `Promise` with a falsy value as a reason, the value - * is wrapped in an `Error` with the original value stored in a field named `reason`. - * - * ```js - * function fn() { - * return Promise.reject(null); - * } - * const callbackFunction = util.callbackify(fn); - * - * callbackFunction((err, ret) => { - * // When the Promise was rejected with `null` it is wrapped with an Error and - * // the original value is stored in `reason`. - * err && Object.hasOwn(err, 'reason') && err.reason === null; // true - * }); - * ``` - * @since v8.2.0 - * @param fn An `async` function - * @return a callback style function - */ - export function callbackify(fn: () => Promise): (callback: (err: NodeJS.ErrnoException) => void) => void; - export function callbackify( - fn: () => Promise, - ): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; - export function callbackify( - fn: (arg1: T1) => Promise, - ): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void; - export function callbackify( - fn: (arg1: T1) => Promise, - ): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2) => Promise, - ): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2) => Promise, - ): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3) => Promise, - ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3) => Promise, - ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise, - ): ( - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - callback: (err: NodeJS.ErrnoException | null, result: TResult) => void, - ) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise, - ): ( - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - arg5: T5, - callback: (err: NodeJS.ErrnoException | null, result: TResult) => void, - ) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise, - ): ( - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - arg5: T5, - arg6: T6, - callback: (err: NodeJS.ErrnoException) => void, - ) => void; - export function callbackify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise, - ): ( - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - arg5: T5, - arg6: T6, - callback: (err: NodeJS.ErrnoException | null, result: TResult) => void, - ) => void; - export interface CustomPromisifyLegacy extends Function { - __promisify__: TCustom; - } - export interface CustomPromisifySymbol extends Function { - [promisify.custom]: TCustom; - } - export type CustomPromisify = - | CustomPromisifySymbol - | CustomPromisifyLegacy; - /** - * Takes a function following the common error-first callback style, i.e. taking - * an `(err, value) => ...` callback as the last argument, and returns a version - * that returns promises. - * - * ```js - * import util from 'node:util'; - * import fs from 'node:fs'; - * - * const stat = util.promisify(fs.stat); - * stat('.').then((stats) => { - * // Do something with `stats` - * }).catch((error) => { - * // Handle the error. - * }); - * ``` - * - * Or, equivalently using `async function`s: - * - * ```js - * import util from 'node:util'; - * import fs from 'node:fs'; - * - * const stat = util.promisify(fs.stat); - * - * async function callStat() { - * const stats = await stat('.'); - * console.log(`This directory is owned by ${stats.uid}`); - * } - * - * callStat(); - * ``` - * - * If there is an `original[util.promisify.custom]` property present, `promisify` will return its value, see `Custom promisified functions`. - * - * `promisify()` assumes that `original` is a function taking a callback as its - * final argument in all cases. If `original` is not a function, `promisify()` will throw an error. If `original` is a function but its last argument is not - * an error-first callback, it will still be passed an error-first - * callback as its last argument. - * - * Using `promisify()` on class methods or other methods that use `this` may not - * work as expected unless handled specially: - * - * ```js - * import util from 'node:util'; - * - * class Foo { - * constructor() { - * this.a = 42; - * } - * - * bar(callback) { - * callback(null, this.a); - * } - * } - * - * const foo = new Foo(); - * - * const naiveBar = util.promisify(foo.bar); - * // TypeError: Cannot read property 'a' of undefined - * // naiveBar().then(a => console.log(a)); - * - * naiveBar.call(foo).then((a) => console.log(a)); // '42' - * - * const bindBar = naiveBar.bind(foo); - * bindBar().then((a) => console.log(a)); // '42' - * ``` - * @since v8.0.0 - */ - export function promisify(fn: CustomPromisify): TCustom; - export function promisify( - fn: (callback: (err: any, result: TResult) => void) => void, - ): () => Promise; - export function promisify(fn: (callback: (err?: any) => void) => void): () => Promise; - export function promisify( - fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void, - ): (arg1: T1) => Promise; - export function promisify(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void, - ): (arg1: T1, arg2: T2) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void, - ): (arg1: T1, arg2: T2) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; - export function promisify( - fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void, - ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise; - export function promisify(fn: Function): Function; - export namespace promisify { - /** - * That can be used to declare custom promisified variants of functions. - */ - const custom: unique symbol; - } - /** - * Stability: 1.1 - Active development - * Given an example `.env` file: - * - * ```js - * import { parseEnv } from 'node:util'; - * - * parseEnv('HELLO=world\nHELLO=oh my\n'); - * // Returns: { HELLO: 'oh my' } - * ``` - * @param content The raw contents of a `.env` file. - * @since v20.12.0 - */ - export function parseEnv(content: string): NodeJS.Dict; - // https://nodejs.org/docs/latest/api/util.html#foreground-colors - type ForegroundColors = - | "black" - | "blackBright" - | "blue" - | "blueBright" - | "cyan" - | "cyanBright" - | "gray" - | "green" - | "greenBright" - | "grey" - | "magenta" - | "magentaBright" - | "red" - | "redBright" - | "white" - | "whiteBright" - | "yellow" - | "yellowBright"; - // https://nodejs.org/docs/latest/api/util.html#background-colors - type BackgroundColors = - | "bgBlack" - | "bgBlackBright" - | "bgBlue" - | "bgBlueBright" - | "bgCyan" - | "bgCyanBright" - | "bgGray" - | "bgGreen" - | "bgGreenBright" - | "bgGrey" - | "bgMagenta" - | "bgMagentaBright" - | "bgRed" - | "bgRedBright" - | "bgWhite" - | "bgWhiteBright" - | "bgYellow" - | "bgYellowBright"; - // https://nodejs.org/docs/latest/api/util.html#modifiers - type Modifiers = - | "blink" - | "bold" - | "dim" - | "doubleunderline" - | "framed" - | "hidden" - | "inverse" - | "italic" - | "overlined" - | "reset" - | "strikethrough" - | "underline"; - export interface StyleTextOptions { - /** - * When true, `stream` is checked to see if it can handle colors. - * @default true - */ - validateStream?: boolean | undefined; - /** - * A stream that will be validated if it can be colored. - * @default process.stdout - */ - stream?: NodeJS.WritableStream | undefined; - } - /** - * Stability: 1.1 - Active development - * - * This function returns a formatted text considering the `format` passed. - * - * ```js - * import { styleText } from 'node:util'; - * const errorMessage = styleText('red', 'Error! Error!'); - * console.log(errorMessage); - * ``` - * - * `util.inspect.colors` also provides text formats such as `italic`, and `underline` and you can combine both: - * - * ```js - * console.log( - * util.styleText(['underline', 'italic'], 'My italic underlined message'), - * ); - * ``` - * - * When passing an array of formats, the order of the format applied is left to right so the following style - * might overwrite the previous one. - * - * ```js - * console.log( - * util.styleText(['red', 'green'], 'text'), // green - * ); - * ``` - * - * The full list of formats can be found in [modifiers](https://nodejs.org/docs/latest-v20.x/api/util.html#modifiers). - * @param format A text format or an Array of text formats defined in `util.inspect.colors`. - * @param text The text to to be formatted. - * @since v20.12.0 - */ - export function styleText( - format: - | ForegroundColors - | BackgroundColors - | Modifiers - | Array, - text: string, - options?: StyleTextOptions, - ): string; - /** - * An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextDecoder` API. - * - * ```js - * const decoder = new TextDecoder(); - * const u8arr = new Uint8Array([72, 101, 108, 108, 111]); - * console.log(decoder.decode(u8arr)); // Hello - * ``` - * @since v8.3.0 - */ - export class TextDecoder { - /** - * The encoding supported by the `TextDecoder` instance. - */ - readonly encoding: string; - /** - * The value will be `true` if decoding errors result in a `TypeError` being - * thrown. - */ - readonly fatal: boolean; - /** - * The value will be `true` if the decoding result will include the byte order - * mark. - */ - readonly ignoreBOM: boolean; - constructor( - encoding?: string, - options?: { - fatal?: boolean | undefined; - ignoreBOM?: boolean | undefined; - }, - ); - /** - * Decodes the `input` and returns a string. If `options.stream` is `true`, any - * incomplete byte sequences occurring at the end of the `input` are buffered - * internally and emitted after the next call to `textDecoder.decode()`. - * - * If `textDecoder.fatal` is `true`, decoding errors that occur will result in a `TypeError` being thrown. - * @param input An `ArrayBuffer`, `DataView`, or `TypedArray` instance containing the encoded data. - */ - decode( - input?: NodeJS.ArrayBufferView | ArrayBuffer | null, - options?: { - stream?: boolean | undefined; - }, - ): string; - } - export interface EncodeIntoResult { - /** - * The read Unicode code units of input. - */ - read: number; - /** - * The written UTF-8 bytes of output. - */ - written: number; - } - export { types }; - - //// TextEncoder/Decoder - /** - * An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextEncoder` API. All - * instances of `TextEncoder` only support UTF-8 encoding. - * - * ```js - * const encoder = new TextEncoder(); - * const uint8array = encoder.encode('this is some data'); - * ``` - * - * The `TextEncoder` class is also available on the global object. - * @since v8.3.0 - */ - export class TextEncoder { - /** - * The encoding supported by the `TextEncoder` instance. Always set to `'utf-8'`. - */ - readonly encoding: string; - /** - * UTF-8 encodes the `input` string and returns a `Uint8Array` containing the - * encoded bytes. - * @param [input='an empty string'] The text to encode. - */ - encode(input?: string): NodeJS.NonSharedUint8Array; - /** - * UTF-8 encodes the `src` string to the `dest` Uint8Array and returns an object - * containing the read Unicode code units and written UTF-8 bytes. - * - * ```js - * const encoder = new TextEncoder(); - * const src = 'this is some data'; - * const dest = new Uint8Array(10); - * const { read, written } = encoder.encodeInto(src, dest); - * ``` - * @param src The text to encode. - * @param dest The array to hold the encode result. - */ - encodeInto(src: string, dest: Uint8Array): EncodeIntoResult; - } - import { TextDecoder as _TextDecoder, TextEncoder as _TextEncoder } from "util"; - global { - /** - * `TextDecoder` class is a global reference for `import { TextDecoder } from 'node:util'` - * https://nodejs.org/api/globals.html#textdecoder - * @since v11.0.0 - */ - var TextDecoder: typeof globalThis extends { - onmessage: any; - TextDecoder: infer TextDecoder; - } ? TextDecoder - : typeof _TextDecoder; - /** - * `TextEncoder` class is a global reference for `import { TextEncoder } from 'node:util'` - * https://nodejs.org/api/globals.html#textencoder - * @since v11.0.0 - */ - var TextEncoder: typeof globalThis extends { - onmessage: any; - TextEncoder: infer TextEncoder; - } ? TextEncoder - : typeof _TextEncoder; - } - - //// parseArgs - /** - * Provides a higher level API for command-line argument parsing than interacting - * with `process.argv` directly. Takes a specification for the expected arguments - * and returns a structured object with the parsed options and positionals. - * - * ```js - * import { parseArgs } from 'node:util'; - * const args = ['-f', '--bar', 'b']; - * const options = { - * foo: { - * type: 'boolean', - * short: 'f', - * }, - * bar: { - * type: 'string', - * }, - * }; - * const { - * values, - * positionals, - * } = parseArgs({ args, options }); - * console.log(values, positionals); - * // Prints: [Object: null prototype] { foo: true, bar: 'b' } [] - * ``` - * @since v18.3.0, v16.17.0 - * @param config Used to provide arguments for parsing and to configure the parser. `config` supports the following properties: - * @return The parsed command line arguments: - */ - export function parseArgs(config?: T): ParsedResults; - interface ParseArgsOptionConfig { - /** - * Type of argument. - */ - type: "string" | "boolean"; - /** - * Whether this option can be provided multiple times. - * If `true`, all values will be collected in an array. - * If `false`, values for the option are last-wins. - * @default false. - */ - multiple?: boolean | undefined; - /** - * A single character alias for the option. - */ - short?: string | undefined; - /** - * The default option value when it is not set by args. - * It must be of the same type as the the `type` property. - * When `multiple` is `true`, it must be an array. - * @since v18.11.0 - */ - default?: string | boolean | string[] | boolean[] | undefined; - } - interface ParseArgsOptionsConfig { - [longOption: string]: ParseArgsOptionConfig; - } - export interface ParseArgsConfig { - /** - * Array of argument strings. - */ - args?: readonly string[] | undefined; - /** - * Used to describe arguments known to the parser. - */ - options?: ParseArgsOptionsConfig | undefined; - /** - * Should an error be thrown when unknown arguments are encountered, - * or when arguments are passed that do not match the `type` configured in `options`. - * @default true - */ - strict?: boolean | undefined; - /** - * Whether this command accepts positional arguments. - */ - allowPositionals?: boolean | undefined; - /** - * If `true`, allows explicitly setting boolean options to `false` by prefixing the option name with `--no-`. - * @default false - * @since v20.16.0 - */ - allowNegative?: boolean | undefined; - /** - * Return the parsed tokens. This is useful for extending the built-in behavior, - * from adding additional checks through to reprocessing the tokens in different ways. - * @default false - */ - tokens?: boolean | undefined; - } - /* - IfDefaultsTrue and IfDefaultsFalse are helpers to handle default values for missing boolean properties. - TypeScript does not have exact types for objects: https://github.com/microsoft/TypeScript/issues/12936 - This means it is impossible to distinguish between "field X is definitely not present" and "field X may or may not be present". - But we expect users to generally provide their config inline or `as const`, which means TS will always know whether a given field is present. - So this helper treats "not definitely present" (i.e., not `extends boolean`) as being "definitely not present", i.e. it should have its default value. - This is technically incorrect but is a much nicer UX for the common case. - The IfDefaultsTrue version is for things which default to true; the IfDefaultsFalse version is for things which default to false. - */ - type IfDefaultsTrue = T extends true ? IfTrue - : T extends false ? IfFalse - : IfTrue; - - // we put the `extends false` condition first here because `undefined` compares like `any` when `strictNullChecks: false` - type IfDefaultsFalse = T extends false ? IfFalse - : T extends true ? IfTrue - : IfFalse; - - type ExtractOptionValue = IfDefaultsTrue< - T["strict"], - O["type"] extends "string" ? string : O["type"] extends "boolean" ? boolean : string | boolean, - string | boolean - >; - - type ApplyOptionalModifiers> = ( - & { -readonly [LongOption in keyof O]?: V[LongOption] } - & { [LongOption in keyof O as O[LongOption]["default"] extends {} ? LongOption : never]: V[LongOption] } - ) extends infer P ? { [K in keyof P]: P[K] } : never; // resolve intersection to object - - type ParsedValues = - & IfDefaultsTrue - & (T["options"] extends ParseArgsOptionsConfig ? ApplyOptionalModifiers< - T["options"], - { - [LongOption in keyof T["options"]]: IfDefaultsFalse< - T["options"][LongOption]["multiple"], - Array>, - ExtractOptionValue - >; - } - > - : {}); - - type ParsedPositionals = IfDefaultsTrue< - T["strict"], - IfDefaultsFalse, - IfDefaultsTrue - >; - - type PreciseTokenForOptions< - K extends string, - O extends ParseArgsOptionConfig, - > = O["type"] extends "string" ? { - kind: "option"; - index: number; - name: K; - rawName: string; - value: string; - inlineValue: boolean; - } - : O["type"] extends "boolean" ? { - kind: "option"; - index: number; - name: K; - rawName: string; - value: undefined; - inlineValue: undefined; - } - : OptionToken & { name: K }; - - type TokenForOptions< - T extends ParseArgsConfig, - K extends keyof T["options"] = keyof T["options"], - > = K extends unknown - ? T["options"] extends ParseArgsOptionsConfig ? PreciseTokenForOptions - : OptionToken - : never; - - type ParsedOptionToken = IfDefaultsTrue, OptionToken>; - - type ParsedPositionalToken = IfDefaultsTrue< - T["strict"], - IfDefaultsFalse, - IfDefaultsTrue - >; - - type ParsedTokens = Array< - ParsedOptionToken | ParsedPositionalToken | { kind: "option-terminator"; index: number } - >; - - type PreciseParsedResults = IfDefaultsFalse< - T["tokens"], - { - values: ParsedValues; - positionals: ParsedPositionals; - tokens: ParsedTokens; - }, - { - values: ParsedValues; - positionals: ParsedPositionals; - } - >; - - type OptionToken = - | { kind: "option"; index: number; name: string; rawName: string; value: string; inlineValue: boolean } - | { - kind: "option"; - index: number; - name: string; - rawName: string; - value: undefined; - inlineValue: undefined; - }; - - type Token = - | OptionToken - | { kind: "positional"; index: number; value: string } - | { kind: "option-terminator"; index: number }; - - // If ParseArgsConfig extends T, then the user passed config constructed elsewhere. - // So we can't rely on the `"not definitely present" implies "definitely not present"` assumption mentioned above. - type ParsedResults = ParseArgsConfig extends T ? { - values: { - [longOption: string]: undefined | string | boolean | Array; - }; - positionals: string[]; - tokens?: Token[]; - } - : PreciseParsedResults; - - /** - * An implementation of [the MIMEType class](https://bmeck.github.io/node-proposal-mime-api/). - * - * In accordance with browser conventions, all properties of `MIMEType` objects - * are implemented as getters and setters on the class prototype, rather than as - * data properties on the object itself. - * - * A MIME string is a structured string containing multiple meaningful - * components. When parsed, a `MIMEType` object is returned containing - * properties for each of these components. - * @since v19.1.0, v18.13.0 - * @experimental - */ - export class MIMEType { - /** - * Creates a new MIMEType object by parsing the input. - * - * A `TypeError` will be thrown if the `input` is not a valid MIME. - * Note that an effort will be made to coerce the given values into strings. - * @param input The input MIME to parse. - */ - constructor(input: string | { toString: () => string }); - - /** - * Gets and sets the type portion of the MIME. - * - * ```js - * import { MIMEType } from 'node:util'; - * - * const myMIME = new MIMEType('text/javascript'); - * console.log(myMIME.type); - * // Prints: text - * myMIME.type = 'application'; - * console.log(myMIME.type); - * // Prints: application - * console.log(String(myMIME)); - * // Prints: application/javascript - * ``` - */ - type: string; - /** - * Gets and sets the subtype portion of the MIME. - * - * ```js - * import { MIMEType } from 'node:util'; - * - * const myMIME = new MIMEType('text/ecmascript'); - * console.log(myMIME.subtype); - * // Prints: ecmascript - * myMIME.subtype = 'javascript'; - * console.log(myMIME.subtype); - * // Prints: javascript - * console.log(String(myMIME)); - * // Prints: text/javascript - * ``` - */ - subtype: string; - /** - * Gets the essence of the MIME. This property is read only. - * Use `mime.type` or `mime.subtype` to alter the MIME. - * - * ```js - * import { MIMEType } from 'node:util'; - * - * const myMIME = new MIMEType('text/javascript;key=value'); - * console.log(myMIME.essence); - * // Prints: text/javascript - * myMIME.type = 'application'; - * console.log(myMIME.essence); - * // Prints: application/javascript - * console.log(String(myMIME)); - * // Prints: application/javascript;key=value - * ``` - */ - readonly essence: string; - /** - * Gets the `MIMEParams` object representing the - * parameters of the MIME. This property is read-only. See `MIMEParams` documentation for details. - */ - readonly params: MIMEParams; - /** - * The `toString()` method on the `MIMEType` object returns the serialized MIME. - * - * Because of the need for standard compliance, this method does not allow users - * to customize the serialization process of the MIME. - */ - toString(): string; - } - /** - * The `MIMEParams` API provides read and write access to the parameters of a `MIMEType`. - * @since v19.1.0, v18.13.0 - */ - export class MIMEParams { - /** - * Remove all name-value pairs whose name is `name`. - */ - delete(name: string): void; - /** - * Returns an iterator over each of the name-value pairs in the parameters. - * Each item of the iterator is a JavaScript `Array`. The first item of the array - * is the `name`, the second item of the array is the `value`. - */ - entries(): NodeJS.Iterator<[name: string, value: string]>; - /** - * Returns the value of the first name-value pair whose name is `name`. If there - * are no such pairs, `null` is returned. - * @return or `null` if there is no name-value pair with the given `name`. - */ - get(name: string): string | null; - /** - * Returns `true` if there is at least one name-value pair whose name is `name`. - */ - has(name: string): boolean; - /** - * Returns an iterator over the names of each name-value pair. - * - * ```js - * import { MIMEType } from 'node:util'; - * - * const { params } = new MIMEType('text/plain;foo=0;bar=1'); - * for (const name of params.keys()) { - * console.log(name); - * } - * // Prints: - * // foo - * // bar - * ``` - */ - keys(): NodeJS.Iterator; - /** - * Sets the value in the `MIMEParams` object associated with `name` to `value`. If there are any pre-existing name-value pairs whose names are `name`, - * set the first such pair's value to `value`. - * - * ```js - * import { MIMEType } from 'node:util'; - * - * const { params } = new MIMEType('text/plain;foo=0;bar=1'); - * params.set('foo', 'def'); - * params.set('baz', 'xyz'); - * console.log(params.toString()); - * // Prints: foo=def;bar=1;baz=xyz - * ``` - */ - set(name: string, value: string): void; - /** - * Returns an iterator over the values of each name-value pair. - */ - values(): NodeJS.Iterator; - /** - * Returns an iterator over each of the name-value pairs in the parameters. - */ - [Symbol.iterator](): NodeJS.Iterator<[name: string, value: string]>; - } -} -declare module "util/types" { - import { KeyObject, webcrypto } from "node:crypto"; - /** - * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) or - * [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance. - * - * See also `util.types.isArrayBuffer()` and `util.types.isSharedArrayBuffer()`. - * - * ```js - * util.types.isAnyArrayBuffer(new ArrayBuffer()); // Returns true - * util.types.isAnyArrayBuffer(new SharedArrayBuffer()); // Returns true - * ``` - * @since v10.0.0 - */ - function isAnyArrayBuffer(object: unknown): object is ArrayBufferLike; - /** - * Returns `true` if the value is an `arguments` object. - * - * ```js - * function foo() { - * util.types.isArgumentsObject(arguments); // Returns true - * } - * ``` - * @since v10.0.0 - */ - function isArgumentsObject(object: unknown): object is IArguments; - /** - * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instance. - * This does _not_ include [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instances. Usually, it is - * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that. - * - * ```js - * util.types.isArrayBuffer(new ArrayBuffer()); // Returns true - * util.types.isArrayBuffer(new SharedArrayBuffer()); // Returns false - * ``` - * @since v10.0.0 - */ - function isArrayBuffer(object: unknown): object is ArrayBuffer; - /** - * Returns `true` if the value is an instance of one of the [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) views, such as typed - * array objects or [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView). Equivalent to - * [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). - * - * ```js - * util.types.isArrayBufferView(new Int8Array()); // true - * util.types.isArrayBufferView(Buffer.from('hello world')); // true - * util.types.isArrayBufferView(new DataView(new ArrayBuffer(16))); // true - * util.types.isArrayBufferView(new ArrayBuffer()); // false - * ``` - * @since v10.0.0 - */ - function isArrayBufferView(object: unknown): object is NodeJS.ArrayBufferView; - /** - * Returns `true` if the value is an [async function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function). - * This only reports back what the JavaScript engine is seeing; - * in particular, the return value may not match the original source code if - * a transpilation tool was used. - * - * ```js - * util.types.isAsyncFunction(function foo() {}); // Returns false - * util.types.isAsyncFunction(async function foo() {}); // Returns true - * ``` - * @since v10.0.0 - */ - function isAsyncFunction(object: unknown): boolean; - /** - * Returns `true` if the value is a `BigInt64Array` instance. - * - * ```js - * util.types.isBigInt64Array(new BigInt64Array()); // Returns true - * util.types.isBigInt64Array(new BigUint64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isBigInt64Array(value: unknown): value is BigInt64Array; - /** - * Returns `true` if the value is a BigInt object, e.g. created - * by `Object(BigInt(123))`. - * - * ```js - * util.types.isBigIntObject(Object(BigInt(123))); // Returns true - * util.types.isBigIntObject(BigInt(123)); // Returns false - * util.types.isBigIntObject(123); // Returns false - * ``` - * @since v10.4.0 - */ - function isBigIntObject(object: unknown): object is BigInt; - /** - * Returns `true` if the value is a `BigUint64Array` instance. - * - * ```js - * util.types.isBigUint64Array(new BigInt64Array()); // Returns false - * util.types.isBigUint64Array(new BigUint64Array()); // Returns true - * ``` - * @since v10.0.0 - */ - function isBigUint64Array(value: unknown): value is BigUint64Array; - /** - * Returns `true` if the value is a boolean object, e.g. created - * by `new Boolean()`. - * - * ```js - * util.types.isBooleanObject(false); // Returns false - * util.types.isBooleanObject(true); // Returns false - * util.types.isBooleanObject(new Boolean(false)); // Returns true - * util.types.isBooleanObject(new Boolean(true)); // Returns true - * util.types.isBooleanObject(Boolean(false)); // Returns false - * util.types.isBooleanObject(Boolean(true)); // Returns false - * ``` - * @since v10.0.0 - */ - function isBooleanObject(object: unknown): object is Boolean; - /** - * Returns `true` if the value is any boxed primitive object, e.g. created - * by `new Boolean()`, `new String()` or `Object(Symbol())`. - * - * For example: - * - * ```js - * util.types.isBoxedPrimitive(false); // Returns false - * util.types.isBoxedPrimitive(new Boolean(false)); // Returns true - * util.types.isBoxedPrimitive(Symbol('foo')); // Returns false - * util.types.isBoxedPrimitive(Object(Symbol('foo'))); // Returns true - * util.types.isBoxedPrimitive(Object(BigInt(5))); // Returns true - * ``` - * @since v10.11.0 - */ - function isBoxedPrimitive(object: unknown): object is String | Number | BigInt | Boolean | Symbol; - /** - * Returns `true` if the value is a built-in [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView) instance. - * - * ```js - * const ab = new ArrayBuffer(20); - * util.types.isDataView(new DataView(ab)); // Returns true - * util.types.isDataView(new Float64Array()); // Returns false - * ``` - * - * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). - * @since v10.0.0 - */ - function isDataView(object: unknown): object is DataView; - /** - * Returns `true` if the value is a built-in [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) instance. - * - * ```js - * util.types.isDate(new Date()); // Returns true - * ``` - * @since v10.0.0 - */ - function isDate(object: unknown): object is Date; - /** - * Returns `true` if the value is a native `External` value. - * - * A native `External` value is a special type of object that contains a - * raw C++ pointer (`void*`) for access from native code, and has no other - * properties. Such objects are created either by Node.js internals or native - * addons. In JavaScript, they are [frozen](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze) objects with a`null` prototype. - * - * ```c - * #include - * #include - * napi_value result; - * static napi_value MyNapi(napi_env env, napi_callback_info info) { - * int* raw = (int*) malloc(1024); - * napi_status status = napi_create_external(env, (void*) raw, NULL, NULL, &result); - * if (status != napi_ok) { - * napi_throw_error(env, NULL, "napi_create_external failed"); - * return NULL; - * } - * return result; - * } - * ... - * DECLARE_NAPI_PROPERTY("myNapi", MyNapi) - * ... - * ``` - * - * ```js - * const native =require('napi_addon.node'); - * const data = native.myNapi(); - * util.types.isExternal(data); // returns true - * util.types.isExternal(0); // returns false - * util.types.isExternal(new String('foo')); // returns false - * ``` - * - * For further information on `napi_create_external`, refer to `napi_create_external()`. - * @since v10.0.0 - */ - function isExternal(object: unknown): boolean; - /** - * Returns `true` if the value is a built-in [`Float32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array) instance. - * - * ```js - * util.types.isFloat32Array(new ArrayBuffer()); // Returns false - * util.types.isFloat32Array(new Float32Array()); // Returns true - * util.types.isFloat32Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isFloat32Array(object: unknown): object is Float32Array; - /** - * Returns `true` if the value is a built-in [`Float64Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array) instance. - * - * ```js - * util.types.isFloat64Array(new ArrayBuffer()); // Returns false - * util.types.isFloat64Array(new Uint8Array()); // Returns false - * util.types.isFloat64Array(new Float64Array()); // Returns true - * ``` - * @since v10.0.0 - */ - function isFloat64Array(object: unknown): object is Float64Array; - /** - * Returns `true` if the value is a generator function. - * This only reports back what the JavaScript engine is seeing; - * in particular, the return value may not match the original source code if - * a transpilation tool was used. - * - * ```js - * util.types.isGeneratorFunction(function foo() {}); // Returns false - * util.types.isGeneratorFunction(function* foo() {}); // Returns true - * ``` - * @since v10.0.0 - */ - function isGeneratorFunction(object: unknown): object is GeneratorFunction; - /** - * Returns `true` if the value is a generator object as returned from a - * built-in generator function. - * This only reports back what the JavaScript engine is seeing; - * in particular, the return value may not match the original source code if - * a transpilation tool was used. - * - * ```js - * function* foo() {} - * const generator = foo(); - * util.types.isGeneratorObject(generator); // Returns true - * ``` - * @since v10.0.0 - */ - function isGeneratorObject(object: unknown): object is Generator; - /** - * Returns `true` if the value is a built-in [`Int8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array) instance. - * - * ```js - * util.types.isInt8Array(new ArrayBuffer()); // Returns false - * util.types.isInt8Array(new Int8Array()); // Returns true - * util.types.isInt8Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isInt8Array(object: unknown): object is Int8Array; - /** - * Returns `true` if the value is a built-in [`Int16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array) instance. - * - * ```js - * util.types.isInt16Array(new ArrayBuffer()); // Returns false - * util.types.isInt16Array(new Int16Array()); // Returns true - * util.types.isInt16Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isInt16Array(object: unknown): object is Int16Array; - /** - * Returns `true` if the value is a built-in [`Int32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array) instance. - * - * ```js - * util.types.isInt32Array(new ArrayBuffer()); // Returns false - * util.types.isInt32Array(new Int32Array()); // Returns true - * util.types.isInt32Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isInt32Array(object: unknown): object is Int32Array; - /** - * Returns `true` if the value is a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance. - * - * ```js - * util.types.isMap(new Map()); // Returns true - * ``` - * @since v10.0.0 - */ - function isMap( - object: T | {}, - ): object is T extends ReadonlyMap ? (unknown extends T ? never : ReadonlyMap) - : Map; - /** - * Returns `true` if the value is an iterator returned for a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance. - * - * ```js - * const map = new Map(); - * util.types.isMapIterator(map.keys()); // Returns true - * util.types.isMapIterator(map.values()); // Returns true - * util.types.isMapIterator(map.entries()); // Returns true - * util.types.isMapIterator(map[Symbol.iterator]()); // Returns true - * ``` - * @since v10.0.0 - */ - function isMapIterator(object: unknown): boolean; - /** - * Returns `true` if the value is an instance of a [Module Namespace Object](https://tc39.github.io/ecma262/#sec-module-namespace-exotic-objects). - * - * ```js - * import * as ns from './a.js'; - * - * util.types.isModuleNamespaceObject(ns); // Returns true - * ``` - * @since v10.0.0 - */ - function isModuleNamespaceObject(value: unknown): boolean; - /** - * Returns `true` if the value was returned by the constructor of a [built-in `Error` type](https://tc39.es/ecma262/#sec-error-objects). - * - * ```js - * console.log(util.types.isNativeError(new Error())); // true - * console.log(util.types.isNativeError(new TypeError())); // true - * console.log(util.types.isNativeError(new RangeError())); // true - * ``` - * - * Subclasses of the native error types are also native errors: - * - * ```js - * class MyError extends Error {} - * console.log(util.types.isNativeError(new MyError())); // true - * ``` - * - * A value being `instanceof` a native error class is not equivalent to `isNativeError()` returning `true` for that value. `isNativeError()` returns `true` for errors - * which come from a different [realm](https://tc39.es/ecma262/#realm) while `instanceof Error` returns `false` for these errors: - * - * ```js - * import vm from 'node:vm'; - * const context = vm.createContext({}); - * const myError = vm.runInContext('new Error()', context); - * console.log(util.types.isNativeError(myError)); // true - * console.log(myError instanceof Error); // false - * ``` - * - * Conversely, `isNativeError()` returns `false` for all objects which were not - * returned by the constructor of a native error. That includes values - * which are `instanceof` native errors: - * - * ```js - * const myError = { __proto__: Error.prototype }; - * console.log(util.types.isNativeError(myError)); // false - * console.log(myError instanceof Error); // true - * ``` - * @since v10.0.0 - */ - function isNativeError(object: unknown): object is Error; - /** - * Returns `true` if the value is a number object, e.g. created - * by `new Number()`. - * - * ```js - * util.types.isNumberObject(0); // Returns false - * util.types.isNumberObject(new Number(0)); // Returns true - * ``` - * @since v10.0.0 - */ - function isNumberObject(object: unknown): object is Number; - /** - * Returns `true` if the value is a built-in [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). - * - * ```js - * util.types.isPromise(Promise.resolve(42)); // Returns true - * ``` - * @since v10.0.0 - */ - function isPromise(object: unknown): object is Promise; - /** - * Returns `true` if the value is a [`Proxy`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) instance. - * - * ```js - * const target = {}; - * const proxy = new Proxy(target, {}); - * util.types.isProxy(target); // Returns false - * util.types.isProxy(proxy); // Returns true - * ``` - * @since v10.0.0 - */ - function isProxy(object: unknown): boolean; - /** - * Returns `true` if the value is a regular expression object. - * - * ```js - * util.types.isRegExp(/abc/); // Returns true - * util.types.isRegExp(new RegExp('abc')); // Returns true - * ``` - * @since v10.0.0 - */ - function isRegExp(object: unknown): object is RegExp; - /** - * Returns `true` if the value is a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance. - * - * ```js - * util.types.isSet(new Set()); // Returns true - * ``` - * @since v10.0.0 - */ - function isSet( - object: T | {}, - ): object is T extends ReadonlySet ? (unknown extends T ? never : ReadonlySet) : Set; - /** - * Returns `true` if the value is an iterator returned for a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance. - * - * ```js - * const set = new Set(); - * util.types.isSetIterator(set.keys()); // Returns true - * util.types.isSetIterator(set.values()); // Returns true - * util.types.isSetIterator(set.entries()); // Returns true - * util.types.isSetIterator(set[Symbol.iterator]()); // Returns true - * ``` - * @since v10.0.0 - */ - function isSetIterator(object: unknown): boolean; - /** - * Returns `true` if the value is a built-in [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance. - * This does _not_ include [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instances. Usually, it is - * desirable to test for both; See `util.types.isAnyArrayBuffer()` for that. - * - * ```js - * util.types.isSharedArrayBuffer(new ArrayBuffer()); // Returns false - * util.types.isSharedArrayBuffer(new SharedArrayBuffer()); // Returns true - * ``` - * @since v10.0.0 - */ - function isSharedArrayBuffer(object: unknown): object is SharedArrayBuffer; - /** - * Returns `true` if the value is a string object, e.g. created - * by `new String()`. - * - * ```js - * util.types.isStringObject('foo'); // Returns false - * util.types.isStringObject(new String('foo')); // Returns true - * ``` - * @since v10.0.0 - */ - function isStringObject(object: unknown): object is String; - /** - * Returns `true` if the value is a symbol object, created - * by calling `Object()` on a `Symbol` primitive. - * - * ```js - * const symbol = Symbol('foo'); - * util.types.isSymbolObject(symbol); // Returns false - * util.types.isSymbolObject(Object(symbol)); // Returns true - * ``` - * @since v10.0.0 - */ - function isSymbolObject(object: unknown): object is Symbol; - /** - * Returns `true` if the value is a built-in [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) instance. - * - * ```js - * util.types.isTypedArray(new ArrayBuffer()); // Returns false - * util.types.isTypedArray(new Uint8Array()); // Returns true - * util.types.isTypedArray(new Float64Array()); // Returns true - * ``` - * - * See also [`ArrayBuffer.isView()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView). - * @since v10.0.0 - */ - function isTypedArray(object: unknown): object is NodeJS.TypedArray; - /** - * Returns `true` if the value is a built-in [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) instance. - * - * ```js - * util.types.isUint8Array(new ArrayBuffer()); // Returns false - * util.types.isUint8Array(new Uint8Array()); // Returns true - * util.types.isUint8Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isUint8Array(object: unknown): object is Uint8Array; - /** - * Returns `true` if the value is a built-in [`Uint8ClampedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray) instance. - * - * ```js - * util.types.isUint8ClampedArray(new ArrayBuffer()); // Returns false - * util.types.isUint8ClampedArray(new Uint8ClampedArray()); // Returns true - * util.types.isUint8ClampedArray(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isUint8ClampedArray(object: unknown): object is Uint8ClampedArray; - /** - * Returns `true` if the value is a built-in [`Uint16Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array) instance. - * - * ```js - * util.types.isUint16Array(new ArrayBuffer()); // Returns false - * util.types.isUint16Array(new Uint16Array()); // Returns true - * util.types.isUint16Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isUint16Array(object: unknown): object is Uint16Array; - /** - * Returns `true` if the value is a built-in [`Uint32Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array) instance. - * - * ```js - * util.types.isUint32Array(new ArrayBuffer()); // Returns false - * util.types.isUint32Array(new Uint32Array()); // Returns true - * util.types.isUint32Array(new Float64Array()); // Returns false - * ``` - * @since v10.0.0 - */ - function isUint32Array(object: unknown): object is Uint32Array; - /** - * Returns `true` if the value is a built-in [`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) instance. - * - * ```js - * util.types.isWeakMap(new WeakMap()); // Returns true - * ``` - * @since v10.0.0 - */ - function isWeakMap(object: unknown): object is WeakMap; - /** - * Returns `true` if the value is a built-in [`WeakSet`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet) instance. - * - * ```js - * util.types.isWeakSet(new WeakSet()); // Returns true - * ``` - * @since v10.0.0 - */ - function isWeakSet(object: unknown): object is WeakSet; - /** - * Returns `true` if `value` is a `KeyObject`, `false` otherwise. - * @since v16.2.0 - */ - function isKeyObject(object: unknown): object is KeyObject; - /** - * Returns `true` if `value` is a `CryptoKey`, `false` otherwise. - * @since v16.2.0 - */ - function isCryptoKey(object: unknown): object is webcrypto.CryptoKey; -} -declare module "node:util" { - export * from "util"; -} -declare module "node:util/types" { - export * from "util/types"; -} diff --git a/node_modules/@types/node/v8.d.ts b/node_modules/@types/node/v8.d.ts deleted file mode 100644 index 8b0e965..0000000 --- a/node_modules/@types/node/v8.d.ts +++ /dev/null @@ -1,809 +0,0 @@ -/** - * The `node:v8` module exposes APIs that are specific to the version of [V8](https://developers.google.com/v8/) built into the Node.js binary. It can be accessed using: - * - * ```js - * import v8 from 'node:v8'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/v8.js) - */ -declare module "v8" { - import { NonSharedBuffer } from "node:buffer"; - import { Readable } from "node:stream"; - interface HeapSpaceInfo { - space_name: string; - space_size: number; - space_used_size: number; - space_available_size: number; - physical_space_size: number; - } - // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */ - type DoesZapCodeSpaceFlag = 0 | 1; - interface HeapInfo { - total_heap_size: number; - total_heap_size_executable: number; - total_physical_size: number; - total_available_size: number; - used_heap_size: number; - heap_size_limit: number; - malloced_memory: number; - peak_malloced_memory: number; - does_zap_garbage: DoesZapCodeSpaceFlag; - number_of_native_contexts: number; - number_of_detached_contexts: number; - total_global_handles_size: number; - used_global_handles_size: number; - external_memory: number; - } - interface HeapCodeStatistics { - code_and_metadata_size: number; - bytecode_and_metadata_size: number; - external_script_source_size: number; - } - interface HeapSnapshotOptions { - /** - * If true, expose internals in the heap snapshot. - * @default false - */ - exposeInternals?: boolean | undefined; - /** - * If true, expose numeric values in artificial fields. - * @default false - */ - exposeNumericValues?: boolean | undefined; - } - /** - * Returns an integer representing a version tag derived from the V8 version, - * command-line flags, and detected CPU features. This is useful for determining - * whether a `vm.Script` `cachedData` buffer is compatible with this instance - * of V8. - * - * ```js - * console.log(v8.cachedDataVersionTag()); // 3947234607 - * // The value returned by v8.cachedDataVersionTag() is derived from the V8 - * // version, command-line flags, and detected CPU features. Test that the value - * // does indeed update when flags are toggled. - * v8.setFlagsFromString('--allow_natives_syntax'); - * console.log(v8.cachedDataVersionTag()); // 183726201 - * ``` - * @since v8.0.0 - */ - function cachedDataVersionTag(): number; - /** - * Returns an object with the following properties: - * - * `does_zap_garbage` is a 0/1 boolean, which signifies whether the `--zap_code_space` option is enabled or not. This makes V8 overwrite heap - * garbage with a bit pattern. The RSS footprint (resident set size) gets bigger - * because it continuously touches all heap pages and that makes them less likely - * to get swapped out by the operating system. - * - * `number_of_native_contexts` The value of native\_context is the number of the - * top-level contexts currently active. Increase of this number over time indicates - * a memory leak. - * - * `number_of_detached_contexts` The value of detached\_context is the number - * of contexts that were detached and not yet garbage collected. This number - * being non-zero indicates a potential memory leak. - * - * `total_global_handles_size` The value of total\_global\_handles\_size is the - * total memory size of V8 global handles. - * - * `used_global_handles_size` The value of used\_global\_handles\_size is the - * used memory size of V8 global handles. - * - * `external_memory` The value of external\_memory is the memory size of array - * buffers and external strings. - * - * ```js - * { - * total_heap_size: 7326976, - * total_heap_size_executable: 4194304, - * total_physical_size: 7326976, - * total_available_size: 1152656, - * used_heap_size: 3476208, - * heap_size_limit: 1535115264, - * malloced_memory: 16384, - * peak_malloced_memory: 1127496, - * does_zap_garbage: 0, - * number_of_native_contexts: 1, - * number_of_detached_contexts: 0, - * total_global_handles_size: 8192, - * used_global_handles_size: 3296, - * external_memory: 318824 - * } - * ``` - * @since v1.0.0 - */ - function getHeapStatistics(): HeapInfo; - /** - * Returns statistics about the V8 heap spaces, i.e. the segments which make up - * the V8 heap. Neither the ordering of heap spaces, nor the availability of a - * heap space can be guaranteed as the statistics are provided via the - * V8 [`GetHeapSpaceStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#ac673576f24fdc7a33378f8f57e1d13a4) function and may change from one V8 version to the - * next. - * - * The value returned is an array of objects containing the following properties: - * - * ```json - * [ - * { - * "space_name": "new_space", - * "space_size": 2063872, - * "space_used_size": 951112, - * "space_available_size": 80824, - * "physical_space_size": 2063872 - * }, - * { - * "space_name": "old_space", - * "space_size": 3090560, - * "space_used_size": 2493792, - * "space_available_size": 0, - * "physical_space_size": 3090560 - * }, - * { - * "space_name": "code_space", - * "space_size": 1260160, - * "space_used_size": 644256, - * "space_available_size": 960, - * "physical_space_size": 1260160 - * }, - * { - * "space_name": "map_space", - * "space_size": 1094160, - * "space_used_size": 201608, - * "space_available_size": 0, - * "physical_space_size": 1094160 - * }, - * { - * "space_name": "large_object_space", - * "space_size": 0, - * "space_used_size": 0, - * "space_available_size": 1490980608, - * "physical_space_size": 0 - * } - * ] - * ``` - * @since v6.0.0 - */ - function getHeapSpaceStatistics(): HeapSpaceInfo[]; - /** - * The `v8.setFlagsFromString()` method can be used to programmatically set - * V8 command-line flags. This method should be used with care. Changing settings - * after the VM has started may result in unpredictable behavior, including - * crashes and data loss; or it may simply do nothing. - * - * The V8 options available for a version of Node.js may be determined by running `node --v8-options`. - * - * Usage: - * - * ```js - * // Print GC events to stdout for one minute. - * import v8 from 'node:v8'; - * v8.setFlagsFromString('--trace_gc'); - * setTimeout(() => { v8.setFlagsFromString('--notrace_gc'); }, 60e3); - * ``` - * @since v1.0.0 - */ - function setFlagsFromString(flags: string): void; - /** - * This is similar to the [`queryObjects()` console API](https://developer.chrome.com/docs/devtools/console/utilities#queryObjects-function) - * provided by the Chromium DevTools console. It can be used to search for objects that have the matching constructor on its prototype chain - * in the heap after a full garbage collection, which can be useful for memory leak regression tests. To avoid surprising results, users should - * avoid using this API on constructors whose implementation they don't control, or on constructors that can be invoked by other parties in the - * application. - * - * To avoid accidental leaks, this API does not return raw references to the objects found. By default, it returns the count of the objects - * found. If `options.format` is `'summary'`, it returns an array containing brief string representations for each object. The visibility provided - * in this API is similar to what the heap snapshot provides, while users can save the cost of serialization and parsing and directly filter the - * target objects during the search. - * - * Only objects created in the current execution context are included in the results. - * - * ```js - * import { queryObjects } from 'node:v8'; - * class A { foo = 'bar'; } - * console.log(queryObjects(A)); // 0 - * const a = new A(); - * console.log(queryObjects(A)); // 1 - * // [ "A { foo: 'bar' }" ] - * console.log(queryObjects(A, { format: 'summary' })); - * - * class B extends A { bar = 'qux'; } - * const b = new B(); - * console.log(queryObjects(B)); // 1 - * // [ "B { foo: 'bar', bar: 'qux' }" ] - * console.log(queryObjects(B, { format: 'summary' })); - * - * // Note that, when there are child classes inheriting from a constructor, - * // the constructor also shows up in the prototype chain of the child - * // classes's prototoype, so the child classes's prototoype would also be - * // included in the result. - * console.log(queryObjects(A)); // 3 - * // [ "B { foo: 'bar', bar: 'qux' }", 'A {}', "A { foo: 'bar' }" ] - * console.log(queryObjects(A, { format: 'summary' })); - * ``` - * @param ctor The constructor that can be used to search on the prototype chain in order to filter target objects in the heap. - * @since v20.13.0 - * @experimental - */ - function queryObjects(ctor: Function): number | string[]; - function queryObjects(ctor: Function, options: { format: "count" }): number; - function queryObjects(ctor: Function, options: { format: "summary" }): string[]; - /** - * Generates a snapshot of the current V8 heap and returns a Readable - * Stream that may be used to read the JSON serialized representation. - * This JSON stream format is intended to be used with tools such as - * Chrome DevTools. The JSON schema is undocumented and specific to the - * V8 engine. Therefore, the schema may change from one version of V8 to the next. - * - * Creating a heap snapshot requires memory about twice the size of the heap at - * the time the snapshot is created. This results in the risk of OOM killers - * terminating the process. - * - * Generating a snapshot is a synchronous operation which blocks the event loop - * for a duration depending on the heap size. - * - * ```js - * // Print heap snapshot to the console - * import v8 from 'node:v8'; - * const stream = v8.getHeapSnapshot(); - * stream.pipe(process.stdout); - * ``` - * @since v11.13.0 - * @return A Readable containing the V8 heap snapshot. - */ - function getHeapSnapshot(options?: HeapSnapshotOptions): Readable; - /** - * Generates a snapshot of the current V8 heap and writes it to a JSON - * file. This file is intended to be used with tools such as Chrome - * DevTools. The JSON schema is undocumented and specific to the V8 - * engine, and may change from one version of V8 to the next. - * - * A heap snapshot is specific to a single V8 isolate. When using `worker threads`, a heap snapshot generated from the main thread will - * not contain any information about the workers, and vice versa. - * - * Creating a heap snapshot requires memory about twice the size of the heap at - * the time the snapshot is created. This results in the risk of OOM killers - * terminating the process. - * - * Generating a snapshot is a synchronous operation which blocks the event loop - * for a duration depending on the heap size. - * - * ```js - * import { writeHeapSnapshot } from 'node:v8'; - * import { - * Worker, - * isMainThread, - * parentPort, - * } from 'node:worker_threads'; - * - * if (isMainThread) { - * const worker = new Worker(__filename); - * - * worker.once('message', (filename) => { - * console.log(`worker heapdump: ${filename}`); - * // Now get a heapdump for the main thread. - * console.log(`main thread heapdump: ${writeHeapSnapshot()}`); - * }); - * - * // Tell the worker to create a heapdump. - * worker.postMessage('heapdump'); - * } else { - * parentPort.once('message', (message) => { - * if (message === 'heapdump') { - * // Generate a heapdump for the worker - * // and return the filename to the parent. - * parentPort.postMessage(writeHeapSnapshot()); - * } - * }); - * } - * ``` - * @since v11.13.0 - * @param filename The file path where the V8 heap snapshot is to be saved. If not specified, a file name with the pattern `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be - * generated, where `{pid}` will be the PID of the Node.js process, `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from the main Node.js thread or the id of a - * worker thread. - * @return The filename where the snapshot was saved. - */ - function writeHeapSnapshot(filename?: string, options?: HeapSnapshotOptions): string; - /** - * Get statistics about code and its metadata in the heap, see - * V8 [`GetHeapCodeAndMetadataStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#a6079122af17612ef54ef3348ce170866) API. Returns an object with the - * following properties: - * - * ```js - * { - * code_and_metadata_size: 212208, - * bytecode_and_metadata_size: 161368, - * external_script_source_size: 1410794, - * cpu_profiler_metadata_size: 0, - * } - * ``` - * @since v12.8.0 - */ - function getHeapCodeStatistics(): HeapCodeStatistics; - /** - * @since v8.0.0 - */ - class Serializer { - /** - * Writes out a header, which includes the serialization format version. - */ - writeHeader(): void; - /** - * Serializes a JavaScript value and adds the serialized representation to the - * internal buffer. - * - * This throws an error if `value` cannot be serialized. - */ - writeValue(val: any): boolean; - /** - * Returns the stored internal buffer. This serializer should not be used once - * the buffer is released. Calling this method results in undefined behavior - * if a previous write has failed. - */ - releaseBuffer(): NonSharedBuffer; - /** - * Marks an `ArrayBuffer` as having its contents transferred out of band. - * Pass the corresponding `ArrayBuffer` in the deserializing context to `deserializer.transferArrayBuffer()`. - * @param id A 32-bit unsigned integer. - * @param arrayBuffer An `ArrayBuffer` instance. - */ - transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void; - /** - * Write a raw 32-bit unsigned integer. - * For use inside of a custom `serializer._writeHostObject()`. - */ - writeUint32(value: number): void; - /** - * Write a raw 64-bit unsigned integer, split into high and low 32-bit parts. - * For use inside of a custom `serializer._writeHostObject()`. - */ - writeUint64(hi: number, lo: number): void; - /** - * Write a JS `number` value. - * For use inside of a custom `serializer._writeHostObject()`. - */ - writeDouble(value: number): void; - /** - * Write raw bytes into the serializer's internal buffer. The deserializer - * will require a way to compute the length of the buffer. - * For use inside of a custom `serializer._writeHostObject()`. - */ - writeRawBytes(buffer: NodeJS.ArrayBufferView): void; - } - /** - * A subclass of `Serializer` that serializes `TypedArray`(in particular `Buffer`) and `DataView` objects as host objects, and only - * stores the part of their underlying `ArrayBuffer`s that they are referring to. - * @since v8.0.0 - */ - class DefaultSerializer extends Serializer {} - /** - * @since v8.0.0 - */ - class Deserializer { - constructor(data: NodeJS.TypedArray); - /** - * Reads and validates a header (including the format version). - * May, for example, reject an invalid or unsupported wire format. In that case, - * an `Error` is thrown. - */ - readHeader(): boolean; - /** - * Deserializes a JavaScript value from the buffer and returns it. - */ - readValue(): any; - /** - * Marks an `ArrayBuffer` as having its contents transferred out of band. - * Pass the corresponding `ArrayBuffer` in the serializing context to `serializer.transferArrayBuffer()` (or return the `id` from `serializer._getSharedArrayBufferId()` in the case of - * `SharedArrayBuffer`s). - * @param id A 32-bit unsigned integer. - * @param arrayBuffer An `ArrayBuffer` instance. - */ - transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void; - /** - * Reads the underlying wire format version. Likely mostly to be useful to - * legacy code reading old wire format versions. May not be called before `.readHeader()`. - */ - getWireFormatVersion(): number; - /** - * Read a raw 32-bit unsigned integer and return it. - * For use inside of a custom `deserializer._readHostObject()`. - */ - readUint32(): number; - /** - * Read a raw 64-bit unsigned integer and return it as an array `[hi, lo]` with two 32-bit unsigned integer entries. - * For use inside of a custom `deserializer._readHostObject()`. - */ - readUint64(): [number, number]; - /** - * Read a JS `number` value. - * For use inside of a custom `deserializer._readHostObject()`. - */ - readDouble(): number; - /** - * Read raw bytes from the deserializer's internal buffer. The `length` parameter - * must correspond to the length of the buffer that was passed to `serializer.writeRawBytes()`. - * For use inside of a custom `deserializer._readHostObject()`. - */ - readRawBytes(length: number): Buffer; - } - /** - * A subclass of `Deserializer` corresponding to the format written by `DefaultSerializer`. - * @since v8.0.0 - */ - class DefaultDeserializer extends Deserializer {} - /** - * Uses a `DefaultSerializer` to serialize `value` into a buffer. - * - * `ERR_BUFFER_TOO_LARGE` will be thrown when trying to - * serialize a huge object which requires buffer - * larger than `buffer.constants.MAX_LENGTH`. - * @since v8.0.0 - */ - function serialize(value: any): NonSharedBuffer; - /** - * Uses a `DefaultDeserializer` with default options to read a JS value - * from a buffer. - * @since v8.0.0 - * @param buffer A buffer returned by {@link serialize}. - */ - function deserialize(buffer: NodeJS.ArrayBufferView): any; - /** - * The `v8.takeCoverage()` method allows the user to write the coverage started by `NODE_V8_COVERAGE` to disk on demand. This method can be invoked multiple - * times during the lifetime of the process. Each time the execution counter will - * be reset and a new coverage report will be written to the directory specified - * by `NODE_V8_COVERAGE`. - * - * When the process is about to exit, one last coverage will still be written to - * disk unless {@link stopCoverage} is invoked before the process exits. - * @since v15.1.0, v14.18.0, v12.22.0 - */ - function takeCoverage(): void; - /** - * The `v8.stopCoverage()` method allows the user to stop the coverage collection - * started by `NODE_V8_COVERAGE`, so that V8 can release the execution count - * records and optimize code. This can be used in conjunction with {@link takeCoverage} if the user wants to collect the coverage on demand. - * @since v15.1.0, v14.18.0, v12.22.0 - */ - function stopCoverage(): void; - /** - * The API is a no-op if `--heapsnapshot-near-heap-limit` is already set from the command line or the API is called more than once. - * `limit` must be a positive integer. See [`--heapsnapshot-near-heap-limit`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--heapsnapshot-near-heap-limitmax_count) for more information. - * @experimental - * @since v18.10.0, v16.18.0 - */ - function setHeapSnapshotNearHeapLimit(limit: number): void; - /** - * This API collects GC data in current thread. - * @since v19.6.0, v18.15.0 - */ - class GCProfiler { - /** - * Start collecting GC data. - * @since v19.6.0, v18.15.0 - */ - start(): void; - /** - * Stop collecting GC data and return an object. The content of object - * is as follows. - * - * ```json - * { - * "version": 1, - * "startTime": 1674059033862, - * "statistics": [ - * { - * "gcType": "Scavenge", - * "beforeGC": { - * "heapStatistics": { - * "totalHeapSize": 5005312, - * "totalHeapSizeExecutable": 524288, - * "totalPhysicalSize": 5226496, - * "totalAvailableSize": 4341325216, - * "totalGlobalHandlesSize": 8192, - * "usedGlobalHandlesSize": 2112, - * "usedHeapSize": 4883840, - * "heapSizeLimit": 4345298944, - * "mallocedMemory": 254128, - * "externalMemory": 225138, - * "peakMallocedMemory": 181760 - * }, - * "heapSpaceStatistics": [ - * { - * "spaceName": "read_only_space", - * "spaceSize": 0, - * "spaceUsedSize": 0, - * "spaceAvailableSize": 0, - * "physicalSpaceSize": 0 - * } - * ] - * }, - * "cost": 1574.14, - * "afterGC": { - * "heapStatistics": { - * "totalHeapSize": 6053888, - * "totalHeapSizeExecutable": 524288, - * "totalPhysicalSize": 5500928, - * "totalAvailableSize": 4341101384, - * "totalGlobalHandlesSize": 8192, - * "usedGlobalHandlesSize": 2112, - * "usedHeapSize": 4059096, - * "heapSizeLimit": 4345298944, - * "mallocedMemory": 254128, - * "externalMemory": 225138, - * "peakMallocedMemory": 181760 - * }, - * "heapSpaceStatistics": [ - * { - * "spaceName": "read_only_space", - * "spaceSize": 0, - * "spaceUsedSize": 0, - * "spaceAvailableSize": 0, - * "physicalSpaceSize": 0 - * } - * ] - * } - * } - * ], - * "endTime": 1674059036865 - * } - * ``` - * - * Here's an example. - * - * ```js - * import { GCProfiler } from 'node:v8'; - * const profiler = new GCProfiler(); - * profiler.start(); - * setTimeout(() => { - * console.log(profiler.stop()); - * }, 1000); - * ``` - * @since v19.6.0, v18.15.0 - */ - stop(): GCProfilerResult; - } - interface GCProfilerResult { - version: number; - startTime: number; - endTime: number; - statistics: Array<{ - gcType: string; - cost: number; - beforeGC: { - heapStatistics: HeapStatistics; - heapSpaceStatistics: HeapSpaceStatistics[]; - }; - afterGC: { - heapStatistics: HeapStatistics; - heapSpaceStatistics: HeapSpaceStatistics[]; - }; - }>; - } - interface HeapStatistics { - totalHeapSize: number; - totalHeapSizeExecutable: number; - totalPhysicalSize: number; - totalAvailableSize: number; - totalGlobalHandlesSize: number; - usedGlobalHandlesSize: number; - usedHeapSize: number; - heapSizeLimit: number; - mallocedMemory: number; - externalMemory: number; - peakMallocedMemory: number; - } - interface HeapSpaceStatistics { - spaceName: string; - spaceSize: number; - spaceUsedSize: number; - spaceAvailableSize: number; - physicalSpaceSize: number; - } - /** - * Called when a promise is constructed. This does not mean that corresponding before/after events will occur, only that the possibility exists. This will - * happen if a promise is created without ever getting a continuation. - * @since v17.1.0, v16.14.0 - * @param promise The promise being created. - * @param parent The promise continued from, if applicable. - */ - interface Init { - (promise: Promise, parent: Promise): void; - } - /** - * Called before a promise continuation executes. This can be in the form of `then()`, `catch()`, or `finally()` handlers or an await resuming. - * - * The before callback will be called 0 to N times. The before callback will typically be called 0 times if no continuation was ever made for the promise. - * The before callback may be called many times in the case where many continuations have been made from the same promise. - * @since v17.1.0, v16.14.0 - */ - interface Before { - (promise: Promise): void; - } - /** - * Called immediately after a promise continuation executes. This may be after a `then()`, `catch()`, or `finally()` handler or before an await after another await. - * @since v17.1.0, v16.14.0 - */ - interface After { - (promise: Promise): void; - } - /** - * Called when the promise receives a resolution or rejection value. This may occur synchronously in the case of {@link Promise.resolve()} or - * {@link Promise.reject()}. - * @since v17.1.0, v16.14.0 - */ - interface Settled { - (promise: Promise): void; - } - /** - * Key events in the lifetime of a promise have been categorized into four areas: creation of a promise, before/after a continuation handler is called or - * around an await, and when the promise resolves or rejects. - * - * Because promises are asynchronous resources whose lifecycle is tracked via the promise hooks mechanism, the `init()`, `before()`, `after()`, and - * `settled()` callbacks must not be async functions as they create more promises which would produce an infinite loop. - * @since v17.1.0, v16.14.0 - */ - interface HookCallbacks { - init?: Init; - before?: Before; - after?: After; - settled?: Settled; - } - interface PromiseHooks { - /** - * The `init` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. - * @since v17.1.0, v16.14.0 - * @param init The {@link Init | `init` callback} to call when a promise is created. - * @return Call to stop the hook. - */ - onInit: (init: Init) => Function; - /** - * The `settled` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. - * @since v17.1.0, v16.14.0 - * @param settled The {@link Settled | `settled` callback} to call when a promise is created. - * @return Call to stop the hook. - */ - onSettled: (settled: Settled) => Function; - /** - * The `before` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. - * @since v17.1.0, v16.14.0 - * @param before The {@link Before | `before` callback} to call before a promise continuation executes. - * @return Call to stop the hook. - */ - onBefore: (before: Before) => Function; - /** - * The `after` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop. - * @since v17.1.0, v16.14.0 - * @param after The {@link After | `after` callback} to call after a promise continuation executes. - * @return Call to stop the hook. - */ - onAfter: (after: After) => Function; - /** - * Registers functions to be called for different lifetime events of each promise. - * The callbacks `init()`/`before()`/`after()`/`settled()` are called for the respective events during a promise's lifetime. - * All callbacks are optional. For example, if only promise creation needs to be tracked, then only the init callback needs to be passed. - * The hook callbacks must be plain functions. Providing async functions will throw as it would produce an infinite microtask loop. - * @since v17.1.0, v16.14.0 - * @param callbacks The {@link HookCallbacks | Hook Callbacks} to register - * @return Used for disabling hooks - */ - createHook: (callbacks: HookCallbacks) => Function; - } - /** - * The `promiseHooks` interface can be used to track promise lifecycle events. - * @since v17.1.0, v16.14.0 - */ - const promiseHooks: PromiseHooks; - type StartupSnapshotCallbackFn = (args: any) => any; - interface StartupSnapshot { - /** - * Add a callback that will be called when the Node.js instance is about to get serialized into a snapshot and exit. - * This can be used to release resources that should not or cannot be serialized or to convert user data into a form more suitable for serialization. - * @since v18.6.0, v16.17.0 - */ - addSerializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void; - /** - * Add a callback that will be called when the Node.js instance is deserialized from a snapshot. - * The `callback` and the `data` (if provided) will be serialized into the snapshot, they can be used to re-initialize the state of the application or - * to re-acquire resources that the application needs when the application is restarted from the snapshot. - * @since v18.6.0, v16.17.0 - */ - addDeserializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void; - /** - * This sets the entry point of the Node.js application when it is deserialized from a snapshot. This can be called only once in the snapshot building script. - * If called, the deserialized application no longer needs an additional entry point script to start up and will simply invoke the callback along with the deserialized - * data (if provided), otherwise an entry point script still needs to be provided to the deserialized application. - * @since v18.6.0, v16.17.0 - */ - setDeserializeMainFunction(callback: StartupSnapshotCallbackFn, data?: any): void; - /** - * Returns true if the Node.js instance is run to build a snapshot. - * @since v18.6.0, v16.17.0 - */ - isBuildingSnapshot(): boolean; - } - /** - * The `v8.startupSnapshot` interface can be used to add serialization and deserialization hooks for custom startup snapshots. - * - * ```bash - * $ node --snapshot-blob snapshot.blob --build-snapshot entry.js - * # This launches a process with the snapshot - * $ node --snapshot-blob snapshot.blob - * ``` - * - * In the example above, `entry.js` can use methods from the `v8.startupSnapshot` interface to specify how to save information for custom objects - * in the snapshot during serialization and how the information can be used to synchronize these objects during deserialization of the snapshot. - * For example, if the `entry.js` contains the following script: - * - * ```js - * 'use strict'; - * - * import fs from 'node:fs'; - * import zlib from 'node:zlib'; - * import path from 'node:path'; - * import assert from 'node:assert'; - * - * import v8 from 'node:v8'; - * - * class BookShelf { - * storage = new Map(); - * - * // Reading a series of files from directory and store them into storage. - * constructor(directory, books) { - * for (const book of books) { - * this.storage.set(book, fs.readFileSync(path.join(directory, book))); - * } - * } - * - * static compressAll(shelf) { - * for (const [ book, content ] of shelf.storage) { - * shelf.storage.set(book, zlib.gzipSync(content)); - * } - * } - * - * static decompressAll(shelf) { - * for (const [ book, content ] of shelf.storage) { - * shelf.storage.set(book, zlib.gunzipSync(content)); - * } - * } - * } - * - * // __dirname here is where the snapshot script is placed - * // during snapshot building time. - * const shelf = new BookShelf(__dirname, [ - * 'book1.en_US.txt', - * 'book1.es_ES.txt', - * 'book2.zh_CN.txt', - * ]); - * - * assert(v8.startupSnapshot.isBuildingSnapshot()); - * // On snapshot serialization, compress the books to reduce size. - * v8.startupSnapshot.addSerializeCallback(BookShelf.compressAll, shelf); - * // On snapshot deserialization, decompress the books. - * v8.startupSnapshot.addDeserializeCallback(BookShelf.decompressAll, shelf); - * v8.startupSnapshot.setDeserializeMainFunction((shelf) => { - * // process.env and process.argv are refreshed during snapshot - * // deserialization. - * const lang = process.env.BOOK_LANG || 'en_US'; - * const book = process.argv[1]; - * const name = `${book}.${lang}.txt`; - * console.log(shelf.storage.get(name)); - * }, shelf); - * ``` - * - * The resulted binary will get print the data deserialized from the snapshot during start up, using the refreshed `process.env` and `process.argv` of the launched process: - * - * ```bash - * $ BOOK_LANG=es_ES node --snapshot-blob snapshot.blob book1 - * # Prints content of book1.es_ES.txt deserialized from the snapshot. - * ``` - * - * Currently the application deserialized from a user-land snapshot cannot be snapshotted again, so these APIs are only available to applications that are not deserialized from a user-land snapshot. - * - * @experimental - * @since v18.6.0, v16.17.0 - */ - const startupSnapshot: StartupSnapshot; -} -declare module "node:v8" { - export * from "v8"; -} diff --git a/node_modules/@types/node/vm.d.ts b/node_modules/@types/node/vm.d.ts deleted file mode 100644 index 313240a..0000000 --- a/node_modules/@types/node/vm.d.ts +++ /dev/null @@ -1,1001 +0,0 @@ -/** - * The `node:vm` module enables compiling and running code within V8 Virtual - * Machine contexts. - * - * **The `node:vm` module is not a security** - * **mechanism. Do not use it to run untrusted code.** - * - * JavaScript code can be compiled and run immediately or - * compiled, saved, and run later. - * - * A common use case is to run the code in a different V8 Context. This means - * invoked code has a different global object than the invoking code. - * - * One can provide the context by `contextifying` an - * object. The invoked code treats any property in the context like a - * global variable. Any changes to global variables caused by the invoked - * code are reflected in the context object. - * - * ```js - * import vm from 'node:vm'; - * - * const x = 1; - * - * const context = { x: 2 }; - * vm.createContext(context); // Contextify the object. - * - * const code = 'x += 40; var y = 17;'; - * // `x` and `y` are global variables in the context. - * // Initially, x has the value 2 because that is the value of context.x. - * vm.runInContext(code, context); - * - * console.log(context.x); // 42 - * console.log(context.y); // 17 - * - * console.log(x); // 1; y is not defined. - * ``` - * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/vm.js) - */ -declare module "vm" { - import { NonSharedBuffer } from "node:buffer"; - import { ImportAttributes } from "node:module"; - interface Context extends NodeJS.Dict {} - interface BaseOptions { - /** - * Specifies the filename used in stack traces produced by this script. - * @default '' - */ - filename?: string | undefined; - /** - * Specifies the line number offset that is displayed in stack traces produced by this script. - * @default 0 - */ - lineOffset?: number | undefined; - /** - * Specifies the column number offset that is displayed in stack traces produced by this script. - * @default 0 - */ - columnOffset?: number | undefined; - } - type DynamicModuleLoader = ( - specifier: string, - referrer: T, - importAttributes: ImportAttributes, - ) => Module | Promise; - interface ScriptOptions extends BaseOptions { - /** - * Provides an optional data with V8's code cache data for the supplied source. - */ - cachedData?: NodeJS.ArrayBufferView | undefined; - /** @deprecated in favor of `script.createCachedData()` */ - produceCachedData?: boolean | undefined; - /** - * Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is - * part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see - * [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v20.x/api/vm.html#support-of-dynamic-import-in-compilation-apis). - */ - importModuleDynamically?: - | DynamicModuleLoader - -``` - -Open the above .html file in a browser and you should see - -Node Example - -**[Full online demo](http://kpdecker.github.com/jsdiff)** - -## Compatibility - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/jsdiff.svg)](https://saucelabs.com/u/jsdiff) - -jsdiff supports all ES3 environments with some known issues on IE8 and below. Under these browsers some diff algorithms such as word diff and others may fail due to lack of support for capturing groups in the `split` operation. - -## License - -See [LICENSE](https://github.com/kpdecker/jsdiff/blob/master/LICENSE). diff --git a/node_modules/diff/dist/diff.js b/node_modules/diff/dist/diff.js deleted file mode 100644 index de800a3..0000000 --- a/node_modules/diff/dist/diff.js +++ /dev/null @@ -1,1548 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = global || self, factory(global.Diff = {})); -}(this, function (exports) { 'use strict'; - - function Diff() {} - Diff.prototype = { - diff: function diff(oldString, newString) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var callback = options.callback; - - if (typeof options === 'function') { - callback = options; - options = {}; - } - - this.options = options; - var self = this; - - function done(value) { - if (callback) { - setTimeout(function () { - callback(undefined, value); - }, 0); - return true; - } else { - return value; - } - } // Allow subclasses to massage the input prior to running - - - oldString = this.castInput(oldString); - newString = this.castInput(newString); - oldString = this.removeEmpty(this.tokenize(oldString)); - newString = this.removeEmpty(this.tokenize(newString)); - var newLen = newString.length, - oldLen = oldString.length; - var editLength = 1; - var maxEditLength = newLen + oldLen; - var bestPath = [{ - newPos: -1, - components: [] - }]; // Seed editLength = 0, i.e. the content starts with the same values - - var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); - - if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { - // Identity per the equality and tokenizer - return done([{ - value: this.join(newString), - count: newString.length - }]); - } // Main worker method. checks all permutations of a given edit length for acceptance. - - - function execEditLength() { - for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { - var basePath = void 0; - - var addPath = bestPath[diagonalPath - 1], - removePath = bestPath[diagonalPath + 1], - _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; - - if (addPath) { - // No one else is going to attempt to use this value, clear it - bestPath[diagonalPath - 1] = undefined; - } - - var canAdd = addPath && addPath.newPos + 1 < newLen, - canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen; - - if (!canAdd && !canRemove) { - // If this path is a terminal then prune - bestPath[diagonalPath] = undefined; - continue; - } // Select the diagonal that we want to branch from. We select the prior - // path whose position in the new string is the farthest from the origin - // and does not pass the bounds of the diff graph - - - if (!canAdd || canRemove && addPath.newPos < removePath.newPos) { - basePath = clonePath(removePath); - self.pushComponent(basePath.components, undefined, true); - } else { - basePath = addPath; // No need to clone, we've pulled it from the list - - basePath.newPos++; - self.pushComponent(basePath.components, true, undefined); - } - - _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); // If we have hit the end of both strings, then we are done - - if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) { - return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken)); - } else { - // Otherwise track this path as a potential candidate and continue. - bestPath[diagonalPath] = basePath; - } - } - - editLength++; - } // Performs the length of edit iteration. Is a bit fugly as this has to support the - // sync and async mode which is never fun. Loops over execEditLength until a value - // is produced. - - - if (callback) { - (function exec() { - setTimeout(function () { - // This should not happen, but we want to be safe. - - /* istanbul ignore next */ - if (editLength > maxEditLength) { - return callback(); - } - - if (!execEditLength()) { - exec(); - } - }, 0); - })(); - } else { - while (editLength <= maxEditLength) { - var ret = execEditLength(); - - if (ret) { - return ret; - } - } - } - }, - pushComponent: function pushComponent(components, added, removed) { - var last = components[components.length - 1]; - - if (last && last.added === added && last.removed === removed) { - // We need to clone here as the component clone operation is just - // as shallow array clone - components[components.length - 1] = { - count: last.count + 1, - added: added, - removed: removed - }; - } else { - components.push({ - count: 1, - added: added, - removed: removed - }); - } - }, - extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) { - var newLen = newString.length, - oldLen = oldString.length, - newPos = basePath.newPos, - oldPos = newPos - diagonalPath, - commonCount = 0; - - while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) { - newPos++; - oldPos++; - commonCount++; - } - - if (commonCount) { - basePath.components.push({ - count: commonCount - }); - } - - basePath.newPos = newPos; - return oldPos; - }, - equals: function equals(left, right) { - if (this.options.comparator) { - return this.options.comparator(left, right); - } else { - return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase(); - } - }, - removeEmpty: function removeEmpty(array) { - var ret = []; - - for (var i = 0; i < array.length; i++) { - if (array[i]) { - ret.push(array[i]); - } - } - - return ret; - }, - castInput: function castInput(value) { - return value; - }, - tokenize: function tokenize(value) { - return value.split(''); - }, - join: function join(chars) { - return chars.join(''); - } - }; - - function buildValues(diff, components, newString, oldString, useLongestToken) { - var componentPos = 0, - componentLen = components.length, - newPos = 0, - oldPos = 0; - - for (; componentPos < componentLen; componentPos++) { - var component = components[componentPos]; - - if (!component.removed) { - if (!component.added && useLongestToken) { - var value = newString.slice(newPos, newPos + component.count); - value = value.map(function (value, i) { - var oldValue = oldString[oldPos + i]; - return oldValue.length > value.length ? oldValue : value; - }); - component.value = diff.join(value); - } else { - component.value = diff.join(newString.slice(newPos, newPos + component.count)); - } - - newPos += component.count; // Common case - - if (!component.added) { - oldPos += component.count; - } - } else { - component.value = diff.join(oldString.slice(oldPos, oldPos + component.count)); - oldPos += component.count; // Reverse add and remove so removes are output first to match common convention - // The diffing algorithm is tied to add then remove output and this is the simplest - // route to get the desired output with minimal overhead. - - if (componentPos && components[componentPos - 1].added) { - var tmp = components[componentPos - 1]; - components[componentPos - 1] = components[componentPos]; - components[componentPos] = tmp; - } - } - } // Special case handle for when one terminal is ignored (i.e. whitespace). - // For this case we merge the terminal into the prior string and drop the change. - // This is only available for string mode. - - - var lastComponent = components[componentLen - 1]; - - if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) { - components[componentLen - 2].value += lastComponent.value; - components.pop(); - } - - return components; - } - - function clonePath(path) { - return { - newPos: path.newPos, - components: path.components.slice(0) - }; - } - - var characterDiff = new Diff(); - function diffChars(oldStr, newStr, options) { - return characterDiff.diff(oldStr, newStr, options); - } - - function generateOptions(options, defaults) { - if (typeof options === 'function') { - defaults.callback = options; - } else if (options) { - for (var name in options) { - /* istanbul ignore else */ - if (options.hasOwnProperty(name)) { - defaults[name] = options[name]; - } - } - } - - return defaults; - } - - // - // Ranges and exceptions: - // Latin-1 Supplement, 0080–00FF - // - U+00D7 × Multiplication sign - // - U+00F7 ÷ Division sign - // Latin Extended-A, 0100–017F - // Latin Extended-B, 0180–024F - // IPA Extensions, 0250–02AF - // Spacing Modifier Letters, 02B0–02FF - // - U+02C7 ˇ ˇ Caron - // - U+02D8 ˘ ˘ Breve - // - U+02D9 ˙ ˙ Dot Above - // - U+02DA ˚ ˚ Ring Above - // - U+02DB ˛ ˛ Ogonek - // - U+02DC ˜ ˜ Small Tilde - // - U+02DD ˝ ˝ Double Acute Accent - // Latin Extended Additional, 1E00–1EFF - - var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/; - var reWhitespace = /\S/; - var wordDiff = new Diff(); - - wordDiff.equals = function (left, right) { - if (this.options.ignoreCase) { - left = left.toLowerCase(); - right = right.toLowerCase(); - } - - return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right); - }; - - wordDiff.tokenize = function (value) { - var tokens = value.split(/(\s+|[()[\]{}'"]|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set. - - for (var i = 0; i < tokens.length - 1; i++) { - // If we have an empty string in the next field and we have only word chars before and after, merge - if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) { - tokens[i] += tokens[i + 2]; - tokens.splice(i + 1, 2); - i--; - } - } - - return tokens; - }; - - function diffWords(oldStr, newStr, options) { - options = generateOptions(options, { - ignoreWhitespace: true - }); - return wordDiff.diff(oldStr, newStr, options); - } - function diffWordsWithSpace(oldStr, newStr, options) { - return wordDiff.diff(oldStr, newStr, options); - } - - var lineDiff = new Diff(); - - lineDiff.tokenize = function (value) { - var retLines = [], - linesAndNewlines = value.split(/(\n|\r\n)/); // Ignore the final empty token that occurs if the string ends with a new line - - if (!linesAndNewlines[linesAndNewlines.length - 1]) { - linesAndNewlines.pop(); - } // Merge the content and line separators into single tokens - - - for (var i = 0; i < linesAndNewlines.length; i++) { - var line = linesAndNewlines[i]; - - if (i % 2 && !this.options.newlineIsToken) { - retLines[retLines.length - 1] += line; - } else { - if (this.options.ignoreWhitespace) { - line = line.trim(); - } - - retLines.push(line); - } - } - - return retLines; - }; - - function diffLines(oldStr, newStr, callback) { - return lineDiff.diff(oldStr, newStr, callback); - } - function diffTrimmedLines(oldStr, newStr, callback) { - var options = generateOptions(callback, { - ignoreWhitespace: true - }); - return lineDiff.diff(oldStr, newStr, options); - } - - var sentenceDiff = new Diff(); - - sentenceDiff.tokenize = function (value) { - return value.split(/(\S.+?[.!?])(?=\s+|$)/); - }; - - function diffSentences(oldStr, newStr, callback) { - return sentenceDiff.diff(oldStr, newStr, callback); - } - - var cssDiff = new Diff(); - - cssDiff.tokenize = function (value) { - return value.split(/([{}:;,]|\s+)/); - }; - - function diffCss(oldStr, newStr, callback) { - return cssDiff.diff(oldStr, newStr, callback); - } - - function _typeof(obj) { - if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { - _typeof = function (obj) { - return typeof obj; - }; - } else { - _typeof = function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; - } - - return _typeof(obj); - } - - function _toConsumableArray(arr) { - return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); - } - - function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; - - return arr2; - } - } - - function _iterableToArray(iter) { - if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); - } - - function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance"); - } - - var objectPrototypeToString = Object.prototype.toString; - var jsonDiff = new Diff(); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a - // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output: - - jsonDiff.useLongestToken = true; - jsonDiff.tokenize = lineDiff.tokenize; - - jsonDiff.castInput = function (value) { - var _this$options = this.options, - undefinedReplacement = _this$options.undefinedReplacement, - _this$options$stringi = _this$options.stringifyReplacer, - stringifyReplacer = _this$options$stringi === void 0 ? function (k, v) { - return typeof v === 'undefined' ? undefinedReplacement : v; - } : _this$options$stringi; - return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' '); - }; - - jsonDiff.equals = function (left, right) { - return Diff.prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1')); - }; - - function diffJson(oldObj, newObj, options) { - return jsonDiff.diff(oldObj, newObj, options); - } // This function handles the presence of circular references by bailing out when encountering an - // object that is already on the "stack" of items being processed. Accepts an optional replacer - - function canonicalize(obj, stack, replacementStack, replacer, key) { - stack = stack || []; - replacementStack = replacementStack || []; - - if (replacer) { - obj = replacer(key, obj); - } - - var i; - - for (i = 0; i < stack.length; i += 1) { - if (stack[i] === obj) { - return replacementStack[i]; - } - } - - var canonicalizedObj; - - if ('[object Array]' === objectPrototypeToString.call(obj)) { - stack.push(obj); - canonicalizedObj = new Array(obj.length); - replacementStack.push(canonicalizedObj); - - for (i = 0; i < obj.length; i += 1) { - canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key); - } - - stack.pop(); - replacementStack.pop(); - return canonicalizedObj; - } - - if (obj && obj.toJSON) { - obj = obj.toJSON(); - } - - if (_typeof(obj) === 'object' && obj !== null) { - stack.push(obj); - canonicalizedObj = {}; - replacementStack.push(canonicalizedObj); - - var sortedKeys = [], - _key; - - for (_key in obj) { - /* istanbul ignore else */ - if (obj.hasOwnProperty(_key)) { - sortedKeys.push(_key); - } - } - - sortedKeys.sort(); - - for (i = 0; i < sortedKeys.length; i += 1) { - _key = sortedKeys[i]; - canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key); - } - - stack.pop(); - replacementStack.pop(); - } else { - canonicalizedObj = obj; - } - - return canonicalizedObj; - } - - var arrayDiff = new Diff(); - - arrayDiff.tokenize = function (value) { - return value.slice(); - }; - - arrayDiff.join = arrayDiff.removeEmpty = function (value) { - return value; - }; - - function diffArrays(oldArr, newArr, callback) { - return arrayDiff.diff(oldArr, newArr, callback); - } - - function parsePatch(uniDiff) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var diffstr = uniDiff.split(/\r\n|[\n\v\f\r\x85]/), - delimiters = uniDiff.match(/\r\n|[\n\v\f\r\x85]/g) || [], - list = [], - i = 0; - - function parseIndex() { - var index = {}; - list.push(index); // Parse diff metadata - - while (i < diffstr.length) { - var line = diffstr[i]; // File header found, end parsing diff metadata - - if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) { - break; - } // Diff index - - - var headerMatch = /^(?:Index:|diff(?: -r \w+)+)\s+/.exec(line); - - if (headerMatch) { - index.index = line.substring(headerMatch[0].length).trim(); - } - - i++; - } // Parse file headers if they are defined. Unified diff requires them, but - // there's no technical issues to have an isolated hunk without file header - - - parseFileHeader(index); - parseFileHeader(index); // Parse hunks - - index.hunks = []; - - while (i < diffstr.length) { - var _line = diffstr[i]; - - if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)) { - break; - } else if (/^@@/.test(_line)) { - index.hunks.push(parseHunk()); - } else if (_line && options.strict) { - // Ignore unexpected content unless in strict mode - throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line)); - } else { - i++; - } - } - } // Parses the --- and +++ headers, if none are found, no lines - // are consumed. - - - function parseFileHeader(index) { - var fileHeaderMatch = /^(---|\+\+\+)\s+/.exec(diffstr[i]); - - if (fileHeaderMatch) { - var keyPrefix = fileHeaderMatch[1] === '---' ? 'old' : 'new'; - var data = diffstr[i].substring(3).trim().split('\t', 2); - var fileName = data[0].replace(/\\\\/g, '\\'); - - if (fileName.startsWith('"') && fileName.endsWith('"')) { - fileName = fileName.substr(1, fileName.length - 2); - } - - index[keyPrefix + 'FileName'] = fileName; - index[keyPrefix + 'Header'] = (data[1] || '').trim(); - i++; - } - } // Parses a hunk - // This assumes that we are at the start of a hunk. - - - function parseHunk() { - var chunkHeaderIndex = i, - chunkHeaderLine = diffstr[i++], - chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/); - var hunk = { - oldStart: +chunkHeader[1], - oldLines: +chunkHeader[2] || 1, - newStart: +chunkHeader[3], - newLines: +chunkHeader[4] || 1, - lines: [], - linedelimiters: [] - }; - var addCount = 0, - removeCount = 0; - - for (; i < diffstr.length; i++) { - // Lines starting with '---' could be mistaken for the "remove line" operation - // But they could be the header for the next file. Therefore prune such cases out. - if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) { - break; - } - - var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0]; - - if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') { - hunk.lines.push(diffstr[i]); - hunk.linedelimiters.push(delimiters[i] || '\n'); - - if (operation === '+') { - addCount++; - } else if (operation === '-') { - removeCount++; - } else if (operation === ' ') { - addCount++; - removeCount++; - } - } else { - break; - } - } // Handle the empty block count case - - - if (!addCount && hunk.newLines === 1) { - hunk.newLines = 0; - } - - if (!removeCount && hunk.oldLines === 1) { - hunk.oldLines = 0; - } // Perform optional sanity checking - - - if (options.strict) { - if (addCount !== hunk.newLines) { - throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); - } - - if (removeCount !== hunk.oldLines) { - throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); - } - } - - return hunk; - } - - while (i < diffstr.length) { - parseIndex(); - } - - return list; - } - - // Iterator that traverses in the range of [min, max], stepping - // by distance from a given start position. I.e. for [0, 4], with - // start of 2, this will iterate 2, 3, 1, 4, 0. - function distanceIterator (start, minLine, maxLine) { - var wantForward = true, - backwardExhausted = false, - forwardExhausted = false, - localOffset = 1; - return function iterator() { - if (wantForward && !forwardExhausted) { - if (backwardExhausted) { - localOffset++; - } else { - wantForward = false; - } // Check if trying to fit beyond text length, and if not, check it fits - // after offset location (or desired location on first iteration) - - - if (start + localOffset <= maxLine) { - return localOffset; - } - - forwardExhausted = true; - } - - if (!backwardExhausted) { - if (!forwardExhausted) { - wantForward = true; - } // Check if trying to fit before text beginning, and if not, check it fits - // before offset location - - - if (minLine <= start - localOffset) { - return -localOffset++; - } - - backwardExhausted = true; - return iterator(); - } // We tried to fit hunk before text beginning and beyond text length, then - // hunk can't fit on the text. Return undefined - - }; - } - - function applyPatch(source, uniDiff) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - if (typeof uniDiff === 'string') { - uniDiff = parsePatch(uniDiff); - } - - if (Array.isArray(uniDiff)) { - if (uniDiff.length > 1) { - throw new Error('applyPatch only works with a single input.'); - } - - uniDiff = uniDiff[0]; - } // Apply the diff to the input - - - var lines = source.split(/\r\n|[\n\v\f\r\x85]/), - delimiters = source.match(/\r\n|[\n\v\f\r\x85]/g) || [], - hunks = uniDiff.hunks, - compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) { - return line === patchContent; - }, - errorCount = 0, - fuzzFactor = options.fuzzFactor || 0, - minLine = 0, - offset = 0, - removeEOFNL, - addEOFNL; - /** - * Checks if the hunk exactly fits on the provided location - */ - - - function hunkFits(hunk, toPos) { - for (var j = 0; j < hunk.lines.length; j++) { - var line = hunk.lines[j], - operation = line.length > 0 ? line[0] : ' ', - content = line.length > 0 ? line.substr(1) : line; - - if (operation === ' ' || operation === '-') { - // Context sanity check - if (!compareLine(toPos + 1, lines[toPos], operation, content)) { - errorCount++; - - if (errorCount > fuzzFactor) { - return false; - } - } - - toPos++; - } - } - - return true; - } // Search best fit offsets for each hunk based on the previous ones - - - for (var i = 0; i < hunks.length; i++) { - var hunk = hunks[i], - maxLine = lines.length - hunk.oldLines, - localOffset = 0, - toPos = offset + hunk.oldStart - 1; - var iterator = distanceIterator(toPos, minLine, maxLine); - - for (; localOffset !== undefined; localOffset = iterator()) { - if (hunkFits(hunk, toPos + localOffset)) { - hunk.offset = offset += localOffset; - break; - } - } - - if (localOffset === undefined) { - return false; - } // Set lower text limit to end of the current hunk, so next ones don't try - // to fit over already patched text - - - minLine = hunk.offset + hunk.oldStart + hunk.oldLines; - } // Apply patch hunks - - - var diffOffset = 0; - - for (var _i = 0; _i < hunks.length; _i++) { - var _hunk = hunks[_i], - _toPos = _hunk.oldStart + _hunk.offset + diffOffset - 1; - - diffOffset += _hunk.newLines - _hunk.oldLines; - - if (_toPos < 0) { - // Creating a new file - _toPos = 0; - } - - for (var j = 0; j < _hunk.lines.length; j++) { - var line = _hunk.lines[j], - operation = line.length > 0 ? line[0] : ' ', - content = line.length > 0 ? line.substr(1) : line, - delimiter = _hunk.linedelimiters[j]; - - if (operation === ' ') { - _toPos++; - } else if (operation === '-') { - lines.splice(_toPos, 1); - delimiters.splice(_toPos, 1); - /* istanbul ignore else */ - } else if (operation === '+') { - lines.splice(_toPos, 0, content); - delimiters.splice(_toPos, 0, delimiter); - _toPos++; - } else if (operation === '\\') { - var previousOperation = _hunk.lines[j - 1] ? _hunk.lines[j - 1][0] : null; - - if (previousOperation === '+') { - removeEOFNL = true; - } else if (previousOperation === '-') { - addEOFNL = true; - } - } - } - } // Handle EOFNL insertion/removal - - - if (removeEOFNL) { - while (!lines[lines.length - 1]) { - lines.pop(); - delimiters.pop(); - } - } else if (addEOFNL) { - lines.push(''); - delimiters.push('\n'); - } - - for (var _k = 0; _k < lines.length - 1; _k++) { - lines[_k] = lines[_k] + delimiters[_k]; - } - - return lines.join(''); - } // Wrapper that supports multiple file patches via callbacks. - - function applyPatches(uniDiff, options) { - if (typeof uniDiff === 'string') { - uniDiff = parsePatch(uniDiff); - } - - var currentIndex = 0; - - function processIndex() { - var index = uniDiff[currentIndex++]; - - if (!index) { - return options.complete(); - } - - options.loadFile(index, function (err, data) { - if (err) { - return options.complete(err); - } - - var updatedContent = applyPatch(data, index, options); - options.patched(index, updatedContent, function (err) { - if (err) { - return options.complete(err); - } - - processIndex(); - }); - }); - } - - processIndex(); - } - - function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - if (!options) { - options = {}; - } - - if (typeof options.context === 'undefined') { - options.context = 4; - } - - var diff = diffLines(oldStr, newStr, options); - diff.push({ - value: '', - lines: [] - }); // Append an empty value to make cleanup easier - - function contextLines(lines) { - return lines.map(function (entry) { - return ' ' + entry; - }); - } - - var hunks = []; - var oldRangeStart = 0, - newRangeStart = 0, - curRange = [], - oldLine = 1, - newLine = 1; - - var _loop = function _loop(i) { - var current = diff[i], - lines = current.lines || current.value.replace(/\n$/, '').split('\n'); - current.lines = lines; - - if (current.added || current.removed) { - var _curRange; - - // If we have previous context, start with that - if (!oldRangeStart) { - var prev = diff[i - 1]; - oldRangeStart = oldLine; - newRangeStart = newLine; - - if (prev) { - curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : []; - oldRangeStart -= curRange.length; - newRangeStart -= curRange.length; - } - } // Output our changes - - - (_curRange = curRange).push.apply(_curRange, _toConsumableArray(lines.map(function (entry) { - return (current.added ? '+' : '-') + entry; - }))); // Track the updated file position - - - if (current.added) { - newLine += lines.length; - } else { - oldLine += lines.length; - } - } else { - // Identical context lines. Track line changes - if (oldRangeStart) { - // Close out any changes that have been output (or join overlapping) - if (lines.length <= options.context * 2 && i < diff.length - 2) { - var _curRange2; - - // Overlapping - (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray(contextLines(lines))); - } else { - var _curRange3; - - // end the range and output - var contextSize = Math.min(lines.length, options.context); - - (_curRange3 = curRange).push.apply(_curRange3, _toConsumableArray(contextLines(lines.slice(0, contextSize)))); - - var hunk = { - oldStart: oldRangeStart, - oldLines: oldLine - oldRangeStart + contextSize, - newStart: newRangeStart, - newLines: newLine - newRangeStart + contextSize, - lines: curRange - }; - - if (i >= diff.length - 2 && lines.length <= options.context) { - // EOF is inside this hunk - var oldEOFNewline = /\n$/.test(oldStr); - var newEOFNewline = /\n$/.test(newStr); - var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines; - - if (!oldEOFNewline && noNlBeforeAdds) { - // special case: old has no eol and no trailing context; no-nl can end up before adds - curRange.splice(hunk.oldLines, 0, '\\ No newline at end of file'); - } - - if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) { - curRange.push('\\ No newline at end of file'); - } - } - - hunks.push(hunk); - oldRangeStart = 0; - newRangeStart = 0; - curRange = []; - } - } - - oldLine += lines.length; - newLine += lines.length; - } - }; - - for (var i = 0; i < diff.length; i++) { - _loop(i); - } - - return { - oldFileName: oldFileName, - newFileName: newFileName, - oldHeader: oldHeader, - newHeader: newHeader, - hunks: hunks - }; - } - function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - var diff = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options); - var ret = []; - - if (oldFileName == newFileName) { - ret.push('Index: ' + oldFileName); - } - - ret.push('==================================================================='); - ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader)); - ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader)); - - for (var i = 0; i < diff.hunks.length; i++) { - var hunk = diff.hunks[i]; - ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@'); - ret.push.apply(ret, hunk.lines); - } - - return ret.join('\n') + '\n'; - } - function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) { - return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options); - } - - function arrayEqual(a, b) { - if (a.length !== b.length) { - return false; - } - - return arrayStartsWith(a, b); - } - function arrayStartsWith(array, start) { - if (start.length > array.length) { - return false; - } - - for (var i = 0; i < start.length; i++) { - if (start[i] !== array[i]) { - return false; - } - } - - return true; - } - - function calcLineCount(hunk) { - var _calcOldNewLineCount = calcOldNewLineCount(hunk.lines), - oldLines = _calcOldNewLineCount.oldLines, - newLines = _calcOldNewLineCount.newLines; - - if (oldLines !== undefined) { - hunk.oldLines = oldLines; - } else { - delete hunk.oldLines; - } - - if (newLines !== undefined) { - hunk.newLines = newLines; - } else { - delete hunk.newLines; - } - } - function merge(mine, theirs, base) { - mine = loadPatch(mine, base); - theirs = loadPatch(theirs, base); - var ret = {}; // For index we just let it pass through as it doesn't have any necessary meaning. - // Leaving sanity checks on this to the API consumer that may know more about the - // meaning in their own context. - - if (mine.index || theirs.index) { - ret.index = mine.index || theirs.index; - } - - if (mine.newFileName || theirs.newFileName) { - if (!fileNameChanged(mine)) { - // No header or no change in ours, use theirs (and ours if theirs does not exist) - ret.oldFileName = theirs.oldFileName || mine.oldFileName; - ret.newFileName = theirs.newFileName || mine.newFileName; - ret.oldHeader = theirs.oldHeader || mine.oldHeader; - ret.newHeader = theirs.newHeader || mine.newHeader; - } else if (!fileNameChanged(theirs)) { - // No header or no change in theirs, use ours - ret.oldFileName = mine.oldFileName; - ret.newFileName = mine.newFileName; - ret.oldHeader = mine.oldHeader; - ret.newHeader = mine.newHeader; - } else { - // Both changed... figure it out - ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName); - ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName); - ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader); - ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader); - } - } - - ret.hunks = []; - var mineIndex = 0, - theirsIndex = 0, - mineOffset = 0, - theirsOffset = 0; - - while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) { - var mineCurrent = mine.hunks[mineIndex] || { - oldStart: Infinity - }, - theirsCurrent = theirs.hunks[theirsIndex] || { - oldStart: Infinity - }; - - if (hunkBefore(mineCurrent, theirsCurrent)) { - // This patch does not overlap with any of the others, yay. - ret.hunks.push(cloneHunk(mineCurrent, mineOffset)); - mineIndex++; - theirsOffset += mineCurrent.newLines - mineCurrent.oldLines; - } else if (hunkBefore(theirsCurrent, mineCurrent)) { - // This patch does not overlap with any of the others, yay. - ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset)); - theirsIndex++; - mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines; - } else { - // Overlap, merge as best we can - var mergedHunk = { - oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart), - oldLines: 0, - newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset), - newLines: 0, - lines: [] - }; - mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines); - theirsIndex++; - mineIndex++; - ret.hunks.push(mergedHunk); - } - } - - return ret; - } - - function loadPatch(param, base) { - if (typeof param === 'string') { - if (/^@@/m.test(param) || /^Index:/m.test(param)) { - return parsePatch(param)[0]; - } - - if (!base) { - throw new Error('Must provide a base reference or pass in a patch'); - } - - return structuredPatch(undefined, undefined, base, param); - } - - return param; - } - - function fileNameChanged(patch) { - return patch.newFileName && patch.newFileName !== patch.oldFileName; - } - - function selectField(index, mine, theirs) { - if (mine === theirs) { - return mine; - } else { - index.conflict = true; - return { - mine: mine, - theirs: theirs - }; - } - } - - function hunkBefore(test, check) { - return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart; - } - - function cloneHunk(hunk, offset) { - return { - oldStart: hunk.oldStart, - oldLines: hunk.oldLines, - newStart: hunk.newStart + offset, - newLines: hunk.newLines, - lines: hunk.lines - }; - } - - function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) { - // This will generally result in a conflicted hunk, but there are cases where the context - // is the only overlap where we can successfully merge the content here. - var mine = { - offset: mineOffset, - lines: mineLines, - index: 0 - }, - their = { - offset: theirOffset, - lines: theirLines, - index: 0 - }; // Handle any leading content - - insertLeading(hunk, mine, their); - insertLeading(hunk, their, mine); // Now in the overlap content. Scan through and select the best changes from each. - - while (mine.index < mine.lines.length && their.index < their.lines.length) { - var mineCurrent = mine.lines[mine.index], - theirCurrent = their.lines[their.index]; - - if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) { - // Both modified ... - mutualChange(hunk, mine, their); - } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') { - var _hunk$lines; - - // Mine inserted - (_hunk$lines = hunk.lines).push.apply(_hunk$lines, _toConsumableArray(collectChange(mine))); - } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') { - var _hunk$lines2; - - // Theirs inserted - (_hunk$lines2 = hunk.lines).push.apply(_hunk$lines2, _toConsumableArray(collectChange(their))); - } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') { - // Mine removed or edited - removal(hunk, mine, their); - } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') { - // Their removed or edited - removal(hunk, their, mine, true); - } else if (mineCurrent === theirCurrent) { - // Context identity - hunk.lines.push(mineCurrent); - mine.index++; - their.index++; - } else { - // Context mismatch - conflict(hunk, collectChange(mine), collectChange(their)); - } - } // Now push anything that may be remaining - - - insertTrailing(hunk, mine); - insertTrailing(hunk, their); - calcLineCount(hunk); - } - - function mutualChange(hunk, mine, their) { - var myChanges = collectChange(mine), - theirChanges = collectChange(their); - - if (allRemoves(myChanges) && allRemoves(theirChanges)) { - // Special case for remove changes that are supersets of one another - if (arrayStartsWith(myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) { - var _hunk$lines3; - - (_hunk$lines3 = hunk.lines).push.apply(_hunk$lines3, _toConsumableArray(myChanges)); - - return; - } else if (arrayStartsWith(theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) { - var _hunk$lines4; - - (_hunk$lines4 = hunk.lines).push.apply(_hunk$lines4, _toConsumableArray(theirChanges)); - - return; - } - } else if (arrayEqual(myChanges, theirChanges)) { - var _hunk$lines5; - - (_hunk$lines5 = hunk.lines).push.apply(_hunk$lines5, _toConsumableArray(myChanges)); - - return; - } - - conflict(hunk, myChanges, theirChanges); - } - - function removal(hunk, mine, their, swap) { - var myChanges = collectChange(mine), - theirChanges = collectContext(their, myChanges); - - if (theirChanges.merged) { - var _hunk$lines6; - - (_hunk$lines6 = hunk.lines).push.apply(_hunk$lines6, _toConsumableArray(theirChanges.merged)); - } else { - conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges); - } - } - - function conflict(hunk, mine, their) { - hunk.conflict = true; - hunk.lines.push({ - conflict: true, - mine: mine, - theirs: their - }); - } - - function insertLeading(hunk, insert, their) { - while (insert.offset < their.offset && insert.index < insert.lines.length) { - var line = insert.lines[insert.index++]; - hunk.lines.push(line); - insert.offset++; - } - } - - function insertTrailing(hunk, insert) { - while (insert.index < insert.lines.length) { - var line = insert.lines[insert.index++]; - hunk.lines.push(line); - } - } - - function collectChange(state) { - var ret = [], - operation = state.lines[state.index][0]; - - while (state.index < state.lines.length) { - var line = state.lines[state.index]; // Group additions that are immediately after subtractions and treat them as one "atomic" modify change. - - if (operation === '-' && line[0] === '+') { - operation = '+'; - } - - if (operation === line[0]) { - ret.push(line); - state.index++; - } else { - break; - } - } - - return ret; - } - - function collectContext(state, matchChanges) { - var changes = [], - merged = [], - matchIndex = 0, - contextChanges = false, - conflicted = false; - - while (matchIndex < matchChanges.length && state.index < state.lines.length) { - var change = state.lines[state.index], - match = matchChanges[matchIndex]; // Once we've hit our add, then we are done - - if (match[0] === '+') { - break; - } - - contextChanges = contextChanges || change[0] !== ' '; - merged.push(match); - matchIndex++; // Consume any additions in the other block as a conflict to attempt - // to pull in the remaining context after this - - if (change[0] === '+') { - conflicted = true; - - while (change[0] === '+') { - changes.push(change); - change = state.lines[++state.index]; - } - } - - if (match.substr(1) === change.substr(1)) { - changes.push(change); - state.index++; - } else { - conflicted = true; - } - } - - if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) { - conflicted = true; - } - - if (conflicted) { - return changes; - } - - while (matchIndex < matchChanges.length) { - merged.push(matchChanges[matchIndex++]); - } - - return { - merged: merged, - changes: changes - }; - } - - function allRemoves(changes) { - return changes.reduce(function (prev, change) { - return prev && change[0] === '-'; - }, true); - } - - function skipRemoveSuperset(state, removeChanges, delta) { - for (var i = 0; i < delta; i++) { - var changeContent = removeChanges[removeChanges.length - delta + i].substr(1); - - if (state.lines[state.index + i] !== ' ' + changeContent) { - return false; - } - } - - state.index += delta; - return true; - } - - function calcOldNewLineCount(lines) { - var oldLines = 0; - var newLines = 0; - lines.forEach(function (line) { - if (typeof line !== 'string') { - var myCount = calcOldNewLineCount(line.mine); - var theirCount = calcOldNewLineCount(line.theirs); - - if (oldLines !== undefined) { - if (myCount.oldLines === theirCount.oldLines) { - oldLines += myCount.oldLines; - } else { - oldLines = undefined; - } - } - - if (newLines !== undefined) { - if (myCount.newLines === theirCount.newLines) { - newLines += myCount.newLines; - } else { - newLines = undefined; - } - } - } else { - if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) { - newLines++; - } - - if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) { - oldLines++; - } - } - }); - return { - oldLines: oldLines, - newLines: newLines - }; - } - - // See: http://code.google.com/p/google-diff-match-patch/wiki/API - function convertChangesToDMP(changes) { - var ret = [], - change, - operation; - - for (var i = 0; i < changes.length; i++) { - change = changes[i]; - - if (change.added) { - operation = 1; - } else if (change.removed) { - operation = -1; - } else { - operation = 0; - } - - ret.push([operation, change.value]); - } - - return ret; - } - - function convertChangesToXML(changes) { - var ret = []; - - for (var i = 0; i < changes.length; i++) { - var change = changes[i]; - - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - - ret.push(escapeHTML(change.value)); - - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - } - - return ret.join(''); - } - - function escapeHTML(s) { - var n = s; - n = n.replace(/&/g, '&'); - n = n.replace(//g, '>'); - n = n.replace(/"/g, '"'); - return n; - } - - /* See LICENSE file for terms of use */ - - exports.Diff = Diff; - exports.diffChars = diffChars; - exports.diffWords = diffWords; - exports.diffWordsWithSpace = diffWordsWithSpace; - exports.diffLines = diffLines; - exports.diffTrimmedLines = diffTrimmedLines; - exports.diffSentences = diffSentences; - exports.diffCss = diffCss; - exports.diffJson = diffJson; - exports.diffArrays = diffArrays; - exports.structuredPatch = structuredPatch; - exports.createTwoFilesPatch = createTwoFilesPatch; - exports.createPatch = createPatch; - exports.applyPatch = applyPatch; - exports.applyPatches = applyPatches; - exports.parsePatch = parsePatch; - exports.merge = merge; - exports.convertChangesToDMP = convertChangesToDMP; - exports.convertChangesToXML = convertChangesToXML; - exports.canonicalize = canonicalize; - - Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/diff/dist/diff.min.js b/node_modules/diff/dist/diff.min.js deleted file mode 100644 index 0ece867..0000000 --- a/node_modules/diff/dist/diff.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e=e||self).Diff={})}(this,function(e){"use strict";function t(){}function g(e,n,t,r,i){for(var o=0,s=n.length,l=0,a=0;oe.length?t:e}),u.value=e.join(d)}else u.value=e.join(t.slice(l,l+u.count));l+=u.count,u.added||(a+=u.count)}}var c=n[s-1];return 1=c&&h<=r+1)return d([{value:this.join(u),count:u.length}]);function i(){for(var e=-1*p;e<=p;e+=2){var n=void 0,t=v[e-1],r=v[e+1],i=(r?r.newPos:0)-e;t&&(v[e-1]=void 0);var o=t&&t.newPos+1=c&&h<=i+1)return d(g(f,n.components,u,a,f.useLongestToken));v[e]=n}else v[e]=void 0}var l;p++}if(n)!function e(){setTimeout(function(){if(t=v.length-2&&t.length<=p.context){var u=/\n$/.test(c),f=/\n$/.test(h),d=0==t.length&&x.length>a.oldLines;!u&&d&&x.splice(a.oldLines,0,"\\ No newline at end of file"),(u||d)&&f||x.push("\\ No newline at end of file")}m.push(a),y=w=0,x=[]}L+=t.length,S+=t.length}},o=0;oe.length)return!1;for(var t=0;t"):r.removed&&n.push(""),n.push((i=r.value,void 0,i.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""))),r.added?n.push(""):r.removed&&n.push("")}var i;return n.join("")},e.canonicalize=v,Object.defineProperty(e,"__esModule",{value:!0})}); \ No newline at end of file diff --git a/node_modules/diff/lib/convert/dmp.js b/node_modules/diff/lib/convert/dmp.js deleted file mode 100644 index 91ff40a..0000000 --- a/node_modules/diff/lib/convert/dmp.js +++ /dev/null @@ -1,32 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.convertChangesToDMP = convertChangesToDMP; - -/*istanbul ignore end*/ -// See: http://code.google.com/p/google-diff-match-patch/wiki/API -function convertChangesToDMP(changes) { - var ret = [], - change, - operation; - - for (var i = 0; i < changes.length; i++) { - change = changes[i]; - - if (change.added) { - operation = 1; - } else if (change.removed) { - operation = -1; - } else { - operation = 0; - } - - ret.push([operation, change.value]); - } - - return ret; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb252ZXJ0L2RtcC5qcyJdLCJuYW1lcyI6WyJjb252ZXJ0Q2hhbmdlc1RvRE1QIiwiY2hhbmdlcyIsInJldCIsImNoYW5nZSIsIm9wZXJhdGlvbiIsImkiLCJsZW5ndGgiLCJhZGRlZCIsInJlbW92ZWQiLCJwdXNoIiwidmFsdWUiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUFBO0FBQ08sU0FBU0EsbUJBQVQsQ0FBNkJDLE9BQTdCLEVBQXNDO0FBQzNDLE1BQUlDLEdBQUcsR0FBRyxFQUFWO0FBQUEsTUFDSUMsTUFESjtBQUFBLE1BRUlDLFNBRko7O0FBR0EsT0FBSyxJQUFJQyxDQUFDLEdBQUcsQ0FBYixFQUFnQkEsQ0FBQyxHQUFHSixPQUFPLENBQUNLLE1BQTVCLEVBQW9DRCxDQUFDLEVBQXJDLEVBQXlDO0FBQ3ZDRixJQUFBQSxNQUFNLEdBQUdGLE9BQU8sQ0FBQ0ksQ0FBRCxDQUFoQjs7QUFDQSxRQUFJRixNQUFNLENBQUNJLEtBQVgsRUFBa0I7QUFDaEJILE1BQUFBLFNBQVMsR0FBRyxDQUFaO0FBQ0QsS0FGRCxNQUVPLElBQUlELE1BQU0sQ0FBQ0ssT0FBWCxFQUFvQjtBQUN6QkosTUFBQUEsU0FBUyxHQUFHLENBQUMsQ0FBYjtBQUNELEtBRk0sTUFFQTtBQUNMQSxNQUFBQSxTQUFTLEdBQUcsQ0FBWjtBQUNEOztBQUVERixJQUFBQSxHQUFHLENBQUNPLElBQUosQ0FBUyxDQUFDTCxTQUFELEVBQVlELE1BQU0sQ0FBQ08sS0FBbkIsQ0FBVDtBQUNEOztBQUNELFNBQU9SLEdBQVA7QUFDRCIsInNvdXJjZXNDb250ZW50IjpbIi8vIFNlZTogaHR0cDovL2NvZGUuZ29vZ2xlLmNvbS9wL2dvb2dsZS1kaWZmLW1hdGNoLXBhdGNoL3dpa2kvQVBJXG5leHBvcnQgZnVuY3Rpb24gY29udmVydENoYW5nZXNUb0RNUChjaGFuZ2VzKSB7XG4gIGxldCByZXQgPSBbXSxcbiAgICAgIGNoYW5nZSxcbiAgICAgIG9wZXJhdGlvbjtcbiAgZm9yIChsZXQgaSA9IDA7IGkgPCBjaGFuZ2VzLmxlbmd0aDsgaSsrKSB7XG4gICAgY2hhbmdlID0gY2hhbmdlc1tpXTtcbiAgICBpZiAoY2hhbmdlLmFkZGVkKSB7XG4gICAgICBvcGVyYXRpb24gPSAxO1xuICAgIH0gZWxzZSBpZiAoY2hhbmdlLnJlbW92ZWQpIHtcbiAgICAgIG9wZXJhdGlvbiA9IC0xO1xuICAgIH0gZWxzZSB7XG4gICAgICBvcGVyYXRpb24gPSAwO1xuICAgIH1cblxuICAgIHJldC5wdXNoKFtvcGVyYXRpb24sIGNoYW5nZS52YWx1ZV0pO1xuICB9XG4gIHJldHVybiByZXQ7XG59XG4iXX0= diff --git a/node_modules/diff/lib/convert/xml.js b/node_modules/diff/lib/convert/xml.js deleted file mode 100644 index 69ec60c..0000000 --- a/node_modules/diff/lib/convert/xml.js +++ /dev/null @@ -1,42 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.convertChangesToXML = convertChangesToXML; - -/*istanbul ignore end*/ -function convertChangesToXML(changes) { - var ret = []; - - for (var i = 0; i < changes.length; i++) { - var change = changes[i]; - - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - - ret.push(escapeHTML(change.value)); - - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - } - - return ret.join(''); -} - -function escapeHTML(s) { - var n = s; - n = n.replace(/&/g, '&'); - n = n.replace(//g, '>'); - n = n.replace(/"/g, '"'); - return n; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb252ZXJ0L3htbC5qcyJdLCJuYW1lcyI6WyJjb252ZXJ0Q2hhbmdlc1RvWE1MIiwiY2hhbmdlcyIsInJldCIsImkiLCJsZW5ndGgiLCJjaGFuZ2UiLCJhZGRlZCIsInB1c2giLCJyZW1vdmVkIiwiZXNjYXBlSFRNTCIsInZhbHVlIiwiam9pbiIsInMiLCJuIiwicmVwbGFjZSJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQU8sU0FBU0EsbUJBQVQsQ0FBNkJDLE9BQTdCLEVBQXNDO0FBQzNDLE1BQUlDLEdBQUcsR0FBRyxFQUFWOztBQUNBLE9BQUssSUFBSUMsQ0FBQyxHQUFHLENBQWIsRUFBZ0JBLENBQUMsR0FBR0YsT0FBTyxDQUFDRyxNQUE1QixFQUFvQ0QsQ0FBQyxFQUFyQyxFQUF5QztBQUN2QyxRQUFJRSxNQUFNLEdBQUdKLE9BQU8sQ0FBQ0UsQ0FBRCxDQUFwQjs7QUFDQSxRQUFJRSxNQUFNLENBQUNDLEtBQVgsRUFBa0I7QUFDaEJKLE1BQUFBLEdBQUcsQ0FBQ0ssSUFBSixDQUFTLE9BQVQ7QUFDRCxLQUZELE1BRU8sSUFBSUYsTUFBTSxDQUFDRyxPQUFYLEVBQW9CO0FBQ3pCTixNQUFBQSxHQUFHLENBQUNLLElBQUosQ0FBUyxPQUFUO0FBQ0Q7O0FBRURMLElBQUFBLEdBQUcsQ0FBQ0ssSUFBSixDQUFTRSxVQUFVLENBQUNKLE1BQU0sQ0FBQ0ssS0FBUixDQUFuQjs7QUFFQSxRQUFJTCxNQUFNLENBQUNDLEtBQVgsRUFBa0I7QUFDaEJKLE1BQUFBLEdBQUcsQ0FBQ0ssSUFBSixDQUFTLFFBQVQ7QUFDRCxLQUZELE1BRU8sSUFBSUYsTUFBTSxDQUFDRyxPQUFYLEVBQW9CO0FBQ3pCTixNQUFBQSxHQUFHLENBQUNLLElBQUosQ0FBUyxRQUFUO0FBQ0Q7QUFDRjs7QUFDRCxTQUFPTCxHQUFHLENBQUNTLElBQUosQ0FBUyxFQUFULENBQVA7QUFDRDs7QUFFRCxTQUFTRixVQUFULENBQW9CRyxDQUFwQixFQUF1QjtBQUNyQixNQUFJQyxDQUFDLEdBQUdELENBQVI7QUFDQUMsRUFBQUEsQ0FBQyxHQUFHQSxDQUFDLENBQUNDLE9BQUYsQ0FBVSxJQUFWLEVBQWdCLE9BQWhCLENBQUo7QUFDQUQsRUFBQUEsQ0FBQyxHQUFHQSxDQUFDLENBQUNDLE9BQUYsQ0FBVSxJQUFWLEVBQWdCLE1BQWhCLENBQUo7QUFDQUQsRUFBQUEsQ0FBQyxHQUFHQSxDQUFDLENBQUNDLE9BQUYsQ0FBVSxJQUFWLEVBQWdCLE1BQWhCLENBQUo7QUFDQUQsRUFBQUEsQ0FBQyxHQUFHQSxDQUFDLENBQUNDLE9BQUYsQ0FBVSxJQUFWLEVBQWdCLFFBQWhCLENBQUo7QUFFQSxTQUFPRCxDQUFQO0FBQ0QiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZnVuY3Rpb24gY29udmVydENoYW5nZXNUb1hNTChjaGFuZ2VzKSB7XG4gIGxldCByZXQgPSBbXTtcbiAgZm9yIChsZXQgaSA9IDA7IGkgPCBjaGFuZ2VzLmxlbmd0aDsgaSsrKSB7XG4gICAgbGV0IGNoYW5nZSA9IGNoYW5nZXNbaV07XG4gICAgaWYgKGNoYW5nZS5hZGRlZCkge1xuICAgICAgcmV0LnB1c2goJzxpbnM+Jyk7XG4gICAgfSBlbHNlIGlmIChjaGFuZ2UucmVtb3ZlZCkge1xuICAgICAgcmV0LnB1c2goJzxkZWw+Jyk7XG4gICAgfVxuXG4gICAgcmV0LnB1c2goZXNjYXBlSFRNTChjaGFuZ2UudmFsdWUpKTtcblxuICAgIGlmIChjaGFuZ2UuYWRkZWQpIHtcbiAgICAgIHJldC5wdXNoKCc8L2lucz4nKTtcbiAgICB9IGVsc2UgaWYgKGNoYW5nZS5yZW1vdmVkKSB7XG4gICAgICByZXQucHVzaCgnPC9kZWw+Jyk7XG4gICAgfVxuICB9XG4gIHJldHVybiByZXQuam9pbignJyk7XG59XG5cbmZ1bmN0aW9uIGVzY2FwZUhUTUwocykge1xuICBsZXQgbiA9IHM7XG4gIG4gPSBuLnJlcGxhY2UoLyYvZywgJyZhbXA7Jyk7XG4gIG4gPSBuLnJlcGxhY2UoLzwvZywgJyZsdDsnKTtcbiAgbiA9IG4ucmVwbGFjZSgvPi9nLCAnJmd0OycpO1xuICBuID0gbi5yZXBsYWNlKC9cIi9nLCAnJnF1b3Q7Jyk7XG5cbiAgcmV0dXJuIG47XG59XG4iXX0= diff --git a/node_modules/diff/lib/diff/array.js b/node_modules/diff/lib/diff/array.js deleted file mode 100644 index 81f42ea..0000000 --- a/node_modules/diff/lib/diff/array.js +++ /dev/null @@ -1,45 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.diffArrays = diffArrays; -exports.arrayDiff = void 0; - -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_base = _interopRequireDefault(require("./base")) -/*istanbul ignore end*/ -; - -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/*istanbul ignore end*/ -var arrayDiff = new -/*istanbul ignore start*/ -_base -/*istanbul ignore end*/ -. -/*istanbul ignore start*/ -default -/*istanbul ignore end*/ -(); - -/*istanbul ignore start*/ -exports.arrayDiff = arrayDiff; - -/*istanbul ignore end*/ -arrayDiff.tokenize = function (value) { - return value.slice(); -}; - -arrayDiff.join = arrayDiff.removeEmpty = function (value) { - return value; -}; - -function diffArrays(oldArr, newArr, callback) { - return arrayDiff.diff(oldArr, newArr, callback); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2FycmF5LmpzIl0sIm5hbWVzIjpbImFycmF5RGlmZiIsIkRpZmYiLCJ0b2tlbml6ZSIsInZhbHVlIiwic2xpY2UiLCJqb2luIiwicmVtb3ZlRW1wdHkiLCJkaWZmQXJyYXlzIiwib2xkQXJyIiwibmV3QXJyIiwiY2FsbGJhY2siLCJkaWZmIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7Ozs7QUFFTyxJQUFNQSxTQUFTLEdBQUc7QUFBSUM7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBSjtBQUFBLEVBQWxCOzs7Ozs7QUFDUEQsU0FBUyxDQUFDRSxRQUFWLEdBQXFCLFVBQVNDLEtBQVQsRUFBZ0I7QUFDbkMsU0FBT0EsS0FBSyxDQUFDQyxLQUFOLEVBQVA7QUFDRCxDQUZEOztBQUdBSixTQUFTLENBQUNLLElBQVYsR0FBaUJMLFNBQVMsQ0FBQ00sV0FBVixHQUF3QixVQUFTSCxLQUFULEVBQWdCO0FBQ3ZELFNBQU9BLEtBQVA7QUFDRCxDQUZEOztBQUlPLFNBQVNJLFVBQVQsQ0FBb0JDLE1BQXBCLEVBQTRCQyxNQUE1QixFQUFvQ0MsUUFBcEMsRUFBOEM7QUFBRSxTQUFPVixTQUFTLENBQUNXLElBQVYsQ0FBZUgsTUFBZixFQUF1QkMsTUFBdkIsRUFBK0JDLFFBQS9CLENBQVA7QUFBa0QiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgRGlmZiBmcm9tICcuL2Jhc2UnO1xuXG5leHBvcnQgY29uc3QgYXJyYXlEaWZmID0gbmV3IERpZmYoKTtcbmFycmF5RGlmZi50b2tlbml6ZSA9IGZ1bmN0aW9uKHZhbHVlKSB7XG4gIHJldHVybiB2YWx1ZS5zbGljZSgpO1xufTtcbmFycmF5RGlmZi5qb2luID0gYXJyYXlEaWZmLnJlbW92ZUVtcHR5ID0gZnVuY3Rpb24odmFsdWUpIHtcbiAgcmV0dXJuIHZhbHVlO1xufTtcblxuZXhwb3J0IGZ1bmN0aW9uIGRpZmZBcnJheXMob2xkQXJyLCBuZXdBcnIsIGNhbGxiYWNrKSB7IHJldHVybiBhcnJheURpZmYuZGlmZihvbGRBcnIsIG5ld0FyciwgY2FsbGJhY2spOyB9XG4iXX0= diff --git a/node_modules/diff/lib/diff/base.js b/node_modules/diff/lib/diff/base.js deleted file mode 100644 index ea661fe..0000000 --- a/node_modules/diff/lib/diff/base.js +++ /dev/null @@ -1,304 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = Diff; - -/*istanbul ignore end*/ -function Diff() {} - -Diff.prototype = { - /*istanbul ignore start*/ - - /*istanbul ignore end*/ - diff: function diff(oldString, newString) { - /*istanbul ignore start*/ - var - /*istanbul ignore end*/ - options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var callback = options.callback; - - if (typeof options === 'function') { - callback = options; - options = {}; - } - - this.options = options; - var self = this; - - function done(value) { - if (callback) { - setTimeout(function () { - callback(undefined, value); - }, 0); - return true; - } else { - return value; - } - } // Allow subclasses to massage the input prior to running - - - oldString = this.castInput(oldString); - newString = this.castInput(newString); - oldString = this.removeEmpty(this.tokenize(oldString)); - newString = this.removeEmpty(this.tokenize(newString)); - var newLen = newString.length, - oldLen = oldString.length; - var editLength = 1; - var maxEditLength = newLen + oldLen; - var bestPath = [{ - newPos: -1, - components: [] - }]; // Seed editLength = 0, i.e. the content starts with the same values - - var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); - - if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { - // Identity per the equality and tokenizer - return done([{ - value: this.join(newString), - count: newString.length - }]); - } // Main worker method. checks all permutations of a given edit length for acceptance. - - - function execEditLength() { - for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { - var basePath = - /*istanbul ignore start*/ - void 0 - /*istanbul ignore end*/ - ; - - var addPath = bestPath[diagonalPath - 1], - removePath = bestPath[diagonalPath + 1], - _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; - - if (addPath) { - // No one else is going to attempt to use this value, clear it - bestPath[diagonalPath - 1] = undefined; - } - - var canAdd = addPath && addPath.newPos + 1 < newLen, - canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen; - - if (!canAdd && !canRemove) { - // If this path is a terminal then prune - bestPath[diagonalPath] = undefined; - continue; - } // Select the diagonal that we want to branch from. We select the prior - // path whose position in the new string is the farthest from the origin - // and does not pass the bounds of the diff graph - - - if (!canAdd || canRemove && addPath.newPos < removePath.newPos) { - basePath = clonePath(removePath); - self.pushComponent(basePath.components, undefined, true); - } else { - basePath = addPath; // No need to clone, we've pulled it from the list - - basePath.newPos++; - self.pushComponent(basePath.components, true, undefined); - } - - _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); // If we have hit the end of both strings, then we are done - - if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) { - return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken)); - } else { - // Otherwise track this path as a potential candidate and continue. - bestPath[diagonalPath] = basePath; - } - } - - editLength++; - } // Performs the length of edit iteration. Is a bit fugly as this has to support the - // sync and async mode which is never fun. Loops over execEditLength until a value - // is produced. - - - if (callback) { - (function exec() { - setTimeout(function () { - // This should not happen, but we want to be safe. - - /* istanbul ignore next */ - if (editLength > maxEditLength) { - return callback(); - } - - if (!execEditLength()) { - exec(); - } - }, 0); - })(); - } else { - while (editLength <= maxEditLength) { - var ret = execEditLength(); - - if (ret) { - return ret; - } - } - } - }, - - /*istanbul ignore start*/ - - /*istanbul ignore end*/ - pushComponent: function pushComponent(components, added, removed) { - var last = components[components.length - 1]; - - if (last && last.added === added && last.removed === removed) { - // We need to clone here as the component clone operation is just - // as shallow array clone - components[components.length - 1] = { - count: last.count + 1, - added: added, - removed: removed - }; - } else { - components.push({ - count: 1, - added: added, - removed: removed - }); - } - }, - - /*istanbul ignore start*/ - - /*istanbul ignore end*/ - extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) { - var newLen = newString.length, - oldLen = oldString.length, - newPos = basePath.newPos, - oldPos = newPos - diagonalPath, - commonCount = 0; - - while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) { - newPos++; - oldPos++; - commonCount++; - } - - if (commonCount) { - basePath.components.push({ - count: commonCount - }); - } - - basePath.newPos = newPos; - return oldPos; - }, - - /*istanbul ignore start*/ - - /*istanbul ignore end*/ - equals: function equals(left, right) { - if (this.options.comparator) { - return this.options.comparator(left, right); - } else { - return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase(); - } - }, - - /*istanbul ignore start*/ - - /*istanbul ignore end*/ - removeEmpty: function removeEmpty(array) { - var ret = []; - - for (var i = 0; i < array.length; i++) { - if (array[i]) { - ret.push(array[i]); - } - } - - return ret; - }, - - /*istanbul ignore start*/ - - /*istanbul ignore end*/ - castInput: function castInput(value) { - return value; - }, - - /*istanbul ignore start*/ - - /*istanbul ignore end*/ - tokenize: function tokenize(value) { - return value.split(''); - }, - - /*istanbul ignore start*/ - - /*istanbul ignore end*/ - join: function join(chars) { - return chars.join(''); - } -}; - -function buildValues(diff, components, newString, oldString, useLongestToken) { - var componentPos = 0, - componentLen = components.length, - newPos = 0, - oldPos = 0; - - for (; componentPos < componentLen; componentPos++) { - var component = components[componentPos]; - - if (!component.removed) { - if (!component.added && useLongestToken) { - var value = newString.slice(newPos, newPos + component.count); - value = value.map(function (value, i) { - var oldValue = oldString[oldPos + i]; - return oldValue.length > value.length ? oldValue : value; - }); - component.value = diff.join(value); - } else { - component.value = diff.join(newString.slice(newPos, newPos + component.count)); - } - - newPos += component.count; // Common case - - if (!component.added) { - oldPos += component.count; - } - } else { - component.value = diff.join(oldString.slice(oldPos, oldPos + component.count)); - oldPos += component.count; // Reverse add and remove so removes are output first to match common convention - // The diffing algorithm is tied to add then remove output and this is the simplest - // route to get the desired output with minimal overhead. - - if (componentPos && components[componentPos - 1].added) { - var tmp = components[componentPos - 1]; - components[componentPos - 1] = components[componentPos]; - components[componentPos] = tmp; - } - } - } // Special case handle for when one terminal is ignored (i.e. whitespace). - // For this case we merge the terminal into the prior string and drop the change. - // This is only available for string mode. - - - var lastComponent = components[componentLen - 1]; - - if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) { - components[componentLen - 2].value += lastComponent.value; - components.pop(); - } - - return components; -} - -function clonePath(path) { - return { - newPos: path.newPos, - components: path.components.slice(0) - }; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2Jhc2UuanMiXSwibmFtZXMiOlsiRGlmZiIsInByb3RvdHlwZSIsImRpZmYiLCJvbGRTdHJpbmciLCJuZXdTdHJpbmciLCJvcHRpb25zIiwiY2FsbGJhY2siLCJzZWxmIiwiZG9uZSIsInZhbHVlIiwic2V0VGltZW91dCIsInVuZGVmaW5lZCIsImNhc3RJbnB1dCIsInJlbW92ZUVtcHR5IiwidG9rZW5pemUiLCJuZXdMZW4iLCJsZW5ndGgiLCJvbGRMZW4iLCJlZGl0TGVuZ3RoIiwibWF4RWRpdExlbmd0aCIsImJlc3RQYXRoIiwibmV3UG9zIiwiY29tcG9uZW50cyIsIm9sZFBvcyIsImV4dHJhY3RDb21tb24iLCJqb2luIiwiY291bnQiLCJleGVjRWRpdExlbmd0aCIsImRpYWdvbmFsUGF0aCIsImJhc2VQYXRoIiwiYWRkUGF0aCIsInJlbW92ZVBhdGgiLCJjYW5BZGQiLCJjYW5SZW1vdmUiLCJjbG9uZVBhdGgiLCJwdXNoQ29tcG9uZW50IiwiYnVpbGRWYWx1ZXMiLCJ1c2VMb25nZXN0VG9rZW4iLCJleGVjIiwicmV0IiwiYWRkZWQiLCJyZW1vdmVkIiwibGFzdCIsInB1c2giLCJjb21tb25Db3VudCIsImVxdWFscyIsImxlZnQiLCJyaWdodCIsImNvbXBhcmF0b3IiLCJpZ25vcmVDYXNlIiwidG9Mb3dlckNhc2UiLCJhcnJheSIsImkiLCJzcGxpdCIsImNoYXJzIiwiY29tcG9uZW50UG9zIiwiY29tcG9uZW50TGVuIiwiY29tcG9uZW50Iiwic2xpY2UiLCJtYXAiLCJvbGRWYWx1ZSIsInRtcCIsImxhc3RDb21wb25lbnQiLCJwb3AiLCJwYXRoIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFBZSxTQUFTQSxJQUFULEdBQWdCLENBQUU7O0FBRWpDQSxJQUFJLENBQUNDLFNBQUwsR0FBaUI7QUFBQTs7QUFBQTtBQUNmQyxFQUFBQSxJQURlLGdCQUNWQyxTQURVLEVBQ0NDLFNBREQsRUFDMEI7QUFBQTtBQUFBO0FBQUE7QUFBZEMsSUFBQUEsT0FBYyx1RUFBSixFQUFJO0FBQ3ZDLFFBQUlDLFFBQVEsR0FBR0QsT0FBTyxDQUFDQyxRQUF2Qjs7QUFDQSxRQUFJLE9BQU9ELE9BQVAsS0FBbUIsVUFBdkIsRUFBbUM7QUFDakNDLE1BQUFBLFFBQVEsR0FBR0QsT0FBWDtBQUNBQSxNQUFBQSxPQUFPLEdBQUcsRUFBVjtBQUNEOztBQUNELFNBQUtBLE9BQUwsR0FBZUEsT0FBZjtBQUVBLFFBQUlFLElBQUksR0FBRyxJQUFYOztBQUVBLGFBQVNDLElBQVQsQ0FBY0MsS0FBZCxFQUFxQjtBQUNuQixVQUFJSCxRQUFKLEVBQWM7QUFDWkksUUFBQUEsVUFBVSxDQUFDLFlBQVc7QUFBRUosVUFBQUEsUUFBUSxDQUFDSyxTQUFELEVBQVlGLEtBQVosQ0FBUjtBQUE2QixTQUEzQyxFQUE2QyxDQUE3QyxDQUFWO0FBQ0EsZUFBTyxJQUFQO0FBQ0QsT0FIRCxNQUdPO0FBQ0wsZUFBT0EsS0FBUDtBQUNEO0FBQ0YsS0FqQnNDLENBbUJ2Qzs7O0FBQ0FOLElBQUFBLFNBQVMsR0FBRyxLQUFLUyxTQUFMLENBQWVULFNBQWYsQ0FBWjtBQUNBQyxJQUFBQSxTQUFTLEdBQUcsS0FBS1EsU0FBTCxDQUFlUixTQUFmLENBQVo7QUFFQUQsSUFBQUEsU0FBUyxHQUFHLEtBQUtVLFdBQUwsQ0FBaUIsS0FBS0MsUUFBTCxDQUFjWCxTQUFkLENBQWpCLENBQVo7QUFDQUMsSUFBQUEsU0FBUyxHQUFHLEtBQUtTLFdBQUwsQ0FBaUIsS0FBS0MsUUFBTCxDQUFjVixTQUFkLENBQWpCLENBQVo7QUFFQSxRQUFJVyxNQUFNLEdBQUdYLFNBQVMsQ0FBQ1ksTUFBdkI7QUFBQSxRQUErQkMsTUFBTSxHQUFHZCxTQUFTLENBQUNhLE1BQWxEO0FBQ0EsUUFBSUUsVUFBVSxHQUFHLENBQWpCO0FBQ0EsUUFBSUMsYUFBYSxHQUFHSixNQUFNLEdBQUdFLE1BQTdCO0FBQ0EsUUFBSUcsUUFBUSxHQUFHLENBQUM7QUFBRUMsTUFBQUEsTUFBTSxFQUFFLENBQUMsQ0FBWDtBQUFjQyxNQUFBQSxVQUFVLEVBQUU7QUFBMUIsS0FBRCxDQUFmLENBN0J1QyxDQStCdkM7O0FBQ0EsUUFBSUMsTUFBTSxHQUFHLEtBQUtDLGFBQUwsQ0FBbUJKLFFBQVEsQ0FBQyxDQUFELENBQTNCLEVBQWdDaEIsU0FBaEMsRUFBMkNELFNBQTNDLEVBQXNELENBQXRELENBQWI7O0FBQ0EsUUFBSWlCLFFBQVEsQ0FBQyxDQUFELENBQVIsQ0FBWUMsTUFBWixHQUFxQixDQUFyQixJQUEwQk4sTUFBMUIsSUFBb0NRLE1BQU0sR0FBRyxDQUFULElBQWNOLE1BQXRELEVBQThEO0FBQzVEO0FBQ0EsYUFBT1QsSUFBSSxDQUFDLENBQUM7QUFBQ0MsUUFBQUEsS0FBSyxFQUFFLEtBQUtnQixJQUFMLENBQVVyQixTQUFWLENBQVI7QUFBOEJzQixRQUFBQSxLQUFLLEVBQUV0QixTQUFTLENBQUNZO0FBQS9DLE9BQUQsQ0FBRCxDQUFYO0FBQ0QsS0FwQ3NDLENBc0N2Qzs7O0FBQ0EsYUFBU1csY0FBVCxHQUEwQjtBQUN4QixXQUFLLElBQUlDLFlBQVksR0FBRyxDQUFDLENBQUQsR0FBS1YsVUFBN0IsRUFBeUNVLFlBQVksSUFBSVYsVUFBekQsRUFBcUVVLFlBQVksSUFBSSxDQUFyRixFQUF3RjtBQUN0RixZQUFJQyxRQUFRO0FBQUE7QUFBQTtBQUFaO0FBQUE7O0FBQ0EsWUFBSUMsT0FBTyxHQUFHVixRQUFRLENBQUNRLFlBQVksR0FBRyxDQUFoQixDQUF0QjtBQUFBLFlBQ0lHLFVBQVUsR0FBR1gsUUFBUSxDQUFDUSxZQUFZLEdBQUcsQ0FBaEIsQ0FEekI7QUFBQSxZQUVJTCxPQUFNLEdBQUcsQ0FBQ1EsVUFBVSxHQUFHQSxVQUFVLENBQUNWLE1BQWQsR0FBdUIsQ0FBbEMsSUFBdUNPLFlBRnBEOztBQUdBLFlBQUlFLE9BQUosRUFBYTtBQUNYO0FBQ0FWLFVBQUFBLFFBQVEsQ0FBQ1EsWUFBWSxHQUFHLENBQWhCLENBQVIsR0FBNkJqQixTQUE3QjtBQUNEOztBQUVELFlBQUlxQixNQUFNLEdBQUdGLE9BQU8sSUFBSUEsT0FBTyxDQUFDVCxNQUFSLEdBQWlCLENBQWpCLEdBQXFCTixNQUE3QztBQUFBLFlBQ0lrQixTQUFTLEdBQUdGLFVBQVUsSUFBSSxLQUFLUixPQUFuQixJQUE2QkEsT0FBTSxHQUFHTixNQUR0RDs7QUFFQSxZQUFJLENBQUNlLE1BQUQsSUFBVyxDQUFDQyxTQUFoQixFQUEyQjtBQUN6QjtBQUNBYixVQUFBQSxRQUFRLENBQUNRLFlBQUQsQ0FBUixHQUF5QmpCLFNBQXpCO0FBQ0E7QUFDRCxTQWhCcUYsQ0FrQnRGO0FBQ0E7QUFDQTs7O0FBQ0EsWUFBSSxDQUFDcUIsTUFBRCxJQUFZQyxTQUFTLElBQUlILE9BQU8sQ0FBQ1QsTUFBUixHQUFpQlUsVUFBVSxDQUFDVixNQUF6RCxFQUFrRTtBQUNoRVEsVUFBQUEsUUFBUSxHQUFHSyxTQUFTLENBQUNILFVBQUQsQ0FBcEI7QUFDQXhCLFVBQUFBLElBQUksQ0FBQzRCLGFBQUwsQ0FBbUJOLFFBQVEsQ0FBQ1AsVUFBNUIsRUFBd0NYLFNBQXhDLEVBQW1ELElBQW5EO0FBQ0QsU0FIRCxNQUdPO0FBQ0xrQixVQUFBQSxRQUFRLEdBQUdDLE9BQVgsQ0FESyxDQUNlOztBQUNwQkQsVUFBQUEsUUFBUSxDQUFDUixNQUFUO0FBQ0FkLFVBQUFBLElBQUksQ0FBQzRCLGFBQUwsQ0FBbUJOLFFBQVEsQ0FBQ1AsVUFBNUIsRUFBd0MsSUFBeEMsRUFBOENYLFNBQTlDO0FBQ0Q7O0FBRURZLFFBQUFBLE9BQU0sR0FBR2hCLElBQUksQ0FBQ2lCLGFBQUwsQ0FBbUJLLFFBQW5CLEVBQTZCekIsU0FBN0IsRUFBd0NELFNBQXhDLEVBQW1EeUIsWUFBbkQsQ0FBVCxDQTlCc0YsQ0FnQ3RGOztBQUNBLFlBQUlDLFFBQVEsQ0FBQ1IsTUFBVCxHQUFrQixDQUFsQixJQUF1Qk4sTUFBdkIsSUFBaUNRLE9BQU0sR0FBRyxDQUFULElBQWNOLE1BQW5ELEVBQTJEO0FBQ3pELGlCQUFPVCxJQUFJLENBQUM0QixXQUFXLENBQUM3QixJQUFELEVBQU9zQixRQUFRLENBQUNQLFVBQWhCLEVBQTRCbEIsU0FBNUIsRUFBdUNELFNBQXZDLEVBQWtESSxJQUFJLENBQUM4QixlQUF2RCxDQUFaLENBQVg7QUFDRCxTQUZELE1BRU87QUFDTDtBQUNBakIsVUFBQUEsUUFBUSxDQUFDUSxZQUFELENBQVIsR0FBeUJDLFFBQXpCO0FBQ0Q7QUFDRjs7QUFFRFgsTUFBQUEsVUFBVTtBQUNYLEtBbEZzQyxDQW9GdkM7QUFDQTtBQUNBOzs7QUFDQSxRQUFJWixRQUFKLEVBQWM7QUFDWCxnQkFBU2dDLElBQVQsR0FBZ0I7QUFDZjVCLFFBQUFBLFVBQVUsQ0FBQyxZQUFXO0FBQ3BCOztBQUNBO0FBQ0EsY0FBSVEsVUFBVSxHQUFHQyxhQUFqQixFQUFnQztBQUM5QixtQkFBT2IsUUFBUSxFQUFmO0FBQ0Q7O0FBRUQsY0FBSSxDQUFDcUIsY0FBYyxFQUFuQixFQUF1QjtBQUNyQlcsWUFBQUEsSUFBSTtBQUNMO0FBQ0YsU0FWUyxFQVVQLENBVk8sQ0FBVjtBQVdELE9BWkEsR0FBRDtBQWFELEtBZEQsTUFjTztBQUNMLGFBQU9wQixVQUFVLElBQUlDLGFBQXJCLEVBQW9DO0FBQ2xDLFlBQUlvQixHQUFHLEdBQUdaLGNBQWMsRUFBeEI7O0FBQ0EsWUFBSVksR0FBSixFQUFTO0FBQ1AsaUJBQU9BLEdBQVA7QUFDRDtBQUNGO0FBQ0Y7QUFDRixHQTlHYzs7QUFBQTs7QUFBQTtBQWdIZkosRUFBQUEsYUFoSGUseUJBZ0hEYixVQWhIQyxFQWdIV2tCLEtBaEhYLEVBZ0hrQkMsT0FoSGxCLEVBZ0gyQjtBQUN4QyxRQUFJQyxJQUFJLEdBQUdwQixVQUFVLENBQUNBLFVBQVUsQ0FBQ04sTUFBWCxHQUFvQixDQUFyQixDQUFyQjs7QUFDQSxRQUFJMEIsSUFBSSxJQUFJQSxJQUFJLENBQUNGLEtBQUwsS0FBZUEsS0FBdkIsSUFBZ0NFLElBQUksQ0FBQ0QsT0FBTCxLQUFpQkEsT0FBckQsRUFBOEQ7QUFDNUQ7QUFDQTtBQUNBbkIsTUFBQUEsVUFBVSxDQUFDQSxVQUFVLENBQUNOLE1BQVgsR0FBb0IsQ0FBckIsQ0FBVixHQUFvQztBQUFDVSxRQUFBQSxLQUFLLEVBQUVnQixJQUFJLENBQUNoQixLQUFMLEdBQWEsQ0FBckI7QUFBd0JjLFFBQUFBLEtBQUssRUFBRUEsS0FBL0I7QUFBc0NDLFFBQUFBLE9BQU8sRUFBRUE7QUFBL0MsT0FBcEM7QUFDRCxLQUpELE1BSU87QUFDTG5CLE1BQUFBLFVBQVUsQ0FBQ3FCLElBQVgsQ0FBZ0I7QUFBQ2pCLFFBQUFBLEtBQUssRUFBRSxDQUFSO0FBQVdjLFFBQUFBLEtBQUssRUFBRUEsS0FBbEI7QUFBeUJDLFFBQUFBLE9BQU8sRUFBRUE7QUFBbEMsT0FBaEI7QUFDRDtBQUNGLEdBekhjOztBQUFBOztBQUFBO0FBMEhmakIsRUFBQUEsYUExSGUseUJBMEhESyxRQTFIQyxFQTBIU3pCLFNBMUhULEVBMEhvQkQsU0ExSHBCLEVBMEgrQnlCLFlBMUgvQixFQTBINkM7QUFDMUQsUUFBSWIsTUFBTSxHQUFHWCxTQUFTLENBQUNZLE1BQXZCO0FBQUEsUUFDSUMsTUFBTSxHQUFHZCxTQUFTLENBQUNhLE1BRHZCO0FBQUEsUUFFSUssTUFBTSxHQUFHUSxRQUFRLENBQUNSLE1BRnRCO0FBQUEsUUFHSUUsTUFBTSxHQUFHRixNQUFNLEdBQUdPLFlBSHRCO0FBQUEsUUFLSWdCLFdBQVcsR0FBRyxDQUxsQjs7QUFNQSxXQUFPdkIsTUFBTSxHQUFHLENBQVQsR0FBYU4sTUFBYixJQUF1QlEsTUFBTSxHQUFHLENBQVQsR0FBYU4sTUFBcEMsSUFBOEMsS0FBSzRCLE1BQUwsQ0FBWXpDLFNBQVMsQ0FBQ2lCLE1BQU0sR0FBRyxDQUFWLENBQXJCLEVBQW1DbEIsU0FBUyxDQUFDb0IsTUFBTSxHQUFHLENBQVYsQ0FBNUMsQ0FBckQsRUFBZ0g7QUFDOUdGLE1BQUFBLE1BQU07QUFDTkUsTUFBQUEsTUFBTTtBQUNOcUIsTUFBQUEsV0FBVztBQUNaOztBQUVELFFBQUlBLFdBQUosRUFBaUI7QUFDZmYsTUFBQUEsUUFBUSxDQUFDUCxVQUFULENBQW9CcUIsSUFBcEIsQ0FBeUI7QUFBQ2pCLFFBQUFBLEtBQUssRUFBRWtCO0FBQVIsT0FBekI7QUFDRDs7QUFFRGYsSUFBQUEsUUFBUSxDQUFDUixNQUFULEdBQWtCQSxNQUFsQjtBQUNBLFdBQU9FLE1BQVA7QUFDRCxHQTdJYzs7QUFBQTs7QUFBQTtBQStJZnNCLEVBQUFBLE1BL0llLGtCQStJUkMsSUEvSVEsRUErSUZDLEtBL0lFLEVBK0lLO0FBQ2xCLFFBQUksS0FBSzFDLE9BQUwsQ0FBYTJDLFVBQWpCLEVBQTZCO0FBQzNCLGFBQU8sS0FBSzNDLE9BQUwsQ0FBYTJDLFVBQWIsQ0FBd0JGLElBQXhCLEVBQThCQyxLQUE5QixDQUFQO0FBQ0QsS0FGRCxNQUVPO0FBQ0wsYUFBT0QsSUFBSSxLQUFLQyxLQUFULElBQ0QsS0FBSzFDLE9BQUwsQ0FBYTRDLFVBQWIsSUFBMkJILElBQUksQ0FBQ0ksV0FBTCxPQUF1QkgsS0FBSyxDQUFDRyxXQUFOLEVBRHhEO0FBRUQ7QUFDRixHQXRKYzs7QUFBQTs7QUFBQTtBQXVKZnJDLEVBQUFBLFdBdkplLHVCQXVKSHNDLEtBdkpHLEVBdUpJO0FBQ2pCLFFBQUlaLEdBQUcsR0FBRyxFQUFWOztBQUNBLFNBQUssSUFBSWEsQ0FBQyxHQUFHLENBQWIsRUFBZ0JBLENBQUMsR0FBR0QsS0FBSyxDQUFDbkMsTUFBMUIsRUFBa0NvQyxDQUFDLEVBQW5DLEVBQXVDO0FBQ3JDLFVBQUlELEtBQUssQ0FBQ0MsQ0FBRCxDQUFULEVBQWM7QUFDWmIsUUFBQUEsR0FBRyxDQUFDSSxJQUFKLENBQVNRLEtBQUssQ0FBQ0MsQ0FBRCxDQUFkO0FBQ0Q7QUFDRjs7QUFDRCxXQUFPYixHQUFQO0FBQ0QsR0EvSmM7O0FBQUE7O0FBQUE7QUFnS2YzQixFQUFBQSxTQWhLZSxxQkFnS0xILEtBaEtLLEVBZ0tFO0FBQ2YsV0FBT0EsS0FBUDtBQUNELEdBbEtjOztBQUFBOztBQUFBO0FBbUtmSyxFQUFBQSxRQW5LZSxvQkFtS05MLEtBbktNLEVBbUtDO0FBQ2QsV0FBT0EsS0FBSyxDQUFDNEMsS0FBTixDQUFZLEVBQVosQ0FBUDtBQUNELEdBcktjOztBQUFBOztBQUFBO0FBc0tmNUIsRUFBQUEsSUF0S2UsZ0JBc0tWNkIsS0F0S1UsRUFzS0g7QUFDVixXQUFPQSxLQUFLLENBQUM3QixJQUFOLENBQVcsRUFBWCxDQUFQO0FBQ0Q7QUF4S2MsQ0FBakI7O0FBMktBLFNBQVNXLFdBQVQsQ0FBcUJsQyxJQUFyQixFQUEyQm9CLFVBQTNCLEVBQXVDbEIsU0FBdkMsRUFBa0RELFNBQWxELEVBQTZEa0MsZUFBN0QsRUFBOEU7QUFDNUUsTUFBSWtCLFlBQVksR0FBRyxDQUFuQjtBQUFBLE1BQ0lDLFlBQVksR0FBR2xDLFVBQVUsQ0FBQ04sTUFEOUI7QUFBQSxNQUVJSyxNQUFNLEdBQUcsQ0FGYjtBQUFBLE1BR0lFLE1BQU0sR0FBRyxDQUhiOztBQUtBLFNBQU9nQyxZQUFZLEdBQUdDLFlBQXRCLEVBQW9DRCxZQUFZLEVBQWhELEVBQW9EO0FBQ2xELFFBQUlFLFNBQVMsR0FBR25DLFVBQVUsQ0FBQ2lDLFlBQUQsQ0FBMUI7O0FBQ0EsUUFBSSxDQUFDRSxTQUFTLENBQUNoQixPQUFmLEVBQXdCO0FBQ3RCLFVBQUksQ0FBQ2dCLFNBQVMsQ0FBQ2pCLEtBQVgsSUFBb0JILGVBQXhCLEVBQXlDO0FBQ3ZDLFlBQUk1QixLQUFLLEdBQUdMLFNBQVMsQ0FBQ3NELEtBQVYsQ0FBZ0JyQyxNQUFoQixFQUF3QkEsTUFBTSxHQUFHb0MsU0FBUyxDQUFDL0IsS0FBM0MsQ0FBWjtBQUNBakIsUUFBQUEsS0FBSyxHQUFHQSxLQUFLLENBQUNrRCxHQUFOLENBQVUsVUFBU2xELEtBQVQsRUFBZ0IyQyxDQUFoQixFQUFtQjtBQUNuQyxjQUFJUSxRQUFRLEdBQUd6RCxTQUFTLENBQUNvQixNQUFNLEdBQUc2QixDQUFWLENBQXhCO0FBQ0EsaUJBQU9RLFFBQVEsQ0FBQzVDLE1BQVQsR0FBa0JQLEtBQUssQ0FBQ08sTUFBeEIsR0FBaUM0QyxRQUFqQyxHQUE0Q25ELEtBQW5EO0FBQ0QsU0FITyxDQUFSO0FBS0FnRCxRQUFBQSxTQUFTLENBQUNoRCxLQUFWLEdBQWtCUCxJQUFJLENBQUN1QixJQUFMLENBQVVoQixLQUFWLENBQWxCO0FBQ0QsT0FSRCxNQVFPO0FBQ0xnRCxRQUFBQSxTQUFTLENBQUNoRCxLQUFWLEdBQWtCUCxJQUFJLENBQUN1QixJQUFMLENBQVVyQixTQUFTLENBQUNzRCxLQUFWLENBQWdCckMsTUFBaEIsRUFBd0JBLE1BQU0sR0FBR29DLFNBQVMsQ0FBQy9CLEtBQTNDLENBQVYsQ0FBbEI7QUFDRDs7QUFDREwsTUFBQUEsTUFBTSxJQUFJb0MsU0FBUyxDQUFDL0IsS0FBcEIsQ0Fac0IsQ0FjdEI7O0FBQ0EsVUFBSSxDQUFDK0IsU0FBUyxDQUFDakIsS0FBZixFQUFzQjtBQUNwQmpCLFFBQUFBLE1BQU0sSUFBSWtDLFNBQVMsQ0FBQy9CLEtBQXBCO0FBQ0Q7QUFDRixLQWxCRCxNQWtCTztBQUNMK0IsTUFBQUEsU0FBUyxDQUFDaEQsS0FBVixHQUFrQlAsSUFBSSxDQUFDdUIsSUFBTCxDQUFVdEIsU0FBUyxDQUFDdUQsS0FBVixDQUFnQm5DLE1BQWhCLEVBQXdCQSxNQUFNLEdBQUdrQyxTQUFTLENBQUMvQixLQUEzQyxDQUFWLENBQWxCO0FBQ0FILE1BQUFBLE1BQU0sSUFBSWtDLFNBQVMsQ0FBQy9CLEtBQXBCLENBRkssQ0FJTDtBQUNBO0FBQ0E7O0FBQ0EsVUFBSTZCLFlBQVksSUFBSWpDLFVBQVUsQ0FBQ2lDLFlBQVksR0FBRyxDQUFoQixDQUFWLENBQTZCZixLQUFqRCxFQUF3RDtBQUN0RCxZQUFJcUIsR0FBRyxHQUFHdkMsVUFBVSxDQUFDaUMsWUFBWSxHQUFHLENBQWhCLENBQXBCO0FBQ0FqQyxRQUFBQSxVQUFVLENBQUNpQyxZQUFZLEdBQUcsQ0FBaEIsQ0FBVixHQUErQmpDLFVBQVUsQ0FBQ2lDLFlBQUQsQ0FBekM7QUFDQWpDLFFBQUFBLFVBQVUsQ0FBQ2lDLFlBQUQsQ0FBVixHQUEyQk0sR0FBM0I7QUFDRDtBQUNGO0FBQ0YsR0F2QzJFLENBeUM1RTtBQUNBO0FBQ0E7OztBQUNBLE1BQUlDLGFBQWEsR0FBR3hDLFVBQVUsQ0FBQ2tDLFlBQVksR0FBRyxDQUFoQixDQUE5Qjs7QUFDQSxNQUFJQSxZQUFZLEdBQUcsQ0FBZixJQUNHLE9BQU9NLGFBQWEsQ0FBQ3JELEtBQXJCLEtBQStCLFFBRGxDLEtBRUlxRCxhQUFhLENBQUN0QixLQUFkLElBQXVCc0IsYUFBYSxDQUFDckIsT0FGekMsS0FHR3ZDLElBQUksQ0FBQzJDLE1BQUwsQ0FBWSxFQUFaLEVBQWdCaUIsYUFBYSxDQUFDckQsS0FBOUIsQ0FIUCxFQUc2QztBQUMzQ2EsSUFBQUEsVUFBVSxDQUFDa0MsWUFBWSxHQUFHLENBQWhCLENBQVYsQ0FBNkIvQyxLQUE3QixJQUFzQ3FELGFBQWEsQ0FBQ3JELEtBQXBEO0FBQ0FhLElBQUFBLFVBQVUsQ0FBQ3lDLEdBQVg7QUFDRDs7QUFFRCxTQUFPekMsVUFBUDtBQUNEOztBQUVELFNBQVNZLFNBQVQsQ0FBbUI4QixJQUFuQixFQUF5QjtBQUN2QixTQUFPO0FBQUUzQyxJQUFBQSxNQUFNLEVBQUUyQyxJQUFJLENBQUMzQyxNQUFmO0FBQXVCQyxJQUFBQSxVQUFVLEVBQUUwQyxJQUFJLENBQUMxQyxVQUFMLENBQWdCb0MsS0FBaEIsQ0FBc0IsQ0FBdEI7QUFBbkMsR0FBUDtBQUNEIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gRGlmZigpIHt9XG5cbkRpZmYucHJvdG90eXBlID0ge1xuICBkaWZmKG9sZFN0cmluZywgbmV3U3RyaW5nLCBvcHRpb25zID0ge30pIHtcbiAgICBsZXQgY2FsbGJhY2sgPSBvcHRpb25zLmNhbGxiYWNrO1xuICAgIGlmICh0eXBlb2Ygb3B0aW9ucyA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgY2FsbGJhY2sgPSBvcHRpb25zO1xuICAgICAgb3B0aW9ucyA9IHt9O1xuICAgIH1cbiAgICB0aGlzLm9wdGlvbnMgPSBvcHRpb25zO1xuXG4gICAgbGV0IHNlbGYgPSB0aGlzO1xuXG4gICAgZnVuY3Rpb24gZG9uZSh2YWx1ZSkge1xuICAgICAgaWYgKGNhbGxiYWNrKSB7XG4gICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7IGNhbGxiYWNrKHVuZGVmaW5lZCwgdmFsdWUpOyB9LCAwKTtcbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICByZXR1cm4gdmFsdWU7XG4gICAgICB9XG4gICAgfVxuXG4gICAgLy8gQWxsb3cgc3ViY2xhc3NlcyB0byBtYXNzYWdlIHRoZSBpbnB1dCBwcmlvciB0byBydW5uaW5nXG4gICAgb2xkU3RyaW5nID0gdGhpcy5jYXN0SW5wdXQob2xkU3RyaW5nKTtcbiAgICBuZXdTdHJpbmcgPSB0aGlzLmNhc3RJbnB1dChuZXdTdHJpbmcpO1xuXG4gICAgb2xkU3RyaW5nID0gdGhpcy5yZW1vdmVFbXB0eSh0aGlzLnRva2VuaXplKG9sZFN0cmluZykpO1xuICAgIG5ld1N0cmluZyA9IHRoaXMucmVtb3ZlRW1wdHkodGhpcy50b2tlbml6ZShuZXdTdHJpbmcpKTtcblxuICAgIGxldCBuZXdMZW4gPSBuZXdTdHJpbmcubGVuZ3RoLCBvbGRMZW4gPSBvbGRTdHJpbmcubGVuZ3RoO1xuICAgIGxldCBlZGl0TGVuZ3RoID0gMTtcbiAgICBsZXQgbWF4RWRpdExlbmd0aCA9IG5ld0xlbiArIG9sZExlbjtcbiAgICBsZXQgYmVzdFBhdGggPSBbeyBuZXdQb3M6IC0xLCBjb21wb25lbnRzOiBbXSB9XTtcblxuICAgIC8vIFNlZWQgZWRpdExlbmd0aCA9IDAsIGkuZS4gdGhlIGNvbnRlbnQgc3RhcnRzIHdpdGggdGhlIHNhbWUgdmFsdWVzXG4gICAgbGV0IG9sZFBvcyA9IHRoaXMuZXh0cmFjdENvbW1vbihiZXN0UGF0aFswXSwgbmV3U3RyaW5nLCBvbGRTdHJpbmcsIDApO1xuICAgIGlmIChiZXN0UGF0aFswXS5uZXdQb3MgKyAxID49IG5ld0xlbiAmJiBvbGRQb3MgKyAxID49IG9sZExlbikge1xuICAgICAgLy8gSWRlbnRpdHkgcGVyIHRoZSBlcXVhbGl0eSBhbmQgdG9rZW5pemVyXG4gICAgICByZXR1cm4gZG9uZShbe3ZhbHVlOiB0aGlzLmpvaW4obmV3U3RyaW5nKSwgY291bnQ6IG5ld1N0cmluZy5sZW5ndGh9XSk7XG4gICAgfVxuXG4gICAgLy8gTWFpbiB3b3JrZXIgbWV0aG9kLiBjaGVja3MgYWxsIHBlcm11dGF0aW9ucyBvZiBhIGdpdmVuIGVkaXQgbGVuZ3RoIGZvciBhY2NlcHRhbmNlLlxuICAgIGZ1bmN0aW9uIGV4ZWNFZGl0TGVuZ3RoKCkge1xuICAgICAgZm9yIChsZXQgZGlhZ29uYWxQYXRoID0gLTEgKiBlZGl0TGVuZ3RoOyBkaWFnb25hbFBhdGggPD0gZWRpdExlbmd0aDsgZGlhZ29uYWxQYXRoICs9IDIpIHtcbiAgICAgICAgbGV0IGJhc2VQYXRoO1xuICAgICAgICBsZXQgYWRkUGF0aCA9IGJlc3RQYXRoW2RpYWdvbmFsUGF0aCAtIDFdLFxuICAgICAgICAgICAgcmVtb3ZlUGF0aCA9IGJlc3RQYXRoW2RpYWdvbmFsUGF0aCArIDFdLFxuICAgICAgICAgICAgb2xkUG9zID0gKHJlbW92ZVBhdGggPyByZW1vdmVQYXRoLm5ld1BvcyA6IDApIC0gZGlhZ29uYWxQYXRoO1xuICAgICAgICBpZiAoYWRkUGF0aCkge1xuICAgICAgICAgIC8vIE5vIG9uZSBlbHNlIGlzIGdvaW5nIHRvIGF0dGVtcHQgdG8gdXNlIHRoaXMgdmFsdWUsIGNsZWFyIGl0XG4gICAgICAgICAgYmVzdFBhdGhbZGlhZ29uYWxQYXRoIC0gMV0gPSB1bmRlZmluZWQ7XG4gICAgICAgIH1cblxuICAgICAgICBsZXQgY2FuQWRkID0gYWRkUGF0aCAmJiBhZGRQYXRoLm5ld1BvcyArIDEgPCBuZXdMZW4sXG4gICAgICAgICAgICBjYW5SZW1vdmUgPSByZW1vdmVQYXRoICYmIDAgPD0gb2xkUG9zICYmIG9sZFBvcyA8IG9sZExlbjtcbiAgICAgICAgaWYgKCFjYW5BZGQgJiYgIWNhblJlbW92ZSkge1xuICAgICAgICAgIC8vIElmIHRoaXMgcGF0aCBpcyBhIHRlcm1pbmFsIHRoZW4gcHJ1bmVcbiAgICAgICAgICBiZXN0UGF0aFtkaWFnb25hbFBhdGhdID0gdW5kZWZpbmVkO1xuICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gU2VsZWN0IHRoZSBkaWFnb25hbCB0aGF0IHdlIHdhbnQgdG8gYnJhbmNoIGZyb20uIFdlIHNlbGVjdCB0aGUgcHJpb3JcbiAgICAgICAgLy8gcGF0aCB3aG9zZSBwb3NpdGlvbiBpbiB0aGUgbmV3IHN0cmluZyBpcyB0aGUgZmFydGhlc3QgZnJvbSB0aGUgb3JpZ2luXG4gICAgICAgIC8vIGFuZCBkb2VzIG5vdCBwYXNzIHRoZSBib3VuZHMgb2YgdGhlIGRpZmYgZ3JhcGhcbiAgICAgICAgaWYgKCFjYW5BZGQgfHwgKGNhblJlbW92ZSAmJiBhZGRQYXRoLm5ld1BvcyA8IHJlbW92ZVBhdGgubmV3UG9zKSkge1xuICAgICAgICAgIGJhc2VQYXRoID0gY2xvbmVQYXRoKHJlbW92ZVBhdGgpO1xuICAgICAgICAgIHNlbGYucHVzaENvbXBvbmVudChiYXNlUGF0aC5jb21wb25lbnRzLCB1bmRlZmluZWQsIHRydWUpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGJhc2VQYXRoID0gYWRkUGF0aDsgLy8gTm8gbmVlZCB0byBjbG9uZSwgd2UndmUgcHVsbGVkIGl0IGZyb20gdGhlIGxpc3RcbiAgICAgICAgICBiYXNlUGF0aC5uZXdQb3MrKztcbiAgICAgICAgICBzZWxmLnB1c2hDb21wb25lbnQoYmFzZVBhdGguY29tcG9uZW50cywgdHJ1ZSwgdW5kZWZpbmVkKTtcbiAgICAgICAgfVxuXG4gICAgICAgIG9sZFBvcyA9IHNlbGYuZXh0cmFjdENvbW1vbihiYXNlUGF0aCwgbmV3U3RyaW5nLCBvbGRTdHJpbmcsIGRpYWdvbmFsUGF0aCk7XG5cbiAgICAgICAgLy8gSWYgd2UgaGF2ZSBoaXQgdGhlIGVuZCBvZiBib3RoIHN0cmluZ3MsIHRoZW4gd2UgYXJlIGRvbmVcbiAgICAgICAgaWYgKGJhc2VQYXRoLm5ld1BvcyArIDEgPj0gbmV3TGVuICYmIG9sZFBvcyArIDEgPj0gb2xkTGVuKSB7XG4gICAgICAgICAgcmV0dXJuIGRvbmUoYnVpbGRWYWx1ZXMoc2VsZiwgYmFzZVBhdGguY29tcG9uZW50cywgbmV3U3RyaW5nLCBvbGRTdHJpbmcsIHNlbGYudXNlTG9uZ2VzdFRva2VuKSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgLy8gT3RoZXJ3aXNlIHRyYWNrIHRoaXMgcGF0aCBhcyBhIHBvdGVudGlhbCBjYW5kaWRhdGUgYW5kIGNvbnRpbnVlLlxuICAgICAgICAgIGJlc3RQYXRoW2RpYWdvbmFsUGF0aF0gPSBiYXNlUGF0aDtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBlZGl0TGVuZ3RoKys7XG4gICAgfVxuXG4gICAgLy8gUGVyZm9ybXMgdGhlIGxlbmd0aCBvZiBlZGl0IGl0ZXJhdGlvbi4gSXMgYSBiaXQgZnVnbHkgYXMgdGhpcyBoYXMgdG8gc3VwcG9ydCB0aGVcbiAgICAvLyBzeW5jIGFuZCBhc3luYyBtb2RlIHdoaWNoIGlzIG5ldmVyIGZ1bi4gTG9vcHMgb3ZlciBleGVjRWRpdExlbmd0aCB1bnRpbCBhIHZhbHVlXG4gICAgLy8gaXMgcHJvZHVjZWQuXG4gICAgaWYgKGNhbGxiYWNrKSB7XG4gICAgICAoZnVuY3Rpb24gZXhlYygpIHtcbiAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpIHtcbiAgICAgICAgICAvLyBUaGlzIHNob3VsZCBub3QgaGFwcGVuLCBidXQgd2Ugd2FudCB0byBiZSBzYWZlLlxuICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICAgICAgaWYgKGVkaXRMZW5ndGggPiBtYXhFZGl0TGVuZ3RoKSB7XG4gICAgICAgICAgICByZXR1cm4gY2FsbGJhY2soKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoIWV4ZWNFZGl0TGVuZ3RoKCkpIHtcbiAgICAgICAgICAgIGV4ZWMoKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0sIDApO1xuICAgICAgfSgpKTtcbiAgICB9IGVsc2Uge1xuICAgICAgd2hpbGUgKGVkaXRMZW5ndGggPD0gbWF4RWRpdExlbmd0aCkge1xuICAgICAgICBsZXQgcmV0ID0gZXhlY0VkaXRMZW5ndGgoKTtcbiAgICAgICAgaWYgKHJldCkge1xuICAgICAgICAgIHJldHVybiByZXQ7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH0sXG5cbiAgcHVzaENvbXBvbmVudChjb21wb25lbnRzLCBhZGRlZCwgcmVtb3ZlZCkge1xuICAgIGxldCBsYXN0ID0gY29tcG9uZW50c1tjb21wb25lbnRzLmxlbmd0aCAtIDFdO1xuICAgIGlmIChsYXN0ICYmIGxhc3QuYWRkZWQgPT09IGFkZGVkICYmIGxhc3QucmVtb3ZlZCA9PT0gcmVtb3ZlZCkge1xuICAgICAgLy8gV2UgbmVlZCB0byBjbG9uZSBoZXJlIGFzIHRoZSBjb21wb25lbnQgY2xvbmUgb3BlcmF0aW9uIGlzIGp1c3RcbiAgICAgIC8vIGFzIHNoYWxsb3cgYXJyYXkgY2xvbmVcbiAgICAgIGNvbXBvbmVudHNbY29tcG9uZW50cy5sZW5ndGggLSAxXSA9IHtjb3VudDogbGFzdC5jb3VudCArIDEsIGFkZGVkOiBhZGRlZCwgcmVtb3ZlZDogcmVtb3ZlZCB9O1xuICAgIH0gZWxzZSB7XG4gICAgICBjb21wb25lbnRzLnB1c2goe2NvdW50OiAxLCBhZGRlZDogYWRkZWQsIHJlbW92ZWQ6IHJlbW92ZWQgfSk7XG4gICAgfVxuICB9LFxuICBleHRyYWN0Q29tbW9uKGJhc2VQYXRoLCBuZXdTdHJpbmcsIG9sZFN0cmluZywgZGlhZ29uYWxQYXRoKSB7XG4gICAgbGV0IG5ld0xlbiA9IG5ld1N0cmluZy5sZW5ndGgsXG4gICAgICAgIG9sZExlbiA9IG9sZFN0cmluZy5sZW5ndGgsXG4gICAgICAgIG5ld1BvcyA9IGJhc2VQYXRoLm5ld1BvcyxcbiAgICAgICAgb2xkUG9zID0gbmV3UG9zIC0gZGlhZ29uYWxQYXRoLFxuXG4gICAgICAgIGNvbW1vbkNvdW50ID0gMDtcbiAgICB3aGlsZSAobmV3UG9zICsgMSA8IG5ld0xlbiAmJiBvbGRQb3MgKyAxIDwgb2xkTGVuICYmIHRoaXMuZXF1YWxzKG5ld1N0cmluZ1tuZXdQb3MgKyAxXSwgb2xkU3RyaW5nW29sZFBvcyArIDFdKSkge1xuICAgICAgbmV3UG9zKys7XG4gICAgICBvbGRQb3MrKztcbiAgICAgIGNvbW1vbkNvdW50Kys7XG4gICAgfVxuXG4gICAgaWYgKGNvbW1vbkNvdW50KSB7XG4gICAgICBiYXNlUGF0aC5jb21wb25lbnRzLnB1c2goe2NvdW50OiBjb21tb25Db3VudH0pO1xuICAgIH1cblxuICAgIGJhc2VQYXRoLm5ld1BvcyA9IG5ld1BvcztcbiAgICByZXR1cm4gb2xkUG9zO1xuICB9LFxuXG4gIGVxdWFscyhsZWZ0LCByaWdodCkge1xuICAgIGlmICh0aGlzLm9wdGlvbnMuY29tcGFyYXRvcikge1xuICAgICAgcmV0dXJuIHRoaXMub3B0aW9ucy5jb21wYXJhdG9yKGxlZnQsIHJpZ2h0KTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIGxlZnQgPT09IHJpZ2h0XG4gICAgICAgIHx8ICh0aGlzLm9wdGlvbnMuaWdub3JlQ2FzZSAmJiBsZWZ0LnRvTG93ZXJDYXNlKCkgPT09IHJpZ2h0LnRvTG93ZXJDYXNlKCkpO1xuICAgIH1cbiAgfSxcbiAgcmVtb3ZlRW1wdHkoYXJyYXkpIHtcbiAgICBsZXQgcmV0ID0gW107XG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhcnJheS5sZW5ndGg7IGkrKykge1xuICAgICAgaWYgKGFycmF5W2ldKSB7XG4gICAgICAgIHJldC5wdXNoKGFycmF5W2ldKTtcbiAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHJldDtcbiAgfSxcbiAgY2FzdElucHV0KHZhbHVlKSB7XG4gICAgcmV0dXJuIHZhbHVlO1xuICB9LFxuICB0b2tlbml6ZSh2YWx1ZSkge1xuICAgIHJldHVybiB2YWx1ZS5zcGxpdCgnJyk7XG4gIH0sXG4gIGpvaW4oY2hhcnMpIHtcbiAgICByZXR1cm4gY2hhcnMuam9pbignJyk7XG4gIH1cbn07XG5cbmZ1bmN0aW9uIGJ1aWxkVmFsdWVzKGRpZmYsIGNvbXBvbmVudHMsIG5ld1N0cmluZywgb2xkU3RyaW5nLCB1c2VMb25nZXN0VG9rZW4pIHtcbiAgbGV0IGNvbXBvbmVudFBvcyA9IDAsXG4gICAgICBjb21wb25lbnRMZW4gPSBjb21wb25lbnRzLmxlbmd0aCxcbiAgICAgIG5ld1BvcyA9IDAsXG4gICAgICBvbGRQb3MgPSAwO1xuXG4gIGZvciAoOyBjb21wb25lbnRQb3MgPCBjb21wb25lbnRMZW47IGNvbXBvbmVudFBvcysrKSB7XG4gICAgbGV0IGNvbXBvbmVudCA9IGNvbXBvbmVudHNbY29tcG9uZW50UG9zXTtcbiAgICBpZiAoIWNvbXBvbmVudC5yZW1vdmVkKSB7XG4gICAgICBpZiAoIWNvbXBvbmVudC5hZGRlZCAmJiB1c2VMb25nZXN0VG9rZW4pIHtcbiAgICAgICAgbGV0IHZhbHVlID0gbmV3U3RyaW5nLnNsaWNlKG5ld1BvcywgbmV3UG9zICsgY29tcG9uZW50LmNvdW50KTtcbiAgICAgICAgdmFsdWUgPSB2YWx1ZS5tYXAoZnVuY3Rpb24odmFsdWUsIGkpIHtcbiAgICAgICAgICBsZXQgb2xkVmFsdWUgPSBvbGRTdHJpbmdbb2xkUG9zICsgaV07XG4gICAgICAgICAgcmV0dXJuIG9sZFZhbHVlLmxlbmd0aCA+IHZhbHVlLmxlbmd0aCA/IG9sZFZhbHVlIDogdmFsdWU7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIGNvbXBvbmVudC52YWx1ZSA9IGRpZmYuam9pbih2YWx1ZSk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBjb21wb25lbnQudmFsdWUgPSBkaWZmLmpvaW4obmV3U3RyaW5nLnNsaWNlKG5ld1BvcywgbmV3UG9zICsgY29tcG9uZW50LmNvdW50KSk7XG4gICAgICB9XG4gICAgICBuZXdQb3MgKz0gY29tcG9uZW50LmNvdW50O1xuXG4gICAgICAvLyBDb21tb24gY2FzZVxuICAgICAgaWYgKCFjb21wb25lbnQuYWRkZWQpIHtcbiAgICAgICAgb2xkUG9zICs9IGNvbXBvbmVudC5jb3VudDtcbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgY29tcG9uZW50LnZhbHVlID0gZGlmZi5qb2luKG9sZFN0cmluZy5zbGljZShvbGRQb3MsIG9sZFBvcyArIGNvbXBvbmVudC5jb3VudCkpO1xuICAgICAgb2xkUG9zICs9IGNvbXBvbmVudC5jb3VudDtcblxuICAgICAgLy8gUmV2ZXJzZSBhZGQgYW5kIHJlbW92ZSBzbyByZW1vdmVzIGFyZSBvdXRwdXQgZmlyc3QgdG8gbWF0Y2ggY29tbW9uIGNvbnZlbnRpb25cbiAgICAgIC8vIFRoZSBkaWZmaW5nIGFsZ29yaXRobSBpcyB0aWVkIHRvIGFkZCB0aGVuIHJlbW92ZSBvdXRwdXQgYW5kIHRoaXMgaXMgdGhlIHNpbXBsZXN0XG4gICAgICAvLyByb3V0ZSB0byBnZXQgdGhlIGRlc2lyZWQgb3V0cHV0IHdpdGggbWluaW1hbCBvdmVyaGVhZC5cbiAgICAgIGlmIChjb21wb25lbnRQb3MgJiYgY29tcG9uZW50c1tjb21wb25lbnRQb3MgLSAxXS5hZGRlZCkge1xuICAgICAgICBsZXQgdG1wID0gY29tcG9uZW50c1tjb21wb25lbnRQb3MgLSAxXTtcbiAgICAgICAgY29tcG9uZW50c1tjb21wb25lbnRQb3MgLSAxXSA9IGNvbXBvbmVudHNbY29tcG9uZW50UG9zXTtcbiAgICAgICAgY29tcG9uZW50c1tjb21wb25lbnRQb3NdID0gdG1wO1xuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIC8vIFNwZWNpYWwgY2FzZSBoYW5kbGUgZm9yIHdoZW4gb25lIHRlcm1pbmFsIGlzIGlnbm9yZWQgKGkuZS4gd2hpdGVzcGFjZSkuXG4gIC8vIEZvciB0aGlzIGNhc2Ugd2UgbWVyZ2UgdGhlIHRlcm1pbmFsIGludG8gdGhlIHByaW9yIHN0cmluZyBhbmQgZHJvcCB0aGUgY2hhbmdlLlxuICAvLyBUaGlzIGlzIG9ubHkgYXZhaWxhYmxlIGZvciBzdHJpbmcgbW9kZS5cbiAgbGV0IGxhc3RDb21wb25lbnQgPSBjb21wb25lbnRzW2NvbXBvbmVudExlbiAtIDFdO1xuICBpZiAoY29tcG9uZW50TGVuID4gMVxuICAgICAgJiYgdHlwZW9mIGxhc3RDb21wb25lbnQudmFsdWUgPT09ICdzdHJpbmcnXG4gICAgICAmJiAobGFzdENvbXBvbmVudC5hZGRlZCB8fCBsYXN0Q29tcG9uZW50LnJlbW92ZWQpXG4gICAgICAmJiBkaWZmLmVxdWFscygnJywgbGFzdENvbXBvbmVudC52YWx1ZSkpIHtcbiAgICBjb21wb25lbnRzW2NvbXBvbmVudExlbiAtIDJdLnZhbHVlICs9IGxhc3RDb21wb25lbnQudmFsdWU7XG4gICAgY29tcG9uZW50cy5wb3AoKTtcbiAgfVxuXG4gIHJldHVybiBjb21wb25lbnRzO1xufVxuXG5mdW5jdGlvbiBjbG9uZVBhdGgocGF0aCkge1xuICByZXR1cm4geyBuZXdQb3M6IHBhdGgubmV3UG9zLCBjb21wb25lbnRzOiBwYXRoLmNvbXBvbmVudHMuc2xpY2UoMCkgfTtcbn1cbiJdfQ== diff --git a/node_modules/diff/lib/diff/character.js b/node_modules/diff/lib/diff/character.js deleted file mode 100644 index 4722b16..0000000 --- a/node_modules/diff/lib/diff/character.js +++ /dev/null @@ -1,37 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.diffChars = diffChars; -exports.characterDiff = void 0; - -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_base = _interopRequireDefault(require("./base")) -/*istanbul ignore end*/ -; - -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/*istanbul ignore end*/ -var characterDiff = new -/*istanbul ignore start*/ -_base -/*istanbul ignore end*/ -. -/*istanbul ignore start*/ -default -/*istanbul ignore end*/ -(); - -/*istanbul ignore start*/ -exports.characterDiff = characterDiff; - -/*istanbul ignore end*/ -function diffChars(oldStr, newStr, options) { - return characterDiff.diff(oldStr, newStr, options); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2NoYXJhY3Rlci5qcyJdLCJuYW1lcyI6WyJjaGFyYWN0ZXJEaWZmIiwiRGlmZiIsImRpZmZDaGFycyIsIm9sZFN0ciIsIm5ld1N0ciIsIm9wdGlvbnMiLCJkaWZmIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7Ozs7QUFFTyxJQUFNQSxhQUFhLEdBQUc7QUFBSUM7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBSjtBQUFBLEVBQXRCOzs7Ozs7QUFDQSxTQUFTQyxTQUFULENBQW1CQyxNQUFuQixFQUEyQkMsTUFBM0IsRUFBbUNDLE9BQW5DLEVBQTRDO0FBQUUsU0FBT0wsYUFBYSxDQUFDTSxJQUFkLENBQW1CSCxNQUFuQixFQUEyQkMsTUFBM0IsRUFBbUNDLE9BQW5DLENBQVA7QUFBcUQiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgRGlmZiBmcm9tICcuL2Jhc2UnO1xuXG5leHBvcnQgY29uc3QgY2hhcmFjdGVyRGlmZiA9IG5ldyBEaWZmKCk7XG5leHBvcnQgZnVuY3Rpb24gZGlmZkNoYXJzKG9sZFN0ciwgbmV3U3RyLCBvcHRpb25zKSB7IHJldHVybiBjaGFyYWN0ZXJEaWZmLmRpZmYob2xkU3RyLCBuZXdTdHIsIG9wdGlvbnMpOyB9XG4iXX0= diff --git a/node_modules/diff/lib/diff/css.js b/node_modules/diff/lib/diff/css.js deleted file mode 100644 index 69ba47e..0000000 --- a/node_modules/diff/lib/diff/css.js +++ /dev/null @@ -1,41 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.diffCss = diffCss; -exports.cssDiff = void 0; - -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_base = _interopRequireDefault(require("./base")) -/*istanbul ignore end*/ -; - -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/*istanbul ignore end*/ -var cssDiff = new -/*istanbul ignore start*/ -_base -/*istanbul ignore end*/ -. -/*istanbul ignore start*/ -default -/*istanbul ignore end*/ -(); - -/*istanbul ignore start*/ -exports.cssDiff = cssDiff; - -/*istanbul ignore end*/ -cssDiff.tokenize = function (value) { - return value.split(/([{}:;,]|\s+)/); -}; - -function diffCss(oldStr, newStr, callback) { - return cssDiff.diff(oldStr, newStr, callback); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2Nzcy5qcyJdLCJuYW1lcyI6WyJjc3NEaWZmIiwiRGlmZiIsInRva2VuaXplIiwidmFsdWUiLCJzcGxpdCIsImRpZmZDc3MiLCJvbGRTdHIiLCJuZXdTdHIiLCJjYWxsYmFjayIsImRpZmYiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBOzs7OztBQUVPLElBQU1BLE9BQU8sR0FBRztBQUFJQztBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFKO0FBQUEsRUFBaEI7Ozs7OztBQUNQRCxPQUFPLENBQUNFLFFBQVIsR0FBbUIsVUFBU0MsS0FBVCxFQUFnQjtBQUNqQyxTQUFPQSxLQUFLLENBQUNDLEtBQU4sQ0FBWSxlQUFaLENBQVA7QUFDRCxDQUZEOztBQUlPLFNBQVNDLE9BQVQsQ0FBaUJDLE1BQWpCLEVBQXlCQyxNQUF6QixFQUFpQ0MsUUFBakMsRUFBMkM7QUFBRSxTQUFPUixPQUFPLENBQUNTLElBQVIsQ0FBYUgsTUFBYixFQUFxQkMsTUFBckIsRUFBNkJDLFFBQTdCLENBQVA7QUFBZ0QiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgRGlmZiBmcm9tICcuL2Jhc2UnO1xuXG5leHBvcnQgY29uc3QgY3NzRGlmZiA9IG5ldyBEaWZmKCk7XG5jc3NEaWZmLnRva2VuaXplID0gZnVuY3Rpb24odmFsdWUpIHtcbiAgcmV0dXJuIHZhbHVlLnNwbGl0KC8oW3t9OjssXXxcXHMrKS8pO1xufTtcblxuZXhwb3J0IGZ1bmN0aW9uIGRpZmZDc3Mob2xkU3RyLCBuZXdTdHIsIGNhbGxiYWNrKSB7IHJldHVybiBjc3NEaWZmLmRpZmYob2xkU3RyLCBuZXdTdHIsIGNhbGxiYWNrKTsgfVxuIl19 diff --git a/node_modules/diff/lib/diff/json.js b/node_modules/diff/lib/diff/json.js deleted file mode 100644 index 715ef08..0000000 --- a/node_modules/diff/lib/diff/json.js +++ /dev/null @@ -1,163 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.diffJson = diffJson; -exports.canonicalize = canonicalize; -exports.jsonDiff = void 0; - -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_base = _interopRequireDefault(require("./base")) -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_line = require("./line") -/*istanbul ignore end*/ -; - -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - -/*istanbul ignore end*/ -var objectPrototypeToString = Object.prototype.toString; -var jsonDiff = new -/*istanbul ignore start*/ -_base -/*istanbul ignore end*/ -. -/*istanbul ignore start*/ -default -/*istanbul ignore end*/ -(); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a -// dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output: - -/*istanbul ignore start*/ -exports.jsonDiff = jsonDiff; - -/*istanbul ignore end*/ -jsonDiff.useLongestToken = true; -jsonDiff.tokenize = -/*istanbul ignore start*/ -_line -/*istanbul ignore end*/ -. -/*istanbul ignore start*/ -lineDiff -/*istanbul ignore end*/ -.tokenize; - -jsonDiff.castInput = function (value) { - /*istanbul ignore start*/ - var _this$options = - /*istanbul ignore end*/ - this.options, - undefinedReplacement = _this$options.undefinedReplacement, - _this$options$stringi = _this$options.stringifyReplacer, - stringifyReplacer = _this$options$stringi === void 0 ? function (k, v) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - typeof v === 'undefined' ? undefinedReplacement : v - ); - } : _this$options$stringi; - return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' '); -}; - -jsonDiff.equals = function (left, right) { - return ( - /*istanbul ignore start*/ - _base - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - default - /*istanbul ignore end*/ - .prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1')) - ); -}; - -function diffJson(oldObj, newObj, options) { - return jsonDiff.diff(oldObj, newObj, options); -} // This function handles the presence of circular references by bailing out when encountering an -// object that is already on the "stack" of items being processed. Accepts an optional replacer - - -function canonicalize(obj, stack, replacementStack, replacer, key) { - stack = stack || []; - replacementStack = replacementStack || []; - - if (replacer) { - obj = replacer(key, obj); - } - - var i; - - for (i = 0; i < stack.length; i += 1) { - if (stack[i] === obj) { - return replacementStack[i]; - } - } - - var canonicalizedObj; - - if ('[object Array]' === objectPrototypeToString.call(obj)) { - stack.push(obj); - canonicalizedObj = new Array(obj.length); - replacementStack.push(canonicalizedObj); - - for (i = 0; i < obj.length; i += 1) { - canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key); - } - - stack.pop(); - replacementStack.pop(); - return canonicalizedObj; - } - - if (obj && obj.toJSON) { - obj = obj.toJSON(); - } - - if ( - /*istanbul ignore start*/ - _typeof( - /*istanbul ignore end*/ - obj) === 'object' && obj !== null) { - stack.push(obj); - canonicalizedObj = {}; - replacementStack.push(canonicalizedObj); - - var sortedKeys = [], - _key; - - for (_key in obj) { - /* istanbul ignore else */ - if (obj.hasOwnProperty(_key)) { - sortedKeys.push(_key); - } - } - - sortedKeys.sort(); - - for (i = 0; i < sortedKeys.length; i += 1) { - _key = sortedKeys[i]; - canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key); - } - - stack.pop(); - replacementStack.pop(); - } else { - canonicalizedObj = obj; - } - - return canonicalizedObj; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2pzb24uanMiXSwibmFtZXMiOlsib2JqZWN0UHJvdG90eXBlVG9TdHJpbmciLCJPYmplY3QiLCJwcm90b3R5cGUiLCJ0b1N0cmluZyIsImpzb25EaWZmIiwiRGlmZiIsInVzZUxvbmdlc3RUb2tlbiIsInRva2VuaXplIiwibGluZURpZmYiLCJjYXN0SW5wdXQiLCJ2YWx1ZSIsIm9wdGlvbnMiLCJ1bmRlZmluZWRSZXBsYWNlbWVudCIsInN0cmluZ2lmeVJlcGxhY2VyIiwiayIsInYiLCJKU09OIiwic3RyaW5naWZ5IiwiY2Fub25pY2FsaXplIiwiZXF1YWxzIiwibGVmdCIsInJpZ2h0IiwiY2FsbCIsInJlcGxhY2UiLCJkaWZmSnNvbiIsIm9sZE9iaiIsIm5ld09iaiIsImRpZmYiLCJvYmoiLCJzdGFjayIsInJlcGxhY2VtZW50U3RhY2siLCJyZXBsYWNlciIsImtleSIsImkiLCJsZW5ndGgiLCJjYW5vbmljYWxpemVkT2JqIiwicHVzaCIsIkFycmF5IiwicG9wIiwidG9KU09OIiwic29ydGVkS2V5cyIsImhhc093blByb3BlcnR5Iiwic29ydCJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBOztBQUNBO0FBQUE7QUFBQTtBQUFBO0FBQUE7Ozs7Ozs7QUFFQSxJQUFNQSx1QkFBdUIsR0FBR0MsTUFBTSxDQUFDQyxTQUFQLENBQWlCQyxRQUFqRDtBQUdPLElBQU1DLFFBQVEsR0FBRztBQUFJQztBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFKO0FBQUEsRUFBakIsQyxDQUNQO0FBQ0E7Ozs7OztBQUNBRCxRQUFRLENBQUNFLGVBQVQsR0FBMkIsSUFBM0I7QUFFQUYsUUFBUSxDQUFDRyxRQUFUO0FBQW9CQztBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBO0FBQUEsQ0FBU0QsUUFBN0I7O0FBQ0FILFFBQVEsQ0FBQ0ssU0FBVCxHQUFxQixVQUFTQyxLQUFULEVBQWdCO0FBQUE7QUFBQTtBQUFBO0FBQytFLE9BQUtDLE9BRHBGO0FBQUEsTUFDNUJDLG9CQUQ0QixpQkFDNUJBLG9CQUQ0QjtBQUFBLDRDQUNOQyxpQkFETTtBQUFBLE1BQ05BLGlCQURNLHNDQUNjLFVBQUNDLENBQUQsRUFBSUMsQ0FBSjtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQVUsYUFBT0EsQ0FBUCxLQUFhLFdBQWIsR0FBMkJILG9CQUEzQixHQUFrREc7QUFBNUQ7QUFBQSxHQURkO0FBR25DLFNBQU8sT0FBT0wsS0FBUCxLQUFpQixRQUFqQixHQUE0QkEsS0FBNUIsR0FBb0NNLElBQUksQ0FBQ0MsU0FBTCxDQUFlQyxZQUFZLENBQUNSLEtBQUQsRUFBUSxJQUFSLEVBQWMsSUFBZCxFQUFvQkcsaUJBQXBCLENBQTNCLEVBQW1FQSxpQkFBbkUsRUFBc0YsSUFBdEYsQ0FBM0M7QUFDRCxDQUpEOztBQUtBVCxRQUFRLENBQUNlLE1BQVQsR0FBa0IsVUFBU0MsSUFBVCxFQUFlQyxLQUFmLEVBQXNCO0FBQ3RDLFNBQU9oQjtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBO0FBQUEsS0FBS0gsU0FBTCxDQUFlaUIsTUFBZixDQUFzQkcsSUFBdEIsQ0FBMkJsQixRQUEzQixFQUFxQ2dCLElBQUksQ0FBQ0csT0FBTCxDQUFhLFlBQWIsRUFBMkIsSUFBM0IsQ0FBckMsRUFBdUVGLEtBQUssQ0FBQ0UsT0FBTixDQUFjLFlBQWQsRUFBNEIsSUFBNUIsQ0FBdkU7QUFBUDtBQUNELENBRkQ7O0FBSU8sU0FBU0MsUUFBVCxDQUFrQkMsTUFBbEIsRUFBMEJDLE1BQTFCLEVBQWtDZixPQUFsQyxFQUEyQztBQUFFLFNBQU9QLFFBQVEsQ0FBQ3VCLElBQVQsQ0FBY0YsTUFBZCxFQUFzQkMsTUFBdEIsRUFBOEJmLE9BQTlCLENBQVA7QUFBZ0QsQyxDQUVwRztBQUNBOzs7QUFDTyxTQUFTTyxZQUFULENBQXNCVSxHQUF0QixFQUEyQkMsS0FBM0IsRUFBa0NDLGdCQUFsQyxFQUFvREMsUUFBcEQsRUFBOERDLEdBQTlELEVBQW1FO0FBQ3hFSCxFQUFBQSxLQUFLLEdBQUdBLEtBQUssSUFBSSxFQUFqQjtBQUNBQyxFQUFBQSxnQkFBZ0IsR0FBR0EsZ0JBQWdCLElBQUksRUFBdkM7O0FBRUEsTUFBSUMsUUFBSixFQUFjO0FBQ1pILElBQUFBLEdBQUcsR0FBR0csUUFBUSxDQUFDQyxHQUFELEVBQU1KLEdBQU4sQ0FBZDtBQUNEOztBQUVELE1BQUlLLENBQUo7O0FBRUEsT0FBS0EsQ0FBQyxHQUFHLENBQVQsRUFBWUEsQ0FBQyxHQUFHSixLQUFLLENBQUNLLE1BQXRCLEVBQThCRCxDQUFDLElBQUksQ0FBbkMsRUFBc0M7QUFDcEMsUUFBSUosS0FBSyxDQUFDSSxDQUFELENBQUwsS0FBYUwsR0FBakIsRUFBc0I7QUFDcEIsYUFBT0UsZ0JBQWdCLENBQUNHLENBQUQsQ0FBdkI7QUFDRDtBQUNGOztBQUVELE1BQUlFLGdCQUFKOztBQUVBLE1BQUkscUJBQXFCbkMsdUJBQXVCLENBQUNzQixJQUF4QixDQUE2Qk0sR0FBN0IsQ0FBekIsRUFBNEQ7QUFDMURDLElBQUFBLEtBQUssQ0FBQ08sSUFBTixDQUFXUixHQUFYO0FBQ0FPLElBQUFBLGdCQUFnQixHQUFHLElBQUlFLEtBQUosQ0FBVVQsR0FBRyxDQUFDTSxNQUFkLENBQW5CO0FBQ0FKLElBQUFBLGdCQUFnQixDQUFDTSxJQUFqQixDQUFzQkQsZ0JBQXRCOztBQUNBLFNBQUtGLENBQUMsR0FBRyxDQUFULEVBQVlBLENBQUMsR0FBR0wsR0FBRyxDQUFDTSxNQUFwQixFQUE0QkQsQ0FBQyxJQUFJLENBQWpDLEVBQW9DO0FBQ2xDRSxNQUFBQSxnQkFBZ0IsQ0FBQ0YsQ0FBRCxDQUFoQixHQUFzQmYsWUFBWSxDQUFDVSxHQUFHLENBQUNLLENBQUQsQ0FBSixFQUFTSixLQUFULEVBQWdCQyxnQkFBaEIsRUFBa0NDLFFBQWxDLEVBQTRDQyxHQUE1QyxDQUFsQztBQUNEOztBQUNESCxJQUFBQSxLQUFLLENBQUNTLEdBQU47QUFDQVIsSUFBQUEsZ0JBQWdCLENBQUNRLEdBQWpCO0FBQ0EsV0FBT0gsZ0JBQVA7QUFDRDs7QUFFRCxNQUFJUCxHQUFHLElBQUlBLEdBQUcsQ0FBQ1csTUFBZixFQUF1QjtBQUNyQlgsSUFBQUEsR0FBRyxHQUFHQSxHQUFHLENBQUNXLE1BQUosRUFBTjtBQUNEOztBQUVEO0FBQUk7QUFBQTtBQUFBO0FBQU9YLEVBQUFBLEdBQVAsTUFBZSxRQUFmLElBQTJCQSxHQUFHLEtBQUssSUFBdkMsRUFBNkM7QUFDM0NDLElBQUFBLEtBQUssQ0FBQ08sSUFBTixDQUFXUixHQUFYO0FBQ0FPLElBQUFBLGdCQUFnQixHQUFHLEVBQW5CO0FBQ0FMLElBQUFBLGdCQUFnQixDQUFDTSxJQUFqQixDQUFzQkQsZ0JBQXRCOztBQUNBLFFBQUlLLFVBQVUsR0FBRyxFQUFqQjtBQUFBLFFBQ0lSLElBREo7O0FBRUEsU0FBS0EsSUFBTCxJQUFZSixHQUFaLEVBQWlCO0FBQ2Y7QUFDQSxVQUFJQSxHQUFHLENBQUNhLGNBQUosQ0FBbUJULElBQW5CLENBQUosRUFBNkI7QUFDM0JRLFFBQUFBLFVBQVUsQ0FBQ0osSUFBWCxDQUFnQkosSUFBaEI7QUFDRDtBQUNGOztBQUNEUSxJQUFBQSxVQUFVLENBQUNFLElBQVg7O0FBQ0EsU0FBS1QsQ0FBQyxHQUFHLENBQVQsRUFBWUEsQ0FBQyxHQUFHTyxVQUFVLENBQUNOLE1BQTNCLEVBQW1DRCxDQUFDLElBQUksQ0FBeEMsRUFBMkM7QUFDekNELE1BQUFBLElBQUcsR0FBR1EsVUFBVSxDQUFDUCxDQUFELENBQWhCO0FBQ0FFLE1BQUFBLGdCQUFnQixDQUFDSCxJQUFELENBQWhCLEdBQXdCZCxZQUFZLENBQUNVLEdBQUcsQ0FBQ0ksSUFBRCxDQUFKLEVBQVdILEtBQVgsRUFBa0JDLGdCQUFsQixFQUFvQ0MsUUFBcEMsRUFBOENDLElBQTlDLENBQXBDO0FBQ0Q7O0FBQ0RILElBQUFBLEtBQUssQ0FBQ1MsR0FBTjtBQUNBUixJQUFBQSxnQkFBZ0IsQ0FBQ1EsR0FBakI7QUFDRCxHQW5CRCxNQW1CTztBQUNMSCxJQUFBQSxnQkFBZ0IsR0FBR1AsR0FBbkI7QUFDRDs7QUFDRCxTQUFPTyxnQkFBUDtBQUNEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IERpZmYgZnJvbSAnLi9iYXNlJztcbmltcG9ydCB7bGluZURpZmZ9IGZyb20gJy4vbGluZSc7XG5cbmNvbnN0IG9iamVjdFByb3RvdHlwZVRvU3RyaW5nID0gT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZztcblxuXG5leHBvcnQgY29uc3QganNvbkRpZmYgPSBuZXcgRGlmZigpO1xuLy8gRGlzY3JpbWluYXRlIGJldHdlZW4gdHdvIGxpbmVzIG9mIHByZXR0eS1wcmludGVkLCBzZXJpYWxpemVkIEpTT04gd2hlcmUgb25lIG9mIHRoZW0gaGFzIGFcbi8vIGRhbmdsaW5nIGNvbW1hIGFuZCB0aGUgb3RoZXIgZG9lc24ndC4gVHVybnMgb3V0IGluY2x1ZGluZyB0aGUgZGFuZ2xpbmcgY29tbWEgeWllbGRzIHRoZSBuaWNlc3Qgb3V0cHV0OlxuanNvbkRpZmYudXNlTG9uZ2VzdFRva2VuID0gdHJ1ZTtcblxuanNvbkRpZmYudG9rZW5pemUgPSBsaW5lRGlmZi50b2tlbml6ZTtcbmpzb25EaWZmLmNhc3RJbnB1dCA9IGZ1bmN0aW9uKHZhbHVlKSB7XG4gIGNvbnN0IHt1bmRlZmluZWRSZXBsYWNlbWVudCwgc3RyaW5naWZ5UmVwbGFjZXIgPSAoaywgdikgPT4gdHlwZW9mIHYgPT09ICd1bmRlZmluZWQnID8gdW5kZWZpbmVkUmVwbGFjZW1lbnQgOiB2fSA9IHRoaXMub3B0aW9ucztcblxuICByZXR1cm4gdHlwZW9mIHZhbHVlID09PSAnc3RyaW5nJyA/IHZhbHVlIDogSlNPTi5zdHJpbmdpZnkoY2Fub25pY2FsaXplKHZhbHVlLCBudWxsLCBudWxsLCBzdHJpbmdpZnlSZXBsYWNlciksIHN0cmluZ2lmeVJlcGxhY2VyLCAnICAnKTtcbn07XG5qc29uRGlmZi5lcXVhbHMgPSBmdW5jdGlvbihsZWZ0LCByaWdodCkge1xuICByZXR1cm4gRGlmZi5wcm90b3R5cGUuZXF1YWxzLmNhbGwoanNvbkRpZmYsIGxlZnQucmVwbGFjZSgvLChbXFxyXFxuXSkvZywgJyQxJyksIHJpZ2h0LnJlcGxhY2UoLywoW1xcclxcbl0pL2csICckMScpKTtcbn07XG5cbmV4cG9ydCBmdW5jdGlvbiBkaWZmSnNvbihvbGRPYmosIG5ld09iaiwgb3B0aW9ucykgeyByZXR1cm4ganNvbkRpZmYuZGlmZihvbGRPYmosIG5ld09iaiwgb3B0aW9ucyk7IH1cblxuLy8gVGhpcyBmdW5jdGlvbiBoYW5kbGVzIHRoZSBwcmVzZW5jZSBvZiBjaXJjdWxhciByZWZlcmVuY2VzIGJ5IGJhaWxpbmcgb3V0IHdoZW4gZW5jb3VudGVyaW5nIGFuXG4vLyBvYmplY3QgdGhhdCBpcyBhbHJlYWR5IG9uIHRoZSBcInN0YWNrXCIgb2YgaXRlbXMgYmVpbmcgcHJvY2Vzc2VkLiBBY2NlcHRzIGFuIG9wdGlvbmFsIHJlcGxhY2VyXG5leHBvcnQgZnVuY3Rpb24gY2Fub25pY2FsaXplKG9iaiwgc3RhY2ssIHJlcGxhY2VtZW50U3RhY2ssIHJlcGxhY2VyLCBrZXkpIHtcbiAgc3RhY2sgPSBzdGFjayB8fCBbXTtcbiAgcmVwbGFjZW1lbnRTdGFjayA9IHJlcGxhY2VtZW50U3RhY2sgfHwgW107XG5cbiAgaWYgKHJlcGxhY2VyKSB7XG4gICAgb2JqID0gcmVwbGFjZXIoa2V5LCBvYmopO1xuICB9XG5cbiAgbGV0IGk7XG5cbiAgZm9yIChpID0gMDsgaSA8IHN0YWNrLmxlbmd0aDsgaSArPSAxKSB7XG4gICAgaWYgKHN0YWNrW2ldID09PSBvYmopIHtcbiAgICAgIHJldHVybiByZXBsYWNlbWVudFN0YWNrW2ldO1xuICAgIH1cbiAgfVxuXG4gIGxldCBjYW5vbmljYWxpemVkT2JqO1xuXG4gIGlmICgnW29iamVjdCBBcnJheV0nID09PSBvYmplY3RQcm90b3R5cGVUb1N0cmluZy5jYWxsKG9iaikpIHtcbiAgICBzdGFjay5wdXNoKG9iaik7XG4gICAgY2Fub25pY2FsaXplZE9iaiA9IG5ldyBBcnJheShvYmoubGVuZ3RoKTtcbiAgICByZXBsYWNlbWVudFN0YWNrLnB1c2goY2Fub25pY2FsaXplZE9iaik7XG4gICAgZm9yIChpID0gMDsgaSA8IG9iai5sZW5ndGg7IGkgKz0gMSkge1xuICAgICAgY2Fub25pY2FsaXplZE9ialtpXSA9IGNhbm9uaWNhbGl6ZShvYmpbaV0sIHN0YWNrLCByZXBsYWNlbWVudFN0YWNrLCByZXBsYWNlciwga2V5KTtcbiAgICB9XG4gICAgc3RhY2sucG9wKCk7XG4gICAgcmVwbGFjZW1lbnRTdGFjay5wb3AoKTtcbiAgICByZXR1cm4gY2Fub25pY2FsaXplZE9iajtcbiAgfVxuXG4gIGlmIChvYmogJiYgb2JqLnRvSlNPTikge1xuICAgIG9iaiA9IG9iai50b0pTT04oKTtcbiAgfVxuXG4gIGlmICh0eXBlb2Ygb2JqID09PSAnb2JqZWN0JyAmJiBvYmogIT09IG51bGwpIHtcbiAgICBzdGFjay5wdXNoKG9iaik7XG4gICAgY2Fub25pY2FsaXplZE9iaiA9IHt9O1xuICAgIHJlcGxhY2VtZW50U3RhY2sucHVzaChjYW5vbmljYWxpemVkT2JqKTtcbiAgICBsZXQgc29ydGVkS2V5cyA9IFtdLFxuICAgICAgICBrZXk7XG4gICAgZm9yIChrZXkgaW4gb2JqKSB7XG4gICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgZWxzZSAqL1xuICAgICAgaWYgKG9iai5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7XG4gICAgICAgIHNvcnRlZEtleXMucHVzaChrZXkpO1xuICAgICAgfVxuICAgIH1cbiAgICBzb3J0ZWRLZXlzLnNvcnQoKTtcbiAgICBmb3IgKGkgPSAwOyBpIDwgc29ydGVkS2V5cy5sZW5ndGg7IGkgKz0gMSkge1xuICAgICAga2V5ID0gc29ydGVkS2V5c1tpXTtcbiAgICAgIGNhbm9uaWNhbGl6ZWRPYmpba2V5XSA9IGNhbm9uaWNhbGl6ZShvYmpba2V5XSwgc3RhY2ssIHJlcGxhY2VtZW50U3RhY2ssIHJlcGxhY2VyLCBrZXkpO1xuICAgIH1cbiAgICBzdGFjay5wb3AoKTtcbiAgICByZXBsYWNlbWVudFN0YWNrLnBvcCgpO1xuICB9IGVsc2Uge1xuICAgIGNhbm9uaWNhbGl6ZWRPYmogPSBvYmo7XG4gIH1cbiAgcmV0dXJuIGNhbm9uaWNhbGl6ZWRPYmo7XG59XG4iXX0= diff --git a/node_modules/diff/lib/diff/line.js b/node_modules/diff/lib/diff/line.js deleted file mode 100644 index f323f84..0000000 --- a/node_modules/diff/lib/diff/line.js +++ /dev/null @@ -1,89 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.diffLines = diffLines; -exports.diffTrimmedLines = diffTrimmedLines; -exports.lineDiff = void 0; - -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_base = _interopRequireDefault(require("./base")) -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_params = require("../util/params") -/*istanbul ignore end*/ -; - -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/*istanbul ignore end*/ -var lineDiff = new -/*istanbul ignore start*/ -_base -/*istanbul ignore end*/ -. -/*istanbul ignore start*/ -default -/*istanbul ignore end*/ -(); - -/*istanbul ignore start*/ -exports.lineDiff = lineDiff; - -/*istanbul ignore end*/ -lineDiff.tokenize = function (value) { - var retLines = [], - linesAndNewlines = value.split(/(\n|\r\n)/); // Ignore the final empty token that occurs if the string ends with a new line - - if (!linesAndNewlines[linesAndNewlines.length - 1]) { - linesAndNewlines.pop(); - } // Merge the content and line separators into single tokens - - - for (var i = 0; i < linesAndNewlines.length; i++) { - var line = linesAndNewlines[i]; - - if (i % 2 && !this.options.newlineIsToken) { - retLines[retLines.length - 1] += line; - } else { - if (this.options.ignoreWhitespace) { - line = line.trim(); - } - - retLines.push(line); - } - } - - return retLines; -}; - -function diffLines(oldStr, newStr, callback) { - return lineDiff.diff(oldStr, newStr, callback); -} - -function diffTrimmedLines(oldStr, newStr, callback) { - var options = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - _params - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - generateOptions) - /*istanbul ignore end*/ - (callback, { - ignoreWhitespace: true - }); - return lineDiff.diff(oldStr, newStr, options); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2xpbmUuanMiXSwibmFtZXMiOlsibGluZURpZmYiLCJEaWZmIiwidG9rZW5pemUiLCJ2YWx1ZSIsInJldExpbmVzIiwibGluZXNBbmROZXdsaW5lcyIsInNwbGl0IiwibGVuZ3RoIiwicG9wIiwiaSIsImxpbmUiLCJvcHRpb25zIiwibmV3bGluZUlzVG9rZW4iLCJpZ25vcmVXaGl0ZXNwYWNlIiwidHJpbSIsInB1c2giLCJkaWZmTGluZXMiLCJvbGRTdHIiLCJuZXdTdHIiLCJjYWxsYmFjayIsImRpZmYiLCJkaWZmVHJpbW1lZExpbmVzIiwiZ2VuZXJhdGVPcHRpb25zIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7O0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFBQTs7Ozs7QUFFTyxJQUFNQSxRQUFRLEdBQUc7QUFBSUM7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBSjtBQUFBLEVBQWpCOzs7Ozs7QUFDUEQsUUFBUSxDQUFDRSxRQUFULEdBQW9CLFVBQVNDLEtBQVQsRUFBZ0I7QUFDbEMsTUFBSUMsUUFBUSxHQUFHLEVBQWY7QUFBQSxNQUNJQyxnQkFBZ0IsR0FBR0YsS0FBSyxDQUFDRyxLQUFOLENBQVksV0FBWixDQUR2QixDQURrQyxDQUlsQzs7QUFDQSxNQUFJLENBQUNELGdCQUFnQixDQUFDQSxnQkFBZ0IsQ0FBQ0UsTUFBakIsR0FBMEIsQ0FBM0IsQ0FBckIsRUFBb0Q7QUFDbERGLElBQUFBLGdCQUFnQixDQUFDRyxHQUFqQjtBQUNELEdBUGlDLENBU2xDOzs7QUFDQSxPQUFLLElBQUlDLENBQUMsR0FBRyxDQUFiLEVBQWdCQSxDQUFDLEdBQUdKLGdCQUFnQixDQUFDRSxNQUFyQyxFQUE2Q0UsQ0FBQyxFQUE5QyxFQUFrRDtBQUNoRCxRQUFJQyxJQUFJLEdBQUdMLGdCQUFnQixDQUFDSSxDQUFELENBQTNCOztBQUVBLFFBQUlBLENBQUMsR0FBRyxDQUFKLElBQVMsQ0FBQyxLQUFLRSxPQUFMLENBQWFDLGNBQTNCLEVBQTJDO0FBQ3pDUixNQUFBQSxRQUFRLENBQUNBLFFBQVEsQ0FBQ0csTUFBVCxHQUFrQixDQUFuQixDQUFSLElBQWlDRyxJQUFqQztBQUNELEtBRkQsTUFFTztBQUNMLFVBQUksS0FBS0MsT0FBTCxDQUFhRSxnQkFBakIsRUFBbUM7QUFDakNILFFBQUFBLElBQUksR0FBR0EsSUFBSSxDQUFDSSxJQUFMLEVBQVA7QUFDRDs7QUFDRFYsTUFBQUEsUUFBUSxDQUFDVyxJQUFULENBQWNMLElBQWQ7QUFDRDtBQUNGOztBQUVELFNBQU9OLFFBQVA7QUFDRCxDQXhCRDs7QUEwQk8sU0FBU1ksU0FBVCxDQUFtQkMsTUFBbkIsRUFBMkJDLE1BQTNCLEVBQW1DQyxRQUFuQyxFQUE2QztBQUFFLFNBQU9uQixRQUFRLENBQUNvQixJQUFULENBQWNILE1BQWQsRUFBc0JDLE1BQXRCLEVBQThCQyxRQUE5QixDQUFQO0FBQWlEOztBQUNoRyxTQUFTRSxnQkFBVCxDQUEwQkosTUFBMUIsRUFBa0NDLE1BQWxDLEVBQTBDQyxRQUExQyxFQUFvRDtBQUN6RCxNQUFJUixPQUFPO0FBQUc7QUFBQTtBQUFBOztBQUFBVztBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBO0FBQUEsR0FBZ0JILFFBQWhCLEVBQTBCO0FBQUNOLElBQUFBLGdCQUFnQixFQUFFO0FBQW5CLEdBQTFCLENBQWQ7QUFDQSxTQUFPYixRQUFRLENBQUNvQixJQUFULENBQWNILE1BQWQsRUFBc0JDLE1BQXRCLEVBQThCUCxPQUE5QixDQUFQO0FBQ0QiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgRGlmZiBmcm9tICcuL2Jhc2UnO1xuaW1wb3J0IHtnZW5lcmF0ZU9wdGlvbnN9IGZyb20gJy4uL3V0aWwvcGFyYW1zJztcblxuZXhwb3J0IGNvbnN0IGxpbmVEaWZmID0gbmV3IERpZmYoKTtcbmxpbmVEaWZmLnRva2VuaXplID0gZnVuY3Rpb24odmFsdWUpIHtcbiAgbGV0IHJldExpbmVzID0gW10sXG4gICAgICBsaW5lc0FuZE5ld2xpbmVzID0gdmFsdWUuc3BsaXQoLyhcXG58XFxyXFxuKS8pO1xuXG4gIC8vIElnbm9yZSB0aGUgZmluYWwgZW1wdHkgdG9rZW4gdGhhdCBvY2N1cnMgaWYgdGhlIHN0cmluZyBlbmRzIHdpdGggYSBuZXcgbGluZVxuICBpZiAoIWxpbmVzQW5kTmV3bGluZXNbbGluZXNBbmROZXdsaW5lcy5sZW5ndGggLSAxXSkge1xuICAgIGxpbmVzQW5kTmV3bGluZXMucG9wKCk7XG4gIH1cblxuICAvLyBNZXJnZSB0aGUgY29udGVudCBhbmQgbGluZSBzZXBhcmF0b3JzIGludG8gc2luZ2xlIHRva2Vuc1xuICBmb3IgKGxldCBpID0gMDsgaSA8IGxpbmVzQW5kTmV3bGluZXMubGVuZ3RoOyBpKyspIHtcbiAgICBsZXQgbGluZSA9IGxpbmVzQW5kTmV3bGluZXNbaV07XG5cbiAgICBpZiAoaSAlIDIgJiYgIXRoaXMub3B0aW9ucy5uZXdsaW5lSXNUb2tlbikge1xuICAgICAgcmV0TGluZXNbcmV0TGluZXMubGVuZ3RoIC0gMV0gKz0gbGluZTtcbiAgICB9IGVsc2Uge1xuICAgICAgaWYgKHRoaXMub3B0aW9ucy5pZ25vcmVXaGl0ZXNwYWNlKSB7XG4gICAgICAgIGxpbmUgPSBsaW5lLnRyaW0oKTtcbiAgICAgIH1cbiAgICAgIHJldExpbmVzLnB1c2gobGluZSk7XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIHJldExpbmVzO1xufTtcblxuZXhwb3J0IGZ1bmN0aW9uIGRpZmZMaW5lcyhvbGRTdHIsIG5ld1N0ciwgY2FsbGJhY2spIHsgcmV0dXJuIGxpbmVEaWZmLmRpZmYob2xkU3RyLCBuZXdTdHIsIGNhbGxiYWNrKTsgfVxuZXhwb3J0IGZ1bmN0aW9uIGRpZmZUcmltbWVkTGluZXMob2xkU3RyLCBuZXdTdHIsIGNhbGxiYWNrKSB7XG4gIGxldCBvcHRpb25zID0gZ2VuZXJhdGVPcHRpb25zKGNhbGxiYWNrLCB7aWdub3JlV2hpdGVzcGFjZTogdHJ1ZX0pO1xuICByZXR1cm4gbGluZURpZmYuZGlmZihvbGRTdHIsIG5ld1N0ciwgb3B0aW9ucyk7XG59XG4iXX0= diff --git a/node_modules/diff/lib/diff/sentence.js b/node_modules/diff/lib/diff/sentence.js deleted file mode 100644 index 9ee96e9..0000000 --- a/node_modules/diff/lib/diff/sentence.js +++ /dev/null @@ -1,41 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.diffSentences = diffSentences; -exports.sentenceDiff = void 0; - -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_base = _interopRequireDefault(require("./base")) -/*istanbul ignore end*/ -; - -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/*istanbul ignore end*/ -var sentenceDiff = new -/*istanbul ignore start*/ -_base -/*istanbul ignore end*/ -. -/*istanbul ignore start*/ -default -/*istanbul ignore end*/ -(); - -/*istanbul ignore start*/ -exports.sentenceDiff = sentenceDiff; - -/*istanbul ignore end*/ -sentenceDiff.tokenize = function (value) { - return value.split(/(\S.+?[.!?])(?=\s+|$)/); -}; - -function diffSentences(oldStr, newStr, callback) { - return sentenceDiff.diff(oldStr, newStr, callback); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL3NlbnRlbmNlLmpzIl0sIm5hbWVzIjpbInNlbnRlbmNlRGlmZiIsIkRpZmYiLCJ0b2tlbml6ZSIsInZhbHVlIiwic3BsaXQiLCJkaWZmU2VudGVuY2VzIiwib2xkU3RyIiwibmV3U3RyIiwiY2FsbGJhY2siLCJkaWZmIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7Ozs7QUFHTyxJQUFNQSxZQUFZLEdBQUc7QUFBSUM7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBSjtBQUFBLEVBQXJCOzs7Ozs7QUFDUEQsWUFBWSxDQUFDRSxRQUFiLEdBQXdCLFVBQVNDLEtBQVQsRUFBZ0I7QUFDdEMsU0FBT0EsS0FBSyxDQUFDQyxLQUFOLENBQVksdUJBQVosQ0FBUDtBQUNELENBRkQ7O0FBSU8sU0FBU0MsYUFBVCxDQUF1QkMsTUFBdkIsRUFBK0JDLE1BQS9CLEVBQXVDQyxRQUF2QyxFQUFpRDtBQUFFLFNBQU9SLFlBQVksQ0FBQ1MsSUFBYixDQUFrQkgsTUFBbEIsRUFBMEJDLE1BQTFCLEVBQWtDQyxRQUFsQyxDQUFQO0FBQXFEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IERpZmYgZnJvbSAnLi9iYXNlJztcblxuXG5leHBvcnQgY29uc3Qgc2VudGVuY2VEaWZmID0gbmV3IERpZmYoKTtcbnNlbnRlbmNlRGlmZi50b2tlbml6ZSA9IGZ1bmN0aW9uKHZhbHVlKSB7XG4gIHJldHVybiB2YWx1ZS5zcGxpdCgvKFxcUy4rP1suIT9dKSg/PVxccyt8JCkvKTtcbn07XG5cbmV4cG9ydCBmdW5jdGlvbiBkaWZmU2VudGVuY2VzKG9sZFN0ciwgbmV3U3RyLCBjYWxsYmFjaykgeyByZXR1cm4gc2VudGVuY2VEaWZmLmRpZmYob2xkU3RyLCBuZXdTdHIsIGNhbGxiYWNrKTsgfVxuIl19 diff --git a/node_modules/diff/lib/diff/word.js b/node_modules/diff/lib/diff/word.js deleted file mode 100644 index 0b952e0..0000000 --- a/node_modules/diff/lib/diff/word.js +++ /dev/null @@ -1,107 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.diffWords = diffWords; -exports.diffWordsWithSpace = diffWordsWithSpace; -exports.wordDiff = void 0; - -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_base = _interopRequireDefault(require("./base")) -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_params = require("../util/params") -/*istanbul ignore end*/ -; - -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/*istanbul ignore end*/ -// Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode -// -// Ranges and exceptions: -// Latin-1 Supplement, 0080–00FF -// - U+00D7 × Multiplication sign -// - U+00F7 ÷ Division sign -// Latin Extended-A, 0100–017F -// Latin Extended-B, 0180–024F -// IPA Extensions, 0250–02AF -// Spacing Modifier Letters, 02B0–02FF -// - U+02C7 ˇ ˇ Caron -// - U+02D8 ˘ ˘ Breve -// - U+02D9 ˙ ˙ Dot Above -// - U+02DA ˚ ˚ Ring Above -// - U+02DB ˛ ˛ Ogonek -// - U+02DC ˜ ˜ Small Tilde -// - U+02DD ˝ ˝ Double Acute Accent -// Latin Extended Additional, 1E00–1EFF -var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/; -var reWhitespace = /\S/; -var wordDiff = new -/*istanbul ignore start*/ -_base -/*istanbul ignore end*/ -. -/*istanbul ignore start*/ -default -/*istanbul ignore end*/ -(); - -/*istanbul ignore start*/ -exports.wordDiff = wordDiff; - -/*istanbul ignore end*/ -wordDiff.equals = function (left, right) { - if (this.options.ignoreCase) { - left = left.toLowerCase(); - right = right.toLowerCase(); - } - - return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right); -}; - -wordDiff.tokenize = function (value) { - var tokens = value.split(/(\s+|[()[\]{}'"]|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set. - - for (var i = 0; i < tokens.length - 1; i++) { - // If we have an empty string in the next field and we have only word chars before and after, merge - if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) { - tokens[i] += tokens[i + 2]; - tokens.splice(i + 1, 2); - i--; - } - } - - return tokens; -}; - -function diffWords(oldStr, newStr, options) { - options = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - _params - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - generateOptions) - /*istanbul ignore end*/ - (options, { - ignoreWhitespace: true - }); - return wordDiff.diff(oldStr, newStr, options); -} - -function diffWordsWithSpace(oldStr, newStr, options) { - return wordDiff.diff(oldStr, newStr, options); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL3dvcmQuanMiXSwibmFtZXMiOlsiZXh0ZW5kZWRXb3JkQ2hhcnMiLCJyZVdoaXRlc3BhY2UiLCJ3b3JkRGlmZiIsIkRpZmYiLCJlcXVhbHMiLCJsZWZ0IiwicmlnaHQiLCJvcHRpb25zIiwiaWdub3JlQ2FzZSIsInRvTG93ZXJDYXNlIiwiaWdub3JlV2hpdGVzcGFjZSIsInRlc3QiLCJ0b2tlbml6ZSIsInZhbHVlIiwidG9rZW5zIiwic3BsaXQiLCJpIiwibGVuZ3RoIiwic3BsaWNlIiwiZGlmZldvcmRzIiwib2xkU3RyIiwibmV3U3RyIiwiZ2VuZXJhdGVPcHRpb25zIiwiZGlmZiIsImRpZmZXb3Jkc1dpdGhTcGFjZSJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBOztBQUNBO0FBQUE7QUFBQTtBQUFBO0FBQUE7Ozs7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBTUEsaUJBQWlCLEdBQUcsK0RBQTFCO0FBRUEsSUFBTUMsWUFBWSxHQUFHLElBQXJCO0FBRU8sSUFBTUMsUUFBUSxHQUFHO0FBQUlDO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUo7QUFBQSxFQUFqQjs7Ozs7O0FBQ1BELFFBQVEsQ0FBQ0UsTUFBVCxHQUFrQixVQUFTQyxJQUFULEVBQWVDLEtBQWYsRUFBc0I7QUFDdEMsTUFBSSxLQUFLQyxPQUFMLENBQWFDLFVBQWpCLEVBQTZCO0FBQzNCSCxJQUFBQSxJQUFJLEdBQUdBLElBQUksQ0FBQ0ksV0FBTCxFQUFQO0FBQ0FILElBQUFBLEtBQUssR0FBR0EsS0FBSyxDQUFDRyxXQUFOLEVBQVI7QUFDRDs7QUFDRCxTQUFPSixJQUFJLEtBQUtDLEtBQVQsSUFBbUIsS0FBS0MsT0FBTCxDQUFhRyxnQkFBYixJQUFpQyxDQUFDVCxZQUFZLENBQUNVLElBQWIsQ0FBa0JOLElBQWxCLENBQWxDLElBQTZELENBQUNKLFlBQVksQ0FBQ1UsSUFBYixDQUFrQkwsS0FBbEIsQ0FBeEY7QUFDRCxDQU5EOztBQU9BSixRQUFRLENBQUNVLFFBQVQsR0FBb0IsVUFBU0MsS0FBVCxFQUFnQjtBQUNsQyxNQUFJQyxNQUFNLEdBQUdELEtBQUssQ0FBQ0UsS0FBTixDQUFZLHNCQUFaLENBQWIsQ0FEa0MsQ0FHbEM7O0FBQ0EsT0FBSyxJQUFJQyxDQUFDLEdBQUcsQ0FBYixFQUFnQkEsQ0FBQyxHQUFHRixNQUFNLENBQUNHLE1BQVAsR0FBZ0IsQ0FBcEMsRUFBdUNELENBQUMsRUFBeEMsRUFBNEM7QUFDMUM7QUFDQSxRQUFJLENBQUNGLE1BQU0sQ0FBQ0UsQ0FBQyxHQUFHLENBQUwsQ0FBUCxJQUFrQkYsTUFBTSxDQUFDRSxDQUFDLEdBQUcsQ0FBTCxDQUF4QixJQUNLaEIsaUJBQWlCLENBQUNXLElBQWxCLENBQXVCRyxNQUFNLENBQUNFLENBQUQsQ0FBN0IsQ0FETCxJQUVLaEIsaUJBQWlCLENBQUNXLElBQWxCLENBQXVCRyxNQUFNLENBQUNFLENBQUMsR0FBRyxDQUFMLENBQTdCLENBRlQsRUFFZ0Q7QUFDOUNGLE1BQUFBLE1BQU0sQ0FBQ0UsQ0FBRCxDQUFOLElBQWFGLE1BQU0sQ0FBQ0UsQ0FBQyxHQUFHLENBQUwsQ0FBbkI7QUFDQUYsTUFBQUEsTUFBTSxDQUFDSSxNQUFQLENBQWNGLENBQUMsR0FBRyxDQUFsQixFQUFxQixDQUFyQjtBQUNBQSxNQUFBQSxDQUFDO0FBQ0Y7QUFDRjs7QUFFRCxTQUFPRixNQUFQO0FBQ0QsQ0FoQkQ7O0FBa0JPLFNBQVNLLFNBQVQsQ0FBbUJDLE1BQW5CLEVBQTJCQyxNQUEzQixFQUFtQ2QsT0FBbkMsRUFBNEM7QUFDakRBLEVBQUFBLE9BQU87QUFBRztBQUFBO0FBQUE7O0FBQUFlO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUE7QUFBQSxHQUFnQmYsT0FBaEIsRUFBeUI7QUFBQ0csSUFBQUEsZ0JBQWdCLEVBQUU7QUFBbkIsR0FBekIsQ0FBVjtBQUNBLFNBQU9SLFFBQVEsQ0FBQ3FCLElBQVQsQ0FBY0gsTUFBZCxFQUFzQkMsTUFBdEIsRUFBOEJkLE9BQTlCLENBQVA7QUFDRDs7QUFFTSxTQUFTaUIsa0JBQVQsQ0FBNEJKLE1BQTVCLEVBQW9DQyxNQUFwQyxFQUE0Q2QsT0FBNUMsRUFBcUQ7QUFDMUQsU0FBT0wsUUFBUSxDQUFDcUIsSUFBVCxDQUFjSCxNQUFkLEVBQXNCQyxNQUF0QixFQUE4QmQsT0FBOUIsQ0FBUDtBQUNEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IERpZmYgZnJvbSAnLi9iYXNlJztcbmltcG9ydCB7Z2VuZXJhdGVPcHRpb25zfSBmcm9tICcuLi91dGlsL3BhcmFtcyc7XG5cbi8vIEJhc2VkIG9uIGh0dHBzOi8vZW4ud2lraXBlZGlhLm9yZy93aWtpL0xhdGluX3NjcmlwdF9pbl9Vbmljb2RlXG4vL1xuLy8gUmFuZ2VzIGFuZCBleGNlcHRpb25zOlxuLy8gTGF0aW4tMSBTdXBwbGVtZW50LCAwMDgw4oCTMDBGRlxuLy8gIC0gVSswMEQ3ICDDlyBNdWx0aXBsaWNhdGlvbiBzaWduXG4vLyAgLSBVKzAwRjcgIMO3IERpdmlzaW9uIHNpZ25cbi8vIExhdGluIEV4dGVuZGVkLUEsIDAxMDDigJMwMTdGXG4vLyBMYXRpbiBFeHRlbmRlZC1CLCAwMTgw4oCTMDI0RlxuLy8gSVBBIEV4dGVuc2lvbnMsIDAyNTDigJMwMkFGXG4vLyBTcGFjaW5nIE1vZGlmaWVyIExldHRlcnMsIDAyQjDigJMwMkZGXG4vLyAgLSBVKzAyQzcgIMuHICYjNzExOyAgQ2Fyb25cbi8vICAtIFUrMDJEOCAgy5ggJiM3Mjg7ICBCcmV2ZVxuLy8gIC0gVSswMkQ5ICDLmSAmIzcyOTsgIERvdCBBYm92ZVxuLy8gIC0gVSswMkRBICDLmiAmIzczMDsgIFJpbmcgQWJvdmVcbi8vICAtIFUrMDJEQiAgy5sgJiM3MzE7ICBPZ29uZWtcbi8vICAtIFUrMDJEQyAgy5wgJiM3MzI7ICBTbWFsbCBUaWxkZVxuLy8gIC0gVSswMkREICDLnSAmIzczMzsgIERvdWJsZSBBY3V0ZSBBY2NlbnRcbi8vIExhdGluIEV4dGVuZGVkIEFkZGl0aW9uYWwsIDFFMDDigJMxRUZGXG5jb25zdCBleHRlbmRlZFdvcmRDaGFycyA9IC9eW2EtekEtWlxcdXtDMH0tXFx1e0ZGfVxcdXtEOH0tXFx1e0Y2fVxcdXtGOH0tXFx1ezJDNn1cXHV7MkM4fS1cXHV7MkQ3fVxcdXsyREV9LVxcdXsyRkZ9XFx1ezFFMDB9LVxcdXsxRUZGfV0rJC91O1xuXG5jb25zdCByZVdoaXRlc3BhY2UgPSAvXFxTLztcblxuZXhwb3J0IGNvbnN0IHdvcmREaWZmID0gbmV3IERpZmYoKTtcbndvcmREaWZmLmVxdWFscyA9IGZ1bmN0aW9uKGxlZnQsIHJpZ2h0KSB7XG4gIGlmICh0aGlzLm9wdGlvbnMuaWdub3JlQ2FzZSkge1xuICAgIGxlZnQgPSBsZWZ0LnRvTG93ZXJDYXNlKCk7XG4gICAgcmlnaHQgPSByaWdodC50b0xvd2VyQ2FzZSgpO1xuICB9XG4gIHJldHVybiBsZWZ0ID09PSByaWdodCB8fCAodGhpcy5vcHRpb25zLmlnbm9yZVdoaXRlc3BhY2UgJiYgIXJlV2hpdGVzcGFjZS50ZXN0KGxlZnQpICYmICFyZVdoaXRlc3BhY2UudGVzdChyaWdodCkpO1xufTtcbndvcmREaWZmLnRva2VuaXplID0gZnVuY3Rpb24odmFsdWUpIHtcbiAgbGV0IHRva2VucyA9IHZhbHVlLnNwbGl0KC8oXFxzK3xbKClbXFxde30nXCJdfFxcYikvKTtcblxuICAvLyBKb2luIHRoZSBib3VuZGFyeSBzcGxpdHMgdGhhdCB3ZSBkbyBub3QgY29uc2lkZXIgdG8gYmUgYm91bmRhcmllcy4gVGhpcyBpcyBwcmltYXJpbHkgdGhlIGV4dGVuZGVkIExhdGluIGNoYXJhY3RlciBzZXQuXG4gIGZvciAobGV0IGkgPSAwOyBpIDwgdG9rZW5zLmxlbmd0aCAtIDE7IGkrKykge1xuICAgIC8vIElmIHdlIGhhdmUgYW4gZW1wdHkgc3RyaW5nIGluIHRoZSBuZXh0IGZpZWxkIGFuZCB3ZSBoYXZlIG9ubHkgd29yZCBjaGFycyBiZWZvcmUgYW5kIGFmdGVyLCBtZXJnZVxuICAgIGlmICghdG9rZW5zW2kgKyAxXSAmJiB0b2tlbnNbaSArIDJdXG4gICAgICAgICAgJiYgZXh0ZW5kZWRXb3JkQ2hhcnMudGVzdCh0b2tlbnNbaV0pXG4gICAgICAgICAgJiYgZXh0ZW5kZWRXb3JkQ2hhcnMudGVzdCh0b2tlbnNbaSArIDJdKSkge1xuICAgICAgdG9rZW5zW2ldICs9IHRva2Vuc1tpICsgMl07XG4gICAgICB0b2tlbnMuc3BsaWNlKGkgKyAxLCAyKTtcbiAgICAgIGktLTtcbiAgICB9XG4gIH1cblxuICByZXR1cm4gdG9rZW5zO1xufTtcblxuZXhwb3J0IGZ1bmN0aW9uIGRpZmZXb3JkcyhvbGRTdHIsIG5ld1N0ciwgb3B0aW9ucykge1xuICBvcHRpb25zID0gZ2VuZXJhdGVPcHRpb25zKG9wdGlvbnMsIHtpZ25vcmVXaGl0ZXNwYWNlOiB0cnVlfSk7XG4gIHJldHVybiB3b3JkRGlmZi5kaWZmKG9sZFN0ciwgbmV3U3RyLCBvcHRpb25zKTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGRpZmZXb3Jkc1dpdGhTcGFjZShvbGRTdHIsIG5ld1N0ciwgb3B0aW9ucykge1xuICByZXR1cm4gd29yZERpZmYuZGlmZihvbGRTdHIsIG5ld1N0ciwgb3B0aW9ucyk7XG59XG4iXX0= diff --git a/node_modules/diff/lib/index.es6.js b/node_modules/diff/lib/index.es6.js deleted file mode 100644 index 6dd2a6f..0000000 --- a/node_modules/diff/lib/index.es6.js +++ /dev/null @@ -1,1519 +0,0 @@ -function Diff() {} -Diff.prototype = { - diff: function diff(oldString, newString) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var callback = options.callback; - - if (typeof options === 'function') { - callback = options; - options = {}; - } - - this.options = options; - var self = this; - - function done(value) { - if (callback) { - setTimeout(function () { - callback(undefined, value); - }, 0); - return true; - } else { - return value; - } - } // Allow subclasses to massage the input prior to running - - - oldString = this.castInput(oldString); - newString = this.castInput(newString); - oldString = this.removeEmpty(this.tokenize(oldString)); - newString = this.removeEmpty(this.tokenize(newString)); - var newLen = newString.length, - oldLen = oldString.length; - var editLength = 1; - var maxEditLength = newLen + oldLen; - var bestPath = [{ - newPos: -1, - components: [] - }]; // Seed editLength = 0, i.e. the content starts with the same values - - var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); - - if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { - // Identity per the equality and tokenizer - return done([{ - value: this.join(newString), - count: newString.length - }]); - } // Main worker method. checks all permutations of a given edit length for acceptance. - - - function execEditLength() { - for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { - var basePath = void 0; - - var addPath = bestPath[diagonalPath - 1], - removePath = bestPath[diagonalPath + 1], - _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; - - if (addPath) { - // No one else is going to attempt to use this value, clear it - bestPath[diagonalPath - 1] = undefined; - } - - var canAdd = addPath && addPath.newPos + 1 < newLen, - canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen; - - if (!canAdd && !canRemove) { - // If this path is a terminal then prune - bestPath[diagonalPath] = undefined; - continue; - } // Select the diagonal that we want to branch from. We select the prior - // path whose position in the new string is the farthest from the origin - // and does not pass the bounds of the diff graph - - - if (!canAdd || canRemove && addPath.newPos < removePath.newPos) { - basePath = clonePath(removePath); - self.pushComponent(basePath.components, undefined, true); - } else { - basePath = addPath; // No need to clone, we've pulled it from the list - - basePath.newPos++; - self.pushComponent(basePath.components, true, undefined); - } - - _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); // If we have hit the end of both strings, then we are done - - if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) { - return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken)); - } else { - // Otherwise track this path as a potential candidate and continue. - bestPath[diagonalPath] = basePath; - } - } - - editLength++; - } // Performs the length of edit iteration. Is a bit fugly as this has to support the - // sync and async mode which is never fun. Loops over execEditLength until a value - // is produced. - - - if (callback) { - (function exec() { - setTimeout(function () { - // This should not happen, but we want to be safe. - - /* istanbul ignore next */ - if (editLength > maxEditLength) { - return callback(); - } - - if (!execEditLength()) { - exec(); - } - }, 0); - })(); - } else { - while (editLength <= maxEditLength) { - var ret = execEditLength(); - - if (ret) { - return ret; - } - } - } - }, - pushComponent: function pushComponent(components, added, removed) { - var last = components[components.length - 1]; - - if (last && last.added === added && last.removed === removed) { - // We need to clone here as the component clone operation is just - // as shallow array clone - components[components.length - 1] = { - count: last.count + 1, - added: added, - removed: removed - }; - } else { - components.push({ - count: 1, - added: added, - removed: removed - }); - } - }, - extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) { - var newLen = newString.length, - oldLen = oldString.length, - newPos = basePath.newPos, - oldPos = newPos - diagonalPath, - commonCount = 0; - - while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) { - newPos++; - oldPos++; - commonCount++; - } - - if (commonCount) { - basePath.components.push({ - count: commonCount - }); - } - - basePath.newPos = newPos; - return oldPos; - }, - equals: function equals(left, right) { - if (this.options.comparator) { - return this.options.comparator(left, right); - } else { - return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase(); - } - }, - removeEmpty: function removeEmpty(array) { - var ret = []; - - for (var i = 0; i < array.length; i++) { - if (array[i]) { - ret.push(array[i]); - } - } - - return ret; - }, - castInput: function castInput(value) { - return value; - }, - tokenize: function tokenize(value) { - return value.split(''); - }, - join: function join(chars) { - return chars.join(''); - } -}; - -function buildValues(diff, components, newString, oldString, useLongestToken) { - var componentPos = 0, - componentLen = components.length, - newPos = 0, - oldPos = 0; - - for (; componentPos < componentLen; componentPos++) { - var component = components[componentPos]; - - if (!component.removed) { - if (!component.added && useLongestToken) { - var value = newString.slice(newPos, newPos + component.count); - value = value.map(function (value, i) { - var oldValue = oldString[oldPos + i]; - return oldValue.length > value.length ? oldValue : value; - }); - component.value = diff.join(value); - } else { - component.value = diff.join(newString.slice(newPos, newPos + component.count)); - } - - newPos += component.count; // Common case - - if (!component.added) { - oldPos += component.count; - } - } else { - component.value = diff.join(oldString.slice(oldPos, oldPos + component.count)); - oldPos += component.count; // Reverse add and remove so removes are output first to match common convention - // The diffing algorithm is tied to add then remove output and this is the simplest - // route to get the desired output with minimal overhead. - - if (componentPos && components[componentPos - 1].added) { - var tmp = components[componentPos - 1]; - components[componentPos - 1] = components[componentPos]; - components[componentPos] = tmp; - } - } - } // Special case handle for when one terminal is ignored (i.e. whitespace). - // For this case we merge the terminal into the prior string and drop the change. - // This is only available for string mode. - - - var lastComponent = components[componentLen - 1]; - - if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) { - components[componentLen - 2].value += lastComponent.value; - components.pop(); - } - - return components; -} - -function clonePath(path) { - return { - newPos: path.newPos, - components: path.components.slice(0) - }; -} - -var characterDiff = new Diff(); -function diffChars(oldStr, newStr, options) { - return characterDiff.diff(oldStr, newStr, options); -} - -function generateOptions(options, defaults) { - if (typeof options === 'function') { - defaults.callback = options; - } else if (options) { - for (var name in options) { - /* istanbul ignore else */ - if (options.hasOwnProperty(name)) { - defaults[name] = options[name]; - } - } - } - - return defaults; -} - -// -// Ranges and exceptions: -// Latin-1 Supplement, 0080–00FF -// - U+00D7 × Multiplication sign -// - U+00F7 ÷ Division sign -// Latin Extended-A, 0100–017F -// Latin Extended-B, 0180–024F -// IPA Extensions, 0250–02AF -// Spacing Modifier Letters, 02B0–02FF -// - U+02C7 ˇ ˇ Caron -// - U+02D8 ˘ ˘ Breve -// - U+02D9 ˙ ˙ Dot Above -// - U+02DA ˚ ˚ Ring Above -// - U+02DB ˛ ˛ Ogonek -// - U+02DC ˜ ˜ Small Tilde -// - U+02DD ˝ ˝ Double Acute Accent -// Latin Extended Additional, 1E00–1EFF - -var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/; -var reWhitespace = /\S/; -var wordDiff = new Diff(); - -wordDiff.equals = function (left, right) { - if (this.options.ignoreCase) { - left = left.toLowerCase(); - right = right.toLowerCase(); - } - - return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right); -}; - -wordDiff.tokenize = function (value) { - var tokens = value.split(/(\s+|[()[\]{}'"]|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set. - - for (var i = 0; i < tokens.length - 1; i++) { - // If we have an empty string in the next field and we have only word chars before and after, merge - if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) { - tokens[i] += tokens[i + 2]; - tokens.splice(i + 1, 2); - i--; - } - } - - return tokens; -}; - -function diffWords(oldStr, newStr, options) { - options = generateOptions(options, { - ignoreWhitespace: true - }); - return wordDiff.diff(oldStr, newStr, options); -} -function diffWordsWithSpace(oldStr, newStr, options) { - return wordDiff.diff(oldStr, newStr, options); -} - -var lineDiff = new Diff(); - -lineDiff.tokenize = function (value) { - var retLines = [], - linesAndNewlines = value.split(/(\n|\r\n)/); // Ignore the final empty token that occurs if the string ends with a new line - - if (!linesAndNewlines[linesAndNewlines.length - 1]) { - linesAndNewlines.pop(); - } // Merge the content and line separators into single tokens - - - for (var i = 0; i < linesAndNewlines.length; i++) { - var line = linesAndNewlines[i]; - - if (i % 2 && !this.options.newlineIsToken) { - retLines[retLines.length - 1] += line; - } else { - if (this.options.ignoreWhitespace) { - line = line.trim(); - } - - retLines.push(line); - } - } - - return retLines; -}; - -function diffLines(oldStr, newStr, callback) { - return lineDiff.diff(oldStr, newStr, callback); -} -function diffTrimmedLines(oldStr, newStr, callback) { - var options = generateOptions(callback, { - ignoreWhitespace: true - }); - return lineDiff.diff(oldStr, newStr, options); -} - -var sentenceDiff = new Diff(); - -sentenceDiff.tokenize = function (value) { - return value.split(/(\S.+?[.!?])(?=\s+|$)/); -}; - -function diffSentences(oldStr, newStr, callback) { - return sentenceDiff.diff(oldStr, newStr, callback); -} - -var cssDiff = new Diff(); - -cssDiff.tokenize = function (value) { - return value.split(/([{}:;,]|\s+)/); -}; - -function diffCss(oldStr, newStr, callback) { - return cssDiff.diff(oldStr, newStr, callback); -} - -function _typeof(obj) { - if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { - _typeof = function (obj) { - return typeof obj; - }; - } else { - _typeof = function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; - } - - return _typeof(obj); -} - -function _toConsumableArray(arr) { - return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); -} - -function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) { - for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; - - return arr2; - } -} - -function _iterableToArray(iter) { - if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); -} - -function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance"); -} - -var objectPrototypeToString = Object.prototype.toString; -var jsonDiff = new Diff(); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a -// dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output: - -jsonDiff.useLongestToken = true; -jsonDiff.tokenize = lineDiff.tokenize; - -jsonDiff.castInput = function (value) { - var _this$options = this.options, - undefinedReplacement = _this$options.undefinedReplacement, - _this$options$stringi = _this$options.stringifyReplacer, - stringifyReplacer = _this$options$stringi === void 0 ? function (k, v) { - return typeof v === 'undefined' ? undefinedReplacement : v; - } : _this$options$stringi; - return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' '); -}; - -jsonDiff.equals = function (left, right) { - return Diff.prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1')); -}; - -function diffJson(oldObj, newObj, options) { - return jsonDiff.diff(oldObj, newObj, options); -} // This function handles the presence of circular references by bailing out when encountering an -// object that is already on the "stack" of items being processed. Accepts an optional replacer - -function canonicalize(obj, stack, replacementStack, replacer, key) { - stack = stack || []; - replacementStack = replacementStack || []; - - if (replacer) { - obj = replacer(key, obj); - } - - var i; - - for (i = 0; i < stack.length; i += 1) { - if (stack[i] === obj) { - return replacementStack[i]; - } - } - - var canonicalizedObj; - - if ('[object Array]' === objectPrototypeToString.call(obj)) { - stack.push(obj); - canonicalizedObj = new Array(obj.length); - replacementStack.push(canonicalizedObj); - - for (i = 0; i < obj.length; i += 1) { - canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key); - } - - stack.pop(); - replacementStack.pop(); - return canonicalizedObj; - } - - if (obj && obj.toJSON) { - obj = obj.toJSON(); - } - - if (_typeof(obj) === 'object' && obj !== null) { - stack.push(obj); - canonicalizedObj = {}; - replacementStack.push(canonicalizedObj); - - var sortedKeys = [], - _key; - - for (_key in obj) { - /* istanbul ignore else */ - if (obj.hasOwnProperty(_key)) { - sortedKeys.push(_key); - } - } - - sortedKeys.sort(); - - for (i = 0; i < sortedKeys.length; i += 1) { - _key = sortedKeys[i]; - canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key); - } - - stack.pop(); - replacementStack.pop(); - } else { - canonicalizedObj = obj; - } - - return canonicalizedObj; -} - -var arrayDiff = new Diff(); - -arrayDiff.tokenize = function (value) { - return value.slice(); -}; - -arrayDiff.join = arrayDiff.removeEmpty = function (value) { - return value; -}; - -function diffArrays(oldArr, newArr, callback) { - return arrayDiff.diff(oldArr, newArr, callback); -} - -function parsePatch(uniDiff) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var diffstr = uniDiff.split(/\r\n|[\n\v\f\r\x85]/), - delimiters = uniDiff.match(/\r\n|[\n\v\f\r\x85]/g) || [], - list = [], - i = 0; - - function parseIndex() { - var index = {}; - list.push(index); // Parse diff metadata - - while (i < diffstr.length) { - var line = diffstr[i]; // File header found, end parsing diff metadata - - if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) { - break; - } // Diff index - - - var headerMatch = /^(?:Index:|diff(?: -r \w+)+)\s+/.exec(line); - - if (headerMatch) { - index.index = line.substring(headerMatch[0].length).trim(); - } - - i++; - } // Parse file headers if they are defined. Unified diff requires them, but - // there's no technical issues to have an isolated hunk without file header - - - parseFileHeader(index); - parseFileHeader(index); // Parse hunks - - index.hunks = []; - - while (i < diffstr.length) { - var _line = diffstr[i]; - - if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)) { - break; - } else if (/^@@/.test(_line)) { - index.hunks.push(parseHunk()); - } else if (_line && options.strict) { - // Ignore unexpected content unless in strict mode - throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line)); - } else { - i++; - } - } - } // Parses the --- and +++ headers, if none are found, no lines - // are consumed. - - - function parseFileHeader(index) { - var fileHeaderMatch = /^(---|\+\+\+)\s+/.exec(diffstr[i]); - - if (fileHeaderMatch) { - var keyPrefix = fileHeaderMatch[1] === '---' ? 'old' : 'new'; - var data = diffstr[i].substring(3).trim().split('\t', 2); - var fileName = data[0].replace(/\\\\/g, '\\'); - - if (fileName.startsWith('"') && fileName.endsWith('"')) { - fileName = fileName.substr(1, fileName.length - 2); - } - - index[keyPrefix + 'FileName'] = fileName; - index[keyPrefix + 'Header'] = (data[1] || '').trim(); - i++; - } - } // Parses a hunk - // This assumes that we are at the start of a hunk. - - - function parseHunk() { - var chunkHeaderIndex = i, - chunkHeaderLine = diffstr[i++], - chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/); - var hunk = { - oldStart: +chunkHeader[1], - oldLines: +chunkHeader[2] || 1, - newStart: +chunkHeader[3], - newLines: +chunkHeader[4] || 1, - lines: [], - linedelimiters: [] - }; - var addCount = 0, - removeCount = 0; - - for (; i < diffstr.length; i++) { - // Lines starting with '---' could be mistaken for the "remove line" operation - // But they could be the header for the next file. Therefore prune such cases out. - if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) { - break; - } - - var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0]; - - if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') { - hunk.lines.push(diffstr[i]); - hunk.linedelimiters.push(delimiters[i] || '\n'); - - if (operation === '+') { - addCount++; - } else if (operation === '-') { - removeCount++; - } else if (operation === ' ') { - addCount++; - removeCount++; - } - } else { - break; - } - } // Handle the empty block count case - - - if (!addCount && hunk.newLines === 1) { - hunk.newLines = 0; - } - - if (!removeCount && hunk.oldLines === 1) { - hunk.oldLines = 0; - } // Perform optional sanity checking - - - if (options.strict) { - if (addCount !== hunk.newLines) { - throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); - } - - if (removeCount !== hunk.oldLines) { - throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); - } - } - - return hunk; - } - - while (i < diffstr.length) { - parseIndex(); - } - - return list; -} - -// Iterator that traverses in the range of [min, max], stepping -// by distance from a given start position. I.e. for [0, 4], with -// start of 2, this will iterate 2, 3, 1, 4, 0. -function distanceIterator (start, minLine, maxLine) { - var wantForward = true, - backwardExhausted = false, - forwardExhausted = false, - localOffset = 1; - return function iterator() { - if (wantForward && !forwardExhausted) { - if (backwardExhausted) { - localOffset++; - } else { - wantForward = false; - } // Check if trying to fit beyond text length, and if not, check it fits - // after offset location (or desired location on first iteration) - - - if (start + localOffset <= maxLine) { - return localOffset; - } - - forwardExhausted = true; - } - - if (!backwardExhausted) { - if (!forwardExhausted) { - wantForward = true; - } // Check if trying to fit before text beginning, and if not, check it fits - // before offset location - - - if (minLine <= start - localOffset) { - return -localOffset++; - } - - backwardExhausted = true; - return iterator(); - } // We tried to fit hunk before text beginning and beyond text length, then - // hunk can't fit on the text. Return undefined - - }; -} - -function applyPatch(source, uniDiff) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - if (typeof uniDiff === 'string') { - uniDiff = parsePatch(uniDiff); - } - - if (Array.isArray(uniDiff)) { - if (uniDiff.length > 1) { - throw new Error('applyPatch only works with a single input.'); - } - - uniDiff = uniDiff[0]; - } // Apply the diff to the input - - - var lines = source.split(/\r\n|[\n\v\f\r\x85]/), - delimiters = source.match(/\r\n|[\n\v\f\r\x85]/g) || [], - hunks = uniDiff.hunks, - compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) { - return line === patchContent; - }, - errorCount = 0, - fuzzFactor = options.fuzzFactor || 0, - minLine = 0, - offset = 0, - removeEOFNL, - addEOFNL; - /** - * Checks if the hunk exactly fits on the provided location - */ - - - function hunkFits(hunk, toPos) { - for (var j = 0; j < hunk.lines.length; j++) { - var line = hunk.lines[j], - operation = line.length > 0 ? line[0] : ' ', - content = line.length > 0 ? line.substr(1) : line; - - if (operation === ' ' || operation === '-') { - // Context sanity check - if (!compareLine(toPos + 1, lines[toPos], operation, content)) { - errorCount++; - - if (errorCount > fuzzFactor) { - return false; - } - } - - toPos++; - } - } - - return true; - } // Search best fit offsets for each hunk based on the previous ones - - - for (var i = 0; i < hunks.length; i++) { - var hunk = hunks[i], - maxLine = lines.length - hunk.oldLines, - localOffset = 0, - toPos = offset + hunk.oldStart - 1; - var iterator = distanceIterator(toPos, minLine, maxLine); - - for (; localOffset !== undefined; localOffset = iterator()) { - if (hunkFits(hunk, toPos + localOffset)) { - hunk.offset = offset += localOffset; - break; - } - } - - if (localOffset === undefined) { - return false; - } // Set lower text limit to end of the current hunk, so next ones don't try - // to fit over already patched text - - - minLine = hunk.offset + hunk.oldStart + hunk.oldLines; - } // Apply patch hunks - - - var diffOffset = 0; - - for (var _i = 0; _i < hunks.length; _i++) { - var _hunk = hunks[_i], - _toPos = _hunk.oldStart + _hunk.offset + diffOffset - 1; - - diffOffset += _hunk.newLines - _hunk.oldLines; - - if (_toPos < 0) { - // Creating a new file - _toPos = 0; - } - - for (var j = 0; j < _hunk.lines.length; j++) { - var line = _hunk.lines[j], - operation = line.length > 0 ? line[0] : ' ', - content = line.length > 0 ? line.substr(1) : line, - delimiter = _hunk.linedelimiters[j]; - - if (operation === ' ') { - _toPos++; - } else if (operation === '-') { - lines.splice(_toPos, 1); - delimiters.splice(_toPos, 1); - /* istanbul ignore else */ - } else if (operation === '+') { - lines.splice(_toPos, 0, content); - delimiters.splice(_toPos, 0, delimiter); - _toPos++; - } else if (operation === '\\') { - var previousOperation = _hunk.lines[j - 1] ? _hunk.lines[j - 1][0] : null; - - if (previousOperation === '+') { - removeEOFNL = true; - } else if (previousOperation === '-') { - addEOFNL = true; - } - } - } - } // Handle EOFNL insertion/removal - - - if (removeEOFNL) { - while (!lines[lines.length - 1]) { - lines.pop(); - delimiters.pop(); - } - } else if (addEOFNL) { - lines.push(''); - delimiters.push('\n'); - } - - for (var _k = 0; _k < lines.length - 1; _k++) { - lines[_k] = lines[_k] + delimiters[_k]; - } - - return lines.join(''); -} // Wrapper that supports multiple file patches via callbacks. - -function applyPatches(uniDiff, options) { - if (typeof uniDiff === 'string') { - uniDiff = parsePatch(uniDiff); - } - - var currentIndex = 0; - - function processIndex() { - var index = uniDiff[currentIndex++]; - - if (!index) { - return options.complete(); - } - - options.loadFile(index, function (err, data) { - if (err) { - return options.complete(err); - } - - var updatedContent = applyPatch(data, index, options); - options.patched(index, updatedContent, function (err) { - if (err) { - return options.complete(err); - } - - processIndex(); - }); - }); - } - - processIndex(); -} - -function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - if (!options) { - options = {}; - } - - if (typeof options.context === 'undefined') { - options.context = 4; - } - - var diff = diffLines(oldStr, newStr, options); - diff.push({ - value: '', - lines: [] - }); // Append an empty value to make cleanup easier - - function contextLines(lines) { - return lines.map(function (entry) { - return ' ' + entry; - }); - } - - var hunks = []; - var oldRangeStart = 0, - newRangeStart = 0, - curRange = [], - oldLine = 1, - newLine = 1; - - var _loop = function _loop(i) { - var current = diff[i], - lines = current.lines || current.value.replace(/\n$/, '').split('\n'); - current.lines = lines; - - if (current.added || current.removed) { - var _curRange; - - // If we have previous context, start with that - if (!oldRangeStart) { - var prev = diff[i - 1]; - oldRangeStart = oldLine; - newRangeStart = newLine; - - if (prev) { - curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : []; - oldRangeStart -= curRange.length; - newRangeStart -= curRange.length; - } - } // Output our changes - - - (_curRange = curRange).push.apply(_curRange, _toConsumableArray(lines.map(function (entry) { - return (current.added ? '+' : '-') + entry; - }))); // Track the updated file position - - - if (current.added) { - newLine += lines.length; - } else { - oldLine += lines.length; - } - } else { - // Identical context lines. Track line changes - if (oldRangeStart) { - // Close out any changes that have been output (or join overlapping) - if (lines.length <= options.context * 2 && i < diff.length - 2) { - var _curRange2; - - // Overlapping - (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray(contextLines(lines))); - } else { - var _curRange3; - - // end the range and output - var contextSize = Math.min(lines.length, options.context); - - (_curRange3 = curRange).push.apply(_curRange3, _toConsumableArray(contextLines(lines.slice(0, contextSize)))); - - var hunk = { - oldStart: oldRangeStart, - oldLines: oldLine - oldRangeStart + contextSize, - newStart: newRangeStart, - newLines: newLine - newRangeStart + contextSize, - lines: curRange - }; - - if (i >= diff.length - 2 && lines.length <= options.context) { - // EOF is inside this hunk - var oldEOFNewline = /\n$/.test(oldStr); - var newEOFNewline = /\n$/.test(newStr); - var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines; - - if (!oldEOFNewline && noNlBeforeAdds) { - // special case: old has no eol and no trailing context; no-nl can end up before adds - curRange.splice(hunk.oldLines, 0, '\\ No newline at end of file'); - } - - if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) { - curRange.push('\\ No newline at end of file'); - } - } - - hunks.push(hunk); - oldRangeStart = 0; - newRangeStart = 0; - curRange = []; - } - } - - oldLine += lines.length; - newLine += lines.length; - } - }; - - for (var i = 0; i < diff.length; i++) { - _loop(i); - } - - return { - oldFileName: oldFileName, - newFileName: newFileName, - oldHeader: oldHeader, - newHeader: newHeader, - hunks: hunks - }; -} -function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - var diff = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options); - var ret = []; - - if (oldFileName == newFileName) { - ret.push('Index: ' + oldFileName); - } - - ret.push('==================================================================='); - ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader)); - ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader)); - - for (var i = 0; i < diff.hunks.length; i++) { - var hunk = diff.hunks[i]; - ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@'); - ret.push.apply(ret, hunk.lines); - } - - return ret.join('\n') + '\n'; -} -function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) { - return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options); -} - -function arrayEqual(a, b) { - if (a.length !== b.length) { - return false; - } - - return arrayStartsWith(a, b); -} -function arrayStartsWith(array, start) { - if (start.length > array.length) { - return false; - } - - for (var i = 0; i < start.length; i++) { - if (start[i] !== array[i]) { - return false; - } - } - - return true; -} - -function calcLineCount(hunk) { - var _calcOldNewLineCount = calcOldNewLineCount(hunk.lines), - oldLines = _calcOldNewLineCount.oldLines, - newLines = _calcOldNewLineCount.newLines; - - if (oldLines !== undefined) { - hunk.oldLines = oldLines; - } else { - delete hunk.oldLines; - } - - if (newLines !== undefined) { - hunk.newLines = newLines; - } else { - delete hunk.newLines; - } -} -function merge(mine, theirs, base) { - mine = loadPatch(mine, base); - theirs = loadPatch(theirs, base); - var ret = {}; // For index we just let it pass through as it doesn't have any necessary meaning. - // Leaving sanity checks on this to the API consumer that may know more about the - // meaning in their own context. - - if (mine.index || theirs.index) { - ret.index = mine.index || theirs.index; - } - - if (mine.newFileName || theirs.newFileName) { - if (!fileNameChanged(mine)) { - // No header or no change in ours, use theirs (and ours if theirs does not exist) - ret.oldFileName = theirs.oldFileName || mine.oldFileName; - ret.newFileName = theirs.newFileName || mine.newFileName; - ret.oldHeader = theirs.oldHeader || mine.oldHeader; - ret.newHeader = theirs.newHeader || mine.newHeader; - } else if (!fileNameChanged(theirs)) { - // No header or no change in theirs, use ours - ret.oldFileName = mine.oldFileName; - ret.newFileName = mine.newFileName; - ret.oldHeader = mine.oldHeader; - ret.newHeader = mine.newHeader; - } else { - // Both changed... figure it out - ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName); - ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName); - ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader); - ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader); - } - } - - ret.hunks = []; - var mineIndex = 0, - theirsIndex = 0, - mineOffset = 0, - theirsOffset = 0; - - while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) { - var mineCurrent = mine.hunks[mineIndex] || { - oldStart: Infinity - }, - theirsCurrent = theirs.hunks[theirsIndex] || { - oldStart: Infinity - }; - - if (hunkBefore(mineCurrent, theirsCurrent)) { - // This patch does not overlap with any of the others, yay. - ret.hunks.push(cloneHunk(mineCurrent, mineOffset)); - mineIndex++; - theirsOffset += mineCurrent.newLines - mineCurrent.oldLines; - } else if (hunkBefore(theirsCurrent, mineCurrent)) { - // This patch does not overlap with any of the others, yay. - ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset)); - theirsIndex++; - mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines; - } else { - // Overlap, merge as best we can - var mergedHunk = { - oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart), - oldLines: 0, - newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset), - newLines: 0, - lines: [] - }; - mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines); - theirsIndex++; - mineIndex++; - ret.hunks.push(mergedHunk); - } - } - - return ret; -} - -function loadPatch(param, base) { - if (typeof param === 'string') { - if (/^@@/m.test(param) || /^Index:/m.test(param)) { - return parsePatch(param)[0]; - } - - if (!base) { - throw new Error('Must provide a base reference or pass in a patch'); - } - - return structuredPatch(undefined, undefined, base, param); - } - - return param; -} - -function fileNameChanged(patch) { - return patch.newFileName && patch.newFileName !== patch.oldFileName; -} - -function selectField(index, mine, theirs) { - if (mine === theirs) { - return mine; - } else { - index.conflict = true; - return { - mine: mine, - theirs: theirs - }; - } -} - -function hunkBefore(test, check) { - return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart; -} - -function cloneHunk(hunk, offset) { - return { - oldStart: hunk.oldStart, - oldLines: hunk.oldLines, - newStart: hunk.newStart + offset, - newLines: hunk.newLines, - lines: hunk.lines - }; -} - -function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) { - // This will generally result in a conflicted hunk, but there are cases where the context - // is the only overlap where we can successfully merge the content here. - var mine = { - offset: mineOffset, - lines: mineLines, - index: 0 - }, - their = { - offset: theirOffset, - lines: theirLines, - index: 0 - }; // Handle any leading content - - insertLeading(hunk, mine, their); - insertLeading(hunk, their, mine); // Now in the overlap content. Scan through and select the best changes from each. - - while (mine.index < mine.lines.length && their.index < their.lines.length) { - var mineCurrent = mine.lines[mine.index], - theirCurrent = their.lines[their.index]; - - if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) { - // Both modified ... - mutualChange(hunk, mine, their); - } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') { - var _hunk$lines; - - // Mine inserted - (_hunk$lines = hunk.lines).push.apply(_hunk$lines, _toConsumableArray(collectChange(mine))); - } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') { - var _hunk$lines2; - - // Theirs inserted - (_hunk$lines2 = hunk.lines).push.apply(_hunk$lines2, _toConsumableArray(collectChange(their))); - } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') { - // Mine removed or edited - removal(hunk, mine, their); - } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') { - // Their removed or edited - removal(hunk, their, mine, true); - } else if (mineCurrent === theirCurrent) { - // Context identity - hunk.lines.push(mineCurrent); - mine.index++; - their.index++; - } else { - // Context mismatch - conflict(hunk, collectChange(mine), collectChange(their)); - } - } // Now push anything that may be remaining - - - insertTrailing(hunk, mine); - insertTrailing(hunk, their); - calcLineCount(hunk); -} - -function mutualChange(hunk, mine, their) { - var myChanges = collectChange(mine), - theirChanges = collectChange(their); - - if (allRemoves(myChanges) && allRemoves(theirChanges)) { - // Special case for remove changes that are supersets of one another - if (arrayStartsWith(myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) { - var _hunk$lines3; - - (_hunk$lines3 = hunk.lines).push.apply(_hunk$lines3, _toConsumableArray(myChanges)); - - return; - } else if (arrayStartsWith(theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) { - var _hunk$lines4; - - (_hunk$lines4 = hunk.lines).push.apply(_hunk$lines4, _toConsumableArray(theirChanges)); - - return; - } - } else if (arrayEqual(myChanges, theirChanges)) { - var _hunk$lines5; - - (_hunk$lines5 = hunk.lines).push.apply(_hunk$lines5, _toConsumableArray(myChanges)); - - return; - } - - conflict(hunk, myChanges, theirChanges); -} - -function removal(hunk, mine, their, swap) { - var myChanges = collectChange(mine), - theirChanges = collectContext(their, myChanges); - - if (theirChanges.merged) { - var _hunk$lines6; - - (_hunk$lines6 = hunk.lines).push.apply(_hunk$lines6, _toConsumableArray(theirChanges.merged)); - } else { - conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges); - } -} - -function conflict(hunk, mine, their) { - hunk.conflict = true; - hunk.lines.push({ - conflict: true, - mine: mine, - theirs: their - }); -} - -function insertLeading(hunk, insert, their) { - while (insert.offset < their.offset && insert.index < insert.lines.length) { - var line = insert.lines[insert.index++]; - hunk.lines.push(line); - insert.offset++; - } -} - -function insertTrailing(hunk, insert) { - while (insert.index < insert.lines.length) { - var line = insert.lines[insert.index++]; - hunk.lines.push(line); - } -} - -function collectChange(state) { - var ret = [], - operation = state.lines[state.index][0]; - - while (state.index < state.lines.length) { - var line = state.lines[state.index]; // Group additions that are immediately after subtractions and treat them as one "atomic" modify change. - - if (operation === '-' && line[0] === '+') { - operation = '+'; - } - - if (operation === line[0]) { - ret.push(line); - state.index++; - } else { - break; - } - } - - return ret; -} - -function collectContext(state, matchChanges) { - var changes = [], - merged = [], - matchIndex = 0, - contextChanges = false, - conflicted = false; - - while (matchIndex < matchChanges.length && state.index < state.lines.length) { - var change = state.lines[state.index], - match = matchChanges[matchIndex]; // Once we've hit our add, then we are done - - if (match[0] === '+') { - break; - } - - contextChanges = contextChanges || change[0] !== ' '; - merged.push(match); - matchIndex++; // Consume any additions in the other block as a conflict to attempt - // to pull in the remaining context after this - - if (change[0] === '+') { - conflicted = true; - - while (change[0] === '+') { - changes.push(change); - change = state.lines[++state.index]; - } - } - - if (match.substr(1) === change.substr(1)) { - changes.push(change); - state.index++; - } else { - conflicted = true; - } - } - - if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) { - conflicted = true; - } - - if (conflicted) { - return changes; - } - - while (matchIndex < matchChanges.length) { - merged.push(matchChanges[matchIndex++]); - } - - return { - merged: merged, - changes: changes - }; -} - -function allRemoves(changes) { - return changes.reduce(function (prev, change) { - return prev && change[0] === '-'; - }, true); -} - -function skipRemoveSuperset(state, removeChanges, delta) { - for (var i = 0; i < delta; i++) { - var changeContent = removeChanges[removeChanges.length - delta + i].substr(1); - - if (state.lines[state.index + i] !== ' ' + changeContent) { - return false; - } - } - - state.index += delta; - return true; -} - -function calcOldNewLineCount(lines) { - var oldLines = 0; - var newLines = 0; - lines.forEach(function (line) { - if (typeof line !== 'string') { - var myCount = calcOldNewLineCount(line.mine); - var theirCount = calcOldNewLineCount(line.theirs); - - if (oldLines !== undefined) { - if (myCount.oldLines === theirCount.oldLines) { - oldLines += myCount.oldLines; - } else { - oldLines = undefined; - } - } - - if (newLines !== undefined) { - if (myCount.newLines === theirCount.newLines) { - newLines += myCount.newLines; - } else { - newLines = undefined; - } - } - } else { - if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) { - newLines++; - } - - if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) { - oldLines++; - } - } - }); - return { - oldLines: oldLines, - newLines: newLines - }; -} - -// See: http://code.google.com/p/google-diff-match-patch/wiki/API -function convertChangesToDMP(changes) { - var ret = [], - change, - operation; - - for (var i = 0; i < changes.length; i++) { - change = changes[i]; - - if (change.added) { - operation = 1; - } else if (change.removed) { - operation = -1; - } else { - operation = 0; - } - - ret.push([operation, change.value]); - } - - return ret; -} - -function convertChangesToXML(changes) { - var ret = []; - - for (var i = 0; i < changes.length; i++) { - var change = changes[i]; - - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - - ret.push(escapeHTML(change.value)); - - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - } - - return ret.join(''); -} - -function escapeHTML(s) { - var n = s; - n = n.replace(/&/g, '&'); - n = n.replace(//g, '>'); - n = n.replace(/"/g, '"'); - return n; -} - -/* See LICENSE file for terms of use */ - -export { Diff, diffChars, diffWords, diffWordsWithSpace, diffLines, diffTrimmedLines, diffSentences, diffCss, diffJson, diffArrays, structuredPatch, createTwoFilesPatch, createPatch, applyPatch, applyPatches, parsePatch, merge, convertChangesToDMP, convertChangesToXML, canonicalize }; diff --git a/node_modules/diff/lib/index.js b/node_modules/diff/lib/index.js deleted file mode 100644 index ff8ae91..0000000 --- a/node_modules/diff/lib/index.js +++ /dev/null @@ -1,216 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "Diff", { - enumerable: true, - get: function get() { - return _base.default; - } -}); -Object.defineProperty(exports, "diffChars", { - enumerable: true, - get: function get() { - return _character.diffChars; - } -}); -Object.defineProperty(exports, "diffWords", { - enumerable: true, - get: function get() { - return _word.diffWords; - } -}); -Object.defineProperty(exports, "diffWordsWithSpace", { - enumerable: true, - get: function get() { - return _word.diffWordsWithSpace; - } -}); -Object.defineProperty(exports, "diffLines", { - enumerable: true, - get: function get() { - return _line.diffLines; - } -}); -Object.defineProperty(exports, "diffTrimmedLines", { - enumerable: true, - get: function get() { - return _line.diffTrimmedLines; - } -}); -Object.defineProperty(exports, "diffSentences", { - enumerable: true, - get: function get() { - return _sentence.diffSentences; - } -}); -Object.defineProperty(exports, "diffCss", { - enumerable: true, - get: function get() { - return _css.diffCss; - } -}); -Object.defineProperty(exports, "diffJson", { - enumerable: true, - get: function get() { - return _json.diffJson; - } -}); -Object.defineProperty(exports, "canonicalize", { - enumerable: true, - get: function get() { - return _json.canonicalize; - } -}); -Object.defineProperty(exports, "diffArrays", { - enumerable: true, - get: function get() { - return _array.diffArrays; - } -}); -Object.defineProperty(exports, "applyPatch", { - enumerable: true, - get: function get() { - return _apply.applyPatch; - } -}); -Object.defineProperty(exports, "applyPatches", { - enumerable: true, - get: function get() { - return _apply.applyPatches; - } -}); -Object.defineProperty(exports, "parsePatch", { - enumerable: true, - get: function get() { - return _parse.parsePatch; - } -}); -Object.defineProperty(exports, "merge", { - enumerable: true, - get: function get() { - return _merge.merge; - } -}); -Object.defineProperty(exports, "structuredPatch", { - enumerable: true, - get: function get() { - return _create.structuredPatch; - } -}); -Object.defineProperty(exports, "createTwoFilesPatch", { - enumerable: true, - get: function get() { - return _create.createTwoFilesPatch; - } -}); -Object.defineProperty(exports, "createPatch", { - enumerable: true, - get: function get() { - return _create.createPatch; - } -}); -Object.defineProperty(exports, "convertChangesToDMP", { - enumerable: true, - get: function get() { - return _dmp.convertChangesToDMP; - } -}); -Object.defineProperty(exports, "convertChangesToXML", { - enumerable: true, - get: function get() { - return _xml.convertChangesToXML; - } -}); - -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_base = _interopRequireDefault(require("./diff/base")) -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_character = require("./diff/character") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_word = require("./diff/word") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_line = require("./diff/line") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_sentence = require("./diff/sentence") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_css = require("./diff/css") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_json = require("./diff/json") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_array = require("./diff/array") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_apply = require("./patch/apply") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_parse = require("./patch/parse") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_merge = require("./patch/merge") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_create = require("./patch/create") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_dmp = require("./convert/dmp") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_xml = require("./convert/xml") -/*istanbul ignore end*/ -; - -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/*istanbul ignore end*/ -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQWdCQTtBQUFBO0FBQUE7QUFBQTtBQUFBOztBQUNBO0FBQUE7QUFBQTtBQUFBO0FBQUE7O0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFBQTs7QUFDQTtBQUFBO0FBQUE7QUFBQTtBQUFBOztBQUNBO0FBQUE7QUFBQTtBQUFBO0FBQUE7O0FBRUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7QUFDQTtBQUFBO0FBQUE7QUFBQTtBQUFBOztBQUVBO0FBQUE7QUFBQTtBQUFBO0FBQUE7O0FBRUE7QUFBQTtBQUFBO0FBQUE7QUFBQTs7QUFDQTtBQUFBO0FBQUE7QUFBQTtBQUFBOztBQUNBO0FBQUE7QUFBQTtBQUFBO0FBQUE7O0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFBQTs7QUFFQTtBQUFBO0FBQUE7QUFBQTtBQUFBOztBQUNBO0FBQUE7QUFBQTtBQUFBO0FBQUEiLCJzb3VyY2VzQ29udGVudCI6WyIvKiBTZWUgTElDRU5TRSBmaWxlIGZvciB0ZXJtcyBvZiB1c2UgKi9cblxuLypcbiAqIFRleHQgZGlmZiBpbXBsZW1lbnRhdGlvbi5cbiAqXG4gKiBUaGlzIGxpYnJhcnkgc3VwcG9ydHMgdGhlIGZvbGxvd2luZyBBUElTOlxuICogSnNEaWZmLmRpZmZDaGFyczogQ2hhcmFjdGVyIGJ5IGNoYXJhY3RlciBkaWZmXG4gKiBKc0RpZmYuZGlmZldvcmRzOiBXb3JkIChhcyBkZWZpbmVkIGJ5IFxcYiByZWdleCkgZGlmZiB3aGljaCBpZ25vcmVzIHdoaXRlc3BhY2VcbiAqIEpzRGlmZi5kaWZmTGluZXM6IExpbmUgYmFzZWQgZGlmZlxuICpcbiAqIEpzRGlmZi5kaWZmQ3NzOiBEaWZmIHRhcmdldGVkIGF0IENTUyBjb250ZW50XG4gKlxuICogVGhlc2UgbWV0aG9kcyBhcmUgYmFzZWQgb24gdGhlIGltcGxlbWVudGF0aW9uIHByb3Bvc2VkIGluXG4gKiBcIkFuIE8oTkQpIERpZmZlcmVuY2UgQWxnb3JpdGhtIGFuZCBpdHMgVmFyaWF0aW9uc1wiIChNeWVycywgMTk4NikuXG4gKiBodHRwOi8vY2l0ZXNlZXJ4LmlzdC5wc3UuZWR1L3ZpZXdkb2Mvc3VtbWFyeT9kb2k9MTAuMS4xLjQuNjkyN1xuICovXG5pbXBvcnQgRGlmZiBmcm9tICcuL2RpZmYvYmFzZSc7XG5pbXBvcnQge2RpZmZDaGFyc30gZnJvbSAnLi9kaWZmL2NoYXJhY3Rlcic7XG5pbXBvcnQge2RpZmZXb3JkcywgZGlmZldvcmRzV2l0aFNwYWNlfSBmcm9tICcuL2RpZmYvd29yZCc7XG5pbXBvcnQge2RpZmZMaW5lcywgZGlmZlRyaW1tZWRMaW5lc30gZnJvbSAnLi9kaWZmL2xpbmUnO1xuaW1wb3J0IHtkaWZmU2VudGVuY2VzfSBmcm9tICcuL2RpZmYvc2VudGVuY2UnO1xuXG5pbXBvcnQge2RpZmZDc3N9IGZyb20gJy4vZGlmZi9jc3MnO1xuaW1wb3J0IHtkaWZmSnNvbiwgY2Fub25pY2FsaXplfSBmcm9tICcuL2RpZmYvanNvbic7XG5cbmltcG9ydCB7ZGlmZkFycmF5c30gZnJvbSAnLi9kaWZmL2FycmF5JztcblxuaW1wb3J0IHthcHBseVBhdGNoLCBhcHBseVBhdGNoZXN9IGZyb20gJy4vcGF0Y2gvYXBwbHknO1xuaW1wb3J0IHtwYXJzZVBhdGNofSBmcm9tICcuL3BhdGNoL3BhcnNlJztcbmltcG9ydCB7bWVyZ2V9IGZyb20gJy4vcGF0Y2gvbWVyZ2UnO1xuaW1wb3J0IHtzdHJ1Y3R1cmVkUGF0Y2gsIGNyZWF0ZVR3b0ZpbGVzUGF0Y2gsIGNyZWF0ZVBhdGNofSBmcm9tICcuL3BhdGNoL2NyZWF0ZSc7XG5cbmltcG9ydCB7Y29udmVydENoYW5nZXNUb0RNUH0gZnJvbSAnLi9jb252ZXJ0L2RtcCc7XG5pbXBvcnQge2NvbnZlcnRDaGFuZ2VzVG9YTUx9IGZyb20gJy4vY29udmVydC94bWwnO1xuXG5leHBvcnQge1xuICBEaWZmLFxuXG4gIGRpZmZDaGFycyxcbiAgZGlmZldvcmRzLFxuICBkaWZmV29yZHNXaXRoU3BhY2UsXG4gIGRpZmZMaW5lcyxcbiAgZGlmZlRyaW1tZWRMaW5lcyxcbiAgZGlmZlNlbnRlbmNlcyxcblxuICBkaWZmQ3NzLFxuICBkaWZmSnNvbixcblxuICBkaWZmQXJyYXlzLFxuXG4gIHN0cnVjdHVyZWRQYXRjaCxcbiAgY3JlYXRlVHdvRmlsZXNQYXRjaCxcbiAgY3JlYXRlUGF0Y2gsXG4gIGFwcGx5UGF0Y2gsXG4gIGFwcGx5UGF0Y2hlcyxcbiAgcGFyc2VQYXRjaCxcbiAgbWVyZ2UsXG4gIGNvbnZlcnRDaGFuZ2VzVG9ETVAsXG4gIGNvbnZlcnRDaGFuZ2VzVG9YTUwsXG4gIGNhbm9uaWNhbGl6ZVxufTtcbiJdfQ== diff --git a/node_modules/diff/lib/patch/apply.js b/node_modules/diff/lib/patch/apply.js deleted file mode 100644 index 19bddd8..0000000 --- a/node_modules/diff/lib/patch/apply.js +++ /dev/null @@ -1,243 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.applyPatch = applyPatch; -exports.applyPatches = applyPatches; - -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_parse = require("./parse") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_distanceIterator = _interopRequireDefault(require("../util/distance-iterator")) -/*istanbul ignore end*/ -; - -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/*istanbul ignore end*/ -function applyPatch(source, uniDiff) { - /*istanbul ignore start*/ - var - /*istanbul ignore end*/ - options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - if (typeof uniDiff === 'string') { - uniDiff = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - _parse - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - parsePatch) - /*istanbul ignore end*/ - (uniDiff); - } - - if (Array.isArray(uniDiff)) { - if (uniDiff.length > 1) { - throw new Error('applyPatch only works with a single input.'); - } - - uniDiff = uniDiff[0]; - } // Apply the diff to the input - - - var lines = source.split(/\r\n|[\n\v\f\r\x85]/), - delimiters = source.match(/\r\n|[\n\v\f\r\x85]/g) || [], - hunks = uniDiff.hunks, - compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - line === patchContent - ); - }, - errorCount = 0, - fuzzFactor = options.fuzzFactor || 0, - minLine = 0, - offset = 0, - removeEOFNL, - addEOFNL; - /** - * Checks if the hunk exactly fits on the provided location - */ - - - function hunkFits(hunk, toPos) { - for (var j = 0; j < hunk.lines.length; j++) { - var line = hunk.lines[j], - operation = line.length > 0 ? line[0] : ' ', - content = line.length > 0 ? line.substr(1) : line; - - if (operation === ' ' || operation === '-') { - // Context sanity check - if (!compareLine(toPos + 1, lines[toPos], operation, content)) { - errorCount++; - - if (errorCount > fuzzFactor) { - return false; - } - } - - toPos++; - } - } - - return true; - } // Search best fit offsets for each hunk based on the previous ones - - - for (var i = 0; i < hunks.length; i++) { - var hunk = hunks[i], - maxLine = lines.length - hunk.oldLines, - localOffset = 0, - toPos = offset + hunk.oldStart - 1; - var iterator = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - _distanceIterator - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - default) - /*istanbul ignore end*/ - (toPos, minLine, maxLine); - - for (; localOffset !== undefined; localOffset = iterator()) { - if (hunkFits(hunk, toPos + localOffset)) { - hunk.offset = offset += localOffset; - break; - } - } - - if (localOffset === undefined) { - return false; - } // Set lower text limit to end of the current hunk, so next ones don't try - // to fit over already patched text - - - minLine = hunk.offset + hunk.oldStart + hunk.oldLines; - } // Apply patch hunks - - - var diffOffset = 0; - - for (var _i = 0; _i < hunks.length; _i++) { - var _hunk = hunks[_i], - _toPos = _hunk.oldStart + _hunk.offset + diffOffset - 1; - - diffOffset += _hunk.newLines - _hunk.oldLines; - - if (_toPos < 0) { - // Creating a new file - _toPos = 0; - } - - for (var j = 0; j < _hunk.lines.length; j++) { - var line = _hunk.lines[j], - operation = line.length > 0 ? line[0] : ' ', - content = line.length > 0 ? line.substr(1) : line, - delimiter = _hunk.linedelimiters[j]; - - if (operation === ' ') { - _toPos++; - } else if (operation === '-') { - lines.splice(_toPos, 1); - delimiters.splice(_toPos, 1); - /* istanbul ignore else */ - } else if (operation === '+') { - lines.splice(_toPos, 0, content); - delimiters.splice(_toPos, 0, delimiter); - _toPos++; - } else if (operation === '\\') { - var previousOperation = _hunk.lines[j - 1] ? _hunk.lines[j - 1][0] : null; - - if (previousOperation === '+') { - removeEOFNL = true; - } else if (previousOperation === '-') { - addEOFNL = true; - } - } - } - } // Handle EOFNL insertion/removal - - - if (removeEOFNL) { - while (!lines[lines.length - 1]) { - lines.pop(); - delimiters.pop(); - } - } else if (addEOFNL) { - lines.push(''); - delimiters.push('\n'); - } - - for (var _k = 0; _k < lines.length - 1; _k++) { - lines[_k] = lines[_k] + delimiters[_k]; - } - - return lines.join(''); -} // Wrapper that supports multiple file patches via callbacks. - - -function applyPatches(uniDiff, options) { - if (typeof uniDiff === 'string') { - uniDiff = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - _parse - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - parsePatch) - /*istanbul ignore end*/ - (uniDiff); - } - - var currentIndex = 0; - - function processIndex() { - var index = uniDiff[currentIndex++]; - - if (!index) { - return options.complete(); - } - - options.loadFile(index, function (err, data) { - if (err) { - return options.complete(err); - } - - var updatedContent = applyPatch(data, index, options); - options.patched(index, updatedContent, function (err) { - if (err) { - return options.complete(err); - } - - processIndex(); - }); - }); - } - - processIndex(); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wYXRjaC9hcHBseS5qcyJdLCJuYW1lcyI6WyJhcHBseVBhdGNoIiwic291cmNlIiwidW5pRGlmZiIsIm9wdGlvbnMiLCJwYXJzZVBhdGNoIiwiQXJyYXkiLCJpc0FycmF5IiwibGVuZ3RoIiwiRXJyb3IiLCJsaW5lcyIsInNwbGl0IiwiZGVsaW1pdGVycyIsIm1hdGNoIiwiaHVua3MiLCJjb21wYXJlTGluZSIsImxpbmVOdW1iZXIiLCJsaW5lIiwib3BlcmF0aW9uIiwicGF0Y2hDb250ZW50IiwiZXJyb3JDb3VudCIsImZ1enpGYWN0b3IiLCJtaW5MaW5lIiwib2Zmc2V0IiwicmVtb3ZlRU9GTkwiLCJhZGRFT0ZOTCIsImh1bmtGaXRzIiwiaHVuayIsInRvUG9zIiwiaiIsImNvbnRlbnQiLCJzdWJzdHIiLCJpIiwibWF4TGluZSIsIm9sZExpbmVzIiwibG9jYWxPZmZzZXQiLCJvbGRTdGFydCIsIml0ZXJhdG9yIiwiZGlzdGFuY2VJdGVyYXRvciIsInVuZGVmaW5lZCIsImRpZmZPZmZzZXQiLCJuZXdMaW5lcyIsImRlbGltaXRlciIsImxpbmVkZWxpbWl0ZXJzIiwic3BsaWNlIiwicHJldmlvdXNPcGVyYXRpb24iLCJwb3AiLCJwdXNoIiwiX2siLCJqb2luIiwiYXBwbHlQYXRjaGVzIiwiY3VycmVudEluZGV4IiwicHJvY2Vzc0luZGV4IiwiaW5kZXgiLCJjb21wbGV0ZSIsImxvYWRGaWxlIiwiZXJyIiwiZGF0YSIsInVwZGF0ZWRDb250ZW50IiwicGF0Y2hlZCJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7O0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFBQTs7Ozs7QUFFTyxTQUFTQSxVQUFULENBQW9CQyxNQUFwQixFQUE0QkMsT0FBNUIsRUFBbUQ7QUFBQTtBQUFBO0FBQUE7QUFBZEMsRUFBQUEsT0FBYyx1RUFBSixFQUFJOztBQUN4RCxNQUFJLE9BQU9ELE9BQVAsS0FBbUIsUUFBdkIsRUFBaUM7QUFDL0JBLElBQUFBLE9BQU87QUFBRztBQUFBO0FBQUE7O0FBQUFFO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUE7QUFBQSxLQUFXRixPQUFYLENBQVY7QUFDRDs7QUFFRCxNQUFJRyxLQUFLLENBQUNDLE9BQU4sQ0FBY0osT0FBZCxDQUFKLEVBQTRCO0FBQzFCLFFBQUlBLE9BQU8sQ0FBQ0ssTUFBUixHQUFpQixDQUFyQixFQUF3QjtBQUN0QixZQUFNLElBQUlDLEtBQUosQ0FBVSw0Q0FBVixDQUFOO0FBQ0Q7O0FBRUROLElBQUFBLE9BQU8sR0FBR0EsT0FBTyxDQUFDLENBQUQsQ0FBakI7QUFDRCxHQVh1RCxDQWF4RDs7O0FBQ0EsTUFBSU8sS0FBSyxHQUFHUixNQUFNLENBQUNTLEtBQVAsQ0FBYSxxQkFBYixDQUFaO0FBQUEsTUFDSUMsVUFBVSxHQUFHVixNQUFNLENBQUNXLEtBQVAsQ0FBYSxzQkFBYixLQUF3QyxFQUR6RDtBQUFBLE1BRUlDLEtBQUssR0FBR1gsT0FBTyxDQUFDVyxLQUZwQjtBQUFBLE1BSUlDLFdBQVcsR0FBR1gsT0FBTyxDQUFDVyxXQUFSLElBQXdCLFVBQUNDLFVBQUQsRUFBYUMsSUFBYixFQUFtQkMsU0FBbkIsRUFBOEJDLFlBQTlCO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBK0NGLE1BQUFBLElBQUksS0FBS0U7QUFBeEQ7QUFBQSxHQUoxQztBQUFBLE1BS0lDLFVBQVUsR0FBRyxDQUxqQjtBQUFBLE1BTUlDLFVBQVUsR0FBR2pCLE9BQU8sQ0FBQ2lCLFVBQVIsSUFBc0IsQ0FOdkM7QUFBQSxNQU9JQyxPQUFPLEdBQUcsQ0FQZDtBQUFBLE1BUUlDLE1BQU0sR0FBRyxDQVJiO0FBQUEsTUFVSUMsV0FWSjtBQUFBLE1BV0lDLFFBWEo7QUFhQTs7Ozs7QUFHQSxXQUFTQyxRQUFULENBQWtCQyxJQUFsQixFQUF3QkMsS0FBeEIsRUFBK0I7QUFDN0IsU0FBSyxJQUFJQyxDQUFDLEdBQUcsQ0FBYixFQUFnQkEsQ0FBQyxHQUFHRixJQUFJLENBQUNqQixLQUFMLENBQVdGLE1BQS9CLEVBQXVDcUIsQ0FBQyxFQUF4QyxFQUE0QztBQUMxQyxVQUFJWixJQUFJLEdBQUdVLElBQUksQ0FBQ2pCLEtBQUwsQ0FBV21CLENBQVgsQ0FBWDtBQUFBLFVBQ0lYLFNBQVMsR0FBSUQsSUFBSSxDQUFDVCxNQUFMLEdBQWMsQ0FBZCxHQUFrQlMsSUFBSSxDQUFDLENBQUQsQ0FBdEIsR0FBNEIsR0FEN0M7QUFBQSxVQUVJYSxPQUFPLEdBQUliLElBQUksQ0FBQ1QsTUFBTCxHQUFjLENBQWQsR0FBa0JTLElBQUksQ0FBQ2MsTUFBTCxDQUFZLENBQVosQ0FBbEIsR0FBbUNkLElBRmxEOztBQUlBLFVBQUlDLFNBQVMsS0FBSyxHQUFkLElBQXFCQSxTQUFTLEtBQUssR0FBdkMsRUFBNEM7QUFDMUM7QUFDQSxZQUFJLENBQUNILFdBQVcsQ0FBQ2EsS0FBSyxHQUFHLENBQVQsRUFBWWxCLEtBQUssQ0FBQ2tCLEtBQUQsQ0FBakIsRUFBMEJWLFNBQTFCLEVBQXFDWSxPQUFyQyxDQUFoQixFQUErRDtBQUM3RFYsVUFBQUEsVUFBVTs7QUFFVixjQUFJQSxVQUFVLEdBQUdDLFVBQWpCLEVBQTZCO0FBQzNCLG1CQUFPLEtBQVA7QUFDRDtBQUNGOztBQUNETyxRQUFBQSxLQUFLO0FBQ047QUFDRjs7QUFFRCxXQUFPLElBQVA7QUFDRCxHQWxEdUQsQ0FvRHhEOzs7QUFDQSxPQUFLLElBQUlJLENBQUMsR0FBRyxDQUFiLEVBQWdCQSxDQUFDLEdBQUdsQixLQUFLLENBQUNOLE1BQTFCLEVBQWtDd0IsQ0FBQyxFQUFuQyxFQUF1QztBQUNyQyxRQUFJTCxJQUFJLEdBQUdiLEtBQUssQ0FBQ2tCLENBQUQsQ0FBaEI7QUFBQSxRQUNJQyxPQUFPLEdBQUd2QixLQUFLLENBQUNGLE1BQU4sR0FBZW1CLElBQUksQ0FBQ08sUUFEbEM7QUFBQSxRQUVJQyxXQUFXLEdBQUcsQ0FGbEI7QUFBQSxRQUdJUCxLQUFLLEdBQUdMLE1BQU0sR0FBR0ksSUFBSSxDQUFDUyxRQUFkLEdBQXlCLENBSHJDO0FBS0EsUUFBSUMsUUFBUTtBQUFHO0FBQUE7QUFBQTs7QUFBQUM7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQTtBQUFBLEtBQWlCVixLQUFqQixFQUF3Qk4sT0FBeEIsRUFBaUNXLE9BQWpDLENBQWY7O0FBRUEsV0FBT0UsV0FBVyxLQUFLSSxTQUF2QixFQUFrQ0osV0FBVyxHQUFHRSxRQUFRLEVBQXhELEVBQTREO0FBQzFELFVBQUlYLFFBQVEsQ0FBQ0MsSUFBRCxFQUFPQyxLQUFLLEdBQUdPLFdBQWYsQ0FBWixFQUF5QztBQUN2Q1IsUUFBQUEsSUFBSSxDQUFDSixNQUFMLEdBQWNBLE1BQU0sSUFBSVksV0FBeEI7QUFDQTtBQUNEO0FBQ0Y7O0FBRUQsUUFBSUEsV0FBVyxLQUFLSSxTQUFwQixFQUErQjtBQUM3QixhQUFPLEtBQVA7QUFDRCxLQWpCb0MsQ0FtQnJDO0FBQ0E7OztBQUNBakIsSUFBQUEsT0FBTyxHQUFHSyxJQUFJLENBQUNKLE1BQUwsR0FBY0ksSUFBSSxDQUFDUyxRQUFuQixHQUE4QlQsSUFBSSxDQUFDTyxRQUE3QztBQUNELEdBM0V1RCxDQTZFeEQ7OztBQUNBLE1BQUlNLFVBQVUsR0FBRyxDQUFqQjs7QUFDQSxPQUFLLElBQUlSLEVBQUMsR0FBRyxDQUFiLEVBQWdCQSxFQUFDLEdBQUdsQixLQUFLLENBQUNOLE1BQTFCLEVBQWtDd0IsRUFBQyxFQUFuQyxFQUF1QztBQUNyQyxRQUFJTCxLQUFJLEdBQUdiLEtBQUssQ0FBQ2tCLEVBQUQsQ0FBaEI7QUFBQSxRQUNJSixNQUFLLEdBQUdELEtBQUksQ0FBQ1MsUUFBTCxHQUFnQlQsS0FBSSxDQUFDSixNQUFyQixHQUE4QmlCLFVBQTlCLEdBQTJDLENBRHZEOztBQUVBQSxJQUFBQSxVQUFVLElBQUliLEtBQUksQ0FBQ2MsUUFBTCxHQUFnQmQsS0FBSSxDQUFDTyxRQUFuQzs7QUFFQSxRQUFJTixNQUFLLEdBQUcsQ0FBWixFQUFlO0FBQUU7QUFDZkEsTUFBQUEsTUFBSyxHQUFHLENBQVI7QUFDRDs7QUFFRCxTQUFLLElBQUlDLENBQUMsR0FBRyxDQUFiLEVBQWdCQSxDQUFDLEdBQUdGLEtBQUksQ0FBQ2pCLEtBQUwsQ0FBV0YsTUFBL0IsRUFBdUNxQixDQUFDLEVBQXhDLEVBQTRDO0FBQzFDLFVBQUlaLElBQUksR0FBR1UsS0FBSSxDQUFDakIsS0FBTCxDQUFXbUIsQ0FBWCxDQUFYO0FBQUEsVUFDSVgsU0FBUyxHQUFJRCxJQUFJLENBQUNULE1BQUwsR0FBYyxDQUFkLEdBQWtCUyxJQUFJLENBQUMsQ0FBRCxDQUF0QixHQUE0QixHQUQ3QztBQUFBLFVBRUlhLE9BQU8sR0FBSWIsSUFBSSxDQUFDVCxNQUFMLEdBQWMsQ0FBZCxHQUFrQlMsSUFBSSxDQUFDYyxNQUFMLENBQVksQ0FBWixDQUFsQixHQUFtQ2QsSUFGbEQ7QUFBQSxVQUdJeUIsU0FBUyxHQUFHZixLQUFJLENBQUNnQixjQUFMLENBQW9CZCxDQUFwQixDQUhoQjs7QUFLQSxVQUFJWCxTQUFTLEtBQUssR0FBbEIsRUFBdUI7QUFDckJVLFFBQUFBLE1BQUs7QUFDTixPQUZELE1BRU8sSUFBSVYsU0FBUyxLQUFLLEdBQWxCLEVBQXVCO0FBQzVCUixRQUFBQSxLQUFLLENBQUNrQyxNQUFOLENBQWFoQixNQUFiLEVBQW9CLENBQXBCO0FBQ0FoQixRQUFBQSxVQUFVLENBQUNnQyxNQUFYLENBQWtCaEIsTUFBbEIsRUFBeUIsQ0FBekI7QUFDRjtBQUNDLE9BSk0sTUFJQSxJQUFJVixTQUFTLEtBQUssR0FBbEIsRUFBdUI7QUFDNUJSLFFBQUFBLEtBQUssQ0FBQ2tDLE1BQU4sQ0FBYWhCLE1BQWIsRUFBb0IsQ0FBcEIsRUFBdUJFLE9BQXZCO0FBQ0FsQixRQUFBQSxVQUFVLENBQUNnQyxNQUFYLENBQWtCaEIsTUFBbEIsRUFBeUIsQ0FBekIsRUFBNEJjLFNBQTVCO0FBQ0FkLFFBQUFBLE1BQUs7QUFDTixPQUpNLE1BSUEsSUFBSVYsU0FBUyxLQUFLLElBQWxCLEVBQXdCO0FBQzdCLFlBQUkyQixpQkFBaUIsR0FBR2xCLEtBQUksQ0FBQ2pCLEtBQUwsQ0FBV21CLENBQUMsR0FBRyxDQUFmLElBQW9CRixLQUFJLENBQUNqQixLQUFMLENBQVdtQixDQUFDLEdBQUcsQ0FBZixFQUFrQixDQUFsQixDQUFwQixHQUEyQyxJQUFuRTs7QUFDQSxZQUFJZ0IsaUJBQWlCLEtBQUssR0FBMUIsRUFBK0I7QUFDN0JyQixVQUFBQSxXQUFXLEdBQUcsSUFBZDtBQUNELFNBRkQsTUFFTyxJQUFJcUIsaUJBQWlCLEtBQUssR0FBMUIsRUFBK0I7QUFDcENwQixVQUFBQSxRQUFRLEdBQUcsSUFBWDtBQUNEO0FBQ0Y7QUFDRjtBQUNGLEdBakh1RCxDQW1IeEQ7OztBQUNBLE1BQUlELFdBQUosRUFBaUI7QUFDZixXQUFPLENBQUNkLEtBQUssQ0FBQ0EsS0FBSyxDQUFDRixNQUFOLEdBQWUsQ0FBaEIsQ0FBYixFQUFpQztBQUMvQkUsTUFBQUEsS0FBSyxDQUFDb0MsR0FBTjtBQUNBbEMsTUFBQUEsVUFBVSxDQUFDa0MsR0FBWDtBQUNEO0FBQ0YsR0FMRCxNQUtPLElBQUlyQixRQUFKLEVBQWM7QUFDbkJmLElBQUFBLEtBQUssQ0FBQ3FDLElBQU4sQ0FBVyxFQUFYO0FBQ0FuQyxJQUFBQSxVQUFVLENBQUNtQyxJQUFYLENBQWdCLElBQWhCO0FBQ0Q7O0FBQ0QsT0FBSyxJQUFJQyxFQUFFLEdBQUcsQ0FBZCxFQUFpQkEsRUFBRSxHQUFHdEMsS0FBSyxDQUFDRixNQUFOLEdBQWUsQ0FBckMsRUFBd0N3QyxFQUFFLEVBQTFDLEVBQThDO0FBQzVDdEMsSUFBQUEsS0FBSyxDQUFDc0MsRUFBRCxDQUFMLEdBQVl0QyxLQUFLLENBQUNzQyxFQUFELENBQUwsR0FBWXBDLFVBQVUsQ0FBQ29DLEVBQUQsQ0FBbEM7QUFDRDs7QUFDRCxTQUFPdEMsS0FBSyxDQUFDdUMsSUFBTixDQUFXLEVBQVgsQ0FBUDtBQUNELEMsQ0FFRDs7O0FBQ08sU0FBU0MsWUFBVCxDQUFzQi9DLE9BQXRCLEVBQStCQyxPQUEvQixFQUF3QztBQUM3QyxNQUFJLE9BQU9ELE9BQVAsS0FBbUIsUUFBdkIsRUFBaUM7QUFDL0JBLElBQUFBLE9BQU87QUFBRztBQUFBO0FBQUE7O0FBQUFFO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUE7QUFBQSxLQUFXRixPQUFYLENBQVY7QUFDRDs7QUFFRCxNQUFJZ0QsWUFBWSxHQUFHLENBQW5COztBQUNBLFdBQVNDLFlBQVQsR0FBd0I7QUFDdEIsUUFBSUMsS0FBSyxHQUFHbEQsT0FBTyxDQUFDZ0QsWUFBWSxFQUFiLENBQW5COztBQUNBLFFBQUksQ0FBQ0UsS0FBTCxFQUFZO0FBQ1YsYUFBT2pELE9BQU8sQ0FBQ2tELFFBQVIsRUFBUDtBQUNEOztBQUVEbEQsSUFBQUEsT0FBTyxDQUFDbUQsUUFBUixDQUFpQkYsS0FBakIsRUFBd0IsVUFBU0csR0FBVCxFQUFjQyxJQUFkLEVBQW9CO0FBQzFDLFVBQUlELEdBQUosRUFBUztBQUNQLGVBQU9wRCxPQUFPLENBQUNrRCxRQUFSLENBQWlCRSxHQUFqQixDQUFQO0FBQ0Q7O0FBRUQsVUFBSUUsY0FBYyxHQUFHekQsVUFBVSxDQUFDd0QsSUFBRCxFQUFPSixLQUFQLEVBQWNqRCxPQUFkLENBQS9CO0FBQ0FBLE1BQUFBLE9BQU8sQ0FBQ3VELE9BQVIsQ0FBZ0JOLEtBQWhCLEVBQXVCSyxjQUF2QixFQUF1QyxVQUFTRixHQUFULEVBQWM7QUFDbkQsWUFBSUEsR0FBSixFQUFTO0FBQ1AsaUJBQU9wRCxPQUFPLENBQUNrRCxRQUFSLENBQWlCRSxHQUFqQixDQUFQO0FBQ0Q7O0FBRURKLFFBQUFBLFlBQVk7QUFDYixPQU5EO0FBT0QsS0FiRDtBQWNEOztBQUNEQSxFQUFBQSxZQUFZO0FBQ2IiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge3BhcnNlUGF0Y2h9IGZyb20gJy4vcGFyc2UnO1xuaW1wb3J0IGRpc3RhbmNlSXRlcmF0b3IgZnJvbSAnLi4vdXRpbC9kaXN0YW5jZS1pdGVyYXRvcic7XG5cbmV4cG9ydCBmdW5jdGlvbiBhcHBseVBhdGNoKHNvdXJjZSwgdW5pRGlmZiwgb3B0aW9ucyA9IHt9KSB7XG4gIGlmICh0eXBlb2YgdW5pRGlmZiA9PT0gJ3N0cmluZycpIHtcbiAgICB1bmlEaWZmID0gcGFyc2VQYXRjaCh1bmlEaWZmKTtcbiAgfVxuXG4gIGlmIChBcnJheS5pc0FycmF5KHVuaURpZmYpKSB7XG4gICAgaWYgKHVuaURpZmYubGVuZ3RoID4gMSkge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdhcHBseVBhdGNoIG9ubHkgd29ya3Mgd2l0aCBhIHNpbmdsZSBpbnB1dC4nKTtcbiAgICB9XG5cbiAgICB1bmlEaWZmID0gdW5pRGlmZlswXTtcbiAgfVxuXG4gIC8vIEFwcGx5IHRoZSBkaWZmIHRvIHRoZSBpbnB1dFxuICBsZXQgbGluZXMgPSBzb3VyY2Uuc3BsaXQoL1xcclxcbnxbXFxuXFx2XFxmXFxyXFx4ODVdLyksXG4gICAgICBkZWxpbWl0ZXJzID0gc291cmNlLm1hdGNoKC9cXHJcXG58W1xcblxcdlxcZlxcclxceDg1XS9nKSB8fCBbXSxcbiAgICAgIGh1bmtzID0gdW5pRGlmZi5odW5rcyxcblxuICAgICAgY29tcGFyZUxpbmUgPSBvcHRpb25zLmNvbXBhcmVMaW5lIHx8ICgobGluZU51bWJlciwgbGluZSwgb3BlcmF0aW9uLCBwYXRjaENvbnRlbnQpID0+IGxpbmUgPT09IHBhdGNoQ29udGVudCksXG4gICAgICBlcnJvckNvdW50ID0gMCxcbiAgICAgIGZ1enpGYWN0b3IgPSBvcHRpb25zLmZ1enpGYWN0b3IgfHwgMCxcbiAgICAgIG1pbkxpbmUgPSAwLFxuICAgICAgb2Zmc2V0ID0gMCxcblxuICAgICAgcmVtb3ZlRU9GTkwsXG4gICAgICBhZGRFT0ZOTDtcblxuICAvKipcbiAgICogQ2hlY2tzIGlmIHRoZSBodW5rIGV4YWN0bHkgZml0cyBvbiB0aGUgcHJvdmlkZWQgbG9jYXRpb25cbiAgICovXG4gIGZ1bmN0aW9uIGh1bmtGaXRzKGh1bmssIHRvUG9zKSB7XG4gICAgZm9yIChsZXQgaiA9IDA7IGogPCBodW5rLmxpbmVzLmxlbmd0aDsgaisrKSB7XG4gICAgICBsZXQgbGluZSA9IGh1bmsubGluZXNbal0sXG4gICAgICAgICAgb3BlcmF0aW9uID0gKGxpbmUubGVuZ3RoID4gMCA/IGxpbmVbMF0gOiAnICcpLFxuICAgICAgICAgIGNvbnRlbnQgPSAobGluZS5sZW5ndGggPiAwID8gbGluZS5zdWJzdHIoMSkgOiBsaW5lKTtcblxuICAgICAgaWYgKG9wZXJhdGlvbiA9PT0gJyAnIHx8IG9wZXJhdGlvbiA9PT0gJy0nKSB7XG4gICAgICAgIC8vIENvbnRleHQgc2FuaXR5IGNoZWNrXG4gICAgICAgIGlmICghY29tcGFyZUxpbmUodG9Qb3MgKyAxLCBsaW5lc1t0b1Bvc10sIG9wZXJhdGlvbiwgY29udGVudCkpIHtcbiAgICAgICAgICBlcnJvckNvdW50Kys7XG5cbiAgICAgICAgICBpZiAoZXJyb3JDb3VudCA+IGZ1enpGYWN0b3IpIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgdG9Qb3MrKztcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gdHJ1ZTtcbiAgfVxuXG4gIC8vIFNlYXJjaCBiZXN0IGZpdCBvZmZzZXRzIGZvciBlYWNoIGh1bmsgYmFzZWQgb24gdGhlIHByZXZpb3VzIG9uZXNcbiAgZm9yIChsZXQgaSA9IDA7IGkgPCBodW5rcy5sZW5ndGg7IGkrKykge1xuICAgIGxldCBodW5rID0gaHVua3NbaV0sXG4gICAgICAgIG1heExpbmUgPSBsaW5lcy5sZW5ndGggLSBodW5rLm9sZExpbmVzLFxuICAgICAgICBsb2NhbE9mZnNldCA9IDAsXG4gICAgICAgIHRvUG9zID0gb2Zmc2V0ICsgaHVuay5vbGRTdGFydCAtIDE7XG5cbiAgICBsZXQgaXRlcmF0b3IgPSBkaXN0YW5jZUl0ZXJhdG9yKHRvUG9zLCBtaW5MaW5lLCBtYXhMaW5lKTtcblxuICAgIGZvciAoOyBsb2NhbE9mZnNldCAhPT0gdW5kZWZpbmVkOyBsb2NhbE9mZnNldCA9IGl0ZXJhdG9yKCkpIHtcbiAgICAgIGlmIChodW5rRml0cyhodW5rLCB0b1BvcyArIGxvY2FsT2Zmc2V0KSkge1xuICAgICAgICBodW5rLm9mZnNldCA9IG9mZnNldCArPSBsb2NhbE9mZnNldDtcbiAgICAgICAgYnJlYWs7XG4gICAgICB9XG4gICAgfVxuXG4gICAgaWYgKGxvY2FsT2Zmc2V0ID09PSB1bmRlZmluZWQpIHtcbiAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9XG5cbiAgICAvLyBTZXQgbG93ZXIgdGV4dCBsaW1pdCB0byBlbmQgb2YgdGhlIGN1cnJlbnQgaHVuaywgc28gbmV4dCBvbmVzIGRvbid0IHRyeVxuICAgIC8vIHRvIGZpdCBvdmVyIGFscmVhZHkgcGF0Y2hlZCB0ZXh0XG4gICAgbWluTGluZSA9IGh1bmsub2Zmc2V0ICsgaHVuay5vbGRTdGFydCArIGh1bmsub2xkTGluZXM7XG4gIH1cblxuICAvLyBBcHBseSBwYXRjaCBodW5rc1xuICBsZXQgZGlmZk9mZnNldCA9IDA7XG4gIGZvciAobGV0IGkgPSAwOyBpIDwgaHVua3MubGVuZ3RoOyBpKyspIHtcbiAgICBsZXQgaHVuayA9IGh1bmtzW2ldLFxuICAgICAgICB0b1BvcyA9IGh1bmsub2xkU3RhcnQgKyBodW5rLm9mZnNldCArIGRpZmZPZmZzZXQgLSAxO1xuICAgIGRpZmZPZmZzZXQgKz0gaHVuay5uZXdMaW5lcyAtIGh1bmsub2xkTGluZXM7XG5cbiAgICBpZiAodG9Qb3MgPCAwKSB7IC8vIENyZWF0aW5nIGEgbmV3IGZpbGVcbiAgICAgIHRvUG9zID0gMDtcbiAgICB9XG5cbiAgICBmb3IgKGxldCBqID0gMDsgaiA8IGh1bmsubGluZXMubGVuZ3RoOyBqKyspIHtcbiAgICAgIGxldCBsaW5lID0gaHVuay5saW5lc1tqXSxcbiAgICAgICAgICBvcGVyYXRpb24gPSAobGluZS5sZW5ndGggPiAwID8gbGluZVswXSA6ICcgJyksXG4gICAgICAgICAgY29udGVudCA9IChsaW5lLmxlbmd0aCA+IDAgPyBsaW5lLnN1YnN0cigxKSA6IGxpbmUpLFxuICAgICAgICAgIGRlbGltaXRlciA9IGh1bmsubGluZWRlbGltaXRlcnNbal07XG5cbiAgICAgIGlmIChvcGVyYXRpb24gPT09ICcgJykge1xuICAgICAgICB0b1BvcysrO1xuICAgICAgfSBlbHNlIGlmIChvcGVyYXRpb24gPT09ICctJykge1xuICAgICAgICBsaW5lcy5zcGxpY2UodG9Qb3MsIDEpO1xuICAgICAgICBkZWxpbWl0ZXJzLnNwbGljZSh0b1BvcywgMSk7XG4gICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgZWxzZSAqL1xuICAgICAgfSBlbHNlIGlmIChvcGVyYXRpb24gPT09ICcrJykge1xuICAgICAgICBsaW5lcy5zcGxpY2UodG9Qb3MsIDAsIGNvbnRlbnQpO1xuICAgICAgICBkZWxpbWl0ZXJzLnNwbGljZSh0b1BvcywgMCwgZGVsaW1pdGVyKTtcbiAgICAgICAgdG9Qb3MrKztcbiAgICAgIH0gZWxzZSBpZiAob3BlcmF0aW9uID09PSAnXFxcXCcpIHtcbiAgICAgICAgbGV0IHByZXZpb3VzT3BlcmF0aW9uID0gaHVuay5saW5lc1tqIC0gMV0gPyBodW5rLmxpbmVzW2ogLSAxXVswXSA6IG51bGw7XG4gICAgICAgIGlmIChwcmV2aW91c09wZXJhdGlvbiA9PT0gJysnKSB7XG4gICAgICAgICAgcmVtb3ZlRU9GTkwgPSB0cnVlO1xuICAgICAgICB9IGVsc2UgaWYgKHByZXZpb3VzT3BlcmF0aW9uID09PSAnLScpIHtcbiAgICAgICAgICBhZGRFT0ZOTCA9IHRydWU7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICAvLyBIYW5kbGUgRU9GTkwgaW5zZXJ0aW9uL3JlbW92YWxcbiAgaWYgKHJlbW92ZUVPRk5MKSB7XG4gICAgd2hpbGUgKCFsaW5lc1tsaW5lcy5sZW5ndGggLSAxXSkge1xuICAgICAgbGluZXMucG9wKCk7XG4gICAgICBkZWxpbWl0ZXJzLnBvcCgpO1xuICAgIH1cbiAgfSBlbHNlIGlmIChhZGRFT0ZOTCkge1xuICAgIGxpbmVzLnB1c2goJycpO1xuICAgIGRlbGltaXRlcnMucHVzaCgnXFxuJyk7XG4gIH1cbiAgZm9yIChsZXQgX2sgPSAwOyBfayA8IGxpbmVzLmxlbmd0aCAtIDE7IF9rKyspIHtcbiAgICBsaW5lc1tfa10gPSBsaW5lc1tfa10gKyBkZWxpbWl0ZXJzW19rXTtcbiAgfVxuICByZXR1cm4gbGluZXMuam9pbignJyk7XG59XG5cbi8vIFdyYXBwZXIgdGhhdCBzdXBwb3J0cyBtdWx0aXBsZSBmaWxlIHBhdGNoZXMgdmlhIGNhbGxiYWNrcy5cbmV4cG9ydCBmdW5jdGlvbiBhcHBseVBhdGNoZXModW5pRGlmZiwgb3B0aW9ucykge1xuICBpZiAodHlwZW9mIHVuaURpZmYgPT09ICdzdHJpbmcnKSB7XG4gICAgdW5pRGlmZiA9IHBhcnNlUGF0Y2godW5pRGlmZik7XG4gIH1cblxuICBsZXQgY3VycmVudEluZGV4ID0gMDtcbiAgZnVuY3Rpb24gcHJvY2Vzc0luZGV4KCkge1xuICAgIGxldCBpbmRleCA9IHVuaURpZmZbY3VycmVudEluZGV4KytdO1xuICAgIGlmICghaW5kZXgpIHtcbiAgICAgIHJldHVybiBvcHRpb25zLmNvbXBsZXRlKCk7XG4gICAgfVxuXG4gICAgb3B0aW9ucy5sb2FkRmlsZShpbmRleCwgZnVuY3Rpb24oZXJyLCBkYXRhKSB7XG4gICAgICBpZiAoZXJyKSB7XG4gICAgICAgIHJldHVybiBvcHRpb25zLmNvbXBsZXRlKGVycik7XG4gICAgICB9XG5cbiAgICAgIGxldCB1cGRhdGVkQ29udGVudCA9IGFwcGx5UGF0Y2goZGF0YSwgaW5kZXgsIG9wdGlvbnMpO1xuICAgICAgb3B0aW9ucy5wYXRjaGVkKGluZGV4LCB1cGRhdGVkQ29udGVudCwgZnVuY3Rpb24oZXJyKSB7XG4gICAgICAgIGlmIChlcnIpIHtcbiAgICAgICAgICByZXR1cm4gb3B0aW9ucy5jb21wbGV0ZShlcnIpO1xuICAgICAgICB9XG5cbiAgICAgICAgcHJvY2Vzc0luZGV4KCk7XG4gICAgICB9KTtcbiAgICB9KTtcbiAgfVxuICBwcm9jZXNzSW5kZXgoKTtcbn1cbiJdfQ== diff --git a/node_modules/diff/lib/patch/create.js b/node_modules/diff/lib/patch/create.js deleted file mode 100644 index d1717fe..0000000 --- a/node_modules/diff/lib/patch/create.js +++ /dev/null @@ -1,247 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.structuredPatch = structuredPatch; -exports.createTwoFilesPatch = createTwoFilesPatch; -exports.createPatch = createPatch; - -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_line = require("../diff/line") -/*istanbul ignore end*/ -; - -/*istanbul ignore start*/ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } - -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } - -function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } - -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } - -/*istanbul ignore end*/ -function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - if (!options) { - options = {}; - } - - if (typeof options.context === 'undefined') { - options.context = 4; - } - - var diff = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - _line - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - diffLines) - /*istanbul ignore end*/ - (oldStr, newStr, options); - diff.push({ - value: '', - lines: [] - }); // Append an empty value to make cleanup easier - - function contextLines(lines) { - return lines.map(function (entry) { - return ' ' + entry; - }); - } - - var hunks = []; - var oldRangeStart = 0, - newRangeStart = 0, - curRange = [], - oldLine = 1, - newLine = 1; - - /*istanbul ignore start*/ - var _loop = function _loop( - /*istanbul ignore end*/ - i) { - var current = diff[i], - lines = current.lines || current.value.replace(/\n$/, '').split('\n'); - current.lines = lines; - - if (current.added || current.removed) { - /*istanbul ignore start*/ - var _curRange; - - /*istanbul ignore end*/ - // If we have previous context, start with that - if (!oldRangeStart) { - var prev = diff[i - 1]; - oldRangeStart = oldLine; - newRangeStart = newLine; - - if (prev) { - curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : []; - oldRangeStart -= curRange.length; - newRangeStart -= curRange.length; - } - } // Output our changes - - - /*istanbul ignore start*/ - (_curRange = - /*istanbul ignore end*/ - curRange).push. - /*istanbul ignore start*/ - apply - /*istanbul ignore end*/ - ( - /*istanbul ignore start*/ - _curRange - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - lines.map(function (entry) { - return (current.added ? '+' : '-') + entry; - }))); // Track the updated file position - - - if (current.added) { - newLine += lines.length; - } else { - oldLine += lines.length; - } - } else { - // Identical context lines. Track line changes - if (oldRangeStart) { - // Close out any changes that have been output (or join overlapping) - if (lines.length <= options.context * 2 && i < diff.length - 2) { - /*istanbul ignore start*/ - var _curRange2; - - /*istanbul ignore end*/ - // Overlapping - - /*istanbul ignore start*/ - (_curRange2 = - /*istanbul ignore end*/ - curRange).push. - /*istanbul ignore start*/ - apply - /*istanbul ignore end*/ - ( - /*istanbul ignore start*/ - _curRange2 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - contextLines(lines))); - } else { - /*istanbul ignore start*/ - var _curRange3; - - /*istanbul ignore end*/ - // end the range and output - var contextSize = Math.min(lines.length, options.context); - - /*istanbul ignore start*/ - (_curRange3 = - /*istanbul ignore end*/ - curRange).push. - /*istanbul ignore start*/ - apply - /*istanbul ignore end*/ - ( - /*istanbul ignore start*/ - _curRange3 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - contextLines(lines.slice(0, contextSize)))); - - var hunk = { - oldStart: oldRangeStart, - oldLines: oldLine - oldRangeStart + contextSize, - newStart: newRangeStart, - newLines: newLine - newRangeStart + contextSize, - lines: curRange - }; - - if (i >= diff.length - 2 && lines.length <= options.context) { - // EOF is inside this hunk - var oldEOFNewline = /\n$/.test(oldStr); - var newEOFNewline = /\n$/.test(newStr); - var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines; - - if (!oldEOFNewline && noNlBeforeAdds) { - // special case: old has no eol and no trailing context; no-nl can end up before adds - curRange.splice(hunk.oldLines, 0, '\\ No newline at end of file'); - } - - if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) { - curRange.push('\\ No newline at end of file'); - } - } - - hunks.push(hunk); - oldRangeStart = 0; - newRangeStart = 0; - curRange = []; - } - } - - oldLine += lines.length; - newLine += lines.length; - } - }; - - for (var i = 0; i < diff.length; i++) { - /*istanbul ignore start*/ - _loop( - /*istanbul ignore end*/ - i); - } - - return { - oldFileName: oldFileName, - newFileName: newFileName, - oldHeader: oldHeader, - newHeader: newHeader, - hunks: hunks - }; -} - -function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - var diff = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options); - var ret = []; - - if (oldFileName == newFileName) { - ret.push('Index: ' + oldFileName); - } - - ret.push('==================================================================='); - ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader)); - ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader)); - - for (var i = 0; i < diff.hunks.length; i++) { - var hunk = diff.hunks[i]; - ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@'); - ret.push.apply(ret, hunk.lines); - } - - return ret.join('\n') + '\n'; -} - -function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) { - return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wYXRjaC9jcmVhdGUuanMiXSwibmFtZXMiOlsic3RydWN0dXJlZFBhdGNoIiwib2xkRmlsZU5hbWUiLCJuZXdGaWxlTmFtZSIsIm9sZFN0ciIsIm5ld1N0ciIsIm9sZEhlYWRlciIsIm5ld0hlYWRlciIsIm9wdGlvbnMiLCJjb250ZXh0IiwiZGlmZiIsImRpZmZMaW5lcyIsInB1c2giLCJ2YWx1ZSIsImxpbmVzIiwiY29udGV4dExpbmVzIiwibWFwIiwiZW50cnkiLCJodW5rcyIsIm9sZFJhbmdlU3RhcnQiLCJuZXdSYW5nZVN0YXJ0IiwiY3VyUmFuZ2UiLCJvbGRMaW5lIiwibmV3TGluZSIsImkiLCJjdXJyZW50IiwicmVwbGFjZSIsInNwbGl0IiwiYWRkZWQiLCJyZW1vdmVkIiwicHJldiIsInNsaWNlIiwibGVuZ3RoIiwiY29udGV4dFNpemUiLCJNYXRoIiwibWluIiwiaHVuayIsIm9sZFN0YXJ0Iiwib2xkTGluZXMiLCJuZXdTdGFydCIsIm5ld0xpbmVzIiwib2xkRU9GTmV3bGluZSIsInRlc3QiLCJuZXdFT0ZOZXdsaW5lIiwibm9ObEJlZm9yZUFkZHMiLCJzcGxpY2UiLCJjcmVhdGVUd29GaWxlc1BhdGNoIiwicmV0IiwiYXBwbHkiLCJqb2luIiwiY3JlYXRlUGF0Y2giLCJmaWxlTmFtZSJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBOzs7Ozs7Ozs7OztBQUVPLFNBQVNBLGVBQVQsQ0FBeUJDLFdBQXpCLEVBQXNDQyxXQUF0QyxFQUFtREMsTUFBbkQsRUFBMkRDLE1BQTNELEVBQW1FQyxTQUFuRSxFQUE4RUMsU0FBOUUsRUFBeUZDLE9BQXpGLEVBQWtHO0FBQ3ZHLE1BQUksQ0FBQ0EsT0FBTCxFQUFjO0FBQ1pBLElBQUFBLE9BQU8sR0FBRyxFQUFWO0FBQ0Q7O0FBQ0QsTUFBSSxPQUFPQSxPQUFPLENBQUNDLE9BQWYsS0FBMkIsV0FBL0IsRUFBNEM7QUFDMUNELElBQUFBLE9BQU8sQ0FBQ0MsT0FBUixHQUFrQixDQUFsQjtBQUNEOztBQUVELE1BQU1DLElBQUk7QUFBRztBQUFBO0FBQUE7O0FBQUFDO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUFBO0FBQUE7QUFBQSxHQUFVUCxNQUFWLEVBQWtCQyxNQUFsQixFQUEwQkcsT0FBMUIsQ0FBYjtBQUNBRSxFQUFBQSxJQUFJLENBQUNFLElBQUwsQ0FBVTtBQUFDQyxJQUFBQSxLQUFLLEVBQUUsRUFBUjtBQUFZQyxJQUFBQSxLQUFLLEVBQUU7QUFBbkIsR0FBVixFQVR1RyxDQVNwRTs7QUFFbkMsV0FBU0MsWUFBVCxDQUFzQkQsS0FBdEIsRUFBNkI7QUFDM0IsV0FBT0EsS0FBSyxDQUFDRSxHQUFOLENBQVUsVUFBU0MsS0FBVCxFQUFnQjtBQUFFLGFBQU8sTUFBTUEsS0FBYjtBQUFxQixLQUFqRCxDQUFQO0FBQ0Q7O0FBRUQsTUFBSUMsS0FBSyxHQUFHLEVBQVo7QUFDQSxNQUFJQyxhQUFhLEdBQUcsQ0FBcEI7QUFBQSxNQUF1QkMsYUFBYSxHQUFHLENBQXZDO0FBQUEsTUFBMENDLFFBQVEsR0FBRyxFQUFyRDtBQUFBLE1BQ0lDLE9BQU8sR0FBRyxDQURkO0FBQUEsTUFDaUJDLE9BQU8sR0FBRyxDQUQzQjs7QUFoQnVHO0FBQUE7QUFBQTtBQWtCOUZDLEVBQUFBLENBbEI4RjtBQW1CckcsUUFBTUMsT0FBTyxHQUFHZixJQUFJLENBQUNjLENBQUQsQ0FBcEI7QUFBQSxRQUNNVixLQUFLLEdBQUdXLE9BQU8sQ0FBQ1gsS0FBUixJQUFpQlcsT0FBTyxDQUFDWixLQUFSLENBQWNhLE9BQWQsQ0FBc0IsS0FBdEIsRUFBNkIsRUFBN0IsRUFBaUNDLEtBQWpDLENBQXVDLElBQXZDLENBRC9CO0FBRUFGLElBQUFBLE9BQU8sQ0FBQ1gsS0FBUixHQUFnQkEsS0FBaEI7O0FBRUEsUUFBSVcsT0FBTyxDQUFDRyxLQUFSLElBQWlCSCxPQUFPLENBQUNJLE9BQTdCLEVBQXNDO0FBQUE7QUFBQTs7QUFBQTtBQUNwQztBQUNBLFVBQUksQ0FBQ1YsYUFBTCxFQUFvQjtBQUNsQixZQUFNVyxJQUFJLEdBQUdwQixJQUFJLENBQUNjLENBQUMsR0FBRyxDQUFMLENBQWpCO0FBQ0FMLFFBQUFBLGFBQWEsR0FBR0csT0FBaEI7QUFDQUYsUUFBQUEsYUFBYSxHQUFHRyxPQUFoQjs7QUFFQSxZQUFJTyxJQUFKLEVBQVU7QUFDUlQsVUFBQUEsUUFBUSxHQUFHYixPQUFPLENBQUNDLE9BQVIsR0FBa0IsQ0FBbEIsR0FBc0JNLFlBQVksQ0FBQ2UsSUFBSSxDQUFDaEIsS0FBTCxDQUFXaUIsS0FBWCxDQUFpQixDQUFDdkIsT0FBTyxDQUFDQyxPQUExQixDQUFELENBQWxDLEdBQXlFLEVBQXBGO0FBQ0FVLFVBQUFBLGFBQWEsSUFBSUUsUUFBUSxDQUFDVyxNQUExQjtBQUNBWixVQUFBQSxhQUFhLElBQUlDLFFBQVEsQ0FBQ1csTUFBMUI7QUFDRDtBQUNGLE9BWm1DLENBY3BDOzs7QUFDQTtBQUFBO0FBQUE7QUFBQVgsTUFBQUEsUUFBUSxFQUFDVCxJQUFUO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFrQkUsTUFBQUEsS0FBSyxDQUFDRSxHQUFOLENBQVUsVUFBU0MsS0FBVCxFQUFnQjtBQUMxQyxlQUFPLENBQUNRLE9BQU8sQ0FBQ0csS0FBUixHQUFnQixHQUFoQixHQUFzQixHQUF2QixJQUE4QlgsS0FBckM7QUFDRCxPQUZpQixDQUFsQixHQWZvQyxDQW1CcEM7OztBQUNBLFVBQUlRLE9BQU8sQ0FBQ0csS0FBWixFQUFtQjtBQUNqQkwsUUFBQUEsT0FBTyxJQUFJVCxLQUFLLENBQUNrQixNQUFqQjtBQUNELE9BRkQsTUFFTztBQUNMVixRQUFBQSxPQUFPLElBQUlSLEtBQUssQ0FBQ2tCLE1BQWpCO0FBQ0Q7QUFDRixLQXpCRCxNQXlCTztBQUNMO0FBQ0EsVUFBSWIsYUFBSixFQUFtQjtBQUNqQjtBQUNBLFlBQUlMLEtBQUssQ0FBQ2tCLE1BQU4sSUFBZ0J4QixPQUFPLENBQUNDLE9BQVIsR0FBa0IsQ0FBbEMsSUFBdUNlLENBQUMsR0FBR2QsSUFBSSxDQUFDc0IsTUFBTCxHQUFjLENBQTdELEVBQWdFO0FBQUE7QUFBQTs7QUFBQTtBQUM5RDs7QUFDQTtBQUFBO0FBQUE7QUFBQVgsVUFBQUEsUUFBUSxFQUFDVCxJQUFUO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFrQkcsVUFBQUEsWUFBWSxDQUFDRCxLQUFELENBQTlCO0FBQ0QsU0FIRCxNQUdPO0FBQUE7QUFBQTs7QUFBQTtBQUNMO0FBQ0EsY0FBSW1CLFdBQVcsR0FBR0MsSUFBSSxDQUFDQyxHQUFMLENBQVNyQixLQUFLLENBQUNrQixNQUFmLEVBQXVCeEIsT0FBTyxDQUFDQyxPQUEvQixDQUFsQjs7QUFDQTtBQUFBO0FBQUE7QUFBQVksVUFBQUEsUUFBUSxFQUFDVCxJQUFUO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFrQkcsVUFBQUEsWUFBWSxDQUFDRCxLQUFLLENBQUNpQixLQUFOLENBQVksQ0FBWixFQUFlRSxXQUFmLENBQUQsQ0FBOUI7O0FBRUEsY0FBSUcsSUFBSSxHQUFHO0FBQ1RDLFlBQUFBLFFBQVEsRUFBRWxCLGFBREQ7QUFFVG1CLFlBQUFBLFFBQVEsRUFBR2hCLE9BQU8sR0FBR0gsYUFBVixHQUEwQmMsV0FGNUI7QUFHVE0sWUFBQUEsUUFBUSxFQUFFbkIsYUFIRDtBQUlUb0IsWUFBQUEsUUFBUSxFQUFHakIsT0FBTyxHQUFHSCxhQUFWLEdBQTBCYSxXQUo1QjtBQUtUbkIsWUFBQUEsS0FBSyxFQUFFTztBQUxFLFdBQVg7O0FBT0EsY0FBSUcsQ0FBQyxJQUFJZCxJQUFJLENBQUNzQixNQUFMLEdBQWMsQ0FBbkIsSUFBd0JsQixLQUFLLENBQUNrQixNQUFOLElBQWdCeEIsT0FBTyxDQUFDQyxPQUFwRCxFQUE2RDtBQUMzRDtBQUNBLGdCQUFJZ0MsYUFBYSxHQUFLLEtBQUQsQ0FBUUMsSUFBUixDQUFhdEMsTUFBYixDQUFyQjtBQUNBLGdCQUFJdUMsYUFBYSxHQUFLLEtBQUQsQ0FBUUQsSUFBUixDQUFhckMsTUFBYixDQUFyQjtBQUNBLGdCQUFJdUMsY0FBYyxHQUFHOUIsS0FBSyxDQUFDa0IsTUFBTixJQUFnQixDQUFoQixJQUFxQlgsUUFBUSxDQUFDVyxNQUFULEdBQWtCSSxJQUFJLENBQUNFLFFBQWpFOztBQUNBLGdCQUFJLENBQUNHLGFBQUQsSUFBa0JHLGNBQXRCLEVBQXNDO0FBQ3BDO0FBQ0F2QixjQUFBQSxRQUFRLENBQUN3QixNQUFULENBQWdCVCxJQUFJLENBQUNFLFFBQXJCLEVBQStCLENBQS9CLEVBQWtDLDhCQUFsQztBQUNEOztBQUNELGdCQUFLLENBQUNHLGFBQUQsSUFBa0IsQ0FBQ0csY0FBcEIsSUFBdUMsQ0FBQ0QsYUFBNUMsRUFBMkQ7QUFDekR0QixjQUFBQSxRQUFRLENBQUNULElBQVQsQ0FBYyw4QkFBZDtBQUNEO0FBQ0Y7O0FBQ0RNLFVBQUFBLEtBQUssQ0FBQ04sSUFBTixDQUFXd0IsSUFBWDtBQUVBakIsVUFBQUEsYUFBYSxHQUFHLENBQWhCO0FBQ0FDLFVBQUFBLGFBQWEsR0FBRyxDQUFoQjtBQUNBQyxVQUFBQSxRQUFRLEdBQUcsRUFBWDtBQUNEO0FBQ0Y7O0FBQ0RDLE1BQUFBLE9BQU8sSUFBSVIsS0FBSyxDQUFDa0IsTUFBakI7QUFDQVQsTUFBQUEsT0FBTyxJQUFJVCxLQUFLLENBQUNrQixNQUFqQjtBQUNEO0FBekZvRzs7QUFrQnZHLE9BQUssSUFBSVIsQ0FBQyxHQUFHLENBQWIsRUFBZ0JBLENBQUMsR0FBR2QsSUFBSSxDQUFDc0IsTUFBekIsRUFBaUNSLENBQUMsRUFBbEMsRUFBc0M7QUFBQTtBQUFBO0FBQUE7QUFBN0JBLElBQUFBLENBQTZCO0FBd0VyQzs7QUFFRCxTQUFPO0FBQ0x0QixJQUFBQSxXQUFXLEVBQUVBLFdBRFI7QUFDcUJDLElBQUFBLFdBQVcsRUFBRUEsV0FEbEM7QUFFTEcsSUFBQUEsU0FBUyxFQUFFQSxTQUZOO0FBRWlCQyxJQUFBQSxTQUFTLEVBQUVBLFNBRjVCO0FBR0xXLElBQUFBLEtBQUssRUFBRUE7QUFIRixHQUFQO0FBS0Q7O0FBRU0sU0FBUzRCLG1CQUFULENBQTZCNUMsV0FBN0IsRUFBMENDLFdBQTFDLEVBQXVEQyxNQUF2RCxFQUErREMsTUFBL0QsRUFBdUVDLFNBQXZFLEVBQWtGQyxTQUFsRixFQUE2RkMsT0FBN0YsRUFBc0c7QUFDM0csTUFBTUUsSUFBSSxHQUFHVCxlQUFlLENBQUNDLFdBQUQsRUFBY0MsV0FBZCxFQUEyQkMsTUFBM0IsRUFBbUNDLE1BQW5DLEVBQTJDQyxTQUEzQyxFQUFzREMsU0FBdEQsRUFBaUVDLE9BQWpFLENBQTVCO0FBRUEsTUFBTXVDLEdBQUcsR0FBRyxFQUFaOztBQUNBLE1BQUk3QyxXQUFXLElBQUlDLFdBQW5CLEVBQWdDO0FBQzlCNEMsSUFBQUEsR0FBRyxDQUFDbkMsSUFBSixDQUFTLFlBQVlWLFdBQXJCO0FBQ0Q7O0FBQ0Q2QyxFQUFBQSxHQUFHLENBQUNuQyxJQUFKLENBQVMscUVBQVQ7QUFDQW1DLEVBQUFBLEdBQUcsQ0FBQ25DLElBQUosQ0FBUyxTQUFTRixJQUFJLENBQUNSLFdBQWQsSUFBNkIsT0FBT1EsSUFBSSxDQUFDSixTQUFaLEtBQTBCLFdBQTFCLEdBQXdDLEVBQXhDLEdBQTZDLE9BQU9JLElBQUksQ0FBQ0osU0FBdEYsQ0FBVDtBQUNBeUMsRUFBQUEsR0FBRyxDQUFDbkMsSUFBSixDQUFTLFNBQVNGLElBQUksQ0FBQ1AsV0FBZCxJQUE2QixPQUFPTyxJQUFJLENBQUNILFNBQVosS0FBMEIsV0FBMUIsR0FBd0MsRUFBeEMsR0FBNkMsT0FBT0csSUFBSSxDQUFDSCxTQUF0RixDQUFUOztBQUVBLE9BQUssSUFBSWlCLENBQUMsR0FBRyxDQUFiLEVBQWdCQSxDQUFDLEdBQUdkLElBQUksQ0FBQ1EsS0FBTCxDQUFXYyxNQUEvQixFQUF1Q1IsQ0FBQyxFQUF4QyxFQUE0QztBQUMxQyxRQUFNWSxJQUFJLEdBQUcxQixJQUFJLENBQUNRLEtBQUwsQ0FBV00sQ0FBWCxDQUFiO0FBQ0F1QixJQUFBQSxHQUFHLENBQUNuQyxJQUFKLENBQ0UsU0FBU3dCLElBQUksQ0FBQ0MsUUFBZCxHQUF5QixHQUF6QixHQUErQkQsSUFBSSxDQUFDRSxRQUFwQyxHQUNFLElBREYsR0FDU0YsSUFBSSxDQUFDRyxRQURkLEdBQ3lCLEdBRHpCLEdBQytCSCxJQUFJLENBQUNJLFFBRHBDLEdBRUUsS0FISjtBQUtBTyxJQUFBQSxHQUFHLENBQUNuQyxJQUFKLENBQVNvQyxLQUFULENBQWVELEdBQWYsRUFBb0JYLElBQUksQ0FBQ3RCLEtBQXpCO0FBQ0Q7O0FBRUQsU0FBT2lDLEdBQUcsQ0FBQ0UsSUFBSixDQUFTLElBQVQsSUFBaUIsSUFBeEI7QUFDRDs7QUFFTSxTQUFTQyxXQUFULENBQXFCQyxRQUFyQixFQUErQi9DLE1BQS9CLEVBQXVDQyxNQUF2QyxFQUErQ0MsU0FBL0MsRUFBMERDLFNBQTFELEVBQXFFQyxPQUFyRSxFQUE4RTtBQUNuRixTQUFPc0MsbUJBQW1CLENBQUNLLFFBQUQsRUFBV0EsUUFBWCxFQUFxQi9DLE1BQXJCLEVBQTZCQyxNQUE3QixFQUFxQ0MsU0FBckMsRUFBZ0RDLFNBQWhELEVBQTJEQyxPQUEzRCxDQUExQjtBQUNEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtkaWZmTGluZXN9IGZyb20gJy4uL2RpZmYvbGluZSc7XG5cbmV4cG9ydCBmdW5jdGlvbiBzdHJ1Y3R1cmVkUGF0Y2gob2xkRmlsZU5hbWUsIG5ld0ZpbGVOYW1lLCBvbGRTdHIsIG5ld1N0ciwgb2xkSGVhZGVyLCBuZXdIZWFkZXIsIG9wdGlvbnMpIHtcbiAgaWYgKCFvcHRpb25zKSB7XG4gICAgb3B0aW9ucyA9IHt9O1xuICB9XG4gIGlmICh0eXBlb2Ygb3B0aW9ucy5jb250ZXh0ID09PSAndW5kZWZpbmVkJykge1xuICAgIG9wdGlvbnMuY29udGV4dCA9IDQ7XG4gIH1cblxuICBjb25zdCBkaWZmID0gZGlmZkxpbmVzKG9sZFN0ciwgbmV3U3RyLCBvcHRpb25zKTtcbiAgZGlmZi5wdXNoKHt2YWx1ZTogJycsIGxpbmVzOiBbXX0pOyAvLyBBcHBlbmQgYW4gZW1wdHkgdmFsdWUgdG8gbWFrZSBjbGVhbnVwIGVhc2llclxuXG4gIGZ1bmN0aW9uIGNvbnRleHRMaW5lcyhsaW5lcykge1xuICAgIHJldHVybiBsaW5lcy5tYXAoZnVuY3Rpb24oZW50cnkpIHsgcmV0dXJuICcgJyArIGVudHJ5OyB9KTtcbiAgfVxuXG4gIGxldCBodW5rcyA9IFtdO1xuICBsZXQgb2xkUmFuZ2VTdGFydCA9IDAsIG5ld1JhbmdlU3RhcnQgPSAwLCBjdXJSYW5nZSA9IFtdLFxuICAgICAgb2xkTGluZSA9IDEsIG5ld0xpbmUgPSAxO1xuICBmb3IgKGxldCBpID0gMDsgaSA8IGRpZmYubGVuZ3RoOyBpKyspIHtcbiAgICBjb25zdCBjdXJyZW50ID0gZGlmZltpXSxcbiAgICAgICAgICBsaW5lcyA9IGN1cnJlbnQubGluZXMgfHwgY3VycmVudC52YWx1ZS5yZXBsYWNlKC9cXG4kLywgJycpLnNwbGl0KCdcXG4nKTtcbiAgICBjdXJyZW50LmxpbmVzID0gbGluZXM7XG5cbiAgICBpZiAoY3VycmVudC5hZGRlZCB8fCBjdXJyZW50LnJlbW92ZWQpIHtcbiAgICAgIC8vIElmIHdlIGhhdmUgcHJldmlvdXMgY29udGV4dCwgc3RhcnQgd2l0aCB0aGF0XG4gICAgICBpZiAoIW9sZFJhbmdlU3RhcnQpIHtcbiAgICAgICAgY29uc3QgcHJldiA9IGRpZmZbaSAtIDFdO1xuICAgICAgICBvbGRSYW5nZVN0YXJ0ID0gb2xkTGluZTtcbiAgICAgICAgbmV3UmFuZ2VTdGFydCA9IG5ld0xpbmU7XG5cbiAgICAgICAgaWYgKHByZXYpIHtcbiAgICAgICAgICBjdXJSYW5nZSA9IG9wdGlvbnMuY29udGV4dCA+IDAgPyBjb250ZXh0TGluZXMocHJldi5saW5lcy5zbGljZSgtb3B0aW9ucy5jb250ZXh0KSkgOiBbXTtcbiAgICAgICAgICBvbGRSYW5nZVN0YXJ0IC09IGN1clJhbmdlLmxlbmd0aDtcbiAgICAgICAgICBuZXdSYW5nZVN0YXJ0IC09IGN1clJhbmdlLmxlbmd0aDtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICAvLyBPdXRwdXQgb3VyIGNoYW5nZXNcbiAgICAgIGN1clJhbmdlLnB1c2goLi4uIGxpbmVzLm1hcChmdW5jdGlvbihlbnRyeSkge1xuICAgICAgICByZXR1cm4gKGN1cnJlbnQuYWRkZWQgPyAnKycgOiAnLScpICsgZW50cnk7XG4gICAgICB9KSk7XG5cbiAgICAgIC8vIFRyYWNrIHRoZSB1cGRhdGVkIGZpbGUgcG9zaXRpb25cbiAgICAgIGlmIChjdXJyZW50LmFkZGVkKSB7XG4gICAgICAgIG5ld0xpbmUgKz0gbGluZXMubGVuZ3RoO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgb2xkTGluZSArPSBsaW5lcy5sZW5ndGg7XG4gICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgIC8vIElkZW50aWNhbCBjb250ZXh0IGxpbmVzLiBUcmFjayBsaW5lIGNoYW5nZXNcbiAgICAgIGlmIChvbGRSYW5nZVN0YXJ0KSB7XG4gICAgICAgIC8vIENsb3NlIG91dCBhbnkgY2hhbmdlcyB0aGF0IGhhdmUgYmVlbiBvdXRwdXQgKG9yIGpvaW4gb3ZlcmxhcHBpbmcpXG4gICAgICAgIGlmIChsaW5lcy5sZW5ndGggPD0gb3B0aW9ucy5jb250ZXh0ICogMiAmJiBpIDwgZGlmZi5sZW5ndGggLSAyKSB7XG4gICAgICAgICAgLy8gT3ZlcmxhcHBpbmdcbiAgICAgICAgICBjdXJSYW5nZS5wdXNoKC4uLiBjb250ZXh0TGluZXMobGluZXMpKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAvLyBlbmQgdGhlIHJhbmdlIGFuZCBvdXRwdXRcbiAgICAgICAgICBsZXQgY29udGV4dFNpemUgPSBNYXRoLm1pbihsaW5lcy5sZW5ndGgsIG9wdGlvbnMuY29udGV4dCk7XG4gICAgICAgICAgY3VyUmFuZ2UucHVzaCguLi4gY29udGV4dExpbmVzKGxpbmVzLnNsaWNlKDAsIGNvbnRleHRTaXplKSkpO1xuXG4gICAgICAgICAgbGV0IGh1bmsgPSB7XG4gICAgICAgICAgICBvbGRTdGFydDogb2xkUmFuZ2VTdGFydCxcbiAgICAgICAgICAgIG9sZExpbmVzOiAob2xkTGluZSAtIG9sZFJhbmdlU3RhcnQgKyBjb250ZXh0U2l6ZSksXG4gICAgICAgICAgICBuZXdTdGFydDogbmV3UmFuZ2VTdGFydCxcbiAgICAgICAgICAgIG5ld0xpbmVzOiAobmV3TGluZSAtIG5ld1JhbmdlU3RhcnQgKyBjb250ZXh0U2l6ZSksXG4gICAgICAgICAgICBsaW5lczogY3VyUmFuZ2VcbiAgICAgICAgICB9O1xuICAgICAgICAgIGlmIChpID49IGRpZmYubGVuZ3RoIC0gMiAmJiBsaW5lcy5sZW5ndGggPD0gb3B0aW9ucy5jb250ZXh0KSB7XG4gICAgICAgICAgICAvLyBFT0YgaXMgaW5zaWRlIHRoaXMgaHVua1xuICAgICAgICAgICAgbGV0IG9sZEVPRk5ld2xpbmUgPSAoKC9cXG4kLykudGVzdChvbGRTdHIpKTtcbiAgICAgICAgICAgIGxldCBuZXdFT0ZOZXdsaW5lID0gKCgvXFxuJC8pLnRlc3QobmV3U3RyKSk7XG4gICAgICAgICAgICBsZXQgbm9ObEJlZm9yZUFkZHMgPSBsaW5lcy5sZW5ndGggPT0gMCAmJiBjdXJSYW5nZS5sZW5ndGggPiBodW5rLm9sZExpbmVzO1xuICAgICAgICAgICAgaWYgKCFvbGRFT0ZOZXdsaW5lICYmIG5vTmxCZWZvcmVBZGRzKSB7XG4gICAgICAgICAgICAgIC8vIHNwZWNpYWwgY2FzZTogb2xkIGhhcyBubyBlb2wgYW5kIG5vIHRyYWlsaW5nIGNvbnRleHQ7IG5vLW5sIGNhbiBlbmQgdXAgYmVmb3JlIGFkZHNcbiAgICAgICAgICAgICAgY3VyUmFuZ2Uuc3BsaWNlKGh1bmsub2xkTGluZXMsIDAsICdcXFxcIE5vIG5ld2xpbmUgYXQgZW5kIG9mIGZpbGUnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgoIW9sZEVPRk5ld2xpbmUgJiYgIW5vTmxCZWZvcmVBZGRzKSB8fCAhbmV3RU9GTmV3bGluZSkge1xuICAgICAgICAgICAgICBjdXJSYW5nZS5wdXNoKCdcXFxcIE5vIG5ld2xpbmUgYXQgZW5kIG9mIGZpbGUnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgaHVua3MucHVzaChodW5rKTtcblxuICAgICAgICAgIG9sZFJhbmdlU3RhcnQgPSAwO1xuICAgICAgICAgIG5ld1JhbmdlU3RhcnQgPSAwO1xuICAgICAgICAgIGN1clJhbmdlID0gW107XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIG9sZExpbmUgKz0gbGluZXMubGVuZ3RoO1xuICAgICAgbmV3TGluZSArPSBsaW5lcy5sZW5ndGg7XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIHtcbiAgICBvbGRGaWxlTmFtZTogb2xkRmlsZU5hbWUsIG5ld0ZpbGVOYW1lOiBuZXdGaWxlTmFtZSxcbiAgICBvbGRIZWFkZXI6IG9sZEhlYWRlciwgbmV3SGVhZGVyOiBuZXdIZWFkZXIsXG4gICAgaHVua3M6IGh1bmtzXG4gIH07XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBjcmVhdGVUd29GaWxlc1BhdGNoKG9sZEZpbGVOYW1lLCBuZXdGaWxlTmFtZSwgb2xkU3RyLCBuZXdTdHIsIG9sZEhlYWRlciwgbmV3SGVhZGVyLCBvcHRpb25zKSB7XG4gIGNvbnN0IGRpZmYgPSBzdHJ1Y3R1cmVkUGF0Y2gob2xkRmlsZU5hbWUsIG5ld0ZpbGVOYW1lLCBvbGRTdHIsIG5ld1N0ciwgb2xkSGVhZGVyLCBuZXdIZWFkZXIsIG9wdGlvbnMpO1xuXG4gIGNvbnN0IHJldCA9IFtdO1xuICBpZiAob2xkRmlsZU5hbWUgPT0gbmV3RmlsZU5hbWUpIHtcbiAgICByZXQucHVzaCgnSW5kZXg6ICcgKyBvbGRGaWxlTmFtZSk7XG4gIH1cbiAgcmV0LnB1c2goJz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0nKTtcbiAgcmV0LnB1c2goJy0tLSAnICsgZGlmZi5vbGRGaWxlTmFtZSArICh0eXBlb2YgZGlmZi5vbGRIZWFkZXIgPT09ICd1bmRlZmluZWQnID8gJycgOiAnXFx0JyArIGRpZmYub2xkSGVhZGVyKSk7XG4gIHJldC5wdXNoKCcrKysgJyArIGRpZmYubmV3RmlsZU5hbWUgKyAodHlwZW9mIGRpZmYubmV3SGVhZGVyID09PSAndW5kZWZpbmVkJyA/ICcnIDogJ1xcdCcgKyBkaWZmLm5ld0hlYWRlcikpO1xuXG4gIGZvciAobGV0IGkgPSAwOyBpIDwgZGlmZi5odW5rcy5sZW5ndGg7IGkrKykge1xuICAgIGNvbnN0IGh1bmsgPSBkaWZmLmh1bmtzW2ldO1xuICAgIHJldC5wdXNoKFxuICAgICAgJ0BAIC0nICsgaHVuay5vbGRTdGFydCArICcsJyArIGh1bmsub2xkTGluZXNcbiAgICAgICsgJyArJyArIGh1bmsubmV3U3RhcnQgKyAnLCcgKyBodW5rLm5ld0xpbmVzXG4gICAgICArICcgQEAnXG4gICAgKTtcbiAgICByZXQucHVzaC5hcHBseShyZXQsIGh1bmsubGluZXMpO1xuICB9XG5cbiAgcmV0dXJuIHJldC5qb2luKCdcXG4nKSArICdcXG4nO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gY3JlYXRlUGF0Y2goZmlsZU5hbWUsIG9sZFN0ciwgbmV3U3RyLCBvbGRIZWFkZXIsIG5ld0hlYWRlciwgb3B0aW9ucykge1xuICByZXR1cm4gY3JlYXRlVHdvRmlsZXNQYXRjaChmaWxlTmFtZSwgZmlsZU5hbWUsIG9sZFN0ciwgbmV3U3RyLCBvbGRIZWFkZXIsIG5ld0hlYWRlciwgb3B0aW9ucyk7XG59XG4iXX0= diff --git a/node_modules/diff/lib/patch/merge.js b/node_modules/diff/lib/patch/merge.js deleted file mode 100644 index bbd429a..0000000 --- a/node_modules/diff/lib/patch/merge.js +++ /dev/null @@ -1,609 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.calcLineCount = calcLineCount; -exports.merge = merge; - -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_create = require("./create") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_parse = require("./parse") -/*istanbul ignore end*/ -; - -var -/*istanbul ignore start*/ -_array = require("../util/array") -/*istanbul ignore end*/ -; - -/*istanbul ignore start*/ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } - -function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } - -function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } - -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } - -/*istanbul ignore end*/ -function calcLineCount(hunk) { - /*istanbul ignore start*/ - var _calcOldNewLineCount = - /*istanbul ignore end*/ - calcOldNewLineCount(hunk.lines), - oldLines = _calcOldNewLineCount.oldLines, - newLines = _calcOldNewLineCount.newLines; - - if (oldLines !== undefined) { - hunk.oldLines = oldLines; - } else { - delete hunk.oldLines; - } - - if (newLines !== undefined) { - hunk.newLines = newLines; - } else { - delete hunk.newLines; - } -} - -function merge(mine, theirs, base) { - mine = loadPatch(mine, base); - theirs = loadPatch(theirs, base); - var ret = {}; // For index we just let it pass through as it doesn't have any necessary meaning. - // Leaving sanity checks on this to the API consumer that may know more about the - // meaning in their own context. - - if (mine.index || theirs.index) { - ret.index = mine.index || theirs.index; - } - - if (mine.newFileName || theirs.newFileName) { - if (!fileNameChanged(mine)) { - // No header or no change in ours, use theirs (and ours if theirs does not exist) - ret.oldFileName = theirs.oldFileName || mine.oldFileName; - ret.newFileName = theirs.newFileName || mine.newFileName; - ret.oldHeader = theirs.oldHeader || mine.oldHeader; - ret.newHeader = theirs.newHeader || mine.newHeader; - } else if (!fileNameChanged(theirs)) { - // No header or no change in theirs, use ours - ret.oldFileName = mine.oldFileName; - ret.newFileName = mine.newFileName; - ret.oldHeader = mine.oldHeader; - ret.newHeader = mine.newHeader; - } else { - // Both changed... figure it out - ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName); - ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName); - ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader); - ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader); - } - } - - ret.hunks = []; - var mineIndex = 0, - theirsIndex = 0, - mineOffset = 0, - theirsOffset = 0; - - while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) { - var mineCurrent = mine.hunks[mineIndex] || { - oldStart: Infinity - }, - theirsCurrent = theirs.hunks[theirsIndex] || { - oldStart: Infinity - }; - - if (hunkBefore(mineCurrent, theirsCurrent)) { - // This patch does not overlap with any of the others, yay. - ret.hunks.push(cloneHunk(mineCurrent, mineOffset)); - mineIndex++; - theirsOffset += mineCurrent.newLines - mineCurrent.oldLines; - } else if (hunkBefore(theirsCurrent, mineCurrent)) { - // This patch does not overlap with any of the others, yay. - ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset)); - theirsIndex++; - mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines; - } else { - // Overlap, merge as best we can - var mergedHunk = { - oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart), - oldLines: 0, - newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset), - newLines: 0, - lines: [] - }; - mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines); - theirsIndex++; - mineIndex++; - ret.hunks.push(mergedHunk); - } - } - - return ret; -} - -function loadPatch(param, base) { - if (typeof param === 'string') { - if (/^@@/m.test(param) || /^Index:/m.test(param)) { - return ( - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - _parse - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - parsePatch) - /*istanbul ignore end*/ - (param)[0] - ); - } - - if (!base) { - throw new Error('Must provide a base reference or pass in a patch'); - } - - return ( - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - _create - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - structuredPatch) - /*istanbul ignore end*/ - (undefined, undefined, base, param) - ); - } - - return param; -} - -function fileNameChanged(patch) { - return patch.newFileName && patch.newFileName !== patch.oldFileName; -} - -function selectField(index, mine, theirs) { - if (mine === theirs) { - return mine; - } else { - index.conflict = true; - return { - mine: mine, - theirs: theirs - }; - } -} - -function hunkBefore(test, check) { - return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart; -} - -function cloneHunk(hunk, offset) { - return { - oldStart: hunk.oldStart, - oldLines: hunk.oldLines, - newStart: hunk.newStart + offset, - newLines: hunk.newLines, - lines: hunk.lines - }; -} - -function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) { - // This will generally result in a conflicted hunk, but there are cases where the context - // is the only overlap where we can successfully merge the content here. - var mine = { - offset: mineOffset, - lines: mineLines, - index: 0 - }, - their = { - offset: theirOffset, - lines: theirLines, - index: 0 - }; // Handle any leading content - - insertLeading(hunk, mine, their); - insertLeading(hunk, their, mine); // Now in the overlap content. Scan through and select the best changes from each. - - while (mine.index < mine.lines.length && their.index < their.lines.length) { - var mineCurrent = mine.lines[mine.index], - theirCurrent = their.lines[their.index]; - - if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) { - // Both modified ... - mutualChange(hunk, mine, their); - } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') { - /*istanbul ignore start*/ - var _hunk$lines; - - /*istanbul ignore end*/ - // Mine inserted - - /*istanbul ignore start*/ - (_hunk$lines = - /*istanbul ignore end*/ - hunk.lines).push. - /*istanbul ignore start*/ - apply - /*istanbul ignore end*/ - ( - /*istanbul ignore start*/ - _hunk$lines - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - collectChange(mine))); - } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') { - /*istanbul ignore start*/ - var _hunk$lines2; - - /*istanbul ignore end*/ - // Theirs inserted - - /*istanbul ignore start*/ - (_hunk$lines2 = - /*istanbul ignore end*/ - hunk.lines).push. - /*istanbul ignore start*/ - apply - /*istanbul ignore end*/ - ( - /*istanbul ignore start*/ - _hunk$lines2 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - collectChange(their))); - } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') { - // Mine removed or edited - removal(hunk, mine, their); - } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') { - // Their removed or edited - removal(hunk, their, mine, true); - } else if (mineCurrent === theirCurrent) { - // Context identity - hunk.lines.push(mineCurrent); - mine.index++; - their.index++; - } else { - // Context mismatch - conflict(hunk, collectChange(mine), collectChange(their)); - } - } // Now push anything that may be remaining - - - insertTrailing(hunk, mine); - insertTrailing(hunk, their); - calcLineCount(hunk); -} - -function mutualChange(hunk, mine, their) { - var myChanges = collectChange(mine), - theirChanges = collectChange(their); - - if (allRemoves(myChanges) && allRemoves(theirChanges)) { - // Special case for remove changes that are supersets of one another - if ( - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - _array - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - arrayStartsWith) - /*istanbul ignore end*/ - (myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) { - /*istanbul ignore start*/ - var _hunk$lines3; - - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - (_hunk$lines3 = - /*istanbul ignore end*/ - hunk.lines).push. - /*istanbul ignore start*/ - apply - /*istanbul ignore end*/ - ( - /*istanbul ignore start*/ - _hunk$lines3 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - myChanges)); - - return; - } else if ( - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - _array - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - arrayStartsWith) - /*istanbul ignore end*/ - (theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) { - /*istanbul ignore start*/ - var _hunk$lines4; - - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - (_hunk$lines4 = - /*istanbul ignore end*/ - hunk.lines).push. - /*istanbul ignore start*/ - apply - /*istanbul ignore end*/ - ( - /*istanbul ignore start*/ - _hunk$lines4 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - theirChanges)); - - return; - } - } else if ( - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - _array - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - arrayEqual) - /*istanbul ignore end*/ - (myChanges, theirChanges)) { - /*istanbul ignore start*/ - var _hunk$lines5; - - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - (_hunk$lines5 = - /*istanbul ignore end*/ - hunk.lines).push. - /*istanbul ignore start*/ - apply - /*istanbul ignore end*/ - ( - /*istanbul ignore start*/ - _hunk$lines5 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - myChanges)); - - return; - } - - conflict(hunk, myChanges, theirChanges); -} - -function removal(hunk, mine, their, swap) { - var myChanges = collectChange(mine), - theirChanges = collectContext(their, myChanges); - - if (theirChanges.merged) { - /*istanbul ignore start*/ - var _hunk$lines6; - - /*istanbul ignore end*/ - - /*istanbul ignore start*/ - (_hunk$lines6 = - /*istanbul ignore end*/ - hunk.lines).push. - /*istanbul ignore start*/ - apply - /*istanbul ignore end*/ - ( - /*istanbul ignore start*/ - _hunk$lines6 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - theirChanges.merged)); - } else { - conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges); - } -} - -function conflict(hunk, mine, their) { - hunk.conflict = true; - hunk.lines.push({ - conflict: true, - mine: mine, - theirs: their - }); -} - -function insertLeading(hunk, insert, their) { - while (insert.offset < their.offset && insert.index < insert.lines.length) { - var line = insert.lines[insert.index++]; - hunk.lines.push(line); - insert.offset++; - } -} - -function insertTrailing(hunk, insert) { - while (insert.index < insert.lines.length) { - var line = insert.lines[insert.index++]; - hunk.lines.push(line); - } -} - -function collectChange(state) { - var ret = [], - operation = state.lines[state.index][0]; - - while (state.index < state.lines.length) { - var line = state.lines[state.index]; // Group additions that are immediately after subtractions and treat them as one "atomic" modify change. - - if (operation === '-' && line[0] === '+') { - operation = '+'; - } - - if (operation === line[0]) { - ret.push(line); - state.index++; - } else { - break; - } - } - - return ret; -} - -function collectContext(state, matchChanges) { - var changes = [], - merged = [], - matchIndex = 0, - contextChanges = false, - conflicted = false; - - while (matchIndex < matchChanges.length && state.index < state.lines.length) { - var change = state.lines[state.index], - match = matchChanges[matchIndex]; // Once we've hit our add, then we are done - - if (match[0] === '+') { - break; - } - - contextChanges = contextChanges || change[0] !== ' '; - merged.push(match); - matchIndex++; // Consume any additions in the other block as a conflict to attempt - // to pull in the remaining context after this - - if (change[0] === '+') { - conflicted = true; - - while (change[0] === '+') { - changes.push(change); - change = state.lines[++state.index]; - } - } - - if (match.substr(1) === change.substr(1)) { - changes.push(change); - state.index++; - } else { - conflicted = true; - } - } - - if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) { - conflicted = true; - } - - if (conflicted) { - return changes; - } - - while (matchIndex < matchChanges.length) { - merged.push(matchChanges[matchIndex++]); - } - - return { - merged: merged, - changes: changes - }; -} - -function allRemoves(changes) { - return changes.reduce(function (prev, change) { - return prev && change[0] === '-'; - }, true); -} - -function skipRemoveSuperset(state, removeChanges, delta) { - for (var i = 0; i < delta; i++) { - var changeContent = removeChanges[removeChanges.length - delta + i].substr(1); - - if (state.lines[state.index + i] !== ' ' + changeContent) { - return false; - } - } - - state.index += delta; - return true; -} - -function calcOldNewLineCount(lines) { - var oldLines = 0; - var newLines = 0; - lines.forEach(function (line) { - if (typeof line !== 'string') { - var myCount = calcOldNewLineCount(line.mine); - var theirCount = calcOldNewLineCount(line.theirs); - - if (oldLines !== undefined) { - if (myCount.oldLines === theirCount.oldLines) { - oldLines += myCount.oldLines; - } else { - oldLines = undefined; - } - } - - if (newLines !== undefined) { - if (myCount.newLines === theirCount.newLines) { - newLines += myCount.newLines; - } else { - newLines = undefined; - } - } - } else { - if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) { - newLines++; - } - - if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) { - oldLines++; - } - } - }); - return { - oldLines: oldLines, - newLines: newLines - }; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wYXRjaC9tZXJnZS5qcyJdLCJuYW1lcyI6WyJjYWxjTGluZUNvdW50IiwiaHVuayIsImNhbGNPbGROZXdMaW5lQ291bnQiLCJsaW5lcyIsIm9sZExpbmVzIiwibmV3TGluZXMiLCJ1bmRlZmluZWQiLCJtZXJnZSIsIm1pbmUiLCJ0aGVpcnMiLCJiYXNlIiwibG9hZFBhdGNoIiwicmV0IiwiaW5kZXgiLCJuZXdGaWxlTmFtZSIsImZpbGVOYW1lQ2hhbmdlZCIsIm9sZEZpbGVOYW1lIiwib2xkSGVhZGVyIiwibmV3SGVhZGVyIiwic2VsZWN0RmllbGQiLCJodW5rcyIsIm1pbmVJbmRleCIsInRoZWlyc0luZGV4IiwibWluZU9mZnNldCIsInRoZWlyc09mZnNldCIsImxlbmd0aCIsIm1pbmVDdXJyZW50Iiwib2xkU3RhcnQiLCJJbmZpbml0eSIsInRoZWlyc0N1cnJlbnQiLCJodW5rQmVmb3JlIiwicHVzaCIsImNsb25lSHVuayIsIm1lcmdlZEh1bmsiLCJNYXRoIiwibWluIiwibmV3U3RhcnQiLCJtZXJnZUxpbmVzIiwicGFyYW0iLCJ0ZXN0IiwicGFyc2VQYXRjaCIsIkVycm9yIiwic3RydWN0dXJlZFBhdGNoIiwicGF0Y2giLCJjb25mbGljdCIsImNoZWNrIiwib2Zmc2V0IiwibWluZUxpbmVzIiwidGhlaXJPZmZzZXQiLCJ0aGVpckxpbmVzIiwidGhlaXIiLCJpbnNlcnRMZWFkaW5nIiwidGhlaXJDdXJyZW50IiwibXV0dWFsQ2hhbmdlIiwiY29sbGVjdENoYW5nZSIsInJlbW92YWwiLCJpbnNlcnRUcmFpbGluZyIsIm15Q2hhbmdlcyIsInRoZWlyQ2hhbmdlcyIsImFsbFJlbW92ZXMiLCJhcnJheVN0YXJ0c1dpdGgiLCJza2lwUmVtb3ZlU3VwZXJzZXQiLCJhcnJheUVxdWFsIiwic3dhcCIsImNvbGxlY3RDb250ZXh0IiwibWVyZ2VkIiwiaW5zZXJ0IiwibGluZSIsInN0YXRlIiwib3BlcmF0aW9uIiwibWF0Y2hDaGFuZ2VzIiwiY2hhbmdlcyIsIm1hdGNoSW5kZXgiLCJjb250ZXh0Q2hhbmdlcyIsImNvbmZsaWN0ZWQiLCJjaGFuZ2UiLCJtYXRjaCIsInN1YnN0ciIsInJlZHVjZSIsInByZXYiLCJyZW1vdmVDaGFuZ2VzIiwiZGVsdGEiLCJpIiwiY2hhbmdlQ29udGVudCIsImZvckVhY2giLCJteUNvdW50IiwidGhlaXJDb3VudCJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7O0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFBQTs7QUFFQTtBQUFBO0FBQUE7QUFBQTtBQUFBOzs7Ozs7Ozs7OztBQUVPLFNBQVNBLGFBQVQsQ0FBdUJDLElBQXZCLEVBQTZCO0FBQUE7QUFBQTtBQUFBO0FBQ0xDLEVBQUFBLG1CQUFtQixDQUFDRCxJQUFJLENBQUNFLEtBQU4sQ0FEZDtBQUFBLE1BQzNCQyxRQUQyQix3QkFDM0JBLFFBRDJCO0FBQUEsTUFDakJDLFFBRGlCLHdCQUNqQkEsUUFEaUI7O0FBR2xDLE1BQUlELFFBQVEsS0FBS0UsU0FBakIsRUFBNEI7QUFDMUJMLElBQUFBLElBQUksQ0FBQ0csUUFBTCxHQUFnQkEsUUFBaEI7QUFDRCxHQUZELE1BRU87QUFDTCxXQUFPSCxJQUFJLENBQUNHLFFBQVo7QUFDRDs7QUFFRCxNQUFJQyxRQUFRLEtBQUtDLFNBQWpCLEVBQTRCO0FBQzFCTCxJQUFBQSxJQUFJLENBQUNJLFFBQUwsR0FBZ0JBLFFBQWhCO0FBQ0QsR0FGRCxNQUVPO0FBQ0wsV0FBT0osSUFBSSxDQUFDSSxRQUFaO0FBQ0Q7QUFDRjs7QUFFTSxTQUFTRSxLQUFULENBQWVDLElBQWYsRUFBcUJDLE1BQXJCLEVBQTZCQyxJQUE3QixFQUFtQztBQUN4Q0YsRUFBQUEsSUFBSSxHQUFHRyxTQUFTLENBQUNILElBQUQsRUFBT0UsSUFBUCxDQUFoQjtBQUNBRCxFQUFBQSxNQUFNLEdBQUdFLFNBQVMsQ0FBQ0YsTUFBRCxFQUFTQyxJQUFULENBQWxCO0FBRUEsTUFBSUUsR0FBRyxHQUFHLEVBQVYsQ0FKd0MsQ0FNeEM7QUFDQTtBQUNBOztBQUNBLE1BQUlKLElBQUksQ0FBQ0ssS0FBTCxJQUFjSixNQUFNLENBQUNJLEtBQXpCLEVBQWdDO0FBQzlCRCxJQUFBQSxHQUFHLENBQUNDLEtBQUosR0FBWUwsSUFBSSxDQUFDSyxLQUFMLElBQWNKLE1BQU0sQ0FBQ0ksS0FBakM7QUFDRDs7QUFFRCxNQUFJTCxJQUFJLENBQUNNLFdBQUwsSUFBb0JMLE1BQU0sQ0FBQ0ssV0FBL0IsRUFBNEM7QUFDMUMsUUFBSSxDQUFDQyxlQUFlLENBQUNQLElBQUQsQ0FBcEIsRUFBNEI7QUFDMUI7QUFDQUksTUFBQUEsR0FBRyxDQUFDSSxXQUFKLEdBQWtCUCxNQUFNLENBQUNPLFdBQVAsSUFBc0JSLElBQUksQ0FBQ1EsV0FBN0M7QUFDQUosTUFBQUEsR0FBRyxDQUFDRSxXQUFKLEdBQWtCTCxNQUFNLENBQUNLLFdBQVAsSUFBc0JOLElBQUksQ0FBQ00sV0FBN0M7QUFDQUYsTUFBQUEsR0FBRyxDQUFDSyxTQUFKLEdBQWdCUixNQUFNLENBQUNRLFNBQVAsSUFBb0JULElBQUksQ0FBQ1MsU0FBekM7QUFDQUwsTUFBQUEsR0FBRyxDQUFDTSxTQUFKLEdBQWdCVCxNQUFNLENBQUNTLFNBQVAsSUFBb0JWLElBQUksQ0FBQ1UsU0FBekM7QUFDRCxLQU5ELE1BTU8sSUFBSSxDQUFDSCxlQUFlLENBQUNOLE1BQUQsQ0FBcEIsRUFBOEI7QUFDbkM7QUFDQUcsTUFBQUEsR0FBRyxDQUFDSSxXQUFKLEdBQWtCUixJQUFJLENBQUNRLFdBQXZCO0FBQ0FKLE1BQUFBLEdBQUcsQ0FBQ0UsV0FBSixHQUFrQk4sSUFBSSxDQUFDTSxXQUF2QjtBQUNBRixNQUFBQSxHQUFHLENBQUNLLFNBQUosR0FBZ0JULElBQUksQ0FBQ1MsU0FBckI7QUFDQUwsTUFBQUEsR0FBRyxDQUFDTSxTQUFKLEdBQWdCVixJQUFJLENBQUNVLFNBQXJCO0FBQ0QsS0FOTSxNQU1BO0FBQ0w7QUFDQU4sTUFBQUEsR0FBRyxDQUFDSSxXQUFKLEdBQWtCRyxXQUFXLENBQUNQLEdBQUQsRUFBTUosSUFBSSxDQUFDUSxXQUFYLEVBQXdCUCxNQUFNLENBQUNPLFdBQS9CLENBQTdCO0FBQ0FKLE1BQUFBLEdBQUcsQ0FBQ0UsV0FBSixHQUFrQkssV0FBVyxDQUFDUCxHQUFELEVBQU1KLElBQUksQ0FBQ00sV0FBWCxFQUF3QkwsTUFBTSxDQUFDSyxXQUEvQixDQUE3QjtBQUNBRixNQUFBQSxHQUFHLENBQUNLLFNBQUosR0FBZ0JFLFdBQVcsQ0FBQ1AsR0FBRCxFQUFNSixJQUFJLENBQUNTLFNBQVgsRUFBc0JSLE1BQU0sQ0FBQ1EsU0FBN0IsQ0FBM0I7QUFDQUwsTUFBQUEsR0FBRyxDQUFDTSxTQUFKLEdBQWdCQyxXQUFXLENBQUNQLEdBQUQsRUFBTUosSUFBSSxDQUFDVSxTQUFYLEVBQXNCVCxNQUFNLENBQUNTLFNBQTdCLENBQTNCO0FBQ0Q7QUFDRjs7QUFFRE4sRUFBQUEsR0FBRyxDQUFDUSxLQUFKLEdBQVksRUFBWjtBQUVBLE1BQUlDLFNBQVMsR0FBRyxDQUFoQjtBQUFBLE1BQ0lDLFdBQVcsR0FBRyxDQURsQjtBQUFBLE1BRUlDLFVBQVUsR0FBRyxDQUZqQjtBQUFBLE1BR0lDLFlBQVksR0FBRyxDQUhuQjs7QUFLQSxTQUFPSCxTQUFTLEdBQUdiLElBQUksQ0FBQ1ksS0FBTCxDQUFXSyxNQUF2QixJQUFpQ0gsV0FBVyxHQUFHYixNQUFNLENBQUNXLEtBQVAsQ0FBYUssTUFBbkUsRUFBMkU7QUFDekUsUUFBSUMsV0FBVyxHQUFHbEIsSUFBSSxDQUFDWSxLQUFMLENBQVdDLFNBQVgsS0FBeUI7QUFBQ00sTUFBQUEsUUFBUSxFQUFFQztBQUFYLEtBQTNDO0FBQUEsUUFDSUMsYUFBYSxHQUFHcEIsTUFBTSxDQUFDVyxLQUFQLENBQWFFLFdBQWIsS0FBNkI7QUFBQ0ssTUFBQUEsUUFBUSxFQUFFQztBQUFYLEtBRGpEOztBQUdBLFFBQUlFLFVBQVUsQ0FBQ0osV0FBRCxFQUFjRyxhQUFkLENBQWQsRUFBNEM7QUFDMUM7QUFDQWpCLE1BQUFBLEdBQUcsQ0FBQ1EsS0FBSixDQUFVVyxJQUFWLENBQWVDLFNBQVMsQ0FBQ04sV0FBRCxFQUFjSCxVQUFkLENBQXhCO0FBQ0FGLE1BQUFBLFNBQVM7QUFDVEcsTUFBQUEsWUFBWSxJQUFJRSxXQUFXLENBQUNyQixRQUFaLEdBQXVCcUIsV0FBVyxDQUFDdEIsUUFBbkQ7QUFDRCxLQUxELE1BS08sSUFBSTBCLFVBQVUsQ0FBQ0QsYUFBRCxFQUFnQkgsV0FBaEIsQ0FBZCxFQUE0QztBQUNqRDtBQUNBZCxNQUFBQSxHQUFHLENBQUNRLEtBQUosQ0FBVVcsSUFBVixDQUFlQyxTQUFTLENBQUNILGFBQUQsRUFBZ0JMLFlBQWhCLENBQXhCO0FBQ0FGLE1BQUFBLFdBQVc7QUFDWEMsTUFBQUEsVUFBVSxJQUFJTSxhQUFhLENBQUN4QixRQUFkLEdBQXlCd0IsYUFBYSxDQUFDekIsUUFBckQ7QUFDRCxLQUxNLE1BS0E7QUFDTDtBQUNBLFVBQUk2QixVQUFVLEdBQUc7QUFDZk4sUUFBQUEsUUFBUSxFQUFFTyxJQUFJLENBQUNDLEdBQUwsQ0FBU1QsV0FBVyxDQUFDQyxRQUFyQixFQUErQkUsYUFBYSxDQUFDRixRQUE3QyxDQURLO0FBRWZ2QixRQUFBQSxRQUFRLEVBQUUsQ0FGSztBQUdmZ0MsUUFBQUEsUUFBUSxFQUFFRixJQUFJLENBQUNDLEdBQUwsQ0FBU1QsV0FBVyxDQUFDVSxRQUFaLEdBQXVCYixVQUFoQyxFQUE0Q00sYUFBYSxDQUFDRixRQUFkLEdBQXlCSCxZQUFyRSxDQUhLO0FBSWZuQixRQUFBQSxRQUFRLEVBQUUsQ0FKSztBQUtmRixRQUFBQSxLQUFLLEVBQUU7QUFMUSxPQUFqQjtBQU9Ba0MsTUFBQUEsVUFBVSxDQUFDSixVQUFELEVBQWFQLFdBQVcsQ0FBQ0MsUUFBekIsRUFBbUNELFdBQVcsQ0FBQ3ZCLEtBQS9DLEVBQXNEMEIsYUFBYSxDQUFDRixRQUFwRSxFQUE4RUUsYUFBYSxDQUFDMUIsS0FBNUYsQ0FBVjtBQUNBbUIsTUFBQUEsV0FBVztBQUNYRCxNQUFBQSxTQUFTO0FBRVRULE1BQUFBLEdBQUcsQ0FBQ1EsS0FBSixDQUFVVyxJQUFWLENBQWVFLFVBQWY7QUFDRDtBQUNGOztBQUVELFNBQU9yQixHQUFQO0FBQ0Q7O0FBRUQsU0FBU0QsU0FBVCxDQUFtQjJCLEtBQW5CLEVBQTBCNUIsSUFBMUIsRUFBZ0M7QUFDOUIsTUFBSSxPQUFPNEIsS0FBUCxLQUFpQixRQUFyQixFQUErQjtBQUM3QixRQUFLLE1BQUQsQ0FBU0MsSUFBVCxDQUFjRCxLQUFkLEtBQTBCLFVBQUQsQ0FBYUMsSUFBYixDQUFrQkQsS0FBbEIsQ0FBN0IsRUFBd0Q7QUFDdEQsYUFBTztBQUFBO0FBQUE7QUFBQTs7QUFBQUU7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQTtBQUFBLFNBQVdGLEtBQVgsRUFBa0IsQ0FBbEI7QUFBUDtBQUNEOztBQUVELFFBQUksQ0FBQzVCLElBQUwsRUFBVztBQUNULFlBQU0sSUFBSStCLEtBQUosQ0FBVSxrREFBVixDQUFOO0FBQ0Q7O0FBQ0QsV0FBTztBQUFBO0FBQUE7QUFBQTs7QUFBQUM7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQTtBQUFBLE9BQWdCcEMsU0FBaEIsRUFBMkJBLFNBQTNCLEVBQXNDSSxJQUF0QyxFQUE0QzRCLEtBQTVDO0FBQVA7QUFDRDs7QUFFRCxTQUFPQSxLQUFQO0FBQ0Q7O0FBRUQsU0FBU3ZCLGVBQVQsQ0FBeUI0QixLQUF6QixFQUFnQztBQUM5QixTQUFPQSxLQUFLLENBQUM3QixXQUFOLElBQXFCNkIsS0FBSyxDQUFDN0IsV0FBTixLQUFzQjZCLEtBQUssQ0FBQzNCLFdBQXhEO0FBQ0Q7O0FBRUQsU0FBU0csV0FBVCxDQUFxQk4sS0FBckIsRUFBNEJMLElBQTVCLEVBQWtDQyxNQUFsQyxFQUEwQztBQUN4QyxNQUFJRCxJQUFJLEtBQUtDLE1BQWIsRUFBcUI7QUFDbkIsV0FBT0QsSUFBUDtBQUNELEdBRkQsTUFFTztBQUNMSyxJQUFBQSxLQUFLLENBQUMrQixRQUFOLEdBQWlCLElBQWpCO0FBQ0EsV0FBTztBQUFDcEMsTUFBQUEsSUFBSSxFQUFKQSxJQUFEO0FBQU9DLE1BQUFBLE1BQU0sRUFBTkE7QUFBUCxLQUFQO0FBQ0Q7QUFDRjs7QUFFRCxTQUFTcUIsVUFBVCxDQUFvQlMsSUFBcEIsRUFBMEJNLEtBQTFCLEVBQWlDO0FBQy9CLFNBQU9OLElBQUksQ0FBQ1osUUFBTCxHQUFnQmtCLEtBQUssQ0FBQ2xCLFFBQXRCLElBQ0RZLElBQUksQ0FBQ1osUUFBTCxHQUFnQlksSUFBSSxDQUFDbkMsUUFBdEIsR0FBa0N5QyxLQUFLLENBQUNsQixRQUQ3QztBQUVEOztBQUVELFNBQVNLLFNBQVQsQ0FBbUIvQixJQUFuQixFQUF5QjZDLE1BQXpCLEVBQWlDO0FBQy9CLFNBQU87QUFDTG5CLElBQUFBLFFBQVEsRUFBRTFCLElBQUksQ0FBQzBCLFFBRFY7QUFDb0J2QixJQUFBQSxRQUFRLEVBQUVILElBQUksQ0FBQ0csUUFEbkM7QUFFTGdDLElBQUFBLFFBQVEsRUFBRW5DLElBQUksQ0FBQ21DLFFBQUwsR0FBZ0JVLE1BRnJCO0FBRTZCekMsSUFBQUEsUUFBUSxFQUFFSixJQUFJLENBQUNJLFFBRjVDO0FBR0xGLElBQUFBLEtBQUssRUFBRUYsSUFBSSxDQUFDRTtBQUhQLEdBQVA7QUFLRDs7QUFFRCxTQUFTa0MsVUFBVCxDQUFvQnBDLElBQXBCLEVBQTBCc0IsVUFBMUIsRUFBc0N3QixTQUF0QyxFQUFpREMsV0FBakQsRUFBOERDLFVBQTlELEVBQTBFO0FBQ3hFO0FBQ0E7QUFDQSxNQUFJekMsSUFBSSxHQUFHO0FBQUNzQyxJQUFBQSxNQUFNLEVBQUV2QixVQUFUO0FBQXFCcEIsSUFBQUEsS0FBSyxFQUFFNEMsU0FBNUI7QUFBdUNsQyxJQUFBQSxLQUFLLEVBQUU7QUFBOUMsR0FBWDtBQUFBLE1BQ0lxQyxLQUFLLEdBQUc7QUFBQ0osSUFBQUEsTUFBTSxFQUFFRSxXQUFUO0FBQXNCN0MsSUFBQUEsS0FBSyxFQUFFOEMsVUFBN0I7QUFBeUNwQyxJQUFBQSxLQUFLLEVBQUU7QUFBaEQsR0FEWixDQUh3RSxDQU14RTs7QUFDQXNDLEVBQUFBLGFBQWEsQ0FBQ2xELElBQUQsRUFBT08sSUFBUCxFQUFhMEMsS0FBYixDQUFiO0FBQ0FDLEVBQUFBLGFBQWEsQ0FBQ2xELElBQUQsRUFBT2lELEtBQVAsRUFBYzFDLElBQWQsQ0FBYixDQVJ3RSxDQVV4RTs7QUFDQSxTQUFPQSxJQUFJLENBQUNLLEtBQUwsR0FBYUwsSUFBSSxDQUFDTCxLQUFMLENBQVdzQixNQUF4QixJQUFrQ3lCLEtBQUssQ0FBQ3JDLEtBQU4sR0FBY3FDLEtBQUssQ0FBQy9DLEtBQU4sQ0FBWXNCLE1BQW5FLEVBQTJFO0FBQ3pFLFFBQUlDLFdBQVcsR0FBR2xCLElBQUksQ0FBQ0wsS0FBTCxDQUFXSyxJQUFJLENBQUNLLEtBQWhCLENBQWxCO0FBQUEsUUFDSXVDLFlBQVksR0FBR0YsS0FBSyxDQUFDL0MsS0FBTixDQUFZK0MsS0FBSyxDQUFDckMsS0FBbEIsQ0FEbkI7O0FBR0EsUUFBSSxDQUFDYSxXQUFXLENBQUMsQ0FBRCxDQUFYLEtBQW1CLEdBQW5CLElBQTBCQSxXQUFXLENBQUMsQ0FBRCxDQUFYLEtBQW1CLEdBQTlDLE1BQ0kwQixZQUFZLENBQUMsQ0FBRCxDQUFaLEtBQW9CLEdBQXBCLElBQTJCQSxZQUFZLENBQUMsQ0FBRCxDQUFaLEtBQW9CLEdBRG5ELENBQUosRUFDNkQ7QUFDM0Q7QUFDQUMsTUFBQUEsWUFBWSxDQUFDcEQsSUFBRCxFQUFPTyxJQUFQLEVBQWEwQyxLQUFiLENBQVo7QUFDRCxLQUpELE1BSU8sSUFBSXhCLFdBQVcsQ0FBQyxDQUFELENBQVgsS0FBbUIsR0FBbkIsSUFBMEIwQixZQUFZLENBQUMsQ0FBRCxDQUFaLEtBQW9CLEdBQWxELEVBQXVEO0FBQUE7QUFBQTs7QUFBQTtBQUM1RDs7QUFDQTtBQUFBO0FBQUE7QUFBQW5ELE1BQUFBLElBQUksQ0FBQ0UsS0FBTCxFQUFXNEIsSUFBWDtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBb0J1QixNQUFBQSxhQUFhLENBQUM5QyxJQUFELENBQWpDO0FBQ0QsS0FITSxNQUdBLElBQUk0QyxZQUFZLENBQUMsQ0FBRCxDQUFaLEtBQW9CLEdBQXBCLElBQTJCMUIsV0FBVyxDQUFDLENBQUQsQ0FBWCxLQUFtQixHQUFsRCxFQUF1RDtBQUFBO0FBQUE7O0FBQUE7QUFDNUQ7O0FBQ0E7QUFBQTtBQUFBO0FBQUF6QixNQUFBQSxJQUFJLENBQUNFLEtBQUwsRUFBVzRCLElBQVg7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQW9CdUIsTUFBQUEsYUFBYSxDQUFDSixLQUFELENBQWpDO0FBQ0QsS0FITSxNQUdBLElBQUl4QixXQUFXLENBQUMsQ0FBRCxDQUFYLEtBQW1CLEdBQW5CLElBQTBCMEIsWUFBWSxDQUFDLENBQUQsQ0FBWixLQUFvQixHQUFsRCxFQUF1RDtBQUM1RDtBQUNBRyxNQUFBQSxPQUFPLENBQUN0RCxJQUFELEVBQU9PLElBQVAsRUFBYTBDLEtBQWIsQ0FBUDtBQUNELEtBSE0sTUFHQSxJQUFJRSxZQUFZLENBQUMsQ0FBRCxDQUFaLEtBQW9CLEdBQXBCLElBQTJCMUIsV0FBVyxDQUFDLENBQUQsQ0FBWCxLQUFtQixHQUFsRCxFQUF1RDtBQUM1RDtBQUNBNkIsTUFBQUEsT0FBTyxDQUFDdEQsSUFBRCxFQUFPaUQsS0FBUCxFQUFjMUMsSUFBZCxFQUFvQixJQUFwQixDQUFQO0FBQ0QsS0FITSxNQUdBLElBQUlrQixXQUFXLEtBQUswQixZQUFwQixFQUFrQztBQUN2QztBQUNBbkQsTUFBQUEsSUFBSSxDQUFDRSxLQUFMLENBQVc0QixJQUFYLENBQWdCTCxXQUFoQjtBQUNBbEIsTUFBQUEsSUFBSSxDQUFDSyxLQUFMO0FBQ0FxQyxNQUFBQSxLQUFLLENBQUNyQyxLQUFOO0FBQ0QsS0FMTSxNQUtBO0FBQ0w7QUFDQStCLE1BQUFBLFFBQVEsQ0FBQzNDLElBQUQsRUFBT3FELGFBQWEsQ0FBQzlDLElBQUQsQ0FBcEIsRUFBNEI4QyxhQUFhLENBQUNKLEtBQUQsQ0FBekMsQ0FBUjtBQUNEO0FBQ0YsR0F4Q3VFLENBMEN4RTs7O0FBQ0FNLEVBQUFBLGNBQWMsQ0FBQ3ZELElBQUQsRUFBT08sSUFBUCxDQUFkO0FBQ0FnRCxFQUFBQSxjQUFjLENBQUN2RCxJQUFELEVBQU9pRCxLQUFQLENBQWQ7QUFFQWxELEVBQUFBLGFBQWEsQ0FBQ0MsSUFBRCxDQUFiO0FBQ0Q7O0FBRUQsU0FBU29ELFlBQVQsQ0FBc0JwRCxJQUF0QixFQUE0Qk8sSUFBNUIsRUFBa0MwQyxLQUFsQyxFQUF5QztBQUN2QyxNQUFJTyxTQUFTLEdBQUdILGFBQWEsQ0FBQzlDLElBQUQsQ0FBN0I7QUFBQSxNQUNJa0QsWUFBWSxHQUFHSixhQUFhLENBQUNKLEtBQUQsQ0FEaEM7O0FBR0EsTUFBSVMsVUFBVSxDQUFDRixTQUFELENBQVYsSUFBeUJFLFVBQVUsQ0FBQ0QsWUFBRCxDQUF2QyxFQUF1RDtBQUNyRDtBQUNBO0FBQUk7QUFBQTtBQUFBOztBQUFBRTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBO0FBQUEsS0FBZ0JILFNBQWhCLEVBQTJCQyxZQUEzQixLQUNHRyxrQkFBa0IsQ0FBQ1gsS0FBRCxFQUFRTyxTQUFSLEVBQW1CQSxTQUFTLENBQUNoQyxNQUFWLEdBQW1CaUMsWUFBWSxDQUFDakMsTUFBbkQsQ0FEekIsRUFDcUY7QUFBQTtBQUFBOztBQUFBOztBQUNuRjtBQUFBO0FBQUE7QUFBQXhCLE1BQUFBLElBQUksQ0FBQ0UsS0FBTCxFQUFXNEIsSUFBWDtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBb0IwQixNQUFBQSxTQUFwQjs7QUFDQTtBQUNELEtBSkQsTUFJTztBQUFJO0FBQUE7QUFBQTs7QUFBQUc7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQTtBQUFBLEtBQWdCRixZQUFoQixFQUE4QkQsU0FBOUIsS0FDSkksa0JBQWtCLENBQUNyRCxJQUFELEVBQU9rRCxZQUFQLEVBQXFCQSxZQUFZLENBQUNqQyxNQUFiLEdBQXNCZ0MsU0FBUyxDQUFDaEMsTUFBckQsQ0FEbEIsRUFDZ0Y7QUFBQTtBQUFBOztBQUFBOztBQUNyRjtBQUFBO0FBQUE7QUFBQXhCLE1BQUFBLElBQUksQ0FBQ0UsS0FBTCxFQUFXNEIsSUFBWDtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBb0IyQixNQUFBQSxZQUFwQjs7QUFDQTtBQUNEO0FBQ0YsR0FYRCxNQVdPO0FBQUk7QUFBQTtBQUFBOztBQUFBSTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBQTtBQUFBO0FBQUEsR0FBV0wsU0FBWCxFQUFzQkMsWUFBdEIsQ0FBSixFQUF5QztBQUFBO0FBQUE7O0FBQUE7O0FBQzlDO0FBQUE7QUFBQTtBQUFBekQsSUFBQUEsSUFBSSxDQUFDRSxLQUFMLEVBQVc0QixJQUFYO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFvQjBCLElBQUFBLFNBQXBCOztBQUNBO0FBQ0Q7O0FBRURiLEVBQUFBLFFBQVEsQ0FBQzNDLElBQUQsRUFBT3dELFNBQVAsRUFBa0JDLFlBQWxCLENBQVI7QUFDRDs7QUFFRCxTQUFTSCxPQUFULENBQWlCdEQsSUFBakIsRUFBdUJPLElBQXZCLEVBQTZCMEMsS0FBN0IsRUFBb0NhLElBQXBDLEVBQTBDO0FBQ3hDLE1BQUlOLFNBQVMsR0FBR0gsYUFBYSxDQUFDOUMsSUFBRCxDQUE3QjtBQUFBLE1BQ0lrRCxZQUFZLEdBQUdNLGNBQWMsQ0FBQ2QsS0FBRCxFQUFRTyxTQUFSLENBRGpDOztBQUVBLE1BQUlDLFlBQVksQ0FBQ08sTUFBakIsRUFBeUI7QUFBQTtBQUFBOztBQUFBOztBQUN2QjtBQUFBO0FBQUE7QUFBQWhFLElBQUFBLElBQUksQ0FBQ0UsS0FBTCxFQUFXNEIsSUFBWDtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQUE7QUFBb0IyQixJQUFBQSxZQUFZLENBQUNPLE1BQWpDO0FBQ0QsR0FGRCxNQUVPO0FBQ0xyQixJQUFBQSxRQUFRLENBQUMzQyxJQUFELEVBQU84RCxJQUFJLEdBQUdMLFlBQUgsR0FBa0JELFNBQTdCLEVBQXdDTSxJQUFJLEdBQUdOLFNBQUgsR0FBZUMsWUFBM0QsQ0FBUjtBQUNEO0FBQ0Y7O0FBRUQsU0FBU2QsUUFBVCxDQUFrQjNDLElBQWxCLEVBQXdCTyxJQUF4QixFQUE4QjBDLEtBQTlCLEVBQXFDO0FBQ25DakQsRUFBQUEsSUFBSSxDQUFDMkMsUUFBTCxHQUFnQixJQUFoQjtBQUNBM0MsRUFBQUEsSUFBSSxDQUFDRSxLQUFMLENBQVc0QixJQUFYLENBQWdCO0FBQ2RhLElBQUFBLFFBQVEsRUFBRSxJQURJO0FBRWRwQyxJQUFBQSxJQUFJLEVBQUVBLElBRlE7QUFHZEMsSUFBQUEsTUFBTSxFQUFFeUM7QUFITSxHQUFoQjtBQUtEOztBQUVELFNBQVNDLGFBQVQsQ0FBdUJsRCxJQUF2QixFQUE2QmlFLE1BQTdCLEVBQXFDaEIsS0FBckMsRUFBNEM7QUFDMUMsU0FBT2dCLE1BQU0sQ0FBQ3BCLE1BQVAsR0FBZ0JJLEtBQUssQ0FBQ0osTUFBdEIsSUFBZ0NvQixNQUFNLENBQUNyRCxLQUFQLEdBQWVxRCxNQUFNLENBQUMvRCxLQUFQLENBQWFzQixNQUFuRSxFQUEyRTtBQUN6RSxRQUFJMEMsSUFBSSxHQUFHRCxNQUFNLENBQUMvRCxLQUFQLENBQWErRCxNQUFNLENBQUNyRCxLQUFQLEVBQWIsQ0FBWDtBQUNBWixJQUFBQSxJQUFJLENBQUNFLEtBQUwsQ0FBVzRCLElBQVgsQ0FBZ0JvQyxJQUFoQjtBQUNBRCxJQUFBQSxNQUFNLENBQUNwQixNQUFQO0FBQ0Q7QUFDRjs7QUFDRCxTQUFTVSxjQUFULENBQXdCdkQsSUFBeEIsRUFBOEJpRSxNQUE5QixFQUFzQztBQUNwQyxTQUFPQSxNQUFNLENBQUNyRCxLQUFQLEdBQWVxRCxNQUFNLENBQUMvRCxLQUFQLENBQWFzQixNQUFuQyxFQUEyQztBQUN6QyxRQUFJMEMsSUFBSSxHQUFHRCxNQUFNLENBQUMvRCxLQUFQLENBQWErRCxNQUFNLENBQUNyRCxLQUFQLEVBQWIsQ0FBWDtBQUNBWixJQUFBQSxJQUFJLENBQUNFLEtBQUwsQ0FBVzRCLElBQVgsQ0FBZ0JvQyxJQUFoQjtBQUNEO0FBQ0Y7O0FBRUQsU0FBU2IsYUFBVCxDQUF1QmMsS0FBdkIsRUFBOEI7QUFDNUIsTUFBSXhELEdBQUcsR0FBRyxFQUFWO0FBQUEsTUFDSXlELFNBQVMsR0FBR0QsS0FBSyxDQUFDakUsS0FBTixDQUFZaUUsS0FBSyxDQUFDdkQsS0FBbEIsRUFBeUIsQ0FBekIsQ0FEaEI7O0FBRUEsU0FBT3VELEtBQUssQ0FBQ3ZELEtBQU4sR0FBY3VELEtBQUssQ0FBQ2pFLEtBQU4sQ0FBWXNCLE1BQWpDLEVBQXlDO0FBQ3ZDLFFBQUkwQyxJQUFJLEdBQUdDLEtBQUssQ0FBQ2pFLEtBQU4sQ0FBWWlFLEtBQUssQ0FBQ3ZELEtBQWxCLENBQVgsQ0FEdUMsQ0FHdkM7O0FBQ0EsUUFBSXdELFNBQVMsS0FBSyxHQUFkLElBQXFCRixJQUFJLENBQUMsQ0FBRCxDQUFKLEtBQVksR0FBckMsRUFBMEM7QUFDeENFLE1BQUFBLFNBQVMsR0FBRyxHQUFaO0FBQ0Q7O0FBRUQsUUFBSUEsU0FBUyxLQUFLRixJQUFJLENBQUMsQ0FBRCxDQUF0QixFQUEyQjtBQUN6QnZELE1BQUFBLEdBQUcsQ0FBQ21CLElBQUosQ0FBU29DLElBQVQ7QUFDQUMsTUFBQUEsS0FBSyxDQUFDdkQsS0FBTjtBQUNELEtBSEQsTUFHTztBQUNMO0FBQ0Q7QUFDRjs7QUFFRCxTQUFPRCxHQUFQO0FBQ0Q7O0FBQ0QsU0FBU29ELGNBQVQsQ0FBd0JJLEtBQXhCLEVBQStCRSxZQUEvQixFQUE2QztBQUMzQyxNQUFJQyxPQUFPLEdBQUcsRUFBZDtBQUFBLE1BQ0lOLE1BQU0sR0FBRyxFQURiO0FBQUEsTUFFSU8sVUFBVSxHQUFHLENBRmpCO0FBQUEsTUFHSUMsY0FBYyxHQUFHLEtBSHJCO0FBQUEsTUFJSUMsVUFBVSxHQUFHLEtBSmpCOztBQUtBLFNBQU9GLFVBQVUsR0FBR0YsWUFBWSxDQUFDN0MsTUFBMUIsSUFDRTJDLEtBQUssQ0FBQ3ZELEtBQU4sR0FBY3VELEtBQUssQ0FBQ2pFLEtBQU4sQ0FBWXNCLE1BRG5DLEVBQzJDO0FBQ3pDLFFBQUlrRCxNQUFNLEdBQUdQLEtBQUssQ0FBQ2pFLEtBQU4sQ0FBWWlFLEtBQUssQ0FBQ3ZELEtBQWxCLENBQWI7QUFBQSxRQUNJK0QsS0FBSyxHQUFHTixZQUFZLENBQUNFLFVBQUQsQ0FEeEIsQ0FEeUMsQ0FJekM7O0FBQ0EsUUFBSUksS0FBSyxDQUFDLENBQUQsQ0FBTCxLQUFhLEdBQWpCLEVBQXNCO0FBQ3BCO0FBQ0Q7O0FBRURILElBQUFBLGNBQWMsR0FBR0EsY0FBYyxJQUFJRSxNQUFNLENBQUMsQ0FBRCxDQUFOLEtBQWMsR0FBakQ7QUFFQVYsSUFBQUEsTUFBTSxDQUFDbEMsSUFBUCxDQUFZNkMsS0FBWjtBQUNBSixJQUFBQSxVQUFVLEdBWitCLENBY3pDO0FBQ0E7O0FBQ0EsUUFBSUcsTUFBTSxDQUFDLENBQUQsQ0FBTixLQUFjLEdBQWxCLEVBQXVCO0FBQ3JCRCxNQUFBQSxVQUFVLEdBQUcsSUFBYjs7QUFFQSxhQUFPQyxNQUFNLENBQUMsQ0FBRCxDQUFOLEtBQWMsR0FBckIsRUFBMEI7QUFDeEJKLFFBQUFBLE9BQU8sQ0FBQ3hDLElBQVIsQ0FBYTRDLE1BQWI7QUFDQUEsUUFBQUEsTUFBTSxHQUFHUCxLQUFLLENBQUNqRSxLQUFOLENBQVksRUFBRWlFLEtBQUssQ0FBQ3ZELEtBQXBCLENBQVQ7QUFDRDtBQUNGOztBQUVELFFBQUkrRCxLQUFLLENBQUNDLE1BQU4sQ0FBYSxDQUFiLE1BQW9CRixNQUFNLENBQUNFLE1BQVAsQ0FBYyxDQUFkLENBQXhCLEVBQTBDO0FBQ3hDTixNQUFBQSxPQUFPLENBQUN4QyxJQUFSLENBQWE0QyxNQUFiO0FBQ0FQLE1BQUFBLEtBQUssQ0FBQ3ZELEtBQU47QUFDRCxLQUhELE1BR087QUFDTDZELE1BQUFBLFVBQVUsR0FBRyxJQUFiO0FBQ0Q7QUFDRjs7QUFFRCxNQUFJLENBQUNKLFlBQVksQ0FBQ0UsVUFBRCxDQUFaLElBQTRCLEVBQTdCLEVBQWlDLENBQWpDLE1BQXdDLEdBQXhDLElBQ0dDLGNBRFAsRUFDdUI7QUFDckJDLElBQUFBLFVBQVUsR0FBRyxJQUFiO0FBQ0Q7O0FBRUQsTUFBSUEsVUFBSixFQUFnQjtBQUNkLFdBQU9ILE9BQVA7QUFDRDs7QUFFRCxTQUFPQyxVQUFVLEdBQUdGLFlBQVksQ0FBQzdDLE1BQWpDLEVBQXlDO0FBQ3ZDd0MsSUFBQUEsTUFBTSxDQUFDbEMsSUFBUCxDQUFZdUMsWUFBWSxDQUFDRSxVQUFVLEVBQVgsQ0FBeEI7QUFDRDs7QUFFRCxTQUFPO0FBQ0xQLElBQUFBLE1BQU0sRUFBTkEsTUFESztBQUVMTSxJQUFBQSxPQUFPLEVBQVBBO0FBRkssR0FBUDtBQUlEOztBQUVELFNBQVNaLFVBQVQsQ0FBb0JZLE9BQXBCLEVBQTZCO0FBQzNCLFNBQU9BLE9BQU8sQ0FBQ08sTUFBUixDQUFlLFVBQVNDLElBQVQsRUFBZUosTUFBZixFQUF1QjtBQUMzQyxXQUFPSSxJQUFJLElBQUlKLE1BQU0sQ0FBQyxDQUFELENBQU4sS0FBYyxHQUE3QjtBQUNELEdBRk0sRUFFSixJQUZJLENBQVA7QUFHRDs7QUFDRCxTQUFTZCxrQkFBVCxDQUE0Qk8sS0FBNUIsRUFBbUNZLGFBQW5DLEVBQWtEQyxLQUFsRCxFQUF5RDtBQUN2RCxPQUFLLElBQUlDLENBQUMsR0FBRyxDQUFiLEVBQWdCQSxDQUFDLEdBQUdELEtBQXBCLEVBQTJCQyxDQUFDLEVBQTVCLEVBQWdDO0FBQzlCLFFBQUlDLGFBQWEsR0FBR0gsYUFBYSxDQUFDQSxhQUFhLENBQUN2RCxNQUFkLEdBQXVCd0QsS0FBdkIsR0FBK0JDLENBQWhDLENBQWIsQ0FBZ0RMLE1BQWhELENBQXVELENBQXZELENBQXBCOztBQUNBLFFBQUlULEtBQUssQ0FBQ2pFLEtBQU4sQ0FBWWlFLEtBQUssQ0FBQ3ZELEtBQU4sR0FBY3FFLENBQTFCLE1BQWlDLE1BQU1DLGFBQTNDLEVBQTBEO0FBQ3hELGFBQU8sS0FBUDtBQUNEO0FBQ0Y7O0FBRURmLEVBQUFBLEtBQUssQ0FBQ3ZELEtBQU4sSUFBZW9FLEtBQWY7QUFDQSxTQUFPLElBQVA7QUFDRDs7QUFFRCxTQUFTL0UsbUJBQVQsQ0FBNkJDLEtBQTdCLEVBQW9DO0FBQ2xDLE1BQUlDLFFBQVEsR0FBRyxDQUFmO0FBQ0EsTUFBSUMsUUFBUSxHQUFHLENBQWY7QUFFQUYsRUFBQUEsS0FBSyxDQUFDaUYsT0FBTixDQUFjLFVBQVNqQixJQUFULEVBQWU7QUFDM0IsUUFBSSxPQUFPQSxJQUFQLEtBQWdCLFFBQXBCLEVBQThCO0FBQzVCLFVBQUlrQixPQUFPLEdBQUduRixtQkFBbUIsQ0FBQ2lFLElBQUksQ0FBQzNELElBQU4sQ0FBakM7QUFDQSxVQUFJOEUsVUFBVSxHQUFHcEYsbUJBQW1CLENBQUNpRSxJQUFJLENBQUMxRCxNQUFOLENBQXBDOztBQUVBLFVBQUlMLFFBQVEsS0FBS0UsU0FBakIsRUFBNEI7QUFDMUIsWUFBSStFLE9BQU8sQ0FBQ2pGLFFBQVIsS0FBcUJrRixVQUFVLENBQUNsRixRQUFwQyxFQUE4QztBQUM1Q0EsVUFBQUEsUUFBUSxJQUFJaUYsT0FBTyxDQUFDakYsUUFBcEI7QUFDRCxTQUZELE1BRU87QUFDTEEsVUFBQUEsUUFBUSxHQUFHRSxTQUFYO0FBQ0Q7QUFDRjs7QUFFRCxVQUFJRCxRQUFRLEtBQUtDLFNBQWpCLEVBQTRCO0FBQzFCLFlBQUkrRSxPQUFPLENBQUNoRixRQUFSLEtBQXFCaUYsVUFBVSxDQUFDakYsUUFBcEMsRUFBOEM7QUFDNUNBLFVBQUFBLFFBQVEsSUFBSWdGLE9BQU8sQ0FBQ2hGLFFBQXBCO0FBQ0QsU0FGRCxNQUVPO0FBQ0xBLFVBQUFBLFFBQVEsR0FBR0MsU0FBWDtBQUNEO0FBQ0Y7QUFDRixLQW5CRCxNQW1CTztBQUNMLFVBQUlELFFBQVEsS0FBS0MsU0FBYixLQUEyQjZELElBQUksQ0FBQyxDQUFELENBQUosS0FBWSxHQUFaLElBQW1CQSxJQUFJLENBQUMsQ0FBRCxDQUFKLEtBQVksR0FBMUQsQ0FBSixFQUFvRTtBQUNsRTlELFFBQUFBLFFBQVE7QUFDVDs7QUFDRCxVQUFJRCxRQUFRLEtBQUtFLFNBQWIsS0FBMkI2RCxJQUFJLENBQUMsQ0FBRCxDQUFKLEtBQVksR0FBWixJQUFtQkEsSUFBSSxDQUFDLENBQUQsQ0FBSixLQUFZLEdBQTFELENBQUosRUFBb0U7QUFDbEUvRCxRQUFBQSxRQUFRO0FBQ1Q7QUFDRjtBQUNGLEdBNUJEO0FBOEJBLFNBQU87QUFBQ0EsSUFBQUEsUUFBUSxFQUFSQSxRQUFEO0FBQVdDLElBQUFBLFFBQVEsRUFBUkE7QUFBWCxHQUFQO0FBQ0QiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge3N0cnVjdHVyZWRQYXRjaH0gZnJvbSAnLi9jcmVhdGUnO1xuaW1wb3J0IHtwYXJzZVBhdGNofSBmcm9tICcuL3BhcnNlJztcblxuaW1wb3J0IHthcnJheUVxdWFsLCBhcnJheVN0YXJ0c1dpdGh9IGZyb20gJy4uL3V0aWwvYXJyYXknO1xuXG5leHBvcnQgZnVuY3Rpb24gY2FsY0xpbmVDb3VudChodW5rKSB7XG4gIGNvbnN0IHtvbGRMaW5lcywgbmV3TGluZXN9ID0gY2FsY09sZE5ld0xpbmVDb3VudChodW5rLmxpbmVzKTtcblxuICBpZiAob2xkTGluZXMgIT09IHVuZGVmaW5lZCkge1xuICAgIGh1bmsub2xkTGluZXMgPSBvbGRMaW5lcztcbiAgfSBlbHNlIHtcbiAgICBkZWxldGUgaHVuay5vbGRMaW5lcztcbiAgfVxuXG4gIGlmIChuZXdMaW5lcyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgaHVuay5uZXdMaW5lcyA9IG5ld0xpbmVzO1xuICB9IGVsc2Uge1xuICAgIGRlbGV0ZSBodW5rLm5ld0xpbmVzO1xuICB9XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBtZXJnZShtaW5lLCB0aGVpcnMsIGJhc2UpIHtcbiAgbWluZSA9IGxvYWRQYXRjaChtaW5lLCBiYXNlKTtcbiAgdGhlaXJzID0gbG9hZFBhdGNoKHRoZWlycywgYmFzZSk7XG5cbiAgbGV0IHJldCA9IHt9O1xuXG4gIC8vIEZvciBpbmRleCB3ZSBqdXN0IGxldCBpdCBwYXNzIHRocm91Z2ggYXMgaXQgZG9lc24ndCBoYXZlIGFueSBuZWNlc3NhcnkgbWVhbmluZy5cbiAgLy8gTGVhdmluZyBzYW5pdHkgY2hlY2tzIG9uIHRoaXMgdG8gdGhlIEFQSSBjb25zdW1lciB0aGF0IG1heSBrbm93IG1vcmUgYWJvdXQgdGhlXG4gIC8vIG1lYW5pbmcgaW4gdGhlaXIgb3duIGNvbnRleHQuXG4gIGlmIChtaW5lLmluZGV4IHx8IHRoZWlycy5pbmRleCkge1xuICAgIHJldC5pbmRleCA9IG1pbmUuaW5kZXggfHwgdGhlaXJzLmluZGV4O1xuICB9XG5cbiAgaWYgKG1pbmUubmV3RmlsZU5hbWUgfHwgdGhlaXJzLm5ld0ZpbGVOYW1lKSB7XG4gICAgaWYgKCFmaWxlTmFtZUNoYW5nZWQobWluZSkpIHtcbiAgICAgIC8vIE5vIGhlYWRlciBvciBubyBjaGFuZ2UgaW4gb3VycywgdXNlIHRoZWlycyAoYW5kIG91cnMgaWYgdGhlaXJzIGRvZXMgbm90IGV4aXN0KVxuICAgICAgcmV0Lm9sZEZpbGVOYW1lID0gdGhlaXJzLm9sZEZpbGVOYW1lIHx8IG1pbmUub2xkRmlsZU5hbWU7XG4gICAgICByZXQubmV3RmlsZU5hbWUgPSB0aGVpcnMubmV3RmlsZU5hbWUgfHwgbWluZS5uZXdGaWxlTmFtZTtcbiAgICAgIHJldC5vbGRIZWFkZXIgPSB0aGVpcnMub2xkSGVhZGVyIHx8IG1pbmUub2xkSGVhZGVyO1xuICAgICAgcmV0Lm5ld0hlYWRlciA9IHRoZWlycy5uZXdIZWFkZXIgfHwgbWluZS5uZXdIZWFkZXI7XG4gICAgfSBlbHNlIGlmICghZmlsZU5hbWVDaGFuZ2VkKHRoZWlycykpIHtcbiAgICAgIC8vIE5vIGhlYWRlciBvciBubyBjaGFuZ2UgaW4gdGhlaXJzLCB1c2Ugb3Vyc1xuICAgICAgcmV0Lm9sZEZpbGVOYW1lID0gbWluZS5vbGRGaWxlTmFtZTtcbiAgICAgIHJldC5uZXdGaWxlTmFtZSA9IG1pbmUubmV3RmlsZU5hbWU7XG4gICAgICByZXQub2xkSGVhZGVyID0gbWluZS5vbGRIZWFkZXI7XG4gICAgICByZXQubmV3SGVhZGVyID0gbWluZS5uZXdIZWFkZXI7XG4gICAgfSBlbHNlIHtcbiAgICAgIC8vIEJvdGggY2hhbmdlZC4uLiBmaWd1cmUgaXQgb3V0XG4gICAgICByZXQub2xkRmlsZU5hbWUgPSBzZWxlY3RGaWVsZChyZXQsIG1pbmUub2xkRmlsZU5hbWUsIHRoZWlycy5vbGRGaWxlTmFtZSk7XG4gICAgICByZXQubmV3RmlsZU5hbWUgPSBzZWxlY3RGaWVsZChyZXQsIG1pbmUubmV3RmlsZU5hbWUsIHRoZWlycy5uZXdGaWxlTmFtZSk7XG4gICAgICByZXQub2xkSGVhZGVyID0gc2VsZWN0RmllbGQocmV0LCBtaW5lLm9sZEhlYWRlciwgdGhlaXJzLm9sZEhlYWRlcik7XG4gICAgICByZXQubmV3SGVhZGVyID0gc2VsZWN0RmllbGQocmV0LCBtaW5lLm5ld0hlYWRlciwgdGhlaXJzLm5ld0hlYWRlcik7XG4gICAgfVxuICB9XG5cbiAgcmV0Lmh1bmtzID0gW107XG5cbiAgbGV0IG1pbmVJbmRleCA9IDAsXG4gICAgICB0aGVpcnNJbmRleCA9IDAsXG4gICAgICBtaW5lT2Zmc2V0ID0gMCxcbiAgICAgIHRoZWlyc09mZnNldCA9IDA7XG5cbiAgd2hpbGUgKG1pbmVJbmRleCA8IG1pbmUuaHVua3MubGVuZ3RoIHx8IHRoZWlyc0luZGV4IDwgdGhlaXJzLmh1bmtzLmxlbmd0aCkge1xuICAgIGxldCBtaW5lQ3VycmVudCA9IG1pbmUuaHVua3NbbWluZUluZGV4XSB8fCB7b2xkU3RhcnQ6IEluZmluaXR5fSxcbiAgICAgICAgdGhlaXJzQ3VycmVudCA9IHRoZWlycy5odW5rc1t0aGVpcnNJbmRleF0gfHwge29sZFN0YXJ0OiBJbmZpbml0eX07XG5cbiAgICBpZiAoaHVua0JlZm9yZShtaW5lQ3VycmVudCwgdGhlaXJzQ3VycmVudCkpIHtcbiAgICAgIC8vIFRoaXMgcGF0Y2ggZG9lcyBub3Qgb3ZlcmxhcCB3aXRoIGFueSBvZiB0aGUgb3RoZXJzLCB5YXkuXG4gICAgICByZXQuaHVua3MucHVzaChjbG9uZUh1bmsobWluZUN1cnJlbnQsIG1pbmVPZmZzZXQpKTtcbiAgICAgIG1pbmVJbmRleCsrO1xuICAgICAgdGhlaXJzT2Zmc2V0ICs9IG1pbmVDdXJyZW50Lm5ld0xpbmVzIC0gbWluZUN1cnJlbnQub2xkTGluZXM7XG4gICAgfSBlbHNlIGlmIChodW5rQmVmb3JlKHRoZWlyc0N1cnJlbnQsIG1pbmVDdXJyZW50KSkge1xuICAgICAgLy8gVGhpcyBwYXRjaCBkb2VzIG5vdCBvdmVybGFwIHdpdGggYW55IG9mIHRoZSBvdGhlcnMsIHlheS5cbiAgICAgIHJldC5odW5rcy5wdXNoKGNsb25lSHVuayh0aGVpcnNDdXJyZW50LCB0aGVpcnNPZmZzZXQpKTtcbiAgICAgIHRoZWlyc0luZGV4Kys7XG4gICAgICBtaW5lT2Zmc2V0ICs9IHRoZWlyc0N1cnJlbnQubmV3TGluZXMgLSB0aGVpcnNDdXJyZW50Lm9sZExpbmVzO1xuICAgIH0gZWxzZSB7XG4gICAgICAvLyBPdmVybGFwLCBtZXJnZSBhcyBiZXN0IHdlIGNhblxuICAgICAgbGV0IG1lcmdlZEh1bmsgPSB7XG4gICAgICAgIG9sZFN0YXJ0OiBNYXRoLm1pbihtaW5lQ3VycmVudC5vbGRTdGFydCwgdGhlaXJzQ3VycmVudC5vbGRTdGFydCksXG4gICAgICAgIG9sZExpbmVzOiAwLFxuICAgICAgICBuZXdTdGFydDogTWF0aC5taW4obWluZUN1cnJlbnQubmV3U3RhcnQgKyBtaW5lT2Zmc2V0LCB0aGVpcnNDdXJyZW50Lm9sZFN0YXJ0ICsgdGhlaXJzT2Zmc2V0KSxcbiAgICAgICAgbmV3TGluZXM6IDAsXG4gICAgICAgIGxpbmVzOiBbXVxuICAgICAgfTtcbiAgICAgIG1lcmdlTGluZXMobWVyZ2VkSHVuaywgbWluZUN1cnJlbnQub2xkU3RhcnQsIG1pbmVDdXJyZW50LmxpbmVzLCB0aGVpcnNDdXJyZW50Lm9sZFN0YXJ0LCB0aGVpcnNDdXJyZW50LmxpbmVzKTtcbiAgICAgIHRoZWlyc0luZGV4Kys7XG4gICAgICBtaW5lSW5kZXgrKztcblxuICAgICAgcmV0Lmh1bmtzLnB1c2gobWVyZ2VkSHVuayk7XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIHJldDtcbn1cblxuZnVuY3Rpb24gbG9hZFBhdGNoKHBhcmFtLCBiYXNlKSB7XG4gIGlmICh0eXBlb2YgcGFyYW0gPT09ICdzdHJpbmcnKSB7XG4gICAgaWYgKCgvXkBAL20pLnRlc3QocGFyYW0pIHx8ICgoL15JbmRleDovbSkudGVzdChwYXJhbSkpKSB7XG4gICAgICByZXR1cm4gcGFyc2VQYXRjaChwYXJhbSlbMF07XG4gICAgfVxuXG4gICAgaWYgKCFiYXNlKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoJ011c3QgcHJvdmlkZSBhIGJhc2UgcmVmZXJlbmNlIG9yIHBhc3MgaW4gYSBwYXRjaCcpO1xuICAgIH1cbiAgICByZXR1cm4gc3RydWN0dXJlZFBhdGNoKHVuZGVmaW5lZCwgdW5kZWZpbmVkLCBiYXNlLCBwYXJhbSk7XG4gIH1cblxuICByZXR1cm4gcGFyYW07XG59XG5cbmZ1bmN0aW9uIGZpbGVOYW1lQ2hhbmdlZChwYXRjaCkge1xuICByZXR1cm4gcGF0Y2gubmV3RmlsZU5hbWUgJiYgcGF0Y2gubmV3RmlsZU5hbWUgIT09IHBhdGNoLm9sZEZpbGVOYW1lO1xufVxuXG5mdW5jdGlvbiBzZWxlY3RGaWVsZChpbmRleCwgbWluZSwgdGhlaXJzKSB7XG4gIGlmIChtaW5lID09PSB0aGVpcnMpIHtcbiAgICByZXR1cm4gbWluZTtcbiAgfSBlbHNlIHtcbiAgICBpbmRleC5jb25mbGljdCA9IHRydWU7XG4gICAgcmV0dXJuIHttaW5lLCB0aGVpcnN9O1xuICB9XG59XG5cbmZ1bmN0aW9uIGh1bmtCZWZvcmUodGVzdCwgY2hlY2spIHtcbiAgcmV0dXJuIHRlc3Qub2xkU3RhcnQgPCBjaGVjay5vbGRTdGFydFxuICAgICYmICh0ZXN0Lm9sZFN0YXJ0ICsgdGVzdC5vbGRMaW5lcykgPCBjaGVjay5vbGRTdGFydDtcbn1cblxuZnVuY3Rpb24gY2xvbmVIdW5rKGh1bmssIG9mZnNldCkge1xuICByZXR1cm4ge1xuICAgIG9sZFN0YXJ0OiBodW5rLm9sZFN0YXJ0LCBvbGRMaW5lczogaHVuay5vbGRMaW5lcyxcbiAgICBuZXdTdGFydDogaHVuay5uZXdTdGFydCArIG9mZnNldCwgbmV3TGluZXM6IGh1bmsubmV3TGluZXMsXG4gICAgbGluZXM6IGh1bmsubGluZXNcbiAgfTtcbn1cblxuZnVuY3Rpb24gbWVyZ2VMaW5lcyhodW5rLCBtaW5lT2Zmc2V0LCBtaW5lTGluZXMsIHRoZWlyT2Zmc2V0LCB0aGVpckxpbmVzKSB7XG4gIC8vIFRoaXMgd2lsbCBnZW5lcmFsbHkgcmVzdWx0IGluIGEgY29uZmxpY3RlZCBodW5rLCBidXQgdGhlcmUgYXJlIGNhc2VzIHdoZXJlIHRoZSBjb250ZXh0XG4gIC8vIGlzIHRoZSBvbmx5IG92ZXJsYXAgd2hlcmUgd2UgY2FuIHN1Y2Nlc3NmdWxseSBtZXJnZSB0aGUgY29udGVudCBoZXJlLlxuICBsZXQgbWluZSA9IHtvZmZzZXQ6IG1pbmVPZmZzZXQsIGxpbmVzOiBtaW5lTGluZXMsIGluZGV4OiAwfSxcbiAgICAgIHRoZWlyID0ge29mZnNldDogdGhlaXJPZmZzZXQsIGxpbmVzOiB0aGVpckxpbmVzLCBpbmRleDogMH07XG5cbiAgLy8gSGFuZGxlIGFueSBsZWFkaW5nIGNvbnRlbnRcbiAgaW5zZXJ0TGVhZGluZyhodW5rLCBtaW5lLCB0aGVpcik7XG4gIGluc2VydExlYWRpbmcoaHVuaywgdGhlaXIsIG1pbmUpO1xuXG4gIC8vIE5vdyBpbiB0aGUgb3ZlcmxhcCBjb250ZW50LiBTY2FuIHRocm91Z2ggYW5kIHNlbGVjdCB0aGUgYmVzdCBjaGFuZ2VzIGZyb20gZWFjaC5cbiAgd2hpbGUgKG1pbmUuaW5kZXggPCBtaW5lLmxpbmVzLmxlbmd0aCAmJiB0aGVpci5pbmRleCA8IHRoZWlyLmxpbmVzLmxlbmd0aCkge1xuICAgIGxldCBtaW5lQ3VycmVudCA9IG1pbmUubGluZXNbbWluZS5pbmRleF0sXG4gICAgICAgIHRoZWlyQ3VycmVudCA9IHRoZWlyLmxpbmVzW3RoZWlyLmluZGV4XTtcblxuICAgIGlmICgobWluZUN1cnJlbnRbMF0gPT09ICctJyB8fCBtaW5lQ3VycmVudFswXSA9PT0gJysnKVxuICAgICAgICAmJiAodGhlaXJDdXJyZW50WzBdID09PSAnLScgfHwgdGhlaXJDdXJyZW50WzBdID09PSAnKycpKSB7XG4gICAgICAvLyBCb3RoIG1vZGlmaWVkIC4uLlxuICAgICAgbXV0dWFsQ2hhbmdlKGh1bmssIG1pbmUsIHRoZWlyKTtcbiAgICB9IGVsc2UgaWYgKG1pbmVDdXJyZW50WzBdID09PSAnKycgJiYgdGhlaXJDdXJyZW50WzBdID09PSAnICcpIHtcbiAgICAgIC8vIE1pbmUgaW5zZXJ0ZWRcbiAgICAgIGh1bmsubGluZXMucHVzaCguLi4gY29sbGVjdENoYW5nZShtaW5lKSk7XG4gICAgfSBlbHNlIGlmICh0aGVpckN1cnJlbnRbMF0gPT09ICcrJyAmJiBtaW5lQ3VycmVudFswXSA9PT0gJyAnKSB7XG4gICAgICAvLyBUaGVpcnMgaW5zZXJ0ZWRcbiAgICAgIGh1bmsubGluZXMucHVzaCguLi4gY29sbGVjdENoYW5nZSh0aGVpcikpO1xuICAgIH0gZWxzZSBpZiAobWluZUN1cnJlbnRbMF0gPT09ICctJyAmJiB0aGVpckN1cnJlbnRbMF0gPT09ICcgJykge1xuICAgICAgLy8gTWluZSByZW1vdmVkIG9yIGVkaXRlZFxuICAgICAgcmVtb3ZhbChodW5rLCBtaW5lLCB0aGVpcik7XG4gICAgfSBlbHNlIGlmICh0aGVpckN1cnJlbnRbMF0gPT09ICctJyAmJiBtaW5lQ3VycmVudFswXSA9PT0gJyAnKSB7XG4gICAgICAvLyBUaGVpciByZW1vdmVkIG9yIGVkaXRlZFxuICAgICAgcmVtb3ZhbChodW5rLCB0aGVpciwgbWluZSwgdHJ1ZSk7XG4gICAgfSBlbHNlIGlmIChtaW5lQ3VycmVudCA9PT0gdGhlaXJDdXJyZW50KSB7XG4gICAgICAvLyBDb250ZXh0IGlkZW50aXR5XG4gICAgICBodW5rLmxpbmVzLnB1c2gobWluZUN1cnJlbnQpO1xuICAgICAgbWluZS5pbmRleCsrO1xuICAgICAgdGhlaXIuaW5kZXgrKztcbiAgICB9IGVsc2Uge1xuICAgICAgLy8gQ29udGV4dCBtaXNtYXRjaFxuICAgICAgY29uZmxpY3QoaHVuaywgY29sbGVjdENoYW5nZShtaW5lKSwgY29sbGVjdENoYW5nZSh0aGVpcikpO1xuICAgIH1cbiAgfVxuXG4gIC8vIE5vdyBwdXNoIGFueXRoaW5nIHRoYXQgbWF5IGJlIHJlbWFpbmluZ1xuICBpbnNlcnRUcmFpbGluZyhodW5rLCBtaW5lKTtcbiAgaW5zZXJ0VHJhaWxpbmcoaHVuaywgdGhlaXIpO1xuXG4gIGNhbGNMaW5lQ291bnQoaHVuayk7XG59XG5cbmZ1bmN0aW9uIG11dHVhbENoYW5nZShodW5rLCBtaW5lLCB0aGVpcikge1xuICBsZXQgbXlDaGFuZ2VzID0gY29sbGVjdENoYW5nZShtaW5lKSxcbiAgICAgIHRoZWlyQ2hhbmdlcyA9IGNvbGxlY3RDaGFuZ2UodGhlaXIpO1xuXG4gIGlmIChhbGxSZW1vdmVzKG15Q2hhbmdlcykgJiYgYWxsUmVtb3Zlcyh0aGVpckNoYW5nZXMpKSB7XG4gICAgLy8gU3BlY2lhbCBjYXNlIGZvciByZW1vdmUgY2hhbmdlcyB0aGF0IGFyZSBzdXBlcnNldHMgb2Ygb25lIGFub3RoZXJcbiAgICBpZiAoYXJyYXlTdGFydHNXaXRoKG15Q2hhbmdlcywgdGhlaXJDaGFuZ2VzKVxuICAgICAgICAmJiBza2lwUmVtb3ZlU3VwZXJzZXQodGhlaXIsIG15Q2hhbmdlcywgbXlDaGFuZ2VzLmxlbmd0aCAtIHRoZWlyQ2hhbmdlcy5sZW5ndGgpKSB7XG4gICAgICBodW5rLmxpbmVzLnB1c2goLi4uIG15Q2hhbmdlcyk7XG4gICAgICByZXR1cm47XG4gICAgfSBlbHNlIGlmIChhcnJheVN0YXJ0c1dpdGgodGhlaXJDaGFuZ2VzLCBteUNoYW5nZXMpXG4gICAgICAgICYmIHNraXBSZW1vdmVTdXBlcnNldChtaW5lLCB0aGVpckNoYW5nZXMsIHRoZWlyQ2hhbmdlcy5sZW5ndGggLSBteUNoYW5nZXMubGVuZ3RoKSkge1xuICAgICAgaHVuay5saW5lcy5wdXNoKC4uLiB0aGVpckNoYW5nZXMpO1xuICAgICAgcmV0dXJuO1xuICAgIH1cbiAgfSBlbHNlIGlmIChhcnJheUVxdWFsKG15Q2hhbmdlcywgdGhlaXJDaGFuZ2VzKSkge1xuICAgIGh1bmsubGluZXMucHVzaCguLi4gbXlDaGFuZ2VzKTtcbiAgICByZXR1cm47XG4gIH1cblxuICBjb25mbGljdChodW5rLCBteUNoYW5nZXMsIHRoZWlyQ2hhbmdlcyk7XG59XG5cbmZ1bmN0aW9uIHJlbW92YWwoaHVuaywgbWluZSwgdGhlaXIsIHN3YXApIHtcbiAgbGV0IG15Q2hhbmdlcyA9IGNvbGxlY3RDaGFuZ2UobWluZSksXG4gICAgICB0aGVpckNoYW5nZXMgPSBjb2xsZWN0Q29udGV4dCh0aGVpciwgbXlDaGFuZ2VzKTtcbiAgaWYgKHRoZWlyQ2hhbmdlcy5tZXJnZWQpIHtcbiAgICBodW5rLmxpbmVzLnB1c2goLi4uIHRoZWlyQ2hhbmdlcy5tZXJnZWQpO1xuICB9IGVsc2Uge1xuICAgIGNvbmZsaWN0KGh1bmssIHN3YXAgPyB0aGVpckNoYW5nZXMgOiBteUNoYW5nZXMsIHN3YXAgPyBteUNoYW5nZXMgOiB0aGVpckNoYW5nZXMpO1xuICB9XG59XG5cbmZ1bmN0aW9uIGNvbmZsaWN0KGh1bmssIG1pbmUsIHRoZWlyKSB7XG4gIGh1bmsuY29uZmxpY3QgPSB0cnVlO1xuICBodW5rLmxpbmVzLnB1c2goe1xuICAgIGNvbmZsaWN0OiB0cnVlLFxuICAgIG1pbmU6IG1pbmUsXG4gICAgdGhlaXJzOiB0aGVpclxuICB9KTtcbn1cblxuZnVuY3Rpb24gaW5zZXJ0TGVhZGluZyhodW5rLCBpbnNlcnQsIHRoZWlyKSB7XG4gIHdoaWxlIChpbnNlcnQub2Zmc2V0IDwgdGhlaXIub2Zmc2V0ICYmIGluc2VydC5pbmRleCA8IGluc2VydC5saW5lcy5sZW5ndGgpIHtcbiAgICBsZXQgbGluZSA9IGluc2VydC5saW5lc1tpbnNlcnQuaW5kZXgrK107XG4gICAgaHVuay5saW5lcy5wdXNoKGxpbmUpO1xuICAgIGluc2VydC5vZmZzZXQrKztcbiAgfVxufVxuZnVuY3Rpb24gaW5zZXJ0VHJhaWxpbmcoaHVuaywgaW5zZXJ0KSB7XG4gIHdoaWxlIChpbnNlcnQuaW5kZXggPCBpbnNlcnQubGluZXMubGVuZ3RoKSB7XG4gICAgbGV0IGxpbmUgPSBpbnNlcnQubGluZXNbaW5zZXJ0LmluZGV4KytdO1xuICAgIGh1bmsubGluZXMucHVzaChsaW5lKTtcbiAgfVxufVxuXG5mdW5jdGlvbiBjb2xsZWN0Q2hhbmdlKHN0YXRlKSB7XG4gIGxldCByZXQgPSBbXSxcbiAgICAgIG9wZXJhdGlvbiA9IHN0YXRlLmxpbmVzW3N0YXRlLmluZGV4XVswXTtcbiAgd2hpbGUgKHN0YXRlLmluZGV4IDwgc3RhdGUubGluZXMubGVuZ3RoKSB7XG4gICAgbGV0IGxpbmUgPSBzdGF0ZS5saW5lc1tzdGF0ZS5pbmRleF07XG5cbiAgICAvLyBHcm91cCBhZGRpdGlvbnMgdGhhdCBhcmUgaW1tZWRpYXRlbHkgYWZ0ZXIgc3VidHJhY3Rpb25zIGFuZCB0cmVhdCB0aGVtIGFzIG9uZSBcImF0b21pY1wiIG1vZGlmeSBjaGFuZ2UuXG4gICAgaWYgKG9wZXJhdGlvbiA9PT0gJy0nICYmIGxpbmVbMF0gPT09ICcrJykge1xuICAgICAgb3BlcmF0aW9uID0gJysnO1xuICAgIH1cblxuICAgIGlmIChvcGVyYXRpb24gPT09IGxpbmVbMF0pIHtcbiAgICAgIHJldC5wdXNoKGxpbmUpO1xuICAgICAgc3RhdGUuaW5kZXgrKztcbiAgICB9IGVsc2Uge1xuICAgICAgYnJlYWs7XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIHJldDtcbn1cbmZ1bmN0aW9uIGNvbGxlY3RDb250ZXh0KHN0YXRlLCBtYXRjaENoYW5nZXMpIHtcbiAgbGV0IGNoYW5nZXMgPSBbXSxcbiAgICAgIG1lcmdlZCA9IFtdLFxuICAgICAgbWF0Y2hJbmRleCA9IDAsXG4gICAgICBjb250ZXh0Q2hhbmdlcyA9IGZhbHNlLFxuICAgICAgY29uZmxpY3RlZCA9IGZhbHNlO1xuICB3aGlsZSAobWF0Y2hJbmRleCA8IG1hdGNoQ2hhbmdlcy5sZW5ndGhcbiAgICAgICAgJiYgc3RhdGUuaW5kZXggPCBzdGF0ZS5saW5lcy5sZW5ndGgpIHtcbiAgICBsZXQgY2hhbmdlID0gc3RhdGUubGluZXNbc3RhdGUuaW5kZXhdLFxuICAgICAgICBtYXRjaCA9IG1hdGNoQ2hhbmdlc1ttYXRjaEluZGV4XTtcblxuICAgIC8vIE9uY2Ugd2UndmUgaGl0IG91ciBhZGQsIHRoZW4gd2UgYXJlIGRvbmVcbiAgICBpZiAobWF0Y2hbMF0gPT09ICcrJykge1xuICAgICAgYnJlYWs7XG4gICAgfVxuXG4gICAgY29udGV4dENoYW5nZXMgPSBjb250ZXh0Q2hhbmdlcyB8fCBjaGFuZ2VbMF0gIT09ICcgJztcblxuICAgIG1lcmdlZC5wdXNoKG1hdGNoKTtcbiAgICBtYXRjaEluZGV4Kys7XG5cbiAgICAvLyBDb25zdW1lIGFueSBhZGRpdGlvbnMgaW4gdGhlIG90aGVyIGJsb2NrIGFzIGEgY29uZmxpY3QgdG8gYXR0ZW1wdFxuICAgIC8vIHRvIHB1bGwgaW4gdGhlIHJlbWFpbmluZyBjb250ZXh0IGFmdGVyIHRoaXNcbiAgICBpZiAoY2hhbmdlWzBdID09PSAnKycpIHtcbiAgICAgIGNvbmZsaWN0ZWQgPSB0cnVlO1xuXG4gICAgICB3aGlsZSAoY2hhbmdlWzBdID09PSAnKycpIHtcbiAgICAgICAgY2hhbmdlcy5wdXNoKGNoYW5nZSk7XG4gICAgICAgIGNoYW5nZSA9IHN0YXRlLmxpbmVzWysrc3RhdGUuaW5kZXhdO1xuICAgICAgfVxuICAgIH1cblxuICAgIGlmIChtYXRjaC5zdWJzdHIoMSkgPT09IGNoYW5nZS5zdWJzdHIoMSkpIHtcbiAgICAgIGNoYW5nZXMucHVzaChjaGFuZ2UpO1xuICAgICAgc3RhdGUuaW5kZXgrKztcbiAgICB9IGVsc2Uge1xuICAgICAgY29uZmxpY3RlZCA9IHRydWU7XG4gICAgfVxuICB9XG5cbiAgaWYgKChtYXRjaENoYW5nZXNbbWF0Y2hJbmRleF0gfHwgJycpWzBdID09PSAnKydcbiAgICAgICYmIGNvbnRleHRDaGFuZ2VzKSB7XG4gICAgY29uZmxpY3RlZCA9IHRydWU7XG4gIH1cblxuICBpZiAoY29uZmxpY3RlZCkge1xuICAgIHJldHVybiBjaGFuZ2VzO1xuICB9XG5cbiAgd2hpbGUgKG1hdGNoSW5kZXggPCBtYXRjaENoYW5nZXMubGVuZ3RoKSB7XG4gICAgbWVyZ2VkLnB1c2gobWF0Y2hDaGFuZ2VzW21hdGNoSW5kZXgrK10pO1xuICB9XG5cbiAgcmV0dXJuIHtcbiAgICBtZXJnZWQsXG4gICAgY2hhbmdlc1xuICB9O1xufVxuXG5mdW5jdGlvbiBhbGxSZW1vdmVzKGNoYW5nZXMpIHtcbiAgcmV0dXJuIGNoYW5nZXMucmVkdWNlKGZ1bmN0aW9uKHByZXYsIGNoYW5nZSkge1xuICAgIHJldHVybiBwcmV2ICYmIGNoYW5nZVswXSA9PT0gJy0nO1xuICB9LCB0cnVlKTtcbn1cbmZ1bmN0aW9uIHNraXBSZW1vdmVTdXBlcnNldChzdGF0ZSwgcmVtb3ZlQ2hhbmdlcywgZGVsdGEpIHtcbiAgZm9yIChsZXQgaSA9IDA7IGkgPCBkZWx0YTsgaSsrKSB7XG4gICAgbGV0IGNoYW5nZUNvbnRlbnQgPSByZW1vdmVDaGFuZ2VzW3JlbW92ZUNoYW5nZXMubGVuZ3RoIC0gZGVsdGEgKyBpXS5zdWJzdHIoMSk7XG4gICAgaWYgKHN0YXRlLmxpbmVzW3N0YXRlLmluZGV4ICsgaV0gIT09ICcgJyArIGNoYW5nZUNvbnRlbnQpIHtcbiAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9XG4gIH1cblxuICBzdGF0ZS5pbmRleCArPSBkZWx0YTtcbiAgcmV0dXJuIHRydWU7XG59XG5cbmZ1bmN0aW9uIGNhbGNPbGROZXdMaW5lQ291bnQobGluZXMpIHtcbiAgbGV0IG9sZExpbmVzID0gMDtcbiAgbGV0IG5ld0xpbmVzID0gMDtcblxuICBsaW5lcy5mb3JFYWNoKGZ1bmN0aW9uKGxpbmUpIHtcbiAgICBpZiAodHlwZW9mIGxpbmUgIT09ICdzdHJpbmcnKSB7XG4gICAgICBsZXQgbXlDb3VudCA9IGNhbGNPbGROZXdMaW5lQ291bnQobGluZS5taW5lKTtcbiAgICAgIGxldCB0aGVpckNvdW50ID0gY2FsY09sZE5ld0xpbmVDb3VudChsaW5lLnRoZWlycyk7XG5cbiAgICAgIGlmIChvbGRMaW5lcyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIGlmIChteUNvdW50Lm9sZExpbmVzID09PSB0aGVpckNvdW50Lm9sZExpbmVzKSB7XG4gICAgICAgICAgb2xkTGluZXMgKz0gbXlDb3VudC5vbGRMaW5lcztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBvbGRMaW5lcyA9IHVuZGVmaW5lZDtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAobmV3TGluZXMgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICBpZiAobXlDb3VudC5uZXdMaW5lcyA9PT0gdGhlaXJDb3VudC5uZXdMaW5lcykge1xuICAgICAgICAgIG5ld0xpbmVzICs9IG15Q291bnQubmV3TGluZXM7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgbmV3TGluZXMgPSB1bmRlZmluZWQ7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgaWYgKG5ld0xpbmVzICE9PSB1bmRlZmluZWQgJiYgKGxpbmVbMF0gPT09ICcrJyB8fCBsaW5lWzBdID09PSAnICcpKSB7XG4gICAgICAgIG5ld0xpbmVzKys7XG4gICAgICB9XG4gICAgICBpZiAob2xkTGluZXMgIT09IHVuZGVmaW5lZCAmJiAobGluZVswXSA9PT0gJy0nIHx8IGxpbmVbMF0gPT09ICcgJykpIHtcbiAgICAgICAgb2xkTGluZXMrKztcbiAgICAgIH1cbiAgICB9XG4gIH0pO1xuXG4gIHJldHVybiB7b2xkTGluZXMsIG5ld0xpbmVzfTtcbn1cbiJdfQ== diff --git a/node_modules/diff/lib/patch/parse.js b/node_modules/diff/lib/patch/parse.js deleted file mode 100644 index 51bae56..0000000 --- a/node_modules/diff/lib/patch/parse.js +++ /dev/null @@ -1,156 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.parsePatch = parsePatch; - -/*istanbul ignore end*/ -function parsePatch(uniDiff) { - /*istanbul ignore start*/ - var - /*istanbul ignore end*/ - options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var diffstr = uniDiff.split(/\r\n|[\n\v\f\r\x85]/), - delimiters = uniDiff.match(/\r\n|[\n\v\f\r\x85]/g) || [], - list = [], - i = 0; - - function parseIndex() { - var index = {}; - list.push(index); // Parse diff metadata - - while (i < diffstr.length) { - var line = diffstr[i]; // File header found, end parsing diff metadata - - if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) { - break; - } // Diff index - - - var headerMatch = /^(?:Index:|diff(?: -r \w+)+)\s+/.exec(line); - - if (headerMatch) { - index.index = line.substring(headerMatch[0].length).trim(); - } - - i++; - } // Parse file headers if they are defined. Unified diff requires them, but - // there's no technical issues to have an isolated hunk without file header - - - parseFileHeader(index); - parseFileHeader(index); // Parse hunks - - index.hunks = []; - - while (i < diffstr.length) { - var _line = diffstr[i]; - - if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)) { - break; - } else if (/^@@/.test(_line)) { - index.hunks.push(parseHunk()); - } else if (_line && options.strict) { - // Ignore unexpected content unless in strict mode - throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line)); - } else { - i++; - } - } - } // Parses the --- and +++ headers, if none are found, no lines - // are consumed. - - - function parseFileHeader(index) { - var fileHeaderMatch = /^(---|\+\+\+)\s+/.exec(diffstr[i]); - - if (fileHeaderMatch) { - var keyPrefix = fileHeaderMatch[1] === '---' ? 'old' : 'new'; - var data = diffstr[i].substring(3).trim().split('\t', 2); - var fileName = data[0].replace(/\\\\/g, '\\'); - - if (fileName.startsWith('"') && fileName.endsWith('"')) { - fileName = fileName.substr(1, fileName.length - 2); - } - - index[keyPrefix + 'FileName'] = fileName; - index[keyPrefix + 'Header'] = (data[1] || '').trim(); - i++; - } - } // Parses a hunk - // This assumes that we are at the start of a hunk. - - - function parseHunk() { - var chunkHeaderIndex = i, - chunkHeaderLine = diffstr[i++], - chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/); - var hunk = { - oldStart: +chunkHeader[1], - oldLines: +chunkHeader[2] || 1, - newStart: +chunkHeader[3], - newLines: +chunkHeader[4] || 1, - lines: [], - linedelimiters: [] - }; - var addCount = 0, - removeCount = 0; - - for (; i < diffstr.length; i++) { - // Lines starting with '---' could be mistaken for the "remove line" operation - // But they could be the header for the next file. Therefore prune such cases out. - if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) { - break; - } - - var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0]; - - if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') { - hunk.lines.push(diffstr[i]); - hunk.linedelimiters.push(delimiters[i] || '\n'); - - if (operation === '+') { - addCount++; - } else if (operation === '-') { - removeCount++; - } else if (operation === ' ') { - addCount++; - removeCount++; - } - } else { - break; - } - } // Handle the empty block count case - - - if (!addCount && hunk.newLines === 1) { - hunk.newLines = 0; - } - - if (!removeCount && hunk.oldLines === 1) { - hunk.oldLines = 0; - } // Perform optional sanity checking - - - if (options.strict) { - if (addCount !== hunk.newLines) { - throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); - } - - if (removeCount !== hunk.oldLines) { - throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); - } - } - - return hunk; - } - - while (i < diffstr.length) { - parseIndex(); - } - - return list; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9wYXRjaC9wYXJzZS5qcyJdLCJuYW1lcyI6WyJwYXJzZVBhdGNoIiwidW5pRGlmZiIsIm9wdGlvbnMiLCJkaWZmc3RyIiwic3BsaXQiLCJkZWxpbWl0ZXJzIiwibWF0Y2giLCJsaXN0IiwiaSIsInBhcnNlSW5kZXgiLCJpbmRleCIsInB1c2giLCJsZW5ndGgiLCJsaW5lIiwidGVzdCIsImhlYWRlck1hdGNoIiwiZXhlYyIsInN1YnN0cmluZyIsInRyaW0iLCJwYXJzZUZpbGVIZWFkZXIiLCJodW5rcyIsInBhcnNlSHVuayIsInN0cmljdCIsIkVycm9yIiwiSlNPTiIsInN0cmluZ2lmeSIsImZpbGVIZWFkZXJNYXRjaCIsImtleVByZWZpeCIsImRhdGEiLCJmaWxlTmFtZSIsInJlcGxhY2UiLCJzdGFydHNXaXRoIiwiZW5kc1dpdGgiLCJzdWJzdHIiLCJjaHVua0hlYWRlckluZGV4IiwiY2h1bmtIZWFkZXJMaW5lIiwiY2h1bmtIZWFkZXIiLCJodW5rIiwib2xkU3RhcnQiLCJvbGRMaW5lcyIsIm5ld1N0YXJ0IiwibmV3TGluZXMiLCJsaW5lcyIsImxpbmVkZWxpbWl0ZXJzIiwiYWRkQ291bnQiLCJyZW1vdmVDb3VudCIsImluZGV4T2YiLCJvcGVyYXRpb24iXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUFPLFNBQVNBLFVBQVQsQ0FBb0JDLE9BQXBCLEVBQTJDO0FBQUE7QUFBQTtBQUFBO0FBQWRDLEVBQUFBLE9BQWMsdUVBQUosRUFBSTtBQUNoRCxNQUFJQyxPQUFPLEdBQUdGLE9BQU8sQ0FBQ0csS0FBUixDQUFjLHFCQUFkLENBQWQ7QUFBQSxNQUNJQyxVQUFVLEdBQUdKLE9BQU8sQ0FBQ0ssS0FBUixDQUFjLHNCQUFkLEtBQXlDLEVBRDFEO0FBQUEsTUFFSUMsSUFBSSxHQUFHLEVBRlg7QUFBQSxNQUdJQyxDQUFDLEdBQUcsQ0FIUjs7QUFLQSxXQUFTQyxVQUFULEdBQXNCO0FBQ3BCLFFBQUlDLEtBQUssR0FBRyxFQUFaO0FBQ0FILElBQUFBLElBQUksQ0FBQ0ksSUFBTCxDQUFVRCxLQUFWLEVBRm9CLENBSXBCOztBQUNBLFdBQU9GLENBQUMsR0FBR0wsT0FBTyxDQUFDUyxNQUFuQixFQUEyQjtBQUN6QixVQUFJQyxJQUFJLEdBQUdWLE9BQU8sQ0FBQ0ssQ0FBRCxDQUFsQixDQUR5QixDQUd6Qjs7QUFDQSxVQUFLLHVCQUFELENBQTBCTSxJQUExQixDQUErQkQsSUFBL0IsQ0FBSixFQUEwQztBQUN4QztBQUNELE9BTndCLENBUXpCOzs7QUFDQSxVQUFJRSxXQUFXLEdBQUksaUNBQUQsQ0FBb0NDLElBQXBDLENBQXlDSCxJQUF6QyxDQUFsQjs7QUFDQSxVQUFJRSxXQUFKLEVBQWlCO0FBQ2ZMLFFBQUFBLEtBQUssQ0FBQ0EsS0FBTixHQUFjRyxJQUFJLENBQUNJLFNBQUwsQ0FBZUYsV0FBVyxDQUFDLENBQUQsQ0FBWCxDQUFlSCxNQUE5QixFQUFzQ00sSUFBdEMsRUFBZDtBQUNEOztBQUVEVixNQUFBQSxDQUFDO0FBQ0YsS0FwQm1CLENBc0JwQjtBQUNBOzs7QUFDQVcsSUFBQUEsZUFBZSxDQUFDVCxLQUFELENBQWY7QUFDQVMsSUFBQUEsZUFBZSxDQUFDVCxLQUFELENBQWYsQ0F6Qm9CLENBMkJwQjs7QUFDQUEsSUFBQUEsS0FBSyxDQUFDVSxLQUFOLEdBQWMsRUFBZDs7QUFFQSxXQUFPWixDQUFDLEdBQUdMLE9BQU8sQ0FBQ1MsTUFBbkIsRUFBMkI7QUFDekIsVUFBSUMsS0FBSSxHQUFHVixPQUFPLENBQUNLLENBQUQsQ0FBbEI7O0FBRUEsVUFBSyxnQ0FBRCxDQUFtQ00sSUFBbkMsQ0FBd0NELEtBQXhDLENBQUosRUFBbUQ7QUFDakQ7QUFDRCxPQUZELE1BRU8sSUFBSyxLQUFELENBQVFDLElBQVIsQ0FBYUQsS0FBYixDQUFKLEVBQXdCO0FBQzdCSCxRQUFBQSxLQUFLLENBQUNVLEtBQU4sQ0FBWVQsSUFBWixDQUFpQlUsU0FBUyxFQUExQjtBQUNELE9BRk0sTUFFQSxJQUFJUixLQUFJLElBQUlYLE9BQU8sQ0FBQ29CLE1BQXBCLEVBQTRCO0FBQ2pDO0FBQ0EsY0FBTSxJQUFJQyxLQUFKLENBQVUsbUJBQW1CZixDQUFDLEdBQUcsQ0FBdkIsSUFBNEIsR0FBNUIsR0FBa0NnQixJQUFJLENBQUNDLFNBQUwsQ0FBZVosS0FBZixDQUE1QyxDQUFOO0FBQ0QsT0FITSxNQUdBO0FBQ0xMLFFBQUFBLENBQUM7QUFDRjtBQUNGO0FBQ0YsR0FsRCtDLENBb0RoRDtBQUNBOzs7QUFDQSxXQUFTVyxlQUFULENBQXlCVCxLQUF6QixFQUFnQztBQUM5QixRQUFNZ0IsZUFBZSxHQUFJLGtCQUFELENBQXFCVixJQUFyQixDQUEwQmIsT0FBTyxDQUFDSyxDQUFELENBQWpDLENBQXhCOztBQUNBLFFBQUlrQixlQUFKLEVBQXFCO0FBQ25CLFVBQUlDLFNBQVMsR0FBR0QsZUFBZSxDQUFDLENBQUQsQ0FBZixLQUF1QixLQUF2QixHQUErQixLQUEvQixHQUF1QyxLQUF2RDtBQUNBLFVBQU1FLElBQUksR0FBR3pCLE9BQU8sQ0FBQ0ssQ0FBRCxDQUFQLENBQVdTLFNBQVgsQ0FBcUIsQ0FBckIsRUFBd0JDLElBQXhCLEdBQStCZCxLQUEvQixDQUFxQyxJQUFyQyxFQUEyQyxDQUEzQyxDQUFiO0FBQ0EsVUFBSXlCLFFBQVEsR0FBR0QsSUFBSSxDQUFDLENBQUQsQ0FBSixDQUFRRSxPQUFSLENBQWdCLE9BQWhCLEVBQXlCLElBQXpCLENBQWY7O0FBQ0EsVUFBSUQsUUFBUSxDQUFDRSxVQUFULENBQW9CLEdBQXBCLEtBQTRCRixRQUFRLENBQUNHLFFBQVQsQ0FBa0IsR0FBbEIsQ0FBaEMsRUFBd0Q7QUFDdERILFFBQUFBLFFBQVEsR0FBR0EsUUFBUSxDQUFDSSxNQUFULENBQWdCLENBQWhCLEVBQW1CSixRQUFRLENBQUNqQixNQUFULEdBQWtCLENBQXJDLENBQVg7QUFDRDs7QUFDREYsTUFBQUEsS0FBSyxDQUFDaUIsU0FBUyxHQUFHLFVBQWIsQ0FBTCxHQUFnQ0UsUUFBaEM7QUFDQW5CLE1BQUFBLEtBQUssQ0FBQ2lCLFNBQVMsR0FBRyxRQUFiLENBQUwsR0FBOEIsQ0FBQ0MsSUFBSSxDQUFDLENBQUQsQ0FBSixJQUFXLEVBQVosRUFBZ0JWLElBQWhCLEVBQTlCO0FBRUFWLE1BQUFBLENBQUM7QUFDRjtBQUNGLEdBcEUrQyxDQXNFaEQ7QUFDQTs7O0FBQ0EsV0FBU2EsU0FBVCxHQUFxQjtBQUNuQixRQUFJYSxnQkFBZ0IsR0FBRzFCLENBQXZCO0FBQUEsUUFDSTJCLGVBQWUsR0FBR2hDLE9BQU8sQ0FBQ0ssQ0FBQyxFQUFGLENBRDdCO0FBQUEsUUFFSTRCLFdBQVcsR0FBR0QsZUFBZSxDQUFDL0IsS0FBaEIsQ0FBc0IsNENBQXRCLENBRmxCO0FBSUEsUUFBSWlDLElBQUksR0FBRztBQUNUQyxNQUFBQSxRQUFRLEVBQUUsQ0FBQ0YsV0FBVyxDQUFDLENBQUQsQ0FEYjtBQUVURyxNQUFBQSxRQUFRLEVBQUUsQ0FBQ0gsV0FBVyxDQUFDLENBQUQsQ0FBWixJQUFtQixDQUZwQjtBQUdUSSxNQUFBQSxRQUFRLEVBQUUsQ0FBQ0osV0FBVyxDQUFDLENBQUQsQ0FIYjtBQUlUSyxNQUFBQSxRQUFRLEVBQUUsQ0FBQ0wsV0FBVyxDQUFDLENBQUQsQ0FBWixJQUFtQixDQUpwQjtBQUtUTSxNQUFBQSxLQUFLLEVBQUUsRUFMRTtBQU1UQyxNQUFBQSxjQUFjLEVBQUU7QUFOUCxLQUFYO0FBU0EsUUFBSUMsUUFBUSxHQUFHLENBQWY7QUFBQSxRQUNJQyxXQUFXLEdBQUcsQ0FEbEI7O0FBRUEsV0FBT3JDLENBQUMsR0FBR0wsT0FBTyxDQUFDUyxNQUFuQixFQUEyQkosQ0FBQyxFQUE1QixFQUFnQztBQUM5QjtBQUNBO0FBQ0EsVUFBSUwsT0FBTyxDQUFDSyxDQUFELENBQVAsQ0FBV3NDLE9BQVgsQ0FBbUIsTUFBbkIsTUFBK0IsQ0FBL0IsSUFDTXRDLENBQUMsR0FBRyxDQUFKLEdBQVFMLE9BQU8sQ0FBQ1MsTUFEdEIsSUFFS1QsT0FBTyxDQUFDSyxDQUFDLEdBQUcsQ0FBTCxDQUFQLENBQWVzQyxPQUFmLENBQXVCLE1BQXZCLE1BQW1DLENBRnhDLElBR0szQyxPQUFPLENBQUNLLENBQUMsR0FBRyxDQUFMLENBQVAsQ0FBZXNDLE9BQWYsQ0FBdUIsSUFBdkIsTUFBaUMsQ0FIMUMsRUFHNkM7QUFDekM7QUFDSDs7QUFDRCxVQUFJQyxTQUFTLEdBQUk1QyxPQUFPLENBQUNLLENBQUQsQ0FBUCxDQUFXSSxNQUFYLElBQXFCLENBQXJCLElBQTBCSixDQUFDLElBQUtMLE9BQU8sQ0FBQ1MsTUFBUixHQUFpQixDQUFsRCxHQUF3RCxHQUF4RCxHQUE4RFQsT0FBTyxDQUFDSyxDQUFELENBQVAsQ0FBVyxDQUFYLENBQTlFOztBQUVBLFVBQUl1QyxTQUFTLEtBQUssR0FBZCxJQUFxQkEsU0FBUyxLQUFLLEdBQW5DLElBQTBDQSxTQUFTLEtBQUssR0FBeEQsSUFBK0RBLFNBQVMsS0FBSyxJQUFqRixFQUF1RjtBQUNyRlYsUUFBQUEsSUFBSSxDQUFDSyxLQUFMLENBQVcvQixJQUFYLENBQWdCUixPQUFPLENBQUNLLENBQUQsQ0FBdkI7QUFDQTZCLFFBQUFBLElBQUksQ0FBQ00sY0FBTCxDQUFvQmhDLElBQXBCLENBQXlCTixVQUFVLENBQUNHLENBQUQsQ0FBVixJQUFpQixJQUExQzs7QUFFQSxZQUFJdUMsU0FBUyxLQUFLLEdBQWxCLEVBQXVCO0FBQ3JCSCxVQUFBQSxRQUFRO0FBQ1QsU0FGRCxNQUVPLElBQUlHLFNBQVMsS0FBSyxHQUFsQixFQUF1QjtBQUM1QkYsVUFBQUEsV0FBVztBQUNaLFNBRk0sTUFFQSxJQUFJRSxTQUFTLEtBQUssR0FBbEIsRUFBdUI7QUFDNUJILFVBQUFBLFFBQVE7QUFDUkMsVUFBQUEsV0FBVztBQUNaO0FBQ0YsT0FaRCxNQVlPO0FBQ0w7QUFDRDtBQUNGLEtBMUNrQixDQTRDbkI7OztBQUNBLFFBQUksQ0FBQ0QsUUFBRCxJQUFhUCxJQUFJLENBQUNJLFFBQUwsS0FBa0IsQ0FBbkMsRUFBc0M7QUFDcENKLE1BQUFBLElBQUksQ0FBQ0ksUUFBTCxHQUFnQixDQUFoQjtBQUNEOztBQUNELFFBQUksQ0FBQ0ksV0FBRCxJQUFnQlIsSUFBSSxDQUFDRSxRQUFMLEtBQWtCLENBQXRDLEVBQXlDO0FBQ3ZDRixNQUFBQSxJQUFJLENBQUNFLFFBQUwsR0FBZ0IsQ0FBaEI7QUFDRCxLQWxEa0IsQ0FvRG5COzs7QUFDQSxRQUFJckMsT0FBTyxDQUFDb0IsTUFBWixFQUFvQjtBQUNsQixVQUFJc0IsUUFBUSxLQUFLUCxJQUFJLENBQUNJLFFBQXRCLEVBQWdDO0FBQzlCLGNBQU0sSUFBSWxCLEtBQUosQ0FBVSxzREFBc0RXLGdCQUFnQixHQUFHLENBQXpFLENBQVYsQ0FBTjtBQUNEOztBQUNELFVBQUlXLFdBQVcsS0FBS1IsSUFBSSxDQUFDRSxRQUF6QixFQUFtQztBQUNqQyxjQUFNLElBQUloQixLQUFKLENBQVUsd0RBQXdEVyxnQkFBZ0IsR0FBRyxDQUEzRSxDQUFWLENBQU47QUFDRDtBQUNGOztBQUVELFdBQU9HLElBQVA7QUFDRDs7QUFFRCxTQUFPN0IsQ0FBQyxHQUFHTCxPQUFPLENBQUNTLE1BQW5CLEVBQTJCO0FBQ3pCSCxJQUFBQSxVQUFVO0FBQ1g7O0FBRUQsU0FBT0YsSUFBUDtBQUNEIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGZ1bmN0aW9uIHBhcnNlUGF0Y2godW5pRGlmZiwgb3B0aW9ucyA9IHt9KSB7XG4gIGxldCBkaWZmc3RyID0gdW5pRGlmZi5zcGxpdCgvXFxyXFxufFtcXG5cXHZcXGZcXHJcXHg4NV0vKSxcbiAgICAgIGRlbGltaXRlcnMgPSB1bmlEaWZmLm1hdGNoKC9cXHJcXG58W1xcblxcdlxcZlxcclxceDg1XS9nKSB8fCBbXSxcbiAgICAgIGxpc3QgPSBbXSxcbiAgICAgIGkgPSAwO1xuXG4gIGZ1bmN0aW9uIHBhcnNlSW5kZXgoKSB7XG4gICAgbGV0IGluZGV4ID0ge307XG4gICAgbGlzdC5wdXNoKGluZGV4KTtcblxuICAgIC8vIFBhcnNlIGRpZmYgbWV0YWRhdGFcbiAgICB3aGlsZSAoaSA8IGRpZmZzdHIubGVuZ3RoKSB7XG4gICAgICBsZXQgbGluZSA9IGRpZmZzdHJbaV07XG5cbiAgICAgIC8vIEZpbGUgaGVhZGVyIGZvdW5kLCBlbmQgcGFyc2luZyBkaWZmIG1ldGFkYXRhXG4gICAgICBpZiAoKC9eKFxcLVxcLVxcLXxcXCtcXCtcXCt8QEApXFxzLykudGVzdChsaW5lKSkge1xuICAgICAgICBicmVhaztcbiAgICAgIH1cblxuICAgICAgLy8gRGlmZiBpbmRleFxuICAgICAgbGV0IGhlYWRlck1hdGNoID0gKC9eKD86SW5kZXg6fGRpZmYoPzogLXIgXFx3KykrKVxccysvKS5leGVjKGxpbmUpO1xuICAgICAgaWYgKGhlYWRlck1hdGNoKSB7XG4gICAgICAgIGluZGV4LmluZGV4ID0gbGluZS5zdWJzdHJpbmcoaGVhZGVyTWF0Y2hbMF0ubGVuZ3RoKS50cmltKCk7XG4gICAgICB9XG5cbiAgICAgIGkrKztcbiAgICB9XG5cbiAgICAvLyBQYXJzZSBmaWxlIGhlYWRlcnMgaWYgdGhleSBhcmUgZGVmaW5lZC4gVW5pZmllZCBkaWZmIHJlcXVpcmVzIHRoZW0sIGJ1dFxuICAgIC8vIHRoZXJlJ3Mgbm8gdGVjaG5pY2FsIGlzc3VlcyB0byBoYXZlIGFuIGlzb2xhdGVkIGh1bmsgd2l0aG91dCBmaWxlIGhlYWRlclxuICAgIHBhcnNlRmlsZUhlYWRlcihpbmRleCk7XG4gICAgcGFyc2VGaWxlSGVhZGVyKGluZGV4KTtcblxuICAgIC8vIFBhcnNlIGh1bmtzXG4gICAgaW5kZXguaHVua3MgPSBbXTtcblxuICAgIHdoaWxlIChpIDwgZGlmZnN0ci5sZW5ndGgpIHtcbiAgICAgIGxldCBsaW5lID0gZGlmZnN0cltpXTtcblxuICAgICAgaWYgKCgvXihJbmRleDp8ZGlmZnxcXC1cXC1cXC18XFwrXFwrXFwrKVxccy8pLnRlc3QobGluZSkpIHtcbiAgICAgICAgYnJlYWs7XG4gICAgICB9IGVsc2UgaWYgKCgvXkBALykudGVzdChsaW5lKSkge1xuICAgICAgICBpbmRleC5odW5rcy5wdXNoKHBhcnNlSHVuaygpKTtcbiAgICAgIH0gZWxzZSBpZiAobGluZSAmJiBvcHRpb25zLnN0cmljdCkge1xuICAgICAgICAvLyBJZ25vcmUgdW5leHBlY3RlZCBjb250ZW50IHVubGVzcyBpbiBzdHJpY3QgbW9kZVxuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1Vua25vd24gbGluZSAnICsgKGkgKyAxKSArICcgJyArIEpTT04uc3RyaW5naWZ5KGxpbmUpKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGkrKztcbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICAvLyBQYXJzZXMgdGhlIC0tLSBhbmQgKysrIGhlYWRlcnMsIGlmIG5vbmUgYXJlIGZvdW5kLCBubyBsaW5lc1xuICAvLyBhcmUgY29uc3VtZWQuXG4gIGZ1bmN0aW9uIHBhcnNlRmlsZUhlYWRlcihpbmRleCkge1xuICAgIGNvbnN0IGZpbGVIZWFkZXJNYXRjaCA9ICgvXigtLS18XFwrXFwrXFwrKVxccysvKS5leGVjKGRpZmZzdHJbaV0pO1xuICAgIGlmIChmaWxlSGVhZGVyTWF0Y2gpIHtcbiAgICAgIGxldCBrZXlQcmVmaXggPSBmaWxlSGVhZGVyTWF0Y2hbMV0gPT09ICctLS0nID8gJ29sZCcgOiAnbmV3JztcbiAgICAgIGNvbnN0IGRhdGEgPSBkaWZmc3RyW2ldLnN1YnN0cmluZygzKS50cmltKCkuc3BsaXQoJ1xcdCcsIDIpO1xuICAgICAgbGV0IGZpbGVOYW1lID0gZGF0YVswXS5yZXBsYWNlKC9cXFxcXFxcXC9nLCAnXFxcXCcpO1xuICAgICAgaWYgKGZpbGVOYW1lLnN0YXJ0c1dpdGgoJ1wiJykgJiYgZmlsZU5hbWUuZW5kc1dpdGgoJ1wiJykpIHtcbiAgICAgICAgZmlsZU5hbWUgPSBmaWxlTmFtZS5zdWJzdHIoMSwgZmlsZU5hbWUubGVuZ3RoIC0gMik7XG4gICAgICB9XG4gICAgICBpbmRleFtrZXlQcmVmaXggKyAnRmlsZU5hbWUnXSA9IGZpbGVOYW1lO1xuICAgICAgaW5kZXhba2V5UHJlZml4ICsgJ0hlYWRlciddID0gKGRhdGFbMV0gfHwgJycpLnRyaW0oKTtcblxuICAgICAgaSsrO1xuICAgIH1cbiAgfVxuXG4gIC8vIFBhcnNlcyBhIGh1bmtcbiAgLy8gVGhpcyBhc3N1bWVzIHRoYXQgd2UgYXJlIGF0IHRoZSBzdGFydCBvZiBhIGh1bmsuXG4gIGZ1bmN0aW9uIHBhcnNlSHVuaygpIHtcbiAgICBsZXQgY2h1bmtIZWFkZXJJbmRleCA9IGksXG4gICAgICAgIGNodW5rSGVhZGVyTGluZSA9IGRpZmZzdHJbaSsrXSxcbiAgICAgICAgY2h1bmtIZWFkZXIgPSBjaHVua0hlYWRlckxpbmUuc3BsaXQoL0BAIC0oXFxkKykoPzosKFxcZCspKT8gXFwrKFxcZCspKD86LChcXGQrKSk/IEBALyk7XG5cbiAgICBsZXQgaHVuayA9IHtcbiAgICAgIG9sZFN0YXJ0OiArY2h1bmtIZWFkZXJbMV0sXG4gICAgICBvbGRMaW5lczogK2NodW5rSGVhZGVyWzJdIHx8IDEsXG4gICAgICBuZXdTdGFydDogK2NodW5rSGVhZGVyWzNdLFxuICAgICAgbmV3TGluZXM6ICtjaHVua0hlYWRlcls0XSB8fCAxLFxuICAgICAgbGluZXM6IFtdLFxuICAgICAgbGluZWRlbGltaXRlcnM6IFtdXG4gICAgfTtcblxuICAgIGxldCBhZGRDb3VudCA9IDAsXG4gICAgICAgIHJlbW92ZUNvdW50ID0gMDtcbiAgICBmb3IgKDsgaSA8IGRpZmZzdHIubGVuZ3RoOyBpKyspIHtcbiAgICAgIC8vIExpbmVzIHN0YXJ0aW5nIHdpdGggJy0tLScgY291bGQgYmUgbWlzdGFrZW4gZm9yIHRoZSBcInJlbW92ZSBsaW5lXCIgb3BlcmF0aW9uXG4gICAgICAvLyBCdXQgdGhleSBjb3VsZCBiZSB0aGUgaGVhZGVyIGZvciB0aGUgbmV4dCBmaWxlLiBUaGVyZWZvcmUgcHJ1bmUgc3VjaCBjYXNlcyBvdXQuXG4gICAgICBpZiAoZGlmZnN0cltpXS5pbmRleE9mKCctLS0gJykgPT09IDBcbiAgICAgICAgICAgICYmIChpICsgMiA8IGRpZmZzdHIubGVuZ3RoKVxuICAgICAgICAgICAgJiYgZGlmZnN0cltpICsgMV0uaW5kZXhPZignKysrICcpID09PSAwXG4gICAgICAgICAgICAmJiBkaWZmc3RyW2kgKyAyXS5pbmRleE9mKCdAQCcpID09PSAwKSB7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICB9XG4gICAgICBsZXQgb3BlcmF0aW9uID0gKGRpZmZzdHJbaV0ubGVuZ3RoID09IDAgJiYgaSAhPSAoZGlmZnN0ci5sZW5ndGggLSAxKSkgPyAnICcgOiBkaWZmc3RyW2ldWzBdO1xuXG4gICAgICBpZiAob3BlcmF0aW9uID09PSAnKycgfHwgb3BlcmF0aW9uID09PSAnLScgfHwgb3BlcmF0aW9uID09PSAnICcgfHwgb3BlcmF0aW9uID09PSAnXFxcXCcpIHtcbiAgICAgICAgaHVuay5saW5lcy5wdXNoKGRpZmZzdHJbaV0pO1xuICAgICAgICBodW5rLmxpbmVkZWxpbWl0ZXJzLnB1c2goZGVsaW1pdGVyc1tpXSB8fCAnXFxuJyk7XG5cbiAgICAgICAgaWYgKG9wZXJhdGlvbiA9PT0gJysnKSB7XG4gICAgICAgICAgYWRkQ291bnQrKztcbiAgICAgICAgfSBlbHNlIGlmIChvcGVyYXRpb24gPT09ICctJykge1xuICAgICAgICAgIHJlbW92ZUNvdW50Kys7XG4gICAgICAgIH0gZWxzZSBpZiAob3BlcmF0aW9uID09PSAnICcpIHtcbiAgICAgICAgICBhZGRDb3VudCsrO1xuICAgICAgICAgIHJlbW92ZUNvdW50Kys7XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGJyZWFrO1xuICAgICAgfVxuICAgIH1cblxuICAgIC8vIEhhbmRsZSB0aGUgZW1wdHkgYmxvY2sgY291bnQgY2FzZVxuICAgIGlmICghYWRkQ291bnQgJiYgaHVuay5uZXdMaW5lcyA9PT0gMSkge1xuICAgICAgaHVuay5uZXdMaW5lcyA9IDA7XG4gICAgfVxuICAgIGlmICghcmVtb3ZlQ291bnQgJiYgaHVuay5vbGRMaW5lcyA9PT0gMSkge1xuICAgICAgaHVuay5vbGRMaW5lcyA9IDA7XG4gICAgfVxuXG4gICAgLy8gUGVyZm9ybSBvcHRpb25hbCBzYW5pdHkgY2hlY2tpbmdcbiAgICBpZiAob3B0aW9ucy5zdHJpY3QpIHtcbiAgICAgIGlmIChhZGRDb3VudCAhPT0gaHVuay5uZXdMaW5lcykge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0FkZGVkIGxpbmUgY291bnQgZGlkIG5vdCBtYXRjaCBmb3IgaHVuayBhdCBsaW5lICcgKyAoY2h1bmtIZWFkZXJJbmRleCArIDEpKTtcbiAgICAgIH1cbiAgICAgIGlmIChyZW1vdmVDb3VudCAhPT0gaHVuay5vbGRMaW5lcykge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1JlbW92ZWQgbGluZSBjb3VudCBkaWQgbm90IG1hdGNoIGZvciBodW5rIGF0IGxpbmUgJyArIChjaHVua0hlYWRlckluZGV4ICsgMSkpO1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBodW5rO1xuICB9XG5cbiAgd2hpbGUgKGkgPCBkaWZmc3RyLmxlbmd0aCkge1xuICAgIHBhcnNlSW5kZXgoKTtcbiAgfVxuXG4gIHJldHVybiBsaXN0O1xufVxuIl19 diff --git a/node_modules/diff/lib/util/array.js b/node_modules/diff/lib/util/array.js deleted file mode 100644 index aecf67a..0000000 --- a/node_modules/diff/lib/util/array.js +++ /dev/null @@ -1,32 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.arrayEqual = arrayEqual; -exports.arrayStartsWith = arrayStartsWith; - -/*istanbul ignore end*/ -function arrayEqual(a, b) { - if (a.length !== b.length) { - return false; - } - - return arrayStartsWith(a, b); -} - -function arrayStartsWith(array, start) { - if (start.length > array.length) { - return false; - } - - for (var i = 0; i < start.length; i++) { - if (start[i] !== array[i]) { - return false; - } - } - - return true; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsL2FycmF5LmpzIl0sIm5hbWVzIjpbImFycmF5RXF1YWwiLCJhIiwiYiIsImxlbmd0aCIsImFycmF5U3RhcnRzV2l0aCIsImFycmF5Iiwic3RhcnQiLCJpIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQU8sU0FBU0EsVUFBVCxDQUFvQkMsQ0FBcEIsRUFBdUJDLENBQXZCLEVBQTBCO0FBQy9CLE1BQUlELENBQUMsQ0FBQ0UsTUFBRixLQUFhRCxDQUFDLENBQUNDLE1BQW5CLEVBQTJCO0FBQ3pCLFdBQU8sS0FBUDtBQUNEOztBQUVELFNBQU9DLGVBQWUsQ0FBQ0gsQ0FBRCxFQUFJQyxDQUFKLENBQXRCO0FBQ0Q7O0FBRU0sU0FBU0UsZUFBVCxDQUF5QkMsS0FBekIsRUFBZ0NDLEtBQWhDLEVBQXVDO0FBQzVDLE1BQUlBLEtBQUssQ0FBQ0gsTUFBTixHQUFlRSxLQUFLLENBQUNGLE1BQXpCLEVBQWlDO0FBQy9CLFdBQU8sS0FBUDtBQUNEOztBQUVELE9BQUssSUFBSUksQ0FBQyxHQUFHLENBQWIsRUFBZ0JBLENBQUMsR0FBR0QsS0FBSyxDQUFDSCxNQUExQixFQUFrQ0ksQ0FBQyxFQUFuQyxFQUF1QztBQUNyQyxRQUFJRCxLQUFLLENBQUNDLENBQUQsQ0FBTCxLQUFhRixLQUFLLENBQUNFLENBQUQsQ0FBdEIsRUFBMkI7QUFDekIsYUFBTyxLQUFQO0FBQ0Q7QUFDRjs7QUFFRCxTQUFPLElBQVA7QUFDRCIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBmdW5jdGlvbiBhcnJheUVxdWFsKGEsIGIpIHtcbiAgaWYgKGEubGVuZ3RoICE9PSBiLmxlbmd0aCkge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIHJldHVybiBhcnJheVN0YXJ0c1dpdGgoYSwgYik7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBhcnJheVN0YXJ0c1dpdGgoYXJyYXksIHN0YXJ0KSB7XG4gIGlmIChzdGFydC5sZW5ndGggPiBhcnJheS5sZW5ndGgpIHtcbiAgICByZXR1cm4gZmFsc2U7XG4gIH1cblxuICBmb3IgKGxldCBpID0gMDsgaSA8IHN0YXJ0Lmxlbmd0aDsgaSsrKSB7XG4gICAgaWYgKHN0YXJ0W2ldICE9PSBhcnJheVtpXSkge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiB0cnVlO1xufVxuIl19 diff --git a/node_modules/diff/lib/util/distance-iterator.js b/node_modules/diff/lib/util/distance-iterator.js deleted file mode 100644 index 5edbaf8..0000000 --- a/node_modules/diff/lib/util/distance-iterator.js +++ /dev/null @@ -1,57 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = _default; - -/*istanbul ignore end*/ -// Iterator that traverses in the range of [min, max], stepping -// by distance from a given start position. I.e. for [0, 4], with -// start of 2, this will iterate 2, 3, 1, 4, 0. -function -/*istanbul ignore start*/ -_default -/*istanbul ignore end*/ -(start, minLine, maxLine) { - var wantForward = true, - backwardExhausted = false, - forwardExhausted = false, - localOffset = 1; - return function iterator() { - if (wantForward && !forwardExhausted) { - if (backwardExhausted) { - localOffset++; - } else { - wantForward = false; - } // Check if trying to fit beyond text length, and if not, check it fits - // after offset location (or desired location on first iteration) - - - if (start + localOffset <= maxLine) { - return localOffset; - } - - forwardExhausted = true; - } - - if (!backwardExhausted) { - if (!forwardExhausted) { - wantForward = true; - } // Check if trying to fit before text beginning, and if not, check it fits - // before offset location - - - if (minLine <= start - localOffset) { - return -localOffset++; - } - - backwardExhausted = true; - return iterator(); - } // We tried to fit hunk before text beginning and beyond text length, then - // hunk can't fit on the text. Return undefined - - }; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsL2Rpc3RhbmNlLWl0ZXJhdG9yLmpzIl0sIm5hbWVzIjpbInN0YXJ0IiwibWluTGluZSIsIm1heExpbmUiLCJ3YW50Rm9yd2FyZCIsImJhY2t3YXJkRXhoYXVzdGVkIiwiZm9yd2FyZEV4aGF1c3RlZCIsImxvY2FsT2Zmc2V0IiwiaXRlcmF0b3IiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUFBO0FBQ0E7QUFDQTtBQUNlO0FBQUE7QUFBQTtBQUFBO0FBQUEsQ0FBU0EsS0FBVCxFQUFnQkMsT0FBaEIsRUFBeUJDLE9BQXpCLEVBQWtDO0FBQy9DLE1BQUlDLFdBQVcsR0FBRyxJQUFsQjtBQUFBLE1BQ0lDLGlCQUFpQixHQUFHLEtBRHhCO0FBQUEsTUFFSUMsZ0JBQWdCLEdBQUcsS0FGdkI7QUFBQSxNQUdJQyxXQUFXLEdBQUcsQ0FIbEI7QUFLQSxTQUFPLFNBQVNDLFFBQVQsR0FBb0I7QUFDekIsUUFBSUosV0FBVyxJQUFJLENBQUNFLGdCQUFwQixFQUFzQztBQUNwQyxVQUFJRCxpQkFBSixFQUF1QjtBQUNyQkUsUUFBQUEsV0FBVztBQUNaLE9BRkQsTUFFTztBQUNMSCxRQUFBQSxXQUFXLEdBQUcsS0FBZDtBQUNELE9BTG1DLENBT3BDO0FBQ0E7OztBQUNBLFVBQUlILEtBQUssR0FBR00sV0FBUixJQUF1QkosT0FBM0IsRUFBb0M7QUFDbEMsZUFBT0ksV0FBUDtBQUNEOztBQUVERCxNQUFBQSxnQkFBZ0IsR0FBRyxJQUFuQjtBQUNEOztBQUVELFFBQUksQ0FBQ0QsaUJBQUwsRUFBd0I7QUFDdEIsVUFBSSxDQUFDQyxnQkFBTCxFQUF1QjtBQUNyQkYsUUFBQUEsV0FBVyxHQUFHLElBQWQ7QUFDRCxPQUhxQixDQUt0QjtBQUNBOzs7QUFDQSxVQUFJRixPQUFPLElBQUlELEtBQUssR0FBR00sV0FBdkIsRUFBb0M7QUFDbEMsZUFBTyxDQUFDQSxXQUFXLEVBQW5CO0FBQ0Q7O0FBRURGLE1BQUFBLGlCQUFpQixHQUFHLElBQXBCO0FBQ0EsYUFBT0csUUFBUSxFQUFmO0FBQ0QsS0E5QndCLENBZ0N6QjtBQUNBOztBQUNELEdBbENEO0FBbUNEIiwic291cmNlc0NvbnRlbnQiOlsiLy8gSXRlcmF0b3IgdGhhdCB0cmF2ZXJzZXMgaW4gdGhlIHJhbmdlIG9mIFttaW4sIG1heF0sIHN0ZXBwaW5nXG4vLyBieSBkaXN0YW5jZSBmcm9tIGEgZ2l2ZW4gc3RhcnQgcG9zaXRpb24uIEkuZS4gZm9yIFswLCA0XSwgd2l0aFxuLy8gc3RhcnQgb2YgMiwgdGhpcyB3aWxsIGl0ZXJhdGUgMiwgMywgMSwgNCwgMC5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKHN0YXJ0LCBtaW5MaW5lLCBtYXhMaW5lKSB7XG4gIGxldCB3YW50Rm9yd2FyZCA9IHRydWUsXG4gICAgICBiYWNrd2FyZEV4aGF1c3RlZCA9IGZhbHNlLFxuICAgICAgZm9yd2FyZEV4aGF1c3RlZCA9IGZhbHNlLFxuICAgICAgbG9jYWxPZmZzZXQgPSAxO1xuXG4gIHJldHVybiBmdW5jdGlvbiBpdGVyYXRvcigpIHtcbiAgICBpZiAod2FudEZvcndhcmQgJiYgIWZvcndhcmRFeGhhdXN0ZWQpIHtcbiAgICAgIGlmIChiYWNrd2FyZEV4aGF1c3RlZCkge1xuICAgICAgICBsb2NhbE9mZnNldCsrO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgd2FudEZvcndhcmQgPSBmYWxzZTtcbiAgICAgIH1cblxuICAgICAgLy8gQ2hlY2sgaWYgdHJ5aW5nIHRvIGZpdCBiZXlvbmQgdGV4dCBsZW5ndGgsIGFuZCBpZiBub3QsIGNoZWNrIGl0IGZpdHNcbiAgICAgIC8vIGFmdGVyIG9mZnNldCBsb2NhdGlvbiAob3IgZGVzaXJlZCBsb2NhdGlvbiBvbiBmaXJzdCBpdGVyYXRpb24pXG4gICAgICBpZiAoc3RhcnQgKyBsb2NhbE9mZnNldCA8PSBtYXhMaW5lKSB7XG4gICAgICAgIHJldHVybiBsb2NhbE9mZnNldDtcbiAgICAgIH1cblxuICAgICAgZm9yd2FyZEV4aGF1c3RlZCA9IHRydWU7XG4gICAgfVxuXG4gICAgaWYgKCFiYWNrd2FyZEV4aGF1c3RlZCkge1xuICAgICAgaWYgKCFmb3J3YXJkRXhoYXVzdGVkKSB7XG4gICAgICAgIHdhbnRGb3J3YXJkID0gdHJ1ZTtcbiAgICAgIH1cblxuICAgICAgLy8gQ2hlY2sgaWYgdHJ5aW5nIHRvIGZpdCBiZWZvcmUgdGV4dCBiZWdpbm5pbmcsIGFuZCBpZiBub3QsIGNoZWNrIGl0IGZpdHNcbiAgICAgIC8vIGJlZm9yZSBvZmZzZXQgbG9jYXRpb25cbiAgICAgIGlmIChtaW5MaW5lIDw9IHN0YXJ0IC0gbG9jYWxPZmZzZXQpIHtcbiAgICAgICAgcmV0dXJuIC1sb2NhbE9mZnNldCsrO1xuICAgICAgfVxuXG4gICAgICBiYWNrd2FyZEV4aGF1c3RlZCA9IHRydWU7XG4gICAgICByZXR1cm4gaXRlcmF0b3IoKTtcbiAgICB9XG5cbiAgICAvLyBXZSB0cmllZCB0byBmaXQgaHVuayBiZWZvcmUgdGV4dCBiZWdpbm5pbmcgYW5kIGJleW9uZCB0ZXh0IGxlbmd0aCwgdGhlblxuICAgIC8vIGh1bmsgY2FuJ3QgZml0IG9uIHRoZSB0ZXh0LiBSZXR1cm4gdW5kZWZpbmVkXG4gIH07XG59XG4iXX0= diff --git a/node_modules/diff/lib/util/params.js b/node_modules/diff/lib/util/params.js deleted file mode 100644 index e838eb2..0000000 --- a/node_modules/diff/lib/util/params.js +++ /dev/null @@ -1,24 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.generateOptions = generateOptions; - -/*istanbul ignore end*/ -function generateOptions(options, defaults) { - if (typeof options === 'function') { - defaults.callback = options; - } else if (options) { - for (var name in options) { - /* istanbul ignore else */ - if (options.hasOwnProperty(name)) { - defaults[name] = options[name]; - } - } - } - - return defaults; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsL3BhcmFtcy5qcyJdLCJuYW1lcyI6WyJnZW5lcmF0ZU9wdGlvbnMiLCJvcHRpb25zIiwiZGVmYXVsdHMiLCJjYWxsYmFjayIsIm5hbWUiLCJoYXNPd25Qcm9wZXJ0eSJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQU8sU0FBU0EsZUFBVCxDQUF5QkMsT0FBekIsRUFBa0NDLFFBQWxDLEVBQTRDO0FBQ2pELE1BQUksT0FBT0QsT0FBUCxLQUFtQixVQUF2QixFQUFtQztBQUNqQ0MsSUFBQUEsUUFBUSxDQUFDQyxRQUFULEdBQW9CRixPQUFwQjtBQUNELEdBRkQsTUFFTyxJQUFJQSxPQUFKLEVBQWE7QUFDbEIsU0FBSyxJQUFJRyxJQUFULElBQWlCSCxPQUFqQixFQUEwQjtBQUN4QjtBQUNBLFVBQUlBLE9BQU8sQ0FBQ0ksY0FBUixDQUF1QkQsSUFBdkIsQ0FBSixFQUFrQztBQUNoQ0YsUUFBQUEsUUFBUSxDQUFDRSxJQUFELENBQVIsR0FBaUJILE9BQU8sQ0FBQ0csSUFBRCxDQUF4QjtBQUNEO0FBQ0Y7QUFDRjs7QUFDRCxTQUFPRixRQUFQO0FBQ0QiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZnVuY3Rpb24gZ2VuZXJhdGVPcHRpb25zKG9wdGlvbnMsIGRlZmF1bHRzKSB7XG4gIGlmICh0eXBlb2Ygb3B0aW9ucyA9PT0gJ2Z1bmN0aW9uJykge1xuICAgIGRlZmF1bHRzLmNhbGxiYWNrID0gb3B0aW9ucztcbiAgfSBlbHNlIGlmIChvcHRpb25zKSB7XG4gICAgZm9yIChsZXQgbmFtZSBpbiBvcHRpb25zKSB7XG4gICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgZWxzZSAqL1xuICAgICAgaWYgKG9wdGlvbnMuaGFzT3duUHJvcGVydHkobmFtZSkpIHtcbiAgICAgICAgZGVmYXVsdHNbbmFtZV0gPSBvcHRpb25zW25hbWVdO1xuICAgICAgfVxuICAgIH1cbiAgfVxuICByZXR1cm4gZGVmYXVsdHM7XG59XG4iXX0= diff --git a/node_modules/diff/package.json b/node_modules/diff/package.json deleted file mode 100644 index 2390039..0000000 --- a/node_modules/diff/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "name": "diff", - "version": "4.0.4", - "description": "A javascript text diff implementation.", - "keywords": [ - "diff", - "javascript" - ], - "maintainers": [ - "Kevin Decker (http://incaseofstairs.com)" - ], - "bugs": { - "email": "kpdecker@gmail.com", - "url": "http://github.com/kpdecker/jsdiff/issues" - }, - "license": "BSD-3-Clause", - "repository": { - "type": "git", - "url": "git://github.com/kpdecker/jsdiff.git" - }, - "engines": { - "node": ">=0.3.1" - }, - "main": "./lib/index.js", - "module": "./lib/index.es6.js", - "browser": "./dist/diff.js", - "scripts": { - "clean": "rm -rf lib/ dist/", - "build:node": "yarn babel --out-dir lib --source-maps=inline src", - "test": "grunt" - }, - "devDependencies": { - "@babel/cli": "^7.2.3", - "@babel/core": "^7.2.2", - "@babel/plugin-transform-modules-commonjs": "^7.2.0", - "@babel/preset-env": "^7.2.3", - "@babel/register": "^7.0.0", - "babel-eslint": "^10.0.1", - "babel-loader": "^8.0.5", - "chai": "^4.2.0", - "colors": "^1.3.3", - "eslint": "^5.12.0", - "grunt": "^1.0.3", - "grunt-babel": "^8.0.0", - "grunt-clean": "^0.4.0", - "grunt-cli": "^1.3.2", - "grunt-contrib-clean": "^2.0.0", - "grunt-contrib-copy": "^1.0.0", - "grunt-contrib-uglify": "^4.0.0", - "grunt-contrib-watch": "^1.1.0", - "grunt-eslint": "^21.0.0", - "grunt-exec": "^3.0.0", - "grunt-karma": "^3.0.1", - "grunt-mocha-istanbul": "^5.0.2", - "grunt-mocha-test": "^0.13.3", - "grunt-webpack": "^3.1.3", - "istanbul": "github:kpdecker/istanbul", - "karma": "^3.1.4", - "karma-chrome-launcher": "^2.2.0", - "karma-mocha": "^1.3.0", - "karma-mocha-reporter": "^2.0.0", - "karma-sauce-launcher": "^2.0.2", - "karma-sourcemap-loader": "^0.3.6", - "karma-webpack": "^3.0.5", - "mocha": "^5.2.0", - "rollup": "^1.0.2", - "rollup-plugin-babel": "^4.2.0", - "semver": "^5.6.0", - "webpack": "^4.28.3", - "webpack-dev-server": "^3.1.14" - }, - "optionalDependencies": {}, - "packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610" -} diff --git a/node_modules/diff/release-notes.md b/node_modules/diff/release-notes.md deleted file mode 100644 index edc4cd3..0000000 --- a/node_modules/diff/release-notes.md +++ /dev/null @@ -1,261 +0,0 @@ -# Release Notes - -## Development - -[Commits](https://github.com/kpdecker/jsdiff/compare/v4.0.1...master) - -## v4.0.1 - January 6th, 2019 -- Fix main reference path - b826104 - -[Commits](https://github.com/kpdecker/jsdiff/compare/v4.0.0...v4.0.1) - -## v4.0.0 - January 5th, 2019 -- [#94](https://github.com/kpdecker/jsdiff/issues/94) - Missing "No newline at end of file" when comparing two texts that do not end in newlines ([@federicotdn](https://api.github.com/users/federicotdn)) -- [#227](https://github.com/kpdecker/jsdiff/issues/227) - Licence -- [#199](https://github.com/kpdecker/jsdiff/issues/199) - Import statement for jsdiff -- [#159](https://github.com/kpdecker/jsdiff/issues/159) - applyPatch affecting wrong line number with with new lines -- [#8](https://github.com/kpdecker/jsdiff/issues/8) - A new state "replace" -- Drop ie9 from karma targets - 79c31bd -- Upgrade deps. Convert from webpack to rollup - 2c1a29c -- Make ()[]"' as word boundaries between each other - f27b899 -- jsdiff: Replaced phantomJS by chrome - ec3114e -- Add yarn.lock to .npmignore - 29466d8 - -Compatibility notes: -- Bower and Component packages no longer supported - - -[Commits](https://github.com/kpdecker/jsdiff/compare/v3.5.0...v4.0.0) - -## v3.5.0 - March 4th, 2018 -- Omit redundant slice in join method of diffArrays - 1023590 -- Support patches with empty lines - fb0f208 -- Accept a custom JSON replacer function for JSON diffing - 69c7f0a -- Optimize parch header parser - 2aec429 -- Fix typos - e89c832 - -[Commits](https://github.com/kpdecker/jsdiff/compare/v3.4.0...v3.5.0) - -## v3.4.0 - October 7th, 2017 -- [#183](https://github.com/kpdecker/jsdiff/issues/183) - Feature request: ability to specify a custom equality checker for `diffArrays` -- [#173](https://github.com/kpdecker/jsdiff/issues/173) - Bug: diffArrays gives wrong result on array of booleans -- [#158](https://github.com/kpdecker/jsdiff/issues/158) - diffArrays will not compare the empty string in array? -- comparator for custom equality checks - 30e141e -- count oldLines and newLines when there are conflicts - 53bf384 -- Fix: diffArrays can compare falsey items - 9e24284 -- Docs: Replace grunt with npm test - 00e2f94 - -[Commits](https://github.com/kpdecker/jsdiff/compare/v3.3.1...v3.4.0) - -## v3.3.1 - September 3rd, 2017 -- [#141](https://github.com/kpdecker/jsdiff/issues/141) - Cannot apply patch because my file delimiter is "/r/n" instead of "/n" -- [#192](https://github.com/kpdecker/jsdiff/pull/192) - Fix: Bad merge when adding new files (#189) -- correct spelling mistake - 21fa478 - -[Commits](https://github.com/kpdecker/jsdiff/compare/v3.3.0...v3.3.1) - -## v3.3.0 - July 5th, 2017 -- [#114](https://github.com/kpdecker/jsdiff/issues/114) - /patch/merge not exported -- Gracefully accept invalid newStart in hunks, same as patch(1) does. - d8a3635 -- Use regex rather than starts/ends with for parsePatch - 6cab62c -- Add browser flag - e64f674 -- refactor: simplified code a bit more - 8f8e0f2 -- refactor: simplified code a bit - b094a6f -- fix: some corrections re ignoreCase option - 3c78fd0 -- ignoreCase option - 3cbfbb5 -- Sanitize filename while parsing patches - 2fe8129 -- Added better installation methods - aced50b -- Simple export of functionality - 8690f31 - -[Commits](https://github.com/kpdecker/jsdiff/compare/v3.2.0...v3.3.0) - -## v3.2.0 - December 26th, 2016 -- [#156](https://github.com/kpdecker/jsdiff/pull/156) - Add `undefinedReplacement` option to `diffJson` ([@ewnd9](https://api.github.com/users/ewnd9)) -- [#154](https://github.com/kpdecker/jsdiff/pull/154) - Add `examples` and `images` to `.npmignore`. ([@wtgtybhertgeghgtwtg](https://api.github.com/users/wtgtybhertgeghgtwtg)) -- [#153](https://github.com/kpdecker/jsdiff/pull/153) - feat(structuredPatch): Pass options to diffLines ([@Kiougar](https://api.github.com/users/Kiougar)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v3.1.0...v3.2.0) - -## v3.1.0 - November 27th, 2016 -- [#146](https://github.com/kpdecker/jsdiff/pull/146) - JsDiff.diffArrays to compare arrays ([@wvanderdeijl](https://api.github.com/users/wvanderdeijl)) -- [#144](https://github.com/kpdecker/jsdiff/pull/144) - Split file using all possible line delimiter instead of hard-coded "/n" and join lines back using the original delimiters ([@soulbeing](https://api.github.com/users/soulbeing)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v3.0.1...v3.1.0) - -## v3.0.1 - October 9th, 2016 -- [#139](https://github.com/kpdecker/jsdiff/pull/139) - Make README.md look nicer in npmjs.com ([@takenspc](https://api.github.com/users/takenspc)) -- [#135](https://github.com/kpdecker/jsdiff/issues/135) - parsePatch combines patches from multiple files into a single IUniDiff when there is no "Index" line ([@ramya-rao-a](https://api.github.com/users/ramya-rao-a)) -- [#124](https://github.com/kpdecker/jsdiff/issues/124) - IE7/IE8 failure since 2.0.0 ([@boneskull](https://api.github.com/users/boneskull)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v3.0.0...v3.0.1) - -## v3.0.0 - August 23rd, 2016 -- [#130](https://github.com/kpdecker/jsdiff/pull/130) - Add callback argument to applyPatches `patched` option ([@piranna](https://api.github.com/users/piranna)) -- [#120](https://github.com/kpdecker/jsdiff/pull/120) - Correctly handle file names containing spaces ([@adius](https://api.github.com/users/adius)) -- [#119](https://github.com/kpdecker/jsdiff/pull/119) - Do single reflow ([@wifiextender](https://api.github.com/users/wifiextender)) -- [#117](https://github.com/kpdecker/jsdiff/pull/117) - Make more usable with long strings. ([@abnbgist](https://api.github.com/users/abnbgist)) - -Compatibility notes: -- applyPatches patch callback now is async and requires the callback be called to continue operation - -[Commits](https://github.com/kpdecker/jsdiff/compare/v2.2.3...v3.0.0) - -## v2.2.3 - May 31st, 2016 -- [#118](https://github.com/kpdecker/jsdiff/pull/118) - Add a fix for applying 0-length destination patches ([@chaaz](https://api.github.com/users/chaaz)) -- [#115](https://github.com/kpdecker/jsdiff/pull/115) - Fixed grammar in README ([@krizalys](https://api.github.com/users/krizalys)) -- [#113](https://github.com/kpdecker/jsdiff/pull/113) - fix typo ([@vmazare](https://api.github.com/users/vmazare)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v2.2.2...v2.2.3) - -## v2.2.2 - March 13th, 2016 -- [#102](https://github.com/kpdecker/jsdiff/issues/102) - diffJson with dates, returns empty curly braces ([@dr-dimitru](https://api.github.com/users/dr-dimitru)) -- [#97](https://github.com/kpdecker/jsdiff/issues/97) - Whitespaces & diffWords ([@faiwer](https://api.github.com/users/faiwer)) -- [#92](https://github.com/kpdecker/jsdiff/pull/92) - Fixes typo in the readme ([@bg451](https://api.github.com/users/bg451)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v2.2.1...v2.2.2) - -## v2.2.1 - November 12th, 2015 -- [#89](https://github.com/kpdecker/jsdiff/pull/89) - add in display selector to readme ([@FranDias](https://api.github.com/users/FranDias)) -- [#88](https://github.com/kpdecker/jsdiff/pull/88) - Split diffs based on file headers instead of 'Index:' metadata ([@piranna](https://api.github.com/users/piranna)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v2.2.0...v2.2.1) - -## v2.2.0 - October 29th, 2015 -- [#80](https://github.com/kpdecker/jsdiff/pull/80) - Fix a typo: applyPath -> applyPatch ([@fluxxu](https://api.github.com/users/fluxxu)) -- [#83](https://github.com/kpdecker/jsdiff/pull/83) - Add basic fuzzy matching to applyPatch ([@piranna](https://github.com/piranna)) -[Commits](https://github.com/kpdecker/jsdiff/compare/v2.2.0...v2.2.0) - -## v2.2.0 - October 29th, 2015 -- [#80](https://github.com/kpdecker/jsdiff/pull/80) - Fix a typo: applyPath -> applyPatch ([@fluxxu](https://api.github.com/users/fluxxu)) -- [#83](https://github.com/kpdecker/jsdiff/pull/83) - Add basic fuzzy matching to applyPatch ([@piranna](https://github.com/piranna)) -[Commits](https://github.com/kpdecker/jsdiff/compare/v2.1.3...v2.2.0) - -## v2.1.3 - September 30th, 2015 -- [#78](https://github.com/kpdecker/jsdiff/pull/78) - fix: error throwing when apply patch to empty string ([@21paradox](https://api.github.com/users/21paradox)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v2.1.2...v2.1.3) - -## v2.1.2 - September 23rd, 2015 -- [#76](https://github.com/kpdecker/jsdiff/issues/76) - diff headers give error ([@piranna](https://api.github.com/users/piranna)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v2.1.1...v2.1.2) - -## v2.1.1 - September 9th, 2015 -- [#73](https://github.com/kpdecker/jsdiff/issues/73) - Is applyPatches() exposed in the API? ([@davidparsson](https://api.github.com/users/davidparsson)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v2.1.0...v2.1.1) - -## v2.1.0 - August 27th, 2015 -- [#72](https://github.com/kpdecker/jsdiff/issues/72) - Consider using options object API for flag permutations ([@kpdecker](https://api.github.com/users/kpdecker)) -- [#70](https://github.com/kpdecker/jsdiff/issues/70) - diffWords treats \n at the end as significant whitespace ([@nesQuick](https://api.github.com/users/nesQuick)) -- [#69](https://github.com/kpdecker/jsdiff/issues/69) - Missing count ([@wfalkwallace](https://api.github.com/users/wfalkwallace)) -- [#68](https://github.com/kpdecker/jsdiff/issues/68) - diffLines seems broken ([@wfalkwallace](https://api.github.com/users/wfalkwallace)) -- [#60](https://github.com/kpdecker/jsdiff/issues/60) - Support multiple diff hunks ([@piranna](https://api.github.com/users/piranna)) -- [#54](https://github.com/kpdecker/jsdiff/issues/54) - Feature Request: 3-way merge ([@mog422](https://api.github.com/users/mog422)) -- [#42](https://github.com/kpdecker/jsdiff/issues/42) - Fuzz factor for applyPatch ([@stuartpb](https://api.github.com/users/stuartpb)) -- Move whitespace ignore out of equals method - 542063c -- Include source maps in babel output - 7f7ab21 -- Merge diff/line and diff/patch implementations - 1597705 -- Drop map utility method - 1ddc939 -- Documentation for parsePatch and applyPatches - 27c4b77 - -Compatibility notes: -- The undocumented ignoreWhitespace flag has been removed from the Diff equality check directly. This implementation may be copied to diff utilities if dependencies existed on this functionality. - -[Commits](https://github.com/kpdecker/jsdiff/compare/v2.0.2...v2.1.0) - -## v2.0.2 - August 8th, 2015 -- [#67](https://github.com/kpdecker/jsdiff/issues/67) - cannot require from npm module in node ([@commenthol](https://api.github.com/users/commenthol)) -- Convert to chai since we don’t support IE8 - a96bbad - -[Commits](https://github.com/kpdecker/jsdiff/compare/v2.0.1...v2.0.2) - -## v2.0.1 - August 7th, 2015 -- Add release build at proper step - 57542fd - -[Commits](https://github.com/kpdecker/jsdiff/compare/v2.0.0...v2.0.1) - -## v2.0.0 - August 7th, 2015 -- [#66](https://github.com/kpdecker/jsdiff/issues/66) - Add karma and sauce tests ([@kpdecker](https://api.github.com/users/kpdecker)) -- [#65](https://github.com/kpdecker/jsdiff/issues/65) - Create component repository for bower ([@kpdecker](https://api.github.com/users/kpdecker)) -- [#64](https://github.com/kpdecker/jsdiff/issues/64) - Automatically call removeEmpty for all tokenizer calls ([@kpdecker](https://api.github.com/users/kpdecker)) -- [#62](https://github.com/kpdecker/jsdiff/pull/62) - Allow access to structured object representation of patch data ([@bittrance](https://api.github.com/users/bittrance)) -- [#61](https://github.com/kpdecker/jsdiff/pull/61) - Use svg instead of png to get better image quality ([@PeterDaveHello](https://api.github.com/users/PeterDaveHello)) -- [#29](https://github.com/kpdecker/jsdiff/issues/29) - word tokenizer works only for 7 bit ascii ([@plasmagunman](https://api.github.com/users/plasmagunman)) - -Compatibility notes: -- `this.removeEmpty` is now called automatically for all instances. If this is not desired, this may be overridden on a per instance basis. -- The library has been refactored to use some ES6 features. The external APIs should remain the same, but bower projects that directly referenced the repository will now have to point to the [components/jsdiff](https://github.com/components/jsdiff) repository. - -[Commits](https://github.com/kpdecker/jsdiff/compare/v1.4.0...v2.0.0) - -## v1.4.0 - May 6th, 2015 -- [#57](https://github.com/kpdecker/jsdiff/issues/57) - createPatch -> applyPatch failed. ([@mog422](https://api.github.com/users/mog422)) -- [#56](https://github.com/kpdecker/jsdiff/pull/56) - Two files patch ([@rgeissert](https://api.github.com/users/rgeissert)) -- [#14](https://github.com/kpdecker/jsdiff/issues/14) - Flip added and removed order? ([@jakesandlund](https://api.github.com/users/jakesandlund)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v1.3.2...v1.4.0) - -## v1.3.2 - March 30th, 2015 -- [#53](https://github.com/kpdecker/jsdiff/pull/53) - Updated README.MD with Bower installation instructions ([@ofbriggs](https://api.github.com/users/ofbriggs)) -- [#49](https://github.com/kpdecker/jsdiff/issues/49) - Cannot read property 'oldlines' of undefined ([@nwtn](https://api.github.com/users/nwtn)) -- [#44](https://github.com/kpdecker/jsdiff/issues/44) - invalid-meta jsdiff is missing "main" entry in bower.json - -[Commits](https://github.com/kpdecker/jsdiff/compare/v1.3.1...v1.3.2) - -## v1.3.1 - March 13th, 2015 -- [#52](https://github.com/kpdecker/jsdiff/pull/52) - Fix for #51 Wrong result of JsDiff.diffLines ([@felicienfrancois](https://api.github.com/users/felicienfrancois)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v1.3.0...v1.3.1) - -## v1.3.0 - March 2nd, 2015 -- [#47](https://github.com/kpdecker/jsdiff/pull/47) - Adding Diff Trimmed Lines ([@JamesGould123](https://api.github.com/users/JamesGould123)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v1.2.2...v1.3.0) - -## v1.2.2 - January 26th, 2015 -- [#45](https://github.com/kpdecker/jsdiff/pull/45) - Fix AMD module loading ([@pedrocarrico](https://api.github.com/users/pedrocarrico)) -- [#43](https://github.com/kpdecker/jsdiff/pull/43) - added a bower file ([@nbrustein](https://api.github.com/users/nbrustein)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v1.2.1...v1.2.2) - -## v1.2.1 - December 26th, 2014 -- [#41](https://github.com/kpdecker/jsdiff/pull/41) - change condition of using node export system. ([@ironhee](https://api.github.com/users/ironhee)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v1.2.0...v1.2.1) - -## v1.2.0 - November 29th, 2014 -- [#37](https://github.com/kpdecker/jsdiff/pull/37) - Add support for sentences. ([@vmariano](https://api.github.com/users/vmariano)) -- [#28](https://github.com/kpdecker/jsdiff/pull/28) - Implemented diffJson ([@papandreou](https://api.github.com/users/papandreou)) -- [#27](https://github.com/kpdecker/jsdiff/issues/27) - Slow to execute over diffs with a large number of changes ([@termi](https://api.github.com/users/termi)) -- Allow for optional async diffing - 19385b9 -- Fix diffChars implementation - eaa44ed - -[Commits](https://github.com/kpdecker/jsdiff/compare/v1.1.0...v1.2.0) - -## v1.1.0 - November 25th, 2014 -- [#33](https://github.com/kpdecker/jsdiff/pull/33) - AMD and global exports ([@ovcharik](https://api.github.com/users/ovcharik)) -- [#32](https://github.com/kpdecker/jsdiff/pull/32) - Add support for component ([@vmariano](https://api.github.com/users/vmariano)) -- [#31](https://github.com/kpdecker/jsdiff/pull/31) - Don't rely on Array.prototype.map ([@papandreou](https://api.github.com/users/papandreou)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v1.0.8...v1.1.0) - -## v1.0.8 - December 22nd, 2013 -- [#24](https://github.com/kpdecker/jsdiff/pull/24) - Handle windows newlines on non windows machines. ([@benogle](https://api.github.com/users/benogle)) -- [#23](https://github.com/kpdecker/jsdiff/pull/23) - Prettied up the API formatting a little, and added basic node and web examples ([@airportyh](https://api.github.com/users/airportyh)) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v1.0.7...v1.0.8) - -## v1.0.7 - September 11th, 2013 - -- [#22](https://github.com/kpdecker/jsdiff/pull/22) - Added variant of WordDiff that doesn't ignore whitespace differences ([@papandreou](https://api.github.com/users/papandreou) - -- Add 0.10 to travis tests - 243a526 - -[Commits](https://github.com/kpdecker/jsdiff/compare/v1.0.6...v1.0.7) - -## v1.0.6 - August 30th, 2013 - -- [#19](https://github.com/kpdecker/jsdiff/pull/19) - Explicitly define contents of npm package ([@sindresorhus](https://api.github.com/users/sindresorhus) - -[Commits](https://github.com/kpdecker/jsdiff/compare/v1.0.5...v1.0.6) diff --git a/node_modules/diff/runtime.js b/node_modules/diff/runtime.js deleted file mode 100644 index 82ea7e6..0000000 --- a/node_modules/diff/runtime.js +++ /dev/null @@ -1,3 +0,0 @@ -require('@babel/register')({ - ignore: ['lib', 'node_modules'] -}); diff --git a/node_modules/dunder-proto/.eslintrc b/node_modules/dunder-proto/.eslintrc deleted file mode 100644 index 3b5d9e9..0000000 --- a/node_modules/dunder-proto/.eslintrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", -} diff --git a/node_modules/dunder-proto/.github/FUNDING.yml b/node_modules/dunder-proto/.github/FUNDING.yml deleted file mode 100644 index 8a1d7b0..0000000 --- a/node_modules/dunder-proto/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/dunder-proto -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/dunder-proto/.nycrc b/node_modules/dunder-proto/.nycrc deleted file mode 100644 index 1826526..0000000 --- a/node_modules/dunder-proto/.nycrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/dunder-proto/CHANGELOG.md b/node_modules/dunder-proto/CHANGELOG.md deleted file mode 100644 index 9b8b2f8..0000000 --- a/node_modules/dunder-proto/CHANGELOG.md +++ /dev/null @@ -1,24 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.0.1](https://github.com/es-shims/dunder-proto/compare/v1.0.0...v1.0.1) - 2024-12-16 - -### Commits - -- [Fix] do not crash when `--disable-proto=throw` [`6c367d9`](https://github.com/es-shims/dunder-proto/commit/6c367d919bc1604778689a297bbdbfea65752847) -- [Tests] ensure noproto tests only use the current version of dunder-proto [`b02365b`](https://github.com/es-shims/dunder-proto/commit/b02365b9cf889c4a2cac7be0c3cfc90a789af36c) -- [Dev Deps] update `@arethetypeswrong/cli`, `@types/tape` [`e3c5c3b`](https://github.com/es-shims/dunder-proto/commit/e3c5c3bd81cf8cef7dff2eca19e558f0e307f666) -- [Deps] update `call-bind-apply-helpers` [`19f1da0`](https://github.com/es-shims/dunder-proto/commit/19f1da028b8dd0d05c85bfd8f7eed2819b686450) - -## v1.0.0 - 2024-12-06 - -### Commits - -- Initial implementation, tests, readme, types [`a5b74b0`](https://github.com/es-shims/dunder-proto/commit/a5b74b0082f5270cb0905cd9a2e533cee7498373) -- Initial commit [`73fb5a3`](https://github.com/es-shims/dunder-proto/commit/73fb5a353b51ac2ab00c9fdeb0114daffd4c07a8) -- npm init [`80152dc`](https://github.com/es-shims/dunder-proto/commit/80152dc98155da4eb046d9f67a87ed96e8280a1d) -- Only apps should have lockfiles [`03e6660`](https://github.com/es-shims/dunder-proto/commit/03e6660a1d70dc401f3e217a031475ec537243dd) diff --git a/node_modules/dunder-proto/LICENSE b/node_modules/dunder-proto/LICENSE deleted file mode 100644 index 34995e7..0000000 --- a/node_modules/dunder-proto/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 ECMAScript Shims - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/dunder-proto/README.md b/node_modules/dunder-proto/README.md deleted file mode 100644 index 44b80a2..0000000 --- a/node_modules/dunder-proto/README.md +++ /dev/null @@ -1,54 +0,0 @@ -# dunder-proto [![Version Badge][npm-version-svg]][package-url] - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -If available, the `Object.prototype.__proto__` accessor and mutator, call-bound. - -## Getting started - -```sh -npm install --save dunder-proto -``` - -## Usage/Examples - -```js -const assert = require('assert'); -const getDunder = require('dunder-proto/get'); -const setDunder = require('dunder-proto/set'); - -const obj = {}; - -assert.equal('toString' in obj, true); -assert.equal(getDunder(obj), Object.prototype); - -setDunder(obj, null); - -assert.equal('toString' in obj, false); -assert.equal(getDunder(obj), null); -``` - -## Tests - -Clone the repo, `npm install`, and run `npm test` - -[package-url]: https://npmjs.org/package/dunder-proto -[npm-version-svg]: https://versionbadg.es/es-shims/dunder-proto.svg -[deps-svg]: https://david-dm.org/es-shims/dunder-proto.svg -[deps-url]: https://david-dm.org/es-shims/dunder-proto -[dev-deps-svg]: https://david-dm.org/es-shims/dunder-proto/dev-status.svg -[dev-deps-url]: https://david-dm.org/es-shims/dunder-proto#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/dunder-proto.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/dunder-proto.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/dunder-proto.svg -[downloads-url]: https://npm-stat.com/charts.html?package=dunder-proto -[codecov-image]: https://codecov.io/gh/es-shims/dunder-proto/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/es-shims/dunder-proto/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/dunder-proto -[actions-url]: https://github.com/es-shims/dunder-proto/actions diff --git a/node_modules/dunder-proto/get.d.ts b/node_modules/dunder-proto/get.d.ts deleted file mode 100644 index c7e14d2..0000000 --- a/node_modules/dunder-proto/get.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare function getDunderProto(target: {}): object | null; - -declare const x: false | typeof getDunderProto; - -export = x; \ No newline at end of file diff --git a/node_modules/dunder-proto/get.js b/node_modules/dunder-proto/get.js deleted file mode 100644 index 45093df..0000000 --- a/node_modules/dunder-proto/get.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -var callBind = require('call-bind-apply-helpers'); -var gOPD = require('gopd'); - -var hasProtoAccessor; -try { - // eslint-disable-next-line no-extra-parens, no-proto - hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype; -} catch (e) { - if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') { - throw e; - } -} - -// eslint-disable-next-line no-extra-parens -var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__')); - -var $Object = Object; -var $getPrototypeOf = $Object.getPrototypeOf; - -/** @type {import('./get')} */ -module.exports = desc && typeof desc.get === 'function' - ? callBind([desc.get]) - : typeof $getPrototypeOf === 'function' - ? /** @type {import('./get')} */ function getDunder(value) { - // eslint-disable-next-line eqeqeq - return $getPrototypeOf(value == null ? value : $Object(value)); - } - : false; diff --git a/node_modules/dunder-proto/package.json b/node_modules/dunder-proto/package.json deleted file mode 100644 index 04a4036..0000000 --- a/node_modules/dunder-proto/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "dunder-proto", - "version": "1.0.1", - "description": "If available, the `Object.prototype.__proto__` accessor and mutator, call-bound", - "main": false, - "exports": { - "./get": "./get.js", - "./set": "./set.js", - "./package.json": "./package.json" - }, - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepublishOnly": "safe-publish-latest", - "prelint": "evalmd README.md", - "lint": "eslint --ext=.js,.mjs .", - "postlint": "tsc -p . && attw -P", - "pretest": "npm run lint", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "npx npm@'>= 10.2' audit --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/es-shims/dunder-proto.git" - }, - "author": "Jordan Harband ", - "license": "MIT", - "bugs": { - "url": "https://github.com/es-shims/dunder-proto/issues" - }, - "homepage": "https://github.com/es-shims/dunder-proto#readme", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "devDependencies": { - "@arethetypeswrong/cli": "^0.17.1", - "@ljharb/eslint-config": "^21.1.1", - "@ljharb/tsconfig": "^0.2.2", - "@types/tape": "^5.7.0", - "auto-changelog": "^2.5.0", - "encoding": "^0.1.13", - "eslint": "=8.8.0", - "evalmd": "^0.0.19", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.9.0", - "typescript": "next" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "testling": { - "files": "test/index.js" - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - }, - "engines": { - "node": ">= 0.4" - } -} diff --git a/node_modules/dunder-proto/set.d.ts b/node_modules/dunder-proto/set.d.ts deleted file mode 100644 index 16bfdfe..0000000 --- a/node_modules/dunder-proto/set.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare function setDunderProto

(target: {}, proto: P): P; - -declare const x: false | typeof setDunderProto; - -export = x; \ No newline at end of file diff --git a/node_modules/dunder-proto/set.js b/node_modules/dunder-proto/set.js deleted file mode 100644 index 6085b6e..0000000 --- a/node_modules/dunder-proto/set.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -var callBind = require('call-bind-apply-helpers'); -var gOPD = require('gopd'); -var $TypeError = require('es-errors/type'); - -/** @type {{ __proto__?: object | null }} */ -var obj = {}; -try { - obj.__proto__ = null; // eslint-disable-line no-proto -} catch (e) { - if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') { - throw e; - } -} - -var hasProtoMutator = !('toString' in obj); - -// eslint-disable-next-line no-extra-parens -var desc = gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__')); - -/** @type {import('./set')} */ -module.exports = hasProtoMutator && ( -// eslint-disable-next-line no-extra-parens - (!!desc && typeof desc.set === 'function' && /** @type {import('./set')} */ (callBind([desc.set]))) - || /** @type {import('./set')} */ function setDunder(object, proto) { - // this is node v0.10 or older, which doesn't have Object.setPrototypeOf and has undeniable __proto__ - if (object == null) { // eslint-disable-line eqeqeq - throw new $TypeError('set Object.prototype.__proto__ called on null or undefined'); - } - // eslint-disable-next-line no-proto, no-param-reassign, no-extra-parens - /** @type {{ __proto__?: object | null }} */ (object).__proto__ = proto; - return proto; - } -); diff --git a/node_modules/dunder-proto/test/get.js b/node_modules/dunder-proto/test/get.js deleted file mode 100644 index 253f183..0000000 --- a/node_modules/dunder-proto/test/get.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -var test = require('tape'); - -var getDunderProto = require('../get'); - -test('getDunderProto', { skip: !getDunderProto }, function (t) { - if (!getDunderProto) { - throw 'should never happen; this is just for type narrowing'; // eslint-disable-line no-throw-literal - } - - // @ts-expect-error - t['throws'](function () { getDunderProto(); }, TypeError, 'throws if no argument'); - // @ts-expect-error - t['throws'](function () { getDunderProto(undefined); }, TypeError, 'throws with undefined'); - // @ts-expect-error - t['throws'](function () { getDunderProto(null); }, TypeError, 'throws with null'); - - t.equal(getDunderProto({}), Object.prototype); - t.equal(getDunderProto([]), Array.prototype); - t.equal(getDunderProto(function () {}), Function.prototype); - t.equal(getDunderProto(/./g), RegExp.prototype); - t.equal(getDunderProto(42), Number.prototype); - t.equal(getDunderProto(true), Boolean.prototype); - t.equal(getDunderProto('foo'), String.prototype); - - t.end(); -}); - -test('no dunder proto', { skip: !!getDunderProto }, function (t) { - t.notOk('__proto__' in Object.prototype, 'no __proto__ in Object.prototype'); - - t.end(); -}); diff --git a/node_modules/dunder-proto/test/index.js b/node_modules/dunder-proto/test/index.js deleted file mode 100644 index 08ff36f..0000000 --- a/node_modules/dunder-proto/test/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -require('./get'); -require('./set'); diff --git a/node_modules/dunder-proto/test/set.js b/node_modules/dunder-proto/test/set.js deleted file mode 100644 index c3bfe4d..0000000 --- a/node_modules/dunder-proto/test/set.js +++ /dev/null @@ -1,50 +0,0 @@ -'use strict'; - -var test = require('tape'); - -var setDunderProto = require('../set'); - -test('setDunderProto', { skip: !setDunderProto }, function (t) { - if (!setDunderProto) { - throw 'should never happen; this is just for type narrowing'; // eslint-disable-line no-throw-literal - } - - // @ts-expect-error - t['throws'](function () { setDunderProto(); }, TypeError, 'throws if no arguments'); - // @ts-expect-error - t['throws'](function () { setDunderProto(undefined); }, TypeError, 'throws with undefined and nothing'); - // @ts-expect-error - t['throws'](function () { setDunderProto(undefined, undefined); }, TypeError, 'throws with undefined and undefined'); - // @ts-expect-error - t['throws'](function () { setDunderProto(null); }, TypeError, 'throws with null and undefined'); - // @ts-expect-error - t['throws'](function () { setDunderProto(null, undefined); }, TypeError, 'throws with null and undefined'); - - /** @type {{ inherited?: boolean }} */ - var obj = {}; - t.ok('toString' in obj, 'object initially has toString'); - - setDunderProto(obj, null); - t.notOk('toString' in obj, 'object no longer has toString'); - - t.notOk('inherited' in obj, 'object lacks inherited property'); - setDunderProto(obj, { inherited: true }); - t.equal(obj.inherited, true, 'object has inherited property'); - - t.end(); -}); - -test('no dunder proto', { skip: !!setDunderProto }, function (t) { - if ('__proto__' in Object.prototype) { - t['throws']( - // @ts-expect-error - function () { ({}).__proto__ = null; }, // eslint-disable-line no-proto - Error, - 'throws when setting Object.prototype.__proto__' - ); - } else { - t.notOk('__proto__' in Object.prototype, 'no __proto__ in Object.prototype'); - } - - t.end(); -}); diff --git a/node_modules/dunder-proto/tsconfig.json b/node_modules/dunder-proto/tsconfig.json deleted file mode 100644 index dabbe23..0000000 --- a/node_modules/dunder-proto/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "@ljharb/tsconfig", - "compilerOptions": { - "target": "ES2021", - }, - "exclude": [ - "coverage", - ], -} diff --git a/node_modules/ecdsa-sig-formatter/CODEOWNERS b/node_modules/ecdsa-sig-formatter/CODEOWNERS deleted file mode 100644 index 4451d3d..0000000 --- a/node_modules/ecdsa-sig-formatter/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @omsmith diff --git a/node_modules/ecdsa-sig-formatter/LICENSE b/node_modules/ecdsa-sig-formatter/LICENSE deleted file mode 100644 index 8754ed6..0000000 --- a/node_modules/ecdsa-sig-formatter/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2015 D2L Corporation - - 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. diff --git a/node_modules/ecdsa-sig-formatter/README.md b/node_modules/ecdsa-sig-formatter/README.md deleted file mode 100644 index daa95d6..0000000 --- a/node_modules/ecdsa-sig-formatter/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# ecdsa-sig-formatter - -[![Build Status](https://travis-ci.org/Brightspace/node-ecdsa-sig-formatter.svg?branch=master)](https://travis-ci.org/Brightspace/node-ecdsa-sig-formatter) [![Coverage Status](https://coveralls.io/repos/Brightspace/node-ecdsa-sig-formatter/badge.svg)](https://coveralls.io/r/Brightspace/node-ecdsa-sig-formatter) - -Translate between JOSE and ASN.1/DER encodings for ECDSA signatures - -## Install -```sh -npm install ecdsa-sig-formatter --save -``` - -## Usage -```js -var format = require('ecdsa-sig-formatter'); - -var derSignature = '..'; // asn.1/DER encoded ecdsa signature - -var joseSignature = format.derToJose(derSignature); - -``` - -### API - ---- - -#### `.derToJose(Buffer|String signature, String alg)` -> `String` - -Convert the ASN.1/DER encoded signature to a JOSE-style concatenated signature. -Returns a _base64 url_ encoded `String`. - -* If _signature_ is a `String`, it should be _base64_ encoded -* _alg_ must be one of _ES256_, _ES384_ or _ES512_ - ---- - -#### `.joseToDer(Buffer|String signature, String alg)` -> `Buffer` - -Convert the JOSE-style concatenated signature to an ASN.1/DER encoded -signature. Returns a `Buffer` - -* If _signature_ is a `String`, it should be _base64 url_ encoded -* _alg_ must be one of _ES256_, _ES384_ or _ES512_ - -## Contributing - -1. **Fork** the repository. Committing directly against this repository is - highly discouraged. - -2. Make your modifications in a branch, updating and writing new unit tests - as necessary in the `spec` directory. - -3. Ensure that all tests pass with `npm test` - -4. `rebase` your changes against master. *Do not merge*. - -5. Submit a pull request to this repository. Wait for tests to run and someone - to chime in. - -### Code Style - -This repository is configured with [EditorConfig][EditorConfig] and -[ESLint][ESLint] rules. - -[EditorConfig]: http://editorconfig.org/ -[ESLint]: http://eslint.org diff --git a/node_modules/ecdsa-sig-formatter/package.json b/node_modules/ecdsa-sig-formatter/package.json deleted file mode 100644 index 6fb5ebf..0000000 --- a/node_modules/ecdsa-sig-formatter/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "ecdsa-sig-formatter", - "version": "1.0.11", - "description": "Translate ECDSA signatures between ASN.1/DER and JOSE-style concatenation", - "main": "src/ecdsa-sig-formatter.js", - "scripts": { - "check-style": "eslint .", - "pretest": "npm run check-style", - "test": "istanbul cover --root src _mocha -- spec", - "report-cov": "cat ./coverage/lcov.info | coveralls" - }, - "typings": "./src/ecdsa-sig-formatter.d.ts", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/Brightspace/node-ecdsa-sig-formatter.git" - }, - "keywords": [ - "ecdsa", - "der", - "asn.1", - "jwt", - "jwa", - "jsonwebtoken", - "jose" - ], - "author": "D2L Corporation", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/Brightspace/node-ecdsa-sig-formatter/issues" - }, - "homepage": "https://github.com/Brightspace/node-ecdsa-sig-formatter#readme", - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "devDependencies": { - "bench": "^0.3.6", - "chai": "^3.5.0", - "coveralls": "^2.11.9", - "eslint": "^2.12.0", - "eslint-config-brightspace": "^0.2.1", - "istanbul": "^0.4.3", - "jwk-to-pem": "^1.2.5", - "mocha": "^2.5.3", - "native-crypto": "^1.7.0" - } -} diff --git a/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.d.ts b/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.d.ts deleted file mode 100644 index 9693aa0..0000000 --- a/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/// - -declare module "ecdsa-sig-formatter" { - /** - * Convert the ASN.1/DER encoded signature to a JOSE-style concatenated signature. Returns a base64 url encoded String. - * If signature is a String, it should be base64 encoded - * alg must be one of ES256, ES384 or ES512 - */ - export function derToJose(signature: Buffer | string, alg: string): string; - - /** - * Convert the JOSE-style concatenated signature to an ASN.1/DER encoded signature. Returns a Buffer - * If signature is a String, it should be base64 url encoded - * alg must be one of ES256, ES384 or ES512 - */ - export function joseToDer(signature: Buffer | string, alg: string): Buffer -} diff --git a/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js b/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js deleted file mode 100644 index 38eeb9b..0000000 --- a/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js +++ /dev/null @@ -1,187 +0,0 @@ -'use strict'; - -var Buffer = require('safe-buffer').Buffer; - -var getParamBytesForAlg = require('./param-bytes-for-alg'); - -var MAX_OCTET = 0x80, - CLASS_UNIVERSAL = 0, - PRIMITIVE_BIT = 0x20, - TAG_SEQ = 0x10, - TAG_INT = 0x02, - ENCODED_TAG_SEQ = (TAG_SEQ | PRIMITIVE_BIT) | (CLASS_UNIVERSAL << 6), - ENCODED_TAG_INT = TAG_INT | (CLASS_UNIVERSAL << 6); - -function base64Url(base64) { - return base64 - .replace(/=/g, '') - .replace(/\+/g, '-') - .replace(/\//g, '_'); -} - -function signatureAsBuffer(signature) { - if (Buffer.isBuffer(signature)) { - return signature; - } else if ('string' === typeof signature) { - return Buffer.from(signature, 'base64'); - } - - throw new TypeError('ECDSA signature must be a Base64 string or a Buffer'); -} - -function derToJose(signature, alg) { - signature = signatureAsBuffer(signature); - var paramBytes = getParamBytesForAlg(alg); - - // the DER encoded param should at most be the param size, plus a padding - // zero, since due to being a signed integer - var maxEncodedParamLength = paramBytes + 1; - - var inputLength = signature.length; - - var offset = 0; - if (signature[offset++] !== ENCODED_TAG_SEQ) { - throw new Error('Could not find expected "seq"'); - } - - var seqLength = signature[offset++]; - if (seqLength === (MAX_OCTET | 1)) { - seqLength = signature[offset++]; - } - - if (inputLength - offset < seqLength) { - throw new Error('"seq" specified length of "' + seqLength + '", only "' + (inputLength - offset) + '" remaining'); - } - - if (signature[offset++] !== ENCODED_TAG_INT) { - throw new Error('Could not find expected "int" for "r"'); - } - - var rLength = signature[offset++]; - - if (inputLength - offset - 2 < rLength) { - throw new Error('"r" specified length of "' + rLength + '", only "' + (inputLength - offset - 2) + '" available'); - } - - if (maxEncodedParamLength < rLength) { - throw new Error('"r" specified length of "' + rLength + '", max of "' + maxEncodedParamLength + '" is acceptable'); - } - - var rOffset = offset; - offset += rLength; - - if (signature[offset++] !== ENCODED_TAG_INT) { - throw new Error('Could not find expected "int" for "s"'); - } - - var sLength = signature[offset++]; - - if (inputLength - offset !== sLength) { - throw new Error('"s" specified length of "' + sLength + '", expected "' + (inputLength - offset) + '"'); - } - - if (maxEncodedParamLength < sLength) { - throw new Error('"s" specified length of "' + sLength + '", max of "' + maxEncodedParamLength + '" is acceptable'); - } - - var sOffset = offset; - offset += sLength; - - if (offset !== inputLength) { - throw new Error('Expected to consume entire buffer, but "' + (inputLength - offset) + '" bytes remain'); - } - - var rPadding = paramBytes - rLength, - sPadding = paramBytes - sLength; - - var dst = Buffer.allocUnsafe(rPadding + rLength + sPadding + sLength); - - for (offset = 0; offset < rPadding; ++offset) { - dst[offset] = 0; - } - signature.copy(dst, offset, rOffset + Math.max(-rPadding, 0), rOffset + rLength); - - offset = paramBytes; - - for (var o = offset; offset < o + sPadding; ++offset) { - dst[offset] = 0; - } - signature.copy(dst, offset, sOffset + Math.max(-sPadding, 0), sOffset + sLength); - - dst = dst.toString('base64'); - dst = base64Url(dst); - - return dst; -} - -function countPadding(buf, start, stop) { - var padding = 0; - while (start + padding < stop && buf[start + padding] === 0) { - ++padding; - } - - var needsSign = buf[start + padding] >= MAX_OCTET; - if (needsSign) { - --padding; - } - - return padding; -} - -function joseToDer(signature, alg) { - signature = signatureAsBuffer(signature); - var paramBytes = getParamBytesForAlg(alg); - - var signatureBytes = signature.length; - if (signatureBytes !== paramBytes * 2) { - throw new TypeError('"' + alg + '" signatures must be "' + paramBytes * 2 + '" bytes, saw "' + signatureBytes + '"'); - } - - var rPadding = countPadding(signature, 0, paramBytes); - var sPadding = countPadding(signature, paramBytes, signature.length); - var rLength = paramBytes - rPadding; - var sLength = paramBytes - sPadding; - - var rsBytes = 1 + 1 + rLength + 1 + 1 + sLength; - - var shortLength = rsBytes < MAX_OCTET; - - var dst = Buffer.allocUnsafe((shortLength ? 2 : 3) + rsBytes); - - var offset = 0; - dst[offset++] = ENCODED_TAG_SEQ; - if (shortLength) { - // Bit 8 has value "0" - // bits 7-1 give the length. - dst[offset++] = rsBytes; - } else { - // Bit 8 of first octet has value "1" - // bits 7-1 give the number of additional length octets. - dst[offset++] = MAX_OCTET | 1; - // length, base 256 - dst[offset++] = rsBytes & 0xff; - } - dst[offset++] = ENCODED_TAG_INT; - dst[offset++] = rLength; - if (rPadding < 0) { - dst[offset++] = 0; - offset += signature.copy(dst, offset, 0, paramBytes); - } else { - offset += signature.copy(dst, offset, rPadding, paramBytes); - } - dst[offset++] = ENCODED_TAG_INT; - dst[offset++] = sLength; - if (sPadding < 0) { - dst[offset++] = 0; - signature.copy(dst, offset, paramBytes); - } else { - signature.copy(dst, offset, paramBytes + sPadding); - } - - return dst; -} - -module.exports = { - derToJose: derToJose, - joseToDer: joseToDer -}; diff --git a/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js b/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js deleted file mode 100644 index 9fe67ac..0000000 --- a/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -function getParamSize(keySize) { - var result = ((keySize / 8) | 0) + (keySize % 8 === 0 ? 0 : 1); - return result; -} - -var paramBytesForAlg = { - ES256: getParamSize(256), - ES384: getParamSize(384), - ES512: getParamSize(521) -}; - -function getParamBytesForAlg(alg) { - var paramBytes = paramBytesForAlg[alg]; - if (paramBytes) { - return paramBytes; - } - - throw new Error('Unknown algorithm "' + alg + '"'); -} - -module.exports = getParamBytesForAlg; diff --git a/node_modules/ee-first/LICENSE b/node_modules/ee-first/LICENSE deleted file mode 100644 index a7ae8ee..0000000 --- a/node_modules/ee-first/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ - -The MIT License (MIT) - -Copyright (c) 2014 Jonathan Ong me@jongleberry.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/ee-first/README.md b/node_modules/ee-first/README.md deleted file mode 100644 index cbd2478..0000000 --- a/node_modules/ee-first/README.md +++ /dev/null @@ -1,80 +0,0 @@ -# EE First - -[![NPM version][npm-image]][npm-url] -[![Build status][travis-image]][travis-url] -[![Test coverage][coveralls-image]][coveralls-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] -[![Gittip][gittip-image]][gittip-url] - -Get the first event in a set of event emitters and event pairs, -then clean up after itself. - -## Install - -```sh -$ npm install ee-first -``` - -## API - -```js -var first = require('ee-first') -``` - -### first(arr, listener) - -Invoke `listener` on the first event from the list specified in `arr`. `arr` is -an array of arrays, with each array in the format `[ee, ...event]`. `listener` -will be called only once, the first time any of the given events are emitted. If -`error` is one of the listened events, then if that fires first, the `listener` -will be given the `err` argument. - -The `listener` is invoked as `listener(err, ee, event, args)`, where `err` is the -first argument emitted from an `error` event, if applicable; `ee` is the event -emitter that fired; `event` is the string event name that fired; and `args` is an -array of the arguments that were emitted on the event. - -```js -var ee1 = new EventEmitter() -var ee2 = new EventEmitter() - -first([ - [ee1, 'close', 'end', 'error'], - [ee2, 'error'] -], function (err, ee, event, args) { - // listener invoked -}) -``` - -#### .cancel() - -The group of listeners can be cancelled before being invoked and have all the event -listeners removed from the underlying event emitters. - -```js -var thunk = first([ - [ee1, 'close', 'end', 'error'], - [ee2, 'error'] -], function (err, ee, event, args) { - // listener invoked -}) - -// cancel and clean up -thunk.cancel() -``` - -[npm-image]: https://img.shields.io/npm/v/ee-first.svg?style=flat-square -[npm-url]: https://npmjs.org/package/ee-first -[github-tag]: http://img.shields.io/github/tag/jonathanong/ee-first.svg?style=flat-square -[github-url]: https://github.com/jonathanong/ee-first/tags -[travis-image]: https://img.shields.io/travis/jonathanong/ee-first.svg?style=flat-square -[travis-url]: https://travis-ci.org/jonathanong/ee-first -[coveralls-image]: https://img.shields.io/coveralls/jonathanong/ee-first.svg?style=flat-square -[coveralls-url]: https://coveralls.io/r/jonathanong/ee-first?branch=master -[license-image]: http://img.shields.io/npm/l/ee-first.svg?style=flat-square -[license-url]: LICENSE.md -[downloads-image]: http://img.shields.io/npm/dm/ee-first.svg?style=flat-square -[downloads-url]: https://npmjs.org/package/ee-first -[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square -[gittip-url]: https://www.gittip.com/jonathanong/ diff --git a/node_modules/ee-first/index.js b/node_modules/ee-first/index.js deleted file mode 100644 index 501287c..0000000 --- a/node_modules/ee-first/index.js +++ /dev/null @@ -1,95 +0,0 @@ -/*! - * ee-first - * Copyright(c) 2014 Jonathan Ong - * MIT Licensed - */ - -'use strict' - -/** - * Module exports. - * @public - */ - -module.exports = first - -/** - * Get the first event in a set of event emitters and event pairs. - * - * @param {array} stuff - * @param {function} done - * @public - */ - -function first(stuff, done) { - if (!Array.isArray(stuff)) - throw new TypeError('arg must be an array of [ee, events...] arrays') - - var cleanups = [] - - for (var i = 0; i < stuff.length; i++) { - var arr = stuff[i] - - if (!Array.isArray(arr) || arr.length < 2) - throw new TypeError('each array member must be [ee, events...]') - - var ee = arr[0] - - for (var j = 1; j < arr.length; j++) { - var event = arr[j] - var fn = listener(event, callback) - - // listen to the event - ee.on(event, fn) - // push this listener to the list of cleanups - cleanups.push({ - ee: ee, - event: event, - fn: fn, - }) - } - } - - function callback() { - cleanup() - done.apply(null, arguments) - } - - function cleanup() { - var x - for (var i = 0; i < cleanups.length; i++) { - x = cleanups[i] - x.ee.removeListener(x.event, x.fn) - } - } - - function thunk(fn) { - done = fn - } - - thunk.cancel = cleanup - - return thunk -} - -/** - * Create the event listener. - * @private - */ - -function listener(event, done) { - return function onevent(arg1) { - var args = new Array(arguments.length) - var ee = this - var err = event === 'error' - ? arg1 - : null - - // copy args to prevent arguments escaping scope - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - - done(err, ee, event, args) - } -} diff --git a/node_modules/ee-first/package.json b/node_modules/ee-first/package.json deleted file mode 100644 index b6d0b7d..0000000 --- a/node_modules/ee-first/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "ee-first", - "description": "return the first event in a set of ee/event pairs", - "version": "1.1.1", - "author": { - "name": "Jonathan Ong", - "email": "me@jongleberry.com", - "url": "http://jongleberry.com", - "twitter": "https://twitter.com/jongleberry" - }, - "contributors": [ - "Douglas Christopher Wilson " - ], - "license": "MIT", - "repository": "jonathanong/ee-first", - "devDependencies": { - "istanbul": "0.3.9", - "mocha": "2.2.5" - }, - "files": [ - "index.js", - "LICENSE" - ], - "scripts": { - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" - } -} diff --git a/node_modules/encodeurl/LICENSE b/node_modules/encodeurl/LICENSE deleted file mode 100644 index 8812229..0000000 --- a/node_modules/encodeurl/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2016 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/encodeurl/README.md b/node_modules/encodeurl/README.md deleted file mode 100644 index 3842493..0000000 --- a/node_modules/encodeurl/README.md +++ /dev/null @@ -1,109 +0,0 @@ -# Encode URL - -Encode a URL to a percent-encoded form, excluding already-encoded sequences. - -## Installation - -```sh -npm install encodeurl -``` - -## API - -```js -var encodeUrl = require('encodeurl') -``` - -### encodeUrl(url) - -Encode a URL to a percent-encoded form, excluding already-encoded sequences. - -This function accepts a URL and encodes all the non-URL code points (as UTF-8 byte sequences). It will not encode the "%" character unless it is not part of a valid sequence (`%20` will be left as-is, but `%foo` will be encoded as `%25foo`). - -This encode is meant to be "safe" and does not throw errors. It will try as hard as it can to properly encode the given URL, including replacing any raw, unpaired surrogate pairs with the Unicode replacement character prior to encoding. - -## Examples - -### Encode a URL containing user-controlled data - -```js -var encodeUrl = require('encodeurl') -var escapeHtml = require('escape-html') - -http.createServer(function onRequest (req, res) { - // get encoded form of inbound url - var url = encodeUrl(req.url) - - // create html message - var body = '

Location ' + escapeHtml(url) + ' not found

' - - // send a 404 - res.statusCode = 404 - res.setHeader('Content-Type', 'text/html; charset=UTF-8') - res.setHeader('Content-Length', String(Buffer.byteLength(body, 'utf-8'))) - res.end(body, 'utf-8') -}) -``` - -### Encode a URL for use in a header field - -```js -var encodeUrl = require('encodeurl') -var escapeHtml = require('escape-html') -var url = require('url') - -http.createServer(function onRequest (req, res) { - // parse inbound url - var href = url.parse(req) - - // set new host for redirect - href.host = 'localhost' - href.protocol = 'https:' - href.slashes = true - - // create location header - var location = encodeUrl(url.format(href)) - - // create html message - var body = '

Redirecting to new site: ' + escapeHtml(location) + '

' - - // send a 301 - res.statusCode = 301 - res.setHeader('Content-Type', 'text/html; charset=UTF-8') - res.setHeader('Content-Length', String(Buffer.byteLength(body, 'utf-8'))) - res.setHeader('Location', location) - res.end(body, 'utf-8') -}) -``` - -## Similarities - -This function is _similar_ to the intrinsic function `encodeURI`. However, it will not encode: - -* The `\`, `^`, or `|` characters -* The `%` character when it's part of a valid sequence -* `[` and `]` (for IPv6 hostnames) -* Replaces raw, unpaired surrogate pairs with the Unicode replacement character - -As a result, the encoding aligns closely with the behavior in the [WHATWG URL specification][whatwg-url]. However, this package only encodes strings and does not do any URL parsing or formatting. - -It is expected that any output from `new URL(url)` will not change when used with this package, as the output has already been encoded. Additionally, if we were to encode before `new URL(url)`, we do not expect the before and after encoded formats to be parsed any differently. - -## Testing - -```sh -$ npm test -$ npm run lint -``` - -## References - -- [RFC 3986: Uniform Resource Identifier (URI): Generic Syntax][rfc-3986] -- [WHATWG URL Living Standard][whatwg-url] - -[rfc-3986]: https://tools.ietf.org/html/rfc3986 -[whatwg-url]: https://url.spec.whatwg.org/ - -## License - -[MIT](LICENSE) diff --git a/node_modules/encodeurl/index.js b/node_modules/encodeurl/index.js deleted file mode 100644 index a49ee5a..0000000 --- a/node_modules/encodeurl/index.js +++ /dev/null @@ -1,60 +0,0 @@ -/*! - * encodeurl - * Copyright(c) 2016 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module exports. - * @public - */ - -module.exports = encodeUrl - -/** - * RegExp to match non-URL code points, *after* encoding (i.e. not including "%") - * and including invalid escape sequences. - * @private - */ - -var ENCODE_CHARS_REGEXP = /(?:[^\x21\x23-\x3B\x3D\x3F-\x5F\x61-\x7A\x7C\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g - -/** - * RegExp to match unmatched surrogate pair. - * @private - */ - -var UNMATCHED_SURROGATE_PAIR_REGEXP = /(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g - -/** - * String to replace unmatched surrogate pair with. - * @private - */ - -var UNMATCHED_SURROGATE_PAIR_REPLACE = '$1\uFFFD$2' - -/** - * Encode a URL to a percent-encoded form, excluding already-encoded sequences. - * - * This function will take an already-encoded URL and encode all the non-URL - * code points. This function will not encode the "%" character unless it is - * not part of a valid sequence (`%20` will be left as-is, but `%foo` will - * be encoded as `%25foo`). - * - * This encode is meant to be "safe" and does not throw errors. It will try as - * hard as it can to properly encode the given URL, including replacing any raw, - * unpaired surrogate pairs with the Unicode replacement character prior to - * encoding. - * - * @param {string} url - * @return {string} - * @public - */ - -function encodeUrl (url) { - return String(url) - .replace(UNMATCHED_SURROGATE_PAIR_REGEXP, UNMATCHED_SURROGATE_PAIR_REPLACE) - .replace(ENCODE_CHARS_REGEXP, encodeURI) -} diff --git a/node_modules/encodeurl/package.json b/node_modules/encodeurl/package.json deleted file mode 100644 index 3133822..0000000 --- a/node_modules/encodeurl/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "encodeurl", - "description": "Encode a URL to a percent-encoded form, excluding already-encoded sequences", - "version": "2.0.0", - "contributors": [ - "Douglas Christopher Wilson " - ], - "license": "MIT", - "keywords": [ - "encode", - "encodeurl", - "url" - ], - "repository": "pillarjs/encodeurl", - "devDependencies": { - "eslint": "5.11.1", - "eslint-config-standard": "12.0.0", - "eslint-plugin-import": "2.14.0", - "eslint-plugin-node": "7.0.1", - "eslint-plugin-promise": "4.0.1", - "eslint-plugin-standard": "4.0.0", - "istanbul": "0.4.5", - "mocha": "2.5.3" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "README.md", - "index.js" - ], - "engines": { - "node": ">= 0.8" - }, - "scripts": { - "lint": "eslint .", - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" - } -} diff --git a/node_modules/es-define-property/.eslintrc b/node_modules/es-define-property/.eslintrc deleted file mode 100644 index 46f3b12..0000000 --- a/node_modules/es-define-property/.eslintrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "new-cap": ["error", { - "capIsNewExceptions": [ - "GetIntrinsic", - ], - }], - }, -} diff --git a/node_modules/es-define-property/.github/FUNDING.yml b/node_modules/es-define-property/.github/FUNDING.yml deleted file mode 100644 index 4445451..0000000 --- a/node_modules/es-define-property/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/es-define-property -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/es-define-property/.nycrc b/node_modules/es-define-property/.nycrc deleted file mode 100644 index bdd626c..0000000 --- a/node_modules/es-define-property/.nycrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/es-define-property/CHANGELOG.md b/node_modules/es-define-property/CHANGELOG.md deleted file mode 100644 index 5f60cc0..0000000 --- a/node_modules/es-define-property/CHANGELOG.md +++ /dev/null @@ -1,29 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.0.1](https://github.com/ljharb/es-define-property/compare/v1.0.0...v1.0.1) - 2024-12-06 - -### Commits - -- [types] use shared tsconfig [`954a663`](https://github.com/ljharb/es-define-property/commit/954a66360326e508a0e5daa4b07493d58f5e110e) -- [actions] split out node 10-20, and 20+ [`3a8e84b`](https://github.com/ljharb/es-define-property/commit/3a8e84b23883f26ff37b3e82ff283834228e18c6) -- [Dev Deps] update `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/get-intrinsic`, `@types/tape`, `auto-changelog`, `gopd`, `tape` [`86ae27b`](https://github.com/ljharb/es-define-property/commit/86ae27bb8cc857b23885136fad9cbe965ae36612) -- [Refactor] avoid using `get-intrinsic` [`02480c0`](https://github.com/ljharb/es-define-property/commit/02480c0353ef6118965282977c3864aff53d98b1) -- [Tests] replace `aud` with `npm audit` [`f6093ff`](https://github.com/ljharb/es-define-property/commit/f6093ff74ab51c98015c2592cd393bd42478e773) -- [Tests] configure testling [`7139e66`](https://github.com/ljharb/es-define-property/commit/7139e66959247a56086d9977359caef27c6849e7) -- [Dev Deps] update `tape` [`b901b51`](https://github.com/ljharb/es-define-property/commit/b901b511a75e001a40ce1a59fef7d9ffcfc87482) -- [Tests] fix types in tests [`469d269`](https://github.com/ljharb/es-define-property/commit/469d269fd141b1e773ec053a9fa35843493583e0) -- [Dev Deps] add missing peer dep [`733acfb`](https://github.com/ljharb/es-define-property/commit/733acfb0c4c96edf337e470b89a25a5b3724c352) - -## v1.0.0 - 2024-02-12 - -### Commits - -- Initial implementation, tests, readme, types [`3e154e1`](https://github.com/ljharb/es-define-property/commit/3e154e11a2fee09127220f5e503bf2c0a31dd480) -- Initial commit [`07d98de`](https://github.com/ljharb/es-define-property/commit/07d98de34a4dc31ff5e83a37c0c3f49e0d85cd50) -- npm init [`c4eb634`](https://github.com/ljharb/es-define-property/commit/c4eb6348b0d3886aac36cef34ad2ee0665ea6f3e) -- Only apps should have lockfiles [`7af86ec`](https://github.com/ljharb/es-define-property/commit/7af86ec1d311ec0b17fdfe616a25f64276903856) diff --git a/node_modules/es-define-property/LICENSE b/node_modules/es-define-property/LICENSE deleted file mode 100644 index f82f389..0000000 --- a/node_modules/es-define-property/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/es-define-property/README.md b/node_modules/es-define-property/README.md deleted file mode 100644 index 9b291bd..0000000 --- a/node_modules/es-define-property/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# es-define-property [![Version Badge][npm-version-svg]][package-url] - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -`Object.defineProperty`, but not IE 8's broken one. - -## Example - -```js -const assert = require('assert'); - -const $defineProperty = require('es-define-property'); - -if ($defineProperty) { - assert.equal($defineProperty, Object.defineProperty); -} else if (Object.defineProperty) { - assert.equal($defineProperty, false, 'this is IE 8'); -} else { - assert.equal($defineProperty, false, 'this is an ES3 engine'); -} -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -## Security - -Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. - -[package-url]: https://npmjs.org/package/es-define-property -[npm-version-svg]: https://versionbadg.es/ljharb/es-define-property.svg -[deps-svg]: https://david-dm.org/ljharb/es-define-property.svg -[deps-url]: https://david-dm.org/ljharb/es-define-property -[dev-deps-svg]: https://david-dm.org/ljharb/es-define-property/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/es-define-property#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/es-define-property.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/es-define-property.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/es-define-property.svg -[downloads-url]: https://npm-stat.com/charts.html?package=es-define-property -[codecov-image]: https://codecov.io/gh/ljharb/es-define-property/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/ljharb/es-define-property/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/es-define-property -[actions-url]: https://github.com/ljharb/es-define-property/actions diff --git a/node_modules/es-define-property/index.d.ts b/node_modules/es-define-property/index.d.ts deleted file mode 100644 index 6012247..0000000 --- a/node_modules/es-define-property/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const defineProperty: false | typeof Object.defineProperty; - -export = defineProperty; \ No newline at end of file diff --git a/node_modules/es-define-property/index.js b/node_modules/es-define-property/index.js deleted file mode 100644 index e0a2925..0000000 --- a/node_modules/es-define-property/index.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -/** @type {import('.')} */ -var $defineProperty = Object.defineProperty || false; -if ($defineProperty) { - try { - $defineProperty({}, 'a', { value: 1 }); - } catch (e) { - // IE 8 has a broken defineProperty - $defineProperty = false; - } -} - -module.exports = $defineProperty; diff --git a/node_modules/es-define-property/package.json b/node_modules/es-define-property/package.json deleted file mode 100644 index fbed187..0000000 --- a/node_modules/es-define-property/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "es-define-property", - "version": "1.0.1", - "description": "`Object.defineProperty`, but not IE 8's broken one.", - "main": "index.js", - "types": "./index.d.ts", - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepublishOnly": "safe-publish-latest", - "prelint": "evalmd README.md", - "lint": "eslint --ext=js,mjs .", - "postlint": "tsc -p .", - "pretest": "npm run lint", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "npx npm@'>= 10.2' audit --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/es-define-property.git" - }, - "keywords": [ - "javascript", - "ecmascript", - "object", - "define", - "property", - "defineProperty", - "Object.defineProperty" - ], - "author": "Jordan Harband ", - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/es-define-property/issues" - }, - "homepage": "https://github.com/ljharb/es-define-property#readme", - "devDependencies": { - "@ljharb/eslint-config": "^21.1.1", - "@ljharb/tsconfig": "^0.2.2", - "@types/gopd": "^1.0.3", - "@types/tape": "^5.6.5", - "auto-changelog": "^2.5.0", - "encoding": "^0.1.13", - "eslint": "^8.8.0", - "evalmd": "^0.0.19", - "gopd": "^1.2.0", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.9.0", - "typescript": "next" - }, - "engines": { - "node": ">= 0.4" - }, - "testling": { - "files": "test/index.js" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - } -} diff --git a/node_modules/es-define-property/test/index.js b/node_modules/es-define-property/test/index.js deleted file mode 100644 index b4b4688..0000000 --- a/node_modules/es-define-property/test/index.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -var $defineProperty = require('../'); - -var test = require('tape'); -var gOPD = require('gopd'); - -test('defineProperty: supported', { skip: !$defineProperty }, function (t) { - t.plan(4); - - t.equal(typeof $defineProperty, 'function', 'defineProperty is supported'); - if ($defineProperty && gOPD) { // this `if` check is just to shut TS up - /** @type {{ a: number, b?: number, c?: number }} */ - var o = { a: 1 }; - - $defineProperty(o, 'b', { enumerable: true, value: 2 }); - t.deepEqual( - gOPD(o, 'b'), - { - configurable: false, - enumerable: true, - value: 2, - writable: false - }, - 'property descriptor is as expected' - ); - - $defineProperty(o, 'c', { enumerable: false, value: 3, writable: true }); - t.deepEqual( - gOPD(o, 'c'), - { - configurable: false, - enumerable: false, - value: 3, - writable: true - }, - 'property descriptor is as expected' - ); - } - - t.equal($defineProperty, Object.defineProperty, 'defineProperty is Object.defineProperty'); - - t.end(); -}); - -test('defineProperty: not supported', { skip: !!$defineProperty }, function (t) { - t.notOk($defineProperty, 'defineProperty is not supported'); - - t.match( - typeof $defineProperty, - /^(?:undefined|boolean)$/, - '`typeof defineProperty` is `undefined` or `boolean`' - ); - - t.end(); -}); diff --git a/node_modules/es-define-property/tsconfig.json b/node_modules/es-define-property/tsconfig.json deleted file mode 100644 index 5a49992..0000000 --- a/node_modules/es-define-property/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "@ljharb/tsconfig", - "compilerOptions": { - "target": "es2022", - }, - "exclude": [ - "coverage", - "test/list-exports" - ], -} diff --git a/node_modules/es-errors/.eslintrc b/node_modules/es-errors/.eslintrc deleted file mode 100644 index 3b5d9e9..0000000 --- a/node_modules/es-errors/.eslintrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", -} diff --git a/node_modules/es-errors/.github/FUNDING.yml b/node_modules/es-errors/.github/FUNDING.yml deleted file mode 100644 index f1b8805..0000000 --- a/node_modules/es-errors/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/es-errors -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/es-errors/CHANGELOG.md b/node_modules/es-errors/CHANGELOG.md deleted file mode 100644 index 204a9e9..0000000 --- a/node_modules/es-errors/CHANGELOG.md +++ /dev/null @@ -1,40 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.3.0](https://github.com/ljharb/es-errors/compare/v1.2.1...v1.3.0) - 2024-02-05 - -### Commits - -- [New] add `EvalError` and `URIError` [`1927627`](https://github.com/ljharb/es-errors/commit/1927627ba68cb6c829d307231376c967db53acdf) - -## [v1.2.1](https://github.com/ljharb/es-errors/compare/v1.2.0...v1.2.1) - 2024-02-04 - -### Commits - -- [Fix] add missing `exports` entry [`5bb5f28`](https://github.com/ljharb/es-errors/commit/5bb5f280f98922701109d6ebb82eea2257cecc7e) - -## [v1.2.0](https://github.com/ljharb/es-errors/compare/v1.1.0...v1.2.0) - 2024-02-04 - -### Commits - -- [New] add `ReferenceError` [`6d8cf5b`](https://github.com/ljharb/es-errors/commit/6d8cf5bbb6f3f598d02cf6f30e468ba2caa8e143) - -## [v1.1.0](https://github.com/ljharb/es-errors/compare/v1.0.0...v1.1.0) - 2024-02-04 - -### Commits - -- [New] add base Error [`2983ab6`](https://github.com/ljharb/es-errors/commit/2983ab65f7bc5441276cb021dc3aa03c78881698) - -## v1.0.0 - 2024-02-03 - -### Commits - -- Initial implementation, tests, readme, type [`8f47631`](https://github.com/ljharb/es-errors/commit/8f476317e9ad76f40ad648081829b1a1a3a1288b) -- Initial commit [`ea5d099`](https://github.com/ljharb/es-errors/commit/ea5d099ef18e550509ab9e2be000526afd81c385) -- npm init [`6f5ebf9`](https://github.com/ljharb/es-errors/commit/6f5ebf9cead474dadd72b9e63dad315820a089ae) -- Only apps should have lockfiles [`e1a0aeb`](https://github.com/ljharb/es-errors/commit/e1a0aeb7b80f5cfc56be54d6b2100e915d47def8) -- [meta] add `sideEffects` flag [`a9c7d46`](https://github.com/ljharb/es-errors/commit/a9c7d460a492f1d8a241c836bc25a322a19cc043) diff --git a/node_modules/es-errors/LICENSE b/node_modules/es-errors/LICENSE deleted file mode 100644 index f82f389..0000000 --- a/node_modules/es-errors/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/es-errors/README.md b/node_modules/es-errors/README.md deleted file mode 100644 index 8dbfacf..0000000 --- a/node_modules/es-errors/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# es-errors [![Version Badge][npm-version-svg]][package-url] - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -A simple cache for a few of the JS Error constructors. - -## Example - -```js -const assert = require('assert'); - -const Base = require('es-errors'); -const Eval = require('es-errors/eval'); -const Range = require('es-errors/range'); -const Ref = require('es-errors/ref'); -const Syntax = require('es-errors/syntax'); -const Type = require('es-errors/type'); -const URI = require('es-errors/uri'); - -assert.equal(Base, Error); -assert.equal(Eval, EvalError); -assert.equal(Range, RangeError); -assert.equal(Ref, ReferenceError); -assert.equal(Syntax, SyntaxError); -assert.equal(Type, TypeError); -assert.equal(URI, URIError); -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -## Security - -Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. - -[package-url]: https://npmjs.org/package/es-errors -[npm-version-svg]: https://versionbadg.es/ljharb/es-errors.svg -[deps-svg]: https://david-dm.org/ljharb/es-errors.svg -[deps-url]: https://david-dm.org/ljharb/es-errors -[dev-deps-svg]: https://david-dm.org/ljharb/es-errors/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/es-errors#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/es-errors.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/es-errors.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/es-errors.svg -[downloads-url]: https://npm-stat.com/charts.html?package=es-errors -[codecov-image]: https://codecov.io/gh/ljharb/es-errors/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/ljharb/es-errors/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/es-errors -[actions-url]: https://github.com/ljharb/es-errors/actions diff --git a/node_modules/es-errors/eval.d.ts b/node_modules/es-errors/eval.d.ts deleted file mode 100644 index e4210e0..0000000 --- a/node_modules/es-errors/eval.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const EvalError: EvalErrorConstructor; - -export = EvalError; diff --git a/node_modules/es-errors/eval.js b/node_modules/es-errors/eval.js deleted file mode 100644 index 725ccb6..0000000 --- a/node_modules/es-errors/eval.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./eval')} */ -module.exports = EvalError; diff --git a/node_modules/es-errors/index.d.ts b/node_modules/es-errors/index.d.ts deleted file mode 100644 index 69bdbc9..0000000 --- a/node_modules/es-errors/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const Error: ErrorConstructor; - -export = Error; diff --git a/node_modules/es-errors/index.js b/node_modules/es-errors/index.js deleted file mode 100644 index cc0c521..0000000 --- a/node_modules/es-errors/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('.')} */ -module.exports = Error; diff --git a/node_modules/es-errors/package.json b/node_modules/es-errors/package.json deleted file mode 100644 index ff8c2a5..0000000 --- a/node_modules/es-errors/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "es-errors", - "version": "1.3.0", - "description": "A simple cache for a few of the JS Error constructors.", - "main": "index.js", - "exports": { - ".": "./index.js", - "./eval": "./eval.js", - "./range": "./range.js", - "./ref": "./ref.js", - "./syntax": "./syntax.js", - "./type": "./type.js", - "./uri": "./uri.js", - "./package.json": "./package.json" - }, - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "pretest": "npm run lint", - "test": "npm run tests-only", - "tests-only": "nyc tape 'test/**/*.js'", - "posttest": "aud --production", - "prelint": "evalmd README.md", - "lint": "eslint --ext=js,mjs .", - "postlint": "tsc -p . && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/es-errors.git" - }, - "keywords": [ - "javascript", - "ecmascript", - "error", - "typeerror", - "syntaxerror", - "rangeerror" - ], - "author": "Jordan Harband ", - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/es-errors/issues" - }, - "homepage": "https://github.com/ljharb/es-errors#readme", - "devDependencies": { - "@ljharb/eslint-config": "^21.1.0", - "@types/tape": "^5.6.4", - "aud": "^2.0.4", - "auto-changelog": "^2.4.0", - "eclint": "^2.8.1", - "eslint": "^8.8.0", - "evalmd": "^0.0.19", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.7.4", - "typescript": "next" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - }, - "engines": { - "node": ">= 0.4" - } -} diff --git a/node_modules/es-errors/range.d.ts b/node_modules/es-errors/range.d.ts deleted file mode 100644 index 3a12e86..0000000 --- a/node_modules/es-errors/range.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const RangeError: RangeErrorConstructor; - -export = RangeError; diff --git a/node_modules/es-errors/range.js b/node_modules/es-errors/range.js deleted file mode 100644 index 2044fe0..0000000 --- a/node_modules/es-errors/range.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./range')} */ -module.exports = RangeError; diff --git a/node_modules/es-errors/ref.d.ts b/node_modules/es-errors/ref.d.ts deleted file mode 100644 index a13107e..0000000 --- a/node_modules/es-errors/ref.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const ReferenceError: ReferenceErrorConstructor; - -export = ReferenceError; diff --git a/node_modules/es-errors/ref.js b/node_modules/es-errors/ref.js deleted file mode 100644 index d7c430f..0000000 --- a/node_modules/es-errors/ref.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./ref')} */ -module.exports = ReferenceError; diff --git a/node_modules/es-errors/syntax.d.ts b/node_modules/es-errors/syntax.d.ts deleted file mode 100644 index 6a0c53c..0000000 --- a/node_modules/es-errors/syntax.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const SyntaxError: SyntaxErrorConstructor; - -export = SyntaxError; diff --git a/node_modules/es-errors/syntax.js b/node_modules/es-errors/syntax.js deleted file mode 100644 index 5f5fdde..0000000 --- a/node_modules/es-errors/syntax.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./syntax')} */ -module.exports = SyntaxError; diff --git a/node_modules/es-errors/test/index.js b/node_modules/es-errors/test/index.js deleted file mode 100644 index 1ff0277..0000000 --- a/node_modules/es-errors/test/index.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -var test = require('tape'); - -var E = require('../'); -var R = require('../range'); -var Ref = require('../ref'); -var S = require('../syntax'); -var T = require('../type'); - -test('errors', function (t) { - t.equal(E, Error); - t.equal(R, RangeError); - t.equal(Ref, ReferenceError); - t.equal(S, SyntaxError); - t.equal(T, TypeError); - - t.end(); -}); diff --git a/node_modules/es-errors/tsconfig.json b/node_modules/es-errors/tsconfig.json deleted file mode 100644 index 99dfeb6..0000000 --- a/node_modules/es-errors/tsconfig.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "compilerOptions": { - /* Visit https://aka.ms/tsconfig.json to read more about this file */ - - /* Projects */ - - /* Language and Environment */ - "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ - // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ - // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ - "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ - // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ - - /* Modules */ - "module": "commonjs", /* Specify what module code is generated. */ - // "rootDir": "./", /* Specify the root folder within your source files. */ - // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ - // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ - // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ - // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - // "typeRoots": ["types"], /* Specify multiple folders that act like `./node_modules/@types`. */ - "resolveJsonModule": true, /* Enable importing .json files. */ - // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ - - /* JavaScript Support */ - "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ - "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ - "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ - - /* Emit */ - "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ - "declarationMap": true, /* Create sourcemaps for d.ts files. */ - "noEmit": true, /* Disable emitting files from a compilation. */ - - /* Interop Constraints */ - "allowSyntheticDefaultImports": true, /* Allow `import x from y` when a module doesn't have a default export. */ - "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */ - "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ - - /* Type Checking */ - "strict": true, /* Enable all strict type-checking options. */ - - /* Completeness */ - // "skipLibCheck": true /* Skip type checking all .d.ts files. */ - }, - "exclude": [ - "coverage", - ], -} diff --git a/node_modules/es-errors/type.d.ts b/node_modules/es-errors/type.d.ts deleted file mode 100644 index 576fb51..0000000 --- a/node_modules/es-errors/type.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const TypeError: TypeErrorConstructor - -export = TypeError; diff --git a/node_modules/es-errors/type.js b/node_modules/es-errors/type.js deleted file mode 100644 index 9769e44..0000000 --- a/node_modules/es-errors/type.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./type')} */ -module.exports = TypeError; diff --git a/node_modules/es-errors/uri.d.ts b/node_modules/es-errors/uri.d.ts deleted file mode 100644 index c3261c9..0000000 --- a/node_modules/es-errors/uri.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const URIError: URIErrorConstructor; - -export = URIError; diff --git a/node_modules/es-errors/uri.js b/node_modules/es-errors/uri.js deleted file mode 100644 index e9cd1c7..0000000 --- a/node_modules/es-errors/uri.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./uri')} */ -module.exports = URIError; diff --git a/node_modules/es-object-atoms/.eslintrc b/node_modules/es-object-atoms/.eslintrc deleted file mode 100644 index d90a1bc..0000000 --- a/node_modules/es-object-atoms/.eslintrc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "eqeqeq": ["error", "allow-null"], - "id-length": "off", - "new-cap": ["error", { - "capIsNewExceptions": [ - "RequireObjectCoercible", - "ToObject", - ], - }], - }, -} diff --git a/node_modules/es-object-atoms/.github/FUNDING.yml b/node_modules/es-object-atoms/.github/FUNDING.yml deleted file mode 100644 index 352bfda..0000000 --- a/node_modules/es-object-atoms/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/es-object -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/es-object-atoms/CHANGELOG.md b/node_modules/es-object-atoms/CHANGELOG.md deleted file mode 100644 index fdd2abe..0000000 --- a/node_modules/es-object-atoms/CHANGELOG.md +++ /dev/null @@ -1,37 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.1.1](https://github.com/ljharb/es-object-atoms/compare/v1.1.0...v1.1.1) - 2025-01-14 - -### Commits - -- [types] `ToObject`: improve types [`cfe8c8a`](https://github.com/ljharb/es-object-atoms/commit/cfe8c8a105c44820cb22e26f62d12ef0ad9715c8) - -## [v1.1.0](https://github.com/ljharb/es-object-atoms/compare/v1.0.1...v1.1.0) - 2025-01-14 - -### Commits - -- [New] add `isObject` [`51e4042`](https://github.com/ljharb/es-object-atoms/commit/51e4042df722eb3165f40dc5f4bf33d0197ecb07) - -## [v1.0.1](https://github.com/ljharb/es-object-atoms/compare/v1.0.0...v1.0.1) - 2025-01-13 - -### Commits - -- [Dev Deps] update `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/tape`, `auto-changelog`, `tape` [`38ab9eb`](https://github.com/ljharb/es-object-atoms/commit/38ab9eb00b62c2f4668644f5e513d9b414ebd595) -- [types] improve types [`7d1beb8`](https://github.com/ljharb/es-object-atoms/commit/7d1beb887958b78b6a728a210a1c8370ab7e2aa1) -- [Tests] replace `aud` with `npm audit` [`25863ba`](https://github.com/ljharb/es-object-atoms/commit/25863baf99178f1d1ad33d1120498db28631907e) -- [Dev Deps] add missing peer dep [`c012309`](https://github.com/ljharb/es-object-atoms/commit/c0123091287e6132d6f4240496340c427433df28) - -## v1.0.0 - 2024-03-16 - -### Commits - -- Initial implementation, tests, readme, types [`f1499db`](https://github.com/ljharb/es-object-atoms/commit/f1499db7d3e1741e64979c61d645ab3137705e82) -- Initial commit [`99eedc7`](https://github.com/ljharb/es-object-atoms/commit/99eedc7b5fde38a50a28d3c8b724706e3e4c5f6a) -- [meta] rename repo [`fc851fa`](https://github.com/ljharb/es-object-atoms/commit/fc851fa70616d2d182aaf0bd02c2ed7084dea8fa) -- npm init [`b909377`](https://github.com/ljharb/es-object-atoms/commit/b909377c50049bd0ec575562d20b0f9ebae8947f) -- Only apps should have lockfiles [`7249edd`](https://github.com/ljharb/es-object-atoms/commit/7249edd2178c1b9ddfc66ffcc6d07fdf0d28efc1) diff --git a/node_modules/es-object-atoms/LICENSE b/node_modules/es-object-atoms/LICENSE deleted file mode 100644 index f82f389..0000000 --- a/node_modules/es-object-atoms/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/es-object-atoms/README.md b/node_modules/es-object-atoms/README.md deleted file mode 100644 index 447695b..0000000 --- a/node_modules/es-object-atoms/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# es-object-atoms [![Version Badge][npm-version-svg]][package-url] - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -ES Object-related atoms: Object, ToObject, RequireObjectCoercible. - -## Example - -```js -const assert = require('assert'); - -const $Object = require('es-object-atoms'); -const isObject = require('es-object-atoms/isObject'); -const ToObject = require('es-object-atoms/ToObject'); -const RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible'); - -assert.equal($Object, Object); -assert.throws(() => ToObject(null), TypeError); -assert.throws(() => ToObject(undefined), TypeError); -assert.throws(() => RequireObjectCoercible(null), TypeError); -assert.throws(() => RequireObjectCoercible(undefined), TypeError); - -assert.equal(isObject(undefined), false); -assert.equal(isObject(null), false); -assert.equal(isObject({}), true); -assert.equal(isObject([]), true); -assert.equal(isObject(function () {}), true); - -assert.deepEqual(RequireObjectCoercible(true), true); -assert.deepEqual(ToObject(true), Object(true)); - -const obj = {}; -assert.equal(RequireObjectCoercible(obj), obj); -assert.equal(ToObject(obj), obj); -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -## Security - -Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. - -[package-url]: https://npmjs.org/package/es-object-atoms -[npm-version-svg]: https://versionbadg.es/ljharb/es-object-atoms.svg -[deps-svg]: https://david-dm.org/ljharb/es-object-atoms.svg -[deps-url]: https://david-dm.org/ljharb/es-object-atoms -[dev-deps-svg]: https://david-dm.org/ljharb/es-object-atoms/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/es-object-atoms#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/es-object-atoms.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/es-object-atoms.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/es-object.svg -[downloads-url]: https://npm-stat.com/charts.html?package=es-object-atoms -[codecov-image]: https://codecov.io/gh/ljharb/es-object-atoms/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/ljharb/es-object-atoms/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/es-object-atoms -[actions-url]: https://github.com/ljharb/es-object-atoms/actions diff --git a/node_modules/es-object-atoms/RequireObjectCoercible.d.ts b/node_modules/es-object-atoms/RequireObjectCoercible.d.ts deleted file mode 100644 index 7e26c45..0000000 --- a/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function RequireObjectCoercible(value: T, optMessage?: string): T; - -export = RequireObjectCoercible; diff --git a/node_modules/es-object-atoms/RequireObjectCoercible.js b/node_modules/es-object-atoms/RequireObjectCoercible.js deleted file mode 100644 index 8e191c6..0000000 --- a/node_modules/es-object-atoms/RequireObjectCoercible.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -var $TypeError = require('es-errors/type'); - -/** @type {import('./RequireObjectCoercible')} */ -module.exports = function RequireObjectCoercible(value) { - if (value == null) { - throw new $TypeError((arguments.length > 0 && arguments[1]) || ('Cannot call method on ' + value)); - } - return value; -}; diff --git a/node_modules/es-object-atoms/ToObject.d.ts b/node_modules/es-object-atoms/ToObject.d.ts deleted file mode 100644 index d6dd302..0000000 --- a/node_modules/es-object-atoms/ToObject.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -declare function ToObject(value: number): Number; -declare function ToObject(value: boolean): Boolean; -declare function ToObject(value: string): String; -declare function ToObject(value: bigint): BigInt; -declare function ToObject(value: T): T; - -export = ToObject; diff --git a/node_modules/es-object-atoms/ToObject.js b/node_modules/es-object-atoms/ToObject.js deleted file mode 100644 index 2b99a7d..0000000 --- a/node_modules/es-object-atoms/ToObject.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -var $Object = require('./'); -var RequireObjectCoercible = require('./RequireObjectCoercible'); - -/** @type {import('./ToObject')} */ -module.exports = function ToObject(value) { - RequireObjectCoercible(value); - return $Object(value); -}; diff --git a/node_modules/es-object-atoms/index.d.ts b/node_modules/es-object-atoms/index.d.ts deleted file mode 100644 index 8bdbfc8..0000000 --- a/node_modules/es-object-atoms/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const Object: ObjectConstructor; - -export = Object; diff --git a/node_modules/es-object-atoms/index.js b/node_modules/es-object-atoms/index.js deleted file mode 100644 index 1d33cef..0000000 --- a/node_modules/es-object-atoms/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('.')} */ -module.exports = Object; diff --git a/node_modules/es-object-atoms/isObject.d.ts b/node_modules/es-object-atoms/isObject.d.ts deleted file mode 100644 index 43bee3b..0000000 --- a/node_modules/es-object-atoms/isObject.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function isObject(x: unknown): x is object; - -export = isObject; diff --git a/node_modules/es-object-atoms/isObject.js b/node_modules/es-object-atoms/isObject.js deleted file mode 100644 index ec49bf1..0000000 --- a/node_modules/es-object-atoms/isObject.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -/** @type {import('./isObject')} */ -module.exports = function isObject(x) { - return !!x && (typeof x === 'function' || typeof x === 'object'); -}; diff --git a/node_modules/es-object-atoms/package.json b/node_modules/es-object-atoms/package.json deleted file mode 100644 index f4cec71..0000000 --- a/node_modules/es-object-atoms/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "es-object-atoms", - "version": "1.1.1", - "description": "ES Object-related atoms: Object, ToObject, RequireObjectCoercible", - "main": "index.js", - "exports": { - ".": "./index.js", - "./RequireObjectCoercible": "./RequireObjectCoercible.js", - "./isObject": "./isObject.js", - "./ToObject": "./ToObject.js", - "./package.json": "./package.json" - }, - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "pretest": "npm run lint", - "test": "npm run tests-only", - "tests-only": "nyc tape 'test/**/*.js'", - "posttest": "npx npm@\">= 10.2\" audit --production", - "prelint": "evalmd README.md", - "lint": "eslint --ext=js,mjs .", - "postlint": "tsc -p . && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/es-object-atoms.git" - }, - "keywords": [ - "javascript", - "ecmascript", - "object", - "toobject", - "coercible" - ], - "author": "Jordan Harband ", - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/es-object-atoms/issues" - }, - "homepage": "https://github.com/ljharb/es-object-atoms#readme", - "dependencies": { - "es-errors": "^1.3.0" - }, - "devDependencies": { - "@ljharb/eslint-config": "^21.1.1", - "@ljharb/tsconfig": "^0.2.3", - "@types/tape": "^5.8.1", - "auto-changelog": "^2.5.0", - "eclint": "^2.8.1", - "encoding": "^0.1.13", - "eslint": "^8.8.0", - "evalmd": "^0.0.19", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.9.0", - "typescript": "next" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - }, - "engines": { - "node": ">= 0.4" - } -} diff --git a/node_modules/es-object-atoms/test/index.js b/node_modules/es-object-atoms/test/index.js deleted file mode 100644 index 430b705..0000000 --- a/node_modules/es-object-atoms/test/index.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -var test = require('tape'); - -var $Object = require('../'); -var isObject = require('../isObject'); -var ToObject = require('../ToObject'); -var RequireObjectCoercible = require('..//RequireObjectCoercible'); - -test('errors', function (t) { - t.equal($Object, Object); - // @ts-expect-error - t['throws'](function () { ToObject(null); }, TypeError); - // @ts-expect-error - t['throws'](function () { ToObject(undefined); }, TypeError); - // @ts-expect-error - t['throws'](function () { RequireObjectCoercible(null); }, TypeError); - // @ts-expect-error - t['throws'](function () { RequireObjectCoercible(undefined); }, TypeError); - - t.deepEqual(RequireObjectCoercible(true), true); - t.deepEqual(ToObject(true), Object(true)); - t.deepEqual(ToObject(42), Object(42)); - var f = function () {}; - t.equal(ToObject(f), f); - - t.equal(isObject(undefined), false); - t.equal(isObject(null), false); - t.equal(isObject({}), true); - t.equal(isObject([]), true); - t.equal(isObject(function () {}), true); - - var obj = {}; - t.equal(RequireObjectCoercible(obj), obj); - t.equal(ToObject(obj), obj); - - t.end(); -}); diff --git a/node_modules/es-object-atoms/tsconfig.json b/node_modules/es-object-atoms/tsconfig.json deleted file mode 100644 index 1f73cb7..0000000 --- a/node_modules/es-object-atoms/tsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "@ljharb/tsconfig", - "compilerOptions": { - "target": "es5", - }, -} diff --git a/node_modules/escape-html/LICENSE b/node_modules/escape-html/LICENSE deleted file mode 100644 index 2e70de9..0000000 --- a/node_modules/escape-html/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2012-2013 TJ Holowaychuk -Copyright (c) 2015 Andreas Lubbe -Copyright (c) 2015 Tiancheng "Timothy" Gu - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/escape-html/Readme.md b/node_modules/escape-html/Readme.md deleted file mode 100644 index 653d9ea..0000000 --- a/node_modules/escape-html/Readme.md +++ /dev/null @@ -1,43 +0,0 @@ - -# escape-html - - Escape string for use in HTML - -## Example - -```js -var escape = require('escape-html'); -var html = escape('foo & bar'); -// -> foo & bar -``` - -## Benchmark - -``` -$ npm run-script bench - -> escape-html@1.0.3 bench nodejs-escape-html -> node benchmark/index.js - - - http_parser@1.0 - node@0.10.33 - v8@3.14.5.9 - ares@1.9.0-DEV - uv@0.10.29 - zlib@1.2.3 - modules@11 - openssl@1.0.1j - - 1 test completed. - 2 tests completed. - 3 tests completed. - - no special characters x 19,435,271 ops/sec ±0.85% (187 runs sampled) - single special character x 6,132,421 ops/sec ±0.67% (194 runs sampled) - many special characters x 3,175,826 ops/sec ±0.65% (193 runs sampled) -``` - -## License - - MIT \ No newline at end of file diff --git a/node_modules/escape-html/index.js b/node_modules/escape-html/index.js deleted file mode 100644 index bf9e226..0000000 --- a/node_modules/escape-html/index.js +++ /dev/null @@ -1,78 +0,0 @@ -/*! - * escape-html - * Copyright(c) 2012-2013 TJ Holowaychuk - * Copyright(c) 2015 Andreas Lubbe - * Copyright(c) 2015 Tiancheng "Timothy" Gu - * MIT Licensed - */ - -'use strict'; - -/** - * Module variables. - * @private - */ - -var matchHtmlRegExp = /["'&<>]/; - -/** - * Module exports. - * @public - */ - -module.exports = escapeHtml; - -/** - * Escape special characters in the given string of html. - * - * @param {string} string The string to escape for inserting into HTML - * @return {string} - * @public - */ - -function escapeHtml(string) { - var str = '' + string; - var match = matchHtmlRegExp.exec(str); - - if (!match) { - return str; - } - - var escape; - var html = ''; - var index = 0; - var lastIndex = 0; - - for (index = match.index; index < str.length; index++) { - switch (str.charCodeAt(index)) { - case 34: // " - escape = '"'; - break; - case 38: // & - escape = '&'; - break; - case 39: // ' - escape = '''; - break; - case 60: // < - escape = '<'; - break; - case 62: // > - escape = '>'; - break; - default: - continue; - } - - if (lastIndex !== index) { - html += str.substring(lastIndex, index); - } - - lastIndex = index + 1; - html += escape; - } - - return lastIndex !== index - ? html + str.substring(lastIndex, index) - : html; -} diff --git a/node_modules/escape-html/package.json b/node_modules/escape-html/package.json deleted file mode 100644 index 57ec7bd..0000000 --- a/node_modules/escape-html/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "escape-html", - "description": "Escape string for use in HTML", - "version": "1.0.3", - "license": "MIT", - "keywords": [ - "escape", - "html", - "utility" - ], - "repository": "component/escape-html", - "devDependencies": { - "benchmark": "1.0.0", - "beautify-benchmark": "0.2.4" - }, - "files": [ - "LICENSE", - "Readme.md", - "index.js" - ], - "scripts": { - "bench": "node benchmark/index.js" - } -} diff --git a/node_modules/etag/HISTORY.md b/node_modules/etag/HISTORY.md deleted file mode 100644 index 222b293..0000000 --- a/node_modules/etag/HISTORY.md +++ /dev/null @@ -1,83 +0,0 @@ -1.8.1 / 2017-09-12 -================== - - * perf: replace regular expression with substring - -1.8.0 / 2017-02-18 -================== - - * Use SHA1 instead of MD5 for ETag hashing - - Improves performance for larger entities - - Works with FIPS 140-2 OpenSSL configuration - -1.7.0 / 2015-06-08 -================== - - * Always include entity length in ETags for hash length extensions - * Generate non-Stats ETags using MD5 only (no longer CRC32) - * Improve stat performance by removing hashing - * Remove base64 padding in ETags to shorten - * Use MD5 instead of MD4 in weak ETags over 1KB - -1.6.0 / 2015-05-10 -================== - - * Improve support for JXcore - * Remove requirement of `atime` in the stats object - * Support "fake" stats objects in environments without `fs` - -1.5.1 / 2014-11-19 -================== - - * deps: crc@3.2.1 - - Minor fixes - -1.5.0 / 2014-10-14 -================== - - * Improve string performance - * Slightly improve speed for weak ETags over 1KB - -1.4.0 / 2014-09-21 -================== - - * Support "fake" stats objects - * Support Node.js 0.6 - -1.3.1 / 2014-09-14 -================== - - * Use the (new and improved) `crc` for crc32 - -1.3.0 / 2014-08-29 -================== - - * Default strings to strong ETags - * Improve speed for weak ETags over 1KB - -1.2.1 / 2014-08-29 -================== - - * Use the (much faster) `buffer-crc32` for crc32 - -1.2.0 / 2014-08-24 -================== - - * Add support for file stat objects - -1.1.0 / 2014-08-24 -================== - - * Add fast-path for empty entity - * Add weak ETag generation - * Shrink size of generated ETags - -1.0.1 / 2014-08-24 -================== - - * Fix behavior of string containing Unicode - -1.0.0 / 2014-05-18 -================== - - * Initial release diff --git a/node_modules/etag/LICENSE b/node_modules/etag/LICENSE deleted file mode 100644 index cab251c..0000000 --- a/node_modules/etag/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2014-2016 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/etag/README.md b/node_modules/etag/README.md deleted file mode 100644 index 09c2169..0000000 --- a/node_modules/etag/README.md +++ /dev/null @@ -1,159 +0,0 @@ -# etag - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Create simple HTTP ETags - -This module generates HTTP ETags (as defined in RFC 7232) for use in -HTTP responses. - -## Installation - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install etag -``` - -## API - - - -```js -var etag = require('etag') -``` - -### etag(entity, [options]) - -Generate a strong ETag for the given entity. This should be the complete -body of the entity. Strings, `Buffer`s, and `fs.Stats` are accepted. By -default, a strong ETag is generated except for `fs.Stats`, which will -generate a weak ETag (this can be overwritten by `options.weak`). - - - -```js -res.setHeader('ETag', etag(body)) -``` - -#### Options - -`etag` accepts these properties in the options object. - -##### weak - -Specifies if the generated ETag will include the weak validator mark (that -is, the leading `W/`). The actual entity tag is the same. The default value -is `false`, unless the `entity` is `fs.Stats`, in which case it is `true`. - -## Testing - -```sh -$ npm test -``` - -## Benchmark - -```bash -$ npm run-script bench - -> etag@1.8.1 bench nodejs-etag -> node benchmark/index.js - - http_parser@2.7.0 - node@6.11.1 - v8@5.1.281.103 - uv@1.11.0 - zlib@1.2.11 - ares@1.10.1-DEV - icu@58.2 - modules@48 - openssl@1.0.2k - -> node benchmark/body0-100b.js - - 100B body - - 4 tests completed. - - buffer - strong x 258,647 ops/sec ±1.07% (180 runs sampled) - buffer - weak x 263,812 ops/sec ±0.61% (184 runs sampled) - string - strong x 259,955 ops/sec ±1.19% (185 runs sampled) - string - weak x 264,356 ops/sec ±1.09% (184 runs sampled) - -> node benchmark/body1-1kb.js - - 1KB body - - 4 tests completed. - - buffer - strong x 189,018 ops/sec ±1.12% (182 runs sampled) - buffer - weak x 190,586 ops/sec ±0.81% (186 runs sampled) - string - strong x 144,272 ops/sec ±0.96% (188 runs sampled) - string - weak x 145,380 ops/sec ±1.43% (187 runs sampled) - -> node benchmark/body2-5kb.js - - 5KB body - - 4 tests completed. - - buffer - strong x 92,435 ops/sec ±0.42% (188 runs sampled) - buffer - weak x 92,373 ops/sec ±0.58% (189 runs sampled) - string - strong x 48,850 ops/sec ±0.56% (186 runs sampled) - string - weak x 49,380 ops/sec ±0.56% (190 runs sampled) - -> node benchmark/body3-10kb.js - - 10KB body - - 4 tests completed. - - buffer - strong x 55,989 ops/sec ±0.93% (188 runs sampled) - buffer - weak x 56,148 ops/sec ±0.55% (190 runs sampled) - string - strong x 27,345 ops/sec ±0.43% (188 runs sampled) - string - weak x 27,496 ops/sec ±0.45% (190 runs sampled) - -> node benchmark/body4-100kb.js - - 100KB body - - 4 tests completed. - - buffer - strong x 7,083 ops/sec ±0.22% (190 runs sampled) - buffer - weak x 7,115 ops/sec ±0.26% (191 runs sampled) - string - strong x 3,068 ops/sec ±0.34% (190 runs sampled) - string - weak x 3,096 ops/sec ±0.35% (190 runs sampled) - -> node benchmark/stats.js - - stat - - 4 tests completed. - - real - strong x 871,642 ops/sec ±0.34% (189 runs sampled) - real - weak x 867,613 ops/sec ±0.39% (190 runs sampled) - fake - strong x 401,051 ops/sec ±0.40% (189 runs sampled) - fake - weak x 400,100 ops/sec ±0.47% (188 runs sampled) -``` - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/etag.svg -[npm-url]: https://npmjs.org/package/etag -[node-version-image]: https://img.shields.io/node/v/etag.svg -[node-version-url]: https://nodejs.org/en/download/ -[travis-image]: https://img.shields.io/travis/jshttp/etag/master.svg -[travis-url]: https://travis-ci.org/jshttp/etag -[coveralls-image]: https://img.shields.io/coveralls/jshttp/etag/master.svg -[coveralls-url]: https://coveralls.io/r/jshttp/etag?branch=master -[downloads-image]: https://img.shields.io/npm/dm/etag.svg -[downloads-url]: https://npmjs.org/package/etag diff --git a/node_modules/etag/index.js b/node_modules/etag/index.js deleted file mode 100644 index 2a585c9..0000000 --- a/node_modules/etag/index.js +++ /dev/null @@ -1,131 +0,0 @@ -/*! - * etag - * Copyright(c) 2014-2016 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module exports. - * @public - */ - -module.exports = etag - -/** - * Module dependencies. - * @private - */ - -var crypto = require('crypto') -var Stats = require('fs').Stats - -/** - * Module variables. - * @private - */ - -var toString = Object.prototype.toString - -/** - * Generate an entity tag. - * - * @param {Buffer|string} entity - * @return {string} - * @private - */ - -function entitytag (entity) { - if (entity.length === 0) { - // fast-path empty - return '"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk"' - } - - // compute hash of entity - var hash = crypto - .createHash('sha1') - .update(entity, 'utf8') - .digest('base64') - .substring(0, 27) - - // compute length of entity - var len = typeof entity === 'string' - ? Buffer.byteLength(entity, 'utf8') - : entity.length - - return '"' + len.toString(16) + '-' + hash + '"' -} - -/** - * Create a simple ETag. - * - * @param {string|Buffer|Stats} entity - * @param {object} [options] - * @param {boolean} [options.weak] - * @return {String} - * @public - */ - -function etag (entity, options) { - if (entity == null) { - throw new TypeError('argument entity is required') - } - - // support fs.Stats object - var isStats = isstats(entity) - var weak = options && typeof options.weak === 'boolean' - ? options.weak - : isStats - - // validate argument - if (!isStats && typeof entity !== 'string' && !Buffer.isBuffer(entity)) { - throw new TypeError('argument entity must be string, Buffer, or fs.Stats') - } - - // generate entity tag - var tag = isStats - ? stattag(entity) - : entitytag(entity) - - return weak - ? 'W/' + tag - : tag -} - -/** - * Determine if object is a Stats object. - * - * @param {object} obj - * @return {boolean} - * @api private - */ - -function isstats (obj) { - // genuine fs.Stats - if (typeof Stats === 'function' && obj instanceof Stats) { - return true - } - - // quack quack - return obj && typeof obj === 'object' && - 'ctime' in obj && toString.call(obj.ctime) === '[object Date]' && - 'mtime' in obj && toString.call(obj.mtime) === '[object Date]' && - 'ino' in obj && typeof obj.ino === 'number' && - 'size' in obj && typeof obj.size === 'number' -} - -/** - * Generate a tag for a stat. - * - * @param {object} stat - * @return {string} - * @private - */ - -function stattag (stat) { - var mtime = stat.mtime.getTime().toString(16) - var size = stat.size.toString(16) - - return '"' + size + '-' + mtime + '"' -} diff --git a/node_modules/etag/package.json b/node_modules/etag/package.json deleted file mode 100644 index b06ab80..0000000 --- a/node_modules/etag/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "etag", - "description": "Create simple HTTP ETags", - "version": "1.8.1", - "contributors": [ - "Douglas Christopher Wilson ", - "David Björklund " - ], - "license": "MIT", - "keywords": [ - "etag", - "http", - "res" - ], - "repository": "jshttp/etag", - "devDependencies": { - "beautify-benchmark": "0.2.4", - "benchmark": "2.1.4", - "eslint": "3.19.0", - "eslint-config-standard": "10.2.1", - "eslint-plugin-import": "2.7.0", - "eslint-plugin-markdown": "1.0.0-beta.6", - "eslint-plugin-node": "5.1.1", - "eslint-plugin-promise": "3.5.0", - "eslint-plugin-standard": "3.0.1", - "istanbul": "0.4.5", - "mocha": "1.21.5", - "safe-buffer": "5.1.1", - "seedrandom": "2.4.3" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "README.md", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "bench": "node benchmark/index.js", - "lint": "eslint --plugin markdown --ext js,md .", - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" - } -} diff --git a/node_modules/eventemitter2/LICENSE.txt b/node_modules/eventemitter2/LICENSE.txt deleted file mode 100644 index 3f021f5..0000000 --- a/node_modules/eventemitter2/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ - -The MIT License (MIT) - -Copyright (c) 2016 Paolo Fragomeni and Contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the 'Software'), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/eventemitter2/README.md b/node_modules/eventemitter2/README.md deleted file mode 100644 index a1a7222..0000000 --- a/node_modules/eventemitter2/README.md +++ /dev/null @@ -1,809 +0,0 @@ -[![Build Status](https://travis-ci.org/EventEmitter2/EventEmitter2.svg?branch=master)](https://travis-ci.org/EventEmitter2/EventEmitter2) -[![Coverage Status](https://coveralls.io/repos/github/EventEmitter2/EventEmitter2/badge.svg?branch=v6.4.3)](https://coveralls.io/github/EventEmitter2/EventEmitter2?branch=v6.4.3) -[![NPM version](https://badge.fury.io/js/eventemitter2.svg)](http://badge.fury.io/js/eventemitter2) -[![Dependency Status](https://img.shields.io/david/asyncly/eventemitter2.svg)](https://david-dm.org/asyncly/eventemitter2) -[![npm](https://img.shields.io/npm/dm/eventemitter2.svg?maxAge=2592000)]() - -# SYNOPSIS - -EventEmitter2 is an implementation of the EventEmitter module found in Node.js. -In addition to having a better benchmark performance than EventEmitter and being browser-compatible, -it also extends the interface of EventEmitter with many additional non-breaking features. - -If you like this project please show your support with a [GitHub :star:](https://github.com/EventEmitter2/EventEmitter2/stargazers)! - -# DESCRIPTION - -### FEATURES - - ES5 compatible UMD module, that supports node.js, browser and workers of any kind - - Namespaces/Wildcards - - [Any](#emitteronanylistener) listeners - - Times To Listen (TTL), extends the `once` concept with [`many`](#emittermanyevent--eventns-timestolisten-listener-options) - - [Async listeners](#emitteronevent-listener-options-objectboolean) (using setImmediate|setTimeout|nextTick) with promise|async function support - - The [emitAsync](#emitteremitasyncevent--eventns-arg1-arg2-) method to return the results of the listeners via Promise.all - - Subscription methods ([on](#emitteronevent-listener-options-objectboolean), [once](#emitterprependoncelistenerevent--eventns-listener-options), [many](#emittermanyevent--eventns-timestolisten-listener-options), ...) can return a - [listener](#listener) object that makes it easy to remove the subscription when needed - just call the listener.off() method. - - Feature-rich [waitFor](#emitterwaitforevent--eventns-options) method to wait for events using promises - - [listenTo](#listentotargetemitter-events-objectevent--eventns-function-options) & [stopListeningTo](#stoplisteningtotarget-object-event-event--eventns-boolean) methods - for listening to an external event emitter of any kind and propagate its events through itself using optional reducers/filters - - Extended version of the [events.once](#eventemitter2onceemitter-event--eventns-options) method from the [node events API](https://nodejs.org/api/events.html#events_events_once_emitter_name) - - Browser & Workers environment compatibility - - Demonstrates good performance in benchmarks - -``` -Platform: win32, x64, 15267MB -Node version: v13.11.0 -CPU: 4 x AMD Ryzen 3 2200U with Radeon Vega Mobile Gfx @ 2495MHz ----------------------------------------------------------------- -EventEmitterHeatUp x 2,897,056 ops/sec ±3.86% (67 runs sampled) -EventEmitter x 3,232,934 ops/sec ±3.50% (65 runs sampled) -EventEmitter2 x 12,261,042 ops/sec ±4.72% (59 runs sampled) -EventEmitter2 (wild) x 242,751 ops/sec ±5.15% (68 runs sampled) -EventEmitter2 (wild) using plain events x 358,916 ops/sec ±2.58% (78 runs sampled) -EventEmitter2 (wild) emitting ns x 1,837,323 ops/sec ±3.50% (72 runs sampled) -EventEmitter2 (wild) emitting a plain event x 2,743,707 ops/sec ±4.08% (65 runs sampled) -EventEmitter3 x 10,380,258 ops/sec ±3.93% (67 runs sampled) - -Fastest is EventEmitter2 -``` - -### What's new - -To find out what's new see the project [CHANGELOG](https://github.com/EventEmitter2/EventEmitter2/blob/master/CHANGELOG.md) - -### Differences (Non-breaking, compatible with existing EventEmitter) - - - The EventEmitter2 constructor takes an optional configuration object with the following default values: -```javascript -var EventEmitter2 = require('eventemitter2'); -var emitter = new EventEmitter2({ - - // set this to `true` to use wildcards - wildcard: false, - - // the delimiter used to segment namespaces - delimiter: '.', - - // set this to `true` if you want to emit the newListener event - newListener: false, - - // set this to `true` if you want to emit the removeListener event - removeListener: false, - - // the maximum amount of listeners that can be assigned to an event - maxListeners: 10, - - // show event name in memory leak message when more than maximum amount of listeners is assigned - verboseMemoryLeak: false, - - // disable throwing uncaughtException if an error event is emitted and it has no listeners - ignoreErrors: false -}); -``` - - - Getting the actual event that fired. - -```javascript -emitter.on('foo.*', function(value1, value2) { - console.log(this.event, value1, value2); -}); - -emitter.emit('foo.bar', 1, 2); // 'foo.bar' 1 2 -emitter.emit(['foo', 'bar'], 3, 4); // 'foo.bar' 3 4 - -emitter.emit(Symbol(), 5, 6); // Symbol() 5 6 -emitter.emit(['foo', Symbol()], 7, 8); // ['foo', Symbol()] 7 8 -``` -**Note**: Generally this.event is normalized to a string ('event', 'event.test'), -except the cases when event is a symbol or namespace contains a symbol. -In these cases this.event remains as is (symbol and array). - - - Fire an event N times and then remove it, an extension of the `once` concept. - -```javascript -emitter.many('foo', 4, function() { - console.log('hello'); -}); -``` - - - Pass in a namespaced event as an array rather than a delimited string. - -```javascript -emitter.many(['foo', 'bar', 'bazz'], 4, function() { - console.log('hello'); -}); -``` - -# Installing - -```console -$ npm install eventemitter2 -``` - -Or you can use unpkg.com CDN to import this [module](https://unpkg.com/eventemitter2) as a script directly from the browser - -# API - -### Types definition -- `Event`: string | symbol -- `EventNS`: string | Event [] - -## Class EventEmitter2 - -### instance: -- [emit(event: event | eventNS, ...values: any[]): boolean](#emitteremitevent--eventns-arg1-arg2-); - -- [emitAsync(event: event | eventNS, ...values: any[]): Promise](#emitteremitasyncevent--eventns-arg1-arg2-) - -- [addListener(event: event | eventNS, listener: ListenerFn, boolean|options?: object): this|Listener](#emitteraddlistenerevent-listener-options-objectboolean) - -- [on(event: event | eventNS, listener: ListenerFn, boolean|options?: object): this|Listener](#emitteraddlistenerevent-listener-options-objectboolean) - -- [once(event: event | eventNS, listener: ListenerFn, boolean|options?: object): this|Listener](#emitteronceevent--eventns-listener-options) - -- [many(event: event | eventNS, timesToListen: number, listener: ListenerFn, boolean|options?: object): this|Listener](#emittermanyevent--eventns-timestolisten-listener-options) - -- [prependMany(event: event | eventNS, timesToListen: number, listener: ListenerFn, boolean|options?: object): this|Listener](#emitterprependanylistener) - -- [prependOnceListener(event: event | eventNS, listener: ListenerFn, boolean|options?: object): this|Listener](#emitterprependoncelistenerevent--eventns-listener-options) - -- [prependListener(event: event | eventNS, listener: ListenerFn, boolean|options?: object): this|Listener](#emitterprependlistenerevent-listener-options) - -- [prependAny(listener: EventAndListener): this](#emitterprependanylistener) - -- [onAny(listener: EventAndListener): this](#emitteronanylistener) - -- [offAny(listener: ListenerFn): this](#emitteroffanylistener) - -- [removeListener(event: event | eventNS, listener: ListenerFn): this](#emitterremovelistenerevent--eventns-listener) - -- [off(event: event | eventNS, listener: ListenerFn): this](#emitteroffevent--eventns-listener) - -- [removeAllListeners(event?: event | eventNS): this](#emitterremovealllistenersevent--eventns) - -- [setMaxListeners(n: number): void](#emittersetmaxlistenersn) - -- [getMaxListeners(): number](#emittergetmaxlisteners) - -- [eventNames(nsAsArray?: boolean): string[]](#emittereventnamesnsasarray) - -- [listeners(event: event | eventNS): ListenerFn[]](#emitterlistenersevent--eventns) - -- [listenersAny(): ListenerFn[]](#emitterlistenersany) - -- [hasListeners(event?: event | eventNS): Boolean](#haslistenersevent--eventnsstringboolean) - -- [waitFor(event: event | eventNS, timeout?: number): CancelablePromise](#emitterwaitforevent--eventns-timeout) - -- [waitFor(event: event | eventNS, filter?: WaitForFilter): CancelablePromise](#emitterwaitforevent--eventns-filter) - -- [waitFor(event: event | eventNS, options?: WaitForOptions): CancelablePromise](#emitterwaitforevent--eventns-options) - -- [listenTo(target: GeneralEventEmitter, event: event | eventNS, options?: ListenToOptions): this](#listentotargetemitter-events-objectevent--eventns-function-options) - -- [listenTo(target: GeneralEventEmitter, events: (event | eventNS)[], options?: ListenToOptions): this](#listentotargetemitter-events-event--eventns-options) - -- [listenTo(target: GeneralEventEmitter, events: Object, options?: ListenToOptions): this](#listentotargetemitter-events-objectevent--eventns-function-options) - -- [stopListeningTo(target?: GeneralEventEmitter, event?: event | eventNS): Boolean](#stoplisteningtarget-object-event-event--eventns-boolean) - -### static: - -- [static once(emitter: EventEmitter2, event: string | symbol, options?: OnceOptions): CancelablePromise](#eventemitter2onceemitter-event--eventns-options) - -- [static defaultMaxListeners: number](#eventemitter2defaultmaxlisteners) - -The `event` argument specified in the API declaration can be a string or symbol for a simple event emitter -and a string|symbol|Array(string|symbol) in a case of a wildcard emitter; - -When an `EventEmitter` instance experiences an error, the typical action is -to emit an `error` event. Error events are treated as a special case. -If there is no listener for it, then the default action is to print a stack -trace and exit the program. - -All EventEmitters emit the event `newListener` when new listeners are -added. EventEmitters also emit the event `removeListener` when listeners are -removed, and `removeListenerAny` when listeners added through `onAny` are -removed. - - -**Namespaces** with **Wildcards** -To use namespaces/wildcards, pass the `wildcard` option into the EventEmitter -constructor. When namespaces/wildcards are enabled, events can either be -strings (`foo.bar`) separated by a delimiter or arrays (`['foo', 'bar']`). The -delimiter is also configurable as a constructor option. - -An event name passed to any event emitter method can contain a wild card (the -`*` character). If the event name is a string, a wildcard may appear as `foo.*`. -If the event name is an array, the wildcard may appear as `['foo', '*']`. - -If either of the above described events were passed to the `on` method, -subsequent emits such as the following would be observed... - -```javascript -emitter.emit(Symbol()); -emitter.emit('foo'); -emitter.emit('foo.bazz'); -emitter.emit(['foo', 'bar']); -emitter.emit(['foo', Symbol()]); -``` - -**NOTE:** An event name may use more than one wildcard. For example, -`foo.*.bar.*` is a valid event name, and would match events such as -`foo.x.bar.y`, or `['foo', 'bazz', 'bar', 'test']` - -# Multi-level Wildcards -A double wildcard (the string `**`) matches any number of levels (zero or more) of events. So if for example `'foo.**'` is passed to the `on` method, the following events would be observed: - -````javascript -emitter.emit('foo'); -emitter.emit('foo.bar'); -emitter.emit('foo.bar.baz'); -emitter.emit(['foo', Symbol(), 'baz']); -```` - -On the other hand, if the single-wildcard event name was passed to the on method, the callback would only observe the second of these events. - - -### emitter.addListener(event, listener, options?: object|boolean) -### emitter.on(event, listener, options?: object|boolean) - -Adds a listener to the end of the listeners array for the specified event. - -```javascript -emitter.on('data', function(value1, value2, value3, ...) { - console.log('The event was raised!'); -}); -``` -```javascript -emitter.on('data', function(value) { - console.log('The event was raised!'); -}); -``` - -**Options:** - -- `async:boolean= false`- invoke the listener in async mode using setImmediate (fallback to setTimeout if not available) -or process.nextTick depending on the `nextTick` option. - -- `nextTick:boolean= false`- use process.nextTick instead of setImmediate to invoke the listener asynchronously. - -- `promisify:boolean= false`- additionally wraps the listener to a Promise for later invocation using `emitAsync` method. -This option will be activated by default if its value is `undefined` -and the listener function is an `asynchronous function` (whose constructor name is `AsyncFunction`). - -- `objectify:boolean= false`- activates returning a [listener](#listener) object instead of 'this' by the subscription method. - -#### listener -The listener object has the following properties: -- `emitter: EventEmitter2` - reference to the event emitter instance -- `event: event|eventNS` - subscription event -- `listener: Function` - reference to the listener -- `off(): Function`- removes the listener (voids the subscription) - -````javascript -var listener= emitter.on('event', function(){ - console.log('hello!'); -}, {objectify: true}); - -emitter.emit('event'); - -listener.off(); -```` - -**Note:** If the options argument is `true` it will be considered as `{promisify: true}` - -**Note:** If the options argument is `false` it will be considered as `{async: true}` - -```javascript -var EventEmitter2= require('eventemitter2'); -var emitter= new EventEmitter2(); - -emitter.on('event', function(){ - console.log('The event was raised!'); -}, {async: true}); - -emitter.emit('event'); -console.log('emitted'); -``` -Since the `async` option was set the output from the code above is as follows: -```` -emitted -The event was raised! -```` - -If the listener is an async function or function which returns a promise, use the `promisify` option as follows: - -```javascript -var EventEmitter2= require('eventemitter2'); -var emitter= new EventEmitter2(); - -emitter.on('event', function(){ - console.log('The event was raised!'); - return new Promise(function(resolve){ - console.log('listener resolved'); - setTimeout(resolve, 1000); - }); -}, {promisify: true}); - -emitter.emitAsync('event').then(function(){ - console.log('all listeners were resolved!'); -}); - -console.log('emitted'); -```` -Output: -```` -emitted -The event was raised! -listener resolved -all listeners were resolved! -```` -If the `promisify` option is false (default value) the output of the same code is as follows: -```` -The event was raised! -listener resolved -emitted -all listeners were resolved! -```` - - -### emitter.prependListener(event, listener, options?) - -Adds a listener to the beginning of the listeners array for the specified event. - -```javascript -emitter.prependListener('data', function(value1, value2, value3, ...) { - console.log('The event was raised!'); -}); -``` - -**options:** - -`options?`: See the [addListener options](#emitteronevent-listener-options-objectboolean) - -### emitter.onAny(listener) - -Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the callback. - -```javascript -emitter.onAny(function(event, value) { - console.log('All events trigger this.'); -}); -``` - -### emitter.prependAny(listener) - -Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the callback. The listener is added to the beginning of the listeners array - -```javascript -emitter.prependAny(function(event, value) { - console.log('All events trigger this.'); -}); -``` - -### emitter.offAny(listener) - -Removes the listener that will be fired when any event is emitted. - -```javascript -emitter.offAny(function(value) { - console.log('The event was raised!'); -}); -``` - -#### emitter.once(event | eventNS, listener, options?) - -Adds a **one time** listener for the event. The listener is invoked -only the first time the event is fired, after which it is removed. - -```javascript -emitter.once('get', function (value) { - console.log('Ah, we have our first value!'); -}); -``` - -**options:** - -`options?`: See the [addListener options](#emitteronevent-listener-options-objectboolean) - -#### emitter.prependOnceListener(event | eventNS, listener, options?) - -Adds a **one time** listener for the event. The listener is invoked -only the first time the event is fired, after which it is removed. -The listener is added to the beginning of the listeners array - -```javascript -emitter.prependOnceListener('get', function (value) { - console.log('Ah, we have our first value!'); -}); -``` - -**options:** - -`options?`: See the [addListener options](#emitteronevent-listener-options-objectboolean) - -### emitter.many(event | eventNS, timesToListen, listener, options?) - -Adds a listener that will execute **n times** for the event before being -removed. The listener is invoked only the first **n times** the event is -fired, after which it is removed. - -```javascript -emitter.many('get', 4, function (value) { - console.log('This event will be listened to exactly four times.'); -}); -``` - -**options:** - -`options?`: See the [addListener options](#emitteronevent-listener-options-objectboolean) - -### emitter.prependMany(event | eventNS, timesToListen, listener, options?) - -Adds a listener that will execute **n times** for the event before being -removed. The listener is invoked only the first **n times** the event is -fired, after which it is removed. -The listener is added to the beginning of the listeners array. - -```javascript -emitter.many('get', 4, function (value) { - console.log('This event will be listened to exactly four times.'); -}); -``` - -**options:** - -`options?`: See the [addListener options](#emitteronevent-listener-options-objectboolean) - -### emitter.removeListener(event | eventNS, listener) -### emitter.off(event | eventNS, listener) - -Remove a listener from the listener array for the specified event. -**Caution**: Calling this method changes the array indices in the listener array behind the listener. - -```javascript -var callback = function(value) { - console.log('someone connected!'); -}; -emitter.on('get', callback); -// ... -emitter.removeListener('get', callback); -``` - - -### emitter.removeAllListeners([event | eventNS]) - -Removes all listeners, or those of the specified event. - - -### emitter.setMaxListeners(n) - -By default EventEmitters will print a warning if more than 10 listeners -are added to it. This is a useful default which helps finding memory leaks. -Obviously not all Emitters should be limited to 10. This function allows -that to be increased. Set to zero for unlimited. - - -### emitter.getMaxListeners() - -Returns the current max listener value for the EventEmitter which is either set by emitter.setMaxListeners(n) or defaults to EventEmitter2.defaultMaxListeners - - -### emitter.listeners(event | eventNS) - -Returns an array of listeners for the specified event. This array can be -manipulated, e.g. to remove listeners. - -```javascript -emitter.on('get', function(value) { - console.log('someone connected!'); -}); -console.log(emitter.listeners('get')); // [ [Function] ] -``` - -### emitter.listenersAny() - -Returns an array of listeners that are listening for any event that is -specified. This array can be manipulated, e.g. to remove listeners. - -```javascript -emitter.onAny(function(value) { - console.log('someone connected!'); -}); -console.log(emitter.listenersAny()[0]); // [ [Function] ] -``` - -### emitter.emit(event | eventNS, [arg1], [arg2], [...]) -Execute each of the listeners that may be listening for the specified event -name in order with the list of arguments. - -### emitter.emitAsync(event | eventNS, [arg1], [arg2], [...]) - -Return the results of the listeners via [Promise.all](https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Promise/all). -Only this method doesn't work [IE](http://caniuse.com/#search=promise). - -```javascript -emitter.on('get',function(i) { - return new Promise(function(resolve){ - setTimeout(function(){ - resolve(i+3); - },50); - }); -}); -emitter.on('get',function(i) { - return new Promise(function(resolve){ - resolve(i+2) - }); -}); -emitter.on('get',function(i) { - return Promise.resolve(i+1); -}); -emitter.on('get',function(i) { - return i+0; -}); -emitter.on('get',function(i) { - // noop -}); - -emitter.emitAsync('get',0) -.then(function(results){ - console.log(results); // [3,2,1,0,undefined] -}); -``` - -### emitter.waitFor(event | eventNS, [options]) -### emitter.waitFor(event | eventNS, [timeout]) -### emitter.waitFor(event | eventNS, [filter]) - -Returns a thenable object (promise interface) that resolves when a specific event occurs - -````javascript -emitter.waitFor('event').then(function (data) { - console.log(data); // ['bar'] -}); - -emitter.emit('event', 'bar'); -```` - -````javascript -emitter.waitFor('event', { - // handle first event data argument as an error (err, ...data) - handleError: false, - // the timeout for resolving the promise before it is rejected with an error (Error: timeout). - timeout: 0, - //filter function to determine acceptable values for resolving the promise. - filter: function(arg0, arg1){ - return arg0==='foo' && arg1==='bar' - }, - Promise: Promise, // Promise constructor to use, - overload: false // overload cancellation api in a case of external Promise class -}).then(function(data){ - console.log(data); // ['foo', 'bar'] -}); - -emitter.emit('event', 'foo', 'bar') -```` - -````javascript -var promise= emitter.waitFor('event'); - -promise.then(null, function(error){ - console.log(error); //Error: canceled -}); - -promise.cancel(); //stop listening the event and reject the promise -```` - -````javascript -emitter.waitFor('event', { - handleError: true -}).then(null, function(error){ - console.log(error); //Error: custom error -}); - -emitter.emit('event', new Error('custom error')); // reject the promise -```` -### emitter.eventNames(nsAsArray) - -Returns an array listing the events for which the emitter has registered listeners. -```javascript -var emitter= new EventEmitter2(); -emitter.on('foo', () => {}); -emitter.on('bar', () => {}); -emitter.on(Symbol('test'), () => {}); -emitter.on(['foo', Symbol('test2')], () => {}); - -console.log(emitter.eventNames()); -// Prints: [ 'bar', 'foo', [ 'foo', Symbol(test2) ], [ 'foo', Symbol(test2) ] ] -``` -**Note**: Listeners order not guaranteed -### listenTo(targetEmitter, events: event | eventNS, options?) - -### listenTo(targetEmitter, events: (event | eventNS)[], options?) - -### listenTo(targetEmitter, events: Object, options?) - -Listens to the events emitted by an external emitter and propagate them through itself. -The target object could be of any type that implements methods for subscribing and unsubscribing to its events. -By default this method attempts to use `addListener`/`removeListener`, `on`/`off` and `addEventListener`/`removeEventListener` pairs, -but you able to define own hooks `on(event, handler)` and `off(event, handler)` in the options object to use -custom subscription API. In these hooks `this` refers to the target object. - -The options object has the following interface: -- `on(event, handler): void` -- `off(event, handler): void` -- `reducer: (Function) | (Object): Boolean` - -In case you selected the `newListener` and `removeListener` options when creating the emitter, -the subscription to the events of the target object will be conditional, -depending on whether there are listeners in the emitter that could listen them. - -````javascript -var EventEmitter2 = require('EventEmitter2'); -var http = require('http'); - -var server = http.createServer(function(request, response){ - console.log(request.url); - response.end('Hello Node.js Server!') -}).listen(3000); - -server.on('connection', function(req, socket, head){ - console.log('connect'); -}); - -// activate the ability to attach listeners on demand -var emitter= new EventEmitter2({ - newListener: true, - removeListener: true -}); - -emitter.listenTo(server, { - 'connection': 'localConnection', - 'close': 'close' -}, { - reducers: { - connection: function(event){ - console.log('event name:' + event.name); //'localConnection' - console.log('original event name:' + event.original); //'connection' - return event.data[0].remoteAddress==='::1'; - } - } -}); - -emitter.on('localConnection', function(socket){ - console.log('local connection', socket.remoteAddress); -}); - -setTimeout(function(){ - emitter.stopListeningTo(server); -}, 30000); -```` -An example of using a wildcard emitter in a browser: -````javascript -const ee= new EventEmitter2({ - wildcard: true -}); - -ee.listenTo(document.querySelector('#test'), { - 'click': 'div.click', - 'mouseup': 'div.mouseup', - 'mousedown': 'div.mousedown' -}); - -ee.on('div.*', function(evt){ - console.log('listenTo: '+ evt.type); -}); - -setTimeout(function(){ - ee.stopListeningTo(document.querySelector('#test')); -}, 30000); -```` - -### stopListeningTo(target?: Object, event: event | eventNS): Boolean - -Stops listening the targets. Returns true if some listener was removed. - -### hasListeners(event | eventNS?:String):Boolean - -Checks whether emitter has any listeners. - -### emitter.listeners(event | eventNS) - -Returns the array of listeners for the event named eventName. -In wildcard mode this method returns namespaces as strings: -````javascript -var emitter= new EventEmitter2({ - wildcard: true -}); -emitter.on('a.b.c', function(){}); -emitter.on(['z', 'x', 'c'], function(){}); -console.log(emitter.eventNames()) // [ 'z.x.c', 'a.b.c' ] -```` -If some namespace contains a Symbol member or the `nsAsArray` option is set the method will return namespace as an array of its members; -````javascript -var emitter= new EventEmitter2({ - wildcard: true -}); -emitter.on('a.b.c', function(){}); -emitter.on(['z', 'x', Symbol()], function(){}); -console.log(emitter.eventNames()) // [ [ 'z', 'x', Symbol() ], 'a.b.c' ] -```` - -### EventEmitter2.once(emitter, event | eventNS, [options]) -Creates a cancellable Promise that is fulfilled when the EventEmitter emits the given event or that is rejected -when the EventEmitter emits 'error'. -The Promise will resolve with an array of all the arguments emitted to the given event. -This method is intentionally generic and works with the web platform EventTarget interface, -which has no special 'error' event semantics and does not listen to the 'error' event. - -Basic example: -````javascript -var emitter= new EventEmitter2(); - -EventEmitter2.once(emitter, 'event', { - timeout: 0, - Promise: Promise, // a custom Promise constructor - overload: false // overload promise cancellation api if exists with library implementation -}).then(function(data){ - console.log(data); // [1, 2, 3] -}); - -emitter.emit('event', 1, 2, 3); -```` -With timeout option: -````javascript -EventEmitter2.once(emitter, 'event', { - timeout: 1000 -}).then(null, function(err){ - console.log(err); // Error: timeout -}); -```` -The library promise cancellation API: -````javascript -promise= EventEmitter2.once(emitter, 'event'); -// notice: the cancel method exists only in the first promise chain -promise.then(null, function(err){ - console.log(err); // Error: canceled -}); - -promise.cancel(); -```` -Using the custom Promise class (**[bluebird.js](https://www.npmjs.com/package/bluebird)**): -````javascript -var BBPromise = require("bluebird"); - -EventEmitter2.once(emitter, 'event', { - Promise: BBPromise -}).then(function(data){ - console.log(data); // [4, 5, 6] -}); - -emitter.emit('event', 4, 5, 6); -```` - -````javascript -var BBPromise = require("bluebird"); - -BBPromise.config({ - // if false or options.overload enabled, the library cancellation API will be used - cancellation: true -}); - -var promise= EventEmitter2.once(emitter, 'event', { - Promise: BBPromise, - overload: false // use bluebird cancellation API -}).then(function(data){ - // notice: never executed due to BlueBird cancellation logic -}, function(err){ - // notice: never executed due to BlueBird cancellation logic -}); - -promise.cancel(); - -emitter.emit('event', 'never handled'); -```` - -### EventEmitter2.defaultMaxListeners - -Sets default max listeners count globally for all instances, including those created before the change is made. diff --git a/node_modules/eventemitter2/eventemitter2.d.ts b/node_modules/eventemitter2/eventemitter2.d.ts deleted file mode 100644 index 230825b..0000000 --- a/node_modules/eventemitter2/eventemitter2.d.ts +++ /dev/null @@ -1,156 +0,0 @@ -export type event = (symbol|string); -export type eventNS = string|event[]; - -export interface ConstructorOptions { - /** - * @default false - * @description set this to `true` to use wildcards. - */ - wildcard?: boolean, - /** - * @default '.' - * @description the delimiter used to segment namespaces. - */ - delimiter?: string, - /** - * @default false - * @description set this to `true` if you want to emit the newListener events. - */ - newListener?: boolean, - /** - * @default false - * @description set this to `true` if you want to emit the removeListener events. - */ - removeListener?: boolean, - /** - * @default 10 - * @description the maximum amount of listeners that can be assigned to an event. - */ - maxListeners?: number - /** - * @default false - * @description show event name in memory leak message when more than maximum amount of listeners is assigned, default false - */ - verboseMemoryLeak?: boolean - /** - * @default false - * @description disable throwing uncaughtException if an error event is emitted and it has no listeners - */ - ignoreErrors?: boolean -} -export interface ListenerFn { - (...values: any[]): void; -} -export interface EventAndListener { - (event: string | string[], ...values: any[]): void; -} - -export interface WaitForFilter { (...values: any[]): boolean } - -export interface WaitForOptions { - /** - * @default 0 - */ - timeout: number, - /** - * @default null - */ - filter: WaitForFilter, - /** - * @default false - */ - handleError: boolean, - /** - * @default Promise - */ - Promise: Function, - /** - * @default false - */ - overload: boolean -} - -export interface CancelablePromise extends Promise{ - cancel(reason: string): undefined -} - -export interface OnceOptions { - /** - * @default 0 - */ - timeout: number, - /** - * @default Promise - */ - Promise: Function, - /** - * @default false - */ - overload: boolean -} - -export interface ListenToOptions { - on?: { (event: event | eventNS, handler: ListenerFn): void }, - off?: { (event: event | eventNS, handler: ListenerFn): void }, - reducers: Function | Object -} - -export interface GeneralEventEmitter{ - addEventListener(event: event, handler: ListenerFn): this, - removeEventListener(event: event, handler: ListenerFn): this, - addListener?(event: event, handler: ListenerFn): this, - removeListener?(event: event, handler: ListenerFn): this, - on?(event: event, handler: ListenerFn): this, - off?(event: event, handler: ListenerFn): this -} - -export interface OnOptions { - async?: boolean, - promisify?: boolean, - nextTick?: boolean, - objectify?: boolean -} - -export interface Listener { - emitter: EventEmitter2; - event: event|eventNS; - listener: ListenerFn; - off(): this; -} - -export declare class EventEmitter2 { - constructor(options?: ConstructorOptions) - emit(event: event | eventNS, ...values: any[]): boolean; - emitAsync(event: event | eventNS, ...values: any[]): Promise; - addListener(event: event | eventNS, listener: ListenerFn): this|Listener; - on(event: event | eventNS, listener: ListenerFn, options?: boolean|OnOptions): this|Listener; - prependListener(event: event | eventNS, listener: ListenerFn, options?: boolean|OnOptions): this|Listener; - once(event: event | eventNS, listener: ListenerFn, options?: true|OnOptions): this|Listener; - prependOnceListener(event: event | eventNS, listener: ListenerFn, options?: boolean|OnOptions): this|Listener; - many(event: event | eventNS, timesToListen: number, listener: ListenerFn, options?: boolean|OnOptions): this|Listener; - prependMany(event: event | eventNS, timesToListen: number, listener: ListenerFn, options?: boolean|OnOptions): this|Listener; - onAny(listener: EventAndListener): this; - prependAny(listener: EventAndListener): this; - offAny(listener: ListenerFn): this; - removeListener(event: event | eventNS, listener: ListenerFn): this; - off(event: event | eventNS, listener: ListenerFn): this; - removeAllListeners(event?: event | eventNS): this; - setMaxListeners(n: number): void; - getMaxListeners(): number; - eventNames(nsAsArray?: boolean): (event|eventNS)[]; - listenerCount(event?: event | eventNS): number - listeners(event?: event | eventNS): ListenerFn[] - listenersAny(): ListenerFn[] - waitFor(event: event | eventNS, timeout?: number): CancelablePromise - waitFor(event: event | eventNS, filter?: WaitForFilter): CancelablePromise - waitFor(event: event | eventNS, options?: WaitForOptions): CancelablePromise - listenTo(target: GeneralEventEmitter, events: event | eventNS, options?: ListenToOptions): this; - listenTo(target: GeneralEventEmitter, events: event[], options?: ListenToOptions): this; - listenTo(target: GeneralEventEmitter, events: Object, options?: ListenToOptions): this; - stopListeningTo(target?: GeneralEventEmitter, event?: event | eventNS): Boolean; - hasListeners(event?: String): Boolean - static once(emitter: EventEmitter2, event: event | eventNS, options?: OnceOptions): CancelablePromise; - static defaultMaxListeners: number; -} - -export default EventEmitter2; diff --git a/node_modules/eventemitter2/index.js b/node_modules/eventemitter2/index.js deleted file mode 100644 index 6f583b5..0000000 --- a/node_modules/eventemitter2/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/eventemitter2'); diff --git a/node_modules/eventemitter2/lib/eventemitter2.js b/node_modules/eventemitter2/lib/eventemitter2.js deleted file mode 100644 index 7c2e550..0000000 --- a/node_modules/eventemitter2/lib/eventemitter2.js +++ /dev/null @@ -1,1629 +0,0 @@ -/*! - * EventEmitter2 - * https://github.com/hij1nx/EventEmitter2 - * - * Copyright (c) 2013 hij1nx - * Licensed under the MIT license. - */ -;!function(undefined) { - var hasOwnProperty= Object.hasOwnProperty; - var isArray = Array.isArray ? Array.isArray : function _isArray(obj) { - return Object.prototype.toString.call(obj) === "[object Array]"; - }; - var defaultMaxListeners = 10; - var nextTickSupported= typeof process=='object' && typeof process.nextTick=='function'; - var symbolsSupported= typeof Symbol==='function'; - var reflectSupported= typeof Reflect === 'object'; - var setImmediateSupported= typeof setImmediate === 'function'; - var _setImmediate= setImmediateSupported ? setImmediate : setTimeout; - var ownKeys= symbolsSupported? (reflectSupported && typeof Reflect.ownKeys==='function'? Reflect.ownKeys : function(obj){ - var arr= Object.getOwnPropertyNames(obj); - arr.push.apply(arr, Object.getOwnPropertySymbols(obj)); - return arr; - }) : Object.keys; - - function init() { - this._events = {}; - if (this._conf) { - configure.call(this, this._conf); - } - } - - function configure(conf) { - if (conf) { - this._conf = conf; - - conf.delimiter && (this.delimiter = conf.delimiter); - - if(conf.maxListeners!==undefined){ - this._maxListeners= conf.maxListeners; - } - - conf.wildcard && (this.wildcard = conf.wildcard); - conf.newListener && (this._newListener = conf.newListener); - conf.removeListener && (this._removeListener = conf.removeListener); - conf.verboseMemoryLeak && (this.verboseMemoryLeak = conf.verboseMemoryLeak); - conf.ignoreErrors && (this.ignoreErrors = conf.ignoreErrors); - - if (this.wildcard) { - this.listenerTree = {}; - } - } - } - - function logPossibleMemoryLeak(count, eventName) { - var errorMsg = '(node) warning: possible EventEmitter memory ' + - 'leak detected. ' + count + ' listeners added. ' + - 'Use emitter.setMaxListeners() to increase limit.'; - - if(this.verboseMemoryLeak){ - errorMsg += ' Event name: ' + eventName + '.'; - } - - if(typeof process !== 'undefined' && process.emitWarning){ - var e = new Error(errorMsg); - e.name = 'MaxListenersExceededWarning'; - e.emitter = this; - e.count = count; - process.emitWarning(e); - } else { - console.error(errorMsg); - - if (console.trace){ - console.trace(); - } - } - } - - var toArray = function (a, b, c) { - var n = arguments.length; - switch (n) { - case 0: - return []; - case 1: - return [a]; - case 2: - return [a, b]; - case 3: - return [a, b, c]; - default: - var arr = new Array(n); - while (n--) { - arr[n] = arguments[n]; - } - return arr; - } - }; - - function toObject(keys, values) { - var obj = {}; - var key; - var len = keys.length; - var valuesCount = values ? values.length : 0; - for (var i = 0; i < len; i++) { - key = keys[i]; - obj[key] = i < valuesCount ? values[i] : undefined; - } - return obj; - } - - function TargetObserver(emitter, target, options) { - this._emitter = emitter; - this._target = target; - this._listeners = {}; - this._listenersCount = 0; - - var on, off; - - if (options.on || options.off) { - on = options.on; - off = options.off; - } - - if (target.addEventListener) { - on = target.addEventListener; - off = target.removeEventListener; - } else if (target.addListener) { - on = target.addListener; - off = target.removeListener; - } else if (target.on) { - on = target.on; - off = target.off; - } - - if (!on && !off) { - throw Error('target does not implement any known event API'); - } - - if (typeof on !== 'function') { - throw TypeError('on method must be a function'); - } - - if (typeof off !== 'function') { - throw TypeError('off method must be a function'); - } - - this._on = on; - this._off = off; - - var _observers= emitter._observers; - if(_observers){ - _observers.push(this); - }else{ - emitter._observers= [this]; - } - } - - Object.assign(TargetObserver.prototype, { - subscribe: function(event, localEvent, reducer){ - var observer= this; - var target= this._target; - var emitter= this._emitter; - var listeners= this._listeners; - var handler= function(){ - var args= toArray.apply(null, arguments); - var eventObj= { - data: args, - name: localEvent, - original: event - }; - if(reducer){ - var result= reducer.call(target, eventObj); - if(result!==false){ - emitter.emit.apply(emitter, [eventObj.name].concat(args)) - } - return; - } - emitter.emit.apply(emitter, [localEvent].concat(args)); - }; - - - if(listeners[event]){ - throw Error('Event \'' + event + '\' is already listening'); - } - - this._listenersCount++; - - if(emitter._newListener && emitter._removeListener && !observer._onNewListener){ - - this._onNewListener = function (_event) { - if (_event === localEvent && listeners[event] === null) { - listeners[event] = handler; - observer._on.call(target, event, handler); - } - }; - - emitter.on('newListener', this._onNewListener); - - this._onRemoveListener= function(_event){ - if(_event === localEvent && !emitter.hasListeners(_event) && listeners[event]){ - listeners[event]= null; - observer._off.call(target, event, handler); - } - }; - - listeners[event]= null; - - emitter.on('removeListener', this._onRemoveListener); - }else{ - listeners[event]= handler; - observer._on.call(target, event, handler); - } - }, - - unsubscribe: function(event){ - var observer= this; - var listeners= this._listeners; - var emitter= this._emitter; - var handler; - var events; - var off= this._off; - var target= this._target; - var i; - - if(event && typeof event!=='string'){ - throw TypeError('event must be a string'); - } - - function clearRefs(){ - if(observer._onNewListener){ - emitter.off('newListener', observer._onNewListener); - emitter.off('removeListener', observer._onRemoveListener); - observer._onNewListener= null; - observer._onRemoveListener= null; - } - var index= findTargetIndex.call(emitter, observer); - emitter._observers.splice(index, 1); - } - - if(event){ - handler= listeners[event]; - if(!handler) return; - off.call(target, event, handler); - delete listeners[event]; - if(!--this._listenersCount){ - clearRefs(); - } - }else{ - events= ownKeys(listeners); - i= events.length; - while(i-->0){ - event= events[i]; - off.call(target, event, listeners[event]); - } - this._listeners= {}; - this._listenersCount= 0; - clearRefs(); - } - } - }); - - function resolveOptions(options, schema, reducers, allowUnknown) { - var computedOptions = Object.assign({}, schema); - - if (!options) return computedOptions; - - if (typeof options !== 'object') { - throw TypeError('options must be an object') - } - - var keys = Object.keys(options); - var length = keys.length; - var option, value; - var reducer; - - function reject(reason) { - throw Error('Invalid "' + option + '" option value' + (reason ? '. Reason: ' + reason : '')) - } - - for (var i = 0; i < length; i++) { - option = keys[i]; - if (!allowUnknown && !hasOwnProperty.call(schema, option)) { - throw Error('Unknown "' + option + '" option'); - } - value = options[option]; - if (value !== undefined) { - reducer = reducers[option]; - computedOptions[option] = reducer ? reducer(value, reject) : value; - } - } - return computedOptions; - } - - function constructorReducer(value, reject) { - if (typeof value !== 'function' || !value.hasOwnProperty('prototype')) { - reject('value must be a constructor'); - } - return value; - } - - function makeTypeReducer(types) { - var message= 'value must be type of ' + types.join('|'); - var len= types.length; - var firstType= types[0]; - var secondType= types[1]; - - if (len === 1) { - return function (v, reject) { - if (typeof v === firstType) { - return v; - } - reject(message); - } - } - - if (len === 2) { - return function (v, reject) { - var kind= typeof v; - if (kind === firstType || kind === secondType) return v; - reject(message); - } - } - - return function (v, reject) { - var kind = typeof v; - var i = len; - while (i-- > 0) { - if (kind === types[i]) return v; - } - reject(message); - } - } - - var functionReducer= makeTypeReducer(['function']); - - var objectFunctionReducer= makeTypeReducer(['object', 'function']); - - function makeCancelablePromise(Promise, executor, options) { - var isCancelable; - var callbacks; - var timer= 0; - var subscriptionClosed; - - var promise = new Promise(function (resolve, reject, onCancel) { - options= resolveOptions(options, { - timeout: 0, - overload: false - }, { - timeout: function(value, reject){ - value*= 1; - if (typeof value !== 'number' || value < 0 || !Number.isFinite(value)) { - reject('timeout must be a positive number'); - } - return value; - } - }); - - isCancelable = !options.overload && typeof Promise.prototype.cancel === 'function' && typeof onCancel === 'function'; - - function cleanup() { - if (callbacks) { - callbacks = null; - } - if (timer) { - clearTimeout(timer); - timer = 0; - } - } - - var _resolve= function(value){ - cleanup(); - resolve(value); - }; - - var _reject= function(err){ - cleanup(); - reject(err); - }; - - if (isCancelable) { - executor(_resolve, _reject, onCancel); - } else { - callbacks = [function(reason){ - _reject(reason || Error('canceled')); - }]; - executor(_resolve, _reject, function (cb) { - if (subscriptionClosed) { - throw Error('Unable to subscribe on cancel event asynchronously') - } - if (typeof cb !== 'function') { - throw TypeError('onCancel callback must be a function'); - } - callbacks.push(cb); - }); - subscriptionClosed= true; - } - - if (options.timeout > 0) { - timer= setTimeout(function(){ - var reason= Error('timeout'); - reason.code = 'ETIMEDOUT' - timer= 0; - promise.cancel(reason); - reject(reason); - }, options.timeout); - } - }); - - if (!isCancelable) { - promise.cancel = function (reason) { - if (!callbacks) { - return; - } - var length = callbacks.length; - for (var i = 1; i < length; i++) { - callbacks[i](reason); - } - // internal callback to reject the promise - callbacks[0](reason); - callbacks = null; - }; - } - - return promise; - } - - function findTargetIndex(observer) { - var observers = this._observers; - if(!observers){ - return -1; - } - var len = observers.length; - for (var i = 0; i < len; i++) { - if (observers[i]._target === observer) return i; - } - return -1; - } - - // Attention, function return type now is array, always ! - // It has zero elements if no any matches found and one or more - // elements (leafs) if there are matches - // - function searchListenerTree(handlers, type, tree, i, typeLength) { - if (!tree) { - return null; - } - - if (i === 0) { - var kind = typeof type; - if (kind === 'string') { - var ns, n, l = 0, j = 0, delimiter = this.delimiter, dl = delimiter.length; - if ((n = type.indexOf(delimiter)) !== -1) { - ns = new Array(5); - do { - ns[l++] = type.slice(j, n); - j = n + dl; - } while ((n = type.indexOf(delimiter, j)) !== -1); - - ns[l++] = type.slice(j); - type = ns; - typeLength = l; - } else { - type = [type]; - typeLength = 1; - } - } else if (kind === 'object') { - typeLength = type.length; - } else { - type = [type]; - typeLength = 1; - } - } - - var listeners= null, branch, xTree, xxTree, isolatedBranch, endReached, currentType = type[i], - nextType = type[i + 1], branches, _listeners; - - if (i === typeLength) { - // - // If at the end of the event(s) list and the tree has listeners - // invoke those listeners. - // - - if(tree._listeners) { - if (typeof tree._listeners === 'function') { - handlers && handlers.push(tree._listeners); - listeners = [tree]; - } else { - handlers && handlers.push.apply(handlers, tree._listeners); - listeners = [tree]; - } - } - } else { - - if (currentType === '*') { - // - // If the event emitted is '*' at this part - // or there is a concrete match at this patch - // - branches = ownKeys(tree); - n = branches.length; - while (n-- > 0) { - branch = branches[n]; - if (branch !== '_listeners') { - _listeners = searchListenerTree(handlers, type, tree[branch], i + 1, typeLength); - if (_listeners) { - if (listeners) { - listeners.push.apply(listeners, _listeners); - } else { - listeners = _listeners; - } - } - } - } - return listeners; - } else if (currentType === '**') { - endReached = (i + 1 === typeLength || (i + 2 === typeLength && nextType === '*')); - if (endReached && tree._listeners) { - // The next element has a _listeners, add it to the handlers. - listeners = searchListenerTree(handlers, type, tree, typeLength, typeLength); - } - - branches = ownKeys(tree); - n = branches.length; - while (n-- > 0) { - branch = branches[n]; - if (branch !== '_listeners') { - if (branch === '*' || branch === '**') { - if (tree[branch]._listeners && !endReached) { - _listeners = searchListenerTree(handlers, type, tree[branch], typeLength, typeLength); - if (_listeners) { - if (listeners) { - listeners.push.apply(listeners, _listeners); - } else { - listeners = _listeners; - } - } - } - _listeners = searchListenerTree(handlers, type, tree[branch], i, typeLength); - } else if (branch === nextType) { - _listeners = searchListenerTree(handlers, type, tree[branch], i + 2, typeLength); - } else { - // No match on this one, shift into the tree but not in the type array. - _listeners = searchListenerTree(handlers, type, tree[branch], i, typeLength); - } - if (_listeners) { - if (listeners) { - listeners.push.apply(listeners, _listeners); - } else { - listeners = _listeners; - } - } - } - } - return listeners; - } else if (tree[currentType]) { - listeners = searchListenerTree(handlers, type, tree[currentType], i + 1, typeLength); - } - } - - xTree = tree['*']; - if (xTree) { - // - // If the listener tree will allow any match for this part, - // then recursively explore all branches of the tree - // - searchListenerTree(handlers, type, xTree, i + 1, typeLength); - } - - xxTree = tree['**']; - if (xxTree) { - if (i < typeLength) { - if (xxTree._listeners) { - // If we have a listener on a '**', it will catch all, so add its handler. - searchListenerTree(handlers, type, xxTree, typeLength, typeLength); - } - - // Build arrays of matching next branches and others. - branches= ownKeys(xxTree); - n= branches.length; - while(n-->0){ - branch= branches[n]; - if (branch !== '_listeners') { - if (branch === nextType) { - // We know the next element will match, so jump twice. - searchListenerTree(handlers, type, xxTree[branch], i + 2, typeLength); - } else if (branch === currentType) { - // Current node matches, move into the tree. - searchListenerTree(handlers, type, xxTree[branch], i + 1, typeLength); - } else { - isolatedBranch = {}; - isolatedBranch[branch] = xxTree[branch]; - searchListenerTree(handlers, type, {'**': isolatedBranch}, i + 1, typeLength); - } - } - } - } else if (xxTree._listeners) { - // We have reached the end and still on a '**' - searchListenerTree(handlers, type, xxTree, typeLength, typeLength); - } else if (xxTree['*'] && xxTree['*']._listeners) { - searchListenerTree(handlers, type, xxTree['*'], typeLength, typeLength); - } - } - - return listeners; - } - - function growListenerTree(type, listener, prepend) { - var len = 0, j = 0, i, delimiter = this.delimiter, dl= delimiter.length, ns; - - if(typeof type==='string') { - if ((i = type.indexOf(delimiter)) !== -1) { - ns = new Array(5); - do { - ns[len++] = type.slice(j, i); - j = i + dl; - } while ((i = type.indexOf(delimiter, j)) !== -1); - - ns[len++] = type.slice(j); - }else{ - ns= [type]; - len= 1; - } - }else{ - ns= type; - len= type.length; - } - - // - // Looks for two consecutive '**', if so, don't add the event at all. - // - if (len > 1) { - for (i = 0; i + 1 < len; i++) { - if (ns[i] === '**' && ns[i + 1] === '**') { - return; - } - } - } - - - - var tree = this.listenerTree, name; - - for (i = 0; i < len; i++) { - name = ns[i]; - - tree = tree[name] || (tree[name] = {}); - - if (i === len - 1) { - if (!tree._listeners) { - tree._listeners = listener; - } else { - if (typeof tree._listeners === 'function') { - tree._listeners = [tree._listeners]; - } - - if (prepend) { - tree._listeners.unshift(listener); - } else { - tree._listeners.push(listener); - } - - if ( - !tree._listeners.warned && - this._maxListeners > 0 && - tree._listeners.length > this._maxListeners - ) { - tree._listeners.warned = true; - logPossibleMemoryLeak.call(this, tree._listeners.length, name); - } - } - return true; - } - } - - return true; - } - - function collectTreeEvents(tree, events, root, asArray){ - var branches= ownKeys(tree); - var i= branches.length; - var branch, branchName, path; - var hasListeners= tree['_listeners']; - var isArrayPath; - - while(i-->0){ - branchName= branches[i]; - - branch= tree[branchName]; - - if(branchName==='_listeners'){ - path= root; - }else { - path = root ? root.concat(branchName) : [branchName]; - } - - isArrayPath= asArray || typeof branchName==='symbol'; - - hasListeners && events.push(isArrayPath? path : path.join(this.delimiter)); - - if(typeof branch==='object'){ - collectTreeEvents.call(this, branch, events, path, isArrayPath); - } - } - - return events; - } - - function recursivelyGarbageCollect(root) { - var keys = ownKeys(root); - var i= keys.length; - var obj, key, flag; - while(i-->0){ - key = keys[i]; - obj = root[key]; - - if(obj){ - flag= true; - if(key !== '_listeners' && !recursivelyGarbageCollect(obj)){ - delete root[key]; - } - } - } - - return flag; - } - - function Listener(emitter, event, listener){ - this.emitter= emitter; - this.event= event; - this.listener= listener; - } - - Listener.prototype.off= function(){ - this.emitter.off(this.event, this.listener); - return this; - }; - - function setupListener(event, listener, options){ - if (options === true) { - promisify = true; - } else if (options === false) { - async = true; - } else { - if (!options || typeof options !== 'object') { - throw TypeError('options should be an object or true'); - } - var async = options.async; - var promisify = options.promisify; - var nextTick = options.nextTick; - var objectify = options.objectify; - } - - if (async || nextTick || promisify) { - var _listener = listener; - var _origin = listener._origin || listener; - - if (nextTick && !nextTickSupported) { - throw Error('process.nextTick is not supported'); - } - - if (promisify === undefined) { - promisify = listener.constructor.name === 'AsyncFunction'; - } - - listener = function () { - var args = arguments; - var context = this; - var event = this.event; - - return promisify ? (nextTick ? Promise.resolve() : new Promise(function (resolve) { - _setImmediate(resolve); - }).then(function () { - context.event = event; - return _listener.apply(context, args) - })) : (nextTick ? process.nextTick : _setImmediate)(function () { - context.event = event; - _listener.apply(context, args) - }); - }; - - listener._async = true; - listener._origin = _origin; - } - - return [listener, objectify? new Listener(this, event, listener): this]; - } - - function EventEmitter(conf) { - this._events = {}; - this._newListener = false; - this._removeListener = false; - this.verboseMemoryLeak = false; - configure.call(this, conf); - } - - EventEmitter.EventEmitter2 = EventEmitter; // backwards compatibility for exporting EventEmitter property - - EventEmitter.prototype.listenTo= function(target, events, options){ - if(typeof target!=='object'){ - throw TypeError('target musts be an object'); - } - - var emitter= this; - - options = resolveOptions(options, { - on: undefined, - off: undefined, - reducers: undefined - }, { - on: functionReducer, - off: functionReducer, - reducers: objectFunctionReducer - }); - - function listen(events){ - if(typeof events!=='object'){ - throw TypeError('events must be an object'); - } - - var reducers= options.reducers; - var index= findTargetIndex.call(emitter, target); - var observer; - - if(index===-1){ - observer= new TargetObserver(emitter, target, options); - }else{ - observer= emitter._observers[index]; - } - - var keys= ownKeys(events); - var len= keys.length; - var event; - var isSingleReducer= typeof reducers==='function'; - - for(var i=0; i 0) { - observer = observers[i]; - if (!target || observer._target === target) { - observer.unsubscribe(event); - matched= true; - } - } - - return matched; - }; - - // By default EventEmitters will print a warning if more than - // 10 listeners are added to it. This is a useful default which - // helps finding memory leaks. - // - // Obviously not all Emitters should be limited to 10. This function allows - // that to be increased. Set to zero for unlimited. - - EventEmitter.prototype.delimiter = '.'; - - EventEmitter.prototype.setMaxListeners = function(n) { - if (n !== undefined) { - this._maxListeners = n; - if (!this._conf) this._conf = {}; - this._conf.maxListeners = n; - } - }; - - EventEmitter.prototype.getMaxListeners = function() { - return this._maxListeners; - }; - - EventEmitter.prototype.event = ''; - - EventEmitter.prototype.once = function(event, fn, options) { - return this._once(event, fn, false, options); - }; - - EventEmitter.prototype.prependOnceListener = function(event, fn, options) { - return this._once(event, fn, true, options); - }; - - EventEmitter.prototype._once = function(event, fn, prepend, options) { - return this._many(event, 1, fn, prepend, options); - }; - - EventEmitter.prototype.many = function(event, ttl, fn, options) { - return this._many(event, ttl, fn, false, options); - }; - - EventEmitter.prototype.prependMany = function(event, ttl, fn, options) { - return this._many(event, ttl, fn, true, options); - }; - - EventEmitter.prototype._many = function(event, ttl, fn, prepend, options) { - var self = this; - - if (typeof fn !== 'function') { - throw new Error('many only accepts instances of Function'); - } - - function listener() { - if (--ttl === 0) { - self.off(event, listener); - } - return fn.apply(this, arguments); - } - - listener._origin = fn; - - return this._on(event, listener, prepend, options); - }; - - EventEmitter.prototype.emit = function() { - if (!this._events && !this._all) { - return false; - } - - this._events || init.call(this); - - var type = arguments[0], ns, wildcard= this.wildcard; - var args,l,i,j, containsSymbol; - - if (type === 'newListener' && !this._newListener) { - if (!this._events.newListener) { - return false; - } - } - - if (wildcard) { - ns= type; - if(type!=='newListener' && type!=='removeListener'){ - if (typeof type === 'object') { - l = type.length; - if (symbolsSupported) { - for (i = 0; i < l; i++) { - if (typeof type[i] === 'symbol') { - containsSymbol = true; - break; - } - } - } - if (!containsSymbol) { - type = type.join(this.delimiter); - } - } - } - } - - var al = arguments.length; - var handler; - - if (this._all && this._all.length) { - handler = this._all.slice(); - - for (i = 0, l = handler.length; i < l; i++) { - this.event = type; - switch (al) { - case 1: - handler[i].call(this, type); - break; - case 2: - handler[i].call(this, type, arguments[1]); - break; - case 3: - handler[i].call(this, type, arguments[1], arguments[2]); - break; - default: - handler[i].apply(this, arguments); - } - } - } - - if (wildcard) { - handler = []; - searchListenerTree.call(this, handler, ns, this.listenerTree, 0, l); - } else { - handler = this._events[type]; - if (typeof handler === 'function') { - this.event = type; - switch (al) { - case 1: - handler.call(this); - break; - case 2: - handler.call(this, arguments[1]); - break; - case 3: - handler.call(this, arguments[1], arguments[2]); - break; - default: - args = new Array(al - 1); - for (j = 1; j < al; j++) args[j - 1] = arguments[j]; - handler.apply(this, args); - } - return true; - } else if (handler) { - // need to make copy of handlers because list can change in the middle - // of emit call - handler = handler.slice(); - } - } - - if (handler && handler.length) { - if (al > 3) { - args = new Array(al - 1); - for (j = 1; j < al; j++) args[j - 1] = arguments[j]; - } - for (i = 0, l = handler.length; i < l; i++) { - this.event = type; - switch (al) { - case 1: - handler[i].call(this); - break; - case 2: - handler[i].call(this, arguments[1]); - break; - case 3: - handler[i].call(this, arguments[1], arguments[2]); - break; - default: - handler[i].apply(this, args); - } - } - return true; - } else if (!this.ignoreErrors && !this._all && type === 'error') { - if (arguments[1] instanceof Error) { - throw arguments[1]; // Unhandled 'error' event - } else { - throw new Error("Uncaught, unspecified 'error' event."); - } - } - - return !!this._all; - }; - - EventEmitter.prototype.emitAsync = function() { - if (!this._events && !this._all) { - return false; - } - - this._events || init.call(this); - - var type = arguments[0], wildcard= this.wildcard, ns, containsSymbol; - var args,l,i,j; - - if (type === 'newListener' && !this._newListener) { - if (!this._events.newListener) { return Promise.resolve([false]); } - } - - if (wildcard) { - ns= type; - if(type!=='newListener' && type!=='removeListener'){ - if (typeof type === 'object') { - l = type.length; - if (symbolsSupported) { - for (i = 0; i < l; i++) { - if (typeof type[i] === 'symbol') { - containsSymbol = true; - break; - } - } - } - if (!containsSymbol) { - type = type.join(this.delimiter); - } - } - } - } - - var promises= []; - - var al = arguments.length; - var handler; - - if (this._all) { - for (i = 0, l = this._all.length; i < l; i++) { - this.event = type; - switch (al) { - case 1: - promises.push(this._all[i].call(this, type)); - break; - case 2: - promises.push(this._all[i].call(this, type, arguments[1])); - break; - case 3: - promises.push(this._all[i].call(this, type, arguments[1], arguments[2])); - break; - default: - promises.push(this._all[i].apply(this, arguments)); - } - } - } - - if (wildcard) { - handler = []; - searchListenerTree.call(this, handler, ns, this.listenerTree, 0); - } else { - handler = this._events[type]; - } - - if (typeof handler === 'function') { - this.event = type; - switch (al) { - case 1: - promises.push(handler.call(this)); - break; - case 2: - promises.push(handler.call(this, arguments[1])); - break; - case 3: - promises.push(handler.call(this, arguments[1], arguments[2])); - break; - default: - args = new Array(al - 1); - for (j = 1; j < al; j++) args[j - 1] = arguments[j]; - promises.push(handler.apply(this, args)); - } - } else if (handler && handler.length) { - handler = handler.slice(); - if (al > 3) { - args = new Array(al - 1); - for (j = 1; j < al; j++) args[j - 1] = arguments[j]; - } - for (i = 0, l = handler.length; i < l; i++) { - this.event = type; - switch (al) { - case 1: - promises.push(handler[i].call(this)); - break; - case 2: - promises.push(handler[i].call(this, arguments[1])); - break; - case 3: - promises.push(handler[i].call(this, arguments[1], arguments[2])); - break; - default: - promises.push(handler[i].apply(this, args)); - } - } - } else if (!this.ignoreErrors && !this._all && type === 'error') { - if (arguments[1] instanceof Error) { - return Promise.reject(arguments[1]); // Unhandled 'error' event - } else { - return Promise.reject("Uncaught, unspecified 'error' event."); - } - } - - return Promise.all(promises); - }; - - EventEmitter.prototype.on = function(type, listener, options) { - return this._on(type, listener, false, options); - }; - - EventEmitter.prototype.prependListener = function(type, listener, options) { - return this._on(type, listener, true, options); - }; - - EventEmitter.prototype.onAny = function(fn) { - return this._onAny(fn, false); - }; - - EventEmitter.prototype.prependAny = function(fn) { - return this._onAny(fn, true); - }; - - EventEmitter.prototype.addListener = EventEmitter.prototype.on; - - EventEmitter.prototype._onAny = function(fn, prepend){ - if (typeof fn !== 'function') { - throw new Error('onAny only accepts instances of Function'); - } - - if (!this._all) { - this._all = []; - } - - // Add the function to the event listener collection. - if(prepend){ - this._all.unshift(fn); - }else{ - this._all.push(fn); - } - - return this; - }; - - EventEmitter.prototype._on = function(type, listener, prepend, options) { - if (typeof type === 'function') { - this._onAny(type, listener); - return this; - } - - if (typeof listener !== 'function') { - throw new Error('on only accepts instances of Function'); - } - this._events || init.call(this); - - var returnValue= this, temp; - - if (options !== undefined) { - temp = setupListener.call(this, type, listener, options); - listener = temp[0]; - returnValue = temp[1]; - } - - // To avoid recursion in the case that type == "newListeners"! Before - // adding it to the listeners, first emit "newListeners". - if (this._newListener) { - this.emit('newListener', type, listener); - } - - if (this.wildcard) { - growListenerTree.call(this, type, listener, prepend); - return returnValue; - } - - if (!this._events[type]) { - // Optimize the case of one listener. Don't need the extra array object. - this._events[type] = listener; - } else { - if (typeof this._events[type] === 'function') { - // Change to array. - this._events[type] = [this._events[type]]; - } - - // If we've already got an array, just add - if(prepend){ - this._events[type].unshift(listener); - }else{ - this._events[type].push(listener); - } - - // Check for listener leak - if ( - !this._events[type].warned && - this._maxListeners > 0 && - this._events[type].length > this._maxListeners - ) { - this._events[type].warned = true; - logPossibleMemoryLeak.call(this, this._events[type].length, type); - } - } - - return returnValue; - }; - - EventEmitter.prototype.off = function(type, listener) { - if (typeof listener !== 'function') { - throw new Error('removeListener only takes instances of Function'); - } - - var handlers,leafs=[]; - - if(this.wildcard) { - var ns = typeof type === 'string' ? type.split(this.delimiter) : type.slice(); - leafs = searchListenerTree.call(this, null, ns, this.listenerTree, 0); - if(!leafs) return this; - } else { - // does not use listeners(), so no side effect of creating _events[type] - if (!this._events[type]) return this; - handlers = this._events[type]; - leafs.push({_listeners:handlers}); - } - - for (var iLeaf=0; iLeaf 0) { - fns = this._all; - for(i = 0, l = fns.length; i < l; i++) { - if(fn === fns[i]) { - fns.splice(i, 1); - if (this._removeListener) - this.emit("removeListenerAny", fn); - return this; - } - } - } else { - fns = this._all; - if (this._removeListener) { - for(i = 0, l = fns.length; i < l; i++) - this.emit("removeListenerAny", fns[i]); - } - this._all = []; - } - return this; - }; - - EventEmitter.prototype.removeListener = EventEmitter.prototype.off; - - EventEmitter.prototype.removeAllListeners = function (type) { - if (type === undefined) { - !this._events || init.call(this); - return this; - } - - if (this.wildcard) { - var leafs = searchListenerTree.call(this, null, type, this.listenerTree, 0), leaf, i; - if (!leafs) return this; - for (i = 0; i < leafs.length; i++) { - leaf = leafs[i]; - leaf._listeners = null; - } - this.listenerTree && recursivelyGarbageCollect(this.listenerTree); - } else if (this._events) { - this._events[type] = null; - } - return this; - }; - - EventEmitter.prototype.listeners = function (type) { - var _events = this._events; - var keys, listeners, allListeners; - var i; - var listenerTree; - - if (type === undefined) { - if (this.wildcard) { - throw Error('event name required for wildcard emitter'); - } - - if (!_events) { - return []; - } - - keys = ownKeys(_events); - i = keys.length; - allListeners = []; - while (i-- > 0) { - listeners = _events[keys[i]]; - if (typeof listeners === 'function') { - allListeners.push(listeners); - } else { - allListeners.push.apply(allListeners, listeners); - } - } - return allListeners; - } else { - if (this.wildcard) { - listenerTree= this.listenerTree; - if(!listenerTree) return []; - var handlers = []; - var ns = typeof type === 'string' ? type.split(this.delimiter) : type.slice(); - searchListenerTree.call(this, handlers, ns, listenerTree, 0); - return handlers; - } - - if (!_events) { - return []; - } - - listeners = _events[type]; - - if (!listeners) { - return []; - } - return typeof listeners === 'function' ? [listeners] : listeners; - } - }; - - EventEmitter.prototype.eventNames = function(nsAsArray){ - var _events= this._events; - return this.wildcard? collectTreeEvents.call(this, this.listenerTree, [], null, nsAsArray) : (_events? ownKeys(_events) : []); - }; - - EventEmitter.prototype.listenerCount = function(type) { - return this.listeners(type).length; - }; - - EventEmitter.prototype.hasListeners = function (type) { - if (this.wildcard) { - var handlers = []; - var ns = typeof type === 'string' ? type.split(this.delimiter) : type.slice(); - searchListenerTree.call(this, handlers, ns, this.listenerTree, 0); - return handlers.length > 0; - } - - var _events = this._events; - var _all = this._all; - - return !!(_all && _all.length || _events && (type === undefined ? ownKeys(_events).length : _events[type])); - }; - - EventEmitter.prototype.listenersAny = function() { - - if(this._all) { - return this._all; - } - else { - return []; - } - - }; - - EventEmitter.prototype.waitFor = function (event, options) { - var self = this; - var type = typeof options; - if (type === 'number') { - options = {timeout: options}; - } else if (type === 'function') { - options = {filter: options}; - } - - options= resolveOptions(options, { - timeout: 0, - filter: undefined, - handleError: false, - Promise: Promise, - overload: false - }, { - filter: functionReducer, - Promise: constructorReducer - }); - - return makeCancelablePromise(options.Promise, function (resolve, reject, onCancel) { - function listener() { - var filter= options.filter; - if (filter && !filter.apply(self, arguments)) { - return; - } - self.off(event, listener); - if (options.handleError) { - var err = arguments[0]; - err ? reject(err) : resolve(toArray.apply(null, arguments).slice(1)); - } else { - resolve(toArray.apply(null, arguments)); - } - } - - onCancel(function(){ - self.off(event, listener); - }); - - self._on(event, listener, false); - }, { - timeout: options.timeout, - overload: options.overload - }) - }; - - function once(emitter, name, options) { - options= resolveOptions(options, { - Promise: Promise, - timeout: 0, - overload: false - }, { - Promise: constructorReducer - }); - - var _Promise= options.Promise; - - return makeCancelablePromise(_Promise, function(resolve, reject, onCancel){ - var handler; - if (typeof emitter.addEventListener === 'function') { - handler= function () { - resolve(toArray.apply(null, arguments)); - }; - - onCancel(function(){ - emitter.removeEventListener(name, handler); - }); - - emitter.addEventListener( - name, - handler, - {once: true} - ); - return; - } - - var eventListener = function(){ - errorListener && emitter.removeListener('error', errorListener); - resolve(toArray.apply(null, arguments)); - }; - - var errorListener; - - if (name !== 'error') { - errorListener = function (err){ - emitter.removeListener(name, eventListener); - reject(err); - }; - - emitter.once('error', errorListener); - } - - onCancel(function(){ - errorListener && emitter.removeListener('error', errorListener); - emitter.removeListener(name, eventListener); - }); - - emitter.once(name, eventListener); - }, { - timeout: options.timeout, - overload: options.overload - }); - } - - var prototype= EventEmitter.prototype; - - Object.defineProperties(EventEmitter, { - defaultMaxListeners: { - get: function () { - return prototype._maxListeners; - }, - set: function (n) { - if (typeof n !== 'number' || n < 0 || Number.isNaN(n)) { - throw TypeError('n must be a non-negative number') - } - prototype._maxListeners = n; - }, - enumerable: true - }, - once: { - value: once, - writable: true, - configurable: true - } - }); - - Object.defineProperties(prototype, { - _maxListeners: { - value: defaultMaxListeners, - writable: true, - configurable: true - }, - _observers: {value: null, writable: true, configurable: true} - }); - - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(function() { - return EventEmitter; - }); - } else if (typeof exports === 'object') { - // CommonJS - module.exports = EventEmitter; - } - else { - // global for any kind of environment. - var _global= new Function('','return this')(); - _global.EventEmitter2 = EventEmitter; - } -}(); diff --git a/node_modules/eventemitter2/package.json b/node_modules/eventemitter2/package.json deleted file mode 100644 index bf56eed..0000000 --- a/node_modules/eventemitter2/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "name": "eventemitter2", - "version": "6.4.9", - "description": "A feature-rich Node.js event emitter implementation with namespaces, wildcards, TTL, async listeners and browser/worker support.", - "keywords": [ - "event", - "events", - "emitter", - "eventemitter", - "addEventListener", - "addListener", - "pub/sub", - "emit", - "emits", - "on", - "once", - "publish", - "subscribe" - ], - "author": "hij1nx http://twitter.com/hij1nx", - "contributors": [ - "Eric Elliott", - "Charlie Robbins http://twitter.com/indexzero", - "Jameson Lee http://twitter.com/Jamesonjlee", - "Jeroen van Duffelen http://www.twitter.com/jvduf", - "Fedor Indutny http://www.twitter.com/indutny" - ], - "license": "MIT", - "repository": "git://github.com/hij1nx/EventEmitter2.git", - "devDependencies": { - "benchmark": "^2.1.4", - "bluebird": "^3.7.2", - "coveralls": "^3.0.11", - "mocha": "^7.1.1", - "nodeunit": "*", - "nyc": "^15.0.0" - }, - "main": "./lib/eventemitter2.js", - "scripts": { - "test": "mocha ./test/loader.js --exit --timeout=3000", - "test:legacy": "nodeunit test/simple/ test/wildcardEvents/", - "test:coverage": "nyc --check-coverage npm run test", - "coverage:report": "nyc report --reporter=html --reporter=text", - "coveralls": "nyc report --reporter=text-lcov | coveralls", - "benchmark": "node test/perf/benchmark.js", - "prepublishOnly": "npm run test:coverage", - "postversion": "git push && git push --tags" - }, - "files": [ - "lib/eventemitter2.js", - "index.js", - "eventemitter2.d.ts" - ], - "typings": "./eventemitter2.d.ts", - "typescript": { - "definition": "./eventemitter2.d.ts" - }, - "nyc": { - "lines": 80, - "functions": 80, - "branches": 75, - "statements": 80, - "watermarks": { - "lines": [ - 80, - 95 - ], - "functions": [ - 80, - 95 - ], - "branches": [ - 80, - 95 - ], - "statements": [ - 80, - 95 - ] - }, - "include": [ - "lib/**/*.js" - ], - "reporter": [ - "lcov", - "text-summary" - ] - } -} diff --git a/node_modules/express/History.md b/node_modules/express/History.md deleted file mode 100644 index 150c2ab..0000000 --- a/node_modules/express/History.md +++ /dev/null @@ -1,3667 +0,0 @@ -4.22.1 / 2025-12-01 -========== - - * Revert security fix for [CVE-2024-51999](https://www.cve.org/CVERecord?id=CVE-2024-51999) ([GHSA-pj86-cfqh-vqx6](https://github.com/expressjs/express/security/advisories/GHSA-pj86-cfqh-vqx6)) - -4.22.0 / 2025-12-01 -========== - * Security fix for [CVE-2024-51999](https://www.cve.org/CVERecord?id=CVE-2024-51999) ([GHSA-pj86-cfqh-vqx6](https://github.com/expressjs/express/security/advisories/GHSA-pj86-cfqh-vqx6)) - * deps: use tilde notation for dependencies - * deps: qs@6.14.0 - -4.21.2 / 2024-11-06 -========== - - * deps: path-to-regexp@0.1.12 - - Fix backtracking protection - * deps: path-to-regexp@0.1.11 - - Throws an error on invalid path values - -4.21.1 / 2024-10-08 -========== - - * Backported a fix for [CVE-2024-47764](https://nvd.nist.gov/vuln/detail/CVE-2024-47764) - - -4.21.0 / 2024-09-11 -========== - - * Deprecate `res.location("back")` and `res.redirect("back")` magic string - * deps: serve-static@1.16.2 - * includes send@0.19.0 - * deps: finalhandler@1.3.1 - * deps: qs@6.13.0 - -4.20.0 / 2024-09-10 -========== - * deps: serve-static@0.16.0 - * Remove link renderization in html while redirecting - * deps: send@0.19.0 - * Remove link renderization in html while redirecting - * deps: body-parser@0.6.0 - * add `depth` option to customize the depth level in the parser - * IMPORTANT: The default `depth` level for parsing URL-encoded data is now `32` (previously was `Infinity`) - * Remove link renderization in html while using `res.redirect` - * deps: path-to-regexp@0.1.10 - - Adds support for named matching groups in the routes using a regex - - Adds backtracking protection to parameters without regexes defined - * deps: encodeurl@~2.0.0 - - Removes encoding of `\`, `|`, and `^` to align better with URL spec - * Deprecate passing `options.maxAge` and `options.expires` to `res.clearCookie` - - Will be ignored in v5, clearCookie will set a cookie with an expires in the past to instruct clients to delete the cookie - -4.19.2 / 2024-03-25 -========== - - * Improved fix for open redirect allow list bypass - -4.19.1 / 2024-03-20 -========== - - * Allow passing non-strings to res.location with new encoding handling checks - -4.19.0 / 2024-03-20 -========== - - * Prevent open redirect allow list bypass due to encodeurl - * deps: cookie@0.6.0 - -4.18.3 / 2024-02-29 -========== - - * Fix routing requests without method - * deps: body-parser@1.20.2 - - Fix strict json error message on Node.js 19+ - - deps: content-type@~1.0.5 - - deps: raw-body@2.5.2 - * deps: cookie@0.6.0 - - Add `partitioned` option - -4.18.2 / 2022-10-08 -=================== - - * Fix regression routing a large stack in a single route - * deps: body-parser@1.20.1 - - deps: qs@6.11.0 - - perf: remove unnecessary object clone - * deps: qs@6.11.0 - -4.18.1 / 2022-04-29 -=================== - - * Fix hanging on large stack of sync routes - -4.18.0 / 2022-04-25 -=================== - - * Add "root" option to `res.download` - * Allow `options` without `filename` in `res.download` - * Deprecate string and non-integer arguments to `res.status` - * Fix behavior of `null`/`undefined` as `maxAge` in `res.cookie` - * Fix handling very large stacks of sync middleware - * Ignore `Object.prototype` values in settings through `app.set`/`app.get` - * Invoke `default` with same arguments as types in `res.format` - * Support proper 205 responses using `res.send` - * Use `http-errors` for `res.format` error - * deps: body-parser@1.20.0 - - Fix error message for json parse whitespace in `strict` - - Fix internal error when inflated body exceeds limit - - Prevent loss of async hooks context - - Prevent hanging when request already read - - deps: depd@2.0.0 - - deps: http-errors@2.0.0 - - deps: on-finished@2.4.1 - - deps: qs@6.10.3 - - deps: raw-body@2.5.1 - * deps: cookie@0.5.0 - - Add `priority` option - - Fix `expires` option to reject invalid dates - * deps: depd@2.0.0 - - Replace internal `eval` usage with `Function` constructor - - Use instance methods on `process` to check for listeners - * deps: finalhandler@1.2.0 - - Remove set content headers that break response - - deps: on-finished@2.4.1 - - deps: statuses@2.0.1 - * deps: on-finished@2.4.1 - - Prevent loss of async hooks context - * deps: qs@6.10.3 - * deps: send@0.18.0 - - Fix emitted 416 error missing headers property - - Limit the headers removed for 304 response - - deps: depd@2.0.0 - - deps: destroy@1.2.0 - - deps: http-errors@2.0.0 - - deps: on-finished@2.4.1 - - deps: statuses@2.0.1 - * deps: serve-static@1.15.0 - - deps: send@0.18.0 - * deps: statuses@2.0.1 - - Remove code 306 - - Rename `425 Unordered Collection` to standard `425 Too Early` - -4.17.3 / 2022-02-16 -=================== - - * deps: accepts@~1.3.8 - - deps: mime-types@~2.1.34 - - deps: negotiator@0.6.3 - * deps: body-parser@1.19.2 - - deps: bytes@3.1.2 - - deps: qs@6.9.7 - - deps: raw-body@2.4.3 - * deps: cookie@0.4.2 - * deps: qs@6.9.7 - * Fix handling of `__proto__` keys - * pref: remove unnecessary regexp for trust proxy - -4.17.2 / 2021-12-16 -=================== - - * Fix handling of `undefined` in `res.jsonp` - * Fix handling of `undefined` when `"json escape"` is enabled - * Fix incorrect middleware execution with unanchored `RegExp`s - * Fix `res.jsonp(obj, status)` deprecation message - * Fix typo in `res.is` JSDoc - * deps: body-parser@1.19.1 - - deps: bytes@3.1.1 - - deps: http-errors@1.8.1 - - deps: qs@6.9.6 - - deps: raw-body@2.4.2 - - deps: safe-buffer@5.2.1 - - deps: type-is@~1.6.18 - * deps: content-disposition@0.5.4 - - deps: safe-buffer@5.2.1 - * deps: cookie@0.4.1 - - Fix `maxAge` option to reject invalid values - * deps: proxy-addr@~2.0.7 - - Use `req.socket` over deprecated `req.connection` - - deps: forwarded@0.2.0 - - deps: ipaddr.js@1.9.1 - * deps: qs@6.9.6 - * deps: safe-buffer@5.2.1 - * deps: send@0.17.2 - - deps: http-errors@1.8.1 - - deps: ms@2.1.3 - - pref: ignore empty http tokens - * deps: serve-static@1.14.2 - - deps: send@0.17.2 - * deps: setprototypeof@1.2.0 - -4.17.1 / 2019-05-25 -=================== - - * Revert "Improve error message for `null`/`undefined` to `res.status`" - -4.17.0 / 2019-05-16 -=================== - - * Add `express.raw` to parse bodies into `Buffer` - * Add `express.text` to parse bodies into string - * Improve error message for non-strings to `res.sendFile` - * Improve error message for `null`/`undefined` to `res.status` - * Support multiple hosts in `X-Forwarded-Host` - * deps: accepts@~1.3.7 - * deps: body-parser@1.19.0 - - Add encoding MIK - - Add petabyte (`pb`) support - - Fix parsing array brackets after index - - deps: bytes@3.1.0 - - deps: http-errors@1.7.2 - - deps: iconv-lite@0.4.24 - - deps: qs@6.7.0 - - deps: raw-body@2.4.0 - - deps: type-is@~1.6.17 - * deps: content-disposition@0.5.3 - * deps: cookie@0.4.0 - - Add `SameSite=None` support - * deps: finalhandler@~1.1.2 - - Set stricter `Content-Security-Policy` header - - deps: parseurl@~1.3.3 - - deps: statuses@~1.5.0 - * deps: parseurl@~1.3.3 - * deps: proxy-addr@~2.0.5 - - deps: ipaddr.js@1.9.0 - * deps: qs@6.7.0 - - Fix parsing array brackets after index - * deps: range-parser@~1.2.1 - * deps: send@0.17.1 - - Set stricter CSP header in redirect & error responses - - deps: http-errors@~1.7.2 - - deps: mime@1.6.0 - - deps: ms@2.1.1 - - deps: range-parser@~1.2.1 - - deps: statuses@~1.5.0 - - perf: remove redundant `path.normalize` call - * deps: serve-static@1.14.1 - - Set stricter CSP header in redirect response - - deps: parseurl@~1.3.3 - - deps: send@0.17.1 - * deps: setprototypeof@1.1.1 - * deps: statuses@~1.5.0 - - Add `103 Early Hints` - * deps: type-is@~1.6.18 - - deps: mime-types@~2.1.24 - - perf: prevent internal `throw` on invalid type - -4.16.4 / 2018-10-10 -=================== - - * Fix issue where `"Request aborted"` may be logged in `res.sendfile` - * Fix JSDoc for `Router` constructor - * deps: body-parser@1.18.3 - - Fix deprecation warnings on Node.js 10+ - - Fix stack trace for strict json parse error - - deps: depd@~1.1.2 - - deps: http-errors@~1.6.3 - - deps: iconv-lite@0.4.23 - - deps: qs@6.5.2 - - deps: raw-body@2.3.3 - - deps: type-is@~1.6.16 - * deps: proxy-addr@~2.0.4 - - deps: ipaddr.js@1.8.0 - * deps: qs@6.5.2 - * deps: safe-buffer@5.1.2 - -4.16.3 / 2018-03-12 -=================== - - * deps: accepts@~1.3.5 - - deps: mime-types@~2.1.18 - * deps: depd@~1.1.2 - - perf: remove argument reassignment - * deps: encodeurl@~1.0.2 - - Fix encoding `%` as last character - * deps: finalhandler@1.1.1 - - Fix 404 output for bad / missing pathnames - - deps: encodeurl@~1.0.2 - - deps: statuses@~1.4.0 - * deps: proxy-addr@~2.0.3 - - deps: ipaddr.js@1.6.0 - * deps: send@0.16.2 - - Fix incorrect end tag in default error & redirects - - deps: depd@~1.1.2 - - deps: encodeurl@~1.0.2 - - deps: statuses@~1.4.0 - * deps: serve-static@1.13.2 - - Fix incorrect end tag in redirects - - deps: encodeurl@~1.0.2 - - deps: send@0.16.2 - * deps: statuses@~1.4.0 - * deps: type-is@~1.6.16 - - deps: mime-types@~2.1.18 - -4.16.2 / 2017-10-09 -=================== - - * Fix `TypeError` in `res.send` when given `Buffer` and `ETag` header set - * perf: skip parsing of entire `X-Forwarded-Proto` header - -4.16.1 / 2017-09-29 -=================== - - * deps: send@0.16.1 - * deps: serve-static@1.13.1 - - Fix regression when `root` is incorrectly set to a file - - deps: send@0.16.1 - -4.16.0 / 2017-09-28 -=================== - - * Add `"json escape"` setting for `res.json` and `res.jsonp` - * Add `express.json` and `express.urlencoded` to parse bodies - * Add `options` argument to `res.download` - * Improve error message when autoloading invalid view engine - * Improve error messages when non-function provided as middleware - * Skip `Buffer` encoding when not generating ETag for small response - * Use `safe-buffer` for improved Buffer API - * deps: accepts@~1.3.4 - - deps: mime-types@~2.1.16 - * deps: content-type@~1.0.4 - - perf: remove argument reassignment - - perf: skip parameter parsing when no parameters - * deps: etag@~1.8.1 - - perf: replace regular expression with substring - * deps: finalhandler@1.1.0 - - Use `res.headersSent` when available - * deps: parseurl@~1.3.2 - - perf: reduce overhead for full URLs - - perf: unroll the "fast-path" `RegExp` - * deps: proxy-addr@~2.0.2 - - Fix trimming leading / trailing OWS in `X-Forwarded-For` - - deps: forwarded@~0.1.2 - - deps: ipaddr.js@1.5.2 - - perf: reduce overhead when no `X-Forwarded-For` header - * deps: qs@6.5.1 - - Fix parsing & compacting very deep objects - * deps: send@0.16.0 - - Add 70 new types for file extensions - - Add `immutable` option - - Fix missing `` in default error & redirects - - Set charset as "UTF-8" for .js and .json - - Use instance methods on steam to check for listeners - - deps: mime@1.4.1 - - perf: improve path validation speed - * deps: serve-static@1.13.0 - - Add 70 new types for file extensions - - Add `immutable` option - - Set charset as "UTF-8" for .js and .json - - deps: send@0.16.0 - * deps: setprototypeof@1.1.0 - * deps: utils-merge@1.0.1 - * deps: vary@~1.1.2 - - perf: improve header token parsing speed - * perf: re-use options object when generating ETags - * perf: remove dead `.charset` set in `res.jsonp` - -4.15.5 / 2017-09-24 -=================== - - * deps: debug@2.6.9 - * deps: finalhandler@~1.0.6 - - deps: debug@2.6.9 - - deps: parseurl@~1.3.2 - * deps: fresh@0.5.2 - - Fix handling of modified headers with invalid dates - - perf: improve ETag match loop - - perf: improve `If-None-Match` token parsing - * deps: send@0.15.6 - - Fix handling of modified headers with invalid dates - - deps: debug@2.6.9 - - deps: etag@~1.8.1 - - deps: fresh@0.5.2 - - perf: improve `If-Match` token parsing - * deps: serve-static@1.12.6 - - deps: parseurl@~1.3.2 - - deps: send@0.15.6 - - perf: improve slash collapsing - -4.15.4 / 2017-08-06 -=================== - - * deps: debug@2.6.8 - * deps: depd@~1.1.1 - - Remove unnecessary `Buffer` loading - * deps: finalhandler@~1.0.4 - - deps: debug@2.6.8 - * deps: proxy-addr@~1.1.5 - - Fix array argument being altered - - deps: ipaddr.js@1.4.0 - * deps: qs@6.5.0 - * deps: send@0.15.4 - - deps: debug@2.6.8 - - deps: depd@~1.1.1 - - deps: http-errors@~1.6.2 - * deps: serve-static@1.12.4 - - deps: send@0.15.4 - -4.15.3 / 2017-05-16 -=================== - - * Fix error when `res.set` cannot add charset to `Content-Type` - * deps: debug@2.6.7 - - Fix `DEBUG_MAX_ARRAY_LENGTH` - - deps: ms@2.0.0 - * deps: finalhandler@~1.0.3 - - Fix missing `` in HTML document - - deps: debug@2.6.7 - * deps: proxy-addr@~1.1.4 - - deps: ipaddr.js@1.3.0 - * deps: send@0.15.3 - - deps: debug@2.6.7 - - deps: ms@2.0.0 - * deps: serve-static@1.12.3 - - deps: send@0.15.3 - * deps: type-is@~1.6.15 - - deps: mime-types@~2.1.15 - * deps: vary@~1.1.1 - - perf: hoist regular expression - -4.15.2 / 2017-03-06 -=================== - - * deps: qs@6.4.0 - - Fix regression parsing keys starting with `[` - -4.15.1 / 2017-03-05 -=================== - - * deps: send@0.15.1 - - Fix issue when `Date.parse` does not return `NaN` on invalid date - - Fix strict violation in broken environments - * deps: serve-static@1.12.1 - - Fix issue when `Date.parse` does not return `NaN` on invalid date - - deps: send@0.15.1 - -4.15.0 / 2017-03-01 -=================== - - * Add debug message when loading view engine - * Add `next("router")` to exit from router - * Fix case where `router.use` skipped requests routes did not - * Remove usage of `res._headers` private field - - Improves compatibility with Node.js 8 nightly - * Skip routing when `req.url` is not set - * Use `%o` in path debug to tell types apart - * Use `Object.create` to setup request & response prototypes - * Use `setprototypeof` module to replace `__proto__` setting - * Use `statuses` instead of `http` module for status messages - * deps: debug@2.6.1 - - Allow colors in workers - - Deprecated `DEBUG_FD` environment variable set to `3` or higher - - Fix error when running under React Native - - Use same color for same namespace - - deps: ms@0.7.2 - * deps: etag@~1.8.0 - - Use SHA1 instead of MD5 for ETag hashing - - Works with FIPS 140-2 OpenSSL configuration - * deps: finalhandler@~1.0.0 - - Fix exception when `err` cannot be converted to a string - - Fully URL-encode the pathname in the 404 - - Only include the pathname in the 404 message - - Send complete HTML document - - Set `Content-Security-Policy: default-src 'self'` header - - deps: debug@2.6.1 - * deps: fresh@0.5.0 - - Fix false detection of `no-cache` request directive - - Fix incorrect result when `If-None-Match` has both `*` and ETags - - Fix weak `ETag` matching to match spec - - perf: delay reading header values until needed - - perf: enable strict mode - - perf: hoist regular expressions - - perf: remove duplicate conditional - - perf: remove unnecessary boolean coercions - - perf: skip checking modified time if ETag check failed - - perf: skip parsing `If-None-Match` when no `ETag` header - - perf: use `Date.parse` instead of `new Date` - * deps: qs@6.3.1 - - Fix array parsing from skipping empty values - - Fix compacting nested arrays - * deps: send@0.15.0 - - Fix false detection of `no-cache` request directive - - Fix incorrect result when `If-None-Match` has both `*` and ETags - - Fix weak `ETag` matching to match spec - - Remove usage of `res._headers` private field - - Support `If-Match` and `If-Unmodified-Since` headers - - Use `res.getHeaderNames()` when available - - Use `res.headersSent` when available - - deps: debug@2.6.1 - - deps: etag@~1.8.0 - - deps: fresh@0.5.0 - - deps: http-errors@~1.6.1 - * deps: serve-static@1.12.0 - - Fix false detection of `no-cache` request directive - - Fix incorrect result when `If-None-Match` has both `*` and ETags - - Fix weak `ETag` matching to match spec - - Remove usage of `res._headers` private field - - Send complete HTML document in redirect response - - Set default CSP header in redirect response - - Support `If-Match` and `If-Unmodified-Since` headers - - Use `res.getHeaderNames()` when available - - Use `res.headersSent` when available - - deps: send@0.15.0 - * perf: add fast match path for `*` route - * perf: improve `req.ips` performance - -4.14.1 / 2017-01-28 -=================== - - * deps: content-disposition@0.5.2 - * deps: finalhandler@0.5.1 - - Fix exception when `err.headers` is not an object - - deps: statuses@~1.3.1 - - perf: hoist regular expressions - - perf: remove duplicate validation path - * deps: proxy-addr@~1.1.3 - - deps: ipaddr.js@1.2.0 - * deps: send@0.14.2 - - deps: http-errors@~1.5.1 - - deps: ms@0.7.2 - - deps: statuses@~1.3.1 - * deps: serve-static@~1.11.2 - - deps: send@0.14.2 - * deps: type-is@~1.6.14 - - deps: mime-types@~2.1.13 - -4.14.0 / 2016-06-16 -=================== - - * Add `acceptRanges` option to `res.sendFile`/`res.sendfile` - * Add `cacheControl` option to `res.sendFile`/`res.sendfile` - * Add `options` argument to `req.range` - - Includes the `combine` option - * Encode URL in `res.location`/`res.redirect` if not already encoded - * Fix some redirect handling in `res.sendFile`/`res.sendfile` - * Fix Windows absolute path check using forward slashes - * Improve error with invalid arguments to `req.get()` - * Improve performance for `res.json`/`res.jsonp` in most cases - * Improve `Range` header handling in `res.sendFile`/`res.sendfile` - * deps: accepts@~1.3.3 - - Fix including type extensions in parameters in `Accept` parsing - - Fix parsing `Accept` parameters with quoted equals - - Fix parsing `Accept` parameters with quoted semicolons - - Many performance improvements - - deps: mime-types@~2.1.11 - - deps: negotiator@0.6.1 - * deps: content-type@~1.0.2 - - perf: enable strict mode - * deps: cookie@0.3.1 - - Add `sameSite` option - - Fix cookie `Max-Age` to never be a floating point number - - Improve error message when `encode` is not a function - - Improve error message when `expires` is not a `Date` - - Throw better error for invalid argument to parse - - Throw on invalid values provided to `serialize` - - perf: enable strict mode - - perf: hoist regular expression - - perf: use for loop in parse - - perf: use string concatenation for serialization - * deps: finalhandler@0.5.0 - - Change invalid or non-numeric status code to 500 - - Overwrite status message to match set status code - - Prefer `err.statusCode` if `err.status` is invalid - - Set response headers from `err.headers` object - - Use `statuses` instead of `http` module for status messages - * deps: proxy-addr@~1.1.2 - - Fix accepting various invalid netmasks - - Fix IPv6-mapped IPv4 validation edge cases - - IPv4 netmasks must be contiguous - - IPv6 addresses cannot be used as a netmask - - deps: ipaddr.js@1.1.1 - * deps: qs@6.2.0 - - Add `decoder` option in `parse` function - * deps: range-parser@~1.2.0 - - Add `combine` option to combine overlapping ranges - - Fix incorrectly returning -1 when there is at least one valid range - - perf: remove internal function - * deps: send@0.14.1 - - Add `acceptRanges` option - - Add `cacheControl` option - - Attempt to combine multiple ranges into single range - - Correctly inherit from `Stream` class - - Fix `Content-Range` header in 416 responses when using `start`/`end` options - - Fix `Content-Range` header missing from default 416 responses - - Fix redirect error when `path` contains raw non-URL characters - - Fix redirect when `path` starts with multiple forward slashes - - Ignore non-byte `Range` headers - - deps: http-errors@~1.5.0 - - deps: range-parser@~1.2.0 - - deps: statuses@~1.3.0 - - perf: remove argument reassignment - * deps: serve-static@~1.11.1 - - Add `acceptRanges` option - - Add `cacheControl` option - - Attempt to combine multiple ranges into single range - - Fix redirect error when `req.url` contains raw non-URL characters - - Ignore non-byte `Range` headers - - Use status code 301 for redirects - - deps: send@0.14.1 - * deps: type-is@~1.6.13 - - Fix type error when given invalid type to match against - - deps: mime-types@~2.1.11 - * deps: vary@~1.1.0 - - Only accept valid field names in the `field` argument - * perf: use strict equality when possible - -4.13.4 / 2016-01-21 -=================== - - * deps: content-disposition@0.5.1 - - perf: enable strict mode - * deps: cookie@0.1.5 - - Throw on invalid values provided to `serialize` - * deps: depd@~1.1.0 - - Support web browser loading - - perf: enable strict mode - * deps: escape-html@~1.0.3 - - perf: enable strict mode - - perf: optimize string replacement - - perf: use faster string coercion - * deps: finalhandler@0.4.1 - - deps: escape-html@~1.0.3 - * deps: merge-descriptors@1.0.1 - - perf: enable strict mode - * deps: methods@~1.1.2 - - perf: enable strict mode - * deps: parseurl@~1.3.1 - - perf: enable strict mode - * deps: proxy-addr@~1.0.10 - - deps: ipaddr.js@1.0.5 - - perf: enable strict mode - * deps: range-parser@~1.0.3 - - perf: enable strict mode - * deps: send@0.13.1 - - deps: depd@~1.1.0 - - deps: destroy@~1.0.4 - - deps: escape-html@~1.0.3 - - deps: range-parser@~1.0.3 - * deps: serve-static@~1.10.2 - - deps: escape-html@~1.0.3 - - deps: parseurl@~1.3.0 - - deps: send@0.13.1 - -4.13.3 / 2015-08-02 -=================== - - * Fix infinite loop condition using `mergeParams: true` - * Fix inner numeric indices incorrectly altering parent `req.params` - -4.13.2 / 2015-07-31 -=================== - - * deps: accepts@~1.2.12 - - deps: mime-types@~2.1.4 - * deps: array-flatten@1.1.1 - - perf: enable strict mode - * deps: path-to-regexp@0.1.7 - - Fix regression with escaped round brackets and matching groups - * deps: type-is@~1.6.6 - - deps: mime-types@~2.1.4 - -4.13.1 / 2015-07-05 -=================== - - * deps: accepts@~1.2.10 - - deps: mime-types@~2.1.2 - * deps: qs@4.0.0 - - Fix dropping parameters like `hasOwnProperty` - - Fix various parsing edge cases - * deps: type-is@~1.6.4 - - deps: mime-types@~2.1.2 - - perf: enable strict mode - - perf: remove argument reassignment - -4.13.0 / 2015-06-20 -=================== - - * Add settings to debug output - * Fix `res.format` error when only `default` provided - * Fix issue where `next('route')` in `app.param` would incorrectly skip values - * Fix hiding platform issues with `decodeURIComponent` - - Only `URIError`s are a 400 - * Fix using `*` before params in routes - * Fix using capture groups before params in routes - * Simplify `res.cookie` to call `res.append` - * Use `array-flatten` module for flattening arrays - * deps: accepts@~1.2.9 - - deps: mime-types@~2.1.1 - - perf: avoid argument reassignment & argument slice - - perf: avoid negotiator recursive construction - - perf: enable strict mode - - perf: remove unnecessary bitwise operator - * deps: cookie@0.1.3 - - perf: deduce the scope of try-catch deopt - - perf: remove argument reassignments - * deps: escape-html@1.0.2 - * deps: etag@~1.7.0 - - Always include entity length in ETags for hash length extensions - - Generate non-Stats ETags using MD5 only (no longer CRC32) - - Improve stat performance by removing hashing - - Improve support for JXcore - - Remove base64 padding in ETags to shorten - - Support "fake" stats objects in environments without fs - - Use MD5 instead of MD4 in weak ETags over 1KB - * deps: finalhandler@0.4.0 - - Fix a false-positive when unpiping in Node.js 0.8 - - Support `statusCode` property on `Error` objects - - Use `unpipe` module for unpiping requests - - deps: escape-html@1.0.2 - - deps: on-finished@~2.3.0 - - perf: enable strict mode - - perf: remove argument reassignment - * deps: fresh@0.3.0 - - Add weak `ETag` matching support - * deps: on-finished@~2.3.0 - - Add defined behavior for HTTP `CONNECT` requests - - Add defined behavior for HTTP `Upgrade` requests - - deps: ee-first@1.1.1 - * deps: path-to-regexp@0.1.6 - * deps: send@0.13.0 - - Allow Node.js HTTP server to set `Date` response header - - Fix incorrectly removing `Content-Location` on 304 response - - Improve the default redirect response headers - - Send appropriate headers on default error response - - Use `http-errors` for standard emitted errors - - Use `statuses` instead of `http` module for status messages - - deps: escape-html@1.0.2 - - deps: etag@~1.7.0 - - deps: fresh@0.3.0 - - deps: on-finished@~2.3.0 - - perf: enable strict mode - - perf: remove unnecessary array allocations - * deps: serve-static@~1.10.0 - - Add `fallthrough` option - - Fix reading options from options prototype - - Improve the default redirect response headers - - Malformed URLs now `next()` instead of 400 - - deps: escape-html@1.0.2 - - deps: send@0.13.0 - - perf: enable strict mode - - perf: remove argument reassignment - * deps: type-is@~1.6.3 - - deps: mime-types@~2.1.1 - - perf: reduce try block size - - perf: remove bitwise operations - * perf: enable strict mode - * perf: isolate `app.render` try block - * perf: remove argument reassignments in application - * perf: remove argument reassignments in request prototype - * perf: remove argument reassignments in response prototype - * perf: remove argument reassignments in routing - * perf: remove argument reassignments in `View` - * perf: skip attempting to decode zero length string - * perf: use saved reference to `http.STATUS_CODES` - -4.12.4 / 2015-05-17 -=================== - - * deps: accepts@~1.2.7 - - deps: mime-types@~2.0.11 - - deps: negotiator@0.5.3 - * deps: debug@~2.2.0 - - deps: ms@0.7.1 - * deps: depd@~1.0.1 - * deps: etag@~1.6.0 - - Improve support for JXcore - - Support "fake" stats objects in environments without `fs` - * deps: finalhandler@0.3.6 - - deps: debug@~2.2.0 - - deps: on-finished@~2.2.1 - * deps: on-finished@~2.2.1 - - Fix `isFinished(req)` when data buffered - * deps: proxy-addr@~1.0.8 - - deps: ipaddr.js@1.0.1 - * deps: qs@2.4.2 - - Fix allowing parameters like `constructor` - * deps: send@0.12.3 - - deps: debug@~2.2.0 - - deps: depd@~1.0.1 - - deps: etag@~1.6.0 - - deps: ms@0.7.1 - - deps: on-finished@~2.2.1 - * deps: serve-static@~1.9.3 - - deps: send@0.12.3 - * deps: type-is@~1.6.2 - - deps: mime-types@~2.0.11 - -4.12.3 / 2015-03-17 -=================== - - * deps: accepts@~1.2.5 - - deps: mime-types@~2.0.10 - * deps: debug@~2.1.3 - - Fix high intensity foreground color for bold - - deps: ms@0.7.0 - * deps: finalhandler@0.3.4 - - deps: debug@~2.1.3 - * deps: proxy-addr@~1.0.7 - - deps: ipaddr.js@0.1.9 - * deps: qs@2.4.1 - - Fix error when parameter `hasOwnProperty` is present - * deps: send@0.12.2 - - Throw errors early for invalid `extensions` or `index` options - - deps: debug@~2.1.3 - * deps: serve-static@~1.9.2 - - deps: send@0.12.2 - * deps: type-is@~1.6.1 - - deps: mime-types@~2.0.10 - -4.12.2 / 2015-03-02 -=================== - - * Fix regression where `"Request aborted"` is logged using `res.sendFile` - -4.12.1 / 2015-03-01 -=================== - - * Fix constructing application with non-configurable prototype properties - * Fix `ECONNRESET` errors from `res.sendFile` usage - * Fix `req.host` when using "trust proxy" hops count - * Fix `req.protocol`/`req.secure` when using "trust proxy" hops count - * Fix wrong `code` on aborted connections from `res.sendFile` - * deps: merge-descriptors@1.0.0 - -4.12.0 / 2015-02-23 -=================== - - * Fix `"trust proxy"` setting to inherit when app is mounted - * Generate `ETag`s for all request responses - - No longer restricted to only responses for `GET` and `HEAD` requests - * Use `content-type` to parse `Content-Type` headers - * deps: accepts@~1.2.4 - - Fix preference sorting to be stable for long acceptable lists - - deps: mime-types@~2.0.9 - - deps: negotiator@0.5.1 - * deps: cookie-signature@1.0.6 - * deps: send@0.12.1 - - Always read the stat size from the file - - Fix mutating passed-in `options` - - deps: mime@1.3.4 - * deps: serve-static@~1.9.1 - - deps: send@0.12.1 - * deps: type-is@~1.6.0 - - fix argument reassignment - - fix false-positives in `hasBody` `Transfer-Encoding` check - - support wildcard for both type and subtype (`*/*`) - - deps: mime-types@~2.0.9 - -4.11.2 / 2015-02-01 -=================== - - * Fix `res.redirect` double-calling `res.end` for `HEAD` requests - * deps: accepts@~1.2.3 - - deps: mime-types@~2.0.8 - * deps: proxy-addr@~1.0.6 - - deps: ipaddr.js@0.1.8 - * deps: type-is@~1.5.6 - - deps: mime-types@~2.0.8 - -4.11.1 / 2015-01-20 -=================== - - * deps: send@0.11.1 - - Fix root path disclosure - * deps: serve-static@~1.8.1 - - Fix redirect loop in Node.js 0.11.14 - - Fix root path disclosure - - deps: send@0.11.1 - -4.11.0 / 2015-01-13 -=================== - - * Add `res.append(field, val)` to append headers - * Deprecate leading `:` in `name` for `app.param(name, fn)` - * Deprecate `req.param()` -- use `req.params`, `req.body`, or `req.query` instead - * Deprecate `app.param(fn)` - * Fix `OPTIONS` responses to include the `HEAD` method properly - * Fix `res.sendFile` not always detecting aborted connection - * Match routes iteratively to prevent stack overflows - * deps: accepts@~1.2.2 - - deps: mime-types@~2.0.7 - - deps: negotiator@0.5.0 - * deps: send@0.11.0 - - deps: debug@~2.1.1 - - deps: etag@~1.5.1 - - deps: ms@0.7.0 - - deps: on-finished@~2.2.0 - * deps: serve-static@~1.8.0 - - deps: send@0.11.0 - -4.10.8 / 2015-01-13 -=================== - - * Fix crash from error within `OPTIONS` response handler - * deps: proxy-addr@~1.0.5 - - deps: ipaddr.js@0.1.6 - -4.10.7 / 2015-01-04 -=================== - - * Fix `Allow` header for `OPTIONS` to not contain duplicate methods - * Fix incorrect "Request aborted" for `res.sendFile` when `HEAD` or 304 - * deps: debug@~2.1.1 - * deps: finalhandler@0.3.3 - - deps: debug@~2.1.1 - - deps: on-finished@~2.2.0 - * deps: methods@~1.1.1 - * deps: on-finished@~2.2.0 - * deps: serve-static@~1.7.2 - - Fix potential open redirect when mounted at root - * deps: type-is@~1.5.5 - - deps: mime-types@~2.0.7 - -4.10.6 / 2014-12-12 -=================== - - * Fix exception in `req.fresh`/`req.stale` without response headers - -4.10.5 / 2014-12-10 -=================== - - * Fix `res.send` double-calling `res.end` for `HEAD` requests - * deps: accepts@~1.1.4 - - deps: mime-types@~2.0.4 - * deps: type-is@~1.5.4 - - deps: mime-types@~2.0.4 - -4.10.4 / 2014-11-24 -=================== - - * Fix `res.sendfile` logging standard write errors - -4.10.3 / 2014-11-23 -=================== - - * Fix `res.sendFile` logging standard write errors - * deps: etag@~1.5.1 - * deps: proxy-addr@~1.0.4 - - deps: ipaddr.js@0.1.5 - * deps: qs@2.3.3 - - Fix `arrayLimit` behavior - -4.10.2 / 2014-11-09 -=================== - - * Correctly invoke async router callback asynchronously - * deps: accepts@~1.1.3 - - deps: mime-types@~2.0.3 - * deps: type-is@~1.5.3 - - deps: mime-types@~2.0.3 - -4.10.1 / 2014-10-28 -=================== - - * Fix handling of URLs containing `://` in the path - * deps: qs@2.3.2 - - Fix parsing of mixed objects and values - -4.10.0 / 2014-10-23 -=================== - - * Add support for `app.set('views', array)` - - Views are looked up in sequence in array of directories - * Fix `res.send(status)` to mention `res.sendStatus(status)` - * Fix handling of invalid empty URLs - * Use `content-disposition` module for `res.attachment`/`res.download` - - Sends standards-compliant `Content-Disposition` header - - Full Unicode support - * Use `path.resolve` in view lookup - * deps: debug@~2.1.0 - - Implement `DEBUG_FD` env variable support - * deps: depd@~1.0.0 - * deps: etag@~1.5.0 - - Improve string performance - - Slightly improve speed for weak ETags over 1KB - * deps: finalhandler@0.3.2 - - Terminate in progress response only on error - - Use `on-finished` to determine request status - - deps: debug@~2.1.0 - - deps: on-finished@~2.1.1 - * deps: on-finished@~2.1.1 - - Fix handling of pipelined requests - * deps: qs@2.3.0 - - Fix parsing of mixed implicit and explicit arrays - * deps: send@0.10.1 - - deps: debug@~2.1.0 - - deps: depd@~1.0.0 - - deps: etag@~1.5.0 - - deps: on-finished@~2.1.1 - * deps: serve-static@~1.7.1 - - deps: send@0.10.1 - -4.9.8 / 2014-10-17 -================== - - * Fix `res.redirect` body when redirect status specified - * deps: accepts@~1.1.2 - - Fix error when media type has invalid parameter - - deps: negotiator@0.4.9 - -4.9.7 / 2014-10-10 -================== - - * Fix using same param name in array of paths - -4.9.6 / 2014-10-08 -================== - - * deps: accepts@~1.1.1 - - deps: mime-types@~2.0.2 - - deps: negotiator@0.4.8 - * deps: serve-static@~1.6.4 - - Fix redirect loop when index file serving disabled - * deps: type-is@~1.5.2 - - deps: mime-types@~2.0.2 - -4.9.5 / 2014-09-24 -================== - - * deps: etag@~1.4.0 - * deps: proxy-addr@~1.0.3 - - Use `forwarded` npm module - * deps: send@0.9.3 - - deps: etag@~1.4.0 - * deps: serve-static@~1.6.3 - - deps: send@0.9.3 - -4.9.4 / 2014-09-19 -================== - - * deps: qs@2.2.4 - - Fix issue with object keys starting with numbers truncated - -4.9.3 / 2014-09-18 -================== - - * deps: proxy-addr@~1.0.2 - - Fix a global leak when multiple subnets are trusted - - deps: ipaddr.js@0.1.3 - -4.9.2 / 2014-09-17 -================== - - * Fix regression for empty string `path` in `app.use` - * Fix `router.use` to accept array of middleware without path - * Improve error message for bad `app.use` arguments - -4.9.1 / 2014-09-16 -================== - - * Fix `app.use` to accept array of middleware without path - * deps: depd@0.4.5 - * deps: etag@~1.3.1 - * deps: send@0.9.2 - - deps: depd@0.4.5 - - deps: etag@~1.3.1 - - deps: range-parser@~1.0.2 - * deps: serve-static@~1.6.2 - - deps: send@0.9.2 - -4.9.0 / 2014-09-08 -================== - - * Add `res.sendStatus` - * Invoke callback for sendfile when client aborts - - Applies to `res.sendFile`, `res.sendfile`, and `res.download` - - `err` will be populated with request aborted error - * Support IP address host in `req.subdomains` - * Use `etag` to generate `ETag` headers - * deps: accepts@~1.1.0 - - update `mime-types` - * deps: cookie-signature@1.0.5 - * deps: debug@~2.0.0 - * deps: finalhandler@0.2.0 - - Set `X-Content-Type-Options: nosniff` header - - deps: debug@~2.0.0 - * deps: fresh@0.2.4 - * deps: media-typer@0.3.0 - - Throw error when parameter format invalid on parse - * deps: qs@2.2.3 - - Fix issue where first empty value in array is discarded - * deps: range-parser@~1.0.2 - * deps: send@0.9.1 - - Add `lastModified` option - - Use `etag` to generate `ETag` header - - deps: debug@~2.0.0 - - deps: fresh@0.2.4 - * deps: serve-static@~1.6.1 - - Add `lastModified` option - - deps: send@0.9.1 - * deps: type-is@~1.5.1 - - fix `hasbody` to be true for `content-length: 0` - - deps: media-typer@0.3.0 - - deps: mime-types@~2.0.1 - * deps: vary@~1.0.0 - - Accept valid `Vary` header string as `field` - -4.8.8 / 2014-09-04 -================== - - * deps: send@0.8.5 - - Fix a path traversal issue when using `root` - - Fix malicious path detection for empty string path - * deps: serve-static@~1.5.4 - - deps: send@0.8.5 - -4.8.7 / 2014-08-29 -================== - - * deps: qs@2.2.2 - - Remove unnecessary cloning - -4.8.6 / 2014-08-27 -================== - - * deps: qs@2.2.0 - - Array parsing fix - - Performance improvements - -4.8.5 / 2014-08-18 -================== - - * deps: send@0.8.3 - - deps: destroy@1.0.3 - - deps: on-finished@2.1.0 - * deps: serve-static@~1.5.3 - - deps: send@0.8.3 - -4.8.4 / 2014-08-14 -================== - - * deps: qs@1.2.2 - * deps: send@0.8.2 - - Work around `fd` leak in Node.js 0.10 for `fs.ReadStream` - * deps: serve-static@~1.5.2 - - deps: send@0.8.2 - -4.8.3 / 2014-08-10 -================== - - * deps: parseurl@~1.3.0 - * deps: qs@1.2.1 - * deps: serve-static@~1.5.1 - - Fix parsing of weird `req.originalUrl` values - - deps: parseurl@~1.3.0 - - deps: utils-merge@1.0.0 - -4.8.2 / 2014-08-07 -================== - - * deps: qs@1.2.0 - - Fix parsing array of objects - -4.8.1 / 2014-08-06 -================== - - * fix incorrect deprecation warnings on `res.download` - * deps: qs@1.1.0 - - Accept urlencoded square brackets - - Accept empty values in implicit array notation - -4.8.0 / 2014-08-05 -================== - - * add `res.sendFile` - - accepts a file system path instead of a URL - - requires an absolute path or `root` option specified - * deprecate `res.sendfile` -- use `res.sendFile` instead - * support mounted app as any argument to `app.use()` - * deps: qs@1.0.2 - - Complete rewrite - - Limits array length to 20 - - Limits object depth to 5 - - Limits parameters to 1,000 - * deps: send@0.8.1 - - Add `extensions` option - * deps: serve-static@~1.5.0 - - Add `extensions` option - - deps: send@0.8.1 - -4.7.4 / 2014-08-04 -================== - - * fix `res.sendfile` regression for serving directory index files - * deps: send@0.7.4 - - Fix incorrect 403 on Windows and Node.js 0.11 - - Fix serving index files without root dir - * deps: serve-static@~1.4.4 - - deps: send@0.7.4 - -4.7.3 / 2014-08-04 -================== - - * deps: send@0.7.3 - - Fix incorrect 403 on Windows and Node.js 0.11 - * deps: serve-static@~1.4.3 - - Fix incorrect 403 on Windows and Node.js 0.11 - - deps: send@0.7.3 - -4.7.2 / 2014-07-27 -================== - - * deps: depd@0.4.4 - - Work-around v8 generating empty stack traces - * deps: send@0.7.2 - - deps: depd@0.4.4 - * deps: serve-static@~1.4.2 - -4.7.1 / 2014-07-26 -================== - - * deps: depd@0.4.3 - - Fix exception when global `Error.stackTraceLimit` is too low - * deps: send@0.7.1 - - deps: depd@0.4.3 - * deps: serve-static@~1.4.1 - -4.7.0 / 2014-07-25 -================== - - * fix `req.protocol` for proxy-direct connections - * configurable query parser with `app.set('query parser', parser)` - - `app.set('query parser', 'extended')` parse with "qs" module - - `app.set('query parser', 'simple')` parse with "querystring" core module - - `app.set('query parser', false)` disable query string parsing - - `app.set('query parser', true)` enable simple parsing - * deprecate `res.json(status, obj)` -- use `res.status(status).json(obj)` instead - * deprecate `res.jsonp(status, obj)` -- use `res.status(status).jsonp(obj)` instead - * deprecate `res.send(status, body)` -- use `res.status(status).send(body)` instead - * deps: debug@1.0.4 - * deps: depd@0.4.2 - - Add `TRACE_DEPRECATION` environment variable - - Remove non-standard grey color from color output - - Support `--no-deprecation` argument - - Support `--trace-deprecation` argument - * deps: finalhandler@0.1.0 - - Respond after request fully read - - deps: debug@1.0.4 - * deps: parseurl@~1.2.0 - - Cache URLs based on original value - - Remove no-longer-needed URL mis-parse work-around - - Simplify the "fast-path" `RegExp` - * deps: send@0.7.0 - - Add `dotfiles` option - - Cap `maxAge` value to 1 year - - deps: debug@1.0.4 - - deps: depd@0.4.2 - * deps: serve-static@~1.4.0 - - deps: parseurl@~1.2.0 - - deps: send@0.7.0 - * perf: prevent multiple `Buffer` creation in `res.send` - -4.6.1 / 2014-07-12 -================== - - * fix `subapp.mountpath` regression for `app.use(subapp)` - -4.6.0 / 2014-07-11 -================== - - * accept multiple callbacks to `app.use()` - * add explicit "Rosetta Flash JSONP abuse" protection - - previous versions are not vulnerable; this is just explicit protection - * catch errors in multiple `req.param(name, fn)` handlers - * deprecate `res.redirect(url, status)` -- use `res.redirect(status, url)` instead - * fix `res.send(status, num)` to send `num` as json (not error) - * remove unnecessary escaping when `res.jsonp` returns JSON response - * support non-string `path` in `app.use(path, fn)` - - supports array of paths - - supports `RegExp` - * router: fix optimization on router exit - * router: refactor location of `try` blocks - * router: speed up standard `app.use(fn)` - * deps: debug@1.0.3 - - Add support for multiple wildcards in namespaces - * deps: finalhandler@0.0.3 - - deps: debug@1.0.3 - * deps: methods@1.1.0 - - add `CONNECT` - * deps: parseurl@~1.1.3 - - faster parsing of href-only URLs - * deps: path-to-regexp@0.1.3 - * deps: send@0.6.0 - - deps: debug@1.0.3 - * deps: serve-static@~1.3.2 - - deps: parseurl@~1.1.3 - - deps: send@0.6.0 - * perf: fix arguments reassign deopt in some `res` methods - -4.5.1 / 2014-07-06 -================== - - * fix routing regression when altering `req.method` - -4.5.0 / 2014-07-04 -================== - - * add deprecation message to non-plural `req.accepts*` - * add deprecation message to `res.send(body, status)` - * add deprecation message to `res.vary()` - * add `headers` option to `res.sendfile` - - use to set headers on successful file transfer - * add `mergeParams` option to `Router` - - merges `req.params` from parent routes - * add `req.hostname` -- correct name for what `req.host` returns - * deprecate things with `depd` module - * deprecate `req.host` -- use `req.hostname` instead - * fix behavior when handling request without routes - * fix handling when `route.all` is only route - * invoke `router.param()` only when route matches - * restore `req.params` after invoking router - * use `finalhandler` for final response handling - * use `media-typer` to alter content-type charset - * deps: accepts@~1.0.7 - * deps: send@0.5.0 - - Accept string for `maxage` (converted by `ms`) - - Include link in default redirect response - * deps: serve-static@~1.3.0 - - Accept string for `maxAge` (converted by `ms`) - - Add `setHeaders` option - - Include HTML link in redirect response - - deps: send@0.5.0 - * deps: type-is@~1.3.2 - -4.4.5 / 2014-06-26 -================== - - * deps: cookie-signature@1.0.4 - - fix for timing attacks - -4.4.4 / 2014-06-20 -================== - - * fix `res.attachment` Unicode filenames in Safari - * fix "trim prefix" debug message in `express:router` - * deps: accepts@~1.0.5 - * deps: buffer-crc32@0.2.3 - -4.4.3 / 2014-06-11 -================== - - * fix persistence of modified `req.params[name]` from `app.param()` - * deps: accepts@1.0.3 - - deps: negotiator@0.4.6 - * deps: debug@1.0.2 - * deps: send@0.4.3 - - Do not throw uncatchable error on file open race condition - - Use `escape-html` for HTML escaping - - deps: debug@1.0.2 - - deps: finished@1.2.2 - - deps: fresh@0.2.2 - * deps: serve-static@1.2.3 - - Do not throw uncatchable error on file open race condition - - deps: send@0.4.3 - -4.4.2 / 2014-06-09 -================== - - * fix catching errors from top-level handlers - * use `vary` module for `res.vary` - * deps: debug@1.0.1 - * deps: proxy-addr@1.0.1 - * deps: send@0.4.2 - - fix "event emitter leak" warnings - - deps: debug@1.0.1 - - deps: finished@1.2.1 - * deps: serve-static@1.2.2 - - fix "event emitter leak" warnings - - deps: send@0.4.2 - * deps: type-is@1.2.1 - -4.4.1 / 2014-06-02 -================== - - * deps: methods@1.0.1 - * deps: send@0.4.1 - - Send `max-age` in `Cache-Control` in correct format - * deps: serve-static@1.2.1 - - use `escape-html` for escaping - - deps: send@0.4.1 - -4.4.0 / 2014-05-30 -================== - - * custom etag control with `app.set('etag', val)` - - `app.set('etag', function(body, encoding){ return '"etag"' })` custom etag generation - - `app.set('etag', 'weak')` weak tag - - `app.set('etag', 'strong')` strong etag - - `app.set('etag', false)` turn off - - `app.set('etag', true)` standard etag - * mark `res.send` ETag as weak and reduce collisions - * update accepts to 1.0.2 - - Fix interpretation when header not in request - * update send to 0.4.0 - - Calculate ETag with md5 for reduced collisions - - Ignore stream errors after request ends - - deps: debug@0.8.1 - * update serve-static to 1.2.0 - - Calculate ETag with md5 for reduced collisions - - Ignore stream errors after request ends - - deps: send@0.4.0 - -4.3.2 / 2014-05-28 -================== - - * fix handling of errors from `router.param()` callbacks - -4.3.1 / 2014-05-23 -================== - - * revert "fix behavior of multiple `app.VERB` for the same path" - - this caused a regression in the order of route execution - -4.3.0 / 2014-05-21 -================== - - * add `req.baseUrl` to access the path stripped from `req.url` in routes - * fix behavior of multiple `app.VERB` for the same path - * fix issue routing requests among sub routers - * invoke `router.param()` only when necessary instead of every match - * proper proxy trust with `app.set('trust proxy', trust)` - - `app.set('trust proxy', 1)` trust first hop - - `app.set('trust proxy', 'loopback')` trust loopback addresses - - `app.set('trust proxy', '10.0.0.1')` trust single IP - - `app.set('trust proxy', '10.0.0.1/16')` trust subnet - - `app.set('trust proxy', '10.0.0.1, 10.0.0.2')` trust list - - `app.set('trust proxy', false)` turn off - - `app.set('trust proxy', true)` trust everything - * set proper `charset` in `Content-Type` for `res.send` - * update type-is to 1.2.0 - - support suffix matching - -4.2.0 / 2014-05-11 -================== - - * deprecate `app.del()` -- use `app.delete()` instead - * deprecate `res.json(obj, status)` -- use `res.json(status, obj)` instead - - the edge-case `res.json(status, num)` requires `res.status(status).json(num)` - * deprecate `res.jsonp(obj, status)` -- use `res.jsonp(status, obj)` instead - - the edge-case `res.jsonp(status, num)` requires `res.status(status).jsonp(num)` - * fix `req.next` when inside router instance - * include `ETag` header in `HEAD` requests - * keep previous `Content-Type` for `res.jsonp` - * support PURGE method - - add `app.purge` - - add `router.purge` - - include PURGE in `app.all` - * update debug to 0.8.0 - - add `enable()` method - - change from stderr to stdout - * update methods to 1.0.0 - - add PURGE - -4.1.2 / 2014-05-08 -================== - - * fix `req.host` for IPv6 literals - * fix `res.jsonp` error if callback param is object - -4.1.1 / 2014-04-27 -================== - - * fix package.json to reflect supported node version - -4.1.0 / 2014-04-24 -================== - - * pass options from `res.sendfile` to `send` - * preserve casing of headers in `res.header` and `res.set` - * support unicode file names in `res.attachment` and `res.download` - * update accepts to 1.0.1 - - deps: negotiator@0.4.0 - * update cookie to 0.1.2 - - Fix for maxAge == 0 - - made compat with expires field - * update send to 0.3.0 - - Accept API options in options object - - Coerce option types - - Control whether to generate etags - - Default directory access to 403 when index disabled - - Fix sending files with dots without root set - - Include file path in etag - - Make "Can't set headers after they are sent." catchable - - Send full entity-body for multi range requests - - Set etags to "weak" - - Support "If-Range" header - - Support multiple index paths - - deps: mime@1.2.11 - * update serve-static to 1.1.0 - - Accept options directly to `send` module - - Resolve relative paths at middleware setup - - Use parseurl to parse the URL from request - - deps: send@0.3.0 - * update type-is to 1.1.0 - - add non-array values support - - add `multipart` as a shorthand - -4.0.0 / 2014-04-09 -================== - - * remove: - - node 0.8 support - - connect and connect's patches except for charset handling - - express(1) - moved to [express-generator](https://github.com/expressjs/generator) - - `express.createServer()` - it has been deprecated for a long time. Use `express()` - - `app.configure` - use logic in your own app code - - `app.router` - is removed - - `req.auth` - use `basic-auth` instead - - `req.accepted*` - use `req.accepts*()` instead - - `res.location` - relative URL resolution is removed - - `res.charset` - include the charset in the content type when using `res.set()` - - all bundled middleware except `static` - * change: - - `app.route` -> `app.mountpath` when mounting an express app in another express app - - `json spaces` no longer enabled by default in development - - `req.accepts*` -> `req.accepts*s` - i.e. `req.acceptsEncoding` -> `req.acceptsEncodings` - - `req.params` is now an object instead of an array - - `res.locals` is no longer a function. It is a plain js object. Treat it as such. - - `res.headerSent` -> `res.headersSent` to match node.js ServerResponse object - * refactor: - - `req.accepts*` with [accepts](https://github.com/expressjs/accepts) - - `req.is` with [type-is](https://github.com/expressjs/type-is) - - [path-to-regexp](https://github.com/component/path-to-regexp) - * add: - - `app.router()` - returns the app Router instance - - `app.route()` - Proxy to the app's `Router#route()` method to create a new route - - Router & Route - public API - -3.21.2 / 2015-07-31 -=================== - - * deps: connect@2.30.2 - - deps: body-parser@~1.13.3 - - deps: compression@~1.5.2 - - deps: errorhandler@~1.4.2 - - deps: method-override@~2.3.5 - - deps: serve-index@~1.7.2 - - deps: type-is@~1.6.6 - - deps: vhost@~3.0.1 - * deps: vary@~1.0.1 - - Fix setting empty header from empty `field` - - perf: enable strict mode - - perf: remove argument reassignments - -3.21.1 / 2015-07-05 -=================== - - * deps: basic-auth@~1.0.3 - * deps: connect@2.30.1 - - deps: body-parser@~1.13.2 - - deps: compression@~1.5.1 - - deps: errorhandler@~1.4.1 - - deps: morgan@~1.6.1 - - deps: pause@0.1.0 - - deps: qs@4.0.0 - - deps: serve-index@~1.7.1 - - deps: type-is@~1.6.4 - -3.21.0 / 2015-06-18 -=================== - - * deps: basic-auth@1.0.2 - - perf: enable strict mode - - perf: hoist regular expression - - perf: parse with regular expressions - - perf: remove argument reassignment - * deps: connect@2.30.0 - - deps: body-parser@~1.13.1 - - deps: bytes@2.1.0 - - deps: compression@~1.5.0 - - deps: cookie@0.1.3 - - deps: cookie-parser@~1.3.5 - - deps: csurf@~1.8.3 - - deps: errorhandler@~1.4.0 - - deps: express-session@~1.11.3 - - deps: finalhandler@0.4.0 - - deps: fresh@0.3.0 - - deps: morgan@~1.6.0 - - deps: serve-favicon@~2.3.0 - - deps: serve-index@~1.7.0 - - deps: serve-static@~1.10.0 - - deps: type-is@~1.6.3 - * deps: cookie@0.1.3 - - perf: deduce the scope of try-catch deopt - - perf: remove argument reassignments - * deps: escape-html@1.0.2 - * deps: etag@~1.7.0 - - Always include entity length in ETags for hash length extensions - - Generate non-Stats ETags using MD5 only (no longer CRC32) - - Improve stat performance by removing hashing - - Improve support for JXcore - - Remove base64 padding in ETags to shorten - - Support "fake" stats objects in environments without fs - - Use MD5 instead of MD4 in weak ETags over 1KB - * deps: fresh@0.3.0 - - Add weak `ETag` matching support - * deps: mkdirp@0.5.1 - - Work in global strict mode - * deps: send@0.13.0 - - Allow Node.js HTTP server to set `Date` response header - - Fix incorrectly removing `Content-Location` on 304 response - - Improve the default redirect response headers - - Send appropriate headers on default error response - - Use `http-errors` for standard emitted errors - - Use `statuses` instead of `http` module for status messages - - deps: escape-html@1.0.2 - - deps: etag@~1.7.0 - - deps: fresh@0.3.0 - - deps: on-finished@~2.3.0 - - perf: enable strict mode - - perf: remove unnecessary array allocations - -3.20.3 / 2015-05-17 -=================== - - * deps: connect@2.29.2 - - deps: body-parser@~1.12.4 - - deps: compression@~1.4.4 - - deps: connect-timeout@~1.6.2 - - deps: debug@~2.2.0 - - deps: depd@~1.0.1 - - deps: errorhandler@~1.3.6 - - deps: finalhandler@0.3.6 - - deps: method-override@~2.3.3 - - deps: morgan@~1.5.3 - - deps: qs@2.4.2 - - deps: response-time@~2.3.1 - - deps: serve-favicon@~2.2.1 - - deps: serve-index@~1.6.4 - - deps: serve-static@~1.9.3 - - deps: type-is@~1.6.2 - * deps: debug@~2.2.0 - - deps: ms@0.7.1 - * deps: depd@~1.0.1 - * deps: proxy-addr@~1.0.8 - - deps: ipaddr.js@1.0.1 - * deps: send@0.12.3 - - deps: debug@~2.2.0 - - deps: depd@~1.0.1 - - deps: etag@~1.6.0 - - deps: ms@0.7.1 - - deps: on-finished@~2.2.1 - -3.20.2 / 2015-03-16 -=================== - - * deps: connect@2.29.1 - - deps: body-parser@~1.12.2 - - deps: compression@~1.4.3 - - deps: connect-timeout@~1.6.1 - - deps: debug@~2.1.3 - - deps: errorhandler@~1.3.5 - - deps: express-session@~1.10.4 - - deps: finalhandler@0.3.4 - - deps: method-override@~2.3.2 - - deps: morgan@~1.5.2 - - deps: qs@2.4.1 - - deps: serve-index@~1.6.3 - - deps: serve-static@~1.9.2 - - deps: type-is@~1.6.1 - * deps: debug@~2.1.3 - - Fix high intensity foreground color for bold - - deps: ms@0.7.0 - * deps: merge-descriptors@1.0.0 - * deps: proxy-addr@~1.0.7 - - deps: ipaddr.js@0.1.9 - * deps: send@0.12.2 - - Throw errors early for invalid `extensions` or `index` options - - deps: debug@~2.1.3 - -3.20.1 / 2015-02-28 -=================== - - * Fix `req.host` when using "trust proxy" hops count - * Fix `req.protocol`/`req.secure` when using "trust proxy" hops count - -3.20.0 / 2015-02-18 -=================== - - * Fix `"trust proxy"` setting to inherit when app is mounted - * Generate `ETag`s for all request responses - - No longer restricted to only responses for `GET` and `HEAD` requests - * Use `content-type` to parse `Content-Type` headers - * deps: connect@2.29.0 - - Use `content-type` to parse `Content-Type` headers - - deps: body-parser@~1.12.0 - - deps: compression@~1.4.1 - - deps: connect-timeout@~1.6.0 - - deps: cookie-parser@~1.3.4 - - deps: cookie-signature@1.0.6 - - deps: csurf@~1.7.0 - - deps: errorhandler@~1.3.4 - - deps: express-session@~1.10.3 - - deps: http-errors@~1.3.1 - - deps: response-time@~2.3.0 - - deps: serve-index@~1.6.2 - - deps: serve-static@~1.9.1 - - deps: type-is@~1.6.0 - * deps: cookie-signature@1.0.6 - * deps: send@0.12.1 - - Always read the stat size from the file - - Fix mutating passed-in `options` - - deps: mime@1.3.4 - -3.19.2 / 2015-02-01 -=================== - - * deps: connect@2.28.3 - - deps: compression@~1.3.1 - - deps: csurf@~1.6.6 - - deps: errorhandler@~1.3.3 - - deps: express-session@~1.10.2 - - deps: serve-index@~1.6.1 - - deps: type-is@~1.5.6 - * deps: proxy-addr@~1.0.6 - - deps: ipaddr.js@0.1.8 - -3.19.1 / 2015-01-20 -=================== - - * deps: connect@2.28.2 - - deps: body-parser@~1.10.2 - - deps: serve-static@~1.8.1 - * deps: send@0.11.1 - - Fix root path disclosure - -3.19.0 / 2015-01-09 -=================== - - * Fix `OPTIONS` responses to include the `HEAD` method property - * Use `readline` for prompt in `express(1)` - * deps: commander@2.6.0 - * deps: connect@2.28.1 - - deps: body-parser@~1.10.1 - - deps: compression@~1.3.0 - - deps: connect-timeout@~1.5.0 - - deps: csurf@~1.6.4 - - deps: debug@~2.1.1 - - deps: errorhandler@~1.3.2 - - deps: express-session@~1.10.1 - - deps: finalhandler@0.3.3 - - deps: method-override@~2.3.1 - - deps: morgan@~1.5.1 - - deps: serve-favicon@~2.2.0 - - deps: serve-index@~1.6.0 - - deps: serve-static@~1.8.0 - - deps: type-is@~1.5.5 - * deps: debug@~2.1.1 - * deps: methods@~1.1.1 - * deps: proxy-addr@~1.0.5 - - deps: ipaddr.js@0.1.6 - * deps: send@0.11.0 - - deps: debug@~2.1.1 - - deps: etag@~1.5.1 - - deps: ms@0.7.0 - - deps: on-finished@~2.2.0 - -3.18.6 / 2014-12-12 -=================== - - * Fix exception in `req.fresh`/`req.stale` without response headers - -3.18.5 / 2014-12-11 -=================== - - * deps: connect@2.27.6 - - deps: compression@~1.2.2 - - deps: express-session@~1.9.3 - - deps: http-errors@~1.2.8 - - deps: serve-index@~1.5.3 - - deps: type-is@~1.5.4 - -3.18.4 / 2014-11-23 -=================== - - * deps: connect@2.27.4 - - deps: body-parser@~1.9.3 - - deps: compression@~1.2.1 - - deps: errorhandler@~1.2.3 - - deps: express-session@~1.9.2 - - deps: qs@2.3.3 - - deps: serve-favicon@~2.1.7 - - deps: serve-static@~1.5.1 - - deps: type-is@~1.5.3 - * deps: etag@~1.5.1 - * deps: proxy-addr@~1.0.4 - - deps: ipaddr.js@0.1.5 - -3.18.3 / 2014-11-09 -=================== - - * deps: connect@2.27.3 - - Correctly invoke async callback asynchronously - - deps: csurf@~1.6.3 - -3.18.2 / 2014-10-28 -=================== - - * deps: connect@2.27.2 - - Fix handling of URLs containing `://` in the path - - deps: body-parser@~1.9.2 - - deps: qs@2.3.2 - -3.18.1 / 2014-10-22 -=================== - - * Fix internal `utils.merge` deprecation warnings - * deps: connect@2.27.1 - - deps: body-parser@~1.9.1 - - deps: express-session@~1.9.1 - - deps: finalhandler@0.3.2 - - deps: morgan@~1.4.1 - - deps: qs@2.3.0 - - deps: serve-static@~1.7.1 - * deps: send@0.10.1 - - deps: on-finished@~2.1.1 - -3.18.0 / 2014-10-17 -=================== - - * Use `content-disposition` module for `res.attachment`/`res.download` - - Sends standards-compliant `Content-Disposition` header - - Full Unicode support - * Use `etag` module to generate `ETag` headers - * deps: connect@2.27.0 - - Use `http-errors` module for creating errors - - Use `utils-merge` module for merging objects - - deps: body-parser@~1.9.0 - - deps: compression@~1.2.0 - - deps: connect-timeout@~1.4.0 - - deps: debug@~2.1.0 - - deps: depd@~1.0.0 - - deps: express-session@~1.9.0 - - deps: finalhandler@0.3.1 - - deps: method-override@~2.3.0 - - deps: morgan@~1.4.0 - - deps: response-time@~2.2.0 - - deps: serve-favicon@~2.1.6 - - deps: serve-index@~1.5.0 - - deps: serve-static@~1.7.0 - * deps: debug@~2.1.0 - - Implement `DEBUG_FD` env variable support - * deps: depd@~1.0.0 - * deps: send@0.10.0 - - deps: debug@~2.1.0 - - deps: depd@~1.0.0 - - deps: etag@~1.5.0 - -3.17.8 / 2014-10-15 -=================== - - * deps: connect@2.26.6 - - deps: compression@~1.1.2 - - deps: csurf@~1.6.2 - - deps: errorhandler@~1.2.2 - -3.17.7 / 2014-10-08 -=================== - - * deps: connect@2.26.5 - - Fix accepting non-object arguments to `logger` - - deps: serve-static@~1.6.4 - -3.17.6 / 2014-10-02 -=================== - - * deps: connect@2.26.4 - - deps: morgan@~1.3.2 - - deps: type-is@~1.5.2 - -3.17.5 / 2014-09-24 -=================== - - * deps: connect@2.26.3 - - deps: body-parser@~1.8.4 - - deps: serve-favicon@~2.1.5 - - deps: serve-static@~1.6.3 - * deps: proxy-addr@~1.0.3 - - Use `forwarded` npm module - * deps: send@0.9.3 - - deps: etag@~1.4.0 - -3.17.4 / 2014-09-19 -=================== - - * deps: connect@2.26.2 - - deps: body-parser@~1.8.3 - - deps: qs@2.2.4 - -3.17.3 / 2014-09-18 -=================== - - * deps: proxy-addr@~1.0.2 - - Fix a global leak when multiple subnets are trusted - - deps: ipaddr.js@0.1.3 - -3.17.2 / 2014-09-15 -=================== - - * Use `crc` instead of `buffer-crc32` for speed - * deps: connect@2.26.1 - - deps: body-parser@~1.8.2 - - deps: depd@0.4.5 - - deps: express-session@~1.8.2 - - deps: morgan@~1.3.1 - - deps: serve-favicon@~2.1.3 - - deps: serve-static@~1.6.2 - * deps: depd@0.4.5 - * deps: send@0.9.2 - - deps: depd@0.4.5 - - deps: etag@~1.3.1 - - deps: range-parser@~1.0.2 - -3.17.1 / 2014-09-08 -=================== - - * Fix error in `req.subdomains` on empty host - -3.17.0 / 2014-09-08 -=================== - - * Support `X-Forwarded-Host` in `req.subdomains` - * Support IP address host in `req.subdomains` - * deps: connect@2.26.0 - - deps: body-parser@~1.8.1 - - deps: compression@~1.1.0 - - deps: connect-timeout@~1.3.0 - - deps: cookie-parser@~1.3.3 - - deps: cookie-signature@1.0.5 - - deps: csurf@~1.6.1 - - deps: debug@~2.0.0 - - deps: errorhandler@~1.2.0 - - deps: express-session@~1.8.1 - - deps: finalhandler@0.2.0 - - deps: fresh@0.2.4 - - deps: media-typer@0.3.0 - - deps: method-override@~2.2.0 - - deps: morgan@~1.3.0 - - deps: qs@2.2.3 - - deps: serve-favicon@~2.1.3 - - deps: serve-index@~1.2.1 - - deps: serve-static@~1.6.1 - - deps: type-is@~1.5.1 - - deps: vhost@~3.0.0 - * deps: cookie-signature@1.0.5 - * deps: debug@~2.0.0 - * deps: fresh@0.2.4 - * deps: media-typer@0.3.0 - - Throw error when parameter format invalid on parse - * deps: range-parser@~1.0.2 - * deps: send@0.9.1 - - Add `lastModified` option - - Use `etag` to generate `ETag` header - - deps: debug@~2.0.0 - - deps: fresh@0.2.4 - * deps: vary@~1.0.0 - - Accept valid `Vary` header string as `field` - -3.16.10 / 2014-09-04 -==================== - - * deps: connect@2.25.10 - - deps: serve-static@~1.5.4 - * deps: send@0.8.5 - - Fix a path traversal issue when using `root` - - Fix malicious path detection for empty string path - -3.16.9 / 2014-08-29 -=================== - - * deps: connect@2.25.9 - - deps: body-parser@~1.6.7 - - deps: qs@2.2.2 - -3.16.8 / 2014-08-27 -=================== - - * deps: connect@2.25.8 - - deps: body-parser@~1.6.6 - - deps: csurf@~1.4.1 - - deps: qs@2.2.0 - -3.16.7 / 2014-08-18 -=================== - - * deps: connect@2.25.7 - - deps: body-parser@~1.6.5 - - deps: express-session@~1.7.6 - - deps: morgan@~1.2.3 - - deps: serve-static@~1.5.3 - * deps: send@0.8.3 - - deps: destroy@1.0.3 - - deps: on-finished@2.1.0 - -3.16.6 / 2014-08-14 -=================== - - * deps: connect@2.25.6 - - deps: body-parser@~1.6.4 - - deps: qs@1.2.2 - - deps: serve-static@~1.5.2 - * deps: send@0.8.2 - - Work around `fd` leak in Node.js 0.10 for `fs.ReadStream` - -3.16.5 / 2014-08-11 -=================== - - * deps: connect@2.25.5 - - Fix backwards compatibility in `logger` - -3.16.4 / 2014-08-10 -=================== - - * Fix original URL parsing in `res.location` - * deps: connect@2.25.4 - - Fix `query` middleware breaking with argument - - deps: body-parser@~1.6.3 - - deps: compression@~1.0.11 - - deps: connect-timeout@~1.2.2 - - deps: express-session@~1.7.5 - - deps: method-override@~2.1.3 - - deps: on-headers@~1.0.0 - - deps: parseurl@~1.3.0 - - deps: qs@1.2.1 - - deps: response-time@~2.0.1 - - deps: serve-index@~1.1.6 - - deps: serve-static@~1.5.1 - * deps: parseurl@~1.3.0 - -3.16.3 / 2014-08-07 -=================== - - * deps: connect@2.25.3 - - deps: multiparty@3.3.2 - -3.16.2 / 2014-08-07 -=================== - - * deps: connect@2.25.2 - - deps: body-parser@~1.6.2 - - deps: qs@1.2.0 - -3.16.1 / 2014-08-06 -=================== - - * deps: connect@2.25.1 - - deps: body-parser@~1.6.1 - - deps: qs@1.1.0 - -3.16.0 / 2014-08-05 -=================== - - * deps: connect@2.25.0 - - deps: body-parser@~1.6.0 - - deps: compression@~1.0.10 - - deps: csurf@~1.4.0 - - deps: express-session@~1.7.4 - - deps: qs@1.0.2 - - deps: serve-static@~1.5.0 - * deps: send@0.8.1 - - Add `extensions` option - -3.15.3 / 2014-08-04 -=================== - - * fix `res.sendfile` regression for serving directory index files - * deps: connect@2.24.3 - - deps: serve-index@~1.1.5 - - deps: serve-static@~1.4.4 - * deps: send@0.7.4 - - Fix incorrect 403 on Windows and Node.js 0.11 - - Fix serving index files without root dir - -3.15.2 / 2014-07-27 -=================== - - * deps: connect@2.24.2 - - deps: body-parser@~1.5.2 - - deps: depd@0.4.4 - - deps: express-session@~1.7.2 - - deps: morgan@~1.2.2 - - deps: serve-static@~1.4.2 - * deps: depd@0.4.4 - - Work-around v8 generating empty stack traces - * deps: send@0.7.2 - - deps: depd@0.4.4 - -3.15.1 / 2014-07-26 -=================== - - * deps: connect@2.24.1 - - deps: body-parser@~1.5.1 - - deps: depd@0.4.3 - - deps: express-session@~1.7.1 - - deps: morgan@~1.2.1 - - deps: serve-index@~1.1.4 - - deps: serve-static@~1.4.1 - * deps: depd@0.4.3 - - Fix exception when global `Error.stackTraceLimit` is too low - * deps: send@0.7.1 - - deps: depd@0.4.3 - -3.15.0 / 2014-07-22 -=================== - - * Fix `req.protocol` for proxy-direct connections - * Pass options from `res.sendfile` to `send` - * deps: connect@2.24.0 - - deps: body-parser@~1.5.0 - - deps: compression@~1.0.9 - - deps: connect-timeout@~1.2.1 - - deps: debug@1.0.4 - - deps: depd@0.4.2 - - deps: express-session@~1.7.0 - - deps: finalhandler@0.1.0 - - deps: method-override@~2.1.2 - - deps: morgan@~1.2.0 - - deps: multiparty@3.3.1 - - deps: parseurl@~1.2.0 - - deps: serve-static@~1.4.0 - * deps: debug@1.0.4 - * deps: depd@0.4.2 - - Add `TRACE_DEPRECATION` environment variable - - Remove non-standard grey color from color output - - Support `--no-deprecation` argument - - Support `--trace-deprecation` argument - * deps: parseurl@~1.2.0 - - Cache URLs based on original value - - Remove no-longer-needed URL mis-parse work-around - - Simplify the "fast-path" `RegExp` - * deps: send@0.7.0 - - Add `dotfiles` option - - Cap `maxAge` value to 1 year - - deps: debug@1.0.4 - - deps: depd@0.4.2 - -3.14.0 / 2014-07-11 -=================== - - * add explicit "Rosetta Flash JSONP abuse" protection - - previous versions are not vulnerable; this is just explicit protection - * deprecate `res.redirect(url, status)` -- use `res.redirect(status, url)` instead - * fix `res.send(status, num)` to send `num` as json (not error) - * remove unnecessary escaping when `res.jsonp` returns JSON response - * deps: basic-auth@1.0.0 - - support empty password - - support empty username - * deps: connect@2.23.0 - - deps: debug@1.0.3 - - deps: express-session@~1.6.4 - - deps: method-override@~2.1.0 - - deps: parseurl@~1.1.3 - - deps: serve-static@~1.3.1 - * deps: debug@1.0.3 - - Add support for multiple wildcards in namespaces - * deps: methods@1.1.0 - - add `CONNECT` - * deps: parseurl@~1.1.3 - - faster parsing of href-only URLs - -3.13.0 / 2014-07-03 -=================== - - * add deprecation message to `app.configure` - * add deprecation message to `req.auth` - * use `basic-auth` to parse `Authorization` header - * deps: connect@2.22.0 - - deps: csurf@~1.3.0 - - deps: express-session@~1.6.1 - - deps: multiparty@3.3.0 - - deps: serve-static@~1.3.0 - * deps: send@0.5.0 - - Accept string for `maxage` (converted by `ms`) - - Include link in default redirect response - -3.12.1 / 2014-06-26 -=================== - - * deps: connect@2.21.1 - - deps: cookie-parser@1.3.2 - - deps: cookie-signature@1.0.4 - - deps: express-session@~1.5.2 - - deps: type-is@~1.3.2 - * deps: cookie-signature@1.0.4 - - fix for timing attacks - -3.12.0 / 2014-06-21 -=================== - - * use `media-typer` to alter content-type charset - * deps: connect@2.21.0 - - deprecate `connect(middleware)` -- use `app.use(middleware)` instead - - deprecate `connect.createServer()` -- use `connect()` instead - - fix `res.setHeader()` patch to work with get -> append -> set pattern - - deps: compression@~1.0.8 - - deps: errorhandler@~1.1.1 - - deps: express-session@~1.5.0 - - deps: serve-index@~1.1.3 - -3.11.0 / 2014-06-19 -=================== - - * deprecate things with `depd` module - * deps: buffer-crc32@0.2.3 - * deps: connect@2.20.2 - - deprecate `verify` option to `json` -- use `body-parser` npm module instead - - deprecate `verify` option to `urlencoded` -- use `body-parser` npm module instead - - deprecate things with `depd` module - - use `finalhandler` for final response handling - - use `media-typer` to parse `content-type` for charset - - deps: body-parser@1.4.3 - - deps: connect-timeout@1.1.1 - - deps: cookie-parser@1.3.1 - - deps: csurf@1.2.2 - - deps: errorhandler@1.1.0 - - deps: express-session@1.4.0 - - deps: multiparty@3.2.9 - - deps: serve-index@1.1.2 - - deps: type-is@1.3.1 - - deps: vhost@2.0.0 - -3.10.5 / 2014-06-11 -=================== - - * deps: connect@2.19.6 - - deps: body-parser@1.3.1 - - deps: compression@1.0.7 - - deps: debug@1.0.2 - - deps: serve-index@1.1.1 - - deps: serve-static@1.2.3 - * deps: debug@1.0.2 - * deps: send@0.4.3 - - Do not throw uncatchable error on file open race condition - - Use `escape-html` for HTML escaping - - deps: debug@1.0.2 - - deps: finished@1.2.2 - - deps: fresh@0.2.2 - -3.10.4 / 2014-06-09 -=================== - - * deps: connect@2.19.5 - - fix "event emitter leak" warnings - - deps: csurf@1.2.1 - - deps: debug@1.0.1 - - deps: serve-static@1.2.2 - - deps: type-is@1.2.1 - * deps: debug@1.0.1 - * deps: send@0.4.2 - - fix "event emitter leak" warnings - - deps: finished@1.2.1 - - deps: debug@1.0.1 - -3.10.3 / 2014-06-05 -=================== - - * use `vary` module for `res.vary` - * deps: connect@2.19.4 - - deps: errorhandler@1.0.2 - - deps: method-override@2.0.2 - - deps: serve-favicon@2.0.1 - * deps: debug@1.0.0 - -3.10.2 / 2014-06-03 -=================== - - * deps: connect@2.19.3 - - deps: compression@1.0.6 - -3.10.1 / 2014-06-03 -=================== - - * deps: connect@2.19.2 - - deps: compression@1.0.4 - * deps: proxy-addr@1.0.1 - -3.10.0 / 2014-06-02 -=================== - - * deps: connect@2.19.1 - - deprecate `methodOverride()` -- use `method-override` npm module instead - - deps: body-parser@1.3.0 - - deps: method-override@2.0.1 - - deps: multiparty@3.2.8 - - deps: response-time@2.0.0 - - deps: serve-static@1.2.1 - * deps: methods@1.0.1 - * deps: send@0.4.1 - - Send `max-age` in `Cache-Control` in correct format - -3.9.0 / 2014-05-30 -================== - - * custom etag control with `app.set('etag', val)` - - `app.set('etag', function(body, encoding){ return '"etag"' })` custom etag generation - - `app.set('etag', 'weak')` weak tag - - `app.set('etag', 'strong')` strong etag - - `app.set('etag', false)` turn off - - `app.set('etag', true)` standard etag - * Include ETag in HEAD requests - * mark `res.send` ETag as weak and reduce collisions - * update connect to 2.18.0 - - deps: compression@1.0.3 - - deps: serve-index@1.1.0 - - deps: serve-static@1.2.0 - * update send to 0.4.0 - - Calculate ETag with md5 for reduced collisions - - Ignore stream errors after request ends - - deps: debug@0.8.1 - -3.8.1 / 2014-05-27 -================== - - * update connect to 2.17.3 - - deps: body-parser@1.2.2 - - deps: express-session@1.2.1 - - deps: method-override@1.0.2 - -3.8.0 / 2014-05-21 -================== - - * keep previous `Content-Type` for `res.jsonp` - * set proper `charset` in `Content-Type` for `res.send` - * update connect to 2.17.1 - - fix `res.charset` appending charset when `content-type` has one - - deps: express-session@1.2.0 - - deps: morgan@1.1.1 - - deps: serve-index@1.0.3 - -3.7.0 / 2014-05-18 -================== - - * proper proxy trust with `app.set('trust proxy', trust)` - - `app.set('trust proxy', 1)` trust first hop - - `app.set('trust proxy', 'loopback')` trust loopback addresses - - `app.set('trust proxy', '10.0.0.1')` trust single IP - - `app.set('trust proxy', '10.0.0.1/16')` trust subnet - - `app.set('trust proxy', '10.0.0.1, 10.0.0.2')` trust list - - `app.set('trust proxy', false)` turn off - - `app.set('trust proxy', true)` trust everything - * update connect to 2.16.2 - - deprecate `res.headerSent` -- use `res.headersSent` - - deprecate `res.on("header")` -- use on-headers module instead - - fix edge-case in `res.appendHeader` that would append in wrong order - - json: use body-parser - - urlencoded: use body-parser - - dep: bytes@1.0.0 - - dep: cookie-parser@1.1.0 - - dep: csurf@1.2.0 - - dep: express-session@1.1.0 - - dep: method-override@1.0.1 - -3.6.0 / 2014-05-09 -================== - - * deprecate `app.del()` -- use `app.delete()` instead - * deprecate `res.json(obj, status)` -- use `res.json(status, obj)` instead - - the edge-case `res.json(status, num)` requires `res.status(status).json(num)` - * deprecate `res.jsonp(obj, status)` -- use `res.jsonp(status, obj)` instead - - the edge-case `res.jsonp(status, num)` requires `res.status(status).jsonp(num)` - * support PURGE method - - add `app.purge` - - add `router.purge` - - include PURGE in `app.all` - * update connect to 2.15.0 - * Add `res.appendHeader` - * Call error stack even when response has been sent - * Patch `res.headerSent` to return Boolean - * Patch `res.headersSent` for node.js 0.8 - * Prevent default 404 handler after response sent - * dep: compression@1.0.2 - * dep: connect-timeout@1.1.0 - * dep: debug@^0.8.0 - * dep: errorhandler@1.0.1 - * dep: express-session@1.0.4 - * dep: morgan@1.0.1 - * dep: serve-favicon@2.0.0 - * dep: serve-index@1.0.2 - * update debug to 0.8.0 - * add `enable()` method - * change from stderr to stdout - * update methods to 1.0.0 - - add PURGE - * update mkdirp to 0.5.0 - -3.5.3 / 2014-05-08 -================== - - * fix `req.host` for IPv6 literals - * fix `res.jsonp` error if callback param is object - -3.5.2 / 2014-04-24 -================== - - * update connect to 2.14.5 - * update cookie to 0.1.2 - * update mkdirp to 0.4.0 - * update send to 0.3.0 - -3.5.1 / 2014-03-25 -================== - - * pin less-middleware in generated app - -3.5.0 / 2014-03-06 -================== - - * bump deps - -3.4.8 / 2014-01-13 -================== - - * prevent incorrect automatic OPTIONS responses #1868 @dpatti - * update binary and examples for jade 1.0 #1876 @yossi, #1877 @reqshark, #1892 @matheusazzi - * throw 400 in case of malformed paths @rlidwka - -3.4.7 / 2013-12-10 -================== - - * update connect - -3.4.6 / 2013-12-01 -================== - - * update connect (raw-body) - -3.4.5 / 2013-11-27 -================== - - * update connect - * res.location: remove leading ./ #1802 @kapouer - * res.redirect: fix `res.redirect('toString') #1829 @michaelficarra - * res.send: always send ETag when content-length > 0 - * router: add Router.all() method - -3.4.4 / 2013-10-29 -================== - - * update connect - * update supertest - * update methods - * express(1): replace bodyParser() with urlencoded() and json() #1795 @chirag04 - -3.4.3 / 2013-10-23 -================== - - * update connect - -3.4.2 / 2013-10-18 -================== - - * update connect - * downgrade commander - -3.4.1 / 2013-10-15 -================== - - * update connect - * update commander - * jsonp: check if callback is a function - * router: wrap encodeURIComponent in a try/catch #1735 (@lxe) - * res.format: now includes charset @1747 (@sorribas) - * res.links: allow multiple calls @1746 (@sorribas) - -3.4.0 / 2013-09-07 -================== - - * add res.vary(). Closes #1682 - * update connect - -3.3.8 / 2013-09-02 -================== - - * update connect - -3.3.7 / 2013-08-28 -================== - - * update connect - -3.3.6 / 2013-08-27 -================== - - * Revert "remove charset from json responses. Closes #1631" (causes issues in some clients) - * add: req.accepts take an argument list - -3.3.4 / 2013-07-08 -================== - - * update send and connect - -3.3.3 / 2013-07-04 -================== - - * update connect - -3.3.2 / 2013-07-03 -================== - - * update connect - * update send - * remove .version export - -3.3.1 / 2013-06-27 -================== - - * update connect - -3.3.0 / 2013-06-26 -================== - - * update connect - * add support for multiple X-Forwarded-Proto values. Closes #1646 - * change: remove charset from json responses. Closes #1631 - * change: return actual booleans from req.accept* functions - * fix jsonp callback array throw - -3.2.6 / 2013-06-02 -================== - - * update connect - -3.2.5 / 2013-05-21 -================== - - * update connect - * update node-cookie - * add: throw a meaningful error when there is no default engine - * change generation of ETags with res.send() to GET requests only. Closes #1619 - -3.2.4 / 2013-05-09 -================== - - * fix `req.subdomains` when no Host is present - * fix `req.host` when no Host is present, return undefined - -3.2.3 / 2013-05-07 -================== - - * update connect / qs - -3.2.2 / 2013-05-03 -================== - - * update qs - -3.2.1 / 2013-04-29 -================== - - * add app.VERB() paths array deprecation warning - * update connect - * update qs and remove all ~ semver crap - * fix: accept number as value of Signed Cookie - -3.2.0 / 2013-04-15 -================== - - * add "view" constructor setting to override view behaviour - * add req.acceptsEncoding(name) - * add req.acceptedEncodings - * revert cookie signature change causing session race conditions - * fix sorting of Accept values of the same quality - -3.1.2 / 2013-04-12 -================== - - * add support for custom Accept parameters - * update cookie-signature - -3.1.1 / 2013-04-01 -================== - - * add X-Forwarded-Host support to `req.host` - * fix relative redirects - * update mkdirp - * update buffer-crc32 - * remove legacy app.configure() method from app template. - -3.1.0 / 2013-01-25 -================== - - * add support for leading "." in "view engine" setting - * add array support to `res.set()` - * add node 0.8.x to travis.yml - * add "subdomain offset" setting for tweaking `req.subdomains` - * add `res.location(url)` implementing `res.redirect()`-like setting of Location - * use app.get() for x-powered-by setting for inheritance - * fix colons in passwords for `req.auth` - -3.0.6 / 2013-01-04 -================== - - * add http verb methods to Router - * update connect - * fix mangling of the `res.cookie()` options object - * fix jsonp whitespace escape. Closes #1132 - -3.0.5 / 2012-12-19 -================== - - * add throwing when a non-function is passed to a route - * fix: explicitly remove Transfer-Encoding header from 204 and 304 responses - * revert "add 'etag' option" - -3.0.4 / 2012-12-05 -================== - - * add 'etag' option to disable `res.send()` Etags - * add escaping of urls in text/plain in `res.redirect()` - for old browsers interpreting as html - * change crc32 module for a more liberal license - * update connect - -3.0.3 / 2012-11-13 -================== - - * update connect - * update cookie module - * fix cookie max-age - -3.0.2 / 2012-11-08 -================== - - * add OPTIONS to cors example. Closes #1398 - * fix route chaining regression. Closes #1397 - -3.0.1 / 2012-11-01 -================== - - * update connect - -3.0.0 / 2012-10-23 -================== - - * add `make clean` - * add "Basic" check to req.auth - * add `req.auth` test coverage - * add cb && cb(payload) to `res.jsonp()`. Closes #1374 - * add backwards compat for `res.redirect()` status. Closes #1336 - * add support for `res.json()` to retain previously defined Content-Types. Closes #1349 - * update connect - * change `res.redirect()` to utilize a pathname-relative Location again. Closes #1382 - * remove non-primitive string support for `res.send()` - * fix view-locals example. Closes #1370 - * fix route-separation example - -3.0.0rc5 / 2012-09-18 -================== - - * update connect - * add redis search example - * add static-files example - * add "x-powered-by" setting (`app.disable('x-powered-by')`) - * add "application/octet-stream" redirect Accept test case. Closes #1317 - -3.0.0rc4 / 2012-08-30 -================== - - * add `res.jsonp()`. Closes #1307 - * add "verbose errors" option to error-pages example - * add another route example to express(1) so people are not so confused - * add redis online user activity tracking example - * update connect dep - * fix etag quoting. Closes #1310 - * fix error-pages 404 status - * fix jsonp callback char restrictions - * remove old OPTIONS default response - -3.0.0rc3 / 2012-08-13 -================== - - * update connect dep - * fix signed cookies to work with `connect.cookieParser()` ("s:" prefix was missing) [tnydwrds] - * fix `res.render()` clobbering of "locals" - -3.0.0rc2 / 2012-08-03 -================== - - * add CORS example - * update connect dep - * deprecate `.createServer()` & remove old stale examples - * fix: escape `res.redirect()` link - * fix vhost example - -3.0.0rc1 / 2012-07-24 -================== - - * add more examples to view-locals - * add scheme-relative redirects (`res.redirect("//foo.com")`) support - * update cookie dep - * update connect dep - * update send dep - * fix `express(1)` -h flag, use -H for hogan. Closes #1245 - * fix `res.sendfile()` socket error handling regression - -3.0.0beta7 / 2012-07-16 -================== - - * update connect dep for `send()` root normalization regression - -3.0.0beta6 / 2012-07-13 -================== - - * add `err.view` property for view errors. Closes #1226 - * add "jsonp callback name" setting - * add support for "/foo/:bar*" non-greedy matches - * change `res.sendfile()` to use `send()` module - * change `res.send` to use "response-send" module - * remove `app.locals.use` and `res.locals.use`, use regular middleware - -3.0.0beta5 / 2012-07-03 -================== - - * add "make check" support - * add route-map example - * add `res.json(obj, status)` support back for BC - * add "methods" dep, remove internal methods module - * update connect dep - * update auth example to utilize cores pbkdf2 - * updated tests to use "supertest" - -3.0.0beta4 / 2012-06-25 -================== - - * Added `req.auth` - * Added `req.range(size)` - * Added `res.links(obj)` - * Added `res.send(body, status)` support back for backwards compat - * Added `.default()` support to `res.format()` - * Added 2xx / 304 check to `req.fresh` - * Revert "Added + support to the router" - * Fixed `res.send()` freshness check, respect res.statusCode - -3.0.0beta3 / 2012-06-15 -================== - - * Added hogan `--hjs` to express(1) [nullfirm] - * Added another example to content-negotiation - * Added `fresh` dep - * Changed: `res.send()` always checks freshness - * Fixed: expose connects mime module. Closes #1165 - -3.0.0beta2 / 2012-06-06 -================== - - * Added `+` support to the router - * Added `req.host` - * Changed `req.param()` to check route first - * Update connect dep - -3.0.0beta1 / 2012-06-01 -================== - - * Added `res.format()` callback to override default 406 behaviour - * Fixed `res.redirect()` 406. Closes #1154 - -3.0.0alpha5 / 2012-05-30 -================== - - * Added `req.ip` - * Added `{ signed: true }` option to `res.cookie()` - * Removed `res.signedCookie()` - * Changed: dont reverse `req.ips` - * Fixed "trust proxy" setting check for `req.ips` - -3.0.0alpha4 / 2012-05-09 -================== - - * Added: allow `[]` in jsonp callback. Closes #1128 - * Added `PORT` env var support in generated template. Closes #1118 [benatkin] - * Updated: connect 2.2.2 - -3.0.0alpha3 / 2012-05-04 -================== - - * Added public `app.routes`. Closes #887 - * Added _view-locals_ example - * Added _mvc_ example - * Added `res.locals.use()`. Closes #1120 - * Added conditional-GET support to `res.send()` - * Added: coerce `res.set()` values to strings - * Changed: moved `static()` in generated apps below router - * Changed: `res.send()` only set ETag when not previously set - * Changed connect 2.2.1 dep - * Changed: `make test` now runs unit / acceptance tests - * Fixed req/res proto inheritance - -3.0.0alpha2 / 2012-04-26 -================== - - * Added `make benchmark` back - * Added `res.send()` support for `String` objects - * Added client-side data exposing example - * Added `res.header()` and `req.header()` aliases for BC - * Added `express.createServer()` for BC - * Perf: memoize parsed urls - * Perf: connect 2.2.0 dep - * Changed: make `expressInit()` middleware self-aware - * Fixed: use app.get() for all core settings - * Fixed redis session example - * Fixed session example. Closes #1105 - * Fixed generated express dep. Closes #1078 - -3.0.0alpha1 / 2012-04-15 -================== - - * Added `app.locals.use(callback)` - * Added `app.locals` object - * Added `app.locals(obj)` - * Added `res.locals` object - * Added `res.locals(obj)` - * Added `res.format()` for content-negotiation - * Added `app.engine()` - * Added `res.cookie()` JSON cookie support - * Added "trust proxy" setting - * Added `req.subdomains` - * Added `req.protocol` - * Added `req.secure` - * Added `req.path` - * Added `req.ips` - * Added `req.fresh` - * Added `req.stale` - * Added comma-delimited / array support for `req.accepts()` - * Added debug instrumentation - * Added `res.set(obj)` - * Added `res.set(field, value)` - * Added `res.get(field)` - * Added `app.get(setting)`. Closes #842 - * Added `req.acceptsLanguage()` - * Added `req.acceptsCharset()` - * Added `req.accepted` - * Added `req.acceptedLanguages` - * Added `req.acceptedCharsets` - * Added "json replacer" setting - * Added "json spaces" setting - * Added X-Forwarded-Proto support to `res.redirect()`. Closes #92 - * Added `--less` support to express(1) - * Added `express.response` prototype - * Added `express.request` prototype - * Added `express.application` prototype - * Added `app.path()` - * Added `app.render()` - * Added `res.type()` to replace `res.contentType()` - * Changed: `res.redirect()` to add relative support - * Changed: enable "jsonp callback" by default - * Changed: renamed "case sensitive routes" to "case sensitive routing" - * Rewrite of all tests with mocha - * Removed "root" setting - * Removed `res.redirect('home')` support - * Removed `req.notify()` - * Removed `app.register()` - * Removed `app.redirect()` - * Removed `app.is()` - * Removed `app.helpers()` - * Removed `app.dynamicHelpers()` - * Fixed `res.sendfile()` with non-GET. Closes #723 - * Fixed express(1) public dir for windows. Closes #866 - -2.5.9/ 2012-04-02 -================== - - * Added support for PURGE request method [pbuyle] - * Fixed `express(1)` generated app `app.address()` before `listening` [mmalecki] - -2.5.8 / 2012-02-08 -================== - - * Update mkdirp dep. Closes #991 - -2.5.7 / 2012-02-06 -================== - - * Fixed `app.all` duplicate DELETE requests [mscdex] - -2.5.6 / 2012-01-13 -================== - - * Updated hamljs dev dep. Closes #953 - -2.5.5 / 2012-01-08 -================== - - * Fixed: set `filename` on cached templates [matthewleon] - -2.5.4 / 2012-01-02 -================== - - * Fixed `express(1)` eol on 0.4.x. Closes #947 - -2.5.3 / 2011-12-30 -================== - - * Fixed `req.is()` when a charset is present - -2.5.2 / 2011-12-10 -================== - - * Fixed: express(1) LF -> CRLF for windows - -2.5.1 / 2011-11-17 -================== - - * Changed: updated connect to 1.8.x - * Removed sass.js support from express(1) - -2.5.0 / 2011-10-24 -================== - - * Added ./routes dir for generated app by default - * Added npm install reminder to express(1) app gen - * Added 0.5.x support - * Removed `make test-cov` since it wont work with node 0.5.x - * Fixed express(1) public dir for windows. Closes #866 - -2.4.7 / 2011-10-05 -================== - - * Added mkdirp to express(1). Closes #795 - * Added simple _json-config_ example - * Added shorthand for the parsed request's pathname via `req.path` - * Changed connect dep to 1.7.x to fix npm issue... - * Fixed `res.redirect()` __HEAD__ support. [reported by xerox] - * Fixed `req.flash()`, only escape args - * Fixed absolute path checking on windows. Closes #829 [reported by andrewpmckenzie] - -2.4.6 / 2011-08-22 -================== - - * Fixed multiple param callback regression. Closes #824 [reported by TroyGoode] - -2.4.5 / 2011-08-19 -================== - - * Added support for routes to handle errors. Closes #809 - * Added `app.routes.all()`. Closes #803 - * Added "basepath" setting to work in conjunction with reverse proxies etc. - * Refactored `Route` to use a single array of callbacks - * Added support for multiple callbacks for `app.param()`. Closes #801 -Closes #805 - * Changed: removed .call(self) for route callbacks - * Dependency: `qs >= 0.3.1` - * Fixed `res.redirect()` on windows due to `join()` usage. Closes #808 - -2.4.4 / 2011-08-05 -================== - - * Fixed `res.header()` intention of a set, even when `undefined` - * Fixed `*`, value no longer required - * Fixed `res.send(204)` support. Closes #771 - -2.4.3 / 2011-07-14 -================== - - * Added docs for `status` option special-case. Closes #739 - * Fixed `options.filename`, exposing the view path to template engines - -2.4.2. / 2011-07-06 -================== - - * Revert "removed jsonp stripping" for XSS - -2.4.1 / 2011-07-06 -================== - - * Added `res.json()` JSONP support. Closes #737 - * Added _extending-templates_ example. Closes #730 - * Added "strict routing" setting for trailing slashes - * Added support for multiple envs in `app.configure()` calls. Closes #735 - * Changed: `res.send()` using `res.json()` - * Changed: when cookie `path === null` don't default it - * Changed; default cookie path to "home" setting. Closes #731 - * Removed _pids/logs_ creation from express(1) - -2.4.0 / 2011-06-28 -================== - - * Added chainable `res.status(code)` - * Added `res.json()`, an explicit version of `res.send(obj)` - * Added simple web-service example - -2.3.12 / 2011-06-22 -================== - - * \#express is now on freenode! come join! - * Added `req.get(field, param)` - * Added links to Japanese documentation, thanks @hideyukisaito! - * Added; the `express(1)` generated app outputs the env - * Added `content-negotiation` example - * Dependency: connect >= 1.5.1 < 2.0.0 - * Fixed view layout bug. Closes #720 - * Fixed; ignore body on 304. Closes #701 - -2.3.11 / 2011-06-04 -================== - - * Added `npm test` - * Removed generation of dummy test file from `express(1)` - * Fixed; `express(1)` adds express as a dep - * Fixed; prune on `prepublish` - -2.3.10 / 2011-05-27 -================== - - * Added `req.route`, exposing the current route - * Added _package.json_ generation support to `express(1)` - * Fixed call to `app.param()` function for optional params. Closes #682 - -2.3.9 / 2011-05-25 -================== - - * Fixed bug-ish with `../' in `res.partial()` calls - -2.3.8 / 2011-05-24 -================== - - * Fixed `app.options()` - -2.3.7 / 2011-05-23 -================== - - * Added route `Collection`, ex: `app.get('/user/:id').remove();` - * Added support for `app.param(fn)` to define param logic - * Removed `app.param()` support for callback with return value - * Removed module.parent check from express(1) generated app. Closes #670 - * Refactored router. Closes #639 - -2.3.6 / 2011-05-20 -================== - - * Changed; using devDependencies instead of git submodules - * Fixed redis session example - * Fixed markdown example - * Fixed view caching, should not be enabled in development - -2.3.5 / 2011-05-20 -================== - - * Added export `.view` as alias for `.View` - -2.3.4 / 2011-05-08 -================== - - * Added `./examples/say` - * Fixed `res.sendfile()` bug preventing the transfer of files with spaces - -2.3.3 / 2011-05-03 -================== - - * Added "case sensitive routes" option. - * Changed; split methods supported per rfc [slaskis] - * Fixed route-specific middleware when using the same callback function several times - -2.3.2 / 2011-04-27 -================== - - * Fixed view hints - -2.3.1 / 2011-04-26 -================== - - * Added `app.match()` as `app.match.all()` - * Added `app.lookup()` as `app.lookup.all()` - * Added `app.remove()` for `app.remove.all()` - * Added `app.remove.VERB()` - * Fixed template caching collision issue. Closes #644 - * Moved router over from connect and started refactor - -2.3.0 / 2011-04-25 -================== - - * Added options support to `res.clearCookie()` - * Added `res.helpers()` as alias of `res.locals()` - * Added; json defaults to UTF-8 with `res.send()`. Closes #632. [Daniel * Dependency `connect >= 1.4.0` - * Changed; auto set Content-Type in res.attachement [Aaron Heckmann] - * Renamed "cache views" to "view cache". Closes #628 - * Fixed caching of views when using several apps. Closes #637 - * Fixed gotcha invoking `app.param()` callbacks once per route middleware. -Closes #638 - * Fixed partial lookup precedence. Closes #631 -Shaw] - -2.2.2 / 2011-04-12 -================== - - * Added second callback support for `res.download()` connection errors - * Fixed `filename` option passing to template engine - -2.2.1 / 2011-04-04 -================== - - * Added `layout(path)` helper to change the layout within a view. Closes #610 - * Fixed `partial()` collection object support. - Previously only anything with `.length` would work. - When `.length` is present one must still be aware of holes, - however now `{ collection: {foo: 'bar'}}` is valid, exposes - `keyInCollection` and `keysInCollection`. - - * Performance improved with better view caching - * Removed `request` and `response` locals - * Changed; errorHandler page title is now `Express` instead of `Connect` - -2.2.0 / 2011-03-30 -================== - - * Added `app.lookup.VERB()`, ex `app.lookup.put('/user/:id')`. Closes #606 - * Added `app.match.VERB()`, ex `app.match.put('/user/12')`. Closes #606 - * Added `app.VERB(path)` as alias of `app.lookup.VERB()`. - * Dependency `connect >= 1.2.0` - -2.1.1 / 2011-03-29 -================== - - * Added; expose `err.view` object when failing to locate a view - * Fixed `res.partial()` call `next(err)` when no callback is given [reported by aheckmann] - * Fixed; `res.send(undefined)` responds with 204 [aheckmann] - -2.1.0 / 2011-03-24 -================== - - * Added `/_?` partial lookup support. Closes #447 - * Added `request`, `response`, and `app` local variables - * Added `settings` local variable, containing the app's settings - * Added `req.flash()` exception if `req.session` is not available - * Added `res.send(bool)` support (json response) - * Fixed stylus example for latest version - * Fixed; wrap try/catch around `res.render()` - -2.0.0 / 2011-03-17 -================== - - * Fixed up index view path alternative. - * Changed; `res.locals()` without object returns the locals - -2.0.0rc3 / 2011-03-17 -================== - - * Added `res.locals(obj)` to compliment `res.local(key, val)` - * Added `res.partial()` callback support - * Fixed recursive error reporting issue in `res.render()` - -2.0.0rc2 / 2011-03-17 -================== - - * Changed; `partial()` "locals" are now optional - * Fixed `SlowBuffer` support. Closes #584 [reported by tyrda01] - * Fixed .filename view engine option [reported by drudge] - * Fixed blog example - * Fixed `{req,res}.app` reference when mounting [Ben Weaver] - -2.0.0rc / 2011-03-14 -================== - - * Fixed; expose `HTTPSServer` constructor - * Fixed express(1) default test charset. Closes #579 [reported by secoif] - * Fixed; default charset to utf-8 instead of utf8 for lame IE [reported by NickP] - -2.0.0beta3 / 2011-03-09 -================== - - * Added support for `res.contentType()` literal - The original `res.contentType('.json')`, - `res.contentType('application/json')`, and `res.contentType('json')` - will work now. - * Added `res.render()` status option support back - * Added charset option for `res.render()` - * Added `.charset` support (via connect 1.0.4) - * Added view resolution hints when in development and a lookup fails - * Added layout lookup support relative to the page view. - For example while rendering `./views/user/index.jade` if you create - `./views/user/layout.jade` it will be used in favour of the root layout. - * Fixed `res.redirect()`. RFC states absolute url [reported by unlink] - * Fixed; default `res.send()` string charset to utf8 - * Removed `Partial` constructor (not currently used) - -2.0.0beta2 / 2011-03-07 -================== - - * Added res.render() `.locals` support back to aid in migration process - * Fixed flash example - -2.0.0beta / 2011-03-03 -================== - - * Added HTTPS support - * Added `res.cookie()` maxAge support - * Added `req.header()` _Referrer_ / _Referer_ special-case, either works - * Added mount support for `res.redirect()`, now respects the mount-point - * Added `union()` util, taking place of `merge(clone())` combo - * Added stylus support to express(1) generated app - * Added secret to session middleware used in examples and generated app - * Added `res.local(name, val)` for progressive view locals - * Added default param support to `req.param(name, default)` - * Added `app.disabled()` and `app.enabled()` - * Added `app.register()` support for omitting leading ".", either works - * Added `res.partial()`, using the same interface as `partial()` within a view. Closes #539 - * Added `app.param()` to map route params to async/sync logic - * Added; aliased `app.helpers()` as `app.locals()`. Closes #481 - * Added extname with no leading "." support to `res.contentType()` - * Added `cache views` setting, defaulting to enabled in "production" env - * Added index file partial resolution, eg: partial('user') may try _views/user/index.jade_. - * Added `req.accepts()` support for extensions - * Changed; `res.download()` and `res.sendfile()` now utilize Connect's - static file server `connect.static.send()`. - * Changed; replaced `connect.utils.mime()` with npm _mime_ module - * Changed; allow `req.query` to be pre-defined (via middleware or other parent - * Changed view partial resolution, now relative to parent view - * Changed view engine signature. no longer `engine.render(str, options, callback)`, now `engine.compile(str, options) -> Function`, the returned function accepts `fn(locals)`. - * Fixed `req.param()` bug returning Array.prototype methods. Closes #552 - * Fixed; using `Stream#pipe()` instead of `sys.pump()` in `res.sendfile()` - * Fixed; using _qs_ module instead of _querystring_ - * Fixed; strip unsafe chars from jsonp callbacks - * Removed "stream threshold" setting - -1.0.8 / 2011-03-01 -================== - - * Allow `req.query` to be pre-defined (via middleware or other parent app) - * "connect": ">= 0.5.0 < 1.0.0". Closes #547 - * Removed the long deprecated __EXPRESS_ENV__ support - -1.0.7 / 2011-02-07 -================== - - * Fixed `render()` setting inheritance. - Mounted apps would not inherit "view engine" - -1.0.6 / 2011-02-07 -================== - - * Fixed `view engine` setting bug when period is in dirname - -1.0.5 / 2011-02-05 -================== - - * Added secret to generated app `session()` call - -1.0.4 / 2011-02-05 -================== - - * Added `qs` dependency to _package.json_ - * Fixed namespaced `require()`s for latest connect support - -1.0.3 / 2011-01-13 -================== - - * Remove unsafe characters from JSONP callback names [Ryan Grove] - -1.0.2 / 2011-01-10 -================== - - * Removed nested require, using `connect.router` - -1.0.1 / 2010-12-29 -================== - - * Fixed for middleware stacked via `createServer()` - previously the `foo` middleware passed to `createServer(foo)` - would not have access to Express methods such as `res.send()` - or props like `req.query` etc. - -1.0.0 / 2010-11-16 -================== - - * Added; deduce partial object names from the last segment. - For example by default `partial('forum/post', postObject)` will - give you the _post_ object, providing a meaningful default. - * Added http status code string representation to `res.redirect()` body - * Added; `res.redirect()` supporting _text/plain_ and _text/html_ via __Accept__. - * Added `req.is()` to aid in content negotiation - * Added partial local inheritance [suggested by masylum]. Closes #102 - providing access to parent template locals. - * Added _-s, --session[s]_ flag to express(1) to add session related middleware - * Added _--template_ flag to express(1) to specify the - template engine to use. - * Added _--css_ flag to express(1) to specify the - stylesheet engine to use (or just plain css by default). - * Added `app.all()` support [thanks aheckmann] - * Added partial direct object support. - You may now `partial('user', user)` providing the "user" local, - vs previously `partial('user', { object: user })`. - * Added _route-separation_ example since many people question ways - to do this with CommonJS modules. Also view the _blog_ example for - an alternative. - * Performance; caching view path derived partial object names - * Fixed partial local inheritance precedence. [reported by Nick Poulden] Closes #454 - * Fixed jsonp support; _text/javascript_ as per mailinglist discussion - -1.0.0rc4 / 2010-10-14 -================== - - * Added _NODE_ENV_ support, _EXPRESS_ENV_ is deprecated and will be removed in 1.0.0 - * Added route-middleware support (very helpful, see the [docs](http://expressjs.com/guide.html#Route-Middleware)) - * Added _jsonp callback_ setting to enable/disable jsonp autowrapping [Dav Glass] - * Added callback query check on response.send to autowrap JSON objects for simple webservice implementations [Dav Glass] - * Added `partial()` support for array-like collections. Closes #434 - * Added support for swappable querystring parsers - * Added session usage docs. Closes #443 - * Added dynamic helper caching. Closes #439 [suggested by maritz] - * Added authentication example - * Added basic Range support to `res.sendfile()` (and `res.download()` etc) - * Changed; `express(1)` generated app using 2 spaces instead of 4 - * Default env to "development" again [aheckmann] - * Removed _context_ option is no more, use "scope" - * Fixed; exposing _./support_ libs to examples so they can run without installs - * Fixed mvc example - -1.0.0rc3 / 2010-09-20 -================== - - * Added confirmation for `express(1)` app generation. Closes #391 - * Added extending of flash formatters via `app.flashFormatters` - * Added flash formatter support. Closes #411 - * Added streaming support to `res.sendfile()` using `sys.pump()` when >= "stream threshold" - * Added _stream threshold_ setting for `res.sendfile()` - * Added `res.send()` __HEAD__ support - * Added `res.clearCookie()` - * Added `res.cookie()` - * Added `res.render()` headers option - * Added `res.redirect()` response bodies - * Added `res.render()` status option support. Closes #425 [thanks aheckmann] - * Fixed `res.sendfile()` responding with 403 on malicious path - * Fixed `res.download()` bug; when an error occurs remove _Content-Disposition_ - * Fixed; mounted apps settings now inherit from parent app [aheckmann] - * Fixed; stripping Content-Length / Content-Type when 204 - * Fixed `res.send()` 204. Closes #419 - * Fixed multiple _Set-Cookie_ headers via `res.header()`. Closes #402 - * Fixed bug messing with error handlers when `listenFD()` is called instead of `listen()`. [thanks guillermo] - - -1.0.0rc2 / 2010-08-17 -================== - - * Added `app.register()` for template engine mapping. Closes #390 - * Added `res.render()` callback support as second argument (no options) - * Added callback support to `res.download()` - * Added callback support for `res.sendfile()` - * Added support for middleware access via `express.middlewareName()` vs `connect.middlewareName()` - * Added "partials" setting to docs - * Added default expresso tests to `express(1)` generated app. Closes #384 - * Fixed `res.sendfile()` error handling, defer via `next()` - * Fixed `res.render()` callback when a layout is used [thanks guillermo] - * Fixed; `make install` creating ~/.node_libraries when not present - * Fixed issue preventing error handlers from being defined anywhere. Closes #387 - -1.0.0rc / 2010-07-28 -================== - - * Added mounted hook. Closes #369 - * Added connect dependency to _package.json_ - - * Removed "reload views" setting and support code - development env never caches, production always caches. - - * Removed _param_ in route callbacks, signature is now - simply (req, res, next), previously (req, res, params, next). - Use _req.params_ for path captures, _req.query_ for GET params. - - * Fixed "home" setting - * Fixed middleware/router precedence issue. Closes #366 - * Fixed; _configure()_ callbacks called immediately. Closes #368 - -1.0.0beta2 / 2010-07-23 -================== - - * Added more examples - * Added; exporting `Server` constructor - * Added `Server#helpers()` for view locals - * Added `Server#dynamicHelpers()` for dynamic view locals. Closes #349 - * Added support for absolute view paths - * Added; _home_ setting defaults to `Server#route` for mounted apps. Closes #363 - * Added Guillermo Rauch to the contributor list - * Added support for "as" for non-collection partials. Closes #341 - * Fixed _install.sh_, ensuring _~/.node_libraries_ exists. Closes #362 [thanks jf] - * Fixed `res.render()` exceptions, now passed to `next()` when no callback is given [thanks guillermo] - * Fixed instanceof `Array` checks, now `Array.isArray()` - * Fixed express(1) expansion of public dirs. Closes #348 - * Fixed middleware precedence. Closes #345 - * Fixed view watcher, now async [thanks aheckmann] - -1.0.0beta / 2010-07-15 -================== - - * Re-write - - much faster - - much lighter - - Check [ExpressJS.com](http://expressjs.com) for migration guide and updated docs - -0.14.0 / 2010-06-15 -================== - - * Utilize relative requires - * Added Static bufferSize option [aheckmann] - * Fixed caching of view and partial subdirectories [aheckmann] - * Fixed mime.type() comments now that ".ext" is not supported - * Updated haml submodule - * Updated class submodule - * Removed bin/express - -0.13.0 / 2010-06-01 -================== - - * Added node v0.1.97 compatibility - * Added support for deleting cookies via Request#cookie('key', null) - * Updated haml submodule - * Fixed not-found page, now using charset utf-8 - * Fixed show-exceptions page, now using charset utf-8 - * Fixed view support due to fs.readFile Buffers - * Changed; mime.type() no longer accepts ".type" due to node extname() changes - -0.12.0 / 2010-05-22 -================== - - * Added node v0.1.96 compatibility - * Added view `helpers` export which act as additional local variables - * Updated haml submodule - * Changed ETag; removed inode, modified time only - * Fixed LF to CRLF for setting multiple cookies - * Fixed cookie compilation; values are now urlencoded - * Fixed cookies parsing; accepts quoted values and url escaped cookies - -0.11.0 / 2010-05-06 -================== - - * Added support for layouts using different engines - - this.render('page.html.haml', { layout: 'super-cool-layout.html.ejs' }) - - this.render('page.html.haml', { layout: 'foo' }) // assumes 'foo.html.haml' - - this.render('page.html.haml', { layout: false }) // no layout - * Updated ext submodule - * Updated haml submodule - * Fixed EJS partial support by passing along the context. Issue #307 - -0.10.1 / 2010-05-03 -================== - - * Fixed binary uploads. - -0.10.0 / 2010-04-30 -================== - - * Added charset support via Request#charset (automatically assigned to 'UTF-8' when respond()'s - encoding is set to 'utf8' or 'utf-8'). - * Added "encoding" option to Request#render(). Closes #299 - * Added "dump exceptions" setting, which is enabled by default. - * Added simple ejs template engine support - * Added error response support for text/plain, application/json. Closes #297 - * Added callback function param to Request#error() - * Added Request#sendHead() - * Added Request#stream() - * Added support for Request#respond(304, null) for empty response bodies - * Added ETag support to Request#sendfile() - * Added options to Request#sendfile(), passed to fs.createReadStream() - * Added filename arg to Request#download() - * Performance enhanced due to pre-reversing plugins so that plugins.reverse() is not called on each request - * Performance enhanced by preventing several calls to toLowerCase() in Router#match() - * Changed; Request#sendfile() now streams - * Changed; Renamed Request#halt() to Request#respond(). Closes #289 - * Changed; Using sys.inspect() instead of JSON.encode() for error output - * Changed; run() returns the http.Server instance. Closes #298 - * Changed; Defaulting Server#host to null (INADDR_ANY) - * Changed; Logger "common" format scale of 0.4f - * Removed Logger "request" format - * Fixed; Catching ENOENT in view caching, preventing error when "views/partials" is not found - * Fixed several issues with http client - * Fixed Logger Content-Length output - * Fixed bug preventing Opera from retaining the generated session id. Closes #292 - -0.9.0 / 2010-04-14 -================== - - * Added DSL level error() route support - * Added DSL level notFound() route support - * Added Request#error() - * Added Request#notFound() - * Added Request#render() callback function. Closes #258 - * Added "max upload size" setting - * Added "magic" variables to collection partials (\_\_index\_\_, \_\_length\_\_, \_\_isFirst\_\_, \_\_isLast\_\_). Closes #254 - * Added [haml.js](http://github.com/visionmedia/haml.js) submodule; removed haml-js - * Added callback function support to Request#halt() as 3rd/4th arg - * Added preprocessing of route param wildcards using param(). Closes #251 - * Added view partial support (with collections etc.) - * Fixed bug preventing falsey params (such as ?page=0). Closes #286 - * Fixed setting of multiple cookies. Closes #199 - * Changed; view naming convention is now NAME.TYPE.ENGINE (for example page.html.haml) - * Changed; session cookie is now httpOnly - * Changed; Request is no longer global - * Changed; Event is no longer global - * Changed; "sys" module is no longer global - * Changed; moved Request#download to Static plugin where it belongs - * Changed; Request instance created before body parsing. Closes #262 - * Changed; Pre-caching views in memory when "cache view contents" is enabled. Closes #253 - * Changed; Pre-caching view partials in memory when "cache view partials" is enabled - * Updated support to node --version 0.1.90 - * Updated dependencies - * Removed set("session cookie") in favour of use(Session, { cookie: { ... }}) - * Removed utils.mixin(); use Object#mergeDeep() - -0.8.0 / 2010-03-19 -================== - - * Added coffeescript example app. Closes #242 - * Changed; cache api now async friendly. Closes #240 - * Removed deprecated 'express/static' support. Use 'express/plugins/static' - -0.7.6 / 2010-03-19 -================== - - * Added Request#isXHR. Closes #229 - * Added `make install` (for the executable) - * Added `express` executable for setting up simple app templates - * Added "GET /public/*" to Static plugin, defaulting to /public - * Added Static plugin - * Fixed; Request#render() only calls cache.get() once - * Fixed; Namespacing View caches with "view:" - * Fixed; Namespacing Static caches with "static:" - * Fixed; Both example apps now use the Static plugin - * Fixed set("views"). Closes #239 - * Fixed missing space for combined log format - * Deprecated Request#sendfile() and 'express/static' - * Removed Server#running - -0.7.5 / 2010-03-16 -================== - - * Added Request#flash() support without args, now returns all flashes - * Updated ext submodule - -0.7.4 / 2010-03-16 -================== - - * Fixed session reaper - * Changed; class.js replacing js-oo Class implementation (quite a bit faster, no browser cruft) - -0.7.3 / 2010-03-16 -================== - - * Added package.json - * Fixed requiring of haml / sass due to kiwi removal - -0.7.2 / 2010-03-16 -================== - - * Fixed GIT submodules (HAH!) - -0.7.1 / 2010-03-16 -================== - - * Changed; Express now using submodules again until a PM is adopted - * Changed; chat example using millisecond conversions from ext - -0.7.0 / 2010-03-15 -================== - - * Added Request#pass() support (finds the next matching route, or the given path) - * Added Logger plugin (default "common" format replaces CommonLogger) - * Removed Profiler plugin - * Removed CommonLogger plugin - -0.6.0 / 2010-03-11 -================== - - * Added seed.yml for kiwi package management support - * Added HTTP client query string support when method is GET. Closes #205 - - * Added support for arbitrary view engines. - For example "foo.engine.html" will now require('engine'), - the exports from this module are cached after the first require(). - - * Added async plugin support - - * Removed usage of RESTful route funcs as http client - get() etc, use http.get() and friends - - * Removed custom exceptions - -0.5.0 / 2010-03-10 -================== - - * Added ext dependency (library of js extensions) - * Removed extname() / basename() utils. Use path module - * Removed toArray() util. Use arguments.values - * Removed escapeRegexp() util. Use RegExp.escape() - * Removed process.mixin() dependency. Use utils.mixin() - * Removed Collection - * Removed ElementCollection - * Shameless self promotion of ebook "Advanced JavaScript" (http://dev-mag.com) ;) - -0.4.0 / 2010-02-11 -================== - - * Added flash() example to sample upload app - * Added high level restful http client module (express/http) - * Changed; RESTful route functions double as HTTP clients. Closes #69 - * Changed; throwing error when routes are added at runtime - * Changed; defaulting render() context to the current Request. Closes #197 - * Updated haml submodule - -0.3.0 / 2010-02-11 -================== - - * Updated haml / sass submodules. Closes #200 - * Added flash message support. Closes #64 - * Added accepts() now allows multiple args. fixes #117 - * Added support for plugins to halt. Closes #189 - * Added alternate layout support. Closes #119 - * Removed Route#run(). Closes #188 - * Fixed broken specs due to use(Cookie) missing - -0.2.1 / 2010-02-05 -================== - - * Added "plot" format option for Profiler (for gnuplot processing) - * Added request number to Profiler plugin - * Fixed binary encoding for multipart file uploads, was previously defaulting to UTF8 - * Fixed issue with routes not firing when not files are present. Closes #184 - * Fixed process.Promise -> events.Promise - -0.2.0 / 2010-02-03 -================== - - * Added parseParam() support for name[] etc. (allows for file inputs with "multiple" attr) Closes #180 - * Added Both Cache and Session option "reapInterval" may be "reapEvery". Closes #174 - * Added expiration support to cache api with reaper. Closes #133 - * Added cache Store.Memory#reap() - * Added Cache; cache api now uses first class Cache instances - * Added abstract session Store. Closes #172 - * Changed; cache Memory.Store#get() utilizing Collection - * Renamed MemoryStore -> Store.Memory - * Fixed use() of the same plugin several time will always use latest options. Closes #176 - -0.1.0 / 2010-02-03 -================== - - * Changed; Hooks (before / after) pass request as arg as well as evaluated in their context - * Updated node support to 0.1.27 Closes #169 - * Updated dirname(__filename) -> __dirname - * Updated libxmljs support to v0.2.0 - * Added session support with memory store / reaping - * Added quick uid() helper - * Added multi-part upload support - * Added Sass.js support / submodule - * Added production env caching view contents and static files - * Added static file caching. Closes #136 - * Added cache plugin with memory stores - * Added support to StaticFile so that it works with non-textual files. - * Removed dirname() helper - * Removed several globals (now their modules must be required) - -0.0.2 / 2010-01-10 -================== - - * Added view benchmarks; currently haml vs ejs - * Added Request#attachment() specs. Closes #116 - * Added use of node's parseQuery() util. Closes #123 - * Added `make init` for submodules - * Updated Haml - * Updated sample chat app to show messages on load - * Updated libxmljs parseString -> parseHtmlString - * Fixed `make init` to work with older versions of git - * Fixed specs can now run independent specs for those who can't build deps. Closes #127 - * Fixed issues introduced by the node url module changes. Closes 126. - * Fixed two assertions failing due to Collection#keys() returning strings - * Fixed faulty Collection#toArray() spec due to keys() returning strings - * Fixed `make test` now builds libxmljs.node before testing - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/express/LICENSE b/node_modules/express/LICENSE deleted file mode 100644 index aa927e4..0000000 --- a/node_modules/express/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2009-2014 TJ Holowaychuk -Copyright (c) 2013-2014 Roman Shtylman -Copyright (c) 2014-2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/express/Readme.md b/node_modules/express/Readme.md deleted file mode 100644 index bc108d5..0000000 --- a/node_modules/express/Readme.md +++ /dev/null @@ -1,260 +0,0 @@ -[![Express Logo](https://i.cloudup.com/zfY6lL7eFa-3000x3000.png)](http://expressjs.com/) - -**Fast, unopinionated, minimalist web framework for [Node.js](http://nodejs.org).** - -**This project has a [Code of Conduct][].** - -## Table of contents - -* [Installation](#Installation) -* [Features](#Features) -* [Docs & Community](#docs--community) -* [Quick Start](#Quick-Start) -* [Running Tests](#Running-Tests) -* [Philosophy](#Philosophy) -* [Examples](#Examples) -* [Contributing to Express](#Contributing) -* [TC (Technical Committee)](#tc-technical-committee) -* [Triagers](#triagers) -* [License](#license) - - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Install Size][npm-install-size-image]][npm-install-size-url] -[![NPM Downloads][npm-downloads-image]][npm-downloads-url] -[![OpenSSF Scorecard Badge][ossf-scorecard-badge]][ossf-scorecard-visualizer] - - -```js -const express = require('express') -const app = express() - -app.get('/', function (req, res) { - res.send('Hello World') -}) - -app.listen(3000) -``` - -## Installation - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). - -Before installing, [download and install Node.js](https://nodejs.org/en/download/). -Node.js 0.10 or higher is required. - -If this is a brand new project, make sure to create a `package.json` first with -the [`npm init` command](https://docs.npmjs.com/creating-a-package-json-file). - -Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```console -$ npm install express -``` - -Follow [our installing guide](http://expressjs.com/en/starter/installing.html) -for more information. - -## Features - - * Robust routing - * Focus on high performance - * Super-high test coverage - * HTTP helpers (redirection, caching, etc) - * View system supporting 14+ template engines - * Content negotiation - * Executable for generating applications quickly - -## Docs & Community - - * [Website and Documentation](http://expressjs.com/) - [[website repo](https://github.com/expressjs/expressjs.com)] - * [#express](https://web.libera.chat/#express) on [Libera Chat](https://libera.chat) IRC - * [GitHub Organization](https://github.com/expressjs) for Official Middleware & Modules - * Visit the [Wiki](https://github.com/expressjs/express/wiki) - * [Google Group](https://groups.google.com/group/express-js) for discussion - * [Gitter](https://gitter.im/expressjs/express) for support and discussion - -**PROTIP** Be sure to read [Migrating from 3.x to 4.x](https://github.com/expressjs/express/wiki/Migrating-from-3.x-to-4.x) as well as [New features in 4.x](https://github.com/expressjs/express/wiki/New-features-in-4.x). - -## Quick Start - - The quickest way to get started with express is to utilize the executable [`express(1)`](https://github.com/expressjs/generator) to generate an application as shown below: - - Install the executable. The executable's major version will match Express's: - -```console -$ npm install -g express-generator@4 -``` - - Create the app: - -```console -$ express /tmp/foo && cd /tmp/foo -``` - - Install dependencies: - -```console -$ npm install -``` - - Start the server: - -```console -$ npm start -``` - - View the website at: http://localhost:3000 - -## Philosophy - - The Express philosophy is to provide small, robust tooling for HTTP servers, making - it a great solution for single page applications, websites, hybrids, or public - HTTP APIs. - - Express does not force you to use any specific ORM or template engine. With support for over - 14 template engines via [Consolidate.js](https://github.com/tj/consolidate.js), - you can quickly craft your perfect framework. - -## Examples - - To view the examples, clone the Express repo and install the dependencies: - -```console -$ git clone https://github.com/expressjs/express.git --depth 1 -$ cd express -$ npm install -``` - - Then run whichever example you want: - -```console -$ node examples/content-negotiation -``` - -## Contributing - - [![Linux Build][github-actions-ci-image]][github-actions-ci-url] - [![Windows Build][appveyor-image]][appveyor-url] - [![Test Coverage][coveralls-image]][coveralls-url] - -The Express.js project welcomes all constructive contributions. Contributions take many forms, -from code for bug fixes and enhancements, to additions and fixes to documentation, additional -tests, triaging incoming pull requests and issues, and more! - -See the [Contributing Guide](Contributing.md) for more technical details on contributing. - -### Security Issues - -If you discover a security vulnerability in Express, please see [Security Policies and Procedures](Security.md). - -### Running Tests - -To run the test suite, first install the dependencies, then run `npm test`: - -```console -$ npm install -$ npm test -``` - -## People - -The original author of Express is [TJ Holowaychuk](https://github.com/tj) - -[List of all contributors](https://github.com/expressjs/express/graphs/contributors) - -### TC (Technical Committee) - -* [UlisesGascon](https://github.com/UlisesGascon) - **Ulises Gascón** (he/him) -* [jonchurch](https://github.com/jonchurch) - **Jon Church** -* [wesleytodd](https://github.com/wesleytodd) - **Wes Todd** -* [LinusU](https://github.com/LinusU) - **Linus Unnebäck** -* [blakeembrey](https://github.com/blakeembrey) - **Blake Embrey** -* [sheplu](https://github.com/sheplu) - **Jean Burellier** -* [crandmck](https://github.com/crandmck) - **Rand McKinney** -* [ctcpip](https://github.com/ctcpip) - **Chris de Almeida** - -
-TC emeriti members - -#### TC emeriti members - - * [dougwilson](https://github.com/dougwilson) - **Douglas Wilson** - * [hacksparrow](https://github.com/hacksparrow) - **Hage Yaapa** - * [jonathanong](https://github.com/jonathanong) - **jongleberry** - * [niftylettuce](https://github.com/niftylettuce) - **niftylettuce** - * [troygoode](https://github.com/troygoode) - **Troy Goode** -
- - -### Triagers - -* [aravindvnair99](https://github.com/aravindvnair99) - **Aravind Nair** -* [carpasse](https://github.com/carpasse) - **Carlos Serrano** -* [CBID2](https://github.com/CBID2) - **Christine Belzie** -* [enyoghasim](https://github.com/enyoghasim) - **David Enyoghasim** -* [UlisesGascon](https://github.com/UlisesGascon) - **Ulises Gascón** (he/him) -* [mertcanaltin](https://github.com/mertcanaltin) - **Mert Can Altin** -* [0ss](https://github.com/0ss) - **Salah** -* [import-brain](https://github.com/import-brain) - **Eric Cheng** (he/him) -* [3imed-jaberi](https://github.com/3imed-jaberi) - **Imed Jaberi** -* [dakshkhetan](https://github.com/dakshkhetan) - **Daksh Khetan** (he/him) -* [lucasraziel](https://github.com/lucasraziel) - **Lucas Soares Do Rego** -* [IamLizu](https://github.com/IamLizu) - **S M Mahmudul Hasan** (he/him) -* [Sushmeet](https://github.com/Sushmeet) - **Sushmeet Sunger** - -
-Triagers emeriti members - -#### Emeritus Triagers - - * [AuggieH](https://github.com/AuggieH) - **Auggie Hudak** - * [G-Rath](https://github.com/G-Rath) - **Gareth Jones** - * [MohammadXroid](https://github.com/MohammadXroid) - **Mohammad Ayashi** - * [NawafSwe](https://github.com/NawafSwe) - **Nawaf Alsharqi** - * [NotMoni](https://github.com/NotMoni) - **Moni** - * [VigneshMurugan](https://github.com/VigneshMurugan) - **Vignesh Murugan** - * [davidmashe](https://github.com/davidmashe) - **David Ashe** - * [digitaIfabric](https://github.com/digitaIfabric) - **David** - * [e-l-i-s-e](https://github.com/e-l-i-s-e) - **Elise Bonner** - * [fed135](https://github.com/fed135) - **Frederic Charette** - * [firmanJS](https://github.com/firmanJS) - **Firman Abdul Hakim** - * [getspooky](https://github.com/getspooky) - **Yasser Ameur** - * [ghinks](https://github.com/ghinks) - **Glenn** - * [ghousemohamed](https://github.com/ghousemohamed) - **Ghouse Mohamed** - * [gireeshpunathil](https://github.com/gireeshpunathil) - **Gireesh Punathil** - * [jake32321](https://github.com/jake32321) - **Jake Reed** - * [jonchurch](https://github.com/jonchurch) - **Jon Church** - * [lekanikotun](https://github.com/lekanikotun) - **Troy Goode** - * [marsonya](https://github.com/marsonya) - **Lekan Ikotun** - * [mastermatt](https://github.com/mastermatt) - **Matt R. Wilson** - * [maxakuru](https://github.com/maxakuru) - **Max Edell** - * [mlrawlings](https://github.com/mlrawlings) - **Michael Rawlings** - * [rodion-arr](https://github.com/rodion-arr) - **Rodion Abdurakhimov** - * [sheplu](https://github.com/sheplu) - **Jean Burellier** - * [tarunyadav1](https://github.com/tarunyadav1) - **Tarun yadav** - * [tunniclm](https://github.com/tunniclm) - **Mike Tunnicliffe** -
- - -## License - - [MIT](LICENSE) - -[appveyor-image]: https://badgen.net/appveyor/ci/dougwilson/express/master?label=windows -[appveyor-url]: https://ci.appveyor.com/project/dougwilson/express -[coveralls-image]: https://badgen.net/coveralls/c/github/expressjs/express/master -[coveralls-url]: https://coveralls.io/r/expressjs/express?branch=master -[github-actions-ci-image]: https://badgen.net/github/checks/expressjs/express/master?label=linux -[github-actions-ci-url]: https://github.com/expressjs/express/actions/workflows/ci.yml -[npm-downloads-image]: https://badgen.net/npm/dm/express -[npm-downloads-url]: https://npmcharts.com/compare/express?minimal=true -[npm-install-size-image]: https://badgen.net/packagephobia/install/express -[npm-install-size-url]: https://packagephobia.com/result?p=express -[npm-url]: https://npmjs.org/package/express -[npm-version-image]: https://badgen.net/npm/v/express -[ossf-scorecard-badge]: https://api.scorecard.dev/projects/github.com/expressjs/express/badge -[ossf-scorecard-visualizer]: https://ossf.github.io/scorecard-visualizer/#/projects/github.com/expressjs/express -[Code of Conduct]: https://github.com/expressjs/express/blob/master/Code-Of-Conduct.md diff --git a/node_modules/express/index.js b/node_modules/express/index.js deleted file mode 100644 index d219b0c..0000000 --- a/node_modules/express/index.js +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * express - * Copyright(c) 2009-2013 TJ Holowaychuk - * Copyright(c) 2013 Roman Shtylman - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -module.exports = require('./lib/express'); diff --git a/node_modules/express/lib/application.js b/node_modules/express/lib/application.js deleted file mode 100644 index ebb30b5..0000000 --- a/node_modules/express/lib/application.js +++ /dev/null @@ -1,661 +0,0 @@ -/*! - * express - * Copyright(c) 2009-2013 TJ Holowaychuk - * Copyright(c) 2013 Roman Shtylman - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module dependencies. - * @private - */ - -var finalhandler = require('finalhandler'); -var Router = require('./router'); -var methods = require('methods'); -var middleware = require('./middleware/init'); -var query = require('./middleware/query'); -var debug = require('debug')('express:application'); -var View = require('./view'); -var http = require('http'); -var compileETag = require('./utils').compileETag; -var compileQueryParser = require('./utils').compileQueryParser; -var compileTrust = require('./utils').compileTrust; -var deprecate = require('depd')('express'); -var flatten = require('array-flatten'); -var merge = require('utils-merge'); -var resolve = require('path').resolve; -var setPrototypeOf = require('setprototypeof') - -/** - * Module variables. - * @private - */ - -var hasOwnProperty = Object.prototype.hasOwnProperty -var slice = Array.prototype.slice; - -/** - * Application prototype. - */ - -var app = exports = module.exports = {}; - -/** - * Variable for trust proxy inheritance back-compat - * @private - */ - -var trustProxyDefaultSymbol = '@@symbol:trust_proxy_default'; - -/** - * Initialize the server. - * - * - setup default configuration - * - setup default middleware - * - setup route reflection methods - * - * @private - */ - -app.init = function init() { - this.cache = {}; - this.engines = {}; - this.settings = {}; - - this.defaultConfiguration(); -}; - -/** - * Initialize application configuration. - * @private - */ - -app.defaultConfiguration = function defaultConfiguration() { - var env = process.env.NODE_ENV || 'development'; - - // default settings - this.enable('x-powered-by'); - this.set('etag', 'weak'); - this.set('env', env); - this.set('query parser', 'extended'); - this.set('subdomain offset', 2); - this.set('trust proxy', false); - - // trust proxy inherit back-compat - Object.defineProperty(this.settings, trustProxyDefaultSymbol, { - configurable: true, - value: true - }); - - debug('booting in %s mode', env); - - this.on('mount', function onmount(parent) { - // inherit trust proxy - if (this.settings[trustProxyDefaultSymbol] === true - && typeof parent.settings['trust proxy fn'] === 'function') { - delete this.settings['trust proxy']; - delete this.settings['trust proxy fn']; - } - - // inherit protos - setPrototypeOf(this.request, parent.request) - setPrototypeOf(this.response, parent.response) - setPrototypeOf(this.engines, parent.engines) - setPrototypeOf(this.settings, parent.settings) - }); - - // setup locals - this.locals = Object.create(null); - - // top-most app is mounted at / - this.mountpath = '/'; - - // default locals - this.locals.settings = this.settings; - - // default configuration - this.set('view', View); - this.set('views', resolve('views')); - this.set('jsonp callback name', 'callback'); - - if (env === 'production') { - this.enable('view cache'); - } - - Object.defineProperty(this, 'router', { - get: function() { - throw new Error('\'app.router\' is deprecated!\nPlease see the 3.x to 4.x migration guide for details on how to update your app.'); - } - }); -}; - -/** - * lazily adds the base router if it has not yet been added. - * - * We cannot add the base router in the defaultConfiguration because - * it reads app settings which might be set after that has run. - * - * @private - */ -app.lazyrouter = function lazyrouter() { - if (!this._router) { - this._router = new Router({ - caseSensitive: this.enabled('case sensitive routing'), - strict: this.enabled('strict routing') - }); - - this._router.use(query(this.get('query parser fn'))); - this._router.use(middleware.init(this)); - } -}; - -/** - * Dispatch a req, res pair into the application. Starts pipeline processing. - * - * If no callback is provided, then default error handlers will respond - * in the event of an error bubbling through the stack. - * - * @private - */ - -app.handle = function handle(req, res, callback) { - var router = this._router; - - // final handler - var done = callback || finalhandler(req, res, { - env: this.get('env'), - onerror: logerror.bind(this) - }); - - // no routes - if (!router) { - debug('no routes defined on app'); - done(); - return; - } - - router.handle(req, res, done); -}; - -/** - * Proxy `Router#use()` to add middleware to the app router. - * See Router#use() documentation for details. - * - * If the _fn_ parameter is an express app, then it will be - * mounted at the _route_ specified. - * - * @public - */ - -app.use = function use(fn) { - var offset = 0; - var path = '/'; - - // default path to '/' - // disambiguate app.use([fn]) - if (typeof fn !== 'function') { - var arg = fn; - - while (Array.isArray(arg) && arg.length !== 0) { - arg = arg[0]; - } - - // first arg is the path - if (typeof arg !== 'function') { - offset = 1; - path = fn; - } - } - - var fns = flatten(slice.call(arguments, offset)); - - if (fns.length === 0) { - throw new TypeError('app.use() requires a middleware function') - } - - // setup router - this.lazyrouter(); - var router = this._router; - - fns.forEach(function (fn) { - // non-express app - if (!fn || !fn.handle || !fn.set) { - return router.use(path, fn); - } - - debug('.use app under %s', path); - fn.mountpath = path; - fn.parent = this; - - // restore .app property on req and res - router.use(path, function mounted_app(req, res, next) { - var orig = req.app; - fn.handle(req, res, function (err) { - setPrototypeOf(req, orig.request) - setPrototypeOf(res, orig.response) - next(err); - }); - }); - - // mounted an app - fn.emit('mount', this); - }, this); - - return this; -}; - -/** - * Proxy to the app `Router#route()` - * Returns a new `Route` instance for the _path_. - * - * Routes are isolated middleware stacks for specific paths. - * See the Route api docs for details. - * - * @public - */ - -app.route = function route(path) { - this.lazyrouter(); - return this._router.route(path); -}; - -/** - * Register the given template engine callback `fn` - * as `ext`. - * - * By default will `require()` the engine based on the - * file extension. For example if you try to render - * a "foo.ejs" file Express will invoke the following internally: - * - * app.engine('ejs', require('ejs').__express); - * - * For engines that do not provide `.__express` out of the box, - * or if you wish to "map" a different extension to the template engine - * you may use this method. For example mapping the EJS template engine to - * ".html" files: - * - * app.engine('html', require('ejs').renderFile); - * - * In this case EJS provides a `.renderFile()` method with - * the same signature that Express expects: `(path, options, callback)`, - * though note that it aliases this method as `ejs.__express` internally - * so if you're using ".ejs" extensions you don't need to do anything. - * - * Some template engines do not follow this convention, the - * [Consolidate.js](https://github.com/tj/consolidate.js) - * library was created to map all of node's popular template - * engines to follow this convention, thus allowing them to - * work seamlessly within Express. - * - * @param {String} ext - * @param {Function} fn - * @return {app} for chaining - * @public - */ - -app.engine = function engine(ext, fn) { - if (typeof fn !== 'function') { - throw new Error('callback function required'); - } - - // get file extension - var extension = ext[0] !== '.' - ? '.' + ext - : ext; - - // store engine - this.engines[extension] = fn; - - return this; -}; - -/** - * Proxy to `Router#param()` with one added api feature. The _name_ parameter - * can be an array of names. - * - * See the Router#param() docs for more details. - * - * @param {String|Array} name - * @param {Function} fn - * @return {app} for chaining - * @public - */ - -app.param = function param(name, fn) { - this.lazyrouter(); - - if (Array.isArray(name)) { - for (var i = 0; i < name.length; i++) { - this.param(name[i], fn); - } - - return this; - } - - this._router.param(name, fn); - - return this; -}; - -/** - * Assign `setting` to `val`, or return `setting`'s value. - * - * app.set('foo', 'bar'); - * app.set('foo'); - * // => "bar" - * - * Mounted servers inherit their parent server's settings. - * - * @param {String} setting - * @param {*} [val] - * @return {Server} for chaining - * @public - */ - -app.set = function set(setting, val) { - if (arguments.length === 1) { - // app.get(setting) - var settings = this.settings - - while (settings && settings !== Object.prototype) { - if (hasOwnProperty.call(settings, setting)) { - return settings[setting] - } - - settings = Object.getPrototypeOf(settings) - } - - return undefined - } - - debug('set "%s" to %o', setting, val); - - // set value - this.settings[setting] = val; - - // trigger matched settings - switch (setting) { - case 'etag': - this.set('etag fn', compileETag(val)); - break; - case 'query parser': - this.set('query parser fn', compileQueryParser(val)); - break; - case 'trust proxy': - this.set('trust proxy fn', compileTrust(val)); - - // trust proxy inherit back-compat - Object.defineProperty(this.settings, trustProxyDefaultSymbol, { - configurable: true, - value: false - }); - - break; - } - - return this; -}; - -/** - * Return the app's absolute pathname - * based on the parent(s) that have - * mounted it. - * - * For example if the application was - * mounted as "/admin", which itself - * was mounted as "/blog" then the - * return value would be "/blog/admin". - * - * @return {String} - * @private - */ - -app.path = function path() { - return this.parent - ? this.parent.path() + this.mountpath - : ''; -}; - -/** - * Check if `setting` is enabled (truthy). - * - * app.enabled('foo') - * // => false - * - * app.enable('foo') - * app.enabled('foo') - * // => true - * - * @param {String} setting - * @return {Boolean} - * @public - */ - -app.enabled = function enabled(setting) { - return Boolean(this.set(setting)); -}; - -/** - * Check if `setting` is disabled. - * - * app.disabled('foo') - * // => true - * - * app.enable('foo') - * app.disabled('foo') - * // => false - * - * @param {String} setting - * @return {Boolean} - * @public - */ - -app.disabled = function disabled(setting) { - return !this.set(setting); -}; - -/** - * Enable `setting`. - * - * @param {String} setting - * @return {app} for chaining - * @public - */ - -app.enable = function enable(setting) { - return this.set(setting, true); -}; - -/** - * Disable `setting`. - * - * @param {String} setting - * @return {app} for chaining - * @public - */ - -app.disable = function disable(setting) { - return this.set(setting, false); -}; - -/** - * Delegate `.VERB(...)` calls to `router.VERB(...)`. - */ - -methods.forEach(function(method){ - app[method] = function(path){ - if (method === 'get' && arguments.length === 1) { - // app.get(setting) - return this.set(path); - } - - this.lazyrouter(); - - var route = this._router.route(path); - route[method].apply(route, slice.call(arguments, 1)); - return this; - }; -}); - -/** - * Special-cased "all" method, applying the given route `path`, - * middleware, and callback to _every_ HTTP method. - * - * @param {String} path - * @param {Function} ... - * @return {app} for chaining - * @public - */ - -app.all = function all(path) { - this.lazyrouter(); - - var route = this._router.route(path); - var args = slice.call(arguments, 1); - - for (var i = 0; i < methods.length; i++) { - route[methods[i]].apply(route, args); - } - - return this; -}; - -// del -> delete alias - -app.del = deprecate.function(app.delete, 'app.del: Use app.delete instead'); - -/** - * Render the given view `name` name with `options` - * and a callback accepting an error and the - * rendered template string. - * - * Example: - * - * app.render('email', { name: 'Tobi' }, function(err, html){ - * // ... - * }) - * - * @param {String} name - * @param {Object|Function} options or fn - * @param {Function} callback - * @public - */ - -app.render = function render(name, options, callback) { - var cache = this.cache; - var done = callback; - var engines = this.engines; - var opts = options; - var renderOptions = {}; - var view; - - // support callback function as second arg - if (typeof options === 'function') { - done = options; - opts = {}; - } - - // merge app.locals - merge(renderOptions, this.locals); - - // merge options._locals - if (opts._locals) { - merge(renderOptions, opts._locals); - } - - // merge options - merge(renderOptions, opts); - - // set .cache unless explicitly provided - if (renderOptions.cache == null) { - renderOptions.cache = this.enabled('view cache'); - } - - // primed cache - if (renderOptions.cache) { - view = cache[name]; - } - - // view - if (!view) { - var View = this.get('view'); - - view = new View(name, { - defaultEngine: this.get('view engine'), - root: this.get('views'), - engines: engines - }); - - if (!view.path) { - var dirs = Array.isArray(view.root) && view.root.length > 1 - ? 'directories "' + view.root.slice(0, -1).join('", "') + '" or "' + view.root[view.root.length - 1] + '"' - : 'directory "' + view.root + '"' - var err = new Error('Failed to lookup view "' + name + '" in views ' + dirs); - err.view = view; - return done(err); - } - - // prime the cache - if (renderOptions.cache) { - cache[name] = view; - } - } - - // render - tryRender(view, renderOptions, done); -}; - -/** - * Listen for connections. - * - * A node `http.Server` is returned, with this - * application (which is a `Function`) as its - * callback. If you wish to create both an HTTP - * and HTTPS server you may do so with the "http" - * and "https" modules as shown here: - * - * var http = require('http') - * , https = require('https') - * , express = require('express') - * , app = express(); - * - * http.createServer(app).listen(80); - * https.createServer({ ... }, app).listen(443); - * - * @return {http.Server} - * @public - */ - -app.listen = function listen() { - var server = http.createServer(this); - return server.listen.apply(server, arguments); -}; - -/** - * Log error using console.error. - * - * @param {Error} err - * @private - */ - -function logerror(err) { - /* istanbul ignore next */ - if (this.get('env') !== 'test') console.error(err.stack || err.toString()); -} - -/** - * Try rendering a view. - * @private - */ - -function tryRender(view, options, callback) { - try { - view.render(options, callback); - } catch (err) { - callback(err); - } -} diff --git a/node_modules/express/lib/express.js b/node_modules/express/lib/express.js deleted file mode 100644 index d188a16..0000000 --- a/node_modules/express/lib/express.js +++ /dev/null @@ -1,116 +0,0 @@ -/*! - * express - * Copyright(c) 2009-2013 TJ Holowaychuk - * Copyright(c) 2013 Roman Shtylman - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module dependencies. - */ - -var bodyParser = require('body-parser') -var EventEmitter = require('events').EventEmitter; -var mixin = require('merge-descriptors'); -var proto = require('./application'); -var Route = require('./router/route'); -var Router = require('./router'); -var req = require('./request'); -var res = require('./response'); - -/** - * Expose `createApplication()`. - */ - -exports = module.exports = createApplication; - -/** - * Create an express application. - * - * @return {Function} - * @api public - */ - -function createApplication() { - var app = function(req, res, next) { - app.handle(req, res, next); - }; - - mixin(app, EventEmitter.prototype, false); - mixin(app, proto, false); - - // expose the prototype that will get set on requests - app.request = Object.create(req, { - app: { configurable: true, enumerable: true, writable: true, value: app } - }) - - // expose the prototype that will get set on responses - app.response = Object.create(res, { - app: { configurable: true, enumerable: true, writable: true, value: app } - }) - - app.init(); - return app; -} - -/** - * Expose the prototypes. - */ - -exports.application = proto; -exports.request = req; -exports.response = res; - -/** - * Expose constructors. - */ - -exports.Route = Route; -exports.Router = Router; - -/** - * Expose middleware - */ - -exports.json = bodyParser.json -exports.query = require('./middleware/query'); -exports.raw = bodyParser.raw -exports.static = require('serve-static'); -exports.text = bodyParser.text -exports.urlencoded = bodyParser.urlencoded - -/** - * Replace removed middleware with an appropriate error message. - */ - -var removedMiddlewares = [ - 'bodyParser', - 'compress', - 'cookieSession', - 'session', - 'logger', - 'cookieParser', - 'favicon', - 'responseTime', - 'errorHandler', - 'timeout', - 'methodOverride', - 'vhost', - 'csrf', - 'directory', - 'limit', - 'multipart', - 'staticCache' -] - -removedMiddlewares.forEach(function (name) { - Object.defineProperty(exports, name, { - get: function () { - throw new Error('Most middleware (like ' + name + ') is no longer bundled with Express and must be installed separately. Please see https://github.com/senchalabs/connect#middleware.'); - }, - configurable: true - }); -}); diff --git a/node_modules/express/lib/middleware/init.js b/node_modules/express/lib/middleware/init.js deleted file mode 100644 index dfd0427..0000000 --- a/node_modules/express/lib/middleware/init.js +++ /dev/null @@ -1,43 +0,0 @@ -/*! - * express - * Copyright(c) 2009-2013 TJ Holowaychuk - * Copyright(c) 2013 Roman Shtylman - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module dependencies. - * @private - */ - -var setPrototypeOf = require('setprototypeof') - -/** - * Initialization middleware, exposing the - * request and response to each other, as well - * as defaulting the X-Powered-By header field. - * - * @param {Function} app - * @return {Function} - * @api private - */ - -exports.init = function(app){ - return function expressInit(req, res, next){ - if (app.enabled('x-powered-by')) res.setHeader('X-Powered-By', 'Express'); - req.res = res; - res.req = req; - req.next = next; - - setPrototypeOf(req, app.request) - setPrototypeOf(res, app.response) - - res.locals = res.locals || Object.create(null); - - next(); - }; -}; - diff --git a/node_modules/express/lib/middleware/query.js b/node_modules/express/lib/middleware/query.js deleted file mode 100644 index 7e91669..0000000 --- a/node_modules/express/lib/middleware/query.js +++ /dev/null @@ -1,47 +0,0 @@ -/*! - * express - * Copyright(c) 2009-2013 TJ Holowaychuk - * Copyright(c) 2013 Roman Shtylman - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module dependencies. - */ - -var merge = require('utils-merge') -var parseUrl = require('parseurl'); -var qs = require('qs'); - -/** - * @param {Object} options - * @return {Function} - * @api public - */ - -module.exports = function query(options) { - var opts = merge({}, options) - var queryparse = qs.parse; - - if (typeof options === 'function') { - queryparse = options; - opts = undefined; - } - - if (opts !== undefined && opts.allowPrototypes === undefined) { - // back-compat for qs module - opts.allowPrototypes = true; - } - - return function query(req, res, next){ - if (!req.query) { - var val = parseUrl(req).query; - req.query = queryparse(val, opts); - } - - next(); - }; -}; diff --git a/node_modules/express/lib/request.js b/node_modules/express/lib/request.js deleted file mode 100644 index 3f1eeca..0000000 --- a/node_modules/express/lib/request.js +++ /dev/null @@ -1,525 +0,0 @@ -/*! - * express - * Copyright(c) 2009-2013 TJ Holowaychuk - * Copyright(c) 2013 Roman Shtylman - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module dependencies. - * @private - */ - -var accepts = require('accepts'); -var deprecate = require('depd')('express'); -var isIP = require('net').isIP; -var typeis = require('type-is'); -var http = require('http'); -var fresh = require('fresh'); -var parseRange = require('range-parser'); -var parse = require('parseurl'); -var proxyaddr = require('proxy-addr'); - -/** - * Request prototype. - * @public - */ - -var req = Object.create(http.IncomingMessage.prototype) - -/** - * Module exports. - * @public - */ - -module.exports = req - -/** - * Return request header. - * - * The `Referrer` header field is special-cased, - * both `Referrer` and `Referer` are interchangeable. - * - * Examples: - * - * req.get('Content-Type'); - * // => "text/plain" - * - * req.get('content-type'); - * // => "text/plain" - * - * req.get('Something'); - * // => undefined - * - * Aliased as `req.header()`. - * - * @param {String} name - * @return {String} - * @public - */ - -req.get = -req.header = function header(name) { - if (!name) { - throw new TypeError('name argument is required to req.get'); - } - - if (typeof name !== 'string') { - throw new TypeError('name must be a string to req.get'); - } - - var lc = name.toLowerCase(); - - switch (lc) { - case 'referer': - case 'referrer': - return this.headers.referrer - || this.headers.referer; - default: - return this.headers[lc]; - } -}; - -/** - * To do: update docs. - * - * Check if the given `type(s)` is acceptable, returning - * the best match when true, otherwise `undefined`, in which - * case you should respond with 406 "Not Acceptable". - * - * The `type` value may be a single MIME type string - * such as "application/json", an extension name - * such as "json", a comma-delimited list such as "json, html, text/plain", - * an argument list such as `"json", "html", "text/plain"`, - * or an array `["json", "html", "text/plain"]`. When a list - * or array is given, the _best_ match, if any is returned. - * - * Examples: - * - * // Accept: text/html - * req.accepts('html'); - * // => "html" - * - * // Accept: text/*, application/json - * req.accepts('html'); - * // => "html" - * req.accepts('text/html'); - * // => "text/html" - * req.accepts('json, text'); - * // => "json" - * req.accepts('application/json'); - * // => "application/json" - * - * // Accept: text/*, application/json - * req.accepts('image/png'); - * req.accepts('png'); - * // => undefined - * - * // Accept: text/*;q=.5, application/json - * req.accepts(['html', 'json']); - * req.accepts('html', 'json'); - * req.accepts('html, json'); - * // => "json" - * - * @param {String|Array} type(s) - * @return {String|Array|Boolean} - * @public - */ - -req.accepts = function(){ - var accept = accepts(this); - return accept.types.apply(accept, arguments); -}; - -/** - * Check if the given `encoding`s are accepted. - * - * @param {String} ...encoding - * @return {String|Array} - * @public - */ - -req.acceptsEncodings = function(){ - var accept = accepts(this); - return accept.encodings.apply(accept, arguments); -}; - -req.acceptsEncoding = deprecate.function(req.acceptsEncodings, - 'req.acceptsEncoding: Use acceptsEncodings instead'); - -/** - * Check if the given `charset`s are acceptable, - * otherwise you should respond with 406 "Not Acceptable". - * - * @param {String} ...charset - * @return {String|Array} - * @public - */ - -req.acceptsCharsets = function(){ - var accept = accepts(this); - return accept.charsets.apply(accept, arguments); -}; - -req.acceptsCharset = deprecate.function(req.acceptsCharsets, - 'req.acceptsCharset: Use acceptsCharsets instead'); - -/** - * Check if the given `lang`s are acceptable, - * otherwise you should respond with 406 "Not Acceptable". - * - * @param {String} ...lang - * @return {String|Array} - * @public - */ - -req.acceptsLanguages = function(){ - var accept = accepts(this); - return accept.languages.apply(accept, arguments); -}; - -req.acceptsLanguage = deprecate.function(req.acceptsLanguages, - 'req.acceptsLanguage: Use acceptsLanguages instead'); - -/** - * Parse Range header field, capping to the given `size`. - * - * Unspecified ranges such as "0-" require knowledge of your resource length. In - * the case of a byte range this is of course the total number of bytes. If the - * Range header field is not given `undefined` is returned, `-1` when unsatisfiable, - * and `-2` when syntactically invalid. - * - * When ranges are returned, the array has a "type" property which is the type of - * range that is required (most commonly, "bytes"). Each array element is an object - * with a "start" and "end" property for the portion of the range. - * - * The "combine" option can be set to `true` and overlapping & adjacent ranges - * will be combined into a single range. - * - * NOTE: remember that ranges are inclusive, so for example "Range: users=0-3" - * should respond with 4 users when available, not 3. - * - * @param {number} size - * @param {object} [options] - * @param {boolean} [options.combine=false] - * @return {number|array} - * @public - */ - -req.range = function range(size, options) { - var range = this.get('Range'); - if (!range) return; - return parseRange(size, range, options); -}; - -/** - * Return the value of param `name` when present or `defaultValue`. - * - * - Checks route placeholders, ex: _/user/:id_ - * - Checks body params, ex: id=12, {"id":12} - * - Checks query string params, ex: ?id=12 - * - * To utilize request bodies, `req.body` - * should be an object. This can be done by using - * the `bodyParser()` middleware. - * - * @param {String} name - * @param {Mixed} [defaultValue] - * @return {String} - * @public - */ - -req.param = function param(name, defaultValue) { - var params = this.params || {}; - var body = this.body || {}; - var query = this.query || {}; - - var args = arguments.length === 1 - ? 'name' - : 'name, default'; - deprecate('req.param(' + args + '): Use req.params, req.body, or req.query instead'); - - if (null != params[name] && params.hasOwnProperty(name)) return params[name]; - if (null != body[name]) return body[name]; - if (null != query[name]) return query[name]; - - return defaultValue; -}; - -/** - * Check if the incoming request contains the "Content-Type" - * header field, and it contains the given mime `type`. - * - * Examples: - * - * // With Content-Type: text/html; charset=utf-8 - * req.is('html'); - * req.is('text/html'); - * req.is('text/*'); - * // => true - * - * // When Content-Type is application/json - * req.is('json'); - * req.is('application/json'); - * req.is('application/*'); - * // => true - * - * req.is('html'); - * // => false - * - * @param {String|Array} types... - * @return {String|false|null} - * @public - */ - -req.is = function is(types) { - var arr = types; - - // support flattened arguments - if (!Array.isArray(types)) { - arr = new Array(arguments.length); - for (var i = 0; i < arr.length; i++) { - arr[i] = arguments[i]; - } - } - - return typeis(this, arr); -}; - -/** - * Return the protocol string "http" or "https" - * when requested with TLS. When the "trust proxy" - * setting trusts the socket address, the - * "X-Forwarded-Proto" header field will be trusted - * and used if present. - * - * If you're running behind a reverse proxy that - * supplies https for you this may be enabled. - * - * @return {String} - * @public - */ - -defineGetter(req, 'protocol', function protocol(){ - var proto = this.connection.encrypted - ? 'https' - : 'http'; - var trust = this.app.get('trust proxy fn'); - - if (!trust(this.connection.remoteAddress, 0)) { - return proto; - } - - // Note: X-Forwarded-Proto is normally only ever a - // single value, but this is to be safe. - var header = this.get('X-Forwarded-Proto') || proto - var index = header.indexOf(',') - - return index !== -1 - ? header.substring(0, index).trim() - : header.trim() -}); - -/** - * Short-hand for: - * - * req.protocol === 'https' - * - * @return {Boolean} - * @public - */ - -defineGetter(req, 'secure', function secure(){ - return this.protocol === 'https'; -}); - -/** - * Return the remote address from the trusted proxy. - * - * The is the remote address on the socket unless - * "trust proxy" is set. - * - * @return {String} - * @public - */ - -defineGetter(req, 'ip', function ip(){ - var trust = this.app.get('trust proxy fn'); - return proxyaddr(this, trust); -}); - -/** - * When "trust proxy" is set, trusted proxy addresses + client. - * - * For example if the value were "client, proxy1, proxy2" - * you would receive the array `["client", "proxy1", "proxy2"]` - * where "proxy2" is the furthest down-stream and "proxy1" and - * "proxy2" were trusted. - * - * @return {Array} - * @public - */ - -defineGetter(req, 'ips', function ips() { - var trust = this.app.get('trust proxy fn'); - var addrs = proxyaddr.all(this, trust); - - // reverse the order (to farthest -> closest) - // and remove socket address - addrs.reverse().pop() - - return addrs -}); - -/** - * Return subdomains as an array. - * - * Subdomains are the dot-separated parts of the host before the main domain of - * the app. By default, the domain of the app is assumed to be the last two - * parts of the host. This can be changed by setting "subdomain offset". - * - * For example, if the domain is "tobi.ferrets.example.com": - * If "subdomain offset" is not set, req.subdomains is `["ferrets", "tobi"]`. - * If "subdomain offset" is 3, req.subdomains is `["tobi"]`. - * - * @return {Array} - * @public - */ - -defineGetter(req, 'subdomains', function subdomains() { - var hostname = this.hostname; - - if (!hostname) return []; - - var offset = this.app.get('subdomain offset'); - var subdomains = !isIP(hostname) - ? hostname.split('.').reverse() - : [hostname]; - - return subdomains.slice(offset); -}); - -/** - * Short-hand for `url.parse(req.url).pathname`. - * - * @return {String} - * @public - */ - -defineGetter(req, 'path', function path() { - return parse(this).pathname; -}); - -/** - * Parse the "Host" header field to a hostname. - * - * When the "trust proxy" setting trusts the socket - * address, the "X-Forwarded-Host" header field will - * be trusted. - * - * @return {String} - * @public - */ - -defineGetter(req, 'hostname', function hostname(){ - var trust = this.app.get('trust proxy fn'); - var host = this.get('X-Forwarded-Host'); - - if (!host || !trust(this.connection.remoteAddress, 0)) { - host = this.get('Host'); - } else if (host.indexOf(',') !== -1) { - // Note: X-Forwarded-Host is normally only ever a - // single value, but this is to be safe. - host = host.substring(0, host.indexOf(',')).trimRight() - } - - if (!host) return; - - // IPv6 literal support - var offset = host[0] === '[' - ? host.indexOf(']') + 1 - : 0; - var index = host.indexOf(':', offset); - - return index !== -1 - ? host.substring(0, index) - : host; -}); - -// TODO: change req.host to return host in next major - -defineGetter(req, 'host', deprecate.function(function host(){ - return this.hostname; -}, 'req.host: Use req.hostname instead')); - -/** - * Check if the request is fresh, aka - * Last-Modified and/or the ETag - * still match. - * - * @return {Boolean} - * @public - */ - -defineGetter(req, 'fresh', function(){ - var method = this.method; - var res = this.res - var status = res.statusCode - - // GET or HEAD for weak freshness validation only - if ('GET' !== method && 'HEAD' !== method) return false; - - // 2xx or 304 as per rfc2616 14.26 - if ((status >= 200 && status < 300) || 304 === status) { - return fresh(this.headers, { - 'etag': res.get('ETag'), - 'last-modified': res.get('Last-Modified') - }) - } - - return false; -}); - -/** - * Check if the request is stale, aka - * "Last-Modified" and / or the "ETag" for the - * resource has changed. - * - * @return {Boolean} - * @public - */ - -defineGetter(req, 'stale', function stale(){ - return !this.fresh; -}); - -/** - * Check if the request was an _XMLHttpRequest_. - * - * @return {Boolean} - * @public - */ - -defineGetter(req, 'xhr', function xhr(){ - var val = this.get('X-Requested-With') || ''; - return val.toLowerCase() === 'xmlhttprequest'; -}); - -/** - * Helper function for creating a getter on an object. - * - * @param {Object} obj - * @param {String} name - * @param {Function} getter - * @private - */ -function defineGetter(obj, name, getter) { - Object.defineProperty(obj, name, { - configurable: true, - enumerable: true, - get: getter - }); -} diff --git a/node_modules/express/lib/response.js b/node_modules/express/lib/response.js deleted file mode 100644 index 2b654f4..0000000 --- a/node_modules/express/lib/response.js +++ /dev/null @@ -1,1179 +0,0 @@ -/*! - * express - * Copyright(c) 2009-2013 TJ Holowaychuk - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module dependencies. - * @private - */ - -var Buffer = require('safe-buffer').Buffer -var contentDisposition = require('content-disposition'); -var createError = require('http-errors') -var deprecate = require('depd')('express'); -var encodeUrl = require('encodeurl'); -var escapeHtml = require('escape-html'); -var http = require('http'); -var isAbsolute = require('./utils').isAbsolute; -var onFinished = require('on-finished'); -var path = require('path'); -var statuses = require('statuses') -var merge = require('utils-merge'); -var sign = require('cookie-signature').sign; -var normalizeType = require('./utils').normalizeType; -var normalizeTypes = require('./utils').normalizeTypes; -var setCharset = require('./utils').setCharset; -var cookie = require('cookie'); -var send = require('send'); -var extname = path.extname; -var mime = send.mime; -var resolve = path.resolve; -var vary = require('vary'); - -/** - * Response prototype. - * @public - */ - -var res = Object.create(http.ServerResponse.prototype) - -/** - * Module exports. - * @public - */ - -module.exports = res - -/** - * Module variables. - * @private - */ - -var charsetRegExp = /;\s*charset\s*=/; - -/** - * Set status `code`. - * - * @param {Number} code - * @return {ServerResponse} - * @public - */ - -res.status = function status(code) { - if ((typeof code === 'string' || Math.floor(code) !== code) && code > 99 && code < 1000) { - deprecate('res.status(' + JSON.stringify(code) + '): use res.status(' + Math.floor(code) + ') instead') - } - this.statusCode = code; - return this; -}; - -/** - * Set Link header field with the given `links`. - * - * Examples: - * - * res.links({ - * next: 'http://api.example.com/users?page=2', - * last: 'http://api.example.com/users?page=5' - * }); - * - * @param {Object} links - * @return {ServerResponse} - * @public - */ - -res.links = function(links){ - var link = this.get('Link') || ''; - if (link) link += ', '; - return this.set('Link', link + Object.keys(links).map(function(rel){ - return '<' + links[rel] + '>; rel="' + rel + '"'; - }).join(', ')); -}; - -/** - * Send a response. - * - * Examples: - * - * res.send(Buffer.from('wahoo')); - * res.send({ some: 'json' }); - * res.send('

some html

'); - * - * @param {string|number|boolean|object|Buffer} body - * @public - */ - -res.send = function send(body) { - var chunk = body; - var encoding; - var req = this.req; - var type; - - // settings - var app = this.app; - - // allow status / body - if (arguments.length === 2) { - // res.send(body, status) backwards compat - if (typeof arguments[0] !== 'number' && typeof arguments[1] === 'number') { - deprecate('res.send(body, status): Use res.status(status).send(body) instead'); - this.statusCode = arguments[1]; - } else { - deprecate('res.send(status, body): Use res.status(status).send(body) instead'); - this.statusCode = arguments[0]; - chunk = arguments[1]; - } - } - - // disambiguate res.send(status) and res.send(status, num) - if (typeof chunk === 'number' && arguments.length === 1) { - // res.send(status) will set status message as text string - if (!this.get('Content-Type')) { - this.type('txt'); - } - - deprecate('res.send(status): Use res.sendStatus(status) instead'); - this.statusCode = chunk; - chunk = statuses.message[chunk] - } - - switch (typeof chunk) { - // string defaulting to html - case 'string': - if (!this.get('Content-Type')) { - this.type('html'); - } - break; - case 'boolean': - case 'number': - case 'object': - if (chunk === null) { - chunk = ''; - } else if (Buffer.isBuffer(chunk)) { - if (!this.get('Content-Type')) { - this.type('bin'); - } - } else { - return this.json(chunk); - } - break; - } - - // write strings in utf-8 - if (typeof chunk === 'string') { - encoding = 'utf8'; - type = this.get('Content-Type'); - - // reflect this in content-type - if (typeof type === 'string') { - this.set('Content-Type', setCharset(type, 'utf-8')); - } - } - - // determine if ETag should be generated - var etagFn = app.get('etag fn') - var generateETag = !this.get('ETag') && typeof etagFn === 'function' - - // populate Content-Length - var len - if (chunk !== undefined) { - if (Buffer.isBuffer(chunk)) { - // get length of Buffer - len = chunk.length - } else if (!generateETag && chunk.length < 1000) { - // just calculate length when no ETag + small chunk - len = Buffer.byteLength(chunk, encoding) - } else { - // convert chunk to Buffer and calculate - chunk = Buffer.from(chunk, encoding) - encoding = undefined; - len = chunk.length - } - - this.set('Content-Length', len); - } - - // populate ETag - var etag; - if (generateETag && len !== undefined) { - if ((etag = etagFn(chunk, encoding))) { - this.set('ETag', etag); - } - } - - // freshness - if (req.fresh) this.statusCode = 304; - - // strip irrelevant headers - if (204 === this.statusCode || 304 === this.statusCode) { - this.removeHeader('Content-Type'); - this.removeHeader('Content-Length'); - this.removeHeader('Transfer-Encoding'); - chunk = ''; - } - - // alter headers for 205 - if (this.statusCode === 205) { - this.set('Content-Length', '0') - this.removeHeader('Transfer-Encoding') - chunk = '' - } - - if (req.method === 'HEAD') { - // skip body for HEAD - this.end(); - } else { - // respond - this.end(chunk, encoding); - } - - return this; -}; - -/** - * Send JSON response. - * - * Examples: - * - * res.json(null); - * res.json({ user: 'tj' }); - * - * @param {string|number|boolean|object} obj - * @public - */ - -res.json = function json(obj) { - var val = obj; - - // allow status / body - if (arguments.length === 2) { - // res.json(body, status) backwards compat - if (typeof arguments[1] === 'number') { - deprecate('res.json(obj, status): Use res.status(status).json(obj) instead'); - this.statusCode = arguments[1]; - } else { - deprecate('res.json(status, obj): Use res.status(status).json(obj) instead'); - this.statusCode = arguments[0]; - val = arguments[1]; - } - } - - // settings - var app = this.app; - var escape = app.get('json escape') - var replacer = app.get('json replacer'); - var spaces = app.get('json spaces'); - var body = stringify(val, replacer, spaces, escape) - - // content-type - if (!this.get('Content-Type')) { - this.set('Content-Type', 'application/json'); - } - - return this.send(body); -}; - -/** - * Send JSON response with JSONP callback support. - * - * Examples: - * - * res.jsonp(null); - * res.jsonp({ user: 'tj' }); - * - * @param {string|number|boolean|object} obj - * @public - */ - -res.jsonp = function jsonp(obj) { - var val = obj; - - // allow status / body - if (arguments.length === 2) { - // res.jsonp(body, status) backwards compat - if (typeof arguments[1] === 'number') { - deprecate('res.jsonp(obj, status): Use res.status(status).jsonp(obj) instead'); - this.statusCode = arguments[1]; - } else { - deprecate('res.jsonp(status, obj): Use res.status(status).jsonp(obj) instead'); - this.statusCode = arguments[0]; - val = arguments[1]; - } - } - - // settings - var app = this.app; - var escape = app.get('json escape') - var replacer = app.get('json replacer'); - var spaces = app.get('json spaces'); - var body = stringify(val, replacer, spaces, escape) - var callback = this.req.query[app.get('jsonp callback name')]; - - // content-type - if (!this.get('Content-Type')) { - this.set('X-Content-Type-Options', 'nosniff'); - this.set('Content-Type', 'application/json'); - } - - // fixup callback - if (Array.isArray(callback)) { - callback = callback[0]; - } - - // jsonp - if (typeof callback === 'string' && callback.length !== 0) { - this.set('X-Content-Type-Options', 'nosniff'); - this.set('Content-Type', 'text/javascript'); - - // restrict callback charset - callback = callback.replace(/[^\[\]\w$.]/g, ''); - - if (body === undefined) { - // empty argument - body = '' - } else if (typeof body === 'string') { - // replace chars not allowed in JavaScript that are in JSON - body = body - .replace(/\u2028/g, '\\u2028') - .replace(/\u2029/g, '\\u2029') - } - - // the /**/ is a specific security mitigation for "Rosetta Flash JSONP abuse" - // the typeof check is just to reduce client error noise - body = '/**/ typeof ' + callback + ' === \'function\' && ' + callback + '(' + body + ');'; - } - - return this.send(body); -}; - -/** - * Send given HTTP status code. - * - * Sets the response status to `statusCode` and the body of the - * response to the standard description from node's http.STATUS_CODES - * or the statusCode number if no description. - * - * Examples: - * - * res.sendStatus(200); - * - * @param {number} statusCode - * @public - */ - -res.sendStatus = function sendStatus(statusCode) { - var body = statuses.message[statusCode] || String(statusCode) - - this.statusCode = statusCode; - this.type('txt'); - - return this.send(body); -}; - -/** - * Transfer the file at the given `path`. - * - * Automatically sets the _Content-Type_ response header field. - * The callback `callback(err)` is invoked when the transfer is complete - * or when an error occurs. Be sure to check `res.headersSent` - * if you wish to attempt responding, as the header and some data - * may have already been transferred. - * - * Options: - * - * - `maxAge` defaulting to 0 (can be string converted by `ms`) - * - `root` root directory for relative filenames - * - `headers` object of headers to serve with file - * - `dotfiles` serve dotfiles, defaulting to false; can be `"allow"` to send them - * - * Other options are passed along to `send`. - * - * Examples: - * - * The following example illustrates how `res.sendFile()` may - * be used as an alternative for the `static()` middleware for - * dynamic situations. The code backing `res.sendFile()` is actually - * the same code, so HTTP cache support etc is identical. - * - * app.get('/user/:uid/photos/:file', function(req, res){ - * var uid = req.params.uid - * , file = req.params.file; - * - * req.user.mayViewFilesFrom(uid, function(yes){ - * if (yes) { - * res.sendFile('/uploads/' + uid + '/' + file); - * } else { - * res.send(403, 'Sorry! you cant see that.'); - * } - * }); - * }); - * - * @public - */ - -res.sendFile = function sendFile(path, options, callback) { - var done = callback; - var req = this.req; - var res = this; - var next = req.next; - var opts = options || {}; - - if (!path) { - throw new TypeError('path argument is required to res.sendFile'); - } - - if (typeof path !== 'string') { - throw new TypeError('path must be a string to res.sendFile') - } - - // support function as second arg - if (typeof options === 'function') { - done = options; - opts = {}; - } - - if (!opts.root && !isAbsolute(path)) { - throw new TypeError('path must be absolute or specify root to res.sendFile'); - } - - // create file stream - var pathname = encodeURI(path); - var file = send(req, pathname, opts); - - // transfer - sendfile(res, file, opts, function (err) { - if (done) return done(err); - if (err && err.code === 'EISDIR') return next(); - - // next() all but write errors - if (err && err.code !== 'ECONNABORTED' && err.syscall !== 'write') { - next(err); - } - }); -}; - -/** - * Transfer the file at the given `path`. - * - * Automatically sets the _Content-Type_ response header field. - * The callback `callback(err)` is invoked when the transfer is complete - * or when an error occurs. Be sure to check `res.headersSent` - * if you wish to attempt responding, as the header and some data - * may have already been transferred. - * - * Options: - * - * - `maxAge` defaulting to 0 (can be string converted by `ms`) - * - `root` root directory for relative filenames - * - `headers` object of headers to serve with file - * - `dotfiles` serve dotfiles, defaulting to false; can be `"allow"` to send them - * - * Other options are passed along to `send`. - * - * Examples: - * - * The following example illustrates how `res.sendfile()` may - * be used as an alternative for the `static()` middleware for - * dynamic situations. The code backing `res.sendfile()` is actually - * the same code, so HTTP cache support etc is identical. - * - * app.get('/user/:uid/photos/:file', function(req, res){ - * var uid = req.params.uid - * , file = req.params.file; - * - * req.user.mayViewFilesFrom(uid, function(yes){ - * if (yes) { - * res.sendfile('/uploads/' + uid + '/' + file); - * } else { - * res.send(403, 'Sorry! you cant see that.'); - * } - * }); - * }); - * - * @public - */ - -res.sendfile = function (path, options, callback) { - var done = callback; - var req = this.req; - var res = this; - var next = req.next; - var opts = options || {}; - - // support function as second arg - if (typeof options === 'function') { - done = options; - opts = {}; - } - - // create file stream - var file = send(req, path, opts); - - // transfer - sendfile(res, file, opts, function (err) { - if (done) return done(err); - if (err && err.code === 'EISDIR') return next(); - - // next() all but write errors - if (err && err.code !== 'ECONNABORTED' && err.syscall !== 'write') { - next(err); - } - }); -}; - -res.sendfile = deprecate.function(res.sendfile, - 'res.sendfile: Use res.sendFile instead'); - -/** - * Transfer the file at the given `path` as an attachment. - * - * Optionally providing an alternate attachment `filename`, - * and optional callback `callback(err)`. The callback is invoked - * when the data transfer is complete, or when an error has - * occurred. Be sure to check `res.headersSent` if you plan to respond. - * - * Optionally providing an `options` object to use with `res.sendFile()`. - * This function will set the `Content-Disposition` header, overriding - * any `Content-Disposition` header passed as header options in order - * to set the attachment and filename. - * - * This method uses `res.sendFile()`. - * - * @public - */ - -res.download = function download (path, filename, options, callback) { - var done = callback; - var name = filename; - var opts = options || null - - // support function as second or third arg - if (typeof filename === 'function') { - done = filename; - name = null; - opts = null - } else if (typeof options === 'function') { - done = options - opts = null - } - - // support optional filename, where options may be in it's place - if (typeof filename === 'object' && - (typeof options === 'function' || options === undefined)) { - name = null - opts = filename - } - - // set Content-Disposition when file is sent - var headers = { - 'Content-Disposition': contentDisposition(name || path) - }; - - // merge user-provided headers - if (opts && opts.headers) { - var keys = Object.keys(opts.headers) - for (var i = 0; i < keys.length; i++) { - var key = keys[i] - if (key.toLowerCase() !== 'content-disposition') { - headers[key] = opts.headers[key] - } - } - } - - // merge user-provided options - opts = Object.create(opts) - opts.headers = headers - - // Resolve the full path for sendFile - var fullPath = !opts.root - ? resolve(path) - : path - - // send file - return this.sendFile(fullPath, opts, done) -}; - -/** - * Set _Content-Type_ response header with `type` through `mime.lookup()` - * when it does not contain "/", or set the Content-Type to `type` otherwise. - * - * Examples: - * - * res.type('.html'); - * res.type('html'); - * res.type('json'); - * res.type('application/json'); - * res.type('png'); - * - * @param {String} type - * @return {ServerResponse} for chaining - * @public - */ - -res.contentType = -res.type = function contentType(type) { - var ct = type.indexOf('/') === -1 - ? mime.lookup(type) - : type; - - return this.set('Content-Type', ct); -}; - -/** - * Respond to the Acceptable formats using an `obj` - * of mime-type callbacks. - * - * This method uses `req.accepted`, an array of - * acceptable types ordered by their quality values. - * When "Accept" is not present the _first_ callback - * is invoked, otherwise the first match is used. When - * no match is performed the server responds with - * 406 "Not Acceptable". - * - * Content-Type is set for you, however if you choose - * you may alter this within the callback using `res.type()` - * or `res.set('Content-Type', ...)`. - * - * res.format({ - * 'text/plain': function(){ - * res.send('hey'); - * }, - * - * 'text/html': function(){ - * res.send('

hey

'); - * }, - * - * 'application/json': function () { - * res.send({ message: 'hey' }); - * } - * }); - * - * In addition to canonicalized MIME types you may - * also use extnames mapped to these types: - * - * res.format({ - * text: function(){ - * res.send('hey'); - * }, - * - * html: function(){ - * res.send('

hey

'); - * }, - * - * json: function(){ - * res.send({ message: 'hey' }); - * } - * }); - * - * By default Express passes an `Error` - * with a `.status` of 406 to `next(err)` - * if a match is not made. If you provide - * a `.default` callback it will be invoked - * instead. - * - * @param {Object} obj - * @return {ServerResponse} for chaining - * @public - */ - -res.format = function(obj){ - var req = this.req; - var next = req.next; - - var keys = Object.keys(obj) - .filter(function (v) { return v !== 'default' }) - - var key = keys.length > 0 - ? req.accepts(keys) - : false; - - this.vary("Accept"); - - if (key) { - this.set('Content-Type', normalizeType(key).value); - obj[key](req, this, next); - } else if (obj.default) { - obj.default(req, this, next) - } else { - next(createError(406, { - types: normalizeTypes(keys).map(function (o) { return o.value }) - })) - } - - return this; -}; - -/** - * Set _Content-Disposition_ header to _attachment_ with optional `filename`. - * - * @param {String} filename - * @return {ServerResponse} - * @public - */ - -res.attachment = function attachment(filename) { - if (filename) { - this.type(extname(filename)); - } - - this.set('Content-Disposition', contentDisposition(filename)); - - return this; -}; - -/** - * Append additional header `field` with value `val`. - * - * Example: - * - * res.append('Link', ['', '']); - * res.append('Set-Cookie', 'foo=bar; Path=/; HttpOnly'); - * res.append('Warning', '199 Miscellaneous warning'); - * - * @param {String} field - * @param {String|Array} val - * @return {ServerResponse} for chaining - * @public - */ - -res.append = function append(field, val) { - var prev = this.get(field); - var value = val; - - if (prev) { - // concat the new and prev vals - value = Array.isArray(prev) ? prev.concat(val) - : Array.isArray(val) ? [prev].concat(val) - : [prev, val] - } - - return this.set(field, value); -}; - -/** - * Set header `field` to `val`, or pass - * an object of header fields. - * - * Examples: - * - * res.set('Foo', ['bar', 'baz']); - * res.set('Accept', 'application/json'); - * res.set({ Accept: 'text/plain', 'X-API-Key': 'tobi' }); - * - * Aliased as `res.header()`. - * - * @param {String|Object} field - * @param {String|Array} val - * @return {ServerResponse} for chaining - * @public - */ - -res.set = -res.header = function header(field, val) { - if (arguments.length === 2) { - var value = Array.isArray(val) - ? val.map(String) - : String(val); - - // add charset to content-type - if (field.toLowerCase() === 'content-type') { - if (Array.isArray(value)) { - throw new TypeError('Content-Type cannot be set to an Array'); - } - if (!charsetRegExp.test(value)) { - var charset = mime.charsets.lookup(value.split(';')[0]); - if (charset) value += '; charset=' + charset.toLowerCase(); - } - } - - this.setHeader(field, value); - } else { - for (var key in field) { - this.set(key, field[key]); - } - } - return this; -}; - -/** - * Get value for header `field`. - * - * @param {String} field - * @return {String} - * @public - */ - -res.get = function(field){ - return this.getHeader(field); -}; - -/** - * Clear cookie `name`. - * - * @param {String} name - * @param {Object} [options] - * @return {ServerResponse} for chaining - * @public - */ - -res.clearCookie = function clearCookie(name, options) { - if (options) { - if (options.maxAge) { - deprecate('res.clearCookie: Passing "options.maxAge" is deprecated. In v5.0.0 of Express, this option will be ignored, as res.clearCookie will automatically set cookies to expire immediately. Please update your code to omit this option.'); - } - if (options.expires) { - deprecate('res.clearCookie: Passing "options.expires" is deprecated. In v5.0.0 of Express, this option will be ignored, as res.clearCookie will automatically set cookies to expire immediately. Please update your code to omit this option.'); - } - } - var opts = merge({ expires: new Date(1), path: '/' }, options); - - return this.cookie(name, '', opts); -}; - -/** - * Set cookie `name` to `value`, with the given `options`. - * - * Options: - * - * - `maxAge` max-age in milliseconds, converted to `expires` - * - `signed` sign the cookie - * - `path` defaults to "/" - * - * Examples: - * - * // "Remember Me" for 15 minutes - * res.cookie('rememberme', '1', { expires: new Date(Date.now() + 900000), httpOnly: true }); - * - * // same as above - * res.cookie('rememberme', '1', { maxAge: 900000, httpOnly: true }) - * - * @param {String} name - * @param {String|Object} value - * @param {Object} [options] - * @return {ServerResponse} for chaining - * @public - */ - -res.cookie = function (name, value, options) { - var opts = merge({}, options); - var secret = this.req.secret; - var signed = opts.signed; - - if (signed && !secret) { - throw new Error('cookieParser("secret") required for signed cookies'); - } - - var val = typeof value === 'object' - ? 'j:' + JSON.stringify(value) - : String(value); - - if (signed) { - val = 's:' + sign(val, secret); - } - - if (opts.maxAge != null) { - var maxAge = opts.maxAge - 0 - - if (!isNaN(maxAge)) { - opts.expires = new Date(Date.now() + maxAge) - opts.maxAge = Math.floor(maxAge / 1000) - } - } - - if (opts.path == null) { - opts.path = '/'; - } - - this.append('Set-Cookie', cookie.serialize(name, String(val), opts)); - - return this; -}; - -/** - * Set the location header to `url`. - * - * The given `url` can also be "back", which redirects - * to the _Referrer_ or _Referer_ headers or "/". - * - * Examples: - * - * res.location('/foo/bar').; - * res.location('http://example.com'); - * res.location('../login'); - * - * @param {String} url - * @return {ServerResponse} for chaining - * @public - */ - -res.location = function location(url) { - var loc; - - // "back" is an alias for the referrer - if (url === 'back') { - deprecate('res.location("back"): use res.location(req.get("Referrer") || "/") and refer to https://dub.sh/security-redirect for best practices'); - loc = this.req.get('Referrer') || '/'; - } else { - loc = String(url); - } - - return this.set('Location', encodeUrl(loc)); -}; - -/** - * Redirect to the given `url` with optional response `status` - * defaulting to 302. - * - * The resulting `url` is determined by `res.location()`, so - * it will play nicely with mounted apps, relative paths, - * `"back"` etc. - * - * Examples: - * - * res.redirect('/foo/bar'); - * res.redirect('http://example.com'); - * res.redirect(301, 'http://example.com'); - * res.redirect('../login'); // /blog/post/1 -> /blog/login - * - * @public - */ - -res.redirect = function redirect(url) { - var address = url; - var body; - var status = 302; - - // allow status / url - if (arguments.length === 2) { - if (typeof arguments[0] === 'number') { - status = arguments[0]; - address = arguments[1]; - } else { - deprecate('res.redirect(url, status): Use res.redirect(status, url) instead'); - status = arguments[1]; - } - } - - // Set location header - address = this.location(address).get('Location'); - - // Support text/{plain,html} by default - this.format({ - text: function(){ - body = statuses.message[status] + '. Redirecting to ' + address - }, - - html: function(){ - var u = escapeHtml(address); - body = '

' + statuses.message[status] + '. Redirecting to ' + u + '

' - }, - - default: function(){ - body = ''; - } - }); - - // Respond - this.statusCode = status; - this.set('Content-Length', Buffer.byteLength(body)); - - if (this.req.method === 'HEAD') { - this.end(); - } else { - this.end(body); - } -}; - -/** - * Add `field` to Vary. If already present in the Vary set, then - * this call is simply ignored. - * - * @param {Array|String} field - * @return {ServerResponse} for chaining - * @public - */ - -res.vary = function(field){ - // checks for back-compat - if (!field || (Array.isArray(field) && !field.length)) { - deprecate('res.vary(): Provide a field name'); - return this; - } - - vary(this, field); - - return this; -}; - -/** - * Render `view` with the given `options` and optional callback `fn`. - * When a callback function is given a response will _not_ be made - * automatically, otherwise a response of _200_ and _text/html_ is given. - * - * Options: - * - * - `cache` boolean hinting to the engine it should cache - * - `filename` filename of the view being rendered - * - * @public - */ - -res.render = function render(view, options, callback) { - var app = this.req.app; - var done = callback; - var opts = options || {}; - var req = this.req; - var self = this; - - // support callback function as second arg - if (typeof options === 'function') { - done = options; - opts = {}; - } - - // merge res.locals - opts._locals = self.locals; - - // default callback to respond - done = done || function (err, str) { - if (err) return req.next(err); - self.send(str); - }; - - // render - app.render(view, opts, done); -}; - -// pipe the send file stream -function sendfile(res, file, options, callback) { - var done = false; - var streaming; - - // request aborted - function onaborted() { - if (done) return; - done = true; - - var err = new Error('Request aborted'); - err.code = 'ECONNABORTED'; - callback(err); - } - - // directory - function ondirectory() { - if (done) return; - done = true; - - var err = new Error('EISDIR, read'); - err.code = 'EISDIR'; - callback(err); - } - - // errors - function onerror(err) { - if (done) return; - done = true; - callback(err); - } - - // ended - function onend() { - if (done) return; - done = true; - callback(); - } - - // file - function onfile() { - streaming = false; - } - - // finished - function onfinish(err) { - if (err && err.code === 'ECONNRESET') return onaborted(); - if (err) return onerror(err); - if (done) return; - - setImmediate(function () { - if (streaming !== false && !done) { - onaborted(); - return; - } - - if (done) return; - done = true; - callback(); - }); - } - - // streaming - function onstream() { - streaming = true; - } - - file.on('directory', ondirectory); - file.on('end', onend); - file.on('error', onerror); - file.on('file', onfile); - file.on('stream', onstream); - onFinished(res, onfinish); - - if (options.headers) { - // set headers on successful transfer - file.on('headers', function headers(res) { - var obj = options.headers; - var keys = Object.keys(obj); - - for (var i = 0; i < keys.length; i++) { - var k = keys[i]; - res.setHeader(k, obj[k]); - } - }); - } - - // pipe - file.pipe(res); -} - -/** - * Stringify JSON, like JSON.stringify, but v8 optimized, with the - * ability to escape characters that can trigger HTML sniffing. - * - * @param {*} value - * @param {function} replacer - * @param {number} spaces - * @param {boolean} escape - * @returns {string} - * @private - */ - -function stringify (value, replacer, spaces, escape) { - // v8 checks arguments.length for optimizing simple call - // https://bugs.chromium.org/p/v8/issues/detail?id=4730 - var json = replacer || spaces - ? JSON.stringify(value, replacer, spaces) - : JSON.stringify(value); - - if (escape && typeof json === 'string') { - json = json.replace(/[<>&]/g, function (c) { - switch (c.charCodeAt(0)) { - case 0x3c: - return '\\u003c' - case 0x3e: - return '\\u003e' - case 0x26: - return '\\u0026' - /* istanbul ignore next: unreachable default */ - default: - return c - } - }) - } - - return json -} diff --git a/node_modules/express/lib/router/index.js b/node_modules/express/lib/router/index.js deleted file mode 100644 index abb3a6f..0000000 --- a/node_modules/express/lib/router/index.js +++ /dev/null @@ -1,673 +0,0 @@ -/*! - * express - * Copyright(c) 2009-2013 TJ Holowaychuk - * Copyright(c) 2013 Roman Shtylman - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module dependencies. - * @private - */ - -var Route = require('./route'); -var Layer = require('./layer'); -var methods = require('methods'); -var mixin = require('utils-merge'); -var debug = require('debug')('express:router'); -var deprecate = require('depd')('express'); -var flatten = require('array-flatten'); -var parseUrl = require('parseurl'); -var setPrototypeOf = require('setprototypeof') - -/** - * Module variables. - * @private - */ - -var objectRegExp = /^\[object (\S+)\]$/; -var slice = Array.prototype.slice; -var toString = Object.prototype.toString; - -/** - * Initialize a new `Router` with the given `options`. - * - * @param {Object} [options] - * @return {Router} which is a callable function - * @public - */ - -var proto = module.exports = function(options) { - var opts = options || {}; - - function router(req, res, next) { - router.handle(req, res, next); - } - - // mixin Router class functions - setPrototypeOf(router, proto) - - router.params = {}; - router._params = []; - router.caseSensitive = opts.caseSensitive; - router.mergeParams = opts.mergeParams; - router.strict = opts.strict; - router.stack = []; - - return router; -}; - -/** - * Map the given param placeholder `name`(s) to the given callback. - * - * Parameter mapping is used to provide pre-conditions to routes - * which use normalized placeholders. For example a _:user_id_ parameter - * could automatically load a user's information from the database without - * any additional code, - * - * The callback uses the same signature as middleware, the only difference - * being that the value of the placeholder is passed, in this case the _id_ - * of the user. Once the `next()` function is invoked, just like middleware - * it will continue on to execute the route, or subsequent parameter functions. - * - * Just like in middleware, you must either respond to the request or call next - * to avoid stalling the request. - * - * app.param('user_id', function(req, res, next, id){ - * User.find(id, function(err, user){ - * if (err) { - * return next(err); - * } else if (!user) { - * return next(new Error('failed to load user')); - * } - * req.user = user; - * next(); - * }); - * }); - * - * @param {String} name - * @param {Function} fn - * @return {app} for chaining - * @public - */ - -proto.param = function param(name, fn) { - // param logic - if (typeof name === 'function') { - deprecate('router.param(fn): Refactor to use path params'); - this._params.push(name); - return; - } - - // apply param functions - var params = this._params; - var len = params.length; - var ret; - - if (name[0] === ':') { - deprecate('router.param(' + JSON.stringify(name) + ', fn): Use router.param(' + JSON.stringify(name.slice(1)) + ', fn) instead') - name = name.slice(1) - } - - for (var i = 0; i < len; ++i) { - if (ret = params[i](name, fn)) { - fn = ret; - } - } - - // ensure we end up with a - // middleware function - if ('function' !== typeof fn) { - throw new Error('invalid param() call for ' + name + ', got ' + fn); - } - - (this.params[name] = this.params[name] || []).push(fn); - return this; -}; - -/** - * Dispatch a req, res into the router. - * @private - */ - -proto.handle = function handle(req, res, out) { - var self = this; - - debug('dispatching %s %s', req.method, req.url); - - var idx = 0; - var protohost = getProtohost(req.url) || '' - var removed = ''; - var slashAdded = false; - var sync = 0 - var paramcalled = {}; - - // store options for OPTIONS request - // only used if OPTIONS request - var options = []; - - // middleware and routes - var stack = self.stack; - - // manage inter-router variables - var parentParams = req.params; - var parentUrl = req.baseUrl || ''; - var done = restore(out, req, 'baseUrl', 'next', 'params'); - - // setup next layer - req.next = next; - - // for options requests, respond with a default if nothing else responds - if (req.method === 'OPTIONS') { - done = wrap(done, function(old, err) { - if (err || options.length === 0) return old(err); - sendOptionsResponse(res, options, old); - }); - } - - // setup basic req values - req.baseUrl = parentUrl; - req.originalUrl = req.originalUrl || req.url; - - next(); - - function next(err) { - var layerError = err === 'route' - ? null - : err; - - // remove added slash - if (slashAdded) { - req.url = req.url.slice(1) - slashAdded = false; - } - - // restore altered req.url - if (removed.length !== 0) { - req.baseUrl = parentUrl; - req.url = protohost + removed + req.url.slice(protohost.length) - removed = ''; - } - - // signal to exit router - if (layerError === 'router') { - setImmediate(done, null) - return - } - - // no more matching layers - if (idx >= stack.length) { - setImmediate(done, layerError); - return; - } - - // max sync stack - if (++sync > 100) { - return setImmediate(next, err) - } - - // get pathname of request - var path = getPathname(req); - - if (path == null) { - return done(layerError); - } - - // find next matching layer - var layer; - var match; - var route; - - while (match !== true && idx < stack.length) { - layer = stack[idx++]; - match = matchLayer(layer, path); - route = layer.route; - - if (typeof match !== 'boolean') { - // hold on to layerError - layerError = layerError || match; - } - - if (match !== true) { - continue; - } - - if (!route) { - // process non-route handlers normally - continue; - } - - if (layerError) { - // routes do not match with a pending error - match = false; - continue; - } - - var method = req.method; - var has_method = route._handles_method(method); - - // build up automatic options response - if (!has_method && method === 'OPTIONS') { - appendMethods(options, route._options()); - } - - // don't even bother matching route - if (!has_method && method !== 'HEAD') { - match = false; - } - } - - // no match - if (match !== true) { - return done(layerError); - } - - // store route for dispatch on change - if (route) { - req.route = route; - } - - // Capture one-time layer values - req.params = self.mergeParams - ? mergeParams(layer.params, parentParams) - : layer.params; - var layerPath = layer.path; - - // this should be done for the layer - self.process_params(layer, paramcalled, req, res, function (err) { - if (err) { - next(layerError || err) - } else if (route) { - layer.handle_request(req, res, next) - } else { - trim_prefix(layer, layerError, layerPath, path) - } - - sync = 0 - }); - } - - function trim_prefix(layer, layerError, layerPath, path) { - if (layerPath.length !== 0) { - // Validate path is a prefix match - if (layerPath !== path.slice(0, layerPath.length)) { - next(layerError) - return - } - - // Validate path breaks on a path separator - var c = path[layerPath.length] - if (c && c !== '/' && c !== '.') return next(layerError) - - // Trim off the part of the url that matches the route - // middleware (.use stuff) needs to have the path stripped - debug('trim prefix (%s) from url %s', layerPath, req.url); - removed = layerPath; - req.url = protohost + req.url.slice(protohost.length + removed.length) - - // Ensure leading slash - if (!protohost && req.url[0] !== '/') { - req.url = '/' + req.url; - slashAdded = true; - } - - // Setup base URL (no trailing slash) - req.baseUrl = parentUrl + (removed[removed.length - 1] === '/' - ? removed.substring(0, removed.length - 1) - : removed); - } - - debug('%s %s : %s', layer.name, layerPath, req.originalUrl); - - if (layerError) { - layer.handle_error(layerError, req, res, next); - } else { - layer.handle_request(req, res, next); - } - } -}; - -/** - * Process any parameters for the layer. - * @private - */ - -proto.process_params = function process_params(layer, called, req, res, done) { - var params = this.params; - - // captured parameters from the layer, keys and values - var keys = layer.keys; - - // fast track - if (!keys || keys.length === 0) { - return done(); - } - - var i = 0; - var name; - var paramIndex = 0; - var key; - var paramVal; - var paramCallbacks; - var paramCalled; - - // process params in order - // param callbacks can be async - function param(err) { - if (err) { - return done(err); - } - - if (i >= keys.length ) { - return done(); - } - - paramIndex = 0; - key = keys[i++]; - name = key.name; - paramVal = req.params[name]; - paramCallbacks = params[name]; - paramCalled = called[name]; - - if (paramVal === undefined || !paramCallbacks) { - return param(); - } - - // param previously called with same value or error occurred - if (paramCalled && (paramCalled.match === paramVal - || (paramCalled.error && paramCalled.error !== 'route'))) { - // restore value - req.params[name] = paramCalled.value; - - // next param - return param(paramCalled.error); - } - - called[name] = paramCalled = { - error: null, - match: paramVal, - value: paramVal - }; - - paramCallback(); - } - - // single param callbacks - function paramCallback(err) { - var fn = paramCallbacks[paramIndex++]; - - // store updated value - paramCalled.value = req.params[key.name]; - - if (err) { - // store error - paramCalled.error = err; - param(err); - return; - } - - if (!fn) return param(); - - try { - fn(req, res, paramCallback, paramVal, key.name); - } catch (e) { - paramCallback(e); - } - } - - param(); -}; - -/** - * Use the given middleware function, with optional path, defaulting to "/". - * - * Use (like `.all`) will run for any http METHOD, but it will not add - * handlers for those methods so OPTIONS requests will not consider `.use` - * functions even if they could respond. - * - * The other difference is that _route_ path is stripped and not visible - * to the handler function. The main effect of this feature is that mounted - * handlers can operate without any code changes regardless of the "prefix" - * pathname. - * - * @public - */ - -proto.use = function use(fn) { - var offset = 0; - var path = '/'; - - // default path to '/' - // disambiguate router.use([fn]) - if (typeof fn !== 'function') { - var arg = fn; - - while (Array.isArray(arg) && arg.length !== 0) { - arg = arg[0]; - } - - // first arg is the path - if (typeof arg !== 'function') { - offset = 1; - path = fn; - } - } - - var callbacks = flatten(slice.call(arguments, offset)); - - if (callbacks.length === 0) { - throw new TypeError('Router.use() requires a middleware function') - } - - for (var i = 0; i < callbacks.length; i++) { - var fn = callbacks[i]; - - if (typeof fn !== 'function') { - throw new TypeError('Router.use() requires a middleware function but got a ' + gettype(fn)) - } - - // add the middleware - debug('use %o %s', path, fn.name || '') - - var layer = new Layer(path, { - sensitive: this.caseSensitive, - strict: false, - end: false - }, fn); - - layer.route = undefined; - - this.stack.push(layer); - } - - return this; -}; - -/** - * Create a new Route for the given path. - * - * Each route contains a separate middleware stack and VERB handlers. - * - * See the Route api documentation for details on adding handlers - * and middleware to routes. - * - * @param {String} path - * @return {Route} - * @public - */ - -proto.route = function route(path) { - var route = new Route(path); - - var layer = new Layer(path, { - sensitive: this.caseSensitive, - strict: this.strict, - end: true - }, route.dispatch.bind(route)); - - layer.route = route; - - this.stack.push(layer); - return route; -}; - -// create Router#VERB functions -methods.concat('all').forEach(function(method){ - proto[method] = function(path){ - var route = this.route(path) - route[method].apply(route, slice.call(arguments, 1)); - return this; - }; -}); - -// append methods to a list of methods -function appendMethods(list, addition) { - for (var i = 0; i < addition.length; i++) { - var method = addition[i]; - if (list.indexOf(method) === -1) { - list.push(method); - } - } -} - -// get pathname of request -function getPathname(req) { - try { - return parseUrl(req).pathname; - } catch (err) { - return undefined; - } -} - -// Get get protocol + host for a URL -function getProtohost(url) { - if (typeof url !== 'string' || url.length === 0 || url[0] === '/') { - return undefined - } - - var searchIndex = url.indexOf('?') - var pathLength = searchIndex !== -1 - ? searchIndex - : url.length - var fqdnIndex = url.slice(0, pathLength).indexOf('://') - - return fqdnIndex !== -1 - ? url.substring(0, url.indexOf('/', 3 + fqdnIndex)) - : undefined -} - -// get type for error message -function gettype(obj) { - var type = typeof obj; - - if (type !== 'object') { - return type; - } - - // inspect [[Class]] for objects - return toString.call(obj) - .replace(objectRegExp, '$1'); -} - -/** - * Match path to a layer. - * - * @param {Layer} layer - * @param {string} path - * @private - */ - -function matchLayer(layer, path) { - try { - return layer.match(path); - } catch (err) { - return err; - } -} - -// merge params with parent params -function mergeParams(params, parent) { - if (typeof parent !== 'object' || !parent) { - return params; - } - - // make copy of parent for base - var obj = mixin({}, parent); - - // simple non-numeric merging - if (!(0 in params) || !(0 in parent)) { - return mixin(obj, params); - } - - var i = 0; - var o = 0; - - // determine numeric gaps - while (i in params) { - i++; - } - - while (o in parent) { - o++; - } - - // offset numeric indices in params before merge - for (i--; i >= 0; i--) { - params[i + o] = params[i]; - - // create holes for the merge when necessary - if (i < o) { - delete params[i]; - } - } - - return mixin(obj, params); -} - -// restore obj props after function -function restore(fn, obj) { - var props = new Array(arguments.length - 2); - var vals = new Array(arguments.length - 2); - - for (var i = 0; i < props.length; i++) { - props[i] = arguments[i + 2]; - vals[i] = obj[props[i]]; - } - - return function () { - // restore vals - for (var i = 0; i < props.length; i++) { - obj[props[i]] = vals[i]; - } - - return fn.apply(this, arguments); - }; -} - -// send an OPTIONS response -function sendOptionsResponse(res, options, next) { - try { - var body = options.join(','); - res.set('Allow', body); - res.send(body); - } catch (err) { - next(err); - } -} - -// wrap a function -function wrap(old, fn) { - return function proxy() { - var args = new Array(arguments.length + 1); - - args[0] = old; - for (var i = 0, len = arguments.length; i < len; i++) { - args[i + 1] = arguments[i]; - } - - fn.apply(this, args); - }; -} diff --git a/node_modules/express/lib/router/layer.js b/node_modules/express/lib/router/layer.js deleted file mode 100644 index 4dc8e86..0000000 --- a/node_modules/express/lib/router/layer.js +++ /dev/null @@ -1,181 +0,0 @@ -/*! - * express - * Copyright(c) 2009-2013 TJ Holowaychuk - * Copyright(c) 2013 Roman Shtylman - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module dependencies. - * @private - */ - -var pathRegexp = require('path-to-regexp'); -var debug = require('debug')('express:router:layer'); - -/** - * Module variables. - * @private - */ - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -/** - * Module exports. - * @public - */ - -module.exports = Layer; - -function Layer(path, options, fn) { - if (!(this instanceof Layer)) { - return new Layer(path, options, fn); - } - - debug('new %o', path) - var opts = options || {}; - - this.handle = fn; - this.name = fn.name || ''; - this.params = undefined; - this.path = undefined; - this.regexp = pathRegexp(path, this.keys = [], opts); - - // set fast path flags - this.regexp.fast_star = path === '*' - this.regexp.fast_slash = path === '/' && opts.end === false -} - -/** - * Handle the error for the layer. - * - * @param {Error} error - * @param {Request} req - * @param {Response} res - * @param {function} next - * @api private - */ - -Layer.prototype.handle_error = function handle_error(error, req, res, next) { - var fn = this.handle; - - if (fn.length !== 4) { - // not a standard error handler - return next(error); - } - - try { - fn(error, req, res, next); - } catch (err) { - next(err); - } -}; - -/** - * Handle the request for the layer. - * - * @param {Request} req - * @param {Response} res - * @param {function} next - * @api private - */ - -Layer.prototype.handle_request = function handle(req, res, next) { - var fn = this.handle; - - if (fn.length > 3) { - // not a standard request handler - return next(); - } - - try { - fn(req, res, next); - } catch (err) { - next(err); - } -}; - -/** - * Check if this route matches `path`, if so - * populate `.params`. - * - * @param {String} path - * @return {Boolean} - * @api private - */ - -Layer.prototype.match = function match(path) { - var match - - if (path != null) { - // fast path non-ending match for / (any path matches) - if (this.regexp.fast_slash) { - this.params = {} - this.path = '' - return true - } - - // fast path for * (everything matched in a param) - if (this.regexp.fast_star) { - this.params = {'0': decode_param(path)} - this.path = path - return true - } - - // match the path - match = this.regexp.exec(path) - } - - if (!match) { - this.params = undefined; - this.path = undefined; - return false; - } - - // store values - this.params = {}; - this.path = match[0] - - var keys = this.keys; - var params = this.params; - - for (var i = 1; i < match.length; i++) { - var key = keys[i - 1]; - var prop = key.name; - var val = decode_param(match[i]) - - if (val !== undefined || !(hasOwnProperty.call(params, prop))) { - params[prop] = val; - } - } - - return true; -}; - -/** - * Decode param value. - * - * @param {string} val - * @return {string} - * @private - */ - -function decode_param(val) { - if (typeof val !== 'string' || val.length === 0) { - return val; - } - - try { - return decodeURIComponent(val); - } catch (err) { - if (err instanceof URIError) { - err.message = 'Failed to decode param \'' + val + '\''; - err.status = err.statusCode = 400; - } - - throw err; - } -} diff --git a/node_modules/express/lib/router/route.js b/node_modules/express/lib/router/route.js deleted file mode 100644 index a65756d..0000000 --- a/node_modules/express/lib/router/route.js +++ /dev/null @@ -1,230 +0,0 @@ -/*! - * express - * Copyright(c) 2009-2013 TJ Holowaychuk - * Copyright(c) 2013 Roman Shtylman - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module dependencies. - * @private - */ - -var debug = require('debug')('express:router:route'); -var flatten = require('array-flatten'); -var Layer = require('./layer'); -var methods = require('methods'); - -/** - * Module variables. - * @private - */ - -var slice = Array.prototype.slice; -var toString = Object.prototype.toString; - -/** - * Module exports. - * @public - */ - -module.exports = Route; - -/** - * Initialize `Route` with the given `path`, - * - * @param {String} path - * @public - */ - -function Route(path) { - this.path = path; - this.stack = []; - - debug('new %o', path) - - // route handlers for various http methods - this.methods = {}; -} - -/** - * Determine if the route handles a given method. - * @private - */ - -Route.prototype._handles_method = function _handles_method(method) { - if (this.methods._all) { - return true; - } - - // normalize name - var name = typeof method === 'string' - ? method.toLowerCase() - : method - - if (name === 'head' && !this.methods['head']) { - name = 'get'; - } - - return Boolean(this.methods[name]); -}; - -/** - * @return {Array} supported HTTP methods - * @private - */ - -Route.prototype._options = function _options() { - var methods = Object.keys(this.methods); - - // append automatic head - if (this.methods.get && !this.methods.head) { - methods.push('head'); - } - - for (var i = 0; i < methods.length; i++) { - // make upper case - methods[i] = methods[i].toUpperCase(); - } - - return methods; -}; - -/** - * dispatch req, res into this route - * @private - */ - -Route.prototype.dispatch = function dispatch(req, res, done) { - var idx = 0; - var stack = this.stack; - var sync = 0 - - if (stack.length === 0) { - return done(); - } - var method = typeof req.method === 'string' - ? req.method.toLowerCase() - : req.method - - if (method === 'head' && !this.methods['head']) { - method = 'get'; - } - - req.route = this; - - next(); - - function next(err) { - // signal to exit route - if (err && err === 'route') { - return done(); - } - - // signal to exit router - if (err && err === 'router') { - return done(err) - } - - // max sync stack - if (++sync > 100) { - return setImmediate(next, err) - } - - var layer = stack[idx++] - - // end of layers - if (!layer) { - return done(err) - } - - if (layer.method && layer.method !== method) { - next(err) - } else if (err) { - layer.handle_error(err, req, res, next); - } else { - layer.handle_request(req, res, next); - } - - sync = 0 - } -}; - -/** - * Add a handler for all HTTP verbs to this route. - * - * Behaves just like middleware and can respond or call `next` - * to continue processing. - * - * You can use multiple `.all` call to add multiple handlers. - * - * function check_something(req, res, next){ - * next(); - * }; - * - * function validate_user(req, res, next){ - * next(); - * }; - * - * route - * .all(validate_user) - * .all(check_something) - * .get(function(req, res, next){ - * res.send('hello world'); - * }); - * - * @param {function} handler - * @return {Route} for chaining - * @api public - */ - -Route.prototype.all = function all() { - var handles = flatten(slice.call(arguments)); - - for (var i = 0; i < handles.length; i++) { - var handle = handles[i]; - - if (typeof handle !== 'function') { - var type = toString.call(handle); - var msg = 'Route.all() requires a callback function but got a ' + type - throw new TypeError(msg); - } - - var layer = Layer('/', {}, handle); - layer.method = undefined; - - this.methods._all = true; - this.stack.push(layer); - } - - return this; -}; - -methods.forEach(function(method){ - Route.prototype[method] = function(){ - var handles = flatten(slice.call(arguments)); - - for (var i = 0; i < handles.length; i++) { - var handle = handles[i]; - - if (typeof handle !== 'function') { - var type = toString.call(handle); - var msg = 'Route.' + method + '() requires a callback function but got a ' + type - throw new Error(msg); - } - - debug('%s %o', method, this.path) - - var layer = Layer('/', {}, handle); - layer.method = method; - - this.methods[method] = true; - this.stack.push(layer); - } - - return this; - }; -}); diff --git a/node_modules/express/lib/utils.js b/node_modules/express/lib/utils.js deleted file mode 100644 index 56e12b9..0000000 --- a/node_modules/express/lib/utils.js +++ /dev/null @@ -1,303 +0,0 @@ -/*! - * express - * Copyright(c) 2009-2013 TJ Holowaychuk - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module dependencies. - * @api private - */ - -var Buffer = require('safe-buffer').Buffer -var contentDisposition = require('content-disposition'); -var contentType = require('content-type'); -var deprecate = require('depd')('express'); -var flatten = require('array-flatten'); -var mime = require('send').mime; -var etag = require('etag'); -var proxyaddr = require('proxy-addr'); -var qs = require('qs'); -var querystring = require('querystring'); - -/** - * Return strong ETag for `body`. - * - * @param {String|Buffer} body - * @param {String} [encoding] - * @return {String} - * @api private - */ - -exports.etag = createETagGenerator({ weak: false }) - -/** - * Return weak ETag for `body`. - * - * @param {String|Buffer} body - * @param {String} [encoding] - * @return {String} - * @api private - */ - -exports.wetag = createETagGenerator({ weak: true }) - -/** - * Check if `path` looks absolute. - * - * @param {String} path - * @return {Boolean} - * @api private - */ - -exports.isAbsolute = function(path){ - if ('/' === path[0]) return true; - if (':' === path[1] && ('\\' === path[2] || '/' === path[2])) return true; // Windows device path - if ('\\\\' === path.substring(0, 2)) return true; // Microsoft Azure absolute path -}; - -/** - * Flatten the given `arr`. - * - * @param {Array} arr - * @return {Array} - * @api private - */ - -exports.flatten = deprecate.function(flatten, - 'utils.flatten: use array-flatten npm module instead'); - -/** - * Normalize the given `type`, for example "html" becomes "text/html". - * - * @param {String} type - * @return {Object} - * @api private - */ - -exports.normalizeType = function(type){ - return ~type.indexOf('/') - ? acceptParams(type) - : { value: mime.lookup(type), params: {} }; -}; - -/** - * Normalize `types`, for example "html" becomes "text/html". - * - * @param {Array} types - * @return {Array} - * @api private - */ - -exports.normalizeTypes = function(types){ - var ret = []; - - for (var i = 0; i < types.length; ++i) { - ret.push(exports.normalizeType(types[i])); - } - - return ret; -}; - -/** - * Generate Content-Disposition header appropriate for the filename. - * non-ascii filenames are urlencoded and a filename* parameter is added - * - * @param {String} filename - * @return {String} - * @api private - */ - -exports.contentDisposition = deprecate.function(contentDisposition, - 'utils.contentDisposition: use content-disposition npm module instead'); - -/** - * Parse accept params `str` returning an - * object with `.value`, `.quality` and `.params`. - * - * @param {String} str - * @return {Object} - * @api private - */ - -function acceptParams (str) { - var parts = str.split(/ *; */); - var ret = { value: parts[0], quality: 1, params: {} } - - for (var i = 1; i < parts.length; ++i) { - var pms = parts[i].split(/ *= */); - if ('q' === pms[0]) { - ret.quality = parseFloat(pms[1]); - } else { - ret.params[pms[0]] = pms[1]; - } - } - - return ret; -} - -/** - * Compile "etag" value to function. - * - * @param {Boolean|String|Function} val - * @return {Function} - * @api private - */ - -exports.compileETag = function(val) { - var fn; - - if (typeof val === 'function') { - return val; - } - - switch (val) { - case true: - case 'weak': - fn = exports.wetag; - break; - case false: - break; - case 'strong': - fn = exports.etag; - break; - default: - throw new TypeError('unknown value for etag function: ' + val); - } - - return fn; -} - -/** - * Compile "query parser" value to function. - * - * @param {String|Function} val - * @return {Function} - * @api private - */ - -exports.compileQueryParser = function compileQueryParser(val) { - var fn; - - if (typeof val === 'function') { - return val; - } - - switch (val) { - case true: - case 'simple': - fn = querystring.parse; - break; - case false: - fn = newObject; - break; - case 'extended': - fn = parseExtendedQueryString; - break; - default: - throw new TypeError('unknown value for query parser function: ' + val); - } - - return fn; -} - -/** - * Compile "proxy trust" value to function. - * - * @param {Boolean|String|Number|Array|Function} val - * @return {Function} - * @api private - */ - -exports.compileTrust = function(val) { - if (typeof val === 'function') return val; - - if (val === true) { - // Support plain true/false - return function(){ return true }; - } - - if (typeof val === 'number') { - // Support trusting hop count - return function(a, i){ return i < val }; - } - - if (typeof val === 'string') { - // Support comma-separated values - val = val.split(',') - .map(function (v) { return v.trim() }) - } - - return proxyaddr.compile(val || []); -} - -/** - * Set the charset in a given Content-Type string. - * - * @param {String} type - * @param {String} charset - * @return {String} - * @api private - */ - -exports.setCharset = function setCharset(type, charset) { - if (!type || !charset) { - return type; - } - - // parse type - var parsed = contentType.parse(type); - - // set charset - parsed.parameters.charset = charset; - - // format type - return contentType.format(parsed); -}; - -/** - * Create an ETag generator function, generating ETags with - * the given options. - * - * @param {object} options - * @return {function} - * @private - */ - -function createETagGenerator (options) { - return function generateETag (body, encoding) { - var buf = !Buffer.isBuffer(body) - ? Buffer.from(body, encoding) - : body - - return etag(buf, options) - } -} - -/** - * Parse an extended query string with qs. - * - * @param {String} str - * @return {Object} - * @private - */ - -function parseExtendedQueryString(str) { - return qs.parse(str, { - allowPrototypes: true - }); -} - -/** - * Return new empty object. - * - * @return {Object} - * @api private - */ - -function newObject() { - return {}; -} diff --git a/node_modules/express/lib/view.js b/node_modules/express/lib/view.js deleted file mode 100644 index c08ab4d..0000000 --- a/node_modules/express/lib/view.js +++ /dev/null @@ -1,182 +0,0 @@ -/*! - * express - * Copyright(c) 2009-2013 TJ Holowaychuk - * Copyright(c) 2013 Roman Shtylman - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module dependencies. - * @private - */ - -var debug = require('debug')('express:view'); -var path = require('path'); -var fs = require('fs'); - -/** - * Module variables. - * @private - */ - -var dirname = path.dirname; -var basename = path.basename; -var extname = path.extname; -var join = path.join; -var resolve = path.resolve; - -/** - * Module exports. - * @public - */ - -module.exports = View; - -/** - * Initialize a new `View` with the given `name`. - * - * Options: - * - * - `defaultEngine` the default template engine name - * - `engines` template engine require() cache - * - `root` root path for view lookup - * - * @param {string} name - * @param {object} options - * @public - */ - -function View(name, options) { - var opts = options || {}; - - this.defaultEngine = opts.defaultEngine; - this.ext = extname(name); - this.name = name; - this.root = opts.root; - - if (!this.ext && !this.defaultEngine) { - throw new Error('No default engine was specified and no extension was provided.'); - } - - var fileName = name; - - if (!this.ext) { - // get extension from default engine name - this.ext = this.defaultEngine[0] !== '.' - ? '.' + this.defaultEngine - : this.defaultEngine; - - fileName += this.ext; - } - - if (!opts.engines[this.ext]) { - // load engine - var mod = this.ext.slice(1) - debug('require "%s"', mod) - - // default engine export - var fn = require(mod).__express - - if (typeof fn !== 'function') { - throw new Error('Module "' + mod + '" does not provide a view engine.') - } - - opts.engines[this.ext] = fn - } - - // store loaded engine - this.engine = opts.engines[this.ext]; - - // lookup path - this.path = this.lookup(fileName); -} - -/** - * Lookup view by the given `name` - * - * @param {string} name - * @private - */ - -View.prototype.lookup = function lookup(name) { - var path; - var roots = [].concat(this.root); - - debug('lookup "%s"', name); - - for (var i = 0; i < roots.length && !path; i++) { - var root = roots[i]; - - // resolve the path - var loc = resolve(root, name); - var dir = dirname(loc); - var file = basename(loc); - - // resolve the file - path = this.resolve(dir, file); - } - - return path; -}; - -/** - * Render with the given options. - * - * @param {object} options - * @param {function} callback - * @private - */ - -View.prototype.render = function render(options, callback) { - debug('render "%s"', this.path); - this.engine(this.path, options, callback); -}; - -/** - * Resolve the file within the given directory. - * - * @param {string} dir - * @param {string} file - * @private - */ - -View.prototype.resolve = function resolve(dir, file) { - var ext = this.ext; - - // . - var path = join(dir, file); - var stat = tryStat(path); - - if (stat && stat.isFile()) { - return path; - } - - // /index. - path = join(dir, basename(file, ext), 'index' + ext); - stat = tryStat(path); - - if (stat && stat.isFile()) { - return path; - } -}; - -/** - * Return a stat, maybe. - * - * @param {string} path - * @return {fs.Stats} - * @private - */ - -function tryStat(path) { - debug('stat "%s"', path); - - try { - return fs.statSync(path); - } catch (e) { - return undefined; - } -} diff --git a/node_modules/express/node_modules/debug/.coveralls.yml b/node_modules/express/node_modules/debug/.coveralls.yml deleted file mode 100644 index 20a7068..0000000 --- a/node_modules/express/node_modules/debug/.coveralls.yml +++ /dev/null @@ -1 +0,0 @@ -repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve diff --git a/node_modules/express/node_modules/debug/.eslintrc b/node_modules/express/node_modules/debug/.eslintrc deleted file mode 100644 index 8a37ae2..0000000 --- a/node_modules/express/node_modules/debug/.eslintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "env": { - "browser": true, - "node": true - }, - "rules": { - "no-console": 0, - "no-empty": [1, { "allowEmptyCatch": true }] - }, - "extends": "eslint:recommended" -} diff --git a/node_modules/express/node_modules/debug/.npmignore b/node_modules/express/node_modules/debug/.npmignore deleted file mode 100644 index 5f60eec..0000000 --- a/node_modules/express/node_modules/debug/.npmignore +++ /dev/null @@ -1,9 +0,0 @@ -support -test -examples -example -*.sock -dist -yarn.lock -coverage -bower.json diff --git a/node_modules/express/node_modules/debug/.travis.yml b/node_modules/express/node_modules/debug/.travis.yml deleted file mode 100644 index 6c6090c..0000000 --- a/node_modules/express/node_modules/debug/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ - -language: node_js -node_js: - - "6" - - "5" - - "4" - -install: - - make node_modules - -script: - - make lint - - make test - - make coveralls diff --git a/node_modules/express/node_modules/debug/CHANGELOG.md b/node_modules/express/node_modules/debug/CHANGELOG.md deleted file mode 100644 index eadaa18..0000000 --- a/node_modules/express/node_modules/debug/CHANGELOG.md +++ /dev/null @@ -1,362 +0,0 @@ - -2.6.9 / 2017-09-22 -================== - - * remove ReDoS regexp in %o formatter (#504) - -2.6.8 / 2017-05-18 -================== - - * Fix: Check for undefined on browser globals (#462, @marbemac) - -2.6.7 / 2017-05-16 -================== - - * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom) - * Fix: Inline extend function in node implementation (#452, @dougwilson) - * Docs: Fix typo (#455, @msasad) - -2.6.5 / 2017-04-27 -================== - - * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek) - * Misc: clean up browser reference checks (#447, @thebigredgeek) - * Misc: add npm-debug.log to .gitignore (@thebigredgeek) - - -2.6.4 / 2017-04-20 -================== - - * Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo) - * Chore: ignore bower.json in npm installations. (#437, @joaovieira) - * Misc: update "ms" to v0.7.3 (@tootallnate) - -2.6.3 / 2017-03-13 -================== - - * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts) - * Docs: Changelog fix (@thebigredgeek) - -2.6.2 / 2017-03-10 -================== - - * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin) - * Docs: Add backers and sponsors from Open Collective (#422, @piamancini) - * Docs: Add Slackin invite badge (@tootallnate) - -2.6.1 / 2017-02-10 -================== - - * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error - * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0) - * Fix: IE8 "Expected identifier" error (#414, @vgoma) - * Fix: Namespaces would not disable once enabled (#409, @musikov) - -2.6.0 / 2016-12-28 -================== - - * Fix: added better null pointer checks for browser useColors (@thebigredgeek) - * Improvement: removed explicit `window.debug` export (#404, @tootallnate) - * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate) - -2.5.2 / 2016-12-25 -================== - - * Fix: reference error on window within webworkers (#393, @KlausTrainer) - * Docs: fixed README typo (#391, @lurch) - * Docs: added notice about v3 api discussion (@thebigredgeek) - -2.5.1 / 2016-12-20 -================== - - * Fix: babel-core compatibility - -2.5.0 / 2016-12-20 -================== - - * Fix: wrong reference in bower file (@thebigredgeek) - * Fix: webworker compatibility (@thebigredgeek) - * Fix: output formatting issue (#388, @kribblo) - * Fix: babel-loader compatibility (#383, @escwald) - * Misc: removed built asset from repo and publications (@thebigredgeek) - * Misc: moved source files to /src (#378, @yamikuronue) - * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue) - * Test: coveralls integration (#378, @yamikuronue) - * Docs: simplified language in the opening paragraph (#373, @yamikuronue) - -2.4.5 / 2016-12-17 -================== - - * Fix: `navigator` undefined in Rhino (#376, @jochenberger) - * Fix: custom log function (#379, @hsiliev) - * Improvement: bit of cleanup + linting fixes (@thebigredgeek) - * Improvement: rm non-maintainted `dist/` dir (#375, @freewil) - * Docs: simplified language in the opening paragraph. (#373, @yamikuronue) - -2.4.4 / 2016-12-14 -================== - - * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts) - -2.4.3 / 2016-12-14 -================== - - * Fix: navigation.userAgent error for react native (#364, @escwald) - -2.4.2 / 2016-12-14 -================== - - * Fix: browser colors (#367, @tootallnate) - * Misc: travis ci integration (@thebigredgeek) - * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek) - -2.4.1 / 2016-12-13 -================== - - * Fix: typo that broke the package (#356) - -2.4.0 / 2016-12-13 -================== - - * Fix: bower.json references unbuilt src entry point (#342, @justmatt) - * Fix: revert "handle regex special characters" (@tootallnate) - * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate) - * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate) - * Improvement: allow colors in workers (#335, @botverse) - * Improvement: use same color for same namespace. (#338, @lchenay) - -2.3.3 / 2016-11-09 -================== - - * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne) - * Fix: Returning `localStorage` saved values (#331, Levi Thomason) - * Improvement: Don't create an empty object when no `process` (Nathan Rajlich) - -2.3.2 / 2016-11-09 -================== - - * Fix: be super-safe in index.js as well (@TooTallNate) - * Fix: should check whether process exists (Tom Newby) - -2.3.1 / 2016-11-09 -================== - - * Fix: Added electron compatibility (#324, @paulcbetts) - * Improvement: Added performance optimizations (@tootallnate) - * Readme: Corrected PowerShell environment variable example (#252, @gimre) - * Misc: Removed yarn lock file from source control (#321, @fengmk2) - -2.3.0 / 2016-11-07 -================== - - * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic) - * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos) - * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15) - * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran) - * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom) - * Package: Update "ms" to 0.7.2 (#315, @DevSide) - * Package: removed superfluous version property from bower.json (#207 @kkirsche) - * Readme: fix USE_COLORS to DEBUG_COLORS - * Readme: Doc fixes for format string sugar (#269, @mlucool) - * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0) - * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable) - * Readme: better docs for browser support (#224, @matthewmueller) - * Tooling: Added yarn integration for development (#317, @thebigredgeek) - * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek) - * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman) - * Misc: Updated contributors (@thebigredgeek) - -2.2.0 / 2015-05-09 -================== - - * package: update "ms" to v0.7.1 (#202, @dougwilson) - * README: add logging to file example (#193, @DanielOchoa) - * README: fixed a typo (#191, @amir-s) - * browser: expose `storage` (#190, @stephenmathieson) - * Makefile: add a `distclean` target (#189, @stephenmathieson) - -2.1.3 / 2015-03-13 -================== - - * Updated stdout/stderr example (#186) - * Updated example/stdout.js to match debug current behaviour - * Renamed example/stderr.js to stdout.js - * Update Readme.md (#184) - * replace high intensity foreground color for bold (#182, #183) - -2.1.2 / 2015-03-01 -================== - - * dist: recompile - * update "ms" to v0.7.0 - * package: update "browserify" to v9.0.3 - * component: fix "ms.js" repo location - * changed bower package name - * updated documentation about using debug in a browser - * fix: security error on safari (#167, #168, @yields) - -2.1.1 / 2014-12-29 -================== - - * browser: use `typeof` to check for `console` existence - * browser: check for `console.log` truthiness (fix IE 8/9) - * browser: add support for Chrome apps - * Readme: added Windows usage remarks - * Add `bower.json` to properly support bower install - -2.1.0 / 2014-10-15 -================== - - * node: implement `DEBUG_FD` env variable support - * package: update "browserify" to v6.1.0 - * package: add "license" field to package.json (#135, @panuhorsmalahti) - -2.0.0 / 2014-09-01 -================== - - * package: update "browserify" to v5.11.0 - * node: use stderr rather than stdout for logging (#29, @stephenmathieson) - -1.0.4 / 2014-07-15 -================== - - * dist: recompile - * example: remove `console.info()` log usage - * example: add "Content-Type" UTF-8 header to browser example - * browser: place %c marker after the space character - * browser: reset the "content" color via `color: inherit` - * browser: add colors support for Firefox >= v31 - * debug: prefer an instance `log()` function over the global one (#119) - * Readme: update documentation about styled console logs for FF v31 (#116, @wryk) - -1.0.3 / 2014-07-09 -================== - - * Add support for multiple wildcards in namespaces (#122, @seegno) - * browser: fix lint - -1.0.2 / 2014-06-10 -================== - - * browser: update color palette (#113, @gscottolson) - * common: make console logging function configurable (#108, @timoxley) - * node: fix %o colors on old node <= 0.8.x - * Makefile: find node path using shell/which (#109, @timoxley) - -1.0.1 / 2014-06-06 -================== - - * browser: use `removeItem()` to clear localStorage - * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777) - * package: add "contributors" section - * node: fix comment typo - * README: list authors - -1.0.0 / 2014-06-04 -================== - - * make ms diff be global, not be scope - * debug: ignore empty strings in enable() - * node: make DEBUG_COLORS able to disable coloring - * *: export the `colors` array - * npmignore: don't publish the `dist` dir - * Makefile: refactor to use browserify - * package: add "browserify" as a dev dependency - * Readme: add Web Inspector Colors section - * node: reset terminal color for the debug content - * node: map "%o" to `util.inspect()` - * browser: map "%j" to `JSON.stringify()` - * debug: add custom "formatters" - * debug: use "ms" module for humanizing the diff - * Readme: add "bash" syntax highlighting - * browser: add Firebug color support - * browser: add colors for WebKit browsers - * node: apply log to `console` - * rewrite: abstract common logic for Node & browsers - * add .jshintrc file - -0.8.1 / 2014-04-14 -================== - - * package: re-add the "component" section - -0.8.0 / 2014-03-30 -================== - - * add `enable()` method for nodejs. Closes #27 - * change from stderr to stdout - * remove unnecessary index.js file - -0.7.4 / 2013-11-13 -================== - - * remove "browserify" key from package.json (fixes something in browserify) - -0.7.3 / 2013-10-30 -================== - - * fix: catch localStorage security error when cookies are blocked (Chrome) - * add debug(err) support. Closes #46 - * add .browser prop to package.json. Closes #42 - -0.7.2 / 2013-02-06 -================== - - * fix package.json - * fix: Mobile Safari (private mode) is broken with debug - * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript - -0.7.1 / 2013-02-05 -================== - - * add repository URL to package.json - * add DEBUG_COLORED to force colored output - * add browserify support - * fix component. Closes #24 - -0.7.0 / 2012-05-04 -================== - - * Added .component to package.json - * Added debug.component.js build - -0.6.0 / 2012-03-16 -================== - - * Added support for "-" prefix in DEBUG [Vinay Pulim] - * Added `.enabled` flag to the node version [TooTallNate] - -0.5.0 / 2012-02-02 -================== - - * Added: humanize diffs. Closes #8 - * Added `debug.disable()` to the CS variant - * Removed padding. Closes #10 - * Fixed: persist client-side variant again. Closes #9 - -0.4.0 / 2012-02-01 -================== - - * Added browser variant support for older browsers [TooTallNate] - * Added `debug.enable('project:*')` to browser variant [TooTallNate] - * Added padding to diff (moved it to the right) - -0.3.0 / 2012-01-26 -================== - - * Added millisecond diff when isatty, otherwise UTC string - -0.2.0 / 2012-01-22 -================== - - * Added wildcard support - -0.1.0 / 2011-12-02 -================== - - * Added: remove colors unless stderr isatty [TooTallNate] - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/express/node_modules/debug/LICENSE b/node_modules/express/node_modules/debug/LICENSE deleted file mode 100644 index 658c933..0000000 --- a/node_modules/express/node_modules/debug/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 TJ Holowaychuk - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/express/node_modules/debug/Makefile b/node_modules/express/node_modules/debug/Makefile deleted file mode 100644 index 584da8b..0000000 --- a/node_modules/express/node_modules/debug/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -# get Makefile directory name: http://stackoverflow.com/a/5982798/376773 -THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) -THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) - -# BIN directory -BIN := $(THIS_DIR)/node_modules/.bin - -# Path -PATH := node_modules/.bin:$(PATH) -SHELL := /bin/bash - -# applications -NODE ?= $(shell which node) -YARN ?= $(shell which yarn) -PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm)) -BROWSERIFY ?= $(NODE) $(BIN)/browserify - -.FORCE: - -install: node_modules - -node_modules: package.json - @NODE_ENV= $(PKG) install - @touch node_modules - -lint: .FORCE - eslint browser.js debug.js index.js node.js - -test-node: .FORCE - istanbul cover node_modules/mocha/bin/_mocha -- test/**.js - -test-browser: .FORCE - mkdir -p dist - - @$(BROWSERIFY) \ - --standalone debug \ - . > dist/debug.js - - karma start --single-run - rimraf dist - -test: .FORCE - concurrently \ - "make test-node" \ - "make test-browser" - -coveralls: - cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js - -.PHONY: all install clean distclean diff --git a/node_modules/express/node_modules/debug/README.md b/node_modules/express/node_modules/debug/README.md deleted file mode 100644 index f67be6b..0000000 --- a/node_modules/express/node_modules/debug/README.md +++ /dev/null @@ -1,312 +0,0 @@ -# debug -[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) -[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) - - - -A tiny node.js debugging utility modelled after node core's debugging technique. - -**Discussion around the V3 API is under way [here](https://github.com/visionmedia/debug/issues/370)** - -## Installation - -```bash -$ npm install debug -``` - -## Usage - -`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. - -Example _app.js_: - -```js -var debug = require('debug')('http') - , http = require('http') - , name = 'My App'; - -// fake app - -debug('booting %s', name); - -http.createServer(function(req, res){ - debug(req.method + ' ' + req.url); - res.end('hello\n'); -}).listen(3000, function(){ - debug('listening'); -}); - -// fake worker of some kind - -require('./worker'); -``` - -Example _worker.js_: - -```js -var debug = require('debug')('worker'); - -setInterval(function(){ - debug('doing some work'); -}, 1000); -``` - - The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples: - - ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png) - - ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png) - -#### Windows note - - On Windows the environment variable is set using the `set` command. - - ```cmd - set DEBUG=*,-not_this - ``` - - Note that PowerShell uses different syntax to set environment variables. - - ```cmd - $env:DEBUG = "*,-not_this" - ``` - -Then, run the program to be debugged as usual. - -## Millisecond diff - - When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - - ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png) - - When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below: - - ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png) - -## Conventions - - If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". - -## Wildcards - - The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. - - You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:". - -## Environment Variables - - When running through Node.js, you can set a few environment variables that will - change the behavior of the debug logging: - -| Name | Purpose | -|-----------|-------------------------------------------------| -| `DEBUG` | Enables/disables specific debugging namespaces. | -| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | -| `DEBUG_DEPTH` | Object inspection depth. | -| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | - - - __Note:__ The environment variables beginning with `DEBUG_` end up being - converted into an Options object that gets used with `%o`/`%O` formatters. - See the Node.js documentation for - [`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) - for the complete list. - -## Formatters - - - Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. Below are the officially supported formatters: - -| Formatter | Representation | -|-----------|----------------| -| `%O` | Pretty-print an Object on multiple lines. | -| `%o` | Pretty-print an Object all on a single line. | -| `%s` | String. | -| `%d` | Number (both integer and float). | -| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | -| `%%` | Single percent sign ('%'). This does not consume an argument. | - -### Custom formatters - - You can add custom formatters by extending the `debug.formatters` object. For example, if you wanted to add support for rendering a Buffer as hex with `%h`, you could do something like: - -```js -const createDebug = require('debug') -createDebug.formatters.h = (v) => { - return v.toString('hex') -} - -// …elsewhere -const debug = createDebug('foo') -debug('this is hex: %h', new Buffer('hello world')) -// foo this is hex: 68656c6c6f20776f726c6421 +0ms -``` - -## Browser support - You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), - or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), - if you don't want to build it yourself. - - Debug's enable state is currently persisted by `localStorage`. - Consider the situation shown below where you have `worker:a` and `worker:b`, - and wish to debug both. You can enable this using `localStorage.debug`: - -```js -localStorage.debug = 'worker:*' -``` - -And then refresh the page. - -```js -a = debug('worker:a'); -b = debug('worker:b'); - -setInterval(function(){ - a('doing some work'); -}, 1000); - -setInterval(function(){ - b('doing some work'); -}, 1200); -``` - -#### Web Inspector Colors - - Colors are also enabled on "Web Inspectors" that understand the `%c` formatting - option. These are WebKit web inspectors, Firefox ([since version - 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) - and the Firebug plugin for Firefox (any version). - - Colored output looks something like: - - ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png) - - -## Output streams - - By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: - -Example _stdout.js_: - -```js -var debug = require('debug'); -var error = debug('app:error'); - -// by default stderr is used -error('goes to stderr!'); - -var log = debug('app:log'); -// set this namespace to log via console.log -log.log = console.log.bind(console); // don't forget to bind to console! -log('goes to stdout'); -error('still goes to stderr!'); - -// set all output to go via console.info -// overrides all per-namespace log settings -debug.log = console.info.bind(console); -error('now goes to stdout via console.info'); -log('still goes to stdout, but via console.info now'); -``` - - -## Authors - - - TJ Holowaychuk - - Nathan Rajlich - - Andrew Rhyne - -## Backers - -Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Sponsors - -Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## License - -(The MIT License) - -Copyright (c) 2014-2016 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/express/node_modules/debug/component.json b/node_modules/express/node_modules/debug/component.json deleted file mode 100644 index 9de2641..0000000 --- a/node_modules/express/node_modules/debug/component.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "debug", - "repo": "visionmedia/debug", - "description": "small debugging utility", - "version": "2.6.9", - "keywords": [ - "debug", - "log", - "debugger" - ], - "main": "src/browser.js", - "scripts": [ - "src/browser.js", - "src/debug.js" - ], - "dependencies": { - "rauchg/ms.js": "0.7.1" - } -} diff --git a/node_modules/express/node_modules/debug/karma.conf.js b/node_modules/express/node_modules/debug/karma.conf.js deleted file mode 100644 index 103a82d..0000000 --- a/node_modules/express/node_modules/debug/karma.conf.js +++ /dev/null @@ -1,70 +0,0 @@ -// Karma configuration -// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC) - -module.exports = function(config) { - config.set({ - - // base path that will be used to resolve all patterns (eg. files, exclude) - basePath: '', - - - // frameworks to use - // available frameworks: https://npmjs.org/browse/keyword/karma-adapter - frameworks: ['mocha', 'chai', 'sinon'], - - - // list of files / patterns to load in the browser - files: [ - 'dist/debug.js', - 'test/*spec.js' - ], - - - // list of files to exclude - exclude: [ - 'src/node.js' - ], - - - // preprocess matching files before serving them to the browser - // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor - preprocessors: { - }, - - // test results reporter to use - // possible values: 'dots', 'progress' - // available reporters: https://npmjs.org/browse/keyword/karma-reporter - reporters: ['progress'], - - - // web server port - port: 9876, - - - // enable / disable colors in the output (reporters and logs) - colors: true, - - - // level of logging - // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG - logLevel: config.LOG_INFO, - - - // enable / disable watching file and executing tests whenever any file changes - autoWatch: true, - - - // start these browsers - // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher - browsers: ['PhantomJS'], - - - // Continuous Integration mode - // if true, Karma captures browsers, runs the tests and exits - singleRun: false, - - // Concurrency level - // how many browser should be started simultaneous - concurrency: Infinity - }) -} diff --git a/node_modules/express/node_modules/debug/node.js b/node_modules/express/node_modules/debug/node.js deleted file mode 100644 index 7fc36fe..0000000 --- a/node_modules/express/node_modules/debug/node.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./src/node'); diff --git a/node_modules/express/node_modules/debug/package.json b/node_modules/express/node_modules/debug/package.json deleted file mode 100644 index dc787ba..0000000 --- a/node_modules/express/node_modules/debug/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "debug", - "version": "2.6.9", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/debug.git" - }, - "description": "small debugging utility", - "keywords": [ - "debug", - "log", - "debugger" - ], - "author": "TJ Holowaychuk ", - "contributors": [ - "Nathan Rajlich (http://n8.io)", - "Andrew Rhyne " - ], - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - }, - "devDependencies": { - "browserify": "9.0.3", - "chai": "^3.5.0", - "concurrently": "^3.1.0", - "coveralls": "^2.11.15", - "eslint": "^3.12.1", - "istanbul": "^0.4.5", - "karma": "^1.3.0", - "karma-chai": "^0.1.0", - "karma-mocha": "^1.3.0", - "karma-phantomjs-launcher": "^1.0.2", - "karma-sinon": "^1.0.5", - "mocha": "^3.2.0", - "mocha-lcov-reporter": "^1.2.0", - "rimraf": "^2.5.4", - "sinon": "^1.17.6", - "sinon-chai": "^2.8.0" - }, - "main": "./src/index.js", - "browser": "./src/browser.js", - "component": { - "scripts": { - "debug/index.js": "browser.js", - "debug/debug.js": "debug.js" - } - } -} diff --git a/node_modules/express/node_modules/debug/src/browser.js b/node_modules/express/node_modules/debug/src/browser.js deleted file mode 100644 index 7106924..0000000 --- a/node_modules/express/node_modules/debug/src/browser.js +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This is the web browser implementation of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = require('./debug'); -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = 'undefined' != typeof chrome - && 'undefined' != typeof chrome.storage - ? chrome.storage.local - : localstorage(); - -/** - * Colors. - */ - -exports.colors = [ - 'lightseagreen', - 'forestgreen', - 'goldenrod', - 'dodgerblue', - 'darkorchid', - 'crimson' -]; - -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') { - return true; - } - - // is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || - // double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); -} - -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -exports.formatters.j = function(v) { - try { - return JSON.stringify(v); - } catch (err) { - return '[UnexpectedJSONParseError]: ' + err.message; - } -}; - - -/** - * Colorize log arguments if enabled. - * - * @api public - */ - -function formatArgs(args) { - var useColors = this.useColors; - - args[0] = (useColors ? '%c' : '') - + this.namespace - + (useColors ? ' %c' : ' ') - + args[0] - + (useColors ? '%c ' : ' ') - + '+' + exports.humanize(this.diff); - - if (!useColors) return; - - var c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit') - - // the final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - var index = 0; - var lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, function(match) { - if ('%%' === match) return; - index++; - if ('%c' === match) { - // we only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); -} - -/** - * Invokes `console.log()` when available. - * No-op when `console.log` is not a "function". - * - * @api public - */ - -function log() { - // this hackery is required for IE8/9, where - // the `console.log` function doesn't have 'apply' - return 'object' === typeof console - && console.log - && Function.prototype.apply.call(console.log, console, arguments); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - -function save(namespaces) { - try { - if (null == namespaces) { - exports.storage.removeItem('debug'); - } else { - exports.storage.debug = namespaces; - } - } catch(e) {} -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - var r; - try { - r = exports.storage.debug; - } catch(e) {} - - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; -} - -/** - * Enable namespaces listed in `localStorage.debug` initially. - */ - -exports.enable(load()); - -/** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - -function localstorage() { - try { - return window.localStorage; - } catch (e) {} -} diff --git a/node_modules/express/node_modules/debug/src/debug.js b/node_modules/express/node_modules/debug/src/debug.js deleted file mode 100644 index 6a5e3fc..0000000 --- a/node_modules/express/node_modules/debug/src/debug.js +++ /dev/null @@ -1,202 +0,0 @@ - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = createDebug.debug = createDebug['default'] = createDebug; -exports.coerce = coerce; -exports.disable = disable; -exports.enable = enable; -exports.enabled = enabled; -exports.humanize = require('ms'); - -/** - * The currently active debug mode names, and names to skip. - */ - -exports.names = []; -exports.skips = []; - -/** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - -exports.formatters = {}; - -/** - * Previous log timestamp. - */ - -var prevTime; - -/** - * Select a color. - * @param {String} namespace - * @return {Number} - * @api private - */ - -function selectColor(namespace) { - var hash = 0, i; - - for (i in namespace) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return exports.colors[Math.abs(hash) % exports.colors.length]; -} - -/** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - -function createDebug(namespace) { - - function debug() { - // disabled? - if (!debug.enabled) return; - - var self = debug; - - // set `diff` timestamp - var curr = +new Date(); - var ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - // turn the `arguments` into a proper Array - var args = new Array(arguments.length); - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i]; - } - - args[0] = exports.coerce(args[0]); - - if ('string' !== typeof args[0]) { - // anything else let's inspect with %O - args.unshift('%O'); - } - - // apply any `formatters` transformations - var index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) { - // if we encounter an escaped % then don't increase the array index - if (match === '%%') return match; - index++; - var formatter = exports.formatters[format]; - if ('function' === typeof formatter) { - var val = args[index]; - match = formatter.call(self, val); - - // now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // apply env-specific formatting (colors, etc.) - exports.formatArgs.call(self, args); - - var logFn = debug.log || exports.log || console.log.bind(console); - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.enabled = exports.enabled(namespace); - debug.useColors = exports.useColors(); - debug.color = selectColor(namespace); - - // env-specific initialization logic for debug instances - if ('function' === typeof exports.init) { - exports.init(debug); - } - - return debug; -} - -/** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - -function enable(namespaces) { - exports.save(namespaces); - - exports.names = []; - exports.skips = []; - - var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - var len = split.length; - - for (var i = 0; i < len; i++) { - if (!split[i]) continue; // ignore empty strings - namespaces = split[i].replace(/\*/g, '.*?'); - if (namespaces[0] === '-') { - exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); - } else { - exports.names.push(new RegExp('^' + namespaces + '$')); - } - } -} - -/** - * Disable debug output. - * - * @api public - */ - -function disable() { - exports.enable(''); -} - -/** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - -function enabled(name) { - var i, len; - for (i = 0, len = exports.skips.length; i < len; i++) { - if (exports.skips[i].test(name)) { - return false; - } - } - for (i = 0, len = exports.names.length; i < len; i++) { - if (exports.names[i].test(name)) { - return true; - } - } - return false; -} - -/** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - -function coerce(val) { - if (val instanceof Error) return val.stack || val.message; - return val; -} diff --git a/node_modules/express/node_modules/debug/src/index.js b/node_modules/express/node_modules/debug/src/index.js deleted file mode 100644 index e12cf4d..0000000 --- a/node_modules/express/node_modules/debug/src/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Detect Electron renderer process, which is node, but we should - * treat as a browser. - */ - -if (typeof process !== 'undefined' && process.type === 'renderer') { - module.exports = require('./browser.js'); -} else { - module.exports = require('./node.js'); -} diff --git a/node_modules/express/node_modules/debug/src/inspector-log.js b/node_modules/express/node_modules/debug/src/inspector-log.js deleted file mode 100644 index 60ea6c0..0000000 --- a/node_modules/express/node_modules/debug/src/inspector-log.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = inspectorLog; - -// black hole -const nullStream = new (require('stream').Writable)(); -nullStream._write = () => {}; - -/** - * Outputs a `console.log()` to the Node.js Inspector console *only*. - */ -function inspectorLog() { - const stdout = console._stdout; - console._stdout = nullStream; - console.log.apply(console, arguments); - console._stdout = stdout; -} diff --git a/node_modules/express/node_modules/debug/src/node.js b/node_modules/express/node_modules/debug/src/node.js deleted file mode 100644 index b15109c..0000000 --- a/node_modules/express/node_modules/debug/src/node.js +++ /dev/null @@ -1,248 +0,0 @@ -/** - * Module dependencies. - */ - -var tty = require('tty'); -var util = require('util'); - -/** - * This is the Node.js implementation of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = require('./debug'); -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; - -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - -exports.inspectOpts = Object.keys(process.env).filter(function (key) { - return /^debug_/i.test(key); -}).reduce(function (obj, key) { - // camel-case - var prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() }); - - // coerce string value into JS value - var val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) val = true; - else if (/^(no|off|false|disabled)$/i.test(val)) val = false; - else if (val === 'null') val = null; - else val = Number(val); - - obj[prop] = val; - return obj; -}, {}); - -/** - * The file descriptor to write the `debug()` calls to. - * Set the `DEBUG_FD` env variable to override with another value. i.e.: - * - * $ DEBUG_FD=3 node script.js 3>debug.log - */ - -var fd = parseInt(process.env.DEBUG_FD, 10) || 2; - -if (1 !== fd && 2 !== fd) { - util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')() -} - -var stream = 1 === fd ? process.stdout : - 2 === fd ? process.stderr : - createWritableStdioStream(fd); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - return 'colors' in exports.inspectOpts - ? Boolean(exports.inspectOpts.colors) - : tty.isatty(fd); -} - -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -exports.formatters.o = function(v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n').map(function(str) { - return str.trim() - }).join(' '); -}; - -/** - * Map %o to `util.inspect()`, allowing multiple lines if needed. - */ - -exports.formatters.O = function(v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs(args) { - var name = this.namespace; - var useColors = this.useColors; - - if (useColors) { - var c = this.color; - var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m'; - - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m'); - } else { - args[0] = new Date().toUTCString() - + ' ' + name + ' ' + args[0]; - } -} - -/** - * Invokes `util.format()` with the specified arguments and writes to `stream`. - */ - -function log() { - return stream.write(util.format.apply(util, arguments) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - -function save(namespaces) { - if (null == namespaces) { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } else { - process.env.DEBUG = namespaces; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Copied from `node/src/node.js`. - * - * XXX: It's lame that node doesn't expose this API out-of-the-box. It also - * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame. - */ - -function createWritableStdioStream (fd) { - var stream; - var tty_wrap = process.binding('tty_wrap'); - - // Note stream._type is used for test-module-load-list.js - - switch (tty_wrap.guessHandleType(fd)) { - case 'TTY': - stream = new tty.WriteStream(fd); - stream._type = 'tty'; - - // Hack to have stream not keep the event loop alive. - // See https://github.com/joyent/node/issues/1726 - if (stream._handle && stream._handle.unref) { - stream._handle.unref(); - } - break; - - case 'FILE': - var fs = require('fs'); - stream = new fs.SyncWriteStream(fd, { autoClose: false }); - stream._type = 'fs'; - break; - - case 'PIPE': - case 'TCP': - var net = require('net'); - stream = new net.Socket({ - fd: fd, - readable: false, - writable: true - }); - - // FIXME Should probably have an option in net.Socket to create a - // stream from an existing fd which is writable only. But for now - // we'll just add this hack and set the `readable` member to false. - // Test: ./node test/fixtures/echo.js < /etc/passwd - stream.readable = false; - stream.read = null; - stream._type = 'pipe'; - - // FIXME Hack to have stream not keep the event loop alive. - // See https://github.com/joyent/node/issues/1726 - if (stream._handle && stream._handle.unref) { - stream._handle.unref(); - } - break; - - default: - // Probably an error on in uv_guess_handle() - throw new Error('Implement me. Unknown stream file type!'); - } - - // For supporting legacy API we put the FD here. - stream.fd = fd; - - stream._isStdio = true; - - return stream; -} - -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - -function init (debug) { - debug.inspectOpts = {}; - - var keys = Object.keys(exports.inspectOpts); - for (var i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -/** - * Enable namespaces listed in `process.env.DEBUG` initially. - */ - -exports.enable(load()); diff --git a/node_modules/express/node_modules/ms/index.js b/node_modules/express/node_modules/ms/index.js deleted file mode 100644 index 6a522b1..0000000 --- a/node_modules/express/node_modules/ms/index.js +++ /dev/null @@ -1,152 +0,0 @@ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - -module.exports = function(val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isNaN(val) === false) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtShort(ms) { - if (ms >= d) { - return Math.round(ms / d) + 'd'; - } - if (ms >= h) { - return Math.round(ms / h) + 'h'; - } - if (ms >= m) { - return Math.round(ms / m) + 'm'; - } - if (ms >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtLong(ms) { - return plural(ms, d, 'day') || - plural(ms, h, 'hour') || - plural(ms, m, 'minute') || - plural(ms, s, 'second') || - ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, n, name) { - if (ms < n) { - return; - } - if (ms < n * 1.5) { - return Math.floor(ms / n) + ' ' + name; - } - return Math.ceil(ms / n) + ' ' + name + 's'; -} diff --git a/node_modules/express/node_modules/ms/license.md b/node_modules/express/node_modules/ms/license.md deleted file mode 100644 index 69b6125..0000000 --- a/node_modules/express/node_modules/ms/license.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Zeit, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/express/node_modules/ms/package.json b/node_modules/express/node_modules/ms/package.json deleted file mode 100644 index 6a31c81..0000000 --- a/node_modules/express/node_modules/ms/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "ms", - "version": "2.0.0", - "description": "Tiny milisecond conversion utility", - "repository": "zeit/ms", - "main": "./index", - "files": [ - "index.js" - ], - "scripts": { - "precommit": "lint-staged", - "lint": "eslint lib/* bin/*", - "test": "mocha tests.js" - }, - "eslintConfig": { - "extends": "eslint:recommended", - "env": { - "node": true, - "es6": true - } - }, - "lint-staged": { - "*.js": [ - "npm run lint", - "prettier --single-quote --write", - "git add" - ] - }, - "license": "MIT", - "devDependencies": { - "eslint": "3.19.0", - "expect.js": "0.3.1", - "husky": "0.13.3", - "lint-staged": "3.4.1", - "mocha": "3.4.1" - } -} diff --git a/node_modules/express/node_modules/ms/readme.md b/node_modules/express/node_modules/ms/readme.md deleted file mode 100644 index 84a9974..0000000 --- a/node_modules/express/node_modules/ms/readme.md +++ /dev/null @@ -1,51 +0,0 @@ -# ms - -[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) -[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) - -Use this package to easily convert various time formats to milliseconds. - -## Examples - -```js -ms('2 days') // 172800000 -ms('1d') // 86400000 -ms('10h') // 36000000 -ms('2.5 hrs') // 9000000 -ms('2h') // 7200000 -ms('1m') // 60000 -ms('5s') // 5000 -ms('1y') // 31557600000 -ms('100') // 100 -``` - -### Convert from milliseconds - -```js -ms(60000) // "1m" -ms(2 * 60000) // "2m" -ms(ms('10 hours')) // "10h" -``` - -### Time format written-out - -```js -ms(60000, { long: true }) // "1 minute" -ms(2 * 60000, { long: true }) // "2 minutes" -ms(ms('10 hours'), { long: true }) // "10 hours" -``` - -## Features - -- Works both in [node](https://nodejs.org) and in the browser. -- If a number is supplied to `ms`, a string with a unit is returned. -- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`). -- If you pass a string with a number and a valid unit, the number of equivalent ms is returned. - -## Caught a bug? - -1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device -2. Link the package to the global module directory: `npm link` -3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms! - -As always, you can run the tests using: `npm test` diff --git a/node_modules/express/node_modules/path-to-regexp/LICENSE b/node_modules/express/node_modules/path-to-regexp/LICENSE deleted file mode 100644 index 983fbe8..0000000 --- a/node_modules/express/node_modules/path-to-regexp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/express/node_modules/path-to-regexp/Readme.md b/node_modules/express/node_modules/path-to-regexp/Readme.md deleted file mode 100644 index 95452a6..0000000 --- a/node_modules/express/node_modules/path-to-regexp/Readme.md +++ /dev/null @@ -1,35 +0,0 @@ -# Path-to-RegExp - -Turn an Express-style path string such as `/user/:name` into a regular expression. - -**Note:** This is a legacy branch. You should upgrade to `1.x`. - -## Usage - -```javascript -var pathToRegexp = require('path-to-regexp'); -``` - -### pathToRegexp(path, keys, options) - - - **path** A string in the express format, an array of such strings, or a regular expression - - **keys** An array to be populated with the keys present in the url. Once the function completes, this will be an array of strings. - - **options** - - **options.sensitive** Defaults to false, set this to true to make routes case sensitive - - **options.strict** Defaults to false, set this to true to make the trailing slash matter. - - **options.end** Defaults to true, set this to false to only match the prefix of the URL. - -```javascript -var keys = []; -var exp = pathToRegexp('/foo/:bar', keys); -//keys = ['bar'] -//exp = /^\/foo\/(?:([^\/]+?))\/?$/i -``` - -## Live Demo - -You can see a live demo of this library in use at [express-route-tester](http://forbeslindesay.github.com/express-route-tester/). - -## License - - MIT diff --git a/node_modules/express/node_modules/path-to-regexp/index.js b/node_modules/express/node_modules/path-to-regexp/index.js deleted file mode 100644 index 95d2f4b..0000000 --- a/node_modules/express/node_modules/path-to-regexp/index.js +++ /dev/null @@ -1,156 +0,0 @@ -/** - * Expose `pathToRegexp`. - */ - -module.exports = pathToRegexp; - -/** - * Match matching groups in a regular expression. - */ -var MATCHING_GROUP_REGEXP = /\\.|\((?:\?<(.*?)>)?(?!\?)/g; - -/** - * Normalize the given path string, - * returning a regular expression. - * - * An empty array should be passed, - * which will contain the placeholder - * key names. For example "/user/:id" will - * then contain ["id"]. - * - * @param {String|RegExp|Array} path - * @param {Array} keys - * @param {Object} options - * @return {RegExp} - * @api private - */ - -function pathToRegexp(path, keys, options) { - options = options || {}; - keys = keys || []; - var strict = options.strict; - var end = options.end !== false; - var flags = options.sensitive ? '' : 'i'; - var lookahead = options.lookahead !== false; - var extraOffset = 0; - var keysOffset = keys.length; - var i = 0; - var name = 0; - var pos = 0; - var backtrack = ''; - var m; - - if (path instanceof RegExp) { - while (m = MATCHING_GROUP_REGEXP.exec(path.source)) { - if (m[0][0] === '\\') continue; - - keys.push({ - name: m[1] || name++, - optional: false, - offset: m.index - }); - } - - return path; - } - - if (Array.isArray(path)) { - // Map array parts into regexps and return their source. We also pass - // the same keys and options instance into every generation to get - // consistent matching groups before we join the sources together. - path = path.map(function (value) { - return pathToRegexp(value, keys, options).source; - }); - - return new RegExp(path.join('|'), flags); - } - - if (typeof path !== 'string') { - throw new TypeError('path must be a string, array of strings, or regular expression'); - } - - path = path.replace( - /\\.|(\/)?(\.)?:(\w+)(\(.*?\))?(\*)?(\?)?|[.*]|\/\(/g, - function (match, slash, format, key, capture, star, optional, offset) { - if (match[0] === '\\') { - backtrack += match; - pos += 2; - return match; - } - - if (match === '.') { - backtrack += '\\.'; - extraOffset += 1; - pos += 1; - return '\\.'; - } - - if (slash || format) { - backtrack = ''; - } else { - backtrack += path.slice(pos, offset); - } - - pos = offset + match.length; - - if (match === '*') { - extraOffset += 3; - return '(.*)'; - } - - if (match === '/(') { - backtrack += '/'; - extraOffset += 2; - return '/(?:'; - } - - slash = slash || ''; - format = format ? '\\.' : ''; - optional = optional || ''; - capture = capture ? - capture.replace(/\\.|\*/, function (m) { return m === '*' ? '(.*)' : m; }) : - (backtrack ? '((?:(?!/|' + backtrack + ').)+?)' : '([^/' + format + ']+?)'); - - keys.push({ - name: key, - optional: !!optional, - offset: offset + extraOffset - }); - - var result = '(?:' - + format + slash + capture - + (star ? '((?:[/' + format + '].+?)?)' : '') - + ')' - + optional; - - extraOffset += result.length - match.length; - - return result; - }); - - // This is a workaround for handling unnamed matching groups. - while (m = MATCHING_GROUP_REGEXP.exec(path)) { - if (m[0][0] === '\\') continue; - - if (keysOffset + i === keys.length || keys[keysOffset + i].offset > m.index) { - keys.splice(keysOffset + i, 0, { - name: name++, // Unnamed matching groups must be consistently linear. - optional: false, - offset: m.index - }); - } - - i++; - } - - path += strict ? '' : path[path.length - 1] === '/' ? '?' : '/?'; - - // If the path is non-ending, match until the end or a slash. - if (end) { - path += '$'; - } else if (path[path.length - 1] !== '/') { - path += lookahead ? '(?=/|$)' : '(?:/|$)'; - } - - return new RegExp('^' + path, flags); -}; diff --git a/node_modules/express/node_modules/path-to-regexp/package.json b/node_modules/express/node_modules/path-to-regexp/package.json deleted file mode 100644 index 23b4b6a..0000000 --- a/node_modules/express/node_modules/path-to-regexp/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "path-to-regexp", - "description": "Express style path to RegExp utility", - "version": "0.1.12", - "files": [ - "index.js", - "LICENSE" - ], - "scripts": { - "test": "istanbul cover _mocha -- -R spec" - }, - "keywords": [ - "express", - "regexp" - ], - "component": { - "scripts": { - "path-to-regexp": "index.js" - } - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/pillarjs/path-to-regexp.git" - }, - "devDependencies": { - "mocha": "^1.17.1", - "istanbul": "^0.2.6" - } -} diff --git a/node_modules/express/package.json b/node_modules/express/package.json deleted file mode 100644 index 4322f1a..0000000 --- a/node_modules/express/package.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "name": "express", - "description": "Fast, unopinionated, minimalist web framework", - "version": "4.22.1", - "author": "TJ Holowaychuk ", - "contributors": [ - "Aaron Heckmann ", - "Ciaran Jessup ", - "Douglas Christopher Wilson ", - "Guillermo Rauch ", - "Jonathan Ong ", - "Roman Shtylman ", - "Young Jae Sim " - ], - "license": "MIT", - "repository": "expressjs/express", - "homepage": "http://expressjs.com/", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - }, - "keywords": [ - "express", - "framework", - "sinatra", - "web", - "http", - "rest", - "restful", - "router", - "app", - "api" - ], - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "~1.20.3", - "content-disposition": "~0.5.4", - "content-type": "~1.0.4", - "cookie": "~0.7.1", - "cookie-signature": "~1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.3.1", - "fresh": "~0.5.2", - "http-errors": "~2.0.0", - "merge-descriptors": "1.0.3", - "methods": "~1.1.2", - "on-finished": "~2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "~0.1.12", - "proxy-addr": "~2.0.7", - "qs": "~6.14.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "~0.19.0", - "serve-static": "~1.16.2", - "setprototypeof": "1.2.0", - "statuses": "~2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "devDependencies": { - "after": "0.8.2", - "connect-redis": "3.4.2", - "cookie-parser": "1.4.6", - "cookie-session": "2.0.0", - "ejs": "3.1.9", - "eslint": "8.47.0", - "express-session": "1.17.2", - "hbs": "4.2.0", - "marked": "0.7.0", - "method-override": "3.0.0", - "mocha": "^6.2.2", - "morgan": "1.10.0", - "nyc": "^14.1.1", - "pbkdf2-password": "1.2.1", - "supertest": "^6.1.6", - "vhost": "~3.0.2" - }, - "engines": { - "node": ">= 0.10.0" - }, - "files": [ - "LICENSE", - "History.md", - "Readme.md", - "index.js", - "lib/" - ], - "scripts": { - "lint": "eslint .", - "test": "mocha --require test/support/env --reporter spec --bail --check-leaks test/ test/acceptance/", - "test-ci": "nyc --exclude examples --exclude test --exclude benchmarks --reporter=lcovonly --reporter=text npm test", - "test-cov": "nyc --exclude examples --exclude test --exclude benchmarks --reporter=html --reporter=text npm test", - "test-tap": "mocha --require test/support/env --reporter tap --check-leaks test/ test/acceptance/" - } -} diff --git a/node_modules/fast-safe-stringify/.travis.yml b/node_modules/fast-safe-stringify/.travis.yml deleted file mode 100644 index 2b06d25..0000000 --- a/node_modules/fast-safe-stringify/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -sudo: false -node_js: -- '4' -- '6' -- '8' -- '9' -- '10' diff --git a/node_modules/fast-safe-stringify/CHANGELOG.md b/node_modules/fast-safe-stringify/CHANGELOG.md deleted file mode 100644 index 55f2d08..0000000 --- a/node_modules/fast-safe-stringify/CHANGELOG.md +++ /dev/null @@ -1,17 +0,0 @@ -# Changelog - -## v.2.0.0 - -Features - -- Added stable-stringify (see documentation) -- Support replacer -- Support spacer -- toJSON support without forceDecirc property -- Improved performance - -Breaking changes - -- Manipulating the input value in a `toJSON` function is not possible anymore in - all cases (see documentation) -- Dropped support for e.g. IE8 and Node.js < 4 diff --git a/node_modules/fast-safe-stringify/LICENSE b/node_modules/fast-safe-stringify/LICENSE deleted file mode 100644 index d310c2d..0000000 --- a/node_modules/fast-safe-stringify/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 David Mark Clements -Copyright (c) 2017 David Mark Clements & Matteo Collina -Copyright (c) 2018 David Mark Clements, Matteo Collina & Ruben Bridgewater - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/fast-safe-stringify/benchmark.js b/node_modules/fast-safe-stringify/benchmark.js deleted file mode 100644 index 7ba5e9f..0000000 --- a/node_modules/fast-safe-stringify/benchmark.js +++ /dev/null @@ -1,137 +0,0 @@ -const Benchmark = require('benchmark') -const suite = new Benchmark.Suite() -const { inspect } = require('util') -const jsonStringifySafe = require('json-stringify-safe') -const fastSafeStringify = require('./') - -const array = new Array(10).fill(0).map((_, i) => i) -const obj = { foo: array } -const circ = JSON.parse(JSON.stringify(obj)) -circ.o = { obj: circ, array } -const circGetters = JSON.parse(JSON.stringify(obj)) -Object.assign(circGetters, { get o () { return { obj: circGetters, array } } }) - -const deep = require('./package.json') -deep.deep = JSON.parse(JSON.stringify(deep)) -deep.deep.deep = JSON.parse(JSON.stringify(deep)) -deep.deep.deep.deep = JSON.parse(JSON.stringify(deep)) -deep.array = array - -const deepCirc = JSON.parse(JSON.stringify(deep)) -deepCirc.deep.deep.deep.circ = deepCirc -deepCirc.deep.deep.circ = deepCirc -deepCirc.deep.circ = deepCirc -deepCirc.array = array - -const deepCircGetters = JSON.parse(JSON.stringify(deep)) -for (let i = 0; i < 10; i++) { - deepCircGetters[i.toString()] = { - deep: { - deep: { - get circ () { return deep.deep }, - deep: { get circ () { return deep.deep.deep } } - }, - get circ () { return deep } - }, - get array () { return array } - } -} - -const deepCircNonCongifurableGetters = JSON.parse(JSON.stringify(deep)) -Object.defineProperty(deepCircNonCongifurableGetters.deep.deep.deep, 'circ', { - get: () => deepCircNonCongifurableGetters, - enumerable: true, - configurable: false -}) -Object.defineProperty(deepCircNonCongifurableGetters.deep.deep, 'circ', { - get: () => deepCircNonCongifurableGetters, - enumerable: true, - configurable: false -}) -Object.defineProperty(deepCircNonCongifurableGetters.deep, 'circ', { - get: () => deepCircNonCongifurableGetters, - enumerable: true, - configurable: false -}) -Object.defineProperty(deepCircNonCongifurableGetters, 'array', { - get: () => array, - enumerable: true, - configurable: false -}) - -suite.add('util.inspect: simple object ', function () { - inspect(obj, { showHidden: false, depth: null }) -}) -suite.add('util.inspect: circular ', function () { - inspect(circ, { showHidden: false, depth: null }) -}) -suite.add('util.inspect: circular getters ', function () { - inspect(circGetters, { showHidden: false, depth: null }) -}) -suite.add('util.inspect: deep ', function () { - inspect(deep, { showHidden: false, depth: null }) -}) -suite.add('util.inspect: deep circular ', function () { - inspect(deepCirc, { showHidden: false, depth: null }) -}) -suite.add('util.inspect: large deep circular getters ', function () { - inspect(deepCircGetters, { showHidden: false, depth: null }) -}) -suite.add('util.inspect: deep non-conf circular getters', function () { - inspect(deepCircNonCongifurableGetters, { showHidden: false, depth: null }) -}) - -suite.add('\njson-stringify-safe: simple object ', function () { - jsonStringifySafe(obj) -}) -suite.add('json-stringify-safe: circular ', function () { - jsonStringifySafe(circ) -}) -suite.add('json-stringify-safe: circular getters ', function () { - jsonStringifySafe(circGetters) -}) -suite.add('json-stringify-safe: deep ', function () { - jsonStringifySafe(deep) -}) -suite.add('json-stringify-safe: deep circular ', function () { - jsonStringifySafe(deepCirc) -}) -suite.add('json-stringify-safe: large deep circular getters ', function () { - jsonStringifySafe(deepCircGetters) -}) -suite.add('json-stringify-safe: deep non-conf circular getters', function () { - jsonStringifySafe(deepCircNonCongifurableGetters) -}) - -suite.add('\nfast-safe-stringify: simple object ', function () { - fastSafeStringify(obj) -}) -suite.add('fast-safe-stringify: circular ', function () { - fastSafeStringify(circ) -}) -suite.add('fast-safe-stringify: circular getters ', function () { - fastSafeStringify(circGetters) -}) -suite.add('fast-safe-stringify: deep ', function () { - fastSafeStringify(deep) -}) -suite.add('fast-safe-stringify: deep circular ', function () { - fastSafeStringify(deepCirc) -}) -suite.add('fast-safe-stringify: large deep circular getters ', function () { - fastSafeStringify(deepCircGetters) -}) -suite.add('fast-safe-stringify: deep non-conf circular getters', function () { - fastSafeStringify(deepCircNonCongifurableGetters) -}) - -// add listeners -suite.on('cycle', function (event) { - console.log(String(event.target)) -}) - -suite.on('complete', function () { - console.log('\nFastest is ' + this.filter('fastest').map('name')) -}) - -suite.run({ delay: 1, minSamples: 150 }) diff --git a/node_modules/fast-safe-stringify/index.d.ts b/node_modules/fast-safe-stringify/index.d.ts deleted file mode 100644 index 9a9b1f0..0000000 --- a/node_modules/fast-safe-stringify/index.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -declare function stringify( - value: any, - replacer?: (key: string, value: any) => any, - space?: string | number, - options?: { depthLimit: number | undefined; edgesLimit: number | undefined } -): string; - -declare namespace stringify { - export function stable( - value: any, - replacer?: (key: string, value: any) => any, - space?: string | number, - options?: { depthLimit: number | undefined; edgesLimit: number | undefined } - ): string; - export function stableStringify( - value: any, - replacer?: (key: string, value: any) => any, - space?: string | number, - options?: { depthLimit: number | undefined; edgesLimit: number | undefined } - ): string; -} - -export default stringify; diff --git a/node_modules/fast-safe-stringify/index.js b/node_modules/fast-safe-stringify/index.js deleted file mode 100644 index ecf7e51..0000000 --- a/node_modules/fast-safe-stringify/index.js +++ /dev/null @@ -1,229 +0,0 @@ -module.exports = stringify -stringify.default = stringify -stringify.stable = deterministicStringify -stringify.stableStringify = deterministicStringify - -var LIMIT_REPLACE_NODE = '[...]' -var CIRCULAR_REPLACE_NODE = '[Circular]' - -var arr = [] -var replacerStack = [] - -function defaultOptions () { - return { - depthLimit: Number.MAX_SAFE_INTEGER, - edgesLimit: Number.MAX_SAFE_INTEGER - } -} - -// Regular stringify -function stringify (obj, replacer, spacer, options) { - if (typeof options === 'undefined') { - options = defaultOptions() - } - - decirc(obj, '', 0, [], undefined, 0, options) - var res - try { - if (replacerStack.length === 0) { - res = JSON.stringify(obj, replacer, spacer) - } else { - res = JSON.stringify(obj, replaceGetterValues(replacer), spacer) - } - } catch (_) { - return JSON.stringify('[unable to serialize, circular reference is too complex to analyze]') - } finally { - while (arr.length !== 0) { - var part = arr.pop() - if (part.length === 4) { - Object.defineProperty(part[0], part[1], part[3]) - } else { - part[0][part[1]] = part[2] - } - } - } - return res -} - -function setReplace (replace, val, k, parent) { - var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k) - if (propertyDescriptor.get !== undefined) { - if (propertyDescriptor.configurable) { - Object.defineProperty(parent, k, { value: replace }) - arr.push([parent, k, val, propertyDescriptor]) - } else { - replacerStack.push([val, k, replace]) - } - } else { - parent[k] = replace - arr.push([parent, k, val]) - } -} - -function decirc (val, k, edgeIndex, stack, parent, depth, options) { - depth += 1 - var i - if (typeof val === 'object' && val !== null) { - for (i = 0; i < stack.length; i++) { - if (stack[i] === val) { - setReplace(CIRCULAR_REPLACE_NODE, val, k, parent) - return - } - } - - if ( - typeof options.depthLimit !== 'undefined' && - depth > options.depthLimit - ) { - setReplace(LIMIT_REPLACE_NODE, val, k, parent) - return - } - - if ( - typeof options.edgesLimit !== 'undefined' && - edgeIndex + 1 > options.edgesLimit - ) { - setReplace(LIMIT_REPLACE_NODE, val, k, parent) - return - } - - stack.push(val) - // Optimize for Arrays. Big arrays could kill the performance otherwise! - if (Array.isArray(val)) { - for (i = 0; i < val.length; i++) { - decirc(val[i], i, i, stack, val, depth, options) - } - } else { - var keys = Object.keys(val) - for (i = 0; i < keys.length; i++) { - var key = keys[i] - decirc(val[key], key, i, stack, val, depth, options) - } - } - stack.pop() - } -} - -// Stable-stringify -function compareFunction (a, b) { - if (a < b) { - return -1 - } - if (a > b) { - return 1 - } - return 0 -} - -function deterministicStringify (obj, replacer, spacer, options) { - if (typeof options === 'undefined') { - options = defaultOptions() - } - - var tmp = deterministicDecirc(obj, '', 0, [], undefined, 0, options) || obj - var res - try { - if (replacerStack.length === 0) { - res = JSON.stringify(tmp, replacer, spacer) - } else { - res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer) - } - } catch (_) { - return JSON.stringify('[unable to serialize, circular reference is too complex to analyze]') - } finally { - // Ensure that we restore the object as it was. - while (arr.length !== 0) { - var part = arr.pop() - if (part.length === 4) { - Object.defineProperty(part[0], part[1], part[3]) - } else { - part[0][part[1]] = part[2] - } - } - } - return res -} - -function deterministicDecirc (val, k, edgeIndex, stack, parent, depth, options) { - depth += 1 - var i - if (typeof val === 'object' && val !== null) { - for (i = 0; i < stack.length; i++) { - if (stack[i] === val) { - setReplace(CIRCULAR_REPLACE_NODE, val, k, parent) - return - } - } - try { - if (typeof val.toJSON === 'function') { - return - } - } catch (_) { - return - } - - if ( - typeof options.depthLimit !== 'undefined' && - depth > options.depthLimit - ) { - setReplace(LIMIT_REPLACE_NODE, val, k, parent) - return - } - - if ( - typeof options.edgesLimit !== 'undefined' && - edgeIndex + 1 > options.edgesLimit - ) { - setReplace(LIMIT_REPLACE_NODE, val, k, parent) - return - } - - stack.push(val) - // Optimize for Arrays. Big arrays could kill the performance otherwise! - if (Array.isArray(val)) { - for (i = 0; i < val.length; i++) { - deterministicDecirc(val[i], i, i, stack, val, depth, options) - } - } else { - // Create a temporary object in the required way - var tmp = {} - var keys = Object.keys(val).sort(compareFunction) - for (i = 0; i < keys.length; i++) { - var key = keys[i] - deterministicDecirc(val[key], key, i, stack, val, depth, options) - tmp[key] = val[key] - } - if (typeof parent !== 'undefined') { - arr.push([parent, k, val]) - parent[k] = tmp - } else { - return tmp - } - } - stack.pop() - } -} - -// wraps replacer function to handle values we couldn't replace -// and mark them as replaced value -function replaceGetterValues (replacer) { - replacer = - typeof replacer !== 'undefined' - ? replacer - : function (k, v) { - return v - } - return function (key, val) { - if (replacerStack.length > 0) { - for (var i = 0; i < replacerStack.length; i++) { - var part = replacerStack[i] - if (part[1] === key && part[0] === val) { - val = part[2] - replacerStack.splice(i, 1) - break - } - } - } - return replacer.call(this, key, val) - } -} diff --git a/node_modules/fast-safe-stringify/package.json b/node_modules/fast-safe-stringify/package.json deleted file mode 100644 index 206a591..0000000 --- a/node_modules/fast-safe-stringify/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "fast-safe-stringify", - "version": "2.1.1", - "description": "Safely and quickly serialize JavaScript objects", - "keywords": [ - "stable", - "stringify", - "JSON", - "JSON.stringify", - "safe", - "serialize" - ], - "main": "index.js", - "scripts": { - "test": "standard && tap --no-esm test.js test-stable.js", - "benchmark": "node benchmark.js" - }, - "author": "David Mark Clements", - "contributors": [ - "Ruben Bridgewater", - "Matteo Collina", - "Ben Gourley", - "Gabriel Lesperance", - "Alex Liu", - "Christoph Walcher", - "Nicholas Young" - ], - "license": "MIT", - "typings": "index", - "devDependencies": { - "benchmark": "^2.1.4", - "clone": "^2.1.0", - "json-stringify-safe": "^5.0.1", - "standard": "^11.0.0", - "tap": "^12.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/davidmarkclements/fast-safe-stringify.git" - }, - "bugs": { - "url": "https://github.com/davidmarkclements/fast-safe-stringify/issues" - }, - "homepage": "https://github.com/davidmarkclements/fast-safe-stringify#readme", - "dependencies": {} -} diff --git a/node_modules/fast-safe-stringify/readme.md b/node_modules/fast-safe-stringify/readme.md deleted file mode 100644 index 47179c9..0000000 --- a/node_modules/fast-safe-stringify/readme.md +++ /dev/null @@ -1,170 +0,0 @@ -# fast-safe-stringify - -Safe and fast serialization alternative to [JSON.stringify][]. - -Gracefully handles circular structures instead of throwing in most cases. -It could return an error string if the circular object is too complex to analyze, -e.g. in case there are proxies involved. - -Provides a deterministic ("stable") version as well that will also gracefully -handle circular structures. See the example below for further information. - -## Usage - -The same as [JSON.stringify][]. - -`stringify(value[, replacer[, space[, options]]])` - -```js -const safeStringify = require('fast-safe-stringify') -const o = { a: 1 } -o.o = o - -console.log(safeStringify(o)) -// '{"a":1,"o":"[Circular]"}' -console.log(JSON.stringify(o)) -// TypeError: Converting circular structure to JSON - -function replacer(key, value) { - console.log('Key:', JSON.stringify(key), 'Value:', JSON.stringify(value)) - // Remove the circular structure - if (value === '[Circular]') { - return - } - return value -} - -// those are also defaults limits when no options object is passed into safeStringify -// configure it to lower the limit. -const options = { - depthLimit: Number.MAX_SAFE_INTEGER, - edgesLimit: Number.MAX_SAFE_INTEGER -}; - -const serialized = safeStringify(o, replacer, 2, options) -// Key: "" Value: {"a":1,"o":"[Circular]"} -// Key: "a" Value: 1 -// Key: "o" Value: "[Circular]" -console.log(serialized) -// { -// "a": 1 -// } -``` - - -Using the deterministic version also works the same: - -```js -const safeStringify = require('fast-safe-stringify') -const o = { b: 1, a: 0 } -o.o = o - -console.log(safeStringify(o)) -// '{"b":1,"a":0,"o":"[Circular]"}' -console.log(safeStringify.stableStringify(o)) -// '{"a":0,"b":1,"o":"[Circular]"}' -console.log(JSON.stringify(o)) -// TypeError: Converting circular structure to JSON -``` - -A faster and side-effect free implementation is available in the -[safe-stable-stringify][] module. However it is still considered experimental -due to a new and more complex implementation. - -### Replace strings constants - -- `[Circular]` - when same reference is found -- `[...]` - when some limit from options object is reached - -## Differences to JSON.stringify - -In general the behavior is identical to [JSON.stringify][]. The [`replacer`][] -and [`space`][] options are also available. - -A few exceptions exist to [JSON.stringify][] while using [`toJSON`][] or -[`replacer`][]: - -### Regular safe stringify - -- Manipulating a circular structure of the passed in value in a `toJSON` or the - `replacer` is not possible! It is possible for any other value and property. - -- In case a circular structure is detected and the [`replacer`][] is used it - will receive the string `[Circular]` as the argument instead of the circular - object itself. - -### Deterministic ("stable") safe stringify - -- Manipulating the input object either in a [`toJSON`][] or the [`replacer`][] - function will not have any effect on the output. The output entirely relies on - the shape the input value had at the point passed to the stringify function! - -- In case a circular structure is detected and the [`replacer`][] is used it - will receive the string `[Circular]` as the argument instead of the circular - object itself. - -A side effect free variation without these limitations can be found as well -([`safe-stable-stringify`][]). It is also faster than the current -implementation. It is still considered experimental due to a new and more -complex implementation. - -## Benchmarks - -Although not JSON, the Node.js `util.inspect` method can be used for similar -purposes (e.g. logging) and also handles circular references. - -Here we compare `fast-safe-stringify` with some alternatives: -(Lenovo T450s with a i7-5600U CPU using Node.js 8.9.4) - -```md -fast-safe-stringify: simple object x 1,121,497 ops/sec ±0.75% (97 runs sampled) -fast-safe-stringify: circular x 560,126 ops/sec ±0.64% (96 runs sampled) -fast-safe-stringify: deep x 32,472 ops/sec ±0.57% (95 runs sampled) -fast-safe-stringify: deep circular x 32,513 ops/sec ±0.80% (92 runs sampled) - -util.inspect: simple object x 272,837 ops/sec ±1.48% (90 runs sampled) -util.inspect: circular x 116,896 ops/sec ±1.19% (95 runs sampled) -util.inspect: deep x 19,382 ops/sec ±0.66% (92 runs sampled) -util.inspect: deep circular x 18,717 ops/sec ±0.63% (96 runs sampled) - -json-stringify-safe: simple object x 233,621 ops/sec ±0.97% (94 runs sampled) -json-stringify-safe: circular x 110,409 ops/sec ±1.85% (95 runs sampled) -json-stringify-safe: deep x 8,705 ops/sec ±0.87% (96 runs sampled) -json-stringify-safe: deep circular x 8,336 ops/sec ±2.20% (93 runs sampled) -``` - -For stable stringify comparisons, see the performance benchmarks in the -[`safe-stable-stringify`][] readme. - -## Protip - -Whether `fast-safe-stringify` or alternatives are used: if the use case -consists of deeply nested objects without circular references the following -pattern will give best results. -Shallow or one level nested objects on the other hand will slow down with it. -It is entirely dependant on the use case. - -```js -const stringify = require('fast-safe-stringify') - -function tryJSONStringify (obj) { - try { return JSON.stringify(obj) } catch (_) {} -} - -const serializedString = tryJSONStringify(deep) || stringify(deep) -``` - -## Acknowledgements - -Sponsored by [nearForm](http://nearform.com) - -## License - -MIT - -[`replacer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The%20replacer%20parameter -[`safe-stable-stringify`]: https://github.com/BridgeAR/safe-stable-stringify -[`space`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The%20space%20argument -[`toJSON`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON()_behavior -[benchmark]: https://github.com/epoberezkin/fast-json-stable-stringify/blob/67f688f7441010cfef91a6147280cc501701e83b/benchmark -[JSON.stringify]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify diff --git a/node_modules/fast-safe-stringify/test-stable.js b/node_modules/fast-safe-stringify/test-stable.js deleted file mode 100644 index c55b95c..0000000 --- a/node_modules/fast-safe-stringify/test-stable.js +++ /dev/null @@ -1,404 +0,0 @@ -const test = require('tap').test -const fss = require('./').stable -const clone = require('clone') -const s = JSON.stringify -const stream = require('stream') - -test('circular reference to root', function (assert) { - const fixture = { name: 'Tywin Lannister' } - fixture.circle = fixture - const expected = s({ circle: '[Circular]', name: 'Tywin Lannister' }) - const actual = fss(fixture) - assert.equal(actual, expected) - assert.end() -}) - -test('circular getter reference to root', function (assert) { - const fixture = { - name: 'Tywin Lannister', - get circle () { - return fixture - } - } - - const expected = s({ circle: '[Circular]', name: 'Tywin Lannister' }) - const actual = fss(fixture) - assert.equal(actual, expected) - assert.end() -}) - -test('nested circular reference to root', function (assert) { - const fixture = { name: 'Tywin Lannister' } - fixture.id = { circle: fixture } - const expected = s({ id: { circle: '[Circular]' }, name: 'Tywin Lannister' }) - const actual = fss(fixture) - assert.equal(actual, expected) - assert.end() -}) - -test('child circular reference', function (assert) { - const fixture = { - name: 'Tywin Lannister', - child: { name: 'Tyrion Lannister' } - } - fixture.child.dinklage = fixture.child - const expected = s({ - child: { - dinklage: '[Circular]', - name: 'Tyrion Lannister' - }, - name: 'Tywin Lannister' - }) - const actual = fss(fixture) - assert.equal(actual, expected) - assert.end() -}) - -test('nested child circular reference', function (assert) { - const fixture = { - name: 'Tywin Lannister', - child: { name: 'Tyrion Lannister' } - } - fixture.child.actor = { dinklage: fixture.child } - const expected = s({ - child: { - actor: { dinklage: '[Circular]' }, - name: 'Tyrion Lannister' - }, - name: 'Tywin Lannister' - }) - const actual = fss(fixture) - assert.equal(actual, expected) - assert.end() -}) - -test('circular objects in an array', function (assert) { - const fixture = { name: 'Tywin Lannister' } - fixture.hand = [fixture, fixture] - const expected = s({ - hand: ['[Circular]', '[Circular]'], - name: 'Tywin Lannister' - }) - const actual = fss(fixture) - assert.equal(actual, expected) - assert.end() -}) - -test('nested circular references in an array', function (assert) { - const fixture = { - name: 'Tywin Lannister', - offspring: [{ name: 'Tyrion Lannister' }, { name: 'Cersei Lannister' }] - } - fixture.offspring[0].dinklage = fixture.offspring[0] - fixture.offspring[1].headey = fixture.offspring[1] - - const expected = s({ - name: 'Tywin Lannister', - offspring: [ - { dinklage: '[Circular]', name: 'Tyrion Lannister' }, - { headey: '[Circular]', name: 'Cersei Lannister' } - ] - }) - const actual = fss(fixture) - assert.equal(actual, expected) - assert.end() -}) - -test('circular arrays', function (assert) { - const fixture = [] - fixture.push(fixture, fixture) - const expected = s(['[Circular]', '[Circular]']) - const actual = fss(fixture) - assert.equal(actual, expected) - assert.end() -}) - -test('nested circular arrays', function (assert) { - const fixture = [] - fixture.push( - { name: 'Jon Snow', bastards: fixture }, - { name: 'Ramsay Bolton', bastards: fixture } - ) - const expected = s([ - { bastards: '[Circular]', name: 'Jon Snow' }, - { bastards: '[Circular]', name: 'Ramsay Bolton' } - ]) - const actual = fss(fixture) - assert.equal(actual, expected) - assert.end() -}) - -test('repeated non-circular references in objects', function (assert) { - const daenerys = { name: 'Daenerys Targaryen' } - const fixture = { - motherOfDragons: daenerys, - queenOfMeereen: daenerys - } - const expected = s(fixture) - const actual = fss(fixture) - assert.equal(actual, expected) - assert.end() -}) - -test('repeated non-circular references in arrays', function (assert) { - const daenerys = { name: 'Daenerys Targaryen' } - const fixture = [daenerys, daenerys] - const expected = s(fixture) - const actual = fss(fixture) - assert.equal(actual, expected) - assert.end() -}) - -test('double child circular reference', function (assert) { - // create circular reference - const child = { name: 'Tyrion Lannister' } - child.dinklage = child - - // include it twice in the fixture - const fixture = { name: 'Tywin Lannister', childA: child, childB: child } - const cloned = clone(fixture) - const expected = s({ - childA: { - dinklage: '[Circular]', - name: 'Tyrion Lannister' - }, - childB: { - dinklage: '[Circular]', - name: 'Tyrion Lannister' - }, - name: 'Tywin Lannister' - }) - const actual = fss(fixture) - assert.equal(actual, expected) - - // check if the fixture has not been modified - assert.same(fixture, cloned) - assert.end() -}) - -test('child circular reference with toJSON', function (assert) { - // Create a test object that has an overridden `toJSON` property - TestObject.prototype.toJSON = function () { - return { special: 'case' } - } - function TestObject (content) {} - - // Creating a simple circular object structure - const parentObject = {} - parentObject.childObject = new TestObject() - parentObject.childObject.parentObject = parentObject - - // Creating a simple circular object structure - const otherParentObject = new TestObject() - otherParentObject.otherChildObject = {} - otherParentObject.otherChildObject.otherParentObject = otherParentObject - - // Making sure our original tests work - assert.same(parentObject.childObject.parentObject, parentObject) - assert.same( - otherParentObject.otherChildObject.otherParentObject, - otherParentObject - ) - - // Should both be idempotent - assert.equal(fss(parentObject), '{"childObject":{"special":"case"}}') - assert.equal(fss(otherParentObject), '{"special":"case"}') - - // Therefore the following assertion should be `true` - assert.same(parentObject.childObject.parentObject, parentObject) - assert.same( - otherParentObject.otherChildObject.otherParentObject, - otherParentObject - ) - - assert.end() -}) - -test('null object', function (assert) { - const expected = s(null) - const actual = fss(null) - assert.equal(actual, expected) - assert.end() -}) - -test('null property', function (assert) { - const expected = s({ f: null }) - const actual = fss({ f: null }) - assert.equal(actual, expected) - assert.end() -}) - -test('nested child circular reference in toJSON', function (assert) { - var circle = { some: 'data' } - circle.circle = circle - var a = { - b: { - toJSON: function () { - a.b = 2 - return '[Redacted]' - } - }, - baz: { - circle, - toJSON: function () { - a.baz = circle - return '[Redacted]' - } - } - } - var o = { - a, - bar: a - } - - const expected = s({ - a: { - b: '[Redacted]', - baz: '[Redacted]' - }, - bar: { - // TODO: This is a known limitation of the current implementation. - // The ideal result would be: - // - // b: 2, - // baz: { - // circle: '[Circular]', - // some: 'data' - // } - // - b: '[Redacted]', - baz: '[Redacted]' - } - }) - const actual = fss(o) - assert.equal(actual, expected) - assert.end() -}) - -test('circular getters are restored when stringified', function (assert) { - const fixture = { - name: 'Tywin Lannister', - get circle () { - return fixture - } - } - fss(fixture) - - assert.equal(fixture.circle, fixture) - assert.end() -}) - -test('non-configurable circular getters use a replacer instead of markers', function (assert) { - const fixture = { name: 'Tywin Lannister' } - Object.defineProperty(fixture, 'circle', { - configurable: false, - get: function () { - return fixture - }, - enumerable: true - }) - - fss(fixture) - - assert.equal(fixture.circle, fixture) - assert.end() -}) - -test('getter child circular reference', function (assert) { - const fixture = { - name: 'Tywin Lannister', - child: { - name: 'Tyrion Lannister', - get dinklage () { - return fixture.child - } - }, - get self () { - return fixture - } - } - - const expected = s({ - child: { - dinklage: '[Circular]', - name: 'Tyrion Lannister' - }, - name: 'Tywin Lannister', - self: '[Circular]' - }) - const actual = fss(fixture) - assert.equal(actual, expected) - assert.end() -}) - -test('Proxy throwing', function (assert) { - assert.plan(1) - const s = new stream.PassThrough() - s.resume() - s.write('', () => { - assert.end() - }) - const actual = fss({ s, p: new Proxy({}, { get () { throw new Error('kaboom') } }) }) - assert.equal(actual, '"[unable to serialize, circular reference is too complex to analyze]"') -}) - -test('depthLimit option - will replace deep objects', function (assert) { - const fixture = { - name: 'Tywin Lannister', - child: { - name: 'Tyrion Lannister' - }, - get self () { - return fixture - } - } - - const expected = s({ - child: '[...]', - name: 'Tywin Lannister', - self: '[Circular]' - }) - const actual = fss(fixture, undefined, undefined, { - depthLimit: 1, - edgesLimit: 1 - }) - assert.equal(actual, expected) - assert.end() -}) - -test('edgesLimit option - will replace deep objects', function (assert) { - const fixture = { - object: { - 1: { test: 'test' }, - 2: { test: 'test' }, - 3: { test: 'test' }, - 4: { test: 'test' } - }, - array: [ - { test: 'test' }, - { test: 'test' }, - { test: 'test' }, - { test: 'test' } - ], - get self () { - return fixture - } - } - - const expected = s({ - array: [{ test: 'test' }, { test: 'test' }, { test: 'test' }, '[...]'], - object: { - 1: { test: 'test' }, - 2: { test: 'test' }, - 3: { test: 'test' }, - 4: '[...]' - }, - self: '[Circular]' - }) - const actual = fss(fixture, undefined, undefined, { - depthLimit: 3, - edgesLimit: 3 - }) - assert.equal(actual, expected) - assert.end() -}) diff --git a/node_modules/fast-safe-stringify/test.js b/node_modules/fast-safe-stringify/test.js deleted file mode 100644 index a4170e9..0000000 --- a/node_modules/fast-safe-stringify/test.js +++ /dev/null @@ -1,397 +0,0 @@ -const test = require('tap').test -const fss = require('./') -const clone = require('clone') -const s = JSON.stringify -const stream = require('stream') - -test('circular reference to root', function (assert) { - const fixture = { name: 'Tywin Lannister' } - fixture.circle = fixture - const expected = s({ name: 'Tywin Lannister', circle: '[Circular]' }) - const actual = fss(fixture) - assert.equal(actual, expected) - assert.end() -}) - -test('circular getter reference to root', function (assert) { - const fixture = { - name: 'Tywin Lannister', - get circle () { - return fixture - } - } - const expected = s({ name: 'Tywin Lannister', circle: '[Circular]' }) - const actual = fss(fixture) - assert.equal(actual, expected) - assert.end() -}) - -test('nested circular reference to root', function (assert) { - const fixture = { name: 'Tywin Lannister' } - fixture.id = { circle: fixture } - const expected = s({ name: 'Tywin Lannister', id: { circle: '[Circular]' } }) - const actual = fss(fixture) - assert.equal(actual, expected) - assert.end() -}) - -test('child circular reference', function (assert) { - const fixture = { - name: 'Tywin Lannister', - child: { name: 'Tyrion Lannister' } - } - fixture.child.dinklage = fixture.child - const expected = s({ - name: 'Tywin Lannister', - child: { - name: 'Tyrion Lannister', - dinklage: '[Circular]' - } - }) - const actual = fss(fixture) - assert.equal(actual, expected) - assert.end() -}) - -test('nested child circular reference', function (assert) { - const fixture = { - name: 'Tywin Lannister', - child: { name: 'Tyrion Lannister' } - } - fixture.child.actor = { dinklage: fixture.child } - const expected = s({ - name: 'Tywin Lannister', - child: { - name: 'Tyrion Lannister', - actor: { dinklage: '[Circular]' } - } - }) - const actual = fss(fixture) - assert.equal(actual, expected) - assert.end() -}) - -test('circular objects in an array', function (assert) { - const fixture = { name: 'Tywin Lannister' } - fixture.hand = [fixture, fixture] - const expected = s({ - name: 'Tywin Lannister', - hand: ['[Circular]', '[Circular]'] - }) - const actual = fss(fixture) - assert.equal(actual, expected) - assert.end() -}) - -test('nested circular references in an array', function (assert) { - const fixture = { - name: 'Tywin Lannister', - offspring: [{ name: 'Tyrion Lannister' }, { name: 'Cersei Lannister' }] - } - fixture.offspring[0].dinklage = fixture.offspring[0] - fixture.offspring[1].headey = fixture.offspring[1] - - const expected = s({ - name: 'Tywin Lannister', - offspring: [ - { name: 'Tyrion Lannister', dinklage: '[Circular]' }, - { name: 'Cersei Lannister', headey: '[Circular]' } - ] - }) - const actual = fss(fixture) - assert.equal(actual, expected) - assert.end() -}) - -test('circular arrays', function (assert) { - const fixture = [] - fixture.push(fixture, fixture) - const expected = s(['[Circular]', '[Circular]']) - const actual = fss(fixture) - assert.equal(actual, expected) - assert.end() -}) - -test('nested circular arrays', function (assert) { - const fixture = [] - fixture.push( - { name: 'Jon Snow', bastards: fixture }, - { name: 'Ramsay Bolton', bastards: fixture } - ) - const expected = s([ - { name: 'Jon Snow', bastards: '[Circular]' }, - { name: 'Ramsay Bolton', bastards: '[Circular]' } - ]) - const actual = fss(fixture) - assert.equal(actual, expected) - assert.end() -}) - -test('repeated non-circular references in objects', function (assert) { - const daenerys = { name: 'Daenerys Targaryen' } - const fixture = { - motherOfDragons: daenerys, - queenOfMeereen: daenerys - } - const expected = s(fixture) - const actual = fss(fixture) - assert.equal(actual, expected) - assert.end() -}) - -test('repeated non-circular references in arrays', function (assert) { - const daenerys = { name: 'Daenerys Targaryen' } - const fixture = [daenerys, daenerys] - const expected = s(fixture) - const actual = fss(fixture) - assert.equal(actual, expected) - assert.end() -}) - -test('double child circular reference', function (assert) { - // create circular reference - const child = { name: 'Tyrion Lannister' } - child.dinklage = child - - // include it twice in the fixture - const fixture = { name: 'Tywin Lannister', childA: child, childB: child } - const cloned = clone(fixture) - const expected = s({ - name: 'Tywin Lannister', - childA: { - name: 'Tyrion Lannister', - dinklage: '[Circular]' - }, - childB: { - name: 'Tyrion Lannister', - dinklage: '[Circular]' - } - }) - const actual = fss(fixture) - assert.equal(actual, expected) - - // check if the fixture has not been modified - assert.same(fixture, cloned) - assert.end() -}) - -test('child circular reference with toJSON', function (assert) { - // Create a test object that has an overridden `toJSON` property - TestObject.prototype.toJSON = function () { - return { special: 'case' } - } - function TestObject (content) {} - - // Creating a simple circular object structure - const parentObject = {} - parentObject.childObject = new TestObject() - parentObject.childObject.parentObject = parentObject - - // Creating a simple circular object structure - const otherParentObject = new TestObject() - otherParentObject.otherChildObject = {} - otherParentObject.otherChildObject.otherParentObject = otherParentObject - - // Making sure our original tests work - assert.same(parentObject.childObject.parentObject, parentObject) - assert.same( - otherParentObject.otherChildObject.otherParentObject, - otherParentObject - ) - - // Should both be idempotent - assert.equal(fss(parentObject), '{"childObject":{"special":"case"}}') - assert.equal(fss(otherParentObject), '{"special":"case"}') - - // Therefore the following assertion should be `true` - assert.same(parentObject.childObject.parentObject, parentObject) - assert.same( - otherParentObject.otherChildObject.otherParentObject, - otherParentObject - ) - - assert.end() -}) - -test('null object', function (assert) { - const expected = s(null) - const actual = fss(null) - assert.equal(actual, expected) - assert.end() -}) - -test('null property', function (assert) { - const expected = s({ f: null }) - const actual = fss({ f: null }) - assert.equal(actual, expected) - assert.end() -}) - -test('nested child circular reference in toJSON', function (assert) { - const circle = { some: 'data' } - circle.circle = circle - const a = { - b: { - toJSON: function () { - a.b = 2 - return '[Redacted]' - } - }, - baz: { - circle, - toJSON: function () { - a.baz = circle - return '[Redacted]' - } - } - } - const o = { - a, - bar: a - } - - const expected = s({ - a: { - b: '[Redacted]', - baz: '[Redacted]' - }, - bar: { - b: 2, - baz: { - some: 'data', - circle: '[Circular]' - } - } - }) - const actual = fss(o) - assert.equal(actual, expected) - assert.end() -}) - -test('circular getters are restored when stringified', function (assert) { - const fixture = { - name: 'Tywin Lannister', - get circle () { - return fixture - } - } - fss(fixture) - - assert.equal(fixture.circle, fixture) - assert.end() -}) - -test('non-configurable circular getters use a replacer instead of markers', function (assert) { - const fixture = { name: 'Tywin Lannister' } - Object.defineProperty(fixture, 'circle', { - configurable: false, - get: function () { - return fixture - }, - enumerable: true - }) - - fss(fixture) - - assert.equal(fixture.circle, fixture) - assert.end() -}) - -test('getter child circular reference are replaced instead of marked', function (assert) { - const fixture = { - name: 'Tywin Lannister', - child: { - name: 'Tyrion Lannister', - get dinklage () { - return fixture.child - } - }, - get self () { - return fixture - } - } - - const expected = s({ - name: 'Tywin Lannister', - child: { - name: 'Tyrion Lannister', - dinklage: '[Circular]' - }, - self: '[Circular]' - }) - const actual = fss(fixture) - assert.equal(actual, expected) - assert.end() -}) - -test('Proxy throwing', function (assert) { - assert.plan(1) - const s = new stream.PassThrough() - s.resume() - s.write('', () => { - assert.end() - }) - const actual = fss({ s, p: new Proxy({}, { get () { throw new Error('kaboom') } }) }) - assert.equal(actual, '"[unable to serialize, circular reference is too complex to analyze]"') -}) - -test('depthLimit option - will replace deep objects', function (assert) { - const fixture = { - name: 'Tywin Lannister', - child: { - name: 'Tyrion Lannister' - }, - get self () { - return fixture - } - } - - const expected = s({ - name: 'Tywin Lannister', - child: '[...]', - self: '[Circular]' - }) - const actual = fss(fixture, undefined, undefined, { - depthLimit: 1, - edgesLimit: 1 - }) - assert.equal(actual, expected) - assert.end() -}) - -test('edgesLimit option - will replace deep objects', function (assert) { - const fixture = { - object: { - 1: { test: 'test' }, - 2: { test: 'test' }, - 3: { test: 'test' }, - 4: { test: 'test' } - }, - array: [ - { test: 'test' }, - { test: 'test' }, - { test: 'test' }, - { test: 'test' } - ], - get self () { - return fixture - } - } - - const expected = s({ - object: { - 1: { test: 'test' }, - 2: { test: 'test' }, - 3: { test: 'test' }, - 4: '[...]' - }, - array: [{ test: 'test' }, { test: 'test' }, { test: 'test' }, '[...]'], - self: '[Circular]' - }) - const actual = fss(fixture, undefined, undefined, { - depthLimit: 3, - edgesLimit: 3 - }) - assert.equal(actual, expected) - assert.end() -}) diff --git a/node_modules/file-type/core.d.ts b/node_modules/file-type/core.d.ts deleted file mode 100644 index 8cd9c68..0000000 --- a/node_modules/file-type/core.d.ts +++ /dev/null @@ -1,253 +0,0 @@ -/** -Typings for primary entry point, Node.js specific typings can be found in index.d.ts -*/ - -import type {ReadableStream as WebReadableStream} from 'node:stream/web'; -import type {ITokenizer, AnyWebByteStream} from 'strtok3'; - -/** -Either the Node.js ReadableStream or the `lib.dom.d.ts` ReadableStream. -Related issue: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/60377 -*/ -export type AnyWebReadableStream = WebReadableStream | ReadableStream; - -export type FileTypeResult = { - /** - One of the supported [file types](https://github.com/sindresorhus/file-type#supported-file-types). - */ - readonly ext: string; - - /** - The detected [MIME type](https://en.wikipedia.org/wiki/Internet_media_type). - */ - readonly mime: string; -}; - -/** -Detect the file type of a `Uint8Array` or `ArrayBuffer`. - -The file type is detected by checking the [magic number](https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the buffer. - -If file access is available, it is recommended to use `.fromFile()` instead. - -@param buffer - An Uint8Array or ArrayBuffer representing file data. It works best if the buffer contains the entire file. It may work with a smaller portion as well. -@param options - Options to override default behavior. -@returns The detected file type, or `undefined` when there is no match. -*/ -export function fileTypeFromBuffer(buffer: Uint8Array | ArrayBuffer, options?: FileTypeOptions): Promise; - -/** -Detect the file type of a [web `ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream). - -The file type is detected by checking the [magic number](https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the buffer. - -@param stream - A [web `ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) streaming a file to examine. -@param options - Options to override default behavior. -@returns A `Promise` for an object with the detected file type, or `undefined` when there is no match. -*/ -export function fileTypeFromStream(stream: AnyWebByteStream, options?: FileTypeOptions): Promise; - -/** -Detect the file type from an [`ITokenizer`](https://github.com/Borewit/strtok3#tokenizer) source. - -This method is used internally, but can also be used for a special "tokenizer" reader. - -A tokenizer propagates the internal read functions, allowing alternative transport mechanisms, to access files, to be implemented and used. - -@param tokenizer - File source implementing the tokenizer interface. -@param options - Options to override default behavior. -@returns The detected file type, or `undefined` when there is no match. - -An example is [`@tokenizer/http`](https://github.com/Borewit/tokenizer-http), which requests data using [HTTP-range-requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests). A difference with a conventional stream and the [*tokenizer*](https://github.com/Borewit/strtok3#tokenizer), is that it is able to *ignore* (seek, fast-forward) in the stream. For example, you may only need and read the first 6 bytes, and the last 128 bytes, which may be an advantage in case reading the entire file would take longer. - -@example -``` -import {makeTokenizer} from '@tokenizer/http'; -import {fileTypeFromTokenizer} from 'file-type'; - -const audioTrackUrl = 'https://test-audio.netlify.com/Various%20Artists%20-%202009%20-%20netBloc%20Vol%2024_%20tiuqottigeloot%20%5BMP3-V2%5D/01%20-%20Diablo%20Swing%20Orchestra%20-%20Heroines.mp3'; - -const httpTokenizer = await makeTokenizer(audioTrackUrl); -const fileType = await fileTypeFromTokenizer(httpTokenizer); - -console.log(fileType); -//=> {ext: 'mp3', mime: 'audio/mpeg'} -``` -*/ -export function fileTypeFromTokenizer(tokenizer: ITokenizer, options?: FileTypeOptions): Promise; - -/** -Supported file extensions. -*/ -export const supportedExtensions: ReadonlySet; - -/** -Supported MIME types. -*/ -export const supportedMimeTypes: ReadonlySet; - -export type StreamOptions = { - /** - The default sample size in bytes. - - @default 4100 - */ - readonly sampleSize?: number; -}; - -/** -Detect the file type of a [`Blob`](https://nodejs.org/api/buffer.html#class-blob) or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). - -@param blob - The [`Blob`](https://nodejs.org/api/buffer.html#class-blob) used for file detection. -@param options - Options to override default behavior. -@returns The detected file type, or `undefined` when there is no match. - -@example -``` -import {fileTypeFromBlob} from 'file-type'; - -const blob = new Blob([''], { - type: 'text/plain', - endings: 'native' -}); - -console.log(await fileTypeFromBlob(blob)); -//=> {ext: 'txt', mime: 'text/plain'} -``` -*/ -export declare function fileTypeFromBlob(blob: Blob, options?: FileTypeOptions): Promise; - -/** -A custom file type detector. - -Custom file type detectors are plugins designed to extend the default detection capabilities. -They allow support for uncommon file types, non-binary formats, or customized detection behavior. - -Detectors can be added via the constructor options or by modifying `FileTypeParser#detectors` directly. -Detectors provided through the constructor are executed before the default ones. - -Detectors can be added via the constructor options or by directly modifying `FileTypeParser#detectors`. - -### Example adding a detector - -```js -import {FileTypeParser} from 'file-type'; -import {detectXml} from '@file-type/xml'; - -const parser = new FileTypeParser({customDetectors: [detectXml]}); -const fileType = await parser.fromFile('sample.kml'); -console.log(fileType); -``` - -### Available-third party file-type detectors - -- [@file-type/xml](https://github.com/Borewit/file-type-xml): Detects common XML file types, such as GLM, KML, MusicXML, RSS, SVG, and XHTML - -### Detector execution flow - -If a detector returns `undefined`, the following rules apply: - -1. **No Tokenizer Interaction**: If the detector does not modify the tokenizer's position, the next detector in the sequence is executed. -2. **Tokenizer Interaction**: If the detector modifies the tokenizer's position (`tokenizer.position` is advanced), no further detectors are executed. In this case, the file type remains `undefined`, as subsequent detectors cannot evaluate the content. This is an exceptional scenario, as it prevents any other detectors from determining the file type. - -### Example writing a custom detector - -Below is an example of a custom detector array. This can be passed to the `FileTypeParser` via the `fileTypeOptions` argument. - -``` -import {FileTypeParser} from 'file-type'; - -const customDetectors = [ - async tokenizer => { - const unicornHeader = [85, 78, 73, 67, 79, 82, 78]; // "UNICORN" in ASCII decimal - - const buffer = new Uint8Array(unicornHeader.length); - await tokenizer.peekBuffer(buffer, {length: unicornHeader.length, mayBeLess: true}); - if (unicornHeader.every((value, index) => value === buffer[index])) { - return {ext: 'unicorn', mime: 'application/unicorn'}; - } - - return undefined; - }, -]; - -const buffer = new Uint8Array([85, 78, 73, 67, 79, 82, 78]); -const parser = new FileTypeParser({customDetectors}); -const fileType = await parser.fromBuffer(buffer); -console.log(fileType); // {ext: 'unicorn', mime: 'application/unicorn'} -``` - -@param tokenizer - The [tokenizer](https://github.com/Borewit/strtok3#tokenizer) used to read file content. -@param fileType - The file type detected by standard or previous custom detectors, or `undefined` if no match is found. -@returns The detected file type, or `undefined` if no match is found. -*/ -export type Detector = { - id: string; - detect: (tokenizer: ITokenizer, fileType?: FileTypeResult) => Promise; -}; - -export type FileTypeOptions = { - customDetectors?: Iterable; - - /** - Specifies the byte tolerance for locating the first MPEG audio frame (e.g. `.mp1`, `.mp2`, `.mp3`, `.aac`). - - Allows detection to handle slight sync offsets between the expected and actual frame start. Common in malformed or incorrectly muxed files, which, while technically invalid, do occur in the wild. - - A tolerance of 10 bytes covers most cases. - - @default 0 - */ - mpegOffsetTolerance?: number; -}; - -export declare class TokenizerPositionError extends Error { - constructor(message?: string); -} - -export type AnyWebReadableByteStreamWithFileType = AnyWebReadableStream & { - readonly fileType?: FileTypeResult; -}; - -/** -Workaround for using `bundler` as the module-resolution in TypeScript. -*/ -export function fileTypeFromFile(filePath: string, options?: {customDetectors?: Iterable}): Promise; - -/** -Returns a `Promise` which resolves to the original readable stream argument, but with an added `fileType` property, which is an object like the one returned from `fileTypeFromFile()`. - -This method can be handy to put in a stream pipeline, but it comes with a price. Internally `stream()` builds up a buffer of `sampleSize` bytes, used as a sample, to determine the file type. The sample size impacts the file detection resolution. A smaller sample size will result in lower probability of the best file type detection. -*/ -export function fileTypeStream(webStream: AnyWebReadableStream, options?: StreamOptions): Promise; - -export declare class FileTypeParser { - /** - File type detectors. - - Initialized with a single entry holding the built-in detector function. - */ - detectors: Detector[]; - - constructor(options?: {customDetectors?: Iterable; signal?: AbortSignal}); - - /** - Works the same way as {@link fileTypeFromBuffer}, additionally taking into account custom detectors (if any were provided to the constructor). - */ - fromBuffer(buffer: Uint8Array | ArrayBuffer): Promise; - - /** - Works the same way as {@link fileTypeFromTokenizer}, additionally taking into account custom detectors (if any were provided to the constructor). - */ - fromTokenizer(tokenizer: ITokenizer): Promise; - - /** - Works the same way as {@link fileTypeFromBlob}, additionally taking into account custom detectors (if any were provided to the constructor). - */ - fromBlob(blob: Blob): Promise; - - /** - Works the same way as {@link fileTypeStream}, additionally taking into account custom detectors (if any were provided to the constructor). - */ - toDetectionStream(webStream: AnyWebReadableStream, options?: StreamOptions): Promise; -} diff --git a/node_modules/file-type/core.js b/node_modules/file-type/core.js deleted file mode 100644 index 5c365d9..0000000 --- a/node_modules/file-type/core.js +++ /dev/null @@ -1,2715 +0,0 @@ -/** -Primary entry point, Node.js specific entry point is index.js -*/ - -import * as Token from 'token-types'; -import * as strtok3 from 'strtok3/core'; -import {ZipHandler, GzipHandler} from '@tokenizer/inflate'; -import {getUintBE} from 'uint8array-extras'; -import { - stringToBytes, - tarHeaderChecksumMatches, - uint32SyncSafeToken, -} from './util.js'; -import {extensions, mimeTypes} from './supported.js'; - -export const reasonableDetectionSizeInBytes = 4100; // A fair amount of file-types are detectable within this range. -// Keep defensive limits small enough to avoid accidental memory spikes from untrusted inputs. -const maximumMpegOffsetTolerance = reasonableDetectionSizeInBytes - 2; -const maximumZipEntrySizeInBytes = 1024 * 1024; -const maximumZipEntryCount = 1024; -const maximumZipBufferedReadSizeInBytes = (2 ** 31) - 1; -const maximumUntrustedSkipSizeInBytes = 16 * 1024 * 1024; -const maximumZipTextEntrySizeInBytes = maximumZipEntrySizeInBytes; -const maximumNestedGzipDetectionSizeInBytes = maximumUntrustedSkipSizeInBytes; -const maximumNestedGzipProbeDepth = 1; -const maximumId3HeaderSizeInBytes = maximumUntrustedSkipSizeInBytes; -const maximumEbmlDocumentTypeSizeInBytes = 64; -const maximumEbmlElementPayloadSizeInBytes = maximumUntrustedSkipSizeInBytes; -const maximumEbmlElementCount = 256; -const maximumPngChunkCount = 512; -const maximumAsfHeaderObjectCount = 512; -const maximumTiffTagCount = 512; -const maximumDetectionReentryCount = 256; -const maximumPngChunkSizeInBytes = maximumUntrustedSkipSizeInBytes; -const maximumTiffIfdOffsetInBytes = maximumUntrustedSkipSizeInBytes; -const recoverableZipErrorMessages = new Set([ - 'Unexpected signature', - 'Encrypted ZIP', - 'Expected Central-File-Header signature', -]); -const recoverableZipErrorMessagePrefixes = [ - 'ZIP entry count exceeds ', - 'Unsupported ZIP compression method:', - 'ZIP entry compressed data exceeds ', - 'ZIP entry decompressed data exceeds ', -]; -const recoverableZipErrorCodes = new Set([ - 'Z_BUF_ERROR', - 'Z_DATA_ERROR', - 'ERR_INVALID_STATE', -]); - -class ParserHardLimitError extends Error {} - -function getSafeBound(value, maximum, reason) { - if ( - !Number.isFinite(value) - || value < 0 - || value > maximum - ) { - throw new ParserHardLimitError(`${reason} has invalid size ${value} (maximum ${maximum} bytes)`); - } - - return value; -} - -async function safeIgnore(tokenizer, length, {maximumLength = maximumUntrustedSkipSizeInBytes, reason = 'skip'} = {}) { - const safeLength = getSafeBound(length, maximumLength, reason); - await tokenizer.ignore(safeLength); -} - -async function safeReadBuffer(tokenizer, buffer, options, {maximumLength = buffer.length, reason = 'read'} = {}) { - const length = options?.length ?? buffer.length; - const safeLength = getSafeBound(length, maximumLength, reason); - return tokenizer.readBuffer(buffer, { - ...options, - length: safeLength, - }); -} - -async function decompressDeflateRawWithLimit(data, {maximumLength = maximumZipEntrySizeInBytes} = {}) { - const input = new ReadableStream({ - start(controller) { - controller.enqueue(data); - controller.close(); - }, - }); - const output = input.pipeThrough(new DecompressionStream('deflate-raw')); - const reader = output.getReader(); - const chunks = []; - let totalLength = 0; - - try { - for (;;) { - const {done, value} = await reader.read(); - if (done) { - break; - } - - totalLength += value.length; - if (totalLength > maximumLength) { - await reader.cancel(); - throw new Error(`ZIP entry decompressed data exceeds ${maximumLength} bytes`); - } - - chunks.push(value); - } - } finally { - reader.releaseLock(); - } - - const uncompressedData = new Uint8Array(totalLength); - let offset = 0; - for (const chunk of chunks) { - uncompressedData.set(chunk, offset); - offset += chunk.length; - } - - return uncompressedData; -} - -const zipDataDescriptorSignature = 0x08_07_4B_50; -const zipDataDescriptorLengthInBytes = 16; -const zipDataDescriptorOverlapLengthInBytes = zipDataDescriptorLengthInBytes - 1; - -function findZipDataDescriptorOffset(buffer, bytesConsumed) { - if (buffer.length < zipDataDescriptorLengthInBytes) { - return -1; - } - - const lastPossibleDescriptorOffset = buffer.length - zipDataDescriptorLengthInBytes; - for (let index = 0; index <= lastPossibleDescriptorOffset; index++) { - if ( - Token.UINT32_LE.get(buffer, index) === zipDataDescriptorSignature - && Token.UINT32_LE.get(buffer, index + 8) === bytesConsumed + index - ) { - return index; - } - } - - return -1; -} - -function mergeByteChunks(chunks, totalLength) { - const merged = new Uint8Array(totalLength); - let offset = 0; - - for (const chunk of chunks) { - merged.set(chunk, offset); - offset += chunk.length; - } - - return merged; -} - -async function readZipDataDescriptorEntryWithLimit(zipHandler, {shouldBuffer, maximumLength = maximumZipEntrySizeInBytes} = {}) { - const {syncBuffer} = zipHandler; - const {length: syncBufferLength} = syncBuffer; - const chunks = []; - let bytesConsumed = 0; - - for (;;) { - const length = await zipHandler.tokenizer.peekBuffer(syncBuffer, {mayBeLess: true}); - const dataDescriptorOffset = findZipDataDescriptorOffset(syncBuffer.subarray(0, length), bytesConsumed); - const retainedLength = dataDescriptorOffset >= 0 - ? 0 - : ( - length === syncBufferLength - ? Math.min(zipDataDescriptorOverlapLengthInBytes, length - 1) - : 0 - ); - const chunkLength = dataDescriptorOffset >= 0 ? dataDescriptorOffset : length - retainedLength; - - if (chunkLength === 0) { - break; - } - - bytesConsumed += chunkLength; - if (bytesConsumed > maximumLength) { - throw new Error(`ZIP entry compressed data exceeds ${maximumLength} bytes`); - } - - if (shouldBuffer) { - const data = new Uint8Array(chunkLength); - await zipHandler.tokenizer.readBuffer(data); - chunks.push(data); - } else { - await zipHandler.tokenizer.ignore(chunkLength); - } - - if (dataDescriptorOffset >= 0) { - break; - } - } - - if (!shouldBuffer) { - return; - } - - return mergeByteChunks(chunks, bytesConsumed); -} - -async function readZipEntryData(zipHandler, zipHeader, {shouldBuffer} = {}) { - if ( - zipHeader.dataDescriptor - && zipHeader.compressedSize === 0 - ) { - return readZipDataDescriptorEntryWithLimit(zipHandler, {shouldBuffer}); - } - - if (!shouldBuffer) { - await zipHandler.tokenizer.ignore(zipHeader.compressedSize); - return; - } - - const maximumLength = getMaximumZipBufferedReadLength(zipHandler.tokenizer); - if ( - !Number.isFinite(zipHeader.compressedSize) - || zipHeader.compressedSize < 0 - || zipHeader.compressedSize > maximumLength - ) { - throw new Error(`ZIP entry compressed data exceeds ${maximumLength} bytes`); - } - - const fileData = new Uint8Array(zipHeader.compressedSize); - await zipHandler.tokenizer.readBuffer(fileData); - return fileData; -} - -// Override the default inflate to enforce decompression size limits, since @tokenizer/inflate does not expose a configuration hook for this. -ZipHandler.prototype.inflate = async function (zipHeader, fileData, callback) { - if (zipHeader.compressedMethod === 0) { - return callback(fileData); - } - - if (zipHeader.compressedMethod !== 8) { - throw new Error(`Unsupported ZIP compression method: ${zipHeader.compressedMethod}`); - } - - const uncompressedData = await decompressDeflateRawWithLimit(fileData, {maximumLength: maximumZipEntrySizeInBytes}); - return callback(uncompressedData); -}; - -ZipHandler.prototype.unzip = async function (fileCallback) { - let stop = false; - let zipEntryCount = 0; - do { - const zipHeader = await this.readLocalFileHeader(); - if (!zipHeader) { - break; - } - - zipEntryCount++; - if (zipEntryCount > maximumZipEntryCount) { - throw new Error(`ZIP entry count exceeds ${maximumZipEntryCount}`); - } - - const next = fileCallback(zipHeader); - stop = Boolean(next.stop); - await this.tokenizer.ignore(zipHeader.extraFieldLength); - const fileData = await readZipEntryData(this, zipHeader, { - shouldBuffer: Boolean(next.handler), - }); - - if (next.handler) { - await this.inflate(zipHeader, fileData, next.handler); - } - - if (zipHeader.dataDescriptor) { - const dataDescriptor = new Uint8Array(zipDataDescriptorLengthInBytes); - await this.tokenizer.readBuffer(dataDescriptor); - if (Token.UINT32_LE.get(dataDescriptor, 0) !== zipDataDescriptorSignature) { - throw new Error(`Expected data-descriptor-signature at position ${this.tokenizer.position - dataDescriptor.length}`); - } - } - } while (!stop); -}; - -function createByteLimitedReadableStream(stream, maximumBytes) { - const reader = stream.getReader(); - let emittedBytes = 0; - let sourceDone = false; - let sourceCanceled = false; - - const cancelSource = async reason => { - if ( - sourceDone - || sourceCanceled - ) { - return; - } - - sourceCanceled = true; - await reader.cancel(reason); - }; - - return new ReadableStream({ - async pull(controller) { - if (emittedBytes >= maximumBytes) { - controller.close(); - await cancelSource(); - return; - } - - const {done, value} = await reader.read(); - if ( - done - || !value - ) { - sourceDone = true; - controller.close(); - return; - } - - const remainingBytes = maximumBytes - emittedBytes; - if (value.length > remainingBytes) { - controller.enqueue(value.subarray(0, remainingBytes)); - emittedBytes += remainingBytes; - controller.close(); - await cancelSource(); - return; - } - - controller.enqueue(value); - emittedBytes += value.length; - }, - async cancel(reason) { - await cancelSource(reason); - }, - }); -} - -export async function fileTypeFromStream(stream, options) { - return new FileTypeParser(options).fromStream(stream); -} - -export async function fileTypeFromBuffer(input, options) { - return new FileTypeParser(options).fromBuffer(input); -} - -export async function fileTypeFromBlob(blob, options) { - return new FileTypeParser(options).fromBlob(blob); -} - -function getFileTypeFromMimeType(mimeType) { - mimeType = mimeType.toLowerCase(); - switch (mimeType) { - case 'application/epub+zip': - return { - ext: 'epub', - mime: mimeType, - }; - case 'application/vnd.oasis.opendocument.text': - return { - ext: 'odt', - mime: mimeType, - }; - case 'application/vnd.oasis.opendocument.text-template': - return { - ext: 'ott', - mime: mimeType, - }; - case 'application/vnd.oasis.opendocument.spreadsheet': - return { - ext: 'ods', - mime: mimeType, - }; - case 'application/vnd.oasis.opendocument.spreadsheet-template': - return { - ext: 'ots', - mime: mimeType, - }; - case 'application/vnd.oasis.opendocument.presentation': - return { - ext: 'odp', - mime: mimeType, - }; - case 'application/vnd.oasis.opendocument.presentation-template': - return { - ext: 'otp', - mime: mimeType, - }; - case 'application/vnd.oasis.opendocument.graphics': - return { - ext: 'odg', - mime: mimeType, - }; - case 'application/vnd.oasis.opendocument.graphics-template': - return { - ext: 'otg', - mime: mimeType, - }; - case 'application/vnd.openxmlformats-officedocument.presentationml.slideshow': - return { - ext: 'ppsx', - mime: mimeType, - }; - case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': - return { - ext: 'xlsx', - mime: mimeType, - }; - case 'application/vnd.ms-excel.sheet.macroenabled': - return { - ext: 'xlsm', - mime: 'application/vnd.ms-excel.sheet.macroenabled.12', - }; - case 'application/vnd.openxmlformats-officedocument.spreadsheetml.template': - return { - ext: 'xltx', - mime: mimeType, - }; - case 'application/vnd.ms-excel.template.macroenabled': - return { - ext: 'xltm', - mime: 'application/vnd.ms-excel.template.macroenabled.12', - }; - case 'application/vnd.ms-powerpoint.slideshow.macroenabled': - return { - ext: 'ppsm', - mime: 'application/vnd.ms-powerpoint.slideshow.macroenabled.12', - }; - case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': - return { - ext: 'docx', - mime: mimeType, - }; - case 'application/vnd.ms-word.document.macroenabled': - return { - ext: 'docm', - mime: 'application/vnd.ms-word.document.macroenabled.12', - }; - case 'application/vnd.openxmlformats-officedocument.wordprocessingml.template': - return { - ext: 'dotx', - mime: mimeType, - }; - case 'application/vnd.ms-word.template.macroenabledtemplate': - return { - ext: 'dotm', - mime: 'application/vnd.ms-word.template.macroenabled.12', - }; - case 'application/vnd.openxmlformats-officedocument.presentationml.template': - return { - ext: 'potx', - mime: mimeType, - }; - case 'application/vnd.ms-powerpoint.template.macroenabled': - return { - ext: 'potm', - mime: 'application/vnd.ms-powerpoint.template.macroenabled.12', - }; - case 'application/vnd.openxmlformats-officedocument.presentationml.presentation': - return { - ext: 'pptx', - mime: mimeType, - }; - case 'application/vnd.ms-powerpoint.presentation.macroenabled': - return { - ext: 'pptm', - mime: 'application/vnd.ms-powerpoint.presentation.macroenabled.12', - }; - case 'application/vnd.ms-visio.drawing': - return { - ext: 'vsdx', - mime: 'application/vnd.visio', - }; - case 'application/vnd.ms-package.3dmanufacturing-3dmodel+xml': - return { - ext: '3mf', - mime: 'model/3mf', - }; - default: - } -} - -function _check(buffer, headers, options) { - options = { - offset: 0, - ...options, - }; - - for (const [index, header] of headers.entries()) { - // If a bitmask is set - if (options.mask) { - // If header doesn't equal `buf` with bits masked off - if (header !== (options.mask[index] & buffer[index + options.offset])) { - return false; - } - } else if (header !== buffer[index + options.offset]) { - return false; - } - } - - return true; -} - -export function normalizeSampleSize(sampleSize) { - // Accept odd caller input, but preserve valid caller-requested probe depth. - if (!Number.isFinite(sampleSize)) { - return reasonableDetectionSizeInBytes; - } - - return Math.max(1, Math.trunc(sampleSize)); -} - -function normalizeMpegOffsetTolerance(mpegOffsetTolerance) { - // This value controls scan depth and therefore worst-case CPU work. - if (!Number.isFinite(mpegOffsetTolerance)) { - return 0; - } - - return Math.max(0, Math.min(maximumMpegOffsetTolerance, Math.trunc(mpegOffsetTolerance))); -} - -function getKnownFileSizeOrMaximum(fileSize) { - if (!Number.isFinite(fileSize)) { - return Number.MAX_SAFE_INTEGER; - } - - return Math.max(0, fileSize); -} - -function hasUnknownFileSize(tokenizer) { - const fileSize = tokenizer.fileInfo.size; - return ( - !Number.isFinite(fileSize) - || fileSize === Number.MAX_SAFE_INTEGER - ); -} - -function hasExceededUnknownSizeScanBudget(tokenizer, startOffset, maximumBytes) { - return ( - hasUnknownFileSize(tokenizer) - && tokenizer.position - startOffset > maximumBytes - ); -} - -function getMaximumZipBufferedReadLength(tokenizer) { - const fileSize = tokenizer.fileInfo.size; - const remainingBytes = Number.isFinite(fileSize) - ? Math.max(0, fileSize - tokenizer.position) - : Number.MAX_SAFE_INTEGER; - - return Math.min(remainingBytes, maximumZipBufferedReadSizeInBytes); -} - -function isRecoverableZipError(error) { - if (error instanceof strtok3.EndOfStreamError) { - return true; - } - - if (error instanceof ParserHardLimitError) { - return true; - } - - if (!(error instanceof Error)) { - return false; - } - - if (recoverableZipErrorMessages.has(error.message)) { - return true; - } - - if (recoverableZipErrorCodes.has(error.code)) { - return true; - } - - for (const prefix of recoverableZipErrorMessagePrefixes) { - if (error.message.startsWith(prefix)) { - return true; - } - } - - return false; -} - -function canReadZipEntryForDetection(zipHeader, maximumSize = maximumZipEntrySizeInBytes) { - const sizes = [zipHeader.compressedSize, zipHeader.uncompressedSize]; - for (const size of sizes) { - if ( - !Number.isFinite(size) - || size < 0 - || size > maximumSize - ) { - return false; - } - } - - return true; -} - -function createOpenXmlZipDetectionState() { - return { - hasContentTypesEntry: false, - hasParsedContentTypesEntry: false, - isParsingContentTypes: false, - hasUnparseableContentTypes: false, - hasWordDirectory: false, - hasPresentationDirectory: false, - hasSpreadsheetDirectory: false, - hasThreeDimensionalModelEntry: false, - }; -} - -function updateOpenXmlZipDetectionStateFromFilename(openXmlState, filename) { - if (filename.startsWith('word/')) { - openXmlState.hasWordDirectory = true; - } - - if (filename.startsWith('ppt/')) { - openXmlState.hasPresentationDirectory = true; - } - - if (filename.startsWith('xl/')) { - openXmlState.hasSpreadsheetDirectory = true; - } - - if ( - filename.startsWith('3D/') - && filename.endsWith('.model') - ) { - openXmlState.hasThreeDimensionalModelEntry = true; - } -} - -function getOpenXmlFileTypeFromZipEntries(openXmlState) { - // Only use directory-name heuristic when [Content_Types].xml was present in the archive - // but its handler was skipped (not invoked, not currently running, and not already resolved). - // This avoids guessing from directory names when content-type parsing already gave a definitive answer or failed. - if ( - !openXmlState.hasContentTypesEntry - || openXmlState.hasUnparseableContentTypes - || openXmlState.isParsingContentTypes - || openXmlState.hasParsedContentTypesEntry - ) { - return; - } - - if (openXmlState.hasWordDirectory) { - return { - ext: 'docx', - mime: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - }; - } - - if (openXmlState.hasPresentationDirectory) { - return { - ext: 'pptx', - mime: 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - }; - } - - if (openXmlState.hasSpreadsheetDirectory) { - return { - ext: 'xlsx', - mime: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - }; - } - - if (openXmlState.hasThreeDimensionalModelEntry) { - return { - ext: '3mf', - mime: 'model/3mf', - }; - } -} - -function getOpenXmlMimeTypeFromContentTypesXml(xmlContent) { - // We only need the `ContentType="...main+xml"` value, so a small string scan is enough and avoids full XML parsing. - const endPosition = xmlContent.indexOf('.main+xml"'); - if (endPosition === -1) { - const mimeType = 'application/vnd.ms-package.3dmanufacturing-3dmodel+xml'; - if (xmlContent.includes(`ContentType="${mimeType}"`)) { - return mimeType; - } - - return; - } - - const truncatedContent = xmlContent.slice(0, endPosition); - const firstQuotePosition = truncatedContent.lastIndexOf('"'); - // If no quote is found, `lastIndexOf` returns -1 and this intentionally falls back to the full truncated prefix. - return truncatedContent.slice(firstQuotePosition + 1); -} - -export async function fileTypeFromTokenizer(tokenizer, options) { - return new FileTypeParser(options).fromTokenizer(tokenizer); -} - -export async function fileTypeStream(webStream, options) { - return new FileTypeParser(options).toDetectionStream(webStream, options); -} - -export class FileTypeParser { - constructor(options) { - const normalizedMpegOffsetTolerance = normalizeMpegOffsetTolerance(options?.mpegOffsetTolerance); - this.options = { - ...options, - mpegOffsetTolerance: normalizedMpegOffsetTolerance, - }; - - this.detectors = [...(this.options.customDetectors ?? []), - {id: 'core', detect: this.detectConfident}, - {id: 'core.imprecise', detect: this.detectImprecise}]; - this.tokenizerOptions = { - abortSignal: this.options.signal, - }; - this.gzipProbeDepth = 0; - } - - getTokenizerOptions() { - return { - ...this.tokenizerOptions, - }; - } - - async fromTokenizer(tokenizer, detectionReentryCount = 0) { - this.detectionReentryCount = detectionReentryCount; - const initialPosition = tokenizer.position; - // Iterate through all file-type detectors - for (const detector of this.detectors) { - let fileType; - try { - fileType = await detector.detect(tokenizer); - } catch (error) { - if (error instanceof strtok3.EndOfStreamError) { - return; - } - - if (error instanceof ParserHardLimitError) { - return; - } - - throw error; - } - - if (fileType) { - return fileType; - } - - if (initialPosition !== tokenizer.position) { - return undefined; // Cannot proceed scanning of the tokenizer is at an arbitrary position - } - } - } - - async fromBuffer(input) { - if (!(input instanceof Uint8Array || input instanceof ArrayBuffer)) { - throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof input}\``); - } - - const buffer = input instanceof Uint8Array ? input : new Uint8Array(input); - - if (!(buffer?.length > 1)) { - return; - } - - return this.fromTokenizer(strtok3.fromBuffer(buffer, this.getTokenizerOptions())); - } - - async fromBlob(blob) { - const tokenizer = strtok3.fromBlob(blob, this.getTokenizerOptions()); - try { - return await this.fromTokenizer(tokenizer); - } finally { - await tokenizer.close(); - } - } - - async fromStream(stream) { - const tokenizer = strtok3.fromWebStream(stream, this.getTokenizerOptions()); - try { - return await this.fromTokenizer(tokenizer); - } finally { - await tokenizer.close(); - } - } - - async toDetectionStream(stream, options) { - const sampleSize = normalizeSampleSize(options?.sampleSize ?? reasonableDetectionSizeInBytes); - let detectedFileType; - let firstChunk; - - const reader = stream.getReader({mode: 'byob'}); - try { - // Read the first chunk from the stream - const {value: chunk, done} = await reader.read(new Uint8Array(sampleSize)); - firstChunk = chunk; - if (!done && chunk) { - try { - // Attempt to detect the file type from the chunk - detectedFileType = await this.fromBuffer(chunk.subarray(0, sampleSize)); - } catch (error) { - if (!(error instanceof strtok3.EndOfStreamError)) { - throw error; // Re-throw non-EndOfStreamError - } - - detectedFileType = undefined; - } - } - - firstChunk = chunk; - } finally { - reader.releaseLock(); // Ensure the reader is released - } - - // Create a new ReadableStream to manage locking issues - const transformStream = new TransformStream({ - async start(controller) { - controller.enqueue(firstChunk); // Enqueue the initial chunk - }, - transform(chunk, controller) { - // Pass through the chunks without modification - controller.enqueue(chunk); - }, - }); - - const newStream = stream.pipeThrough(transformStream); - newStream.fileType = detectedFileType; - - return newStream; - } - - check(header, options) { - return _check(this.buffer, header, options); - } - - checkString(header, options) { - return this.check(stringToBytes(header, options?.encoding), options); - } - - // Detections with a high degree of certainty in identifying the correct file type - detectConfident = async tokenizer => { - this.buffer = new Uint8Array(reasonableDetectionSizeInBytes); - - // Keep reading until EOF if the file size is unknown. - if (tokenizer.fileInfo.size === undefined) { - tokenizer.fileInfo.size = Number.MAX_SAFE_INTEGER; - } - - this.tokenizer = tokenizer; - - await tokenizer.peekBuffer(this.buffer, {length: 32, mayBeLess: true}); - - // -- 2-byte signatures -- - - if (this.check([0x42, 0x4D])) { - return { - ext: 'bmp', - mime: 'image/bmp', - }; - } - - if (this.check([0x0B, 0x77])) { - return { - ext: 'ac3', - mime: 'audio/vnd.dolby.dd-raw', - }; - } - - if (this.check([0x78, 0x01])) { - return { - ext: 'dmg', - mime: 'application/x-apple-diskimage', - }; - } - - if (this.check([0x4D, 0x5A])) { - return { - ext: 'exe', - mime: 'application/x-msdownload', - }; - } - - if (this.check([0x25, 0x21])) { - await tokenizer.peekBuffer(this.buffer, {length: 24, mayBeLess: true}); - - if ( - this.checkString('PS-Adobe-', {offset: 2}) - && this.checkString(' EPSF-', {offset: 14}) - ) { - return { - ext: 'eps', - mime: 'application/eps', - }; - } - - return { - ext: 'ps', - mime: 'application/postscript', - }; - } - - if ( - this.check([0x1F, 0xA0]) - || this.check([0x1F, 0x9D]) - ) { - return { - ext: 'Z', - mime: 'application/x-compress', - }; - } - - if (this.check([0xC7, 0x71])) { - return { - ext: 'cpio', - mime: 'application/x-cpio', - }; - } - - if (this.check([0x60, 0xEA])) { - return { - ext: 'arj', - mime: 'application/x-arj', - }; - } - - // -- 3-byte signatures -- - - if (this.check([0xEF, 0xBB, 0xBF])) { // UTF-8-BOM - if (this.detectionReentryCount >= maximumDetectionReentryCount) { - return; - } - - this.detectionReentryCount++; - // Strip off UTF-8-BOM - await this.tokenizer.ignore(3); - return this.detectConfident(tokenizer); - } - - if (this.check([0x47, 0x49, 0x46])) { - return { - ext: 'gif', - mime: 'image/gif', - }; - } - - if (this.check([0x49, 0x49, 0xBC])) { - return { - ext: 'jxr', - mime: 'image/vnd.ms-photo', - }; - } - - if (this.check([0x1F, 0x8B, 0x8])) { - if (this.gzipProbeDepth >= maximumNestedGzipProbeDepth) { - return { - ext: 'gz', - mime: 'application/gzip', - }; - } - - const gzipHandler = new GzipHandler(tokenizer); - const limitedInflatedStream = createByteLimitedReadableStream(gzipHandler.inflate(), maximumNestedGzipDetectionSizeInBytes); - let compressedFileType; - try { - this.gzipProbeDepth++; - compressedFileType = await this.fromStream(limitedInflatedStream); - } catch (error) { - if (error?.name === 'AbortError') { - throw error; - } - - // Decompression or inner-detection failures are expected for non-tar gzip files. - } finally { - this.gzipProbeDepth--; - } - - // We only need enough inflated bytes to confidently decide whether this is tar.gz. - if (compressedFileType?.ext === 'tar') { - return { - ext: 'tar.gz', - mime: 'application/gzip', - }; - } - - return { - ext: 'gz', - mime: 'application/gzip', - }; - } - - if (this.check([0x42, 0x5A, 0x68])) { - return { - ext: 'bz2', - mime: 'application/x-bzip2', - }; - } - - if (this.checkString('ID3')) { - await safeIgnore(tokenizer, 6, { - maximumLength: 6, - reason: 'ID3 header prefix', - }); // Skip ID3 header until the header size - const id3HeaderLength = await tokenizer.readToken(uint32SyncSafeToken); - const isUnknownFileSize = hasUnknownFileSize(tokenizer); - if ( - !Number.isFinite(id3HeaderLength) - || id3HeaderLength < 0 - // Keep ID3 probing bounded for unknown-size streams to avoid attacker-controlled large skips. - || ( - isUnknownFileSize - && id3HeaderLength > maximumId3HeaderSizeInBytes - ) - ) { - return; - } - - if (tokenizer.position + id3HeaderLength > tokenizer.fileInfo.size) { - if (isUnknownFileSize) { - return; - } - - return { - ext: 'mp3', - mime: 'audio/mpeg', - }; - } - - try { - await safeIgnore(tokenizer, id3HeaderLength, { - maximumLength: isUnknownFileSize ? maximumId3HeaderSizeInBytes : tokenizer.fileInfo.size, - reason: 'ID3 payload', - }); - } catch (error) { - if (error instanceof strtok3.EndOfStreamError) { - return; - } - - throw error; - } - - if (this.detectionReentryCount >= maximumDetectionReentryCount) { - return; - } - - this.detectionReentryCount++; - return this.fromTokenizer(tokenizer, this.detectionReentryCount); // Skip ID3 header, recursion - } - - // Musepack, SV7 - if (this.checkString('MP+')) { - return { - ext: 'mpc', - mime: 'audio/x-musepack', - }; - } - - if ( - (this.buffer[0] === 0x43 || this.buffer[0] === 0x46) - && this.check([0x57, 0x53], {offset: 1}) - ) { - return { - ext: 'swf', - mime: 'application/x-shockwave-flash', - }; - } - - // -- 4-byte signatures -- - - // Requires a sample size of 4 bytes - if (this.check([0xFF, 0xD8, 0xFF])) { - if (this.check([0xF7], {offset: 3})) { // JPG7/SOF55, indicating a ISO/IEC 14495 / JPEG-LS file - return { - ext: 'jls', - mime: 'image/jls', - }; - } - - return { - ext: 'jpg', - mime: 'image/jpeg', - }; - } - - if (this.check([0x4F, 0x62, 0x6A, 0x01])) { - return { - ext: 'avro', - mime: 'application/avro', - }; - } - - if (this.checkString('FLIF')) { - return { - ext: 'flif', - mime: 'image/flif', - }; - } - - if (this.checkString('8BPS')) { - return { - ext: 'psd', - mime: 'image/vnd.adobe.photoshop', - }; - } - - // Musepack, SV8 - if (this.checkString('MPCK')) { - return { - ext: 'mpc', - mime: 'audio/x-musepack', - }; - } - - if (this.checkString('FORM')) { - return { - ext: 'aif', - mime: 'audio/aiff', - }; - } - - if (this.checkString('icns', {offset: 0})) { - return { - ext: 'icns', - mime: 'image/icns', - }; - } - - // Zip-based file formats - // Need to be before the `zip` check - if (this.check([0x50, 0x4B, 0x3, 0x4])) { // Local file header signature - let fileType; - const openXmlState = createOpenXmlZipDetectionState(); - - try { - await new ZipHandler(tokenizer).unzip(zipHeader => { - updateOpenXmlZipDetectionStateFromFilename(openXmlState, zipHeader.filename); - - const isOpenXmlContentTypesEntry = zipHeader.filename === '[Content_Types].xml'; - const openXmlFileTypeFromEntries = getOpenXmlFileTypeFromZipEntries(openXmlState); - if ( - !isOpenXmlContentTypesEntry - && openXmlFileTypeFromEntries - ) { - fileType = openXmlFileTypeFromEntries; - return { - stop: true, - }; - } - - switch (zipHeader.filename) { - case 'META-INF/mozilla.rsa': - fileType = { - ext: 'xpi', - mime: 'application/x-xpinstall', - }; - return { - stop: true, - }; - case 'META-INF/MANIFEST.MF': - fileType = { - ext: 'jar', - mime: 'application/java-archive', - }; - return { - stop: true, - }; - case 'mimetype': - if (!canReadZipEntryForDetection(zipHeader, maximumZipTextEntrySizeInBytes)) { - return {}; - } - - return { - async handler(fileData) { - // Use TextDecoder to decode the UTF-8 encoded data - const mimeType = new TextDecoder('utf-8').decode(fileData).trim(); - fileType = getFileTypeFromMimeType(mimeType); - }, - stop: true, - }; - - case '[Content_Types].xml': { - openXmlState.hasContentTypesEntry = true; - - if (!canReadZipEntryForDetection(zipHeader, maximumZipTextEntrySizeInBytes)) { - openXmlState.hasUnparseableContentTypes = true; - return {}; - } - - openXmlState.isParsingContentTypes = true; - return { - async handler(fileData) { - // Use TextDecoder to decode the UTF-8 encoded data - const xmlContent = new TextDecoder('utf-8').decode(fileData); - const mimeType = getOpenXmlMimeTypeFromContentTypesXml(xmlContent); - if (mimeType) { - fileType = getFileTypeFromMimeType(mimeType); - } - - openXmlState.hasParsedContentTypesEntry = true; - openXmlState.isParsingContentTypes = false; - }, - stop: true, - }; - } - - default: - if (/classes\d*\.dex/.test(zipHeader.filename)) { - fileType = { - ext: 'apk', - mime: 'application/vnd.android.package-archive', - }; - return {stop: true}; - } - - return {}; - } - }); - } catch (error) { - if (!isRecoverableZipError(error)) { - throw error; - } - - if (openXmlState.isParsingContentTypes) { - openXmlState.isParsingContentTypes = false; - openXmlState.hasUnparseableContentTypes = true; - } - } - - return fileType ?? getOpenXmlFileTypeFromZipEntries(openXmlState) ?? { - ext: 'zip', - mime: 'application/zip', - }; - } - - if (this.checkString('OggS')) { - // This is an OGG container - await tokenizer.ignore(28); - const type = new Uint8Array(8); - await tokenizer.readBuffer(type); - - // Needs to be before `ogg` check - if (_check(type, [0x4F, 0x70, 0x75, 0x73, 0x48, 0x65, 0x61, 0x64])) { - return { - ext: 'opus', - mime: 'audio/ogg; codecs=opus', - }; - } - - // If ' theora' in header. - if (_check(type, [0x80, 0x74, 0x68, 0x65, 0x6F, 0x72, 0x61])) { - return { - ext: 'ogv', - mime: 'video/ogg', - }; - } - - // If '\x01video' in header. - if (_check(type, [0x01, 0x76, 0x69, 0x64, 0x65, 0x6F, 0x00])) { - return { - ext: 'ogm', - mime: 'video/ogg', - }; - } - - // If ' FLAC' in header https://xiph.org/flac/faq.html - if (_check(type, [0x7F, 0x46, 0x4C, 0x41, 0x43])) { - return { - ext: 'oga', - mime: 'audio/ogg', - }; - } - - // 'Speex ' in header https://en.wikipedia.org/wiki/Speex - if (_check(type, [0x53, 0x70, 0x65, 0x65, 0x78, 0x20, 0x20])) { - return { - ext: 'spx', - mime: 'audio/ogg', - }; - } - - // If '\x01vorbis' in header - if (_check(type, [0x01, 0x76, 0x6F, 0x72, 0x62, 0x69, 0x73])) { - return { - ext: 'ogg', - mime: 'audio/ogg', - }; - } - - // Default OGG container https://www.iana.org/assignments/media-types/application/ogg - return { - ext: 'ogx', - mime: 'application/ogg', - }; - } - - if ( - this.check([0x50, 0x4B]) - && (this.buffer[2] === 0x3 || this.buffer[2] === 0x5 || this.buffer[2] === 0x7) - && (this.buffer[3] === 0x4 || this.buffer[3] === 0x6 || this.buffer[3] === 0x8) - ) { - return { - ext: 'zip', - mime: 'application/zip', - }; - } - - if (this.checkString('MThd')) { - return { - ext: 'mid', - mime: 'audio/midi', - }; - } - - if ( - this.checkString('wOFF') - && ( - this.check([0x00, 0x01, 0x00, 0x00], {offset: 4}) - || this.checkString('OTTO', {offset: 4}) - ) - ) { - return { - ext: 'woff', - mime: 'font/woff', - }; - } - - if ( - this.checkString('wOF2') - && ( - this.check([0x00, 0x01, 0x00, 0x00], {offset: 4}) - || this.checkString('OTTO', {offset: 4}) - ) - ) { - return { - ext: 'woff2', - mime: 'font/woff2', - }; - } - - if (this.check([0xD4, 0xC3, 0xB2, 0xA1]) || this.check([0xA1, 0xB2, 0xC3, 0xD4])) { - return { - ext: 'pcap', - mime: 'application/vnd.tcpdump.pcap', - }; - } - - // Sony DSD Stream File (DSF) - if (this.checkString('DSD ')) { - return { - ext: 'dsf', - mime: 'audio/x-dsf', // Non-standard - }; - } - - if (this.checkString('LZIP')) { - return { - ext: 'lz', - mime: 'application/x-lzip', - }; - } - - if (this.checkString('fLaC')) { - return { - ext: 'flac', - mime: 'audio/flac', - }; - } - - if (this.check([0x42, 0x50, 0x47, 0xFB])) { - return { - ext: 'bpg', - mime: 'image/bpg', - }; - } - - if (this.checkString('wvpk')) { - return { - ext: 'wv', - mime: 'audio/wavpack', - }; - } - - if (this.checkString('%PDF')) { - // Assume this is just a normal PDF - return { - ext: 'pdf', - mime: 'application/pdf', - }; - } - - if (this.check([0x00, 0x61, 0x73, 0x6D])) { - return { - ext: 'wasm', - mime: 'application/wasm', - }; - } - - // TIFF, little-endian type - if (this.check([0x49, 0x49])) { - const fileType = await this.readTiffHeader(false); - if (fileType) { - return fileType; - } - } - - // TIFF, big-endian type - if (this.check([0x4D, 0x4D])) { - const fileType = await this.readTiffHeader(true); - if (fileType) { - return fileType; - } - } - - if (this.checkString('MAC ')) { - return { - ext: 'ape', - mime: 'audio/ape', - }; - } - - // https://github.com/file/file/blob/master/magic/Magdir/matroska - if (this.check([0x1A, 0x45, 0xDF, 0xA3])) { // Root element: EBML - async function readField() { - const msb = await tokenizer.peekNumber(Token.UINT8); - let mask = 0x80; - let ic = 0; // 0 = A, 1 = B, 2 = C, 3 = D - - while ((msb & mask) === 0 && mask !== 0) { - ++ic; - mask >>= 1; - } - - const id = new Uint8Array(ic + 1); - await safeReadBuffer(tokenizer, id, undefined, { - maximumLength: id.length, - reason: 'EBML field', - }); - return id; - } - - async function readElement() { - const idField = await readField(); - const lengthField = await readField(); - - lengthField[0] ^= 0x80 >> (lengthField.length - 1); - const nrLength = Math.min(6, lengthField.length); // JavaScript can max read 6 bytes integer - - const idView = new DataView(idField.buffer); - const lengthView = new DataView(lengthField.buffer, lengthField.length - nrLength, nrLength); - - return { - id: getUintBE(idView), - len: getUintBE(lengthView), - }; - } - - async function readChildren(children) { - let ebmlElementCount = 0; - while (children > 0) { - ebmlElementCount++; - if (ebmlElementCount > maximumEbmlElementCount) { - return; - } - - const previousPosition = tokenizer.position; - const element = await readElement(); - - if (element.id === 0x42_82) { - // `DocType` is a short string ("webm", "matroska", ...), reject implausible lengths to avoid large allocations. - if (element.len > maximumEbmlDocumentTypeSizeInBytes) { - return; - } - - const documentTypeLength = getSafeBound(element.len, maximumEbmlDocumentTypeSizeInBytes, 'EBML DocType'); - const rawValue = await tokenizer.readToken(new Token.StringType(documentTypeLength)); - return rawValue.replaceAll(/\00.*$/g, ''); // Return DocType - } - - if ( - hasUnknownFileSize(tokenizer) - && ( - !Number.isFinite(element.len) - || element.len < 0 - || element.len > maximumEbmlElementPayloadSizeInBytes - ) - ) { - return; - } - - await safeIgnore(tokenizer, element.len, { - maximumLength: hasUnknownFileSize(tokenizer) ? maximumEbmlElementPayloadSizeInBytes : tokenizer.fileInfo.size, - reason: 'EBML payload', - }); // ignore payload - --children; - - // Safeguard against malformed files: bail if the position did not advance. - if (tokenizer.position <= previousPosition) { - return; - } - } - } - - const rootElement = await readElement(); - const documentType = await readChildren(rootElement.len); - - switch (documentType) { - case 'webm': - return { - ext: 'webm', - mime: 'video/webm', - }; - - case 'matroska': - return { - ext: 'mkv', - mime: 'video/matroska', - }; - - default: - return; - } - } - - if (this.checkString('SQLi')) { - return { - ext: 'sqlite', - mime: 'application/x-sqlite3', - }; - } - - if (this.check([0x4E, 0x45, 0x53, 0x1A])) { - return { - ext: 'nes', - mime: 'application/x-nintendo-nes-rom', - }; - } - - if (this.checkString('Cr24')) { - return { - ext: 'crx', - mime: 'application/x-google-chrome-extension', - }; - } - - if ( - this.checkString('MSCF') - || this.checkString('ISc(') - ) { - return { - ext: 'cab', - mime: 'application/vnd.ms-cab-compressed', - }; - } - - if (this.check([0xED, 0xAB, 0xEE, 0xDB])) { - return { - ext: 'rpm', - mime: 'application/x-rpm', - }; - } - - if (this.check([0xC5, 0xD0, 0xD3, 0xC6])) { - return { - ext: 'eps', - mime: 'application/eps', - }; - } - - if (this.check([0x28, 0xB5, 0x2F, 0xFD])) { - return { - ext: 'zst', - mime: 'application/zstd', - }; - } - - if (this.check([0x7F, 0x45, 0x4C, 0x46])) { - return { - ext: 'elf', - mime: 'application/x-elf', - }; - } - - if (this.check([0x21, 0x42, 0x44, 0x4E])) { - return { - ext: 'pst', - mime: 'application/vnd.ms-outlook', - }; - } - - if (this.checkString('PAR1') || this.checkString('PARE')) { - return { - ext: 'parquet', - mime: 'application/vnd.apache.parquet', - }; - } - - if (this.checkString('ttcf')) { - return { - ext: 'ttc', - mime: 'font/collection', - }; - } - - if ( - this.check([0xFE, 0xED, 0xFA, 0xCE]) // 32-bit, big-endian - || this.check([0xFE, 0xED, 0xFA, 0xCF]) // 64-bit, big-endian - || this.check([0xCE, 0xFA, 0xED, 0xFE]) // 32-bit, little-endian - || this.check([0xCF, 0xFA, 0xED, 0xFE]) // 64-bit, little-endian - ) { - return { - ext: 'macho', - mime: 'application/x-mach-binary', - }; - } - - if (this.check([0x04, 0x22, 0x4D, 0x18])) { - return { - ext: 'lz4', - mime: 'application/x-lz4', // Invented by us - }; - } - - if (this.checkString('regf')) { - return { - ext: 'dat', - mime: 'application/x-ft-windows-registry-hive', - }; - } - - // SPSS Statistical Data File - if (this.checkString('$FL2') || this.checkString('$FL3')) { - return { - ext: 'sav', - mime: 'application/x-spss-sav', - }; - } - - // -- 5-byte signatures -- - - if (this.check([0x4F, 0x54, 0x54, 0x4F, 0x00])) { - return { - ext: 'otf', - mime: 'font/otf', - }; - } - - if (this.checkString('#!AMR')) { - return { - ext: 'amr', - mime: 'audio/amr', - }; - } - - if (this.checkString('{\\rtf')) { - return { - ext: 'rtf', - mime: 'application/rtf', - }; - } - - if (this.check([0x46, 0x4C, 0x56, 0x01])) { - return { - ext: 'flv', - mime: 'video/x-flv', - }; - } - - if (this.checkString('IMPM')) { - return { - ext: 'it', - mime: 'audio/x-it', - }; - } - - if ( - this.checkString('-lh0-', {offset: 2}) - || this.checkString('-lh1-', {offset: 2}) - || this.checkString('-lh2-', {offset: 2}) - || this.checkString('-lh3-', {offset: 2}) - || this.checkString('-lh4-', {offset: 2}) - || this.checkString('-lh5-', {offset: 2}) - || this.checkString('-lh6-', {offset: 2}) - || this.checkString('-lh7-', {offset: 2}) - || this.checkString('-lzs-', {offset: 2}) - || this.checkString('-lz4-', {offset: 2}) - || this.checkString('-lz5-', {offset: 2}) - || this.checkString('-lhd-', {offset: 2}) - ) { - return { - ext: 'lzh', - mime: 'application/x-lzh-compressed', - }; - } - - // MPEG program stream (PS or MPEG-PS) - if (this.check([0x00, 0x00, 0x01, 0xBA])) { - // MPEG-PS, MPEG-1 Part 1 - if (this.check([0x21], {offset: 4, mask: [0xF1]})) { - return { - ext: 'mpg', // May also be .ps, .mpeg - mime: 'video/MP1S', - }; - } - - // MPEG-PS, MPEG-2 Part 1 - if (this.check([0x44], {offset: 4, mask: [0xC4]})) { - return { - ext: 'mpg', // May also be .mpg, .m2p, .vob or .sub - mime: 'video/MP2P', - }; - } - } - - if (this.checkString('ITSF')) { - return { - ext: 'chm', - mime: 'application/vnd.ms-htmlhelp', - }; - } - - if (this.check([0xCA, 0xFE, 0xBA, 0xBE])) { - // Java bytecode and Mach-O universal binaries have the same magic number. - // We disambiguate based on the next 4 bytes, as done by `file`. - // See https://github.com/file/file/blob/master/magic/Magdir/cafebabe - const machOArchitectureCount = Token.UINT32_BE.get(this.buffer, 4); - const javaClassFileMajorVersion = Token.UINT16_BE.get(this.buffer, 6); - - if (machOArchitectureCount > 0 && machOArchitectureCount <= 30) { - return { - ext: 'macho', - mime: 'application/x-mach-binary', - }; - } - - if (javaClassFileMajorVersion > 30) { - return { - ext: 'class', - mime: 'application/java-vm', - }; - } - } - - if (this.checkString('.RMF')) { - return { - ext: 'rm', - mime: 'application/vnd.rn-realmedia', - }; - } - - // -- 5-byte signatures -- - - if (this.checkString('DRACO')) { - return { - ext: 'drc', - mime: 'application/vnd.google.draco', // Invented by us - }; - } - - // -- 6-byte signatures -- - - if (this.check([0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00])) { - return { - ext: 'xz', - mime: 'application/x-xz', - }; - } - - if (this.checkString('= 1000 && version <= 1050) { - return { - ext: 'dwg', - mime: 'image/vnd.dwg', - }; - } - } - - if (this.checkString('070707')) { - return { - ext: 'cpio', - mime: 'application/x-cpio', - }; - } - - // -- 7-byte signatures -- - - if (this.checkString('BLENDER')) { - return { - ext: 'blend', - mime: 'application/x-blender', - }; - } - - if (this.checkString('!')) { - await tokenizer.ignore(8); - const string = await tokenizer.readToken(new Token.StringType(13, 'ascii')); - if (string === 'debian-binary') { - return { - ext: 'deb', - mime: 'application/x-deb', - }; - } - - return { - ext: 'ar', - mime: 'application/x-unix-archive', - }; - } - - if ( - this.checkString('WEBVTT') - && ( - // One of LF, CR, tab, space, or end of file must follow "WEBVTT" per the spec (see `fixture/fixture-vtt-*.vtt` for examples). Note that `\0` is technically the null character (there is no such thing as an EOF character). However, checking for `\0` gives us the same result as checking for the end of the stream. - (['\n', '\r', '\t', ' ', '\0'].some(char7 => this.checkString(char7, {offset: 6})))) - ) { - return { - ext: 'vtt', - mime: 'text/vtt', - }; - } - - // -- 8-byte signatures -- - - if (this.check([0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A])) { - const pngFileType = { - ext: 'png', - mime: 'image/png', - }; - - const apngFileType = { - ext: 'apng', - mime: 'image/apng', - }; - - // APNG format (https://wiki.mozilla.org/APNG_Specification) - // 1. Find the first IDAT (image data) chunk (49 44 41 54) - // 2. Check if there is an "acTL" chunk before the IDAT one (61 63 54 4C) - - // Offset calculated as follows: - // - 8 bytes: PNG signature - // - 4 (length) + 4 (chunk type) + 13 (chunk data) + 4 (CRC): IHDR chunk - - await tokenizer.ignore(8); // ignore PNG signature - - async function readChunkHeader() { - return { - length: await tokenizer.readToken(Token.INT32_BE), - type: await tokenizer.readToken(new Token.StringType(4, 'latin1')), - }; - } - - const isUnknownPngStream = hasUnknownFileSize(tokenizer); - const pngScanStart = tokenizer.position; - let pngChunkCount = 0; - do { - pngChunkCount++; - if (pngChunkCount > maximumPngChunkCount) { - break; - } - - if (hasExceededUnknownSizeScanBudget(tokenizer, pngScanStart, maximumPngChunkSizeInBytes)) { - break; - } - - const previousPosition = tokenizer.position; - const chunk = await readChunkHeader(); - if (chunk.length < 0) { - return; // Invalid chunk length - } - - switch (chunk.type) { - case 'IDAT': - return pngFileType; - case 'acTL': - return apngFileType; - default: - if ( - isUnknownPngStream - && chunk.length > maximumPngChunkSizeInBytes - ) { - // Avoid huge attacker-controlled skips when probing unknown-size streams. - return; - } - - try { - await safeIgnore(tokenizer, chunk.length + 4, { - maximumLength: isUnknownPngStream ? maximumPngChunkSizeInBytes + 4 : tokenizer.fileInfo.size, - reason: 'PNG chunk payload', - }); // Ignore chunk-data + CRC - } catch (error) { - if ( - !isUnknownPngStream - && ( - error instanceof ParserHardLimitError - || error instanceof strtok3.EndOfStreamError - ) - ) { - return pngFileType; - } - - throw error; - } - } - - // Safeguard against malformed files: bail if the position did not advance. - if (tokenizer.position <= previousPosition) { - break; - } - } while (tokenizer.position + 8 < tokenizer.fileInfo.size); - - return pngFileType; - } - - if (this.check([0x41, 0x52, 0x52, 0x4F, 0x57, 0x31, 0x00, 0x00])) { - return { - ext: 'arrow', - mime: 'application/vnd.apache.arrow.file', - }; - } - - if (this.check([0x67, 0x6C, 0x54, 0x46, 0x02, 0x00, 0x00, 0x00])) { - return { - ext: 'glb', - mime: 'model/gltf-binary', - }; - } - - // `mov` format variants - if ( - this.check([0x66, 0x72, 0x65, 0x65], {offset: 4}) // `free` - || this.check([0x6D, 0x64, 0x61, 0x74], {offset: 4}) // `mdat` MJPEG - || this.check([0x6D, 0x6F, 0x6F, 0x76], {offset: 4}) // `moov` - || this.check([0x77, 0x69, 0x64, 0x65], {offset: 4}) // `wide` - ) { - return { - ext: 'mov', - mime: 'video/quicktime', - }; - } - - // -- 9-byte signatures -- - - if (this.check([0x49, 0x49, 0x52, 0x4F, 0x08, 0x00, 0x00, 0x00, 0x18])) { - return { - ext: 'orf', - mime: 'image/x-olympus-orf', - }; - } - - if (this.checkString('gimp xcf ')) { - return { - ext: 'xcf', - mime: 'image/x-xcf', - }; - } - - // File Type Box (https://en.wikipedia.org/wiki/ISO_base_media_file_format) - // It's not required to be first, but it's recommended to be. Almost all ISO base media files start with `ftyp` box. - // `ftyp` box must contain a brand major identifier, which must consist of ISO 8859-1 printable characters. - // Here we check for 8859-1 printable characters (for simplicity, it's a mask which also catches one non-printable character). - if ( - this.checkString('ftyp', {offset: 4}) - && (this.buffer[8] & 0x60) !== 0x00 // Brand major, first character ASCII? - ) { - // They all can have MIME `video/mp4` except `application/mp4` special-case which is hard to detect. - // For some cases, we're specific, everything else falls to `video/mp4` with `mp4` extension. - const brandMajor = new Token.StringType(4, 'latin1').get(this.buffer, 8).replace('\0', ' ').trim(); - switch (brandMajor) { - case 'avif': - case 'avis': - return {ext: 'avif', mime: 'image/avif'}; - case 'mif1': - return {ext: 'heic', mime: 'image/heif'}; - case 'msf1': - return {ext: 'heic', mime: 'image/heif-sequence'}; - case 'heic': - case 'heix': - return {ext: 'heic', mime: 'image/heic'}; - case 'hevc': - case 'hevx': - return {ext: 'heic', mime: 'image/heic-sequence'}; - case 'qt': - return {ext: 'mov', mime: 'video/quicktime'}; - case 'M4V': - case 'M4VH': - case 'M4VP': - return {ext: 'm4v', mime: 'video/x-m4v'}; - case 'M4P': - return {ext: 'm4p', mime: 'video/mp4'}; - case 'M4B': - return {ext: 'm4b', mime: 'audio/mp4'}; - case 'M4A': - return {ext: 'm4a', mime: 'audio/x-m4a'}; - case 'F4V': - return {ext: 'f4v', mime: 'video/mp4'}; - case 'F4P': - return {ext: 'f4p', mime: 'video/mp4'}; - case 'F4A': - return {ext: 'f4a', mime: 'audio/mp4'}; - case 'F4B': - return {ext: 'f4b', mime: 'audio/mp4'}; - case 'crx': - return {ext: 'cr3', mime: 'image/x-canon-cr3'}; - default: - if (brandMajor.startsWith('3g')) { - if (brandMajor.startsWith('3g2')) { - return {ext: '3g2', mime: 'video/3gpp2'}; - } - - return {ext: '3gp', mime: 'video/3gpp'}; - } - - return {ext: 'mp4', mime: 'video/mp4'}; - } - } - - // -- 10-byte signatures -- - - if (this.checkString('REGEDIT4\r\n')) { - return { - ext: 'reg', - mime: 'application/x-ms-regedit', - }; - } - - // -- 12-byte signatures -- - - // RIFF file format which might be AVI, WAV, QCP, etc - if (this.check([0x52, 0x49, 0x46, 0x46])) { - if (this.checkString('WEBP', {offset: 8})) { - return { - ext: 'webp', - mime: 'image/webp', - }; - } - - if (this.check([0x41, 0x56, 0x49], {offset: 8})) { - return { - ext: 'avi', - mime: 'video/vnd.avi', - }; - } - - if (this.check([0x57, 0x41, 0x56, 0x45], {offset: 8})) { - return { - ext: 'wav', - mime: 'audio/wav', - }; - } - - // QLCM, QCP file - if (this.check([0x51, 0x4C, 0x43, 0x4D], {offset: 8})) { - return { - ext: 'qcp', - mime: 'audio/qcelp', - }; - } - } - - if (this.check([0x49, 0x49, 0x55, 0x00, 0x18, 0x00, 0x00, 0x00, 0x88, 0xE7, 0x74, 0xD8])) { - return { - ext: 'rw2', - mime: 'image/x-panasonic-rw2', - }; - } - - // ASF_Header_Object first 80 bytes - if (this.check([0x30, 0x26, 0xB2, 0x75, 0x8E, 0x66, 0xCF, 0x11, 0xA6, 0xD9])) { - let isMalformedAsf = false; - try { - async function readHeader() { - const guid = new Uint8Array(16); - await safeReadBuffer(tokenizer, guid, undefined, { - maximumLength: guid.length, - reason: 'ASF header GUID', - }); - return { - id: guid, - size: Number(await tokenizer.readToken(Token.UINT64_LE)), - }; - } - - await safeIgnore(tokenizer, 30, { - maximumLength: 30, - reason: 'ASF header prelude', - }); - const isUnknownFileSize = hasUnknownFileSize(tokenizer); - const asfHeaderScanStart = tokenizer.position; - let asfHeaderObjectCount = 0; - while (tokenizer.position + 24 < tokenizer.fileInfo.size) { - asfHeaderObjectCount++; - if (asfHeaderObjectCount > maximumAsfHeaderObjectCount) { - break; - } - - if (hasExceededUnknownSizeScanBudget(tokenizer, asfHeaderScanStart, maximumUntrustedSkipSizeInBytes)) { - break; - } - - const previousPosition = tokenizer.position; - const header = await readHeader(); - let payload = header.size - 24; - if ( - !Number.isFinite(payload) - || payload < 0 - ) { - isMalformedAsf = true; - break; - } - - if (_check(header.id, [0x91, 0x07, 0xDC, 0xB7, 0xB7, 0xA9, 0xCF, 0x11, 0x8E, 0xE6, 0x00, 0xC0, 0x0C, 0x20, 0x53, 0x65])) { - // Sync on Stream-Properties-Object (B7DC0791-A9B7-11CF-8EE6-00C00C205365) - const typeId = new Uint8Array(16); - payload -= await safeReadBuffer(tokenizer, typeId, undefined, { - maximumLength: typeId.length, - reason: 'ASF stream type GUID', - }); - - if (_check(typeId, [0x40, 0x9E, 0x69, 0xF8, 0x4D, 0x5B, 0xCF, 0x11, 0xA8, 0xFD, 0x00, 0x80, 0x5F, 0x5C, 0x44, 0x2B])) { - // Found audio: - return { - ext: 'asf', - mime: 'audio/x-ms-asf', - }; - } - - if (_check(typeId, [0xC0, 0xEF, 0x19, 0xBC, 0x4D, 0x5B, 0xCF, 0x11, 0xA8, 0xFD, 0x00, 0x80, 0x5F, 0x5C, 0x44, 0x2B])) { - // Found video: - return { - ext: 'asf', - mime: 'video/x-ms-asf', - }; - } - - break; - } - - await safeIgnore(tokenizer, payload, { - maximumLength: isUnknownFileSize ? maximumUntrustedSkipSizeInBytes : tokenizer.fileInfo.size, - reason: 'ASF header payload', - }); - - // Safeguard against malformed files: break if the position did not advance. - if (tokenizer.position <= previousPosition) { - isMalformedAsf = true; - break; - } - } - } catch (error) { - if ( - error instanceof strtok3.EndOfStreamError - || error instanceof ParserHardLimitError - ) { - if (hasUnknownFileSize(tokenizer)) { - isMalformedAsf = true; - } - } else { - throw error; - } - } - - if (isMalformedAsf) { - return; - } - - // Default to ASF generic extension - return { - ext: 'asf', - mime: 'application/vnd.ms-asf', - }; - } - - if (this.check([0xAB, 0x4B, 0x54, 0x58, 0x20, 0x31, 0x31, 0xBB, 0x0D, 0x0A, 0x1A, 0x0A])) { - return { - ext: 'ktx', - mime: 'image/ktx', - }; - } - - if ((this.check([0x7E, 0x10, 0x04]) || this.check([0x7E, 0x18, 0x04])) && this.check([0x30, 0x4D, 0x49, 0x45], {offset: 4})) { - return { - ext: 'mie', - mime: 'application/x-mie', - }; - } - - if (this.check([0x27, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], {offset: 2})) { - return { - ext: 'shp', - mime: 'application/x-esri-shape', - }; - } - - if (this.check([0xFF, 0x4F, 0xFF, 0x51])) { - return { - ext: 'j2c', - mime: 'image/j2c', - }; - } - - if (this.check([0x00, 0x00, 0x00, 0x0C, 0x6A, 0x50, 0x20, 0x20, 0x0D, 0x0A, 0x87, 0x0A])) { - // JPEG-2000 family - - await tokenizer.ignore(20); - const type = await tokenizer.readToken(new Token.StringType(4, 'ascii')); - switch (type) { - case 'jp2 ': - return { - ext: 'jp2', - mime: 'image/jp2', - }; - case 'jpx ': - return { - ext: 'jpx', - mime: 'image/jpx', - }; - case 'jpm ': - return { - ext: 'jpm', - mime: 'image/jpm', - }; - case 'mjp2': - return { - ext: 'mj2', - mime: 'image/mj2', - }; - default: - return; - } - } - - if ( - this.check([0xFF, 0x0A]) - || this.check([0x00, 0x00, 0x00, 0x0C, 0x4A, 0x58, 0x4C, 0x20, 0x0D, 0x0A, 0x87, 0x0A]) - ) { - return { - ext: 'jxl', - mime: 'image/jxl', - }; - } - - if (this.check([0xFE, 0xFF])) { // UTF-16-BOM-BE - if (this.checkString('= 16) { // Rough & quick check Pickle/ASAR - const jsonSize = new DataView(this.buffer.buffer).getUint32(12, true); - - if (jsonSize > 12 && this.buffer.length >= jsonSize + 16) { - try { - const header = new TextDecoder().decode(this.buffer.subarray(16, jsonSize + 16)); - const json = JSON.parse(header); - // Check if Pickle is ASAR - if (json.files) { // Final check, assuring Pickle/ASAR format - return { - ext: 'asar', - mime: 'application/x-asar', - }; - } - } catch {} - } - } - - if (this.check([0x06, 0x0E, 0x2B, 0x34, 0x02, 0x05, 0x01, 0x01, 0x0D, 0x01, 0x02, 0x01, 0x01, 0x02])) { - return { - ext: 'mxf', - mime: 'application/mxf', - }; - } - - if (this.checkString('SCRM', {offset: 44})) { - return { - ext: 's3m', - mime: 'audio/x-s3m', - }; - } - - // Raw MPEG-2 transport stream (188-byte packets) - if (this.check([0x47]) && this.check([0x47], {offset: 188})) { - return { - ext: 'mts', - mime: 'video/mp2t', - }; - } - - // Blu-ray Disc Audio-Video (BDAV) MPEG-2 transport stream has 4-byte TP_extra_header before each 188-byte packet - if (this.check([0x47], {offset: 4}) && this.check([0x47], {offset: 196})) { - return { - ext: 'mts', - mime: 'video/mp2t', - }; - } - - if (this.check([0x42, 0x4F, 0x4F, 0x4B, 0x4D, 0x4F, 0x42, 0x49], {offset: 60})) { - return { - ext: 'mobi', - mime: 'application/x-mobipocket-ebook', - }; - } - - if (this.check([0x44, 0x49, 0x43, 0x4D], {offset: 128})) { - return { - ext: 'dcm', - mime: 'application/dicom', - }; - } - - if (this.check([0x4C, 0x00, 0x00, 0x00, 0x01, 0x14, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46])) { - return { - ext: 'lnk', - mime: 'application/x.ms.shortcut', // Invented by us - }; - } - - if (this.check([0x62, 0x6F, 0x6F, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x61, 0x72, 0x6B, 0x00, 0x00, 0x00, 0x00])) { - return { - ext: 'alias', - mime: 'application/x.apple.alias', // Invented by us - }; - } - - if (this.checkString('Kaydara FBX Binary \u0000')) { - return { - ext: 'fbx', - mime: 'application/x.autodesk.fbx', // Invented by us - }; - } - - if ( - this.check([0x4C, 0x50], {offset: 34}) - && ( - this.check([0x00, 0x00, 0x01], {offset: 8}) - || this.check([0x01, 0x00, 0x02], {offset: 8}) - || this.check([0x02, 0x00, 0x02], {offset: 8}) - ) - ) { - return { - ext: 'eot', - mime: 'application/vnd.ms-fontobject', - }; - } - - if (this.check([0x06, 0x06, 0xED, 0xF5, 0xD8, 0x1D, 0x46, 0xE5, 0xBD, 0x31, 0xEF, 0xE7, 0xFE, 0x74, 0xB7, 0x1D])) { - return { - ext: 'indd', - mime: 'application/x-indesign', - }; - } - - // -- 16-byte signatures -- - - // JMP files - check for both Little Endian and Big Endian signatures - if (this.check([0xFF, 0xFF, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00]) - || this.check([0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x01, 0x00, 0x01])) { - return { - ext: 'jmp', - mime: 'application/x-jmp-data', - }; - } - - // Increase sample size from 256 to 512 - await tokenizer.peekBuffer(this.buffer, {length: Math.min(512, tokenizer.fileInfo.size), mayBeLess: true}); - - // Requires a buffer size of 512 bytes - if ((this.checkString('ustar', {offset: 257}) && (this.checkString('\0', {offset: 262}) || this.checkString(' ', {offset: 262}))) - || (this.check([0, 0, 0, 0, 0, 0], {offset: 257}) && tarHeaderChecksumMatches(this.buffer))) { - return { - ext: 'tar', - mime: 'application/x-tar', - }; - } - - if (this.check([0xFF, 0xFE])) { // UTF-16-BOM-LE - const encoding = 'utf-16le'; - if (this.checkString(' { - this.buffer = new Uint8Array(reasonableDetectionSizeInBytes); - const fileSize = getKnownFileSizeOrMaximum(tokenizer.fileInfo.size); - - // Read initial sample size of 8 bytes - await tokenizer.peekBuffer(this.buffer, {length: Math.min(8, fileSize), mayBeLess: true}); - - if ( - this.check([0x0, 0x0, 0x1, 0xBA]) - || this.check([0x0, 0x0, 0x1, 0xB3]) - ) { - return { - ext: 'mpg', - mime: 'video/mpeg', - }; - } - - if (this.check([0x00, 0x01, 0x00, 0x00, 0x00])) { - return { - ext: 'ttf', - mime: 'font/ttf', - }; - } - - if (this.check([0x00, 0x00, 0x01, 0x00])) { - return { - ext: 'ico', - mime: 'image/x-icon', - }; - } - - if (this.check([0x00, 0x00, 0x02, 0x00])) { - return { - ext: 'cur', - mime: 'image/x-icon', - }; - } - - // Adjust buffer to `mpegOffsetTolerance` - await tokenizer.peekBuffer(this.buffer, {length: Math.min(2 + this.options.mpegOffsetTolerance, fileSize), mayBeLess: true}); - - // Check MPEG 1 or 2 Layer 3 header, or 'layer 0' for ADTS (MPEG sync-word 0xFFE) - if (this.buffer.length >= (2 + this.options.mpegOffsetTolerance)) { - for (let depth = 0; depth <= this.options.mpegOffsetTolerance; ++depth) { - const type = this.scanMpeg(depth); - if (type) { - return type; - } - } - } - }; - - async readTiffTag(bigEndian) { - const tagId = await this.tokenizer.readToken(bigEndian ? Token.UINT16_BE : Token.UINT16_LE); - await this.tokenizer.ignore(10); - switch (tagId) { - case 50_341: - return { - ext: 'arw', - mime: 'image/x-sony-arw', - }; - case 50_706: - return { - ext: 'dng', - mime: 'image/x-adobe-dng', - }; - default: - } - } - - async readTiffIFD(bigEndian) { - const numberOfTags = await this.tokenizer.readToken(bigEndian ? Token.UINT16_BE : Token.UINT16_LE); - if (numberOfTags > maximumTiffTagCount) { - return; - } - - if ( - hasUnknownFileSize(this.tokenizer) - && (2 + (numberOfTags * 12)) > maximumTiffIfdOffsetInBytes - ) { - return; - } - - for (let n = 0; n < numberOfTags; ++n) { - const fileType = await this.readTiffTag(bigEndian); - if (fileType) { - return fileType; - } - } - } - - async readTiffHeader(bigEndian) { - const tiffFileType = { - ext: 'tif', - mime: 'image/tiff', - }; - - const version = (bigEndian ? Token.UINT16_BE : Token.UINT16_LE).get(this.buffer, 2); - const ifdOffset = (bigEndian ? Token.UINT32_BE : Token.UINT32_LE).get(this.buffer, 4); - - if (version === 42) { - // TIFF file header - if (ifdOffset >= 6) { - if (this.checkString('CR', {offset: 8})) { - return { - ext: 'cr2', - mime: 'image/x-canon-cr2', - }; - } - - if (ifdOffset >= 8) { - const someId1 = (bigEndian ? Token.UINT16_BE : Token.UINT16_LE).get(this.buffer, 8); - const someId2 = (bigEndian ? Token.UINT16_BE : Token.UINT16_LE).get(this.buffer, 10); - - if ( - (someId1 === 0x1C && someId2 === 0xFE) - || (someId1 === 0x1F && someId2 === 0x0B)) { - return { - ext: 'nef', - mime: 'image/x-nikon-nef', - }; - } - } - } - - const maximumTiffOffset = hasUnknownFileSize(this.tokenizer) ? maximumTiffIfdOffsetInBytes : this.tokenizer.fileInfo.size; - - try { - await safeIgnore(this.tokenizer, ifdOffset, { - maximumLength: maximumTiffOffset, - reason: 'TIFF IFD offset', - }); - } catch (error) { - if (error instanceof strtok3.EndOfStreamError) { - return; - } - - throw error; - } - - let fileType; - try { - fileType = await this.readTiffIFD(bigEndian); - } catch (error) { - if (error instanceof strtok3.EndOfStreamError) { - return; - } - - throw error; - } - - return fileType ?? tiffFileType; - } - - if (version === 43) { // Big TIFF file header - return tiffFileType; - } - } - - /** - Scan check MPEG 1 or 2 Layer 3 header, or 'layer 0' for ADTS (MPEG sync-word 0xFFE). - - @param offset - Offset to scan for sync-preamble. - @returns {{ext: string, mime: string}} - */ - scanMpeg(offset) { - if (this.check([0xFF, 0xE0], {offset, mask: [0xFF, 0xE0]})) { - if (this.check([0x10], {offset: offset + 1, mask: [0x16]})) { - // Check for (ADTS) MPEG-2 - if (this.check([0x08], {offset: offset + 1, mask: [0x08]})) { - return { - ext: 'aac', - mime: 'audio/aac', - }; - } - - // Must be (ADTS) MPEG-4 - return { - ext: 'aac', - mime: 'audio/aac', - }; - } - - // MPEG 1 or 2 Layer 3 header - // Check for MPEG layer 3 - if (this.check([0x02], {offset: offset + 1, mask: [0x06]})) { - return { - ext: 'mp3', - mime: 'audio/mpeg', - }; - } - - // Check for MPEG layer 2 - if (this.check([0x04], {offset: offset + 1, mask: [0x06]})) { - return { - ext: 'mp2', - mime: 'audio/mpeg', - }; - } - - // Check for MPEG layer 1 - if (this.check([0x06], {offset: offset + 1, mask: [0x06]})) { - return { - ext: 'mp1', - mime: 'audio/mpeg', - }; - } - } - } -} - -export const supportedExtensions = new Set(extensions); -export const supportedMimeTypes = new Set(mimeTypes); diff --git a/node_modules/file-type/index.d.ts b/node_modules/file-type/index.d.ts deleted file mode 100644 index c2b7432..0000000 --- a/node_modules/file-type/index.d.ts +++ /dev/null @@ -1,98 +0,0 @@ -/** -Typings for Node.js specific entry point. -*/ - -import type {Readable as NodeReadableStream} from 'node:stream'; -import type {AnyWebByteStream} from 'strtok3'; -import { - type FileTypeResult, - type StreamOptions, - type AnyWebReadableStream, - type AnyWebReadableByteStreamWithFileType, - type FileTypeOptions, - FileTypeParser as DefaultFileTypeParser, -} from './core.js'; - -export type ReadableStreamWithFileType = NodeReadableStream & { - readonly fileType?: FileTypeResult; -}; - -/** -Extending `FileTypeParser` with Node.js engine specific functions. -*/ -export declare class FileTypeParser extends DefaultFileTypeParser { - /** - @param stream - Node.js `stream.Readable` or web `ReadableStream`. - */ - fromStream(stream: AnyWebReadableStream | NodeReadableStream): Promise; - - fromFile(filePath: string): Promise; - - /** - Works the same way as {@link fileTypeStream}, additionally taking into account custom detectors (if any were provided to the constructor). - */ - toDetectionStream(readableStream: NodeReadableStream, options?: FileTypeOptions & StreamOptions): Promise; - toDetectionStream(webStream: AnyWebReadableStream, options?: FileTypeOptions & StreamOptions): Promise; -} - -/** -Detect the file type of a file path. - -The file type is detected by checking the [magic number](https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the file. - -This is for Node.js only. - -To read from a [`File`](https://developer.mozilla.org/docs/Web/API/File), see `fileTypeFromBlob()`. - -The file type is detected by checking the [magic number](https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the buffer. - -@returns The detected file type and MIME type or `undefined` when there is no match. -*/ -export function fileTypeFromFile(filePath: string, options?: FileTypeOptions): Promise; - -/** -Detect the file type of a [web `ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream). - -If the engine is Node.js, this may also be a [Node.js `stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable). - -Direct support for Node.js streams will be dropped in the future, when Node.js streams can be converted to Web streams (see [`toWeb()`](https://nodejs.org/api/stream.html#streamreadabletowebstreamreadable-options)). - -The file type is detected by checking the [magic number](https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the buffer. - -@param stream - A [web `ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) or [Node.js `stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable) streaming a file to examine. -@param options - Options to override default behaviour. - @returns A `Promise` for an object with the detected file type, or `undefined` when there is no match. -*/ -export function fileTypeFromStream(stream: AnyWebReadableStream | NodeReadableStream, options?: FileTypeOptions): Promise; - -/** -Returns a `Promise` which resolves to the original readable stream argument, but with an added `fileType` property, which is an object like the one returned from `fileTypeFromFile()`. - -This method can be handy to put in between a stream, but it comes with a price. -Internally `stream()` builds up a buffer of `sampleSize` bytes, used as a sample, to determine the file type. -The sample size impacts the file detection resolution. -A smaller sample size will result in lower probability of the best file type detection. - -@param readableStream - A [web `ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) or [Node.js `stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable), streaming a file to examine. -@param options - May be used to override the default sample size. -@returns A `Promise` which resolves to the original readable stream argument, but with an added `fileType` property, which is an object like the one returned from `fileTypeFromFile()`. - -@example -``` -import got from 'got'; -import {fileTypeStream} from 'file-type'; - -const url = 'https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg'; - -const stream1 = got.stream(url); -const stream2 = await fileTypeStream(stream1, {sampleSize: 1024}); - -if (stream2.fileType?.mime === 'image/jpeg') { - // stream2 can be used to stream the JPEG image (from the very beginning of the stream) -} -``` -*/ -export function fileTypeStream(readableStream: NodeReadableStream, options?: FileTypeOptions & StreamOptions): Promise; -export function fileTypeStream(webStream: AnyWebByteStream, options?: FileTypeOptions & StreamOptions): Promise; - -export * from './core.js'; diff --git a/node_modules/file-type/index.js b/node_modules/file-type/index.js deleted file mode 100644 index c6f61b8..0000000 --- a/node_modules/file-type/index.js +++ /dev/null @@ -1,110 +0,0 @@ -/** -Node.js specific entry point. -*/ - -import {ReadableStream as WebReadableStream} from 'node:stream/web'; -import {pipeline, PassThrough, Readable} from 'node:stream'; -import * as strtok3 from 'strtok3'; -import { - FileTypeParser as DefaultFileTypeParser, - reasonableDetectionSizeInBytes, - normalizeSampleSize, -} from './core.js'; - -function isTokenizerStreamBoundsError(error) { - if ( - !(error instanceof RangeError) - || error.message !== 'offset is out of bounds' - || typeof error.stack !== 'string' - ) { - return false; - } - - // Some malformed or non-byte Node.js streams can surface this tokenizer-internal range error. - // Note: This stack-trace check is fragile and may break if strtok3 restructures its internals. - return /strtok3[/\\]lib[/\\]stream[/\\]/.test(error.stack); -} - -export class FileTypeParser extends DefaultFileTypeParser { - async fromStream(stream) { - const tokenizer = await (stream instanceof WebReadableStream ? strtok3.fromWebStream(stream, this.getTokenizerOptions()) : strtok3.fromStream(stream, this.getTokenizerOptions())); - try { - return await super.fromTokenizer(tokenizer); - } catch (error) { - if (isTokenizerStreamBoundsError(error)) { - return; - } - - throw error; - } finally { - await tokenizer.close(); - } - } - - async fromFile(path) { - const tokenizer = await strtok3.fromFile(path); - try { - return await super.fromTokenizer(tokenizer); - } finally { - await tokenizer.close(); - } - } - - async toDetectionStream(readableStream, options = {}) { - if (!(readableStream instanceof Readable)) { - return super.toDetectionStream(readableStream, options); - } - - const sampleSize = normalizeSampleSize(options.sampleSize ?? reasonableDetectionSizeInBytes); - - return new Promise((resolve, reject) => { - readableStream.on('error', reject); - - readableStream.once('readable', () => { - (async () => { - try { - // Set up output stream - const pass = new PassThrough(); - const outputStream = pipeline ? pipeline(readableStream, pass, () => {}) : readableStream.pipe(pass); - - // Read the input stream and detect the filetype - const chunk = readableStream.read(sampleSize) ?? readableStream.read() ?? new Uint8Array(0); - try { - pass.fileType = await this.fromBuffer(chunk); - } catch (error) { - if (error instanceof strtok3.EndOfStreamError) { - pass.fileType = undefined; - } else { - reject(error); - } - } - - resolve(outputStream); - } catch (error) { - reject(error); - } - })(); - }); - }); - } -} - -export async function fileTypeFromFile(path, options) { - return (new FileTypeParser(options)).fromFile(path, options); -} - -export async function fileTypeFromStream(stream, options) { - return (new FileTypeParser(options)).fromStream(stream); -} - -export async function fileTypeStream(readableStream, options = {}) { - return new FileTypeParser(options).toDetectionStream(readableStream, options); -} - -export { - fileTypeFromTokenizer, - fileTypeFromBuffer, - fileTypeFromBlob, - supportedMimeTypes, - supportedExtensions, -} from './core.js'; diff --git a/node_modules/file-type/license b/node_modules/file-type/license deleted file mode 100644 index fa7ceba..0000000 --- a/node_modules/file-type/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/file-type/package.json b/node_modules/file-type/package.json deleted file mode 100644 index 135d28f..0000000 --- a/node_modules/file-type/package.json +++ /dev/null @@ -1,290 +0,0 @@ -{ - "name": "file-type", - "version": "21.3.2", - "description": "Detect the file type of a file, stream, or data", - "license": "MIT", - "repository": "sindresorhus/file-type", - "funding": "https://github.com/sindresorhus/file-type?sponsor=1", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "type": "module", - "exports": { - ".": { - "node": { - "types": "./index.d.ts", - "import": "./index.js", - "module-sync": "./index.js" - }, - "default": { - "types": "./core.d.ts", - "import": "./core.js", - "module-sync": "./core.js" - } - }, - "./core": { - "types": "./core.d.ts", - "default": "./core.js" - }, - "./node": { - "types": "./index.d.ts", - "default": "./index.js" - } - }, - "sideEffects": false, - "engines": { - "node": ">=20" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts", - "core.js", - "core.d.ts", - "supported.js", - "util.js" - ], - "keywords": [ - "mime", - "file", - "type", - "magic", - "archive", - "image", - "img", - "pic", - "picture", - "flash", - "photo", - "video", - "detect", - "check", - "is", - "exif", - "elf", - "macho", - "exe", - "binary", - "buffer", - "uint8array", - "jpg", - "png", - "apng", - "gif", - "webp", - "flif", - "xcf", - "cr2", - "cr3", - "orf", - "arw", - "dng", - "nef", - "rw2", - "raf", - "tif", - "bmp", - "icns", - "jxr", - "psd", - "indd", - "zip", - "tar", - "rar", - "gz", - "bz2", - "7z", - "dmg", - "mp4", - "mid", - "mkv", - "webm", - "mov", - "avi", - "mpg", - "mp2", - "mp3", - "m4a", - "ogg", - "opus", - "flac", - "wav", - "amr", - "pdf", - "epub", - "mobi", - "swf", - "rtf", - "woff", - "woff2", - "eot", - "ttf", - "otf", - "ttc", - "ico", - "flv", - "ps", - "xz", - "sqlite", - "xpi", - "cab", - "deb", - "ar", - "rpm", - "Z", - "lz", - "cfb", - "mxf", - "mts", - "wasm", - "webassembly", - "blend", - "bpg", - "docx", - "pptx", - "xlsx", - "3gp", - "j2c", - "jp2", - "jpm", - "jpx", - "mj2", - "aif", - "odt", - "ods", - "odp", - "xml", - "heic", - "ics", - "glb", - "pcap", - "dsf", - "lnk", - "alias", - "voc", - "ac3", - "3g2", - "m4b", - "m4p", - "m4v", - "f4a", - "f4b", - "f4p", - "f4v", - "mie", - "qcp", - "asf", - "ogv", - "ogm", - "oga", - "spx", - "ogx", - "ape", - "wv", - "cur", - "nes", - "crx", - "ktx", - "dcm", - "mpc", - "arrow", - "shp", - "aac", - "mp1", - "it", - "s3m", - "xm", - "skp", - "avif", - "eps", - "lzh", - "pgp", - "asar", - "stl", - "chm", - "3mf", - "zst", - "jxl", - "vcf", - "jls", - "pst", - "dwg", - "parquet", - "class", - "arj", - "cpio", - "ace", - "avro", - "icc", - "fbx", - "vsdx", - "vtt", - "apk", - "drc", - "lz4", - "potx", - "xltx", - "dotx", - "xltm", - "ots", - "odg", - "otg", - "otp", - "ott", - "xlsm", - "docm", - "dotm", - "potm", - "pptm", - "jar", - "jmp", - "rm", - "sav", - "ppsm", - "ppsx", - "tar.gz", - "reg", - "dat" - ], - "dependencies": { - "@tokenizer/inflate": "^0.4.1", - "strtok3": "^10.3.4", - "token-types": "^6.1.1", - "uint8array-extras": "^1.4.0" - }, - "devDependencies": { - "@tokenizer/token": "^0.3.0", - "@types/node": "^25.3.3", - "ava": "^7.0.0", - "commonmark": "^0.31.2", - "get-stream": "^9.0.1", - "noop-stream": "^1.0.0", - "tsd": "^0.33.0", - "xo": "^0.60.0" - }, - "xo": { - "envs": [ - "node", - "browser" - ], - "ignores": [ - "fixture" - ], - "rules": { - "no-inner-declarations": "warn", - "no-await-in-loop": "warn", - "no-bitwise": "off", - "@typescript-eslint/no-unsafe-assignment": "off", - "unicorn/text-encoding-identifier-case": "off", - "unicorn/switch-case-braces": "off", - "unicorn/prefer-top-level-await": "off" - } - }, - "ava": { - "serial": true - } -} diff --git a/node_modules/file-type/readme.md b/node_modules/file-type/readme.md deleted file mode 100644 index cd1327c..0000000 --- a/node_modules/file-type/readme.md +++ /dev/null @@ -1,664 +0,0 @@ -

- file-type logo -

- -> Detect the file type of a file, stream, or data - -The file type is detected by checking the [magic number](https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the buffer. - -This package is for detecting binary-based file formats, not text-based formats like `.txt`, `.csv`, `.svg`, etc. - -We accept contributions for commonly used modern file formats, not historical or obscure ones. Open an issue first for discussion. - -## Install - -```sh -npm install file-type -``` - -**This package is an ESM package. Your project needs to be ESM too. [Read more](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c). For TypeScript + CommonJS, see [`load-esm`](https://github.com/Borewit/load-esm).** If you use it with Webpack, you need the latest Webpack version and ensure you configure it correctly for ESM. - -> [!IMPORTANT] -> File type detection is based on binary signatures (magic numbers) and is a best-effort hint. It does not guarantee the file is actually of that type or that the file is valid/not malformed. -> -> Robustness against malformed input is best-effort. When processing untrusted files on a server, enforce a reasonable file size limit and use a worker thread with a timeout (e.g., [`make-asynchronous`](https://github.com/sindresorhus/make-asynchronous)). These are not considered security issues in this package. - -## Usage - -### Node.js - -Determine file type from a file: - -```js -import {fileTypeFromFile} from 'file-type'; - -console.log(await fileTypeFromFile('Unicorn.png')); -//=> {ext: 'png', mime: 'image/png'} -``` - -Determine file type from a Uint8Array/ArrayBuffer, which may be a portion of the beginning of a file: - -```js -import {fileTypeFromBuffer} from 'file-type'; -import {readChunk} from 'read-chunk'; - -const buffer = await readChunk('Unicorn.png', {length: 4100}); - -console.log(await fileTypeFromBuffer(buffer)); -//=> {ext: 'png', mime: 'image/png'} -``` - -Determine file type from a stream: - -```js -import fs from 'node:fs'; -import {fileTypeFromStream} from 'file-type'; - -const stream = fs.createReadStream('Unicorn.mp4'); - -console.log(await fileTypeFromStream(stream)); -//=> {ext: 'mp4', mime: 'video/mp4'} -``` - -The stream method can also be used to read from a remote location: - -```js -import got from 'got'; -import {fileTypeFromStream} from 'file-type'; - -const url = 'https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg'; - -const stream = got.stream(url); - -console.log(await fileTypeFromStream(stream)); -//=> {ext: 'jpg', mime: 'image/jpeg'} -``` - -Another stream example: - -```js -import stream from 'node:stream'; -import fs from 'node:fs'; -import crypto from 'node:crypto'; -import {fileTypeStream} from 'file-type'; - -const read = fs.createReadStream('encrypted.enc'); -const decipher = crypto.createDecipheriv(alg, key, iv); - -const streamWithFileType = await fileTypeStream(stream.pipeline(read, decipher)); - -console.log(streamWithFileType.fileType); -//=> {ext: 'mov', mime: 'video/quicktime'} - -const write = fs.createWriteStream(`decrypted.${streamWithFileType.fileType.ext}`); -streamWithFileType.pipe(write); -``` - -### Browser - -```js -import {fileTypeFromStream} from 'file-type'; - -const url = 'https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg'; - -const response = await fetch(url); -const fileType = await fileTypeFromStream(response.body); - -console.log(fileType); -//=> {ext: 'jpg', mime: 'image/jpeg'} -``` - -## API - -### fileTypeFromBuffer(buffer, options) - -Detect the file type of a `Uint8Array`, or `ArrayBuffer`. - -The file type is detected by checking the [magic number](https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the buffer. - -If file access is available, it is recommended to use `fileTypeFromFile()` instead. - -Returns a `Promise` for an object with the detected file type: - -- `ext` - One of the [supported file types](#supported-file-types) -- `mime` - The [MIME type](https://en.wikipedia.org/wiki/Internet_media_type) - -Or `undefined` when there is no match. - -#### buffer - -Type: `Uint8Array | ArrayBuffer` - -A buffer representing file data. It works best if the buffer contains the entire file. It may work with a smaller portion as well. - -### fileTypeFromFile(filePath, options) - -Detect the file type of a file path. - -This is for Node.js only. - -To read from a [`File`](https://developer.mozilla.org/docs/Web/API/File), see [`fileTypeFromBlob()`](#filetypefromblobblob-options). - -The file type is detected by checking the [magic number](https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the buffer. - -Returns a `Promise` for an object with the detected file type: - -- `ext` - One of the [supported file types](#supported-file-types) -- `mime` - The [MIME type](https://en.wikipedia.org/wiki/Internet_media_type) - -Or `undefined` when there is no match. - -#### filePath - -Type: `string` - -The file path to parse. - -### fileTypeFromStream(stream) - -Detect the file type of a [web `ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream). - -If the engine is Node.js, this may also be a [Node.js `stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable). - -Direct support for Node.js streams will be dropped in the future, when Node.js streams can be converted to Web streams (see [`toWeb()`](https://nodejs.org/api/stream.html#streamreadabletowebstreamreadable-options)). - -The file type is detected by checking the [magic number](https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the buffer. - -Returns a `Promise` for an object with the detected file type: - -- `ext` - One of the [supported file types](#supported-file-types) -- `mime` - The [MIME type](https://en.wikipedia.org/wiki/Internet_media_type) - -Or `undefined` when there is no match. - -#### stream - -Type: [Web `ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) or [Node.js `stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable) - -A readable stream representing file data. - -### fileTypeFromBlob(blob, options) - -Detect the file type of a [`Blob`](https://developer.mozilla.org/docs/Web/API/Blob), - -> [!TIP] -> A [`File` object](https://developer.mozilla.org/docs/Web/API/File) is a `Blob` and can be passed in here. - -It will **stream** the underlying Blob. - -The file type is detected by checking the [magic number](https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the blob. - -Returns a `Promise` for an object with the detected file type: - -- `ext` - One of the [supported file types](#supported-file-types) -- `mime` - The [MIME type](https://en.wikipedia.org/wiki/Internet_media_type) - -Or `undefined` when there is no match. - -```js -import {fileTypeFromBlob} from 'file-type'; - -const blob = new Blob([''], { - type: 'text/plain', - endings: 'native' -}); - -console.log(await fileTypeFromBlob(blob)); -//=> {ext: 'txt', mime: 'text/plain'} -``` - -#### blob - -Type: [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) - -### fileTypeFromTokenizer(tokenizer, options) - -Detect the file type from an `ITokenizer` source. - -This method is used internally, but can also be used for a special "tokenizer" reader. - -A tokenizer propagates the internal read functions, allowing alternative transport mechanisms, to access files, to be implemented and used. - -Returns a `Promise` for an object with the detected file type: - -- `ext` - One of the [supported file types](#supported-file-types) -- `mime` - The [MIME type](https://en.wikipedia.org/wiki/Internet_media_type) - -Or `undefined` when there is no match. - -An example is [`@tokenizer/http`](https://github.com/Borewit/tokenizer-http), which requests data using [HTTP-range-requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests). A difference with a conventional stream and the [*tokenizer*](https://github.com/Borewit/strtok3#tokenizer), is that it can *ignore* (seek, fast-forward) in the stream. For example, you may only need and read the first 6 bytes, and the last 128 bytes, which may be an advantage in case reading the entire file would take longer. - -```js -import {makeTokenizer} from '@tokenizer/http'; -import {fileTypeFromTokenizer} from 'file-type'; - -const audioTrackUrl = 'https://test-audio.netlify.com/Various%20Artists%20-%202009%20-%20netBloc%20Vol%2024_%20tiuqottigeloot%20%5BMP3-V2%5D/01%20-%20Diablo%20Swing%20Orchestra%20-%20Heroines.mp3'; - -const httpTokenizer = await makeTokenizer(audioTrackUrl); -const fileType = await fileTypeFromTokenizer(httpTokenizer); - -console.log(fileType); -//=> {ext: 'mp3', mime: 'audio/mpeg'} -``` - -Or use [`@tokenizer/s3`](https://github.com/Borewit/tokenizer-s3) to determine the file type of a file stored on [Amazon S3](https://aws.amazon.com/s3): - -```js -import {S3Client} from '@aws-sdk/client-s3'; -import {makeChunkedTokenizerFromS3} from '@tokenizer/s3'; -import {fileTypeFromTokenizer} from 'file-type'; - -// Initialize the S3 client -// Initialize S3 client -const s3 = new S3Client(); - -// Initialize the S3 tokenizer. -const s3Tokenizer = await makeChunkedTokenizerFromS3(s3, { - Bucket: 'affectlab', - Key: '1min_35sec.mp4' -}); - -// Figure out what kind of file it is. -const fileType = await fileTypeFromTokenizer(s3Tokenizer); -console.log(fileType); -``` - -Note that only the minimum amount of data required to determine the file type is read (okay, just a bit extra to prevent too many fragmented reads). - -#### tokenizer - -Type: [`ITokenizer`](https://github.com/Borewit/strtok3#tokenizer) - -A file source implementing the [tokenizer interface](https://github.com/Borewit/strtok3#tokenizer). - -### fileTypeStream(webStream, options?) - -Returns a `Promise` which resolves to the original readable stream argument, but with an added `fileType` property, which is an object like the one returned from `fileTypeFromFile()`. - -This method can be handy to put in between a stream, but it comes with a price. -Internally `stream()` builds up a buffer of `sampleSize` bytes, used as a sample, to determine the file type. -The sample size impacts the file detection resolution. -A smaller sample size will result in lower probability of the best file type detection. - -**Note:** When using Node.js, a `stream.Readable` may be provided as well. - -#### readableStream - -Type: [`stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable) - -#### options - -Type: `object` - -Supports the following options in addition to the [general options](#options): - -##### sampleSize - -Type: `number`\ -Default: `4100` - -The sample size in bytes. - -#### Example - -```js -import got from 'got'; -import {fileTypeStream} from 'file-type'; - -const url = 'https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg'; - -const stream1 = got.stream(url); -const stream2 = await fileTypeStream(stream1, {sampleSize: 1024}); - -if (stream2.fileType?.mime === 'image/jpeg') { - // stream2 can be used to stream the JPEG image (from the very beginning of the stream) -} -``` - -#### readableStream - -Type: [`stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable) - -The input stream. - -### supportedExtensions - -Returns a `Set` of supported file extensions. - -### supportedMimeTypes - -Returns a `Set` of supported MIME types. - -### Options - -#### customDetectors - -Array of custom file type detectors to run before default detectors. - -For example: - -```js -import {fileTypeFromFile} from 'file-type'; -import {detectXml} from '@file-type/xml'; - -const fileType = await fileTypeFromFile('sample.kml', {customDetectors: [detectXml]}); -console.log(fileType); -``` - -#### mpegOffsetTolerance - -Default: `0` - -Specifies the byte tolerance for locating the first MPEG audio frame (e.g. `.mp1`, `.mp2`, `.mp3`, `.aac`). - -Allows detection to handle slight sync offsets between the expected and actual frame start. Common in malformed or incorrectly muxed files, which, while technically invalid, do occur in the wild. - -A tolerance of 10 bytes covers most cases. - -## Custom detectors - -Custom file type detectors are plugins designed to extend the default detection capabilities. -They allow support for uncommon file types, non-binary formats, or customized detection behavior. - -Detectors can be added via the constructor options or by modifying `FileTypeParser#detectors` directly. -Detectors provided through the constructor are executed before the default ones. - -Detectors can be added via the constructor options or by directly modifying `FileTypeParser#detectors`. - -### Example adding a detector - -For example: - -```js -import {FileTypeParser} from 'file-type'; -import {detectXml} from '@file-type/xml'; - -const parser = new FileTypeParser({customDetectors: [detectXml]}); -const fileType = await parser.fromFile('sample.kml'); -console.log(fileType); -``` - -### Available third-party file-type detectors - -- [@file-type/av](https://github.com/Borewit/file-type-av): Improves detection of audio and video file formats, with accurate differentiation between the two -- [@file-type/cfbf](https://github.com/Borewit/file-type-cfbf): Detects Compound File Binary Format (CFBF) based formats, such as Office 97–2003 documents and `.msi`. -- [@file-type/pdf](https://github.com/Borewit/file-type-pdf): Detects PDF based file types, such as Adobe Illustrator -- [@file-type/xml](https://github.com/Borewit/file-type-xml): Detects common XML file types, such as GLM, KML, MusicXML, RSS, SVG, and XHTML - -### Detector execution flow - -If a detector returns `undefined`, the following rules apply: - -1. **No Tokenizer Interaction**: If the detector does not modify the tokenizer's position, the next detector in the sequence is executed. -2. **Tokenizer Interaction**: If the detector modifies the tokenizer's position (`tokenizer.position` is advanced), no further detectors are executed. In this case, the file type remains `undefined`, as subsequent detectors cannot evaluate the content. This is an exceptional scenario, as it prevents any other detectors from determining the file type. - -### Writing your own custom detector - -Below is an example of a custom detector array. This can be passed to the `FileTypeParser` via the `fileTypeOptions` argument. - -```js -import {FileTypeParser} from 'file-type'; - -const unicornDetector = { - id: 'unicorn', // May be used to recognize the detector in the detector list - async detect(tokenizer) { - const unicornHeader = [85, 78, 73, 67, 79, 82, 78]; // "UNICORN" in ASCII decimal - - const buffer = new Uint8Array(unicornHeader.length); - await tokenizer.peekBuffer(buffer, {length: unicornHeader.length, mayBeLess: true}); - if (unicornHeader.every((value, index) => value === buffer[index])) { - return {ext: 'unicorn', mime: 'application/unicorn'}; - } - - return undefined; - } -} - -const buffer = new Uint8Array([85, 78, 73, 67, 79, 82, 78]); -const parser = new FileTypeParser({customDetectors: [unicornDetector]}); -const fileType = await parser.fromBuffer(buffer); -console.log(fileType); // {ext: 'unicorn', mime: 'application/unicorn'} -``` - -```ts -/** -@param tokenizer - The [tokenizer](https://github.com/Borewit/strtok3#tokenizer) used to read file content. -@param fileType - The file type detected by standard or previous custom detectors, or `undefined` if no match is found. -@returns The detected file type, or `undefined` if no match is found. -*/ -export type Detector = (tokenizer: ITokenizer, fileType?: FileTypeResult) => Promise; -``` - -## Abort signal - -Some async operations can be aborted by passing an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) to the `FileTypeParser` constructor. - -```js -import {FileTypeParser} from 'file-type'; - -const abortController = new AbortController() - -const parser = new FileTypeParser({abortSignal: abortController.signal}); - -const promise = parser.fromStream(blob.stream()); - -abortController.abort(); // Abort file-type reading from the Blob stream. -``` - -## Supported file types - -- [`3g2`](https://en.wikipedia.org/wiki/3GP_and_3G2#3G2) - Multimedia container format defined by the 3GPP2 for 3G CDMA2000 multimedia services -- [`3gp`](https://en.wikipedia.org/wiki/3GP_and_3G2#3GP) - Multimedia container format defined by the Third Generation Partnership Project (3GPP) for 3G UMTS multimedia services -- [`3mf`](https://en.wikipedia.org/wiki/3D_Manufacturing_Format) - 3D Manufacturing Format -- [`7z`](https://en.wikipedia.org/wiki/7z) - 7-Zip archive -- [`Z`](https://fileinfo.com/extension/z) - Unix Compressed File -- [`aac`](https://en.wikipedia.org/wiki/Advanced_Audio_Coding) - Advanced Audio Coding -- [`ac3`](https://www.atsc.org/standard/a522012-digital-audio-compression-ac-3-e-ac-3-standard-12172012/) - ATSC A/52 Audio File -- [`ace`](https://en.wikipedia.org/wiki/ACE_(compressed_file_format)) - ACE archive -- [`aif`](https://en.wikipedia.org/wiki/Audio_Interchange_File_Format) - Audio Interchange file -- [`alias`](https://en.wikipedia.org/wiki/Alias_%28Mac_OS%29) - macOS Alias file -- [`amr`](https://en.wikipedia.org/wiki/Adaptive_Multi-Rate_audio_codec) - Adaptive Multi-Rate audio codec -- [`ape`](https://en.wikipedia.org/wiki/Monkey%27s_Audio) - Monkey's Audio -- [`apk`](https://en.wikipedia.org/wiki/Apk_(file_format)) - Android package format -- [`apng`](https://en.wikipedia.org/wiki/APNG) - Animated Portable Network Graphics -- [`ar`](https://en.wikipedia.org/wiki/Ar_(Unix)) - Archive file -- [`arj`](https://en.wikipedia.org/wiki/ARJ) - Archive file -- [`arrow`](https://arrow.apache.org) - Columnar format for tables of data -- [`arw`](https://en.wikipedia.org/wiki/Raw_image_format#ARW) - Sony Alpha Raw image file -- [`asar`](https://github.com/electron/asar#format) - Archive format primarily used to enclose Electron applications -- [`asf`](https://en.wikipedia.org/wiki/Advanced_Systems_Format) - Advanced Systems Format -- [`avi`](https://en.wikipedia.org/wiki/Audio_Video_Interleave) - Audio Video Interleave file -- [`avif`](https://en.wikipedia.org/wiki/AV1#AV1_Image_File_Format_(AVIF)) - AV1 Image File Format -- [`avro`](https://en.wikipedia.org/wiki/Apache_Avro#Avro_Object_Container_File) - Object container file developed by Apache Avro -- [`blend`](https://wiki.blender.org/index.php/Dev:Source/Architecture/File_Format) - Blender project -- [`bmp`](https://en.wikipedia.org/wiki/BMP_file_format) - Bitmap image file -- [`bpg`](https://bellard.org/bpg/) - Better Portable Graphics file -- [`bz2`](https://en.wikipedia.org/wiki/Bzip2) - Archive file -- [`cab`](https://en.wikipedia.org/wiki/Cabinet_(file_format)) - Cabinet file -- [`cfb`](https://en.wikipedia.org/wiki/Compound_File_Binary_Format) - Compound File Binary Format -- [`chm`](https://en.wikipedia.org/wiki/Microsoft_Compiled_HTML_Help) - Microsoft Compiled HTML Help -- [`class`](https://en.wikipedia.org/wiki/Java_class_file) - Java class file -- [`cpio`](https://en.wikipedia.org/wiki/Cpio) - Cpio archive -- [`cr2`](https://fileinfo.com/extension/cr2) - Canon Raw image file (v2) -- [`cr3`](https://fileinfo.com/extension/cr3) - Canon Raw image file (v3) -- [`crx`](https://developer.chrome.com/extensions/crx) - Google Chrome extension -- [`cur`](https://en.wikipedia.org/wiki/ICO_(file_format)) - Icon file -- [`dat`](https://en.wikipedia.org/wiki/Windows_Registry) - Windows registry hive file -- [`dcm`](https://en.wikipedia.org/wiki/DICOM#Data_format) - DICOM Image File -- [`deb`](https://en.wikipedia.org/wiki/Deb_(file_format)) - Debian package -- [`dmg`](https://en.wikipedia.org/wiki/Apple_Disk_Image) - Apple Disk Image -- [`dng`](https://en.wikipedia.org/wiki/Digital_Negative) - Adobe Digital Negative image file -- [`docm`](https://en.wikipedia.org/wiki/List_of_Microsoft_Office_filename_extensions) - Microsoft Word macro-enabled document -- [`docx`](https://en.wikipedia.org/wiki/Office_Open_XML) - Microsoft Word document -- [`dotm`](https://en.wikipedia.org/wiki/List_of_Microsoft_Office_filename_extensions) - Microsoft Word macro-enabled template -- [`dotx`](https://en.wikipedia.org/wiki/List_of_Microsoft_Office_filename_extensions) - Microsoft Word template -- [`drc`](https://en.wikipedia.org/wiki/Zstandard) - Google's Draco 3D Data Compression -- [`dsf`](https://dsd-guide.com/sites/default/files/white-papers/DSFFileFormatSpec_E.pdf) - Sony DSD Stream File (DSF) -- [`dwg`](https://en.wikipedia.org/wiki/.dwg) - Autodesk CAD file -- [`elf`](https://en.wikipedia.org/wiki/Executable_and_Linkable_Format) - Unix Executable and Linkable Format -- [`eot`](https://en.wikipedia.org/wiki/Embedded_OpenType) - Embedded OpenType font -- [`eps`](https://en.wikipedia.org/wiki/Encapsulated_PostScript) - Encapsulated PostScript -- [`epub`](https://en.wikipedia.org/wiki/EPUB) - E-book file -- [`exe`](https://en.wikipedia.org/wiki/.exe) - Executable file -- [`f4a`](https://en.wikipedia.org/wiki/Flash_Video) - Audio-only ISO base media file format used by Adobe Flash Player -- [`f4b`](https://en.wikipedia.org/wiki/Flash_Video) - Audiobook and podcast ISO base media file format used by Adobe Flash Player -- [`f4p`](https://en.wikipedia.org/wiki/Flash_Video) - ISO base media file format protected by Adobe Access DRM used by Adobe Flash Player -- [`f4v`](https://en.wikipedia.org/wiki/Flash_Video) - ISO base media file format used by Adobe Flash Player -- [`fbx`](https://en.wikipedia.org/wiki/FBX) - Filmbox is a proprietary file format used to provide interoperability between digital content creation apps. -- [`flac`](https://en.wikipedia.org/wiki/FLAC) - Free Lossless Audio Codec -- [`flif`](https://en.wikipedia.org/wiki/Free_Lossless_Image_Format) - Free Lossless Image Format -- [`flv`](https://en.wikipedia.org/wiki/Flash_Video) - Flash video -- [`gif`](https://en.wikipedia.org/wiki/GIF) - Graphics Interchange Format -- [`glb`](https://github.com/KhronosGroup/glTF) - GL Transmission Format -- [`gz`](https://en.wikipedia.org/wiki/Gzip) - Archive file -- [`heic`](https://nokiatech.github.io/heif/technical.html) - High Efficiency Image File Format -- [`icc`](https://en.wikipedia.org/wiki/ICC_profile) - ICC Profile -- [`icns`](https://en.wikipedia.org/wiki/Apple_Icon_Image_format) - Apple Icon image -- [`ico`](https://en.wikipedia.org/wiki/ICO_(file_format)) - Windows icon file -- [`ics`](https://en.wikipedia.org/wiki/ICalendar#Data_format) - iCalendar -- [`indd`](https://en.wikipedia.org/wiki/Adobe_InDesign#File_format) - Adobe InDesign document -- [`it`](https://wiki.openmpt.org/Manual:_Module_formats#The_Impulse_Tracker_format_.28.it.29) - Audio module format: Impulse Tracker -- [`j2c`](https://en.wikipedia.org/wiki/JPEG_2000) - JPEG 2000 -- [`jar`](https://en.wikipedia.org/wiki/JAR_(file_format)) - Java archive -- [`jls`](https://en.wikipedia.org/wiki/Lossless_JPEG#JPEG-LS) - Lossless/near-lossless compression standard for continuous-tone images -- [`jmp`](https://en.wikipedia.org/wiki/JMP_(statistical_software)) - JMP data file format by SAS Institute -- [`jp2`](https://en.wikipedia.org/wiki/JPEG_2000) - JPEG 2000 -- [`jpg`](https://en.wikipedia.org/wiki/JPEG) - Joint Photographic Experts Group image -- [`jpm`](https://en.wikipedia.org/wiki/JPEG_2000) - JPEG 2000 -- [`jpx`](https://en.wikipedia.org/wiki/JPEG_2000) - JPEG 2000 -- [`jxl`](https://en.wikipedia.org/wiki/JPEG_XL) - JPEG XL image format -- [`jxr`](https://en.wikipedia.org/wiki/JPEG_XR) - Joint Photographic Experts Group extended range -- [`ktx`](https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/) - OpenGL and OpenGL ES textures -- [`lnk`](https://en.wikipedia.org/wiki/Shortcut_%28computing%29#Microsoft_Windows) - Microsoft Windows file shortcut -- [`lz`](https://en.wikipedia.org/wiki/Lzip) - Archive file -- [`lz4`](https://en.wikipedia.org/wiki/LZ4_(compression_algorithm)) - Compressed archive created by one of a variety of LZ4 compression utilities -- [`lzh`](https://en.wikipedia.org/wiki/LHA_(file_format)) - LZH archive -- [`m4a`](https://en.wikipedia.org/wiki/M4A) - Audio-only MPEG-4 files -- [`m4b`](https://en.wikipedia.org/wiki/M4B) - Audiobook and podcast MPEG-4 files, which also contain metadata including chapter markers, images, and hyperlinks -- [`m4p`](https://en.wikipedia.org/wiki/MPEG-4_Part_14#Filename_extensions) - MPEG-4 files with audio streams encrypted by FairPlay Digital Rights Management as were sold through the iTunes Store -- [`m4v`](https://en.wikipedia.org/wiki/M4V) - Video container format developed by Apple, which is very similar to the MP4 format -- [`macho`](https://en.wikipedia.org/wiki/Mach-O) - Mach-O binary format -- [`mid`](https://en.wikipedia.org/wiki/MIDI) - Musical Instrument Digital Interface file -- [`mie`](https://en.wikipedia.org/wiki/Sidecar_file) - Dedicated meta information format which supports storage of binary as well as textual meta information -- [`mj2`](https://en.wikipedia.org/wiki/Motion_JPEG_2000) - Motion JPEG 2000 -- [`mkv`](https://en.wikipedia.org/wiki/Matroska) - Matroska video file -- [`mobi`](https://en.wikipedia.org/wiki/Mobipocket) - Mobipocket -- [`mov`](https://en.wikipedia.org/wiki/QuickTime_File_Format) - QuickTime video file -- [`mp1`](https://en.wikipedia.org/wiki/MPEG-1_Audio_Layer_I) - MPEG-1 Audio Layer I -- [`mp2`](https://en.wikipedia.org/wiki/MPEG-1_Audio_Layer_II) - MPEG-1 Audio Layer II -- [`mp3`](https://en.wikipedia.org/wiki/MP3) - Audio file -- [`mp4`](https://en.wikipedia.org/wiki/MPEG-4_Part_14#Filename_extensions) - MPEG-4 Part 14 video file -- [`mpc`](https://en.wikipedia.org/wiki/Musepack) - Musepack (SV7 & SV8) -- [`mpg`](https://en.wikipedia.org/wiki/MPEG-1) - MPEG-1 file -- [`mts`](https://en.wikipedia.org/wiki/.m2ts) - MPEG-2 Transport Stream, both raw and Blu-ray Disc Audio-Video (BDAV) versions -- [`mxf`](https://en.wikipedia.org/wiki/Material_Exchange_Format) - Material Exchange Format -- [`nef`](https://www.nikonusa.com/en/learn-and-explore/a/products-and-innovation/nikon-electronic-format-nef.html) - Nikon Electronic Format image file -- [`nes`](https://fileinfo.com/extension/nes) - Nintendo NES ROM -- [`odg`](https://en.wikipedia.org/wiki/OpenDocument) - OpenDocument for drawing -- [`odp`](https://en.wikipedia.org/wiki/OpenDocument) - OpenDocument for presentations -- [`ods`](https://en.wikipedia.org/wiki/OpenDocument) - OpenDocument for spreadsheets -- [`odt`](https://en.wikipedia.org/wiki/OpenDocument) - OpenDocument for word processing -- [`oga`](https://en.wikipedia.org/wiki/Ogg) - Audio file -- [`ogg`](https://en.wikipedia.org/wiki/Ogg) - Audio file -- [`ogm`](https://en.wikipedia.org/wiki/Ogg) - Audio file -- [`ogv`](https://en.wikipedia.org/wiki/Ogg) - Audio file -- [`ogx`](https://en.wikipedia.org/wiki/Ogg) - Audio file -- [`opus`](https://en.wikipedia.org/wiki/Opus_(audio_format)) - Audio file -- [`orf`](https://en.wikipedia.org/wiki/ORF_format) - Olympus Raw image file -- [`otf`](https://en.wikipedia.org/wiki/OpenType) - OpenType font -- [`otg`](https://en.wikipedia.org/wiki/OpenDocument_technical_specification#Templates) - OpenDocument template for drawing -- [`otp`](https://en.wikipedia.org/wiki/OpenDocument_technical_specification#Templates) - OpenDocument template for presentations -- [`ots`](https://en.wikipedia.org/wiki/OpenDocument_technical_specification#Templates) - OpenDocument template for spreadsheets -- [`ott`](https://en.wikipedia.org/wiki/OpenDocument_technical_specification#Templates) - OpenDocument template for word processing -- [`parquet`](https://en.wikipedia.org/wiki/Apache_Parquet) - Apache Parquet -- [`pcap`](https://wiki.wireshark.org/Development/LibpcapFileFormat) - Libpcap File Format -- [`pdf`](https://en.wikipedia.org/wiki/Portable_Document_Format) - Portable Document Format -- [`pgp`](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) - Pretty Good Privacy -- [`png`](https://en.wikipedia.org/wiki/Portable_Network_Graphics) - Portable Network Graphics -- [`potm`](https://en.wikipedia.org/wiki/List_of_Microsoft_Office_filename_extensions) - Microsoft PowerPoint macro-enabled template -- [`potx`](https://en.wikipedia.org/wiki/List_of_Microsoft_Office_filename_extensions) - Microsoft PowerPoint template -- [`ppsm`](https://en.wikipedia.org/wiki/List_of_Microsoft_Office_filename_extensions#PowerPoint) - Office PowerPoint 2007 macro-enabled slide show -- [`ppsx`](https://en.wikipedia.org/wiki/List_of_Microsoft_Office_filename_extensions#PowerPoint) - Office PowerPoint 2007 slide show -- [`pptm`](https://en.wikipedia.org/wiki/List_of_Microsoft_Office_filename_extensions) - Microsoft PowerPoint macro-enabled document -- [`pptx`](https://en.wikipedia.org/wiki/Office_Open_XML) - Microsoft PowerPoint document -- [`ps`](https://en.wikipedia.org/wiki/Postscript) - Postscript -- [`psd`](https://en.wikipedia.org/wiki/Adobe_Photoshop#File_format) - Adobe Photoshop document -- [`pst`](https://en.wikipedia.org/wiki/Personal_Storage_Table) - Personal Storage Table file -- [`qcp`](https://en.wikipedia.org/wiki/QCP) - Tagged and chunked data -- [`raf`](https://en.wikipedia.org/wiki/Raw_image_format) - Fujifilm RAW image file -- [`rar`](https://en.wikipedia.org/wiki/RAR_(file_format)) - Archive file -- [`reg`](https://en.wikipedia.org/wiki/Windows_Registry) - Windows registry (entries) file format -- [`rm`](https://en.wikipedia.org/wiki/RealMedia) - RealMedia -- [`rpm`](https://fileinfo.com/extension/rpm) - Red Hat Package Manager file -- [`rtf`](https://en.wikipedia.org/wiki/Rich_Text_Format) - Rich Text Format -- [`rw2`](https://en.wikipedia.org/wiki/Raw_image_format) - Panasonic RAW image file -- [`s3m`](https://wiki.openmpt.org/Manual:_Module_formats#The_ScreamTracker_3_format_.28.s3m.29) - Audio module format: ScreamTracker 3 -- [`sav`](https://en.wikipedia.org/wiki/SPSS) - SPSS Statistical Data File -- [`shp`](https://en.wikipedia.org/wiki/Shapefile) - Geospatial vector data format -- [`skp`](https://en.wikipedia.org/wiki/SketchUp) - SketchUp -- [`spx`](https://en.wikipedia.org/wiki/Ogg) - Audio file -- [`sqlite`](https://www.sqlite.org/fileformat2.html) - SQLite file -- [`stl`](https://en.wikipedia.org/wiki/STL_(file_format)) - Standard Tesselated Geometry File Format (ASCII only) -- [`swf`](https://en.wikipedia.org/wiki/SWF) - Adobe Flash Player file -- [`tar`](https://en.wikipedia.org/wiki/Tar_(computing)#File_format) - Tape archive or tarball -- [`tar.gz`](https://en.wikipedia.org/wiki/Gzip) - Gzipped tape archive (tarball) -- [`tif`](https://en.wikipedia.org/wiki/Tagged_Image_File_Format) - Tagged Image file -- [`ttc`](https://en.wikipedia.org/wiki/TrueType#TrueType_Collection) - TrueType Collection font -- [`ttf`](https://en.wikipedia.org/wiki/TrueType) - TrueType font -- [`vcf`](https://en.wikipedia.org/wiki/VCard) - vCard -- [`voc`](https://wiki.multimedia.cx/index.php/Creative_Voice) - Creative Voice File -- [`vsdx`](https://en.wikipedia.org/wiki/Microsoft_Visio) - Microsoft Visio File -- [`vtt`](https://en.wikipedia.org/wiki/WebVTT) - WebVTT File (for video captions) -- [`wasm`](https://en.wikipedia.org/wiki/WebAssembly) - WebAssembly intermediate compiled format -- [`wav`](https://en.wikipedia.org/wiki/WAV) - Waveform Audio file -- [`webm`](https://en.wikipedia.org/wiki/WebM) - Web video file -- [`webp`](https://en.wikipedia.org/wiki/WebP) - Web Picture format -- [`woff`](https://en.wikipedia.org/wiki/Web_Open_Font_Format) - Web Open Font Format -- [`woff2`](https://en.wikipedia.org/wiki/Web_Open_Font_Format) - Web Open Font Format -- [`wv`](https://en.wikipedia.org/wiki/WavPack) - WavPack -- [`xcf`](https://en.wikipedia.org/wiki/XCF_(file_format)) - eXperimental Computing Facility -- [`xlsm`](https://en.wikipedia.org/wiki/List_of_Microsoft_Office_filename_extensions) - Microsoft Excel macro-enabled document -- [`xlsx`](https://en.wikipedia.org/wiki/Office_Open_XML) - Microsoft Excel document -- [`xltm`](https://en.wikipedia.org/wiki/List_of_Microsoft_Office_filename_extensions) - Microsoft Excel macro-enabled template -- [`xltx`](https://en.wikipedia.org/wiki/List_of_Microsoft_Office_filename_extensions) - Microsoft Excel template -- [`xm`](https://wiki.openmpt.org/Manual:_Module_formats#The_FastTracker_2_format_.28.xm.29) - Audio module format: FastTracker 2 -- [`xml`](https://en.wikipedia.org/wiki/XML) - eXtensible Markup Language -- [`xpi`](https://en.wikipedia.org/wiki/XPInstall) - XPInstall file -- [`xz`](https://en.wikipedia.org/wiki/Xz) - Compressed file -- [`zip`](https://en.wikipedia.org/wiki/Zip_(file_format)) - Archive file -- [`zst`](https://en.wikipedia.org/wiki/Zstandard) - Archive file - -*[Pull requests](.github/pull_request_template.md) are welcome for additional commonly used file types.* - -The following file types will not be accepted, but most of them are supported by [third-party detector](#available-third-party-file-type-detectors) -- [MS-CFB: Microsoft Compound File Binary File Format based formats](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-cfb/53989ce4-7b05-4f8d-829b-d08d6148375b) - - `.doc` - Microsoft Word 97-2003 Document - - `.xls` - Microsoft Excel 97-2003 Document - - `.ppt` - Microsoft PowerPoint97-2003 Document - - `.msi` - Microsoft Windows Installer -- `.csv` - [Reason.](https://github.com/sindresorhus/file-type/issues/264#issuecomment-568439196) -- `.svg` - -#### tokenizer - -Type: [`ITokenizer`](https://github.com/Borewit/strtok3#tokenizer) - -Usable as source of the examined file. - -#### fileType - -Type: `FileTypeResult` - -An object having an `ext` (extension) and `mime` (mime type) property. - -Detected by the standard detections or a previous custom detection. Undefined if no matching fileTypeResult could be found. - -## Related - -- [file-type-cli](https://github.com/sindresorhus/file-type-cli) - CLI for this module -- [image-dimensions](https://github.com/sindresorhus/image-dimensions) - Get the dimensions of an image - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Borewit](https://github.com/Borewit) diff --git a/node_modules/file-type/supported.js b/node_modules/file-type/supported.js deleted file mode 100644 index c916afe..0000000 --- a/node_modules/file-type/supported.js +++ /dev/null @@ -1,360 +0,0 @@ -export const extensions = [ - 'jpg', - 'png', - 'apng', - 'gif', - 'webp', - 'flif', - 'xcf', - 'cr2', - 'cr3', - 'orf', - 'arw', - 'dng', - 'nef', - 'rw2', - 'raf', - 'tif', - 'bmp', - 'icns', - 'jxr', - 'psd', - 'indd', - 'zip', - 'tar', - 'rar', - 'gz', - 'bz2', - '7z', - 'dmg', - 'mp4', - 'mid', - 'mkv', - 'webm', - 'mov', - 'avi', - 'mpg', - 'mp2', - 'mp3', - 'm4a', - 'oga', - 'ogg', - 'ogv', - 'opus', - 'flac', - 'wav', - 'spx', - 'amr', - 'pdf', - 'epub', - 'elf', - 'macho', - 'exe', - 'swf', - 'rtf', - 'wasm', - 'woff', - 'woff2', - 'eot', - 'ttf', - 'otf', - 'ttc', - 'ico', - 'flv', - 'ps', - 'xz', - 'sqlite', - 'nes', - 'crx', - 'xpi', - 'cab', - 'deb', - 'ar', - 'rpm', - 'Z', - 'lz', - 'cfb', - 'mxf', - 'mts', - 'blend', - 'bpg', - 'docx', - 'pptx', - 'xlsx', - '3gp', - '3g2', - 'j2c', - 'jp2', - 'jpm', - 'jpx', - 'mj2', - 'aif', - 'qcp', - 'odt', - 'ods', - 'odp', - 'xml', - 'mobi', - 'heic', - 'cur', - 'ktx', - 'ape', - 'wv', - 'dcm', - 'ics', - 'glb', - 'pcap', - 'dsf', - 'lnk', - 'alias', - 'voc', - 'ac3', - 'm4v', - 'm4p', - 'm4b', - 'f4v', - 'f4p', - 'f4b', - 'f4a', - 'mie', - 'asf', - 'ogm', - 'ogx', - 'mpc', - 'arrow', - 'shp', - 'aac', - 'mp1', - 'it', - 's3m', - 'xm', - 'skp', - 'avif', - 'eps', - 'lzh', - 'pgp', - 'asar', - 'stl', - 'chm', - '3mf', - 'zst', - 'jxl', - 'vcf', - 'jls', - 'pst', - 'dwg', - 'parquet', - 'class', - 'arj', - 'cpio', - 'ace', - 'avro', - 'icc', - 'fbx', - 'vsdx', - 'vtt', - 'apk', - 'drc', - 'lz4', - 'potx', - 'xltx', - 'dotx', - 'xltm', - 'ott', - 'ots', - 'otp', - 'odg', - 'otg', - 'xlsm', - 'docm', - 'dotm', - 'potm', - 'pptm', - 'jar', - 'jmp', - 'rm', - 'sav', - 'ppsm', - 'ppsx', - 'tar.gz', - 'reg', - 'dat', -]; - -export const mimeTypes = [ - 'image/jpeg', - 'image/png', - 'image/gif', - 'image/webp', - 'image/flif', - 'image/x-xcf', - 'image/x-canon-cr2', - 'image/x-canon-cr3', - 'image/tiff', - 'image/bmp', - 'image/vnd.ms-photo', - 'image/vnd.adobe.photoshop', - 'application/x-indesign', - 'application/epub+zip', - 'application/x-xpinstall', - 'application/vnd.ms-powerpoint.slideshow.macroenabled.12', - 'application/vnd.oasis.opendocument.text', - 'application/vnd.oasis.opendocument.spreadsheet', - 'application/vnd.oasis.opendocument.presentation', - 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', - 'application/zip', - 'application/x-tar', - 'application/x-rar-compressed', - 'application/gzip', - 'application/x-bzip2', - 'application/x-7z-compressed', - 'application/x-apple-diskimage', - 'application/vnd.apache.arrow.file', - 'video/mp4', - 'audio/midi', - 'video/matroska', - 'video/webm', - 'video/quicktime', - 'video/vnd.avi', - 'audio/wav', - 'audio/qcelp', - 'audio/x-ms-asf', - 'video/x-ms-asf', - 'application/vnd.ms-asf', - 'video/mpeg', - 'video/3gpp', - 'audio/mpeg', - 'audio/mp4', // RFC 4337 - 'video/ogg', - 'audio/ogg', - 'audio/ogg; codecs=opus', - 'application/ogg', - 'audio/flac', - 'audio/ape', - 'audio/wavpack', - 'audio/amr', - 'application/pdf', - 'application/x-elf', - 'application/x-mach-binary', - 'application/x-msdownload', - 'application/x-shockwave-flash', - 'application/rtf', - 'application/wasm', - 'font/woff', - 'font/woff2', - 'application/vnd.ms-fontobject', - 'font/ttf', - 'font/otf', - 'font/collection', - 'image/x-icon', - 'video/x-flv', - 'application/postscript', - 'application/eps', - 'application/x-xz', - 'application/x-sqlite3', - 'application/x-nintendo-nes-rom', - 'application/x-google-chrome-extension', - 'application/vnd.ms-cab-compressed', - 'application/x-deb', - 'application/x-unix-archive', - 'application/x-rpm', - 'application/x-compress', - 'application/x-lzip', - 'application/x-cfb', - 'application/x-mie', - 'application/mxf', - 'video/mp2t', - 'application/x-blender', - 'image/bpg', - 'image/j2c', - 'image/jp2', - 'image/jpx', - 'image/jpm', - 'image/mj2', - 'audio/aiff', - 'application/xml', - 'application/x-mobipocket-ebook', - 'image/heif', - 'image/heif-sequence', - 'image/heic', - 'image/heic-sequence', - 'image/icns', - 'image/ktx', - 'application/dicom', - 'audio/x-musepack', - 'text/calendar', - 'text/vcard', - 'text/vtt', - 'model/gltf-binary', - 'application/vnd.tcpdump.pcap', - 'audio/x-dsf', // Non-standard - 'application/x.ms.shortcut', // Invented by us - 'application/x.apple.alias', // Invented by us - 'audio/x-voc', - 'audio/vnd.dolby.dd-raw', - 'audio/x-m4a', - 'image/apng', - 'image/x-olympus-orf', - 'image/x-sony-arw', - 'image/x-adobe-dng', - 'image/x-nikon-nef', - 'image/x-panasonic-rw2', - 'image/x-fujifilm-raf', - 'video/x-m4v', - 'video/3gpp2', - 'application/x-esri-shape', - 'audio/aac', - 'audio/x-it', - 'audio/x-s3m', - 'audio/x-xm', - 'video/MP1S', - 'video/MP2P', - 'application/vnd.sketchup.skp', - 'image/avif', - 'application/x-lzh-compressed', - 'application/pgp-encrypted', - 'application/x-asar', - 'model/stl', - 'application/vnd.ms-htmlhelp', - 'model/3mf', - 'image/jxl', - 'application/zstd', - 'image/jls', - 'application/vnd.ms-outlook', - 'image/vnd.dwg', - 'application/vnd.apache.parquet', - 'application/java-vm', - 'application/x-arj', - 'application/x-cpio', - 'application/x-ace-compressed', - 'application/avro', - 'application/vnd.iccprofile', - 'application/x.autodesk.fbx', // Invented by us - 'application/vnd.visio', - 'application/vnd.android.package-archive', - 'application/vnd.google.draco', // Invented by us - 'application/x-lz4', // Invented by us - 'application/vnd.openxmlformats-officedocument.presentationml.template', - 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', - 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', - 'application/vnd.ms-excel.template.macroenabled.12', - 'application/vnd.oasis.opendocument.text-template', - 'application/vnd.oasis.opendocument.spreadsheet-template', - 'application/vnd.oasis.opendocument.presentation-template', - 'application/vnd.oasis.opendocument.graphics', - 'application/vnd.oasis.opendocument.graphics-template', - 'application/vnd.ms-excel.sheet.macroenabled.12', - 'application/vnd.ms-word.document.macroenabled.12', - 'application/vnd.ms-word.template.macroenabled.12', - 'application/vnd.ms-powerpoint.template.macroenabled.12', - 'application/vnd.ms-powerpoint.presentation.macroenabled.12', - 'application/java-archive', - 'application/vnd.rn-realmedia', - 'application/x-spss-sav', - 'application/x-ms-regedit', - 'application/x-ft-windows-registry-hive', - 'application/x-jmp-data', -]; diff --git a/node_modules/file-type/util.js b/node_modules/file-type/util.js deleted file mode 100644 index 1635f20..0000000 --- a/node_modules/file-type/util.js +++ /dev/null @@ -1,60 +0,0 @@ -import {StringType} from 'token-types'; - -export function stringToBytes(string, encoding) { - if (encoding === 'utf-16le') { - const bytes = []; - for (let index = 0; index < string.length; index++) { - const code = string.charCodeAt(index); // eslint-disable-line unicorn/prefer-code-point - bytes.push(code & 0xFF, (code >> 8) & 0xFF); // High byte - } - - return bytes; - } - - if (encoding === 'utf-16be') { - const bytes = []; - for (let index = 0; index < string.length; index++) { - const code = string.charCodeAt(index); // eslint-disable-line unicorn/prefer-code-point - bytes.push((code >> 8) & 0xFF, code & 0xFF); // Low byte - } - - return bytes; - } - - return [...string].map(character => character.charCodeAt(0)); // eslint-disable-line unicorn/prefer-code-point -} - -/** -Checks whether the TAR checksum is valid. - -@param {Uint8Array} arrayBuffer - The TAR header `[offset ... offset + 512]`. -@param {number} offset - TAR header offset. -@returns {boolean} `true` if the TAR checksum is valid, otherwise `false`. -*/ -export function tarHeaderChecksumMatches(arrayBuffer, offset = 0) { - const readSum = Number.parseInt(new StringType(6).get(arrayBuffer, 148).replace(/\0.*$/, '').trim(), 8); // Read sum in header - if (Number.isNaN(readSum)) { - return false; - } - - let sum = 8 * 0x20; // Initialize signed bit sum - - for (let index = offset; index < offset + 148; index++) { - sum += arrayBuffer[index]; - } - - for (let index = offset + 156; index < offset + 512; index++) { - sum += arrayBuffer[index]; - } - - return readSum === sum; -} - -/** -ID3 UINT32 sync-safe tokenizer token. -28 bits (representing up to 256MB) integer, the msb is 0 to avoid "false syncsignals". -*/ -export const uint32SyncSafeToken = { - get: (buffer, offset) => (buffer[offset + 3] & 0x7F) | ((buffer[offset + 2]) << 7) | ((buffer[offset + 1]) << 14) | ((buffer[offset]) << 21), - len: 4, -}; diff --git a/node_modules/fill-range/LICENSE b/node_modules/fill-range/LICENSE deleted file mode 100644 index 9af4a67..0000000 --- a/node_modules/fill-range/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-present, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/fill-range/README.md b/node_modules/fill-range/README.md deleted file mode 100644 index 8d756fe..0000000 --- a/node_modules/fill-range/README.md +++ /dev/null @@ -1,237 +0,0 @@ -# fill-range [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/fill-range.svg?style=flat)](https://www.npmjs.com/package/fill-range) [![NPM monthly downloads](https://img.shields.io/npm/dm/fill-range.svg?style=flat)](https://npmjs.org/package/fill-range) [![NPM total downloads](https://img.shields.io/npm/dt/fill-range.svg?style=flat)](https://npmjs.org/package/fill-range) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/fill-range.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/fill-range) - -> Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex` - -Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save fill-range -``` - -## Usage - -Expands numbers and letters, optionally using a `step` as the last argument. _(Numbers may be defined as JavaScript numbers or strings)_. - -```js -const fill = require('fill-range'); -// fill(from, to[, step, options]); - -console.log(fill('1', '10')); //=> ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'] -console.log(fill('1', '10', { toRegex: true })); //=> [1-9]|10 -``` - -**Params** - -* `from`: **{String|Number}** the number or letter to start with -* `to`: **{String|Number}** the number or letter to end with -* `step`: **{String|Number|Object|Function}** Optionally pass a [step](#optionsstep) to use. -* `options`: **{Object|Function}**: See all available [options](#options) - -## Examples - -By default, an array of values is returned. - -**Alphabetical ranges** - -```js -console.log(fill('a', 'e')); //=> ['a', 'b', 'c', 'd', 'e'] -console.log(fill('A', 'E')); //=> [ 'A', 'B', 'C', 'D', 'E' ] -``` - -**Numerical ranges** - -Numbers can be defined as actual numbers or strings. - -```js -console.log(fill(1, 5)); //=> [ 1, 2, 3, 4, 5 ] -console.log(fill('1', '5')); //=> [ 1, 2, 3, 4, 5 ] -``` - -**Negative ranges** - -Numbers can be defined as actual numbers or strings. - -```js -console.log(fill('-5', '-1')); //=> [ '-5', '-4', '-3', '-2', '-1' ] -console.log(fill('-5', '5')); //=> [ '-5', '-4', '-3', '-2', '-1', '0', '1', '2', '3', '4', '5' ] -``` - -**Steps (increments)** - -```js -// numerical ranges with increments -console.log(fill('0', '25', 4)); //=> [ '0', '4', '8', '12', '16', '20', '24' ] -console.log(fill('0', '25', 5)); //=> [ '0', '5', '10', '15', '20', '25' ] -console.log(fill('0', '25', 6)); //=> [ '0', '6', '12', '18', '24' ] - -// alphabetical ranges with increments -console.log(fill('a', 'z', 4)); //=> [ 'a', 'e', 'i', 'm', 'q', 'u', 'y' ] -console.log(fill('a', 'z', 5)); //=> [ 'a', 'f', 'k', 'p', 'u', 'z' ] -console.log(fill('a', 'z', 6)); //=> [ 'a', 'g', 'm', 's', 'y' ] -``` - -## Options - -### options.step - -**Type**: `number` (formatted as a string or number) - -**Default**: `undefined` - -**Description**: The increment to use for the range. Can be used with letters or numbers. - -**Example(s)** - -```js -// numbers -console.log(fill('1', '10', 2)); //=> [ '1', '3', '5', '7', '9' ] -console.log(fill('1', '10', 3)); //=> [ '1', '4', '7', '10' ] -console.log(fill('1', '10', 4)); //=> [ '1', '5', '9' ] - -// letters -console.log(fill('a', 'z', 5)); //=> [ 'a', 'f', 'k', 'p', 'u', 'z' ] -console.log(fill('a', 'z', 7)); //=> [ 'a', 'h', 'o', 'v' ] -console.log(fill('a', 'z', 9)); //=> [ 'a', 'j', 's' ] -``` - -### options.strictRanges - -**Type**: `boolean` - -**Default**: `false` - -**Description**: By default, `null` is returned when an invalid range is passed. Enable this option to throw a `RangeError` on invalid ranges. - -**Example(s)** - -The following are all invalid: - -```js -fill('1.1', '2'); // decimals not supported in ranges -fill('a', '2'); // incompatible range values -fill(1, 10, 'foo'); // invalid "step" argument -``` - -### options.stringify - -**Type**: `boolean` - -**Default**: `undefined` - -**Description**: Cast all returned values to strings. By default, integers are returned as numbers. - -**Example(s)** - -```js -console.log(fill(1, 5)); //=> [ 1, 2, 3, 4, 5 ] -console.log(fill(1, 5, { stringify: true })); //=> [ '1', '2', '3', '4', '5' ] -``` - -### options.toRegex - -**Type**: `boolean` - -**Default**: `undefined` - -**Description**: Create a regex-compatible source string, instead of expanding values to an array. - -**Example(s)** - -```js -// alphabetical range -console.log(fill('a', 'e', { toRegex: true })); //=> '[a-e]' -// alphabetical with step -console.log(fill('a', 'z', 3, { toRegex: true })); //=> 'a|d|g|j|m|p|s|v|y' -// numerical range -console.log(fill('1', '100', { toRegex: true })); //=> '[1-9]|[1-9][0-9]|100' -// numerical range with zero padding -console.log(fill('000001', '100000', { toRegex: true })); -//=> '0{5}[1-9]|0{4}[1-9][0-9]|0{3}[1-9][0-9]{2}|0{2}[1-9][0-9]{3}|0[1-9][0-9]{4}|100000' -``` - -### options.transform - -**Type**: `function` - -**Default**: `undefined` - -**Description**: Customize each value in the returned array (or [string](#optionstoRegex)). _(you can also pass this function as the last argument to `fill()`)_. - -**Example(s)** - -```js -// add zero padding -console.log(fill(1, 5, value => String(value).padStart(4, '0'))); -//=> ['0001', '0002', '0003', '0004', '0005'] -``` - -## About - -
-Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -
- -
-Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -
- -
-Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
- -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 116 | [jonschlinkert](https://github.com/jonschlinkert) | -| 4 | [paulmillr](https://github.com/paulmillr) | -| 2 | [realityking](https://github.com/realityking) | -| 2 | [bluelovers](https://github.com/bluelovers) | -| 1 | [edorivai](https://github.com/edorivai) | -| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | - -### Author - -**Jon Schlinkert** - -* [GitHub Profile](https://github.com/jonschlinkert) -* [Twitter Profile](https://twitter.com/jonschlinkert) -* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) - -Please consider supporting me on Patreon, or [start your own Patreon page](https://patreon.com/invite/bxpbvm)! - - - - - -### License - -Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 08, 2019._ \ No newline at end of file diff --git a/node_modules/fill-range/index.js b/node_modules/fill-range/index.js deleted file mode 100644 index ddb212e..0000000 --- a/node_modules/fill-range/index.js +++ /dev/null @@ -1,248 +0,0 @@ -/*! - * fill-range - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Licensed under the MIT License. - */ - -'use strict'; - -const util = require('util'); -const toRegexRange = require('to-regex-range'); - -const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); - -const transform = toNumber => { - return value => toNumber === true ? Number(value) : String(value); -}; - -const isValidValue = value => { - return typeof value === 'number' || (typeof value === 'string' && value !== ''); -}; - -const isNumber = num => Number.isInteger(+num); - -const zeros = input => { - let value = `${input}`; - let index = -1; - if (value[0] === '-') value = value.slice(1); - if (value === '0') return false; - while (value[++index] === '0'); - return index > 0; -}; - -const stringify = (start, end, options) => { - if (typeof start === 'string' || typeof end === 'string') { - return true; - } - return options.stringify === true; -}; - -const pad = (input, maxLength, toNumber) => { - if (maxLength > 0) { - let dash = input[0] === '-' ? '-' : ''; - if (dash) input = input.slice(1); - input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0')); - } - if (toNumber === false) { - return String(input); - } - return input; -}; - -const toMaxLen = (input, maxLength) => { - let negative = input[0] === '-' ? '-' : ''; - if (negative) { - input = input.slice(1); - maxLength--; - } - while (input.length < maxLength) input = '0' + input; - return negative ? ('-' + input) : input; -}; - -const toSequence = (parts, options, maxLen) => { - parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - - let prefix = options.capture ? '' : '?:'; - let positives = ''; - let negatives = ''; - let result; - - if (parts.positives.length) { - positives = parts.positives.map(v => toMaxLen(String(v), maxLen)).join('|'); - } - - if (parts.negatives.length) { - negatives = `-(${prefix}${parts.negatives.map(v => toMaxLen(String(v), maxLen)).join('|')})`; - } - - if (positives && negatives) { - result = `${positives}|${negatives}`; - } else { - result = positives || negatives; - } - - if (options.wrap) { - return `(${prefix}${result})`; - } - - return result; -}; - -const toRange = (a, b, isNumbers, options) => { - if (isNumbers) { - return toRegexRange(a, b, { wrap: false, ...options }); - } - - let start = String.fromCharCode(a); - if (a === b) return start; - - let stop = String.fromCharCode(b); - return `[${start}-${stop}]`; -}; - -const toRegex = (start, end, options) => { - if (Array.isArray(start)) { - let wrap = options.wrap === true; - let prefix = options.capture ? '' : '?:'; - return wrap ? `(${prefix}${start.join('|')})` : start.join('|'); - } - return toRegexRange(start, end, options); -}; - -const rangeError = (...args) => { - return new RangeError('Invalid range arguments: ' + util.inspect(...args)); -}; - -const invalidRange = (start, end, options) => { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; -}; - -const invalidStep = (step, options) => { - if (options.strictRanges === true) { - throw new TypeError(`Expected step "${step}" to be a number`); - } - return []; -}; - -const fillNumbers = (start, end, step = 1, options = {}) => { - let a = Number(start); - let b = Number(end); - - if (!Number.isInteger(a) || !Number.isInteger(b)) { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; - } - - // fix negative zero - if (a === 0) a = 0; - if (b === 0) b = 0; - - let descending = a > b; - let startString = String(start); - let endString = String(end); - let stepString = String(step); - step = Math.max(Math.abs(step), 1); - - let padded = zeros(startString) || zeros(endString) || zeros(stepString); - let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; - let toNumber = padded === false && stringify(start, end, options) === false; - let format = options.transform || transform(toNumber); - - if (options.toRegex && step === 1) { - return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); - } - - let parts = { negatives: [], positives: [] }; - let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num)); - let range = []; - let index = 0; - - while (descending ? a >= b : a <= b) { - if (options.toRegex === true && step > 1) { - push(a); - } else { - range.push(pad(format(a, index), maxLen, toNumber)); - } - a = descending ? a - step : a + step; - index++; - } - - if (options.toRegex === true) { - return step > 1 - ? toSequence(parts, options, maxLen) - : toRegex(range, null, { wrap: false, ...options }); - } - - return range; -}; - -const fillLetters = (start, end, step = 1, options = {}) => { - if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) { - return invalidRange(start, end, options); - } - - let format = options.transform || (val => String.fromCharCode(val)); - let a = `${start}`.charCodeAt(0); - let b = `${end}`.charCodeAt(0); - - let descending = a > b; - let min = Math.min(a, b); - let max = Math.max(a, b); - - if (options.toRegex && step === 1) { - return toRange(min, max, false, options); - } - - let range = []; - let index = 0; - - while (descending ? a >= b : a <= b) { - range.push(format(a, index)); - a = descending ? a - step : a + step; - index++; - } - - if (options.toRegex === true) { - return toRegex(range, null, { wrap: false, options }); - } - - return range; -}; - -const fill = (start, end, step, options = {}) => { - if (end == null && isValidValue(start)) { - return [start]; - } - - if (!isValidValue(start) || !isValidValue(end)) { - return invalidRange(start, end, options); - } - - if (typeof step === 'function') { - return fill(start, end, 1, { transform: step }); - } - - if (isObject(step)) { - return fill(start, end, 0, step); - } - - let opts = { ...options }; - if (opts.capture === true) opts.wrap = true; - step = step || opts.step || 1; - - if (!isNumber(step)) { - if (step != null && !isObject(step)) return invalidStep(step, opts); - return fill(start, end, 1, step); - } - - if (isNumber(start) && isNumber(end)) { - return fillNumbers(start, end, step, opts); - } - - return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); -}; - -module.exports = fill; diff --git a/node_modules/fill-range/package.json b/node_modules/fill-range/package.json deleted file mode 100644 index 582357f..0000000 --- a/node_modules/fill-range/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "name": "fill-range", - "description": "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`", - "version": "7.1.1", - "homepage": "https://github.com/jonschlinkert/fill-range", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "Edo Rivai (edo.rivai.nl)", - "Jon Schlinkert (http://twitter.com/jonschlinkert)", - "Paul Miller (paulmillr.com)", - "Rouven Weßling (www.rouvenwessling.de)", - "(https://github.com/wtgtybhertgeghgtwtg)" - ], - "repository": "jonschlinkert/fill-range", - "bugs": { - "url": "https://github.com/jonschlinkert/fill-range/issues" - }, - "license": "MIT", - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=8" - }, - "scripts": { - "lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .", - "mocha": "mocha --reporter dot", - "test": "npm run lint && npm run mocha", - "test:ci": "npm run test:cover", - "test:cover": "nyc npm run mocha" - }, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "devDependencies": { - "gulp-format-md": "^2.0.0", - "mocha": "^6.1.1", - "nyc": "^15.1.0" - }, - "keywords": [ - "alpha", - "alphabetical", - "array", - "bash", - "brace", - "expand", - "expansion", - "fill", - "glob", - "match", - "matches", - "matching", - "number", - "numerical", - "range", - "ranges", - "regex", - "sh" - ], - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - } - } -} diff --git a/node_modules/finalhandler/HISTORY.md b/node_modules/finalhandler/HISTORY.md deleted file mode 100644 index 77ce54d..0000000 --- a/node_modules/finalhandler/HISTORY.md +++ /dev/null @@ -1,216 +0,0 @@ -v1.3.2 / 2025-12-01 -================== - - * deps: use tilde notation for dependencies - * deps: statuses@~2.0.2 - -v1.3.1 / 2024-09-11 -================== - - * deps: encodeurl@~2.0.0 - -v1.3.0 / 2024-09-03 -================== - - * ignore status message for HTTP/2 (#53) - -v1.2.1 / 2024-09-02 -================== - - * Gracefully handle when handling an error and socket is null - -1.2.0 / 2022-03-22 -================== - - * Remove set content headers that break response - * deps: on-finished@2.4.1 - * deps: statuses@2.0.1 - - Rename `425 Unordered Collection` to standard `425 Too Early` - -1.1.2 / 2019-05-09 -================== - - * Set stricter `Content-Security-Policy` header - * deps: parseurl@~1.3.3 - * deps: statuses@~1.5.0 - -1.1.1 / 2018-03-06 -================== - - * Fix 404 output for bad / missing pathnames - * deps: encodeurl@~1.0.2 - - Fix encoding `%` as last character - * deps: statuses@~1.4.0 - -1.1.0 / 2017-09-24 -================== - - * Use `res.headersSent` when available - -1.0.6 / 2017-09-22 -================== - - * deps: debug@2.6.9 - -1.0.5 / 2017-09-15 -================== - - * deps: parseurl@~1.3.2 - - perf: reduce overhead for full URLs - - perf: unroll the "fast-path" `RegExp` - -1.0.4 / 2017-08-03 -================== - - * deps: debug@2.6.8 - -1.0.3 / 2017-05-16 -================== - - * deps: debug@2.6.7 - - deps: ms@2.0.0 - -1.0.2 / 2017-04-22 -================== - - * deps: debug@2.6.4 - - deps: ms@0.7.3 - -1.0.1 / 2017-03-21 -================== - - * Fix missing `` in HTML document - * deps: debug@2.6.3 - - Fix: `DEBUG_MAX_ARRAY_LENGTH` - -1.0.0 / 2017-02-15 -================== - - * Fix exception when `err` cannot be converted to a string - * Fully URL-encode the pathname in the 404 message - * Only include the pathname in the 404 message - * Send complete HTML document - * Set `Content-Security-Policy: default-src 'self'` header - * deps: debug@2.6.1 - - Allow colors in workers - - Deprecated `DEBUG_FD` environment variable set to `3` or higher - - Fix error when running under React Native - - Use same color for same namespace - - deps: ms@0.7.2 - -0.5.1 / 2016-11-12 -================== - - * Fix exception when `err.headers` is not an object - * deps: statuses@~1.3.1 - * perf: hoist regular expressions - * perf: remove duplicate validation path - -0.5.0 / 2016-06-15 -================== - - * Change invalid or non-numeric status code to 500 - * Overwrite status message to match set status code - * Prefer `err.statusCode` if `err.status` is invalid - * Set response headers from `err.headers` object - * Use `statuses` instead of `http` module for status messages - - Includes all defined status messages - -0.4.1 / 2015-12-02 -================== - - * deps: escape-html@~1.0.3 - - perf: enable strict mode - - perf: optimize string replacement - - perf: use faster string coercion - -0.4.0 / 2015-06-14 -================== - - * Fix a false-positive when unpiping in Node.js 0.8 - * Support `statusCode` property on `Error` objects - * Use `unpipe` module for unpiping requests - * deps: escape-html@1.0.2 - * deps: on-finished@~2.3.0 - - Add defined behavior for HTTP `CONNECT` requests - - Add defined behavior for HTTP `Upgrade` requests - - deps: ee-first@1.1.1 - * perf: enable strict mode - * perf: remove argument reassignment - -0.3.6 / 2015-05-11 -================== - - * deps: debug@~2.2.0 - - deps: ms@0.7.1 - -0.3.5 / 2015-04-22 -================== - - * deps: on-finished@~2.2.1 - - Fix `isFinished(req)` when data buffered - -0.3.4 / 2015-03-15 -================== - - * deps: debug@~2.1.3 - - Fix high intensity foreground color for bold - - deps: ms@0.7.0 - -0.3.3 / 2015-01-01 -================== - - * deps: debug@~2.1.1 - * deps: on-finished@~2.2.0 - -0.3.2 / 2014-10-22 -================== - - * deps: on-finished@~2.1.1 - - Fix handling of pipelined requests - -0.3.1 / 2014-10-16 -================== - - * deps: debug@~2.1.0 - - Implement `DEBUG_FD` env variable support - -0.3.0 / 2014-09-17 -================== - - * Terminate in progress response only on error - * Use `on-finished` to determine request status - -0.2.0 / 2014-09-03 -================== - - * Set `X-Content-Type-Options: nosniff` header - * deps: debug@~2.0.0 - -0.1.0 / 2014-07-16 -================== - - * Respond after request fully read - - prevents hung responses and socket hang ups - * deps: debug@1.0.4 - -0.0.3 / 2014-07-11 -================== - - * deps: debug@1.0.3 - - Add support for multiple wildcards in namespaces - -0.0.2 / 2014-06-19 -================== - - * Handle invalid status codes - -0.0.1 / 2014-06-05 -================== - - * deps: debug@1.0.2 - -0.0.0 / 2014-06-05 -================== - - * Extracted from connect/express diff --git a/node_modules/finalhandler/LICENSE b/node_modules/finalhandler/LICENSE deleted file mode 100644 index 6022106..0000000 --- a/node_modules/finalhandler/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2014-2022 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/finalhandler/README.md b/node_modules/finalhandler/README.md deleted file mode 100644 index 6244a13..0000000 --- a/node_modules/finalhandler/README.md +++ /dev/null @@ -1,147 +0,0 @@ -# finalhandler - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-image]][node-url] -[![Build Status][github-actions-ci-image]][github-actions-ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Node.js function to invoke as the final step to respond to HTTP request. - -## Installation - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install finalhandler -``` - -## API - -```js -var finalhandler = require('finalhandler') -``` - -### finalhandler(req, res, [options]) - -Returns function to be invoked as the final step for the given `req` and `res`. -This function is to be invoked as `fn(err)`. If `err` is falsy, the handler will -write out a 404 response to the `res`. If it is truthy, an error response will -be written out to the `res` or `res` will be terminated if a response has already -started. - -When an error is written, the following information is added to the response: - - * The `res.statusCode` is set from `err.status` (or `err.statusCode`). If - this value is outside the 4xx or 5xx range, it will be set to 500. - * The `res.statusMessage` is set according to the status code. - * The body will be the HTML of the status code message if `env` is - `'production'`, otherwise will be `err.stack`. - * Any headers specified in an `err.headers` object. - -The final handler will also unpipe anything from `req` when it is invoked. - -#### options.env - -By default, the environment is determined by `NODE_ENV` variable, but it can be -overridden by this option. - -#### options.onerror - -Provide a function to be called with the `err` when it exists. Can be used for -writing errors to a central location without excessive function generation. Called -as `onerror(err, req, res)`. - -## Examples - -### always 404 - -```js -var finalhandler = require('finalhandler') -var http = require('http') - -var server = http.createServer(function (req, res) { - var done = finalhandler(req, res) - done() -}) - -server.listen(3000) -``` - -### perform simple action - -```js -var finalhandler = require('finalhandler') -var fs = require('fs') -var http = require('http') - -var server = http.createServer(function (req, res) { - var done = finalhandler(req, res) - - fs.readFile('index.html', function (err, buf) { - if (err) return done(err) - res.setHeader('Content-Type', 'text/html') - res.end(buf) - }) -}) - -server.listen(3000) -``` - -### use with middleware-style functions - -```js -var finalhandler = require('finalhandler') -var http = require('http') -var serveStatic = require('serve-static') - -var serve = serveStatic('public') - -var server = http.createServer(function (req, res) { - var done = finalhandler(req, res) - serve(req, res, done) -}) - -server.listen(3000) -``` - -### keep log of all errors - -```js -var finalhandler = require('finalhandler') -var fs = require('fs') -var http = require('http') - -var server = http.createServer(function (req, res) { - var done = finalhandler(req, res, { onerror: logerror }) - - fs.readFile('index.html', function (err, buf) { - if (err) return done(err) - res.setHeader('Content-Type', 'text/html') - res.end(buf) - }) -}) - -server.listen(3000) - -function logerror (err) { - console.error(err.stack || err.toString()) -} -``` - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/finalhandler.svg -[npm-url]: https://npmjs.org/package/finalhandler -[node-image]: https://img.shields.io/node/v/finalhandler.svg -[node-url]: https://nodejs.org/en/download -[coveralls-image]: https://img.shields.io/coveralls/pillarjs/finalhandler.svg -[coveralls-url]: https://coveralls.io/r/pillarjs/finalhandler?branch=master -[downloads-image]: https://img.shields.io/npm/dm/finalhandler.svg -[downloads-url]: https://npmjs.org/package/finalhandler -[github-actions-ci-image]: https://github.com/pillarjs/finalhandler/actions/workflows/ci.yml/badge.svg -[github-actions-ci-url]: https://github.com/pillarjs/finalhandler/actions/workflows/ci.yml diff --git a/node_modules/finalhandler/SECURITY.md b/node_modules/finalhandler/SECURITY.md deleted file mode 100644 index 6e23249..0000000 --- a/node_modules/finalhandler/SECURITY.md +++ /dev/null @@ -1,25 +0,0 @@ -# Security Policies and Procedures - -## Reporting a Bug - -The `finalhandler` team and community take all security bugs seriously. Thank -you for improving the security of Express. We appreciate your efforts and -responsible disclosure and will make every effort to acknowledge your -contributions. - -Report security bugs by emailing the current owner(s) of `finalhandler`. This -information can be found in the npm registry using the command -`npm owner ls finalhandler`. -If unsure or unable to get the information from the above, open an issue -in the [project issue tracker](https://github.com/pillarjs/finalhandler/issues) -asking for the current contact information. - -To ensure the timely response to your report, please ensure that the entirety -of the report is contained within the email body and not solely behind a web -link or an attachment. - -At least one owner will acknowledge your email within 48 hours, and will send a -more detailed response within 48 hours indicating the next steps in handling -your report. After the initial reply to your report, the owners will -endeavor to keep you informed of the progress towards a fix and full -announcement, and may ask for additional information or guidance. diff --git a/node_modules/finalhandler/index.js b/node_modules/finalhandler/index.js deleted file mode 100644 index ec34be9..0000000 --- a/node_modules/finalhandler/index.js +++ /dev/null @@ -1,341 +0,0 @@ -/*! - * finalhandler - * Copyright(c) 2014-2022 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var debug = require('debug')('finalhandler') -var encodeUrl = require('encodeurl') -var escapeHtml = require('escape-html') -var onFinished = require('on-finished') -var parseUrl = require('parseurl') -var statuses = require('statuses') -var unpipe = require('unpipe') - -/** - * Module variables. - * @private - */ - -var DOUBLE_SPACE_REGEXP = /\x20{2}/g -var NEWLINE_REGEXP = /\n/g - -/* istanbul ignore next */ -var defer = typeof setImmediate === 'function' - ? setImmediate - : function (fn) { process.nextTick(fn.bind.apply(fn, arguments)) } -var isFinished = onFinished.isFinished - -/** - * Create a minimal HTML document. - * - * @param {string} message - * @private - */ - -function createHtmlDocument (message) { - var body = escapeHtml(message) - .replace(NEWLINE_REGEXP, '
') - .replace(DOUBLE_SPACE_REGEXP, '  ') - - return '\n' + - '\n' + - '\n' + - '\n' + - 'Error\n' + - '\n' + - '\n' + - '
' + body + '
\n' + - '\n' + - '\n' -} - -/** - * Module exports. - * @public - */ - -module.exports = finalhandler - -/** - * Create a function to handle the final response. - * - * @param {Request} req - * @param {Response} res - * @param {Object} [options] - * @return {Function} - * @public - */ - -function finalhandler (req, res, options) { - var opts = options || {} - - // get environment - var env = opts.env || process.env.NODE_ENV || 'development' - - // get error callback - var onerror = opts.onerror - - return function (err) { - var headers - var msg - var status - - // ignore 404 on in-flight response - if (!err && headersSent(res)) { - debug('cannot 404 after headers sent') - return - } - - // unhandled error - if (err) { - // respect status code from error - status = getErrorStatusCode(err) - - if (status === undefined) { - // fallback to status code on response - status = getResponseStatusCode(res) - } else { - // respect headers from error - headers = getErrorHeaders(err) - } - - // get error message - msg = getErrorMessage(err, status, env) - } else { - // not found - status = 404 - msg = 'Cannot ' + req.method + ' ' + encodeUrl(getResourceName(req)) - } - - debug('default %s', status) - - // schedule onerror callback - if (err && onerror) { - defer(onerror, err, req, res) - } - - // cannot actually respond - if (headersSent(res)) { - debug('cannot %d after headers sent', status) - if (req.socket) { - req.socket.destroy() - } - return - } - - // send response - send(req, res, status, headers, msg) - } -} - -/** - * Get headers from Error object. - * - * @param {Error} err - * @return {object} - * @private - */ - -function getErrorHeaders (err) { - if (!err.headers || typeof err.headers !== 'object') { - return undefined - } - - var headers = Object.create(null) - var keys = Object.keys(err.headers) - - for (var i = 0; i < keys.length; i++) { - var key = keys[i] - headers[key] = err.headers[key] - } - - return headers -} - -/** - * Get message from Error object, fallback to status message. - * - * @param {Error} err - * @param {number} status - * @param {string} env - * @return {string} - * @private - */ - -function getErrorMessage (err, status, env) { - var msg - - if (env !== 'production') { - // use err.stack, which typically includes err.message - msg = err.stack - - // fallback to err.toString() when possible - if (!msg && typeof err.toString === 'function') { - msg = err.toString() - } - } - - return msg || statuses.message[status] -} - -/** - * Get status code from Error object. - * - * @param {Error} err - * @return {number} - * @private - */ - -function getErrorStatusCode (err) { - // check err.status - if (typeof err.status === 'number' && err.status >= 400 && err.status < 600) { - return err.status - } - - // check err.statusCode - if (typeof err.statusCode === 'number' && err.statusCode >= 400 && err.statusCode < 600) { - return err.statusCode - } - - return undefined -} - -/** - * Get resource name for the request. - * - * This is typically just the original pathname of the request - * but will fallback to "resource" is that cannot be determined. - * - * @param {IncomingMessage} req - * @return {string} - * @private - */ - -function getResourceName (req) { - try { - return parseUrl.original(req).pathname - } catch (e) { - return 'resource' - } -} - -/** - * Get status code from response. - * - * @param {OutgoingMessage} res - * @return {number} - * @private - */ - -function getResponseStatusCode (res) { - var status = res.statusCode - - // default status code to 500 if outside valid range - if (typeof status !== 'number' || status < 400 || status > 599) { - status = 500 - } - - return status -} - -/** - * Determine if the response headers have been sent. - * - * @param {object} res - * @returns {boolean} - * @private - */ - -function headersSent (res) { - return typeof res.headersSent !== 'boolean' - ? Boolean(res._header) - : res.headersSent -} - -/** - * Send response. - * - * @param {IncomingMessage} req - * @param {OutgoingMessage} res - * @param {number} status - * @param {object} headers - * @param {string} message - * @private - */ - -function send (req, res, status, headers, message) { - function write () { - // response body - var body = createHtmlDocument(message) - - // response status - res.statusCode = status - - if (req.httpVersionMajor < 2) { - res.statusMessage = statuses.message[status] - } - - // remove any content headers - res.removeHeader('Content-Encoding') - res.removeHeader('Content-Language') - res.removeHeader('Content-Range') - - // response headers - setHeaders(res, headers) - - // security headers - res.setHeader('Content-Security-Policy', "default-src 'none'") - res.setHeader('X-Content-Type-Options', 'nosniff') - - // standard headers - res.setHeader('Content-Type', 'text/html; charset=utf-8') - res.setHeader('Content-Length', Buffer.byteLength(body, 'utf8')) - - if (req.method === 'HEAD') { - res.end() - return - } - - res.end(body, 'utf8') - } - - if (isFinished(req)) { - write() - return - } - - // unpipe everything from the request - unpipe(req) - - // flush the request - onFinished(req, write) - req.resume() -} - -/** - * Set response headers from an object. - * - * @param {OutgoingMessage} res - * @param {object} headers - * @private - */ - -function setHeaders (res, headers) { - if (!headers) { - return - } - - var keys = Object.keys(headers) - for (var i = 0; i < keys.length; i++) { - var key = keys[i] - res.setHeader(key, headers[key]) - } -} diff --git a/node_modules/finalhandler/node_modules/debug/.coveralls.yml b/node_modules/finalhandler/node_modules/debug/.coveralls.yml deleted file mode 100644 index 20a7068..0000000 --- a/node_modules/finalhandler/node_modules/debug/.coveralls.yml +++ /dev/null @@ -1 +0,0 @@ -repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve diff --git a/node_modules/finalhandler/node_modules/debug/.eslintrc b/node_modules/finalhandler/node_modules/debug/.eslintrc deleted file mode 100644 index 8a37ae2..0000000 --- a/node_modules/finalhandler/node_modules/debug/.eslintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "env": { - "browser": true, - "node": true - }, - "rules": { - "no-console": 0, - "no-empty": [1, { "allowEmptyCatch": true }] - }, - "extends": "eslint:recommended" -} diff --git a/node_modules/finalhandler/node_modules/debug/.npmignore b/node_modules/finalhandler/node_modules/debug/.npmignore deleted file mode 100644 index 5f60eec..0000000 --- a/node_modules/finalhandler/node_modules/debug/.npmignore +++ /dev/null @@ -1,9 +0,0 @@ -support -test -examples -example -*.sock -dist -yarn.lock -coverage -bower.json diff --git a/node_modules/finalhandler/node_modules/debug/.travis.yml b/node_modules/finalhandler/node_modules/debug/.travis.yml deleted file mode 100644 index 6c6090c..0000000 --- a/node_modules/finalhandler/node_modules/debug/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ - -language: node_js -node_js: - - "6" - - "5" - - "4" - -install: - - make node_modules - -script: - - make lint - - make test - - make coveralls diff --git a/node_modules/finalhandler/node_modules/debug/CHANGELOG.md b/node_modules/finalhandler/node_modules/debug/CHANGELOG.md deleted file mode 100644 index eadaa18..0000000 --- a/node_modules/finalhandler/node_modules/debug/CHANGELOG.md +++ /dev/null @@ -1,362 +0,0 @@ - -2.6.9 / 2017-09-22 -================== - - * remove ReDoS regexp in %o formatter (#504) - -2.6.8 / 2017-05-18 -================== - - * Fix: Check for undefined on browser globals (#462, @marbemac) - -2.6.7 / 2017-05-16 -================== - - * Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom) - * Fix: Inline extend function in node implementation (#452, @dougwilson) - * Docs: Fix typo (#455, @msasad) - -2.6.5 / 2017-04-27 -================== - - * Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek) - * Misc: clean up browser reference checks (#447, @thebigredgeek) - * Misc: add npm-debug.log to .gitignore (@thebigredgeek) - - -2.6.4 / 2017-04-20 -================== - - * Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo) - * Chore: ignore bower.json in npm installations. (#437, @joaovieira) - * Misc: update "ms" to v0.7.3 (@tootallnate) - -2.6.3 / 2017-03-13 -================== - - * Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts) - * Docs: Changelog fix (@thebigredgeek) - -2.6.2 / 2017-03-10 -================== - - * Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin) - * Docs: Add backers and sponsors from Open Collective (#422, @piamancini) - * Docs: Add Slackin invite badge (@tootallnate) - -2.6.1 / 2017-02-10 -================== - - * Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error - * Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0) - * Fix: IE8 "Expected identifier" error (#414, @vgoma) - * Fix: Namespaces would not disable once enabled (#409, @musikov) - -2.6.0 / 2016-12-28 -================== - - * Fix: added better null pointer checks for browser useColors (@thebigredgeek) - * Improvement: removed explicit `window.debug` export (#404, @tootallnate) - * Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate) - -2.5.2 / 2016-12-25 -================== - - * Fix: reference error on window within webworkers (#393, @KlausTrainer) - * Docs: fixed README typo (#391, @lurch) - * Docs: added notice about v3 api discussion (@thebigredgeek) - -2.5.1 / 2016-12-20 -================== - - * Fix: babel-core compatibility - -2.5.0 / 2016-12-20 -================== - - * Fix: wrong reference in bower file (@thebigredgeek) - * Fix: webworker compatibility (@thebigredgeek) - * Fix: output formatting issue (#388, @kribblo) - * Fix: babel-loader compatibility (#383, @escwald) - * Misc: removed built asset from repo and publications (@thebigredgeek) - * Misc: moved source files to /src (#378, @yamikuronue) - * Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue) - * Test: coveralls integration (#378, @yamikuronue) - * Docs: simplified language in the opening paragraph (#373, @yamikuronue) - -2.4.5 / 2016-12-17 -================== - - * Fix: `navigator` undefined in Rhino (#376, @jochenberger) - * Fix: custom log function (#379, @hsiliev) - * Improvement: bit of cleanup + linting fixes (@thebigredgeek) - * Improvement: rm non-maintainted `dist/` dir (#375, @freewil) - * Docs: simplified language in the opening paragraph. (#373, @yamikuronue) - -2.4.4 / 2016-12-14 -================== - - * Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts) - -2.4.3 / 2016-12-14 -================== - - * Fix: navigation.userAgent error for react native (#364, @escwald) - -2.4.2 / 2016-12-14 -================== - - * Fix: browser colors (#367, @tootallnate) - * Misc: travis ci integration (@thebigredgeek) - * Misc: added linting and testing boilerplate with sanity check (@thebigredgeek) - -2.4.1 / 2016-12-13 -================== - - * Fix: typo that broke the package (#356) - -2.4.0 / 2016-12-13 -================== - - * Fix: bower.json references unbuilt src entry point (#342, @justmatt) - * Fix: revert "handle regex special characters" (@tootallnate) - * Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate) - * Feature: %O`(big O) pretty-prints objects (#322, @tootallnate) - * Improvement: allow colors in workers (#335, @botverse) - * Improvement: use same color for same namespace. (#338, @lchenay) - -2.3.3 / 2016-11-09 -================== - - * Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne) - * Fix: Returning `localStorage` saved values (#331, Levi Thomason) - * Improvement: Don't create an empty object when no `process` (Nathan Rajlich) - -2.3.2 / 2016-11-09 -================== - - * Fix: be super-safe in index.js as well (@TooTallNate) - * Fix: should check whether process exists (Tom Newby) - -2.3.1 / 2016-11-09 -================== - - * Fix: Added electron compatibility (#324, @paulcbetts) - * Improvement: Added performance optimizations (@tootallnate) - * Readme: Corrected PowerShell environment variable example (#252, @gimre) - * Misc: Removed yarn lock file from source control (#321, @fengmk2) - -2.3.0 / 2016-11-07 -================== - - * Fix: Consistent placement of ms diff at end of output (#215, @gorangajic) - * Fix: Escaping of regex special characters in namespace strings (#250, @zacronos) - * Fix: Fixed bug causing crash on react-native (#282, @vkarpov15) - * Feature: Enabled ES6+ compatible import via default export (#212 @bucaran) - * Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom) - * Package: Update "ms" to 0.7.2 (#315, @DevSide) - * Package: removed superfluous version property from bower.json (#207 @kkirsche) - * Readme: fix USE_COLORS to DEBUG_COLORS - * Readme: Doc fixes for format string sugar (#269, @mlucool) - * Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0) - * Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable) - * Readme: better docs for browser support (#224, @matthewmueller) - * Tooling: Added yarn integration for development (#317, @thebigredgeek) - * Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek) - * Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman) - * Misc: Updated contributors (@thebigredgeek) - -2.2.0 / 2015-05-09 -================== - - * package: update "ms" to v0.7.1 (#202, @dougwilson) - * README: add logging to file example (#193, @DanielOchoa) - * README: fixed a typo (#191, @amir-s) - * browser: expose `storage` (#190, @stephenmathieson) - * Makefile: add a `distclean` target (#189, @stephenmathieson) - -2.1.3 / 2015-03-13 -================== - - * Updated stdout/stderr example (#186) - * Updated example/stdout.js to match debug current behaviour - * Renamed example/stderr.js to stdout.js - * Update Readme.md (#184) - * replace high intensity foreground color for bold (#182, #183) - -2.1.2 / 2015-03-01 -================== - - * dist: recompile - * update "ms" to v0.7.0 - * package: update "browserify" to v9.0.3 - * component: fix "ms.js" repo location - * changed bower package name - * updated documentation about using debug in a browser - * fix: security error on safari (#167, #168, @yields) - -2.1.1 / 2014-12-29 -================== - - * browser: use `typeof` to check for `console` existence - * browser: check for `console.log` truthiness (fix IE 8/9) - * browser: add support for Chrome apps - * Readme: added Windows usage remarks - * Add `bower.json` to properly support bower install - -2.1.0 / 2014-10-15 -================== - - * node: implement `DEBUG_FD` env variable support - * package: update "browserify" to v6.1.0 - * package: add "license" field to package.json (#135, @panuhorsmalahti) - -2.0.0 / 2014-09-01 -================== - - * package: update "browserify" to v5.11.0 - * node: use stderr rather than stdout for logging (#29, @stephenmathieson) - -1.0.4 / 2014-07-15 -================== - - * dist: recompile - * example: remove `console.info()` log usage - * example: add "Content-Type" UTF-8 header to browser example - * browser: place %c marker after the space character - * browser: reset the "content" color via `color: inherit` - * browser: add colors support for Firefox >= v31 - * debug: prefer an instance `log()` function over the global one (#119) - * Readme: update documentation about styled console logs for FF v31 (#116, @wryk) - -1.0.3 / 2014-07-09 -================== - - * Add support for multiple wildcards in namespaces (#122, @seegno) - * browser: fix lint - -1.0.2 / 2014-06-10 -================== - - * browser: update color palette (#113, @gscottolson) - * common: make console logging function configurable (#108, @timoxley) - * node: fix %o colors on old node <= 0.8.x - * Makefile: find node path using shell/which (#109, @timoxley) - -1.0.1 / 2014-06-06 -================== - - * browser: use `removeItem()` to clear localStorage - * browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777) - * package: add "contributors" section - * node: fix comment typo - * README: list authors - -1.0.0 / 2014-06-04 -================== - - * make ms diff be global, not be scope - * debug: ignore empty strings in enable() - * node: make DEBUG_COLORS able to disable coloring - * *: export the `colors` array - * npmignore: don't publish the `dist` dir - * Makefile: refactor to use browserify - * package: add "browserify" as a dev dependency - * Readme: add Web Inspector Colors section - * node: reset terminal color for the debug content - * node: map "%o" to `util.inspect()` - * browser: map "%j" to `JSON.stringify()` - * debug: add custom "formatters" - * debug: use "ms" module for humanizing the diff - * Readme: add "bash" syntax highlighting - * browser: add Firebug color support - * browser: add colors for WebKit browsers - * node: apply log to `console` - * rewrite: abstract common logic for Node & browsers - * add .jshintrc file - -0.8.1 / 2014-04-14 -================== - - * package: re-add the "component" section - -0.8.0 / 2014-03-30 -================== - - * add `enable()` method for nodejs. Closes #27 - * change from stderr to stdout - * remove unnecessary index.js file - -0.7.4 / 2013-11-13 -================== - - * remove "browserify" key from package.json (fixes something in browserify) - -0.7.3 / 2013-10-30 -================== - - * fix: catch localStorage security error when cookies are blocked (Chrome) - * add debug(err) support. Closes #46 - * add .browser prop to package.json. Closes #42 - -0.7.2 / 2013-02-06 -================== - - * fix package.json - * fix: Mobile Safari (private mode) is broken with debug - * fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript - -0.7.1 / 2013-02-05 -================== - - * add repository URL to package.json - * add DEBUG_COLORED to force colored output - * add browserify support - * fix component. Closes #24 - -0.7.0 / 2012-05-04 -================== - - * Added .component to package.json - * Added debug.component.js build - -0.6.0 / 2012-03-16 -================== - - * Added support for "-" prefix in DEBUG [Vinay Pulim] - * Added `.enabled` flag to the node version [TooTallNate] - -0.5.0 / 2012-02-02 -================== - - * Added: humanize diffs. Closes #8 - * Added `debug.disable()` to the CS variant - * Removed padding. Closes #10 - * Fixed: persist client-side variant again. Closes #9 - -0.4.0 / 2012-02-01 -================== - - * Added browser variant support for older browsers [TooTallNate] - * Added `debug.enable('project:*')` to browser variant [TooTallNate] - * Added padding to diff (moved it to the right) - -0.3.0 / 2012-01-26 -================== - - * Added millisecond diff when isatty, otherwise UTC string - -0.2.0 / 2012-01-22 -================== - - * Added wildcard support - -0.1.0 / 2011-12-02 -================== - - * Added: remove colors unless stderr isatty [TooTallNate] - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/finalhandler/node_modules/debug/LICENSE b/node_modules/finalhandler/node_modules/debug/LICENSE deleted file mode 100644 index 658c933..0000000 --- a/node_modules/finalhandler/node_modules/debug/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 TJ Holowaychuk - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/finalhandler/node_modules/debug/Makefile b/node_modules/finalhandler/node_modules/debug/Makefile deleted file mode 100644 index 584da8b..0000000 --- a/node_modules/finalhandler/node_modules/debug/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -# get Makefile directory name: http://stackoverflow.com/a/5982798/376773 -THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) -THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) - -# BIN directory -BIN := $(THIS_DIR)/node_modules/.bin - -# Path -PATH := node_modules/.bin:$(PATH) -SHELL := /bin/bash - -# applications -NODE ?= $(shell which node) -YARN ?= $(shell which yarn) -PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm)) -BROWSERIFY ?= $(NODE) $(BIN)/browserify - -.FORCE: - -install: node_modules - -node_modules: package.json - @NODE_ENV= $(PKG) install - @touch node_modules - -lint: .FORCE - eslint browser.js debug.js index.js node.js - -test-node: .FORCE - istanbul cover node_modules/mocha/bin/_mocha -- test/**.js - -test-browser: .FORCE - mkdir -p dist - - @$(BROWSERIFY) \ - --standalone debug \ - . > dist/debug.js - - karma start --single-run - rimraf dist - -test: .FORCE - concurrently \ - "make test-node" \ - "make test-browser" - -coveralls: - cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js - -.PHONY: all install clean distclean diff --git a/node_modules/finalhandler/node_modules/debug/README.md b/node_modules/finalhandler/node_modules/debug/README.md deleted file mode 100644 index f67be6b..0000000 --- a/node_modules/finalhandler/node_modules/debug/README.md +++ /dev/null @@ -1,312 +0,0 @@ -# debug -[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) -[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) - - - -A tiny node.js debugging utility modelled after node core's debugging technique. - -**Discussion around the V3 API is under way [here](https://github.com/visionmedia/debug/issues/370)** - -## Installation - -```bash -$ npm install debug -``` - -## Usage - -`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. - -Example _app.js_: - -```js -var debug = require('debug')('http') - , http = require('http') - , name = 'My App'; - -// fake app - -debug('booting %s', name); - -http.createServer(function(req, res){ - debug(req.method + ' ' + req.url); - res.end('hello\n'); -}).listen(3000, function(){ - debug('listening'); -}); - -// fake worker of some kind - -require('./worker'); -``` - -Example _worker.js_: - -```js -var debug = require('debug')('worker'); - -setInterval(function(){ - debug('doing some work'); -}, 1000); -``` - - The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples: - - ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png) - - ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png) - -#### Windows note - - On Windows the environment variable is set using the `set` command. - - ```cmd - set DEBUG=*,-not_this - ``` - - Note that PowerShell uses different syntax to set environment variables. - - ```cmd - $env:DEBUG = "*,-not_this" - ``` - -Then, run the program to be debugged as usual. - -## Millisecond diff - - When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - - ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png) - - When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below: - - ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png) - -## Conventions - - If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". - -## Wildcards - - The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. - - You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:". - -## Environment Variables - - When running through Node.js, you can set a few environment variables that will - change the behavior of the debug logging: - -| Name | Purpose | -|-----------|-------------------------------------------------| -| `DEBUG` | Enables/disables specific debugging namespaces. | -| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | -| `DEBUG_DEPTH` | Object inspection depth. | -| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | - - - __Note:__ The environment variables beginning with `DEBUG_` end up being - converted into an Options object that gets used with `%o`/`%O` formatters. - See the Node.js documentation for - [`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) - for the complete list. - -## Formatters - - - Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. Below are the officially supported formatters: - -| Formatter | Representation | -|-----------|----------------| -| `%O` | Pretty-print an Object on multiple lines. | -| `%o` | Pretty-print an Object all on a single line. | -| `%s` | String. | -| `%d` | Number (both integer and float). | -| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | -| `%%` | Single percent sign ('%'). This does not consume an argument. | - -### Custom formatters - - You can add custom formatters by extending the `debug.formatters` object. For example, if you wanted to add support for rendering a Buffer as hex with `%h`, you could do something like: - -```js -const createDebug = require('debug') -createDebug.formatters.h = (v) => { - return v.toString('hex') -} - -// …elsewhere -const debug = createDebug('foo') -debug('this is hex: %h', new Buffer('hello world')) -// foo this is hex: 68656c6c6f20776f726c6421 +0ms -``` - -## Browser support - You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), - or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), - if you don't want to build it yourself. - - Debug's enable state is currently persisted by `localStorage`. - Consider the situation shown below where you have `worker:a` and `worker:b`, - and wish to debug both. You can enable this using `localStorage.debug`: - -```js -localStorage.debug = 'worker:*' -``` - -And then refresh the page. - -```js -a = debug('worker:a'); -b = debug('worker:b'); - -setInterval(function(){ - a('doing some work'); -}, 1000); - -setInterval(function(){ - b('doing some work'); -}, 1200); -``` - -#### Web Inspector Colors - - Colors are also enabled on "Web Inspectors" that understand the `%c` formatting - option. These are WebKit web inspectors, Firefox ([since version - 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) - and the Firebug plugin for Firefox (any version). - - Colored output looks something like: - - ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png) - - -## Output streams - - By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: - -Example _stdout.js_: - -```js -var debug = require('debug'); -var error = debug('app:error'); - -// by default stderr is used -error('goes to stderr!'); - -var log = debug('app:log'); -// set this namespace to log via console.log -log.log = console.log.bind(console); // don't forget to bind to console! -log('goes to stdout'); -error('still goes to stderr!'); - -// set all output to go via console.info -// overrides all per-namespace log settings -debug.log = console.info.bind(console); -error('now goes to stdout via console.info'); -log('still goes to stdout, but via console.info now'); -``` - - -## Authors - - - TJ Holowaychuk - - Nathan Rajlich - - Andrew Rhyne - -## Backers - -Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Sponsors - -Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## License - -(The MIT License) - -Copyright (c) 2014-2016 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/finalhandler/node_modules/debug/component.json b/node_modules/finalhandler/node_modules/debug/component.json deleted file mode 100644 index 9de2641..0000000 --- a/node_modules/finalhandler/node_modules/debug/component.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "debug", - "repo": "visionmedia/debug", - "description": "small debugging utility", - "version": "2.6.9", - "keywords": [ - "debug", - "log", - "debugger" - ], - "main": "src/browser.js", - "scripts": [ - "src/browser.js", - "src/debug.js" - ], - "dependencies": { - "rauchg/ms.js": "0.7.1" - } -} diff --git a/node_modules/finalhandler/node_modules/debug/karma.conf.js b/node_modules/finalhandler/node_modules/debug/karma.conf.js deleted file mode 100644 index 103a82d..0000000 --- a/node_modules/finalhandler/node_modules/debug/karma.conf.js +++ /dev/null @@ -1,70 +0,0 @@ -// Karma configuration -// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC) - -module.exports = function(config) { - config.set({ - - // base path that will be used to resolve all patterns (eg. files, exclude) - basePath: '', - - - // frameworks to use - // available frameworks: https://npmjs.org/browse/keyword/karma-adapter - frameworks: ['mocha', 'chai', 'sinon'], - - - // list of files / patterns to load in the browser - files: [ - 'dist/debug.js', - 'test/*spec.js' - ], - - - // list of files to exclude - exclude: [ - 'src/node.js' - ], - - - // preprocess matching files before serving them to the browser - // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor - preprocessors: { - }, - - // test results reporter to use - // possible values: 'dots', 'progress' - // available reporters: https://npmjs.org/browse/keyword/karma-reporter - reporters: ['progress'], - - - // web server port - port: 9876, - - - // enable / disable colors in the output (reporters and logs) - colors: true, - - - // level of logging - // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG - logLevel: config.LOG_INFO, - - - // enable / disable watching file and executing tests whenever any file changes - autoWatch: true, - - - // start these browsers - // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher - browsers: ['PhantomJS'], - - - // Continuous Integration mode - // if true, Karma captures browsers, runs the tests and exits - singleRun: false, - - // Concurrency level - // how many browser should be started simultaneous - concurrency: Infinity - }) -} diff --git a/node_modules/finalhandler/node_modules/debug/node.js b/node_modules/finalhandler/node_modules/debug/node.js deleted file mode 100644 index 7fc36fe..0000000 --- a/node_modules/finalhandler/node_modules/debug/node.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./src/node'); diff --git a/node_modules/finalhandler/node_modules/debug/package.json b/node_modules/finalhandler/node_modules/debug/package.json deleted file mode 100644 index dc787ba..0000000 --- a/node_modules/finalhandler/node_modules/debug/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "debug", - "version": "2.6.9", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/debug.git" - }, - "description": "small debugging utility", - "keywords": [ - "debug", - "log", - "debugger" - ], - "author": "TJ Holowaychuk ", - "contributors": [ - "Nathan Rajlich (http://n8.io)", - "Andrew Rhyne " - ], - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - }, - "devDependencies": { - "browserify": "9.0.3", - "chai": "^3.5.0", - "concurrently": "^3.1.0", - "coveralls": "^2.11.15", - "eslint": "^3.12.1", - "istanbul": "^0.4.5", - "karma": "^1.3.0", - "karma-chai": "^0.1.0", - "karma-mocha": "^1.3.0", - "karma-phantomjs-launcher": "^1.0.2", - "karma-sinon": "^1.0.5", - "mocha": "^3.2.0", - "mocha-lcov-reporter": "^1.2.0", - "rimraf": "^2.5.4", - "sinon": "^1.17.6", - "sinon-chai": "^2.8.0" - }, - "main": "./src/index.js", - "browser": "./src/browser.js", - "component": { - "scripts": { - "debug/index.js": "browser.js", - "debug/debug.js": "debug.js" - } - } -} diff --git a/node_modules/finalhandler/node_modules/debug/src/browser.js b/node_modules/finalhandler/node_modules/debug/src/browser.js deleted file mode 100644 index 7106924..0000000 --- a/node_modules/finalhandler/node_modules/debug/src/browser.js +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This is the web browser implementation of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = require('./debug'); -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = 'undefined' != typeof chrome - && 'undefined' != typeof chrome.storage - ? chrome.storage.local - : localstorage(); - -/** - * Colors. - */ - -exports.colors = [ - 'lightseagreen', - 'forestgreen', - 'goldenrod', - 'dodgerblue', - 'darkorchid', - 'crimson' -]; - -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') { - return true; - } - - // is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || - // double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); -} - -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -exports.formatters.j = function(v) { - try { - return JSON.stringify(v); - } catch (err) { - return '[UnexpectedJSONParseError]: ' + err.message; - } -}; - - -/** - * Colorize log arguments if enabled. - * - * @api public - */ - -function formatArgs(args) { - var useColors = this.useColors; - - args[0] = (useColors ? '%c' : '') - + this.namespace - + (useColors ? ' %c' : ' ') - + args[0] - + (useColors ? '%c ' : ' ') - + '+' + exports.humanize(this.diff); - - if (!useColors) return; - - var c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit') - - // the final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - var index = 0; - var lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, function(match) { - if ('%%' === match) return; - index++; - if ('%c' === match) { - // we only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); -} - -/** - * Invokes `console.log()` when available. - * No-op when `console.log` is not a "function". - * - * @api public - */ - -function log() { - // this hackery is required for IE8/9, where - // the `console.log` function doesn't have 'apply' - return 'object' === typeof console - && console.log - && Function.prototype.apply.call(console.log, console, arguments); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - -function save(namespaces) { - try { - if (null == namespaces) { - exports.storage.removeItem('debug'); - } else { - exports.storage.debug = namespaces; - } - } catch(e) {} -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - var r; - try { - r = exports.storage.debug; - } catch(e) {} - - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; -} - -/** - * Enable namespaces listed in `localStorage.debug` initially. - */ - -exports.enable(load()); - -/** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - -function localstorage() { - try { - return window.localStorage; - } catch (e) {} -} diff --git a/node_modules/finalhandler/node_modules/debug/src/debug.js b/node_modules/finalhandler/node_modules/debug/src/debug.js deleted file mode 100644 index 6a5e3fc..0000000 --- a/node_modules/finalhandler/node_modules/debug/src/debug.js +++ /dev/null @@ -1,202 +0,0 @@ - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = createDebug.debug = createDebug['default'] = createDebug; -exports.coerce = coerce; -exports.disable = disable; -exports.enable = enable; -exports.enabled = enabled; -exports.humanize = require('ms'); - -/** - * The currently active debug mode names, and names to skip. - */ - -exports.names = []; -exports.skips = []; - -/** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - -exports.formatters = {}; - -/** - * Previous log timestamp. - */ - -var prevTime; - -/** - * Select a color. - * @param {String} namespace - * @return {Number} - * @api private - */ - -function selectColor(namespace) { - var hash = 0, i; - - for (i in namespace) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return exports.colors[Math.abs(hash) % exports.colors.length]; -} - -/** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - -function createDebug(namespace) { - - function debug() { - // disabled? - if (!debug.enabled) return; - - var self = debug; - - // set `diff` timestamp - var curr = +new Date(); - var ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - // turn the `arguments` into a proper Array - var args = new Array(arguments.length); - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i]; - } - - args[0] = exports.coerce(args[0]); - - if ('string' !== typeof args[0]) { - // anything else let's inspect with %O - args.unshift('%O'); - } - - // apply any `formatters` transformations - var index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) { - // if we encounter an escaped % then don't increase the array index - if (match === '%%') return match; - index++; - var formatter = exports.formatters[format]; - if ('function' === typeof formatter) { - var val = args[index]; - match = formatter.call(self, val); - - // now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // apply env-specific formatting (colors, etc.) - exports.formatArgs.call(self, args); - - var logFn = debug.log || exports.log || console.log.bind(console); - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.enabled = exports.enabled(namespace); - debug.useColors = exports.useColors(); - debug.color = selectColor(namespace); - - // env-specific initialization logic for debug instances - if ('function' === typeof exports.init) { - exports.init(debug); - } - - return debug; -} - -/** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - -function enable(namespaces) { - exports.save(namespaces); - - exports.names = []; - exports.skips = []; - - var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - var len = split.length; - - for (var i = 0; i < len; i++) { - if (!split[i]) continue; // ignore empty strings - namespaces = split[i].replace(/\*/g, '.*?'); - if (namespaces[0] === '-') { - exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); - } else { - exports.names.push(new RegExp('^' + namespaces + '$')); - } - } -} - -/** - * Disable debug output. - * - * @api public - */ - -function disable() { - exports.enable(''); -} - -/** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - -function enabled(name) { - var i, len; - for (i = 0, len = exports.skips.length; i < len; i++) { - if (exports.skips[i].test(name)) { - return false; - } - } - for (i = 0, len = exports.names.length; i < len; i++) { - if (exports.names[i].test(name)) { - return true; - } - } - return false; -} - -/** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - -function coerce(val) { - if (val instanceof Error) return val.stack || val.message; - return val; -} diff --git a/node_modules/finalhandler/node_modules/debug/src/index.js b/node_modules/finalhandler/node_modules/debug/src/index.js deleted file mode 100644 index e12cf4d..0000000 --- a/node_modules/finalhandler/node_modules/debug/src/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Detect Electron renderer process, which is node, but we should - * treat as a browser. - */ - -if (typeof process !== 'undefined' && process.type === 'renderer') { - module.exports = require('./browser.js'); -} else { - module.exports = require('./node.js'); -} diff --git a/node_modules/finalhandler/node_modules/debug/src/inspector-log.js b/node_modules/finalhandler/node_modules/debug/src/inspector-log.js deleted file mode 100644 index 60ea6c0..0000000 --- a/node_modules/finalhandler/node_modules/debug/src/inspector-log.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = inspectorLog; - -// black hole -const nullStream = new (require('stream').Writable)(); -nullStream._write = () => {}; - -/** - * Outputs a `console.log()` to the Node.js Inspector console *only*. - */ -function inspectorLog() { - const stdout = console._stdout; - console._stdout = nullStream; - console.log.apply(console, arguments); - console._stdout = stdout; -} diff --git a/node_modules/finalhandler/node_modules/debug/src/node.js b/node_modules/finalhandler/node_modules/debug/src/node.js deleted file mode 100644 index b15109c..0000000 --- a/node_modules/finalhandler/node_modules/debug/src/node.js +++ /dev/null @@ -1,248 +0,0 @@ -/** - * Module dependencies. - */ - -var tty = require('tty'); -var util = require('util'); - -/** - * This is the Node.js implementation of `debug()`. - * - * Expose `debug()` as the module. - */ - -exports = module.exports = require('./debug'); -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; - -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - -exports.inspectOpts = Object.keys(process.env).filter(function (key) { - return /^debug_/i.test(key); -}).reduce(function (obj, key) { - // camel-case - var prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() }); - - // coerce string value into JS value - var val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) val = true; - else if (/^(no|off|false|disabled)$/i.test(val)) val = false; - else if (val === 'null') val = null; - else val = Number(val); - - obj[prop] = val; - return obj; -}, {}); - -/** - * The file descriptor to write the `debug()` calls to. - * Set the `DEBUG_FD` env variable to override with another value. i.e.: - * - * $ DEBUG_FD=3 node script.js 3>debug.log - */ - -var fd = parseInt(process.env.DEBUG_FD, 10) || 2; - -if (1 !== fd && 2 !== fd) { - util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')() -} - -var stream = 1 === fd ? process.stdout : - 2 === fd ? process.stderr : - createWritableStdioStream(fd); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - return 'colors' in exports.inspectOpts - ? Boolean(exports.inspectOpts.colors) - : tty.isatty(fd); -} - -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -exports.formatters.o = function(v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n').map(function(str) { - return str.trim() - }).join(' '); -}; - -/** - * Map %o to `util.inspect()`, allowing multiple lines if needed. - */ - -exports.formatters.O = function(v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs(args) { - var name = this.namespace; - var useColors = this.useColors; - - if (useColors) { - var c = this.color; - var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m'; - - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m'); - } else { - args[0] = new Date().toUTCString() - + ' ' + name + ' ' + args[0]; - } -} - -/** - * Invokes `util.format()` with the specified arguments and writes to `stream`. - */ - -function log() { - return stream.write(util.format.apply(util, arguments) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - -function save(namespaces) { - if (null == namespaces) { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } else { - process.env.DEBUG = namespaces; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Copied from `node/src/node.js`. - * - * XXX: It's lame that node doesn't expose this API out-of-the-box. It also - * relies on the undocumented `tty_wrap.guessHandleType()` which is also lame. - */ - -function createWritableStdioStream (fd) { - var stream; - var tty_wrap = process.binding('tty_wrap'); - - // Note stream._type is used for test-module-load-list.js - - switch (tty_wrap.guessHandleType(fd)) { - case 'TTY': - stream = new tty.WriteStream(fd); - stream._type = 'tty'; - - // Hack to have stream not keep the event loop alive. - // See https://github.com/joyent/node/issues/1726 - if (stream._handle && stream._handle.unref) { - stream._handle.unref(); - } - break; - - case 'FILE': - var fs = require('fs'); - stream = new fs.SyncWriteStream(fd, { autoClose: false }); - stream._type = 'fs'; - break; - - case 'PIPE': - case 'TCP': - var net = require('net'); - stream = new net.Socket({ - fd: fd, - readable: false, - writable: true - }); - - // FIXME Should probably have an option in net.Socket to create a - // stream from an existing fd which is writable only. But for now - // we'll just add this hack and set the `readable` member to false. - // Test: ./node test/fixtures/echo.js < /etc/passwd - stream.readable = false; - stream.read = null; - stream._type = 'pipe'; - - // FIXME Hack to have stream not keep the event loop alive. - // See https://github.com/joyent/node/issues/1726 - if (stream._handle && stream._handle.unref) { - stream._handle.unref(); - } - break; - - default: - // Probably an error on in uv_guess_handle() - throw new Error('Implement me. Unknown stream file type!'); - } - - // For supporting legacy API we put the FD here. - stream.fd = fd; - - stream._isStdio = true; - - return stream; -} - -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - -function init (debug) { - debug.inspectOpts = {}; - - var keys = Object.keys(exports.inspectOpts); - for (var i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -/** - * Enable namespaces listed in `process.env.DEBUG` initially. - */ - -exports.enable(load()); diff --git a/node_modules/finalhandler/node_modules/ms/index.js b/node_modules/finalhandler/node_modules/ms/index.js deleted file mode 100644 index 6a522b1..0000000 --- a/node_modules/finalhandler/node_modules/ms/index.js +++ /dev/null @@ -1,152 +0,0 @@ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - -module.exports = function(val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isNaN(val) === false) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtShort(ms) { - if (ms >= d) { - return Math.round(ms / d) + 'd'; - } - if (ms >= h) { - return Math.round(ms / h) + 'h'; - } - if (ms >= m) { - return Math.round(ms / m) + 'm'; - } - if (ms >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtLong(ms) { - return plural(ms, d, 'day') || - plural(ms, h, 'hour') || - plural(ms, m, 'minute') || - plural(ms, s, 'second') || - ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, n, name) { - if (ms < n) { - return; - } - if (ms < n * 1.5) { - return Math.floor(ms / n) + ' ' + name; - } - return Math.ceil(ms / n) + ' ' + name + 's'; -} diff --git a/node_modules/finalhandler/node_modules/ms/license.md b/node_modules/finalhandler/node_modules/ms/license.md deleted file mode 100644 index 69b6125..0000000 --- a/node_modules/finalhandler/node_modules/ms/license.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Zeit, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/finalhandler/node_modules/ms/package.json b/node_modules/finalhandler/node_modules/ms/package.json deleted file mode 100644 index 6a31c81..0000000 --- a/node_modules/finalhandler/node_modules/ms/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "ms", - "version": "2.0.0", - "description": "Tiny milisecond conversion utility", - "repository": "zeit/ms", - "main": "./index", - "files": [ - "index.js" - ], - "scripts": { - "precommit": "lint-staged", - "lint": "eslint lib/* bin/*", - "test": "mocha tests.js" - }, - "eslintConfig": { - "extends": "eslint:recommended", - "env": { - "node": true, - "es6": true - } - }, - "lint-staged": { - "*.js": [ - "npm run lint", - "prettier --single-quote --write", - "git add" - ] - }, - "license": "MIT", - "devDependencies": { - "eslint": "3.19.0", - "expect.js": "0.3.1", - "husky": "0.13.3", - "lint-staged": "3.4.1", - "mocha": "3.4.1" - } -} diff --git a/node_modules/finalhandler/node_modules/ms/readme.md b/node_modules/finalhandler/node_modules/ms/readme.md deleted file mode 100644 index 84a9974..0000000 --- a/node_modules/finalhandler/node_modules/ms/readme.md +++ /dev/null @@ -1,51 +0,0 @@ -# ms - -[![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) -[![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) - -Use this package to easily convert various time formats to milliseconds. - -## Examples - -```js -ms('2 days') // 172800000 -ms('1d') // 86400000 -ms('10h') // 36000000 -ms('2.5 hrs') // 9000000 -ms('2h') // 7200000 -ms('1m') // 60000 -ms('5s') // 5000 -ms('1y') // 31557600000 -ms('100') // 100 -``` - -### Convert from milliseconds - -```js -ms(60000) // "1m" -ms(2 * 60000) // "2m" -ms(ms('10 hours')) // "10h" -``` - -### Time format written-out - -```js -ms(60000, { long: true }) // "1 minute" -ms(2 * 60000, { long: true }) // "2 minutes" -ms(ms('10 hours'), { long: true }) // "10 hours" -``` - -## Features - -- Works both in [node](https://nodejs.org) and in the browser. -- If a number is supplied to `ms`, a string with a unit is returned. -- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`). -- If you pass a string with a number and a valid unit, the number of equivalent ms is returned. - -## Caught a bug? - -1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device -2. Link the package to the global module directory: `npm link` -3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms! - -As always, you can run the tests using: `npm test` diff --git a/node_modules/finalhandler/package.json b/node_modules/finalhandler/package.json deleted file mode 100644 index ce618dc..0000000 --- a/node_modules/finalhandler/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "finalhandler", - "description": "Node.js final http responder", - "version": "1.3.2", - "author": "Douglas Christopher Wilson ", - "license": "MIT", - "repository": "pillarjs/finalhandler", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "on-finished": "~2.4.1", - "parseurl": "~1.3.3", - "statuses": "~2.0.2", - "unpipe": "~1.0.0" - }, - "devDependencies": { - "eslint": "7.32.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.26.0", - "eslint-plugin-markdown": "2.2.1", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "5.2.0", - "eslint-plugin-standard": "4.1.0", - "mocha": "10.0.0", - "nyc": "15.1.0", - "readable-stream": "2.3.6", - "safe-buffer": "5.2.1", - "supertest": "6.2.4" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "SECURITY.md", - "index.js" - ], - "engines": { - "node": ">= 0.8" - }, - "scripts": { - "lint": "eslint .", - "test": "mocha --reporter spec --check-leaks test/", - "test-ci": "nyc --reporter=lcovonly --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "test-inspect": "mocha --reporter spec --inspect --inspect-brk test/" - } -} diff --git a/node_modules/forwarded/HISTORY.md b/node_modules/forwarded/HISTORY.md deleted file mode 100644 index 381e6aa..0000000 --- a/node_modules/forwarded/HISTORY.md +++ /dev/null @@ -1,21 +0,0 @@ -0.2.0 / 2021-05-31 -================== - - * Use `req.socket` over deprecated `req.connection` - -0.1.2 / 2017-09-14 -================== - - * perf: improve header parsing - * perf: reduce overhead when no `X-Forwarded-For` header - -0.1.1 / 2017-09-10 -================== - - * Fix trimming leading / trailing OWS - * perf: hoist regular expression - -0.1.0 / 2014-09-21 -================== - - * Initial release diff --git a/node_modules/forwarded/LICENSE b/node_modules/forwarded/LICENSE deleted file mode 100644 index 84441fb..0000000 --- a/node_modules/forwarded/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2014-2017 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/forwarded/README.md b/node_modules/forwarded/README.md deleted file mode 100644 index fdd220b..0000000 --- a/node_modules/forwarded/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# forwarded - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][ci-image]][ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Parse HTTP X-Forwarded-For header - -## Installation - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install forwarded -``` - -## API - -```js -var forwarded = require('forwarded') -``` - -### forwarded(req) - -```js -var addresses = forwarded(req) -``` - -Parse the `X-Forwarded-For` header from the request. Returns an array -of the addresses, including the socket address for the `req`, in reverse -order (i.e. index `0` is the socket address and the last index is the -furthest address, typically the end-user). - -## Testing - -```sh -$ npm test -``` - -## License - -[MIT](LICENSE) - -[ci-image]: https://badgen.net/github/checks/jshttp/forwarded/master?label=ci -[ci-url]: https://github.com/jshttp/forwarded/actions?query=workflow%3Aci -[npm-image]: https://img.shields.io/npm/v/forwarded.svg -[npm-url]: https://npmjs.org/package/forwarded -[node-version-image]: https://img.shields.io/node/v/forwarded.svg -[node-version-url]: https://nodejs.org/en/download/ -[coveralls-image]: https://img.shields.io/coveralls/jshttp/forwarded/master.svg -[coveralls-url]: https://coveralls.io/r/jshttp/forwarded?branch=master -[downloads-image]: https://img.shields.io/npm/dm/forwarded.svg -[downloads-url]: https://npmjs.org/package/forwarded diff --git a/node_modules/forwarded/index.js b/node_modules/forwarded/index.js deleted file mode 100644 index b2b6bdd..0000000 --- a/node_modules/forwarded/index.js +++ /dev/null @@ -1,90 +0,0 @@ -/*! - * forwarded - * Copyright(c) 2014-2017 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module exports. - * @public - */ - -module.exports = forwarded - -/** - * Get all addresses in the request, using the `X-Forwarded-For` header. - * - * @param {object} req - * @return {array} - * @public - */ - -function forwarded (req) { - if (!req) { - throw new TypeError('argument req is required') - } - - // simple header parsing - var proxyAddrs = parse(req.headers['x-forwarded-for'] || '') - var socketAddr = getSocketAddr(req) - var addrs = [socketAddr].concat(proxyAddrs) - - // return all addresses - return addrs -} - -/** - * Get the socket address for a request. - * - * @param {object} req - * @return {string} - * @private - */ - -function getSocketAddr (req) { - return req.socket - ? req.socket.remoteAddress - : req.connection.remoteAddress -} - -/** - * Parse the X-Forwarded-For header. - * - * @param {string} header - * @private - */ - -function parse (header) { - var end = header.length - var list = [] - var start = header.length - - // gather addresses, backwards - for (var i = header.length - 1; i >= 0; i--) { - switch (header.charCodeAt(i)) { - case 0x20: /* */ - if (start === end) { - start = end = i - } - break - case 0x2c: /* , */ - if (start !== end) { - list.push(header.substring(start, end)) - } - start = end = i - break - default: - start = i - break - } - } - - // final address - if (start !== end) { - list.push(header.substring(start, end)) - } - - return list -} diff --git a/node_modules/forwarded/package.json b/node_modules/forwarded/package.json deleted file mode 100644 index bf9c7d6..0000000 --- a/node_modules/forwarded/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "forwarded", - "description": "Parse HTTP X-Forwarded-For header", - "version": "0.2.0", - "contributors": [ - "Douglas Christopher Wilson " - ], - "license": "MIT", - "keywords": [ - "x-forwarded-for", - "http", - "req" - ], - "repository": "jshttp/forwarded", - "devDependencies": { - "beautify-benchmark": "0.2.4", - "benchmark": "2.1.4", - "deep-equal": "1.0.1", - "eslint": "7.27.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.23.4", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "4.3.1", - "eslint-plugin-standard": "4.1.0", - "mocha": "8.4.0", - "nyc": "15.1.0" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "README.md", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "bench": "node benchmark/index.js", - "lint": "eslint .", - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "version": "node scripts/version-history.js && git add HISTORY.md" - } -} diff --git a/node_modules/fresh/HISTORY.md b/node_modules/fresh/HISTORY.md deleted file mode 100644 index 4586996..0000000 --- a/node_modules/fresh/HISTORY.md +++ /dev/null @@ -1,70 +0,0 @@ -0.5.2 / 2017-09-13 -================== - - * Fix regression matching multiple ETags in `If-None-Match` - * perf: improve `If-None-Match` token parsing - -0.5.1 / 2017-09-11 -================== - - * Fix handling of modified headers with invalid dates - * perf: improve ETag match loop - -0.5.0 / 2017-02-21 -================== - - * Fix incorrect result when `If-None-Match` has both `*` and ETags - * Fix weak `ETag` matching to match spec - * perf: delay reading header values until needed - * perf: skip checking modified time if ETag check failed - * perf: skip parsing `If-None-Match` when no `ETag` header - * perf: use `Date.parse` instead of `new Date` - -0.4.0 / 2017-02-05 -================== - - * Fix false detection of `no-cache` request directive - * perf: enable strict mode - * perf: hoist regular expressions - * perf: remove duplicate conditional - * perf: remove unnecessary boolean coercions - -0.3.0 / 2015-05-12 -================== - - * Add weak `ETag` matching support - -0.2.4 / 2014-09-07 -================== - - * Support Node.js 0.6 - -0.2.3 / 2014-09-07 -================== - - * Move repository to jshttp - -0.2.2 / 2014-02-19 -================== - - * Revert "Fix for blank page on Safari reload" - -0.2.1 / 2014-01-29 -================== - - * Fix for blank page on Safari reload - -0.2.0 / 2013-08-11 -================== - - * Return stale for `Cache-Control: no-cache` - -0.1.0 / 2012-06-15 -================== - - * Add `If-None-Match: *` support - -0.0.1 / 2012-06-10 -================== - - * Initial release diff --git a/node_modules/fresh/LICENSE b/node_modules/fresh/LICENSE deleted file mode 100644 index 1434ade..0000000 --- a/node_modules/fresh/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2012 TJ Holowaychuk -Copyright (c) 2016-2017 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/fresh/README.md b/node_modules/fresh/README.md deleted file mode 100644 index 1c1c680..0000000 --- a/node_modules/fresh/README.md +++ /dev/null @@ -1,119 +0,0 @@ -# fresh - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -HTTP response freshness testing - -## Installation - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -``` -$ npm install fresh -``` - -## API - - - -```js -var fresh = require('fresh') -``` - -### fresh(reqHeaders, resHeaders) - -Check freshness of the response using request and response headers. - -When the response is still "fresh" in the client's cache `true` is -returned, otherwise `false` is returned to indicate that the client -cache is now stale and the full response should be sent. - -When a client sends the `Cache-Control: no-cache` request header to -indicate an end-to-end reload request, this module will return `false` -to make handling these requests transparent. - -## Known Issues - -This module is designed to only follow the HTTP specifications, not -to work-around all kinda of client bugs (especially since this module -typically does not recieve enough information to understand what the -client actually is). - -There is a known issue that in certain versions of Safari, Safari -will incorrectly make a request that allows this module to validate -freshness of the resource even when Safari does not have a -representation of the resource in the cache. The module -[jumanji](https://www.npmjs.com/package/jumanji) can be used in -an Express application to work-around this issue and also provides -links to further reading on this Safari bug. - -## Example - -### API usage - - - -```js -var reqHeaders = { 'if-none-match': '"foo"' } -var resHeaders = { 'etag': '"bar"' } -fresh(reqHeaders, resHeaders) -// => false - -var reqHeaders = { 'if-none-match': '"foo"' } -var resHeaders = { 'etag': '"foo"' } -fresh(reqHeaders, resHeaders) -// => true -``` - -### Using with Node.js http server - -```js -var fresh = require('fresh') -var http = require('http') - -var server = http.createServer(function (req, res) { - // perform server logic - // ... including adding ETag / Last-Modified response headers - - if (isFresh(req, res)) { - // client has a fresh copy of resource - res.statusCode = 304 - res.end() - return - } - - // send the resource - res.statusCode = 200 - res.end('hello, world!') -}) - -function isFresh (req, res) { - return fresh(req.headers, { - 'etag': res.getHeader('ETag'), - 'last-modified': res.getHeader('Last-Modified') - }) -} - -server.listen(3000) -``` - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/fresh.svg -[npm-url]: https://npmjs.org/package/fresh -[node-version-image]: https://img.shields.io/node/v/fresh.svg -[node-version-url]: https://nodejs.org/en/ -[travis-image]: https://img.shields.io/travis/jshttp/fresh/master.svg -[travis-url]: https://travis-ci.org/jshttp/fresh -[coveralls-image]: https://img.shields.io/coveralls/jshttp/fresh/master.svg -[coveralls-url]: https://coveralls.io/r/jshttp/fresh?branch=master -[downloads-image]: https://img.shields.io/npm/dm/fresh.svg -[downloads-url]: https://npmjs.org/package/fresh diff --git a/node_modules/fresh/index.js b/node_modules/fresh/index.js deleted file mode 100644 index d154f5a..0000000 --- a/node_modules/fresh/index.js +++ /dev/null @@ -1,137 +0,0 @@ -/*! - * fresh - * Copyright(c) 2012 TJ Holowaychuk - * Copyright(c) 2016-2017 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * RegExp to check for no-cache token in Cache-Control. - * @private - */ - -var CACHE_CONTROL_NO_CACHE_REGEXP = /(?:^|,)\s*?no-cache\s*?(?:,|$)/ - -/** - * Module exports. - * @public - */ - -module.exports = fresh - -/** - * Check freshness of the response using request and response headers. - * - * @param {Object} reqHeaders - * @param {Object} resHeaders - * @return {Boolean} - * @public - */ - -function fresh (reqHeaders, resHeaders) { - // fields - var modifiedSince = reqHeaders['if-modified-since'] - var noneMatch = reqHeaders['if-none-match'] - - // unconditional request - if (!modifiedSince && !noneMatch) { - return false - } - - // Always return stale when Cache-Control: no-cache - // to support end-to-end reload requests - // https://tools.ietf.org/html/rfc2616#section-14.9.4 - var cacheControl = reqHeaders['cache-control'] - if (cacheControl && CACHE_CONTROL_NO_CACHE_REGEXP.test(cacheControl)) { - return false - } - - // if-none-match - if (noneMatch && noneMatch !== '*') { - var etag = resHeaders['etag'] - - if (!etag) { - return false - } - - var etagStale = true - var matches = parseTokenList(noneMatch) - for (var i = 0; i < matches.length; i++) { - var match = matches[i] - if (match === etag || match === 'W/' + etag || 'W/' + match === etag) { - etagStale = false - break - } - } - - if (etagStale) { - return false - } - } - - // if-modified-since - if (modifiedSince) { - var lastModified = resHeaders['last-modified'] - var modifiedStale = !lastModified || !(parseHttpDate(lastModified) <= parseHttpDate(modifiedSince)) - - if (modifiedStale) { - return false - } - } - - return true -} - -/** - * Parse an HTTP Date into a number. - * - * @param {string} date - * @private - */ - -function parseHttpDate (date) { - var timestamp = date && Date.parse(date) - - // istanbul ignore next: guard against date.js Date.parse patching - return typeof timestamp === 'number' - ? timestamp - : NaN -} - -/** - * Parse a HTTP token list. - * - * @param {string} str - * @private - */ - -function parseTokenList (str) { - var end = 0 - var list = [] - var start = 0 - - // gather tokens - for (var i = 0, len = str.length; i < len; i++) { - switch (str.charCodeAt(i)) { - case 0x20: /* */ - if (start === end) { - start = end = i + 1 - } - break - case 0x2c: /* , */ - list.push(str.substring(start, end)) - start = end = i + 1 - break - default: - end = i + 1 - break - } - } - - // final token - list.push(str.substring(start, end)) - - return list -} diff --git a/node_modules/fresh/package.json b/node_modules/fresh/package.json deleted file mode 100644 index c2fa0f4..0000000 --- a/node_modules/fresh/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "fresh", - "description": "HTTP response freshness testing", - "version": "0.5.2", - "author": "TJ Holowaychuk (http://tjholowaychuk.com)", - "contributors": [ - "Douglas Christopher Wilson ", - "Jonathan Ong (http://jongleberry.com)" - ], - "license": "MIT", - "keywords": [ - "fresh", - "http", - "conditional", - "cache" - ], - "repository": "jshttp/fresh", - "devDependencies": { - "beautify-benchmark": "0.2.4", - "benchmark": "2.1.4", - "eslint": "3.19.0", - "eslint-config-standard": "10.2.1", - "eslint-plugin-import": "2.7.0", - "eslint-plugin-markdown": "1.0.0-beta.6", - "eslint-plugin-node": "5.1.1", - "eslint-plugin-promise": "3.5.0", - "eslint-plugin-standard": "3.0.1", - "istanbul": "0.4.5", - "mocha": "1.21.5" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "bench": "node benchmark/index.js", - "lint": "eslint --plugin markdown --ext js,md .", - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" - } -} diff --git a/node_modules/function-bind/.eslintrc b/node_modules/function-bind/.eslintrc deleted file mode 100644 index 71a054f..0000000 --- a/node_modules/function-bind/.eslintrc +++ /dev/null @@ -1,21 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "func-name-matching": 0, - "indent": [2, 4], - "no-new-func": [1], - }, - - "overrides": [ - { - "files": "test/**", - "rules": { - "max-lines-per-function": 0, - "strict": [0] - }, - }, - ], -} diff --git a/node_modules/function-bind/.github/FUNDING.yml b/node_modules/function-bind/.github/FUNDING.yml deleted file mode 100644 index 7448219..0000000 --- a/node_modules/function-bind/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/function-bind -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/function-bind/.github/SECURITY.md b/node_modules/function-bind/.github/SECURITY.md deleted file mode 100644 index 82e4285..0000000 --- a/node_modules/function-bind/.github/SECURITY.md +++ /dev/null @@ -1,3 +0,0 @@ -# Security - -Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. diff --git a/node_modules/function-bind/.nycrc b/node_modules/function-bind/.nycrc deleted file mode 100644 index 1826526..0000000 --- a/node_modules/function-bind/.nycrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/function-bind/CHANGELOG.md b/node_modules/function-bind/CHANGELOG.md deleted file mode 100644 index f9e6cc0..0000000 --- a/node_modules/function-bind/CHANGELOG.md +++ /dev/null @@ -1,136 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.1.2](https://github.com/ljharb/function-bind/compare/v1.1.1...v1.1.2) - 2023-10-12 - -### Merged - -- Point to the correct file [`#16`](https://github.com/ljharb/function-bind/pull/16) - -### Commits - -- [Tests] migrate tests to Github Actions [`4f8b57c`](https://github.com/ljharb/function-bind/commit/4f8b57c02f2011fe9ae353d5e74e8745f0988af8) -- [Tests] remove `jscs` [`90eb2ed`](https://github.com/ljharb/function-bind/commit/90eb2edbeefd5b76cd6c3a482ea3454db169b31f) -- [meta] update `.gitignore` [`53fcdc3`](https://github.com/ljharb/function-bind/commit/53fcdc371cd66634d6e9b71c836a50f437e89fed) -- [Tests] up to `node` `v11.10`, `v10.15`, `v9.11`, `v8.15`, `v6.16`, `v4.9`; use `nvm install-latest-npm`; run audit script in tests [`1fe8f6e`](https://github.com/ljharb/function-bind/commit/1fe8f6e9aed0dfa8d8b3cdbd00c7f5ea0cd2b36e) -- [meta] add `auto-changelog` [`1921fcb`](https://github.com/ljharb/function-bind/commit/1921fcb5b416b63ffc4acad051b6aad5722f777d) -- [Robustness] remove runtime dependency on all builtins except `.apply` [`f743e61`](https://github.com/ljharb/function-bind/commit/f743e61aa6bb2360358c04d4884c9db853d118b7) -- Docs: enable badges; update wording [`503cb12`](https://github.com/ljharb/function-bind/commit/503cb12d998b5f91822776c73332c7adcd6355dd) -- [readme] update badges [`290c5db`](https://github.com/ljharb/function-bind/commit/290c5dbbbda7264efaeb886552a374b869a4bb48) -- [Tests] switch to nyc for coverage [`ea360ba`](https://github.com/ljharb/function-bind/commit/ea360ba907fc2601ed18d01a3827fa2d3533cdf8) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`cae5e9e`](https://github.com/ljharb/function-bind/commit/cae5e9e07a5578dc6df26c03ee22851ce05b943c) -- [meta] add `funding` field; create FUNDING.yml [`c9f4274`](https://github.com/ljharb/function-bind/commit/c9f4274aa80ea3aae9657a3938fdba41a3b04ca6) -- [Tests] fix eslint errors from #15 [`f69aaa2`](https://github.com/ljharb/function-bind/commit/f69aaa2beb2fdab4415bfb885760a699d0b9c964) -- [actions] fix permissions [`99a0cd9`](https://github.com/ljharb/function-bind/commit/99a0cd9f3b5bac223a0d572f081834cd73314be7) -- [meta] use `npmignore` to autogenerate an npmignore file [`f03b524`](https://github.com/ljharb/function-bind/commit/f03b524ca91f75a109a5d062f029122c86ecd1ae) -- [Dev Deps] update `@ljharb/eslint‑config`, `eslint`, `tape` [`7af9300`](https://github.com/ljharb/function-bind/commit/7af930023ae2ce7645489532821e4fbbcd7a2280) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape` [`64a9127`](https://github.com/ljharb/function-bind/commit/64a9127ab0bd331b93d6572eaf6e9971967fc08c) -- [Tests] use `aud` instead of `npm audit` [`e75069c`](https://github.com/ljharb/function-bind/commit/e75069c50010a8fcce2a9ce2324934c35fdb4386) -- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`d03555c`](https://github.com/ljharb/function-bind/commit/d03555ca59dea3b71ce710045e4303b9e2619e28) -- [meta] add `safe-publish-latest` [`9c8f809`](https://github.com/ljharb/function-bind/commit/9c8f8092aed027d7e80c94f517aa892385b64f09) -- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`baf6893`](https://github.com/ljharb/function-bind/commit/baf6893e27f5b59abe88bc1995e6f6ed1e527397) -- [meta] create SECURITY.md [`4db1779`](https://github.com/ljharb/function-bind/commit/4db17799f1f28ae294cb95e0081ca2b591c3911b) -- [Tests] add `npm run audit` [`c8b38ec`](https://github.com/ljharb/function-bind/commit/c8b38ec40ed3f85dabdee40ed4148f1748375bc2) -- Revert "Point to the correct file" [`05cdf0f`](https://github.com/ljharb/function-bind/commit/05cdf0fa205c6a3c5ba40bbedd1dfa9874f915c9) - -## [v1.1.1](https://github.com/ljharb/function-bind/compare/v1.1.0...v1.1.1) - 2017-08-28 - -### Commits - -- [Tests] up to `node` `v8`; newer npm breaks on older node; fix scripts [`817f7d2`](https://github.com/ljharb/function-bind/commit/817f7d28470fdbff8ef608d4d565dd4d1430bc5e) -- [Dev Deps] update `eslint`, `jscs`, `tape`, `@ljharb/eslint-config` [`854288b`](https://github.com/ljharb/function-bind/commit/854288b1b6f5c555f89aceb9eff1152510262084) -- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`83e639f`](https://github.com/ljharb/function-bind/commit/83e639ff74e6cd6921285bccec22c1bcf72311bd) -- Only apps should have lockfiles [`5ed97f5`](https://github.com/ljharb/function-bind/commit/5ed97f51235c17774e0832e122abda0f3229c908) -- Use a SPDX-compliant “license” field. [`5feefea`](https://github.com/ljharb/function-bind/commit/5feefea0dc0193993e83e5df01ded424403a5381) - -## [v1.1.0](https://github.com/ljharb/function-bind/compare/v1.0.2...v1.1.0) - 2016-02-14 - -### Commits - -- Update `eslint`, `tape`; use my personal shared `eslint` config [`9c9062a`](https://github.com/ljharb/function-bind/commit/9c9062abbe9dd70b59ea2c3a3c3a81f29b457097) -- Add `npm run eslint` [`dd96c56`](https://github.com/ljharb/function-bind/commit/dd96c56720034a3c1ffee10b8a59a6f7c53e24ad) -- [New] return the native `bind` when available. [`82186e0`](https://github.com/ljharb/function-bind/commit/82186e03d73e580f95ff167e03f3582bed90ed72) -- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`a3dd767`](https://github.com/ljharb/function-bind/commit/a3dd76720c795cb7f4586b0544efabf8aa107b8b) -- Update `eslint` [`3dae2f7`](https://github.com/ljharb/function-bind/commit/3dae2f7423de30a2d20313ddb1edc19660142fe9) -- Update `tape`, `covert`, `jscs` [`a181eee`](https://github.com/ljharb/function-bind/commit/a181eee0cfa24eb229c6e843a971f36e060a2f6a) -- [Tests] up to `node` `v5.6`, `v4.3` [`964929a`](https://github.com/ljharb/function-bind/commit/964929a6a4ddb36fb128de2bcc20af5e4f22e1ed) -- Test up to `io.js` `v2.1` [`2be7310`](https://github.com/ljharb/function-bind/commit/2be7310f2f74886a7124ca925be411117d41d5ea) -- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`45f3d68`](https://github.com/ljharb/function-bind/commit/45f3d6865c6ca93726abcef54febe009087af101) -- [Dev Deps] update `tape`, `jscs` [`6e1340d`](https://github.com/ljharb/function-bind/commit/6e1340d94642deaecad3e717825db641af4f8b1f) -- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`d9bad2b`](https://github.com/ljharb/function-bind/commit/d9bad2b778b1b3a6dd2876087b88b3acf319f8cc) -- Update `eslint` [`935590c`](https://github.com/ljharb/function-bind/commit/935590caa024ab356102e4858e8fc315b2ccc446) -- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`8c9a1ef`](https://github.com/ljharb/function-bind/commit/8c9a1efd848e5167887aa8501857a0940a480c57) -- Test on `io.js` `v2.2` [`9a3a38c`](https://github.com/ljharb/function-bind/commit/9a3a38c92013aed6e108666e7bd40969b84ac86e) -- Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. [`69afc26`](https://github.com/ljharb/function-bind/commit/69afc2617405b147dd2a8d8ae73ca9e9283f18b4) -- [Dev Deps] Update `tape`, `eslint` [`36c1be0`](https://github.com/ljharb/function-bind/commit/36c1be0ab12b45fe5df6b0fdb01a5d5137fd0115) -- Update `tape`, `jscs` [`98d8303`](https://github.com/ljharb/function-bind/commit/98d8303cd5ca1c6b8f985469f86b0d44d7d45f6e) -- Update `jscs` [`9633a4e`](https://github.com/ljharb/function-bind/commit/9633a4e9fbf82051c240855166e468ba8ba0846f) -- Update `tape`, `jscs` [`c80ef0f`](https://github.com/ljharb/function-bind/commit/c80ef0f46efc9791e76fa50de4414092ac147831) -- Test up to `io.js` `v3.0` [`7e2c853`](https://github.com/ljharb/function-bind/commit/7e2c8537d52ab9cf5a655755561d8917684c0df4) -- Test on `io.js` `v2.4` [`5a199a2`](https://github.com/ljharb/function-bind/commit/5a199a27ba46795ba5eaf0845d07d4b8232895c9) -- Test on `io.js` `v2.3` [`a511b88`](https://github.com/ljharb/function-bind/commit/a511b8896de0bddf3b56862daa416c701f4d0453) -- Fixing a typo from 822b4e1938db02dc9584aa434fd3a45cb20caf43 [`732d6b6`](https://github.com/ljharb/function-bind/commit/732d6b63a9b33b45230e630dbcac7a10855d3266) -- Update `jscs` [`da52a48`](https://github.com/ljharb/function-bind/commit/da52a4886c06d6490f46ae30b15e4163ba08905d) -- Lock covert to v1.0.0. [`d6150fd`](https://github.com/ljharb/function-bind/commit/d6150fda1e6f486718ebdeff823333d9e48e7430) - -## [v1.0.2](https://github.com/ljharb/function-bind/compare/v1.0.1...v1.0.2) - 2014-10-04 - -## [v1.0.1](https://github.com/ljharb/function-bind/compare/v1.0.0...v1.0.1) - 2014-10-03 - -### Merged - -- make CI build faster [`#3`](https://github.com/ljharb/function-bind/pull/3) - -### Commits - -- Using my standard jscs.json [`d8ee94c`](https://github.com/ljharb/function-bind/commit/d8ee94c993eff0a84cf5744fe6a29627f5cffa1a) -- Adding `npm run lint` [`7571ab7`](https://github.com/ljharb/function-bind/commit/7571ab7dfdbd99b25a1dbb2d232622bd6f4f9c10) -- Using consistent indentation [`e91a1b1`](https://github.com/ljharb/function-bind/commit/e91a1b13a61e99ec1e530e299b55508f74218a95) -- Updating jscs [`7e17892`](https://github.com/ljharb/function-bind/commit/7e1789284bc629bc9c1547a61c9b227bbd8c7a65) -- Using consistent quotes [`c50b57f`](https://github.com/ljharb/function-bind/commit/c50b57fcd1c5ec38320979c837006069ebe02b77) -- Adding keywords [`cb94631`](https://github.com/ljharb/function-bind/commit/cb946314eed35f21186a25fb42fc118772f9ee00) -- Directly export a function expression instead of using a declaration, and relying on hoisting. [`5a33c5f`](https://github.com/ljharb/function-bind/commit/5a33c5f45642de180e0d207110bf7d1843ceb87c) -- Naming npm URL and badge in README; use SVG [`2aef8fc`](https://github.com/ljharb/function-bind/commit/2aef8fcb79d54e63a58ae557c4e60949e05d5e16) -- Naming deps URLs in README [`04228d7`](https://github.com/ljharb/function-bind/commit/04228d766670ee45ca24e98345c1f6a7621065b5) -- Naming travis-ci URLs in README; using SVG [`62c810c`](https://github.com/ljharb/function-bind/commit/62c810c2f54ced956cd4d4ab7b793055addfe36e) -- Make sure functions are invoked correctly (also passing coverage tests) [`2b289b4`](https://github.com/ljharb/function-bind/commit/2b289b4dfbf037ffcfa4dc95eb540f6165e9e43a) -- Removing the strict mode pragmas; they make tests fail. [`1aa701d`](https://github.com/ljharb/function-bind/commit/1aa701d199ddc3782476e8f7eef82679be97b845) -- Adding myself as a contributor [`85fd57b`](https://github.com/ljharb/function-bind/commit/85fd57b0860e5a7af42de9a287f3f265fc6d72fc) -- Adding strict mode pragmas [`915b08e`](https://github.com/ljharb/function-bind/commit/915b08e084c86a722eafe7245e21db74aa21ca4c) -- Adding devDeps URLs to README [`4ccc731`](https://github.com/ljharb/function-bind/commit/4ccc73112c1769859e4ca3076caf4086b3cba2cd) -- Fixing the description. [`a7a472c`](https://github.com/ljharb/function-bind/commit/a7a472cf649af515c635cf560fc478fbe48999c8) -- Using a function expression instead of a function declaration. [`b5d3e4e`](https://github.com/ljharb/function-bind/commit/b5d3e4ea6aaffc63888953eeb1fbc7ff45f1fa14) -- Updating tape [`f086be6`](https://github.com/ljharb/function-bind/commit/f086be6029fb56dde61a258c1340600fa174d1e0) -- Updating jscs [`5f9bdb3`](https://github.com/ljharb/function-bind/commit/5f9bdb375ab13ba48f30852aab94029520c54d71) -- Updating jscs [`9b409ba`](https://github.com/ljharb/function-bind/commit/9b409ba6118e23395a4e5d83ef39152aab9d3bfc) -- Run coverage as part of tests. [`8e1b6d4`](https://github.com/ljharb/function-bind/commit/8e1b6d459f047d1bd4fee814e01247c984c80bd0) -- Run linter as part of tests [`c1ca83f`](https://github.com/ljharb/function-bind/commit/c1ca83f832df94587d09e621beba682fabfaa987) -- Updating covert [`701e837`](https://github.com/ljharb/function-bind/commit/701e83774b57b4d3ef631e1948143f43a72f4bb9) - -## [v1.0.0](https://github.com/ljharb/function-bind/compare/v0.2.0...v1.0.0) - 2014-08-09 - -### Commits - -- Make sure old and unstable nodes don't fail Travis [`27adca3`](https://github.com/ljharb/function-bind/commit/27adca34a4ab6ad67b6dfde43942a1b103ce4d75) -- Fixing an issue when the bound function is called as a constructor in ES3. [`e20122d`](https://github.com/ljharb/function-bind/commit/e20122d267d92ce553859b280cbbea5d27c07731) -- Adding `npm run coverage` [`a2e29c4`](https://github.com/ljharb/function-bind/commit/a2e29c4ecaef9e2f6cd1603e868c139073375502) -- Updating tape [`b741168`](https://github.com/ljharb/function-bind/commit/b741168b12b235b1717ff696087645526b69213c) -- Upgrading tape [`63631a0`](https://github.com/ljharb/function-bind/commit/63631a04c7fbe97cc2fa61829cc27246d6986f74) -- Updating tape [`363cb46`](https://github.com/ljharb/function-bind/commit/363cb46dafb23cb3e347729a22f9448051d78464) - -## v0.2.0 - 2014-03-23 - -### Commits - -- Updating test coverage to match es5-shim. [`aa94d44`](https://github.com/ljharb/function-bind/commit/aa94d44b8f9d7f69f10e060db7709aa7a694e5d4) -- initial [`942ee07`](https://github.com/ljharb/function-bind/commit/942ee07e94e542d91798137bc4b80b926137e066) -- Setting the bound function's length properly. [`079f46a`](https://github.com/ljharb/function-bind/commit/079f46a2d3515b7c0b308c2c13fceb641f97ca25) -- Ensuring that some older browsers will throw when given a regex. [`36ac55b`](https://github.com/ljharb/function-bind/commit/36ac55b87f460d4330253c92870aa26fbfe8227f) -- Removing npm scripts that don't have dependencies [`9d2be60`](https://github.com/ljharb/function-bind/commit/9d2be600002cb8bc8606f8f3585ad3e05868c750) -- Updating tape [`297a4ac`](https://github.com/ljharb/function-bind/commit/297a4acc5464db381940aafb194d1c88f4e678f3) -- Skipping length tests for now. [`d9891ea`](https://github.com/ljharb/function-bind/commit/d9891ea4d2aaffa69f408339cdd61ff740f70565) -- don't take my tea [`dccd930`](https://github.com/ljharb/function-bind/commit/dccd930bfd60ea10cb178d28c97550c3bc8c1e07) diff --git a/node_modules/function-bind/LICENSE b/node_modules/function-bind/LICENSE deleted file mode 100644 index 62d6d23..0000000 --- a/node_modules/function-bind/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013 Raynos. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - diff --git a/node_modules/function-bind/README.md b/node_modules/function-bind/README.md deleted file mode 100644 index 814c20b..0000000 --- a/node_modules/function-bind/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# function-bind [![Version Badge][npm-version-svg]][package-url] - -[![github actions][actions-image]][actions-url] - -[![dependency status][deps-svg]][deps-url] -[![dev dependency status][dev-deps-svg]][dev-deps-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -Implementation of function.prototype.bind - -Old versions of phantomjs, Internet Explorer < 9, and node < 0.6 don't support `Function.prototype.bind`. - -## Example - -```js -Function.prototype.bind = require("function-bind") -``` - -## Installation - -`npm install function-bind` - -## Contributors - - - Raynos - -## MIT Licenced - -[package-url]: https://npmjs.org/package/function-bind -[npm-version-svg]: https://versionbadg.es/Raynos/function-bind.svg -[deps-svg]: https://david-dm.org/Raynos/function-bind.svg -[deps-url]: https://david-dm.org/Raynos/function-bind -[dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg -[dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/function-bind.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/function-bind.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/function-bind.svg -[downloads-url]: https://npm-stat.com/charts.html?package=function-bind -[codecov-image]: https://codecov.io/gh/Raynos/function-bind/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/Raynos/function-bind/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/Raynos/function-bind -[actions-url]: https://github.com/Raynos/function-bind/actions diff --git a/node_modules/function-bind/implementation.js b/node_modules/function-bind/implementation.js deleted file mode 100644 index fd4384c..0000000 --- a/node_modules/function-bind/implementation.js +++ /dev/null @@ -1,84 +0,0 @@ -'use strict'; - -/* eslint no-invalid-this: 1 */ - -var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var toStr = Object.prototype.toString; -var max = Math.max; -var funcType = '[object Function]'; - -var concatty = function concatty(a, b) { - var arr = []; - - for (var i = 0; i < a.length; i += 1) { - arr[i] = a[i]; - } - for (var j = 0; j < b.length; j += 1) { - arr[j + a.length] = b[j]; - } - - return arr; -}; - -var slicy = function slicy(arrLike, offset) { - var arr = []; - for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { - arr[j] = arrLike[i]; - } - return arr; -}; - -var joiny = function (arr, joiner) { - var str = ''; - for (var i = 0; i < arr.length; i += 1) { - str += arr[i]; - if (i + 1 < arr.length) { - str += joiner; - } - } - return str; -}; - -module.exports = function bind(that) { - var target = this; - if (typeof target !== 'function' || toStr.apply(target) !== funcType) { - throw new TypeError(ERROR_MESSAGE + target); - } - var args = slicy(arguments, 1); - - var bound; - var binder = function () { - if (this instanceof bound) { - var result = target.apply( - this, - concatty(args, arguments) - ); - if (Object(result) === result) { - return result; - } - return this; - } - return target.apply( - that, - concatty(args, arguments) - ); - - }; - - var boundLength = max(0, target.length - args.length); - var boundArgs = []; - for (var i = 0; i < boundLength; i++) { - boundArgs[i] = '$' + i; - } - - bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); - - if (target.prototype) { - var Empty = function Empty() {}; - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; - } - - return bound; -}; diff --git a/node_modules/function-bind/index.js b/node_modules/function-bind/index.js deleted file mode 100644 index 3bb6b96..0000000 --- a/node_modules/function-bind/index.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -var implementation = require('./implementation'); - -module.exports = Function.prototype.bind || implementation; diff --git a/node_modules/function-bind/package.json b/node_modules/function-bind/package.json deleted file mode 100644 index 6185963..0000000 --- a/node_modules/function-bind/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "name": "function-bind", - "version": "1.1.2", - "description": "Implementation of Function.prototype.bind", - "keywords": [ - "function", - "bind", - "shim", - "es5" - ], - "author": "Raynos ", - "repository": { - "type": "git", - "url": "https://github.com/Raynos/function-bind.git" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "main": "index", - "homepage": "https://github.com/Raynos/function-bind", - "contributors": [ - { - "name": "Raynos" - }, - { - "name": "Jordan Harband", - "url": "https://github.com/ljharb" - } - ], - "bugs": { - "url": "https://github.com/Raynos/function-bind/issues", - "email": "raynos2@gmail.com" - }, - "devDependencies": { - "@ljharb/eslint-config": "^21.1.0", - "aud": "^2.0.3", - "auto-changelog": "^2.4.0", - "eslint": "=8.8.0", - "in-publish": "^2.0.1", - "npmignore": "^0.3.0", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.7.1" - }, - "license": "MIT", - "scripts": { - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepack": "npmignore --auto --commentLines=autogenerated", - "pretest": "npm run lint", - "test": "npm run tests-only", - "posttest": "aud --production", - "tests-only": "nyc tape 'test/**/*.js'", - "lint": "eslint --ext=js,mjs .", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "ie/8..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - } -} diff --git a/node_modules/function-bind/test/.eslintrc b/node_modules/function-bind/test/.eslintrc deleted file mode 100644 index 8a56d5b..0000000 --- a/node_modules/function-bind/test/.eslintrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "rules": { - "array-bracket-newline": 0, - "array-element-newline": 0, - "max-statements-per-line": [2, { "max": 2 }], - "no-invalid-this": 0, - "no-magic-numbers": 0, - } -} diff --git a/node_modules/function-bind/test/index.js b/node_modules/function-bind/test/index.js deleted file mode 100644 index 2edecce..0000000 --- a/node_modules/function-bind/test/index.js +++ /dev/null @@ -1,252 +0,0 @@ -// jscs:disable requireUseStrict - -var test = require('tape'); - -var functionBind = require('../implementation'); -var getCurrentContext = function () { return this; }; - -test('functionBind is a function', function (t) { - t.equal(typeof functionBind, 'function'); - t.end(); -}); - -test('non-functions', function (t) { - var nonFunctions = [true, false, [], {}, 42, 'foo', NaN, /a/g]; - t.plan(nonFunctions.length); - for (var i = 0; i < nonFunctions.length; ++i) { - try { functionBind.call(nonFunctions[i]); } catch (ex) { - t.ok(ex instanceof TypeError, 'throws when given ' + String(nonFunctions[i])); - } - } - t.end(); -}); - -test('without a context', function (t) { - t.test('binds properly', function (st) { - var args, context; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }) - }; - namespace.func(1, 2, 3); - st.deepEqual(args, [1, 2, 3]); - st.equal(context, getCurrentContext.call()); - st.end(); - }); - - t.test('binds properly, and still supplies bound arguments', function (st) { - var args, context; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }, undefined, 1, 2, 3) - }; - namespace.func(4, 5, 6); - st.deepEqual(args, [1, 2, 3, 4, 5, 6]); - st.equal(context, getCurrentContext.call()); - st.end(); - }); - - t.test('returns properly', function (st) { - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, null) - }; - var context = namespace.func(1, 2, 3); - st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); - st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); - st.end(); - }); - - t.test('returns properly with bound arguments', function (st) { - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, null, 1, 2, 3) - }; - var context = namespace.func(4, 5, 6); - st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); - st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); - st.end(); - }); - - t.test('called as a constructor', function (st) { - var thunkify = function (value) { - return function () { return value; }; - }; - st.test('returns object value', function (sst) { - var expectedReturnValue = [1, 2, 3]; - var Constructor = functionBind.call(thunkify(expectedReturnValue), null); - var result = new Constructor(); - sst.equal(result, expectedReturnValue); - sst.end(); - }); - - st.test('does not return primitive value', function (sst) { - var Constructor = functionBind.call(thunkify(42), null); - var result = new Constructor(); - sst.notEqual(result, 42); - sst.end(); - }); - - st.test('object from bound constructor is instance of original and bound constructor', function (sst) { - var A = function (x) { - this.name = x || 'A'; - }; - var B = functionBind.call(A, null, 'B'); - - var result = new B(); - sst.ok(result instanceof B, 'result is instance of bound constructor'); - sst.ok(result instanceof A, 'result is instance of original constructor'); - sst.end(); - }); - - st.end(); - }); - - t.end(); -}); - -test('with a context', function (t) { - t.test('with no bound arguments', function (st) { - var args, context; - var boundContext = {}; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }, boundContext) - }; - namespace.func(1, 2, 3); - st.equal(context, boundContext, 'binds a context properly'); - st.deepEqual(args, [1, 2, 3], 'supplies passed arguments'); - st.end(); - }); - - t.test('with bound arguments', function (st) { - var args, context; - var boundContext = {}; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - context = this; - }, boundContext, 1, 2, 3) - }; - namespace.func(4, 5, 6); - st.equal(context, boundContext, 'binds a context properly'); - st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'supplies bound and passed arguments'); - st.end(); - }); - - t.test('returns properly', function (st) { - var boundContext = {}; - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, boundContext) - }; - var context = namespace.func(1, 2, 3); - st.equal(context, boundContext, 'returned context is bound context'); - st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); - st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); - st.end(); - }); - - t.test('returns properly with bound arguments', function (st) { - var boundContext = {}; - var args; - var namespace = { - func: functionBind.call(function () { - args = Array.prototype.slice.call(arguments); - return this; - }, boundContext, 1, 2, 3) - }; - var context = namespace.func(4, 5, 6); - st.equal(context, boundContext, 'returned context is bound context'); - st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); - st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); - st.end(); - }); - - t.test('passes the correct arguments when called as a constructor', function (st) { - var expected = { name: 'Correct' }; - var namespace = { - Func: functionBind.call(function (arg) { - return arg; - }, { name: 'Incorrect' }) - }; - var returned = new namespace.Func(expected); - st.equal(returned, expected, 'returns the right arg when called as a constructor'); - st.end(); - }); - - t.test('has the new instance\'s context when called as a constructor', function (st) { - var actualContext; - var expectedContext = { foo: 'bar' }; - var namespace = { - Func: functionBind.call(function () { - actualContext = this; - }, expectedContext) - }; - var result = new namespace.Func(); - st.equal(result instanceof namespace.Func, true); - st.notEqual(actualContext, expectedContext); - st.end(); - }); - - t.end(); -}); - -test('bound function length', function (t) { - t.test('sets a correct length without thisArg', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }); - st.equal(subject.length, 3); - st.equal(subject(1, 2, 3), 6); - st.end(); - }); - - t.test('sets a correct length with thisArg', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}); - st.equal(subject.length, 3); - st.equal(subject(1, 2, 3), 6); - st.end(); - }); - - t.test('sets a correct length without thisArg and first argument', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1); - st.equal(subject.length, 2); - st.equal(subject(2, 3), 6); - st.end(); - }); - - t.test('sets a correct length with thisArg and first argument', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1); - st.equal(subject.length, 2); - st.equal(subject(2, 3), 6); - st.end(); - }); - - t.test('sets a correct length without thisArg and too many arguments', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1, 2, 3, 4); - st.equal(subject.length, 0); - st.equal(subject(), 6); - st.end(); - }); - - t.test('sets a correct length with thisArg and too many arguments', function (st) { - var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1, 2, 3, 4); - st.equal(subject.length, 0); - st.equal(subject(), 6); - st.end(); - }); -}); diff --git a/node_modules/get-intrinsic/.eslintrc b/node_modules/get-intrinsic/.eslintrc deleted file mode 100644 index 235fb79..0000000 --- a/node_modules/get-intrinsic/.eslintrc +++ /dev/null @@ -1,42 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "env": { - "es6": true, - "es2017": true, - "es2020": true, - "es2021": true, - "es2022": true, - }, - - "globals": { - "Float16Array": false, - }, - - "rules": { - "array-bracket-newline": 0, - "complexity": 0, - "eqeqeq": [2, "allow-null"], - "func-name-matching": 0, - "id-length": 0, - "max-lines": 0, - "max-lines-per-function": [2, 90], - "max-params": [2, 4], - "max-statements": 0, - "max-statements-per-line": [2, { "max": 2 }], - "multiline-comment-style": 0, - "no-magic-numbers": 0, - "sort-keys": 0, - }, - - "overrides": [ - { - "files": "test/**", - "rules": { - "new-cap": 0, - }, - }, - ], -} diff --git a/node_modules/get-intrinsic/.github/FUNDING.yml b/node_modules/get-intrinsic/.github/FUNDING.yml deleted file mode 100644 index 8e8da0d..0000000 --- a/node_modules/get-intrinsic/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/get-intrinsic -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/get-intrinsic/.nycrc b/node_modules/get-intrinsic/.nycrc deleted file mode 100644 index bdd626c..0000000 --- a/node_modules/get-intrinsic/.nycrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/get-intrinsic/CHANGELOG.md b/node_modules/get-intrinsic/CHANGELOG.md deleted file mode 100644 index ce1dd98..0000000 --- a/node_modules/get-intrinsic/CHANGELOG.md +++ /dev/null @@ -1,186 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.3.0](https://github.com/ljharb/get-intrinsic/compare/v1.2.7...v1.3.0) - 2025-02-22 - -### Commits - -- [Dev Deps] update `es-abstract`, `es-value-fixtures`, `for-each`, `object-inspect` [`9b61553`](https://github.com/ljharb/get-intrinsic/commit/9b61553c587f1c1edbd435597e88c7d387da97dd) -- [Deps] update `call-bind-apply-helpers`, `es-object-atoms`, `get-proto` [`a341fee`](https://github.com/ljharb/get-intrinsic/commit/a341fee0f39a403b0f0069e82c97642d5eb11043) -- [New] add `Float16Array` [`de22116`](https://github.com/ljharb/get-intrinsic/commit/de22116b492fb989a0341bceb6e573abfaed73dc) - -## [v1.2.7](https://github.com/ljharb/get-intrinsic/compare/v1.2.6...v1.2.7) - 2025-01-02 - -### Commits - -- [Refactor] use `get-proto` directly [`00ab955`](https://github.com/ljharb/get-intrinsic/commit/00ab95546a0980c8ad42a84253daaa8d2adcedf9) -- [Deps] update `math-intrinsics` [`c716cdd`](https://github.com/ljharb/get-intrinsic/commit/c716cdd6bbe36b438057025561b8bb5a879ac8a0) -- [Dev Deps] update `call-bound`, `es-abstract` [`dc648a6`](https://github.com/ljharb/get-intrinsic/commit/dc648a67eb359037dff8d8619bfa71d86debccb1) - -## [v1.2.6](https://github.com/ljharb/get-intrinsic/compare/v1.2.5...v1.2.6) - 2024-12-11 - -### Commits - -- [Refactor] use `math-intrinsics` [`841be86`](https://github.com/ljharb/get-intrinsic/commit/841be8641a9254c4c75483b30c8871b5d5065926) -- [Refactor] use `es-object-atoms` [`42057df`](https://github.com/ljharb/get-intrinsic/commit/42057dfa16f66f64787e66482af381cc6f31d2c1) -- [Deps] update `call-bind-apply-helpers` [`45afa24`](https://github.com/ljharb/get-intrinsic/commit/45afa24a9ee4d6d3c172db1f555b16cb27843ef4) -- [Dev Deps] update `call-bound` [`9cba9c6`](https://github.com/ljharb/get-intrinsic/commit/9cba9c6e70212bc163b7a5529cb25df46071646f) - -## [v1.2.5](https://github.com/ljharb/get-intrinsic/compare/v1.2.4...v1.2.5) - 2024-12-06 - -### Commits - -- [actions] split out node 10-20, and 20+ [`6e2b9dd`](https://github.com/ljharb/get-intrinsic/commit/6e2b9dd23902665681ebe453256ccfe21d7966f0) -- [Refactor] use `dunder-proto` and `call-bind-apply-helpers` instead of `has-proto` [`c095d17`](https://github.com/ljharb/get-intrinsic/commit/c095d179ad0f4fbfff20c8a3e0cb4fe668018998) -- [Refactor] use `gopd` [`9841d5b`](https://github.com/ljharb/get-intrinsic/commit/9841d5b35f7ab4fd2d193f0c741a50a077920e90) -- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `es-abstract`, `es-value-fixtures`, `gopd`, `mock-property`, `object-inspect`, `tape` [`2d07e01`](https://github.com/ljharb/get-intrinsic/commit/2d07e01310cee2cbaedfead6903df128b1f5d425) -- [Deps] update `gopd`, `has-proto`, `has-symbols`, `hasown` [`974d8bf`](https://github.com/ljharb/get-intrinsic/commit/974d8bf5baad7939eef35c25cc1dd88c10a30fa6) -- [Dev Deps] update `call-bind`, `es-abstract`, `tape` [`df9dde1`](https://github.com/ljharb/get-intrinsic/commit/df9dde178186631ab8a3165ede056549918ce4bc) -- [Refactor] cache `es-define-property` as well [`43ef543`](https://github.com/ljharb/get-intrinsic/commit/43ef543cb02194401420e3a914a4ca9168691926) -- [Deps] update `has-proto`, `has-symbols`, `hasown` [`ad4949d`](https://github.com/ljharb/get-intrinsic/commit/ad4949d5467316505aad89bf75f9417ed782f7af) -- [Tests] use `call-bound` directly [`ad5c406`](https://github.com/ljharb/get-intrinsic/commit/ad5c4069774bfe90e520a35eead5fe5ca9d69e80) -- [Deps] update `has-proto`, `hasown` [`45414ca`](https://github.com/ljharb/get-intrinsic/commit/45414caa312333a2798953682c68f85c550627dd) -- [Tests] replace `aud` with `npm audit` [`18d3509`](https://github.com/ljharb/get-intrinsic/commit/18d3509f79460e7924da70409ee81e5053087523) -- [Deps] update `es-define-property` [`aadaa3b`](https://github.com/ljharb/get-intrinsic/commit/aadaa3b2188d77ad9bff394ce5d4249c49eb21f5) -- [Dev Deps] add missing peer dep [`c296a16`](https://github.com/ljharb/get-intrinsic/commit/c296a16246d0c9a5981944f4cc5cf61fbda0cf6a) - -## [v1.2.4](https://github.com/ljharb/get-intrinsic/compare/v1.2.3...v1.2.4) - 2024-02-05 - -### Commits - -- [Refactor] use all 7 <+ ES6 Errors from `es-errors` [`bcac811`](https://github.com/ljharb/get-intrinsic/commit/bcac811abdc1c982e12abf848a410d6aae148d14) - -## [v1.2.3](https://github.com/ljharb/get-intrinsic/compare/v1.2.2...v1.2.3) - 2024-02-03 - -### Commits - -- [Refactor] use `es-errors`, so things that only need those do not need `get-intrinsic` [`f11db9c`](https://github.com/ljharb/get-intrinsic/commit/f11db9c4fb97d87bbd53d3c73ac6b3db3613ad3b) -- [Dev Deps] update `aud`, `es-abstract`, `mock-property`, `npmignore` [`b7ac7d1`](https://github.com/ljharb/get-intrinsic/commit/b7ac7d1616fefb03877b1aed0c8f8d61aad32b6c) -- [meta] simplify `exports` [`faa0cc6`](https://github.com/ljharb/get-intrinsic/commit/faa0cc618e2830ffb51a8202490b0c215d965cbc) -- [meta] add missing `engines.node` [`774dd0b`](https://github.com/ljharb/get-intrinsic/commit/774dd0b3e8f741c3f05a6322d124d6087f146af1) -- [Dev Deps] update `tape` [`5828e8e`](https://github.com/ljharb/get-intrinsic/commit/5828e8e4a04e69312e87a36c0ea39428a7a4c3d8) -- [Robustness] use null objects for lookups [`eb9a11f`](https://github.com/ljharb/get-intrinsic/commit/eb9a11fa9eb3e13b193fcc05a7fb814341b1a7b7) -- [meta] add `sideEffects` flag [`89bcc7a`](https://github.com/ljharb/get-intrinsic/commit/89bcc7a42e19bf07b7c21e3094d5ab177109e6d2) - -## [v1.2.2](https://github.com/ljharb/get-intrinsic/compare/v1.2.1...v1.2.2) - 2023-10-20 - -### Commits - -- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `call-bind`, `es-abstract`, `mock-property`, `object-inspect`, `tape` [`f51bcf2`](https://github.com/ljharb/get-intrinsic/commit/f51bcf26412d58d17ce17c91c9afd0ad271f0762) -- [Refactor] use `hasown` instead of `has` [`18d14b7`](https://github.com/ljharb/get-intrinsic/commit/18d14b799bea6b5765e1cec91890830cbcdb0587) -- [Deps] update `function-bind` [`6e109c8`](https://github.com/ljharb/get-intrinsic/commit/6e109c81e03804cc5e7824fb64353cdc3d8ee2c7) - -## [v1.2.1](https://github.com/ljharb/get-intrinsic/compare/v1.2.0...v1.2.1) - 2023-05-13 - -### Commits - -- [Fix] avoid a crash in envs without `__proto__` [`7bad8d0`](https://github.com/ljharb/get-intrinsic/commit/7bad8d061bf8721733b58b73a2565af2b6756b64) -- [Dev Deps] update `es-abstract` [`c60e6b7`](https://github.com/ljharb/get-intrinsic/commit/c60e6b7b4cf9660c7f27ed970970fd55fac48dc5) - -## [v1.2.0](https://github.com/ljharb/get-intrinsic/compare/v1.1.3...v1.2.0) - 2023-01-19 - -### Commits - -- [actions] update checkout action [`ca6b12f`](https://github.com/ljharb/get-intrinsic/commit/ca6b12f31eaacea4ea3b055e744cd61623385ffb) -- [Dev Deps] update `@ljharb/eslint-config`, `es-abstract`, `object-inspect`, `tape` [`41a3727`](https://github.com/ljharb/get-intrinsic/commit/41a3727d0026fa04273ae216a5f8e12eefd72da8) -- [Fix] ensure `Error.prototype` is undeniable [`c511e97`](https://github.com/ljharb/get-intrinsic/commit/c511e97ae99c764c4524b540dee7a70757af8da3) -- [Dev Deps] update `aud`, `es-abstract`, `tape` [`1bef8a8`](https://github.com/ljharb/get-intrinsic/commit/1bef8a8fd439ebb80863199b6189199e0851ac67) -- [Dev Deps] update `aud`, `es-abstract` [`0d41f16`](https://github.com/ljharb/get-intrinsic/commit/0d41f16bcd500bc28b7bfc98043ebf61ea081c26) -- [New] add `BigInt64Array` and `BigUint64Array` [`a6cca25`](https://github.com/ljharb/get-intrinsic/commit/a6cca25f29635889b7e9bd669baf9e04be90e48c) -- [Tests] use `gopd` [`ecf7722`](https://github.com/ljharb/get-intrinsic/commit/ecf7722240d15cfd16edda06acf63359c10fb9bd) - -## [v1.1.3](https://github.com/ljharb/get-intrinsic/compare/v1.1.2...v1.1.3) - 2022-09-12 - -### Commits - -- [Dev Deps] update `es-abstract`, `es-value-fixtures`, `tape` [`07ff291`](https://github.com/ljharb/get-intrinsic/commit/07ff291816406ebe5a12d7f16965bde0942dd688) -- [Fix] properly check for % signs [`50ac176`](https://github.com/ljharb/get-intrinsic/commit/50ac1760fe99c227e64eabde76e9c0e44cd881b5) - -## [v1.1.2](https://github.com/ljharb/get-intrinsic/compare/v1.1.1...v1.1.2) - 2022-06-08 - -### Fixed - -- [Fix] properly validate against extra % signs [`#16`](https://github.com/ljharb/get-intrinsic/issues/16) - -### Commits - -- [actions] reuse common workflows [`0972547`](https://github.com/ljharb/get-intrinsic/commit/0972547efd0abc863fe4c445a6ca7eb4f8c6901d) -- [meta] use `npmignore` to autogenerate an npmignore file [`5ba0b51`](https://github.com/ljharb/get-intrinsic/commit/5ba0b51d8d8d4f1c31d426d74abc0770fd106bad) -- [actions] use `node/install` instead of `node/run`; use `codecov` action [`c364492`](https://github.com/ljharb/get-intrinsic/commit/c364492af4af51333e6f81c0bf21fd3d602c3661) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `es-abstract`, `object-inspect`, `tape` [`dc04dad`](https://github.com/ljharb/get-intrinsic/commit/dc04dad86f6e5608775a2640cb0db5927ae29ed9) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `es-abstract`, `object-inspect`, `safe-publish-latest`, `tape` [`1c14059`](https://github.com/ljharb/get-intrinsic/commit/1c1405984e86dd2dc9366c15d8a0294a96a146a5) -- [Tests] use `mock-property` [`b396ef0`](https://github.com/ljharb/get-intrinsic/commit/b396ef05bb73b1d699811abd64b0d9b97997fdda) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`c2c758d`](https://github.com/ljharb/get-intrinsic/commit/c2c758d3b90af4fef0a76910d8d3c292ec8d1d3e) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `es-abstract`, `es-value-fixtures`, `object-inspect`, `tape` [`29e3c09`](https://github.com/ljharb/get-intrinsic/commit/29e3c091c2bf3e17099969847e8729d0e46896de) -- [actions] update codecov uploader [`8cbc141`](https://github.com/ljharb/get-intrinsic/commit/8cbc1418940d7a8941f3a7985cbc4ac095c5e13d) -- [Dev Deps] update `@ljharb/eslint-config`, `es-abstract`, `es-value-fixtures`, `object-inspect`, `tape` [`10b6f5c`](https://github.com/ljharb/get-intrinsic/commit/10b6f5c02593fb3680c581d696ac124e30652932) -- [readme] add github actions/codecov badges [`4e25400`](https://github.com/ljharb/get-intrinsic/commit/4e25400d9f51ae9eb059cbe22d9144e70ea214e8) -- [Tests] use `for-each` instead of `foreach` [`c05b957`](https://github.com/ljharb/get-intrinsic/commit/c05b957ad9a7bc7721af7cc9e9be1edbfe057496) -- [Dev Deps] update `es-abstract` [`29b05ae`](https://github.com/ljharb/get-intrinsic/commit/29b05aec3e7330e9ad0b8e0f685a9112c20cdd97) -- [meta] use `prepublishOnly` script for npm 7+ [`95c285d`](https://github.com/ljharb/get-intrinsic/commit/95c285da810516057d3bbfa871176031af38f05d) -- [Deps] update `has-symbols` [`593cb4f`](https://github.com/ljharb/get-intrinsic/commit/593cb4fb38e7922e40e42c183f45274b636424cd) -- [readme] fix repo URLs [`1c8305b`](https://github.com/ljharb/get-intrinsic/commit/1c8305b5365827c9b6fc785434aac0e1328ff2f5) -- [Deps] update `has-symbols` [`c7138b6`](https://github.com/ljharb/get-intrinsic/commit/c7138b6c6d73132d859471fb8c13304e1e7c8b20) -- [Dev Deps] remove unused `has-bigints` [`bd63aff`](https://github.com/ljharb/get-intrinsic/commit/bd63aff6ad8f3a986c557fcda2914187bdaab359) - -## [v1.1.1](https://github.com/ljharb/get-intrinsic/compare/v1.1.0...v1.1.1) - 2021-02-03 - -### Fixed - -- [meta] export `./package.json` [`#9`](https://github.com/ljharb/get-intrinsic/issues/9) - -### Commits - -- [readme] flesh out the readme; use `evalmd` [`d12f12c`](https://github.com/ljharb/get-intrinsic/commit/d12f12c15345a0a0772cc65a7c64369529abd614) -- [eslint] set up proper globals config [`5a8c098`](https://github.com/ljharb/get-intrinsic/commit/5a8c0984e3319d1ac0e64b102f8ec18b64e79f36) -- [Dev Deps] update `eslint` [`7b9a5c0`](https://github.com/ljharb/get-intrinsic/commit/7b9a5c0d31a90ca1a1234181c74988fb046701cd) - -## [v1.1.0](https://github.com/ljharb/get-intrinsic/compare/v1.0.2...v1.1.0) - 2021-01-25 - -### Fixed - -- [Refactor] delay `Function` eval until syntax-derived values are requested [`#3`](https://github.com/ljharb/get-intrinsic/issues/3) - -### Commits - -- [Tests] migrate tests to Github Actions [`2ab762b`](https://github.com/ljharb/get-intrinsic/commit/2ab762b48164aea8af37a40ba105bbc8246ab8c4) -- [meta] do not publish github action workflow files [`5e7108e`](https://github.com/ljharb/get-intrinsic/commit/5e7108e4768b244d48d9567ba4f8a6cab9c65b8e) -- [Tests] add some coverage [`01ac7a8`](https://github.com/ljharb/get-intrinsic/commit/01ac7a87ac29738567e8524cd8c9e026b1fa8cb3) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `call-bind`, `es-abstract`, `tape`; add `call-bind` [`911b672`](https://github.com/ljharb/get-intrinsic/commit/911b672fbffae433a96924c6ce013585e425f4b7) -- [Refactor] rearrange evalled constructors a bit [`7e7e4bf`](https://github.com/ljharb/get-intrinsic/commit/7e7e4bf583f3799c8ac1c6c5e10d2cb553957347) -- [meta] add Automatic Rebase and Require Allow Edits workflows [`0199968`](https://github.com/ljharb/get-intrinsic/commit/01999687a263ffce0a3cb011dfbcb761754aedbc) - -## [v1.0.2](https://github.com/ljharb/get-intrinsic/compare/v1.0.1...v1.0.2) - 2020-12-17 - -### Commits - -- [Fix] Throw for non‑existent intrinsics [`68f873b`](https://github.com/ljharb/get-intrinsic/commit/68f873b013c732a05ad6f5fc54f697e55515461b) -- [Fix] Throw for non‑existent segments in the intrinsic path [`8325dee`](https://github.com/ljharb/get-intrinsic/commit/8325deee43128f3654d3399aa9591741ebe17b21) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-bigints`, `object-inspect` [`0c227a7`](https://github.com/ljharb/get-intrinsic/commit/0c227a7d8b629166f25715fd242553892e458525) -- [meta] do not lint coverage output [`70d2419`](https://github.com/ljharb/get-intrinsic/commit/70d24199b620043cd9110fc5f426d214ebe21dc9) - -## [v1.0.1](https://github.com/ljharb/get-intrinsic/compare/v1.0.0...v1.0.1) - 2020-10-30 - -### Commits - -- [Tests] gather coverage data on every job [`d1d280d`](https://github.com/ljharb/get-intrinsic/commit/d1d280dec714e3f0519cc877dbcb193057d9cac6) -- [Fix] add missing dependencies [`5031771`](https://github.com/ljharb/get-intrinsic/commit/5031771bb1095b38be88ce7c41d5de88718e432e) -- [Tests] use `es-value-fixtures` [`af48765`](https://github.com/ljharb/get-intrinsic/commit/af48765a23c5323fb0b6b38dbf00eb5099c7bebc) - -## v1.0.0 - 2020-10-29 - -### Commits - -- Implementation [`bbce57c`](https://github.com/ljharb/get-intrinsic/commit/bbce57c6f33d05b2d8d3efa273ceeb3ee01127bb) -- Tests [`17b4f0d`](https://github.com/ljharb/get-intrinsic/commit/17b4f0d56dea6b4059b56fc30ef3ee4d9500ebc2) -- Initial commit [`3153294`](https://github.com/ljharb/get-intrinsic/commit/31532948de363b0a27dd9fd4649e7b7028ec4b44) -- npm init [`fb326c4`](https://github.com/ljharb/get-intrinsic/commit/fb326c4d2817c8419ec31de1295f06bb268a7902) -- [meta] add Automatic Rebase and Require Allow Edits workflows [`48862fb`](https://github.com/ljharb/get-intrinsic/commit/48862fb2508c8f6a57968e6d08b7c883afc9d550) -- [meta] add `auto-changelog` [`5f28ad0`](https://github.com/ljharb/get-intrinsic/commit/5f28ad019e060a353d8028f9f2591a9cc93074a1) -- [meta] add "funding"; create `FUNDING.yml` [`c2bbdde`](https://github.com/ljharb/get-intrinsic/commit/c2bbddeba73a875be61484ee4680b129a6d4e0a1) -- [Tests] add `npm run lint` [`0a84b98`](https://github.com/ljharb/get-intrinsic/commit/0a84b98b22b7cf7a748666f705b0003a493c35fd) -- Only apps should have lockfiles [`9586c75`](https://github.com/ljharb/get-intrinsic/commit/9586c75866c1ee678e4d5d4dbbdef6997e511b05) diff --git a/node_modules/get-intrinsic/LICENSE b/node_modules/get-intrinsic/LICENSE deleted file mode 100644 index 48f05d0..0000000 --- a/node_modules/get-intrinsic/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/get-intrinsic/README.md b/node_modules/get-intrinsic/README.md deleted file mode 100644 index 3aa0bba..0000000 --- a/node_modules/get-intrinsic/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# get-intrinsic [![Version Badge][npm-version-svg]][package-url] - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![dependency status][deps-svg]][deps-url] -[![dev dependency status][dev-deps-svg]][dev-deps-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -Get and robustly cache all JS language-level intrinsics at first require time. - -See the syntax described [in the JS spec](https://tc39.es/ecma262/#sec-well-known-intrinsic-objects) for reference. - -## Example - -```js -var GetIntrinsic = require('get-intrinsic'); -var assert = require('assert'); - -// static methods -assert.equal(GetIntrinsic('%Math.pow%'), Math.pow); -assert.equal(Math.pow(2, 3), 8); -assert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8); -delete Math.pow; -assert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8); - -// instance methods -var arr = [1]; -assert.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push); -assert.deepEqual(arr, [1]); - -arr.push(2); -assert.deepEqual(arr, [1, 2]); - -GetIntrinsic('%Array.prototype.push%').call(arr, 3); -assert.deepEqual(arr, [1, 2, 3]); - -delete Array.prototype.push; -GetIntrinsic('%Array.prototype.push%').call(arr, 4); -assert.deepEqual(arr, [1, 2, 3, 4]); - -// missing features -delete JSON.parse; // to simulate a real intrinsic that is missing in the environment -assert.throws(() => GetIntrinsic('%JSON.parse%')); -assert.equal(undefined, GetIntrinsic('%JSON.parse%', true)); -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -## Security - -Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. - -[package-url]: https://npmjs.org/package/get-intrinsic -[npm-version-svg]: https://versionbadg.es/ljharb/get-intrinsic.svg -[deps-svg]: https://david-dm.org/ljharb/get-intrinsic.svg -[deps-url]: https://david-dm.org/ljharb/get-intrinsic -[dev-deps-svg]: https://david-dm.org/ljharb/get-intrinsic/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/get-intrinsic#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/get-intrinsic.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/get-intrinsic.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/get-intrinsic.svg -[downloads-url]: https://npm-stat.com/charts.html?package=get-intrinsic -[codecov-image]: https://codecov.io/gh/ljharb/get-intrinsic/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/ljharb/get-intrinsic/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/get-intrinsic -[actions-url]: https://github.com/ljharb/get-intrinsic/actions diff --git a/node_modules/get-intrinsic/index.js b/node_modules/get-intrinsic/index.js deleted file mode 100644 index bd1d94b..0000000 --- a/node_modules/get-intrinsic/index.js +++ /dev/null @@ -1,378 +0,0 @@ -'use strict'; - -var undefined; - -var $Object = require('es-object-atoms'); - -var $Error = require('es-errors'); -var $EvalError = require('es-errors/eval'); -var $RangeError = require('es-errors/range'); -var $ReferenceError = require('es-errors/ref'); -var $SyntaxError = require('es-errors/syntax'); -var $TypeError = require('es-errors/type'); -var $URIError = require('es-errors/uri'); - -var abs = require('math-intrinsics/abs'); -var floor = require('math-intrinsics/floor'); -var max = require('math-intrinsics/max'); -var min = require('math-intrinsics/min'); -var pow = require('math-intrinsics/pow'); -var round = require('math-intrinsics/round'); -var sign = require('math-intrinsics/sign'); - -var $Function = Function; - -// eslint-disable-next-line consistent-return -var getEvalledConstructor = function (expressionSyntax) { - try { - return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); - } catch (e) {} -}; - -var $gOPD = require('gopd'); -var $defineProperty = require('es-define-property'); - -var throwTypeError = function () { - throw new $TypeError(); -}; -var ThrowTypeError = $gOPD - ? (function () { - try { - // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties - arguments.callee; // IE 8 does not throw here - return throwTypeError; - } catch (calleeThrows) { - try { - // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') - return $gOPD(arguments, 'callee').get; - } catch (gOPDthrows) { - return throwTypeError; - } - } - }()) - : throwTypeError; - -var hasSymbols = require('has-symbols')(); - -var getProto = require('get-proto'); -var $ObjectGPO = require('get-proto/Object.getPrototypeOf'); -var $ReflectGPO = require('get-proto/Reflect.getPrototypeOf'); - -var $apply = require('call-bind-apply-helpers/functionApply'); -var $call = require('call-bind-apply-helpers/functionCall'); - -var needsEval = {}; - -var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); - -var INTRINSICS = { - __proto__: null, - '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, - '%Array%': Array, - '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, - '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, - '%AsyncFromSyncIteratorPrototype%': undefined, - '%AsyncFunction%': needsEval, - '%AsyncGenerator%': needsEval, - '%AsyncGeneratorFunction%': needsEval, - '%AsyncIteratorPrototype%': needsEval, - '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, - '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, - '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, - '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, - '%Boolean%': Boolean, - '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, - '%Date%': Date, - '%decodeURI%': decodeURI, - '%decodeURIComponent%': decodeURIComponent, - '%encodeURI%': encodeURI, - '%encodeURIComponent%': encodeURIComponent, - '%Error%': $Error, - '%eval%': eval, // eslint-disable-line no-eval - '%EvalError%': $EvalError, - '%Float16Array%': typeof Float16Array === 'undefined' ? undefined : Float16Array, - '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, - '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, - '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, - '%Function%': $Function, - '%GeneratorFunction%': needsEval, - '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, - '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, - '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, - '%isFinite%': isFinite, - '%isNaN%': isNaN, - '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, - '%JSON%': typeof JSON === 'object' ? JSON : undefined, - '%Map%': typeof Map === 'undefined' ? undefined : Map, - '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), - '%Math%': Math, - '%Number%': Number, - '%Object%': $Object, - '%Object.getOwnPropertyDescriptor%': $gOPD, - '%parseFloat%': parseFloat, - '%parseInt%': parseInt, - '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, - '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, - '%RangeError%': $RangeError, - '%ReferenceError%': $ReferenceError, - '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, - '%RegExp%': RegExp, - '%Set%': typeof Set === 'undefined' ? undefined : Set, - '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), - '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, - '%String%': String, - '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, - '%Symbol%': hasSymbols ? Symbol : undefined, - '%SyntaxError%': $SyntaxError, - '%ThrowTypeError%': ThrowTypeError, - '%TypedArray%': TypedArray, - '%TypeError%': $TypeError, - '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, - '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, - '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, - '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, - '%URIError%': $URIError, - '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, - '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, - '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet, - - '%Function.prototype.call%': $call, - '%Function.prototype.apply%': $apply, - '%Object.defineProperty%': $defineProperty, - '%Object.getPrototypeOf%': $ObjectGPO, - '%Math.abs%': abs, - '%Math.floor%': floor, - '%Math.max%': max, - '%Math.min%': min, - '%Math.pow%': pow, - '%Math.round%': round, - '%Math.sign%': sign, - '%Reflect.getPrototypeOf%': $ReflectGPO -}; - -if (getProto) { - try { - null.error; // eslint-disable-line no-unused-expressions - } catch (e) { - // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 - var errorProto = getProto(getProto(e)); - INTRINSICS['%Error.prototype%'] = errorProto; - } -} - -var doEval = function doEval(name) { - var value; - if (name === '%AsyncFunction%') { - value = getEvalledConstructor('async function () {}'); - } else if (name === '%GeneratorFunction%') { - value = getEvalledConstructor('function* () {}'); - } else if (name === '%AsyncGeneratorFunction%') { - value = getEvalledConstructor('async function* () {}'); - } else if (name === '%AsyncGenerator%') { - var fn = doEval('%AsyncGeneratorFunction%'); - if (fn) { - value = fn.prototype; - } - } else if (name === '%AsyncIteratorPrototype%') { - var gen = doEval('%AsyncGenerator%'); - if (gen && getProto) { - value = getProto(gen.prototype); - } - } - - INTRINSICS[name] = value; - - return value; -}; - -var LEGACY_ALIASES = { - __proto__: null, - '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], - '%ArrayPrototype%': ['Array', 'prototype'], - '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], - '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], - '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], - '%ArrayProto_values%': ['Array', 'prototype', 'values'], - '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], - '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], - '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], - '%BooleanPrototype%': ['Boolean', 'prototype'], - '%DataViewPrototype%': ['DataView', 'prototype'], - '%DatePrototype%': ['Date', 'prototype'], - '%ErrorPrototype%': ['Error', 'prototype'], - '%EvalErrorPrototype%': ['EvalError', 'prototype'], - '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], - '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], - '%FunctionPrototype%': ['Function', 'prototype'], - '%Generator%': ['GeneratorFunction', 'prototype'], - '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], - '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], - '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], - '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], - '%JSONParse%': ['JSON', 'parse'], - '%JSONStringify%': ['JSON', 'stringify'], - '%MapPrototype%': ['Map', 'prototype'], - '%NumberPrototype%': ['Number', 'prototype'], - '%ObjectPrototype%': ['Object', 'prototype'], - '%ObjProto_toString%': ['Object', 'prototype', 'toString'], - '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], - '%PromisePrototype%': ['Promise', 'prototype'], - '%PromiseProto_then%': ['Promise', 'prototype', 'then'], - '%Promise_all%': ['Promise', 'all'], - '%Promise_reject%': ['Promise', 'reject'], - '%Promise_resolve%': ['Promise', 'resolve'], - '%RangeErrorPrototype%': ['RangeError', 'prototype'], - '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], - '%RegExpPrototype%': ['RegExp', 'prototype'], - '%SetPrototype%': ['Set', 'prototype'], - '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], - '%StringPrototype%': ['String', 'prototype'], - '%SymbolPrototype%': ['Symbol', 'prototype'], - '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], - '%TypedArrayPrototype%': ['TypedArray', 'prototype'], - '%TypeErrorPrototype%': ['TypeError', 'prototype'], - '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], - '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], - '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], - '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], - '%URIErrorPrototype%': ['URIError', 'prototype'], - '%WeakMapPrototype%': ['WeakMap', 'prototype'], - '%WeakSetPrototype%': ['WeakSet', 'prototype'] -}; - -var bind = require('function-bind'); -var hasOwn = require('hasown'); -var $concat = bind.call($call, Array.prototype.concat); -var $spliceApply = bind.call($apply, Array.prototype.splice); -var $replace = bind.call($call, String.prototype.replace); -var $strSlice = bind.call($call, String.prototype.slice); -var $exec = bind.call($call, RegExp.prototype.exec); - -/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ -var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; -var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ -var stringToPath = function stringToPath(string) { - var first = $strSlice(string, 0, 1); - var last = $strSlice(string, -1); - if (first === '%' && last !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); - } else if (last === '%' && first !== '%') { - throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); - } - var result = []; - $replace(string, rePropName, function (match, number, quote, subString) { - result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; - }); - return result; -}; -/* end adaptation */ - -var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { - var intrinsicName = name; - var alias; - if (hasOwn(LEGACY_ALIASES, intrinsicName)) { - alias = LEGACY_ALIASES[intrinsicName]; - intrinsicName = '%' + alias[0] + '%'; - } - - if (hasOwn(INTRINSICS, intrinsicName)) { - var value = INTRINSICS[intrinsicName]; - if (value === needsEval) { - value = doEval(intrinsicName); - } - if (typeof value === 'undefined' && !allowMissing) { - throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); - } - - return { - alias: alias, - name: intrinsicName, - value: value - }; - } - - throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); -}; - -module.exports = function GetIntrinsic(name, allowMissing) { - if (typeof name !== 'string' || name.length === 0) { - throw new $TypeError('intrinsic name must be a non-empty string'); - } - if (arguments.length > 1 && typeof allowMissing !== 'boolean') { - throw new $TypeError('"allowMissing" argument must be a boolean'); - } - - if ($exec(/^%?[^%]*%?$/, name) === null) { - throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); - } - var parts = stringToPath(name); - var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; - - var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); - var intrinsicRealName = intrinsic.name; - var value = intrinsic.value; - var skipFurtherCaching = false; - - var alias = intrinsic.alias; - if (alias) { - intrinsicBaseName = alias[0]; - $spliceApply(parts, $concat([0, 1], alias)); - } - - for (var i = 1, isOwn = true; i < parts.length; i += 1) { - var part = parts[i]; - var first = $strSlice(part, 0, 1); - var last = $strSlice(part, -1); - if ( - ( - (first === '"' || first === "'" || first === '`') - || (last === '"' || last === "'" || last === '`') - ) - && first !== last - ) { - throw new $SyntaxError('property names with quotes must have matching quotes'); - } - if (part === 'constructor' || !isOwn) { - skipFurtherCaching = true; - } - - intrinsicBaseName += '.' + part; - intrinsicRealName = '%' + intrinsicBaseName + '%'; - - if (hasOwn(INTRINSICS, intrinsicRealName)) { - value = INTRINSICS[intrinsicRealName]; - } else if (value != null) { - if (!(part in value)) { - if (!allowMissing) { - throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); - } - return void undefined; - } - if ($gOPD && (i + 1) >= parts.length) { - var desc = $gOPD(value, part); - isOwn = !!desc; - - // By convention, when a data property is converted to an accessor - // property to emulate a data property that does not suffer from - // the override mistake, that accessor's getter is marked with - // an `originalValue` property. Here, when we detect this, we - // uphold the illusion by pretending to see that original data - // property, i.e., returning the value rather than the getter - // itself. - if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { - value = desc.get; - } else { - value = value[part]; - } - } else { - isOwn = hasOwn(value, part); - value = value[part]; - } - - if (isOwn && !skipFurtherCaching) { - INTRINSICS[intrinsicRealName] = value; - } - } - } - return value; -}; diff --git a/node_modules/get-intrinsic/package.json b/node_modules/get-intrinsic/package.json deleted file mode 100644 index 2828e73..0000000 --- a/node_modules/get-intrinsic/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "name": "get-intrinsic", - "version": "1.3.0", - "description": "Get and robustly cache all JS language-level intrinsics at first require time", - "main": "index.js", - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepublishOnly": "safe-publish-latest", - "prelint": "evalmd README.md", - "lint": "eslint --ext=.js,.mjs .", - "pretest": "npm run lint", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "npx npm@'>= 10.2' audit --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/get-intrinsic.git" - }, - "keywords": [ - "javascript", - "ecmascript", - "es", - "js", - "intrinsic", - "getintrinsic", - "es-abstract" - ], - "author": "Jordan Harband ", - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/get-intrinsic/issues" - }, - "homepage": "https://github.com/ljharb/get-intrinsic#readme", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "devDependencies": { - "@ljharb/eslint-config": "^21.1.1", - "auto-changelog": "^2.5.0", - "call-bound": "^1.0.3", - "encoding": "^0.1.13", - "es-abstract": "^1.23.9", - "es-value-fixtures": "^1.7.1", - "eslint": "=8.8.0", - "evalmd": "^0.0.19", - "for-each": "^0.3.5", - "make-async-function": "^1.0.0", - "make-async-generator-function": "^1.0.0", - "make-generator-function": "^2.0.0", - "mock-property": "^1.1.0", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "object-inspect": "^1.13.4", - "safe-publish-latest": "^2.0.0", - "tape": "^5.9.0" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "testling": { - "files": "test/GetIntrinsic.js" - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - }, - "engines": { - "node": ">= 0.4" - } -} diff --git a/node_modules/get-intrinsic/test/GetIntrinsic.js b/node_modules/get-intrinsic/test/GetIntrinsic.js deleted file mode 100644 index d9c0f30..0000000 --- a/node_modules/get-intrinsic/test/GetIntrinsic.js +++ /dev/null @@ -1,274 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('../'); - -var test = require('tape'); -var forEach = require('for-each'); -var debug = require('object-inspect'); -var generatorFns = require('make-generator-function')(); -var asyncFns = require('make-async-function').list(); -var asyncGenFns = require('make-async-generator-function')(); -var mockProperty = require('mock-property'); - -var callBound = require('call-bound'); -var v = require('es-value-fixtures'); -var $gOPD = require('gopd'); -var DefinePropertyOrThrow = require('es-abstract/2023/DefinePropertyOrThrow'); - -var $isProto = callBound('%Object.prototype.isPrototypeOf%'); - -test('export', function (t) { - t.equal(typeof GetIntrinsic, 'function', 'it is a function'); - t.equal(GetIntrinsic.length, 2, 'function has length of 2'); - - t.end(); -}); - -test('throws', function (t) { - t['throws']( - function () { GetIntrinsic('not an intrinsic'); }, - SyntaxError, - 'nonexistent intrinsic throws a syntax error' - ); - - t['throws']( - function () { GetIntrinsic(''); }, - TypeError, - 'empty string intrinsic throws a type error' - ); - - t['throws']( - function () { GetIntrinsic('.'); }, - SyntaxError, - '"just a dot" intrinsic throws a syntax error' - ); - - t['throws']( - function () { GetIntrinsic('%String'); }, - SyntaxError, - 'Leading % without trailing % throws a syntax error' - ); - - t['throws']( - function () { GetIntrinsic('String%'); }, - SyntaxError, - 'Trailing % without leading % throws a syntax error' - ); - - t['throws']( - function () { GetIntrinsic("String['prototype]"); }, - SyntaxError, - 'Dynamic property access is disallowed for intrinsics (unterminated string)' - ); - - t['throws']( - function () { GetIntrinsic('%Proxy.prototype.undefined%'); }, - TypeError, - "Throws when middle part doesn't exist (%Proxy.prototype.undefined%)" - ); - - t['throws']( - function () { GetIntrinsic('%Array.prototype%garbage%'); }, - SyntaxError, - 'Throws with extra percent signs' - ); - - t['throws']( - function () { GetIntrinsic('%Array.prototype%push%'); }, - SyntaxError, - 'Throws with extra percent signs, even on an existing intrinsic' - ); - - forEach(v.nonStrings, function (nonString) { - t['throws']( - function () { GetIntrinsic(nonString); }, - TypeError, - debug(nonString) + ' is not a String' - ); - }); - - forEach(v.nonBooleans, function (nonBoolean) { - t['throws']( - function () { GetIntrinsic('%', nonBoolean); }, - TypeError, - debug(nonBoolean) + ' is not a Boolean' - ); - }); - - forEach([ - 'toString', - 'propertyIsEnumerable', - 'hasOwnProperty' - ], function (objectProtoMember) { - t['throws']( - function () { GetIntrinsic(objectProtoMember); }, - SyntaxError, - debug(objectProtoMember) + ' is not an intrinsic' - ); - }); - - t.end(); -}); - -test('base intrinsics', function (t) { - t.equal(GetIntrinsic('%Object%'), Object, '%Object% yields Object'); - t.equal(GetIntrinsic('Object'), Object, 'Object yields Object'); - t.equal(GetIntrinsic('%Array%'), Array, '%Array% yields Array'); - t.equal(GetIntrinsic('Array'), Array, 'Array yields Array'); - - t.end(); -}); - -test('dotted paths', function (t) { - t.equal(GetIntrinsic('%Object.prototype.toString%'), Object.prototype.toString, '%Object.prototype.toString% yields Object.prototype.toString'); - t.equal(GetIntrinsic('Object.prototype.toString'), Object.prototype.toString, 'Object.prototype.toString yields Object.prototype.toString'); - t.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push, '%Array.prototype.push% yields Array.prototype.push'); - t.equal(GetIntrinsic('Array.prototype.push'), Array.prototype.push, 'Array.prototype.push yields Array.prototype.push'); - - test('underscore paths are aliases for dotted paths', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) { - var original = GetIntrinsic('%ObjProto_toString%'); - - forEach([ - '%Object.prototype.toString%', - 'Object.prototype.toString', - '%ObjectPrototype.toString%', - 'ObjectPrototype.toString', - '%ObjProto_toString%', - 'ObjProto_toString' - ], function (name) { - DefinePropertyOrThrow(Object.prototype, 'toString', { - '[[Value]]': function toString() { - return original.apply(this, arguments); - } - }); - st.equal(GetIntrinsic(name), original, name + ' yields original Object.prototype.toString'); - }); - - DefinePropertyOrThrow(Object.prototype, 'toString', { '[[Value]]': original }); - st.end(); - }); - - test('dotted paths cache', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) { - var original = GetIntrinsic('%Object.prototype.propertyIsEnumerable%'); - - forEach([ - '%Object.prototype.propertyIsEnumerable%', - 'Object.prototype.propertyIsEnumerable', - '%ObjectPrototype.propertyIsEnumerable%', - 'ObjectPrototype.propertyIsEnumerable' - ], function (name) { - var restore = mockProperty(Object.prototype, 'propertyIsEnumerable', { - value: function propertyIsEnumerable() { - return original.apply(this, arguments); - } - }); - st.equal(GetIntrinsic(name), original, name + ' yields cached Object.prototype.propertyIsEnumerable'); - - restore(); - }); - - st.end(); - }); - - test('dotted path reports correct error', function (st) { - st['throws'](function () { - GetIntrinsic('%NonExistentIntrinsic.prototype.property%'); - }, /%NonExistentIntrinsic%/, 'The base intrinsic of %NonExistentIntrinsic.prototype.property% is %NonExistentIntrinsic%'); - - st['throws'](function () { - GetIntrinsic('%NonExistentIntrinsicPrototype.property%'); - }, /%NonExistentIntrinsicPrototype%/, 'The base intrinsic of %NonExistentIntrinsicPrototype.property% is %NonExistentIntrinsicPrototype%'); - - st.end(); - }); - - t.end(); -}); - -test('accessors', { skip: !$gOPD || typeof Map !== 'function' }, function (t) { - var actual = $gOPD(Map.prototype, 'size'); - t.ok(actual, 'Map.prototype.size has a descriptor'); - t.equal(typeof actual.get, 'function', 'Map.prototype.size has a getter function'); - t.equal(GetIntrinsic('%Map.prototype.size%'), actual.get, '%Map.prototype.size% yields the getter for it'); - t.equal(GetIntrinsic('Map.prototype.size'), actual.get, 'Map.prototype.size yields the getter for it'); - - t.end(); -}); - -test('generator functions', { skip: !generatorFns.length }, function (t) { - var $GeneratorFunction = GetIntrinsic('%GeneratorFunction%'); - var $GeneratorFunctionPrototype = GetIntrinsic('%Generator%'); - var $GeneratorPrototype = GetIntrinsic('%GeneratorPrototype%'); - - forEach(generatorFns, function (genFn) { - var fnName = genFn.name; - fnName = fnName ? "'" + fnName + "'" : 'genFn'; - - t.ok(genFn instanceof $GeneratorFunction, fnName + ' instanceof %GeneratorFunction%'); - t.ok($isProto($GeneratorFunctionPrototype, genFn), '%Generator% is prototype of ' + fnName); - t.ok($isProto($GeneratorPrototype, genFn.prototype), '%GeneratorPrototype% is prototype of ' + fnName + '.prototype'); - }); - - t.end(); -}); - -test('async functions', { skip: !asyncFns.length }, function (t) { - var $AsyncFunction = GetIntrinsic('%AsyncFunction%'); - var $AsyncFunctionPrototype = GetIntrinsic('%AsyncFunctionPrototype%'); - - forEach(asyncFns, function (asyncFn) { - var fnName = asyncFn.name; - fnName = fnName ? "'" + fnName + "'" : 'asyncFn'; - - t.ok(asyncFn instanceof $AsyncFunction, fnName + ' instanceof %AsyncFunction%'); - t.ok($isProto($AsyncFunctionPrototype, asyncFn), '%AsyncFunctionPrototype% is prototype of ' + fnName); - }); - - t.end(); -}); - -test('async generator functions', { skip: asyncGenFns.length === 0 }, function (t) { - var $AsyncGeneratorFunction = GetIntrinsic('%AsyncGeneratorFunction%'); - var $AsyncGeneratorFunctionPrototype = GetIntrinsic('%AsyncGenerator%'); - var $AsyncGeneratorPrototype = GetIntrinsic('%AsyncGeneratorPrototype%'); - - forEach(asyncGenFns, function (asyncGenFn) { - var fnName = asyncGenFn.name; - fnName = fnName ? "'" + fnName + "'" : 'asyncGenFn'; - - t.ok(asyncGenFn instanceof $AsyncGeneratorFunction, fnName + ' instanceof %AsyncGeneratorFunction%'); - t.ok($isProto($AsyncGeneratorFunctionPrototype, asyncGenFn), '%AsyncGenerator% is prototype of ' + fnName); - t.ok($isProto($AsyncGeneratorPrototype, asyncGenFn.prototype), '%AsyncGeneratorPrototype% is prototype of ' + fnName + '.prototype'); - }); - - t.end(); -}); - -test('%ThrowTypeError%', function (t) { - var $ThrowTypeError = GetIntrinsic('%ThrowTypeError%'); - - t.equal(typeof $ThrowTypeError, 'function', 'is a function'); - t['throws']( - $ThrowTypeError, - TypeError, - '%ThrowTypeError% throws a TypeError' - ); - - t.end(); -}); - -test('allowMissing', { skip: asyncGenFns.length > 0 }, function (t) { - t['throws']( - function () { GetIntrinsic('%AsyncGeneratorPrototype%'); }, - TypeError, - 'throws when missing' - ); - - t.equal( - GetIntrinsic('%AsyncGeneratorPrototype%', true), - undefined, - 'does not throw when allowMissing' - ); - - t.end(); -}); diff --git a/node_modules/get-proto/.eslintrc b/node_modules/get-proto/.eslintrc deleted file mode 100644 index 1d21a8a..0000000 --- a/node_modules/get-proto/.eslintrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "id-length": "off", - "sort-keys": "off", - }, -} diff --git a/node_modules/get-proto/.github/FUNDING.yml b/node_modules/get-proto/.github/FUNDING.yml deleted file mode 100644 index 93183ef..0000000 --- a/node_modules/get-proto/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/get-proto -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/get-proto/.nycrc b/node_modules/get-proto/.nycrc deleted file mode 100644 index bdd626c..0000000 --- a/node_modules/get-proto/.nycrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/get-proto/CHANGELOG.md b/node_modules/get-proto/CHANGELOG.md deleted file mode 100644 index 5860229..0000000 --- a/node_modules/get-proto/CHANGELOG.md +++ /dev/null @@ -1,21 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.0.1](https://github.com/ljharb/get-proto/compare/v1.0.0...v1.0.1) - 2025-01-02 - -### Commits - -- [Fix] for the `Object.getPrototypeOf` window, throw for non-objects [`7fe6508`](https://github.com/ljharb/get-proto/commit/7fe6508b71419ebe1976bedb86001d1feaeaa49a) - -## v1.0.0 - 2025-01-01 - -### Commits - -- Initial implementation, tests, readme, types [`5c70775`](https://github.com/ljharb/get-proto/commit/5c707751e81c3deeb2cf980d185fc7fd43611415) -- Initial commit [`7c65c2a`](https://github.com/ljharb/get-proto/commit/7c65c2ad4e33d5dae2f219ebe1a046ae2256972c) -- npm init [`0b8cf82`](https://github.com/ljharb/get-proto/commit/0b8cf824c9634e4a34ef7dd2a2cdc5be6ac79518) -- Only apps should have lockfiles [`a6d1bff`](https://github.com/ljharb/get-proto/commit/a6d1bffc364f5828377cea7194558b2dbef7aea2) diff --git a/node_modules/get-proto/LICENSE b/node_modules/get-proto/LICENSE deleted file mode 100644 index eeabd1c..0000000 --- a/node_modules/get-proto/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/get-proto/Object.getPrototypeOf.d.ts b/node_modules/get-proto/Object.getPrototypeOf.d.ts deleted file mode 100644 index 028b3ff..0000000 --- a/node_modules/get-proto/Object.getPrototypeOf.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare function getProto(object: O): object | null; - -declare const x: typeof getProto | null; - -export = x; \ No newline at end of file diff --git a/node_modules/get-proto/Object.getPrototypeOf.js b/node_modules/get-proto/Object.getPrototypeOf.js deleted file mode 100644 index c2cbbdf..0000000 --- a/node_modules/get-proto/Object.getPrototypeOf.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -var $Object = require('es-object-atoms'); - -/** @type {import('./Object.getPrototypeOf')} */ -module.exports = $Object.getPrototypeOf || null; diff --git a/node_modules/get-proto/README.md b/node_modules/get-proto/README.md deleted file mode 100644 index f8b4cce..0000000 --- a/node_modules/get-proto/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# get-proto [![Version Badge][npm-version-svg]][package-url] - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -Robustly get the [[Prototype]] of an object. Uses the best available method. - -## Getting started - -```sh -npm install --save get-proto -``` - -## Usage/Examples - -```js -const assert = require('assert'); -const getProto = require('get-proto'); - -const a = { a: 1, b: 2, [Symbol.toStringTag]: 'foo' }; -const b = { c: 3, __proto__: a }; - -assert.equal(getProto(b), a); -assert.equal(getProto(a), Object.prototype); -assert.equal(getProto({ __proto__: null }), null); -``` - -## Tests - -Clone the repo, `npm install`, and run `npm test` - -[package-url]: https://npmjs.org/package/get-proto -[npm-version-svg]: https://versionbadg.es/ljharb/get-proto.svg -[deps-svg]: https://david-dm.org/ljharb/get-proto.svg -[deps-url]: https://david-dm.org/ljharb/get-proto -[dev-deps-svg]: https://david-dm.org/ljharb/get-proto/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/get-proto#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/get-proto.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/get-proto.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/get-proto.svg -[downloads-url]: https://npm-stat.com/charts.html?package=get-proto -[codecov-image]: https://codecov.io/gh/ljharb/get-proto/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/ljharb/get-proto/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/get-proto -[actions-url]: https://github.com/ljharb/get-proto/actions diff --git a/node_modules/get-proto/Reflect.getPrototypeOf.d.ts b/node_modules/get-proto/Reflect.getPrototypeOf.d.ts deleted file mode 100644 index 2388fe0..0000000 --- a/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const x: typeof Reflect.getPrototypeOf | null; - -export = x; \ No newline at end of file diff --git a/node_modules/get-proto/Reflect.getPrototypeOf.js b/node_modules/get-proto/Reflect.getPrototypeOf.js deleted file mode 100644 index e6c51be..0000000 --- a/node_modules/get-proto/Reflect.getPrototypeOf.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./Reflect.getPrototypeOf')} */ -module.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null; diff --git a/node_modules/get-proto/index.d.ts b/node_modules/get-proto/index.d.ts deleted file mode 100644 index 2c021f3..0000000 --- a/node_modules/get-proto/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare function getProto(object: O): object | null; - -declare const x: typeof getProto | null; - -export = x; diff --git a/node_modules/get-proto/index.js b/node_modules/get-proto/index.js deleted file mode 100644 index 7e5747b..0000000 --- a/node_modules/get-proto/index.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -var reflectGetProto = require('./Reflect.getPrototypeOf'); -var originalGetProto = require('./Object.getPrototypeOf'); - -var getDunderProto = require('dunder-proto/get'); - -/** @type {import('.')} */ -module.exports = reflectGetProto - ? function getProto(O) { - // @ts-expect-error TS can't narrow inside a closure, for some reason - return reflectGetProto(O); - } - : originalGetProto - ? function getProto(O) { - if (!O || (typeof O !== 'object' && typeof O !== 'function')) { - throw new TypeError('getProto: not an object'); - } - // @ts-expect-error TS can't narrow inside a closure, for some reason - return originalGetProto(O); - } - : getDunderProto - ? function getProto(O) { - // @ts-expect-error TS can't narrow inside a closure, for some reason - return getDunderProto(O); - } - : null; diff --git a/node_modules/get-proto/package.json b/node_modules/get-proto/package.json deleted file mode 100644 index 9c35cec..0000000 --- a/node_modules/get-proto/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "get-proto", - "version": "1.0.1", - "description": "Robustly get the [[Prototype]] of an object", - "main": "index.js", - "exports": { - ".": "./index.js", - "./Reflect.getPrototypeOf": "./Reflect.getPrototypeOf.js", - "./Object.getPrototypeOf": "./Object.getPrototypeOf.js", - "./package.json": "./package.json" - }, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepublishOnly": "safe-publish-latest", - "pretest": "npm run --silent lint", - "test": "npm run tests-only", - "posttest": "npx npm@\">=10.2\" audit --production", - "tests-only": "nyc tape 'test/**/*.js'", - "prelint": "evalmd README.md", - "lint": "eslint --ext=js,mjs .", - "postlint": "tsc && attw -P", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/get-proto.git" - }, - "keywords": [ - "get", - "proto", - "prototype", - "getPrototypeOf", - "[[Prototype]]" - ], - "author": "Jordan Harband ", - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/get-proto/issues" - }, - "homepage": "https://github.com/ljharb/get-proto#readme", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "devDependencies": { - "@arethetypeswrong/cli": "^0.17.2", - "@ljharb/eslint-config": "^21.1.1", - "@ljharb/tsconfig": "^0.2.3", - "@types/tape": "^5.8.0", - "auto-changelog": "^2.5.0", - "eslint": "=8.8.0", - "evalmd": "^0.0.19", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.9.0", - "typescript": "next" - }, - "engines": { - "node": ">= 0.4" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - }, - "testling": { - "files": "test/index.js" - } -} diff --git a/node_modules/get-proto/test/index.js b/node_modules/get-proto/test/index.js deleted file mode 100644 index 5a2ece2..0000000 --- a/node_modules/get-proto/test/index.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -var test = require('tape'); - -var getProto = require('../'); - -test('getProto', function (t) { - t.equal(typeof getProto, 'function', 'is a function'); - - t.test('can get', { skip: !getProto }, function (st) { - if (getProto) { // TS doesn't understand tape's skip - var proto = { b: 2 }; - st.equal(getProto(proto), Object.prototype, 'proto: returns the [[Prototype]]'); - - st.test('nullish value', function (s2t) { - // @ts-expect-error - s2t['throws'](function () { return getProto(undefined); }, TypeError, 'undefined is not an object'); - // @ts-expect-error - s2t['throws'](function () { return getProto(null); }, TypeError, 'null is not an object'); - s2t.end(); - }); - - // @ts-expect-error - st['throws'](function () { getProto(true); }, 'throws for true'); - // @ts-expect-error - st['throws'](function () { getProto(false); }, 'throws for false'); - // @ts-expect-error - st['throws'](function () { getProto(42); }, 'throws for 42'); - // @ts-expect-error - st['throws'](function () { getProto(NaN); }, 'throws for NaN'); - // @ts-expect-error - st['throws'](function () { getProto(0); }, 'throws for +0'); - // @ts-expect-error - st['throws'](function () { getProto(-0); }, 'throws for -0'); - // @ts-expect-error - st['throws'](function () { getProto(Infinity); }, 'throws for ∞'); - // @ts-expect-error - st['throws'](function () { getProto(-Infinity); }, 'throws for -∞'); - // @ts-expect-error - st['throws'](function () { getProto(''); }, 'throws for empty string'); - // @ts-expect-error - st['throws'](function () { getProto('foo'); }, 'throws for non-empty string'); - st.equal(getProto(/a/g), RegExp.prototype); - st.equal(getProto(new Date()), Date.prototype); - st.equal(getProto(function () {}), Function.prototype); - st.equal(getProto([]), Array.prototype); - st.equal(getProto({}), Object.prototype); - - var nullObject = { __proto__: null }; - if ('toString' in nullObject) { - st.comment('no null objects in this engine'); - st.equal(getProto(nullObject), Object.prototype, '"null" object has Object.prototype as [[Prototype]]'); - } else { - st.equal(getProto(nullObject), null, 'null object has null [[Prototype]]'); - } - } - - st.end(); - }); - - t.test('can not get', { skip: !!getProto }, function (st) { - st.equal(getProto, null); - - st.end(); - }); - - t.end(); -}); diff --git a/node_modules/get-proto/tsconfig.json b/node_modules/get-proto/tsconfig.json deleted file mode 100644 index 60fb90e..0000000 --- a/node_modules/get-proto/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "@ljharb/tsconfig", - "compilerOptions": { - //"target": "es2021", - }, - "exclude": [ - "coverage", - ], -} diff --git a/node_modules/glob-parent/CHANGELOG.md b/node_modules/glob-parent/CHANGELOG.md deleted file mode 100644 index fb9de96..0000000 --- a/node_modules/glob-parent/CHANGELOG.md +++ /dev/null @@ -1,110 +0,0 @@ -### [5.1.2](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2) (2021-03-06) - - -### Bug Fixes - -* eliminate ReDoS ([#36](https://github.com/gulpjs/glob-parent/issues/36)) ([f923116](https://github.com/gulpjs/glob-parent/commit/f9231168b0041fea3f8f954b3cceb56269fc6366)) - -### [5.1.1](https://github.com/gulpjs/glob-parent/compare/v5.1.0...v5.1.1) (2021-01-27) - - -### Bug Fixes - -* unescape exclamation mark ([#26](https://github.com/gulpjs/glob-parent/issues/26)) ([a98874f](https://github.com/gulpjs/glob-parent/commit/a98874f1a59e407f4fb1beb0db4efa8392da60bb)) - -## [5.1.0](https://github.com/gulpjs/glob-parent/compare/v5.0.0...v5.1.0) (2021-01-27) - - -### Features - -* add `flipBackslashes` option to disable auto conversion of slashes (closes [#24](https://github.com/gulpjs/glob-parent/issues/24)) ([#25](https://github.com/gulpjs/glob-parent/issues/25)) ([eecf91d](https://github.com/gulpjs/glob-parent/commit/eecf91d5e3834ed78aee39c4eaaae654d76b87b3)) - -## [5.0.0](https://github.com/gulpjs/glob-parent/compare/v4.0.0...v5.0.0) (2021-01-27) - - -### ⚠ BREAKING CHANGES - -* Drop support for node <6 & bump dependencies - -### Miscellaneous Chores - -* Drop support for node <6 & bump dependencies ([896c0c0](https://github.com/gulpjs/glob-parent/commit/896c0c00b4e7362f60b96e7fc295ae929245255a)) - -## [4.0.0](https://github.com/gulpjs/glob-parent/compare/v3.1.0...v4.0.0) (2021-01-27) - - -### ⚠ BREAKING CHANGES - -* question marks are valid path characters on Windows so avoid flagging as a glob when alone -* Update is-glob dependency - -### Features - -* hoist regexps and strings for performance gains ([4a80667](https://github.com/gulpjs/glob-parent/commit/4a80667c69355c76a572a5892b0f133c8e1f457e)) -* question marks are valid path characters on Windows so avoid flagging as a glob when alone ([2a551dd](https://github.com/gulpjs/glob-parent/commit/2a551dd0dc3235e78bf3c94843d4107072d17841)) -* Update is-glob dependency ([e41fcd8](https://github.com/gulpjs/glob-parent/commit/e41fcd895d1f7bc617dba45c9d935a7949b9c281)) - -## [3.1.0](https://github.com/gulpjs/glob-parent/compare/v3.0.1...v3.1.0) (2021-01-27) - - -### Features - -* allow basic win32 backslash use ([272afa5](https://github.com/gulpjs/glob-parent/commit/272afa5fd070fc0f796386a5993d4ee4a846988b)) -* handle extglobs (parentheses) containing separators ([7db1bdb](https://github.com/gulpjs/glob-parent/commit/7db1bdb0756e55fd14619e8ce31aa31b17b117fd)) -* new approach to braces/brackets handling ([8269bd8](https://github.com/gulpjs/glob-parent/commit/8269bd89290d99fac9395a354fb56fdcdb80f0be)) -* pre-process braces/brackets sections ([9ef8a87](https://github.com/gulpjs/glob-parent/commit/9ef8a87f66b1a43d0591e7a8e4fc5a18415ee388)) -* preserve escaped brace/bracket at end of string ([8cfb0ba](https://github.com/gulpjs/glob-parent/commit/8cfb0ba84202d51571340dcbaf61b79d16a26c76)) - - -### Bug Fixes - -* trailing escaped square brackets ([99ec9fe](https://github.com/gulpjs/glob-parent/commit/99ec9fecc60ee488ded20a94dd4f18b4f55c4ccf)) - -### [3.0.1](https://github.com/gulpjs/glob-parent/compare/v3.0.0...v3.0.1) (2021-01-27) - - -### Features - -* use path-dirname ponyfill ([cdbea5f](https://github.com/gulpjs/glob-parent/commit/cdbea5f32a58a54e001a75ddd7c0fccd4776aacc)) - - -### Bug Fixes - -* unescape glob-escaped dirnames on output ([598c533](https://github.com/gulpjs/glob-parent/commit/598c533bdf49c1428bc063aa9b8db40c5a86b030)) - -## [3.0.0](https://github.com/gulpjs/glob-parent/compare/v2.0.0...v3.0.0) (2021-01-27) - - -### ⚠ BREAKING CHANGES - -* update is-glob dependency - -### Features - -* update is-glob dependency ([5c5f8ef](https://github.com/gulpjs/glob-parent/commit/5c5f8efcee362a8e7638cf8220666acd8784f6bd)) - -## [2.0.0](https://github.com/gulpjs/glob-parent/compare/v1.3.0...v2.0.0) (2021-01-27) - - -### Features - -* move up to dirname regardless of glob characters ([f97fb83](https://github.com/gulpjs/glob-parent/commit/f97fb83be2e0a9fc8d3b760e789d2ecadd6aa0c2)) - -## [1.3.0](https://github.com/gulpjs/glob-parent/compare/v1.2.0...v1.3.0) (2021-01-27) - -## [1.2.0](https://github.com/gulpjs/glob-parent/compare/v1.1.0...v1.2.0) (2021-01-27) - - -### Reverts - -* feat: make regex test strings smaller ([dc80fa9](https://github.com/gulpjs/glob-parent/commit/dc80fa9658dca20549cfeba44bbd37d5246fcce0)) - -## [1.1.0](https://github.com/gulpjs/glob-parent/compare/v1.0.0...v1.1.0) (2021-01-27) - - -### Features - -* make regex test strings smaller ([cd83220](https://github.com/gulpjs/glob-parent/commit/cd832208638f45169f986d80fcf66e401f35d233)) - -## 1.0.0 (2021-01-27) - diff --git a/node_modules/glob-parent/LICENSE b/node_modules/glob-parent/LICENSE deleted file mode 100644 index 63222d7..0000000 --- a/node_modules/glob-parent/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) 2015, 2019 Elan Shanker - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/glob-parent/README.md b/node_modules/glob-parent/README.md deleted file mode 100644 index 36a2793..0000000 --- a/node_modules/glob-parent/README.md +++ /dev/null @@ -1,137 +0,0 @@ -

- - - -

- -# glob-parent - -[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Azure Pipelines Build Status][azure-pipelines-image]][azure-pipelines-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] - -Extract the non-magic parent path from a glob string. - -## Usage - -```js -var globParent = require('glob-parent'); - -globParent('path/to/*.js'); // 'path/to' -globParent('/root/path/to/*.js'); // '/root/path/to' -globParent('/*.js'); // '/' -globParent('*.js'); // '.' -globParent('**/*.js'); // '.' -globParent('path/{to,from}'); // 'path' -globParent('path/!(to|from)'); // 'path' -globParent('path/?(to|from)'); // 'path' -globParent('path/+(to|from)'); // 'path' -globParent('path/*(to|from)'); // 'path' -globParent('path/@(to|from)'); // 'path' -globParent('path/**/*'); // 'path' - -// if provided a non-glob path, returns the nearest dir -globParent('path/foo/bar.js'); // 'path/foo' -globParent('path/foo/'); // 'path/foo' -globParent('path/foo'); // 'path' (see issue #3 for details) -``` - -## API - -### `globParent(maybeGlobString, [options])` - -Takes a string and returns the part of the path before the glob begins. Be aware of Escaping rules and Limitations below. - -#### options - -```js -{ - // Disables the automatic conversion of slashes for Windows - flipBackslashes: true -} -``` - -## Escaping - -The following characters have special significance in glob patterns and must be escaped if you want them to be treated as regular path characters: - -- `?` (question mark) unless used as a path segment alone -- `*` (asterisk) -- `|` (pipe) -- `(` (opening parenthesis) -- `)` (closing parenthesis) -- `{` (opening curly brace) -- `}` (closing curly brace) -- `[` (opening bracket) -- `]` (closing bracket) - -**Example** - -```js -globParent('foo/[bar]/') // 'foo' -globParent('foo/\\[bar]/') // 'foo/[bar]' -``` - -## Limitations - -### Braces & Brackets -This library attempts a quick and imperfect method of determining which path -parts have glob magic without fully parsing/lexing the pattern. There are some -advanced use cases that can trip it up, such as nested braces where the outer -pair is escaped and the inner one contains a path separator. If you find -yourself in the unlikely circumstance of being affected by this or need to -ensure higher-fidelity glob handling in your library, it is recommended that you -pre-process your input with [expand-braces] and/or [expand-brackets]. - -### Windows -Backslashes are not valid path separators for globs. If a path with backslashes -is provided anyway, for simple cases, glob-parent will replace the path -separator for you and return the non-glob parent path (now with -forward-slashes, which are still valid as Windows path separators). - -This cannot be used in conjunction with escape characters. - -```js -// BAD -globParent('C:\\Program Files \\(x86\\)\\*.ext') // 'C:/Program Files /(x86/)' - -// GOOD -globParent('C:/Program Files\\(x86\\)/*.ext') // 'C:/Program Files (x86)' -``` - -If you are using escape characters for a pattern without path parts (i.e. -relative to `cwd`), prefix with `./` to avoid confusing glob-parent. - -```js -// BAD -globParent('foo \\[bar]') // 'foo ' -globParent('foo \\[bar]*') // 'foo ' - -// GOOD -globParent('./foo \\[bar]') // 'foo [bar]' -globParent('./foo \\[bar]*') // '.' -``` - -## License - -ISC - -[expand-braces]: https://github.com/jonschlinkert/expand-braces -[expand-brackets]: https://github.com/jonschlinkert/expand-brackets - -[downloads-image]: https://img.shields.io/npm/dm/glob-parent.svg -[npm-url]: https://www.npmjs.com/package/glob-parent -[npm-image]: https://img.shields.io/npm/v/glob-parent.svg - -[azure-pipelines-url]: https://dev.azure.com/gulpjs/gulp/_build/latest?definitionId=2&branchName=master -[azure-pipelines-image]: https://dev.azure.com/gulpjs/gulp/_apis/build/status/glob-parent?branchName=master - -[travis-url]: https://travis-ci.org/gulpjs/glob-parent -[travis-image]: https://img.shields.io/travis/gulpjs/glob-parent.svg?label=travis-ci - -[appveyor-url]: https://ci.appveyor.com/project/gulpjs/glob-parent -[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/glob-parent.svg?label=appveyor - -[coveralls-url]: https://coveralls.io/r/gulpjs/glob-parent -[coveralls-image]: https://img.shields.io/coveralls/gulpjs/glob-parent/master.svg - -[gitter-url]: https://gitter.im/gulpjs/gulp -[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg diff --git a/node_modules/glob-parent/index.js b/node_modules/glob-parent/index.js deleted file mode 100644 index 09e257e..0000000 --- a/node_modules/glob-parent/index.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -var isGlob = require('is-glob'); -var pathPosixDirname = require('path').posix.dirname; -var isWin32 = require('os').platform() === 'win32'; - -var slash = '/'; -var backslash = /\\/g; -var enclosure = /[\{\[].*[\}\]]$/; -var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; -var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; - -/** - * @param {string} str - * @param {Object} opts - * @param {boolean} [opts.flipBackslashes=true] - * @returns {string} - */ -module.exports = function globParent(str, opts) { - var options = Object.assign({ flipBackslashes: true }, opts); - - // flip windows path separators - if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) { - str = str.replace(backslash, slash); - } - - // special case for strings ending in enclosure containing path separator - if (enclosure.test(str)) { - str += slash; - } - - // preserves full path in case of trailing path separator - str += 'a'; - - // remove path parts that are globby - do { - str = pathPosixDirname(str); - } while (isGlob(str) || globby.test(str)); - - // remove escape chars and return result - return str.replace(escaped, '$1'); -}; diff --git a/node_modules/glob-parent/package.json b/node_modules/glob-parent/package.json deleted file mode 100644 index 125c971..0000000 --- a/node_modules/glob-parent/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "glob-parent", - "version": "5.1.2", - "description": "Extract the non-magic parent path from a glob string.", - "author": "Gulp Team (https://gulpjs.com/)", - "contributors": [ - "Elan Shanker (https://github.com/es128)", - "Blaine Bublitz " - ], - "repository": "gulpjs/glob-parent", - "license": "ISC", - "engines": { - "node": ">= 6" - }, - "main": "index.js", - "files": [ - "LICENSE", - "index.js" - ], - "scripts": { - "lint": "eslint .", - "pretest": "npm run lint", - "test": "nyc mocha --async-only", - "azure-pipelines": "nyc mocha --async-only --reporter xunit -O output=test.xunit", - "coveralls": "nyc report --reporter=text-lcov | coveralls" - }, - "dependencies": { - "is-glob": "^4.0.1" - }, - "devDependencies": { - "coveralls": "^3.0.11", - "eslint": "^2.13.1", - "eslint-config-gulp": "^3.0.1", - "expect": "^1.20.2", - "mocha": "^6.0.2", - "nyc": "^13.3.0" - }, - "keywords": [ - "glob", - "parent", - "strip", - "path", - "dirname", - "directory", - "base", - "wildcard" - ] -} diff --git a/node_modules/gopd/.eslintrc b/node_modules/gopd/.eslintrc deleted file mode 100644 index e2550c0..0000000 --- a/node_modules/gopd/.eslintrc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "func-style": [2, "declaration"], - "id-length": 0, - "multiline-comment-style": 0, - "new-cap": [2, { - "capIsNewExceptions": [ - "GetIntrinsic", - ], - }], - }, -} diff --git a/node_modules/gopd/.github/FUNDING.yml b/node_modules/gopd/.github/FUNDING.yml deleted file mode 100644 index 94a44a8..0000000 --- a/node_modules/gopd/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/gopd -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/gopd/CHANGELOG.md b/node_modules/gopd/CHANGELOG.md deleted file mode 100644 index 87f5727..0000000 --- a/node_modules/gopd/CHANGELOG.md +++ /dev/null @@ -1,45 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.2.0](https://github.com/ljharb/gopd/compare/v1.1.0...v1.2.0) - 2024-12-03 - -### Commits - -- [New] add `gOPD` entry point; remove `get-intrinsic` [`5b61232`](https://github.com/ljharb/gopd/commit/5b61232dedea4591a314bcf16101b1961cee024e) - -## [v1.1.0](https://github.com/ljharb/gopd/compare/v1.0.1...v1.1.0) - 2024-11-29 - -### Commits - -- [New] add types [`f585e39`](https://github.com/ljharb/gopd/commit/f585e397886d270e4ba84e53d226e4f9ca2eb0e6) -- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `tape` [`0b8e4fd`](https://github.com/ljharb/gopd/commit/0b8e4fded64397a7726a9daa144a6cc9a5e2edfa) -- [Dev Deps] update `aud`, `npmignore`, `tape` [`48378b2`](https://github.com/ljharb/gopd/commit/48378b2443f09a4f7efbd0fb6c3ee845a6cabcf3) -- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`78099ee`](https://github.com/ljharb/gopd/commit/78099eeed41bfdc134c912280483689cc8861c31) -- [Tests] replace `aud` with `npm audit` [`4e0d0ac`](https://github.com/ljharb/gopd/commit/4e0d0ac47619d24a75318a8e1f543ee04b2a2632) -- [meta] add missing `engines.node` [`1443316`](https://github.com/ljharb/gopd/commit/14433165d07835c680155b3dfd62d9217d735eca) -- [Deps] update `get-intrinsic` [`eee5f51`](https://github.com/ljharb/gopd/commit/eee5f51769f3dbaf578b70e2a3199116b01aa670) -- [Deps] update `get-intrinsic` [`550c378`](https://github.com/ljharb/gopd/commit/550c3780e3a9c77b62565712a001b4ed64ea61f5) -- [Dev Deps] add missing peer dep [`8c2ecf8`](https://github.com/ljharb/gopd/commit/8c2ecf848122e4e30abfc5b5086fb48b390dce75) - -## [v1.0.1](https://github.com/ljharb/gopd/compare/v1.0.0...v1.0.1) - 2022-11-01 - -### Commits - -- [Fix] actually export gOPD instead of dP [`4b624bf`](https://github.com/ljharb/gopd/commit/4b624bfbeff788c5e3ff16d9443a83627847234f) - -## v1.0.0 - 2022-11-01 - -### Commits - -- Initial implementation, tests, readme [`0911e01`](https://github.com/ljharb/gopd/commit/0911e012cd642092bd88b732c161c58bf4f20bea) -- Initial commit [`b84e33f`](https://github.com/ljharb/gopd/commit/b84e33f5808a805ac57ff88d4247ad935569acbe) -- [actions] add reusable workflows [`12ae28a`](https://github.com/ljharb/gopd/commit/12ae28ae5f50f86e750215b6e2188901646d0119) -- npm init [`280118b`](https://github.com/ljharb/gopd/commit/280118badb45c80b4483836b5cb5315bddf6e582) -- [meta] add `auto-changelog` [`bb78de5`](https://github.com/ljharb/gopd/commit/bb78de5639a180747fb290c28912beaaf1615709) -- [meta] create FUNDING.yml; add `funding` in package.json [`11c22e6`](https://github.com/ljharb/gopd/commit/11c22e6355bb01f24e7fac4c9bb3055eb5b25002) -- [meta] use `npmignore` to autogenerate an npmignore file [`4f4537a`](https://github.com/ljharb/gopd/commit/4f4537a843b39f698c52f072845092e6fca345bb) -- Only apps should have lockfiles [`c567022`](https://github.com/ljharb/gopd/commit/c567022a18573aa7951cf5399445d9840e23e98b) diff --git a/node_modules/gopd/LICENSE b/node_modules/gopd/LICENSE deleted file mode 100644 index 6abfe14..0000000 --- a/node_modules/gopd/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2022 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/gopd/README.md b/node_modules/gopd/README.md deleted file mode 100644 index 784e56a..0000000 --- a/node_modules/gopd/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# gopd [![Version Badge][npm-version-svg]][package-url] - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation. - -## Usage - -```javascript -var gOPD = require('gopd'); -var assert = require('assert'); - -if (gOPD) { - assert.equal(typeof gOPD, 'function', 'descriptors supported'); - // use gOPD like Object.getOwnPropertyDescriptor here -} else { - assert.ok(!gOPD, 'descriptors not supported'); -} -``` - -[package-url]: https://npmjs.org/package/gopd -[npm-version-svg]: https://versionbadg.es/ljharb/gopd.svg -[deps-svg]: https://david-dm.org/ljharb/gopd.svg -[deps-url]: https://david-dm.org/ljharb/gopd -[dev-deps-svg]: https://david-dm.org/ljharb/gopd/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/gopd#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/gopd.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/gopd.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/gopd.svg -[downloads-url]: https://npm-stat.com/charts.html?package=gopd -[codecov-image]: https://codecov.io/gh/ljharb/gopd/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/ljharb/gopd/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/gopd -[actions-url]: https://github.com/ljharb/gopd/actions diff --git a/node_modules/gopd/gOPD.d.ts b/node_modules/gopd/gOPD.d.ts deleted file mode 100644 index def48a3..0000000 --- a/node_modules/gopd/gOPD.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = Object.getOwnPropertyDescriptor; diff --git a/node_modules/gopd/gOPD.js b/node_modules/gopd/gOPD.js deleted file mode 100644 index cf9616c..0000000 --- a/node_modules/gopd/gOPD.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./gOPD')} */ -module.exports = Object.getOwnPropertyDescriptor; diff --git a/node_modules/gopd/index.d.ts b/node_modules/gopd/index.d.ts deleted file mode 100644 index e228065..0000000 --- a/node_modules/gopd/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare function gOPD(obj: O, prop: K): PropertyDescriptor | undefined; - -declare const fn: typeof gOPD | undefined | null; - -export = fn; \ No newline at end of file diff --git a/node_modules/gopd/index.js b/node_modules/gopd/index.js deleted file mode 100644 index a4081b0..0000000 --- a/node_modules/gopd/index.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -/** @type {import('.')} */ -var $gOPD = require('./gOPD'); - -if ($gOPD) { - try { - $gOPD([], 'length'); - } catch (e) { - // IE 8 has a broken gOPD - $gOPD = null; - } -} - -module.exports = $gOPD; diff --git a/node_modules/gopd/package.json b/node_modules/gopd/package.json deleted file mode 100644 index 01c5ffa..0000000 --- a/node_modules/gopd/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "gopd", - "version": "1.2.0", - "description": "`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.", - "main": "index.js", - "exports": { - ".": "./index.js", - "./gOPD": "./gOPD.js", - "./package.json": "./package.json" - }, - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prelint": "tsc -p . && attw -P", - "lint": "eslint --ext=js,mjs .", - "postlint": "evalmd README.md", - "pretest": "npm run lint", - "tests-only": "tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "npx npm@'>=10.2' audit --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/gopd.git" - }, - "keywords": [ - "ecmascript", - "javascript", - "getownpropertydescriptor", - "property", - "descriptor" - ], - "author": "Jordan Harband ", - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/gopd/issues" - }, - "homepage": "https://github.com/ljharb/gopd#readme", - "devDependencies": { - "@arethetypeswrong/cli": "^0.17.0", - "@ljharb/eslint-config": "^21.1.1", - "@ljharb/tsconfig": "^0.2.0", - "@types/tape": "^5.6.5", - "auto-changelog": "^2.5.0", - "encoding": "^0.1.13", - "eslint": "=8.8.0", - "evalmd": "^0.0.19", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "safe-publish-latest": "^2.0.0", - "tape": "^5.9.0", - "typescript": "next" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - }, - "engines": { - "node": ">= 0.4" - } -} diff --git a/node_modules/gopd/test/index.js b/node_modules/gopd/test/index.js deleted file mode 100644 index 6f43453..0000000 --- a/node_modules/gopd/test/index.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -var test = require('tape'); -var gOPD = require('../'); - -test('gOPD', function (t) { - t.test('supported', { skip: !gOPD }, function (st) { - st.equal(typeof gOPD, 'function', 'is a function'); - - var obj = { x: 1 }; - st.ok('x' in obj, 'property exists'); - - // @ts-expect-error TS can't figure out narrowing from `skip` - var desc = gOPD(obj, 'x'); - st.deepEqual( - desc, - { - configurable: true, - enumerable: true, - value: 1, - writable: true - }, - 'descriptor is as expected' - ); - - st.end(); - }); - - t.test('not supported', { skip: !!gOPD }, function (st) { - st.notOk(gOPD, 'is falsy'); - - st.end(); - }); - - t.end(); -}); diff --git a/node_modules/gopd/tsconfig.json b/node_modules/gopd/tsconfig.json deleted file mode 100644 index d9a6668..0000000 --- a/node_modules/gopd/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "@ljharb/tsconfig", - "compilerOptions": { - "target": "es2021", - }, - "exclude": [ - "coverage", - ], -} diff --git a/node_modules/has-symbols/.eslintrc b/node_modules/has-symbols/.eslintrc deleted file mode 100644 index 2d9a66a..0000000 --- a/node_modules/has-symbols/.eslintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "max-statements-per-line": [2, { "max": 2 }], - "no-magic-numbers": 0, - "multiline-comment-style": 0, - } -} diff --git a/node_modules/has-symbols/.github/FUNDING.yml b/node_modules/has-symbols/.github/FUNDING.yml deleted file mode 100644 index 04cf87e..0000000 --- a/node_modules/has-symbols/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/has-symbols -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/has-symbols/.nycrc b/node_modules/has-symbols/.nycrc deleted file mode 100644 index bdd626c..0000000 --- a/node_modules/has-symbols/.nycrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/has-symbols/CHANGELOG.md b/node_modules/has-symbols/CHANGELOG.md deleted file mode 100644 index cc3cf83..0000000 --- a/node_modules/has-symbols/CHANGELOG.md +++ /dev/null @@ -1,91 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.1.0](https://github.com/inspect-js/has-symbols/compare/v1.0.3...v1.1.0) - 2024-12-02 - -### Commits - -- [actions] update workflows [`548c0bf`](https://github.com/inspect-js/has-symbols/commit/548c0bf8c9b1235458df7a1c0490b0064647a282) -- [actions] further shard; update action deps [`bec56bb`](https://github.com/inspect-js/has-symbols/commit/bec56bb0fb44b43a786686b944875a3175cf3ff3) -- [meta] use `npmignore` to autogenerate an npmignore file [`ac81032`](https://github.com/inspect-js/has-symbols/commit/ac81032809157e0a079e5264e9ce9b6f1275777e) -- [New] add types [`6469cbf`](https://github.com/inspect-js/has-symbols/commit/6469cbff1866cfe367b2b3d181d9296ec14b2a3d) -- [actions] update rebase action to use reusable workflow [`9c9d4d0`](https://github.com/inspect-js/has-symbols/commit/9c9d4d0d8938e4b267acdf8e421f4e92d1716d72) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`adb5887`](https://github.com/inspect-js/has-symbols/commit/adb5887ca9444849b08beb5caaa9e1d42320cdfb) -- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`13ec198`](https://github.com/inspect-js/has-symbols/commit/13ec198ec80f1993a87710af1606a1970b22c7cb) -- [Dev Deps] update `auto-changelog`, `core-js`, `tape` [`941be52`](https://github.com/inspect-js/has-symbols/commit/941be5248387cab1da72509b22acf3fdb223f057) -- [Tests] replace `aud` with `npm audit` [`74f49e9`](https://github.com/inspect-js/has-symbols/commit/74f49e9a9d17a443020784234a1c53ce765b3559) -- [Dev Deps] update `npmignore` [`9c0ac04`](https://github.com/inspect-js/has-symbols/commit/9c0ac0452a834f4c2a4b54044f2d6a89f17e9a70) -- [Dev Deps] add missing peer dep [`52337a5`](https://github.com/inspect-js/has-symbols/commit/52337a5621cced61f846f2afdab7707a8132cc12) - -## [v1.0.3](https://github.com/inspect-js/has-symbols/compare/v1.0.2...v1.0.3) - 2022-03-01 - -### Commits - -- [actions] use `node/install` instead of `node/run`; use `codecov` action [`518b28f`](https://github.com/inspect-js/has-symbols/commit/518b28f6c5a516cbccae30794e40aa9f738b1693) -- [meta] add `bugs` and `homepage` fields; reorder package.json [`c480b13`](https://github.com/inspect-js/has-symbols/commit/c480b13fd6802b557e1cef9749872cb5fdeef744) -- [actions] reuse common workflows [`01d0ee0`](https://github.com/inspect-js/has-symbols/commit/01d0ee0a8d97c0947f5edb73eb722027a77b2b07) -- [actions] update codecov uploader [`6424ebe`](https://github.com/inspect-js/has-symbols/commit/6424ebe86b2c9c7c3d2e9bd4413a4e4f168cb275) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`dfa7e7f`](https://github.com/inspect-js/has-symbols/commit/dfa7e7ff38b594645d8c8222aab895157fa7e282) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`0c8d436`](https://github.com/inspect-js/has-symbols/commit/0c8d43685c45189cea9018191d4fd7eca91c9d02) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`9026554`](https://github.com/inspect-js/has-symbols/commit/902655442a1bf88e72b42345494ef0c60f5d36ab) -- [readme] add actions and codecov badges [`eaa9682`](https://github.com/inspect-js/has-symbols/commit/eaa9682f990f481d3acf7a1c7600bec36f7b3adc) -- [Dev Deps] update `eslint`, `tape` [`bc7a3ba`](https://github.com/inspect-js/has-symbols/commit/bc7a3ba46f27b7743f8a2579732d59d1b9ac791e) -- [Dev Deps] update `eslint`, `auto-changelog` [`0ace00a`](https://github.com/inspect-js/has-symbols/commit/0ace00af08a88cdd1e6ce0d60357d941c60c2d9f) -- [meta] use `prepublishOnly` script for npm 7+ [`093f72b`](https://github.com/inspect-js/has-symbols/commit/093f72bc2b0ed00c781f444922a5034257bf561d) -- [Tests] test on all 16 minors [`9b80d3d`](https://github.com/inspect-js/has-symbols/commit/9b80d3d9102529f04c20ec5b1fcc6e38426c6b03) - -## [v1.0.2](https://github.com/inspect-js/has-symbols/compare/v1.0.1...v1.0.2) - 2021-02-27 - -### Fixed - -- [Fix] use a universal way to get the original Symbol [`#11`](https://github.com/inspect-js/has-symbols/issues/11) - -### Commits - -- [Tests] migrate tests to Github Actions [`90ae798`](https://github.com/inspect-js/has-symbols/commit/90ae79820bdfe7bc703d67f5f3c5e205f98556d3) -- [meta] do not publish github action workflow files [`29e60a1`](https://github.com/inspect-js/has-symbols/commit/29e60a1b7c25c7f1acf7acff4a9320d0d10c49b4) -- [Tests] run `nyc` on all tests [`8476b91`](https://github.com/inspect-js/has-symbols/commit/8476b915650d360915abe2522505abf4b0e8f0ae) -- [readme] fix repo URLs, remove defunct badges [`126288e`](https://github.com/inspect-js/has-symbols/commit/126288ecc1797c0a40247a6b78bcb2e0bc5d7036) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `core-js`, `get-own-property-symbols` [`d84bdfa`](https://github.com/inspect-js/has-symbols/commit/d84bdfa48ac5188abbb4904b42614cd6c030940a) -- [Tests] fix linting errors [`0df3070`](https://github.com/inspect-js/has-symbols/commit/0df3070b981b6c9f2ee530c09189a7f5c6def839) -- [actions] add "Allow Edits" workflow [`1e6bc29`](https://github.com/inspect-js/has-symbols/commit/1e6bc29b188f32b9648657b07eda08504be5aa9c) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`36cea2a`](https://github.com/inspect-js/has-symbols/commit/36cea2addd4e6ec435f35a2656b4e9ef82498e9b) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1278338`](https://github.com/inspect-js/has-symbols/commit/127833801865fbc2cc8979beb9ca869c7bfe8222) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1493254`](https://github.com/inspect-js/has-symbols/commit/1493254eda13db5fb8fc5e4a3e8324b3d196029d) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js` [`b090bf2`](https://github.com/inspect-js/has-symbols/commit/b090bf214d3679a30edc1e2d729d466ab5183e1d) -- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`4addb7a`](https://github.com/inspect-js/has-symbols/commit/4addb7ab4dc73f927ae99928d68817554fc21dc0) -- [Dev Deps] update `auto-changelog`, `tape` [`81d0baf`](https://github.com/inspect-js/has-symbols/commit/81d0baf3816096a89a8558e8043895f7a7d10d8b) -- [Dev Deps] update `auto-changelog`; add `aud` [`1a4e561`](https://github.com/inspect-js/has-symbols/commit/1a4e5612c25d91c3a03d509721d02630bc4fe3da) -- [readme] remove unused testling URLs [`3000941`](https://github.com/inspect-js/has-symbols/commit/3000941f958046e923ed8152edb1ef4a599e6fcc) -- [Tests] only audit prod deps [`692e974`](https://github.com/inspect-js/has-symbols/commit/692e9743c912410e9440207631a643a34b4741a1) -- [Dev Deps] update `@ljharb/eslint-config` [`51c946c`](https://github.com/inspect-js/has-symbols/commit/51c946c7f6baa793ec5390bb5a45cdce16b4ba76) - -## [v1.0.1](https://github.com/inspect-js/has-symbols/compare/v1.0.0...v1.0.1) - 2019-11-16 - -### Commits - -- [Tests] use shared travis-ci configs [`ce396c9`](https://github.com/inspect-js/has-symbols/commit/ce396c9419ff11c43d0da5d05cdbb79f7fb42229) -- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v4.9`; use `nvm install-latest-npm` [`0690732`](https://github.com/inspect-js/has-symbols/commit/0690732801f47ab429f39ba1962f522d5c462d6b) -- [meta] add `auto-changelog` [`2163d0b`](https://github.com/inspect-js/has-symbols/commit/2163d0b7f36343076b8f947cd1667dd1750f26fc) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `safe-publish-latest`, `tape` [`8e0951f`](https://github.com/inspect-js/has-symbols/commit/8e0951f1a7a2e52068222b7bb73511761e6e4d9c) -- [actions] add automatic rebasing / merge commit blocking [`b09cdb7`](https://github.com/inspect-js/has-symbols/commit/b09cdb7cd7ee39e7a769878f56e2d6066f5ccd1d) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `core-js`, `get-own-property-symbols`, `tape` [`1dd42cd`](https://github.com/inspect-js/has-symbols/commit/1dd42cd86183ed0c50f99b1062345c458babca91) -- [meta] create FUNDING.yml [`aa57a17`](https://github.com/inspect-js/has-symbols/commit/aa57a17b19708906d1927f821ea8e73394d84ca4) -- Only apps should have lockfiles [`a2d8bea`](https://github.com/inspect-js/has-symbols/commit/a2d8bea23a97d15c09eaf60f5b107fcf9a4d57aa) -- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`9e96cb7`](https://github.com/inspect-js/has-symbols/commit/9e96cb783746cbed0c10ef78e599a8eaa7ebe193) -- [meta] add `funding` field [`a0b32cf`](https://github.com/inspect-js/has-symbols/commit/a0b32cf68e803f963c1639b6d47b0a9d6440bab0) -- [Dev Deps] update `safe-publish-latest` [`cb9f0a5`](https://github.com/inspect-js/has-symbols/commit/cb9f0a521a3a1790f1064d437edd33bb6c3d6af0) - -## v1.0.0 - 2016-09-19 - -### Commits - -- Tests. [`ecb6eb9`](https://github.com/inspect-js/has-symbols/commit/ecb6eb934e4883137f3f93b965ba5e0a98df430d) -- package.json [`88a337c`](https://github.com/inspect-js/has-symbols/commit/88a337cee0864a0da35f5d19e69ff0ef0150e46a) -- Initial commit [`42e1e55`](https://github.com/inspect-js/has-symbols/commit/42e1e5502536a2b8ac529c9443984acd14836b1c) -- Initial implementation. [`33f5cc6`](https://github.com/inspect-js/has-symbols/commit/33f5cc6cdff86e2194b081ee842bfdc63caf43fb) -- read me [`01f1170`](https://github.com/inspect-js/has-symbols/commit/01f1170188ff7cb1558aa297f6ba5b516c6d7b0c) diff --git a/node_modules/has-symbols/LICENSE b/node_modules/has-symbols/LICENSE deleted file mode 100644 index df31cbf..0000000 --- a/node_modules/has-symbols/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2016 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/has-symbols/README.md b/node_modules/has-symbols/README.md deleted file mode 100644 index 33905f0..0000000 --- a/node_modules/has-symbols/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# has-symbols [![Version Badge][2]][1] - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![dependency status][5]][6] -[![dev dependency status][7]][8] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][11]][1] - -Determine if the JS environment has Symbol support. Supports spec, or shams. - -## Example - -```js -var hasSymbols = require('has-symbols'); - -hasSymbols() === true; // if the environment has native Symbol support. Not polyfillable, not forgeable. - -var hasSymbolsKinda = require('has-symbols/shams'); -hasSymbolsKinda() === true; // if the environment has a Symbol sham that mostly follows the spec. -``` - -## Supported Symbol shams - - get-own-property-symbols [npm](https://www.npmjs.com/package/get-own-property-symbols) | [github](https://github.com/WebReflection/get-own-property-symbols) - - core-js [npm](https://www.npmjs.com/package/core-js) | [github](https://github.com/zloirock/core-js) - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[1]: https://npmjs.org/package/has-symbols -[2]: https://versionbadg.es/inspect-js/has-symbols.svg -[5]: https://david-dm.org/inspect-js/has-symbols.svg -[6]: https://david-dm.org/inspect-js/has-symbols -[7]: https://david-dm.org/inspect-js/has-symbols/dev-status.svg -[8]: https://david-dm.org/inspect-js/has-symbols#info=devDependencies -[11]: https://nodei.co/npm/has-symbols.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/has-symbols.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/has-symbols.svg -[downloads-url]: https://npm-stat.com/charts.html?package=has-symbols -[codecov-image]: https://codecov.io/gh/inspect-js/has-symbols/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/inspect-js/has-symbols/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-symbols -[actions-url]: https://github.com/inspect-js/has-symbols/actions diff --git a/node_modules/has-symbols/index.d.ts b/node_modules/has-symbols/index.d.ts deleted file mode 100644 index 9b98595..0000000 --- a/node_modules/has-symbols/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function hasNativeSymbols(): boolean; - -export = hasNativeSymbols; \ No newline at end of file diff --git a/node_modules/has-symbols/index.js b/node_modules/has-symbols/index.js deleted file mode 100644 index fa65265..0000000 --- a/node_modules/has-symbols/index.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -var origSymbol = typeof Symbol !== 'undefined' && Symbol; -var hasSymbolSham = require('./shams'); - -/** @type {import('.')} */ -module.exports = function hasNativeSymbols() { - if (typeof origSymbol !== 'function') { return false; } - if (typeof Symbol !== 'function') { return false; } - if (typeof origSymbol('foo') !== 'symbol') { return false; } - if (typeof Symbol('bar') !== 'symbol') { return false; } - - return hasSymbolSham(); -}; diff --git a/node_modules/has-symbols/package.json b/node_modules/has-symbols/package.json deleted file mode 100644 index d835e20..0000000 --- a/node_modules/has-symbols/package.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "name": "has-symbols", - "version": "1.1.0", - "description": "Determine if the JS environment has Symbol support. Supports spec, or shams.", - "main": "index.js", - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "pretest": "npm run --silent lint", - "test": "npm run tests-only", - "posttest": "npx npm@'>=10.2' audit --production", - "tests-only": "npm run test:stock && npm run test:shams", - "test:stock": "nyc node test", - "test:staging": "nyc node --harmony --es-staging test", - "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs", - "test:shams:corejs": "nyc node test/shams/core-js.js", - "test:shams:getownpropertysymbols": "nyc node test/shams/get-own-property-symbols.js", - "lint": "eslint --ext=js,mjs .", - "postlint": "tsc -p . && attw -P", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git://github.com/inspect-js/has-symbols.git" - }, - "keywords": [ - "Symbol", - "symbols", - "typeof", - "sham", - "polyfill", - "native", - "core-js", - "ES6" - ], - "author": { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - }, - "contributors": [ - { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - } - ], - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/ljharb/has-symbols/issues" - }, - "homepage": "https://github.com/ljharb/has-symbols#readme", - "devDependencies": { - "@arethetypeswrong/cli": "^0.17.0", - "@ljharb/eslint-config": "^21.1.1", - "@ljharb/tsconfig": "^0.2.0", - "@types/core-js": "^2.5.8", - "@types/tape": "^5.6.5", - "auto-changelog": "^2.5.0", - "core-js": "^2.6.12", - "encoding": "^0.1.13", - "eslint": "=8.8.0", - "get-own-property-symbols": "^0.9.5", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.9.0", - "typescript": "next" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "engines": { - "node": ">= 0.4" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows", - "types" - ] - } -} diff --git a/node_modules/has-symbols/shams.d.ts b/node_modules/has-symbols/shams.d.ts deleted file mode 100644 index 8d0bf24..0000000 --- a/node_modules/has-symbols/shams.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function hasSymbolShams(): boolean; - -export = hasSymbolShams; \ No newline at end of file diff --git a/node_modules/has-symbols/shams.js b/node_modules/has-symbols/shams.js deleted file mode 100644 index f97b474..0000000 --- a/node_modules/has-symbols/shams.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -/** @type {import('./shams')} */ -/* eslint complexity: [2, 18], max-statements: [2, 33] */ -module.exports = function hasSymbols() { - if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } - if (typeof Symbol.iterator === 'symbol') { return true; } - - /** @type {{ [k in symbol]?: unknown }} */ - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - if (typeof sym === 'string') { return false; } - - if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } - if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } - - // temp disabled per https://github.com/ljharb/object.assign/issues/17 - // if (sym instanceof Symbol) { return false; } - // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 - // if (!(symObj instanceof Symbol)) { return false; } - - // if (typeof Symbol.prototype.toString !== 'function') { return false; } - // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } - - var symVal = 42; - obj[sym] = symVal; - for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop - if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } - - if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } - - var syms = Object.getOwnPropertySymbols(obj); - if (syms.length !== 1 || syms[0] !== sym) { return false; } - - if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } - - if (typeof Object.getOwnPropertyDescriptor === 'function') { - // eslint-disable-next-line no-extra-parens - var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym)); - if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } - } - - return true; -}; diff --git a/node_modules/has-symbols/test/index.js b/node_modules/has-symbols/test/index.js deleted file mode 100644 index 352129c..0000000 --- a/node_modules/has-symbols/test/index.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -var test = require('tape'); -var hasSymbols = require('../'); -var runSymbolTests = require('./tests'); - -test('interface', function (t) { - t.equal(typeof hasSymbols, 'function', 'is a function'); - t.equal(typeof hasSymbols(), 'boolean', 'returns a boolean'); - t.end(); -}); - -test('Symbols are supported', { skip: !hasSymbols() }, function (t) { - runSymbolTests(t); - t.end(); -}); - -test('Symbols are not supported', { skip: hasSymbols() }, function (t) { - t.equal(typeof Symbol, 'undefined', 'global Symbol is undefined'); - t.equal(typeof Object.getOwnPropertySymbols, 'undefined', 'Object.getOwnPropertySymbols does not exist'); - t.end(); -}); diff --git a/node_modules/has-symbols/test/shams/core-js.js b/node_modules/has-symbols/test/shams/core-js.js deleted file mode 100644 index 1a29024..0000000 --- a/node_modules/has-symbols/test/shams/core-js.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -var test = require('tape'); - -if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { - test('has native Symbol support', function (t) { - t.equal(typeof Symbol, 'function'); - t.equal(typeof Symbol(), 'symbol'); - t.end(); - }); - // @ts-expect-error TS is stupid and doesn't know about top level return - return; -} - -var hasSymbols = require('../../shams'); - -test('polyfilled Symbols', function (t) { - /* eslint-disable global-require */ - t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); - require('core-js/fn/symbol'); - require('core-js/fn/symbol/to-string-tag'); - - require('../tests')(t); - - var hasSymbolsAfter = hasSymbols(); - t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); - /* eslint-enable global-require */ - t.end(); -}); diff --git a/node_modules/has-symbols/test/shams/get-own-property-symbols.js b/node_modules/has-symbols/test/shams/get-own-property-symbols.js deleted file mode 100644 index e0296f8..0000000 --- a/node_modules/has-symbols/test/shams/get-own-property-symbols.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -var test = require('tape'); - -if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { - test('has native Symbol support', function (t) { - t.equal(typeof Symbol, 'function'); - t.equal(typeof Symbol(), 'symbol'); - t.end(); - }); - // @ts-expect-error TS is stupid and doesn't know about top level return - return; -} - -var hasSymbols = require('../../shams'); - -test('polyfilled Symbols', function (t) { - /* eslint-disable global-require */ - t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); - - require('get-own-property-symbols'); - - require('../tests')(t); - - var hasSymbolsAfter = hasSymbols(); - t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); - /* eslint-enable global-require */ - t.end(); -}); diff --git a/node_modules/has-symbols/test/tests.js b/node_modules/has-symbols/test/tests.js deleted file mode 100644 index 66a2cb8..0000000 --- a/node_modules/has-symbols/test/tests.js +++ /dev/null @@ -1,58 +0,0 @@ -'use strict'; - -/** @type {(t: import('tape').Test) => false | void} */ -// eslint-disable-next-line consistent-return -module.exports = function runSymbolTests(t) { - t.equal(typeof Symbol, 'function', 'global Symbol is a function'); - - if (typeof Symbol !== 'function') { return false; } - - t.notEqual(Symbol(), Symbol(), 'two symbols are not equal'); - - /* - t.equal( - Symbol.prototype.toString.call(Symbol('foo')), - Symbol.prototype.toString.call(Symbol('foo')), - 'two symbols with the same description stringify the same' - ); - */ - - /* - var foo = Symbol('foo'); - - t.notEqual( - String(foo), - String(Symbol('bar')), - 'two symbols with different descriptions do not stringify the same' - ); - */ - - t.equal(typeof Symbol.prototype.toString, 'function', 'Symbol#toString is a function'); - // t.equal(String(foo), Symbol.prototype.toString.call(foo), 'Symbol#toString equals String of the same symbol'); - - t.equal(typeof Object.getOwnPropertySymbols, 'function', 'Object.getOwnPropertySymbols is a function'); - - /** @type {{ [k in symbol]?: unknown }} */ - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - t.notEqual(typeof sym, 'string', 'Symbol is not a string'); - t.equal(Object.prototype.toString.call(sym), '[object Symbol]', 'symbol primitive Object#toStrings properly'); - t.equal(Object.prototype.toString.call(symObj), '[object Symbol]', 'symbol primitive Object#toStrings properly'); - - var symVal = 42; - obj[sym] = symVal; - // eslint-disable-next-line no-restricted-syntax, no-unused-vars - for (var _ in obj) { t.fail('symbol property key was found in for..in of object'); } - - t.deepEqual(Object.keys(obj), [], 'no enumerable own keys on symbol-valued object'); - t.deepEqual(Object.getOwnPropertyNames(obj), [], 'no own names on symbol-valued object'); - t.deepEqual(Object.getOwnPropertySymbols(obj), [sym], 'one own symbol on symbol-valued object'); - t.equal(Object.prototype.propertyIsEnumerable.call(obj, sym), true, 'symbol is enumerable'); - t.deepEqual(Object.getOwnPropertyDescriptor(obj, sym), { - configurable: true, - enumerable: true, - value: 42, - writable: true - }, 'property descriptor is correct'); -}; diff --git a/node_modules/has-symbols/tsconfig.json b/node_modules/has-symbols/tsconfig.json deleted file mode 100644 index ba99af4..0000000 --- a/node_modules/has-symbols/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "@ljharb/tsconfig", - "compilerOptions": { - "target": "ES2021", - "maxNodeModuleJsDepth": 0, - }, - "exclude": [ - "coverage" - ] -} diff --git a/node_modules/hasown/.eslintrc b/node_modules/hasown/.eslintrc deleted file mode 100644 index 3b5d9e9..0000000 --- a/node_modules/hasown/.eslintrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", -} diff --git a/node_modules/hasown/.github/FUNDING.yml b/node_modules/hasown/.github/FUNDING.yml deleted file mode 100644 index d68c8b7..0000000 --- a/node_modules/hasown/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/hasown -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/hasown/.nycrc b/node_modules/hasown/.nycrc deleted file mode 100644 index 1826526..0000000 --- a/node_modules/hasown/.nycrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/hasown/CHANGELOG.md b/node_modules/hasown/CHANGELOG.md deleted file mode 100644 index 2b0a980..0000000 --- a/node_modules/hasown/CHANGELOG.md +++ /dev/null @@ -1,40 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v2.0.2](https://github.com/inspect-js/hasOwn/compare/v2.0.1...v2.0.2) - 2024-03-10 - -### Commits - -- [types] use shared config [`68e9d4d`](https://github.com/inspect-js/hasOwn/commit/68e9d4dab6facb4f05f02c6baea94a3f2a4e44b2) -- [actions] remove redundant finisher; use reusable workflow [`241a68e`](https://github.com/inspect-js/hasOwn/commit/241a68e13ea1fe52bec5ba7f74144befc31fae7b) -- [Tests] increase coverage [`4125c0d`](https://github.com/inspect-js/hasOwn/commit/4125c0d6121db56ae30e38346dfb0c000b04f0a7) -- [Tests] skip `npm ls` in old node due to TS [`01b9282`](https://github.com/inspect-js/hasOwn/commit/01b92822f9971dea031eafdd14767df41d61c202) -- [types] improve predicate type [`d340f85`](https://github.com/inspect-js/hasOwn/commit/d340f85ce02e286ef61096cbbb6697081d40a12b) -- [Dev Deps] update `tape` [`70089fc`](https://github.com/inspect-js/hasOwn/commit/70089fcf544e64acc024cbe60f5a9b00acad86de) -- [Tests] use `@arethetypeswrong/cli` [`50b272c`](https://github.com/inspect-js/hasOwn/commit/50b272c829f40d053a3dd91c9796e0ac0b2af084) - -## [v2.0.1](https://github.com/inspect-js/hasOwn/compare/v2.0.0...v2.0.1) - 2024-02-10 - -### Commits - -- [types] use a handwritten d.ts file; fix exported type [`012b989`](https://github.com/inspect-js/hasOwn/commit/012b9898ccf91dc441e2ebf594ff70270a5fda58) -- [Dev Deps] update `@types/function-bind`, `@types/mock-property`, `@types/tape`, `aud`, `mock-property`, `npmignore`, `tape`, `typescript` [`977a56f`](https://github.com/inspect-js/hasOwn/commit/977a56f51a1f8b20566f3c471612137894644025) -- [meta] add `sideEffects` flag [`3a60b7b`](https://github.com/inspect-js/hasOwn/commit/3a60b7bf42fccd8c605e5f145a6fcc83b13cb46f) - -## [v2.0.0](https://github.com/inspect-js/hasOwn/compare/v1.0.1...v2.0.0) - 2023-10-19 - -### Commits - -- revamped implementation, tests, readme [`72bf8b3`](https://github.com/inspect-js/hasOwn/commit/72bf8b338e77a638f0a290c63ffaed18339c36b4) -- [meta] revamp package.json [`079775f`](https://github.com/inspect-js/hasOwn/commit/079775fb1ec72c1c6334069593617a0be3847458) -- Only apps should have lockfiles [`6640e23`](https://github.com/inspect-js/hasOwn/commit/6640e233d1bb8b65260880f90787637db157d215) - -## v1.0.1 - 2023-10-10 - -### Commits - -- Initial commit [`8dbfde6`](https://github.com/inspect-js/hasOwn/commit/8dbfde6e8fb0ebb076fab38d138f2984eb340a62) diff --git a/node_modules/hasown/LICENSE b/node_modules/hasown/LICENSE deleted file mode 100644 index 0314929..0000000 --- a/node_modules/hasown/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Jordan Harband and contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/hasown/README.md b/node_modules/hasown/README.md deleted file mode 100644 index f759b8a..0000000 --- a/node_modules/hasown/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# hasown [![Version Badge][npm-version-svg]][package-url] - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -A robust, ES3 compatible, "has own property" predicate. - -## Example - -```js -const assert = require('assert'); -const hasOwn = require('hasown'); - -assert.equal(hasOwn({}, 'toString'), false); -assert.equal(hasOwn([], 'length'), true); -assert.equal(hasOwn({ a: 42 }, 'a'), true); -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[package-url]: https://npmjs.org/package/hasown -[npm-version-svg]: https://versionbadg.es/inspect-js/hasown.svg -[deps-svg]: https://david-dm.org/inspect-js/hasOwn.svg -[deps-url]: https://david-dm.org/inspect-js/hasOwn -[dev-deps-svg]: https://david-dm.org/inspect-js/hasOwn/dev-status.svg -[dev-deps-url]: https://david-dm.org/inspect-js/hasOwn#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/hasown.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/hasown.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/hasown.svg -[downloads-url]: https://npm-stat.com/charts.html?package=hasown -[codecov-image]: https://codecov.io/gh/inspect-js/hasOwn/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/inspect-js/hasOwn/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/hasOwn -[actions-url]: https://github.com/inspect-js/hasOwn/actions diff --git a/node_modules/hasown/index.d.ts b/node_modules/hasown/index.d.ts deleted file mode 100644 index aafdf3b..0000000 --- a/node_modules/hasown/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function hasOwn(o: O, p: K): o is O & Record; - -export = hasOwn; diff --git a/node_modules/hasown/index.js b/node_modules/hasown/index.js deleted file mode 100644 index 34e6059..0000000 --- a/node_modules/hasown/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var call = Function.prototype.call; -var $hasOwn = Object.prototype.hasOwnProperty; -var bind = require('function-bind'); - -/** @type {import('.')} */ -module.exports = bind.call(call, $hasOwn); diff --git a/node_modules/hasown/package.json b/node_modules/hasown/package.json deleted file mode 100644 index 8502e13..0000000 --- a/node_modules/hasown/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "name": "hasown", - "version": "2.0.2", - "description": "A robust, ES3 compatible, \"has own property\" predicate.", - "main": "index.js", - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "types": "index.d.ts", - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepublishOnly": "safe-publish-latest", - "prelint": "evalmd README.md", - "lint": "eslint --ext=js,mjs .", - "postlint": "npm run tsc", - "pretest": "npm run lint", - "tsc": "tsc -p .", - "posttsc": "attw -P", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "aud --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/inspect-js/hasOwn.git" - }, - "keywords": [ - "has", - "hasOwnProperty", - "hasOwn", - "has-own", - "own", - "has", - "property", - "in", - "javascript", - "ecmascript" - ], - "author": "Jordan Harband ", - "license": "MIT", - "bugs": { - "url": "https://github.com/inspect-js/hasOwn/issues" - }, - "homepage": "https://github.com/inspect-js/hasOwn#readme", - "dependencies": { - "function-bind": "^1.1.2" - }, - "devDependencies": { - "@arethetypeswrong/cli": "^0.15.1", - "@ljharb/eslint-config": "^21.1.0", - "@ljharb/tsconfig": "^0.2.0", - "@types/function-bind": "^1.1.10", - "@types/mock-property": "^1.0.2", - "@types/tape": "^5.6.4", - "aud": "^2.0.4", - "auto-changelog": "^2.4.0", - "eslint": "=8.8.0", - "evalmd": "^0.0.19", - "in-publish": "^2.0.1", - "mock-property": "^1.0.3", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.7.5", - "typescript": "next" - }, - "engines": { - "node": ">= 0.4" - }, - "testling": { - "files": "test/index.js" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows", - "test" - ] - } -} diff --git a/node_modules/hasown/tsconfig.json b/node_modules/hasown/tsconfig.json deleted file mode 100644 index 0930c56..0000000 --- a/node_modules/hasown/tsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "@ljharb/tsconfig", - "exclude": [ - "coverage", - ], -} diff --git a/node_modules/http-errors/HISTORY.md b/node_modules/http-errors/HISTORY.md deleted file mode 100644 index 3d81d26..0000000 --- a/node_modules/http-errors/HISTORY.md +++ /dev/null @@ -1,186 +0,0 @@ -2.0.1 / 2025-11-20 -================== - - * deps: use tilde notation for dependencies - * deps: update statuses to 2.0.2 - -2.0.0 / 2021-12-17 -================== - - * Drop support for Node.js 0.6 - * Remove `I'mateapot` export; use `ImATeapot` instead - * Remove support for status being non-first argument - * Rename `UnorderedCollection` constructor to `TooEarly` - * deps: depd@2.0.0 - - Replace internal `eval` usage with `Function` constructor - - Use instance methods on `process` to check for listeners - * deps: statuses@2.0.1 - - Fix messaging casing of `418 I'm a Teapot` - - Remove code 306 - - Rename `425 Unordered Collection` to standard `425 Too Early` - -2021-11-14 / 1.8.1 -================== - - * deps: toidentifier@1.0.1 - -2020-06-29 / 1.8.0 -================== - - * Add `isHttpError` export to determine if value is an HTTP error - * deps: setprototypeof@1.2.0 - -2019-06-24 / 1.7.3 -================== - - * deps: inherits@2.0.4 - -2019-02-18 / 1.7.2 -================== - - * deps: setprototypeof@1.1.1 - -2018-09-08 / 1.7.1 -================== - - * Fix error creating objects in some environments - -2018-07-30 / 1.7.0 -================== - - * Set constructor name when possible - * Use `toidentifier` module to make class names - * deps: statuses@'>= 1.5.0 < 2' - -2018-03-29 / 1.6.3 -================== - - * deps: depd@~1.1.2 - - perf: remove argument reassignment - * deps: setprototypeof@1.1.0 - * deps: statuses@'>= 1.4.0 < 2' - -2017-08-04 / 1.6.2 -================== - - * deps: depd@1.1.1 - - Remove unnecessary `Buffer` loading - -2017-02-20 / 1.6.1 -================== - - * deps: setprototypeof@1.0.3 - - Fix shim for old browsers - -2017-02-14 / 1.6.0 -================== - - * Accept custom 4xx and 5xx status codes in factory - * Add deprecation message to `"I'mateapot"` export - * Deprecate passing status code as anything except first argument in factory - * Deprecate using non-error status codes - * Make `message` property enumerable for `HttpError`s - -2016-11-16 / 1.5.1 -================== - - * deps: inherits@2.0.3 - - Fix issue loading in browser - * deps: setprototypeof@1.0.2 - * deps: statuses@'>= 1.3.1 < 2' - -2016-05-18 / 1.5.0 -================== - - * Support new code `421 Misdirected Request` - * Use `setprototypeof` module to replace `__proto__` setting - * deps: statuses@'>= 1.3.0 < 2' - - Add `421 Misdirected Request` - - perf: enable strict mode - * perf: enable strict mode - -2016-01-28 / 1.4.0 -================== - - * Add `HttpError` export, for `err instanceof createError.HttpError` - * deps: inherits@2.0.1 - * deps: statuses@'>= 1.2.1 < 2' - - Fix message for status 451 - - Remove incorrect nginx status code - -2015-02-02 / 1.3.1 -================== - - * Fix regression where status can be overwritten in `createError` `props` - -2015-02-01 / 1.3.0 -================== - - * Construct errors using defined constructors from `createError` - * Fix error names that are not identifiers - - `createError["I'mateapot"]` is now `createError.ImATeapot` - * Set a meaningful `name` property on constructed errors - -2014-12-09 / 1.2.8 -================== - - * Fix stack trace from exported function - * Remove `arguments.callee` usage - -2014-10-14 / 1.2.7 -================== - - * Remove duplicate line - -2014-10-02 / 1.2.6 -================== - - * Fix `expose` to be `true` for `ClientError` constructor - -2014-09-28 / 1.2.5 -================== - - * deps: statuses@1 - -2014-09-21 / 1.2.4 -================== - - * Fix dependency version to work with old `npm`s - -2014-09-21 / 1.2.3 -================== - - * deps: statuses@~1.1.0 - -2014-09-21 / 1.2.2 -================== - - * Fix publish error - -2014-09-21 / 1.2.1 -================== - - * Support Node.js 0.6 - * Use `inherits` instead of `util` - -2014-09-09 / 1.2.0 -================== - - * Fix the way inheriting functions - * Support `expose` being provided in properties argument - -2014-09-08 / 1.1.0 -================== - - * Default status to 500 - * Support provided `error` to extend - -2014-09-08 / 1.0.1 -================== - - * Fix accepting string message - -2014-09-08 / 1.0.0 -================== - - * Initial release diff --git a/node_modules/http-errors/LICENSE b/node_modules/http-errors/LICENSE deleted file mode 100644 index 82af4df..0000000 --- a/node_modules/http-errors/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ - -The MIT License (MIT) - -Copyright (c) 2014 Jonathan Ong me@jongleberry.com -Copyright (c) 2016 Douglas Christopher Wilson doug@somethingdoug.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/http-errors/README.md b/node_modules/http-errors/README.md deleted file mode 100644 index a8b7330..0000000 --- a/node_modules/http-errors/README.md +++ /dev/null @@ -1,169 +0,0 @@ -# http-errors - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][node-url] -[![Node.js Version][node-image]][node-url] -[![Build Status][ci-image]][ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Create HTTP errors for Express, Koa, Connect, etc. with ease. - -## Install - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```console -$ npm install http-errors -``` - -## Example - -```js -var createError = require('http-errors') -var express = require('express') -var app = express() - -app.use(function (req, res, next) { - if (!req.user) return next(createError(401, 'Please login to view this page.')) - next() -}) -``` - -## API - -This is the current API, currently extracted from Koa and subject to change. - -### Error Properties - -- `expose` - can be used to signal if `message` should be sent to the client, - defaulting to `false` when `status` >= 500 -- `headers` - can be an object of header names to values to be sent to the - client, defaulting to `undefined`. When defined, the key names should all - be lower-cased -- `message` - the traditional error message, which should be kept short and all - single line -- `status` - the status code of the error, mirroring `statusCode` for general - compatibility -- `statusCode` - the status code of the error, defaulting to `500` - -### createError([status], [message], [properties]) - -Create a new error object with the given message `msg`. -The error object inherits from `createError.HttpError`. - -```js -var err = createError(404, 'This video does not exist!') -``` - -- `status: 500` - the status code as a number -- `message` - the message of the error, defaulting to node's text for that status code. -- `properties` - custom properties to attach to the object - -### createError([status], [error], [properties]) - -Extend the given `error` object with `createError.HttpError` -properties. This will not alter the inheritance of the given -`error` object, and the modified `error` object is the -return value. - - - -```js -fs.readFile('foo.txt', function (err, buf) { - if (err) { - if (err.code === 'ENOENT') { - var httpError = createError(404, err, { expose: false }) - } else { - var httpError = createError(500, err) - } - } -}) -``` - -- `status` - the status code as a number -- `error` - the error object to extend -- `properties` - custom properties to attach to the object - -### createError.isHttpError(val) - -Determine if the provided `val` is an `HttpError`. This will return `true` -if the error inherits from the `HttpError` constructor of this module or -matches the "duck type" for an error this module creates. All outputs from -the `createError` factory will return `true` for this function, including -if an non-`HttpError` was passed into the factory. - -### new createError\[code || name\](\[msg]\)) - -Create a new error object with the given message `msg`. -The error object inherits from `createError.HttpError`. - -```js -var err = new createError.NotFound() -``` - -- `code` - the status code as a number -- `name` - the name of the error as a "bumpy case", i.e. `NotFound` or `InternalServerError`. - -#### List of all constructors - -|Status Code|Constructor Name | -|-----------|-----------------------------| -|400 |BadRequest | -|401 |Unauthorized | -|402 |PaymentRequired | -|403 |Forbidden | -|404 |NotFound | -|405 |MethodNotAllowed | -|406 |NotAcceptable | -|407 |ProxyAuthenticationRequired | -|408 |RequestTimeout | -|409 |Conflict | -|410 |Gone | -|411 |LengthRequired | -|412 |PreconditionFailed | -|413 |PayloadTooLarge | -|414 |URITooLong | -|415 |UnsupportedMediaType | -|416 |RangeNotSatisfiable | -|417 |ExpectationFailed | -|418 |ImATeapot | -|421 |MisdirectedRequest | -|422 |UnprocessableEntity | -|423 |Locked | -|424 |FailedDependency | -|425 |TooEarly | -|426 |UpgradeRequired | -|428 |PreconditionRequired | -|429 |TooManyRequests | -|431 |RequestHeaderFieldsTooLarge | -|451 |UnavailableForLegalReasons | -|500 |InternalServerError | -|501 |NotImplemented | -|502 |BadGateway | -|503 |ServiceUnavailable | -|504 |GatewayTimeout | -|505 |HTTPVersionNotSupported | -|506 |VariantAlsoNegotiates | -|507 |InsufficientStorage | -|508 |LoopDetected | -|509 |BandwidthLimitExceeded | -|510 |NotExtended | -|511 |NetworkAuthenticationRequired| - -## License - -[MIT](LICENSE) - -[ci-image]: https://badgen.net/github/checks/jshttp/http-errors/master?label=ci -[ci-url]: https://github.com/jshttp/http-errors/actions?query=workflow%3Aci -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/http-errors/master -[coveralls-url]: https://coveralls.io/r/jshttp/http-errors?branch=master -[node-image]: https://badgen.net/npm/node/http-errors -[node-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/http-errors -[npm-url]: https://npmjs.org/package/http-errors -[npm-version-image]: https://badgen.net/npm/v/http-errors -[travis-image]: https://badgen.net/travis/jshttp/http-errors/master -[travis-url]: https://travis-ci.org/jshttp/http-errors diff --git a/node_modules/http-errors/index.js b/node_modules/http-errors/index.js deleted file mode 100644 index 82271f6..0000000 --- a/node_modules/http-errors/index.js +++ /dev/null @@ -1,290 +0,0 @@ -/*! - * http-errors - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2016 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var deprecate = require('depd')('http-errors') -var setPrototypeOf = require('setprototypeof') -var statuses = require('statuses') -var inherits = require('inherits') -var toIdentifier = require('toidentifier') - -/** - * Module exports. - * @public - */ - -module.exports = createError -module.exports.HttpError = createHttpErrorConstructor() -module.exports.isHttpError = createIsHttpErrorFunction(module.exports.HttpError) - -// Populate exports for all constructors -populateConstructorExports(module.exports, statuses.codes, module.exports.HttpError) - -/** - * Get the code class of a status code. - * @private - */ - -function codeClass (status) { - return Number(String(status).charAt(0) + '00') -} - -/** - * Create a new HTTP Error. - * - * @returns {Error} - * @public - */ - -function createError () { - // so much arity going on ~_~ - var err - var msg - var status = 500 - var props = {} - for (var i = 0; i < arguments.length; i++) { - var arg = arguments[i] - var type = typeof arg - if (type === 'object' && arg instanceof Error) { - err = arg - status = err.status || err.statusCode || status - } else if (type === 'number' && i === 0) { - status = arg - } else if (type === 'string') { - msg = arg - } else if (type === 'object') { - props = arg - } else { - throw new TypeError('argument #' + (i + 1) + ' unsupported type ' + type) - } - } - - if (typeof status === 'number' && (status < 400 || status >= 600)) { - deprecate('non-error status code; use only 4xx or 5xx status codes') - } - - if (typeof status !== 'number' || - (!statuses.message[status] && (status < 400 || status >= 600))) { - status = 500 - } - - // constructor - var HttpError = createError[status] || createError[codeClass(status)] - - if (!err) { - // create error - err = HttpError - ? new HttpError(msg) - : new Error(msg || statuses.message[status]) - Error.captureStackTrace(err, createError) - } - - if (!HttpError || !(err instanceof HttpError) || err.status !== status) { - // add properties to generic error - err.expose = status < 500 - err.status = err.statusCode = status - } - - for (var key in props) { - if (key !== 'status' && key !== 'statusCode') { - err[key] = props[key] - } - } - - return err -} - -/** - * Create HTTP error abstract base class. - * @private - */ - -function createHttpErrorConstructor () { - function HttpError () { - throw new TypeError('cannot construct abstract class') - } - - inherits(HttpError, Error) - - return HttpError -} - -/** - * Create a constructor for a client error. - * @private - */ - -function createClientErrorConstructor (HttpError, name, code) { - var className = toClassName(name) - - function ClientError (message) { - // create the error object - var msg = message != null ? message : statuses.message[code] - var err = new Error(msg) - - // capture a stack trace to the construction point - Error.captureStackTrace(err, ClientError) - - // adjust the [[Prototype]] - setPrototypeOf(err, ClientError.prototype) - - // redefine the error message - Object.defineProperty(err, 'message', { - enumerable: true, - configurable: true, - value: msg, - writable: true - }) - - // redefine the error name - Object.defineProperty(err, 'name', { - enumerable: false, - configurable: true, - value: className, - writable: true - }) - - return err - } - - inherits(ClientError, HttpError) - nameFunc(ClientError, className) - - ClientError.prototype.status = code - ClientError.prototype.statusCode = code - ClientError.prototype.expose = true - - return ClientError -} - -/** - * Create function to test is a value is a HttpError. - * @private - */ - -function createIsHttpErrorFunction (HttpError) { - return function isHttpError (val) { - if (!val || typeof val !== 'object') { - return false - } - - if (val instanceof HttpError) { - return true - } - - return val instanceof Error && - typeof val.expose === 'boolean' && - typeof val.statusCode === 'number' && val.status === val.statusCode - } -} - -/** - * Create a constructor for a server error. - * @private - */ - -function createServerErrorConstructor (HttpError, name, code) { - var className = toClassName(name) - - function ServerError (message) { - // create the error object - var msg = message != null ? message : statuses.message[code] - var err = new Error(msg) - - // capture a stack trace to the construction point - Error.captureStackTrace(err, ServerError) - - // adjust the [[Prototype]] - setPrototypeOf(err, ServerError.prototype) - - // redefine the error message - Object.defineProperty(err, 'message', { - enumerable: true, - configurable: true, - value: msg, - writable: true - }) - - // redefine the error name - Object.defineProperty(err, 'name', { - enumerable: false, - configurable: true, - value: className, - writable: true - }) - - return err - } - - inherits(ServerError, HttpError) - nameFunc(ServerError, className) - - ServerError.prototype.status = code - ServerError.prototype.statusCode = code - ServerError.prototype.expose = false - - return ServerError -} - -/** - * Set the name of a function, if possible. - * @private - */ - -function nameFunc (func, name) { - var desc = Object.getOwnPropertyDescriptor(func, 'name') - - if (desc && desc.configurable) { - desc.value = name - Object.defineProperty(func, 'name', desc) - } -} - -/** - * Populate the exports object with constructors for every error class. - * @private - */ - -function populateConstructorExports (exports, codes, HttpError) { - codes.forEach(function forEachCode (code) { - var CodeError - var name = toIdentifier(statuses.message[code]) - - switch (codeClass(code)) { - case 400: - CodeError = createClientErrorConstructor(HttpError, name, code) - break - case 500: - CodeError = createServerErrorConstructor(HttpError, name, code) - break - } - - if (CodeError) { - // export the constructor - exports[code] = CodeError - exports[name] = CodeError - } - }) -} - -/** - * Get a class name from a name identifier. - * - * @param {string} name - * @returns {string} - * @private - */ - -function toClassName (name) { - return name.slice(-5) === 'Error' ? name : name + 'Error' -} diff --git a/node_modules/http-errors/package.json b/node_modules/http-errors/package.json deleted file mode 100644 index 4b46d62..0000000 --- a/node_modules/http-errors/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "http-errors", - "description": "Create HTTP error objects", - "version": "2.0.1", - "author": "Jonathan Ong (http://jongleberry.com)", - "contributors": [ - "Alan Plum ", - "Douglas Christopher Wilson " - ], - "license": "MIT", - "repository": "jshttp/http-errors", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - }, - "dependencies": { - "depd": "~2.0.0", - "inherits": "~2.0.4", - "setprototypeof": "~1.2.0", - "statuses": "~2.0.2", - "toidentifier": "~1.0.1" - }, - "devDependencies": { - "eslint": "7.32.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.32.0", - "eslint-plugin-markdown": "2.2.1", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "5.2.0", - "eslint-plugin-standard": "4.1.0", - "mocha": "9.1.3", - "nyc": "15.1.0" - }, - "engines": { - "node": ">= 0.8" - }, - "scripts": { - "lint": "eslint . && node ./scripts/lint-readme-list.js", - "test": "mocha --reporter spec", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "version": "node scripts/version-history.js && git add HISTORY.md" - }, - "keywords": [ - "http", - "error" - ], - "files": [ - "index.js", - "HISTORY.md", - "LICENSE", - "README.md" - ] -} diff --git a/node_modules/iconv-lite/Changelog.md b/node_modules/iconv-lite/Changelog.md deleted file mode 100644 index f252313..0000000 --- a/node_modules/iconv-lite/Changelog.md +++ /dev/null @@ -1,162 +0,0 @@ -# 0.4.24 / 2018-08-22 - - * Added MIK encoding (#196, by @Ivan-Kalatchev) - - -# 0.4.23 / 2018-05-07 - - * Fix deprecation warning in Node v10 due to the last usage of `new Buffer` (#185, by @felixbuenemann) - * Switched from NodeBuffer to Buffer in typings (#155 by @felixfbecker, #186 by @larssn) - - -# 0.4.22 / 2018-05-05 - - * Use older semver style for dependencies to be compatible with Node version 0.10 (#182, by @dougwilson) - * Fix tests to accomodate fixes in Node v10 (#182, by @dougwilson) - - -# 0.4.21 / 2018-04-06 - - * Fix encoding canonicalization (#156) - * Fix the paths in the "browser" field in package.json (#174 by @LMLB) - * Removed "contributors" section in package.json - see Git history instead. - - -# 0.4.20 / 2018-04-06 - - * Updated `new Buffer()` usages with recommended replacements as it's being deprecated in Node v10 (#176, #178 by @ChALkeR) - - -# 0.4.19 / 2017-09-09 - - * Fixed iso8859-1 codec regression in handling untranslatable characters (#162, caused by #147) - * Re-generated windows1255 codec, because it was updated in iconv project - * Fixed grammar in error message when iconv-lite is loaded with encoding other than utf8 - - -# 0.4.18 / 2017-06-13 - - * Fixed CESU-8 regression in Node v8. - - -# 0.4.17 / 2017-04-22 - - * Updated typescript definition file to support Angular 2 AoT mode (#153 by @larssn) - - -# 0.4.16 / 2017-04-22 - - * Added support for React Native (#150) - * Changed iso8859-1 encoding to usine internal 'binary' encoding, as it's the same thing (#147 by @mscdex) - * Fixed typo in Readme (#138 by @jiangzhuo) - * Fixed build for Node v6.10+ by making correct version comparison - * Added a warning if iconv-lite is loaded not as utf-8 (see #142) - - -# 0.4.15 / 2016-11-21 - - * Fixed typescript type definition (#137) - - -# 0.4.14 / 2016-11-20 - - * Preparation for v1.0 - * Added Node v6 and latest Node versions to Travis CI test rig - * Deprecated Node v0.8 support - * Typescript typings (@larssn) - * Fix encoding of Euro character in GB 18030 (inspired by @lygstate) - * Add ms prefix to dbcs windows encodings (@rokoroku) - - -# 0.4.13 / 2015-10-01 - - * Fix silly mistake in deprecation notice. - - -# 0.4.12 / 2015-09-26 - - * Node v4 support: - * Added CESU-8 decoding (#106) - * Added deprecation notice for `extendNodeEncodings` - * Added Travis tests for Node v4 and io.js latest (#105 by @Mithgol) - - -# 0.4.11 / 2015-07-03 - - * Added CESU-8 encoding. - - -# 0.4.10 / 2015-05-26 - - * Changed UTF-16 endianness heuristic to take into account any ASCII chars, not - just spaces. This should minimize the importance of "default" endianness. - - -# 0.4.9 / 2015-05-24 - - * Streamlined BOM handling: strip BOM by default, add BOM when encoding if - addBOM: true. Added docs to Readme. - * UTF16 now uses UTF16-LE by default. - * Fixed minor issue with big5 encoding. - * Added io.js testing on Travis; updated node-iconv version to test against. - Now we just skip testing SBCS encodings that node-iconv doesn't support. - * (internal refactoring) Updated codec interface to use classes. - * Use strict mode in all files. - - -# 0.4.8 / 2015-04-14 - - * added alias UNICODE-1-1-UTF-7 for UTF-7 encoding (#94) - - -# 0.4.7 / 2015-02-05 - - * stop official support of Node.js v0.8. Should still work, but no guarantees. - reason: Packages needed for testing are hard to get on Travis CI. - * work in environment where Object.prototype is monkey patched with enumerable - props (#89). - - -# 0.4.6 / 2015-01-12 - - * fix rare aliases of single-byte encodings (thanks @mscdex) - * double the timeout for dbcs tests to make them less flaky on travis - - -# 0.4.5 / 2014-11-20 - - * fix windows-31j and x-sjis encoding support (@nleush) - * minor fix: undefined variable reference when internal error happens - - -# 0.4.4 / 2014-07-16 - - * added encodings UTF-7 (RFC2152) and UTF-7-IMAP (RFC3501 Section 5.1.3) - * fixed streaming base64 encoding - - -# 0.4.3 / 2014-06-14 - - * added encodings UTF-16BE and UTF-16 with BOM - - -# 0.4.2 / 2014-06-12 - - * don't throw exception if `extendNodeEncodings()` is called more than once - - -# 0.4.1 / 2014-06-11 - - * codepage 808 added - - -# 0.4.0 / 2014-06-10 - - * code is rewritten from scratch - * all widespread encodings are supported - * streaming interface added - * browserify compatibility added - * (optional) extend core primitive encodings to make usage even simpler - * moved from vows to mocha as the testing framework - - diff --git a/node_modules/iconv-lite/LICENSE b/node_modules/iconv-lite/LICENSE deleted file mode 100644 index d518d83..0000000 --- a/node_modules/iconv-lite/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2011 Alexander Shtuchkin - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/iconv-lite/README.md b/node_modules/iconv-lite/README.md deleted file mode 100644 index c981c37..0000000 --- a/node_modules/iconv-lite/README.md +++ /dev/null @@ -1,156 +0,0 @@ -## Pure JS character encoding conversion [![Build Status](https://travis-ci.org/ashtuchkin/iconv-lite.svg?branch=master)](https://travis-ci.org/ashtuchkin/iconv-lite) - - * Doesn't need native code compilation. Works on Windows and in sandboxed environments like [Cloud9](http://c9.io). - * Used in popular projects like [Express.js (body_parser)](https://github.com/expressjs/body-parser), - [Grunt](http://gruntjs.com/), [Nodemailer](http://www.nodemailer.com/), [Yeoman](http://yeoman.io/) and others. - * Faster than [node-iconv](https://github.com/bnoordhuis/node-iconv) (see below for performance comparison). - * Intuitive encode/decode API - * Streaming support for Node v0.10+ - * [Deprecated] Can extend Node.js primitives (buffers, streams) to support all iconv-lite encodings. - * In-browser usage via [Browserify](https://github.com/substack/node-browserify) (~180k gzip compressed with Buffer shim included). - * Typescript [type definition file](https://github.com/ashtuchkin/iconv-lite/blob/master/lib/index.d.ts) included. - * React Native is supported (need to explicitly `npm install` two more modules: `buffer` and `stream`). - * License: MIT. - -[![NPM Stats](https://nodei.co/npm/iconv-lite.png?downloads=true&downloadRank=true)](https://npmjs.org/packages/iconv-lite/) - -## Usage -### Basic API -```javascript -var iconv = require('iconv-lite'); - -// Convert from an encoded buffer to js string. -str = iconv.decode(Buffer.from([0x68, 0x65, 0x6c, 0x6c, 0x6f]), 'win1251'); - -// Convert from js string to an encoded buffer. -buf = iconv.encode("Sample input string", 'win1251'); - -// Check if encoding is supported -iconv.encodingExists("us-ascii") -``` - -### Streaming API (Node v0.10+) -```javascript - -// Decode stream (from binary stream to js strings) -http.createServer(function(req, res) { - var converterStream = iconv.decodeStream('win1251'); - req.pipe(converterStream); - - converterStream.on('data', function(str) { - console.log(str); // Do something with decoded strings, chunk-by-chunk. - }); -}); - -// Convert encoding streaming example -fs.createReadStream('file-in-win1251.txt') - .pipe(iconv.decodeStream('win1251')) - .pipe(iconv.encodeStream('ucs2')) - .pipe(fs.createWriteStream('file-in-ucs2.txt')); - -// Sugar: all encode/decode streams have .collect(cb) method to accumulate data. -http.createServer(function(req, res) { - req.pipe(iconv.decodeStream('win1251')).collect(function(err, body) { - assert(typeof body == 'string'); - console.log(body); // full request body string - }); -}); -``` - -### [Deprecated] Extend Node.js own encodings -> NOTE: This doesn't work on latest Node versions. See [details](https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility). - -```javascript -// After this call all Node basic primitives will understand iconv-lite encodings. -iconv.extendNodeEncodings(); - -// Examples: -buf = new Buffer(str, 'win1251'); -buf.write(str, 'gbk'); -str = buf.toString('latin1'); -assert(Buffer.isEncoding('iso-8859-15')); -Buffer.byteLength(str, 'us-ascii'); - -http.createServer(function(req, res) { - req.setEncoding('big5'); - req.collect(function(err, body) { - console.log(body); - }); -}); - -fs.createReadStream("file.txt", "shift_jis"); - -// External modules are also supported (if they use Node primitives, which they probably do). -request = require('request'); -request({ - url: "http://github.com/", - encoding: "cp932" -}); - -// To remove extensions -iconv.undoExtendNodeEncodings(); -``` - -## Supported encodings - - * All node.js native encodings: utf8, ucs2 / utf16-le, ascii, binary, base64, hex. - * Additional unicode encodings: utf16, utf16-be, utf-7, utf-7-imap. - * All widespread singlebyte encodings: Windows 125x family, ISO-8859 family, - IBM/DOS codepages, Macintosh family, KOI8 family, all others supported by iconv library. - Aliases like 'latin1', 'us-ascii' also supported. - * All widespread multibyte encodings: CP932, CP936, CP949, CP950, GB2312, GBK, GB18030, Big5, Shift_JIS, EUC-JP. - -See [all supported encodings on wiki](https://github.com/ashtuchkin/iconv-lite/wiki/Supported-Encodings). - -Most singlebyte encodings are generated automatically from [node-iconv](https://github.com/bnoordhuis/node-iconv). Thank you Ben Noordhuis and libiconv authors! - -Multibyte encodings are generated from [Unicode.org mappings](http://www.unicode.org/Public/MAPPINGS/) and [WHATWG Encoding Standard mappings](http://encoding.spec.whatwg.org/). Thank you, respective authors! - - -## Encoding/decoding speed - -Comparison with node-iconv module (1000x256kb, on MacBook Pro, Core i5/2.6 GHz, Node v0.12.0). -Note: your results may vary, so please always check on your hardware. - - operation iconv@2.1.4 iconv-lite@0.4.7 - ---------------------------------------------------------- - encode('win1251') ~96 Mb/s ~320 Mb/s - decode('win1251') ~95 Mb/s ~246 Mb/s - -## BOM handling - - * Decoding: BOM is stripped by default, unless overridden by passing `stripBOM: false` in options - (f.ex. `iconv.decode(buf, enc, {stripBOM: false})`). - A callback might also be given as a `stripBOM` parameter - it'll be called if BOM character was actually found. - * If you want to detect UTF-8 BOM when decoding other encodings, use [node-autodetect-decoder-stream](https://github.com/danielgindi/node-autodetect-decoder-stream) module. - * Encoding: No BOM added, unless overridden by `addBOM: true` option. - -## UTF-16 Encodings - -This library supports UTF-16LE, UTF-16BE and UTF-16 encodings. First two are straightforward, but UTF-16 is trying to be -smart about endianness in the following ways: - * Decoding: uses BOM and 'spaces heuristic' to determine input endianness. Default is UTF-16LE, but can be - overridden with `defaultEncoding: 'utf-16be'` option. Strips BOM unless `stripBOM: false`. - * Encoding: uses UTF-16LE and writes BOM by default. Use `addBOM: false` to override. - -## Other notes - -When decoding, be sure to supply a Buffer to decode() method, otherwise [bad things usually happen](https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding). -Untranslatable characters are set to � or ?. No transliteration is currently supported. -Node versions 0.10.31 and 0.11.13 are buggy, don't use them (see #65, #77). - -## Testing - -```bash -$ git clone git@github.com:ashtuchkin/iconv-lite.git -$ cd iconv-lite -$ npm install -$ npm test - -$ # To view performance: -$ node test/performance.js - -$ # To view test coverage: -$ npm run coverage -$ open coverage/lcov-report/index.html -``` diff --git a/node_modules/iconv-lite/encodings/dbcs-codec.js b/node_modules/iconv-lite/encodings/dbcs-codec.js deleted file mode 100644 index 1fe3e16..0000000 --- a/node_modules/iconv-lite/encodings/dbcs-codec.js +++ /dev/null @@ -1,555 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// Multibyte codec. In this scheme, a character is represented by 1 or more bytes. -// Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences. -// To save memory and loading time, we read table files only when requested. - -exports._dbcs = DBCSCodec; - -var UNASSIGNED = -1, - GB18030_CODE = -2, - SEQ_START = -10, - NODE_START = -1000, - UNASSIGNED_NODE = new Array(0x100), - DEF_CHAR = -1; - -for (var i = 0; i < 0x100; i++) - UNASSIGNED_NODE[i] = UNASSIGNED; - - -// Class DBCSCodec reads and initializes mapping tables. -function DBCSCodec(codecOptions, iconv) { - this.encodingName = codecOptions.encodingName; - if (!codecOptions) - throw new Error("DBCS codec is called without the data.") - if (!codecOptions.table) - throw new Error("Encoding '" + this.encodingName + "' has no data."); - - // Load tables. - var mappingTable = codecOptions.table(); - - - // Decode tables: MBCS -> Unicode. - - // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256. - // Trie root is decodeTables[0]. - // Values: >= 0 -> unicode character code. can be > 0xFFFF - // == UNASSIGNED -> unknown/unassigned sequence. - // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence. - // <= NODE_START -> index of the next node in our trie to process next byte. - // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq. - this.decodeTables = []; - this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node. - - // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here. - this.decodeTableSeq = []; - - // Actual mapping tables consist of chunks. Use them to fill up decode tables. - for (var i = 0; i < mappingTable.length; i++) - this._addDecodeChunk(mappingTable[i]); - - this.defaultCharUnicode = iconv.defaultCharUnicode; - - - // Encode tables: Unicode -> DBCS. - - // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance. - // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null. - // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.). - // == UNASSIGNED -> no conversion found. Output a default char. - // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence. - this.encodeTable = []; - - // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of - // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key - // means end of sequence (needed when one sequence is a strict subsequence of another). - // Objects are kept separately from encodeTable to increase performance. - this.encodeTableSeq = []; - - // Some chars can be decoded, but need not be encoded. - var skipEncodeChars = {}; - if (codecOptions.encodeSkipVals) - for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) { - var val = codecOptions.encodeSkipVals[i]; - if (typeof val === 'number') - skipEncodeChars[val] = true; - else - for (var j = val.from; j <= val.to; j++) - skipEncodeChars[j] = true; - } - - // Use decode trie to recursively fill out encode tables. - this._fillEncodeTable(0, 0, skipEncodeChars); - - // Add more encoding pairs when needed. - if (codecOptions.encodeAdd) { - for (var uChar in codecOptions.encodeAdd) - if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar)) - this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]); - } - - this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)]; - if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?']; - if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0); - - - // Load & create GB18030 tables when needed. - if (typeof codecOptions.gb18030 === 'function') { - this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges. - - // Add GB18030 decode tables. - var thirdByteNodeIdx = this.decodeTables.length; - var thirdByteNode = this.decodeTables[thirdByteNodeIdx] = UNASSIGNED_NODE.slice(0); - - var fourthByteNodeIdx = this.decodeTables.length; - var fourthByteNode = this.decodeTables[fourthByteNodeIdx] = UNASSIGNED_NODE.slice(0); - - for (var i = 0x81; i <= 0xFE; i++) { - var secondByteNodeIdx = NODE_START - this.decodeTables[0][i]; - var secondByteNode = this.decodeTables[secondByteNodeIdx]; - for (var j = 0x30; j <= 0x39; j++) - secondByteNode[j] = NODE_START - thirdByteNodeIdx; - } - for (var i = 0x81; i <= 0xFE; i++) - thirdByteNode[i] = NODE_START - fourthByteNodeIdx; - for (var i = 0x30; i <= 0x39; i++) - fourthByteNode[i] = GB18030_CODE - } -} - -DBCSCodec.prototype.encoder = DBCSEncoder; -DBCSCodec.prototype.decoder = DBCSDecoder; - -// Decoder helpers -DBCSCodec.prototype._getDecodeTrieNode = function(addr) { - var bytes = []; - for (; addr > 0; addr >>= 8) - bytes.push(addr & 0xFF); - if (bytes.length == 0) - bytes.push(0); - - var node = this.decodeTables[0]; - for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie. - var val = node[bytes[i]]; - - if (val == UNASSIGNED) { // Create new node. - node[bytes[i]] = NODE_START - this.decodeTables.length; - this.decodeTables.push(node = UNASSIGNED_NODE.slice(0)); - } - else if (val <= NODE_START) { // Existing node. - node = this.decodeTables[NODE_START - val]; - } - else - throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16)); - } - return node; -} - - -DBCSCodec.prototype._addDecodeChunk = function(chunk) { - // First element of chunk is the hex mbcs code where we start. - var curAddr = parseInt(chunk[0], 16); - - // Choose the decoding node where we'll write our chars. - var writeTable = this._getDecodeTrieNode(curAddr); - curAddr = curAddr & 0xFF; - - // Write all other elements of the chunk to the table. - for (var k = 1; k < chunk.length; k++) { - var part = chunk[k]; - if (typeof part === "string") { // String, write as-is. - for (var l = 0; l < part.length;) { - var code = part.charCodeAt(l++); - if (0xD800 <= code && code < 0xDC00) { // Decode surrogate - var codeTrail = part.charCodeAt(l++); - if (0xDC00 <= codeTrail && codeTrail < 0xE000) - writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00); - else - throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]); - } - else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used) - var len = 0xFFF - code + 2; - var seq = []; - for (var m = 0; m < len; m++) - seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq. - - writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length; - this.decodeTableSeq.push(seq); - } - else - writeTable[curAddr++] = code; // Basic char - } - } - else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character. - var charCode = writeTable[curAddr - 1] + 1; - for (var l = 0; l < part; l++) - writeTable[curAddr++] = charCode++; - } - else - throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]); - } - if (curAddr > 0xFF) - throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr); -} - -// Encoder helpers -DBCSCodec.prototype._getEncodeBucket = function(uCode) { - var high = uCode >> 8; // This could be > 0xFF because of astral characters. - if (this.encodeTable[high] === undefined) - this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand. - return this.encodeTable[high]; -} - -DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) { - var bucket = this._getEncodeBucket(uCode); - var low = uCode & 0xFF; - if (bucket[low] <= SEQ_START) - this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it. - else if (bucket[low] == UNASSIGNED) - bucket[low] = dbcsCode; -} - -DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) { - - // Get the root of character tree according to first character of the sequence. - var uCode = seq[0]; - var bucket = this._getEncodeBucket(uCode); - var low = uCode & 0xFF; - - var node; - if (bucket[low] <= SEQ_START) { - // There's already a sequence with - use it. - node = this.encodeTableSeq[SEQ_START-bucket[low]]; - } - else { - // There was no sequence object - allocate a new one. - node = {}; - if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence. - bucket[low] = SEQ_START - this.encodeTableSeq.length; - this.encodeTableSeq.push(node); - } - - // Traverse the character tree, allocating new nodes as needed. - for (var j = 1; j < seq.length-1; j++) { - var oldVal = node[uCode]; - if (typeof oldVal === 'object') - node = oldVal; - else { - node = node[uCode] = {} - if (oldVal !== undefined) - node[DEF_CHAR] = oldVal - } - } - - // Set the leaf to given dbcsCode. - uCode = seq[seq.length-1]; - node[uCode] = dbcsCode; -} - -DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) { - var node = this.decodeTables[nodeIdx]; - for (var i = 0; i < 0x100; i++) { - var uCode = node[i]; - var mbCode = prefix + i; - if (skipEncodeChars[mbCode]) - continue; - - if (uCode >= 0) - this._setEncodeChar(uCode, mbCode); - else if (uCode <= NODE_START) - this._fillEncodeTable(NODE_START - uCode, mbCode << 8, skipEncodeChars); - else if (uCode <= SEQ_START) - this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode); - } -} - - - -// == Encoder ================================================================== - -function DBCSEncoder(options, codec) { - // Encoder state - this.leadSurrogate = -1; - this.seqObj = undefined; - - // Static data - this.encodeTable = codec.encodeTable; - this.encodeTableSeq = codec.encodeTableSeq; - this.defaultCharSingleByte = codec.defCharSB; - this.gb18030 = codec.gb18030; -} - -DBCSEncoder.prototype.write = function(str) { - var newBuf = Buffer.alloc(str.length * (this.gb18030 ? 4 : 3)), - leadSurrogate = this.leadSurrogate, - seqObj = this.seqObj, nextChar = -1, - i = 0, j = 0; - - while (true) { - // 0. Get next character. - if (nextChar === -1) { - if (i == str.length) break; - var uCode = str.charCodeAt(i++); - } - else { - var uCode = nextChar; - nextChar = -1; - } - - // 1. Handle surrogates. - if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates. - if (uCode < 0xDC00) { // We've got lead surrogate. - if (leadSurrogate === -1) { - leadSurrogate = uCode; - continue; - } else { - leadSurrogate = uCode; - // Double lead surrogate found. - uCode = UNASSIGNED; - } - } else { // We've got trail surrogate. - if (leadSurrogate !== -1) { - uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00); - leadSurrogate = -1; - } else { - // Incomplete surrogate pair - only trail surrogate found. - uCode = UNASSIGNED; - } - - } - } - else if (leadSurrogate !== -1) { - // Incomplete surrogate pair - only lead surrogate found. - nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char. - leadSurrogate = -1; - } - - // 2. Convert uCode character. - var dbcsCode = UNASSIGNED; - if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence - var resCode = seqObj[uCode]; - if (typeof resCode === 'object') { // Sequence continues. - seqObj = resCode; - continue; - - } else if (typeof resCode == 'number') { // Sequence finished. Write it. - dbcsCode = resCode; - - } else if (resCode == undefined) { // Current character is not part of the sequence. - - // Try default character for this sequence - resCode = seqObj[DEF_CHAR]; - if (resCode !== undefined) { - dbcsCode = resCode; // Found. Write it. - nextChar = uCode; // Current character will be written too in the next iteration. - - } else { - // TODO: What if we have no default? (resCode == undefined) - // Then, we should write first char of the sequence as-is and try the rest recursively. - // Didn't do it for now because no encoding has this situation yet. - // Currently, just skip the sequence and write current char. - } - } - seqObj = undefined; - } - else if (uCode >= 0) { // Regular character - var subtable = this.encodeTable[uCode >> 8]; - if (subtable !== undefined) - dbcsCode = subtable[uCode & 0xFF]; - - if (dbcsCode <= SEQ_START) { // Sequence start - seqObj = this.encodeTableSeq[SEQ_START-dbcsCode]; - continue; - } - - if (dbcsCode == UNASSIGNED && this.gb18030) { - // Use GB18030 algorithm to find character(s) to write. - var idx = findIdx(this.gb18030.uChars, uCode); - if (idx != -1) { - var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]); - newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600; - newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260; - newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10; - newBuf[j++] = 0x30 + dbcsCode; - continue; - } - } - } - - // 3. Write dbcsCode character. - if (dbcsCode === UNASSIGNED) - dbcsCode = this.defaultCharSingleByte; - - if (dbcsCode < 0x100) { - newBuf[j++] = dbcsCode; - } - else if (dbcsCode < 0x10000) { - newBuf[j++] = dbcsCode >> 8; // high byte - newBuf[j++] = dbcsCode & 0xFF; // low byte - } - else { - newBuf[j++] = dbcsCode >> 16; - newBuf[j++] = (dbcsCode >> 8) & 0xFF; - newBuf[j++] = dbcsCode & 0xFF; - } - } - - this.seqObj = seqObj; - this.leadSurrogate = leadSurrogate; - return newBuf.slice(0, j); -} - -DBCSEncoder.prototype.end = function() { - if (this.leadSurrogate === -1 && this.seqObj === undefined) - return; // All clean. Most often case. - - var newBuf = Buffer.alloc(10), j = 0; - - if (this.seqObj) { // We're in the sequence. - var dbcsCode = this.seqObj[DEF_CHAR]; - if (dbcsCode !== undefined) { // Write beginning of the sequence. - if (dbcsCode < 0x100) { - newBuf[j++] = dbcsCode; - } - else { - newBuf[j++] = dbcsCode >> 8; // high byte - newBuf[j++] = dbcsCode & 0xFF; // low byte - } - } else { - // See todo above. - } - this.seqObj = undefined; - } - - if (this.leadSurrogate !== -1) { - // Incomplete surrogate pair - only lead surrogate found. - newBuf[j++] = this.defaultCharSingleByte; - this.leadSurrogate = -1; - } - - return newBuf.slice(0, j); -} - -// Export for testing -DBCSEncoder.prototype.findIdx = findIdx; - - -// == Decoder ================================================================== - -function DBCSDecoder(options, codec) { - // Decoder state - this.nodeIdx = 0; - this.prevBuf = Buffer.alloc(0); - - // Static data - this.decodeTables = codec.decodeTables; - this.decodeTableSeq = codec.decodeTableSeq; - this.defaultCharUnicode = codec.defaultCharUnicode; - this.gb18030 = codec.gb18030; -} - -DBCSDecoder.prototype.write = function(buf) { - var newBuf = Buffer.alloc(buf.length*2), - nodeIdx = this.nodeIdx, - prevBuf = this.prevBuf, prevBufOffset = this.prevBuf.length, - seqStart = -this.prevBuf.length, // idx of the start of current parsed sequence. - uCode; - - if (prevBufOffset > 0) // Make prev buf overlap a little to make it easier to slice later. - prevBuf = Buffer.concat([prevBuf, buf.slice(0, 10)]); - - for (var i = 0, j = 0; i < buf.length; i++) { - var curByte = (i >= 0) ? buf[i] : prevBuf[i + prevBufOffset]; - - // Lookup in current trie node. - var uCode = this.decodeTables[nodeIdx][curByte]; - - if (uCode >= 0) { - // Normal character, just use it. - } - else if (uCode === UNASSIGNED) { // Unknown char. - // TODO: Callback with seq. - //var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset); - i = seqStart; // Try to parse again, after skipping first byte of the sequence ('i' will be incremented by 'for' cycle). - uCode = this.defaultCharUnicode.charCodeAt(0); - } - else if (uCode === GB18030_CODE) { - var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset); - var ptr = (curSeq[0]-0x81)*12600 + (curSeq[1]-0x30)*1260 + (curSeq[2]-0x81)*10 + (curSeq[3]-0x30); - var idx = findIdx(this.gb18030.gbChars, ptr); - uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx]; - } - else if (uCode <= NODE_START) { // Go to next trie node. - nodeIdx = NODE_START - uCode; - continue; - } - else if (uCode <= SEQ_START) { // Output a sequence of chars. - var seq = this.decodeTableSeq[SEQ_START - uCode]; - for (var k = 0; k < seq.length - 1; k++) { - uCode = seq[k]; - newBuf[j++] = uCode & 0xFF; - newBuf[j++] = uCode >> 8; - } - uCode = seq[seq.length-1]; - } - else - throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte); - - // Write the character to buffer, handling higher planes using surrogate pair. - if (uCode > 0xFFFF) { - uCode -= 0x10000; - var uCodeLead = 0xD800 + Math.floor(uCode / 0x400); - newBuf[j++] = uCodeLead & 0xFF; - newBuf[j++] = uCodeLead >> 8; - - uCode = 0xDC00 + uCode % 0x400; - } - newBuf[j++] = uCode & 0xFF; - newBuf[j++] = uCode >> 8; - - // Reset trie node. - nodeIdx = 0; seqStart = i+1; - } - - this.nodeIdx = nodeIdx; - this.prevBuf = (seqStart >= 0) ? buf.slice(seqStart) : prevBuf.slice(seqStart + prevBufOffset); - return newBuf.slice(0, j).toString('ucs2'); -} - -DBCSDecoder.prototype.end = function() { - var ret = ''; - - // Try to parse all remaining chars. - while (this.prevBuf.length > 0) { - // Skip 1 character in the buffer. - ret += this.defaultCharUnicode; - var buf = this.prevBuf.slice(1); - - // Parse remaining as usual. - this.prevBuf = Buffer.alloc(0); - this.nodeIdx = 0; - if (buf.length > 0) - ret += this.write(buf); - } - - this.nodeIdx = 0; - return ret; -} - -// Binary search for GB18030. Returns largest i such that table[i] <= val. -function findIdx(table, val) { - if (table[0] > val) - return -1; - - var l = 0, r = table.length; - while (l < r-1) { // always table[l] <= val < table[r] - var mid = l + Math.floor((r-l+1)/2); - if (table[mid] <= val) - l = mid; - else - r = mid; - } - return l; -} - diff --git a/node_modules/iconv-lite/encodings/dbcs-data.js b/node_modules/iconv-lite/encodings/dbcs-data.js deleted file mode 100644 index 4b61914..0000000 --- a/node_modules/iconv-lite/encodings/dbcs-data.js +++ /dev/null @@ -1,176 +0,0 @@ -"use strict"; - -// Description of supported double byte encodings and aliases. -// Tables are not require()-d until they are needed to speed up library load. -// require()-s are direct to support Browserify. - -module.exports = { - - // == Japanese/ShiftJIS ==================================================== - // All japanese encodings are based on JIS X set of standards: - // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF. - // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes. - // Has several variations in 1978, 1983, 1990 and 1997. - // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead. - // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233. - // 2 planes, first is superset of 0208, second - revised 0212. - // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx) - - // Byte encodings are: - // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte - // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC. - // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI. - // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes. - // 0x00-0x7F - lower part of 0201 - // 0x8E, 0xA1-0xDF - upper part of 0201 - // (0xA1-0xFE)x2 - 0208 plane (94x94). - // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94). - // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon. - // Used as-is in ISO2022 family. - // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII, - // 0201-1976 Roman, 0208-1978, 0208-1983. - // * ISO2022-JP-1: Adds esc seq for 0212-1990. - // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7. - // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2. - // * ISO2022-JP-2004: Adds 0213-2004 Plane 1. - // - // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes. - // - // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html - - 'shiftjis': { - type: '_dbcs', - table: function() { return require('./tables/shiftjis.json') }, - encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, - encodeSkipVals: [{from: 0xED40, to: 0xF940}], - }, - 'csshiftjis': 'shiftjis', - 'mskanji': 'shiftjis', - 'sjis': 'shiftjis', - 'windows31j': 'shiftjis', - 'ms31j': 'shiftjis', - 'xsjis': 'shiftjis', - 'windows932': 'shiftjis', - 'ms932': 'shiftjis', - '932': 'shiftjis', - 'cp932': 'shiftjis', - - 'eucjp': { - type: '_dbcs', - table: function() { return require('./tables/eucjp.json') }, - encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, - }, - - // TODO: KDDI extension to Shift_JIS - // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes. - // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars. - - - // == Chinese/GBK ========================================================== - // http://en.wikipedia.org/wiki/GBK - // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder - - // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936 - 'gb2312': 'cp936', - 'gb231280': 'cp936', - 'gb23121980': 'cp936', - 'csgb2312': 'cp936', - 'csiso58gb231280': 'cp936', - 'euccn': 'cp936', - - // Microsoft's CP936 is a subset and approximation of GBK. - 'windows936': 'cp936', - 'ms936': 'cp936', - '936': 'cp936', - 'cp936': { - type: '_dbcs', - table: function() { return require('./tables/cp936.json') }, - }, - - // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other. - 'gbk': { - type: '_dbcs', - table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) }, - }, - 'xgbk': 'gbk', - 'isoir58': 'gbk', - - // GB18030 is an algorithmic extension of GBK. - // Main source: https://www.w3.org/TR/encoding/#gbk-encoder - // http://icu-project.org/docs/papers/gb18030.html - // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml - // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0 - 'gb18030': { - type: '_dbcs', - table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) }, - gb18030: function() { return require('./tables/gb18030-ranges.json') }, - encodeSkipVals: [0x80], - encodeAdd: {'€': 0xA2E3}, - }, - - 'chinese': 'gb18030', - - - // == Korean =============================================================== - // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same. - 'windows949': 'cp949', - 'ms949': 'cp949', - '949': 'cp949', - 'cp949': { - type: '_dbcs', - table: function() { return require('./tables/cp949.json') }, - }, - - 'cseuckr': 'cp949', - 'csksc56011987': 'cp949', - 'euckr': 'cp949', - 'isoir149': 'cp949', - 'korean': 'cp949', - 'ksc56011987': 'cp949', - 'ksc56011989': 'cp949', - 'ksc5601': 'cp949', - - - // == Big5/Taiwan/Hong Kong ================================================ - // There are lots of tables for Big5 and cp950. Please see the following links for history: - // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html - // Variations, in roughly number of defined chars: - // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT - // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/ - // * Big5-2003 (Taiwan standard) almost superset of cp950. - // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers. - // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard. - // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years. - // Plus, it has 4 combining sequences. - // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299 - // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way. - // Implementations are not consistent within browsers; sometimes labeled as just big5. - // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied. - // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31 - // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s. - // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt - // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt - // - // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder - // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong. - - 'windows950': 'cp950', - 'ms950': 'cp950', - '950': 'cp950', - 'cp950': { - type: '_dbcs', - table: function() { return require('./tables/cp950.json') }, - }, - - // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus. - 'big5': 'big5hkscs', - 'big5hkscs': { - type: '_dbcs', - table: function() { return require('./tables/cp950.json').concat(require('./tables/big5-added.json')) }, - encodeSkipVals: [0xa2cc], - }, - - 'cnbig5': 'big5hkscs', - 'csbig5': 'big5hkscs', - 'xxbig5': 'big5hkscs', -}; diff --git a/node_modules/iconv-lite/encodings/index.js b/node_modules/iconv-lite/encodings/index.js deleted file mode 100644 index e304003..0000000 --- a/node_modules/iconv-lite/encodings/index.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; - -// Update this array if you add/rename/remove files in this directory. -// We support Browserify by skipping automatic module discovery and requiring modules directly. -var modules = [ - require("./internal"), - require("./utf16"), - require("./utf7"), - require("./sbcs-codec"), - require("./sbcs-data"), - require("./sbcs-data-generated"), - require("./dbcs-codec"), - require("./dbcs-data"), -]; - -// Put all encoding/alias/codec definitions to single object and export it. -for (var i = 0; i < modules.length; i++) { - var module = modules[i]; - for (var enc in module) - if (Object.prototype.hasOwnProperty.call(module, enc)) - exports[enc] = module[enc]; -} diff --git a/node_modules/iconv-lite/encodings/internal.js b/node_modules/iconv-lite/encodings/internal.js deleted file mode 100644 index 05ce38b..0000000 --- a/node_modules/iconv-lite/encodings/internal.js +++ /dev/null @@ -1,188 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// Export Node.js internal encodings. - -module.exports = { - // Encodings - utf8: { type: "_internal", bomAware: true}, - cesu8: { type: "_internal", bomAware: true}, - unicode11utf8: "utf8", - - ucs2: { type: "_internal", bomAware: true}, - utf16le: "ucs2", - - binary: { type: "_internal" }, - base64: { type: "_internal" }, - hex: { type: "_internal" }, - - // Codec. - _internal: InternalCodec, -}; - -//------------------------------------------------------------------------------ - -function InternalCodec(codecOptions, iconv) { - this.enc = codecOptions.encodingName; - this.bomAware = codecOptions.bomAware; - - if (this.enc === "base64") - this.encoder = InternalEncoderBase64; - else if (this.enc === "cesu8") { - this.enc = "utf8"; // Use utf8 for decoding. - this.encoder = InternalEncoderCesu8; - - // Add decoder for versions of Node not supporting CESU-8 - if (Buffer.from('eda0bdedb2a9', 'hex').toString() !== '💩') { - this.decoder = InternalDecoderCesu8; - this.defaultCharUnicode = iconv.defaultCharUnicode; - } - } -} - -InternalCodec.prototype.encoder = InternalEncoder; -InternalCodec.prototype.decoder = InternalDecoder; - -//------------------------------------------------------------------------------ - -// We use node.js internal decoder. Its signature is the same as ours. -var StringDecoder = require('string_decoder').StringDecoder; - -if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method. - StringDecoder.prototype.end = function() {}; - - -function InternalDecoder(options, codec) { - StringDecoder.call(this, codec.enc); -} - -InternalDecoder.prototype = StringDecoder.prototype; - - -//------------------------------------------------------------------------------ -// Encoder is mostly trivial - -function InternalEncoder(options, codec) { - this.enc = codec.enc; -} - -InternalEncoder.prototype.write = function(str) { - return Buffer.from(str, this.enc); -} - -InternalEncoder.prototype.end = function() { -} - - -//------------------------------------------------------------------------------ -// Except base64 encoder, which must keep its state. - -function InternalEncoderBase64(options, codec) { - this.prevStr = ''; -} - -InternalEncoderBase64.prototype.write = function(str) { - str = this.prevStr + str; - var completeQuads = str.length - (str.length % 4); - this.prevStr = str.slice(completeQuads); - str = str.slice(0, completeQuads); - - return Buffer.from(str, "base64"); -} - -InternalEncoderBase64.prototype.end = function() { - return Buffer.from(this.prevStr, "base64"); -} - - -//------------------------------------------------------------------------------ -// CESU-8 encoder is also special. - -function InternalEncoderCesu8(options, codec) { -} - -InternalEncoderCesu8.prototype.write = function(str) { - var buf = Buffer.alloc(str.length * 3), bufIdx = 0; - for (var i = 0; i < str.length; i++) { - var charCode = str.charCodeAt(i); - // Naive implementation, but it works because CESU-8 is especially easy - // to convert from UTF-16 (which all JS strings are encoded in). - if (charCode < 0x80) - buf[bufIdx++] = charCode; - else if (charCode < 0x800) { - buf[bufIdx++] = 0xC0 + (charCode >>> 6); - buf[bufIdx++] = 0x80 + (charCode & 0x3f); - } - else { // charCode will always be < 0x10000 in javascript. - buf[bufIdx++] = 0xE0 + (charCode >>> 12); - buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f); - buf[bufIdx++] = 0x80 + (charCode & 0x3f); - } - } - return buf.slice(0, bufIdx); -} - -InternalEncoderCesu8.prototype.end = function() { -} - -//------------------------------------------------------------------------------ -// CESU-8 decoder is not implemented in Node v4.0+ - -function InternalDecoderCesu8(options, codec) { - this.acc = 0; - this.contBytes = 0; - this.accBytes = 0; - this.defaultCharUnicode = codec.defaultCharUnicode; -} - -InternalDecoderCesu8.prototype.write = function(buf) { - var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, - res = ''; - for (var i = 0; i < buf.length; i++) { - var curByte = buf[i]; - if ((curByte & 0xC0) !== 0x80) { // Leading byte - if (contBytes > 0) { // Previous code is invalid - res += this.defaultCharUnicode; - contBytes = 0; - } - - if (curByte < 0x80) { // Single-byte code - res += String.fromCharCode(curByte); - } else if (curByte < 0xE0) { // Two-byte code - acc = curByte & 0x1F; - contBytes = 1; accBytes = 1; - } else if (curByte < 0xF0) { // Three-byte code - acc = curByte & 0x0F; - contBytes = 2; accBytes = 1; - } else { // Four or more are not supported for CESU-8. - res += this.defaultCharUnicode; - } - } else { // Continuation byte - if (contBytes > 0) { // We're waiting for it. - acc = (acc << 6) | (curByte & 0x3f); - contBytes--; accBytes++; - if (contBytes === 0) { - // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80) - if (accBytes === 2 && acc < 0x80 && acc > 0) - res += this.defaultCharUnicode; - else if (accBytes === 3 && acc < 0x800) - res += this.defaultCharUnicode; - else - // Actually add character. - res += String.fromCharCode(acc); - } - } else { // Unexpected continuation byte - res += this.defaultCharUnicode; - } - } - } - this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes; - return res; -} - -InternalDecoderCesu8.prototype.end = function() { - var res = 0; - if (this.contBytes > 0) - res += this.defaultCharUnicode; - return res; -} diff --git a/node_modules/iconv-lite/encodings/sbcs-codec.js b/node_modules/iconv-lite/encodings/sbcs-codec.js deleted file mode 100644 index abac5ff..0000000 --- a/node_modules/iconv-lite/encodings/sbcs-codec.js +++ /dev/null @@ -1,72 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that -// correspond to encoded bytes (if 128 - then lower half is ASCII). - -exports._sbcs = SBCSCodec; -function SBCSCodec(codecOptions, iconv) { - if (!codecOptions) - throw new Error("SBCS codec is called without the data.") - - // Prepare char buffer for decoding. - if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256)) - throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)"); - - if (codecOptions.chars.length === 128) { - var asciiString = ""; - for (var i = 0; i < 128; i++) - asciiString += String.fromCharCode(i); - codecOptions.chars = asciiString + codecOptions.chars; - } - - this.decodeBuf = Buffer.from(codecOptions.chars, 'ucs2'); - - // Encoding buffer. - var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0)); - - for (var i = 0; i < codecOptions.chars.length; i++) - encodeBuf[codecOptions.chars.charCodeAt(i)] = i; - - this.encodeBuf = encodeBuf; -} - -SBCSCodec.prototype.encoder = SBCSEncoder; -SBCSCodec.prototype.decoder = SBCSDecoder; - - -function SBCSEncoder(options, codec) { - this.encodeBuf = codec.encodeBuf; -} - -SBCSEncoder.prototype.write = function(str) { - var buf = Buffer.alloc(str.length); - for (var i = 0; i < str.length; i++) - buf[i] = this.encodeBuf[str.charCodeAt(i)]; - - return buf; -} - -SBCSEncoder.prototype.end = function() { -} - - -function SBCSDecoder(options, codec) { - this.decodeBuf = codec.decodeBuf; -} - -SBCSDecoder.prototype.write = function(buf) { - // Strings are immutable in JS -> we use ucs2 buffer to speed up computations. - var decodeBuf = this.decodeBuf; - var newBuf = Buffer.alloc(buf.length*2); - var idx1 = 0, idx2 = 0; - for (var i = 0; i < buf.length; i++) { - idx1 = buf[i]*2; idx2 = i*2; - newBuf[idx2] = decodeBuf[idx1]; - newBuf[idx2+1] = decodeBuf[idx1+1]; - } - return newBuf.toString('ucs2'); -} - -SBCSDecoder.prototype.end = function() { -} diff --git a/node_modules/iconv-lite/encodings/sbcs-data-generated.js b/node_modules/iconv-lite/encodings/sbcs-data-generated.js deleted file mode 100644 index 9b48236..0000000 --- a/node_modules/iconv-lite/encodings/sbcs-data-generated.js +++ /dev/null @@ -1,451 +0,0 @@ -"use strict"; - -// Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script. -module.exports = { - "437": "cp437", - "737": "cp737", - "775": "cp775", - "850": "cp850", - "852": "cp852", - "855": "cp855", - "856": "cp856", - "857": "cp857", - "858": "cp858", - "860": "cp860", - "861": "cp861", - "862": "cp862", - "863": "cp863", - "864": "cp864", - "865": "cp865", - "866": "cp866", - "869": "cp869", - "874": "windows874", - "922": "cp922", - "1046": "cp1046", - "1124": "cp1124", - "1125": "cp1125", - "1129": "cp1129", - "1133": "cp1133", - "1161": "cp1161", - "1162": "cp1162", - "1163": "cp1163", - "1250": "windows1250", - "1251": "windows1251", - "1252": "windows1252", - "1253": "windows1253", - "1254": "windows1254", - "1255": "windows1255", - "1256": "windows1256", - "1257": "windows1257", - "1258": "windows1258", - "28591": "iso88591", - "28592": "iso88592", - "28593": "iso88593", - "28594": "iso88594", - "28595": "iso88595", - "28596": "iso88596", - "28597": "iso88597", - "28598": "iso88598", - "28599": "iso88599", - "28600": "iso885910", - "28601": "iso885911", - "28603": "iso885913", - "28604": "iso885914", - "28605": "iso885915", - "28606": "iso885916", - "windows874": { - "type": "_sbcs", - "chars": "€����…�����������‘’“”•–—�������� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - }, - "win874": "windows874", - "cp874": "windows874", - "windows1250": { - "type": "_sbcs", - "chars": "€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“”•–—�™š›śťžź ˇ˘Ł¤Ą¦§¨©Ş«¬­®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" - }, - "win1250": "windows1250", - "cp1250": "windows1250", - "windows1251": { - "type": "_sbcs", - "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—�™љ›њќћџ ЎўЈ¤Ґ¦§Ё©Є«¬­®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" - }, - "win1251": "windows1251", - "cp1251": "windows1251", - "windows1252": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "win1252": "windows1252", - "cp1252": "windows1252", - "windows1253": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡�‰�‹�����‘’“”•–—�™�›���� ΅Ά£¤¥¦§¨©�«¬­®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" - }, - "win1253": "windows1253", - "cp1253": "windows1253", - "windows1254": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“”•–—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖרÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" - }, - "win1254": "windows1254", - "cp1254": "windows1254", - "windows1255": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰�‹�����‘’“”•–—˜™�›���� ¡¢£₪¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹֺֻּֽ־ֿ׀ׁׂ׃װױײ׳״�������אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" - }, - "win1255": "windows1255", - "cp1255": "windows1255", - "windows1256": { - "type": "_sbcs", - "chars": "€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œ‌‍ں ،¢£¤¥¦§¨©ھ«¬­®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûü‎‏ے" - }, - "win1256": "windows1256", - "cp1256": "windows1256", - "windows1257": { - "type": "_sbcs", - "chars": "€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“”•–—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬­®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙" - }, - "win1257": "windows1257", - "cp1257": "windows1257", - "windows1258": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“”•–—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "win1258": "windows1258", - "cp1258": "windows1258", - "iso88591": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "cp28591": "iso88591", - "iso88592": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" - }, - "cp28592": "iso88592", - "iso88593": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ħ˘£¤�Ĥ§¨İŞĞĴ­�ݰħ²³´µĥ·¸ışğĵ½�żÀÁÂ�ÄĊĈÇÈÉÊËÌÍÎÏ�ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ�äċĉçèéêëìíîï�ñòóôġö÷ĝùúûüŭŝ˙" - }, - "cp28593": "iso88593", - "iso88594": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĸŖ¤Ĩϧ¨ŠĒĢŦ­Ž¯°ą˛ŗ´ĩšēģŧŊžŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎĪĐŅŌĶÔÕÖרŲÚÛÜŨŪßāáâãäåæįčéęëėíîīđņōķôõö÷øųúûüũū˙" - }, - "cp28594": "iso88594", - "iso88595": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєѕіїјљњћќ§ўџ" - }, - "cp28595": "iso88595", - "iso88596": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ���¤�������،­�������������؛���؟�ءآأؤإئابةتثجحخدذرزسشصضطظعغ�����ـفقكلمنهوىيًٌٍَُِّْ�������������" - }, - "cp28596": "iso88596", - "iso88597": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ‘’£€₯¦§¨©ͺ«¬­�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" - }, - "cp28597": "iso88597", - "iso88598": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �¢£¤¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" - }, - "cp28598": "iso88598", - "iso88599": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖרÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" - }, - "cp28599": "iso88599", - "iso885910": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨͧĻĐŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ" - }, - "cp28600": "iso885910", - "iso885911": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - }, - "cp28601": "iso885911", - "iso885913": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’" - }, - "cp28603": "iso885913", - "iso885914": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ­®ŸḞḟĠġṀṁ¶ṖẁṗẃṠỳẄẅṡÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŴÑÒÓÔÕÖṪØÙÚÛÜÝŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ" - }, - "cp28604": "iso885914", - "iso885915": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "cp28605": "iso885915", - "iso885916": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄąŁ€„Чš©Ș«Ź­źŻ°±ČłŽ”¶·žčș»ŒœŸżÀÁÂĂÄĆÆÇÈÉÊËÌÍÎÏĐŃÒÓÔŐÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ" - }, - "cp28606": "iso885916", - "cp437": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm437": "cp437", - "csibm437": "cp437", - "cp737": { - "type": "_sbcs", - "chars": "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ " - }, - "ibm737": "cp737", - "csibm737": "cp737", - "cp775": { - "type": "_sbcs", - "chars": "ĆüéāäģåćłēŖŗīŹÄÅÉæÆōöĢ¢ŚśÖÜø£Ø×¤ĀĪóŻżź”¦©®¬½¼Ł«»░▒▓│┤ĄČĘĖ╣║╗╝ĮŠ┐└┴┬├─┼ŲŪ╚╔╩╦╠═╬Žąčęėįšųūž┘┌█▄▌▐▀ÓßŌŃõÕµńĶķĻļņĒŅ’­±“¾¶§÷„°∙·¹³²■ " - }, - "ibm775": "cp775", - "csibm775": "cp775", - "cp850": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø×ƒáíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm850": "cp850", - "csibm850": "cp850", - "cp852": { - "type": "_sbcs", - "chars": "ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘§÷¸°¨˙űŘř■ " - }, - "ibm852": "cp852", - "csibm852": "cp852", - "cp855": { - "type": "_sbcs", - "chars": "ђЂѓЃёЁєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџЏюЮъЪаАбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗╝йЙ┐└┴┬├─┼кК╚╔╩╦╠═╬¤лЛмМнНоОп┘┌█▄Пя▀ЯрРсСтТуУжЖвВьЬ№­ыЫзЗшШэЭщЩчЧ§■ " - }, - "ibm855": "cp855", - "csibm855": "cp855", - "cp856": { - "type": "_sbcs", - "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת�£�×����������®¬½¼�«»░▒▓│┤���©╣║╗╝¢¥┐└┴┬├─┼��╚╔╩╦╠═╬¤���������┘┌█▄¦�▀������µ�������¯´­±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm856": "cp856", - "csibm856": "cp856", - "cp857": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ�ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´­±�¾¶§÷¸°¨·¹³²■ " - }, - "ibm857": "cp857", - "csibm857": "cp857", - "cp858": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø×ƒáíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm858": "cp858", - "csibm858": "cp858", - "cp860": { - "type": "_sbcs", - "chars": "ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm860": "cp860", - "csibm860": "cp860", - "cp861": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm861": "cp861", - "csibm861": "cp861", - "cp862": { - "type": "_sbcs", - "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm862": "cp862", - "csibm862": "cp862", - "cp863": { - "type": "_sbcs", - "chars": "ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÏûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯Î⌐¬½¼¾«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm863": "cp863", - "csibm863": "cp863", - "cp864": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�" - }, - "ibm864": "cp864", - "csibm864": "cp864", - "cp865": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm865": "cp865", - "csibm865": "cp865", - "cp866": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ " - }, - "ibm866": "cp866", - "csibm866": "cp866", - "cp869": { - "type": "_sbcs", - "chars": "������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ " - }, - "ibm869": "cp869", - "csibm869": "cp869", - "cp922": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖרÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ" - }, - "ibm922": "cp922", - "csibm922": "cp922", - "cp1046": { - "type": "_sbcs", - "chars": "ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�" - }, - "ibm1046": "cp1046", - "csibm1046": "cp1046", - "cp1124": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ" - }, - "ibm1124": "cp1124", - "csibm1124": "cp1124", - "cp1125": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ " - }, - "ibm1125": "cp1125", - "csibm1125": "cp1125", - "cp1129": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "ibm1129": "cp1129", - "csibm1129": "cp1129", - "cp1133": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�" - }, - "ibm1133": "cp1133", - "csibm1133": "cp1133", - "cp1161": { - "type": "_sbcs", - "chars": "��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ " - }, - "ibm1161": "cp1161", - "csibm1161": "cp1161", - "cp1162": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - }, - "ibm1162": "cp1162", - "csibm1162": "cp1162", - "cp1163": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "ibm1163": "cp1163", - "csibm1163": "cp1163", - "maccroatian": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈ƫȅ ÀÃÕŒœĐ—“”‘’÷◊�©⁄¤‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ" - }, - "maccyrillic": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" - }, - "macgreek": { - "type": "_sbcs", - "chars": "Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦­ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�" - }, - "maciceland": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macroman": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macromania": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›Ţţ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macthai": { - "type": "_sbcs", - "chars": "«»…“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู​–—฿เแโใไๅๆ็่้๊๋์ํ™๏๐๑๒๓๔๕๖๗๘๙®©����" - }, - "macturkish": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macukraine": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" - }, - "koi8r": { - "type": "_sbcs", - "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "koi8u": { - "type": "_sbcs", - "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "koi8ru": { - "type": "_sbcs", - "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "koi8t": { - "type": "_sbcs", - "chars": "қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“”•–—�™�›�����ӯӮё¤ӣ¦§���«¬­®�°±²Ё�Ӣ¶·�№�»���©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "armscii8": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚�" - }, - "rk1048": { - "type": "_sbcs", - "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺЏђ‘’“”•–—�™љ›њқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬­®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" - }, - "tcvn": { - "type": "_sbcs", - "chars": "\u0000ÚỤ\u0003ỪỬỮ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010ỨỰỲỶỸÝỴ\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ" - }, - "georgianacademy": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "georgianps": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "pt154": { - "type": "_sbcs", - "chars": "ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" - }, - "viscii": { - "type": "_sbcs", - "chars": "\u0000\u0001Ẳ\u0003\u0004ẴẪ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013Ỷ\u0015\u0016\u0017\u0018Ỹ\u001a\u001b\u001c\u001dỴ\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ" - }, - "iso646cn": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" - }, - "iso646jp": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" - }, - "hproman8": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�" - }, - "macintosh": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "ascii": { - "type": "_sbcs", - "chars": "��������������������������������������������������������������������������������������������������������������������������������" - }, - "tis620": { - "type": "_sbcs", - "chars": "���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - } -} \ No newline at end of file diff --git a/node_modules/iconv-lite/encodings/sbcs-data.js b/node_modules/iconv-lite/encodings/sbcs-data.js deleted file mode 100644 index fdb81a3..0000000 --- a/node_modules/iconv-lite/encodings/sbcs-data.js +++ /dev/null @@ -1,174 +0,0 @@ -"use strict"; - -// Manually added data to be used by sbcs codec in addition to generated one. - -module.exports = { - // Not supported by iconv, not sure why. - "10029": "maccenteuro", - "maccenteuro": { - "type": "_sbcs", - "chars": "ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ" - }, - - "808": "cp808", - "ibm808": "cp808", - "cp808": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ " - }, - - "mik": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя└┴┬├─┼╣║╚╔╩╦╠═╬┐░▒▓│┤№§╗╝┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - - // Aliases of generated encodings. - "ascii8bit": "ascii", - "usascii": "ascii", - "ansix34": "ascii", - "ansix341968": "ascii", - "ansix341986": "ascii", - "csascii": "ascii", - "cp367": "ascii", - "ibm367": "ascii", - "isoir6": "ascii", - "iso646us": "ascii", - "iso646irv": "ascii", - "us": "ascii", - - "latin1": "iso88591", - "latin2": "iso88592", - "latin3": "iso88593", - "latin4": "iso88594", - "latin5": "iso88599", - "latin6": "iso885910", - "latin7": "iso885913", - "latin8": "iso885914", - "latin9": "iso885915", - "latin10": "iso885916", - - "csisolatin1": "iso88591", - "csisolatin2": "iso88592", - "csisolatin3": "iso88593", - "csisolatin4": "iso88594", - "csisolatincyrillic": "iso88595", - "csisolatinarabic": "iso88596", - "csisolatingreek" : "iso88597", - "csisolatinhebrew": "iso88598", - "csisolatin5": "iso88599", - "csisolatin6": "iso885910", - - "l1": "iso88591", - "l2": "iso88592", - "l3": "iso88593", - "l4": "iso88594", - "l5": "iso88599", - "l6": "iso885910", - "l7": "iso885913", - "l8": "iso885914", - "l9": "iso885915", - "l10": "iso885916", - - "isoir14": "iso646jp", - "isoir57": "iso646cn", - "isoir100": "iso88591", - "isoir101": "iso88592", - "isoir109": "iso88593", - "isoir110": "iso88594", - "isoir144": "iso88595", - "isoir127": "iso88596", - "isoir126": "iso88597", - "isoir138": "iso88598", - "isoir148": "iso88599", - "isoir157": "iso885910", - "isoir166": "tis620", - "isoir179": "iso885913", - "isoir199": "iso885914", - "isoir203": "iso885915", - "isoir226": "iso885916", - - "cp819": "iso88591", - "ibm819": "iso88591", - - "cyrillic": "iso88595", - - "arabic": "iso88596", - "arabic8": "iso88596", - "ecma114": "iso88596", - "asmo708": "iso88596", - - "greek" : "iso88597", - "greek8" : "iso88597", - "ecma118" : "iso88597", - "elot928" : "iso88597", - - "hebrew": "iso88598", - "hebrew8": "iso88598", - - "turkish": "iso88599", - "turkish8": "iso88599", - - "thai": "iso885911", - "thai8": "iso885911", - - "celtic": "iso885914", - "celtic8": "iso885914", - "isoceltic": "iso885914", - - "tis6200": "tis620", - "tis62025291": "tis620", - "tis62025330": "tis620", - - "10000": "macroman", - "10006": "macgreek", - "10007": "maccyrillic", - "10079": "maciceland", - "10081": "macturkish", - - "cspc8codepage437": "cp437", - "cspc775baltic": "cp775", - "cspc850multilingual": "cp850", - "cspcp852": "cp852", - "cspc862latinhebrew": "cp862", - "cpgr": "cp869", - - "msee": "cp1250", - "mscyrl": "cp1251", - "msansi": "cp1252", - "msgreek": "cp1253", - "msturk": "cp1254", - "mshebr": "cp1255", - "msarab": "cp1256", - "winbaltrim": "cp1257", - - "cp20866": "koi8r", - "20866": "koi8r", - "ibm878": "koi8r", - "cskoi8r": "koi8r", - - "cp21866": "koi8u", - "21866": "koi8u", - "ibm1168": "koi8u", - - "strk10482002": "rk1048", - - "tcvn5712": "tcvn", - "tcvn57121": "tcvn", - - "gb198880": "iso646cn", - "cn": "iso646cn", - - "csiso14jisc6220ro": "iso646jp", - "jisc62201969ro": "iso646jp", - "jp": "iso646jp", - - "cshproman8": "hproman8", - "r8": "hproman8", - "roman8": "hproman8", - "xroman8": "hproman8", - "ibm1051": "hproman8", - - "mac": "macintosh", - "csmacintosh": "macintosh", -}; - diff --git a/node_modules/iconv-lite/encodings/tables/big5-added.json b/node_modules/iconv-lite/encodings/tables/big5-added.json deleted file mode 100644 index 3c3d3c2..0000000 --- a/node_modules/iconv-lite/encodings/tables/big5-added.json +++ /dev/null @@ -1,122 +0,0 @@ -[ -["8740","䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"], -["8767","綕夝𨮹㷴霴𧯯寛𡵞媤㘥𩺰嫑宷峼杮薓𩥅瑡璝㡵𡵓𣚞𦀡㻬"], -["87a1","𥣞㫵竼龗𤅡𨤍𣇪𠪊𣉞䌊蒄龖鐯䤰蘓墖靊鈘秐稲晠権袝瑌篅枂稬剏遆㓦珄𥶹瓆鿇垳䤯呌䄱𣚎堘穲𧭥讏䚮𦺈䆁𥶙箮𢒼鿈𢓁𢓉𢓌鿉蔄𣖻䂴鿊䓡𪷿拁灮鿋"], -["8840","㇀",4,"𠄌㇅𠃑𠃍㇆㇇𠃋𡿨㇈𠃊㇉㇊㇋㇌𠄎㇍㇎ĀÁǍÀĒÉĚÈŌÓǑÒ࿿Ê̄Ế࿿Ê̌ỀÊāáǎàɑēéěèīíǐìōóǒòūúǔùǖǘǚ"], -["88a1","ǜü࿿ê̄ế࿿ê̌ềêɡ⏚⏛"], -["8940","𪎩𡅅"], -["8943","攊"], -["8946","丽滝鵎釟"], -["894c","𧜵撑会伨侨兖兴农凤务动医华发变团声处备夲头学实実岚庆总斉柾栄桥济炼电纤纬纺织经统缆缷艺苏药视设询车轧轮"], -["89a1","琑糼緍楆竉刧"], -["89ab","醌碸酞肼"], -["89b0","贋胶𠧧"], -["89b5","肟黇䳍鷉鸌䰾𩷶𧀎鸊𪄳㗁"], -["89c1","溚舾甙"], -["89c5","䤑马骏龙禇𨑬𡷊𠗐𢫦两亁亀亇亿仫伷㑌侽㹈倃傈㑽㒓㒥円夅凛凼刅争剹劐匧㗇厩㕑厰㕓参吣㕭㕲㚁咓咣咴咹哐哯唘唣唨㖘唿㖥㖿嗗㗅"], -["8a40","𧶄唥"], -["8a43","𠱂𠴕𥄫喐𢳆㧬𠍁蹆𤶸𩓥䁓𨂾睺𢰸㨴䟕𨅝𦧲𤷪擝𠵼𠾴𠳕𡃴撍蹾𠺖𠰋𠽤𢲩𨉖𤓓"], -["8a64","𠵆𩩍𨃩䟴𤺧𢳂骲㩧𩗴㿭㔆𥋇𩟔𧣈𢵄鵮頕"], -["8a76","䏙𦂥撴哣𢵌𢯊𡁷㧻𡁯"], -["8aa1","𦛚𦜖𧦠擪𥁒𠱃蹨𢆡𨭌𠜱"], -["8aac","䠋𠆩㿺塳𢶍"], -["8ab2","𤗈𠓼𦂗𠽌𠶖啹䂻䎺"], -["8abb","䪴𢩦𡂝膪飵𠶜捹㧾𢝵跀嚡摼㹃"], -["8ac9","𪘁𠸉𢫏𢳉"], -["8ace","𡃈𣧂㦒㨆𨊛㕸𥹉𢃇噒𠼱𢲲𩜠㒼氽𤸻"], -["8adf","𧕴𢺋𢈈𪙛𨳍𠹺𠰴𦠜羓𡃏𢠃𢤹㗻𥇣𠺌𠾍𠺪㾓𠼰𠵇𡅏𠹌"], -["8af6","𠺫𠮩𠵈𡃀𡄽㿹𢚖搲𠾭"], -["8b40","𣏴𧘹𢯎𠵾𠵿𢱑𢱕㨘𠺘𡃇𠼮𪘲𦭐𨳒𨶙𨳊閪哌苄喹"], -["8b55","𩻃鰦骶𧝞𢷮煀腭胬尜𦕲脴㞗卟𨂽醶𠻺𠸏𠹷𠻻㗝𤷫㘉𠳖嚯𢞵𡃉𠸐𠹸𡁸𡅈𨈇𡑕𠹹𤹐𢶤婔𡀝𡀞𡃵𡃶垜𠸑"], -["8ba1","𧚔𨋍𠾵𠹻𥅾㜃𠾶𡆀𥋘𪊽𤧚𡠺𤅷𨉼墙剨㘚𥜽箲孨䠀䬬鼧䧧鰟鮍𥭴𣄽嗻㗲嚉丨夂𡯁屮靑𠂆乛亻㔾尣彑忄㣺扌攵歺氵氺灬爫丬犭𤣩罒礻糹罓𦉪㓁"], -["8bde","𦍋耂肀𦘒𦥑卝衤见𧢲讠贝钅镸长门𨸏韦页风飞饣𩠐鱼鸟黄歯龜丷𠂇阝户钢"], -["8c40","倻淾𩱳龦㷉袏𤅎灷峵䬠𥇍㕙𥴰愢𨨲辧釶熑朙玺𣊁𪄇㲋𡦀䬐磤琂冮𨜏䀉橣𪊺䈣蘏𠩯稪𩥇𨫪靕灍匤𢁾鏴盙𨧣龧矝亣俰傼丯众龨吴綋墒壐𡶶庒庙忂𢜒斋"], -["8ca1","𣏹椙橃𣱣泿"], -["8ca7","爀𤔅玌㻛𤨓嬕璹讃𥲤𥚕窓篬糃繬苸薗龩袐龪躹龫迏蕟駠鈡龬𨶹𡐿䁱䊢娚"], -["8cc9","顨杫䉶圽"], -["8cce","藖𤥻芿𧄍䲁𦵴嵻𦬕𦾾龭龮宖龯曧繛湗秊㶈䓃𣉖𢞖䎚䔶"], -["8ce6","峕𣬚諹屸㴒𣕑嵸龲煗䕘𤃬𡸣䱷㥸㑊𠆤𦱁諌侴𠈹妿腬顖𩣺弻"], -["8d40","𠮟"], -["8d42","𢇁𨥭䄂䚻𩁹㼇龳𪆵䃸㟖䛷𦱆䅼𨚲𧏿䕭㣔𥒚䕡䔛䶉䱻䵶䗪㿈𤬏㙡䓞䒽䇭崾嵈嵖㷼㠏嶤嶹㠠㠸幂庽弥徃㤈㤔㤿㥍惗愽峥㦉憷憹懏㦸戬抐拥挘㧸嚱"], -["8da1","㨃揢揻搇摚㩋擀崕嘡龟㪗斆㪽旿晓㫲暒㬢朖㭂枤栀㭘桊梄㭲㭱㭻椉楃牜楤榟榅㮼槖㯝橥橴橱檂㯬檙㯲檫檵櫔櫶殁毁毪汵沪㳋洂洆洦涁㳯涤涱渕渘温溆𨧀溻滢滚齿滨滩漤漴㵆𣽁澁澾㵪㵵熷岙㶊瀬㶑灐灔灯灿炉𠌥䏁㗱𠻘"], -["8e40","𣻗垾𦻓焾𥟠㙎榢𨯩孴穉𥣡𩓙穥穽𥦬窻窰竂竃燑𦒍䇊竚竝竪䇯咲𥰁笋筕笩𥌎𥳾箢筯莜𥮴𦱿篐萡箒箸𥴠㶭𥱥蒒篺簆簵𥳁籄粃𤢂粦晽𤕸糉糇糦籴糳糵糎"], -["8ea1","繧䔝𦹄絝𦻖璍綉綫焵綳緒𤁗𦀩緤㴓緵𡟹緥𨍭縝𦄡𦅚繮纒䌫鑬縧罀罁罇礶𦋐駡羗𦍑羣𡙡𠁨䕜𣝦䔃𨌺翺𦒉者耈耝耨耯𪂇𦳃耻耼聡𢜔䦉𦘦𣷣𦛨朥肧𨩈脇脚墰𢛶汿𦒘𤾸擧𡒊舘𡡞橓𤩥𤪕䑺舩𠬍𦩒𣵾俹𡓽蓢荢𦬊𤦧𣔰𡝳𣷸芪椛芳䇛"], -["8f40","蕋苐茚𠸖𡞴㛁𣅽𣕚艻苢茘𣺋𦶣𦬅𦮗𣗎㶿茝嗬莅䔋𦶥莬菁菓㑾𦻔橗蕚㒖𦹂𢻯葘𥯤葱㷓䓤檧葊𣲵祘蒨𦮖𦹷𦹃蓞萏莑䒠蒓蓤𥲑䉀𥳀䕃蔴嫲𦺙䔧蕳䔖枿蘖"], -["8fa1","𨘥𨘻藁𧂈蘂𡖂𧃍䕫䕪蘨㙈𡢢号𧎚虾蝱𪃸蟮𢰧螱蟚蠏噡虬桖䘏衅衆𧗠𣶹𧗤衞袜䙛袴袵揁装睷𧜏覇覊覦覩覧覼𨨥觧𧤤𧪽誜瞓釾誐𧩙竩𧬺𣾏䜓𧬸煼謌謟𥐰𥕥謿譌譍誩𤩺讐讛誯𡛟䘕衏貛𧵔𧶏貫㜥𧵓賖𧶘𧶽贒贃𡤐賛灜贑𤳉㻐起"], -["9040","趩𨀂𡀔𤦊㭼𨆼𧄌竧躭躶軃鋔輙輭𨍥𨐒辥錃𪊟𠩐辳䤪𨧞𨔽𣶻廸𣉢迹𪀔𨚼𨔁𢌥㦀𦻗逷𨔼𧪾遡𨕬𨘋邨𨜓郄𨛦邮都酧㫰醩釄粬𨤳𡺉鈎沟鉁鉢𥖹銹𨫆𣲛𨬌𥗛"], -["90a1","𠴱錬鍫𨫡𨯫炏嫃𨫢𨫥䥥鉄𨯬𨰹𨯿鍳鑛躼閅閦鐦閠濶䊹𢙺𨛘𡉼𣸮䧟氜陻隖䅬隣𦻕懚隶磵𨫠隽双䦡𦲸𠉴𦐐𩂯𩃥𤫑𡤕𣌊霱虂霶䨏䔽䖅𤫩灵孁霛靜𩇕靗孊𩇫靟鐥僐𣂷𣂼鞉鞟鞱鞾韀韒韠𥑬韮琜𩐳響韵𩐝𧥺䫑頴頳顋顦㬎𧅵㵑𠘰𤅜"], -["9140","𥜆飊颷飈飇䫿𦴧𡛓喰飡飦飬鍸餹𤨩䭲𩡗𩤅駵騌騻騐驘𥜥㛄𩂱𩯕髠髢𩬅髴䰎鬔鬭𨘀倴鬴𦦨㣃𣁽魐魀𩴾婅𡡣鮎𤉋鰂鯿鰌𩹨鷔𩾷𪆒𪆫𪃡𪄣𪇟鵾鶃𪄴鸎梈"], -["91a1","鷄𢅛𪆓𪈠𡤻𪈳鴹𪂹𪊴麐麕麞麢䴴麪麯𤍤黁㭠㧥㴝伲㞾𨰫鼂鼈䮖鐤𦶢鼗鼖鼹嚟嚊齅馸𩂋韲葿齢齩竜龎爖䮾𤥵𤦻煷𤧸𤍈𤩑玞𨯚𡣺禟𨥾𨸶鍩鏳𨩄鋬鎁鏋𨥬𤒹爗㻫睲穃烐𤑳𤏸煾𡟯炣𡢾𣖙㻇𡢅𥐯𡟸㜢𡛻𡠹㛡𡝴𡣑𥽋㜣𡛀坛𤨥𡏾𡊨"], -["9240","𡏆𡒶蔃𣚦蔃葕𤦔𧅥𣸱𥕜𣻻𧁒䓴𣛮𩦝𦼦柹㜳㰕㷧塬𡤢栐䁗𣜿𤃡𤂋𤄏𦰡哋嚞𦚱嚒𠿟𠮨𠸍鏆𨬓鎜仸儫㠙𤐶亼𠑥𠍿佋侊𥙑婨𠆫𠏋㦙𠌊𠐔㐵伩𠋀𨺳𠉵諚𠈌亘"], -["92a1","働儍侢伃𤨎𣺊佂倮偬傁俌俥偘僼兙兛兝兞湶𣖕𣸹𣺿浲𡢄𣺉冨凃𠗠䓝𠒣𠒒𠒑赺𨪜𠜎剙劤𠡳勡鍮䙺熌𤎌𠰠𤦬𡃤槑𠸝瑹㻞璙琔瑖玘䮎𤪼𤂍叐㖄爏𤃉喴𠍅响𠯆圝鉝雴鍦埝垍坿㘾壋媙𨩆𡛺𡝯𡜐娬妸銏婾嫏娒𥥆𡧳𡡡𤊕㛵洅瑃娡𥺃"], -["9340","媁𨯗𠐓鏠璌𡌃焅䥲鐈𨧻鎽㞠尞岞幞幈𡦖𡥼𣫮廍孏𡤃𡤄㜁𡢠㛝𡛾㛓脪𨩇𡶺𣑲𨦨弌弎𡤧𡞫婫𡜻孄蘔𧗽衠恾𢡠𢘫忛㺸𢖯𢖾𩂈𦽳懀𠀾𠁆𢘛憙憘恵𢲛𢴇𤛔𩅍"], -["93a1","摱𤙥𢭪㨩𢬢𣑐𩣪𢹸挷𪑛撶挱揑𤧣𢵧护𢲡搻敫楲㯴𣂎𣊭𤦉𣊫唍𣋠𡣙𩐿曎𣊉𣆳㫠䆐𥖄𨬢𥖏𡛼𥕛𥐥磮𣄃𡠪𣈴㑤𣈏𣆂𤋉暎𦴤晫䮓昰𧡰𡷫晣𣋒𣋡昞𥡲㣑𣠺𣞼㮙𣞢𣏾瓐㮖枏𤘪梶栞㯄檾㡣𣟕𤒇樳橒櫉欅𡤒攑梘橌㯗橺歗𣿀𣲚鎠鋲𨯪𨫋"], -["9440","銉𨀞𨧜鑧涥漋𤧬浧𣽿㶏渄𤀼娽渊塇洤硂焻𤌚𤉶烱牐犇犔𤞏𤜥兹𤪤𠗫瑺𣻸𣙟𤩊𤤗𥿡㼆㺱𤫟𨰣𣼵悧㻳瓌琼鎇琷䒟𦷪䕑疃㽣𤳙𤴆㽘畕癳𪗆㬙瑨𨫌𤦫𤦎㫻"], -["94a1","㷍𤩎㻿𤧅𤣳釺圲鍂𨫣𡡤僟𥈡𥇧睸𣈲眎眏睻𤚗𣞁㩞𤣰琸璛㺿𤪺𤫇䃈𤪖𦆮錇𥖁砞碍碈磒珐祙𧝁𥛣䄎禛蒖禥樭𣻺稺秴䅮𡛦䄲鈵秱𠵌𤦌𠊙𣶺𡝮㖗啫㕰㚪𠇔𠰍竢婙𢛵𥪯𥪜娍𠉛磰娪𥯆竾䇹籝籭䈑𥮳𥺼𥺦糍𤧹𡞰粎籼粮檲緜縇緓罎𦉡"], -["9540","𦅜𧭈綗𥺂䉪𦭵𠤖柖𠁎𣗏埄𦐒𦏸𤥢翝笧𠠬𥫩𥵃笌𥸎駦虅驣樜𣐿㧢𤧷𦖭騟𦖠蒀𧄧𦳑䓪脷䐂胆脉腂𦞴飃𦩂艢艥𦩑葓𦶧蘐𧈛媆䅿𡡀嬫𡢡嫤𡣘蚠蜨𣶏蠭𧐢娂"], -["95a1","衮佅袇袿裦襥襍𥚃襔𧞅𧞄𨯵𨯙𨮜𨧹㺭蒣䛵䛏㟲訽訜𩑈彍鈫𤊄旔焩烄𡡅鵭貟賩𧷜妚矃姰䍮㛔踪躧𤰉輰轊䋴汘澻𢌡䢛潹溋𡟚鯩㚵𤤯邻邗啱䤆醻鐄𨩋䁢𨫼鐧𨰝𨰻蓥訫閙閧閗閖𨴴瑅㻂𤣿𤩂𤏪㻧𣈥随𨻧𨹦𨹥㻌𤧭𤩸𣿮琒瑫㻼靁𩂰"], -["9640","桇䨝𩂓𥟟靝鍨𨦉𨰦𨬯𦎾銺嬑譩䤼珹𤈛鞛靱餸𠼦巁𨯅𤪲頟𩓚鋶𩗗釥䓀𨭐𤩧𨭤飜𨩅㼀鈪䤥萔餻饍𧬆㷽馛䭯馪驜𨭥𥣈檏騡嫾騯𩣱䮐𩥈馼䮽䮗鍽塲𡌂堢𤦸"], -["96a1","𡓨硄𢜟𣶸棅㵽鑘㤧慐𢞁𢥫愇鱏鱓鱻鰵鰐魿鯏𩸭鮟𪇵𪃾鴡䲮𤄄鸘䲰鴌𪆴𪃭𪃳𩤯鶥蒽𦸒𦿟𦮂藼䔳𦶤𦺄𦷰萠藮𦸀𣟗𦁤秢𣖜𣙀䤭𤧞㵢鏛銾鍈𠊿碹鉷鑍俤㑀遤𥕝砽硔碶硋𡝗𣇉𤥁㚚佲濚濙瀞瀞吔𤆵垻壳垊鴖埗焴㒯𤆬燫𦱀𤾗嬨𡞵𨩉"], -["9740","愌嫎娋䊼𤒈㜬䭻𨧼鎻鎸𡣖𠼝葲𦳀𡐓𤋺𢰦𤏁妔𣶷𦝁綨𦅛𦂤𤦹𤦋𨧺鋥珢㻩璴𨭣𡢟㻡𤪳櫘珳珻㻖𤨾𤪔𡟙𤩦𠎧𡐤𤧥瑈𤤖炥𤥶銄珦鍟𠓾錱𨫎𨨖鎆𨯧𥗕䤵𨪂煫"], -["97a1","𤥃𠳿嚤𠘚𠯫𠲸唂秄𡟺緾𡛂𤩐𡡒䔮鐁㜊𨫀𤦭妰𡢿𡢃𧒄媡㛢𣵛㚰鉟婹𨪁𡡢鍴㳍𠪴䪖㦊僴㵩㵌𡎜煵䋻𨈘渏𩃤䓫浗𧹏灧沯㳖𣿭𣸭渂漌㵯𠏵畑㚼㓈䚀㻚䡱姄鉮䤾轁𨰜𦯀堒埈㛖𡑒烾𤍢𤩱𢿣𡊰𢎽梹楧𡎘𣓥𧯴𣛟𨪃𣟖𣏺𤲟樚𣚭𦲷萾䓟䓎"], -["9840","𦴦𦵑𦲂𦿞漗𧄉茽𡜺菭𦲀𧁓𡟛妉媂𡞳婡婱𡤅𤇼㜭姯𡜼㛇熎鎐暚𤊥婮娫𤊓樫𣻹𧜶𤑛𤋊焝𤉙𨧡侰𦴨峂𤓎𧹍𤎽樌𤉖𡌄炦焳𤏩㶥泟勇𤩏繥姫崯㷳彜𤩝𡟟綤萦"], -["98a1","咅𣫺𣌀𠈔坾𠣕𠘙㿥𡾞𪊶瀃𩅛嵰玏糓𨩙𩐠俈翧狍猐𧫴猸猹𥛶獁獈㺩𧬘遬燵𤣲珡臶㻊県㻑沢国琙琞琟㻢㻰㻴㻺瓓㼎㽓畂畭畲疍㽼痈痜㿀癍㿗癴㿜発𤽜熈嘣覀塩䀝睃䀹条䁅㗛瞘䁪䁯属瞾矋売砘点砜䂨砹硇硑硦葈𥔵礳栃礲䄃"], -["9940","䄉禑禙辻稆込䅧窑䆲窼艹䇄竏竛䇏両筢筬筻簒簛䉠䉺类粜䊌粸䊔糭输烀𠳏総緔緐緽羮羴犟䎗耠耥笹耮耱联㷌垴炠肷胩䏭脌猪脎脒畠脔䐁㬹腖腙腚"], -["99a1","䐓堺腼膄䐥膓䐭膥埯臁臤艔䒏芦艶苊苘苿䒰荗险榊萅烵葤惣蒈䔄蒾蓡蓸蔐蔸蕒䔻蕯蕰藠䕷虲蚒蚲蛯际螋䘆䘗袮裿褤襇覑𧥧訩訸誔誴豑賔賲贜䞘塟跃䟭仮踺嗘坔蹱嗵躰䠷軎転軤軭軲辷迁迊迌逳駄䢭飠鈓䤞鈨鉘鉫銱銮銿"], -["9a40","鋣鋫鋳鋴鋽鍃鎄鎭䥅䥑麿鐗匁鐝鐭鐾䥪鑔鑹锭関䦧间阳䧥枠䨤靀䨵鞲韂噔䫤惨颹䬙飱塄餎餙冴餜餷饂饝饢䭰駅䮝騼鬏窃魩鮁鯝鯱鯴䱭鰠㝯𡯂鵉鰺"], -["9aa1","黾噐鶓鶽鷀鷼银辶鹻麬麱麽黆铜黢黱黸竈齄𠂔𠊷𠎠椚铃妬𠓗塀铁㞹𠗕𠘕𠙶𡚺块煳𠫂𠫍𠮿呪吆𠯋咞𠯻𠰻𠱓𠱥𠱼惧𠲍噺𠲵𠳝𠳭𠵯𠶲𠷈楕鰯螥𠸄𠸎𠻗𠾐𠼭𠹳尠𠾼帋𡁜𡁏𡁶朞𡁻𡂈𡂖㙇𡂿𡃓𡄯𡄻卤蒭𡋣𡍵𡌶讁𡕷𡘙𡟃𡟇乸炻𡠭𡥪"], -["9b40","𡨭𡩅𡰪𡱰𡲬𡻈拃𡻕𡼕熘桕𢁅槩㛈𢉼𢏗𢏺𢜪𢡱𢥏苽𢥧𢦓𢫕覥𢫨辠𢬎鞸𢬿顇骽𢱌"], -["9b62","𢲈𢲷𥯨𢴈𢴒𢶷𢶕𢹂𢽴𢿌𣀳𣁦𣌟𣏞徱晈暿𧩹𣕧𣗳爁𤦺矗𣘚𣜖纇𠍆墵朎"], -["9ba1","椘𣪧𧙗𥿢𣸑𣺹𧗾𢂚䣐䪸𤄙𨪚𤋮𤌍𤀻𤌴𤎖𤩅𠗊凒𠘑妟𡺨㮾𣳿𤐄𤓖垈𤙴㦛𤜯𨗨𩧉㝢𢇃譞𨭎駖𤠒𤣻𤨕爉𤫀𠱸奥𤺥𤾆𠝹軚𥀬劏圿煱𥊙𥐙𣽊𤪧喼𥑆𥑮𦭒釔㑳𥔿𧘲𥕞䜘𥕢𥕦𥟇𤤿𥡝偦㓻𣏌惞𥤃䝼𨥈𥪮𥮉𥰆𡶐垡煑澶𦄂𧰒遖𦆲𤾚譢𦐂𦑊"], -["9c40","嵛𦯷輶𦒄𡤜諪𤧶𦒈𣿯𦔒䯀𦖿𦚵𢜛鑥𥟡憕娧晉侻嚹𤔡𦛼乪𤤴陖涏𦲽㘘襷𦞙𦡮𦐑𦡞營𦣇筂𩃀𠨑𦤦鄄𦤹穅鷰𦧺騦𦨭㙟𦑩𠀡禃𦨴𦭛崬𣔙菏𦮝䛐𦲤画补𦶮墶"], -["9ca1","㜜𢖍𧁋𧇍㱔𧊀𧊅銁𢅺𧊋錰𧋦𤧐氹钟𧑐𠻸蠧裵𢤦𨑳𡞱溸𤨪𡠠㦤㚹尐秣䔿暶𩲭𩢤襃𧟌𧡘囖䃟𡘊㦡𣜯𨃨𡏅熭荦𧧝𩆨婧䲷𧂯𨦫𧧽𧨊𧬋𧵦𤅺筃祾𨀉澵𪋟樃𨌘厢𦸇鎿栶靝𨅯𨀣𦦵𡏭𣈯𨁈嶅𨰰𨂃圕頣𨥉嶫𤦈斾槕叒𤪥𣾁㰑朶𨂐𨃴𨄮𡾡𨅏"], -["9d40","𨆉𨆯𨈚𨌆𨌯𨎊㗊𨑨𨚪䣺揦𨥖砈鉕𨦸䏲𨧧䏟𨧨𨭆𨯔姸𨰉輋𨿅𩃬筑𩄐𩄼㷷𩅞𤫊运犏嚋𩓧𩗩𩖰𩖸𩜲𩣑𩥉𩥪𩧃𩨨𩬎𩵚𩶛纟𩻸𩼣䲤镇𪊓熢𪋿䶑递𪗋䶜𠲜达嗁"], -["9da1","辺𢒰边𤪓䔉繿潖檱仪㓤𨬬𧢝㜺躀𡟵𨀤𨭬𨮙𧨾𦚯㷫𧙕𣲷𥘵𥥖亚𥺁𦉘嚿𠹭踎孭𣺈𤲞揞拐𡟶𡡻攰嘭𥱊吚𥌑㷆𩶘䱽嘢嘞罉𥻘奵𣵀蝰东𠿪𠵉𣚺脗鵞贘瘻鱅癎瞹鍅吲腈苷嘥脲萘肽嗪祢噃吖𠺝㗎嘅嗱曱𨋢㘭甴嗰喺咗啲𠱁𠲖廐𥅈𠹶𢱢"], -["9e40","𠺢麫絚嗞𡁵抝靭咔賍燶酶揼掹揾啩𢭃鱲𢺳冚㓟𠶧冧呍唞唓癦踭𦢊疱肶蠄螆裇膶萜𡃁䓬猄𤜆宐茋𦢓噻𢛴𧴯𤆣𧵳𦻐𧊶酰𡇙鈈𣳼𪚩𠺬𠻹牦𡲢䝎𤿂𧿹𠿫䃺"], -["9ea1","鱝攟𢶠䣳𤟠𩵼𠿬𠸊恢𧖣𠿭"], -["9ead","𦁈𡆇熣纎鵐业丄㕷嬍沲卧㚬㧜卽㚥𤘘墚𤭮舭呋垪𥪕𠥹"], -["9ec5","㩒𢑥獴𩺬䴉鯭𣳾𩼰䱛𤾩𩖞𩿞葜𣶶𧊲𦞳𣜠挮紥𣻷𣸬㨪逈勌㹴㙺䗩𠒎癀嫰𠺶硺𧼮墧䂿噼鮋嵴癔𪐴麅䳡痹㟻愙𣃚𤏲"], -["9ef5","噝𡊩垧𤥣𩸆刴𧂮㖭汊鵼"], -["9f40","籖鬹埞𡝬屓擓𩓐𦌵𧅤蚭𠴨𦴢𤫢𠵱"], -["9f4f","凾𡼏嶎霃𡷑麁遌笟鬂峑箣扨挵髿篏鬪籾鬮籂粆鰕篼鬉鼗鰛𤤾齚啳寃俽麘俲剠㸆勑坧偖妷帒韈鶫轜呩鞴饀鞺匬愰"], -["9fa1","椬叚鰊鴂䰻陁榀傦畆𡝭駚剳"], -["9fae","酙隁酜"], -["9fb2","酑𨺗捿𦴣櫊嘑醎畺抅𠏼獏籰𥰡𣳽"], -["9fc1","𤤙盖鮝个𠳔莾衂"], -["9fc9","届槀僭坺刟巵从氱𠇲伹咜哚劚趂㗾弌㗳"], -["9fdb","歒酼龥鮗頮颴骺麨麄煺笔"], -["9fe7","毺蠘罸"], -["9feb","嘠𪙊蹷齓"], -["9ff0","跔蹏鸜踁抂𨍽踨蹵竓𤩷稾磘泪詧瘇"], -["a040","𨩚鼦泎蟖痃𪊲硓咢贌狢獱謭猂瓱賫𤪻蘯徺袠䒷"], -["a055","𡠻𦸅"], -["a058","詾𢔛"], -["a05b","惽癧髗鵄鍮鮏蟵"], -["a063","蠏賷猬霡鮰㗖犲䰇籑饊𦅙慙䰄麖慽"], -["a073","坟慯抦戹拎㩜懢厪𣏵捤栂㗒"], -["a0a1","嵗𨯂迚𨸹"], -["a0a6","僙𡵆礆匲阸𠼻䁥"], -["a0ae","矾"], -["a0b0","糂𥼚糚稭聦聣絍甅瓲覔舚朌聢𧒆聛瓰脃眤覉𦟌畓𦻑螩蟎臈螌詉貭譃眫瓸蓚㘵榲趦"], -["a0d4","覩瑨涹蟁𤀑瓧㷛煶悤憜㳑煢恷"], -["a0e2","罱𨬭牐惩䭾删㰘𣳇𥻗𧙖𥔱𡥄𡋾𩤃𦷜𧂭峁𦆭𨨏𣙷𠃮𦡆𤼎䕢嬟𦍌齐麦𦉫"], -["a3c0","␀",31,"␡"], -["c6a1","①",9,"⑴",9,"ⅰ",9,"丶丿亅亠冂冖冫勹匸卩厶夊宀巛⼳广廴彐彡攴无疒癶辵隶¨ˆヽヾゝゞ〃仝々〆〇ー[]✽ぁ",23], -["c740","す",58,"ァアィイ"], -["c7a1","ゥ",81,"А",5,"ЁЖ",4], -["c840","Л",26,"ёж",25,"⇧↸↹㇏𠃌乚𠂊刂䒑"], -["c8a1","龰冈龱𧘇"], -["c8cd","¬¦'"㈱№℡゛゜⺀⺄⺆⺇⺈⺊⺌⺍⺕⺜⺝⺥⺧⺪⺬⺮⺶⺼⺾⻆⻊⻌⻍⻏⻖⻗⻞⻣"], -["c8f5","ʃɐɛɔɵœøŋʊɪ"], -["f9fe","■"], -["fa40","𠕇鋛𠗟𣿅蕌䊵珯况㙉𤥂𨧤鍄𡧛苮𣳈砼杄拟𤤳𨦪𠊠𦮳𡌅侫𢓭倈𦴩𧪄𣘀𤪱𢔓倩𠍾徤𠎀𠍇滛𠐟偽儁㑺儎顬㝃萖𤦤𠒇兠𣎴兪𠯿𢃼𠋥𢔰𠖎𣈳𡦃宂蝽𠖳𣲙冲冸"], -["faa1","鴴凉减凑㳜凓𤪦决凢卂凭菍椾𣜭彻刋刦刼劵剗劔効勅簕蕂勠蘍𦬓包𨫞啉滙𣾀𠥔𣿬匳卄𠯢泋𡜦栛珕恊㺪㣌𡛨燝䒢卭却𨚫卾卿𡖖𡘓矦厓𨪛厠厫厮玧𥝲㽙玜叁叅汉义埾叙㪫𠮏叠𣿫𢶣叶𠱷吓灹唫晗浛呭𦭓𠵴啝咏咤䞦𡜍𠻝㶴𠵍"], -["fb40","𨦼𢚘啇䳭启琗喆喩嘅𡣗𤀺䕒𤐵暳𡂴嘷曍𣊊暤暭噍噏磱囱鞇叾圀囯园𨭦㘣𡉏坆𤆥汮炋坂㚱𦱾埦𡐖堃𡑔𤍣堦𤯵塜墪㕡壠壜𡈼壻寿坃𪅐𤉸鏓㖡够梦㛃湙"], -["fba1","𡘾娤啓𡚒蔅姉𠵎𦲁𦴪𡟜姙𡟻𡞲𦶦浱𡠨𡛕姹𦹅媫婣㛦𤦩婷㜈媖瑥嫓𦾡𢕔㶅𡤑㜲𡚸広勐孶斈孼𧨎䀄䡝𠈄寕慠𡨴𥧌𠖥寳宝䴐尅𡭄尓珎尔𡲥𦬨屉䣝岅峩峯嶋𡷹𡸷崐崘嵆𡺤岺巗苼㠭𤤁𢁉𢅳芇㠶㯂帮檊幵幺𤒼𠳓厦亷廐厨𡝱帉廴𨒂"], -["fc40","廹廻㢠廼栾鐛弍𠇁弢㫞䢮𡌺强𦢈𢏐彘𢑱彣鞽𦹮彲鍀𨨶徧嶶㵟𥉐𡽪𧃸𢙨釖𠊞𨨩怱暅𡡷㥣㷇㘹垐𢞴祱㹀悞悤悳𤦂𤦏𧩓璤僡媠慤萤慂慈𦻒憁凴𠙖憇宪𣾷"], -["fca1","𢡟懓𨮝𩥝懐㤲𢦀𢣁怣慜攞掋𠄘担𡝰拕𢸍捬𤧟㨗搸揸𡎎𡟼撐澊𢸶頔𤂌𥜝擡擥鑻㩦携㩗敍漖𤨨𤨣斅敭敟𣁾斵𤥀䬷旑䃘𡠩无旣忟𣐀昘𣇷𣇸晄𣆤𣆥晋𠹵晧𥇦晳晴𡸽𣈱𨗴𣇈𥌓矅𢣷馤朂𤎜𤨡㬫槺𣟂杞杧杢𤇍𩃭柗䓩栢湐鈼栁𣏦𦶠桝"], -["fd40","𣑯槡樋𨫟楳棃𣗍椁椀㴲㨁𣘼㮀枬楡𨩊䋼椶榘㮡𠏉荣傐槹𣙙𢄪橅𣜃檝㯳枱櫈𩆜㰍欝𠤣惞欵歴𢟍溵𣫛𠎵𡥘㝀吡𣭚毡𣻼毜氷𢒋𤣱𦭑汚舦汹𣶼䓅𣶽𤆤𤤌𤤀"], -["fda1","𣳉㛥㳫𠴲鮃𣇹𢒑羏样𦴥𦶡𦷫涖浜湼漄𤥿𤂅𦹲蔳𦽴凇沜渝萮𨬡港𣸯瑓𣾂秌湏媑𣁋濸㜍澝𣸰滺𡒗𤀽䕕鏰潄潜㵎潴𩅰㴻澟𤅄濓𤂑𤅕𤀹𣿰𣾴𤄿凟𤅖𤅗𤅀𦇝灋灾炧炁烌烕烖烟䄄㷨熴熖𤉷焫煅媈煊煮岜𤍥煏鍢𤋁焬𤑚𤨧𤨢熺𨯨炽爎"], -["fe40","鑂爕夑鑃爤鍁𥘅爮牀𤥴梽牕牗㹕𣁄栍漽犂猪猫𤠣𨠫䣭𨠄猨献珏玪𠰺𦨮珉瑉𤇢𡛧𤨤昣㛅𤦷𤦍𤧻珷琕椃𤨦琹𠗃㻗瑜𢢭瑠𨺲瑇珤瑶莹瑬㜰瑴鏱樬璂䥓𤪌"], -["fea1","𤅟𤩹𨮏孆𨰃𡢞瓈𡦈甎瓩甞𨻙𡩋寗𨺬鎅畍畊畧畮𤾂㼄𤴓疎瑝疞疴瘂瘬癑癏癯癶𦏵皐臯㟸𦤑𦤎皡皥皷盌𦾟葢𥂝𥅽𡸜眞眦着撯𥈠睘𣊬瞯𨥤𨥨𡛁矴砉𡍶𤨒棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗禝𧬹礼禩渪𧄦㺨秆𩄍秔"] -] diff --git a/node_modules/iconv-lite/encodings/tables/cp936.json b/node_modules/iconv-lite/encodings/tables/cp936.json deleted file mode 100644 index 49ddb9a..0000000 --- a/node_modules/iconv-lite/encodings/tables/cp936.json +++ /dev/null @@ -1,264 +0,0 @@ -[ -["0","\u0000",127,"€"], -["8140","丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪",5,"乲乴",9,"乿",6,"亇亊"], -["8180","亐亖亗亙亜亝亞亣亪亯亰亱亴亶亷亸亹亼亽亾仈仌仏仐仒仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂",6,"伋伌伒",4,"伜伝伡伣伨伩伬伭伮伱伳伵伷伹伻伾",4,"佄佅佇",5,"佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀侁侂侅來侇侊侌侎侐侒侓侕侖侘侙侚侜侞侟価侢"], -["8240","侤侫侭侰",4,"侶",8,"俀俁係俆俇俈俉俋俌俍俒",4,"俙俛俠俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿",11], -["8280","個倎倐們倓倕倖倗倛倝倞倠倢倣値倧倫倯",10,"倻倽倿偀偁偂偄偅偆偉偊偋偍偐",4,"偖偗偘偙偛偝",7,"偦",5,"偭",8,"偸偹偺偼偽傁傂傃傄傆傇傉傊傋傌傎",20,"傤傦傪傫傭",4,"傳",6,"傼"], -["8340","傽",17,"僐",5,"僗僘僙僛",10,"僨僩僪僫僯僰僱僲僴僶",4,"僼",9,"儈"], -["8380","儉儊儌",5,"儓",13,"儢",28,"兂兇兊兌兎兏児兒兓兗兘兙兛兝",4,"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎冏冐冑冓冔冘冚冝冞冟冡冣冦",4,"冭冮冴冸冹冺冾冿凁凂凃凅凈凊凍凎凐凒",5], -["8440","凘凙凚凜凞凟凢凣凥",5,"凬凮凱凲凴凷凾刄刅刉刋刌刏刐刓刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄",5,"剋剎剏剒剓剕剗剘"], -["8480","剙剚剛剝剟剠剢剣剤剦剨剫剬剭剮剰剱剳",9,"剾劀劃",4,"劉",6,"劑劒劔",6,"劜劤劥劦劧劮劯劰労",9,"勀勁勂勄勅勆勈勊勌勍勎勏勑勓勔動勗務",5,"勠勡勢勣勥",10,"勱",7,"勻勼勽匁匂匃匄匇匉匊匋匌匎"], -["8540","匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬匭匯",9,"匼匽區卂卄卆卋卌卍卐協単卙卛卝卥卨卪卬卭卲卶卹卻卼卽卾厀厁厃厇厈厊厎厏"], -["8580","厐",4,"厖厗厙厛厜厞厠厡厤厧厪厫厬厭厯",6,"厷厸厹厺厼厽厾叀參",4,"収叏叐叒叓叕叚叜叝叞叡叢叧叴叺叾叿吀吂吅吇吋吔吘吙吚吜吢吤吥吪吰吳吶吷吺吽吿呁呂呄呅呇呉呌呍呎呏呑呚呝",4,"呣呥呧呩",7,"呴呹呺呾呿咁咃咅咇咈咉咊咍咑咓咗咘咜咞咟咠咡"], -["8640","咢咥咮咰咲咵咶咷咹咺咼咾哃哅哊哋哖哘哛哠",4,"哫哬哯哰哱哴",5,"哻哾唀唂唃唄唅唈唊",4,"唒唓唕",5,"唜唝唞唟唡唥唦"], -["8680","唨唩唫唭唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋",4,"啑啒啓啔啗",4,"啝啞啟啠啢啣啨啩啫啯",5,"啹啺啽啿喅喆喌喍喎喐喒喓喕喖喗喚喛喞喠",6,"喨",8,"喲喴営喸喺喼喿",4,"嗆嗇嗈嗊嗋嗎嗏嗐嗕嗗",4,"嗞嗠嗢嗧嗩嗭嗮嗰嗱嗴嗶嗸",4,"嗿嘂嘃嘄嘅"], -["8740","嘆嘇嘊嘋嘍嘐",7,"嘙嘚嘜嘝嘠嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀",11,"噏",4,"噕噖噚噛噝",4], -["8780","噣噥噦噧噭噮噯噰噲噳噴噵噷噸噹噺噽",7,"嚇",6,"嚐嚑嚒嚔",14,"嚤",10,"嚰",6,"嚸嚹嚺嚻嚽",12,"囋",8,"囕囖囘囙囜団囥",5,"囬囮囯囲図囶囷囸囻囼圀圁圂圅圇國",6], -["8840","園",9,"圝圞圠圡圢圤圥圦圧圫圱圲圴",4,"圼圽圿坁坃坄坅坆坈坉坋坒",4,"坘坙坢坣坥坧坬坮坰坱坲坴坵坸坹坺坽坾坿垀"], -["8880","垁垇垈垉垊垍",4,"垔",6,"垜垝垞垟垥垨垪垬垯垰垱垳垵垶垷垹",8,"埄",6,"埌埍埐埑埓埖埗埛埜埞埡埢埣埥",7,"埮埰埱埲埳埵埶執埻埼埾埿堁堃堄堅堈堉堊堌堎堏堐堒堓堔堖堗堘堚堛堜堝堟堢堣堥",4,"堫",4,"報堲堳場堶",7], -["8940","堾",5,"塅",6,"塎塏塐塒塓塕塖塗塙",4,"塟",5,"塦",4,"塭",16,"塿墂墄墆墇墈墊墋墌"], -["8980","墍",4,"墔",4,"墛墜墝墠",7,"墪",17,"墽墾墿壀壂壃壄壆",10,"壒壓壔壖",13,"壥",5,"壭壯壱売壴壵壷壸壺",7,"夃夅夆夈",4,"夎夐夑夒夓夗夘夛夝夞夠夡夢夣夦夨夬夰夲夳夵夶夻"], -["8a40","夽夾夿奀奃奅奆奊奌奍奐奒奓奙奛",4,"奡奣奤奦",12,"奵奷奺奻奼奾奿妀妅妉妋妌妎妏妐妑妔妕妘妚妛妜妝妟妠妡妢妦"], -["8a80","妧妬妭妰妱妳",5,"妺妼妽妿",6,"姇姈姉姌姍姎姏姕姖姙姛姞",4,"姤姦姧姩姪姫姭",11,"姺姼姽姾娀娂娊娋娍娎娏娐娒娔娕娖娗娙娚娛娝娞娡娢娤娦娧娨娪",6,"娳娵娷",4,"娽娾娿婁",4,"婇婈婋",9,"婖婗婘婙婛",5], -["8b40","婡婣婤婥婦婨婩婫",8,"婸婹婻婼婽婾媀",17,"媓",6,"媜",13,"媫媬"], -["8b80","媭",4,"媴媶媷媹",4,"媿嫀嫃",5,"嫊嫋嫍",4,"嫓嫕嫗嫙嫚嫛嫝嫞嫟嫢嫤嫥嫧嫨嫪嫬",4,"嫲",22,"嬊",11,"嬘",25,"嬳嬵嬶嬸",7,"孁",6], -["8c40","孈",7,"孒孖孞孠孡孧孨孫孭孮孯孲孴孶孷學孹孻孼孾孿宂宆宊宍宎宐宑宒宔宖実宧宨宩宬宭宮宯宱宲宷宺宻宼寀寁寃寈寉寊寋寍寎寏"], -["8c80","寑寔",8,"寠寢寣實寧審",4,"寯寱",6,"寽対尀専尃尅將專尋尌對導尐尒尓尗尙尛尞尟尠尡尣尦尨尩尪尫尭尮尯尰尲尳尵尶尷屃屄屆屇屌屍屒屓屔屖屗屘屚屛屜屝屟屢層屧",6,"屰屲",6,"屻屼屽屾岀岃",4,"岉岊岋岎岏岒岓岕岝",4,"岤",4], -["8d40","岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅",5,"峌",5,"峓",5,"峚",6,"峢峣峧峩峫峬峮峯峱",9,"峼",4], -["8d80","崁崄崅崈",5,"崏",4,"崕崗崘崙崚崜崝崟",4,"崥崨崪崫崬崯",4,"崵",7,"崿",7,"嵈嵉嵍",10,"嵙嵚嵜嵞",10,"嵪嵭嵮嵰嵱嵲嵳嵵",12,"嶃",21,"嶚嶛嶜嶞嶟嶠"], -["8e40","嶡",21,"嶸",12,"巆",6,"巎",12,"巜巟巠巣巤巪巬巭"], -["8e80","巰巵巶巸",4,"巿帀帄帇帉帊帋帍帎帒帓帗帞",7,"帨",4,"帯帰帲",4,"帹帺帾帿幀幁幃幆",5,"幍",6,"幖",4,"幜幝幟幠幣",14,"幵幷幹幾庁庂広庅庈庉庌庍庎庒庘庛庝庡庢庣庤庨",4,"庮",4,"庴庺庻庼庽庿",6], -["8f40","廆廇廈廋",5,"廔廕廗廘廙廚廜",11,"廩廫",8,"廵廸廹廻廼廽弅弆弇弉弌弍弎弐弒弔弖弙弚弜弝弞弡弢弣弤"], -["8f80","弨弫弬弮弰弲",6,"弻弽弾弿彁",14,"彑彔彙彚彛彜彞彟彠彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿徃徆徍徎徏徑従徔徖徚徛徝從徟徠徢",5,"復徫徬徯",5,"徶徸徹徺徻徾",4,"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇"], -["9040","怈怉怋怌怐怑怓怗怘怚怞怟怢怣怤怬怭怮怰",4,"怶",4,"怽怾恀恄",6,"恌恎恏恑恓恔恖恗恘恛恜恞恟恠恡恥恦恮恱恲恴恵恷恾悀"], -["9080","悁悂悅悆悇悈悊悋悎悏悐悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽",7,"惇惈惉惌",4,"惒惓惔惖惗惙惛惞惡",4,"惪惱惲惵惷惸惻",4,"愂愃愄愅愇愊愋愌愐",4,"愖愗愘愙愛愜愝愞愡愢愥愨愩愪愬",18,"慀",6], -["9140","慇慉態慍慏慐慒慓慔慖",6,"慞慟慠慡慣慤慥慦慩",6,"慱慲慳慴慶慸",18,"憌憍憏",4,"憕"], -["9180","憖",6,"憞",8,"憪憫憭",9,"憸",5,"憿懀懁懃",4,"應懌",4,"懓懕",16,"懧",13,"懶",8,"戀",5,"戇戉戓戔戙戜戝戞戠戣戦戧戨戩戫戭戯戰戱戲戵戶戸",4,"扂扄扅扆扊"], -["9240","扏扐払扖扗扙扚扜",6,"扤扥扨扱扲扴扵扷扸扺扻扽抁抂抃抅抆抇抈抋",5,"抔抙抜抝択抣抦抧抩抪抭抮抯抰抲抳抴抶抷抸抺抾拀拁"], -["9280","拃拋拏拑拕拝拞拠拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌挍挏挐挒挓挔挕挗挘挙挜挦挧挩挬挭挮挰挱挳",5,"挻挼挾挿捀捁捄捇捈捊捑捒捓捔捖",7,"捠捤捥捦捨捪捫捬捯捰捲捳捴捵捸捹捼捽捾捿掁掃掄掅掆掋掍掑掓掔掕掗掙",6,"採掤掦掫掯掱掲掵掶掹掻掽掿揀"], -["9340","揁揂揃揅揇揈揊揋揌揑揓揔揕揗",6,"揟揢揤",4,"揫揬揮揯揰揱揳揵揷揹揺揻揼揾搃搄搆",4,"損搎搑搒搕",5,"搝搟搢搣搤"], -["9380","搥搧搨搩搫搮",5,"搵",4,"搻搼搾摀摂摃摉摋",6,"摓摕摖摗摙",4,"摟",7,"摨摪摫摬摮",9,"摻",6,"撃撆撈",8,"撓撔撗撘撚撛撜撝撟",4,"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿擁擃擄擆",6,"擏擑擓擔擕擖擙據"], -["9440","擛擜擝擟擠擡擣擥擧",24,"攁",7,"攊",7,"攓",4,"攙",8], -["9480","攢攣攤攦",4,"攬攭攰攱攲攳攷攺攼攽敀",4,"敆敇敊敋敍敎敐敒敓敔敗敘敚敜敟敠敡敤敥敧敨敩敪敭敮敯敱敳敵敶數",14,"斈斉斊斍斎斏斒斔斕斖斘斚斝斞斠斢斣斦斨斪斬斮斱",7,"斺斻斾斿旀旂旇旈旉旊旍旐旑旓旔旕旘",7,"旡旣旤旪旫"], -["9540","旲旳旴旵旸旹旻",4,"昁昄昅昇昈昉昋昍昐昑昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷",4,"昽昿晀時晄",6,"晍晎晐晑晘"], -["9580","晙晛晜晝晞晠晢晣晥晧晩",4,"晱晲晳晵晸晹晻晼晽晿暀暁暃暅暆暈暉暊暋暍暎暏暐暒暓暔暕暘",4,"暞",8,"暩",4,"暯",4,"暵暶暷暸暺暻暼暽暿",25,"曚曞",7,"曧曨曪",5,"曱曵曶書曺曻曽朁朂會"], -["9640","朄朅朆朇朌朎朏朑朒朓朖朘朙朚朜朞朠",5,"朧朩朮朰朲朳朶朷朸朹朻朼朾朿杁杄杅杇杊杋杍杒杔杕杗",4,"杝杢杣杤杦杧杫杬杮東杴杶"], -["9680","杸杹杺杻杽枀枂枃枅枆枈枊枌枍枎枏枑枒枓枔枖枙枛枟枠枡枤枦枩枬枮枱枲枴枹",7,"柂柅",9,"柕柖柗柛柟柡柣柤柦柧柨柪柫柭柮柲柵",7,"柾栁栂栃栄栆栍栐栒栔栕栘",4,"栞栟栠栢",6,"栫",6,"栴栵栶栺栻栿桇桋桍桏桒桖",5], -["9740","桜桝桞桟桪桬",7,"桵桸",8,"梂梄梇",7,"梐梑梒梔梕梖梘",9,"梣梤梥梩梪梫梬梮梱梲梴梶梷梸"], -["9780","梹",6,"棁棃",5,"棊棌棎棏棐棑棓棔棖棗棙棛",4,"棡棢棤",9,"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆",4,"椌椏椑椓",11,"椡椢椣椥",7,"椮椯椱椲椳椵椶椷椸椺椻椼椾楀楁楃",16,"楕楖楘楙楛楜楟"], -["9840","楡楢楤楥楧楨楩楪楬業楯楰楲",4,"楺楻楽楾楿榁榃榅榊榋榌榎",5,"榖榗榙榚榝",9,"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽"], -["9880","榾榿槀槂",7,"構槍槏槑槒槓槕",5,"槜槝槞槡",11,"槮槯槰槱槳",9,"槾樀",9,"樋",11,"標",5,"樠樢",5,"権樫樬樭樮樰樲樳樴樶",6,"樿",4,"橅橆橈",7,"橑",6,"橚"], -["9940","橜",4,"橢橣橤橦",10,"橲",6,"橺橻橽橾橿檁檂檃檅",8,"檏檒",4,"檘",7,"檡",5], -["9980","檧檨檪檭",114,"欥欦欨",6], -["9a40","欯欰欱欳欴欵欶欸欻欼欽欿歀歁歂歄歅歈歊歋歍",11,"歚",7,"歨歩歫",13,"歺歽歾歿殀殅殈"], -["9a80","殌殎殏殐殑殔殕殗殘殙殜",4,"殢",7,"殫",7,"殶殸",6,"毀毃毄毆",4,"毌毎毐毑毘毚毜",4,"毢",7,"毬毭毮毰毱毲毴毶毷毸毺毻毼毾",6,"氈",4,"氎氒気氜氝氞氠氣氥氫氬氭氱氳氶氷氹氺氻氼氾氿汃汄汅汈汋",4,"汑汒汓汖汘"], -["9b40","汙汚汢汣汥汦汧汫",4,"汱汳汵汷汸決汻汼汿沀沄沇沊沋沍沎沑沒沕沖沗沘沚沜沝沞沠沢沨沬沯沰沴沵沶沷沺泀況泂泃泆泇泈泋泍泎泏泑泒泘"], -["9b80","泙泚泜泝泟泤泦泧泩泬泭泲泴泹泿洀洂洃洅洆洈洉洊洍洏洐洑洓洔洕洖洘洜洝洟",5,"洦洨洩洬洭洯洰洴洶洷洸洺洿浀浂浄浉浌浐浕浖浗浘浛浝浟浡浢浤浥浧浨浫浬浭浰浱浲浳浵浶浹浺浻浽",4,"涃涄涆涇涊涋涍涏涐涒涖",4,"涜涢涥涬涭涰涱涳涴涶涷涹",5,"淁淂淃淈淉淊"], -["9c40","淍淎淏淐淒淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪淭淯淰淲淴淵淶淸淺淽",7,"渆渇済渉渋渏渒渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵"], -["9c80","渶渷渹渻",7,"湅",7,"湏湐湑湒湕湗湙湚湜湝湞湠",10,"湬湭湯",14,"満溁溂溄溇溈溊",4,"溑",6,"溙溚溛溝溞溠溡溣溤溦溨溩溫溬溭溮溰溳溵溸溹溼溾溿滀滃滄滅滆滈滉滊滌滍滎滐滒滖滘滙滛滜滝滣滧滪",5], -["9d40","滰滱滲滳滵滶滷滸滺",7,"漃漄漅漇漈漊",4,"漐漑漒漖",9,"漡漢漣漥漦漧漨漬漮漰漲漴漵漷",6,"漿潀潁潂"], -["9d80","潃潄潅潈潉潊潌潎",9,"潙潚潛潝潟潠潡潣潤潥潧",5,"潯潰潱潳潵潶潷潹潻潽",6,"澅澆澇澊澋澏",12,"澝澞澟澠澢",4,"澨",10,"澴澵澷澸澺",5,"濁濃",5,"濊",6,"濓",10,"濟濢濣濤濥"], -["9e40","濦",7,"濰",32,"瀒",7,"瀜",6,"瀤",6], -["9e80","瀫",9,"瀶瀷瀸瀺",17,"灍灎灐",13,"灟",11,"灮灱灲灳灴灷灹灺灻災炁炂炃炄炆炇炈炋炌炍炏炐炑炓炗炘炚炛炞",12,"炰炲炴炵炶為炾炿烄烅烆烇烉烋",12,"烚"], -["9f40","烜烝烞烠烡烢烣烥烪烮烰",6,"烸烺烻烼烾",10,"焋",4,"焑焒焔焗焛",10,"焧",7,"焲焳焴"], -["9f80","焵焷",13,"煆煇煈煉煋煍煏",12,"煝煟",4,"煥煩",4,"煯煰煱煴煵煶煷煹煻煼煾",5,"熅",4,"熋熌熍熎熐熑熒熓熕熖熗熚",4,"熡",6,"熩熪熫熭",5,"熴熶熷熸熺",8,"燄",9,"燏",4], -["a040","燖",9,"燡燢燣燤燦燨",5,"燯",9,"燺",11,"爇",19], -["a080","爛爜爞",9,"爩爫爭爮爯爲爳爴爺爼爾牀",6,"牉牊牋牎牏牐牑牓牔牕牗牘牚牜牞牠牣牤牥牨牪牫牬牭牰牱牳牴牶牷牸牻牼牽犂犃犅",4,"犌犎犐犑犓",11,"犠",11,"犮犱犲犳犵犺",6,"狅狆狇狉狊狋狌狏狑狓狔狕狖狘狚狛"], -["a1a1"," 、。·ˉˇ¨〃々—~‖…‘’“”〔〕〈",7,"〖〗【】±×÷∶∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°′″℃$¤¢£‰§№☆★○●◎◇◆□■△▲※→←↑↓〓"], -["a2a1","ⅰ",9], -["a2b1","⒈",19,"⑴",19,"①",9], -["a2e5","㈠",9], -["a2f1","Ⅰ",11], -["a3a1","!"#¥%",88," ̄"], -["a4a1","ぁ",82], -["a5a1","ァ",85], -["a6a1","Α",16,"Σ",6], -["a6c1","α",16,"σ",6], -["a6e0","︵︶︹︺︿﹀︽︾﹁﹂﹃﹄"], -["a6ee","︻︼︷︸︱"], -["a6f4","︳︴"], -["a7a1","А",5,"ЁЖ",25], -["a7d1","а",5,"ёж",25], -["a840","ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿═",35,"▁",6], -["a880","█",7,"▓▔▕▼▽◢◣◤◥☉⊕〒〝〞"], -["a8a1","āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüêɑ"], -["a8bd","ńň"], -["a8c0","ɡ"], -["a8c5","ㄅ",36], -["a940","〡",8,"㊣㎎㎏㎜㎝㎞㎡㏄㏎㏑㏒㏕︰¬¦"], -["a959","℡㈱"], -["a95c","‐"], -["a960","ー゛゜ヽヾ〆ゝゞ﹉",9,"﹔﹕﹖﹗﹙",8], -["a980","﹢",4,"﹨﹩﹪﹫"], -["a996","〇"], -["a9a4","─",75], -["aa40","狜狝狟狢",5,"狪狫狵狶狹狽狾狿猀猂猄",5,"猋猌猍猏猐猑猒猔猘猙猚猟猠猣猤猦猧猨猭猯猰猲猳猵猶猺猻猼猽獀",8], -["aa80","獉獊獋獌獎獏獑獓獔獕獖獘",7,"獡",10,"獮獰獱"], -["ab40","獲",11,"獿",4,"玅玆玈玊玌玍玏玐玒玓玔玕玗玘玙玚玜玝玞玠玡玣",5,"玪玬玭玱玴玵玶玸玹玼玽玾玿珁珃",4], -["ab80","珋珌珎珒",6,"珚珛珜珝珟珡珢珣珤珦珨珪珫珬珮珯珰珱珳",4], -["ac40","珸",10,"琄琇琈琋琌琍琎琑",8,"琜",5,"琣琤琧琩琫琭琯琱琲琷",4,"琽琾琿瑀瑂",11], -["ac80","瑎",6,"瑖瑘瑝瑠",12,"瑮瑯瑱",4,"瑸瑹瑺"], -["ad40","瑻瑼瑽瑿璂璄璅璆璈璉璊璌璍璏璑",10,"璝璟",7,"璪",15,"璻",12], -["ad80","瓈",9,"瓓",8,"瓝瓟瓡瓥瓧",6,"瓰瓱瓲"], -["ae40","瓳瓵瓸",6,"甀甁甂甃甅",7,"甎甐甒甔甕甖甗甛甝甞甠",4,"甦甧甪甮甴甶甹甼甽甿畁畂畃畄畆畇畉畊畍畐畑畒畓畕畖畗畘"], -["ae80","畝",7,"畧畨畩畫",6,"畳畵當畷畺",4,"疀疁疂疄疅疇"], -["af40","疈疉疊疌疍疎疐疓疕疘疛疜疞疢疦",4,"疭疶疷疺疻疿痀痁痆痋痌痎痏痐痑痓痗痙痚痜痝痟痠痡痥痩痬痭痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇"], -["af80","瘈瘉瘋瘍瘎瘏瘑瘒瘓瘔瘖瘚瘜瘝瘞瘡瘣瘧瘨瘬瘮瘯瘱瘲瘶瘷瘹瘺瘻瘽癁療癄"], -["b040","癅",6,"癎",5,"癕癗",4,"癝癟癠癡癢癤",6,"癬癭癮癰",7,"癹発發癿皀皁皃皅皉皊皌皍皏皐皒皔皕皗皘皚皛"], -["b080","皜",7,"皥",8,"皯皰皳皵",9,"盀盁盃啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥"], -["b140","盄盇盉盋盌盓盕盙盚盜盝盞盠",4,"盦",7,"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎",10,"眛眜眝眞眡眣眤眥眧眪眫"], -["b180","眬眮眰",4,"眹眻眽眾眿睂睄睅睆睈",7,"睒",7,"睜薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳"], -["b240","睝睞睟睠睤睧睩睪睭",11,"睺睻睼瞁瞂瞃瞆",5,"瞏瞐瞓",11,"瞡瞣瞤瞦瞨瞫瞭瞮瞯瞱瞲瞴瞶",4], -["b280","瞼瞾矀",12,"矎",8,"矘矙矚矝",4,"矤病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖"], -["b340","矦矨矪矯矰矱矲矴矵矷矹矺矻矼砃",5,"砊砋砎砏砐砓砕砙砛砞砠砡砢砤砨砪砫砮砯砱砲砳砵砶砽砿硁硂硃硄硆硈硉硊硋硍硏硑硓硔硘硙硚"], -["b380","硛硜硞",11,"硯",7,"硸硹硺硻硽",6,"场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚"], -["b440","碄碅碆碈碊碋碏碐碒碔碕碖碙碝碞碠碢碤碦碨",7,"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌磍磎磏磑磒磓磖磗磘磚",9], -["b480","磤磥磦磧磩磪磫磭",4,"磳磵磶磸磹磻",5,"礂礃礄礆",6,"础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮"], -["b540","礍",5,"礔",9,"礟",4,"礥",14,"礵",4,"礽礿祂祃祄祅祇祊",8,"祔祕祘祙祡祣"], -["b580","祤祦祩祪祫祬祮祰",6,"祹祻",4,"禂禃禆禇禈禉禋禌禍禎禐禑禒怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠"], -["b640","禓",6,"禛",11,"禨",10,"禴",4,"禼禿秂秄秅秇秈秊秌秎秏秐秓秔秖秗秙",5,"秠秡秢秥秨秪"], -["b680","秬秮秱",6,"秹秺秼秾秿稁稄稅稇稈稉稊稌稏",4,"稕稖稘稙稛稜丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二"], -["b740","稝稟稡稢稤",14,"稴稵稶稸稺稾穀",5,"穇",9,"穒",4,"穘",16], -["b780","穩",6,"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎窏窐窓窔窙窚窛窞窡窢贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服"], -["b840","窣窤窧窩窪窫窮",4,"窴",10,"竀",10,"竌",9,"竗竘竚竛竜竝竡竢竤竧",5,"竮竰竱竲竳"], -["b880","竴",4,"竻竼竾笀笁笂笅笇笉笌笍笎笐笒笓笖笗笘笚笜笝笟笡笢笣笧笩笭浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹"], -["b940","笯笰笲笴笵笶笷笹笻笽笿",5,"筆筈筊筍筎筓筕筗筙筜筞筟筡筣",10,"筯筰筳筴筶筸筺筼筽筿箁箂箃箄箆",6,"箎箏"], -["b980","箑箒箓箖箘箙箚箛箞箟箠箣箤箥箮箯箰箲箳箵箶箷箹",7,"篂篃範埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈"], -["ba40","篅篈築篊篋篍篎篏篐篒篔",4,"篛篜篞篟篠篢篣篤篧篨篩篫篬篭篯篰篲",4,"篸篹篺篻篽篿",7,"簈簉簊簍簎簐",5,"簗簘簙"], -["ba80","簚",4,"簠",5,"簨簩簫",12,"簹",5,"籂骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖"], -["bb40","籃",9,"籎",36,"籵",5,"籾",9], -["bb80","粈粊",6,"粓粔粖粙粚粛粠粡粣粦粧粨粩粫粬粭粯粰粴",4,"粺粻弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕"], -["bc40","粿糀糂糃糄糆糉糋糎",6,"糘糚糛糝糞糡",6,"糩",5,"糰",7,"糹糺糼",13,"紋",5], -["bc80","紑",14,"紡紣紤紥紦紨紩紪紬紭紮細",6,"肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件"], -["bd40","紷",54,"絯",7], -["bd80","絸",32,"健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸"], -["be40","継",12,"綧",6,"綯",42], -["be80","線",32,"尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻"], -["bf40","緻",62], -["bf80","縺縼",4,"繂",4,"繈",21,"俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀"], -["c040","繞",35,"纃",23,"纜纝纞"], -["c080","纮纴纻纼绖绤绬绹缊缐缞缷缹缻",6,"罃罆",9,"罒罓馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐"], -["c140","罖罙罛罜罝罞罠罣",4,"罫罬罭罯罰罳罵罶罷罸罺罻罼罽罿羀羂",7,"羋羍羏",4,"羕",4,"羛羜羠羢羣羥羦羨",6,"羱"], -["c180","羳",4,"羺羻羾翀翂翃翄翆翇翈翉翋翍翏",4,"翖翗翙",5,"翢翣痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿"], -["c240","翤翧翨翪翫翬翭翯翲翴",6,"翽翾翿耂耇耈耉耊耎耏耑耓耚耛耝耞耟耡耣耤耫",5,"耲耴耹耺耼耾聀聁聄聅聇聈聉聎聏聐聑聓聕聖聗"], -["c280","聙聛",13,"聫",5,"聲",11,"隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫"], -["c340","聾肁肂肅肈肊肍",5,"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇",4,"胏",6,"胘胟胠胢胣胦胮胵胷胹胻胾胿脀脁脃脄脅脇脈脋"], -["c380","脌脕脗脙脛脜脝脟",12,"脭脮脰脳脴脵脷脹",4,"脿谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸"], -["c440","腀",5,"腇腉腍腎腏腒腖腗腘腛",4,"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸膁膃",4,"膉膋膌膍膎膐膒",5,"膙膚膞",4,"膤膥"], -["c480","膧膩膫",7,"膴",5,"膼膽膾膿臄臅臇臈臉臋臍",6,"摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁"], -["c540","臔",14,"臤臥臦臨臩臫臮",4,"臵",5,"臽臿舃與",4,"舎舏舑舓舕",5,"舝舠舤舥舦舧舩舮舲舺舼舽舿"], -["c580","艀艁艂艃艅艆艈艊艌艍艎艐",7,"艙艛艜艝艞艠",7,"艩拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗"], -["c640","艪艫艬艭艱艵艶艷艸艻艼芀芁芃芅芆芇芉芌芐芓芔芕芖芚芛芞芠芢芣芧芲芵芶芺芻芼芿苀苂苃苅苆苉苐苖苙苚苝苢苧苨苩苪苬苭苮苰苲苳苵苶苸"], -["c680","苺苼",4,"茊茋茍茐茒茓茖茘茙茝",9,"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐"], -["c740","茾茿荁荂荄荅荈荊",4,"荓荕",4,"荝荢荰",6,"荹荺荾",6,"莇莈莊莋莌莍莏莐莑莔莕莖莗莙莚莝莟莡",6,"莬莭莮"], -["c780","莯莵莻莾莿菂菃菄菆菈菉菋菍菎菐菑菒菓菕菗菙菚菛菞菢菣菤菦菧菨菫菬菭恰洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠"], -["c840","菮華菳",4,"菺菻菼菾菿萀萂萅萇萈萉萊萐萒",5,"萙萚萛萞",5,"萩",7,"萲",5,"萹萺萻萾",7,"葇葈葉"], -["c880","葊",6,"葒",4,"葘葝葞葟葠葢葤",4,"葪葮葯葰葲葴葷葹葻葼取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁"], -["c940","葽",4,"蒃蒄蒅蒆蒊蒍蒏",7,"蒘蒚蒛蒝蒞蒟蒠蒢",12,"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎蓏蓒蓔蓕蓗"], -["c980","蓘",4,"蓞蓡蓢蓤蓧",4,"蓭蓮蓯蓱",10,"蓽蓾蔀蔁蔂伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳"], -["ca40","蔃",8,"蔍蔎蔏蔐蔒蔔蔕蔖蔘蔙蔛蔜蔝蔞蔠蔢",8,"蔭",9,"蔾",4,"蕄蕅蕆蕇蕋",10], -["ca80","蕗蕘蕚蕛蕜蕝蕟",4,"蕥蕦蕧蕩",8,"蕳蕵蕶蕷蕸蕼蕽蕿薀薁省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱"], -["cb40","薂薃薆薈",6,"薐",10,"薝",6,"薥薦薧薩薫薬薭薱",5,"薸薺",6,"藂",6,"藊",4,"藑藒"], -["cb80","藔藖",5,"藝",6,"藥藦藧藨藪",14,"恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔"], -["cc40","藹藺藼藽藾蘀",4,"蘆",10,"蘒蘓蘔蘕蘗",15,"蘨蘪",13,"蘹蘺蘻蘽蘾蘿虀"], -["cc80","虁",11,"虒虓處",4,"虛虜虝號虠虡虣",7,"獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃"], -["cd40","虭虯虰虲",6,"蚃",6,"蚎",4,"蚔蚖",5,"蚞",4,"蚥蚦蚫蚭蚮蚲蚳蚷蚸蚹蚻",4,"蛁蛂蛃蛅蛈蛌蛍蛒蛓蛕蛖蛗蛚蛜"], -["cd80","蛝蛠蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿蜁蜄蜅蜆蜋蜌蜎蜏蜐蜑蜔蜖汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威"], -["ce40","蜙蜛蜝蜟蜠蜤蜦蜧蜨蜪蜫蜬蜭蜯蜰蜲蜳蜵蜶蜸蜹蜺蜼蜽蝀",6,"蝊蝋蝍蝏蝐蝑蝒蝔蝕蝖蝘蝚",5,"蝡蝢蝦",7,"蝯蝱蝲蝳蝵"], -["ce80","蝷蝸蝹蝺蝿螀螁螄螆螇螉螊螌螎",4,"螔螕螖螘",6,"螠",4,"巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺"], -["cf40","螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿蟁",4,"蟇蟈蟉蟌",4,"蟔",6,"蟜蟝蟞蟟蟡蟢蟣蟤蟦蟧蟨蟩蟫蟬蟭蟯",9], -["cf80","蟺蟻蟼蟽蟿蠀蠁蠂蠄",5,"蠋",7,"蠔蠗蠘蠙蠚蠜",4,"蠣稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓"], -["d040","蠤",13,"蠳",5,"蠺蠻蠽蠾蠿衁衂衃衆",5,"衎",5,"衕衖衘衚",6,"衦衧衪衭衯衱衳衴衵衶衸衹衺"], -["d080","衻衼袀袃袆袇袉袊袌袎袏袐袑袓袔袕袗",4,"袝",4,"袣袥",5,"小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄"], -["d140","袬袮袯袰袲",4,"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌裍裏裐裑裓裖裗裚",4,"裠裡裦裧裩",6,"裲裵裶裷裺裻製裿褀褁褃",5], -["d180","褉褋",4,"褑褔",4,"褜",4,"褢褣褤褦褧褨褩褬褭褮褯褱褲褳褵褷选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶"], -["d240","褸",8,"襂襃襅",24,"襠",5,"襧",19,"襼"], -["d280","襽襾覀覂覄覅覇",26,"摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐"], -["d340","覢",30,"觃觍觓觔觕觗觘觙觛觝觟觠觡觢觤觧觨觩觪觬觭觮觰觱觲觴",6], -["d380","觻",4,"訁",5,"計",21,"印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉"], -["d440","訞",31,"訿",8,"詉",21], -["d480","詟",25,"詺",6,"浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧"], -["d540","誁",7,"誋",7,"誔",46], -["d580","諃",32,"铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政"], -["d640","諤",34,"謈",27], -["d680","謤謥謧",30,"帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑"], -["d740","譆",31,"譧",4,"譭",25], -["d780","讇",24,"讬讱讻诇诐诪谉谞住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座"], -["d840","谸",8,"豂豃豄豅豈豊豋豍",7,"豖豗豘豙豛",5,"豣",6,"豬",6,"豴豵豶豷豻",6,"貃貄貆貇"], -["d880","貈貋貍",6,"貕貖貗貙",20,"亍丌兀丐廿卅丕亘丞鬲孬噩丨禺丿匕乇夭爻卮氐囟胤馗毓睾鼗丶亟鼐乜乩亓芈孛啬嘏仄厍厝厣厥厮靥赝匚叵匦匮匾赜卦卣刂刈刎刭刳刿剀剌剞剡剜蒯剽劂劁劐劓冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚佝"], -["d940","貮",62], -["d980","賭",32,"佟佗伲伽佶佴侑侉侃侏佾佻侪佼侬侔俦俨俪俅俚俣俜俑俟俸倩偌俳倬倏倮倭俾倜倌倥倨偾偃偕偈偎偬偻傥傧傩傺僖儆僭僬僦僮儇儋仝氽佘佥俎龠汆籴兮巽黉馘冁夔勹匍訇匐凫夙兕亠兖亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼"], -["da40","贎",14,"贠赑赒赗赟赥赨赩赪赬赮赯赱赲赸",8,"趂趃趆趇趈趉趌",4,"趒趓趕",9,"趠趡"], -["da80","趢趤",12,"趲趶趷趹趻趽跀跁跂跅跇跈跉跊跍跐跒跓跔凇冖冢冥讠讦讧讪讴讵讷诂诃诋诏诎诒诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌谏谑谒谔谕谖谙谛谘谝谟谠谡谥谧谪谫谮谯谲谳谵谶卩卺阝阢阡阱阪阽阼陂陉陔陟陧陬陲陴隈隍隗隰邗邛邝邙邬邡邴邳邶邺"], -["db40","跕跘跙跜跠跡跢跥跦跧跩跭跮跰跱跲跴跶跼跾",6,"踆踇踈踋踍踎踐踑踒踓踕",7,"踠踡踤",4,"踫踭踰踲踳踴踶踷踸踻踼踾"], -["db80","踿蹃蹅蹆蹌",4,"蹓",5,"蹚",11,"蹧蹨蹪蹫蹮蹱邸邰郏郅邾郐郄郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆刍奂劢劬劭劾哿勐勖勰叟燮矍廴凵凼鬯厶弁畚巯坌垩垡塾墼壅壑圩圬圪圳圹圮圯坜圻坂坩垅坫垆坼坻坨坭坶坳垭垤垌垲埏垧垴垓垠埕埘埚埙埒垸埴埯埸埤埝"], -["dc40","蹳蹵蹷",4,"蹽蹾躀躂躃躄躆躈",6,"躑躒躓躕",6,"躝躟",11,"躭躮躰躱躳",6,"躻",7], -["dc80","軃",10,"軏",21,"堋堍埽埭堀堞堙塄堠塥塬墁墉墚墀馨鼙懿艹艽艿芏芊芨芄芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌苁芩芴芡芪芟苄苎芤苡茉苷苤茏茇苜苴苒苘茌苻苓茑茚茆茔茕苠苕茜荑荛荜茈莒茼茴茱莛荞茯荏荇荃荟荀茗荠茭茺茳荦荥"], -["dd40","軥",62], -["dd80","輤",32,"荨茛荩荬荪荭荮莰荸莳莴莠莪莓莜莅荼莶莩荽莸荻莘莞莨莺莼菁萁菥菘堇萘萋菝菽菖萜萸萑萆菔菟萏萃菸菹菪菅菀萦菰菡葜葑葚葙葳蒇蒈葺蒉葸萼葆葩葶蒌蒎萱葭蓁蓍蓐蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌甍蔸蓰蔹蔟蔺"], -["de40","轅",32,"轪辀辌辒辝辠辡辢辤辥辦辧辪辬辭辮辯農辳辴辵辷辸辺辻込辿迀迃迆"], -["de80","迉",4,"迏迒迖迗迚迠迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿逇逈逌逎逓逕逘蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇薏蕹薮薜薅薹薷薰藓藁藜藿蘧蘅蘩蘖蘼廾弈夼奁耷奕奚奘匏尢尥尬尴扌扪抟抻拊拚拗拮挢拶挹捋捃掭揶捱捺掎掴捭掬掊捩掮掼揲揸揠揿揄揞揎摒揆掾摅摁搋搛搠搌搦搡摞撄摭撖"], -["df40","這逜連逤逥逧",5,"逰",4,"逷逹逺逽逿遀遃遅遆遈",4,"過達違遖遙遚遜",5,"遤遦遧適遪遫遬遯",4,"遶",6,"遾邁"], -["df80","還邅邆邇邉邊邌",4,"邒邔邖邘邚邜邞邟邠邤邥邧邨邩邫邭邲邷邼邽邿郀摺撷撸撙撺擀擐擗擤擢攉攥攮弋忒甙弑卟叱叽叩叨叻吒吖吆呋呒呓呔呖呃吡呗呙吣吲咂咔呷呱呤咚咛咄呶呦咝哐咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤哝哏哞唛哧唠哽唔哳唢唣唏唑唧唪啧喏喵啉啭啁啕唿啐唼"], -["e040","郂郃郆郈郉郋郌郍郒郔郕郖郘郙郚郞郟郠郣郤郥郩郪郬郮郰郱郲郳郵郶郷郹郺郻郼郿鄀鄁鄃鄅",19,"鄚鄛鄜"], -["e080","鄝鄟鄠鄡鄤",10,"鄰鄲",6,"鄺",8,"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈喁喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦嗝嗄嗯嗥嗲嗳嗌嗍嗨嗵嗤辔嘞嘈嘌嘁嘤嘣嗾嘀嘧嘭噘嘹噗嘬噍噢噙噜噌噔嚆噤噱噫噻噼嚅嚓嚯囔囗囝囡囵囫囹囿圄圊圉圜帏帙帔帑帱帻帼"], -["e140","酅酇酈酑酓酔酕酖酘酙酛酜酟酠酦酧酨酫酭酳酺酻酼醀",4,"醆醈醊醎醏醓",6,"醜",5,"醤",5,"醫醬醰醱醲醳醶醷醸醹醻"], -["e180","醼",10,"釈釋釐釒",9,"針",8,"帷幄幔幛幞幡岌屺岍岐岖岈岘岙岑岚岜岵岢岽岬岫岱岣峁岷峄峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯嵝嵫嵋嵊嵩嵴嶂嶙嶝豳嶷巅彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃狁狎狍狒狨狯狩狲狴狷猁狳猃狺"], -["e240","釦",62], -["e280","鈥",32,"狻猗猓猡猊猞猝猕猢猹猥猬猸猱獐獍獗獠獬獯獾舛夥飧夤夂饣饧",5,"饴饷饽馀馄馇馊馍馐馑馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖忏怃忮怄忡忤忾怅怆忪忭忸怙怵怦怛怏怍怩怫怊怿怡恸恹恻恺恂"], -["e340","鉆",45,"鉵",16], -["e380","銆",7,"銏",24,"恪恽悖悚悭悝悃悒悌悛惬悻悱惝惘惆惚悴愠愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵忝隳闩闫闱闳闵闶闼闾阃阄阆阈阊阋阌阍阏阒阕阖阗阙阚丬爿戕氵汔汜汊沣沅沐沔沌汨汩汴汶沆沩泐泔沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾"], -["e440","銨",5,"銯",24,"鋉",31], -["e480","鋩",32,"洹洧洌浃浈洇洄洙洎洫浍洮洵洚浏浒浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦淝淙渖涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴滏溏滂溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉澍澌潸潲潼潺濑"], -["e540","錊",51,"錿",10], -["e580","鍊",31,"鍫濉澧澹澶濂濡濮濞濠濯瀚瀣瀛瀹瀵灏灞宀宄宕宓宥宸甯骞搴寤寮褰寰蹇謇辶迓迕迥迮迤迩迦迳迨逅逄逋逦逑逍逖逡逵逶逭逯遄遑遒遐遨遘遢遛暹遴遽邂邈邃邋彐彗彖彘尻咫屐屙孱屣屦羼弪弩弭艴弼鬻屮妁妃妍妩妪妣"], -["e640","鍬",34,"鎐",27], -["e680","鎬",29,"鏋鏌鏍妗姊妫妞妤姒妲妯姗妾娅娆姝娈姣姘姹娌娉娲娴娑娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀骁骅骈骊骐骒骓骖骘骛骜骝骟骠骢骣骥骧纟纡纣纥纨纩"], -["e740","鏎",7,"鏗",54], -["e780","鐎",32,"纭纰纾绀绁绂绉绋绌绐绔绗绛绠绡绨绫绮绯绱绲缍绶绺绻绾缁缂缃缇缈缋缌缏缑缒缗缙缜缛缟缡",6,"缪缫缬缭缯",4,"缵幺畿巛甾邕玎玑玮玢玟珏珂珑玷玳珀珉珈珥珙顼琊珩珧珞玺珲琏琪瑛琦琥琨琰琮琬"], -["e840","鐯",14,"鐿",43,"鑬鑭鑮鑯"], -["e880","鑰",20,"钑钖钘铇铏铓铔铚铦铻锜锠琛琚瑁瑜瑗瑕瑙瑷瑭瑾璜璎璀璁璇璋璞璨璩璐璧瓒璺韪韫韬杌杓杞杈杩枥枇杪杳枘枧杵枨枞枭枋杷杼柰栉柘栊柩枰栌柙枵柚枳柝栀柃枸柢栎柁柽栲栳桠桡桎桢桄桤梃栝桕桦桁桧桀栾桊桉栩梵梏桴桷梓桫棂楮棼椟椠棹"], -["e940","锧锳锽镃镈镋镕镚镠镮镴镵長",7,"門",42], -["e980","閫",32,"椤棰椋椁楗棣椐楱椹楠楂楝榄楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱槁槊槟榕槠榍槿樯槭樗樘橥槲橄樾檠橐橛樵檎橹樽樨橘橼檑檐檩檗檫猷獒殁殂殇殄殒殓殍殚殛殡殪轫轭轱轲轳轵轶轸轷轹轺轼轾辁辂辄辇辋"], -["ea40","闌",27,"闬闿阇阓阘阛阞阠阣",6,"阫阬阭阯阰阷阸阹阺阾陁陃陊陎陏陑陒陓陖陗"], -["ea80","陘陙陚陜陝陞陠陣陥陦陫陭",4,"陳陸",12,"隇隉隊辍辎辏辘辚軎戋戗戛戟戢戡戥戤戬臧瓯瓴瓿甏甑甓攴旮旯旰昊昙杲昃昕昀炅曷昝昴昱昶昵耆晟晔晁晏晖晡晗晷暄暌暧暝暾曛曜曦曩贲贳贶贻贽赀赅赆赈赉赇赍赕赙觇觊觋觌觎觏觐觑牮犟牝牦牯牾牿犄犋犍犏犒挈挲掰"], -["eb40","隌階隑隒隓隕隖隚際隝",9,"隨",7,"隱隲隴隵隷隸隺隻隿雂雃雈雊雋雐雑雓雔雖",9,"雡",6,"雫"], -["eb80","雬雭雮雰雱雲雴雵雸雺電雼雽雿霂霃霅霊霋霌霐霑霒霔霕霗",4,"霝霟霠搿擘耄毪毳毽毵毹氅氇氆氍氕氘氙氚氡氩氤氪氲攵敕敫牍牒牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙胍胗朐胝胫胱胴胭脍脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧塍媵膈膂膑滕膣膪臌朦臊膻"], -["ec40","霡",8,"霫霬霮霯霱霳",4,"霺霻霼霽霿",18,"靔靕靗靘靚靜靝靟靣靤靦靧靨靪",7], -["ec80","靲靵靷",4,"靽",7,"鞆",4,"鞌鞎鞏鞐鞓鞕鞖鞗鞙",4,"臁膦欤欷欹歃歆歙飑飒飓飕飙飚殳彀毂觳斐齑斓於旆旄旃旌旎旒旖炀炜炖炝炻烀炷炫炱烨烊焐焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹爝爨灬焘煦熹戾戽扃扈扉礻祀祆祉祛祜祓祚祢祗祠祯祧祺禅禊禚禧禳忑忐"], -["ed40","鞞鞟鞡鞢鞤",6,"鞬鞮鞰鞱鞳鞵",46], -["ed80","韤韥韨韮",4,"韴韷",23,"怼恝恚恧恁恙恣悫愆愍慝憩憝懋懑戆肀聿沓泶淼矶矸砀砉砗砘砑斫砭砜砝砹砺砻砟砼砥砬砣砩硎硭硖硗砦硐硇硌硪碛碓碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄眍盹眇眈眚眢眙眭眦眵眸睐睑睇睃睚睨"], -["ee40","頏",62], -["ee80","顎",32,"睢睥睿瞍睽瞀瞌瞑瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹羁罾盍盥蠲钅钆钇钋钊钌钍钏钐钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶",4,"钼钽钿铄铈",6,"铐铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪"], -["ef40","顯",5,"颋颎颒颕颙颣風",37,"飏飐飔飖飗飛飜飝飠",4], -["ef80","飥飦飩",30,"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊锍锎锏锒",4,"锘锛锝锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎镏镒镓镔镖镗镘镙镛镞镟镝镡镢镤",8,"镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔"], -["f040","餈",4,"餎餏餑",28,"餯",26], -["f080","饊",9,"饖",12,"饤饦饳饸饹饻饾馂馃馉稹稷穑黏馥穰皈皎皓皙皤瓞瓠甬鸠鸢鸨",4,"鸲鸱鸶鸸鸷鸹鸺鸾鹁鹂鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦",6,"鹱鹭鹳疒疔疖疠疝疬疣疳疴疸痄疱疰痃痂痖痍痣痨痦痤痫痧瘃痱痼痿瘐瘀瘅瘌瘗瘊瘥瘘瘕瘙"], -["f140","馌馎馚",10,"馦馧馩",47], -["f180","駙",32,"瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳癍癞癔癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶襁襦襻疋胥皲皴矜耒耔耖耜耠耢耥耦耧耩耨耱耋耵聃聆聍聒聩聱覃顸颀颃"], -["f240","駺",62], -["f280","騹",32,"颉颌颍颏颔颚颛颞颟颡颢颥颦虍虔虬虮虿虺虼虻蚨蚍蚋蚬蚝蚧蚣蚪蚓蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉蛏蚴蛩蛱蛲蛭蛳蛐蜓蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊蜍蜉蜣蜻蜞蜥蜮蜚蜾蝈蜴蜱蜩蜷蜿螂蜢蝽蝾蝻蝠蝰蝌蝮螋蝓蝣蝼蝤蝙蝥螓螯螨蟒"], -["f340","驚",17,"驲骃骉骍骎骔骕骙骦骩",6,"骲骳骴骵骹骻骽骾骿髃髄髆",4,"髍髎髏髐髒體髕髖髗髙髚髛髜"], -["f380","髝髞髠髢髣髤髥髧髨髩髪髬髮髰",8,"髺髼",6,"鬄鬅鬆蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅舐竺竽笈笃笄笕笊笫笏筇笸笪笙笮笱笠笥笤笳笾笞筘筚筅筵筌筝筠筮筻筢筲筱箐箦箧箸箬箝箨箅箪箜箢箫箴篑篁篌篝篚篥篦篪簌篾篼簏簖簋"], -["f440","鬇鬉",5,"鬐鬑鬒鬔",10,"鬠鬡鬢鬤",10,"鬰鬱鬳",7,"鬽鬾鬿魀魆魊魋魌魎魐魒魓魕",5], -["f480","魛",32,"簟簪簦簸籁籀臾舁舂舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋艏艚艟艨衾袅袈裘裟襞羝羟羧羯羰羲籼敉粑粝粜粞粢粲粼粽糁糇糌糍糈糅糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊酐酎酏酤"], -["f540","魼",62], -["f580","鮻",32,"酢酡酰酩酯酽酾酲酴酹醌醅醐醍醑醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎跏跛跆跬跷跸跣跹跻跤踉跽踔踝踟踬踮踣踯踺蹀踹踵踽踱蹉蹁蹂蹑蹒蹊蹰蹶蹼蹯蹴躅躏躔躐躜躞豸貂貊貅貘貔斛觖觞觚觜"], -["f640","鯜",62], -["f680","鰛",32,"觥觫觯訾謦靓雩雳雯霆霁霈霏霎霪霭霰霾龀龃龅",5,"龌黾鼋鼍隹隼隽雎雒瞿雠銎銮鋈錾鍪鏊鎏鐾鑫鱿鲂鲅鲆鲇鲈稣鲋鲎鲐鲑鲒鲔鲕鲚鲛鲞",5,"鲥",4,"鲫鲭鲮鲰",7,"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋"], -["f740","鰼",62], -["f780","鱻鱽鱾鲀鲃鲄鲉鲊鲌鲏鲓鲖鲗鲘鲙鲝鲪鲬鲯鲹鲾",4,"鳈鳉鳑鳒鳚鳛鳠鳡鳌",4,"鳓鳔鳕鳗鳘鳙鳜鳝鳟鳢靼鞅鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼髁髀髅髂髋髌髑魅魃魇魉魈魍魑飨餍餮饕饔髟髡髦髯髫髻髭髹鬈鬏鬓鬟鬣麽麾縻麂麇麈麋麒鏖麝麟黛黜黝黠黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄"], -["f840","鳣",62], -["f880","鴢",32], -["f940","鵃",62], -["f980","鶂",32], -["fa40","鶣",62], -["fa80","鷢",32], -["fb40","鸃",27,"鸤鸧鸮鸰鸴鸻鸼鹀鹍鹐鹒鹓鹔鹖鹙鹝鹟鹠鹡鹢鹥鹮鹯鹲鹴",9,"麀"], -["fb80","麁麃麄麅麆麉麊麌",5,"麔",8,"麞麠",5,"麧麨麩麪"], -["fc40","麫",8,"麵麶麷麹麺麼麿",4,"黅黆黇黈黊黋黌黐黒黓黕黖黗黙黚點黡黣黤黦黨黫黬黭黮黰",8,"黺黽黿",6], -["fc80","鼆",4,"鼌鼏鼑鼒鼔鼕鼖鼘鼚",5,"鼡鼣",8,"鼭鼮鼰鼱"], -["fd40","鼲",4,"鼸鼺鼼鼿",4,"齅",10,"齒",38], -["fd80","齹",5,"龁龂龍",11,"龜龝龞龡",4,"郎凉秊裏隣"], -["fe40","兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩"] -] diff --git a/node_modules/iconv-lite/encodings/tables/cp949.json b/node_modules/iconv-lite/encodings/tables/cp949.json deleted file mode 100644 index 2022a00..0000000 --- a/node_modules/iconv-lite/encodings/tables/cp949.json +++ /dev/null @@ -1,273 +0,0 @@ -[ -["0","\u0000",127], -["8141","갂갃갅갆갋",4,"갘갞갟갡갢갣갥",6,"갮갲갳갴"], -["8161","갵갶갷갺갻갽갾갿걁",9,"걌걎",5,"걕"], -["8181","걖걗걙걚걛걝",18,"걲걳걵걶걹걻",4,"겂겇겈겍겎겏겑겒겓겕",6,"겞겢",5,"겫겭겮겱",6,"겺겾겿곀곂곃곅곆곇곉곊곋곍",7,"곖곘",7,"곢곣곥곦곩곫곭곮곲곴곷",4,"곾곿괁괂괃괅괇",4,"괎괐괒괓"], -["8241","괔괕괖괗괙괚괛괝괞괟괡",7,"괪괫괮",5], -["8261","괶괷괹괺괻괽",6,"굆굈굊",5,"굑굒굓굕굖굗"], -["8281","굙",7,"굢굤",7,"굮굯굱굲굷굸굹굺굾궀궃",4,"궊궋궍궎궏궑",10,"궞",5,"궥",17,"궸",7,"귂귃귅귆귇귉",6,"귒귔",7,"귝귞귟귡귢귣귥",18], -["8341","귺귻귽귾긂",5,"긊긌긎",5,"긕",7], -["8361","긝",18,"긲긳긵긶긹긻긼"], -["8381","긽긾긿깂깄깇깈깉깋깏깑깒깓깕깗",4,"깞깢깣깤깦깧깪깫깭깮깯깱",6,"깺깾",5,"꺆",5,"꺍",46,"꺿껁껂껃껅",6,"껎껒",5,"껚껛껝",8], -["8441","껦껧껩껪껬껮",5,"껵껶껷껹껺껻껽",8], -["8461","꼆꼉꼊꼋꼌꼎꼏꼑",18], -["8481","꼤",7,"꼮꼯꼱꼳꼵",6,"꼾꽀꽄꽅꽆꽇꽊",5,"꽑",10,"꽞",5,"꽦",18,"꽺",5,"꾁꾂꾃꾅꾆꾇꾉",6,"꾒꾓꾔꾖",5,"꾝",26,"꾺꾻꾽꾾"], -["8541","꾿꿁",5,"꿊꿌꿏",4,"꿕",6,"꿝",4], -["8561","꿢",5,"꿪",5,"꿲꿳꿵꿶꿷꿹",6,"뀂뀃"], -["8581","뀅",6,"뀍뀎뀏뀑뀒뀓뀕",6,"뀞",9,"뀩",26,"끆끇끉끋끍끏끐끑끒끖끘끚끛끜끞",29,"끾끿낁낂낃낅",6,"낎낐낒",5,"낛낝낞낣낤"], -["8641","낥낦낧낪낰낲낶낷낹낺낻낽",6,"냆냊",5,"냒"], -["8661","냓냕냖냗냙",6,"냡냢냣냤냦",10], -["8681","냱",22,"넊넍넎넏넑넔넕넖넗넚넞",4,"넦넧넩넪넫넭",6,"넶넺",5,"녂녃녅녆녇녉",6,"녒녓녖녗녙녚녛녝녞녟녡",22,"녺녻녽녾녿놁놃",4,"놊놌놎놏놐놑놕놖놗놙놚놛놝"], -["8741","놞",9,"놩",15], -["8761","놹",18,"뇍뇎뇏뇑뇒뇓뇕"], -["8781","뇖",5,"뇞뇠",7,"뇪뇫뇭뇮뇯뇱",7,"뇺뇼뇾",5,"눆눇눉눊눍",6,"눖눘눚",5,"눡",18,"눵",6,"눽",26,"뉙뉚뉛뉝뉞뉟뉡",6,"뉪",4], -["8841","뉯",4,"뉶",5,"뉽",6,"늆늇늈늊",4], -["8861","늏늒늓늕늖늗늛",4,"늢늤늧늨늩늫늭늮늯늱늲늳늵늶늷"], -["8881","늸",15,"닊닋닍닎닏닑닓",4,"닚닜닞닟닠닡닣닧닩닪닰닱닲닶닼닽닾댂댃댅댆댇댉",6,"댒댖",5,"댝",54,"덗덙덚덝덠덡덢덣"], -["8941","덦덨덪덬덭덯덲덳덵덶덷덹",6,"뎂뎆",5,"뎍"], -["8961","뎎뎏뎑뎒뎓뎕",10,"뎢",5,"뎩뎪뎫뎭"], -["8981","뎮",21,"돆돇돉돊돍돏돑돒돓돖돘돚돜돞돟돡돢돣돥돦돧돩",18,"돽",18,"됑",6,"됙됚됛됝됞됟됡",6,"됪됬",7,"됵",15], -["8a41","둅",10,"둒둓둕둖둗둙",6,"둢둤둦"], -["8a61","둧",4,"둭",18,"뒁뒂"], -["8a81","뒃",4,"뒉",19,"뒞",5,"뒥뒦뒧뒩뒪뒫뒭",7,"뒶뒸뒺",5,"듁듂듃듅듆듇듉",6,"듑듒듓듔듖",5,"듞듟듡듢듥듧",4,"듮듰듲",5,"듹",26,"딖딗딙딚딝"], -["8b41","딞",5,"딦딫",4,"딲딳딵딶딷딹",6,"땂땆"], -["8b61","땇땈땉땊땎땏땑땒땓땕",6,"땞땢",8], -["8b81","땫",52,"떢떣떥떦떧떩떬떭떮떯떲떶",4,"떾떿뗁뗂뗃뗅",6,"뗎뗒",5,"뗙",18,"뗭",18], -["8c41","똀",15,"똒똓똕똖똗똙",4], -["8c61","똞",6,"똦",5,"똭",6,"똵",5], -["8c81","똻",12,"뙉",26,"뙥뙦뙧뙩",50,"뚞뚟뚡뚢뚣뚥",5,"뚭뚮뚯뚰뚲",16], -["8d41","뛃",16,"뛕",8], -["8d61","뛞",17,"뛱뛲뛳뛵뛶뛷뛹뛺"], -["8d81","뛻",4,"뜂뜃뜄뜆",33,"뜪뜫뜭뜮뜱",6,"뜺뜼",7,"띅띆띇띉띊띋띍",6,"띖",9,"띡띢띣띥띦띧띩",6,"띲띴띶",5,"띾띿랁랂랃랅",6,"랎랓랔랕랚랛랝랞"], -["8e41","랟랡",6,"랪랮",5,"랶랷랹",8], -["8e61","럂",4,"럈럊",19], -["8e81","럞",13,"럮럯럱럲럳럵",6,"럾렂",4,"렊렋렍렎렏렑",6,"렚렜렞",5,"렦렧렩렪렫렭",6,"렶렺",5,"롁롂롃롅",11,"롒롔",7,"롞롟롡롢롣롥",6,"롮롰롲",5,"롹롺롻롽",7], -["8f41","뢅",7,"뢎",17], -["8f61","뢠",7,"뢩",6,"뢱뢲뢳뢵뢶뢷뢹",4], -["8f81","뢾뢿룂룄룆",5,"룍룎룏룑룒룓룕",7,"룞룠룢",5,"룪룫룭룮룯룱",6,"룺룼룾",5,"뤅",18,"뤙",6,"뤡",26,"뤾뤿륁륂륃륅",6,"륍륎륐륒",5], -["9041","륚륛륝륞륟륡",6,"륪륬륮",5,"륶륷륹륺륻륽"], -["9061","륾",5,"릆릈릋릌릏",15], -["9081","릟",12,"릮릯릱릲릳릵",6,"릾맀맂",5,"맊맋맍맓",4,"맚맜맟맠맢맦맧맩맪맫맭",6,"맶맻",4,"먂",5,"먉",11,"먖",33,"먺먻먽먾먿멁멃멄멅멆"], -["9141","멇멊멌멏멐멑멒멖멗멙멚멛멝",6,"멦멪",5], -["9161","멲멳멵멶멷멹",9,"몆몈몉몊몋몍",5], -["9181","몓",20,"몪몭몮몯몱몳",4,"몺몼몾",5,"뫅뫆뫇뫉",14,"뫚",33,"뫽뫾뫿묁묂묃묅",7,"묎묐묒",5,"묙묚묛묝묞묟묡",6], -["9241","묨묪묬",7,"묷묹묺묿",4,"뭆뭈뭊뭋뭌뭎뭑뭒"], -["9261","뭓뭕뭖뭗뭙",7,"뭢뭤",7,"뭭",4], -["9281","뭲",21,"뮉뮊뮋뮍뮎뮏뮑",18,"뮥뮦뮧뮩뮪뮫뮭",6,"뮵뮶뮸",7,"믁믂믃믅믆믇믉",6,"믑믒믔",35,"믺믻믽믾밁"], -["9341","밃",4,"밊밎밐밒밓밙밚밠밡밢밣밦밨밪밫밬밮밯밲밳밵"], -["9361","밶밷밹",6,"뱂뱆뱇뱈뱊뱋뱎뱏뱑",8], -["9381","뱚뱛뱜뱞",37,"벆벇벉벊벍벏",4,"벖벘벛",4,"벢벣벥벦벩",6,"벲벶",5,"벾벿볁볂볃볅",7,"볎볒볓볔볖볗볙볚볛볝",22,"볷볹볺볻볽"], -["9441","볾",5,"봆봈봊",5,"봑봒봓봕",8], -["9461","봞",5,"봥",6,"봭",12], -["9481","봺",5,"뵁",6,"뵊뵋뵍뵎뵏뵑",6,"뵚",9,"뵥뵦뵧뵩",22,"붂붃붅붆붋",4,"붒붔붖붗붘붛붝",6,"붥",10,"붱",6,"붹",24], -["9541","뷒뷓뷖뷗뷙뷚뷛뷝",11,"뷪",5,"뷱"], -["9561","뷲뷳뷵뷶뷷뷹",6,"븁븂븄븆",5,"븎븏븑븒븓"], -["9581","븕",6,"븞븠",35,"빆빇빉빊빋빍빏",4,"빖빘빜빝빞빟빢빣빥빦빧빩빫",4,"빲빶",4,"빾빿뺁뺂뺃뺅",6,"뺎뺒",5,"뺚",13,"뺩",14], -["9641","뺸",23,"뻒뻓"], -["9661","뻕뻖뻙",6,"뻡뻢뻦",5,"뻭",8], -["9681","뻶",10,"뼂",5,"뼊",13,"뼚뼞",33,"뽂뽃뽅뽆뽇뽉",6,"뽒뽓뽔뽖",44], -["9741","뾃",16,"뾕",8], -["9761","뾞",17,"뾱",7], -["9781","뾹",11,"뿆",5,"뿎뿏뿑뿒뿓뿕",6,"뿝뿞뿠뿢",89,"쀽쀾쀿"], -["9841","쁀",16,"쁒",5,"쁙쁚쁛"], -["9861","쁝쁞쁟쁡",6,"쁪",15], -["9881","쁺",21,"삒삓삕삖삗삙",6,"삢삤삦",5,"삮삱삲삷",4,"삾샂샃샄샆샇샊샋샍샎샏샑",6,"샚샞",5,"샦샧샩샪샫샭",6,"샶샸샺",5,"섁섂섃섅섆섇섉",6,"섑섒섓섔섖",5,"섡섢섥섨섩섪섫섮"], -["9941","섲섳섴섵섷섺섻섽섾섿셁",6,"셊셎",5,"셖셗"], -["9961","셙셚셛셝",6,"셦셪",5,"셱셲셳셵셶셷셹셺셻"], -["9981","셼",8,"솆",5,"솏솑솒솓솕솗",4,"솞솠솢솣솤솦솧솪솫솭솮솯솱",11,"솾",5,"쇅쇆쇇쇉쇊쇋쇍",6,"쇕쇖쇙",6,"쇡쇢쇣쇥쇦쇧쇩",6,"쇲쇴",7,"쇾쇿숁숂숃숅",6,"숎숐숒",5,"숚숛숝숞숡숢숣"], -["9a41","숤숥숦숧숪숬숮숰숳숵",16], -["9a61","쉆쉇쉉",6,"쉒쉓쉕쉖쉗쉙",6,"쉡쉢쉣쉤쉦"], -["9a81","쉧",4,"쉮쉯쉱쉲쉳쉵",6,"쉾슀슂",5,"슊",5,"슑",6,"슙슚슜슞",5,"슦슧슩슪슫슮",5,"슶슸슺",33,"싞싟싡싢싥",5,"싮싰싲싳싴싵싷싺싽싾싿쌁",6,"쌊쌋쌎쌏"], -["9b41","쌐쌑쌒쌖쌗쌙쌚쌛쌝",6,"쌦쌧쌪",8], -["9b61","쌳",17,"썆",7], -["9b81","썎",25,"썪썫썭썮썯썱썳",4,"썺썻썾",5,"쎅쎆쎇쎉쎊쎋쎍",50,"쏁",22,"쏚"], -["9c41","쏛쏝쏞쏡쏣",4,"쏪쏫쏬쏮",5,"쏶쏷쏹",5], -["9c61","쏿",8,"쐉",6,"쐑",9], -["9c81","쐛",8,"쐥",6,"쐭쐮쐯쐱쐲쐳쐵",6,"쐾",9,"쑉",26,"쑦쑧쑩쑪쑫쑭",6,"쑶쑷쑸쑺",5,"쒁",18,"쒕",6,"쒝",12], -["9d41","쒪",13,"쒹쒺쒻쒽",8], -["9d61","쓆",25], -["9d81","쓠",8,"쓪",5,"쓲쓳쓵쓶쓷쓹쓻쓼쓽쓾씂",9,"씍씎씏씑씒씓씕",6,"씝",10,"씪씫씭씮씯씱",6,"씺씼씾",5,"앆앇앋앏앐앑앒앖앚앛앜앟앢앣앥앦앧앩",6,"앲앶",5,"앾앿얁얂얃얅얆얈얉얊얋얎얐얒얓얔"], -["9e41","얖얙얚얛얝얞얟얡",7,"얪",9,"얶"], -["9e61","얷얺얿",4,"엋엍엏엒엓엕엖엗엙",6,"엢엤엦엧"], -["9e81","엨엩엪엫엯엱엲엳엵엸엹엺엻옂옃옄옉옊옋옍옎옏옑",6,"옚옝",6,"옦옧옩옪옫옯옱옲옶옸옺옼옽옾옿왂왃왅왆왇왉",6,"왒왖",5,"왞왟왡",10,"왭왮왰왲",5,"왺왻왽왾왿욁",6,"욊욌욎",5,"욖욗욙욚욛욝",6,"욦"], -["9f41","욨욪",5,"욲욳욵욶욷욻",4,"웂웄웆",5,"웎"], -["9f61","웏웑웒웓웕",6,"웞웟웢",5,"웪웫웭웮웯웱웲"], -["9f81","웳",4,"웺웻웼웾",5,"윆윇윉윊윋윍",6,"윖윘윚",5,"윢윣윥윦윧윩",6,"윲윴윶윸윹윺윻윾윿읁읂읃읅",4,"읋읎읐읙읚읛읝읞읟읡",6,"읩읪읬",7,"읶읷읹읺읻읿잀잁잂잆잋잌잍잏잒잓잕잙잛",4,"잢잧",4,"잮잯잱잲잳잵잶잷"], -["a041","잸잹잺잻잾쟂",5,"쟊쟋쟍쟏쟑",6,"쟙쟚쟛쟜"], -["a061","쟞",5,"쟥쟦쟧쟩쟪쟫쟭",13], -["a081","쟻",4,"젂젃젅젆젇젉젋",4,"젒젔젗",4,"젞젟젡젢젣젥",6,"젮젰젲",5,"젹젺젻젽젾젿졁",6,"졊졋졎",5,"졕",26,"졲졳졵졶졷졹졻",4,"좂좄좈좉좊좎",5,"좕",7,"좞좠좢좣좤"], -["a141","좥좦좧좩",18,"좾좿죀죁"], -["a161","죂죃죅죆죇죉죊죋죍",6,"죖죘죚",5,"죢죣죥"], -["a181","죦",14,"죶",5,"죾죿줁줂줃줇",4,"줎 、。·‥…¨〃­―∥\∼‘’“”〔〕〈",9,"±×÷≠≤≥∞∴°′″℃Å¢£¥♂♀∠⊥⌒∂∇≡≒§※☆★○●◎◇◆□■△▲▽▼→←↑↓↔〓≪≫√∽∝∵∫∬∈∋⊆⊇⊂⊃∪∩∧∨¬"], -["a241","줐줒",5,"줙",18], -["a261","줭",6,"줵",18], -["a281","쥈",7,"쥒쥓쥕쥖쥗쥙",6,"쥢쥤",7,"쥭쥮쥯⇒⇔∀∃´~ˇ˘˝˚˙¸˛¡¿ː∮∑∏¤℉‰◁◀▷▶♤♠♡♥♧♣⊙◈▣◐◑▒▤▥▨▧▦▩♨☏☎☜☞¶†‡↕↗↙↖↘♭♩♪♬㉿㈜№㏇™㏂㏘℡€®"], -["a341","쥱쥲쥳쥵",6,"쥽",10,"즊즋즍즎즏"], -["a361","즑",6,"즚즜즞",16], -["a381","즯",16,"짂짃짅짆짉짋",4,"짒짔짗짘짛!",58,"₩]",32," ̄"], -["a441","짞짟짡짣짥짦짨짩짪짫짮짲",5,"짺짻짽짾짿쨁쨂쨃쨄"], -["a461","쨅쨆쨇쨊쨎",5,"쨕쨖쨗쨙",12], -["a481","쨦쨧쨨쨪",28,"ㄱ",93], -["a541","쩇",4,"쩎쩏쩑쩒쩓쩕",6,"쩞쩢",5,"쩩쩪"], -["a561","쩫",17,"쩾",5,"쪅쪆"], -["a581","쪇",16,"쪙",14,"ⅰ",9], -["a5b0","Ⅰ",9], -["a5c1","Α",16,"Σ",6], -["a5e1","α",16,"σ",6], -["a641","쪨",19,"쪾쪿쫁쫂쫃쫅"], -["a661","쫆",5,"쫎쫐쫒쫔쫕쫖쫗쫚",5,"쫡",6], -["a681","쫨쫩쫪쫫쫭",6,"쫵",18,"쬉쬊─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂┒┑┚┙┖┕┎┍┞┟┡┢┦┧┩┪┭┮┱┲┵┶┹┺┽┾╀╁╃",7], -["a741","쬋",4,"쬑쬒쬓쬕쬖쬗쬙",6,"쬢",7], -["a761","쬪",22,"쭂쭃쭄"], -["a781","쭅쭆쭇쭊쭋쭍쭎쭏쭑",6,"쭚쭛쭜쭞",5,"쭥",7,"㎕㎖㎗ℓ㎘㏄㎣㎤㎥㎦㎙",9,"㏊㎍㎎㎏㏏㎈㎉㏈㎧㎨㎰",9,"㎀",4,"㎺",5,"㎐",4,"Ω㏀㏁㎊㎋㎌㏖㏅㎭㎮㎯㏛㎩㎪㎫㎬㏝㏐㏓㏃㏉㏜㏆"], -["a841","쭭",10,"쭺",14], -["a861","쮉",18,"쮝",6], -["a881","쮤",19,"쮹",11,"ÆÐªĦ"], -["a8a6","IJ"], -["a8a8","ĿŁØŒºÞŦŊ"], -["a8b1","㉠",27,"ⓐ",25,"①",14,"½⅓⅔¼¾⅛⅜⅝⅞"], -["a941","쯅",14,"쯕",10], -["a961","쯠쯡쯢쯣쯥쯦쯨쯪",18], -["a981","쯽",14,"찎찏찑찒찓찕",6,"찞찟찠찣찤æđðħıijĸŀłøœßþŧŋʼn㈀",27,"⒜",25,"⑴",14,"¹²³⁴ⁿ₁₂₃₄"], -["aa41","찥찦찪찫찭찯찱",6,"찺찿",4,"챆챇챉챊챋챍챎"], -["aa61","챏",4,"챖챚",5,"챡챢챣챥챧챩",6,"챱챲"], -["aa81","챳챴챶",29,"ぁ",82], -["ab41","첔첕첖첗첚첛첝첞첟첡",6,"첪첮",5,"첶첷첹"], -["ab61","첺첻첽",6,"쳆쳈쳊",5,"쳑쳒쳓쳕",5], -["ab81","쳛",8,"쳥",6,"쳭쳮쳯쳱",12,"ァ",85], -["ac41","쳾쳿촀촂",5,"촊촋촍촎촏촑",6,"촚촜촞촟촠"], -["ac61","촡촢촣촥촦촧촩촪촫촭",11,"촺",4], -["ac81","촿",28,"쵝쵞쵟А",5,"ЁЖ",25], -["acd1","а",5,"ёж",25], -["ad41","쵡쵢쵣쵥",6,"쵮쵰쵲",5,"쵹",7], -["ad61","춁",6,"춉",10,"춖춗춙춚춛춝춞춟"], -["ad81","춠춡춢춣춦춨춪",5,"춱",18,"췅"], -["ae41","췆",5,"췍췎췏췑",16], -["ae61","췢",5,"췩췪췫췭췮췯췱",6,"췺췼췾",4], -["ae81","츃츅츆츇츉츊츋츍",6,"츕츖츗츘츚",5,"츢츣츥츦츧츩츪츫"], -["af41","츬츭츮츯츲츴츶",19], -["af61","칊",13,"칚칛칝칞칢",5,"칪칬"], -["af81","칮",5,"칶칷칹칺칻칽",6,"캆캈캊",5,"캒캓캕캖캗캙"], -["b041","캚",5,"캢캦",5,"캮",12], -["b061","캻",5,"컂",19], -["b081","컖",13,"컦컧컩컪컭",6,"컶컺",5,"가각간갇갈갉갊감",7,"같",4,"갠갤갬갭갯갰갱갸갹갼걀걋걍걔걘걜거걱건걷걸걺검겁것겄겅겆겉겊겋게겐겔겜겝겟겠겡겨격겪견겯결겸겹겻겼경곁계곈곌곕곗고곡곤곧골곪곬곯곰곱곳공곶과곽관괄괆"], -["b141","켂켃켅켆켇켉",6,"켒켔켖",5,"켝켞켟켡켢켣"], -["b161","켥",6,"켮켲",5,"켹",11], -["b181","콅",14,"콖콗콙콚콛콝",6,"콦콨콪콫콬괌괍괏광괘괜괠괩괬괭괴괵괸괼굄굅굇굉교굔굘굡굣구국군굳굴굵굶굻굼굽굿궁궂궈궉권궐궜궝궤궷귀귁귄귈귐귑귓규균귤그극근귿글긁금급긋긍긔기긱긴긷길긺김깁깃깅깆깊까깍깎깐깔깖깜깝깟깠깡깥깨깩깬깰깸"], -["b241","콭콮콯콲콳콵콶콷콹",6,"쾁쾂쾃쾄쾆",5,"쾍"], -["b261","쾎",18,"쾢",5,"쾩"], -["b281","쾪",5,"쾱",18,"쿅",6,"깹깻깼깽꺄꺅꺌꺼꺽꺾껀껄껌껍껏껐껑께껙껜껨껫껭껴껸껼꼇꼈꼍꼐꼬꼭꼰꼲꼴꼼꼽꼿꽁꽂꽃꽈꽉꽐꽜꽝꽤꽥꽹꾀꾄꾈꾐꾑꾕꾜꾸꾹꾼꿀꿇꿈꿉꿋꿍꿎꿔꿜꿨꿩꿰꿱꿴꿸뀀뀁뀄뀌뀐뀔뀜뀝뀨끄끅끈끊끌끎끓끔끕끗끙"], -["b341","쿌",19,"쿢쿣쿥쿦쿧쿩"], -["b361","쿪",5,"쿲쿴쿶",5,"쿽쿾쿿퀁퀂퀃퀅",5], -["b381","퀋",5,"퀒",5,"퀙",19,"끝끼끽낀낄낌낍낏낑나낙낚난낟날낡낢남납낫",4,"낱낳내낵낸낼냄냅냇냈냉냐냑냔냘냠냥너넉넋넌널넒넓넘넙넛넜넝넣네넥넨넬넴넵넷넸넹녀녁년녈념녑녔녕녘녜녠노녹논놀놂놈놉놋농높놓놔놘놜놨뇌뇐뇔뇜뇝"], -["b441","퀮",5,"퀶퀷퀹퀺퀻퀽",6,"큆큈큊",5], -["b461","큑큒큓큕큖큗큙",6,"큡",10,"큮큯"], -["b481","큱큲큳큵",6,"큾큿킀킂",18,"뇟뇨뇩뇬뇰뇹뇻뇽누눅눈눋눌눔눕눗눙눠눴눼뉘뉜뉠뉨뉩뉴뉵뉼늄늅늉느늑는늘늙늚늠늡늣능늦늪늬늰늴니닉닌닐닒님닙닛닝닢다닥닦단닫",4,"닳담답닷",4,"닿대댁댄댈댐댑댓댔댕댜더덕덖던덛덜덞덟덤덥"], -["b541","킕",14,"킦킧킩킪킫킭",5], -["b561","킳킶킸킺",5,"탂탃탅탆탇탊",5,"탒탖",4], -["b581","탛탞탟탡탢탣탥",6,"탮탲",5,"탹",11,"덧덩덫덮데덱덴델뎀뎁뎃뎄뎅뎌뎐뎔뎠뎡뎨뎬도독돈돋돌돎돐돔돕돗동돛돝돠돤돨돼됐되된될됨됩됫됴두둑둔둘둠둡둣둥둬뒀뒈뒝뒤뒨뒬뒵뒷뒹듀듄듈듐듕드득든듣들듦듬듭듯등듸디딕딘딛딜딤딥딧딨딩딪따딱딴딸"], -["b641","턅",7,"턎",17], -["b661","턠",15,"턲턳턵턶턷턹턻턼턽턾"], -["b681","턿텂텆",5,"텎텏텑텒텓텕",6,"텞텠텢",5,"텩텪텫텭땀땁땃땄땅땋때땍땐땔땜땝땟땠땡떠떡떤떨떪떫떰떱떳떴떵떻떼떽뗀뗄뗌뗍뗏뗐뗑뗘뗬또똑똔똘똥똬똴뙈뙤뙨뚜뚝뚠뚤뚫뚬뚱뛔뛰뛴뛸뜀뜁뜅뜨뜩뜬뜯뜰뜸뜹뜻띄띈띌띔띕띠띤띨띰띱띳띵라락란랄람랍랏랐랑랒랖랗"], -["b741","텮",13,"텽",6,"톅톆톇톉톊"], -["b761","톋",20,"톢톣톥톦톧"], -["b781","톩",6,"톲톴톶톷톸톹톻톽톾톿퇁",14,"래랙랜랠램랩랫랬랭랴략랸럇량러럭런럴럼럽럿렀렁렇레렉렌렐렘렙렛렝려력련렬렴렵렷렸령례롄롑롓로록론롤롬롭롯롱롸롼뢍뢨뢰뢴뢸룀룁룃룅료룐룔룝룟룡루룩룬룰룸룹룻룽뤄뤘뤠뤼뤽륀륄륌륏륑류륙륜률륨륩"], -["b841","퇐",7,"퇙",17], -["b861","퇫",8,"퇵퇶퇷퇹",13], -["b881","툈툊",5,"툑",24,"륫륭르륵른를름릅릇릉릊릍릎리릭린릴림립릿링마막만많",4,"맘맙맛망맞맡맣매맥맨맬맴맵맷맸맹맺먀먁먈먕머먹먼멀멂멈멉멋멍멎멓메멕멘멜멤멥멧멨멩며멱면멸몃몄명몇몌모목몫몬몰몲몸몹못몽뫄뫈뫘뫙뫼"], -["b941","툪툫툮툯툱툲툳툵",6,"툾퉀퉂",5,"퉉퉊퉋퉌"], -["b961","퉍",14,"퉝",6,"퉥퉦퉧퉨"], -["b981","퉩",22,"튂튃튅튆튇튉튊튋튌묀묄묍묏묑묘묜묠묩묫무묵묶문묻물묽묾뭄뭅뭇뭉뭍뭏뭐뭔뭘뭡뭣뭬뮈뮌뮐뮤뮨뮬뮴뮷므믄믈믐믓미믹민믿밀밂밈밉밋밌밍및밑바",4,"받",4,"밤밥밧방밭배백밴밸뱀뱁뱃뱄뱅뱉뱌뱍뱐뱝버벅번벋벌벎범법벗"], -["ba41","튍튎튏튒튓튔튖",5,"튝튞튟튡튢튣튥",6,"튭"], -["ba61","튮튯튰튲",5,"튺튻튽튾틁틃",4,"틊틌",5], -["ba81","틒틓틕틖틗틙틚틛틝",6,"틦",9,"틲틳틵틶틷틹틺벙벚베벡벤벧벨벰벱벳벴벵벼벽변별볍볏볐병볕볘볜보복볶본볼봄봅봇봉봐봔봤봬뵀뵈뵉뵌뵐뵘뵙뵤뵨부북분붇불붉붊붐붑붓붕붙붚붜붤붰붸뷔뷕뷘뷜뷩뷰뷴뷸븀븃븅브븍븐블븜븝븟비빅빈빌빎빔빕빗빙빚빛빠빡빤"], -["bb41","틻",4,"팂팄팆",5,"팏팑팒팓팕팗",4,"팞팢팣"], -["bb61","팤팦팧팪팫팭팮팯팱",6,"팺팾",5,"퍆퍇퍈퍉"], -["bb81","퍊",31,"빨빪빰빱빳빴빵빻빼빽뺀뺄뺌뺍뺏뺐뺑뺘뺙뺨뻐뻑뻔뻗뻘뻠뻣뻤뻥뻬뼁뼈뼉뼘뼙뼛뼜뼝뽀뽁뽄뽈뽐뽑뽕뾔뾰뿅뿌뿍뿐뿔뿜뿟뿡쀼쁑쁘쁜쁠쁨쁩삐삑삔삘삠삡삣삥사삭삯산삳살삵삶삼삽삿샀상샅새색샌샐샘샙샛샜생샤"], -["bc41","퍪",17,"퍾퍿펁펂펃펅펆펇"], -["bc61","펈펉펊펋펎펒",5,"펚펛펝펞펟펡",6,"펪펬펮"], -["bc81","펯",4,"펵펶펷펹펺펻펽",6,"폆폇폊",5,"폑",5,"샥샨샬샴샵샷샹섀섄섈섐섕서",4,"섣설섦섧섬섭섯섰성섶세섹센셀셈셉셋셌셍셔셕션셜셤셥셧셨셩셰셴셸솅소속솎손솔솖솜솝솟송솥솨솩솬솰솽쇄쇈쇌쇔쇗쇘쇠쇤쇨쇰쇱쇳쇼쇽숀숄숌숍숏숑수숙순숟술숨숩숫숭"], -["bd41","폗폙",7,"폢폤",7,"폮폯폱폲폳폵폶폷"], -["bd61","폸폹폺폻폾퐀퐂",5,"퐉",13], -["bd81","퐗",5,"퐞",25,"숯숱숲숴쉈쉐쉑쉔쉘쉠쉥쉬쉭쉰쉴쉼쉽쉿슁슈슉슐슘슛슝스슥슨슬슭슴습슷승시식신싣실싫심십싯싱싶싸싹싻싼쌀쌈쌉쌌쌍쌓쌔쌕쌘쌜쌤쌥쌨쌩썅써썩썬썰썲썸썹썼썽쎄쎈쎌쏀쏘쏙쏜쏟쏠쏢쏨쏩쏭쏴쏵쏸쐈쐐쐤쐬쐰"], -["be41","퐸",7,"푁푂푃푅",14], -["be61","푔",7,"푝푞푟푡푢푣푥",7,"푮푰푱푲"], -["be81","푳",4,"푺푻푽푾풁풃",4,"풊풌풎",5,"풕",8,"쐴쐼쐽쑈쑤쑥쑨쑬쑴쑵쑹쒀쒔쒜쒸쒼쓩쓰쓱쓴쓸쓺쓿씀씁씌씐씔씜씨씩씬씰씸씹씻씽아악안앉않알앍앎앓암압앗았앙앝앞애액앤앨앰앱앳앴앵야약얀얄얇얌얍얏양얕얗얘얜얠얩어억언얹얻얼얽얾엄",6,"엌엎"], -["bf41","풞",10,"풪",14], -["bf61","풹",18,"퓍퓎퓏퓑퓒퓓퓕"], -["bf81","퓖",5,"퓝퓞퓠",7,"퓩퓪퓫퓭퓮퓯퓱",6,"퓹퓺퓼에엑엔엘엠엡엣엥여역엮연열엶엷염",5,"옅옆옇예옌옐옘옙옛옜오옥온올옭옮옰옳옴옵옷옹옻와왁완왈왐왑왓왔왕왜왝왠왬왯왱외왹왼욀욈욉욋욍요욕욘욜욤욥욧용우욱운울욹욺움웁웃웅워웍원월웜웝웠웡웨"], -["c041","퓾",5,"픅픆픇픉픊픋픍",6,"픖픘",5], -["c061","픞",25], -["c081","픸픹픺픻픾픿핁핂핃핅",6,"핎핐핒",5,"핚핛핝핞핟핡핢핣웩웬웰웸웹웽위윅윈윌윔윕윗윙유육윤율윰윱윳융윷으윽은을읊음읍읏응",7,"읜읠읨읫이익인일읽읾잃임입잇있잉잊잎자작잔잖잗잘잚잠잡잣잤장잦재잭잰잴잼잽잿쟀쟁쟈쟉쟌쟎쟐쟘쟝쟤쟨쟬저적전절젊"], -["c141","핤핦핧핪핬핮",5,"핶핷핹핺핻핽",6,"햆햊햋"], -["c161","햌햍햎햏햑",19,"햦햧"], -["c181","햨",31,"점접젓정젖제젝젠젤젬젭젯젱져젼졀졈졉졌졍졔조족존졸졺좀좁좃종좆좇좋좌좍좔좝좟좡좨좼좽죄죈죌죔죕죗죙죠죡죤죵주죽준줄줅줆줌줍줏중줘줬줴쥐쥑쥔쥘쥠쥡쥣쥬쥰쥴쥼즈즉즌즐즘즙즛증지직진짇질짊짐집짓"], -["c241","헊헋헍헎헏헑헓",4,"헚헜헞",5,"헦헧헩헪헫헭헮"], -["c261","헯",4,"헶헸헺",5,"혂혃혅혆혇혉",6,"혒"], -["c281","혖",5,"혝혞혟혡혢혣혥",7,"혮",9,"혺혻징짖짙짚짜짝짠짢짤짧짬짭짯짰짱째짹짼쨀쨈쨉쨋쨌쨍쨔쨘쨩쩌쩍쩐쩔쩜쩝쩟쩠쩡쩨쩽쪄쪘쪼쪽쫀쫄쫌쫍쫏쫑쫓쫘쫙쫠쫬쫴쬈쬐쬔쬘쬠쬡쭁쭈쭉쭌쭐쭘쭙쭝쭤쭸쭹쮜쮸쯔쯤쯧쯩찌찍찐찔찜찝찡찢찧차착찬찮찰참찹찻"], -["c341","혽혾혿홁홂홃홄홆홇홊홌홎홏홐홒홓홖홗홙홚홛홝",4], -["c361","홢",4,"홨홪",5,"홲홳홵",11], -["c381","횁횂횄횆",5,"횎횏횑횒횓횕",7,"횞횠횢",5,"횩횪찼창찾채책챈챌챔챕챗챘챙챠챤챦챨챰챵처척천철첨첩첫첬청체첵첸첼쳄쳅쳇쳉쳐쳔쳤쳬쳰촁초촉촌촐촘촙촛총촤촨촬촹최쵠쵤쵬쵭쵯쵱쵸춈추축춘출춤춥춧충춰췄췌췐취췬췰췸췹췻췽츄츈츌츔츙츠측츤츨츰츱츳층"], -["c441","횫횭횮횯횱",7,"횺횼",7,"훆훇훉훊훋"], -["c461","훍훎훏훐훒훓훕훖훘훚",5,"훡훢훣훥훦훧훩",4], -["c481","훮훯훱훲훳훴훶",5,"훾훿휁휂휃휅",11,"휒휓휔치칙친칟칠칡침칩칫칭카칵칸칼캄캅캇캉캐캑캔캘캠캡캣캤캥캬캭컁커컥컨컫컬컴컵컷컸컹케켁켄켈켐켑켓켕켜켠켤켬켭켯켰켱켸코콕콘콜콤콥콧콩콰콱콴콸쾀쾅쾌쾡쾨쾰쿄쿠쿡쿤쿨쿰쿱쿳쿵쿼퀀퀄퀑퀘퀭퀴퀵퀸퀼"], -["c541","휕휖휗휚휛휝휞휟휡",6,"휪휬휮",5,"휶휷휹"], -["c561","휺휻휽",6,"흅흆흈흊",5,"흒흓흕흚",4], -["c581","흟흢흤흦흧흨흪흫흭흮흯흱흲흳흵",6,"흾흿힀힂",5,"힊힋큄큅큇큉큐큔큘큠크큭큰클큼큽킁키킥킨킬킴킵킷킹타탁탄탈탉탐탑탓탔탕태택탠탤탬탭탯탰탱탸턍터턱턴털턺텀텁텃텄텅테텍텐텔템텝텟텡텨텬텼톄톈토톡톤톨톰톱톳통톺톼퇀퇘퇴퇸툇툉툐투툭툰툴툼툽툿퉁퉈퉜"], -["c641","힍힎힏힑",6,"힚힜힞",5], -["c6a1","퉤튀튁튄튈튐튑튕튜튠튤튬튱트특튼튿틀틂틈틉틋틔틘틜틤틥티틱틴틸팀팁팃팅파팍팎판팔팖팜팝팟팠팡팥패팩팬팰팸팹팻팼팽퍄퍅퍼퍽펀펄펌펍펏펐펑페펙펜펠펨펩펫펭펴편펼폄폅폈평폐폘폡폣포폭폰폴폼폽폿퐁"], -["c7a1","퐈퐝푀푄표푠푤푭푯푸푹푼푿풀풂품풉풋풍풔풩퓌퓐퓔퓜퓟퓨퓬퓰퓸퓻퓽프픈플픔픕픗피픽핀필핌핍핏핑하학한할핥함합핫항해핵핸핼햄햅햇했행햐향허헉헌헐헒험헙헛헝헤헥헨헬헴헵헷헹혀혁현혈혐협혓혔형혜혠"], -["c8a1","혤혭호혹혼홀홅홈홉홋홍홑화확환활홧황홰홱홴횃횅회획횐횔횝횟횡효횬횰횹횻후훅훈훌훑훔훗훙훠훤훨훰훵훼훽휀휄휑휘휙휜휠휨휩휫휭휴휵휸휼흄흇흉흐흑흔흖흗흘흙흠흡흣흥흩희흰흴흼흽힁히힉힌힐힘힙힛힝"], -["caa1","伽佳假價加可呵哥嘉嫁家暇架枷柯歌珂痂稼苛茄街袈訶賈跏軻迦駕刻却各恪慤殼珏脚覺角閣侃刊墾奸姦干幹懇揀杆柬桿澗癎看磵稈竿簡肝艮艱諫間乫喝曷渴碣竭葛褐蝎鞨勘坎堪嵌感憾戡敢柑橄減甘疳監瞰紺邯鑑鑒龕"], -["cba1","匣岬甲胛鉀閘剛堈姜岡崗康强彊慷江畺疆糠絳綱羌腔舡薑襁講鋼降鱇介价個凱塏愷愾慨改槪漑疥皆盖箇芥蓋豈鎧開喀客坑更粳羹醵倨去居巨拒据據擧渠炬祛距踞車遽鉅鋸乾件健巾建愆楗腱虔蹇鍵騫乞傑杰桀儉劍劒檢"], -["cca1","瞼鈐黔劫怯迲偈憩揭擊格檄激膈覡隔堅牽犬甄絹繭肩見譴遣鵑抉決潔結缺訣兼慊箝謙鉗鎌京俓倞傾儆勁勍卿坰境庚徑慶憬擎敬景暻更梗涇炅烱璟璥瓊痙硬磬竟競絅經耕耿脛莖警輕逕鏡頃頸驚鯨係啓堺契季屆悸戒桂械"], -["cda1","棨溪界癸磎稽系繫繼計誡谿階鷄古叩告呱固姑孤尻庫拷攷故敲暠枯槁沽痼皐睾稿羔考股膏苦苽菰藁蠱袴誥賈辜錮雇顧高鼓哭斛曲梏穀谷鵠困坤崑昆梱棍滾琨袞鯤汨滑骨供公共功孔工恐恭拱控攻珙空蚣貢鞏串寡戈果瓜"], -["cea1","科菓誇課跨過鍋顆廓槨藿郭串冠官寬慣棺款灌琯瓘管罐菅觀貫關館刮恝括适侊光匡壙廣曠洸炚狂珖筐胱鑛卦掛罫乖傀塊壞怪愧拐槐魁宏紘肱轟交僑咬喬嬌嶠巧攪敎校橋狡皎矯絞翹膠蕎蛟較轎郊餃驕鮫丘久九仇俱具勾"], -["cfa1","區口句咎嘔坵垢寇嶇廐懼拘救枸柩構歐毆毬求溝灸狗玖球瞿矩究絿耉臼舅舊苟衢謳購軀逑邱鉤銶駒驅鳩鷗龜國局菊鞠鞫麴君窘群裙軍郡堀屈掘窟宮弓穹窮芎躬倦券勸卷圈拳捲權淃眷厥獗蕨蹶闕机櫃潰詭軌饋句晷歸貴"], -["d0a1","鬼龜叫圭奎揆槻珪硅窺竅糾葵規赳逵閨勻均畇筠菌鈞龜橘克剋劇戟棘極隙僅劤勤懃斤根槿瑾筋芹菫覲謹近饉契今妗擒昑檎琴禁禽芩衾衿襟金錦伋及急扱汲級給亘兢矜肯企伎其冀嗜器圻基埼夔奇妓寄岐崎己幾忌技旗旣"], -["d1a1","朞期杞棋棄機欺氣汽沂淇玘琦琪璂璣畸畿碁磯祁祇祈祺箕紀綺羈耆耭肌記譏豈起錡錤飢饑騎騏驥麒緊佶吉拮桔金喫儺喇奈娜懦懶拏拿癩",5,"那樂",4,"諾酪駱亂卵暖欄煖爛蘭難鸞捏捺南嵐枏楠湳濫男藍襤拉"], -["d2a1","納臘蠟衲囊娘廊",4,"乃來內奈柰耐冷女年撚秊念恬拈捻寧寗努勞奴弩怒擄櫓爐瑙盧",5,"駑魯",10,"濃籠聾膿農惱牢磊腦賂雷尿壘",7,"嫩訥杻紐勒",5,"能菱陵尼泥匿溺多茶"], -["d3a1","丹亶但單團壇彖斷旦檀段湍短端簞緞蛋袒鄲鍛撻澾獺疸達啖坍憺擔曇淡湛潭澹痰聃膽蕁覃談譚錟沓畓答踏遝唐堂塘幢戇撞棠當糖螳黨代垈坮大對岱帶待戴擡玳臺袋貸隊黛宅德悳倒刀到圖堵塗導屠島嶋度徒悼挑掉搗桃"], -["d4a1","棹櫂淘渡滔濤燾盜睹禱稻萄覩賭跳蹈逃途道都鍍陶韜毒瀆牘犢獨督禿篤纛讀墩惇敦旽暾沌焞燉豚頓乭突仝冬凍動同憧東桐棟洞潼疼瞳童胴董銅兜斗杜枓痘竇荳讀豆逗頭屯臀芚遁遯鈍得嶝橙燈登等藤謄鄧騰喇懶拏癩羅"], -["d5a1","蘿螺裸邏樂洛烙珞絡落諾酪駱丹亂卵欄欒瀾爛蘭鸞剌辣嵐擥攬欖濫籃纜藍襤覽拉臘蠟廊朗浪狼琅瑯螂郞來崍徠萊冷掠略亮倆兩凉梁樑粮粱糧良諒輛量侶儷勵呂廬慮戾旅櫚濾礪藜蠣閭驢驪麗黎力曆歷瀝礫轢靂憐戀攣漣"], -["d6a1","煉璉練聯蓮輦連鍊冽列劣洌烈裂廉斂殮濂簾獵令伶囹寧岺嶺怜玲笭羚翎聆逞鈴零靈領齡例澧禮醴隷勞怒撈擄櫓潞瀘爐盧老蘆虜路輅露魯鷺鹵碌祿綠菉錄鹿麓論壟弄朧瀧瓏籠聾儡瀨牢磊賂賚賴雷了僚寮廖料燎療瞭聊蓼"], -["d7a1","遼鬧龍壘婁屢樓淚漏瘻累縷蔞褸鏤陋劉旒柳榴流溜瀏琉瑠留瘤硫謬類六戮陸侖倫崙淪綸輪律慄栗率隆勒肋凜凌楞稜綾菱陵俚利厘吏唎履悧李梨浬犁狸理璃異痢籬罹羸莉裏裡里釐離鯉吝潾燐璘藺躪隣鱗麟林淋琳臨霖砬"], -["d8a1","立笠粒摩瑪痲碼磨馬魔麻寞幕漠膜莫邈万卍娩巒彎慢挽晩曼滿漫灣瞞萬蔓蠻輓饅鰻唜抹末沫茉襪靺亡妄忘忙望網罔芒茫莽輞邙埋妹媒寐昧枚梅每煤罵買賣邁魅脈貊陌驀麥孟氓猛盲盟萌冪覓免冕勉棉沔眄眠綿緬面麵滅"], -["d9a1","蔑冥名命明暝椧溟皿瞑茗蓂螟酩銘鳴袂侮冒募姆帽慕摸摹暮某模母毛牟牡瑁眸矛耗芼茅謀謨貌木沐牧目睦穆鶩歿沒夢朦蒙卯墓妙廟描昴杳渺猫竗苗錨務巫憮懋戊拇撫无楙武毋無珷畝繆舞茂蕪誣貿霧鵡墨默們刎吻問文"], -["daa1","汶紊紋聞蚊門雯勿沕物味媚尾嵋彌微未梶楣渼湄眉米美薇謎迷靡黴岷悶愍憫敏旻旼民泯玟珉緡閔密蜜謐剝博拍搏撲朴樸泊珀璞箔粕縛膊舶薄迫雹駁伴半反叛拌搬攀斑槃泮潘班畔瘢盤盼磐磻礬絆般蟠返頒飯勃拔撥渤潑"], -["dba1","發跋醱鉢髮魃倣傍坊妨尨幇彷房放方旁昉枋榜滂磅紡肪膀舫芳蒡蚌訪謗邦防龐倍俳北培徘拜排杯湃焙盃背胚裴裵褙賠輩配陪伯佰帛柏栢白百魄幡樊煩燔番磻繁蕃藩飜伐筏罰閥凡帆梵氾汎泛犯範范法琺僻劈壁擘檗璧癖"], -["dca1","碧蘗闢霹便卞弁變辨辯邊別瞥鱉鼈丙倂兵屛幷昞昺柄棅炳甁病秉竝輧餠騈保堡報寶普步洑湺潽珤甫菩補褓譜輔伏僕匐卜宓復服福腹茯蔔複覆輹輻馥鰒本乶俸奉封峯峰捧棒烽熢琫縫蓬蜂逢鋒鳳不付俯傅剖副否咐埠夫婦"], -["dda1","孚孵富府復扶敷斧浮溥父符簿缶腐腑膚艀芙莩訃負賦賻赴趺部釜阜附駙鳧北分吩噴墳奔奮忿憤扮昐汾焚盆粉糞紛芬賁雰不佛弗彿拂崩朋棚硼繃鵬丕備匕匪卑妃婢庇悲憊扉批斐枇榧比毖毗毘沸泌琵痺砒碑秕秘粃緋翡肥"], -["dea1","脾臂菲蜚裨誹譬費鄙非飛鼻嚬嬪彬斌檳殯浜濱瀕牝玭貧賓頻憑氷聘騁乍事些仕伺似使俟僿史司唆嗣四士奢娑寫寺射巳師徙思捨斜斯柶査梭死沙泗渣瀉獅砂社祀祠私篩紗絲肆舍莎蓑蛇裟詐詞謝賜赦辭邪飼駟麝削數朔索"], -["dfa1","傘刪山散汕珊産疝算蒜酸霰乷撒殺煞薩三參杉森渗芟蔘衫揷澁鈒颯上傷像償商喪嘗孀尙峠常床庠廂想桑橡湘爽牀狀相祥箱翔裳觴詳象賞霜塞璽賽嗇塞穡索色牲生甥省笙墅壻嶼序庶徐恕抒捿敍暑曙書栖棲犀瑞筮絮緖署"], -["e0a1","胥舒薯西誓逝鋤黍鼠夕奭席惜昔晳析汐淅潟石碩蓆釋錫仙僊先善嬋宣扇敾旋渲煽琁瑄璇璿癬禪線繕羨腺膳船蘚蟬詵跣選銑鐥饍鮮卨屑楔泄洩渫舌薛褻設說雪齧剡暹殲纖蟾贍閃陝攝涉燮葉城姓宬性惺成星晟猩珹盛省筬"], -["e1a1","聖聲腥誠醒世勢歲洗稅笹細說貰召嘯塑宵小少巢所掃搔昭梳沼消溯瀟炤燒甦疏疎瘙笑篠簫素紹蔬蕭蘇訴逍遡邵銷韶騷俗屬束涑粟續謖贖速孫巽損蓀遜飡率宋悚松淞訟誦送頌刷殺灑碎鎖衰釗修受嗽囚垂壽嫂守岫峀帥愁"], -["e2a1","戍手授搜收數樹殊水洙漱燧狩獸琇璲瘦睡秀穗竪粹綏綬繡羞脩茱蒐蓚藪袖誰讐輸遂邃酬銖銹隋隧隨雖需須首髓鬚叔塾夙孰宿淑潚熟琡璹肅菽巡徇循恂旬栒楯橓殉洵淳珣盾瞬筍純脣舜荀蓴蕣詢諄醇錞順馴戌術述鉥崇崧"], -["e3a1","嵩瑟膝蝨濕拾習褶襲丞乘僧勝升承昇繩蠅陞侍匙嘶始媤尸屎屍市弑恃施是時枾柴猜矢示翅蒔蓍視試詩諡豕豺埴寔式息拭植殖湜熄篒蝕識軾食飾伸侁信呻娠宸愼新晨燼申神紳腎臣莘薪藎蜃訊身辛辰迅失室實悉審尋心沁"], -["e4a1","沈深瀋甚芯諶什十拾雙氏亞俄兒啞娥峨我牙芽莪蛾衙訝阿雅餓鴉鵝堊岳嶽幄惡愕握樂渥鄂鍔顎鰐齷安岸按晏案眼雁鞍顔鮟斡謁軋閼唵岩巖庵暗癌菴闇壓押狎鴨仰央怏昻殃秧鴦厓哀埃崖愛曖涯碍艾隘靄厄扼掖液縊腋額"], -["e5a1","櫻罌鶯鸚也倻冶夜惹揶椰爺耶若野弱掠略約若葯蒻藥躍亮佯兩凉壤孃恙揚攘敭暘梁楊樣洋瀁煬痒瘍禳穰糧羊良襄諒讓釀陽量養圄御於漁瘀禦語馭魚齬億憶抑檍臆偃堰彦焉言諺孼蘖俺儼嚴奄掩淹嶪業円予余勵呂女如廬"], -["e6a1","旅歟汝濾璵礖礪與艅茹輿轝閭餘驪麗黎亦力域役易曆歷疫繹譯轢逆驛嚥堧姸娟宴年延憐戀捐挻撚椽沇沿涎涓淵演漣烟然煙煉燃燕璉硏硯秊筵緣練縯聯衍軟輦蓮連鉛鍊鳶列劣咽悅涅烈熱裂說閱厭廉念捻染殮炎焰琰艶苒"], -["e7a1","簾閻髥鹽曄獵燁葉令囹塋寧嶺嶸影怜映暎楹榮永泳渶潁濚瀛瀯煐營獰玲瑛瑩瓔盈穎纓羚聆英詠迎鈴鍈零霙靈領乂倪例刈叡曳汭濊猊睿穢芮藝蘂禮裔詣譽豫醴銳隸霓預五伍俉傲午吾吳嗚塢墺奧娛寤悟惡懊敖旿晤梧汚澳"], -["e8a1","烏熬獒筽蜈誤鰲鼇屋沃獄玉鈺溫瑥瘟穩縕蘊兀壅擁瓮甕癰翁邕雍饔渦瓦窩窪臥蛙蝸訛婉完宛梡椀浣玩琓琬碗緩翫脘腕莞豌阮頑曰往旺枉汪王倭娃歪矮外嵬巍猥畏了僚僥凹堯夭妖姚寥寮尿嶢拗搖撓擾料曜樂橈燎燿瑤療"], -["e9a1","窈窯繇繞耀腰蓼蟯要謠遙遼邀饒慾欲浴縟褥辱俑傭冗勇埇墉容庸慂榕涌湧溶熔瑢用甬聳茸蓉踊鎔鏞龍于佑偶優又友右宇寓尤愚憂旴牛玗瑀盂祐禑禹紆羽芋藕虞迂遇郵釪隅雨雩勖彧旭昱栯煜稶郁頊云暈橒殞澐熉耘芸蕓"], -["eaa1","運隕雲韻蔚鬱亐熊雄元原員圓園垣媛嫄寃怨愿援沅洹湲源爰猿瑗苑袁轅遠阮院願鴛月越鉞位偉僞危圍委威尉慰暐渭爲瑋緯胃萎葦蔿蝟衛褘謂違韋魏乳侑儒兪劉唯喩孺宥幼幽庾悠惟愈愉揄攸有杻柔柚柳楡楢油洧流游溜"], -["eba1","濡猶猷琉瑜由留癒硫紐維臾萸裕誘諛諭踰蹂遊逾遺酉釉鍮類六堉戮毓肉育陸倫允奫尹崙淪潤玧胤贇輪鈗閏律慄栗率聿戎瀜絨融隆垠恩慇殷誾銀隱乙吟淫蔭陰音飮揖泣邑凝應膺鷹依倚儀宜意懿擬椅毅疑矣義艤薏蟻衣誼"], -["eca1","議醫二以伊利吏夷姨履已弛彛怡易李梨泥爾珥理異痍痢移罹而耳肄苡荑裏裡貽貳邇里離飴餌匿溺瀷益翊翌翼謚人仁刃印吝咽因姻寅引忍湮燐璘絪茵藺蚓認隣靭靷鱗麟一佚佾壹日溢逸鎰馹任壬妊姙恁林淋稔臨荏賃入卄"], -["eda1","立笠粒仍剩孕芿仔刺咨姉姿子字孜恣慈滋炙煮玆瓷疵磁紫者自茨蔗藉諮資雌作勺嚼斫昨灼炸爵綽芍酌雀鵲孱棧殘潺盞岑暫潛箴簪蠶雜丈仗匠場墻壯奬將帳庄張掌暲杖樟檣欌漿牆狀獐璋章粧腸臟臧莊葬蔣薔藏裝贓醬長"], -["eea1","障再哉在宰才材栽梓渽滓災縡裁財載齋齎爭箏諍錚佇低儲咀姐底抵杵楮樗沮渚狙猪疽箸紵苧菹著藷詛貯躇這邸雎齟勣吊嫡寂摘敵滴狄炙的積笛籍績翟荻謫賊赤跡蹟迪迹適鏑佃佺傳全典前剪塡塼奠專展廛悛戰栓殿氈澱"], -["efa1","煎琠田甸畑癲筌箋箭篆纏詮輾轉鈿銓錢鐫電顚顫餞切截折浙癤竊節絶占岾店漸点粘霑鮎點接摺蝶丁井亭停偵呈姃定幀庭廷征情挺政整旌晶晸柾楨檉正汀淀淨渟湞瀞炡玎珽町睛碇禎程穽精綎艇訂諪貞鄭酊釘鉦鋌錠霆靖"], -["f0a1","靜頂鼎制劑啼堤帝弟悌提梯濟祭第臍薺製諸蹄醍除際霽題齊俎兆凋助嘲弔彫措操早晁曺曹朝條棗槽漕潮照燥爪璪眺祖祚租稠窕粗糟組繰肇藻蚤詔調趙躁造遭釣阻雕鳥族簇足鏃存尊卒拙猝倧宗從悰慫棕淙琮種終綜縱腫"], -["f1a1","踪踵鍾鐘佐坐左座挫罪主住侏做姝胄呪周嗾奏宙州廚晝朱柱株注洲湊澍炷珠疇籌紂紬綢舟蛛註誅走躊輳週酎酒鑄駐竹粥俊儁准埈寯峻晙樽浚準濬焌畯竣蠢逡遵雋駿茁中仲衆重卽櫛楫汁葺增憎曾拯烝甑症繒蒸證贈之只"], -["f2a1","咫地址志持指摯支旨智枝枳止池沚漬知砥祉祗紙肢脂至芝芷蜘誌識贄趾遲直稙稷織職唇嗔塵振搢晉晋桭榛殄津溱珍瑨璡畛疹盡眞瞋秦縉縝臻蔯袗診賑軫辰進鎭陣陳震侄叱姪嫉帙桎瓆疾秩窒膣蛭質跌迭斟朕什執潗緝輯"], -["f3a1","鏶集徵懲澄且侘借叉嗟嵯差次此磋箚茶蹉車遮捉搾着窄錯鑿齪撰澯燦璨瓚竄簒纂粲纘讚贊鑽餐饌刹察擦札紮僭參塹慘慙懺斬站讒讖倉倡創唱娼廠彰愴敞昌昶暢槍滄漲猖瘡窓脹艙菖蒼債埰寀寨彩採砦綵菜蔡采釵冊柵策"], -["f4a1","責凄妻悽處倜刺剔尺慽戚拓擲斥滌瘠脊蹠陟隻仟千喘天川擅泉淺玔穿舛薦賤踐遷釧闡阡韆凸哲喆徹撤澈綴輟轍鐵僉尖沾添甛瞻簽籤詹諂堞妾帖捷牒疊睫諜貼輒廳晴淸聽菁請靑鯖切剃替涕滯締諦逮遞體初剿哨憔抄招梢"], -["f5a1","椒楚樵炒焦硝礁礎秒稍肖艸苕草蕉貂超酢醋醮促囑燭矗蜀觸寸忖村邨叢塚寵悤憁摠總聰蔥銃撮催崔最墜抽推椎楸樞湫皺秋芻萩諏趨追鄒酋醜錐錘鎚雛騶鰍丑畜祝竺筑築縮蓄蹙蹴軸逐春椿瑃出朮黜充忠沖蟲衝衷悴膵萃"], -["f6a1","贅取吹嘴娶就炊翠聚脆臭趣醉驟鷲側仄厠惻測層侈値嗤峙幟恥梔治淄熾痔痴癡稚穉緇緻置致蚩輜雉馳齒則勅飭親七柒漆侵寢枕沈浸琛砧針鍼蟄秤稱快他咤唾墮妥惰打拖朶楕舵陀馱駝倬卓啄坼度托拓擢晫柝濁濯琢琸託"], -["f7a1","鐸呑嘆坦彈憚歎灘炭綻誕奪脫探眈耽貪塔搭榻宕帑湯糖蕩兌台太怠態殆汰泰笞胎苔跆邰颱宅擇澤撑攄兎吐土討慟桶洞痛筒統通堆槌腿褪退頹偸套妬投透鬪慝特闖坡婆巴把播擺杷波派爬琶破罷芭跛頗判坂板版瓣販辦鈑"], -["f8a1","阪八叭捌佩唄悖敗沛浿牌狽稗覇貝彭澎烹膨愎便偏扁片篇編翩遍鞭騙貶坪平枰萍評吠嬖幣廢弊斃肺蔽閉陛佈包匍匏咆哺圃布怖抛抱捕暴泡浦疱砲胞脯苞葡蒲袍褒逋鋪飽鮑幅暴曝瀑爆輻俵剽彪慓杓標漂瓢票表豹飇飄驃"], -["f9a1","品稟楓諷豊風馮彼披疲皮被避陂匹弼必泌珌畢疋筆苾馝乏逼下何厦夏廈昰河瑕荷蝦賀遐霞鰕壑學虐謔鶴寒恨悍旱汗漢澣瀚罕翰閑閒限韓割轄函含咸啣喊檻涵緘艦銜陷鹹合哈盒蛤閤闔陜亢伉姮嫦巷恒抗杭桁沆港缸肛航"], -["faa1","行降項亥偕咳垓奚孩害懈楷海瀣蟹解該諧邂駭骸劾核倖幸杏荇行享向嚮珦鄕響餉饗香噓墟虛許憲櫶獻軒歇險驗奕爀赫革俔峴弦懸晛泫炫玄玹現眩睍絃絢縣舷衒見賢鉉顯孑穴血頁嫌俠協夾峽挾浹狹脅脇莢鋏頰亨兄刑型"], -["fba1","形泂滎瀅灐炯熒珩瑩荊螢衡逈邢鎣馨兮彗惠慧暳蕙蹊醯鞋乎互呼壕壺好岵弧戶扈昊晧毫浩淏湖滸澔濠濩灝狐琥瑚瓠皓祜糊縞胡芦葫蒿虎號蝴護豪鎬頀顥惑或酷婚昏混渾琿魂忽惚笏哄弘汞泓洪烘紅虹訌鴻化和嬅樺火畵"], -["fca1","禍禾花華話譁貨靴廓擴攫確碻穫丸喚奐宦幻患換歡晥桓渙煥環紈還驩鰥活滑猾豁闊凰幌徨恍惶愰慌晃晄榥況湟滉潢煌璜皇篁簧荒蝗遑隍黃匯回廻徊恢悔懷晦會檜淮澮灰獪繪膾茴蛔誨賄劃獲宖橫鐄哮嚆孝效斅曉梟涍淆"], -["fda1","爻肴酵驍侯候厚后吼喉嗅帿後朽煦珝逅勛勳塤壎焄熏燻薰訓暈薨喧暄煊萱卉喙毁彙徽揮暉煇諱輝麾休携烋畦虧恤譎鷸兇凶匈洶胸黑昕欣炘痕吃屹紇訖欠欽歆吸恰洽翕興僖凞喜噫囍姬嬉希憙憘戱晞曦熙熹熺犧禧稀羲詰"] -] diff --git a/node_modules/iconv-lite/encodings/tables/cp950.json b/node_modules/iconv-lite/encodings/tables/cp950.json deleted file mode 100644 index d8bc871..0000000 --- a/node_modules/iconv-lite/encodings/tables/cp950.json +++ /dev/null @@ -1,177 +0,0 @@ -[ -["0","\u0000",127], -["a140"," ,、。.‧;:?!︰…‥﹐﹑﹒·﹔﹕﹖﹗|–︱—︳╴︴﹏()︵︶{}︷︸〔〕︹︺【】︻︼《》︽︾〈〉︿﹀「」﹁﹂『』﹃﹄﹙﹚"], -["a1a1","﹛﹜﹝﹞‘’“”〝〞‵′#&*※§〃○●△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_ˍ﹉﹊﹍﹎﹋﹌﹟﹠﹡+-×÷±√<>=≦≧≠∞≒≡﹢",4,"~∩∪⊥∠∟⊿㏒㏑∫∮∵∴♀♂⊕⊙↑↓←→↖↗↙↘∥∣/"], -["a240","\∕﹨$¥〒¢£%@℃℉﹩﹪﹫㏕㎜㎝㎞㏎㎡㎎㎏㏄°兙兛兞兝兡兣嗧瓩糎▁",7,"▏▎▍▌▋▊▉┼┴┬┤├▔─│▕┌┐└┘╭"], -["a2a1","╮╰╯═╞╪╡◢◣◥◤╱╲╳0",9,"Ⅰ",9,"〡",8,"十卄卅A",25,"a",21], -["a340","wxyzΑ",16,"Σ",6,"α",16,"σ",6,"ㄅ",10], -["a3a1","ㄐ",25,"˙ˉˊˇˋ"], -["a3e1","€"], -["a440","一乙丁七乃九了二人儿入八几刀刁力匕十卜又三下丈上丫丸凡久么也乞于亡兀刃勺千叉口土士夕大女子孑孓寸小尢尸山川工己已巳巾干廾弋弓才"], -["a4a1","丑丐不中丰丹之尹予云井互五亢仁什仃仆仇仍今介仄元允內六兮公冗凶分切刈勻勾勿化匹午升卅卞厄友及反壬天夫太夭孔少尤尺屯巴幻廿弔引心戈戶手扎支文斗斤方日曰月木欠止歹毋比毛氏水火爪父爻片牙牛犬王丙"], -["a540","世丕且丘主乍乏乎以付仔仕他仗代令仙仞充兄冉冊冬凹出凸刊加功包匆北匝仟半卉卡占卯卮去可古右召叮叩叨叼司叵叫另只史叱台句叭叻四囚外"], -["a5a1","央失奴奶孕它尼巨巧左市布平幼弁弘弗必戊打扔扒扑斥旦朮本未末札正母民氐永汁汀氾犯玄玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕伍伐休伏仲件任仰仳份企伋光兇兆先全"], -["a640","共再冰列刑划刎刖劣匈匡匠印危吉吏同吊吐吁吋各向名合吃后吆吒因回囝圳地在圭圬圯圩夙多夷夸妄奸妃好她如妁字存宇守宅安寺尖屹州帆并年"], -["a6a1","式弛忙忖戎戌戍成扣扛托收早旨旬旭曲曳有朽朴朱朵次此死氖汝汗汙江池汐汕污汛汍汎灰牟牝百竹米糸缶羊羽老考而耒耳聿肉肋肌臣自至臼舌舛舟艮色艾虫血行衣西阡串亨位住佇佗佞伴佛何估佐佑伽伺伸佃佔似但佣"], -["a740","作你伯低伶余佝佈佚兌克免兵冶冷別判利刪刨劫助努劬匣即卵吝吭吞吾否呎吧呆呃吳呈呂君吩告吹吻吸吮吵吶吠吼呀吱含吟听囪困囤囫坊坑址坍"], -["a7a1","均坎圾坐坏圻壯夾妝妒妨妞妣妙妖妍妤妓妊妥孝孜孚孛完宋宏尬局屁尿尾岐岑岔岌巫希序庇床廷弄弟彤形彷役忘忌志忍忱快忸忪戒我抄抗抖技扶抉扭把扼找批扳抒扯折扮投抓抑抆改攻攸旱更束李杏材村杜杖杞杉杆杠"], -["a840","杓杗步每求汞沙沁沈沉沅沛汪決沐汰沌汨沖沒汽沃汲汾汴沆汶沍沔沘沂灶灼災灸牢牡牠狄狂玖甬甫男甸皂盯矣私秀禿究系罕肖肓肝肘肛肚育良芒"], -["a8a1","芋芍見角言谷豆豕貝赤走足身車辛辰迂迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯依侍佳使佬供例來侃佰併侈佩佻侖佾侏侑佺兔兒兕兩具其典冽函刻券刷刺到刮制剁劾劻卒協卓卑卦卷卸卹取叔受味呵"], -["a940","咖呸咕咀呻呷咄咒咆呼咐呱呶和咚呢周咋命咎固垃坷坪坩坡坦坤坼夜奉奇奈奄奔妾妻委妹妮姑姆姐姍始姓姊妯妳姒姅孟孤季宗定官宜宙宛尚屈居"], -["a9a1","屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往征彿彼忝忠忽念忿怏怔怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押拐拙拇拍抵拚抱拘拖拗拆抬拎放斧於旺昔易昌昆昂明昀昏昕昊"], -["aa40","昇服朋杭枋枕東果杳杷枇枝林杯杰板枉松析杵枚枓杼杪杲欣武歧歿氓氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油況沮泗泅泱沿治泡泛泊沬泯泜泖泠"], -["aaa1","炕炎炒炊炙爬爭爸版牧物狀狎狙狗狐玩玨玟玫玥甽疝疙疚的盂盲直知矽社祀祁秉秈空穹竺糾罔羌羋者肺肥肢肱股肫肩肴肪肯臥臾舍芳芝芙芭芽芟芹花芬芥芯芸芣芰芾芷虎虱初表軋迎返近邵邸邱邶采金長門阜陀阿阻附"], -["ab40","陂隹雨青非亟亭亮信侵侯便俠俑俏保促侶俘俟俊俗侮俐俄係俚俎俞侷兗冒冑冠剎剃削前剌剋則勇勉勃勁匍南卻厚叛咬哀咨哎哉咸咦咳哇哂咽咪品"], -["aba1","哄哈咯咫咱咻咩咧咿囿垂型垠垣垢城垮垓奕契奏奎奐姜姘姿姣姨娃姥姪姚姦威姻孩宣宦室客宥封屎屏屍屋峙峒巷帝帥帟幽庠度建弈弭彥很待徊律徇後徉怒思怠急怎怨恍恰恨恢恆恃恬恫恪恤扁拜挖按拼拭持拮拽指拱拷"], -["ac40","拯括拾拴挑挂政故斫施既春昭映昧是星昨昱昤曷柿染柱柔某柬架枯柵柩柯柄柑枴柚查枸柏柞柳枰柙柢柝柒歪殃殆段毒毗氟泉洋洲洪流津洌洱洞洗"], -["aca1","活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯炭炸炮炤爰牲牯牴狩狠狡玷珊玻玲珍珀玳甚甭畏界畎畋疫疤疥疢疣癸皆皇皈盈盆盃盅省盹相眉看盾盼眇矜砂研砌砍祆祉祈祇禹禺科秒秋穿突竿竽籽紂紅紀紉紇約紆缸美羿耄"], -["ad40","耐耍耑耶胖胥胚胃胄背胡胛胎胞胤胝致舢苧范茅苣苛苦茄若茂茉苒苗英茁苜苔苑苞苓苟苯茆虐虹虻虺衍衫要觔計訂訃貞負赴赳趴軍軌述迦迢迪迥"], -["ada1","迭迫迤迨郊郎郁郃酋酊重閂限陋陌降面革韋韭音頁風飛食首香乘亳倌倍倣俯倦倥俸倩倖倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉兼冤冥冢凍凌准凋剖剜剔剛剝匪卿原厝叟哨唐唁唷哼哥哲唆哺唔哩哭員唉哮哪"], -["ae40","哦唧唇哽唏圃圄埂埔埋埃堉夏套奘奚娑娘娜娟娛娓姬娠娣娩娥娌娉孫屘宰害家宴宮宵容宸射屑展屐峭峽峻峪峨峰島崁峴差席師庫庭座弱徒徑徐恙"], -["aea1","恣恥恐恕恭恩息悄悟悚悍悔悌悅悖扇拳挈拿捎挾振捕捂捆捏捉挺捐挽挪挫挨捍捌效敉料旁旅時晉晏晃晒晌晅晁書朔朕朗校核案框桓根桂桔栩梳栗桌桑栽柴桐桀格桃株桅栓栘桁殊殉殷氣氧氨氦氤泰浪涕消涇浦浸海浙涓"], -["af40","浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈烏爹特狼狹狽狸狷玆班琉珮珠珪珞畔畝畜畚留疾病症疲疳疽疼疹痂疸皋皰益盍盎眩真眠眨矩砰砧砸砝破砷"], -["afa1","砥砭砠砟砲祕祐祠祟祖神祝祗祚秤秣秧租秦秩秘窄窈站笆笑粉紡紗紋紊素索純紐紕級紜納紙紛缺罟羔翅翁耆耘耕耙耗耽耿胱脂胰脅胭胴脆胸胳脈能脊胼胯臭臬舀舐航舫舨般芻茫荒荔荊茸荐草茵茴荏茲茹茶茗荀茱茨荃"], -["b040","虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷袁袂衽衹記訐討訌訕訊託訓訖訏訑豈豺豹財貢起躬軒軔軏辱送逆迷退迺迴逃追逅迸邕郡郝郢酒配酌釘針釗釜釙閃院陣陡"], -["b0a1","陛陝除陘陞隻飢馬骨高鬥鬲鬼乾偺偽停假偃偌做偉健偶偎偕偵側偷偏倏偯偭兜冕凰剪副勒務勘動匐匏匙匿區匾參曼商啪啦啄啞啡啃啊唱啖問啕唯啤唸售啜唬啣唳啁啗圈國圉域堅堊堆埠埤基堂堵執培夠奢娶婁婉婦婪婀"], -["b140","娼婢婚婆婊孰寇寅寄寂宿密尉專將屠屜屝崇崆崎崛崖崢崑崩崔崙崤崧崗巢常帶帳帷康庸庶庵庾張強彗彬彩彫得徙從徘御徠徜恿患悉悠您惋悴惦悽"], -["b1a1","情悻悵惜悼惘惕惆惟悸惚惇戚戛扈掠控捲掖探接捷捧掘措捱掩掉掃掛捫推掄授掙採掬排掏掀捻捩捨捺敝敖救教敗啟敏敘敕敔斜斛斬族旋旌旎晝晚晤晨晦晞曹勗望梁梯梢梓梵桿桶梱梧梗械梃棄梭梆梅梔條梨梟梡梂欲殺"], -["b240","毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽犁猜猛猖猓猙率琅琊球理現琍瓠瓶"], -["b2a1","瓷甜產略畦畢異疏痔痕疵痊痍皎盔盒盛眷眾眼眶眸眺硫硃硎祥票祭移窒窕笠笨笛第符笙笞笮粒粗粕絆絃統紮紹紼絀細紳組累終紲紱缽羞羚翌翎習耜聊聆脯脖脣脫脩脰脤舂舵舷舶船莎莞莘荸莢莖莽莫莒莊莓莉莠荷荻荼"], -["b340","莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖袍袋覓規訪訝訣訥許設訟訛訢豉豚販責貫貨貪貧赧赦趾趺軛軟這逍通逗連速逝逐逕逞造透逢逖逛途"], -["b3a1","部郭都酗野釵釦釣釧釭釩閉陪陵陳陸陰陴陶陷陬雀雪雩章竟頂頃魚鳥鹵鹿麥麻傢傍傅備傑傀傖傘傚最凱割剴創剩勞勝勛博厥啻喀喧啼喊喝喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙圍堯堪場堤堰報堡堝堠壹壺奠"], -["b440","婷媚婿媒媛媧孳孱寒富寓寐尊尋就嵌嵐崴嵇巽幅帽幀幃幾廊廁廂廄弼彭復循徨惑惡悲悶惠愜愣惺愕惰惻惴慨惱愎惶愉愀愒戟扉掣掌描揀揩揉揆揍"], -["b4a1","插揣提握揖揭揮捶援揪換摒揚揹敞敦敢散斑斐斯普晰晴晶景暑智晾晷曾替期朝棺棕棠棘棗椅棟棵森棧棹棒棲棣棋棍植椒椎棉棚楮棻款欺欽殘殖殼毯氮氯氬港游湔渡渲湧湊渠渥渣減湛湘渤湖湮渭渦湯渴湍渺測湃渝渾滋"], -["b540","溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩琺琪琳琢琥琵琶琴琯琛琦琨甥甦畫番痢痛痣痙痘痞痠登發皖皓皴盜睏短硝硬硯稍稈程稅稀窘"], -["b5a1","窗窖童竣等策筆筐筒答筍筋筏筑粟粥絞結絨絕紫絮絲絡給絢絰絳善翔翕耋聒肅腕腔腋腑腎脹腆脾腌腓腴舒舜菩萃菸萍菠菅萋菁華菱菴著萊菰萌菌菽菲菊萸萎萄菜萇菔菟虛蛟蛙蛭蛔蛛蛤蛐蛞街裁裂袱覃視註詠評詞証詁"], -["b640","詔詛詐詆訴診訶詖象貂貯貼貳貽賁費賀貴買貶貿貸越超趁跎距跋跚跑跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥量鈔鈕鈣鈉鈞鈍鈐鈇鈑閔閏開閑"], -["b6a1","間閒閎隊階隋陽隅隆隍陲隄雁雅雄集雇雯雲韌項順須飧飪飯飩飲飭馮馭黃黍黑亂傭債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌塭塊塢塒塋奧嫁嫉嫌媾媽媼"], -["b740","媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚意慈感想愛惹愁愈慎慌慄慍愾愴愧愍愆愷戡戢搓搾搞搪搭搽搬搏搜搔損搶搖搗搆敬斟新暗暉暇暈暖暄暘暍會榔業"], -["b7a1","楚楷楠楔極椰概楊楨楫楞楓楹榆楝楣楛歇歲毀殿毓毽溢溯滓溶滂源溝滇滅溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷獅猿猾瑯瑚瑕瑟瑞瑁琿瑙瑛瑜當畸瘀痰瘁痲痱痺痿痴痳盞盟睛睫睦睞督"], -["b840","睹睪睬睜睥睨睢矮碎碰碗碘碌碉硼碑碓硿祺祿禁萬禽稜稚稠稔稟稞窟窠筷節筠筮筧粱粳粵經絹綑綁綏絛置罩罪署義羨群聖聘肆肄腱腰腸腥腮腳腫"], -["b8a1","腹腺腦舅艇蒂葷落萱葵葦葫葉葬葛萼萵葡董葩葭葆虞虜號蛹蜓蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘裝裡裊裕裒覜解詫該詳試詩詰誇詼詣誠話誅詭詢詮詬詹詻訾詨豢貊貉賊資賈賄貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊"], -["b940","辟農運遊道遂達逼違遐遇遏過遍遑逾遁鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉鉍鉅鈹鈿鉚閘隘隔隕雍雋雉雊雷電雹零靖靴靶預頑頓頊頒頌飼飴"], -["b9a1","飽飾馳馱馴髡鳩麂鼎鼓鼠僧僮僥僖僭僚僕像僑僱僎僩兢凳劃劂匱厭嗾嘀嘛嘗嗽嘔嘆嘉嘍嘎嗷嘖嘟嘈嘐嗶團圖塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣孵寞寧寡寥實寨寢寤察對屢嶄嶇幛幣幕幗幔廓廖弊彆彰徹慇"], -["ba40","愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧搴摭摻敲斡旗旖暢暨暝榜榨榕槁榮槓構榛榷榻榫榴槐槍榭槌榦槃榣歉歌氳漳演滾漓滴漩漾漠漬漏漂漢"], -["baa1","滿滯漆漱漸漲漣漕漫漯澈漪滬漁滲滌滷熔熙煽熊熄熒爾犒犖獄獐瑤瑣瑪瑰瑭甄疑瘧瘍瘋瘉瘓盡監瞄睽睿睡磁碟碧碳碩碣禎福禍種稱窪窩竭端管箕箋筵算箝箔箏箸箇箄粹粽精綻綰綜綽綾綠緊綴網綱綺綢綿綵綸維緒緇綬"], -["bb40","罰翠翡翟聞聚肇腐膀膏膈膊腿膂臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓蒐蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘蝕蜷蜩裳褂裴裹裸製裨褚裯誦誌語誣認誡誓誤"], -["bba1","說誥誨誘誑誚誧豪貍貌賓賑賒赫趙趕跼輔輒輕輓辣遠遘遜遣遙遞遢遝遛鄙鄘鄞酵酸酷酴鉸銀銅銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需靼鞅韶頗領颯颱餃餅餌餉駁骯骰髦魁魂鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜"], -["bc40","劇劈劉劍劊勰厲嘮嘻嘹嘲嘿嘴嘩噓噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦奭嬉嫻嬋嫵嬌嬈寮寬審寫層履嶝嶔幢幟幡廢廚廟廝廣廠彈影德徵慶慧慮慝慕憂"], -["bca1","慼慰慫慾憧憐憫憎憬憚憤憔憮戮摩摯摹撞撲撈撐撰撥撓撕撩撒撮播撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨樁樞標槽模樓樊槳樂樅槭樑歐歎殤毅毆漿潼澄潑潦潔澆潭潛潸潮澎潺潰潤澗潘滕潯潠潟熟熬熱熨牖犛獎獗瑩璋璃"], -["bd40","瑾璀畿瘠瘩瘟瘤瘦瘡瘢皚皺盤瞎瞇瞌瞑瞋磋磅確磊碾磕碼磐稿稼穀稽稷稻窯窮箭箱範箴篆篇篁箠篌糊締練緯緻緘緬緝編緣線緞緩綞緙緲緹罵罷羯"], -["bda1","翩耦膛膜膝膠膚膘蔗蔽蔚蓮蔬蔭蔓蔑蔣蔡蔔蓬蔥蓿蔆螂蝴蝶蝠蝦蝸蝨蝙蝗蝌蝓衛衝褐複褒褓褕褊誼諒談諄誕請諸課諉諂調誰論諍誶誹諛豌豎豬賠賞賦賤賬賭賢賣賜質賡赭趟趣踫踐踝踢踏踩踟踡踞躺輝輛輟輩輦輪輜輞"], -["be40","輥適遮遨遭遷鄰鄭鄧鄱醇醉醋醃鋅銻銷鋪銬鋤鋁銳銼鋒鋇鋰銲閭閱霄霆震霉靠鞍鞋鞏頡頫頜颳養餓餒餘駝駐駟駛駑駕駒駙骷髮髯鬧魅魄魷魯鴆鴉"], -["bea1","鴃麩麾黎墨齒儒儘儔儐儕冀冪凝劑劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶壁墾壇壅奮嬝嬴學寰導彊憲憑憩憊懍憶憾懊懈戰擅擁擋撻撼據擄擇擂操撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈歙歷氅濂澱澡"], -["bf40","濃澤濁澧澳激澹澶澦澠澴熾燉燐燒燈燕熹燎燙燜燃燄獨璜璣璘璟璞瓢甌甍瘴瘸瘺盧盥瞠瞞瞟瞥磨磚磬磧禦積穎穆穌穋窺篙簑築篤篛篡篩篦糕糖縊"], -["bfa1","縑縈縛縣縞縝縉縐罹羲翰翱翮耨膳膩膨臻興艘艙蕊蕙蕈蕨蕩蕃蕉蕭蕪蕞螃螟螞螢融衡褪褲褥褫褡親覦諦諺諫諱謀諜諧諮諾謁謂諷諭諳諶諼豫豭貓賴蹄踱踴蹂踹踵輻輯輸輳辨辦遵遴選遲遼遺鄴醒錠錶鋸錳錯錢鋼錫錄錚"], -["c040","錐錦錡錕錮錙閻隧隨險雕霎霑霖霍霓霏靛靜靦鞘頰頸頻頷頭頹頤餐館餞餛餡餚駭駢駱骸骼髻髭鬨鮑鴕鴣鴦鴨鴒鴛默黔龍龜優償儡儲勵嚎嚀嚐嚅嚇"], -["c0a1","嚏壕壓壑壎嬰嬪嬤孺尷屨嶼嶺嶽嶸幫彌徽應懂懇懦懋戲戴擎擊擘擠擰擦擬擱擢擭斂斃曙曖檀檔檄檢檜櫛檣橾檗檐檠歜殮毚氈濘濱濟濠濛濤濫濯澀濬濡濩濕濮濰燧營燮燦燥燭燬燴燠爵牆獰獲璩環璦璨癆療癌盪瞳瞪瞰瞬"], -["c140","瞧瞭矯磷磺磴磯礁禧禪穗窿簇簍篾篷簌篠糠糜糞糢糟糙糝縮績繆縷縲繃縫總縱繅繁縴縹繈縵縿縯罄翳翼聱聲聰聯聳臆臃膺臂臀膿膽臉膾臨舉艱薪"], -["c1a1","薄蕾薜薑薔薯薛薇薨薊虧蟀蟑螳蟒蟆螫螻螺蟈蟋褻褶襄褸褽覬謎謗謙講謊謠謝謄謐豁谿豳賺賽購賸賻趨蹉蹋蹈蹊轄輾轂轅輿避遽還邁邂邀鄹醣醞醜鍍鎂錨鍵鍊鍥鍋錘鍾鍬鍛鍰鍚鍔闊闋闌闈闆隱隸雖霜霞鞠韓顆颶餵騁"], -["c240","駿鮮鮫鮪鮭鴻鴿麋黏點黜黝黛鼾齋叢嚕嚮壙壘嬸彝懣戳擴擲擾攆擺擻擷斷曜朦檳檬櫃檻檸櫂檮檯歟歸殯瀉瀋濾瀆濺瀑瀏燻燼燾燸獷獵璧璿甕癖癘"], -["c2a1","癒瞽瞿瞻瞼礎禮穡穢穠竄竅簫簧簪簞簣簡糧織繕繞繚繡繒繙罈翹翻職聶臍臏舊藏薩藍藐藉薰薺薹薦蟯蟬蟲蟠覆覲觴謨謹謬謫豐贅蹙蹣蹦蹤蹟蹕軀轉轍邇邃邈醫醬釐鎔鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖闐闕離雜雙雛雞霤鞣鞦"], -["c340","鞭韹額顏題顎顓颺餾餿餽餮馥騎髁鬃鬆魏魎魍鯊鯉鯽鯈鯀鵑鵝鵠黠鼕鼬儳嚥壞壟壢寵龐廬懲懷懶懵攀攏曠曝櫥櫝櫚櫓瀛瀟瀨瀚瀝瀕瀘爆爍牘犢獸"], -["c3a1","獺璽瓊瓣疇疆癟癡矇礙禱穫穩簾簿簸簽簷籀繫繭繹繩繪羅繳羶羹羸臘藩藝藪藕藤藥藷蟻蠅蠍蟹蟾襠襟襖襞譁譜識證譚譎譏譆譙贈贊蹼蹲躇蹶蹬蹺蹴轔轎辭邊邋醱醮鏡鏑鏟鏃鏈鏜鏝鏖鏢鏍鏘鏤鏗鏨關隴難霪霧靡韜韻類"], -["c440","願顛颼饅饉騖騙鬍鯨鯧鯖鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤孀孃孽寶巉懸懺攘攔攙曦朧櫬瀾瀰瀲爐獻瓏癢癥礦礪礬礫竇競籌籃籍糯糰辮繽繼"], -["c4a1","纂罌耀臚艦藻藹蘑藺蘆蘋蘇蘊蠔蠕襤覺觸議譬警譯譟譫贏贍躉躁躅躂醴釋鐘鐃鏽闡霰飄饒饑馨騫騰騷騵鰓鰍鹹麵黨鼯齟齣齡儷儸囁囀囂夔屬巍懼懾攝攜斕曩櫻欄櫺殲灌爛犧瓖瓔癩矓籐纏續羼蘗蘭蘚蠣蠢蠡蠟襪襬覽譴"], -["c540","護譽贓躊躍躋轟辯醺鐮鐳鐵鐺鐸鐲鐫闢霸霹露響顧顥饗驅驃驀騾髏魔魑鰭鰥鶯鶴鷂鶸麝黯鼙齜齦齧儼儻囈囊囉孿巔巒彎懿攤權歡灑灘玀瓤疊癮癬"], -["c5a1","禳籠籟聾聽臟襲襯觼讀贖贗躑躓轡酈鑄鑑鑒霽霾韃韁顫饕驕驍髒鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬欐瓚竊籤籣籥纓纖纔臢蘸蘿蠱變邐邏鑣鑠鑤靨顯饜驚驛驗髓體髑鱔鱗鱖鷥麟黴囑壩攬灞癱癲矗罐羈蠶蠹衢讓讒"], -["c640","讖艷贛釀鑪靂靈靄韆顰驟鬢魘鱟鷹鷺鹼鹽鼇齷齲廳欖灣籬籮蠻觀躡釁鑲鑰顱饞髖鬣黌灤矚讚鑷韉驢驥纜讜躪釅鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲"], -["c940","乂乜凵匚厂万丌乇亍囗兀屮彳丏冇与丮亓仂仉仈冘勼卬厹圠夃夬尐巿旡殳毌气爿丱丼仨仜仩仡仝仚刌匜卌圢圣夗夯宁宄尒尻屴屳帄庀庂忉戉扐氕"], -["c9a1","氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈伝伂伅伢伓伄仴伒冱刓刉刐劦匢匟卍厊吇囡囟圮圪圴夼妀奼妅奻奾奷奿孖尕尥屼屺屻屾巟幵庄异弚彴忕忔忏扜扞扤扡扦扢扙扠扚扥旯旮朾朹朸朻机朿朼朳氘汆汒汜汏汊汔汋"], -["ca40","汌灱牞犴犵玎甪癿穵网艸艼芀艽艿虍襾邙邗邘邛邔阢阤阠阣佖伻佢佉体佤伾佧佒佟佁佘伭伳伿佡冏冹刜刞刡劭劮匉卣卲厎厏吰吷吪呔呅吙吜吥吘"], -["caa1","吽呏呁吨吤呇囮囧囥坁坅坌坉坋坒夆奀妦妘妠妗妎妢妐妏妧妡宎宒尨尪岍岏岈岋岉岒岊岆岓岕巠帊帎庋庉庌庈庍弅弝彸彶忒忑忐忭忨忮忳忡忤忣忺忯忷忻怀忴戺抃抌抎抏抔抇扱扻扺扰抁抈扷扽扲扴攷旰旴旳旲旵杅杇"], -["cb40","杙杕杌杈杝杍杚杋毐氙氚汸汧汫沄沋沏汱汯汩沚汭沇沕沜汦汳汥汻沎灴灺牣犿犽狃狆狁犺狅玕玗玓玔玒町甹疔疕皁礽耴肕肙肐肒肜芐芏芅芎芑芓"], -["cba1","芊芃芄豸迉辿邟邡邥邞邧邠阰阨阯阭丳侘佼侅佽侀侇佶佴侉侄佷佌侗佪侚佹侁佸侐侜侔侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿咁咑咂咈呫呺呾呥呬呴呦咍呯呡呠咘呣呧呤囷囹坯坲坭坫坱坰坶垀坵坻坳坴坢"], -["cc40","坨坽夌奅妵妺姏姎妲姌姁妶妼姃姖妱妽姀姈妴姇孢孥宓宕屄屇岮岤岠岵岯岨岬岟岣岭岢岪岧岝岥岶岰岦帗帔帙弨弢弣弤彔徂彾彽忞忥怭怦怙怲怋"], -["cca1","怴怊怗怳怚怞怬怢怍怐怮怓怑怌怉怜戔戽抭抴拑抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋昍昅旽昑昐曶朊枅杬枎枒杶杻枘枆构杴枍枌杺枟枑枙枃杽极杸杹枔欥殀歾毞氝沓泬泫泮泙沶泔沭泧沷泐泂沺泃泆泭泲"], -["cd40","泒泝沴沊沝沀泞泀洰泍泇沰泹泏泩泑炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡玭玦玢玠玬玝瓝瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺"], -["cda1","矷祂礿秅穸穻竻籵糽耵肏肮肣肸肵肭舠芠苀芫芚芘芛芵芧芮芼芞芺芴芨芡芩苂芤苃芶芢虰虯虭虮豖迒迋迓迍迖迕迗邲邴邯邳邰阹阽阼阺陃俍俅俓侲俉俋俁俔俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽卼厗厖厙厘咺咡咭咥哏"], -["ce40","哃茍咷咮哖咶哅哆咠呰咼咢咾呲哞咰垵垞垟垤垌垗垝垛垔垘垏垙垥垚垕壴复奓姡姞姮娀姱姝姺姽姼姶姤姲姷姛姩姳姵姠姾姴姭宨屌峐峘峌峗峋峛"], -["cea1","峞峚峉峇峊峖峓峔峏峈峆峎峟峸巹帡帢帣帠帤庰庤庢庛庣庥弇弮彖徆怷怹恔恲恞恅恓恇恉恛恌恀恂恟怤恄恘恦恮扂扃拏挍挋拵挎挃拫拹挏挌拸拶挀挓挔拺挕拻拰敁敃斪斿昶昡昲昵昜昦昢昳昫昺昝昴昹昮朏朐柁柲柈枺"], -["cf40","柜枻柸柘柀枷柅柫柤柟枵柍枳柷柶柮柣柂枹柎柧柰枲柼柆柭柌枮柦柛柺柉柊柃柪柋欨殂殄殶毖毘毠氠氡洨洴洭洟洼洿洒洊泚洳洄洙洺洚洑洀洝浂"], -["cfa1","洁洘洷洃洏浀洇洠洬洈洢洉洐炷炟炾炱炰炡炴炵炩牁牉牊牬牰牳牮狊狤狨狫狟狪狦狣玅珌珂珈珅玹玶玵玴珫玿珇玾珃珆玸珋瓬瓮甮畇畈疧疪癹盄眈眃眄眅眊盷盻盺矧矨砆砑砒砅砐砏砎砉砃砓祊祌祋祅祄秕种秏秖秎窀"], -["d040","穾竑笀笁籺籸籹籿粀粁紃紈紁罘羑羍羾耇耎耏耔耷胘胇胠胑胈胂胐胅胣胙胜胊胕胉胏胗胦胍臿舡芔苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪"], -["d0a1","苤苠苺苳苭虷虴虼虳衁衎衧衪衩觓訄訇赲迣迡迮迠郱邽邿郕郅邾郇郋郈釔釓陔陏陑陓陊陎倞倅倇倓倢倰倛俵俴倳倷倬俶俷倗倜倠倧倵倯倱倎党冔冓凊凄凅凈凎剡剚剒剞剟剕剢勍匎厞唦哢唗唒哧哳哤唚哿唄唈哫唑唅哱"], -["d140","唊哻哷哸哠唎唃唋圁圂埌堲埕埒垺埆垽垼垸垶垿埇埐垹埁夎奊娙娖娭娮娕娏娗娊娞娳孬宧宭宬尃屖屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧恝恚恧"], -["d1a1","恁悢悈悀悒悁悝悃悕悛悗悇悜悎戙扆拲挐捖挬捄捅挶捃揤挹捋捊挼挩捁挴捘捔捙挭捇挳捚捑挸捗捀捈敊敆旆旃旄旂晊晟晇晑朒朓栟栚桉栲栳栻桋桏栖栱栜栵栫栭栯桎桄栴栝栒栔栦栨栮桍栺栥栠欬欯欭欱欴歭肂殈毦毤"], -["d240","毨毣毢毧氥浺浣浤浶洍浡涒浘浢浭浯涑涍淯浿涆浞浧浠涗浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵涐烜烓烑烝烋缹烢烗烒烞烠烔烍烅烆烇烚烎烡牂牸"], -["d2a1","牷牶猀狺狴狾狶狳狻猁珓珙珥珖玼珧珣珩珜珒珛珔珝珚珗珘珨瓞瓟瓴瓵甡畛畟疰痁疻痄痀疿疶疺皊盉眝眛眐眓眒眣眑眕眙眚眢眧砣砬砢砵砯砨砮砫砡砩砳砪砱祔祛祏祜祓祒祑秫秬秠秮秭秪秜秞秝窆窉窅窋窌窊窇竘笐"], -["d340","笄笓笅笏笈笊笎笉笒粄粑粊粌粈粍粅紞紝紑紎紘紖紓紟紒紏紌罜罡罞罠罝罛羖羒翃翂翀耖耾耹胺胲胹胵脁胻脀舁舯舥茳茭荄茙荑茥荖茿荁茦茜茢"], -["d3a1","荂荎茛茪茈茼荍茖茤茠茷茯茩荇荅荌荓茞茬荋茧荈虓虒蚢蚨蚖蚍蚑蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎蚝蚐蚔衃衄衭衵衶衲袀衱衿衯袃衾衴衼訒豇豗豻貤貣赶赸趵趷趶軑軓迾迵适迿迻逄迼迶郖郠郙郚郣郟郥郘郛郗郜郤酐"], -["d440","酎酏釕釢釚陜陟隼飣髟鬯乿偰偪偡偞偠偓偋偝偲偈偍偁偛偊偢倕偅偟偩偫偣偤偆偀偮偳偗偑凐剫剭剬剮勖勓匭厜啵啶唼啍啐唴唪啑啢唶唵唰啒啅"], -["d4a1","唌唲啥啎唹啈唭唻啀啋圊圇埻堔埢埶埜埴堀埭埽堈埸堋埳埏堇埮埣埲埥埬埡堎埼堐埧堁堌埱埩埰堍堄奜婠婘婕婧婞娸娵婭婐婟婥婬婓婤婗婃婝婒婄婛婈媎娾婍娹婌婰婩婇婑婖婂婜孲孮寁寀屙崞崋崝崚崠崌崨崍崦崥崏"], -["d540","崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊悐悆悾悰悺惓惔惏惤惙惝惈悱惛悷惊悿惃惍惀挲捥掊掂捽掽掞掭掝掗掫掎捯掇掐据掯捵掜捭掮捼掤挻掟"], -["d5a1","捸掅掁掑掍捰敓旍晥晡晛晙晜晢朘桹梇梐梜桭桮梮梫楖桯梣梬梩桵桴梲梏桷梒桼桫桲梪梀桱桾梛梖梋梠梉梤桸桻梑梌梊桽欶欳欷欸殑殏殍殎殌氪淀涫涴涳湴涬淩淢涷淶淔渀淈淠淟淖涾淥淜淝淛淴淊涽淭淰涺淕淂淏淉"], -["d640","淐淲淓淽淗淍淣涻烺焍烷焗烴焌烰焄烳焐烼烿焆焓焀烸烶焋焂焎牾牻牼牿猝猗猇猑猘猊猈狿猏猞玈珶珸珵琄琁珽琇琀珺珼珿琌琋珴琈畤畣痎痒痏"], -["d6a1","痋痌痑痐皏皉盓眹眯眭眱眲眴眳眽眥眻眵硈硒硉硍硊硌砦硅硐祤祧祩祪祣祫祡离秺秸秶秷窏窔窐笵筇笴笥笰笢笤笳笘笪笝笱笫笭笯笲笸笚笣粔粘粖粣紵紽紸紶紺絅紬紩絁絇紾紿絊紻紨罣羕羜羝羛翊翋翍翐翑翇翏翉耟"], -["d740","耞耛聇聃聈脘脥脙脛脭脟脬脞脡脕脧脝脢舑舸舳舺舴舲艴莐莣莨莍荺荳莤荴莏莁莕莙荵莔莩荽莃莌莝莛莪莋荾莥莯莈莗莰荿莦莇莮荶莚虙虖蚿蚷"], -["d7a1","蛂蛁蛅蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜豝豽貥赽赻赹趼跂趹趿跁軘軞軝軜軗軠軡逤逋逑逜逌逡郯郪郰郴郲郳郔郫郬郩酖酘酚酓酕釬釴釱釳釸釤釹釪"], -["d840","釫釷釨釮镺閆閈陼陭陫陱陯隿靪頄飥馗傛傕傔傞傋傣傃傌傎傝偨傜傒傂傇兟凔匒匑厤厧喑喨喥喭啷噅喢喓喈喏喵喁喣喒喤啽喌喦啿喕喡喎圌堩堷"], -["d8a1","堙堞堧堣堨埵塈堥堜堛堳堿堶堮堹堸堭堬堻奡媯媔媟婺媢媞婸媦婼媥媬媕媮娷媄媊媗媃媋媩婻婽媌媜媏媓媝寪寍寋寔寑寊寎尌尰崷嵃嵫嵁嵋崿崵嵑嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄幁彘徦徥徫惉悹惌惢惎惄愔"], -["d940","惲愊愖愅惵愓惸惼惾惁愃愘愝愐惿愄愋扊掔掱掰揎揥揨揯揃撝揳揊揠揶揕揲揵摡揟掾揝揜揄揘揓揂揇揌揋揈揰揗揙攲敧敪敤敜敨敥斌斝斞斮旐旒"], -["d9a1","晼晬晻暀晱晹晪晲朁椌棓椄棜椪棬棪棱椏棖棷棫棤棶椓椐棳棡椇棌椈楰梴椑棯棆椔棸棐棽棼棨椋椊椗棎棈棝棞棦棴棑椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿湁湝湳渜渳湋湀湑渻渃渮湞"], -["da40","湨湜湡渱渨湠湱湫渹渢渰湓湥渧湸湤湷湕湹湒湦渵渶湚焠焞焯烻焮焱焣焥焢焲焟焨焺焛牋牚犈犉犆犅犋猒猋猰猢猱猳猧猲猭猦猣猵猌琮琬琰琫琖"], -["daa1","琚琡琭琱琤琣琝琩琠琲瓻甯畯畬痧痚痡痦痝痟痤痗皕皒盚睆睇睄睍睅睊睎睋睌矞矬硠硤硥硜硭硱硪确硰硩硨硞硢祴祳祲祰稂稊稃稌稄窙竦竤筊笻筄筈筌筎筀筘筅粢粞粨粡絘絯絣絓絖絧絪絏絭絜絫絒絔絩絑絟絎缾缿罥"], -["db40","罦羢羠羡翗聑聏聐胾胔腃腊腒腏腇脽腍脺臦臮臷臸臹舄舼舽舿艵茻菏菹萣菀菨萒菧菤菼菶萐菆菈菫菣莿萁菝菥菘菿菡菋菎菖菵菉萉萏菞萑萆菂菳"], -["dba1","菕菺菇菑菪萓菃菬菮菄菻菗菢萛菛菾蛘蛢蛦蛓蛣蛚蛪蛝蛫蛜蛬蛩蛗蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲褁裉覕覘覗觝觚觛詎詍訹詙詀詗詘詄詅詒詈詑詊詌詏豟貁貀貺貾貰貹貵趄趀趉跘跓跍跇跖跜跏跕跙跈跗跅軯軷軺"], -["dc40","軹軦軮軥軵軧軨軶軫軱軬軴軩逭逴逯鄆鄬鄄郿郼鄈郹郻鄁鄀鄇鄅鄃酡酤酟酢酠鈁鈊鈥鈃鈚鈦鈏鈌鈀鈒釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻閍閌閐隇陾隈"], -["dca1","隉隃隀雂雈雃雱雰靬靰靮頇颩飫鳦黹亃亄亶傽傿僆傮僄僊傴僈僂傰僁傺傱僋僉傶傸凗剺剸剻剼嗃嗛嗌嗐嗋嗊嗝嗀嗔嗄嗩喿嗒喍嗏嗕嗢嗖嗈嗲嗍嗙嗂圔塓塨塤塏塍塉塯塕塎塝塙塥塛堽塣塱壼嫇嫄嫋媺媸媱媵媰媿嫈媻嫆"], -["dd40","媷嫀嫊媴媶嫍媹媐寖寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰幏幎幊幍幋廅廌廆廋廇彀徯徭惷慉慊愫慅愶愲愮慆愯慏愩慀戠酨戣戥戤揅揱揫搐搒搉搠搤"], -["dda1","搳摃搟搕搘搹搷搢搣搌搦搰搨摁搵搯搊搚摀搥搧搋揧搛搮搡搎敯斒旓暆暌暕暐暋暊暙暔晸朠楦楟椸楎楢楱椿楅楪椹楂楗楙楺楈楉椵楬椳椽楥棰楸椴楩楀楯楄楶楘楁楴楌椻楋椷楜楏楑椲楒椯楻椼歆歅歃歂歈歁殛嗀毻毼"], -["de40","毹毷毸溛滖滈溏滀溟溓溔溠溱溹滆滒溽滁溞滉溷溰滍溦滏溲溾滃滜滘溙溒溎溍溤溡溿溳滐滊溗溮溣煇煔煒煣煠煁煝煢煲煸煪煡煂煘煃煋煰煟煐煓"], -["dea1","煄煍煚牏犍犌犑犐犎猼獂猻猺獀獊獉瑄瑊瑋瑒瑑瑗瑀瑏瑐瑎瑂瑆瑍瑔瓡瓿瓾瓽甝畹畷榃痯瘏瘃痷痾痼痹痸瘐痻痶痭痵痽皙皵盝睕睟睠睒睖睚睩睧睔睙睭矠碇碚碔碏碄碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓"], -["df40","稛稐窣窢窞竫筦筤筭筴筩筲筥筳筱筰筡筸筶筣粲粴粯綈綆綀綍絿綅絺綎絻綃絼綌綔綄絽綒罭罫罧罨罬羦羥羧翛翜耡腤腠腷腜腩腛腢腲朡腞腶腧腯"], -["dfa1","腄腡舝艉艄艀艂艅蓱萿葖葶葹蒏蒍葥葑葀蒆葧萰葍葽葚葙葴葳葝蔇葞萷萺萴葺葃葸萲葅萩菙葋萯葂萭葟葰萹葎葌葒葯蓅蒎萻葇萶萳葨葾葄萫葠葔葮葐蜋蜄蛷蜌蛺蛖蛵蝍蛸蜎蜉蜁蛶蜍蜅裖裋裍裎裞裛裚裌裐覅覛觟觥觤"], -["e040","觡觠觢觜触詶誆詿詡訿詷誂誄詵誃誁詴詺谼豋豊豥豤豦貆貄貅賌赨赩趑趌趎趏趍趓趔趐趒跰跠跬跱跮跐跩跣跢跧跲跫跴輆軿輁輀輅輇輈輂輋遒逿"], -["e0a1","遄遉逽鄐鄍鄏鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆鉭鉬鉏鉠鉧鉯鈶鉡鉰鈱鉔鉣鉐鉲鉎鉓鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵靳靷靸靲頏頍頎颬飶飹馯馲馰馵骭骫魛鳪鳭鳧麀黽僦僔僗僨僳僛僪僝僤僓僬僰僯僣僠"], -["e140","凘劀劁勩勫匰厬嘧嘕嘌嘒嗼嘏嘜嘁嘓嘂嗺嘝嘄嗿嗹墉塼墐墘墆墁塿塴墋塺墇墑墎塶墂墈塻墔墏壾奫嫜嫮嫥嫕嫪嫚嫭嫫嫳嫢嫠嫛嫬嫞嫝嫙嫨嫟孷寠"], -["e1a1","寣屣嶂嶀嵽嶆嵺嶁嵷嶊嶉嶈嵾嵼嶍嵹嵿幘幙幓廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨慁慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫搫摍摛摝摴摶摲摳摽摵摦撦摎撂摞摜摋摓摠摐摿搿摬摫摙摥摷敳斠暡暠暟朅朄朢榱榶槉"], -["e240","榠槎榖榰榬榼榑榙榎榧榍榩榾榯榿槄榽榤槔榹槊榚槏榳榓榪榡榞槙榗榐槂榵榥槆歊歍歋殞殟殠毃毄毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒滭漊"], -["e2a1","漶潳滹滮漭潀漰漼漵滫漇漎潃漅滽滶漹漜滼漺漟漍漞漈漡熇熐熉熀熅熂熏煻熆熁熗牄牓犗犕犓獃獍獑獌瑢瑳瑱瑵瑲瑧瑮甀甂甃畽疐瘖瘈瘌瘕瘑瘊瘔皸瞁睼瞅瞂睮瞀睯睾瞃碲碪碴碭碨硾碫碞碥碠碬碢碤禘禊禋禖禕禔禓"], -["e340","禗禈禒禐稫穊稰稯稨稦窨窫窬竮箈箜箊箑箐箖箍箌箛箎箅箘劄箙箤箂粻粿粼粺綧綷緂綣綪緁緀緅綝緎緄緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞"], -["e3a1","耤聝聜膉膆膃膇膍膌膋舕蒗蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴蓁蓍蒪蒚蒱蓐蒝蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶蓏蒠蓗蓔蓒蓛蒰蒑虡蜳蜣蜨蝫蝀蜮蜞蜡蜙蜛蝃蜬蝁蜾蝆蜠蜲蜪蜭蜼蜒蜺蜱蜵蝂蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻"], -["e440","裰裬裫覝覡覟覞觩觫觨誫誙誋誒誏誖谽豨豩賕賏賗趖踉踂跿踍跽踊踃踇踆踅跾踀踄輐輑輎輍鄣鄜鄠鄢鄟鄝鄚鄤鄡鄛酺酲酹酳銥銤鉶銛鉺銠銔銪銍"], -["e4a1","銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩銝銋鈭隞隡雿靘靽靺靾鞃鞀鞂靻鞄鞁靿韎韍頖颭颮餂餀餇馝馜駃馹馻馺駂馽駇骱髣髧鬾鬿魠魡魟鳱鳲鳵麧僿儃儰僸儆儇僶僾儋儌僽儊劋劌勱勯噈噂噌嘵噁噊噉噆噘"], -["e540","噚噀嘳嘽嘬嘾嘸嘪嘺圚墫墝墱墠墣墯墬墥墡壿嫿嫴嫽嫷嫶嬃嫸嬂嫹嬁嬇嬅嬏屧嶙嶗嶟嶒嶢嶓嶕嶠嶜嶡嶚嶞幩幝幠幜緳廛廞廡彉徲憋憃慹憱憰憢憉"], -["e5a1","憛憓憯憭憟憒憪憡憍慦憳戭摮摰撖撠撅撗撜撏撋撊撌撣撟摨撱撘敶敺敹敻斲斳暵暰暩暲暷暪暯樀樆樗槥槸樕槱槤樠槿槬槢樛樝槾樧槲槮樔槷槧橀樈槦槻樍槼槫樉樄樘樥樏槶樦樇槴樖歑殥殣殢殦氁氀毿氂潁漦潾澇濆澒"], -["e640","澍澉澌潢潏澅潚澖潶潬澂潕潲潒潐潗澔澓潝漀潡潫潽潧澐潓澋潩潿澕潣潷潪潻熲熯熛熰熠熚熩熵熝熥熞熤熡熪熜熧熳犘犚獘獒獞獟獠獝獛獡獚獙"], -["e6a1","獢璇璉璊璆璁瑽璅璈瑼瑹甈甇畾瘥瘞瘙瘝瘜瘣瘚瘨瘛皜皝皞皛瞍瞏瞉瞈磍碻磏磌磑磎磔磈磃磄磉禚禡禠禜禢禛歶稹窲窴窳箷篋箾箬篎箯箹篊箵糅糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰羭翭翫翪翬翦翨聤聧膣膟"], -["e740","膞膕膢膙膗舖艏艓艒艐艎艑蔤蔻蔏蔀蔩蔎蔉蔍蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨蔝蔮蔂蓽蔞蓶蔱蔦蓧蓨蓰蓯蓹蔘蔠蔰蔋蔙蔯虢"], -["e7a1","蝖蝣蝤蝷蟡蝳蝘蝔蝛蝒蝡蝚蝑蝞蝭蝪蝐蝎蝟蝝蝯蝬蝺蝮蝜蝥蝏蝻蝵蝢蝧蝩衚褅褌褔褋褗褘褙褆褖褑褎褉覢覤覣觭觰觬諏諆誸諓諑諔諕誻諗誾諀諅諘諃誺誽諙谾豍貏賥賟賙賨賚賝賧趠趜趡趛踠踣踥踤踮踕踛踖踑踙踦踧"], -["e840","踔踒踘踓踜踗踚輬輤輘輚輠輣輖輗遳遰遯遧遫鄯鄫鄩鄪鄲鄦鄮醅醆醊醁醂醄醀鋐鋃鋄鋀鋙銶鋏鋱鋟鋘鋩鋗鋝鋌鋯鋂鋨鋊鋈鋎鋦鋍鋕鋉鋠鋞鋧鋑鋓"], -["e8a1","銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂靚鞊鞎鞈韐韏頞頝頦頩頨頠頛頧颲餈飺餑餔餖餗餕駜駍駏駓駔駎駉駖駘駋駗駌骳髬髫髳髲髱魆魃魧魴魱魦魶魵魰魨魤魬鳼鳺鳽鳿鳷鴇鴀鳹鳻鴈鴅鴄麃黓鼏鼐儜儓儗儚儑凞匴叡噰噠噮"], -["e940","噳噦噣噭噲噞噷圜圛壈墽壉墿墺壂墼壆嬗嬙嬛嬡嬔嬓嬐嬖嬨嬚嬠嬞寯嶬嶱嶩嶧嶵嶰嶮嶪嶨嶲嶭嶯嶴幧幨幦幯廩廧廦廨廥彋徼憝憨憖懅憴懆懁懌憺"], -["e9a1","憿憸憌擗擖擐擏擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋曏暽暻暺曌朣樴橦橉橧樲橨樾橝橭橶橛橑樨橚樻樿橁橪橤橐橏橔橯橩橠樼橞橖橕橍橎橆歕歔歖殧殪殫毈毇氄氃氆澭濋澣濇澼濎濈潞濄澽澞濊澨瀄澥澮澺澬澪濏澿澸"], -["ea40","澢濉澫濍澯澲澰燅燂熿熸燖燀燁燋燔燊燇燏熽燘熼燆燚燛犝犞獩獦獧獬獥獫獪瑿璚璠璔璒璕璡甋疀瘯瘭瘱瘽瘳瘼瘵瘲瘰皻盦瞚瞝瞡瞜瞛瞢瞣瞕瞙"], -["eaa1","瞗磝磩磥磪磞磣磛磡磢磭磟磠禤穄穈穇窶窸窵窱窷篞篣篧篝篕篥篚篨篹篔篪篢篜篫篘篟糒糔糗糐糑縒縡縗縌縟縠縓縎縜縕縚縢縋縏縖縍縔縥縤罃罻罼罺羱翯耪耩聬膱膦膮膹膵膫膰膬膴膲膷膧臲艕艖艗蕖蕅蕫蕍蕓蕡蕘"], -["eb40","蕀蕆蕤蕁蕢蕄蕑蕇蕣蔾蕛蕱蕎蕮蕵蕕蕧蕠薌蕦蕝蕔蕥蕬虣虥虤螛螏螗螓螒螈螁螖螘蝹螇螣螅螐螑螝螄螔螜螚螉褞褦褰褭褮褧褱褢褩褣褯褬褟觱諠"], -["eba1","諢諲諴諵諝謔諤諟諰諈諞諡諨諿諯諻貑貒貐賵賮賱賰賳赬赮趥趧踳踾踸蹀蹅踶踼踽蹁踰踿躽輶輮輵輲輹輷輴遶遹遻邆郺鄳鄵鄶醓醐醑醍醏錧錞錈錟錆錏鍺錸錼錛錣錒錁鍆錭錎錍鋋錝鋺錥錓鋹鋷錴錂錤鋿錩錹錵錪錔錌"], -["ec40","錋鋾錉錀鋻錖閼闍閾閹閺閶閿閵閽隩雔霋霒霐鞙鞗鞔韰韸頵頯頲餤餟餧餩馞駮駬駥駤駰駣駪駩駧骹骿骴骻髶髺髹髷鬳鮀鮅鮇魼魾魻鮂鮓鮒鮐魺鮕"], -["eca1","魽鮈鴥鴗鴠鴞鴔鴩鴝鴘鴢鴐鴙鴟麈麆麇麮麭黕黖黺鼒鼽儦儥儢儤儠儩勴嚓嚌嚍嚆嚄嚃噾嚂噿嚁壖壔壏壒嬭嬥嬲嬣嬬嬧嬦嬯嬮孻寱寲嶷幬幪徾徻懃憵憼懧懠懥懤懨懞擯擩擣擫擤擨斁斀斶旚曒檍檖檁檥檉檟檛檡檞檇檓檎"], -["ed40","檕檃檨檤檑橿檦檚檅檌檒歛殭氉濌澩濴濔濣濜濭濧濦濞濲濝濢濨燡燱燨燲燤燰燢獳獮獯璗璲璫璐璪璭璱璥璯甐甑甒甏疄癃癈癉癇皤盩瞵瞫瞲瞷瞶"], -["eda1","瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀竁簅簏篲簀篿篻簎篴簋篳簂簉簃簁篸篽簆篰篱簐簊糨縭縼繂縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀薏薧薕薠薋薣蕻薤薚薞"], -["ee40","蕷蕼薉薡蕺蕸蕗薎薖薆薍薙薝薁薢薂薈薅蕹蕶薘薐薟虨螾螪螭蟅螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾襁襒褷襂覭覯覮觲觳謞"], -["eea1","謘謖謑謅謋謢謏謒謕謇謍謈謆謜謓謚豏豰豲豱豯貕貔賹赯蹎蹍蹓蹐蹌蹇轃轀邅遾鄸醚醢醛醙醟醡醝醠鎡鎃鎯鍤鍖鍇鍼鍘鍜鍶鍉鍐鍑鍠鍭鎏鍌鍪鍹鍗鍕鍒鍏鍱鍷鍻鍡鍞鍣鍧鎀鍎鍙闇闀闉闃闅閷隮隰隬霠霟霘霝霙鞚鞡鞜"], -["ef40","鞞鞝韕韔韱顁顄顊顉顅顃餥餫餬餪餳餲餯餭餱餰馘馣馡騂駺駴駷駹駸駶駻駽駾駼騃骾髾髽鬁髼魈鮚鮨鮞鮛鮦鮡鮥鮤鮆鮢鮠鮯鴳鵁鵧鴶鴮鴯鴱鴸鴰"], -["efa1","鵅鵂鵃鴾鴷鵀鴽翵鴭麊麉麍麰黈黚黻黿鼤鼣鼢齔龠儱儭儮嚘嚜嚗嚚嚝嚙奰嬼屩屪巀幭幮懘懟懭懮懱懪懰懫懖懩擿攄擽擸攁攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴檭歞毉氋瀇瀌瀍瀁瀅瀔瀎濿瀀濻瀦濼濷瀊爁燿燹爃燽獶"], -["f040","璸瓀璵瓁璾璶璻瓂甔甓癜癤癙癐癓癗癚皦皽盬矂瞺磿礌礓礔礉礐礒礑禭禬穟簜簩簙簠簟簭簝簦簨簢簥簰繜繐繖繣繘繢繟繑繠繗繓羵羳翷翸聵臑臒"], -["f0a1","臐艟艞薴藆藀藃藂薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓蟭蟘蟣螤蟗蟙蠁蟴蟨蟝襓襋襏襌襆襐襑襉謪謧謣謳謰謵譇謯謼謾謱謥謷謦謶謮謤謻謽謺豂豵貙貘貗賾贄贂贀蹜蹢蹠蹗蹖蹞蹥蹧"], -["f140","蹛蹚蹡蹝蹩蹔轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛鎝鎉鎧鎎鎪鎞鎦鎕鎈鎙鎟鎍鎱鎑鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘雝霣霢霥鞬鞮鞨鞫鞤鞪"], -["f1a1","鞢鞥韗韙韖韘韺顐顑顒颸饁餼餺騏騋騉騍騄騑騊騅騇騆髀髜鬈鬄鬅鬩鬵魊魌魋鯇鯆鯃鮿鯁鮵鮸鯓鮶鯄鮹鮽鵜鵓鵏鵊鵛鵋鵙鵖鵌鵗鵒鵔鵟鵘鵚麎麌黟鼁鼀鼖鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫嚭嚦嚧嚪嚬壚壝壛夒嬽嬾嬿巃幰"], -["f240","徿懻攇攐攍攉攌攎斄旞旝曞櫧櫠櫌櫑櫙櫋櫟櫜櫐櫫櫏櫍櫞歠殰氌瀙瀧瀠瀖瀫瀡瀢瀣瀩瀗瀤瀜瀪爌爊爇爂爅犥犦犤犣犡瓋瓅璷瓃甖癠矉矊矄矱礝礛"], -["f2a1","礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾聸臗臕艤艡艣藫藱藭藙藡藨藚藗藬藲藸藘藟藣藜藑藰藦藯藞藢蠀蟺蠃蟶蟷蠉蠌蠋蠆蟼蠈蟿蠊蠂襢襚襛襗襡襜襘襝襙覈覷覶觶譐譈譊譀譓譖譔譋譕"], -["f340","譑譂譒譗豃豷豶貚贆贇贉趬趪趭趫蹭蹸蹳蹪蹯蹻軂轒轑轏轐轓辴酀鄿醰醭鏞鏇鏏鏂鏚鏐鏹鏬鏌鏙鎩鏦鏊鏔鏮鏣鏕鏄鏎鏀鏒鏧镽闚闛雡霩霫霬霨霦"], -["f3a1","鞳鞷鞶韝韞韟顜顙顝顗颿颽颻颾饈饇饃馦馧騚騕騥騝騤騛騢騠騧騣騞騜騔髂鬋鬊鬎鬌鬷鯪鯫鯠鯞鯤鯦鯢鯰鯔鯗鯬鯜鯙鯥鯕鯡鯚鵷鶁鶊鶄鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼鼭齀齁齍齖齗齘匷嚲"], -["f440","嚵嚳壣孅巆巇廮廯忀忁懹攗攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱灂瀸瀿瀺瀹灀瀻瀳灁爓爔犨獽獼璺皫皪皾盭矌矎矏矍矲礥礣礧礨礤礩"], -["f4a1","禲穮穬穭竷籉籈籊籇籅糮繻繾纁纀羺翿聹臛臙舋艨艩蘢藿蘁藾蘛蘀藶蘄蘉蘅蘌藽蠙蠐蠑蠗蠓蠖襣襦覹觷譠譪譝譨譣譥譧譭趮躆躈躄轙轖轗轕轘轚邍酃酁醷醵醲醳鐋鐓鏻鐠鐏鐔鏾鐕鐐鐨鐙鐍鏵鐀鏷鐇鐎鐖鐒鏺鐉鏸鐊鏿"], -["f540","鏼鐌鏶鐑鐆闞闠闟霮霯鞹鞻韽韾顠顢顣顟飁飂饐饎饙饌饋饓騲騴騱騬騪騶騩騮騸騭髇髊髆鬐鬒鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤鶝鶒鶘鶐鶛"], -["f5a1","鶠鶔鶜鶪鶗鶡鶚鶢鶨鶞鶣鶿鶩鶖鶦鶧麙麛麚黥黤黧黦鼰鼮齛齠齞齝齙龑儺儹劘劗囃嚽嚾孈孇巋巏廱懽攛欂櫼欃櫸欀灃灄灊灈灉灅灆爝爚爙獾甗癪矐礭礱礯籔籓糲纊纇纈纋纆纍罍羻耰臝蘘蘪蘦蘟蘣蘜蘙蘧蘮蘡蘠蘩蘞蘥"], -["f640","蠩蠝蠛蠠蠤蠜蠫衊襭襩襮襫觺譹譸譅譺譻贐贔趯躎躌轞轛轝酆酄酅醹鐿鐻鐶鐩鐽鐼鐰鐹鐪鐷鐬鑀鐱闥闤闣霵霺鞿韡顤飉飆飀饘饖騹騽驆驄驂驁騺"], -["f6a1","騿髍鬕鬗鬘鬖鬺魒鰫鰝鰜鰬鰣鰨鰩鰤鰡鶷鶶鶼鷁鷇鷊鷏鶾鷅鷃鶻鶵鷎鶹鶺鶬鷈鶱鶭鷌鶳鷍鶲鹺麜黫黮黭鼛鼘鼚鼱齎齥齤龒亹囆囅囋奱孋孌巕巑廲攡攠攦攢欋欈欉氍灕灖灗灒爞爟犩獿瓘瓕瓙瓗癭皭礵禴穰穱籗籜籙籛籚"], -["f740","糴糱纑罏羇臞艫蘴蘵蘳蘬蘲蘶蠬蠨蠦蠪蠥襱覿覾觻譾讄讂讆讅譿贕躕躔躚躒躐躖躗轠轢酇鑌鑐鑊鑋鑏鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌驏驈驊"], -["f7a1","驉驒驐髐鬙鬫鬻魖魕鱆鱈鰿鱄鰹鰳鱁鰼鰷鰴鰲鰽鰶鷛鷒鷞鷚鷋鷐鷜鷑鷟鷩鷙鷘鷖鷵鷕鷝麶黰鼵鼳鼲齂齫龕龢儽劙壨壧奲孍巘蠯彏戁戃戄攩攥斖曫欑欒欏毊灛灚爢玂玁玃癰矔籧籦纕艬蘺虀蘹蘼蘱蘻蘾蠰蠲蠮蠳襶襴襳觾"], -["f840","讌讎讋讈豅贙躘轤轣醼鑢鑕鑝鑗鑞韄韅頀驖驙鬞鬟鬠鱒鱘鱐鱊鱍鱋鱕鱙鱌鱎鷻鷷鷯鷣鷫鷸鷤鷶鷡鷮鷦鷲鷰鷢鷬鷴鷳鷨鷭黂黐黲黳鼆鼜鼸鼷鼶齃齏"], -["f8a1","齱齰齮齯囓囍孎屭攭曭曮欓灟灡灝灠爣瓛瓥矕礸禷禶籪纗羉艭虃蠸蠷蠵衋讔讕躞躟躠躝醾醽釂鑫鑨鑩雥靆靃靇韇韥驞髕魙鱣鱧鱦鱢鱞鱠鸂鷾鸇鸃鸆鸅鸀鸁鸉鷿鷽鸄麠鼞齆齴齵齶囔攮斸欘欙欗欚灢爦犪矘矙礹籩籫糶纚"], -["f940","纘纛纙臠臡虆虇虈襹襺襼襻觿讘讙躥躤躣鑮鑭鑯鑱鑳靉顲饟鱨鱮鱭鸋鸍鸐鸏鸒鸑麡黵鼉齇齸齻齺齹圞灦籯蠼趲躦釃鑴鑸鑶鑵驠鱴鱳鱱鱵鸔鸓黶鼊"], -["f9a1","龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓"] -] diff --git a/node_modules/iconv-lite/encodings/tables/eucjp.json b/node_modules/iconv-lite/encodings/tables/eucjp.json deleted file mode 100644 index 4fa61ca..0000000 --- a/node_modules/iconv-lite/encodings/tables/eucjp.json +++ /dev/null @@ -1,182 +0,0 @@ -[ -["0","\u0000",127], -["8ea1","。",62], -["a1a1"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇"], -["a2a1","◆□■△▲▽▼※〒→←↑↓〓"], -["a2ba","∈∋⊆⊇⊂⊃∪∩"], -["a2ca","∧∨¬⇒⇔∀∃"], -["a2dc","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"], -["a2f2","ʼn♯♭♪†‡¶"], -["a2fe","◯"], -["a3b0","0",9], -["a3c1","A",25], -["a3e1","a",25], -["a4a1","ぁ",82], -["a5a1","ァ",85], -["a6a1","Α",16,"Σ",6], -["a6c1","α",16,"σ",6], -["a7a1","А",5,"ЁЖ",25], -["a7d1","а",5,"ёж",25], -["a8a1","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"], -["ada1","①",19,"Ⅰ",9], -["adc0","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"], -["addf","㍻〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"], -["b0a1","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"], -["b1a1","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応"], -["b2a1","押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"], -["b3a1","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱"], -["b4a1","粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"], -["b5a1","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京"], -["b6a1","供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"], -["b7a1","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲"], -["b8a1","検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"], -["b9a1","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込"], -["baa1","此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"], -["bba1","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時"], -["bca1","次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"], -["bda1","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償"], -["bea1","勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"], -["bfa1","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾"], -["c0a1","澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"], -["c1a1","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎"], -["c2a1","臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"], -["c3a1","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵"], -["c4a1","帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"], -["c5a1","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到"], -["c6a1","董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"], -["c7a1","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦"], -["c8a1","函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"], -["c9a1","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服"], -["caa1","福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"], -["cba1","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満"], -["cca1","漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"], -["cda1","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃"], -["cea1","痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"], -["cfa1","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"], -["d0a1","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"], -["d1a1","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨"], -["d2a1","辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"], -["d3a1","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉"], -["d4a1","圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"], -["d5a1","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓"], -["d6a1","屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"], -["d7a1","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚"], -["d8a1","悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"], -["d9a1","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼"], -["daa1","據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"], -["dba1","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍"], -["dca1","棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"], -["dda1","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾"], -["dea1","沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"], -["dfa1","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼"], -["e0a1","燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"], -["e1a1","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰"], -["e2a1","癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"], -["e3a1","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐"], -["e4a1","筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"], -["e5a1","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺"], -["e6a1","罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"], -["e7a1","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙"], -["e8a1","茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"], -["e9a1","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙"], -["eaa1","蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"], -["eba1","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫"], -["eca1","譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"], -["eda1","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸"], -["eea1","遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"], -["efa1","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞"], -["f0a1","陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"], -["f1a1","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷"], -["f2a1","髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"], -["f3a1","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠"], -["f4a1","堯槇遙瑤凜熙"], -["f9a1","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德"], -["faa1","忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"], -["fba1","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚"], -["fca1","釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"], -["fcf1","ⅰ",9,"¬¦'""], -["8fa2af","˘ˇ¸˙˝¯˛˚~΄΅"], -["8fa2c2","¡¦¿"], -["8fa2eb","ºª©®™¤№"], -["8fa6e1","ΆΈΉΊΪ"], -["8fa6e7","Ό"], -["8fa6e9","ΎΫ"], -["8fa6ec","Ώ"], -["8fa6f1","άέήίϊΐόςύϋΰώ"], -["8fa7c2","Ђ",10,"ЎЏ"], -["8fa7f2","ђ",10,"ўџ"], -["8fa9a1","ÆĐ"], -["8fa9a4","Ħ"], -["8fa9a6","IJ"], -["8fa9a8","ŁĿ"], -["8fa9ab","ŊØŒ"], -["8fa9af","ŦÞ"], -["8fa9c1","æđðħıijĸłŀʼnŋøœßŧþ"], -["8faaa1","ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈËÊĚĖĒĘ"], -["8faaba","ĜĞĢĠĤÍÌÏÎǏİĪĮĨĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙǕŴÝŸŶŹŽŻ"], -["8faba1","áàäâăǎāąåãćĉčçċďéèëêěėēęǵĝğ"], -["8fabbd","ġĥíìïîǐ"], -["8fabc5","īįĩĵķĺľļńňņñóòöôǒőōõŕřŗśŝšşťţúùüûŭǔűūųůũǘǜǚǖŵýÿŷźžż"], -["8fb0a1","丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄"], -["8fb1a1","侅侉侊侌侎侐侒侓侔侗侙侚侞侟侲侷侹侻侼侽侾俀俁俅俆俈俉俋俌俍俏俒俜俠俢俰俲俼俽俿倀倁倄倇倊倌倎倐倓倗倘倛倜倝倞倢倧倮倰倲倳倵偀偁偂偅偆偊偌偎偑偒偓偗偙偟偠偢偣偦偧偪偭偰偱倻傁傃傄傆傊傎傏傐"], -["8fb2a1","傒傓傔傖傛傜傞",4,"傪傯傰傹傺傽僀僃僄僇僌僎僐僓僔僘僜僝僟僢僤僦僨僩僯僱僶僺僾儃儆儇儈儋儌儍儎僲儐儗儙儛儜儝儞儣儧儨儬儭儯儱儳儴儵儸儹兂兊兏兓兕兗兘兟兤兦兾冃冄冋冎冘冝冡冣冭冸冺冼冾冿凂"], -["8fb3a1","凈减凑凒凓凕凘凞凢凥凮凲凳凴凷刁刂刅划刓刕刖刘刢刨刱刲刵刼剅剉剕剗剘剚剜剟剠剡剦剮剷剸剹劀劂劅劊劌劓劕劖劗劘劚劜劤劥劦劧劯劰劶劷劸劺劻劽勀勄勆勈勌勏勑勔勖勛勜勡勥勨勩勪勬勰勱勴勶勷匀匃匊匋"], -["8fb4a1","匌匑匓匘匛匜匞匟匥匧匨匩匫匬匭匰匲匵匼匽匾卂卌卋卙卛卡卣卥卬卭卲卹卾厃厇厈厎厓厔厙厝厡厤厪厫厯厲厴厵厷厸厺厽叀叅叏叒叓叕叚叝叞叠另叧叵吂吓吚吡吧吨吪启吱吴吵呃呄呇呍呏呞呢呤呦呧呩呫呭呮呴呿"], -["8fb5a1","咁咃咅咈咉咍咑咕咖咜咟咡咦咧咩咪咭咮咱咷咹咺咻咿哆哊响哎哠哪哬哯哶哼哾哿唀唁唅唈唉唌唍唎唕唪唫唲唵唶唻唼唽啁啇啉啊啍啐啑啘啚啛啞啠啡啤啦啿喁喂喆喈喎喏喑喒喓喔喗喣喤喭喲喿嗁嗃嗆嗉嗋嗌嗎嗑嗒"], -["8fb6a1","嗓嗗嗘嗛嗞嗢嗩嗶嗿嘅嘈嘊嘍",5,"嘙嘬嘰嘳嘵嘷嘹嘻嘼嘽嘿噀噁噃噄噆噉噋噍噏噔噞噠噡噢噣噦噩噭噯噱噲噵嚄嚅嚈嚋嚌嚕嚙嚚嚝嚞嚟嚦嚧嚨嚩嚫嚬嚭嚱嚳嚷嚾囅囉囊囋囏囐囌囍囙囜囝囟囡囤",4,"囱囫园"], -["8fb7a1","囶囷圁圂圇圊圌圑圕圚圛圝圠圢圣圤圥圩圪圬圮圯圳圴圽圾圿坅坆坌坍坒坢坥坧坨坫坭",4,"坳坴坵坷坹坺坻坼坾垁垃垌垔垗垙垚垜垝垞垟垡垕垧垨垩垬垸垽埇埈埌埏埕埝埞埤埦埧埩埭埰埵埶埸埽埾埿堃堄堈堉埡"], -["8fb8a1","堌堍堛堞堟堠堦堧堭堲堹堿塉塌塍塏塐塕塟塡塤塧塨塸塼塿墀墁墇墈墉墊墌墍墏墐墔墖墝墠墡墢墦墩墱墲壄墼壂壈壍壎壐壒壔壖壚壝壡壢壩壳夅夆夋夌夒夓夔虁夝夡夣夤夨夯夰夳夵夶夿奃奆奒奓奙奛奝奞奟奡奣奫奭"], -["8fb9a1","奯奲奵奶她奻奼妋妌妎妒妕妗妟妤妧妭妮妯妰妳妷妺妼姁姃姄姈姊姍姒姝姞姟姣姤姧姮姯姱姲姴姷娀娄娌娍娎娒娓娞娣娤娧娨娪娭娰婄婅婇婈婌婐婕婞婣婥婧婭婷婺婻婾媋媐媓媖媙媜媞媟媠媢媧媬媱媲媳媵媸媺媻媿"], -["8fbaa1","嫄嫆嫈嫏嫚嫜嫠嫥嫪嫮嫵嫶嫽嬀嬁嬈嬗嬴嬙嬛嬝嬡嬥嬭嬸孁孋孌孒孖孞孨孮孯孼孽孾孿宁宄宆宊宎宐宑宓宔宖宨宩宬宭宯宱宲宷宺宼寀寁寍寏寖",4,"寠寯寱寴寽尌尗尞尟尣尦尩尫尬尮尰尲尵尶屙屚屜屢屣屧屨屩"], -["8fbba1","屭屰屴屵屺屻屼屽岇岈岊岏岒岝岟岠岢岣岦岪岲岴岵岺峉峋峒峝峗峮峱峲峴崁崆崍崒崫崣崤崦崧崱崴崹崽崿嵂嵃嵆嵈嵕嵑嵙嵊嵟嵠嵡嵢嵤嵪嵭嵰嵹嵺嵾嵿嶁嶃嶈嶊嶒嶓嶔嶕嶙嶛嶟嶠嶧嶫嶰嶴嶸嶹巃巇巋巐巎巘巙巠巤"], -["8fbca1","巩巸巹帀帇帍帒帔帕帘帟帠帮帨帲帵帾幋幐幉幑幖幘幛幜幞幨幪",4,"幰庀庋庎庢庤庥庨庪庬庱庳庽庾庿廆廌廋廎廑廒廔廕廜廞廥廫异弆弇弈弎弙弜弝弡弢弣弤弨弫弬弮弰弴弶弻弽弿彀彄彅彇彍彐彔彘彛彠彣彤彧"], -["8fbda1","彯彲彴彵彸彺彽彾徉徍徏徖徜徝徢徧徫徤徬徯徰徱徸忄忇忈忉忋忐",4,"忞忡忢忨忩忪忬忭忮忯忲忳忶忺忼怇怊怍怓怔怗怘怚怟怤怭怳怵恀恇恈恉恌恑恔恖恗恝恡恧恱恾恿悂悆悈悊悎悑悓悕悘悝悞悢悤悥您悰悱悷"], -["8fbea1","悻悾惂惄惈惉惊惋惎惏惔惕惙惛惝惞惢惥惲惵惸惼惽愂愇愊愌愐",4,"愖愗愙愜愞愢愪愫愰愱愵愶愷愹慁慅慆慉慞慠慬慲慸慻慼慿憀憁憃憄憋憍憒憓憗憘憜憝憟憠憥憨憪憭憸憹憼懀懁懂懎懏懕懜懝懞懟懡懢懧懩懥"], -["8fbfa1","懬懭懯戁戃戄戇戓戕戜戠戢戣戧戩戫戹戽扂扃扄扆扌扐扑扒扔扖扚扜扤扭扯扳扺扽抍抎抏抐抦抨抳抶抷抺抾抿拄拎拕拖拚拪拲拴拼拽挃挄挊挋挍挐挓挖挘挩挪挭挵挶挹挼捁捂捃捄捆捊捋捎捒捓捔捘捛捥捦捬捭捱捴捵"], -["8fc0a1","捸捼捽捿掂掄掇掊掐掔掕掙掚掞掤掦掭掮掯掽揁揅揈揎揑揓揔揕揜揠揥揪揬揲揳揵揸揹搉搊搐搒搔搘搞搠搢搤搥搩搪搯搰搵搽搿摋摏摑摒摓摔摚摛摜摝摟摠摡摣摭摳摴摻摽撅撇撏撐撑撘撙撛撝撟撡撣撦撨撬撳撽撾撿"], -["8fc1a1","擄擉擊擋擌擎擐擑擕擗擤擥擩擪擭擰擵擷擻擿攁攄攈攉攊攏攓攔攖攙攛攞攟攢攦攩攮攱攺攼攽敃敇敉敐敒敔敟敠敧敫敺敽斁斅斊斒斕斘斝斠斣斦斮斲斳斴斿旂旈旉旎旐旔旖旘旟旰旲旴旵旹旾旿昀昄昈昉昍昑昒昕昖昝"], -["8fc2a1","昞昡昢昣昤昦昩昪昫昬昮昰昱昳昹昷晀晅晆晊晌晑晎晗晘晙晛晜晠晡曻晪晫晬晾晳晵晿晷晸晹晻暀晼暋暌暍暐暒暙暚暛暜暟暠暤暭暱暲暵暻暿曀曂曃曈曌曎曏曔曛曟曨曫曬曮曺朅朇朎朓朙朜朠朢朳朾杅杇杈杌杔杕杝"], -["8fc3a1","杦杬杮杴杶杻极构枎枏枑枓枖枘枙枛枰枱枲枵枻枼枽柹柀柂柃柅柈柉柒柗柙柜柡柦柰柲柶柷桒栔栙栝栟栨栧栬栭栯栰栱栳栻栿桄桅桊桌桕桗桘桛桫桮",4,"桵桹桺桻桼梂梄梆梈梖梘梚梜梡梣梥梩梪梮梲梻棅棈棌棏"], -["8fc4a1","棐棑棓棖棙棜棝棥棨棪棫棬棭棰棱棵棶棻棼棽椆椉椊椐椑椓椖椗椱椳椵椸椻楂楅楉楎楗楛楣楤楥楦楨楩楬楰楱楲楺楻楿榀榍榒榖榘榡榥榦榨榫榭榯榷榸榺榼槅槈槑槖槗槢槥槮槯槱槳槵槾樀樁樃樏樑樕樚樝樠樤樨樰樲"], -["8fc5a1","樴樷樻樾樿橅橆橉橊橎橐橑橒橕橖橛橤橧橪橱橳橾檁檃檆檇檉檋檑檛檝檞檟檥檫檯檰檱檴檽檾檿櫆櫉櫈櫌櫐櫔櫕櫖櫜櫝櫤櫧櫬櫰櫱櫲櫼櫽欂欃欆欇欉欏欐欑欗欛欞欤欨欫欬欯欵欶欻欿歆歊歍歒歖歘歝歠歧歫歮歰歵歽"], -["8fc6a1","歾殂殅殗殛殟殠殢殣殨殩殬殭殮殰殸殹殽殾毃毄毉毌毖毚毡毣毦毧毮毱毷毹毿氂氄氅氉氍氎氐氒氙氟氦氧氨氬氮氳氵氶氺氻氿汊汋汍汏汒汔汙汛汜汫汭汯汴汶汸汹汻沅沆沇沉沔沕沗沘沜沟沰沲沴泂泆泍泏泐泑泒泔泖"], -["8fc7a1","泚泜泠泧泩泫泬泮泲泴洄洇洊洎洏洑洓洚洦洧洨汧洮洯洱洹洼洿浗浞浟浡浥浧浯浰浼涂涇涑涒涔涖涗涘涪涬涴涷涹涽涿淄淈淊淎淏淖淛淝淟淠淢淥淩淯淰淴淶淼渀渄渞渢渧渲渶渹渻渼湄湅湈湉湋湏湑湒湓湔湗湜湝湞"], -["8fc8a1","湢湣湨湳湻湽溍溓溙溠溧溭溮溱溳溻溿滀滁滃滇滈滊滍滎滏滫滭滮滹滻滽漄漈漊漌漍漖漘漚漛漦漩漪漯漰漳漶漻漼漭潏潑潒潓潗潙潚潝潞潡潢潨潬潽潾澃澇澈澋澌澍澐澒澓澔澖澚澟澠澥澦澧澨澮澯澰澵澶澼濅濇濈濊"], -["8fc9a1","濚濞濨濩濰濵濹濼濽瀀瀅瀆瀇瀍瀗瀠瀣瀯瀴瀷瀹瀼灃灄灈灉灊灋灔灕灝灞灎灤灥灬灮灵灶灾炁炅炆炔",4,"炛炤炫炰炱炴炷烊烑烓烔烕烖烘烜烤烺焃",4,"焋焌焏焞焠焫焭焯焰焱焸煁煅煆煇煊煋煐煒煗煚煜煞煠"], -["8fcaa1","煨煹熀熅熇熌熒熚熛熠熢熯熰熲熳熺熿燀燁燄燋燌燓燖燙燚燜燸燾爀爇爈爉爓爗爚爝爟爤爫爯爴爸爹牁牂牃牅牎牏牐牓牕牖牚牜牞牠牣牨牫牮牯牱牷牸牻牼牿犄犉犍犎犓犛犨犭犮犱犴犾狁狇狉狌狕狖狘狟狥狳狴狺狻"], -["8fcba1","狾猂猄猅猇猋猍猒猓猘猙猞猢猤猧猨猬猱猲猵猺猻猽獃獍獐獒獖獘獝獞獟獠獦獧獩獫獬獮獯獱獷獹獼玀玁玃玅玆玎玐玓玕玗玘玜玞玟玠玢玥玦玪玫玭玵玷玹玼玽玿珅珆珉珋珌珏珒珓珖珙珝珡珣珦珧珩珴珵珷珹珺珻珽"], -["8fcca1","珿琀琁琄琇琊琑琚琛琤琦琨",9,"琹瑀瑃瑄瑆瑇瑋瑍瑑瑒瑗瑝瑢瑦瑧瑨瑫瑭瑮瑱瑲璀璁璅璆璇璉璏璐璑璒璘璙璚璜璟璠璡璣璦璨璩璪璫璮璯璱璲璵璹璻璿瓈瓉瓌瓐瓓瓘瓚瓛瓞瓟瓤瓨瓪瓫瓯瓴瓺瓻瓼瓿甆"], -["8fcda1","甒甖甗甠甡甤甧甩甪甯甶甹甽甾甿畀畃畇畈畎畐畒畗畞畟畡畯畱畹",5,"疁疅疐疒疓疕疙疜疢疤疴疺疿痀痁痄痆痌痎痏痗痜痟痠痡痤痧痬痮痯痱痹瘀瘂瘃瘄瘇瘈瘊瘌瘏瘒瘓瘕瘖瘙瘛瘜瘝瘞瘣瘥瘦瘩瘭瘲瘳瘵瘸瘹"], -["8fcea1","瘺瘼癊癀癁癃癄癅癉癋癕癙癟癤癥癭癮癯癱癴皁皅皌皍皕皛皜皝皟皠皢",6,"皪皭皽盁盅盉盋盌盎盔盙盠盦盨盬盰盱盶盹盼眀眆眊眎眒眔眕眗眙眚眜眢眨眭眮眯眴眵眶眹眽眾睂睅睆睊睍睎睏睒睖睗睜睞睟睠睢"], -["8fcfa1","睤睧睪睬睰睲睳睴睺睽瞀瞄瞌瞍瞔瞕瞖瞚瞟瞢瞧瞪瞮瞯瞱瞵瞾矃矉矑矒矕矙矞矟矠矤矦矪矬矰矱矴矸矻砅砆砉砍砎砑砝砡砢砣砭砮砰砵砷硃硄硇硈硌硎硒硜硞硠硡硣硤硨硪确硺硾碊碏碔碘碡碝碞碟碤碨碬碭碰碱碲碳"], -["8fd0a1","碻碽碿磇磈磉磌磎磒磓磕磖磤磛磟磠磡磦磪磲磳礀磶磷磺磻磿礆礌礐礚礜礞礟礠礥礧礩礭礱礴礵礻礽礿祄祅祆祊祋祏祑祔祘祛祜祧祩祫祲祹祻祼祾禋禌禑禓禔禕禖禘禛禜禡禨禩禫禯禱禴禸离秂秄秇秈秊秏秔秖秚秝秞"], -["8fd1a1","秠秢秥秪秫秭秱秸秼稂稃稇稉稊稌稑稕稛稞稡稧稫稭稯稰稴稵稸稹稺穄穅穇穈穌穕穖穙穜穝穟穠穥穧穪穭穵穸穾窀窂窅窆窊窋窐窑窔窞窠窣窬窳窵窹窻窼竆竉竌竎竑竛竨竩竫竬竱竴竻竽竾笇笔笟笣笧笩笪笫笭笮笯笰"], -["8fd2a1","笱笴笽笿筀筁筇筎筕筠筤筦筩筪筭筯筲筳筷箄箉箎箐箑箖箛箞箠箥箬箯箰箲箵箶箺箻箼箽篂篅篈篊篔篖篗篙篚篛篨篪篲篴篵篸篹篺篼篾簁簂簃簄簆簉簋簌簎簏簙簛簠簥簦簨簬簱簳簴簶簹簺籆籊籕籑籒籓籙",5], -["8fd3a1","籡籣籧籩籭籮籰籲籹籼籽粆粇粏粔粞粠粦粰粶粷粺粻粼粿糄糇糈糉糍糏糓糔糕糗糙糚糝糦糩糫糵紃紇紈紉紏紑紒紓紖紝紞紣紦紪紭紱紼紽紾絀絁絇絈絍絑絓絗絙絚絜絝絥絧絪絰絸絺絻絿綁綂綃綅綆綈綋綌綍綑綖綗綝"], -["8fd4a1","綞綦綧綪綳綶綷綹緂",4,"緌緍緎緗緙縀緢緥緦緪緫緭緱緵緶緹緺縈縐縑縕縗縜縝縠縧縨縬縭縯縳縶縿繄繅繇繎繐繒繘繟繡繢繥繫繮繯繳繸繾纁纆纇纊纍纑纕纘纚纝纞缼缻缽缾缿罃罄罇罏罒罓罛罜罝罡罣罤罥罦罭"], -["8fd5a1","罱罽罾罿羀羋羍羏羐羑羖羗羜羡羢羦羪羭羴羼羿翀翃翈翎翏翛翟翣翥翨翬翮翯翲翺翽翾翿耇耈耊耍耎耏耑耓耔耖耝耞耟耠耤耦耬耮耰耴耵耷耹耺耼耾聀聄聠聤聦聭聱聵肁肈肎肜肞肦肧肫肸肹胈胍胏胒胔胕胗胘胠胭胮"], -["8fd6a1","胰胲胳胶胹胺胾脃脋脖脗脘脜脞脠脤脧脬脰脵脺脼腅腇腊腌腒腗腠腡腧腨腩腭腯腷膁膐膄膅膆膋膎膖膘膛膞膢膮膲膴膻臋臃臅臊臎臏臕臗臛臝臞臡臤臫臬臰臱臲臵臶臸臹臽臿舀舃舏舓舔舙舚舝舡舢舨舲舴舺艃艄艅艆"], -["8fd7a1","艋艎艏艑艖艜艠艣艧艭艴艻艽艿芀芁芃芄芇芉芊芎芑芔芖芘芚芛芠芡芣芤芧芨芩芪芮芰芲芴芷芺芼芾芿苆苐苕苚苠苢苤苨苪苭苯苶苷苽苾茀茁茇茈茊茋荔茛茝茞茟茡茢茬茭茮茰茳茷茺茼茽荂荃荄荇荍荎荑荕荖荗荰荸"], -["8fd8a1","荽荿莀莂莄莆莍莒莔莕莘莙莛莜莝莦莧莩莬莾莿菀菇菉菏菐菑菔菝荓菨菪菶菸菹菼萁萆萊萏萑萕萙莭萯萹葅葇葈葊葍葏葑葒葖葘葙葚葜葠葤葥葧葪葰葳葴葶葸葼葽蒁蒅蒒蒓蒕蒞蒦蒨蒩蒪蒯蒱蒴蒺蒽蒾蓀蓂蓇蓈蓌蓏蓓"], -["8fd9a1","蓜蓧蓪蓯蓰蓱蓲蓷蔲蓺蓻蓽蔂蔃蔇蔌蔎蔐蔜蔞蔢蔣蔤蔥蔧蔪蔫蔯蔳蔴蔶蔿蕆蕏",4,"蕖蕙蕜",6,"蕤蕫蕯蕹蕺蕻蕽蕿薁薅薆薉薋薌薏薓薘薝薟薠薢薥薧薴薶薷薸薼薽薾薿藂藇藊藋藎薭藘藚藟藠藦藨藭藳藶藼"], -["8fdaa1","藿蘀蘄蘅蘍蘎蘐蘑蘒蘘蘙蘛蘞蘡蘧蘩蘶蘸蘺蘼蘽虀虂虆虒虓虖虗虘虙虝虠",4,"虩虬虯虵虶虷虺蚍蚑蚖蚘蚚蚜蚡蚦蚧蚨蚭蚱蚳蚴蚵蚷蚸蚹蚿蛀蛁蛃蛅蛑蛒蛕蛗蛚蛜蛠蛣蛥蛧蚈蛺蛼蛽蜄蜅蜇蜋蜎蜏蜐蜓蜔蜙蜞蜟蜡蜣"], -["8fdba1","蜨蜮蜯蜱蜲蜹蜺蜼蜽蜾蝀蝃蝅蝍蝘蝝蝡蝤蝥蝯蝱蝲蝻螃",6,"螋螌螐螓螕螗螘螙螞螠螣螧螬螭螮螱螵螾螿蟁蟈蟉蟊蟎蟕蟖蟙蟚蟜蟟蟢蟣蟤蟪蟫蟭蟱蟳蟸蟺蟿蠁蠃蠆蠉蠊蠋蠐蠙蠒蠓蠔蠘蠚蠛蠜蠞蠟蠨蠭蠮蠰蠲蠵"], -["8fdca1","蠺蠼衁衃衅衈衉衊衋衎衑衕衖衘衚衜衟衠衤衩衱衹衻袀袘袚袛袜袟袠袨袪袺袽袾裀裊",4,"裑裒裓裛裞裧裯裰裱裵裷褁褆褍褎褏褕褖褘褙褚褜褠褦褧褨褰褱褲褵褹褺褾襀襂襅襆襉襏襒襗襚襛襜襡襢襣襫襮襰襳襵襺"], -["8fdda1","襻襼襽覉覍覐覔覕覛覜覟覠覥覰覴覵覶覷覼觔",4,"觥觩觫觭觱觳觶觹觽觿訄訅訇訏訑訒訔訕訞訠訢訤訦訫訬訯訵訷訽訾詀詃詅詇詉詍詎詓詖詗詘詜詝詡詥詧詵詶詷詹詺詻詾詿誀誃誆誋誏誐誒誖誗誙誟誧誩誮誯誳"], -["8fdea1","誶誷誻誾諃諆諈諉諊諑諓諔諕諗諝諟諬諰諴諵諶諼諿謅謆謋謑謜謞謟謊謭謰謷謼譂",4,"譈譒譓譔譙譍譞譣譭譶譸譹譼譾讁讄讅讋讍讏讔讕讜讞讟谸谹谽谾豅豇豉豋豏豑豓豔豗豘豛豝豙豣豤豦豨豩豭豳豵豶豻豾貆"], -["8fdfa1","貇貋貐貒貓貙貛貜貤貹貺賅賆賉賋賏賖賕賙賝賡賨賬賯賰賲賵賷賸賾賿贁贃贉贒贗贛赥赩赬赮赿趂趄趈趍趐趑趕趞趟趠趦趫趬趯趲趵趷趹趻跀跅跆跇跈跊跎跑跔跕跗跙跤跥跧跬跰趼跱跲跴跽踁踄踅踆踋踑踔踖踠踡踢"], -["8fe0a1","踣踦踧踱踳踶踷踸踹踽蹀蹁蹋蹍蹎蹏蹔蹛蹜蹝蹞蹡蹢蹩蹬蹭蹯蹰蹱蹹蹺蹻躂躃躉躐躒躕躚躛躝躞躢躧躩躭躮躳躵躺躻軀軁軃軄軇軏軑軔軜軨軮軰軱軷軹軺軭輀輂輇輈輏輐輖輗輘輞輠輡輣輥輧輨輬輭輮輴輵輶輷輺轀轁"], -["8fe1a1","轃轇轏轑",4,"轘轝轞轥辝辠辡辤辥辦辵辶辸达迀迁迆迊迋迍运迒迓迕迠迣迤迨迮迱迵迶迻迾适逄逈逌逘逛逨逩逯逪逬逭逳逴逷逿遃遄遌遛遝遢遦遧遬遰遴遹邅邈邋邌邎邐邕邗邘邙邛邠邡邢邥邰邲邳邴邶邽郌邾郃"], -["8fe2a1","郄郅郇郈郕郗郘郙郜郝郟郥郒郶郫郯郰郴郾郿鄀鄄鄅鄆鄈鄍鄐鄔鄖鄗鄘鄚鄜鄞鄠鄥鄢鄣鄧鄩鄮鄯鄱鄴鄶鄷鄹鄺鄼鄽酃酇酈酏酓酗酙酚酛酡酤酧酭酴酹酺酻醁醃醅醆醊醎醑醓醔醕醘醞醡醦醨醬醭醮醰醱醲醳醶醻醼醽醿"], -["8fe3a1","釂釃釅釓釔釗釙釚釞釤釥釩釪釬",5,"釷釹釻釽鈀鈁鈄鈅鈆鈇鈉鈊鈌鈐鈒鈓鈖鈘鈜鈝鈣鈤鈥鈦鈨鈮鈯鈰鈳鈵鈶鈸鈹鈺鈼鈾鉀鉂鉃鉆鉇鉊鉍鉎鉏鉑鉘鉙鉜鉝鉠鉡鉥鉧鉨鉩鉮鉯鉰鉵",4,"鉻鉼鉽鉿銈銉銊銍銎銒銗"], -["8fe4a1","銙銟銠銤銥銧銨銫銯銲銶銸銺銻銼銽銿",4,"鋅鋆鋇鋈鋋鋌鋍鋎鋐鋓鋕鋗鋘鋙鋜鋝鋟鋠鋡鋣鋥鋧鋨鋬鋮鋰鋹鋻鋿錀錂錈錍錑錔錕錜錝錞錟錡錤錥錧錩錪錳錴錶錷鍇鍈鍉鍐鍑鍒鍕鍗鍘鍚鍞鍤鍥鍧鍩鍪鍭鍯鍰鍱鍳鍴鍶"], -["8fe5a1","鍺鍽鍿鎀鎁鎂鎈鎊鎋鎍鎏鎒鎕鎘鎛鎞鎡鎣鎤鎦鎨鎫鎴鎵鎶鎺鎩鏁鏄鏅鏆鏇鏉",4,"鏓鏙鏜鏞鏟鏢鏦鏧鏹鏷鏸鏺鏻鏽鐁鐂鐄鐈鐉鐍鐎鐏鐕鐖鐗鐟鐮鐯鐱鐲鐳鐴鐻鐿鐽鑃鑅鑈鑊鑌鑕鑙鑜鑟鑡鑣鑨鑫鑭鑮鑯鑱鑲钄钃镸镹"], -["8fe6a1","镾閄閈閌閍閎閝閞閟閡閦閩閫閬閴閶閺閽閿闆闈闉闋闐闑闒闓闙闚闝闞闟闠闤闦阝阞阢阤阥阦阬阱阳阷阸阹阺阼阽陁陒陔陖陗陘陡陮陴陻陼陾陿隁隂隃隄隉隑隖隚隝隟隤隥隦隩隮隯隳隺雊雒嶲雘雚雝雞雟雩雯雱雺霂"], -["8fe7a1","霃霅霉霚霛霝霡霢霣霨霱霳靁靃靊靎靏靕靗靘靚靛靣靧靪靮靳靶靷靸靻靽靿鞀鞉鞕鞖鞗鞙鞚鞞鞟鞢鞬鞮鞱鞲鞵鞶鞸鞹鞺鞼鞾鞿韁韄韅韇韉韊韌韍韎韐韑韔韗韘韙韝韞韠韛韡韤韯韱韴韷韸韺頇頊頙頍頎頔頖頜頞頠頣頦"], -["8fe8a1","頫頮頯頰頲頳頵頥頾顄顇顊顑顒顓顖顗顙顚顢顣顥顦顪顬颫颭颮颰颴颷颸颺颻颿飂飅飈飌飡飣飥飦飧飪飳飶餂餇餈餑餕餖餗餚餛餜餟餢餦餧餫餱",4,"餹餺餻餼饀饁饆饇饈饍饎饔饘饙饛饜饞饟饠馛馝馟馦馰馱馲馵"], -["8fe9a1","馹馺馽馿駃駉駓駔駙駚駜駞駧駪駫駬駰駴駵駹駽駾騂騃騄騋騌騐騑騖騞騠騢騣騤騧騭騮騳騵騶騸驇驁驄驊驋驌驎驑驔驖驝骪骬骮骯骲骴骵骶骹骻骾骿髁髃髆髈髎髐髒髕髖髗髛髜髠髤髥髧髩髬髲髳髵髹髺髽髿",4], -["8feaa1","鬄鬅鬈鬉鬋鬌鬍鬎鬐鬒鬖鬙鬛鬜鬠鬦鬫鬭鬳鬴鬵鬷鬹鬺鬽魈魋魌魕魖魗魛魞魡魣魥魦魨魪",4,"魳魵魷魸魹魿鮀鮄鮅鮆鮇鮉鮊鮋鮍鮏鮐鮔鮚鮝鮞鮦鮧鮩鮬鮰鮱鮲鮷鮸鮻鮼鮾鮿鯁鯇鯈鯎鯐鯗鯘鯝鯟鯥鯧鯪鯫鯯鯳鯷鯸"], -["8feba1","鯹鯺鯽鯿鰀鰂鰋鰏鰑鰖鰘鰙鰚鰜鰞鰢鰣鰦",4,"鰱鰵鰶鰷鰽鱁鱃鱄鱅鱉鱊鱎鱏鱐鱓鱔鱖鱘鱛鱝鱞鱟鱣鱩鱪鱜鱫鱨鱮鱰鱲鱵鱷鱻鳦鳲鳷鳹鴋鴂鴑鴗鴘鴜鴝鴞鴯鴰鴲鴳鴴鴺鴼鵅鴽鵂鵃鵇鵊鵓鵔鵟鵣鵢鵥鵩鵪鵫鵰鵶鵷鵻"], -["8feca1","鵼鵾鶃鶄鶆鶊鶍鶎鶒鶓鶕鶖鶗鶘鶡鶪鶬鶮鶱鶵鶹鶼鶿鷃鷇鷉鷊鷔鷕鷖鷗鷚鷞鷟鷠鷥鷧鷩鷫鷮鷰鷳鷴鷾鸊鸂鸇鸎鸐鸑鸒鸕鸖鸙鸜鸝鹺鹻鹼麀麂麃麄麅麇麎麏麖麘麛麞麤麨麬麮麯麰麳麴麵黆黈黋黕黟黤黧黬黭黮黰黱黲黵"], -["8feda1","黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃",4,"齓齕齖齗齘齚齝齞齨齩齭",4,"齳齵齺齽龏龐龑龒龔龖龗龞龡龢龣龥"] -] diff --git a/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json b/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json deleted file mode 100644 index 85c6934..0000000 --- a/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +++ /dev/null @@ -1 +0,0 @@ -{"uChars":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],"gbChars":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]} \ No newline at end of file diff --git a/node_modules/iconv-lite/encodings/tables/gbk-added.json b/node_modules/iconv-lite/encodings/tables/gbk-added.json deleted file mode 100644 index 8abfa9f..0000000 --- a/node_modules/iconv-lite/encodings/tables/gbk-added.json +++ /dev/null @@ -1,55 +0,0 @@ -[ -["a140","",62], -["a180","",32], -["a240","",62], -["a280","",32], -["a2ab","",5], -["a2e3","€"], -["a2ef",""], -["a2fd",""], -["a340","",62], -["a380","",31," "], -["a440","",62], -["a480","",32], -["a4f4","",10], -["a540","",62], -["a580","",32], -["a5f7","",7], -["a640","",62], -["a680","",32], -["a6b9","",7], -["a6d9","",6], -["a6ec",""], -["a6f3",""], -["a6f6","",8], -["a740","",62], -["a780","",32], -["a7c2","",14], -["a7f2","",12], -["a896","",10], -["a8bc",""], -["a8bf","ǹ"], -["a8c1",""], -["a8ea","",20], -["a958",""], -["a95b",""], -["a95d",""], -["a989","〾⿰",11], -["a997","",12], -["a9f0","",14], -["aaa1","",93], -["aba1","",93], -["aca1","",93], -["ada1","",93], -["aea1","",93], -["afa1","",93], -["d7fa","",4], -["f8a1","",93], -["f9a1","",93], -["faa1","",93], -["fba1","",93], -["fca1","",93], -["fda1","",93], -["fe50","⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌"], -["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93] -] diff --git a/node_modules/iconv-lite/encodings/tables/shiftjis.json b/node_modules/iconv-lite/encodings/tables/shiftjis.json deleted file mode 100644 index 5a3a43c..0000000 --- a/node_modules/iconv-lite/encodings/tables/shiftjis.json +++ /dev/null @@ -1,125 +0,0 @@ -[ -["0","\u0000",128], -["a1","。",62], -["8140"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×"], -["8180","÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇◆□■△▲▽▼※〒→←↑↓〓"], -["81b8","∈∋⊆⊇⊂⊃∪∩"], -["81c8","∧∨¬⇒⇔∀∃"], -["81da","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"], -["81f0","ʼn♯♭♪†‡¶"], -["81fc","◯"], -["824f","0",9], -["8260","A",25], -["8281","a",25], -["829f","ぁ",82], -["8340","ァ",62], -["8380","ム",22], -["839f","Α",16,"Σ",6], -["83bf","α",16,"σ",6], -["8440","А",5,"ЁЖ",25], -["8470","а",5,"ёж",7], -["8480","о",17], -["849f","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"], -["8740","①",19,"Ⅰ",9], -["875f","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"], -["877e","㍻"], -["8780","〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"], -["889f","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"], -["8940","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円"], -["8980","園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"], -["8a40","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫"], -["8a80","橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"], -["8b40","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救"], -["8b80","朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"], -["8c40","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨"], -["8c80","劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"], -["8d40","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降"], -["8d80","項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"], -["8e40","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止"], -["8e80","死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"], -["8f40","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳"], -["8f80","準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"], -["9040","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨"], -["9080","逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"], -["9140","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻"], -["9180","操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"], -["9240","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄"], -["9280","逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"], -["9340","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬"], -["9380","凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"], -["9440","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅"], -["9480","楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"], -["9540","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷"], -["9580","斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"], -["9640","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆"], -["9680","摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"], -["9740","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲"], -["9780","沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"], -["9840","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"], -["989f","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"], -["9940","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭"], -["9980","凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"], -["9a40","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸"], -["9a80","噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"], -["9b40","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀"], -["9b80","它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"], -["9c40","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠"], -["9c80","怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"], -["9d40","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫"], -["9d80","捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"], -["9e40","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎"], -["9e80","梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"], -["9f40","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯"], -["9f80","麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"], -["e040","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝"], -["e080","烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"], -["e140","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿"], -["e180","痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"], -["e240","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰"], -["e280","窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"], -["e340","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷"], -["e380","縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"], -["e440","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤"], -["e480","艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"], -["e540","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬"], -["e580","蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"], -["e640","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧"], -["e680","諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"], -["e740","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜"], -["e780","轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"], -["e840","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙"], -["e880","閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"], -["e940","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃"], -["e980","騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"], -["ea40","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯"], -["ea80","黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇遙瑤凜熙"], -["ed40","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏"], -["ed80","塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"], -["ee40","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙"], -["ee80","蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"], -["eeef","ⅰ",9,"¬¦'""], -["f040","",62], -["f080","",124], -["f140","",62], -["f180","",124], -["f240","",62], -["f280","",124], -["f340","",62], -["f380","",124], -["f440","",62], -["f480","",124], -["f540","",62], -["f580","",124], -["f640","",62], -["f680","",124], -["f740","",62], -["f780","",124], -["f840","",62], -["f880","",124], -["f940",""], -["fa40","ⅰ",9,"Ⅰ",9,"¬¦'"㈱№℡∵纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊"], -["fa80","兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯"], -["fb40","涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神"], -["fb80","祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙"], -["fc40","髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"] -] diff --git a/node_modules/iconv-lite/encodings/utf16.js b/node_modules/iconv-lite/encodings/utf16.js deleted file mode 100644 index 54765ae..0000000 --- a/node_modules/iconv-lite/encodings/utf16.js +++ /dev/null @@ -1,177 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js - -// == UTF16-BE codec. ========================================================== - -exports.utf16be = Utf16BECodec; -function Utf16BECodec() { -} - -Utf16BECodec.prototype.encoder = Utf16BEEncoder; -Utf16BECodec.prototype.decoder = Utf16BEDecoder; -Utf16BECodec.prototype.bomAware = true; - - -// -- Encoding - -function Utf16BEEncoder() { -} - -Utf16BEEncoder.prototype.write = function(str) { - var buf = Buffer.from(str, 'ucs2'); - for (var i = 0; i < buf.length; i += 2) { - var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp; - } - return buf; -} - -Utf16BEEncoder.prototype.end = function() { -} - - -// -- Decoding - -function Utf16BEDecoder() { - this.overflowByte = -1; -} - -Utf16BEDecoder.prototype.write = function(buf) { - if (buf.length == 0) - return ''; - - var buf2 = Buffer.alloc(buf.length + 1), - i = 0, j = 0; - - if (this.overflowByte !== -1) { - buf2[0] = buf[0]; - buf2[1] = this.overflowByte; - i = 1; j = 2; - } - - for (; i < buf.length-1; i += 2, j+= 2) { - buf2[j] = buf[i+1]; - buf2[j+1] = buf[i]; - } - - this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1; - - return buf2.slice(0, j).toString('ucs2'); -} - -Utf16BEDecoder.prototype.end = function() { -} - - -// == UTF-16 codec ============================================================= -// Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic. -// Defaults to UTF-16LE, as it's prevalent and default in Node. -// http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le -// Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'}); - -// Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false). - -exports.utf16 = Utf16Codec; -function Utf16Codec(codecOptions, iconv) { - this.iconv = iconv; -} - -Utf16Codec.prototype.encoder = Utf16Encoder; -Utf16Codec.prototype.decoder = Utf16Decoder; - - -// -- Encoding (pass-through) - -function Utf16Encoder(options, codec) { - options = options || {}; - if (options.addBOM === undefined) - options.addBOM = true; - this.encoder = codec.iconv.getEncoder('utf-16le', options); -} - -Utf16Encoder.prototype.write = function(str) { - return this.encoder.write(str); -} - -Utf16Encoder.prototype.end = function() { - return this.encoder.end(); -} - - -// -- Decoding - -function Utf16Decoder(options, codec) { - this.decoder = null; - this.initialBytes = []; - this.initialBytesLen = 0; - - this.options = options || {}; - this.iconv = codec.iconv; -} - -Utf16Decoder.prototype.write = function(buf) { - if (!this.decoder) { - // Codec is not chosen yet. Accumulate initial bytes. - this.initialBytes.push(buf); - this.initialBytesLen += buf.length; - - if (this.initialBytesLen < 16) // We need more bytes to use space heuristic (see below) - return ''; - - // We have enough bytes -> detect endianness. - var buf = Buffer.concat(this.initialBytes), - encoding = detectEncoding(buf, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); - this.initialBytes.length = this.initialBytesLen = 0; - } - - return this.decoder.write(buf); -} - -Utf16Decoder.prototype.end = function() { - if (!this.decoder) { - var buf = Buffer.concat(this.initialBytes), - encoding = detectEncoding(buf, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); - - var res = this.decoder.write(buf), - trail = this.decoder.end(); - - return trail ? (res + trail) : res; - } - return this.decoder.end(); -} - -function detectEncoding(buf, defaultEncoding) { - var enc = defaultEncoding || 'utf-16le'; - - if (buf.length >= 2) { - // Check BOM. - if (buf[0] == 0xFE && buf[1] == 0xFF) // UTF-16BE BOM - enc = 'utf-16be'; - else if (buf[0] == 0xFF && buf[1] == 0xFE) // UTF-16LE BOM - enc = 'utf-16le'; - else { - // No BOM found. Try to deduce encoding from initial content. - // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon. - // So, we count ASCII as if it was LE or BE, and decide from that. - var asciiCharsLE = 0, asciiCharsBE = 0, // Counts of chars in both positions - _len = Math.min(buf.length - (buf.length % 2), 64); // Len is always even. - - for (var i = 0; i < _len; i += 2) { - if (buf[i] === 0 && buf[i+1] !== 0) asciiCharsBE++; - if (buf[i] !== 0 && buf[i+1] === 0) asciiCharsLE++; - } - - if (asciiCharsBE > asciiCharsLE) - enc = 'utf-16be'; - else if (asciiCharsBE < asciiCharsLE) - enc = 'utf-16le'; - } - } - - return enc; -} - - diff --git a/node_modules/iconv-lite/encodings/utf7.js b/node_modules/iconv-lite/encodings/utf7.js deleted file mode 100644 index b7631c2..0000000 --- a/node_modules/iconv-lite/encodings/utf7.js +++ /dev/null @@ -1,290 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// UTF-7 codec, according to https://tools.ietf.org/html/rfc2152 -// See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3 - -exports.utf7 = Utf7Codec; -exports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7 -function Utf7Codec(codecOptions, iconv) { - this.iconv = iconv; -}; - -Utf7Codec.prototype.encoder = Utf7Encoder; -Utf7Codec.prototype.decoder = Utf7Decoder; -Utf7Codec.prototype.bomAware = true; - - -// -- Encoding - -var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g; - -function Utf7Encoder(options, codec) { - this.iconv = codec.iconv; -} - -Utf7Encoder.prototype.write = function(str) { - // Naive implementation. - // Non-direct chars are encoded as "+-"; single "+" char is encoded as "+-". - return Buffer.from(str.replace(nonDirectChars, function(chunk) { - return "+" + (chunk === '+' ? '' : - this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, '')) - + "-"; - }.bind(this))); -} - -Utf7Encoder.prototype.end = function() { -} - - -// -- Decoding - -function Utf7Decoder(options, codec) { - this.iconv = codec.iconv; - this.inBase64 = false; - this.base64Accum = ''; -} - -var base64Regex = /[A-Za-z0-9\/+]/; -var base64Chars = []; -for (var i = 0; i < 256; i++) - base64Chars[i] = base64Regex.test(String.fromCharCode(i)); - -var plusChar = '+'.charCodeAt(0), - minusChar = '-'.charCodeAt(0), - andChar = '&'.charCodeAt(0); - -Utf7Decoder.prototype.write = function(buf) { - var res = "", lastI = 0, - inBase64 = this.inBase64, - base64Accum = this.base64Accum; - - // The decoder is more involved as we must handle chunks in stream. - - for (var i = 0; i < buf.length; i++) { - if (!inBase64) { // We're in direct mode. - // Write direct chars until '+' - if (buf[i] == plusChar) { - res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. - lastI = i+1; - inBase64 = true; - } - } else { // We decode base64. - if (!base64Chars[buf[i]]) { // Base64 ended. - if (i == lastI && buf[i] == minusChar) {// "+-" -> "+" - res += "+"; - } else { - var b64str = base64Accum + buf.slice(lastI, i).toString(); - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - if (buf[i] != minusChar) // Minus is absorbed after base64. - i--; - - lastI = i+1; - inBase64 = false; - base64Accum = ''; - } - } - } - - if (!inBase64) { - res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. - } else { - var b64str = base64Accum + buf.slice(lastI).toString(); - - var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. - base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. - b64str = b64str.slice(0, canBeDecoded); - - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - this.inBase64 = inBase64; - this.base64Accum = base64Accum; - - return res; -} - -Utf7Decoder.prototype.end = function() { - var res = ""; - if (this.inBase64 && this.base64Accum.length > 0) - res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); - - this.inBase64 = false; - this.base64Accum = ''; - return res; -} - - -// UTF-7-IMAP codec. -// RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3) -// Differences: -// * Base64 part is started by "&" instead of "+" -// * Direct characters are 0x20-0x7E, except "&" (0x26) -// * In Base64, "," is used instead of "/" -// * Base64 must not be used to represent direct characters. -// * No implicit shift back from Base64 (should always end with '-') -// * String must end in non-shifted position. -// * "-&" while in base64 is not allowed. - - -exports.utf7imap = Utf7IMAPCodec; -function Utf7IMAPCodec(codecOptions, iconv) { - this.iconv = iconv; -}; - -Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder; -Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder; -Utf7IMAPCodec.prototype.bomAware = true; - - -// -- Encoding - -function Utf7IMAPEncoder(options, codec) { - this.iconv = codec.iconv; - this.inBase64 = false; - this.base64Accum = Buffer.alloc(6); - this.base64AccumIdx = 0; -} - -Utf7IMAPEncoder.prototype.write = function(str) { - var inBase64 = this.inBase64, - base64Accum = this.base64Accum, - base64AccumIdx = this.base64AccumIdx, - buf = Buffer.alloc(str.length*5 + 10), bufIdx = 0; - - for (var i = 0; i < str.length; i++) { - var uChar = str.charCodeAt(i); - if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'. - if (inBase64) { - if (base64AccumIdx > 0) { - bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); - base64AccumIdx = 0; - } - - buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. - inBase64 = false; - } - - if (!inBase64) { - buf[bufIdx++] = uChar; // Write direct character - - if (uChar === andChar) // Ampersand -> '&-' - buf[bufIdx++] = minusChar; - } - - } else { // Non-direct character - if (!inBase64) { - buf[bufIdx++] = andChar; // Write '&', then go to base64 mode. - inBase64 = true; - } - if (inBase64) { - base64Accum[base64AccumIdx++] = uChar >> 8; - base64Accum[base64AccumIdx++] = uChar & 0xFF; - - if (base64AccumIdx == base64Accum.length) { - bufIdx += buf.write(base64Accum.toString('base64').replace(/\//g, ','), bufIdx); - base64AccumIdx = 0; - } - } - } - } - - this.inBase64 = inBase64; - this.base64AccumIdx = base64AccumIdx; - - return buf.slice(0, bufIdx); -} - -Utf7IMAPEncoder.prototype.end = function() { - var buf = Buffer.alloc(10), bufIdx = 0; - if (this.inBase64) { - if (this.base64AccumIdx > 0) { - bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); - this.base64AccumIdx = 0; - } - - buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. - this.inBase64 = false; - } - - return buf.slice(0, bufIdx); -} - - -// -- Decoding - -function Utf7IMAPDecoder(options, codec) { - this.iconv = codec.iconv; - this.inBase64 = false; - this.base64Accum = ''; -} - -var base64IMAPChars = base64Chars.slice(); -base64IMAPChars[','.charCodeAt(0)] = true; - -Utf7IMAPDecoder.prototype.write = function(buf) { - var res = "", lastI = 0, - inBase64 = this.inBase64, - base64Accum = this.base64Accum; - - // The decoder is more involved as we must handle chunks in stream. - // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end). - - for (var i = 0; i < buf.length; i++) { - if (!inBase64) { // We're in direct mode. - // Write direct chars until '&' - if (buf[i] == andChar) { - res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. - lastI = i+1; - inBase64 = true; - } - } else { // We decode base64. - if (!base64IMAPChars[buf[i]]) { // Base64 ended. - if (i == lastI && buf[i] == minusChar) { // "&-" -> "&" - res += "&"; - } else { - var b64str = base64Accum + buf.slice(lastI, i).toString().replace(/,/g, '/'); - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - if (buf[i] != minusChar) // Minus may be absorbed after base64. - i--; - - lastI = i+1; - inBase64 = false; - base64Accum = ''; - } - } - } - - if (!inBase64) { - res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. - } else { - var b64str = base64Accum + buf.slice(lastI).toString().replace(/,/g, '/'); - - var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. - base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. - b64str = b64str.slice(0, canBeDecoded); - - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - this.inBase64 = inBase64; - this.base64Accum = base64Accum; - - return res; -} - -Utf7IMAPDecoder.prototype.end = function() { - var res = ""; - if (this.inBase64 && this.base64Accum.length > 0) - res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); - - this.inBase64 = false; - this.base64Accum = ''; - return res; -} - - diff --git a/node_modules/iconv-lite/lib/bom-handling.js b/node_modules/iconv-lite/lib/bom-handling.js deleted file mode 100644 index 1050872..0000000 --- a/node_modules/iconv-lite/lib/bom-handling.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; - -var BOMChar = '\uFEFF'; - -exports.PrependBOM = PrependBOMWrapper -function PrependBOMWrapper(encoder, options) { - this.encoder = encoder; - this.addBOM = true; -} - -PrependBOMWrapper.prototype.write = function(str) { - if (this.addBOM) { - str = BOMChar + str; - this.addBOM = false; - } - - return this.encoder.write(str); -} - -PrependBOMWrapper.prototype.end = function() { - return this.encoder.end(); -} - - -//------------------------------------------------------------------------------ - -exports.StripBOM = StripBOMWrapper; -function StripBOMWrapper(decoder, options) { - this.decoder = decoder; - this.pass = false; - this.options = options || {}; -} - -StripBOMWrapper.prototype.write = function(buf) { - var res = this.decoder.write(buf); - if (this.pass || !res) - return res; - - if (res[0] === BOMChar) { - res = res.slice(1); - if (typeof this.options.stripBOM === 'function') - this.options.stripBOM(); - } - - this.pass = true; - return res; -} - -StripBOMWrapper.prototype.end = function() { - return this.decoder.end(); -} - diff --git a/node_modules/iconv-lite/lib/extend-node.js b/node_modules/iconv-lite/lib/extend-node.js deleted file mode 100644 index 87f5394..0000000 --- a/node_modules/iconv-lite/lib/extend-node.js +++ /dev/null @@ -1,217 +0,0 @@ -"use strict"; -var Buffer = require("buffer").Buffer; -// Note: not polyfilled with safer-buffer on a purpose, as overrides Buffer - -// == Extend Node primitives to use iconv-lite ================================= - -module.exports = function (iconv) { - var original = undefined; // Place to keep original methods. - - // Node authors rewrote Buffer internals to make it compatible with - // Uint8Array and we cannot patch key functions since then. - // Note: this does use older Buffer API on a purpose - iconv.supportsNodeEncodingsExtension = !(Buffer.from || new Buffer(0) instanceof Uint8Array); - - iconv.extendNodeEncodings = function extendNodeEncodings() { - if (original) return; - original = {}; - - if (!iconv.supportsNodeEncodingsExtension) { - console.error("ACTION NEEDED: require('iconv-lite').extendNodeEncodings() is not supported in your version of Node"); - console.error("See more info at https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility"); - return; - } - - var nodeNativeEncodings = { - 'hex': true, 'utf8': true, 'utf-8': true, 'ascii': true, 'binary': true, - 'base64': true, 'ucs2': true, 'ucs-2': true, 'utf16le': true, 'utf-16le': true, - }; - - Buffer.isNativeEncoding = function(enc) { - return enc && nodeNativeEncodings[enc.toLowerCase()]; - } - - // -- SlowBuffer ----------------------------------------------------------- - var SlowBuffer = require('buffer').SlowBuffer; - - original.SlowBufferToString = SlowBuffer.prototype.toString; - SlowBuffer.prototype.toString = function(encoding, start, end) { - encoding = String(encoding || 'utf8').toLowerCase(); - - // Use native conversion when possible - if (Buffer.isNativeEncoding(encoding)) - return original.SlowBufferToString.call(this, encoding, start, end); - - // Otherwise, use our decoding method. - if (typeof start == 'undefined') start = 0; - if (typeof end == 'undefined') end = this.length; - return iconv.decode(this.slice(start, end), encoding); - } - - original.SlowBufferWrite = SlowBuffer.prototype.write; - SlowBuffer.prototype.write = function(string, offset, length, encoding) { - // Support both (string, offset, length, encoding) - // and the legacy (string, encoding, offset, length) - if (isFinite(offset)) { - if (!isFinite(length)) { - encoding = length; - length = undefined; - } - } else { // legacy - var swap = encoding; - encoding = offset; - offset = length; - length = swap; - } - - offset = +offset || 0; - var remaining = this.length - offset; - if (!length) { - length = remaining; - } else { - length = +length; - if (length > remaining) { - length = remaining; - } - } - encoding = String(encoding || 'utf8').toLowerCase(); - - // Use native conversion when possible - if (Buffer.isNativeEncoding(encoding)) - return original.SlowBufferWrite.call(this, string, offset, length, encoding); - - if (string.length > 0 && (length < 0 || offset < 0)) - throw new RangeError('attempt to write beyond buffer bounds'); - - // Otherwise, use our encoding method. - var buf = iconv.encode(string, encoding); - if (buf.length < length) length = buf.length; - buf.copy(this, offset, 0, length); - return length; - } - - // -- Buffer --------------------------------------------------------------- - - original.BufferIsEncoding = Buffer.isEncoding; - Buffer.isEncoding = function(encoding) { - return Buffer.isNativeEncoding(encoding) || iconv.encodingExists(encoding); - } - - original.BufferByteLength = Buffer.byteLength; - Buffer.byteLength = SlowBuffer.byteLength = function(str, encoding) { - encoding = String(encoding || 'utf8').toLowerCase(); - - // Use native conversion when possible - if (Buffer.isNativeEncoding(encoding)) - return original.BufferByteLength.call(this, str, encoding); - - // Slow, I know, but we don't have a better way yet. - return iconv.encode(str, encoding).length; - } - - original.BufferToString = Buffer.prototype.toString; - Buffer.prototype.toString = function(encoding, start, end) { - encoding = String(encoding || 'utf8').toLowerCase(); - - // Use native conversion when possible - if (Buffer.isNativeEncoding(encoding)) - return original.BufferToString.call(this, encoding, start, end); - - // Otherwise, use our decoding method. - if (typeof start == 'undefined') start = 0; - if (typeof end == 'undefined') end = this.length; - return iconv.decode(this.slice(start, end), encoding); - } - - original.BufferWrite = Buffer.prototype.write; - Buffer.prototype.write = function(string, offset, length, encoding) { - var _offset = offset, _length = length, _encoding = encoding; - // Support both (string, offset, length, encoding) - // and the legacy (string, encoding, offset, length) - if (isFinite(offset)) { - if (!isFinite(length)) { - encoding = length; - length = undefined; - } - } else { // legacy - var swap = encoding; - encoding = offset; - offset = length; - length = swap; - } - - encoding = String(encoding || 'utf8').toLowerCase(); - - // Use native conversion when possible - if (Buffer.isNativeEncoding(encoding)) - return original.BufferWrite.call(this, string, _offset, _length, _encoding); - - offset = +offset || 0; - var remaining = this.length - offset; - if (!length) { - length = remaining; - } else { - length = +length; - if (length > remaining) { - length = remaining; - } - } - - if (string.length > 0 && (length < 0 || offset < 0)) - throw new RangeError('attempt to write beyond buffer bounds'); - - // Otherwise, use our encoding method. - var buf = iconv.encode(string, encoding); - if (buf.length < length) length = buf.length; - buf.copy(this, offset, 0, length); - return length; - - // TODO: Set _charsWritten. - } - - - // -- Readable ------------------------------------------------------------- - if (iconv.supportsStreams) { - var Readable = require('stream').Readable; - - original.ReadableSetEncoding = Readable.prototype.setEncoding; - Readable.prototype.setEncoding = function setEncoding(enc, options) { - // Use our own decoder, it has the same interface. - // We cannot use original function as it doesn't handle BOM-s. - this._readableState.decoder = iconv.getDecoder(enc, options); - this._readableState.encoding = enc; - } - - Readable.prototype.collect = iconv._collect; - } - } - - // Remove iconv-lite Node primitive extensions. - iconv.undoExtendNodeEncodings = function undoExtendNodeEncodings() { - if (!iconv.supportsNodeEncodingsExtension) - return; - if (!original) - throw new Error("require('iconv-lite').undoExtendNodeEncodings(): Nothing to undo; extendNodeEncodings() is not called.") - - delete Buffer.isNativeEncoding; - - var SlowBuffer = require('buffer').SlowBuffer; - - SlowBuffer.prototype.toString = original.SlowBufferToString; - SlowBuffer.prototype.write = original.SlowBufferWrite; - - Buffer.isEncoding = original.BufferIsEncoding; - Buffer.byteLength = original.BufferByteLength; - Buffer.prototype.toString = original.BufferToString; - Buffer.prototype.write = original.BufferWrite; - - if (iconv.supportsStreams) { - var Readable = require('stream').Readable; - - Readable.prototype.setEncoding = original.ReadableSetEncoding; - delete Readable.prototype.collect; - } - - original = undefined; - } -} diff --git a/node_modules/iconv-lite/lib/index.d.ts b/node_modules/iconv-lite/lib/index.d.ts deleted file mode 100644 index 0547eb3..0000000 --- a/node_modules/iconv-lite/lib/index.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - * REQUIREMENT: This definition is dependent on the @types/node definition. - * Install with `npm install @types/node --save-dev` - *--------------------------------------------------------------------------------------------*/ - -declare module 'iconv-lite' { - export function decode(buffer: Buffer, encoding: string, options?: Options): string; - - export function encode(content: string, encoding: string, options?: Options): Buffer; - - export function encodingExists(encoding: string): boolean; - - export function decodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; - - export function encodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; -} - -export interface Options { - stripBOM?: boolean; - addBOM?: boolean; - defaultEncoding?: string; -} diff --git a/node_modules/iconv-lite/lib/index.js b/node_modules/iconv-lite/lib/index.js deleted file mode 100644 index 5391919..0000000 --- a/node_modules/iconv-lite/lib/index.js +++ /dev/null @@ -1,153 +0,0 @@ -"use strict"; - -// Some environments don't have global Buffer (e.g. React Native). -// Solution would be installing npm modules "buffer" and "stream" explicitly. -var Buffer = require("safer-buffer").Buffer; - -var bomHandling = require("./bom-handling"), - iconv = module.exports; - -// All codecs and aliases are kept here, keyed by encoding name/alias. -// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`. -iconv.encodings = null; - -// Characters emitted in case of error. -iconv.defaultCharUnicode = '�'; -iconv.defaultCharSingleByte = '?'; - -// Public API. -iconv.encode = function encode(str, encoding, options) { - str = "" + (str || ""); // Ensure string. - - var encoder = iconv.getEncoder(encoding, options); - - var res = encoder.write(str); - var trail = encoder.end(); - - return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res; -} - -iconv.decode = function decode(buf, encoding, options) { - if (typeof buf === 'string') { - if (!iconv.skipDecodeWarning) { - console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding'); - iconv.skipDecodeWarning = true; - } - - buf = Buffer.from("" + (buf || ""), "binary"); // Ensure buffer. - } - - var decoder = iconv.getDecoder(encoding, options); - - var res = decoder.write(buf); - var trail = decoder.end(); - - return trail ? (res + trail) : res; -} - -iconv.encodingExists = function encodingExists(enc) { - try { - iconv.getCodec(enc); - return true; - } catch (e) { - return false; - } -} - -// Legacy aliases to convert functions -iconv.toEncoding = iconv.encode; -iconv.fromEncoding = iconv.decode; - -// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache. -iconv._codecDataCache = {}; -iconv.getCodec = function getCodec(encoding) { - if (!iconv.encodings) - iconv.encodings = require("../encodings"); // Lazy load all encoding definitions. - - // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. - var enc = iconv._canonicalizeEncoding(encoding); - - // Traverse iconv.encodings to find actual codec. - var codecOptions = {}; - while (true) { - var codec = iconv._codecDataCache[enc]; - if (codec) - return codec; - - var codecDef = iconv.encodings[enc]; - - switch (typeof codecDef) { - case "string": // Direct alias to other encoding. - enc = codecDef; - break; - - case "object": // Alias with options. Can be layered. - for (var key in codecDef) - codecOptions[key] = codecDef[key]; - - if (!codecOptions.encodingName) - codecOptions.encodingName = enc; - - enc = codecDef.type; - break; - - case "function": // Codec itself. - if (!codecOptions.encodingName) - codecOptions.encodingName = enc; - - // The codec function must load all tables and return object with .encoder and .decoder methods. - // It'll be called only once (for each different options object). - codec = new codecDef(codecOptions, iconv); - - iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later. - return codec; - - default: - throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')"); - } - } -} - -iconv._canonicalizeEncoding = function(encoding) { - // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. - return (''+encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, ""); -} - -iconv.getEncoder = function getEncoder(encoding, options) { - var codec = iconv.getCodec(encoding), - encoder = new codec.encoder(options, codec); - - if (codec.bomAware && options && options.addBOM) - encoder = new bomHandling.PrependBOM(encoder, options); - - return encoder; -} - -iconv.getDecoder = function getDecoder(encoding, options) { - var codec = iconv.getCodec(encoding), - decoder = new codec.decoder(options, codec); - - if (codec.bomAware && !(options && options.stripBOM === false)) - decoder = new bomHandling.StripBOM(decoder, options); - - return decoder; -} - - -// Load extensions in Node. All of them are omitted in Browserify build via 'browser' field in package.json. -var nodeVer = typeof process !== 'undefined' && process.versions && process.versions.node; -if (nodeVer) { - - // Load streaming support in Node v0.10+ - var nodeVerArr = nodeVer.split(".").map(Number); - if (nodeVerArr[0] > 0 || nodeVerArr[1] >= 10) { - require("./streams")(iconv); - } - - // Load Node primitive extensions. - require("./extend-node")(iconv); -} - -if ("Ā" != "\u0100") { - console.error("iconv-lite warning: javascript files use encoding different from utf-8. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info."); -} diff --git a/node_modules/iconv-lite/lib/streams.js b/node_modules/iconv-lite/lib/streams.js deleted file mode 100644 index 4409552..0000000 --- a/node_modules/iconv-lite/lib/streams.js +++ /dev/null @@ -1,121 +0,0 @@ -"use strict"; - -var Buffer = require("buffer").Buffer, - Transform = require("stream").Transform; - - -// == Exports ================================================================== -module.exports = function(iconv) { - - // Additional Public API. - iconv.encodeStream = function encodeStream(encoding, options) { - return new IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options); - } - - iconv.decodeStream = function decodeStream(encoding, options) { - return new IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options); - } - - iconv.supportsStreams = true; - - - // Not published yet. - iconv.IconvLiteEncoderStream = IconvLiteEncoderStream; - iconv.IconvLiteDecoderStream = IconvLiteDecoderStream; - iconv._collect = IconvLiteDecoderStream.prototype.collect; -}; - - -// == Encoder stream ======================================================= -function IconvLiteEncoderStream(conv, options) { - this.conv = conv; - options = options || {}; - options.decodeStrings = false; // We accept only strings, so we don't need to decode them. - Transform.call(this, options); -} - -IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { - constructor: { value: IconvLiteEncoderStream } -}); - -IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) { - if (typeof chunk != 'string') - return done(new Error("Iconv encoding stream needs strings as its input.")); - try { - var res = this.conv.write(chunk); - if (res && res.length) this.push(res); - done(); - } - catch (e) { - done(e); - } -} - -IconvLiteEncoderStream.prototype._flush = function(done) { - try { - var res = this.conv.end(); - if (res && res.length) this.push(res); - done(); - } - catch (e) { - done(e); - } -} - -IconvLiteEncoderStream.prototype.collect = function(cb) { - var chunks = []; - this.on('error', cb); - this.on('data', function(chunk) { chunks.push(chunk); }); - this.on('end', function() { - cb(null, Buffer.concat(chunks)); - }); - return this; -} - - -// == Decoder stream ======================================================= -function IconvLiteDecoderStream(conv, options) { - this.conv = conv; - options = options || {}; - options.encoding = this.encoding = 'utf8'; // We output strings. - Transform.call(this, options); -} - -IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { - constructor: { value: IconvLiteDecoderStream } -}); - -IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) { - if (!Buffer.isBuffer(chunk)) - return done(new Error("Iconv decoding stream needs buffers as its input.")); - try { - var res = this.conv.write(chunk); - if (res && res.length) this.push(res, this.encoding); - done(); - } - catch (e) { - done(e); - } -} - -IconvLiteDecoderStream.prototype._flush = function(done) { - try { - var res = this.conv.end(); - if (res && res.length) this.push(res, this.encoding); - done(); - } - catch (e) { - done(e); - } -} - -IconvLiteDecoderStream.prototype.collect = function(cb) { - var res = ''; - this.on('error', cb); - this.on('data', function(chunk) { res += chunk; }); - this.on('end', function() { - cb(null, res); - }); - return this; -} - diff --git a/node_modules/iconv-lite/package.json b/node_modules/iconv-lite/package.json deleted file mode 100644 index a7c74fc..0000000 --- a/node_modules/iconv-lite/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "iconv-lite", - "description": "Convert character encodings in pure javascript.", - "version": "0.4.24", - "license": "MIT", - "keywords": [ - "iconv", - "convert", - "charset", - "icu" - ], - "author": "Alexander Shtuchkin ", - "main": "./lib/index.js", - "typings": "./lib/index.d.ts", - "homepage": "https://github.com/ashtuchkin/iconv-lite", - "bugs": "https://github.com/ashtuchkin/iconv-lite/issues", - "repository": { - "type": "git", - "url": "git://github.com/ashtuchkin/iconv-lite.git" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "coverage": "istanbul cover _mocha -- --grep .", - "coverage-open": "open coverage/lcov-report/index.html", - "test": "mocha --reporter spec --grep ." - }, - "browser": { - "./lib/extend-node": false, - "./lib/streams": false - }, - "devDependencies": { - "mocha": "^3.1.0", - "request": "~2.87.0", - "unorm": "*", - "errto": "*", - "async": "*", - "istanbul": "*", - "semver": "*", - "iconv": "*" - }, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - } -} diff --git a/node_modules/ieee754/LICENSE b/node_modules/ieee754/LICENSE deleted file mode 100644 index 5aac82c..0000000 --- a/node_modules/ieee754/LICENSE +++ /dev/null @@ -1,11 +0,0 @@ -Copyright 2008 Fair Oaks Labs, Inc. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/ieee754/README.md b/node_modules/ieee754/README.md deleted file mode 100644 index cb7527b..0000000 --- a/node_modules/ieee754/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# ieee754 [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] - -[travis-image]: https://img.shields.io/travis/feross/ieee754/master.svg -[travis-url]: https://travis-ci.org/feross/ieee754 -[npm-image]: https://img.shields.io/npm/v/ieee754.svg -[npm-url]: https://npmjs.org/package/ieee754 -[downloads-image]: https://img.shields.io/npm/dm/ieee754.svg -[downloads-url]: https://npmjs.org/package/ieee754 -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com - -[![saucelabs][saucelabs-image]][saucelabs-url] - -[saucelabs-image]: https://saucelabs.com/browser-matrix/ieee754.svg -[saucelabs-url]: https://saucelabs.com/u/ieee754 - -### Read/write IEEE754 floating point numbers from/to a Buffer or array-like object. - -## install - -``` -npm install ieee754 -``` - -## methods - -`var ieee754 = require('ieee754')` - -The `ieee754` object has the following functions: - -``` -ieee754.read = function (buffer, offset, isLE, mLen, nBytes) -ieee754.write = function (buffer, value, offset, isLE, mLen, nBytes) -``` - -The arguments mean the following: - -- buffer = the buffer -- offset = offset into the buffer -- value = value to set (only for `write`) -- isLe = is little endian? -- mLen = mantissa length -- nBytes = number of bytes - -## what is ieee754? - -The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point computation. [Read more](http://en.wikipedia.org/wiki/IEEE_floating_point). - -## license - -BSD 3 Clause. Copyright (c) 2008, Fair Oaks Labs, Inc. diff --git a/node_modules/ieee754/index.d.ts b/node_modules/ieee754/index.d.ts deleted file mode 100644 index f1e4354..0000000 --- a/node_modules/ieee754/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -declare namespace ieee754 { - export function read( - buffer: Uint8Array, offset: number, isLE: boolean, mLen: number, - nBytes: number): number; - export function write( - buffer: Uint8Array, value: number, offset: number, isLE: boolean, - mLen: number, nBytes: number): void; - } - - export = ieee754; \ No newline at end of file diff --git a/node_modules/ieee754/index.js b/node_modules/ieee754/index.js deleted file mode 100644 index 81d26c3..0000000 --- a/node_modules/ieee754/index.js +++ /dev/null @@ -1,85 +0,0 @@ -/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ -exports.read = function (buffer, offset, isLE, mLen, nBytes) { - var e, m - var eLen = (nBytes * 8) - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var nBits = -7 - var i = isLE ? (nBytes - 1) : 0 - var d = isLE ? -1 : 1 - var s = buffer[offset + i] - - i += d - - e = s & ((1 << (-nBits)) - 1) - s >>= (-nBits) - nBits += eLen - for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} - - m = e & ((1 << (-nBits)) - 1) - e >>= (-nBits) - nBits += mLen - for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} - - if (e === 0) { - e = 1 - eBias - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity) - } else { - m = m + Math.pow(2, mLen) - e = e - eBias - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen) -} - -exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c - var eLen = (nBytes * 8) - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) - var i = isLE ? 0 : (nBytes - 1) - var d = isLE ? 1 : -1 - var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 - - value = Math.abs(value) - - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0 - e = eMax - } else { - e = Math.floor(Math.log(value) / Math.LN2) - if (value * (c = Math.pow(2, -e)) < 1) { - e-- - c *= 2 - } - if (e + eBias >= 1) { - value += rt / c - } else { - value += rt * Math.pow(2, 1 - eBias) - } - if (value * c >= 2) { - e++ - c /= 2 - } - - if (e + eBias >= eMax) { - m = 0 - e = eMax - } else if (e + eBias >= 1) { - m = ((value * c) - 1) * Math.pow(2, mLen) - e = e + eBias - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) - e = 0 - } - } - - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - - e = (e << mLen) | m - eLen += mLen - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} - - buffer[offset + i - d] |= s * 128 -} diff --git a/node_modules/ieee754/package.json b/node_modules/ieee754/package.json deleted file mode 100644 index 7b23851..0000000 --- a/node_modules/ieee754/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "ieee754", - "description": "Read/write IEEE754 floating point numbers from/to a Buffer or array-like object", - "version": "1.2.1", - "author": { - "name": "Feross Aboukhadijeh", - "email": "feross@feross.org", - "url": "https://feross.org" - }, - "contributors": [ - "Romain Beauxis " - ], - "devDependencies": { - "airtap": "^3.0.0", - "standard": "*", - "tape": "^5.0.1" - }, - "keywords": [ - "IEEE 754", - "buffer", - "convert", - "floating point", - "ieee754" - ], - "license": "BSD-3-Clause", - "main": "index.js", - "types": "index.d.ts", - "repository": { - "type": "git", - "url": "git://github.com/feross/ieee754.git" - }, - "scripts": { - "test": "standard && npm run test-node && npm run test-browser", - "test-browser": "airtap -- test/*.js", - "test-browser-local": "airtap --local -- test/*.js", - "test-node": "tape test/*.js" - }, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] -} diff --git a/node_modules/ignore-by-default/LICENSE b/node_modules/ignore-by-default/LICENSE deleted file mode 100644 index ee1e367..0000000 --- a/node_modules/ignore-by-default/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -ISC License (ISC) -Copyright (c) 2016, Mark Wubben - -Permission to use, copy, modify, and/or distribute this software for any purpose -with or without fee is hereby granted, provided that the above copyright notice -and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. diff --git a/node_modules/ignore-by-default/README.md b/node_modules/ignore-by-default/README.md deleted file mode 100644 index ee77191..0000000 --- a/node_modules/ignore-by-default/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# ignore-by-default - -This is a package aimed at Node.js development tools. It provides a list of -directories that should probably be ignored by such tools, e.g. when watching -for file changes. - -It's used by [AVA](https://www.npmjs.com/package/ava) and -[nodemon](https://www.npmjs.com/package/nodemon). - -[Please contribute!](./CONTRIBUTING.md) - -## Installation - -``` -npm install --save ignore-by-default -``` - -## Usage - -The `ignore-by-default` module exports a `directories()` function, which will -return an array of directory names. These are the ones you should ignore. - -```js -// ['.git', '.sass_cache', …] -var ignoredDirectories = require('ignore-by-default').directories() -``` diff --git a/node_modules/ignore-by-default/index.js b/node_modules/ignore-by-default/index.js deleted file mode 100644 index c65857d..0000000 --- a/node_modules/ignore-by-default/index.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict' - -exports.directories = function () { - return [ - '.git', // Git repository files, see - '.nyc_output', // Temporary directory where nyc stores coverage data, see - '.sass-cache', // Cache folder for node-sass, see - 'bower_components', // Where Bower packages are installed, see - 'coverage', // Standard output directory for code coverage reports, see - 'node_modules' // Where Node modules are installed, see - ] -} diff --git a/node_modules/ignore-by-default/package.json b/node_modules/ignore-by-default/package.json deleted file mode 100644 index 38e0d2b..0000000 --- a/node_modules/ignore-by-default/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "ignore-by-default", - "version": "1.0.1", - "description": "A list of directories you should ignore by default", - "main": "index.js", - "files": [ - "index.js" - ], - "scripts": { - "test": "standard && node test.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/novemberborn/ignore-by-default.git" - }, - "keywords": [ - "ignore", - "chokidar", - "watcher", - "exclude", - "glob", - "pattern" - ], - "author": "Mark Wubben (https://novemberborn.net/)", - "license": "ISC", - "bugs": { - "url": "https://github.com/novemberborn/ignore-by-default/issues" - }, - "homepage": "https://github.com/novemberborn/ignore-by-default#readme", - "devDependencies": { - "figures": "^1.4.0", - "standard": "^6.0.4" - } -} diff --git a/node_modules/inherits/LICENSE b/node_modules/inherits/LICENSE deleted file mode 100644 index dea3013..0000000 --- a/node_modules/inherits/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - diff --git a/node_modules/inherits/README.md b/node_modules/inherits/README.md deleted file mode 100644 index b1c5665..0000000 --- a/node_modules/inherits/README.md +++ /dev/null @@ -1,42 +0,0 @@ -Browser-friendly inheritance fully compatible with standard node.js -[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). - -This package exports standard `inherits` from node.js `util` module in -node environment, but also provides alternative browser-friendly -implementation through [browser -field](https://gist.github.com/shtylman/4339901). Alternative -implementation is a literal copy of standard one located in standalone -module to avoid requiring of `util`. It also has a shim for old -browsers with no `Object.create` support. - -While keeping you sure you are using standard `inherits` -implementation in node.js environment, it allows bundlers such as -[browserify](https://github.com/substack/node-browserify) to not -include full `util` package to your client code if all you need is -just `inherits` function. It worth, because browser shim for `util` -package is large and `inherits` is often the single function you need -from it. - -It's recommended to use this package instead of -`require('util').inherits` for any code that has chances to be used -not only in node.js but in browser too. - -## usage - -```js -var inherits = require('inherits'); -// then use exactly as the standard one -``` - -## note on version ~1.0 - -Version ~1.0 had completely different motivation and is not compatible -neither with 2.0 nor with standard node.js `inherits`. - -If you are using version ~1.0 and planning to switch to ~2.0, be -careful: - -* new version uses `super_` instead of `super` for referencing - superclass -* new version overwrites current prototype while old one preserves any - existing fields on it diff --git a/node_modules/inherits/inherits.js b/node_modules/inherits/inherits.js deleted file mode 100644 index f71f2d9..0000000 --- a/node_modules/inherits/inherits.js +++ /dev/null @@ -1,9 +0,0 @@ -try { - var util = require('util'); - /* istanbul ignore next */ - if (typeof util.inherits !== 'function') throw ''; - module.exports = util.inherits; -} catch (e) { - /* istanbul ignore next */ - module.exports = require('./inherits_browser.js'); -} diff --git a/node_modules/inherits/inherits_browser.js b/node_modules/inherits/inherits_browser.js deleted file mode 100644 index 86bbb3d..0000000 --- a/node_modules/inherits/inherits_browser.js +++ /dev/null @@ -1,27 +0,0 @@ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }) - } - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } - } -} diff --git a/node_modules/inherits/package.json b/node_modules/inherits/package.json deleted file mode 100644 index 37b4366..0000000 --- a/node_modules/inherits/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "inherits", - "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "version": "2.0.4", - "keywords": [ - "inheritance", - "class", - "klass", - "oop", - "object-oriented", - "inherits", - "browser", - "browserify" - ], - "main": "./inherits.js", - "browser": "./inherits_browser.js", - "repository": "git://github.com/isaacs/inherits", - "license": "ISC", - "scripts": { - "test": "tap" - }, - "devDependencies": { - "tap": "^14.2.4" - }, - "files": [ - "inherits.js", - "inherits_browser.js" - ] -} diff --git a/node_modules/ipaddr.js/LICENSE b/node_modules/ipaddr.js/LICENSE deleted file mode 100644 index f6b37b5..0000000 --- a/node_modules/ipaddr.js/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2011-2017 whitequark - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/ipaddr.js/README.md b/node_modules/ipaddr.js/README.md deleted file mode 100644 index f57725b..0000000 --- a/node_modules/ipaddr.js/README.md +++ /dev/null @@ -1,233 +0,0 @@ -# ipaddr.js — an IPv6 and IPv4 address manipulation library [![Build Status](https://travis-ci.org/whitequark/ipaddr.js.svg)](https://travis-ci.org/whitequark/ipaddr.js) - -ipaddr.js is a small (1.9K minified and gzipped) library for manipulating -IP addresses in JavaScript environments. It runs on both CommonJS runtimes -(e.g. [nodejs]) and in a web browser. - -ipaddr.js allows you to verify and parse string representation of an IP -address, match it against a CIDR range or range list, determine if it falls -into some reserved ranges (examples include loopback and private ranges), -and convert between IPv4 and IPv4-mapped IPv6 addresses. - -[nodejs]: http://nodejs.org - -## Installation - -`npm install ipaddr.js` - -or - -`bower install ipaddr.js` - -## API - -ipaddr.js defines one object in the global scope: `ipaddr`. In CommonJS, -it is exported from the module: - -```js -var ipaddr = require('ipaddr.js'); -``` - -The API consists of several global methods and two classes: ipaddr.IPv6 and ipaddr.IPv4. - -### Global methods - -There are three global methods defined: `ipaddr.isValid`, `ipaddr.parse` and -`ipaddr.process`. All of them receive a string as a single parameter. - -The `ipaddr.isValid` method returns `true` if the address is a valid IPv4 or -IPv6 address, and `false` otherwise. It does not throw any exceptions. - -The `ipaddr.parse` method returns an object representing the IP address, -or throws an `Error` if the passed string is not a valid representation of an -IP address. - -The `ipaddr.process` method works just like the `ipaddr.parse` one, but it -automatically converts IPv4-mapped IPv6 addresses to their IPv4 counterparts -before returning. It is useful when you have a Node.js instance listening -on an IPv6 socket, and the `net.ivp6.bindv6only` sysctl parameter (or its -equivalent on non-Linux OS) is set to 0. In this case, you can accept IPv4 -connections on your IPv6-only socket, but the remote address will be mangled. -Use `ipaddr.process` method to automatically demangle it. - -### Object representation - -Parsing methods return an object which descends from `ipaddr.IPv6` or -`ipaddr.IPv4`. These objects share some properties, but most of them differ. - -#### Shared properties - -One can determine the type of address by calling `addr.kind()`. It will return -either `"ipv6"` or `"ipv4"`. - -An address can be converted back to its string representation with `addr.toString()`. -Note that this method: - * does not return the original string used to create the object (in fact, there is - no way of getting that string) - * returns a compact representation (when it is applicable) - -A `match(range, bits)` method can be used to check if the address falls into a -certain CIDR range. -Note that an address can be (obviously) matched only against an address of the same type. - -For example: - -```js -var addr = ipaddr.parse("2001:db8:1234::1"); -var range = ipaddr.parse("2001:db8::"); - -addr.match(range, 32); // => true -``` - -Alternatively, `match` can also be called as `match([range, bits])`. In this way, -it can be used together with the `parseCIDR(string)` method, which parses an IP -address together with a CIDR range. - -For example: - -```js -var addr = ipaddr.parse("2001:db8:1234::1"); - -addr.match(ipaddr.parseCIDR("2001:db8::/32")); // => true -``` - -A `range()` method returns one of predefined names for several special ranges defined -by IP protocols. The exact names (and their respective CIDR ranges) can be looked up -in the source: [IPv6 ranges] and [IPv4 ranges]. Some common ones include `"unicast"` -(the default one) and `"reserved"`. - -You can match against your own range list by using -`ipaddr.subnetMatch(address, rangeList, defaultName)` method. It can work with a mix of IPv6 or IPv4 addresses, and accepts a name-to-subnet map as the range list. For example: - -```js -var rangeList = { - documentationOnly: [ ipaddr.parse('2001:db8::'), 32 ], - tunnelProviders: [ - [ ipaddr.parse('2001:470::'), 32 ], // he.net - [ ipaddr.parse('2001:5c0::'), 32 ] // freenet6 - ] -}; -ipaddr.subnetMatch(ipaddr.parse('2001:470:8:66::1'), rangeList, 'unknown'); // => "tunnelProviders" -``` - -The addresses can be converted to their byte representation with `toByteArray()`. -(Actually, JavaScript mostly does not know about byte buffers. They are emulated with -arrays of numbers, each in range of 0..255.) - -```js -var bytes = ipaddr.parse('2a00:1450:8007::68').toByteArray(); // ipv6.google.com -bytes // => [42, 0x00, 0x14, 0x50, 0x80, 0x07, 0x00, , 0x00, 0x68 ] -``` - -The `ipaddr.IPv4` and `ipaddr.IPv6` objects have some methods defined, too. All of them -have the same interface for both protocols, and are similar to global methods. - -`ipaddr.IPvX.isValid(string)` can be used to check if the string is a valid address -for particular protocol, and `ipaddr.IPvX.parse(string)` is the error-throwing parser. - -`ipaddr.IPvX.isValid(string)` uses the same format for parsing as the POSIX `inet_ntoa` function, which accepts unusual formats like `0xc0.168.1.1` or `0x10000000`. The function `ipaddr.IPv4.isValidFourPartDecimal(string)` validates the IPv4 address and also ensures that it is written in four-part decimal format. - -[IPv6 ranges]: https://github.com/whitequark/ipaddr.js/blob/master/src/ipaddr.coffee#L186 -[IPv4 ranges]: https://github.com/whitequark/ipaddr.js/blob/master/src/ipaddr.coffee#L71 - -#### IPv6 properties - -Sometimes you will want to convert IPv6 not to a compact string representation (with -the `::` substitution); the `toNormalizedString()` method will return an address where -all zeroes are explicit. - -For example: - -```js -var addr = ipaddr.parse("2001:0db8::0001"); -addr.toString(); // => "2001:db8::1" -addr.toNormalizedString(); // => "2001:db8:0:0:0:0:0:1" -``` - -The `isIPv4MappedAddress()` method will return `true` if this address is an IPv4-mapped -one, and `toIPv4Address()` will return an IPv4 object address. - -To access the underlying binary representation of the address, use `addr.parts`. - -```js -var addr = ipaddr.parse("2001:db8:10::1234:DEAD"); -addr.parts // => [0x2001, 0xdb8, 0x10, 0, 0, 0, 0x1234, 0xdead] -``` - -A IPv6 zone index can be accessed via `addr.zoneId`: - -```js -var addr = ipaddr.parse("2001:db8::%eth0"); -addr.zoneId // => 'eth0' -``` - -#### IPv4 properties - -`toIPv4MappedAddress()` will return a corresponding IPv4-mapped IPv6 address. - -To access the underlying representation of the address, use `addr.octets`. - -```js -var addr = ipaddr.parse("192.168.1.1"); -addr.octets // => [192, 168, 1, 1] -``` - -`prefixLengthFromSubnetMask()` will return a CIDR prefix length for a valid IPv4 netmask or -null if the netmask is not valid. - -```js -ipaddr.IPv4.parse('255.255.255.240').prefixLengthFromSubnetMask() == 28 -ipaddr.IPv4.parse('255.192.164.0').prefixLengthFromSubnetMask() == null -``` - -`subnetMaskFromPrefixLength()` will return an IPv4 netmask for a valid CIDR prefix length. - -```js -ipaddr.IPv4.subnetMaskFromPrefixLength(24) == "255.255.255.0" -ipaddr.IPv4.subnetMaskFromPrefixLength(29) == "255.255.255.248" -``` - -`broadcastAddressFromCIDR()` will return the broadcast address for a given IPv4 interface and netmask in CIDR notation. -```js -ipaddr.IPv4.broadcastAddressFromCIDR("172.0.0.1/24") == "172.0.0.255" -``` -`networkAddressFromCIDR()` will return the network address for a given IPv4 interface and netmask in CIDR notation. -```js -ipaddr.IPv4.networkAddressFromCIDR("172.0.0.1/24") == "172.0.0.0" -``` - -#### Conversion - -IPv4 and IPv6 can be converted bidirectionally to and from network byte order (MSB) byte arrays. - -The `fromByteArray()` method will take an array and create an appropriate IPv4 or IPv6 object -if the input satisfies the requirements. For IPv4 it has to be an array of four 8-bit values, -while for IPv6 it has to be an array of sixteen 8-bit values. - -For example: -```js -var addr = ipaddr.fromByteArray([0x7f, 0, 0, 1]); -addr.toString(); // => "127.0.0.1" -``` - -or - -```js -var addr = ipaddr.fromByteArray([0x20, 1, 0xd, 0xb8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]) -addr.toString(); // => "2001:db8::1" -``` - -Both objects also offer a `toByteArray()` method, which returns an array in network byte order (MSB). - -For example: -```js -var addr = ipaddr.parse("127.0.0.1"); -addr.toByteArray(); // => [0x7f, 0, 0, 1] -``` - -or - -```js -var addr = ipaddr.parse("2001:db8::1"); -addr.toByteArray(); // => [0x20, 1, 0xd, 0xb8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1] -``` diff --git a/node_modules/ipaddr.js/ipaddr.min.js b/node_modules/ipaddr.js/ipaddr.min.js deleted file mode 100644 index b54a7cc..0000000 --- a/node_modules/ipaddr.js/ipaddr.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var r,t,n,e,i,o,a,s;t={},s=this,"undefined"!=typeof module&&null!==module&&module.exports?module.exports=t:s.ipaddr=t,a=function(r,t,n,e){var i,o;if(r.length!==t.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");for(i=0;e>0;){if((o=n-e)<0&&(o=0),r[i]>>o!=t[i]>>o)return!1;e-=n,i+=1}return!0},t.subnetMatch=function(r,t,n){var e,i,o,a,s;null==n&&(n="unicast");for(o in t)for(!(a=t[o])[0]||a[0]instanceof Array||(a=[a]),e=0,i=a.length;e=0;t=n+=-1){if(!((e=this.octets[t])in a))return null;if(o=a[e],i&&0!==o)return null;8!==o&&(i=!0),r+=o}return 32-r},r}(),n="(0?\\d+|0x[a-f0-9]+)",e={fourOctet:new RegExp("^"+n+"\\."+n+"\\."+n+"\\."+n+"$","i"),longValue:new RegExp("^"+n+"$","i")},t.IPv4.parser=function(r){var t,n,i,o,a;if(n=function(r){return"0"===r[0]&&"x"!==r[1]?parseInt(r,8):parseInt(r)},t=r.match(e.fourOctet))return function(){var r,e,o,a;for(a=[],r=0,e=(o=t.slice(1,6)).length;r4294967295||a<0)throw new Error("ipaddr: address outside defined range");return function(){var r,t;for(t=[],o=r=0;r<=24;o=r+=8)t.push(a>>o&255);return t}().reverse()}return null},t.IPv6=function(){function r(r,t){var n,e,i,o,a,s;if(16===r.length)for(this.parts=[],n=e=0;e<=14;n=e+=2)this.parts.push(r[n]<<8|r[n+1]);else{if(8!==r.length)throw new Error("ipaddr: ipv6 part count should be 8 or 16");this.parts=r}for(i=0,o=(s=this.parts).length;it&&(r=n.index,t=n[0].length);return t<0?i:i.substring(0,r)+"::"+i.substring(r+t)},r.prototype.toByteArray=function(){var r,t,n,e,i;for(r=[],t=0,n=(i=this.parts).length;t>8),r.push(255&e);return r},r.prototype.toNormalizedString=function(){var r,t,n;return r=function(){var r,n,e,i;for(i=[],r=0,n=(e=this.parts).length;r>8,255&r,n>>8,255&n])},r.prototype.prefixLengthFromSubnetMask=function(){var r,t,n,e,i,o,a;for(a={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},r=0,i=!1,t=n=7;n>=0;t=n+=-1){if(!((e=this.parts[t])in a))return null;if(o=a[e],i&&0!==o)return null;16!==o&&(i=!0),r+=o}return 128-r},r}(),i="(?:[0-9a-f]+::?)+",o={zoneIndex:new RegExp("%[0-9a-z]{1,}","i"),native:new RegExp("^(::)?("+i+")?([0-9a-f]+)?(::)?(%[0-9a-z]{1,})?$","i"),transitional:new RegExp("^((?:"+i+")|(?:::)(?:"+i+")?)"+n+"\\."+n+"\\."+n+"\\."+n+"(%[0-9a-z]{1,})?$","i")},r=function(r,t){var n,e,i,a,s,p;if(r.indexOf("::")!==r.lastIndexOf("::"))return null;for((p=(r.match(o.zoneIndex)||[])[0])&&(p=p.substring(1),r=r.replace(/%.+$/,"")),n=0,e=-1;(e=r.indexOf(":",e+1))>=0;)n++;if("::"===r.substr(0,2)&&n--,"::"===r.substr(-2,2)&&n--,n>t)return null;for(s=t-n,a=":";s--;)a+="0:";return":"===(r=r.replace("::",a))[0]&&(r=r.slice(1)),":"===r[r.length-1]&&(r=r.slice(0,-1)),t=function(){var t,n,e,o;for(o=[],t=0,n=(e=r.split(":")).length;t=0&&t<=32)return e=[this.parse(n[1]),t],Object.defineProperty(e,"toString",{value:function(){return this.join("/")}}),e;throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},t.IPv4.subnetMaskFromPrefixLength=function(r){var t,n,e;if((r=parseInt(r))<0||r>32)throw new Error("ipaddr: invalid IPv4 prefix length");for(e=[0,0,0,0],n=0,t=Math.floor(r/8);n=0&&t<=128)return e=[this.parse(n[1]),t],Object.defineProperty(e,"toString",{value:function(){return this.join("/")}}),e;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},t.isValid=function(r){return t.IPv6.isValid(r)||t.IPv4.isValid(r)},t.parse=function(r){if(t.IPv6.isValid(r))return t.IPv6.parse(r);if(t.IPv4.isValid(r))return t.IPv4.parse(r);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},t.parseCIDR=function(r){try{return t.IPv6.parseCIDR(r)}catch(n){n;try{return t.IPv4.parseCIDR(r)}catch(r){throw r,new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},t.fromByteArray=function(r){var n;if(4===(n=r.length))return new t.IPv4(r);if(16===n)return new t.IPv6(r);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},t.process=function(r){var t;return t=this.parse(r),"ipv6"===t.kind()&&t.isIPv4MappedAddress()?t.toIPv4Address():t}}).call(this); \ No newline at end of file diff --git a/node_modules/ipaddr.js/lib/ipaddr.js b/node_modules/ipaddr.js/lib/ipaddr.js deleted file mode 100644 index 18bd93b..0000000 --- a/node_modules/ipaddr.js/lib/ipaddr.js +++ /dev/null @@ -1,673 +0,0 @@ -(function() { - var expandIPv6, ipaddr, ipv4Part, ipv4Regexes, ipv6Part, ipv6Regexes, matchCIDR, root, zoneIndex; - - ipaddr = {}; - - root = this; - - if ((typeof module !== "undefined" && module !== null) && module.exports) { - module.exports = ipaddr; - } else { - root['ipaddr'] = ipaddr; - } - - matchCIDR = function(first, second, partSize, cidrBits) { - var part, shift; - if (first.length !== second.length) { - throw new Error("ipaddr: cannot match CIDR for objects with different lengths"); - } - part = 0; - while (cidrBits > 0) { - shift = partSize - cidrBits; - if (shift < 0) { - shift = 0; - } - if (first[part] >> shift !== second[part] >> shift) { - return false; - } - cidrBits -= partSize; - part += 1; - } - return true; - }; - - ipaddr.subnetMatch = function(address, rangeList, defaultName) { - var k, len, rangeName, rangeSubnets, subnet; - if (defaultName == null) { - defaultName = 'unicast'; - } - for (rangeName in rangeList) { - rangeSubnets = rangeList[rangeName]; - if (rangeSubnets[0] && !(rangeSubnets[0] instanceof Array)) { - rangeSubnets = [rangeSubnets]; - } - for (k = 0, len = rangeSubnets.length; k < len; k++) { - subnet = rangeSubnets[k]; - if (address.kind() === subnet[0].kind()) { - if (address.match.apply(address, subnet)) { - return rangeName; - } - } - } - } - return defaultName; - }; - - ipaddr.IPv4 = (function() { - function IPv4(octets) { - var k, len, octet; - if (octets.length !== 4) { - throw new Error("ipaddr: ipv4 octet count should be 4"); - } - for (k = 0, len = octets.length; k < len; k++) { - octet = octets[k]; - if (!((0 <= octet && octet <= 255))) { - throw new Error("ipaddr: ipv4 octet should fit in 8 bits"); - } - } - this.octets = octets; - } - - IPv4.prototype.kind = function() { - return 'ipv4'; - }; - - IPv4.prototype.toString = function() { - return this.octets.join("."); - }; - - IPv4.prototype.toNormalizedString = function() { - return this.toString(); - }; - - IPv4.prototype.toByteArray = function() { - return this.octets.slice(0); - }; - - IPv4.prototype.match = function(other, cidrRange) { - var ref; - if (cidrRange === void 0) { - ref = other, other = ref[0], cidrRange = ref[1]; - } - if (other.kind() !== 'ipv4') { - throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one"); - } - return matchCIDR(this.octets, other.octets, 8, cidrRange); - }; - - IPv4.prototype.SpecialRanges = { - unspecified: [[new IPv4([0, 0, 0, 0]), 8]], - broadcast: [[new IPv4([255, 255, 255, 255]), 32]], - multicast: [[new IPv4([224, 0, 0, 0]), 4]], - linkLocal: [[new IPv4([169, 254, 0, 0]), 16]], - loopback: [[new IPv4([127, 0, 0, 0]), 8]], - carrierGradeNat: [[new IPv4([100, 64, 0, 0]), 10]], - "private": [[new IPv4([10, 0, 0, 0]), 8], [new IPv4([172, 16, 0, 0]), 12], [new IPv4([192, 168, 0, 0]), 16]], - reserved: [[new IPv4([192, 0, 0, 0]), 24], [new IPv4([192, 0, 2, 0]), 24], [new IPv4([192, 88, 99, 0]), 24], [new IPv4([198, 51, 100, 0]), 24], [new IPv4([203, 0, 113, 0]), 24], [new IPv4([240, 0, 0, 0]), 4]] - }; - - IPv4.prototype.range = function() { - return ipaddr.subnetMatch(this, this.SpecialRanges); - }; - - IPv4.prototype.toIPv4MappedAddress = function() { - return ipaddr.IPv6.parse("::ffff:" + (this.toString())); - }; - - IPv4.prototype.prefixLengthFromSubnetMask = function() { - var cidr, i, k, octet, stop, zeros, zerotable; - zerotable = { - 0: 8, - 128: 7, - 192: 6, - 224: 5, - 240: 4, - 248: 3, - 252: 2, - 254: 1, - 255: 0 - }; - cidr = 0; - stop = false; - for (i = k = 3; k >= 0; i = k += -1) { - octet = this.octets[i]; - if (octet in zerotable) { - zeros = zerotable[octet]; - if (stop && zeros !== 0) { - return null; - } - if (zeros !== 8) { - stop = true; - } - cidr += zeros; - } else { - return null; - } - } - return 32 - cidr; - }; - - return IPv4; - - })(); - - ipv4Part = "(0?\\d+|0x[a-f0-9]+)"; - - ipv4Regexes = { - fourOctet: new RegExp("^" + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "$", 'i'), - longValue: new RegExp("^" + ipv4Part + "$", 'i') - }; - - ipaddr.IPv4.parser = function(string) { - var match, parseIntAuto, part, shift, value; - parseIntAuto = function(string) { - if (string[0] === "0" && string[1] !== "x") { - return parseInt(string, 8); - } else { - return parseInt(string); - } - }; - if (match = string.match(ipv4Regexes.fourOctet)) { - return (function() { - var k, len, ref, results; - ref = match.slice(1, 6); - results = []; - for (k = 0, len = ref.length; k < len; k++) { - part = ref[k]; - results.push(parseIntAuto(part)); - } - return results; - })(); - } else if (match = string.match(ipv4Regexes.longValue)) { - value = parseIntAuto(match[1]); - if (value > 0xffffffff || value < 0) { - throw new Error("ipaddr: address outside defined range"); - } - return ((function() { - var k, results; - results = []; - for (shift = k = 0; k <= 24; shift = k += 8) { - results.push((value >> shift) & 0xff); - } - return results; - })()).reverse(); - } else { - return null; - } - }; - - ipaddr.IPv6 = (function() { - function IPv6(parts, zoneId) { - var i, k, l, len, part, ref; - if (parts.length === 16) { - this.parts = []; - for (i = k = 0; k <= 14; i = k += 2) { - this.parts.push((parts[i] << 8) | parts[i + 1]); - } - } else if (parts.length === 8) { - this.parts = parts; - } else { - throw new Error("ipaddr: ipv6 part count should be 8 or 16"); - } - ref = this.parts; - for (l = 0, len = ref.length; l < len; l++) { - part = ref[l]; - if (!((0 <= part && part <= 0xffff))) { - throw new Error("ipaddr: ipv6 part should fit in 16 bits"); - } - } - if (zoneId) { - this.zoneId = zoneId; - } - } - - IPv6.prototype.kind = function() { - return 'ipv6'; - }; - - IPv6.prototype.toString = function() { - return this.toNormalizedString().replace(/((^|:)(0(:|$))+)/, '::'); - }; - - IPv6.prototype.toRFC5952String = function() { - var bestMatchIndex, bestMatchLength, match, regex, string; - regex = /((^|:)(0(:|$)){2,})/g; - string = this.toNormalizedString(); - bestMatchIndex = 0; - bestMatchLength = -1; - while ((match = regex.exec(string))) { - if (match[0].length > bestMatchLength) { - bestMatchIndex = match.index; - bestMatchLength = match[0].length; - } - } - if (bestMatchLength < 0) { - return string; - } - return string.substring(0, bestMatchIndex) + '::' + string.substring(bestMatchIndex + bestMatchLength); - }; - - IPv6.prototype.toByteArray = function() { - var bytes, k, len, part, ref; - bytes = []; - ref = this.parts; - for (k = 0, len = ref.length; k < len; k++) { - part = ref[k]; - bytes.push(part >> 8); - bytes.push(part & 0xff); - } - return bytes; - }; - - IPv6.prototype.toNormalizedString = function() { - var addr, part, suffix; - addr = ((function() { - var k, len, ref, results; - ref = this.parts; - results = []; - for (k = 0, len = ref.length; k < len; k++) { - part = ref[k]; - results.push(part.toString(16)); - } - return results; - }).call(this)).join(":"); - suffix = ''; - if (this.zoneId) { - suffix = '%' + this.zoneId; - } - return addr + suffix; - }; - - IPv6.prototype.toFixedLengthString = function() { - var addr, part, suffix; - addr = ((function() { - var k, len, ref, results; - ref = this.parts; - results = []; - for (k = 0, len = ref.length; k < len; k++) { - part = ref[k]; - results.push(part.toString(16).padStart(4, '0')); - } - return results; - }).call(this)).join(":"); - suffix = ''; - if (this.zoneId) { - suffix = '%' + this.zoneId; - } - return addr + suffix; - }; - - IPv6.prototype.match = function(other, cidrRange) { - var ref; - if (cidrRange === void 0) { - ref = other, other = ref[0], cidrRange = ref[1]; - } - if (other.kind() !== 'ipv6') { - throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one"); - } - return matchCIDR(this.parts, other.parts, 16, cidrRange); - }; - - IPv6.prototype.SpecialRanges = { - unspecified: [new IPv6([0, 0, 0, 0, 0, 0, 0, 0]), 128], - linkLocal: [new IPv6([0xfe80, 0, 0, 0, 0, 0, 0, 0]), 10], - multicast: [new IPv6([0xff00, 0, 0, 0, 0, 0, 0, 0]), 8], - loopback: [new IPv6([0, 0, 0, 0, 0, 0, 0, 1]), 128], - uniqueLocal: [new IPv6([0xfc00, 0, 0, 0, 0, 0, 0, 0]), 7], - ipv4Mapped: [new IPv6([0, 0, 0, 0, 0, 0xffff, 0, 0]), 96], - rfc6145: [new IPv6([0, 0, 0, 0, 0xffff, 0, 0, 0]), 96], - rfc6052: [new IPv6([0x64, 0xff9b, 0, 0, 0, 0, 0, 0]), 96], - '6to4': [new IPv6([0x2002, 0, 0, 0, 0, 0, 0, 0]), 16], - teredo: [new IPv6([0x2001, 0, 0, 0, 0, 0, 0, 0]), 32], - reserved: [[new IPv6([0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]), 32]] - }; - - IPv6.prototype.range = function() { - return ipaddr.subnetMatch(this, this.SpecialRanges); - }; - - IPv6.prototype.isIPv4MappedAddress = function() { - return this.range() === 'ipv4Mapped'; - }; - - IPv6.prototype.toIPv4Address = function() { - var high, low, ref; - if (!this.isIPv4MappedAddress()) { - throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4"); - } - ref = this.parts.slice(-2), high = ref[0], low = ref[1]; - return new ipaddr.IPv4([high >> 8, high & 0xff, low >> 8, low & 0xff]); - }; - - IPv6.prototype.prefixLengthFromSubnetMask = function() { - var cidr, i, k, part, stop, zeros, zerotable; - zerotable = { - 0: 16, - 32768: 15, - 49152: 14, - 57344: 13, - 61440: 12, - 63488: 11, - 64512: 10, - 65024: 9, - 65280: 8, - 65408: 7, - 65472: 6, - 65504: 5, - 65520: 4, - 65528: 3, - 65532: 2, - 65534: 1, - 65535: 0 - }; - cidr = 0; - stop = false; - for (i = k = 7; k >= 0; i = k += -1) { - part = this.parts[i]; - if (part in zerotable) { - zeros = zerotable[part]; - if (stop && zeros !== 0) { - return null; - } - if (zeros !== 16) { - stop = true; - } - cidr += zeros; - } else { - return null; - } - } - return 128 - cidr; - }; - - return IPv6; - - })(); - - ipv6Part = "(?:[0-9a-f]+::?)+"; - - zoneIndex = "%[0-9a-z]{1,}"; - - ipv6Regexes = { - zoneIndex: new RegExp(zoneIndex, 'i'), - "native": new RegExp("^(::)?(" + ipv6Part + ")?([0-9a-f]+)?(::)?(" + zoneIndex + ")?$", 'i'), - transitional: new RegExp(("^((?:" + ipv6Part + ")|(?:::)(?:" + ipv6Part + ")?)") + (ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part) + ("(" + zoneIndex + ")?$"), 'i') - }; - - expandIPv6 = function(string, parts) { - var colonCount, lastColon, part, replacement, replacementCount, zoneId; - if (string.indexOf('::') !== string.lastIndexOf('::')) { - return null; - } - zoneId = (string.match(ipv6Regexes['zoneIndex']) || [])[0]; - if (zoneId) { - zoneId = zoneId.substring(1); - string = string.replace(/%.+$/, ''); - } - colonCount = 0; - lastColon = -1; - while ((lastColon = string.indexOf(':', lastColon + 1)) >= 0) { - colonCount++; - } - if (string.substr(0, 2) === '::') { - colonCount--; - } - if (string.substr(-2, 2) === '::') { - colonCount--; - } - if (colonCount > parts) { - return null; - } - replacementCount = parts - colonCount; - replacement = ':'; - while (replacementCount--) { - replacement += '0:'; - } - string = string.replace('::', replacement); - if (string[0] === ':') { - string = string.slice(1); - } - if (string[string.length - 1] === ':') { - string = string.slice(0, -1); - } - parts = (function() { - var k, len, ref, results; - ref = string.split(":"); - results = []; - for (k = 0, len = ref.length; k < len; k++) { - part = ref[k]; - results.push(parseInt(part, 16)); - } - return results; - })(); - return { - parts: parts, - zoneId: zoneId - }; - }; - - ipaddr.IPv6.parser = function(string) { - var addr, k, len, match, octet, octets, zoneId; - if (ipv6Regexes['native'].test(string)) { - return expandIPv6(string, 8); - } else if (match = string.match(ipv6Regexes['transitional'])) { - zoneId = match[6] || ''; - addr = expandIPv6(match[1].slice(0, -1) + zoneId, 6); - if (addr.parts) { - octets = [parseInt(match[2]), parseInt(match[3]), parseInt(match[4]), parseInt(match[5])]; - for (k = 0, len = octets.length; k < len; k++) { - octet = octets[k]; - if (!((0 <= octet && octet <= 255))) { - return null; - } - } - addr.parts.push(octets[0] << 8 | octets[1]); - addr.parts.push(octets[2] << 8 | octets[3]); - return { - parts: addr.parts, - zoneId: addr.zoneId - }; - } - } - return null; - }; - - ipaddr.IPv4.isIPv4 = ipaddr.IPv6.isIPv6 = function(string) { - return this.parser(string) !== null; - }; - - ipaddr.IPv4.isValid = function(string) { - var e; - try { - new this(this.parser(string)); - return true; - } catch (error1) { - e = error1; - return false; - } - }; - - ipaddr.IPv4.isValidFourPartDecimal = function(string) { - if (ipaddr.IPv4.isValid(string) && string.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/)) { - return true; - } else { - return false; - } - }; - - ipaddr.IPv6.isValid = function(string) { - var addr, e; - if (typeof string === "string" && string.indexOf(":") === -1) { - return false; - } - try { - addr = this.parser(string); - new this(addr.parts, addr.zoneId); - return true; - } catch (error1) { - e = error1; - return false; - } - }; - - ipaddr.IPv4.parse = function(string) { - var parts; - parts = this.parser(string); - if (parts === null) { - throw new Error("ipaddr: string is not formatted like ip address"); - } - return new this(parts); - }; - - ipaddr.IPv6.parse = function(string) { - var addr; - addr = this.parser(string); - if (addr.parts === null) { - throw new Error("ipaddr: string is not formatted like ip address"); - } - return new this(addr.parts, addr.zoneId); - }; - - ipaddr.IPv4.parseCIDR = function(string) { - var maskLength, match, parsed; - if (match = string.match(/^(.+)\/(\d+)$/)) { - maskLength = parseInt(match[2]); - if (maskLength >= 0 && maskLength <= 32) { - parsed = [this.parse(match[1]), maskLength]; - Object.defineProperty(parsed, 'toString', { - value: function() { - return this.join('/'); - } - }); - return parsed; - } - } - throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range"); - }; - - ipaddr.IPv4.subnetMaskFromPrefixLength = function(prefix) { - var filledOctetCount, j, octets; - prefix = parseInt(prefix); - if (prefix < 0 || prefix > 32) { - throw new Error('ipaddr: invalid IPv4 prefix length'); - } - octets = [0, 0, 0, 0]; - j = 0; - filledOctetCount = Math.floor(prefix / 8); - while (j < filledOctetCount) { - octets[j] = 255; - j++; - } - if (filledOctetCount < 4) { - octets[filledOctetCount] = Math.pow(2, prefix % 8) - 1 << 8 - (prefix % 8); - } - return new this(octets); - }; - - ipaddr.IPv4.broadcastAddressFromCIDR = function(string) { - var cidr, error, i, ipInterfaceOctets, octets, subnetMaskOctets; - try { - cidr = this.parseCIDR(string); - ipInterfaceOctets = cidr[0].toByteArray(); - subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray(); - octets = []; - i = 0; - while (i < 4) { - octets.push(parseInt(ipInterfaceOctets[i], 10) | parseInt(subnetMaskOctets[i], 10) ^ 255); - i++; - } - return new this(octets); - } catch (error1) { - error = error1; - throw new Error('ipaddr: the address does not have IPv4 CIDR format'); - } - }; - - ipaddr.IPv4.networkAddressFromCIDR = function(string) { - var cidr, error, i, ipInterfaceOctets, octets, subnetMaskOctets; - try { - cidr = this.parseCIDR(string); - ipInterfaceOctets = cidr[0].toByteArray(); - subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray(); - octets = []; - i = 0; - while (i < 4) { - octets.push(parseInt(ipInterfaceOctets[i], 10) & parseInt(subnetMaskOctets[i], 10)); - i++; - } - return new this(octets); - } catch (error1) { - error = error1; - throw new Error('ipaddr: the address does not have IPv4 CIDR format'); - } - }; - - ipaddr.IPv6.parseCIDR = function(string) { - var maskLength, match, parsed; - if (match = string.match(/^(.+)\/(\d+)$/)) { - maskLength = parseInt(match[2]); - if (maskLength >= 0 && maskLength <= 128) { - parsed = [this.parse(match[1]), maskLength]; - Object.defineProperty(parsed, 'toString', { - value: function() { - return this.join('/'); - } - }); - return parsed; - } - } - throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range"); - }; - - ipaddr.isValid = function(string) { - return ipaddr.IPv6.isValid(string) || ipaddr.IPv4.isValid(string); - }; - - ipaddr.parse = function(string) { - if (ipaddr.IPv6.isValid(string)) { - return ipaddr.IPv6.parse(string); - } else if (ipaddr.IPv4.isValid(string)) { - return ipaddr.IPv4.parse(string); - } else { - throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format"); - } - }; - - ipaddr.parseCIDR = function(string) { - var e; - try { - return ipaddr.IPv6.parseCIDR(string); - } catch (error1) { - e = error1; - try { - return ipaddr.IPv4.parseCIDR(string); - } catch (error1) { - e = error1; - throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format"); - } - } - }; - - ipaddr.fromByteArray = function(bytes) { - var length; - length = bytes.length; - if (length === 4) { - return new ipaddr.IPv4(bytes); - } else if (length === 16) { - return new ipaddr.IPv6(bytes); - } else { - throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address"); - } - }; - - ipaddr.process = function(string) { - var addr; - addr = this.parse(string); - if (addr.kind() === 'ipv6' && addr.isIPv4MappedAddress()) { - return addr.toIPv4Address(); - } else { - return addr; - } - }; - -}).call(this); diff --git a/node_modules/ipaddr.js/lib/ipaddr.js.d.ts b/node_modules/ipaddr.js/lib/ipaddr.js.d.ts deleted file mode 100644 index 52174b6..0000000 --- a/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -declare module "ipaddr.js" { - type IPv4Range = 'unicast' | 'unspecified' | 'broadcast' | 'multicast' | 'linkLocal' | 'loopback' | 'carrierGradeNat' | 'private' | 'reserved'; - type IPv6Range = 'unicast' | 'unspecified' | 'linkLocal' | 'multicast' | 'loopback' | 'uniqueLocal' | 'ipv4Mapped' | 'rfc6145' | 'rfc6052' | '6to4' | 'teredo' | 'reserved'; - - interface RangeList { - [name: string]: [T, number] | [T, number][]; - } - - // Common methods/properties for IPv4 and IPv6 classes. - class IP { - prefixLengthFromSubnetMask(): number | null; - toByteArray(): number[]; - toNormalizedString(): string; - toString(): string; - } - - namespace Address { - export function isValid(addr: string): boolean; - export function fromByteArray(bytes: number[]): IPv4 | IPv6; - export function parse(addr: string): IPv4 | IPv6; - export function parseCIDR(mask: string): [IPv4 | IPv6, number]; - export function process(addr: string): IPv4 | IPv6; - export function subnetMatch(addr: IPv4, rangeList: RangeList, defaultName?: string): string; - export function subnetMatch(addr: IPv6, rangeList: RangeList, defaultName?: string): string; - - export class IPv4 extends IP { - static broadcastAddressFromCIDR(addr: string): IPv4; - static isIPv4(addr: string): boolean; - static isValidFourPartDecimal(addr: string): boolean; - static isValid(addr: string): boolean; - static networkAddressFromCIDR(addr: string): IPv4; - static parse(addr: string): IPv4; - static parseCIDR(addr: string): [IPv4, number]; - static subnetMaskFromPrefixLength(prefix: number): IPv4; - constructor(octets: number[]); - octets: number[] - - kind(): 'ipv4'; - match(addr: IPv4, bits: number): boolean; - match(mask: [IPv4, number]): boolean; - range(): IPv4Range; - subnetMatch(rangeList: RangeList, defaultName?: string): string; - toIPv4MappedAddress(): IPv6; - } - - export class IPv6 extends IP { - static broadcastAddressFromCIDR(addr: string): IPv6; - static isIPv6(addr: string): boolean; - static isValid(addr: string): boolean; - static parse(addr: string): IPv6; - static parseCIDR(addr: string): [IPv6, number]; - static subnetMaskFromPrefixLength(prefix: number): IPv6; - constructor(parts: number[]); - parts: number[] - zoneId?: string - - isIPv4MappedAddress(): boolean; - kind(): 'ipv6'; - match(addr: IPv6, bits: number): boolean; - match(mask: [IPv6, number]): boolean; - range(): IPv6Range; - subnetMatch(rangeList: RangeList, defaultName?: string): string; - toIPv4Address(): IPv4; - } - } - - export = Address; -} diff --git a/node_modules/ipaddr.js/package.json b/node_modules/ipaddr.js/package.json deleted file mode 100644 index f4d3547..0000000 --- a/node_modules/ipaddr.js/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "ipaddr.js", - "description": "A library for manipulating IPv4 and IPv6 addresses in JavaScript.", - "version": "1.9.1", - "author": "whitequark ", - "directories": { - "lib": "./lib" - }, - "dependencies": {}, - "devDependencies": { - "coffee-script": "~1.12.6", - "nodeunit": "^0.11.3", - "uglify-js": "~3.0.19" - }, - "scripts": { - "test": "cake build test" - }, - "files": [ - "lib/", - "LICENSE", - "ipaddr.min.js" - ], - "keywords": [ - "ip", - "ipv4", - "ipv6" - ], - "repository": "git://github.com/whitequark/ipaddr.js", - "main": "./lib/ipaddr.js", - "engines": { - "node": ">= 0.10" - }, - "license": "MIT", - "types": "./lib/ipaddr.js.d.ts" -} diff --git a/node_modules/is-binary-path/index.d.ts b/node_modules/is-binary-path/index.d.ts deleted file mode 100644 index 19dcd43..0000000 --- a/node_modules/is-binary-path/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** -Check if a file path is a binary file. - -@example -``` -import isBinaryPath = require('is-binary-path'); - -isBinaryPath('source/unicorn.png'); -//=> true - -isBinaryPath('source/unicorn.txt'); -//=> false -``` -*/ -declare function isBinaryPath(filePath: string): boolean; - -export = isBinaryPath; diff --git a/node_modules/is-binary-path/index.js b/node_modules/is-binary-path/index.js deleted file mode 100644 index ef7548c..0000000 --- a/node_modules/is-binary-path/index.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; -const path = require('path'); -const binaryExtensions = require('binary-extensions'); - -const extensions = new Set(binaryExtensions); - -module.exports = filePath => extensions.has(path.extname(filePath).slice(1).toLowerCase()); diff --git a/node_modules/is-binary-path/license b/node_modules/is-binary-path/license deleted file mode 100644 index 401b1c7..0000000 --- a/node_modules/is-binary-path/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) 2019 Sindre Sorhus (https://sindresorhus.com), Paul Miller (https://paulmillr.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/is-binary-path/package.json b/node_modules/is-binary-path/package.json deleted file mode 100644 index a8d005a..0000000 --- a/node_modules/is-binary-path/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "is-binary-path", - "version": "2.1.0", - "description": "Check if a file path is a binary file", - "license": "MIT", - "repository": "sindresorhus/is-binary-path", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "binary", - "extensions", - "extension", - "file", - "path", - "check", - "detect", - "is" - ], - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} diff --git a/node_modules/is-binary-path/readme.md b/node_modules/is-binary-path/readme.md deleted file mode 100644 index b4ab025..0000000 --- a/node_modules/is-binary-path/readme.md +++ /dev/null @@ -1,34 +0,0 @@ -# is-binary-path [![Build Status](https://travis-ci.org/sindresorhus/is-binary-path.svg?branch=master)](https://travis-ci.org/sindresorhus/is-binary-path) - -> Check if a file path is a binary file - - -## Install - -``` -$ npm install is-binary-path -``` - - -## Usage - -```js -const isBinaryPath = require('is-binary-path'); - -isBinaryPath('source/unicorn.png'); -//=> true - -isBinaryPath('source/unicorn.txt'); -//=> false -``` - - -## Related - -- [binary-extensions](https://github.com/sindresorhus/binary-extensions) - List of binary file extensions -- [is-text-path](https://github.com/sindresorhus/is-text-path) - Check if a filepath is a text file - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com), [Paul Miller](https://paulmillr.com) diff --git a/node_modules/is-extglob/LICENSE b/node_modules/is-extglob/LICENSE deleted file mode 100644 index 842218c..0000000 --- a/node_modules/is-extglob/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2016, Jon Schlinkert - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/is-extglob/README.md b/node_modules/is-extglob/README.md deleted file mode 100644 index 0416af5..0000000 --- a/node_modules/is-extglob/README.md +++ /dev/null @@ -1,107 +0,0 @@ -# is-extglob [![NPM version](https://img.shields.io/npm/v/is-extglob.svg?style=flat)](https://www.npmjs.com/package/is-extglob) [![NPM downloads](https://img.shields.io/npm/dm/is-extglob.svg?style=flat)](https://npmjs.org/package/is-extglob) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-extglob.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-extglob) - -> Returns true if a string has an extglob. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save is-extglob -``` - -## Usage - -```js -var isExtglob = require('is-extglob'); -``` - -**True** - -```js -isExtglob('?(abc)'); -isExtglob('@(abc)'); -isExtglob('!(abc)'); -isExtglob('*(abc)'); -isExtglob('+(abc)'); -``` - -**False** - -Escaped extglobs: - -```js -isExtglob('\\?(abc)'); -isExtglob('\\@(abc)'); -isExtglob('\\!(abc)'); -isExtglob('\\*(abc)'); -isExtglob('\\+(abc)'); -``` - -Everything else... - -```js -isExtglob('foo.js'); -isExtglob('!foo.js'); -isExtglob('*.js'); -isExtglob('**/abc.js'); -isExtglob('abc/*.js'); -isExtglob('abc/(aaa|bbb).js'); -isExtglob('abc/[a-z].js'); -isExtglob('abc/{a,b}.js'); -isExtglob('abc/?.js'); -isExtglob('abc.js'); -isExtglob('abc/def/ghi.js'); -``` - -## History - -**v2.0** - -Adds support for escaping. Escaped exglobs no longer return true. - -## About - -### Related projects - -* [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob "Returns `true` if an array has a glob pattern.") -* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") -* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") - -### Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Building docs - -_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ - -To generate the readme and API documentation with [verb](https://github.com/verbose/verb): - -```sh -$ npm install -g verb verb-generate-readme && verb -``` - -### Running tests - -Install dev dependencies: - -```sh -$ npm install -d && npm test -``` - -### Author - -**Jon Schlinkert** - -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) - -### License - -Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT license](https://github.com/jonschlinkert/is-extglob/blob/master/LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 12, 2016._ \ No newline at end of file diff --git a/node_modules/is-extglob/index.js b/node_modules/is-extglob/index.js deleted file mode 100644 index c1d986f..0000000 --- a/node_modules/is-extglob/index.js +++ /dev/null @@ -1,20 +0,0 @@ -/*! - * is-extglob - * - * Copyright (c) 2014-2016, Jon Schlinkert. - * Licensed under the MIT License. - */ - -module.exports = function isExtglob(str) { - if (typeof str !== 'string' || str === '') { - return false; - } - - var match; - while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) { - if (match[2]) return true; - str = str.slice(match.index + match[0].length); - } - - return false; -}; diff --git a/node_modules/is-extglob/package.json b/node_modules/is-extglob/package.json deleted file mode 100644 index 7a90836..0000000 --- a/node_modules/is-extglob/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "is-extglob", - "description": "Returns true if a string has an extglob.", - "version": "2.1.1", - "homepage": "https://github.com/jonschlinkert/is-extglob", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "repository": "jonschlinkert/is-extglob", - "bugs": { - "url": "https://github.com/jonschlinkert/is-extglob/issues" - }, - "license": "MIT", - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "gulp-format-md": "^0.1.10", - "mocha": "^3.0.2" - }, - "keywords": [ - "bash", - "braces", - "check", - "exec", - "expression", - "extglob", - "glob", - "globbing", - "globstar", - "is", - "match", - "matches", - "pattern", - "regex", - "regular", - "string", - "test" - ], - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "has-glob", - "is-glob", - "micromatch" - ] - }, - "reflinks": [ - "verb", - "verb-generate-readme" - ], - "lint": { - "reflinks": true - } - } -} diff --git a/node_modules/is-glob/LICENSE b/node_modules/is-glob/LICENSE deleted file mode 100644 index 3f2eca1..0000000 --- a/node_modules/is-glob/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2017, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/is-glob/README.md b/node_modules/is-glob/README.md deleted file mode 100644 index 740724b..0000000 --- a/node_modules/is-glob/README.md +++ /dev/null @@ -1,206 +0,0 @@ -# is-glob [![NPM version](https://img.shields.io/npm/v/is-glob.svg?style=flat)](https://www.npmjs.com/package/is-glob) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![NPM total downloads](https://img.shields.io/npm/dt/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![Build Status](https://img.shields.io/github/workflow/status/micromatch/is-glob/dev)](https://github.com/micromatch/is-glob/actions) - -> Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience. - -Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save is-glob -``` - -You might also be interested in [is-valid-glob](https://github.com/jonschlinkert/is-valid-glob) and [has-glob](https://github.com/jonschlinkert/has-glob). - -## Usage - -```js -var isGlob = require('is-glob'); -``` - -### Default behavior - -**True** - -Patterns that have glob characters or regex patterns will return `true`: - -```js -isGlob('!foo.js'); -isGlob('*.js'); -isGlob('**/abc.js'); -isGlob('abc/*.js'); -isGlob('abc/(aaa|bbb).js'); -isGlob('abc/[a-z].js'); -isGlob('abc/{a,b}.js'); -//=> true -``` - -Extglobs - -```js -isGlob('abc/@(a).js'); -isGlob('abc/!(a).js'); -isGlob('abc/+(a).js'); -isGlob('abc/*(a).js'); -isGlob('abc/?(a).js'); -//=> true -``` - -**False** - -Escaped globs or extglobs return `false`: - -```js -isGlob('abc/\\@(a).js'); -isGlob('abc/\\!(a).js'); -isGlob('abc/\\+(a).js'); -isGlob('abc/\\*(a).js'); -isGlob('abc/\\?(a).js'); -isGlob('\\!foo.js'); -isGlob('\\*.js'); -isGlob('\\*\\*/abc.js'); -isGlob('abc/\\*.js'); -isGlob('abc/\\(aaa|bbb).js'); -isGlob('abc/\\[a-z].js'); -isGlob('abc/\\{a,b}.js'); -//=> false -``` - -Patterns that do not have glob patterns return `false`: - -```js -isGlob('abc.js'); -isGlob('abc/def/ghi.js'); -isGlob('foo.js'); -isGlob('abc/@.js'); -isGlob('abc/+.js'); -isGlob('abc/?.js'); -isGlob(); -isGlob(null); -//=> false -``` - -Arrays are also `false` (If you want to check if an array has a glob pattern, use [has-glob](https://github.com/jonschlinkert/has-glob)): - -```js -isGlob(['**/*.js']); -isGlob(['foo.js']); -//=> false -``` - -### Option strict - -When `options.strict === false` the behavior is less strict in determining if a pattern is a glob. Meaning that -some patterns that would return `false` may return `true`. This is done so that matching libraries like [micromatch](https://github.com/micromatch/micromatch) have a chance at determining if the pattern is a glob or not. - -**True** - -Patterns that have glob characters or regex patterns will return `true`: - -```js -isGlob('!foo.js', {strict: false}); -isGlob('*.js', {strict: false}); -isGlob('**/abc.js', {strict: false}); -isGlob('abc/*.js', {strict: false}); -isGlob('abc/(aaa|bbb).js', {strict: false}); -isGlob('abc/[a-z].js', {strict: false}); -isGlob('abc/{a,b}.js', {strict: false}); -//=> true -``` - -Extglobs - -```js -isGlob('abc/@(a).js', {strict: false}); -isGlob('abc/!(a).js', {strict: false}); -isGlob('abc/+(a).js', {strict: false}); -isGlob('abc/*(a).js', {strict: false}); -isGlob('abc/?(a).js', {strict: false}); -//=> true -``` - -**False** - -Escaped globs or extglobs return `false`: - -```js -isGlob('\\!foo.js', {strict: false}); -isGlob('\\*.js', {strict: false}); -isGlob('\\*\\*/abc.js', {strict: false}); -isGlob('abc/\\*.js', {strict: false}); -isGlob('abc/\\(aaa|bbb).js', {strict: false}); -isGlob('abc/\\[a-z].js', {strict: false}); -isGlob('abc/\\{a,b}.js', {strict: false}); -//=> false -``` - -## About - -
-Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -
- -
-Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -
- -
-Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
- -### Related projects - -You might also be interested in these projects: - -* [assemble](https://www.npmjs.com/package/assemble): Get the rocks out of your socks! Assemble makes you fast at creating web projects… [more](https://github.com/assemble/assemble) | [homepage](https://github.com/assemble/assemble "Get the rocks out of your socks! Assemble makes you fast at creating web projects. Assemble is used by thousands of projects for rapid prototyping, creating themes, scaffolds, boilerplates, e-books, UI components, API documentation, blogs, building websit") -* [base](https://www.npmjs.com/package/base): Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks | [homepage](https://github.com/node-base/base "Framework for rapidly creating high quality, server-side node.js applications, using plugins like building blocks") -* [update](https://www.npmjs.com/package/update): Be scalable! Update is a new, open source developer framework and CLI for automating updates… [more](https://github.com/update/update) | [homepage](https://github.com/update/update "Be scalable! Update is a new, open source developer framework and CLI for automating updates of any kind in code projects.") -* [verb](https://www.npmjs.com/package/verb): Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… [more](https://github.com/verbose/verb) | [homepage](https://github.com/verbose/verb "Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used on hundreds of projects of all sizes to generate everything from API docs to readmes.") - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 47 | [jonschlinkert](https://github.com/jonschlinkert) | -| 5 | [doowb](https://github.com/doowb) | -| 1 | [phated](https://github.com/phated) | -| 1 | [danhper](https://github.com/danhper) | -| 1 | [paulmillr](https://github.com/paulmillr) | - -### Author - -**Jon Schlinkert** - -* [GitHub Profile](https://github.com/jonschlinkert) -* [Twitter Profile](https://twitter.com/jonschlinkert) -* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) - -### License - -Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on March 27, 2019._ \ No newline at end of file diff --git a/node_modules/is-glob/index.js b/node_modules/is-glob/index.js deleted file mode 100644 index 620f563..0000000 --- a/node_modules/is-glob/index.js +++ /dev/null @@ -1,150 +0,0 @@ -/*! - * is-glob - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -var isExtglob = require('is-extglob'); -var chars = { '{': '}', '(': ')', '[': ']'}; -var strictCheck = function(str) { - if (str[0] === '!') { - return true; - } - var index = 0; - var pipeIndex = -2; - var closeSquareIndex = -2; - var closeCurlyIndex = -2; - var closeParenIndex = -2; - var backSlashIndex = -2; - while (index < str.length) { - if (str[index] === '*') { - return true; - } - - if (str[index + 1] === '?' && /[\].+)]/.test(str[index])) { - return true; - } - - if (closeSquareIndex !== -1 && str[index] === '[' && str[index + 1] !== ']') { - if (closeSquareIndex < index) { - closeSquareIndex = str.indexOf(']', index); - } - if (closeSquareIndex > index) { - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - backSlashIndex = str.indexOf('\\', index); - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - } - } - - if (closeCurlyIndex !== -1 && str[index] === '{' && str[index + 1] !== '}') { - closeCurlyIndex = str.indexOf('}', index); - if (closeCurlyIndex > index) { - backSlashIndex = str.indexOf('\\', index); - if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { - return true; - } - } - } - - if (closeParenIndex !== -1 && str[index] === '(' && str[index + 1] === '?' && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ')') { - closeParenIndex = str.indexOf(')', index); - if (closeParenIndex > index) { - backSlashIndex = str.indexOf('\\', index); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - - if (pipeIndex !== -1 && str[index] === '(' && str[index + 1] !== '|') { - if (pipeIndex < index) { - pipeIndex = str.indexOf('|', index); - } - if (pipeIndex !== -1 && str[pipeIndex + 1] !== ')') { - closeParenIndex = str.indexOf(')', pipeIndex); - if (closeParenIndex > pipeIndex) { - backSlashIndex = str.indexOf('\\', pipeIndex); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - } - - if (str[index] === '\\') { - var open = str[index + 1]; - index += 2; - var close = chars[open]; - - if (close) { - var n = str.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - - if (str[index] === '!') { - return true; - } - } else { - index++; - } - } - return false; -}; - -var relaxedCheck = function(str) { - if (str[0] === '!') { - return true; - } - var index = 0; - while (index < str.length) { - if (/[*?{}()[\]]/.test(str[index])) { - return true; - } - - if (str[index] === '\\') { - var open = str[index + 1]; - index += 2; - var close = chars[open]; - - if (close) { - var n = str.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - - if (str[index] === '!') { - return true; - } - } else { - index++; - } - } - return false; -}; - -module.exports = function isGlob(str, options) { - if (typeof str !== 'string' || str === '') { - return false; - } - - if (isExtglob(str)) { - return true; - } - - var check = strictCheck; - - // optionally relax check - if (options && options.strict === false) { - check = relaxedCheck; - } - - return check(str); -}; diff --git a/node_modules/is-glob/package.json b/node_modules/is-glob/package.json deleted file mode 100644 index 858af03..0000000 --- a/node_modules/is-glob/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "is-glob", - "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.", - "version": "4.0.3", - "homepage": "https://github.com/micromatch/is-glob", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "Brian Woodward (https://twitter.com/doowb)", - "Daniel Perez (https://tuvistavie.com)", - "Jon Schlinkert (http://twitter.com/jonschlinkert)" - ], - "repository": "micromatch/is-glob", - "bugs": { - "url": "https://github.com/micromatch/is-glob/issues" - }, - "license": "MIT", - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha && node benchmark.js" - }, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "devDependencies": { - "gulp-format-md": "^0.1.10", - "mocha": "^3.0.2" - }, - "keywords": [ - "bash", - "braces", - "check", - "exec", - "expression", - "extglob", - "glob", - "globbing", - "globstar", - "is", - "match", - "matches", - "pattern", - "regex", - "regular", - "string", - "test" - ], - "verb": { - "layout": "default", - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "assemble", - "base", - "update", - "verb" - ] - }, - "reflinks": [ - "assemble", - "bach", - "base", - "composer", - "gulp", - "has-glob", - "is-valid-glob", - "micromatch", - "npm", - "scaffold", - "verb", - "vinyl" - ] - } -} diff --git a/node_modules/is-number/LICENSE b/node_modules/is-number/LICENSE deleted file mode 100644 index 9af4a67..0000000 --- a/node_modules/is-number/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-present, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/is-number/README.md b/node_modules/is-number/README.md deleted file mode 100644 index eb8149e..0000000 --- a/node_modules/is-number/README.md +++ /dev/null @@ -1,187 +0,0 @@ -# is-number [![NPM version](https://img.shields.io/npm/v/is-number.svg?style=flat)](https://www.npmjs.com/package/is-number) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![NPM total downloads](https://img.shields.io/npm/dt/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-number.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-number) - -> Returns true if the value is a finite number. - -Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save is-number -``` - -## Why is this needed? - -In JavaScript, it's not always as straightforward as it should be to reliably check if a value is a number. It's common for devs to use `+`, `-`, or `Number()` to cast a string value to a number (for example, when values are returned from user input, regex matches, parsers, etc). But there are many non-intuitive edge cases that yield unexpected results: - -```js -console.log(+[]); //=> 0 -console.log(+''); //=> 0 -console.log(+' '); //=> 0 -console.log(typeof NaN); //=> 'number' -``` - -This library offers a performant way to smooth out edge cases like these. - -## Usage - -```js -const isNumber = require('is-number'); -``` - -See the [tests](./test.js) for more examples. - -### true - -```js -isNumber(5e3); // true -isNumber(0xff); // true -isNumber(-1.1); // true -isNumber(0); // true -isNumber(1); // true -isNumber(1.1); // true -isNumber(10); // true -isNumber(10.10); // true -isNumber(100); // true -isNumber('-1.1'); // true -isNumber('0'); // true -isNumber('012'); // true -isNumber('0xff'); // true -isNumber('1'); // true -isNumber('1.1'); // true -isNumber('10'); // true -isNumber('10.10'); // true -isNumber('100'); // true -isNumber('5e3'); // true -isNumber(parseInt('012')); // true -isNumber(parseFloat('012')); // true -``` - -### False - -Everything else is false, as you would expect: - -```js -isNumber(Infinity); // false -isNumber(NaN); // false -isNumber(null); // false -isNumber(undefined); // false -isNumber(''); // false -isNumber(' '); // false -isNumber('foo'); // false -isNumber([1]); // false -isNumber([]); // false -isNumber(function () {}); // false -isNumber({}); // false -``` - -## Release history - -### 7.0.0 - -* Refactor. Now uses `.isFinite` if it exists. -* Performance is about the same as v6.0 when the value is a string or number. But it's now 3x-4x faster when the value is not a string or number. - -### 6.0.0 - -* Optimizations, thanks to @benaadams. - -### 5.0.0 - -**Breaking changes** - -* removed support for `instanceof Number` and `instanceof String` - -## Benchmarks - -As with all benchmarks, take these with a grain of salt. See the [benchmarks](./benchmark/index.js) for more detail. - -``` -# all -v7.0 x 413,222 ops/sec ±2.02% (86 runs sampled) -v6.0 x 111,061 ops/sec ±1.29% (85 runs sampled) -parseFloat x 317,596 ops/sec ±1.36% (86 runs sampled) -fastest is 'v7.0' - -# string -v7.0 x 3,054,496 ops/sec ±1.05% (89 runs sampled) -v6.0 x 2,957,781 ops/sec ±0.98% (88 runs sampled) -parseFloat x 3,071,060 ops/sec ±1.13% (88 runs sampled) -fastest is 'parseFloat,v7.0' - -# number -v7.0 x 3,146,895 ops/sec ±0.89% (89 runs sampled) -v6.0 x 3,214,038 ops/sec ±1.07% (89 runs sampled) -parseFloat x 3,077,588 ops/sec ±1.07% (87 runs sampled) -fastest is 'v6.0' -``` - -## About - -
-Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -
- -
-Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -
- -
-Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
- -### Related projects - -You might also be interested in these projects: - -* [is-plain-object](https://www.npmjs.com/package/is-plain-object): Returns true if an object was created by the `Object` constructor. | [homepage](https://github.com/jonschlinkert/is-plain-object "Returns true if an object was created by the `Object` constructor.") -* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") -* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") -* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 49 | [jonschlinkert](https://github.com/jonschlinkert) | -| 5 | [charlike-old](https://github.com/charlike-old) | -| 1 | [benaadams](https://github.com/benaadams) | -| 1 | [realityking](https://github.com/realityking) | - -### Author - -**Jon Schlinkert** - -* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) -* [GitHub Profile](https://github.com/jonschlinkert) -* [Twitter Profile](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 15, 2018._ \ No newline at end of file diff --git a/node_modules/is-number/index.js b/node_modules/is-number/index.js deleted file mode 100644 index 27f19b7..0000000 --- a/node_modules/is-number/index.js +++ /dev/null @@ -1,18 +0,0 @@ -/*! - * is-number - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Released under the MIT License. - */ - -'use strict'; - -module.exports = function(num) { - if (typeof num === 'number') { - return num - num === 0; - } - if (typeof num === 'string' && num.trim() !== '') { - return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); - } - return false; -}; diff --git a/node_modules/is-number/package.json b/node_modules/is-number/package.json deleted file mode 100644 index 3715072..0000000 --- a/node_modules/is-number/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "name": "is-number", - "description": "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.", - "version": "7.0.0", - "homepage": "https://github.com/jonschlinkert/is-number", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "Jon Schlinkert (http://twitter.com/jonschlinkert)", - "Olsten Larck (https://i.am.charlike.online)", - "Rouven Weßling (www.rouvenwessling.de)" - ], - "repository": "jonschlinkert/is-number", - "bugs": { - "url": "https://github.com/jonschlinkert/is-number/issues" - }, - "license": "MIT", - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=0.12.0" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "ansi": "^0.3.1", - "benchmark": "^2.1.4", - "gulp-format-md": "^1.0.0", - "mocha": "^3.5.3" - }, - "keywords": [ - "cast", - "check", - "coerce", - "coercion", - "finite", - "integer", - "is", - "isnan", - "is-nan", - "is-num", - "is-number", - "isnumber", - "isfinite", - "istype", - "kind", - "math", - "nan", - "num", - "number", - "numeric", - "parseFloat", - "parseInt", - "test", - "type", - "typeof", - "value" - ], - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "related": { - "list": [ - "is-plain-object", - "is-primitive", - "isobject", - "kind-of" - ] - }, - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - } - } -} diff --git a/node_modules/is-promise/LICENSE b/node_modules/is-promise/LICENSE deleted file mode 100644 index 27cc9f3..0000000 --- a/node_modules/is-promise/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014 Forbes Lindesay - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/is-promise/index.d.ts b/node_modules/is-promise/index.d.ts deleted file mode 100644 index 2107b42..0000000 --- a/node_modules/is-promise/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare function isPromise(obj: PromiseLike | S): obj is PromiseLike; -export default isPromise; diff --git a/node_modules/is-promise/index.js b/node_modules/is-promise/index.js deleted file mode 100644 index 1bed087..0000000 --- a/node_modules/is-promise/index.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = isPromise; -module.exports.default = isPromise; - -function isPromise(obj) { - return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; -} diff --git a/node_modules/is-promise/index.mjs b/node_modules/is-promise/index.mjs deleted file mode 100644 index bf9e99b..0000000 --- a/node_modules/is-promise/index.mjs +++ /dev/null @@ -1,3 +0,0 @@ -export default function isPromise(obj) { - return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; -} diff --git a/node_modules/is-promise/package.json b/node_modules/is-promise/package.json deleted file mode 100644 index 2a3c540..0000000 --- a/node_modules/is-promise/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "is-promise", - "version": "4.0.0", - "description": "Test whether an object looks like a promises-a+ promise", - "main": "./index.js", - "scripts": { - "test": "node test" - }, - "files": [ - "index.js", - "index.mjs", - "index.d.ts" - ], - "exports": { - ".": [ - { - "import": "./index.mjs", - "require": "./index.js", - "default": "./index.js" - }, - "./index.js" - ] - }, - "repository": { - "type": "git", - "url": "https://github.com/then/is-promise.git" - }, - "author": "ForbesLindesay", - "license": "MIT" -} diff --git a/node_modules/is-promise/readme.md b/node_modules/is-promise/readme.md deleted file mode 100644 index d53d34b..0000000 --- a/node_modules/is-promise/readme.md +++ /dev/null @@ -1,33 +0,0 @@ - - -# is-promise - - Test whether an object looks like a promises-a+ promise - - [![Build Status](https://img.shields.io/travis/then/is-promise/master.svg)](https://travis-ci.org/then/is-promise) - [![Dependency Status](https://img.shields.io/david/then/is-promise.svg)](https://david-dm.org/then/is-promise) - [![NPM version](https://img.shields.io/npm/v/is-promise.svg)](https://www.npmjs.org/package/is-promise) - - - -## Installation - - $ npm install is-promise - -You can also use it client side via npm. - -## API - -```typescript -import isPromise from 'is-promise'; - -isPromise(Promise.resolve());//=>true -isPromise({then:function () {...}});//=>true -isPromise(null);//=>false -isPromise({});//=>false -isPromise({then: true})//=>false -``` - -## License - - MIT diff --git a/node_modules/iterare/.prettierrc.json b/node_modules/iterare/.prettierrc.json deleted file mode 100644 index 1790b3b..0000000 --- a/node_modules/iterare/.prettierrc.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "tabWidth": 2, - "printWidth": 120, - "semi": false, - "trailingComma": "es5", - "singleQuote": true, - "overrides": [ - { - "files": "*.ts", - "options": { - "tabWidth": 4 - } - }, - { - "files": "{tsconfig.json,.vscode/**/*.json}", - "options": { - "parser": "json5", - "singleQuote": false, - "quoteProps": "preserve" - } - } - ] -} diff --git a/node_modules/iterare/LICENSE.txt b/node_modules/iterare/LICENSE.txt deleted file mode 100644 index fc35417..0000000 --- a/node_modules/iterare/LICENSE.txt +++ /dev/null @@ -1,15 +0,0 @@ -ISC License - -Copyright (c) 2016, Felix Frederick Becker - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/iterare/README.md b/node_modules/iterare/README.md deleted file mode 100644 index bc5a20b..0000000 --- a/node_modules/iterare/README.md +++ /dev/null @@ -1,132 +0,0 @@ -# iterare - -> lat. _to repeat, to iterate_ - -[![npm](https://img.shields.io/npm/v/iterare.svg)](https://www.npmjs.com/package/iterare) -[![downloads](https://img.shields.io/npm/dt/iterare.svg)](https://www.npmjs.com/package/iterare) -[![build](https://travis-ci.org/felixfbecker/iterare.svg?branch=master)](https://travis-ci.org/felixfbecker/iterare) -[![codecov](https://codecov.io/gh/felixfbecker/iterare/branch/master/graph/badge.svg)](https://codecov.io/gh/felixfbecker/iterare) -[![dependencies](https://david-dm.org/felixfbecker/iterare/status.svg)](https://david-dm.org/felixfbecker/iterare) -![node](http://img.shields.io/node/v/iterare.svg) -[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier) -[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) -[![license](https://img.shields.io/npm/l/iterare.svg)](https://github.com/felixfbecker/iterare/blob/master/LICENSE.txt) -[![chat: on gitter](https://badges.gitter.im/felixfbecker/iterare.svg)](https://gitter.im/felixfbecker/iterare?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) - -ES6 Iterator library for applying multiple transformations to a collection in a single iteration. - -## [API Documentation](http://iterare.surge.sh/) - -## Motivation - -Ever wanted to iterate over ES6 collections like `Map` or `Set` with `Array`-built-ins like `map()`, `filter()`, `reduce()`? -Lets say you have a large `Set` of URIs and want to get a `Set` back that contains file paths from all `file://` URIs. - -The loop solution is very clumsy and not very functional: - -```javascript -const uris = new Set(['file:///foo.txt', 'http:///npmjs.com', 'file:///bar/baz.txt']) -const paths = new Set() -for (const uri of uris) { - if (!uri.startsWith('file://')) { - continue - } - const path = uri.substr('file:///'.length) - paths.add(path) -} -``` - -Much more readable is converting the `Set` to an array, using its methods and then converting back: - -```javascript -new Set( - Array.from(uris) - .filter(uri => uri.startsWith('file://')) - .map(uri => uri.substr('file:///'.length)) -) -``` - -But there is a problem: Instead of iterating once, you iterate 4 times (one time for converting, one time for filtering, one time for mapping, one time for converting back). -For a large Set with thousands of elements, this has significant overhead. - -Other libraries like RxJS or plain NodeJS streams would support these kinds of "pipelines" without multiple iterations, but they work only asynchronously. - -With this library you can use many methods you know and love from `Array` and lodash while only iterating once - thanks to the ES6 [iterator protocol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols): - -```javascript -import iterate from 'iterare' - -iterate(uris) - .filter(uri => uri.startsWith('file://')) - .map(uri => uri.substr('file:///'.length)) - .toSet() -``` - -`iterate` accepts any kind of Iterator or Iterable (arrays, collections, generators, ...) and returns a new Iterator object that can be passed to any Iterable-accepting function (collection constructors, `Array.from()`, `for of`, ...). -Only when you call a method like `toSet()`, `reduce()` or pass it to a `for of` loop will each value get pulled through the pipeline, and only once. - -This library is essentially - -- RxJS, but fully synchronous -- lodash, but with first-class support for ES6 collections. - -## Performance - -Benchmarks based on the examples above: - -### [`map` + `filter`](https://github.com/felixfbecker/iterare/blob/master/src/benchmarks/map_filter_set.ts) - -Simulate iterating over a very lage Set of strings and applying a filter and a map on it. - -| Method | ops/sec | -| ------------------ | -----------------------------------: | -| Loop | 466 ops/sec ±1.31% (84 runs sampled) | -| **iterare** | 397 ops/sec ±2.01% (81 runs sampled) | -| RxJS | 339 ops/sec ±0.77% (83 runs sampled) | -| Array method chain | 257 ops/sec ±1.73% (79 runs sampled) | -| Lodash | 268 ops/sec ±0.84% (81 runs sampled) | -| IxJS (ES6) | 216 ops/sec ±0.81% (81 runs sampled) | -| IxJS (ES5) | 141 ops/sec ±0.87% (77 runs sampled) | - -### [`filter` + `take`](https://github.com/felixfbecker/iterare/blob/master/src/benchmarks/filter_take_set.ts) - -Simulate iterating over a very lage Set of strings and applying a filter on it, then taking only the first 1000 elements. -A smart implementations should only apply the filter predicate to the first 5 elements. - -| Method | ops/sec | -| ------------------ | -----------------------------------------: | -| Loop | 3,059,466 ops/sec ±0.75% (88 runs sampled) | -| **iterare** | 963,257 ops/sec ±0.68% (89 runs sampled) | -| IxJS (ES6) | 424,488 ops/sec ±0.63% (89 runs sampled) | -| RxJS | 168,853 ops/sec ±2.58% (86 runs sampled) | -| IxJS (ES5) | 107,961 ops/sec ±1.88% (78 runs sampled) | -| Lodash | 41.71 ops/sec ±1.15% (54 runs sampled) | -| Array method chain | 24.74 ops/sec ±3.69% (45 runs sampled) | - -## Lazy Evaluation - -Going a step further, if you only care about a specific number of elements in the end, only these elements will run through the pipeline: - -```javascript -iterate(collection) - .filter(uri => uri.startsWith('file://')) - .take(5) -``` - -In this example, the filter predicate is called only until 5 elements have been found. -The alternative with an array would call it for every element in the collection: - -```javascript -Array.from(collection) - .filter(uri => uri.startsWith('file://')) - .slice(0, 5) -``` - -## Contributing - -The source is written in TypeScript. - -- `npm run build` compiles TS -- `npm run watch` compiles on file changes -- `npm test` runs tests -- `node lib/benchmarks/____` runs a benchmark diff --git a/node_modules/iterare/lib/concat.d.ts b/node_modules/iterare/lib/concat.d.ts deleted file mode 100644 index a221da7..0000000 --- a/node_modules/iterare/lib/concat.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare class ConcatIterator implements Iterator { - private toConcat; - constructor(toConcat: Iterator[]); - next(): IteratorResult; -} -//# sourceMappingURL=concat.d.ts.map \ No newline at end of file diff --git a/node_modules/iterare/lib/concat.d.ts.map b/node_modules/iterare/lib/concat.d.ts.map deleted file mode 100644 index 36a05be..0000000 --- a/node_modules/iterare/lib/concat.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concat.d.ts","sourceRoot":"","sources":["../src/concat.ts"],"names":[],"mappings":"AAAA,qBAAa,cAAc,CAAC,CAAC,CAAE,YAAW,QAAQ,CAAC,CAAC,CAAC;IACrC,OAAO,CAAC,QAAQ;gBAAR,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE;IAE3C,IAAI,IAAI,cAAc,CAAC,CAAC,CAAC;CAW5B"} \ No newline at end of file diff --git a/node_modules/iterare/lib/concat.js b/node_modules/iterare/lib/concat.js deleted file mode 100644 index 3de8907..0000000 --- a/node_modules/iterare/lib/concat.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -class ConcatIterator { - constructor(toConcat) { - this.toConcat = toConcat; - } - next() { - if (this.toConcat.length === 0) { - return { done: true }; - } - const result = this.toConcat[0].next(); - if (!result.done) { - return result; - } - this.toConcat.shift(); - return this.next(); - } -} -exports.ConcatIterator = ConcatIterator; -//# sourceMappingURL=concat.js.map \ No newline at end of file diff --git a/node_modules/iterare/lib/concat.js.map b/node_modules/iterare/lib/concat.js.map deleted file mode 100644 index 70e1832..0000000 --- a/node_modules/iterare/lib/concat.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concat.js","sourceRoot":"","sources":["../src/concat.ts"],"names":[],"mappings":";;AAAA,MAAa,cAAc;IACvB,YAAoB,QAAuB;QAAvB,aAAQ,GAAR,QAAQ,CAAe;IAAG,CAAC;IAE/C,IAAI;QACA,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;YAC5B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAuB,CAAA;SAC7C;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;QACtC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;YACd,OAAO,MAAM,CAAA;SAChB;QACD,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAA;QACrB,OAAO,IAAI,CAAC,IAAI,EAAE,CAAA;IACtB,CAAC;CACJ;AAdD,wCAcC"} \ No newline at end of file diff --git a/node_modules/iterare/lib/concat.test.d.ts b/node_modules/iterare/lib/concat.test.d.ts deleted file mode 100644 index 5095af3..0000000 --- a/node_modules/iterare/lib/concat.test.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=concat.test.d.ts.map \ No newline at end of file diff --git a/node_modules/iterare/lib/concat.test.d.ts.map b/node_modules/iterare/lib/concat.test.d.ts.map deleted file mode 100644 index 9544955..0000000 --- a/node_modules/iterare/lib/concat.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concat.test.d.ts","sourceRoot":"","sources":["../src/concat.test.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/iterare/lib/concat.test.js.map b/node_modules/iterare/lib/concat.test.js.map deleted file mode 100644 index 667b607..0000000 --- a/node_modules/iterare/lib/concat.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concat.test.js","sourceRoot":"","sources":["../src/concat.test.ts"],"names":[],"mappings":";;AAAA,iCAAgC;AAChC,qCAAyC;AAEzC,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC5B,EAAE,CAAC,uDAAuD,EAAE,GAAG,EAAE;QAC7D,MAAM,SAAS,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;QAC9E,MAAM,MAAM,GAAG,IAAI,uBAAc,CAAC,SAAS,CAAC,CAAA;QAC5C,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACpC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACpC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACpC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACpC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACpC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACpC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IAC1C,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"} \ No newline at end of file diff --git a/node_modules/iterare/lib/filter.d.ts b/node_modules/iterare/lib/filter.d.ts deleted file mode 100644 index 6a8b27d..0000000 --- a/node_modules/iterare/lib/filter.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare class FilterIterator implements Iterator { - private source; - private predicate; - constructor(source: Iterator, predicate: ((element: T) => element is V) | ((element: T) => boolean)); - next(): IteratorResult; -} -//# sourceMappingURL=filter.d.ts.map \ No newline at end of file diff --git a/node_modules/iterare/lib/filter.d.ts.map b/node_modules/iterare/lib/filter.d.ts.map deleted file mode 100644 index a278138..0000000 --- a/node_modules/iterare/lib/filter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../src/filter.ts"],"names":[],"mappings":"AAAA,qBAAa,cAAc,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,CAAE,YAAW,QAAQ,CAAC,CAAC,CAAC;IAE9D,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,SAAS;gBADT,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EACnB,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,KAAK,OAAO,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,KAAK,OAAO,CAAC;IAGjF,IAAI,IAAI,cAAc,CAAC,CAAC,CAAC;CAQ5B"} \ No newline at end of file diff --git a/node_modules/iterare/lib/filter.js b/node_modules/iterare/lib/filter.js deleted file mode 100644 index b1b2c9e..0000000 --- a/node_modules/iterare/lib/filter.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -class FilterIterator { - constructor(source, predicate) { - this.source = source; - this.predicate = predicate; - } - next() { - let result; - // Skip elements until predicate returns true - do { - result = this.source.next(); - } while (!result.done && !this.predicate(result.value)); - return result; - } -} -exports.FilterIterator = FilterIterator; -//# sourceMappingURL=filter.js.map \ No newline at end of file diff --git a/node_modules/iterare/lib/filter.js.map b/node_modules/iterare/lib/filter.js.map deleted file mode 100644 index ed0109e..0000000 --- a/node_modules/iterare/lib/filter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"filter.js","sourceRoot":"","sources":["../src/filter.ts"],"names":[],"mappings":";;AAAA,MAAa,cAAc;IACvB,YACY,MAAmB,EACnB,SAAqE;QADrE,WAAM,GAAN,MAAM,CAAa;QACnB,cAAS,GAAT,SAAS,CAA4D;IAC9E,CAAC;IAEJ,IAAI;QACA,IAAI,MAAyB,CAAA;QAC7B,6CAA6C;QAC7C,GAAG;YACC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAA;SAC9B,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,EAAC;QACvD,OAAO,MAA2B,CAAA;IACtC,CAAC;CACJ;AAdD,wCAcC"} \ No newline at end of file diff --git a/node_modules/iterare/lib/filter.test.d.ts b/node_modules/iterare/lib/filter.test.d.ts deleted file mode 100644 index 3f96f67..0000000 --- a/node_modules/iterare/lib/filter.test.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=filter.test.d.ts.map \ No newline at end of file diff --git a/node_modules/iterare/lib/filter.test.d.ts.map b/node_modules/iterare/lib/filter.test.d.ts.map deleted file mode 100644 index 6965420..0000000 --- a/node_modules/iterare/lib/filter.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"filter.test.d.ts","sourceRoot":"","sources":["../src/filter.test.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/iterare/lib/filter.test.js.map b/node_modules/iterare/lib/filter.test.js.map deleted file mode 100644 index 6fff076..0000000 --- a/node_modules/iterare/lib/filter.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"filter.test.js","sourceRoot":"","sources":["../src/filter.test.ts"],"names":[],"mappings":";;AAAA,iCAAgC;AAChC,qCAAyC;AAEzC,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC5B,EAAE,CAAC,0DAA0D,EAAE,GAAG,EAAE;QAChE,MAAM,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;QACxD,MAAM,QAAQ,GAAG,IAAI,uBAAc,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAA;QACjE,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACtC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACtC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACtC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IAC5C,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"} \ No newline at end of file diff --git a/node_modules/iterare/lib/flatten.d.ts b/node_modules/iterare/lib/flatten.d.ts deleted file mode 100644 index 6b2a76f..0000000 --- a/node_modules/iterare/lib/flatten.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare class FlattenIterator implements Iterator { - private outer; - private inner?; - constructor(outer: Iterator); - next(): IteratorResult; -} -//# sourceMappingURL=flatten.d.ts.map \ No newline at end of file diff --git a/node_modules/iterare/lib/flatten.d.ts.map b/node_modules/iterare/lib/flatten.d.ts.map deleted file mode 100644 index aac874b..0000000 --- a/node_modules/iterare/lib/flatten.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"flatten.d.ts","sourceRoot":"","sources":["../src/flatten.ts"],"names":[],"mappings":"AAEA,qBAAa,eAAe,CAAC,CAAC,CAAE,YAAW,QAAQ,CAAC,CAAC,CAAC;IAGtC,OAAO,CAAC,KAAK;IAFzB,OAAO,CAAC,KAAK,CAAC,CAAe;gBAET,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC;IAExC,IAAI,IAAI,cAAc,CAAC,CAAC,CAAC;CAoB5B"} \ No newline at end of file diff --git a/node_modules/iterare/lib/flatten.js b/node_modules/iterare/lib/flatten.js deleted file mode 100644 index 2bb25bf..0000000 --- a/node_modules/iterare/lib/flatten.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("./utils"); -class FlattenIterator { - constructor(outer) { - this.outer = outer; - } - next() { - // Currently iterating over an inner Iterable? - if (this.inner) { - const result = this.inner.next(); - // If not done, return result - if (!result.done) { - return result; - } - // Else stop iterating inner Iterable - this.inner = undefined; - } - // Continue with next outer element - const { value, done } = this.outer.next(); - // If the value is iterable, start iterating over it - if (utils_1.isIterable(value)) { - this.inner = value[Symbol.iterator](); - return this.next(); - } - return { value, done }; - } -} -exports.FlattenIterator = FlattenIterator; -//# sourceMappingURL=flatten.js.map \ No newline at end of file diff --git a/node_modules/iterare/lib/flatten.js.map b/node_modules/iterare/lib/flatten.js.map deleted file mode 100644 index d605544..0000000 --- a/node_modules/iterare/lib/flatten.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"flatten.js","sourceRoot":"","sources":["../src/flatten.ts"],"names":[],"mappings":";;AAAA,mCAAoC;AAEpC,MAAa,eAAe;IAGxB,YAAoB,KAAoB;QAApB,UAAK,GAAL,KAAK,CAAe;IAAG,CAAC;IAE5C,IAAI;QACA,8CAA8C;QAC9C,IAAI,IAAI,CAAC,KAAK,EAAE;YACZ,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAA;YAChC,6BAA6B;YAC7B,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;gBACd,OAAO,MAAM,CAAA;aAChB;YACD,qCAAqC;YACrC,IAAI,CAAC,KAAK,GAAG,SAAS,CAAA;SACzB;QACD,mCAAmC;QACnC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAA;QACzC,oDAAoD;QACpD,IAAI,kBAAU,CAAC,KAAK,CAAC,EAAE;YACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;YACrC,OAAO,IAAI,CAAC,IAAI,EAAE,CAAA;SACrB;QACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAA;IAC1B,CAAC;CACJ;AAzBD,0CAyBC"} \ No newline at end of file diff --git a/node_modules/iterare/lib/flatten.test.d.ts b/node_modules/iterare/lib/flatten.test.d.ts deleted file mode 100644 index 0b3884f..0000000 --- a/node_modules/iterare/lib/flatten.test.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=flatten.test.d.ts.map \ No newline at end of file diff --git a/node_modules/iterare/lib/flatten.test.d.ts.map b/node_modules/iterare/lib/flatten.test.d.ts.map deleted file mode 100644 index e9f3581..0000000 --- a/node_modules/iterare/lib/flatten.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"flatten.test.d.ts","sourceRoot":"","sources":["../src/flatten.test.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/iterare/lib/flatten.test.js.map b/node_modules/iterare/lib/flatten.test.js.map deleted file mode 100644 index d6daabd..0000000 --- a/node_modules/iterare/lib/flatten.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"flatten.test.js","sourceRoot":"","sources":["../src/flatten.test.ts"],"names":[],"mappings":";;AAAA,iCAAgC;AAChC,uCAA2C;AAE3C,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC7B,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;QACvC,MAAM,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;QAC3D,MAAM,SAAS,GAAG,IAAI,yBAAe,CAAC,UAAU,CAAC,CAAA;QACjD,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACvC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACvC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;QAC7C,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACvC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACvC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IAC7C,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"} \ No newline at end of file diff --git a/node_modules/iterare/lib/index.d.ts b/node_modules/iterare/lib/index.d.ts deleted file mode 100644 index 51d8a30..0000000 --- a/node_modules/iterare/lib/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { iterate, zip } from './iterate'; -export { iterate, zip }; -export default iterate; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/iterare/lib/index.d.ts.map b/node_modules/iterare/lib/index.d.ts.map deleted file mode 100644 index 2989b34..0000000 --- a/node_modules/iterare/lib/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAA;AACvB,eAAe,OAAO,CAAA"} \ No newline at end of file diff --git a/node_modules/iterare/lib/index.js b/node_modules/iterare/lib/index.js deleted file mode 100644 index b3a5219..0000000 --- a/node_modules/iterare/lib/index.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const iterate_1 = require("./iterate"); -exports.iterate = iterate_1.iterate; -exports.zip = iterate_1.zip; -exports.default = iterate_1.iterate; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/iterare/lib/index.js.map b/node_modules/iterare/lib/index.js.map deleted file mode 100644 index 04c6e2c..0000000 --- a/node_modules/iterare/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,uCAAwC;AAC/B,kBADA,iBAAO,CACA;AAAE,cADA,aAAG,CACA;AACrB,kBAAe,iBAAO,CAAA"} \ No newline at end of file diff --git a/node_modules/iterare/lib/iterate.d.ts b/node_modules/iterare/lib/iterate.d.ts deleted file mode 100644 index 1ade6b4..0000000 --- a/node_modules/iterare/lib/iterate.d.ts +++ /dev/null @@ -1,127 +0,0 @@ -export declare class IteratorWithOperators implements IterableIterator { - private source; - /** - * @param source Iterator to wrap - */ - constructor(source: Iterator); - /** - * Returns a `{ value, done }` object that adheres to the Iterator protocol - */ - next(): IteratorResult; - /** - * The presence of this method makes the Iterator itself Iterable. - * This makes it possible to pass it to `for of` and Iterable-accepting functions like `Array.from()` - */ - [Symbol.iterator](): this; - /** - * Returns a new Iterator by running each element thru iteratee - */ - map(iteratee: (value: T) => R): IteratorWithOperators; - /** - * Returns a new Iterator of all elements predicate returns truthy for - */ - filter(predicate: (element: T) => boolean): IteratorWithOperators; - filter(predicate: (element: T) => element is R): IteratorWithOperators; - /** - * Returns a new Iterator concatenating the Iterator with an additional Iterator or Iterable - */ - concat(collection: Iterable | Iterator): IteratorWithOperators; - /** - * Returns a new Iterator that emits slice of the source with n elements taken from the beginning - * - * @param limit The number of elements to take. - */ - take(limit: number): IteratorWithOperators; - /** - * Returns a new Iterator that emits slice of the source with n elements dropped from the beginning - * - * @param n The number of elements to drop. - */ - drop(n: number): IteratorWithOperators; - /** - * Returns a new Iterator that emits a slice of the source - * - * @param {number} start Zero-based positive start index, inclusive - * @param {number} end Zero-based positive end index, exclusive, defaults to end of iterator - */ - slice(start: number, end?: number): IteratorWithOperators; - /** - * Returns a new Iterator that flattens items emitted by the Iterator a single level deep - */ - flatten(): IteratorWithOperators ? V : T>; - /** - * Reduces the Iterator to a value which is the accumulated result of running each emitted element thru iteratee, - * where each successive invocation is supplied the return value of the previous. - * The first element of collection is used as the initial value. - */ - reduce(iteratee: (acc: T, val: T) => T): T; - /** - * Reduces the Iterator to a value which is the accumulated result of running each emitted element thru iteratee, - * where each successive invocation is supplied the return value of the previous. - * - * @param initialValue The initial value for `acc` - */ - reduce(iteratee: (acc: A, val: T) => A, initialValue: A): A; - /** - * Finds the first item which satisfies the condition provided as the argument. - * The condition is a typeguard and the result has the correct type. - * If no argument satisfies the condition, returns undefined. - * - * @param predicate The predicate with a typeguard signature to search by - */ - find(predicate: (value: T) => value is V): V | undefined; - /** - * Finds the first item which satisfies the condition provided as the argument. - * If no item saisfies the condition, returns undefined. - * - * @param predicate The predicate to search by - */ - find(predicate: (value: T) => boolean): T | undefined; - /** - * Iterates and checks if `value` is emitted by the Iterator - * - * @param value The value to search - */ - includes(value: T): boolean; - /** - * Iterates and checks if `predicate` returns truthy for any element emitted by the Iterator - */ - some(predicate: (value: T) => boolean): boolean; - /** - * Iterates and checks if `predicate` returns truthy for all elements emitted by the Iterator - */ - every(predicate: (value: T) => boolean): boolean; - /** - * Iterates and invokes `iteratee` for every element emitted by the Iterator - */ - forEach(iteratee: (value: T) => any): void; - /** - * Iterates and joins all elements emitted by the Iterator together as a string separated by an optional separator - */ - join(separator?: string): string; - /** - * Iterates and returns all items emitted by the Iterator as an array. - * Equivalent to passing the Iterator to `Array.from()` - */ - toArray(): T[]; - /** - * Iterates and returns all items emitted by the Iterator as an ES6 Set. - * Equivalent to passing the Iterator to `new Set()` - */ - toSet(): Set; - /** - * Iterates and returns all `[key, value]` paris emitted by the Iterator as an ES6 Map. - * Equivalent to passing the Iterator to `new Map()` - */ - toMap(this: IteratorWithOperators<[K, V]>): Map; -} -/** - * Creates an Iterator with advanced chainable operator methods for any Iterable or Iterator - */ -export declare function iterate(collection: Iterator | Iterable): IteratorWithOperators; -/** - * Creates an Iterator that emits pairs of values from the two passed Iterators - */ -export declare function zip(a: Iterator | Iterable, b: Iterator | Iterable): IteratorWithOperators<[A, B]>; -export default iterate; -//# sourceMappingURL=iterate.d.ts.map \ No newline at end of file diff --git a/node_modules/iterare/lib/iterate.d.ts.map b/node_modules/iterare/lib/iterate.d.ts.map deleted file mode 100644 index 3d4b9a0..0000000 --- a/node_modules/iterare/lib/iterate.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"iterate.d.ts","sourceRoot":"","sources":["../src/iterate.ts"],"names":[],"mappings":"AAQA,qBAAa,qBAAqB,CAAC,CAAC,CAAE,YAAW,gBAAgB,CAAC,CAAC,CAAC;IAIpD,OAAO,CAAC,MAAM;IAH1B;;OAEG;gBACiB,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEvC;;OAEG;IACH,IAAI,IAAI,cAAc,CAAC,CAAC,CAAC;IAIzB;;;OAGG;IACH,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,IAAI;IAIzB;;OAEG;IACH,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,qBAAqB,CAAC,CAAC,CAAC;IAI3D;;OAEG;IACH,MAAM,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,OAAO,GAAG,qBAAqB,CAAC,CAAC,CAAC;IACpE,MAAM,CAAC,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,OAAO,IAAI,CAAC,GAAG,qBAAqB,CAAC,CAAC,CAAC;IAKtF;;OAEG;IACH,MAAM,CAAC,CAAC,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,qBAAqB,CAAC,CAAC,GAAG,CAAC,CAAC;IAI9E;;;;OAIG;IACH,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,qBAAqB,CAAC,CAAC,CAAC;IAI7C;;;;OAIG;IACH,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,qBAAqB,CAAC,CAAC,CAAC;IAIzC;;;;;OAKG;IACH,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,SAAW,GAAG,qBAAqB,CAAC,CAAC,CAAC;IAI9D;;OAEG;IACH,OAAO,IAAI,qBAAqB,CAAC,CAAC,SAAS,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAIrE;;;;OAIG;IACH,MAAM,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC;IAC1C;;;;;OAKG;IACH,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC,GAAG,CAAC;IAoB9D;;;;;;OAMG;IACH,IAAI,CAAC,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,GAAG,CAAC,GAAG,SAAS;IACrE;;;;;OAKG;IACH,IAAI,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,CAAC,GAAG,SAAS;IAcrD;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,OAAO;IAW3B;;OAEG;IACH,IAAI,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO;IAW/C;;OAEG;IACH,KAAK,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO;IAWhD;;OAEG;IACH,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,GAAG,GAAG,IAAI;IAW1C;;OAEG;IACH,IAAI,CAAC,SAAS,SAAM,GAAG,MAAM;IAa7B;;;OAGG;IACH,OAAO,IAAI,CAAC,EAAE;IAId;;;OAGG;IACH,KAAK,IAAI,GAAG,CAAC,CAAC,CAAC;IAWf;;;OAGG;IACH,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;CAG9D;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAE1F;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAEnH;AAED,eAAe,OAAO,CAAA"} \ No newline at end of file diff --git a/node_modules/iterare/lib/iterate.js b/node_modules/iterare/lib/iterate.js deleted file mode 100644 index aa7da1f..0000000 --- a/node_modules/iterare/lib/iterate.js +++ /dev/null @@ -1,220 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const concat_1 = require("./concat"); -const filter_1 = require("./filter"); -const flatten_1 = require("./flatten"); -const map_1 = require("./map"); -const slice_1 = require("./slice"); -const utils_1 = require("./utils"); -const zip_1 = require("./zip"); -class IteratorWithOperators { - /** - * @param source Iterator to wrap - */ - constructor(source) { - this.source = source; - } - /** - * Returns a `{ value, done }` object that adheres to the Iterator protocol - */ - next() { - return this.source.next(); - } - /** - * The presence of this method makes the Iterator itself Iterable. - * This makes it possible to pass it to `for of` and Iterable-accepting functions like `Array.from()` - */ - [Symbol.iterator]() { - return this; - } - /** - * Returns a new Iterator by running each element thru iteratee - */ - map(iteratee) { - return new IteratorWithOperators(new map_1.MapIterator(this.source, iteratee)); - } - filter(predicate) { - return new IteratorWithOperators(new filter_1.FilterIterator(this.source, predicate)); - } - /** - * Returns a new Iterator concatenating the Iterator with an additional Iterator or Iterable - */ - concat(collection) { - return new IteratorWithOperators(new concat_1.ConcatIterator([this.source, utils_1.toIterator(collection)])); - } - /** - * Returns a new Iterator that emits slice of the source with n elements taken from the beginning - * - * @param limit The number of elements to take. - */ - take(limit) { - return new IteratorWithOperators(new slice_1.SliceIterator(this.source, 0, limit + 1)); - } - /** - * Returns a new Iterator that emits slice of the source with n elements dropped from the beginning - * - * @param n The number of elements to drop. - */ - drop(n) { - return new IteratorWithOperators(new slice_1.SliceIterator(this.source, n, Infinity)); - } - /** - * Returns a new Iterator that emits a slice of the source - * - * @param {number} start Zero-based positive start index, inclusive - * @param {number} end Zero-based positive end index, exclusive, defaults to end of iterator - */ - slice(start, end = Infinity) { - return new IteratorWithOperators(new slice_1.SliceIterator(this.source, start, end)); - } - /** - * Returns a new Iterator that flattens items emitted by the Iterator a single level deep - */ - flatten() { - return new IteratorWithOperators(new flatten_1.FlattenIterator(this.source)); - } - reduce(iteratee, accumulator) { - let result; - if (accumulator === undefined) { - result = this.source.next(); - if (result.done) { - throw new TypeError('Reduce of empty Iterator with no initial value'); - } - accumulator = result.value; - } - while (true) { - result = this.source.next(); - if (result.done) { - break; - } - accumulator = iteratee(accumulator, result.value); - } - return accumulator; - } - find(predicate) { - let result; - while (true) { - result = this.source.next(); - if (result.done) { - return undefined; - } - if (predicate(result.value)) { - return result.value; - } - } - } - /** - * Iterates and checks if `value` is emitted by the Iterator - * - * @param value The value to search - */ - includes(value) { - let result; - do { - result = this.source.next(); - if (!result.done && result.value === value) { - return true; - } - } while (!result.done); - return false; - } - /** - * Iterates and checks if `predicate` returns truthy for any element emitted by the Iterator - */ - some(predicate) { - let result; - do { - result = this.source.next(); - if (!result.done && predicate(result.value)) { - return true; - } - } while (!result.done); - return false; - } - /** - * Iterates and checks if `predicate` returns truthy for all elements emitted by the Iterator - */ - every(predicate) { - let result; - do { - result = this.source.next(); - if (!result.done && !predicate(result.value)) { - return false; - } - } while (!result.done); - return true; - } - /** - * Iterates and invokes `iteratee` for every element emitted by the Iterator - */ - forEach(iteratee) { - let result; - while (true) { - result = this.source.next(); - if (result.done) { - break; - } - iteratee(result.value); - } - } - /** - * Iterates and joins all elements emitted by the Iterator together as a string separated by an optional separator - */ - join(separator = ',') { - let joined = ''; - let result; - while (true) { - result = this.source.next(); - if (result.done) { - break; - } - joined += separator + result.value; - } - return joined.substr(separator.length); - } - /** - * Iterates and returns all items emitted by the Iterator as an array. - * Equivalent to passing the Iterator to `Array.from()` - */ - toArray() { - return Array.from(this); - } - /** - * Iterates and returns all items emitted by the Iterator as an ES6 Set. - * Equivalent to passing the Iterator to `new Set()` - */ - toSet() { - const set = new Set(); - while (true) { - const { value, done } = this.next(); - if (done) { - return set; - } - set.add(value); - } - } - /** - * Iterates and returns all `[key, value]` paris emitted by the Iterator as an ES6 Map. - * Equivalent to passing the Iterator to `new Map()` - */ - toMap() { - return new Map(this); - } -} -exports.IteratorWithOperators = IteratorWithOperators; -/** - * Creates an Iterator with advanced chainable operator methods for any Iterable or Iterator - */ -function iterate(collection) { - return new IteratorWithOperators(utils_1.toIterator(collection)); -} -exports.iterate = iterate; -/** - * Creates an Iterator that emits pairs of values from the two passed Iterators - */ -function zip(a, b) { - return new IteratorWithOperators(new zip_1.ZipIterator(utils_1.toIterator(a), utils_1.toIterator(b))); -} -exports.zip = zip; -exports.default = iterate; -//# sourceMappingURL=iterate.js.map \ No newline at end of file diff --git a/node_modules/iterare/lib/iterate.js.map b/node_modules/iterare/lib/iterate.js.map deleted file mode 100644 index d2ff509..0000000 --- a/node_modules/iterare/lib/iterate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"iterate.js","sourceRoot":"","sources":["../src/iterate.ts"],"names":[],"mappings":";;AAAA,qCAAyC;AACzC,qCAAyC;AACzC,uCAA2C;AAC3C,+BAAmC;AACnC,mCAAuC;AACvC,mCAAoC;AACpC,+BAAmC;AAEnC,MAAa,qBAAqB;IAC9B;;OAEG;IACH,YAAoB,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAE3C;;OAEG;IACH,IAAI;QACA,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAA;IAC7B,CAAC;IAED;;;OAGG;IACH,CAAC,MAAM,CAAC,QAAQ,CAAC;QACb,OAAO,IAAI,CAAA;IACf,CAAC;IAED;;OAEG;IACH,GAAG,CAAI,QAAyB;QAC5B,OAAO,IAAI,qBAAqB,CAAC,IAAI,iBAAW,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAA;IAC5E,CAAC;IAOD,MAAM,CAAC,SAAkC;QACrC,OAAO,IAAI,qBAAqB,CAAC,IAAI,uBAAc,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAA;IAChF,CAAC;IAED;;OAEG;IACH,MAAM,CAAI,UAAqC;QAC3C,OAAO,IAAI,qBAAqB,CAAC,IAAI,uBAAc,CAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,kBAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;IACtG,CAAC;IAED;;;;OAIG;IACH,IAAI,CAAC,KAAa;QACd,OAAO,IAAI,qBAAqB,CAAC,IAAI,qBAAa,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,CAAA;IAClF,CAAC;IAED;;;;OAIG;IACH,IAAI,CAAC,CAAS;QACV,OAAO,IAAI,qBAAqB,CAAC,IAAI,qBAAa,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAA;IACjF,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,KAAa,EAAE,GAAG,GAAG,QAAQ;QAC/B,OAAO,IAAI,qBAAqB,CAAC,IAAI,qBAAa,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,CAAA;IAChF,CAAC;IAED;;OAEG;IACH,OAAO;QACH,OAAO,IAAI,qBAAqB,CAAC,IAAI,yBAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;IACtE,CAAC;IAeD,MAAM,CAAC,QAAqC,EAAE,WAAiB;QAC3D,IAAI,MAAyB,CAAA;QAC7B,IAAI,WAAW,KAAK,SAAS,EAAE;YAC3B,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAA;YAC3B,IAAI,MAAM,CAAC,IAAI,EAAE;gBACb,MAAM,IAAI,SAAS,CAAC,gDAAgD,CAAC,CAAA;aACxE;YACD,WAAW,GAAG,MAAM,CAAC,KAAK,CAAA;SAC7B;QACD,OAAO,IAAI,EAAE;YACT,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAA;YAC3B,IAAI,MAAM,CAAC,IAAI,EAAE;gBACb,MAAK;aACR;YACD,WAAW,GAAG,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,KAAK,CAAC,CAAA;SACpD;QACD,OAAO,WAAW,CAAA;IACtB,CAAC;IAiBD,IAAI,CAAC,SAAc;QACf,IAAI,MAAyB,CAAA;QAC7B,OAAO,IAAI,EAAE;YACT,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAA;YAC3B,IAAI,MAAM,CAAC,IAAI,EAAE;gBACb,OAAO,SAAS,CAAA;aACnB;YACD,IAAI,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;gBACzB,OAAO,MAAM,CAAC,KAAK,CAAA;aACtB;SACJ;IACL,CAAC;IAED;;;;OAIG;IACH,QAAQ,CAAC,KAAQ;QACb,IAAI,MAAyB,CAAA;QAC7B,GAAG;YACC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAA;YAC3B,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,KAAK,KAAK,KAAK,EAAE;gBACxC,OAAO,IAAI,CAAA;aACd;SACJ,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAC;QACtB,OAAO,KAAK,CAAA;IAChB,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,SAAgC;QACjC,IAAI,MAAyB,CAAA;QAC7B,GAAG;YACC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAA;YAC3B,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;gBACzC,OAAO,IAAI,CAAA;aACd;SACJ,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAC;QACtB,OAAO,KAAK,CAAA;IAChB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,SAAgC;QAClC,IAAI,MAAyB,CAAA;QAC7B,GAAG;YACC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAA;YAC3B,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;gBAC1C,OAAO,KAAK,CAAA;aACf;SACJ,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAC;QACtB,OAAO,IAAI,CAAA;IACf,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,QAA2B;QAC/B,IAAI,MAAyB,CAAA;QAC7B,OAAO,IAAI,EAAE;YACT,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAA;YAC3B,IAAI,MAAM,CAAC,IAAI,EAAE;gBACb,MAAK;aACR;YACD,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;SACzB;IACL,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,SAAS,GAAG,GAAG;QAChB,IAAI,MAAM,GAAG,EAAE,CAAA;QACf,IAAI,MAAyB,CAAA;QAC7B,OAAO,IAAI,EAAE;YACT,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAA;YAC3B,IAAI,MAAM,CAAC,IAAI,EAAE;gBACb,MAAK;aACR;YACD,MAAM,IAAI,SAAS,GAAG,MAAM,CAAC,KAAK,CAAA;SACrC;QACD,OAAO,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;IAC1C,CAAC;IAED;;;OAGG;IACH,OAAO;QACH,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3B,CAAC;IAED;;;OAGG;IACH,KAAK;QACD,MAAM,GAAG,GAAG,IAAI,GAAG,EAAK,CAAA;QACxB,OAAO,IAAI,EAAE;YACT,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,CAAA;YACnC,IAAI,IAAI,EAAE;gBACN,OAAO,GAAG,CAAA;aACb;YACD,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;SACjB;IACL,CAAC;IAED;;;OAGG;IACH,KAAK;QACD,OAAO,IAAI,GAAG,CAAO,IAAI,CAAC,CAAA;IAC9B,CAAC;CACJ;AAnPD,sDAmPC;AAED;;GAEG;AACH,SAAgB,OAAO,CAAI,UAAqC;IAC5D,OAAO,IAAI,qBAAqB,CAAC,kBAAU,CAAC,UAAU,CAAC,CAAC,CAAA;AAC5D,CAAC;AAFD,0BAEC;AAED;;GAEG;AACH,SAAgB,GAAG,CAAO,CAA4B,EAAE,CAA4B;IAChF,OAAO,IAAI,qBAAqB,CAAC,IAAI,iBAAW,CAAC,kBAAU,CAAC,CAAC,CAAC,EAAE,kBAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AACnF,CAAC;AAFD,kBAEC;AAED,kBAAe,OAAO,CAAA"} \ No newline at end of file diff --git a/node_modules/iterare/lib/iterate.test.d.ts b/node_modules/iterare/lib/iterate.test.d.ts deleted file mode 100644 index d572682..0000000 --- a/node_modules/iterare/lib/iterate.test.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=iterate.test.d.ts.map \ No newline at end of file diff --git a/node_modules/iterare/lib/iterate.test.d.ts.map b/node_modules/iterare/lib/iterate.test.d.ts.map deleted file mode 100644 index be0da13..0000000 --- a/node_modules/iterare/lib/iterate.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"iterate.test.d.ts","sourceRoot":"","sources":["../src/iterate.test.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/iterare/lib/iterate.test.js.map b/node_modules/iterare/lib/iterate.test.js.map deleted file mode 100644 index 5aadc3a..0000000 --- a/node_modules/iterare/lib/iterate.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"iterate.test.js","sourceRoot":"","sources":["../src/iterate.test.ts"],"names":[],"mappings":";;AAAA,iCAAgC;AAChC,uCAAiD;AAEjD,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IACnC,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;QAClB,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;YACjD,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YAC/E,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;YACjC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;QACnC,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,kDAAkD,EAAE,GAAG,EAAE;YACxD,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YACjE,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAA;YAC9B,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;QAC5B,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,sCAAsC,EAAE,GAAG,EAAE;YAC5C,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YAC/E,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;YAChC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QAChC,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE;YAC/C,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YAC/E,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;YACnC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;QACzC,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;IACF,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;QACrB,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;YACvC,MAAM,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;YACxC,MAAM,SAAS,GAAG,IAAI,+BAAqB,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAA;YACpF,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;YACvC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;YACvC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;YAC7C,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;YACvC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;YACvC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;QAC7C,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;IACF,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;QAClB,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;YAC9C,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;YACnF,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;YACtC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;YACtC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;QAC5C,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;IACF,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;QAClB,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;YAC9C,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;YACnF,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;YACtC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;YACtC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;QAC5C,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;IACF,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;QACpB,EAAE,CAAC,yDAAyD,EAAE,GAAG,EAAE;YAC/D,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YAC3E,MAAM,GAAG,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;YACrC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;QACxB,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE;YACzC,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YACxE,MAAM,GAAG,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,EAAE,GAAG,CAAC,CAAA;YACrD,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;QAC1B,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,sEAAsE,EAAE,GAAG,EAAE;YAC5E,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAS,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YACzE,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE;gBACf,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;YAC7B,CAAC,EAAE,SAAS,CAAC,CAAA;QACjB,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;YACtD,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAS,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YACzE,MAAM,GAAG,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;YACzC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;QACzB,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,wDAAwD,EAAE,GAAG,EAAE;YAC9D,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YAClE,MAAM,GAAG,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;YACrC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;QACxB,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;IACF,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;QAClB,EAAE,CAAC,+DAA+D,EAAE,GAAG,EAAE;YACrE,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YAC3E,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QACpD,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,yEAAyE,EAAE,GAAG,EAAE;YAC/E,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YACxE,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;QACtD,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;YACzD,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YAC/E,MAAM,SAAS,GAAG,CAAC,IAAS,EAAkB,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAA;YACzE,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAE,CAAA;YACxC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA,CAAC,6CAA6C;QACrF,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;IACF,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;QACtB,EAAE,CAAC,8DAA8D,EAAE,GAAG,EAAE;YACpE,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YACxE,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;QAC5C,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,mEAAmE,EAAE,GAAG,EAAE;YACzE,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YAC3E,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;QAC7C,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;YACjD,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAS,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YACzE,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;QAC7C,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;IACF,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;QAClB,EAAE,CAAC,qEAAqE,EAAE,GAAG,EAAE;YAC3E,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YACxE,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAA;YAC/C,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;QAC/B,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,qEAAqE,EAAE,GAAG,EAAE;YAC3E,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YAC3E,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAA;YAC/C,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;QAChC,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;YACjD,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAS,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YACzE,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAA;YAC/C,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;QAChC,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;IACF,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE;QACnB,EAAE,CAAC,mEAAmE,EAAE,GAAG,EAAE;YACzE,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YACxE,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAA;YAChD,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;QAC/B,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,oEAAoE,EAAE,GAAG,EAAE;YAC1E,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YAC3E,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAA;YAChD,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;QAChC,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE;YAChD,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAS,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YACzE,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAA;YAChD,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;QAC/B,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;IACF,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;QACrB,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;YACjD,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YACxE,IAAI,CAAC,GAAG,CAAC,CAAA;YACT,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;gBACjB,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAA;YACxB,CAAC,CAAC,CAAA;QACN,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;IACF,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;QACrB,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;YAC3C,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YACxE,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;QACnD,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;IACF,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE;QACnB,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;YACxC,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YACxE,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAA;YAC5B,MAAM,CAAC,GAAG,YAAY,GAAG,EAAE,gBAAgB,CAAC,CAAA;YAC5C,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;QAChD,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;IACF,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE;QACnB,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;YACxC,MAAM,GAAG,GAAuB,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAA;YACxD,MAAM,QAAQ,GAAG,IAAI,+BAAqB,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;YAClE,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAA;YAC5B,MAAM,CAAC,GAAG,YAAY,GAAG,EAAE,gBAAgB,CAAC,CAAA;YAC5C,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;QAC/D,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"} \ No newline at end of file diff --git a/node_modules/iterare/lib/map.d.ts b/node_modules/iterare/lib/map.d.ts deleted file mode 100644 index 9ca1900..0000000 --- a/node_modules/iterare/lib/map.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * An iterator that emits results by running each element through a provided predicate - */ -export declare class MapIterator implements Iterator { - private source; - private iteratee; - constructor(source: Iterator, iteratee: (value: T) => R); - next(): IteratorResult; -} -//# sourceMappingURL=map.d.ts.map \ No newline at end of file diff --git a/node_modules/iterare/lib/map.d.ts.map b/node_modules/iterare/lib/map.d.ts.map deleted file mode 100644 index 4f0fdf1..0000000 --- a/node_modules/iterare/lib/map.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../src/map.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,WAAW,CAAC,CAAC,EAAE,CAAC,CAAE,YAAW,QAAQ,CAAC,CAAC,CAAC;IACrC,OAAO,CAAC,MAAM;IAAe,OAAO,CAAC,QAAQ;gBAArC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAU,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC;IAE1E,IAAI,IAAI,cAAc,CAAC,CAAC,CAAC;CAI5B"} \ No newline at end of file diff --git a/node_modules/iterare/lib/map.js b/node_modules/iterare/lib/map.js deleted file mode 100644 index d35ccca..0000000 --- a/node_modules/iterare/lib/map.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * An iterator that emits results by running each element through a provided predicate - */ -class MapIterator { - constructor(source, iteratee) { - this.source = source; - this.iteratee = iteratee; - } - next() { - const { value, done } = this.source.next(); - return { value: !done && this.iteratee(value), done }; - } -} -exports.MapIterator = MapIterator; -//# sourceMappingURL=map.js.map \ No newline at end of file diff --git a/node_modules/iterare/lib/map.js.map b/node_modules/iterare/lib/map.js.map deleted file mode 100644 index 0c00615..0000000 --- a/node_modules/iterare/lib/map.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"map.js","sourceRoot":"","sources":["../src/map.ts"],"names":[],"mappings":";;AAAA;;GAEG;AACH,MAAa,WAAW;IACpB,YAAoB,MAAmB,EAAU,QAAyB;QAAtD,WAAM,GAAN,MAAM,CAAa;QAAU,aAAQ,GAAR,QAAQ,CAAiB;IAAG,CAAC;IAE9E,IAAI;QACA,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAA;QAC1C,OAAO,EAAE,KAAK,EAAE,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,IAAI,EAAuB,CAAA;IAC9E,CAAC;CACJ;AAPD,kCAOC"} \ No newline at end of file diff --git a/node_modules/iterare/lib/map.test.d.ts b/node_modules/iterare/lib/map.test.d.ts deleted file mode 100644 index 3be85f6..0000000 --- a/node_modules/iterare/lib/map.test.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=map.test.d.ts.map \ No newline at end of file diff --git a/node_modules/iterare/lib/map.test.d.ts.map b/node_modules/iterare/lib/map.test.d.ts.map deleted file mode 100644 index ef09e8b..0000000 --- a/node_modules/iterare/lib/map.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"map.test.d.ts","sourceRoot":"","sources":["../src/map.test.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/iterare/lib/map.test.js.map b/node_modules/iterare/lib/map.test.js.map deleted file mode 100644 index 259b076..0000000 --- a/node_modules/iterare/lib/map.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"map.test.js","sourceRoot":"","sources":["../src/map.test.ts"],"names":[],"mappings":";;AAAA,iCAAgC;AAChC,+BAAmC;AAEnC,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IACzB,EAAE,CAAC,sEAAsE,EAAE,GAAG,EAAE;QAC5E,MAAM,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;QAClD,MAAM,MAAM,GAAG,IAAI,iBAAW,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;QACtD,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACpC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACpC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACpC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACpC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IAC1C,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"} \ No newline at end of file diff --git a/node_modules/iterare/lib/slice.d.ts b/node_modules/iterare/lib/slice.d.ts deleted file mode 100644 index f31206e..0000000 --- a/node_modules/iterare/lib/slice.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export declare class SliceIterator implements Iterator { - private source; - private start; - private end; - private i; - /** - * @param {Iterator} source Source Iterator - * @param {number} start Zero-based positive start index, inclusive - * @param {number} end Zero-based positive end index, exclusive, defaults to end of iterator - */ - constructor(source: Iterator, start: number, end?: number); - next(): IteratorResult; -} -//# sourceMappingURL=slice.d.ts.map \ No newline at end of file diff --git a/node_modules/iterare/lib/slice.d.ts.map b/node_modules/iterare/lib/slice.d.ts.map deleted file mode 100644 index a1f3c2c..0000000 --- a/node_modules/iterare/lib/slice.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"slice.d.ts","sourceRoot":"","sources":["../src/slice.ts"],"names":[],"mappings":"AAAA,qBAAa,aAAa,CAAC,CAAC,CAAE,YAAW,QAAQ,CAAC,CAAC,CAAC;IAQpC,OAAO,CAAC,MAAM;IAAe,OAAO,CAAC,KAAK;IAAU,OAAO,CAAC,GAAG;IAP3E,OAAO,CAAC,CAAC,CAAI;IAEb;;;;OAIG;gBACiB,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAU,KAAK,EAAE,MAAM,EAAU,GAAG,SAAW;IAEtF,IAAI,IAAI,cAAc,CAAC,CAAC,CAAC;CAgB5B"} \ No newline at end of file diff --git a/node_modules/iterare/lib/slice.js b/node_modules/iterare/lib/slice.js deleted file mode 100644 index 898770b..0000000 --- a/node_modules/iterare/lib/slice.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -class SliceIterator { - /** - * @param {Iterator} source Source Iterator - * @param {number} start Zero-based positive start index, inclusive - * @param {number} end Zero-based positive end index, exclusive, defaults to end of iterator - */ - constructor(source, start, end = Infinity) { - this.source = source; - this.start = start; - this.end = end; - this.i = 0; - } - next() { - // Skip elements before start - while (this.i < this.start) { - const result = this.source.next(); - if (result.done) { - return result; - } - this.i++; - } - // Finish when end is reached - this.i++; - if (this.i >= this.end) { - return { done: true }; - } - return this.source.next(); - } -} -exports.SliceIterator = SliceIterator; -//# sourceMappingURL=slice.js.map \ No newline at end of file diff --git a/node_modules/iterare/lib/slice.js.map b/node_modules/iterare/lib/slice.js.map deleted file mode 100644 index 5872abd..0000000 --- a/node_modules/iterare/lib/slice.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"slice.js","sourceRoot":"","sources":["../src/slice.ts"],"names":[],"mappings":";;AAAA,MAAa,aAAa;IAGtB;;;;OAIG;IACH,YAAoB,MAAmB,EAAU,KAAa,EAAU,MAAM,QAAQ;QAAlE,WAAM,GAAN,MAAM,CAAa;QAAU,UAAK,GAAL,KAAK,CAAQ;QAAU,QAAG,GAAH,GAAG,CAAW;QAP9E,MAAC,GAAG,CAAC,CAAA;IAO4E,CAAC;IAE1F,IAAI;QACA,6BAA6B;QAC7B,OAAO,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE;YACxB,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAA;YACjC,IAAI,MAAM,CAAC,IAAI,EAAE;gBACb,OAAO,MAAM,CAAA;aAChB;YACD,IAAI,CAAC,CAAC,EAAE,CAAA;SACX;QACD,6BAA6B;QAC7B,IAAI,CAAC,CAAC,EAAE,CAAA;QACR,IAAI,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,EAAE;YACpB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAuB,CAAA;SAC7C;QACD,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAA;IAC7B,CAAC;CACJ;AA1BD,sCA0BC"} \ No newline at end of file diff --git a/node_modules/iterare/lib/slice.test.d.ts b/node_modules/iterare/lib/slice.test.d.ts deleted file mode 100644 index 06983f5..0000000 --- a/node_modules/iterare/lib/slice.test.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=slice.test.d.ts.map \ No newline at end of file diff --git a/node_modules/iterare/lib/slice.test.d.ts.map b/node_modules/iterare/lib/slice.test.d.ts.map deleted file mode 100644 index 81bba85..0000000 --- a/node_modules/iterare/lib/slice.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"slice.test.d.ts","sourceRoot":"","sources":["../src/slice.test.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/iterare/lib/slice.test.js.map b/node_modules/iterare/lib/slice.test.js.map deleted file mode 100644 index 5bdbd7c..0000000 --- a/node_modules/iterare/lib/slice.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"slice.test.js","sourceRoot":"","sources":["../src/slice.test.ts"],"names":[],"mappings":";;AAAA,iCAAgC;AAChC,mCAAuC;AAEvC,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC3B,EAAE,CAAC,iEAAiE,EAAE,GAAG,EAAE;QACvE,MAAM,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;QACrE,MAAM,KAAK,GAAG,IAAI,qBAAa,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;QACjD,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACnC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACnC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACnC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IACzC,CAAC,CAAC,CAAA;IACF,EAAE,CAAC,0EAA0E,EAAE,GAAG,EAAE;QAChF,MAAM,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;QAC/C,MAAM,KAAK,GAAG,IAAI,qBAAa,CAAC,UAAU,EAAE,CAAC,CAAC,CAAA;QAC9C,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACnC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACnC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACnC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IACzC,CAAC,CAAC,CAAA;IACF,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;QACrC,MAAM,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;QACrE,MAAM,KAAK,GAAG,IAAI,qBAAa,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;QACjD,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IACzC,CAAC,CAAC,CAAA;IACF,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;QAC3C,MAAM,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;QACrE,MAAM,KAAK,GAAG,IAAI,qBAAa,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;QACjD,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IACzC,CAAC,CAAC,CAAA;IACF,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;QACpD,MAAM,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;QAC/C,MAAM,KAAK,GAAG,IAAI,qBAAa,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;QACjD,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACnC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACnC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACnC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IACzC,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"} \ No newline at end of file diff --git a/node_modules/iterare/lib/utils.d.ts b/node_modules/iterare/lib/utils.d.ts deleted file mode 100644 index 48d7d47..0000000 --- a/node_modules/iterare/lib/utils.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare function isIterator(candidate: any): candidate is Iterator; -export declare function isIterable(candidate: any): candidate is Iterable; -export declare function toIterator(collection: Iterator | Iterable): Iterator; -//# sourceMappingURL=utils.d.ts.map \ No newline at end of file diff --git a/node_modules/iterare/lib/utils.d.ts.map b/node_modules/iterare/lib/utils.d.ts.map deleted file mode 100644 index aea8c0c..0000000 --- a/node_modules/iterare/lib/utils.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,SAAS,EAAE,GAAG,GAAG,SAAS,IAAI,QAAQ,CAAC,GAAG,CAAC,CAErE;AAED,wBAAgB,UAAU,CAAC,SAAS,EAAE,GAAG,GAAG,SAAS,IAAI,QAAQ,CAAC,GAAG,CAAC,CAErE;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAQhF"} \ No newline at end of file diff --git a/node_modules/iterare/lib/utils.js b/node_modules/iterare/lib/utils.js deleted file mode 100644 index fb87984..0000000 --- a/node_modules/iterare/lib/utils.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function isIterator(candidate) { - return typeof candidate === 'object' && candidate !== null && typeof candidate.next === 'function'; -} -exports.isIterator = isIterator; -function isIterable(candidate) { - return typeof candidate === 'object' && candidate !== null && typeof candidate[Symbol.iterator] === 'function'; -} -exports.isIterable = isIterable; -function toIterator(collection) { - if (isIterator(collection)) { - return collection; - } - if (isIterable(collection)) { - return collection[Symbol.iterator](); - } - throw new Error('Passed collection is neither an Iterator nor an Iterable'); -} -exports.toIterator = toIterator; -//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/node_modules/iterare/lib/utils.js.map b/node_modules/iterare/lib/utils.js.map deleted file mode 100644 index 31d950d..0000000 --- a/node_modules/iterare/lib/utils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;AAAA,SAAgB,UAAU,CAAC,SAAc;IACrC,OAAO,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,KAAK,IAAI,IAAI,OAAO,SAAS,CAAC,IAAI,KAAK,UAAU,CAAA;AACtG,CAAC;AAFD,gCAEC;AAED,SAAgB,UAAU,CAAC,SAAc;IACrC,OAAO,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,KAAK,IAAI,IAAI,OAAO,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,UAAU,CAAA;AAClH,CAAC;AAFD,gCAEC;AAED,SAAgB,UAAU,CAAI,UAAqC;IAC/D,IAAI,UAAU,CAAC,UAAU,CAAC,EAAE;QACxB,OAAO,UAAU,CAAA;KACpB;IACD,IAAI,UAAU,CAAC,UAAU,CAAC,EAAE;QACxB,OAAO,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;KACvC;IACD,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAA;AAC/E,CAAC;AARD,gCAQC"} \ No newline at end of file diff --git a/node_modules/iterare/lib/utils.test.d.ts b/node_modules/iterare/lib/utils.test.d.ts deleted file mode 100644 index c727c85..0000000 --- a/node_modules/iterare/lib/utils.test.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=utils.test.d.ts.map \ No newline at end of file diff --git a/node_modules/iterare/lib/utils.test.d.ts.map b/node_modules/iterare/lib/utils.test.d.ts.map deleted file mode 100644 index 074bacb..0000000 --- a/node_modules/iterare/lib/utils.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.test.d.ts","sourceRoot":"","sources":["../src/utils.test.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/iterare/lib/utils.test.js.map b/node_modules/iterare/lib/utils.test.js.map deleted file mode 100644 index 124c233..0000000 --- a/node_modules/iterare/lib/utils.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.test.js","sourceRoot":"","sources":["../src/utils.test.ts"],"names":[],"mappings":";;AAAA,iCAAgC;AAChC,mCAA4D;AAE5D,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE;IACnB,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;QACxB,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;YACtD,MAAM,QAAQ,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;YAC7C,MAAM,CAAC,KAAK,CAAC,kBAAU,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAA;QAChD,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;YACjD,MAAM,QAAQ,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;YAC1B,MAAM,QAAQ,GAAG,kBAAU,CAAC,QAAQ,CAAC,CAAA;YACrC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;YACtC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;YACtC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;YACtC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;QAC5C,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,sCAAsC,EAAE,GAAG,EAAE;YAC5C,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE;gBACf,kBAAU,CAAC,GAAU,CAAC,CAAA;YAC1B,CAAC,CAAC,CAAA;QACN,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;IACF,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;QACxB,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;YAC1C,MAAM,QAAQ,GAAG;gBACb,IAAI;oBACA,WAAW;gBACf,CAAC;aACJ,CAAA;YACD,MAAM,CAAC,KAAK,CAAC,kBAAU,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAA;QAC5C,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;YAC3C,MAAM,QAAQ,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;YAC1B,MAAM,CAAC,KAAK,CAAC,kBAAU,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,CAAA;QAC7C,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE;YACpC,MAAM,CAAC,KAAK,CAAC,kBAAU,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,CAAA;QACzC,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;YACxC,MAAM,CAAC,KAAK,CAAC,kBAAU,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,CAAA;QACzC,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,wDAAwD,EAAE,GAAG,EAAE;YAC9D,MAAM,CAAC,KAAK,CAAC,kBAAU,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,CAAA;QAClD,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;IACF,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;QACxB,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;YAC1C,MAAM,QAAQ,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;YAC1B,MAAM,CAAC,KAAK,CAAC,kBAAU,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAA;QAC5C,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;YAC3C,MAAM,QAAQ,GAAG;gBACb,IAAI;oBACA,WAAW;gBACf,CAAC;aACJ,CAAA;YACD,MAAM,CAAC,KAAK,CAAC,kBAAU,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,CAAA;QAC7C,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE;YACpC,MAAM,CAAC,KAAK,CAAC,kBAAU,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,CAAA;QACzC,CAAC,CAAC,CAAA;QACF,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;YACxC,MAAM,CAAC,KAAK,CAAC,kBAAU,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,CAAA;QACzC,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"} \ No newline at end of file diff --git a/node_modules/iterare/lib/zip.d.ts b/node_modules/iterare/lib/zip.d.ts deleted file mode 100644 index d8fab70..0000000 --- a/node_modules/iterare/lib/zip.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare class ZipIterator implements Iterator<[A, B]> { - private a; - private b; - constructor(a: Iterator, b: Iterator); - next(): IteratorResult<[A, B]>; -} -//# sourceMappingURL=zip.d.ts.map \ No newline at end of file diff --git a/node_modules/iterare/lib/zip.d.ts.map b/node_modules/iterare/lib/zip.d.ts.map deleted file mode 100644 index c8efa00..0000000 --- a/node_modules/iterare/lib/zip.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"zip.d.ts","sourceRoot":"","sources":["../src/zip.ts"],"names":[],"mappings":"AAAA,qBAAa,WAAW,CAAC,CAAC,EAAE,CAAC,CAAE,YAAW,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC1C,OAAO,CAAC,CAAC;IAAe,OAAO,CAAC,CAAC;gBAAzB,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAU,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE1D,IAAI,IAAI,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAWjC"} \ No newline at end of file diff --git a/node_modules/iterare/lib/zip.js b/node_modules/iterare/lib/zip.js deleted file mode 100644 index 1aa1b4d..0000000 --- a/node_modules/iterare/lib/zip.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -class ZipIterator { - constructor(a, b) { - this.a = a; - this.b = b; - } - next() { - const a = this.a.next(); - if (a.done) { - return { done: true }; - } - const b = this.b.next(); - if (b.done) { - return { done: true }; - } - return { value: [a.value, b.value], done: false }; - } -} -exports.ZipIterator = ZipIterator; -//# sourceMappingURL=zip.js.map \ No newline at end of file diff --git a/node_modules/iterare/lib/zip.js.map b/node_modules/iterare/lib/zip.js.map deleted file mode 100644 index b09d78b..0000000 --- a/node_modules/iterare/lib/zip.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"zip.js","sourceRoot":"","sources":["../src/zip.ts"],"names":[],"mappings":";;AAAA,MAAa,WAAW;IACpB,YAAoB,CAAc,EAAU,CAAc;QAAtC,MAAC,GAAD,CAAC,CAAa;QAAU,MAAC,GAAD,CAAC,CAAa;IAAG,CAAC;IAE9D,IAAI;QACA,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;QACvB,IAAI,CAAC,CAAC,IAAI,EAAE;YACR,OAAO,EAAE,IAAI,EAAE,IAAI,EAA4B,CAAA;SAClD;QACD,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;QACvB,IAAI,CAAC,CAAC,IAAI,EAAE;YACR,OAAO,EAAE,IAAI,EAAE,IAAI,EAA4B,CAAA;SAClD;QACD,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAA;IACrD,CAAC;CACJ;AAdD,kCAcC"} \ No newline at end of file diff --git a/node_modules/iterare/lib/zip.test.d.ts b/node_modules/iterare/lib/zip.test.d.ts deleted file mode 100644 index 60a3652..0000000 --- a/node_modules/iterare/lib/zip.test.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=zip.test.d.ts.map \ No newline at end of file diff --git a/node_modules/iterare/lib/zip.test.d.ts.map b/node_modules/iterare/lib/zip.test.d.ts.map deleted file mode 100644 index 4524922..0000000 --- a/node_modules/iterare/lib/zip.test.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"zip.test.d.ts","sourceRoot":"","sources":["../src/zip.test.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/iterare/lib/zip.test.js.map b/node_modules/iterare/lib/zip.test.js.map deleted file mode 100644 index 8877e89..0000000 --- a/node_modules/iterare/lib/zip.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"zip.test.js","sourceRoot":"","sources":["../src/zip.test.ts"],"names":[],"mappings":";;AAAA,iCAAgC;AAChC,+BAAmC;AAEnC,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IACzB,EAAE,CAAC,sDAAsD,EAAE,GAAG,EAAE;QAC5D,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;QACzC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;QACjD,MAAM,MAAM,GAAG,IAAI,iBAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QACpC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAA;QAC/C,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAA;QAC/C,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAA;QAC/C,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAA;QAC/C,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IAC1C,CAAC,CAAC,CAAA;IACF,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;QACtD,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;QACnC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;QACjD,MAAM,MAAM,GAAG,IAAI,iBAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QACpC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAA;QAC/C,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAA;QAC/C,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IAC1C,CAAC,CAAC,CAAA;IACF,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;QACtD,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;QACzC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;QACvC,MAAM,MAAM,GAAG,IAAI,iBAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QACpC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAA;QAC/C,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAA;QAC/C,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IAC1C,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"} \ No newline at end of file diff --git a/node_modules/iterare/package.json b/node_modules/iterare/package.json deleted file mode 100644 index c2a6f7a..0000000 --- a/node_modules/iterare/package.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "name": "iterare", - "version": "1.2.1", - "description": "Array methods for ES6 Iterators", - "main": "lib/index.js", - "typings": "lib/index.d.ts", - "engines": { - "node": ">=6" - }, - "scripts": { - "tslint": "tslint -c tslint.json -p tsconfig.json 'src/**/*.ts'", - "prettier": "prettier --write --list-different '**/*.{ts,json,js,md,yml}'", - "test": "nyc mocha", - "build": "tsc", - "watch": "tsc -w", - "typedoc": "typedoc --out typedoc --tsconfig tsconfig.json --ignoreCompilerErrors --mode file --excludeExternals src", - "semantic-release": "semantic-release" - }, - "nyc": { - "all": true, - "extension": [ - ".ts" - ], - "include": [ - "src/**/*.ts" - ], - "exclude": [ - "src/**/*.test.ts" - ], - "reporter": [ - "text", - "json" - ] - }, - "mocha": { - "spec": "src/**/*.test.ts", - "require": "ts-node/register" - }, - "husky": { - "hooks": { - "commit-msg": "commitlint -e $HUSKY_GIT_PARAMS" - } - }, - "commitlint": { - "extends": [ - "@commitlint/config-conventional" - ] - }, - "keywords": [ - "iterator", - "iteration", - "functional", - "es6", - "collection", - "array", - "map", - "set", - "filter", - "reduce", - "flatten", - "concat", - "every", - "some" - ], - "author": "Felix Becker ", - "repository": { - "type": "git", - "url": "https://github.com/felixfbecker/iterare" - }, - "bugs": { - "url": "https://github.com/felixfbecker/iterare/issues" - }, - "license": "ISC", - "devDependencies": { - "@commitlint/cli": "^8.0.0", - "@commitlint/config-conventional": "^8.0.0", - "@reactivex/ix-es2015-cjs": "^2.5.3", - "@types/benchmark": "^1.0.31", - "@types/lodash": "^4.14.134", - "@types/mocha": "^5.2.7", - "@types/node": "^7.10.6", - "benchmark": "^2.1.4", - "husky": "^2.4.0", - "ix": "^2.5.3", - "lodash": "^4.17.11", - "mocha": "^6.1.4", - "nyc": "^14.1.1", - "prettier": "^1.18.1", - "rxjs": "^6.5.2", - "semantic-release": "^15.13.12", - "ts-node": "^8.2.0", - "tslint": "^5.17.0", - "tslint-config-prettier": "^1.18.0", - "typedoc": "^0.14.2", - "typescript": "~3.5.1" - } -} diff --git a/node_modules/json5/LICENSE.md b/node_modules/json5/LICENSE.md deleted file mode 100644 index 2171aca..0000000 --- a/node_modules/json5/LICENSE.md +++ /dev/null @@ -1,23 +0,0 @@ -MIT License - -Copyright (c) 2012-2018 Aseem Kishore, and [others]. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -[others]: https://github.com/json5/json5/contributors diff --git a/node_modules/json5/README.md b/node_modules/json5/README.md deleted file mode 100644 index 00ee793..0000000 --- a/node_modules/json5/README.md +++ /dev/null @@ -1,282 +0,0 @@ -# JSON5 – JSON for Humans - -[![Build Status](https://app.travis-ci.com/json5/json5.svg?branch=main)][Build -Status] [![Coverage -Status](https://coveralls.io/repos/github/json5/json5/badge.svg)][Coverage -Status] - -JSON5 is an extension to the popular [JSON] file format that aims to be -easier to **write and maintain _by hand_ (e.g. for config files)**. -It is _not intended_ to be used for machine-to-machine communication. -(Keep using JSON or other file formats for that. 🙂) - -JSON5 was started in 2012, and as of 2022, now gets **[>65M downloads/week](https://www.npmjs.com/package/json5)**, -ranks in the **[top 0.1%](https://gist.github.com/anvaka/8e8fa57c7ee1350e3491)** of the most depended-upon packages on npm, -and has been adopted by major projects like -**[Chromium](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/runtime_enabled_features.json5;drc=5de823b36e68fd99009a29281b17bc3a1d6b329c), -[Next.js](https://github.com/vercel/next.js/blob/b88f20c90bf4659b8ad5cb2a27956005eac2c7e8/packages/next/lib/find-config.ts#L43-L46), -[Babel](https://babeljs.io/docs/en/config-files#supported-file-extensions), -[Retool](https://community.retool.com/t/i-am-attempting-to-append-several-text-fields-to-a-google-sheet-but-receiving-a-json5-invalid-character-error/7626), -[WebStorm](https://www.jetbrains.com/help/webstorm/json.html), -and [more](https://github.com/json5/json5/wiki/In-the-Wild)**. -It's also natively supported on **[Apple platforms](https://developer.apple.com/documentation/foundation/jsondecoder/3766916-allowsjson5)** -like **MacOS** and **iOS**. - -Formally, the **[JSON5 Data Interchange Format](https://spec.json5.org/)** is a superset of JSON -(so valid JSON files will always be valid JSON5 files) -that expands its syntax to include some productions from [ECMAScript 5.1] (ES5). -It's also a strict _subset_ of ES5, so valid JSON5 files will always be valid ES5. - -This JavaScript library is a reference implementation for JSON5 parsing and serialization, -and is directly used in many of the popular projects mentioned above -(where e.g. extreme performance isn't necessary), -but others have created [many other libraries](https://github.com/json5/json5/wiki/In-the-Wild) -across many other platforms. - -[Build Status]: https://app.travis-ci.com/json5/json5 - -[Coverage Status]: https://coveralls.io/github/json5/json5 - -[JSON]: https://tools.ietf.org/html/rfc7159 - -[ECMAScript 5.1]: https://www.ecma-international.org/ecma-262/5.1/ - -## Summary of Features -The following ECMAScript 5.1 features, which are not supported in JSON, have -been extended to JSON5. - -### Objects -- Object keys may be an ECMAScript 5.1 _[IdentifierName]_. -- Objects may have a single trailing comma. - -### Arrays -- Arrays may have a single trailing comma. - -### Strings -- Strings may be single quoted. -- Strings may span multiple lines by escaping new line characters. -- Strings may include character escapes. - -### Numbers -- Numbers may be hexadecimal. -- Numbers may have a leading or trailing decimal point. -- Numbers may be [IEEE 754] positive infinity, negative infinity, and NaN. -- Numbers may begin with an explicit plus sign. - -### Comments -- Single and multi-line comments are allowed. - -### White Space -- Additional white space characters are allowed. - -[IdentifierName]: https://www.ecma-international.org/ecma-262/5.1/#sec-7.6 - -[IEEE 754]: http://ieeexplore.ieee.org/servlet/opac?punumber=4610933 - -## Example -Kitchen-sink example: - -```js -{ - // comments - unquoted: 'and you can quote me on that', - singleQuotes: 'I can use "double quotes" here', - lineBreaks: "Look, Mom! \ -No \\n's!", - hexadecimal: 0xdecaf, - leadingDecimalPoint: .8675309, andTrailing: 8675309., - positiveSign: +1, - trailingComma: 'in objects', andIn: ['arrays',], - "backwardsCompatible": "with JSON", -} -``` - -A more real-world example is [this config file](https://github.com/chromium/chromium/blob/feb3c9f670515edf9a88f185301cbd7794ee3e52/third_party/blink/renderer/platform/runtime_enabled_features.json5) -from the Chromium/Blink project. - -## Specification -For a detailed explanation of the JSON5 format, please read the [official -specification](https://json5.github.io/json5-spec/). - -## Installation and Usage -### Node.js -```sh -npm install json5 -``` - -#### CommonJS -```js -const JSON5 = require('json5') -``` - -#### Modules -```js -import JSON5 from 'json5' -``` - -### Browsers -#### UMD -```html - - -``` - -#### Modules -```html - -``` - -## API -The JSON5 API is compatible with the [JSON API]. - -[JSON API]: -https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON - -### JSON5.parse() -Parses a JSON5 string, constructing the JavaScript value or object described by -the string. An optional reviver function can be provided to perform a -transformation on the resulting object before it is returned. - -#### Syntax - JSON5.parse(text[, reviver]) - -#### Parameters -- `text`: The string to parse as JSON5. -- `reviver`: If a function, this prescribes how the value originally produced by - parsing is transformed, before being returned. - -#### Return value -The object corresponding to the given JSON5 text. - -### JSON5.stringify() -Converts a JavaScript value to a JSON5 string, optionally replacing values if a -replacer function is specified, or optionally including only the specified -properties if a replacer array is specified. - -#### Syntax - JSON5.stringify(value[, replacer[, space]]) - JSON5.stringify(value[, options]) - -#### Parameters -- `value`: The value to convert to a JSON5 string. -- `replacer`: A function that alters the behavior of the stringification - process, or an array of String and Number objects that serve as a whitelist - for selecting/filtering the properties of the value object to be included in - the JSON5 string. If this value is null or not provided, all properties of the - object are included in the resulting JSON5 string. -- `space`: A String or Number object that's used to insert white space into the - output JSON5 string for readability purposes. If this is a Number, it - indicates the number of space characters to use as white space; this number is - capped at 10 (if it is greater, the value is just 10). Values less than 1 - indicate that no space should be used. If this is a String, the string (or the - first 10 characters of the string, if it's longer than that) is used as white - space. If this parameter is not provided (or is null), no white space is used. - If white space is used, trailing commas will be used in objects and arrays. -- `options`: An object with the following properties: - - `replacer`: Same as the `replacer` parameter. - - `space`: Same as the `space` parameter. - - `quote`: A String representing the quote character to use when serializing - strings. - -#### Return value -A JSON5 string representing the value. - -### Node.js `require()` JSON5 files -When using Node.js, you can `require()` JSON5 files by adding the following -statement. - -```js -require('json5/lib/register') -``` - -Then you can load a JSON5 file with a Node.js `require()` statement. For -example: - -```js -const config = require('./config.json5') -``` - -## CLI -Since JSON is more widely used than JSON5, this package includes a CLI for -converting JSON5 to JSON and for validating the syntax of JSON5 documents. - -### Installation -```sh -npm install --global json5 -``` - -### Usage -```sh -json5 [options] -``` - -If `` is not provided, then STDIN is used. - -#### Options: -- `-s`, `--space`: The number of spaces to indent or `t` for tabs -- `-o`, `--out-file [file]`: Output to the specified file, otherwise STDOUT -- `-v`, `--validate`: Validate JSON5 but do not output JSON -- `-V`, `--version`: Output the version number -- `-h`, `--help`: Output usage information - -## Contributing -### Development -```sh -git clone https://github.com/json5/json5 -cd json5 -npm install -``` - -When contributing code, please write relevant tests and run `npm test` and `npm -run lint` before submitting pull requests. Please use an editor that supports -[EditorConfig](http://editorconfig.org/). - -### Issues -To report bugs or request features regarding the JSON5 **data format**, -please submit an issue to the official -**[_specification_ repository](https://github.com/json5/json5-spec)**. - -Note that we will never add any features that make JSON5 incompatible with ES5; -that compatibility is a fundamental premise of JSON5. - -To report bugs or request features regarding this **JavaScript implementation** -of JSON5, please submit an issue to **_this_ repository**. - -### Security Vulnerabilities and Disclosures -To report a security vulnerability, please follow the follow the guidelines -described in our [security policy](./SECURITY.md). - -## License -MIT. See [LICENSE.md](./LICENSE.md) for details. - -## Credits -[Aseem Kishore](https://github.com/aseemk) founded this project. -He wrote a [blog post](https://aseemk.substack.com/p/ignore-the-f-ing-haters-json5) -about the journey and lessons learned 10 years in. - -[Michael Bolin](http://bolinfest.com/) independently arrived at and published -some of these same ideas with awesome explanations and detail. Recommended -reading: [Suggested Improvements to JSON](http://bolinfest.com/essays/json.html) - -[Douglas Crockford](http://www.crockford.com/) of course designed and built -JSON, but his state machine diagrams on the [JSON website](http://json.org/), as -cheesy as it may sound, gave us motivation and confidence that building a new -parser to implement these ideas was within reach! The original -implementation of JSON5 was also modeled directly off of Doug’s open-source -[json_parse.js] parser. We’re grateful for that clean and well-documented -code. - -[json_parse.js]: -https://github.com/douglascrockford/JSON-js/blob/03157639c7a7cddd2e9f032537f346f1a87c0f6d/json_parse.js - -[Max Nanasy](https://github.com/MaxNanasy) has been an early and prolific -supporter, contributing multiple patches and ideas. - -[Andrew Eisenberg](https://github.com/aeisenberg) contributed the original -`stringify` method. - -[Jordan Tucker](https://github.com/jordanbtucker) has aligned JSON5 more closely -with ES5, wrote the official JSON5 specification, completely rewrote the -codebase from the ground up, and is actively maintaining this project. diff --git a/node_modules/json5/dist/index.js b/node_modules/json5/dist/index.js deleted file mode 100644 index bf86533..0000000 --- a/node_modules/json5/dist/index.js +++ /dev/null @@ -1,1737 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global.JSON5 = factory()); -}(this, (function () { 'use strict'; - - function createCommonjsModule(fn, module) { - return module = { exports: {} }, fn(module, module.exports), module.exports; - } - - var _global = createCommonjsModule(function (module) { - // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 - var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self - // eslint-disable-next-line no-new-func - : Function('return this')(); - if (typeof __g == 'number') { __g = global; } // eslint-disable-line no-undef - }); - - var _core = createCommonjsModule(function (module) { - var core = module.exports = { version: '2.6.5' }; - if (typeof __e == 'number') { __e = core; } // eslint-disable-line no-undef - }); - var _core_1 = _core.version; - - var _isObject = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; - }; - - var _anObject = function (it) { - if (!_isObject(it)) { throw TypeError(it + ' is not an object!'); } - return it; - }; - - var _fails = function (exec) { - try { - return !!exec(); - } catch (e) { - return true; - } - }; - - // Thank's IE8 for his funny defineProperty - var _descriptors = !_fails(function () { - return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; - }); - - var document = _global.document; - // typeof document.createElement is 'object' in old IE - var is = _isObject(document) && _isObject(document.createElement); - var _domCreate = function (it) { - return is ? document.createElement(it) : {}; - }; - - var _ie8DomDefine = !_descriptors && !_fails(function () { - return Object.defineProperty(_domCreate('div'), 'a', { get: function () { return 7; } }).a != 7; - }); - - // 7.1.1 ToPrimitive(input [, PreferredType]) - - // instead of the ES6 spec version, we didn't implement @@toPrimitive case - // and the second argument - flag - preferred type is a string - var _toPrimitive = function (it, S) { - if (!_isObject(it)) { return it; } - var fn, val; - if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) { return val; } - if (typeof (fn = it.valueOf) == 'function' && !_isObject(val = fn.call(it))) { return val; } - if (!S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) { return val; } - throw TypeError("Can't convert object to primitive value"); - }; - - var dP = Object.defineProperty; - - var f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) { - _anObject(O); - P = _toPrimitive(P, true); - _anObject(Attributes); - if (_ie8DomDefine) { try { - return dP(O, P, Attributes); - } catch (e) { /* empty */ } } - if ('get' in Attributes || 'set' in Attributes) { throw TypeError('Accessors not supported!'); } - if ('value' in Attributes) { O[P] = Attributes.value; } - return O; - }; - - var _objectDp = { - f: f - }; - - var _propertyDesc = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value - }; - }; - - var _hide = _descriptors ? function (object, key, value) { - return _objectDp.f(object, key, _propertyDesc(1, value)); - } : function (object, key, value) { - object[key] = value; - return object; - }; - - var hasOwnProperty = {}.hasOwnProperty; - var _has = function (it, key) { - return hasOwnProperty.call(it, key); - }; - - var id = 0; - var px = Math.random(); - var _uid = function (key) { - return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); - }; - - var _library = false; - - var _shared = createCommonjsModule(function (module) { - var SHARED = '__core-js_shared__'; - var store = _global[SHARED] || (_global[SHARED] = {}); - - (module.exports = function (key, value) { - return store[key] || (store[key] = value !== undefined ? value : {}); - })('versions', []).push({ - version: _core.version, - mode: _library ? 'pure' : 'global', - copyright: '© 2019 Denis Pushkarev (zloirock.ru)' - }); - }); - - var _functionToString = _shared('native-function-to-string', Function.toString); - - var _redefine = createCommonjsModule(function (module) { - var SRC = _uid('src'); - - var TO_STRING = 'toString'; - var TPL = ('' + _functionToString).split(TO_STRING); - - _core.inspectSource = function (it) { - return _functionToString.call(it); - }; - - (module.exports = function (O, key, val, safe) { - var isFunction = typeof val == 'function'; - if (isFunction) { _has(val, 'name') || _hide(val, 'name', key); } - if (O[key] === val) { return; } - if (isFunction) { _has(val, SRC) || _hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); } - if (O === _global) { - O[key] = val; - } else if (!safe) { - delete O[key]; - _hide(O, key, val); - } else if (O[key]) { - O[key] = val; - } else { - _hide(O, key, val); - } - // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative - })(Function.prototype, TO_STRING, function toString() { - return typeof this == 'function' && this[SRC] || _functionToString.call(this); - }); - }); - - var _aFunction = function (it) { - if (typeof it != 'function') { throw TypeError(it + ' is not a function!'); } - return it; - }; - - // optional / simple context binding - - var _ctx = function (fn, that, length) { - _aFunction(fn); - if (that === undefined) { return fn; } - switch (length) { - case 1: return function (a) { - return fn.call(that, a); - }; - case 2: return function (a, b) { - return fn.call(that, a, b); - }; - case 3: return function (a, b, c) { - return fn.call(that, a, b, c); - }; - } - return function (/* ...args */) { - return fn.apply(that, arguments); - }; - }; - - var PROTOTYPE = 'prototype'; - - var $export = function (type, name, source) { - var IS_FORCED = type & $export.F; - var IS_GLOBAL = type & $export.G; - var IS_STATIC = type & $export.S; - var IS_PROTO = type & $export.P; - var IS_BIND = type & $export.B; - var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] || (_global[name] = {}) : (_global[name] || {})[PROTOTYPE]; - var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {}); - var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); - var key, own, out, exp; - if (IS_GLOBAL) { source = name; } - for (key in source) { - // contains in native - own = !IS_FORCED && target && target[key] !== undefined; - // export native or passed - out = (own ? target : source)[key]; - // bind timers to global for call from export context - exp = IS_BIND && own ? _ctx(out, _global) : IS_PROTO && typeof out == 'function' ? _ctx(Function.call, out) : out; - // extend global - if (target) { _redefine(target, key, out, type & $export.U); } - // export - if (exports[key] != out) { _hide(exports, key, exp); } - if (IS_PROTO && expProto[key] != out) { expProto[key] = out; } - } - }; - _global.core = _core; - // type bitmap - $export.F = 1; // forced - $export.G = 2; // global - $export.S = 4; // static - $export.P = 8; // proto - $export.B = 16; // bind - $export.W = 32; // wrap - $export.U = 64; // safe - $export.R = 128; // real proto method for `library` - var _export = $export; - - // 7.1.4 ToInteger - var ceil = Math.ceil; - var floor = Math.floor; - var _toInteger = function (it) { - return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); - }; - - // 7.2.1 RequireObjectCoercible(argument) - var _defined = function (it) { - if (it == undefined) { throw TypeError("Can't call method on " + it); } - return it; - }; - - // true -> String#at - // false -> String#codePointAt - var _stringAt = function (TO_STRING) { - return function (that, pos) { - var s = String(_defined(that)); - var i = _toInteger(pos); - var l = s.length; - var a, b; - if (i < 0 || i >= l) { return TO_STRING ? '' : undefined; } - a = s.charCodeAt(i); - return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff - ? TO_STRING ? s.charAt(i) : a - : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; - }; - }; - - var $at = _stringAt(false); - _export(_export.P, 'String', { - // 21.1.3.3 String.prototype.codePointAt(pos) - codePointAt: function codePointAt(pos) { - return $at(this, pos); - } - }); - - var codePointAt = _core.String.codePointAt; - - var max = Math.max; - var min = Math.min; - var _toAbsoluteIndex = function (index, length) { - index = _toInteger(index); - return index < 0 ? max(index + length, 0) : min(index, length); - }; - - var fromCharCode = String.fromCharCode; - var $fromCodePoint = String.fromCodePoint; - - // length should be 1, old FF problem - _export(_export.S + _export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { - // 21.1.2.2 String.fromCodePoint(...codePoints) - fromCodePoint: function fromCodePoint(x) { - var arguments$1 = arguments; - // eslint-disable-line no-unused-vars - var res = []; - var aLen = arguments.length; - var i = 0; - var code; - while (aLen > i) { - code = +arguments$1[i++]; - if (_toAbsoluteIndex(code, 0x10ffff) !== code) { throw RangeError(code + ' is not a valid code point'); } - res.push(code < 0x10000 - ? fromCharCode(code) - : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) - ); - } return res.join(''); - } - }); - - var fromCodePoint = _core.String.fromCodePoint; - - // This is a generated file. Do not edit. - var Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/; - var ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/; - var ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/; - - var unicode = { - Space_Separator: Space_Separator, - ID_Start: ID_Start, - ID_Continue: ID_Continue - }; - - var util = { - isSpaceSeparator: function isSpaceSeparator (c) { - return typeof c === 'string' && unicode.Space_Separator.test(c) - }, - - isIdStartChar: function isIdStartChar (c) { - return typeof c === 'string' && ( - (c >= 'a' && c <= 'z') || - (c >= 'A' && c <= 'Z') || - (c === '$') || (c === '_') || - unicode.ID_Start.test(c) - ) - }, - - isIdContinueChar: function isIdContinueChar (c) { - return typeof c === 'string' && ( - (c >= 'a' && c <= 'z') || - (c >= 'A' && c <= 'Z') || - (c >= '0' && c <= '9') || - (c === '$') || (c === '_') || - (c === '\u200C') || (c === '\u200D') || - unicode.ID_Continue.test(c) - ) - }, - - isDigit: function isDigit (c) { - return typeof c === 'string' && /[0-9]/.test(c) - }, - - isHexDigit: function isHexDigit (c) { - return typeof c === 'string' && /[0-9A-Fa-f]/.test(c) - }, - }; - - var source; - var parseState; - var stack; - var pos; - var line; - var column; - var token; - var key; - var root; - - var parse = function parse (text, reviver) { - source = String(text); - parseState = 'start'; - stack = []; - pos = 0; - line = 1; - column = 0; - token = undefined; - key = undefined; - root = undefined; - - do { - token = lex(); - - // This code is unreachable. - // if (!parseStates[parseState]) { - // throw invalidParseState() - // } - - parseStates[parseState](); - } while (token.type !== 'eof') - - if (typeof reviver === 'function') { - return internalize({'': root}, '', reviver) - } - - return root - }; - - function internalize (holder, name, reviver) { - var value = holder[name]; - if (value != null && typeof value === 'object') { - if (Array.isArray(value)) { - for (var i = 0; i < value.length; i++) { - var key = String(i); - var replacement = internalize(value, key, reviver); - if (replacement === undefined) { - delete value[key]; - } else { - Object.defineProperty(value, key, { - value: replacement, - writable: true, - enumerable: true, - configurable: true, - }); - } - } - } else { - for (var key$1 in value) { - var replacement$1 = internalize(value, key$1, reviver); - if (replacement$1 === undefined) { - delete value[key$1]; - } else { - Object.defineProperty(value, key$1, { - value: replacement$1, - writable: true, - enumerable: true, - configurable: true, - }); - } - } - } - } - - return reviver.call(holder, name, value) - } - - var lexState; - var buffer; - var doubleQuote; - var sign; - var c; - - function lex () { - lexState = 'default'; - buffer = ''; - doubleQuote = false; - sign = 1; - - for (;;) { - c = peek(); - - // This code is unreachable. - // if (!lexStates[lexState]) { - // throw invalidLexState(lexState) - // } - - var token = lexStates[lexState](); - if (token) { - return token - } - } - } - - function peek () { - if (source[pos]) { - return String.fromCodePoint(source.codePointAt(pos)) - } - } - - function read () { - var c = peek(); - - if (c === '\n') { - line++; - column = 0; - } else if (c) { - column += c.length; - } else { - column++; - } - - if (c) { - pos += c.length; - } - - return c - } - - var lexStates = { - default: function default$1 () { - switch (c) { - case '\t': - case '\v': - case '\f': - case ' ': - case '\u00A0': - case '\uFEFF': - case '\n': - case '\r': - case '\u2028': - case '\u2029': - read(); - return - - case '/': - read(); - lexState = 'comment'; - return - - case undefined: - read(); - return newToken('eof') - } - - if (util.isSpaceSeparator(c)) { - read(); - return - } - - // This code is unreachable. - // if (!lexStates[parseState]) { - // throw invalidLexState(parseState) - // } - - return lexStates[parseState]() - }, - - comment: function comment () { - switch (c) { - case '*': - read(); - lexState = 'multiLineComment'; - return - - case '/': - read(); - lexState = 'singleLineComment'; - return - } - - throw invalidChar(read()) - }, - - multiLineComment: function multiLineComment () { - switch (c) { - case '*': - read(); - lexState = 'multiLineCommentAsterisk'; - return - - case undefined: - throw invalidChar(read()) - } - - read(); - }, - - multiLineCommentAsterisk: function multiLineCommentAsterisk () { - switch (c) { - case '*': - read(); - return - - case '/': - read(); - lexState = 'default'; - return - - case undefined: - throw invalidChar(read()) - } - - read(); - lexState = 'multiLineComment'; - }, - - singleLineComment: function singleLineComment () { - switch (c) { - case '\n': - case '\r': - case '\u2028': - case '\u2029': - read(); - lexState = 'default'; - return - - case undefined: - read(); - return newToken('eof') - } - - read(); - }, - - value: function value () { - switch (c) { - case '{': - case '[': - return newToken('punctuator', read()) - - case 'n': - read(); - literal('ull'); - return newToken('null', null) - - case 't': - read(); - literal('rue'); - return newToken('boolean', true) - - case 'f': - read(); - literal('alse'); - return newToken('boolean', false) - - case '-': - case '+': - if (read() === '-') { - sign = -1; - } - - lexState = 'sign'; - return - - case '.': - buffer = read(); - lexState = 'decimalPointLeading'; - return - - case '0': - buffer = read(); - lexState = 'zero'; - return - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - buffer = read(); - lexState = 'decimalInteger'; - return - - case 'I': - read(); - literal('nfinity'); - return newToken('numeric', Infinity) - - case 'N': - read(); - literal('aN'); - return newToken('numeric', NaN) - - case '"': - case "'": - doubleQuote = (read() === '"'); - buffer = ''; - lexState = 'string'; - return - } - - throw invalidChar(read()) - }, - - identifierNameStartEscape: function identifierNameStartEscape () { - if (c !== 'u') { - throw invalidChar(read()) - } - - read(); - var u = unicodeEscape(); - switch (u) { - case '$': - case '_': - break - - default: - if (!util.isIdStartChar(u)) { - throw invalidIdentifier() - } - - break - } - - buffer += u; - lexState = 'identifierName'; - }, - - identifierName: function identifierName () { - switch (c) { - case '$': - case '_': - case '\u200C': - case '\u200D': - buffer += read(); - return - - case '\\': - read(); - lexState = 'identifierNameEscape'; - return - } - - if (util.isIdContinueChar(c)) { - buffer += read(); - return - } - - return newToken('identifier', buffer) - }, - - identifierNameEscape: function identifierNameEscape () { - if (c !== 'u') { - throw invalidChar(read()) - } - - read(); - var u = unicodeEscape(); - switch (u) { - case '$': - case '_': - case '\u200C': - case '\u200D': - break - - default: - if (!util.isIdContinueChar(u)) { - throw invalidIdentifier() - } - - break - } - - buffer += u; - lexState = 'identifierName'; - }, - - sign: function sign$1 () { - switch (c) { - case '.': - buffer = read(); - lexState = 'decimalPointLeading'; - return - - case '0': - buffer = read(); - lexState = 'zero'; - return - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - buffer = read(); - lexState = 'decimalInteger'; - return - - case 'I': - read(); - literal('nfinity'); - return newToken('numeric', sign * Infinity) - - case 'N': - read(); - literal('aN'); - return newToken('numeric', NaN) - } - - throw invalidChar(read()) - }, - - zero: function zero () { - switch (c) { - case '.': - buffer += read(); - lexState = 'decimalPoint'; - return - - case 'e': - case 'E': - buffer += read(); - lexState = 'decimalExponent'; - return - - case 'x': - case 'X': - buffer += read(); - lexState = 'hexadecimal'; - return - } - - return newToken('numeric', sign * 0) - }, - - decimalInteger: function decimalInteger () { - switch (c) { - case '.': - buffer += read(); - lexState = 'decimalPoint'; - return - - case 'e': - case 'E': - buffer += read(); - lexState = 'decimalExponent'; - return - } - - if (util.isDigit(c)) { - buffer += read(); - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - decimalPointLeading: function decimalPointLeading () { - if (util.isDigit(c)) { - buffer += read(); - lexState = 'decimalFraction'; - return - } - - throw invalidChar(read()) - }, - - decimalPoint: function decimalPoint () { - switch (c) { - case 'e': - case 'E': - buffer += read(); - lexState = 'decimalExponent'; - return - } - - if (util.isDigit(c)) { - buffer += read(); - lexState = 'decimalFraction'; - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - decimalFraction: function decimalFraction () { - switch (c) { - case 'e': - case 'E': - buffer += read(); - lexState = 'decimalExponent'; - return - } - - if (util.isDigit(c)) { - buffer += read(); - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - decimalExponent: function decimalExponent () { - switch (c) { - case '+': - case '-': - buffer += read(); - lexState = 'decimalExponentSign'; - return - } - - if (util.isDigit(c)) { - buffer += read(); - lexState = 'decimalExponentInteger'; - return - } - - throw invalidChar(read()) - }, - - decimalExponentSign: function decimalExponentSign () { - if (util.isDigit(c)) { - buffer += read(); - lexState = 'decimalExponentInteger'; - return - } - - throw invalidChar(read()) - }, - - decimalExponentInteger: function decimalExponentInteger () { - if (util.isDigit(c)) { - buffer += read(); - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - hexadecimal: function hexadecimal () { - if (util.isHexDigit(c)) { - buffer += read(); - lexState = 'hexadecimalInteger'; - return - } - - throw invalidChar(read()) - }, - - hexadecimalInteger: function hexadecimalInteger () { - if (util.isHexDigit(c)) { - buffer += read(); - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - string: function string () { - switch (c) { - case '\\': - read(); - buffer += escape(); - return - - case '"': - if (doubleQuote) { - read(); - return newToken('string', buffer) - } - - buffer += read(); - return - - case "'": - if (!doubleQuote) { - read(); - return newToken('string', buffer) - } - - buffer += read(); - return - - case '\n': - case '\r': - throw invalidChar(read()) - - case '\u2028': - case '\u2029': - separatorChar(c); - break - - case undefined: - throw invalidChar(read()) - } - - buffer += read(); - }, - - start: function start () { - switch (c) { - case '{': - case '[': - return newToken('punctuator', read()) - - // This code is unreachable since the default lexState handles eof. - // case undefined: - // return newToken('eof') - } - - lexState = 'value'; - }, - - beforePropertyName: function beforePropertyName () { - switch (c) { - case '$': - case '_': - buffer = read(); - lexState = 'identifierName'; - return - - case '\\': - read(); - lexState = 'identifierNameStartEscape'; - return - - case '}': - return newToken('punctuator', read()) - - case '"': - case "'": - doubleQuote = (read() === '"'); - lexState = 'string'; - return - } - - if (util.isIdStartChar(c)) { - buffer += read(); - lexState = 'identifierName'; - return - } - - throw invalidChar(read()) - }, - - afterPropertyName: function afterPropertyName () { - if (c === ':') { - return newToken('punctuator', read()) - } - - throw invalidChar(read()) - }, - - beforePropertyValue: function beforePropertyValue () { - lexState = 'value'; - }, - - afterPropertyValue: function afterPropertyValue () { - switch (c) { - case ',': - case '}': - return newToken('punctuator', read()) - } - - throw invalidChar(read()) - }, - - beforeArrayValue: function beforeArrayValue () { - if (c === ']') { - return newToken('punctuator', read()) - } - - lexState = 'value'; - }, - - afterArrayValue: function afterArrayValue () { - switch (c) { - case ',': - case ']': - return newToken('punctuator', read()) - } - - throw invalidChar(read()) - }, - - end: function end () { - // This code is unreachable since it's handled by the default lexState. - // if (c === undefined) { - // read() - // return newToken('eof') - // } - - throw invalidChar(read()) - }, - }; - - function newToken (type, value) { - return { - type: type, - value: value, - line: line, - column: column, - } - } - - function literal (s) { - for (var i = 0, list = s; i < list.length; i += 1) { - var c = list[i]; - - var p = peek(); - - if (p !== c) { - throw invalidChar(read()) - } - - read(); - } - } - - function escape () { - var c = peek(); - switch (c) { - case 'b': - read(); - return '\b' - - case 'f': - read(); - return '\f' - - case 'n': - read(); - return '\n' - - case 'r': - read(); - return '\r' - - case 't': - read(); - return '\t' - - case 'v': - read(); - return '\v' - - case '0': - read(); - if (util.isDigit(peek())) { - throw invalidChar(read()) - } - - return '\0' - - case 'x': - read(); - return hexEscape() - - case 'u': - read(); - return unicodeEscape() - - case '\n': - case '\u2028': - case '\u2029': - read(); - return '' - - case '\r': - read(); - if (peek() === '\n') { - read(); - } - - return '' - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - throw invalidChar(read()) - - case undefined: - throw invalidChar(read()) - } - - return read() - } - - function hexEscape () { - var buffer = ''; - var c = peek(); - - if (!util.isHexDigit(c)) { - throw invalidChar(read()) - } - - buffer += read(); - - c = peek(); - if (!util.isHexDigit(c)) { - throw invalidChar(read()) - } - - buffer += read(); - - return String.fromCodePoint(parseInt(buffer, 16)) - } - - function unicodeEscape () { - var buffer = ''; - var count = 4; - - while (count-- > 0) { - var c = peek(); - if (!util.isHexDigit(c)) { - throw invalidChar(read()) - } - - buffer += read(); - } - - return String.fromCodePoint(parseInt(buffer, 16)) - } - - var parseStates = { - start: function start () { - if (token.type === 'eof') { - throw invalidEOF() - } - - push(); - }, - - beforePropertyName: function beforePropertyName () { - switch (token.type) { - case 'identifier': - case 'string': - key = token.value; - parseState = 'afterPropertyName'; - return - - case 'punctuator': - // This code is unreachable since it's handled by the lexState. - // if (token.value !== '}') { - // throw invalidToken() - // } - - pop(); - return - - case 'eof': - throw invalidEOF() - } - - // This code is unreachable since it's handled by the lexState. - // throw invalidToken() - }, - - afterPropertyName: function afterPropertyName () { - // This code is unreachable since it's handled by the lexState. - // if (token.type !== 'punctuator' || token.value !== ':') { - // throw invalidToken() - // } - - if (token.type === 'eof') { - throw invalidEOF() - } - - parseState = 'beforePropertyValue'; - }, - - beforePropertyValue: function beforePropertyValue () { - if (token.type === 'eof') { - throw invalidEOF() - } - - push(); - }, - - beforeArrayValue: function beforeArrayValue () { - if (token.type === 'eof') { - throw invalidEOF() - } - - if (token.type === 'punctuator' && token.value === ']') { - pop(); - return - } - - push(); - }, - - afterPropertyValue: function afterPropertyValue () { - // This code is unreachable since it's handled by the lexState. - // if (token.type !== 'punctuator') { - // throw invalidToken() - // } - - if (token.type === 'eof') { - throw invalidEOF() - } - - switch (token.value) { - case ',': - parseState = 'beforePropertyName'; - return - - case '}': - pop(); - } - - // This code is unreachable since it's handled by the lexState. - // throw invalidToken() - }, - - afterArrayValue: function afterArrayValue () { - // This code is unreachable since it's handled by the lexState. - // if (token.type !== 'punctuator') { - // throw invalidToken() - // } - - if (token.type === 'eof') { - throw invalidEOF() - } - - switch (token.value) { - case ',': - parseState = 'beforeArrayValue'; - return - - case ']': - pop(); - } - - // This code is unreachable since it's handled by the lexState. - // throw invalidToken() - }, - - end: function end () { - // This code is unreachable since it's handled by the lexState. - // if (token.type !== 'eof') { - // throw invalidToken() - // } - }, - }; - - function push () { - var value; - - switch (token.type) { - case 'punctuator': - switch (token.value) { - case '{': - value = {}; - break - - case '[': - value = []; - break - } - - break - - case 'null': - case 'boolean': - case 'numeric': - case 'string': - value = token.value; - break - - // This code is unreachable. - // default: - // throw invalidToken() - } - - if (root === undefined) { - root = value; - } else { - var parent = stack[stack.length - 1]; - if (Array.isArray(parent)) { - parent.push(value); - } else { - Object.defineProperty(parent, key, { - value: value, - writable: true, - enumerable: true, - configurable: true, - }); - } - } - - if (value !== null && typeof value === 'object') { - stack.push(value); - - if (Array.isArray(value)) { - parseState = 'beforeArrayValue'; - } else { - parseState = 'beforePropertyName'; - } - } else { - var current = stack[stack.length - 1]; - if (current == null) { - parseState = 'end'; - } else if (Array.isArray(current)) { - parseState = 'afterArrayValue'; - } else { - parseState = 'afterPropertyValue'; - } - } - } - - function pop () { - stack.pop(); - - var current = stack[stack.length - 1]; - if (current == null) { - parseState = 'end'; - } else if (Array.isArray(current)) { - parseState = 'afterArrayValue'; - } else { - parseState = 'afterPropertyValue'; - } - } - - // This code is unreachable. - // function invalidParseState () { - // return new Error(`JSON5: invalid parse state '${parseState}'`) - // } - - // This code is unreachable. - // function invalidLexState (state) { - // return new Error(`JSON5: invalid lex state '${state}'`) - // } - - function invalidChar (c) { - if (c === undefined) { - return syntaxError(("JSON5: invalid end of input at " + line + ":" + column)) - } - - return syntaxError(("JSON5: invalid character '" + (formatChar(c)) + "' at " + line + ":" + column)) - } - - function invalidEOF () { - return syntaxError(("JSON5: invalid end of input at " + line + ":" + column)) - } - - // This code is unreachable. - // function invalidToken () { - // if (token.type === 'eof') { - // return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) - // } - - // const c = String.fromCodePoint(token.value.codePointAt(0)) - // return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) - // } - - function invalidIdentifier () { - column -= 5; - return syntaxError(("JSON5: invalid identifier character at " + line + ":" + column)) - } - - function separatorChar (c) { - console.warn(("JSON5: '" + (formatChar(c)) + "' in strings is not valid ECMAScript; consider escaping")); - } - - function formatChar (c) { - var replacements = { - "'": "\\'", - '"': '\\"', - '\\': '\\\\', - '\b': '\\b', - '\f': '\\f', - '\n': '\\n', - '\r': '\\r', - '\t': '\\t', - '\v': '\\v', - '\0': '\\0', - '\u2028': '\\u2028', - '\u2029': '\\u2029', - }; - - if (replacements[c]) { - return replacements[c] - } - - if (c < ' ') { - var hexString = c.charCodeAt(0).toString(16); - return '\\x' + ('00' + hexString).substring(hexString.length) - } - - return c - } - - function syntaxError (message) { - var err = new SyntaxError(message); - err.lineNumber = line; - err.columnNumber = column; - return err - } - - var stringify = function stringify (value, replacer, space) { - var stack = []; - var indent = ''; - var propertyList; - var replacerFunc; - var gap = ''; - var quote; - - if ( - replacer != null && - typeof replacer === 'object' && - !Array.isArray(replacer) - ) { - space = replacer.space; - quote = replacer.quote; - replacer = replacer.replacer; - } - - if (typeof replacer === 'function') { - replacerFunc = replacer; - } else if (Array.isArray(replacer)) { - propertyList = []; - for (var i = 0, list = replacer; i < list.length; i += 1) { - var v = list[i]; - - var item = (void 0); - - if (typeof v === 'string') { - item = v; - } else if ( - typeof v === 'number' || - v instanceof String || - v instanceof Number - ) { - item = String(v); - } - - if (item !== undefined && propertyList.indexOf(item) < 0) { - propertyList.push(item); - } - } - } - - if (space instanceof Number) { - space = Number(space); - } else if (space instanceof String) { - space = String(space); - } - - if (typeof space === 'number') { - if (space > 0) { - space = Math.min(10, Math.floor(space)); - gap = ' '.substr(0, space); - } - } else if (typeof space === 'string') { - gap = space.substr(0, 10); - } - - return serializeProperty('', {'': value}) - - function serializeProperty (key, holder) { - var value = holder[key]; - if (value != null) { - if (typeof value.toJSON5 === 'function') { - value = value.toJSON5(key); - } else if (typeof value.toJSON === 'function') { - value = value.toJSON(key); - } - } - - if (replacerFunc) { - value = replacerFunc.call(holder, key, value); - } - - if (value instanceof Number) { - value = Number(value); - } else if (value instanceof String) { - value = String(value); - } else if (value instanceof Boolean) { - value = value.valueOf(); - } - - switch (value) { - case null: return 'null' - case true: return 'true' - case false: return 'false' - } - - if (typeof value === 'string') { - return quoteString(value, false) - } - - if (typeof value === 'number') { - return String(value) - } - - if (typeof value === 'object') { - return Array.isArray(value) ? serializeArray(value) : serializeObject(value) - } - - return undefined - } - - function quoteString (value) { - var quotes = { - "'": 0.1, - '"': 0.2, - }; - - var replacements = { - "'": "\\'", - '"': '\\"', - '\\': '\\\\', - '\b': '\\b', - '\f': '\\f', - '\n': '\\n', - '\r': '\\r', - '\t': '\\t', - '\v': '\\v', - '\0': '\\0', - '\u2028': '\\u2028', - '\u2029': '\\u2029', - }; - - var product = ''; - - for (var i = 0; i < value.length; i++) { - var c = value[i]; - switch (c) { - case "'": - case '"': - quotes[c]++; - product += c; - continue - - case '\0': - if (util.isDigit(value[i + 1])) { - product += '\\x00'; - continue - } - } - - if (replacements[c]) { - product += replacements[c]; - continue - } - - if (c < ' ') { - var hexString = c.charCodeAt(0).toString(16); - product += '\\x' + ('00' + hexString).substring(hexString.length); - continue - } - - product += c; - } - - var quoteChar = quote || Object.keys(quotes).reduce(function (a, b) { return (quotes[a] < quotes[b]) ? a : b; }); - - product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar]); - - return quoteChar + product + quoteChar - } - - function serializeObject (value) { - if (stack.indexOf(value) >= 0) { - throw TypeError('Converting circular structure to JSON5') - } - - stack.push(value); - - var stepback = indent; - indent = indent + gap; - - var keys = propertyList || Object.keys(value); - var partial = []; - for (var i = 0, list = keys; i < list.length; i += 1) { - var key = list[i]; - - var propertyString = serializeProperty(key, value); - if (propertyString !== undefined) { - var member = serializeKey(key) + ':'; - if (gap !== '') { - member += ' '; - } - member += propertyString; - partial.push(member); - } - } - - var final; - if (partial.length === 0) { - final = '{}'; - } else { - var properties; - if (gap === '') { - properties = partial.join(','); - final = '{' + properties + '}'; - } else { - var separator = ',\n' + indent; - properties = partial.join(separator); - final = '{\n' + indent + properties + ',\n' + stepback + '}'; - } - } - - stack.pop(); - indent = stepback; - return final - } - - function serializeKey (key) { - if (key.length === 0) { - return quoteString(key, true) - } - - var firstChar = String.fromCodePoint(key.codePointAt(0)); - if (!util.isIdStartChar(firstChar)) { - return quoteString(key, true) - } - - for (var i = firstChar.length; i < key.length; i++) { - if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) { - return quoteString(key, true) - } - } - - return key - } - - function serializeArray (value) { - if (stack.indexOf(value) >= 0) { - throw TypeError('Converting circular structure to JSON5') - } - - stack.push(value); - - var stepback = indent; - indent = indent + gap; - - var partial = []; - for (var i = 0; i < value.length; i++) { - var propertyString = serializeProperty(String(i), value); - partial.push((propertyString !== undefined) ? propertyString : 'null'); - } - - var final; - if (partial.length === 0) { - final = '[]'; - } else { - if (gap === '') { - var properties = partial.join(','); - final = '[' + properties + ']'; - } else { - var separator = ',\n' + indent; - var properties$1 = partial.join(separator); - final = '[\n' + indent + properties$1 + ',\n' + stepback + ']'; - } - } - - stack.pop(); - indent = stepback; - return final - } - }; - - var JSON5 = { - parse: parse, - stringify: stringify, - }; - - var lib = JSON5; - - var es5 = lib; - - return es5; - -}))); diff --git a/node_modules/json5/dist/index.min.js b/node_modules/json5/dist/index.min.js deleted file mode 100644 index ddce3e2..0000000 --- a/node_modules/json5/dist/index.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(u,D){"object"==typeof exports&&"undefined"!=typeof module?module.exports=D():"function"==typeof define&&define.amd?define(D):u.JSON5=D()}(this,function(){"use strict";function u(u,D){return u(D={exports:{}},D.exports),D.exports}var D=u(function(u){var D=u.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=D)}),e=u(function(u){var D=u.exports={version:"2.6.5"};"number"==typeof __e&&(__e=D)}),r=(e.version,function(u){return"object"==typeof u?null!==u:"function"==typeof u}),t=function(u){if(!r(u))throw TypeError(u+" is not an object!");return u},n=function(u){try{return!!u()}catch(u){return!0}},F=!n(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),C=D.document,A=r(C)&&r(C.createElement),i=!F&&!n(function(){return 7!=Object.defineProperty((u="div",A?C.createElement(u):{}),"a",{get:function(){return 7}}).a;var u}),E=Object.defineProperty,o={f:F?Object.defineProperty:function(u,D,e){if(t(u),D=function(u,D){if(!r(u))return u;var e,t;if(D&&"function"==typeof(e=u.toString)&&!r(t=e.call(u)))return t;if("function"==typeof(e=u.valueOf)&&!r(t=e.call(u)))return t;if(!D&&"function"==typeof(e=u.toString)&&!r(t=e.call(u)))return t;throw TypeError("Can't convert object to primitive value")}(D,!0),t(e),i)try{return E(u,D,e)}catch(u){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(u[D]=e.value),u}},a=F?function(u,D,e){return o.f(u,D,function(u,D){return{enumerable:!(1&u),configurable:!(2&u),writable:!(4&u),value:D}}(1,e))}:function(u,D,e){return u[D]=e,u},c={}.hasOwnProperty,B=function(u,D){return c.call(u,D)},s=0,f=Math.random(),l=u(function(u){var r=D["__core-js_shared__"]||(D["__core-js_shared__"]={});(u.exports=function(u,D){return r[u]||(r[u]=void 0!==D?D:{})})("versions",[]).push({version:e.version,mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})("native-function-to-string",Function.toString),d=u(function(u){var r,t="Symbol(".concat(void 0===(r="src")?"":r,")_",(++s+f).toString(36)),n=(""+l).split("toString");e.inspectSource=function(u){return l.call(u)},(u.exports=function(u,e,r,F){var C="function"==typeof r;C&&(B(r,"name")||a(r,"name",e)),u[e]!==r&&(C&&(B(r,t)||a(r,t,u[e]?""+u[e]:n.join(String(e)))),u===D?u[e]=r:F?u[e]?u[e]=r:a(u,e,r):(delete u[e],a(u,e,r)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[t]||l.call(this)})}),v=function(u,D,e){if(function(u){if("function"!=typeof u)throw TypeError(u+" is not a function!")}(u),void 0===D)return u;switch(e){case 1:return function(e){return u.call(D,e)};case 2:return function(e,r){return u.call(D,e,r)};case 3:return function(e,r,t){return u.call(D,e,r,t)}}return function(){return u.apply(D,arguments)}},p=function(u,r,t){var n,F,C,A,i=u&p.F,E=u&p.G,o=u&p.S,c=u&p.P,B=u&p.B,s=E?D:o?D[r]||(D[r]={}):(D[r]||{}).prototype,f=E?e:e[r]||(e[r]={}),l=f.prototype||(f.prototype={});for(n in E&&(t=r),t)C=((F=!i&&s&&void 0!==s[n])?s:t)[n],A=B&&F?v(C,D):c&&"function"==typeof C?v(Function.call,C):C,s&&d(s,n,C,u&p.U),f[n]!=C&&a(f,n,A),c&&l[n]!=C&&(l[n]=C)};D.core=e,p.F=1,p.G=2,p.S=4,p.P=8,p.B=16,p.W=32,p.U=64,p.R=128;var h,m=p,g=Math.ceil,y=Math.floor,w=function(u){return isNaN(u=+u)?0:(u>0?y:g)(u)},b=(h=!1,function(u,D){var e,r,t=String(function(u){if(null==u)throw TypeError("Can't call method on "+u);return u}(u)),n=w(D),F=t.length;return n<0||n>=F?h?"":void 0:(e=t.charCodeAt(n))<55296||e>56319||n+1===F||(r=t.charCodeAt(n+1))<56320||r>57343?h?t.charAt(n):e:h?t.slice(n,n+2):r-56320+(e-55296<<10)+65536});m(m.P,"String",{codePointAt:function(u){return b(this,u)}});e.String.codePointAt;var S=Math.max,x=Math.min,N=String.fromCharCode,P=String.fromCodePoint;m(m.S+m.F*(!!P&&1!=P.length),"String",{fromCodePoint:function(u){for(var D,e,r,t=arguments,n=[],F=arguments.length,C=0;F>C;){if(D=+t[C++],r=1114111,((e=w(e=D))<0?S(e+r,0):x(e,r))!==D)throw RangeError(D+" is not a valid code point");n.push(D<65536?N(D):N(55296+((D-=65536)>>10),D%1024+56320))}return n.join("")}});e.String.fromCodePoint;var _,O,j,I,V,J,M,k,L,T,z,H,$,R,G={Space_Separator:/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},U={isSpaceSeparator:function(u){return"string"==typeof u&&G.Space_Separator.test(u)},isIdStartChar:function(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||G.ID_Start.test(u))},isIdContinueChar:function(u){return"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||"‌"===u||"‍"===u||G.ID_Continue.test(u))},isDigit:function(u){return"string"==typeof u&&/[0-9]/.test(u)},isHexDigit:function(u){return"string"==typeof u&&/[0-9A-Fa-f]/.test(u)}};function Z(){for(T="default",z="",H=!1,$=1;;){R=q();var u=X[T]();if(u)return u}}function q(){if(_[I])return String.fromCodePoint(_.codePointAt(I))}function W(){var u=q();return"\n"===u?(V++,J=0):u?J+=u.length:J++,u&&(I+=u.length),u}var X={default:function(){switch(R){case"\t":case"\v":case"\f":case" ":case" ":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":return void W();case"/":return W(),void(T="comment");case void 0:return W(),K("eof")}if(!U.isSpaceSeparator(R))return X[O]();W()},comment:function(){switch(R){case"*":return W(),void(T="multiLineComment");case"/":return W(),void(T="singleLineComment")}throw ru(W())},multiLineComment:function(){switch(R){case"*":return W(),void(T="multiLineCommentAsterisk");case void 0:throw ru(W())}W()},multiLineCommentAsterisk:function(){switch(R){case"*":return void W();case"/":return W(),void(T="default");case void 0:throw ru(W())}W(),T="multiLineComment"},singleLineComment:function(){switch(R){case"\n":case"\r":case"\u2028":case"\u2029":return W(),void(T="default");case void 0:return W(),K("eof")}W()},value:function(){switch(R){case"{":case"[":return K("punctuator",W());case"n":return W(),Q("ull"),K("null",null);case"t":return W(),Q("rue"),K("boolean",!0);case"f":return W(),Q("alse"),K("boolean",!1);case"-":case"+":return"-"===W()&&($=-1),void(T="sign");case".":return z=W(),void(T="decimalPointLeading");case"0":return z=W(),void(T="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return z=W(),void(T="decimalInteger");case"I":return W(),Q("nfinity"),K("numeric",1/0);case"N":return W(),Q("aN"),K("numeric",NaN);case'"':case"'":return H='"'===W(),z="",void(T="string")}throw ru(W())},identifierNameStartEscape:function(){if("u"!==R)throw ru(W());W();var u=Y();switch(u){case"$":case"_":break;default:if(!U.isIdStartChar(u))throw nu()}z+=u,T="identifierName"},identifierName:function(){switch(R){case"$":case"_":case"‌":case"‍":return void(z+=W());case"\\":return W(),void(T="identifierNameEscape")}if(!U.isIdContinueChar(R))return K("identifier",z);z+=W()},identifierNameEscape:function(){if("u"!==R)throw ru(W());W();var u=Y();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!U.isIdContinueChar(u))throw nu()}z+=u,T="identifierName"},sign:function(){switch(R){case".":return z=W(),void(T="decimalPointLeading");case"0":return z=W(),void(T="zero");case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return z=W(),void(T="decimalInteger");case"I":return W(),Q("nfinity"),K("numeric",$*(1/0));case"N":return W(),Q("aN"),K("numeric",NaN)}throw ru(W())},zero:function(){switch(R){case".":return z+=W(),void(T="decimalPoint");case"e":case"E":return z+=W(),void(T="decimalExponent");case"x":case"X":return z+=W(),void(T="hexadecimal")}return K("numeric",0*$)},decimalInteger:function(){switch(R){case".":return z+=W(),void(T="decimalPoint");case"e":case"E":return z+=W(),void(T="decimalExponent")}if(!U.isDigit(R))return K("numeric",$*Number(z));z+=W()},decimalPointLeading:function(){if(U.isDigit(R))return z+=W(),void(T="decimalFraction");throw ru(W())},decimalPoint:function(){switch(R){case"e":case"E":return z+=W(),void(T="decimalExponent")}return U.isDigit(R)?(z+=W(),void(T="decimalFraction")):K("numeric",$*Number(z))},decimalFraction:function(){switch(R){case"e":case"E":return z+=W(),void(T="decimalExponent")}if(!U.isDigit(R))return K("numeric",$*Number(z));z+=W()},decimalExponent:function(){switch(R){case"+":case"-":return z+=W(),void(T="decimalExponentSign")}if(U.isDigit(R))return z+=W(),void(T="decimalExponentInteger");throw ru(W())},decimalExponentSign:function(){if(U.isDigit(R))return z+=W(),void(T="decimalExponentInteger");throw ru(W())},decimalExponentInteger:function(){if(!U.isDigit(R))return K("numeric",$*Number(z));z+=W()},hexadecimal:function(){if(U.isHexDigit(R))return z+=W(),void(T="hexadecimalInteger");throw ru(W())},hexadecimalInteger:function(){if(!U.isHexDigit(R))return K("numeric",$*Number(z));z+=W()},string:function(){switch(R){case"\\":return W(),void(z+=function(){switch(q()){case"b":return W(),"\b";case"f":return W(),"\f";case"n":return W(),"\n";case"r":return W(),"\r";case"t":return W(),"\t";case"v":return W(),"\v";case"0":if(W(),U.isDigit(q()))throw ru(W());return"\0";case"x":return W(),function(){var u="",D=q();if(!U.isHexDigit(D))throw ru(W());if(u+=W(),D=q(),!U.isHexDigit(D))throw ru(W());return u+=W(),String.fromCodePoint(parseInt(u,16))}();case"u":return W(),Y();case"\n":case"\u2028":case"\u2029":return W(),"";case"\r":return W(),"\n"===q()&&W(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case void 0:throw ru(W())}return W()}());case'"':return H?(W(),K("string",z)):void(z+=W());case"'":return H?void(z+=W()):(W(),K("string",z));case"\n":case"\r":throw ru(W());case"\u2028":case"\u2029":!function(u){console.warn("JSON5: '"+Fu(u)+"' in strings is not valid ECMAScript; consider escaping")}(R);break;case void 0:throw ru(W())}z+=W()},start:function(){switch(R){case"{":case"[":return K("punctuator",W())}T="value"},beforePropertyName:function(){switch(R){case"$":case"_":return z=W(),void(T="identifierName");case"\\":return W(),void(T="identifierNameStartEscape");case"}":return K("punctuator",W());case'"':case"'":return H='"'===W(),void(T="string")}if(U.isIdStartChar(R))return z+=W(),void(T="identifierName");throw ru(W())},afterPropertyName:function(){if(":"===R)return K("punctuator",W());throw ru(W())},beforePropertyValue:function(){T="value"},afterPropertyValue:function(){switch(R){case",":case"}":return K("punctuator",W())}throw ru(W())},beforeArrayValue:function(){if("]"===R)return K("punctuator",W());T="value"},afterArrayValue:function(){switch(R){case",":case"]":return K("punctuator",W())}throw ru(W())},end:function(){throw ru(W())}};function K(u,D){return{type:u,value:D,line:V,column:J}}function Q(u){for(var D=0,e=u;D0;){var e=q();if(!U.isHexDigit(e))throw ru(W());u+=W()}return String.fromCodePoint(parseInt(u,16))}var uu={start:function(){if("eof"===M.type)throw tu();Du()},beforePropertyName:function(){switch(M.type){case"identifier":case"string":return k=M.value,void(O="afterPropertyName");case"punctuator":return void eu();case"eof":throw tu()}},afterPropertyName:function(){if("eof"===M.type)throw tu();O="beforePropertyValue"},beforePropertyValue:function(){if("eof"===M.type)throw tu();Du()},beforeArrayValue:function(){if("eof"===M.type)throw tu();"punctuator"!==M.type||"]"!==M.value?Du():eu()},afterPropertyValue:function(){if("eof"===M.type)throw tu();switch(M.value){case",":return void(O="beforePropertyName");case"}":eu()}},afterArrayValue:function(){if("eof"===M.type)throw tu();switch(M.value){case",":return void(O="beforeArrayValue");case"]":eu()}},end:function(){}};function Du(){var u;switch(M.type){case"punctuator":switch(M.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=M.value}if(void 0===L)L=u;else{var D=j[j.length-1];Array.isArray(D)?D.push(u):Object.defineProperty(D,k,{value:u,writable:!0,enumerable:!0,configurable:!0})}if(null!==u&&"object"==typeof u)j.push(u),O=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{var e=j[j.length-1];O=null==e?"end":Array.isArray(e)?"afterArrayValue":"afterPropertyValue"}}function eu(){j.pop();var u=j[j.length-1];O=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}function ru(u){return Cu(void 0===u?"JSON5: invalid end of input at "+V+":"+J:"JSON5: invalid character '"+Fu(u)+"' at "+V+":"+J)}function tu(){return Cu("JSON5: invalid end of input at "+V+":"+J)}function nu(){return Cu("JSON5: invalid identifier character at "+V+":"+(J-=5))}function Fu(u){var D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){var e=u.charCodeAt(0).toString(16);return"\\x"+("00"+e).substring(e.length)}return u}function Cu(u){var D=new SyntaxError(u);return D.lineNumber=V,D.columnNumber=J,D}return{parse:function(u,D){_=String(u),O="start",j=[],I=0,V=1,J=0,M=void 0,k=void 0,L=void 0;do{M=Z(),uu[O]()}while("eof"!==M.type);return"function"==typeof D?function u(D,e,r){var t=D[e];if(null!=t&&"object"==typeof t)if(Array.isArray(t))for(var n=0;n0&&(e=Math.min(10,Math.floor(e)),A=" ".substr(0,e)):"string"==typeof e&&(A=e.substr(0,10)),c("",{"":u});function c(u,D){var e=D[u];switch(null!=e&&("function"==typeof e.toJSON5?e=e.toJSON5(u):"function"==typeof e.toJSON&&(e=e.toJSON(u))),t&&(e=t.call(D,u,e)),e instanceof Number?e=Number(e):e instanceof String?e=String(e):e instanceof Boolean&&(e=e.valueOf()),e){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof e?B(e):"number"==typeof e?String(e):"object"==typeof e?Array.isArray(e)?function(u){if(F.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");F.push(u);var D=C;C+=A;for(var e,r=[],t=0;t=0)throw TypeError("Converting circular structure to JSON5");F.push(u);var D=C;C+=A;for(var e,t,n=r||Object.keys(u),i=[],E=0,o=n;E"string"==typeof u&&unicode.Space_Separator.test(u),isIdStartChar:u=>"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||"$"===u||"_"===u||unicode.ID_Start.test(u)),isIdContinueChar:u=>"string"==typeof u&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||"$"===u||"_"===u||"‌"===u||"‍"===u||unicode.ID_Continue.test(u)),isDigit:u=>"string"==typeof u&&/[0-9]/.test(u),isHexDigit:u=>"string"==typeof u&&/[0-9A-Fa-f]/.test(u)};let source,parseState,stack,pos,line,column,token,key,root;var parse=function(u,D){source=String(u),parseState="start",stack=[],pos=0,line=1,column=0,token=void 0,key=void 0,root=void 0;do{token=lex(),parseStates[parseState]()}while("eof"!==token.type);return"function"==typeof D?internalize({"":root},"",D):root};function internalize(u,D,e){const r=u[D];if(null!=r&&"object"==typeof r)if(Array.isArray(r))for(let u=0;u0;){const D=peek();if(!util.isHexDigit(D))throw invalidChar(read());u+=read()}return String.fromCodePoint(parseInt(u,16))}const parseStates={start(){if("eof"===token.type)throw invalidEOF();push()},beforePropertyName(){switch(token.type){case"identifier":case"string":return key=token.value,void(parseState="afterPropertyName");case"punctuator":return void pop();case"eof":throw invalidEOF()}},afterPropertyName(){if("eof"===token.type)throw invalidEOF();parseState="beforePropertyValue"},beforePropertyValue(){if("eof"===token.type)throw invalidEOF();push()},beforeArrayValue(){if("eof"===token.type)throw invalidEOF();"punctuator"!==token.type||"]"!==token.value?push():pop()},afterPropertyValue(){if("eof"===token.type)throw invalidEOF();switch(token.value){case",":return void(parseState="beforePropertyName");case"}":pop()}},afterArrayValue(){if("eof"===token.type)throw invalidEOF();switch(token.value){case",":return void(parseState="beforeArrayValue");case"]":pop()}},end(){}};function push(){let u;switch(token.type){case"punctuator":switch(token.value){case"{":u={};break;case"[":u=[]}break;case"null":case"boolean":case"numeric":case"string":u=token.value}if(void 0===root)root=u;else{const D=stack[stack.length-1];Array.isArray(D)?D.push(u):Object.defineProperty(D,key,{value:u,writable:!0,enumerable:!0,configurable:!0})}if(null!==u&&"object"==typeof u)stack.push(u),parseState=Array.isArray(u)?"beforeArrayValue":"beforePropertyName";else{const u=stack[stack.length-1];parseState=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}}function pop(){stack.pop();const u=stack[stack.length-1];parseState=null==u?"end":Array.isArray(u)?"afterArrayValue":"afterPropertyValue"}function invalidChar(u){return syntaxError(void 0===u?`JSON5: invalid end of input at ${line}:${column}`:`JSON5: invalid character '${formatChar(u)}' at ${line}:${column}`)}function invalidEOF(){return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)}function invalidIdentifier(){return syntaxError(`JSON5: invalid identifier character at ${line}:${column-=5}`)}function separatorChar(u){console.warn(`JSON5: '${formatChar(u)}' in strings is not valid ECMAScript; consider escaping`)}function formatChar(u){const D={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(D[u])return D[u];if(u<" "){const D=u.charCodeAt(0).toString(16);return"\\x"+("00"+D).substring(D.length)}return u}function syntaxError(u){const D=new SyntaxError(u);return D.lineNumber=line,D.columnNumber=column,D}var stringify=function(u,D,e){const r=[];let t,F,C,a="",A="";if(null==D||"object"!=typeof D||Array.isArray(D)||(e=D.space,C=D.quote,D=D.replacer),"function"==typeof D)F=D;else if(Array.isArray(D)){t=[];for(const u of D){let D;"string"==typeof u?D=u:("number"==typeof u||u instanceof String||u instanceof Number)&&(D=String(u)),void 0!==D&&t.indexOf(D)<0&&t.push(D)}}return e instanceof Number?e=Number(e):e instanceof String&&(e=String(e)),"number"==typeof e?e>0&&(e=Math.min(10,Math.floor(e)),A=" ".substr(0,e)):"string"==typeof e&&(A=e.substr(0,10)),n("",{"":u});function n(u,D){let e=D[u];switch(null!=e&&("function"==typeof e.toJSON5?e=e.toJSON5(u):"function"==typeof e.toJSON&&(e=e.toJSON(u))),F&&(e=F.call(D,u,e)),e instanceof Number?e=Number(e):e instanceof String?e=String(e):e instanceof Boolean&&(e=e.valueOf()),e){case null:return"null";case!0:return"true";case!1:return"false"}return"string"==typeof e?E(e):"number"==typeof e?String(e):"object"==typeof e?Array.isArray(e)?function(u){if(r.indexOf(u)>=0)throw TypeError("Converting circular structure to JSON5");r.push(u);let D=a;a+=A;let e,t=[];for(let D=0;D=0)throw TypeError("Converting circular structure to JSON5");r.push(u);let D=a;a+=A;let e,F=t||Object.keys(u),C=[];for(const D of F){const e=n(D,u);if(void 0!==e){let u=i(D)+":";""!==A&&(u+=" "),u+=e,C.push(u)}}if(0===C.length)e="{}";else{let u;if(""===A)u=C.join(","),e="{"+u+"}";else{let r=",\n"+a;u=C.join(r),e="{\n"+a+u+",\n"+D+"}"}}return r.pop(),a=D,e}(e):void 0}function E(u){const D={"'":.1,'"':.2},e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let r="";for(let t=0;tD[u]= 'a' && c <= 'z') || - (c >= 'A' && c <= 'Z') || - (c === '$') || (c === '_') || - unicode.ID_Start.test(c) - ) - }, - - isIdContinueChar (c) { - return typeof c === 'string' && ( - (c >= 'a' && c <= 'z') || - (c >= 'A' && c <= 'Z') || - (c >= '0' && c <= '9') || - (c === '$') || (c === '_') || - (c === '\u200C') || (c === '\u200D') || - unicode.ID_Continue.test(c) - ) - }, - - isDigit (c) { - return typeof c === 'string' && /[0-9]/.test(c) - }, - - isHexDigit (c) { - return typeof c === 'string' && /[0-9A-Fa-f]/.test(c) - }, -}; - -let source; -let parseState; -let stack; -let pos; -let line; -let column; -let token; -let key; -let root; - -var parse = function parse (text, reviver) { - source = String(text); - parseState = 'start'; - stack = []; - pos = 0; - line = 1; - column = 0; - token = undefined; - key = undefined; - root = undefined; - - do { - token = lex(); - - // This code is unreachable. - // if (!parseStates[parseState]) { - // throw invalidParseState() - // } - - parseStates[parseState](); - } while (token.type !== 'eof') - - if (typeof reviver === 'function') { - return internalize({'': root}, '', reviver) - } - - return root -}; - -function internalize (holder, name, reviver) { - const value = holder[name]; - if (value != null && typeof value === 'object') { - if (Array.isArray(value)) { - for (let i = 0; i < value.length; i++) { - const key = String(i); - const replacement = internalize(value, key, reviver); - if (replacement === undefined) { - delete value[key]; - } else { - Object.defineProperty(value, key, { - value: replacement, - writable: true, - enumerable: true, - configurable: true, - }); - } - } - } else { - for (const key in value) { - const replacement = internalize(value, key, reviver); - if (replacement === undefined) { - delete value[key]; - } else { - Object.defineProperty(value, key, { - value: replacement, - writable: true, - enumerable: true, - configurable: true, - }); - } - } - } - } - - return reviver.call(holder, name, value) -} - -let lexState; -let buffer; -let doubleQuote; -let sign; -let c; - -function lex () { - lexState = 'default'; - buffer = ''; - doubleQuote = false; - sign = 1; - - for (;;) { - c = peek(); - - // This code is unreachable. - // if (!lexStates[lexState]) { - // throw invalidLexState(lexState) - // } - - const token = lexStates[lexState](); - if (token) { - return token - } - } -} - -function peek () { - if (source[pos]) { - return String.fromCodePoint(source.codePointAt(pos)) - } -} - -function read () { - const c = peek(); - - if (c === '\n') { - line++; - column = 0; - } else if (c) { - column += c.length; - } else { - column++; - } - - if (c) { - pos += c.length; - } - - return c -} - -const lexStates = { - default () { - switch (c) { - case '\t': - case '\v': - case '\f': - case ' ': - case '\u00A0': - case '\uFEFF': - case '\n': - case '\r': - case '\u2028': - case '\u2029': - read(); - return - - case '/': - read(); - lexState = 'comment'; - return - - case undefined: - read(); - return newToken('eof') - } - - if (util.isSpaceSeparator(c)) { - read(); - return - } - - // This code is unreachable. - // if (!lexStates[parseState]) { - // throw invalidLexState(parseState) - // } - - return lexStates[parseState]() - }, - - comment () { - switch (c) { - case '*': - read(); - lexState = 'multiLineComment'; - return - - case '/': - read(); - lexState = 'singleLineComment'; - return - } - - throw invalidChar(read()) - }, - - multiLineComment () { - switch (c) { - case '*': - read(); - lexState = 'multiLineCommentAsterisk'; - return - - case undefined: - throw invalidChar(read()) - } - - read(); - }, - - multiLineCommentAsterisk () { - switch (c) { - case '*': - read(); - return - - case '/': - read(); - lexState = 'default'; - return - - case undefined: - throw invalidChar(read()) - } - - read(); - lexState = 'multiLineComment'; - }, - - singleLineComment () { - switch (c) { - case '\n': - case '\r': - case '\u2028': - case '\u2029': - read(); - lexState = 'default'; - return - - case undefined: - read(); - return newToken('eof') - } - - read(); - }, - - value () { - switch (c) { - case '{': - case '[': - return newToken('punctuator', read()) - - case 'n': - read(); - literal('ull'); - return newToken('null', null) - - case 't': - read(); - literal('rue'); - return newToken('boolean', true) - - case 'f': - read(); - literal('alse'); - return newToken('boolean', false) - - case '-': - case '+': - if (read() === '-') { - sign = -1; - } - - lexState = 'sign'; - return - - case '.': - buffer = read(); - lexState = 'decimalPointLeading'; - return - - case '0': - buffer = read(); - lexState = 'zero'; - return - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - buffer = read(); - lexState = 'decimalInteger'; - return - - case 'I': - read(); - literal('nfinity'); - return newToken('numeric', Infinity) - - case 'N': - read(); - literal('aN'); - return newToken('numeric', NaN) - - case '"': - case "'": - doubleQuote = (read() === '"'); - buffer = ''; - lexState = 'string'; - return - } - - throw invalidChar(read()) - }, - - identifierNameStartEscape () { - if (c !== 'u') { - throw invalidChar(read()) - } - - read(); - const u = unicodeEscape(); - switch (u) { - case '$': - case '_': - break - - default: - if (!util.isIdStartChar(u)) { - throw invalidIdentifier() - } - - break - } - - buffer += u; - lexState = 'identifierName'; - }, - - identifierName () { - switch (c) { - case '$': - case '_': - case '\u200C': - case '\u200D': - buffer += read(); - return - - case '\\': - read(); - lexState = 'identifierNameEscape'; - return - } - - if (util.isIdContinueChar(c)) { - buffer += read(); - return - } - - return newToken('identifier', buffer) - }, - - identifierNameEscape () { - if (c !== 'u') { - throw invalidChar(read()) - } - - read(); - const u = unicodeEscape(); - switch (u) { - case '$': - case '_': - case '\u200C': - case '\u200D': - break - - default: - if (!util.isIdContinueChar(u)) { - throw invalidIdentifier() - } - - break - } - - buffer += u; - lexState = 'identifierName'; - }, - - sign () { - switch (c) { - case '.': - buffer = read(); - lexState = 'decimalPointLeading'; - return - - case '0': - buffer = read(); - lexState = 'zero'; - return - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - buffer = read(); - lexState = 'decimalInteger'; - return - - case 'I': - read(); - literal('nfinity'); - return newToken('numeric', sign * Infinity) - - case 'N': - read(); - literal('aN'); - return newToken('numeric', NaN) - } - - throw invalidChar(read()) - }, - - zero () { - switch (c) { - case '.': - buffer += read(); - lexState = 'decimalPoint'; - return - - case 'e': - case 'E': - buffer += read(); - lexState = 'decimalExponent'; - return - - case 'x': - case 'X': - buffer += read(); - lexState = 'hexadecimal'; - return - } - - return newToken('numeric', sign * 0) - }, - - decimalInteger () { - switch (c) { - case '.': - buffer += read(); - lexState = 'decimalPoint'; - return - - case 'e': - case 'E': - buffer += read(); - lexState = 'decimalExponent'; - return - } - - if (util.isDigit(c)) { - buffer += read(); - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - decimalPointLeading () { - if (util.isDigit(c)) { - buffer += read(); - lexState = 'decimalFraction'; - return - } - - throw invalidChar(read()) - }, - - decimalPoint () { - switch (c) { - case 'e': - case 'E': - buffer += read(); - lexState = 'decimalExponent'; - return - } - - if (util.isDigit(c)) { - buffer += read(); - lexState = 'decimalFraction'; - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - decimalFraction () { - switch (c) { - case 'e': - case 'E': - buffer += read(); - lexState = 'decimalExponent'; - return - } - - if (util.isDigit(c)) { - buffer += read(); - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - decimalExponent () { - switch (c) { - case '+': - case '-': - buffer += read(); - lexState = 'decimalExponentSign'; - return - } - - if (util.isDigit(c)) { - buffer += read(); - lexState = 'decimalExponentInteger'; - return - } - - throw invalidChar(read()) - }, - - decimalExponentSign () { - if (util.isDigit(c)) { - buffer += read(); - lexState = 'decimalExponentInteger'; - return - } - - throw invalidChar(read()) - }, - - decimalExponentInteger () { - if (util.isDigit(c)) { - buffer += read(); - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - hexadecimal () { - if (util.isHexDigit(c)) { - buffer += read(); - lexState = 'hexadecimalInteger'; - return - } - - throw invalidChar(read()) - }, - - hexadecimalInteger () { - if (util.isHexDigit(c)) { - buffer += read(); - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - string () { - switch (c) { - case '\\': - read(); - buffer += escape(); - return - - case '"': - if (doubleQuote) { - read(); - return newToken('string', buffer) - } - - buffer += read(); - return - - case "'": - if (!doubleQuote) { - read(); - return newToken('string', buffer) - } - - buffer += read(); - return - - case '\n': - case '\r': - throw invalidChar(read()) - - case '\u2028': - case '\u2029': - separatorChar(c); - break - - case undefined: - throw invalidChar(read()) - } - - buffer += read(); - }, - - start () { - switch (c) { - case '{': - case '[': - return newToken('punctuator', read()) - - // This code is unreachable since the default lexState handles eof. - // case undefined: - // return newToken('eof') - } - - lexState = 'value'; - }, - - beforePropertyName () { - switch (c) { - case '$': - case '_': - buffer = read(); - lexState = 'identifierName'; - return - - case '\\': - read(); - lexState = 'identifierNameStartEscape'; - return - - case '}': - return newToken('punctuator', read()) - - case '"': - case "'": - doubleQuote = (read() === '"'); - lexState = 'string'; - return - } - - if (util.isIdStartChar(c)) { - buffer += read(); - lexState = 'identifierName'; - return - } - - throw invalidChar(read()) - }, - - afterPropertyName () { - if (c === ':') { - return newToken('punctuator', read()) - } - - throw invalidChar(read()) - }, - - beforePropertyValue () { - lexState = 'value'; - }, - - afterPropertyValue () { - switch (c) { - case ',': - case '}': - return newToken('punctuator', read()) - } - - throw invalidChar(read()) - }, - - beforeArrayValue () { - if (c === ']') { - return newToken('punctuator', read()) - } - - lexState = 'value'; - }, - - afterArrayValue () { - switch (c) { - case ',': - case ']': - return newToken('punctuator', read()) - } - - throw invalidChar(read()) - }, - - end () { - // This code is unreachable since it's handled by the default lexState. - // if (c === undefined) { - // read() - // return newToken('eof') - // } - - throw invalidChar(read()) - }, -}; - -function newToken (type, value) { - return { - type, - value, - line, - column, - } -} - -function literal (s) { - for (const c of s) { - const p = peek(); - - if (p !== c) { - throw invalidChar(read()) - } - - read(); - } -} - -function escape () { - const c = peek(); - switch (c) { - case 'b': - read(); - return '\b' - - case 'f': - read(); - return '\f' - - case 'n': - read(); - return '\n' - - case 'r': - read(); - return '\r' - - case 't': - read(); - return '\t' - - case 'v': - read(); - return '\v' - - case '0': - read(); - if (util.isDigit(peek())) { - throw invalidChar(read()) - } - - return '\0' - - case 'x': - read(); - return hexEscape() - - case 'u': - read(); - return unicodeEscape() - - case '\n': - case '\u2028': - case '\u2029': - read(); - return '' - - case '\r': - read(); - if (peek() === '\n') { - read(); - } - - return '' - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - throw invalidChar(read()) - - case undefined: - throw invalidChar(read()) - } - - return read() -} - -function hexEscape () { - let buffer = ''; - let c = peek(); - - if (!util.isHexDigit(c)) { - throw invalidChar(read()) - } - - buffer += read(); - - c = peek(); - if (!util.isHexDigit(c)) { - throw invalidChar(read()) - } - - buffer += read(); - - return String.fromCodePoint(parseInt(buffer, 16)) -} - -function unicodeEscape () { - let buffer = ''; - let count = 4; - - while (count-- > 0) { - const c = peek(); - if (!util.isHexDigit(c)) { - throw invalidChar(read()) - } - - buffer += read(); - } - - return String.fromCodePoint(parseInt(buffer, 16)) -} - -const parseStates = { - start () { - if (token.type === 'eof') { - throw invalidEOF() - } - - push(); - }, - - beforePropertyName () { - switch (token.type) { - case 'identifier': - case 'string': - key = token.value; - parseState = 'afterPropertyName'; - return - - case 'punctuator': - // This code is unreachable since it's handled by the lexState. - // if (token.value !== '}') { - // throw invalidToken() - // } - - pop(); - return - - case 'eof': - throw invalidEOF() - } - - // This code is unreachable since it's handled by the lexState. - // throw invalidToken() - }, - - afterPropertyName () { - // This code is unreachable since it's handled by the lexState. - // if (token.type !== 'punctuator' || token.value !== ':') { - // throw invalidToken() - // } - - if (token.type === 'eof') { - throw invalidEOF() - } - - parseState = 'beforePropertyValue'; - }, - - beforePropertyValue () { - if (token.type === 'eof') { - throw invalidEOF() - } - - push(); - }, - - beforeArrayValue () { - if (token.type === 'eof') { - throw invalidEOF() - } - - if (token.type === 'punctuator' && token.value === ']') { - pop(); - return - } - - push(); - }, - - afterPropertyValue () { - // This code is unreachable since it's handled by the lexState. - // if (token.type !== 'punctuator') { - // throw invalidToken() - // } - - if (token.type === 'eof') { - throw invalidEOF() - } - - switch (token.value) { - case ',': - parseState = 'beforePropertyName'; - return - - case '}': - pop(); - } - - // This code is unreachable since it's handled by the lexState. - // throw invalidToken() - }, - - afterArrayValue () { - // This code is unreachable since it's handled by the lexState. - // if (token.type !== 'punctuator') { - // throw invalidToken() - // } - - if (token.type === 'eof') { - throw invalidEOF() - } - - switch (token.value) { - case ',': - parseState = 'beforeArrayValue'; - return - - case ']': - pop(); - } - - // This code is unreachable since it's handled by the lexState. - // throw invalidToken() - }, - - end () { - // This code is unreachable since it's handled by the lexState. - // if (token.type !== 'eof') { - // throw invalidToken() - // } - }, -}; - -function push () { - let value; - - switch (token.type) { - case 'punctuator': - switch (token.value) { - case '{': - value = {}; - break - - case '[': - value = []; - break - } - - break - - case 'null': - case 'boolean': - case 'numeric': - case 'string': - value = token.value; - break - - // This code is unreachable. - // default: - // throw invalidToken() - } - - if (root === undefined) { - root = value; - } else { - const parent = stack[stack.length - 1]; - if (Array.isArray(parent)) { - parent.push(value); - } else { - Object.defineProperty(parent, key, { - value, - writable: true, - enumerable: true, - configurable: true, - }); - } - } - - if (value !== null && typeof value === 'object') { - stack.push(value); - - if (Array.isArray(value)) { - parseState = 'beforeArrayValue'; - } else { - parseState = 'beforePropertyName'; - } - } else { - const current = stack[stack.length - 1]; - if (current == null) { - parseState = 'end'; - } else if (Array.isArray(current)) { - parseState = 'afterArrayValue'; - } else { - parseState = 'afterPropertyValue'; - } - } -} - -function pop () { - stack.pop(); - - const current = stack[stack.length - 1]; - if (current == null) { - parseState = 'end'; - } else if (Array.isArray(current)) { - parseState = 'afterArrayValue'; - } else { - parseState = 'afterPropertyValue'; - } -} - -// This code is unreachable. -// function invalidParseState () { -// return new Error(`JSON5: invalid parse state '${parseState}'`) -// } - -// This code is unreachable. -// function invalidLexState (state) { -// return new Error(`JSON5: invalid lex state '${state}'`) -// } - -function invalidChar (c) { - if (c === undefined) { - return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) - } - - return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) -} - -function invalidEOF () { - return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) -} - -// This code is unreachable. -// function invalidToken () { -// if (token.type === 'eof') { -// return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) -// } - -// const c = String.fromCodePoint(token.value.codePointAt(0)) -// return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) -// } - -function invalidIdentifier () { - column -= 5; - return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`) -} - -function separatorChar (c) { - console.warn(`JSON5: '${formatChar(c)}' in strings is not valid ECMAScript; consider escaping`); -} - -function formatChar (c) { - const replacements = { - "'": "\\'", - '"': '\\"', - '\\': '\\\\', - '\b': '\\b', - '\f': '\\f', - '\n': '\\n', - '\r': '\\r', - '\t': '\\t', - '\v': '\\v', - '\0': '\\0', - '\u2028': '\\u2028', - '\u2029': '\\u2029', - }; - - if (replacements[c]) { - return replacements[c] - } - - if (c < ' ') { - const hexString = c.charCodeAt(0).toString(16); - return '\\x' + ('00' + hexString).substring(hexString.length) - } - - return c -} - -function syntaxError (message) { - const err = new SyntaxError(message); - err.lineNumber = line; - err.columnNumber = column; - return err -} - -var stringify = function stringify (value, replacer, space) { - const stack = []; - let indent = ''; - let propertyList; - let replacerFunc; - let gap = ''; - let quote; - - if ( - replacer != null && - typeof replacer === 'object' && - !Array.isArray(replacer) - ) { - space = replacer.space; - quote = replacer.quote; - replacer = replacer.replacer; - } - - if (typeof replacer === 'function') { - replacerFunc = replacer; - } else if (Array.isArray(replacer)) { - propertyList = []; - for (const v of replacer) { - let item; - - if (typeof v === 'string') { - item = v; - } else if ( - typeof v === 'number' || - v instanceof String || - v instanceof Number - ) { - item = String(v); - } - - if (item !== undefined && propertyList.indexOf(item) < 0) { - propertyList.push(item); - } - } - } - - if (space instanceof Number) { - space = Number(space); - } else if (space instanceof String) { - space = String(space); - } - - if (typeof space === 'number') { - if (space > 0) { - space = Math.min(10, Math.floor(space)); - gap = ' '.substr(0, space); - } - } else if (typeof space === 'string') { - gap = space.substr(0, 10); - } - - return serializeProperty('', {'': value}) - - function serializeProperty (key, holder) { - let value = holder[key]; - if (value != null) { - if (typeof value.toJSON5 === 'function') { - value = value.toJSON5(key); - } else if (typeof value.toJSON === 'function') { - value = value.toJSON(key); - } - } - - if (replacerFunc) { - value = replacerFunc.call(holder, key, value); - } - - if (value instanceof Number) { - value = Number(value); - } else if (value instanceof String) { - value = String(value); - } else if (value instanceof Boolean) { - value = value.valueOf(); - } - - switch (value) { - case null: return 'null' - case true: return 'true' - case false: return 'false' - } - - if (typeof value === 'string') { - return quoteString(value, false) - } - - if (typeof value === 'number') { - return String(value) - } - - if (typeof value === 'object') { - return Array.isArray(value) ? serializeArray(value) : serializeObject(value) - } - - return undefined - } - - function quoteString (value) { - const quotes = { - "'": 0.1, - '"': 0.2, - }; - - const replacements = { - "'": "\\'", - '"': '\\"', - '\\': '\\\\', - '\b': '\\b', - '\f': '\\f', - '\n': '\\n', - '\r': '\\r', - '\t': '\\t', - '\v': '\\v', - '\0': '\\0', - '\u2028': '\\u2028', - '\u2029': '\\u2029', - }; - - let product = ''; - - for (let i = 0; i < value.length; i++) { - const c = value[i]; - switch (c) { - case "'": - case '"': - quotes[c]++; - product += c; - continue - - case '\0': - if (util.isDigit(value[i + 1])) { - product += '\\x00'; - continue - } - } - - if (replacements[c]) { - product += replacements[c]; - continue - } - - if (c < ' ') { - let hexString = c.charCodeAt(0).toString(16); - product += '\\x' + ('00' + hexString).substring(hexString.length); - continue - } - - product += c; - } - - const quoteChar = quote || Object.keys(quotes).reduce((a, b) => (quotes[a] < quotes[b]) ? a : b); - - product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar]); - - return quoteChar + product + quoteChar - } - - function serializeObject (value) { - if (stack.indexOf(value) >= 0) { - throw TypeError('Converting circular structure to JSON5') - } - - stack.push(value); - - let stepback = indent; - indent = indent + gap; - - let keys = propertyList || Object.keys(value); - let partial = []; - for (const key of keys) { - const propertyString = serializeProperty(key, value); - if (propertyString !== undefined) { - let member = serializeKey(key) + ':'; - if (gap !== '') { - member += ' '; - } - member += propertyString; - partial.push(member); - } - } - - let final; - if (partial.length === 0) { - final = '{}'; - } else { - let properties; - if (gap === '') { - properties = partial.join(','); - final = '{' + properties + '}'; - } else { - let separator = ',\n' + indent; - properties = partial.join(separator); - final = '{\n' + indent + properties + ',\n' + stepback + '}'; - } - } - - stack.pop(); - indent = stepback; - return final - } - - function serializeKey (key) { - if (key.length === 0) { - return quoteString(key, true) - } - - const firstChar = String.fromCodePoint(key.codePointAt(0)); - if (!util.isIdStartChar(firstChar)) { - return quoteString(key, true) - } - - for (let i = firstChar.length; i < key.length; i++) { - if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) { - return quoteString(key, true) - } - } - - return key - } - - function serializeArray (value) { - if (stack.indexOf(value) >= 0) { - throw TypeError('Converting circular structure to JSON5') - } - - stack.push(value); - - let stepback = indent; - indent = indent + gap; - - let partial = []; - for (let i = 0; i < value.length; i++) { - const propertyString = serializeProperty(String(i), value); - partial.push((propertyString !== undefined) ? propertyString : 'null'); - } - - let final; - if (partial.length === 0) { - final = '[]'; - } else { - if (gap === '') { - let properties = partial.join(','); - final = '[' + properties + ']'; - } else { - let separator = ',\n' + indent; - let properties = partial.join(separator); - final = '[\n' + indent + properties + ',\n' + stepback + ']'; - } - } - - stack.pop(); - indent = stepback; - return final - } -}; - -const JSON5 = { - parse, - stringify, -}; - -var lib = JSON5; - -export default lib; diff --git a/node_modules/json5/lib/cli.js b/node_modules/json5/lib/cli.js deleted file mode 100644 index 93cb809..0000000 --- a/node_modules/json5/lib/cli.js +++ /dev/null @@ -1,152 +0,0 @@ -#!/usr/bin/env node - -const fs = require('fs') -const path = require('path') -const pkg = require('../package.json') -const JSON5 = require('./') - -const argv = parseArgs() - -if (argv.version) { - version() -} else if (argv.help) { - usage() -} else { - const inFilename = argv.defaults[0] - - let readStream - if (inFilename) { - readStream = fs.createReadStream(inFilename) - } else { - readStream = process.stdin - } - - let json5 = '' - readStream.on('data', data => { - json5 += data - }) - - readStream.on('end', () => { - let space - if (argv.space === 't' || argv.space === 'tab') { - space = '\t' - } else { - space = Number(argv.space) - } - - let value - try { - value = JSON5.parse(json5) - if (!argv.validate) { - const json = JSON.stringify(value, null, space) - - let writeStream - - // --convert is for backward compatibility with v0.5.1. If - // specified with and not --out-file, then a file with - // the same name but with a .json extension will be written. - if (argv.convert && inFilename && !argv.outFile) { - const parsedFilename = path.parse(inFilename) - const outFilename = path.format( - Object.assign( - parsedFilename, - {base: path.basename(parsedFilename.base, parsedFilename.ext) + '.json'} - ) - ) - - writeStream = fs.createWriteStream(outFilename) - } else if (argv.outFile) { - writeStream = fs.createWriteStream(argv.outFile) - } else { - writeStream = process.stdout - } - - writeStream.write(json) - } - } catch (err) { - console.error(err.message) - process.exit(1) - } - }) -} - -function parseArgs () { - let convert - let space - let validate - let outFile - let version - let help - const defaults = [] - - const args = process.argv.slice(2) - for (let i = 0; i < args.length; i++) { - const arg = args[i] - switch (arg) { - case '--convert': - case '-c': - convert = true - break - - case '--space': - case '-s': - space = args[++i] - break - - case '--validate': - case '-v': - validate = true - break - - case '--out-file': - case '-o': - outFile = args[++i] - break - - case '--version': - case '-V': - version = true - break - - case '--help': - case '-h': - help = true - break - - default: - defaults.push(arg) - break - } - } - - return { - convert, - space, - validate, - outFile, - version, - help, - defaults, - } -} - -function version () { - console.log(pkg.version) -} - -function usage () { - console.log( - ` - Usage: json5 [options] - - If is not provided, then STDIN is used. - - Options: - - -s, --space The number of spaces to indent or 't' for tabs - -o, --out-file [file] Output to the specified file, otherwise STDOUT - -v, --validate Validate JSON5 but do not output JSON - -V, --version Output the version number - -h, --help Output usage information` - ) -} diff --git a/node_modules/json5/lib/index.d.ts b/node_modules/json5/lib/index.d.ts deleted file mode 100644 index 1c45bca..0000000 --- a/node_modules/json5/lib/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import parse = require('./parse') -import stringify = require('./stringify') - -export {parse, stringify} diff --git a/node_modules/json5/lib/index.js b/node_modules/json5/lib/index.js deleted file mode 100644 index 3679638..0000000 --- a/node_modules/json5/lib/index.js +++ /dev/null @@ -1,9 +0,0 @@ -const parse = require('./parse') -const stringify = require('./stringify') - -const JSON5 = { - parse, - stringify, -} - -module.exports = JSON5 diff --git a/node_modules/json5/lib/parse.d.ts b/node_modules/json5/lib/parse.d.ts deleted file mode 100644 index 8c8d883..0000000 --- a/node_modules/json5/lib/parse.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Parses a JSON5 string, constructing the JavaScript value or object described - * by the string. - * @template T The type of the return value. - * @param text The string to parse as JSON5. - * @param reviver A function that prescribes how the value originally produced - * by parsing is transformed before being returned. - * @returns The JavaScript value converted from the JSON5 string. - */ -declare function parse( - text: string, - reviver?: ((this: any, key: string, value: any) => any) | null, -): T - -export = parse diff --git a/node_modules/json5/lib/parse.js b/node_modules/json5/lib/parse.js deleted file mode 100644 index da2078a..0000000 --- a/node_modules/json5/lib/parse.js +++ /dev/null @@ -1,1114 +0,0 @@ -const util = require('./util') - -let source -let parseState -let stack -let pos -let line -let column -let token -let key -let root - -module.exports = function parse (text, reviver) { - source = String(text) - parseState = 'start' - stack = [] - pos = 0 - line = 1 - column = 0 - token = undefined - key = undefined - root = undefined - - do { - token = lex() - - // This code is unreachable. - // if (!parseStates[parseState]) { - // throw invalidParseState() - // } - - parseStates[parseState]() - } while (token.type !== 'eof') - - if (typeof reviver === 'function') { - return internalize({'': root}, '', reviver) - } - - return root -} - -function internalize (holder, name, reviver) { - const value = holder[name] - if (value != null && typeof value === 'object') { - if (Array.isArray(value)) { - for (let i = 0; i < value.length; i++) { - const key = String(i) - const replacement = internalize(value, key, reviver) - if (replacement === undefined) { - delete value[key] - } else { - Object.defineProperty(value, key, { - value: replacement, - writable: true, - enumerable: true, - configurable: true, - }) - } - } - } else { - for (const key in value) { - const replacement = internalize(value, key, reviver) - if (replacement === undefined) { - delete value[key] - } else { - Object.defineProperty(value, key, { - value: replacement, - writable: true, - enumerable: true, - configurable: true, - }) - } - } - } - } - - return reviver.call(holder, name, value) -} - -let lexState -let buffer -let doubleQuote -let sign -let c - -function lex () { - lexState = 'default' - buffer = '' - doubleQuote = false - sign = 1 - - for (;;) { - c = peek() - - // This code is unreachable. - // if (!lexStates[lexState]) { - // throw invalidLexState(lexState) - // } - - const token = lexStates[lexState]() - if (token) { - return token - } - } -} - -function peek () { - if (source[pos]) { - return String.fromCodePoint(source.codePointAt(pos)) - } -} - -function read () { - const c = peek() - - if (c === '\n') { - line++ - column = 0 - } else if (c) { - column += c.length - } else { - column++ - } - - if (c) { - pos += c.length - } - - return c -} - -const lexStates = { - default () { - switch (c) { - case '\t': - case '\v': - case '\f': - case ' ': - case '\u00A0': - case '\uFEFF': - case '\n': - case '\r': - case '\u2028': - case '\u2029': - read() - return - - case '/': - read() - lexState = 'comment' - return - - case undefined: - read() - return newToken('eof') - } - - if (util.isSpaceSeparator(c)) { - read() - return - } - - // This code is unreachable. - // if (!lexStates[parseState]) { - // throw invalidLexState(parseState) - // } - - return lexStates[parseState]() - }, - - comment () { - switch (c) { - case '*': - read() - lexState = 'multiLineComment' - return - - case '/': - read() - lexState = 'singleLineComment' - return - } - - throw invalidChar(read()) - }, - - multiLineComment () { - switch (c) { - case '*': - read() - lexState = 'multiLineCommentAsterisk' - return - - case undefined: - throw invalidChar(read()) - } - - read() - }, - - multiLineCommentAsterisk () { - switch (c) { - case '*': - read() - return - - case '/': - read() - lexState = 'default' - return - - case undefined: - throw invalidChar(read()) - } - - read() - lexState = 'multiLineComment' - }, - - singleLineComment () { - switch (c) { - case '\n': - case '\r': - case '\u2028': - case '\u2029': - read() - lexState = 'default' - return - - case undefined: - read() - return newToken('eof') - } - - read() - }, - - value () { - switch (c) { - case '{': - case '[': - return newToken('punctuator', read()) - - case 'n': - read() - literal('ull') - return newToken('null', null) - - case 't': - read() - literal('rue') - return newToken('boolean', true) - - case 'f': - read() - literal('alse') - return newToken('boolean', false) - - case '-': - case '+': - if (read() === '-') { - sign = -1 - } - - lexState = 'sign' - return - - case '.': - buffer = read() - lexState = 'decimalPointLeading' - return - - case '0': - buffer = read() - lexState = 'zero' - return - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - buffer = read() - lexState = 'decimalInteger' - return - - case 'I': - read() - literal('nfinity') - return newToken('numeric', Infinity) - - case 'N': - read() - literal('aN') - return newToken('numeric', NaN) - - case '"': - case "'": - doubleQuote = (read() === '"') - buffer = '' - lexState = 'string' - return - } - - throw invalidChar(read()) - }, - - identifierNameStartEscape () { - if (c !== 'u') { - throw invalidChar(read()) - } - - read() - const u = unicodeEscape() - switch (u) { - case '$': - case '_': - break - - default: - if (!util.isIdStartChar(u)) { - throw invalidIdentifier() - } - - break - } - - buffer += u - lexState = 'identifierName' - }, - - identifierName () { - switch (c) { - case '$': - case '_': - case '\u200C': - case '\u200D': - buffer += read() - return - - case '\\': - read() - lexState = 'identifierNameEscape' - return - } - - if (util.isIdContinueChar(c)) { - buffer += read() - return - } - - return newToken('identifier', buffer) - }, - - identifierNameEscape () { - if (c !== 'u') { - throw invalidChar(read()) - } - - read() - const u = unicodeEscape() - switch (u) { - case '$': - case '_': - case '\u200C': - case '\u200D': - break - - default: - if (!util.isIdContinueChar(u)) { - throw invalidIdentifier() - } - - break - } - - buffer += u - lexState = 'identifierName' - }, - - sign () { - switch (c) { - case '.': - buffer = read() - lexState = 'decimalPointLeading' - return - - case '0': - buffer = read() - lexState = 'zero' - return - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - buffer = read() - lexState = 'decimalInteger' - return - - case 'I': - read() - literal('nfinity') - return newToken('numeric', sign * Infinity) - - case 'N': - read() - literal('aN') - return newToken('numeric', NaN) - } - - throw invalidChar(read()) - }, - - zero () { - switch (c) { - case '.': - buffer += read() - lexState = 'decimalPoint' - return - - case 'e': - case 'E': - buffer += read() - lexState = 'decimalExponent' - return - - case 'x': - case 'X': - buffer += read() - lexState = 'hexadecimal' - return - } - - return newToken('numeric', sign * 0) - }, - - decimalInteger () { - switch (c) { - case '.': - buffer += read() - lexState = 'decimalPoint' - return - - case 'e': - case 'E': - buffer += read() - lexState = 'decimalExponent' - return - } - - if (util.isDigit(c)) { - buffer += read() - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - decimalPointLeading () { - if (util.isDigit(c)) { - buffer += read() - lexState = 'decimalFraction' - return - } - - throw invalidChar(read()) - }, - - decimalPoint () { - switch (c) { - case 'e': - case 'E': - buffer += read() - lexState = 'decimalExponent' - return - } - - if (util.isDigit(c)) { - buffer += read() - lexState = 'decimalFraction' - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - decimalFraction () { - switch (c) { - case 'e': - case 'E': - buffer += read() - lexState = 'decimalExponent' - return - } - - if (util.isDigit(c)) { - buffer += read() - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - decimalExponent () { - switch (c) { - case '+': - case '-': - buffer += read() - lexState = 'decimalExponentSign' - return - } - - if (util.isDigit(c)) { - buffer += read() - lexState = 'decimalExponentInteger' - return - } - - throw invalidChar(read()) - }, - - decimalExponentSign () { - if (util.isDigit(c)) { - buffer += read() - lexState = 'decimalExponentInteger' - return - } - - throw invalidChar(read()) - }, - - decimalExponentInteger () { - if (util.isDigit(c)) { - buffer += read() - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - hexadecimal () { - if (util.isHexDigit(c)) { - buffer += read() - lexState = 'hexadecimalInteger' - return - } - - throw invalidChar(read()) - }, - - hexadecimalInteger () { - if (util.isHexDigit(c)) { - buffer += read() - return - } - - return newToken('numeric', sign * Number(buffer)) - }, - - string () { - switch (c) { - case '\\': - read() - buffer += escape() - return - - case '"': - if (doubleQuote) { - read() - return newToken('string', buffer) - } - - buffer += read() - return - - case "'": - if (!doubleQuote) { - read() - return newToken('string', buffer) - } - - buffer += read() - return - - case '\n': - case '\r': - throw invalidChar(read()) - - case '\u2028': - case '\u2029': - separatorChar(c) - break - - case undefined: - throw invalidChar(read()) - } - - buffer += read() - }, - - start () { - switch (c) { - case '{': - case '[': - return newToken('punctuator', read()) - - // This code is unreachable since the default lexState handles eof. - // case undefined: - // return newToken('eof') - } - - lexState = 'value' - }, - - beforePropertyName () { - switch (c) { - case '$': - case '_': - buffer = read() - lexState = 'identifierName' - return - - case '\\': - read() - lexState = 'identifierNameStartEscape' - return - - case '}': - return newToken('punctuator', read()) - - case '"': - case "'": - doubleQuote = (read() === '"') - lexState = 'string' - return - } - - if (util.isIdStartChar(c)) { - buffer += read() - lexState = 'identifierName' - return - } - - throw invalidChar(read()) - }, - - afterPropertyName () { - if (c === ':') { - return newToken('punctuator', read()) - } - - throw invalidChar(read()) - }, - - beforePropertyValue () { - lexState = 'value' - }, - - afterPropertyValue () { - switch (c) { - case ',': - case '}': - return newToken('punctuator', read()) - } - - throw invalidChar(read()) - }, - - beforeArrayValue () { - if (c === ']') { - return newToken('punctuator', read()) - } - - lexState = 'value' - }, - - afterArrayValue () { - switch (c) { - case ',': - case ']': - return newToken('punctuator', read()) - } - - throw invalidChar(read()) - }, - - end () { - // This code is unreachable since it's handled by the default lexState. - // if (c === undefined) { - // read() - // return newToken('eof') - // } - - throw invalidChar(read()) - }, -} - -function newToken (type, value) { - return { - type, - value, - line, - column, - } -} - -function literal (s) { - for (const c of s) { - const p = peek() - - if (p !== c) { - throw invalidChar(read()) - } - - read() - } -} - -function escape () { - const c = peek() - switch (c) { - case 'b': - read() - return '\b' - - case 'f': - read() - return '\f' - - case 'n': - read() - return '\n' - - case 'r': - read() - return '\r' - - case 't': - read() - return '\t' - - case 'v': - read() - return '\v' - - case '0': - read() - if (util.isDigit(peek())) { - throw invalidChar(read()) - } - - return '\0' - - case 'x': - read() - return hexEscape() - - case 'u': - read() - return unicodeEscape() - - case '\n': - case '\u2028': - case '\u2029': - read() - return '' - - case '\r': - read() - if (peek() === '\n') { - read() - } - - return '' - - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - throw invalidChar(read()) - - case undefined: - throw invalidChar(read()) - } - - return read() -} - -function hexEscape () { - let buffer = '' - let c = peek() - - if (!util.isHexDigit(c)) { - throw invalidChar(read()) - } - - buffer += read() - - c = peek() - if (!util.isHexDigit(c)) { - throw invalidChar(read()) - } - - buffer += read() - - return String.fromCodePoint(parseInt(buffer, 16)) -} - -function unicodeEscape () { - let buffer = '' - let count = 4 - - while (count-- > 0) { - const c = peek() - if (!util.isHexDigit(c)) { - throw invalidChar(read()) - } - - buffer += read() - } - - return String.fromCodePoint(parseInt(buffer, 16)) -} - -const parseStates = { - start () { - if (token.type === 'eof') { - throw invalidEOF() - } - - push() - }, - - beforePropertyName () { - switch (token.type) { - case 'identifier': - case 'string': - key = token.value - parseState = 'afterPropertyName' - return - - case 'punctuator': - // This code is unreachable since it's handled by the lexState. - // if (token.value !== '}') { - // throw invalidToken() - // } - - pop() - return - - case 'eof': - throw invalidEOF() - } - - // This code is unreachable since it's handled by the lexState. - // throw invalidToken() - }, - - afterPropertyName () { - // This code is unreachable since it's handled by the lexState. - // if (token.type !== 'punctuator' || token.value !== ':') { - // throw invalidToken() - // } - - if (token.type === 'eof') { - throw invalidEOF() - } - - parseState = 'beforePropertyValue' - }, - - beforePropertyValue () { - if (token.type === 'eof') { - throw invalidEOF() - } - - push() - }, - - beforeArrayValue () { - if (token.type === 'eof') { - throw invalidEOF() - } - - if (token.type === 'punctuator' && token.value === ']') { - pop() - return - } - - push() - }, - - afterPropertyValue () { - // This code is unreachable since it's handled by the lexState. - // if (token.type !== 'punctuator') { - // throw invalidToken() - // } - - if (token.type === 'eof') { - throw invalidEOF() - } - - switch (token.value) { - case ',': - parseState = 'beforePropertyName' - return - - case '}': - pop() - } - - // This code is unreachable since it's handled by the lexState. - // throw invalidToken() - }, - - afterArrayValue () { - // This code is unreachable since it's handled by the lexState. - // if (token.type !== 'punctuator') { - // throw invalidToken() - // } - - if (token.type === 'eof') { - throw invalidEOF() - } - - switch (token.value) { - case ',': - parseState = 'beforeArrayValue' - return - - case ']': - pop() - } - - // This code is unreachable since it's handled by the lexState. - // throw invalidToken() - }, - - end () { - // This code is unreachable since it's handled by the lexState. - // if (token.type !== 'eof') { - // throw invalidToken() - // } - }, -} - -function push () { - let value - - switch (token.type) { - case 'punctuator': - switch (token.value) { - case '{': - value = {} - break - - case '[': - value = [] - break - } - - break - - case 'null': - case 'boolean': - case 'numeric': - case 'string': - value = token.value - break - - // This code is unreachable. - // default: - // throw invalidToken() - } - - if (root === undefined) { - root = value - } else { - const parent = stack[stack.length - 1] - if (Array.isArray(parent)) { - parent.push(value) - } else { - Object.defineProperty(parent, key, { - value, - writable: true, - enumerable: true, - configurable: true, - }) - } - } - - if (value !== null && typeof value === 'object') { - stack.push(value) - - if (Array.isArray(value)) { - parseState = 'beforeArrayValue' - } else { - parseState = 'beforePropertyName' - } - } else { - const current = stack[stack.length - 1] - if (current == null) { - parseState = 'end' - } else if (Array.isArray(current)) { - parseState = 'afterArrayValue' - } else { - parseState = 'afterPropertyValue' - } - } -} - -function pop () { - stack.pop() - - const current = stack[stack.length - 1] - if (current == null) { - parseState = 'end' - } else if (Array.isArray(current)) { - parseState = 'afterArrayValue' - } else { - parseState = 'afterPropertyValue' - } -} - -// This code is unreachable. -// function invalidParseState () { -// return new Error(`JSON5: invalid parse state '${parseState}'`) -// } - -// This code is unreachable. -// function invalidLexState (state) { -// return new Error(`JSON5: invalid lex state '${state}'`) -// } - -function invalidChar (c) { - if (c === undefined) { - return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) - } - - return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) -} - -function invalidEOF () { - return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) -} - -// This code is unreachable. -// function invalidToken () { -// if (token.type === 'eof') { -// return syntaxError(`JSON5: invalid end of input at ${line}:${column}`) -// } - -// const c = String.fromCodePoint(token.value.codePointAt(0)) -// return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`) -// } - -function invalidIdentifier () { - column -= 5 - return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`) -} - -function separatorChar (c) { - console.warn(`JSON5: '${formatChar(c)}' in strings is not valid ECMAScript; consider escaping`) -} - -function formatChar (c) { - const replacements = { - "'": "\\'", - '"': '\\"', - '\\': '\\\\', - '\b': '\\b', - '\f': '\\f', - '\n': '\\n', - '\r': '\\r', - '\t': '\\t', - '\v': '\\v', - '\0': '\\0', - '\u2028': '\\u2028', - '\u2029': '\\u2029', - } - - if (replacements[c]) { - return replacements[c] - } - - if (c < ' ') { - const hexString = c.charCodeAt(0).toString(16) - return '\\x' + ('00' + hexString).substring(hexString.length) - } - - return c -} - -function syntaxError (message) { - const err = new SyntaxError(message) - err.lineNumber = line - err.columnNumber = column - return err -} diff --git a/node_modules/json5/lib/register.js b/node_modules/json5/lib/register.js deleted file mode 100644 index 935cdba..0000000 --- a/node_modules/json5/lib/register.js +++ /dev/null @@ -1,13 +0,0 @@ -const fs = require('fs') -const JSON5 = require('./') - -// eslint-disable-next-line node/no-deprecated-api -require.extensions['.json5'] = function (module, filename) { - const content = fs.readFileSync(filename, 'utf8') - try { - module.exports = JSON5.parse(content) - } catch (err) { - err.message = filename + ': ' + err.message - throw err - } -} diff --git a/node_modules/json5/lib/require.js b/node_modules/json5/lib/require.js deleted file mode 100644 index 3aa29be..0000000 --- a/node_modules/json5/lib/require.js +++ /dev/null @@ -1,4 +0,0 @@ -// This file is for backward compatibility with v0.5.1. -require('./register') - -console.warn("'json5/require' is deprecated. Please use 'json5/register' instead.") diff --git a/node_modules/json5/lib/stringify.d.ts b/node_modules/json5/lib/stringify.d.ts deleted file mode 100644 index 3c34838..0000000 --- a/node_modules/json5/lib/stringify.d.ts +++ /dev/null @@ -1,89 +0,0 @@ -declare type StringifyOptions = { - /** - * A function that alters the behavior of the stringification process, or an - * array of String and Number objects that serve as a allowlist for - * selecting/filtering the properties of the value object to be included in - * the JSON5 string. If this value is null or not provided, all properties - * of the object are included in the resulting JSON5 string. - */ - replacer?: - | ((this: any, key: string, value: any) => any) - | (string | number)[] - | null - - /** - * A String or Number object that's used to insert white space into the - * output JSON5 string for readability purposes. If this is a Number, it - * indicates the number of space characters to use as white space; this - * number is capped at 10 (if it is greater, the value is just 10). Values - * less than 1 indicate that no space should be used. If this is a String, - * the string (or the first 10 characters of the string, if it's longer than - * that) is used as white space. If this parameter is not provided (or is - * null), no white space is used. If white space is used, trailing commas - * will be used in objects and arrays. - */ - space?: string | number | null - - /** - * A String representing the quote character to use when serializing - * strings. - */ - quote?: string | null -} - -/** - * Converts a JavaScript value to a JSON5 string. - * @param value The value to convert to a JSON5 string. - * @param replacer A function that alters the behavior of the stringification - * process. If this value is null or not provided, all properties of the object - * are included in the resulting JSON5 string. - * @param space A String or Number object that's used to insert white space into - * the output JSON5 string for readability purposes. If this is a Number, it - * indicates the number of space characters to use as white space; this number - * is capped at 10 (if it is greater, the value is just 10). Values less than 1 - * indicate that no space should be used. If this is a String, the string (or - * the first 10 characters of the string, if it's longer than that) is used as - * white space. If this parameter is not provided (or is null), no white space - * is used. If white space is used, trailing commas will be used in objects and - * arrays. - * @returns The JSON5 string converted from the JavaScript value. - */ -declare function stringify( - value: any, - replacer?: ((this: any, key: string, value: any) => any) | null, - space?: string | number | null, -): string - -/** - * Converts a JavaScript value to a JSON5 string. - * @param value The value to convert to a JSON5 string. - * @param replacer An array of String and Number objects that serve as a - * allowlist for selecting/filtering the properties of the value object to be - * included in the JSON5 string. If this value is null or not provided, all - * properties of the object are included in the resulting JSON5 string. - * @param space A String or Number object that's used to insert white space into - * the output JSON5 string for readability purposes. If this is a Number, it - * indicates the number of space characters to use as white space; this number - * is capped at 10 (if it is greater, the value is just 10). Values less than 1 - * indicate that no space should be used. If this is a String, the string (or - * the first 10 characters of the string, if it's longer than that) is used as - * white space. If this parameter is not provided (or is null), no white space - * is used. If white space is used, trailing commas will be used in objects and - * arrays. - * @returns The JSON5 string converted from the JavaScript value. - */ -declare function stringify( - value: any, - replacer: (string | number)[], - space?: string | number | null, -): string - -/** - * Converts a JavaScript value to a JSON5 string. - * @param value The value to convert to a JSON5 string. - * @param options An object specifying options. - * @returns The JSON5 string converted from the JavaScript value. - */ -declare function stringify(value: any, options: StringifyOptions): string - -export = stringify diff --git a/node_modules/json5/lib/stringify.js b/node_modules/json5/lib/stringify.js deleted file mode 100644 index 7cb3b0e..0000000 --- a/node_modules/json5/lib/stringify.js +++ /dev/null @@ -1,261 +0,0 @@ -const util = require('./util') - -module.exports = function stringify (value, replacer, space) { - const stack = [] - let indent = '' - let propertyList - let replacerFunc - let gap = '' - let quote - - if ( - replacer != null && - typeof replacer === 'object' && - !Array.isArray(replacer) - ) { - space = replacer.space - quote = replacer.quote - replacer = replacer.replacer - } - - if (typeof replacer === 'function') { - replacerFunc = replacer - } else if (Array.isArray(replacer)) { - propertyList = [] - for (const v of replacer) { - let item - - if (typeof v === 'string') { - item = v - } else if ( - typeof v === 'number' || - v instanceof String || - v instanceof Number - ) { - item = String(v) - } - - if (item !== undefined && propertyList.indexOf(item) < 0) { - propertyList.push(item) - } - } - } - - if (space instanceof Number) { - space = Number(space) - } else if (space instanceof String) { - space = String(space) - } - - if (typeof space === 'number') { - if (space > 0) { - space = Math.min(10, Math.floor(space)) - gap = ' '.substr(0, space) - } - } else if (typeof space === 'string') { - gap = space.substr(0, 10) - } - - return serializeProperty('', {'': value}) - - function serializeProperty (key, holder) { - let value = holder[key] - if (value != null) { - if (typeof value.toJSON5 === 'function') { - value = value.toJSON5(key) - } else if (typeof value.toJSON === 'function') { - value = value.toJSON(key) - } - } - - if (replacerFunc) { - value = replacerFunc.call(holder, key, value) - } - - if (value instanceof Number) { - value = Number(value) - } else if (value instanceof String) { - value = String(value) - } else if (value instanceof Boolean) { - value = value.valueOf() - } - - switch (value) { - case null: return 'null' - case true: return 'true' - case false: return 'false' - } - - if (typeof value === 'string') { - return quoteString(value, false) - } - - if (typeof value === 'number') { - return String(value) - } - - if (typeof value === 'object') { - return Array.isArray(value) ? serializeArray(value) : serializeObject(value) - } - - return undefined - } - - function quoteString (value) { - const quotes = { - "'": 0.1, - '"': 0.2, - } - - const replacements = { - "'": "\\'", - '"': '\\"', - '\\': '\\\\', - '\b': '\\b', - '\f': '\\f', - '\n': '\\n', - '\r': '\\r', - '\t': '\\t', - '\v': '\\v', - '\0': '\\0', - '\u2028': '\\u2028', - '\u2029': '\\u2029', - } - - let product = '' - - for (let i = 0; i < value.length; i++) { - const c = value[i] - switch (c) { - case "'": - case '"': - quotes[c]++ - product += c - continue - - case '\0': - if (util.isDigit(value[i + 1])) { - product += '\\x00' - continue - } - } - - if (replacements[c]) { - product += replacements[c] - continue - } - - if (c < ' ') { - let hexString = c.charCodeAt(0).toString(16) - product += '\\x' + ('00' + hexString).substring(hexString.length) - continue - } - - product += c - } - - const quoteChar = quote || Object.keys(quotes).reduce((a, b) => (quotes[a] < quotes[b]) ? a : b) - - product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar]) - - return quoteChar + product + quoteChar - } - - function serializeObject (value) { - if (stack.indexOf(value) >= 0) { - throw TypeError('Converting circular structure to JSON5') - } - - stack.push(value) - - let stepback = indent - indent = indent + gap - - let keys = propertyList || Object.keys(value) - let partial = [] - for (const key of keys) { - const propertyString = serializeProperty(key, value) - if (propertyString !== undefined) { - let member = serializeKey(key) + ':' - if (gap !== '') { - member += ' ' - } - member += propertyString - partial.push(member) - } - } - - let final - if (partial.length === 0) { - final = '{}' - } else { - let properties - if (gap === '') { - properties = partial.join(',') - final = '{' + properties + '}' - } else { - let separator = ',\n' + indent - properties = partial.join(separator) - final = '{\n' + indent + properties + ',\n' + stepback + '}' - } - } - - stack.pop() - indent = stepback - return final - } - - function serializeKey (key) { - if (key.length === 0) { - return quoteString(key, true) - } - - const firstChar = String.fromCodePoint(key.codePointAt(0)) - if (!util.isIdStartChar(firstChar)) { - return quoteString(key, true) - } - - for (let i = firstChar.length; i < key.length; i++) { - if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) { - return quoteString(key, true) - } - } - - return key - } - - function serializeArray (value) { - if (stack.indexOf(value) >= 0) { - throw TypeError('Converting circular structure to JSON5') - } - - stack.push(value) - - let stepback = indent - indent = indent + gap - - let partial = [] - for (let i = 0; i < value.length; i++) { - const propertyString = serializeProperty(String(i), value) - partial.push((propertyString !== undefined) ? propertyString : 'null') - } - - let final - if (partial.length === 0) { - final = '[]' - } else { - if (gap === '') { - let properties = partial.join(',') - final = '[' + properties + ']' - } else { - let separator = ',\n' + indent - let properties = partial.join(separator) - final = '[\n' + indent + properties + ',\n' + stepback + ']' - } - } - - stack.pop() - indent = stepback - return final - } -} diff --git a/node_modules/json5/lib/unicode.d.ts b/node_modules/json5/lib/unicode.d.ts deleted file mode 100644 index 610f805..0000000 --- a/node_modules/json5/lib/unicode.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const Space_Separator: RegExp -export declare const ID_Start: RegExp -export declare const ID_Continue: RegExp diff --git a/node_modules/json5/lib/unicode.js b/node_modules/json5/lib/unicode.js deleted file mode 100644 index 215ccd8..0000000 --- a/node_modules/json5/lib/unicode.js +++ /dev/null @@ -1,4 +0,0 @@ -// This is a generated file. Do not edit. -module.exports.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/ -module.exports.ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/ -module.exports.ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ diff --git a/node_modules/json5/lib/util.d.ts b/node_modules/json5/lib/util.d.ts deleted file mode 100644 index a940cea..0000000 --- a/node_modules/json5/lib/util.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare function isSpaceSeparator(c?: string): boolean -export declare function isIdStartChar(c?: string): boolean -export declare function isIdContinueChar(c?: string): boolean -export declare function isDigit(c?: string): boolean -export declare function isHexDigit(c?: string): boolean diff --git a/node_modules/json5/lib/util.js b/node_modules/json5/lib/util.js deleted file mode 100644 index 40bfe2f..0000000 --- a/node_modules/json5/lib/util.js +++ /dev/null @@ -1,35 +0,0 @@ -const unicode = require('../lib/unicode') - -module.exports = { - isSpaceSeparator (c) { - return typeof c === 'string' && unicode.Space_Separator.test(c) - }, - - isIdStartChar (c) { - return typeof c === 'string' && ( - (c >= 'a' && c <= 'z') || - (c >= 'A' && c <= 'Z') || - (c === '$') || (c === '_') || - unicode.ID_Start.test(c) - ) - }, - - isIdContinueChar (c) { - return typeof c === 'string' && ( - (c >= 'a' && c <= 'z') || - (c >= 'A' && c <= 'Z') || - (c >= '0' && c <= '9') || - (c === '$') || (c === '_') || - (c === '\u200C') || (c === '\u200D') || - unicode.ID_Continue.test(c) - ) - }, - - isDigit (c) { - return typeof c === 'string' && /[0-9]/.test(c) - }, - - isHexDigit (c) { - return typeof c === 'string' && /[0-9A-Fa-f]/.test(c) - }, -} diff --git a/node_modules/json5/package.json b/node_modules/json5/package.json deleted file mode 100644 index 60c51d9..0000000 --- a/node_modules/json5/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "json5", - "version": "2.2.3", - "description": "JSON for Humans", - "main": "lib/index.js", - "module": "dist/index.mjs", - "bin": "lib/cli.js", - "browser": "dist/index.js", - "types": "lib/index.d.ts", - "files": [ - "lib/", - "dist/" - ], - "engines": { - "node": ">=6" - }, - "scripts": { - "build": "rollup -c", - "build-package": "node build/package.js", - "build-unicode": "node build/unicode.js", - "coverage": "tap --coverage-report html test", - "lint": "eslint --fix .", - "lint-report": "eslint .", - "prepublishOnly": "npm run production", - "preversion": "npm run production", - "production": "run-s test build", - "tap": "tap -Rspec --100 test", - "test": "run-s lint-report tap", - "version": "npm run build-package && git add package.json5" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/json5/json5.git" - }, - "keywords": [ - "json", - "json5", - "es5", - "es2015", - "ecmascript" - ], - "author": "Aseem Kishore ", - "contributors": [ - "Max Nanasy ", - "Andrew Eisenberg ", - "Jordan Tucker " - ], - "license": "MIT", - "bugs": { - "url": "https://github.com/json5/json5/issues" - }, - "homepage": "http://json5.org/", - "devDependencies": { - "core-js": "^2.6.5", - "eslint": "^5.15.3", - "eslint-config-standard": "^12.0.0", - "eslint-plugin-import": "^2.16.0", - "eslint-plugin-node": "^8.0.1", - "eslint-plugin-promise": "^4.0.1", - "eslint-plugin-standard": "^4.0.0", - "npm-run-all": "^4.1.5", - "regenerate": "^1.4.0", - "rollup": "^0.64.1", - "rollup-plugin-buble": "^0.19.6", - "rollup-plugin-commonjs": "^9.2.1", - "rollup-plugin-node-resolve": "^3.4.0", - "rollup-plugin-terser": "^1.0.1", - "sinon": "^6.3.5", - "tap": "^12.6.0", - "unicode-10.0.0": "^0.7.5" - } -} diff --git a/node_modules/jsonwebtoken/LICENSE b/node_modules/jsonwebtoken/LICENSE deleted file mode 100644 index bcd1854..0000000 --- a/node_modules/jsonwebtoken/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Auth0, Inc. (http://auth0.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/jsonwebtoken/README.md b/node_modules/jsonwebtoken/README.md deleted file mode 100644 index 4e20dd9..0000000 --- a/node_modules/jsonwebtoken/README.md +++ /dev/null @@ -1,396 +0,0 @@ -# jsonwebtoken - -| **Build** | **Dependency** | -|-----------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------| -| [![Build Status](https://secure.travis-ci.org/auth0/node-jsonwebtoken.svg?branch=master)](http://travis-ci.org/auth0/node-jsonwebtoken) | [![Dependency Status](https://david-dm.org/auth0/node-jsonwebtoken.svg)](https://david-dm.org/auth0/node-jsonwebtoken) | - - -An implementation of [JSON Web Tokens](https://tools.ietf.org/html/rfc7519). - -This was developed against `draft-ietf-oauth-json-web-token-08`. It makes use of [node-jws](https://github.com/brianloveswords/node-jws) - -# Install - -```bash -$ npm install jsonwebtoken -``` - -# Migration notes - -* [From v8 to v9](https://github.com/auth0/node-jsonwebtoken/wiki/Migration-Notes:-v8-to-v9) -* [From v7 to v8](https://github.com/auth0/node-jsonwebtoken/wiki/Migration-Notes:-v7-to-v8) - -# Usage - -### jwt.sign(payload, secretOrPrivateKey, [options, callback]) - -(Asynchronous) If a callback is supplied, the callback is called with the `err` or the JWT. - -(Synchronous) Returns the JsonWebToken as string - -`payload` could be an object literal, buffer or string representing valid JSON. -> **Please _note_ that** `exp` or any other claim is only set if the payload is an object literal. Buffer or string payloads are not checked for JSON validity. - -> If `payload` is not a buffer or a string, it will be coerced into a string using `JSON.stringify`. - -`secretOrPrivateKey` is a string (utf-8 encoded), buffer, object, or KeyObject containing either the secret for HMAC algorithms or the PEM -encoded private key for RSA and ECDSA. In case of a private key with passphrase an object `{ key, passphrase }` can be used (based on [crypto documentation](https://nodejs.org/api/crypto.html#crypto_sign_sign_private_key_output_format)), in this case be sure you pass the `algorithm` option. -When signing with RSA algorithms the minimum modulus length is 2048 except when the allowInsecureKeySizes option is set to true. Private keys below this size will be rejected with an error. - -`options`: - -* `algorithm` (default: `HS256`) -* `expiresIn`: expressed in seconds or a string describing a time span [vercel/ms](https://github.com/vercel/ms). - > Eg: `60`, `"2 days"`, `"10h"`, `"7d"`. A numeric value is interpreted as a seconds count. If you use a string be sure you provide the time units (days, hours, etc), otherwise milliseconds unit is used by default (`"120"` is equal to `"120ms"`). -* `notBefore`: expressed in seconds or a string describing a time span [vercel/ms](https://github.com/vercel/ms). - > Eg: `60`, `"2 days"`, `"10h"`, `"7d"`. A numeric value is interpreted as a seconds count. If you use a string be sure you provide the time units (days, hours, etc), otherwise milliseconds unit is used by default (`"120"` is equal to `"120ms"`). -* `audience` -* `issuer` -* `jwtid` -* `subject` -* `noTimestamp` -* `header` -* `keyid` -* `mutatePayload`: if true, the sign function will modify the payload object directly. This is useful if you need a raw reference to the payload after claims have been applied to it but before it has been encoded into a token. -* `allowInsecureKeySizes`: if true allows private keys with a modulus below 2048 to be used for RSA -* `allowInvalidAsymmetricKeyTypes`: if true, allows asymmetric keys which do not match the specified algorithm. This option is intended only for backwards compatability and should be avoided. - - - -> There are no default values for `expiresIn`, `notBefore`, `audience`, `subject`, `issuer`. These claims can also be provided in the payload directly with `exp`, `nbf`, `aud`, `sub` and `iss` respectively, but you **_can't_** include in both places. - -Remember that `exp`, `nbf` and `iat` are **NumericDate**, see related [Token Expiration (exp claim)](#token-expiration-exp-claim) - - -The header can be customized via the `options.header` object. - -Generated jwts will include an `iat` (issued at) claim by default unless `noTimestamp` is specified. If `iat` is inserted in the payload, it will be used instead of the real timestamp for calculating other things like `exp` given a timespan in `options.expiresIn`. - -Synchronous Sign with default (HMAC SHA256) - -```js -var jwt = require('jsonwebtoken'); -var token = jwt.sign({ foo: 'bar' }, 'shhhhh'); -``` - -Synchronous Sign with RSA SHA256 -```js -// sign with RSA SHA256 -var privateKey = fs.readFileSync('private.key'); -var token = jwt.sign({ foo: 'bar' }, privateKey, { algorithm: 'RS256' }); -``` - -Sign asynchronously -```js -jwt.sign({ foo: 'bar' }, privateKey, { algorithm: 'RS256' }, function(err, token) { - console.log(token); -}); -``` - -Backdate a jwt 30 seconds -```js -var older_token = jwt.sign({ foo: 'bar', iat: Math.floor(Date.now() / 1000) - 30 }, 'shhhhh'); -``` - -#### Token Expiration (exp claim) - -The standard for JWT defines an `exp` claim for expiration. The expiration is represented as a **NumericDate**: - -> A JSON numeric value representing the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time, ignoring leap seconds. This is equivalent to the IEEE Std 1003.1, 2013 Edition [POSIX.1] definition "Seconds Since the Epoch", in which each day is accounted for by exactly 86400 seconds, other than that non-integer values can be represented. See RFC 3339 [RFC3339] for details regarding date/times in general and UTC in particular. - -This means that the `exp` field should contain the number of seconds since the epoch. - -Signing a token with 1 hour of expiration: - -```javascript -jwt.sign({ - exp: Math.floor(Date.now() / 1000) + (60 * 60), - data: 'foobar' -}, 'secret'); -``` - -Another way to generate a token like this with this library is: - -```javascript -jwt.sign({ - data: 'foobar' -}, 'secret', { expiresIn: 60 * 60 }); - -//or even better: - -jwt.sign({ - data: 'foobar' -}, 'secret', { expiresIn: '1h' }); -``` - -### jwt.verify(token, secretOrPublicKey, [options, callback]) - -(Asynchronous) If a callback is supplied, function acts asynchronously. The callback is called with the decoded payload if the signature is valid and optional expiration, audience, or issuer are valid. If not, it will be called with the error. - -(Synchronous) If a callback is not supplied, function acts synchronously. Returns the payload decoded if the signature is valid and optional expiration, audience, or issuer are valid. If not, it will throw the error. - -> __Warning:__ When the token comes from an untrusted source (e.g. user input or external requests), the returned decoded payload should be treated like any other user input; please make sure to sanitize and only work with properties that are expected - -`token` is the JsonWebToken string - -`secretOrPublicKey` is a string (utf-8 encoded), buffer, or KeyObject containing either the secret for HMAC algorithms, or the PEM -encoded public key for RSA and ECDSA. -If `jwt.verify` is called asynchronous, `secretOrPublicKey` can be a function that should fetch the secret or public key. See below for a detailed example - -As mentioned in [this comment](https://github.com/auth0/node-jsonwebtoken/issues/208#issuecomment-231861138), there are other libraries that expect base64 encoded secrets (random bytes encoded using base64), if that is your case you can pass `Buffer.from(secret, 'base64')`, by doing this the secret will be decoded using base64 and the token verification will use the original random bytes. - -`options` - -* `algorithms`: List of strings with the names of the allowed algorithms. For instance, `["HS256", "HS384"]`. - > If not specified a defaults will be used based on the type of key provided - > * secret - ['HS256', 'HS384', 'HS512'] - > * rsa - ['RS256', 'RS384', 'RS512'] - > * ec - ['ES256', 'ES384', 'ES512'] - > * default - ['RS256', 'RS384', 'RS512'] -* `audience`: if you want to check audience (`aud`), provide a value here. The audience can be checked against a string, a regular expression or a list of strings and/or regular expressions. - > Eg: `"urn:foo"`, `/urn:f[o]{2}/`, `[/urn:f[o]{2}/, "urn:bar"]` -* `complete`: return an object with the decoded `{ payload, header, signature }` instead of only the usual content of the payload. -* `issuer` (optional): string or array of strings of valid values for the `iss` field. -* `jwtid` (optional): if you want to check JWT ID (`jti`), provide a string value here. -* `ignoreExpiration`: if `true` do not validate the expiration of the token. -* `ignoreNotBefore`... -* `subject`: if you want to check subject (`sub`), provide a value here -* `clockTolerance`: number of seconds to tolerate when checking the `nbf` and `exp` claims, to deal with small clock differences among different servers -* `maxAge`: the maximum allowed age for tokens to still be valid. It is expressed in seconds or a string describing a time span [vercel/ms](https://github.com/vercel/ms). - > Eg: `1000`, `"2 days"`, `"10h"`, `"7d"`. A numeric value is interpreted as a seconds count. If you use a string be sure you provide the time units (days, hours, etc), otherwise milliseconds unit is used by default (`"120"` is equal to `"120ms"`). -* `clockTimestamp`: the time in seconds that should be used as the current time for all necessary comparisons. -* `nonce`: if you want to check `nonce` claim, provide a string value here. It is used on Open ID for the ID Tokens. ([Open ID implementation notes](https://openid.net/specs/openid-connect-core-1_0.html#NonceNotes)) -* `allowInvalidAsymmetricKeyTypes`: if true, allows asymmetric keys which do not match the specified algorithm. This option is intended only for backwards compatability and should be avoided. - -```js -// verify a token symmetric - synchronous -var decoded = jwt.verify(token, 'shhhhh'); -console.log(decoded.foo) // bar - -// verify a token symmetric -jwt.verify(token, 'shhhhh', function(err, decoded) { - console.log(decoded.foo) // bar -}); - -// invalid token - synchronous -try { - var decoded = jwt.verify(token, 'wrong-secret'); -} catch(err) { - // err -} - -// invalid token -jwt.verify(token, 'wrong-secret', function(err, decoded) { - // err - // decoded undefined -}); - -// verify a token asymmetric -var cert = fs.readFileSync('public.pem'); // get public key -jwt.verify(token, cert, function(err, decoded) { - console.log(decoded.foo) // bar -}); - -// verify audience -var cert = fs.readFileSync('public.pem'); // get public key -jwt.verify(token, cert, { audience: 'urn:foo' }, function(err, decoded) { - // if audience mismatch, err == invalid audience -}); - -// verify issuer -var cert = fs.readFileSync('public.pem'); // get public key -jwt.verify(token, cert, { audience: 'urn:foo', issuer: 'urn:issuer' }, function(err, decoded) { - // if issuer mismatch, err == invalid issuer -}); - -// verify jwt id -var cert = fs.readFileSync('public.pem'); // get public key -jwt.verify(token, cert, { audience: 'urn:foo', issuer: 'urn:issuer', jwtid: 'jwtid' }, function(err, decoded) { - // if jwt id mismatch, err == invalid jwt id -}); - -// verify subject -var cert = fs.readFileSync('public.pem'); // get public key -jwt.verify(token, cert, { audience: 'urn:foo', issuer: 'urn:issuer', jwtid: 'jwtid', subject: 'subject' }, function(err, decoded) { - // if subject mismatch, err == invalid subject -}); - -// alg mismatch -var cert = fs.readFileSync('public.pem'); // get public key -jwt.verify(token, cert, { algorithms: ['RS256'] }, function (err, payload) { - // if token alg != RS256, err == invalid signature -}); - -// Verify using getKey callback -// Example uses https://github.com/auth0/node-jwks-rsa as a way to fetch the keys. -var jwksClient = require('jwks-rsa'); -var client = jwksClient({ - jwksUri: 'https://sandrino.auth0.com/.well-known/jwks.json' -}); -function getKey(header, callback){ - client.getSigningKey(header.kid, function(err, key) { - var signingKey = key.publicKey || key.rsaPublicKey; - callback(null, signingKey); - }); -} - -jwt.verify(token, getKey, options, function(err, decoded) { - console.log(decoded.foo) // bar -}); - -``` - -
-Need to peek into a JWT without verifying it? (Click to expand) - -### jwt.decode(token [, options]) - -(Synchronous) Returns the decoded payload without verifying if the signature is valid. - -> __Warning:__ This will __not__ verify whether the signature is valid. You should __not__ use this for untrusted messages. You most likely want to use `jwt.verify` instead. - -> __Warning:__ When the token comes from an untrusted source (e.g. user input or external request), the returned decoded payload should be treated like any other user input; please make sure to sanitize and only work with properties that are expected - - -`token` is the JsonWebToken string - -`options`: - -* `json`: force JSON.parse on the payload even if the header doesn't contain `"typ":"JWT"`. -* `complete`: return an object with the decoded payload and header. - -Example - -```js -// get the decoded payload ignoring signature, no secretOrPrivateKey needed -var decoded = jwt.decode(token); - -// get the decoded payload and header -var decoded = jwt.decode(token, {complete: true}); -console.log(decoded.header); -console.log(decoded.payload) -``` - -
- -## Errors & Codes -Possible thrown errors during verification. -Error is the first argument of the verification callback. - -### TokenExpiredError - -Thrown error if the token is expired. - -Error object: - -* name: 'TokenExpiredError' -* message: 'jwt expired' -* expiredAt: [ExpDate] - -```js -jwt.verify(token, 'shhhhh', function(err, decoded) { - if (err) { - /* - err = { - name: 'TokenExpiredError', - message: 'jwt expired', - expiredAt: 1408621000 - } - */ - } -}); -``` - -### JsonWebTokenError -Error object: - -* name: 'JsonWebTokenError' -* message: - * 'invalid token' - the header or payload could not be parsed - * 'jwt malformed' - the token does not have three components (delimited by a `.`) - * 'jwt signature is required' - * 'invalid signature' - * 'jwt audience invalid. expected: [OPTIONS AUDIENCE]' - * 'jwt issuer invalid. expected: [OPTIONS ISSUER]' - * 'jwt id invalid. expected: [OPTIONS JWT ID]' - * 'jwt subject invalid. expected: [OPTIONS SUBJECT]' - -```js -jwt.verify(token, 'shhhhh', function(err, decoded) { - if (err) { - /* - err = { - name: 'JsonWebTokenError', - message: 'jwt malformed' - } - */ - } -}); -``` - -### NotBeforeError -Thrown if current time is before the nbf claim. - -Error object: - -* name: 'NotBeforeError' -* message: 'jwt not active' -* date: 2018-10-04T16:10:44.000Z - -```js -jwt.verify(token, 'shhhhh', function(err, decoded) { - if (err) { - /* - err = { - name: 'NotBeforeError', - message: 'jwt not active', - date: 2018-10-04T16:10:44.000Z - } - */ - } -}); -``` - - -## Algorithms supported - -Array of supported algorithms. The following algorithms are currently supported. - -| alg Parameter Value | Digital Signature or MAC Algorithm | -|---------------------|------------------------------------------------------------------------| -| HS256 | HMAC using SHA-256 hash algorithm | -| HS384 | HMAC using SHA-384 hash algorithm | -| HS512 | HMAC using SHA-512 hash algorithm | -| RS256 | RSASSA-PKCS1-v1_5 using SHA-256 hash algorithm | -| RS384 | RSASSA-PKCS1-v1_5 using SHA-384 hash algorithm | -| RS512 | RSASSA-PKCS1-v1_5 using SHA-512 hash algorithm | -| PS256 | RSASSA-PSS using SHA-256 hash algorithm (only node ^6.12.0 OR >=8.0.0) | -| PS384 | RSASSA-PSS using SHA-384 hash algorithm (only node ^6.12.0 OR >=8.0.0) | -| PS512 | RSASSA-PSS using SHA-512 hash algorithm (only node ^6.12.0 OR >=8.0.0) | -| ES256 | ECDSA using P-256 curve and SHA-256 hash algorithm | -| ES384 | ECDSA using P-384 curve and SHA-384 hash algorithm | -| ES512 | ECDSA using P-521 curve and SHA-512 hash algorithm | -| none | No digital signature or MAC value included | - -## Refreshing JWTs - -First of all, we recommend you to think carefully if auto-refreshing a JWT will not introduce any vulnerability in your system. - -We are not comfortable including this as part of the library, however, you can take a look at [this example](https://gist.github.com/ziluvatar/a3feb505c4c0ec37059054537b38fc48) to show how this could be accomplished. -Apart from that example there are [an issue](https://github.com/auth0/node-jsonwebtoken/issues/122) and [a pull request](https://github.com/auth0/node-jsonwebtoken/pull/172) to get more knowledge about this topic. - -# TODO - -* X.509 certificate chain is not checked - -## Issue Reporting - -If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The [Responsible Disclosure Program](https://auth0.com/whitehat) details the procedure for disclosing security issues. - -## Author - -[Auth0](https://auth0.com) - -## License - -This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info. diff --git a/node_modules/jsonwebtoken/decode.js b/node_modules/jsonwebtoken/decode.js deleted file mode 100644 index 8fe1adc..0000000 --- a/node_modules/jsonwebtoken/decode.js +++ /dev/null @@ -1,30 +0,0 @@ -var jws = require('jws'); - -module.exports = function (jwt, options) { - options = options || {}; - var decoded = jws.decode(jwt, options); - if (!decoded) { return null; } - var payload = decoded.payload; - - //try parse the payload - if(typeof payload === 'string') { - try { - var obj = JSON.parse(payload); - if(obj !== null && typeof obj === 'object') { - payload = obj; - } - } catch (e) { } - } - - //return header if `complete` option is enabled. header includes claims - //such as `kid` and `alg` used to select the key within a JWKS needed to - //verify the signature - if (options.complete === true) { - return { - header: decoded.header, - payload: payload, - signature: decoded.signature - }; - } - return payload; -}; diff --git a/node_modules/jsonwebtoken/index.js b/node_modules/jsonwebtoken/index.js deleted file mode 100644 index 161eb2d..0000000 --- a/node_modules/jsonwebtoken/index.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - decode: require('./decode'), - verify: require('./verify'), - sign: require('./sign'), - JsonWebTokenError: require('./lib/JsonWebTokenError'), - NotBeforeError: require('./lib/NotBeforeError'), - TokenExpiredError: require('./lib/TokenExpiredError'), -}; diff --git a/node_modules/jsonwebtoken/lib/JsonWebTokenError.js b/node_modules/jsonwebtoken/lib/JsonWebTokenError.js deleted file mode 100644 index e068222..0000000 --- a/node_modules/jsonwebtoken/lib/JsonWebTokenError.js +++ /dev/null @@ -1,14 +0,0 @@ -var JsonWebTokenError = function (message, error) { - Error.call(this, message); - if(Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - this.name = 'JsonWebTokenError'; - this.message = message; - if (error) this.inner = error; -}; - -JsonWebTokenError.prototype = Object.create(Error.prototype); -JsonWebTokenError.prototype.constructor = JsonWebTokenError; - -module.exports = JsonWebTokenError; diff --git a/node_modules/jsonwebtoken/lib/NotBeforeError.js b/node_modules/jsonwebtoken/lib/NotBeforeError.js deleted file mode 100644 index 7b30084..0000000 --- a/node_modules/jsonwebtoken/lib/NotBeforeError.js +++ /dev/null @@ -1,13 +0,0 @@ -var JsonWebTokenError = require('./JsonWebTokenError'); - -var NotBeforeError = function (message, date) { - JsonWebTokenError.call(this, message); - this.name = 'NotBeforeError'; - this.date = date; -}; - -NotBeforeError.prototype = Object.create(JsonWebTokenError.prototype); - -NotBeforeError.prototype.constructor = NotBeforeError; - -module.exports = NotBeforeError; \ No newline at end of file diff --git a/node_modules/jsonwebtoken/lib/TokenExpiredError.js b/node_modules/jsonwebtoken/lib/TokenExpiredError.js deleted file mode 100644 index abb704f..0000000 --- a/node_modules/jsonwebtoken/lib/TokenExpiredError.js +++ /dev/null @@ -1,13 +0,0 @@ -var JsonWebTokenError = require('./JsonWebTokenError'); - -var TokenExpiredError = function (message, expiredAt) { - JsonWebTokenError.call(this, message); - this.name = 'TokenExpiredError'; - this.expiredAt = expiredAt; -}; - -TokenExpiredError.prototype = Object.create(JsonWebTokenError.prototype); - -TokenExpiredError.prototype.constructor = TokenExpiredError; - -module.exports = TokenExpiredError; \ No newline at end of file diff --git a/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js b/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js deleted file mode 100644 index a6ede56..0000000 --- a/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js +++ /dev/null @@ -1,3 +0,0 @@ -const semver = require('semver'); - -module.exports = semver.satisfies(process.version, '>=15.7.0'); diff --git a/node_modules/jsonwebtoken/lib/psSupported.js b/node_modules/jsonwebtoken/lib/psSupported.js deleted file mode 100644 index 8c04144..0000000 --- a/node_modules/jsonwebtoken/lib/psSupported.js +++ /dev/null @@ -1,3 +0,0 @@ -var semver = require('semver'); - -module.exports = semver.satisfies(process.version, '^6.12.0 || >=8.0.0'); diff --git a/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js b/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js deleted file mode 100644 index 7fcf368..0000000 --- a/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js +++ /dev/null @@ -1,3 +0,0 @@ -const semver = require('semver'); - -module.exports = semver.satisfies(process.version, '>=16.9.0'); diff --git a/node_modules/jsonwebtoken/lib/timespan.js b/node_modules/jsonwebtoken/lib/timespan.js deleted file mode 100644 index e509869..0000000 --- a/node_modules/jsonwebtoken/lib/timespan.js +++ /dev/null @@ -1,18 +0,0 @@ -var ms = require('ms'); - -module.exports = function (time, iat) { - var timestamp = iat || Math.floor(Date.now() / 1000); - - if (typeof time === 'string') { - var milliseconds = ms(time); - if (typeof milliseconds === 'undefined') { - return; - } - return Math.floor(timestamp + milliseconds / 1000); - } else if (typeof time === 'number') { - return timestamp + time; - } else { - return; - } - -}; \ No newline at end of file diff --git a/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js b/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js deleted file mode 100644 index c10340b..0000000 --- a/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js +++ /dev/null @@ -1,66 +0,0 @@ -const ASYMMETRIC_KEY_DETAILS_SUPPORTED = require('./asymmetricKeyDetailsSupported'); -const RSA_PSS_KEY_DETAILS_SUPPORTED = require('./rsaPssKeyDetailsSupported'); - -const allowedAlgorithmsForKeys = { - 'ec': ['ES256', 'ES384', 'ES512'], - 'rsa': ['RS256', 'PS256', 'RS384', 'PS384', 'RS512', 'PS512'], - 'rsa-pss': ['PS256', 'PS384', 'PS512'] -}; - -const allowedCurves = { - ES256: 'prime256v1', - ES384: 'secp384r1', - ES512: 'secp521r1', -}; - -module.exports = function(algorithm, key) { - if (!algorithm || !key) return; - - const keyType = key.asymmetricKeyType; - if (!keyType) return; - - const allowedAlgorithms = allowedAlgorithmsForKeys[keyType]; - - if (!allowedAlgorithms) { - throw new Error(`Unknown key type "${keyType}".`); - } - - if (!allowedAlgorithms.includes(algorithm)) { - throw new Error(`"alg" parameter for "${keyType}" key type must be one of: ${allowedAlgorithms.join(', ')}.`) - } - - /* - * Ignore the next block from test coverage because it gets executed - * conditionally depending on the Node version. Not ignoring it would - * prevent us from reaching the target % of coverage for versions of - * Node under 15.7.0. - */ - /* istanbul ignore next */ - if (ASYMMETRIC_KEY_DETAILS_SUPPORTED) { - switch (keyType) { - case 'ec': - const keyCurve = key.asymmetricKeyDetails.namedCurve; - const allowedCurve = allowedCurves[algorithm]; - - if (keyCurve !== allowedCurve) { - throw new Error(`"alg" parameter "${algorithm}" requires curve "${allowedCurve}".`); - } - break; - - case 'rsa-pss': - if (RSA_PSS_KEY_DETAILS_SUPPORTED) { - const length = parseInt(algorithm.slice(-3), 10); - const { hashAlgorithm, mgf1HashAlgorithm, saltLength } = key.asymmetricKeyDetails; - - if (hashAlgorithm !== `sha${length}` || mgf1HashAlgorithm !== hashAlgorithm) { - throw new Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${algorithm}.`); - } - - if (saltLength !== undefined && saltLength > length >> 3) { - throw new Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${algorithm}.`) - } - } - break; - } - } -} diff --git a/node_modules/jsonwebtoken/package.json b/node_modules/jsonwebtoken/package.json deleted file mode 100644 index eab30c0..0000000 --- a/node_modules/jsonwebtoken/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "jsonwebtoken", - "version": "9.0.3", - "description": "JSON Web Token implementation (symmetric and asymmetric)", - "main": "index.js", - "nyc": { - "check-coverage": true, - "lines": 95, - "statements": 95, - "functions": 100, - "branches": 95, - "exclude": [ - "./test/**" - ], - "reporter": [ - "json", - "lcov", - "text-summary" - ] - }, - "scripts": { - "lint": "eslint .", - "coverage": "nyc mocha --use_strict", - "test": "mocha" - }, - "repository": { - "type": "git", - "url": "https://github.com/auth0/node-jsonwebtoken" - }, - "keywords": [ - "jwt" - ], - "author": "auth0", - "license": "MIT", - "bugs": { - "url": "https://github.com/auth0/node-jsonwebtoken/issues" - }, - "dependencies": { - "jws": "^4.0.1", - "lodash.includes": "^4.3.0", - "lodash.isboolean": "^3.0.3", - "lodash.isinteger": "^4.0.4", - "lodash.isnumber": "^3.0.3", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.once": "^4.0.0", - "ms": "^2.1.1", - "semver": "^7.5.4" - }, - "devDependencies": { - "atob": "^2.1.2", - "chai": "^4.1.2", - "conventional-changelog": "~1.1.0", - "eslint": "^4.19.1", - "mocha": "^5.2.0", - "nsp": "^2.6.2", - "nyc": "^11.9.0", - "sinon": "^6.0.0" - }, - "engines": { - "npm": ">=6", - "node": ">=12" - }, - "files": [ - "lib", - "decode.js", - "sign.js", - "verify.js" - ] -} diff --git a/node_modules/jsonwebtoken/sign.js b/node_modules/jsonwebtoken/sign.js deleted file mode 100644 index 82bf526..0000000 --- a/node_modules/jsonwebtoken/sign.js +++ /dev/null @@ -1,253 +0,0 @@ -const timespan = require('./lib/timespan'); -const PS_SUPPORTED = require('./lib/psSupported'); -const validateAsymmetricKey = require('./lib/validateAsymmetricKey'); -const jws = require('jws'); -const includes = require('lodash.includes'); -const isBoolean = require('lodash.isboolean'); -const isInteger = require('lodash.isinteger'); -const isNumber = require('lodash.isnumber'); -const isPlainObject = require('lodash.isplainobject'); -const isString = require('lodash.isstring'); -const once = require('lodash.once'); -const { KeyObject, createSecretKey, createPrivateKey } = require('crypto') - -const SUPPORTED_ALGS = ['RS256', 'RS384', 'RS512', 'ES256', 'ES384', 'ES512', 'HS256', 'HS384', 'HS512', 'none']; -if (PS_SUPPORTED) { - SUPPORTED_ALGS.splice(3, 0, 'PS256', 'PS384', 'PS512'); -} - -const sign_options_schema = { - expiresIn: { isValid: function(value) { return isInteger(value) || (isString(value) && value); }, message: '"expiresIn" should be a number of seconds or string representing a timespan' }, - notBefore: { isValid: function(value) { return isInteger(value) || (isString(value) && value); }, message: '"notBefore" should be a number of seconds or string representing a timespan' }, - audience: { isValid: function(value) { return isString(value) || Array.isArray(value); }, message: '"audience" must be a string or array' }, - algorithm: { isValid: includes.bind(null, SUPPORTED_ALGS), message: '"algorithm" must be a valid string enum value' }, - header: { isValid: isPlainObject, message: '"header" must be an object' }, - encoding: { isValid: isString, message: '"encoding" must be a string' }, - issuer: { isValid: isString, message: '"issuer" must be a string' }, - subject: { isValid: isString, message: '"subject" must be a string' }, - jwtid: { isValid: isString, message: '"jwtid" must be a string' }, - noTimestamp: { isValid: isBoolean, message: '"noTimestamp" must be a boolean' }, - keyid: { isValid: isString, message: '"keyid" must be a string' }, - mutatePayload: { isValid: isBoolean, message: '"mutatePayload" must be a boolean' }, - allowInsecureKeySizes: { isValid: isBoolean, message: '"allowInsecureKeySizes" must be a boolean'}, - allowInvalidAsymmetricKeyTypes: { isValid: isBoolean, message: '"allowInvalidAsymmetricKeyTypes" must be a boolean'} -}; - -const registered_claims_schema = { - iat: { isValid: isNumber, message: '"iat" should be a number of seconds' }, - exp: { isValid: isNumber, message: '"exp" should be a number of seconds' }, - nbf: { isValid: isNumber, message: '"nbf" should be a number of seconds' } -}; - -function validate(schema, allowUnknown, object, parameterName) { - if (!isPlainObject(object)) { - throw new Error('Expected "' + parameterName + '" to be a plain object.'); - } - Object.keys(object) - .forEach(function(key) { - const validator = schema[key]; - if (!validator) { - if (!allowUnknown) { - throw new Error('"' + key + '" is not allowed in "' + parameterName + '"'); - } - return; - } - if (!validator.isValid(object[key])) { - throw new Error(validator.message); - } - }); -} - -function validateOptions(options) { - return validate(sign_options_schema, false, options, 'options'); -} - -function validatePayload(payload) { - return validate(registered_claims_schema, true, payload, 'payload'); -} - -const options_to_payload = { - 'audience': 'aud', - 'issuer': 'iss', - 'subject': 'sub', - 'jwtid': 'jti' -}; - -const options_for_objects = [ - 'expiresIn', - 'notBefore', - 'noTimestamp', - 'audience', - 'issuer', - 'subject', - 'jwtid', -]; - -module.exports = function (payload, secretOrPrivateKey, options, callback) { - if (typeof options === 'function') { - callback = options; - options = {}; - } else { - options = options || {}; - } - - const isObjectPayload = typeof payload === 'object' && - !Buffer.isBuffer(payload); - - const header = Object.assign({ - alg: options.algorithm || 'HS256', - typ: isObjectPayload ? 'JWT' : undefined, - kid: options.keyid - }, options.header); - - function failure(err) { - if (callback) { - return callback(err); - } - throw err; - } - - if (!secretOrPrivateKey && options.algorithm !== 'none') { - return failure(new Error('secretOrPrivateKey must have a value')); - } - - if (secretOrPrivateKey != null && !(secretOrPrivateKey instanceof KeyObject)) { - try { - secretOrPrivateKey = createPrivateKey(secretOrPrivateKey) - } catch (_) { - try { - secretOrPrivateKey = createSecretKey(typeof secretOrPrivateKey === 'string' ? Buffer.from(secretOrPrivateKey) : secretOrPrivateKey) - } catch (_) { - return failure(new Error('secretOrPrivateKey is not valid key material')); - } - } - } - - if (header.alg.startsWith('HS') && secretOrPrivateKey.type !== 'secret') { - return failure(new Error((`secretOrPrivateKey must be a symmetric key when using ${header.alg}`))) - } else if (/^(?:RS|PS|ES)/.test(header.alg)) { - if (secretOrPrivateKey.type !== 'private') { - return failure(new Error((`secretOrPrivateKey must be an asymmetric key when using ${header.alg}`))) - } - if (!options.allowInsecureKeySizes && - !header.alg.startsWith('ES') && - secretOrPrivateKey.asymmetricKeyDetails !== undefined && //KeyObject.asymmetricKeyDetails is supported in Node 15+ - secretOrPrivateKey.asymmetricKeyDetails.modulusLength < 2048) { - return failure(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`)); - } - } - - if (typeof payload === 'undefined') { - return failure(new Error('payload is required')); - } else if (isObjectPayload) { - try { - validatePayload(payload); - } - catch (error) { - return failure(error); - } - if (!options.mutatePayload) { - payload = Object.assign({},payload); - } - } else { - const invalid_options = options_for_objects.filter(function (opt) { - return typeof options[opt] !== 'undefined'; - }); - - if (invalid_options.length > 0) { - return failure(new Error('invalid ' + invalid_options.join(',') + ' option for ' + (typeof payload ) + ' payload')); - } - } - - if (typeof payload.exp !== 'undefined' && typeof options.expiresIn !== 'undefined') { - return failure(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.')); - } - - if (typeof payload.nbf !== 'undefined' && typeof options.notBefore !== 'undefined') { - return failure(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.')); - } - - try { - validateOptions(options); - } - catch (error) { - return failure(error); - } - - if (!options.allowInvalidAsymmetricKeyTypes) { - try { - validateAsymmetricKey(header.alg, secretOrPrivateKey); - } catch (error) { - return failure(error); - } - } - - const timestamp = payload.iat || Math.floor(Date.now() / 1000); - - if (options.noTimestamp) { - delete payload.iat; - } else if (isObjectPayload) { - payload.iat = timestamp; - } - - if (typeof options.notBefore !== 'undefined') { - try { - payload.nbf = timespan(options.notBefore, timestamp); - } - catch (err) { - return failure(err); - } - if (typeof payload.nbf === 'undefined') { - return failure(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60')); - } - } - - if (typeof options.expiresIn !== 'undefined' && typeof payload === 'object') { - try { - payload.exp = timespan(options.expiresIn, timestamp); - } - catch (err) { - return failure(err); - } - if (typeof payload.exp === 'undefined') { - return failure(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60')); - } - } - - Object.keys(options_to_payload).forEach(function (key) { - const claim = options_to_payload[key]; - if (typeof options[key] !== 'undefined') { - if (typeof payload[claim] !== 'undefined') { - return failure(new Error('Bad "options.' + key + '" option. The payload already has an "' + claim + '" property.')); - } - payload[claim] = options[key]; - } - }); - - const encoding = options.encoding || 'utf8'; - - if (typeof callback === 'function') { - callback = callback && once(callback); - - jws.createSign({ - header: header, - privateKey: secretOrPrivateKey, - payload: payload, - encoding: encoding - }).once('error', callback) - .once('done', function (signature) { - // TODO: Remove in favor of the modulus length check before signing once node 15+ is the minimum supported version - if(!options.allowInsecureKeySizes && /^(?:RS|PS)/.test(header.alg) && signature.length < 256) { - return callback(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`)) - } - callback(null, signature); - }); - } else { - let signature = jws.sign({header: header, payload: payload, secret: secretOrPrivateKey, encoding: encoding}); - // TODO: Remove in favor of the modulus length check before signing once node 15+ is the minimum supported version - if(!options.allowInsecureKeySizes && /^(?:RS|PS)/.test(header.alg) && signature.length < 256) { - throw new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`) - } - return signature - } -}; diff --git a/node_modules/jsonwebtoken/verify.js b/node_modules/jsonwebtoken/verify.js deleted file mode 100644 index cdbfdc4..0000000 --- a/node_modules/jsonwebtoken/verify.js +++ /dev/null @@ -1,263 +0,0 @@ -const JsonWebTokenError = require('./lib/JsonWebTokenError'); -const NotBeforeError = require('./lib/NotBeforeError'); -const TokenExpiredError = require('./lib/TokenExpiredError'); -const decode = require('./decode'); -const timespan = require('./lib/timespan'); -const validateAsymmetricKey = require('./lib/validateAsymmetricKey'); -const PS_SUPPORTED = require('./lib/psSupported'); -const jws = require('jws'); -const {KeyObject, createSecretKey, createPublicKey} = require("crypto"); - -const PUB_KEY_ALGS = ['RS256', 'RS384', 'RS512']; -const EC_KEY_ALGS = ['ES256', 'ES384', 'ES512']; -const RSA_KEY_ALGS = ['RS256', 'RS384', 'RS512']; -const HS_ALGS = ['HS256', 'HS384', 'HS512']; - -if (PS_SUPPORTED) { - PUB_KEY_ALGS.splice(PUB_KEY_ALGS.length, 0, 'PS256', 'PS384', 'PS512'); - RSA_KEY_ALGS.splice(RSA_KEY_ALGS.length, 0, 'PS256', 'PS384', 'PS512'); -} - -module.exports = function (jwtString, secretOrPublicKey, options, callback) { - if ((typeof options === 'function') && !callback) { - callback = options; - options = {}; - } - - if (!options) { - options = {}; - } - - //clone this object since we are going to mutate it. - options = Object.assign({}, options); - - let done; - - if (callback) { - done = callback; - } else { - done = function(err, data) { - if (err) throw err; - return data; - }; - } - - if (options.clockTimestamp && typeof options.clockTimestamp !== 'number') { - return done(new JsonWebTokenError('clockTimestamp must be a number')); - } - - if (options.nonce !== undefined && (typeof options.nonce !== 'string' || options.nonce.trim() === '')) { - return done(new JsonWebTokenError('nonce must be a non-empty string')); - } - - if (options.allowInvalidAsymmetricKeyTypes !== undefined && typeof options.allowInvalidAsymmetricKeyTypes !== 'boolean') { - return done(new JsonWebTokenError('allowInvalidAsymmetricKeyTypes must be a boolean')); - } - - const clockTimestamp = options.clockTimestamp || Math.floor(Date.now() / 1000); - - if (!jwtString){ - return done(new JsonWebTokenError('jwt must be provided')); - } - - if (typeof jwtString !== 'string') { - return done(new JsonWebTokenError('jwt must be a string')); - } - - const parts = jwtString.split('.'); - - if (parts.length !== 3){ - return done(new JsonWebTokenError('jwt malformed')); - } - - let decodedToken; - - try { - decodedToken = decode(jwtString, { complete: true }); - } catch(err) { - return done(err); - } - - if (!decodedToken) { - return done(new JsonWebTokenError('invalid token')); - } - - const header = decodedToken.header; - let getSecret; - - if(typeof secretOrPublicKey === 'function') { - if(!callback) { - return done(new JsonWebTokenError('verify must be called asynchronous if secret or public key is provided as a callback')); - } - - getSecret = secretOrPublicKey; - } - else { - getSecret = function(header, secretCallback) { - return secretCallback(null, secretOrPublicKey); - }; - } - - return getSecret(header, function(err, secretOrPublicKey) { - if(err) { - return done(new JsonWebTokenError('error in secret or public key callback: ' + err.message)); - } - - const hasSignature = parts[2].trim() !== ''; - - if (!hasSignature && secretOrPublicKey){ - return done(new JsonWebTokenError('jwt signature is required')); - } - - if (hasSignature && !secretOrPublicKey) { - return done(new JsonWebTokenError('secret or public key must be provided')); - } - - if (!hasSignature && !options.algorithms) { - return done(new JsonWebTokenError('please specify "none" in "algorithms" to verify unsigned tokens')); - } - - if (secretOrPublicKey != null && !(secretOrPublicKey instanceof KeyObject)) { - try { - secretOrPublicKey = createPublicKey(secretOrPublicKey); - } catch (_) { - try { - secretOrPublicKey = createSecretKey(typeof secretOrPublicKey === 'string' ? Buffer.from(secretOrPublicKey) : secretOrPublicKey); - } catch (_) { - return done(new JsonWebTokenError('secretOrPublicKey is not valid key material')) - } - } - } - - if (!options.algorithms) { - if (secretOrPublicKey.type === 'secret') { - options.algorithms = HS_ALGS; - } else if (['rsa', 'rsa-pss'].includes(secretOrPublicKey.asymmetricKeyType)) { - options.algorithms = RSA_KEY_ALGS - } else if (secretOrPublicKey.asymmetricKeyType === 'ec') { - options.algorithms = EC_KEY_ALGS - } else { - options.algorithms = PUB_KEY_ALGS - } - } - - if (options.algorithms.indexOf(decodedToken.header.alg) === -1) { - return done(new JsonWebTokenError('invalid algorithm')); - } - - if (header.alg.startsWith('HS') && secretOrPublicKey.type !== 'secret') { - return done(new JsonWebTokenError((`secretOrPublicKey must be a symmetric key when using ${header.alg}`))) - } else if (/^(?:RS|PS|ES)/.test(header.alg) && secretOrPublicKey.type !== 'public') { - return done(new JsonWebTokenError((`secretOrPublicKey must be an asymmetric key when using ${header.alg}`))) - } - - if (!options.allowInvalidAsymmetricKeyTypes) { - try { - validateAsymmetricKey(header.alg, secretOrPublicKey); - } catch (e) { - return done(e); - } - } - - let valid; - - try { - valid = jws.verify(jwtString, decodedToken.header.alg, secretOrPublicKey); - } catch (e) { - return done(e); - } - - if (!valid) { - return done(new JsonWebTokenError('invalid signature')); - } - - const payload = decodedToken.payload; - - if (typeof payload.nbf !== 'undefined' && !options.ignoreNotBefore) { - if (typeof payload.nbf !== 'number') { - return done(new JsonWebTokenError('invalid nbf value')); - } - if (payload.nbf > clockTimestamp + (options.clockTolerance || 0)) { - return done(new NotBeforeError('jwt not active', new Date(payload.nbf * 1000))); - } - } - - if (typeof payload.exp !== 'undefined' && !options.ignoreExpiration) { - if (typeof payload.exp !== 'number') { - return done(new JsonWebTokenError('invalid exp value')); - } - if (clockTimestamp >= payload.exp + (options.clockTolerance || 0)) { - return done(new TokenExpiredError('jwt expired', new Date(payload.exp * 1000))); - } - } - - if (options.audience) { - const audiences = Array.isArray(options.audience) ? options.audience : [options.audience]; - const target = Array.isArray(payload.aud) ? payload.aud : [payload.aud]; - - const match = target.some(function (targetAudience) { - return audiences.some(function (audience) { - return audience instanceof RegExp ? audience.test(targetAudience) : audience === targetAudience; - }); - }); - - if (!match) { - return done(new JsonWebTokenError('jwt audience invalid. expected: ' + audiences.join(' or '))); - } - } - - if (options.issuer) { - const invalid_issuer = - (typeof options.issuer === 'string' && payload.iss !== options.issuer) || - (Array.isArray(options.issuer) && options.issuer.indexOf(payload.iss) === -1); - - if (invalid_issuer) { - return done(new JsonWebTokenError('jwt issuer invalid. expected: ' + options.issuer)); - } - } - - if (options.subject) { - if (payload.sub !== options.subject) { - return done(new JsonWebTokenError('jwt subject invalid. expected: ' + options.subject)); - } - } - - if (options.jwtid) { - if (payload.jti !== options.jwtid) { - return done(new JsonWebTokenError('jwt jwtid invalid. expected: ' + options.jwtid)); - } - } - - if (options.nonce) { - if (payload.nonce !== options.nonce) { - return done(new JsonWebTokenError('jwt nonce invalid. expected: ' + options.nonce)); - } - } - - if (options.maxAge) { - if (typeof payload.iat !== 'number') { - return done(new JsonWebTokenError('iat required when maxAge is specified')); - } - - const maxAgeTimestamp = timespan(options.maxAge, payload.iat); - if (typeof maxAgeTimestamp === 'undefined') { - return done(new JsonWebTokenError('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60')); - } - if (clockTimestamp >= maxAgeTimestamp + (options.clockTolerance || 0)) { - return done(new TokenExpiredError('maxAge exceeded', new Date(maxAgeTimestamp * 1000))); - } - } - - if (options.complete === true) { - const signature = decodedToken.signature; - - return done(null, { - header: header, - payload: payload, - signature: signature - }); - } - - return done(null, payload); - }); -}; diff --git a/node_modules/jwa/LICENSE b/node_modules/jwa/LICENSE deleted file mode 100644 index caeb849..0000000 --- a/node_modules/jwa/LICENSE +++ /dev/null @@ -1,17 +0,0 @@ -Copyright (c) 2013 Brian J. Brennan - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the -Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE -FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/jwa/README.md b/node_modules/jwa/README.md deleted file mode 100644 index 09e9648..0000000 --- a/node_modules/jwa/README.md +++ /dev/null @@ -1,150 +0,0 @@ -# node-jwa [![Build Status](https://travis-ci.org/brianloveswords/node-jwa.svg?branch=master)](https://travis-ci.org/brianloveswords/node-jwa) - -A -[JSON Web Algorithms](http://tools.ietf.org/id/draft-ietf-jose-json-web-algorithms-08.html) -implementation focusing (exclusively, at this point) on the algorithms necessary for -[JSON Web Signatures](http://self-issued.info/docs/draft-ietf-jose-json-web-signature.html). - -This library supports all of the required, recommended and optional cryptographic algorithms for JWS: - -alg Parameter Value | Digital Signature or MAC Algorithm -----------------|---------------------------- -HS256 | HMAC using SHA-256 hash algorithm -HS384 | HMAC using SHA-384 hash algorithm -HS512 | HMAC using SHA-512 hash algorithm -RS256 | RSASSA using SHA-256 hash algorithm -RS384 | RSASSA using SHA-384 hash algorithm -RS512 | RSASSA using SHA-512 hash algorithm -PS256 | RSASSA-PSS using SHA-256 hash algorithm -PS384 | RSASSA-PSS using SHA-384 hash algorithm -PS512 | RSASSA-PSS using SHA-512 hash algorithm -ES256 | ECDSA using P-256 curve and SHA-256 hash algorithm -ES384 | ECDSA using P-384 curve and SHA-384 hash algorithm -ES512 | ECDSA using P-521 curve and SHA-512 hash algorithm -none | No digital signature or MAC value included - -Please note that PS* only works on Node 6.12+ (excluding 7.x). - -# Requirements - -In order to run the tests, a recent version of OpenSSL is -required. **The version that comes with OS X (OpenSSL 0.9.8r 8 Feb -2011) is not recent enough**, as it does not fully support ECDSA -keys. You'll need to use a version > 1.0.0; I tested with OpenSSL 1.0.1c 10 May 2012. - -# Testing - -To run the tests, do - -```bash -$ npm test -``` - -This will generate a bunch of keypairs to use in testing. If you want to -generate new keypairs, do `make clean` before running `npm test` again. - -## Methodology - -I spawn `openssl dgst -sign` to test OpenSSL sign → JS verify and -`openssl dgst -verify` to test JS sign → OpenSSL verify for each of the -RSA and ECDSA algorithms. - -# Usage - -## jwa(algorithm) - -Creates a new `jwa` object with `sign` and `verify` methods for the -algorithm. Valid values for algorithm can be found in the table above -(`'HS256'`, `'HS384'`, etc) and are case-sensitive. Passing an invalid -algorithm value will throw a `TypeError`. - - -## jwa#sign(input, secretOrPrivateKey) - -Sign some input with either a secret for HMAC algorithms, or a private -key for RSA and ECDSA algorithms. - -If input is not already a string or buffer, `JSON.stringify` will be -called on it to attempt to coerce it. - -For the HMAC algorithm, `secretOrPrivateKey` should be a string or a -buffer. For ECDSA and RSA, the value should be a string representing a -PEM encoded **private** key. - -Output [base64url](http://en.wikipedia.org/wiki/Base64#URL_applications) -formatted. This is for convenience as JWS expects the signature in this -format. If your application needs the output in a different format, -[please open an issue](https://github.com/brianloveswords/node-jwa/issues). In -the meantime, you can use -[brianloveswords/base64url](https://github.com/brianloveswords/base64url) -to decode the signature. - -As of nodejs *v0.11.8*, SPKAC support was introduce. If your nodeJs -version satisfies, then you can pass an object `{ key: '..', passphrase: '...' }` - - -## jwa#verify(input, signature, secretOrPublicKey) - -Verify a signature. Returns `true` or `false`. - -`signature` should be a base64url encoded string. - -For the HMAC algorithm, `secretOrPublicKey` should be a string or a -buffer. For ECDSA and RSA, the value should be a string represented a -PEM encoded **public** key. - - -# Example - -HMAC -```js -const jwa = require('jwa'); - -const hmac = jwa('HS256'); -const input = 'super important stuff'; -const secret = 'shhhhhh'; - -const signature = hmac.sign(input, secret); -hmac.verify(input, signature, secret) // === true -hmac.verify(input, signature, 'trickery!') // === false -``` - -With keys -```js -const fs = require('fs'); -const jwa = require('jwa'); -const privateKey = fs.readFileSync(__dirname + '/ecdsa-p521-private.pem'); -const publicKey = fs.readFileSync(__dirname + '/ecdsa-p521-public.pem'); - -const ecdsa = jwa('ES512'); -const input = 'very important stuff'; - -const signature = ecdsa.sign(input, privateKey); -ecdsa.verify(input, signature, publicKey) // === true -``` -## License - -MIT - -``` -Copyright (c) 2013 Brian J. Brennan - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -``` diff --git a/node_modules/jwa/index.js b/node_modules/jwa/index.js deleted file mode 100644 index 5072c34..0000000 --- a/node_modules/jwa/index.js +++ /dev/null @@ -1,266 +0,0 @@ -var Buffer = require('safe-buffer').Buffer; -var crypto = require('crypto'); -var formatEcdsa = require('ecdsa-sig-formatter'); -var util = require('util'); - -var MSG_INVALID_ALGORITHM = '"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".' -var MSG_INVALID_SECRET = 'secret must be a string or buffer'; -var MSG_INVALID_VERIFIER_KEY = 'key must be a string or a buffer'; -var MSG_INVALID_SIGNER_KEY = 'key must be a string, a buffer or an object'; - -var supportsKeyObjects = typeof crypto.createPublicKey === 'function'; -if (supportsKeyObjects) { - MSG_INVALID_VERIFIER_KEY += ' or a KeyObject'; - MSG_INVALID_SECRET += 'or a KeyObject'; -} - -function checkIsPublicKey(key) { - if (Buffer.isBuffer(key)) { - return; - } - - if (typeof key === 'string') { - return; - } - - if (!supportsKeyObjects) { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } - - if (typeof key !== 'object') { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } - - if (typeof key.type !== 'string') { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } - - if (typeof key.asymmetricKeyType !== 'string') { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } - - if (typeof key.export !== 'function') { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } -}; - -function checkIsPrivateKey(key) { - if (Buffer.isBuffer(key)) { - return; - } - - if (typeof key === 'string') { - return; - } - - if (typeof key === 'object') { - return; - } - - throw typeError(MSG_INVALID_SIGNER_KEY); -}; - -function checkIsSecretKey(key) { - if (Buffer.isBuffer(key)) { - return; - } - - if (typeof key === 'string') { - return key; - } - - if (!supportsKeyObjects) { - throw typeError(MSG_INVALID_SECRET); - } - - if (typeof key !== 'object') { - throw typeError(MSG_INVALID_SECRET); - } - - if (key.type !== 'secret') { - throw typeError(MSG_INVALID_SECRET); - } - - if (typeof key.export !== 'function') { - throw typeError(MSG_INVALID_SECRET); - } -} - -function fromBase64(base64) { - return base64 - .replace(/=/g, '') - .replace(/\+/g, '-') - .replace(/\//g, '_'); -} - -function toBase64(base64url) { - base64url = base64url.toString(); - - var padding = 4 - base64url.length % 4; - if (padding !== 4) { - for (var i = 0; i < padding; ++i) { - base64url += '='; - } - } - - return base64url - .replace(/\-/g, '+') - .replace(/_/g, '/'); -} - -function typeError(template) { - var args = [].slice.call(arguments, 1); - var errMsg = util.format.bind(util, template).apply(null, args); - return new TypeError(errMsg); -} - -function bufferOrString(obj) { - return Buffer.isBuffer(obj) || typeof obj === 'string'; -} - -function normalizeInput(thing) { - if (!bufferOrString(thing)) - thing = JSON.stringify(thing); - return thing; -} - -function createHmacSigner(bits) { - return function sign(thing, secret) { - checkIsSecretKey(secret); - thing = normalizeInput(thing); - var hmac = crypto.createHmac('sha' + bits, secret); - var sig = (hmac.update(thing), hmac.digest('base64')) - return fromBase64(sig); - } -} - -var bufferEqual; -var timingSafeEqual = 'timingSafeEqual' in crypto ? function timingSafeEqual(a, b) { - if (a.byteLength !== b.byteLength) { - return false; - } - - return crypto.timingSafeEqual(a, b) -} : function timingSafeEqual(a, b) { - if (!bufferEqual) { - bufferEqual = require('buffer-equal-constant-time'); - } - - return bufferEqual(a, b) -} - -function createHmacVerifier(bits) { - return function verify(thing, signature, secret) { - var computedSig = createHmacSigner(bits)(thing, secret); - return timingSafeEqual(Buffer.from(signature), Buffer.from(computedSig)); - } -} - -function createKeySigner(bits) { - return function sign(thing, privateKey) { - checkIsPrivateKey(privateKey); - thing = normalizeInput(thing); - // Even though we are specifying "RSA" here, this works with ECDSA - // keys as well. - var signer = crypto.createSign('RSA-SHA' + bits); - var sig = (signer.update(thing), signer.sign(privateKey, 'base64')); - return fromBase64(sig); - } -} - -function createKeyVerifier(bits) { - return function verify(thing, signature, publicKey) { - checkIsPublicKey(publicKey); - thing = normalizeInput(thing); - signature = toBase64(signature); - var verifier = crypto.createVerify('RSA-SHA' + bits); - verifier.update(thing); - return verifier.verify(publicKey, signature, 'base64'); - } -} - -function createPSSKeySigner(bits) { - return function sign(thing, privateKey) { - checkIsPrivateKey(privateKey); - thing = normalizeInput(thing); - var signer = crypto.createSign('RSA-SHA' + bits); - var sig = (signer.update(thing), signer.sign({ - key: privateKey, - padding: crypto.constants.RSA_PKCS1_PSS_PADDING, - saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST - }, 'base64')); - return fromBase64(sig); - } -} - -function createPSSKeyVerifier(bits) { - return function verify(thing, signature, publicKey) { - checkIsPublicKey(publicKey); - thing = normalizeInput(thing); - signature = toBase64(signature); - var verifier = crypto.createVerify('RSA-SHA' + bits); - verifier.update(thing); - return verifier.verify({ - key: publicKey, - padding: crypto.constants.RSA_PKCS1_PSS_PADDING, - saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST - }, signature, 'base64'); - } -} - -function createECDSASigner(bits) { - var inner = createKeySigner(bits); - return function sign() { - var signature = inner.apply(null, arguments); - signature = formatEcdsa.derToJose(signature, 'ES' + bits); - return signature; - }; -} - -function createECDSAVerifer(bits) { - var inner = createKeyVerifier(bits); - return function verify(thing, signature, publicKey) { - signature = formatEcdsa.joseToDer(signature, 'ES' + bits).toString('base64'); - var result = inner(thing, signature, publicKey); - return result; - }; -} - -function createNoneSigner() { - return function sign() { - return ''; - } -} - -function createNoneVerifier() { - return function verify(thing, signature) { - return signature === ''; - } -} - -module.exports = function jwa(algorithm) { - var signerFactories = { - hs: createHmacSigner, - rs: createKeySigner, - ps: createPSSKeySigner, - es: createECDSASigner, - none: createNoneSigner, - } - var verifierFactories = { - hs: createHmacVerifier, - rs: createKeyVerifier, - ps: createPSSKeyVerifier, - es: createECDSAVerifer, - none: createNoneVerifier, - } - var match = algorithm.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/); - if (!match) - throw typeError(MSG_INVALID_ALGORITHM, algorithm); - var algo = (match[1] || match[3]).toLowerCase(); - var bits = match[2]; - - return { - sign: signerFactories[algo](bits), - verify: verifierFactories[algo](bits), - } -}; diff --git a/node_modules/jwa/opslevel.yml b/node_modules/jwa/opslevel.yml deleted file mode 100644 index aeeeea7..0000000 --- a/node_modules/jwa/opslevel.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -version: 1 -repository: - owner: iam_protocols - tier: - tags: diff --git a/node_modules/jwa/package.json b/node_modules/jwa/package.json deleted file mode 100644 index fd5824a..0000000 --- a/node_modules/jwa/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "jwa", - "version": "2.0.1", - "description": "JWA implementation (supports all JWS algorithms)", - "main": "index.js", - "directories": { - "test": "test" - }, - "dependencies": { - "buffer-equal-constant-time": "^1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - }, - "devDependencies": { - "base64url": "^2.0.0", - "jwk-to-pem": "^2.0.1", - "semver": "4.3.6", - "tap": "6.2.0" - }, - "scripts": { - "test": "make test" - }, - "repository": { - "type": "git", - "url": "git://github.com/brianloveswords/node-jwa.git" - }, - "keywords": [ - "jwa", - "jws", - "jwt", - "rsa", - "ecdsa", - "hmac" - ], - "author": "Brian J. Brennan ", - "license": "MIT" -} diff --git a/node_modules/jws/CHANGELOG.md b/node_modules/jws/CHANGELOG.md deleted file mode 100644 index 18078df..0000000 --- a/node_modules/jws/CHANGELOG.md +++ /dev/null @@ -1,56 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. - -## [4.0.1] - -### Changed - -- Fix advisory GHSA-869p-cjfg-cm3x: createSign and createVerify now require - that a non empty secret is provided (via opts.secret, opts.privateKey or opts.key) - when using HMAC algorithms. -- Upgrading JWA version to 2.0.1, adressing a compatibility issue for Node >= 25. - -## [3.2.3] - -### Changed - -- Fix advisory GHSA-869p-cjfg-cm3x: createSign and createVerify now require - that a non empty secret is provided (via opts.secret, opts.privateKey or opts.key) - when using HMAC algorithms. -- Upgrading JWA version to 1.4.2, adressing a compatibility issue for Node >= 25. - -## [3.0.0] - -### Changed - -- **BREAKING**: `jwt.verify` now requires an `algorithm` parameter, and - `jws.createVerify` requires an `algorithm` option. The `"alg"` field - signature headers is ignored. This mitigates a critical security flaw - in the library which would allow an attacker to generate signatures with - arbitrary contents that would be accepted by `jwt.verify`. See - https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/ - for details. - -## [2.0.0] - 2015-01-30 - -### Changed - -- **BREAKING**: Default payload encoding changed from `binary` to - `utf8`. `utf8` is a is a more sensible default than `binary` because - many payloads, as far as I can tell, will contain user-facing - strings that could be in any language. ([6b6de48]) - -- Code reorganization, thanks [@fearphage]! ([7880050]) - -### Added - -- Option in all relevant methods for `encoding`. For those few users - that might be depending on a `binary` encoding of the messages, this - is for them. ([6b6de48]) - -[unreleased]: https://github.com/brianloveswords/node-jws/compare/v2.0.0...HEAD -[2.0.0]: https://github.com/brianloveswords/node-jws/compare/v1.0.1...v2.0.0 -[7880050]: https://github.com/brianloveswords/node-jws/commit/7880050 -[6b6de48]: https://github.com/brianloveswords/node-jws/commit/6b6de48 -[@fearphage]: https://github.com/fearphage diff --git a/node_modules/jws/LICENSE b/node_modules/jws/LICENSE deleted file mode 100644 index caeb849..0000000 --- a/node_modules/jws/LICENSE +++ /dev/null @@ -1,17 +0,0 @@ -Copyright (c) 2013 Brian J. Brennan - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the -Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE -FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/jws/index.js b/node_modules/jws/index.js deleted file mode 100644 index 8c8da93..0000000 --- a/node_modules/jws/index.js +++ /dev/null @@ -1,22 +0,0 @@ -/*global exports*/ -var SignStream = require('./lib/sign-stream'); -var VerifyStream = require('./lib/verify-stream'); - -var ALGORITHMS = [ - 'HS256', 'HS384', 'HS512', - 'RS256', 'RS384', 'RS512', - 'PS256', 'PS384', 'PS512', - 'ES256', 'ES384', 'ES512' -]; - -exports.ALGORITHMS = ALGORITHMS; -exports.sign = SignStream.sign; -exports.verify = VerifyStream.verify; -exports.decode = VerifyStream.decode; -exports.isValid = VerifyStream.isValid; -exports.createSign = function createSign(opts) { - return new SignStream(opts); -}; -exports.createVerify = function createVerify(opts) { - return new VerifyStream(opts); -}; diff --git a/node_modules/jws/lib/data-stream.js b/node_modules/jws/lib/data-stream.js deleted file mode 100644 index 3535d31..0000000 --- a/node_modules/jws/lib/data-stream.js +++ /dev/null @@ -1,55 +0,0 @@ -/*global module, process*/ -var Buffer = require('safe-buffer').Buffer; -var Stream = require('stream'); -var util = require('util'); - -function DataStream(data) { - this.buffer = null; - this.writable = true; - this.readable = true; - - // No input - if (!data) { - this.buffer = Buffer.alloc(0); - return this; - } - - // Stream - if (typeof data.pipe === 'function') { - this.buffer = Buffer.alloc(0); - data.pipe(this); - return this; - } - - // Buffer or String - // or Object (assumedly a passworded key) - if (data.length || typeof data === 'object') { - this.buffer = data; - this.writable = false; - process.nextTick(function () { - this.emit('end', data); - this.readable = false; - this.emit('close'); - }.bind(this)); - return this; - } - - throw new TypeError('Unexpected data type ('+ typeof data + ')'); -} -util.inherits(DataStream, Stream); - -DataStream.prototype.write = function write(data) { - this.buffer = Buffer.concat([this.buffer, Buffer.from(data)]); - this.emit('data', data); -}; - -DataStream.prototype.end = function end(data) { - if (data) - this.write(data); - this.emit('end', data); - this.emit('close'); - this.writable = false; - this.readable = false; -}; - -module.exports = DataStream; diff --git a/node_modules/jws/lib/sign-stream.js b/node_modules/jws/lib/sign-stream.js deleted file mode 100644 index 4a7b288..0000000 --- a/node_modules/jws/lib/sign-stream.js +++ /dev/null @@ -1,83 +0,0 @@ -/*global module*/ -var Buffer = require('safe-buffer').Buffer; -var DataStream = require('./data-stream'); -var jwa = require('jwa'); -var Stream = require('stream'); -var toString = require('./tostring'); -var util = require('util'); - -function base64url(string, encoding) { - return Buffer - .from(string, encoding) - .toString('base64') - .replace(/=/g, '') - .replace(/\+/g, '-') - .replace(/\//g, '_'); -} - -function jwsSecuredInput(header, payload, encoding) { - encoding = encoding || 'utf8'; - var encodedHeader = base64url(toString(header), 'binary'); - var encodedPayload = base64url(toString(payload), encoding); - return util.format('%s.%s', encodedHeader, encodedPayload); -} - -function jwsSign(opts) { - var header = opts.header; - var payload = opts.payload; - var secretOrKey = opts.secret || opts.privateKey; - var encoding = opts.encoding; - var algo = jwa(header.alg); - var securedInput = jwsSecuredInput(header, payload, encoding); - var signature = algo.sign(securedInput, secretOrKey); - return util.format('%s.%s', securedInput, signature); -} - -function SignStream(opts) { - var secret = opts.secret; - secret = secret == null ? opts.privateKey : secret; - secret = secret == null ? opts.key : secret; - if (/^hs/i.test(opts.header.alg) === true && secret == null) { - throw new TypeError('secret must be a string or buffer or a KeyObject') - } - var secretStream = new DataStream(secret); - this.readable = true; - this.header = opts.header; - this.encoding = opts.encoding; - this.secret = this.privateKey = this.key = secretStream; - this.payload = new DataStream(opts.payload); - this.secret.once('close', function () { - if (!this.payload.writable && this.readable) - this.sign(); - }.bind(this)); - - this.payload.once('close', function () { - if (!this.secret.writable && this.readable) - this.sign(); - }.bind(this)); -} -util.inherits(SignStream, Stream); - -SignStream.prototype.sign = function sign() { - try { - var signature = jwsSign({ - header: this.header, - payload: this.payload.buffer, - secret: this.secret.buffer, - encoding: this.encoding - }); - this.emit('done', signature); - this.emit('data', signature); - this.emit('end'); - this.readable = false; - return signature; - } catch (e) { - this.readable = false; - this.emit('error', e); - this.emit('close'); - } -}; - -SignStream.sign = jwsSign; - -module.exports = SignStream; diff --git a/node_modules/jws/lib/tostring.js b/node_modules/jws/lib/tostring.js deleted file mode 100644 index f5a49a3..0000000 --- a/node_modules/jws/lib/tostring.js +++ /dev/null @@ -1,10 +0,0 @@ -/*global module*/ -var Buffer = require('buffer').Buffer; - -module.exports = function toString(obj) { - if (typeof obj === 'string') - return obj; - if (typeof obj === 'number' || Buffer.isBuffer(obj)) - return obj.toString(); - return JSON.stringify(obj); -}; diff --git a/node_modules/jws/lib/verify-stream.js b/node_modules/jws/lib/verify-stream.js deleted file mode 100644 index bb1cb00..0000000 --- a/node_modules/jws/lib/verify-stream.js +++ /dev/null @@ -1,125 +0,0 @@ -/*global module*/ -var Buffer = require('safe-buffer').Buffer; -var DataStream = require('./data-stream'); -var jwa = require('jwa'); -var Stream = require('stream'); -var toString = require('./tostring'); -var util = require('util'); -var JWS_REGEX = /^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/; - -function isObject(thing) { - return Object.prototype.toString.call(thing) === '[object Object]'; -} - -function safeJsonParse(thing) { - if (isObject(thing)) - return thing; - try { return JSON.parse(thing); } - catch (e) { return undefined; } -} - -function headerFromJWS(jwsSig) { - var encodedHeader = jwsSig.split('.', 1)[0]; - return safeJsonParse(Buffer.from(encodedHeader, 'base64').toString('binary')); -} - -function securedInputFromJWS(jwsSig) { - return jwsSig.split('.', 2).join('.'); -} - -function signatureFromJWS(jwsSig) { - return jwsSig.split('.')[2]; -} - -function payloadFromJWS(jwsSig, encoding) { - encoding = encoding || 'utf8'; - var payload = jwsSig.split('.')[1]; - return Buffer.from(payload, 'base64').toString(encoding); -} - -function isValidJws(string) { - return JWS_REGEX.test(string) && !!headerFromJWS(string); -} - -function jwsVerify(jwsSig, algorithm, secretOrKey) { - if (!algorithm) { - var err = new Error("Missing algorithm parameter for jws.verify"); - err.code = "MISSING_ALGORITHM"; - throw err; - } - jwsSig = toString(jwsSig); - var signature = signatureFromJWS(jwsSig); - var securedInput = securedInputFromJWS(jwsSig); - var algo = jwa(algorithm); - return algo.verify(securedInput, signature, secretOrKey); -} - -function jwsDecode(jwsSig, opts) { - opts = opts || {}; - jwsSig = toString(jwsSig); - - if (!isValidJws(jwsSig)) - return null; - - var header = headerFromJWS(jwsSig); - - if (!header) - return null; - - var payload = payloadFromJWS(jwsSig); - if (header.typ === 'JWT' || opts.json) - payload = JSON.parse(payload, opts.encoding); - - return { - header: header, - payload: payload, - signature: signatureFromJWS(jwsSig) - }; -} - -function VerifyStream(opts) { - opts = opts || {}; - var secretOrKey = opts.secret; - secretOrKey = secretOrKey == null ? opts.publicKey : secretOrKey; - secretOrKey = secretOrKey == null ? opts.key : secretOrKey; - if (/^hs/i.test(opts.algorithm) === true && secretOrKey == null) { - throw new TypeError('secret must be a string or buffer or a KeyObject') - } - var secretStream = new DataStream(secretOrKey); - this.readable = true; - this.algorithm = opts.algorithm; - this.encoding = opts.encoding; - this.secret = this.publicKey = this.key = secretStream; - this.signature = new DataStream(opts.signature); - this.secret.once('close', function () { - if (!this.signature.writable && this.readable) - this.verify(); - }.bind(this)); - - this.signature.once('close', function () { - if (!this.secret.writable && this.readable) - this.verify(); - }.bind(this)); -} -util.inherits(VerifyStream, Stream); -VerifyStream.prototype.verify = function verify() { - try { - var valid = jwsVerify(this.signature.buffer, this.algorithm, this.key.buffer); - var obj = jwsDecode(this.signature.buffer, this.encoding); - this.emit('done', valid, obj); - this.emit('data', valid); - this.emit('end'); - this.readable = false; - return valid; - } catch (e) { - this.readable = false; - this.emit('error', e); - this.emit('close'); - } -}; - -VerifyStream.decode = jwsDecode; -VerifyStream.isValid = isValidJws; -VerifyStream.verify = jwsVerify; - -module.exports = VerifyStream; diff --git a/node_modules/jws/opslevel.yml b/node_modules/jws/opslevel.yml deleted file mode 100644 index aeeeea7..0000000 --- a/node_modules/jws/opslevel.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -version: 1 -repository: - owner: iam_protocols - tier: - tags: diff --git a/node_modules/jws/package.json b/node_modules/jws/package.json deleted file mode 100644 index 464d72b..0000000 --- a/node_modules/jws/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "jws", - "version": "4.0.1", - "description": "Implementation of JSON Web Signatures", - "main": "index.js", - "directories": { - "test": "test" - }, - "scripts": { - "test": "make test" - }, - "repository": { - "type": "git", - "url": "git://github.com/brianloveswords/node-jws.git" - }, - "keywords": [ - "jws", - "json", - "web", - "signatures" - ], - "author": "Brian J Brennan", - "license": "MIT", - "readmeFilename": "readme.md", - "gitHead": "c0f6b27bcea5a2ad2e304d91c2e842e4076a6b03", - "dependencies": { - "jwa": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "devDependencies": { - "semver": "^5.1.0", - "tape": "~2.14.0" - } -} diff --git a/node_modules/jws/readme.md b/node_modules/jws/readme.md deleted file mode 100644 index 2f32dca..0000000 --- a/node_modules/jws/readme.md +++ /dev/null @@ -1,255 +0,0 @@ -# node-jws [![Build Status](https://secure.travis-ci.org/brianloveswords/node-jws.svg)](http://travis-ci.org/brianloveswords/node-jws) - -An implementation of [JSON Web Signatures](http://self-issued.info/docs/draft-ietf-jose-json-web-signature.html). - -This was developed against `draft-ietf-jose-json-web-signature-08` and -implements the entire spec **except** X.509 Certificate Chain -signing/verifying (patches welcome). - -There are both synchronous (`jws.sign`, `jws.verify`) and streaming -(`jws.createSign`, `jws.createVerify`) APIs. - -# Install - -```bash -$ npm install jws -``` - -# Usage - -## jws.ALGORITHMS - -Array of supported algorithms. The following algorithms are currently supported. - -alg Parameter Value | Digital Signature or MAC Algorithm -----------------|---------------------------- -HS256 | HMAC using SHA-256 hash algorithm -HS384 | HMAC using SHA-384 hash algorithm -HS512 | HMAC using SHA-512 hash algorithm -RS256 | RSASSA using SHA-256 hash algorithm -RS384 | RSASSA using SHA-384 hash algorithm -RS512 | RSASSA using SHA-512 hash algorithm -PS256 | RSASSA-PSS using SHA-256 hash algorithm -PS384 | RSASSA-PSS using SHA-384 hash algorithm -PS512 | RSASSA-PSS using SHA-512 hash algorithm -ES256 | ECDSA using P-256 curve and SHA-256 hash algorithm -ES384 | ECDSA using P-384 curve and SHA-384 hash algorithm -ES512 | ECDSA using P-521 curve and SHA-512 hash algorithm -none | No digital signature or MAC value included - -## jws.sign(options) - -(Synchronous) Return a JSON Web Signature for a header and a payload. - -Options: - -* `header` -* `payload` -* `secret` or `privateKey` -* `encoding` (Optional, defaults to 'utf8') - -`header` must be an object with an `alg` property. `header.alg` must be -one a value found in `jws.ALGORITHMS`. See above for a table of -supported algorithms. - -If `payload` is not a buffer or a string, it will be coerced into a string -using `JSON.stringify`. - -Example - -```js -const signature = jws.sign({ - header: { alg: 'HS256' }, - payload: 'h. jon benjamin', - secret: 'has a van', -}); -``` - -## jws.verify(signature, algorithm, secretOrKey) - -(Synchronous) Returns `true` or `false` for whether a signature matches a -secret or key. - -`signature` is a JWS Signature. `header.alg` must be a value found in `jws.ALGORITHMS`. -See above for a table of supported algorithms. `secretOrKey` is a string or -buffer containing either the secret for HMAC algorithms, or the PEM -encoded public key for RSA and ECDSA. - -Note that the `"alg"` value from the signature header is ignored. - - -## jws.decode(signature) - -(Synchronous) Returns the decoded header, decoded payload, and signature -parts of the JWS Signature. - -Returns an object with three properties, e.g. -```js -{ header: { alg: 'HS256' }, - payload: 'h. jon benjamin', - signature: 'YOWPewyGHKu4Y_0M_vtlEnNlqmFOclqp4Hy6hVHfFT4' -} -``` - -## jws.createSign(options) - -Returns a new SignStream object. - -Options: - -* `header` (required) -* `payload` -* `key` || `privateKey` || `secret` -* `encoding` (Optional, defaults to 'utf8') - -Other than `header`, all options expect a string or a buffer when the -value is known ahead of time, or a stream for convenience. -`key`/`privateKey`/`secret` may also be an object when using an encrypted -private key, see the [crypto documentation][encrypted-key-docs]. - -Example: - -```js - -// This... -jws.createSign({ - header: { alg: 'RS256' }, - privateKey: privateKeyStream, - payload: payloadStream, -}).on('done', function(signature) { - // ... -}); - -// is equivalent to this: -const signer = jws.createSign({ - header: { alg: 'RS256' }, -}); -privateKeyStream.pipe(signer.privateKey); -payloadStream.pipe(signer.payload); -signer.on('done', function(signature) { - // ... -}); -``` - -## jws.createVerify(options) - -Returns a new VerifyStream object. - -Options: - -* `signature` -* `algorithm` -* `key` || `publicKey` || `secret` -* `encoding` (Optional, defaults to 'utf8') - -All options expect a string or a buffer when the value is known ahead of -time, or a stream for convenience. - -Example: - -```js - -// This... -jws.createVerify({ - publicKey: pubKeyStream, - signature: sigStream, -}).on('done', function(verified, obj) { - // ... -}); - -// is equivilant to this: -const verifier = jws.createVerify(); -pubKeyStream.pipe(verifier.publicKey); -sigStream.pipe(verifier.signature); -verifier.on('done', function(verified, obj) { - // ... -}); -``` - -## Class: SignStream - -A `Readable Stream` that emits a single data event (the calculated -signature) when done. - -### Event: 'done' -`function (signature) { }` - -### signer.payload - -A `Writable Stream` that expects the JWS payload. Do *not* use if you -passed a `payload` option to the constructor. - -Example: - -```js -payloadStream.pipe(signer.payload); -``` - -### signer.secret
signer.key
signer.privateKey - -A `Writable Stream`. Expects the JWS secret for HMAC, or the privateKey -for ECDSA and RSA. Do *not* use if you passed a `secret` or `key` option -to the constructor. - -Example: - -```js -privateKeyStream.pipe(signer.privateKey); -``` - -## Class: VerifyStream - -This is a `Readable Stream` that emits a single data event, the result -of whether or not that signature was valid. - -### Event: 'done' -`function (valid, obj) { }` - -`valid` is a boolean for whether or not the signature is valid. - -### verifier.signature - -A `Writable Stream` that expects a JWS Signature. Do *not* use if you -passed a `signature` option to the constructor. - -### verifier.secret
verifier.key
verifier.publicKey - -A `Writable Stream` that expects a public key or secret. Do *not* use if you -passed a `key` or `secret` option to the constructor. - -# TODO - -* It feels like there should be some convenience options/APIs for - defining the algorithm rather than having to define a header object - with `{ alg: 'ES512' }` or whatever every time. - -* X.509 support, ugh - -# License - -MIT - -``` -Copyright (c) 2013-2015 Brian J. Brennan - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -``` - -[encrypted-key-docs]: https://nodejs.org/api/crypto.html#crypto_sign_sign_private_key_output_format diff --git a/node_modules/kysely/LICENSE b/node_modules/kysely/LICENSE deleted file mode 100644 index d649091..0000000 --- a/node_modules/kysely/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2022 Sami Koskimäki - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/kysely/README.md b/node_modules/kysely/README.md deleted file mode 100644 index b22743c..0000000 --- a/node_modules/kysely/README.md +++ /dev/null @@ -1,240 +0,0 @@ -[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://stand-with-ukraine.pp.ua) - -[![NPM Version](https://img.shields.io/npm/v/kysely?style=flat&label=latest)](https://github.com/kysely-org/kysely/releases/latest) -[![Tests](https://github.com/kysely-org/kysely/actions/workflows/test.yml/badge.svg)](https://github.com/kysely-org/kysely) -[![License](https://img.shields.io/github/license/kysely-org/kysely?style=flat)](https://github.com/kysely-org/kysely/blob/master/LICENSE) -[![Issues](https://img.shields.io/github/issues-closed/kysely-org/kysely?logo=github)](https://github.com/kysely-org/kysely/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) -[![Pull Requests](https://img.shields.io/github/issues-pr-closed/kysely-org/kysely?label=PRs&logo=github&style=flat)](https://github.com/kysely-org/kysely/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) -![GitHub contributors](https://img.shields.io/github/contributors/kysely-org/kysely) -[![NPM Downloads](https://img.shields.io/npm/dw/kysely?logo=npm)](https://www.npmjs.com/package/kysely) -[![JSR Downloads](https://jsr.io/badges/@kysely/kysely/weekly-downloads)](https://jsr.io/@kysely/kysely) -[![JSR Score](https://jsr.io/badges/@kysely/kysely/score)](https://jsr.io/@kysely/kysely) - -###### Join the discussion ⠀⠀⠀⠀⠀⠀⠀ -[![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?style=flat&logo=discord&logoColor=white)](https://discord.gg/xyBJ3GwvAm) -[![Bluesky](https://img.shields.io/badge/Bluesky-0285FF?style=flat&logo=Bluesky&logoColor=white)](https://bsky.app/profile/kysely.dev) - -###### Get started -[![Postgres](https://img.shields.io/badge/postgres-%23316192.svg?style=flat&logo=postgresql&logoColor=white)](https://kysely.dev/docs/getting-started?dialect=postgresql) -[![MySQL](https://img.shields.io/badge/mysql-4479A1.svg?style=flat&logo=mysql&logoColor=white)](https://kysely.dev/docs/getting-started?dialect=mysql) -[![MicrosoftSQLServer](https://img.shields.io/badge/Microsoft%20SQL%20Server-CC2927?style=flat&logo=microsoft%20sql%20server&logoColor=white)](https://kysely.dev/docs/getting-started?dialect=mssql) -[![SQLite](https://img.shields.io/badge/sqlite-%2307405e.svg?style=flat&logo=sqlite&logoColor=white)](https://kysely.dev/docs/getting-started?dialect=sqlite) -& more! - -# [Kysely](https://kysely.dev) - -Kysely (pronounce “Key-Seh-Lee”) is a type-safe and autocompletion-friendly [TypeScript](https://www.typescriptlang.org/) [SQL](https://en.wikipedia.org/wiki/SQL) query builder. -Inspired by [Knex.js](http://knexjs.org/). Mainly developed for [Node.js](https://nodejs.org/en/) but also -runs on all other [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript) environments like [Deno](https://deno.com/), [Bun](https://bun.sh/), [Cloudflare Workers](https://workers.cloudflare.com/) -and web browsers. - -![](https://github.com/kysely-org/kysely/blob/master/assets/demo.gif) - -Kysely makes sure you only refer to tables and columns that are visible to the part of the query -you're writing. The result type only has the selected columns with correct types and aliases. As an -added bonus you get autocompletion for all that stuff. - -As shown in the gif above, through the pure magic of modern TypeScript, Kysely is even able to parse -the alias given to `pet.name` and add the `pet_name` column to the result row type. Kysely is able to infer -column names, aliases and types from selected subqueries, joined subqueries, `with` statements and pretty -much anything you can think of. - -Of course there are cases where things cannot be typed at compile time, and Kysely offers escape -hatches for these situations. See the [sql template tag](https://kysely-org.github.io/kysely-apidoc/interfaces/Sql.html) -and the [DynamicModule](https://kysely-org.github.io/kysely-apidoc/classes/DynamicModule.html#ref) for more info. - -All API documentation is written in the typing files and you can simply hover over the module, class -or method you're using to see it in your IDE. The same documentation is also hosted [here](https://kysely-org.github.io/kysely-apidoc/). - -If you start using Kysely and can't find something you'd want to use, please open an issue or join our -[Discord server](https://discord.gg/xyBJ3GwvAm). - -# Getting started - -Please visit our documentation site [kysely.dev](https://kysely.dev) to get started. We also have a comprehensive -API documentation hosted [here](https://kysely-org.github.io/kysely-apidoc/), but you can access the same -documentation in your IDE by hovering over a class/method/property/whatever. - -# Core team - -## Project leads - -Responsible for project direction, API design, maintenance, code reviews, community support, documentation, and working on some of the most -impactful/challenging things. - - - - - - - - -
- - -
- Sami Koskimäki -
-
- (the author) -
- - -
- Igal Klebanov -
-
- (the dynamo) -
- -## Honorable mentions - -People who had special impact on the project and its growth. - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
- Fernando Hurtado -
-
- (1st docs) -
- - -
- Wirekang -
-
- (playground) -
- - -
- Tim Griesser -
-
- (Knex) -
- - -
- Robin Blomberg -
-
- (codegen) -
- - -
- Shoubhit Dash -
-
- (prisma idea) -
- - -
- Valtýr Örn Kjartansson -
-
- (prisma impl) -
- - -
- Dax Raad -
-
- (early adopter) -
- - -
- Theo Browne -
-
- (early promoter) -
- - -
- Lee Robinson -
-
- (early promoter) -
- - -
- Ethan Resnick -
-
- (timely feedback) -
- - -
- Harminder Virk -
-
- (dope writeup) -
- - -
- Johan Eliasson -
-
- (promoter/educator) -
- -## All contributors - -
- -

- - Powered by Vercel - -

diff --git a/node_modules/kysely/dist/cjs/dialect/database-introspector.d.ts b/node_modules/kysely/dist/cjs/dialect/database-introspector.d.ts deleted file mode 100644 index 3af2e16..0000000 --- a/node_modules/kysely/dist/cjs/dialect/database-introspector.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -/** - * An interface for getting the database metadata (names of the tables and columns etc.) - */ -export interface DatabaseIntrospector { - /** - * Get schema metadata. - */ - getSchemas(): Promise; - /** - * Get tables and views metadata. - */ - getTables(options?: DatabaseMetadataOptions): Promise; - /** - * Get the database metadata such as table and column names. - * - * @deprecated Use getTables() instead. - */ - getMetadata(options?: DatabaseMetadataOptions): Promise; -} -export interface DatabaseMetadataOptions { - /** - * If this is true, the metadata contains the internal kysely tables - * such as the migration tables. - */ - withInternalKyselyTables: boolean; -} -export interface SchemaMetadata { - readonly name: string; -} -export interface DatabaseMetadata { - /** - * The tables and views found in the database. - * The propery isView can be used to tell them apart. - */ - readonly tables: TableMetadata[]; -} -export interface TableMetadata { - readonly name: string; - readonly isView: boolean; - readonly columns: ColumnMetadata[]; - readonly schema?: string; -} -export interface ColumnMetadata { - readonly name: string; - /** - * The data type of the column as reported by the database. - * - * NOTE: This value is whatever the database engine returns and it will be - * different on different dialects even if you run the same migrations. - * For example `integer` datatype in a migration will produce `int4` - * on PostgreSQL, `INTEGER` on SQLite and `int` on MySQL. - */ - readonly dataType: string; - /** - * The schema this column's data type was created in. - */ - readonly dataTypeSchema?: string; - readonly isAutoIncrementing: boolean; - readonly isNullable: boolean; - readonly hasDefaultValue: boolean; - readonly comment?: string; -} diff --git a/node_modules/kysely/dist/cjs/dialect/database-introspector.js b/node_modules/kysely/dist/cjs/dialect/database-introspector.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/dialect/database-introspector.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/dialect/dialect-adapter-base.d.ts b/node_modules/kysely/dist/cjs/dialect/dialect-adapter-base.d.ts deleted file mode 100644 index 67ade0b..0000000 --- a/node_modules/kysely/dist/cjs/dialect/dialect-adapter-base.d.ts +++ /dev/null @@ -1,94 +0,0 @@ -import type { Kysely } from '../kysely.js'; -import type { DialectAdapter, MigrationLockOptions } from './dialect-adapter.js'; -/** - * A basic implementation of `DialectAdapter` with sensible default values. - * Third-party dialects can extend this instead of implementing the `DialectAdapter` - * interface from scratch. That way all new settings will get default values when - * they are added and there will be less breaking changes. - */ -export declare abstract class DialectAdapterBase implements DialectAdapter { - /** - * Whether or not this dialect supports `if not exists` in creation of tables/schemas/views/etc. - * - * If this is false, Kysely's internal migrations tables and schemas are created - * without `if not exists` in migrations. This is not a problem if the dialect - * supports transactional DDL. - */ - get supportsCreateIfNotExists(): boolean; - /** - * Whether or not this dialect supports transactional DDL. - * - * If this is true, migrations are executed inside a transaction. - */ - get supportsTransactionalDdl(): boolean; - /** - * Whether or not this dialect supports the `returning` in inserts - * updates and deletes. - */ - get supportsReturning(): boolean; - get supportsOutput(): boolean; - /** - * This method is used to acquire a lock for the migrations so that - * it's not possible for two migration operations to run in parallel. - * - * Most dialects have explicit locks that can be used, like advisory locks - * in PostgreSQL and the get_lock function in MySQL. - * - * If the dialect doesn't have explicit locks the {@link MigrationLockOptions.lockTable} - * created by Kysely can be used instead. You can access it through the `options` object. - * The lock table has two columns `id` and `is_locked` and there's only one row in the table - * whose id is {@link MigrationLockOptions.lockRowId}. `is_locked` is an integer. Kysely - * takes care of creating the lock table and inserting the one single row to it before this - * method is executed. If the dialect supports schemas and the user has specified a custom - * schema in their migration settings, the options object also contains the schema name in - * {@link MigrationLockOptions.lockTableSchema}. - * - * Here's an example of how you might implement this method for a dialect that doesn't - * have explicit locks but supports `FOR UPDATE` row locks and transactional DDL: - * - * ```ts - * import { DialectAdapterBase, type MigrationLockOptions, Kysely } from 'kysely' - * - * export class MyAdapter extends DialectAdapterBase { - * override async acquireMigrationLock( - * db: Kysely, - * options: MigrationLockOptions - * ): Promise { - * const queryDb = options.lockTableSchema - * ? db.withSchema(options.lockTableSchema) - * : db - * - * // Since our imaginary dialect supports transactional DDL and has - * // row locks, we can simply take a row lock here and it will guarantee - * // all subsequent calls to this method from other transactions will - * // wait until this transaction finishes. - * await queryDb - * .selectFrom(options.lockTable) - * .selectAll() - * .where('id', '=', options.lockRowId) - * .forUpdate() - * .execute() - * } - * - * override async releaseMigrationLock() { - * // noop - * } - * } - * ``` - * - * If `supportsTransactionalDdl` is `true` then the `db` passed to this method - * is a transaction inside which the migrations will be executed. Otherwise - * `db` is a single connection (session) that will be used to execute the - * migrations. - */ - abstract acquireMigrationLock(db: Kysely, options: MigrationLockOptions): Promise; - /** - * Releases the migration lock. See {@link acquireMigrationLock}. - * - * If `supportsTransactionalDdl` is `true` then the `db` passed to this method - * is a transaction inside which the migrations were executed. Otherwise `db` - * is a single connection (session) that was used to execute the migrations - * and the `acquireMigrationLock` call. - */ - abstract releaseMigrationLock(db: Kysely, options: MigrationLockOptions): Promise; -} diff --git a/node_modules/kysely/dist/cjs/dialect/dialect-adapter-base.js b/node_modules/kysely/dist/cjs/dialect/dialect-adapter-base.js deleted file mode 100644 index 5a5d91c..0000000 --- a/node_modules/kysely/dist/cjs/dialect/dialect-adapter-base.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DialectAdapterBase = void 0; -/** - * A basic implementation of `DialectAdapter` with sensible default values. - * Third-party dialects can extend this instead of implementing the `DialectAdapter` - * interface from scratch. That way all new settings will get default values when - * they are added and there will be less breaking changes. - */ -class DialectAdapterBase { - get supportsCreateIfNotExists() { - return true; - } - get supportsTransactionalDdl() { - return false; - } - get supportsReturning() { - return false; - } - get supportsOutput() { - return false; - } -} -exports.DialectAdapterBase = DialectAdapterBase; diff --git a/node_modules/kysely/dist/cjs/dialect/dialect-adapter.d.ts b/node_modules/kysely/dist/cjs/dialect/dialect-adapter.d.ts deleted file mode 100644 index 25de4e1..0000000 --- a/node_modules/kysely/dist/cjs/dialect/dialect-adapter.d.ts +++ /dev/null @@ -1,115 +0,0 @@ -import type { Kysely } from '../kysely.js'; -/** - * A `DialectAdapter` encapsulates all differences between dialects outside - * of `Driver` and `QueryCompiler`. - * - * For example, some databases support transactional DDL and therefore we want - * to run migrations inside a transaction, while other databases don't support - * it. For that there's a `supportsTransactionalDdl` boolean in this interface. - */ -export interface DialectAdapter { - /** - * Whether or not this dialect supports `if not exists` in creation of tables/schemas/views/etc. - * - * If this is false, Kysely's internal migrations tables and schemas are created - * without `if not exists` in migrations. This is not a problem if the dialect - * supports transactional DDL. - */ - readonly supportsCreateIfNotExists: boolean; - /** - * Whether or not this dialect supports transactional DDL. - * - * If this is true, migrations are executed inside a transaction. - */ - readonly supportsTransactionalDdl: boolean; - /** - * Whether or not this dialect supports the `returning` in inserts - * updates and deletes. - */ - readonly supportsReturning: boolean; - /** - * Whether or not this dialect supports the `output` clause in inserts - * updates and deletes. - */ - readonly supportsOutput?: boolean; - /** - * This method is used to acquire a lock for the migrations so that - * it's not possible for two migration operations to run in parallel. - * - * Most dialects have explicit locks that can be used, like advisory locks - * in PostgreSQL and the get_lock function in MySQL. - * - * If the dialect doesn't have explicit locks the {@link MigrationLockOptions.lockTable} - * created by Kysely can be used instead. You can access it through the `options` object. - * The lock table has two columns `id` and `is_locked` and there's only one row in the table - * whose id is {@link MigrationLockOptions.lockRowId}. `is_locked` is an integer. Kysely - * takes care of creating the lock table and inserting the one single row to it before this - * method is executed. If the dialect supports schemas and the user has specified a custom - * schema in their migration settings, the options object also contains the schema name in - * {@link MigrationLockOptions.lockTableSchema}. - * - * Here's an example of how you might implement this method for a dialect that doesn't - * have explicit locks but supports `FOR UPDATE` row locks and transactional DDL: - * - * ```ts - * import { DialectAdapterBase, type MigrationLockOptions, Kysely } from 'kysely' - * - * export class MyAdapter extends DialectAdapterBase { - * override async acquireMigrationLock( - * db: Kysely, - * options: MigrationLockOptions - * ): Promise { - * const queryDb = options.lockTableSchema - * ? db.withSchema(options.lockTableSchema) - * : db - * - * // Since our imaginary dialect supports transactional DDL and has - * // row locks, we can simply take a row lock here and it will guarantee - * // all subsequent calls to this method from other transactions will - * // wait until this transaction finishes. - * await queryDb - * .selectFrom(options.lockTable) - * .selectAll() - * .where('id', '=', options.lockRowId) - * .forUpdate() - * .execute() - * } - * - * override async releaseMigrationLock() { - * // noop - * } - * } - * ``` - * - * If `supportsTransactionalDdl` is `true` then the `db` passed to this method - * is a transaction inside which the migrations will be executed. Otherwise - * `db` is a single connection (session) that will be used to execute the - * migrations. - */ - acquireMigrationLock(db: Kysely, options: MigrationLockOptions): Promise; - /** - * Releases the migration lock. See {@link acquireMigrationLock}. - * - * If `supportsTransactionalDdl` is `true` then the `db` passed to this method - * is a transaction inside which the migrations were executed. Otherwise `db` - * is a single connection (session) that was used to execute the migrations - * and the `acquireMigrationLock` call. - */ - releaseMigrationLock(db: Kysely, options: MigrationLockOptions): Promise; -} -export interface MigrationLockOptions { - /** - * The name of the migration lock table. - */ - readonly lockTable: string; - /** - * The id of the only row in the migration lock table. - */ - readonly lockRowId: string; - /** - * The schema in which the migration lock table lives. This is only - * defined if the user has specified a custom schema in the migration - * settings. - */ - readonly lockTableSchema?: string; -} diff --git a/node_modules/kysely/dist/cjs/dialect/dialect-adapter.js b/node_modules/kysely/dist/cjs/dialect/dialect-adapter.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/dialect/dialect-adapter.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/dialect/dialect.d.ts b/node_modules/kysely/dist/cjs/dialect/dialect.d.ts deleted file mode 100644 index 50f055a..0000000 --- a/node_modules/kysely/dist/cjs/dialect/dialect.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import type { Driver } from '../driver/driver.js'; -import type { Kysely } from '../kysely.js'; -import type { QueryCompiler } from '../query-compiler/query-compiler.js'; -import type { DatabaseIntrospector } from './database-introspector.js'; -import type { DialectAdapter } from './dialect-adapter.js'; -/** - * A Dialect is the glue between Kysely and the underlying database engine. - * - * See the built-in {@link PostgresDialect} as an example of a dialect. - * Users can implement their own dialects and use them by passing it - * in the {@link KyselyConfig.dialect} property. - */ -export interface Dialect { - /** - * Creates a driver for the dialect. - */ - createDriver(): Driver; - /** - * Creates a query compiler for the dialect. - */ - createQueryCompiler(): QueryCompiler; - /** - * Creates an adapter for the dialect. - */ - createAdapter(): DialectAdapter; - /** - * Creates a database introspector that can be used to get database metadata - * such as the table names and column names of those tables. - * - * `db` never has any plugins installed. It's created using - * {@link Kysely.withoutPlugins}. - */ - createIntrospector(db: Kysely): DatabaseIntrospector; -} diff --git a/node_modules/kysely/dist/cjs/dialect/dialect.js b/node_modules/kysely/dist/cjs/dialect/dialect.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/dialect/dialect.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/dialect/mssql/mssql-adapter.d.ts b/node_modules/kysely/dist/cjs/dialect/mssql/mssql-adapter.d.ts deleted file mode 100644 index 632e1d2..0000000 --- a/node_modules/kysely/dist/cjs/dialect/mssql/mssql-adapter.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -import type { Kysely } from '../../kysely.js'; -import { DialectAdapterBase } from '../dialect-adapter-base.js'; -export declare class MssqlAdapter extends DialectAdapterBase { - /** - * Whether or not this dialect supports `if not exists` in creation of tables/schemas/views/etc. - * - * If this is false, Kysely's internal migrations tables and schemas are created - * without `if not exists` in migrations. This is not a problem if the dialect - * supports transactional DDL. - */ - get supportsCreateIfNotExists(): boolean; - /** - * Whether or not this dialect supports transactional DDL. - * - * If this is true, migrations are executed inside a transaction. - */ - get supportsTransactionalDdl(): boolean; - get supportsOutput(): boolean; - /** - * This method is used to acquire a lock for the migrations so that - * it's not possible for two migration operations to run in parallel. - * - * Most dialects have explicit locks that can be used, like advisory locks - * in PostgreSQL and the get_lock function in MySQL. - * - * If the dialect doesn't have explicit locks the {@link MigrationLockOptions.lockTable} - * created by Kysely can be used instead. You can access it through the `options` object. - * The lock table has two columns `id` and `is_locked` and there's only one row in the table - * whose id is {@link MigrationLockOptions.lockRowId}. `is_locked` is an integer. Kysely - * takes care of creating the lock table and inserting the one single row to it before this - * method is executed. If the dialect supports schemas and the user has specified a custom - * schema in their migration settings, the options object also contains the schema name in - * {@link MigrationLockOptions.lockTableSchema}. - * - * Here's an example of how you might implement this method for a dialect that doesn't - * have explicit locks but supports `FOR UPDATE` row locks and transactional DDL: - * - * ```ts - * import { DialectAdapterBase, type MigrationLockOptions, Kysely } from 'kysely' - * - * export class MyAdapter extends DialectAdapterBase { - * override async acquireMigrationLock( - * db: Kysely, - * options: MigrationLockOptions - * ): Promise { - * const queryDb = options.lockTableSchema - * ? db.withSchema(options.lockTableSchema) - * : db - * - * // Since our imaginary dialect supports transactional DDL and has - * // row locks, we can simply take a row lock here and it will guarantee - * // all subsequent calls to this method from other transactions will - * // wait until this transaction finishes. - * await queryDb - * .selectFrom(options.lockTable) - * .selectAll() - * .where('id', '=', options.lockRowId) - * .forUpdate() - * .execute() - * } - * - * override async releaseMigrationLock() { - * // noop - * } - * } - * ``` - * - * If `supportsTransactionalDdl` is `true` then the `db` passed to this method - * is a transaction inside which the migrations will be executed. Otherwise - * `db` is a single connection (session) that will be used to execute the - * migrations. - */ - acquireMigrationLock(db: Kysely): Promise; - /** - * Releases the migration lock. See {@link acquireMigrationLock}. - * - * If `supportsTransactionalDdl` is `true` then the `db` passed to this method - * is a transaction inside which the migrations were executed. Otherwise `db` - * is a single connection (session) that was used to execute the migrations - * and the `acquireMigrationLock` call. - */ - releaseMigrationLock(): Promise; -} diff --git a/node_modules/kysely/dist/cjs/dialect/mssql/mssql-adapter.js b/node_modules/kysely/dist/cjs/dialect/mssql/mssql-adapter.js deleted file mode 100644 index 06ca3a7..0000000 --- a/node_modules/kysely/dist/cjs/dialect/mssql/mssql-adapter.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MssqlAdapter = void 0; -const migrator_js_1 = require("../../migration/migrator.js"); -const sql_js_1 = require("../../raw-builder/sql.js"); -const dialect_adapter_base_js_1 = require("../dialect-adapter-base.js"); -class MssqlAdapter extends dialect_adapter_base_js_1.DialectAdapterBase { - get supportsCreateIfNotExists() { - return false; - } - get supportsTransactionalDdl() { - return true; - } - get supportsOutput() { - return true; - } - async acquireMigrationLock(db) { - // Acquire a transaction-level exclusive lock on the migrations table. - // https://learn.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-getapplock-transact-sql?view=sql-server-ver16 - await (0, sql_js_1.sql) `exec sp_getapplock @DbPrincipal = ${sql_js_1.sql.lit('dbo')}, @Resource = ${sql_js_1.sql.lit(migrator_js_1.DEFAULT_MIGRATION_TABLE)}, @LockMode = ${sql_js_1.sql.lit('Exclusive')}`.execute(db); - } - async releaseMigrationLock() { - // Nothing to do here. `sp_getapplock` is automatically released at the - // end of the transaction and since `supportsTransactionalDdl` true, we know - // the `db` instance passed to acquireMigrationLock is actually a transaction. - } -} -exports.MssqlAdapter = MssqlAdapter; diff --git a/node_modules/kysely/dist/cjs/dialect/mssql/mssql-dialect-config.d.ts b/node_modules/kysely/dist/cjs/dialect/mssql/mssql-dialect-config.d.ts deleted file mode 100644 index 559652a..0000000 --- a/node_modules/kysely/dist/cjs/dialect/mssql/mssql-dialect-config.d.ts +++ /dev/null @@ -1,181 +0,0 @@ -import type { KyselyTypeError } from '../../util/type-error.js'; -export interface MssqlDialectConfig { - /** - * When `true`, connections are reset to their initial states when released - * back to the pool, resulting in additional requests to the database. - * - * Defaults to `false`. - */ - resetConnectionsOnRelease?: boolean; - /** - * This dialect uses the `tarn` package to manage the connection pool to your - * database. To use it as a peer dependency and not bundle it with Kysely's code, - * you need to pass the `tarn` package itself. You also need to pass some pool options - * (excluding `create`, `destroy` and `validate` functions which are controlled by this dialect), - * `min` & `max` connections at the very least. - * - * ### Examples - * - * ```ts - * import { MssqlDialect } from 'kysely' - * import * as Tarn from 'tarn' - * import * as Tedious from 'tedious' - * - * const dialect = new MssqlDialect({ - * tarn: { ...Tarn, options: { max: 10, min: 0 } }, - * tedious: { - * ...Tedious, - * connectionFactory: () => new Tedious.Connection({ - * // ... - * server: 'localhost', - * // ... - * }), - * } - * }) - * ``` - */ - tarn: Tarn; - /** - * This dialect uses the `tedious` package to communicate with your MS SQL Server - * database. To use it as a peer dependency and not bundle it with Kysely's code, - * you need to pass the `tedious` package itself. You also need to pass a factory - * function that creates new `tedious` `Connection` instances on demand. - * - * ### Examples - * - * ```ts - * import { MssqlDialect } from 'kysely' - * import * as Tarn from 'tarn' - * import * as Tedious from 'tedious' - * - * const dialect = new MssqlDialect({ - * tarn: { ...Tarn, options: { max: 10, min: 0 } }, - * tedious: { - * ...Tedious, - * connectionFactory: () => new Tedious.Connection({ - * // ... - * server: 'localhost', - * // ... - * }), - * } - * }) - * ``` - */ - tedious: Tedious; - /** - * When `true`, connections are validated before being acquired from the pool, - * resulting in additional requests to the database. - * - * Defaults to `true`. - */ - validateConnections?: boolean; -} -export interface Tedious { - connectionFactory: () => TediousConnection | Promise; - ISOLATION_LEVEL: TediousIsolationLevel; - Request: TediousRequestClass; - /** - * @deprecated use {@link MssqlDialectConfig.resetConnectionsOnRelease} instead. - */ - resetConnectionOnRelease?: KyselyTypeError<'deprecated: use `MssqlDialectConfig.resetConnectionsOnRelease` instead'>; - TYPES: TediousTypes; -} -export interface TediousConnection { - beginTransaction(callback: (err: Error | null | undefined, transactionDescriptor?: any) => void, name?: string | undefined, isolationLevel?: number | undefined): void; - cancel(): boolean; - close(): void; - commitTransaction(callback: (err: Error | null | undefined) => void, name?: string | undefined): void; - connect(connectListener: (err?: Error) => void): void; - execSql(request: TediousRequest): void; - off(event: 'error', listener: (error: unknown) => void): this; - off(event: string, listener: (...args: any[]) => void): this; - on(event: 'error', listener: (error: unknown) => void): this; - on(event: string, listener: (...args: any[]) => void): this; - once(event: 'end', listener: () => void): this; - once(event: string, listener: (...args: any[]) => void): this; - reset(callback: (err: Error | null | undefined) => void): void; - rollbackTransaction(callback: (err: Error | null | undefined) => void, name?: string | undefined): void; - saveTransaction(callback: (err: Error | null | undefined) => void, name: string): void; -} -export type TediousIsolationLevel = Record; -export interface TediousRequestClass { - new (sqlTextOrProcedure: string | undefined, callback: (error?: Error | null, rowCount?: number, rows?: any) => void, options?: { - statementColumnEncryptionSetting?: any; - }): TediousRequest; -} -export declare class TediousRequest { - addParameter(name: string, dataType: TediousDataType, value?: unknown, options?: Readonly<{ - output?: boolean; - length?: number; - precision?: number; - scale?: number; - }> | null): void; - off(event: 'row', listener: (columns: any) => void): this; - off(event: string, listener: (...args: any[]) => void): this; - on(event: 'row', listener: (columns: any) => void): this; - on(event: string, listener: (...args: any[]) => void): this; - once(event: 'requestCompleted', listener: () => void): this; - once(event: string, listener: (...args: any[]) => void): this; - pause(): void; - resume(): void; -} -export interface TediousTypes { - NVarChar: TediousDataType; - BigInt: TediousDataType; - Int: TediousDataType; - Float: TediousDataType; - Bit: TediousDataType; - DateTime: TediousDataType; - VarBinary: TediousDataType; - [x: string]: TediousDataType; -} -export interface TediousDataType { -} -export interface TediousColumnValue { - metadata: { - colName: string; - }; - value: any; -} -export interface Tarn { - /** - * Tarn.js' pool options, excluding `create`, `destroy` and `validate` functions, - * which must be implemented by this dialect. - */ - options: Omit, 'create' | 'destroy' | 'validate'> & { - /** - * @deprecated use {@link MssqlDialectConfig.validateConnections} instead. - */ - validateConnections?: KyselyTypeError<'deprecated: use `MssqlDialectConfig.validateConnections` instead'>; - }; - /** - * Tarn.js' Pool class. - */ - Pool: typeof TarnPool; -} -export declare class TarnPool { - constructor(opt: TarnPoolOptions); - acquire(): TarnPendingRequest; - destroy(): any; - release(resource: R): void; -} -export interface TarnPoolOptions { - acquireTimeoutMillis?: number; - create(cb: (err: Error | null, resource: R) => void): any | (() => Promise); - createRetryIntervalMillis?: number; - createTimeoutMillis?: number; - destroy(resource: R): any; - destroyTimeoutMillis?: number; - idleTimeoutMillis?: number; - log?(msg: string): any; - max: number; - min: number; - propagateCreateError?: boolean; - reapIntervalMillis?: number; - validate?(resource: R): boolean; -} -export interface TarnPendingRequest { - promise: Promise; - resolve: (resource: R) => void; - reject: (err: Error) => void; -} diff --git a/node_modules/kysely/dist/cjs/dialect/mssql/mssql-dialect-config.js b/node_modules/kysely/dist/cjs/dialect/mssql/mssql-dialect-config.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/dialect/mssql/mssql-dialect-config.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/dialect/mssql/mssql-dialect.d.ts b/node_modules/kysely/dist/cjs/dialect/mssql/mssql-dialect.d.ts deleted file mode 100644 index 4ea8391..0000000 --- a/node_modules/kysely/dist/cjs/dialect/mssql/mssql-dialect.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -import type { Driver } from '../../driver/driver.js'; -import type { Kysely } from '../../kysely.js'; -import type { QueryCompiler } from '../../query-compiler/query-compiler.js'; -import type { DatabaseIntrospector } from '../database-introspector.js'; -import type { DialectAdapter } from '../dialect-adapter.js'; -import type { Dialect } from '../dialect.js'; -import type { MssqlDialectConfig } from './mssql-dialect-config.js'; -/** - * MS SQL Server dialect that uses the [tedious](https://tediousjs.github.io/tedious) - * library. - * - * The constructor takes an instance of {@link MssqlDialectConfig}. - * - * ```ts - * import * as Tedious from 'tedious' - * import * as Tarn from 'tarn' - * - * const dialect = new MssqlDialect({ - * tarn: { - * ...Tarn, - * options: { - * min: 0, - * max: 10, - * }, - * }, - * tedious: { - * ...Tedious, - * connectionFactory: () => new Tedious.Connection({ - * authentication: { - * options: { - * password: 'password', - * userName: 'username', - * }, - * type: 'default', - * }, - * options: { - * database: 'some_db', - * port: 1433, - * trustServerCertificate: true, - * }, - * server: 'localhost', - * }), - * }, - * }) - * ``` - */ -export declare class MssqlDialect implements Dialect { - #private; - constructor(config: MssqlDialectConfig); - /** - * Creates a driver for the dialect. - */ - createDriver(): Driver; - /** - * Creates a query compiler for the dialect. - */ - createQueryCompiler(): QueryCompiler; - /** - * Creates an adapter for the dialect. - */ - createAdapter(): DialectAdapter; - /** - * Creates a database introspector that can be used to get database metadata - * such as the table names and column names of those tables. - * - * `db` never has any plugins installed. It's created using - * {@link Kysely.withoutPlugins}. - */ - createIntrospector(db: Kysely): DatabaseIntrospector; -} diff --git a/node_modules/kysely/dist/cjs/dialect/mssql/mssql-dialect.js b/node_modules/kysely/dist/cjs/dialect/mssql/mssql-dialect.js deleted file mode 100644 index 12400db..0000000 --- a/node_modules/kysely/dist/cjs/dialect/mssql/mssql-dialect.js +++ /dev/null @@ -1,65 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MssqlDialect = void 0; -const mssql_adapter_js_1 = require("./mssql-adapter.js"); -const mssql_driver_js_1 = require("./mssql-driver.js"); -const mssql_introspector_js_1 = require("./mssql-introspector.js"); -const mssql_query_compiler_js_1 = require("./mssql-query-compiler.js"); -/** - * MS SQL Server dialect that uses the [tedious](https://tediousjs.github.io/tedious) - * library. - * - * The constructor takes an instance of {@link MssqlDialectConfig}. - * - * ```ts - * import * as Tedious from 'tedious' - * import * as Tarn from 'tarn' - * - * const dialect = new MssqlDialect({ - * tarn: { - * ...Tarn, - * options: { - * min: 0, - * max: 10, - * }, - * }, - * tedious: { - * ...Tedious, - * connectionFactory: () => new Tedious.Connection({ - * authentication: { - * options: { - * password: 'password', - * userName: 'username', - * }, - * type: 'default', - * }, - * options: { - * database: 'some_db', - * port: 1433, - * trustServerCertificate: true, - * }, - * server: 'localhost', - * }), - * }, - * }) - * ``` - */ -class MssqlDialect { - #config; - constructor(config) { - this.#config = config; - } - createDriver() { - return new mssql_driver_js_1.MssqlDriver(this.#config); - } - createQueryCompiler() { - return new mssql_query_compiler_js_1.MssqlQueryCompiler(); - } - createAdapter() { - return new mssql_adapter_js_1.MssqlAdapter(); - } - createIntrospector(db) { - return new mssql_introspector_js_1.MssqlIntrospector(db); - } -} -exports.MssqlDialect = MssqlDialect; diff --git a/node_modules/kysely/dist/cjs/dialect/mssql/mssql-driver.d.ts b/node_modules/kysely/dist/cjs/dialect/mssql/mssql-driver.d.ts deleted file mode 100644 index 8ad96b4..0000000 --- a/node_modules/kysely/dist/cjs/dialect/mssql/mssql-driver.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import type { DatabaseConnection, QueryResult } from '../../driver/database-connection.js'; -import type { Driver, TransactionSettings } from '../../driver/driver.js'; -import type { MssqlDialectConfig, Tedious, TediousConnection } from './mssql-dialect-config.js'; -import { CompiledQuery } from '../../query-compiler/compiled-query.js'; -declare const PRIVATE_RESET_METHOD: unique symbol; -declare const PRIVATE_DESTROY_METHOD: unique symbol; -declare const PRIVATE_VALIDATE_METHOD: unique symbol; -export declare class MssqlDriver implements Driver { - #private; - constructor(config: MssqlDialectConfig); - /** - * Initializes the driver. - * - * After calling this method the driver should be usable and `acquireConnection` etc. - * methods should be callable. - */ - init(): Promise; - /** - * Acquires a new connection from the pool. - */ - acquireConnection(): Promise; - /** - * Begins a transaction. - */ - beginTransaction(connection: MssqlConnection, settings: TransactionSettings): Promise; - /** - * Commits a transaction. - */ - commitTransaction(connection: MssqlConnection): Promise; - /** - * Rolls back a transaction. - */ - rollbackTransaction(connection: MssqlConnection): Promise; - savepoint(connection: MssqlConnection, savepointName: string): Promise; - rollbackToSavepoint(connection: MssqlConnection, savepointName: string): Promise; - /** - * Releases a connection back to the pool. - */ - releaseConnection(connection: MssqlConnection): Promise; - /** - * Destroys the driver and releases all resources. - */ - destroy(): Promise; -} -declare class MssqlConnection implements DatabaseConnection { - #private; - constructor(connection: TediousConnection, tedious: Tedious); - beginTransaction(settings: TransactionSettings): Promise; - commitTransaction(): Promise; - connect(): Promise; - executeQuery(compiledQuery: CompiledQuery): Promise>; - rollbackTransaction(savepointName?: string): Promise; - savepoint(savepointName: string): Promise; - streamQuery(compiledQuery: CompiledQuery, chunkSize: number): AsyncIterableIterator>; - [PRIVATE_DESTROY_METHOD](): Promise; - [PRIVATE_RESET_METHOD](): Promise; - [PRIVATE_VALIDATE_METHOD](): Promise; -} -export {}; diff --git a/node_modules/kysely/dist/cjs/dialect/mssql/mssql-driver.js b/node_modules/kysely/dist/cjs/dialect/mssql/mssql-driver.js deleted file mode 100644 index f8481cb..0000000 --- a/node_modules/kysely/dist/cjs/dialect/mssql/mssql-driver.js +++ /dev/null @@ -1,359 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MssqlDriver = void 0; -const object_utils_js_1 = require("../../util/object-utils.js"); -const compiled_query_js_1 = require("../../query-compiler/compiled-query.js"); -const stack_trace_utils_js_1 = require("../../util/stack-trace-utils.js"); -const random_string_js_1 = require("../../util/random-string.js"); -const deferred_js_1 = require("../../util/deferred.js"); -const PRIVATE_RESET_METHOD = Symbol(); -const PRIVATE_DESTROY_METHOD = Symbol(); -const PRIVATE_VALIDATE_METHOD = Symbol(); -class MssqlDriver { - #config; - #pool; - constructor(config) { - this.#config = (0, object_utils_js_1.freeze)({ ...config }); - const { tarn, tedious, validateConnections } = this.#config; - const { validateConnections: deprecatedValidateConnections, ...poolOptions } = tarn.options; - this.#pool = new tarn.Pool({ - ...poolOptions, - create: async () => { - const connection = await tedious.connectionFactory(); - return await new MssqlConnection(connection, tedious).connect(); - }, - destroy: async (connection) => { - await connection[PRIVATE_DESTROY_METHOD](); - }, - // @ts-ignore `tarn` accepts a function that returns a promise here, but - // the types are not aligned and it type errors. - validate: validateConnections === false || - deprecatedValidateConnections === false - ? undefined - : (connection) => connection[PRIVATE_VALIDATE_METHOD](), - }); - } - async init() { - // noop - } - async acquireConnection() { - return await this.#pool.acquire().promise; - } - async beginTransaction(connection, settings) { - await connection.beginTransaction(settings); - } - async commitTransaction(connection) { - await connection.commitTransaction(); - } - async rollbackTransaction(connection) { - await connection.rollbackTransaction(); - } - async savepoint(connection, savepointName) { - await connection.savepoint(savepointName); - } - async rollbackToSavepoint(connection, savepointName) { - await connection.rollbackTransaction(savepointName); - } - async releaseConnection(connection) { - if (this.#config.resetConnectionsOnRelease || - this.#config.tedious.resetConnectionOnRelease) { - await connection[PRIVATE_RESET_METHOD](); - } - this.#pool.release(connection); - } - async destroy() { - await this.#pool.destroy(); - } -} -exports.MssqlDriver = MssqlDriver; -class MssqlConnection { - #connection; - #hasSocketError; - #tedious; - constructor(connection, tedious) { - this.#connection = connection; - this.#hasSocketError = false; - this.#tedious = tedious; - } - async beginTransaction(settings) { - const { isolationLevel } = settings; - await new Promise((resolve, reject) => this.#connection.beginTransaction((error) => { - if (error) - reject(error); - else - resolve(undefined); - }, isolationLevel ? (0, random_string_js_1.randomString)(8) : undefined, isolationLevel - ? this.#getTediousIsolationLevel(isolationLevel) - : undefined)); - } - async commitTransaction() { - await new Promise((resolve, reject) => this.#connection.commitTransaction((error) => { - if (error) - reject(error); - else - resolve(undefined); - })); - } - async connect() { - const { promise: waitForConnected, reject, resolve } = new deferred_js_1.Deferred(); - this.#connection.connect((error) => { - if (error) { - return reject(error); - } - resolve(); - }); - this.#connection.on('error', (error) => { - if (error instanceof Error && - 'code' in error && - error.code === 'ESOCKET') { - this.#hasSocketError = true; - } - console.error(error); - reject(error); - }); - function endListener() { - reject(new Error('The connection ended without ever completing the connection')); - } - this.#connection.once('end', endListener); - await waitForConnected; - this.#connection.off('end', endListener); - return this; - } - async executeQuery(compiledQuery) { - try { - const deferred = new deferred_js_1.Deferred(); - const request = new MssqlRequest({ - compiledQuery, - tedious: this.#tedious, - onDone: deferred, - }); - this.#connection.execSql(request.request); - const { rowCount, rows } = await deferred.promise; - return { - numAffectedRows: rowCount !== undefined ? BigInt(rowCount) : undefined, - rows, - }; - } - catch (err) { - throw (0, stack_trace_utils_js_1.extendStackTrace)(err, new Error()); - } - } - async rollbackTransaction(savepointName) { - await new Promise((resolve, reject) => this.#connection.rollbackTransaction((error) => { - if (error) - reject(error); - else - resolve(undefined); - }, savepointName)); - } - async savepoint(savepointName) { - await new Promise((resolve, reject) => this.#connection.saveTransaction((error) => { - if (error) - reject(error); - else - resolve(undefined); - }, savepointName)); - } - async *streamQuery(compiledQuery, chunkSize) { - if (!Number.isInteger(chunkSize) || chunkSize <= 0) { - throw new Error('chunkSize must be a positive integer'); - } - const request = new MssqlRequest({ - compiledQuery, - streamChunkSize: chunkSize, - tedious: this.#tedious, - }); - this.#connection.execSql(request.request); - try { - while (true) { - const rows = await request.readChunk(); - if (rows.length === 0) { - break; - } - yield { rows }; - if (rows.length < chunkSize) { - break; - } - } - } - finally { - await this.#cancelRequest(request); - } - } - #getTediousIsolationLevel(isolationLevel) { - const { ISOLATION_LEVEL } = this.#tedious; - const mapper = { - 'read committed': ISOLATION_LEVEL.READ_COMMITTED, - 'read uncommitted': ISOLATION_LEVEL.READ_UNCOMMITTED, - 'repeatable read': ISOLATION_LEVEL.REPEATABLE_READ, - serializable: ISOLATION_LEVEL.SERIALIZABLE, - snapshot: ISOLATION_LEVEL.SNAPSHOT, - }; - const tediousIsolationLevel = mapper[isolationLevel]; - if (tediousIsolationLevel === undefined) { - throw new Error(`Unknown isolation level: ${isolationLevel}`); - } - return tediousIsolationLevel; - } - #cancelRequest(request) { - return new Promise((resolve) => { - request.request.once('requestCompleted', resolve); - const wasCanceled = this.#connection.cancel(); - if (!wasCanceled) { - request.request.off('requestCompleted', resolve); - resolve(); - } - }); - } - [PRIVATE_DESTROY_METHOD]() { - if ('closed' in this.#connection && this.#connection.closed) { - return Promise.resolve(); - } - return new Promise((resolve) => { - this.#connection.once('end', resolve); - this.#connection.close(); - }); - } - async [PRIVATE_RESET_METHOD]() { - await new Promise((resolve, reject) => { - this.#connection.reset((error) => { - if (error) { - return reject(error); - } - resolve(); - }); - }); - } - async [PRIVATE_VALIDATE_METHOD]() { - if (this.#hasSocketError || this.#isConnectionClosed()) { - return false; - } - try { - const deferred = new deferred_js_1.Deferred(); - const request = new MssqlRequest({ - compiledQuery: compiled_query_js_1.CompiledQuery.raw('select 1'), - onDone: deferred, - tedious: this.#tedious, - }); - this.#connection.execSql(request.request); - await deferred.promise; - return true; - } - catch { - return false; - } - } - #isConnectionClosed() { - return 'closed' in this.#connection && Boolean(this.#connection.closed); - } -} -class MssqlRequest { - #request; - #rows; - #streamChunkSize; - #subscribers; - #tedious; - #rowCount; - constructor(props) { - const { compiledQuery, onDone, streamChunkSize, tedious } = props; - this.#rows = []; - this.#streamChunkSize = streamChunkSize; - this.#subscribers = {}; - this.#tedious = tedious; - if (onDone) { - const subscriptionKey = 'onDone'; - this.#subscribers[subscriptionKey] = (event, error) => { - if (event === 'chunkReady') { - return; - } - delete this.#subscribers[subscriptionKey]; - if (event === 'error') { - return onDone.reject(error); - } - onDone.resolve({ - rowCount: this.#rowCount, - rows: this.#rows, - }); - }; - } - this.#request = new this.#tedious.Request(compiledQuery.sql, (err, rowCount) => { - if (err) { - return Object.values(this.#subscribers).forEach((subscriber) => subscriber('error', err instanceof AggregateError ? err.errors : err)); - } - this.#rowCount = rowCount; - }); - this.#addParametersToRequest(compiledQuery.parameters); - this.#attachListeners(); - } - get request() { - return this.#request; - } - readChunk() { - const subscriptionKey = this.readChunk.name; - return new Promise((resolve, reject) => { - this.#subscribers[subscriptionKey] = (event, error) => { - delete this.#subscribers[subscriptionKey]; - if (event === 'error') { - return reject(error); - } - resolve(this.#rows.splice(0, this.#streamChunkSize)); - }; - this.#request.resume(); - }); - } - #addParametersToRequest(parameters) { - for (let i = 0; i < parameters.length; i++) { - const parameter = parameters[i]; - this.#request.addParameter(String(i + 1), this.#getTediousDataType(parameter), parameter); - } - } - #attachListeners() { - const pauseAndEmitChunkReady = this.#streamChunkSize - ? () => { - if (this.#streamChunkSize <= this.#rows.length) { - this.#request.pause(); - Object.values(this.#subscribers).forEach((subscriber) => subscriber('chunkReady')); - } - } - : () => { }; - const rowListener = (columns) => { - const row = {}; - for (const column of columns) { - row[column.metadata.colName] = column.value; - } - this.#rows.push(row); - pauseAndEmitChunkReady(); - }; - this.#request.on('row', rowListener); - this.#request.once('requestCompleted', () => { - Object.values(this.#subscribers).forEach((subscriber) => subscriber('completed')); - this.#request.off('row', rowListener); - }); - } - #getTediousDataType(value) { - if ((0, object_utils_js_1.isNull)(value) || (0, object_utils_js_1.isUndefined)(value) || (0, object_utils_js_1.isString)(value)) { - return this.#tedious.TYPES.NVarChar; - } - if ((0, object_utils_js_1.isBigInt)(value) || ((0, object_utils_js_1.isNumber)(value) && value % 1 === 0)) { - if (value < -2147483648 || value > 2147483647) { - return this.#tedious.TYPES.BigInt; - } - else { - return this.#tedious.TYPES.Int; - } - } - if ((0, object_utils_js_1.isNumber)(value)) { - return this.#tedious.TYPES.Float; - } - if ((0, object_utils_js_1.isBoolean)(value)) { - return this.#tedious.TYPES.Bit; - } - if ((0, object_utils_js_1.isDate)(value)) { - return this.#tedious.TYPES.DateTime; - } - if ((0, object_utils_js_1.isBuffer)(value)) { - return this.#tedious.TYPES.VarBinary; - } - return this.#tedious.TYPES.NVarChar; - } -} diff --git a/node_modules/kysely/dist/cjs/dialect/mssql/mssql-introspector.d.ts b/node_modules/kysely/dist/cjs/dialect/mssql/mssql-introspector.d.ts deleted file mode 100644 index 7e429da..0000000 --- a/node_modules/kysely/dist/cjs/dialect/mssql/mssql-introspector.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { Kysely } from '../../kysely.js'; -import type { DatabaseIntrospector, DatabaseMetadata, DatabaseMetadataOptions, SchemaMetadata, TableMetadata } from '../database-introspector.js'; -export declare class MssqlIntrospector implements DatabaseIntrospector { - #private; - constructor(db: Kysely); - /** - * Get schema metadata. - */ - getSchemas(): Promise; - /** - * Get tables and views metadata. - */ - getTables(options?: DatabaseMetadataOptions): Promise; - /** - * Get the database metadata such as table and column names. - * - * @deprecated Use getTables() instead. - */ - getMetadata(options?: DatabaseMetadataOptions): Promise; -} diff --git a/node_modules/kysely/dist/cjs/dialect/mssql/mssql-introspector.js b/node_modules/kysely/dist/cjs/dialect/mssql/mssql-introspector.js deleted file mode 100644 index 84a5f20..0000000 --- a/node_modules/kysely/dist/cjs/dialect/mssql/mssql-introspector.js +++ /dev/null @@ -1,110 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MssqlIntrospector = void 0; -const migrator_js_1 = require("../../migration/migrator.js"); -const object_utils_js_1 = require("../../util/object-utils.js"); -class MssqlIntrospector { - #db; - constructor(db) { - this.#db = db; - } - async getSchemas() { - return await this.#db.selectFrom('sys.schemas').select('name').execute(); - } - async getTables(options = { withInternalKyselyTables: false }) { - const rawColumns = await this.#db - .selectFrom('sys.tables as tables') - .leftJoin('sys.schemas as table_schemas', 'table_schemas.schema_id', 'tables.schema_id') - .innerJoin('sys.columns as columns', 'columns.object_id', 'tables.object_id') - .innerJoin('sys.types as types', 'types.user_type_id', 'columns.user_type_id') - .leftJoin('sys.schemas as type_schemas', 'type_schemas.schema_id', 'types.schema_id') - .leftJoin('sys.extended_properties as comments', (join) => join - .onRef('comments.major_id', '=', 'tables.object_id') - .onRef('comments.minor_id', '=', 'columns.column_id') - .on('comments.name', '=', 'MS_Description')) - .$if(!options.withInternalKyselyTables, (qb) => qb - .where('tables.name', '!=', migrator_js_1.DEFAULT_MIGRATION_TABLE) - .where('tables.name', '!=', migrator_js_1.DEFAULT_MIGRATION_LOCK_TABLE)) - .select([ - 'tables.name as table_name', - (eb) => eb - .ref('tables.type') - .$castTo() - .as('table_type'), - 'table_schemas.name as table_schema_name', - 'columns.default_object_id as column_default_object_id', - 'columns.generated_always_type_desc as column_generated_always_type', - 'columns.is_computed as column_is_computed', - 'columns.is_identity as column_is_identity', - 'columns.is_nullable as column_is_nullable', - 'columns.is_rowguidcol as column_is_rowguidcol', - 'columns.name as column_name', - 'types.is_nullable as type_is_nullable', - 'types.name as type_name', - 'type_schemas.name as type_schema_name', - 'comments.value as column_comment', - ]) - .unionAll(this.#db - .selectFrom('sys.views as views') - .leftJoin('sys.schemas as view_schemas', 'view_schemas.schema_id', 'views.schema_id') - .innerJoin('sys.columns as columns', 'columns.object_id', 'views.object_id') - .innerJoin('sys.types as types', 'types.user_type_id', 'columns.user_type_id') - .leftJoin('sys.schemas as type_schemas', 'type_schemas.schema_id', 'types.schema_id') - .leftJoin('sys.extended_properties as comments', (join) => join - .onRef('comments.major_id', '=', 'views.object_id') - .onRef('comments.minor_id', '=', 'columns.column_id') - .on('comments.name', '=', 'MS_Description')) - .select([ - 'views.name as table_name', - 'views.type as table_type', - 'view_schemas.name as table_schema_name', - 'columns.default_object_id as column_default_object_id', - 'columns.generated_always_type_desc as column_generated_always_type', - 'columns.is_computed as column_is_computed', - 'columns.is_identity as column_is_identity', - 'columns.is_nullable as column_is_nullable', - 'columns.is_rowguidcol as column_is_rowguidcol', - 'columns.name as column_name', - 'types.is_nullable as type_is_nullable', - 'types.name as type_name', - 'type_schemas.name as type_schema_name', - 'comments.value as column_comment', - ])) - .orderBy('table_schema_name') - .orderBy('table_name') - .orderBy('column_name') - .execute(); - const tableDictionary = {}; - for (const rawColumn of rawColumns) { - const key = `${rawColumn.table_schema_name}.${rawColumn.table_name}`; - const table = (tableDictionary[key] = - tableDictionary[key] || - (0, object_utils_js_1.freeze)({ - columns: [], - isView: rawColumn.table_type === 'V ', - name: rawColumn.table_name, - schema: rawColumn.table_schema_name ?? undefined, - })); - table.columns.push((0, object_utils_js_1.freeze)({ - dataType: rawColumn.type_name, - dataTypeSchema: rawColumn.type_schema_name ?? undefined, - hasDefaultValue: rawColumn.column_default_object_id > 0 || - rawColumn.column_generated_always_type !== 'NOT_APPLICABLE' || - rawColumn.column_is_identity || - rawColumn.column_is_computed || - rawColumn.column_is_rowguidcol, - isAutoIncrementing: rawColumn.column_is_identity, - isNullable: rawColumn.column_is_nullable && rawColumn.type_is_nullable, - name: rawColumn.column_name, - comment: rawColumn.column_comment ?? undefined, - })); - } - return Object.values(tableDictionary); - } - async getMetadata(options) { - return { - tables: await this.getTables(options), - }; - } -} -exports.MssqlIntrospector = MssqlIntrospector; diff --git a/node_modules/kysely/dist/cjs/dialect/mssql/mssql-query-compiler.d.ts b/node_modules/kysely/dist/cjs/dialect/mssql/mssql-query-compiler.d.ts deleted file mode 100644 index cfa2cf7..0000000 --- a/node_modules/kysely/dist/cjs/dialect/mssql/mssql-query-compiler.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { AddColumnNode } from '../../operation-node/add-column-node.js'; -import type { AlterTableColumnAlterationNode } from '../../operation-node/alter-table-node.js'; -import type { DropColumnNode } from '../../operation-node/drop-column-node.js'; -import type { OffsetNode } from '../../operation-node/offset-node.js'; -import type { MergeQueryNode } from '../../operation-node/merge-query-node.js'; -import { DefaultQueryCompiler } from '../../query-compiler/default-query-compiler.js'; -import type { CollateNode } from '../../operation-node/collate-node.js'; -export declare class MssqlQueryCompiler extends DefaultQueryCompiler { - protected getCurrentParameterPlaceholder(): string; - protected visitOffset(node: OffsetNode): void; - protected compileColumnAlterations(columnAlterations: readonly AlterTableColumnAlterationNode[]): void; - protected visitAddColumn(node: AddColumnNode): void; - protected visitDropColumn(node: DropColumnNode): void; - protected visitMergeQuery(node: MergeQueryNode): void; - protected visitCollate(node: CollateNode): void; - protected announcesNewColumnDataType(): boolean; -} diff --git a/node_modules/kysely/dist/cjs/dialect/mssql/mssql-query-compiler.js b/node_modules/kysely/dist/cjs/dialect/mssql/mssql-query-compiler.js deleted file mode 100644 index 43d9d88..0000000 --- a/node_modules/kysely/dist/cjs/dialect/mssql/mssql-query-compiler.js +++ /dev/null @@ -1,83 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MssqlQueryCompiler = void 0; -const default_query_compiler_js_1 = require("../../query-compiler/default-query-compiler.js"); -const COLLATION_CHAR_REGEX = /^[a-z0-9_]$/i; -class MssqlQueryCompiler extends default_query_compiler_js_1.DefaultQueryCompiler { - getCurrentParameterPlaceholder() { - return `@${this.numParameters}`; - } - visitOffset(node) { - super.visitOffset(node); - this.append(' rows'); - } - // mssql allows multi-column alterations in a single statement, - // but you can only use the command keyword/s once. - // it also doesn't support multiple kinds of commands in the same - // alter table statement, but we compile that anyway for the sake - // of WYSIWYG. - compileColumnAlterations(columnAlterations) { - const nodesByKind = {}; - for (const columnAlteration of columnAlterations) { - if (!nodesByKind[columnAlteration.kind]) { - nodesByKind[columnAlteration.kind] = []; - } - nodesByKind[columnAlteration.kind].push(columnAlteration); - } - let first = true; - if (nodesByKind.AddColumnNode) { - this.append('add '); - this.compileList(nodesByKind.AddColumnNode); - first = false; - } - // multiple of these are not really supported by mssql, - // but for the sake of WYSIWYG. - if (nodesByKind.AlterColumnNode) { - if (!first) - this.append(', '); - this.compileList(nodesByKind.AlterColumnNode); - } - if (nodesByKind.DropColumnNode) { - if (!first) - this.append(', '); - this.append('drop column '); - this.compileList(nodesByKind.DropColumnNode); - } - // not really supported by mssql, but for the sake of WYSIWYG. - if (nodesByKind.ModifyColumnNode) { - if (!first) - this.append(', '); - this.compileList(nodesByKind.ModifyColumnNode); - } - // not really supported by mssql, but for the sake of WYSIWYG. - if (nodesByKind.RenameColumnNode) { - if (!first) - this.append(', '); - this.compileList(nodesByKind.RenameColumnNode); - } - } - visitAddColumn(node) { - this.visitNode(node.column); - } - visitDropColumn(node) { - this.visitNode(node.column); - } - visitMergeQuery(node) { - super.visitMergeQuery(node); - this.append(';'); - } - visitCollate(node) { - this.append('collate '); - const { name } = node.collation; - for (const char of name) { - if (!COLLATION_CHAR_REGEX.test(char)) { - throw new Error(`Invalid collation: ${name}`); - } - } - this.append(name); - } - announcesNewColumnDataType() { - return false; - } -} -exports.MssqlQueryCompiler = MssqlQueryCompiler; diff --git a/node_modules/kysely/dist/cjs/dialect/mysql/mysql-adapter.d.ts b/node_modules/kysely/dist/cjs/dialect/mysql/mysql-adapter.d.ts deleted file mode 100644 index 7a7d5ed..0000000 --- a/node_modules/kysely/dist/cjs/dialect/mysql/mysql-adapter.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -import type { Kysely } from '../../kysely.js'; -import { DialectAdapterBase } from '../dialect-adapter-base.js'; -import type { MigrationLockOptions } from '../dialect-adapter.js'; -export declare class MysqlAdapter extends DialectAdapterBase { - /** - * Whether or not this dialect supports transactional DDL. - * - * If this is true, migrations are executed inside a transaction. - */ - get supportsTransactionalDdl(): boolean; - /** - * Whether or not this dialect supports the `returning` in inserts - * updates and deletes. - */ - get supportsReturning(): boolean; - /** - * This method is used to acquire a lock for the migrations so that - * it's not possible for two migration operations to run in parallel. - * - * Most dialects have explicit locks that can be used, like advisory locks - * in PostgreSQL and the get_lock function in MySQL. - * - * If the dialect doesn't have explicit locks the {@link MigrationLockOptions.lockTable} - * created by Kysely can be used instead. You can access it through the `options` object. - * The lock table has two columns `id` and `is_locked` and there's only one row in the table - * whose id is {@link MigrationLockOptions.lockRowId}. `is_locked` is an integer. Kysely - * takes care of creating the lock table and inserting the one single row to it before this - * method is executed. If the dialect supports schemas and the user has specified a custom - * schema in their migration settings, the options object also contains the schema name in - * {@link MigrationLockOptions.lockTableSchema}. - * - * Here's an example of how you might implement this method for a dialect that doesn't - * have explicit locks but supports `FOR UPDATE` row locks and transactional DDL: - * - * ```ts - * import { DialectAdapterBase, type MigrationLockOptions, Kysely } from 'kysely' - * - * export class MyAdapter extends DialectAdapterBase { - * override async acquireMigrationLock( - * db: Kysely, - * options: MigrationLockOptions - * ): Promise { - * const queryDb = options.lockTableSchema - * ? db.withSchema(options.lockTableSchema) - * : db - * - * // Since our imaginary dialect supports transactional DDL and has - * // row locks, we can simply take a row lock here and it will guarantee - * // all subsequent calls to this method from other transactions will - * // wait until this transaction finishes. - * await queryDb - * .selectFrom(options.lockTable) - * .selectAll() - * .where('id', '=', options.lockRowId) - * .forUpdate() - * .execute() - * } - * - * override async releaseMigrationLock() { - * // noop - * } - * } - * ``` - * - * If `supportsTransactionalDdl` is `true` then the `db` passed to this method - * is a transaction inside which the migrations will be executed. Otherwise - * `db` is a single connection (session) that will be used to execute the - * migrations. - */ - acquireMigrationLock(db: Kysely, _opt: MigrationLockOptions): Promise; - /** - * Releases the migration lock. See {@link acquireMigrationLock}. - * - * If `supportsTransactionalDdl` is `true` then the `db` passed to this method - * is a transaction inside which the migrations were executed. Otherwise `db` - * is a single connection (session) that was used to execute the migrations - * and the `acquireMigrationLock` call. - */ - releaseMigrationLock(db: Kysely, _opt: MigrationLockOptions): Promise; -} diff --git a/node_modules/kysely/dist/cjs/dialect/mysql/mysql-adapter.js b/node_modules/kysely/dist/cjs/dialect/mysql/mysql-adapter.js deleted file mode 100644 index 5f77520..0000000 --- a/node_modules/kysely/dist/cjs/dialect/mysql/mysql-adapter.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MysqlAdapter = void 0; -const sql_js_1 = require("../../raw-builder/sql.js"); -const dialect_adapter_base_js_1 = require("../dialect-adapter-base.js"); -const LOCK_ID = 'ea586330-2c93-47c8-908d-981d9d270f9d'; -const LOCK_TIMEOUT_SECONDS = 60 * 60; -class MysqlAdapter extends dialect_adapter_base_js_1.DialectAdapterBase { - get supportsTransactionalDdl() { - return false; - } - get supportsReturning() { - return false; - } - async acquireMigrationLock(db, _opt) { - // Kysely uses a single connection to run the migrations. Because of that, we - // can take a lock using `get_lock`. Locks acquired using `get_lock` get - // released when the connection is destroyed (session ends) or when the lock - // is released using `release_lock`. This way we know that the lock is either - // released by us after successfull or failed migrations OR it's released by - // MySQL if the process gets killed for some reason. - await (0, sql_js_1.sql) `select get_lock(${sql_js_1.sql.lit(LOCK_ID)}, ${sql_js_1.sql.lit(LOCK_TIMEOUT_SECONDS)})`.execute(db); - } - async releaseMigrationLock(db, _opt) { - await (0, sql_js_1.sql) `select release_lock(${sql_js_1.sql.lit(LOCK_ID)})`.execute(db); - } -} -exports.MysqlAdapter = MysqlAdapter; diff --git a/node_modules/kysely/dist/cjs/dialect/mysql/mysql-dialect-config.d.ts b/node_modules/kysely/dist/cjs/dialect/mysql/mysql-dialect-config.d.ts deleted file mode 100644 index 6f48c9b..0000000 --- a/node_modules/kysely/dist/cjs/dialect/mysql/mysql-dialect-config.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -import type { DatabaseConnection } from '../../driver/database-connection.js'; -/** - * Config for the MySQL dialect. - * - * https://github.com/sidorares/node-mysql2#using-connection-pools - */ -export interface MysqlDialectConfig { - /** - * A mysql2 Pool instance or a function that returns one. - * - * If a function is provided, it's called once when the first query is executed. - * - * https://github.com/sidorares/node-mysql2#using-connection-pools - */ - pool: MysqlPool | (() => Promise); - /** - * Called once for each created connection. - */ - onCreateConnection?: (connection: DatabaseConnection) => Promise; - /** - * Called every time a connection is acquired from the connection pool. - */ - onReserveConnection?: (connection: DatabaseConnection) => Promise; -} -/** - * This interface is the subset of mysql2 driver's `Pool` class that - * kysely needs. - * - * We don't use the type from `mysql2` here to not have a dependency to it. - * - * https://github.com/sidorares/node-mysql2#using-connection-pools - */ -export interface MysqlPool { - getConnection(callback: (error: unknown, connection: MysqlPoolConnection) => void): void; - end(callback: (error: unknown) => void): void; -} -export interface MysqlPoolConnection { - query(sql: string, parameters: Array): { - stream: (options: MysqlStreamOptions) => MysqlStream; - }; - query(sql: string, parameters: Array, callback: (error: unknown, result: MysqlQueryResult) => void): void; - release(): void; -} -export interface MysqlStreamOptions { - highWaterMark?: number; - objectMode?: true; -} -export interface MysqlStream { - [Symbol.asyncIterator](): AsyncIterableIterator; -} -export interface MysqlOkPacket { - affectedRows: number; - changedRows: number; - insertId: number; -} -export type MysqlQueryResult = MysqlOkPacket | Record[]; diff --git a/node_modules/kysely/dist/cjs/dialect/mysql/mysql-dialect-config.js b/node_modules/kysely/dist/cjs/dialect/mysql/mysql-dialect-config.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/dialect/mysql/mysql-dialect-config.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/dialect/mysql/mysql-dialect.d.ts b/node_modules/kysely/dist/cjs/dialect/mysql/mysql-dialect.d.ts deleted file mode 100644 index 8fda184..0000000 --- a/node_modules/kysely/dist/cjs/dialect/mysql/mysql-dialect.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -import type { Driver } from '../../driver/driver.js'; -import type { Kysely } from '../../kysely.js'; -import type { QueryCompiler } from '../../query-compiler/query-compiler.js'; -import type { Dialect } from '../dialect.js'; -import type { DatabaseIntrospector } from '../database-introspector.js'; -import type { DialectAdapter } from '../dialect-adapter.js'; -import type { MysqlDialectConfig } from './mysql-dialect-config.js'; -/** - * MySQL dialect that uses the [mysql2](https://github.com/sidorares/node-mysql2#readme) library. - * - * The constructor takes an instance of {@link MysqlDialectConfig}. - * - * ```ts - * import { createPool } from 'mysql2' - * - * new MysqlDialect({ - * pool: createPool({ - * database: 'some_db', - * host: 'localhost', - * }) - * }) - * ``` - * - * If you want the pool to only be created once it's first used, `pool` - * can be a function: - * - * ```ts - * import { createPool } from 'mysql2' - * - * new MysqlDialect({ - * pool: async () => createPool({ - * database: 'some_db', - * host: 'localhost', - * }) - * }) - * ``` - */ -export declare class MysqlDialect implements Dialect { - #private; - constructor(config: MysqlDialectConfig); - /** - * Creates a driver for the dialect. - */ - createDriver(): Driver; - /** - * Creates a query compiler for the dialect. - */ - createQueryCompiler(): QueryCompiler; - /** - * Creates an adapter for the dialect. - */ - createAdapter(): DialectAdapter; - /** - * Creates a database introspector that can be used to get database metadata - * such as the table names and column names of those tables. - * - * `db` never has any plugins installed. It's created using - * {@link Kysely.withoutPlugins}. - */ - createIntrospector(db: Kysely): DatabaseIntrospector; -} diff --git a/node_modules/kysely/dist/cjs/dialect/mysql/mysql-dialect.js b/node_modules/kysely/dist/cjs/dialect/mysql/mysql-dialect.js deleted file mode 100644 index df885fe..0000000 --- a/node_modules/kysely/dist/cjs/dialect/mysql/mysql-dialect.js +++ /dev/null @@ -1,56 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MysqlDialect = void 0; -const mysql_driver_js_1 = require("./mysql-driver.js"); -const mysql_query_compiler_js_1 = require("./mysql-query-compiler.js"); -const mysql_introspector_js_1 = require("./mysql-introspector.js"); -const mysql_adapter_js_1 = require("./mysql-adapter.js"); -/** - * MySQL dialect that uses the [mysql2](https://github.com/sidorares/node-mysql2#readme) library. - * - * The constructor takes an instance of {@link MysqlDialectConfig}. - * - * ```ts - * import { createPool } from 'mysql2' - * - * new MysqlDialect({ - * pool: createPool({ - * database: 'some_db', - * host: 'localhost', - * }) - * }) - * ``` - * - * If you want the pool to only be created once it's first used, `pool` - * can be a function: - * - * ```ts - * import { createPool } from 'mysql2' - * - * new MysqlDialect({ - * pool: async () => createPool({ - * database: 'some_db', - * host: 'localhost', - * }) - * }) - * ``` - */ -class MysqlDialect { - #config; - constructor(config) { - this.#config = config; - } - createDriver() { - return new mysql_driver_js_1.MysqlDriver(this.#config); - } - createQueryCompiler() { - return new mysql_query_compiler_js_1.MysqlQueryCompiler(); - } - createAdapter() { - return new mysql_adapter_js_1.MysqlAdapter(); - } - createIntrospector(db) { - return new mysql_introspector_js_1.MysqlIntrospector(db); - } -} -exports.MysqlDialect = MysqlDialect; diff --git a/node_modules/kysely/dist/cjs/dialect/mysql/mysql-driver.d.ts b/node_modules/kysely/dist/cjs/dialect/mysql/mysql-driver.d.ts deleted file mode 100644 index f6167f1..0000000 --- a/node_modules/kysely/dist/cjs/dialect/mysql/mysql-driver.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -import type { DatabaseConnection, QueryResult } from '../../driver/database-connection.js'; -import type { Driver, TransactionSettings } from '../../driver/driver.js'; -import { CompiledQuery } from '../../query-compiler/compiled-query.js'; -import type { QueryCompiler } from '../../query-compiler/query-compiler.js'; -import type { MysqlDialectConfig, MysqlPoolConnection } from './mysql-dialect-config.js'; -declare const PRIVATE_RELEASE_METHOD: unique symbol; -export declare class MysqlDriver implements Driver { - #private; - constructor(configOrPool: MysqlDialectConfig); - /** - * Initializes the driver. - * - * After calling this method the driver should be usable and `acquireConnection` etc. - * methods should be callable. - */ - init(): Promise; - /** - * Acquires a new connection from the pool. - */ - acquireConnection(): Promise; - /** - * Begins a transaction. - */ - beginTransaction(connection: DatabaseConnection, settings: TransactionSettings): Promise; - /** - * Commits a transaction. - */ - commitTransaction(connection: DatabaseConnection): Promise; - /** - * Rolls back a transaction. - */ - rollbackTransaction(connection: DatabaseConnection): Promise; - savepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - rollbackToSavepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - releaseSavepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - /** - * Releases a connection back to the pool. - */ - releaseConnection(connection: MysqlConnection): Promise; - /** - * Destroys the driver and releases all resources. - */ - destroy(): Promise; -} -declare class MysqlConnection implements DatabaseConnection { - #private; - constructor(rawConnection: MysqlPoolConnection); - executeQuery(compiledQuery: CompiledQuery): Promise>; - streamQuery(compiledQuery: CompiledQuery, _chunkSize: number): AsyncIterableIterator>; - [PRIVATE_RELEASE_METHOD](): void; -} -export {}; diff --git a/node_modules/kysely/dist/cjs/dialect/mysql/mysql-driver.js b/node_modules/kysely/dist/cjs/dialect/mysql/mysql-driver.js deleted file mode 100644 index 83dc1ff..0000000 --- a/node_modules/kysely/dist/cjs/dialect/mysql/mysql-driver.js +++ /dev/null @@ -1,180 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MysqlDriver = void 0; -const savepoint_parser_js_1 = require("../../parser/savepoint-parser.js"); -const compiled_query_js_1 = require("../../query-compiler/compiled-query.js"); -const object_utils_js_1 = require("../../util/object-utils.js"); -const query_id_js_1 = require("../../util/query-id.js"); -const stack_trace_utils_js_1 = require("../../util/stack-trace-utils.js"); -const PRIVATE_RELEASE_METHOD = Symbol(); -class MysqlDriver { - #config; - #connections = new WeakMap(); - #pool; - constructor(configOrPool) { - this.#config = (0, object_utils_js_1.freeze)({ ...configOrPool }); - } - async init() { - this.#pool = (0, object_utils_js_1.isFunction)(this.#config.pool) - ? await this.#config.pool() - : this.#config.pool; - } - async acquireConnection() { - const rawConnection = await this.#acquireConnection(); - let connection = this.#connections.get(rawConnection); - if (!connection) { - connection = new MysqlConnection(rawConnection); - this.#connections.set(rawConnection, connection); - // The driver must take care of calling `onCreateConnection` when a new - // connection is created. The `mysql2` module doesn't provide an async hook - // for the connection creation. We need to call the method explicitly. - if (this.#config?.onCreateConnection) { - await this.#config.onCreateConnection(connection); - } - } - if (this.#config?.onReserveConnection) { - await this.#config.onReserveConnection(connection); - } - return connection; - } - async #acquireConnection() { - return new Promise((resolve, reject) => { - this.#pool.getConnection(async (err, rawConnection) => { - if (err) { - reject(err); - } - else { - resolve(rawConnection); - } - }); - }); - } - async beginTransaction(connection, settings) { - if (settings.isolationLevel || settings.accessMode) { - const parts = []; - if (settings.isolationLevel) { - parts.push(`isolation level ${settings.isolationLevel}`); - } - if (settings.accessMode) { - parts.push(settings.accessMode); - } - const sql = `set transaction ${parts.join(', ')}`; - // On MySQL this sets the isolation level of the next transaction. - await connection.executeQuery(compiled_query_js_1.CompiledQuery.raw(sql)); - } - await connection.executeQuery(compiled_query_js_1.CompiledQuery.raw('begin')); - } - async commitTransaction(connection) { - await connection.executeQuery(compiled_query_js_1.CompiledQuery.raw('commit')); - } - async rollbackTransaction(connection) { - await connection.executeQuery(compiled_query_js_1.CompiledQuery.raw('rollback')); - } - async savepoint(connection, savepointName, compileQuery) { - await connection.executeQuery(compileQuery((0, savepoint_parser_js_1.parseSavepointCommand)('savepoint', savepointName), (0, query_id_js_1.createQueryId)())); - } - async rollbackToSavepoint(connection, savepointName, compileQuery) { - await connection.executeQuery(compileQuery((0, savepoint_parser_js_1.parseSavepointCommand)('rollback to', savepointName), (0, query_id_js_1.createQueryId)())); - } - async releaseSavepoint(connection, savepointName, compileQuery) { - await connection.executeQuery(compileQuery((0, savepoint_parser_js_1.parseSavepointCommand)('release savepoint', savepointName), (0, query_id_js_1.createQueryId)())); - } - async releaseConnection(connection) { - connection[PRIVATE_RELEASE_METHOD](); - } - async destroy() { - return new Promise((resolve, reject) => { - this.#pool.end((err) => { - if (err) { - reject(err); - } - else { - resolve(); - } - }); - }); - } -} -exports.MysqlDriver = MysqlDriver; -function isOkPacket(obj) { - return (0, object_utils_js_1.isObject)(obj) && 'insertId' in obj && 'affectedRows' in obj; -} -class MysqlConnection { - #rawConnection; - constructor(rawConnection) { - this.#rawConnection = rawConnection; - } - async executeQuery(compiledQuery) { - try { - const result = await this.#executeQuery(compiledQuery); - if (isOkPacket(result)) { - const { insertId, affectedRows, changedRows } = result; - return { - insertId: insertId !== undefined && - insertId !== null && - insertId.toString() !== '0' - ? BigInt(insertId) - : undefined, - numAffectedRows: affectedRows !== undefined && affectedRows !== null - ? BigInt(affectedRows) - : undefined, - numChangedRows: changedRows !== undefined && changedRows !== null - ? BigInt(changedRows) - : undefined, - rows: [], - }; - } - else if (Array.isArray(result)) { - return { - rows: result, - }; - } - return { - rows: [], - }; - } - catch (err) { - throw (0, stack_trace_utils_js_1.extendStackTrace)(err, new Error()); - } - } - #executeQuery(compiledQuery) { - return new Promise((resolve, reject) => { - this.#rawConnection.query(compiledQuery.sql, compiledQuery.parameters, (err, result) => { - if (err) { - reject(err); - } - else { - resolve(result); - } - }); - }); - } - async *streamQuery(compiledQuery, _chunkSize) { - const stream = this.#rawConnection - .query(compiledQuery.sql, compiledQuery.parameters) - .stream({ - objectMode: true, - }); - try { - for await (const row of stream) { - yield { - rows: [row], - }; - } - } - catch (ex) { - if (ex && - typeof ex === 'object' && - 'code' in ex && - // @ts-ignore - ex.code === 'ERR_STREAM_PREMATURE_CLOSE') { - // Most likely because of https://github.com/mysqljs/mysql/blob/master/lib/protocol/sequences/Query.js#L220 - return; - } - throw ex; - } - } - [PRIVATE_RELEASE_METHOD]() { - this.#rawConnection.release(); - } -} diff --git a/node_modules/kysely/dist/cjs/dialect/mysql/mysql-introspector.d.ts b/node_modules/kysely/dist/cjs/dialect/mysql/mysql-introspector.d.ts deleted file mode 100644 index 0363f2d..0000000 --- a/node_modules/kysely/dist/cjs/dialect/mysql/mysql-introspector.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { DatabaseIntrospector, DatabaseMetadata, DatabaseMetadataOptions, SchemaMetadata, TableMetadata } from '../database-introspector.js'; -import type { Kysely } from '../../kysely.js'; -export declare class MysqlIntrospector implements DatabaseIntrospector { - #private; - constructor(db: Kysely); - /** - * Get schema metadata. - */ - getSchemas(): Promise; - /** - * Get tables and views metadata. - */ - getTables(options?: DatabaseMetadataOptions): Promise; - /** - * Get the database metadata such as table and column names. - * - * @deprecated Use getTables() instead. - */ - getMetadata(options?: DatabaseMetadataOptions): Promise; -} diff --git a/node_modules/kysely/dist/cjs/dialect/mysql/mysql-introspector.js b/node_modules/kysely/dist/cjs/dialect/mysql/mysql-introspector.js deleted file mode 100644 index 857f721..0000000 --- a/node_modules/kysely/dist/cjs/dialect/mysql/mysql-introspector.js +++ /dev/null @@ -1,79 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MysqlIntrospector = void 0; -const migrator_js_1 = require("../../migration/migrator.js"); -const object_utils_js_1 = require("../../util/object-utils.js"); -const sql_js_1 = require("../../raw-builder/sql.js"); -class MysqlIntrospector { - #db; - constructor(db) { - this.#db = db; - } - async getSchemas() { - let rawSchemas = await this.#db - .selectFrom('information_schema.schemata') - .select('schema_name') - .$castTo() - .execute(); - return rawSchemas.map((it) => ({ name: it.SCHEMA_NAME })); - } - async getTables(options = { withInternalKyselyTables: false }) { - let query = this.#db - .selectFrom('information_schema.columns as columns') - .innerJoin('information_schema.tables as tables', (b) => b - .onRef('columns.TABLE_CATALOG', '=', 'tables.TABLE_CATALOG') - .onRef('columns.TABLE_SCHEMA', '=', 'tables.TABLE_SCHEMA') - .onRef('columns.TABLE_NAME', '=', 'tables.TABLE_NAME')) - .select([ - 'columns.COLUMN_NAME', - 'columns.COLUMN_DEFAULT', - 'columns.TABLE_NAME', - 'columns.TABLE_SCHEMA', - 'tables.TABLE_TYPE', - 'columns.IS_NULLABLE', - 'columns.DATA_TYPE', - 'columns.EXTRA', - 'columns.COLUMN_COMMENT', - ]) - .where('columns.TABLE_SCHEMA', '=', (0, sql_js_1.sql) `database()`) - .orderBy('columns.TABLE_NAME') - .orderBy('columns.ORDINAL_POSITION') - .$castTo(); - if (!options.withInternalKyselyTables) { - query = query - .where('columns.TABLE_NAME', '!=', migrator_js_1.DEFAULT_MIGRATION_TABLE) - .where('columns.TABLE_NAME', '!=', migrator_js_1.DEFAULT_MIGRATION_LOCK_TABLE); - } - const rawColumns = await query.execute(); - return this.#parseTableMetadata(rawColumns); - } - async getMetadata(options) { - return { - tables: await this.getTables(options), - }; - } - #parseTableMetadata(columns) { - return columns.reduce((tables, it) => { - let table = tables.find((tbl) => tbl.name === it.TABLE_NAME); - if (!table) { - table = (0, object_utils_js_1.freeze)({ - name: it.TABLE_NAME, - isView: it.TABLE_TYPE === 'VIEW', - schema: it.TABLE_SCHEMA, - columns: [], - }); - tables.push(table); - } - table.columns.push((0, object_utils_js_1.freeze)({ - name: it.COLUMN_NAME, - dataType: it.DATA_TYPE, - isNullable: it.IS_NULLABLE === 'YES', - isAutoIncrementing: it.EXTRA.toLowerCase().includes('auto_increment'), - hasDefaultValue: it.COLUMN_DEFAULT !== null, - comment: it.COLUMN_COMMENT === '' ? undefined : it.COLUMN_COMMENT, - })); - return tables; - }, []); - } -} -exports.MysqlIntrospector = MysqlIntrospector; diff --git a/node_modules/kysely/dist/cjs/dialect/mysql/mysql-query-compiler.d.ts b/node_modules/kysely/dist/cjs/dialect/mysql/mysql-query-compiler.d.ts deleted file mode 100644 index 836856c..0000000 --- a/node_modules/kysely/dist/cjs/dialect/mysql/mysql-query-compiler.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { CreateIndexNode } from '../../operation-node/create-index-node.js'; -import { DefaultQueryCompiler } from '../../query-compiler/default-query-compiler.js'; -export declare class MysqlQueryCompiler extends DefaultQueryCompiler { - protected getCurrentParameterPlaceholder(): string; - protected getLeftExplainOptionsWrapper(): string; - protected getExplainOptionAssignment(): string; - protected getExplainOptionsDelimiter(): string; - protected getRightExplainOptionsWrapper(): string; - protected getLeftIdentifierWrapper(): string; - protected getRightIdentifierWrapper(): string; - protected sanitizeIdentifier(identifier: string): string; - protected visitCreateIndex(node: CreateIndexNode): void; -} diff --git a/node_modules/kysely/dist/cjs/dialect/mysql/mysql-query-compiler.js b/node_modules/kysely/dist/cjs/dialect/mysql/mysql-query-compiler.js deleted file mode 100644 index dd870b0..0000000 --- a/node_modules/kysely/dist/cjs/dialect/mysql/mysql-query-compiler.js +++ /dev/null @@ -1,60 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MysqlQueryCompiler = void 0; -const default_query_compiler_js_1 = require("../../query-compiler/default-query-compiler.js"); -const ID_WRAP_REGEX = /`/g; -class MysqlQueryCompiler extends default_query_compiler_js_1.DefaultQueryCompiler { - getCurrentParameterPlaceholder() { - return '?'; - } - getLeftExplainOptionsWrapper() { - return ''; - } - getExplainOptionAssignment() { - return '='; - } - getExplainOptionsDelimiter() { - return ' '; - } - getRightExplainOptionsWrapper() { - return ''; - } - getLeftIdentifierWrapper() { - return '`'; - } - getRightIdentifierWrapper() { - return '`'; - } - sanitizeIdentifier(identifier) { - return identifier.replace(ID_WRAP_REGEX, '``'); - } - visitCreateIndex(node) { - this.append('create '); - if (node.unique) { - this.append('unique '); - } - this.append('index '); - if (node.ifNotExists) { - this.append('if not exists '); - } - this.visitNode(node.name); - if (node.using) { - this.append(' using '); - this.visitNode(node.using); - } - if (node.table) { - this.append(' on '); - this.visitNode(node.table); - } - if (node.columns) { - this.append(' ('); - this.compileList(node.columns); - this.append(')'); - } - if (node.where) { - this.append(' '); - this.visitNode(node.where); - } - } -} -exports.MysqlQueryCompiler = MysqlQueryCompiler; diff --git a/node_modules/kysely/dist/cjs/dialect/postgres/postgres-adapter.d.ts b/node_modules/kysely/dist/cjs/dialect/postgres/postgres-adapter.d.ts deleted file mode 100644 index 77417bd..0000000 --- a/node_modules/kysely/dist/cjs/dialect/postgres/postgres-adapter.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -import type { Kysely } from '../../kysely.js'; -import { DialectAdapterBase } from '../dialect-adapter-base.js'; -import type { MigrationLockOptions } from '../dialect-adapter.js'; -export declare class PostgresAdapter extends DialectAdapterBase { - /** - * Whether or not this dialect supports transactional DDL. - * - * If this is true, migrations are executed inside a transaction. - */ - get supportsTransactionalDdl(): boolean; - /** - * Whether or not this dialect supports the `returning` in inserts - * updates and deletes. - */ - get supportsReturning(): boolean; - /** - * This method is used to acquire a lock for the migrations so that - * it's not possible for two migration operations to run in parallel. - * - * Most dialects have explicit locks that can be used, like advisory locks - * in PostgreSQL and the get_lock function in MySQL. - * - * If the dialect doesn't have explicit locks the {@link MigrationLockOptions.lockTable} - * created by Kysely can be used instead. You can access it through the `options` object. - * The lock table has two columns `id` and `is_locked` and there's only one row in the table - * whose id is {@link MigrationLockOptions.lockRowId}. `is_locked` is an integer. Kysely - * takes care of creating the lock table and inserting the one single row to it before this - * method is executed. If the dialect supports schemas and the user has specified a custom - * schema in their migration settings, the options object also contains the schema name in - * {@link MigrationLockOptions.lockTableSchema}. - * - * Here's an example of how you might implement this method for a dialect that doesn't - * have explicit locks but supports `FOR UPDATE` row locks and transactional DDL: - * - * ```ts - * import { DialectAdapterBase, type MigrationLockOptions, Kysely } from 'kysely' - * - * export class MyAdapter extends DialectAdapterBase { - * override async acquireMigrationLock( - * db: Kysely, - * options: MigrationLockOptions - * ): Promise { - * const queryDb = options.lockTableSchema - * ? db.withSchema(options.lockTableSchema) - * : db - * - * // Since our imaginary dialect supports transactional DDL and has - * // row locks, we can simply take a row lock here and it will guarantee - * // all subsequent calls to this method from other transactions will - * // wait until this transaction finishes. - * await queryDb - * .selectFrom(options.lockTable) - * .selectAll() - * .where('id', '=', options.lockRowId) - * .forUpdate() - * .execute() - * } - * - * override async releaseMigrationLock() { - * // noop - * } - * } - * ``` - * - * If `supportsTransactionalDdl` is `true` then the `db` passed to this method - * is a transaction inside which the migrations will be executed. Otherwise - * `db` is a single connection (session) that will be used to execute the - * migrations. - */ - acquireMigrationLock(db: Kysely, _opt: MigrationLockOptions): Promise; - /** - * Releases the migration lock. See {@link acquireMigrationLock}. - * - * If `supportsTransactionalDdl` is `true` then the `db` passed to this method - * is a transaction inside which the migrations were executed. Otherwise `db` - * is a single connection (session) that was used to execute the migrations - * and the `acquireMigrationLock` call. - */ - releaseMigrationLock(_db: Kysely, _opt: MigrationLockOptions): Promise; -} diff --git a/node_modules/kysely/dist/cjs/dialect/postgres/postgres-adapter.js b/node_modules/kysely/dist/cjs/dialect/postgres/postgres-adapter.js deleted file mode 100644 index 2436558..0000000 --- a/node_modules/kysely/dist/cjs/dialect/postgres/postgres-adapter.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PostgresAdapter = void 0; -const sql_js_1 = require("../../raw-builder/sql.js"); -const dialect_adapter_base_js_1 = require("../dialect-adapter-base.js"); -// Random id for our transaction lock. -const LOCK_ID = BigInt('3853314791062309107'); -class PostgresAdapter extends dialect_adapter_base_js_1.DialectAdapterBase { - get supportsTransactionalDdl() { - return true; - } - get supportsReturning() { - return true; - } - async acquireMigrationLock(db, _opt) { - // Acquire a transaction level advisory lock. - await (0, sql_js_1.sql) `select pg_advisory_xact_lock(${sql_js_1.sql.lit(LOCK_ID)})`.execute(db); - } - async releaseMigrationLock(_db, _opt) { - // Nothing to do here. `pg_advisory_xact_lock` is automatically released at the - // end of the transaction and since `supportsTransactionalDdl` true, we know - // the `db` instance passed to acquireMigrationLock is actually a transaction. - } -} -exports.PostgresAdapter = PostgresAdapter; diff --git a/node_modules/kysely/dist/cjs/dialect/postgres/postgres-dialect-config.d.ts b/node_modules/kysely/dist/cjs/dialect/postgres/postgres-dialect-config.d.ts deleted file mode 100644 index 063116d..0000000 --- a/node_modules/kysely/dist/cjs/dialect/postgres/postgres-dialect-config.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -import type { DatabaseConnection } from '../../driver/database-connection.js'; -/** - * Config for the PostgreSQL dialect. - */ -export interface PostgresDialectConfig { - /** - * A postgres Pool instance or a function that returns one. - * - * If a function is provided, it's called once when the first query is executed. - * - * https://node-postgres.com/apis/pool - */ - pool: PostgresPool | (() => Promise); - /** - * https://github.com/brianc/node-postgres/tree/master/packages/pg-cursor - * - * ```ts - * import { PostgresDialect } from 'kysely' - * import { Pool } from 'pg' - * import Cursor from 'pg-cursor' - * // or import * as Cursor from 'pg-cursor' - * - * new PostgresDialect({ - * cursor: Cursor, - * pool: new Pool('postgres://localhost:5432/mydb') - * }) - * ``` - */ - cursor?: PostgresCursorConstructor; - /** - * Called once for each created connection. - */ - onCreateConnection?: (connection: DatabaseConnection) => Promise; - /** - * Called every time a connection is acquired from the pool. - */ - onReserveConnection?: (connection: DatabaseConnection) => Promise; -} -/** - * This interface is the subset of pg driver's `Pool` class that - * kysely needs. - * - * We don't use the type from `pg` here to not have a dependency to it. - * - * https://node-postgres.com/apis/pool - */ -export interface PostgresPool { - connect(): Promise; - end(): Promise; -} -export interface PostgresPoolClient { - query(sql: string, parameters: ReadonlyArray): Promise>; - query(cursor: PostgresCursor): PostgresCursor; - release(): void; -} -export interface PostgresCursor { - read(rowsCount: number): Promise; - close(): Promise; -} -export type PostgresCursorConstructor = new (sql: string, parameters: unknown[]) => PostgresCursor; -export interface PostgresQueryResult { - command: 'UPDATE' | 'DELETE' | 'INSERT' | 'SELECT' | 'MERGE'; - rowCount: number; - rows: R[]; -} -export interface PostgresStream { - [Symbol.asyncIterator](): AsyncIterableIterator; -} diff --git a/node_modules/kysely/dist/cjs/dialect/postgres/postgres-dialect-config.js b/node_modules/kysely/dist/cjs/dialect/postgres/postgres-dialect-config.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/dialect/postgres/postgres-dialect-config.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/dialect/postgres/postgres-dialect.d.ts b/node_modules/kysely/dist/cjs/dialect/postgres/postgres-dialect.d.ts deleted file mode 100644 index 7423939..0000000 --- a/node_modules/kysely/dist/cjs/dialect/postgres/postgres-dialect.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -import type { Driver } from '../../driver/driver.js'; -import type { Kysely } from '../../kysely.js'; -import type { QueryCompiler } from '../../query-compiler/query-compiler.js'; -import type { Dialect } from '../dialect.js'; -import type { DatabaseIntrospector } from '../database-introspector.js'; -import type { DialectAdapter } from '../dialect-adapter.js'; -import type { PostgresDialectConfig } from './postgres-dialect-config.js'; -/** - * PostgreSQL dialect that uses the [pg](https://node-postgres.com/) library. - * - * The constructor takes an instance of {@link PostgresDialectConfig}. - * - * ```ts - * import { Pool } from 'pg' - * - * new PostgresDialect({ - * pool: new Pool({ - * database: 'some_db', - * host: 'localhost', - * }) - * }) - * ``` - * - * If you want the pool to only be created once it's first used, `pool` - * can be a function: - * - * ```ts - * import { Pool } from 'pg' - * - * new PostgresDialect({ - * pool: async () => new Pool({ - * database: 'some_db', - * host: 'localhost', - * }) - * }) - * ``` - */ -export declare class PostgresDialect implements Dialect { - #private; - constructor(config: PostgresDialectConfig); - /** - * Creates a driver for the dialect. - */ - createDriver(): Driver; - /** - * Creates a query compiler for the dialect. - */ - createQueryCompiler(): QueryCompiler; - /** - * Creates an adapter for the dialect. - */ - createAdapter(): DialectAdapter; - /** - * Creates a database introspector that can be used to get database metadata - * such as the table names and column names of those tables. - * - * `db` never has any plugins installed. It's created using - * {@link Kysely.withoutPlugins}. - */ - createIntrospector(db: Kysely): DatabaseIntrospector; -} diff --git a/node_modules/kysely/dist/cjs/dialect/postgres/postgres-dialect.js b/node_modules/kysely/dist/cjs/dialect/postgres/postgres-dialect.js deleted file mode 100644 index c5d97c4..0000000 --- a/node_modules/kysely/dist/cjs/dialect/postgres/postgres-dialect.js +++ /dev/null @@ -1,56 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PostgresDialect = void 0; -const postgres_driver_js_1 = require("./postgres-driver.js"); -const postgres_introspector_js_1 = require("./postgres-introspector.js"); -const postgres_query_compiler_js_1 = require("./postgres-query-compiler.js"); -const postgres_adapter_js_1 = require("./postgres-adapter.js"); -/** - * PostgreSQL dialect that uses the [pg](https://node-postgres.com/) library. - * - * The constructor takes an instance of {@link PostgresDialectConfig}. - * - * ```ts - * import { Pool } from 'pg' - * - * new PostgresDialect({ - * pool: new Pool({ - * database: 'some_db', - * host: 'localhost', - * }) - * }) - * ``` - * - * If you want the pool to only be created once it's first used, `pool` - * can be a function: - * - * ```ts - * import { Pool } from 'pg' - * - * new PostgresDialect({ - * pool: async () => new Pool({ - * database: 'some_db', - * host: 'localhost', - * }) - * }) - * ``` - */ -class PostgresDialect { - #config; - constructor(config) { - this.#config = config; - } - createDriver() { - return new postgres_driver_js_1.PostgresDriver(this.#config); - } - createQueryCompiler() { - return new postgres_query_compiler_js_1.PostgresQueryCompiler(); - } - createAdapter() { - return new postgres_adapter_js_1.PostgresAdapter(); - } - createIntrospector(db) { - return new postgres_introspector_js_1.PostgresIntrospector(db); - } -} -exports.PostgresDialect = PostgresDialect; diff --git a/node_modules/kysely/dist/cjs/dialect/postgres/postgres-driver.d.ts b/node_modules/kysely/dist/cjs/dialect/postgres/postgres-driver.d.ts deleted file mode 100644 index 9883645..0000000 --- a/node_modules/kysely/dist/cjs/dialect/postgres/postgres-driver.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -import type { DatabaseConnection, QueryResult } from '../../driver/database-connection.js'; -import type { Driver, TransactionSettings } from '../../driver/driver.js'; -import { CompiledQuery } from '../../query-compiler/compiled-query.js'; -import type { QueryCompiler } from '../../query-compiler/query-compiler.js'; -import type { PostgresCursorConstructor, PostgresDialectConfig, PostgresPoolClient } from './postgres-dialect-config.js'; -declare const PRIVATE_RELEASE_METHOD: unique symbol; -export declare class PostgresDriver implements Driver { - #private; - constructor(config: PostgresDialectConfig); - /** - * Initializes the driver. - * - * After calling this method the driver should be usable and `acquireConnection` etc. - * methods should be callable. - */ - init(): Promise; - /** - * Acquires a new connection from the pool. - */ - acquireConnection(): Promise; - /** - * Begins a transaction. - */ - beginTransaction(connection: DatabaseConnection, settings: TransactionSettings): Promise; - /** - * Commits a transaction. - */ - commitTransaction(connection: DatabaseConnection): Promise; - /** - * Rolls back a transaction. - */ - rollbackTransaction(connection: DatabaseConnection): Promise; - savepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - rollbackToSavepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - releaseSavepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - /** - * Releases a connection back to the pool. - */ - releaseConnection(connection: PostgresConnection): Promise; - /** - * Destroys the driver and releases all resources. - */ - destroy(): Promise; -} -interface PostgresConnectionOptions { - cursor: PostgresCursorConstructor | null; -} -declare class PostgresConnection implements DatabaseConnection { - #private; - constructor(client: PostgresPoolClient, options: PostgresConnectionOptions); - executeQuery(compiledQuery: CompiledQuery): Promise>; - streamQuery(compiledQuery: CompiledQuery, chunkSize: number): AsyncIterableIterator>; - [PRIVATE_RELEASE_METHOD](): void; -} -export {}; diff --git a/node_modules/kysely/dist/cjs/dialect/postgres/postgres-driver.js b/node_modules/kysely/dist/cjs/dialect/postgres/postgres-driver.js deleted file mode 100644 index 048fa0e..0000000 --- a/node_modules/kysely/dist/cjs/dialect/postgres/postgres-driver.js +++ /dev/null @@ -1,134 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PostgresDriver = void 0; -const savepoint_parser_js_1 = require("../../parser/savepoint-parser.js"); -const compiled_query_js_1 = require("../../query-compiler/compiled-query.js"); -const object_utils_js_1 = require("../../util/object-utils.js"); -const query_id_js_1 = require("../../util/query-id.js"); -const stack_trace_utils_js_1 = require("../../util/stack-trace-utils.js"); -const PRIVATE_RELEASE_METHOD = Symbol(); -class PostgresDriver { - #config; - #connections = new WeakMap(); - #pool; - constructor(config) { - this.#config = (0, object_utils_js_1.freeze)({ ...config }); - } - async init() { - this.#pool = (0, object_utils_js_1.isFunction)(this.#config.pool) - ? await this.#config.pool() - : this.#config.pool; - } - async acquireConnection() { - const client = await this.#pool.connect(); - let connection = this.#connections.get(client); - if (!connection) { - connection = new PostgresConnection(client, { - cursor: this.#config.cursor ?? null, - }); - this.#connections.set(client, connection); - // The driver must take care of calling `onCreateConnection` when a new - // connection is created. The `pg` module doesn't provide an async hook - // for the connection creation. We need to call the method explicitly. - if (this.#config.onCreateConnection) { - await this.#config.onCreateConnection(connection); - } - } - if (this.#config.onReserveConnection) { - await this.#config.onReserveConnection(connection); - } - return connection; - } - async beginTransaction(connection, settings) { - if (settings.isolationLevel || settings.accessMode) { - let sql = 'start transaction'; - if (settings.isolationLevel) { - sql += ` isolation level ${settings.isolationLevel}`; - } - if (settings.accessMode) { - sql += ` ${settings.accessMode}`; - } - await connection.executeQuery(compiled_query_js_1.CompiledQuery.raw(sql)); - } - else { - await connection.executeQuery(compiled_query_js_1.CompiledQuery.raw('begin')); - } - } - async commitTransaction(connection) { - await connection.executeQuery(compiled_query_js_1.CompiledQuery.raw('commit')); - } - async rollbackTransaction(connection) { - await connection.executeQuery(compiled_query_js_1.CompiledQuery.raw('rollback')); - } - async savepoint(connection, savepointName, compileQuery) { - await connection.executeQuery(compileQuery((0, savepoint_parser_js_1.parseSavepointCommand)('savepoint', savepointName), (0, query_id_js_1.createQueryId)())); - } - async rollbackToSavepoint(connection, savepointName, compileQuery) { - await connection.executeQuery(compileQuery((0, savepoint_parser_js_1.parseSavepointCommand)('rollback to', savepointName), (0, query_id_js_1.createQueryId)())); - } - async releaseSavepoint(connection, savepointName, compileQuery) { - await connection.executeQuery(compileQuery((0, savepoint_parser_js_1.parseSavepointCommand)('release', savepointName), (0, query_id_js_1.createQueryId)())); - } - async releaseConnection(connection) { - connection[PRIVATE_RELEASE_METHOD](); - } - async destroy() { - if (this.#pool) { - const pool = this.#pool; - this.#pool = undefined; - await pool.end(); - } - } -} -exports.PostgresDriver = PostgresDriver; -class PostgresConnection { - #client; - #options; - constructor(client, options) { - this.#client = client; - this.#options = options; - } - async executeQuery(compiledQuery) { - try { - const { command, rowCount, rows } = await this.#client.query(compiledQuery.sql, [...compiledQuery.parameters]); - return { - numAffectedRows: command === 'INSERT' || - command === 'UPDATE' || - command === 'DELETE' || - command === 'MERGE' - ? BigInt(rowCount) - : undefined, - rows: rows ?? [], - }; - } - catch (err) { - throw (0, stack_trace_utils_js_1.extendStackTrace)(err, new Error()); - } - } - async *streamQuery(compiledQuery, chunkSize) { - if (!this.#options.cursor) { - throw new Error("'cursor' is not present in your postgres dialect config. It's required to make streaming work in postgres."); - } - if (!Number.isInteger(chunkSize) || chunkSize <= 0) { - throw new Error('chunkSize must be a positive integer'); - } - const cursor = this.#client.query(new this.#options.cursor(compiledQuery.sql, compiledQuery.parameters.slice())); - try { - while (true) { - const rows = await cursor.read(chunkSize); - if (rows.length === 0) { - break; - } - yield { - rows, - }; - } - } - finally { - await cursor.close(); - } - } - [PRIVATE_RELEASE_METHOD]() { - this.#client.release(); - } -} diff --git a/node_modules/kysely/dist/cjs/dialect/postgres/postgres-introspector.d.ts b/node_modules/kysely/dist/cjs/dialect/postgres/postgres-introspector.d.ts deleted file mode 100644 index dbceed6..0000000 --- a/node_modules/kysely/dist/cjs/dialect/postgres/postgres-introspector.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { DatabaseIntrospector, DatabaseMetadata, DatabaseMetadataOptions, SchemaMetadata, TableMetadata } from '../database-introspector.js'; -import type { Kysely } from '../../kysely.js'; -export declare class PostgresIntrospector implements DatabaseIntrospector { - #private; - constructor(db: Kysely); - /** - * Get schema metadata. - */ - getSchemas(): Promise; - /** - * Get tables and views metadata. - */ - getTables(options?: DatabaseMetadataOptions): Promise; - /** - * Get the database metadata such as table and column names. - * - * @deprecated Use getTables() instead. - */ - getMetadata(options?: DatabaseMetadataOptions): Promise; -} diff --git a/node_modules/kysely/dist/cjs/dialect/postgres/postgres-introspector.js b/node_modules/kysely/dist/cjs/dialect/postgres/postgres-introspector.js deleted file mode 100644 index 0184726..0000000 --- a/node_modules/kysely/dist/cjs/dialect/postgres/postgres-introspector.js +++ /dev/null @@ -1,100 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PostgresIntrospector = void 0; -const migrator_js_1 = require("../../migration/migrator.js"); -const object_utils_js_1 = require("../../util/object-utils.js"); -const sql_js_1 = require("../../raw-builder/sql.js"); -class PostgresIntrospector { - #db; - constructor(db) { - this.#db = db; - } - async getSchemas() { - let rawSchemas = await this.#db - .selectFrom('pg_catalog.pg_namespace') - .select('nspname') - .$castTo() - .execute(); - return rawSchemas.map((it) => ({ name: it.nspname })); - } - async getTables(options = { withInternalKyselyTables: false }) { - let query = this.#db - // column - .selectFrom('pg_catalog.pg_attribute as a') - // table - .innerJoin('pg_catalog.pg_class as c', 'a.attrelid', 'c.oid') - // table schema - .innerJoin('pg_catalog.pg_namespace as ns', 'c.relnamespace', 'ns.oid') - // column data type - .innerJoin('pg_catalog.pg_type as typ', 'a.atttypid', 'typ.oid') - // column data type schema - .innerJoin('pg_catalog.pg_namespace as dtns', 'typ.typnamespace', 'dtns.oid') - .select([ - 'a.attname as column', - 'a.attnotnull as not_null', - 'a.atthasdef as has_default', - 'c.relname as table', - 'c.relkind as table_type', - 'ns.nspname as schema', - 'typ.typname as type', - 'dtns.nspname as type_schema', - (0, sql_js_1.sql) `col_description(a.attrelid, a.attnum)`.as('column_description'), - (0, sql_js_1.sql) `pg_get_serial_sequence(quote_ident(ns.nspname) || '.' || quote_ident(c.relname), a.attname)`.as('auto_incrementing'), - ]) - .where('c.relkind', 'in', [ - 'r' /*regular table*/, - 'v' /*view*/, - 'p' /*partitioned table*/, - ]) - .where('ns.nspname', '!~', '^pg_') - .where('ns.nspname', '!=', 'information_schema') - // Filter out internal cockroachdb schema - .where('ns.nspname', '!=', 'crdb_internal') - // Only schemas where we are allowed access - .where((0, sql_js_1.sql) `has_schema_privilege(ns.nspname, 'USAGE')`) - // No system columns - .where('a.attnum', '>=', 0) - .where('a.attisdropped', '!=', true) - .orderBy('ns.nspname') - .orderBy('c.relname') - .orderBy('a.attnum') - .$castTo(); - if (!options.withInternalKyselyTables) { - query = query - .where('c.relname', '!=', migrator_js_1.DEFAULT_MIGRATION_TABLE) - .where('c.relname', '!=', migrator_js_1.DEFAULT_MIGRATION_LOCK_TABLE); - } - const rawColumns = await query.execute(); - return this.#parseTableMetadata(rawColumns); - } - async getMetadata(options) { - return { - tables: await this.getTables(options), - }; - } - #parseTableMetadata(columns) { - return columns.reduce((tables, it) => { - let table = tables.find((tbl) => tbl.name === it.table && tbl.schema === it.schema); - if (!table) { - table = (0, object_utils_js_1.freeze)({ - name: it.table, - isView: it.table_type === 'v', - schema: it.schema, - columns: [], - }); - tables.push(table); - } - table.columns.push((0, object_utils_js_1.freeze)({ - name: it.column, - dataType: it.type, - dataTypeSchema: it.type_schema, - isNullable: !it.not_null, - isAutoIncrementing: it.auto_incrementing !== null, - hasDefaultValue: it.has_default, - comment: it.column_description ?? undefined, - })); - return tables; - }, []); - } -} -exports.PostgresIntrospector = PostgresIntrospector; diff --git a/node_modules/kysely/dist/cjs/dialect/postgres/postgres-query-compiler.d.ts b/node_modules/kysely/dist/cjs/dialect/postgres/postgres-query-compiler.d.ts deleted file mode 100644 index b5ab46c..0000000 --- a/node_modules/kysely/dist/cjs/dialect/postgres/postgres-query-compiler.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { DefaultQueryCompiler } from '../../query-compiler/default-query-compiler.js'; -export declare class PostgresQueryCompiler extends DefaultQueryCompiler { - protected sanitizeIdentifier(identifier: string): string; -} diff --git a/node_modules/kysely/dist/cjs/dialect/postgres/postgres-query-compiler.js b/node_modules/kysely/dist/cjs/dialect/postgres/postgres-query-compiler.js deleted file mode 100644 index 369aa40..0000000 --- a/node_modules/kysely/dist/cjs/dialect/postgres/postgres-query-compiler.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PostgresQueryCompiler = void 0; -const default_query_compiler_js_1 = require("../../query-compiler/default-query-compiler.js"); -const ID_WRAP_REGEX = /"/g; -class PostgresQueryCompiler extends default_query_compiler_js_1.DefaultQueryCompiler { - sanitizeIdentifier(identifier) { - return identifier.replace(ID_WRAP_REGEX, '""'); - } -} -exports.PostgresQueryCompiler = PostgresQueryCompiler; diff --git a/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-adapter.d.ts b/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-adapter.d.ts deleted file mode 100644 index 1782b58..0000000 --- a/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-adapter.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -import type { Kysely } from '../../kysely.js'; -import { DialectAdapterBase } from '../dialect-adapter-base.js'; -import type { MigrationLockOptions } from '../dialect-adapter.js'; -export declare class SqliteAdapter extends DialectAdapterBase { - /** - * Whether or not this dialect supports transactional DDL. - * - * If this is true, migrations are executed inside a transaction. - */ - get supportsTransactionalDdl(): boolean; - /** - * Whether or not this dialect supports the `returning` in inserts - * updates and deletes. - */ - get supportsReturning(): boolean; - /** - * This method is used to acquire a lock for the migrations so that - * it's not possible for two migration operations to run in parallel. - * - * Most dialects have explicit locks that can be used, like advisory locks - * in PostgreSQL and the get_lock function in MySQL. - * - * If the dialect doesn't have explicit locks the {@link MigrationLockOptions.lockTable} - * created by Kysely can be used instead. You can access it through the `options` object. - * The lock table has two columns `id` and `is_locked` and there's only one row in the table - * whose id is {@link MigrationLockOptions.lockRowId}. `is_locked` is an integer. Kysely - * takes care of creating the lock table and inserting the one single row to it before this - * method is executed. If the dialect supports schemas and the user has specified a custom - * schema in their migration settings, the options object also contains the schema name in - * {@link MigrationLockOptions.lockTableSchema}. - * - * Here's an example of how you might implement this method for a dialect that doesn't - * have explicit locks but supports `FOR UPDATE` row locks and transactional DDL: - * - * ```ts - * import { DialectAdapterBase, type MigrationLockOptions, Kysely } from 'kysely' - * - * export class MyAdapter extends DialectAdapterBase { - * override async acquireMigrationLock( - * db: Kysely, - * options: MigrationLockOptions - * ): Promise { - * const queryDb = options.lockTableSchema - * ? db.withSchema(options.lockTableSchema) - * : db - * - * // Since our imaginary dialect supports transactional DDL and has - * // row locks, we can simply take a row lock here and it will guarantee - * // all subsequent calls to this method from other transactions will - * // wait until this transaction finishes. - * await queryDb - * .selectFrom(options.lockTable) - * .selectAll() - * .where('id', '=', options.lockRowId) - * .forUpdate() - * .execute() - * } - * - * override async releaseMigrationLock() { - * // noop - * } - * } - * ``` - * - * If `supportsTransactionalDdl` is `true` then the `db` passed to this method - * is a transaction inside which the migrations will be executed. Otherwise - * `db` is a single connection (session) that will be used to execute the - * migrations. - */ - acquireMigrationLock(_db: Kysely, _opt: MigrationLockOptions): Promise; - /** - * Releases the migration lock. See {@link acquireMigrationLock}. - * - * If `supportsTransactionalDdl` is `true` then the `db` passed to this method - * is a transaction inside which the migrations were executed. Otherwise `db` - * is a single connection (session) that was used to execute the migrations - * and the `acquireMigrationLock` call. - */ - releaseMigrationLock(_db: Kysely, _opt: MigrationLockOptions): Promise; -} diff --git a/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-adapter.js b/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-adapter.js deleted file mode 100644 index ef9f504..0000000 --- a/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-adapter.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SqliteAdapter = void 0; -const dialect_adapter_base_js_1 = require("../dialect-adapter-base.js"); -class SqliteAdapter extends dialect_adapter_base_js_1.DialectAdapterBase { - get supportsTransactionalDdl() { - return false; - } - get supportsReturning() { - return true; - } - async acquireMigrationLock(_db, _opt) { - // SQLite only has one connection that's reserved by the migration system - // for the whole time between acquireMigrationLock and releaseMigrationLock. - // We don't need to do anything here. - } - async releaseMigrationLock(_db, _opt) { - // SQLite only has one connection that's reserved by the migration system - // for the whole time between acquireMigrationLock and releaseMigrationLock. - // We don't need to do anything here. - } -} -exports.SqliteAdapter = SqliteAdapter; diff --git a/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-dialect-config.d.ts b/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-dialect-config.d.ts deleted file mode 100644 index 627bcde..0000000 --- a/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-dialect-config.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import type { DatabaseConnection } from '../../driver/database-connection.js'; -/** - * Config for the SQLite dialect. - */ -export interface SqliteDialectConfig { - /** - * An sqlite Database instance or a function that returns one. - * - * If a function is provided, it's called once when the first query is executed. - * - * https://github.com/JoshuaWise/better-sqlite3/blob/master/docs/api.md#new-databasepath-options - */ - database: SqliteDatabase | (() => Promise); - /** - * Called once when the first query is executed. - * - * This is a Kysely specific feature and does not come from the `better-sqlite3` module. - */ - onCreateConnection?: (connection: DatabaseConnection) => Promise; -} -/** - * This interface is the subset of better-sqlite3 driver's `Database` class that - * kysely needs. - * - * We don't use the type from `better-sqlite3` here to not have a dependency to it. - * - * https://github.com/JoshuaWise/better-sqlite3/blob/master/docs/api.md#new-databasepath-options - */ -export interface SqliteDatabase { - close(): void; - prepare(sql: string): SqliteStatement; -} -export interface SqliteStatement { - readonly reader: boolean; - all(parameters: ReadonlyArray): unknown[]; - run(parameters: ReadonlyArray): { - changes: number | bigint; - lastInsertRowid: number | bigint; - }; - iterate(parameters: ReadonlyArray): IterableIterator; -} diff --git a/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-dialect-config.js b/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-dialect-config.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-dialect-config.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-dialect.d.ts b/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-dialect.d.ts deleted file mode 100644 index 210b50c..0000000 --- a/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-dialect.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -import type { Driver } from '../../driver/driver.js'; -import type { Kysely } from '../../kysely.js'; -import type { QueryCompiler } from '../../query-compiler/query-compiler.js'; -import type { Dialect } from '../dialect.js'; -import type { DatabaseIntrospector } from '../database-introspector.js'; -import type { DialectAdapter } from '../dialect-adapter.js'; -import type { SqliteDialectConfig } from './sqlite-dialect-config.js'; -/** - * SQLite dialect that uses the [better-sqlite3](https://github.com/JoshuaWise/better-sqlite3) library. - * - * The constructor takes an instance of {@link SqliteDialectConfig}. - * - * ```ts - * import Database from 'better-sqlite3' - * - * new SqliteDialect({ - * database: new Database('db.sqlite') - * }) - * ``` - * - * If you want the pool to only be created once it's first used, `database` - * can be a function: - * - * ```ts - * import Database from 'better-sqlite3' - * - * new SqliteDialect({ - * database: async () => new Database('db.sqlite') - * }) - * ``` - */ -export declare class SqliteDialect implements Dialect { - #private; - constructor(config: SqliteDialectConfig); - /** - * Creates a driver for the dialect. - */ - createDriver(): Driver; - /** - * Creates a query compiler for the dialect. - */ - createQueryCompiler(): QueryCompiler; - /** - * Creates an adapter for the dialect. - */ - createAdapter(): DialectAdapter; - /** - * Creates a database introspector that can be used to get database metadata - * such as the table names and column names of those tables. - * - * `db` never has any plugins installed. It's created using - * {@link Kysely.withoutPlugins}. - */ - createIntrospector(db: Kysely): DatabaseIntrospector; -} diff --git a/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-dialect.js b/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-dialect.js deleted file mode 100644 index 61e4503..0000000 --- a/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-dialect.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SqliteDialect = void 0; -const sqlite_driver_js_1 = require("./sqlite-driver.js"); -const sqlite_query_compiler_js_1 = require("./sqlite-query-compiler.js"); -const sqlite_introspector_js_1 = require("./sqlite-introspector.js"); -const sqlite_adapter_js_1 = require("./sqlite-adapter.js"); -const object_utils_js_1 = require("../../util/object-utils.js"); -/** - * SQLite dialect that uses the [better-sqlite3](https://github.com/JoshuaWise/better-sqlite3) library. - * - * The constructor takes an instance of {@link SqliteDialectConfig}. - * - * ```ts - * import Database from 'better-sqlite3' - * - * new SqliteDialect({ - * database: new Database('db.sqlite') - * }) - * ``` - * - * If you want the pool to only be created once it's first used, `database` - * can be a function: - * - * ```ts - * import Database from 'better-sqlite3' - * - * new SqliteDialect({ - * database: async () => new Database('db.sqlite') - * }) - * ``` - */ -class SqliteDialect { - #config; - constructor(config) { - this.#config = (0, object_utils_js_1.freeze)({ ...config }); - } - createDriver() { - return new sqlite_driver_js_1.SqliteDriver(this.#config); - } - createQueryCompiler() { - return new sqlite_query_compiler_js_1.SqliteQueryCompiler(); - } - createAdapter() { - return new sqlite_adapter_js_1.SqliteAdapter(); - } - createIntrospector(db) { - return new sqlite_introspector_js_1.SqliteIntrospector(db); - } -} -exports.SqliteDialect = SqliteDialect; diff --git a/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-driver.d.ts b/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-driver.d.ts deleted file mode 100644 index 04f5196..0000000 --- a/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-driver.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { DatabaseConnection } from '../../driver/database-connection.js'; -import type { Driver } from '../../driver/driver.js'; -import type { QueryCompiler } from '../../query-compiler/query-compiler.js'; -import type { SqliteDialectConfig } from './sqlite-dialect-config.js'; -export declare class SqliteDriver implements Driver { - #private; - constructor(config: SqliteDialectConfig); - /** - * Initializes the driver. - * - * After calling this method the driver should be usable and `acquireConnection` etc. - * methods should be callable. - */ - init(): Promise; - /** - * Acquires a new connection from the pool. - */ - acquireConnection(): Promise; - /** - * Begins a transaction. - */ - beginTransaction(connection: DatabaseConnection): Promise; - /** - * Commits a transaction. - */ - commitTransaction(connection: DatabaseConnection): Promise; - /** - * Rolls back a transaction. - */ - rollbackTransaction(connection: DatabaseConnection): Promise; - savepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - rollbackToSavepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - releaseSavepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - /** - * Releases a connection back to the pool. - */ - releaseConnection(): Promise; - /** - * Destroys the driver and releases all resources. - */ - destroy(): Promise; -} diff --git a/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-driver.js b/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-driver.js deleted file mode 100644 index 9f02da6..0000000 --- a/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-driver.js +++ /dev/null @@ -1,113 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SqliteDriver = void 0; -const select_query_node_js_1 = require("../../operation-node/select-query-node.js"); -const savepoint_parser_js_1 = require("../../parser/savepoint-parser.js"); -const compiled_query_js_1 = require("../../query-compiler/compiled-query.js"); -const object_utils_js_1 = require("../../util/object-utils.js"); -const query_id_js_1 = require("../../util/query-id.js"); -class SqliteDriver { - #config; - #connectionMutex = new ConnectionMutex(); - #db; - #connection; - constructor(config) { - this.#config = (0, object_utils_js_1.freeze)({ ...config }); - } - async init() { - this.#db = (0, object_utils_js_1.isFunction)(this.#config.database) - ? await this.#config.database() - : this.#config.database; - this.#connection = new SqliteConnection(this.#db); - if (this.#config.onCreateConnection) { - await this.#config.onCreateConnection(this.#connection); - } - } - async acquireConnection() { - // SQLite only has one single connection. We use a mutex here to wait - // until the single connection has been released. - await this.#connectionMutex.lock(); - return this.#connection; - } - async beginTransaction(connection) { - await connection.executeQuery(compiled_query_js_1.CompiledQuery.raw('begin')); - } - async commitTransaction(connection) { - await connection.executeQuery(compiled_query_js_1.CompiledQuery.raw('commit')); - } - async rollbackTransaction(connection) { - await connection.executeQuery(compiled_query_js_1.CompiledQuery.raw('rollback')); - } - async savepoint(connection, savepointName, compileQuery) { - await connection.executeQuery(compileQuery((0, savepoint_parser_js_1.parseSavepointCommand)('savepoint', savepointName), (0, query_id_js_1.createQueryId)())); - } - async rollbackToSavepoint(connection, savepointName, compileQuery) { - await connection.executeQuery(compileQuery((0, savepoint_parser_js_1.parseSavepointCommand)('rollback to', savepointName), (0, query_id_js_1.createQueryId)())); - } - async releaseSavepoint(connection, savepointName, compileQuery) { - await connection.executeQuery(compileQuery((0, savepoint_parser_js_1.parseSavepointCommand)('release', savepointName), (0, query_id_js_1.createQueryId)())); - } - async releaseConnection() { - this.#connectionMutex.unlock(); - } - async destroy() { - this.#db?.close(); - } -} -exports.SqliteDriver = SqliteDriver; -class SqliteConnection { - #db; - constructor(db) { - this.#db = db; - } - executeQuery(compiledQuery) { - const { sql, parameters } = compiledQuery; - const stmt = this.#db.prepare(sql); - if (stmt.reader) { - return Promise.resolve({ - rows: stmt.all(parameters), - }); - } - const { changes, lastInsertRowid } = stmt.run(parameters); - return Promise.resolve({ - numAffectedRows: changes !== undefined && changes !== null ? BigInt(changes) : undefined, - insertId: lastInsertRowid !== undefined && lastInsertRowid !== null - ? BigInt(lastInsertRowid) - : undefined, - rows: [], - }); - } - async *streamQuery(compiledQuery, _chunkSize) { - const { sql, parameters, query } = compiledQuery; - const stmt = this.#db.prepare(sql); - if (select_query_node_js_1.SelectQueryNode.is(query)) { - const iter = stmt.iterate(parameters); - for (const row of iter) { - yield { - rows: [row], - }; - } - } - else { - throw new Error('Sqlite driver only supports streaming of select queries'); - } - } -} -class ConnectionMutex { - #promise; - #resolve; - async lock() { - while (this.#promise) { - await this.#promise; - } - this.#promise = new Promise((resolve) => { - this.#resolve = resolve; - }); - } - unlock() { - const resolve = this.#resolve; - this.#promise = undefined; - this.#resolve = undefined; - resolve?.(); - } -} diff --git a/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-introspector.d.ts b/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-introspector.d.ts deleted file mode 100644 index 011ab7c..0000000 --- a/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-introspector.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { DatabaseIntrospector, DatabaseMetadata, DatabaseMetadataOptions, SchemaMetadata, TableMetadata } from '../database-introspector.js'; -import type { Kysely } from '../../kysely.js'; -export declare class SqliteIntrospector implements DatabaseIntrospector { - #private; - constructor(db: Kysely); - /** - * Get schema metadata. - */ - getSchemas(): Promise; - /** - * Get tables and views metadata. - */ - getTables(options?: DatabaseMetadataOptions): Promise; - /** - * Get the database metadata such as table and column names. - * - * @deprecated Use getTables() instead. - */ - getMetadata(options?: DatabaseMetadataOptions): Promise; -} diff --git a/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-introspector.js b/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-introspector.js deleted file mode 100644 index 20b8010..0000000 --- a/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-introspector.js +++ /dev/null @@ -1,94 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SqliteIntrospector = void 0; -const migrator_js_1 = require("../../migration/migrator.js"); -const sql_js_1 = require("../../raw-builder/sql.js"); -class SqliteIntrospector { - #db; - constructor(db) { - this.#db = db; - } - async getSchemas() { - // Sqlite doesn't support schemas. - return []; - } - async getTables(options = { withInternalKyselyTables: false }) { - return await this.#getTableMetadata(options); - } - async getMetadata(options) { - return { - tables: await this.getTables(options), - }; - } - #tablesQuery(qb, options) { - let tablesQuery = qb - .selectFrom('sqlite_master') - .where('type', 'in', ['table', 'view']) - .where('name', 'not like', 'sqlite_%') - .select(['name', 'sql', 'type']) - .orderBy('name'); - if (!options.withInternalKyselyTables) { - tablesQuery = tablesQuery - .where('name', '!=', migrator_js_1.DEFAULT_MIGRATION_TABLE) - .where('name', '!=', migrator_js_1.DEFAULT_MIGRATION_LOCK_TABLE); - } - return tablesQuery; - } - async #getTableMetadata(options) { - const tablesResult = await this.#tablesQuery(this.#db, options).execute(); - const tableMetadata = await this.#db - .with('table_list', (qb) => this.#tablesQuery(qb, options)) - .selectFrom([ - 'table_list as tl', - (0, sql_js_1.sql) `pragma_table_info(tl.name)`.as('p'), - ]) - .select([ - 'tl.name as table', - 'p.cid', - 'p.name', - 'p.type', - 'p.notnull', - 'p.dflt_value', - 'p.pk', - ]) - .orderBy('tl.name') - .orderBy('p.cid') - .execute(); - const columnsByTable = {}; - for (const row of tableMetadata) { - columnsByTable[row.table] ??= []; - columnsByTable[row.table].push(row); - } - return tablesResult.map(({ name, sql, type }) => { - // // Try to find the name of the column that has `autoincrement` 🤦 - let autoIncrementCol = sql - ?.split(/[\(\),]/) - ?.find((it) => it.toLowerCase().includes('autoincrement')) - ?.trimStart() - ?.split(/\s+/)?.[0] - ?.replace(/["`]/g, ''); - const columns = columnsByTable[name] ?? []; - // Otherwise, check for an INTEGER PRIMARY KEY - // https://www.sqlite.org/autoinc.html - if (!autoIncrementCol) { - const pkCols = columns.filter((r) => r.pk > 0); - if (pkCols.length === 1 && pkCols[0].type.toLowerCase() === 'integer') { - autoIncrementCol = pkCols[0].name; - } - } - return { - name: name, - isView: type === 'view', - columns: columns.map((col) => ({ - name: col.name, - dataType: col.type, - isNullable: !col.notnull, - isAutoIncrementing: col.name === autoIncrementCol, - hasDefaultValue: col.dflt_value != null, - comment: undefined, - })), - }; - }); - } -} -exports.SqliteIntrospector = SqliteIntrospector; diff --git a/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-query-compiler.d.ts b/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-query-compiler.d.ts deleted file mode 100644 index 39ef0ec..0000000 --- a/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-query-compiler.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { DefaultInsertValueNode } from '../../operation-node/default-insert-value-node.js'; -import type { OrActionNode } from '../../operation-node/or-action-node.js'; -import { DefaultQueryCompiler } from '../../query-compiler/default-query-compiler.js'; -export declare class SqliteQueryCompiler extends DefaultQueryCompiler { - protected visitOrAction(node: OrActionNode): void; - protected getCurrentParameterPlaceholder(): string; - protected getLeftExplainOptionsWrapper(): string; - protected getRightExplainOptionsWrapper(): string; - protected getLeftIdentifierWrapper(): string; - protected getRightIdentifierWrapper(): string; - protected getAutoIncrement(): string; - protected sanitizeIdentifier(identifier: string): string; - protected visitDefaultInsertValue(_: DefaultInsertValueNode): void; -} diff --git a/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-query-compiler.js b/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-query-compiler.js deleted file mode 100644 index eaabef6..0000000 --- a/node_modules/kysely/dist/cjs/dialect/sqlite/sqlite-query-compiler.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SqliteQueryCompiler = void 0; -const default_query_compiler_js_1 = require("../../query-compiler/default-query-compiler.js"); -const ID_WRAP_REGEX = /"/g; -class SqliteQueryCompiler extends default_query_compiler_js_1.DefaultQueryCompiler { - visitOrAction(node) { - this.append('or '); - this.append(node.action); - } - getCurrentParameterPlaceholder() { - return '?'; - } - getLeftExplainOptionsWrapper() { - return ''; - } - getRightExplainOptionsWrapper() { - return ''; - } - getLeftIdentifierWrapper() { - return '"'; - } - getRightIdentifierWrapper() { - return '"'; - } - getAutoIncrement() { - return 'autoincrement'; - } - sanitizeIdentifier(identifier) { - return identifier.replace(ID_WRAP_REGEX, '""'); - } - visitDefaultInsertValue(_) { - // sqlite doesn't support the `default` keyword in inserts. - this.append('null'); - } -} -exports.SqliteQueryCompiler = SqliteQueryCompiler; diff --git a/node_modules/kysely/dist/cjs/driver/connection-provider.d.ts b/node_modules/kysely/dist/cjs/driver/connection-provider.d.ts deleted file mode 100644 index 72e0220..0000000 --- a/node_modules/kysely/dist/cjs/driver/connection-provider.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { DatabaseConnection } from './database-connection.js'; -export interface ConnectionProvider { - /** - * Provides a connection for the callback and takes care of disposing - * the connection after the callback has been run. - */ - provideConnection(consumer: (connection: DatabaseConnection) => Promise): Promise; -} diff --git a/node_modules/kysely/dist/cjs/driver/connection-provider.js b/node_modules/kysely/dist/cjs/driver/connection-provider.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/driver/connection-provider.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/driver/database-connection.d.ts b/node_modules/kysely/dist/cjs/driver/database-connection.d.ts deleted file mode 100644 index 76614a4..0000000 --- a/node_modules/kysely/dist/cjs/driver/database-connection.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -/** - * A single connection to the database engine. - * - * These are created by an instance of {@link Driver}. - */ -export interface DatabaseConnection { - executeQuery(compiledQuery: CompiledQuery): Promise>; - streamQuery(compiledQuery: CompiledQuery, chunkSize?: number): AsyncIterableIterator>; -} -export interface QueryResult { - /** - * This is defined for insert, update, delete and merge queries and contains - * the number of rows the query inserted/updated/deleted. - */ - readonly numAffectedRows?: bigint; - /** - * This is defined for update queries and contains the number of rows - * the query changed. - * - * This is **optional** and only provided in dialects such as MySQL. - * You would probably use {@link numAffectedRows} in most cases. - */ - readonly numChangedRows?: bigint; - /** - * This is defined for insert queries on dialects that return - * the auto incrementing primary key from an insert. - */ - readonly insertId?: bigint; - /** - * The rows returned by the query. This is always defined and is - * empty if the query returned no rows. - */ - readonly rows: O[]; -} diff --git a/node_modules/kysely/dist/cjs/driver/database-connection.js b/node_modules/kysely/dist/cjs/driver/database-connection.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/driver/database-connection.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/driver/default-connection-provider.d.ts b/node_modules/kysely/dist/cjs/driver/default-connection-provider.d.ts deleted file mode 100644 index 74f5c0a..0000000 --- a/node_modules/kysely/dist/cjs/driver/default-connection-provider.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { DatabaseConnection } from './database-connection.js'; -import type { ConnectionProvider } from './connection-provider.js'; -import type { Driver } from './driver.js'; -export declare class DefaultConnectionProvider implements ConnectionProvider { - #private; - constructor(driver: Driver); - /** - * Provides a connection for the callback and takes care of disposing - * the connection after the callback has been run. - */ - provideConnection(consumer: (connection: DatabaseConnection) => Promise): Promise; -} diff --git a/node_modules/kysely/dist/cjs/driver/default-connection-provider.js b/node_modules/kysely/dist/cjs/driver/default-connection-provider.js deleted file mode 100644 index 6d6415a..0000000 --- a/node_modules/kysely/dist/cjs/driver/default-connection-provider.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DefaultConnectionProvider = void 0; -class DefaultConnectionProvider { - #driver; - constructor(driver) { - this.#driver = driver; - } - async provideConnection(consumer) { - const connection = await this.#driver.acquireConnection(); - try { - return await consumer(connection); - } - finally { - await this.#driver.releaseConnection(connection); - } - } -} -exports.DefaultConnectionProvider = DefaultConnectionProvider; diff --git a/node_modules/kysely/dist/cjs/driver/driver.d.ts b/node_modules/kysely/dist/cjs/driver/driver.d.ts deleted file mode 100644 index 1f9b41a..0000000 --- a/node_modules/kysely/dist/cjs/driver/driver.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -import type { QueryCompiler } from '../query-compiler/query-compiler.js'; -import type { ArrayItemType } from '../util/type-utils.js'; -import type { DatabaseConnection } from './database-connection.js'; -/** - * A Driver creates and releases {@link DatabaseConnection | database connections} - * and is also responsible for connection pooling (if the dialect supports pooling). - */ -export interface Driver { - /** - * Initializes the driver. - * - * After calling this method the driver should be usable and `acquireConnection` etc. - * methods should be callable. - */ - init(): Promise; - /** - * Acquires a new connection from the pool. - */ - acquireConnection(): Promise; - /** - * Begins a transaction. - */ - beginTransaction(connection: DatabaseConnection, settings: TransactionSettings): Promise; - /** - * Commits a transaction. - */ - commitTransaction(connection: DatabaseConnection): Promise; - /** - * Rolls back a transaction. - */ - rollbackTransaction(connection: DatabaseConnection): Promise; - /** - * Establishses a new savepoint within a transaction. - */ - savepoint?(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - /** - * Rolls back to a savepoint within a transaction. - */ - rollbackToSavepoint?(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - /** - * Releases a savepoint within a transaction. - */ - releaseSavepoint?(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - /** - * Releases a connection back to the pool. - */ - releaseConnection(connection: DatabaseConnection): Promise; - /** - * Destroys the driver and releases all resources. - */ - destroy(): Promise; -} -export interface TransactionSettings { - readonly accessMode?: AccessMode; - readonly isolationLevel?: IsolationLevel; -} -export declare const TRANSACTION_ACCESS_MODES: readonly ["read only", "read write"]; -export type AccessMode = ArrayItemType; -export declare const TRANSACTION_ISOLATION_LEVELS: readonly ["read uncommitted", "read committed", "repeatable read", "serializable", "snapshot"]; -export type IsolationLevel = ArrayItemType; -export declare function validateTransactionSettings(settings: TransactionSettings): void; diff --git a/node_modules/kysely/dist/cjs/driver/driver.js b/node_modules/kysely/dist/cjs/driver/driver.js deleted file mode 100644 index 8b131f2..0000000 --- a/node_modules/kysely/dist/cjs/driver/driver.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TRANSACTION_ISOLATION_LEVELS = exports.TRANSACTION_ACCESS_MODES = void 0; -exports.validateTransactionSettings = validateTransactionSettings; -exports.TRANSACTION_ACCESS_MODES = ['read only', 'read write']; -exports.TRANSACTION_ISOLATION_LEVELS = [ - 'read uncommitted', - 'read committed', - 'repeatable read', - 'serializable', - 'snapshot', -]; -function validateTransactionSettings(settings) { - if (settings.accessMode && - !exports.TRANSACTION_ACCESS_MODES.includes(settings.accessMode)) { - throw new Error(`invalid transaction access mode ${settings.accessMode}`); - } - if (settings.isolationLevel && - !exports.TRANSACTION_ISOLATION_LEVELS.includes(settings.isolationLevel)) { - throw new Error(`invalid transaction isolation level ${settings.isolationLevel}`); - } -} diff --git a/node_modules/kysely/dist/cjs/driver/dummy-driver.d.ts b/node_modules/kysely/dist/cjs/driver/dummy-driver.d.ts deleted file mode 100644 index 1aeb364..0000000 --- a/node_modules/kysely/dist/cjs/driver/dummy-driver.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -import type { DatabaseConnection } from './database-connection.js'; -import type { Driver } from './driver.js'; -/** - * A driver that does absolutely nothing. - * - * You can use this to create Kysely instances solely for building queries - * - * ### Examples - * - * This example creates a Kysely instance for building postgres queries: - * - * ```ts - * import { - * DummyDriver, - * Kysely, - * PostgresAdapter, - * PostgresIntrospector, - * PostgresQueryCompiler - * } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: { - * createAdapter: () => new PostgresAdapter(), - * createDriver: () => new DummyDriver(), - * createIntrospector: (db: Kysely) => new PostgresIntrospector(db), - * createQueryCompiler: () => new PostgresQueryCompiler(), - * }, - * }) - * ``` - * - * You can use it to build a query and compile it to SQL but trying to - * execute the query will throw an error. - * - * ```ts - * const { sql } = db.selectFrom('person').selectAll().compile() - * console.log(sql) // select * from "person" - * ``` - */ -export declare class DummyDriver implements Driver { - /** - * Initializes the driver. - * - * After calling this method the driver should be usable and `acquireConnection` etc. - * methods should be callable. - */ - init(): Promise; - /** - * Acquires a new connection from the pool. - */ - acquireConnection(): Promise; - /** - * Begins a transaction. - */ - beginTransaction(): Promise; - /** - * Commits a transaction. - */ - commitTransaction(): Promise; - /** - * Rolls back a transaction. - */ - rollbackTransaction(): Promise; - /** - * Releases a connection back to the pool. - */ - releaseConnection(): Promise; - /** - * Destroys the driver and releases all resources. - */ - destroy(): Promise; - releaseSavepoint(): Promise; - rollbackToSavepoint(): Promise; - savepoint(): Promise; -} diff --git a/node_modules/kysely/dist/cjs/driver/dummy-driver.js b/node_modules/kysely/dist/cjs/driver/dummy-driver.js deleted file mode 100644 index 4bb55df..0000000 --- a/node_modules/kysely/dist/cjs/driver/dummy-driver.js +++ /dev/null @@ -1,83 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DummyDriver = void 0; -/** - * A driver that does absolutely nothing. - * - * You can use this to create Kysely instances solely for building queries - * - * ### Examples - * - * This example creates a Kysely instance for building postgres queries: - * - * ```ts - * import { - * DummyDriver, - * Kysely, - * PostgresAdapter, - * PostgresIntrospector, - * PostgresQueryCompiler - * } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: { - * createAdapter: () => new PostgresAdapter(), - * createDriver: () => new DummyDriver(), - * createIntrospector: (db: Kysely) => new PostgresIntrospector(db), - * createQueryCompiler: () => new PostgresQueryCompiler(), - * }, - * }) - * ``` - * - * You can use it to build a query and compile it to SQL but trying to - * execute the query will throw an error. - * - * ```ts - * const { sql } = db.selectFrom('person').selectAll().compile() - * console.log(sql) // select * from "person" - * ``` - */ -class DummyDriver { - async init() { - // Nothing to do here. - } - async acquireConnection() { - return new DummyConnection(); - } - async beginTransaction() { - // Nothing to do here. - } - async commitTransaction() { - // Nothing to do here. - } - async rollbackTransaction() { - // Nothing to do here. - } - async releaseConnection() { - // Nothing to do here. - } - async destroy() { - // Nothing to do here. - } - async releaseSavepoint() { - // Nothing to do here. - } - async rollbackToSavepoint() { - // Nothing to do here. - } - async savepoint() { - // Nothing to do here. - } -} -exports.DummyDriver = DummyDriver; -class DummyConnection { - async executeQuery() { - return { - rows: [], - }; - } - async *streamQuery() { - // Nothing to do here. - } -} diff --git a/node_modules/kysely/dist/cjs/driver/runtime-driver.d.ts b/node_modules/kysely/dist/cjs/driver/runtime-driver.d.ts deleted file mode 100644 index 87a7f45..0000000 --- a/node_modules/kysely/dist/cjs/driver/runtime-driver.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -import type { QueryCompiler } from '../query-compiler/query-compiler.js'; -import type { Log } from '../util/log.js'; -import type { DatabaseConnection } from './database-connection.js'; -import type { Driver, TransactionSettings } from './driver.js'; -/** - * A small wrapper around {@link Driver} that makes sure the driver is - * initialized before it is used, only initialized and destroyed - * once etc. - */ -export declare class RuntimeDriver implements Driver { - #private; - constructor(driver: Driver, log: Log); - /** - * Initializes the driver. - * - * After calling this method the driver should be usable and `acquireConnection` etc. - * methods should be callable. - */ - init(): Promise; - /** - * Acquires a new connection from the pool. - */ - acquireConnection(): Promise; - /** - * Releases a connection back to the pool. - */ - releaseConnection(connection: DatabaseConnection): Promise; - /** - * Begins a transaction. - */ - beginTransaction(connection: DatabaseConnection, settings: TransactionSettings): Promise; - /** - * Commits a transaction. - */ - commitTransaction(connection: DatabaseConnection): Promise; - /** - * Rolls back a transaction. - */ - rollbackTransaction(connection: DatabaseConnection): Promise; - savepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - rollbackToSavepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - releaseSavepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - /** - * Destroys the driver and releases all resources. - */ - destroy(): Promise; -} diff --git a/node_modules/kysely/dist/cjs/driver/runtime-driver.js b/node_modules/kysely/dist/cjs/driver/runtime-driver.js deleted file mode 100644 index 3a0d864..0000000 --- a/node_modules/kysely/dist/cjs/driver/runtime-driver.js +++ /dev/null @@ -1,165 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RuntimeDriver = void 0; -const performance_now_js_1 = require("../util/performance-now.js"); -/** - * A small wrapper around {@link Driver} that makes sure the driver is - * initialized before it is used, only initialized and destroyed - * once etc. - */ -class RuntimeDriver { - #driver; - #log; - #initPromise; - #initDone; - #destroyPromise; - #connections = new WeakSet(); - constructor(driver, log) { - this.#initDone = false; - this.#driver = driver; - this.#log = log; - } - async init() { - if (this.#destroyPromise) { - throw new Error('driver has already been destroyed'); - } - if (!this.#initPromise) { - this.#initPromise = this.#driver - .init() - .then(() => { - this.#initDone = true; - }) - .catch((err) => { - this.#initPromise = undefined; - return Promise.reject(err); - }); - } - await this.#initPromise; - } - async acquireConnection() { - if (this.#destroyPromise) { - throw new Error('driver has already been destroyed'); - } - if (!this.#initDone) { - await this.init(); - } - const connection = await this.#driver.acquireConnection(); - if (!this.#connections.has(connection)) { - if (this.#needsLogging()) { - this.#addLogging(connection); - } - this.#connections.add(connection); - } - return connection; - } - async releaseConnection(connection) { - await this.#driver.releaseConnection(connection); - } - beginTransaction(connection, settings) { - return this.#driver.beginTransaction(connection, settings); - } - commitTransaction(connection) { - return this.#driver.commitTransaction(connection); - } - rollbackTransaction(connection) { - return this.#driver.rollbackTransaction(connection); - } - savepoint(connection, savepointName, compileQuery) { - if (this.#driver.savepoint) { - return this.#driver.savepoint(connection, savepointName, compileQuery); - } - throw new Error('The `savepoint` method is not supported by this driver'); - } - rollbackToSavepoint(connection, savepointName, compileQuery) { - if (this.#driver.rollbackToSavepoint) { - return this.#driver.rollbackToSavepoint(connection, savepointName, compileQuery); - } - throw new Error('The `rollbackToSavepoint` method is not supported by this driver'); - } - releaseSavepoint(connection, savepointName, compileQuery) { - if (this.#driver.releaseSavepoint) { - return this.#driver.releaseSavepoint(connection, savepointName, compileQuery); - } - throw new Error('The `releaseSavepoint` method is not supported by this driver'); - } - async destroy() { - if (!this.#initPromise) { - return; - } - await this.#initPromise; - if (!this.#destroyPromise) { - this.#destroyPromise = this.#driver.destroy().catch((err) => { - this.#destroyPromise = undefined; - return Promise.reject(err); - }); - } - await this.#destroyPromise; - } - #needsLogging() { - return (this.#log.isLevelEnabled('query') || this.#log.isLevelEnabled('error')); - } - // This method monkey patches the database connection's executeQuery method - // by adding logging code around it. Monkey patching is not pretty, but it's - // the best option in this case. - #addLogging(connection) { - const executeQuery = connection.executeQuery; - const streamQuery = connection.streamQuery; - const dis = this; - connection.executeQuery = async (compiledQuery) => { - let caughtError; - const startTime = (0, performance_now_js_1.performanceNow)(); - try { - return await executeQuery.call(connection, compiledQuery); - } - catch (error) { - caughtError = error; - await dis.#logError(error, compiledQuery, startTime); - throw error; - } - finally { - if (!caughtError) { - await dis.#logQuery(compiledQuery, startTime); - } - } - }; - connection.streamQuery = async function* (compiledQuery, chunkSize) { - let caughtError; - const startTime = (0, performance_now_js_1.performanceNow)(); - try { - for await (const result of streamQuery.call(connection, compiledQuery, chunkSize)) { - yield result; - } - } - catch (error) { - caughtError = error; - await dis.#logError(error, compiledQuery, startTime); - throw error; - } - finally { - if (!caughtError) { - await dis.#logQuery(compiledQuery, startTime, true); - } - } - }; - } - async #logError(error, compiledQuery, startTime) { - await this.#log.error(() => ({ - level: 'error', - error, - query: compiledQuery, - queryDurationMillis: this.#calculateDurationMillis(startTime), - })); - } - async #logQuery(compiledQuery, startTime, isStream = false) { - await this.#log.query(() => ({ - level: 'query', - isStream, - query: compiledQuery, - queryDurationMillis: this.#calculateDurationMillis(startTime), - })); - } - #calculateDurationMillis(startTime) { - return (0, performance_now_js_1.performanceNow)() - startTime; - } -} -exports.RuntimeDriver = RuntimeDriver; diff --git a/node_modules/kysely/dist/cjs/driver/single-connection-provider.d.ts b/node_modules/kysely/dist/cjs/driver/single-connection-provider.d.ts deleted file mode 100644 index 0772443..0000000 --- a/node_modules/kysely/dist/cjs/driver/single-connection-provider.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { DatabaseConnection } from './database-connection.js'; -import type { ConnectionProvider } from './connection-provider.js'; -export declare class SingleConnectionProvider implements ConnectionProvider { - #private; - constructor(connection: DatabaseConnection); - /** - * Provides a connection for the callback and takes care of disposing - * the connection after the callback has been run. - */ - provideConnection(consumer: (connection: DatabaseConnection) => Promise): Promise; -} diff --git a/node_modules/kysely/dist/cjs/driver/single-connection-provider.js b/node_modules/kysely/dist/cjs/driver/single-connection-provider.js deleted file mode 100644 index db6bca0..0000000 --- a/node_modules/kysely/dist/cjs/driver/single-connection-provider.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SingleConnectionProvider = void 0; -const ignoreError = () => { }; -class SingleConnectionProvider { - #connection; - #runningPromise; - constructor(connection) { - this.#connection = connection; - } - async provideConnection(consumer) { - while (this.#runningPromise) { - await this.#runningPromise.catch(ignoreError); - } - // `#runningPromise` must be set to undefined before it's - // resolved or rejected. Otherwise the while loop above - // will misbehave. - this.#runningPromise = this.#run(consumer).finally(() => { - this.#runningPromise = undefined; - }); - return this.#runningPromise; - } - // Run the runner in an async function to make sure it doesn't - // throw synchronous errors. - async #run(runner) { - return await runner(this.#connection); - } -} -exports.SingleConnectionProvider = SingleConnectionProvider; diff --git a/node_modules/kysely/dist/cjs/dynamic/dynamic-reference-builder.d.ts b/node_modules/kysely/dist/cjs/dynamic/dynamic-reference-builder.d.ts deleted file mode 100644 index eaf0339..0000000 --- a/node_modules/kysely/dist/cjs/dynamic/dynamic-reference-builder.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { type OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { SimpleReferenceExpressionNode } from '../operation-node/simple-reference-expression-node.js'; -export declare class DynamicReferenceBuilder implements OperationNodeSource { - #private; - get dynamicReference(): string; - /** - * @private - * - * This needs to be here just so that the typings work. Without this - * the generated .d.ts file contains no reference to the type param R - * which causes this type to be equal to DynamicReferenceBuilder with - * any R. - */ - protected get refType(): R; - constructor(reference: string); - toOperationNode(): SimpleReferenceExpressionNode; -} -export declare function isDynamicReferenceBuilder(obj: unknown): obj is DynamicReferenceBuilder; diff --git a/node_modules/kysely/dist/cjs/dynamic/dynamic-reference-builder.js b/node_modules/kysely/dist/cjs/dynamic/dynamic-reference-builder.js deleted file mode 100644 index b4747dd..0000000 --- a/node_modules/kysely/dist/cjs/dynamic/dynamic-reference-builder.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DynamicReferenceBuilder = void 0; -exports.isDynamicReferenceBuilder = isDynamicReferenceBuilder; -const operation_node_source_js_1 = require("../operation-node/operation-node-source.js"); -const reference_parser_js_1 = require("../parser/reference-parser.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -class DynamicReferenceBuilder { - #dynamicReference; - get dynamicReference() { - return this.#dynamicReference; - } - /** - * @private - * - * This needs to be here just so that the typings work. Without this - * the generated .d.ts file contains no reference to the type param R - * which causes this type to be equal to DynamicReferenceBuilder with - * any R. - */ - get refType() { - return undefined; - } - constructor(reference) { - this.#dynamicReference = reference; - } - toOperationNode() { - return (0, reference_parser_js_1.parseSimpleReferenceExpression)(this.#dynamicReference); - } -} -exports.DynamicReferenceBuilder = DynamicReferenceBuilder; -function isDynamicReferenceBuilder(obj) { - return ((0, object_utils_js_1.isObject)(obj) && - (0, operation_node_source_js_1.isOperationNodeSource)(obj) && - (0, object_utils_js_1.isString)(obj.dynamicReference)); -} diff --git a/node_modules/kysely/dist/cjs/dynamic/dynamic-table-builder.d.ts b/node_modules/kysely/dist/cjs/dynamic/dynamic-table-builder.d.ts deleted file mode 100644 index 5963fc2..0000000 --- a/node_modules/kysely/dist/cjs/dynamic/dynamic-table-builder.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { AliasNode } from '../operation-node/alias-node.js'; -import { type OperationNodeSource } from '../operation-node/operation-node-source.js'; -export declare class DynamicTableBuilder { - #private; - get table(): T; - constructor(table: T); - as(alias: A): AliasedDynamicTableBuilder; -} -export declare class AliasedDynamicTableBuilder implements OperationNodeSource { - #private; - get table(): T; - get alias(): A; - constructor(table: T, alias: A); - toOperationNode(): AliasNode; -} -export declare function isAliasedDynamicTableBuilder(obj: unknown): obj is AliasedDynamicTableBuilder; diff --git a/node_modules/kysely/dist/cjs/dynamic/dynamic-table-builder.js b/node_modules/kysely/dist/cjs/dynamic/dynamic-table-builder.js deleted file mode 100644 index d578f90..0000000 --- a/node_modules/kysely/dist/cjs/dynamic/dynamic-table-builder.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AliasedDynamicTableBuilder = exports.DynamicTableBuilder = void 0; -exports.isAliasedDynamicTableBuilder = isAliasedDynamicTableBuilder; -const alias_node_js_1 = require("../operation-node/alias-node.js"); -const identifier_node_js_1 = require("../operation-node/identifier-node.js"); -const operation_node_source_js_1 = require("../operation-node/operation-node-source.js"); -const table_parser_js_1 = require("../parser/table-parser.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -class DynamicTableBuilder { - #table; - get table() { - return this.#table; - } - constructor(table) { - this.#table = table; - } - as(alias) { - return new AliasedDynamicTableBuilder(this.#table, alias); - } -} -exports.DynamicTableBuilder = DynamicTableBuilder; -class AliasedDynamicTableBuilder { - #table; - #alias; - get table() { - return this.#table; - } - get alias() { - return this.#alias; - } - constructor(table, alias) { - this.#table = table; - this.#alias = alias; - } - toOperationNode() { - return alias_node_js_1.AliasNode.create((0, table_parser_js_1.parseTable)(this.#table), identifier_node_js_1.IdentifierNode.create(this.#alias)); - } -} -exports.AliasedDynamicTableBuilder = AliasedDynamicTableBuilder; -function isAliasedDynamicTableBuilder(obj) { - return ((0, object_utils_js_1.isObject)(obj) && - (0, operation_node_source_js_1.isOperationNodeSource)(obj) && - (0, object_utils_js_1.isString)(obj.table) && - (0, object_utils_js_1.isString)(obj.alias)); -} diff --git a/node_modules/kysely/dist/cjs/dynamic/dynamic.d.ts b/node_modules/kysely/dist/cjs/dynamic/dynamic.d.ts deleted file mode 100644 index 8f42d72..0000000 --- a/node_modules/kysely/dist/cjs/dynamic/dynamic.d.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { DynamicReferenceBuilder } from './dynamic-reference-builder.js'; -import { DynamicTableBuilder } from './dynamic-table-builder.js'; -export declare class DynamicModule { - /** - * Creates a dynamic reference to a column that is not know at compile time. - * - * Kysely is built in a way that by default you can't refer to tables or columns - * that are not actually visible in the current query and context. This is all - * done by TypeScript at compile time, which means that you need to know the - * columns and tables at compile time. This is not always the case of course. - * - * This method is meant to be used in those cases where the column names - * come from the user input or are not otherwise known at compile time. - * - * WARNING! Unlike values, column names are not escaped by the database engine - * or Kysely and if you pass in unchecked column names using this method, you - * create an SQL injection vulnerability. Always __always__ validate the user - * input before passing it to this method. - * - * There are couple of examples below for some use cases, but you can pass - * `ref` to other methods as well. If the types allow you to pass a `ref` - * value to some place, it should work. - * - * ### Examples - * - * Filter by a column not know at compile time: - * - * ```ts - * async function someQuery(filterColumn: string, filterValue: string) { - * const { ref } = db.dynamic - * - * return await db - * .selectFrom('person') - * .selectAll() - * .where(ref(filterColumn), '=', filterValue) - * .execute() - * } - * - * someQuery('first_name', 'Arnold') - * someQuery('person.last_name', 'Aniston') - * ``` - * - * Order by a column not know at compile time: - * - * ```ts - * async function someQuery(orderBy: string) { - * const { ref } = db.dynamic - * - * return await db - * .selectFrom('person') - * .select('person.first_name as fn') - * .orderBy(ref(orderBy)) - * .execute() - * } - * - * someQuery('fn') - * ``` - * - * In this example we add selections dynamically: - * - * ```ts - * const { ref } = db.dynamic - * - * // Some column name provided by the user. Value not known at compile time. - * const columnFromUserInput: PossibleColumns = 'birthdate'; - * - * // A type that lists all possible values `columnFromUserInput` can have. - * // You can use `keyof Person` if any column of an interface is allowed. - * type PossibleColumns = 'last_name' | 'first_name' | 'birthdate' - * - * const [person] = await db.selectFrom('person') - * .select([ - * ref(columnFromUserInput), - * 'id' - * ]) - * .execute() - * - * // The resulting type contains all `PossibleColumns` as optional fields - * // because we cannot know which field was actually selected before - * // running the code. - * const lastName: string | null | undefined = person?.last_name - * const firstName: string | undefined = person?.first_name - * const birthDate: Date | null | undefined = person?.birthdate - * - * // The result type also contains the compile time selection `id`. - * person?.id - * ``` - */ - ref(reference: string): DynamicReferenceBuilder; - /** - * Creates a table reference to a table that's not fully known at compile time. - * - * The type `T` is allowed to be a union of multiple tables. - * - * - * - * A generic type-safe helper function for finding a row by a column value: - * - * ```ts - * import { SelectType } from 'kysely' - * import { Database } from 'type-editor' - * - * async function getRowByColumn< - * T extends keyof Database, - * C extends keyof Database[T] & string, - * V extends SelectType, - * >(t: T, c: C, v: V) { - * // We need to use the dynamic module since the table name - * // is not known at compile time. - * const { table, ref } = db.dynamic - * - * return await db - * .selectFrom(table(t).as('t')) - * .selectAll() - * .where(ref(c), '=', v) - * .orderBy('t.id') - * .executeTakeFirstOrThrow() - * } - * - * const person = await getRowByColumn('person', 'first_name', 'Arnold') - * ``` - */ - table(table: T): DynamicTableBuilder; -} diff --git a/node_modules/kysely/dist/cjs/dynamic/dynamic.js b/node_modules/kysely/dist/cjs/dynamic/dynamic.js deleted file mode 100644 index 341245b..0000000 --- a/node_modules/kysely/dist/cjs/dynamic/dynamic.js +++ /dev/null @@ -1,132 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DynamicModule = void 0; -const dynamic_reference_builder_js_1 = require("./dynamic-reference-builder.js"); -const dynamic_table_builder_js_1 = require("./dynamic-table-builder.js"); -class DynamicModule { - /** - * Creates a dynamic reference to a column that is not know at compile time. - * - * Kysely is built in a way that by default you can't refer to tables or columns - * that are not actually visible in the current query and context. This is all - * done by TypeScript at compile time, which means that you need to know the - * columns and tables at compile time. This is not always the case of course. - * - * This method is meant to be used in those cases where the column names - * come from the user input or are not otherwise known at compile time. - * - * WARNING! Unlike values, column names are not escaped by the database engine - * or Kysely and if you pass in unchecked column names using this method, you - * create an SQL injection vulnerability. Always __always__ validate the user - * input before passing it to this method. - * - * There are couple of examples below for some use cases, but you can pass - * `ref` to other methods as well. If the types allow you to pass a `ref` - * value to some place, it should work. - * - * ### Examples - * - * Filter by a column not know at compile time: - * - * ```ts - * async function someQuery(filterColumn: string, filterValue: string) { - * const { ref } = db.dynamic - * - * return await db - * .selectFrom('person') - * .selectAll() - * .where(ref(filterColumn), '=', filterValue) - * .execute() - * } - * - * someQuery('first_name', 'Arnold') - * someQuery('person.last_name', 'Aniston') - * ``` - * - * Order by a column not know at compile time: - * - * ```ts - * async function someQuery(orderBy: string) { - * const { ref } = db.dynamic - * - * return await db - * .selectFrom('person') - * .select('person.first_name as fn') - * .orderBy(ref(orderBy)) - * .execute() - * } - * - * someQuery('fn') - * ``` - * - * In this example we add selections dynamically: - * - * ```ts - * const { ref } = db.dynamic - * - * // Some column name provided by the user. Value not known at compile time. - * const columnFromUserInput: PossibleColumns = 'birthdate'; - * - * // A type that lists all possible values `columnFromUserInput` can have. - * // You can use `keyof Person` if any column of an interface is allowed. - * type PossibleColumns = 'last_name' | 'first_name' | 'birthdate' - * - * const [person] = await db.selectFrom('person') - * .select([ - * ref(columnFromUserInput), - * 'id' - * ]) - * .execute() - * - * // The resulting type contains all `PossibleColumns` as optional fields - * // because we cannot know which field was actually selected before - * // running the code. - * const lastName: string | null | undefined = person?.last_name - * const firstName: string | undefined = person?.first_name - * const birthDate: Date | null | undefined = person?.birthdate - * - * // The result type also contains the compile time selection `id`. - * person?.id - * ``` - */ - ref(reference) { - return new dynamic_reference_builder_js_1.DynamicReferenceBuilder(reference); - } - /** - * Creates a table reference to a table that's not fully known at compile time. - * - * The type `T` is allowed to be a union of multiple tables. - * - * - * - * A generic type-safe helper function for finding a row by a column value: - * - * ```ts - * import { SelectType } from 'kysely' - * import { Database } from 'type-editor' - * - * async function getRowByColumn< - * T extends keyof Database, - * C extends keyof Database[T] & string, - * V extends SelectType, - * >(t: T, c: C, v: V) { - * // We need to use the dynamic module since the table name - * // is not known at compile time. - * const { table, ref } = db.dynamic - * - * return await db - * .selectFrom(table(t).as('t')) - * .selectAll() - * .where(ref(c), '=', v) - * .orderBy('t.id') - * .executeTakeFirstOrThrow() - * } - * - * const person = await getRowByColumn('person', 'first_name', 'Arnold') - * ``` - */ - table(table) { - return new dynamic_table_builder_js_1.DynamicTableBuilder(table); - } -} -exports.DynamicModule = DynamicModule; diff --git a/node_modules/kysely/dist/cjs/expression/expression-builder.d.ts b/node_modules/kysely/dist/cjs/expression/expression-builder.d.ts deleted file mode 100644 index 8cc87ef..0000000 --- a/node_modules/kysely/dist/cjs/expression/expression-builder.d.ts +++ /dev/null @@ -1,920 +0,0 @@ -import { type SelectQueryBuilder } from '../query-builder/select-query-builder.js'; -import { type TableExpressionOrList } from '../parser/table-parser.js'; -import { type FunctionModule } from '../query-builder/function-module.js'; -import { type ExtractTypeFromReferenceExpression, type ReferenceExpression, type SimpleReferenceExpression, type StringReference } from '../parser/reference-parser.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import { type BinaryOperatorExpression, type FilterObject, type OperandValueExpression, type OperandValueExpressionOrList } from '../parser/binary-operation-parser.js'; -import type { Expression } from './expression.js'; -import { ExpressionWrapper } from './expression-wrapper.js'; -import { type ComparisonOperator, type JSONOperatorWith$, type UnaryOperator } from '../operation-node/operator-node.js'; -import type { IsNever, SqlBool } from '../util/type-utils.js'; -import { type ExtractTypeFromValueExpression } from '../parser/value-parser.js'; -import { CaseBuilder } from '../query-builder/case-builder.js'; -import { JSONPathBuilder } from '../query-builder/json-path-builder.js'; -import type { OperandExpression } from '../parser/expression-parser.js'; -import type { RefTuple2, RefTuple3, RefTuple4, RefTuple5, ValTuple2, ValTuple3, ValTuple4, ValTuple5 } from '../parser/tuple-parser.js'; -import type { Selectable } from '../util/column-type.js'; -import type { KyselyTypeError } from '../util/type-error.js'; -import { type DataTypeExpression } from '../parser/data-type-parser.js'; -import type { SelectFrom } from '../parser/select-from-parser.js'; -export interface ExpressionBuilder { - /** - * Creates a binary expression. - * - * This function returns an {@link Expression} and can be used pretty much anywhere. - * See the examples for a couple of possible use cases. - * - * ### Examples - * - * A simple comparison: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll() - * .where((eb) => eb('first_name', '=', 'Jennifer')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where "first_name" = $1 - * ``` - * - * By default the third argument is interpreted as a value. To pass in - * a column reference, you can use {@link ref}: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll() - * .where((eb) => eb('first_name', '=', eb.ref('last_name'))) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where "first_name" = "last_name" - * ``` - * - * In the following example `eb` is used to increment an integer column: - * - * ```ts - * await db.updateTable('person') - * .set((eb) => ({ - * age: eb('age', '+', 1) - * })) - * .where('id', '=', 3) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * update "person" - * set "age" = "age" + $1 - * where "id" = $2 - * ``` - * - * As always, expressions can be nested. Both the first and the third argument - * can be any expression: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll() - * .where((eb) => eb( - * eb.fn('lower', ['first_name']), - * 'in', - * eb.selectFrom('pet') - * .select('pet.name') - * .where('pet.species', '=', 'cat') - * )) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where lower("first_name") in ( - * select "pet"."name" - * from "pet" - * where "pet"."species" = $1 - * ) - * ``` - */ - , OP extends BinaryOperatorExpression, VE extends OperandValueExpressionOrList>(lhs: RE, op: OP, rhs: VE): ExpressionWrapper ? unknown extends T ? SqlBool : T : ExtractTypeFromReferenceExpression>; - /** - * Returns a copy of `this` expression builder, for destructuring purposes. - * - * ### Examples - * - * ```ts - * const result = await db.selectFrom('person') - * .where(({ eb, exists, selectFrom }) => - * eb('first_name', '=', 'Jennifer').and(exists( - * selectFrom('pet').whereRef('owner_id', '=', 'person.id').select('pet.id') - * )) - * ) - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "first_name" = $1 and exists ( - * select "pet.id" from "pet" where "owner_id" = "person.id" - * ) - * ``` - */ - get eb(): ExpressionBuilder; - /** - * Returns a {@link FunctionModule} that can be used to write type safe function - * calls. - * - * The difference between this and {@link Kysely.fn} is that this one is more - * type safe. You can only refer to columns visible to the part of the query - * you are building. {@link Kysely.fn} allows you to refer to columns in any - * table of the database even if it doesn't produce valid SQL. - * - * ```ts - * const result = await db.selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .select((eb) => [ - * 'person.id', - * eb.fn.count('pet.id').as('pet_count') - * ]) - * .groupBy('person.id') - * .having((eb) => eb.fn.count('pet.id'), '>', 10) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."id", count("pet"."id") as "pet_count" - * from "person" - * inner join "pet" on "pet"."owner_id" = "person"."id" - * group by "person"."id" - * having count("pet"."id") > $1 - * ``` - */ - get fn(): FunctionModule; - /** - * Creates a subquery. - * - * The query builder returned by this method is typed in a way that you can refer to - * all tables of the parent query in addition to the subquery's tables. - * - * This method accepts all the same inputs as {@link QueryCreator.selectFrom}. - * - * ### Examples - * - * This example shows that you can refer to both `pet.owner_id` and `person.id` - * columns from the subquery. This is needed to be able to create correlated - * subqueries: - * - * ```ts - * const result = await db.selectFrom('pet') - * .select((eb) => [ - * 'pet.name', - * eb.selectFrom('person') - * .whereRef('person.id', '=', 'pet.owner_id') - * .select('person.first_name') - * .as('owner_name') - * ]) - * .execute() - * - * console.log(result[0]?.owner_name) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * "pet"."name", - * ( select "person"."first_name" - * from "person" - * where "person"."id" = "pet"."owner_id" - * ) as "owner_name" - * from "pet" - * ``` - * - * You can use a normal query in place of `(qb) => qb.selectFrom(...)` but in - * that case Kysely typings wouldn't allow you to reference `pet.owner_id` - * because `pet` is not joined to that query. - */ - selectFrom>(from: TE): SelectFrom; - /** - * Creates a `case` statement/operator. - * - * ### Examples - * - * Kitchen sink example with 2 flavors of `case` operator: - * - * ```ts - * const { title, name } = await db - * .selectFrom('person') - * .where('id', '=', 123) - * .select((eb) => [ - * eb.fn.coalesce('last_name', 'first_name').as('name'), - * eb - * .case() - * .when('gender', '=', 'male') - * .then('Mr.') - * .when('gender', '=', 'female') - * .then( - * eb - * .case('marital_status') - * .when('single') - * .then('Ms.') - * .else('Mrs.') - * .end() - * ) - * .end() - * .as('title'), - * ]) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * coalesce("last_name", "first_name") as "name", - * case - * when "gender" = $1 then $2 - * when "gender" = $3 then - * case "marital_status" - * when $4 then $5 - * else $6 - * end - * end as "title" - * from "person" - * where "id" = $7 - * ``` - */ - case(): CaseBuilder; - case>(column: C): CaseBuilder>; - case>(expression: E): CaseBuilder>; - /** - * This method can be used to reference columns within the query's context. For - * a non-type-safe version of this method see {@link sql}'s version. - * - * Additionally, this method can be used to reference nested JSON properties or - * array elements. See {@link JSONPathBuilder} for more information. For regular - * JSON path expressions you can use {@link jsonPath}. - * - * ### Examples - * - * By default the third argument of binary expressions is a value. - * This function can be used to pass in a column reference instead: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll('person') - * .where((eb) => eb.or([ - * eb('first_name', '=', eb.ref('last_name')), - * eb('first_name', '=', eb.ref('middle_name')) - * ])) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where "first_name" = "last_name" or "first_name" = "middle_name" - * ``` - * - * In the next example we use the `ref` method to reference columns of the virtual - * table `excluded` in a type-safe way to create an upsert operation: - * - * ```ts - * await db.insertInto('person') - * .values({ - * id: 3, - * first_name: 'Jennifer', - * last_name: 'Aniston', - * gender: 'female', - * }) - * .onConflict((oc) => oc - * .column('id') - * .doUpdateSet(({ ref }) => ({ - * first_name: ref('excluded.first_name'), - * last_name: ref('excluded.last_name'), - * gender: ref('excluded.gender'), - * })) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("id", "first_name", "last_name", "gender") - * values ($1, $2, $3, $4) - * on conflict ("id") do update set - * "first_name" = "excluded"."first_name", - * "last_name" = "excluded"."last_name", - * "gender" = "excluded"."gender" - * ``` - * - * In the next example we use `ref` in a raw sql expression. Unless you want - * to be as type-safe as possible, this is probably overkill: - * - * ```ts - * import { sql } from 'kysely' - * - * await db.updateTable('pet') - * .set((eb) => ({ - * name: sql`concat(${eb.ref('pet.name')}, ${' the animal'})` - * })) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * update "pet" set "name" = concat("pet"."name", $1) - * ``` - * - * In the next example we use `ref` to reference a nested JSON property: - * - * ```ts - * const result = await db.selectFrom('person') - * .where(({ eb, ref }) => eb( - * ref('profile', '->').key('addresses').at(0).key('city'), - * '=', - * 'San Diego' - * )) - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "profile"->'addresses'->0->'city' = $1 - * ``` - * - * You can also compile to a JSON path expression by using the `->$`or `->>$` operator: - * - * ```ts - * const result = await db.selectFrom('person') - * .select(({ ref }) => - * ref('profile', '->$') - * .key('addresses') - * .at('last') - * .key('city') - * .as('current_city') - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select `profile`->'$.addresses[last].city' as `current_city` from `person` - * ``` - */ - ref>(reference: RE): ExpressionWrapper>; - ref>(reference: RE, op: JSONOperatorWith$): JSONPathBuilder>; - /** - * Creates a JSON path expression with provided column as root document (the $). - * - * For a JSON reference expression, see {@link ref}. - * - * ### Examples - * - * ```ts - * await db.updateTable('person') - * .set('profile', (eb) => eb.fn('json_set', [ - * 'profile', - * eb.jsonPath<'profile'>().key('addresses').at('last').key('city'), - * eb.val('San Diego') - * ])) - * .where('id', '=', 3) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * update `person` - * set `profile` = json_set(`profile`, '$.addresses[last].city', $1) - * where `id` = $2 - * ``` - */ - jsonPath<$ extends StringReference = never>(): IsNever<$> extends true ? KyselyTypeError<"You must provide a column reference as this method's $ generic"> : JSONPathBuilder>; - /** - * Creates a table reference. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * import type { Pet } from 'type-editor' // imaginary module - * - * const result = await db.selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .select(eb => [ - * 'person.id', - * sql`jsonb_agg(${eb.table('pet')})`.as('pets') - * ]) - * .groupBy('person.id') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."id", jsonb_agg("pet") as "pets" - * from "person" - * inner join "pet" on "pet"."owner_id" = "person"."id" - * group by "person"."id" - * ``` - * - * If you need a column reference, use {@link ref}. - */ - table(table: T): ExpressionWrapper>; - /** - * Returns a value expression. - * - * This can be used to pass in a value where a reference is taken by default. - * - * This function returns an {@link Expression} and can be used pretty much anywhere. - * - * ### Examples - * - * Binary expressions take a reference by default as the first argument. `val` could - * be used to pass in a value instead: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll() - * .where((eb) => eb( - * eb.val('cat'), - * '=', - * eb.fn.any( - * eb.selectFrom('pet') - * .select('species') - * .whereRef('owner_id', '=', 'person.id') - * ) - * )) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where $1 = any( - * select "species" - * from "pet" - * where "owner_id" = "person"."id" - * ) - * ``` - */ - val(value: VE): ExpressionWrapper>; - /** - * Creates a tuple expression. - * - * This creates a tuple using column references by default. See {@link tuple} - * if you need to create value tuples. - * - * ### Examples - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll('person') - * .where(({ eb, refTuple, tuple }) => eb( - * refTuple('first_name', 'last_name'), - * 'in', - * [ - * tuple('Jennifer', 'Aniston'), - * tuple('Sylvester', 'Stallone') - * ] - * )) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * "person".* - * from - * "person" - * where - * ("first_name", "last_name") - * in - * ( - * ($1, $2), - * ($3, $4) - * ) - * ``` - * - * In the next example a reference tuple is compared to a subquery. Note that - * in this case you need to use the {@link @SelectQueryBuilder.$asTuple | $asTuple} - * function: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll('person') - * .where(({ eb, refTuple, selectFrom }) => eb( - * refTuple('first_name', 'last_name'), - * 'in', - * selectFrom('pet') - * .select(['name', 'species']) - * .where('species', '!=', 'cat') - * .$asTuple('name', 'species') - * )) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * "person".* - * from - * "person" - * where - * ("first_name", "last_name") - * in - * ( - * select "name", "species" - * from "pet" - * where "species" != $1 - * ) - * ``` - */ - refTuple, R2 extends ReferenceExpression>(value1: R1, value2: R2): ExpressionWrapper>; - refTuple, R2 extends ReferenceExpression, R3 extends ReferenceExpression>(value1: R1, value2: R2, value3: R3): ExpressionWrapper>; - refTuple, R2 extends ReferenceExpression, R3 extends ReferenceExpression, R4 extends ReferenceExpression>(value1: R1, value2: R2, value3: R3, value4: R4): ExpressionWrapper>; - refTuple, R2 extends ReferenceExpression, R3 extends ReferenceExpression, R4 extends ReferenceExpression, R5 extends ReferenceExpression>(value1: R1, value2: R2, value3: R3, value4: R4, value5: R5): ExpressionWrapper>; - /** - * Creates a value tuple expression. - * - * This creates a tuple using values by default. See {@link refTuple} if you need to create - * tuples using column references. - * - * ### Examples - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll('person') - * .where(({ eb, refTuple, tuple }) => eb( - * refTuple('first_name', 'last_name'), - * 'in', - * [ - * tuple('Jennifer', 'Aniston'), - * tuple('Sylvester', 'Stallone') - * ] - * )) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * "person".* - * from - * "person" - * where - * ("first_name", "last_name") - * in - * ( - * ($1, $2), - * ($3, $4) - * ) - * ``` - */ - tuple(value1: V1, value2: V2): ExpressionWrapper>; - tuple(value1: V1, value2: V2, value3: V3): ExpressionWrapper>; - tuple(value1: V1, value2: V2, value3: V3, value4: V4): ExpressionWrapper>; - tuple(value1: V1, value2: V2, value3: V3, value4: V4, value5: V5): ExpressionWrapper>; - /** - * Returns a literal value expression. - * - * Just like `val` but creates a literal value that gets merged in the SQL. - * To prevent SQL injections, only `boolean`, `number` and `null` values - * are accepted. If you need `string` or other literals, use `sql.lit` instead. - * - * ### Examples - * - * ```ts - * const result = await db.selectFrom('person') - * .select((eb) => eb.lit(1).as('one')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select 1 as "one" from "person" - * ``` - */ - lit(literal: VE): ExpressionWrapper; - /** - * Creates an unary expression. - * - * This function returns an {@link Expression} and can be used pretty much anywhere. - * See the examples for a couple of possible use cases. - * - * @see {@link not}, {@link exists} and {@link neg}. - * - * ### Examples - * - * ```ts - * const result = await db.selectFrom('person') - * .select((eb) => [ - * 'first_name', - * eb.unary('-', 'age').as('negative_age') - * ]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name", -"age" - * from "person" - * ``` - */ - unary>(op: UnaryOperator, expr: RE): ExpressionWrapper>; - /** - * Creates a `not` operation. - * - * A shortcut for `unary('not', expr)`. - * - * @see {@link unary} - */ - not>(expr: RE): ExpressionWrapper>; - /** - * Creates an `exists` operation. - * - * A shortcut for `unary('exists', expr)`. - * - * @see {@link unary} - */ - exists>(expr: RE): ExpressionWrapper; - /** - * Creates a negation operation. - * - * A shortcut for `unary('-', expr)`. - * - * @see {@link unary} - */ - neg>(expr: RE): ExpressionWrapper>; - /** - * Creates a `between` expression. - * - * ### Examples - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll() - * .where((eb) => eb.between('age', 40, 60)) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "age" between $1 and $2 - * ``` - */ - between, SE extends OperandValueExpression, EE extends OperandValueExpression>(expr: RE, start: SE, end: EE): ExpressionWrapper; - /** - * Creates a `between symmetric` expression. - * - * ### Examples - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll() - * .where((eb) => eb.betweenSymmetric('age', 40, 60)) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "age" between symmetric $1 and $2 - * ``` - */ - betweenSymmetric, SE extends OperandValueExpression, EE extends OperandValueExpression>(expr: RE, start: SE, end: EE): ExpressionWrapper; - /** - * Combines two or more expressions using the logical `and` operator. - * - * An empty array produces a `true` expression. - * - * This function returns an {@link Expression} and can be used pretty much anywhere. - * See the examples for a couple of possible use cases. - * - * ### Examples - * - * In this example we use `and` to create a `WHERE expr1 AND expr2 AND expr3` - * statement: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll('person') - * .where((eb) => eb.and([ - * eb('first_name', '=', 'Jennifer'), - * eb('first_name', '=', 'Arnold'), - * eb('first_name', '=', 'Sylvester') - * ])) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where ( - * "first_name" = $1 - * and "first_name" = $2 - * and "first_name" = $3 - * ) - * ``` - * - * Optionally you can use the simpler object notation if you only need - * equality comparisons: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll('person') - * .where((eb) => eb.and({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * })) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where ( - * "first_name" = $1 - * and "last_name" = $2 - * ) - * ``` - */ - and>(exprs: ReadonlyArray): ExpressionWrapper; - and>>(exprs: E): ExpressionWrapper; - /** - * Combines two or more expressions using the logical `or` operator. - * - * An empty array produces a `false` expression. - * - * This function returns an {@link Expression} and can be used pretty much anywhere. - * See the examples for a couple of possible use cases. - * - * ### Examples - * - * In this example we use `or` to create a `WHERE expr1 OR expr2 OR expr3` - * statement: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll('person') - * .where((eb) => eb.or([ - * eb('first_name', '=', 'Jennifer'), - * eb('first_name', '=', 'Arnold'), - * eb('first_name', '=', 'Sylvester') - * ])) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where ( - * "first_name" = $1 - * or "first_name" = $2 - * or "first_name" = $3 - * ) - * ``` - * - * Optionally you can use the simpler object notation if you only need - * equality comparisons: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll('person') - * .where((eb) => eb.or({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * })) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where ( - * "first_name" = $1 - * or "last_name" = $2 - * ) - * ``` - */ - or>(exprs: ReadonlyArray): ExpressionWrapper; - or>>(exprs: E): ExpressionWrapper; - /** - * Wraps the expression in parentheses. - * - * ### Examples - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll('person') - * .where((eb) => eb(eb.parens('age', '+', 1), '/', 100), '<', 0.1) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where ("age" + $1) / $2 < $3 - * ``` - * - * You can also pass in any expression as the only argument: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll('person') - * .where((eb) => eb.parens( - * eb('age', '=', 1).or('age', '=', 2) - * ).and( - * eb('first_name', '=', 'Jennifer').or('first_name', '=', 'Arnold') - * )) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where ("age" = $1 or "age" = $2) and ("first_name" = $3 or "first_name" = $4) - * ``` - */ - parens, OP extends BinaryOperatorExpression, VE extends OperandValueExpressionOrList>(lhs: RE, op: OP, rhs: VE): ExpressionWrapper>; - parens(expr: Expression): ExpressionWrapper; - /** - * Creates a `cast(expr as dataType)` expression. - * - * Since Kysely can't know the mapping between JavaScript and database types, - * you need to provide both explicitly. - * - * ### Examples - * - * ```ts - * const result = await db.selectFrom('person') - * .select((eb) => [ - * 'id', - * 'first_name', - * eb.cast('age', 'integer').as('age') - * ]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select cast("age" as integer) as "age" - * from "person" - * ``` - */ - cast = ReferenceExpression>(expr: RE, dataType: DataTypeExpression): ExpressionWrapper; - /** - * See {@link QueryCreator.withSchema} - * - * @deprecated Will be removed in kysely 0.25.0. - */ - withSchema(schema: string): ExpressionBuilder; -} -export declare function createExpressionBuilder(executor?: QueryExecutor): ExpressionBuilder; -export declare function expressionBuilder(_: SelectQueryBuilder): ExpressionBuilder; -export declare function expressionBuilder(): ExpressionBuilder; diff --git a/node_modules/kysely/dist/cjs/expression/expression-builder.js b/node_modules/kysely/dist/cjs/expression/expression-builder.js deleted file mode 100644 index f493930..0000000 --- a/node_modules/kysely/dist/cjs/expression/expression-builder.js +++ /dev/null @@ -1,128 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createExpressionBuilder = createExpressionBuilder; -exports.expressionBuilder = expressionBuilder; -const select_query_builder_js_1 = require("../query-builder/select-query-builder.js"); -const select_query_node_js_1 = require("../operation-node/select-query-node.js"); -const table_parser_js_1 = require("../parser/table-parser.js"); -const with_schema_plugin_js_1 = require("../plugin/with-schema/with-schema-plugin.js"); -const query_id_js_1 = require("../util/query-id.js"); -const function_module_js_1 = require("../query-builder/function-module.js"); -const reference_parser_js_1 = require("../parser/reference-parser.js"); -const binary_operation_parser_js_1 = require("../parser/binary-operation-parser.js"); -const parens_node_js_1 = require("../operation-node/parens-node.js"); -const expression_wrapper_js_1 = require("./expression-wrapper.js"); -const operator_node_js_1 = require("../operation-node/operator-node.js"); -const unary_operation_parser_js_1 = require("../parser/unary-operation-parser.js"); -const value_parser_js_1 = require("../parser/value-parser.js"); -const noop_query_executor_js_1 = require("../query-executor/noop-query-executor.js"); -const case_builder_js_1 = require("../query-builder/case-builder.js"); -const case_node_js_1 = require("../operation-node/case-node.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -const json_path_builder_js_1 = require("../query-builder/json-path-builder.js"); -const binary_operation_node_js_1 = require("../operation-node/binary-operation-node.js"); -const and_node_js_1 = require("../operation-node/and-node.js"); -const tuple_node_js_1 = require("../operation-node/tuple-node.js"); -const json_path_node_js_1 = require("../operation-node/json-path-node.js"); -const data_type_parser_js_1 = require("../parser/data-type-parser.js"); -const cast_node_js_1 = require("../operation-node/cast-node.js"); -function createExpressionBuilder(executor = noop_query_executor_js_1.NOOP_QUERY_EXECUTOR) { - function binary(lhs, op, rhs) { - return new expression_wrapper_js_1.ExpressionWrapper((0, binary_operation_parser_js_1.parseValueBinaryOperation)(lhs, op, rhs)); - } - function unary(op, expr) { - return new expression_wrapper_js_1.ExpressionWrapper((0, unary_operation_parser_js_1.parseUnaryOperation)(op, expr)); - } - const eb = Object.assign(binary, { - fn: undefined, - eb: undefined, - selectFrom(table) { - return (0, select_query_builder_js_1.createSelectQueryBuilder)({ - queryId: (0, query_id_js_1.createQueryId)(), - executor, - queryNode: select_query_node_js_1.SelectQueryNode.createFrom((0, table_parser_js_1.parseTableExpressionOrList)(table)), - }); - }, - case(reference) { - return new case_builder_js_1.CaseBuilder({ - node: case_node_js_1.CaseNode.create((0, object_utils_js_1.isUndefined)(reference) - ? undefined - : (0, reference_parser_js_1.parseReferenceExpression)(reference)), - }); - }, - ref(reference, op) { - if ((0, object_utils_js_1.isUndefined)(op)) { - return new expression_wrapper_js_1.ExpressionWrapper((0, reference_parser_js_1.parseStringReference)(reference)); - } - return new json_path_builder_js_1.JSONPathBuilder((0, reference_parser_js_1.parseJSONReference)(reference, op)); - }, - jsonPath() { - return new json_path_builder_js_1.JSONPathBuilder(json_path_node_js_1.JSONPathNode.create()); - }, - table(table) { - return new expression_wrapper_js_1.ExpressionWrapper((0, table_parser_js_1.parseTable)(table)); - }, - val(value) { - return new expression_wrapper_js_1.ExpressionWrapper((0, value_parser_js_1.parseValueExpression)(value)); - }, - refTuple(...values) { - return new expression_wrapper_js_1.ExpressionWrapper(tuple_node_js_1.TupleNode.create(values.map(reference_parser_js_1.parseReferenceExpression))); - }, - tuple(...values) { - return new expression_wrapper_js_1.ExpressionWrapper(tuple_node_js_1.TupleNode.create(values.map(value_parser_js_1.parseValueExpression))); - }, - lit(value) { - return new expression_wrapper_js_1.ExpressionWrapper((0, value_parser_js_1.parseSafeImmediateValue)(value)); - }, - unary, - not(expr) { - return unary('not', expr); - }, - exists(expr) { - return unary('exists', expr); - }, - neg(expr) { - return unary('-', expr); - }, - between(expr, start, end) { - return new expression_wrapper_js_1.ExpressionWrapper(binary_operation_node_js_1.BinaryOperationNode.create((0, reference_parser_js_1.parseReferenceExpression)(expr), operator_node_js_1.OperatorNode.create('between'), and_node_js_1.AndNode.create((0, value_parser_js_1.parseValueExpression)(start), (0, value_parser_js_1.parseValueExpression)(end)))); - }, - betweenSymmetric(expr, start, end) { - return new expression_wrapper_js_1.ExpressionWrapper(binary_operation_node_js_1.BinaryOperationNode.create((0, reference_parser_js_1.parseReferenceExpression)(expr), operator_node_js_1.OperatorNode.create('between symmetric'), and_node_js_1.AndNode.create((0, value_parser_js_1.parseValueExpression)(start), (0, value_parser_js_1.parseValueExpression)(end)))); - }, - and(exprs) { - if ((0, object_utils_js_1.isReadonlyArray)(exprs)) { - return new expression_wrapper_js_1.ExpressionWrapper((0, binary_operation_parser_js_1.parseFilterList)(exprs, 'and')); - } - return new expression_wrapper_js_1.ExpressionWrapper((0, binary_operation_parser_js_1.parseFilterObject)(exprs, 'and')); - }, - or(exprs) { - if ((0, object_utils_js_1.isReadonlyArray)(exprs)) { - return new expression_wrapper_js_1.ExpressionWrapper((0, binary_operation_parser_js_1.parseFilterList)(exprs, 'or')); - } - return new expression_wrapper_js_1.ExpressionWrapper((0, binary_operation_parser_js_1.parseFilterObject)(exprs, 'or')); - }, - parens(...args) { - const node = (0, binary_operation_parser_js_1.parseValueBinaryOperationOrExpression)(args); - if (parens_node_js_1.ParensNode.is(node)) { - // No double wrapping. - return new expression_wrapper_js_1.ExpressionWrapper(node); - } - else { - return new expression_wrapper_js_1.ExpressionWrapper(parens_node_js_1.ParensNode.create(node)); - } - }, - cast(expr, dataType) { - return new expression_wrapper_js_1.ExpressionWrapper(cast_node_js_1.CastNode.create((0, reference_parser_js_1.parseReferenceExpression)(expr), (0, data_type_parser_js_1.parseDataTypeExpression)(dataType))); - }, - withSchema(schema) { - return createExpressionBuilder(executor.withPluginAtFront(new with_schema_plugin_js_1.WithSchemaPlugin(schema))); - }, - }); - eb.fn = (0, function_module_js_1.createFunctionModule)(); - eb.eb = eb; - return eb; -} -function expressionBuilder(_) { - return createExpressionBuilder(); -} diff --git a/node_modules/kysely/dist/cjs/expression/expression-wrapper.d.ts b/node_modules/kysely/dist/cjs/expression/expression-wrapper.d.ts deleted file mode 100644 index 39b8673..0000000 --- a/node_modules/kysely/dist/cjs/expression/expression-wrapper.d.ts +++ /dev/null @@ -1,631 +0,0 @@ -import { AliasNode } from '../operation-node/alias-node.js'; -import { AndNode } from '../operation-node/and-node.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -import { OrNode } from '../operation-node/or-node.js'; -import { ParensNode } from '../operation-node/parens-node.js'; -import { type ComparisonOperatorExpression, type OperandValueExpressionOrList } from '../parser/binary-operation-parser.js'; -import type { OperandExpression } from '../parser/expression-parser.js'; -import type { ReferenceExpression } from '../parser/reference-parser.js'; -import type { KyselyTypeError } from '../util/type-error.js'; -import type { SqlBool } from '../util/type-utils.js'; -import type { AliasableExpression, AliasedExpression, Expression } from './expression.js'; -export declare class ExpressionWrapper implements AliasableExpression { - #private; - constructor(node: OperationNode); - /** @private */ - /** - * All expressions need to have this getter for complicated type-related reasons. - * Simply add this getter for your expression and always return `undefined` from it: - * - * ### Examples - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - * - * The getter is needed to make the expression assignable to another expression only - * if the types `T` are assignable. Without this property (or some other property - * that references `T`), you could assing `Expression` to `Expression`. - */ - get expressionType(): T | undefined; - /** - * Returns an aliased version of the expression. - * - * ### Examples - * - * In addition to slapping `as "the_alias"` to the end of the SQL, - * this method also provides strict typing: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => - * eb('first_name', '=', 'Jennifer').as('is_jennifer') - * ) - * .executeTakeFirstOrThrow() - * - * // `is_jennifer: SqlBool` field exists in the result type. - * console.log(result.is_jennifer) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name" = $1 as "is_jennifer" - * from "person" - * ``` - */ - as(alias: A): AliasedExpression; - /** - * Returns an aliased version of the expression. - * - * ### Examples - * - * In addition to slapping `as "the_alias"` at the end of the expression, - * this method also provides strict typing: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => - * // `eb.fn` returns an AliasableExpression - * eb.fn('concat', ['first_name', eb.val(' '), 'last_name']).as('full_name') - * ) - * .executeTakeFirstOrThrow() - * - * // `full_name: string` field exists in the result type. - * console.log(result.full_name) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * concat("first_name", $1, "last_name") as "full_name" - * from - * "person" - * ``` - * - * You can also pass in a raw SQL snippet (or any expression) but in that case you must - * provide the alias as the only type argument: - * - * ```ts - * import { sql } from 'kysely' - * - * const values = sql<{ a: number, b: string }>`(values (1, 'foo'))` - * - * // The alias is `t(a, b)` which specifies the column names - * // in addition to the table name. We must tell kysely that - * // columns of the table can be referenced through `t` - * // by providing an explicit type argument. - * const aliasedValues = values.as<'t'>(sql`t(a, b)`) - * - * await db - * .insertInto('person') - * .columns(['first_name', 'last_name']) - * .expression( - * db.selectFrom(aliasedValues).select(['t.a', 't.b']) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name") - * from (values (1, 'foo')) as t(a, b) - * select "t"."a", "t"."b" - * ``` - */ - as(alias: Expression): AliasedExpression; - /** - * Combines `this` and another expression using `OR`. - * - * Also see {@link ExpressionBuilder.or} - * - * ### Examples - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll() - * .where(eb => eb('first_name', '=', 'Jennifer') - * .or('first_name', '=', 'Arnold') - * .or('first_name', '=', 'Sylvester') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * "first_name" = $1 - * or "first_name" = $2 - * or "first_name" = $3 - * ) - * ``` - * - * You can also pass any expression as the only argument to - * this method: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll() - * .where(eb => eb('first_name', '=', 'Jennifer') - * .or(eb('first_name', '=', 'Sylvester').and('last_name', '=', 'Stallone')) - * .or(eb.exists( - * eb.selectFrom('pet') - * .select('id') - * .whereRef('pet.owner_id', '=', 'person.id') - * )) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * "first_name" = $1 - * or ("first_name" = $2 and "last_name" = $3) - * or exists ( - * select "id" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * ) - * ) - * ``` - */ - or, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): T extends SqlBool ? OrWrapper : KyselyTypeError<'or() method can only be called on boolean expressions'>; - or>(expression: E): T extends SqlBool ? OrWrapper : KyselyTypeError<'or() method can only be called on boolean expressions'>; - /** - * Combines `this` and another expression using `AND`. - * - * Also see {@link ExpressionBuilder.and} - * - * ### Examples - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll() - * .where(eb => eb('first_name', '=', 'Jennifer') - * .and('last_name', '=', 'Aniston') - * .and('age', '>', 40) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * "first_name" = $1 - * and "last_name" = $2 - * and "age" > $3 - * ) - * ``` - * - * You can also pass any expression as the only argument to - * this method: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll() - * .where(eb => eb('first_name', '=', 'Jennifer') - * .and(eb('first_name', '=', 'Sylvester').or('last_name', '=', 'Stallone')) - * .and(eb.exists( - * eb.selectFrom('pet') - * .select('id') - * .whereRef('pet.owner_id', '=', 'person.id') - * )) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * "first_name" = $1 - * and ("first_name" = $2 or "last_name" = $3) - * and exists ( - * select "id" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * ) - * ) - * ``` - */ - and, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): T extends SqlBool ? AndWrapper : KyselyTypeError<'and() method can only be called on boolean expressions'>; - and>(expression: E): T extends SqlBool ? AndWrapper : KyselyTypeError<'and() method can only be called on boolean expressions'>; - /** - * Change the output type of the expression. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `ExpressionWrapper` with a new output type. - */ - $castTo(): ExpressionWrapper; - /** - * Omit null from the expression's type. - * - * This function can be useful in cases where you know an expression can't be - * null, but Kysely is unable to infer it. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of `this` with a new output type. - */ - $notNull(): ExpressionWrapper>; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - * - * ### Examples - * - * If you are creating a custom expression, it's often easiest to use the {@link sql} - * template tag to build the node: - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - */ - toOperationNode(): OperationNode; -} -export declare class AliasedExpressionWrapper implements AliasedExpression { - #private; - constructor(expr: Expression, alias: A | Expression); - /** @private */ - /** - * Returns the aliased expression. - */ - get expression(): Expression; - /** @private */ - /** - * Returns the alias. - */ - get alias(): A | Expression; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - */ - toOperationNode(): AliasNode; -} -export declare class OrWrapper implements AliasableExpression { - #private; - constructor(node: OrNode); - /** @private */ - /** - * All expressions need to have this getter for complicated type-related reasons. - * Simply add this getter for your expression and always return `undefined` from it: - * - * ### Examples - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - * - * The getter is needed to make the expression assignable to another expression only - * if the types `T` are assignable. Without this property (or some other property - * that references `T`), you could assing `Expression` to `Expression`. - */ - get expressionType(): T | undefined; - /** - * Returns an aliased version of the expression. - * - * In addition to slapping `as "the_alias"` to the end of the SQL, - * this method also provides strict typing: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select(eb => - * eb('first_name', '=', 'Jennifer') - * .or('first_name', '=', 'Sylvester') - * .as('is_jennifer_or_sylvester') - * ) - * .executeTakeFirstOrThrow() - * - * // `is_jennifer_or_sylvester: SqlBool` field exists in the result type. - * console.log(result.is_jennifer_or_sylvester) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name" = $1 or "first_name" = $2 as "is_jennifer_or_sylvester" - * from "person" - * ``` - */ - as(alias: A): AliasedExpression; - /** - * Returns an aliased version of the expression. - * - * ### Examples - * - * In addition to slapping `as "the_alias"` at the end of the expression, - * this method also provides strict typing: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => - * // `eb.fn` returns an AliasableExpression - * eb.fn('concat', ['first_name', eb.val(' '), 'last_name']).as('full_name') - * ) - * .executeTakeFirstOrThrow() - * - * // `full_name: string` field exists in the result type. - * console.log(result.full_name) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * concat("first_name", $1, "last_name") as "full_name" - * from - * "person" - * ``` - * - * You can also pass in a raw SQL snippet (or any expression) but in that case you must - * provide the alias as the only type argument: - * - * ```ts - * import { sql } from 'kysely' - * - * const values = sql<{ a: number, b: string }>`(values (1, 'foo'))` - * - * // The alias is `t(a, b)` which specifies the column names - * // in addition to the table name. We must tell kysely that - * // columns of the table can be referenced through `t` - * // by providing an explicit type argument. - * const aliasedValues = values.as<'t'>(sql`t(a, b)`) - * - * await db - * .insertInto('person') - * .columns(['first_name', 'last_name']) - * .expression( - * db.selectFrom(aliasedValues).select(['t.a', 't.b']) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name") - * from (values (1, 'foo')) as t(a, b) - * select "t"."a", "t"."b" - * ``` - */ - as(alias: Expression): AliasedExpression; - /** - * Combines `this` and another expression using `OR`. - * - * See {@link ExpressionWrapper.or} for examples. - */ - or, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): OrWrapper; - or>(expression: E): OrWrapper; - /** - * Change the output type of the expression. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `OrWrapper` with a new output type. - */ - $castTo(): OrWrapper; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - * - * ### Examples - * - * If you are creating a custom expression, it's often easiest to use the {@link sql} - * template tag to build the node: - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - */ - toOperationNode(): ParensNode; -} -export declare class AndWrapper implements AliasableExpression { - #private; - constructor(node: AndNode); - /** @private */ - /** - * All expressions need to have this getter for complicated type-related reasons. - * Simply add this getter for your expression and always return `undefined` from it: - * - * ### Examples - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - * - * The getter is needed to make the expression assignable to another expression only - * if the types `T` are assignable. Without this property (or some other property - * that references `T`), you could assing `Expression` to `Expression`. - */ - get expressionType(): T | undefined; - /** - * Returns an aliased version of the expression. - * - * In addition to slapping `as "the_alias"` to the end of the SQL, - * this method also provides strict typing: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select(eb => - * eb('first_name', '=', 'Jennifer') - * .and('last_name', '=', 'Aniston') - * .as('is_jennifer_aniston') - * ) - * .executeTakeFirstOrThrow() - * - * // `is_jennifer_aniston: SqlBool` field exists in the result type. - * console.log(result.is_jennifer_aniston) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name" = $1 and "first_name" = $2 as "is_jennifer_aniston" - * from "person" - * ``` - */ - as(alias: A): AliasedExpression; - /** - * Returns an aliased version of the expression. - * - * ### Examples - * - * In addition to slapping `as "the_alias"` at the end of the expression, - * this method also provides strict typing: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => - * // `eb.fn` returns an AliasableExpression - * eb.fn('concat', ['first_name', eb.val(' '), 'last_name']).as('full_name') - * ) - * .executeTakeFirstOrThrow() - * - * // `full_name: string` field exists in the result type. - * console.log(result.full_name) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * concat("first_name", $1, "last_name") as "full_name" - * from - * "person" - * ``` - * - * You can also pass in a raw SQL snippet (or any expression) but in that case you must - * provide the alias as the only type argument: - * - * ```ts - * import { sql } from 'kysely' - * - * const values = sql<{ a: number, b: string }>`(values (1, 'foo'))` - * - * // The alias is `t(a, b)` which specifies the column names - * // in addition to the table name. We must tell kysely that - * // columns of the table can be referenced through `t` - * // by providing an explicit type argument. - * const aliasedValues = values.as<'t'>(sql`t(a, b)`) - * - * await db - * .insertInto('person') - * .columns(['first_name', 'last_name']) - * .expression( - * db.selectFrom(aliasedValues).select(['t.a', 't.b']) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name") - * from (values (1, 'foo')) as t(a, b) - * select "t"."a", "t"."b" - * ``` - */ - as(alias: Expression): AliasedExpression; - /** - * Combines `this` and another expression using `AND`. - * - * See {@link ExpressionWrapper.and} for examples. - */ - and, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): AndWrapper; - and>(expression: E): AndWrapper; - /** - * Change the output type of the expression. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `AndWrapper` with a new output type. - */ - $castTo(): AndWrapper; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - * - * ### Examples - * - * If you are creating a custom expression, it's often easiest to use the {@link sql} - * template tag to build the node: - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - */ - toOperationNode(): ParensNode; -} diff --git a/node_modules/kysely/dist/cjs/expression/expression-wrapper.js b/node_modules/kysely/dist/cjs/expression/expression-wrapper.js deleted file mode 100644 index 93ad4aa..0000000 --- a/node_modules/kysely/dist/cjs/expression/expression-wrapper.js +++ /dev/null @@ -1,134 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AndWrapper = exports.OrWrapper = exports.AliasedExpressionWrapper = exports.ExpressionWrapper = void 0; -const alias_node_js_1 = require("../operation-node/alias-node.js"); -const and_node_js_1 = require("../operation-node/and-node.js"); -const identifier_node_js_1 = require("../operation-node/identifier-node.js"); -const operation_node_source_js_1 = require("../operation-node/operation-node-source.js"); -const or_node_js_1 = require("../operation-node/or-node.js"); -const parens_node_js_1 = require("../operation-node/parens-node.js"); -const binary_operation_parser_js_1 = require("../parser/binary-operation-parser.js"); -class ExpressionWrapper { - #node; - constructor(node) { - this.#node = node; - } - /** @private */ - get expressionType() { - return undefined; - } - as(alias) { - return new AliasedExpressionWrapper(this, alias); - } - or(...args) { - return new OrWrapper(or_node_js_1.OrNode.create(this.#node, (0, binary_operation_parser_js_1.parseValueBinaryOperationOrExpression)(args))); - } - and(...args) { - return new AndWrapper(and_node_js_1.AndNode.create(this.#node, (0, binary_operation_parser_js_1.parseValueBinaryOperationOrExpression)(args))); - } - /** - * Change the output type of the expression. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `ExpressionWrapper` with a new output type. - */ - $castTo() { - return new ExpressionWrapper(this.#node); - } - /** - * Omit null from the expression's type. - * - * This function can be useful in cases where you know an expression can't be - * null, but Kysely is unable to infer it. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of `this` with a new output type. - */ - $notNull() { - return new ExpressionWrapper(this.#node); - } - toOperationNode() { - return this.#node; - } -} -exports.ExpressionWrapper = ExpressionWrapper; -class AliasedExpressionWrapper { - #expr; - #alias; - constructor(expr, alias) { - this.#expr = expr; - this.#alias = alias; - } - /** @private */ - get expression() { - return this.#expr; - } - /** @private */ - get alias() { - return this.#alias; - } - toOperationNode() { - return alias_node_js_1.AliasNode.create(this.#expr.toOperationNode(), (0, operation_node_source_js_1.isOperationNodeSource)(this.#alias) - ? this.#alias.toOperationNode() - : identifier_node_js_1.IdentifierNode.create(this.#alias)); - } -} -exports.AliasedExpressionWrapper = AliasedExpressionWrapper; -class OrWrapper { - #node; - constructor(node) { - this.#node = node; - } - /** @private */ - get expressionType() { - return undefined; - } - as(alias) { - return new AliasedExpressionWrapper(this, alias); - } - or(...args) { - return new OrWrapper(or_node_js_1.OrNode.create(this.#node, (0, binary_operation_parser_js_1.parseValueBinaryOperationOrExpression)(args))); - } - /** - * Change the output type of the expression. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `OrWrapper` with a new output type. - */ - $castTo() { - return new OrWrapper(this.#node); - } - toOperationNode() { - return parens_node_js_1.ParensNode.create(this.#node); - } -} -exports.OrWrapper = OrWrapper; -class AndWrapper { - #node; - constructor(node) { - this.#node = node; - } - /** @private */ - get expressionType() { - return undefined; - } - as(alias) { - return new AliasedExpressionWrapper(this, alias); - } - and(...args) { - return new AndWrapper(and_node_js_1.AndNode.create(this.#node, (0, binary_operation_parser_js_1.parseValueBinaryOperationOrExpression)(args))); - } - /** - * Change the output type of the expression. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `AndWrapper` with a new output type. - */ - $castTo() { - return new AndWrapper(this.#node); - } - toOperationNode() { - return parens_node_js_1.ParensNode.create(this.#node); - } -} -exports.AndWrapper = AndWrapper; diff --git a/node_modules/kysely/dist/cjs/expression/expression.d.ts b/node_modules/kysely/dist/cjs/expression/expression.d.ts deleted file mode 100644 index fa2eaec..0000000 --- a/node_modules/kysely/dist/cjs/expression/expression.d.ts +++ /dev/null @@ -1,198 +0,0 @@ -import type { AliasNode } from '../operation-node/alias-node.js'; -import { type OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -/** - * `Expression` represents an arbitrary SQL expression with a type. - * - * Most Kysely methods accept instances of `Expression` and most classes like `SelectQueryBuilder` - * and the return value of the {@link sql} template tag implement it. - * - * ### Examples - * - * ```ts - * import { type Expression, sql } from 'kysely' - * - * const exp1: Expression = sql`CONCAT('hello', ' ', 'world')` - * const exp2: Expression<{ first_name: string }> = db.selectFrom('person').select('first_name') - * ``` - * - * You can implement the `Expression` interface to create your own type-safe utilities for Kysely. - */ -export interface Expression extends OperationNodeSource { - /** - * All expressions need to have this getter for complicated type-related reasons. - * Simply add this getter for your expression and always return `undefined` from it: - * - * ### Examples - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - * - * The getter is needed to make the expression assignable to another expression only - * if the types `T` are assignable. Without this property (or some other property - * that references `T`), you could assing `Expression` to `Expression`. - */ - get expressionType(): T | undefined; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - * - * ### Examples - * - * If you are creating a custom expression, it's often easiest to use the {@link sql} - * template tag to build the node: - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - */ - toOperationNode(): OperationNode; -} -/** - * An expression with an `as` method. - */ -export interface AliasableExpression extends Expression { - /** - * Returns an aliased version of the expression. - * - * ### Examples - * - * In addition to slapping `as "the_alias"` at the end of the expression, - * this method also provides strict typing: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => - * // `eb.fn` returns an AliasableExpression - * eb.fn('concat', ['first_name', eb.val(' '), 'last_name']).as('full_name') - * ) - * .executeTakeFirstOrThrow() - * - * // `full_name: string` field exists in the result type. - * console.log(result.full_name) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * concat("first_name", $1, "last_name") as "full_name" - * from - * "person" - * ``` - * - * You can also pass in a raw SQL snippet (or any expression) but in that case you must - * provide the alias as the only type argument: - * - * ```ts - * import { sql } from 'kysely' - * - * const values = sql<{ a: number, b: string }>`(values (1, 'foo'))` - * - * // The alias is `t(a, b)` which specifies the column names - * // in addition to the table name. We must tell kysely that - * // columns of the table can be referenced through `t` - * // by providing an explicit type argument. - * const aliasedValues = values.as<'t'>(sql`t(a, b)`) - * - * await db - * .insertInto('person') - * .columns(['first_name', 'last_name']) - * .expression( - * db.selectFrom(aliasedValues).select(['t.a', 't.b']) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name") - * from (values (1, 'foo')) as t(a, b) - * select "t"."a", "t"."b" - * ``` - */ - as(alias: A): AliasedExpression; - as(alias: Expression): AliasedExpression; -} -/** - * A type that holds an expression and an alias for it. - * - * `AliasedExpression` can be used in places where, in addition to the value type `T`, you - * also need a name `A` for that value. For example anything you can pass into the `select` method - * needs to implement an `AliasedExpression`. `A` becomes the name of the selected expression - * in the result and `T` becomes its type. - * - * ### Examples - * - * ```ts - * import { - * AliasNode, - * type AliasedExpression, - * type Expression, - * IdentifierNode - * } from 'kysely' - * - * class SomeAliasedExpression implements AliasedExpression { - * #expression: Expression - * #alias: A - * - * constructor(expression: Expression, alias: A) { - * this.#expression = expression - * this.#alias = alias - * } - * - * get expression(): Expression { - * return this.#expression - * } - * - * get alias(): A { - * return this.#alias - * } - * - * toOperationNode(): AliasNode { - * return AliasNode.create( - * this.#expression.toOperationNode(), - * IdentifierNode.create(this.#alias) - * ) - * } - * } - * ``` - */ -export interface AliasedExpression extends OperationNodeSource { - /** - * Returns the aliased expression. - */ - get expression(): Expression; - /** - * Returns the alias. - */ - get alias(): A | Expression; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - */ - toOperationNode(): AliasNode; -} -export declare function isExpression(obj: unknown): obj is Expression; -export declare function isAliasedExpression(obj: unknown): obj is AliasedExpression; diff --git a/node_modules/kysely/dist/cjs/expression/expression.js b/node_modules/kysely/dist/cjs/expression/expression.js deleted file mode 100644 index d820254..0000000 --- a/node_modules/kysely/dist/cjs/expression/expression.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isExpression = isExpression; -exports.isAliasedExpression = isAliasedExpression; -const operation_node_source_js_1 = require("../operation-node/operation-node-source.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -function isExpression(obj) { - return (0, object_utils_js_1.isObject)(obj) && 'expressionType' in obj && (0, operation_node_source_js_1.isOperationNodeSource)(obj); -} -function isAliasedExpression(obj) { - return ((0, object_utils_js_1.isObject)(obj) && - 'expression' in obj && - (0, object_utils_js_1.isString)(obj.alias) && - (0, operation_node_source_js_1.isOperationNodeSource)(obj)); -} diff --git a/node_modules/kysely/dist/cjs/helpers/mssql.d.ts b/node_modules/kysely/dist/cjs/helpers/mssql.d.ts deleted file mode 100644 index 2c9c3c6..0000000 --- a/node_modules/kysely/dist/cjs/helpers/mssql.d.ts +++ /dev/null @@ -1,212 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -import type { RawBuilder } from '../raw-builder/raw-builder.js'; -import type { ShallowDehydrateObject, ShallowDehydrateValue, Simplify } from '../util/type-utils.js'; -/** - * An MS SQL Server helper for aggregating a subquery into a JSON array. - * - * NOTE: This helper only works correctly if you've installed the `ParseJSONResultsPlugin`. - * Otherwise the nested selections will be returned as JSON strings. - * - * The plugin can be installed like this: - * - * ```ts - * import { Kysely, MssqlDialect, ParseJSONResultsPlugin } from 'kysely' - * import * as Tarn from 'tarn' - * import * as Tedious from 'tedious' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new MssqlDialect({ - * tarn: { options: { max: 10, min: 0 }, ...Tarn }, - * tedious: { - * ...Tedious, - * connectionFactory: () => new Tedious.Connection({ - * authentication: { - * options: { password: 'password', userName: 'sa' }, - * type: 'default', - * }, - * options: { database: 'test', port: 21433, trustServerCertificate: true }, - * server: 'localhost', - * }), - * }, - * }), - * plugins: [new ParseJSONResultsPlugin()] - * }) - * ``` - * - * ### Examples - * - * ```ts - * import { jsonArrayFrom } from 'kysely/helpers/mssql' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonArrayFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .orderBy('pet.name') - * .offset(0) - * ).as('pets') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.pets[0]?.pet_id - * result[0]?.pets[0]?.name - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * select "id", ( - * select coalesce((select * from ( - * select "pet"."id" as "pet_id", "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * order by "pet"."name" - * offset @1 rows - * ) as "agg" for json path, include_null_values), '[]') - * ) as "pets" - * from "person" - * ``` - */ -export declare function jsonArrayFrom(expr: Expression): RawBuilder>[]>; -/** - * An MS SQL Server helper for turning a subquery into a JSON object. - * - * The subquery must only return one row. - * - * NOTE: This helper only works correctly if you've installed the `ParseJSONResultsPlugin`. - * Otherwise the nested selections will be returned as JSON strings. - * - * The plugin can be installed like this: - * - * ```ts - * import { Kysely, MssqlDialect, ParseJSONResultsPlugin } from 'kysely' - * import * as Tarn from 'tarn' - * import * as Tedious from 'tedious' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new MssqlDialect({ - * tarn: { options: { max: 10, min: 0 }, ...Tarn }, - * tedious: { - * ...Tedious, - * connectionFactory: () => new Tedious.Connection({ - * authentication: { - * options: { password: 'password', userName: 'sa' }, - * type: 'default', - * }, - * options: { database: 'test', port: 21433, trustServerCertificate: true }, - * server: 'localhost', - * }), - * }, - * }), - * plugins: [new ParseJSONResultsPlugin()] - * }) - * ``` - * - * ### Examples - * - * ```ts - * import { jsonObjectFrom } from 'kysely/helpers/mssql' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonObjectFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('pet.is_favorite', '=', 1) - * ).as('favorite_pet') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.favorite_pet?.pet_id - * result[0]?.favorite_pet?.name - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * select "id", ( - * select * from ( - * select "pet"."id" as "pet_id", "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * and "pet"."is_favorite" = @1 - * ) as "agg" for json path, include_null_values, without_array_wrapper - * ) as "favorite_pet" - * from "person" - * ``` - */ -export declare function jsonObjectFrom(expr: Expression): RawBuilder> | null>; -/** - * The MS SQL Server `json_query` function, single argument variant. - * - * NOTE: This helper only works correctly if you've installed the `ParseJSONResultsPlugin`. - * Otherwise the nested selections will be returned as JSON strings. - * - * The plugin can be installed like this: - * - * ```ts - * import { Kysely, MssqlDialect, ParseJSONResultsPlugin } from 'kysely' - * import * as Tarn from 'tarn' - * import * as Tedious from 'tedious' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new MssqlDialect({ - * tarn: { options: { max: 10, min: 0 }, ...Tarn }, - * tedious: { - * ...Tedious, - * connectionFactory: () => new Tedious.Connection({ - * authentication: { - * options: { password: 'password', userName: 'sa' }, - * type: 'default', - * }, - * options: { database: 'test', port: 21433, trustServerCertificate: true }, - * server: 'localhost', - * }), - * }, - * }), - * plugins: [new ParseJSONResultsPlugin()] - * }) - * ``` - * - * ### Examples - * - * ```ts - * import { jsonBuildObject } from 'kysely/helpers/mssql' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonBuildObject({ - * first: eb.ref('first_name'), - * last: eb.ref('last_name'), - * full: eb.fn('concat', ['first_name', eb.val(' '), 'last_name']) - * }).as('name') - * ]) - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * select "id", json_query( - * '{"first":"'+"first_name"+',"last":"'+"last_name"+',"full":"'+concat("first_name", ' ', "last_name")+'"}' - * ) as "name" - * from "person" - * ``` - */ -export declare function jsonBuildObject>>(obj: O): RawBuilder ? ShallowDehydrateValue : never; -}>>; diff --git a/node_modules/kysely/dist/cjs/helpers/mssql.js b/node_modules/kysely/dist/cjs/helpers/mssql.js deleted file mode 100644 index 32cb2ec..0000000 --- a/node_modules/kysely/dist/cjs/helpers/mssql.js +++ /dev/null @@ -1,219 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.jsonArrayFrom = jsonArrayFrom; -exports.jsonObjectFrom = jsonObjectFrom; -exports.jsonBuildObject = jsonBuildObject; -const sql_js_1 = require("../raw-builder/sql.js"); -/** - * An MS SQL Server helper for aggregating a subquery into a JSON array. - * - * NOTE: This helper only works correctly if you've installed the `ParseJSONResultsPlugin`. - * Otherwise the nested selections will be returned as JSON strings. - * - * The plugin can be installed like this: - * - * ```ts - * import { Kysely, MssqlDialect, ParseJSONResultsPlugin } from 'kysely' - * import * as Tarn from 'tarn' - * import * as Tedious from 'tedious' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new MssqlDialect({ - * tarn: { options: { max: 10, min: 0 }, ...Tarn }, - * tedious: { - * ...Tedious, - * connectionFactory: () => new Tedious.Connection({ - * authentication: { - * options: { password: 'password', userName: 'sa' }, - * type: 'default', - * }, - * options: { database: 'test', port: 21433, trustServerCertificate: true }, - * server: 'localhost', - * }), - * }, - * }), - * plugins: [new ParseJSONResultsPlugin()] - * }) - * ``` - * - * ### Examples - * - * ```ts - * import { jsonArrayFrom } from 'kysely/helpers/mssql' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonArrayFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .orderBy('pet.name') - * .offset(0) - * ).as('pets') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.pets[0]?.pet_id - * result[0]?.pets[0]?.name - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * select "id", ( - * select coalesce((select * from ( - * select "pet"."id" as "pet_id", "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * order by "pet"."name" - * offset @1 rows - * ) as "agg" for json path, include_null_values), '[]') - * ) as "pets" - * from "person" - * ``` - */ -function jsonArrayFrom(expr) { - return (0, sql_js_1.sql) `coalesce((select * from ${expr} as agg for json path, include_null_values), '[]')`; -} -/** - * An MS SQL Server helper for turning a subquery into a JSON object. - * - * The subquery must only return one row. - * - * NOTE: This helper only works correctly if you've installed the `ParseJSONResultsPlugin`. - * Otherwise the nested selections will be returned as JSON strings. - * - * The plugin can be installed like this: - * - * ```ts - * import { Kysely, MssqlDialect, ParseJSONResultsPlugin } from 'kysely' - * import * as Tarn from 'tarn' - * import * as Tedious from 'tedious' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new MssqlDialect({ - * tarn: { options: { max: 10, min: 0 }, ...Tarn }, - * tedious: { - * ...Tedious, - * connectionFactory: () => new Tedious.Connection({ - * authentication: { - * options: { password: 'password', userName: 'sa' }, - * type: 'default', - * }, - * options: { database: 'test', port: 21433, trustServerCertificate: true }, - * server: 'localhost', - * }), - * }, - * }), - * plugins: [new ParseJSONResultsPlugin()] - * }) - * ``` - * - * ### Examples - * - * ```ts - * import { jsonObjectFrom } from 'kysely/helpers/mssql' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonObjectFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('pet.is_favorite', '=', 1) - * ).as('favorite_pet') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.favorite_pet?.pet_id - * result[0]?.favorite_pet?.name - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * select "id", ( - * select * from ( - * select "pet"."id" as "pet_id", "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * and "pet"."is_favorite" = @1 - * ) as "agg" for json path, include_null_values, without_array_wrapper - * ) as "favorite_pet" - * from "person" - * ``` - */ -function jsonObjectFrom(expr) { - return (0, sql_js_1.sql) `(select * from ${expr} as agg for json path, include_null_values, without_array_wrapper)`; -} -/** - * The MS SQL Server `json_query` function, single argument variant. - * - * NOTE: This helper only works correctly if you've installed the `ParseJSONResultsPlugin`. - * Otherwise the nested selections will be returned as JSON strings. - * - * The plugin can be installed like this: - * - * ```ts - * import { Kysely, MssqlDialect, ParseJSONResultsPlugin } from 'kysely' - * import * as Tarn from 'tarn' - * import * as Tedious from 'tedious' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new MssqlDialect({ - * tarn: { options: { max: 10, min: 0 }, ...Tarn }, - * tedious: { - * ...Tedious, - * connectionFactory: () => new Tedious.Connection({ - * authentication: { - * options: { password: 'password', userName: 'sa' }, - * type: 'default', - * }, - * options: { database: 'test', port: 21433, trustServerCertificate: true }, - * server: 'localhost', - * }), - * }, - * }), - * plugins: [new ParseJSONResultsPlugin()] - * }) - * ``` - * - * ### Examples - * - * ```ts - * import { jsonBuildObject } from 'kysely/helpers/mssql' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonBuildObject({ - * first: eb.ref('first_name'), - * last: eb.ref('last_name'), - * full: eb.fn('concat', ['first_name', eb.val(' '), 'last_name']) - * }).as('name') - * ]) - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * select "id", json_query( - * '{"first":"'+"first_name"+',"last":"'+"last_name"+',"full":"'+concat("first_name", ' ', "last_name")+'"}' - * ) as "name" - * from "person" - * ``` - */ -function jsonBuildObject(obj) { - return (0, sql_js_1.sql) `json_query('{${sql_js_1.sql.join(Object.keys(obj).map((k) => (0, sql_js_1.sql) `"${sql_js_1.sql.raw(k)}":"'+${obj[k]}+'"`), (0, sql_js_1.sql) `,`)}}')`; -} diff --git a/node_modules/kysely/dist/cjs/helpers/mysql.d.ts b/node_modules/kysely/dist/cjs/helpers/mysql.d.ts deleted file mode 100644 index 009dba1..0000000 --- a/node_modules/kysely/dist/cjs/helpers/mysql.d.ts +++ /dev/null @@ -1,147 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -import type { SelectQueryBuilderExpression } from '../query-builder/select-query-builder-expression.js'; -import type { RawBuilder } from '../raw-builder/raw-builder.js'; -import type { ShallowDehydrateObject, ShallowDehydrateValue, Simplify } from '../util/type-utils.js'; -/** - * A MySQL helper for aggregating a subquery into a JSON array. - * - * NOTE: This helper is only guaranteed to fully work with the built-in `MysqlDialect`. - * While the produced SQL is compatible with all MySQL databases, some third-party dialects - * may not parse the nested JSON into arrays. In these cases you can use the built in - * `ParseJSONResultsPlugin` to parse the results. - * - * ### Examples - * - * ```ts - * import { jsonArrayFrom } from 'kysely/helpers/mysql' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonArrayFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .orderBy('pet.name') - * ).as('pets') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.pets[0]?.pet_id - * result[0]?.pets[0]?.name - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select `id`, ( - * select cast(coalesce(json_arrayagg(json_object( - * 'pet_id', `agg`.`pet_id`, - * 'name', `agg`.`name` - * )), '[]') as json) from ( - * select `pet`.`id` as `pet_id`, `pet`.`name` - * from `pet` - * where `pet`.`owner_id` = `person`.`id` - * order by `pet`.`name` - * ) as `agg` - * ) as `pets` - * from `person` - * ``` - */ -export declare function jsonArrayFrom(expr: SelectQueryBuilderExpression): RawBuilder>[]>; -/** - * A MySQL helper for turning a subquery into a JSON object. - * - * The subquery must only return one row. - * - * NOTE: This helper is only guaranteed to fully work with the built-in `MysqlDialect`. - * While the produced SQL is compatible with all MySQL databases, some third-party dialects - * may not parse the nested JSON into objects. In these cases you can use the built in - * `ParseJSONResultsPlugin` to parse the results. - * - * ### Examples - * - * ```ts - * import { jsonObjectFrom } from 'kysely/helpers/mysql' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonObjectFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('pet.is_favorite', '=', true) - * ).as('favorite_pet') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.favorite_pet?.pet_id - * result[0]?.favorite_pet?.name - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select `id`, ( - * select json_object( - * 'pet_id', `obj`.`pet_id`, - * 'name', `obj`.`name` - * ) from ( - * select `pet`.`id` as `pet_id`, `pet`.`name` - * from `pet` - * where `pet`.`owner_id` = `person`.`id` - * and `pet`.`is_favorite` = ? - * ) as obj - * ) as `favorite_pet` - * from `person` - * ``` - */ -export declare function jsonObjectFrom(expr: SelectQueryBuilderExpression): RawBuilder> | null>; -/** - * The MySQL `json_object` function. - * - * NOTE: This helper is only guaranteed to fully work with the built-in `MysqlDialect`. - * While the produced SQL is compatible with all MySQL databases, some third-party dialects - * may not parse the nested JSON into objects. In these cases you can use the built in - * `ParseJSONResultsPlugin` to parse the results. - * - * ### Examples - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonBuildObject({ - * first: eb.ref('first_name'), - * last: eb.ref('last_name'), - * full: eb.fn('concat', ['first_name', eb.val(' '), 'last_name']) - * }).as('name') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.name.first - * result[0]?.name.last - * result[0]?.name.full - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select "id", json_object( - * 'first', first_name, - * 'last', last_name, - * 'full', concat(`first_name`, ?, `last_name`) - * ) as "name" - * from "person" - * ``` - */ -export declare function jsonBuildObject>>(obj: O): RawBuilder ? ShallowDehydrateValue : never; -}>>; diff --git a/node_modules/kysely/dist/cjs/helpers/mysql.js b/node_modules/kysely/dist/cjs/helpers/mysql.js deleted file mode 100644 index cd13bbb..0000000 --- a/node_modules/kysely/dist/cjs/helpers/mysql.js +++ /dev/null @@ -1,162 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.jsonArrayFrom = jsonArrayFrom; -exports.jsonObjectFrom = jsonObjectFrom; -exports.jsonBuildObject = jsonBuildObject; -const sql_js_1 = require("../raw-builder/sql.js"); -const json_object_args_js_1 = require("../util/json-object-args.js"); -/** - * A MySQL helper for aggregating a subquery into a JSON array. - * - * NOTE: This helper is only guaranteed to fully work with the built-in `MysqlDialect`. - * While the produced SQL is compatible with all MySQL databases, some third-party dialects - * may not parse the nested JSON into arrays. In these cases you can use the built in - * `ParseJSONResultsPlugin` to parse the results. - * - * ### Examples - * - * ```ts - * import { jsonArrayFrom } from 'kysely/helpers/mysql' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonArrayFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .orderBy('pet.name') - * ).as('pets') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.pets[0]?.pet_id - * result[0]?.pets[0]?.name - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select `id`, ( - * select cast(coalesce(json_arrayagg(json_object( - * 'pet_id', `agg`.`pet_id`, - * 'name', `agg`.`name` - * )), '[]') as json) from ( - * select `pet`.`id` as `pet_id`, `pet`.`name` - * from `pet` - * where `pet`.`owner_id` = `person`.`id` - * order by `pet`.`name` - * ) as `agg` - * ) as `pets` - * from `person` - * ``` - */ -function jsonArrayFrom(expr) { - return (0, sql_js_1.sql) `(select cast(coalesce(json_arrayagg(json_object(${sql_js_1.sql.join(getMysqlJsonObjectArgs(expr.toOperationNode(), 'agg'))})), '[]') as json) from ${expr} as agg)`; -} -/** - * A MySQL helper for turning a subquery into a JSON object. - * - * The subquery must only return one row. - * - * NOTE: This helper is only guaranteed to fully work with the built-in `MysqlDialect`. - * While the produced SQL is compatible with all MySQL databases, some third-party dialects - * may not parse the nested JSON into objects. In these cases you can use the built in - * `ParseJSONResultsPlugin` to parse the results. - * - * ### Examples - * - * ```ts - * import { jsonObjectFrom } from 'kysely/helpers/mysql' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonObjectFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('pet.is_favorite', '=', true) - * ).as('favorite_pet') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.favorite_pet?.pet_id - * result[0]?.favorite_pet?.name - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select `id`, ( - * select json_object( - * 'pet_id', `obj`.`pet_id`, - * 'name', `obj`.`name` - * ) from ( - * select `pet`.`id` as `pet_id`, `pet`.`name` - * from `pet` - * where `pet`.`owner_id` = `person`.`id` - * and `pet`.`is_favorite` = ? - * ) as obj - * ) as `favorite_pet` - * from `person` - * ``` - */ -function jsonObjectFrom(expr) { - return (0, sql_js_1.sql) `(select json_object(${sql_js_1.sql.join(getMysqlJsonObjectArgs(expr.toOperationNode(), 'obj'))}) from ${expr} as obj)`; -} -/** - * The MySQL `json_object` function. - * - * NOTE: This helper is only guaranteed to fully work with the built-in `MysqlDialect`. - * While the produced SQL is compatible with all MySQL databases, some third-party dialects - * may not parse the nested JSON into objects. In these cases you can use the built in - * `ParseJSONResultsPlugin` to parse the results. - * - * ### Examples - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonBuildObject({ - * first: eb.ref('first_name'), - * last: eb.ref('last_name'), - * full: eb.fn('concat', ['first_name', eb.val(' '), 'last_name']) - * }).as('name') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.name.first - * result[0]?.name.last - * result[0]?.name.full - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select "id", json_object( - * 'first', first_name, - * 'last', last_name, - * 'full', concat(`first_name`, ?, `last_name`) - * ) as "name" - * from "person" - * ``` - */ -function jsonBuildObject(obj) { - return (0, sql_js_1.sql) `json_object(${sql_js_1.sql.join(Object.keys(obj).flatMap((k) => [sql_js_1.sql.lit(k), obj[k]]))})`; -} -function getMysqlJsonObjectArgs(node, table) { - try { - return (0, json_object_args_js_1.getJsonObjectArgs)(node, table); - } - catch { - throw new Error('MySQL jsonArrayFrom and jsonObjectFrom functions can only handle explicit selections due to limitations of the json_object function. selectAll() is not allowed in the subquery.'); - } -} diff --git a/node_modules/kysely/dist/cjs/helpers/postgres.d.ts b/node_modules/kysely/dist/cjs/helpers/postgres.d.ts deleted file mode 100644 index 5d2d7ef..0000000 --- a/node_modules/kysely/dist/cjs/helpers/postgres.d.ts +++ /dev/null @@ -1,199 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -import type { RawBuilder } from '../raw-builder/raw-builder.js'; -import type { ShallowDehydrateValue, ShallowDehydrateObject, Simplify } from '../util/type-utils.js'; -/** - * A postgres helper for aggregating a subquery (or other expression) into a JSONB array. - * - * ### Examples - * - * - * - * While kysely is not an ORM and it doesn't have the concept of relations, we do provide - * helpers for fetching nested objects and arrays in a single query. In this example we - * use the `jsonArrayFrom` helper to fetch person's pets along with the person's id. - * - * Please keep in mind that the helpers under the `kysely/helpers` folder, including - * `jsonArrayFrom`, are not guaranteed to work with third party dialects. In order for - * them to work, the dialect must automatically parse the `json` data type into - * JavaScript JSON values like objects and arrays. Some dialects might simply return - * the data as a JSON string. In these cases you can use the built in `ParseJSONResultsPlugin` - * to parse the results. - * - * ```ts - * import { jsonArrayFrom } from 'kysely/helpers/postgres' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonArrayFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .orderBy('pet.name') - * ).as('pets') - * ]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", ( - * select coalesce(json_agg(agg), '[]') from ( - * select "pet"."id" as "pet_id", "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * order by "pet"."name" - * ) as agg - * ) as "pets" - * from "person" - * ``` - */ -export declare function jsonArrayFrom(expr: Expression): RawBuilder>[]>; -/** - * A postgres helper for turning a subquery (or other expression) into a JSON object. - * - * The subquery must only return one row. - * - * ### Examples - * - * - * - * While kysely is not an ORM and it doesn't have the concept of relations, we do provide - * helpers for fetching nested objects and arrays in a single query. In this example we - * use the `jsonObjectFrom` helper to fetch person's favorite pet along with the person's id. - * - * Please keep in mind that the helpers under the `kysely/helpers` folder, including - * `jsonObjectFrom`, are not guaranteed to work with third-party dialects. In order for - * them to work, the dialect must automatically parse the `json` data type into - * JavaScript JSON values like objects and arrays. Some dialects might simply return - * the data as a JSON string. In these cases you can use the built in `ParseJSONResultsPlugin` - * to parse the results. - * - * ```ts - * import { jsonObjectFrom } from 'kysely/helpers/postgres' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonObjectFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('pet.is_favorite', '=', true) - * ).as('favorite_pet') - * ]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", ( - * select to_json(obj) from ( - * select "pet"."id" as "pet_id", "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * and "pet"."is_favorite" = $1 - * ) as obj - * ) as "favorite_pet" - * from "person" - * ``` - */ -export declare function jsonObjectFrom(expr: Expression): RawBuilder> | null>; -/** - * The PostgreSQL `json_build_object` function. - * - * NOTE: This helper is only guaranteed to fully work with the built-in `PostgresDialect`. - * While the produced SQL is compatible with all PostgreSQL databases, some third-party dialects - * may not parse the nested JSON into objects. In these cases you can use the built in - * `ParseJSONResultsPlugin` to parse the results. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * import { jsonBuildObject } from 'kysely/helpers/postgres' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonBuildObject({ - * first: eb.ref('first_name'), - * last: eb.ref('last_name'), - * full: sql`first_name || ' ' || last_name` - * }).as('name') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.name.first - * result[0]?.name.last - * result[0]?.name.full - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", json_build_object( - * 'first', first_name, - * 'last', last_name, - * 'full', first_name || ' ' || last_name - * ) as "name" - * from "person" - * ``` - */ -export declare function jsonBuildObject>>(obj: O): RawBuilder ? ShallowDehydrateValue : never; -}>>; -export type MergeAction = 'INSERT' | 'UPDATE' | 'DELETE'; -/** - * The PostgreSQL `merge_action` function. - * - * This function can be used in a `returning` clause to get the action that was - * performed in a `mergeInto` query. The function returns one of the following - * strings: `'INSERT'`, `'UPDATE'`, or `'DELETE'`. - * - * ### Examples - * - * ```ts - * import { mergeAction } from 'kysely/helpers/postgres' - * - * const result = await db - * .mergeInto('person as p') - * .using('person_backup as pb', 'p.id', 'pb.id') - * .whenMatched() - * .thenUpdateSet(({ ref }) => ({ - * first_name: ref('pb.first_name'), - * updated_at: ref('pb.updated_at').$castTo(), - * })) - * .whenNotMatched() - * .thenInsertValues(({ ref}) => ({ - * id: ref('pb.id'), - * first_name: ref('pb.first_name'), - * created_at: ref('pb.updated_at'), - * updated_at: ref('pb.updated_at').$castTo(), - * })) - * .returning([mergeAction().as('action'), 'p.id', 'p.updated_at']) - * .execute() - * - * result[0].action - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" as "p" - * using "person_backup" as "pb" on "p"."id" = "pb"."id" - * when matched then update set - * "first_name" = "pb"."first_name", - * "updated_at" = "pb"."updated_at"::text - * when not matched then insert values ("id", "first_name", "created_at", "updated_at") - * values ("pb"."id", "pb"."first_name", "pb"."updated_at", "pb"."updated_at") - * returning merge_action() as "action", "p"."id", "p"."updated_at" - * ``` - */ -export declare function mergeAction(): RawBuilder; diff --git a/node_modules/kysely/dist/cjs/helpers/postgres.js b/node_modules/kysely/dist/cjs/helpers/postgres.js deleted file mode 100644 index d3246fb..0000000 --- a/node_modules/kysely/dist/cjs/helpers/postgres.js +++ /dev/null @@ -1,208 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.jsonArrayFrom = jsonArrayFrom; -exports.jsonObjectFrom = jsonObjectFrom; -exports.jsonBuildObject = jsonBuildObject; -exports.mergeAction = mergeAction; -const sql_js_1 = require("../raw-builder/sql.js"); -/** - * A postgres helper for aggregating a subquery (or other expression) into a JSONB array. - * - * ### Examples - * - * - * - * While kysely is not an ORM and it doesn't have the concept of relations, we do provide - * helpers for fetching nested objects and arrays in a single query. In this example we - * use the `jsonArrayFrom` helper to fetch person's pets along with the person's id. - * - * Please keep in mind that the helpers under the `kysely/helpers` folder, including - * `jsonArrayFrom`, are not guaranteed to work with third party dialects. In order for - * them to work, the dialect must automatically parse the `json` data type into - * JavaScript JSON values like objects and arrays. Some dialects might simply return - * the data as a JSON string. In these cases you can use the built in `ParseJSONResultsPlugin` - * to parse the results. - * - * ```ts - * import { jsonArrayFrom } from 'kysely/helpers/postgres' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonArrayFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .orderBy('pet.name') - * ).as('pets') - * ]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", ( - * select coalesce(json_agg(agg), '[]') from ( - * select "pet"."id" as "pet_id", "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * order by "pet"."name" - * ) as agg - * ) as "pets" - * from "person" - * ``` - */ -function jsonArrayFrom(expr) { - return (0, sql_js_1.sql) `(select coalesce(json_agg(agg), '[]') from ${expr} as agg)`; -} -/** - * A postgres helper for turning a subquery (or other expression) into a JSON object. - * - * The subquery must only return one row. - * - * ### Examples - * - * - * - * While kysely is not an ORM and it doesn't have the concept of relations, we do provide - * helpers for fetching nested objects and arrays in a single query. In this example we - * use the `jsonObjectFrom` helper to fetch person's favorite pet along with the person's id. - * - * Please keep in mind that the helpers under the `kysely/helpers` folder, including - * `jsonObjectFrom`, are not guaranteed to work with third-party dialects. In order for - * them to work, the dialect must automatically parse the `json` data type into - * JavaScript JSON values like objects and arrays. Some dialects might simply return - * the data as a JSON string. In these cases you can use the built in `ParseJSONResultsPlugin` - * to parse the results. - * - * ```ts - * import { jsonObjectFrom } from 'kysely/helpers/postgres' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonObjectFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('pet.is_favorite', '=', true) - * ).as('favorite_pet') - * ]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", ( - * select to_json(obj) from ( - * select "pet"."id" as "pet_id", "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * and "pet"."is_favorite" = $1 - * ) as obj - * ) as "favorite_pet" - * from "person" - * ``` - */ -function jsonObjectFrom(expr) { - return (0, sql_js_1.sql) `(select to_json(obj) from ${expr} as obj)`; -} -/** - * The PostgreSQL `json_build_object` function. - * - * NOTE: This helper is only guaranteed to fully work with the built-in `PostgresDialect`. - * While the produced SQL is compatible with all PostgreSQL databases, some third-party dialects - * may not parse the nested JSON into objects. In these cases you can use the built in - * `ParseJSONResultsPlugin` to parse the results. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * import { jsonBuildObject } from 'kysely/helpers/postgres' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonBuildObject({ - * first: eb.ref('first_name'), - * last: eb.ref('last_name'), - * full: sql`first_name || ' ' || last_name` - * }).as('name') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.name.first - * result[0]?.name.last - * result[0]?.name.full - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", json_build_object( - * 'first', first_name, - * 'last', last_name, - * 'full', first_name || ' ' || last_name - * ) as "name" - * from "person" - * ``` - */ -function jsonBuildObject(obj) { - return (0, sql_js_1.sql) `json_build_object(${sql_js_1.sql.join(Object.keys(obj).flatMap((k) => [sql_js_1.sql.lit(k), obj[k]]))})`; -} -/** - * The PostgreSQL `merge_action` function. - * - * This function can be used in a `returning` clause to get the action that was - * performed in a `mergeInto` query. The function returns one of the following - * strings: `'INSERT'`, `'UPDATE'`, or `'DELETE'`. - * - * ### Examples - * - * ```ts - * import { mergeAction } from 'kysely/helpers/postgres' - * - * const result = await db - * .mergeInto('person as p') - * .using('person_backup as pb', 'p.id', 'pb.id') - * .whenMatched() - * .thenUpdateSet(({ ref }) => ({ - * first_name: ref('pb.first_name'), - * updated_at: ref('pb.updated_at').$castTo(), - * })) - * .whenNotMatched() - * .thenInsertValues(({ ref}) => ({ - * id: ref('pb.id'), - * first_name: ref('pb.first_name'), - * created_at: ref('pb.updated_at'), - * updated_at: ref('pb.updated_at').$castTo(), - * })) - * .returning([mergeAction().as('action'), 'p.id', 'p.updated_at']) - * .execute() - * - * result[0].action - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" as "p" - * using "person_backup" as "pb" on "p"."id" = "pb"."id" - * when matched then update set - * "first_name" = "pb"."first_name", - * "updated_at" = "pb"."updated_at"::text - * when not matched then insert values ("id", "first_name", "created_at", "updated_at") - * values ("pb"."id", "pb"."first_name", "pb"."updated_at", "pb"."updated_at") - * returning merge_action() as "action", "p"."id", "p"."updated_at" - * ``` - */ -function mergeAction() { - return (0, sql_js_1.sql) `merge_action()`; -} diff --git a/node_modules/kysely/dist/cjs/helpers/sqlite.d.ts b/node_modules/kysely/dist/cjs/helpers/sqlite.d.ts deleted file mode 100644 index c7fe474..0000000 --- a/node_modules/kysely/dist/cjs/helpers/sqlite.d.ts +++ /dev/null @@ -1,189 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -import type { SelectQueryBuilderExpression } from '../query-builder/select-query-builder-expression.js'; -import type { RawBuilder } from '../raw-builder/raw-builder.js'; -import type { ShallowDehydrateObject, ShallowDehydrateValue, Simplify } from '../util/type-utils.js'; -/** - * A SQLite helper for aggregating a subquery into a JSON array. - * - * NOTE: This helper only works correctly if you've installed the `ParseJSONResultsPlugin`. - * Otherwise the nested selections will be returned as JSON strings. - * - * The plugin can be installed like this: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { Kysely, ParseJSONResultsPlugin, SqliteDialect } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:') - * }), - * plugins: [new ParseJSONResultsPlugin()] - * }) - * ``` - * - * ### Examples - * - * ```ts - * import { jsonArrayFrom } from 'kysely/helpers/sqlite' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonArrayFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .orderBy('pet.name') - * ).as('pets') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.pets[0].pet_id - * result[0]?.pets[0].name - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select "id", ( - * select coalesce(json_group_array(json_object( - * 'pet_id', "agg"."pet_id", - * 'name', "agg"."name" - * )), '[]') from ( - * select "pet"."id" as "pet_id", "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * order by "pet"."name" - * ) as "agg" - * ) as "pets" - * from "person" - * ``` - */ -export declare function jsonArrayFrom(expr: SelectQueryBuilderExpression): RawBuilder>[]>; -/** - * A SQLite helper for turning a subquery into a JSON object. - * - * The subquery must only return one row. - * - * NOTE: This helper only works correctly if you've installed the `ParseJSONResultsPlugin`. - * Otherwise the nested selections will be returned as JSON strings. - * - * The plugin can be installed like this: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { Kysely, ParseJSONResultsPlugin, SqliteDialect } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:') - * }), - * plugins: [new ParseJSONResultsPlugin()] - * }) - * ``` - * - * ### Examples - * - * ```ts - * import { jsonObjectFrom } from 'kysely/helpers/sqlite' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonObjectFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('pet.is_favorite', '=', true) - * ).as('favorite_pet') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.favorite_pet?.pet_id - * result[0]?.favorite_pet?.name - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select "id", ( - * select json_object( - * 'pet_id', "obj"."pet_id", - * 'name', "obj"."name" - * ) from ( - * select "pet"."id" as "pet_id", "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * and "pet"."is_favorite" = ? - * ) as obj - * ) as "favorite_pet" - * from "person"; - * ``` - */ -export declare function jsonObjectFrom(expr: SelectQueryBuilderExpression): RawBuilder> | null>; -/** - * The SQLite `json_object` function. - * - * NOTE: This helper only works correctly if you've installed the `ParseJSONResultsPlugin`. - * Otherwise the nested selections will be returned as JSON strings. - * - * The plugin can be installed like this: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { Kysely, ParseJSONResultsPlugin, SqliteDialect } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:') - * }), - * plugins: [new ParseJSONResultsPlugin()] - * }) - * ``` - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * import { jsonBuildObject } from 'kysely/helpers/sqlite' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonBuildObject({ - * first: eb.ref('first_name'), - * last: eb.ref('last_name'), - * full: sql`first_name || ' ' || last_name` - * }).as('name') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.name.first - * result[0]?.name.last - * result[0]?.name.full - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select "id", json_object( - * 'first', first_name, - * 'last', last_name, - * 'full', "first_name" || ' ' || "last_name" - * ) as "name" - * from "person" - * ``` - */ -export declare function jsonBuildObject>>(obj: O): RawBuilder ? ShallowDehydrateValue : never; -}>>; diff --git a/node_modules/kysely/dist/cjs/helpers/sqlite.js b/node_modules/kysely/dist/cjs/helpers/sqlite.js deleted file mode 100644 index 3c078bf..0000000 --- a/node_modules/kysely/dist/cjs/helpers/sqlite.js +++ /dev/null @@ -1,204 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.jsonArrayFrom = jsonArrayFrom; -exports.jsonObjectFrom = jsonObjectFrom; -exports.jsonBuildObject = jsonBuildObject; -const sql_js_1 = require("../raw-builder/sql.js"); -const json_object_args_js_1 = require("../util/json-object-args.js"); -/** - * A SQLite helper for aggregating a subquery into a JSON array. - * - * NOTE: This helper only works correctly if you've installed the `ParseJSONResultsPlugin`. - * Otherwise the nested selections will be returned as JSON strings. - * - * The plugin can be installed like this: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { Kysely, ParseJSONResultsPlugin, SqliteDialect } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:') - * }), - * plugins: [new ParseJSONResultsPlugin()] - * }) - * ``` - * - * ### Examples - * - * ```ts - * import { jsonArrayFrom } from 'kysely/helpers/sqlite' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonArrayFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .orderBy('pet.name') - * ).as('pets') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.pets[0].pet_id - * result[0]?.pets[0].name - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select "id", ( - * select coalesce(json_group_array(json_object( - * 'pet_id', "agg"."pet_id", - * 'name', "agg"."name" - * )), '[]') from ( - * select "pet"."id" as "pet_id", "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * order by "pet"."name" - * ) as "agg" - * ) as "pets" - * from "person" - * ``` - */ -function jsonArrayFrom(expr) { - return (0, sql_js_1.sql) `(select coalesce(json_group_array(json_object(${sql_js_1.sql.join(getSqliteJsonObjectArgs(expr.toOperationNode(), 'agg'))})), '[]') from ${expr} as agg)`; -} -/** - * A SQLite helper for turning a subquery into a JSON object. - * - * The subquery must only return one row. - * - * NOTE: This helper only works correctly if you've installed the `ParseJSONResultsPlugin`. - * Otherwise the nested selections will be returned as JSON strings. - * - * The plugin can be installed like this: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { Kysely, ParseJSONResultsPlugin, SqliteDialect } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:') - * }), - * plugins: [new ParseJSONResultsPlugin()] - * }) - * ``` - * - * ### Examples - * - * ```ts - * import { jsonObjectFrom } from 'kysely/helpers/sqlite' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonObjectFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('pet.is_favorite', '=', true) - * ).as('favorite_pet') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.favorite_pet?.pet_id - * result[0]?.favorite_pet?.name - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select "id", ( - * select json_object( - * 'pet_id', "obj"."pet_id", - * 'name', "obj"."name" - * ) from ( - * select "pet"."id" as "pet_id", "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * and "pet"."is_favorite" = ? - * ) as obj - * ) as "favorite_pet" - * from "person"; - * ``` - */ -function jsonObjectFrom(expr) { - return (0, sql_js_1.sql) `(select json_object(${sql_js_1.sql.join(getSqliteJsonObjectArgs(expr.toOperationNode(), 'obj'))}) from ${expr} as obj)`; -} -/** - * The SQLite `json_object` function. - * - * NOTE: This helper only works correctly if you've installed the `ParseJSONResultsPlugin`. - * Otherwise the nested selections will be returned as JSON strings. - * - * The plugin can be installed like this: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { Kysely, ParseJSONResultsPlugin, SqliteDialect } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:') - * }), - * plugins: [new ParseJSONResultsPlugin()] - * }) - * ``` - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * import { jsonBuildObject } from 'kysely/helpers/sqlite' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonBuildObject({ - * first: eb.ref('first_name'), - * last: eb.ref('last_name'), - * full: sql`first_name || ' ' || last_name` - * }).as('name') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.name.first - * result[0]?.name.last - * result[0]?.name.full - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select "id", json_object( - * 'first', first_name, - * 'last', last_name, - * 'full', "first_name" || ' ' || "last_name" - * ) as "name" - * from "person" - * ``` - */ -function jsonBuildObject(obj) { - return (0, sql_js_1.sql) `json_object(${sql_js_1.sql.join(Object.keys(obj).flatMap((k) => [sql_js_1.sql.lit(k), obj[k]]))})`; -} -function getSqliteJsonObjectArgs(node, table) { - try { - return (0, json_object_args_js_1.getJsonObjectArgs)(node, table); - } - catch { - throw new Error('SQLite jsonArrayFrom and jsonObjectFrom functions can only handle explicit selections due to limitations of the json_object function. selectAll() is not allowed in the subquery.'); - } -} diff --git a/node_modules/kysely/dist/cjs/index.d.ts b/node_modules/kysely/dist/cjs/index.d.ts deleted file mode 100644 index 224e419..0000000 --- a/node_modules/kysely/dist/cjs/index.d.ts +++ /dev/null @@ -1,226 +0,0 @@ -export * from './kysely.js'; -export * from './query-creator.js'; -export * from './expression/expression.js'; -export { type ExpressionBuilder, expressionBuilder, } from './expression/expression-builder.js'; -export * from './expression/expression-wrapper.js'; -export * from './query-builder/where-interface.js'; -export * from './query-builder/returning-interface.js'; -export * from './query-builder/output-interface.js'; -export * from './query-builder/having-interface.js'; -export * from './query-builder/order-by-interface.js'; -export * from './query-builder/select-query-builder.js'; -export * from './query-builder/insert-query-builder.js'; -export * from './query-builder/update-query-builder.js'; -export * from './query-builder/delete-query-builder.js'; -export * from './query-builder/no-result-error.js'; -export * from './query-builder/join-builder.js'; -export * from './query-builder/function-module.js'; -export * from './query-builder/insert-result.js'; -export * from './query-builder/delete-result.js'; -export * from './query-builder/update-result.js'; -export * from './query-builder/on-conflict-builder.js'; -export * from './query-builder/aggregate-function-builder.js'; -export * from './query-builder/case-builder.js'; -export * from './query-builder/json-path-builder.js'; -export * from './query-builder/merge-query-builder.js'; -export * from './query-builder/merge-result.js'; -export * from './query-builder/order-by-item-builder.js'; -export * from './raw-builder/raw-builder.js'; -export * from './raw-builder/sql.js'; -export * from './query-executor/query-executor.js'; -export * from './query-executor/default-query-executor.js'; -export * from './query-executor/noop-query-executor.js'; -export * from './query-executor/query-executor-provider.js'; -export * from './query-compiler/default-query-compiler.js'; -export * from './query-compiler/compiled-query.js'; -export * from './schema/schema.js'; -export * from './schema/create-table-builder.js'; -export * from './schema/create-type-builder.js'; -export * from './schema/drop-table-builder.js'; -export * from './schema/drop-type-builder.js'; -export * from './schema/create-index-builder.js'; -export * from './schema/drop-index-builder.js'; -export * from './schema/create-schema-builder.js'; -export * from './schema/drop-schema-builder.js'; -export * from './schema/column-definition-builder.js'; -export * from './schema/foreign-key-constraint-builder.js'; -export * from './schema/alter-table-builder.js'; -export * from './schema/create-view-builder.js'; -export * from './schema/refresh-materialized-view-builder.js'; -export * from './schema/drop-view-builder.js'; -export * from './schema/alter-column-builder.js'; -export * from './dynamic/dynamic.js'; -export * from './dynamic/dynamic-reference-builder.js'; -export * from './dynamic/dynamic-table-builder.js'; -export * from './driver/driver.js'; -export * from './driver/database-connection.js'; -export * from './driver/connection-provider.js'; -export * from './driver/default-connection-provider.js'; -export * from './driver/single-connection-provider.js'; -export * from './driver/dummy-driver.js'; -export * from './dialect/dialect.js'; -export * from './dialect/dialect-adapter.js'; -export * from './dialect/dialect-adapter-base.js'; -export * from './dialect/database-introspector.js'; -export * from './dialect/sqlite/sqlite-dialect.js'; -export * from './dialect/sqlite/sqlite-dialect-config.js'; -export * from './dialect/sqlite/sqlite-driver.js'; -export * from './dialect/postgres/postgres-query-compiler.js'; -export * from './dialect/postgres/postgres-introspector.js'; -export * from './dialect/postgres/postgres-adapter.js'; -export * from './dialect/mysql/mysql-dialect.js'; -export * from './dialect/mysql/mysql-dialect-config.js'; -export * from './dialect/mysql/mysql-driver.js'; -export * from './dialect/mysql/mysql-query-compiler.js'; -export * from './dialect/mysql/mysql-introspector.js'; -export * from './dialect/mysql/mysql-adapter.js'; -export * from './dialect/postgres/postgres-driver.js'; -export * from './dialect/postgres/postgres-dialect-config.js'; -export * from './dialect/postgres/postgres-dialect.js'; -export * from './dialect/sqlite/sqlite-query-compiler.js'; -export * from './dialect/sqlite/sqlite-introspector.js'; -export * from './dialect/sqlite/sqlite-adapter.js'; -export * from './dialect/mssql/mssql-adapter.js'; -export * from './dialect/mssql/mssql-dialect-config.js'; -export * from './dialect/mssql/mssql-dialect.js'; -export * from './dialect/mssql/mssql-driver.js'; -export * from './dialect/mssql/mssql-introspector.js'; -export * from './dialect/mssql/mssql-query-compiler.js'; -export * from './query-compiler/default-query-compiler.js'; -export * from './query-compiler/query-compiler.js'; -export * from './migration/migrator.js'; -export * from './migration/file-migration-provider.js'; -export * from './plugin/kysely-plugin.js'; -export * from './plugin/camel-case/camel-case-plugin.js'; -export * from './plugin/deduplicate-joins/deduplicate-joins-plugin.js'; -export * from './plugin/with-schema/with-schema-plugin.js'; -export * from './plugin/parse-json-results/parse-json-results-plugin.js'; -export * from './plugin/handle-empty-in-lists/handle-empty-in-lists-plugin.js'; -export * from './plugin/handle-empty-in-lists/handle-empty-in-lists.js'; -export * from './operation-node/add-column-node.js'; -export * from './operation-node/add-constraint-node.js'; -export * from './operation-node/add-index-node.js'; -export * from './operation-node/aggregate-function-node.js'; -export * from './operation-node/alias-node.js'; -export * from './operation-node/alter-column-node.js'; -export * from './operation-node/alter-table-node.js'; -export * from './operation-node/and-node.js'; -export * from './operation-node/binary-operation-node.js'; -export * from './operation-node/case-node.js'; -export * from './operation-node/cast-node.js'; -export * from './operation-node/check-constraint-node.js'; -export * from './operation-node/collate-node.js'; -export * from './operation-node/column-definition-node.js'; -export * from './operation-node/column-node.js'; -export * from './operation-node/column-update-node.js'; -export * from './operation-node/common-table-expression-name-node.js'; -export * from './operation-node/common-table-expression-node.js'; -export * from './operation-node/constraint-node.js'; -export * from './operation-node/create-index-node.js'; -export * from './operation-node/create-schema-node.js'; -export * from './operation-node/create-table-node.js'; -export * from './operation-node/create-type-node.js'; -export * from './operation-node/create-view-node.js'; -export * from './operation-node/refresh-materialized-view-node.js'; -export * from './operation-node/data-type-node.js'; -export * from './operation-node/default-insert-value-node.js'; -export * from './operation-node/default-value-node.js'; -export * from './operation-node/delete-query-node.js'; -export * from './operation-node/drop-column-node.js'; -export * from './operation-node/drop-constraint-node.js'; -export * from './operation-node/drop-index-node.js'; -export * from './operation-node/drop-schema-node.js'; -export * from './operation-node/drop-table-node.js'; -export * from './operation-node/drop-type-node.js'; -export * from './operation-node/drop-view-node.js'; -export * from './operation-node/explain-node.js'; -export * from './operation-node/fetch-node.js'; -export * from './operation-node/foreign-key-constraint-node.js'; -export * from './operation-node/from-node.js'; -export * from './operation-node/function-node.js'; -export * from './operation-node/generated-node.js'; -export * from './operation-node/group-by-item-node.js'; -export * from './operation-node/group-by-node.js'; -export * from './operation-node/having-node.js'; -export * from './operation-node/identifier-node.js'; -export * from './operation-node/insert-query-node.js'; -export * from './operation-node/join-node.js'; -export * from './operation-node/json-operator-chain-node.js'; -export * from './operation-node/json-path-leg-node.js'; -export * from './operation-node/json-path-node.js'; -export * from './operation-node/json-reference-node.js'; -export * from './operation-node/limit-node.js'; -export * from './operation-node/list-node.js'; -export * from './operation-node/matched-node.js'; -export * from './operation-node/merge-query-node.js'; -export * from './operation-node/modify-column-node.js'; -export * from './operation-node/offset-node.js'; -export * from './operation-node/on-conflict-node.js'; -export * from './operation-node/on-duplicate-key-node.js'; -export * from './operation-node/on-node.js'; -export * from './operation-node/operation-node-source.js'; -export * from './operation-node/operation-node-transformer.js'; -export * from './operation-node/operation-node-visitor.js'; -export * from './operation-node/operation-node.js'; -export * from './operation-node/operator-node.js'; -export * from './operation-node/or-action-node.js'; -export * from './operation-node/or-node.js'; -export * from './operation-node/order-by-item-node.js'; -export * from './operation-node/order-by-node.js'; -export * from './operation-node/output-node.js'; -export * from './operation-node/over-node.js'; -export * from './operation-node/parens-node.js'; -export * from './operation-node/partition-by-item-node.js'; -export * from './operation-node/partition-by-node.js'; -export * from './operation-node/primary-key-constraint-node.js'; -export * from './operation-node/primitive-value-list-node.js'; -export * from './operation-node/query-node.js'; -export * from './operation-node/raw-node.js'; -export * from './operation-node/reference-node.js'; -export * from './operation-node/references-node.js'; -export * from './operation-node/rename-column-node.js'; -export * from './operation-node/rename-constraint-node.js'; -export * from './operation-node/returning-node.js'; -export * from './operation-node/schemable-identifier-node.js'; -export * from './operation-node/select-all-node.js'; -export * from './operation-node/select-modifier-node.js'; -export * from './operation-node/select-query-node.js'; -export * from './operation-node/selection-node.js'; -export * from './operation-node/set-operation-node.js'; -export * from './operation-node/simple-reference-expression-node.js'; -export * from './operation-node/table-node.js'; -export * from './operation-node/top-node.js'; -export * from './operation-node/tuple-node.js'; -export * from './operation-node/unary-operation-node.js'; -export * from './operation-node/unique-constraint-node.js'; -export * from './operation-node/update-query-node.js'; -export * from './operation-node/using-node.js'; -export * from './operation-node/value-list-node.js'; -export * from './operation-node/value-node.js'; -export * from './operation-node/values-node.js'; -export * from './operation-node/when-node.js'; -export * from './operation-node/where-node.js'; -export * from './operation-node/with-node.js'; -export * from './util/column-type.js'; -export * from './util/compilable.js'; -export * from './util/explainable.js'; -export * from './util/streamable.js'; -export * from './util/log.js'; -export type { AnyAliasedColumn, AnyAliasedColumnWithTable, AnyColumn, AnyColumnWithTable, DrainOuterGeneric, Equals, ExtractColumnType, UnknownRow, Simplify, SqlBool, Nullable, NumbersWhenDataTypeNotAvailable, NotNull, NumericString, ShallowDehydrateObject, ShallowDehydrateValue, SimplifyResult, SimplifySingleResult, StringsWhenDataTypeNotAvailable, } from './util/type-utils.js'; -export * from './util/infer-result.js'; -export { logOnce } from './util/log-once.js'; -export { createQueryId, type QueryId } from './util/query-id.js'; -export type { KyselyTypeError } from './util/type-error.js'; -export type { SelectExpression, SelectCallback, SelectArg, Selection, CallbackSelection, } from './parser/select-parser.js'; -export type { ReferenceExpression, ReferenceExpressionOrList, SimpleReferenceExpression, StringReference, ExtractTypeFromStringReference, ExtractTypeFromReferenceExpression, } from './parser/reference-parser.js'; -export type { ValueExpression, ValueExpressionOrList, } from './parser/value-parser.js'; -export type { SimpleTableReference, TableExpression, TableExpressionOrList, } from './parser/table-parser.js'; -export type { JoinReferenceExpression, JoinCallbackExpression, } from './parser/join-parser.js'; -export type { InsertObject } from './parser/insert-values-parser.js'; -export type { UpdateObject } from './parser/update-set-parser.js'; -export type { OrderByExpression, OrderByDirectionExpression, OrderByModifiers, OrderByDirection, OrderByModifiersCallbackExpression, } from './parser/order-by-parser.js'; -export type { ComparisonOperatorExpression, OperandValueExpression, OperandValueExpressionOrList, FilterObject, } from './parser/binary-operation-parser.js'; -export type { ExistsExpression } from './parser/unary-operation-parser.js'; -export type { OperandExpression, ExpressionOrFactory, } from './parser/expression-parser.js'; -export type { Collation } from './parser/collate-parser.js'; -export type { QueryCreatorWithCommonTableExpression } from './parser/with-parser.js'; diff --git a/node_modules/kysely/dist/cjs/index.js b/node_modules/kysely/dist/cjs/index.js deleted file mode 100644 index c2dc3eb..0000000 --- a/node_modules/kysely/dist/cjs/index.js +++ /dev/null @@ -1,231 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createQueryId = exports.logOnce = exports.expressionBuilder = void 0; -__exportStar(require("./kysely.js"), exports); -__exportStar(require("./query-creator.js"), exports); -__exportStar(require("./expression/expression.js"), exports); -var expression_builder_js_1 = require("./expression/expression-builder.js"); -Object.defineProperty(exports, "expressionBuilder", { enumerable: true, get: function () { return expression_builder_js_1.expressionBuilder; } }); -__exportStar(require("./expression/expression-wrapper.js"), exports); -__exportStar(require("./query-builder/where-interface.js"), exports); -__exportStar(require("./query-builder/returning-interface.js"), exports); -__exportStar(require("./query-builder/output-interface.js"), exports); -__exportStar(require("./query-builder/having-interface.js"), exports); -__exportStar(require("./query-builder/order-by-interface.js"), exports); -__exportStar(require("./query-builder/select-query-builder.js"), exports); -__exportStar(require("./query-builder/insert-query-builder.js"), exports); -__exportStar(require("./query-builder/update-query-builder.js"), exports); -__exportStar(require("./query-builder/delete-query-builder.js"), exports); -__exportStar(require("./query-builder/no-result-error.js"), exports); -__exportStar(require("./query-builder/join-builder.js"), exports); -__exportStar(require("./query-builder/function-module.js"), exports); -__exportStar(require("./query-builder/insert-result.js"), exports); -__exportStar(require("./query-builder/delete-result.js"), exports); -__exportStar(require("./query-builder/update-result.js"), exports); -__exportStar(require("./query-builder/on-conflict-builder.js"), exports); -__exportStar(require("./query-builder/aggregate-function-builder.js"), exports); -__exportStar(require("./query-builder/case-builder.js"), exports); -__exportStar(require("./query-builder/json-path-builder.js"), exports); -__exportStar(require("./query-builder/merge-query-builder.js"), exports); -__exportStar(require("./query-builder/merge-result.js"), exports); -__exportStar(require("./query-builder/order-by-item-builder.js"), exports); -__exportStar(require("./raw-builder/raw-builder.js"), exports); -__exportStar(require("./raw-builder/sql.js"), exports); -__exportStar(require("./query-executor/query-executor.js"), exports); -__exportStar(require("./query-executor/default-query-executor.js"), exports); -__exportStar(require("./query-executor/noop-query-executor.js"), exports); -__exportStar(require("./query-executor/query-executor-provider.js"), exports); -__exportStar(require("./query-compiler/default-query-compiler.js"), exports); -__exportStar(require("./query-compiler/compiled-query.js"), exports); -__exportStar(require("./schema/schema.js"), exports); -__exportStar(require("./schema/create-table-builder.js"), exports); -__exportStar(require("./schema/create-type-builder.js"), exports); -__exportStar(require("./schema/drop-table-builder.js"), exports); -__exportStar(require("./schema/drop-type-builder.js"), exports); -__exportStar(require("./schema/create-index-builder.js"), exports); -__exportStar(require("./schema/drop-index-builder.js"), exports); -__exportStar(require("./schema/create-schema-builder.js"), exports); -__exportStar(require("./schema/drop-schema-builder.js"), exports); -__exportStar(require("./schema/column-definition-builder.js"), exports); -__exportStar(require("./schema/foreign-key-constraint-builder.js"), exports); -__exportStar(require("./schema/alter-table-builder.js"), exports); -__exportStar(require("./schema/create-view-builder.js"), exports); -__exportStar(require("./schema/refresh-materialized-view-builder.js"), exports); -__exportStar(require("./schema/drop-view-builder.js"), exports); -__exportStar(require("./schema/alter-column-builder.js"), exports); -__exportStar(require("./dynamic/dynamic.js"), exports); -__exportStar(require("./dynamic/dynamic-reference-builder.js"), exports); -__exportStar(require("./dynamic/dynamic-table-builder.js"), exports); -__exportStar(require("./driver/driver.js"), exports); -__exportStar(require("./driver/database-connection.js"), exports); -__exportStar(require("./driver/connection-provider.js"), exports); -__exportStar(require("./driver/default-connection-provider.js"), exports); -__exportStar(require("./driver/single-connection-provider.js"), exports); -__exportStar(require("./driver/dummy-driver.js"), exports); -__exportStar(require("./dialect/dialect.js"), exports); -__exportStar(require("./dialect/dialect-adapter.js"), exports); -__exportStar(require("./dialect/dialect-adapter-base.js"), exports); -__exportStar(require("./dialect/database-introspector.js"), exports); -__exportStar(require("./dialect/sqlite/sqlite-dialect.js"), exports); -__exportStar(require("./dialect/sqlite/sqlite-dialect-config.js"), exports); -__exportStar(require("./dialect/sqlite/sqlite-driver.js"), exports); -__exportStar(require("./dialect/postgres/postgres-query-compiler.js"), exports); -__exportStar(require("./dialect/postgres/postgres-introspector.js"), exports); -__exportStar(require("./dialect/postgres/postgres-adapter.js"), exports); -__exportStar(require("./dialect/mysql/mysql-dialect.js"), exports); -__exportStar(require("./dialect/mysql/mysql-dialect-config.js"), exports); -__exportStar(require("./dialect/mysql/mysql-driver.js"), exports); -__exportStar(require("./dialect/mysql/mysql-query-compiler.js"), exports); -__exportStar(require("./dialect/mysql/mysql-introspector.js"), exports); -__exportStar(require("./dialect/mysql/mysql-adapter.js"), exports); -__exportStar(require("./dialect/postgres/postgres-driver.js"), exports); -__exportStar(require("./dialect/postgres/postgres-dialect-config.js"), exports); -__exportStar(require("./dialect/postgres/postgres-dialect.js"), exports); -__exportStar(require("./dialect/sqlite/sqlite-query-compiler.js"), exports); -__exportStar(require("./dialect/sqlite/sqlite-introspector.js"), exports); -__exportStar(require("./dialect/sqlite/sqlite-adapter.js"), exports); -__exportStar(require("./dialect/mssql/mssql-adapter.js"), exports); -__exportStar(require("./dialect/mssql/mssql-dialect-config.js"), exports); -__exportStar(require("./dialect/mssql/mssql-dialect.js"), exports); -__exportStar(require("./dialect/mssql/mssql-driver.js"), exports); -__exportStar(require("./dialect/mssql/mssql-introspector.js"), exports); -__exportStar(require("./dialect/mssql/mssql-query-compiler.js"), exports); -__exportStar(require("./query-compiler/default-query-compiler.js"), exports); -__exportStar(require("./query-compiler/query-compiler.js"), exports); -__exportStar(require("./migration/migrator.js"), exports); -__exportStar(require("./migration/file-migration-provider.js"), exports); -__exportStar(require("./plugin/kysely-plugin.js"), exports); -__exportStar(require("./plugin/camel-case/camel-case-plugin.js"), exports); -__exportStar(require("./plugin/deduplicate-joins/deduplicate-joins-plugin.js"), exports); -__exportStar(require("./plugin/with-schema/with-schema-plugin.js"), exports); -__exportStar(require("./plugin/parse-json-results/parse-json-results-plugin.js"), exports); -__exportStar(require("./plugin/handle-empty-in-lists/handle-empty-in-lists-plugin.js"), exports); -__exportStar(require("./plugin/handle-empty-in-lists/handle-empty-in-lists.js"), exports); -__exportStar(require("./operation-node/add-column-node.js"), exports); -__exportStar(require("./operation-node/add-constraint-node.js"), exports); -__exportStar(require("./operation-node/add-index-node.js"), exports); -__exportStar(require("./operation-node/aggregate-function-node.js"), exports); -__exportStar(require("./operation-node/alias-node.js"), exports); -__exportStar(require("./operation-node/alter-column-node.js"), exports); -__exportStar(require("./operation-node/alter-table-node.js"), exports); -__exportStar(require("./operation-node/and-node.js"), exports); -__exportStar(require("./operation-node/binary-operation-node.js"), exports); -__exportStar(require("./operation-node/case-node.js"), exports); -__exportStar(require("./operation-node/cast-node.js"), exports); -__exportStar(require("./operation-node/check-constraint-node.js"), exports); -__exportStar(require("./operation-node/collate-node.js"), exports); -__exportStar(require("./operation-node/column-definition-node.js"), exports); -__exportStar(require("./operation-node/column-node.js"), exports); -__exportStar(require("./operation-node/column-update-node.js"), exports); -__exportStar(require("./operation-node/common-table-expression-name-node.js"), exports); -__exportStar(require("./operation-node/common-table-expression-node.js"), exports); -__exportStar(require("./operation-node/constraint-node.js"), exports); -__exportStar(require("./operation-node/create-index-node.js"), exports); -__exportStar(require("./operation-node/create-schema-node.js"), exports); -__exportStar(require("./operation-node/create-table-node.js"), exports); -__exportStar(require("./operation-node/create-type-node.js"), exports); -__exportStar(require("./operation-node/create-view-node.js"), exports); -__exportStar(require("./operation-node/refresh-materialized-view-node.js"), exports); -__exportStar(require("./operation-node/data-type-node.js"), exports); -__exportStar(require("./operation-node/default-insert-value-node.js"), exports); -__exportStar(require("./operation-node/default-value-node.js"), exports); -__exportStar(require("./operation-node/delete-query-node.js"), exports); -__exportStar(require("./operation-node/drop-column-node.js"), exports); -__exportStar(require("./operation-node/drop-constraint-node.js"), exports); -__exportStar(require("./operation-node/drop-index-node.js"), exports); -__exportStar(require("./operation-node/drop-schema-node.js"), exports); -__exportStar(require("./operation-node/drop-table-node.js"), exports); -__exportStar(require("./operation-node/drop-type-node.js"), exports); -__exportStar(require("./operation-node/drop-view-node.js"), exports); -__exportStar(require("./operation-node/explain-node.js"), exports); -__exportStar(require("./operation-node/fetch-node.js"), exports); -__exportStar(require("./operation-node/foreign-key-constraint-node.js"), exports); -__exportStar(require("./operation-node/from-node.js"), exports); -__exportStar(require("./operation-node/function-node.js"), exports); -__exportStar(require("./operation-node/generated-node.js"), exports); -__exportStar(require("./operation-node/group-by-item-node.js"), exports); -__exportStar(require("./operation-node/group-by-node.js"), exports); -__exportStar(require("./operation-node/having-node.js"), exports); -__exportStar(require("./operation-node/identifier-node.js"), exports); -__exportStar(require("./operation-node/insert-query-node.js"), exports); -__exportStar(require("./operation-node/join-node.js"), exports); -__exportStar(require("./operation-node/json-operator-chain-node.js"), exports); -__exportStar(require("./operation-node/json-path-leg-node.js"), exports); -__exportStar(require("./operation-node/json-path-node.js"), exports); -__exportStar(require("./operation-node/json-reference-node.js"), exports); -__exportStar(require("./operation-node/limit-node.js"), exports); -__exportStar(require("./operation-node/list-node.js"), exports); -__exportStar(require("./operation-node/matched-node.js"), exports); -__exportStar(require("./operation-node/merge-query-node.js"), exports); -__exportStar(require("./operation-node/modify-column-node.js"), exports); -__exportStar(require("./operation-node/offset-node.js"), exports); -__exportStar(require("./operation-node/on-conflict-node.js"), exports); -__exportStar(require("./operation-node/on-duplicate-key-node.js"), exports); -__exportStar(require("./operation-node/on-node.js"), exports); -__exportStar(require("./operation-node/operation-node-source.js"), exports); -__exportStar(require("./operation-node/operation-node-transformer.js"), exports); -__exportStar(require("./operation-node/operation-node-visitor.js"), exports); -__exportStar(require("./operation-node/operation-node.js"), exports); -__exportStar(require("./operation-node/operator-node.js"), exports); -__exportStar(require("./operation-node/or-action-node.js"), exports); -__exportStar(require("./operation-node/or-node.js"), exports); -__exportStar(require("./operation-node/order-by-item-node.js"), exports); -__exportStar(require("./operation-node/order-by-node.js"), exports); -__exportStar(require("./operation-node/output-node.js"), exports); -__exportStar(require("./operation-node/over-node.js"), exports); -__exportStar(require("./operation-node/parens-node.js"), exports); -__exportStar(require("./operation-node/partition-by-item-node.js"), exports); -__exportStar(require("./operation-node/partition-by-node.js"), exports); -__exportStar(require("./operation-node/primary-key-constraint-node.js"), exports); -__exportStar(require("./operation-node/primitive-value-list-node.js"), exports); -__exportStar(require("./operation-node/query-node.js"), exports); -__exportStar(require("./operation-node/raw-node.js"), exports); -__exportStar(require("./operation-node/reference-node.js"), exports); -__exportStar(require("./operation-node/references-node.js"), exports); -__exportStar(require("./operation-node/rename-column-node.js"), exports); -__exportStar(require("./operation-node/rename-constraint-node.js"), exports); -__exportStar(require("./operation-node/returning-node.js"), exports); -__exportStar(require("./operation-node/schemable-identifier-node.js"), exports); -__exportStar(require("./operation-node/select-all-node.js"), exports); -__exportStar(require("./operation-node/select-modifier-node.js"), exports); -__exportStar(require("./operation-node/select-query-node.js"), exports); -__exportStar(require("./operation-node/selection-node.js"), exports); -__exportStar(require("./operation-node/set-operation-node.js"), exports); -__exportStar(require("./operation-node/simple-reference-expression-node.js"), exports); -__exportStar(require("./operation-node/table-node.js"), exports); -__exportStar(require("./operation-node/top-node.js"), exports); -__exportStar(require("./operation-node/tuple-node.js"), exports); -__exportStar(require("./operation-node/unary-operation-node.js"), exports); -__exportStar(require("./operation-node/unique-constraint-node.js"), exports); -__exportStar(require("./operation-node/update-query-node.js"), exports); -__exportStar(require("./operation-node/using-node.js"), exports); -__exportStar(require("./operation-node/value-list-node.js"), exports); -__exportStar(require("./operation-node/value-node.js"), exports); -__exportStar(require("./operation-node/values-node.js"), exports); -__exportStar(require("./operation-node/when-node.js"), exports); -__exportStar(require("./operation-node/where-node.js"), exports); -__exportStar(require("./operation-node/with-node.js"), exports); -__exportStar(require("./util/column-type.js"), exports); -__exportStar(require("./util/compilable.js"), exports); -__exportStar(require("./util/explainable.js"), exports); -__exportStar(require("./util/streamable.js"), exports); -__exportStar(require("./util/log.js"), exports); -__exportStar(require("./util/infer-result.js"), exports); -var log_once_js_1 = require("./util/log-once.js"); -Object.defineProperty(exports, "logOnce", { enumerable: true, get: function () { return log_once_js_1.logOnce; } }); -var query_id_js_1 = require("./util/query-id.js"); -Object.defineProperty(exports, "createQueryId", { enumerable: true, get: function () { return query_id_js_1.createQueryId; } }); diff --git a/node_modules/kysely/dist/cjs/kysely.d.ts b/node_modules/kysely/dist/cjs/kysely.d.ts deleted file mode 100644 index 5e2eb4b..0000000 --- a/node_modules/kysely/dist/cjs/kysely.d.ts +++ /dev/null @@ -1,848 +0,0 @@ -import type { Dialect } from './dialect/dialect.js'; -import { SchemaModule } from './schema/schema.js'; -import { DynamicModule } from './dynamic/dynamic.js'; -import type { QueryExecutor } from './query-executor/query-executor.js'; -import { QueryCreator } from './query-creator.js'; -import type { KyselyPlugin } from './plugin/kysely-plugin.js'; -import type { DatabaseIntrospector } from './dialect/database-introspector.js'; -import { type Driver, type IsolationLevel, type AccessMode } from './driver/driver.js'; -import { type FunctionModule } from './query-builder/function-module.js'; -import { type LogConfig } from './util/log.js'; -import type { QueryExecutorProvider } from './query-executor/query-executor-provider.js'; -import type { QueryResult } from './driver/database-connection.js'; -import type { CompiledQuery } from './query-compiler/compiled-query.js'; -import { type QueryId } from './util/query-id.js'; -import { type Compilable } from './util/compilable.js'; -import { CaseBuilder } from './query-builder/case-builder.js'; -import type { Expression } from './expression/expression.js'; -import type { DrainOuterGeneric } from './util/type-utils.js'; -import type { ReleaseSavepoint, RollbackToSavepoint } from './parser/savepoint-parser.js'; -import { type ControlledConnection } from './util/provide-controlled-connection.js'; -declare global { - interface AsyncDisposable { - } - interface SymbolConstructor { - readonly asyncDispose: unique symbol; - } -} -/** - * The main Kysely class. - * - * You should create one instance of `Kysely` per database using the {@link Kysely} - * constructor. Each `Kysely` instance maintains its own connection pool. - * - * ### Examples - * - * This example assumes your database has a "person" table: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { type Generated, Kysely, SqliteDialect } from 'kysely' - * - * interface Database { - * person: { - * id: Generated - * first_name: string - * last_name: string | null - * } - * } - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }) - * }) - * ``` - * - * @typeParam DB - The database interface type. Keys of this type must be table names - * in the database and values must be interfaces that describe the rows in those - * tables. See the examples above. - */ -export declare class Kysely extends QueryCreator implements QueryExecutorProvider, AsyncDisposable { - #private; - constructor(args: KyselyConfig); - constructor(args: KyselyProps); - /** - * Returns the {@link SchemaModule} module for building database schema. - */ - get schema(): SchemaModule; - /** - * Returns a the {@link DynamicModule} module. - * - * The {@link DynamicModule} module can be used to bypass strict typing and - * passing in dynamic values for the queries. - */ - get dynamic(): DynamicModule; - /** - * Returns a {@link DatabaseIntrospector | database introspector}. - */ - get introspection(): DatabaseIntrospector; - /** - * Creates a `case` statement/operator. - * - * See {@link ExpressionBuilder.case} for more information. - */ - case(): CaseBuilder; - case(value: Expression): CaseBuilder; - /** - * Returns a {@link FunctionModule} that can be used to write somewhat type-safe function - * calls. - * - * ```ts - * const { count } = db.fn - * - * await db.selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .select([ - * 'id', - * count('pet.id').as('person_count'), - * ]) - * .groupBy('person.id') - * .having(count('pet.id'), '>', 10) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."id", count("pet"."id") as "person_count" - * from "person" - * inner join "pet" on "pet"."owner_id" = "person"."id" - * group by "person"."id" - * having count("pet"."id") > $1 - * ``` - * - * Why "somewhat" type-safe? Because the function calls are not bound to the - * current query context. They allow you to reference columns and tables that - * are not in the current query. E.g. remove the `innerJoin` from the previous - * query and TypeScript won't even complain. - * - * If you want to make the function calls fully type-safe, you can use the - * {@link ExpressionBuilder.fn} getter for a query context-aware, stricter {@link FunctionModule}. - * - * ```ts - * await db.selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .select((eb) => [ - * 'person.id', - * eb.fn.count('pet.id').as('pet_count') - * ]) - * .groupBy('person.id') - * .having((eb) => eb.fn.count('pet.id'), '>', 10) - * .execute() - * ``` - */ - get fn(): FunctionModule; - /** - * Creates a {@link TransactionBuilder} that can be used to run queries inside a transaction. - * - * The returned {@link TransactionBuilder} can be used to configure the transaction. The - * {@link TransactionBuilder.execute} method can then be called to run the transaction. - * {@link TransactionBuilder.execute} takes a function that is run inside the - * transaction. If the function throws an exception, - * 1. the exception is caught, - * 2. the transaction is rolled back, and - * 3. the exception is thrown again. - * Otherwise the transaction is committed. - * - * The callback function passed to the {@link TransactionBuilder.execute | execute} - * method gets the transaction object as its only argument. The transaction is - * of type {@link Transaction} which inherits {@link Kysely}. Any query - * started through the transaction object is executed inside the transaction. - * - * To run a controlled transaction, allowing you to commit and rollback manually, - * use {@link startTransaction} instead. - * - * ### Examples - * - * - * - * This example inserts two rows in a transaction. If an exception is thrown inside - * the callback passed to the `execute` method, - * 1. the exception is caught, - * 2. the transaction is rolled back, and - * 3. the exception is thrown again. - * Otherwise the transaction is committed. - * - * ```ts - * const catto = await db.transaction().execute(async (trx) => { - * const jennifer = await trx.insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40, - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * - * return await trx.insertInto('pet') - * .values({ - * owner_id: jennifer.id, - * name: 'Catto', - * species: 'cat', - * is_favorite: false, - * }) - * .returningAll() - * .executeTakeFirst() - * }) - * ``` - * - * Setting the isolation level: - * - * ```ts - * import type { Kysely } from 'kysely' - * - * await db - * .transaction() - * .setIsolationLevel('serializable') - * .execute(async (trx) => { - * await doStuff(trx) - * }) - * - * async function doStuff(kysely: typeof db) { - * // ... - * } - * ``` - */ - transaction(): TransactionBuilder; - /** - * Creates a {@link ControlledTransactionBuilder} that can be used to run queries inside a controlled transaction. - * - * The returned {@link ControlledTransactionBuilder} can be used to configure the transaction. - * The {@link ControlledTransactionBuilder.execute} method can then be called - * to start the transaction and return a {@link ControlledTransaction}. - * - * A {@link ControlledTransaction} allows you to commit and rollback manually, - * execute savepoint commands. It extends {@link Transaction} which extends {@link Kysely}, - * so you can run queries inside the transaction. Once the transaction is committed, - * or rolled back, it can't be used anymore - all queries will throw an error. - * This is to prevent accidentally running queries outside the transaction - where - * atomicity is not guaranteed anymore. - * - * ### Examples - * - * - * - * A controlled transaction allows you to commit and rollback manually, execute - * savepoint commands, and queries in general. - * - * In this example we start a transaction, use it to insert two rows and then commit - * the transaction. If an error is thrown, we catch it and rollback the transaction. - * - * ```ts - * const trx = await db.startTransaction().execute() - * - * try { - * const jennifer = await trx.insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40, - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * - * const catto = await trx.insertInto('pet') - * .values({ - * owner_id: jennifer.id, - * name: 'Catto', - * species: 'cat', - * is_favorite: false, - * }) - * .returningAll() - * .executeTakeFirstOrThrow() - * - * await trx.commit().execute() - * - * // ... - * } catch (error) { - * await trx.rollback().execute() - * } - * ``` - * - * - * - * A controlled transaction allows you to commit and rollback manually, execute - * savepoint commands, and queries in general. - * - * In this example we start a transaction, insert a person, create a savepoint, - * try inserting a toy and a pet, and if an error is thrown, we rollback to the - * savepoint. Eventually we release the savepoint, insert an audit record and - * commit the transaction. If an error is thrown, we catch it and rollback the - * transaction. - * - * ```ts - * const trx = await db.startTransaction().execute() - * - * try { - * const jennifer = await trx - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40, - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * - * const trxAfterJennifer = await trx.savepoint('after_jennifer').execute() - * - * try { - * const catto = await trxAfterJennifer - * .insertInto('pet') - * .values({ - * owner_id: jennifer.id, - * name: 'Catto', - * species: 'cat', - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * - * await trxAfterJennifer - * .insertInto('toy') - * .values({ name: 'Bone', price: 1.99, pet_id: catto.id }) - * .execute() - * } catch (error) { - * await trxAfterJennifer.rollbackToSavepoint('after_jennifer').execute() - * } - * - * await trxAfterJennifer.releaseSavepoint('after_jennifer').execute() - * - * await trx.insertInto('audit').values({ action: 'added Jennifer' }).execute() - * - * await trx.commit().execute() - * } catch (error) { - * await trx.rollback().execute() - * } - * ``` - */ - startTransaction(): ControlledTransactionBuilder; - /** - * Provides a kysely instance bound to a single database connection. - * - * ### Examples - * - * ```ts - * await db - * .connection() - * .execute(async (db) => { - * // `db` is an instance of `Kysely` that's bound to a single - * // database connection. All queries executed through `db` use - * // the same connection. - * await doStuff(db) - * }) - * - * async function doStuff(kysely: typeof db) { - * // ... - * } - * ``` - */ - connection(): ConnectionBuilder; - /** - * Returns a copy of this Kysely instance with the given plugin installed. - */ - withPlugin(plugin: KyselyPlugin): Kysely; - /** - * Returns a copy of this Kysely instance without any plugins. - */ - withoutPlugins(): Kysely; - /** - * @override - */ - withSchema(schema: string): Kysely; - /** - * Returns a copy of this Kysely instance with tables added to its - * database type. - * - * This method only modifies the types and doesn't affect any of the - * executed queries in any way. - * - * ### Examples - * - * The following example adds and uses a temporary table: - * - * ```ts - * await db.schema - * .createTable('temp_table') - * .temporary() - * .addColumn('some_column', 'integer') - * .execute() - * - * const tempDb = db.withTables<{ - * temp_table: { - * some_column: number - * } - * }>() - * - * await tempDb - * .insertInto('temp_table') - * .values({ some_column: 100 }) - * .execute() - * ``` - */ - withTables>>(): Kysely>; - /** - * Releases all resources and disconnects from the database. - * - * You need to call this when you are done using the `Kysely` instance. - */ - destroy(): Promise; - /** - * Returns true if this `Kysely` instance is a transaction. - * - * You can also use `db instanceof Transaction`. - */ - get isTransaction(): boolean; - /** - * @internal - * @private - */ - getExecutor(): QueryExecutor; - /** - * Executes a given compiled query or query builder. - * - * See {@link https://github.com/kysely-org/kysely/blob/master/site/docs/recipes/0004-splitting-query-building-and-execution.md#execute-compiled-queries splitting build, compile and execute code recipe} for more information. - */ - executeQuery(query: CompiledQuery | Compilable, queryId?: QueryId): Promise>; - [Symbol.asyncDispose](): Promise; -} -export declare class Transaction extends Kysely { - #private; - constructor(props: KyselyProps); - /** - * Returns true if this `Kysely` instance is a transaction. - * - * You can also use `db instanceof Transaction`. - */ - get isTransaction(): true; - /** - * Creates a {@link TransactionBuilder} that can be used to run queries inside a transaction. - * - * The returned {@link TransactionBuilder} can be used to configure the transaction. The - * {@link TransactionBuilder.execute} method can then be called to run the transaction. - * {@link TransactionBuilder.execute} takes a function that is run inside the - * transaction. If the function throws an exception, - * 1. the exception is caught, - * 2. the transaction is rolled back, and - * 3. the exception is thrown again. - * Otherwise the transaction is committed. - * - * The callback function passed to the {@link TransactionBuilder.execute | execute} - * method gets the transaction object as its only argument. The transaction is - * of type {@link Transaction} which inherits {@link Kysely}. Any query - * started through the transaction object is executed inside the transaction. - * - * To run a controlled transaction, allowing you to commit and rollback manually, - * use {@link startTransaction} instead. - * - * ### Examples - * - * - * - * This example inserts two rows in a transaction. If an exception is thrown inside - * the callback passed to the `execute` method, - * 1. the exception is caught, - * 2. the transaction is rolled back, and - * 3. the exception is thrown again. - * Otherwise the transaction is committed. - * - * ```ts - * const catto = await db.transaction().execute(async (trx) => { - * const jennifer = await trx.insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40, - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * - * return await trx.insertInto('pet') - * .values({ - * owner_id: jennifer.id, - * name: 'Catto', - * species: 'cat', - * is_favorite: false, - * }) - * .returningAll() - * .executeTakeFirst() - * }) - * ``` - * - * Setting the isolation level: - * - * ```ts - * import type { Kysely } from 'kysely' - * - * await db - * .transaction() - * .setIsolationLevel('serializable') - * .execute(async (trx) => { - * await doStuff(trx) - * }) - * - * async function doStuff(kysely: typeof db) { - * // ... - * } - * ``` - */ - transaction(): TransactionBuilder; - /** - * Provides a kysely instance bound to a single database connection. - * - * ### Examples - * - * ```ts - * await db - * .connection() - * .execute(async (db) => { - * // `db` is an instance of `Kysely` that's bound to a single - * // database connection. All queries executed through `db` use - * // the same connection. - * await doStuff(db) - * }) - * - * async function doStuff(kysely: typeof db) { - * // ... - * } - * ``` - */ - connection(): ConnectionBuilder; - /** - * Releases all resources and disconnects from the database. - * - * You need to call this when you are done using the `Kysely` instance. - */ - destroy(): Promise; - /** - * Returns a copy of this Kysely instance with the given plugin installed. - */ - withPlugin(plugin: KyselyPlugin): Transaction; - /** - * Returns a copy of this Kysely instance without any plugins. - */ - withoutPlugins(): Transaction; - /** - * @override - */ - withSchema(schema: string): Transaction; - /** - * Returns a copy of this Kysely instance with tables added to its - * database type. - * - * This method only modifies the types and doesn't affect any of the - * executed queries in any way. - * - * ### Examples - * - * The following example adds and uses a temporary table: - * - * ```ts - * await db.schema - * .createTable('temp_table') - * .temporary() - * .addColumn('some_column', 'integer') - * .execute() - * - * const tempDb = db.withTables<{ - * temp_table: { - * some_column: number - * } - * }>() - * - * await tempDb - * .insertInto('temp_table') - * .values({ some_column: 100 }) - * .execute() - * ``` - */ - withTables>>(): Transaction>; -} -export interface KyselyProps { - readonly config: KyselyConfig; - readonly driver: Driver; - readonly executor: QueryExecutor; - readonly dialect: Dialect; -} -export declare function isKyselyProps(obj: unknown): obj is KyselyProps; -export interface KyselyConfig { - readonly dialect: Dialect; - readonly plugins?: KyselyPlugin[]; - /** - * A list of log levels to log or a custom logger function. - * - * Currently there's only two levels: `query` and `error`. - * This will be expanded based on user feedback later. - * - * ### Examples - * - * Setting up built-in logging for preferred log levels: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { Kysely, SqliteDialect } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }), - * log: ['query', 'error'] - * }) - * ``` - * - * Setting up custom logging: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { Kysely, SqliteDialect } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }), - * log(event): void { - * if (event.level === 'query') { - * console.log(event.query.sql) - * console.log(event.query.parameters) - * } - * } - * }) - * ``` - */ - readonly log?: LogConfig; -} -export declare class ConnectionBuilder { - #private; - constructor(props: ConnectionBuilderProps); - execute(callback: (db: Kysely) => Promise): Promise; -} -interface ConnectionBuilderProps extends KyselyProps { -} -export declare class TransactionBuilder { - #private; - constructor(props: TransactionBuilderProps); - setAccessMode(accessMode: AccessMode): TransactionBuilder; - setIsolationLevel(isolationLevel: IsolationLevel): TransactionBuilder; - execute(callback: (trx: Transaction) => Promise): Promise; -} -interface TransactionBuilderProps extends KyselyProps { - readonly accessMode?: AccessMode; - readonly isolationLevel?: IsolationLevel; -} -export declare class ControlledTransactionBuilder { - #private; - constructor(props: TransactionBuilderProps); - setAccessMode(accessMode: AccessMode): ControlledTransactionBuilder; - setIsolationLevel(isolationLevel: IsolationLevel): ControlledTransactionBuilder; - execute(): Promise>; -} -export declare class ControlledTransaction extends Transaction { - #private; - constructor(props: ControlledTransactionProps); - get isCommitted(): boolean; - get isRolledBack(): boolean; - /** - * Commits the transaction. - * - * See {@link rollback}. - * - * ### Examples - * - * ```ts - * import type { Kysely } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const trx = await db.startTransaction().execute() - * - * try { - * await doSomething(trx) - * - * await trx.commit().execute() - * } catch (error) { - * await trx.rollback().execute() - * } - * - * async function doSomething(kysely: Kysely) {} - * ``` - */ - commit(): Command; - /** - * Rolls back the transaction. - * - * See {@link commit} and {@link rollbackToSavepoint}. - * - * ### Examples - * - * ```ts - * import type { Kysely } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const trx = await db.startTransaction().execute() - * - * try { - * await doSomething(trx) - * - * await trx.commit().execute() - * } catch (error) { - * await trx.rollback().execute() - * } - * - * async function doSomething(kysely: Kysely) {} - * ``` - */ - rollback(): Command; - /** - * Creates a savepoint with a given name. - * - * See {@link rollbackToSavepoint} and {@link releaseSavepoint}. - * - * For a type-safe experience, you should use the returned instance from now on. - * - * ### Examples - * - * ```ts - * import type { Kysely } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const trx = await db.startTransaction().execute() - * - * await insertJennifer(trx) - * - * const trxAfterJennifer = await trx.savepoint('after_jennifer').execute() - * - * try { - * await doSomething(trxAfterJennifer) - * } catch (error) { - * await trxAfterJennifer.rollbackToSavepoint('after_jennifer').execute() - * } - * - * async function insertJennifer(kysely: Kysely) {} - * async function doSomething(kysely: Kysely) {} - * ``` - */ - savepoint(savepointName: SN extends S ? never : SN): Command>; - /** - * Rolls back to a savepoint with a given name. - * - * See {@link savepoint} and {@link releaseSavepoint}. - * - * You must use the same instance returned by {@link savepoint}, or - * escape the type-check by using `as any`. - * - * ### Examples - * - * ```ts - * import type { Kysely } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const trx = await db.startTransaction().execute() - * - * await insertJennifer(trx) - * - * const trxAfterJennifer = await trx.savepoint('after_jennifer').execute() - * - * try { - * await doSomething(trxAfterJennifer) - * } catch (error) { - * await trxAfterJennifer.rollbackToSavepoint('after_jennifer').execute() - * } - * - * async function insertJennifer(kysely: Kysely) {} - * async function doSomething(kysely: Kysely) {} - * ``` - */ - rollbackToSavepoint(savepointName: SN): RollbackToSavepoint extends string[] ? Command>> : never; - /** - * Releases a savepoint with a given name. - * - * See {@link savepoint} and {@link rollbackToSavepoint}. - * - * You must use the same instance returned by {@link savepoint}, or - * escape the type-check by using `as any`. - * - * ### Examples - * - * ```ts - * import type { Kysely } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const trx = await db.startTransaction().execute() - * - * await insertJennifer(trx) - * - * const trxAfterJennifer = await trx.savepoint('after_jennifer').execute() - * - * try { - * await doSomething(trxAfterJennifer) - * } catch (error) { - * await trxAfterJennifer.rollbackToSavepoint('after_jennifer').execute() - * } - * - * await trxAfterJennifer.releaseSavepoint('after_jennifer').execute() - * - * await doSomethingElse(trx) - * - * async function insertJennifer(kysely: Kysely) {} - * async function doSomething(kysely: Kysely) {} - * async function doSomethingElse(kysely: Kysely) {} - * ``` - */ - releaseSavepoint(savepointName: SN): ReleaseSavepoint extends string[] ? Command>> : never; - /** - * Returns a copy of this Kysely instance with the given plugin installed. - */ - withPlugin(plugin: KyselyPlugin): ControlledTransaction; - /** - * Returns a copy of this Kysely instance without any plugins. - */ - withoutPlugins(): ControlledTransaction; - /** - * @override - */ - withSchema(schema: string): ControlledTransaction; - /** - * Returns a copy of this Kysely instance with tables added to its - * database type. - * - * This method only modifies the types and doesn't affect any of the - * executed queries in any way. - * - * ### Examples - * - * The following example adds and uses a temporary table: - * - * ```ts - * await db.schema - * .createTable('temp_table') - * .temporary() - * .addColumn('some_column', 'integer') - * .execute() - * - * const tempDb = db.withTables<{ - * temp_table: { - * some_column: number - * } - * }>() - * - * await tempDb - * .insertInto('temp_table') - * .values({ some_column: 100 }) - * .execute() - * ``` - */ - withTables>>(): ControlledTransaction, S>; -} -interface ControlledTransactionProps extends KyselyProps { - readonly connection: ControlledConnection; -} -export declare class Command { - #private; - constructor(cb: () => Promise); - /** - * Executes the command. - */ - execute(): Promise; -} -export {}; diff --git a/node_modules/kysely/dist/cjs/kysely.js b/node_modules/kysely/dist/cjs/kysely.js deleted file mode 100644 index becc6c3..0000000 --- a/node_modules/kysely/dist/cjs/kysely.js +++ /dev/null @@ -1,927 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Command = exports.ControlledTransaction = exports.ControlledTransactionBuilder = exports.TransactionBuilder = exports.ConnectionBuilder = exports.Transaction = exports.Kysely = void 0; -exports.isKyselyProps = isKyselyProps; -const schema_js_1 = require("./schema/schema.js"); -const dynamic_js_1 = require("./dynamic/dynamic.js"); -const default_connection_provider_js_1 = require("./driver/default-connection-provider.js"); -const query_creator_js_1 = require("./query-creator.js"); -const default_query_executor_js_1 = require("./query-executor/default-query-executor.js"); -const object_utils_js_1 = require("./util/object-utils.js"); -const runtime_driver_js_1 = require("./driver/runtime-driver.js"); -const single_connection_provider_js_1 = require("./driver/single-connection-provider.js"); -const driver_js_1 = require("./driver/driver.js"); -const function_module_js_1 = require("./query-builder/function-module.js"); -const log_js_1 = require("./util/log.js"); -const query_id_js_1 = require("./util/query-id.js"); -const compilable_js_1 = require("./util/compilable.js"); -const case_builder_js_1 = require("./query-builder/case-builder.js"); -const case_node_js_1 = require("./operation-node/case-node.js"); -const expression_parser_js_1 = require("./parser/expression-parser.js"); -const with_schema_plugin_js_1 = require("./plugin/with-schema/with-schema-plugin.js"); -const provide_controlled_connection_js_1 = require("./util/provide-controlled-connection.js"); -const log_once_js_1 = require("./util/log-once.js"); -// @ts-ignore -Symbol.asyncDispose ??= Symbol('Symbol.asyncDispose'); -/** - * The main Kysely class. - * - * You should create one instance of `Kysely` per database using the {@link Kysely} - * constructor. Each `Kysely` instance maintains its own connection pool. - * - * ### Examples - * - * This example assumes your database has a "person" table: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { type Generated, Kysely, SqliteDialect } from 'kysely' - * - * interface Database { - * person: { - * id: Generated - * first_name: string - * last_name: string | null - * } - * } - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }) - * }) - * ``` - * - * @typeParam DB - The database interface type. Keys of this type must be table names - * in the database and values must be interfaces that describe the rows in those - * tables. See the examples above. - */ -class Kysely extends query_creator_js_1.QueryCreator { - #props; - constructor(args) { - let superProps; - let props; - if (isKyselyProps(args)) { - superProps = { executor: args.executor }; - props = { ...args }; - } - else { - const dialect = args.dialect; - const driver = dialect.createDriver(); - const compiler = dialect.createQueryCompiler(); - const adapter = dialect.createAdapter(); - const log = new log_js_1.Log(args.log ?? []); - const runtimeDriver = new runtime_driver_js_1.RuntimeDriver(driver, log); - const connectionProvider = new default_connection_provider_js_1.DefaultConnectionProvider(runtimeDriver); - const executor = new default_query_executor_js_1.DefaultQueryExecutor(compiler, adapter, connectionProvider, args.plugins ?? []); - superProps = { executor }; - props = { - config: args, - executor, - dialect, - driver: runtimeDriver, - }; - } - super(superProps); - this.#props = (0, object_utils_js_1.freeze)(props); - } - /** - * Returns the {@link SchemaModule} module for building database schema. - */ - get schema() { - return new schema_js_1.SchemaModule(this.#props.executor); - } - /** - * Returns a the {@link DynamicModule} module. - * - * The {@link DynamicModule} module can be used to bypass strict typing and - * passing in dynamic values for the queries. - */ - get dynamic() { - return new dynamic_js_1.DynamicModule(); - } - /** - * Returns a {@link DatabaseIntrospector | database introspector}. - */ - get introspection() { - return this.#props.dialect.createIntrospector(this.withoutPlugins()); - } - case(value) { - return new case_builder_js_1.CaseBuilder({ - node: case_node_js_1.CaseNode.create((0, object_utils_js_1.isUndefined)(value) ? undefined : (0, expression_parser_js_1.parseExpression)(value)), - }); - } - /** - * Returns a {@link FunctionModule} that can be used to write somewhat type-safe function - * calls. - * - * ```ts - * const { count } = db.fn - * - * await db.selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .select([ - * 'id', - * count('pet.id').as('person_count'), - * ]) - * .groupBy('person.id') - * .having(count('pet.id'), '>', 10) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."id", count("pet"."id") as "person_count" - * from "person" - * inner join "pet" on "pet"."owner_id" = "person"."id" - * group by "person"."id" - * having count("pet"."id") > $1 - * ``` - * - * Why "somewhat" type-safe? Because the function calls are not bound to the - * current query context. They allow you to reference columns and tables that - * are not in the current query. E.g. remove the `innerJoin` from the previous - * query and TypeScript won't even complain. - * - * If you want to make the function calls fully type-safe, you can use the - * {@link ExpressionBuilder.fn} getter for a query context-aware, stricter {@link FunctionModule}. - * - * ```ts - * await db.selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .select((eb) => [ - * 'person.id', - * eb.fn.count('pet.id').as('pet_count') - * ]) - * .groupBy('person.id') - * .having((eb) => eb.fn.count('pet.id'), '>', 10) - * .execute() - * ``` - */ - get fn() { - return (0, function_module_js_1.createFunctionModule)(); - } - /** - * Creates a {@link TransactionBuilder} that can be used to run queries inside a transaction. - * - * The returned {@link TransactionBuilder} can be used to configure the transaction. The - * {@link TransactionBuilder.execute} method can then be called to run the transaction. - * {@link TransactionBuilder.execute} takes a function that is run inside the - * transaction. If the function throws an exception, - * 1. the exception is caught, - * 2. the transaction is rolled back, and - * 3. the exception is thrown again. - * Otherwise the transaction is committed. - * - * The callback function passed to the {@link TransactionBuilder.execute | execute} - * method gets the transaction object as its only argument. The transaction is - * of type {@link Transaction} which inherits {@link Kysely}. Any query - * started through the transaction object is executed inside the transaction. - * - * To run a controlled transaction, allowing you to commit and rollback manually, - * use {@link startTransaction} instead. - * - * ### Examples - * - * - * - * This example inserts two rows in a transaction. If an exception is thrown inside - * the callback passed to the `execute` method, - * 1. the exception is caught, - * 2. the transaction is rolled back, and - * 3. the exception is thrown again. - * Otherwise the transaction is committed. - * - * ```ts - * const catto = await db.transaction().execute(async (trx) => { - * const jennifer = await trx.insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40, - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * - * return await trx.insertInto('pet') - * .values({ - * owner_id: jennifer.id, - * name: 'Catto', - * species: 'cat', - * is_favorite: false, - * }) - * .returningAll() - * .executeTakeFirst() - * }) - * ``` - * - * Setting the isolation level: - * - * ```ts - * import type { Kysely } from 'kysely' - * - * await db - * .transaction() - * .setIsolationLevel('serializable') - * .execute(async (trx) => { - * await doStuff(trx) - * }) - * - * async function doStuff(kysely: typeof db) { - * // ... - * } - * ``` - */ - transaction() { - return new TransactionBuilder({ ...this.#props }); - } - /** - * Creates a {@link ControlledTransactionBuilder} that can be used to run queries inside a controlled transaction. - * - * The returned {@link ControlledTransactionBuilder} can be used to configure the transaction. - * The {@link ControlledTransactionBuilder.execute} method can then be called - * to start the transaction and return a {@link ControlledTransaction}. - * - * A {@link ControlledTransaction} allows you to commit and rollback manually, - * execute savepoint commands. It extends {@link Transaction} which extends {@link Kysely}, - * so you can run queries inside the transaction. Once the transaction is committed, - * or rolled back, it can't be used anymore - all queries will throw an error. - * This is to prevent accidentally running queries outside the transaction - where - * atomicity is not guaranteed anymore. - * - * ### Examples - * - * - * - * A controlled transaction allows you to commit and rollback manually, execute - * savepoint commands, and queries in general. - * - * In this example we start a transaction, use it to insert two rows and then commit - * the transaction. If an error is thrown, we catch it and rollback the transaction. - * - * ```ts - * const trx = await db.startTransaction().execute() - * - * try { - * const jennifer = await trx.insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40, - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * - * const catto = await trx.insertInto('pet') - * .values({ - * owner_id: jennifer.id, - * name: 'Catto', - * species: 'cat', - * is_favorite: false, - * }) - * .returningAll() - * .executeTakeFirstOrThrow() - * - * await trx.commit().execute() - * - * // ... - * } catch (error) { - * await trx.rollback().execute() - * } - * ``` - * - * - * - * A controlled transaction allows you to commit and rollback manually, execute - * savepoint commands, and queries in general. - * - * In this example we start a transaction, insert a person, create a savepoint, - * try inserting a toy and a pet, and if an error is thrown, we rollback to the - * savepoint. Eventually we release the savepoint, insert an audit record and - * commit the transaction. If an error is thrown, we catch it and rollback the - * transaction. - * - * ```ts - * const trx = await db.startTransaction().execute() - * - * try { - * const jennifer = await trx - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40, - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * - * const trxAfterJennifer = await trx.savepoint('after_jennifer').execute() - * - * try { - * const catto = await trxAfterJennifer - * .insertInto('pet') - * .values({ - * owner_id: jennifer.id, - * name: 'Catto', - * species: 'cat', - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * - * await trxAfterJennifer - * .insertInto('toy') - * .values({ name: 'Bone', price: 1.99, pet_id: catto.id }) - * .execute() - * } catch (error) { - * await trxAfterJennifer.rollbackToSavepoint('after_jennifer').execute() - * } - * - * await trxAfterJennifer.releaseSavepoint('after_jennifer').execute() - * - * await trx.insertInto('audit').values({ action: 'added Jennifer' }).execute() - * - * await trx.commit().execute() - * } catch (error) { - * await trx.rollback().execute() - * } - * ``` - */ - startTransaction() { - return new ControlledTransactionBuilder({ ...this.#props }); - } - /** - * Provides a kysely instance bound to a single database connection. - * - * ### Examples - * - * ```ts - * await db - * .connection() - * .execute(async (db) => { - * // `db` is an instance of `Kysely` that's bound to a single - * // database connection. All queries executed through `db` use - * // the same connection. - * await doStuff(db) - * }) - * - * async function doStuff(kysely: typeof db) { - * // ... - * } - * ``` - */ - connection() { - return new ConnectionBuilder({ ...this.#props }); - } - /** - * Returns a copy of this Kysely instance with the given plugin installed. - */ - withPlugin(plugin) { - return new Kysely({ - ...this.#props, - executor: this.#props.executor.withPlugin(plugin), - }); - } - /** - * Returns a copy of this Kysely instance without any plugins. - */ - withoutPlugins() { - return new Kysely({ - ...this.#props, - executor: this.#props.executor.withoutPlugins(), - }); - } - /** - * @override - */ - withSchema(schema) { - return new Kysely({ - ...this.#props, - executor: this.#props.executor.withPluginAtFront(new with_schema_plugin_js_1.WithSchemaPlugin(schema)), - }); - } - /** - * Returns a copy of this Kysely instance with tables added to its - * database type. - * - * This method only modifies the types and doesn't affect any of the - * executed queries in any way. - * - * ### Examples - * - * The following example adds and uses a temporary table: - * - * ```ts - * await db.schema - * .createTable('temp_table') - * .temporary() - * .addColumn('some_column', 'integer') - * .execute() - * - * const tempDb = db.withTables<{ - * temp_table: { - * some_column: number - * } - * }>() - * - * await tempDb - * .insertInto('temp_table') - * .values({ some_column: 100 }) - * .execute() - * ``` - */ - withTables() { - return new Kysely({ ...this.#props }); - } - /** - * Releases all resources and disconnects from the database. - * - * You need to call this when you are done using the `Kysely` instance. - */ - async destroy() { - await this.#props.driver.destroy(); - } - /** - * Returns true if this `Kysely` instance is a transaction. - * - * You can also use `db instanceof Transaction`. - */ - get isTransaction() { - return false; - } - /** - * @internal - * @private - */ - getExecutor() { - return this.#props.executor; - } - /** - * Executes a given compiled query or query builder. - * - * See {@link https://github.com/kysely-org/kysely/blob/master/site/docs/recipes/0004-splitting-query-building-and-execution.md#execute-compiled-queries splitting build, compile and execute code recipe} for more information. - */ - executeQuery(query, - // TODO: remove this in the future. deprecated in 0.28.x - queryId) { - if (queryId !== undefined) { - (0, log_once_js_1.logOnce)('Passing `queryId` in `db.executeQuery` is deprecated and will result in a compile-time error in the future.'); - } - const compiledQuery = (0, compilable_js_1.isCompilable)(query) ? query.compile() : query; - return this.getExecutor().executeQuery(compiledQuery); - } - async [Symbol.asyncDispose]() { - await this.destroy(); - } -} -exports.Kysely = Kysely; -class Transaction extends Kysely { - #props; - constructor(props) { - super(props); - this.#props = props; - } - // The return type is `true` instead of `boolean` to make Kysely - // unassignable to Transaction while allowing assignment the - // other way around. - get isTransaction() { - return true; - } - transaction() { - throw new Error('calling the transaction method for a Transaction is not supported'); - } - connection() { - throw new Error('calling the connection method for a Transaction is not supported'); - } - async destroy() { - throw new Error('calling the destroy method for a Transaction is not supported'); - } - withPlugin(plugin) { - return new Transaction({ - ...this.#props, - executor: this.#props.executor.withPlugin(plugin), - }); - } - withoutPlugins() { - return new Transaction({ - ...this.#props, - executor: this.#props.executor.withoutPlugins(), - }); - } - withSchema(schema) { - return new Transaction({ - ...this.#props, - executor: this.#props.executor.withPluginAtFront(new with_schema_plugin_js_1.WithSchemaPlugin(schema)), - }); - } - withTables() { - return new Transaction({ ...this.#props }); - } -} -exports.Transaction = Transaction; -function isKyselyProps(obj) { - return ((0, object_utils_js_1.isObject)(obj) && - (0, object_utils_js_1.isObject)(obj.config) && - (0, object_utils_js_1.isObject)(obj.driver) && - (0, object_utils_js_1.isObject)(obj.executor) && - (0, object_utils_js_1.isObject)(obj.dialect)); -} -class ConnectionBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - async execute(callback) { - return this.#props.executor.provideConnection(async (connection) => { - const executor = this.#props.executor.withConnectionProvider(new single_connection_provider_js_1.SingleConnectionProvider(connection)); - const db = new Kysely({ - ...this.#props, - executor, - }); - return await callback(db); - }); - } -} -exports.ConnectionBuilder = ConnectionBuilder; -class TransactionBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - setAccessMode(accessMode) { - return new TransactionBuilder({ - ...this.#props, - accessMode, - }); - } - setIsolationLevel(isolationLevel) { - return new TransactionBuilder({ - ...this.#props, - isolationLevel, - }); - } - async execute(callback) { - const { isolationLevel, accessMode, ...kyselyProps } = this.#props; - const settings = { isolationLevel, accessMode }; - (0, driver_js_1.validateTransactionSettings)(settings); - return this.#props.executor.provideConnection(async (connection) => { - const state = { isCommitted: false, isRolledBack: false }; - const executor = new NotCommittedOrRolledBackAssertingExecutor(this.#props.executor.withConnectionProvider(new single_connection_provider_js_1.SingleConnectionProvider(connection)), state); - const transaction = new Transaction({ - ...kyselyProps, - executor, - }); - let transactionBegun = false; - try { - await this.#props.driver.beginTransaction(connection, settings); - transactionBegun = true; - const result = await callback(transaction); - await this.#props.driver.commitTransaction(connection); - state.isCommitted = true; - return result; - } - catch (error) { - if (transactionBegun) { - await this.#props.driver.rollbackTransaction(connection); - state.isRolledBack = true; - } - throw error; - } - }); - } -} -exports.TransactionBuilder = TransactionBuilder; -class ControlledTransactionBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - setAccessMode(accessMode) { - return new ControlledTransactionBuilder({ - ...this.#props, - accessMode, - }); - } - setIsolationLevel(isolationLevel) { - return new ControlledTransactionBuilder({ - ...this.#props, - isolationLevel, - }); - } - async execute() { - const { isolationLevel, accessMode, ...props } = this.#props; - const settings = { isolationLevel, accessMode }; - (0, driver_js_1.validateTransactionSettings)(settings); - const connection = await (0, provide_controlled_connection_js_1.provideControlledConnection)(this.#props.executor); - await this.#props.driver.beginTransaction(connection.connection, settings); - return new ControlledTransaction({ - ...props, - connection, - executor: this.#props.executor.withConnectionProvider(new single_connection_provider_js_1.SingleConnectionProvider(connection.connection)), - }); - } -} -exports.ControlledTransactionBuilder = ControlledTransactionBuilder; -class ControlledTransaction extends Transaction { - #props; - #compileQuery; - #state; - constructor(props) { - const state = { isCommitted: false, isRolledBack: false }; - props = { - ...props, - executor: new NotCommittedOrRolledBackAssertingExecutor(props.executor, state), - }; - const { connection, ...transactionProps } = props; - super(transactionProps); - this.#props = (0, object_utils_js_1.freeze)(props); - this.#state = state; - const queryId = (0, query_id_js_1.createQueryId)(); - this.#compileQuery = (node) => props.executor.compileQuery(node, queryId); - } - get isCommitted() { - return this.#state.isCommitted; - } - get isRolledBack() { - return this.#state.isRolledBack; - } - /** - * Commits the transaction. - * - * See {@link rollback}. - * - * ### Examples - * - * ```ts - * import type { Kysely } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const trx = await db.startTransaction().execute() - * - * try { - * await doSomething(trx) - * - * await trx.commit().execute() - * } catch (error) { - * await trx.rollback().execute() - * } - * - * async function doSomething(kysely: Kysely) {} - * ``` - */ - commit() { - assertNotCommittedOrRolledBack(this.#state); - return new Command(async () => { - await this.#props.driver.commitTransaction(this.#props.connection.connection); - this.#state.isCommitted = true; - this.#props.connection.release(); - }); - } - /** - * Rolls back the transaction. - * - * See {@link commit} and {@link rollbackToSavepoint}. - * - * ### Examples - * - * ```ts - * import type { Kysely } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const trx = await db.startTransaction().execute() - * - * try { - * await doSomething(trx) - * - * await trx.commit().execute() - * } catch (error) { - * await trx.rollback().execute() - * } - * - * async function doSomething(kysely: Kysely) {} - * ``` - */ - rollback() { - assertNotCommittedOrRolledBack(this.#state); - return new Command(async () => { - await this.#props.driver.rollbackTransaction(this.#props.connection.connection); - this.#state.isRolledBack = true; - this.#props.connection.release(); - }); - } - /** - * Creates a savepoint with a given name. - * - * See {@link rollbackToSavepoint} and {@link releaseSavepoint}. - * - * For a type-safe experience, you should use the returned instance from now on. - * - * ### Examples - * - * ```ts - * import type { Kysely } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const trx = await db.startTransaction().execute() - * - * await insertJennifer(trx) - * - * const trxAfterJennifer = await trx.savepoint('after_jennifer').execute() - * - * try { - * await doSomething(trxAfterJennifer) - * } catch (error) { - * await trxAfterJennifer.rollbackToSavepoint('after_jennifer').execute() - * } - * - * async function insertJennifer(kysely: Kysely) {} - * async function doSomething(kysely: Kysely) {} - * ``` - */ - savepoint(savepointName) { - assertNotCommittedOrRolledBack(this.#state); - return new Command(async () => { - await this.#props.driver.savepoint?.(this.#props.connection.connection, savepointName, this.#compileQuery); - return new ControlledTransaction({ ...this.#props }); - }); - } - /** - * Rolls back to a savepoint with a given name. - * - * See {@link savepoint} and {@link releaseSavepoint}. - * - * You must use the same instance returned by {@link savepoint}, or - * escape the type-check by using `as any`. - * - * ### Examples - * - * ```ts - * import type { Kysely } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const trx = await db.startTransaction().execute() - * - * await insertJennifer(trx) - * - * const trxAfterJennifer = await trx.savepoint('after_jennifer').execute() - * - * try { - * await doSomething(trxAfterJennifer) - * } catch (error) { - * await trxAfterJennifer.rollbackToSavepoint('after_jennifer').execute() - * } - * - * async function insertJennifer(kysely: Kysely) {} - * async function doSomething(kysely: Kysely) {} - * ``` - */ - rollbackToSavepoint(savepointName) { - assertNotCommittedOrRolledBack(this.#state); - return new Command(async () => { - await this.#props.driver.rollbackToSavepoint?.(this.#props.connection.connection, savepointName, this.#compileQuery); - return new ControlledTransaction({ ...this.#props }); - }); - } - /** - * Releases a savepoint with a given name. - * - * See {@link savepoint} and {@link rollbackToSavepoint}. - * - * You must use the same instance returned by {@link savepoint}, or - * escape the type-check by using `as any`. - * - * ### Examples - * - * ```ts - * import type { Kysely } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const trx = await db.startTransaction().execute() - * - * await insertJennifer(trx) - * - * const trxAfterJennifer = await trx.savepoint('after_jennifer').execute() - * - * try { - * await doSomething(trxAfterJennifer) - * } catch (error) { - * await trxAfterJennifer.rollbackToSavepoint('after_jennifer').execute() - * } - * - * await trxAfterJennifer.releaseSavepoint('after_jennifer').execute() - * - * await doSomethingElse(trx) - * - * async function insertJennifer(kysely: Kysely) {} - * async function doSomething(kysely: Kysely) {} - * async function doSomethingElse(kysely: Kysely) {} - * ``` - */ - releaseSavepoint(savepointName) { - assertNotCommittedOrRolledBack(this.#state); - return new Command(async () => { - await this.#props.driver.releaseSavepoint?.(this.#props.connection.connection, savepointName, this.#compileQuery); - return new ControlledTransaction({ ...this.#props }); - }); - } - withPlugin(plugin) { - return new ControlledTransaction({ - ...this.#props, - executor: this.#props.executor.withPlugin(plugin), - }); - } - withoutPlugins() { - return new ControlledTransaction({ - ...this.#props, - executor: this.#props.executor.withoutPlugins(), - }); - } - withSchema(schema) { - return new ControlledTransaction({ - ...this.#props, - executor: this.#props.executor.withPluginAtFront(new with_schema_plugin_js_1.WithSchemaPlugin(schema)), - }); - } - withTables() { - return new ControlledTransaction({ ...this.#props }); - } -} -exports.ControlledTransaction = ControlledTransaction; -class Command { - #cb; - constructor(cb) { - this.#cb = cb; - } - /** - * Executes the command. - */ - async execute() { - return await this.#cb(); - } -} -exports.Command = Command; -function assertNotCommittedOrRolledBack(state) { - if (state.isCommitted) { - throw new Error('Transaction is already committed'); - } - if (state.isRolledBack) { - throw new Error('Transaction is already rolled back'); - } -} -/** - * An executor wrapper that asserts that the transaction state is not committed - * or rolled back when a query is executed. - * - * @internal - */ -class NotCommittedOrRolledBackAssertingExecutor { - #executor; - #state; - constructor(executor, state) { - if (executor instanceof NotCommittedOrRolledBackAssertingExecutor) { - this.#executor = executor.#executor; - } - else { - this.#executor = executor; - } - this.#state = state; - } - get adapter() { - return this.#executor.adapter; - } - get plugins() { - return this.#executor.plugins; - } - transformQuery(node, queryId) { - return this.#executor.transformQuery(node, queryId); - } - compileQuery(node, queryId) { - return this.#executor.compileQuery(node, queryId); - } - provideConnection(consumer) { - return this.#executor.provideConnection(consumer); - } - executeQuery(compiledQuery) { - assertNotCommittedOrRolledBack(this.#state); - return this.#executor.executeQuery(compiledQuery); - } - stream(compiledQuery, chunkSize) { - assertNotCommittedOrRolledBack(this.#state); - return this.#executor.stream(compiledQuery, chunkSize); - } - withConnectionProvider(connectionProvider) { - return new NotCommittedOrRolledBackAssertingExecutor(this.#executor.withConnectionProvider(connectionProvider), this.#state); - } - withPlugin(plugin) { - return new NotCommittedOrRolledBackAssertingExecutor(this.#executor.withPlugin(plugin), this.#state); - } - withPlugins(plugins) { - return new NotCommittedOrRolledBackAssertingExecutor(this.#executor.withPlugins(plugins), this.#state); - } - withPluginAtFront(plugin) { - return new NotCommittedOrRolledBackAssertingExecutor(this.#executor.withPluginAtFront(plugin), this.#state); - } - withoutPlugins() { - return new NotCommittedOrRolledBackAssertingExecutor(this.#executor.withoutPlugins(), this.#state); - } -} diff --git a/node_modules/kysely/dist/cjs/migration/file-migration-provider.d.ts b/node_modules/kysely/dist/cjs/migration/file-migration-provider.d.ts deleted file mode 100644 index 92222dc..0000000 --- a/node_modules/kysely/dist/cjs/migration/file-migration-provider.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import type { Migration, MigrationProvider } from './migrator.js'; -/** - * Reads all migrations from a folder in node.js. - * - * ### Examples - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * - * new FileMigrationProvider({ - * fs, - * path, - * migrationFolder: 'path/to/migrations/folder' - * }) - * ``` - */ -export declare class FileMigrationProvider implements MigrationProvider { - #private; - constructor(props: FileMigrationProviderProps); - /** - * Returns all migrations, old and new. - * - * For example if you have your migrations in a folder as separate files, - * you can implement this method to return all migration in that folder - * as {@link Migration} objects. - * - * Kysely already has a built-in {@link FileMigrationProvider} for node.js - * that does exactly that. - * - * The keys of the returned object are migration names and values are the - * migrations. The order of the migrations is determined by the alphabetical - * order of the migration names. The items in the object don't need to be - * sorted, they are sorted by Kysely. - */ - getMigrations(): Promise>; -} -export interface FileMigrationProviderFS { - readdir(path: string): Promise; -} -export interface FileMigrationProviderPath { - join(...path: string[]): string; -} -export interface FileMigrationProviderProps { - fs: FileMigrationProviderFS; - path: FileMigrationProviderPath; - migrationFolder: string; -} diff --git a/node_modules/kysely/dist/cjs/migration/file-migration-provider.js b/node_modules/kysely/dist/cjs/migration/file-migration-provider.js deleted file mode 100644 index 260b482..0000000 --- a/node_modules/kysely/dist/cjs/migration/file-migration-provider.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.FileMigrationProvider = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * Reads all migrations from a folder in node.js. - * - * ### Examples - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * - * new FileMigrationProvider({ - * fs, - * path, - * migrationFolder: 'path/to/migrations/folder' - * }) - * ``` - */ -class FileMigrationProvider { - #props; - constructor(props) { - this.#props = props; - } - async getMigrations() { - const migrations = {}; - const files = await this.#props.fs.readdir(this.#props.migrationFolder); - for (const fileName of files) { - if (fileName.endsWith('.js') || - (fileName.endsWith('.ts') && !fileName.endsWith('.d.ts')) || - fileName.endsWith('.mjs') || - (fileName.endsWith('.mts') && !fileName.endsWith('.d.mts'))) { - const migration = await Promise.resolve(`${ - /* webpackIgnore: true */ this.#props.path.join(this.#props.migrationFolder, fileName)}`).then(s => require(s)); - const migrationKey = fileName.substring(0, fileName.lastIndexOf('.')); - // Handle esModuleInterop export's `default` prop... - if (isMigration(migration?.default)) { - migrations[migrationKey] = migration.default; - } - else if (isMigration(migration)) { - migrations[migrationKey] = migration; - } - } - } - return migrations; - } -} -exports.FileMigrationProvider = FileMigrationProvider; -function isMigration(obj) { - return (0, object_utils_js_1.isObject)(obj) && (0, object_utils_js_1.isFunction)(obj.up); -} diff --git a/node_modules/kysely/dist/cjs/migration/migrator.d.ts b/node_modules/kysely/dist/cjs/migration/migrator.d.ts deleted file mode 100644 index 4984b9f..0000000 --- a/node_modules/kysely/dist/cjs/migration/migrator.d.ts +++ /dev/null @@ -1,395 +0,0 @@ -import type { Kysely } from '../kysely.js'; -export declare const DEFAULT_MIGRATION_TABLE = "kysely_migration"; -export declare const DEFAULT_MIGRATION_LOCK_TABLE = "kysely_migration_lock"; -export declare const DEFAULT_ALLOW_UNORDERED_MIGRATIONS = false; -export declare const MIGRATION_LOCK_ID = "migration_lock"; -export declare const NO_MIGRATIONS: NoMigrations; -export interface Migration { - up(db: Kysely): Promise; - /** - * An optional down method. - * - * If you don't provide a down method, the migration is skipped when - * migrating down. - */ - down?(db: Kysely): Promise; -} -/** - * A class for running migrations. - * - * ### Example - * - * This example uses the {@link FileMigrationProvider} that reads migrations - * files from a single folder. You can easily implement your own - * {@link MigrationProvider} if you want to provide migrations some - * other way. - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * import * as Sqlite from 'better-sqlite3' - * import { - * FileMigrationProvider, - * Kysely, - * Migrator, - * SqliteDialect - * } from 'kysely' - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: Sqlite(':memory:') - * }) - * }) - * - * const migrator = new Migrator({ - * db, - * provider: new FileMigrationProvider({ - * fs, - * // Path to the folder that contains all your migrations. - * migrationFolder: 'some/path/to/migrations', - * path, - * }) - * }) - * ``` - */ -export declare class Migrator { - #private; - constructor(props: MigratorProps); - /** - * Returns a {@link MigrationInfo} object for each migration. - * - * The returned array is sorted by migration name. - */ - getMigrations(): Promise>; - /** - * Runs all migrations that have not yet been run. - * - * This method returns a {@link MigrationResultSet} instance and _never_ throws. - * {@link MigrationResultSet.error} holds the error if something went wrong. - * {@link MigrationResultSet.results} contains information about which migrations - * were executed and which failed. See the examples below. - * - * This method goes through all possible migrations provided by the provider and runs the - * ones whose names come alphabetically after the last migration that has been run. If the - * list of executed migrations doesn't match the beginning of the list of possible migrations - * an error is returned. - * - * ### Examples - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * import * as Sqlite from 'better-sqlite3' - * import { FileMigrationProvider, Migrator } from 'kysely' - * - * const migrator = new Migrator({ - * db, - * provider: new FileMigrationProvider({ - * fs, - * migrationFolder: 'some/path/to/migrations', - * path, - * }) - * }) - * - * const { error, results } = await migrator.migrateToLatest() - * - * results?.forEach((it) => { - * if (it.status === 'Success') { - * console.log(`migration "${it.migrationName}" was executed successfully`) - * } else if (it.status === 'Error') { - * console.error(`failed to execute migration "${it.migrationName}"`) - * } - * }) - * - * if (error) { - * console.error('failed to run `migrateToLatest`') - * console.error(error) - * } - * ``` - */ - migrateToLatest(): Promise; - /** - * Migrate up/down to a specific migration. - * - * This method returns a {@link MigrationResultSet} instance and _never_ throws. - * {@link MigrationResultSet.error} holds the error if something went wrong. - * {@link MigrationResultSet.results} contains information about which migrations - * were executed and which failed. - * - * ### Examples - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * import { FileMigrationProvider, Migrator } from 'kysely' - * - * const migrator = new Migrator({ - * db, - * provider: new FileMigrationProvider({ - * fs, - * // Path to the folder that contains all your migrations. - * migrationFolder: 'some/path/to/migrations', - * path, - * }) - * }) - * - * await migrator.migrateTo('some_migration') - * ``` - * - * If you specify the name of the first migration, this method migrates - * down to the first migration, but doesn't run the `down` method of - * the first migration. In case you want to migrate all the way down, - * you can use a special constant `NO_MIGRATIONS`: - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * import { FileMigrationProvider, Migrator, NO_MIGRATIONS } from 'kysely' - * - * const migrator = new Migrator({ - * db, - * provider: new FileMigrationProvider({ - * fs, - * // Path to the folder that contains all your migrations. - * migrationFolder: 'some/path/to/migrations', - * path, - * }) - * }) - * - * await migrator.migrateTo(NO_MIGRATIONS) - * ``` - */ - migrateTo(targetMigrationName: string | NoMigrations): Promise; - /** - * Migrate one step up. - * - * This method returns a {@link MigrationResultSet} instance and _never_ throws. - * {@link MigrationResultSet.error} holds the error if something went wrong. - * {@link MigrationResultSet.results} contains information about which migrations - * were executed and which failed. - * - * ### Examples - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * import { FileMigrationProvider, Migrator } from 'kysely' - * - * const migrator = new Migrator({ - * db, - * provider: new FileMigrationProvider({ - * fs, - * // Path to the folder that contains all your migrations. - * migrationFolder: 'some/path/to/migrations', - * path, - * }) - * }) - * - * await migrator.migrateUp() - * ``` - */ - migrateUp(): Promise; - /** - * Migrate one step down. - * - * This method returns a {@link MigrationResultSet} instance and _never_ throws. - * {@link MigrationResultSet.error} holds the error if something went wrong. - * {@link MigrationResultSet.results} contains information about which migrations - * were executed and which failed. - * - * ### Examples - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * import { FileMigrationProvider, Migrator } from 'kysely' - * - * const migrator = new Migrator({ - * db, - * provider: new FileMigrationProvider({ - * fs, - * // Path to the folder that contains all your migrations. - * migrationFolder: 'some/path/to/migrations', - * path, - * }) - * }) - * - * await migrator.migrateDown() - * ``` - */ - migrateDown(): Promise; -} -export interface MigratorProps { - readonly db: Kysely; - readonly provider: MigrationProvider; - /** - * The name of the internal migration table. Defaults to `kysely_migration`. - * - * If you do specify this, you need to ALWAYS use the same value. Kysely doesn't - * support changing the table on the fly. If you run the migrator even once with a - * table name X and then change the table name to Y, kysely will create a new empty - * migration table and attempt to run the migrations again, which will obviously - * fail. - * - * If you do specify this, ALWAYS ALWAYS use the same value from the beginning of - * the project, to the end of time or prepare to manually migrate the migration - * tables. - */ - readonly migrationTableName?: string; - /** - * The name of the internal migration lock table. Defaults to `kysely_migration_lock`. - * - * If you do specify this, you need to ALWAYS use the same value. Kysely doesn't - * support changing the table on the fly. If you run the migrator even once with a - * table name X and then change the table name to Y, kysely will create a new empty - * lock table. - * - * If you do specify this, ALWAYS ALWAYS use the same value from the beginning of - * the project, to the end of time or prepare to manually migrate the migration - * tables. - */ - readonly migrationLockTableName?: string; - /** - * The schema of the internal migration tables. Defaults to the default schema - * on dialects that support schemas. - * - * If you do specify this, you need to ALWAYS use the same value. Kysely doesn't - * support changing the schema on the fly. If you run the migrator even once with a - * schema name X and then change the schema name to Y, kysely will create a new empty - * migration tables in the new schema and attempt to run the migrations again, which - * will obviously fail. - * - * If you do specify this, ALWAYS ALWAYS use the same value from the beginning of - * the project, to the end of time or prepare to manually migrate the migration - * tables. - * - * This only works on postgres and mssql. - */ - readonly migrationTableSchema?: string; - /** - * Enforces whether or not migrations must be run in alpha-numeric order. - * - * When false, migrations must be run in their exact alpha-numeric order. - * This is checked against the migrations already run in the database - * (`migrationTableName`). This ensures your migrations are always run in - * the same order and is the safest option. - * - * When true, migrations are still run in alpha-numeric order, but - * the order is not checked against already-run migrations in the database. - * Kysely will simply run all migrations that haven't run yet, in alpha-numeric - * order. - */ - readonly allowUnorderedMigrations?: boolean; - /** - * A function that compares migration names, used when sorting migrations in - * ascending order. - * - * Default is `name0.localeCompare(name1)`. - */ - readonly nameComparator?: (name0: string, name1: string) => number; - /** - * When `true`, don't run migrations in transactions even if the dialect supports transactional DDL. - * - * Default is `false`. - * - * This is useful when some migrations include queries that would fail otherwise. - */ - readonly disableTransactions?: boolean; -} -/** - * All migration methods ({@link Migrator.migrateTo | migrateTo}, - * {@link Migrator.migrateToLatest | migrateToLatest} etc.) never - * throw but return this object instead. - */ -export interface MigrationResultSet { - /** - * This is defined if something went wrong. - * - * An error may have occurred in one of the migrations in which case the - * {@link results} list contains an item with `status === 'Error'` to - * indicate which migration failed. - * - * An error may also have occurred before Kysely was able to figure out - * which migrations should be executed, in which case the {@link results} - * list is undefined. - */ - readonly error?: unknown; - /** - * {@link MigrationResult} for each individual migration that was supposed - * to be executed by the operation. - * - * If all went well, each result's `status` is `Success`. If some migration - * failed, the failed migration's result's `status` is `Error` and all - * results after that one have `status` ´NotExecuted`. - * - * This property can be undefined if an error occurred before Kysely was - * able to figure out which migrations should be executed. - * - * If this list is empty, there were no migrations to execute. - */ - readonly results?: MigrationResult[]; -} -type MigrationDirection = 'Up' | 'Down'; -export interface MigrationResult { - readonly migrationName: string; - /** - * The direction in which this migration was executed. - */ - readonly direction: MigrationDirection; - /** - * The execution status. - * - * - `Success` means the migration was successfully executed. Note that - * if any of the later migrations in the {@link MigrationResultSet.results} - * list failed (have status `Error`) AND the dialect supports transactional - * DDL, even the successfull migrations were rolled back. - * - * - `Error` means the migration failed. In this case the - * {@link MigrationResultSet.error} contains the error. - * - * - `NotExecuted` means that the migration was supposed to be executed - * but wasn't because an earlier migration failed. - */ - readonly status: 'Success' | 'Error' | 'NotExecuted'; -} -export interface MigrationProvider { - /** - * Returns all migrations, old and new. - * - * For example if you have your migrations in a folder as separate files, - * you can implement this method to return all migration in that folder - * as {@link Migration} objects. - * - * Kysely already has a built-in {@link FileMigrationProvider} for node.js - * that does exactly that. - * - * The keys of the returned object are migration names and values are the - * migrations. The order of the migrations is determined by the alphabetical - * order of the migration names. The items in the object don't need to be - * sorted, they are sorted by Kysely. - */ - getMigrations(): Promise>; -} -/** - * Type for the {@link NO_MIGRATIONS} constant. Never create one of these. - */ -export interface NoMigrations { - readonly __noMigrations__: true; -} -export interface MigrationInfo { - /** - * Name of the migration. - */ - name: string; - /** - * The actual migration. - */ - migration: Migration; - /** - * When was the migration executed. - * - * If this is undefined, the migration hasn't been executed yet. - */ - executedAt?: Date; -} -export {}; diff --git a/node_modules/kysely/dist/cjs/migration/migrator.js b/node_modules/kysely/dist/cjs/migration/migrator.js deleted file mode 100644 index d95d03b..0000000 --- a/node_modules/kysely/dist/cjs/migration/migrator.js +++ /dev/null @@ -1,611 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Migrator = exports.NO_MIGRATIONS = exports.MIGRATION_LOCK_ID = exports.DEFAULT_ALLOW_UNORDERED_MIGRATIONS = exports.DEFAULT_MIGRATION_LOCK_TABLE = exports.DEFAULT_MIGRATION_TABLE = void 0; -const noop_plugin_js_1 = require("../plugin/noop-plugin.js"); -const with_schema_plugin_js_1 = require("../plugin/with-schema/with-schema-plugin.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -exports.DEFAULT_MIGRATION_TABLE = 'kysely_migration'; -exports.DEFAULT_MIGRATION_LOCK_TABLE = 'kysely_migration_lock'; -exports.DEFAULT_ALLOW_UNORDERED_MIGRATIONS = false; -exports.MIGRATION_LOCK_ID = 'migration_lock'; -exports.NO_MIGRATIONS = (0, object_utils_js_1.freeze)({ __noMigrations__: true }); -/** - * A class for running migrations. - * - * ### Example - * - * This example uses the {@link FileMigrationProvider} that reads migrations - * files from a single folder. You can easily implement your own - * {@link MigrationProvider} if you want to provide migrations some - * other way. - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * import * as Sqlite from 'better-sqlite3' - * import { - * FileMigrationProvider, - * Kysely, - * Migrator, - * SqliteDialect - * } from 'kysely' - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: Sqlite(':memory:') - * }) - * }) - * - * const migrator = new Migrator({ - * db, - * provider: new FileMigrationProvider({ - * fs, - * // Path to the folder that contains all your migrations. - * migrationFolder: 'some/path/to/migrations', - * path, - * }) - * }) - * ``` - */ -class Migrator { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - /** - * Returns a {@link MigrationInfo} object for each migration. - * - * The returned array is sorted by migration name. - */ - async getMigrations() { - const tableExists = await this.#doesTableExist(this.#migrationTable); - const executedMigrations = tableExists - ? await this.#props.db - .withPlugin(this.#schemaPlugin) - .selectFrom(this.#migrationTable) - .select(['name', 'timestamp']) - .$narrowType() - .execute() - : []; - const migrations = await this.#resolveMigrations(); - return migrations.map(({ name, ...migration }) => { - const executed = executedMigrations.find((it) => it.name === name); - return { - name, - migration, - executedAt: executed ? new Date(executed.timestamp) : undefined, - }; - }); - } - /** - * Runs all migrations that have not yet been run. - * - * This method returns a {@link MigrationResultSet} instance and _never_ throws. - * {@link MigrationResultSet.error} holds the error if something went wrong. - * {@link MigrationResultSet.results} contains information about which migrations - * were executed and which failed. See the examples below. - * - * This method goes through all possible migrations provided by the provider and runs the - * ones whose names come alphabetically after the last migration that has been run. If the - * list of executed migrations doesn't match the beginning of the list of possible migrations - * an error is returned. - * - * ### Examples - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * import * as Sqlite from 'better-sqlite3' - * import { FileMigrationProvider, Migrator } from 'kysely' - * - * const migrator = new Migrator({ - * db, - * provider: new FileMigrationProvider({ - * fs, - * migrationFolder: 'some/path/to/migrations', - * path, - * }) - * }) - * - * const { error, results } = await migrator.migrateToLatest() - * - * results?.forEach((it) => { - * if (it.status === 'Success') { - * console.log(`migration "${it.migrationName}" was executed successfully`) - * } else if (it.status === 'Error') { - * console.error(`failed to execute migration "${it.migrationName}"`) - * } - * }) - * - * if (error) { - * console.error('failed to run `migrateToLatest`') - * console.error(error) - * } - * ``` - */ - async migrateToLatest() { - return this.#migrate(() => ({ direction: 'Up', step: Infinity })); - } - /** - * Migrate up/down to a specific migration. - * - * This method returns a {@link MigrationResultSet} instance and _never_ throws. - * {@link MigrationResultSet.error} holds the error if something went wrong. - * {@link MigrationResultSet.results} contains information about which migrations - * were executed and which failed. - * - * ### Examples - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * import { FileMigrationProvider, Migrator } from 'kysely' - * - * const migrator = new Migrator({ - * db, - * provider: new FileMigrationProvider({ - * fs, - * // Path to the folder that contains all your migrations. - * migrationFolder: 'some/path/to/migrations', - * path, - * }) - * }) - * - * await migrator.migrateTo('some_migration') - * ``` - * - * If you specify the name of the first migration, this method migrates - * down to the first migration, but doesn't run the `down` method of - * the first migration. In case you want to migrate all the way down, - * you can use a special constant `NO_MIGRATIONS`: - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * import { FileMigrationProvider, Migrator, NO_MIGRATIONS } from 'kysely' - * - * const migrator = new Migrator({ - * db, - * provider: new FileMigrationProvider({ - * fs, - * // Path to the folder that contains all your migrations. - * migrationFolder: 'some/path/to/migrations', - * path, - * }) - * }) - * - * await migrator.migrateTo(NO_MIGRATIONS) - * ``` - */ - async migrateTo(targetMigrationName) { - return this.#migrate(({ migrations, executedMigrations, pendingMigrations, }) => { - if ((0, object_utils_js_1.isObject)(targetMigrationName) && - targetMigrationName.__noMigrations__ === true) { - return { direction: 'Down', step: Infinity }; - } - if (!migrations.find((m) => m.name === targetMigrationName)) { - throw new Error(`migration "${targetMigrationName}" doesn't exist`); - } - const executedIndex = executedMigrations.indexOf(targetMigrationName); - const pendingIndex = pendingMigrations.findIndex((m) => m.name === targetMigrationName); - if (executedIndex !== -1) { - return { - direction: 'Down', - step: executedMigrations.length - executedIndex - 1, - }; - } - else if (pendingIndex !== -1) { - return { direction: 'Up', step: pendingIndex + 1 }; - } - else { - throw new Error(`migration "${targetMigrationName}" isn't executed or pending`); - } - }); - } - /** - * Migrate one step up. - * - * This method returns a {@link MigrationResultSet} instance and _never_ throws. - * {@link MigrationResultSet.error} holds the error if something went wrong. - * {@link MigrationResultSet.results} contains information about which migrations - * were executed and which failed. - * - * ### Examples - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * import { FileMigrationProvider, Migrator } from 'kysely' - * - * const migrator = new Migrator({ - * db, - * provider: new FileMigrationProvider({ - * fs, - * // Path to the folder that contains all your migrations. - * migrationFolder: 'some/path/to/migrations', - * path, - * }) - * }) - * - * await migrator.migrateUp() - * ``` - */ - async migrateUp() { - return this.#migrate(() => ({ direction: 'Up', step: 1 })); - } - /** - * Migrate one step down. - * - * This method returns a {@link MigrationResultSet} instance and _never_ throws. - * {@link MigrationResultSet.error} holds the error if something went wrong. - * {@link MigrationResultSet.results} contains information about which migrations - * were executed and which failed. - * - * ### Examples - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * import { FileMigrationProvider, Migrator } from 'kysely' - * - * const migrator = new Migrator({ - * db, - * provider: new FileMigrationProvider({ - * fs, - * // Path to the folder that contains all your migrations. - * migrationFolder: 'some/path/to/migrations', - * path, - * }) - * }) - * - * await migrator.migrateDown() - * ``` - */ - async migrateDown() { - return this.#migrate(() => ({ direction: 'Down', step: 1 })); - } - async #migrate(getMigrationDirectionAndStep) { - try { - await this.#ensureMigrationTableSchemaExists(); - await this.#ensureMigrationTableExists(); - await this.#ensureMigrationLockTableExists(); - await this.#ensureLockRowExists(); - return await this.#runMigrations(getMigrationDirectionAndStep); - } - catch (error) { - if (error instanceof MigrationResultSetError) { - return error.resultSet; - } - return { error }; - } - } - get #migrationTableSchema() { - return this.#props.migrationTableSchema; - } - get #migrationTable() { - return this.#props.migrationTableName ?? exports.DEFAULT_MIGRATION_TABLE; - } - get #migrationLockTable() { - return this.#props.migrationLockTableName ?? exports.DEFAULT_MIGRATION_LOCK_TABLE; - } - get #allowUnorderedMigrations() { - return (this.#props.allowUnorderedMigrations ?? exports.DEFAULT_ALLOW_UNORDERED_MIGRATIONS); - } - get #schemaPlugin() { - if (this.#migrationTableSchema) { - return new with_schema_plugin_js_1.WithSchemaPlugin(this.#migrationTableSchema); - } - return new noop_plugin_js_1.NoopPlugin(); - } - async #ensureMigrationTableSchemaExists() { - if (!this.#migrationTableSchema) { - // Use default schema. Nothing to do. - return; - } - const schemaExists = await this.#doesSchemaExist(); - if (schemaExists) { - return; - } - try { - await this.#createIfNotExists(this.#props.db.schema.createSchema(this.#migrationTableSchema)); - } - catch (error) { - const schemaExists = await this.#doesSchemaExist(); - // At least on PostgreSQL, `if not exists` doesn't guarantee the `create schema` - // query doesn't throw if the schema already exits. That's why we check if - // the schema exist here and ignore the error if it does. - if (!schemaExists) { - throw error; - } - } - } - async #ensureMigrationTableExists() { - const tableExists = await this.#doesTableExist(this.#migrationTable); - if (tableExists) { - return; - } - try { - await this.#createIfNotExists(this.#props.db.schema - .withPlugin(this.#schemaPlugin) - .createTable(this.#migrationTable) - .addColumn('name', 'varchar(255)', (col) => col.notNull().primaryKey()) - // The migration run time as ISO string. This is not a real date type as we - // can't know which data type is supported by all future dialects. - .addColumn('timestamp', 'varchar(255)', (col) => col.notNull())); - } - catch (error) { - const tableExists = await this.#doesTableExist(this.#migrationTable); - // At least on PostgreSQL, `if not exists` doesn't guarantee the `create table` - // query doesn't throw if the table already exits. That's why we check if - // the table exist here and ignore the error if it does. - if (!tableExists) { - throw error; - } - } - } - async #ensureMigrationLockTableExists() { - const tableExists = await this.#doesTableExist(this.#migrationLockTable); - if (tableExists) { - return; - } - try { - await this.#createIfNotExists(this.#props.db.schema - .withPlugin(this.#schemaPlugin) - .createTable(this.#migrationLockTable) - .addColumn('id', 'varchar(255)', (col) => col.notNull().primaryKey()) - .addColumn('is_locked', 'integer', (col) => col.notNull().defaultTo(0))); - } - catch (error) { - const tableExists = await this.#doesTableExist(this.#migrationLockTable); - // At least on PostgreSQL, `if not exists` doesn't guarantee the `create table` - // query doesn't throw if the table already exits. That's why we check if - // the table exist here and ignore the error if it does. - if (!tableExists) { - throw error; - } - } - } - async #ensureLockRowExists() { - const lockRowExists = await this.#doesLockRowExists(); - if (lockRowExists) { - return; - } - try { - await this.#props.db - .withPlugin(this.#schemaPlugin) - .insertInto(this.#migrationLockTable) - .values({ id: exports.MIGRATION_LOCK_ID, is_locked: 0 }) - .execute(); - } - catch (error) { - const lockRowExists = await this.#doesLockRowExists(); - if (!lockRowExists) { - throw error; - } - } - } - async #doesSchemaExist() { - const schemas = await this.#props.db.introspection.getSchemas(); - return schemas.some((it) => it.name === this.#migrationTableSchema); - } - async #doesTableExist(tableName) { - const schema = this.#migrationTableSchema; - const tables = await this.#props.db.introspection.getTables({ - withInternalKyselyTables: true, - }); - return tables.some((it) => it.name === tableName && (!schema || it.schema === schema)); - } - async #doesLockRowExists() { - const lockRow = await this.#props.db - .withPlugin(this.#schemaPlugin) - .selectFrom(this.#migrationLockTable) - .where('id', '=', exports.MIGRATION_LOCK_ID) - .select('id') - .executeTakeFirst(); - return !!lockRow; - } - async #runMigrations(getMigrationDirectionAndStep) { - const adapter = this.#props.db.getExecutor().adapter; - const lockOptions = (0, object_utils_js_1.freeze)({ - lockTable: this.#props.migrationLockTableName ?? exports.DEFAULT_MIGRATION_LOCK_TABLE, - lockRowId: exports.MIGRATION_LOCK_ID, - lockTableSchema: this.#props.migrationTableSchema, - }); - const run = async (db) => { - try { - await adapter.acquireMigrationLock(db, lockOptions); - const state = await this.#getState(db); - if (state.migrations.length === 0) { - return { results: [] }; - } - const { direction, step } = getMigrationDirectionAndStep(state); - if (step <= 0) { - return { results: [] }; - } - if (direction === 'Down') { - return await this.#migrateDown(db, state, step); - } - else if (direction === 'Up') { - return await this.#migrateUp(db, state, step); - } - return { results: [] }; - } - finally { - await adapter.releaseMigrationLock(db, lockOptions); - } - }; - if (adapter.supportsTransactionalDdl && !this.#props.disableTransactions) { - return this.#props.db.transaction().execute(run); - } - else { - return this.#props.db.connection().execute(run); - } - } - async #getState(db) { - const migrations = await this.#resolveMigrations(); - const executedMigrations = await this.#getExecutedMigrations(db); - this.#ensureNoMissingMigrations(migrations, executedMigrations); - if (!this.#allowUnorderedMigrations) { - this.#ensureMigrationsInOrder(migrations, executedMigrations); - } - const pendingMigrations = this.#getPendingMigrations(migrations, executedMigrations); - return (0, object_utils_js_1.freeze)({ - migrations, - executedMigrations, - lastMigration: (0, object_utils_js_1.getLast)(executedMigrations), - pendingMigrations, - }); - } - #getPendingMigrations(migrations, executedMigrations) { - return migrations.filter((migration) => { - return !executedMigrations.includes(migration.name); - }); - } - async #resolveMigrations() { - const allMigrations = await this.#props.provider.getMigrations(); - return Object.keys(allMigrations) - .sort() - .map((name) => ({ - ...allMigrations[name], - name, - })); - } - async #getExecutedMigrations(db) { - const executedMigrations = await db - .withPlugin(this.#schemaPlugin) - .selectFrom(this.#migrationTable) - .select(['name', 'timestamp']) - .$narrowType() - .execute(); - const nameComparator = this.#props.nameComparator || ((a, b) => a.localeCompare(b)); - return (executedMigrations - // https://github.com/kysely-org/kysely/issues/843 - .sort((a, b) => { - if (a.timestamp === b.timestamp) { - return nameComparator(a.name, b.name); - } - return (new Date(a.timestamp).getTime() - new Date(b.timestamp).getTime()); - }) - .map((it) => it.name)); - } - #ensureNoMissingMigrations(migrations, executedMigrations) { - // Ensure all executed migrations exist in the `migrations` list. - for (const executed of executedMigrations) { - if (!migrations.some((it) => it.name === executed)) { - throw new Error(`corrupted migrations: previously executed migration ${executed} is missing`); - } - } - } - #ensureMigrationsInOrder(migrations, executedMigrations) { - // Ensure the executed migrations are the first ones in the migration list. - for (let i = 0; i < executedMigrations.length; ++i) { - if (migrations[i].name !== executedMigrations[i]) { - throw new Error(`corrupted migrations: expected previously executed migration ${executedMigrations[i]} to be at index ${i} but ${migrations[i].name} was found in its place. New migrations must always have a name that comes alphabetically after the last executed migration.`); - } - } - } - async #migrateDown(db, state, step) { - const migrationsToRollback = state.executedMigrations - .slice() - .reverse() - .slice(0, step) - .map((name) => { - return state.migrations.find((it) => it.name === name); - }); - const results = migrationsToRollback.map((migration) => { - return { - migrationName: migration.name, - direction: 'Down', - status: 'NotExecuted', - }; - }); - for (let i = 0; i < results.length; ++i) { - const migration = migrationsToRollback[i]; - try { - if (migration.down) { - await migration.down(db); - await db - .withPlugin(this.#schemaPlugin) - .deleteFrom(this.#migrationTable) - .where('name', '=', migration.name) - .execute(); - results[i] = { - migrationName: migration.name, - direction: 'Down', - status: 'Success', - }; - } - } - catch (error) { - results[i] = { - migrationName: migration.name, - direction: 'Down', - status: 'Error', - }; - throw new MigrationResultSetError({ - error, - results, - }); - } - } - return { results }; - } - async #migrateUp(db, state, step) { - const migrationsToRun = state.pendingMigrations.slice(0, step); - const results = migrationsToRun.map((migration) => { - return { - migrationName: migration.name, - direction: 'Up', - status: 'NotExecuted', - }; - }); - for (let i = 0; i < results.length; i++) { - const migration = state.pendingMigrations[i]; - try { - await migration.up(db); - await db - .withPlugin(this.#schemaPlugin) - .insertInto(this.#migrationTable) - .values({ - name: migration.name, - timestamp: new Date().toISOString(), - }) - .execute(); - results[i] = { - migrationName: migration.name, - direction: 'Up', - status: 'Success', - }; - } - catch (error) { - results[i] = { - migrationName: migration.name, - direction: 'Up', - status: 'Error', - }; - throw new MigrationResultSetError({ - error, - results, - }); - } - } - return { results }; - } - async #createIfNotExists(qb) { - if (this.#props.db.getExecutor().adapter.supportsCreateIfNotExists) { - qb = qb.ifNotExists(); - } - await qb.execute(); - } -} -exports.Migrator = Migrator; -class MigrationResultSetError extends Error { - #resultSet; - constructor(result) { - super(); - this.#resultSet = result; - } - get resultSet() { - return this.#resultSet; - } -} diff --git a/node_modules/kysely/dist/cjs/operation-node/add-column-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/add-column-node.d.ts deleted file mode 100644 index 6b10f3b..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/add-column-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { ColumnDefinitionNode } from './column-definition-node.js'; -import type { OperationNode } from './operation-node.js'; -export interface AddColumnNode extends OperationNode { - readonly kind: 'AddColumnNode'; - readonly column: ColumnDefinitionNode; -} -type AddColumnNodeFactory = Readonly<{ - is(node: OperationNode): node is AddColumnNode; - create(column: ColumnDefinitionNode): Readonly; -}>; -/** - * @internal - */ -export declare const AddColumnNode: AddColumnNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/add-column-node.js b/node_modules/kysely/dist/cjs/operation-node/add-column-node.js deleted file mode 100644 index 5370e14..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/add-column-node.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AddColumnNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.AddColumnNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'AddColumnNode'; - }, - create(column) { - return (0, object_utils_js_1.freeze)({ - kind: 'AddColumnNode', - column, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/add-constraint-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/add-constraint-node.d.ts deleted file mode 100644 index 27f5b80..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/add-constraint-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { ConstraintNode } from './constraint-node.js'; -export interface AddConstraintNode extends OperationNode { - readonly kind: 'AddConstraintNode'; - readonly constraint: ConstraintNode; -} -type AddConstraintNodeFactory = Readonly<{ - is(node: OperationNode): node is AddConstraintNode; - create(constraint: ConstraintNode): Readonly; -}>; -/** - * @internal - */ -export declare const AddConstraintNode: AddConstraintNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/add-constraint-node.js b/node_modules/kysely/dist/cjs/operation-node/add-constraint-node.js deleted file mode 100644 index ea29fd8..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/add-constraint-node.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AddConstraintNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.AddConstraintNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'AddConstraintNode'; - }, - create(constraint) { - return (0, object_utils_js_1.freeze)({ - kind: 'AddConstraintNode', - constraint, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/add-index-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/add-index-node.d.ts deleted file mode 100644 index c3ae3f2..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/add-index-node.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IdentifierNode } from './identifier-node.js'; -import type { OperationNode } from './operation-node.js'; -import type { RawNode } from './raw-node.js'; -export type AddIndexNodeProps = Omit; -export interface AddIndexNode extends OperationNode { - readonly kind: 'AddIndexNode'; - readonly name: IdentifierNode; - readonly columns?: OperationNode[]; - readonly unique?: boolean; - readonly using?: RawNode; - readonly ifNotExists?: boolean; -} -type AddIndexNodeFactory = Readonly<{ - is(node: OperationNode): node is AddIndexNode; - create(name: string): Readonly; - cloneWith(node: AddIndexNode, props: Omit): Readonly; - cloneWithColumns(node: AddIndexNode, columns: OperationNode[]): Readonly; -}>; -/** - * @internal - */ -export declare const AddIndexNode: AddIndexNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/add-index-node.js b/node_modules/kysely/dist/cjs/operation-node/add-index-node.js deleted file mode 100644 index 1ad94ef..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/add-index-node.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AddIndexNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const identifier_node_js_1 = require("./identifier-node.js"); -/** - * @internal - */ -exports.AddIndexNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'AddIndexNode'; - }, - create(name) { - return (0, object_utils_js_1.freeze)({ - kind: 'AddIndexNode', - name: identifier_node_js_1.IdentifierNode.create(name), - }); - }, - cloneWith(node, props) { - return (0, object_utils_js_1.freeze)({ - ...node, - ...props, - }); - }, - cloneWithColumns(node, columns) { - return (0, object_utils_js_1.freeze)({ - ...node, - columns: [...(node.columns || []), ...columns], - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/aggregate-function-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/aggregate-function-node.d.ts deleted file mode 100644 index f61a7d0..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/aggregate-function-node.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { OverNode } from './over-node.js'; -import { WhereNode } from './where-node.js'; -import { OrderByNode } from './order-by-node.js'; -import type { OrderByItemNode } from './order-by-item-node.js'; -export interface AggregateFunctionNode extends OperationNode { - readonly kind: 'AggregateFunctionNode'; - readonly func: string; - readonly aggregated: readonly OperationNode[]; - readonly distinct?: boolean; - readonly orderBy?: OrderByNode; - readonly withinGroup?: OrderByNode; - readonly filter?: WhereNode; - readonly over?: OverNode; -} -type AggregateFunctionNodeFactory = Readonly<{ - is(node: OperationNode): node is AggregateFunctionNode; - create(aggregateFunction: string, aggregated?: readonly OperationNode[]): Readonly; - cloneWithDistinct(aggregateFunctionNode: AggregateFunctionNode): Readonly; - cloneWithOrderBy(aggregateFunctionNode: AggregateFunctionNode, orderItems: ReadonlyArray, withinGroup?: boolean): Readonly; - cloneWithFilter(aggregateFunctionNode: AggregateFunctionNode, filter: OperationNode): Readonly; - cloneWithOrFilter(aggregateFunctionNode: AggregateFunctionNode, filter: OperationNode): Readonly; - cloneWithOver(aggregateFunctionNode: AggregateFunctionNode, over?: OverNode): Readonly; -}>; -/** - * @internal - */ -export declare const AggregateFunctionNode: AggregateFunctionNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/aggregate-function-node.js b/node_modules/kysely/dist/cjs/operation-node/aggregate-function-node.js deleted file mode 100644 index 04baf20..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/aggregate-function-node.js +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AggregateFunctionNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const where_node_js_1 = require("./where-node.js"); -const order_by_node_js_1 = require("./order-by-node.js"); -/** - * @internal - */ -exports.AggregateFunctionNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'AggregateFunctionNode'; - }, - create(aggregateFunction, aggregated = []) { - return (0, object_utils_js_1.freeze)({ - kind: 'AggregateFunctionNode', - func: aggregateFunction, - aggregated, - }); - }, - cloneWithDistinct(aggregateFunctionNode) { - return (0, object_utils_js_1.freeze)({ - ...aggregateFunctionNode, - distinct: true, - }); - }, - cloneWithOrderBy(aggregateFunctionNode, orderItems, withinGroup = false) { - const prop = withinGroup ? 'withinGroup' : 'orderBy'; - return (0, object_utils_js_1.freeze)({ - ...aggregateFunctionNode, - [prop]: aggregateFunctionNode[prop] - ? order_by_node_js_1.OrderByNode.cloneWithItems(aggregateFunctionNode[prop], orderItems) - : order_by_node_js_1.OrderByNode.create(orderItems), - }); - }, - cloneWithFilter(aggregateFunctionNode, filter) { - return (0, object_utils_js_1.freeze)({ - ...aggregateFunctionNode, - filter: aggregateFunctionNode.filter - ? where_node_js_1.WhereNode.cloneWithOperation(aggregateFunctionNode.filter, 'And', filter) - : where_node_js_1.WhereNode.create(filter), - }); - }, - cloneWithOrFilter(aggregateFunctionNode, filter) { - return (0, object_utils_js_1.freeze)({ - ...aggregateFunctionNode, - filter: aggregateFunctionNode.filter - ? where_node_js_1.WhereNode.cloneWithOperation(aggregateFunctionNode.filter, 'Or', filter) - : where_node_js_1.WhereNode.create(filter), - }); - }, - cloneWithOver(aggregateFunctionNode, over) { - return (0, object_utils_js_1.freeze)({ - ...aggregateFunctionNode, - over, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/alias-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/alias-node.d.ts deleted file mode 100644 index c977211..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/alias-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface AliasNode extends OperationNode { - readonly kind: 'AliasNode'; - readonly node: OperationNode; - readonly alias: OperationNode; -} -type AliasNodeFactory = Readonly<{ - is(node: OperationNode): node is AliasNode; - create(node: OperationNode, alias: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const AliasNode: AliasNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/alias-node.js b/node_modules/kysely/dist/cjs/operation-node/alias-node.js deleted file mode 100644 index a28038f..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/alias-node.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AliasNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.AliasNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'AliasNode'; - }, - create(node, alias) { - return (0, object_utils_js_1.freeze)({ - kind: 'AliasNode', - node, - alias, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/alter-column-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/alter-column-node.d.ts deleted file mode 100644 index a7e65e2..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/alter-column-node.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import { ColumnNode } from './column-node.js'; -import type { RawNode } from './raw-node.js'; -export type AlterColumnNodeProps = Omit; -export interface AlterColumnNode extends OperationNode { - readonly kind: 'AlterColumnNode'; - readonly column: ColumnNode; - readonly dataType?: OperationNode; - readonly dataTypeExpression?: RawNode; - readonly setDefault?: OperationNode; - readonly dropDefault?: true; - readonly setNotNull?: true; - readonly dropNotNull?: true; -} -type AlterColumnNodeFactory = Readonly<{ - is(node: OperationNode): node is AlterColumnNode; - create(column: string, prop: T, value: Required[T]): Readonly; -}>; -/** - * @internal - */ -export declare const AlterColumnNode: AlterColumnNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/alter-column-node.js b/node_modules/kysely/dist/cjs/operation-node/alter-column-node.js deleted file mode 100644 index 3957be5..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/alter-column-node.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AlterColumnNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const column_node_js_1 = require("./column-node.js"); -/** - * @internal - */ -exports.AlterColumnNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'AlterColumnNode'; - }, - create(column, prop, value) { - return (0, object_utils_js_1.freeze)({ - kind: 'AlterColumnNode', - column: column_node_js_1.ColumnNode.create(column), - [prop]: value, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/alter-table-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/alter-table-node.d.ts deleted file mode 100644 index 4ee76b9..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/alter-table-node.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { AddColumnNode } from './add-column-node.js'; -import type { DropColumnNode } from './drop-column-node.js'; -import type { TableNode } from './table-node.js'; -import type { IdentifierNode } from './identifier-node.js'; -import type { RenameColumnNode } from './rename-column-node.js'; -import type { AlterColumnNode } from './alter-column-node.js'; -import type { AddConstraintNode } from './add-constraint-node.js'; -import type { DropConstraintNode } from './drop-constraint-node.js'; -import type { ModifyColumnNode } from './modify-column-node.js'; -import type { DropIndexNode } from './drop-index-node.js'; -import type { AddIndexNode } from './add-index-node.js'; -import type { RenameConstraintNode } from './rename-constraint-node.js'; -export type AlterTableNodeTableProps = Pick; -export type AlterTableColumnAlterationNode = RenameColumnNode | AddColumnNode | DropColumnNode | AlterColumnNode | ModifyColumnNode; -export interface AlterTableNode extends OperationNode { - readonly kind: 'AlterTableNode'; - readonly table: TableNode; - readonly renameTo?: TableNode; - readonly setSchema?: IdentifierNode; - readonly columnAlterations?: ReadonlyArray; - readonly addConstraint?: AddConstraintNode; - readonly dropConstraint?: DropConstraintNode; - readonly renameConstraint?: RenameConstraintNode; - readonly addIndex?: AddIndexNode; - readonly dropIndex?: DropIndexNode; -} -type AlterTableNodeFactory = Readonly<{ - is(node: OperationNode): node is AlterTableNode; - create(table: TableNode): Readonly; - cloneWithTableProps(node: AlterTableNode, props: AlterTableNodeTableProps): Readonly; - cloneWithColumnAlteration(node: AlterTableNode, columnAlteration: AlterTableColumnAlterationNode): Readonly; -}>; -/** - * @internal - */ -export declare const AlterTableNode: AlterTableNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/alter-table-node.js b/node_modules/kysely/dist/cjs/operation-node/alter-table-node.js deleted file mode 100644 index 7586747..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/alter-table-node.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AlterTableNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.AlterTableNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'AlterTableNode'; - }, - create(table) { - return (0, object_utils_js_1.freeze)({ - kind: 'AlterTableNode', - table, - }); - }, - cloneWithTableProps(node, props) { - return (0, object_utils_js_1.freeze)({ - ...node, - ...props, - }); - }, - cloneWithColumnAlteration(node, columnAlteration) { - return (0, object_utils_js_1.freeze)({ - ...node, - columnAlterations: node.columnAlterations - ? [...node.columnAlterations, columnAlteration] - : [columnAlteration], - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/and-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/and-node.d.ts deleted file mode 100644 index e9a494e..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/and-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface AndNode extends OperationNode { - readonly kind: 'AndNode'; - readonly left: OperationNode; - readonly right: OperationNode; -} -type AndNodeFactory = Readonly<{ - is(node: OperationNode): node is AndNode; - create(left: OperationNode, right: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const AndNode: AndNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/and-node.js b/node_modules/kysely/dist/cjs/operation-node/and-node.js deleted file mode 100644 index bf69546..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/and-node.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AndNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.AndNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'AndNode'; - }, - create(left, right) { - return (0, object_utils_js_1.freeze)({ - kind: 'AndNode', - left, - right, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/binary-operation-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/binary-operation-node.d.ts deleted file mode 100644 index 0f0bdae..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/binary-operation-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface BinaryOperationNode extends OperationNode { - readonly kind: 'BinaryOperationNode'; - readonly leftOperand: OperationNode; - readonly operator: OperationNode; - readonly rightOperand: OperationNode; -} -type BinaryOperationNodeFactory = Readonly<{ - is(node: OperationNode): node is BinaryOperationNode; - create(leftOperand: OperationNode, operator: OperationNode, rightOperand: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const BinaryOperationNode: BinaryOperationNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/binary-operation-node.js b/node_modules/kysely/dist/cjs/operation-node/binary-operation-node.js deleted file mode 100644 index 36571cc..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/binary-operation-node.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BinaryOperationNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.BinaryOperationNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'BinaryOperationNode'; - }, - create(leftOperand, operator, rightOperand) { - return (0, object_utils_js_1.freeze)({ - kind: 'BinaryOperationNode', - leftOperand, - operator, - rightOperand, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/case-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/case-node.d.ts deleted file mode 100644 index b4d6f1e..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/case-node.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import { WhenNode } from './when-node.js'; -export interface CaseNode extends OperationNode { - readonly kind: 'CaseNode'; - readonly value?: OperationNode; - readonly when?: ReadonlyArray; - readonly else?: OperationNode; - readonly isStatement?: boolean; -} -type CaseNodeFactory = Readonly<{ - is(node: OperationNode): node is CaseNode; - create(value?: OperationNode): Readonly; - cloneWithWhen(caseNode: CaseNode, when: WhenNode): Readonly; - cloneWithThen(caseNode: CaseNode, then: OperationNode): Readonly; - cloneWith(caseNode: CaseNode, props: Partial>): Readonly; -}>; -/** - * @internal - */ -export declare const CaseNode: CaseNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/case-node.js b/node_modules/kysely/dist/cjs/operation-node/case-node.js deleted file mode 100644 index 432351f..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/case-node.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CaseNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const when_node_js_1 = require("./when-node.js"); -/** - * @internal - */ -exports.CaseNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'CaseNode'; - }, - create(value) { - return (0, object_utils_js_1.freeze)({ - kind: 'CaseNode', - value, - }); - }, - cloneWithWhen(caseNode, when) { - return (0, object_utils_js_1.freeze)({ - ...caseNode, - when: (0, object_utils_js_1.freeze)(caseNode.when ? [...caseNode.when, when] : [when]), - }); - }, - cloneWithThen(caseNode, then) { - return (0, object_utils_js_1.freeze)({ - ...caseNode, - when: caseNode.when - ? (0, object_utils_js_1.freeze)([ - ...caseNode.when.slice(0, -1), - when_node_js_1.WhenNode.cloneWithResult(caseNode.when[caseNode.when.length - 1], then), - ]) - : undefined, - }); - }, - cloneWith(caseNode, props) { - return (0, object_utils_js_1.freeze)({ - ...caseNode, - ...props, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/cast-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/cast-node.d.ts deleted file mode 100644 index c29c8de..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/cast-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface CastNode extends OperationNode { - readonly kind: 'CastNode'; - readonly expression: OperationNode; - readonly dataType: OperationNode; -} -type CastNodeFactory = Readonly<{ - is(node: OperationNode): node is CastNode; - create(expression: OperationNode, dataType: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const CastNode: CastNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/cast-node.js b/node_modules/kysely/dist/cjs/operation-node/cast-node.js deleted file mode 100644 index d4daf7a..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/cast-node.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CastNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.CastNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'CastNode'; - }, - create(expression, dataType) { - return (0, object_utils_js_1.freeze)({ - kind: 'CastNode', - expression, - dataType, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/check-constraint-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/check-constraint-node.d.ts deleted file mode 100644 index 230f7bd..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/check-constraint-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import { IdentifierNode } from './identifier-node.js'; -export interface CheckConstraintNode extends OperationNode { - readonly kind: 'CheckConstraintNode'; - readonly expression: OperationNode; - readonly name?: IdentifierNode; -} -type CheckConstraintNodeFactory = Readonly<{ - is(node: OperationNode): node is CheckConstraintNode; - create(expression: OperationNode, constraintName?: string): Readonly; -}>; -/** - * @internal - */ -export declare const CheckConstraintNode: CheckConstraintNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/check-constraint-node.js b/node_modules/kysely/dist/cjs/operation-node/check-constraint-node.js deleted file mode 100644 index 925bb91..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/check-constraint-node.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CheckConstraintNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const identifier_node_js_1 = require("./identifier-node.js"); -/** - * @internal - */ -exports.CheckConstraintNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'CheckConstraintNode'; - }, - create(expression, constraintName) { - return (0, object_utils_js_1.freeze)({ - kind: 'CheckConstraintNode', - expression, - name: constraintName - ? identifier_node_js_1.IdentifierNode.create(constraintName) - : undefined, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/collate-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/collate-node.d.ts deleted file mode 100644 index d87cb31..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/collate-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { IdentifierNode } from './identifier-node.js'; -import type { OperationNode } from './operation-node.js'; -export interface CollateNode extends OperationNode { - readonly kind: 'CollateNode'; - readonly collation: IdentifierNode; -} -type CollateNodeFactory = Readonly<{ - is(node: OperationNode): node is CollateNode; - create(collation: string): Readonly; -}>; -/** - * @internal - */ -export declare const CollateNode: CollateNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/collate-node.js b/node_modules/kysely/dist/cjs/operation-node/collate-node.js deleted file mode 100644 index 526c6f6..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/collate-node.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CollateNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const identifier_node_js_1 = require("./identifier-node.js"); -/** - * @internal - */ -exports.CollateNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'CollateNode'; - }, - create(collation) { - return (0, object_utils_js_1.freeze)({ - kind: 'CollateNode', - collation: identifier_node_js_1.IdentifierNode.create(collation), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/column-definition-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/column-definition-node.d.ts deleted file mode 100644 index d2e9012..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/column-definition-node.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import type { CheckConstraintNode } from './check-constraint-node.js'; -import { ColumnNode } from './column-node.js'; -import type { DefaultValueNode } from './default-value-node.js'; -import type { GeneratedNode } from './generated-node.js'; -import type { OperationNode } from './operation-node.js'; -import type { ReferencesNode } from './references-node.js'; -export type ColumnDefinitionNodeProps = Omit, 'kind' | 'dataType'>; -export interface ColumnDefinitionNode extends OperationNode { - readonly kind: 'ColumnDefinitionNode'; - readonly column: ColumnNode; - readonly dataType: OperationNode; - readonly references?: ReferencesNode; - readonly primaryKey?: boolean; - readonly autoIncrement?: boolean; - readonly unique?: boolean; - readonly notNull?: boolean; - readonly defaultTo?: DefaultValueNode; - readonly check?: CheckConstraintNode; - readonly generated?: GeneratedNode; - readonly unsigned?: boolean; - readonly frontModifiers?: ReadonlyArray; - readonly endModifiers?: ReadonlyArray; - readonly nullsNotDistinct?: boolean; - readonly identity?: boolean; - readonly ifNotExists?: boolean; -} -type ColumnDefinitionNodeFactory = Readonly<{ - is(node: OperationNode): node is ColumnDefinitionNode; - create(column: string, dataType: OperationNode): Readonly; - cloneWithFrontModifier(node: ColumnDefinitionNode, modifier: OperationNode): Readonly; - cloneWithEndModifier(node: ColumnDefinitionNode, modifier: OperationNode): Readonly; - cloneWith(node: ColumnDefinitionNode, props: ColumnDefinitionNodeProps): Readonly; -}>; -/** - * @internal - */ -export declare const ColumnDefinitionNode: ColumnDefinitionNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/column-definition-node.js b/node_modules/kysely/dist/cjs/operation-node/column-definition-node.js deleted file mode 100644 index c3fbfd8..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/column-definition-node.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ColumnDefinitionNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const column_node_js_1 = require("./column-node.js"); -/** - * @internal - */ -exports.ColumnDefinitionNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'ColumnDefinitionNode'; - }, - create(column, dataType) { - return (0, object_utils_js_1.freeze)({ - kind: 'ColumnDefinitionNode', - column: column_node_js_1.ColumnNode.create(column), - dataType, - }); - }, - cloneWithFrontModifier(node, modifier) { - return (0, object_utils_js_1.freeze)({ - ...node, - frontModifiers: node.frontModifiers - ? (0, object_utils_js_1.freeze)([...node.frontModifiers, modifier]) - : [modifier], - }); - }, - cloneWithEndModifier(node, modifier) { - return (0, object_utils_js_1.freeze)({ - ...node, - endModifiers: node.endModifiers - ? (0, object_utils_js_1.freeze)([...node.endModifiers, modifier]) - : [modifier], - }); - }, - cloneWith(node, props) { - return (0, object_utils_js_1.freeze)({ - ...node, - ...props, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/column-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/column-node.d.ts deleted file mode 100644 index e1438c1..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/column-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { IdentifierNode } from './identifier-node.js'; -import type { OperationNode } from './operation-node.js'; -export interface ColumnNode extends OperationNode { - readonly kind: 'ColumnNode'; - readonly column: IdentifierNode; -} -type ColumnNodeFactory = Readonly<{ - is(node: OperationNode): node is ColumnNode; - create(column: string): Readonly; -}>; -/** - * @internal - */ -export declare const ColumnNode: ColumnNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/column-node.js b/node_modules/kysely/dist/cjs/operation-node/column-node.js deleted file mode 100644 index c398008..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/column-node.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ColumnNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const identifier_node_js_1 = require("./identifier-node.js"); -/** - * @internal - */ -exports.ColumnNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'ColumnNode'; - }, - create(column) { - return (0, object_utils_js_1.freeze)({ - kind: 'ColumnNode', - column: identifier_node_js_1.IdentifierNode.create(column), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/column-update-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/column-update-node.d.ts deleted file mode 100644 index a741b9a..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/column-update-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface ColumnUpdateNode extends OperationNode { - readonly kind: 'ColumnUpdateNode'; - readonly column: OperationNode; - readonly value: OperationNode; -} -type ColumnUpdateNodeFactory = Readonly<{ - is(node: OperationNode): node is ColumnUpdateNode; - create(column: OperationNode, value: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const ColumnUpdateNode: ColumnUpdateNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/column-update-node.js b/node_modules/kysely/dist/cjs/operation-node/column-update-node.js deleted file mode 100644 index 8e87ef7..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/column-update-node.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ColumnUpdateNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.ColumnUpdateNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'ColumnUpdateNode'; - }, - create(column, value) { - return (0, object_utils_js_1.freeze)({ - kind: 'ColumnUpdateNode', - column, - value, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/common-table-expression-name-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/common-table-expression-name-node.d.ts deleted file mode 100644 index 31d9f0c..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/common-table-expression-name-node.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { ColumnNode } from './column-node.js'; -import type { OperationNode } from './operation-node.js'; -import { TableNode } from './table-node.js'; -export interface CommonTableExpressionNameNode extends OperationNode { - readonly kind: 'CommonTableExpressionNameNode'; - readonly table: TableNode; - readonly columns?: ReadonlyArray; -} -type CommonTableExpressionNameNodeFactory = Readonly<{ - is(node: OperationNode): node is CommonTableExpressionNameNode; - create(tableName: string, columnNames?: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const CommonTableExpressionNameNode: CommonTableExpressionNameNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/common-table-expression-name-node.js b/node_modules/kysely/dist/cjs/operation-node/common-table-expression-name-node.js deleted file mode 100644 index 6b53b3d..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/common-table-expression-name-node.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CommonTableExpressionNameNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const column_node_js_1 = require("./column-node.js"); -const table_node_js_1 = require("./table-node.js"); -/** - * @internal - */ -exports.CommonTableExpressionNameNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'CommonTableExpressionNameNode'; - }, - create(tableName, columnNames) { - return (0, object_utils_js_1.freeze)({ - kind: 'CommonTableExpressionNameNode', - table: table_node_js_1.TableNode.create(tableName), - columns: columnNames - ? (0, object_utils_js_1.freeze)(columnNames.map(column_node_js_1.ColumnNode.create)) - : undefined, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/common-table-expression-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/common-table-expression-node.d.ts deleted file mode 100644 index c1d8e75..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/common-table-expression-node.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { CommonTableExpressionNameNode } from './common-table-expression-name-node.js'; -import type { OperationNode } from './operation-node.js'; -type CommonTableExpressionNodeProps = Pick; -export interface CommonTableExpressionNode extends OperationNode { - readonly kind: 'CommonTableExpressionNode'; - readonly name: CommonTableExpressionNameNode; - readonly materialized?: boolean; - readonly expression: OperationNode; -} -type CommonTableExpressionNodeFactory = Readonly<{ - is(node: OperationNode): node is CommonTableExpressionNode; - create(name: CommonTableExpressionNameNode, expression: OperationNode): Readonly; - cloneWith(node: CommonTableExpressionNode, props: CommonTableExpressionNodeProps): Readonly; -}>; -/** - * @internal - */ -export declare const CommonTableExpressionNode: CommonTableExpressionNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/common-table-expression-node.js b/node_modules/kysely/dist/cjs/operation-node/common-table-expression-node.js deleted file mode 100644 index ec360ad..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/common-table-expression-node.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CommonTableExpressionNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.CommonTableExpressionNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'CommonTableExpressionNode'; - }, - create(name, expression) { - return (0, object_utils_js_1.freeze)({ - kind: 'CommonTableExpressionNode', - name, - expression, - }); - }, - cloneWith(node, props) { - return (0, object_utils_js_1.freeze)({ - ...node, - ...props, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/constraint-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/constraint-node.d.ts deleted file mode 100644 index d0f72aa..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/constraint-node.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { CheckConstraintNode } from './check-constraint-node.js'; -import type { ForeignKeyConstraintNode } from './foreign-key-constraint-node.js'; -import type { PrimaryKeyConstraintNode } from './primary-key-constraint-node.js'; -import type { UniqueConstraintNode } from './unique-constraint-node.js'; -export type ConstraintNode = PrimaryKeyConstraintNode | UniqueConstraintNode | CheckConstraintNode | ForeignKeyConstraintNode; diff --git a/node_modules/kysely/dist/cjs/operation-node/constraint-node.js b/node_modules/kysely/dist/cjs/operation-node/constraint-node.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/constraint-node.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/operation-node/create-index-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/create-index-node.d.ts deleted file mode 100644 index 1dc2b40..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/create-index-node.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { IdentifierNode } from './identifier-node.js'; -import type { OperationNode } from './operation-node.js'; -import type { RawNode } from './raw-node.js'; -import type { TableNode } from './table-node.js'; -import type { WhereNode } from './where-node.js'; -export type CreateIndexNodeProps = Omit; -export type IndexType = 'btree' | 'hash' | 'gist' | 'gin'; -export interface CreateIndexNode extends OperationNode { - readonly kind: 'CreateIndexNode'; - readonly name: IdentifierNode; - readonly table?: TableNode; - readonly columns?: OperationNode[]; - readonly unique?: boolean; - readonly using?: RawNode; - readonly ifNotExists?: boolean; - readonly where?: WhereNode; - readonly nullsNotDistinct?: boolean; -} -type CreateIndexNodeFactory = Readonly<{ - is(node: OperationNode): node is CreateIndexNode; - create(name: string): Readonly; - cloneWith(node: CreateIndexNode, props: CreateIndexNodeProps): Readonly; - cloneWithColumns(node: CreateIndexNode, columns: OperationNode[]): Readonly; -}>; -/** - * @internal - */ -export declare const CreateIndexNode: CreateIndexNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/create-index-node.js b/node_modules/kysely/dist/cjs/operation-node/create-index-node.js deleted file mode 100644 index c560a90..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/create-index-node.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CreateIndexNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const identifier_node_js_1 = require("./identifier-node.js"); -/** - * @internal - */ -exports.CreateIndexNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'CreateIndexNode'; - }, - create(name) { - return (0, object_utils_js_1.freeze)({ - kind: 'CreateIndexNode', - name: identifier_node_js_1.IdentifierNode.create(name), - }); - }, - cloneWith(node, props) { - return (0, object_utils_js_1.freeze)({ - ...node, - ...props, - }); - }, - cloneWithColumns(node, columns) { - return (0, object_utils_js_1.freeze)({ - ...node, - columns: [...(node.columns || []), ...columns], - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/create-schema-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/create-schema-node.d.ts deleted file mode 100644 index 1fa0404..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/create-schema-node.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { IdentifierNode } from './identifier-node.js'; -import type { OperationNode } from './operation-node.js'; -export type CreateSchemaNodeParams = Omit, 'kind' | 'schema'>; -export interface CreateSchemaNode extends OperationNode { - readonly kind: 'CreateSchemaNode'; - readonly schema: IdentifierNode; - readonly ifNotExists?: boolean; -} -type CreateSchemaNodeFactory = Readonly<{ - is(node: OperationNode): node is CreateSchemaNode; - create(schema: string, params?: CreateSchemaNodeParams): Readonly; - cloneWith(createSchema: CreateSchemaNode, params: CreateSchemaNodeParams): Readonly; -}>; -/** - * @internal - */ -export declare const CreateSchemaNode: CreateSchemaNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/create-schema-node.js b/node_modules/kysely/dist/cjs/operation-node/create-schema-node.js deleted file mode 100644 index 58c93ef..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/create-schema-node.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CreateSchemaNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const identifier_node_js_1 = require("./identifier-node.js"); -/** - * @internal - */ -exports.CreateSchemaNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'CreateSchemaNode'; - }, - create(schema, params) { - return (0, object_utils_js_1.freeze)({ - kind: 'CreateSchemaNode', - schema: identifier_node_js_1.IdentifierNode.create(schema), - ...params, - }); - }, - cloneWith(createSchema, params) { - return (0, object_utils_js_1.freeze)({ - ...createSchema, - ...params, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/create-table-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/create-table-node.d.ts deleted file mode 100644 index f5d6cd7..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/create-table-node.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { TableNode } from './table-node.js'; -import type { ConstraintNode } from './constraint-node.js'; -import type { ColumnDefinitionNode } from './column-definition-node.js'; -import type { ArrayItemType } from '../util/type-utils.js'; -export declare const ON_COMMIT_ACTIONS: string[]; -export type OnCommitAction = ArrayItemType; -export type CreateTableNodeParams = Omit; -export interface CreateTableNode extends OperationNode { - readonly kind: 'CreateTableNode'; - readonly table: TableNode; - readonly columns: ReadonlyArray; - readonly constraints?: ReadonlyArray; - readonly temporary?: boolean; - readonly ifNotExists?: boolean; - readonly onCommit?: OnCommitAction; - readonly frontModifiers?: ReadonlyArray; - readonly endModifiers?: ReadonlyArray; - readonly selectQuery?: OperationNode; -} -type CreateTableNodeFactory = Readonly<{ - is(node: OperationNode): node is CreateTableNode; - create(table: TableNode): Readonly; - cloneWithColumn(createTable: CreateTableNode, column: ColumnDefinitionNode): Readonly; - cloneWithConstraint(createTable: CreateTableNode, constraint: ConstraintNode): Readonly; - cloneWithFrontModifier(createTable: CreateTableNode, modifier: OperationNode): Readonly; - cloneWithEndModifier(createTable: CreateTableNode, modifier: OperationNode): Readonly; - cloneWith(createTable: CreateTableNode, params: CreateTableNodeParams): Readonly; -}>; -/** - * @internal - */ -export declare const CreateTableNode: CreateTableNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/create-table-node.js b/node_modules/kysely/dist/cjs/operation-node/create-table-node.js deleted file mode 100644 index 2119f3e..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/create-table-node.js +++ /dev/null @@ -1,56 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CreateTableNode = exports.ON_COMMIT_ACTIONS = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -exports.ON_COMMIT_ACTIONS = ['preserve rows', 'delete rows', 'drop']; -/** - * @internal - */ -exports.CreateTableNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'CreateTableNode'; - }, - create(table) { - return (0, object_utils_js_1.freeze)({ - kind: 'CreateTableNode', - table, - columns: (0, object_utils_js_1.freeze)([]), - }); - }, - cloneWithColumn(createTable, column) { - return (0, object_utils_js_1.freeze)({ - ...createTable, - columns: (0, object_utils_js_1.freeze)([...createTable.columns, column]), - }); - }, - cloneWithConstraint(createTable, constraint) { - return (0, object_utils_js_1.freeze)({ - ...createTable, - constraints: createTable.constraints - ? (0, object_utils_js_1.freeze)([...createTable.constraints, constraint]) - : (0, object_utils_js_1.freeze)([constraint]), - }); - }, - cloneWithFrontModifier(createTable, modifier) { - return (0, object_utils_js_1.freeze)({ - ...createTable, - frontModifiers: createTable.frontModifiers - ? (0, object_utils_js_1.freeze)([...createTable.frontModifiers, modifier]) - : (0, object_utils_js_1.freeze)([modifier]), - }); - }, - cloneWithEndModifier(createTable, modifier) { - return (0, object_utils_js_1.freeze)({ - ...createTable, - endModifiers: createTable.endModifiers - ? (0, object_utils_js_1.freeze)([...createTable.endModifiers, modifier]) - : (0, object_utils_js_1.freeze)([modifier]), - }); - }, - cloneWith(createTable, params) { - return (0, object_utils_js_1.freeze)({ - ...createTable, - ...params, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/create-type-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/create-type-node.d.ts deleted file mode 100644 index dc2400e..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/create-type-node.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { SchemableIdentifierNode } from './schemable-identifier-node.js'; -import { ValueListNode } from './value-list-node.js'; -export type CreateTypeNodeParams = Omit, 'kind'>; -export interface CreateTypeNode extends OperationNode { - readonly kind: 'CreateTypeNode'; - readonly name: SchemableIdentifierNode; - readonly enum?: ValueListNode; -} -type CreateTypeNodeFactory = Readonly<{ - is(node: OperationNode): node is CreateTypeNode; - create(name: SchemableIdentifierNode): Readonly; - cloneWithEnum(createType: CreateTypeNode, values: readonly string[]): Readonly; -}>; -/** - * @internal - */ -export declare const CreateTypeNode: CreateTypeNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/create-type-node.js b/node_modules/kysely/dist/cjs/operation-node/create-type-node.js deleted file mode 100644 index 1a3c410..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/create-type-node.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CreateTypeNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const value_list_node_js_1 = require("./value-list-node.js"); -const value_node_js_1 = require("./value-node.js"); -/** - * @internal - */ -exports.CreateTypeNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'CreateTypeNode'; - }, - create(name) { - return (0, object_utils_js_1.freeze)({ - kind: 'CreateTypeNode', - name, - }); - }, - cloneWithEnum(createType, values) { - return (0, object_utils_js_1.freeze)({ - ...createType, - enum: value_list_node_js_1.ValueListNode.create(values.map(value_node_js_1.ValueNode.createImmediate)), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/create-view-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/create-view-node.d.ts deleted file mode 100644 index cab2f4e..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/create-view-node.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import type { ColumnNode } from './column-node.js'; -import type { OperationNode } from './operation-node.js'; -import type { RawNode } from './raw-node.js'; -import { SchemableIdentifierNode } from './schemable-identifier-node.js'; -import type { SelectQueryNode } from './select-query-node.js'; -export type CreateViewNodeParams = Omit, 'kind' | 'name'>; -export interface CreateViewNode extends OperationNode { - readonly kind: 'CreateViewNode'; - readonly name: SchemableIdentifierNode; - readonly temporary?: boolean; - readonly materialized?: boolean; - readonly orReplace?: boolean; - readonly ifNotExists?: boolean; - readonly columns?: ReadonlyArray; - readonly as?: SelectQueryNode | RawNode; -} -type CreateViewNodeFactory = Readonly<{ - is(node: OperationNode): node is CreateViewNode; - create(name: string): Readonly; - cloneWith(createView: CreateViewNode, params: CreateViewNodeParams): Readonly; -}>; -/** - * @internal - */ -export declare const CreateViewNode: CreateViewNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/create-view-node.js b/node_modules/kysely/dist/cjs/operation-node/create-view-node.js deleted file mode 100644 index ee61ac0..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/create-view-node.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CreateViewNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const schemable_identifier_node_js_1 = require("./schemable-identifier-node.js"); -/** - * @internal - */ -exports.CreateViewNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'CreateViewNode'; - }, - create(name) { - return (0, object_utils_js_1.freeze)({ - kind: 'CreateViewNode', - name: schemable_identifier_node_js_1.SchemableIdentifierNode.create(name), - }); - }, - cloneWith(createView, params) { - return (0, object_utils_js_1.freeze)({ - ...createView, - ...params, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/data-type-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/data-type-node.d.ts deleted file mode 100644 index 15abd4d..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/data-type-node.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -declare const SIMPLE_COLUMN_DATA_TYPES: readonly ["varchar", "char", "text", "integer", "int2", "int4", "int8", "smallint", "bigint", "boolean", "real", "double precision", "float4", "float8", "decimal", "numeric", "binary", "bytea", "date", "datetime", "time", "timetz", "timestamp", "timestamptz", "serial", "bigserial", "uuid", "json", "jsonb", "blob", "varbinary", "int4range", "int4multirange", "int8range", "int8multirange", "numrange", "nummultirange", "tsrange", "tsmultirange", "tstzrange", "tstzmultirange", "daterange", "datemultirange"]; -type SimpleColumnDataType = (typeof SIMPLE_COLUMN_DATA_TYPES)[number]; -export type ColumnDataType = SimpleColumnDataType | `varchar(${number})` | `char(${number})` | `decimal(${number}, ${number})` | `numeric(${number}, ${number})` | `binary(${number})` | `datetime(${number})` | `time(${number})` | `timetz(${number})` | `timestamp(${number})` | `timestamptz(${number})` | `varbinary(${number})`; -export type DataTypeParams = Omit; -export interface DataTypeNode extends OperationNode { - readonly kind: 'DataTypeNode'; - readonly dataType: ColumnDataType; -} -type DataTypeNodeFactory = Readonly<{ - is(node: OperationNode): node is DataTypeNode; - create(dataType: ColumnDataType): Readonly; -}>; -/** - * @internal - */ -export declare const DataTypeNode: DataTypeNodeFactory; -export declare function isColumnDataType(dataType: string): dataType is ColumnDataType; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/data-type-node.js b/node_modules/kysely/dist/cjs/operation-node/data-type-node.js deleted file mode 100644 index dadd663..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/data-type-node.js +++ /dev/null @@ -1,86 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DataTypeNode = void 0; -exports.isColumnDataType = isColumnDataType; -const object_utils_js_1 = require("../util/object-utils.js"); -const SIMPLE_COLUMN_DATA_TYPES = [ - 'varchar', - 'char', - 'text', - 'integer', - 'int2', - 'int4', - 'int8', - 'smallint', - 'bigint', - 'boolean', - 'real', - 'double precision', - 'float4', - 'float8', - 'decimal', - 'numeric', - 'binary', - 'bytea', - 'date', - 'datetime', - 'time', - 'timetz', - 'timestamp', - 'timestamptz', - 'serial', - 'bigserial', - 'uuid', - 'json', - 'jsonb', - 'blob', - 'varbinary', - 'int4range', - 'int4multirange', - 'int8range', - 'int8multirange', - 'numrange', - 'nummultirange', - 'tsrange', - 'tsmultirange', - 'tstzrange', - 'tstzmultirange', - 'daterange', - 'datemultirange', -]; -const COLUMN_DATA_TYPE_REGEX = [ - /^varchar\(\d+\)$/, - /^char\(\d+\)$/, - /^decimal\(\d+, \d+\)$/, - /^numeric\(\d+, \d+\)$/, - /^binary\(\d+\)$/, - /^datetime\(\d+\)$/, - /^time\(\d+\)$/, - /^timetz\(\d+\)$/, - /^timestamp\(\d+\)$/, - /^timestamptz\(\d+\)$/, - /^varbinary\(\d+\)$/, -]; -/** - * @internal - */ -exports.DataTypeNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'DataTypeNode'; - }, - create(dataType) { - return (0, object_utils_js_1.freeze)({ - kind: 'DataTypeNode', - dataType, - }); - }, -}); -function isColumnDataType(dataType) { - if (SIMPLE_COLUMN_DATA_TYPES.includes(dataType)) { - return true; - } - if (COLUMN_DATA_TYPE_REGEX.some((r) => r.test(dataType))) { - return true; - } - return false; -} diff --git a/node_modules/kysely/dist/cjs/operation-node/default-insert-value-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/default-insert-value-node.d.ts deleted file mode 100644 index aeff284..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/default-insert-value-node.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface DefaultInsertValueNode extends OperationNode { - readonly kind: 'DefaultInsertValueNode'; -} -type DefaultInsertValueNodeFactory = Readonly<{ - is(node: OperationNode): node is DefaultInsertValueNode; - create(): Readonly; -}>; -/** - * @internal - */ -export declare const DefaultInsertValueNode: DefaultInsertValueNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/default-insert-value-node.js b/node_modules/kysely/dist/cjs/operation-node/default-insert-value-node.js deleted file mode 100644 index 834229a..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/default-insert-value-node.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DefaultInsertValueNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.DefaultInsertValueNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'DefaultInsertValueNode'; - }, - create() { - return (0, object_utils_js_1.freeze)({ - kind: 'DefaultInsertValueNode', - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/default-value-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/default-value-node.d.ts deleted file mode 100644 index b9798bb..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/default-value-node.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface DefaultValueNode extends OperationNode { - readonly kind: 'DefaultValueNode'; - readonly defaultValue: OperationNode; -} -type DefaultValueNodeFactory = Readonly<{ - is(node: OperationNode): node is DefaultValueNode; - create(defaultValue: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const DefaultValueNode: DefaultValueNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/default-value-node.js b/node_modules/kysely/dist/cjs/operation-node/default-value-node.js deleted file mode 100644 index 9706b18..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/default-value-node.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DefaultValueNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.DefaultValueNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'DefaultValueNode'; - }, - create(defaultValue) { - return (0, object_utils_js_1.freeze)({ - kind: 'DefaultValueNode', - defaultValue, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/delete-query-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/delete-query-node.d.ts deleted file mode 100644 index e598a18..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/delete-query-node.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { FromNode } from './from-node.js'; -import type { JoinNode } from './join-node.js'; -import type { OperationNode } from './operation-node.js'; -import type { ReturningNode } from './returning-node.js'; -import type { WhereNode } from './where-node.js'; -import type { WithNode } from './with-node.js'; -import type { LimitNode } from './limit-node.js'; -import type { OrderByNode } from './order-by-node.js'; -import type { OrderByItemNode } from './order-by-item-node.js'; -import type { ExplainNode } from './explain-node.js'; -import { UsingNode } from './using-node.js'; -import type { TopNode } from './top-node.js'; -import type { OutputNode } from './output-node.js'; -export interface DeleteQueryNode extends OperationNode { - readonly kind: 'DeleteQueryNode'; - readonly from: FromNode; - readonly using?: UsingNode; - readonly joins?: ReadonlyArray; - readonly where?: WhereNode; - readonly returning?: ReturningNode; - readonly with?: WithNode; - readonly orderBy?: OrderByNode; - readonly limit?: LimitNode; - readonly explain?: ExplainNode; - readonly endModifiers?: ReadonlyArray; - readonly top?: TopNode; - readonly output?: OutputNode; -} -type DeleteQueryNodeFactory = Readonly<{ - is(node: OperationNode): node is DeleteQueryNode; - create(fromItems: OperationNode[], withNode?: WithNode): Readonly; - cloneWithOrderByItems(node: DeleteQueryNode, items: ReadonlyArray): Readonly; - cloneWithoutOrderBy(node: DeleteQueryNode): Readonly; - cloneWithLimit(deleteNode: DeleteQueryNode, limit: LimitNode): Readonly; - cloneWithoutLimit(deleteNode: DeleteQueryNode): Readonly; - cloneWithUsing(deleteNode: DeleteQueryNode, tables: OperationNode[]): Readonly; -}>; -/** - * @internal - */ -export declare const DeleteQueryNode: DeleteQueryNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/delete-query-node.js b/node_modules/kysely/dist/cjs/operation-node/delete-query-node.js deleted file mode 100644 index b93893d..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/delete-query-node.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DeleteQueryNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const from_node_js_1 = require("./from-node.js"); -const using_node_js_1 = require("./using-node.js"); -const query_node_js_1 = require("./query-node.js"); -/** - * @internal - */ -exports.DeleteQueryNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'DeleteQueryNode'; - }, - create(fromItems, withNode) { - return (0, object_utils_js_1.freeze)({ - kind: 'DeleteQueryNode', - from: from_node_js_1.FromNode.create(fromItems), - ...(withNode && { with: withNode }), - }); - }, - // TODO: remove in v0.29 - /** - * @deprecated Use `QueryNode.cloneWithoutOrderBy` instead. - */ - cloneWithOrderByItems: (node, items) => query_node_js_1.QueryNode.cloneWithOrderByItems(node, items), - // TODO: remove in v0.29 - /** - * @deprecated Use `QueryNode.cloneWithoutOrderBy` instead. - */ - cloneWithoutOrderBy: (node) => query_node_js_1.QueryNode.cloneWithoutOrderBy(node), - cloneWithLimit(deleteNode, limit) { - return (0, object_utils_js_1.freeze)({ - ...deleteNode, - limit, - }); - }, - cloneWithoutLimit(deleteNode) { - return (0, object_utils_js_1.freeze)({ - ...deleteNode, - limit: undefined, - }); - }, - cloneWithUsing(deleteNode, tables) { - return (0, object_utils_js_1.freeze)({ - ...deleteNode, - using: deleteNode.using !== undefined - ? using_node_js_1.UsingNode.cloneWithTables(deleteNode.using, tables) - : using_node_js_1.UsingNode.create(tables), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/drop-column-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/drop-column-node.d.ts deleted file mode 100644 index 41789f6..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/drop-column-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import { ColumnNode } from './column-node.js'; -export interface DropColumnNode extends OperationNode { - readonly kind: 'DropColumnNode'; - readonly column: ColumnNode; -} -type DropColumnNodeFactory = Readonly<{ - is(node: OperationNode): node is DropColumnNode; - create(column: string): Readonly; -}>; -/** - * @internal - */ -export declare const DropColumnNode: DropColumnNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/drop-column-node.js b/node_modules/kysely/dist/cjs/operation-node/drop-column-node.js deleted file mode 100644 index bde5425..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/drop-column-node.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DropColumnNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const column_node_js_1 = require("./column-node.js"); -/** - * @internal - */ -exports.DropColumnNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'DropColumnNode'; - }, - create(column) { - return (0, object_utils_js_1.freeze)({ - kind: 'DropColumnNode', - column: column_node_js_1.ColumnNode.create(column), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/drop-constraint-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/drop-constraint-node.d.ts deleted file mode 100644 index 88b3234..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/drop-constraint-node.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import { IdentifierNode } from './identifier-node.js'; -export type DropConstraintNodeProps = Omit; -export interface DropConstraintNode extends OperationNode { - readonly kind: 'DropConstraintNode'; - readonly constraintName: IdentifierNode; - readonly ifExists?: boolean; - readonly modifier?: 'cascade' | 'restrict'; -} -type DropConstraintNodeFactory = Readonly<{ - is(node: OperationNode): node is DropConstraintNode; - create(constraintName: string, params?: DropConstraintNodeProps): Readonly; - cloneWith(dropConstraint: DropConstraintNode, props: DropConstraintNodeProps): Readonly; -}>; -/** - * @internal - */ -export declare const DropConstraintNode: DropConstraintNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/drop-constraint-node.js b/node_modules/kysely/dist/cjs/operation-node/drop-constraint-node.js deleted file mode 100644 index 806d1d5..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/drop-constraint-node.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DropConstraintNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const identifier_node_js_1 = require("./identifier-node.js"); -/** - * @internal - */ -exports.DropConstraintNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'DropConstraintNode'; - }, - create(constraintName) { - return (0, object_utils_js_1.freeze)({ - kind: 'DropConstraintNode', - constraintName: identifier_node_js_1.IdentifierNode.create(constraintName), - }); - }, - cloneWith(dropConstraint, props) { - return (0, object_utils_js_1.freeze)({ - ...dropConstraint, - ...props, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/drop-index-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/drop-index-node.d.ts deleted file mode 100644 index 5d3ff4d..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/drop-index-node.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import { SchemableIdentifierNode } from './schemable-identifier-node.js'; -import type { TableNode } from './table-node.js'; -export type DropIndexNodeProps = Omit; -export interface DropIndexNode extends OperationNode { - readonly kind: 'DropIndexNode'; - readonly name: SchemableIdentifierNode; - readonly table?: TableNode; - readonly ifExists?: boolean; - readonly cascade?: boolean; -} -type DropIndexNodeFactory = Readonly<{ - is(node: OperationNode): node is DropIndexNode; - create(name: string, params?: DropIndexNodeProps): Readonly; - cloneWith(dropIndex: DropIndexNode, props: DropIndexNodeProps): Readonly; -}>; -/** - * @internal - */ -export declare const DropIndexNode: DropIndexNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/drop-index-node.js b/node_modules/kysely/dist/cjs/operation-node/drop-index-node.js deleted file mode 100644 index 542d790..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/drop-index-node.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DropIndexNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const schemable_identifier_node_js_1 = require("./schemable-identifier-node.js"); -/** - * @internal - */ -exports.DropIndexNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'DropIndexNode'; - }, - create(name, params) { - return (0, object_utils_js_1.freeze)({ - kind: 'DropIndexNode', - name: schemable_identifier_node_js_1.SchemableIdentifierNode.create(name), - ...params, - }); - }, - cloneWith(dropIndex, props) { - return (0, object_utils_js_1.freeze)({ - ...dropIndex, - ...props, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/drop-schema-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/drop-schema-node.d.ts deleted file mode 100644 index c539c63..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/drop-schema-node.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { IdentifierNode } from './identifier-node.js'; -import type { OperationNode } from './operation-node.js'; -export type DropSchemaNodeParams = Omit, 'kind' | 'schema'>; -export interface DropSchemaNode extends OperationNode { - readonly kind: 'DropSchemaNode'; - readonly schema: IdentifierNode; - readonly ifExists?: boolean; - readonly cascade?: boolean; -} -type DropSchemaNodeFactory = Readonly<{ - is(node: OperationNode): node is DropSchemaNode; - create(schema: string, params?: DropSchemaNodeParams): Readonly; - cloneWith(dropSchema: DropSchemaNode, params: DropSchemaNodeParams): Readonly; -}>; -/** - * @internal - */ -export declare const DropSchemaNode: DropSchemaNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/drop-schema-node.js b/node_modules/kysely/dist/cjs/operation-node/drop-schema-node.js deleted file mode 100644 index 8274f44..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/drop-schema-node.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DropSchemaNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const identifier_node_js_1 = require("./identifier-node.js"); -/** - * @internal - */ -exports.DropSchemaNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'DropSchemaNode'; - }, - create(schema, params) { - return (0, object_utils_js_1.freeze)({ - kind: 'DropSchemaNode', - schema: identifier_node_js_1.IdentifierNode.create(schema), - ...params, - }); - }, - cloneWith(dropSchema, params) { - return (0, object_utils_js_1.freeze)({ - ...dropSchema, - ...params, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/drop-table-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/drop-table-node.d.ts deleted file mode 100644 index 97aab82..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/drop-table-node.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { TableNode } from './table-node.js'; -export type DropTablexNodeParams = Omit, 'kind' | 'table'>; -export interface DropTableNode extends OperationNode { - readonly kind: 'DropTableNode'; - readonly table: TableNode; - readonly ifExists?: boolean; - readonly cascade?: boolean; -} -type DropTableNodeFactory = Readonly<{ - is(node: OperationNode): node is DropTableNode; - create(table: TableNode, params?: DropTablexNodeParams): Readonly; - cloneWith(dropIndex: DropTableNode, params: DropTablexNodeParams): Readonly; -}>; -/** - * @internal - */ -export declare const DropTableNode: DropTableNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/drop-table-node.js b/node_modules/kysely/dist/cjs/operation-node/drop-table-node.js deleted file mode 100644 index f2a36e5..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/drop-table-node.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DropTableNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.DropTableNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'DropTableNode'; - }, - create(table, params) { - return (0, object_utils_js_1.freeze)({ - kind: 'DropTableNode', - table, - ...params, - }); - }, - cloneWith(dropIndex, params) { - return (0, object_utils_js_1.freeze)({ - ...dropIndex, - ...params, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/drop-type-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/drop-type-node.d.ts deleted file mode 100644 index 07aed5f..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/drop-type-node.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { SchemableIdentifierNode } from './schemable-identifier-node.js'; -export type DropTypeNodeParams = Omit, 'kind' | 'name'>; -export interface DropTypeNode extends OperationNode { - readonly kind: 'DropTypeNode'; - readonly name: SchemableIdentifierNode; - readonly ifExists?: boolean; -} -type DropTypeNodeFactory = Readonly<{ - is(node: OperationNode): node is DropTypeNode; - create(name: SchemableIdentifierNode): Readonly; - cloneWith(dropType: DropTypeNode, params: DropTypeNodeParams): Readonly; -}>; -/** - * @internal - */ -export declare const DropTypeNode: DropTypeNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/drop-type-node.js b/node_modules/kysely/dist/cjs/operation-node/drop-type-node.js deleted file mode 100644 index ad56b2b..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/drop-type-node.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DropTypeNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.DropTypeNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'DropTypeNode'; - }, - create(name) { - return (0, object_utils_js_1.freeze)({ - kind: 'DropTypeNode', - name, - }); - }, - cloneWith(dropType, params) { - return (0, object_utils_js_1.freeze)({ - ...dropType, - ...params, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/drop-view-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/drop-view-node.d.ts deleted file mode 100644 index 6d194b7..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/drop-view-node.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import { SchemableIdentifierNode } from './schemable-identifier-node.js'; -export type DropViewNodeParams = Omit, 'kind' | 'name'>; -export interface DropViewNode extends OperationNode { - readonly kind: 'DropViewNode'; - readonly name: SchemableIdentifierNode; - readonly ifExists?: boolean; - readonly materialized?: boolean; - readonly cascade?: boolean; -} -type DropViewNodeFactory = Readonly<{ - is(node: OperationNode): node is DropViewNode; - create(name: string): Readonly; - cloneWith(dropView: DropViewNode, params: DropViewNodeParams): Readonly; -}>; -/** - * @internal - */ -export declare const DropViewNode: DropViewNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/drop-view-node.js b/node_modules/kysely/dist/cjs/operation-node/drop-view-node.js deleted file mode 100644 index 17c83fe..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/drop-view-node.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DropViewNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const schemable_identifier_node_js_1 = require("./schemable-identifier-node.js"); -/** - * @internal - */ -exports.DropViewNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'DropViewNode'; - }, - create(name) { - return (0, object_utils_js_1.freeze)({ - kind: 'DropViewNode', - name: schemable_identifier_node_js_1.SchemableIdentifierNode.create(name), - }); - }, - cloneWith(dropView, params) { - return (0, object_utils_js_1.freeze)({ - ...dropView, - ...params, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/explain-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/explain-node.d.ts deleted file mode 100644 index e796278..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/explain-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { ExplainFormat } from '../util/explainable.js'; -import type { OperationNode } from './operation-node.js'; -export interface ExplainNode extends OperationNode { - readonly kind: 'ExplainNode'; - readonly format?: ExplainFormat; - readonly options?: OperationNode; -} -type ExplainNodeFactory = Readonly<{ - is(node: OperationNode): node is ExplainNode; - create(format?: ExplainFormat, options?: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const ExplainNode: ExplainNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/explain-node.js b/node_modules/kysely/dist/cjs/operation-node/explain-node.js deleted file mode 100644 index 5335e42..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/explain-node.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ExplainNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.ExplainNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'ExplainNode'; - }, - create(format, options) { - return (0, object_utils_js_1.freeze)({ - kind: 'ExplainNode', - format, - options, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/fetch-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/fetch-node.d.ts deleted file mode 100644 index 1719023..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/fetch-node.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import { ValueNode } from './value-node.js'; -export type FetchModifier = 'only' | 'with ties'; -export interface FetchNode extends OperationNode { - readonly kind: 'FetchNode'; - readonly rowCount: ValueNode; - readonly modifier: FetchModifier; -} -type FetchNodeFactory = Readonly<{ - is(node: OperationNode): node is FetchNode; - create(rowCount: number | bigint, modifier: FetchModifier): Readonly; -}>; -/** - * @internal - */ -export declare const FetchNode: FetchNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/fetch-node.js b/node_modules/kysely/dist/cjs/operation-node/fetch-node.js deleted file mode 100644 index 1323d48..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/fetch-node.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.FetchNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const value_node_js_1 = require("./value-node.js"); -/** - * @internal - */ -exports.FetchNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'FetchNode'; - }, - create(rowCount, modifier) { - return { - kind: 'FetchNode', - rowCount: value_node_js_1.ValueNode.create(rowCount), - modifier, - }; - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/foreign-key-constraint-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/foreign-key-constraint-node.d.ts deleted file mode 100644 index 7dc6333..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/foreign-key-constraint-node.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import type { ColumnNode } from './column-node.js'; -import { IdentifierNode } from './identifier-node.js'; -import type { OperationNode } from './operation-node.js'; -import { type OnModifyForeignAction, ReferencesNode } from './references-node.js'; -import type { TableNode } from './table-node.js'; -export type ForeignKeyConstraintNodeProps = Omit; -export interface ForeignKeyConstraintNode extends OperationNode { - readonly kind: 'ForeignKeyConstraintNode'; - readonly columns: ReadonlyArray; - readonly references: ReferencesNode; - readonly onDelete?: OnModifyForeignAction; - readonly onUpdate?: OnModifyForeignAction; - readonly name?: IdentifierNode; - readonly deferrable?: boolean; - readonly initiallyDeferred?: boolean; -} -type ForeignKeyConstraintNodeFactory = Readonly<{ - is(node: OperationNode): node is ForeignKeyConstraintNode; - create(sourceColumns: ReadonlyArray, targetTable: TableNode, targetColumns: ReadonlyArray, constraintName?: string): Readonly; - cloneWith(node: ForeignKeyConstraintNode, props: ForeignKeyConstraintNodeProps): Readonly; -}>; -/** - * @internal - */ -export declare const ForeignKeyConstraintNode: ForeignKeyConstraintNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/foreign-key-constraint-node.js b/node_modules/kysely/dist/cjs/operation-node/foreign-key-constraint-node.js deleted file mode 100644 index 7fa634e..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/foreign-key-constraint-node.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ForeignKeyConstraintNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const identifier_node_js_1 = require("./identifier-node.js"); -const references_node_js_1 = require("./references-node.js"); -/** - * @internal - */ -exports.ForeignKeyConstraintNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'ForeignKeyConstraintNode'; - }, - create(sourceColumns, targetTable, targetColumns, constraintName) { - return (0, object_utils_js_1.freeze)({ - kind: 'ForeignKeyConstraintNode', - columns: sourceColumns, - references: references_node_js_1.ReferencesNode.create(targetTable, targetColumns), - name: constraintName - ? identifier_node_js_1.IdentifierNode.create(constraintName) - : undefined, - }); - }, - cloneWith(node, props) { - return (0, object_utils_js_1.freeze)({ - ...node, - ...props, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/from-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/from-node.d.ts deleted file mode 100644 index 1ee2606..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/from-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface FromNode extends OperationNode { - readonly kind: 'FromNode'; - readonly froms: ReadonlyArray; -} -type FromNodeFactory = Readonly<{ - is(node: OperationNode): node is FromNode; - create(froms: ReadonlyArray): Readonly; - cloneWithFroms(from: FromNode, froms: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const FromNode: FromNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/from-node.js b/node_modules/kysely/dist/cjs/operation-node/from-node.js deleted file mode 100644 index 98c2bae..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/from-node.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.FromNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.FromNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'FromNode'; - }, - create(froms) { - return (0, object_utils_js_1.freeze)({ - kind: 'FromNode', - froms: (0, object_utils_js_1.freeze)(froms), - }); - }, - cloneWithFroms(from, froms) { - return (0, object_utils_js_1.freeze)({ - ...from, - froms: (0, object_utils_js_1.freeze)([...from.froms, ...froms]), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/function-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/function-node.d.ts deleted file mode 100644 index ff9c17e..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/function-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface FunctionNode extends OperationNode { - readonly kind: 'FunctionNode'; - readonly func: string; - readonly arguments: ReadonlyArray; -} -type FunctionNodeFactory = Readonly<{ - is(node: OperationNode): node is FunctionNode; - create(func: string, args: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const FunctionNode: FunctionNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/function-node.js b/node_modules/kysely/dist/cjs/operation-node/function-node.js deleted file mode 100644 index 5ff299f..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/function-node.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.FunctionNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.FunctionNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'FunctionNode'; - }, - create(func, args) { - return (0, object_utils_js_1.freeze)({ - kind: 'FunctionNode', - func, - arguments: args, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/generated-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/generated-node.d.ts deleted file mode 100644 index b05d1fb..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/generated-node.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export type GeneratedNodeParams = Omit; -export interface GeneratedNode extends OperationNode { - readonly kind: 'GeneratedNode'; - readonly byDefault?: boolean; - readonly always?: boolean; - readonly identity?: boolean; - readonly stored?: boolean; - readonly expression?: OperationNode; -} -type GeneratedNodeFactory = Readonly<{ - is(node: OperationNode): node is GeneratedNode; - create(params: GeneratedNodeParams): Readonly; - createWithExpression(expression: OperationNode): Readonly; - cloneWith(node: GeneratedNode, params: GeneratedNodeParams): Readonly; -}>; -/** - * @internal - */ -export declare const GeneratedNode: GeneratedNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/generated-node.js b/node_modules/kysely/dist/cjs/operation-node/generated-node.js deleted file mode 100644 index 7c7cd70..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/generated-node.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GeneratedNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.GeneratedNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'GeneratedNode'; - }, - create(params) { - return (0, object_utils_js_1.freeze)({ - kind: 'GeneratedNode', - ...params, - }); - }, - createWithExpression(expression) { - return (0, object_utils_js_1.freeze)({ - kind: 'GeneratedNode', - always: true, - expression, - }); - }, - cloneWith(node, params) { - return (0, object_utils_js_1.freeze)({ - ...node, - ...params, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/group-by-item-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/group-by-item-node.d.ts deleted file mode 100644 index 8bff7fe..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/group-by-item-node.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface GroupByItemNode extends OperationNode { - readonly kind: 'GroupByItemNode'; - readonly groupBy: OperationNode; -} -type GroupByItemNodeFactory = Readonly<{ - is(node: OperationNode): node is GroupByItemNode; - create(groupBy: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const GroupByItemNode: GroupByItemNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/group-by-item-node.js b/node_modules/kysely/dist/cjs/operation-node/group-by-item-node.js deleted file mode 100644 index 2257bda..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/group-by-item-node.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GroupByItemNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.GroupByItemNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'GroupByItemNode'; - }, - create(groupBy) { - return (0, object_utils_js_1.freeze)({ - kind: 'GroupByItemNode', - groupBy, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/group-by-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/group-by-node.d.ts deleted file mode 100644 index a1092b3..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/group-by-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { GroupByItemNode } from './group-by-item-node.js'; -export interface GroupByNode extends OperationNode { - readonly kind: 'GroupByNode'; - readonly items: ReadonlyArray; -} -type GroupByNodeFactory = Readonly<{ - is(node: OperationNode): node is GroupByNode; - create(items: ReadonlyArray): Readonly; - cloneWithItems(groupBy: GroupByNode, items: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const GroupByNode: GroupByNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/group-by-node.js b/node_modules/kysely/dist/cjs/operation-node/group-by-node.js deleted file mode 100644 index cd8eb07..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/group-by-node.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GroupByNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.GroupByNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'GroupByNode'; - }, - create(items) { - return (0, object_utils_js_1.freeze)({ - kind: 'GroupByNode', - items: (0, object_utils_js_1.freeze)(items), - }); - }, - cloneWithItems(groupBy, items) { - return (0, object_utils_js_1.freeze)({ - ...groupBy, - items: (0, object_utils_js_1.freeze)([...groupBy.items, ...items]), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/having-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/having-node.d.ts deleted file mode 100644 index 584d7c5..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/having-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface HavingNode extends OperationNode { - readonly kind: 'HavingNode'; - readonly having: OperationNode; -} -type HavingNodeFactory = Readonly<{ - is(node: OperationNode): node is HavingNode; - create(filter: OperationNode): Readonly; - cloneWithOperation(havingNode: HavingNode, operator: 'And' | 'Or', operation: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const HavingNode: HavingNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/having-node.js b/node_modules/kysely/dist/cjs/operation-node/having-node.js deleted file mode 100644 index 843d22f..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/having-node.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.HavingNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const and_node_js_1 = require("./and-node.js"); -const or_node_js_1 = require("./or-node.js"); -/** - * @internal - */ -exports.HavingNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'HavingNode'; - }, - create(filter) { - return (0, object_utils_js_1.freeze)({ - kind: 'HavingNode', - having: filter, - }); - }, - cloneWithOperation(havingNode, operator, operation) { - return (0, object_utils_js_1.freeze)({ - ...havingNode, - having: operator === 'And' - ? and_node_js_1.AndNode.create(havingNode.having, operation) - : or_node_js_1.OrNode.create(havingNode.having, operation), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/identifier-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/identifier-node.d.ts deleted file mode 100644 index 0ad0ff9..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/identifier-node.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface IdentifierNode extends OperationNode { - readonly kind: 'IdentifierNode'; - readonly name: string; -} -type IdentifierNodeFactory = Readonly<{ - is(node: OperationNode): node is IdentifierNode; - create(name: string): Readonly; -}>; -/** - * @internal - */ -export declare const IdentifierNode: IdentifierNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/identifier-node.js b/node_modules/kysely/dist/cjs/operation-node/identifier-node.js deleted file mode 100644 index 2093661..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/identifier-node.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.IdentifierNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.IdentifierNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'IdentifierNode'; - }, - create(name) { - return (0, object_utils_js_1.freeze)({ - kind: 'IdentifierNode', - name, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/insert-query-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/insert-query-node.d.ts deleted file mode 100644 index eddd5b8..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/insert-query-node.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { ColumnNode } from './column-node.js'; -import type { ExplainNode } from './explain-node.js'; -import type { OnConflictNode } from './on-conflict-node.js'; -import type { OnDuplicateKeyNode } from './on-duplicate-key-node.js'; -import type { OperationNode } from './operation-node.js'; -import type { OrActionNode } from './or-action-node.js'; -import type { OutputNode } from './output-node.js'; -import type { ReturningNode } from './returning-node.js'; -import type { TableNode } from './table-node.js'; -import type { TopNode } from './top-node.js'; -import type { WithNode } from './with-node.js'; -export type InsertQueryNodeProps = Omit; -export interface InsertQueryNode extends OperationNode { - readonly kind: 'InsertQueryNode'; - readonly into?: TableNode; - readonly columns?: ReadonlyArray; - readonly values?: OperationNode; - readonly returning?: ReturningNode; - readonly onConflict?: OnConflictNode; - readonly onDuplicateKey?: OnDuplicateKeyNode; - readonly with?: WithNode; - /** @deprecated use {@link orAction} instead. */ - readonly ignore?: boolean; - readonly orAction?: OrActionNode; - readonly replace?: boolean; - readonly explain?: ExplainNode; - readonly defaultValues?: boolean; - readonly endModifiers?: ReadonlyArray; - readonly top?: TopNode; - readonly output?: OutputNode; -} -type InsertQueryNodeFactory = Readonly<{ - is(node: OperationNode): node is InsertQueryNode; - create(into: TableNode, withNode?: WithNode, replace?: boolean): Readonly; - createWithoutInto(): Readonly; - cloneWith(insertQuery: InsertQueryNode, props: InsertQueryNodeProps): Readonly; -}>; -/** - * @internal - */ -export declare const InsertQueryNode: InsertQueryNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/insert-query-node.js b/node_modules/kysely/dist/cjs/operation-node/insert-query-node.js deleted file mode 100644 index 92caaed..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/insert-query-node.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.InsertQueryNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.InsertQueryNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'InsertQueryNode'; - }, - create(into, withNode, replace) { - return (0, object_utils_js_1.freeze)({ - kind: 'InsertQueryNode', - into, - ...(withNode && { with: withNode }), - replace, - }); - }, - createWithoutInto() { - return (0, object_utils_js_1.freeze)({ - kind: 'InsertQueryNode', - }); - }, - cloneWith(insertQuery, props) { - return (0, object_utils_js_1.freeze)({ - ...insertQuery, - ...props, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/join-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/join-node.d.ts deleted file mode 100644 index bb95e41..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/join-node.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { OnNode } from './on-node.js'; -import type { OperationNode } from './operation-node.js'; -export type JoinType = 'InnerJoin' | 'LeftJoin' | 'RightJoin' | 'FullJoin' | 'CrossJoin' | 'LateralInnerJoin' | 'LateralLeftJoin' | 'LateralCrossJoin' | 'Using' | 'OuterApply' | 'CrossApply'; -export interface JoinNode extends OperationNode { - readonly kind: 'JoinNode'; - readonly joinType: JoinType; - readonly table: OperationNode; - readonly on?: OnNode; -} -type JoinNodeFactory = Readonly<{ - is(node: OperationNode): node is JoinNode; - create(joinType: JoinType, table: OperationNode): Readonly; - createWithOn(joinType: JoinType, table: OperationNode, on: OperationNode): Readonly; - cloneWithOn(joinNode: JoinNode, operation: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const JoinNode: JoinNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/join-node.js b/node_modules/kysely/dist/cjs/operation-node/join-node.js deleted file mode 100644 index c19e518..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/join-node.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.JoinNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const on_node_js_1 = require("./on-node.js"); -/** - * @internal - */ -exports.JoinNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'JoinNode'; - }, - create(joinType, table) { - return (0, object_utils_js_1.freeze)({ - kind: 'JoinNode', - joinType, - table, - on: undefined, - }); - }, - createWithOn(joinType, table, on) { - return (0, object_utils_js_1.freeze)({ - kind: 'JoinNode', - joinType, - table, - on: on_node_js_1.OnNode.create(on), - }); - }, - cloneWithOn(joinNode, operation) { - return (0, object_utils_js_1.freeze)({ - ...joinNode, - on: joinNode.on - ? on_node_js_1.OnNode.cloneWithOperation(joinNode.on, 'And', operation) - : on_node_js_1.OnNode.create(operation), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/json-operator-chain-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/json-operator-chain-node.d.ts deleted file mode 100644 index b04117c..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/json-operator-chain-node.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { OperatorNode } from './operator-node.js'; -import type { ValueNode } from './value-node.js'; -export interface JSONOperatorChainNode extends OperationNode { - readonly kind: 'JSONOperatorChainNode'; - readonly operator: OperatorNode; - readonly values: readonly ValueNode[]; -} -type JSONOperatorChainNodeFactory = Readonly<{ - is(node: OperationNode): node is JSONOperatorChainNode; - create(operator: OperatorNode): Readonly; - cloneWithValue(node: JSONOperatorChainNode, value: ValueNode): Readonly; -}>; -/** - * @internal - */ -export declare const JSONOperatorChainNode: JSONOperatorChainNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/json-operator-chain-node.js b/node_modules/kysely/dist/cjs/operation-node/json-operator-chain-node.js deleted file mode 100644 index e6ff892..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/json-operator-chain-node.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.JSONOperatorChainNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.JSONOperatorChainNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'JSONOperatorChainNode'; - }, - create(operator) { - return (0, object_utils_js_1.freeze)({ - kind: 'JSONOperatorChainNode', - operator, - values: (0, object_utils_js_1.freeze)([]), - }); - }, - cloneWithValue(node, value) { - return (0, object_utils_js_1.freeze)({ - ...node, - values: (0, object_utils_js_1.freeze)([...node.values, value]), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/json-path-leg-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/json-path-leg-node.d.ts deleted file mode 100644 index c56114e..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/json-path-leg-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export type JSONPathLegType = 'Member' | 'ArrayLocation'; -export interface JSONPathLegNode extends OperationNode { - readonly kind: 'JSONPathLegNode'; - readonly type: JSONPathLegType; - readonly value: string | number; -} -type JSONPathLegNodeFactory = Readonly<{ - is(node: OperationNode): node is JSONPathLegNode; - create(type: JSONPathLegType, value: string | number): Readonly; -}>; -/** - * @internal - */ -export declare const JSONPathLegNode: JSONPathLegNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/json-path-leg-node.js b/node_modules/kysely/dist/cjs/operation-node/json-path-leg-node.js deleted file mode 100644 index 55fe0e1..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/json-path-leg-node.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.JSONPathLegNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.JSONPathLegNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'JSONPathLegNode'; - }, - create(type, value) { - return (0, object_utils_js_1.freeze)({ - kind: 'JSONPathLegNode', - type, - value, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/json-path-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/json-path-node.d.ts deleted file mode 100644 index 70df23f..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/json-path-node.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { JSONPathLegNode } from './json-path-leg-node.js'; -import type { OperationNode } from './operation-node.js'; -import type { OperatorNode } from './operator-node.js'; -export interface JSONPathNode extends OperationNode { - readonly kind: 'JSONPathNode'; - readonly inOperator?: OperatorNode; - readonly pathLegs: ReadonlyArray; -} -type JSONPathNodeFactory = Readonly<{ - is(node: OperationNode): node is JSONPathNode; - create(inOperator?: OperatorNode): Readonly; - cloneWithLeg(jsonPathNode: JSONPathNode, pathLeg: JSONPathLegNode): Readonly; -}>; -/** - * @internal - */ -export declare const JSONPathNode: JSONPathNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/json-path-node.js b/node_modules/kysely/dist/cjs/operation-node/json-path-node.js deleted file mode 100644 index c52417f..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/json-path-node.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.JSONPathNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.JSONPathNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'JSONPathNode'; - }, - create(inOperator) { - return (0, object_utils_js_1.freeze)({ - kind: 'JSONPathNode', - inOperator, - pathLegs: (0, object_utils_js_1.freeze)([]), - }); - }, - cloneWithLeg(jsonPathNode, pathLeg) { - return (0, object_utils_js_1.freeze)({ - ...jsonPathNode, - pathLegs: (0, object_utils_js_1.freeze)([...jsonPathNode.pathLegs, pathLeg]), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/json-reference-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/json-reference-node.d.ts deleted file mode 100644 index 2ba7c0b..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/json-reference-node.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { JSONOperatorChainNode } from './json-operator-chain-node.js'; -import type { JSONPathNode } from './json-path-node.js'; -import type { OperationNode } from './operation-node.js'; -import type { ReferenceNode } from './reference-node.js'; -export interface JSONReferenceNode extends OperationNode { - readonly kind: 'JSONReferenceNode'; - readonly reference: ReferenceNode; - readonly traversal: JSONPathNode | JSONOperatorChainNode; -} -type JSONReferenceNodeFactory = Readonly<{ - is(node: OperationNode): node is JSONReferenceNode; - create(reference: ReferenceNode, traversal: JSONPathNode | JSONOperatorChainNode): Readonly; - cloneWithTraversal(node: JSONReferenceNode, traversal: JSONPathNode | JSONOperatorChainNode): Readonly; -}>; -/** - * @internal - */ -export declare const JSONReferenceNode: JSONReferenceNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/json-reference-node.js b/node_modules/kysely/dist/cjs/operation-node/json-reference-node.js deleted file mode 100644 index 2143211..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/json-reference-node.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.JSONReferenceNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.JSONReferenceNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'JSONReferenceNode'; - }, - create(reference, traversal) { - return (0, object_utils_js_1.freeze)({ - kind: 'JSONReferenceNode', - reference, - traversal, - }); - }, - cloneWithTraversal(node, traversal) { - return (0, object_utils_js_1.freeze)({ - ...node, - traversal, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/limit-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/limit-node.d.ts deleted file mode 100644 index 7c0c778..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/limit-node.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface LimitNode extends OperationNode { - readonly kind: 'LimitNode'; - readonly limit: OperationNode; -} -type LimitNodeFactory = Readonly<{ - is(node: OperationNode): node is LimitNode; - create(limit: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const LimitNode: LimitNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/limit-node.js b/node_modules/kysely/dist/cjs/operation-node/limit-node.js deleted file mode 100644 index d8ba042..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/limit-node.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LimitNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.LimitNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'LimitNode'; - }, - create(limit) { - return (0, object_utils_js_1.freeze)({ - kind: 'LimitNode', - limit, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/list-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/list-node.d.ts deleted file mode 100644 index 4091b32..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/list-node.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface ListNode extends OperationNode { - readonly kind: 'ListNode'; - readonly items: ReadonlyArray; -} -type ListNodeFactory = Readonly<{ - is(node: OperationNode): node is ListNode; - create(items: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const ListNode: ListNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/list-node.js b/node_modules/kysely/dist/cjs/operation-node/list-node.js deleted file mode 100644 index 9b8b0bd..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/list-node.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ListNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.ListNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'ListNode'; - }, - create(items) { - return (0, object_utils_js_1.freeze)({ - kind: 'ListNode', - items: (0, object_utils_js_1.freeze)(items), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/matched-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/matched-node.d.ts deleted file mode 100644 index 2bda2b5..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/matched-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface MatchedNode extends OperationNode { - readonly kind: 'MatchedNode'; - readonly not: boolean; - readonly bySource: boolean; -} -type MatchedNodeFactory = Readonly<{ - is(node: OperationNode): node is MatchedNode; - create(not: boolean, bySource?: boolean): Readonly; -}>; -/** - * @internal - */ -export declare const MatchedNode: MatchedNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/matched-node.js b/node_modules/kysely/dist/cjs/operation-node/matched-node.js deleted file mode 100644 index 85e7c35..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/matched-node.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MatchedNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.MatchedNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'MatchedNode'; - }, - create(not, bySource = false) { - return (0, object_utils_js_1.freeze)({ - kind: 'MatchedNode', - not, - bySource, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/merge-query-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/merge-query-node.d.ts deleted file mode 100644 index be394c1..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/merge-query-node.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { AliasNode } from './alias-node.js'; -import type { JoinNode } from './join-node.js'; -import type { OperationNode } from './operation-node.js'; -import type { OutputNode } from './output-node.js'; -import type { ReturningNode } from './returning-node.js'; -import type { TableNode } from './table-node.js'; -import type { TopNode } from './top-node.js'; -import { WhenNode } from './when-node.js'; -import type { WithNode } from './with-node.js'; -export interface MergeQueryNode extends OperationNode { - readonly kind: 'MergeQueryNode'; - readonly into: TableNode | AliasNode; - readonly using?: JoinNode; - readonly whens?: ReadonlyArray; - readonly with?: WithNode; - readonly top?: TopNode; - readonly returning?: ReturningNode; - readonly output?: OutputNode; - readonly endModifiers?: ReadonlyArray; -} -type MergeQueryNodeFactory = Readonly<{ - is(node: OperationNode): node is MergeQueryNode; - create(into: TableNode | AliasNode, withNode?: WithNode): Readonly; - cloneWithUsing(mergeNode: MergeQueryNode, using: JoinNode): Readonly; - cloneWithWhen(mergeNode: MergeQueryNode, when: WhenNode): Readonly; - cloneWithThen(mergeNode: MergeQueryNode, then: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const MergeQueryNode: MergeQueryNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/merge-query-node.js b/node_modules/kysely/dist/cjs/operation-node/merge-query-node.js deleted file mode 100644 index b66c83f..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/merge-query-node.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MergeQueryNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const when_node_js_1 = require("./when-node.js"); -/** - * @internal - */ -exports.MergeQueryNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'MergeQueryNode'; - }, - create(into, withNode) { - return (0, object_utils_js_1.freeze)({ - kind: 'MergeQueryNode', - into, - ...(withNode && { with: withNode }), - }); - }, - cloneWithUsing(mergeNode, using) { - return (0, object_utils_js_1.freeze)({ - ...mergeNode, - using, - }); - }, - cloneWithWhen(mergeNode, when) { - return (0, object_utils_js_1.freeze)({ - ...mergeNode, - whens: mergeNode.whens - ? (0, object_utils_js_1.freeze)([...mergeNode.whens, when]) - : (0, object_utils_js_1.freeze)([when]), - }); - }, - cloneWithThen(mergeNode, then) { - return (0, object_utils_js_1.freeze)({ - ...mergeNode, - whens: mergeNode.whens - ? (0, object_utils_js_1.freeze)([ - ...mergeNode.whens.slice(0, -1), - when_node_js_1.WhenNode.cloneWithResult(mergeNode.whens[mergeNode.whens.length - 1], then), - ]) - : undefined, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/modify-column-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/modify-column-node.d.ts deleted file mode 100644 index 609ed36..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/modify-column-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { ColumnDefinitionNode } from './column-definition-node.js'; -import type { OperationNode } from './operation-node.js'; -export interface ModifyColumnNode extends OperationNode { - readonly kind: 'ModifyColumnNode'; - readonly column: ColumnDefinitionNode; -} -type ModifyColumnNodeFactory = Readonly<{ - is(node: OperationNode): node is ModifyColumnNode; - create(column: ColumnDefinitionNode): Readonly; -}>; -/** - * @internal - */ -export declare const ModifyColumnNode: ModifyColumnNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/modify-column-node.js b/node_modules/kysely/dist/cjs/operation-node/modify-column-node.js deleted file mode 100644 index 98dff33..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/modify-column-node.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ModifyColumnNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.ModifyColumnNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'ModifyColumnNode'; - }, - create(column) { - return (0, object_utils_js_1.freeze)({ - kind: 'ModifyColumnNode', - column, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/offset-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/offset-node.d.ts deleted file mode 100644 index c3d70a1..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/offset-node.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface OffsetNode extends OperationNode { - readonly kind: 'OffsetNode'; - readonly offset: OperationNode; -} -type OffsetNodeFactory = Readonly<{ - is(node: OperationNode): node is OffsetNode; - create(offset: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const OffsetNode: OffsetNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/offset-node.js b/node_modules/kysely/dist/cjs/operation-node/offset-node.js deleted file mode 100644 index 1fc7b2f..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/offset-node.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OffsetNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.OffsetNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'OffsetNode'; - }, - create(offset) { - return (0, object_utils_js_1.freeze)({ - kind: 'OffsetNode', - offset, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/on-conflict-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/on-conflict-node.d.ts deleted file mode 100644 index 8f1263f..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/on-conflict-node.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { ColumnNode } from './column-node.js'; -import type { ColumnUpdateNode } from './column-update-node.js'; -import type { IdentifierNode } from './identifier-node.js'; -import type { OperationNode } from './operation-node.js'; -import { WhereNode } from './where-node.js'; -export type OnConflictNodeProps = Omit; -export interface OnConflictNode extends OperationNode { - readonly kind: 'OnConflictNode'; - readonly columns?: ReadonlyArray; - readonly constraint?: IdentifierNode; - readonly indexExpression?: OperationNode; - readonly indexWhere?: WhereNode; - readonly updates?: ReadonlyArray; - readonly updateWhere?: WhereNode; - readonly doNothing?: boolean; -} -type OnConflictNodeFactory = Readonly<{ - is(node: OperationNode): node is OnConflictNode; - create(): Readonly; - cloneWith(node: OnConflictNode, props: OnConflictNodeProps): Readonly; - cloneWithIndexWhere(node: OnConflictNode, operation: OperationNode): Readonly; - cloneWithIndexOrWhere(node: OnConflictNode, operation: OperationNode): Readonly; - cloneWithUpdateWhere(node: OnConflictNode, operation: OperationNode): Readonly; - cloneWithUpdateOrWhere(node: OnConflictNode, operation: OperationNode): Readonly; - cloneWithoutIndexWhere(node: OnConflictNode): Readonly; - cloneWithoutUpdateWhere(node: OnConflictNode): Readonly; -}>; -/** - * @internal - */ -export declare const OnConflictNode: OnConflictNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/on-conflict-node.js b/node_modules/kysely/dist/cjs/operation-node/on-conflict-node.js deleted file mode 100644 index 1920349..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/on-conflict-node.js +++ /dev/null @@ -1,68 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OnConflictNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const where_node_js_1 = require("./where-node.js"); -/** - * @internal - */ -exports.OnConflictNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'OnConflictNode'; - }, - create() { - return (0, object_utils_js_1.freeze)({ - kind: 'OnConflictNode', - }); - }, - cloneWith(node, props) { - return (0, object_utils_js_1.freeze)({ - ...node, - ...props, - }); - }, - cloneWithIndexWhere(node, operation) { - return (0, object_utils_js_1.freeze)({ - ...node, - indexWhere: node.indexWhere - ? where_node_js_1.WhereNode.cloneWithOperation(node.indexWhere, 'And', operation) - : where_node_js_1.WhereNode.create(operation), - }); - }, - cloneWithIndexOrWhere(node, operation) { - return (0, object_utils_js_1.freeze)({ - ...node, - indexWhere: node.indexWhere - ? where_node_js_1.WhereNode.cloneWithOperation(node.indexWhere, 'Or', operation) - : where_node_js_1.WhereNode.create(operation), - }); - }, - cloneWithUpdateWhere(node, operation) { - return (0, object_utils_js_1.freeze)({ - ...node, - updateWhere: node.updateWhere - ? where_node_js_1.WhereNode.cloneWithOperation(node.updateWhere, 'And', operation) - : where_node_js_1.WhereNode.create(operation), - }); - }, - cloneWithUpdateOrWhere(node, operation) { - return (0, object_utils_js_1.freeze)({ - ...node, - updateWhere: node.updateWhere - ? where_node_js_1.WhereNode.cloneWithOperation(node.updateWhere, 'Or', operation) - : where_node_js_1.WhereNode.create(operation), - }); - }, - cloneWithoutIndexWhere(node) { - return (0, object_utils_js_1.freeze)({ - ...node, - indexWhere: undefined, - }); - }, - cloneWithoutUpdateWhere(node) { - return (0, object_utils_js_1.freeze)({ - ...node, - updateWhere: undefined, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/on-duplicate-key-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/on-duplicate-key-node.d.ts deleted file mode 100644 index 261d830..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/on-duplicate-key-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { ColumnUpdateNode } from './column-update-node.js'; -import type { OperationNode } from './operation-node.js'; -export type OnDuplicateKeyNodeProps = Omit; -export interface OnDuplicateKeyNode extends OperationNode { - readonly kind: 'OnDuplicateKeyNode'; - readonly updates: ReadonlyArray; -} -type OnDuplicateKeyNodeFactory = Readonly<{ - is(node: OperationNode): node is OnDuplicateKeyNode; - create(updates: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const OnDuplicateKeyNode: OnDuplicateKeyNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/on-duplicate-key-node.js b/node_modules/kysely/dist/cjs/operation-node/on-duplicate-key-node.js deleted file mode 100644 index 35f245c..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/on-duplicate-key-node.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OnDuplicateKeyNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.OnDuplicateKeyNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'OnDuplicateKeyNode'; - }, - create(updates) { - return (0, object_utils_js_1.freeze)({ - kind: 'OnDuplicateKeyNode', - updates, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/on-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/on-node.d.ts deleted file mode 100644 index 4178633..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/on-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface OnNode extends OperationNode { - readonly kind: 'OnNode'; - readonly on: OperationNode; -} -type OnNodeFactory = Readonly<{ - is(node: OperationNode): node is OnNode; - create(filter: OperationNode): Readonly; - cloneWithOperation(onNode: OnNode, operator: 'And' | 'Or', operation: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const OnNode: OnNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/on-node.js b/node_modules/kysely/dist/cjs/operation-node/on-node.js deleted file mode 100644 index b6a591c..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/on-node.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OnNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const and_node_js_1 = require("./and-node.js"); -const or_node_js_1 = require("./or-node.js"); -/** - * @internal - */ -exports.OnNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'OnNode'; - }, - create(filter) { - return (0, object_utils_js_1.freeze)({ - kind: 'OnNode', - on: filter, - }); - }, - cloneWithOperation(onNode, operator, operation) { - return (0, object_utils_js_1.freeze)({ - ...onNode, - on: operator === 'And' - ? and_node_js_1.AndNode.create(onNode.on, operation) - : or_node_js_1.OrNode.create(onNode.on, operation), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/operation-node-source.d.ts b/node_modules/kysely/dist/cjs/operation-node/operation-node-source.d.ts deleted file mode 100644 index 5550f83..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/operation-node-source.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface OperationNodeSource { - toOperationNode(): OperationNode; -} -export declare function isOperationNodeSource(obj: unknown): obj is OperationNodeSource; diff --git a/node_modules/kysely/dist/cjs/operation-node/operation-node-source.js b/node_modules/kysely/dist/cjs/operation-node/operation-node-source.js deleted file mode 100644 index 7a4ac66..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/operation-node-source.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isOperationNodeSource = isOperationNodeSource; -const object_utils_js_1 = require("../util/object-utils.js"); -function isOperationNodeSource(obj) { - return (0, object_utils_js_1.isObject)(obj) && (0, object_utils_js_1.isFunction)(obj.toOperationNode); -} diff --git a/node_modules/kysely/dist/cjs/operation-node/operation-node-transformer.d.ts b/node_modules/kysely/dist/cjs/operation-node/operation-node-transformer.d.ts deleted file mode 100644 index ff3485a..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/operation-node-transformer.d.ts +++ /dev/null @@ -1,238 +0,0 @@ -import type { AliasNode } from './alias-node.js'; -import type { ColumnNode } from './column-node.js'; -import type { IdentifierNode } from './identifier-node.js'; -import type { OperationNode } from './operation-node.js'; -import type { ReferenceNode } from './reference-node.js'; -import type { SelectAllNode } from './select-all-node.js'; -import type { SelectionNode } from './selection-node.js'; -import type { TableNode } from './table-node.js'; -import type { AndNode } from './and-node.js'; -import type { JoinNode } from './join-node.js'; -import type { OrNode } from './or-node.js'; -import type { ParensNode } from './parens-node.js'; -import type { PrimitiveValueListNode } from './primitive-value-list-node.js'; -import type { RawNode } from './raw-node.js'; -import type { SelectQueryNode } from './select-query-node.js'; -import type { ValueListNode } from './value-list-node.js'; -import type { ValueNode } from './value-node.js'; -import type { OperatorNode } from './operator-node.js'; -import type { FromNode } from './from-node.js'; -import type { WhereNode } from './where-node.js'; -import type { InsertQueryNode } from './insert-query-node.js'; -import type { DeleteQueryNode } from './delete-query-node.js'; -import type { ReturningNode } from './returning-node.js'; -import type { CreateTableNode } from './create-table-node.js'; -import type { AddColumnNode } from './add-column-node.js'; -import type { DropTableNode } from './drop-table-node.js'; -import type { DataTypeNode } from './data-type-node.js'; -import type { OrderByNode } from './order-by-node.js'; -import type { OrderByItemNode } from './order-by-item-node.js'; -import type { GroupByNode } from './group-by-node.js'; -import type { GroupByItemNode } from './group-by-item-node.js'; -import type { UpdateQueryNode } from './update-query-node.js'; -import type { ColumnUpdateNode } from './column-update-node.js'; -import type { LimitNode } from './limit-node.js'; -import type { OffsetNode } from './offset-node.js'; -import type { OnConflictNode } from './on-conflict-node.js'; -import type { CreateIndexNode } from './create-index-node.js'; -import type { ListNode } from './list-node.js'; -import type { DropIndexNode } from './drop-index-node.js'; -import type { PrimaryKeyConstraintNode } from './primary-key-constraint-node.js'; -import type { UniqueConstraintNode } from './unique-constraint-node.js'; -import type { ReferencesNode } from './references-node.js'; -import type { CheckConstraintNode } from './check-constraint-node.js'; -import type { WithNode } from './with-node.js'; -import type { CommonTableExpressionNode } from './common-table-expression-node.js'; -import type { CommonTableExpressionNameNode } from './common-table-expression-name-node.js'; -import type { HavingNode } from './having-node.js'; -import type { CreateSchemaNode } from './create-schema-node.js'; -import type { DropSchemaNode } from './drop-schema-node.js'; -import type { AlterTableNode } from './alter-table-node.js'; -import type { DropColumnNode } from './drop-column-node.js'; -import type { RenameColumnNode } from './rename-column-node.js'; -import type { AlterColumnNode } from './alter-column-node.js'; -import type { AddConstraintNode } from './add-constraint-node.js'; -import type { DropConstraintNode } from './drop-constraint-node.js'; -import type { ForeignKeyConstraintNode } from './foreign-key-constraint-node.js'; -import type { ColumnDefinitionNode } from './column-definition-node.js'; -import type { ModifyColumnNode } from './modify-column-node.js'; -import type { OnDuplicateKeyNode } from './on-duplicate-key-node.js'; -import type { CreateViewNode } from './create-view-node.js'; -import type { DropViewNode } from './drop-view-node.js'; -import type { GeneratedNode } from './generated-node.js'; -import type { DefaultValueNode } from './default-value-node.js'; -import type { OnNode } from './on-node.js'; -import type { ValuesNode } from './values-node.js'; -import type { SelectModifierNode } from './select-modifier-node.js'; -import type { CreateTypeNode } from './create-type-node.js'; -import type { DropTypeNode } from './drop-type-node.js'; -import type { ExplainNode } from './explain-node.js'; -import type { SchemableIdentifierNode } from './schemable-identifier-node.js'; -import type { DefaultInsertValueNode } from './default-insert-value-node.js'; -import type { AggregateFunctionNode } from './aggregate-function-node.js'; -import type { OverNode } from './over-node.js'; -import type { PartitionByNode } from './partition-by-node.js'; -import type { PartitionByItemNode } from './partition-by-item-node.js'; -import type { SetOperationNode } from './set-operation-node.js'; -import type { BinaryOperationNode } from './binary-operation-node.js'; -import type { UnaryOperationNode } from './unary-operation-node.js'; -import type { UsingNode } from './using-node.js'; -import type { FunctionNode } from './function-node.js'; -import type { CaseNode } from './case-node.js'; -import type { WhenNode } from './when-node.js'; -import type { JSONReferenceNode } from './json-reference-node.js'; -import type { JSONPathNode } from './json-path-node.js'; -import type { JSONPathLegNode } from './json-path-leg-node.js'; -import type { JSONOperatorChainNode } from './json-operator-chain-node.js'; -import type { TupleNode } from './tuple-node.js'; -import type { MergeQueryNode } from './merge-query-node.js'; -import type { MatchedNode } from './matched-node.js'; -import type { AddIndexNode } from './add-index-node.js'; -import type { CastNode } from './cast-node.js'; -import type { FetchNode } from './fetch-node.js'; -import type { TopNode } from './top-node.js'; -import type { OutputNode } from './output-node.js'; -import type { RefreshMaterializedViewNode } from './refresh-materialized-view-node.js'; -import type { OrActionNode } from './or-action-node.js'; -import type { CollateNode } from './collate-node.js'; -import type { QueryId } from '../util/query-id.js'; -import type { RenameConstraintNode } from './rename-constraint-node.js'; -/** - * Transforms an operation node tree into another one. - * - * Kysely queries are expressed internally as a tree of objects (operation nodes). - * `OperationNodeTransformer` takes such a tree as its input and returns a - * transformed deep copy of it. By default the `OperationNodeTransformer` - * does nothing. You need to override one or more methods to make it do - * something. - * - * There's a method for each node type. For example if you'd like to convert - * each identifier (table name, column name, alias etc.) from camelCase to - * snake_case, you'd do something like this: - * - * ```ts - * import { type IdentifierNode, OperationNodeTransformer } from 'kysely' - * import snakeCase from 'lodash/snakeCase' - * - * class CamelCaseTransformer extends OperationNodeTransformer { - * override transformIdentifier(node: IdentifierNode): IdentifierNode { - * node = super.transformIdentifier(node) - * - * return { - * ...node, - * name: snakeCase(node.name), - * } - * } - * } - * - * const transformer = new CamelCaseTransformer() - * - * const query = db.selectFrom('person').select(['first_name', 'last_name']) - * - * const tree = transformer.transformNode(query.toOperationNode()) - * ``` - */ -export declare class OperationNodeTransformer { - #private; - protected readonly nodeStack: OperationNode[]; - transformNode(node: T, queryId?: QueryId): T; - protected transformNodeImpl(node: T, queryId?: QueryId): T; - protected transformNodeList | undefined>(list: T, queryId?: QueryId): T; - protected transformSelectQuery(node: SelectQueryNode, queryId?: QueryId): SelectQueryNode; - protected transformSelection(node: SelectionNode, queryId?: QueryId): SelectionNode; - protected transformColumn(node: ColumnNode, queryId?: QueryId): ColumnNode; - protected transformAlias(node: AliasNode, queryId?: QueryId): AliasNode; - protected transformTable(node: TableNode, queryId?: QueryId): TableNode; - protected transformFrom(node: FromNode, queryId?: QueryId): FromNode; - protected transformReference(node: ReferenceNode, queryId?: QueryId): ReferenceNode; - protected transformAnd(node: AndNode, queryId?: QueryId): AndNode; - protected transformOr(node: OrNode, queryId?: QueryId): OrNode; - protected transformValueList(node: ValueListNode, queryId?: QueryId): ValueListNode; - protected transformParens(node: ParensNode, queryId?: QueryId): ParensNode; - protected transformJoin(node: JoinNode, queryId?: QueryId): JoinNode; - protected transformRaw(node: RawNode, queryId?: QueryId): RawNode; - protected transformWhere(node: WhereNode, queryId?: QueryId): WhereNode; - protected transformInsertQuery(node: InsertQueryNode, queryId?: QueryId): InsertQueryNode; - protected transformValues(node: ValuesNode, queryId?: QueryId): ValuesNode; - protected transformDeleteQuery(node: DeleteQueryNode, queryId?: QueryId): DeleteQueryNode; - protected transformReturning(node: ReturningNode, queryId?: QueryId): ReturningNode; - protected transformCreateTable(node: CreateTableNode, queryId?: QueryId): CreateTableNode; - protected transformColumnDefinition(node: ColumnDefinitionNode, queryId?: QueryId): ColumnDefinitionNode; - protected transformAddColumn(node: AddColumnNode, queryId?: QueryId): AddColumnNode; - protected transformDropTable(node: DropTableNode, queryId?: QueryId): DropTableNode; - protected transformOrderBy(node: OrderByNode, queryId?: QueryId): OrderByNode; - protected transformOrderByItem(node: OrderByItemNode, queryId?: QueryId): OrderByItemNode; - protected transformGroupBy(node: GroupByNode, queryId?: QueryId): GroupByNode; - protected transformGroupByItem(node: GroupByItemNode, queryId?: QueryId): GroupByItemNode; - protected transformUpdateQuery(node: UpdateQueryNode, queryId?: QueryId): UpdateQueryNode; - protected transformColumnUpdate(node: ColumnUpdateNode, queryId?: QueryId): ColumnUpdateNode; - protected transformLimit(node: LimitNode, queryId?: QueryId): LimitNode; - protected transformOffset(node: OffsetNode, queryId?: QueryId): OffsetNode; - protected transformOnConflict(node: OnConflictNode, queryId?: QueryId): OnConflictNode; - protected transformOnDuplicateKey(node: OnDuplicateKeyNode, queryId?: QueryId): OnDuplicateKeyNode; - protected transformCreateIndex(node: CreateIndexNode, queryId?: QueryId): CreateIndexNode; - protected transformList(node: ListNode, queryId?: QueryId): ListNode; - protected transformDropIndex(node: DropIndexNode, queryId?: QueryId): DropIndexNode; - protected transformPrimaryKeyConstraint(node: PrimaryKeyConstraintNode, queryId?: QueryId): PrimaryKeyConstraintNode; - protected transformUniqueConstraint(node: UniqueConstraintNode, queryId?: QueryId): UniqueConstraintNode; - protected transformForeignKeyConstraint(node: ForeignKeyConstraintNode, queryId?: QueryId): ForeignKeyConstraintNode; - protected transformSetOperation(node: SetOperationNode, queryId?: QueryId): SetOperationNode; - protected transformReferences(node: ReferencesNode, queryId?: QueryId): ReferencesNode; - protected transformCheckConstraint(node: CheckConstraintNode, queryId?: QueryId): CheckConstraintNode; - protected transformWith(node: WithNode, queryId?: QueryId): WithNode; - protected transformCommonTableExpression(node: CommonTableExpressionNode, queryId?: QueryId): CommonTableExpressionNode; - protected transformCommonTableExpressionName(node: CommonTableExpressionNameNode, queryId?: QueryId): CommonTableExpressionNameNode; - protected transformHaving(node: HavingNode, queryId?: QueryId): HavingNode; - protected transformCreateSchema(node: CreateSchemaNode, queryId?: QueryId): CreateSchemaNode; - protected transformDropSchema(node: DropSchemaNode, queryId?: QueryId): DropSchemaNode; - protected transformAlterTable(node: AlterTableNode, queryId?: QueryId): AlterTableNode; - protected transformDropColumn(node: DropColumnNode, queryId?: QueryId): DropColumnNode; - protected transformRenameColumn(node: RenameColumnNode, queryId?: QueryId): RenameColumnNode; - protected transformAlterColumn(node: AlterColumnNode, queryId?: QueryId): AlterColumnNode; - protected transformModifyColumn(node: ModifyColumnNode, queryId?: QueryId): ModifyColumnNode; - protected transformAddConstraint(node: AddConstraintNode, queryId?: QueryId): AddConstraintNode; - protected transformDropConstraint(node: DropConstraintNode, queryId?: QueryId): DropConstraintNode; - protected transformRenameConstraint(node: RenameConstraintNode, queryId?: QueryId): RenameConstraintNode; - protected transformCreateView(node: CreateViewNode, queryId?: QueryId): CreateViewNode; - protected transformRefreshMaterializedView(node: RefreshMaterializedViewNode, queryId?: QueryId): RefreshMaterializedViewNode; - protected transformDropView(node: DropViewNode, queryId?: QueryId): DropViewNode; - protected transformGenerated(node: GeneratedNode, queryId?: QueryId): GeneratedNode; - protected transformDefaultValue(node: DefaultValueNode, queryId?: QueryId): DefaultValueNode; - protected transformOn(node: OnNode, queryId?: QueryId): OnNode; - protected transformSelectModifier(node: SelectModifierNode, queryId?: QueryId): SelectModifierNode; - protected transformCreateType(node: CreateTypeNode, queryId?: QueryId): CreateTypeNode; - protected transformDropType(node: DropTypeNode, queryId?: QueryId): DropTypeNode; - protected transformExplain(node: ExplainNode, queryId?: QueryId): ExplainNode; - protected transformSchemableIdentifier(node: SchemableIdentifierNode, queryId?: QueryId): SchemableIdentifierNode; - protected transformAggregateFunction(node: AggregateFunctionNode, queryId?: QueryId): AggregateFunctionNode; - protected transformOver(node: OverNode, queryId?: QueryId): OverNode; - protected transformPartitionBy(node: PartitionByNode, queryId?: QueryId): PartitionByNode; - protected transformPartitionByItem(node: PartitionByItemNode, queryId?: QueryId): PartitionByItemNode; - protected transformBinaryOperation(node: BinaryOperationNode, queryId?: QueryId): BinaryOperationNode; - protected transformUnaryOperation(node: UnaryOperationNode, queryId?: QueryId): UnaryOperationNode; - protected transformUsing(node: UsingNode, queryId?: QueryId): UsingNode; - protected transformFunction(node: FunctionNode, queryId?: QueryId): FunctionNode; - protected transformCase(node: CaseNode, queryId?: QueryId): CaseNode; - protected transformWhen(node: WhenNode, queryId?: QueryId): WhenNode; - protected transformJSONReference(node: JSONReferenceNode, queryId?: QueryId): JSONReferenceNode; - protected transformJSONPath(node: JSONPathNode, queryId?: QueryId): JSONPathNode; - protected transformJSONPathLeg(node: JSONPathLegNode, _queryId?: QueryId): JSONPathLegNode; - protected transformJSONOperatorChain(node: JSONOperatorChainNode, queryId?: QueryId): JSONOperatorChainNode; - protected transformTuple(node: TupleNode, queryId?: QueryId): TupleNode; - protected transformMergeQuery(node: MergeQueryNode, queryId?: QueryId): MergeQueryNode; - protected transformMatched(node: MatchedNode, _queryId?: QueryId): MatchedNode; - protected transformAddIndex(node: AddIndexNode, queryId?: QueryId): AddIndexNode; - protected transformCast(node: CastNode, queryId?: QueryId): CastNode; - protected transformFetch(node: FetchNode, queryId?: QueryId): FetchNode; - protected transformTop(node: TopNode, _queryId?: QueryId): TopNode; - protected transformOutput(node: OutputNode, queryId?: QueryId): OutputNode; - protected transformDataType(node: DataTypeNode, _queryId?: QueryId): DataTypeNode; - protected transformSelectAll(node: SelectAllNode, _queryId?: QueryId): SelectAllNode; - protected transformIdentifier(node: IdentifierNode, _queryId?: QueryId): IdentifierNode; - protected transformValue(node: ValueNode, _queryId?: QueryId): ValueNode; - protected transformPrimitiveValueList(node: PrimitiveValueListNode, _queryId?: QueryId): PrimitiveValueListNode; - protected transformOperator(node: OperatorNode, _queryId?: QueryId): OperatorNode; - protected transformDefaultInsertValue(node: DefaultInsertValueNode, _queryId?: QueryId): DefaultInsertValueNode; - protected transformOrAction(node: OrActionNode, _queryId?: QueryId): OrActionNode; - protected transformCollate(node: CollateNode, _queryId?: QueryId): CollateNode; -} diff --git a/node_modules/kysely/dist/cjs/operation-node/operation-node-transformer.js b/node_modules/kysely/dist/cjs/operation-node/operation-node-transformer.js deleted file mode 100644 index feff6b6..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/operation-node-transformer.js +++ /dev/null @@ -1,929 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OperationNodeTransformer = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const require_all_props_js_1 = require("../util/require-all-props.js"); -/** - * Transforms an operation node tree into another one. - * - * Kysely queries are expressed internally as a tree of objects (operation nodes). - * `OperationNodeTransformer` takes such a tree as its input and returns a - * transformed deep copy of it. By default the `OperationNodeTransformer` - * does nothing. You need to override one or more methods to make it do - * something. - * - * There's a method for each node type. For example if you'd like to convert - * each identifier (table name, column name, alias etc.) from camelCase to - * snake_case, you'd do something like this: - * - * ```ts - * import { type IdentifierNode, OperationNodeTransformer } from 'kysely' - * import snakeCase from 'lodash/snakeCase' - * - * class CamelCaseTransformer extends OperationNodeTransformer { - * override transformIdentifier(node: IdentifierNode): IdentifierNode { - * node = super.transformIdentifier(node) - * - * return { - * ...node, - * name: snakeCase(node.name), - * } - * } - * } - * - * const transformer = new CamelCaseTransformer() - * - * const query = db.selectFrom('person').select(['first_name', 'last_name']) - * - * const tree = transformer.transformNode(query.toOperationNode()) - * ``` - */ -class OperationNodeTransformer { - nodeStack = []; - #transformers = (0, object_utils_js_1.freeze)({ - AliasNode: this.transformAlias.bind(this), - ColumnNode: this.transformColumn.bind(this), - IdentifierNode: this.transformIdentifier.bind(this), - SchemableIdentifierNode: this.transformSchemableIdentifier.bind(this), - RawNode: this.transformRaw.bind(this), - ReferenceNode: this.transformReference.bind(this), - SelectQueryNode: this.transformSelectQuery.bind(this), - SelectionNode: this.transformSelection.bind(this), - TableNode: this.transformTable.bind(this), - FromNode: this.transformFrom.bind(this), - SelectAllNode: this.transformSelectAll.bind(this), - AndNode: this.transformAnd.bind(this), - OrNode: this.transformOr.bind(this), - ValueNode: this.transformValue.bind(this), - ValueListNode: this.transformValueList.bind(this), - PrimitiveValueListNode: this.transformPrimitiveValueList.bind(this), - ParensNode: this.transformParens.bind(this), - JoinNode: this.transformJoin.bind(this), - OperatorNode: this.transformOperator.bind(this), - WhereNode: this.transformWhere.bind(this), - InsertQueryNode: this.transformInsertQuery.bind(this), - DeleteQueryNode: this.transformDeleteQuery.bind(this), - ReturningNode: this.transformReturning.bind(this), - CreateTableNode: this.transformCreateTable.bind(this), - AddColumnNode: this.transformAddColumn.bind(this), - ColumnDefinitionNode: this.transformColumnDefinition.bind(this), - DropTableNode: this.transformDropTable.bind(this), - DataTypeNode: this.transformDataType.bind(this), - OrderByNode: this.transformOrderBy.bind(this), - OrderByItemNode: this.transformOrderByItem.bind(this), - GroupByNode: this.transformGroupBy.bind(this), - GroupByItemNode: this.transformGroupByItem.bind(this), - UpdateQueryNode: this.transformUpdateQuery.bind(this), - ColumnUpdateNode: this.transformColumnUpdate.bind(this), - LimitNode: this.transformLimit.bind(this), - OffsetNode: this.transformOffset.bind(this), - OnConflictNode: this.transformOnConflict.bind(this), - OnDuplicateKeyNode: this.transformOnDuplicateKey.bind(this), - CreateIndexNode: this.transformCreateIndex.bind(this), - DropIndexNode: this.transformDropIndex.bind(this), - ListNode: this.transformList.bind(this), - PrimaryKeyConstraintNode: this.transformPrimaryKeyConstraint.bind(this), - UniqueConstraintNode: this.transformUniqueConstraint.bind(this), - ReferencesNode: this.transformReferences.bind(this), - CheckConstraintNode: this.transformCheckConstraint.bind(this), - WithNode: this.transformWith.bind(this), - CommonTableExpressionNode: this.transformCommonTableExpression.bind(this), - CommonTableExpressionNameNode: this.transformCommonTableExpressionName.bind(this), - HavingNode: this.transformHaving.bind(this), - CreateSchemaNode: this.transformCreateSchema.bind(this), - DropSchemaNode: this.transformDropSchema.bind(this), - AlterTableNode: this.transformAlterTable.bind(this), - DropColumnNode: this.transformDropColumn.bind(this), - RenameColumnNode: this.transformRenameColumn.bind(this), - AlterColumnNode: this.transformAlterColumn.bind(this), - ModifyColumnNode: this.transformModifyColumn.bind(this), - AddConstraintNode: this.transformAddConstraint.bind(this), - DropConstraintNode: this.transformDropConstraint.bind(this), - RenameConstraintNode: this.transformRenameConstraint.bind(this), - ForeignKeyConstraintNode: this.transformForeignKeyConstraint.bind(this), - CreateViewNode: this.transformCreateView.bind(this), - RefreshMaterializedViewNode: this.transformRefreshMaterializedView.bind(this), - DropViewNode: this.transformDropView.bind(this), - GeneratedNode: this.transformGenerated.bind(this), - DefaultValueNode: this.transformDefaultValue.bind(this), - OnNode: this.transformOn.bind(this), - ValuesNode: this.transformValues.bind(this), - SelectModifierNode: this.transformSelectModifier.bind(this), - CreateTypeNode: this.transformCreateType.bind(this), - DropTypeNode: this.transformDropType.bind(this), - ExplainNode: this.transformExplain.bind(this), - DefaultInsertValueNode: this.transformDefaultInsertValue.bind(this), - AggregateFunctionNode: this.transformAggregateFunction.bind(this), - OverNode: this.transformOver.bind(this), - PartitionByNode: this.transformPartitionBy.bind(this), - PartitionByItemNode: this.transformPartitionByItem.bind(this), - SetOperationNode: this.transformSetOperation.bind(this), - BinaryOperationNode: this.transformBinaryOperation.bind(this), - UnaryOperationNode: this.transformUnaryOperation.bind(this), - UsingNode: this.transformUsing.bind(this), - FunctionNode: this.transformFunction.bind(this), - CaseNode: this.transformCase.bind(this), - WhenNode: this.transformWhen.bind(this), - JSONReferenceNode: this.transformJSONReference.bind(this), - JSONPathNode: this.transformJSONPath.bind(this), - JSONPathLegNode: this.transformJSONPathLeg.bind(this), - JSONOperatorChainNode: this.transformJSONOperatorChain.bind(this), - TupleNode: this.transformTuple.bind(this), - MergeQueryNode: this.transformMergeQuery.bind(this), - MatchedNode: this.transformMatched.bind(this), - AddIndexNode: this.transformAddIndex.bind(this), - CastNode: this.transformCast.bind(this), - FetchNode: this.transformFetch.bind(this), - TopNode: this.transformTop.bind(this), - OutputNode: this.transformOutput.bind(this), - OrActionNode: this.transformOrAction.bind(this), - CollateNode: this.transformCollate.bind(this), - }); - transformNode(node, queryId) { - if (!node) { - return node; - } - this.nodeStack.push(node); - const out = this.transformNodeImpl(node, queryId); - this.nodeStack.pop(); - return (0, object_utils_js_1.freeze)(out); - } - transformNodeImpl(node, queryId) { - return this.#transformers[node.kind](node, queryId); - } - transformNodeList(list, queryId) { - if (!list) { - return list; - } - return (0, object_utils_js_1.freeze)(list.map((node) => this.transformNode(node, queryId))); - } - transformSelectQuery(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'SelectQueryNode', - from: this.transformNode(node.from, queryId), - selections: this.transformNodeList(node.selections, queryId), - distinctOn: this.transformNodeList(node.distinctOn, queryId), - joins: this.transformNodeList(node.joins, queryId), - groupBy: this.transformNode(node.groupBy, queryId), - orderBy: this.transformNode(node.orderBy, queryId), - where: this.transformNode(node.where, queryId), - frontModifiers: this.transformNodeList(node.frontModifiers, queryId), - endModifiers: this.transformNodeList(node.endModifiers, queryId), - limit: this.transformNode(node.limit, queryId), - offset: this.transformNode(node.offset, queryId), - with: this.transformNode(node.with, queryId), - having: this.transformNode(node.having, queryId), - explain: this.transformNode(node.explain, queryId), - setOperations: this.transformNodeList(node.setOperations, queryId), - fetch: this.transformNode(node.fetch, queryId), - top: this.transformNode(node.top, queryId), - }); - } - transformSelection(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'SelectionNode', - selection: this.transformNode(node.selection, queryId), - }); - } - transformColumn(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'ColumnNode', - column: this.transformNode(node.column, queryId), - }); - } - transformAlias(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'AliasNode', - node: this.transformNode(node.node, queryId), - alias: this.transformNode(node.alias, queryId), - }); - } - transformTable(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'TableNode', - table: this.transformNode(node.table, queryId), - }); - } - transformFrom(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'FromNode', - froms: this.transformNodeList(node.froms, queryId), - }); - } - transformReference(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'ReferenceNode', - column: this.transformNode(node.column, queryId), - table: this.transformNode(node.table, queryId), - }); - } - transformAnd(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'AndNode', - left: this.transformNode(node.left, queryId), - right: this.transformNode(node.right, queryId), - }); - } - transformOr(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'OrNode', - left: this.transformNode(node.left, queryId), - right: this.transformNode(node.right, queryId), - }); - } - transformValueList(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'ValueListNode', - values: this.transformNodeList(node.values, queryId), - }); - } - transformParens(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'ParensNode', - node: this.transformNode(node.node, queryId), - }); - } - transformJoin(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'JoinNode', - joinType: node.joinType, - table: this.transformNode(node.table, queryId), - on: this.transformNode(node.on, queryId), - }); - } - transformRaw(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'RawNode', - sqlFragments: (0, object_utils_js_1.freeze)([...node.sqlFragments]), - parameters: this.transformNodeList(node.parameters, queryId), - }); - } - transformWhere(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'WhereNode', - where: this.transformNode(node.where, queryId), - }); - } - transformInsertQuery(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'InsertQueryNode', - into: this.transformNode(node.into, queryId), - columns: this.transformNodeList(node.columns, queryId), - values: this.transformNode(node.values, queryId), - returning: this.transformNode(node.returning, queryId), - onConflict: this.transformNode(node.onConflict, queryId), - onDuplicateKey: this.transformNode(node.onDuplicateKey, queryId), - endModifiers: this.transformNodeList(node.endModifiers, queryId), - with: this.transformNode(node.with, queryId), - ignore: node.ignore, - orAction: this.transformNode(node.orAction, queryId), - replace: node.replace, - explain: this.transformNode(node.explain, queryId), - defaultValues: node.defaultValues, - top: this.transformNode(node.top, queryId), - output: this.transformNode(node.output, queryId), - }); - } - transformValues(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'ValuesNode', - values: this.transformNodeList(node.values, queryId), - }); - } - transformDeleteQuery(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'DeleteQueryNode', - from: this.transformNode(node.from, queryId), - using: this.transformNode(node.using, queryId), - joins: this.transformNodeList(node.joins, queryId), - where: this.transformNode(node.where, queryId), - returning: this.transformNode(node.returning, queryId), - endModifiers: this.transformNodeList(node.endModifiers, queryId), - with: this.transformNode(node.with, queryId), - orderBy: this.transformNode(node.orderBy, queryId), - limit: this.transformNode(node.limit, queryId), - explain: this.transformNode(node.explain, queryId), - top: this.transformNode(node.top, queryId), - output: this.transformNode(node.output, queryId), - }); - } - transformReturning(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'ReturningNode', - selections: this.transformNodeList(node.selections, queryId), - }); - } - transformCreateTable(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'CreateTableNode', - table: this.transformNode(node.table, queryId), - columns: this.transformNodeList(node.columns, queryId), - constraints: this.transformNodeList(node.constraints, queryId), - temporary: node.temporary, - ifNotExists: node.ifNotExists, - onCommit: node.onCommit, - frontModifiers: this.transformNodeList(node.frontModifiers, queryId), - endModifiers: this.transformNodeList(node.endModifiers, queryId), - selectQuery: this.transformNode(node.selectQuery, queryId), - }); - } - transformColumnDefinition(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'ColumnDefinitionNode', - column: this.transformNode(node.column, queryId), - dataType: this.transformNode(node.dataType, queryId), - references: this.transformNode(node.references, queryId), - primaryKey: node.primaryKey, - autoIncrement: node.autoIncrement, - unique: node.unique, - notNull: node.notNull, - unsigned: node.unsigned, - defaultTo: this.transformNode(node.defaultTo, queryId), - check: this.transformNode(node.check, queryId), - generated: this.transformNode(node.generated, queryId), - frontModifiers: this.transformNodeList(node.frontModifiers, queryId), - endModifiers: this.transformNodeList(node.endModifiers, queryId), - nullsNotDistinct: node.nullsNotDistinct, - identity: node.identity, - ifNotExists: node.ifNotExists, - }); - } - transformAddColumn(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'AddColumnNode', - column: this.transformNode(node.column, queryId), - }); - } - transformDropTable(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'DropTableNode', - table: this.transformNode(node.table, queryId), - ifExists: node.ifExists, - cascade: node.cascade, - }); - } - transformOrderBy(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'OrderByNode', - items: this.transformNodeList(node.items, queryId), - }); - } - transformOrderByItem(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'OrderByItemNode', - orderBy: this.transformNode(node.orderBy, queryId), - direction: this.transformNode(node.direction, queryId), - collation: this.transformNode(node.collation, queryId), - nulls: node.nulls, - }); - } - transformGroupBy(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'GroupByNode', - items: this.transformNodeList(node.items, queryId), - }); - } - transformGroupByItem(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'GroupByItemNode', - groupBy: this.transformNode(node.groupBy, queryId), - }); - } - transformUpdateQuery(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'UpdateQueryNode', - table: this.transformNode(node.table, queryId), - from: this.transformNode(node.from, queryId), - joins: this.transformNodeList(node.joins, queryId), - where: this.transformNode(node.where, queryId), - updates: this.transformNodeList(node.updates, queryId), - returning: this.transformNode(node.returning, queryId), - endModifiers: this.transformNodeList(node.endModifiers, queryId), - with: this.transformNode(node.with, queryId), - explain: this.transformNode(node.explain, queryId), - limit: this.transformNode(node.limit, queryId), - top: this.transformNode(node.top, queryId), - output: this.transformNode(node.output, queryId), - orderBy: this.transformNode(node.orderBy, queryId), - }); - } - transformColumnUpdate(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'ColumnUpdateNode', - column: this.transformNode(node.column, queryId), - value: this.transformNode(node.value, queryId), - }); - } - transformLimit(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'LimitNode', - limit: this.transformNode(node.limit, queryId), - }); - } - transformOffset(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'OffsetNode', - offset: this.transformNode(node.offset, queryId), - }); - } - transformOnConflict(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'OnConflictNode', - columns: this.transformNodeList(node.columns, queryId), - constraint: this.transformNode(node.constraint, queryId), - indexExpression: this.transformNode(node.indexExpression, queryId), - indexWhere: this.transformNode(node.indexWhere, queryId), - updates: this.transformNodeList(node.updates, queryId), - updateWhere: this.transformNode(node.updateWhere, queryId), - doNothing: node.doNothing, - }); - } - transformOnDuplicateKey(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'OnDuplicateKeyNode', - updates: this.transformNodeList(node.updates, queryId), - }); - } - transformCreateIndex(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'CreateIndexNode', - name: this.transformNode(node.name, queryId), - table: this.transformNode(node.table, queryId), - columns: this.transformNodeList(node.columns, queryId), - unique: node.unique, - using: this.transformNode(node.using, queryId), - ifNotExists: node.ifNotExists, - where: this.transformNode(node.where, queryId), - nullsNotDistinct: node.nullsNotDistinct, - }); - } - transformList(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'ListNode', - items: this.transformNodeList(node.items, queryId), - }); - } - transformDropIndex(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'DropIndexNode', - name: this.transformNode(node.name, queryId), - table: this.transformNode(node.table, queryId), - ifExists: node.ifExists, - cascade: node.cascade, - }); - } - transformPrimaryKeyConstraint(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'PrimaryKeyConstraintNode', - columns: this.transformNodeList(node.columns, queryId), - name: this.transformNode(node.name, queryId), - deferrable: node.deferrable, - initiallyDeferred: node.initiallyDeferred, - }); - } - transformUniqueConstraint(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'UniqueConstraintNode', - columns: this.transformNodeList(node.columns, queryId), - name: this.transformNode(node.name, queryId), - nullsNotDistinct: node.nullsNotDistinct, - deferrable: node.deferrable, - initiallyDeferred: node.initiallyDeferred, - }); - } - transformForeignKeyConstraint(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'ForeignKeyConstraintNode', - columns: this.transformNodeList(node.columns, queryId), - references: this.transformNode(node.references, queryId), - name: this.transformNode(node.name, queryId), - onDelete: node.onDelete, - onUpdate: node.onUpdate, - deferrable: node.deferrable, - initiallyDeferred: node.initiallyDeferred, - }); - } - transformSetOperation(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'SetOperationNode', - operator: node.operator, - expression: this.transformNode(node.expression, queryId), - all: node.all, - }); - } - transformReferences(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'ReferencesNode', - table: this.transformNode(node.table, queryId), - columns: this.transformNodeList(node.columns, queryId), - onDelete: node.onDelete, - onUpdate: node.onUpdate, - }); - } - transformCheckConstraint(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'CheckConstraintNode', - expression: this.transformNode(node.expression, queryId), - name: this.transformNode(node.name, queryId), - }); - } - transformWith(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'WithNode', - expressions: this.transformNodeList(node.expressions, queryId), - recursive: node.recursive, - }); - } - transformCommonTableExpression(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'CommonTableExpressionNode', - name: this.transformNode(node.name, queryId), - materialized: node.materialized, - expression: this.transformNode(node.expression, queryId), - }); - } - transformCommonTableExpressionName(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'CommonTableExpressionNameNode', - table: this.transformNode(node.table, queryId), - columns: this.transformNodeList(node.columns, queryId), - }); - } - transformHaving(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'HavingNode', - having: this.transformNode(node.having, queryId), - }); - } - transformCreateSchema(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'CreateSchemaNode', - schema: this.transformNode(node.schema, queryId), - ifNotExists: node.ifNotExists, - }); - } - transformDropSchema(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'DropSchemaNode', - schema: this.transformNode(node.schema, queryId), - ifExists: node.ifExists, - cascade: node.cascade, - }); - } - transformAlterTable(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'AlterTableNode', - table: this.transformNode(node.table, queryId), - renameTo: this.transformNode(node.renameTo, queryId), - setSchema: this.transformNode(node.setSchema, queryId), - columnAlterations: this.transformNodeList(node.columnAlterations, queryId), - addConstraint: this.transformNode(node.addConstraint, queryId), - dropConstraint: this.transformNode(node.dropConstraint, queryId), - renameConstraint: this.transformNode(node.renameConstraint, queryId), - addIndex: this.transformNode(node.addIndex, queryId), - dropIndex: this.transformNode(node.dropIndex, queryId), - }); - } - transformDropColumn(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'DropColumnNode', - column: this.transformNode(node.column, queryId), - }); - } - transformRenameColumn(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'RenameColumnNode', - column: this.transformNode(node.column, queryId), - renameTo: this.transformNode(node.renameTo, queryId), - }); - } - transformAlterColumn(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'AlterColumnNode', - column: this.transformNode(node.column, queryId), - dataType: this.transformNode(node.dataType, queryId), - dataTypeExpression: this.transformNode(node.dataTypeExpression, queryId), - setDefault: this.transformNode(node.setDefault, queryId), - dropDefault: node.dropDefault, - setNotNull: node.setNotNull, - dropNotNull: node.dropNotNull, - }); - } - transformModifyColumn(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'ModifyColumnNode', - column: this.transformNode(node.column, queryId), - }); - } - transformAddConstraint(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'AddConstraintNode', - constraint: this.transformNode(node.constraint, queryId), - }); - } - transformDropConstraint(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'DropConstraintNode', - constraintName: this.transformNode(node.constraintName, queryId), - ifExists: node.ifExists, - modifier: node.modifier, - }); - } - transformRenameConstraint(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'RenameConstraintNode', - oldName: this.transformNode(node.oldName, queryId), - newName: this.transformNode(node.newName, queryId), - }); - } - transformCreateView(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'CreateViewNode', - name: this.transformNode(node.name, queryId), - temporary: node.temporary, - orReplace: node.orReplace, - ifNotExists: node.ifNotExists, - materialized: node.materialized, - columns: this.transformNodeList(node.columns, queryId), - as: this.transformNode(node.as, queryId), - }); - } - transformRefreshMaterializedView(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'RefreshMaterializedViewNode', - name: this.transformNode(node.name, queryId), - concurrently: node.concurrently, - withNoData: node.withNoData, - }); - } - transformDropView(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'DropViewNode', - name: this.transformNode(node.name, queryId), - ifExists: node.ifExists, - materialized: node.materialized, - cascade: node.cascade, - }); - } - transformGenerated(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'GeneratedNode', - byDefault: node.byDefault, - always: node.always, - identity: node.identity, - stored: node.stored, - expression: this.transformNode(node.expression, queryId), - }); - } - transformDefaultValue(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'DefaultValueNode', - defaultValue: this.transformNode(node.defaultValue, queryId), - }); - } - transformOn(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'OnNode', - on: this.transformNode(node.on, queryId), - }); - } - transformSelectModifier(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'SelectModifierNode', - modifier: node.modifier, - rawModifier: this.transformNode(node.rawModifier, queryId), - of: this.transformNodeList(node.of, queryId), - }); - } - transformCreateType(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'CreateTypeNode', - name: this.transformNode(node.name, queryId), - enum: this.transformNode(node.enum, queryId), - }); - } - transformDropType(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'DropTypeNode', - name: this.transformNode(node.name, queryId), - ifExists: node.ifExists, - }); - } - transformExplain(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'ExplainNode', - format: node.format, - options: this.transformNode(node.options, queryId), - }); - } - transformSchemableIdentifier(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'SchemableIdentifierNode', - schema: this.transformNode(node.schema, queryId), - identifier: this.transformNode(node.identifier, queryId), - }); - } - transformAggregateFunction(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'AggregateFunctionNode', - func: node.func, - aggregated: this.transformNodeList(node.aggregated, queryId), - distinct: node.distinct, - orderBy: this.transformNode(node.orderBy, queryId), - withinGroup: this.transformNode(node.withinGroup, queryId), - filter: this.transformNode(node.filter, queryId), - over: this.transformNode(node.over, queryId), - }); - } - transformOver(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'OverNode', - orderBy: this.transformNode(node.orderBy, queryId), - partitionBy: this.transformNode(node.partitionBy, queryId), - }); - } - transformPartitionBy(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'PartitionByNode', - items: this.transformNodeList(node.items, queryId), - }); - } - transformPartitionByItem(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'PartitionByItemNode', - partitionBy: this.transformNode(node.partitionBy, queryId), - }); - } - transformBinaryOperation(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'BinaryOperationNode', - leftOperand: this.transformNode(node.leftOperand, queryId), - operator: this.transformNode(node.operator, queryId), - rightOperand: this.transformNode(node.rightOperand, queryId), - }); - } - transformUnaryOperation(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'UnaryOperationNode', - operator: this.transformNode(node.operator, queryId), - operand: this.transformNode(node.operand, queryId), - }); - } - transformUsing(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'UsingNode', - tables: this.transformNodeList(node.tables, queryId), - }); - } - transformFunction(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'FunctionNode', - func: node.func, - arguments: this.transformNodeList(node.arguments, queryId), - }); - } - transformCase(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'CaseNode', - value: this.transformNode(node.value, queryId), - when: this.transformNodeList(node.when, queryId), - else: this.transformNode(node.else, queryId), - isStatement: node.isStatement, - }); - } - transformWhen(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'WhenNode', - condition: this.transformNode(node.condition, queryId), - result: this.transformNode(node.result, queryId), - }); - } - transformJSONReference(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'JSONReferenceNode', - reference: this.transformNode(node.reference, queryId), - traversal: this.transformNode(node.traversal, queryId), - }); - } - transformJSONPath(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'JSONPathNode', - inOperator: this.transformNode(node.inOperator, queryId), - pathLegs: this.transformNodeList(node.pathLegs, queryId), - }); - } - transformJSONPathLeg(node, _queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'JSONPathLegNode', - type: node.type, - value: node.value, - }); - } - transformJSONOperatorChain(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'JSONOperatorChainNode', - operator: this.transformNode(node.operator, queryId), - values: this.transformNodeList(node.values, queryId), - }); - } - transformTuple(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'TupleNode', - values: this.transformNodeList(node.values, queryId), - }); - } - transformMergeQuery(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'MergeQueryNode', - into: this.transformNode(node.into, queryId), - using: this.transformNode(node.using, queryId), - whens: this.transformNodeList(node.whens, queryId), - with: this.transformNode(node.with, queryId), - top: this.transformNode(node.top, queryId), - endModifiers: this.transformNodeList(node.endModifiers, queryId), - output: this.transformNode(node.output, queryId), - returning: this.transformNode(node.returning, queryId), - }); - } - transformMatched(node, _queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'MatchedNode', - not: node.not, - bySource: node.bySource, - }); - } - transformAddIndex(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'AddIndexNode', - name: this.transformNode(node.name, queryId), - columns: this.transformNodeList(node.columns, queryId), - unique: node.unique, - using: this.transformNode(node.using, queryId), - ifNotExists: node.ifNotExists, - }); - } - transformCast(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'CastNode', - expression: this.transformNode(node.expression, queryId), - dataType: this.transformNode(node.dataType, queryId), - }); - } - transformFetch(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'FetchNode', - rowCount: this.transformNode(node.rowCount, queryId), - modifier: node.modifier, - }); - } - transformTop(node, _queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'TopNode', - expression: node.expression, - modifiers: node.modifiers, - }); - } - transformOutput(node, queryId) { - return (0, require_all_props_js_1.requireAllProps)({ - kind: 'OutputNode', - selections: this.transformNodeList(node.selections, queryId), - }); - } - transformDataType(node, _queryId) { - // An Object.freezed leaf node. No need to clone. - return node; - } - transformSelectAll(node, _queryId) { - // An Object.freezed leaf node. No need to clone. - return node; - } - transformIdentifier(node, _queryId) { - // An Object.freezed leaf node. No need to clone. - return node; - } - transformValue(node, _queryId) { - // An Object.freezed leaf node. No need to clone. - return node; - } - transformPrimitiveValueList(node, _queryId) { - // An Object.freezed leaf node. No need to clone. - return node; - } - transformOperator(node, _queryId) { - // An Object.freezed leaf node. No need to clone. - return node; - } - transformDefaultInsertValue(node, _queryId) { - // An Object.freezed leaf node. No need to clone. - return node; - } - transformOrAction(node, _queryId) { - // An Object.freezed leaf node. No need to clone. - return node; - } - transformCollate(node, _queryId) { - // An Object.freezed leaf node. No need to clone. - return node; - } -} -exports.OperationNodeTransformer = OperationNodeTransformer; diff --git a/node_modules/kysely/dist/cjs/operation-node/operation-node-visitor.d.ts b/node_modules/kysely/dist/cjs/operation-node/operation-node-visitor.d.ts deleted file mode 100644 index 7a31c7f..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/operation-node-visitor.d.ts +++ /dev/null @@ -1,201 +0,0 @@ -import type { AliasNode } from '../operation-node/alias-node.js'; -import type { ColumnNode } from '../operation-node/column-node.js'; -import type { IdentifierNode } from '../operation-node/identifier-node.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -import type { ReferenceNode } from '../operation-node/reference-node.js'; -import type { SelectAllNode } from '../operation-node/select-all-node.js'; -import type { SelectionNode } from '../operation-node/selection-node.js'; -import type { TableNode } from '../operation-node/table-node.js'; -import type { AndNode } from './and-node.js'; -import type { JoinNode } from './join-node.js'; -import type { OrNode } from './or-node.js'; -import type { ParensNode } from './parens-node.js'; -import type { PrimitiveValueListNode } from './primitive-value-list-node.js'; -import type { RawNode } from './raw-node.js'; -import type { SelectQueryNode } from './select-query-node.js'; -import type { ValueListNode } from './value-list-node.js'; -import type { ValueNode } from './value-node.js'; -import type { OperatorNode } from './operator-node.js'; -import type { FromNode } from './from-node.js'; -import type { WhereNode } from './where-node.js'; -import type { InsertQueryNode } from './insert-query-node.js'; -import type { DeleteQueryNode } from './delete-query-node.js'; -import type { ReturningNode } from './returning-node.js'; -import type { CreateTableNode } from './create-table-node.js'; -import type { AddColumnNode } from './add-column-node.js'; -import type { DropTableNode } from './drop-table-node.js'; -import type { DataTypeNode } from './data-type-node.js'; -import type { OrderByNode } from './order-by-node.js'; -import type { OrderByItemNode } from './order-by-item-node.js'; -import type { GroupByNode } from './group-by-node.js'; -import type { GroupByItemNode } from './group-by-item-node.js'; -import type { UpdateQueryNode } from './update-query-node.js'; -import type { ColumnUpdateNode } from './column-update-node.js'; -import type { LimitNode } from './limit-node.js'; -import type { OffsetNode } from './offset-node.js'; -import type { OnConflictNode } from './on-conflict-node.js'; -import type { CreateIndexNode } from './create-index-node.js'; -import type { ListNode } from './list-node.js'; -import type { DropIndexNode } from './drop-index-node.js'; -import type { PrimaryKeyConstraintNode } from './primary-key-constraint-node.js'; -import type { UniqueConstraintNode } from './unique-constraint-node.js'; -import type { ReferencesNode } from './references-node.js'; -import type { CheckConstraintNode } from './check-constraint-node.js'; -import type { WithNode } from './with-node.js'; -import type { CommonTableExpressionNode } from './common-table-expression-node.js'; -import type { CommonTableExpressionNameNode } from './common-table-expression-name-node.js'; -import type { HavingNode } from './having-node.js'; -import type { CreateSchemaNode } from './create-schema-node.js'; -import type { DropSchemaNode } from './drop-schema-node.js'; -import type { AlterTableNode } from './alter-table-node.js'; -import type { DropColumnNode } from './drop-column-node.js'; -import type { RenameColumnNode } from './rename-column-node.js'; -import type { AlterColumnNode } from './alter-column-node.js'; -import type { AddConstraintNode } from './add-constraint-node.js'; -import type { DropConstraintNode } from './drop-constraint-node.js'; -import type { ForeignKeyConstraintNode } from './foreign-key-constraint-node.js'; -import type { ColumnDefinitionNode } from './column-definition-node.js'; -import type { ModifyColumnNode } from './modify-column-node.js'; -import type { OnDuplicateKeyNode } from './on-duplicate-key-node.js'; -import type { CreateViewNode } from './create-view-node.js'; -import type { DropViewNode } from './drop-view-node.js'; -import type { GeneratedNode } from './generated-node.js'; -import type { DefaultValueNode } from './default-value-node.js'; -import type { OnNode } from './on-node.js'; -import type { ValuesNode } from './values-node.js'; -import type { SelectModifierNode } from './select-modifier-node.js'; -import type { CreateTypeNode } from './create-type-node.js'; -import type { DropTypeNode } from './drop-type-node.js'; -import type { ExplainNode } from './explain-node.js'; -import type { SchemableIdentifierNode } from './schemable-identifier-node.js'; -import type { DefaultInsertValueNode } from './default-insert-value-node.js'; -import type { AggregateFunctionNode } from './aggregate-function-node.js'; -import type { OverNode } from './over-node.js'; -import type { PartitionByNode } from './partition-by-node.js'; -import type { PartitionByItemNode } from './partition-by-item-node.js'; -import type { SetOperationNode } from './set-operation-node.js'; -import type { BinaryOperationNode } from './binary-operation-node.js'; -import type { UnaryOperationNode } from './unary-operation-node.js'; -import type { UsingNode } from './using-node.js'; -import type { FunctionNode } from './function-node.js'; -import type { WhenNode } from './when-node.js'; -import type { CaseNode } from './case-node.js'; -import type { JSONReferenceNode } from './json-reference-node.js'; -import type { JSONPathNode } from './json-path-node.js'; -import type { JSONPathLegNode } from './json-path-leg-node.js'; -import type { JSONOperatorChainNode } from './json-operator-chain-node.js'; -import type { TupleNode } from './tuple-node.js'; -import type { MergeQueryNode } from './merge-query-node.js'; -import type { MatchedNode } from './matched-node.js'; -import type { AddIndexNode } from './add-index-node.js'; -import type { CastNode } from './cast-node.js'; -import type { FetchNode } from './fetch-node.js'; -import type { TopNode } from './top-node.js'; -import type { OutputNode } from './output-node.js'; -import type { RefreshMaterializedViewNode } from './refresh-materialized-view-node.js'; -import type { OrActionNode } from './or-action-node.js'; -import type { CollateNode } from './collate-node.js'; -import type { RenameConstraintNode } from './rename-constraint-node.js'; -export declare abstract class OperationNodeVisitor { - #private; - protected readonly nodeStack: OperationNode[]; - protected get parentNode(): OperationNode | undefined; - protected readonly visitNode: (node: OperationNode) => void; - protected abstract visitSelectQuery(node: SelectQueryNode): void; - protected abstract visitSelection(node: SelectionNode): void; - protected abstract visitColumn(node: ColumnNode): void; - protected abstract visitAlias(node: AliasNode): void; - protected abstract visitTable(node: TableNode): void; - protected abstract visitFrom(node: FromNode): void; - protected abstract visitReference(node: ReferenceNode): void; - protected abstract visitAnd(node: AndNode): void; - protected abstract visitOr(node: OrNode): void; - protected abstract visitValueList(node: ValueListNode): void; - protected abstract visitParens(node: ParensNode): void; - protected abstract visitJoin(node: JoinNode): void; - protected abstract visitRaw(node: RawNode): void; - protected abstract visitWhere(node: WhereNode): void; - protected abstract visitInsertQuery(node: InsertQueryNode): void; - protected abstract visitDeleteQuery(node: DeleteQueryNode): void; - protected abstract visitReturning(node: ReturningNode): void; - protected abstract visitCreateTable(node: CreateTableNode): void; - protected abstract visitAddColumn(node: AddColumnNode): void; - protected abstract visitColumnDefinition(node: ColumnDefinitionNode): void; - protected abstract visitDropTable(node: DropTableNode): void; - protected abstract visitOrderBy(node: OrderByNode): void; - protected abstract visitOrderByItem(node: OrderByItemNode): void; - protected abstract visitGroupBy(node: GroupByNode): void; - protected abstract visitGroupByItem(node: GroupByItemNode): void; - protected abstract visitUpdateQuery(node: UpdateQueryNode): void; - protected abstract visitColumnUpdate(node: ColumnUpdateNode): void; - protected abstract visitLimit(node: LimitNode): void; - protected abstract visitOffset(node: OffsetNode): void; - protected abstract visitOnConflict(node: OnConflictNode): void; - protected abstract visitOnDuplicateKey(node: OnDuplicateKeyNode): void; - protected abstract visitCreateIndex(node: CreateIndexNode): void; - protected abstract visitDropIndex(node: DropIndexNode): void; - protected abstract visitList(node: ListNode): void; - protected abstract visitPrimaryKeyConstraint(node: PrimaryKeyConstraintNode): void; - protected abstract visitUniqueConstraint(node: UniqueConstraintNode): void; - protected abstract visitReferences(node: ReferencesNode): void; - protected abstract visitCheckConstraint(node: CheckConstraintNode): void; - protected abstract visitWith(node: WithNode): void; - protected abstract visitCommonTableExpression(node: CommonTableExpressionNode): void; - protected abstract visitCommonTableExpressionName(node: CommonTableExpressionNameNode): void; - protected abstract visitHaving(node: HavingNode): void; - protected abstract visitCreateSchema(node: CreateSchemaNode): void; - protected abstract visitDropSchema(node: DropSchemaNode): void; - protected abstract visitAlterTable(node: AlterTableNode): void; - protected abstract visitDropColumn(node: DropColumnNode): void; - protected abstract visitRenameColumn(node: RenameColumnNode): void; - protected abstract visitAlterColumn(node: AlterColumnNode): void; - protected abstract visitModifyColumn(node: ModifyColumnNode): void; - protected abstract visitAddConstraint(node: AddConstraintNode): void; - protected abstract visitDropConstraint(node: DropConstraintNode): void; - protected abstract visitRenameConstraint(node: RenameConstraintNode): void; - protected abstract visitForeignKeyConstraint(node: ForeignKeyConstraintNode): void; - protected abstract visitDataType(node: DataTypeNode): void; - protected abstract visitSelectAll(node: SelectAllNode): void; - protected abstract visitIdentifier(node: IdentifierNode): void; - protected abstract visitSchemableIdentifier(node: SchemableIdentifierNode): void; - protected abstract visitValue(node: ValueNode): void; - protected abstract visitPrimitiveValueList(node: PrimitiveValueListNode): void; - protected abstract visitOperator(node: OperatorNode): void; - protected abstract visitCreateView(node: CreateViewNode): void; - protected abstract visitRefreshMaterializedView(node: RefreshMaterializedViewNode): void; - protected abstract visitDropView(node: DropViewNode): void; - protected abstract visitGenerated(node: GeneratedNode): void; - protected abstract visitDefaultValue(node: DefaultValueNode): void; - protected abstract visitOn(node: OnNode): void; - protected abstract visitValues(node: ValuesNode): void; - protected abstract visitSelectModifier(node: SelectModifierNode): void; - protected abstract visitCreateType(node: CreateTypeNode): void; - protected abstract visitDropType(node: DropTypeNode): void; - protected abstract visitExplain(node: ExplainNode): void; - protected abstract visitDefaultInsertValue(node: DefaultInsertValueNode): void; - protected abstract visitAggregateFunction(node: AggregateFunctionNode): void; - protected abstract visitOver(node: OverNode): void; - protected abstract visitPartitionBy(node: PartitionByNode): void; - protected abstract visitPartitionByItem(node: PartitionByItemNode): void; - protected abstract visitSetOperation(node: SetOperationNode): void; - protected abstract visitBinaryOperation(node: BinaryOperationNode): void; - protected abstract visitUnaryOperation(node: UnaryOperationNode): void; - protected abstract visitUsing(node: UsingNode): void; - protected abstract visitFunction(node: FunctionNode): void; - protected abstract visitCase(node: CaseNode): void; - protected abstract visitWhen(node: WhenNode): void; - protected abstract visitJSONReference(node: JSONReferenceNode): void; - protected abstract visitJSONPath(node: JSONPathNode): void; - protected abstract visitJSONPathLeg(node: JSONPathLegNode): void; - protected abstract visitJSONOperatorChain(node: JSONOperatorChainNode): void; - protected abstract visitTuple(node: TupleNode): void; - protected abstract visitMergeQuery(node: MergeQueryNode): void; - protected abstract visitMatched(node: MatchedNode): void; - protected abstract visitAddIndex(node: AddIndexNode): void; - protected abstract visitCast(node: CastNode): void; - protected abstract visitFetch(node: FetchNode): void; - protected abstract visitTop(node: TopNode): void; - protected abstract visitOutput(node: OutputNode): void; - protected abstract visitOrAction(node: OrActionNode): void; - protected abstract visitCollate(node: CollateNode): void; -} diff --git a/node_modules/kysely/dist/cjs/operation-node/operation-node-visitor.js b/node_modules/kysely/dist/cjs/operation-node/operation-node-visitor.js deleted file mode 100644 index 11ed3f8..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/operation-node-visitor.js +++ /dev/null @@ -1,115 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OperationNodeVisitor = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -class OperationNodeVisitor { - nodeStack = []; - get parentNode() { - return this.nodeStack[this.nodeStack.length - 2]; - } - #visitors = (0, object_utils_js_1.freeze)({ - AliasNode: this.visitAlias.bind(this), - ColumnNode: this.visitColumn.bind(this), - IdentifierNode: this.visitIdentifier.bind(this), - SchemableIdentifierNode: this.visitSchemableIdentifier.bind(this), - RawNode: this.visitRaw.bind(this), - ReferenceNode: this.visitReference.bind(this), - SelectQueryNode: this.visitSelectQuery.bind(this), - SelectionNode: this.visitSelection.bind(this), - TableNode: this.visitTable.bind(this), - FromNode: this.visitFrom.bind(this), - SelectAllNode: this.visitSelectAll.bind(this), - AndNode: this.visitAnd.bind(this), - OrNode: this.visitOr.bind(this), - ValueNode: this.visitValue.bind(this), - ValueListNode: this.visitValueList.bind(this), - PrimitiveValueListNode: this.visitPrimitiveValueList.bind(this), - ParensNode: this.visitParens.bind(this), - JoinNode: this.visitJoin.bind(this), - OperatorNode: this.visitOperator.bind(this), - WhereNode: this.visitWhere.bind(this), - InsertQueryNode: this.visitInsertQuery.bind(this), - DeleteQueryNode: this.visitDeleteQuery.bind(this), - ReturningNode: this.visitReturning.bind(this), - CreateTableNode: this.visitCreateTable.bind(this), - AddColumnNode: this.visitAddColumn.bind(this), - ColumnDefinitionNode: this.visitColumnDefinition.bind(this), - DropTableNode: this.visitDropTable.bind(this), - DataTypeNode: this.visitDataType.bind(this), - OrderByNode: this.visitOrderBy.bind(this), - OrderByItemNode: this.visitOrderByItem.bind(this), - GroupByNode: this.visitGroupBy.bind(this), - GroupByItemNode: this.visitGroupByItem.bind(this), - UpdateQueryNode: this.visitUpdateQuery.bind(this), - ColumnUpdateNode: this.visitColumnUpdate.bind(this), - LimitNode: this.visitLimit.bind(this), - OffsetNode: this.visitOffset.bind(this), - OnConflictNode: this.visitOnConflict.bind(this), - OnDuplicateKeyNode: this.visitOnDuplicateKey.bind(this), - CreateIndexNode: this.visitCreateIndex.bind(this), - DropIndexNode: this.visitDropIndex.bind(this), - ListNode: this.visitList.bind(this), - PrimaryKeyConstraintNode: this.visitPrimaryKeyConstraint.bind(this), - UniqueConstraintNode: this.visitUniqueConstraint.bind(this), - ReferencesNode: this.visitReferences.bind(this), - CheckConstraintNode: this.visitCheckConstraint.bind(this), - WithNode: this.visitWith.bind(this), - CommonTableExpressionNode: this.visitCommonTableExpression.bind(this), - CommonTableExpressionNameNode: this.visitCommonTableExpressionName.bind(this), - HavingNode: this.visitHaving.bind(this), - CreateSchemaNode: this.visitCreateSchema.bind(this), - DropSchemaNode: this.visitDropSchema.bind(this), - AlterTableNode: this.visitAlterTable.bind(this), - DropColumnNode: this.visitDropColumn.bind(this), - RenameColumnNode: this.visitRenameColumn.bind(this), - AlterColumnNode: this.visitAlterColumn.bind(this), - ModifyColumnNode: this.visitModifyColumn.bind(this), - AddConstraintNode: this.visitAddConstraint.bind(this), - DropConstraintNode: this.visitDropConstraint.bind(this), - RenameConstraintNode: this.visitRenameConstraint.bind(this), - ForeignKeyConstraintNode: this.visitForeignKeyConstraint.bind(this), - CreateViewNode: this.visitCreateView.bind(this), - RefreshMaterializedViewNode: this.visitRefreshMaterializedView.bind(this), - DropViewNode: this.visitDropView.bind(this), - GeneratedNode: this.visitGenerated.bind(this), - DefaultValueNode: this.visitDefaultValue.bind(this), - OnNode: this.visitOn.bind(this), - ValuesNode: this.visitValues.bind(this), - SelectModifierNode: this.visitSelectModifier.bind(this), - CreateTypeNode: this.visitCreateType.bind(this), - DropTypeNode: this.visitDropType.bind(this), - ExplainNode: this.visitExplain.bind(this), - DefaultInsertValueNode: this.visitDefaultInsertValue.bind(this), - AggregateFunctionNode: this.visitAggregateFunction.bind(this), - OverNode: this.visitOver.bind(this), - PartitionByNode: this.visitPartitionBy.bind(this), - PartitionByItemNode: this.visitPartitionByItem.bind(this), - SetOperationNode: this.visitSetOperation.bind(this), - BinaryOperationNode: this.visitBinaryOperation.bind(this), - UnaryOperationNode: this.visitUnaryOperation.bind(this), - UsingNode: this.visitUsing.bind(this), - FunctionNode: this.visitFunction.bind(this), - CaseNode: this.visitCase.bind(this), - WhenNode: this.visitWhen.bind(this), - JSONReferenceNode: this.visitJSONReference.bind(this), - JSONPathNode: this.visitJSONPath.bind(this), - JSONPathLegNode: this.visitJSONPathLeg.bind(this), - JSONOperatorChainNode: this.visitJSONOperatorChain.bind(this), - TupleNode: this.visitTuple.bind(this), - MergeQueryNode: this.visitMergeQuery.bind(this), - MatchedNode: this.visitMatched.bind(this), - AddIndexNode: this.visitAddIndex.bind(this), - CastNode: this.visitCast.bind(this), - FetchNode: this.visitFetch.bind(this), - TopNode: this.visitTop.bind(this), - OutputNode: this.visitOutput.bind(this), - OrActionNode: this.visitOrAction.bind(this), - CollateNode: this.visitCollate.bind(this), - }); - visitNode = (node) => { - this.nodeStack.push(node); - this.#visitors[node.kind](node); - this.nodeStack.pop(); - }; -} -exports.OperationNodeVisitor = OperationNodeVisitor; diff --git a/node_modules/kysely/dist/cjs/operation-node/operation-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/operation-node.d.ts deleted file mode 100644 index b3f0a08..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/operation-node.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export type OperationNodeKind = 'IdentifierNode' | 'SchemableIdentifierNode' | 'RawNode' | 'SelectQueryNode' | 'SelectionNode' | 'ReferenceNode' | 'ColumnNode' | 'TableNode' | 'AliasNode' | 'FromNode' | 'SelectAllNode' | 'AndNode' | 'OrNode' | 'ParensNode' | 'ValueNode' | 'ValueListNode' | 'PrimitiveValueListNode' | 'JoinNode' | 'OperatorNode' | 'WhereNode' | 'InsertQueryNode' | 'DeleteQueryNode' | 'ReturningNode' | 'CreateTableNode' | 'ColumnDefinitionNode' | 'AddColumnNode' | 'DropTableNode' | 'DataTypeNode' | 'OrderByNode' | 'OrderByItemNode' | 'GroupByNode' | 'GroupByItemNode' | 'UpdateQueryNode' | 'ColumnUpdateNode' | 'LimitNode' | 'OffsetNode' | 'OnConflictNode' | 'OnDuplicateKeyNode' | 'CreateIndexNode' | 'DropIndexNode' | 'ListNode' | 'ReferencesNode' | 'PrimaryKeyConstraintNode' | 'UniqueConstraintNode' | 'CheckConstraintNode' | 'ForeignKeyConstraintNode' | 'WithNode' | 'CommonTableExpressionNode' | 'HavingNode' | 'CreateSchemaNode' | 'DropSchemaNode' | 'AlterTableNode' | 'ModifyColumnNode' | 'DropColumnNode' | 'RenameColumnNode' | 'AlterColumnNode' | 'AddConstraintNode' | 'DropConstraintNode' | 'CreateViewNode' | 'RefreshMaterializedViewNode' | 'DropViewNode' | 'GeneratedNode' | 'DefaultValueNode' | 'OnNode' | 'ValuesNode' | 'CommonTableExpressionNameNode' | 'SelectModifierNode' | 'CreateTypeNode' | 'DropTypeNode' | 'ExplainNode' | 'DefaultInsertValueNode' | 'AggregateFunctionNode' | 'OverNode' | 'PartitionByNode' | 'PartitionByItemNode' | 'SetOperationNode' | 'BinaryOperationNode' | 'UnaryOperationNode' | 'UsingNode' | 'FunctionNode' | 'CaseNode' | 'WhenNode' | 'JSONReferenceNode' | 'JSONPathNode' | 'JSONPathLegNode' | 'JSONOperatorChainNode' | 'TupleNode' | 'MergeQueryNode' | 'MatchedNode' | 'AddIndexNode' | 'CastNode' | 'FetchNode' | 'TopNode' | 'OutputNode' | 'OrActionNode' | 'CollateNode' | 'RenameConstraintNode'; -export interface OperationNode { - readonly kind: OperationNodeKind; -} diff --git a/node_modules/kysely/dist/cjs/operation-node/operation-node.js b/node_modules/kysely/dist/cjs/operation-node/operation-node.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/operation-node.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/operation-node/operator-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/operator-node.d.ts deleted file mode 100644 index 7ddc7f9..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/operator-node.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export declare const COMPARISON_OPERATORS: readonly ["=", "==", "!=", "<>", ">", ">=", "<", "<=", "in", "not in", "is", "is not", "like", "not like", "match", "ilike", "not ilike", "@>", "<@", "^@", "&&", "?", "?&", "?|", "!<", "!>", "<=>", "!~", "~", "~*", "!~*", "@@", "@@@", "!!", "<->", "regexp", "is distinct from", "is not distinct from"]; -export declare const ARITHMETIC_OPERATORS: readonly ["+", "-", "*", "/", "%", "^", "&", "|", "#", "<<", ">>"]; -export declare const JSON_OPERATORS: readonly ["->", "->>"]; -export declare const BINARY_OPERATORS: readonly ["=", "==", "!=", "<>", ">", ">=", "<", "<=", "in", "not in", "is", "is not", "like", "not like", "match", "ilike", "not ilike", "@>", "<@", "^@", "&&", "?", "?&", "?|", "!<", "!>", "<=>", "!~", "~", "~*", "!~*", "@@", "@@@", "!!", "<->", "regexp", "is distinct from", "is not distinct from", "+", "-", "*", "/", "%", "^", "&", "|", "#", "<<", ">>", "&&", "||"]; -export declare const UNARY_FILTER_OPERATORS: readonly ["exists", "not exists"]; -export declare const UNARY_OPERATORS: readonly ["not", "-", "exists", "not exists"]; -export declare const OPERATORS: readonly ["=", "==", "!=", "<>", ">", ">=", "<", "<=", "in", "not in", "is", "is not", "like", "not like", "match", "ilike", "not ilike", "@>", "<@", "^@", "&&", "?", "?&", "?|", "!<", "!>", "<=>", "!~", "~", "~*", "!~*", "@@", "@@@", "!!", "<->", "regexp", "is distinct from", "is not distinct from", "+", "-", "*", "/", "%", "^", "&", "|", "#", "<<", ">>", "&&", "||", "->", "->>", "not", "-", "exists", "not exists", "between", "between symmetric"]; -export type ComparisonOperator = (typeof COMPARISON_OPERATORS)[number]; -export type ArithmeticOperator = (typeof ARITHMETIC_OPERATORS)[number]; -export type JSONOperator = (typeof JSON_OPERATORS)[number]; -export type JSONOperatorWith$ = JSONOperator | `${JSONOperator}$`; -export type BinaryOperator = (typeof BINARY_OPERATORS)[number]; -export type UnaryOperator = (typeof UNARY_OPERATORS)[number]; -export type UnaryFilterOperator = (typeof UNARY_FILTER_OPERATORS)[number]; -export type Operator = (typeof OPERATORS)[number]; -export interface OperatorNode extends OperationNode { - readonly kind: 'OperatorNode'; - readonly operator: Operator; -} -type OperatorNodeFactory = Readonly<{ - is(node: OperationNode): node is OperatorNode; - create(operator: Operator): Readonly; -}>; -/** - * @internal - */ -export declare const OperatorNode: OperatorNodeFactory; -export declare function isOperator(op: unknown): op is Operator; -export declare function isBinaryOperator(op: unknown): op is BinaryOperator; -export declare function isComparisonOperator(op: unknown): op is ComparisonOperator; -export declare function isArithmeticOperator(op: unknown): op is ArithmeticOperator; -export declare function isJSONOperator(op: unknown): op is JSONOperator; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/operator-node.js b/node_modules/kysely/dist/cjs/operation-node/operator-node.js deleted file mode 100644 index a9773ac..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/operator-node.js +++ /dev/null @@ -1,107 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OperatorNode = exports.OPERATORS = exports.UNARY_OPERATORS = exports.UNARY_FILTER_OPERATORS = exports.BINARY_OPERATORS = exports.JSON_OPERATORS = exports.ARITHMETIC_OPERATORS = exports.COMPARISON_OPERATORS = void 0; -exports.isOperator = isOperator; -exports.isBinaryOperator = isBinaryOperator; -exports.isComparisonOperator = isComparisonOperator; -exports.isArithmeticOperator = isArithmeticOperator; -exports.isJSONOperator = isJSONOperator; -const object_utils_js_1 = require("../util/object-utils.js"); -exports.COMPARISON_OPERATORS = [ - '=', - '==', - '!=', - '<>', - '>', - '>=', - '<', - '<=', - 'in', - 'not in', - 'is', - 'is not', - 'like', - 'not like', - 'match', - 'ilike', - 'not ilike', - '@>', - '<@', - '^@', - '&&', - '?', - '?&', - '?|', - '!<', - '!>', - '<=>', - '!~', - '~', - '~*', - '!~*', - '@@', - '@@@', - '!!', - '<->', - 'regexp', - 'is distinct from', - 'is not distinct from', -]; -exports.ARITHMETIC_OPERATORS = [ - '+', - '-', - '*', - '/', - '%', - '^', - '&', - '|', - '#', - '<<', - '>>', -]; -exports.JSON_OPERATORS = ['->', '->>']; -exports.BINARY_OPERATORS = [ - ...exports.COMPARISON_OPERATORS, - ...exports.ARITHMETIC_OPERATORS, - '&&', - '||', -]; -exports.UNARY_FILTER_OPERATORS = ['exists', 'not exists']; -exports.UNARY_OPERATORS = ['not', '-', ...exports.UNARY_FILTER_OPERATORS]; -exports.OPERATORS = [ - ...exports.BINARY_OPERATORS, - ...exports.JSON_OPERATORS, - ...exports.UNARY_OPERATORS, - 'between', - 'between symmetric', -]; -/** - * @internal - */ -exports.OperatorNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'OperatorNode'; - }, - create(operator) { - return (0, object_utils_js_1.freeze)({ - kind: 'OperatorNode', - operator, - }); - }, -}); -function isOperator(op) { - return (0, object_utils_js_1.isString)(op) && exports.OPERATORS.includes(op); -} -function isBinaryOperator(op) { - return (0, object_utils_js_1.isString)(op) && exports.BINARY_OPERATORS.includes(op); -} -function isComparisonOperator(op) { - return (0, object_utils_js_1.isString)(op) && exports.COMPARISON_OPERATORS.includes(op); -} -function isArithmeticOperator(op) { - return (0, object_utils_js_1.isString)(op) && exports.ARITHMETIC_OPERATORS.includes(op); -} -function isJSONOperator(op) { - return (0, object_utils_js_1.isString)(op) && exports.JSON_OPERATORS.includes(op); -} diff --git a/node_modules/kysely/dist/cjs/operation-node/or-action-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/or-action-node.d.ts deleted file mode 100644 index b42f15c..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/or-action-node.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface OrActionNode extends OperationNode { - readonly kind: 'OrActionNode'; - readonly action: string; -} -type OrActionNodeFactory = Readonly<{ - is(node: OperationNode): node is OrActionNode; - create(action: string): Readonly; -}>; -/** - * @internal - */ -export declare const OrActionNode: OrActionNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/or-action-node.js b/node_modules/kysely/dist/cjs/operation-node/or-action-node.js deleted file mode 100644 index 193f897..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/or-action-node.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OrActionNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.OrActionNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'OrActionNode'; - }, - create(action) { - return (0, object_utils_js_1.freeze)({ - kind: 'OrActionNode', - action, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/or-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/or-node.d.ts deleted file mode 100644 index e5476b1..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/or-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface OrNode extends OperationNode { - readonly kind: 'OrNode'; - readonly left: OperationNode; - readonly right: OperationNode; -} -type OrNodeFactory = Readonly<{ - is(node: OperationNode): node is OrNode; - create(left: OperationNode, right: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const OrNode: OrNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/or-node.js b/node_modules/kysely/dist/cjs/operation-node/or-node.js deleted file mode 100644 index 4f56b52..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/or-node.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OrNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.OrNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'OrNode'; - }, - create(left, right) { - return (0, object_utils_js_1.freeze)({ - kind: 'OrNode', - left, - right, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/order-by-item-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/order-by-item-node.d.ts deleted file mode 100644 index 4c5814b..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/order-by-item-node.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { CollateNode } from './collate-node.js'; -import type { OperationNode } from './operation-node.js'; -export type OrderByItemNodeProps = Omit; -export interface OrderByItemNode extends OperationNode { - readonly kind: 'OrderByItemNode'; - readonly orderBy: OperationNode; - readonly direction?: OperationNode; - readonly nulls?: 'first' | 'last'; - readonly collation?: CollateNode; -} -type OrderByItemNodeFactory = Readonly<{ - is(node: OperationNode): node is OrderByItemNode; - create(orderBy: OperationNode, direction?: OperationNode): Readonly; - cloneWith(node: OrderByItemNode, props: OrderByItemNodeProps): Readonly; -}>; -/** - * @internal - */ -export declare const OrderByItemNode: OrderByItemNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/order-by-item-node.js b/node_modules/kysely/dist/cjs/operation-node/order-by-item-node.js deleted file mode 100644 index a5ac9cf..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/order-by-item-node.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OrderByItemNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.OrderByItemNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'OrderByItemNode'; - }, - create(orderBy, direction) { - return (0, object_utils_js_1.freeze)({ - kind: 'OrderByItemNode', - orderBy, - direction, - }); - }, - cloneWith(node, props) { - return (0, object_utils_js_1.freeze)({ - ...node, - ...props, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/order-by-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/order-by-node.d.ts deleted file mode 100644 index 0768ecd..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/order-by-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { OrderByItemNode } from './order-by-item-node.js'; -export interface OrderByNode extends OperationNode { - readonly kind: 'OrderByNode'; - readonly items: ReadonlyArray; -} -type OrderByNodeFactory = Readonly<{ - is(node: OperationNode): node is OrderByNode; - create(items: ReadonlyArray): Readonly; - cloneWithItems(orderBy: OrderByNode, items: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const OrderByNode: OrderByNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/order-by-node.js b/node_modules/kysely/dist/cjs/operation-node/order-by-node.js deleted file mode 100644 index e3e9498..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/order-by-node.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OrderByNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.OrderByNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'OrderByNode'; - }, - create(items) { - return (0, object_utils_js_1.freeze)({ - kind: 'OrderByNode', - items: (0, object_utils_js_1.freeze)([...items]), - }); - }, - cloneWithItems(orderBy, items) { - return (0, object_utils_js_1.freeze)({ - ...orderBy, - items: (0, object_utils_js_1.freeze)([...orderBy.items, ...items]), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/output-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/output-node.d.ts deleted file mode 100644 index 4a2c2ef..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/output-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface OutputNode extends OperationNode { - readonly kind: 'OutputNode'; - readonly selections: ReadonlyArray; -} -type OutputNodeFactory = Readonly<{ - is(node: OperationNode): node is OutputNode; - create(selections: ReadonlyArray): Readonly; - cloneWithSelections(output: OutputNode, selections: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const OutputNode: OutputNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/output-node.js b/node_modules/kysely/dist/cjs/operation-node/output-node.js deleted file mode 100644 index 97b3186..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/output-node.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OutputNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.OutputNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'OutputNode'; - }, - create(selections) { - return (0, object_utils_js_1.freeze)({ - kind: 'OutputNode', - selections: (0, object_utils_js_1.freeze)(selections), - }); - }, - cloneWithSelections(output, selections) { - return (0, object_utils_js_1.freeze)({ - ...output, - selections: output.selections - ? (0, object_utils_js_1.freeze)([...output.selections, ...selections]) - : (0, object_utils_js_1.freeze)(selections), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/over-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/over-node.d.ts deleted file mode 100644 index 9650354..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/over-node.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { OrderByItemNode } from './order-by-item-node.js'; -import { OrderByNode } from './order-by-node.js'; -import type { PartitionByItemNode } from './partition-by-item-node.js'; -import { PartitionByNode } from './partition-by-node.js'; -export interface OverNode extends OperationNode { - readonly kind: 'OverNode'; - readonly orderBy?: OrderByNode; - readonly partitionBy?: PartitionByNode; -} -type OverNodeFactory = Readonly<{ - is(node: OperationNode): node is OverNode; - create(): Readonly; - cloneWithOrderByItems(overNode: OverNode, items: ReadonlyArray): Readonly; - cloneWithPartitionByItems(overNode: OverNode, items: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const OverNode: OverNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/over-node.js b/node_modules/kysely/dist/cjs/operation-node/over-node.js deleted file mode 100644 index 281e322..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/over-node.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OverNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const order_by_node_js_1 = require("./order-by-node.js"); -const partition_by_node_js_1 = require("./partition-by-node.js"); -/** - * @internal - */ -exports.OverNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'OverNode'; - }, - create() { - return (0, object_utils_js_1.freeze)({ - kind: 'OverNode', - }); - }, - cloneWithOrderByItems(overNode, items) { - return (0, object_utils_js_1.freeze)({ - ...overNode, - orderBy: overNode.orderBy - ? order_by_node_js_1.OrderByNode.cloneWithItems(overNode.orderBy, items) - : order_by_node_js_1.OrderByNode.create(items), - }); - }, - cloneWithPartitionByItems(overNode, items) { - return (0, object_utils_js_1.freeze)({ - ...overNode, - partitionBy: overNode.partitionBy - ? partition_by_node_js_1.PartitionByNode.cloneWithItems(overNode.partitionBy, items) - : partition_by_node_js_1.PartitionByNode.create(items), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/parens-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/parens-node.d.ts deleted file mode 100644 index a1c975d..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/parens-node.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface ParensNode extends OperationNode { - readonly kind: 'ParensNode'; - readonly node: OperationNode; -} -type ParensNodeFactory = Readonly<{ - is(node: OperationNode): node is ParensNode; - create(node: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const ParensNode: ParensNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/parens-node.js b/node_modules/kysely/dist/cjs/operation-node/parens-node.js deleted file mode 100644 index 3aeee06..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/parens-node.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ParensNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.ParensNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'ParensNode'; - }, - create(node) { - return (0, object_utils_js_1.freeze)({ - kind: 'ParensNode', - node, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/partition-by-item-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/partition-by-item-node.d.ts deleted file mode 100644 index 4f21b3b..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/partition-by-item-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { SimpleReferenceExpressionNode } from './simple-reference-expression-node.js'; -export interface PartitionByItemNode extends OperationNode { - readonly kind: 'PartitionByItemNode'; - readonly partitionBy: SimpleReferenceExpressionNode; -} -type PartitionByItemNodeFactory = Readonly<{ - is(node: OperationNode): node is PartitionByItemNode; - create(partitionBy: SimpleReferenceExpressionNode): Readonly; -}>; -/** - * @internal - */ -export declare const PartitionByItemNode: PartitionByItemNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/partition-by-item-node.js b/node_modules/kysely/dist/cjs/operation-node/partition-by-item-node.js deleted file mode 100644 index 1c3799e..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/partition-by-item-node.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PartitionByItemNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.PartitionByItemNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'PartitionByItemNode'; - }, - create(partitionBy) { - return (0, object_utils_js_1.freeze)({ - kind: 'PartitionByItemNode', - partitionBy, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/partition-by-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/partition-by-node.d.ts deleted file mode 100644 index bd939dc..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/partition-by-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { PartitionByItemNode } from './partition-by-item-node.js'; -import type { OperationNode } from './operation-node.js'; -export interface PartitionByNode extends OperationNode { - readonly kind: 'PartitionByNode'; - readonly items: ReadonlyArray; -} -type PartitionByNodeFactory = Readonly<{ - is(node: OperationNode): node is PartitionByNode; - create(items: ReadonlyArray): Readonly; - cloneWithItems(partitionBy: PartitionByNode, items: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const PartitionByNode: PartitionByNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/partition-by-node.js b/node_modules/kysely/dist/cjs/operation-node/partition-by-node.js deleted file mode 100644 index d7c1725..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/partition-by-node.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PartitionByNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.PartitionByNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'PartitionByNode'; - }, - create(items) { - return (0, object_utils_js_1.freeze)({ - kind: 'PartitionByNode', - items: (0, object_utils_js_1.freeze)(items), - }); - }, - cloneWithItems(partitionBy, items) { - return (0, object_utils_js_1.freeze)({ - ...partitionBy, - items: (0, object_utils_js_1.freeze)([...partitionBy.items, ...items]), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/primary-key-constraint-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/primary-key-constraint-node.d.ts deleted file mode 100644 index 242fa40..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/primary-key-constraint-node.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { ColumnNode } from './column-node.js'; -import { IdentifierNode } from './identifier-node.js'; -import type { OperationNode } from './operation-node.js'; -export interface PrimaryKeyConstraintNode extends OperationNode { - readonly kind: 'PrimaryKeyConstraintNode'; - readonly columns: ReadonlyArray; - readonly name?: IdentifierNode; - readonly deferrable?: boolean; - readonly initiallyDeferred?: boolean; -} -export type PrimaryKeyConstraintNodeProps = Omit, 'kind'>; -type PrimaryKeyConstraintNodeFactory = Readonly<{ - is(node: OperationNode): node is PrimaryKeyConstraintNode; - create(columns: string[], constraintName?: string): Readonly; - cloneWith(node: PrimaryKeyConstraintNode, props: PrimaryKeyConstraintNodeProps): Readonly; -}>; -/** - * @internal - */ -export declare const PrimaryKeyConstraintNode: PrimaryKeyConstraintNodeFactory; -/** - * Backwards compatibility for a typo in the codebase. - * - * @deprecated Use {@link PrimaryKeyConstraintNode} instead. - */ -export declare const PrimaryConstraintNode: Readonly<{ - is(node: OperationNode): node is PrimaryKeyConstraintNode; - create(columns: string[], constraintName?: string): Readonly; - cloneWith(node: PrimaryKeyConstraintNode, props: PrimaryKeyConstraintNodeProps): Readonly; -}>; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/primary-key-constraint-node.js b/node_modules/kysely/dist/cjs/operation-node/primary-key-constraint-node.js deleted file mode 100644 index 907c542..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/primary-key-constraint-node.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PrimaryConstraintNode = exports.PrimaryKeyConstraintNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const column_node_js_1 = require("./column-node.js"); -const identifier_node_js_1 = require("./identifier-node.js"); -/** - * @internal - */ -exports.PrimaryKeyConstraintNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'PrimaryKeyConstraintNode'; - }, - create(columns, constraintName) { - return (0, object_utils_js_1.freeze)({ - kind: 'PrimaryKeyConstraintNode', - columns: (0, object_utils_js_1.freeze)(columns.map(column_node_js_1.ColumnNode.create)), - name: constraintName - ? identifier_node_js_1.IdentifierNode.create(constraintName) - : undefined, - }); - }, - cloneWith(node, props) { - return (0, object_utils_js_1.freeze)({ ...node, ...props }); - }, -}); -/** - * Backwards compatibility for a typo in the codebase. - * - * @deprecated Use {@link PrimaryKeyConstraintNode} instead. - */ -exports.PrimaryConstraintNode = exports.PrimaryKeyConstraintNode; diff --git a/node_modules/kysely/dist/cjs/operation-node/primitive-value-list-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/primitive-value-list-node.d.ts deleted file mode 100644 index 61dce91..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/primitive-value-list-node.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -/** - * This node is basically just a performance optimization over the normal ValueListNode. - * The queries often contain large arrays of primitive values (for example in a `where in` list) - * and we don't want to create a ValueNode for each item in those lists. - */ -export interface PrimitiveValueListNode extends OperationNode { - readonly kind: 'PrimitiveValueListNode'; - readonly values: ReadonlyArray; -} -type PrimitiveValueListNodeFactory = Readonly<{ - is(node: OperationNode): node is PrimitiveValueListNode; - create(values: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const PrimitiveValueListNode: PrimitiveValueListNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/primitive-value-list-node.js b/node_modules/kysely/dist/cjs/operation-node/primitive-value-list-node.js deleted file mode 100644 index 419adf0..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/primitive-value-list-node.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PrimitiveValueListNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.PrimitiveValueListNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'PrimitiveValueListNode'; - }, - create(values) { - return (0, object_utils_js_1.freeze)({ - kind: 'PrimitiveValueListNode', - values: (0, object_utils_js_1.freeze)([...values]), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/query-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/query-node.d.ts deleted file mode 100644 index 61c46f9..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/query-node.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { InsertQueryNode } from './insert-query-node.js'; -import { SelectQueryNode } from './select-query-node.js'; -import { UpdateQueryNode } from './update-query-node.js'; -import { DeleteQueryNode } from './delete-query-node.js'; -import { WhereNode } from './where-node.js'; -import type { JoinNode } from './join-node.js'; -import type { SelectionNode } from './selection-node.js'; -import { ReturningNode } from './returning-node.js'; -import type { OperationNode } from './operation-node.js'; -import { ExplainNode } from './explain-node.js'; -import type { ExplainFormat } from '../util/explainable.js'; -import type { Expression } from '../expression/expression.js'; -import { MergeQueryNode } from './merge-query-node.js'; -import type { TopNode } from './top-node.js'; -import { OutputNode } from './output-node.js'; -import { OrderByNode } from './order-by-node.js'; -import type { OrderByItemNode } from './order-by-item-node.js'; -export type QueryNode = SelectQueryNode | InsertQueryNode | UpdateQueryNode | DeleteQueryNode | MergeQueryNode; -type HasJoins = { - joins?: ReadonlyArray; -}; -type HasWhere = { - where?: WhereNode; -}; -type HasReturning = { - returning?: ReturningNode; -}; -type HasExplain = { - explain?: ExplainNode; -}; -type HasTop = { - top?: TopNode; -}; -type HasOutput = { - output?: OutputNode; -}; -type HasEndModifiers = { - endModifiers?: ReadonlyArray; -}; -type HasOrderBy = { - orderBy?: OrderByNode; -}; -type QueryNodeFactory = Readonly<{ - is(node: OperationNode): node is QueryNode; - cloneWithEndModifier(node: T, modifier: OperationNode): Readonly; - cloneWithWhere(node: T, operation: OperationNode): Readonly; - cloneWithJoin(node: T, join: JoinNode): Readonly; - cloneWithReturning(node: T, selections: ReadonlyArray): Readonly; - cloneWithoutReturning(node: T): Readonly; - cloneWithoutWhere(node: T): Readonly; - cloneWithExplain(node: T, format: ExplainFormat | undefined, options: Expression | undefined): Readonly; - cloneWithTop(node: T, top: TopNode): Readonly; - cloneWithOutput(node: T, selections: ReadonlyArray): Readonly; - cloneWithOrderByItems(node: T, items: ReadonlyArray): Readonly; - cloneWithoutOrderBy(node: T): Readonly; -}>; -/** - * @internal - */ -export declare const QueryNode: QueryNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/query-node.js b/node_modules/kysely/dist/cjs/operation-node/query-node.js deleted file mode 100644 index 268bf12..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/query-node.js +++ /dev/null @@ -1,102 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.QueryNode = void 0; -const insert_query_node_js_1 = require("./insert-query-node.js"); -const select_query_node_js_1 = require("./select-query-node.js"); -const update_query_node_js_1 = require("./update-query-node.js"); -const delete_query_node_js_1 = require("./delete-query-node.js"); -const where_node_js_1 = require("./where-node.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -const returning_node_js_1 = require("./returning-node.js"); -const explain_node_js_1 = require("./explain-node.js"); -const merge_query_node_js_1 = require("./merge-query-node.js"); -const output_node_js_1 = require("./output-node.js"); -const order_by_node_js_1 = require("./order-by-node.js"); -/** - * @internal - */ -exports.QueryNode = (0, object_utils_js_1.freeze)({ - is(node) { - return (select_query_node_js_1.SelectQueryNode.is(node) || - insert_query_node_js_1.InsertQueryNode.is(node) || - update_query_node_js_1.UpdateQueryNode.is(node) || - delete_query_node_js_1.DeleteQueryNode.is(node) || - merge_query_node_js_1.MergeQueryNode.is(node)); - }, - cloneWithEndModifier(node, modifier) { - return (0, object_utils_js_1.freeze)({ - ...node, - endModifiers: node.endModifiers - ? (0, object_utils_js_1.freeze)([...node.endModifiers, modifier]) - : (0, object_utils_js_1.freeze)([modifier]), - }); - }, - cloneWithWhere(node, operation) { - return (0, object_utils_js_1.freeze)({ - ...node, - where: node.where - ? where_node_js_1.WhereNode.cloneWithOperation(node.where, 'And', operation) - : where_node_js_1.WhereNode.create(operation), - }); - }, - cloneWithJoin(node, join) { - return (0, object_utils_js_1.freeze)({ - ...node, - joins: node.joins ? (0, object_utils_js_1.freeze)([...node.joins, join]) : (0, object_utils_js_1.freeze)([join]), - }); - }, - cloneWithReturning(node, selections) { - return (0, object_utils_js_1.freeze)({ - ...node, - returning: node.returning - ? returning_node_js_1.ReturningNode.cloneWithSelections(node.returning, selections) - : returning_node_js_1.ReturningNode.create(selections), - }); - }, - cloneWithoutReturning(node) { - return (0, object_utils_js_1.freeze)({ - ...node, - returning: undefined, - }); - }, - cloneWithoutWhere(node) { - return (0, object_utils_js_1.freeze)({ - ...node, - where: undefined, - }); - }, - cloneWithExplain(node, format, options) { - return (0, object_utils_js_1.freeze)({ - ...node, - explain: explain_node_js_1.ExplainNode.create(format, options?.toOperationNode()), - }); - }, - cloneWithTop(node, top) { - return (0, object_utils_js_1.freeze)({ - ...node, - top, - }); - }, - cloneWithOutput(node, selections) { - return (0, object_utils_js_1.freeze)({ - ...node, - output: node.output - ? output_node_js_1.OutputNode.cloneWithSelections(node.output, selections) - : output_node_js_1.OutputNode.create(selections), - }); - }, - cloneWithOrderByItems(node, items) { - return (0, object_utils_js_1.freeze)({ - ...node, - orderBy: node.orderBy - ? order_by_node_js_1.OrderByNode.cloneWithItems(node.orderBy, items) - : order_by_node_js_1.OrderByNode.create(items), - }); - }, - cloneWithoutOrderBy(node) { - return (0, object_utils_js_1.freeze)({ - ...node, - orderBy: undefined, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/raw-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/raw-node.d.ts deleted file mode 100644 index 33ba295..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/raw-node.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface RawNode extends OperationNode { - readonly kind: 'RawNode'; - readonly sqlFragments: ReadonlyArray; - readonly parameters: ReadonlyArray; -} -type RawNodeFactory = Readonly<{ - is(node: OperationNode): node is RawNode; - create(sqlFragments: ReadonlyArray, parameters: ReadonlyArray): Readonly; - createWithSql(sql: string): Readonly; - createWithChild(child: OperationNode): Readonly; - createWithChildren(children: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const RawNode: RawNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/raw-node.js b/node_modules/kysely/dist/cjs/operation-node/raw-node.js deleted file mode 100644 index 7c0503a..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/raw-node.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RawNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.RawNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'RawNode'; - }, - create(sqlFragments, parameters) { - return (0, object_utils_js_1.freeze)({ - kind: 'RawNode', - sqlFragments: (0, object_utils_js_1.freeze)(sqlFragments), - parameters: (0, object_utils_js_1.freeze)(parameters), - }); - }, - createWithSql(sql) { - return exports.RawNode.create([sql], []); - }, - createWithChild(child) { - return exports.RawNode.create(['', ''], [child]); - }, - createWithChildren(children) { - return exports.RawNode.create(new Array(children.length + 1).fill(''), children); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/reference-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/reference-node.d.ts deleted file mode 100644 index f81b1fa..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/reference-node.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { ColumnNode } from './column-node.js'; -import type { TableNode } from './table-node.js'; -import { SelectAllNode } from './select-all-node.js'; -export interface ReferenceNode extends OperationNode { - readonly kind: 'ReferenceNode'; - readonly column: ColumnNode | SelectAllNode; - readonly table?: TableNode; -} -type ReferenceNodeFactory = Readonly<{ - is(node: OperationNode): node is ReferenceNode; - create(column: ColumnNode, table?: TableNode): Readonly; - createSelectAll(table: TableNode): Readonly; -}>; -/** - * @internal - */ -export declare const ReferenceNode: ReferenceNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/reference-node.js b/node_modules/kysely/dist/cjs/operation-node/reference-node.js deleted file mode 100644 index 6311eea..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/reference-node.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ReferenceNode = void 0; -const select_all_node_js_1 = require("./select-all-node.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.ReferenceNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'ReferenceNode'; - }, - create(column, table) { - return (0, object_utils_js_1.freeze)({ - kind: 'ReferenceNode', - table, - column, - }); - }, - createSelectAll(table) { - return (0, object_utils_js_1.freeze)({ - kind: 'ReferenceNode', - table, - column: select_all_node_js_1.SelectAllNode.create(), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/references-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/references-node.d.ts deleted file mode 100644 index a7d5c1f..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/references-node.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { ColumnNode } from './column-node.js'; -import type { TableNode } from './table-node.js'; -import type { ArrayItemType } from '../util/type-utils.js'; -export declare const ON_MODIFY_FOREIGN_ACTIONS: readonly ["no action", "restrict", "cascade", "set null", "set default"]; -export type OnModifyForeignAction = ArrayItemType; -export interface ReferencesNode extends OperationNode { - readonly kind: 'ReferencesNode'; - readonly table: TableNode; - readonly columns: ReadonlyArray; - readonly onDelete?: OnModifyForeignAction; - readonly onUpdate?: OnModifyForeignAction; -} -type ReferencesNodeFactory = Readonly<{ - is(node: OperationNode): node is ReferencesNode; - create(table: TableNode, columns: ReadonlyArray): Readonly; - cloneWithOnDelete(references: ReferencesNode, onDelete: OnModifyForeignAction): Readonly; - cloneWithOnUpdate(references: ReferencesNode, onUpdate: OnModifyForeignAction): Readonly; -}>; -/** - * @internal - */ -export declare const ReferencesNode: ReferencesNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/references-node.js b/node_modules/kysely/dist/cjs/operation-node/references-node.js deleted file mode 100644 index 0c23083..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/references-node.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ReferencesNode = exports.ON_MODIFY_FOREIGN_ACTIONS = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -exports.ON_MODIFY_FOREIGN_ACTIONS = [ - 'no action', - 'restrict', - 'cascade', - 'set null', - 'set default', -]; -/** - * @internal - */ -exports.ReferencesNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'ReferencesNode'; - }, - create(table, columns) { - return (0, object_utils_js_1.freeze)({ - kind: 'ReferencesNode', - table, - columns: (0, object_utils_js_1.freeze)([...columns]), - }); - }, - cloneWithOnDelete(references, onDelete) { - return (0, object_utils_js_1.freeze)({ - ...references, - onDelete, - }); - }, - cloneWithOnUpdate(references, onUpdate) { - return (0, object_utils_js_1.freeze)({ - ...references, - onUpdate, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/refresh-materialized-view-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/refresh-materialized-view-node.d.ts deleted file mode 100644 index 9f71b5a..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/refresh-materialized-view-node.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import { SchemableIdentifierNode } from './schemable-identifier-node.js'; -export type RefreshMaterializedViewNodeParams = Omit, 'kind' | 'name'>; -export interface RefreshMaterializedViewNode extends OperationNode { - readonly kind: 'RefreshMaterializedViewNode'; - readonly name: SchemableIdentifierNode; - readonly concurrently?: boolean; - readonly withNoData?: boolean; -} -type RefreshMaterializedViewNodeFactory = Readonly<{ - is(node: OperationNode): node is RefreshMaterializedViewNode; - create(name: string): Readonly; - cloneWith(createView: RefreshMaterializedViewNode, params: RefreshMaterializedViewNodeParams): Readonly; -}>; -/** - * @internal - */ -export declare const RefreshMaterializedViewNode: RefreshMaterializedViewNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/refresh-materialized-view-node.js b/node_modules/kysely/dist/cjs/operation-node/refresh-materialized-view-node.js deleted file mode 100644 index 2a0315e..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/refresh-materialized-view-node.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RefreshMaterializedViewNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const schemable_identifier_node_js_1 = require("./schemable-identifier-node.js"); -/** - * @internal - */ -exports.RefreshMaterializedViewNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'RefreshMaterializedViewNode'; - }, - create(name) { - return (0, object_utils_js_1.freeze)({ - kind: 'RefreshMaterializedViewNode', - name: schemable_identifier_node_js_1.SchemableIdentifierNode.create(name), - }); - }, - cloneWith(createView, params) { - return (0, object_utils_js_1.freeze)({ - ...createView, - ...params, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/rename-column-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/rename-column-node.d.ts deleted file mode 100644 index 93541cd..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/rename-column-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import { ColumnNode } from './column-node.js'; -export interface RenameColumnNode extends OperationNode { - readonly kind: 'RenameColumnNode'; - readonly column: ColumnNode; - readonly renameTo: ColumnNode; -} -type RenameColumnNodeFactory = Readonly<{ - is(node: OperationNode): node is RenameColumnNode; - create(column: string, newColumn: string): Readonly; -}>; -/** - * @internal - */ -export declare const RenameColumnNode: RenameColumnNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/rename-column-node.js b/node_modules/kysely/dist/cjs/operation-node/rename-column-node.js deleted file mode 100644 index 36d7cd0..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/rename-column-node.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RenameColumnNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const column_node_js_1 = require("./column-node.js"); -/** - * @internal - */ -exports.RenameColumnNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'RenameColumnNode'; - }, - create(column, newColumn) { - return (0, object_utils_js_1.freeze)({ - kind: 'RenameColumnNode', - column: column_node_js_1.ColumnNode.create(column), - renameTo: column_node_js_1.ColumnNode.create(newColumn), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/rename-constraint-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/rename-constraint-node.d.ts deleted file mode 100644 index 1848256..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/rename-constraint-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import { IdentifierNode } from './identifier-node.js'; -export interface RenameConstraintNode extends OperationNode { - readonly kind: 'RenameConstraintNode'; - readonly oldName: IdentifierNode; - readonly newName: IdentifierNode; -} -type RenameConstraintNodeFactory = Readonly<{ - is(node: OperationNode): node is RenameConstraintNode; - create(oldName: string, newName: string): Readonly; -}>; -/** - * @internal - */ -export declare const RenameConstraintNode: RenameConstraintNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/rename-constraint-node.js b/node_modules/kysely/dist/cjs/operation-node/rename-constraint-node.js deleted file mode 100644 index cf22567..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/rename-constraint-node.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RenameConstraintNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const identifier_node_js_1 = require("./identifier-node.js"); -/** - * @internal - */ -exports.RenameConstraintNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'RenameConstraintNode'; - }, - create(oldName, newName) { - return (0, object_utils_js_1.freeze)({ - kind: 'RenameConstraintNode', - oldName: identifier_node_js_1.IdentifierNode.create(oldName), - newName: identifier_node_js_1.IdentifierNode.create(newName), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/returning-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/returning-node.d.ts deleted file mode 100644 index 3d6e38f..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/returning-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { SelectionNode } from './selection-node.js'; -export interface ReturningNode extends OperationNode { - readonly kind: 'ReturningNode'; - readonly selections: ReadonlyArray; -} -type ReturningNodeFactory = Readonly<{ - is(node: OperationNode): node is ReturningNode; - create(selections: ReadonlyArray): Readonly; - cloneWithSelections(returning: ReturningNode, selections: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const ReturningNode: ReturningNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/returning-node.js b/node_modules/kysely/dist/cjs/operation-node/returning-node.js deleted file mode 100644 index 3bd6502..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/returning-node.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ReturningNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.ReturningNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'ReturningNode'; - }, - create(selections) { - return (0, object_utils_js_1.freeze)({ - kind: 'ReturningNode', - selections: (0, object_utils_js_1.freeze)(selections), - }); - }, - cloneWithSelections(returning, selections) { - return (0, object_utils_js_1.freeze)({ - ...returning, - selections: returning.selections - ? (0, object_utils_js_1.freeze)([...returning.selections, ...selections]) - : (0, object_utils_js_1.freeze)(selections), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/schemable-identifier-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/schemable-identifier-node.d.ts deleted file mode 100644 index e3f9428..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/schemable-identifier-node.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { IdentifierNode } from './identifier-node.js'; -import type { OperationNode } from './operation-node.js'; -export interface SchemableIdentifierNode extends OperationNode { - readonly kind: 'SchemableIdentifierNode'; - readonly schema?: IdentifierNode; - readonly identifier: IdentifierNode; -} -type SchemableIdentifierNodeFactory = Readonly<{ - is(node: OperationNode): node is SchemableIdentifierNode; - create(identifier: string): Readonly; - createWithSchema(schema: string, identifier: string): Readonly; -}>; -/** - * @internal - */ -export declare const SchemableIdentifierNode: SchemableIdentifierNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/schemable-identifier-node.js b/node_modules/kysely/dist/cjs/operation-node/schemable-identifier-node.js deleted file mode 100644 index 6ff22f5..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/schemable-identifier-node.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SchemableIdentifierNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const identifier_node_js_1 = require("./identifier-node.js"); -/** - * @internal - */ -exports.SchemableIdentifierNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'SchemableIdentifierNode'; - }, - create(identifier) { - return (0, object_utils_js_1.freeze)({ - kind: 'SchemableIdentifierNode', - identifier: identifier_node_js_1.IdentifierNode.create(identifier), - }); - }, - createWithSchema(schema, identifier) { - return (0, object_utils_js_1.freeze)({ - kind: 'SchemableIdentifierNode', - schema: identifier_node_js_1.IdentifierNode.create(schema), - identifier: identifier_node_js_1.IdentifierNode.create(identifier), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/select-all-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/select-all-node.d.ts deleted file mode 100644 index a5e1628..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/select-all-node.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface SelectAllNode extends OperationNode { - readonly kind: 'SelectAllNode'; -} -type SelectAllNodeFactory = Readonly<{ - is(node: OperationNode): node is SelectAllNode; - create(): Readonly; -}>; -/** - * @internal - */ -export declare const SelectAllNode: SelectAllNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/select-all-node.js b/node_modules/kysely/dist/cjs/operation-node/select-all-node.js deleted file mode 100644 index 936a700..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/select-all-node.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SelectAllNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.SelectAllNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'SelectAllNode'; - }, - create() { - return (0, object_utils_js_1.freeze)({ - kind: 'SelectAllNode', - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/select-modifier-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/select-modifier-node.d.ts deleted file mode 100644 index ba96198..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/select-modifier-node.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export type SelectModifier = 'ForUpdate' | 'ForNoKeyUpdate' | 'ForShare' | 'ForKeyShare' | 'NoWait' | 'SkipLocked' | 'Distinct'; -export interface SelectModifierNode extends OperationNode { - readonly kind: 'SelectModifierNode'; - readonly modifier?: SelectModifier; - readonly rawModifier?: OperationNode; - readonly of?: ReadonlyArray; -} -type SelectModifierNodeFactory = Readonly<{ - is(node: OperationNode): node is SelectModifierNode; - create(modifier: SelectModifier, of?: ReadonlyArray): Readonly; - createWithExpression(modifier: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const SelectModifierNode: SelectModifierNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/select-modifier-node.js b/node_modules/kysely/dist/cjs/operation-node/select-modifier-node.js deleted file mode 100644 index 77f7173..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/select-modifier-node.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SelectModifierNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.SelectModifierNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'SelectModifierNode'; - }, - create(modifier, of) { - return (0, object_utils_js_1.freeze)({ - kind: 'SelectModifierNode', - modifier, - of, - }); - }, - createWithExpression(modifier) { - return (0, object_utils_js_1.freeze)({ - kind: 'SelectModifierNode', - rawModifier: modifier, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/select-query-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/select-query-node.d.ts deleted file mode 100644 index 8b9ec4b..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/select-query-node.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { FromNode } from './from-node.js'; -import type { GroupByItemNode } from './group-by-item-node.js'; -import { GroupByNode } from './group-by-node.js'; -import { HavingNode } from './having-node.js'; -import type { JoinNode } from './join-node.js'; -import type { LimitNode } from './limit-node.js'; -import type { OffsetNode } from './offset-node.js'; -import type { OperationNode } from './operation-node.js'; -import type { OrderByItemNode } from './order-by-item-node.js'; -import type { OrderByNode } from './order-by-node.js'; -import type { SelectionNode } from './selection-node.js'; -import type { WhereNode } from './where-node.js'; -import type { WithNode } from './with-node.js'; -import type { SelectModifierNode } from './select-modifier-node.js'; -import type { ExplainNode } from './explain-node.js'; -import type { SetOperationNode } from './set-operation-node.js'; -import type { FetchNode } from './fetch-node.js'; -import type { TopNode } from './top-node.js'; -export interface SelectQueryNode extends OperationNode { - readonly kind: 'SelectQueryNode'; - readonly from?: FromNode; - readonly selections?: ReadonlyArray; - readonly distinctOn?: ReadonlyArray; - readonly joins?: ReadonlyArray; - readonly groupBy?: GroupByNode; - readonly orderBy?: OrderByNode; - readonly where?: WhereNode; - readonly frontModifiers?: ReadonlyArray; - readonly endModifiers?: ReadonlyArray; - readonly limit?: LimitNode; - readonly offset?: OffsetNode; - readonly with?: WithNode; - readonly having?: HavingNode; - readonly explain?: ExplainNode; - readonly setOperations?: ReadonlyArray; - readonly fetch?: FetchNode; - readonly top?: TopNode; -} -type SelectQueryNodeFactory = Readonly<{ - is(node: OperationNode): node is SelectQueryNode; - create(withNode?: WithNode): Readonly; - createFrom(fromItems: ReadonlyArray, withNode?: WithNode): Readonly; - cloneWithSelections(select: SelectQueryNode, selections: ReadonlyArray): Readonly; - cloneWithDistinctOn(select: SelectQueryNode, expressions: ReadonlyArray): Readonly; - cloneWithFrontModifier(select: SelectQueryNode, modifier: SelectModifierNode): Readonly; - cloneWithOrderByItems(node: SelectQueryNode, items: ReadonlyArray): Readonly; - cloneWithGroupByItems(selectNode: SelectQueryNode, items: ReadonlyArray): Readonly; - cloneWithLimit(selectNode: SelectQueryNode, limit: LimitNode): Readonly; - cloneWithOffset(selectNode: SelectQueryNode, offset: OffsetNode): Readonly; - cloneWithFetch(selectNode: SelectQueryNode, fetch: FetchNode): Readonly; - cloneWithHaving(selectNode: SelectQueryNode, operation: OperationNode): Readonly; - cloneWithSetOperations(selectNode: SelectQueryNode, setOperations: ReadonlyArray): Readonly; - cloneWithoutSelections(select: SelectQueryNode): Readonly; - cloneWithoutLimit(select: SelectQueryNode): Readonly; - cloneWithoutOffset(select: SelectQueryNode): Readonly; - cloneWithoutOrderBy(node: SelectQueryNode): Readonly; - cloneWithoutGroupBy(select: SelectQueryNode): Readonly; -}>; -/** - * @internal - */ -export declare const SelectQueryNode: SelectQueryNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/select-query-node.js b/node_modules/kysely/dist/cjs/operation-node/select-query-node.js deleted file mode 100644 index 9cf1d49..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/select-query-node.js +++ /dev/null @@ -1,129 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SelectQueryNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const from_node_js_1 = require("./from-node.js"); -const group_by_node_js_1 = require("./group-by-node.js"); -const having_node_js_1 = require("./having-node.js"); -const query_node_js_1 = require("./query-node.js"); -/** - * @internal - */ -exports.SelectQueryNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'SelectQueryNode'; - }, - create(withNode) { - return (0, object_utils_js_1.freeze)({ - kind: 'SelectQueryNode', - ...(withNode && { with: withNode }), - }); - }, - createFrom(fromItems, withNode) { - return (0, object_utils_js_1.freeze)({ - kind: 'SelectQueryNode', - from: from_node_js_1.FromNode.create(fromItems), - ...(withNode && { with: withNode }), - }); - }, - cloneWithSelections(select, selections) { - return (0, object_utils_js_1.freeze)({ - ...select, - selections: select.selections - ? (0, object_utils_js_1.freeze)([...select.selections, ...selections]) - : (0, object_utils_js_1.freeze)(selections), - }); - }, - cloneWithDistinctOn(select, expressions) { - return (0, object_utils_js_1.freeze)({ - ...select, - distinctOn: select.distinctOn - ? (0, object_utils_js_1.freeze)([...select.distinctOn, ...expressions]) - : (0, object_utils_js_1.freeze)(expressions), - }); - }, - cloneWithFrontModifier(select, modifier) { - return (0, object_utils_js_1.freeze)({ - ...select, - frontModifiers: select.frontModifiers - ? (0, object_utils_js_1.freeze)([...select.frontModifiers, modifier]) - : (0, object_utils_js_1.freeze)([modifier]), - }); - }, - // TODO: remove in v0.29 - /** - * @deprecated Use `QueryNode.cloneWithoutOrderBy` instead. - */ - cloneWithOrderByItems: (node, items) => query_node_js_1.QueryNode.cloneWithOrderByItems(node, items), - cloneWithGroupByItems(selectNode, items) { - return (0, object_utils_js_1.freeze)({ - ...selectNode, - groupBy: selectNode.groupBy - ? group_by_node_js_1.GroupByNode.cloneWithItems(selectNode.groupBy, items) - : group_by_node_js_1.GroupByNode.create(items), - }); - }, - cloneWithLimit(selectNode, limit) { - return (0, object_utils_js_1.freeze)({ - ...selectNode, - limit, - }); - }, - cloneWithOffset(selectNode, offset) { - return (0, object_utils_js_1.freeze)({ - ...selectNode, - offset, - }); - }, - cloneWithFetch(selectNode, fetch) { - return (0, object_utils_js_1.freeze)({ - ...selectNode, - fetch, - }); - }, - cloneWithHaving(selectNode, operation) { - return (0, object_utils_js_1.freeze)({ - ...selectNode, - having: selectNode.having - ? having_node_js_1.HavingNode.cloneWithOperation(selectNode.having, 'And', operation) - : having_node_js_1.HavingNode.create(operation), - }); - }, - cloneWithSetOperations(selectNode, setOperations) { - return (0, object_utils_js_1.freeze)({ - ...selectNode, - setOperations: selectNode.setOperations - ? (0, object_utils_js_1.freeze)([...selectNode.setOperations, ...setOperations]) - : (0, object_utils_js_1.freeze)([...setOperations]), - }); - }, - cloneWithoutSelections(select) { - return (0, object_utils_js_1.freeze)({ - ...select, - selections: [], - }); - }, - cloneWithoutLimit(select) { - return (0, object_utils_js_1.freeze)({ - ...select, - limit: undefined, - }); - }, - cloneWithoutOffset(select) { - return (0, object_utils_js_1.freeze)({ - ...select, - offset: undefined, - }); - }, - // TODO: remove in v0.29 - /** - * @deprecated Use `QueryNode.cloneWithoutOrderBy` instead. - */ - cloneWithoutOrderBy: (node) => query_node_js_1.QueryNode.cloneWithoutOrderBy(node), - cloneWithoutGroupBy(select) { - return (0, object_utils_js_1.freeze)({ - ...select, - groupBy: undefined, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/selection-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/selection-node.d.ts deleted file mode 100644 index 7c588b4..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/selection-node.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { AliasNode } from './alias-node.js'; -import type { OperationNode } from './operation-node.js'; -import { SelectAllNode } from './select-all-node.js'; -import type { SimpleReferenceExpressionNode } from './simple-reference-expression-node.js'; -import type { TableNode } from './table-node.js'; -type SelectionNodeChild = SimpleReferenceExpressionNode | AliasNode | SelectAllNode; -export interface SelectionNode extends OperationNode { - readonly kind: 'SelectionNode'; - readonly selection: SelectionNodeChild; -} -type SelectionNodeFactory = Readonly<{ - is(node: OperationNode): node is SelectionNode; - create(selection: SelectionNodeChild): Readonly; - createSelectAll(): Readonly; - createSelectAllFromTable(table: TableNode): Readonly; -}>; -/** - * @internal - */ -export declare const SelectionNode: SelectionNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/selection-node.js b/node_modules/kysely/dist/cjs/operation-node/selection-node.js deleted file mode 100644 index 8a46e2c..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/selection-node.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SelectionNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const reference_node_js_1 = require("./reference-node.js"); -const select_all_node_js_1 = require("./select-all-node.js"); -/** - * @internal - */ -exports.SelectionNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'SelectionNode'; - }, - create(selection) { - return (0, object_utils_js_1.freeze)({ - kind: 'SelectionNode', - selection: selection, - }); - }, - createSelectAll() { - return (0, object_utils_js_1.freeze)({ - kind: 'SelectionNode', - selection: select_all_node_js_1.SelectAllNode.create(), - }); - }, - createSelectAllFromTable(table) { - return (0, object_utils_js_1.freeze)({ - kind: 'SelectionNode', - selection: reference_node_js_1.ReferenceNode.createSelectAll(table), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/set-operation-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/set-operation-node.d.ts deleted file mode 100644 index f6046dd..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/set-operation-node.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export type SetOperator = 'union' | 'intersect' | 'except'; -export interface SetOperationNode extends OperationNode { - kind: 'SetOperationNode'; - operator: SetOperator; - expression: OperationNode; - all: boolean; -} -type SetOperationNodeFactory = Readonly<{ - is(node: OperationNode): node is SetOperationNode; - create(operator: SetOperator, expression: OperationNode, all: boolean): Readonly; -}>; -/** - * @internal - */ -export declare const SetOperationNode: SetOperationNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/set-operation-node.js b/node_modules/kysely/dist/cjs/operation-node/set-operation-node.js deleted file mode 100644 index df618c0..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/set-operation-node.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SetOperationNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.SetOperationNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'SetOperationNode'; - }, - create(operator, expression, all) { - return (0, object_utils_js_1.freeze)({ - kind: 'SetOperationNode', - operator, - expression, - all, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/simple-reference-expression-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/simple-reference-expression-node.d.ts deleted file mode 100644 index e56ba57..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/simple-reference-expression-node.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { ColumnNode } from './column-node.js'; -import type { ReferenceNode } from './reference-node.js'; -export type SimpleReferenceExpressionNode = ColumnNode | ReferenceNode; diff --git a/node_modules/kysely/dist/cjs/operation-node/simple-reference-expression-node.js b/node_modules/kysely/dist/cjs/operation-node/simple-reference-expression-node.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/simple-reference-expression-node.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/operation-node/table-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/table-node.d.ts deleted file mode 100644 index 3cddd5b..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/table-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import { SchemableIdentifierNode } from './schemable-identifier-node.js'; -export interface TableNode extends OperationNode { - readonly kind: 'TableNode'; - readonly table: SchemableIdentifierNode; -} -type TableNodeFactory = Readonly<{ - is(node: OperationNode): node is TableNode; - create(table: string): Readonly; - createWithSchema(schema: string, table: string): Readonly; -}>; -/** - * @internal - */ -export declare const TableNode: TableNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/table-node.js b/node_modules/kysely/dist/cjs/operation-node/table-node.js deleted file mode 100644 index 9f6c380..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/table-node.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TableNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const schemable_identifier_node_js_1 = require("./schemable-identifier-node.js"); -/** - * @internal - */ -exports.TableNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'TableNode'; - }, - create(table) { - return (0, object_utils_js_1.freeze)({ - kind: 'TableNode', - table: schemable_identifier_node_js_1.SchemableIdentifierNode.create(table), - }); - }, - createWithSchema(schema, table) { - return (0, object_utils_js_1.freeze)({ - kind: 'TableNode', - table: schemable_identifier_node_js_1.SchemableIdentifierNode.createWithSchema(schema, table), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/top-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/top-node.d.ts deleted file mode 100644 index dde582e..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/top-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export type TopModifier = 'percent' | 'with ties' | 'percent with ties'; -export interface TopNode extends OperationNode { - readonly kind: 'TopNode'; - readonly expression: number | bigint; - readonly modifiers?: TopModifier; -} -type TopNodeFactory = Readonly<{ - is(node: OperationNode): node is TopNode; - create(expression: number | bigint, modifiers?: TopModifier): Readonly; -}>; -/** - * @internal - */ -export declare const TopNode: TopNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/top-node.js b/node_modules/kysely/dist/cjs/operation-node/top-node.js deleted file mode 100644 index 098d96b..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/top-node.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TopNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.TopNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'TopNode'; - }, - create(expression, modifiers) { - return (0, object_utils_js_1.freeze)({ - kind: 'TopNode', - expression, - modifiers, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/tuple-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/tuple-node.d.ts deleted file mode 100644 index 10478ac..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/tuple-node.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface TupleNode extends OperationNode { - readonly kind: 'TupleNode'; - readonly values: ReadonlyArray; -} -type TupleNodeFactory = Readonly<{ - is(node: OperationNode): node is TupleNode; - create(values: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const TupleNode: TupleNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/tuple-node.js b/node_modules/kysely/dist/cjs/operation-node/tuple-node.js deleted file mode 100644 index 98b913c..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/tuple-node.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TupleNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.TupleNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'TupleNode'; - }, - create(values) { - return (0, object_utils_js_1.freeze)({ - kind: 'TupleNode', - values: (0, object_utils_js_1.freeze)(values), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/unary-operation-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/unary-operation-node.d.ts deleted file mode 100644 index b45b4dd..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/unary-operation-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface UnaryOperationNode extends OperationNode { - readonly kind: 'UnaryOperationNode'; - readonly operator: OperationNode; - readonly operand: OperationNode; -} -type UnaryOperationNodeFactory = Readonly<{ - is(node: OperationNode): node is UnaryOperationNode; - create(operator: OperationNode, operand: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const UnaryOperationNode: UnaryOperationNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/unary-operation-node.js b/node_modules/kysely/dist/cjs/operation-node/unary-operation-node.js deleted file mode 100644 index d098be6..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/unary-operation-node.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UnaryOperationNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.UnaryOperationNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'UnaryOperationNode'; - }, - create(operator, operand) { - return (0, object_utils_js_1.freeze)({ - kind: 'UnaryOperationNode', - operator, - operand, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/unique-constraint-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/unique-constraint-node.d.ts deleted file mode 100644 index 7dcd495..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/unique-constraint-node.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ColumnNode } from './column-node.js'; -import { IdentifierNode } from './identifier-node.js'; -import type { OperationNode } from './operation-node.js'; -export interface UniqueConstraintNode extends OperationNode { - readonly kind: 'UniqueConstraintNode'; - readonly columns: ReadonlyArray; - readonly name?: IdentifierNode; - readonly nullsNotDistinct?: boolean; - readonly deferrable?: boolean; - readonly initiallyDeferred?: boolean; -} -export type UniqueConstraintNodeProps = Omit, 'kind'>; -type UniqueConstraintNodeFactory = Readonly<{ - is(node: OperationNode): node is UniqueConstraintNode; - create(columns: string[], constraintName?: string, nullsNotDistinct?: boolean): Readonly; - cloneWith(node: UniqueConstraintNode, props: UniqueConstraintNodeProps): Readonly; -}>; -/** - * @internal - */ -export declare const UniqueConstraintNode: UniqueConstraintNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/unique-constraint-node.js b/node_modules/kysely/dist/cjs/operation-node/unique-constraint-node.js deleted file mode 100644 index e49523a..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/unique-constraint-node.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UniqueConstraintNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const column_node_js_1 = require("./column-node.js"); -const identifier_node_js_1 = require("./identifier-node.js"); -/** - * @internal - */ -exports.UniqueConstraintNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'UniqueConstraintNode'; - }, - create(columns, constraintName, nullsNotDistinct) { - return (0, object_utils_js_1.freeze)({ - kind: 'UniqueConstraintNode', - columns: (0, object_utils_js_1.freeze)(columns.map(column_node_js_1.ColumnNode.create)), - name: constraintName - ? identifier_node_js_1.IdentifierNode.create(constraintName) - : undefined, - nullsNotDistinct, - }); - }, - cloneWith(node, props) { - return (0, object_utils_js_1.freeze)({ - ...node, - ...props, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/update-query-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/update-query-node.d.ts deleted file mode 100644 index 968c5ec..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/update-query-node.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import type { ColumnUpdateNode } from './column-update-node.js'; -import type { JoinNode } from './join-node.js'; -import type { OperationNode } from './operation-node.js'; -import type { ReturningNode } from './returning-node.js'; -import type { WhereNode } from './where-node.js'; -import type { WithNode } from './with-node.js'; -import { FromNode } from './from-node.js'; -import type { ExplainNode } from './explain-node.js'; -import type { LimitNode } from './limit-node.js'; -import type { TopNode } from './top-node.js'; -import type { OutputNode } from './output-node.js'; -import type { OrderByNode } from './order-by-node.js'; -export interface UpdateQueryNode extends OperationNode { - readonly kind: 'UpdateQueryNode'; - readonly table?: OperationNode; - readonly from?: FromNode; - readonly joins?: ReadonlyArray; - readonly where?: WhereNode; - readonly updates?: ReadonlyArray; - readonly returning?: ReturningNode; - readonly with?: WithNode; - readonly explain?: ExplainNode; - readonly endModifiers?: ReadonlyArray; - readonly limit?: LimitNode; - readonly top?: TopNode; - readonly output?: OutputNode; - readonly orderBy?: OrderByNode; -} -type UpdateQueryNodeFactory = Readonly<{ - is(node: OperationNode): node is UpdateQueryNode; - create(tables: ReadonlyArray, withNode?: WithNode): Readonly; - createWithoutTable(): Readonly; - cloneWithFromItems(updateQuery: UpdateQueryNode, fromItems: ReadonlyArray): Readonly; - cloneWithUpdates(updateQuery: UpdateQueryNode, updates: ReadonlyArray): Readonly; - cloneWithLimit(updateQuery: UpdateQueryNode, limit: LimitNode): Readonly; -}>; -/** - * @internal - */ -export declare const UpdateQueryNode: UpdateQueryNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/update-query-node.js b/node_modules/kysely/dist/cjs/operation-node/update-query-node.js deleted file mode 100644 index fe12c20..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/update-query-node.js +++ /dev/null @@ -1,50 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UpdateQueryNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const from_node_js_1 = require("./from-node.js"); -const list_node_js_1 = require("./list-node.js"); -/** - * @internal - */ -exports.UpdateQueryNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'UpdateQueryNode'; - }, - create(tables, withNode) { - return (0, object_utils_js_1.freeze)({ - kind: 'UpdateQueryNode', - // For backwards compatibility, use the raw table node when there's only one table - // and don't rename the property to something like `tables`. - table: tables.length === 1 ? tables[0] : list_node_js_1.ListNode.create(tables), - ...(withNode && { with: withNode }), - }); - }, - createWithoutTable() { - return (0, object_utils_js_1.freeze)({ - kind: 'UpdateQueryNode', - }); - }, - cloneWithFromItems(updateQuery, fromItems) { - return (0, object_utils_js_1.freeze)({ - ...updateQuery, - from: updateQuery.from - ? from_node_js_1.FromNode.cloneWithFroms(updateQuery.from, fromItems) - : from_node_js_1.FromNode.create(fromItems), - }); - }, - cloneWithUpdates(updateQuery, updates) { - return (0, object_utils_js_1.freeze)({ - ...updateQuery, - updates: updateQuery.updates - ? (0, object_utils_js_1.freeze)([...updateQuery.updates, ...updates]) - : updates, - }); - }, - cloneWithLimit(updateQuery, limit) { - return (0, object_utils_js_1.freeze)({ - ...updateQuery, - limit, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/using-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/using-node.d.ts deleted file mode 100644 index 40bc5aa..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/using-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface UsingNode extends OperationNode { - readonly kind: 'UsingNode'; - readonly tables: ReadonlyArray; -} -type UsingNodeFactory = Readonly<{ - is(node: OperationNode): node is UsingNode; - create(tables: ReadonlyArray): Readonly; - cloneWithTables(using: UsingNode, tables: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const UsingNode: UsingNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/using-node.js b/node_modules/kysely/dist/cjs/operation-node/using-node.js deleted file mode 100644 index f4496ac..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/using-node.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UsingNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.UsingNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'UsingNode'; - }, - create(tables) { - return (0, object_utils_js_1.freeze)({ - kind: 'UsingNode', - tables: (0, object_utils_js_1.freeze)(tables), - }); - }, - cloneWithTables(using, tables) { - return (0, object_utils_js_1.freeze)({ - ...using, - tables: (0, object_utils_js_1.freeze)([...using.tables, ...tables]), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/value-list-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/value-list-node.d.ts deleted file mode 100644 index ad30859..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/value-list-node.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface ValueListNode extends OperationNode { - readonly kind: 'ValueListNode'; - readonly values: ReadonlyArray; -} -type ValueListNodeFactory = Readonly<{ - is(node: OperationNode): node is ValueListNode; - create(values: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const ValueListNode: ValueListNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/value-list-node.js b/node_modules/kysely/dist/cjs/operation-node/value-list-node.js deleted file mode 100644 index ebe6c00..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/value-list-node.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ValueListNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.ValueListNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'ValueListNode'; - }, - create(values) { - return (0, object_utils_js_1.freeze)({ - kind: 'ValueListNode', - values: (0, object_utils_js_1.freeze)(values), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/value-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/value-node.d.ts deleted file mode 100644 index f3a4afa..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/value-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface ValueNode extends OperationNode { - readonly kind: 'ValueNode'; - readonly value: unknown; - readonly immediate?: boolean; -} -type ValueNodeFactory = Readonly<{ - is(node: OperationNode): node is ValueNode; - create(value: unknown): Readonly; - createImmediate(value: unknown): Readonly; -}>; -/** - * @internal - */ -export declare const ValueNode: ValueNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/value-node.js b/node_modules/kysely/dist/cjs/operation-node/value-node.js deleted file mode 100644 index 24a5b24..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/value-node.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ValueNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.ValueNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'ValueNode'; - }, - create(value) { - return (0, object_utils_js_1.freeze)({ - kind: 'ValueNode', - value, - }); - }, - createImmediate(value) { - return (0, object_utils_js_1.freeze)({ - kind: 'ValueNode', - value, - immediate: true, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/values-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/values-node.d.ts deleted file mode 100644 index aa4a928..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/values-node.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { PrimitiveValueListNode } from './primitive-value-list-node.js'; -import type { ValueListNode } from './value-list-node.js'; -export type ValuesItemNode = ValueListNode | PrimitiveValueListNode; -export interface ValuesNode extends OperationNode { - readonly kind: 'ValuesNode'; - readonly values: ReadonlyArray; -} -type ValuesNodeFactory = Readonly<{ - is(node: OperationNode): node is ValuesNode; - create(values: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const ValuesNode: ValuesNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/values-node.js b/node_modules/kysely/dist/cjs/operation-node/values-node.js deleted file mode 100644 index 2813644..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/values-node.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ValuesNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.ValuesNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'ValuesNode'; - }, - create(values) { - return (0, object_utils_js_1.freeze)({ - kind: 'ValuesNode', - values: (0, object_utils_js_1.freeze)(values), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/when-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/when-node.d.ts deleted file mode 100644 index c6daa4f..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/when-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface WhenNode extends OperationNode { - readonly kind: 'WhenNode'; - readonly condition: OperationNode; - readonly result?: OperationNode; -} -type WhenNodeFactory = Readonly<{ - is(node: OperationNode): node is WhenNode; - create(condition: OperationNode): Readonly; - cloneWithResult(whenNode: WhenNode, result: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const WhenNode: WhenNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/when-node.js b/node_modules/kysely/dist/cjs/operation-node/when-node.js deleted file mode 100644 index 5986061..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/when-node.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.WhenNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.WhenNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'WhenNode'; - }, - create(condition) { - return (0, object_utils_js_1.freeze)({ - kind: 'WhenNode', - condition, - }); - }, - cloneWithResult(whenNode, result) { - return (0, object_utils_js_1.freeze)({ - ...whenNode, - result, - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/where-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/where-node.d.ts deleted file mode 100644 index 15bf056..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/where-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface WhereNode extends OperationNode { - readonly kind: 'WhereNode'; - readonly where: OperationNode; -} -type WhereNodeFactory = Readonly<{ - is(node: OperationNode): node is WhereNode; - create(filter: OperationNode): Readonly; - cloneWithOperation(whereNode: WhereNode, operator: 'And' | 'Or', operation: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const WhereNode: WhereNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/where-node.js b/node_modules/kysely/dist/cjs/operation-node/where-node.js deleted file mode 100644 index 5739312..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/where-node.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.WhereNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const and_node_js_1 = require("./and-node.js"); -const or_node_js_1 = require("./or-node.js"); -/** - * @internal - */ -exports.WhereNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'WhereNode'; - }, - create(filter) { - return (0, object_utils_js_1.freeze)({ - kind: 'WhereNode', - where: filter, - }); - }, - cloneWithOperation(whereNode, operator, operation) { - return (0, object_utils_js_1.freeze)({ - ...whereNode, - where: operator === 'And' - ? and_node_js_1.AndNode.create(whereNode.where, operation) - : or_node_js_1.OrNode.create(whereNode.where, operation), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/operation-node/with-node.d.ts b/node_modules/kysely/dist/cjs/operation-node/with-node.d.ts deleted file mode 100644 index fde4405..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/with-node.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { CommonTableExpressionNode } from './common-table-expression-node.js'; -export type WithNodeParams = Omit; -export interface WithNode extends OperationNode { - readonly kind: 'WithNode'; - readonly expressions: ReadonlyArray; - readonly recursive?: boolean; -} -type WithNodeFactory = Readonly<{ - is(node: OperationNode): node is WithNode; - create(expression: CommonTableExpressionNode, params?: WithNodeParams): Readonly; - cloneWithExpression(withNode: WithNode, expression: CommonTableExpressionNode): Readonly; -}>; -/** - * @internal - */ -export declare const WithNode: WithNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/operation-node/with-node.js b/node_modules/kysely/dist/cjs/operation-node/with-node.js deleted file mode 100644 index be9964f..0000000 --- a/node_modules/kysely/dist/cjs/operation-node/with-node.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.WithNode = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -/** - * @internal - */ -exports.WithNode = (0, object_utils_js_1.freeze)({ - is(node) { - return node.kind === 'WithNode'; - }, - create(expression, params) { - return (0, object_utils_js_1.freeze)({ - kind: 'WithNode', - expressions: (0, object_utils_js_1.freeze)([expression]), - ...params, - }); - }, - cloneWithExpression(withNode, expression) { - return (0, object_utils_js_1.freeze)({ - ...withNode, - expressions: (0, object_utils_js_1.freeze)([...withNode.expressions, expression]), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/package.json b/node_modules/kysely/dist/cjs/package.json deleted file mode 100644 index 731cf3f..0000000 --- a/node_modules/kysely/dist/cjs/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"commonjs","sideEffects":false} \ No newline at end of file diff --git a/node_modules/kysely/dist/cjs/parser/binary-operation-parser.d.ts b/node_modules/kysely/dist/cjs/parser/binary-operation-parser.d.ts deleted file mode 100644 index 076a691..0000000 --- a/node_modules/kysely/dist/cjs/parser/binary-operation-parser.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { BinaryOperationNode } from '../operation-node/binary-operation-node.js'; -import { type OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { type ComparisonOperator, type BinaryOperator, type Operator } from '../operation-node/operator-node.js'; -import { type ExtractTypeFromReferenceExpression, type ExtractTypeFromStringReference, type ReferenceExpression, type StringReference } from './reference-parser.js'; -import { type ValueExpression, type ValueExpressionOrList } from './value-parser.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -import type { Expression } from '../expression/expression.js'; -import type { SelectType } from '../util/column-type.js'; -export type OperandValueExpression = ValueExpression>; -export type OperandValueExpressionOrList = ValueExpressionOrList | null>; -export type OperatorExpression = Operator | Expression; -export type BinaryOperatorExpression = BinaryOperator | Expression; -export type ComparisonOperatorExpression = ComparisonOperator | Expression; -export type FilterObject = { - [R in StringReference]?: ValueExpressionOrList>>; -}; -export declare function parseValueBinaryOperationOrExpression(args: any[]): OperationNode; -export declare function parseValueBinaryOperation(left: ReferenceExpression, operator: BinaryOperatorExpression, right: OperandValueExpressionOrList): BinaryOperationNode; -export declare function parseReferentialBinaryOperation(left: ReferenceExpression, operator: BinaryOperatorExpression, right: OperandValueExpressionOrList): BinaryOperationNode; -export declare function parseFilterObject(obj: Readonly>, combinator: 'and' | 'or'): OperationNode; -export declare function parseFilterList(list: ReadonlyArray, combinator: 'and' | 'or', withParens?: boolean): OperationNode; diff --git a/node_modules/kysely/dist/cjs/parser/binary-operation-parser.js b/node_modules/kysely/dist/cjs/parser/binary-operation-parser.js deleted file mode 100644 index af0bd20..0000000 --- a/node_modules/kysely/dist/cjs/parser/binary-operation-parser.js +++ /dev/null @@ -1,74 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseValueBinaryOperationOrExpression = parseValueBinaryOperationOrExpression; -exports.parseValueBinaryOperation = parseValueBinaryOperation; -exports.parseReferentialBinaryOperation = parseReferentialBinaryOperation; -exports.parseFilterObject = parseFilterObject; -exports.parseFilterList = parseFilterList; -const binary_operation_node_js_1 = require("../operation-node/binary-operation-node.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -const operation_node_source_js_1 = require("../operation-node/operation-node-source.js"); -const operator_node_js_1 = require("../operation-node/operator-node.js"); -const reference_parser_js_1 = require("./reference-parser.js"); -const value_parser_js_1 = require("./value-parser.js"); -const value_node_js_1 = require("../operation-node/value-node.js"); -const and_node_js_1 = require("../operation-node/and-node.js"); -const parens_node_js_1 = require("../operation-node/parens-node.js"); -const or_node_js_1 = require("../operation-node/or-node.js"); -function parseValueBinaryOperationOrExpression(args) { - if (args.length === 3) { - return parseValueBinaryOperation(args[0], args[1], args[2]); - } - else if (args.length === 1) { - return (0, value_parser_js_1.parseValueExpression)(args[0]); - } - throw new Error(`invalid arguments: ${JSON.stringify(args)}`); -} -function parseValueBinaryOperation(left, operator, right) { - if (isIsOperator(operator) && needsIsOperator(right)) { - return binary_operation_node_js_1.BinaryOperationNode.create((0, reference_parser_js_1.parseReferenceExpression)(left), parseOperator(operator), value_node_js_1.ValueNode.createImmediate(right)); - } - return binary_operation_node_js_1.BinaryOperationNode.create((0, reference_parser_js_1.parseReferenceExpression)(left), parseOperator(operator), (0, value_parser_js_1.parseValueExpressionOrList)(right)); -} -function parseReferentialBinaryOperation(left, operator, right) { - return binary_operation_node_js_1.BinaryOperationNode.create((0, reference_parser_js_1.parseReferenceExpression)(left), parseOperator(operator), (0, reference_parser_js_1.parseReferenceExpression)(right)); -} -function parseFilterObject(obj, combinator) { - return parseFilterList(Object.entries(obj) - .filter(([, v]) => !(0, object_utils_js_1.isUndefined)(v)) - .map(([k, v]) => parseValueBinaryOperation(k, needsIsOperator(v) ? 'is' : '=', v)), combinator); -} -function parseFilterList(list, combinator, withParens = true) { - const combine = combinator === 'and' ? and_node_js_1.AndNode.create : or_node_js_1.OrNode.create; - if (list.length === 0) { - return binary_operation_node_js_1.BinaryOperationNode.create(value_node_js_1.ValueNode.createImmediate(1), operator_node_js_1.OperatorNode.create('='), value_node_js_1.ValueNode.createImmediate(combinator === 'and' ? 1 : 0)); - } - let node = toOperationNode(list[0]); - for (let i = 1; i < list.length; ++i) { - node = combine(node, toOperationNode(list[i])); - } - if (list.length > 1 && withParens) { - return parens_node_js_1.ParensNode.create(node); - } - return node; -} -function isIsOperator(operator) { - return operator === 'is' || operator === 'is not'; -} -function needsIsOperator(value) { - return (0, object_utils_js_1.isNull)(value) || (0, object_utils_js_1.isBoolean)(value); -} -function parseOperator(operator) { - if ((0, object_utils_js_1.isString)(operator) && operator_node_js_1.OPERATORS.includes(operator)) { - return operator_node_js_1.OperatorNode.create(operator); - } - if ((0, operation_node_source_js_1.isOperationNodeSource)(operator)) { - return operator.toOperationNode(); - } - throw new Error(`invalid operator ${JSON.stringify(operator)}`); -} -function toOperationNode(nodeOrSource) { - return (0, operation_node_source_js_1.isOperationNodeSource)(nodeOrSource) - ? nodeOrSource.toOperationNode() - : nodeOrSource; -} diff --git a/node_modules/kysely/dist/cjs/parser/coalesce-parser.d.ts b/node_modules/kysely/dist/cjs/parser/coalesce-parser.d.ts deleted file mode 100644 index 9c55941..0000000 --- a/node_modules/kysely/dist/cjs/parser/coalesce-parser.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { ExtractTypeFromReferenceExpression } from './reference-parser.js'; -export type ExtractTypeFromCoalesce1 = ExtractTypeFromReferenceExpression; -export type ExtractTypeFromCoalesce2 = ExtractTypeFromCoalesceValues2, ExtractTypeFromReferenceExpression>; -type ExtractTypeFromCoalesceValues2 = null extends V1 ? null extends V2 ? V1 | V2 : NotNull : NotNull; -export type ExtractTypeFromCoalesce3 = ExtractTypeFromCoalesceValues3, ExtractTypeFromReferenceExpression, ExtractTypeFromReferenceExpression>; -type ExtractTypeFromCoalesceValues3 = null extends V1 ? null extends V2 ? null extends V3 ? V1 | V2 | V3 : NotNull : NotNull : NotNull; -export type ExtractTypeFromCoalesce4 = ExtractTypeFromCoalesceValues4, ExtractTypeFromReferenceExpression, ExtractTypeFromReferenceExpression, ExtractTypeFromReferenceExpression>; -type ExtractTypeFromCoalesceValues4 = null extends V1 ? null extends V2 ? null extends V3 ? null extends V4 ? V1 | V2 | V3 | V4 : NotNull : NotNull : NotNull : NotNull; -export type ExtractTypeFromCoalesce5 = ExtractTypeFromCoalesceValues5, ExtractTypeFromReferenceExpression, ExtractTypeFromReferenceExpression, ExtractTypeFromReferenceExpression, ExtractTypeFromReferenceExpression>; -type ExtractTypeFromCoalesceValues5 = null extends V1 ? null extends V2 ? null extends V3 ? null extends V4 ? null extends V5 ? V1 | V2 | V3 | V4 | V5 : NotNull : NotNull : NotNull : NotNull : NotNull; -type NotNull = Exclude; -export {}; diff --git a/node_modules/kysely/dist/cjs/parser/coalesce-parser.js b/node_modules/kysely/dist/cjs/parser/coalesce-parser.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/parser/coalesce-parser.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/parser/collate-parser.d.ts b/node_modules/kysely/dist/cjs/parser/collate-parser.d.ts deleted file mode 100644 index 0b34c48..0000000 --- a/node_modules/kysely/dist/cjs/parser/collate-parser.d.ts +++ /dev/null @@ -1 +0,0 @@ -export type Collation = 'nocase' | 'binary' | 'rtrim' | (string & {}); diff --git a/node_modules/kysely/dist/cjs/parser/collate-parser.js b/node_modules/kysely/dist/cjs/parser/collate-parser.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/parser/collate-parser.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/parser/data-type-parser.d.ts b/node_modules/kysely/dist/cjs/parser/data-type-parser.d.ts deleted file mode 100644 index 404183e..0000000 --- a/node_modules/kysely/dist/cjs/parser/data-type-parser.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -import { type ColumnDataType } from '../operation-node/data-type-node.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -export type DataTypeExpression = ColumnDataType | Expression; -export declare function parseDataTypeExpression(dataType: DataTypeExpression): OperationNode; diff --git a/node_modules/kysely/dist/cjs/parser/data-type-parser.js b/node_modules/kysely/dist/cjs/parser/data-type-parser.js deleted file mode 100644 index 3077c21..0000000 --- a/node_modules/kysely/dist/cjs/parser/data-type-parser.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseDataTypeExpression = parseDataTypeExpression; -const data_type_node_js_1 = require("../operation-node/data-type-node.js"); -const operation_node_source_js_1 = require("../operation-node/operation-node-source.js"); -function parseDataTypeExpression(dataType) { - if ((0, operation_node_source_js_1.isOperationNodeSource)(dataType)) { - return dataType.toOperationNode(); - } - if ((0, data_type_node_js_1.isColumnDataType)(dataType)) { - return data_type_node_js_1.DataTypeNode.create(dataType); - } - throw new Error(`invalid column data type ${JSON.stringify(dataType)}`); -} diff --git a/node_modules/kysely/dist/cjs/parser/default-value-parser.d.ts b/node_modules/kysely/dist/cjs/parser/default-value-parser.d.ts deleted file mode 100644 index 8938d53..0000000 --- a/node_modules/kysely/dist/cjs/parser/default-value-parser.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -export type DefaultValueExpression = unknown | Expression; -export declare function parseDefaultValueExpression(value: DefaultValueExpression): OperationNode; diff --git a/node_modules/kysely/dist/cjs/parser/default-value-parser.js b/node_modules/kysely/dist/cjs/parser/default-value-parser.js deleted file mode 100644 index 7385968..0000000 --- a/node_modules/kysely/dist/cjs/parser/default-value-parser.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseDefaultValueExpression = parseDefaultValueExpression; -const operation_node_source_js_1 = require("../operation-node/operation-node-source.js"); -const value_node_js_1 = require("../operation-node/value-node.js"); -function parseDefaultValueExpression(value) { - return (0, operation_node_source_js_1.isOperationNodeSource)(value) - ? value.toOperationNode() - : value_node_js_1.ValueNode.createImmediate(value); -} diff --git a/node_modules/kysely/dist/cjs/parser/delete-from-parser.d.ts b/node_modules/kysely/dist/cjs/parser/delete-from-parser.d.ts deleted file mode 100644 index 4ecb5f3..0000000 --- a/node_modules/kysely/dist/cjs/parser/delete-from-parser.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { DeleteQueryBuilder } from '../query-builder/delete-query-builder.js'; -import type { DeleteResult } from '../query-builder/delete-result.js'; -import type { ShallowRecord } from '../util/type-utils.js'; -import type { ExtractTableAlias, From, FromTables, TableExpressionOrList } from './table-parser.js'; -export type DeleteFrom> = [ - TE -] extends [keyof DB] ? DeleteQueryBuilder, DeleteResult> : [ - TE -] extends [`${infer T} as ${infer A}`] ? T extends keyof DB ? DeleteQueryBuilder, A, DeleteResult> : never : TE extends ReadonlyArray ? DeleteQueryBuilder, FromTables, DeleteResult> : DeleteQueryBuilder, FromTables, DeleteResult>; diff --git a/node_modules/kysely/dist/cjs/parser/delete-from-parser.js b/node_modules/kysely/dist/cjs/parser/delete-from-parser.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/parser/delete-from-parser.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/parser/expression-parser.d.ts b/node_modules/kysely/dist/cjs/parser/expression-parser.d.ts deleted file mode 100644 index 06c5783..0000000 --- a/node_modules/kysely/dist/cjs/parser/expression-parser.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { type AliasedExpression, type Expression } from '../expression/expression.js'; -import type { AliasNode } from '../operation-node/alias-node.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -import { type ExpressionBuilder } from '../expression/expression-builder.js'; -import type { SelectQueryBuilderExpression } from '../query-builder/select-query-builder-expression.js'; -/** - * Like `Expression` but also accepts a select query with an output - * type extending `Record`. This type is useful because SQL - * treats records with a single column as single values. - */ -export type OperandExpression = Expression | SelectQueryBuilderExpression>; -export type ExpressionOrFactory = OperandExpression | OperandExpressionFactory; -export type AliasedExpressionOrFactory = AliasedExpression | AliasedExpressionFactory; -export type ExpressionFactory = (eb: ExpressionBuilder) => Expression; -type OperandExpressionFactory = (eb: ExpressionBuilder) => OperandExpression; -type AliasedExpressionFactory = (eb: ExpressionBuilder) => AliasedExpression; -export declare function parseExpression(exp: ExpressionOrFactory): OperationNode; -export declare function parseAliasedExpression(exp: AliasedExpressionOrFactory): AliasNode; -export declare function isExpressionOrFactory(obj: unknown): obj is ExpressionOrFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/parser/expression-parser.js b/node_modules/kysely/dist/cjs/parser/expression-parser.js deleted file mode 100644 index 75c35d4..0000000 --- a/node_modules/kysely/dist/cjs/parser/expression-parser.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseExpression = parseExpression; -exports.parseAliasedExpression = parseAliasedExpression; -exports.isExpressionOrFactory = isExpressionOrFactory; -const expression_js_1 = require("../expression/expression.js"); -const operation_node_source_js_1 = require("../operation-node/operation-node-source.js"); -const expression_builder_js_1 = require("../expression/expression-builder.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -function parseExpression(exp) { - if ((0, operation_node_source_js_1.isOperationNodeSource)(exp)) { - return exp.toOperationNode(); - } - else if ((0, object_utils_js_1.isFunction)(exp)) { - return exp((0, expression_builder_js_1.expressionBuilder)()).toOperationNode(); - } - throw new Error(`invalid expression: ${JSON.stringify(exp)}`); -} -function parseAliasedExpression(exp) { - if ((0, operation_node_source_js_1.isOperationNodeSource)(exp)) { - return exp.toOperationNode(); - } - else if ((0, object_utils_js_1.isFunction)(exp)) { - return exp((0, expression_builder_js_1.expressionBuilder)()).toOperationNode(); - } - throw new Error(`invalid aliased expression: ${JSON.stringify(exp)}`); -} -function isExpressionOrFactory(obj) { - return (0, expression_js_1.isExpression)(obj) || (0, expression_js_1.isAliasedExpression)(obj) || (0, object_utils_js_1.isFunction)(obj); -} diff --git a/node_modules/kysely/dist/cjs/parser/fetch-parser.d.ts b/node_modules/kysely/dist/cjs/parser/fetch-parser.d.ts deleted file mode 100644 index 56ffd6c..0000000 --- a/node_modules/kysely/dist/cjs/parser/fetch-parser.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { type FetchModifier, FetchNode } from '../operation-node/fetch-node.js'; -export declare function parseFetch(rowCount: number | bigint, modifier: FetchModifier): FetchNode; diff --git a/node_modules/kysely/dist/cjs/parser/fetch-parser.js b/node_modules/kysely/dist/cjs/parser/fetch-parser.js deleted file mode 100644 index 4a8a57a..0000000 --- a/node_modules/kysely/dist/cjs/parser/fetch-parser.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseFetch = parseFetch; -const fetch_node_js_1 = require("../operation-node/fetch-node.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -function parseFetch(rowCount, modifier) { - if (!(0, object_utils_js_1.isNumber)(rowCount) && !(0, object_utils_js_1.isBigInt)(rowCount)) { - throw new Error(`Invalid fetch row count: ${rowCount}`); - } - if (!isFetchModifier(modifier)) { - throw new Error(`Invalid fetch modifier: ${modifier}`); - } - return fetch_node_js_1.FetchNode.create(rowCount, modifier); -} -function isFetchModifier(value) { - return value === 'only' || value === 'with ties'; -} diff --git a/node_modules/kysely/dist/cjs/parser/group-by-parser.d.ts b/node_modules/kysely/dist/cjs/parser/group-by-parser.d.ts deleted file mode 100644 index 807559c..0000000 --- a/node_modules/kysely/dist/cjs/parser/group-by-parser.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { GroupByItemNode } from '../operation-node/group-by-item-node.js'; -import { type ExpressionBuilder } from '../expression/expression-builder.js'; -import { type ReferenceExpression } from './reference-parser.js'; -export type GroupByExpression = ReferenceExpression | (keyof O & string); -export type GroupByArg = GroupByExpression | ReadonlyArray> | ((eb: ExpressionBuilder) => ReadonlyArray>); -export declare function parseGroupBy(groupBy: GroupByArg): GroupByItemNode[]; diff --git a/node_modules/kysely/dist/cjs/parser/group-by-parser.js b/node_modules/kysely/dist/cjs/parser/group-by-parser.js deleted file mode 100644 index 9d130dd..0000000 --- a/node_modules/kysely/dist/cjs/parser/group-by-parser.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseGroupBy = parseGroupBy; -const group_by_item_node_js_1 = require("../operation-node/group-by-item-node.js"); -const expression_builder_js_1 = require("../expression/expression-builder.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -const reference_parser_js_1 = require("./reference-parser.js"); -function parseGroupBy(groupBy) { - groupBy = (0, object_utils_js_1.isFunction)(groupBy) ? groupBy((0, expression_builder_js_1.expressionBuilder)()) : groupBy; - return (0, reference_parser_js_1.parseReferenceExpressionOrList)(groupBy).map(group_by_item_node_js_1.GroupByItemNode.create); -} diff --git a/node_modules/kysely/dist/cjs/parser/identifier-parser.d.ts b/node_modules/kysely/dist/cjs/parser/identifier-parser.d.ts deleted file mode 100644 index 1ffa667..0000000 --- a/node_modules/kysely/dist/cjs/parser/identifier-parser.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { SchemableIdentifierNode } from '../operation-node/schemable-identifier-node.js'; -export declare function parseSchemableIdentifier(id: string): SchemableIdentifierNode; diff --git a/node_modules/kysely/dist/cjs/parser/identifier-parser.js b/node_modules/kysely/dist/cjs/parser/identifier-parser.js deleted file mode 100644 index 8e4f197..0000000 --- a/node_modules/kysely/dist/cjs/parser/identifier-parser.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseSchemableIdentifier = parseSchemableIdentifier; -const schemable_identifier_node_js_1 = require("../operation-node/schemable-identifier-node.js"); -function parseSchemableIdentifier(id) { - const SCHEMA_SEPARATOR = '.'; - if (id.includes(SCHEMA_SEPARATOR)) { - const parts = id.split(SCHEMA_SEPARATOR).map(trim); - if (parts.length === 2) { - return schemable_identifier_node_js_1.SchemableIdentifierNode.createWithSchema(parts[0], parts[1]); - } - else { - throw new Error(`invalid schemable identifier ${id}`); - } - } - else { - return schemable_identifier_node_js_1.SchemableIdentifierNode.create(id); - } -} -function trim(str) { - return str.trim(); -} diff --git a/node_modules/kysely/dist/cjs/parser/insert-values-parser.d.ts b/node_modules/kysely/dist/cjs/parser/insert-values-parser.d.ts deleted file mode 100644 index f77f26d..0000000 --- a/node_modules/kysely/dist/cjs/parser/insert-values-parser.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { ColumnNode } from '../operation-node/column-node.js'; -import { type ValueExpression } from './value-parser.js'; -import { ValuesNode } from '../operation-node/values-node.js'; -import type { NonNullableInsertKeys, NullableInsertKeys, InsertType } from '../util/column-type.js'; -import { type ExpressionBuilder } from '../expression/expression-builder.js'; -export type InsertObject = { - [C in NonNullableInsertKeys]: ValueExpression>; -} & { - [C in NullableInsertKeys]?: ValueExpression> | undefined; -}; -export type InsertObjectOrList = InsertObject | ReadonlyArray>; -export type InsertObjectOrListFactory = (eb: ExpressionBuilder) => InsertObjectOrList; -export type InsertExpression = InsertObjectOrList | InsertObjectOrListFactory; -export declare function parseInsertExpression(arg: InsertExpression): [ReadonlyArray, ValuesNode]; diff --git a/node_modules/kysely/dist/cjs/parser/insert-values-parser.js b/node_modules/kysely/dist/cjs/parser/insert-values-parser.js deleted file mode 100644 index 31a3a56..0000000 --- a/node_modules/kysely/dist/cjs/parser/insert-values-parser.js +++ /dev/null @@ -1,64 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseInsertExpression = parseInsertExpression; -const column_node_js_1 = require("../operation-node/column-node.js"); -const primitive_value_list_node_js_1 = require("../operation-node/primitive-value-list-node.js"); -const value_list_node_js_1 = require("../operation-node/value-list-node.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -const value_parser_js_1 = require("./value-parser.js"); -const values_node_js_1 = require("../operation-node/values-node.js"); -const expression_parser_js_1 = require("./expression-parser.js"); -const default_insert_value_node_js_1 = require("../operation-node/default-insert-value-node.js"); -const expression_builder_js_1 = require("../expression/expression-builder.js"); -function parseInsertExpression(arg) { - const objectOrList = (0, object_utils_js_1.isFunction)(arg) ? arg((0, expression_builder_js_1.expressionBuilder)()) : arg; - const list = (0, object_utils_js_1.isReadonlyArray)(objectOrList) - ? objectOrList - : (0, object_utils_js_1.freeze)([objectOrList]); - return parseInsertColumnsAndValues(list); -} -function parseInsertColumnsAndValues(rows) { - const columns = parseColumnNamesAndIndexes(rows); - return [ - (0, object_utils_js_1.freeze)([...columns.keys()].map(column_node_js_1.ColumnNode.create)), - values_node_js_1.ValuesNode.create(rows.map((row) => parseRowValues(row, columns))), - ]; -} -function parseColumnNamesAndIndexes(rows) { - const columns = new Map(); - for (const row of rows) { - const cols = Object.keys(row); - for (const col of cols) { - if (!columns.has(col) && row[col] !== undefined) { - columns.set(col, columns.size); - } - } - } - return columns; -} -function parseRowValues(row, columns) { - const rowColumns = Object.keys(row); - const rowValues = Array.from({ - length: columns.size, - }); - let hasUndefinedOrComplexColumns = false; - let indexedRowColumns = rowColumns.length; - for (const col of rowColumns) { - const columnIdx = columns.get(col); - if ((0, object_utils_js_1.isUndefined)(columnIdx)) { - indexedRowColumns--; - continue; - } - const value = row[col]; - if ((0, object_utils_js_1.isUndefined)(value) || (0, expression_parser_js_1.isExpressionOrFactory)(value)) { - hasUndefinedOrComplexColumns = true; - } - rowValues[columnIdx] = value; - } - const hasMissingColumns = indexedRowColumns < columns.size; - if (hasMissingColumns || hasUndefinedOrComplexColumns) { - const defaultValue = default_insert_value_node_js_1.DefaultInsertValueNode.create(); - return value_list_node_js_1.ValueListNode.create(rowValues.map((it) => (0, object_utils_js_1.isUndefined)(it) ? defaultValue : (0, value_parser_js_1.parseValueExpression)(it))); - } - return primitive_value_list_node_js_1.PrimitiveValueListNode.create(rowValues); -} diff --git a/node_modules/kysely/dist/cjs/parser/join-parser.d.ts b/node_modules/kysely/dist/cjs/parser/join-parser.d.ts deleted file mode 100644 index 8952285..0000000 --- a/node_modules/kysely/dist/cjs/parser/join-parser.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { JoinNode, type JoinType } from '../operation-node/join-node.js'; -import type { JoinBuilder } from '../query-builder/join-builder.js'; -import type { AnyColumn, AnyColumnWithTable, DrainOuterGeneric } from '../util/type-utils.js'; -import { type From, type FromTables } from './table-parser.js'; -export type JoinReferenceExpression = DrainOuterGeneric | AnyJoinColumnWithTable>; -export type JoinCallbackExpression = (join: JoinBuilder, FromTables>) => JoinBuilder; -type AnyJoinColumn = AnyColumn, FromTables>; -type AnyJoinColumnWithTable = AnyColumnWithTable, FromTables>; -export declare function parseJoin(joinType: JoinType, args: any[]): JoinNode; -export {}; diff --git a/node_modules/kysely/dist/cjs/parser/join-parser.js b/node_modules/kysely/dist/cjs/parser/join-parser.js deleted file mode 100644 index 2428960..0000000 --- a/node_modules/kysely/dist/cjs/parser/join-parser.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseJoin = parseJoin; -const join_node_js_1 = require("../operation-node/join-node.js"); -const binary_operation_parser_js_1 = require("./binary-operation-parser.js"); -const parse_utils_js_1 = require("./parse-utils.js"); -const table_parser_js_1 = require("./table-parser.js"); -function parseJoin(joinType, args) { - if (args.length === 3) { - return parseSingleOnJoin(joinType, args[0], args[1], args[2]); - } - else if (args.length === 2) { - return parseCallbackJoin(joinType, args[0], args[1]); - } - else if (args.length === 1) { - return parseOnlessJoin(joinType, args[0]); - } - else { - throw new Error('not implemented'); - } -} -function parseCallbackJoin(joinType, from, callback) { - return callback((0, parse_utils_js_1.createJoinBuilder)(joinType, from)).toOperationNode(); -} -function parseSingleOnJoin(joinType, from, lhsColumn, rhsColumn) { - return join_node_js_1.JoinNode.createWithOn(joinType, (0, table_parser_js_1.parseTableExpression)(from), (0, binary_operation_parser_js_1.parseReferentialBinaryOperation)(lhsColumn, '=', rhsColumn)); -} -function parseOnlessJoin(joinType, from) { - return join_node_js_1.JoinNode.create(joinType, (0, table_parser_js_1.parseTableExpression)(from)); -} diff --git a/node_modules/kysely/dist/cjs/parser/merge-into-parser.d.ts b/node_modules/kysely/dist/cjs/parser/merge-into-parser.d.ts deleted file mode 100644 index 9a7ea48..0000000 --- a/node_modules/kysely/dist/cjs/parser/merge-into-parser.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { MergeQueryBuilder } from '../query-builder/merge-query-builder.js'; -import type { MergeResult } from '../query-builder/merge-result.js'; -import type { ShallowRecord } from '../util/type-utils.js'; -import type { ExtractTableAlias, SimpleTableReference } from './table-parser.js'; -export type MergeInto> = [TE] extends [ - keyof DB -] ? MergeQueryBuilder, MergeResult> : [TE] extends [`${infer T} as ${infer A}`] ? T extends keyof DB ? MergeQueryBuilder, A, MergeResult> : never : never; diff --git a/node_modules/kysely/dist/cjs/parser/merge-into-parser.js b/node_modules/kysely/dist/cjs/parser/merge-into-parser.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/parser/merge-into-parser.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/parser/merge-parser.d.ts b/node_modules/kysely/dist/cjs/parser/merge-parser.d.ts deleted file mode 100644 index 7675d7b..0000000 --- a/node_modules/kysely/dist/cjs/parser/merge-parser.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { InsertQueryNode } from '../operation-node/insert-query-node.js'; -import { type OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -import { WhenNode } from '../operation-node/when-node.js'; -export declare function parseMergeWhen(type: { - isMatched: boolean; - bySource?: boolean; -}, args?: any[], refRight?: boolean): WhenNode; -export declare function parseMergeThen(result: 'delete' | 'do nothing' | OperationNodeSource | InsertQueryNode): OperationNode; diff --git a/node_modules/kysely/dist/cjs/parser/merge-parser.js b/node_modules/kysely/dist/cjs/parser/merge-parser.js deleted file mode 100644 index 3106440..0000000 --- a/node_modules/kysely/dist/cjs/parser/merge-parser.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseMergeWhen = parseMergeWhen; -exports.parseMergeThen = parseMergeThen; -const matched_node_js_1 = require("../operation-node/matched-node.js"); -const operation_node_source_js_1 = require("../operation-node/operation-node-source.js"); -const raw_node_js_1 = require("../operation-node/raw-node.js"); -const when_node_js_1 = require("../operation-node/when-node.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -const binary_operation_parser_js_1 = require("./binary-operation-parser.js"); -function parseMergeWhen(type, args, refRight) { - return when_node_js_1.WhenNode.create((0, binary_operation_parser_js_1.parseFilterList)([ - matched_node_js_1.MatchedNode.create(!type.isMatched, type.bySource), - ...(args && args.length > 0 - ? [ - args.length === 3 && refRight - ? (0, binary_operation_parser_js_1.parseReferentialBinaryOperation)(args[0], args[1], args[2]) - : (0, binary_operation_parser_js_1.parseValueBinaryOperationOrExpression)(args), - ] - : []), - ], 'and', false)); -} -function parseMergeThen(result) { - if ((0, object_utils_js_1.isString)(result)) { - return raw_node_js_1.RawNode.create([result], []); - } - if ((0, operation_node_source_js_1.isOperationNodeSource)(result)) { - return result.toOperationNode(); - } - return result; -} diff --git a/node_modules/kysely/dist/cjs/parser/on-commit-action-parse.d.ts b/node_modules/kysely/dist/cjs/parser/on-commit-action-parse.d.ts deleted file mode 100644 index bb90d1b..0000000 --- a/node_modules/kysely/dist/cjs/parser/on-commit-action-parse.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { type OnCommitAction } from '../operation-node/create-table-node.js'; -export declare function parseOnCommitAction(action: OnCommitAction): OnCommitAction; diff --git a/node_modules/kysely/dist/cjs/parser/on-commit-action-parse.js b/node_modules/kysely/dist/cjs/parser/on-commit-action-parse.js deleted file mode 100644 index 10b31c3..0000000 --- a/node_modules/kysely/dist/cjs/parser/on-commit-action-parse.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseOnCommitAction = parseOnCommitAction; -const create_table_node_js_1 = require("../operation-node/create-table-node.js"); -function parseOnCommitAction(action) { - if (create_table_node_js_1.ON_COMMIT_ACTIONS.includes(action)) { - return action; - } - throw new Error(`invalid OnCommitAction ${action}`); -} diff --git a/node_modules/kysely/dist/cjs/parser/on-modify-action-parser.d.ts b/node_modules/kysely/dist/cjs/parser/on-modify-action-parser.d.ts deleted file mode 100644 index 7a7e0f0..0000000 --- a/node_modules/kysely/dist/cjs/parser/on-modify-action-parser.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { type OnModifyForeignAction } from '../operation-node/references-node.js'; -export declare function parseOnModifyForeignAction(action: OnModifyForeignAction): OnModifyForeignAction; diff --git a/node_modules/kysely/dist/cjs/parser/on-modify-action-parser.js b/node_modules/kysely/dist/cjs/parser/on-modify-action-parser.js deleted file mode 100644 index 19b5b87..0000000 --- a/node_modules/kysely/dist/cjs/parser/on-modify-action-parser.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseOnModifyForeignAction = parseOnModifyForeignAction; -const references_node_js_1 = require("../operation-node/references-node.js"); -function parseOnModifyForeignAction(action) { - if (references_node_js_1.ON_MODIFY_FOREIGN_ACTIONS.includes(action)) { - return action; - } - throw new Error(`invalid OnModifyForeignAction ${action}`); -} diff --git a/node_modules/kysely/dist/cjs/parser/order-by-parser.d.ts b/node_modules/kysely/dist/cjs/parser/order-by-parser.d.ts deleted file mode 100644 index 5c5498d..0000000 --- a/node_modules/kysely/dist/cjs/parser/order-by-parser.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { type DynamicReferenceBuilder } from '../dynamic/dynamic-reference-builder.js'; -import { type Expression } from '../expression/expression.js'; -import { OrderByItemNode } from '../operation-node/order-by-item-node.js'; -import { OrderByItemBuilder } from '../query-builder/order-by-item-builder.js'; -import { type ExpressionOrFactory } from './expression-parser.js'; -import { type ReferenceExpression, type StringReference } from './reference-parser.js'; -export type OrderByExpression = StringReference | (keyof O & string) | ExpressionOrFactory | DynamicReferenceBuilder; -export type OrderByModifiers = OrderByDirection | OrderByModifiersCallbackExpression; -export type OrderByDirection = 'asc' | 'desc'; -export declare function isOrderByDirection(thing: unknown): thing is OrderByDirection; -export type OrderByModifiersCallbackExpression = (builder: OrderByItemBuilder) => OrderByItemBuilder; -/** - * @deprecated performance reasons, use {@link OrderByExpression} instead. - */ -export type DirectedOrderByStringReference = `${StringReference | (keyof O & string)} ${OrderByDirection}`; -/** - * @deprecated replaced with {@link OrderByModifiers} - */ -export type OrderByDirectionExpression = OrderByDirection | Expression; -/** - * @deprecated use {@link OrderByExpression} instead. - */ -export type UndirectedOrderByExpression = ReferenceExpression | (keyof O & string); -export declare function parseOrderBy(args: any[]): OrderByItemNode[]; -export declare function parseOrderByItem(expr: OrderByExpression, modifiers?: OrderByModifiers): OrderByItemNode; diff --git a/node_modules/kysely/dist/cjs/parser/order-by-parser.js b/node_modules/kysely/dist/cjs/parser/order-by-parser.js deleted file mode 100644 index 3bb55f5..0000000 --- a/node_modules/kysely/dist/cjs/parser/order-by-parser.js +++ /dev/null @@ -1,71 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isOrderByDirection = isOrderByDirection; -exports.parseOrderBy = parseOrderBy; -exports.parseOrderByItem = parseOrderByItem; -const dynamic_reference_builder_js_1 = require("../dynamic/dynamic-reference-builder.js"); -const expression_js_1 = require("../expression/expression.js"); -const order_by_item_node_js_1 = require("../operation-node/order-by-item-node.js"); -const raw_node_js_1 = require("../operation-node/raw-node.js"); -const order_by_item_builder_js_1 = require("../query-builder/order-by-item-builder.js"); -const log_once_js_1 = require("../util/log-once.js"); -const expression_parser_js_1 = require("./expression-parser.js"); -const reference_parser_js_1 = require("./reference-parser.js"); -function isOrderByDirection(thing) { - return thing === 'asc' || thing === 'desc'; -} -function parseOrderBy(args) { - if (args.length === 2) { - return [parseOrderByItem(args[0], args[1])]; - } - if (args.length === 1) { - const [orderBy] = args; - if (Array.isArray(orderBy)) { - (0, log_once_js_1.logOnce)('orderBy(array) is deprecated, use multiple orderBy calls instead.'); - return orderBy.map((item) => parseOrderByItem(item)); - } - return [parseOrderByItem(orderBy)]; - } - throw new Error(`Invalid number of arguments at order by! expected 1-2, received ${args.length}`); -} -function parseOrderByItem(expr, modifiers) { - const parsedRef = parseOrderByExpression(expr); - if (order_by_item_node_js_1.OrderByItemNode.is(parsedRef)) { - if (modifiers) { - throw new Error('Cannot specify direction twice!'); - } - return parsedRef; - } - return parseOrderByWithModifiers(parsedRef, modifiers); -} -function parseOrderByExpression(expr) { - if ((0, expression_parser_js_1.isExpressionOrFactory)(expr)) { - return (0, expression_parser_js_1.parseExpression)(expr); - } - if ((0, dynamic_reference_builder_js_1.isDynamicReferenceBuilder)(expr)) { - return expr.toOperationNode(); - } - const [ref, direction] = expr.split(' '); - if (direction) { - (0, log_once_js_1.logOnce)("`orderBy('column asc')` is deprecated. Use `orderBy('column', 'asc')` instead."); - return parseOrderByWithModifiers((0, reference_parser_js_1.parseStringReference)(ref), direction); - } - return (0, reference_parser_js_1.parseStringReference)(expr); -} -function parseOrderByWithModifiers(expr, modifiers) { - if (typeof modifiers === 'string') { - if (!isOrderByDirection(modifiers)) { - throw new Error(`Invalid order by direction: ${modifiers}`); - } - return order_by_item_node_js_1.OrderByItemNode.create(expr, raw_node_js_1.RawNode.createWithSql(modifiers)); - } - if ((0, expression_js_1.isExpression)(modifiers)) { - (0, log_once_js_1.logOnce)("`orderBy(..., expr)` is deprecated. Use `orderBy(..., 'asc')` or `orderBy(..., (ob) => ...)` instead."); - return order_by_item_node_js_1.OrderByItemNode.create(expr, modifiers.toOperationNode()); - } - const node = order_by_item_node_js_1.OrderByItemNode.create(expr); - if (!modifiers) { - return node; - } - return modifiers(new order_by_item_builder_js_1.OrderByItemBuilder({ node })).toOperationNode(); -} diff --git a/node_modules/kysely/dist/cjs/parser/parse-utils.d.ts b/node_modules/kysely/dist/cjs/parser/parse-utils.d.ts deleted file mode 100644 index 96cb9cc..0000000 --- a/node_modules/kysely/dist/cjs/parser/parse-utils.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { type JoinType } from '../operation-node/join-node.js'; -import { JoinBuilder } from '../query-builder/join-builder.js'; -import { OverBuilder } from '../query-builder/over-builder.js'; -import { type SelectQueryBuilder } from '../query-builder/select-query-builder.js'; -import { QueryCreator } from '../query-creator.js'; -import { type TableExpression } from './table-parser.js'; -export declare function createSelectQueryBuilder(): SelectQueryBuilder; -export declare function createQueryCreator(): QueryCreator; -export declare function createJoinBuilder(joinType: JoinType, table: TableExpression): JoinBuilder; -export declare function createOverBuilder(): OverBuilder; diff --git a/node_modules/kysely/dist/cjs/parser/parse-utils.js b/node_modules/kysely/dist/cjs/parser/parse-utils.js deleted file mode 100644 index 79d6105..0000000 --- a/node_modules/kysely/dist/cjs/parser/parse-utils.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createSelectQueryBuilder = createSelectQueryBuilder; -exports.createQueryCreator = createQueryCreator; -exports.createJoinBuilder = createJoinBuilder; -exports.createOverBuilder = createOverBuilder; -const join_node_js_1 = require("../operation-node/join-node.js"); -const over_node_js_1 = require("../operation-node/over-node.js"); -const select_query_node_js_1 = require("../operation-node/select-query-node.js"); -const join_builder_js_1 = require("../query-builder/join-builder.js"); -const over_builder_js_1 = require("../query-builder/over-builder.js"); -const select_query_builder_js_1 = require("../query-builder/select-query-builder.js"); -const query_creator_js_1 = require("../query-creator.js"); -const noop_query_executor_js_1 = require("../query-executor/noop-query-executor.js"); -const query_id_js_1 = require("../util/query-id.js"); -const table_parser_js_1 = require("./table-parser.js"); -function createSelectQueryBuilder() { - return (0, select_query_builder_js_1.createSelectQueryBuilder)({ - queryId: (0, query_id_js_1.createQueryId)(), - executor: noop_query_executor_js_1.NOOP_QUERY_EXECUTOR, - queryNode: select_query_node_js_1.SelectQueryNode.createFrom((0, table_parser_js_1.parseTableExpressionOrList)([])), - }); -} -function createQueryCreator() { - return new query_creator_js_1.QueryCreator({ - executor: noop_query_executor_js_1.NOOP_QUERY_EXECUTOR, - }); -} -function createJoinBuilder(joinType, table) { - return new join_builder_js_1.JoinBuilder({ - joinNode: join_node_js_1.JoinNode.create(joinType, (0, table_parser_js_1.parseTableExpression)(table)), - }); -} -function createOverBuilder() { - return new over_builder_js_1.OverBuilder({ - overNode: over_node_js_1.OverNode.create(), - }); -} diff --git a/node_modules/kysely/dist/cjs/parser/partition-by-parser.d.ts b/node_modules/kysely/dist/cjs/parser/partition-by-parser.d.ts deleted file mode 100644 index 38a4e2d..0000000 --- a/node_modules/kysely/dist/cjs/parser/partition-by-parser.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { DynamicReferenceBuilder } from '../dynamic/dynamic-reference-builder.js'; -import { PartitionByItemNode } from '../operation-node/partition-by-item-node.js'; -import { type StringReference } from './reference-parser.js'; -export type PartitionByExpression = StringReference | DynamicReferenceBuilder; -export type PartitionByExpressionOrList = ReadonlyArray> | PartitionByExpression; -export declare function parsePartitionBy(partitionBy: PartitionByExpressionOrList): PartitionByItemNode[]; diff --git a/node_modules/kysely/dist/cjs/parser/partition-by-parser.js b/node_modules/kysely/dist/cjs/parser/partition-by-parser.js deleted file mode 100644 index b52827c..0000000 --- a/node_modules/kysely/dist/cjs/parser/partition-by-parser.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parsePartitionBy = parsePartitionBy; -const partition_by_item_node_js_1 = require("../operation-node/partition-by-item-node.js"); -const reference_parser_js_1 = require("./reference-parser.js"); -function parsePartitionBy(partitionBy) { - return (0, reference_parser_js_1.parseReferenceExpressionOrList)(partitionBy).map(partition_by_item_node_js_1.PartitionByItemNode.create); -} diff --git a/node_modules/kysely/dist/cjs/parser/reference-parser.d.ts b/node_modules/kysely/dist/cjs/parser/reference-parser.d.ts deleted file mode 100644 index 896803b..0000000 --- a/node_modules/kysely/dist/cjs/parser/reference-parser.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { AliasNode } from '../operation-node/alias-node.js'; -import { ColumnNode } from '../operation-node/column-node.js'; -import { ReferenceNode } from '../operation-node/reference-node.js'; -import type { AnyColumn, AnyColumnWithTable, ExtractColumnType } from '../util/type-utils.js'; -import type { SelectQueryBuilderExpression } from '../query-builder/select-query-builder-expression.js'; -import { type ExpressionOrFactory } from './expression-parser.js'; -import type { DynamicReferenceBuilder } from '../dynamic/dynamic-reference-builder.js'; -import type { SelectType } from '../util/column-type.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -import type { Expression } from '../expression/expression.js'; -import type { SimpleReferenceExpressionNode } from '../operation-node/simple-reference-expression-node.js'; -import { type OrderByDirection } from './order-by-parser.js'; -import { type JSONOperatorWith$ } from '../operation-node/operator-node.js'; -import { JSONReferenceNode } from '../operation-node/json-reference-node.js'; -export type StringReference = AnyColumn | AnyColumnWithTable; -export type SimpleReferenceExpression = StringReference | DynamicReferenceBuilder; -export type ReferenceExpression = SimpleReferenceExpression | ExpressionOrFactory; -export type ReferenceExpressionOrList = ReferenceExpression | ReadonlyArray>; -export type ExtractTypeFromReferenceExpression = SelectType>; -export type ExtractRawTypeFromReferenceExpression = RE extends string ? ExtractTypeFromStringReference : RE extends SelectQueryBuilderExpression ? O[keyof O] | null : RE extends (qb: any) => SelectQueryBuilderExpression ? O[keyof O] | null : RE extends Expression ? O : RE extends (qb: any) => Expression ? O : DV; -export type ExtractTypeFromStringReference = RE extends `${infer SC}.${infer T}.${infer C}` ? `${SC}.${T}` extends TB ? C extends keyof DB[`${SC}.${T}`] ? DB[`${SC}.${T}`][C] : never : never : RE extends `${infer T}.${infer C}` ? T extends TB ? C extends keyof DB[T] ? DB[T][C] : never : never : RE extends AnyColumn ? ExtractColumnType : DV; -export type OrderedColumnName = C extends `${string} ${infer O}` ? O extends OrderByDirection ? C : never : C; -export type ExtractColumnNameFromOrderedColumnName = C extends `${infer CL} ${infer O}` ? O extends OrderByDirection ? CL : never : C; -export declare function parseSimpleReferenceExpression(exp: SimpleReferenceExpression): SimpleReferenceExpressionNode; -export declare function parseReferenceExpressionOrList(arg: ReferenceExpressionOrList): OperationNode[]; -export declare function parseReferenceExpression(exp: ReferenceExpression): OperationNode; -export declare function parseJSONReference(ref: string, op: JSONOperatorWith$): JSONReferenceNode; -export declare function parseStringReference(ref: string): ReferenceNode; -export declare function parseAliasedStringReference(ref: string): SimpleReferenceExpressionNode | AliasNode; -export declare function parseColumnName(column: AnyColumn): ColumnNode; -export declare function parseOrderedColumnName(column: string): OperationNode; diff --git a/node_modules/kysely/dist/cjs/parser/reference-parser.js b/node_modules/kysely/dist/cjs/parser/reference-parser.js deleted file mode 100644 index d772373..0000000 --- a/node_modules/kysely/dist/cjs/parser/reference-parser.js +++ /dev/null @@ -1,104 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseSimpleReferenceExpression = parseSimpleReferenceExpression; -exports.parseReferenceExpressionOrList = parseReferenceExpressionOrList; -exports.parseReferenceExpression = parseReferenceExpression; -exports.parseJSONReference = parseJSONReference; -exports.parseStringReference = parseStringReference; -exports.parseAliasedStringReference = parseAliasedStringReference; -exports.parseColumnName = parseColumnName; -exports.parseOrderedColumnName = parseOrderedColumnName; -const alias_node_js_1 = require("../operation-node/alias-node.js"); -const column_node_js_1 = require("../operation-node/column-node.js"); -const reference_node_js_1 = require("../operation-node/reference-node.js"); -const table_node_js_1 = require("../operation-node/table-node.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -const expression_parser_js_1 = require("./expression-parser.js"); -const identifier_node_js_1 = require("../operation-node/identifier-node.js"); -const order_by_parser_js_1 = require("./order-by-parser.js"); -const operator_node_js_1 = require("../operation-node/operator-node.js"); -const json_reference_node_js_1 = require("../operation-node/json-reference-node.js"); -const json_operator_chain_node_js_1 = require("../operation-node/json-operator-chain-node.js"); -const json_path_node_js_1 = require("../operation-node/json-path-node.js"); -function parseSimpleReferenceExpression(exp) { - if ((0, object_utils_js_1.isString)(exp)) { - return parseStringReference(exp); - } - return exp.toOperationNode(); -} -function parseReferenceExpressionOrList(arg) { - if ((0, object_utils_js_1.isReadonlyArray)(arg)) { - return arg.map((it) => parseReferenceExpression(it)); - } - else { - return [parseReferenceExpression(arg)]; - } -} -function parseReferenceExpression(exp) { - if ((0, expression_parser_js_1.isExpressionOrFactory)(exp)) { - return (0, expression_parser_js_1.parseExpression)(exp); - } - return parseSimpleReferenceExpression(exp); -} -function parseJSONReference(ref, op) { - const referenceNode = parseStringReference(ref); - if ((0, operator_node_js_1.isJSONOperator)(op)) { - return json_reference_node_js_1.JSONReferenceNode.create(referenceNode, json_operator_chain_node_js_1.JSONOperatorChainNode.create(operator_node_js_1.OperatorNode.create(op))); - } - const opWithoutLastChar = op.slice(0, -1); - if ((0, operator_node_js_1.isJSONOperator)(opWithoutLastChar)) { - return json_reference_node_js_1.JSONReferenceNode.create(referenceNode, json_path_node_js_1.JSONPathNode.create(operator_node_js_1.OperatorNode.create(opWithoutLastChar))); - } - throw new Error(`Invalid JSON operator: ${op}`); -} -function parseStringReference(ref) { - const COLUMN_SEPARATOR = '.'; - if (!ref.includes(COLUMN_SEPARATOR)) { - return reference_node_js_1.ReferenceNode.create(column_node_js_1.ColumnNode.create(ref)); - } - const parts = ref.split(COLUMN_SEPARATOR).map(trim); - if (parts.length === 3) { - return parseStringReferenceWithTableAndSchema(parts); - } - if (parts.length === 2) { - return parseStringReferenceWithTable(parts); - } - throw new Error(`invalid column reference ${ref}`); -} -function parseAliasedStringReference(ref) { - const ALIAS_SEPARATOR = ' as '; - if (ref.includes(ALIAS_SEPARATOR)) { - const [columnRef, alias] = ref.split(ALIAS_SEPARATOR).map(trim); - return alias_node_js_1.AliasNode.create(parseStringReference(columnRef), identifier_node_js_1.IdentifierNode.create(alias)); - } - else { - return parseStringReference(ref); - } -} -function parseColumnName(column) { - return column_node_js_1.ColumnNode.create(column); -} -function parseOrderedColumnName(column) { - const ORDER_SEPARATOR = ' '; - if (column.includes(ORDER_SEPARATOR)) { - const [columnName, order] = column.split(ORDER_SEPARATOR).map(trim); - if (!(0, order_by_parser_js_1.isOrderByDirection)(order)) { - throw new Error(`invalid order direction "${order}" next to "${columnName}"`); - } - return (0, order_by_parser_js_1.parseOrderBy)([columnName, order])[0]; - } - else { - return parseColumnName(column); - } -} -function parseStringReferenceWithTableAndSchema(parts) { - const [schema, table, column] = parts; - return reference_node_js_1.ReferenceNode.create(column_node_js_1.ColumnNode.create(column), table_node_js_1.TableNode.createWithSchema(schema, table)); -} -function parseStringReferenceWithTable(parts) { - const [table, column] = parts; - return reference_node_js_1.ReferenceNode.create(column_node_js_1.ColumnNode.create(column), table_node_js_1.TableNode.create(table)); -} -function trim(str) { - return str.trim(); -} diff --git a/node_modules/kysely/dist/cjs/parser/returning-parser.d.ts b/node_modules/kysely/dist/cjs/parser/returning-parser.d.ts deleted file mode 100644 index 49bfe53..0000000 --- a/node_modules/kysely/dist/cjs/parser/returning-parser.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { DeleteResult } from '../query-builder/delete-result.js'; -import type { InsertResult } from '../query-builder/insert-result.js'; -import type { MergeResult } from '../query-builder/merge-result.js'; -import type { UpdateResult } from '../query-builder/update-result.js'; -import type { Selection, AllSelection, CallbackSelection } from './select-parser.js'; -export type ReturningRow = O extends InsertResult | DeleteResult | UpdateResult | MergeResult ? Selection : O & Selection; -export type ReturningCallbackRow = O extends InsertResult | DeleteResult | UpdateResult | MergeResult ? CallbackSelection : O & CallbackSelection; -export type ReturningAllRow = O extends InsertResult | DeleteResult | UpdateResult | MergeResult ? AllSelection : O & AllSelection; diff --git a/node_modules/kysely/dist/cjs/parser/returning-parser.js b/node_modules/kysely/dist/cjs/parser/returning-parser.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/parser/returning-parser.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/parser/savepoint-parser.d.ts b/node_modules/kysely/dist/cjs/parser/savepoint-parser.d.ts deleted file mode 100644 index 6064e74..0000000 --- a/node_modules/kysely/dist/cjs/parser/savepoint-parser.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { RawNode } from '../operation-node/raw-node.js'; -export type RollbackToSavepoint = S extends [...infer L, infer R] ? R extends SN ? S : RollbackToSavepoint : never; -export type ReleaseSavepoint = S extends [...infer L, infer R] ? R extends SN ? L : ReleaseSavepoint : never; -export declare function parseSavepointCommand(command: string, savepointName: string): RawNode; diff --git a/node_modules/kysely/dist/cjs/parser/savepoint-parser.js b/node_modules/kysely/dist/cjs/parser/savepoint-parser.js deleted file mode 100644 index dab3933..0000000 --- a/node_modules/kysely/dist/cjs/parser/savepoint-parser.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseSavepointCommand = parseSavepointCommand; -const identifier_node_js_1 = require("../operation-node/identifier-node.js"); -const raw_node_js_1 = require("../operation-node/raw-node.js"); -function parseSavepointCommand(command, savepointName) { - return raw_node_js_1.RawNode.createWithChildren([ - raw_node_js_1.RawNode.createWithSql(`${command} `), - identifier_node_js_1.IdentifierNode.create(savepointName), // ensures savepointName gets sanitized - ]); -} diff --git a/node_modules/kysely/dist/cjs/parser/select-from-parser.d.ts b/node_modules/kysely/dist/cjs/parser/select-from-parser.d.ts deleted file mode 100644 index 130de4e..0000000 --- a/node_modules/kysely/dist/cjs/parser/select-from-parser.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { SelectQueryBuilder } from '../query-builder/select-query-builder.js'; -import type { ShallowRecord } from '../util/type-utils.js'; -import type { ExtractTableAlias, From, FromTables, TableExpressionOrList } from './table-parser.js'; -export type SelectFrom> = [TE] extends [keyof DB] ? SelectQueryBuilder, {}> : [ - TE -] extends [`${infer T} as ${infer A}`] ? T extends keyof DB ? SelectQueryBuilder, TB | A, {}> : never : TE extends ReadonlyArray ? SelectQueryBuilder, FromTables, {}> : SelectQueryBuilder, FromTables, {}>; diff --git a/node_modules/kysely/dist/cjs/parser/select-from-parser.js b/node_modules/kysely/dist/cjs/parser/select-from-parser.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/parser/select-from-parser.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/parser/select-parser.d.ts b/node_modules/kysely/dist/cjs/parser/select-parser.d.ts deleted file mode 100644 index 16a407a..0000000 --- a/node_modules/kysely/dist/cjs/parser/select-parser.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import type { AliasedSelectQueryBuilder } from '../query-builder/select-query-builder.js'; -import { SelectionNode } from '../operation-node/selection-node.js'; -import type { AnyAliasedColumn, AnyAliasedColumnWithTable, AnyColumn, AnyColumnWithTable, DrainOuterGeneric, ExtractColumnType } from '../util/type-utils.js'; -import { type DynamicReferenceBuilder } from '../dynamic/dynamic-reference-builder.js'; -import { type AliasedExpressionOrFactory } from './expression-parser.js'; -import type { SelectType } from '../util/column-type.js'; -import type { AliasedExpression } from '../expression/expression.js'; -import { type ExpressionBuilder } from '../expression/expression-builder.js'; -export type SelectExpression = AnyAliasedColumnWithTable | AnyAliasedColumn | AnyColumnWithTable | AnyColumn | DynamicReferenceBuilder | AliasedExpressionOrFactory; -export type SelectCallback = (eb: ExpressionBuilder) => ReadonlyArray>; -/** - * Turns a SelectExpression or a union of them into a selection object. - */ -export type Selection = [DB] extends [unknown] ? { - [E in FlattenSelectExpression as ExtractAliasFromSelectExpression]: SelectType>; -} : {}; -/** - * Turns a SelectCallback into a selection object. - */ -export type CallbackSelection = CB extends (eb: any) => ReadonlyArray ? Selection : never; -export type SelectArg> = SE | ReadonlyArray | ((eb: ExpressionBuilder) => ReadonlyArray); -type FlattenSelectExpression = SE extends DynamicReferenceBuilder ? { - [R in RA]: DynamicReferenceBuilder; -}[RA] : SE; -type ExtractAliasFromSelectExpression = SE extends string ? ExtractAliasFromStringSelectExpression : SE extends AliasedExpression ? EA : SE extends (qb: any) => AliasedExpression ? EA : SE extends DynamicReferenceBuilder ? ExtractAliasFromStringSelectExpression : never; -type ExtractAliasFromStringSelectExpression = SE extends `${string}.${string}.${string} as ${infer A}` ? A : SE extends `${string}.${string} as ${infer A}` ? A : SE extends `${string} as ${infer A}` ? A : SE extends `${string}.${string}.${infer C}` ? C : SE extends `${string}.${infer C}` ? C : SE; -type ExtractTypeFromSelectExpression = SE extends string ? ExtractTypeFromStringSelectExpression : SE extends AliasedSelectQueryBuilder ? O[keyof O] | null : SE extends (eb: any) => AliasedSelectQueryBuilder ? O[keyof O] | null : SE extends AliasedExpression ? O : SE extends (eb: any) => AliasedExpression ? O : SE extends DynamicReferenceBuilder ? ExtractTypeFromStringSelectExpression | undefined : never; -type ExtractTypeFromStringSelectExpression = SE extends `${infer SC}.${infer T}.${infer C} as ${string}` ? `${SC}.${T}` extends TB ? C extends keyof DB[`${SC}.${T}`] ? DB[`${SC}.${T}`][C] : never : never : SE extends `${infer T}.${infer C} as ${string}` ? T extends TB ? C extends keyof DB[T] ? DB[T][C] : never : never : SE extends `${infer C} as ${string}` ? C extends AnyColumn ? ExtractColumnType : never : SE extends `${infer SC}.${infer T}.${infer C}` ? `${SC}.${T}` extends TB ? C extends keyof DB[`${SC}.${T}`] ? DB[`${SC}.${T}`][C] : never : never : SE extends `${infer T}.${infer C}` ? T extends TB ? C extends keyof DB[T] ? DB[T][C] : never : never : SE extends AnyColumn ? ExtractColumnType : never; -export type AllSelection = DrainOuterGeneric<{ - [C in AnyColumn]: { - [T in TB]: SelectType; - }[TB]; -}>; -export declare function parseSelectArg(selection: SelectArg>): SelectionNode[]; -export declare function parseSelectAll(table?: string | string[]): SelectionNode[]; -export {}; diff --git a/node_modules/kysely/dist/cjs/parser/select-parser.js b/node_modules/kysely/dist/cjs/parser/select-parser.js deleted file mode 100644 index 5506e0e..0000000 --- a/node_modules/kysely/dist/cjs/parser/select-parser.js +++ /dev/null @@ -1,50 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseSelectArg = parseSelectArg; -exports.parseSelectAll = parseSelectAll; -const object_utils_js_1 = require("../util/object-utils.js"); -const selection_node_js_1 = require("../operation-node/selection-node.js"); -const reference_parser_js_1 = require("./reference-parser.js"); -const dynamic_reference_builder_js_1 = require("../dynamic/dynamic-reference-builder.js"); -const expression_parser_js_1 = require("./expression-parser.js"); -const table_parser_js_1 = require("./table-parser.js"); -const expression_builder_js_1 = require("../expression/expression-builder.js"); -function parseSelectArg(selection) { - if ((0, object_utils_js_1.isFunction)(selection)) { - return parseSelectArg(selection((0, expression_builder_js_1.expressionBuilder)())); - } - else if ((0, object_utils_js_1.isReadonlyArray)(selection)) { - return selection.map((it) => parseSelectExpression(it)); - } - else { - return [parseSelectExpression(selection)]; - } -} -function parseSelectExpression(selection) { - if ((0, object_utils_js_1.isString)(selection)) { - return selection_node_js_1.SelectionNode.create((0, reference_parser_js_1.parseAliasedStringReference)(selection)); - } - else if ((0, dynamic_reference_builder_js_1.isDynamicReferenceBuilder)(selection)) { - return selection_node_js_1.SelectionNode.create(selection.toOperationNode()); - } - else { - return selection_node_js_1.SelectionNode.create((0, expression_parser_js_1.parseAliasedExpression)(selection)); - } -} -function parseSelectAll(table) { - if (!table) { - return [selection_node_js_1.SelectionNode.createSelectAll()]; - } - else if (Array.isArray(table)) { - return table.map(parseSelectAllArg); - } - else { - return [parseSelectAllArg(table)]; - } -} -function parseSelectAllArg(table) { - if ((0, object_utils_js_1.isString)(table)) { - return selection_node_js_1.SelectionNode.createSelectAllFromTable((0, table_parser_js_1.parseTable)(table)); - } - throw new Error(`invalid value selectAll expression: ${JSON.stringify(table)}`); -} diff --git a/node_modules/kysely/dist/cjs/parser/set-operation-parser.d.ts b/node_modules/kysely/dist/cjs/parser/set-operation-parser.d.ts deleted file mode 100644 index cdb3d72..0000000 --- a/node_modules/kysely/dist/cjs/parser/set-operation-parser.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { type ExpressionBuilder } from '../expression/expression-builder.js'; -import type { Expression } from '../expression/expression.js'; -import { type SetOperator, SetOperationNode } from '../operation-node/set-operation-node.js'; -export type SetOperandExpression = Expression | ReadonlyArray> | ((eb: ExpressionBuilder) => Expression | ReadonlyArray>); -export declare function parseSetOperations(operator: SetOperator, expression: SetOperandExpression, all: boolean): Readonly[]; diff --git a/node_modules/kysely/dist/cjs/parser/set-operation-parser.js b/node_modules/kysely/dist/cjs/parser/set-operation-parser.js deleted file mode 100644 index 8d197bd..0000000 --- a/node_modules/kysely/dist/cjs/parser/set-operation-parser.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseSetOperations = parseSetOperations; -const expression_builder_js_1 = require("../expression/expression-builder.js"); -const set_operation_node_js_1 = require("../operation-node/set-operation-node.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -const expression_parser_js_1 = require("./expression-parser.js"); -function parseSetOperations(operator, expression, all) { - if ((0, object_utils_js_1.isFunction)(expression)) { - expression = expression((0, expression_builder_js_1.createExpressionBuilder)()); - } - if (!(0, object_utils_js_1.isReadonlyArray)(expression)) { - expression = [expression]; - } - return expression.map((expr) => set_operation_node_js_1.SetOperationNode.create(operator, (0, expression_parser_js_1.parseExpression)(expr), all)); -} diff --git a/node_modules/kysely/dist/cjs/parser/table-parser.d.ts b/node_modules/kysely/dist/cjs/parser/table-parser.d.ts deleted file mode 100644 index ccfd057..0000000 --- a/node_modules/kysely/dist/cjs/parser/table-parser.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { AliasNode } from '../operation-node/alias-node.js'; -import { TableNode } from '../operation-node/table-node.js'; -import { type AliasedExpressionOrFactory } from './expression-parser.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -import type { AliasedExpression } from '../expression/expression.js'; -import type { DrainOuterGeneric } from '../util/type-utils.js'; -import { type AliasedDynamicTableBuilder } from '../dynamic/dynamic-table-builder.js'; -export type TableExpression = AnyAliasedTable | AnyTable | AliasedExpressionOrFactory | AliasedDynamicTableBuilder; -export type TableExpressionOrList = TableExpression | ReadonlyArray>; -export type SimpleTableReference = AnyAliasedTable | AnyTable; -export type AnyAliasedTable = `${AnyTable} as ${string}`; -export type AnyTable = keyof DB & string; -export type From = DrainOuterGeneric<{ - [C in keyof DB | ExtractAliasFromTableExpression]: C extends ExtractAliasFromTableExpression ? ExtractRowTypeFromTableExpression : C extends keyof DB ? DB[C] : never; -}>; -export type FromTables = DrainOuterGeneric>; -export type ExtractTableAlias = TE extends `${string} as ${infer TA}` ? TA extends keyof DB ? TA : never : TE extends keyof DB ? TE : never; -type ExtractAliasFromTableExpression = TE extends string ? TE extends `${string} as ${infer TA}` ? TA : TE extends keyof DB ? TE : never : TE extends AliasedExpression ? QA : TE extends (qb: any) => AliasedExpression ? QA : TE extends AliasedDynamicTableBuilder ? DA : never; -type ExtractRowTypeFromTableExpression = TE extends `${infer T} as ${infer TA}` ? TA extends A ? T extends keyof DB ? DB[T] : never : never : TE extends A ? TE extends keyof DB ? DB[TE] : never : TE extends AliasedExpression ? QA extends A ? O : never : TE extends (qb: any) => AliasedExpression ? QA extends A ? O : never : TE extends AliasedDynamicTableBuilder ? DA extends A ? T extends keyof DB ? DB[T] : never : never : never; -export declare function parseTableExpressionOrList(table: TableExpressionOrList): OperationNode[]; -export declare function parseTableExpression(table: TableExpression): OperationNode; -export declare function parseAliasedTable(from: string): TableNode | AliasNode; -export declare function parseTable(from: string): TableNode; -export {}; diff --git a/node_modules/kysely/dist/cjs/parser/table-parser.js b/node_modules/kysely/dist/cjs/parser/table-parser.js deleted file mode 100644 index d782db5..0000000 --- a/node_modules/kysely/dist/cjs/parser/table-parser.js +++ /dev/null @@ -1,54 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseTableExpressionOrList = parseTableExpressionOrList; -exports.parseTableExpression = parseTableExpression; -exports.parseAliasedTable = parseAliasedTable; -exports.parseTable = parseTable; -const object_utils_js_1 = require("../util/object-utils.js"); -const alias_node_js_1 = require("../operation-node/alias-node.js"); -const table_node_js_1 = require("../operation-node/table-node.js"); -const expression_parser_js_1 = require("./expression-parser.js"); -const identifier_node_js_1 = require("../operation-node/identifier-node.js"); -const dynamic_table_builder_js_1 = require("../dynamic/dynamic-table-builder.js"); -function parseTableExpressionOrList(table) { - if ((0, object_utils_js_1.isReadonlyArray)(table)) { - return table.map((it) => parseTableExpression(it)); - } - else { - return [parseTableExpression(table)]; - } -} -function parseTableExpression(table) { - if ((0, object_utils_js_1.isString)(table)) { - return parseAliasedTable(table); - } - else if ((0, dynamic_table_builder_js_1.isAliasedDynamicTableBuilder)(table)) { - return table.toOperationNode(); - } - else { - return (0, expression_parser_js_1.parseAliasedExpression)(table); - } -} -function parseAliasedTable(from) { - const ALIAS_SEPARATOR = ' as '; - if (from.includes(ALIAS_SEPARATOR)) { - const [table, alias] = from.split(ALIAS_SEPARATOR).map(trim); - return alias_node_js_1.AliasNode.create(parseTable(table), identifier_node_js_1.IdentifierNode.create(alias)); - } - else { - return parseTable(from); - } -} -function parseTable(from) { - const SCHEMA_SEPARATOR = '.'; - if (from.includes(SCHEMA_SEPARATOR)) { - const [schema, table] = from.split(SCHEMA_SEPARATOR).map(trim); - return table_node_js_1.TableNode.createWithSchema(schema, table); - } - else { - return table_node_js_1.TableNode.create(from); - } -} -function trim(str) { - return str.trim(); -} diff --git a/node_modules/kysely/dist/cjs/parser/top-parser.d.ts b/node_modules/kysely/dist/cjs/parser/top-parser.d.ts deleted file mode 100644 index e8946df..0000000 --- a/node_modules/kysely/dist/cjs/parser/top-parser.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { type TopModifier, TopNode } from '../operation-node/top-node.js'; -export declare function parseTop(expression: number | bigint, modifiers?: TopModifier): TopNode; diff --git a/node_modules/kysely/dist/cjs/parser/top-parser.js b/node_modules/kysely/dist/cjs/parser/top-parser.js deleted file mode 100644 index e776056..0000000 --- a/node_modules/kysely/dist/cjs/parser/top-parser.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseTop = parseTop; -const top_node_js_1 = require("../operation-node/top-node.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -function parseTop(expression, modifiers) { - if (!(0, object_utils_js_1.isNumber)(expression) && !(0, object_utils_js_1.isBigInt)(expression)) { - throw new Error(`Invalid top expression: ${expression}`); - } - if (!(0, object_utils_js_1.isUndefined)(modifiers) && !isTopModifiers(modifiers)) { - throw new Error(`Invalid top modifiers: ${modifiers}`); - } - return top_node_js_1.TopNode.create(expression, modifiers); -} -function isTopModifiers(modifiers) { - return (modifiers === 'percent' || - modifiers === 'with ties' || - modifiers === 'percent with ties'); -} diff --git a/node_modules/kysely/dist/cjs/parser/tuple-parser.d.ts b/node_modules/kysely/dist/cjs/parser/tuple-parser.d.ts deleted file mode 100644 index 127c14a..0000000 --- a/node_modules/kysely/dist/cjs/parser/tuple-parser.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -import type { DrainOuterGeneric } from '../util/type-utils.js'; -import type { ExtractTypeFromReferenceExpression } from './reference-parser.js'; -import type { ExtractTypeFromValueExpression } from './value-parser.js'; -export type RefTuple2 = DrainOuterGeneric<[ - ExtractTypeFromReferenceExpression, - ExtractTypeFromReferenceExpression -]>; -export type RefTuple3 = DrainOuterGeneric<[ - ExtractTypeFromReferenceExpression, - ExtractTypeFromReferenceExpression, - ExtractTypeFromReferenceExpression -]>; -export type RefTuple4 = DrainOuterGeneric<[ - ExtractTypeFromReferenceExpression, - ExtractTypeFromReferenceExpression, - ExtractTypeFromReferenceExpression, - ExtractTypeFromReferenceExpression -]>; -export type RefTuple5 = DrainOuterGeneric<[ - ExtractTypeFromReferenceExpression, - ExtractTypeFromReferenceExpression, - ExtractTypeFromReferenceExpression, - ExtractTypeFromReferenceExpression, - ExtractTypeFromReferenceExpression -]>; -export type ValTuple2 = DrainOuterGeneric<[ - ExtractTypeFromValueExpression, - ExtractTypeFromValueExpression -]>; -export type ValTuple3 = DrainOuterGeneric<[ - ExtractTypeFromValueExpression, - ExtractTypeFromValueExpression, - ExtractTypeFromValueExpression -]>; -export type ValTuple4 = DrainOuterGeneric<[ - ExtractTypeFromValueExpression, - ExtractTypeFromValueExpression, - ExtractTypeFromValueExpression, - ExtractTypeFromValueExpression -]>; -export type ValTuple5 = DrainOuterGeneric<[ - ExtractTypeFromValueExpression, - ExtractTypeFromValueExpression, - ExtractTypeFromValueExpression, - ExtractTypeFromValueExpression, - ExtractTypeFromValueExpression -]>; diff --git a/node_modules/kysely/dist/cjs/parser/tuple-parser.js b/node_modules/kysely/dist/cjs/parser/tuple-parser.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/parser/tuple-parser.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/parser/unary-operation-parser.d.ts b/node_modules/kysely/dist/cjs/parser/unary-operation-parser.d.ts deleted file mode 100644 index 9fc1d0b..0000000 --- a/node_modules/kysely/dist/cjs/parser/unary-operation-parser.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { type UnaryOperator } from '../operation-node/operator-node.js'; -import { UnaryOperationNode } from '../operation-node/unary-operation-node.js'; -import type { ExpressionOrFactory } from './expression-parser.js'; -import { type ReferenceExpression } from './reference-parser.js'; -export type ExistsExpression = ExpressionOrFactory; -export declare function parseExists(operand: ExistsExpression): UnaryOperationNode; -export declare function parseNotExists(operand: ExistsExpression): UnaryOperationNode; -export declare function parseUnaryOperation(operator: UnaryOperator, operand: ReferenceExpression): UnaryOperationNode; diff --git a/node_modules/kysely/dist/cjs/parser/unary-operation-parser.js b/node_modules/kysely/dist/cjs/parser/unary-operation-parser.js deleted file mode 100644 index 1d38f7f..0000000 --- a/node_modules/kysely/dist/cjs/parser/unary-operation-parser.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseExists = parseExists; -exports.parseNotExists = parseNotExists; -exports.parseUnaryOperation = parseUnaryOperation; -const operator_node_js_1 = require("../operation-node/operator-node.js"); -const unary_operation_node_js_1 = require("../operation-node/unary-operation-node.js"); -const reference_parser_js_1 = require("./reference-parser.js"); -function parseExists(operand) { - return parseUnaryOperation('exists', operand); -} -function parseNotExists(operand) { - return parseUnaryOperation('not exists', operand); -} -function parseUnaryOperation(operator, operand) { - return unary_operation_node_js_1.UnaryOperationNode.create(operator_node_js_1.OperatorNode.create(operator), (0, reference_parser_js_1.parseReferenceExpression)(operand)); -} diff --git a/node_modules/kysely/dist/cjs/parser/update-parser.d.ts b/node_modules/kysely/dist/cjs/parser/update-parser.d.ts deleted file mode 100644 index 4613e2e..0000000 --- a/node_modules/kysely/dist/cjs/parser/update-parser.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { UpdateQueryBuilder } from '../query-builder/update-query-builder.js'; -import type { UpdateResult } from '../query-builder/update-result.js'; -import type { ShallowRecord } from '../util/type-utils.js'; -import type { ExtractTableAlias, From, FromTables, TableExpressionOrList } from './table-parser.js'; -export type UpdateTable> = [ - TE -] extends [keyof DB] ? UpdateQueryBuilder, ExtractTableAlias, UpdateResult> : [ - TE -] extends [`${infer T} as ${infer A}`] ? T extends keyof DB ? UpdateQueryBuilder, A, A, UpdateResult> : never : TE extends ReadonlyArray ? UpdateQueryBuilder, FromTables, FromTables, UpdateResult> : UpdateQueryBuilder, FromTables, FromTables, UpdateResult>; diff --git a/node_modules/kysely/dist/cjs/parser/update-parser.js b/node_modules/kysely/dist/cjs/parser/update-parser.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/parser/update-parser.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/parser/update-set-parser.d.ts b/node_modules/kysely/dist/cjs/parser/update-set-parser.d.ts deleted file mode 100644 index 967f93c..0000000 --- a/node_modules/kysely/dist/cjs/parser/update-set-parser.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { ColumnUpdateNode } from '../operation-node/column-update-node.js'; -import { type ExpressionBuilder } from '../expression/expression-builder.js'; -import type { UpdateType } from '../util/column-type.js'; -import { type ValueExpression } from './value-parser.js'; -import { type ExtractRawTypeFromReferenceExpression, type ReferenceExpression } from './reference-parser.js'; -import type { AnyColumn, DrainOuterGeneric } from '../util/type-utils.js'; -export type UpdateObject = DrainOuterGeneric<{ - [C in AnyColumn]?: { - [T in UT]: C extends keyof DB[T] ? ValueExpression> | undefined : never; - }[UT]; -}>; -export type UpdateObjectFactory = (eb: ExpressionBuilder) => UpdateObject; -export type UpdateObjectExpression = UpdateObject | UpdateObjectFactory; -export type ExtractUpdateTypeFromReferenceExpression = UpdateType>; -export declare function parseUpdate(...args: [UpdateObjectExpression] | [ReferenceExpression, ValueExpression]): ReadonlyArray; -export declare function parseUpdateObjectExpression(update: UpdateObjectExpression): ReadonlyArray; diff --git a/node_modules/kysely/dist/cjs/parser/update-set-parser.js b/node_modules/kysely/dist/cjs/parser/update-set-parser.js deleted file mode 100644 index cfde30c..0000000 --- a/node_modules/kysely/dist/cjs/parser/update-set-parser.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseUpdate = parseUpdate; -exports.parseUpdateObjectExpression = parseUpdateObjectExpression; -const column_node_js_1 = require("../operation-node/column-node.js"); -const column_update_node_js_1 = require("../operation-node/column-update-node.js"); -const expression_builder_js_1 = require("../expression/expression-builder.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -const value_parser_js_1 = require("./value-parser.js"); -const reference_parser_js_1 = require("./reference-parser.js"); -function parseUpdate(...args) { - if (args.length === 2) { - return [ - column_update_node_js_1.ColumnUpdateNode.create((0, reference_parser_js_1.parseReferenceExpression)(args[0]), (0, value_parser_js_1.parseValueExpression)(args[1])), - ]; - } - return parseUpdateObjectExpression(args[0]); -} -function parseUpdateObjectExpression(update) { - const updateObj = (0, object_utils_js_1.isFunction)(update) ? update((0, expression_builder_js_1.expressionBuilder)()) : update; - return Object.entries(updateObj) - .filter(([_, value]) => value !== undefined) - .map(([key, value]) => { - return column_update_node_js_1.ColumnUpdateNode.create(column_node_js_1.ColumnNode.create(key), (0, value_parser_js_1.parseValueExpression)(value)); - }); -} diff --git a/node_modules/kysely/dist/cjs/parser/value-parser.d.ts b/node_modules/kysely/dist/cjs/parser/value-parser.d.ts deleted file mode 100644 index 00c6d27..0000000 --- a/node_modules/kysely/dist/cjs/parser/value-parser.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { ValueNode } from '../operation-node/value-node.js'; -import { type ExpressionOrFactory } from './expression-parser.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -import type { Expression } from '../expression/expression.js'; -import type { SelectQueryBuilderExpression } from '../query-builder/select-query-builder-expression.js'; -export type ValueExpression = V | ExpressionOrFactory; -export type ValueExpressionOrList = ValueExpression | ReadonlyArray>; -export type ExtractTypeFromValueExpressionOrList = VE extends ReadonlyArray ? ExtractTypeFromValueExpression : ExtractTypeFromValueExpression; -export type ExtractTypeFromValueExpression = VE extends SelectQueryBuilderExpression> ? SV : VE extends Expression ? V : VE; -export declare function parseValueExpressionOrList(arg: ValueExpressionOrList): OperationNode; -export declare function parseValueExpression(exp: ValueExpression): OperationNode; -export declare function isSafeImmediateValue(value: unknown): value is number | boolean | null; -export declare function parseSafeImmediateValue(value: number | boolean | null): ValueNode; diff --git a/node_modules/kysely/dist/cjs/parser/value-parser.js b/node_modules/kysely/dist/cjs/parser/value-parser.js deleted file mode 100644 index 1640134..0000000 --- a/node_modules/kysely/dist/cjs/parser/value-parser.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseValueExpressionOrList = parseValueExpressionOrList; -exports.parseValueExpression = parseValueExpression; -exports.isSafeImmediateValue = isSafeImmediateValue; -exports.parseSafeImmediateValue = parseSafeImmediateValue; -const primitive_value_list_node_js_1 = require("../operation-node/primitive-value-list-node.js"); -const value_list_node_js_1 = require("../operation-node/value-list-node.js"); -const value_node_js_1 = require("../operation-node/value-node.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -const expression_parser_js_1 = require("./expression-parser.js"); -function parseValueExpressionOrList(arg) { - if ((0, object_utils_js_1.isReadonlyArray)(arg)) { - return parseValueExpressionList(arg); - } - return parseValueExpression(arg); -} -function parseValueExpression(exp) { - if ((0, expression_parser_js_1.isExpressionOrFactory)(exp)) { - return (0, expression_parser_js_1.parseExpression)(exp); - } - return value_node_js_1.ValueNode.create(exp); -} -function isSafeImmediateValue(value) { - return (0, object_utils_js_1.isNumber)(value) || (0, object_utils_js_1.isBoolean)(value) || (0, object_utils_js_1.isNull)(value); -} -function parseSafeImmediateValue(value) { - if (!isSafeImmediateValue(value)) { - throw new Error(`unsafe immediate value ${JSON.stringify(value)}`); - } - return value_node_js_1.ValueNode.createImmediate(value); -} -function parseValueExpressionList(arg) { - if (arg.some(expression_parser_js_1.isExpressionOrFactory)) { - return value_list_node_js_1.ValueListNode.create(arg.map((it) => parseValueExpression(it))); - } - return primitive_value_list_node_js_1.PrimitiveValueListNode.create(arg); -} diff --git a/node_modules/kysely/dist/cjs/parser/with-parser.d.ts b/node_modules/kysely/dist/cjs/parser/with-parser.d.ts deleted file mode 100644 index e3a54b5..0000000 --- a/node_modules/kysely/dist/cjs/parser/with-parser.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import type { UpdateQueryBuilder } from '../query-builder/update-query-builder.js'; -import type { DeleteQueryBuilder } from '../query-builder/delete-query-builder.js'; -import type { InsertQueryBuilder } from '../query-builder/insert-query-builder.js'; -import type { QueryCreator } from '../query-creator.js'; -import type { Expression } from '../expression/expression.js'; -import type { ShallowRecord } from '../util/type-utils.js'; -import { type CTEBuilderCallback } from '../query-builder/cte-builder.js'; -import { CommonTableExpressionNode } from '../operation-node/common-table-expression-node.js'; -export type CommonTableExpression = (creator: QueryCreator) => CommonTableExpressionOutput; -export type RecursiveCommonTableExpression = (creator: QueryCreator]: ExtractRowFromCommonTableExpressionName; -}>) => CommonTableExpressionOutput; -export type QueryCreatorWithCommonTableExpression = QueryCreator]: ExtractRowFromCommonTableExpression; -}>; -type CommonTableExpressionOutput = Expression> | InsertQueryBuilder> | UpdateQueryBuilder> | DeleteQueryBuilder>; -/** - * Given a common CommonTableExpression CTE extracts the row type from it. - * - * For example a CTE `(db) => db.selectFrom('person').select(['id', 'first_name'])` - * would result in `Pick`. - */ -type ExtractRowFromCommonTableExpression = CTE extends (creator: QueryCreator) => infer Q ? Q extends Expression ? QO : Q extends InsertQueryBuilder ? QO : Q extends UpdateQueryBuilder ? QO : Q extends DeleteQueryBuilder ? QO : never : never; -/** - * Extracts 'person' from a string like 'person(id, first_name)'. - */ -type ExtractTableFromCommonTableExpressionName = CN extends `${infer TB}(${string})` ? TB : CN; -/** - * Parses a string like 'person(id, first_name)' into a type: - * - * { - * id: any, - * first_name: any - * } - * - */ -type ExtractRowFromCommonTableExpressionName = CN extends `${string}(${infer CL})` ? { - [C in ExtractColumnNamesFromColumnList]: any; -} : ShallowRecord; -/** - * Parses a string like 'id, first_name' into a type 'id' | 'first_name' - */ -type ExtractColumnNamesFromColumnList = R extends `${infer C}, ${infer RS}` ? C | ExtractColumnNamesFromColumnList : R; -export declare function parseCommonTableExpression(nameOrBuilderCallback: string | CTEBuilderCallback, expression: CommonTableExpression): CommonTableExpressionNode; -export {}; diff --git a/node_modules/kysely/dist/cjs/parser/with-parser.js b/node_modules/kysely/dist/cjs/parser/with-parser.js deleted file mode 100644 index e62005d..0000000 --- a/node_modules/kysely/dist/cjs/parser/with-parser.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseCommonTableExpression = parseCommonTableExpression; -const common_table_expression_name_node_js_1 = require("../operation-node/common-table-expression-name-node.js"); -const parse_utils_js_1 = require("./parse-utils.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -const cte_builder_js_1 = require("../query-builder/cte-builder.js"); -const common_table_expression_node_js_1 = require("../operation-node/common-table-expression-node.js"); -function parseCommonTableExpression(nameOrBuilderCallback, expression) { - const expressionNode = expression((0, parse_utils_js_1.createQueryCreator)()).toOperationNode(); - if ((0, object_utils_js_1.isFunction)(nameOrBuilderCallback)) { - return nameOrBuilderCallback(cteBuilderFactory(expressionNode)).toOperationNode(); - } - return common_table_expression_node_js_1.CommonTableExpressionNode.create(parseCommonTableExpressionName(nameOrBuilderCallback), expressionNode); -} -function cteBuilderFactory(expressionNode) { - return (name) => { - return new cte_builder_js_1.CTEBuilder({ - node: common_table_expression_node_js_1.CommonTableExpressionNode.create(parseCommonTableExpressionName(name), expressionNode), - }); - }; -} -function parseCommonTableExpressionName(name) { - if (name.includes('(')) { - const parts = name.split(/[\(\)]/); - const table = parts[0]; - const columns = parts[1].split(',').map((it) => it.trim()); - return common_table_expression_name_node_js_1.CommonTableExpressionNameNode.create(table, columns); - } - else { - return common_table_expression_name_node_js_1.CommonTableExpressionNameNode.create(name); - } -} diff --git a/node_modules/kysely/dist/cjs/plugin/camel-case/camel-case-plugin.d.ts b/node_modules/kysely/dist/cjs/plugin/camel-case/camel-case-plugin.d.ts deleted file mode 100644 index 89da711..0000000 --- a/node_modules/kysely/dist/cjs/plugin/camel-case/camel-case-plugin.d.ts +++ /dev/null @@ -1,170 +0,0 @@ -import type { QueryResult } from '../../driver/database-connection.js'; -import type { RootOperationNode } from '../../query-compiler/query-compiler.js'; -import type { UnknownRow } from '../../util/type-utils.js'; -import type { KyselyPlugin, PluginTransformQueryArgs, PluginTransformResultArgs } from '../kysely-plugin.js'; -export interface CamelCasePluginOptions { - /** - * If true, camelCase is transformed into upper case SNAKE_CASE. - * For example `fooBar => FOO_BAR` and `FOO_BAR => fooBar` - * - * Defaults to false. - */ - upperCase?: boolean; - /** - * If true, an underscore is added before each digit when converting - * camelCase to snake_case. For example `foo12Bar => foo_12_bar` and - * `foo_12_bar => foo12Bar` - * - * Defaults to false. - */ - underscoreBeforeDigits?: boolean; - /** - * If true, an underscore is added between consecutive upper case - * letters when converting from camelCase to snake_case. For example - * `fooBAR => foo_b_a_r` and `foo_b_a_r => fooBAR`. - * - * Defaults to false. - */ - underscoreBetweenUppercaseLetters?: boolean; - /** - * If true, nested object's keys will not be converted to camel case. - * - * Defaults to false. - */ - maintainNestedObjectKeys?: boolean; -} -/** - * A plugin that converts snake_case identifiers in the database into - * camelCase in the JavaScript side. - * - * For example let's assume we have a table called `person_table` - * with columns `first_name` and `last_name` in the database. When - * using `CamelCasePlugin` we would setup Kysely like this: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { CamelCasePlugin, Kysely, SqliteDialect } from 'kysely' - * - * interface CamelCasedDatabase { - * userMetadata: { - * firstName: string - * lastName: string - * } - * } - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }), - * plugins: [new CamelCasePlugin()], - * }) - * - * const person = await db.selectFrom('userMetadata') - * .where('firstName', '=', 'Arnold') - * .select(['firstName', 'lastName']) - * .executeTakeFirst() - * - * if (person) { - * console.log(person.firstName) - * } - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select "first_name", "last_name" from "user_metadata" where "first_name" = ? - * ``` - * - * As you can see from the example, __everything__ needs to be defined - * in camelCase in the TypeScript code: table names, columns, schemas, - * __everything__. When using the `CamelCasePlugin` Kysely works as if - * the database was defined in camelCase. - * - * There are various options you can give to the plugin to modify - * the way identifiers are converted. See {@link CamelCasePluginOptions}. - * If those options are not enough, you can override this plugin's - * `snakeCase` and `camelCase` methods to make the conversion exactly - * the way you like: - * - * ```ts - * class MyCamelCasePlugin extends CamelCasePlugin { - * protected override snakeCase(str: string): string { - * // ... - * - * return str - * } - * - * protected override camelCase(str: string): string { - * // ... - * - * return str - * } - * } - * ``` - */ -export declare class CamelCasePlugin implements KyselyPlugin { - #private; - readonly opt: CamelCasePluginOptions; - constructor(opt?: CamelCasePluginOptions); - /** - * This is called for each query before it is executed. You can modify the query by - * transforming its {@link OperationNode} tree provided in {@link PluginTransformQueryArgs.node | args.node} - * and returning the transformed tree. You'd usually want to use an {@link OperationNodeTransformer} - * for this. - * - * If you need to pass some query-related data between this method and `transformResult` you - * can use a `WeakMap` with {@link PluginTransformQueryArgs.queryId | args.queryId} as the key: - * - * ```ts - * import type { - * KyselyPlugin, - * QueryResult, - * RootOperationNode, - * UnknownRow - * } from 'kysely' - * - * interface MyData { - * // ... - * } - * const data = new WeakMap() - * - * const plugin = { - * transformQuery(args: PluginTransformQueryArgs): RootOperationNode { - * const something: MyData = {} - * - * // ... - * - * data.set(args.queryId, something) - * - * // ... - * - * return args.node - * }, - * - * async transformResult(args: PluginTransformResultArgs): Promise> { - * // ... - * - * const something = data.get(args.queryId) - * - * // ... - * - * return args.result - * } - * } satisfies KyselyPlugin - * ``` - * - * You should use a `WeakMap` instead of a `Map` or some other strong references because `transformQuery` - * is not always matched by a call to `transformResult` which would leave orphaned items in the map - * and cause a memory leak. - */ - transformQuery(args: PluginTransformQueryArgs): RootOperationNode; - /** - * This method is called for each query after it has been executed. The result - * of the query can be accessed through {@link PluginTransformResultArgs.result | args.result}. - * You can modify the result and return the modifier result. - */ - transformResult(args: PluginTransformResultArgs): Promise>; - protected mapRow(row: UnknownRow): UnknownRow; - protected snakeCase(str: string): string; - protected camelCase(str: string): string; -} diff --git a/node_modules/kysely/dist/cjs/plugin/camel-case/camel-case-plugin.js b/node_modules/kysely/dist/cjs/plugin/camel-case/camel-case-plugin.js deleted file mode 100644 index 1774435..0000000 --- a/node_modules/kysely/dist/cjs/plugin/camel-case/camel-case-plugin.js +++ /dev/null @@ -1,122 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CamelCasePlugin = void 0; -const object_utils_js_1 = require("../../util/object-utils.js"); -const camel_case_transformer_js_1 = require("./camel-case-transformer.js"); -const camel_case_js_1 = require("./camel-case.js"); -/** - * A plugin that converts snake_case identifiers in the database into - * camelCase in the JavaScript side. - * - * For example let's assume we have a table called `person_table` - * with columns `first_name` and `last_name` in the database. When - * using `CamelCasePlugin` we would setup Kysely like this: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { CamelCasePlugin, Kysely, SqliteDialect } from 'kysely' - * - * interface CamelCasedDatabase { - * userMetadata: { - * firstName: string - * lastName: string - * } - * } - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }), - * plugins: [new CamelCasePlugin()], - * }) - * - * const person = await db.selectFrom('userMetadata') - * .where('firstName', '=', 'Arnold') - * .select(['firstName', 'lastName']) - * .executeTakeFirst() - * - * if (person) { - * console.log(person.firstName) - * } - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select "first_name", "last_name" from "user_metadata" where "first_name" = ? - * ``` - * - * As you can see from the example, __everything__ needs to be defined - * in camelCase in the TypeScript code: table names, columns, schemas, - * __everything__. When using the `CamelCasePlugin` Kysely works as if - * the database was defined in camelCase. - * - * There are various options you can give to the plugin to modify - * the way identifiers are converted. See {@link CamelCasePluginOptions}. - * If those options are not enough, you can override this plugin's - * `snakeCase` and `camelCase` methods to make the conversion exactly - * the way you like: - * - * ```ts - * class MyCamelCasePlugin extends CamelCasePlugin { - * protected override snakeCase(str: string): string { - * // ... - * - * return str - * } - * - * protected override camelCase(str: string): string { - * // ... - * - * return str - * } - * } - * ``` - */ -class CamelCasePlugin { - opt; - #camelCase; - #snakeCase; - #snakeCaseTransformer; - constructor(opt = {}) { - this.opt = opt; - this.#camelCase = (0, camel_case_js_1.createCamelCaseMapper)(opt); - this.#snakeCase = (0, camel_case_js_1.createSnakeCaseMapper)(opt); - this.#snakeCaseTransformer = new camel_case_transformer_js_1.SnakeCaseTransformer(this.snakeCase.bind(this)); - } - transformQuery(args) { - return this.#snakeCaseTransformer.transformNode(args.node, args.queryId); - } - async transformResult(args) { - if (args.result.rows && Array.isArray(args.result.rows)) { - return { - ...args.result, - rows: args.result.rows.map((row) => this.mapRow(row)), - }; - } - return args.result; - } - mapRow(row) { - return Object.keys(row).reduce((obj, key) => { - let value = row[key]; - if (Array.isArray(value)) { - value = value.map((it) => (canMap(it, this.opt) ? this.mapRow(it) : it)); - } - else if (canMap(value, this.opt)) { - value = this.mapRow(value); - } - obj[this.camelCase(key)] = value; - return obj; - }, {}); - } - snakeCase(str) { - return this.#snakeCase(str); - } - camelCase(str) { - return this.#camelCase(str); - } -} -exports.CamelCasePlugin = CamelCasePlugin; -function canMap(obj, opt) { - return (0, object_utils_js_1.isPlainObject)(obj) && !opt?.maintainNestedObjectKeys; -} diff --git a/node_modules/kysely/dist/cjs/plugin/camel-case/camel-case-transformer.d.ts b/node_modules/kysely/dist/cjs/plugin/camel-case/camel-case-transformer.d.ts deleted file mode 100644 index b26cc86..0000000 --- a/node_modules/kysely/dist/cjs/plugin/camel-case/camel-case-transformer.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { IdentifierNode } from '../../operation-node/identifier-node.js'; -import { OperationNodeTransformer } from '../../operation-node/operation-node-transformer.js'; -import type { QueryId } from '../../util/query-id.js'; -import type { StringMapper } from './camel-case.js'; -export declare class SnakeCaseTransformer extends OperationNodeTransformer { - #private; - constructor(snakeCase: StringMapper); - protected transformIdentifier(node: IdentifierNode, queryId: QueryId): IdentifierNode; -} diff --git a/node_modules/kysely/dist/cjs/plugin/camel-case/camel-case-transformer.js b/node_modules/kysely/dist/cjs/plugin/camel-case/camel-case-transformer.js deleted file mode 100644 index c95f51d..0000000 --- a/node_modules/kysely/dist/cjs/plugin/camel-case/camel-case-transformer.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SnakeCaseTransformer = void 0; -const operation_node_transformer_js_1 = require("../../operation-node/operation-node-transformer.js"); -class SnakeCaseTransformer extends operation_node_transformer_js_1.OperationNodeTransformer { - #snakeCase; - constructor(snakeCase) { - super(); - this.#snakeCase = snakeCase; - } - transformIdentifier(node, queryId) { - node = super.transformIdentifier(node, queryId); - return { - ...node, - name: this.#snakeCase(node.name), - }; - } -} -exports.SnakeCaseTransformer = SnakeCaseTransformer; diff --git a/node_modules/kysely/dist/cjs/plugin/camel-case/camel-case.d.ts b/node_modules/kysely/dist/cjs/plugin/camel-case/camel-case.d.ts deleted file mode 100644 index ae29105..0000000 --- a/node_modules/kysely/dist/cjs/plugin/camel-case/camel-case.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export type StringMapper = (str: string) => string; -/** - * Creates a function that transforms camel case strings to snake case. - */ -export declare function createSnakeCaseMapper({ upperCase, underscoreBeforeDigits, underscoreBetweenUppercaseLetters, }?: { - upperCase?: boolean | undefined; - underscoreBeforeDigits?: boolean | undefined; - underscoreBetweenUppercaseLetters?: boolean | undefined; -}): StringMapper; -/** - * Creates a function that transforms snake case strings to camel case. - */ -export declare function createCamelCaseMapper({ upperCase, }?: { - upperCase?: boolean | undefined; -}): StringMapper; diff --git a/node_modules/kysely/dist/cjs/plugin/camel-case/camel-case.js b/node_modules/kysely/dist/cjs/plugin/camel-case/camel-case.js deleted file mode 100644 index 19cc3a8..0000000 --- a/node_modules/kysely/dist/cjs/plugin/camel-case/camel-case.js +++ /dev/null @@ -1,111 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createSnakeCaseMapper = createSnakeCaseMapper; -exports.createCamelCaseMapper = createCamelCaseMapper; -/** - * Creates a function that transforms camel case strings to snake case. - */ -function createSnakeCaseMapper({ upperCase = false, underscoreBeforeDigits = false, underscoreBetweenUppercaseLetters = false, } = {}) { - return memoize((str) => { - if (str.length === 0) { - return str; - } - const upper = str.toUpperCase(); - const lower = str.toLowerCase(); - let out = lower[0]; - for (let i = 1, l = str.length; i < l; ++i) { - const char = str[i]; - const prevChar = str[i - 1]; - const upperChar = upper[i]; - const prevUpperChar = upper[i - 1]; - const lowerChar = lower[i]; - const prevLowerChar = lower[i - 1]; - // If underScoreBeforeDigits is true then, well, insert an underscore - // before digits :). Only the first digit gets an underscore if - // there are multiple. - if (underscoreBeforeDigits && - isDigit(char) && - !isDigit(prevChar) && - !out.endsWith('_')) { - out += '_' + char; - continue; - } - // Test if `char` is an upper-case character and that the character - // actually has different upper and lower case versions. - if (char === upperChar && upperChar !== lowerChar) { - const prevCharacterIsUppercase = prevChar === prevUpperChar && prevUpperChar !== prevLowerChar; - // If underscoreBetweenUppercaseLetters is true, we always place an underscore - // before consecutive uppercase letters (e.g. "fooBAR" becomes "foo_b_a_r"). - // Otherwise, we don't (e.g. "fooBAR" becomes "foo_bar"). - if (underscoreBetweenUppercaseLetters || !prevCharacterIsUppercase) { - out += '_' + lowerChar; - } - else { - out += lowerChar; - } - } - else { - out += char; - } - } - if (upperCase) { - return out.toUpperCase(); - } - else { - return out; - } - }); -} -/** - * Creates a function that transforms snake case strings to camel case. - */ -function createCamelCaseMapper({ upperCase = false, } = {}) { - return memoize((str) => { - if (str.length === 0) { - return str; - } - if (upperCase && isAllUpperCaseSnakeCase(str)) { - // Only convert to lower case if the string is all upper - // case snake_case. This allows camelCase strings to go - // through without changing. - str = str.toLowerCase(); - } - let out = str[0]; - for (let i = 1, l = str.length; i < l; ++i) { - const char = str[i]; - const prevChar = str[i - 1]; - if (char !== '_') { - if (prevChar === '_') { - out += char.toUpperCase(); - } - else { - out += char; - } - } - } - return out; - }); -} -function isAllUpperCaseSnakeCase(str) { - for (let i = 1, l = str.length; i < l; ++i) { - const char = str[i]; - if (char !== '_' && char !== char.toUpperCase()) { - return false; - } - } - return true; -} -function isDigit(char) { - return char >= '0' && char <= '9'; -} -function memoize(func) { - const cache = new Map(); - return (str) => { - let mapped = cache.get(str); - if (!mapped) { - mapped = func(str); - cache.set(str, mapped); - } - return mapped; - }; -} diff --git a/node_modules/kysely/dist/cjs/plugin/deduplicate-joins/deduplicate-joins-plugin.d.ts b/node_modules/kysely/dist/cjs/plugin/deduplicate-joins/deduplicate-joins-plugin.d.ts deleted file mode 100644 index 0ce3a68..0000000 --- a/node_modules/kysely/dist/cjs/plugin/deduplicate-joins/deduplicate-joins-plugin.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -import type { QueryResult } from '../../driver/database-connection.js'; -import type { RootOperationNode } from '../../query-compiler/query-compiler.js'; -import type { UnknownRow } from '../../util/type-utils.js'; -import type { KyselyPlugin, PluginTransformQueryArgs, PluginTransformResultArgs } from '../kysely-plugin.js'; -/** - * Plugin that removes duplicate joins from queries. - * - * See [this recipe](https://github.com/kysely-org/kysely/blob/master/site/docs/recipes/0008-deduplicate-joins.md) - */ -export declare class DeduplicateJoinsPlugin implements KyselyPlugin { - #private; - /** - * This is called for each query before it is executed. You can modify the query by - * transforming its {@link OperationNode} tree provided in {@link PluginTransformQueryArgs.node | args.node} - * and returning the transformed tree. You'd usually want to use an {@link OperationNodeTransformer} - * for this. - * - * If you need to pass some query-related data between this method and `transformResult` you - * can use a `WeakMap` with {@link PluginTransformQueryArgs.queryId | args.queryId} as the key: - * - * ```ts - * import type { - * KyselyPlugin, - * QueryResult, - * RootOperationNode, - * UnknownRow - * } from 'kysely' - * - * interface MyData { - * // ... - * } - * const data = new WeakMap() - * - * const plugin = { - * transformQuery(args: PluginTransformQueryArgs): RootOperationNode { - * const something: MyData = {} - * - * // ... - * - * data.set(args.queryId, something) - * - * // ... - * - * return args.node - * }, - * - * async transformResult(args: PluginTransformResultArgs): Promise> { - * // ... - * - * const something = data.get(args.queryId) - * - * // ... - * - * return args.result - * } - * } satisfies KyselyPlugin - * ``` - * - * You should use a `WeakMap` instead of a `Map` or some other strong references because `transformQuery` - * is not always matched by a call to `transformResult` which would leave orphaned items in the map - * and cause a memory leak. - */ - transformQuery(args: PluginTransformQueryArgs): RootOperationNode; - /** - * This method is called for each query after it has been executed. The result - * of the query can be accessed through {@link PluginTransformResultArgs.result | args.result}. - * You can modify the result and return the modifier result. - */ - transformResult(args: PluginTransformResultArgs): Promise>; -} diff --git a/node_modules/kysely/dist/cjs/plugin/deduplicate-joins/deduplicate-joins-plugin.js b/node_modules/kysely/dist/cjs/plugin/deduplicate-joins/deduplicate-joins-plugin.js deleted file mode 100644 index 8d27fe5..0000000 --- a/node_modules/kysely/dist/cjs/plugin/deduplicate-joins/deduplicate-joins-plugin.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DeduplicateJoinsPlugin = void 0; -const deduplicate_joins_transformer_js_1 = require("./deduplicate-joins-transformer.js"); -/** - * Plugin that removes duplicate joins from queries. - * - * See [this recipe](https://github.com/kysely-org/kysely/blob/master/site/docs/recipes/0008-deduplicate-joins.md) - */ -class DeduplicateJoinsPlugin { - #transformer = new deduplicate_joins_transformer_js_1.DeduplicateJoinsTransformer(); - transformQuery(args) { - return this.#transformer.transformNode(args.node, args.queryId); - } - transformResult(args) { - return Promise.resolve(args.result); - } -} -exports.DeduplicateJoinsPlugin = DeduplicateJoinsPlugin; diff --git a/node_modules/kysely/dist/cjs/plugin/deduplicate-joins/deduplicate-joins-transformer.d.ts b/node_modules/kysely/dist/cjs/plugin/deduplicate-joins/deduplicate-joins-transformer.d.ts deleted file mode 100644 index f13edb4..0000000 --- a/node_modules/kysely/dist/cjs/plugin/deduplicate-joins/deduplicate-joins-transformer.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { DeleteQueryNode } from '../../operation-node/delete-query-node.js'; -import { OperationNodeTransformer } from '../../operation-node/operation-node-transformer.js'; -import type { SelectQueryNode } from '../../operation-node/select-query-node.js'; -import type { UpdateQueryNode } from '../../operation-node/update-query-node.js'; -import type { QueryId } from '../../util/query-id.js'; -export declare class DeduplicateJoinsTransformer extends OperationNodeTransformer { - #private; - protected transformSelectQuery(node: SelectQueryNode, queryId: QueryId): SelectQueryNode; - protected transformUpdateQuery(node: UpdateQueryNode, queryId: QueryId): UpdateQueryNode; - protected transformDeleteQuery(node: DeleteQueryNode, queryId: QueryId): DeleteQueryNode; -} diff --git a/node_modules/kysely/dist/cjs/plugin/deduplicate-joins/deduplicate-joins-transformer.js b/node_modules/kysely/dist/cjs/plugin/deduplicate-joins/deduplicate-joins-transformer.js deleted file mode 100644 index 24d74ca..0000000 --- a/node_modules/kysely/dist/cjs/plugin/deduplicate-joins/deduplicate-joins-transformer.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DeduplicateJoinsTransformer = void 0; -const operation_node_transformer_js_1 = require("../../operation-node/operation-node-transformer.js"); -const object_utils_js_1 = require("../../util/object-utils.js"); -class DeduplicateJoinsTransformer extends operation_node_transformer_js_1.OperationNodeTransformer { - transformSelectQuery(node, queryId) { - return this.#transformQuery(super.transformSelectQuery(node, queryId)); - } - transformUpdateQuery(node, queryId) { - return this.#transformQuery(super.transformUpdateQuery(node, queryId)); - } - transformDeleteQuery(node, queryId) { - return this.#transformQuery(super.transformDeleteQuery(node, queryId)); - } - #transformQuery(node) { - if (!node.joins || node.joins.length === 0) { - return node; - } - return (0, object_utils_js_1.freeze)({ - ...node, - joins: this.#deduplicateJoins(node.joins), - }); - } - #deduplicateJoins(joins) { - const out = []; - for (let i = 0; i < joins.length; ++i) { - let foundDuplicate = false; - for (let j = 0; j < out.length; ++j) { - if ((0, object_utils_js_1.compare)(joins[i], out[j])) { - foundDuplicate = true; - break; - } - } - if (!foundDuplicate) { - out.push(joins[i]); - } - } - return (0, object_utils_js_1.freeze)(out); - } -} -exports.DeduplicateJoinsTransformer = DeduplicateJoinsTransformer; diff --git a/node_modules/kysely/dist/cjs/plugin/handle-empty-in-lists/handle-empty-in-lists-plugin.d.ts b/node_modules/kysely/dist/cjs/plugin/handle-empty-in-lists/handle-empty-in-lists-plugin.d.ts deleted file mode 100644 index 8407089..0000000 --- a/node_modules/kysely/dist/cjs/plugin/handle-empty-in-lists/handle-empty-in-lists-plugin.d.ts +++ /dev/null @@ -1,211 +0,0 @@ -import type { QueryResult } from '../../driver/database-connection.js'; -import type { RootOperationNode } from '../../query-compiler/query-compiler.js'; -import type { KyselyPlugin, PluginTransformQueryArgs, PluginTransformResultArgs } from '../kysely-plugin.js'; -import type { UnknownRow } from '../../util/type-utils.js'; -import type { HandleEmptyInListsOptions } from './handle-empty-in-lists.js'; -/** - * A plugin that allows handling `in ()` and `not in ()` expressions. - * - * These expressions are invalid SQL syntax for many databases, and result in runtime - * database errors. - * - * The workarounds used by other libraries always involve modifying the query under - * the hood, which is not aligned with Kysely's philosophy of WYSIWYG. We recommend manually checking - * for empty arrays before passing them as arguments to `in` and `not in` expressions - * instead, but understand that this can be cumbersome. Hence we're going with an - * opt-in approach where you can choose if and how to handle these cases. We do - * not want to make this the default behavior, as it can lead to unexpected behavior. - * Use it at your own risk. Test it. Make sure it works as expected for you. - * - * Using this plugin also allows you to throw an error (thus avoiding unnecessary - * requests to the database) or print a warning in these cases. - * - * ### Examples - * - * The following strategy replaces the `in`/`not in` expression with a noncontingent - * expression. A contradiction (falsy) `1 = 0` for `in`, and a tautology (truthy) `1 = 1` for `not in`), - * similarily to how {@link https://github.com/knex/knex/blob/176151d8048b2a7feeb89a3d649a5580786d4f4e/docs/src/guide/query-builder.md#L1763 | Knex.js}, - * {@link https://github.com/prisma/prisma-engines/blob/99168c54187178484dae45d9478aa40cfd1866d2/quaint/src/visitor.rs#L804-L823 | PrismaORM}, - * {@link https://github.com/laravel/framework/blob/8.x/src/Illuminate/Database/Query/Grammars/Grammar.php#L284-L291 | Laravel}, - * {@link https://docs.sqlalchemy.org/en/13/core/engines.html#sqlalchemy.create_engine.params.empty_in_strategy | SQLAlchemy} - * handle this. - * - * ```ts - * import Sqlite from 'better-sqlite3' - * import { - * HandleEmptyInListsPlugin, - * Kysely, - * replaceWithNoncontingentExpression, - * SqliteDialect, - * } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }), - * plugins: [ - * new HandleEmptyInListsPlugin({ - * strategy: replaceWithNoncontingentExpression - * }) - * ], - * }) - * - * const results = await db - * .selectFrom('person') - * .where('id', 'in', []) - * .where('first_name', 'not in', []) - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select * from "person" where 1 = 0 and 1 = 1 - * ``` - * - * The following strategy does the following: - * - * When `in`, pushes a `null` value into the empty list resulting in `in (null)`, - * similiarly to how {@link https://github.com/typeorm/typeorm/blob/0280cdc451c35ef73c830eb1191c95d34f6ce06e/src/query-builder/QueryBuilder.ts#L919-L922 | TypeORM} - * and {@link https://github.com/sequelize/sequelize/blob/0f2891c6897e12bf9bf56df344aae5b698f58c7d/packages/core/src/abstract-dialect/where-sql-builder.ts#L368-L379 | Sequelize} - * handle `in ()`. `in (null)` is logically the equivalent of `= null`, which returns - * `null`, which is a falsy expression in most SQL databases. We recommend NOT - * using this strategy if you plan to use `in` in `select`, `returning`, or `output` - * clauses, as the return type differs from the `SqlBool` default type for comparisons. - * - * When `not in`, casts the left operand as `char` and pushes a unique value into - * the empty list resulting in `cast({{lhs}} as char) not in ({{VALUE}})`. Casting - * is required to avoid database errors with non-string values. - * - * ```ts - * import Sqlite from 'better-sqlite3' - * import { - * HandleEmptyInListsPlugin, - * Kysely, - * pushValueIntoList, - * SqliteDialect - * } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }), - * plugins: [ - * new HandleEmptyInListsPlugin({ - * strategy: pushValueIntoList('__kysely_no_values_were_provided__') // choose a unique value for not in. has to be something with zero chance being in the data. - * }) - * ], - * }) - * - * const results = await db - * .selectFrom('person') - * .where('id', 'in', []) - * .where('first_name', 'not in', []) - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select * from "person" where "id" in (null) and cast("first_name" as char) not in ('__kysely_no_values_were_provided__') - * ``` - * - * The following custom strategy throws an error when an empty list is encountered - * to avoid unnecessary requests to the database: - * - * ```ts - * import Sqlite from 'better-sqlite3' - * import { - * HandleEmptyInListsPlugin, - * Kysely, - * SqliteDialect - * } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }), - * plugins: [ - * new HandleEmptyInListsPlugin({ - * strategy: () => { - * throw new Error('Empty in/not-in is not allowed') - * } - * }) - * ], - * }) - * - * const results = await db - * .selectFrom('person') - * .where('id', 'in', []) - * .selectAll() - * .execute() // throws an error with 'Empty in/not-in is not allowed' message! - * ``` - */ -export declare class HandleEmptyInListsPlugin implements KyselyPlugin { - #private; - readonly opt: HandleEmptyInListsOptions; - constructor(opt: HandleEmptyInListsOptions); - /** - * This is called for each query before it is executed. You can modify the query by - * transforming its {@link OperationNode} tree provided in {@link PluginTransformQueryArgs.node | args.node} - * and returning the transformed tree. You'd usually want to use an {@link OperationNodeTransformer} - * for this. - * - * If you need to pass some query-related data between this method and `transformResult` you - * can use a `WeakMap` with {@link PluginTransformQueryArgs.queryId | args.queryId} as the key: - * - * ```ts - * import type { - * KyselyPlugin, - * QueryResult, - * RootOperationNode, - * UnknownRow - * } from 'kysely' - * - * interface MyData { - * // ... - * } - * const data = new WeakMap() - * - * const plugin = { - * transformQuery(args: PluginTransformQueryArgs): RootOperationNode { - * const something: MyData = {} - * - * // ... - * - * data.set(args.queryId, something) - * - * // ... - * - * return args.node - * }, - * - * async transformResult(args: PluginTransformResultArgs): Promise> { - * // ... - * - * const something = data.get(args.queryId) - * - * // ... - * - * return args.result - * } - * } satisfies KyselyPlugin - * ``` - * - * You should use a `WeakMap` instead of a `Map` or some other strong references because `transformQuery` - * is not always matched by a call to `transformResult` which would leave orphaned items in the map - * and cause a memory leak. - */ - transformQuery(args: PluginTransformQueryArgs): RootOperationNode; - /** - * This method is called for each query after it has been executed. The result - * of the query can be accessed through {@link PluginTransformResultArgs.result | args.result}. - * You can modify the result and return the modifier result. - */ - transformResult(args: PluginTransformResultArgs): Promise>; -} diff --git a/node_modules/kysely/dist/cjs/plugin/handle-empty-in-lists/handle-empty-in-lists-plugin.js b/node_modules/kysely/dist/cjs/plugin/handle-empty-in-lists/handle-empty-in-lists-plugin.js deleted file mode 100644 index f00f5b8..0000000 --- a/node_modules/kysely/dist/cjs/plugin/handle-empty-in-lists/handle-empty-in-lists-plugin.js +++ /dev/null @@ -1,162 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.HandleEmptyInListsPlugin = void 0; -const handle_empty_in_lists_transformer_js_1 = require("./handle-empty-in-lists-transformer.js"); -/** - * A plugin that allows handling `in ()` and `not in ()` expressions. - * - * These expressions are invalid SQL syntax for many databases, and result in runtime - * database errors. - * - * The workarounds used by other libraries always involve modifying the query under - * the hood, which is not aligned with Kysely's philosophy of WYSIWYG. We recommend manually checking - * for empty arrays before passing them as arguments to `in` and `not in` expressions - * instead, but understand that this can be cumbersome. Hence we're going with an - * opt-in approach where you can choose if and how to handle these cases. We do - * not want to make this the default behavior, as it can lead to unexpected behavior. - * Use it at your own risk. Test it. Make sure it works as expected for you. - * - * Using this plugin also allows you to throw an error (thus avoiding unnecessary - * requests to the database) or print a warning in these cases. - * - * ### Examples - * - * The following strategy replaces the `in`/`not in` expression with a noncontingent - * expression. A contradiction (falsy) `1 = 0` for `in`, and a tautology (truthy) `1 = 1` for `not in`), - * similarily to how {@link https://github.com/knex/knex/blob/176151d8048b2a7feeb89a3d649a5580786d4f4e/docs/src/guide/query-builder.md#L1763 | Knex.js}, - * {@link https://github.com/prisma/prisma-engines/blob/99168c54187178484dae45d9478aa40cfd1866d2/quaint/src/visitor.rs#L804-L823 | PrismaORM}, - * {@link https://github.com/laravel/framework/blob/8.x/src/Illuminate/Database/Query/Grammars/Grammar.php#L284-L291 | Laravel}, - * {@link https://docs.sqlalchemy.org/en/13/core/engines.html#sqlalchemy.create_engine.params.empty_in_strategy | SQLAlchemy} - * handle this. - * - * ```ts - * import Sqlite from 'better-sqlite3' - * import { - * HandleEmptyInListsPlugin, - * Kysely, - * replaceWithNoncontingentExpression, - * SqliteDialect, - * } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }), - * plugins: [ - * new HandleEmptyInListsPlugin({ - * strategy: replaceWithNoncontingentExpression - * }) - * ], - * }) - * - * const results = await db - * .selectFrom('person') - * .where('id', 'in', []) - * .where('first_name', 'not in', []) - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select * from "person" where 1 = 0 and 1 = 1 - * ``` - * - * The following strategy does the following: - * - * When `in`, pushes a `null` value into the empty list resulting in `in (null)`, - * similiarly to how {@link https://github.com/typeorm/typeorm/blob/0280cdc451c35ef73c830eb1191c95d34f6ce06e/src/query-builder/QueryBuilder.ts#L919-L922 | TypeORM} - * and {@link https://github.com/sequelize/sequelize/blob/0f2891c6897e12bf9bf56df344aae5b698f58c7d/packages/core/src/abstract-dialect/where-sql-builder.ts#L368-L379 | Sequelize} - * handle `in ()`. `in (null)` is logically the equivalent of `= null`, which returns - * `null`, which is a falsy expression in most SQL databases. We recommend NOT - * using this strategy if you plan to use `in` in `select`, `returning`, or `output` - * clauses, as the return type differs from the `SqlBool` default type for comparisons. - * - * When `not in`, casts the left operand as `char` and pushes a unique value into - * the empty list resulting in `cast({{lhs}} as char) not in ({{VALUE}})`. Casting - * is required to avoid database errors with non-string values. - * - * ```ts - * import Sqlite from 'better-sqlite3' - * import { - * HandleEmptyInListsPlugin, - * Kysely, - * pushValueIntoList, - * SqliteDialect - * } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }), - * plugins: [ - * new HandleEmptyInListsPlugin({ - * strategy: pushValueIntoList('__kysely_no_values_were_provided__') // choose a unique value for not in. has to be something with zero chance being in the data. - * }) - * ], - * }) - * - * const results = await db - * .selectFrom('person') - * .where('id', 'in', []) - * .where('first_name', 'not in', []) - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select * from "person" where "id" in (null) and cast("first_name" as char) not in ('__kysely_no_values_were_provided__') - * ``` - * - * The following custom strategy throws an error when an empty list is encountered - * to avoid unnecessary requests to the database: - * - * ```ts - * import Sqlite from 'better-sqlite3' - * import { - * HandleEmptyInListsPlugin, - * Kysely, - * SqliteDialect - * } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }), - * plugins: [ - * new HandleEmptyInListsPlugin({ - * strategy: () => { - * throw new Error('Empty in/not-in is not allowed') - * } - * }) - * ], - * }) - * - * const results = await db - * .selectFrom('person') - * .where('id', 'in', []) - * .selectAll() - * .execute() // throws an error with 'Empty in/not-in is not allowed' message! - * ``` - */ -class HandleEmptyInListsPlugin { - opt; - #transformer; - constructor(opt) { - this.opt = opt; - this.#transformer = new handle_empty_in_lists_transformer_js_1.HandleEmptyInListsTransformer(opt.strategy); - } - transformQuery(args) { - return this.#transformer.transformNode(args.node, args.queryId); - } - async transformResult(args) { - return args.result; - } -} -exports.HandleEmptyInListsPlugin = HandleEmptyInListsPlugin; diff --git a/node_modules/kysely/dist/cjs/plugin/handle-empty-in-lists/handle-empty-in-lists-transformer.d.ts b/node_modules/kysely/dist/cjs/plugin/handle-empty-in-lists/handle-empty-in-lists-transformer.d.ts deleted file mode 100644 index 1869a12..0000000 --- a/node_modules/kysely/dist/cjs/plugin/handle-empty-in-lists/handle-empty-in-lists-transformer.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { BinaryOperationNode } from '../../operation-node/binary-operation-node.js'; -import { OperationNodeTransformer } from '../../operation-node/operation-node-transformer.js'; -import type { EmptyInListsStrategy } from './handle-empty-in-lists.js'; -export declare class HandleEmptyInListsTransformer extends OperationNodeTransformer { - #private; - constructor(strategy: EmptyInListsStrategy); - protected transformBinaryOperation(node: BinaryOperationNode): BinaryOperationNode; -} diff --git a/node_modules/kysely/dist/cjs/plugin/handle-empty-in-lists/handle-empty-in-lists-transformer.js b/node_modules/kysely/dist/cjs/plugin/handle-empty-in-lists/handle-empty-in-lists-transformer.js deleted file mode 100644 index 2ae2830..0000000 --- a/node_modules/kysely/dist/cjs/plugin/handle-empty-in-lists/handle-empty-in-lists-transformer.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.HandleEmptyInListsTransformer = void 0; -const operation_node_transformer_js_1 = require("../../operation-node/operation-node-transformer.js"); -const primitive_value_list_node_js_1 = require("../../operation-node/primitive-value-list-node.js"); -const operator_node_js_1 = require("../../operation-node/operator-node.js"); -const value_list_node_js_1 = require("../../operation-node/value-list-node.js"); -class HandleEmptyInListsTransformer extends operation_node_transformer_js_1.OperationNodeTransformer { - #strategy; - constructor(strategy) { - super(); - this.#strategy = strategy; - } - transformBinaryOperation(node) { - if (this.#isEmptyInListNode(node)) { - return this.#strategy(node); - } - return node; - } - #isEmptyInListNode(node) { - const { operator, rightOperand } = node; - return ((primitive_value_list_node_js_1.PrimitiveValueListNode.is(rightOperand) || - value_list_node_js_1.ValueListNode.is(rightOperand)) && - rightOperand.values.length === 0 && - operator_node_js_1.OperatorNode.is(operator) && - (operator.operator === 'in' || operator.operator === 'not in')); - } -} -exports.HandleEmptyInListsTransformer = HandleEmptyInListsTransformer; diff --git a/node_modules/kysely/dist/cjs/plugin/handle-empty-in-lists/handle-empty-in-lists.d.ts b/node_modules/kysely/dist/cjs/plugin/handle-empty-in-lists/handle-empty-in-lists.d.ts deleted file mode 100644 index ce9effe..0000000 --- a/node_modules/kysely/dist/cjs/plugin/handle-empty-in-lists/handle-empty-in-lists.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { BinaryOperationNode } from '../../operation-node/binary-operation-node.js'; -import { OperatorNode } from '../../operation-node/operator-node.js'; -import type { PrimitiveValueListNode } from '../../operation-node/primitive-value-list-node.js'; -import { ValueListNode } from '../../operation-node/value-list-node.js'; -export interface HandleEmptyInListsOptions { - /** - * The strategy to use when handling `in ()` and `not in ()`. - * - * See {@link HandleEmptyInListsPlugin} for examples. - */ - strategy: EmptyInListsStrategy; -} -export type EmptyInListNode = BinaryOperationNode & { - operator: OperatorNode & { - operator: 'in' | 'not in'; - }; - rightOperand: (ValueListNode | PrimitiveValueListNode) & { - values: Readonly<[]>; - }; -}; -export type EmptyInListsStrategy = (node: EmptyInListNode) => BinaryOperationNode; -/** - * Replaces the `in`/`not in` expression with a noncontingent expression (always true or always - * false) depending on the original operator. - * - * This is how Knex.js, PrismaORM, Laravel, and SQLAlchemy handle `in ()` and `not in ()`. - * - * See {@link pushValueIntoList} for an alternative strategy. - */ -export declare function replaceWithNoncontingentExpression(node: EmptyInListNode): BinaryOperationNode; -/** - * When `in`, pushes a `null` value into the list resulting in `in (null)`. This - * is how TypeORM and Sequelize handle `in ()`. `in (null)` is logically the equivalent - * of `= null`, which returns `null`, which is a falsy expression in most SQL databases. - * We recommend NOT using this strategy if you plan to use `in` in `select`, `returning`, - * or `output` clauses, as the return type differs from the `SqlBool` default type. - * - * When `not in`, casts the left operand as `char` and pushes a literal value into - * the list resulting in `cast({{lhs}} as char) not in ({{VALUE}})`. Casting - * is required to avoid database errors with non-string columns. - * - * See {@link replaceWithNoncontingentExpression} for an alternative strategy. - */ -export declare function pushValueIntoList(uniqueNotInLiteral: '__kysely_no_values_were_provided__' | (string & {})): EmptyInListsStrategy; diff --git a/node_modules/kysely/dist/cjs/plugin/handle-empty-in-lists/handle-empty-in-lists.js b/node_modules/kysely/dist/cjs/plugin/handle-empty-in-lists/handle-empty-in-lists.js deleted file mode 100644 index b827c50..0000000 --- a/node_modules/kysely/dist/cjs/plugin/handle-empty-in-lists/handle-empty-in-lists.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.replaceWithNoncontingentExpression = replaceWithNoncontingentExpression; -exports.pushValueIntoList = pushValueIntoList; -const binary_operation_node_js_1 = require("../../operation-node/binary-operation-node.js"); -const cast_node_js_1 = require("../../operation-node/cast-node.js"); -const data_type_node_js_1 = require("../../operation-node/data-type-node.js"); -const operator_node_js_1 = require("../../operation-node/operator-node.js"); -const value_list_node_js_1 = require("../../operation-node/value-list-node.js"); -const value_node_js_1 = require("../../operation-node/value-node.js"); -const object_utils_js_1 = require("../../util/object-utils.js"); -let contradiction; -let eq; -let one; -let tautology; -/** - * Replaces the `in`/`not in` expression with a noncontingent expression (always true or always - * false) depending on the original operator. - * - * This is how Knex.js, PrismaORM, Laravel, and SQLAlchemy handle `in ()` and `not in ()`. - * - * See {@link pushValueIntoList} for an alternative strategy. - */ -function replaceWithNoncontingentExpression(node) { - const _one = (one ||= value_node_js_1.ValueNode.createImmediate(1)); - const _eq = (eq ||= operator_node_js_1.OperatorNode.create('=')); - if (node.operator.operator === 'in') { - return (contradiction ||= binary_operation_node_js_1.BinaryOperationNode.create(_one, _eq, value_node_js_1.ValueNode.createImmediate(0))); - } - return (tautology ||= binary_operation_node_js_1.BinaryOperationNode.create(_one, _eq, _one)); -} -let char; -let listNull; -let listVal; -/** - * When `in`, pushes a `null` value into the list resulting in `in (null)`. This - * is how TypeORM and Sequelize handle `in ()`. `in (null)` is logically the equivalent - * of `= null`, which returns `null`, which is a falsy expression in most SQL databases. - * We recommend NOT using this strategy if you plan to use `in` in `select`, `returning`, - * or `output` clauses, as the return type differs from the `SqlBool` default type. - * - * When `not in`, casts the left operand as `char` and pushes a literal value into - * the list resulting in `cast({{lhs}} as char) not in ({{VALUE}})`. Casting - * is required to avoid database errors with non-string columns. - * - * See {@link replaceWithNoncontingentExpression} for an alternative strategy. - */ -function pushValueIntoList(uniqueNotInLiteral) { - return function pushValueIntoList(node) { - if (node.operator.operator === 'in') { - return (0, object_utils_js_1.freeze)({ - ...node, - rightOperand: (listNull ||= value_list_node_js_1.ValueListNode.create([ - value_node_js_1.ValueNode.createImmediate(null), - ])), - }); - } - return (0, object_utils_js_1.freeze)({ - ...node, - leftOperand: cast_node_js_1.CastNode.create(node.leftOperand, (char ||= data_type_node_js_1.DataTypeNode.create('char'))), - rightOperand: (listVal ||= value_list_node_js_1.ValueListNode.create([ - value_node_js_1.ValueNode.createImmediate(uniqueNotInLiteral), - ])), - }); - }; -} diff --git a/node_modules/kysely/dist/cjs/plugin/immediate-value/immediate-value-plugin.d.ts b/node_modules/kysely/dist/cjs/plugin/immediate-value/immediate-value-plugin.d.ts deleted file mode 100644 index a31e937..0000000 --- a/node_modules/kysely/dist/cjs/plugin/immediate-value/immediate-value-plugin.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -import type { QueryResult } from '../../driver/database-connection.js'; -import type { RootOperationNode } from '../../query-compiler/query-compiler.js'; -import type { UnknownRow } from '../../util/type-utils.js'; -import type { KyselyPlugin, PluginTransformQueryArgs, PluginTransformResultArgs } from '../kysely-plugin.js'; -/** - * Transforms all ValueNodes to immediate. - * - * WARNING! This should never be part of the public API. Users should never use this. - * This is an internal helper. - * - * @internal - */ -export declare class ImmediateValuePlugin implements KyselyPlugin { - #private; - /** - * This is called for each query before it is executed. You can modify the query by - * transforming its {@link OperationNode} tree provided in {@link PluginTransformQueryArgs.node | args.node} - * and returning the transformed tree. You'd usually want to use an {@link OperationNodeTransformer} - * for this. - * - * If you need to pass some query-related data between this method and `transformResult` you - * can use a `WeakMap` with {@link PluginTransformQueryArgs.queryId | args.queryId} as the key: - * - * ```ts - * import type { - * KyselyPlugin, - * QueryResult, - * RootOperationNode, - * UnknownRow - * } from 'kysely' - * - * interface MyData { - * // ... - * } - * const data = new WeakMap() - * - * const plugin = { - * transformQuery(args: PluginTransformQueryArgs): RootOperationNode { - * const something: MyData = {} - * - * // ... - * - * data.set(args.queryId, something) - * - * // ... - * - * return args.node - * }, - * - * async transformResult(args: PluginTransformResultArgs): Promise> { - * // ... - * - * const something = data.get(args.queryId) - * - * // ... - * - * return args.result - * } - * } satisfies KyselyPlugin - * ``` - * - * You should use a `WeakMap` instead of a `Map` or some other strong references because `transformQuery` - * is not always matched by a call to `transformResult` which would leave orphaned items in the map - * and cause a memory leak. - */ - transformQuery(args: PluginTransformQueryArgs): RootOperationNode; - /** - * This method is called for each query after it has been executed. The result - * of the query can be accessed through {@link PluginTransformResultArgs.result | args.result}. - * You can modify the result and return the modifier result. - */ - transformResult(args: PluginTransformResultArgs): Promise>; -} diff --git a/node_modules/kysely/dist/cjs/plugin/immediate-value/immediate-value-plugin.js b/node_modules/kysely/dist/cjs/plugin/immediate-value/immediate-value-plugin.js deleted file mode 100644 index 04ed709..0000000 --- a/node_modules/kysely/dist/cjs/plugin/immediate-value/immediate-value-plugin.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ImmediateValuePlugin = void 0; -const immediate_value_transformer_js_1 = require("./immediate-value-transformer.js"); -/** - * Transforms all ValueNodes to immediate. - * - * WARNING! This should never be part of the public API. Users should never use this. - * This is an internal helper. - * - * @internal - */ -class ImmediateValuePlugin { - #transformer = new immediate_value_transformer_js_1.ImmediateValueTransformer(); - transformQuery(args) { - return this.#transformer.transformNode(args.node, args.queryId); - } - transformResult(args) { - return Promise.resolve(args.result); - } -} -exports.ImmediateValuePlugin = ImmediateValuePlugin; diff --git a/node_modules/kysely/dist/cjs/plugin/immediate-value/immediate-value-transformer.d.ts b/node_modules/kysely/dist/cjs/plugin/immediate-value/immediate-value-transformer.d.ts deleted file mode 100644 index 69b5d65..0000000 --- a/node_modules/kysely/dist/cjs/plugin/immediate-value/immediate-value-transformer.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { OperationNodeTransformer } from '../../operation-node/operation-node-transformer.js'; -import type { PrimitiveValueListNode } from '../../operation-node/primitive-value-list-node.js'; -import { ValueNode } from '../../operation-node/value-node.js'; -/** - * Transforms all ValueNodes to immediate. - * - * WARNING! This should never be part of the public API. Users should never use this. - * This is an internal helper. - * - * @internal - */ -export declare class ImmediateValueTransformer extends OperationNodeTransformer { - transformPrimitiveValueList(node: PrimitiveValueListNode): PrimitiveValueListNode; - transformValue(node: ValueNode): ValueNode; -} diff --git a/node_modules/kysely/dist/cjs/plugin/immediate-value/immediate-value-transformer.js b/node_modules/kysely/dist/cjs/plugin/immediate-value/immediate-value-transformer.js deleted file mode 100644 index c3bec88..0000000 --- a/node_modules/kysely/dist/cjs/plugin/immediate-value/immediate-value-transformer.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ImmediateValueTransformer = void 0; -const operation_node_transformer_js_1 = require("../../operation-node/operation-node-transformer.js"); -const value_list_node_js_1 = require("../../operation-node/value-list-node.js"); -const value_node_js_1 = require("../../operation-node/value-node.js"); -/** - * Transforms all ValueNodes to immediate. - * - * WARNING! This should never be part of the public API. Users should never use this. - * This is an internal helper. - * - * @internal - */ -class ImmediateValueTransformer extends operation_node_transformer_js_1.OperationNodeTransformer { - transformPrimitiveValueList(node) { - return value_list_node_js_1.ValueListNode.create(node.values.map(value_node_js_1.ValueNode.createImmediate)); - } - transformValue(node) { - return value_node_js_1.ValueNode.createImmediate(node.value); - } -} -exports.ImmediateValueTransformer = ImmediateValueTransformer; diff --git a/node_modules/kysely/dist/cjs/plugin/kysely-plugin.d.ts b/node_modules/kysely/dist/cjs/plugin/kysely-plugin.d.ts deleted file mode 100644 index 91e9715..0000000 --- a/node_modules/kysely/dist/cjs/plugin/kysely-plugin.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -import type { QueryResult } from '../driver/database-connection.js'; -import type { RootOperationNode } from '../query-compiler/query-compiler.js'; -import type { QueryId } from '../util/query-id.js'; -import type { UnknownRow } from '../util/type-utils.js'; -export interface KyselyPlugin { - /** - * This is called for each query before it is executed. You can modify the query by - * transforming its {@link OperationNode} tree provided in {@link PluginTransformQueryArgs.node | args.node} - * and returning the transformed tree. You'd usually want to use an {@link OperationNodeTransformer} - * for this. - * - * If you need to pass some query-related data between this method and `transformResult` you - * can use a `WeakMap` with {@link PluginTransformQueryArgs.queryId | args.queryId} as the key: - * - * ```ts - * import type { - * KyselyPlugin, - * QueryResult, - * RootOperationNode, - * UnknownRow - * } from 'kysely' - * - * interface MyData { - * // ... - * } - * const data = new WeakMap() - * - * const plugin = { - * transformQuery(args: PluginTransformQueryArgs): RootOperationNode { - * const something: MyData = {} - * - * // ... - * - * data.set(args.queryId, something) - * - * // ... - * - * return args.node - * }, - * - * async transformResult(args: PluginTransformResultArgs): Promise> { - * // ... - * - * const something = data.get(args.queryId) - * - * // ... - * - * return args.result - * } - * } satisfies KyselyPlugin - * ``` - * - * You should use a `WeakMap` instead of a `Map` or some other strong references because `transformQuery` - * is not always matched by a call to `transformResult` which would leave orphaned items in the map - * and cause a memory leak. - */ - transformQuery(args: PluginTransformQueryArgs): RootOperationNode; - /** - * This method is called for each query after it has been executed. The result - * of the query can be accessed through {@link PluginTransformResultArgs.result | args.result}. - * You can modify the result and return the modifier result. - */ - transformResult(args: PluginTransformResultArgs): Promise>; -} -export interface PluginTransformQueryArgs { - readonly queryId: QueryId; - readonly node: RootOperationNode; -} -export interface PluginTransformResultArgs { - readonly queryId: QueryId; - readonly result: QueryResult; -} diff --git a/node_modules/kysely/dist/cjs/plugin/kysely-plugin.js b/node_modules/kysely/dist/cjs/plugin/kysely-plugin.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/plugin/kysely-plugin.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/plugin/noop-plugin.d.ts b/node_modules/kysely/dist/cjs/plugin/noop-plugin.d.ts deleted file mode 100644 index b3695cd..0000000 --- a/node_modules/kysely/dist/cjs/plugin/noop-plugin.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -import type { QueryResult } from '../driver/database-connection.js'; -import type { RootOperationNode } from '../query-compiler/query-compiler.js'; -import type { UnknownRow } from '../util/type-utils.js'; -import type { KyselyPlugin, PluginTransformQueryArgs, PluginTransformResultArgs } from './kysely-plugin.js'; -export declare class NoopPlugin implements KyselyPlugin { - /** - * This is called for each query before it is executed. You can modify the query by - * transforming its {@link OperationNode} tree provided in {@link PluginTransformQueryArgs.node | args.node} - * and returning the transformed tree. You'd usually want to use an {@link OperationNodeTransformer} - * for this. - * - * If you need to pass some query-related data between this method and `transformResult` you - * can use a `WeakMap` with {@link PluginTransformQueryArgs.queryId | args.queryId} as the key: - * - * ```ts - * import type { - * KyselyPlugin, - * QueryResult, - * RootOperationNode, - * UnknownRow - * } from 'kysely' - * - * interface MyData { - * // ... - * } - * const data = new WeakMap() - * - * const plugin = { - * transformQuery(args: PluginTransformQueryArgs): RootOperationNode { - * const something: MyData = {} - * - * // ... - * - * data.set(args.queryId, something) - * - * // ... - * - * return args.node - * }, - * - * async transformResult(args: PluginTransformResultArgs): Promise> { - * // ... - * - * const something = data.get(args.queryId) - * - * // ... - * - * return args.result - * } - * } satisfies KyselyPlugin - * ``` - * - * You should use a `WeakMap` instead of a `Map` or some other strong references because `transformQuery` - * is not always matched by a call to `transformResult` which would leave orphaned items in the map - * and cause a memory leak. - */ - transformQuery(args: PluginTransformQueryArgs): RootOperationNode; - /** - * This method is called for each query after it has been executed. The result - * of the query can be accessed through {@link PluginTransformResultArgs.result | args.result}. - * You can modify the result and return the modifier result. - */ - transformResult(args: PluginTransformResultArgs): Promise>; -} diff --git a/node_modules/kysely/dist/cjs/plugin/noop-plugin.js b/node_modules/kysely/dist/cjs/plugin/noop-plugin.js deleted file mode 100644 index 0c38550..0000000 --- a/node_modules/kysely/dist/cjs/plugin/noop-plugin.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NoopPlugin = void 0; -class NoopPlugin { - transformQuery(args) { - return args.node; - } - async transformResult(args) { - return args.result; - } -} -exports.NoopPlugin = NoopPlugin; diff --git a/node_modules/kysely/dist/cjs/plugin/parse-json-results/parse-json-results-plugin.d.ts b/node_modules/kysely/dist/cjs/plugin/parse-json-results/parse-json-results-plugin.d.ts deleted file mode 100644 index aaac929..0000000 --- a/node_modules/kysely/dist/cjs/plugin/parse-json-results/parse-json-results-plugin.d.ts +++ /dev/null @@ -1,126 +0,0 @@ -import type { QueryResult } from '../../driver/database-connection.js'; -import type { RootOperationNode } from '../../query-compiler/query-compiler.js'; -import type { UnknownRow } from '../../util/type-utils.js'; -import type { KyselyPlugin, PluginTransformQueryArgs, PluginTransformResultArgs } from '../kysely-plugin.js'; -export interface ParseJSONResultsPluginOptions { - /** - * When `'in-place'`, arrays' and objects' values are parsed in-place. This is - * the most time and space efficient option. - * - * This can result in runtime errors if some objects/arrays are readonly. - * - * When `'create'`, new arrays and objects are created to avoid such errors. - * - * Defaults to `'in-place'`. - */ - objectStrategy?: ObjectStrategy; -} -type ObjectStrategy = 'in-place' | 'create'; -/** - * Parses JSON strings in query results into JSON objects. - * - * This plugin can be useful with dialects that don't automatically parse - * JSON into objects and arrays but return JSON strings instead. - * - * To apply this plugin globally, pass an instance of it to the `plugins` option - * when creating a new `Kysely` instance: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { Kysely, ParseJSONResultsPlugin, SqliteDialect } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }), - * plugins: [new ParseJSONResultsPlugin()], - * }) - * ``` - * - * To apply this plugin to a single query: - * - * ```ts - * import { ParseJSONResultsPlugin } from 'kysely' - * import { jsonArrayFrom } from 'kysely/helpers/sqlite' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * 'first_name', - * 'last_name', - * jsonArrayFrom( - * eb.selectFrom('pet') - * .whereRef('owner_id', '=', 'person.id') - * .select(['name', 'species']) - * ).as('pets') - * ]) - * .withPlugin(new ParseJSONResultsPlugin()) - * .execute() - * ``` - */ -export declare class ParseJSONResultsPlugin implements KyselyPlugin { - #private; - readonly opt: ParseJSONResultsPluginOptions; - constructor(opt?: ParseJSONResultsPluginOptions); - /** - * This is called for each query before it is executed. You can modify the query by - * transforming its {@link OperationNode} tree provided in {@link PluginTransformQueryArgs.node | args.node} - * and returning the transformed tree. You'd usually want to use an {@link OperationNodeTransformer} - * for this. - * - * If you need to pass some query-related data between this method and `transformResult` you - * can use a `WeakMap` with {@link PluginTransformQueryArgs.queryId | args.queryId} as the key: - * - * ```ts - * import type { - * KyselyPlugin, - * QueryResult, - * RootOperationNode, - * UnknownRow - * } from 'kysely' - * - * interface MyData { - * // ... - * } - * const data = new WeakMap() - * - * const plugin = { - * transformQuery(args: PluginTransformQueryArgs): RootOperationNode { - * const something: MyData = {} - * - * // ... - * - * data.set(args.queryId, something) - * - * // ... - * - * return args.node - * }, - * - * async transformResult(args: PluginTransformResultArgs): Promise> { - * // ... - * - * const something = data.get(args.queryId) - * - * // ... - * - * return args.result - * } - * } satisfies KyselyPlugin - * ``` - * - * You should use a `WeakMap` instead of a `Map` or some other strong references because `transformQuery` - * is not always matched by a call to `transformResult` which would leave orphaned items in the map - * and cause a memory leak. - */ - transformQuery(args: PluginTransformQueryArgs): RootOperationNode; - /** - * This method is called for each query after it has been executed. The result - * of the query can be accessed through {@link PluginTransformResultArgs.result | args.result}. - * You can modify the result and return the modifier result. - */ - transformResult(args: PluginTransformResultArgs): Promise>; -} -export {}; diff --git a/node_modules/kysely/dist/cjs/plugin/parse-json-results/parse-json-results-plugin.js b/node_modules/kysely/dist/cjs/plugin/parse-json-results/parse-json-results-plugin.js deleted file mode 100644 index 4538cec..0000000 --- a/node_modules/kysely/dist/cjs/plugin/parse-json-results/parse-json-results-plugin.js +++ /dev/null @@ -1,107 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ParseJSONResultsPlugin = void 0; -const object_utils_js_1 = require("../../util/object-utils.js"); -/** - * Parses JSON strings in query results into JSON objects. - * - * This plugin can be useful with dialects that don't automatically parse - * JSON into objects and arrays but return JSON strings instead. - * - * To apply this plugin globally, pass an instance of it to the `plugins` option - * when creating a new `Kysely` instance: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { Kysely, ParseJSONResultsPlugin, SqliteDialect } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }), - * plugins: [new ParseJSONResultsPlugin()], - * }) - * ``` - * - * To apply this plugin to a single query: - * - * ```ts - * import { ParseJSONResultsPlugin } from 'kysely' - * import { jsonArrayFrom } from 'kysely/helpers/sqlite' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * 'first_name', - * 'last_name', - * jsonArrayFrom( - * eb.selectFrom('pet') - * .whereRef('owner_id', '=', 'person.id') - * .select(['name', 'species']) - * ).as('pets') - * ]) - * .withPlugin(new ParseJSONResultsPlugin()) - * .execute() - * ``` - */ -class ParseJSONResultsPlugin { - opt; - #objectStrategy; - constructor(opt = {}) { - this.opt = opt; - this.#objectStrategy = opt.objectStrategy || 'in-place'; - } - // noop - transformQuery(args) { - return args.node; - } - async transformResult(args) { - return { - ...args.result, - rows: parseArray(args.result.rows, this.#objectStrategy), - }; - } -} -exports.ParseJSONResultsPlugin = ParseJSONResultsPlugin; -function parseArray(arr, objectStrategy) { - const target = objectStrategy === 'create' ? new Array(arr.length) : arr; - for (let i = 0; i < arr.length; ++i) { - target[i] = parse(arr[i], objectStrategy); - } - return target; -} -function parse(obj, objectStrategy) { - if ((0, object_utils_js_1.isString)(obj)) { - return parseString(obj); - } - if (Array.isArray(obj)) { - return parseArray(obj, objectStrategy); - } - if ((0, object_utils_js_1.isPlainObject)(obj)) { - return parseObject(obj, objectStrategy); - } - return obj; -} -function parseString(str) { - if (maybeJson(str)) { - try { - return parse(JSON.parse(str), 'in-place'); - } - catch (err) { - // this catch block is intentionally empty. - } - } - return str; -} -function maybeJson(value) { - return value.match(/^[\[\{]/) != null; -} -function parseObject(obj, objectStrategy) { - const target = objectStrategy === 'create' ? {} : obj; - for (const key in obj) { - target[key] = parse(obj[key], objectStrategy); - } - return target; -} diff --git a/node_modules/kysely/dist/cjs/plugin/with-schema/with-schema-plugin.d.ts b/node_modules/kysely/dist/cjs/plugin/with-schema/with-schema-plugin.d.ts deleted file mode 100644 index 58cdef2..0000000 --- a/node_modules/kysely/dist/cjs/plugin/with-schema/with-schema-plugin.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -import type { QueryResult } from '../../driver/database-connection.js'; -import type { RootOperationNode } from '../../query-compiler/query-compiler.js'; -import type { KyselyPlugin, PluginTransformQueryArgs, PluginTransformResultArgs } from '../kysely-plugin.js'; -import type { UnknownRow } from '../../util/type-utils.js'; -export declare class WithSchemaPlugin implements KyselyPlugin { - #private; - constructor(schema: string); - /** - * This is called for each query before it is executed. You can modify the query by - * transforming its {@link OperationNode} tree provided in {@link PluginTransformQueryArgs.node | args.node} - * and returning the transformed tree. You'd usually want to use an {@link OperationNodeTransformer} - * for this. - * - * If you need to pass some query-related data between this method and `transformResult` you - * can use a `WeakMap` with {@link PluginTransformQueryArgs.queryId | args.queryId} as the key: - * - * ```ts - * import type { - * KyselyPlugin, - * QueryResult, - * RootOperationNode, - * UnknownRow - * } from 'kysely' - * - * interface MyData { - * // ... - * } - * const data = new WeakMap() - * - * const plugin = { - * transformQuery(args: PluginTransformQueryArgs): RootOperationNode { - * const something: MyData = {} - * - * // ... - * - * data.set(args.queryId, something) - * - * // ... - * - * return args.node - * }, - * - * async transformResult(args: PluginTransformResultArgs): Promise> { - * // ... - * - * const something = data.get(args.queryId) - * - * // ... - * - * return args.result - * } - * } satisfies KyselyPlugin - * ``` - * - * You should use a `WeakMap` instead of a `Map` or some other strong references because `transformQuery` - * is not always matched by a call to `transformResult` which would leave orphaned items in the map - * and cause a memory leak. - */ - transformQuery(args: PluginTransformQueryArgs): RootOperationNode; - /** - * This method is called for each query after it has been executed. The result - * of the query can be accessed through {@link PluginTransformResultArgs.result | args.result}. - * You can modify the result and return the modifier result. - */ - transformResult(args: PluginTransformResultArgs): Promise>; -} diff --git a/node_modules/kysely/dist/cjs/plugin/with-schema/with-schema-plugin.js b/node_modules/kysely/dist/cjs/plugin/with-schema/with-schema-plugin.js deleted file mode 100644 index a30a330..0000000 --- a/node_modules/kysely/dist/cjs/plugin/with-schema/with-schema-plugin.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.WithSchemaPlugin = void 0; -const with_schema_transformer_js_1 = require("./with-schema-transformer.js"); -class WithSchemaPlugin { - #transformer; - constructor(schema) { - this.#transformer = new with_schema_transformer_js_1.WithSchemaTransformer(schema); - } - transformQuery(args) { - return this.#transformer.transformNode(args.node, args.queryId); - } - async transformResult(args) { - return args.result; - } -} -exports.WithSchemaPlugin = WithSchemaPlugin; diff --git a/node_modules/kysely/dist/cjs/plugin/with-schema/with-schema-transformer.d.ts b/node_modules/kysely/dist/cjs/plugin/with-schema/with-schema-transformer.d.ts deleted file mode 100644 index b7adb03..0000000 --- a/node_modules/kysely/dist/cjs/plugin/with-schema/with-schema-transformer.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { AggregateFunctionNode } from '../../operation-node/aggregate-function-node.js'; -import type { FunctionNode } from '../../operation-node/function-node.js'; -import { OperationNodeTransformer } from '../../operation-node/operation-node-transformer.js'; -import type { OperationNode } from '../../operation-node/operation-node.js'; -import type { ReferencesNode } from '../../operation-node/references-node.js'; -import { SchemableIdentifierNode } from '../../operation-node/schemable-identifier-node.js'; -import type { SelectModifierNode } from '../../operation-node/select-modifier-node.js'; -import type { QueryId } from '../../util/query-id.js'; -export declare class WithSchemaTransformer extends OperationNodeTransformer { - #private; - constructor(schema: string); - protected transformNodeImpl(node: T, queryId: QueryId): T; - protected transformSchemableIdentifier(node: SchemableIdentifierNode, queryId: QueryId): SchemableIdentifierNode; - protected transformReferences(node: ReferencesNode, queryId: QueryId): ReferencesNode; - protected transformAggregateFunction(node: AggregateFunctionNode, queryId: QueryId): AggregateFunctionNode; - protected transformFunction(node: FunctionNode, queryId: QueryId): FunctionNode; - protected transformSelectModifier(node: SelectModifierNode, queryId: QueryId): SelectModifierNode; -} diff --git a/node_modules/kysely/dist/cjs/plugin/with-schema/with-schema-transformer.js b/node_modules/kysely/dist/cjs/plugin/with-schema/with-schema-transformer.js deleted file mode 100644 index bcca302..0000000 --- a/node_modules/kysely/dist/cjs/plugin/with-schema/with-schema-transformer.js +++ /dev/null @@ -1,200 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.WithSchemaTransformer = void 0; -const alias_node_js_1 = require("../../operation-node/alias-node.js"); -const identifier_node_js_1 = require("../../operation-node/identifier-node.js"); -const join_node_js_1 = require("../../operation-node/join-node.js"); -const list_node_js_1 = require("../../operation-node/list-node.js"); -const operation_node_transformer_js_1 = require("../../operation-node/operation-node-transformer.js"); -const schemable_identifier_node_js_1 = require("../../operation-node/schemable-identifier-node.js"); -const table_node_js_1 = require("../../operation-node/table-node.js"); -const using_node_js_1 = require("../../operation-node/using-node.js"); -const object_utils_js_1 = require("../../util/object-utils.js"); -// This object exist only so that we get a type error when a new RootOperationNode -// is added. If you get a type error here, make sure to add the new root node and -// handle it correctly in the transformer. -// -// DO NOT REFACTOR THIS EVEN IF IT SEEMS USELESS TO YOU! -const ROOT_OPERATION_NODES = (0, object_utils_js_1.freeze)({ - AlterTableNode: true, - CreateIndexNode: true, - CreateSchemaNode: true, - CreateTableNode: true, - CreateTypeNode: true, - CreateViewNode: true, - RefreshMaterializedViewNode: true, - DeleteQueryNode: true, - DropIndexNode: true, - DropSchemaNode: true, - DropTableNode: true, - DropTypeNode: true, - DropViewNode: true, - InsertQueryNode: true, - RawNode: true, - SelectQueryNode: true, - UpdateQueryNode: true, - MergeQueryNode: true, -}); -const SCHEMALESS_FUNCTIONS = { - json_agg: true, - to_json: true, -}; -class WithSchemaTransformer extends operation_node_transformer_js_1.OperationNodeTransformer { - #schema; - #schemableIds = new Set(); - #ctes = new Set(); - constructor(schema) { - super(); - this.#schema = schema; - } - transformNodeImpl(node, queryId) { - if (!this.#isRootOperationNode(node)) { - return super.transformNodeImpl(node, queryId); - } - const ctes = this.#collectCTEs(node); - for (const cte of ctes) { - this.#ctes.add(cte); - } - const tables = this.#collectSchemableIds(node); - for (const table of tables) { - this.#schemableIds.add(table); - } - const transformed = super.transformNodeImpl(node, queryId); - for (const table of tables) { - this.#schemableIds.delete(table); - } - for (const cte of ctes) { - this.#ctes.delete(cte); - } - return transformed; - } - transformSchemableIdentifier(node, queryId) { - const transformed = super.transformSchemableIdentifier(node, queryId); - if (transformed.schema || !this.#schemableIds.has(node.identifier.name)) { - return transformed; - } - return { - ...transformed, - schema: identifier_node_js_1.IdentifierNode.create(this.#schema), - }; - } - transformReferences(node, queryId) { - const transformed = super.transformReferences(node, queryId); - if (transformed.table.table.schema) { - return transformed; - } - return { - ...transformed, - table: table_node_js_1.TableNode.createWithSchema(this.#schema, transformed.table.table.identifier.name), - }; - } - transformAggregateFunction(node, queryId) { - return { - ...super.transformAggregateFunction({ ...node, aggregated: [] }, queryId), - aggregated: this.#transformTableArgsWithoutSchemas(node, queryId, 'aggregated'), - }; - } - transformFunction(node, queryId) { - return { - ...super.transformFunction({ ...node, arguments: [] }, queryId), - arguments: this.#transformTableArgsWithoutSchemas(node, queryId, 'arguments'), - }; - } - transformSelectModifier(node, queryId) { - return { - ...super.transformSelectModifier({ ...node, of: undefined }, queryId), - of: node.of?.map((item) => table_node_js_1.TableNode.is(item) && !item.table.schema - ? { - ...item, - table: this.transformIdentifier(item.table.identifier, queryId), - } - : this.transformNode(item, queryId)), - }; - } - #transformTableArgsWithoutSchemas(node, queryId, argsKey) { - return SCHEMALESS_FUNCTIONS[node.func] - ? node[argsKey].map((arg) => !table_node_js_1.TableNode.is(arg) || arg.table.schema - ? this.transformNode(arg, queryId) - : { - ...arg, - table: this.transformIdentifier(arg.table.identifier, queryId), - }) - : this.transformNodeList(node[argsKey], queryId); - } - #isRootOperationNode(node) { - return node.kind in ROOT_OPERATION_NODES; - } - #collectSchemableIds(node) { - const schemableIds = new Set(); - if ('name' in node && node.name && schemable_identifier_node_js_1.SchemableIdentifierNode.is(node.name)) { - this.#collectSchemableId(node.name, schemableIds); - } - if ('from' in node && node.from) { - for (const from of node.from.froms) { - this.#collectSchemableIdsFromTableExpr(from, schemableIds); - } - } - if ('into' in node && node.into) { - this.#collectSchemableIdsFromTableExpr(node.into, schemableIds); - } - if ('table' in node && node.table) { - this.#collectSchemableIdsFromTableExpr(node.table, schemableIds); - } - if ('joins' in node && node.joins) { - for (const join of node.joins) { - this.#collectSchemableIdsFromTableExpr(join.table, schemableIds); - } - } - if ('using' in node && node.using) { - if (join_node_js_1.JoinNode.is(node.using)) { - this.#collectSchemableIdsFromTableExpr(node.using.table, schemableIds); - } - else { - this.#collectSchemableIdsFromTableExpr(node.using, schemableIds); - } - } - return schemableIds; - } - #collectCTEs(node) { - const ctes = new Set(); - if ('with' in node && node.with) { - this.#collectCTEIds(node.with, ctes); - } - return ctes; - } - #collectSchemableIdsFromTableExpr(node, schemableIds) { - if (table_node_js_1.TableNode.is(node)) { - return this.#collectSchemableId(node.table, schemableIds); - } - if (alias_node_js_1.AliasNode.is(node) && table_node_js_1.TableNode.is(node.node)) { - return this.#collectSchemableId(node.node.table, schemableIds); - } - if (list_node_js_1.ListNode.is(node)) { - for (const table of node.items) { - this.#collectSchemableIdsFromTableExpr(table, schemableIds); - } - return; - } - if (using_node_js_1.UsingNode.is(node)) { - for (const table of node.tables) { - this.#collectSchemableIdsFromTableExpr(table, schemableIds); - } - return; - } - } - #collectSchemableId(node, schemableIds) { - const id = node.identifier.name; - if (!this.#schemableIds.has(id) && !this.#ctes.has(id)) { - schemableIds.add(id); - } - } - #collectCTEIds(node, ctes) { - for (const expr of node.expressions) { - const cteId = expr.name.table.table.identifier.name; - if (!this.#ctes.has(cteId)) { - ctes.add(cteId); - } - } - } -} -exports.WithSchemaTransformer = WithSchemaTransformer; diff --git a/node_modules/kysely/dist/cjs/query-builder/aggregate-function-builder.d.ts b/node_modules/kysely/dist/cjs/query-builder/aggregate-function-builder.d.ts deleted file mode 100644 index bfaedaf..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/aggregate-function-builder.d.ts +++ /dev/null @@ -1,379 +0,0 @@ -import { AggregateFunctionNode } from '../operation-node/aggregate-function-node.js'; -import { AliasNode } from '../operation-node/alias-node.js'; -import type { OverBuilder } from './over-builder.js'; -import type { AliasableExpression, AliasedExpression, Expression } from '../expression/expression.js'; -import type { ReferenceExpression } from '../parser/reference-parser.js'; -import { type ComparisonOperatorExpression, type OperandValueExpressionOrList } from '../parser/binary-operation-parser.js'; -import type { SqlBool } from '../util/type-utils.js'; -import type { ExpressionOrFactory } from '../parser/expression-parser.js'; -import { type DirectedOrderByStringReference, type OrderByExpression, type OrderByModifiers } from '../parser/order-by-parser.js'; -import type { OrderByInterface } from './order-by-interface.js'; -export declare class AggregateFunctionBuilder implements OrderByInterface, AliasableExpression { - #private; - constructor(props: AggregateFunctionBuilderProps); - /** @private */ - /** - * All expressions need to have this getter for complicated type-related reasons. - * Simply add this getter for your expression and always return `undefined` from it: - * - * ### Examples - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - * - * The getter is needed to make the expression assignable to another expression only - * if the types `T` are assignable. Without this property (or some other property - * that references `T`), you could assing `Expression` to `Expression`. - */ - get expressionType(): O | undefined; - /** - * Returns an aliased version of the function. - * - * In addition to slapping `as "the_alias"` to the end of the SQL, - * this method also provides strict typing: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select( - * (eb) => eb.fn.count('id').as('person_count') - * ) - * .executeTakeFirstOrThrow() - * - * // `person_count: number` field exists in the result type. - * console.log(result.person_count) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select count("id") as "person_count" - * from "person" - * ``` - */ - as(alias: A): AliasedAggregateFunctionBuilder; - /** - * Adds a `distinct` clause inside the function. - * - * ### Examples - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => - * eb.fn.count('first_name').distinct().as('first_name_count') - * ) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select count(distinct "first_name") as "first_name_count" - * from "person" - * ``` - */ - distinct(): AggregateFunctionBuilder; - /** - * Adds an `order by` clause inside the aggregate function. - * - * ### Examples - * - * ```ts - * const result = await db - * .selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .select((eb) => - * eb.fn.jsonAgg('pet').orderBy('pet.name').as('person_pets') - * ) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select json_agg("pet" order by "pet"."name") as "person_pets" - * from "person" - * inner join "pet" ON "pet"."owner_id" = "person"."id" - * ``` - */ - orderBy>(expr: OE, modifiers?: OrderByModifiers): AggregateFunctionBuilder; - /** - * @deprecated It does ~2-2.6x more compile-time instantiations compared to multiple chained `orderBy(expr, modifiers?)` calls (in `order by` clauses with reasonable item counts), and has broken autocompletion. - */ - orderBy | DirectedOrderByStringReference>(exprs: ReadonlyArray): AggregateFunctionBuilder; - /** - * @deprecated It does ~2.9x more compile-time instantiations compared to a `orderBy(expr, direction)` call. - */ - orderBy>(expr: OE): AggregateFunctionBuilder; - /** - * @deprecated Use `orderBy(expr, (ob) => ...)` instead. - */ - orderBy>(expr: OE, modifiers: Expression): AggregateFunctionBuilder; - /** - * Clears the `order by` clause from the query. - * - * See {@link orderBy} for adding an `order by` clause or item to a query. - * - * ### Examples - * - * ```ts - * const query = db - * .selectFrom('person') - * .selectAll() - * .orderBy('id', 'desc') - * - * const results = await query - * .clearOrderBy() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearOrderBy(): AggregateFunctionBuilder; - /** - * Adds a `withing group` clause with a nested `order by` clause after the function. - * - * This is only supported by some dialects like PostgreSQL or MS SQL Server. - * - * ### Examples - * - * Most frequent person name: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * eb.fn - * .agg('mode') - * .withinGroupOrderBy('person.first_name') - * .as('most_frequent_name') - * ]) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select mode() within group (order by "person"."first_name") as "most_frequent_name" - * from "person" - * ``` - */ - withinGroupOrderBy>(expr: OE, modifiers?: OrderByModifiers): AggregateFunctionBuilder; - /** - * @deprecated It does ~2-2.6x more compile-time instantiations compared to multiple chained `withinGroupOrderBy(expr, modifiers?)` calls (in `order by` clauses with reasonable item counts), and has broken autocompletion. - */ - withinGroupOrderBy | DirectedOrderByStringReference>(exprs: ReadonlyArray): AggregateFunctionBuilder; - /** - * @deprecated It does ~2.9x more compile-time instantiations compared to a `withinGroupOrderBy(expr, direction)` call. - */ - withinGroupOrderBy>(expr: OE): AggregateFunctionBuilder; - /** - * @deprecated Use `withinGroupOrderBy(expr, (ob) => ...)` instead. - */ - withinGroupOrderBy>(expr: OE, modifiers: Expression): AggregateFunctionBuilder; - /** - * Adds a `filter` clause with a nested `where` clause after the function. - * - * Similar to {@link WhereInterface}'s `where` method. - * - * Also see {@link filterWhereRef}. - * - * ### Examples - * - * Count by gender: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * eb.fn - * .count('id') - * .filterWhere('gender', '=', 'female') - * .as('female_count'), - * eb.fn - * .count('id') - * .filterWhere('gender', '=', 'male') - * .as('male_count'), - * eb.fn - * .count('id') - * .filterWhere('gender', '=', 'other') - * .as('other_count'), - * ]) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * count("id") filter(where "gender" = $1) as "female_count", - * count("id") filter(where "gender" = $2) as "male_count", - * count("id") filter(where "gender" = $3) as "other_count" - * from "person" - * ``` - */ - filterWhere, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): AggregateFunctionBuilder; - filterWhere>(expression: E): AggregateFunctionBuilder; - /** - * Adds a `filter` clause with a nested `where` clause after the function, where - * both sides of the operator are references to columns. - * - * Similar to {@link WhereInterface}'s `whereRef` method. - * - * ### Examples - * - * Count people with same first and last names versus general public: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * eb.fn - * .count('id') - * .filterWhereRef('first_name', '=', 'last_name') - * .as('repeat_name_count'), - * eb.fn.count('id').as('total_count'), - * ]) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * count("id") filter(where "first_name" = "last_name") as "repeat_name_count", - * count("id") as "total_count" - * from "person" - * ``` - */ - filterWhereRef, RRE extends ReferenceExpression>(lhs: LRE, op: ComparisonOperatorExpression, rhs: RRE): AggregateFunctionBuilder; - /** - * Adds an `over` clause (window functions) after the function. - * - * ### Examples - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select( - * (eb) => eb.fn.avg('age').over().as('average_age') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select avg("age") over() as "average_age" - * from "person" - * ``` - * - * Also supports passing a callback that returns an over builder, - * allowing to add partition by and sort by clauses inside over. - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select( - * (eb) => eb.fn.avg('age').over( - * ob => ob.partitionBy('last_name').orderBy('first_name', 'asc') - * ).as('average_age') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select avg("age") over(partition by "last_name" order by "first_name" asc) as "average_age" - * from "person" - * ``` - */ - over(over?: OverBuilderCallback): AggregateFunctionBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - /** - * Casts the expression to the given type. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `AggregateFunctionBuilder` with a new output type. - */ - $castTo(): AggregateFunctionBuilder; - /** - * Omit null from the expression's type. - * - * This function can be useful in cases where you know an expression can't be - * null, but Kysely is unable to infer it. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of `this` with a new output type. - */ - $notNull(): AggregateFunctionBuilder>; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - * - * ### Examples - * - * If you are creating a custom expression, it's often easiest to use the {@link sql} - * template tag to build the node: - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - */ - toOperationNode(): AggregateFunctionNode; -} -/** - * {@link AggregateFunctionBuilder} with an alias. The result of calling {@link AggregateFunctionBuilder.as}. - */ -export declare class AliasedAggregateFunctionBuilder implements AliasedExpression { - #private; - constructor(aggregateFunctionBuilder: AggregateFunctionBuilder, alias: A); - /** @private */ - /** - * Returns the aliased expression. - */ - get expression(): Expression; - /** @private */ - /** - * Returns the alias. - */ - get alias(): A; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - */ - toOperationNode(): AliasNode; -} -export interface AggregateFunctionBuilderProps { - aggregateFunctionNode: AggregateFunctionNode; -} -export type OverBuilderCallback = (builder: OverBuilder) => OverBuilder; diff --git a/node_modules/kysely/dist/cjs/query-builder/aggregate-function-builder.js b/node_modules/kysely/dist/cjs/query-builder/aggregate-function-builder.js deleted file mode 100644 index df575cf..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/aggregate-function-builder.js +++ /dev/null @@ -1,242 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AliasedAggregateFunctionBuilder = exports.AggregateFunctionBuilder = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const aggregate_function_node_js_1 = require("../operation-node/aggregate-function-node.js"); -const alias_node_js_1 = require("../operation-node/alias-node.js"); -const identifier_node_js_1 = require("../operation-node/identifier-node.js"); -const parse_utils_js_1 = require("../parser/parse-utils.js"); -const binary_operation_parser_js_1 = require("../parser/binary-operation-parser.js"); -const order_by_parser_js_1 = require("../parser/order-by-parser.js"); -const query_node_js_1 = require("../operation-node/query-node.js"); -class AggregateFunctionBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - /** @private */ - get expressionType() { - return undefined; - } - /** - * Returns an aliased version of the function. - * - * In addition to slapping `as "the_alias"` to the end of the SQL, - * this method also provides strict typing: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select( - * (eb) => eb.fn.count('id').as('person_count') - * ) - * .executeTakeFirstOrThrow() - * - * // `person_count: number` field exists in the result type. - * console.log(result.person_count) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select count("id") as "person_count" - * from "person" - * ``` - */ - as(alias) { - return new AliasedAggregateFunctionBuilder(this, alias); - } - /** - * Adds a `distinct` clause inside the function. - * - * ### Examples - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => - * eb.fn.count('first_name').distinct().as('first_name_count') - * ) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select count(distinct "first_name") as "first_name_count" - * from "person" - * ``` - */ - distinct() { - return new AggregateFunctionBuilder({ - ...this.#props, - aggregateFunctionNode: aggregate_function_node_js_1.AggregateFunctionNode.cloneWithDistinct(this.#props.aggregateFunctionNode), - }); - } - orderBy(...args) { - return new AggregateFunctionBuilder({ - ...this.#props, - aggregateFunctionNode: query_node_js_1.QueryNode.cloneWithOrderByItems(this.#props.aggregateFunctionNode, (0, order_by_parser_js_1.parseOrderBy)(args)), - }); - } - clearOrderBy() { - return new AggregateFunctionBuilder({ - ...this.#props, - aggregateFunctionNode: query_node_js_1.QueryNode.cloneWithoutOrderBy(this.#props.aggregateFunctionNode), - }); - } - withinGroupOrderBy(...args) { - return new AggregateFunctionBuilder({ - ...this.#props, - aggregateFunctionNode: aggregate_function_node_js_1.AggregateFunctionNode.cloneWithOrderBy(this.#props.aggregateFunctionNode, (0, order_by_parser_js_1.parseOrderBy)(args), true), - }); - } - filterWhere(...args) { - return new AggregateFunctionBuilder({ - ...this.#props, - aggregateFunctionNode: aggregate_function_node_js_1.AggregateFunctionNode.cloneWithFilter(this.#props.aggregateFunctionNode, (0, binary_operation_parser_js_1.parseValueBinaryOperationOrExpression)(args)), - }); - } - /** - * Adds a `filter` clause with a nested `where` clause after the function, where - * both sides of the operator are references to columns. - * - * Similar to {@link WhereInterface}'s `whereRef` method. - * - * ### Examples - * - * Count people with same first and last names versus general public: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * eb.fn - * .count('id') - * .filterWhereRef('first_name', '=', 'last_name') - * .as('repeat_name_count'), - * eb.fn.count('id').as('total_count'), - * ]) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * count("id") filter(where "first_name" = "last_name") as "repeat_name_count", - * count("id") as "total_count" - * from "person" - * ``` - */ - filterWhereRef(lhs, op, rhs) { - return new AggregateFunctionBuilder({ - ...this.#props, - aggregateFunctionNode: aggregate_function_node_js_1.AggregateFunctionNode.cloneWithFilter(this.#props.aggregateFunctionNode, (0, binary_operation_parser_js_1.parseReferentialBinaryOperation)(lhs, op, rhs)), - }); - } - /** - * Adds an `over` clause (window functions) after the function. - * - * ### Examples - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select( - * (eb) => eb.fn.avg('age').over().as('average_age') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select avg("age") over() as "average_age" - * from "person" - * ``` - * - * Also supports passing a callback that returns an over builder, - * allowing to add partition by and sort by clauses inside over. - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select( - * (eb) => eb.fn.avg('age').over( - * ob => ob.partitionBy('last_name').orderBy('first_name', 'asc') - * ).as('average_age') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select avg("age") over(partition by "last_name" order by "first_name" asc) as "average_age" - * from "person" - * ``` - */ - over(over) { - const builder = (0, parse_utils_js_1.createOverBuilder)(); - return new AggregateFunctionBuilder({ - ...this.#props, - aggregateFunctionNode: aggregate_function_node_js_1.AggregateFunctionNode.cloneWithOver(this.#props.aggregateFunctionNode, (over ? over(builder) : builder).toOperationNode()), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - /** - * Casts the expression to the given type. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `AggregateFunctionBuilder` with a new output type. - */ - $castTo() { - return new AggregateFunctionBuilder(this.#props); - } - /** - * Omit null from the expression's type. - * - * This function can be useful in cases where you know an expression can't be - * null, but Kysely is unable to infer it. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of `this` with a new output type. - */ - $notNull() { - return new AggregateFunctionBuilder(this.#props); - } - toOperationNode() { - return this.#props.aggregateFunctionNode; - } -} -exports.AggregateFunctionBuilder = AggregateFunctionBuilder; -/** - * {@link AggregateFunctionBuilder} with an alias. The result of calling {@link AggregateFunctionBuilder.as}. - */ -class AliasedAggregateFunctionBuilder { - #aggregateFunctionBuilder; - #alias; - constructor(aggregateFunctionBuilder, alias) { - this.#aggregateFunctionBuilder = aggregateFunctionBuilder; - this.#alias = alias; - } - /** @private */ - get expression() { - return this.#aggregateFunctionBuilder; - } - /** @private */ - get alias() { - return this.#alias; - } - toOperationNode() { - return alias_node_js_1.AliasNode.create(this.#aggregateFunctionBuilder.toOperationNode(), identifier_node_js_1.IdentifierNode.create(this.#alias)); - } -} -exports.AliasedAggregateFunctionBuilder = AliasedAggregateFunctionBuilder; diff --git a/node_modules/kysely/dist/cjs/query-builder/case-builder.d.ts b/node_modules/kysely/dist/cjs/query-builder/case-builder.d.ts deleted file mode 100644 index 153976c..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/case-builder.d.ts +++ /dev/null @@ -1,112 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -import { ExpressionWrapper } from '../expression/expression-wrapper.js'; -import type { ReferenceExpression } from '../parser/reference-parser.js'; -import { CaseNode } from '../operation-node/case-node.js'; -import { type ComparisonOperatorExpression, type OperandValueExpressionOrList } from '../parser/binary-operation-parser.js'; -import { type ExtractTypeFromValueExpression } from '../parser/value-parser.js'; -import type { KyselyTypeError } from '../util/type-error.js'; -export declare class CaseBuilder implements Whenable { - #private; - constructor(props: CaseBuilderProps); - /** - * Adds a `when` clause to the case statement. - * - * A `when` call must be followed by a {@link CaseThenBuilder.then} call. - */ - when, VE extends OperandValueExpressionOrList>(lhs: unknown extends W ? RE : KyselyTypeError<'when(lhs, op, rhs) is not supported when using case(value)'>, op: ComparisonOperatorExpression, rhs: VE): CaseThenBuilder; - when(expression: Expression): CaseThenBuilder; - when(value: unknown extends W ? KyselyTypeError<'when(value) is only supported when using case(value)'> : W): CaseThenBuilder; -} -interface CaseBuilderProps { - readonly node: CaseNode; -} -export declare class CaseThenBuilder { - #private; - constructor(props: CaseBuilderProps); - /** - * Adds a `then` clause to the `case` statement. - * - * A `then` call can be followed by {@link Whenable.when}, {@link CaseWhenBuilder.else}, - * {@link CaseWhenBuilder.end} or {@link CaseWhenBuilder.endCase} call. - */ - then>(expression: E): CaseWhenBuilder>; - then(value: V): CaseWhenBuilder; -} -export declare class CaseWhenBuilder implements Whenable, Endable { - #private; - constructor(props: CaseBuilderProps); - /** - * Adds a `when` clause to the case statement. - * - * A `when` call must be followed by a {@link CaseThenBuilder.then} call. - */ - when, VE extends OperandValueExpressionOrList>(lhs: unknown extends W ? RE : KyselyTypeError<'when(lhs, op, rhs) is not supported when using case(value)'>, op: ComparisonOperatorExpression, rhs: VE): CaseThenBuilder; - when(expression: Expression): CaseThenBuilder; - when(value: unknown extends W ? KyselyTypeError<'when(value) is only supported when using case(value)'> : W): CaseThenBuilder; - /** - * Adds an `else` clause to the `case` statement. - * - * An `else` call must be followed by an {@link Endable.end} or {@link Endable.endCase} call. - */ - else>(expression: E): CaseEndBuilder>; - else(value: V): CaseEndBuilder; - /** - * Adds an `end` keyword to the case operator. - * - * `case` operators can only be used as part of a query. - * For a `case` statement used as part of a stored program, use {@link endCase} instead. - */ - end(): ExpressionWrapper; - /** - * Adds `end case` keywords to the case statement. - * - * `case` statements can only be used for flow control in stored programs. - * For a `case` operator used as part of a query, use {@link end} instead. - */ - endCase(): ExpressionWrapper; -} -export declare class CaseEndBuilder implements Endable { - #private; - constructor(props: CaseBuilderProps); - /** - * Adds an `end` keyword to the case operator. - * - * `case` operators can only be used as part of a query. - * For a `case` statement used as part of a stored program, use {@link endCase} instead. - */ - end(): ExpressionWrapper; - /** - * Adds `end case` keywords to the case statement. - * - * `case` statements can only be used for flow control in stored programs. - * For a `case` operator used as part of a query, use {@link end} instead. - */ - endCase(): ExpressionWrapper; -} -interface Whenable { - /** - * Adds a `when` clause to the case statement. - * - * A `when` call must be followed by a {@link CaseThenBuilder.then} call. - */ - when, VE extends OperandValueExpressionOrList>(lhs: unknown extends W ? RE : KyselyTypeError<'when(lhs, op, rhs) is not supported when using case(value)'>, op: ComparisonOperatorExpression, rhs: VE): CaseThenBuilder; - when(expression: Expression): CaseThenBuilder; - when(value: unknown extends W ? KyselyTypeError<'when(value) is only supported when using case(value)'> : W): CaseThenBuilder; -} -interface Endable { - /** - * Adds an `end` keyword to the case operator. - * - * `case` operators can only be used as part of a query. - * For a `case` statement used as part of a stored program, use {@link endCase} instead. - */ - end(): ExpressionWrapper; - /** - * Adds `end case` keywords to the case statement. - * - * `case` statements can only be used for flow control in stored programs. - * For a `case` operator used as part of a query, use {@link end} instead. - */ - endCase(): ExpressionWrapper; -} -export {}; diff --git a/node_modules/kysely/dist/cjs/query-builder/case-builder.js b/node_modules/kysely/dist/cjs/query-builder/case-builder.js deleted file mode 100644 index 8ce41d3..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/case-builder.js +++ /dev/null @@ -1,79 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CaseEndBuilder = exports.CaseWhenBuilder = exports.CaseThenBuilder = exports.CaseBuilder = void 0; -const expression_wrapper_js_1 = require("../expression/expression-wrapper.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -const case_node_js_1 = require("../operation-node/case-node.js"); -const when_node_js_1 = require("../operation-node/when-node.js"); -const binary_operation_parser_js_1 = require("../parser/binary-operation-parser.js"); -const value_parser_js_1 = require("../parser/value-parser.js"); -class CaseBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - when(...args) { - return new CaseThenBuilder({ - ...this.#props, - node: case_node_js_1.CaseNode.cloneWithWhen(this.#props.node, when_node_js_1.WhenNode.create((0, binary_operation_parser_js_1.parseValueBinaryOperationOrExpression)(args))), - }); - } -} -exports.CaseBuilder = CaseBuilder; -class CaseThenBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - then(valueExpression) { - return new CaseWhenBuilder({ - ...this.#props, - node: case_node_js_1.CaseNode.cloneWithThen(this.#props.node, (0, value_parser_js_1.isSafeImmediateValue)(valueExpression) - ? (0, value_parser_js_1.parseSafeImmediateValue)(valueExpression) - : (0, value_parser_js_1.parseValueExpression)(valueExpression)), - }); - } -} -exports.CaseThenBuilder = CaseThenBuilder; -class CaseWhenBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - when(...args) { - return new CaseThenBuilder({ - ...this.#props, - node: case_node_js_1.CaseNode.cloneWithWhen(this.#props.node, when_node_js_1.WhenNode.create((0, binary_operation_parser_js_1.parseValueBinaryOperationOrExpression)(args))), - }); - } - else(valueExpression) { - return new CaseEndBuilder({ - ...this.#props, - node: case_node_js_1.CaseNode.cloneWith(this.#props.node, { - else: (0, value_parser_js_1.isSafeImmediateValue)(valueExpression) - ? (0, value_parser_js_1.parseSafeImmediateValue)(valueExpression) - : (0, value_parser_js_1.parseValueExpression)(valueExpression), - }), - }); - } - end() { - return new expression_wrapper_js_1.ExpressionWrapper(case_node_js_1.CaseNode.cloneWith(this.#props.node, { isStatement: false })); - } - endCase() { - return new expression_wrapper_js_1.ExpressionWrapper(case_node_js_1.CaseNode.cloneWith(this.#props.node, { isStatement: true })); - } -} -exports.CaseWhenBuilder = CaseWhenBuilder; -class CaseEndBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - end() { - return new expression_wrapper_js_1.ExpressionWrapper(case_node_js_1.CaseNode.cloneWith(this.#props.node, { isStatement: false })); - } - endCase() { - return new expression_wrapper_js_1.ExpressionWrapper(case_node_js_1.CaseNode.cloneWith(this.#props.node, { isStatement: true })); - } -} -exports.CaseEndBuilder = CaseEndBuilder; diff --git a/node_modules/kysely/dist/cjs/query-builder/cte-builder.d.ts b/node_modules/kysely/dist/cjs/query-builder/cte-builder.d.ts deleted file mode 100644 index d55a80c..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/cte-builder.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { CommonTableExpressionNode } from '../operation-node/common-table-expression-node.js'; -export declare class CTEBuilder implements OperationNodeSource { - #private; - constructor(props: CTEBuilderProps); - /** - * Makes the common table expression materialized. - */ - materialized(): CTEBuilder; - /** - * Makes the common table expression not materialized. - */ - notMaterialized(): CTEBuilder; - toOperationNode(): CommonTableExpressionNode; -} -interface CTEBuilderProps { - readonly node: CommonTableExpressionNode; -} -export type CTEBuilderCallback = (cte: (name: N2) => CTEBuilder) => CTEBuilder; -export {}; diff --git a/node_modules/kysely/dist/cjs/query-builder/cte-builder.js b/node_modules/kysely/dist/cjs/query-builder/cte-builder.js deleted file mode 100644 index 812cce4..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/cte-builder.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CTEBuilder = void 0; -const common_table_expression_node_js_1 = require("../operation-node/common-table-expression-node.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -class CTEBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - /** - * Makes the common table expression materialized. - */ - materialized() { - return new CTEBuilder({ - ...this.#props, - node: common_table_expression_node_js_1.CommonTableExpressionNode.cloneWith(this.#props.node, { - materialized: true, - }), - }); - } - /** - * Makes the common table expression not materialized. - */ - notMaterialized() { - return new CTEBuilder({ - ...this.#props, - node: common_table_expression_node_js_1.CommonTableExpressionNode.cloneWith(this.#props.node, { - materialized: false, - }), - }); - } - toOperationNode() { - return this.#props.node; - } -} -exports.CTEBuilder = CTEBuilder; diff --git a/node_modules/kysely/dist/cjs/query-builder/delete-query-builder.d.ts b/node_modules/kysely/dist/cjs/query-builder/delete-query-builder.d.ts deleted file mode 100644 index d04d28d..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/delete-query-builder.d.ts +++ /dev/null @@ -1,1348 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import { type JoinCallbackExpression, type JoinReferenceExpression } from '../parser/join-parser.js'; -import { type From, type FromTables, type TableExpression } from '../parser/table-parser.js'; -import { type SelectExpression, type SelectCallback } from '../parser/select-parser.js'; -import type { ReturningAllRow, ReturningCallbackRow, ReturningRow } from '../parser/returning-parser.js'; -import type { ReferenceExpression } from '../parser/reference-parser.js'; -import { QueryNode } from '../operation-node/query-node.js'; -import type { DrainOuterGeneric, NarrowPartial, Nullable, ShallowRecord, SimplifyResult, SimplifySingleResult, SqlBool } from '../util/type-utils.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -import type { KyselyPlugin } from '../plugin/kysely-plugin.js'; -import type { WhereInterface } from './where-interface.js'; -import type { MultiTableReturningInterface } from './returning-interface.js'; -import { type NoResultErrorConstructor } from './no-result-error.js'; -import { DeleteResult } from './delete-result.js'; -import { DeleteQueryNode } from '../operation-node/delete-query-node.js'; -import { type OrderByExpression, type OrderByModifiers, type DirectedOrderByStringReference } from '../parser/order-by-parser.js'; -import type { Explainable, ExplainFormat } from '../util/explainable.js'; -import type { AliasedExpression, Expression } from '../expression/expression.js'; -import { type ComparisonOperatorExpression, type OperandValueExpressionOrList } from '../parser/binary-operation-parser.js'; -import type { KyselyTypeError } from '../util/type-error.js'; -import type { Streamable } from '../util/streamable.js'; -import type { ExpressionOrFactory } from '../parser/expression-parser.js'; -import { type ValueExpression } from '../parser/value-parser.js'; -import type { OutputCallback, OutputExpression, OutputInterface, SelectExpressionFromOutputCallback, SelectExpressionFromOutputExpression } from './output-interface.js'; -import type { OrderByInterface } from './order-by-interface.js'; -export declare class DeleteQueryBuilder implements WhereInterface, MultiTableReturningInterface, OutputInterface, OrderByInterface, OperationNodeSource, Compilable, Explainable, Streamable { - #private; - constructor(props: DeleteQueryBuilderProps); - /** - * Adds a `where` expression to the query. - * - * Calling this method multiple times will combine the expressions using `and`. - * - * Also see {@link whereRef} - * - * ### Examples - * - * - * - * `where` method calls are combined with `AND`: - * - * ```ts - * const person = await db - * .selectFrom('person') - * .selectAll() - * .where('first_name', '=', 'Jennifer') - * .where('age', '>', 40) - * .executeTakeFirst() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "first_name" = $1 and "age" > $2 - * ``` - * - * Operator can be any supported operator or if the typings don't support it - * you can always use: - * - * ```ts - * import { sql } from 'kysely' - * - * sql`your operator` - * ``` - * - * - * - * Find multiple items using a list of identifiers: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where('id', 'in', [1, 2, 3]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "id" in ($1, $2, $3) - * ``` - * - * - * - * You can use the `and` function to create a simple equality - * filter using an object - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where((eb) => eb.and({ - * first_name: 'Jennifer', - * last_name: eb.ref('first_name') - * })) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * "first_name" = $1 - * and "last_name" = "first_name" - * ) - * ``` - * - * - * - * To combine conditions using `OR`, you can use the expression builder. - * There are two ways to create `OR` expressions. Both are shown in this - * example: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * // 1. Using the `or` method on the expression builder: - * .where((eb) => eb.or([ - * eb('first_name', '=', 'Jennifer'), - * eb('first_name', '=', 'Sylvester') - * ])) - * // 2. Chaining expressions using the `or` method on the - * // created expressions: - * .where((eb) => - * eb('last_name', '=', 'Aniston').or('last_name', '=', 'Stallone') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * ("first_name" = $1 or "first_name" = $2) - * and - * ("last_name" = $3 or "last_name" = $4) - * ) - * ``` - * - * - * - * You can add expressions conditionally like this: - * - * ```ts - * import { Expression, SqlBool } from 'kysely' - * - * const firstName: string | undefined = 'Jennifer' - * const lastName: string | undefined = 'Aniston' - * const under18 = true - * const over60 = true - * - * let query = db - * .selectFrom('person') - * .selectAll() - * - * if (firstName) { - * // The query builder is immutable. Remember to reassign - * // the result back to the query variable. - * query = query.where('first_name', '=', firstName) - * } - * - * if (lastName) { - * query = query.where('last_name', '=', lastName) - * } - * - * if (under18 || over60) { - * // Conditional OR expressions can be added like this. - * query = query.where((eb) => { - * const ors: Expression[] = [] - * - * if (under18) { - * ors.push(eb('age', '<', 18)) - * } - * - * if (over60) { - * ors.push(eb('age', '>', 60)) - * } - * - * return eb.or(ors) - * }) - * } - * - * const persons = await query.execute() - * ``` - * - * Both the first and third argument can also be arbitrary expressions like - * subqueries. An expression can defined by passing a function and calling - * the methods of the {@link ExpressionBuilder} passed to the callback: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where( - * (qb) => qb.selectFrom('pet') - * .select('pet.name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1), - * '=', - * 'Fluffy' - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * select "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) = $2 - * ``` - * - * A `where in` query can be built by using the `in` operator and an array - * of values. The values in the array can also be expressions: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where('person.id', 'in', [100, 200, 300]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "id" in ($1, $2, $3) - * ``` - * - * - * - * For complex `where` expressions you can pass in a single callback and - * use the `ExpressionBuilder` to build your expression: - * - * ```ts - * const firstName = 'Jennifer' - * const maxAge = 60 - * - * const persons = await db - * .selectFrom('person') - * .selectAll('person') - * .where(({ eb, or, and, not, exists, selectFrom }) => and([ - * or([ - * eb('first_name', '=', firstName), - * eb('age', '<', maxAge) - * ]), - * not(exists( - * selectFrom('pet') - * .select('pet.id') - * .whereRef('pet.owner_id', '=', 'person.id') - * )) - * ])) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where ( - * ( - * "first_name" = $1 - * or "age" < $2 - * ) - * and not exists ( - * select "pet"."id" from "pet" where "pet"."owner_id" = "person"."id" - * ) - * ) - * ``` - * - * If everything else fails, you can always use the {@link sql} tag - * as any of the arguments, including the operator: - * - * ```ts - * import { sql } from 'kysely' - * - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where( - * sql`coalesce(first_name, last_name)`, - * 'like', - * '%' + name + '%', - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * where coalesce(first_name, last_name) like $1 - * ``` - * - * In all examples above the columns were known at compile time - * (except for the raw {@link sql} expressions). By default kysely only - * allows you to refer to columns that exist in the database **and** - * can be referred to in the current query and context. - * - * Sometimes you may want to refer to columns that come from the user - * input and thus are not available at compile time. - * - * You have two options, the {@link sql} tag or `db.dynamic`. The example below - * uses both: - * - * ```ts - * import { sql } from 'kysely' - * const { ref } = db.dynamic - * - * const columnFromUserInput: string = 'id' - * - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where(ref(columnFromUserInput), '=', 1) - * .where(sql.id(columnFromUserInput), '=', 2) - * .execute() - * ``` - */ - where, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): DeleteQueryBuilder; - where>(expression: E): DeleteQueryBuilder; - /** - * Adds a `where` clause where both sides of the operator are references - * to columns. - * - * The normal `where` method treats the right hand side argument as a - * value by default. `whereRef` treats it as a column reference. This method is - * expecially useful with joins and correlated subqueries. - * - * ### Examples - * - * Usage with a join: - * - * ```ts - * db.selectFrom(['person', 'pet']) - * .selectAll() - * .whereRef('person.first_name', '=', 'pet.name') - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person", "pet" where "person"."first_name" = "pet"."name" - * ``` - * - * Usage in a subquery: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll('person') - * .select((eb) => eb - * .selectFrom('pet') - * .select('name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1) - * .as('pet_name') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".*, ( - * select "name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) as "pet_name" - * from "person" - */ - whereRef, RRE extends ReferenceExpression>(lhs: LRE, op: ComparisonOperatorExpression, rhs: RRE): DeleteQueryBuilder; - /** - * Clears all where expressions from the query. - * - * ### Examples - * - * ```ts - * db.selectFrom('person') - * .selectAll() - * .where('id','=',42) - * .clearWhere() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearWhere(): DeleteQueryBuilder; - /** - * Changes a `delete from` query into a `delete top from` query. - * - * `top` clause is only supported by some dialects like MS SQL Server. - * - * ### Examples - * - * Delete the first 5 rows: - * - * ```ts - * await db - * .deleteFrom('person') - * .top(5) - * .where('age', '>', 18) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * delete top(5) from "person" where "age" > @1 - * ``` - * - * Delete the first 50% of rows: - * - * ```ts - * await db - * .deleteFrom('person') - * .top(50, 'percent') - * .where('age', '>', 18) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * delete top(50) percent from "person" where "age" > @1 - * ``` - */ - top(expression: number | bigint, modifiers?: 'percent'): DeleteQueryBuilder; - /** - * Adds a `using` clause to the query. - * - * This clause allows adding additional tables to the query for filtering/returning - * only. Usually a non-standard syntactic-sugar alternative to a `where` with a sub-query. - * - * ### Examples: - * - * ```ts - * await db - * .deleteFrom('pet') - * .using('person') - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('person.first_name', '=', 'Bob') - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * delete from "pet" - * using "person" - * where "pet"."owner_id" = "person"."id" - * and "person"."first_name" = $1 - * ``` - * - * On supported databases such as MySQL, this clause allows using joins, but requires - * at least one of the tables after the `from` keyword to be also named after - * the `using` keyword. See also {@link innerJoin}, {@link leftJoin}, {@link rightJoin} - * and {@link fullJoin}. - * - * ```ts - * await db - * .deleteFrom('pet') - * .using('pet') - * .leftJoin('person', 'person.id', 'pet.owner_id') - * .where('person.first_name', '=', 'Bob') - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * delete from `pet` - * using `pet` - * left join `person` on `person`.`id` = `pet`.`owner_id` - * where `person`.`first_name` = ? - * ``` - * - * You can also chain multiple invocations of this method, or pass an array to - * a single invocation to name multiple tables. - * - * ```ts - * await db - * .deleteFrom('toy') - * .using(['pet', 'person']) - * .whereRef('toy.pet_id', '=', 'pet.id') - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('person.first_name', '=', 'Bob') - * .returning('pet.name') - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * delete from "toy" - * using "pet", "person" - * where "toy"."pet_id" = "pet"."id" - * and "pet"."owner_id" = "person"."id" - * and "person"."first_name" = $1 - * returning "pet"."name" - * ``` - */ - using>(tables: TE[]): DeleteQueryBuilder, FromTables, O>; - using>(table: TE): DeleteQueryBuilder, FromTables, O>; - /** - * Joins another table to the query using an inner join. - * - * ### Examples - * - * Simple usage by providing a table name and two columns to join: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * // `select` needs to come after the call to `innerJoin` so - * // that you can select from the joined table. - * .select(['person.id', 'pet.name']) - * .execute() - * - * result[0].id - * result[0].name - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."id", "pet"."name" - * from "person" - * inner join "pet" - * on "pet"."owner_id" = "person"."id" - * ``` - * - * You can give an alias for the joined table like this: - * - * ```ts - * await db.selectFrom('person') - * .innerJoin('pet as p', 'p.owner_id', 'person.id') - * .where('p.name', '=', 'Doggo') - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * inner join "pet" as "p" - * on "p"."owner_id" = "person"."id" - * where "p".name" = $1 - * ``` - * - * You can provide a function as the second argument to get a join - * builder for creating more complex joins. The join builder has a - * bunch of `on*` methods for building the `on` clause of the join. - * There's basically an equivalent for every `where` method - * (`on`, `onRef`, `onExists` etc.). You can do all the same things - * with the `on` method that you can with the corresponding `where` - * method. See the `where` method documentation for more examples. - * - * ```ts - * await db.selectFrom('person') - * .innerJoin( - * 'pet', - * (join) => join - * .onRef('pet.owner_id', '=', 'person.id') - * .on('pet.name', '=', 'Doggo') - * ) - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * inner join "pet" - * on "pet"."owner_id" = "person"."id" - * and "pet"."name" = $1 - * ``` - * - * You can join a subquery by providing a select query (or a callback) - * as the first argument: - * - * ```ts - * await db.selectFrom('person') - * .innerJoin( - * db.selectFrom('pet') - * .select(['owner_id', 'name']) - * .where('name', '=', 'Doggo') - * .as('doggos'), - * 'doggos.owner_id', - * 'person.id', - * ) - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * inner join ( - * select "owner_id", "name" - * from "pet" - * where "name" = $1 - * ) as "doggos" - * on "doggos"."owner_id" = "person"."id" - * ``` - */ - innerJoin, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): DeleteQueryBuilderWithInnerJoin; - innerJoin, FN extends JoinCallbackExpression>(table: TE, callback: FN): DeleteQueryBuilderWithInnerJoin; - /** - * Just like {@link innerJoin} but adds a left join instead of an inner join. - */ - leftJoin, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): DeleteQueryBuilderWithLeftJoin; - leftJoin, FN extends JoinCallbackExpression>(table: TE, callback: FN): DeleteQueryBuilderWithLeftJoin; - /** - * Just like {@link innerJoin} but adds a right join instead of an inner join. - */ - rightJoin, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): DeleteQueryBuilderWithRightJoin; - rightJoin, FN extends JoinCallbackExpression>(table: TE, callback: FN): DeleteQueryBuilderWithRightJoin; - /** - * Just like {@link innerJoin} but adds a full join instead of an inner join. - */ - fullJoin, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): DeleteQueryBuilderWithFullJoin; - fullJoin, FN extends JoinCallbackExpression>(table: TE, callback: FN): DeleteQueryBuilderWithFullJoin; - /** - * Allows you to return data from modified rows. - * - * On supported databases like PostgreSQL, this method can be chained to - * `insert`, `update`, `delete` and `merge` queries to return data. - * - * Note that on SQLite you need to give aliases for the expressions to avoid - * [this bug](https://sqlite.org/forum/forumpost/033daf0b32) in SQLite. - * For example `.returning('id as id')`. - * - * Also see the {@link returningAll} method. - * - * ### Examples - * - * Return one column: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * ``` - * - * Return multiple columns: - * - * ```ts - * const { id, last_name } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning(['id', 'last_name']) - * .executeTakeFirstOrThrow() - * ``` - * - * Return arbitrary expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * const { id, full_name, first_pet_id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning((eb) => [ - * 'id as id', - * sql`concat(first_name, ' ', last_name)`.as('full_name'), - * eb.selectFrom('pet').select('pet.id').limit(1).as('first_pet_id') - * ]) - * .executeTakeFirstOrThrow() - * ``` - */ - returning>(selections: ReadonlyArray): DeleteQueryBuilder>; - returning>(callback: CB): DeleteQueryBuilder>; - returning>(selection: SE): DeleteQueryBuilder>; - /** - * Adds `returning *` or `returning table.*` clause to the query. - * - * ### Examples - * - * Return all columns. - * - * ```ts - * const pets = await db - * .deleteFrom('pet') - * .returningAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL) - * - * ```sql - * delete from "pet" returning * - * ``` - * - * Return all columns from all tables - * - * ```ts - * const result = await db - * .deleteFrom('toy') - * .using(['pet', 'person']) - * .whereRef('toy.pet_id', '=', 'pet.id') - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('person.first_name', '=', 'Zoro') - * .returningAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL) - * - * ```sql - * delete from "toy" - * using "pet", "person" - * where "toy"."pet_id" = "pet"."id" - * and "pet"."owner_id" = "person"."id" - * and "person"."first_name" = $1 - * returning * - * ``` - * - * Return all columns from a single table. - * - * ```ts - * const result = await db - * .deleteFrom('toy') - * .using(['pet', 'person']) - * .whereRef('toy.pet_id', '=', 'pet.id') - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('person.first_name', '=', 'Itachi') - * .returningAll('pet') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL) - * - * ```sql - * delete from "toy" - * using "pet", "person" - * where "toy"."pet_id" = "pet"."id" - * and "pet"."owner_id" = "person"."id" - * and "person"."first_name" = $1 - * returning "pet".* - * ``` - * - * Return all columns from multiple tables. - * - * ```ts - * const result = await db - * .deleteFrom('toy') - * .using(['pet', 'person']) - * .whereRef('toy.pet_id', '=', 'pet.id') - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('person.first_name', '=', 'Luffy') - * .returningAll(['toy', 'pet']) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL) - * - * ```sql - * delete from "toy" - * using "pet", "person" - * where "toy"."pet_id" = "pet"."id" - * and "pet"."owner_id" = "person"."id" - * and "person"."first_name" = $1 - * returning "toy".*, "pet".* - * ``` - */ - returningAll(tables: ReadonlyArray): DeleteQueryBuilder>; - /** - * Adds a `returning *` or `returning table.*` to an insert/update/delete/merge - * query on databases that support `returning` such as PostgreSQL. - * - * Also see the {@link returning} method. - */ - returningAll(table: T): DeleteQueryBuilder>; - returningAll(): DeleteQueryBuilder>; - /** - * Allows you to return data from modified rows. - * - * On supported databases like MS SQL Server (MSSQL), this method can be chained - * to `insert`, `update`, `delete` and `merge` queries to return data. - * - * Also see the {@link outputAll} method. - * - * ### Examples - * - * Return one column: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .output('inserted.id') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * gender: 'female', - * }) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "gender") - * output "inserted"."id" - * values (@1, @2, @3) - * ``` - * - * Return multiple columns: - * - * ```ts - * const { old_first_name, old_last_name, new_first_name, new_last_name } = await db - * .updateTable('person') - * .set({ first_name: 'John', last_name: 'Doe' }) - * .output([ - * 'deleted.first_name as old_first_name', - * 'deleted.last_name as old_last_name', - * 'inserted.first_name as new_first_name', - * 'inserted.last_name as new_last_name', - * ]) - * .where('created_at', '<', new Date()) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * update "person" - * set "first_name" = @1, "last_name" = @2 - * output "deleted"."first_name" as "old_first_name", - * "deleted"."last_name" as "old_last_name", - * "inserted"."first_name" as "new_first_name", - * "inserted"."last_name" as "new_last_name" - * where "created_at" < @3 - * ``` - * - * Return arbitrary expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * const { full_name } = await db - * .deleteFrom('person') - * .output((eb) => sql`concat(${eb.ref('deleted.first_name')}, ' ', ${eb.ref('deleted.last_name')})`.as('full_name')) - * .where('created_at', '<', new Date()) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * delete from "person" - * output concat("deleted"."first_name", ' ', "deleted"."last_name") as "full_name" - * where "created_at" < @1 - * ``` - * - * Return the action performed on the row: - * - * ```ts - * await db - * .mergeInto('person') - * .using('pet', 'pet.owner_id', 'person.id') - * .whenMatched() - * .thenDelete() - * .whenNotMatched() - * .thenInsertValues({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male' - * }) - * .output([ - * 'inserted.id as inserted_id', - * 'deleted.id as deleted_id', - * ]) - * .execute() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * merge into "person" - * using "pet" on "pet"."owner_id" = "person"."id" - * when matched then delete - * when not matched then - * insert ("first_name", "last_name", "gender") - * values (@1, @2, @3) - * output "inserted"."id" as "inserted_id", "deleted"."id" as "deleted_id" - * ``` - * - */ - output>(selections: readonly OE[]): DeleteQueryBuilder>>; - output>(callback: CB): DeleteQueryBuilder>>; - output>(selection: OE): DeleteQueryBuilder>>; - /** - * Adds an `output {prefix}.*` to an `insert`/`update`/`delete`/`merge` query on databases - * that support `output` such as MS SQL Server (MSSQL). - * - * Also see the {@link output} method. - */ - outputAll(table: 'deleted'): DeleteQueryBuilder>; - /** - * Clears all `returning` clauses from the query. - * - * ### Examples - * - * ```ts - * await db.deleteFrom('pet') - * .returningAll() - * .where('name', '=', 'Max') - * .clearReturning() - * .execute() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * delete from "pet" where "name" = "Max" - * ``` - */ - clearReturning(): DeleteQueryBuilder; - /** - * Clears the `limit` clause from the query. - * - * ### Examples - * - * ```ts - * await db.deleteFrom('pet') - * .returningAll() - * .where('name', '=', 'Max') - * .limit(5) - * .clearLimit() - * .execute() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * delete from "pet" where "name" = "Max" returning * - * ``` - */ - clearLimit(): DeleteQueryBuilder; - /** - * @description This is only supported by some dialects like MySQL or SQLite with `SQLITE_ENABLE_UPDATE_DELETE_LIMIT`. - */ - orderBy>(expr: OE, modifiers?: OrderByModifiers): DeleteQueryBuilder; - /** - * @description This is only supported by some dialects like MySQL or SQLite with `SQLITE_ENABLE_UPDATE_DELETE_LIMIT`. - * @deprecated It does ~2-2.6x more compile-time instantiations compared to multiple chained `orderBy(expr, modifiers?)` calls (in `order by` clauses with reasonable item counts), and has broken autocompletion. - */ - orderBy | DirectedOrderByStringReference>(exprs: ReadonlyArray): DeleteQueryBuilder; - /** - * @description This is only supported by some dialects like MySQL or SQLite with `SQLITE_ENABLE_UPDATE_DELETE_LIMIT`. - * @deprecated It does ~2.9x more compile-time instantiations compared to a `orderBy(expr, direction)` call. - */ - orderBy>(expr: OE): DeleteQueryBuilder; - /** - * @description This is only supported by some dialects like MySQL or SQLite with `SQLITE_ENABLE_UPDATE_DELETE_LIMIT`. - * @deprecated Use `orderBy(expr, (ob) => ...)` instead. - */ - orderBy>(expr: OE, modifiers: Expression): DeleteQueryBuilder; - /** - * Clears the `order by` clause from the query. - * - * See {@link orderBy} for adding an `order by` clause or item to a query. - * - * ### Examples - * - * ```ts - * const query = db - * .selectFrom('person') - * .selectAll() - * .orderBy('id', 'desc') - * - * const results = await query - * .clearOrderBy() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearOrderBy(): DeleteQueryBuilder; - /** - * Adds a limit clause to the query. - * - * A limit clause in a delete query is only supported by some dialects - * like MySQL. - * - * ### Examples - * - * Delete 5 oldest items in a table: - * - * ```ts - * await db - * .deleteFrom('pet') - * .orderBy('created_at') - * .limit(5) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * delete from `pet` order by `created_at` limit ? - * ``` - */ - limit(limit: ValueExpression): DeleteQueryBuilder; - /** - * This can be used to add any additional SQL to the end of the query. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.deleteFrom('person') - * .where('first_name', '=', 'John') - * .modifyEnd(sql`-- This is a comment`) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * delete from `person` - * where `first_name` = "John" -- This is a comment - * ``` - */ - modifyEnd(modifier: Expression): DeleteQueryBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - * - * If you want to conditionally call a method on `this`, see - * the {@link $if} method. - * - * ### Examples - * - * The next example uses a helper function `log` to log a query: - * - * ```ts - * import type { Compilable } from 'kysely' - * - * function log(qb: T): T { - * console.log(qb.compile()) - * return qb - * } - * - * await db.deleteFrom('person') - * .$call(log) - * .execute() - * ``` - */ - $call(func: (qb: this) => T): T; - /** - * Call `func(this)` if `condition` is true. - * - * This method is especially handy with optional selects. Any `returning` or `returningAll` - * method calls add columns as optional fields to the output type when called inside - * the `func` callback. This is because we can't know if those selections were actually - * made before running the code. - * - * You can also call any other methods inside the callback. - * - * ### Examples - * - * ```ts - * async function deletePerson(id: number, returnLastName: boolean) { - * return await db - * .deleteFrom('person') - * .where('id', '=', id) - * .returning(['id', 'first_name']) - * .$if(returnLastName, (qb) => qb.returning('last_name')) - * .executeTakeFirstOrThrow() - * } - * ``` - * - * Any selections added inside the `if` callback will be added as optional fields to the - * output type since we can't know if the selections were actually made before running - * the code. In the example above the return type of the `deletePerson` function is: - * - * ```ts - * Promise<{ - * id: number - * first_name: string - * last_name?: string - * }> - * ``` - */ - $if(condition: boolean, func: (qb: this) => DeleteQueryBuilder): O2 extends DeleteResult ? DeleteQueryBuilder : O2 extends O & infer E ? DeleteQueryBuilder> : DeleteQueryBuilder>; - /** - * Change the output type of the query. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `DeleteQueryBuilder` with a new output type. - */ - $castTo(): DeleteQueryBuilder; - /** - * Narrows (parts of) the output type of the query. - * - * Kysely tries to be as type-safe as possible, but in some cases we have to make - * compromises for better maintainability and compilation performance. At present, - * Kysely doesn't narrow the output type of the query when using {@link where} and {@link returning} or {@link returningAll}. - * - * This utility method is very useful for these situations, as it removes unncessary - * runtime assertion/guard code. Its input type is limited to the output type - * of the query, so you can't add a column that doesn't exist, or change a column's - * type to something that doesn't exist in its union type. - * - * ### Examples - * - * Turn this code: - * - * ```ts - * import type { Person } from 'type-editor' // imaginary module - * - * const person = await db.deleteFrom('person') - * .where('id', '=', 3) - * .where('nullable_column', 'is not', null) - * .returningAll() - * .executeTakeFirstOrThrow() - * - * if (isWithNoNullValue(person)) { - * functionThatExpectsPersonWithNonNullValue(person) - * } - * - * function isWithNoNullValue(person: Person): person is Person & { nullable_column: string } { - * return person.nullable_column != null - * } - * ``` - * - * Into this: - * - * ```ts - * import type { NotNull } from 'kysely' - * - * const person = await db.deleteFrom('person') - * .where('id', '=', 3) - * .where('nullable_column', 'is not', null) - * .returningAll() - * .$narrowType<{ nullable_column: NotNull }>() - * .executeTakeFirstOrThrow() - * - * functionThatExpectsPersonWithNonNullValue(person) - * ``` - */ - $narrowType(): DeleteQueryBuilder>; - /** - * Asserts that query's output row type equals the given type `T`. - * - * This method can be used to simplify excessively complex types to make TypeScript happy - * and much faster. - * - * Kysely uses complex type magic to achieve its type safety. This complexity is sometimes too much - * for TypeScript and you get errors like this: - * - * ``` - * error TS2589: Type instantiation is excessively deep and possibly infinite. - * ``` - * - * In these case you can often use this method to help TypeScript a little bit. When you use this - * method to assert the output type of a query, Kysely can drop the complex output type that - * consists of multiple nested helper types and replace it with the simple asserted type. - * - * Using this method doesn't reduce type safety at all. You have to pass in a type that is - * structurally equal to the current type. - * - * ### Examples - * - * ```ts - * import type { Species } from 'type-editor' // imaginary module - * - * async function deletePersonAndPets(personId: number) { - * return await db - * .with('deleted_person', (qb) => qb - * .deleteFrom('person') - * .where('id', '=', personId) - * .returning('first_name') - * .$assertType<{ first_name: string }>() - * ) - * .with('deleted_pets', (qb) => qb - * .deleteFrom('pet') - * .where('owner_id', '=', personId) - * .returning(['name as pet_name', 'species']) - * .$assertType<{ pet_name: string, species: Species }>() - * ) - * .selectFrom(['deleted_person', 'deleted_pets']) - * .selectAll() - * .execute() - * } - * ``` - */ - $assertType(): O extends T ? DeleteQueryBuilder : KyselyTypeError<`$assertType() call failed: The type passed in is not equal to the output type of the query.`>; - /** - * Returns a copy of this DeleteQueryBuilder instance with the given plugin installed. - */ - withPlugin(plugin: KyselyPlugin): DeleteQueryBuilder; - toOperationNode(): DeleteQueryNode; - compile(): CompiledQuery>; - /** - * Executes the query and returns an array of rows. - * - * Also see the {@link executeTakeFirst} and {@link executeTakeFirstOrThrow} methods. - */ - execute(): Promise[]>; - /** - * Executes the query and returns the first result or undefined if - * the query returned no result. - */ - executeTakeFirst(): Promise>; - /** - * Executes the query and returns the first result or throws if - * the query returned no result. - * - * By default an instance of {@link NoResultError} is thrown, but you can - * provide a custom error class, or callback as the only argument to throw a different - * error. - */ - executeTakeFirstOrThrow(errorConstructor?: NoResultErrorConstructor | ((node: QueryNode) => Error)): Promise>; - /** - * Executes the query and streams the rows. - * - * The optional argument `chunkSize` defines how many rows to fetch from the database - * at a time. It only affects some dialects like PostgreSQL that support it. - * - * ### Examples - * - * ```ts - * const stream = db - * .selectFrom('person') - * .select(['first_name', 'last_name']) - * .where('gender', '=', 'other') - * .stream() - * - * for await (const person of stream) { - * console.log(person.first_name) - * - * if (person.last_name === 'Something') { - * // Breaking or returning before the stream has ended will release - * // the database connection and invalidate the stream. - * break - * } - * } - * ``` - */ - stream(chunkSize?: number): AsyncIterableIterator; - /** - * Executes query with `explain` statement before the main query. - * - * ```ts - * const explained = await db - * .selectFrom('person') - * .where('gender', '=', 'female') - * .selectAll() - * .explain('json') - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * explain format=json select * from `person` where `gender` = ? - * ``` - * - * You can also execute `explain analyze` statements. - * - * ```ts - * import { sql } from 'kysely' - * - * const explained = await db - * .selectFrom('person') - * .where('gender', '=', 'female') - * .selectAll() - * .explain('json', sql`analyze`) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * explain (analyze, format json) select * from "person" where "gender" = $1 - * ``` - */ - explain = Record>(format?: ExplainFormat, options?: Expression): Promise; -} -export interface DeleteQueryBuilderProps { - readonly queryId: QueryId; - readonly queryNode: DeleteQueryNode; - readonly executor: QueryExecutor; -} -export type DeleteQueryBuilderWithInnerJoin> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? InnerJoinedBuilder : never : TE extends keyof DB ? DeleteQueryBuilder : TE extends AliasedExpression ? InnerJoinedBuilder : TE extends (qb: any) => AliasedExpression ? InnerJoinedBuilder : never; -type InnerJoinedBuilder = A extends keyof DB ? DeleteQueryBuilder, TB | A, O> : DeleteQueryBuilder, TB | A, O>; -type InnerJoinedDB = DrainOuterGeneric<{ - [C in keyof DB | A]: C extends A ? R : C extends keyof DB ? DB[C] : never; -}>; -export type DeleteQueryBuilderWithLeftJoin> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? LeftJoinedBuilder : never : TE extends keyof DB ? LeftJoinedBuilder : TE extends AliasedExpression ? LeftJoinedBuilder : TE extends (qb: any) => AliasedExpression ? LeftJoinedBuilder : never; -type LeftJoinedBuilder = A extends keyof DB ? DeleteQueryBuilder, TB | A, O> : DeleteQueryBuilder>, TB | A, O>; -type LeftJoinedDB = DrainOuterGeneric<{ - [C in keyof DB | A]: C extends A ? Nullable : C extends keyof DB ? DB[C] : never; -}>; -export type DeleteQueryBuilderWithRightJoin> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? RightJoinedBuilder : never : TE extends keyof DB ? RightJoinedBuilder : TE extends AliasedExpression ? RightJoinedBuilder : TE extends (qb: any) => AliasedExpression ? RightJoinedBuilder : never; -type RightJoinedBuilder = DeleteQueryBuilder, TB | A, O>; -type RightJoinedDB = DrainOuterGeneric<{ - [C in keyof DB | A]: C extends A ? R : C extends TB ? Nullable : C extends keyof DB ? DB[C] : never; -}>; -export type DeleteQueryBuilderWithFullJoin> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? OuterJoinedBuilder : never : TE extends keyof DB ? OuterJoinedBuilder : TE extends AliasedExpression ? OuterJoinedBuilder : TE extends (qb: any) => AliasedExpression ? OuterJoinedBuilder : never; -type OuterJoinedBuilder = DeleteQueryBuilder, TB | A, O>; -type OuterJoinedBuilderDB = DrainOuterGeneric<{ - [C in keyof DB | A]: C extends A ? Nullable : C extends TB ? Nullable : C extends keyof DB ? DB[C] : never; -}>; -export {}; diff --git a/node_modules/kysely/dist/cjs/query-builder/delete-query-builder.js b/node_modules/kysely/dist/cjs/query-builder/delete-query-builder.js deleted file mode 100644 index bce4ff9..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/delete-query-builder.js +++ /dev/null @@ -1,504 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DeleteQueryBuilder = void 0; -const join_parser_js_1 = require("../parser/join-parser.js"); -const table_parser_js_1 = require("../parser/table-parser.js"); -const select_parser_js_1 = require("../parser/select-parser.js"); -const query_node_js_1 = require("../operation-node/query-node.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -const no_result_error_js_1 = require("./no-result-error.js"); -const delete_result_js_1 = require("./delete-result.js"); -const delete_query_node_js_1 = require("../operation-node/delete-query-node.js"); -const limit_node_js_1 = require("../operation-node/limit-node.js"); -const order_by_parser_js_1 = require("../parser/order-by-parser.js"); -const binary_operation_parser_js_1 = require("../parser/binary-operation-parser.js"); -const value_parser_js_1 = require("../parser/value-parser.js"); -const top_parser_js_1 = require("../parser/top-parser.js"); -class DeleteQueryBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - where(...args) { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithWhere(this.#props.queryNode, (0, binary_operation_parser_js_1.parseValueBinaryOperationOrExpression)(args)), - }); - } - whereRef(lhs, op, rhs) { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithWhere(this.#props.queryNode, (0, binary_operation_parser_js_1.parseReferentialBinaryOperation)(lhs, op, rhs)), - }); - } - clearWhere() { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithoutWhere(this.#props.queryNode), - }); - } - /** - * Changes a `delete from` query into a `delete top from` query. - * - * `top` clause is only supported by some dialects like MS SQL Server. - * - * ### Examples - * - * Delete the first 5 rows: - * - * ```ts - * await db - * .deleteFrom('person') - * .top(5) - * .where('age', '>', 18) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * delete top(5) from "person" where "age" > @1 - * ``` - * - * Delete the first 50% of rows: - * - * ```ts - * await db - * .deleteFrom('person') - * .top(50, 'percent') - * .where('age', '>', 18) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * delete top(50) percent from "person" where "age" > @1 - * ``` - */ - top(expression, modifiers) { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithTop(this.#props.queryNode, (0, top_parser_js_1.parseTop)(expression, modifiers)), - }); - } - using(tables) { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: delete_query_node_js_1.DeleteQueryNode.cloneWithUsing(this.#props.queryNode, (0, table_parser_js_1.parseTableExpressionOrList)(tables)), - }); - } - innerJoin(...args) { - return this.#join('InnerJoin', args); - } - leftJoin(...args) { - return this.#join('LeftJoin', args); - } - rightJoin(...args) { - return this.#join('RightJoin', args); - } - fullJoin(...args) { - return this.#join('FullJoin', args); - } - #join(joinType, args) { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithJoin(this.#props.queryNode, (0, join_parser_js_1.parseJoin)(joinType, args)), - }); - } - returning(selection) { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithReturning(this.#props.queryNode, (0, select_parser_js_1.parseSelectArg)(selection)), - }); - } - returningAll(table) { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithReturning(this.#props.queryNode, (0, select_parser_js_1.parseSelectAll)(table)), - }); - } - output(args) { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithOutput(this.#props.queryNode, (0, select_parser_js_1.parseSelectArg)(args)), - }); - } - outputAll(table) { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithOutput(this.#props.queryNode, (0, select_parser_js_1.parseSelectAll)(table)), - }); - } - /** - * Clears all `returning` clauses from the query. - * - * ### Examples - * - * ```ts - * await db.deleteFrom('pet') - * .returningAll() - * .where('name', '=', 'Max') - * .clearReturning() - * .execute() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * delete from "pet" where "name" = "Max" - * ``` - */ - clearReturning() { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithoutReturning(this.#props.queryNode), - }); - } - /** - * Clears the `limit` clause from the query. - * - * ### Examples - * - * ```ts - * await db.deleteFrom('pet') - * .returningAll() - * .where('name', '=', 'Max') - * .limit(5) - * .clearLimit() - * .execute() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * delete from "pet" where "name" = "Max" returning * - * ``` - */ - clearLimit() { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: delete_query_node_js_1.DeleteQueryNode.cloneWithoutLimit(this.#props.queryNode), - }); - } - orderBy(...args) { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithOrderByItems(this.#props.queryNode, (0, order_by_parser_js_1.parseOrderBy)(args)), - }); - } - clearOrderBy() { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithoutOrderBy(this.#props.queryNode), - }); - } - /** - * Adds a limit clause to the query. - * - * A limit clause in a delete query is only supported by some dialects - * like MySQL. - * - * ### Examples - * - * Delete 5 oldest items in a table: - * - * ```ts - * await db - * .deleteFrom('pet') - * .orderBy('created_at') - * .limit(5) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * delete from `pet` order by `created_at` limit ? - * ``` - */ - limit(limit) { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: delete_query_node_js_1.DeleteQueryNode.cloneWithLimit(this.#props.queryNode, limit_node_js_1.LimitNode.create((0, value_parser_js_1.parseValueExpression)(limit))), - }); - } - /** - * This can be used to add any additional SQL to the end of the query. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.deleteFrom('person') - * .where('first_name', '=', 'John') - * .modifyEnd(sql`-- This is a comment`) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * delete from `person` - * where `first_name` = "John" -- This is a comment - * ``` - */ - modifyEnd(modifier) { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithEndModifier(this.#props.queryNode, modifier.toOperationNode()), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - * - * If you want to conditionally call a method on `this`, see - * the {@link $if} method. - * - * ### Examples - * - * The next example uses a helper function `log` to log a query: - * - * ```ts - * import type { Compilable } from 'kysely' - * - * function log(qb: T): T { - * console.log(qb.compile()) - * return qb - * } - * - * await db.deleteFrom('person') - * .$call(log) - * .execute() - * ``` - */ - $call(func) { - return func(this); - } - /** - * Call `func(this)` if `condition` is true. - * - * This method is especially handy with optional selects. Any `returning` or `returningAll` - * method calls add columns as optional fields to the output type when called inside - * the `func` callback. This is because we can't know if those selections were actually - * made before running the code. - * - * You can also call any other methods inside the callback. - * - * ### Examples - * - * ```ts - * async function deletePerson(id: number, returnLastName: boolean) { - * return await db - * .deleteFrom('person') - * .where('id', '=', id) - * .returning(['id', 'first_name']) - * .$if(returnLastName, (qb) => qb.returning('last_name')) - * .executeTakeFirstOrThrow() - * } - * ``` - * - * Any selections added inside the `if` callback will be added as optional fields to the - * output type since we can't know if the selections were actually made before running - * the code. In the example above the return type of the `deletePerson` function is: - * - * ```ts - * Promise<{ - * id: number - * first_name: string - * last_name?: string - * }> - * ``` - */ - $if(condition, func) { - if (condition) { - return func(this); - } - return new DeleteQueryBuilder({ - ...this.#props, - }); - } - /** - * Change the output type of the query. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `DeleteQueryBuilder` with a new output type. - */ - $castTo() { - return new DeleteQueryBuilder(this.#props); - } - /** - * Narrows (parts of) the output type of the query. - * - * Kysely tries to be as type-safe as possible, but in some cases we have to make - * compromises for better maintainability and compilation performance. At present, - * Kysely doesn't narrow the output type of the query when using {@link where} and {@link returning} or {@link returningAll}. - * - * This utility method is very useful for these situations, as it removes unncessary - * runtime assertion/guard code. Its input type is limited to the output type - * of the query, so you can't add a column that doesn't exist, or change a column's - * type to something that doesn't exist in its union type. - * - * ### Examples - * - * Turn this code: - * - * ```ts - * import type { Person } from 'type-editor' // imaginary module - * - * const person = await db.deleteFrom('person') - * .where('id', '=', 3) - * .where('nullable_column', 'is not', null) - * .returningAll() - * .executeTakeFirstOrThrow() - * - * if (isWithNoNullValue(person)) { - * functionThatExpectsPersonWithNonNullValue(person) - * } - * - * function isWithNoNullValue(person: Person): person is Person & { nullable_column: string } { - * return person.nullable_column != null - * } - * ``` - * - * Into this: - * - * ```ts - * import type { NotNull } from 'kysely' - * - * const person = await db.deleteFrom('person') - * .where('id', '=', 3) - * .where('nullable_column', 'is not', null) - * .returningAll() - * .$narrowType<{ nullable_column: NotNull }>() - * .executeTakeFirstOrThrow() - * - * functionThatExpectsPersonWithNonNullValue(person) - * ``` - */ - $narrowType() { - return new DeleteQueryBuilder(this.#props); - } - /** - * Asserts that query's output row type equals the given type `T`. - * - * This method can be used to simplify excessively complex types to make TypeScript happy - * and much faster. - * - * Kysely uses complex type magic to achieve its type safety. This complexity is sometimes too much - * for TypeScript and you get errors like this: - * - * ``` - * error TS2589: Type instantiation is excessively deep and possibly infinite. - * ``` - * - * In these case you can often use this method to help TypeScript a little bit. When you use this - * method to assert the output type of a query, Kysely can drop the complex output type that - * consists of multiple nested helper types and replace it with the simple asserted type. - * - * Using this method doesn't reduce type safety at all. You have to pass in a type that is - * structurally equal to the current type. - * - * ### Examples - * - * ```ts - * import type { Species } from 'type-editor' // imaginary module - * - * async function deletePersonAndPets(personId: number) { - * return await db - * .with('deleted_person', (qb) => qb - * .deleteFrom('person') - * .where('id', '=', personId) - * .returning('first_name') - * .$assertType<{ first_name: string }>() - * ) - * .with('deleted_pets', (qb) => qb - * .deleteFrom('pet') - * .where('owner_id', '=', personId) - * .returning(['name as pet_name', 'species']) - * .$assertType<{ pet_name: string, species: Species }>() - * ) - * .selectFrom(['deleted_person', 'deleted_pets']) - * .selectAll() - * .execute() - * } - * ``` - */ - $assertType() { - return new DeleteQueryBuilder(this.#props); - } - /** - * Returns a copy of this DeleteQueryBuilder instance with the given plugin installed. - */ - withPlugin(plugin) { - return new DeleteQueryBuilder({ - ...this.#props, - executor: this.#props.executor.withPlugin(plugin), - }); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.queryNode, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - /** - * Executes the query and returns an array of rows. - * - * Also see the {@link executeTakeFirst} and {@link executeTakeFirstOrThrow} methods. - */ - async execute() { - const compiledQuery = this.compile(); - const result = await this.#props.executor.executeQuery(compiledQuery); - const { adapter } = this.#props.executor; - const query = compiledQuery.query; - if ((query.returning && adapter.supportsReturning) || - (query.output && adapter.supportsOutput)) { - return result.rows; - } - return [new delete_result_js_1.DeleteResult(result.numAffectedRows ?? BigInt(0))]; - } - /** - * Executes the query and returns the first result or undefined if - * the query returned no result. - */ - async executeTakeFirst() { - const [result] = await this.execute(); - return result; - } - /** - * Executes the query and returns the first result or throws if - * the query returned no result. - * - * By default an instance of {@link NoResultError} is thrown, but you can - * provide a custom error class, or callback as the only argument to throw a different - * error. - */ - async executeTakeFirstOrThrow(errorConstructor = no_result_error_js_1.NoResultError) { - const result = await this.executeTakeFirst(); - if (result === undefined) { - const error = (0, no_result_error_js_1.isNoResultErrorConstructor)(errorConstructor) - ? new errorConstructor(this.toOperationNode()) - : errorConstructor(this.toOperationNode()); - throw error; - } - return result; - } - async *stream(chunkSize = 100) { - const compiledQuery = this.compile(); - const stream = this.#props.executor.stream(compiledQuery, chunkSize); - for await (const item of stream) { - yield* item.rows; - } - } - async explain(format, options) { - const builder = new DeleteQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithExplain(this.#props.queryNode, format, options), - }); - return await builder.execute(); - } -} -exports.DeleteQueryBuilder = DeleteQueryBuilder; diff --git a/node_modules/kysely/dist/cjs/query-builder/delete-result.d.ts b/node_modules/kysely/dist/cjs/query-builder/delete-result.d.ts deleted file mode 100644 index 7502c4c..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/delete-result.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare class DeleteResult { - readonly numDeletedRows: bigint; - constructor(numDeletedRows: bigint); -} diff --git a/node_modules/kysely/dist/cjs/query-builder/delete-result.js b/node_modules/kysely/dist/cjs/query-builder/delete-result.js deleted file mode 100644 index 0b7a3fe..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/delete-result.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DeleteResult = void 0; -class DeleteResult { - numDeletedRows; - constructor(numDeletedRows) { - this.numDeletedRows = numDeletedRows; - } -} -exports.DeleteResult = DeleteResult; diff --git a/node_modules/kysely/dist/cjs/query-builder/function-module.d.ts b/node_modules/kysely/dist/cjs/query-builder/function-module.d.ts deleted file mode 100644 index 6143e25..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/function-module.d.ts +++ /dev/null @@ -1,592 +0,0 @@ -import { ExpressionWrapper } from '../expression/expression-wrapper.js'; -import type { Expression } from '../expression/expression.js'; -import type { ExtractTypeFromCoalesce1, ExtractTypeFromCoalesce3, ExtractTypeFromCoalesce2, ExtractTypeFromCoalesce4, ExtractTypeFromCoalesce5 } from '../parser/coalesce-parser.js'; -import { type ExtractTypeFromReferenceExpression, type ReferenceExpression, type StringReference, type ExtractTypeFromStringReference } from '../parser/reference-parser.js'; -import type { KyselyTypeError } from '../util/type-error.js'; -import type { IsNever, ShallowDehydrateObject, ShallowDehydrateValue, Simplify } from '../util/type-utils.js'; -import { AggregateFunctionBuilder } from './aggregate-function-builder.js'; -import type { SelectQueryBuilderExpression } from '../query-builder/select-query-builder-expression.js'; -import type { Selectable, SelectType } from '../util/column-type.js'; -/** - * Helpers for type safe SQL function calls. - * - * You can always use the {@link sql} tag to call functions and build arbitrary - * expressions. This module simply has shortcuts for most common function calls. - * - * ### Examples - * - * - * - * This example shows how to create function calls. These examples also work in any - * other place (`where` calls, updates, inserts etc.). The only difference is that you - * leave out the alias (the `as` call) if you use these in any other place than `select`. - * - * ```ts - * import { sql } from 'kysely' - * - * const result = await db.selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .select(({ fn, val, ref }) => [ - * 'person.id', - * - * // The `fn` module contains the most common - * // functions. - * fn.count('pet.id').as('pet_count'), - * - * // You can call any function by calling `fn` - * // directly. The arguments are treated as column - * // references by default. If you want to pass in - * // values, use the `val` function. - * fn('concat', [ - * val('Ms. '), - * 'first_name', - * val(' '), - * 'last_name' - * ]).as('full_name_with_title'), - * - * // You can call any aggregate function using the - * // `fn.agg` function. - * fn.agg('array_agg', ['pet.name']).as('pet_names'), - * - * // And once again, you can use the `sql` - * // template tag. The template tag substitutions - * // are treated as values by default. If you want - * // to reference columns, you can use the `ref` - * // function. - * sql`concat( - * ${ref('first_name')}, - * ' ', - * ${ref('last_name')} - * )`.as('full_name') - * ]) - * .groupBy('person.id') - * .having((eb) => eb.fn.count('pet.id'), '>', 10) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * "person"."id", - * count("pet"."id") as "pet_count", - * concat($1, "first_name", $2, "last_name") as "full_name_with_title", - * array_agg("pet"."name") as "pet_names", - * concat("first_name", ' ', "last_name") as "full_name" - * from "person" - * inner join "pet" on "pet"."owner_id" = "person"."id" - * group by "person"."id" - * having count("pet"."id") > $3 - * ``` - */ -export interface FunctionModule { - /** - * Creates a function call. - * - * To create an aggregate function call, use {@link FunctionModule.agg}. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .selectAll('person') - * .where(db.fn('upper', ['first_name']), '=', 'JENNIFER') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where upper("first_name") = $1 - * ``` - * - * If you prefer readability over type-safety, you can always use raw `sql`: - * - * ```ts - * import { sql } from 'kysely' - * - * await db.selectFrom('person') - * .selectAll('person') - * .where(sql`upper(first_name)`, '=', 'JENNIFER') - * .execute() - * ``` - */ - = ReferenceExpression>(name: string, args?: ReadonlyArray): ExpressionWrapper; - /** - * Creates an aggregate function call. - * - * This is a specialized version of the `fn` method, that returns an {@link AggregateFunctionBuilder} - * instance. A builder that allows you to chain additional methods such as `distinct`, - * `filterWhere` and `over`. - * - * See {@link avg}, {@link count}, {@link countAll}, {@link max}, {@link min}, {@link sum} - * shortcuts of common aggregate functions. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .select(({ fn }) => [ - * fn.agg('rank').over().as('rank'), - * fn.agg('group_concat', ['first_name']).distinct().as('first_names') - * ]) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select rank() over() as "rank", - * group_concat(distinct "first_name") as "first_names" - * from "person" - * ``` - */ - agg = ReferenceExpression>(name: string, args?: ReadonlyArray): AggregateFunctionBuilder; - /** - * Calls the `avg` function for the column or expression given as the argument. - * - * This sql function calculates the average value for a given column. - * - * For additional functionality such as distinct, filtering and window functions, - * refer to {@link AggregateFunctionBuilder}. An instance of this builder is - * returned when calling this function. - * - * ### Examples - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.avg('price').as('avg_price')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select avg("price") as "avg_price" from "toy" - * ``` - * - * If this function is used in a `select` statement, the type of the selected - * expression will be `number | string` by default. This is because Kysely can't know the - * type the db driver outputs. Sometimes the output can be larger than the largest - * JavaScript number and a string is returned instead. Most drivers allow you - * to configure the output type of large numbers and Kysely can't know if you've - * done so. - * - * You can specify the output type of the expression by providing the type as - * the first type argument: - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.avg('price').as('avg_price')) - * .execute() - * ``` - * - * Sometimes a null is returned, e.g. when row count is 0, and no `group by` - * was used. It is highly recommended to include null in the output type union - * and handle null values in post-execute code, or wrap the function with a {@link coalesce} - * function. - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.avg('price').as('avg_price')) - * .execute() - * ``` - */ - avg = ReferenceExpression>(expr: RE): AggregateFunctionBuilder; - /** - * Calls the `coalesce` function for given arguments. - * - * This sql function returns the first non-null value from left to right, commonly - * used to provide a default scalar for nullable columns or functions. - * - * If this function is used in a `select` statement, the type of the selected - * expression is inferred in the same manner that the sql function computes. - * A union of arguments' types - if a non-nullable argument exists, it stops - * there (ignoring any further arguments' types) and exludes null from the final - * union type. - * - * `(string | null, number | null)` is inferred as `string | number | null`. - * - * `(string | null, number, Date | null)` is inferred as `string | number`. - * - * `(number, string | null)` is inferred as `number`. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.selectFrom('person') - * .select((eb) => eb.fn.coalesce('nullable_column', sql.lit('')).as('column')) - * .where('first_name', '=', 'Jessie') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select coalesce("nullable_column", '') as "column" from "person" where "first_name" = $1 - * ``` - * - * You can combine this function with other helpers in this module: - * - * ```ts - * await db.selectFrom('person') - * .select((eb) => eb.fn.coalesce(eb.fn.avg('age'), eb.lit(0)).as('avg_age')) - * .where('first_name', '=', 'Jennifer') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select coalesce(avg("age"), 0) as "avg_age" from "person" where "first_name" = $1 - * ``` - */ - coalesce>(v1: V1): ExpressionWrapper>; - coalesce, V2 extends ReferenceExpression>(v1: V1, v2: V2): ExpressionWrapper>; - coalesce, V2 extends ReferenceExpression, V3 extends ReferenceExpression>(v1: V1, v2: V2, v3: V3): ExpressionWrapper>; - coalesce, V2 extends ReferenceExpression, V3 extends ReferenceExpression, V4 extends ReferenceExpression>(v1: V1, v2: V2, v3: V3, v4: V4): ExpressionWrapper>; - coalesce, V2 extends ReferenceExpression, V3 extends ReferenceExpression, V4 extends ReferenceExpression, V5 extends ReferenceExpression>(v1: V1, v2: V2, v3: V3, v4: V4, v5: V5): ExpressionWrapper>; - /** - * Calls the `count` function for the column or expression given as the argument. - * - * When called with a column as argument, this sql function counts the number of rows where there - * is a non-null value in that column. - * - * For counting all rows nulls included (`count(*)`), see {@link countAll}. - * - * For additional functionality such as distinct, filtering and window functions, - * refer to {@link AggregateFunctionBuilder}. An instance of this builder is - * returned when calling this function. - * - * ### Examples - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.count('id').as('num_toys')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select count("id") as "num_toys" from "toy" - * ``` - * - * If this function is used in a `select` statement, the type of the selected - * expression will be `number | string | bigint` by default. This is because - * Kysely can't know the type the db driver outputs. Sometimes the output can - * be larger than the largest JavaScript number and a string is returned instead. - * Most drivers allow you to configure the output type of large numbers and Kysely - * can't know if you've done so. - * - * You can specify the output type of the expression by providing - * the type as the first type argument: - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.count('id').as('num_toys')) - * .execute() - * ``` - */ - count = ReferenceExpression>(expr: RE): AggregateFunctionBuilder; - /** - * Calls the `count` function with `*` or `table.*` as argument. - * - * When called with `*` as argument, this sql function counts the number of rows, - * nulls included. - * - * For counting rows with non-null values in a given column (`count(column)`), - * see {@link count}. - * - * For additional functionality such as filtering and window functions, refer - * to {@link AggregateFunctionBuilder}. An instance of this builder is returned - * when calling this function. - * - * ### Examples - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.countAll().as('num_toys')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select count(*) as "num_toys" from "toy" - * ``` - * - * If this is used in a `select` statement, the type of the selected expression - * will be `number | string | bigint` by default. This is because Kysely - * can't know the type the db driver outputs. Sometimes the output can be larger - * than the largest JavaScript number and a string is returned instead. Most - * drivers allow you to configure the output type of large numbers and Kysely - * can't know if you've done so. - * - * You can specify the output type of the expression by providing - * the type as the first type argument: - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.countAll().as('num_toys')) - * .execute() - * ``` - * - * Some databases, such as PostgreSQL, support scoping the function to a specific - * table: - * - * ```ts - * await db.selectFrom('toy') - * .innerJoin('pet', 'pet.id', 'toy.pet_id') - * .select((eb) => eb.fn.countAll('toy').as('num_toys')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select count("toy".*) as "num_toys" - * from "toy" inner join "pet" on "pet"."id" = "toy"."pet_id" - * ``` - */ - countAll(table: T): AggregateFunctionBuilder; - countAll(): AggregateFunctionBuilder; - /** - * Calls the `max` function for the column or expression given as the argument. - * - * This sql function calculates the maximum value for a given column. - * - * For additional functionality such as distinct, filtering and window functions, - * refer to {@link AggregateFunctionBuilder}. An instance of this builder is - * returned when calling this function. - * - * If this function is used in a `select` statement, the type of the selected - * expression will be the referenced column's type. This is because the result - * is within the column's value range. - * - * ### Examples - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.max('price').as('max_price')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select max("price") as "max_price" from "toy" - * ``` - * - * Sometimes a null is returned, e.g. when row count is 0, and no `group by` - * was used. It is highly recommended to include null in the output type union - * and handle null values in post-execute code, or wrap the function with a {@link coalesce} - * function. - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.max('price').as('max_price')) - * .execute() - * ``` - */ - max = ReferenceExpression>(expr: RE): AggregateFunctionBuilder extends true ? ExtractTypeFromReferenceExpression : O>; - /** - * Calls the `min` function for the column or expression given as the argument. - * - * This sql function calculates the minimum value for a given column. - * - * For additional functionality such as distinct, filtering and window functions, - * refer to {@link AggregateFunctionBuilder}. An instance of this builder is - * returned when calling this function. - * - * If this function is used in a `select` statement, the type of the selected - * expression will be the referenced column's type. This is because the result - * is within the column's value range. - * - * ### Examples - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.min('price').as('min_price')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select min("price") as "min_price" from "toy" - * ``` - * - * Sometimes a null is returned, e.g. when row count is 0, and no `group by` - * was used. It is highly recommended to include null in the output type union - * and handle null values in post-execute code, or wrap the function with a {@link coalesce} - * function. - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.min('price').as('min_price')) - * .execute() - * ``` - */ - min = ReferenceExpression>(expr: RE): AggregateFunctionBuilder extends true ? ExtractTypeFromReferenceExpression : O>; - /** - * Calls the `sum` function for the column or expression given as the argument. - * - * This sql function sums the values of a given column. - * - * For additional functionality such as distinct, filtering and window functions, - * refer to {@link AggregateFunctionBuilder}. An instance of this builder is - * returned when calling this function. - * - * ### Examples - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.sum('price').as('total_price')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select sum("price") as "total_price" from "toy" - * ``` - * - * If this function is used in a `select` statement, the type of the selected - * expression will be `number | string` by default. This is because Kysely can't know the - * type the db driver outputs. Sometimes the output can be larger than the largest - * JavaScript number and a string is returned instead. Most drivers allow you - * to configure the output type of large numbers and Kysely can't know if you've - * done so. - * - * You can specify the output type of the expression by providing the type as - * the first type argument: - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.sum('price').as('total_price')) - * .execute() - * ``` - * - * Sometimes a null is returned, e.g. when row count is 0, and no `group by` - * was used. It is highly recommended to include null in the output type union - * and handle null values in post-execute code, or wrap the function with a {@link coalesce} - * function. - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.sum('price').as('total_price')) - * .execute() - * ``` - */ - sum = ReferenceExpression>(expr: RE): AggregateFunctionBuilder; - /** - * Calls the `any` function for the column or expression given as the argument. - * - * The argument must be a subquery or evaluate to an array. - * - * ### Examples - * - * In the following example, `nicknames` is assumed to be a column of type `string[]`: - * - * ```ts - * await db.selectFrom('person') - * .selectAll('person') - * .where((eb) => eb( - * eb.val('Jen'), '=', eb.fn.any('person.nicknames') - * )) - * .execute() - * ``` - * - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * "person".* - * from - * "person" - * where - * $1 = any("person"."nicknames") - * ``` - */ - any>(expr: RE): Exclude, null> extends ReadonlyArray ? ExpressionWrapper : KyselyTypeError<'any(expr) call failed: expr must be an array'>; - any(subquery: SelectQueryBuilderExpression>): ExpressionWrapper; - any(expr: Expression>): ExpressionWrapper; - /** - * Creates a `json_agg` function call. - * - * This is only supported by some dialects like PostgreSQL. - * - * ### Examples - * - * You can use it on table expressions: - * - * ```ts - * await db.selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .select((eb) => ['first_name', eb.fn.jsonAgg('pet').as('pets')]) - * .groupBy('person.first_name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name", json_agg("pet") as "pets" - * from "person" - * inner join "pet" on "pet"."owner_id" = "person"."id" - * group by "person"."first_name" - * ``` - * - * or on columns: - * - * ```ts - * await db.selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .select((eb) => [ - * 'first_name', - * eb.fn.jsonAgg('pet.name').as('pet_names'), - * ]) - * .groupBy('person.first_name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name", json_agg("pet"."name") AS "pet_names" - * from "person" - * inner join "pet" ON "pet"."owner_id" = "person"."id" - * group by "person"."first_name" - * ``` - */ - jsonAgg>(table: T): AggregateFunctionBuilder>>[] : T extends Expression ? Simplify>[] : never>; - jsonAgg>(column: RE): AggregateFunctionBuilder>>[] | null>; - /** - * Creates a to_json function call. - * - * This function is only available on PostgreSQL. - * - * ```ts - * await db.selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .select((eb) => ['first_name', eb.fn.toJson('pet').as('pet')]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name", to_json("pet") as "pet" - * from "person" - * inner join "pet" on "pet"."owner_id" = "person"."id" - * ``` - */ - toJson>(table: T): ExpressionWrapper>> : T extends Expression ? Simplify> : never>; -} -export declare function createFunctionModule(): FunctionModule; diff --git a/node_modules/kysely/dist/cjs/query-builder/function-module.js b/node_modules/kysely/dist/cjs/query-builder/function-module.js deleted file mode 100644 index 1fa1bc9..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/function-module.js +++ /dev/null @@ -1,62 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createFunctionModule = createFunctionModule; -const expression_wrapper_js_1 = require("../expression/expression-wrapper.js"); -const aggregate_function_node_js_1 = require("../operation-node/aggregate-function-node.js"); -const function_node_js_1 = require("../operation-node/function-node.js"); -const reference_parser_js_1 = require("../parser/reference-parser.js"); -const select_parser_js_1 = require("../parser/select-parser.js"); -const aggregate_function_builder_js_1 = require("./aggregate-function-builder.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -const table_parser_js_1 = require("../parser/table-parser.js"); -function createFunctionModule() { - const fn = (name, args) => { - return new expression_wrapper_js_1.ExpressionWrapper(function_node_js_1.FunctionNode.create(name, (0, reference_parser_js_1.parseReferenceExpressionOrList)(args ?? []))); - }; - const agg = (name, args) => { - return new aggregate_function_builder_js_1.AggregateFunctionBuilder({ - aggregateFunctionNode: aggregate_function_node_js_1.AggregateFunctionNode.create(name, args ? (0, reference_parser_js_1.parseReferenceExpressionOrList)(args) : undefined), - }); - }; - return Object.assign(fn, { - agg, - avg(column) { - return agg('avg', [column]); - }, - coalesce(...values) { - return fn('coalesce', values); - }, - count(column) { - return agg('count', [column]); - }, - countAll(table) { - return new aggregate_function_builder_js_1.AggregateFunctionBuilder({ - aggregateFunctionNode: aggregate_function_node_js_1.AggregateFunctionNode.create('count', (0, select_parser_js_1.parseSelectAll)(table)), - }); - }, - max(column) { - return agg('max', [column]); - }, - min(column) { - return agg('min', [column]); - }, - sum(column) { - return agg('sum', [column]); - }, - any(column) { - return fn('any', [column]); - }, - jsonAgg(table) { - return new aggregate_function_builder_js_1.AggregateFunctionBuilder({ - aggregateFunctionNode: aggregate_function_node_js_1.AggregateFunctionNode.create('json_agg', [ - (0, object_utils_js_1.isString)(table) ? (0, table_parser_js_1.parseTable)(table) : table.toOperationNode(), - ]), - }); - }, - toJson(table) { - return new expression_wrapper_js_1.ExpressionWrapper(function_node_js_1.FunctionNode.create('to_json', [ - (0, object_utils_js_1.isString)(table) ? (0, table_parser_js_1.parseTable)(table) : table.toOperationNode(), - ])); - }, - }); -} diff --git a/node_modules/kysely/dist/cjs/query-builder/having-interface.d.ts b/node_modules/kysely/dist/cjs/query-builder/having-interface.d.ts deleted file mode 100644 index 26d7980..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/having-interface.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { ComparisonOperatorExpression, OperandValueExpressionOrList } from '../parser/binary-operation-parser.js'; -import type { ReferenceExpression } from '../parser/reference-parser.js'; -export interface HavingInterface { - /** - * Just like {@link WhereInterface.where | where} but adds a `having` statement - * instead of a `where` statement. - */ - having, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): HavingInterface; - having(expression: E): HavingInterface; - /** - * Just like {@link WhereInterface.whereRef | whereRef} but adds a `having` statement - * instead of a `where` statement. - */ - havingRef, RRE extends ReferenceExpression>(lhs: LRE, op: ComparisonOperatorExpression, rhs: RRE): HavingInterface; -} diff --git a/node_modules/kysely/dist/cjs/query-builder/having-interface.js b/node_modules/kysely/dist/cjs/query-builder/having-interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/having-interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/query-builder/insert-query-builder.d.ts b/node_modules/kysely/dist/cjs/query-builder/insert-query-builder.d.ts deleted file mode 100644 index 204a4f5..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/insert-query-builder.d.ts +++ /dev/null @@ -1,1235 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import { type SelectExpression, type SelectCallback } from '../parser/select-parser.js'; -import { type InsertExpression } from '../parser/insert-values-parser.js'; -import { InsertQueryNode } from '../operation-node/insert-query-node.js'; -import { QueryNode } from '../operation-node/query-node.js'; -import type { NarrowPartial, SimplifyResult, SimplifySingleResult } from '../util/type-utils.js'; -import { type UpdateObjectExpression } from '../parser/update-set-parser.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -import { InsertResult } from './insert-result.js'; -import type { KyselyPlugin } from '../plugin/kysely-plugin.js'; -import type { ReturningAllRow, ReturningCallbackRow, ReturningRow } from '../parser/returning-parser.js'; -import { type NoResultErrorConstructor } from './no-result-error.js'; -import { type ExpressionOrFactory } from '../parser/expression-parser.js'; -import type { ReturningInterface } from './returning-interface.js'; -import { OnConflictBuilder, type OnConflictDatabase, type OnConflictDoNothingBuilder, type OnConflictTables, type OnConflictUpdateBuilder } from './on-conflict-builder.js'; -import type { Selectable } from '../util/column-type.js'; -import type { Explainable, ExplainFormat } from '../util/explainable.js'; -import type { Expression } from '../expression/expression.js'; -import type { KyselyTypeError } from '../util/type-error.js'; -import type { Streamable } from '../util/streamable.js'; -import type { OutputCallback, OutputExpression, OutputInterface, SelectExpressionFromOutputCallback, SelectExpressionFromOutputExpression } from './output-interface.js'; -export declare class InsertQueryBuilder implements ReturningInterface, OutputInterface, OperationNodeSource, Compilable, Explainable, Streamable { - #private; - constructor(props: InsertQueryBuilderProps); - /** - * Sets the values to insert for an {@link Kysely.insertInto | insert} query. - * - * This method takes an object whose keys are column names and values are - * values to insert. In addition to the column's type, the values can be - * raw {@link sql} snippets or select queries. - * - * You must provide all fields you haven't explicitly marked as nullable - * or optional using {@link Generated} or {@link ColumnType}. - * - * The return value of an `insert` query is an instance of {@link InsertResult}. The - * {@link InsertResult.insertId | insertId} field holds the auto incremented primary - * key if the database returned one. - * - * On PostgreSQL and some other dialects, you need to call `returning` to get - * something out of the query. - * - * Also see the {@link expression} method for inserting the result of a select - * query or any other expression. - * - * ### Examples - * - * - * - * Insert a single row: - * - * ```ts - * const result = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40 - * }) - * .executeTakeFirst() - * - * // `insertId` is only available on dialects that - * // automatically return the id of the inserted row - * // such as MySQL and SQLite. On PostgreSQL, for example, - * // you need to add a `returning` clause to the query to - * // get anything out. See the "returning data" example. - * console.log(result.insertId) - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * insert into `person` (`first_name`, `last_name`, `age`) values (?, ?, ?) - * ``` - * - * - * - * On dialects that support it (for example PostgreSQL) you can insert multiple - * rows by providing an array. Note that the return value is once again very - * dialect-specific. Some databases may only return the id of the *last* inserted - * row and some return nothing at all unless you call `returning`. - * - * ```ts - * await db - * .insertInto('person') - * .values([{ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40, - * }, { - * first_name: 'Arnold', - * last_name: 'Schwarzenegger', - * age: 70, - * }]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "age") values (($1, $2, $3), ($4, $5, $6)) - * ``` - * - * - * - * On supported dialects like PostgreSQL you need to chain `returning` to the query to get - * the inserted row's columns (or any other expression) as the return value. `returning` - * works just like `select`. Refer to `select` method's examples and documentation for - * more info. - * - * ```ts - * const result = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40, - * }) - * .returning(['id', 'first_name as name']) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "age") values ($1, $2, $3) returning "id", "first_name" as "name" - * ``` - * - * - * - * In addition to primitives, the values can also be arbitrary expressions. - * You can build the expressions by using a callback and calling the methods - * on the expression builder passed to it: - * - * ```ts - * import { sql } from 'kysely' - * - * const ani = "Ani" - * const ston = "ston" - * - * const result = await db - * .insertInto('person') - * .values(({ ref, selectFrom, fn }) => ({ - * first_name: 'Jennifer', - * last_name: sql`concat(${ani}, ${ston})`, - * middle_name: ref('first_name'), - * age: selectFrom('person') - * .select(fn.avg('age').as('avg_age')), - * })) - * .executeTakeFirst() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ( - * "first_name", - * "last_name", - * "middle_name", - * "age" - * ) - * values ( - * $1, - * concat($2, $3), - * "first_name", - * (select avg("age") as "avg_age" from "person") - * ) - * ``` - * - * You can also use the callback version of subqueries or raw expressions: - * - * ```ts - * await db.with('jennifer', (db) => db - * .selectFrom('person') - * .where('first_name', '=', 'Jennifer') - * .select(['id', 'first_name', 'gender']) - * .limit(1) - * ).insertInto('pet').values((eb) => ({ - * owner_id: eb.selectFrom('jennifer').select('id'), - * name: eb.selectFrom('jennifer').select('first_name'), - * species: 'cat', - * })) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * with "jennifer" as ( - * select "id", "first_name", "gender" - * from "person" - * where "first_name" = $1 - * limit $2 - * ) - * insert into "pet" ("owner_id", "name", "species") - * values ( - * (select "id" from "jennifer"), - * (select "first_name" from "jennifer"), - * $3 - * ) - * ``` - */ - values(insert: InsertExpression): InsertQueryBuilder; - /** - * Sets the columns to insert. - * - * The {@link values} method sets both the columns and the values and this method - * is not needed. But if you are using the {@link expression} method, you can use - * this method to set the columns to insert. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .columns(['first_name']) - * .expression((eb) => eb.selectFrom('pet').select('pet.name')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name") - * select "pet"."name" from "pet" - * ``` - */ - columns(columns: ReadonlyArray): InsertQueryBuilder; - /** - * Insert an arbitrary expression. For example the result of a select query. - * - * ### Examples - * - * - * - * You can create an `INSERT INTO SELECT FROM` query using the `expression` method. - * This API doesn't follow our WYSIWYG principles and might be a bit difficult to - * remember. The reasons for this design stem from implementation difficulties. - * - * ```ts - * const result = await db.insertInto('person') - * .columns(['first_name', 'last_name', 'age']) - * .expression((eb) => eb - * .selectFrom('pet') - * .select((eb) => [ - * 'pet.name', - * eb.val('Petson').as('last_name'), - * eb.lit(7).as('age'), - * ]) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "age") - * select "pet"."name", $1 as "last_name", 7 as "age from "pet" - * ``` - */ - expression(expression: ExpressionOrFactory): InsertQueryBuilder; - /** - * Creates an `insert into "person" default values` query. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .defaultValues() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" default values - * ``` - */ - defaultValues(): InsertQueryBuilder; - /** - * This can be used to add any additional SQL to the end of the query. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.insertInto('person') - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male', - * }) - * .modifyEnd(sql`-- This is a comment`) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * insert into `person` ("first_name", "last_name", "gender") - * values (?, ?, ?) -- This is a comment - * ``` - */ - modifyEnd(modifier: Expression): InsertQueryBuilder; - /** - * Changes an `insert into` query to an `insert ignore into` query. - * - * This is only supported by some dialects like MySQL. - * - * To avoid a footgun, when invoked with the SQLite dialect, this method will - * be handled like {@link orIgnore}. See also, {@link orAbort}, {@link orFail}, - * {@link orReplace}, and {@link orRollback}. - * - * If you use the ignore modifier, ignorable errors that occur while executing the - * insert statement are ignored. For example, without ignore, a row that duplicates - * an existing unique index or primary key value in the table causes a duplicate-key - * error and the statement is aborted. With ignore, the row is discarded and no error - * occurs. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .ignore() - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'female', - * }) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * insert ignore into `person` (`first_name`, `last_name`, `gender`) values (?, ?, ?) - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * insert or ignore into "person" ("first_name", "last_name", "gender") values (?, ?, ?) - * ``` - */ - ignore(): InsertQueryBuilder; - /** - * Changes an `insert into` query to an `insert or ignore into` query. - * - * This is only supported by some dialects like SQLite. - * - * To avoid a footgun, when invoked with the MySQL dialect, this method will - * be handled like {@link ignore}. - * - * See also, {@link orAbort}, {@link orFail}, {@link orReplace}, and {@link orRollback}. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .orIgnore() - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'female', - * }) - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * insert or ignore into "person" ("first_name", "last_name", "gender") values (?, ?, ?) - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * insert ignore into `person` (`first_name`, `last_name`, `gender`) values (?, ?, ?) - * ``` - */ - orIgnore(): InsertQueryBuilder; - /** - * Changes an `insert into` query to an `insert or abort into` query. - * - * This is only supported by some dialects like SQLite. - * - * See also, {@link orIgnore}, {@link orFail}, {@link orReplace}, and {@link orRollback}. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .orAbort() - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'female', - * }) - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * insert or abort into "person" ("first_name", "last_name", "gender") values (?, ?, ?) - * ``` - */ - orAbort(): InsertQueryBuilder; - /** - * Changes an `insert into` query to an `insert or fail into` query. - * - * This is only supported by some dialects like SQLite. - * - * See also, {@link orIgnore}, {@link orAbort}, {@link orReplace}, and {@link orRollback}. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .orFail() - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'female', - * }) - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * insert or fail into "person" ("first_name", "last_name", "gender") values (?, ?, ?) - * ``` - */ - orFail(): InsertQueryBuilder; - /** - * Changes an `insert into` query to an `insert or replace into` query. - * - * This is only supported by some dialects like SQLite. - * - * You can also use {@link Kysely.replaceInto} to achieve the same result. - * - * See also, {@link orIgnore}, {@link orAbort}, {@link orFail}, and {@link orRollback}. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .orReplace() - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'female', - * }) - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * insert or replace into "person" ("first_name", "last_name", "gender") values (?, ?, ?) - * ``` - */ - orReplace(): InsertQueryBuilder; - /** - * Changes an `insert into` query to an `insert or rollback into` query. - * - * This is only supported by some dialects like SQLite. - * - * See also, {@link orIgnore}, {@link orAbort}, {@link orFail}, and {@link orReplace}. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .orRollback() - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'female', - * }) - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * insert or rollback into "person" ("first_name", "last_name", "gender") values (?, ?, ?) - * ``` - */ - orRollback(): InsertQueryBuilder; - /** - * Changes an `insert into` query to an `insert top into` query. - * - * `top` clause is only supported by some dialects like MS SQL Server. - * - * ### Examples - * - * Insert the first 5 rows: - * - * ```ts - * import { sql } from 'kysely' - * - * await db.insertInto('person') - * .top(5) - * .columns(['first_name', 'gender']) - * .expression( - * (eb) => eb.selectFrom('pet').select(['name', sql.lit('other').as('gender')]) - * ) - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * insert top(5) into "person" ("first_name", "gender") select "name", 'other' as "gender" from "pet" - * ``` - * - * Insert the first 50 percent of rows: - * - * ```ts - * import { sql } from 'kysely' - * - * await db.insertInto('person') - * .top(50, 'percent') - * .columns(['first_name', 'gender']) - * .expression( - * (eb) => eb.selectFrom('pet').select(['name', sql.lit('other').as('gender')]) - * ) - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * insert top(50) percent into "person" ("first_name", "gender") select "name", 'other' as "gender" from "pet" - * ``` - */ - top(expression: number | bigint, modifiers?: 'percent'): InsertQueryBuilder; - /** - * Adds an `on conflict` clause to the query. - * - * `on conflict` is only supported by some dialects like PostgreSQL and SQLite. On MySQL - * you can use {@link ignore} and {@link onDuplicateKeyUpdate} to achieve similar results. - * - * ### Examples - * - * ```ts - * await db - * .insertInto('pet') - * .values({ - * name: 'Catto', - * species: 'cat', - * owner_id: 3, - * }) - * .onConflict((oc) => oc - * .column('name') - * .doUpdateSet({ species: 'hamster' }) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "pet" ("name", "species", "owner_id") - * values ($1, $2, $3) - * on conflict ("name") - * do update set "species" = $4 - * ``` - * - * You can provide the name of the constraint instead of a column name: - * - * ```ts - * await db - * .insertInto('pet') - * .values({ - * name: 'Catto', - * species: 'cat', - * owner_id: 3, - * }) - * .onConflict((oc) => oc - * .constraint('pet_name_key') - * .doUpdateSet({ species: 'hamster' }) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "pet" ("name", "species", "owner_id") - * values ($1, $2, $3) - * on conflict on constraint "pet_name_key" - * do update set "species" = $4 - * ``` - * - * You can also specify an expression as the conflict target in case - * the unique index is an expression index: - * - * ```ts - * import { sql } from 'kysely' - * - * await db - * .insertInto('pet') - * .values({ - * name: 'Catto', - * species: 'cat', - * owner_id: 3, - * }) - * .onConflict((oc) => oc - * .expression(sql`lower(name)`) - * .doUpdateSet({ species: 'hamster' }) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "pet" ("name", "species", "owner_id") - * values ($1, $2, $3) - * on conflict (lower(name)) - * do update set "species" = $4 - * ``` - * - * You can add a filter for the update statement like this: - * - * ```ts - * await db - * .insertInto('pet') - * .values({ - * name: 'Catto', - * species: 'cat', - * owner_id: 3, - * }) - * .onConflict((oc) => oc - * .column('name') - * .doUpdateSet({ species: 'hamster' }) - * .where('excluded.name', '!=', 'Catto') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "pet" ("name", "species", "owner_id") - * values ($1, $2, $3) - * on conflict ("name") - * do update set "species" = $4 - * where "excluded"."name" != $5 - * ``` - * - * You can create an `on conflict do nothing` clauses like this: - * - * ```ts - * await db - * .insertInto('pet') - * .values({ - * name: 'Catto', - * species: 'cat', - * owner_id: 3, - * }) - * .onConflict((oc) => oc - * .column('name') - * .doNothing() - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "pet" ("name", "species", "owner_id") - * values ($1, $2, $3) - * on conflict ("name") do nothing - * ``` - * - * You can refer to the columns of the virtual `excluded` table - * in a type-safe way using a callback and the `ref` method of - * `ExpressionBuilder`: - * - * ```ts - * await db.insertInto('person') - * .values({ - * id: 1, - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male', - * }) - * .onConflict(oc => oc - * .column('id') - * .doUpdateSet({ - * first_name: (eb) => eb.ref('excluded.first_name'), - * last_name: (eb) => eb.ref('excluded.last_name') - * }) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("id", "first_name", "last_name", "gender") - * values ($1, $2, $3, $4) - * on conflict ("id") - * do update set - * "first_name" = "excluded"."first_name", - * "last_name" = "excluded"."last_name" - * ``` - */ - onConflict(callback: (builder: OnConflictBuilder) => OnConflictUpdateBuilder, OnConflictTables> | OnConflictDoNothingBuilder): InsertQueryBuilder; - /** - * Adds `on duplicate key update` to the query. - * - * If you specify `on duplicate key update`, and a row is inserted that would cause - * a duplicate value in a unique index or primary key, an update of the old row occurs. - * - * This is only implemented by some dialects like MySQL. On most dialects you should - * use {@link onConflict} instead. - * - * ### Examples - * - * ```ts - * await db - * .insertInto('person') - * .values({ - * id: 1, - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male', - * }) - * .onDuplicateKeyUpdate({ updated_at: new Date().toISOString() }) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * insert into `person` (`id`, `first_name`, `last_name`, `gender`) - * values (?, ?, ?, ?) - * on duplicate key update `updated_at` = ? - * ``` - */ - onDuplicateKeyUpdate(update: UpdateObjectExpression): InsertQueryBuilder; - /** - * Allows you to return data from modified rows. - * - * On supported databases like PostgreSQL, this method can be chained to - * `insert`, `update`, `delete` and `merge` queries to return data. - * - * Note that on SQLite you need to give aliases for the expressions to avoid - * [this bug](https://sqlite.org/forum/forumpost/033daf0b32) in SQLite. - * For example `.returning('id as id')`. - * - * Also see the {@link returningAll} method. - * - * ### Examples - * - * Return one column: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * ``` - * - * Return multiple columns: - * - * ```ts - * const { id, last_name } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning(['id', 'last_name']) - * .executeTakeFirstOrThrow() - * ``` - * - * Return arbitrary expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * const { id, full_name, first_pet_id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning((eb) => [ - * 'id as id', - * sql`concat(first_name, ' ', last_name)`.as('full_name'), - * eb.selectFrom('pet').select('pet.id').limit(1).as('first_pet_id') - * ]) - * .executeTakeFirstOrThrow() - * ``` - */ - returning>(selections: ReadonlyArray): InsertQueryBuilder>; - returning>(callback: CB): InsertQueryBuilder>; - returning>(selection: SE): InsertQueryBuilder>; - /** - * Adds a `returning *` to an insert/update/delete/merge query on databases - * that support `returning` such as PostgreSQL. - * - * Also see the {@link returning} method. - */ - returningAll(): InsertQueryBuilder>; - /** - * Allows you to return data from modified rows. - * - * On supported databases like MS SQL Server (MSSQL), this method can be chained - * to `insert`, `update`, `delete` and `merge` queries to return data. - * - * Also see the {@link outputAll} method. - * - * ### Examples - * - * Return one column: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .output('inserted.id') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * gender: 'female', - * }) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "gender") - * output "inserted"."id" - * values (@1, @2, @3) - * ``` - * - * Return multiple columns: - * - * ```ts - * const { old_first_name, old_last_name, new_first_name, new_last_name } = await db - * .updateTable('person') - * .set({ first_name: 'John', last_name: 'Doe' }) - * .output([ - * 'deleted.first_name as old_first_name', - * 'deleted.last_name as old_last_name', - * 'inserted.first_name as new_first_name', - * 'inserted.last_name as new_last_name', - * ]) - * .where('created_at', '<', new Date()) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * update "person" - * set "first_name" = @1, "last_name" = @2 - * output "deleted"."first_name" as "old_first_name", - * "deleted"."last_name" as "old_last_name", - * "inserted"."first_name" as "new_first_name", - * "inserted"."last_name" as "new_last_name" - * where "created_at" < @3 - * ``` - * - * Return arbitrary expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * const { full_name } = await db - * .deleteFrom('person') - * .output((eb) => sql`concat(${eb.ref('deleted.first_name')}, ' ', ${eb.ref('deleted.last_name')})`.as('full_name')) - * .where('created_at', '<', new Date()) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * delete from "person" - * output concat("deleted"."first_name", ' ', "deleted"."last_name") as "full_name" - * where "created_at" < @1 - * ``` - * - * Return the action performed on the row: - * - * ```ts - * await db - * .mergeInto('person') - * .using('pet', 'pet.owner_id', 'person.id') - * .whenMatched() - * .thenDelete() - * .whenNotMatched() - * .thenInsertValues({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male' - * }) - * .output([ - * 'inserted.id as inserted_id', - * 'deleted.id as deleted_id', - * ]) - * .execute() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * merge into "person" - * using "pet" on "pet"."owner_id" = "person"."id" - * when matched then delete - * when not matched then - * insert ("first_name", "last_name", "gender") - * values (@1, @2, @3) - * output "inserted"."id" as "inserted_id", "deleted"."id" as "deleted_id" - * ``` - * - */ - output>(selections: readonly OE[]): InsertQueryBuilder>>; - output>(callback: CB): InsertQueryBuilder>>; - output>(selection: OE): InsertQueryBuilder>>; - /** - * Adds an `output {prefix}.*` to an `insert`/`update`/`delete`/`merge` query on databases - * that support `output` such as MS SQL Server (MSSQL). - * - * Also see the {@link output} method. - */ - outputAll(table: 'inserted'): InsertQueryBuilder>; - /** - * Clears all `returning` clauses from the query. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .values({ first_name: 'James', last_name: 'Smith', gender: 'male' }) - * .returning(['first_name']) - * .clearReturning() - * .execute() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "gender") values ($1, $2, $3) - * ``` - */ - clearReturning(): InsertQueryBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - * - * If you want to conditionally call a method on `this`, see - * the {@link $if} method. - * - * ### Examples - * - * The next example uses a helper function `log` to log a query: - * - * ```ts - * import type { Compilable } from 'kysely' - * - * function log(qb: T): T { - * console.log(qb.compile()) - * return qb - * } - * - * await db.insertInto('person') - * .values({ first_name: 'John', last_name: 'Doe', gender: 'male' }) - * .$call(log) - * .execute() - * ``` - */ - $call(func: (qb: this) => T): T; - /** - * Call `func(this)` if `condition` is true. - * - * This method is especially handy with optional selects. Any `returning` or `returningAll` - * method calls add columns as optional fields to the output type when called inside - * the `func` callback. This is because we can't know if those selections were actually - * made before running the code. - * - * You can also call any other methods inside the callback. - * - * ### Examples - * - * ```ts - * import type { NewPerson } from 'type-editor' // imaginary module - * - * async function insertPerson(values: NewPerson, returnLastName: boolean) { - * return await db - * .insertInto('person') - * .values(values) - * .returning(['id', 'first_name']) - * .$if(returnLastName, (qb) => qb.returning('last_name')) - * .executeTakeFirstOrThrow() - * } - * ``` - * - * Any selections added inside the `if` callback will be added as optional fields to the - * output type since we can't know if the selections were actually made before running - * the code. In the example above the return type of the `insertPerson` function is: - * - * ```ts - * Promise<{ - * id: number - * first_name: string - * last_name?: string - * }> - * ``` - */ - $if(condition: boolean, func: (qb: this) => InsertQueryBuilder): O2 extends InsertResult ? InsertQueryBuilder : O2 extends O & infer E ? InsertQueryBuilder> : InsertQueryBuilder>; - /** - * Change the output type of the query. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `InsertQueryBuilder` with a new output type. - */ - $castTo(): InsertQueryBuilder; - /** - * Narrows (parts of) the output type of the query. - * - * Kysely tries to be as type-safe as possible, but in some cases we have to make - * compromises for better maintainability and compilation performance. At present, - * Kysely doesn't narrow the output type of the query based on {@link values} input - * when using {@link returning} or {@link returningAll}. - * - * This utility method is very useful for these situations, as it removes unncessary - * runtime assertion/guard code. Its input type is limited to the output type - * of the query, so you can't add a column that doesn't exist, or change a column's - * type to something that doesn't exist in its union type. - * - * ### Examples - * - * Turn this code: - * - * ```ts - * import type { Person } from 'type-editor' // imaginary module - * - * const person = await db.insertInto('person') - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male', - * nullable_column: 'hell yeah!' - * }) - * .returningAll() - * .executeTakeFirstOrThrow() - * - * if (isWithNoNullValue(person)) { - * functionThatExpectsPersonWithNonNullValue(person) - * } - * - * function isWithNoNullValue(person: Person): person is Person & { nullable_column: string } { - * return person.nullable_column != null - * } - * ``` - * - * Into this: - * - * ```ts - * import type { NotNull } from 'kysely' - * - * const person = await db.insertInto('person') - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male', - * nullable_column: 'hell yeah!' - * }) - * .returningAll() - * .$narrowType<{ nullable_column: NotNull }>() - * .executeTakeFirstOrThrow() - * - * functionThatExpectsPersonWithNonNullValue(person) - * ``` - */ - $narrowType(): InsertQueryBuilder>; - /** - * Asserts that query's output row type equals the given type `T`. - * - * This method can be used to simplify excessively complex types to make TypeScript happy - * and much faster. - * - * Kysely uses complex type magic to achieve its type safety. This complexity is sometimes too much - * for TypeScript and you get errors like this: - * - * ``` - * error TS2589: Type instantiation is excessively deep and possibly infinite. - * ``` - * - * In these case you can often use this method to help TypeScript a little bit. When you use this - * method to assert the output type of a query, Kysely can drop the complex output type that - * consists of multiple nested helper types and replace it with the simple asserted type. - * - * Using this method doesn't reduce type safety at all. You have to pass in a type that is - * structurally equal to the current type. - * - * ### Examples - * - * ```ts - * import type { NewPerson, NewPet, Species } from 'type-editor' // imaginary module - * - * async function insertPersonAndPet(person: NewPerson, pet: Omit) { - * return await db - * .with('new_person', (qb) => qb - * .insertInto('person') - * .values(person) - * .returning('id') - * .$assertType<{ id: number }>() - * ) - * .with('new_pet', (qb) => qb - * .insertInto('pet') - * .values((eb) => ({ - * owner_id: eb.selectFrom('new_person').select('id'), - * ...pet - * })) - * .returning(['name as pet_name', 'species']) - * .$assertType<{ pet_name: string, species: Species }>() - * ) - * .selectFrom(['new_person', 'new_pet']) - * .selectAll() - * .executeTakeFirstOrThrow() - * } - * ``` - */ - $assertType(): O extends T ? InsertQueryBuilder : KyselyTypeError<`$assertType() call failed: The type passed in is not equal to the output type of the query.`>; - /** - * Returns a copy of this InsertQueryBuilder instance with the given plugin installed. - */ - withPlugin(plugin: KyselyPlugin): InsertQueryBuilder; - toOperationNode(): InsertQueryNode; - compile(): CompiledQuery; - /** - * Executes the query and returns an array of rows. - * - * Also see the {@link executeTakeFirst} and {@link executeTakeFirstOrThrow} methods. - */ - execute(): Promise[]>; - /** - * Executes the query and returns the first result or undefined if - * the query returned no result. - */ - executeTakeFirst(): Promise>; - /** - * Executes the query and returns the first result or throws if - * the query returned no result. - * - * By default an instance of {@link NoResultError} is thrown, but you can - * provide a custom error class, or callback as the only argument to throw a different - * error. - */ - executeTakeFirstOrThrow(errorConstructor?: NoResultErrorConstructor | ((node: QueryNode) => Error)): Promise>; - /** - * Executes the query and streams the rows. - * - * The optional argument `chunkSize` defines how many rows to fetch from the database - * at a time. It only affects some dialects like PostgreSQL that support it. - * - * ### Examples - * - * ```ts - * const stream = db - * .selectFrom('person') - * .select(['first_name', 'last_name']) - * .where('gender', '=', 'other') - * .stream() - * - * for await (const person of stream) { - * console.log(person.first_name) - * - * if (person.last_name === 'Something') { - * // Breaking or returning before the stream has ended will release - * // the database connection and invalidate the stream. - * break - * } - * } - * ``` - */ - stream(chunkSize?: number): AsyncIterableIterator; - /** - * Executes query with `explain` statement before the main query. - * - * ```ts - * const explained = await db - * .selectFrom('person') - * .where('gender', '=', 'female') - * .selectAll() - * .explain('json') - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * explain format=json select * from `person` where `gender` = ? - * ``` - * - * You can also execute `explain analyze` statements. - * - * ```ts - * import { sql } from 'kysely' - * - * const explained = await db - * .selectFrom('person') - * .where('gender', '=', 'female') - * .selectAll() - * .explain('json', sql`analyze`) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * explain (analyze, format json) select * from "person" where "gender" = $1 - * ``` - */ - explain = Record>(format?: ExplainFormat, options?: Expression): Promise; -} -export interface InsertQueryBuilderProps { - readonly queryId: QueryId; - readonly queryNode: InsertQueryNode; - readonly executor: QueryExecutor; -} diff --git a/node_modules/kysely/dist/cjs/query-builder/insert-query-builder.js b/node_modules/kysely/dist/cjs/query-builder/insert-query-builder.js deleted file mode 100644 index 7728743..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/insert-query-builder.js +++ /dev/null @@ -1,1160 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.InsertQueryBuilder = void 0; -const select_parser_js_1 = require("../parser/select-parser.js"); -const insert_values_parser_js_1 = require("../parser/insert-values-parser.js"); -const insert_query_node_js_1 = require("../operation-node/insert-query-node.js"); -const query_node_js_1 = require("../operation-node/query-node.js"); -const update_set_parser_js_1 = require("../parser/update-set-parser.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -const on_duplicate_key_node_js_1 = require("../operation-node/on-duplicate-key-node.js"); -const insert_result_js_1 = require("./insert-result.js"); -const no_result_error_js_1 = require("./no-result-error.js"); -const expression_parser_js_1 = require("../parser/expression-parser.js"); -const column_node_js_1 = require("../operation-node/column-node.js"); -const on_conflict_builder_js_1 = require("./on-conflict-builder.js"); -const on_conflict_node_js_1 = require("../operation-node/on-conflict-node.js"); -const top_parser_js_1 = require("../parser/top-parser.js"); -const or_action_node_js_1 = require("../operation-node/or-action-node.js"); -class InsertQueryBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - /** - * Sets the values to insert for an {@link Kysely.insertInto | insert} query. - * - * This method takes an object whose keys are column names and values are - * values to insert. In addition to the column's type, the values can be - * raw {@link sql} snippets or select queries. - * - * You must provide all fields you haven't explicitly marked as nullable - * or optional using {@link Generated} or {@link ColumnType}. - * - * The return value of an `insert` query is an instance of {@link InsertResult}. The - * {@link InsertResult.insertId | insertId} field holds the auto incremented primary - * key if the database returned one. - * - * On PostgreSQL and some other dialects, you need to call `returning` to get - * something out of the query. - * - * Also see the {@link expression} method for inserting the result of a select - * query or any other expression. - * - * ### Examples - * - * - * - * Insert a single row: - * - * ```ts - * const result = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40 - * }) - * .executeTakeFirst() - * - * // `insertId` is only available on dialects that - * // automatically return the id of the inserted row - * // such as MySQL and SQLite. On PostgreSQL, for example, - * // you need to add a `returning` clause to the query to - * // get anything out. See the "returning data" example. - * console.log(result.insertId) - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * insert into `person` (`first_name`, `last_name`, `age`) values (?, ?, ?) - * ``` - * - * - * - * On dialects that support it (for example PostgreSQL) you can insert multiple - * rows by providing an array. Note that the return value is once again very - * dialect-specific. Some databases may only return the id of the *last* inserted - * row and some return nothing at all unless you call `returning`. - * - * ```ts - * await db - * .insertInto('person') - * .values([{ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40, - * }, { - * first_name: 'Arnold', - * last_name: 'Schwarzenegger', - * age: 70, - * }]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "age") values (($1, $2, $3), ($4, $5, $6)) - * ``` - * - * - * - * On supported dialects like PostgreSQL you need to chain `returning` to the query to get - * the inserted row's columns (or any other expression) as the return value. `returning` - * works just like `select`. Refer to `select` method's examples and documentation for - * more info. - * - * ```ts - * const result = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40, - * }) - * .returning(['id', 'first_name as name']) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "age") values ($1, $2, $3) returning "id", "first_name" as "name" - * ``` - * - * - * - * In addition to primitives, the values can also be arbitrary expressions. - * You can build the expressions by using a callback and calling the methods - * on the expression builder passed to it: - * - * ```ts - * import { sql } from 'kysely' - * - * const ani = "Ani" - * const ston = "ston" - * - * const result = await db - * .insertInto('person') - * .values(({ ref, selectFrom, fn }) => ({ - * first_name: 'Jennifer', - * last_name: sql`concat(${ani}, ${ston})`, - * middle_name: ref('first_name'), - * age: selectFrom('person') - * .select(fn.avg('age').as('avg_age')), - * })) - * .executeTakeFirst() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ( - * "first_name", - * "last_name", - * "middle_name", - * "age" - * ) - * values ( - * $1, - * concat($2, $3), - * "first_name", - * (select avg("age") as "avg_age" from "person") - * ) - * ``` - * - * You can also use the callback version of subqueries or raw expressions: - * - * ```ts - * await db.with('jennifer', (db) => db - * .selectFrom('person') - * .where('first_name', '=', 'Jennifer') - * .select(['id', 'first_name', 'gender']) - * .limit(1) - * ).insertInto('pet').values((eb) => ({ - * owner_id: eb.selectFrom('jennifer').select('id'), - * name: eb.selectFrom('jennifer').select('first_name'), - * species: 'cat', - * })) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * with "jennifer" as ( - * select "id", "first_name", "gender" - * from "person" - * where "first_name" = $1 - * limit $2 - * ) - * insert into "pet" ("owner_id", "name", "species") - * values ( - * (select "id" from "jennifer"), - * (select "first_name" from "jennifer"), - * $3 - * ) - * ``` - */ - values(insert) { - const [columns, values] = (0, insert_values_parser_js_1.parseInsertExpression)(insert); - return new InsertQueryBuilder({ - ...this.#props, - queryNode: insert_query_node_js_1.InsertQueryNode.cloneWith(this.#props.queryNode, { - columns, - values, - }), - }); - } - /** - * Sets the columns to insert. - * - * The {@link values} method sets both the columns and the values and this method - * is not needed. But if you are using the {@link expression} method, you can use - * this method to set the columns to insert. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .columns(['first_name']) - * .expression((eb) => eb.selectFrom('pet').select('pet.name')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name") - * select "pet"."name" from "pet" - * ``` - */ - columns(columns) { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: insert_query_node_js_1.InsertQueryNode.cloneWith(this.#props.queryNode, { - columns: (0, object_utils_js_1.freeze)(columns.map(column_node_js_1.ColumnNode.create)), - }), - }); - } - /** - * Insert an arbitrary expression. For example the result of a select query. - * - * ### Examples - * - * - * - * You can create an `INSERT INTO SELECT FROM` query using the `expression` method. - * This API doesn't follow our WYSIWYG principles and might be a bit difficult to - * remember. The reasons for this design stem from implementation difficulties. - * - * ```ts - * const result = await db.insertInto('person') - * .columns(['first_name', 'last_name', 'age']) - * .expression((eb) => eb - * .selectFrom('pet') - * .select((eb) => [ - * 'pet.name', - * eb.val('Petson').as('last_name'), - * eb.lit(7).as('age'), - * ]) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "age") - * select "pet"."name", $1 as "last_name", 7 as "age from "pet" - * ``` - */ - expression(expression) { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: insert_query_node_js_1.InsertQueryNode.cloneWith(this.#props.queryNode, { - values: (0, expression_parser_js_1.parseExpression)(expression), - }), - }); - } - /** - * Creates an `insert into "person" default values` query. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .defaultValues() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" default values - * ``` - */ - defaultValues() { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: insert_query_node_js_1.InsertQueryNode.cloneWith(this.#props.queryNode, { - defaultValues: true, - }), - }); - } - /** - * This can be used to add any additional SQL to the end of the query. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.insertInto('person') - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male', - * }) - * .modifyEnd(sql`-- This is a comment`) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * insert into `person` ("first_name", "last_name", "gender") - * values (?, ?, ?) -- This is a comment - * ``` - */ - modifyEnd(modifier) { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithEndModifier(this.#props.queryNode, modifier.toOperationNode()), - }); - } - /** - * Changes an `insert into` query to an `insert ignore into` query. - * - * This is only supported by some dialects like MySQL. - * - * To avoid a footgun, when invoked with the SQLite dialect, this method will - * be handled like {@link orIgnore}. See also, {@link orAbort}, {@link orFail}, - * {@link orReplace}, and {@link orRollback}. - * - * If you use the ignore modifier, ignorable errors that occur while executing the - * insert statement are ignored. For example, without ignore, a row that duplicates - * an existing unique index or primary key value in the table causes a duplicate-key - * error and the statement is aborted. With ignore, the row is discarded and no error - * occurs. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .ignore() - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'female', - * }) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * insert ignore into `person` (`first_name`, `last_name`, `gender`) values (?, ?, ?) - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * insert or ignore into "person" ("first_name", "last_name", "gender") values (?, ?, ?) - * ``` - */ - ignore() { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: insert_query_node_js_1.InsertQueryNode.cloneWith(this.#props.queryNode, { - orAction: or_action_node_js_1.OrActionNode.create('ignore'), - }), - }); - } - /** - * Changes an `insert into` query to an `insert or ignore into` query. - * - * This is only supported by some dialects like SQLite. - * - * To avoid a footgun, when invoked with the MySQL dialect, this method will - * be handled like {@link ignore}. - * - * See also, {@link orAbort}, {@link orFail}, {@link orReplace}, and {@link orRollback}. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .orIgnore() - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'female', - * }) - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * insert or ignore into "person" ("first_name", "last_name", "gender") values (?, ?, ?) - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * insert ignore into `person` (`first_name`, `last_name`, `gender`) values (?, ?, ?) - * ``` - */ - orIgnore() { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: insert_query_node_js_1.InsertQueryNode.cloneWith(this.#props.queryNode, { - orAction: or_action_node_js_1.OrActionNode.create('ignore'), - }), - }); - } - /** - * Changes an `insert into` query to an `insert or abort into` query. - * - * This is only supported by some dialects like SQLite. - * - * See also, {@link orIgnore}, {@link orFail}, {@link orReplace}, and {@link orRollback}. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .orAbort() - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'female', - * }) - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * insert or abort into "person" ("first_name", "last_name", "gender") values (?, ?, ?) - * ``` - */ - orAbort() { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: insert_query_node_js_1.InsertQueryNode.cloneWith(this.#props.queryNode, { - orAction: or_action_node_js_1.OrActionNode.create('abort'), - }), - }); - } - /** - * Changes an `insert into` query to an `insert or fail into` query. - * - * This is only supported by some dialects like SQLite. - * - * See also, {@link orIgnore}, {@link orAbort}, {@link orReplace}, and {@link orRollback}. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .orFail() - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'female', - * }) - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * insert or fail into "person" ("first_name", "last_name", "gender") values (?, ?, ?) - * ``` - */ - orFail() { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: insert_query_node_js_1.InsertQueryNode.cloneWith(this.#props.queryNode, { - orAction: or_action_node_js_1.OrActionNode.create('fail'), - }), - }); - } - /** - * Changes an `insert into` query to an `insert or replace into` query. - * - * This is only supported by some dialects like SQLite. - * - * You can also use {@link Kysely.replaceInto} to achieve the same result. - * - * See also, {@link orIgnore}, {@link orAbort}, {@link orFail}, and {@link orRollback}. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .orReplace() - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'female', - * }) - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * insert or replace into "person" ("first_name", "last_name", "gender") values (?, ?, ?) - * ``` - */ - orReplace() { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: insert_query_node_js_1.InsertQueryNode.cloneWith(this.#props.queryNode, { - orAction: or_action_node_js_1.OrActionNode.create('replace'), - }), - }); - } - /** - * Changes an `insert into` query to an `insert or rollback into` query. - * - * This is only supported by some dialects like SQLite. - * - * See also, {@link orIgnore}, {@link orAbort}, {@link orFail}, and {@link orReplace}. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .orRollback() - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'female', - * }) - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * insert or rollback into "person" ("first_name", "last_name", "gender") values (?, ?, ?) - * ``` - */ - orRollback() { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: insert_query_node_js_1.InsertQueryNode.cloneWith(this.#props.queryNode, { - orAction: or_action_node_js_1.OrActionNode.create('rollback'), - }), - }); - } - /** - * Changes an `insert into` query to an `insert top into` query. - * - * `top` clause is only supported by some dialects like MS SQL Server. - * - * ### Examples - * - * Insert the first 5 rows: - * - * ```ts - * import { sql } from 'kysely' - * - * await db.insertInto('person') - * .top(5) - * .columns(['first_name', 'gender']) - * .expression( - * (eb) => eb.selectFrom('pet').select(['name', sql.lit('other').as('gender')]) - * ) - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * insert top(5) into "person" ("first_name", "gender") select "name", 'other' as "gender" from "pet" - * ``` - * - * Insert the first 50 percent of rows: - * - * ```ts - * import { sql } from 'kysely' - * - * await db.insertInto('person') - * .top(50, 'percent') - * .columns(['first_name', 'gender']) - * .expression( - * (eb) => eb.selectFrom('pet').select(['name', sql.lit('other').as('gender')]) - * ) - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * insert top(50) percent into "person" ("first_name", "gender") select "name", 'other' as "gender" from "pet" - * ``` - */ - top(expression, modifiers) { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithTop(this.#props.queryNode, (0, top_parser_js_1.parseTop)(expression, modifiers)), - }); - } - /** - * Adds an `on conflict` clause to the query. - * - * `on conflict` is only supported by some dialects like PostgreSQL and SQLite. On MySQL - * you can use {@link ignore} and {@link onDuplicateKeyUpdate} to achieve similar results. - * - * ### Examples - * - * ```ts - * await db - * .insertInto('pet') - * .values({ - * name: 'Catto', - * species: 'cat', - * owner_id: 3, - * }) - * .onConflict((oc) => oc - * .column('name') - * .doUpdateSet({ species: 'hamster' }) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "pet" ("name", "species", "owner_id") - * values ($1, $2, $3) - * on conflict ("name") - * do update set "species" = $4 - * ``` - * - * You can provide the name of the constraint instead of a column name: - * - * ```ts - * await db - * .insertInto('pet') - * .values({ - * name: 'Catto', - * species: 'cat', - * owner_id: 3, - * }) - * .onConflict((oc) => oc - * .constraint('pet_name_key') - * .doUpdateSet({ species: 'hamster' }) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "pet" ("name", "species", "owner_id") - * values ($1, $2, $3) - * on conflict on constraint "pet_name_key" - * do update set "species" = $4 - * ``` - * - * You can also specify an expression as the conflict target in case - * the unique index is an expression index: - * - * ```ts - * import { sql } from 'kysely' - * - * await db - * .insertInto('pet') - * .values({ - * name: 'Catto', - * species: 'cat', - * owner_id: 3, - * }) - * .onConflict((oc) => oc - * .expression(sql`lower(name)`) - * .doUpdateSet({ species: 'hamster' }) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "pet" ("name", "species", "owner_id") - * values ($1, $2, $3) - * on conflict (lower(name)) - * do update set "species" = $4 - * ``` - * - * You can add a filter for the update statement like this: - * - * ```ts - * await db - * .insertInto('pet') - * .values({ - * name: 'Catto', - * species: 'cat', - * owner_id: 3, - * }) - * .onConflict((oc) => oc - * .column('name') - * .doUpdateSet({ species: 'hamster' }) - * .where('excluded.name', '!=', 'Catto') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "pet" ("name", "species", "owner_id") - * values ($1, $2, $3) - * on conflict ("name") - * do update set "species" = $4 - * where "excluded"."name" != $5 - * ``` - * - * You can create an `on conflict do nothing` clauses like this: - * - * ```ts - * await db - * .insertInto('pet') - * .values({ - * name: 'Catto', - * species: 'cat', - * owner_id: 3, - * }) - * .onConflict((oc) => oc - * .column('name') - * .doNothing() - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "pet" ("name", "species", "owner_id") - * values ($1, $2, $3) - * on conflict ("name") do nothing - * ``` - * - * You can refer to the columns of the virtual `excluded` table - * in a type-safe way using a callback and the `ref` method of - * `ExpressionBuilder`: - * - * ```ts - * await db.insertInto('person') - * .values({ - * id: 1, - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male', - * }) - * .onConflict(oc => oc - * .column('id') - * .doUpdateSet({ - * first_name: (eb) => eb.ref('excluded.first_name'), - * last_name: (eb) => eb.ref('excluded.last_name') - * }) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("id", "first_name", "last_name", "gender") - * values ($1, $2, $3, $4) - * on conflict ("id") - * do update set - * "first_name" = "excluded"."first_name", - * "last_name" = "excluded"."last_name" - * ``` - */ - onConflict(callback) { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: insert_query_node_js_1.InsertQueryNode.cloneWith(this.#props.queryNode, { - onConflict: callback(new on_conflict_builder_js_1.OnConflictBuilder({ - onConflictNode: on_conflict_node_js_1.OnConflictNode.create(), - })).toOperationNode(), - }), - }); - } - /** - * Adds `on duplicate key update` to the query. - * - * If you specify `on duplicate key update`, and a row is inserted that would cause - * a duplicate value in a unique index or primary key, an update of the old row occurs. - * - * This is only implemented by some dialects like MySQL. On most dialects you should - * use {@link onConflict} instead. - * - * ### Examples - * - * ```ts - * await db - * .insertInto('person') - * .values({ - * id: 1, - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male', - * }) - * .onDuplicateKeyUpdate({ updated_at: new Date().toISOString() }) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * insert into `person` (`id`, `first_name`, `last_name`, `gender`) - * values (?, ?, ?, ?) - * on duplicate key update `updated_at` = ? - * ``` - */ - onDuplicateKeyUpdate(update) { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: insert_query_node_js_1.InsertQueryNode.cloneWith(this.#props.queryNode, { - onDuplicateKey: on_duplicate_key_node_js_1.OnDuplicateKeyNode.create((0, update_set_parser_js_1.parseUpdateObjectExpression)(update)), - }), - }); - } - returning(selection) { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithReturning(this.#props.queryNode, (0, select_parser_js_1.parseSelectArg)(selection)), - }); - } - returningAll() { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithReturning(this.#props.queryNode, (0, select_parser_js_1.parseSelectAll)()), - }); - } - output(args) { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithOutput(this.#props.queryNode, (0, select_parser_js_1.parseSelectArg)(args)), - }); - } - outputAll(table) { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithOutput(this.#props.queryNode, (0, select_parser_js_1.parseSelectAll)(table)), - }); - } - /** - * Clears all `returning` clauses from the query. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .values({ first_name: 'James', last_name: 'Smith', gender: 'male' }) - * .returning(['first_name']) - * .clearReturning() - * .execute() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "gender") values ($1, $2, $3) - * ``` - */ - clearReturning() { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithoutReturning(this.#props.queryNode), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - * - * If you want to conditionally call a method on `this`, see - * the {@link $if} method. - * - * ### Examples - * - * The next example uses a helper function `log` to log a query: - * - * ```ts - * import type { Compilable } from 'kysely' - * - * function log(qb: T): T { - * console.log(qb.compile()) - * return qb - * } - * - * await db.insertInto('person') - * .values({ first_name: 'John', last_name: 'Doe', gender: 'male' }) - * .$call(log) - * .execute() - * ``` - */ - $call(func) { - return func(this); - } - /** - * Call `func(this)` if `condition` is true. - * - * This method is especially handy with optional selects. Any `returning` or `returningAll` - * method calls add columns as optional fields to the output type when called inside - * the `func` callback. This is because we can't know if those selections were actually - * made before running the code. - * - * You can also call any other methods inside the callback. - * - * ### Examples - * - * ```ts - * import type { NewPerson } from 'type-editor' // imaginary module - * - * async function insertPerson(values: NewPerson, returnLastName: boolean) { - * return await db - * .insertInto('person') - * .values(values) - * .returning(['id', 'first_name']) - * .$if(returnLastName, (qb) => qb.returning('last_name')) - * .executeTakeFirstOrThrow() - * } - * ``` - * - * Any selections added inside the `if` callback will be added as optional fields to the - * output type since we can't know if the selections were actually made before running - * the code. In the example above the return type of the `insertPerson` function is: - * - * ```ts - * Promise<{ - * id: number - * first_name: string - * last_name?: string - * }> - * ``` - */ - $if(condition, func) { - if (condition) { - return func(this); - } - return new InsertQueryBuilder({ - ...this.#props, - }); - } - /** - * Change the output type of the query. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `InsertQueryBuilder` with a new output type. - */ - $castTo() { - return new InsertQueryBuilder(this.#props); - } - /** - * Narrows (parts of) the output type of the query. - * - * Kysely tries to be as type-safe as possible, but in some cases we have to make - * compromises for better maintainability and compilation performance. At present, - * Kysely doesn't narrow the output type of the query based on {@link values} input - * when using {@link returning} or {@link returningAll}. - * - * This utility method is very useful for these situations, as it removes unncessary - * runtime assertion/guard code. Its input type is limited to the output type - * of the query, so you can't add a column that doesn't exist, or change a column's - * type to something that doesn't exist in its union type. - * - * ### Examples - * - * Turn this code: - * - * ```ts - * import type { Person } from 'type-editor' // imaginary module - * - * const person = await db.insertInto('person') - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male', - * nullable_column: 'hell yeah!' - * }) - * .returningAll() - * .executeTakeFirstOrThrow() - * - * if (isWithNoNullValue(person)) { - * functionThatExpectsPersonWithNonNullValue(person) - * } - * - * function isWithNoNullValue(person: Person): person is Person & { nullable_column: string } { - * return person.nullable_column != null - * } - * ``` - * - * Into this: - * - * ```ts - * import type { NotNull } from 'kysely' - * - * const person = await db.insertInto('person') - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male', - * nullable_column: 'hell yeah!' - * }) - * .returningAll() - * .$narrowType<{ nullable_column: NotNull }>() - * .executeTakeFirstOrThrow() - * - * functionThatExpectsPersonWithNonNullValue(person) - * ``` - */ - $narrowType() { - return new InsertQueryBuilder(this.#props); - } - /** - * Asserts that query's output row type equals the given type `T`. - * - * This method can be used to simplify excessively complex types to make TypeScript happy - * and much faster. - * - * Kysely uses complex type magic to achieve its type safety. This complexity is sometimes too much - * for TypeScript and you get errors like this: - * - * ``` - * error TS2589: Type instantiation is excessively deep and possibly infinite. - * ``` - * - * In these case you can often use this method to help TypeScript a little bit. When you use this - * method to assert the output type of a query, Kysely can drop the complex output type that - * consists of multiple nested helper types and replace it with the simple asserted type. - * - * Using this method doesn't reduce type safety at all. You have to pass in a type that is - * structurally equal to the current type. - * - * ### Examples - * - * ```ts - * import type { NewPerson, NewPet, Species } from 'type-editor' // imaginary module - * - * async function insertPersonAndPet(person: NewPerson, pet: Omit) { - * return await db - * .with('new_person', (qb) => qb - * .insertInto('person') - * .values(person) - * .returning('id') - * .$assertType<{ id: number }>() - * ) - * .with('new_pet', (qb) => qb - * .insertInto('pet') - * .values((eb) => ({ - * owner_id: eb.selectFrom('new_person').select('id'), - * ...pet - * })) - * .returning(['name as pet_name', 'species']) - * .$assertType<{ pet_name: string, species: Species }>() - * ) - * .selectFrom(['new_person', 'new_pet']) - * .selectAll() - * .executeTakeFirstOrThrow() - * } - * ``` - */ - $assertType() { - return new InsertQueryBuilder(this.#props); - } - /** - * Returns a copy of this InsertQueryBuilder instance with the given plugin installed. - */ - withPlugin(plugin) { - return new InsertQueryBuilder({ - ...this.#props, - executor: this.#props.executor.withPlugin(plugin), - }); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.queryNode, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - /** - * Executes the query and returns an array of rows. - * - * Also see the {@link executeTakeFirst} and {@link executeTakeFirstOrThrow} methods. - */ - async execute() { - const compiledQuery = this.compile(); - const result = await this.#props.executor.executeQuery(compiledQuery); - const { adapter } = this.#props.executor; - const query = compiledQuery.query; - if ((query.returning && adapter.supportsReturning) || - (query.output && adapter.supportsOutput)) { - return result.rows; - } - return [ - new insert_result_js_1.InsertResult(result.insertId, result.numAffectedRows ?? BigInt(0)), - ]; - } - /** - * Executes the query and returns the first result or undefined if - * the query returned no result. - */ - async executeTakeFirst() { - const [result] = await this.execute(); - return result; - } - /** - * Executes the query and returns the first result or throws if - * the query returned no result. - * - * By default an instance of {@link NoResultError} is thrown, but you can - * provide a custom error class, or callback as the only argument to throw a different - * error. - */ - async executeTakeFirstOrThrow(errorConstructor = no_result_error_js_1.NoResultError) { - const result = await this.executeTakeFirst(); - if (result === undefined) { - const error = (0, no_result_error_js_1.isNoResultErrorConstructor)(errorConstructor) - ? new errorConstructor(this.toOperationNode()) - : errorConstructor(this.toOperationNode()); - throw error; - } - return result; - } - async *stream(chunkSize = 100) { - const compiledQuery = this.compile(); - const stream = this.#props.executor.stream(compiledQuery, chunkSize); - for await (const item of stream) { - yield* item.rows; - } - } - async explain(format, options) { - const builder = new InsertQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithExplain(this.#props.queryNode, format, options), - }); - return await builder.execute(); - } -} -exports.InsertQueryBuilder = InsertQueryBuilder; diff --git a/node_modules/kysely/dist/cjs/query-builder/insert-result.d.ts b/node_modules/kysely/dist/cjs/query-builder/insert-result.d.ts deleted file mode 100644 index 1a8d763..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/insert-result.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * The result of an insert query. - * - * If the table has an auto incrementing primary key {@link insertId} will hold - * the generated id on dialects that support it. For example PostgreSQL doesn't - * return the id by default and {@link insertId} is undefined. On PostgreSQL you - * need to use {@link ReturningInterface.returning} or {@link ReturningInterface.returningAll} - * to get out the inserted id. - * - * {@link numInsertedOrUpdatedRows} holds the number of (actually) inserted rows. - * On MySQL, updated rows are counted twice when using `on duplicate key update`. - * - * ### Examples - * - * ```ts - * import type { NewPerson } from 'type-editor' // imaginary module - * - * async function insertPerson(person: NewPerson) { - * const result = await db - * .insertInto('person') - * .values(person) - * .executeTakeFirstOrThrow() - * - * console.log(result.insertId) // relevant on MySQL - * console.log(result.numInsertedOrUpdatedRows) // always relevant - * } - * ``` - */ -export declare class InsertResult { - /** - * The auto incrementing primary key of the inserted row. - * - * This property can be undefined when the query contains an `on conflict` - * clause that makes the query succeed even when nothing gets inserted. - * - * This property is always undefined on dialects like PostgreSQL that - * don't return the inserted id by default. On those dialects you need - * to use the {@link ReturningInterface.returning | returning} method. - */ - readonly insertId: bigint | undefined; - /** - * Affected rows count. - */ - readonly numInsertedOrUpdatedRows: bigint | undefined; - constructor(insertId: bigint | undefined, numInsertedOrUpdatedRows: bigint | undefined); -} diff --git a/node_modules/kysely/dist/cjs/query-builder/insert-result.js b/node_modules/kysely/dist/cjs/query-builder/insert-result.js deleted file mode 100644 index da0fabf..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/insert-result.js +++ /dev/null @@ -1,53 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.InsertResult = void 0; -/** - * The result of an insert query. - * - * If the table has an auto incrementing primary key {@link insertId} will hold - * the generated id on dialects that support it. For example PostgreSQL doesn't - * return the id by default and {@link insertId} is undefined. On PostgreSQL you - * need to use {@link ReturningInterface.returning} or {@link ReturningInterface.returningAll} - * to get out the inserted id. - * - * {@link numInsertedOrUpdatedRows} holds the number of (actually) inserted rows. - * On MySQL, updated rows are counted twice when using `on duplicate key update`. - * - * ### Examples - * - * ```ts - * import type { NewPerson } from 'type-editor' // imaginary module - * - * async function insertPerson(person: NewPerson) { - * const result = await db - * .insertInto('person') - * .values(person) - * .executeTakeFirstOrThrow() - * - * console.log(result.insertId) // relevant on MySQL - * console.log(result.numInsertedOrUpdatedRows) // always relevant - * } - * ``` - */ -class InsertResult { - /** - * The auto incrementing primary key of the inserted row. - * - * This property can be undefined when the query contains an `on conflict` - * clause that makes the query succeed even when nothing gets inserted. - * - * This property is always undefined on dialects like PostgreSQL that - * don't return the inserted id by default. On those dialects you need - * to use the {@link ReturningInterface.returning | returning} method. - */ - insertId; - /** - * Affected rows count. - */ - numInsertedOrUpdatedRows; - constructor(insertId, numInsertedOrUpdatedRows) { - this.insertId = insertId; - this.numInsertedOrUpdatedRows = numInsertedOrUpdatedRows; - } -} -exports.InsertResult = InsertResult; diff --git a/node_modules/kysely/dist/cjs/query-builder/join-builder.d.ts b/node_modules/kysely/dist/cjs/query-builder/join-builder.d.ts deleted file mode 100644 index df42b6d..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/join-builder.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { JoinNode } from '../operation-node/join-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { type ComparisonOperatorExpression, type OperandValueExpressionOrList } from '../parser/binary-operation-parser.js'; -import type { ExpressionOrFactory } from '../parser/expression-parser.js'; -import type { ReferenceExpression } from '../parser/reference-parser.js'; -import type { SqlBool } from '../util/type-utils.js'; -export declare class JoinBuilder implements OperationNodeSource { - #private; - constructor(props: JoinBuilderProps); - /** - * Just like {@link WhereInterface.where} but adds an item to the join's - * `on` clause instead. - * - * See {@link WhereInterface.where} for documentation and examples. - */ - on>(lhs: RE, op: ComparisonOperatorExpression, rhs: OperandValueExpressionOrList): JoinBuilder; - on(expression: ExpressionOrFactory): JoinBuilder; - /** - * Just like {@link WhereInterface.whereRef} but adds an item to the join's - * `on` clause instead. - * - * See {@link WhereInterface.whereRef} for documentation and examples. - */ - onRef(lhs: ReferenceExpression, op: ComparisonOperatorExpression, rhs: ReferenceExpression): JoinBuilder; - /** - * Adds `on true`. - */ - onTrue(): JoinBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): JoinNode; -} -export interface JoinBuilderProps { - readonly joinNode: JoinNode; -} diff --git a/node_modules/kysely/dist/cjs/query-builder/join-builder.js b/node_modules/kysely/dist/cjs/query-builder/join-builder.js deleted file mode 100644 index c490706..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/join-builder.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.JoinBuilder = void 0; -const join_node_js_1 = require("../operation-node/join-node.js"); -const raw_node_js_1 = require("../operation-node/raw-node.js"); -const binary_operation_parser_js_1 = require("../parser/binary-operation-parser.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -class JoinBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - on(...args) { - return new JoinBuilder({ - ...this.#props, - joinNode: join_node_js_1.JoinNode.cloneWithOn(this.#props.joinNode, (0, binary_operation_parser_js_1.parseValueBinaryOperationOrExpression)(args)), - }); - } - /** - * Just like {@link WhereInterface.whereRef} but adds an item to the join's - * `on` clause instead. - * - * See {@link WhereInterface.whereRef} for documentation and examples. - */ - onRef(lhs, op, rhs) { - return new JoinBuilder({ - ...this.#props, - joinNode: join_node_js_1.JoinNode.cloneWithOn(this.#props.joinNode, (0, binary_operation_parser_js_1.parseReferentialBinaryOperation)(lhs, op, rhs)), - }); - } - /** - * Adds `on true`. - */ - onTrue() { - return new JoinBuilder({ - ...this.#props, - joinNode: join_node_js_1.JoinNode.cloneWithOn(this.#props.joinNode, raw_node_js_1.RawNode.createWithSql('true')), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.joinNode; - } -} -exports.JoinBuilder = JoinBuilder; diff --git a/node_modules/kysely/dist/cjs/query-builder/json-path-builder.d.ts b/node_modules/kysely/dist/cjs/query-builder/json-path-builder.d.ts deleted file mode 100644 index 4a9bf9d..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/json-path-builder.d.ts +++ /dev/null @@ -1,294 +0,0 @@ -import type { AliasableExpression, AliasedExpression, Expression } from '../expression/expression.js'; -import { AliasNode } from '../operation-node/alias-node.js'; -import { JSONPathNode } from '../operation-node/json-path-node.js'; -import { JSONReferenceNode } from '../operation-node/json-reference-node.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -export declare class JSONPathBuilder { - #private; - constructor(node: JSONReferenceNode | JSONPathNode); - /** - * Access an element of a JSON array in a specific location. - * - * Since there's no guarantee an element exists in the given array location, the - * resulting type is always nullable. If you're sure the element exists, you - * should use {@link SelectQueryBuilder.$assertType} to narrow the type safely. - * - * See also {@link key} to access properties of JSON objects. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .select(eb => - * eb.ref('nicknames', '->').at(0).as('primary_nickname') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "nicknames"->0 as "primary_nickname" from "person" - *``` - * - * Combined with {@link key}: - * - * ```ts - * db.selectFrom('person').select(eb => - * eb.ref('experience', '->').at(0).key('role').as('first_role') - * ) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "experience"->0->'role' as "first_role" from "person" - * ``` - * - * You can use `'last'` to access the last element of the array in MySQL: - * - * ```ts - * db.selectFrom('person').select(eb => - * eb.ref('nicknames', '->$').at('last').as('last_nickname') - * ) - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select `nicknames`->'$[last]' as `last_nickname` from `person` - * ``` - * - * Or `'#-1'` in SQLite: - * - * ```ts - * db.selectFrom('person').select(eb => - * eb.ref('nicknames', '->>$').at('#-1').as('last_nickname') - * ) - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select "nicknames"->>'$[#-1]' as `last_nickname` from `person` - * ``` - */ - at[keyof NonNullable & number]>>(index: `${I}` extends `${any}.${any}` | `#--${any}` ? never : I): TraversedJSONPathBuilder; - /** - * Access a property of a JSON object. - * - * If a field is optional, the resulting type will be nullable. - * - * See also {@link at} to access elements of JSON arrays. - * - * ### Examples - * - * ```ts - * db.selectFrom('person').select(eb => - * eb.ref('address', '->').key('city').as('city') - * ) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "address"->'city' as "city" from "person" - * ``` - * - * Going deeper: - * - * ```ts - * db.selectFrom('person').select(eb => - * eb.ref('profile', '->$').key('website').key('url').as('website_url') - * ) - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select `profile`->'$.website.url' as `website_url` from `person` - * ``` - * - * Combined with {@link at}: - * - * ```ts - * db.selectFrom('person').select(eb => - * eb.ref('profile', '->').key('addresses').at(0).key('city').as('city') - * ) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "profile"->'addresses'->0->'city' as "city" from "person" - * ``` - */ - key & string : never, O2 = undefined extends O ? null | NonNullable[K]> : null extends O ? null | NonNullable[K]> : string extends keyof NonNullable ? null | NonNullable[K]> : NonNullable[K]>(key: K): TraversedJSONPathBuilder; -} -export declare class TraversedJSONPathBuilder extends JSONPathBuilder implements AliasableExpression { - #private; - constructor(node: JSONReferenceNode | JSONPathNode); - /** @private */ - /** - * All expressions need to have this getter for complicated type-related reasons. - * Simply add this getter for your expression and always return `undefined` from it: - * - * ### Examples - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - * - * The getter is needed to make the expression assignable to another expression only - * if the types `T` are assignable. Without this property (or some other property - * that references `T`), you could assing `Expression` to `Expression`. - */ - get expressionType(): O | undefined; - /** - * Returns an aliased version of the expression. - * - * In addition to slapping `as "the_alias"` to the end of the SQL, - * this method also provides strict typing: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select(eb => - * eb('first_name', '=', 'Jennifer').as('is_jennifer') - * ) - * .executeTakeFirstOrThrow() - * - * // `is_jennifer: SqlBool` field exists in the result type. - * console.log(result.is_jennifer) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name" = $1 as "is_jennifer" - * from "person" - * ``` - */ - as(alias: A): AliasedExpression; - /** - * Returns an aliased version of the expression. - * - * ### Examples - * - * In addition to slapping `as "the_alias"` at the end of the expression, - * this method also provides strict typing: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => - * // `eb.fn` returns an AliasableExpression - * eb.fn('concat', ['first_name', eb.val(' '), 'last_name']).as('full_name') - * ) - * .executeTakeFirstOrThrow() - * - * // `full_name: string` field exists in the result type. - * console.log(result.full_name) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * concat("first_name", $1, "last_name") as "full_name" - * from - * "person" - * ``` - * - * You can also pass in a raw SQL snippet (or any expression) but in that case you must - * provide the alias as the only type argument: - * - * ```ts - * import { sql } from 'kysely' - * - * const values = sql<{ a: number, b: string }>`(values (1, 'foo'))` - * - * // The alias is `t(a, b)` which specifies the column names - * // in addition to the table name. We must tell kysely that - * // columns of the table can be referenced through `t` - * // by providing an explicit type argument. - * const aliasedValues = values.as<'t'>(sql`t(a, b)`) - * - * await db - * .insertInto('person') - * .columns(['first_name', 'last_name']) - * .expression( - * db.selectFrom(aliasedValues).select(['t.a', 't.b']) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name") - * from (values (1, 'foo')) as t(a, b) - * select "t"."a", "t"."b" - * ``` - */ - as(alias: Expression): AliasedExpression; - /** - * Change the output type of the json path. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `JSONPathBuilder` with a new output type. - */ - $castTo(): TraversedJSONPathBuilder; - $notNull(): TraversedJSONPathBuilder>; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - * - * ### Examples - * - * If you are creating a custom expression, it's often easiest to use the {@link sql} - * template tag to build the node: - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - */ - toOperationNode(): OperationNode; -} -export declare class AliasedJSONPathBuilder implements AliasedExpression { - #private; - constructor(jsonPath: TraversedJSONPathBuilder, alias: A | Expression); - /** @private */ - /** - * Returns the aliased expression. - */ - get expression(): Expression; - /** @private */ - /** - * Returns the alias. - */ - get alias(): A | Expression; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - */ - toOperationNode(): AliasNode; -} diff --git a/node_modules/kysely/dist/cjs/query-builder/json-path-builder.js b/node_modules/kysely/dist/cjs/query-builder/json-path-builder.js deleted file mode 100644 index 6c2d1d8..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/json-path-builder.js +++ /dev/null @@ -1,200 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AliasedJSONPathBuilder = exports.TraversedJSONPathBuilder = exports.JSONPathBuilder = void 0; -const alias_node_js_1 = require("../operation-node/alias-node.js"); -const identifier_node_js_1 = require("../operation-node/identifier-node.js"); -const json_operator_chain_node_js_1 = require("../operation-node/json-operator-chain-node.js"); -const json_path_leg_node_js_1 = require("../operation-node/json-path-leg-node.js"); -const json_path_node_js_1 = require("../operation-node/json-path-node.js"); -const json_reference_node_js_1 = require("../operation-node/json-reference-node.js"); -const operation_node_source_js_1 = require("../operation-node/operation-node-source.js"); -const value_node_js_1 = require("../operation-node/value-node.js"); -class JSONPathBuilder { - #node; - constructor(node) { - this.#node = node; - } - /** - * Access an element of a JSON array in a specific location. - * - * Since there's no guarantee an element exists in the given array location, the - * resulting type is always nullable. If you're sure the element exists, you - * should use {@link SelectQueryBuilder.$assertType} to narrow the type safely. - * - * See also {@link key} to access properties of JSON objects. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .select(eb => - * eb.ref('nicknames', '->').at(0).as('primary_nickname') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "nicknames"->0 as "primary_nickname" from "person" - *``` - * - * Combined with {@link key}: - * - * ```ts - * db.selectFrom('person').select(eb => - * eb.ref('experience', '->').at(0).key('role').as('first_role') - * ) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "experience"->0->'role' as "first_role" from "person" - * ``` - * - * You can use `'last'` to access the last element of the array in MySQL: - * - * ```ts - * db.selectFrom('person').select(eb => - * eb.ref('nicknames', '->$').at('last').as('last_nickname') - * ) - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select `nicknames`->'$[last]' as `last_nickname` from `person` - * ``` - * - * Or `'#-1'` in SQLite: - * - * ```ts - * db.selectFrom('person').select(eb => - * eb.ref('nicknames', '->>$').at('#-1').as('last_nickname') - * ) - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select "nicknames"->>'$[#-1]' as `last_nickname` from `person` - * ``` - */ - at(index) { - return this.#createBuilderWithPathLeg('ArrayLocation', index); - } - /** - * Access a property of a JSON object. - * - * If a field is optional, the resulting type will be nullable. - * - * See also {@link at} to access elements of JSON arrays. - * - * ### Examples - * - * ```ts - * db.selectFrom('person').select(eb => - * eb.ref('address', '->').key('city').as('city') - * ) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "address"->'city' as "city" from "person" - * ``` - * - * Going deeper: - * - * ```ts - * db.selectFrom('person').select(eb => - * eb.ref('profile', '->$').key('website').key('url').as('website_url') - * ) - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select `profile`->'$.website.url' as `website_url` from `person` - * ``` - * - * Combined with {@link at}: - * - * ```ts - * db.selectFrom('person').select(eb => - * eb.ref('profile', '->').key('addresses').at(0).key('city').as('city') - * ) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "profile"->'addresses'->0->'city' as "city" from "person" - * ``` - */ - key(key) { - return this.#createBuilderWithPathLeg('Member', key); - } - #createBuilderWithPathLeg(legType, value) { - if (json_reference_node_js_1.JSONReferenceNode.is(this.#node)) { - return new TraversedJSONPathBuilder(json_reference_node_js_1.JSONReferenceNode.cloneWithTraversal(this.#node, json_path_node_js_1.JSONPathNode.is(this.#node.traversal) - ? json_path_node_js_1.JSONPathNode.cloneWithLeg(this.#node.traversal, json_path_leg_node_js_1.JSONPathLegNode.create(legType, value)) - : json_operator_chain_node_js_1.JSONOperatorChainNode.cloneWithValue(this.#node.traversal, value_node_js_1.ValueNode.createImmediate(value)))); - } - return new TraversedJSONPathBuilder(json_path_node_js_1.JSONPathNode.cloneWithLeg(this.#node, json_path_leg_node_js_1.JSONPathLegNode.create(legType, value))); - } -} -exports.JSONPathBuilder = JSONPathBuilder; -class TraversedJSONPathBuilder extends JSONPathBuilder { - #node; - constructor(node) { - super(node); - this.#node = node; - } - /** @private */ - get expressionType() { - return undefined; - } - as(alias) { - return new AliasedJSONPathBuilder(this, alias); - } - /** - * Change the output type of the json path. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `JSONPathBuilder` with a new output type. - */ - $castTo() { - return new TraversedJSONPathBuilder(this.#node); - } - $notNull() { - return new TraversedJSONPathBuilder(this.#node); - } - toOperationNode() { - return this.#node; - } -} -exports.TraversedJSONPathBuilder = TraversedJSONPathBuilder; -class AliasedJSONPathBuilder { - #jsonPath; - #alias; - constructor(jsonPath, alias) { - this.#jsonPath = jsonPath; - this.#alias = alias; - } - /** @private */ - get expression() { - return this.#jsonPath; - } - /** @private */ - get alias() { - return this.#alias; - } - toOperationNode() { - return alias_node_js_1.AliasNode.create(this.#jsonPath.toOperationNode(), (0, operation_node_source_js_1.isOperationNodeSource)(this.#alias) - ? this.#alias.toOperationNode() - : identifier_node_js_1.IdentifierNode.create(this.#alias)); - } -} -exports.AliasedJSONPathBuilder = AliasedJSONPathBuilder; diff --git a/node_modules/kysely/dist/cjs/query-builder/merge-query-builder.d.ts b/node_modules/kysely/dist/cjs/query-builder/merge-query-builder.d.ts deleted file mode 100644 index 3a731d9..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/merge-query-builder.d.ts +++ /dev/null @@ -1,1001 +0,0 @@ -import type { AliasedExpression, Expression } from '../expression/expression.js'; -import { MergeQueryNode } from '../operation-node/merge-query-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { QueryNode } from '../operation-node/query-node.js'; -import type { ComparisonOperatorExpression, OperandValueExpressionOrList } from '../parser/binary-operation-parser.js'; -import type { ExpressionOrFactory } from '../parser/expression-parser.js'; -import { type InsertObjectOrList, type InsertObjectOrListFactory } from '../parser/insert-values-parser.js'; -import { type JoinCallbackExpression, type JoinReferenceExpression } from '../parser/join-parser.js'; -import type { ReferenceExpression } from '../parser/reference-parser.js'; -import type { ReturningAllRow, ReturningCallbackRow, ReturningRow } from '../parser/returning-parser.js'; -import { type SelectCallback, type SelectExpression } from '../parser/select-parser.js'; -import type { TableExpression } from '../parser/table-parser.js'; -import type { ExtractUpdateTypeFromReferenceExpression, UpdateObject, UpdateObjectFactory } from '../parser/update-set-parser.js'; -import type { ValueExpression } from '../parser/value-parser.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryId } from '../util/query-id.js'; -import type { ShallowRecord, SimplifyResult, SimplifySingleResult, SqlBool } from '../util/type-utils.js'; -import { MergeResult } from './merge-result.js'; -import { type NoResultErrorConstructor } from './no-result-error.js'; -import type { OutputCallback, OutputExpression, OutputInterface, OutputPrefix, SelectExpressionFromOutputCallback, SelectExpressionFromOutputExpression } from './output-interface.js'; -import type { MultiTableReturningInterface } from './returning-interface.js'; -import { UpdateQueryBuilder } from './update-query-builder.js'; -export declare class MergeQueryBuilder implements MultiTableReturningInterface, OutputInterface { - #private; - constructor(props: MergeQueryBuilderProps); - /** - * This can be used to add any additional SQL to the end of the query. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db - * .mergeInto('person') - * .using('pet', 'pet.owner_id', 'person.id') - * .whenMatched() - * .thenDelete() - * .modifyEnd(sql.raw('-- this is a comment')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" using "pet" on "pet"."owner_id" = "person"."id" when matched then delete -- this is a comment - * ``` - */ - modifyEnd(modifier: Expression): MergeQueryBuilder; - /** - * Changes a `merge into` query to an `merge top into` query. - * - * `top` clause is only supported by some dialects like MS SQL Server. - * - * ### Examples - * - * Affect 5 matched rows at most: - * - * ```ts - * await db.mergeInto('person') - * .top(5) - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenDelete() - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * merge top(5) into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * delete - * ``` - * - * Affect 50% of matched rows: - * - * ```ts - * await db.mergeInto('person') - * .top(50, 'percent') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenDelete() - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * merge top(50) percent into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * delete - * ``` - */ - top(expression: number | bigint, modifiers?: 'percent'): MergeQueryBuilder; - /** - * Adds the `using` clause to the query. - * - * This method is similar to {@link SelectQueryBuilder.innerJoin}, so see the - * documentation for that method for more examples. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenDelete() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * delete - * ``` - */ - using, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(sourceTable: TE, k1: K1, k2: K2): ExtractWheneableMergeQueryBuilder; - using, FN extends JoinCallbackExpression>(sourceTable: TE, callback: FN): ExtractWheneableMergeQueryBuilder; - /** - * Allows you to return data from modified rows. - * - * On supported databases like PostgreSQL, this method can be chained to - * `insert`, `update`, `delete` and `merge` queries to return data. - * - * Note that on SQLite you need to give aliases for the expressions to avoid - * [this bug](https://sqlite.org/forum/forumpost/033daf0b32) in SQLite. - * For example `.returning('id as id')`. - * - * Also see the {@link returningAll} method. - * - * ### Examples - * - * Return one column: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * ``` - * - * Return multiple columns: - * - * ```ts - * const { id, last_name } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning(['id', 'last_name']) - * .executeTakeFirstOrThrow() - * ``` - * - * Return arbitrary expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * const { id, full_name, first_pet_id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning((eb) => [ - * 'id as id', - * sql`concat(first_name, ' ', last_name)`.as('full_name'), - * eb.selectFrom('pet').select('pet.id').limit(1).as('first_pet_id') - * ]) - * .executeTakeFirstOrThrow() - * ``` - */ - returning>(selections: ReadonlyArray): MergeQueryBuilder>; - returning>(callback: CB): MergeQueryBuilder>; - returning>(selection: SE): MergeQueryBuilder>; - /** - * Adds a `returning *` or `returning table.*` to an insert/update/delete/merge - * query on databases that support `returning` such as PostgreSQL. - * - * Also see the {@link returning} method. - */ - returningAll(table: T): MergeQueryBuilder>; - returningAll(): MergeQueryBuilder>; - /** - * Allows you to return data from modified rows. - * - * On supported databases like MS SQL Server (MSSQL), this method can be chained - * to `insert`, `update`, `delete` and `merge` queries to return data. - * - * Also see the {@link outputAll} method. - * - * ### Examples - * - * Return one column: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .output('inserted.id') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * gender: 'female', - * }) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "gender") - * output "inserted"."id" - * values (@1, @2, @3) - * ``` - * - * Return multiple columns: - * - * ```ts - * const { old_first_name, old_last_name, new_first_name, new_last_name } = await db - * .updateTable('person') - * .set({ first_name: 'John', last_name: 'Doe' }) - * .output([ - * 'deleted.first_name as old_first_name', - * 'deleted.last_name as old_last_name', - * 'inserted.first_name as new_first_name', - * 'inserted.last_name as new_last_name', - * ]) - * .where('created_at', '<', new Date()) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * update "person" - * set "first_name" = @1, "last_name" = @2 - * output "deleted"."first_name" as "old_first_name", - * "deleted"."last_name" as "old_last_name", - * "inserted"."first_name" as "new_first_name", - * "inserted"."last_name" as "new_last_name" - * where "created_at" < @3 - * ``` - * - * Return arbitrary expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * const { full_name } = await db - * .deleteFrom('person') - * .output((eb) => sql`concat(${eb.ref('deleted.first_name')}, ' ', ${eb.ref('deleted.last_name')})`.as('full_name')) - * .where('created_at', '<', new Date()) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * delete from "person" - * output concat("deleted"."first_name", ' ', "deleted"."last_name") as "full_name" - * where "created_at" < @1 - * ``` - * - * Return the action performed on the row: - * - * ```ts - * await db - * .mergeInto('person') - * .using('pet', 'pet.owner_id', 'person.id') - * .whenMatched() - * .thenDelete() - * .whenNotMatched() - * .thenInsertValues({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male' - * }) - * .output([ - * 'inserted.id as inserted_id', - * 'deleted.id as deleted_id', - * ]) - * .execute() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * merge into "person" - * using "pet" on "pet"."owner_id" = "person"."id" - * when matched then delete - * when not matched then - * insert ("first_name", "last_name", "gender") - * values (@1, @2, @3) - * output "inserted"."id" as "inserted_id", "deleted"."id" as "deleted_id" - * ``` - * - */ - output>(selections: readonly OE[]): MergeQueryBuilder>>; - output>(callback: CB): MergeQueryBuilder>>; - output>(selection: OE): MergeQueryBuilder>>; - /** - * Adds an `output {prefix}.*` to an `insert`/`update`/`delete`/`merge` query on databases - * that support `output` such as MS SQL Server (MSSQL). - * - * Also see the {@link output} method. - */ - outputAll(table: OutputPrefix): MergeQueryBuilder>; -} -export interface MergeQueryBuilderProps { - readonly queryId: QueryId; - readonly queryNode: MergeQueryNode; - readonly executor: QueryExecutor; -} -export declare class WheneableMergeQueryBuilder implements Compilable, MultiTableReturningInterface, OutputInterface, OperationNodeSource { - #private; - constructor(props: MergeQueryBuilderProps); - /** - * This can be used to add any additional SQL to the end of the query. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db - * .mergeInto('person') - * .using('pet', 'pet.owner_id', 'person.id') - * .whenMatched() - * .thenDelete() - * .modifyEnd(sql.raw('-- this is a comment')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" using "pet" on "pet"."owner_id" = "person"."id" when matched then delete -- this is a comment - * ``` - */ - modifyEnd(modifier: Expression): WheneableMergeQueryBuilder; - /** - * See {@link MergeQueryBuilder.top}. - */ - top(expression: number | bigint, modifiers?: 'percent'): WheneableMergeQueryBuilder; - /** - * Adds a simple `when matched` clause to the query. - * - * For a `when matched` clause with an `and` condition, see {@link whenMatchedAnd}. - * - * For a simple `when not matched` clause, see {@link whenNotMatched}. - * - * For a `when not matched` clause with an `and` condition, see {@link whenNotMatchedAnd}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenDelete() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * delete - * ``` - */ - whenMatched(): MatchedThenableMergeQueryBuilder; - /** - * Adds the `when matched` clause to the query with an `and` condition. - * - * This method is similar to {@link SelectQueryBuilder.where}, so see the documentation - * for that method for more examples. - * - * For a simple `when matched` clause (without an `and` condition) see {@link whenMatched}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatchedAnd('person.first_name', '=', 'John') - * .thenDelete() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched and "person"."first_name" = $1 then - * delete - * ``` - */ - whenMatchedAnd, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): MatchedThenableMergeQueryBuilder; - whenMatchedAnd>(expression: E): MatchedThenableMergeQueryBuilder; - /** - * Adds the `when matched` clause to the query with an `and` condition. But unlike - * {@link whenMatchedAnd}, this method accepts a column reference as the 3rd argument. - * - * This method is similar to {@link SelectQueryBuilder.whereRef}, so see the documentation - * for that method for more examples. - */ - whenMatchedAndRef, RRE extends ReferenceExpression>(lhs: LRE, op: ComparisonOperatorExpression, rhs: RRE): MatchedThenableMergeQueryBuilder; - /** - * Adds a simple `when not matched` clause to the query. - * - * For a `when not matched` clause with an `and` condition, see {@link whenNotMatchedAnd}. - * - * For a simple `when matched` clause, see {@link whenMatched}. - * - * For a `when matched` clause with an `and` condition, see {@link whenMatchedAnd}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenNotMatched() - * .thenInsertValues({ - * first_name: 'John', - * last_name: 'Doe', - * }) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when not matched then - * insert ("first_name", "last_name") values ($1, $2) - * ``` - */ - whenNotMatched(): NotMatchedThenableMergeQueryBuilder; - /** - * Adds the `when not matched` clause to the query with an `and` condition. - * - * This method is similar to {@link SelectQueryBuilder.where}, so see the documentation - * for that method for more examples. - * - * For a simple `when not matched` clause (without an `and` condition) see {@link whenNotMatched}. - * - * Unlike {@link whenMatchedAnd}, you cannot reference columns from the table merged into. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenNotMatchedAnd('pet.name', '=', 'Lucky') - * .thenInsertValues({ - * first_name: 'John', - * last_name: 'Doe', - * }) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when not matched and "pet"."name" = $1 then - * insert ("first_name", "last_name") values ($2, $3) - * ``` - */ - whenNotMatchedAnd, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): NotMatchedThenableMergeQueryBuilder; - whenNotMatchedAnd>(expression: E): NotMatchedThenableMergeQueryBuilder; - /** - * Adds the `when not matched` clause to the query with an `and` condition. But unlike - * {@link whenNotMatchedAnd}, this method accepts a column reference as the 3rd argument. - * - * Unlike {@link whenMatchedAndRef}, you cannot reference columns from the target table. - * - * This method is similar to {@link SelectQueryBuilder.whereRef}, so see the documentation - * for that method for more examples. - */ - whenNotMatchedAndRef, RRE extends ReferenceExpression>(lhs: LRE, op: ComparisonOperatorExpression, rhs: RRE): NotMatchedThenableMergeQueryBuilder; - /** - * Adds a simple `when not matched by source` clause to the query. - * - * Supported in MS SQL Server. - * - * Similar to {@link whenNotMatched}, but returns a {@link MatchedThenableMergeQueryBuilder}. - */ - whenNotMatchedBySource(): MatchedThenableMergeQueryBuilder; - /** - * Adds the `when not matched by source` clause to the query with an `and` condition. - * - * Supported in MS SQL Server. - * - * Similar to {@link whenNotMatchedAnd}, but returns a {@link MatchedThenableMergeQueryBuilder}. - */ - whenNotMatchedBySourceAnd, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): MatchedThenableMergeQueryBuilder; - whenNotMatchedBySourceAnd>(expression: E): MatchedThenableMergeQueryBuilder; - /** - * Adds the `when not matched by source` clause to the query with an `and` condition. - * - * Similar to {@link whenNotMatchedAndRef}, but you can reference columns from - * the target table, and not from source table and returns a {@link MatchedThenableMergeQueryBuilder}. - */ - whenNotMatchedBySourceAndRef, RRE extends ReferenceExpression>(lhs: LRE, op: ComparisonOperatorExpression, rhs: RRE): MatchedThenableMergeQueryBuilder; - /** - * Allows you to return data from modified rows. - * - * On supported databases like PostgreSQL, this method can be chained to - * `insert`, `update`, `delete` and `merge` queries to return data. - * - * Note that on SQLite you need to give aliases for the expressions to avoid - * [this bug](https://sqlite.org/forum/forumpost/033daf0b32) in SQLite. - * For example `.returning('id as id')`. - * - * Also see the {@link returningAll} method. - * - * ### Examples - * - * Return one column: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * ``` - * - * Return multiple columns: - * - * ```ts - * const { id, last_name } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning(['id', 'last_name']) - * .executeTakeFirstOrThrow() - * ``` - * - * Return arbitrary expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * const { id, full_name, first_pet_id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning((eb) => [ - * 'id as id', - * sql`concat(first_name, ' ', last_name)`.as('full_name'), - * eb.selectFrom('pet').select('pet.id').limit(1).as('first_pet_id') - * ]) - * .executeTakeFirstOrThrow() - * ``` - */ - returning>(selections: ReadonlyArray): WheneableMergeQueryBuilder>; - returning>(callback: CB): WheneableMergeQueryBuilder>; - returning>(selection: SE): WheneableMergeQueryBuilder>; - /** - * Adds a `returning *` or `returning table.*` to an insert/update/delete/merge - * query on databases that support `returning` such as PostgreSQL. - * - * Also see the {@link returning} method. - */ - returningAll(table: T): WheneableMergeQueryBuilder>; - returningAll(): WheneableMergeQueryBuilder>; - /** - * Allows you to return data from modified rows. - * - * On supported databases like MS SQL Server (MSSQL), this method can be chained - * to `insert`, `update`, `delete` and `merge` queries to return data. - * - * Also see the {@link outputAll} method. - * - * ### Examples - * - * Return one column: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .output('inserted.id') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * gender: 'female', - * }) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "gender") - * output "inserted"."id" - * values (@1, @2, @3) - * ``` - * - * Return multiple columns: - * - * ```ts - * const { old_first_name, old_last_name, new_first_name, new_last_name } = await db - * .updateTable('person') - * .set({ first_name: 'John', last_name: 'Doe' }) - * .output([ - * 'deleted.first_name as old_first_name', - * 'deleted.last_name as old_last_name', - * 'inserted.first_name as new_first_name', - * 'inserted.last_name as new_last_name', - * ]) - * .where('created_at', '<', new Date()) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * update "person" - * set "first_name" = @1, "last_name" = @2 - * output "deleted"."first_name" as "old_first_name", - * "deleted"."last_name" as "old_last_name", - * "inserted"."first_name" as "new_first_name", - * "inserted"."last_name" as "new_last_name" - * where "created_at" < @3 - * ``` - * - * Return arbitrary expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * const { full_name } = await db - * .deleteFrom('person') - * .output((eb) => sql`concat(${eb.ref('deleted.first_name')}, ' ', ${eb.ref('deleted.last_name')})`.as('full_name')) - * .where('created_at', '<', new Date()) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * delete from "person" - * output concat("deleted"."first_name", ' ', "deleted"."last_name") as "full_name" - * where "created_at" < @1 - * ``` - * - * Return the action performed on the row: - * - * ```ts - * await db - * .mergeInto('person') - * .using('pet', 'pet.owner_id', 'person.id') - * .whenMatched() - * .thenDelete() - * .whenNotMatched() - * .thenInsertValues({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male' - * }) - * .output([ - * 'inserted.id as inserted_id', - * 'deleted.id as deleted_id', - * ]) - * .execute() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * merge into "person" - * using "pet" on "pet"."owner_id" = "person"."id" - * when matched then delete - * when not matched then - * insert ("first_name", "last_name", "gender") - * values (@1, @2, @3) - * output "inserted"."id" as "inserted_id", "deleted"."id" as "deleted_id" - * ``` - * - */ - output>(selections: readonly OE[]): WheneableMergeQueryBuilder>>; - output>(callback: CB): WheneableMergeQueryBuilder>>; - output>(selection: OE): WheneableMergeQueryBuilder>>; - /** - * Adds an `output {prefix}.*` to an `insert`/`update`/`delete`/`merge` query on databases - * that support `output` such as MS SQL Server (MSSQL). - * - * Also see the {@link output} method. - */ - outputAll(table: OutputPrefix): WheneableMergeQueryBuilder>; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - * - * If you want to conditionally call a method on `this`, see - * the {@link $if} method. - * - * ### Examples - * - * The next example uses a helper function `log` to log a query: - * - * ```ts - * import type { Compilable } from 'kysely' - * - * function log(qb: T): T { - * console.log(qb.compile()) - * return qb - * } - * - * await db.updateTable('person') - * .set({ first_name: 'John' }) - * .$call(log) - * .execute() - * ``` - */ - $call(func: (qb: this) => T): T; - /** - * Call `func(this)` if `condition` is true. - * - * This method is especially handy with optional selects. Any `returning` or `returningAll` - * method calls add columns as optional fields to the output type when called inside - * the `func` callback. This is because we can't know if those selections were actually - * made before running the code. - * - * You can also call any other methods inside the callback. - * - * ### Examples - * - * ```ts - * import type { PersonUpdate } from 'type-editor' // imaginary module - * - * async function updatePerson(id: number, updates: PersonUpdate, returnLastName: boolean) { - * return await db - * .updateTable('person') - * .set(updates) - * .where('id', '=', id) - * .returning(['id', 'first_name']) - * .$if(returnLastName, (qb) => qb.returning('last_name')) - * .executeTakeFirstOrThrow() - * } - * ``` - * - * Any selections added inside the `if` callback will be added as optional fields to the - * output type since we can't know if the selections were actually made before running - * the code. In the example above the return type of the `updatePerson` function is: - * - * ```ts - * Promise<{ - * id: number - * first_name: string - * last_name?: string - * }> - * ``` - */ - $if(condition: boolean, func: (qb: this) => WheneableMergeQueryBuilder): O2 extends MergeResult ? WheneableMergeQueryBuilder : O2 extends O & infer E ? WheneableMergeQueryBuilder> : WheneableMergeQueryBuilder>; - toOperationNode(): MergeQueryNode; - compile(): CompiledQuery; - /** - * Executes the query and returns an array of rows. - * - * Also see the {@link executeTakeFirst} and {@link executeTakeFirstOrThrow} methods. - */ - execute(): Promise[]>; - /** - * Executes the query and returns the first result or undefined if - * the query returned no result. - */ - executeTakeFirst(): Promise>; - /** - * Executes the query and returns the first result or throws if - * the query returned no result. - * - * By default an instance of {@link NoResultError} is thrown, but you can - * provide a custom error class, or callback as the only argument to throw a different - * error. - */ - executeTakeFirstOrThrow(errorConstructor?: NoResultErrorConstructor | ((node: QueryNode) => Error)): Promise>; -} -export declare class MatchedThenableMergeQueryBuilder { - #private; - constructor(props: MergeQueryBuilderProps); - /** - * Performs the `delete` action. - * - * To perform the `do nothing` action, see {@link thenDoNothing}. - * - * To perform the `update` action, see {@link thenUpdate} or {@link thenUpdateSet}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenDelete() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * delete - * ``` - */ - thenDelete(): WheneableMergeQueryBuilder; - /** - * Performs the `do nothing` action. - * - * This is supported in PostgreSQL. - * - * To perform the `delete` action, see {@link thenDelete}. - * - * To perform the `update` action, see {@link thenUpdate} or {@link thenUpdateSet}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenDoNothing() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * do nothing - * ``` - */ - thenDoNothing(): WheneableMergeQueryBuilder; - /** - * Perform an `update` operation with a full-fledged {@link UpdateQueryBuilder}. - * This is handy when multiple `set` invocations are needed. - * - * For a shorthand version of this method, see {@link thenUpdateSet}. - * - * To perform the `delete` action, see {@link thenDelete}. - * - * To perform the `do nothing` action, see {@link thenDoNothing}. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenUpdate((ub) => ub - * .set(sql`metadata['has_pets']`, 'Y') - * .set({ - * updated_at: new Date().toISOString(), - * }) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * update set metadata['has_pets'] = $1, "updated_at" = $2 - * ``` - */ - thenUpdate>(set: (ub: QB) => QB): WheneableMergeQueryBuilder; - /** - * Performs an `update set` action, similar to {@link UpdateQueryBuilder.set}. - * - * For a full-fledged update query builder, see {@link thenUpdate}. - * - * To perform the `delete` action, see {@link thenDelete}. - * - * To perform the `do nothing` action, see {@link thenDoNothing}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenUpdateSet({ - * middle_name: 'dog owner', - * }) - * .execute() - * ``` - * - * The generate SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * update set "middle_name" = $1 - * ``` - */ - thenUpdateSet>(update: UO): WheneableMergeQueryBuilder; - thenUpdateSet>(update: U): WheneableMergeQueryBuilder; - thenUpdateSet, VE extends ValueExpression>>(key: RE, value: VE): WheneableMergeQueryBuilder; -} -export declare class NotMatchedThenableMergeQueryBuilder { - #private; - constructor(props: MergeQueryBuilderProps); - /** - * Performs the `do nothing` action. - * - * This is supported in PostgreSQL. - * - * To perform the `insert` action, see {@link thenInsertValues}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenNotMatched() - * .thenDoNothing() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when not matched then - * do nothing - * ``` - */ - thenDoNothing(): WheneableMergeQueryBuilder; - /** - * Performs the `insert (...) values` action. - * - * This method is similar to {@link InsertQueryBuilder.values}, so see the documentation - * for that method for more examples. - * - * To perform the `do nothing` action, see {@link thenDoNothing}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenNotMatched() - * .thenInsertValues({ - * first_name: 'John', - * last_name: 'Doe', - * }) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when not matched then - * insert ("first_name", "last_name") values ($1, $2) - * ``` - */ - thenInsertValues>(insert: I): WheneableMergeQueryBuilder; - thenInsertValues>(insert: IO): WheneableMergeQueryBuilder; -} -export type ExtractWheneableMergeQueryBuilder, O> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? UsingBuilder : never : TE extends keyof DB ? WheneableMergeQueryBuilder : TE extends AliasedExpression ? UsingBuilder : TE extends (qb: any) => AliasedExpression ? UsingBuilder : never; -type UsingBuilder = A extends keyof DB ? WheneableMergeQueryBuilder : WheneableMergeQueryBuilder, TT, A, O>; -export {}; diff --git a/node_modules/kysely/dist/cjs/query-builder/merge-query-builder.js b/node_modules/kysely/dist/cjs/query-builder/merge-query-builder.js deleted file mode 100644 index 87b5e50..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/merge-query-builder.js +++ /dev/null @@ -1,630 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NotMatchedThenableMergeQueryBuilder = exports.MatchedThenableMergeQueryBuilder = exports.WheneableMergeQueryBuilder = exports.MergeQueryBuilder = void 0; -const insert_query_node_js_1 = require("../operation-node/insert-query-node.js"); -const merge_query_node_js_1 = require("../operation-node/merge-query-node.js"); -const query_node_js_1 = require("../operation-node/query-node.js"); -const update_query_node_js_1 = require("../operation-node/update-query-node.js"); -const insert_values_parser_js_1 = require("../parser/insert-values-parser.js"); -const join_parser_js_1 = require("../parser/join-parser.js"); -const merge_parser_js_1 = require("../parser/merge-parser.js"); -const select_parser_js_1 = require("../parser/select-parser.js"); -const top_parser_js_1 = require("../parser/top-parser.js"); -const noop_query_executor_js_1 = require("../query-executor/noop-query-executor.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -const merge_result_js_1 = require("./merge-result.js"); -const no_result_error_js_1 = require("./no-result-error.js"); -const update_query_builder_js_1 = require("./update-query-builder.js"); -class MergeQueryBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - /** - * This can be used to add any additional SQL to the end of the query. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db - * .mergeInto('person') - * .using('pet', 'pet.owner_id', 'person.id') - * .whenMatched() - * .thenDelete() - * .modifyEnd(sql.raw('-- this is a comment')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" using "pet" on "pet"."owner_id" = "person"."id" when matched then delete -- this is a comment - * ``` - */ - modifyEnd(modifier) { - return new MergeQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithEndModifier(this.#props.queryNode, modifier.toOperationNode()), - }); - } - /** - * Changes a `merge into` query to an `merge top into` query. - * - * `top` clause is only supported by some dialects like MS SQL Server. - * - * ### Examples - * - * Affect 5 matched rows at most: - * - * ```ts - * await db.mergeInto('person') - * .top(5) - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenDelete() - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * merge top(5) into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * delete - * ``` - * - * Affect 50% of matched rows: - * - * ```ts - * await db.mergeInto('person') - * .top(50, 'percent') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenDelete() - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * merge top(50) percent into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * delete - * ``` - */ - top(expression, modifiers) { - return new MergeQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithTop(this.#props.queryNode, (0, top_parser_js_1.parseTop)(expression, modifiers)), - }); - } - using(...args) { - return new WheneableMergeQueryBuilder({ - ...this.#props, - queryNode: merge_query_node_js_1.MergeQueryNode.cloneWithUsing(this.#props.queryNode, (0, join_parser_js_1.parseJoin)('Using', args)), - }); - } - returning(args) { - return new MergeQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithReturning(this.#props.queryNode, (0, select_parser_js_1.parseSelectArg)(args)), - }); - } - returningAll(table) { - return new MergeQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithReturning(this.#props.queryNode, (0, select_parser_js_1.parseSelectAll)(table)), - }); - } - output(args) { - return new MergeQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithOutput(this.#props.queryNode, (0, select_parser_js_1.parseSelectArg)(args)), - }); - } - outputAll(table) { - return new MergeQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithOutput(this.#props.queryNode, (0, select_parser_js_1.parseSelectAll)(table)), - }); - } -} -exports.MergeQueryBuilder = MergeQueryBuilder; -class WheneableMergeQueryBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - /** - * This can be used to add any additional SQL to the end of the query. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db - * .mergeInto('person') - * .using('pet', 'pet.owner_id', 'person.id') - * .whenMatched() - * .thenDelete() - * .modifyEnd(sql.raw('-- this is a comment')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" using "pet" on "pet"."owner_id" = "person"."id" when matched then delete -- this is a comment - * ``` - */ - modifyEnd(modifier) { - return new WheneableMergeQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithEndModifier(this.#props.queryNode, modifier.toOperationNode()), - }); - } - /** - * See {@link MergeQueryBuilder.top}. - */ - top(expression, modifiers) { - return new WheneableMergeQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithTop(this.#props.queryNode, (0, top_parser_js_1.parseTop)(expression, modifiers)), - }); - } - /** - * Adds a simple `when matched` clause to the query. - * - * For a `when matched` clause with an `and` condition, see {@link whenMatchedAnd}. - * - * For a simple `when not matched` clause, see {@link whenNotMatched}. - * - * For a `when not matched` clause with an `and` condition, see {@link whenNotMatchedAnd}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenDelete() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * delete - * ``` - */ - whenMatched() { - return this.#whenMatched([]); - } - whenMatchedAnd(...args) { - return this.#whenMatched(args); - } - /** - * Adds the `when matched` clause to the query with an `and` condition. But unlike - * {@link whenMatchedAnd}, this method accepts a column reference as the 3rd argument. - * - * This method is similar to {@link SelectQueryBuilder.whereRef}, so see the documentation - * for that method for more examples. - */ - whenMatchedAndRef(lhs, op, rhs) { - return this.#whenMatched([lhs, op, rhs], true); - } - #whenMatched(args, refRight) { - return new MatchedThenableMergeQueryBuilder({ - ...this.#props, - queryNode: merge_query_node_js_1.MergeQueryNode.cloneWithWhen(this.#props.queryNode, (0, merge_parser_js_1.parseMergeWhen)({ isMatched: true }, args, refRight)), - }); - } - /** - * Adds a simple `when not matched` clause to the query. - * - * For a `when not matched` clause with an `and` condition, see {@link whenNotMatchedAnd}. - * - * For a simple `when matched` clause, see {@link whenMatched}. - * - * For a `when matched` clause with an `and` condition, see {@link whenMatchedAnd}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenNotMatched() - * .thenInsertValues({ - * first_name: 'John', - * last_name: 'Doe', - * }) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when not matched then - * insert ("first_name", "last_name") values ($1, $2) - * ``` - */ - whenNotMatched() { - return this.#whenNotMatched([]); - } - whenNotMatchedAnd(...args) { - return this.#whenNotMatched(args); - } - /** - * Adds the `when not matched` clause to the query with an `and` condition. But unlike - * {@link whenNotMatchedAnd}, this method accepts a column reference as the 3rd argument. - * - * Unlike {@link whenMatchedAndRef}, you cannot reference columns from the target table. - * - * This method is similar to {@link SelectQueryBuilder.whereRef}, so see the documentation - * for that method for more examples. - */ - whenNotMatchedAndRef(lhs, op, rhs) { - return this.#whenNotMatched([lhs, op, rhs], true); - } - /** - * Adds a simple `when not matched by source` clause to the query. - * - * Supported in MS SQL Server. - * - * Similar to {@link whenNotMatched}, but returns a {@link MatchedThenableMergeQueryBuilder}. - */ - whenNotMatchedBySource() { - return this.#whenNotMatched([], false, true); - } - whenNotMatchedBySourceAnd(...args) { - return this.#whenNotMatched(args, false, true); - } - /** - * Adds the `when not matched by source` clause to the query with an `and` condition. - * - * Similar to {@link whenNotMatchedAndRef}, but you can reference columns from - * the target table, and not from source table and returns a {@link MatchedThenableMergeQueryBuilder}. - */ - whenNotMatchedBySourceAndRef(lhs, op, rhs) { - return this.#whenNotMatched([lhs, op, rhs], true, true); - } - returning(args) { - return new WheneableMergeQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithReturning(this.#props.queryNode, (0, select_parser_js_1.parseSelectArg)(args)), - }); - } - returningAll(table) { - return new WheneableMergeQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithReturning(this.#props.queryNode, (0, select_parser_js_1.parseSelectAll)(table)), - }); - } - output(args) { - return new WheneableMergeQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithOutput(this.#props.queryNode, (0, select_parser_js_1.parseSelectArg)(args)), - }); - } - outputAll(table) { - return new WheneableMergeQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithOutput(this.#props.queryNode, (0, select_parser_js_1.parseSelectAll)(table)), - }); - } - #whenNotMatched(args, refRight = false, bySource = false) { - const props = { - ...this.#props, - queryNode: merge_query_node_js_1.MergeQueryNode.cloneWithWhen(this.#props.queryNode, (0, merge_parser_js_1.parseMergeWhen)({ isMatched: false, bySource }, args, refRight)), - }; - const Builder = bySource - ? MatchedThenableMergeQueryBuilder - : NotMatchedThenableMergeQueryBuilder; - return new Builder(props); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - * - * If you want to conditionally call a method on `this`, see - * the {@link $if} method. - * - * ### Examples - * - * The next example uses a helper function `log` to log a query: - * - * ```ts - * import type { Compilable } from 'kysely' - * - * function log(qb: T): T { - * console.log(qb.compile()) - * return qb - * } - * - * await db.updateTable('person') - * .set({ first_name: 'John' }) - * .$call(log) - * .execute() - * ``` - */ - $call(func) { - return func(this); - } - /** - * Call `func(this)` if `condition` is true. - * - * This method is especially handy with optional selects. Any `returning` or `returningAll` - * method calls add columns as optional fields to the output type when called inside - * the `func` callback. This is because we can't know if those selections were actually - * made before running the code. - * - * You can also call any other methods inside the callback. - * - * ### Examples - * - * ```ts - * import type { PersonUpdate } from 'type-editor' // imaginary module - * - * async function updatePerson(id: number, updates: PersonUpdate, returnLastName: boolean) { - * return await db - * .updateTable('person') - * .set(updates) - * .where('id', '=', id) - * .returning(['id', 'first_name']) - * .$if(returnLastName, (qb) => qb.returning('last_name')) - * .executeTakeFirstOrThrow() - * } - * ``` - * - * Any selections added inside the `if` callback will be added as optional fields to the - * output type since we can't know if the selections were actually made before running - * the code. In the example above the return type of the `updatePerson` function is: - * - * ```ts - * Promise<{ - * id: number - * first_name: string - * last_name?: string - * }> - * ``` - */ - $if(condition, func) { - if (condition) { - return func(this); - } - return new WheneableMergeQueryBuilder({ - ...this.#props, - }); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.queryNode, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - /** - * Executes the query and returns an array of rows. - * - * Also see the {@link executeTakeFirst} and {@link executeTakeFirstOrThrow} methods. - */ - async execute() { - const compiledQuery = this.compile(); - const result = await this.#props.executor.executeQuery(compiledQuery); - const { adapter } = this.#props.executor; - const query = compiledQuery.query; - if ((query.returning && adapter.supportsReturning) || - (query.output && adapter.supportsOutput)) { - return result.rows; - } - return [new merge_result_js_1.MergeResult(result.numAffectedRows)]; - } - /** - * Executes the query and returns the first result or undefined if - * the query returned no result. - */ - async executeTakeFirst() { - const [result] = await this.execute(); - return result; - } - /** - * Executes the query and returns the first result or throws if - * the query returned no result. - * - * By default an instance of {@link NoResultError} is thrown, but you can - * provide a custom error class, or callback as the only argument to throw a different - * error. - */ - async executeTakeFirstOrThrow(errorConstructor = no_result_error_js_1.NoResultError) { - const result = await this.executeTakeFirst(); - if (result === undefined) { - const error = (0, no_result_error_js_1.isNoResultErrorConstructor)(errorConstructor) - ? new errorConstructor(this.toOperationNode()) - : errorConstructor(this.toOperationNode()); - throw error; - } - return result; - } -} -exports.WheneableMergeQueryBuilder = WheneableMergeQueryBuilder; -class MatchedThenableMergeQueryBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - /** - * Performs the `delete` action. - * - * To perform the `do nothing` action, see {@link thenDoNothing}. - * - * To perform the `update` action, see {@link thenUpdate} or {@link thenUpdateSet}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenDelete() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * delete - * ``` - */ - thenDelete() { - return new WheneableMergeQueryBuilder({ - ...this.#props, - queryNode: merge_query_node_js_1.MergeQueryNode.cloneWithThen(this.#props.queryNode, (0, merge_parser_js_1.parseMergeThen)('delete')), - }); - } - /** - * Performs the `do nothing` action. - * - * This is supported in PostgreSQL. - * - * To perform the `delete` action, see {@link thenDelete}. - * - * To perform the `update` action, see {@link thenUpdate} or {@link thenUpdateSet}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenDoNothing() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * do nothing - * ``` - */ - thenDoNothing() { - return new WheneableMergeQueryBuilder({ - ...this.#props, - queryNode: merge_query_node_js_1.MergeQueryNode.cloneWithThen(this.#props.queryNode, (0, merge_parser_js_1.parseMergeThen)('do nothing')), - }); - } - /** - * Perform an `update` operation with a full-fledged {@link UpdateQueryBuilder}. - * This is handy when multiple `set` invocations are needed. - * - * For a shorthand version of this method, see {@link thenUpdateSet}. - * - * To perform the `delete` action, see {@link thenDelete}. - * - * To perform the `do nothing` action, see {@link thenDoNothing}. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenUpdate((ub) => ub - * .set(sql`metadata['has_pets']`, 'Y') - * .set({ - * updated_at: new Date().toISOString(), - * }) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * update set metadata['has_pets'] = $1, "updated_at" = $2 - * ``` - */ - thenUpdate(set) { - return new WheneableMergeQueryBuilder({ - ...this.#props, - queryNode: merge_query_node_js_1.MergeQueryNode.cloneWithThen(this.#props.queryNode, (0, merge_parser_js_1.parseMergeThen)(set(new update_query_builder_js_1.UpdateQueryBuilder({ - queryId: this.#props.queryId, - executor: noop_query_executor_js_1.NOOP_QUERY_EXECUTOR, - queryNode: update_query_node_js_1.UpdateQueryNode.createWithoutTable(), - })))), - }); - } - thenUpdateSet(...args) { - // @ts-ignore not sure how to type this so it won't complain about set(...args). - return this.thenUpdate((ub) => ub.set(...args)); - } -} -exports.MatchedThenableMergeQueryBuilder = MatchedThenableMergeQueryBuilder; -class NotMatchedThenableMergeQueryBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - /** - * Performs the `do nothing` action. - * - * This is supported in PostgreSQL. - * - * To perform the `insert` action, see {@link thenInsertValues}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenNotMatched() - * .thenDoNothing() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when not matched then - * do nothing - * ``` - */ - thenDoNothing() { - return new WheneableMergeQueryBuilder({ - ...this.#props, - queryNode: merge_query_node_js_1.MergeQueryNode.cloneWithThen(this.#props.queryNode, (0, merge_parser_js_1.parseMergeThen)('do nothing')), - }); - } - thenInsertValues(insert) { - const [columns, values] = (0, insert_values_parser_js_1.parseInsertExpression)(insert); - return new WheneableMergeQueryBuilder({ - ...this.#props, - queryNode: merge_query_node_js_1.MergeQueryNode.cloneWithThen(this.#props.queryNode, (0, merge_parser_js_1.parseMergeThen)(insert_query_node_js_1.InsertQueryNode.cloneWith(insert_query_node_js_1.InsertQueryNode.createWithoutInto(), { - columns, - values, - }))), - }); - } -} -exports.NotMatchedThenableMergeQueryBuilder = NotMatchedThenableMergeQueryBuilder; diff --git a/node_modules/kysely/dist/cjs/query-builder/merge-result.d.ts b/node_modules/kysely/dist/cjs/query-builder/merge-result.d.ts deleted file mode 100644 index fcad45f..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/merge-result.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare class MergeResult { - readonly numChangedRows: bigint | undefined; - constructor(numChangedRows: bigint | undefined); -} diff --git a/node_modules/kysely/dist/cjs/query-builder/merge-result.js b/node_modules/kysely/dist/cjs/query-builder/merge-result.js deleted file mode 100644 index 60a0fda..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/merge-result.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MergeResult = void 0; -class MergeResult { - numChangedRows; - constructor(numChangedRows) { - this.numChangedRows = numChangedRows; - } -} -exports.MergeResult = MergeResult; diff --git a/node_modules/kysely/dist/cjs/query-builder/no-result-error.d.ts b/node_modules/kysely/dist/cjs/query-builder/no-result-error.d.ts deleted file mode 100644 index 656ef04..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/no-result-error.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { QueryNode } from '../operation-node/query-node.js'; -export type NoResultErrorConstructor = new (node: QueryNode) => Error; -export declare class NoResultError extends Error { - /** - * The operation node tree of the query that was executed. - */ - readonly node: QueryNode; - constructor(node: QueryNode); -} -export declare function isNoResultErrorConstructor(fn: NoResultErrorConstructor | ((node: QueryNode) => Error)): fn is NoResultErrorConstructor; diff --git a/node_modules/kysely/dist/cjs/query-builder/no-result-error.js b/node_modules/kysely/dist/cjs/query-builder/no-result-error.js deleted file mode 100644 index 6063df5..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/no-result-error.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NoResultError = void 0; -exports.isNoResultErrorConstructor = isNoResultErrorConstructor; -class NoResultError extends Error { - /** - * The operation node tree of the query that was executed. - */ - node; - constructor(node) { - super('no result'); - this.node = node; - } -} -exports.NoResultError = NoResultError; -function isNoResultErrorConstructor(fn) { - return Object.prototype.hasOwnProperty.call(fn, 'prototype'); -} diff --git a/node_modules/kysely/dist/cjs/query-builder/on-conflict-builder.d.ts b/node_modules/kysely/dist/cjs/query-builder/on-conflict-builder.d.ts deleted file mode 100644 index af9df91..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/on-conflict-builder.d.ts +++ /dev/null @@ -1,872 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -import { OnConflictNode } from '../operation-node/on-conflict-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { type ComparisonOperatorExpression, type OperandValueExpressionOrList } from '../parser/binary-operation-parser.js'; -import type { ExpressionOrFactory } from '../parser/expression-parser.js'; -import type { ReferenceExpression } from '../parser/reference-parser.js'; -import { type UpdateObjectExpression } from '../parser/update-set-parser.js'; -import type { Updateable } from '../util/column-type.js'; -import type { AnyColumn, SqlBool } from '../util/type-utils.js'; -import type { WhereInterface } from './where-interface.js'; -export declare class OnConflictBuilder implements WhereInterface { - #private; - constructor(props: OnConflictBuilderProps); - /** - * Specify a single column as the conflict target. - * - * Also see the {@link columns}, {@link constraint} and {@link expression} - * methods for alternative ways to specify the conflict target. - */ - column(column: AnyColumn): OnConflictBuilder; - /** - * Specify a list of columns as the conflict target. - * - * Also see the {@link column}, {@link constraint} and {@link expression} - * methods for alternative ways to specify the conflict target. - */ - columns(columns: ReadonlyArray>): OnConflictBuilder; - /** - * Specify a specific constraint by name as the conflict target. - * - * Also see the {@link column}, {@link columns} and {@link expression} - * methods for alternative ways to specify the conflict target. - */ - constraint(constraintName: string): OnConflictBuilder; - /** - * Specify an expression as the conflict target. - * - * This can be used if the unique index is an expression index. - * - * Also see the {@link column}, {@link columns} and {@link constraint} - * methods for alternative ways to specify the conflict target. - */ - expression(expression: Expression): OnConflictBuilder; - /** - * Adds a `where` expression to the query. - * - * Calling this method multiple times will combine the expressions using `and`. - * - * Also see {@link whereRef} - * - * ### Examples - * - * - * - * `where` method calls are combined with `AND`: - * - * ```ts - * const person = await db - * .selectFrom('person') - * .selectAll() - * .where('first_name', '=', 'Jennifer') - * .where('age', '>', 40) - * .executeTakeFirst() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "first_name" = $1 and "age" > $2 - * ``` - * - * Operator can be any supported operator or if the typings don't support it - * you can always use: - * - * ```ts - * import { sql } from 'kysely' - * - * sql`your operator` - * ``` - * - * - * - * Find multiple items using a list of identifiers: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where('id', 'in', [1, 2, 3]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "id" in ($1, $2, $3) - * ``` - * - * - * - * You can use the `and` function to create a simple equality - * filter using an object - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where((eb) => eb.and({ - * first_name: 'Jennifer', - * last_name: eb.ref('first_name') - * })) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * "first_name" = $1 - * and "last_name" = "first_name" - * ) - * ``` - * - * - * - * To combine conditions using `OR`, you can use the expression builder. - * There are two ways to create `OR` expressions. Both are shown in this - * example: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * // 1. Using the `or` method on the expression builder: - * .where((eb) => eb.or([ - * eb('first_name', '=', 'Jennifer'), - * eb('first_name', '=', 'Sylvester') - * ])) - * // 2. Chaining expressions using the `or` method on the - * // created expressions: - * .where((eb) => - * eb('last_name', '=', 'Aniston').or('last_name', '=', 'Stallone') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * ("first_name" = $1 or "first_name" = $2) - * and - * ("last_name" = $3 or "last_name" = $4) - * ) - * ``` - * - * - * - * You can add expressions conditionally like this: - * - * ```ts - * import { Expression, SqlBool } from 'kysely' - * - * const firstName: string | undefined = 'Jennifer' - * const lastName: string | undefined = 'Aniston' - * const under18 = true - * const over60 = true - * - * let query = db - * .selectFrom('person') - * .selectAll() - * - * if (firstName) { - * // The query builder is immutable. Remember to reassign - * // the result back to the query variable. - * query = query.where('first_name', '=', firstName) - * } - * - * if (lastName) { - * query = query.where('last_name', '=', lastName) - * } - * - * if (under18 || over60) { - * // Conditional OR expressions can be added like this. - * query = query.where((eb) => { - * const ors: Expression[] = [] - * - * if (under18) { - * ors.push(eb('age', '<', 18)) - * } - * - * if (over60) { - * ors.push(eb('age', '>', 60)) - * } - * - * return eb.or(ors) - * }) - * } - * - * const persons = await query.execute() - * ``` - * - * Both the first and third argument can also be arbitrary expressions like - * subqueries. An expression can defined by passing a function and calling - * the methods of the {@link ExpressionBuilder} passed to the callback: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where( - * (qb) => qb.selectFrom('pet') - * .select('pet.name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1), - * '=', - * 'Fluffy' - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * select "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) = $2 - * ``` - * - * A `where in` query can be built by using the `in` operator and an array - * of values. The values in the array can also be expressions: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where('person.id', 'in', [100, 200, 300]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "id" in ($1, $2, $3) - * ``` - * - * - * - * For complex `where` expressions you can pass in a single callback and - * use the `ExpressionBuilder` to build your expression: - * - * ```ts - * const firstName = 'Jennifer' - * const maxAge = 60 - * - * const persons = await db - * .selectFrom('person') - * .selectAll('person') - * .where(({ eb, or, and, not, exists, selectFrom }) => and([ - * or([ - * eb('first_name', '=', firstName), - * eb('age', '<', maxAge) - * ]), - * not(exists( - * selectFrom('pet') - * .select('pet.id') - * .whereRef('pet.owner_id', '=', 'person.id') - * )) - * ])) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where ( - * ( - * "first_name" = $1 - * or "age" < $2 - * ) - * and not exists ( - * select "pet"."id" from "pet" where "pet"."owner_id" = "person"."id" - * ) - * ) - * ``` - * - * If everything else fails, you can always use the {@link sql} tag - * as any of the arguments, including the operator: - * - * ```ts - * import { sql } from 'kysely' - * - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where( - * sql`coalesce(first_name, last_name)`, - * 'like', - * '%' + name + '%', - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * where coalesce(first_name, last_name) like $1 - * ``` - * - * In all examples above the columns were known at compile time - * (except for the raw {@link sql} expressions). By default kysely only - * allows you to refer to columns that exist in the database **and** - * can be referred to in the current query and context. - * - * Sometimes you may want to refer to columns that come from the user - * input and thus are not available at compile time. - * - * You have two options, the {@link sql} tag or `db.dynamic`. The example below - * uses both: - * - * ```ts - * import { sql } from 'kysely' - * const { ref } = db.dynamic - * - * const columnFromUserInput: string = 'id' - * - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where(ref(columnFromUserInput), '=', 1) - * .where(sql.id(columnFromUserInput), '=', 2) - * .execute() - * ``` - */ - where, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): OnConflictBuilder; - where>(expression: E): OnConflictBuilder; - /** - * Adds a `where` clause where both sides of the operator are references - * to columns. - * - * The normal `where` method treats the right hand side argument as a - * value by default. `whereRef` treats it as a column reference. This method is - * expecially useful with joins and correlated subqueries. - * - * ### Examples - * - * Usage with a join: - * - * ```ts - * db.selectFrom(['person', 'pet']) - * .selectAll() - * .whereRef('person.first_name', '=', 'pet.name') - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person", "pet" where "person"."first_name" = "pet"."name" - * ``` - * - * Usage in a subquery: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll('person') - * .select((eb) => eb - * .selectFrom('pet') - * .select('name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1) - * .as('pet_name') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".*, ( - * select "name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) as "pet_name" - * from "person" - */ - whereRef, RRE extends ReferenceExpression>(lhs: LRE, op: ComparisonOperatorExpression, rhs: RRE): OnConflictBuilder; - /** - * Clears all where expressions from the query. - * - * ### Examples - * - * ```ts - * db.selectFrom('person') - * .selectAll() - * .where('id','=',42) - * .clearWhere() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearWhere(): OnConflictBuilder; - /** - * Adds the "do nothing" conflict action. - * - * ### Examples - * - * ```ts - * const id = 1 - * const first_name = 'John' - * - * await db - * .insertInto('person') - * .values({ first_name, id }) - * .onConflict((oc) => oc - * .column('id') - * .doNothing() - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "id") - * values ($1, $2) - * on conflict ("id") do nothing - * ``` - */ - doNothing(): OnConflictDoNothingBuilder; - /** - * Adds the "do update set" conflict action. - * - * ### Examples - * - * ```ts - * const id = 1 - * const first_name = 'John' - * - * await db - * .insertInto('person') - * .values({ first_name, id }) - * .onConflict((oc) => oc - * .column('id') - * .doUpdateSet({ first_name }) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "id") - * values ($1, $2) - * on conflict ("id") - * do update set "first_name" = $3 - * ``` - * - * In the next example we use the `ref` method to reference - * columns of the virtual table `excluded` in a type-safe way - * to create an upsert operation: - * - * ```ts - * import type { NewPerson } from 'type-editor' // imaginary module - * - * async function upsertPerson(person: NewPerson): Promise { - * await db.insertInto('person') - * .values(person) - * .onConflict((oc) => oc - * .column('id') - * .doUpdateSet((eb) => ({ - * first_name: eb.ref('excluded.first_name'), - * last_name: eb.ref('excluded.last_name') - * }) - * ) - * ) - * .execute() - * } - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name") - * values ($1, $2) - * on conflict ("id") - * do update set - * "first_name" = excluded."first_name", - * "last_name" = excluded."last_name" - * ``` - */ - doUpdateSet(update: UpdateObjectExpression, OnConflictTables, OnConflictTables>): OnConflictUpdateBuilder, OnConflictTables>; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; -} -export interface OnConflictBuilderProps { - readonly onConflictNode: OnConflictNode; -} -export type OnConflictDatabase = { - [K in keyof DB | 'excluded']: Updateable; -}; -export type OnConflictTables = TB | 'excluded'; -export declare class OnConflictDoNothingBuilder implements OperationNodeSource { - #private; - constructor(props: OnConflictBuilderProps); - toOperationNode(): OnConflictNode; -} -export declare class OnConflictUpdateBuilder implements WhereInterface, OperationNodeSource { - #private; - constructor(props: OnConflictBuilderProps); - /** - * Specify a where condition for the update operation. - * - * See {@link WhereInterface.where} for more info. - */ - where, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): OnConflictUpdateBuilder; - /** - * Adds a `where` expression to the query. - * - * Calling this method multiple times will combine the expressions using `and`. - * - * Also see {@link whereRef} - * - * ### Examples - * - * - * - * `where` method calls are combined with `AND`: - * - * ```ts - * const person = await db - * .selectFrom('person') - * .selectAll() - * .where('first_name', '=', 'Jennifer') - * .where('age', '>', 40) - * .executeTakeFirst() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "first_name" = $1 and "age" > $2 - * ``` - * - * Operator can be any supported operator or if the typings don't support it - * you can always use: - * - * ```ts - * import { sql } from 'kysely' - * - * sql`your operator` - * ``` - * - * - * - * Find multiple items using a list of identifiers: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where('id', 'in', [1, 2, 3]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "id" in ($1, $2, $3) - * ``` - * - * - * - * You can use the `and` function to create a simple equality - * filter using an object - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where((eb) => eb.and({ - * first_name: 'Jennifer', - * last_name: eb.ref('first_name') - * })) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * "first_name" = $1 - * and "last_name" = "first_name" - * ) - * ``` - * - * - * - * To combine conditions using `OR`, you can use the expression builder. - * There are two ways to create `OR` expressions. Both are shown in this - * example: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * // 1. Using the `or` method on the expression builder: - * .where((eb) => eb.or([ - * eb('first_name', '=', 'Jennifer'), - * eb('first_name', '=', 'Sylvester') - * ])) - * // 2. Chaining expressions using the `or` method on the - * // created expressions: - * .where((eb) => - * eb('last_name', '=', 'Aniston').or('last_name', '=', 'Stallone') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * ("first_name" = $1 or "first_name" = $2) - * and - * ("last_name" = $3 or "last_name" = $4) - * ) - * ``` - * - * - * - * You can add expressions conditionally like this: - * - * ```ts - * import { Expression, SqlBool } from 'kysely' - * - * const firstName: string | undefined = 'Jennifer' - * const lastName: string | undefined = 'Aniston' - * const under18 = true - * const over60 = true - * - * let query = db - * .selectFrom('person') - * .selectAll() - * - * if (firstName) { - * // The query builder is immutable. Remember to reassign - * // the result back to the query variable. - * query = query.where('first_name', '=', firstName) - * } - * - * if (lastName) { - * query = query.where('last_name', '=', lastName) - * } - * - * if (under18 || over60) { - * // Conditional OR expressions can be added like this. - * query = query.where((eb) => { - * const ors: Expression[] = [] - * - * if (under18) { - * ors.push(eb('age', '<', 18)) - * } - * - * if (over60) { - * ors.push(eb('age', '>', 60)) - * } - * - * return eb.or(ors) - * }) - * } - * - * const persons = await query.execute() - * ``` - * - * Both the first and third argument can also be arbitrary expressions like - * subqueries. An expression can defined by passing a function and calling - * the methods of the {@link ExpressionBuilder} passed to the callback: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where( - * (qb) => qb.selectFrom('pet') - * .select('pet.name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1), - * '=', - * 'Fluffy' - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * select "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) = $2 - * ``` - * - * A `where in` query can be built by using the `in` operator and an array - * of values. The values in the array can also be expressions: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where('person.id', 'in', [100, 200, 300]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "id" in ($1, $2, $3) - * ``` - * - * - * - * For complex `where` expressions you can pass in a single callback and - * use the `ExpressionBuilder` to build your expression: - * - * ```ts - * const firstName = 'Jennifer' - * const maxAge = 60 - * - * const persons = await db - * .selectFrom('person') - * .selectAll('person') - * .where(({ eb, or, and, not, exists, selectFrom }) => and([ - * or([ - * eb('first_name', '=', firstName), - * eb('age', '<', maxAge) - * ]), - * not(exists( - * selectFrom('pet') - * .select('pet.id') - * .whereRef('pet.owner_id', '=', 'person.id') - * )) - * ])) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where ( - * ( - * "first_name" = $1 - * or "age" < $2 - * ) - * and not exists ( - * select "pet"."id" from "pet" where "pet"."owner_id" = "person"."id" - * ) - * ) - * ``` - * - * If everything else fails, you can always use the {@link sql} tag - * as any of the arguments, including the operator: - * - * ```ts - * import { sql } from 'kysely' - * - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where( - * sql`coalesce(first_name, last_name)`, - * 'like', - * '%' + name + '%', - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * where coalesce(first_name, last_name) like $1 - * ``` - * - * In all examples above the columns were known at compile time - * (except for the raw {@link sql} expressions). By default kysely only - * allows you to refer to columns that exist in the database **and** - * can be referred to in the current query and context. - * - * Sometimes you may want to refer to columns that come from the user - * input and thus are not available at compile time. - * - * You have two options, the {@link sql} tag or `db.dynamic`. The example below - * uses both: - * - * ```ts - * import { sql } from 'kysely' - * const { ref } = db.dynamic - * - * const columnFromUserInput: string = 'id' - * - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where(ref(columnFromUserInput), '=', 1) - * .where(sql.id(columnFromUserInput), '=', 2) - * .execute() - * ``` - */ - where>(expression: E): OnConflictUpdateBuilder; - /** - * Specify a where condition for the update operation. - * - * See {@link WhereInterface.whereRef} for more info. - */ - whereRef, RRE extends ReferenceExpression>(lhs: LRE, op: ComparisonOperatorExpression, rhs: RRE): OnConflictUpdateBuilder; - /** - * Clears all where expressions from the query. - * - * ### Examples - * - * ```ts - * db.selectFrom('person') - * .selectAll() - * .where('id','=',42) - * .clearWhere() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearWhere(): OnConflictUpdateBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): OnConflictNode; -} diff --git a/node_modules/kysely/dist/cjs/query-builder/on-conflict-builder.js b/node_modules/kysely/dist/cjs/query-builder/on-conflict-builder.js deleted file mode 100644 index fa4ed5d..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/on-conflict-builder.js +++ /dev/null @@ -1,259 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OnConflictUpdateBuilder = exports.OnConflictDoNothingBuilder = exports.OnConflictBuilder = void 0; -const column_node_js_1 = require("../operation-node/column-node.js"); -const identifier_node_js_1 = require("../operation-node/identifier-node.js"); -const on_conflict_node_js_1 = require("../operation-node/on-conflict-node.js"); -const binary_operation_parser_js_1 = require("../parser/binary-operation-parser.js"); -const update_set_parser_js_1 = require("../parser/update-set-parser.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -class OnConflictBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - /** - * Specify a single column as the conflict target. - * - * Also see the {@link columns}, {@link constraint} and {@link expression} - * methods for alternative ways to specify the conflict target. - */ - column(column) { - const columnNode = column_node_js_1.ColumnNode.create(column); - return new OnConflictBuilder({ - ...this.#props, - onConflictNode: on_conflict_node_js_1.OnConflictNode.cloneWith(this.#props.onConflictNode, { - columns: this.#props.onConflictNode.columns - ? (0, object_utils_js_1.freeze)([...this.#props.onConflictNode.columns, columnNode]) - : (0, object_utils_js_1.freeze)([columnNode]), - }), - }); - } - /** - * Specify a list of columns as the conflict target. - * - * Also see the {@link column}, {@link constraint} and {@link expression} - * methods for alternative ways to specify the conflict target. - */ - columns(columns) { - const columnNodes = columns.map(column_node_js_1.ColumnNode.create); - return new OnConflictBuilder({ - ...this.#props, - onConflictNode: on_conflict_node_js_1.OnConflictNode.cloneWith(this.#props.onConflictNode, { - columns: this.#props.onConflictNode.columns - ? (0, object_utils_js_1.freeze)([...this.#props.onConflictNode.columns, ...columnNodes]) - : (0, object_utils_js_1.freeze)(columnNodes), - }), - }); - } - /** - * Specify a specific constraint by name as the conflict target. - * - * Also see the {@link column}, {@link columns} and {@link expression} - * methods for alternative ways to specify the conflict target. - */ - constraint(constraintName) { - return new OnConflictBuilder({ - ...this.#props, - onConflictNode: on_conflict_node_js_1.OnConflictNode.cloneWith(this.#props.onConflictNode, { - constraint: identifier_node_js_1.IdentifierNode.create(constraintName), - }), - }); - } - /** - * Specify an expression as the conflict target. - * - * This can be used if the unique index is an expression index. - * - * Also see the {@link column}, {@link columns} and {@link constraint} - * methods for alternative ways to specify the conflict target. - */ - expression(expression) { - return new OnConflictBuilder({ - ...this.#props, - onConflictNode: on_conflict_node_js_1.OnConflictNode.cloneWith(this.#props.onConflictNode, { - indexExpression: expression.toOperationNode(), - }), - }); - } - where(...args) { - return new OnConflictBuilder({ - ...this.#props, - onConflictNode: on_conflict_node_js_1.OnConflictNode.cloneWithIndexWhere(this.#props.onConflictNode, (0, binary_operation_parser_js_1.parseValueBinaryOperationOrExpression)(args)), - }); - } - whereRef(lhs, op, rhs) { - return new OnConflictBuilder({ - ...this.#props, - onConflictNode: on_conflict_node_js_1.OnConflictNode.cloneWithIndexWhere(this.#props.onConflictNode, (0, binary_operation_parser_js_1.parseReferentialBinaryOperation)(lhs, op, rhs)), - }); - } - clearWhere() { - return new OnConflictBuilder({ - ...this.#props, - onConflictNode: on_conflict_node_js_1.OnConflictNode.cloneWithoutIndexWhere(this.#props.onConflictNode), - }); - } - /** - * Adds the "do nothing" conflict action. - * - * ### Examples - * - * ```ts - * const id = 1 - * const first_name = 'John' - * - * await db - * .insertInto('person') - * .values({ first_name, id }) - * .onConflict((oc) => oc - * .column('id') - * .doNothing() - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "id") - * values ($1, $2) - * on conflict ("id") do nothing - * ``` - */ - doNothing() { - return new OnConflictDoNothingBuilder({ - ...this.#props, - onConflictNode: on_conflict_node_js_1.OnConflictNode.cloneWith(this.#props.onConflictNode, { - doNothing: true, - }), - }); - } - /** - * Adds the "do update set" conflict action. - * - * ### Examples - * - * ```ts - * const id = 1 - * const first_name = 'John' - * - * await db - * .insertInto('person') - * .values({ first_name, id }) - * .onConflict((oc) => oc - * .column('id') - * .doUpdateSet({ first_name }) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "id") - * values ($1, $2) - * on conflict ("id") - * do update set "first_name" = $3 - * ``` - * - * In the next example we use the `ref` method to reference - * columns of the virtual table `excluded` in a type-safe way - * to create an upsert operation: - * - * ```ts - * import type { NewPerson } from 'type-editor' // imaginary module - * - * async function upsertPerson(person: NewPerson): Promise { - * await db.insertInto('person') - * .values(person) - * .onConflict((oc) => oc - * .column('id') - * .doUpdateSet((eb) => ({ - * first_name: eb.ref('excluded.first_name'), - * last_name: eb.ref('excluded.last_name') - * }) - * ) - * ) - * .execute() - * } - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name") - * values ($1, $2) - * on conflict ("id") - * do update set - * "first_name" = excluded."first_name", - * "last_name" = excluded."last_name" - * ``` - */ - doUpdateSet(update) { - return new OnConflictUpdateBuilder({ - ...this.#props, - onConflictNode: on_conflict_node_js_1.OnConflictNode.cloneWith(this.#props.onConflictNode, { - updates: (0, update_set_parser_js_1.parseUpdateObjectExpression)(update), - }), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } -} -exports.OnConflictBuilder = OnConflictBuilder; -class OnConflictDoNothingBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - toOperationNode() { - return this.#props.onConflictNode; - } -} -exports.OnConflictDoNothingBuilder = OnConflictDoNothingBuilder; -class OnConflictUpdateBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - where(...args) { - return new OnConflictUpdateBuilder({ - ...this.#props, - onConflictNode: on_conflict_node_js_1.OnConflictNode.cloneWithUpdateWhere(this.#props.onConflictNode, (0, binary_operation_parser_js_1.parseValueBinaryOperationOrExpression)(args)), - }); - } - /** - * Specify a where condition for the update operation. - * - * See {@link WhereInterface.whereRef} for more info. - */ - whereRef(lhs, op, rhs) { - return new OnConflictUpdateBuilder({ - ...this.#props, - onConflictNode: on_conflict_node_js_1.OnConflictNode.cloneWithUpdateWhere(this.#props.onConflictNode, (0, binary_operation_parser_js_1.parseReferentialBinaryOperation)(lhs, op, rhs)), - }); - } - clearWhere() { - return new OnConflictUpdateBuilder({ - ...this.#props, - onConflictNode: on_conflict_node_js_1.OnConflictNode.cloneWithoutUpdateWhere(this.#props.onConflictNode), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.onConflictNode; - } -} -exports.OnConflictUpdateBuilder = OnConflictUpdateBuilder; diff --git a/node_modules/kysely/dist/cjs/query-builder/order-by-interface.d.ts b/node_modules/kysely/dist/cjs/query-builder/order-by-interface.d.ts deleted file mode 100644 index 0b15dd5..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/order-by-interface.d.ts +++ /dev/null @@ -1,158 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -import type { OrderByExpression, DirectedOrderByStringReference, OrderByModifiers } from '../parser/order-by-parser.js'; -export interface OrderByInterface { - /** - * Adds an `order by` clause to the query. - * - * `orderBy` calls are additive. Meaning, additional `orderBy` calls append to - * the existing order by clause. - * - * `orderBy` is supported in select queries on all dialects. In MySQL, you can - * also use `orderBy` in update and delete queries. - * - * In a single call you can add a single column/expression or multiple columns/expressions. - * - * Single column/expression calls can have 1-2 arguments. The first argument is - * the expression to order by, while the second optional argument is the direction - * (`asc` or `desc`), a callback that accepts and returns an {@link OrderByItemBuilder} - * or an expression. - * - * See {@link clearOrderBy} to remove the `order by` clause from a query. - * - * ### Examples - * - * Single column/expression per call: - * - * ```ts - * await db - * .selectFrom('person') - * .select('person.first_name as fn') - * .orderBy('id') - * .orderBy('fn', 'desc') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."first_name" as "fn" - * from "person" - * order by "id", "fn" desc - * ``` - * - * Building advanced modifiers: - * - * ```ts - * await db - * .selectFrom('person') - * .select('person.first_name as fn') - * .orderBy('id', (ob) => ob.desc().nullsFirst()) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."first_name" as "fn" - * from "person" - * order by "id" desc nulls first - * ``` - * - * The order by expression can also be a raw sql expression or a subquery - * in addition to column references: - * - * ```ts - * import { sql } from 'kysely' - * - * await db - * .selectFrom('person') - * .selectAll() - * .orderBy((eb) => eb.selectFrom('pet') - * .select('pet.name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1) - * ) - * .orderBy( - * sql`concat(first_name, last_name) asc` - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * order by - * ( select "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) asc, - * concat(first_name, last_name) asc - * ``` - * - * `dynamic.ref` can be used to refer to columns not known at - * compile time: - * - * ```ts - * async function someQuery(orderBy: string) { - * const { ref } = db.dynamic - * - * return await db - * .selectFrom('person') - * .select('person.first_name as fn') - * .orderBy(ref(orderBy)) - * .execute() - * } - * - * someQuery('fn') - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."first_name" as "fn" - * from "person" - * order by "fn" - * ``` - */ - orderBy>(expr: OE, modifiers?: OrderByModifiers): OrderByInterface; - /** - * @deprecated It does ~2-2.6x more compile-time instantiations compared to multiple chained `orderBy(expr, modifiers?)` calls (in `order by` clauses with reasonable item counts), and has broken autocompletion. - */ - orderBy | DirectedOrderByStringReference>(exprs: ReadonlyArray): OrderByInterface; - /** - * @deprecated It does ~2.9x more compile-time instantiations compared to a `orderBy(expr, direction)` call. - */ - orderBy>(expr: OE): OrderByInterface; - /** - * @deprecated Use `orderBy(expr, (ob) => ...)` instead. - */ - orderBy>(expr: OE, modifiers: Expression): OrderByInterface; - /** - * Clears the `order by` clause from the query. - * - * See {@link orderBy} for adding an `order by` clause or item to a query. - * - * ### Examples - * - * ```ts - * const query = db - * .selectFrom('person') - * .selectAll() - * .orderBy('id', 'desc') - * - * const results = await query - * .clearOrderBy() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearOrderBy(): OrderByInterface; -} diff --git a/node_modules/kysely/dist/cjs/query-builder/order-by-interface.js b/node_modules/kysely/dist/cjs/query-builder/order-by-interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/order-by-interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/query-builder/order-by-item-builder.d.ts b/node_modules/kysely/dist/cjs/query-builder/order-by-item-builder.d.ts deleted file mode 100644 index c8538a5..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/order-by-item-builder.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { OrderByItemNode } from '../operation-node/order-by-item-node.js'; -import type { Collation } from '../parser/collate-parser.js'; -export declare class OrderByItemBuilder implements OperationNodeSource { - #private; - constructor(props: OrderByItemBuilderProps); - /** - * Adds `desc` to the `order by` item. - * - * See {@link asc} for the opposite. - */ - desc(): OrderByItemBuilder; - /** - * Adds `asc` to the `order by` item. - * - * See {@link desc} for the opposite. - */ - asc(): OrderByItemBuilder; - /** - * Adds `nulls last` to the `order by` item. - * - * This is only supported by some dialects like PostgreSQL and SQLite. - * - * See {@link nullsFirst} for the opposite. - */ - nullsLast(): OrderByItemBuilder; - /** - * Adds `nulls first` to the `order by` item. - * - * This is only supported by some dialects like PostgreSQL and SQLite. - * - * See {@link nullsLast} for the opposite. - */ - nullsFirst(): OrderByItemBuilder; - /** - * Adds `collate ` to the `order by` item. - */ - collate(collation: Collation): OrderByItemBuilder; - toOperationNode(): OrderByItemNode; -} -export interface OrderByItemBuilderProps { - readonly node: OrderByItemNode; -} diff --git a/node_modules/kysely/dist/cjs/query-builder/order-by-item-builder.js b/node_modules/kysely/dist/cjs/query-builder/order-by-item-builder.js deleted file mode 100644 index c91b420..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/order-by-item-builder.js +++ /dev/null @@ -1,75 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OrderByItemBuilder = void 0; -const collate_node_js_1 = require("../operation-node/collate-node.js"); -const order_by_item_node_js_1 = require("../operation-node/order-by-item-node.js"); -const raw_node_js_1 = require("../operation-node/raw-node.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -class OrderByItemBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - /** - * Adds `desc` to the `order by` item. - * - * See {@link asc} for the opposite. - */ - desc() { - return new OrderByItemBuilder({ - node: order_by_item_node_js_1.OrderByItemNode.cloneWith(this.#props.node, { - direction: raw_node_js_1.RawNode.createWithSql('desc'), - }), - }); - } - /** - * Adds `asc` to the `order by` item. - * - * See {@link desc} for the opposite. - */ - asc() { - return new OrderByItemBuilder({ - node: order_by_item_node_js_1.OrderByItemNode.cloneWith(this.#props.node, { - direction: raw_node_js_1.RawNode.createWithSql('asc'), - }), - }); - } - /** - * Adds `nulls last` to the `order by` item. - * - * This is only supported by some dialects like PostgreSQL and SQLite. - * - * See {@link nullsFirst} for the opposite. - */ - nullsLast() { - return new OrderByItemBuilder({ - node: order_by_item_node_js_1.OrderByItemNode.cloneWith(this.#props.node, { nulls: 'last' }), - }); - } - /** - * Adds `nulls first` to the `order by` item. - * - * This is only supported by some dialects like PostgreSQL and SQLite. - * - * See {@link nullsLast} for the opposite. - */ - nullsFirst() { - return new OrderByItemBuilder({ - node: order_by_item_node_js_1.OrderByItemNode.cloneWith(this.#props.node, { nulls: 'first' }), - }); - } - /** - * Adds `collate ` to the `order by` item. - */ - collate(collation) { - return new OrderByItemBuilder({ - node: order_by_item_node_js_1.OrderByItemNode.cloneWith(this.#props.node, { - collation: collate_node_js_1.CollateNode.create(collation), - }), - }); - } - toOperationNode() { - return this.#props.node; - } -} -exports.OrderByItemBuilder = OrderByItemBuilder; diff --git a/node_modules/kysely/dist/cjs/query-builder/output-interface.d.ts b/node_modules/kysely/dist/cjs/query-builder/output-interface.d.ts deleted file mode 100644 index 0ebfa7f..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/output-interface.d.ts +++ /dev/null @@ -1,138 +0,0 @@ -import type { ExpressionBuilder } from '../expression/expression-builder.js'; -import type { AliasedExpressionOrFactory } from '../parser/expression-parser.js'; -import type { ReturningAllRow, ReturningRow } from '../parser/returning-parser.js'; -import type { AnyAliasedColumnWithTable, AnyColumnWithTable } from '../util/type-utils.js'; -export interface OutputInterface { - /** - * Allows you to return data from modified rows. - * - * On supported databases like MS SQL Server (MSSQL), this method can be chained - * to `insert`, `update`, `delete` and `merge` queries to return data. - * - * Also see the {@link outputAll} method. - * - * ### Examples - * - * Return one column: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .output('inserted.id') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * gender: 'female', - * }) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "gender") - * output "inserted"."id" - * values (@1, @2, @3) - * ``` - * - * Return multiple columns: - * - * ```ts - * const { old_first_name, old_last_name, new_first_name, new_last_name } = await db - * .updateTable('person') - * .set({ first_name: 'John', last_name: 'Doe' }) - * .output([ - * 'deleted.first_name as old_first_name', - * 'deleted.last_name as old_last_name', - * 'inserted.first_name as new_first_name', - * 'inserted.last_name as new_last_name', - * ]) - * .where('created_at', '<', new Date()) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * update "person" - * set "first_name" = @1, "last_name" = @2 - * output "deleted"."first_name" as "old_first_name", - * "deleted"."last_name" as "old_last_name", - * "inserted"."first_name" as "new_first_name", - * "inserted"."last_name" as "new_last_name" - * where "created_at" < @3 - * ``` - * - * Return arbitrary expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * const { full_name } = await db - * .deleteFrom('person') - * .output((eb) => sql`concat(${eb.ref('deleted.first_name')}, ' ', ${eb.ref('deleted.last_name')})`.as('full_name')) - * .where('created_at', '<', new Date()) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * delete from "person" - * output concat("deleted"."first_name", ' ', "deleted"."last_name") as "full_name" - * where "created_at" < @1 - * ``` - * - * Return the action performed on the row: - * - * ```ts - * await db - * .mergeInto('person') - * .using('pet', 'pet.owner_id', 'person.id') - * .whenMatched() - * .thenDelete() - * .whenNotMatched() - * .thenInsertValues({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male' - * }) - * .output([ - * 'inserted.id as inserted_id', - * 'deleted.id as deleted_id', - * ]) - * .execute() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * merge into "person" - * using "pet" on "pet"."owner_id" = "person"."id" - * when matched then delete - * when not matched then - * insert ("first_name", "last_name", "gender") - * values (@1, @2, @3) - * output "inserted"."id" as "inserted_id", "deleted"."id" as "deleted_id" - * ``` - * - */ - output>(selections: ReadonlyArray): OutputInterface>, OP>; - output>(callback: CB): OutputInterface>, OP>; - output>(selection: OE): OutputInterface>, OP>; - /** - * Adds an `output {prefix}.*` to an `insert`/`update`/`delete`/`merge` query on databases - * that support `output` such as MS SQL Server (MSSQL). - * - * Also see the {@link output} method. - */ - outputAll(table: OP): OutputInterface, OP>; -} -export type OutputPrefix = 'deleted' | 'inserted'; -export type OutputDatabase = { - [K in OP]: DB[TB]; -}; -export type OutputExpression, OTB extends keyof ODB = keyof ODB> = AnyAliasedColumnWithTable | AnyColumnWithTable | AliasedExpressionOrFactory; -export type OutputCallback = (eb: ExpressionBuilder, OP>) => ReadonlyArray>; -export type SelectExpressionFromOutputExpression = OE extends `${OutputPrefix}.${infer C}` ? C : OE; -export type SelectExpressionFromOutputCallback = CB extends (eb: ExpressionBuilder) => ReadonlyArray ? SelectExpressionFromOutputExpression : never; diff --git a/node_modules/kysely/dist/cjs/query-builder/output-interface.js b/node_modules/kysely/dist/cjs/query-builder/output-interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/output-interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/query-builder/over-builder.d.ts b/node_modules/kysely/dist/cjs/query-builder/over-builder.d.ts deleted file mode 100644 index fb43163..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/over-builder.d.ts +++ /dev/null @@ -1,101 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { OverNode } from '../operation-node/over-node.js'; -import { type DirectedOrderByStringReference, type OrderByExpression, type OrderByModifiers } from '../parser/order-by-parser.js'; -import { type PartitionByExpression } from '../parser/partition-by-parser.js'; -import type { OrderByInterface } from './order-by-interface.js'; -export declare class OverBuilder implements OrderByInterface, OperationNodeSource { - #private; - constructor(props: OverBuilderProps); - /** - * Adds an `order by` clause or item inside the `over` function. - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select( - * (eb) => eb.fn.avg('age').over( - * ob => ob.orderBy('first_name', 'asc').orderBy('last_name', 'asc') - * ).as('average_age') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select avg("age") over(order by "first_name" asc, "last_name" asc) as "average_age" - * from "person" - * ``` - */ - orderBy>(expr: OE, modifiers?: OrderByModifiers): OverBuilder; - /** - * @deprecated It does ~2-2.6x more compile-time instantiations compared to multiple chained `orderBy(expr, modifiers?)` calls (in `order by` clauses with reasonable item counts), and has broken autocompletion. - */ - orderBy | DirectedOrderByStringReference>(exprs: ReadonlyArray): OverBuilder; - /** - * @deprecated It does ~2.9x more compile-time instantiations compared to a `orderBy(expr, direction)` call. - */ - orderBy>(expr: OE): OverBuilder; - /** - * @deprecated Use `orderBy(expr, (ob) => ...)` instead. - */ - orderBy>(expr: OE, modifiers: Expression): OverBuilder; - /** - * Clears the `order by` clause from the query. - * - * See {@link orderBy} for adding an `order by` clause or item to a query. - * - * ### Examples - * - * ```ts - * const query = db - * .selectFrom('person') - * .selectAll() - * .orderBy('id', 'desc') - * - * const results = await query - * .clearOrderBy() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearOrderBy(): OverBuilder; - /** - * Adds partition by clause item/s inside the over function. - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select( - * (eb) => eb.fn.avg('age').over( - * ob => ob.partitionBy(['last_name', 'first_name']) - * ).as('average_age') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select avg("age") over(partition by "last_name", "first_name") as "average_age" - * from "person" - * ``` - */ - partitionBy(partitionBy: ReadonlyArray>): OverBuilder; - partitionBy>(partitionBy: PE): OverBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): OverNode; -} -export interface OverBuilderProps { - readonly overNode: OverNode; -} diff --git a/node_modules/kysely/dist/cjs/query-builder/over-builder.js b/node_modules/kysely/dist/cjs/query-builder/over-builder.js deleted file mode 100644 index 13fe0ec..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/over-builder.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OverBuilder = void 0; -const over_node_js_1 = require("../operation-node/over-node.js"); -const query_node_js_1 = require("../operation-node/query-node.js"); -const order_by_parser_js_1 = require("../parser/order-by-parser.js"); -const partition_by_parser_js_1 = require("../parser/partition-by-parser.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -class OverBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - orderBy(...args) { - return new OverBuilder({ - overNode: over_node_js_1.OverNode.cloneWithOrderByItems(this.#props.overNode, (0, order_by_parser_js_1.parseOrderBy)(args)), - }); - } - clearOrderBy() { - return new OverBuilder({ - overNode: query_node_js_1.QueryNode.cloneWithoutOrderBy(this.#props.overNode), - }); - } - partitionBy(partitionBy) { - return new OverBuilder({ - overNode: over_node_js_1.OverNode.cloneWithPartitionByItems(this.#props.overNode, (0, partition_by_parser_js_1.parsePartitionBy)(partitionBy)), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.overNode; - } -} -exports.OverBuilder = OverBuilder; diff --git a/node_modules/kysely/dist/cjs/query-builder/returning-interface.d.ts b/node_modules/kysely/dist/cjs/query-builder/returning-interface.d.ts deleted file mode 100644 index f03e401..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/returning-interface.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -import type { ReturningAllRow, ReturningCallbackRow, ReturningRow } from '../parser/returning-parser.js'; -import type { SelectCallback, SelectExpression } from '../parser/select-parser.js'; -import type { Selectable } from '../util/column-type.js'; -export interface ReturningInterface { - /** - * Allows you to return data from modified rows. - * - * On supported databases like PostgreSQL, this method can be chained to - * `insert`, `update`, `delete` and `merge` queries to return data. - * - * Note that on SQLite you need to give aliases for the expressions to avoid - * [this bug](https://sqlite.org/forum/forumpost/033daf0b32) in SQLite. - * For example `.returning('id as id')`. - * - * Also see the {@link returningAll} method. - * - * ### Examples - * - * Return one column: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * ``` - * - * Return multiple columns: - * - * ```ts - * const { id, last_name } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning(['id', 'last_name']) - * .executeTakeFirstOrThrow() - * ``` - * - * Return arbitrary expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * const { id, full_name, first_pet_id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning((eb) => [ - * 'id as id', - * sql`concat(first_name, ' ', last_name)`.as('full_name'), - * eb.selectFrom('pet').select('pet.id').limit(1).as('first_pet_id') - * ]) - * .executeTakeFirstOrThrow() - * ``` - */ - returning>(selections: ReadonlyArray): ReturningInterface>; - returning>(callback: CB): ReturningInterface>; - returning>(selection: SE): ReturningInterface>; - /** - * Adds a `returning *` to an insert/update/delete/merge query on databases - * that support `returning` such as PostgreSQL. - * - * Also see the {@link returning} method. - */ - returningAll(): ReturningInterface>; -} -export interface MultiTableReturningInterface extends ReturningInterface { - /** - * Adds a `returning *` or `returning table.*` to an insert/update/delete/merge - * query on databases that support `returning` such as PostgreSQL. - * - * Also see the {@link returning} method. - */ - returningAll(tables: ReadonlyArray): MultiTableReturningInterface>; - /** - * Adds a `returning *` to an insert/update/delete/merge query on databases - * that support `returning` such as PostgreSQL. - * - * Also see the {@link returning} method. - */ - returningAll(table: T): MultiTableReturningInterface>; - returningAll(): ReturningInterface>; -} diff --git a/node_modules/kysely/dist/cjs/query-builder/returning-interface.js b/node_modules/kysely/dist/cjs/query-builder/returning-interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/returning-interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/query-builder/select-query-builder-expression.d.ts b/node_modules/kysely/dist/cjs/query-builder/select-query-builder-expression.d.ts deleted file mode 100644 index 47efff3..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/select-query-builder-expression.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { AliasableExpression } from '../expression/expression.js'; -import type { SelectQueryNode } from '../operation-node/select-query-node.js'; -export interface SelectQueryBuilderExpression extends AliasableExpression { - get isSelectQueryBuilder(): true; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - * - * ### Examples - * - * If you are creating a custom expression, it's often easiest to use the {@link sql} - * template tag to build the node: - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - */ - toOperationNode(): SelectQueryNode; -} diff --git a/node_modules/kysely/dist/cjs/query-builder/select-query-builder-expression.js b/node_modules/kysely/dist/cjs/query-builder/select-query-builder-expression.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/select-query-builder-expression.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/query-builder/select-query-builder.d.ts b/node_modules/kysely/dist/cjs/query-builder/select-query-builder.d.ts deleted file mode 100644 index f159773..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/select-query-builder.d.ts +++ /dev/null @@ -1,2391 +0,0 @@ -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import { type JoinCallbackExpression, type JoinReferenceExpression } from '../parser/join-parser.js'; -import { type TableExpression } from '../parser/table-parser.js'; -import { type SelectExpression, type Selection, type AllSelection, type SelectCallback, type CallbackSelection } from '../parser/select-parser.js'; -import { type ReferenceExpression } from '../parser/reference-parser.js'; -import { SelectQueryNode } from '../operation-node/select-query-node.js'; -import { QueryNode } from '../operation-node/query-node.js'; -import type { DrainOuterGeneric, NarrowPartial, Nullable, ShallowRecord, Simplify, SimplifySingleResult, SqlBool } from '../util/type-utils.js'; -import { type DirectedOrderByStringReference, type OrderByExpression, type OrderByModifiers } from '../parser/order-by-parser.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -import { type GroupByArg } from '../parser/group-by-parser.js'; -import type { KyselyPlugin } from '../plugin/kysely-plugin.js'; -import type { WhereInterface } from './where-interface.js'; -import { type NoResultErrorConstructor } from './no-result-error.js'; -import type { HavingInterface } from './having-interface.js'; -import type { Explainable, ExplainFormat } from '../util/explainable.js'; -import { type SetOperandExpression } from '../parser/set-operation-parser.js'; -import type { AliasedExpression, Expression } from '../expression/expression.js'; -import { type ComparisonOperatorExpression, type OperandValueExpressionOrList } from '../parser/binary-operation-parser.js'; -import type { KyselyTypeError } from '../util/type-error.js'; -import type { Selectable } from '../util/column-type.js'; -import type { Streamable } from '../util/streamable.js'; -import type { ExpressionOrFactory } from '../parser/expression-parser.js'; -import { ExpressionWrapper } from '../expression/expression-wrapper.js'; -import type { SelectQueryBuilderExpression } from './select-query-builder-expression.js'; -import { type ValueExpression } from '../parser/value-parser.js'; -import type { FetchModifier } from '../operation-node/fetch-node.js'; -import type { TopModifier } from '../operation-node/top-node.js'; -import type { OrderByInterface } from './order-by-interface.js'; -export interface SelectQueryBuilder extends WhereInterface, HavingInterface, OrderByInterface, SelectQueryBuilderExpression, Compilable, Explainable, Streamable { - /** - * Adds a `where` expression to the query. - * - * Calling this method multiple times will combine the expressions using `and`. - * - * Also see {@link whereRef} - * - * ### Examples - * - * - * - * `where` method calls are combined with `AND`: - * - * ```ts - * const person = await db - * .selectFrom('person') - * .selectAll() - * .where('first_name', '=', 'Jennifer') - * .where('age', '>', 40) - * .executeTakeFirst() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "first_name" = $1 and "age" > $2 - * ``` - * - * Operator can be any supported operator or if the typings don't support it - * you can always use: - * - * ```ts - * import { sql } from 'kysely' - * - * sql`your operator` - * ``` - * - * - * - * Find multiple items using a list of identifiers: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where('id', 'in', [1, 2, 3]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "id" in ($1, $2, $3) - * ``` - * - * - * - * You can use the `and` function to create a simple equality - * filter using an object - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where((eb) => eb.and({ - * first_name: 'Jennifer', - * last_name: eb.ref('first_name') - * })) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * "first_name" = $1 - * and "last_name" = "first_name" - * ) - * ``` - * - * - * - * To combine conditions using `OR`, you can use the expression builder. - * There are two ways to create `OR` expressions. Both are shown in this - * example: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * // 1. Using the `or` method on the expression builder: - * .where((eb) => eb.or([ - * eb('first_name', '=', 'Jennifer'), - * eb('first_name', '=', 'Sylvester') - * ])) - * // 2. Chaining expressions using the `or` method on the - * // created expressions: - * .where((eb) => - * eb('last_name', '=', 'Aniston').or('last_name', '=', 'Stallone') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * ("first_name" = $1 or "first_name" = $2) - * and - * ("last_name" = $3 or "last_name" = $4) - * ) - * ``` - * - * - * - * You can add expressions conditionally like this: - * - * ```ts - * import { Expression, SqlBool } from 'kysely' - * - * const firstName: string | undefined = 'Jennifer' - * const lastName: string | undefined = 'Aniston' - * const under18 = true - * const over60 = true - * - * let query = db - * .selectFrom('person') - * .selectAll() - * - * if (firstName) { - * // The query builder is immutable. Remember to reassign - * // the result back to the query variable. - * query = query.where('first_name', '=', firstName) - * } - * - * if (lastName) { - * query = query.where('last_name', '=', lastName) - * } - * - * if (under18 || over60) { - * // Conditional OR expressions can be added like this. - * query = query.where((eb) => { - * const ors: Expression[] = [] - * - * if (under18) { - * ors.push(eb('age', '<', 18)) - * } - * - * if (over60) { - * ors.push(eb('age', '>', 60)) - * } - * - * return eb.or(ors) - * }) - * } - * - * const persons = await query.execute() - * ``` - * - * Both the first and third argument can also be arbitrary expressions like - * subqueries. An expression can defined by passing a function and calling - * the methods of the {@link ExpressionBuilder} passed to the callback: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where( - * (qb) => qb.selectFrom('pet') - * .select('pet.name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1), - * '=', - * 'Fluffy' - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * select "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) = $2 - * ``` - * - * A `where in` query can be built by using the `in` operator and an array - * of values. The values in the array can also be expressions: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where('person.id', 'in', [100, 200, 300]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "id" in ($1, $2, $3) - * ``` - * - * - * - * For complex `where` expressions you can pass in a single callback and - * use the `ExpressionBuilder` to build your expression: - * - * ```ts - * const firstName = 'Jennifer' - * const maxAge = 60 - * - * const persons = await db - * .selectFrom('person') - * .selectAll('person') - * .where(({ eb, or, and, not, exists, selectFrom }) => and([ - * or([ - * eb('first_name', '=', firstName), - * eb('age', '<', maxAge) - * ]), - * not(exists( - * selectFrom('pet') - * .select('pet.id') - * .whereRef('pet.owner_id', '=', 'person.id') - * )) - * ])) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where ( - * ( - * "first_name" = $1 - * or "age" < $2 - * ) - * and not exists ( - * select "pet"."id" from "pet" where "pet"."owner_id" = "person"."id" - * ) - * ) - * ``` - * - * If everything else fails, you can always use the {@link sql} tag - * as any of the arguments, including the operator: - * - * ```ts - * import { sql } from 'kysely' - * - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where( - * sql`coalesce(first_name, last_name)`, - * 'like', - * '%' + name + '%', - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * where coalesce(first_name, last_name) like $1 - * ``` - * - * In all examples above the columns were known at compile time - * (except for the raw {@link sql} expressions). By default kysely only - * allows you to refer to columns that exist in the database **and** - * can be referred to in the current query and context. - * - * Sometimes you may want to refer to columns that come from the user - * input and thus are not available at compile time. - * - * You have two options, the {@link sql} tag or `db.dynamic`. The example below - * uses both: - * - * ```ts - * import { sql } from 'kysely' - * const { ref } = db.dynamic - * - * const columnFromUserInput: string = 'id' - * - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where(ref(columnFromUserInput), '=', 1) - * .where(sql.id(columnFromUserInput), '=', 2) - * .execute() - * ``` - */ - where, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): SelectQueryBuilder; - where>(expression: E): SelectQueryBuilder; - /** - * Adds a `where` clause where both sides of the operator are references - * to columns. - * - * The normal `where` method treats the right hand side argument as a - * value by default. `whereRef` treats it as a column reference. This method is - * expecially useful with joins and correlated subqueries. - * - * ### Examples - * - * Usage with a join: - * - * ```ts - * db.selectFrom(['person', 'pet']) - * .selectAll() - * .whereRef('person.first_name', '=', 'pet.name') - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person", "pet" where "person"."first_name" = "pet"."name" - * ``` - * - * Usage in a subquery: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll('person') - * .select((eb) => eb - * .selectFrom('pet') - * .select('name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1) - * .as('pet_name') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".*, ( - * select "name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) as "pet_name" - * from "person" - */ - whereRef, RRE extends ReferenceExpression>(lhs: LRE, op: ComparisonOperatorExpression, rhs: RRE): SelectQueryBuilder; - /** - * Just like {@link WhereInterface.where | where} but adds a `having` statement - * instead of a `where` statement. - */ - having, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): SelectQueryBuilder; - having>(expression: E): SelectQueryBuilder; - /** - * Just like {@link WhereInterface.whereRef | whereRef} but adds a `having` statement - * instead of a `where` statement. - */ - havingRef, RRE extends ReferenceExpression>(lhs: LRE, op: ComparisonOperatorExpression, rhs: RRE): SelectQueryBuilder; - /** - * Adds a select statement to the query. - * - * When a column (or any expression) is selected, Kysely adds its type to the return - * type of the query. Kysely is smart enough to parse the selection names and types - * from aliased columns, subqueries, raw expressions etc. - * - * Kysely only allows you to select columns and expressions that exist and would - * produce valid SQL. However, Kysely is not perfect and there may be cases where - * the type inference doesn't work and you need to override it. You can always - * use the {@link Kysely.dynamic | dynamic} module and the {@link sql} tag - * to override the types. - * - * Select calls are additive. Calling `select('id').select('first_name')` is the - * same as calling `select(['id', 'first_name'])`. - * - * To select all columns of the query or specific tables see the - * {@link selectAll} method. - * - * See the {@link $if} method if you are looking for a way to add selections - * based on a runtime condition. - * - * ### Examples - * - * - * - * Select a single column: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .select('id') - * .where('first_name', '=', 'Arnold') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id" from "person" where "first_name" = $1 - * ``` - * - * - * - * Select a single column and specify a table: - * - * ```ts - * const persons = await db - * .selectFrom(['person', 'pet']) - * .select('person.id') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."id" from "person", "pet" - * ``` - * - * - * - * Select multiple columns: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .select(['person.id', 'first_name']) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."id", "first_name" from "person" - * ``` - * - * - * - * You can give an alias for selections and tables by appending `as the_alias` to the name: - * - * ```ts - * const persons = await db - * .selectFrom('person as p') - * .select([ - * 'first_name as fn', - * 'p.last_name as ln' - * ]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * "first_name" as "fn", - * "p"."last_name" as "ln" - * from "person" as "p" - * ``` - * - * - * - * You can select arbitrary expression including subqueries and raw sql snippets. - * When you do that, you need to give a name for the selections using the `as` method: - * - * ```ts - * import { sql } from 'kysely' - * - * const persons = await db.selectFrom('person') - * .select(({ eb, selectFrom, or, val, lit }) => [ - * // Select a correlated subquery - * selectFrom('pet') - * .whereRef('person.id', '=', 'pet.owner_id') - * .select('pet.name') - * .orderBy('pet.name') - * .limit(1) - * .as('first_pet_name'), - * - * // Build and select an expression using - * // the expression builder - * or([ - * eb('first_name', '=', 'Jennifer'), - * eb('first_name', '=', 'Arnold') - * ]).as('is_jennifer_or_arnold'), - * - * // Select a raw sql expression - * sql`concat(first_name, ' ', last_name)`.as('full_name'), - * - * // Select a static string value - * val('Some value').as('string_value'), - * - * // Select a literal value - * lit(42).as('literal_value'), - * ]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * ( - * select "pet"."name" - * from "pet" - * where "person"."id" = "pet"."owner_id" - * order by "pet"."name" - * limit $1 - * ) as "pet_name", - * ("first_name" = $2 or "first_name" = $3) as "jennifer_or_arnold", - * concat(first_name, ' ', last_name) as "full_name", - * $4 as "string_value", - * 42 as "literal_value" - * from "person" - * ``` - * - * In case you use the {@link sql} tag you need to specify the type of the expression - * (in this example `string`). - * - * - * - * Sometimes you can be sure something's not null, but Kysely isn't able to infer - * it. For example calling `where('last_name', 'is not', null)` doesn't make - * `last_name` not null in the result type, but unless you have other where statements - * you can be sure it's never null. - * - * Kysely has a couple of helpers for dealing with these cases: `$notNull()` and `$narrowType`. - * Both are used in the following example: - * - * ```ts - * import { NotNull } from 'kysely' - * import { jsonObjectFrom } from 'kysely/helpers/postgres' - * - * const persons = db - * .selectFrom('person') - * .select((eb) => [ - * 'last_name', - * // Let's assume we know the person has at least one - * // pet. We can use the `.$notNull()` method to make - * // the expression not null. You could just as well - * // add `pet` to the `$narrowType` call below. - * jsonObjectFrom( - * eb.selectFrom('pet') - * .selectAll() - * .limit(1) - * .whereRef('person.id', '=', 'pet.owner_id') - * ).$notNull().as('pet') - * ]) - * .where('last_name', 'is not', null) - * // $narrowType can be used to narrow the output type. - * // The special `NotNull` type can be used to make a - * // selection not null. You could add `pet: NotNull` - * // here and omit the `$notNull()` call on it. - * // Use whichever way you prefer. - * .$narrowType<{ last_name: NotNull }>() - * .execute() - * ``` - * - * All the examples above assume you know the column names at compile time. - * While it's better to build your code like that (that way you also know - * the types) sometimes it's not possible or you just prefer to write more - * dynamic code. - *

- * In this example, we use the `dynamic` module's methods to add selections - * dynamically: - * - * ```ts - * const { ref } = db.dynamic - * - * // Some column name provided by the user. Value not known at compile time. - * const columnFromUserInput: string = 'first_name'; - * - * // A type that lists all possible values `columnFromUserInput` can have. - * // You can use `keyof Person` if any column of an interface is allowed. - * type PossibleColumns = 'last_name' | 'first_name' | 'birthdate' - * - * const people = await db - * .selectFrom('person') - * .select([ - * ref(columnFromUserInput), - * 'id' - * ]) - * .execute() - * - * // The resulting type contains all `PossibleColumns` as optional fields - * // because we cannot know which field was actually selected before - * // running the code. - * const lastName: string | null | undefined = people[0].last_name - * const firstName: string | undefined = people[0].first_name - * const birthDate: Date | null | undefined = people[0].birthdate - * - * // The result type also contains the compile time selection `id`. - * people[0].id - * ``` - */ - select>(selections: ReadonlyArray): SelectQueryBuilder>; - select>(callback: CB): SelectQueryBuilder>; - select>(selection: SE): SelectQueryBuilder>; - /** - * Adds `distinct on` expressions to the select clause. - * - * ### Examples - * - * - * - * ```ts - * const persons = await db.selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .where('pet.name', '=', 'Doggo') - * .distinctOn('person.id') - * .selectAll('person') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select distinct on ("person"."id") "person".* - * from "person" - * inner join "pet" on "pet"."owner_id" = "person"."id" - * where "pet"."name" = $1 - * ``` - */ - distinctOn>(selections: ReadonlyArray): SelectQueryBuilder; - distinctOn>(selection: RE): SelectQueryBuilder; - /** - * This can be used to add any additional SQL to the front of the query __after__ the `select` keyword. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.selectFrom('person') - * .modifyFront(sql`sql_no_cache`) - * .select('first_name') - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select sql_no_cache `first_name` - * from `person` - * ``` - */ - modifyFront(modifier: Expression): SelectQueryBuilder; - /** - * This can be used to add any additional SQL to the end of the query. - * - * Also see {@link forUpdate}, {@link forShare}, {@link forKeyShare}, {@link forNoKeyUpdate} - * {@link skipLocked} and {@link noWait}. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.selectFrom('person') - * .select('first_name') - * .modifyEnd(sql`for update`) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name" - * from "person" - * for update - * ``` - */ - modifyEnd(modifier: Expression): SelectQueryBuilder; - /** - * Makes the selection distinct. - * - * ### Examples - * - * - * - * ```ts - * const persons = await db.selectFrom('person') - * .select('first_name') - * .distinct() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select distinct "first_name" from "person" - * ``` - */ - distinct(): SelectQueryBuilder; - /** - * Adds the `for update` modifier to a select query on supported databases. - */ - forUpdate(of?: TableOrList): SelectQueryBuilder; - /** - * Adds the `for share` modifier to a select query on supported databases. - */ - forShare(of?: TableOrList): SelectQueryBuilder; - /** - * Adds the `for key share` modifier to a select query on supported databases. - */ - forKeyShare(of?: TableOrList): SelectQueryBuilder; - /** - * Adds the `for no key update` modifier to a select query on supported databases. - */ - forNoKeyUpdate(of?: TableOrList): SelectQueryBuilder; - /** - * Adds the `skip locked` modifier to a select query on supported databases. - */ - skipLocked(): SelectQueryBuilder; - /** - * Adds the `nowait` modifier to a select query on supported databases. - */ - noWait(): SelectQueryBuilder; - /** - * Adds a `select *` or `select table.*` clause to the query. - * - * ### Examples - * - * - * - * The `selectAll` method generates `SELECT *`: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - * - * - * - * Select all columns of a table: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll('person') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* from "person" - * ``` - * - * Select all columns of multiple tables: - * - * ```ts - * const personsPets = await db - * .selectFrom(['person', 'pet']) - * .selectAll(['person', 'pet']) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".*, "pet".* from "person", "pet" - * ``` - */ - selectAll(table: ReadonlyArray): SelectQueryBuilder>; - selectAll(table: T): SelectQueryBuilder>; - selectAll(): SelectQueryBuilder>; - /** - * Joins another table to the query using an `inner join`. - * - * ### Examples - * - * - * - * Simple `inner join`s can be done by providing a table name and two columns to join: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * // `select` needs to come after the call to `innerJoin` so - * // that you can select from the joined table. - * .select(['person.id', 'pet.name as pet_name']) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."id", "pet"."name" as "pet_name" - * from "person" - * inner join "pet" - * on "pet"."owner_id" = "person"."id" - * ``` - * - * - * - * You can give an alias for the joined table like this: - * - * ```ts - * await db.selectFrom('person') - * .innerJoin('pet as p', 'p.owner_id', 'person.id') - * .where('p.name', '=', 'Doggo') - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * inner join "pet" as "p" - * on "p"."owner_id" = "person"."id" - * where "p".name" = $1 - * ``` - * - * - * - * You can provide a function as the second argument to get a join - * builder for creating more complex joins. The join builder has a - * bunch of `on*` methods for building the `on` clause of the join. - * There's basically an equivalent for every `where` method - * (`on`, `onRef` etc.). - * - * You can do all the same things with the - * `on` method that you can with the corresponding `where` method (like [OR expressions for example](https://kysely.dev/docs/examples/WHERE/or-where)). - * See the `where` method documentation for more examples. - * - * ```ts - * await db.selectFrom('person') - * .innerJoin( - * 'pet', - * (join) => join - * .onRef('pet.owner_id', '=', 'person.id') - * .on('pet.name', '=', 'Doggo') - * .on((eb) => eb.or([ - * eb('person.age', '>', 18), - * eb('person.age', '<', 100) - * ])) - * ) - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * inner join "pet" - * on "pet"."owner_id" = "person"."id" - * and "pet"."name" = $1 - * and ( - * "person"."age" > $2 - * OR "person"."age" < $3 - * ) - * ``` - * - * - * - * You can join a subquery by providing two callbacks: - * - * ```ts - * const result = await db.selectFrom('person') - * .innerJoin( - * (eb) => eb - * .selectFrom('pet') - * .select(['owner_id as owner', 'name']) - * .where('name', '=', 'Doggo') - * .as('doggos'), - * (join) => join - * .onRef('doggos.owner', '=', 'person.id'), - * ) - * .selectAll('doggos') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "doggos".* - * from "person" - * inner join ( - * select "owner_id" as "owner", "name" - * from "pet" - * where "name" = $1 - * ) as "doggos" - * on "doggos"."owner" = "person"."id" - * ``` - */ - innerJoin, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): SelectQueryBuilderWithInnerJoin; - innerJoin, FN extends JoinCallbackExpression>(table: TE, callback: FN): SelectQueryBuilderWithInnerJoin; - /** - * Just like {@link innerJoin} but adds a `left join` instead of an `inner join`. - */ - leftJoin, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): SelectQueryBuilderWithLeftJoin; - leftJoin, FN extends JoinCallbackExpression>(table: TE, callback: FN): SelectQueryBuilderWithLeftJoin; - /** - * Just like {@link innerJoin} but adds a `right join` instead of an `inner join`. - */ - rightJoin, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): SelectQueryBuilderWithRightJoin; - rightJoin, FN extends JoinCallbackExpression>(table: TE, callback: FN): SelectQueryBuilderWithRightJoin; - /** - * Just like {@link innerJoin} but adds a `full join` instead of an `inner join`. - * - * This is only supported by some dialects like PostgreSQL, MS SQL Server and SQLite. - */ - fullJoin, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): SelectQueryBuilderWithFullJoin; - fullJoin, FN extends JoinCallbackExpression>(table: TE, callback: FN): SelectQueryBuilderWithFullJoin; - /** - * Just like {@link innerJoin} but adds a `cross join` instead of an `inner join`. - */ - crossJoin>(table: TE): SelectQueryBuilderWithInnerJoin; - /** - * Just like {@link innerJoin} but adds a lateral join instead of an inner join. - * - * This is only supported by some dialects like PostgreSQL and MySQL. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .innerJoinLateral( - * (eb) => - * eb.selectFrom('pet') - * .select('name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .as('p'), - * (join) => join.onTrue() - * ) - * .select(['first_name', 'p.name']) - * .orderBy('first_name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."first_name", "p"."name" - * from "person" - * inner join lateral ( - * select "name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * ) as "p" on true - * order by "first_name" - * ``` - */ - innerJoinLateral, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): SelectQueryBuilderWithInnerJoin; - innerJoinLateral, FN extends JoinCallbackExpression>(table: TE, callback: FN): SelectQueryBuilderWithInnerJoin; - /** - * Just like {@link innerJoin} but adds a `left join lateral` instead of an `inner join`. - * - * This is only supported by some dialects like PostgreSQL and MySQL. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .leftJoinLateral( - * (eb) => - * eb.selectFrom('pet') - * .select('name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .as('p'), - * (join) => join.onTrue() - * ) - * .select(['first_name', 'p.name']) - * .orderBy('first_name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."first_name", "p"."name" - * from "person" - * left join lateral ( - * select "name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * ) as "p" on true - * order by "first_name" - * ``` - */ - leftJoinLateral, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): SelectQueryBuilderWithLeftJoin; - leftJoinLateral, FN extends JoinCallbackExpression>(table: TE, callback: FN): SelectQueryBuilderWithLeftJoin; - /** - * Just like {@link innerJoin} but adds a `cross join lateral` instead of an `inner join`. - * - * This is only supported by some dialects like PostgreSQL. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .crossJoinLateral( - * (eb) => - * eb.selectFrom('pet') - * .select('name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .as('p') - * ) - * .select(['first_name', 'p.name']) - * .orderBy('first_name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."first_name", "p"."name" - * from "person" - * cross join lateral ( - * select "name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * ) as "p" - * order by "first_name" - * ``` - */ - crossJoinLateral>(table: TE): SelectQueryBuilderWithInnerJoin; - /** - * Joins another table to the query using a `cross apply`. - * - * This is only supported by some dialects like MS SQL Server. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .crossApply( - * (eb) => - * eb.selectFrom('pet') - * .select('name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .as('p') - * ) - * .select(['first_name', 'p.name']) - * .orderBy('first_name') - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * select "person"."first_name", "p"."name" - * from "person" - * cross apply ( - * select "name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * ) as "p" - * order by "first_name" - * ``` - */ - crossApply>(table: TE): SelectQueryBuilderWithInnerJoin; - /** - * Just like {@link crossApply} but adds an `outer apply` instead of a `cross apply`. - * - * This is only supported by some dialects like MS SQL Server. - */ - outerApply>(table: TE): SelectQueryBuilderWithLeftJoin; - /** - * Adds a `group by` clause to the query. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db - * .selectFrom('person') - * .select([ - * 'first_name', - * sql`max(id)`.as('max_id') - * ]) - * .groupBy('first_name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name", max(id) - * from "person" - * group by "first_name" - * ``` - * - * `groupBy` also accepts an array: - * - * ```ts - * import { sql } from 'kysely' - * - * await db - * .selectFrom('person') - * .select([ - * 'first_name', - * 'last_name', - * sql`max(id)`.as('max_id') - * ]) - * .groupBy([ - * 'first_name', - * 'last_name' - * ]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name", "last_name", max(id) - * from "person" - * group by "first_name", "last_name" - * ``` - * - * The group by expressions can also be subqueries or - * raw sql expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * await db - * .selectFrom('person') - * .select([ - * 'first_name', - * 'last_name', - * sql`max(id)`.as('max_id') - * ]) - * .groupBy([ - * sql`concat(first_name, last_name)`, - * (qb) => qb.selectFrom('pet').select('id').limit(1) - * ]) - * .execute() - * ``` - * - * `dynamic.ref` can be used to refer to columns not known at - * compile time: - * - * ```ts - * async function someQuery(groupBy: string) { - * const { ref } = db.dynamic - * - * return await db - * .selectFrom('person') - * .select('first_name') - * .groupBy(ref(groupBy)) - * .execute() - * } - * - * someQuery('first_name') - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name" - * from "person" - * group by "first_name" - * ``` - */ - groupBy>(groupBy: GE): SelectQueryBuilder; - /** - * Adds an `order by` clause to the query. - * - * `orderBy` calls are additive. Meaning, additional `orderBy` calls append to - * the existing order by clause. - * - * `orderBy` is supported in select queries on all dialects. In MySQL, you can - * also use `orderBy` in update and delete queries. - * - * In a single call you can add a single column/expression or multiple columns/expressions. - * - * Single column/expression calls can have 1-2 arguments. The first argument is - * the expression to order by, while the second optional argument is the direction - * (`asc` or `desc`), a callback that accepts and returns an {@link OrderByItemBuilder} - * or an expression. - * - * See {@link clearOrderBy} to remove the `order by` clause from a query. - * - * ### Examples - * - * Single column/expression per call: - * - * ```ts - * await db - * .selectFrom('person') - * .select('person.first_name as fn') - * .orderBy('id') - * .orderBy('fn', 'desc') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."first_name" as "fn" - * from "person" - * order by "id", "fn" desc - * ``` - * - * Building advanced modifiers: - * - * ```ts - * await db - * .selectFrom('person') - * .select('person.first_name as fn') - * .orderBy('id', (ob) => ob.desc().nullsFirst()) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."first_name" as "fn" - * from "person" - * order by "id" desc nulls first - * ``` - * - * The order by expression can also be a raw sql expression or a subquery - * in addition to column references: - * - * ```ts - * import { sql } from 'kysely' - * - * await db - * .selectFrom('person') - * .selectAll() - * .orderBy((eb) => eb.selectFrom('pet') - * .select('pet.name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1) - * ) - * .orderBy( - * sql`concat(first_name, last_name) asc` - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * order by - * ( select "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) asc, - * concat(first_name, last_name) asc - * ``` - * - * `dynamic.ref` can be used to refer to columns not known at - * compile time: - * - * ```ts - * async function someQuery(orderBy: string) { - * const { ref } = db.dynamic - * - * return await db - * .selectFrom('person') - * .select('person.first_name as fn') - * .orderBy(ref(orderBy)) - * .execute() - * } - * - * someQuery('fn') - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."first_name" as "fn" - * from "person" - * order by "fn" - * ``` - */ - orderBy>(expr: OE, modifiers?: OrderByModifiers): SelectQueryBuilder; - /** - * @deprecated It does ~2-2.5x more compile-time instantiations than multiple `orderBy(expr, modifiers?)` calls, and has broken autocompletion. - */ - orderBy | DirectedOrderByStringReference>(exprs: ReadonlyArray): SelectQueryBuilder; - /** - * @deprecated Use orderBy(expr, direction) instead. - */ - orderBy>(expr: OE): SelectQueryBuilder; - /** - * @deprecated Use `orderBy(expr, (ob) => ...)` instead. - */ - orderBy>(expr: OE, modifiers: Expression): SelectQueryBuilder; - /** - * Adds a limit clause to the query. - * - * Passing a `null` value is only supported by some dialects like PostgreSQL, - * and will result in a no-op limit clause. - * - * ### Examples - * - * Select the first 10 rows of the result: - * - * ```ts - * await db - * .selectFrom('person') - * .select('first_name') - * .limit(10) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name" from "person" limit $1 - * ``` - * - * Select rows from index 10 to index 19 of the result: - * - * ```ts - * await db - * .selectFrom('person') - * .select('first_name') - * .limit(10) - * .offset(10) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name" from "person" limit $1 offset $2 - * ``` - */ - limit(limit: ValueExpression): SelectQueryBuilder; - /** - * Adds an `offset` clause to the query. - * - * ### Examples - * - * Select rows from index 10 to index 19 of the result: - * - * ```ts - * await db - * .selectFrom('person') - * .select('first_name') - * .limit(10) - * .offset(10) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name" from "person" limit $1 offset $2 - * ``` - */ - offset(offset: ValueExpression): SelectQueryBuilder; - /** - * Adds a `fetch` clause to the query. - * - * This clause is only supported by some dialects like PostgreSQL or MS SQL Server. - * - * ### Examples - * - * ```ts - * await db - * .selectFrom('person') - * .select('first_name') - * .orderBy('first_name') - * .offset(0) - * .fetch(10) - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * select "first_name" - * from "person" - * order by "first_name" - * offset 0 rows - * fetch next 10 rows only - * ``` - */ - fetch(rowCount: number | bigint, modifier?: FetchModifier): SelectQueryBuilder; - /** - * Adds a `top` clause to the query. - * - * This clause is only supported by some dialects like MS SQL Server. - * - * ### Examples - * - * Select 10 biggest ages: - * - * ```ts - * await db - * .selectFrom('person') - * .select('age') - * .top(10) - * .orderBy('age desc') - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * select top(10) "age" from "person" order by "age" desc - * ``` - * - * Select 10% first rows: - * - * ```ts - * await db - * .selectFrom('person') - * .selectAll() - * .top(10, 'percent') - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * select top(10) percent * from "person" - * ``` - */ - top(expression: number | bigint, modifiers?: TopModifier): SelectQueryBuilder; - /** - * Combines another select query or raw expression to this query using `union`. - * - * The output row type of the combined query must match `this` query. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name as name']) - * .union(db.selectFrom('pet').select(['id', 'name'])) - * .orderBy('name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", "first_name" as "name" - * from "person" - * union - * select "id", "name" - * from "pet" - * order by "name" - * ``` - * - * You can provide a callback to get an expression builder. - * In the following example, this allows us to wrap the query in parentheses: - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name as name']) - * .union((eb) => eb.parens( - * eb.selectFrom('pet').select(['id', 'name']) - * )) - * .orderBy('name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", "first_name" as "name" - * from "person" - * union - * ( - * select "id", "name" - * from "pet" - * ) - * order by "name" - * ``` - */ - union>(expression: E): SelectQueryBuilder; - /** - * Combines another select query or raw expression to this query using `union all`. - * - * The output row type of the combined query must match `this` query. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name as name']) - * .unionAll(db.selectFrom('pet').select(['id', 'name'])) - * .orderBy('name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", "first_name" as "name" - * from "person" - * union all - * select "id", "name" - * from "pet" - * order by "name" - * ``` - * - * You can provide a callback to get an expression builder. - * In the following example, this allows us to wrap the query in parentheses: - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name as name']) - * .unionAll((eb) => eb.parens( - * eb.selectFrom('pet').select(['id', 'name']) - * )) - * .orderBy('name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", "first_name" as "name" - * from "person" - * union all - * ( - * select "id", "name" - * from "pet" - * ) - * order by "name" - * ``` - */ - unionAll>(expression: E): SelectQueryBuilder; - /** - * Combines another select query or raw expression to this query using `intersect`. - * - * The output row type of the combined query must match `this` query. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name as name']) - * .intersect(db.selectFrom('pet').select(['id', 'name'])) - * .orderBy('name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", "first_name" as "name" - * from "person" - * intersect - * select "id", "name" - * from "pet" - * order by "name" - * ``` - * - * You can provide a callback to get an expression builder. - * In the following example, this allows us to wrap the query in parentheses: - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name as name']) - * .intersect((eb) => eb.parens( - * eb.selectFrom('pet').select(['id', 'name']) - * )) - * .orderBy('name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", "first_name" as "name" - * from "person" - * intersect - * ( - * select "id", "name" - * from "pet" - * ) - * order by "name" - * ``` - */ - intersect>(expression: E): SelectQueryBuilder; - /** - * Combines another select query or raw expression to this query using `intersect all`. - * - * The output row type of the combined query must match `this` query. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name as name']) - * .intersectAll(db.selectFrom('pet').select(['id', 'name'])) - * .orderBy('name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", "first_name" as "name" - * from "person" - * intersect all - * select "id", "name" - * from "pet" - * order by "name" - * ``` - * - * You can provide a callback to get an expression builder. - * In the following example, this allows us to wrap the query in parentheses: - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name as name']) - * .intersectAll((eb) => eb.parens( - * eb.selectFrom('pet').select(['id', 'name']) - * )) - * .orderBy('name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", "first_name" as "name" - * from "person" - * intersect all - * ( - * select "id", "name" - * from "pet" - * ) - * order by "name" - * ``` - */ - intersectAll>(expression: E): SelectQueryBuilder; - /** - * Combines another select query or raw expression to this query using `except`. - * - * The output row type of the combined query must match `this` query. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name as name']) - * .except(db.selectFrom('pet').select(['id', 'name'])) - * .orderBy('name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", "first_name" as "name" - * from "person" - * except - * select "id", "name" - * from "pet" - * order by "name" - * ``` - * - * You can provide a callback to get an expression builder. - * In the following example, this allows us to wrap the query in parentheses: - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name as name']) - * .except((eb) => eb.parens( - * eb.selectFrom('pet').select(['id', 'name']) - * )) - * .orderBy('name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", "first_name" as "name" - * from "person" - * except - * ( - * select "id", "name" - * from "pet" - * ) - * order by "name" - * ``` - */ - except>(expression: E): SelectQueryBuilder; - /** - * Combines another select query or raw expression to this query using `except all`. - * - * The output row type of the combined query must match `this` query. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name as name']) - * .exceptAll(db.selectFrom('pet').select(['id', 'name'])) - * .orderBy('name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", "first_name" as "name" - * from "person" - * except all - * select "id", "name" - * from "pet" - * order by "name" - * ``` - * - * You can provide a callback to get an expression builder. - * In the following example, this allows us to wrap the query in parentheses: - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name as name']) - * .exceptAll((eb) => eb.parens( - * eb.selectFrom('pet').select(['id', 'name']) - * )) - * .orderBy('name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", "first_name" as "name" - * from "person" - * except all - * ( - * select "id", "name" - * from "pet" - * ) - * order by "name" - * ``` - */ - exceptAll>(expression: E): SelectQueryBuilder; - /** - * Gives an alias for the query. This method is only useful for sub queries. - * - * ### Examples - * - * ```ts - * const pets = await db.selectFrom('pet') - * .selectAll('pet') - * .select( - * (qb) => qb.selectFrom('person') - * .select('first_name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .as('owner_first_name') - * ) - * .execute() - * - * pets[0].owner_first_name - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "pet".*, ( - * select "first_name" - * from "person" - * where "pet"."owner_id" = "person"."id" - * ) as "owner_first_name" - * from "pet" - * ``` - */ - as
(alias: A): AliasedSelectQueryBuilder; - /** - * Clears all select clauses from the query. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name']) - * .clearSelect() - * .select(['id', 'gender']) - * .execute() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * select "id", "gender" from "person" - * ``` - */ - clearSelect(): SelectQueryBuilder; - /** - * Clears all where expressions from the query. - * - * ### Examples - * - * ```ts - * db.selectFrom('person') - * .selectAll() - * .where('id','=',42) - * .clearWhere() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearWhere(): SelectQueryBuilder; - /** - * Clears limit clause from the query. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .selectAll() - * .limit(10) - * .clearLimit() - * .execute() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearLimit(): SelectQueryBuilder; - /** - * Clears offset clause from the query. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .selectAll() - * .limit(10) - * .offset(20) - * .clearOffset() - * .execute() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * select * from "person" limit 10 - * ``` - */ - clearOffset(): SelectQueryBuilder; - /** - * Clears all `order by` clauses from the query. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .selectAll() - * .orderBy('id') - * .clearOrderBy() - * .execute() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearOrderBy(): SelectQueryBuilder; - /** - * Clears `group by` clause from the query. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .selectAll() - * .groupBy('id') - * .clearGroupBy() - * .execute() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearGroupBy(): SelectQueryBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - * - * If you want to conditionally call a method on `this`, see - * the {@link $if} method. - * - * ### Examples - * - * The next example uses a helper function `log` to log a query: - * - * ```ts - * import type { Compilable } from 'kysely' - * - * function log(qb: T): T { - * console.log(qb.compile()) - * return qb - * } - * - * await db.selectFrom('person') - * .selectAll() - * .$call(log) - * .execute() - * ``` - */ - $call(func: (qb: this) => T): T; - /** - * Call `func(this)` if `condition` is true. - * - * NOTE: This method has an impact on TypeScript performance and it should only be used - * when necessary. Remember that you can call most methods like `where` conditionally - * like this: - * - * ```ts - * async function getPeople(firstName?: string, lastName?: string) { - * let query = db.selectFrom('person').selectAll() - * - * if (firstName) { - * query = query.where('first_name', '=', firstName) - * } - * - * if (lastName) { - * query = query.where('last_name', '=', lastName) - * } - * - * return await query.execute() - * } - * ``` - * - * This method is mainly useful with optional selects. Any `select` or `selectAll` - * method called inside the callback add optional fields to the result type. This is - * because we can't know if those selections were actually made before running the code. - * - * Also see [this recipe](https://github.com/kysely-org/kysely/blob/master/site/docs/recipes/0005-conditional-selects.md) - * - * ### Examples - * - * ```ts - * async function getPerson(id: number, withLastName: boolean) { - * return await db - * .selectFrom('person') - * .select(['id', 'first_name']) - * .$if(withLastName, (qb) => qb.select('last_name')) - * .where('id', '=', id) - * .executeTakeFirstOrThrow() - * } - * ``` - * - * Any selections added inside the `if` callback will be added as optional fields to the - * output type since we can't know if the selections were actually made before running - * the code. In the example above the return type of the `getPerson` function is: - * - * ```ts - * Promise<{ - * id: number - * first_name: string - * last_name?: string - * }> - * ``` - * - * You can also call any other methods inside the callback: - * - * ```ts - * async function getPeople(firstName?: string, petCountLimit?: number) { - * return await db.selectFrom('person') - * .select('person.id') - * .$if(firstName != null, (qb) => qb.where('first_name', '=', firstName!)) - * .$if(petCountLimit != null, (qb) => qb - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .having((eb) => eb.fn.count('pet.id'), '>', petCountLimit!) - * .groupBy('person.id') - * ) - * .execute() - * } - * ``` - */ - $if(condition: boolean, func: (qb: this) => SelectQueryBuilder): SelectQueryBuilder>>; - /** - * Change the output type of the query. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `SelectQueryBuilder` with a new output type. - */ - $castTo(): SelectQueryBuilder; - /** - * Changes the output type from an object to a tuple. - * - * This doesn't affect the generated SQL in any way. This function is - * just a necessary evil when you need to convert a query's output - * record type to a tuple type. Typescript doesn't currently offer - * tools to do this automatically (without insane hackery). - * - * The returned object can no longer be executed. It can only be used - * as a subquery. - * - * ### Examples - * - * ```ts - * const result = await db - * .selectFrom('person') - * .selectAll('person') - * .where(({ eb, refTuple, selectFrom }) => eb( - * refTuple('first_name', 'last_name'), - * 'in', - * selectFrom('pet') - * .select(['name', 'species']) - * .where('pet.species', '!=', 'cat') - * .$asTuple('name', 'species') - * )) - * .execute() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * select - * "person".* - * from - * "person" - * where - * ("first_name", "last_name") - * in - * ( - * select "name", "species" - * from "pet" - * where "pet"."species" != $1 - * ) - * ``` - */ - $asTuple>(key1: K1, key2: K2): keyof O extends K1 | K2 ? ExpressionWrapper : KyselyTypeError<'$asTuple() call failed: All selected columns must be provided as arguments'>; - $asTuple, K3 extends Exclude>(key1: K1, key2: K2, key3: K3): keyof O extends K1 | K2 | K3 ? ExpressionWrapper : KyselyTypeError<'$asTuple() call failed: All selected columns must be provided as arguments'>; - $asTuple, K3 extends Exclude, K4 extends Exclude>(key1: K1, key2: K2, key3: K3, key4: K4): keyof O extends K1 | K2 | K3 | K4 ? ExpressionWrapper : KyselyTypeError<'$asTuple() call failed: All selected columns must be provided as arguments'>; - $asTuple, K3 extends Exclude, K4 extends Exclude, K5 extends Exclude>(key1: K1, key2: K2, key3: K3, key4: K4, key5: K5): keyof O extends K1 | K2 | K3 | K4 | K5 ? ExpressionWrapper : KyselyTypeError<'$asTuple() call failed: All selected columns must be provided as arguments'>; - /** - * Plucks the value type of the output record. - * - * In SQL, any record type that only has one column can be used as a scalar. - * For example a query like this works: - * - * ```sql - * select - * id, - * first_name - * from - * person as p - * where - * -- This is ok since the query only selects one row - * -- and one column. - * (select name from pet where pet.owner_id = p.id limit 1) = 'Doggo' - * ``` - * - * In many cases Kysely handles this automatically and picks the correct - * scalar type instead of the record type, but sometimes you need to give - * Kysely a hint. - * - * One such case are custom helper functions that take `Expression` - * instances as inputs: - * - * ```ts - * import type { Expression } from 'kysely' - * - * function doStuff(expr: Expression) { - * // ... - * } - * - * // Error! This is not ok because the expression type is - * // `{ first_name: string }` instead of `string`. - * // doStuff(db.selectFrom('person').select('first_name')) - * - * // Ok! This is ok since we've plucked the `string` type of the - * // only column in the output type. - * doStuff(db.selectFrom('person').select('first_name').$asScalar()) - * ``` - * - * This function has absolutely no effect on the generated SQL. It's - * purely a type-level helper. - * - * This method returns an `ExpressionWrapper` instead of a `SelectQueryBuilder` - * since the return value should only be used as a part of an expression - * and never executed as the main query. - */ - $asScalar(): ExpressionWrapper; - /** - * Narrows (parts of) the output type of the query. - * - * Kysely tries to be as type-safe as possible, but in some cases we have to make - * compromises for better maintainability and compilation performance. At present, - * Kysely doesn't narrow the output type of the query when using {@link where}, {@link having} - * or {@link JoinQueryBuilder.on}. - * - * This utility method is very useful for these situations, as it removes unncessary - * runtime assertion/guard code. Its input type is limited to the output type - * of the query, so you can't add a column that doesn't exist, or change a column's - * type to something that doesn't exist in its union type. - * - * ### Examples - * - * Turn this code: - * - * ```ts - * import type { Person } from 'type-editor' // imaginary module - * - * const person = await db.selectFrom('person') - * .where('nullable_column', 'is not', null) - * .selectAll() - * .executeTakeFirstOrThrow() - * - * if (isWithNoNullValue(person)) { - * functionThatExpectsPersonWithNonNullValue(person) - * } - * - * function isWithNoNullValue(person: Person): person is Person & { nullable_column: string } { - * return person.nullable_column != null - * } - * ``` - * - * Into this: - * - * ```ts - * import type { NotNull } from 'kysely' - * - * const person = await db.selectFrom('person') - * .where('nullable_column', 'is not', null) - * .selectAll() - * .$narrowType<{ nullable_column: NotNull }>() - * .executeTakeFirstOrThrow() - * - * functionThatExpectsPersonWithNonNullValue(person) - * ``` - * - * Giving the explicit narrowed type (`string` in the example above) works fine for - * simple types. If the type is complex, for example a JSON column or a subquery, - * you can use the special `NotNull` type to make the column not null. - * - * ```ts - * import { NotNull } from 'kysely' - * - * const person = await db.selectFrom('person') - * .where('nullable_column', 'is not', null) - * .selectAll() - * .$narrowType<{ nullable_column: NotNull }>() - * .executeTakeFirstOrThrow() - * - * functionThatExpectsPersonWithNonNullValue(person) - * ``` - */ - $narrowType(): SelectQueryBuilder>; - /** - * Asserts that query's output row type equals the given type `T`. - * - * This method can be used to simplify excessively complex types to make TypeScript happy - * and much faster. - * - * Kysely uses complex type magic to achieve its type safety. This complexity is sometimes too much - * for TypeScript and you get errors like this: - * - * ``` - * error TS2589: Type instantiation is excessively deep and possibly infinite. - * ``` - * - * In these case you can often use this method to help TypeScript a little bit. When you use this - * method to assert the output type of a query, Kysely can drop the complex output type that - * consists of multiple nested helper types and replace it with the simple asserted type. - * - * Using this method doesn't reduce type safety at all. You have to pass in a type that is - * structurally equal to the current type. - * - * ### Examples - * - * ```ts - * const result = await db - * .with('first_and_last', (qb) => qb - * .selectFrom('person') - * .select(['first_name', 'last_name']) - * .$assertType<{ first_name: string, last_name: string | null }>() - * ) - * .with('age', (qb) => qb - * .selectFrom('person') - * .select('age') - * .$assertType<{ age: number | null }>() - * ) - * .selectFrom(['first_and_last', 'age']) - * .selectAll() - * .executeTakeFirstOrThrow() - * ``` - */ - $assertType(): O extends T ? SelectQueryBuilder : KyselyTypeError<`$assertType() call failed: The type passed in is not equal to the output type of the query.`>; - /** - * Returns a copy of this SelectQueryBuilder instance with the given plugin installed. - */ - withPlugin(plugin: KyselyPlugin): SelectQueryBuilder; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - * - * ### Examples - * - * If you are creating a custom expression, it's often easiest to use the {@link sql} - * template tag to build the node: - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - */ - toOperationNode(): SelectQueryNode; - compile(): CompiledQuery>; - /** - * Executes the query and returns an array of rows. - * - * Also see the {@link executeTakeFirst} and {@link executeTakeFirstOrThrow} methods. - */ - execute(): Promise[]>; - /** - * Executes the query and returns the first result or undefined if - * the query returned no result. - */ - executeTakeFirst(): Promise>; - /** - * Executes the query and returns the first result or throws if - * the query returned no result. - * - * By default an instance of {@link NoResultError} is thrown, but you can - * provide a custom error class, or callback to throw a different - * error. - */ - executeTakeFirstOrThrow(errorConstructor?: NoResultErrorConstructor | ((node: QueryNode) => Error)): Promise>; - /** - * Executes the query and streams the rows. - * - * The optional argument `chunkSize` defines how many rows to fetch from the database - * at a time. It only affects some dialects like PostgreSQL that support it. - * - * ### Examples - * - * ```ts - * const stream = db - * .selectFrom('person') - * .select(['first_name', 'last_name']) - * .where('gender', '=', 'other') - * .stream() - * - * for await (const person of stream) { - * console.log(person.first_name) - * - * if (person.last_name === 'Something') { - * // Breaking or returning before the stream has ended will release - * // the database connection and invalidate the stream. - * break - * } - * } - * ``` - */ - stream(chunkSize?: number): AsyncIterableIterator; - /** - * Executes query with `explain` statement before the main query. - * - * ```ts - * const explained = await db - * .selectFrom('person') - * .where('gender', '=', 'female') - * .selectAll() - * .explain('json') - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * explain format=json select * from `person` where `gender` = ? - * ``` - * - * You can also execute `explain analyze` statements. - * - * ```ts - * import { sql } from 'kysely' - * - * const explained = await db - * .selectFrom('person') - * .where('gender', '=', 'female') - * .selectAll() - * .explain('json', sql`analyze`) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * explain (analyze, format json) select * from "person" where "gender" = $1 - * ``` - */ - explain = Record>(format?: ExplainFormat, options?: Expression): Promise; -} -export declare function createSelectQueryBuilder(props: SelectQueryBuilderProps): SelectQueryBuilder; -export interface SelectQueryBuilderProps { - readonly queryId: QueryId; - readonly queryNode: SelectQueryNode; - readonly executor: QueryExecutor; -} -export interface AliasedSelectQueryBuilder extends AliasedExpression { - get isAliasedSelectQueryBuilder(): true; -} -export type SelectQueryBuilderWithInnerJoin> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? InnerJoinedBuilder : never : TE extends keyof DB ? SelectQueryBuilder : TE extends AliasedExpression ? InnerJoinedBuilder : TE extends (qb: any) => AliasedExpression ? InnerJoinedBuilder : never; -type InnerJoinedBuilder = A extends keyof DB ? SelectQueryBuilder, TB | A, O> : SelectQueryBuilder, TB | A, O>; -type InnerJoinedDB = DrainOuterGeneric<{ - [C in keyof DB | A]: C extends A ? R : C extends keyof DB ? DB[C] : never; -}>; -export type SelectQueryBuilderWithLeftJoin> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? LeftJoinedBuilder : never : TE extends keyof DB ? LeftJoinedBuilder : TE extends AliasedExpression ? LeftJoinedBuilder : TE extends (qb: any) => AliasedExpression ? LeftJoinedBuilder : never; -type LeftJoinedBuilder = A extends keyof DB ? SelectQueryBuilder, TB | A, O> : SelectQueryBuilder>, TB | A, O>; -type LeftJoinedDB = DrainOuterGeneric<{ - [C in keyof DB | A]: C extends A ? Nullable : C extends keyof DB ? DB[C] : never; -}>; -export type SelectQueryBuilderWithRightJoin> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? RightJoinedBuilder : never : TE extends keyof DB ? RightJoinedBuilder : TE extends AliasedExpression ? RightJoinedBuilder : TE extends (qb: any) => AliasedExpression ? RightJoinedBuilder : never; -type RightJoinedBuilder = SelectQueryBuilder, TB | A, O>; -type RightJoinedDB = DrainOuterGeneric<{ - [C in keyof DB | A]: C extends A ? R : C extends TB ? Nullable : C extends keyof DB ? DB[C] : never; -}>; -export type SelectQueryBuilderWithFullJoin> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? OuterJoinedBuilder : never : TE extends keyof DB ? OuterJoinedBuilder : TE extends AliasedExpression ? OuterJoinedBuilder : TE extends (qb: any) => AliasedExpression ? OuterJoinedBuilder : never; -type OuterJoinedBuilder = SelectQueryBuilder, TB | A, O>; -type OuterJoinedBuilderDB = DrainOuterGeneric<{ - [C in keyof DB | A]: C extends A ? Nullable : C extends TB ? Nullable : C extends keyof DB ? DB[C] : never; -}>; -type TableOrList = (TB & string) | ReadonlyArray; -export {}; diff --git a/node_modules/kysely/dist/cjs/query-builder/select-query-builder.js b/node_modules/kysely/dist/cjs/query-builder/select-query-builder.js deleted file mode 100644 index abb11b3..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/select-query-builder.js +++ /dev/null @@ -1,376 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createSelectQueryBuilder = createSelectQueryBuilder; -const alias_node_js_1 = require("../operation-node/alias-node.js"); -const select_modifier_node_js_1 = require("../operation-node/select-modifier-node.js"); -const join_parser_js_1 = require("../parser/join-parser.js"); -const table_parser_js_1 = require("../parser/table-parser.js"); -const select_parser_js_1 = require("../parser/select-parser.js"); -const reference_parser_js_1 = require("../parser/reference-parser.js"); -const select_query_node_js_1 = require("../operation-node/select-query-node.js"); -const query_node_js_1 = require("../operation-node/query-node.js"); -const order_by_parser_js_1 = require("../parser/order-by-parser.js"); -const limit_node_js_1 = require("../operation-node/limit-node.js"); -const offset_node_js_1 = require("../operation-node/offset-node.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -const group_by_parser_js_1 = require("../parser/group-by-parser.js"); -const no_result_error_js_1 = require("./no-result-error.js"); -const identifier_node_js_1 = require("../operation-node/identifier-node.js"); -const set_operation_parser_js_1 = require("../parser/set-operation-parser.js"); -const binary_operation_parser_js_1 = require("../parser/binary-operation-parser.js"); -const expression_wrapper_js_1 = require("../expression/expression-wrapper.js"); -const value_parser_js_1 = require("../parser/value-parser.js"); -const fetch_parser_js_1 = require("../parser/fetch-parser.js"); -const top_parser_js_1 = require("../parser/top-parser.js"); -class SelectQueryBuilderImpl { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - get expressionType() { - return undefined; - } - get isSelectQueryBuilder() { - return true; - } - where(...args) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithWhere(this.#props.queryNode, (0, binary_operation_parser_js_1.parseValueBinaryOperationOrExpression)(args)), - }); - } - whereRef(lhs, op, rhs) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithWhere(this.#props.queryNode, (0, binary_operation_parser_js_1.parseReferentialBinaryOperation)(lhs, op, rhs)), - }); - } - having(...args) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: select_query_node_js_1.SelectQueryNode.cloneWithHaving(this.#props.queryNode, (0, binary_operation_parser_js_1.parseValueBinaryOperationOrExpression)(args)), - }); - } - havingRef(lhs, op, rhs) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: select_query_node_js_1.SelectQueryNode.cloneWithHaving(this.#props.queryNode, (0, binary_operation_parser_js_1.parseReferentialBinaryOperation)(lhs, op, rhs)), - }); - } - select(selection) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: select_query_node_js_1.SelectQueryNode.cloneWithSelections(this.#props.queryNode, (0, select_parser_js_1.parseSelectArg)(selection)), - }); - } - distinctOn(selection) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: select_query_node_js_1.SelectQueryNode.cloneWithDistinctOn(this.#props.queryNode, (0, reference_parser_js_1.parseReferenceExpressionOrList)(selection)), - }); - } - modifyFront(modifier) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: select_query_node_js_1.SelectQueryNode.cloneWithFrontModifier(this.#props.queryNode, select_modifier_node_js_1.SelectModifierNode.createWithExpression(modifier.toOperationNode())), - }); - } - modifyEnd(modifier) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithEndModifier(this.#props.queryNode, select_modifier_node_js_1.SelectModifierNode.createWithExpression(modifier.toOperationNode())), - }); - } - distinct() { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: select_query_node_js_1.SelectQueryNode.cloneWithFrontModifier(this.#props.queryNode, select_modifier_node_js_1.SelectModifierNode.create('Distinct')), - }); - } - forUpdate(of) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithEndModifier(this.#props.queryNode, select_modifier_node_js_1.SelectModifierNode.create('ForUpdate', of ? (0, object_utils_js_1.asArray)(of).map(table_parser_js_1.parseTable) : undefined)), - }); - } - forShare(of) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithEndModifier(this.#props.queryNode, select_modifier_node_js_1.SelectModifierNode.create('ForShare', of ? (0, object_utils_js_1.asArray)(of).map(table_parser_js_1.parseTable) : undefined)), - }); - } - forKeyShare(of) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithEndModifier(this.#props.queryNode, select_modifier_node_js_1.SelectModifierNode.create('ForKeyShare', of ? (0, object_utils_js_1.asArray)(of).map(table_parser_js_1.parseTable) : undefined)), - }); - } - forNoKeyUpdate(of) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithEndModifier(this.#props.queryNode, select_modifier_node_js_1.SelectModifierNode.create('ForNoKeyUpdate', of ? (0, object_utils_js_1.asArray)(of).map(table_parser_js_1.parseTable) : undefined)), - }); - } - skipLocked() { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithEndModifier(this.#props.queryNode, select_modifier_node_js_1.SelectModifierNode.create('SkipLocked')), - }); - } - noWait() { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithEndModifier(this.#props.queryNode, select_modifier_node_js_1.SelectModifierNode.create('NoWait')), - }); - } - selectAll(table) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: select_query_node_js_1.SelectQueryNode.cloneWithSelections(this.#props.queryNode, (0, select_parser_js_1.parseSelectAll)(table)), - }); - } - innerJoin(...args) { - return this.#join('InnerJoin', args); - } - leftJoin(...args) { - return this.#join('LeftJoin', args); - } - rightJoin(...args) { - return this.#join('RightJoin', args); - } - fullJoin(...args) { - return this.#join('FullJoin', args); - } - crossJoin(...args) { - return this.#join('CrossJoin', args); - } - innerJoinLateral(...args) { - return this.#join('LateralInnerJoin', args); - } - leftJoinLateral(...args) { - return this.#join('LateralLeftJoin', args); - } - crossJoinLateral(...args) { - return this.#join('LateralCrossJoin', args); - } - crossApply(...args) { - return this.#join('CrossApply', args); - } - outerApply(...args) { - return this.#join('OuterApply', args); - } - #join(joinType, args) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithJoin(this.#props.queryNode, (0, join_parser_js_1.parseJoin)(joinType, args)), - }); - } - orderBy(...args) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithOrderByItems(this.#props.queryNode, (0, order_by_parser_js_1.parseOrderBy)(args)), - }); - } - groupBy(groupBy) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: select_query_node_js_1.SelectQueryNode.cloneWithGroupByItems(this.#props.queryNode, (0, group_by_parser_js_1.parseGroupBy)(groupBy)), - }); - } - limit(limit) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: select_query_node_js_1.SelectQueryNode.cloneWithLimit(this.#props.queryNode, limit_node_js_1.LimitNode.create((0, value_parser_js_1.parseValueExpression)(limit))), - }); - } - offset(offset) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: select_query_node_js_1.SelectQueryNode.cloneWithOffset(this.#props.queryNode, offset_node_js_1.OffsetNode.create((0, value_parser_js_1.parseValueExpression)(offset))), - }); - } - fetch(rowCount, modifier = 'only') { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: select_query_node_js_1.SelectQueryNode.cloneWithFetch(this.#props.queryNode, (0, fetch_parser_js_1.parseFetch)(rowCount, modifier)), - }); - } - top(expression, modifiers) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithTop(this.#props.queryNode, (0, top_parser_js_1.parseTop)(expression, modifiers)), - }); - } - union(expression) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: select_query_node_js_1.SelectQueryNode.cloneWithSetOperations(this.#props.queryNode, (0, set_operation_parser_js_1.parseSetOperations)('union', expression, false)), - }); - } - unionAll(expression) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: select_query_node_js_1.SelectQueryNode.cloneWithSetOperations(this.#props.queryNode, (0, set_operation_parser_js_1.parseSetOperations)('union', expression, true)), - }); - } - intersect(expression) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: select_query_node_js_1.SelectQueryNode.cloneWithSetOperations(this.#props.queryNode, (0, set_operation_parser_js_1.parseSetOperations)('intersect', expression, false)), - }); - } - intersectAll(expression) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: select_query_node_js_1.SelectQueryNode.cloneWithSetOperations(this.#props.queryNode, (0, set_operation_parser_js_1.parseSetOperations)('intersect', expression, true)), - }); - } - except(expression) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: select_query_node_js_1.SelectQueryNode.cloneWithSetOperations(this.#props.queryNode, (0, set_operation_parser_js_1.parseSetOperations)('except', expression, false)), - }); - } - exceptAll(expression) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: select_query_node_js_1.SelectQueryNode.cloneWithSetOperations(this.#props.queryNode, (0, set_operation_parser_js_1.parseSetOperations)('except', expression, true)), - }); - } - as(alias) { - return new AliasedSelectQueryBuilderImpl(this, alias); - } - clearSelect() { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: select_query_node_js_1.SelectQueryNode.cloneWithoutSelections(this.#props.queryNode), - }); - } - clearWhere() { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithoutWhere(this.#props.queryNode), - }); - } - clearLimit() { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: select_query_node_js_1.SelectQueryNode.cloneWithoutLimit(this.#props.queryNode), - }); - } - clearOffset() { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: select_query_node_js_1.SelectQueryNode.cloneWithoutOffset(this.#props.queryNode), - }); - } - clearOrderBy() { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithoutOrderBy(this.#props.queryNode), - }); - } - clearGroupBy() { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: select_query_node_js_1.SelectQueryNode.cloneWithoutGroupBy(this.#props.queryNode), - }); - } - $call(func) { - return func(this); - } - $if(condition, func) { - if (condition) { - return func(this); - } - return new SelectQueryBuilderImpl({ - ...this.#props, - }); - } - $castTo() { - return new SelectQueryBuilderImpl(this.#props); - } - $narrowType() { - return new SelectQueryBuilderImpl(this.#props); - } - $assertType() { - return new SelectQueryBuilderImpl(this.#props); - } - $asTuple() { - return new expression_wrapper_js_1.ExpressionWrapper(this.toOperationNode()); - } - $asScalar() { - return new expression_wrapper_js_1.ExpressionWrapper(this.toOperationNode()); - } - withPlugin(plugin) { - return new SelectQueryBuilderImpl({ - ...this.#props, - executor: this.#props.executor.withPlugin(plugin), - }); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.queryNode, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - const compiledQuery = this.compile(); - const result = await this.#props.executor.executeQuery(compiledQuery); - return result.rows; - } - async executeTakeFirst() { - const [result] = await this.execute(); - return result; - } - async executeTakeFirstOrThrow(errorConstructor = no_result_error_js_1.NoResultError) { - const result = await this.executeTakeFirst(); - if (result === undefined) { - const error = (0, no_result_error_js_1.isNoResultErrorConstructor)(errorConstructor) - ? new errorConstructor(this.toOperationNode()) - : errorConstructor(this.toOperationNode()); - throw error; - } - return result; - } - async *stream(chunkSize = 100) { - const compiledQuery = this.compile(); - const stream = this.#props.executor.stream(compiledQuery, chunkSize); - for await (const item of stream) { - yield* item.rows; - } - } - async explain(format, options) { - const builder = new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithExplain(this.#props.queryNode, format, options), - }); - return await builder.execute(); - } -} -function createSelectQueryBuilder(props) { - return new SelectQueryBuilderImpl(props); -} -/** - * {@link SelectQueryBuilder} with an alias. The result of calling {@link SelectQueryBuilder.as}. - */ -class AliasedSelectQueryBuilderImpl { - #queryBuilder; - #alias; - constructor(queryBuilder, alias) { - this.#queryBuilder = queryBuilder; - this.#alias = alias; - } - get expression() { - return this.#queryBuilder; - } - get alias() { - return this.#alias; - } - get isAliasedSelectQueryBuilder() { - return true; - } - toOperationNode() { - return alias_node_js_1.AliasNode.create(this.#queryBuilder.toOperationNode(), identifier_node_js_1.IdentifierNode.create(this.#alias)); - } -} diff --git a/node_modules/kysely/dist/cjs/query-builder/update-query-builder.d.ts b/node_modules/kysely/dist/cjs/query-builder/update-query-builder.d.ts deleted file mode 100644 index 0c6b25e..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/update-query-builder.d.ts +++ /dev/null @@ -1,1392 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import { type JoinCallbackExpression, type JoinReferenceExpression } from '../parser/join-parser.js'; -import { type TableExpression, type From, type FromTables } from '../parser/table-parser.js'; -import { type SelectExpression, type SelectCallback } from '../parser/select-parser.js'; -import type { ReturningAllRow, ReturningCallbackRow, ReturningRow } from '../parser/returning-parser.js'; -import type { ReferenceExpression } from '../parser/reference-parser.js'; -import { QueryNode } from '../operation-node/query-node.js'; -import type { DrainOuterGeneric, NarrowPartial, Nullable, ShallowRecord, SimplifyResult, SimplifySingleResult, SqlBool } from '../util/type-utils.js'; -import { UpdateQueryNode } from '../operation-node/update-query-node.js'; -import { type UpdateObjectExpression, type ExtractUpdateTypeFromReferenceExpression } from '../parser/update-set-parser.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -import { UpdateResult } from './update-result.js'; -import type { KyselyPlugin } from '../plugin/kysely-plugin.js'; -import type { WhereInterface } from './where-interface.js'; -import type { MultiTableReturningInterface } from './returning-interface.js'; -import { type NoResultErrorConstructor } from './no-result-error.js'; -import type { Explainable, ExplainFormat } from '../util/explainable.js'; -import type { AliasedExpression, Expression } from '../expression/expression.js'; -import { type ComparisonOperatorExpression, type OperandValueExpressionOrList } from '../parser/binary-operation-parser.js'; -import type { KyselyTypeError } from '../util/type-error.js'; -import type { Streamable } from '../util/streamable.js'; -import type { ExpressionOrFactory } from '../parser/expression-parser.js'; -import { type ValueExpression } from '../parser/value-parser.js'; -import type { OutputCallback, OutputExpression, OutputInterface, OutputPrefix, SelectExpressionFromOutputCallback, SelectExpressionFromOutputExpression } from './output-interface.js'; -import type { OrderByInterface } from './order-by-interface.js'; -import { type DirectedOrderByStringReference, type OrderByExpression, type OrderByModifiers } from '../parser/order-by-parser.js'; -export declare class UpdateQueryBuilder implements WhereInterface, MultiTableReturningInterface, OutputInterface, OrderByInterface, OperationNodeSource, Compilable, Explainable, Streamable { - #private; - constructor(props: UpdateQueryBuilderProps); - /** - * Adds a `where` expression to the query. - * - * Calling this method multiple times will combine the expressions using `and`. - * - * Also see {@link whereRef} - * - * ### Examples - * - * - * - * `where` method calls are combined with `AND`: - * - * ```ts - * const person = await db - * .selectFrom('person') - * .selectAll() - * .where('first_name', '=', 'Jennifer') - * .where('age', '>', 40) - * .executeTakeFirst() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "first_name" = $1 and "age" > $2 - * ``` - * - * Operator can be any supported operator or if the typings don't support it - * you can always use: - * - * ```ts - * import { sql } from 'kysely' - * - * sql`your operator` - * ``` - * - * - * - * Find multiple items using a list of identifiers: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where('id', 'in', [1, 2, 3]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "id" in ($1, $2, $3) - * ``` - * - * - * - * You can use the `and` function to create a simple equality - * filter using an object - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where((eb) => eb.and({ - * first_name: 'Jennifer', - * last_name: eb.ref('first_name') - * })) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * "first_name" = $1 - * and "last_name" = "first_name" - * ) - * ``` - * - * - * - * To combine conditions using `OR`, you can use the expression builder. - * There are two ways to create `OR` expressions. Both are shown in this - * example: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * // 1. Using the `or` method on the expression builder: - * .where((eb) => eb.or([ - * eb('first_name', '=', 'Jennifer'), - * eb('first_name', '=', 'Sylvester') - * ])) - * // 2. Chaining expressions using the `or` method on the - * // created expressions: - * .where((eb) => - * eb('last_name', '=', 'Aniston').or('last_name', '=', 'Stallone') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * ("first_name" = $1 or "first_name" = $2) - * and - * ("last_name" = $3 or "last_name" = $4) - * ) - * ``` - * - * - * - * You can add expressions conditionally like this: - * - * ```ts - * import { Expression, SqlBool } from 'kysely' - * - * const firstName: string | undefined = 'Jennifer' - * const lastName: string | undefined = 'Aniston' - * const under18 = true - * const over60 = true - * - * let query = db - * .selectFrom('person') - * .selectAll() - * - * if (firstName) { - * // The query builder is immutable. Remember to reassign - * // the result back to the query variable. - * query = query.where('first_name', '=', firstName) - * } - * - * if (lastName) { - * query = query.where('last_name', '=', lastName) - * } - * - * if (under18 || over60) { - * // Conditional OR expressions can be added like this. - * query = query.where((eb) => { - * const ors: Expression[] = [] - * - * if (under18) { - * ors.push(eb('age', '<', 18)) - * } - * - * if (over60) { - * ors.push(eb('age', '>', 60)) - * } - * - * return eb.or(ors) - * }) - * } - * - * const persons = await query.execute() - * ``` - * - * Both the first and third argument can also be arbitrary expressions like - * subqueries. An expression can defined by passing a function and calling - * the methods of the {@link ExpressionBuilder} passed to the callback: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where( - * (qb) => qb.selectFrom('pet') - * .select('pet.name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1), - * '=', - * 'Fluffy' - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * select "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) = $2 - * ``` - * - * A `where in` query can be built by using the `in` operator and an array - * of values. The values in the array can also be expressions: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where('person.id', 'in', [100, 200, 300]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "id" in ($1, $2, $3) - * ``` - * - * - * - * For complex `where` expressions you can pass in a single callback and - * use the `ExpressionBuilder` to build your expression: - * - * ```ts - * const firstName = 'Jennifer' - * const maxAge = 60 - * - * const persons = await db - * .selectFrom('person') - * .selectAll('person') - * .where(({ eb, or, and, not, exists, selectFrom }) => and([ - * or([ - * eb('first_name', '=', firstName), - * eb('age', '<', maxAge) - * ]), - * not(exists( - * selectFrom('pet') - * .select('pet.id') - * .whereRef('pet.owner_id', '=', 'person.id') - * )) - * ])) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where ( - * ( - * "first_name" = $1 - * or "age" < $2 - * ) - * and not exists ( - * select "pet"."id" from "pet" where "pet"."owner_id" = "person"."id" - * ) - * ) - * ``` - * - * If everything else fails, you can always use the {@link sql} tag - * as any of the arguments, including the operator: - * - * ```ts - * import { sql } from 'kysely' - * - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where( - * sql`coalesce(first_name, last_name)`, - * 'like', - * '%' + name + '%', - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * where coalesce(first_name, last_name) like $1 - * ``` - * - * In all examples above the columns were known at compile time - * (except for the raw {@link sql} expressions). By default kysely only - * allows you to refer to columns that exist in the database **and** - * can be referred to in the current query and context. - * - * Sometimes you may want to refer to columns that come from the user - * input and thus are not available at compile time. - * - * You have two options, the {@link sql} tag or `db.dynamic`. The example below - * uses both: - * - * ```ts - * import { sql } from 'kysely' - * const { ref } = db.dynamic - * - * const columnFromUserInput: string = 'id' - * - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where(ref(columnFromUserInput), '=', 1) - * .where(sql.id(columnFromUserInput), '=', 2) - * .execute() - * ``` - */ - where, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): UpdateQueryBuilder; - where>(expression: E): UpdateQueryBuilder; - /** - * Adds a `where` clause where both sides of the operator are references - * to columns. - * - * The normal `where` method treats the right hand side argument as a - * value by default. `whereRef` treats it as a column reference. This method is - * expecially useful with joins and correlated subqueries. - * - * ### Examples - * - * Usage with a join: - * - * ```ts - * db.selectFrom(['person', 'pet']) - * .selectAll() - * .whereRef('person.first_name', '=', 'pet.name') - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person", "pet" where "person"."first_name" = "pet"."name" - * ``` - * - * Usage in a subquery: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll('person') - * .select((eb) => eb - * .selectFrom('pet') - * .select('name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1) - * .as('pet_name') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".*, ( - * select "name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) as "pet_name" - * from "person" - */ - whereRef, RRE extends ReferenceExpression>(lhs: LRE, op: ComparisonOperatorExpression, rhs: RRE): UpdateQueryBuilder; - /** - * Clears all where expressions from the query. - * - * ### Examples - * - * ```ts - * db.selectFrom('person') - * .selectAll() - * .where('id','=',42) - * .clearWhere() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearWhere(): UpdateQueryBuilder; - /** - * Changes an `update` query into a `update top` query. - * - * `top` clause is only supported by some dialects like MS SQL Server. - * - * ### Examples - * - * Update the first row: - * - * ```ts - * await db.updateTable('person') - * .top(1) - * .set({ first_name: 'Foo' }) - * .where('age', '>', 18) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * update top(1) "person" set "first_name" = @1 where "age" > @2 - * ``` - * - * Update the 50% first rows: - * - * ```ts - * await db.updateTable('person') - * .top(50, 'percent') - * .set({ first_name: 'Foo' }) - * .where('age', '>', 18) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * update top(50) percent "person" set "first_name" = @1 where "age" > @2 - * ``` - */ - top(expression: number | bigint, modifiers?: 'percent'): UpdateQueryBuilder; - /** - * Adds a from clause to the update query. - * - * This is supported only on some databases like PostgreSQL. - * - * The API is the same as {@link QueryCreator.selectFrom}. - * - * ### Examples - * - * ```ts - * db.updateTable('person') - * .from('pet') - * .set((eb) => ({ - * first_name: eb.ref('pet.name') - * })) - * .whereRef('pet.owner_id', '=', 'person.id') - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * update "person" - * set "first_name" = "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * ``` - */ - from>(table: TE): UpdateQueryBuilder, UT, FromTables, O>; - from>(table: TE[]): UpdateQueryBuilder, UT, FromTables, O>; - /** - * Joins another table to the query using an inner join. - * - * ### Examples - * - * Simple usage by providing a table name and two columns to join: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * // `select` needs to come after the call to `innerJoin` so - * // that you can select from the joined table. - * .select(['person.id', 'pet.name']) - * .execute() - * - * result[0].id - * result[0].name - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."id", "pet"."name" - * from "person" - * inner join "pet" - * on "pet"."owner_id" = "person"."id" - * ``` - * - * You can give an alias for the joined table like this: - * - * ```ts - * await db.selectFrom('person') - * .innerJoin('pet as p', 'p.owner_id', 'person.id') - * .where('p.name', '=', 'Doggo') - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * inner join "pet" as "p" - * on "p"."owner_id" = "person"."id" - * where "p".name" = $1 - * ``` - * - * You can provide a function as the second argument to get a join - * builder for creating more complex joins. The join builder has a - * bunch of `on*` methods for building the `on` clause of the join. - * There's basically an equivalent for every `where` method - * (`on`, `onRef`, `onExists` etc.). You can do all the same things - * with the `on` method that you can with the corresponding `where` - * method. See the `where` method documentation for more examples. - * - * ```ts - * await db.selectFrom('person') - * .innerJoin( - * 'pet', - * (join) => join - * .onRef('pet.owner_id', '=', 'person.id') - * .on('pet.name', '=', 'Doggo') - * ) - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * inner join "pet" - * on "pet"."owner_id" = "person"."id" - * and "pet"."name" = $1 - * ``` - * - * You can join a subquery by providing a select query (or a callback) - * as the first argument: - * - * ```ts - * await db.selectFrom('person') - * .innerJoin( - * db.selectFrom('pet') - * .select(['owner_id', 'name']) - * .where('name', '=', 'Doggo') - * .as('doggos'), - * 'doggos.owner_id', - * 'person.id', - * ) - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * inner join ( - * select "owner_id", "name" - * from "pet" - * where "name" = $1 - * ) as "doggos" - * on "doggos"."owner_id" = "person"."id" - * ``` - */ - innerJoin, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): UpdateQueryBuilderWithInnerJoin; - innerJoin, FN extends JoinCallbackExpression>(table: TE, callback: FN): UpdateQueryBuilderWithInnerJoin; - /** - * Just like {@link innerJoin} but adds a left join instead of an inner join. - */ - leftJoin, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): UpdateQueryBuilderWithLeftJoin; - leftJoin, FN extends JoinCallbackExpression>(table: TE, callback: FN): UpdateQueryBuilderWithLeftJoin; - /** - * Just like {@link innerJoin} but adds a right join instead of an inner join. - */ - rightJoin, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): UpdateQueryBuilderWithRightJoin; - rightJoin, FN extends JoinCallbackExpression>(table: TE, callback: FN): UpdateQueryBuilderWithRightJoin; - /** - * Just like {@link innerJoin} but adds a full join instead of an inner join. - */ - fullJoin, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): UpdateQueryBuilderWithFullJoin; - fullJoin, FN extends JoinCallbackExpression>(table: TE, callback: FN): UpdateQueryBuilderWithFullJoin; - /** - * @description This is only supported by some dialects like MySQL or SQLite with `SQLITE_ENABLE_UPDATE_DELETE_LIMIT`. - */ - orderBy>(expr: OE, modifiers?: OrderByModifiers): UpdateQueryBuilder; - /** - * @description This is only supported by some dialects like MySQL or SQLite with `SQLITE_ENABLE_UPDATE_DELETE_LIMIT`. - * @deprecated It does ~2-2.6x more compile-time instantiations compared to multiple chained `orderBy(expr, modifiers?)` calls (in `order by` clauses with reasonable item counts), and has broken autocompletion. - */ - orderBy | DirectedOrderByStringReference>(exprs: ReadonlyArray): UpdateQueryBuilder; - /** - * @description This is only supported by some dialects like MySQL or SQLite with `SQLITE_ENABLE_UPDATE_DELETE_LIMIT`. - * @deprecated It does ~2.9x more compile-time instantiations compared to a `orderBy(expr, direction)` call. - */ - orderBy>(expr: OE): UpdateQueryBuilder; - /** - * @description This is only supported by some dialects like MySQL or SQLite with `SQLITE_ENABLE_UPDATE_DELETE_LIMIT`. - * @deprecated Use `orderBy(expr, (ob) => ...)` instead. - */ - orderBy>(expr: OE, modifiers: Expression): UpdateQueryBuilder; - /** - * Clears the `order by` clause from the query. - * - * See {@link orderBy} for adding an `order by` clause or item to a query. - * - * ### Examples - * - * ```ts - * const query = db - * .selectFrom('person') - * .selectAll() - * .orderBy('id', 'desc') - * - * const results = await query - * .clearOrderBy() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearOrderBy(): UpdateQueryBuilder; - /** - * Adds a limit clause to the update query for supported databases, such as MySQL. - * - * ### Examples - * - * Update the first 2 rows in the 'person' table: - * - * ```ts - * await db - * .updateTable('person') - * .set({ first_name: 'Foo' }) - * .limit(2) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * update `person` set `first_name` = ? limit ? - * ``` - */ - limit(limit: ValueExpression): UpdateQueryBuilder; - /** - * Sets the values to update for an {@link Kysely.updateTable | update} query. - * - * This method takes an object whose keys are column names and values are - * values to update. In addition to the column's type, the values can be - * any expressions such as raw {@link sql} snippets or select queries. - * - * This method also accepts a callback that returns the update object. The - * callback takes an instance of {@link ExpressionBuilder} as its only argument. - * The expression builder can be used to create arbitrary update expressions. - * - * The return value of an update query is an instance of {@link UpdateResult}. - * You can use the {@link returning} method on supported databases to get out - * the updated rows. - * - * ### Examples - * - * - * - * Update a row in `person` table: - * - * ```ts - * const result = await db - * .updateTable('person') - * .set({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .where('id', '=', 1) - * .executeTakeFirst() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * update "person" set "first_name" = $1, "last_name" = $2 where "id" = $3 - * ``` - * - * - * - * As always, you can provide a callback to the `set` method to get access - * to an expression builder: - * - * ```ts - * const result = await db - * .updateTable('person') - * .set((eb) => ({ - * age: eb('age', '+', 1), - * first_name: eb.selectFrom('pet').select('name').limit(1), - * last_name: 'updated', - * })) - * .where('id', '=', 1) - * .executeTakeFirst() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * update "person" - * set - * "first_name" = (select "name" from "pet" limit $1), - * "age" = "age" + $2, - * "last_name" = $3 - * where - * "id" = $4 - * ``` - * - * If you provide two arguments the first one is interpreted as the column - * (or other target) and the second as the value: - * - * ```ts - * import { sql } from 'kysely' - * - * const result = await db - * .updateTable('person') - * .set('first_name', 'Foo') - * // As always, both arguments can be arbitrary expressions or - * // callbacks that give you access to an expression builder: - * .set(sql`address['postalCode']`, (eb) => eb.val('61710')) - * .where('id', '=', 1) - * .executeTakeFirst() - * ``` - * - * On PostgreSQL you can chain `returning` to the query to get - * the updated rows' columns (or any other expression) as the - * return value: - * - * ```ts - * const row = await db - * .updateTable('person') - * .set({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .where('id', '=', 1) - * .returning('id') - * .executeTakeFirstOrThrow() - * - * row.id - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * update "person" set "first_name" = $1, "last_name" = $2 where "id" = $3 returning "id" - * ``` - * - * In addition to primitives, the values can arbitrary expressions including - * raw `sql` snippets or subqueries: - * - * ```ts - * import { sql } from 'kysely' - * - * const result = await db - * .updateTable('person') - * .set(({ selectFrom, ref, fn, eb }) => ({ - * first_name: selectFrom('person').select('first_name').limit(1), - * middle_name: ref('first_name'), - * age: eb('age', '+', 1), - * last_name: sql`${'Ani'} || ${'ston'}`, - * })) - * .where('id', '=', 1) - * .executeTakeFirst() - * - * console.log(result.numUpdatedRows) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * update "person" set - * "first_name" = (select "first_name" from "person" limit $1), - * "middle_name" = "first_name", - * "age" = "age" + $2, - * "last_name" = $3 || $4 - * where "id" = $5 - * ``` - * - * - * - * MySQL allows you to join tables directly to the "main" table and update - * rows of all joined tables. This is possible by passing all tables to the - * `updateTable` method as a list and adding the `ON` conditions as `WHERE` - * statements. You can then use the `set(column, value)` variant to update - * columns using table qualified names. - * - * The `UpdateQueryBuilder` also has `innerJoin` etc. join methods, but those - * can only be used as part of a PostgreSQL `update set from join` query. - * Due to type complexity issues, we unfortunately can't make the same - * methods work in both cases. - * - * ```ts - * const result = await db - * .updateTable(['person', 'pet']) - * .set('person.first_name', 'Updated person') - * .set('pet.name', 'Updated doggo') - * .whereRef('person.id', '=', 'pet.owner_id') - * .where('person.id', '=', 1) - * .executeTakeFirst() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * update - * `person`, - * `pet` - * set - * `person`.`first_name` = ?, - * `pet`.`name` = ? - * where - * `person`.`id` = `pet`.`owner_id` - * and `person`.`id` = ? - * ``` - */ - set(update: UpdateObjectExpression): UpdateQueryBuilder; - set>(key: RE, value: ValueExpression>): UpdateQueryBuilder; - /** - * Allows you to return data from modified rows. - * - * On supported databases like PostgreSQL, this method can be chained to - * `insert`, `update`, `delete` and `merge` queries to return data. - * - * Note that on SQLite you need to give aliases for the expressions to avoid - * [this bug](https://sqlite.org/forum/forumpost/033daf0b32) in SQLite. - * For example `.returning('id as id')`. - * - * Also see the {@link returningAll} method. - * - * ### Examples - * - * Return one column: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * ``` - * - * Return multiple columns: - * - * ```ts - * const { id, last_name } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning(['id', 'last_name']) - * .executeTakeFirstOrThrow() - * ``` - * - * Return arbitrary expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * const { id, full_name, first_pet_id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning((eb) => [ - * 'id as id', - * sql`concat(first_name, ' ', last_name)`.as('full_name'), - * eb.selectFrom('pet').select('pet.id').limit(1).as('first_pet_id') - * ]) - * .executeTakeFirstOrThrow() - * ``` - */ - returning>(selections: ReadonlyArray): UpdateQueryBuilder>; - returning>(callback: CB): UpdateQueryBuilder>; - returning>(selection: SE): UpdateQueryBuilder>; - /** - * Adds a `returning *` or `returning table.*` to an insert/update/delete/merge - * query on databases that support `returning` such as PostgreSQL. - * - * Also see the {@link returning} method. - */ - returningAll(tables: ReadonlyArray): UpdateQueryBuilder>; - returningAll(table: T): UpdateQueryBuilder>; - returningAll(): UpdateQueryBuilder>; - /** - * Allows you to return data from modified rows. - * - * On supported databases like MS SQL Server (MSSQL), this method can be chained - * to `insert`, `update`, `delete` and `merge` queries to return data. - * - * Also see the {@link outputAll} method. - * - * ### Examples - * - * Return one column: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .output('inserted.id') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * gender: 'female', - * }) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "gender") - * output "inserted"."id" - * values (@1, @2, @3) - * ``` - * - * Return multiple columns: - * - * ```ts - * const { old_first_name, old_last_name, new_first_name, new_last_name } = await db - * .updateTable('person') - * .set({ first_name: 'John', last_name: 'Doe' }) - * .output([ - * 'deleted.first_name as old_first_name', - * 'deleted.last_name as old_last_name', - * 'inserted.first_name as new_first_name', - * 'inserted.last_name as new_last_name', - * ]) - * .where('created_at', '<', new Date()) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * update "person" - * set "first_name" = @1, "last_name" = @2 - * output "deleted"."first_name" as "old_first_name", - * "deleted"."last_name" as "old_last_name", - * "inserted"."first_name" as "new_first_name", - * "inserted"."last_name" as "new_last_name" - * where "created_at" < @3 - * ``` - * - * Return arbitrary expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * const { full_name } = await db - * .deleteFrom('person') - * .output((eb) => sql`concat(${eb.ref('deleted.first_name')}, ' ', ${eb.ref('deleted.last_name')})`.as('full_name')) - * .where('created_at', '<', new Date()) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * delete from "person" - * output concat("deleted"."first_name", ' ', "deleted"."last_name") as "full_name" - * where "created_at" < @1 - * ``` - * - * Return the action performed on the row: - * - * ```ts - * await db - * .mergeInto('person') - * .using('pet', 'pet.owner_id', 'person.id') - * .whenMatched() - * .thenDelete() - * .whenNotMatched() - * .thenInsertValues({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male' - * }) - * .output([ - * 'inserted.id as inserted_id', - * 'deleted.id as deleted_id', - * ]) - * .execute() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * merge into "person" - * using "pet" on "pet"."owner_id" = "person"."id" - * when matched then delete - * when not matched then - * insert ("first_name", "last_name", "gender") - * values (@1, @2, @3) - * output "inserted"."id" as "inserted_id", "deleted"."id" as "deleted_id" - * ``` - * - */ - output>(selections: readonly OE[]): UpdateQueryBuilder>>; - output>(callback: CB): UpdateQueryBuilder>>; - output>(selection: OE): UpdateQueryBuilder>>; - /** - * Adds an `output {prefix}.*` to an `insert`/`update`/`delete`/`merge` query on databases - * that support `output` such as MS SQL Server (MSSQL). - * - * Also see the {@link output} method. - */ - outputAll(table: OutputPrefix): UpdateQueryBuilder>; - /** - * This can be used to add any additional SQL to the end of the query. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.updateTable('person') - * .set({ age: 39 }) - * .where('first_name', '=', 'John') - * .modifyEnd(sql.raw('-- This is a comment')) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * update `person` - * set `age` = 39 - * where `first_name` = "John" -- This is a comment - * ``` - */ - modifyEnd(modifier: Expression): UpdateQueryBuilder; - /** - * Clears all `returning` clauses from the query. - * - * ### Examples - * - * ```ts - * db.updateTable('person') - * .returningAll() - * .set({ age: 39 }) - * .where('first_name', '=', 'John') - * .clearReturning() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * update "person" set "age" = 39 where "first_name" = "John" - * ``` - */ - clearReturning(): UpdateQueryBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - * - * If you want to conditionally call a method on `this`, see - * the {@link $if} method. - * - * ### Examples - * - * The next example uses a helper function `log` to log a query: - * - * ```ts - * import type { Compilable } from 'kysely' - * import type { PersonUpdate } from 'type-editor' // imaginary module - * - * function log(qb: T): T { - * console.log(qb.compile()) - * return qb - * } - * - * const values = { - * first_name: 'John', - * } satisfies PersonUpdate - * - * db.updateTable('person') - * .set(values) - * .$call(log) - * .execute() - * ``` - */ - $call(func: (qb: this) => T): T; - /** - * Call `func(this)` if `condition` is true. - * - * This method is especially handy with optional selects. Any `returning` or `returningAll` - * method calls add columns as optional fields to the output type when called inside - * the `func` callback. This is because we can't know if those selections were actually - * made before running the code. - * - * You can also call any other methods inside the callback. - * - * ### Examples - * - * ```ts - * import type { PersonUpdate } from 'type-editor' // imaginary module - * - * async function updatePerson(id: number, updates: PersonUpdate, returnLastName: boolean) { - * return await db - * .updateTable('person') - * .set(updates) - * .where('id', '=', id) - * .returning(['id', 'first_name']) - * .$if(returnLastName, (qb) => qb.returning('last_name')) - * .executeTakeFirstOrThrow() - * } - * ``` - * - * Any selections added inside the `if` callback will be added as optional fields to the - * output type since we can't know if the selections were actually made before running - * the code. In the example above the return type of the `updatePerson` function is: - * - * ```ts - * Promise<{ - * id: number - * first_name: string - * last_name?: string - * }> - * ``` - */ - $if(condition: boolean, func: (qb: this) => UpdateQueryBuilder): O2 extends UpdateResult ? UpdateQueryBuilder : O2 extends O & infer E ? UpdateQueryBuilder> : UpdateQueryBuilder>; - /** - * Change the output type of the query. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `UpdateQueryBuilder` with a new output type. - */ - $castTo(): UpdateQueryBuilder; - /** - * Narrows (parts of) the output type of the query. - * - * Kysely tries to be as type-safe as possible, but in some cases we have to make - * compromises for better maintainability and compilation performance. At present, - * Kysely doesn't narrow the output type of the query based on {@link set} input - * when using {@link where} and/or {@link returning} or {@link returningAll}. - * - * This utility method is very useful for these situations, as it removes unncessary - * runtime assertion/guard code. Its input type is limited to the output type - * of the query, so you can't add a column that doesn't exist, or change a column's - * type to something that doesn't exist in its union type. - * - * ### Examples - * - * Turn this code: - * - * ```ts - * import type { Person } from 'type-editor' // imaginary module - * - * const id = 1 - * const now = new Date().toISOString() - * - * const person = await db.updateTable('person') - * .set({ deleted_at: now }) - * .where('id', '=', id) - * .where('nullable_column', 'is not', null) - * .returningAll() - * .executeTakeFirstOrThrow() - * - * if (isWithNoNullValue(person)) { - * functionThatExpectsPersonWithNonNullValue(person) - * } - * - * function isWithNoNullValue(person: Person): person is Person & { nullable_column: string } { - * return person.nullable_column != null - * } - * ``` - * - * Into this: - * - * ```ts - * import type { NotNull } from 'kysely' - * - * const id = 1 - * const now = new Date().toISOString() - * - * const person = await db.updateTable('person') - * .set({ deleted_at: now }) - * .where('id', '=', id) - * .where('nullable_column', 'is not', null) - * .returningAll() - * .$narrowType<{ deleted_at: Date; nullable_column: NotNull }>() - * .executeTakeFirstOrThrow() - * - * functionThatExpectsPersonWithNonNullValue(person) - * ``` - */ - $narrowType(): UpdateQueryBuilder>; - /** - * Asserts that query's output row type equals the given type `T`. - * - * This method can be used to simplify excessively complex types to make TypeScript happy - * and much faster. - * - * Kysely uses complex type magic to achieve its type safety. This complexity is sometimes too much - * for TypeScript and you get errors like this: - * - * ``` - * error TS2589: Type instantiation is excessively deep and possibly infinite. - * ``` - * - * In these case you can often use this method to help TypeScript a little bit. When you use this - * method to assert the output type of a query, Kysely can drop the complex output type that - * consists of multiple nested helper types and replace it with the simple asserted type. - * - * Using this method doesn't reduce type safety at all. You have to pass in a type that is - * structurally equal to the current type. - * - * ### Examples - * - * ```ts - * import type { PersonUpdate, PetUpdate, Species } from 'type-editor' // imaginary module - * - * const person = { - * id: 1, - * gender: 'other', - * } satisfies PersonUpdate - * - * const pet = { - * name: 'Fluffy', - * } satisfies PetUpdate - * - * const result = await db - * .with('updated_person', (qb) => qb - * .updateTable('person') - * .set(person) - * .where('id', '=', person.id) - * .returning('first_name') - * .$assertType<{ first_name: string }>() - * ) - * .with('updated_pet', (qb) => qb - * .updateTable('pet') - * .set(pet) - * .where('owner_id', '=', person.id) - * .returning(['name as pet_name', 'species']) - * .$assertType<{ pet_name: string, species: Species }>() - * ) - * .selectFrom(['updated_person', 'updated_pet']) - * .selectAll() - * .executeTakeFirstOrThrow() - * ``` - */ - $assertType(): O extends T ? UpdateQueryBuilder : KyselyTypeError<`$assertType() call failed: The type passed in is not equal to the output type of the query.`>; - /** - * Returns a copy of this UpdateQueryBuilder instance with the given plugin installed. - */ - withPlugin(plugin: KyselyPlugin): UpdateQueryBuilder; - toOperationNode(): UpdateQueryNode; - compile(): CompiledQuery>; - /** - * Executes the query and returns an array of rows. - * - * Also see the {@link executeTakeFirst} and {@link executeTakeFirstOrThrow} methods. - */ - execute(): Promise[]>; - /** - * Executes the query and returns the first result or undefined if - * the query returned no result. - */ - executeTakeFirst(): Promise>; - /** - * Executes the query and returns the first result or throws if - * the query returned no result. - * - * By default an instance of {@link NoResultError} is thrown, but you can - * provide a custom error class, or callback as the only argument to throw a different - * error. - */ - executeTakeFirstOrThrow(errorConstructor?: NoResultErrorConstructor | ((node: QueryNode) => Error)): Promise>; - /** - * Executes the query and streams the rows. - * - * The optional argument `chunkSize` defines how many rows to fetch from the database - * at a time. It only affects some dialects like PostgreSQL that support it. - * - * ### Examples - * - * ```ts - * const stream = db - * .selectFrom('person') - * .select(['first_name', 'last_name']) - * .where('gender', '=', 'other') - * .stream() - * - * for await (const person of stream) { - * console.log(person.first_name) - * - * if (person.last_name === 'Something') { - * // Breaking or returning before the stream has ended will release - * // the database connection and invalidate the stream. - * break - * } - * } - * ``` - */ - stream(chunkSize?: number): AsyncIterableIterator; - /** - * Executes query with `explain` statement before the main query. - * - * ```ts - * const explained = await db - * .selectFrom('person') - * .where('gender', '=', 'female') - * .selectAll() - * .explain('json') - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * explain format=json select * from `person` where `gender` = ? - * ``` - * - * You can also execute `explain analyze` statements. - * - * ```ts - * import { sql } from 'kysely' - * - * const explained = await db - * .selectFrom('person') - * .where('gender', '=', 'female') - * .selectAll() - * .explain('json', sql`analyze`) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * explain (analyze, format json) select * from "person" where "gender" = $1 - * ``` - */ - explain = Record>(format?: ExplainFormat, options?: Expression): Promise; -} -export interface UpdateQueryBuilderProps { - readonly queryId: QueryId; - readonly queryNode: UpdateQueryNode; - readonly executor: QueryExecutor; -} -export type UpdateQueryBuilderWithInnerJoin> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? InnerJoinedBuilder : never : TE extends keyof DB ? UpdateQueryBuilder : TE extends AliasedExpression ? InnerJoinedBuilder : TE extends (qb: any) => AliasedExpression ? InnerJoinedBuilder : never; -type InnerJoinedBuilder = A extends keyof DB ? UpdateQueryBuilder, UT, TB | A, O> : UpdateQueryBuilder, UT, TB | A, O>; -type InnerJoinedDB = DrainOuterGeneric<{ - [C in keyof DB | A]: C extends A ? R : C extends keyof DB ? DB[C] : never; -}>; -export type UpdateQueryBuilderWithLeftJoin> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? LeftJoinedBuilder : never : TE extends keyof DB ? LeftJoinedBuilder : TE extends AliasedExpression ? LeftJoinedBuilder : TE extends (qb: any) => AliasedExpression ? LeftJoinedBuilder : never; -type LeftJoinedBuilder = A extends keyof DB ? UpdateQueryBuilder, UT, TB | A, O> : UpdateQueryBuilder>, UT, TB | A, O>; -type LeftJoinedDB = DrainOuterGeneric<{ - [C in keyof DB | A]: C extends A ? Nullable : C extends keyof DB ? DB[C] : never; -}>; -export type UpdateQueryBuilderWithRightJoin> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? RightJoinedBuilder : never : TE extends keyof DB ? RightJoinedBuilder : TE extends AliasedExpression ? RightJoinedBuilder : TE extends (qb: any) => AliasedExpression ? RightJoinedBuilder : never; -type RightJoinedBuilder = UpdateQueryBuilder, UT, TB | A, O>; -type RightJoinedDB = DrainOuterGeneric<{ - [C in keyof DB | A]: C extends A ? R : C extends TB ? Nullable : C extends keyof DB ? DB[C] : never; -}>; -export type UpdateQueryBuilderWithFullJoin> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? OuterJoinedBuilder : never : TE extends keyof DB ? OuterJoinedBuilder : TE extends AliasedExpression ? OuterJoinedBuilder : TE extends (qb: any) => AliasedExpression ? OuterJoinedBuilder : never; -type OuterJoinedBuilder = UpdateQueryBuilder, UT, TB | A, O>; -type OuterJoinedBuilderDB = DrainOuterGeneric<{ - [C in keyof DB | A]: C extends A ? Nullable : C extends TB ? Nullable : C extends keyof DB ? DB[C] : never; -}>; -export {}; diff --git a/node_modules/kysely/dist/cjs/query-builder/update-query-builder.js b/node_modules/kysely/dist/cjs/query-builder/update-query-builder.js deleted file mode 100644 index ef42d0b..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/update-query-builder.js +++ /dev/null @@ -1,513 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UpdateQueryBuilder = void 0; -const join_parser_js_1 = require("../parser/join-parser.js"); -const table_parser_js_1 = require("../parser/table-parser.js"); -const select_parser_js_1 = require("../parser/select-parser.js"); -const query_node_js_1 = require("../operation-node/query-node.js"); -const update_query_node_js_1 = require("../operation-node/update-query-node.js"); -const update_set_parser_js_1 = require("../parser/update-set-parser.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -const update_result_js_1 = require("./update-result.js"); -const no_result_error_js_1 = require("./no-result-error.js"); -const binary_operation_parser_js_1 = require("../parser/binary-operation-parser.js"); -const value_parser_js_1 = require("../parser/value-parser.js"); -const limit_node_js_1 = require("../operation-node/limit-node.js"); -const top_parser_js_1 = require("../parser/top-parser.js"); -const order_by_parser_js_1 = require("../parser/order-by-parser.js"); -class UpdateQueryBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - where(...args) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithWhere(this.#props.queryNode, (0, binary_operation_parser_js_1.parseValueBinaryOperationOrExpression)(args)), - }); - } - whereRef(lhs, op, rhs) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithWhere(this.#props.queryNode, (0, binary_operation_parser_js_1.parseReferentialBinaryOperation)(lhs, op, rhs)), - }); - } - clearWhere() { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithoutWhere(this.#props.queryNode), - }); - } - /** - * Changes an `update` query into a `update top` query. - * - * `top` clause is only supported by some dialects like MS SQL Server. - * - * ### Examples - * - * Update the first row: - * - * ```ts - * await db.updateTable('person') - * .top(1) - * .set({ first_name: 'Foo' }) - * .where('age', '>', 18) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * update top(1) "person" set "first_name" = @1 where "age" > @2 - * ``` - * - * Update the 50% first rows: - * - * ```ts - * await db.updateTable('person') - * .top(50, 'percent') - * .set({ first_name: 'Foo' }) - * .where('age', '>', 18) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * update top(50) percent "person" set "first_name" = @1 where "age" > @2 - * ``` - */ - top(expression, modifiers) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithTop(this.#props.queryNode, (0, top_parser_js_1.parseTop)(expression, modifiers)), - }); - } - from(from) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: update_query_node_js_1.UpdateQueryNode.cloneWithFromItems(this.#props.queryNode, (0, table_parser_js_1.parseTableExpressionOrList)(from)), - }); - } - innerJoin(...args) { - return this.#join('InnerJoin', args); - } - leftJoin(...args) { - return this.#join('LeftJoin', args); - } - rightJoin(...args) { - return this.#join('RightJoin', args); - } - fullJoin(...args) { - return this.#join('FullJoin', args); - } - #join(joinType, args) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithJoin(this.#props.queryNode, (0, join_parser_js_1.parseJoin)(joinType, args)), - }); - } - orderBy(...args) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithOrderByItems(this.#props.queryNode, (0, order_by_parser_js_1.parseOrderBy)(args)), - }); - } - clearOrderBy() { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithoutOrderBy(this.#props.queryNode), - }); - } - /** - * Adds a limit clause to the update query for supported databases, such as MySQL. - * - * ### Examples - * - * Update the first 2 rows in the 'person' table: - * - * ```ts - * await db - * .updateTable('person') - * .set({ first_name: 'Foo' }) - * .limit(2) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * update `person` set `first_name` = ? limit ? - * ``` - */ - limit(limit) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: update_query_node_js_1.UpdateQueryNode.cloneWithLimit(this.#props.queryNode, limit_node_js_1.LimitNode.create((0, value_parser_js_1.parseValueExpression)(limit))), - }); - } - set(...args) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: update_query_node_js_1.UpdateQueryNode.cloneWithUpdates(this.#props.queryNode, (0, update_set_parser_js_1.parseUpdate)(...args)), - }); - } - returning(selection) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithReturning(this.#props.queryNode, (0, select_parser_js_1.parseSelectArg)(selection)), - }); - } - returningAll(table) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithReturning(this.#props.queryNode, (0, select_parser_js_1.parseSelectAll)(table)), - }); - } - output(args) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithOutput(this.#props.queryNode, (0, select_parser_js_1.parseSelectArg)(args)), - }); - } - outputAll(table) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithOutput(this.#props.queryNode, (0, select_parser_js_1.parseSelectAll)(table)), - }); - } - /** - * This can be used to add any additional SQL to the end of the query. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.updateTable('person') - * .set({ age: 39 }) - * .where('first_name', '=', 'John') - * .modifyEnd(sql.raw('-- This is a comment')) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * update `person` - * set `age` = 39 - * where `first_name` = "John" -- This is a comment - * ``` - */ - modifyEnd(modifier) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithEndModifier(this.#props.queryNode, modifier.toOperationNode()), - }); - } - /** - * Clears all `returning` clauses from the query. - * - * ### Examples - * - * ```ts - * db.updateTable('person') - * .returningAll() - * .set({ age: 39 }) - * .where('first_name', '=', 'John') - * .clearReturning() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * update "person" set "age" = 39 where "first_name" = "John" - * ``` - */ - clearReturning() { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithoutReturning(this.#props.queryNode), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - * - * If you want to conditionally call a method on `this`, see - * the {@link $if} method. - * - * ### Examples - * - * The next example uses a helper function `log` to log a query: - * - * ```ts - * import type { Compilable } from 'kysely' - * import type { PersonUpdate } from 'type-editor' // imaginary module - * - * function log(qb: T): T { - * console.log(qb.compile()) - * return qb - * } - * - * const values = { - * first_name: 'John', - * } satisfies PersonUpdate - * - * db.updateTable('person') - * .set(values) - * .$call(log) - * .execute() - * ``` - */ - $call(func) { - return func(this); - } - /** - * Call `func(this)` if `condition` is true. - * - * This method is especially handy with optional selects. Any `returning` or `returningAll` - * method calls add columns as optional fields to the output type when called inside - * the `func` callback. This is because we can't know if those selections were actually - * made before running the code. - * - * You can also call any other methods inside the callback. - * - * ### Examples - * - * ```ts - * import type { PersonUpdate } from 'type-editor' // imaginary module - * - * async function updatePerson(id: number, updates: PersonUpdate, returnLastName: boolean) { - * return await db - * .updateTable('person') - * .set(updates) - * .where('id', '=', id) - * .returning(['id', 'first_name']) - * .$if(returnLastName, (qb) => qb.returning('last_name')) - * .executeTakeFirstOrThrow() - * } - * ``` - * - * Any selections added inside the `if` callback will be added as optional fields to the - * output type since we can't know if the selections were actually made before running - * the code. In the example above the return type of the `updatePerson` function is: - * - * ```ts - * Promise<{ - * id: number - * first_name: string - * last_name?: string - * }> - * ``` - */ - $if(condition, func) { - if (condition) { - return func(this); - } - return new UpdateQueryBuilder({ - ...this.#props, - }); - } - /** - * Change the output type of the query. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `UpdateQueryBuilder` with a new output type. - */ - $castTo() { - return new UpdateQueryBuilder(this.#props); - } - /** - * Narrows (parts of) the output type of the query. - * - * Kysely tries to be as type-safe as possible, but in some cases we have to make - * compromises for better maintainability and compilation performance. At present, - * Kysely doesn't narrow the output type of the query based on {@link set} input - * when using {@link where} and/or {@link returning} or {@link returningAll}. - * - * This utility method is very useful for these situations, as it removes unncessary - * runtime assertion/guard code. Its input type is limited to the output type - * of the query, so you can't add a column that doesn't exist, or change a column's - * type to something that doesn't exist in its union type. - * - * ### Examples - * - * Turn this code: - * - * ```ts - * import type { Person } from 'type-editor' // imaginary module - * - * const id = 1 - * const now = new Date().toISOString() - * - * const person = await db.updateTable('person') - * .set({ deleted_at: now }) - * .where('id', '=', id) - * .where('nullable_column', 'is not', null) - * .returningAll() - * .executeTakeFirstOrThrow() - * - * if (isWithNoNullValue(person)) { - * functionThatExpectsPersonWithNonNullValue(person) - * } - * - * function isWithNoNullValue(person: Person): person is Person & { nullable_column: string } { - * return person.nullable_column != null - * } - * ``` - * - * Into this: - * - * ```ts - * import type { NotNull } from 'kysely' - * - * const id = 1 - * const now = new Date().toISOString() - * - * const person = await db.updateTable('person') - * .set({ deleted_at: now }) - * .where('id', '=', id) - * .where('nullable_column', 'is not', null) - * .returningAll() - * .$narrowType<{ deleted_at: Date; nullable_column: NotNull }>() - * .executeTakeFirstOrThrow() - * - * functionThatExpectsPersonWithNonNullValue(person) - * ``` - */ - $narrowType() { - return new UpdateQueryBuilder(this.#props); - } - /** - * Asserts that query's output row type equals the given type `T`. - * - * This method can be used to simplify excessively complex types to make TypeScript happy - * and much faster. - * - * Kysely uses complex type magic to achieve its type safety. This complexity is sometimes too much - * for TypeScript and you get errors like this: - * - * ``` - * error TS2589: Type instantiation is excessively deep and possibly infinite. - * ``` - * - * In these case you can often use this method to help TypeScript a little bit. When you use this - * method to assert the output type of a query, Kysely can drop the complex output type that - * consists of multiple nested helper types and replace it with the simple asserted type. - * - * Using this method doesn't reduce type safety at all. You have to pass in a type that is - * structurally equal to the current type. - * - * ### Examples - * - * ```ts - * import type { PersonUpdate, PetUpdate, Species } from 'type-editor' // imaginary module - * - * const person = { - * id: 1, - * gender: 'other', - * } satisfies PersonUpdate - * - * const pet = { - * name: 'Fluffy', - * } satisfies PetUpdate - * - * const result = await db - * .with('updated_person', (qb) => qb - * .updateTable('person') - * .set(person) - * .where('id', '=', person.id) - * .returning('first_name') - * .$assertType<{ first_name: string }>() - * ) - * .with('updated_pet', (qb) => qb - * .updateTable('pet') - * .set(pet) - * .where('owner_id', '=', person.id) - * .returning(['name as pet_name', 'species']) - * .$assertType<{ pet_name: string, species: Species }>() - * ) - * .selectFrom(['updated_person', 'updated_pet']) - * .selectAll() - * .executeTakeFirstOrThrow() - * ``` - */ - $assertType() { - return new UpdateQueryBuilder(this.#props); - } - /** - * Returns a copy of this UpdateQueryBuilder instance with the given plugin installed. - */ - withPlugin(plugin) { - return new UpdateQueryBuilder({ - ...this.#props, - executor: this.#props.executor.withPlugin(plugin), - }); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.queryNode, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - /** - * Executes the query and returns an array of rows. - * - * Also see the {@link executeTakeFirst} and {@link executeTakeFirstOrThrow} methods. - */ - async execute() { - const compiledQuery = this.compile(); - const result = await this.#props.executor.executeQuery(compiledQuery); - const { adapter } = this.#props.executor; - const query = compiledQuery.query; - if ((query.returning && adapter.supportsReturning) || - (query.output && adapter.supportsOutput)) { - return result.rows; - } - return [ - new update_result_js_1.UpdateResult(result.numAffectedRows ?? BigInt(0), result.numChangedRows), - ]; - } - /** - * Executes the query and returns the first result or undefined if - * the query returned no result. - */ - async executeTakeFirst() { - const [result] = await this.execute(); - return result; - } - /** - * Executes the query and returns the first result or throws if - * the query returned no result. - * - * By default an instance of {@link NoResultError} is thrown, but you can - * provide a custom error class, or callback as the only argument to throw a different - * error. - */ - async executeTakeFirstOrThrow(errorConstructor = no_result_error_js_1.NoResultError) { - const result = await this.executeTakeFirst(); - if (result === undefined) { - const error = (0, no_result_error_js_1.isNoResultErrorConstructor)(errorConstructor) - ? new errorConstructor(this.toOperationNode()) - : errorConstructor(this.toOperationNode()); - throw error; - } - return result; - } - async *stream(chunkSize = 100) { - const compiledQuery = this.compile(); - const stream = this.#props.executor.stream(compiledQuery, chunkSize); - for await (const item of stream) { - yield* item.rows; - } - } - async explain(format, options) { - const builder = new UpdateQueryBuilder({ - ...this.#props, - queryNode: query_node_js_1.QueryNode.cloneWithExplain(this.#props.queryNode, format, options), - }); - return await builder.execute(); - } -} -exports.UpdateQueryBuilder = UpdateQueryBuilder; diff --git a/node_modules/kysely/dist/cjs/query-builder/update-result.d.ts b/node_modules/kysely/dist/cjs/query-builder/update-result.d.ts deleted file mode 100644 index 26b50bc..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/update-result.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export declare class UpdateResult { - /** - * The number of rows the update query updated (even if not changed). - */ - readonly numUpdatedRows: bigint; - /** - * The number of rows the update query changed. - * - * This is **optional** and only supported in dialects such as MySQL. - * You would probably use {@link numUpdatedRows} in most cases. - */ - readonly numChangedRows?: bigint; - constructor(numUpdatedRows: bigint, numChangedRows: bigint | undefined); -} diff --git a/node_modules/kysely/dist/cjs/query-builder/update-result.js b/node_modules/kysely/dist/cjs/query-builder/update-result.js deleted file mode 100644 index 2e970b8..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/update-result.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UpdateResult = void 0; -class UpdateResult { - /** - * The number of rows the update query updated (even if not changed). - */ - numUpdatedRows; - /** - * The number of rows the update query changed. - * - * This is **optional** and only supported in dialects such as MySQL. - * You would probably use {@link numUpdatedRows} in most cases. - */ - numChangedRows; - constructor(numUpdatedRows, numChangedRows) { - this.numUpdatedRows = numUpdatedRows; - this.numChangedRows = numChangedRows; - } -} -exports.UpdateResult = UpdateResult; diff --git a/node_modules/kysely/dist/cjs/query-builder/where-interface.d.ts b/node_modules/kysely/dist/cjs/query-builder/where-interface.d.ts deleted file mode 100644 index 29330ac..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/where-interface.d.ts +++ /dev/null @@ -1,382 +0,0 @@ -import type { ComparisonOperatorExpression, OperandValueExpressionOrList } from '../parser/binary-operation-parser.js'; -import type { ReferenceExpression } from '../parser/reference-parser.js'; -import type { SqlBool } from '../util/type-utils.js'; -import type { ExpressionOrFactory } from '../parser/expression-parser.js'; -export interface WhereInterface { - /** - * Adds a `where` expression to the query. - * - * Calling this method multiple times will combine the expressions using `and`. - * - * Also see {@link whereRef} - * - * ### Examples - * - * - * - * `where` method calls are combined with `AND`: - * - * ```ts - * const person = await db - * .selectFrom('person') - * .selectAll() - * .where('first_name', '=', 'Jennifer') - * .where('age', '>', 40) - * .executeTakeFirst() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "first_name" = $1 and "age" > $2 - * ``` - * - * Operator can be any supported operator or if the typings don't support it - * you can always use: - * - * ```ts - * import { sql } from 'kysely' - * - * sql`your operator` - * ``` - * - * - * - * Find multiple items using a list of identifiers: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where('id', 'in', [1, 2, 3]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "id" in ($1, $2, $3) - * ``` - * - * - * - * You can use the `and` function to create a simple equality - * filter using an object - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where((eb) => eb.and({ - * first_name: 'Jennifer', - * last_name: eb.ref('first_name') - * })) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * "first_name" = $1 - * and "last_name" = "first_name" - * ) - * ``` - * - * - * - * To combine conditions using `OR`, you can use the expression builder. - * There are two ways to create `OR` expressions. Both are shown in this - * example: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * // 1. Using the `or` method on the expression builder: - * .where((eb) => eb.or([ - * eb('first_name', '=', 'Jennifer'), - * eb('first_name', '=', 'Sylvester') - * ])) - * // 2. Chaining expressions using the `or` method on the - * // created expressions: - * .where((eb) => - * eb('last_name', '=', 'Aniston').or('last_name', '=', 'Stallone') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * ("first_name" = $1 or "first_name" = $2) - * and - * ("last_name" = $3 or "last_name" = $4) - * ) - * ``` - * - * - * - * You can add expressions conditionally like this: - * - * ```ts - * import { Expression, SqlBool } from 'kysely' - * - * const firstName: string | undefined = 'Jennifer' - * const lastName: string | undefined = 'Aniston' - * const under18 = true - * const over60 = true - * - * let query = db - * .selectFrom('person') - * .selectAll() - * - * if (firstName) { - * // The query builder is immutable. Remember to reassign - * // the result back to the query variable. - * query = query.where('first_name', '=', firstName) - * } - * - * if (lastName) { - * query = query.where('last_name', '=', lastName) - * } - * - * if (under18 || over60) { - * // Conditional OR expressions can be added like this. - * query = query.where((eb) => { - * const ors: Expression[] = [] - * - * if (under18) { - * ors.push(eb('age', '<', 18)) - * } - * - * if (over60) { - * ors.push(eb('age', '>', 60)) - * } - * - * return eb.or(ors) - * }) - * } - * - * const persons = await query.execute() - * ``` - * - * Both the first and third argument can also be arbitrary expressions like - * subqueries. An expression can defined by passing a function and calling - * the methods of the {@link ExpressionBuilder} passed to the callback: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where( - * (qb) => qb.selectFrom('pet') - * .select('pet.name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1), - * '=', - * 'Fluffy' - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * select "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) = $2 - * ``` - * - * A `where in` query can be built by using the `in` operator and an array - * of values. The values in the array can also be expressions: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where('person.id', 'in', [100, 200, 300]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "id" in ($1, $2, $3) - * ``` - * - * - * - * For complex `where` expressions you can pass in a single callback and - * use the `ExpressionBuilder` to build your expression: - * - * ```ts - * const firstName = 'Jennifer' - * const maxAge = 60 - * - * const persons = await db - * .selectFrom('person') - * .selectAll('person') - * .where(({ eb, or, and, not, exists, selectFrom }) => and([ - * or([ - * eb('first_name', '=', firstName), - * eb('age', '<', maxAge) - * ]), - * not(exists( - * selectFrom('pet') - * .select('pet.id') - * .whereRef('pet.owner_id', '=', 'person.id') - * )) - * ])) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where ( - * ( - * "first_name" = $1 - * or "age" < $2 - * ) - * and not exists ( - * select "pet"."id" from "pet" where "pet"."owner_id" = "person"."id" - * ) - * ) - * ``` - * - * If everything else fails, you can always use the {@link sql} tag - * as any of the arguments, including the operator: - * - * ```ts - * import { sql } from 'kysely' - * - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where( - * sql`coalesce(first_name, last_name)`, - * 'like', - * '%' + name + '%', - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * where coalesce(first_name, last_name) like $1 - * ``` - * - * In all examples above the columns were known at compile time - * (except for the raw {@link sql} expressions). By default kysely only - * allows you to refer to columns that exist in the database **and** - * can be referred to in the current query and context. - * - * Sometimes you may want to refer to columns that come from the user - * input and thus are not available at compile time. - * - * You have two options, the {@link sql} tag or `db.dynamic`. The example below - * uses both: - * - * ```ts - * import { sql } from 'kysely' - * const { ref } = db.dynamic - * - * const columnFromUserInput: string = 'id' - * - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where(ref(columnFromUserInput), '=', 1) - * .where(sql.id(columnFromUserInput), '=', 2) - * .execute() - * ``` - */ - where, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): WhereInterface; - where>(expression: E): WhereInterface; - /** - * Adds a `where` clause where both sides of the operator are references - * to columns. - * - * The normal `where` method treats the right hand side argument as a - * value by default. `whereRef` treats it as a column reference. This method is - * expecially useful with joins and correlated subqueries. - * - * ### Examples - * - * Usage with a join: - * - * ```ts - * db.selectFrom(['person', 'pet']) - * .selectAll() - * .whereRef('person.first_name', '=', 'pet.name') - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person", "pet" where "person"."first_name" = "pet"."name" - * ``` - * - * Usage in a subquery: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll('person') - * .select((eb) => eb - * .selectFrom('pet') - * .select('name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1) - * .as('pet_name') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".*, ( - * select "name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) as "pet_name" - * from "person" - */ - whereRef, RRE extends ReferenceExpression>(lhs: LRE, op: ComparisonOperatorExpression, rhs: RRE): WhereInterface; - /** - * Clears all where expressions from the query. - * - * ### Examples - * - * ```ts - * db.selectFrom('person') - * .selectAll() - * .where('id','=',42) - * .clearWhere() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearWhere(): WhereInterface; -} diff --git a/node_modules/kysely/dist/cjs/query-builder/where-interface.js b/node_modules/kysely/dist/cjs/query-builder/where-interface.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/query-builder/where-interface.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/query-compiler/compiled-query.d.ts b/node_modules/kysely/dist/cjs/query-compiler/compiled-query.d.ts deleted file mode 100644 index 09a89a5..0000000 --- a/node_modules/kysely/dist/cjs/query-compiler/compiled-query.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { type QueryId } from '../util/query-id.js'; -import type { RootOperationNode } from './query-compiler.js'; -export interface CompiledQuery { - readonly query: RootOperationNode; - readonly queryId: QueryId; - readonly sql: string; - readonly parameters: ReadonlyArray; -} -type CompiledQueryFactory = Readonly<{ - raw(sql: string, parameters?: unknown[]): Readonly; -}>; -export declare const CompiledQuery: CompiledQueryFactory; -export {}; diff --git a/node_modules/kysely/dist/cjs/query-compiler/compiled-query.js b/node_modules/kysely/dist/cjs/query-compiler/compiled-query.js deleted file mode 100644 index 699469c..0000000 --- a/node_modules/kysely/dist/cjs/query-compiler/compiled-query.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CompiledQuery = void 0; -const raw_node_js_1 = require("../operation-node/raw-node.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -const query_id_js_1 = require("../util/query-id.js"); -exports.CompiledQuery = (0, object_utils_js_1.freeze)({ - raw(sql, parameters = []) { - return (0, object_utils_js_1.freeze)({ - sql, - query: raw_node_js_1.RawNode.createWithSql(sql), - parameters: (0, object_utils_js_1.freeze)(parameters), - queryId: (0, query_id_js_1.createQueryId)(), - }); - }, -}); diff --git a/node_modules/kysely/dist/cjs/query-compiler/default-query-compiler.d.ts b/node_modules/kysely/dist/cjs/query-compiler/default-query-compiler.d.ts deleted file mode 100644 index 3b71eef..0000000 --- a/node_modules/kysely/dist/cjs/query-compiler/default-query-compiler.d.ts +++ /dev/null @@ -1,235 +0,0 @@ -import type { AliasNode } from '../operation-node/alias-node.js'; -import type { AndNode } from '../operation-node/and-node.js'; -import type { CheckConstraintNode } from '../operation-node/check-constraint-node.js'; -import type { AddColumnNode } from '../operation-node/add-column-node.js'; -import type { ColumnUpdateNode } from '../operation-node/column-update-node.js'; -import type { CreateIndexNode } from '../operation-node/create-index-node.js'; -import { CreateTableNode } from '../operation-node/create-table-node.js'; -import type { DataTypeNode } from '../operation-node/data-type-node.js'; -import type { DeleteQueryNode } from '../operation-node/delete-query-node.js'; -import type { DropIndexNode } from '../operation-node/drop-index-node.js'; -import type { DropTableNode } from '../operation-node/drop-table-node.js'; -import type { FromNode } from '../operation-node/from-node.js'; -import type { GroupByItemNode } from '../operation-node/group-by-item-node.js'; -import type { GroupByNode } from '../operation-node/group-by-node.js'; -import type { IdentifierNode } from '../operation-node/identifier-node.js'; -import { InsertQueryNode } from '../operation-node/insert-query-node.js'; -import type { JoinNode } from '../operation-node/join-node.js'; -import type { LimitNode } from '../operation-node/limit-node.js'; -import type { ListNode } from '../operation-node/list-node.js'; -import type { OffsetNode } from '../operation-node/offset-node.js'; -import type { OnConflictNode } from '../operation-node/on-conflict-node.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -import { OperationNodeVisitor } from '../operation-node/operation-node-visitor.js'; -import { OperatorNode } from '../operation-node/operator-node.js'; -import type { OrNode } from '../operation-node/or-node.js'; -import type { OrderByItemNode } from '../operation-node/order-by-item-node.js'; -import type { OrderByNode } from '../operation-node/order-by-node.js'; -import { ParensNode } from '../operation-node/parens-node.js'; -import type { PrimitiveValueListNode } from '../operation-node/primitive-value-list-node.js'; -import { RawNode } from '../operation-node/raw-node.js'; -import type { ReferenceNode } from '../operation-node/reference-node.js'; -import type { ReferencesNode } from '../operation-node/references-node.js'; -import type { ReturningNode } from '../operation-node/returning-node.js'; -import type { SelectAllNode } from '../operation-node/select-all-node.js'; -import type { SelectQueryNode } from '../operation-node/select-query-node.js'; -import type { SelectionNode } from '../operation-node/selection-node.js'; -import type { TableNode } from '../operation-node/table-node.js'; -import type { PrimaryKeyConstraintNode } from '../operation-node/primary-key-constraint-node.js'; -import type { UniqueConstraintNode } from '../operation-node/unique-constraint-node.js'; -import type { UpdateQueryNode } from '../operation-node/update-query-node.js'; -import type { ValueListNode } from '../operation-node/value-list-node.js'; -import type { ValueNode } from '../operation-node/value-node.js'; -import type { WhereNode } from '../operation-node/where-node.js'; -import type { CommonTableExpressionNode } from '../operation-node/common-table-expression-node.js'; -import type { WithNode } from '../operation-node/with-node.js'; -import type { CompiledQuery } from './compiled-query.js'; -import type { RootOperationNode, QueryCompiler } from './query-compiler.js'; -import type { HavingNode } from '../operation-node/having-node.js'; -import type { CreateSchemaNode } from '../operation-node/create-schema-node.js'; -import type { DropSchemaNode } from '../operation-node/drop-schema-node.js'; -import type { AlterTableColumnAlterationNode, AlterTableNode } from '../operation-node/alter-table-node.js'; -import type { DropColumnNode } from '../operation-node/drop-column-node.js'; -import type { RenameColumnNode } from '../operation-node/rename-column-node.js'; -import type { AlterColumnNode } from '../operation-node/alter-column-node.js'; -import type { AddConstraintNode } from '../operation-node/add-constraint-node.js'; -import type { DropConstraintNode } from '../operation-node/drop-constraint-node.js'; -import type { ForeignKeyConstraintNode } from '../operation-node/foreign-key-constraint-node.js'; -import type { ColumnDefinitionNode } from '../operation-node/column-definition-node.js'; -import type { ModifyColumnNode } from '../operation-node/modify-column-node.js'; -import type { OnDuplicateKeyNode } from '../operation-node/on-duplicate-key-node.js'; -import type { ColumnNode } from '../operation-node/column-node.js'; -import { CreateViewNode } from '../operation-node/create-view-node.js'; -import type { DropViewNode } from '../operation-node/drop-view-node.js'; -import type { GeneratedNode } from '../operation-node/generated-node.js'; -import type { DefaultValueNode } from '../operation-node/default-value-node.js'; -import type { OnNode } from '../operation-node/on-node.js'; -import type { ValuesNode } from '../operation-node/values-node.js'; -import type { CommonTableExpressionNameNode } from '../operation-node/common-table-expression-name-node.js'; -import type { SelectModifierNode } from '../operation-node/select-modifier-node.js'; -import type { CreateTypeNode } from '../operation-node/create-type-node.js'; -import type { DropTypeNode } from '../operation-node/drop-type-node.js'; -import type { ExplainNode } from '../operation-node/explain-node.js'; -import type { SchemableIdentifierNode } from '../operation-node/schemable-identifier-node.js'; -import type { DefaultInsertValueNode } from '../operation-node/default-insert-value-node.js'; -import type { AggregateFunctionNode } from '../operation-node/aggregate-function-node.js'; -import type { OverNode } from '../operation-node/over-node.js'; -import type { PartitionByNode } from '../operation-node/partition-by-node.js'; -import type { PartitionByItemNode } from '../operation-node/partition-by-item-node.js'; -import { SetOperationNode } from '../operation-node/set-operation-node.js'; -import type { BinaryOperationNode } from '../operation-node/binary-operation-node.js'; -import type { UnaryOperationNode } from '../operation-node/unary-operation-node.js'; -import type { UsingNode } from '../operation-node/using-node.js'; -import type { FunctionNode } from '../operation-node/function-node.js'; -import type { CaseNode } from '../operation-node/case-node.js'; -import { WhenNode } from '../operation-node/when-node.js'; -import type { JSONReferenceNode } from '../operation-node/json-reference-node.js'; -import type { JSONPathNode } from '../operation-node/json-path-node.js'; -import type { JSONPathLegNode } from '../operation-node/json-path-leg-node.js'; -import type { JSONOperatorChainNode } from '../operation-node/json-operator-chain-node.js'; -import type { TupleNode } from '../operation-node/tuple-node.js'; -import type { MergeQueryNode } from '../operation-node/merge-query-node.js'; -import type { MatchedNode } from '../operation-node/matched-node.js'; -import type { AddIndexNode } from '../operation-node/add-index-node.js'; -import type { CastNode } from '../operation-node/cast-node.js'; -import type { FetchNode } from '../operation-node/fetch-node.js'; -import type { TopNode } from '../operation-node/top-node.js'; -import type { OutputNode } from '../operation-node/output-node.js'; -import type { RefreshMaterializedViewNode } from '../operation-node/refresh-materialized-view-node.js'; -import type { OrActionNode } from '../operation-node/or-action-node.js'; -import type { CollateNode } from '../operation-node/collate-node.js'; -import type { QueryId } from '../util/query-id.js'; -import type { RenameConstraintNode } from '../operation-node/rename-constraint-node.js'; -export declare class DefaultQueryCompiler extends OperationNodeVisitor implements QueryCompiler { - #private; - protected get numParameters(): number; - compileQuery(node: RootOperationNode, queryId: QueryId): CompiledQuery; - protected getSql(): string; - protected visitSelectQuery(node: SelectQueryNode): void; - protected visitFrom(node: FromNode): void; - protected visitSelection(node: SelectionNode): void; - protected visitColumn(node: ColumnNode): void; - protected compileDistinctOn(expressions: ReadonlyArray): void; - protected compileList(nodes: ReadonlyArray, separator?: string): void; - protected visitWhere(node: WhereNode): void; - protected visitHaving(node: HavingNode): void; - protected visitInsertQuery(node: InsertQueryNode): void; - protected visitValues(node: ValuesNode): void; - protected visitDeleteQuery(node: DeleteQueryNode): void; - protected visitReturning(node: ReturningNode): void; - protected visitAlias(node: AliasNode): void; - protected visitReference(node: ReferenceNode): void; - protected visitSelectAll(_: SelectAllNode): void; - protected visitIdentifier(node: IdentifierNode): void; - protected compileUnwrappedIdentifier(node: IdentifierNode): void; - protected visitAnd(node: AndNode): void; - protected visitOr(node: OrNode): void; - protected visitValue(node: ValueNode): void; - protected visitValueList(node: ValueListNode): void; - protected visitTuple(node: TupleNode): void; - protected visitPrimitiveValueList(node: PrimitiveValueListNode): void; - protected visitParens(node: ParensNode): void; - protected visitJoin(node: JoinNode): void; - protected visitOn(node: OnNode): void; - protected visitRaw(node: RawNode): void; - protected visitOperator(node: OperatorNode): void; - protected visitTable(node: TableNode): void; - protected visitSchemableIdentifier(node: SchemableIdentifierNode): void; - protected visitCreateTable(node: CreateTableNode): void; - protected visitColumnDefinition(node: ColumnDefinitionNode): void; - protected getAutoIncrement(): string; - protected visitReferences(node: ReferencesNode): void; - protected visitDropTable(node: DropTableNode): void; - protected visitDataType(node: DataTypeNode): void; - protected visitOrderBy(node: OrderByNode): void; - protected visitOrderByItem(node: OrderByItemNode): void; - protected visitGroupBy(node: GroupByNode): void; - protected visitGroupByItem(node: GroupByItemNode): void; - protected visitUpdateQuery(node: UpdateQueryNode): void; - protected visitColumnUpdate(node: ColumnUpdateNode): void; - protected visitLimit(node: LimitNode): void; - protected visitOffset(node: OffsetNode): void; - protected visitOnConflict(node: OnConflictNode): void; - protected visitOnDuplicateKey(node: OnDuplicateKeyNode): void; - protected visitCreateIndex(node: CreateIndexNode): void; - protected visitDropIndex(node: DropIndexNode): void; - protected visitCreateSchema(node: CreateSchemaNode): void; - protected visitDropSchema(node: DropSchemaNode): void; - protected visitPrimaryKeyConstraint(node: PrimaryKeyConstraintNode): void; - protected buildDeferrable(node: { - deferrable?: boolean; - initiallyDeferred?: boolean; - }): void; - protected visitUniqueConstraint(node: UniqueConstraintNode): void; - protected visitCheckConstraint(node: CheckConstraintNode): void; - protected visitForeignKeyConstraint(node: ForeignKeyConstraintNode): void; - protected visitList(node: ListNode): void; - protected visitWith(node: WithNode): void; - protected visitCommonTableExpression(node: CommonTableExpressionNode): void; - protected visitCommonTableExpressionName(node: CommonTableExpressionNameNode): void; - protected visitAlterTable(node: AlterTableNode): void; - protected visitAddColumn(node: AddColumnNode): void; - protected visitRenameColumn(node: RenameColumnNode): void; - protected visitDropColumn(node: DropColumnNode): void; - protected visitAlterColumn(node: AlterColumnNode): void; - protected visitModifyColumn(node: ModifyColumnNode): void; - protected visitAddConstraint(node: AddConstraintNode): void; - protected visitDropConstraint(node: DropConstraintNode): void; - protected visitRenameConstraint(node: RenameConstraintNode): void; - protected visitSetOperation(node: SetOperationNode): void; - protected visitCreateView(node: CreateViewNode): void; - protected visitRefreshMaterializedView(node: RefreshMaterializedViewNode): void; - protected visitDropView(node: DropViewNode): void; - protected visitGenerated(node: GeneratedNode): void; - protected visitDefaultValue(node: DefaultValueNode): void; - protected visitSelectModifier(node: SelectModifierNode): void; - protected visitCreateType(node: CreateTypeNode): void; - protected visitDropType(node: DropTypeNode): void; - protected visitExplain(node: ExplainNode): void; - protected visitDefaultInsertValue(_: DefaultInsertValueNode): void; - protected visitAggregateFunction(node: AggregateFunctionNode): void; - protected visitOver(node: OverNode): void; - protected visitPartitionBy(node: PartitionByNode): void; - protected visitPartitionByItem(node: PartitionByItemNode): void; - protected visitBinaryOperation(node: BinaryOperationNode): void; - protected visitUnaryOperation(node: UnaryOperationNode): void; - protected isMinusOperator(node: OperationNode): node is OperatorNode; - protected visitUsing(node: UsingNode): void; - protected visitFunction(node: FunctionNode): void; - protected visitCase(node: CaseNode): void; - protected visitWhen(node: WhenNode): void; - protected visitJSONReference(node: JSONReferenceNode): void; - protected visitJSONPath(node: JSONPathNode): void; - protected visitJSONPathLeg(node: JSONPathLegNode): void; - protected visitJSONOperatorChain(node: JSONOperatorChainNode): void; - protected visitMergeQuery(node: MergeQueryNode): void; - protected visitMatched(node: MatchedNode): void; - protected visitAddIndex(node: AddIndexNode): void; - protected visitCast(node: CastNode): void; - protected visitFetch(node: FetchNode): void; - protected visitOutput(node: OutputNode): void; - protected visitTop(node: TopNode): void; - protected visitOrAction(node: OrActionNode): void; - protected visitCollate(node: CollateNode): void; - protected append(str: string): void; - protected appendValue(parameter: unknown): void; - protected getLeftIdentifierWrapper(): string; - protected getRightIdentifierWrapper(): string; - protected getCurrentParameterPlaceholder(): string; - protected getLeftExplainOptionsWrapper(): string; - protected getExplainOptionAssignment(): string; - protected getExplainOptionsDelimiter(): string; - protected getRightExplainOptionsWrapper(): string; - protected sanitizeIdentifier(identifier: string): string; - protected sanitizeStringLiteral(value: string): string; - protected addParameter(parameter: unknown): void; - protected appendImmediateValue(value: unknown): void; - protected appendStringLiteral(value: string): void; - protected sortSelectModifiers(arr: SelectModifierNode[]): ReadonlyArray; - protected compileColumnAlterations(columnAlterations: readonly AlterTableColumnAlterationNode[]): void; - /** - * controls whether the dialect adds a "type" keyword before a column's new data - * type in an ALTER TABLE statement. - */ - protected announcesNewColumnDataType(): boolean; -} diff --git a/node_modules/kysely/dist/cjs/query-compiler/default-query-compiler.js b/node_modules/kysely/dist/cjs/query-compiler/default-query-compiler.js deleted file mode 100644 index 8b57787..0000000 --- a/node_modules/kysely/dist/cjs/query-compiler/default-query-compiler.js +++ /dev/null @@ -1,1398 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DefaultQueryCompiler = void 0; -const create_table_node_js_1 = require("../operation-node/create-table-node.js"); -const insert_query_node_js_1 = require("../operation-node/insert-query-node.js"); -const operation_node_visitor_js_1 = require("../operation-node/operation-node-visitor.js"); -const operator_node_js_1 = require("../operation-node/operator-node.js"); -const parens_node_js_1 = require("../operation-node/parens-node.js"); -const raw_node_js_1 = require("../operation-node/raw-node.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -const create_view_node_js_1 = require("../operation-node/create-view-node.js"); -const set_operation_node_js_1 = require("../operation-node/set-operation-node.js"); -const when_node_js_1 = require("../operation-node/when-node.js"); -const log_once_js_1 = require("../util/log-once.js"); -const LIT_WRAP_REGEX = /'/g; -class DefaultQueryCompiler extends operation_node_visitor_js_1.OperationNodeVisitor { - #sql = ''; - #parameters = []; - get numParameters() { - return this.#parameters.length; - } - compileQuery(node, queryId) { - this.#sql = ''; - this.#parameters = []; - this.nodeStack.splice(0, this.nodeStack.length); - this.visitNode(node); - return (0, object_utils_js_1.freeze)({ - query: node, - queryId, - sql: this.getSql(), - parameters: [...this.#parameters], - }); - } - getSql() { - return this.#sql; - } - visitSelectQuery(node) { - const wrapInParens = this.parentNode !== undefined && - !parens_node_js_1.ParensNode.is(this.parentNode) && - !insert_query_node_js_1.InsertQueryNode.is(this.parentNode) && - !create_table_node_js_1.CreateTableNode.is(this.parentNode) && - !create_view_node_js_1.CreateViewNode.is(this.parentNode) && - !set_operation_node_js_1.SetOperationNode.is(this.parentNode); - if (this.parentNode === undefined && node.explain) { - this.visitNode(node.explain); - this.append(' '); - } - if (wrapInParens) { - this.append('('); - } - if (node.with) { - this.visitNode(node.with); - this.append(' '); - } - this.append('select'); - if (node.distinctOn) { - this.append(' '); - this.compileDistinctOn(node.distinctOn); - } - if (node.frontModifiers?.length) { - this.append(' '); - this.compileList(node.frontModifiers, ' '); - } - if (node.top) { - this.append(' '); - this.visitNode(node.top); - } - if (node.selections) { - this.append(' '); - this.compileList(node.selections); - } - if (node.from) { - this.append(' '); - this.visitNode(node.from); - } - if (node.joins) { - this.append(' '); - this.compileList(node.joins, ' '); - } - if (node.where) { - this.append(' '); - this.visitNode(node.where); - } - if (node.groupBy) { - this.append(' '); - this.visitNode(node.groupBy); - } - if (node.having) { - this.append(' '); - this.visitNode(node.having); - } - if (node.setOperations) { - this.append(' '); - this.compileList(node.setOperations, ' '); - } - if (node.orderBy) { - this.append(' '); - this.visitNode(node.orderBy); - } - if (node.limit) { - this.append(' '); - this.visitNode(node.limit); - } - if (node.offset) { - this.append(' '); - this.visitNode(node.offset); - } - if (node.fetch) { - this.append(' '); - this.visitNode(node.fetch); - } - if (node.endModifiers?.length) { - this.append(' '); - this.compileList(this.sortSelectModifiers([...node.endModifiers]), ' '); - } - if (wrapInParens) { - this.append(')'); - } - } - visitFrom(node) { - this.append('from '); - this.compileList(node.froms); - } - visitSelection(node) { - this.visitNode(node.selection); - } - visitColumn(node) { - this.visitNode(node.column); - } - compileDistinctOn(expressions) { - this.append('distinct on ('); - this.compileList(expressions); - this.append(')'); - } - compileList(nodes, separator = ', ') { - const lastIndex = nodes.length - 1; - for (let i = 0; i <= lastIndex; i++) { - this.visitNode(nodes[i]); - if (i < lastIndex) { - this.append(separator); - } - } - } - visitWhere(node) { - this.append('where '); - this.visitNode(node.where); - } - visitHaving(node) { - this.append('having '); - this.visitNode(node.having); - } - visitInsertQuery(node) { - const wrapInParens = this.parentNode !== undefined && - !parens_node_js_1.ParensNode.is(this.parentNode) && - !raw_node_js_1.RawNode.is(this.parentNode) && - !when_node_js_1.WhenNode.is(this.parentNode); - if (this.parentNode === undefined && node.explain) { - this.visitNode(node.explain); - this.append(' '); - } - if (wrapInParens) { - this.append('('); - } - if (node.with) { - this.visitNode(node.with); - this.append(' '); - } - this.append(node.replace ? 'replace' : 'insert'); - // TODO: remove in 0.29. - if (node.ignore) { - (0, log_once_js_1.logOnce)('`InsertQueryNode.ignore` is deprecated. Use `InsertQueryNode.orAction` instead.'); - this.append(' ignore'); - } - if (node.orAction) { - this.append(' '); - this.visitNode(node.orAction); - } - if (node.top) { - this.append(' '); - this.visitNode(node.top); - } - if (node.into) { - this.append(' into '); - this.visitNode(node.into); - } - if (node.columns) { - this.append(' ('); - this.compileList(node.columns); - this.append(')'); - } - if (node.output) { - this.append(' '); - this.visitNode(node.output); - } - if (node.values) { - this.append(' '); - this.visitNode(node.values); - } - if (node.defaultValues) { - this.append(' '); - this.append('default values'); - } - if (node.onConflict) { - this.append(' '); - this.visitNode(node.onConflict); - } - if (node.onDuplicateKey) { - this.append(' '); - this.visitNode(node.onDuplicateKey); - } - if (node.returning) { - this.append(' '); - this.visitNode(node.returning); - } - if (wrapInParens) { - this.append(')'); - } - if (node.endModifiers?.length) { - this.append(' '); - this.compileList(node.endModifiers, ' '); - } - } - visitValues(node) { - this.append('values '); - this.compileList(node.values); - } - visitDeleteQuery(node) { - const wrapInParens = this.parentNode !== undefined && - !parens_node_js_1.ParensNode.is(this.parentNode) && - !raw_node_js_1.RawNode.is(this.parentNode); - if (this.parentNode === undefined && node.explain) { - this.visitNode(node.explain); - this.append(' '); - } - if (wrapInParens) { - this.append('('); - } - if (node.with) { - this.visitNode(node.with); - this.append(' '); - } - this.append('delete '); - if (node.top) { - this.visitNode(node.top); - this.append(' '); - } - this.visitNode(node.from); - if (node.output) { - this.append(' '); - this.visitNode(node.output); - } - if (node.using) { - this.append(' '); - this.visitNode(node.using); - } - if (node.joins) { - this.append(' '); - this.compileList(node.joins, ' '); - } - if (node.where) { - this.append(' '); - this.visitNode(node.where); - } - if (node.orderBy) { - this.append(' '); - this.visitNode(node.orderBy); - } - if (node.limit) { - this.append(' '); - this.visitNode(node.limit); - } - if (node.returning) { - this.append(' '); - this.visitNode(node.returning); - } - if (wrapInParens) { - this.append(')'); - } - if (node.endModifiers?.length) { - this.append(' '); - this.compileList(node.endModifiers, ' '); - } - } - visitReturning(node) { - this.append('returning '); - this.compileList(node.selections); - } - visitAlias(node) { - this.visitNode(node.node); - this.append(' as '); - this.visitNode(node.alias); - } - visitReference(node) { - if (node.table) { - this.visitNode(node.table); - this.append('.'); - } - this.visitNode(node.column); - } - visitSelectAll(_) { - this.append('*'); - } - visitIdentifier(node) { - this.append(this.getLeftIdentifierWrapper()); - this.compileUnwrappedIdentifier(node); - this.append(this.getRightIdentifierWrapper()); - } - compileUnwrappedIdentifier(node) { - if (!(0, object_utils_js_1.isString)(node.name)) { - throw new Error('a non-string identifier was passed to compileUnwrappedIdentifier.'); - } - this.append(this.sanitizeIdentifier(node.name)); - } - visitAnd(node) { - this.visitNode(node.left); - this.append(' and '); - this.visitNode(node.right); - } - visitOr(node) { - this.visitNode(node.left); - this.append(' or '); - this.visitNode(node.right); - } - visitValue(node) { - if (node.immediate) { - this.appendImmediateValue(node.value); - } - else { - this.appendValue(node.value); - } - } - visitValueList(node) { - this.append('('); - this.compileList(node.values); - this.append(')'); - } - visitTuple(node) { - this.append('('); - this.compileList(node.values); - this.append(')'); - } - visitPrimitiveValueList(node) { - this.append('('); - const { values } = node; - for (let i = 0; i < values.length; ++i) { - this.appendValue(values[i]); - if (i !== values.length - 1) { - this.append(', '); - } - } - this.append(')'); - } - visitParens(node) { - this.append('('); - this.visitNode(node.node); - this.append(')'); - } - visitJoin(node) { - this.append(JOIN_TYPE_SQL[node.joinType]); - this.append(' '); - this.visitNode(node.table); - if (node.on) { - this.append(' '); - this.visitNode(node.on); - } - } - visitOn(node) { - this.append('on '); - this.visitNode(node.on); - } - visitRaw(node) { - const { sqlFragments, parameters: params } = node; - for (let i = 0; i < sqlFragments.length; ++i) { - this.append(sqlFragments[i]); - if (params.length > i) { - this.visitNode(params[i]); - } - } - } - visitOperator(node) { - this.append(node.operator); - } - visitTable(node) { - this.visitNode(node.table); - } - visitSchemableIdentifier(node) { - if (node.schema) { - this.visitNode(node.schema); - this.append('.'); - } - this.visitNode(node.identifier); - } - visitCreateTable(node) { - this.append('create '); - if (node.frontModifiers && node.frontModifiers.length > 0) { - this.compileList(node.frontModifiers, ' '); - this.append(' '); - } - if (node.temporary) { - this.append('temporary '); - } - this.append('table '); - if (node.ifNotExists) { - this.append('if not exists '); - } - this.visitNode(node.table); - if (node.selectQuery) { - this.append(' as '); - this.visitNode(node.selectQuery); - } - else { - this.append(' ('); - this.compileList([...node.columns, ...(node.constraints ?? [])]); - this.append(')'); - if (node.onCommit) { - this.append(' on commit '); - this.append(node.onCommit); - } - if (node.endModifiers && node.endModifiers.length > 0) { - this.append(' '); - this.compileList(node.endModifiers, ' '); - } - } - } - visitColumnDefinition(node) { - if (node.ifNotExists) { - this.append('if not exists '); - } - this.visitNode(node.column); - this.append(' '); - this.visitNode(node.dataType); - if (node.unsigned) { - this.append(' unsigned'); - } - if (node.frontModifiers && node.frontModifiers.length > 0) { - this.append(' '); - this.compileList(node.frontModifiers, ' '); - } - if (node.generated) { - this.append(' '); - this.visitNode(node.generated); - } - if (node.identity) { - this.append(' identity'); - } - if (node.defaultTo) { - this.append(' '); - this.visitNode(node.defaultTo); - } - if (node.notNull) { - this.append(' not null'); - } - if (node.unique) { - this.append(' unique'); - } - if (node.nullsNotDistinct) { - this.append(' nulls not distinct'); - } - if (node.primaryKey) { - this.append(' primary key'); - } - if (node.autoIncrement) { - this.append(' '); - this.append(this.getAutoIncrement()); - } - if (node.references) { - this.append(' '); - this.visitNode(node.references); - } - if (node.check) { - this.append(' '); - this.visitNode(node.check); - } - if (node.endModifiers && node.endModifiers.length > 0) { - this.append(' '); - this.compileList(node.endModifiers, ' '); - } - } - getAutoIncrement() { - return 'auto_increment'; - } - visitReferences(node) { - this.append('references '); - this.visitNode(node.table); - this.append(' ('); - this.compileList(node.columns); - this.append(')'); - if (node.onDelete) { - this.append(' on delete '); - this.append(node.onDelete); - } - if (node.onUpdate) { - this.append(' on update '); - this.append(node.onUpdate); - } - } - visitDropTable(node) { - this.append('drop table '); - if (node.ifExists) { - this.append('if exists '); - } - this.visitNode(node.table); - if (node.cascade) { - this.append(' cascade'); - } - } - visitDataType(node) { - this.append(node.dataType); - } - visitOrderBy(node) { - this.append('order by '); - this.compileList(node.items); - } - visitOrderByItem(node) { - this.visitNode(node.orderBy); - if (node.collation) { - this.append(' '); - this.visitNode(node.collation); - } - if (node.direction) { - this.append(' '); - this.visitNode(node.direction); - } - if (node.nulls) { - this.append(' nulls '); - this.append(node.nulls); - } - } - visitGroupBy(node) { - this.append('group by '); - this.compileList(node.items); - } - visitGroupByItem(node) { - this.visitNode(node.groupBy); - } - visitUpdateQuery(node) { - const wrapInParens = this.parentNode !== undefined && - !parens_node_js_1.ParensNode.is(this.parentNode) && - !raw_node_js_1.RawNode.is(this.parentNode) && - !when_node_js_1.WhenNode.is(this.parentNode); - if (this.parentNode === undefined && node.explain) { - this.visitNode(node.explain); - this.append(' '); - } - if (wrapInParens) { - this.append('('); - } - if (node.with) { - this.visitNode(node.with); - this.append(' '); - } - this.append('update '); - if (node.top) { - this.visitNode(node.top); - this.append(' '); - } - if (node.table) { - this.visitNode(node.table); - this.append(' '); - } - this.append('set '); - if (node.updates) { - this.compileList(node.updates); - } - if (node.output) { - this.append(' '); - this.visitNode(node.output); - } - if (node.from) { - this.append(' '); - this.visitNode(node.from); - } - if (node.joins) { - if (!node.from) { - throw new Error("Joins in an update query are only supported as a part of a PostgreSQL 'update set from join' query. If you want to create a MySQL 'update join set' query, see https://kysely.dev/docs/examples/update/my-sql-joins"); - } - this.append(' '); - this.compileList(node.joins, ' '); - } - if (node.where) { - this.append(' '); - this.visitNode(node.where); - } - if (node.returning) { - this.append(' '); - this.visitNode(node.returning); - } - if (node.orderBy) { - this.append(' '); - this.visitNode(node.orderBy); - } - if (node.limit) { - this.append(' '); - this.visitNode(node.limit); - } - if (wrapInParens) { - this.append(')'); - } - if (node.endModifiers?.length) { - this.append(' '); - this.compileList(node.endModifiers, ' '); - } - } - visitColumnUpdate(node) { - this.visitNode(node.column); - this.append(' = '); - this.visitNode(node.value); - } - visitLimit(node) { - this.append('limit '); - this.visitNode(node.limit); - } - visitOffset(node) { - this.append('offset '); - this.visitNode(node.offset); - } - visitOnConflict(node) { - this.append('on conflict'); - if (node.columns) { - this.append(' ('); - this.compileList(node.columns); - this.append(')'); - } - else if (node.constraint) { - this.append(' on constraint '); - this.visitNode(node.constraint); - } - else if (node.indexExpression) { - this.append(' ('); - this.visitNode(node.indexExpression); - this.append(')'); - } - if (node.indexWhere) { - this.append(' '); - this.visitNode(node.indexWhere); - } - if (node.doNothing === true) { - this.append(' do nothing'); - } - else if (node.updates) { - this.append(' do update set '); - this.compileList(node.updates); - if (node.updateWhere) { - this.append(' '); - this.visitNode(node.updateWhere); - } - } - } - visitOnDuplicateKey(node) { - this.append('on duplicate key update '); - this.compileList(node.updates); - } - visitCreateIndex(node) { - this.append('create '); - if (node.unique) { - this.append('unique '); - } - this.append('index '); - if (node.ifNotExists) { - this.append('if not exists '); - } - this.visitNode(node.name); - if (node.table) { - this.append(' on '); - this.visitNode(node.table); - } - if (node.using) { - this.append(' using '); - this.visitNode(node.using); - } - if (node.columns) { - this.append(' ('); - this.compileList(node.columns); - this.append(')'); - } - if (node.nullsNotDistinct) { - this.append(' nulls not distinct'); - } - if (node.where) { - this.append(' '); - this.visitNode(node.where); - } - } - visitDropIndex(node) { - this.append('drop index '); - if (node.ifExists) { - this.append('if exists '); - } - this.visitNode(node.name); - if (node.table) { - this.append(' on '); - this.visitNode(node.table); - } - if (node.cascade) { - this.append(' cascade'); - } - } - visitCreateSchema(node) { - this.append('create schema '); - if (node.ifNotExists) { - this.append('if not exists '); - } - this.visitNode(node.schema); - } - visitDropSchema(node) { - this.append('drop schema '); - if (node.ifExists) { - this.append('if exists '); - } - this.visitNode(node.schema); - if (node.cascade) { - this.append(' cascade'); - } - } - visitPrimaryKeyConstraint(node) { - if (node.name) { - this.append('constraint '); - this.visitNode(node.name); - this.append(' '); - } - this.append('primary key ('); - this.compileList(node.columns); - this.append(')'); - this.buildDeferrable(node); - } - buildDeferrable(node) { - if (node.deferrable !== undefined) { - if (node.deferrable) { - this.append(' deferrable'); - } - else { - this.append(' not deferrable'); - } - } - if (node.initiallyDeferred !== undefined) { - if (node.initiallyDeferred) { - this.append(' initially deferred'); - } - else { - this.append(' initially immediate'); - } - } - } - visitUniqueConstraint(node) { - if (node.name) { - this.append('constraint '); - this.visitNode(node.name); - this.append(' '); - } - this.append('unique'); - if (node.nullsNotDistinct) { - this.append(' nulls not distinct'); - } - this.append(' ('); - this.compileList(node.columns); - this.append(')'); - this.buildDeferrable(node); - } - visitCheckConstraint(node) { - if (node.name) { - this.append('constraint '); - this.visitNode(node.name); - this.append(' '); - } - this.append('check ('); - this.visitNode(node.expression); - this.append(')'); - } - visitForeignKeyConstraint(node) { - if (node.name) { - this.append('constraint '); - this.visitNode(node.name); - this.append(' '); - } - this.append('foreign key ('); - this.compileList(node.columns); - this.append(') '); - this.visitNode(node.references); - if (node.onDelete) { - this.append(' on delete '); - this.append(node.onDelete); - } - if (node.onUpdate) { - this.append(' on update '); - this.append(node.onUpdate); - } - this.buildDeferrable(node); - } - visitList(node) { - this.compileList(node.items); - } - visitWith(node) { - this.append('with '); - if (node.recursive) { - this.append('recursive '); - } - this.compileList(node.expressions); - } - visitCommonTableExpression(node) { - this.visitNode(node.name); - this.append(' as '); - if ((0, object_utils_js_1.isBoolean)(node.materialized)) { - if (!node.materialized) { - this.append('not '); - } - this.append('materialized '); - } - this.visitNode(node.expression); - } - visitCommonTableExpressionName(node) { - this.visitNode(node.table); - if (node.columns) { - this.append('('); - this.compileList(node.columns); - this.append(')'); - } - } - visitAlterTable(node) { - this.append('alter table '); - this.visitNode(node.table); - this.append(' '); - if (node.renameTo) { - this.append('rename to '); - this.visitNode(node.renameTo); - } - if (node.setSchema) { - this.append('set schema '); - this.visitNode(node.setSchema); - } - if (node.addConstraint) { - this.visitNode(node.addConstraint); - } - if (node.dropConstraint) { - this.visitNode(node.dropConstraint); - } - if (node.renameConstraint) { - this.visitNode(node.renameConstraint); - } - if (node.columnAlterations) { - this.compileColumnAlterations(node.columnAlterations); - } - if (node.addIndex) { - this.visitNode(node.addIndex); - } - if (node.dropIndex) { - this.visitNode(node.dropIndex); - } - } - visitAddColumn(node) { - this.append('add column '); - this.visitNode(node.column); - } - visitRenameColumn(node) { - this.append('rename column '); - this.visitNode(node.column); - this.append(' to '); - this.visitNode(node.renameTo); - } - visitDropColumn(node) { - this.append('drop column '); - this.visitNode(node.column); - } - visitAlterColumn(node) { - this.append('alter column '); - this.visitNode(node.column); - this.append(' '); - if (node.dataType) { - if (this.announcesNewColumnDataType()) { - this.append('type '); - } - this.visitNode(node.dataType); - if (node.dataTypeExpression) { - this.append('using '); - this.visitNode(node.dataTypeExpression); - } - } - if (node.setDefault) { - this.append('set default '); - this.visitNode(node.setDefault); - } - if (node.dropDefault) { - this.append('drop default'); - } - if (node.setNotNull) { - this.append('set not null'); - } - if (node.dropNotNull) { - this.append('drop not null'); - } - } - visitModifyColumn(node) { - this.append('modify column '); - this.visitNode(node.column); - } - visitAddConstraint(node) { - this.append('add '); - this.visitNode(node.constraint); - } - visitDropConstraint(node) { - this.append('drop constraint '); - if (node.ifExists) { - this.append('if exists '); - } - this.visitNode(node.constraintName); - if (node.modifier === 'cascade') { - this.append(' cascade'); - } - else if (node.modifier === 'restrict') { - this.append(' restrict'); - } - } - visitRenameConstraint(node) { - this.append('rename constraint '); - this.visitNode(node.oldName); - this.append(' to '); - this.visitNode(node.newName); - } - visitSetOperation(node) { - this.append(node.operator); - this.append(' '); - if (node.all) { - this.append('all '); - } - this.visitNode(node.expression); - } - visitCreateView(node) { - this.append('create '); - if (node.orReplace) { - this.append('or replace '); - } - if (node.materialized) { - this.append('materialized '); - } - if (node.temporary) { - this.append('temporary '); - } - this.append('view '); - if (node.ifNotExists) { - this.append('if not exists '); - } - this.visitNode(node.name); - this.append(' '); - if (node.columns) { - this.append('('); - this.compileList(node.columns); - this.append(') '); - } - if (node.as) { - this.append('as '); - this.visitNode(node.as); - } - } - visitRefreshMaterializedView(node) { - this.append('refresh materialized view '); - if (node.concurrently) { - this.append('concurrently '); - } - this.visitNode(node.name); - if (node.withNoData) { - this.append(' with no data'); - } - else { - this.append(' with data'); - } - } - visitDropView(node) { - this.append('drop '); - if (node.materialized) { - this.append('materialized '); - } - this.append('view '); - if (node.ifExists) { - this.append('if exists '); - } - this.visitNode(node.name); - if (node.cascade) { - this.append(' cascade'); - } - } - visitGenerated(node) { - this.append('generated '); - if (node.always) { - this.append('always '); - } - if (node.byDefault) { - this.append('by default '); - } - this.append('as '); - if (node.identity) { - this.append('identity'); - } - if (node.expression) { - this.append('('); - this.visitNode(node.expression); - this.append(')'); - } - if (node.stored) { - this.append(' stored'); - } - } - visitDefaultValue(node) { - this.append('default '); - this.visitNode(node.defaultValue); - } - visitSelectModifier(node) { - if (node.rawModifier) { - this.visitNode(node.rawModifier); - } - else { - this.append(SELECT_MODIFIER_SQL[node.modifier]); - } - if (node.of) { - this.append(' of '); - this.compileList(node.of, ', '); - } - } - visitCreateType(node) { - this.append('create type '); - this.visitNode(node.name); - if (node.enum) { - this.append(' as enum '); - this.visitNode(node.enum); - } - } - visitDropType(node) { - this.append('drop type '); - if (node.ifExists) { - this.append('if exists '); - } - this.visitNode(node.name); - } - visitExplain(node) { - this.append('explain'); - if (node.options || node.format) { - this.append(' '); - this.append(this.getLeftExplainOptionsWrapper()); - if (node.options) { - this.visitNode(node.options); - if (node.format) { - this.append(this.getExplainOptionsDelimiter()); - } - } - if (node.format) { - this.append('format'); - this.append(this.getExplainOptionAssignment()); - this.append(node.format); - } - this.append(this.getRightExplainOptionsWrapper()); - } - } - visitDefaultInsertValue(_) { - this.append('default'); - } - visitAggregateFunction(node) { - this.append(node.func); - this.append('('); - if (node.distinct) { - this.append('distinct '); - } - this.compileList(node.aggregated); - if (node.orderBy) { - this.append(' '); - this.visitNode(node.orderBy); - } - this.append(')'); - if (node.withinGroup) { - this.append(' within group ('); - this.visitNode(node.withinGroup); - this.append(')'); - } - if (node.filter) { - this.append(' filter('); - this.visitNode(node.filter); - this.append(')'); - } - if (node.over) { - this.append(' '); - this.visitNode(node.over); - } - } - visitOver(node) { - this.append('over('); - if (node.partitionBy) { - this.visitNode(node.partitionBy); - if (node.orderBy) { - this.append(' '); - } - } - if (node.orderBy) { - this.visitNode(node.orderBy); - } - this.append(')'); - } - visitPartitionBy(node) { - this.append('partition by '); - this.compileList(node.items); - } - visitPartitionByItem(node) { - this.visitNode(node.partitionBy); - } - visitBinaryOperation(node) { - this.visitNode(node.leftOperand); - this.append(' '); - this.visitNode(node.operator); - this.append(' '); - this.visitNode(node.rightOperand); - } - visitUnaryOperation(node) { - this.visitNode(node.operator); - if (!this.isMinusOperator(node.operator)) { - this.append(' '); - } - this.visitNode(node.operand); - } - isMinusOperator(node) { - return operator_node_js_1.OperatorNode.is(node) && node.operator === '-'; - } - visitUsing(node) { - this.append('using '); - this.compileList(node.tables); - } - visitFunction(node) { - this.append(node.func); - this.append('('); - this.compileList(node.arguments); - this.append(')'); - } - visitCase(node) { - this.append('case'); - if (node.value) { - this.append(' '); - this.visitNode(node.value); - } - if (node.when) { - this.append(' '); - this.compileList(node.when, ' '); - } - if (node.else) { - this.append(' else '); - this.visitNode(node.else); - } - this.append(' end'); - if (node.isStatement) { - this.append(' case'); - } - } - visitWhen(node) { - this.append('when '); - this.visitNode(node.condition); - if (node.result) { - this.append(' then '); - this.visitNode(node.result); - } - } - visitJSONReference(node) { - this.visitNode(node.reference); - this.visitNode(node.traversal); - } - visitJSONPath(node) { - if (node.inOperator) { - this.visitNode(node.inOperator); - } - this.append("'$"); - for (const pathLeg of node.pathLegs) { - this.visitNode(pathLeg); - } - this.append("'"); - } - visitJSONPathLeg(node) { - const isArrayLocation = node.type === 'ArrayLocation'; - this.append(isArrayLocation ? '[' : '.'); - this.append(typeof node.value === 'string' - ? this.sanitizeStringLiteral(node.value) - : String(node.value)); - if (isArrayLocation) { - this.append(']'); - } - } - visitJSONOperatorChain(node) { - for (let i = 0, len = node.values.length; i < len; i++) { - if (i === len - 1) { - this.visitNode(node.operator); - } - else { - this.append('->'); - } - this.visitNode(node.values[i]); - } - } - visitMergeQuery(node) { - if (node.with) { - this.visitNode(node.with); - this.append(' '); - } - this.append('merge '); - if (node.top) { - this.visitNode(node.top); - this.append(' '); - } - this.append('into '); - this.visitNode(node.into); - if (node.using) { - this.append(' '); - this.visitNode(node.using); - } - if (node.whens) { - this.append(' '); - this.compileList(node.whens, ' '); - } - if (node.returning) { - this.append(' '); - this.visitNode(node.returning); - } - if (node.output) { - this.append(' '); - this.visitNode(node.output); - } - if (node.endModifiers?.length) { - this.append(' '); - this.compileList(node.endModifiers, ' '); - } - } - visitMatched(node) { - if (node.not) { - this.append('not '); - } - this.append('matched'); - if (node.bySource) { - this.append(' by source'); - } - } - visitAddIndex(node) { - this.append('add '); - if (node.unique) { - this.append('unique '); - } - this.append('index '); - this.visitNode(node.name); - if (node.columns) { - this.append(' ('); - this.compileList(node.columns); - this.append(')'); - } - if (node.using) { - this.append(' using '); - this.visitNode(node.using); - } - } - visitCast(node) { - this.append('cast('); - this.visitNode(node.expression); - this.append(' as '); - this.visitNode(node.dataType); - this.append(')'); - } - visitFetch(node) { - this.append('fetch next '); - this.visitNode(node.rowCount); - this.append(` rows ${node.modifier}`); - } - visitOutput(node) { - this.append('output '); - this.compileList(node.selections); - } - visitTop(node) { - this.append(`top(${node.expression})`); - if (node.modifiers) { - this.append(` ${node.modifiers}`); - } - } - visitOrAction(node) { - this.append(node.action); - } - visitCollate(node) { - this.append('collate '); - this.visitNode(node.collation); - } - append(str) { - this.#sql += str; - } - appendValue(parameter) { - this.addParameter(parameter); - this.append(this.getCurrentParameterPlaceholder()); - } - getLeftIdentifierWrapper() { - return '"'; - } - getRightIdentifierWrapper() { - return '"'; - } - getCurrentParameterPlaceholder() { - return '$' + this.numParameters; - } - getLeftExplainOptionsWrapper() { - return '('; - } - getExplainOptionAssignment() { - return ' '; - } - getExplainOptionsDelimiter() { - return ', '; - } - getRightExplainOptionsWrapper() { - return ')'; - } - sanitizeIdentifier(identifier) { - const leftWrap = this.getLeftIdentifierWrapper(); - const rightWrap = this.getRightIdentifierWrapper(); - let sanitized = ''; - for (const c of identifier) { - sanitized += c; - if (c === leftWrap) { - sanitized += leftWrap; - } - else if (c === rightWrap) { - sanitized += rightWrap; - } - } - return sanitized; - } - sanitizeStringLiteral(value) { - return value.replace(LIT_WRAP_REGEX, "''"); - } - addParameter(parameter) { - this.#parameters.push(parameter); - } - appendImmediateValue(value) { - if ((0, object_utils_js_1.isString)(value)) { - this.appendStringLiteral(value); - } - else if ((0, object_utils_js_1.isNumber)(value) || (0, object_utils_js_1.isBoolean)(value) || (0, object_utils_js_1.isBigInt)(value)) { - this.append(value.toString()); - } - else if ((0, object_utils_js_1.isNull)(value)) { - this.append('null'); - } - else if ((0, object_utils_js_1.isDate)(value)) { - this.appendImmediateValue(value.toISOString()); - } - else { - throw new Error(`invalid immediate value ${value}`); - } - } - appendStringLiteral(value) { - this.append("'"); - this.append(this.sanitizeStringLiteral(value)); - this.append("'"); - } - sortSelectModifiers(arr) { - arr.sort((left, right) => left.modifier && right.modifier - ? SELECT_MODIFIER_PRIORITY[left.modifier] - - SELECT_MODIFIER_PRIORITY[right.modifier] - : 1); - return (0, object_utils_js_1.freeze)(arr); - } - compileColumnAlterations(columnAlterations) { - this.compileList(columnAlterations); - } - /** - * controls whether the dialect adds a "type" keyword before a column's new data - * type in an ALTER TABLE statement. - */ - announcesNewColumnDataType() { - return true; - } -} -exports.DefaultQueryCompiler = DefaultQueryCompiler; -const SELECT_MODIFIER_SQL = (0, object_utils_js_1.freeze)({ - ForKeyShare: 'for key share', - ForNoKeyUpdate: 'for no key update', - ForUpdate: 'for update', - ForShare: 'for share', - NoWait: 'nowait', - SkipLocked: 'skip locked', - Distinct: 'distinct', -}); -const SELECT_MODIFIER_PRIORITY = (0, object_utils_js_1.freeze)({ - ForKeyShare: 1, - ForNoKeyUpdate: 1, - ForUpdate: 1, - ForShare: 1, - NoWait: 2, - SkipLocked: 2, - Distinct: 0, -}); -const JOIN_TYPE_SQL = (0, object_utils_js_1.freeze)({ - InnerJoin: 'inner join', - LeftJoin: 'left join', - RightJoin: 'right join', - FullJoin: 'full join', - CrossJoin: 'cross join', - LateralInnerJoin: 'inner join lateral', - LateralLeftJoin: 'left join lateral', - LateralCrossJoin: 'cross join lateral', - OuterApply: 'outer apply', - CrossApply: 'cross apply', - Using: 'using', -}); diff --git a/node_modules/kysely/dist/cjs/query-compiler/query-compiler.d.ts b/node_modules/kysely/dist/cjs/query-compiler/query-compiler.d.ts deleted file mode 100644 index 3e981ee..0000000 --- a/node_modules/kysely/dist/cjs/query-compiler/query-compiler.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { AlterTableNode } from '../operation-node/alter-table-node.js'; -import type { CreateIndexNode } from '../operation-node/create-index-node.js'; -import type { CreateSchemaNode } from '../operation-node/create-schema-node.js'; -import type { CreateTableNode } from '../operation-node/create-table-node.js'; -import type { CreateTypeNode } from '../operation-node/create-type-node.js'; -import type { CreateViewNode } from '../operation-node/create-view-node.js'; -import type { DropIndexNode } from '../operation-node/drop-index-node.js'; -import type { DropSchemaNode } from '../operation-node/drop-schema-node.js'; -import type { DropTableNode } from '../operation-node/drop-table-node.js'; -import type { DropTypeNode } from '../operation-node/drop-type-node.js'; -import type { DropViewNode } from '../operation-node/drop-view-node.js'; -import type { MergeQueryNode } from '../operation-node/merge-query-node.js'; -import type { QueryNode } from '../operation-node/query-node.js'; -import type { RawNode } from '../operation-node/raw-node.js'; -import type { RefreshMaterializedViewNode } from '../operation-node/refresh-materialized-view-node.js'; -import type { QueryId } from '../util/query-id.js'; -import type { CompiledQuery } from './compiled-query.js'; -export type RootOperationNode = QueryNode | CreateTableNode | CreateIndexNode | CreateSchemaNode | CreateViewNode | RefreshMaterializedViewNode | DropTableNode | DropIndexNode | DropSchemaNode | DropViewNode | AlterTableNode | RawNode | CreateTypeNode | DropTypeNode | MergeQueryNode; -/** - * a `QueryCompiler` compiles a query expressed as a tree of `OperationNodes` into SQL. - */ -export interface QueryCompiler { - compileQuery(node: RootOperationNode, queryId: QueryId): CompiledQuery; -} diff --git a/node_modules/kysely/dist/cjs/query-compiler/query-compiler.js b/node_modules/kysely/dist/cjs/query-compiler/query-compiler.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/query-compiler/query-compiler.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/query-creator.d.ts b/node_modules/kysely/dist/cjs/query-creator.d.ts deleted file mode 100644 index dce7197..0000000 --- a/node_modules/kysely/dist/cjs/query-creator.d.ts +++ /dev/null @@ -1,592 +0,0 @@ -import { type SelectQueryBuilder } from './query-builder/select-query-builder.js'; -import { InsertQueryBuilder } from './query-builder/insert-query-builder.js'; -import { type TableExpressionOrList, type SimpleTableReference } from './parser/table-parser.js'; -import type { QueryExecutor } from './query-executor/query-executor.js'; -import { type CommonTableExpression, type QueryCreatorWithCommonTableExpression, type RecursiveCommonTableExpression } from './parser/with-parser.js'; -import { WithNode } from './operation-node/with-node.js'; -import type { InsertResult } from './query-builder/insert-result.js'; -import type { KyselyPlugin } from './plugin/kysely-plugin.js'; -import type { CTEBuilderCallback } from './query-builder/cte-builder.js'; -import { type CallbackSelection, type SelectCallback, type SelectExpression, type Selection } from './parser/select-parser.js'; -import type { SelectFrom } from './parser/select-from-parser.js'; -import type { DeleteFrom } from './parser/delete-from-parser.js'; -import type { UpdateTable } from './parser/update-parser.js'; -import type { MergeInto } from './parser/merge-into-parser.js'; -export declare class QueryCreator { - #private; - constructor(props: QueryCreatorProps); - /** - * Creates a `select` query builder for the given table or tables. - * - * The tables passed to this method are built as the query's `from` clause. - * - * ### Examples - * - * Create a select query for one table: - * - * ```ts - * db.selectFrom('person').selectAll() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - * - * Create a select query for one table with an alias: - * - * ```ts - * const persons = await db.selectFrom('person as p') - * .select(['p.id', 'first_name']) - * .execute() - * - * console.log(persons[0].id) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "p"."id", "first_name" from "person" as "p" - * ``` - * - * Create a select query from a subquery: - * - * ```ts - * const persons = await db.selectFrom( - * (eb) => eb.selectFrom('person').select('person.id as identifier').as('p') - * ) - * .select('p.identifier') - * .execute() - * - * console.log(persons[0].identifier) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "p"."identifier", - * from ( - * select "person"."id" as "identifier" from "person" - * ) as p - * ``` - * - * Create a select query from raw sql: - * - * ```ts - * import { sql } from 'kysely' - * - * const items = await db - * .selectFrom(sql<{ one: number }>`(select 1 as one)`.as('q')) - * .select('q.one') - * .execute() - * - * console.log(items[0].one) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "q"."one", - * from ( - * select 1 as one - * ) as q - * ``` - * - * When you use the `sql` tag you need to also provide the result type of the - * raw snippet / query so that Kysely can figure out what columns are - * available for the rest of the query. - * - * The `selectFrom` method also accepts an array for multiple tables. All - * the above examples can also be used in an array. - * - * ```ts - * import { sql } from 'kysely' - * - * const items = await db.selectFrom([ - * 'person as p', - * db.selectFrom('pet').select('pet.species').as('a'), - * sql<{ one: number }>`(select 1 as one)`.as('q') - * ]) - * .select(['p.id', 'a.species', 'q.one']) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "p".id, "a"."species", "q"."one" - * from - * "person" as "p", - * (select "pet"."species" from "pet") as a, - * (select 1 as one) as "q" - * ``` - */ - selectFrom>(from: TE): SelectFrom; - /** - * Creates a `select` query builder without a `from` clause. - * - * If you want to create a `select from` query, use the `selectFrom` method instead. - * This one can be used to create a plain `select` statement without a `from` clause. - * - * This method accepts the same inputs as {@link SelectQueryBuilder.select}. See its - * documentation for more examples. - * - * ### Examples - * - * ```ts - * const result = await db.selectNoFrom((eb) => [ - * eb.selectFrom('person') - * .select('id') - * .where('first_name', '=', 'Jennifer') - * .limit(1) - * .as('jennifer_id'), - * eb.selectFrom('pet') - * .select('id') - * .where('name', '=', 'Doggo') - * .limit(1) - * .as('doggo_id') - * ]) - * .executeTakeFirstOrThrow() - * - * console.log(result.jennifer_id) - * console.log(result.doggo_id) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select ( - * select "id" - * from "person" - * where "first_name" = $1 - * limit $2 - * ) as "jennifer_id", ( - * select "id" - * from "pet" - * where "name" = $3 - * limit $4 - * ) as "doggo_id" - * ``` - */ - selectNoFrom>(selections: ReadonlyArray): SelectQueryBuilder>; - selectNoFrom>(callback: CB): SelectQueryBuilder>; - selectNoFrom>(selection: SE): SelectQueryBuilder>; - /** - * Creates an insert query. - * - * The return value of this query is an instance of {@link InsertResult}. {@link InsertResult} - * has the {@link InsertResult.insertId | insertId} field that holds the auto incremented id of - * the inserted row if the db returned one. - * - * See the {@link InsertQueryBuilder.values | values} method for more info and examples. Also see - * the {@link ReturningInterface.returning | returning} method for a way to return columns - * on supported databases like PostgreSQL. - * - * ### Examples - * - * ```ts - * const result = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .executeTakeFirst() - * - * console.log(result.insertId) - * ``` - * - * Some databases like PostgreSQL support the `returning` method: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * ``` - */ - insertInto(table: T): InsertQueryBuilder; - /** - * Creates a "replace into" query. - * - * This is only supported by some dialects like MySQL or SQLite. - * - * Similar to MySQL's {@link InsertQueryBuilder.onDuplicateKeyUpdate} that deletes - * and inserts values on collision instead of updating existing rows. - * - * An alias of SQLite's {@link InsertQueryBuilder.orReplace}. - * - * The return value of this query is an instance of {@link InsertResult}. {@link InsertResult} - * has the {@link InsertResult.insertId | insertId} field that holds the auto incremented id of - * the inserted row if the db returned one. - * - * See the {@link InsertQueryBuilder.values | values} method for more info and examples. - * - * ### Examples - * - * ```ts - * const result = await db - * .replaceInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .executeTakeFirstOrThrow() - * - * console.log(result.insertId) - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * replace into `person` (`first_name`, `last_name`) values (?, ?) - * ``` - */ - replaceInto(table: T): InsertQueryBuilder; - /** - * Creates a delete query. - * - * See the {@link DeleteQueryBuilder.where} method for examples on how to specify - * a where clause for the delete operation. - * - * The return value of the query is an instance of {@link DeleteResult}. - * - * ### Examples - * - * - * - * Delete a single row: - * - * ```ts - * const result = await db - * .deleteFrom('person') - * .where('person.id', '=', 1) - * .executeTakeFirst() - * - * console.log(result.numDeletedRows) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * delete from "person" where "person"."id" = $1 - * ``` - * - * Some databases such as MySQL support deleting from multiple tables: - * - * ```ts - * const result = await db - * .deleteFrom(['person', 'pet']) - * .using('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .where('person.id', '=', 1) - * .executeTakeFirst() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * delete from `person`, `pet` - * using `person` - * inner join `pet` on `pet`.`owner_id` = `person`.`id` - * where `person`.`id` = ? - * ``` - */ - deleteFrom>(from: TE): DeleteFrom; - /** - * Creates an update query. - * - * See the {@link UpdateQueryBuilder.where} method for examples on how to specify - * a where clause for the update operation. - * - * See the {@link UpdateQueryBuilder.set} method for examples on how to - * specify the updates. - * - * The return value of the query is an {@link UpdateResult}. - * - * ### Examples - * - * ```ts - * const result = await db - * .updateTable('person') - * .set({ first_name: 'Jennifer' }) - * .where('person.id', '=', 1) - * .executeTakeFirst() - * - * console.log(result.numUpdatedRows) - * ``` - */ - updateTable>(tables: TE): UpdateTable; - /** - * Creates a merge query. - * - * The return value of the query is a {@link MergeResult}. - * - * See the {@link MergeQueryBuilder.using} method for examples on how to specify - * the other table. - * - * ### Examples - * - * - * - * Update a target column based on the existence of a source row: - * - * ```ts - * const result = await db - * .mergeInto('person as target') - * .using('pet as source', 'source.owner_id', 'target.id') - * .whenMatchedAnd('target.has_pets', '!=', 'Y') - * .thenUpdateSet({ has_pets: 'Y' }) - * .whenNotMatchedBySourceAnd('target.has_pets', '=', 'Y') - * .thenUpdateSet({ has_pets: 'N' }) - * .executeTakeFirstOrThrow() - * - * console.log(result.numChangedRows) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" - * on "pet"."owner_id" = "person"."id" - * when matched and "has_pets" != $1 - * then update set "has_pets" = $2 - * when not matched by source and "has_pets" = $3 - * then update set "has_pets" = $4 - * ``` - * - * - * - * Merge new entries from a temporary changes table: - * - * ```ts - * const result = await db - * .mergeInto('wine as target') - * .using( - * 'wine_stock_change as source', - * 'source.wine_name', - * 'target.name', - * ) - * .whenNotMatchedAnd('source.stock_delta', '>', 0) - * .thenInsertValues(({ ref }) => ({ - * name: ref('source.wine_name'), - * stock: ref('source.stock_delta'), - * })) - * .whenMatchedAnd( - * (eb) => eb('target.stock', '+', eb.ref('source.stock_delta')), - * '>', - * 0, - * ) - * .thenUpdateSet('stock', (eb) => - * eb('target.stock', '+', eb.ref('source.stock_delta')), - * ) - * .whenMatched() - * .thenDelete() - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "wine" as "target" - * using "wine_stock_change" as "source" - * on "source"."wine_name" = "target"."name" - * when not matched and "source"."stock_delta" > $1 - * then insert ("name", "stock") values ("source"."wine_name", "source"."stock_delta") - * when matched and "target"."stock" + "source"."stock_delta" > $2 - * then update set "stock" = "target"."stock" + "source"."stock_delta" - * when matched - * then delete - * ``` - */ - mergeInto>(targetTable: TR): MergeInto; - /** - * Creates a `with` query (Common Table Expression). - * - * ### Examples - * - * - * - * Common table expressions (CTE) are a great way to modularize complex queries. - * Essentially they allow you to run multiple separate queries within a - * single roundtrip to the DB. - * - * Since CTEs are a part of the main query, query optimizers inside DB - * engines are able to optimize the overall query. For example, postgres - * is able to inline the CTEs inside the using queries if it decides it's - * faster. - * - * ```ts - * const result = await db - * // Create a CTE called `jennifers` that selects all - * // persons named 'Jennifer'. - * .with('jennifers', (db) => db - * .selectFrom('person') - * .where('first_name', '=', 'Jennifer') - * .select(['id', 'age']) - * ) - * // Select all rows from the `jennifers` CTE and - * // further filter it. - * .with('adult_jennifers', (db) => db - * .selectFrom('jennifers') - * .where('age', '>', 18) - * .select(['id', 'age']) - * ) - * // Finally select all adult jennifers that are - * // also younger than 60. - * .selectFrom('adult_jennifers') - * .where('age', '<', 60) - * .selectAll() - * .execute() - * ``` - * - * - * - * Some databases like postgres also allow you to run other queries than selects - * in CTEs. On these databases CTEs are extremely powerful: - * - * ```ts - * const result = await db - * .with('new_person', (db) => db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * age: 35, - * }) - * .returning('id') - * ) - * .with('new_pet', (db) => db - * .insertInto('pet') - * .values({ - * name: 'Doggo', - * species: 'dog', - * is_favorite: true, - * // Use the id of the person we just inserted. - * owner_id: db - * .selectFrom('new_person') - * .select('id') - * }) - * .returning('id') - * ) - * .selectFrom(['new_person', 'new_pet']) - * .select([ - * 'new_person.id as person_id', - * 'new_pet.id as pet_id' - * ]) - * .execute() - * ``` - * - * The CTE name can optionally specify column names in addition to - * a name. In that case Kysely requires the expression to retun - * rows with the same columns. - * - * ```ts - * await db - * .with('jennifers(id, age)', (db) => db - * .selectFrom('person') - * .where('first_name', '=', 'Jennifer') - * // This is ok since we return columns with the same - * // names as specified by `jennifers(id, age)`. - * .select(['id', 'age']) - * ) - * .selectFrom('jennifers') - * .selectAll() - * .execute() - * ``` - * - * The first argument can also be a callback. The callback is passed - * a `CTEBuilder` instance that can be used to configure the CTE: - * - * ```ts - * await db - * .with( - * (cte) => cte('jennifers').materialized(), - * (db) => db - * .selectFrom('person') - * .where('first_name', '=', 'Jennifer') - * .select(['id', 'age']) - * ) - * .selectFrom('jennifers') - * .selectAll() - * .execute() - * ``` - */ - with>(nameOrBuilder: N | CTEBuilderCallback, expression: E): QueryCreatorWithCommonTableExpression; - /** - * Creates a recursive `with` query (Common Table Expression). - * - * Note that recursiveness is a property of the whole `with` statement. - * You cannot have recursive and non-recursive CTEs in a same `with` statement. - * Therefore the recursiveness is determined by the **first** `with` or - * `withRecusive` call you make. - * - * See the {@link with} method for examples and more documentation. - */ - withRecursive>(nameOrBuilder: N | CTEBuilderCallback, expression: E): QueryCreatorWithCommonTableExpression; - /** - * Returns a copy of this query creator instance with the given plugin installed. - */ - withPlugin(plugin: KyselyPlugin): QueryCreator; - /** - * Returns a copy of this query creator instance without any plugins. - */ - withoutPlugins(): QueryCreator; - /** - * Sets the schema to be used for all table references that don't explicitly - * specify a schema. - * - * This only affects the query created through the builder returned from - * this method and doesn't modify the `db` instance. - * - * See [this recipe](https://github.com/kysely-org/kysely/blob/master/site/docs/recipes/0007-schemas.md) - * for a more detailed explanation. - * - * ### Examples - * - * ``` - * await db - * .withSchema('mammals') - * .selectFrom('pet') - * .selectAll() - * .innerJoin('public.person', 'public.person.id', 'pet.owner_id') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "mammals"."pet" - * inner join "public"."person" - * on "public"."person"."id" = "mammals"."pet"."owner_id" - * ``` - * - * `withSchema` is smart enough to not add schema for aliases, - * common table expressions or other places where the schema - * doesn't belong to: - * - * ``` - * await db - * .withSchema('mammals') - * .selectFrom('pet as p') - * .select('p.name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "p"."name" from "mammals"."pet" as "p" - * ``` - */ - withSchema(schema: string): QueryCreator; -} -export interface QueryCreatorProps { - readonly executor: QueryExecutor; - readonly withNode?: WithNode; -} diff --git a/node_modules/kysely/dist/cjs/query-creator.js b/node_modules/kysely/dist/cjs/query-creator.js deleted file mode 100644 index 1eda7e3..0000000 --- a/node_modules/kysely/dist/cjs/query-creator.js +++ /dev/null @@ -1,622 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.QueryCreator = void 0; -const select_query_builder_js_1 = require("./query-builder/select-query-builder.js"); -const insert_query_builder_js_1 = require("./query-builder/insert-query-builder.js"); -const delete_query_builder_js_1 = require("./query-builder/delete-query-builder.js"); -const update_query_builder_js_1 = require("./query-builder/update-query-builder.js"); -const delete_query_node_js_1 = require("./operation-node/delete-query-node.js"); -const insert_query_node_js_1 = require("./operation-node/insert-query-node.js"); -const select_query_node_js_1 = require("./operation-node/select-query-node.js"); -const update_query_node_js_1 = require("./operation-node/update-query-node.js"); -const table_parser_js_1 = require("./parser/table-parser.js"); -const with_parser_js_1 = require("./parser/with-parser.js"); -const with_node_js_1 = require("./operation-node/with-node.js"); -const query_id_js_1 = require("./util/query-id.js"); -const with_schema_plugin_js_1 = require("./plugin/with-schema/with-schema-plugin.js"); -const object_utils_js_1 = require("./util/object-utils.js"); -const select_parser_js_1 = require("./parser/select-parser.js"); -const merge_query_builder_js_1 = require("./query-builder/merge-query-builder.js"); -const merge_query_node_js_1 = require("./operation-node/merge-query-node.js"); -class QueryCreator { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - /** - * Creates a `select` query builder for the given table or tables. - * - * The tables passed to this method are built as the query's `from` clause. - * - * ### Examples - * - * Create a select query for one table: - * - * ```ts - * db.selectFrom('person').selectAll() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - * - * Create a select query for one table with an alias: - * - * ```ts - * const persons = await db.selectFrom('person as p') - * .select(['p.id', 'first_name']) - * .execute() - * - * console.log(persons[0].id) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "p"."id", "first_name" from "person" as "p" - * ``` - * - * Create a select query from a subquery: - * - * ```ts - * const persons = await db.selectFrom( - * (eb) => eb.selectFrom('person').select('person.id as identifier').as('p') - * ) - * .select('p.identifier') - * .execute() - * - * console.log(persons[0].identifier) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "p"."identifier", - * from ( - * select "person"."id" as "identifier" from "person" - * ) as p - * ``` - * - * Create a select query from raw sql: - * - * ```ts - * import { sql } from 'kysely' - * - * const items = await db - * .selectFrom(sql<{ one: number }>`(select 1 as one)`.as('q')) - * .select('q.one') - * .execute() - * - * console.log(items[0].one) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "q"."one", - * from ( - * select 1 as one - * ) as q - * ``` - * - * When you use the `sql` tag you need to also provide the result type of the - * raw snippet / query so that Kysely can figure out what columns are - * available for the rest of the query. - * - * The `selectFrom` method also accepts an array for multiple tables. All - * the above examples can also be used in an array. - * - * ```ts - * import { sql } from 'kysely' - * - * const items = await db.selectFrom([ - * 'person as p', - * db.selectFrom('pet').select('pet.species').as('a'), - * sql<{ one: number }>`(select 1 as one)`.as('q') - * ]) - * .select(['p.id', 'a.species', 'q.one']) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "p".id, "a"."species", "q"."one" - * from - * "person" as "p", - * (select "pet"."species" from "pet") as a, - * (select 1 as one) as "q" - * ``` - */ - selectFrom(from) { - return (0, select_query_builder_js_1.createSelectQueryBuilder)({ - queryId: (0, query_id_js_1.createQueryId)(), - executor: this.#props.executor, - queryNode: select_query_node_js_1.SelectQueryNode.createFrom((0, table_parser_js_1.parseTableExpressionOrList)(from), this.#props.withNode), - }); - } - selectNoFrom(selection) { - return (0, select_query_builder_js_1.createSelectQueryBuilder)({ - queryId: (0, query_id_js_1.createQueryId)(), - executor: this.#props.executor, - queryNode: select_query_node_js_1.SelectQueryNode.cloneWithSelections(select_query_node_js_1.SelectQueryNode.create(this.#props.withNode), (0, select_parser_js_1.parseSelectArg)(selection)), - }); - } - /** - * Creates an insert query. - * - * The return value of this query is an instance of {@link InsertResult}. {@link InsertResult} - * has the {@link InsertResult.insertId | insertId} field that holds the auto incremented id of - * the inserted row if the db returned one. - * - * See the {@link InsertQueryBuilder.values | values} method for more info and examples. Also see - * the {@link ReturningInterface.returning | returning} method for a way to return columns - * on supported databases like PostgreSQL. - * - * ### Examples - * - * ```ts - * const result = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .executeTakeFirst() - * - * console.log(result.insertId) - * ``` - * - * Some databases like PostgreSQL support the `returning` method: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * ``` - */ - insertInto(table) { - return new insert_query_builder_js_1.InsertQueryBuilder({ - queryId: (0, query_id_js_1.createQueryId)(), - executor: this.#props.executor, - queryNode: insert_query_node_js_1.InsertQueryNode.create((0, table_parser_js_1.parseTable)(table), this.#props.withNode), - }); - } - /** - * Creates a "replace into" query. - * - * This is only supported by some dialects like MySQL or SQLite. - * - * Similar to MySQL's {@link InsertQueryBuilder.onDuplicateKeyUpdate} that deletes - * and inserts values on collision instead of updating existing rows. - * - * An alias of SQLite's {@link InsertQueryBuilder.orReplace}. - * - * The return value of this query is an instance of {@link InsertResult}. {@link InsertResult} - * has the {@link InsertResult.insertId | insertId} field that holds the auto incremented id of - * the inserted row if the db returned one. - * - * See the {@link InsertQueryBuilder.values | values} method for more info and examples. - * - * ### Examples - * - * ```ts - * const result = await db - * .replaceInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .executeTakeFirstOrThrow() - * - * console.log(result.insertId) - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * replace into `person` (`first_name`, `last_name`) values (?, ?) - * ``` - */ - replaceInto(table) { - return new insert_query_builder_js_1.InsertQueryBuilder({ - queryId: (0, query_id_js_1.createQueryId)(), - executor: this.#props.executor, - queryNode: insert_query_node_js_1.InsertQueryNode.create((0, table_parser_js_1.parseTable)(table), this.#props.withNode, true), - }); - } - /** - * Creates a delete query. - * - * See the {@link DeleteQueryBuilder.where} method for examples on how to specify - * a where clause for the delete operation. - * - * The return value of the query is an instance of {@link DeleteResult}. - * - * ### Examples - * - * - * - * Delete a single row: - * - * ```ts - * const result = await db - * .deleteFrom('person') - * .where('person.id', '=', 1) - * .executeTakeFirst() - * - * console.log(result.numDeletedRows) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * delete from "person" where "person"."id" = $1 - * ``` - * - * Some databases such as MySQL support deleting from multiple tables: - * - * ```ts - * const result = await db - * .deleteFrom(['person', 'pet']) - * .using('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .where('person.id', '=', 1) - * .executeTakeFirst() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * delete from `person`, `pet` - * using `person` - * inner join `pet` on `pet`.`owner_id` = `person`.`id` - * where `person`.`id` = ? - * ``` - */ - deleteFrom(from) { - return new delete_query_builder_js_1.DeleteQueryBuilder({ - queryId: (0, query_id_js_1.createQueryId)(), - executor: this.#props.executor, - queryNode: delete_query_node_js_1.DeleteQueryNode.create((0, table_parser_js_1.parseTableExpressionOrList)(from), this.#props.withNode), - }); - } - /** - * Creates an update query. - * - * See the {@link UpdateQueryBuilder.where} method for examples on how to specify - * a where clause for the update operation. - * - * See the {@link UpdateQueryBuilder.set} method for examples on how to - * specify the updates. - * - * The return value of the query is an {@link UpdateResult}. - * - * ### Examples - * - * ```ts - * const result = await db - * .updateTable('person') - * .set({ first_name: 'Jennifer' }) - * .where('person.id', '=', 1) - * .executeTakeFirst() - * - * console.log(result.numUpdatedRows) - * ``` - */ - updateTable(tables) { - return new update_query_builder_js_1.UpdateQueryBuilder({ - queryId: (0, query_id_js_1.createQueryId)(), - executor: this.#props.executor, - queryNode: update_query_node_js_1.UpdateQueryNode.create((0, table_parser_js_1.parseTableExpressionOrList)(tables), this.#props.withNode), - }); - } - /** - * Creates a merge query. - * - * The return value of the query is a {@link MergeResult}. - * - * See the {@link MergeQueryBuilder.using} method for examples on how to specify - * the other table. - * - * ### Examples - * - * - * - * Update a target column based on the existence of a source row: - * - * ```ts - * const result = await db - * .mergeInto('person as target') - * .using('pet as source', 'source.owner_id', 'target.id') - * .whenMatchedAnd('target.has_pets', '!=', 'Y') - * .thenUpdateSet({ has_pets: 'Y' }) - * .whenNotMatchedBySourceAnd('target.has_pets', '=', 'Y') - * .thenUpdateSet({ has_pets: 'N' }) - * .executeTakeFirstOrThrow() - * - * console.log(result.numChangedRows) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" - * on "pet"."owner_id" = "person"."id" - * when matched and "has_pets" != $1 - * then update set "has_pets" = $2 - * when not matched by source and "has_pets" = $3 - * then update set "has_pets" = $4 - * ``` - * - * - * - * Merge new entries from a temporary changes table: - * - * ```ts - * const result = await db - * .mergeInto('wine as target') - * .using( - * 'wine_stock_change as source', - * 'source.wine_name', - * 'target.name', - * ) - * .whenNotMatchedAnd('source.stock_delta', '>', 0) - * .thenInsertValues(({ ref }) => ({ - * name: ref('source.wine_name'), - * stock: ref('source.stock_delta'), - * })) - * .whenMatchedAnd( - * (eb) => eb('target.stock', '+', eb.ref('source.stock_delta')), - * '>', - * 0, - * ) - * .thenUpdateSet('stock', (eb) => - * eb('target.stock', '+', eb.ref('source.stock_delta')), - * ) - * .whenMatched() - * .thenDelete() - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "wine" as "target" - * using "wine_stock_change" as "source" - * on "source"."wine_name" = "target"."name" - * when not matched and "source"."stock_delta" > $1 - * then insert ("name", "stock") values ("source"."wine_name", "source"."stock_delta") - * when matched and "target"."stock" + "source"."stock_delta" > $2 - * then update set "stock" = "target"."stock" + "source"."stock_delta" - * when matched - * then delete - * ``` - */ - mergeInto(targetTable) { - return new merge_query_builder_js_1.MergeQueryBuilder({ - queryId: (0, query_id_js_1.createQueryId)(), - executor: this.#props.executor, - queryNode: merge_query_node_js_1.MergeQueryNode.create((0, table_parser_js_1.parseAliasedTable)(targetTable), this.#props.withNode), - }); - } - /** - * Creates a `with` query (Common Table Expression). - * - * ### Examples - * - * - * - * Common table expressions (CTE) are a great way to modularize complex queries. - * Essentially they allow you to run multiple separate queries within a - * single roundtrip to the DB. - * - * Since CTEs are a part of the main query, query optimizers inside DB - * engines are able to optimize the overall query. For example, postgres - * is able to inline the CTEs inside the using queries if it decides it's - * faster. - * - * ```ts - * const result = await db - * // Create a CTE called `jennifers` that selects all - * // persons named 'Jennifer'. - * .with('jennifers', (db) => db - * .selectFrom('person') - * .where('first_name', '=', 'Jennifer') - * .select(['id', 'age']) - * ) - * // Select all rows from the `jennifers` CTE and - * // further filter it. - * .with('adult_jennifers', (db) => db - * .selectFrom('jennifers') - * .where('age', '>', 18) - * .select(['id', 'age']) - * ) - * // Finally select all adult jennifers that are - * // also younger than 60. - * .selectFrom('adult_jennifers') - * .where('age', '<', 60) - * .selectAll() - * .execute() - * ``` - * - * - * - * Some databases like postgres also allow you to run other queries than selects - * in CTEs. On these databases CTEs are extremely powerful: - * - * ```ts - * const result = await db - * .with('new_person', (db) => db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * age: 35, - * }) - * .returning('id') - * ) - * .with('new_pet', (db) => db - * .insertInto('pet') - * .values({ - * name: 'Doggo', - * species: 'dog', - * is_favorite: true, - * // Use the id of the person we just inserted. - * owner_id: db - * .selectFrom('new_person') - * .select('id') - * }) - * .returning('id') - * ) - * .selectFrom(['new_person', 'new_pet']) - * .select([ - * 'new_person.id as person_id', - * 'new_pet.id as pet_id' - * ]) - * .execute() - * ``` - * - * The CTE name can optionally specify column names in addition to - * a name. In that case Kysely requires the expression to retun - * rows with the same columns. - * - * ```ts - * await db - * .with('jennifers(id, age)', (db) => db - * .selectFrom('person') - * .where('first_name', '=', 'Jennifer') - * // This is ok since we return columns with the same - * // names as specified by `jennifers(id, age)`. - * .select(['id', 'age']) - * ) - * .selectFrom('jennifers') - * .selectAll() - * .execute() - * ``` - * - * The first argument can also be a callback. The callback is passed - * a `CTEBuilder` instance that can be used to configure the CTE: - * - * ```ts - * await db - * .with( - * (cte) => cte('jennifers').materialized(), - * (db) => db - * .selectFrom('person') - * .where('first_name', '=', 'Jennifer') - * .select(['id', 'age']) - * ) - * .selectFrom('jennifers') - * .selectAll() - * .execute() - * ``` - */ - with(nameOrBuilder, expression) { - const cte = (0, with_parser_js_1.parseCommonTableExpression)(nameOrBuilder, expression); - return new QueryCreator({ - ...this.#props, - withNode: this.#props.withNode - ? with_node_js_1.WithNode.cloneWithExpression(this.#props.withNode, cte) - : with_node_js_1.WithNode.create(cte), - }); - } - /** - * Creates a recursive `with` query (Common Table Expression). - * - * Note that recursiveness is a property of the whole `with` statement. - * You cannot have recursive and non-recursive CTEs in a same `with` statement. - * Therefore the recursiveness is determined by the **first** `with` or - * `withRecusive` call you make. - * - * See the {@link with} method for examples and more documentation. - */ - withRecursive(nameOrBuilder, expression) { - const cte = (0, with_parser_js_1.parseCommonTableExpression)(nameOrBuilder, expression); - return new QueryCreator({ - ...this.#props, - withNode: this.#props.withNode - ? with_node_js_1.WithNode.cloneWithExpression(this.#props.withNode, cte) - : with_node_js_1.WithNode.create(cte, { recursive: true }), - }); - } - /** - * Returns a copy of this query creator instance with the given plugin installed. - */ - withPlugin(plugin) { - return new QueryCreator({ - ...this.#props, - executor: this.#props.executor.withPlugin(plugin), - }); - } - /** - * Returns a copy of this query creator instance without any plugins. - */ - withoutPlugins() { - return new QueryCreator({ - ...this.#props, - executor: this.#props.executor.withoutPlugins(), - }); - } - /** - * Sets the schema to be used for all table references that don't explicitly - * specify a schema. - * - * This only affects the query created through the builder returned from - * this method and doesn't modify the `db` instance. - * - * See [this recipe](https://github.com/kysely-org/kysely/blob/master/site/docs/recipes/0007-schemas.md) - * for a more detailed explanation. - * - * ### Examples - * - * ``` - * await db - * .withSchema('mammals') - * .selectFrom('pet') - * .selectAll() - * .innerJoin('public.person', 'public.person.id', 'pet.owner_id') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "mammals"."pet" - * inner join "public"."person" - * on "public"."person"."id" = "mammals"."pet"."owner_id" - * ``` - * - * `withSchema` is smart enough to not add schema for aliases, - * common table expressions or other places where the schema - * doesn't belong to: - * - * ``` - * await db - * .withSchema('mammals') - * .selectFrom('pet as p') - * .select('p.name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "p"."name" from "mammals"."pet" as "p" - * ``` - */ - withSchema(schema) { - return new QueryCreator({ - ...this.#props, - executor: this.#props.executor.withPluginAtFront(new with_schema_plugin_js_1.WithSchemaPlugin(schema)), - }); - } -} -exports.QueryCreator = QueryCreator; diff --git a/node_modules/kysely/dist/cjs/query-executor/default-query-executor.d.ts b/node_modules/kysely/dist/cjs/query-executor/default-query-executor.d.ts deleted file mode 100644 index 5a224e7..0000000 --- a/node_modules/kysely/dist/cjs/query-executor/default-query-executor.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -import type { ConnectionProvider } from '../driver/connection-provider.js'; -import type { DatabaseConnection } from '../driver/database-connection.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { RootOperationNode, QueryCompiler } from '../query-compiler/query-compiler.js'; -import type { KyselyPlugin } from '../plugin/kysely-plugin.js'; -import { QueryExecutorBase } from './query-executor-base.js'; -import type { DialectAdapter } from '../dialect/dialect-adapter.js'; -import type { QueryId } from '../util/query-id.js'; -export declare class DefaultQueryExecutor extends QueryExecutorBase { - #private; - constructor(compiler: QueryCompiler, adapter: DialectAdapter, connectionProvider: ConnectionProvider, plugins?: KyselyPlugin[]); - /** - * Returns the adapter for the current dialect. - */ - get adapter(): DialectAdapter; - /** - * Compiles the transformed query into SQL. You usually want to pass - * the output of {@link transformQuery} into this method but you can - * compile any query using this method. - */ - compileQuery(node: RootOperationNode, queryId: QueryId): CompiledQuery; - /** - * Provides a connection for the callback and takes care of disposing - * the connection after the callback has been run. - */ - provideConnection(consumer: (connection: DatabaseConnection) => Promise): Promise; - /** - * Returns a copy of this executor with a list of plugins added - * as the last plugins. - */ - withPlugins(plugins: ReadonlyArray): DefaultQueryExecutor; - /** - * Returns a copy of this executor with a plugin added as the - * last plugin. - */ - withPlugin(plugin: KyselyPlugin): DefaultQueryExecutor; - /** - * Returns a copy of this executor with a plugin added as the - * first plugin. - */ - withPluginAtFront(plugin: KyselyPlugin): DefaultQueryExecutor; - /** - * Returns a copy of this executor with a new connection provider. - */ - withConnectionProvider(connectionProvider: ConnectionProvider): DefaultQueryExecutor; - /** - * Returns a copy of this executor without any plugins. - */ - withoutPlugins(): DefaultQueryExecutor; -} diff --git a/node_modules/kysely/dist/cjs/query-executor/default-query-executor.js b/node_modules/kysely/dist/cjs/query-executor/default-query-executor.js deleted file mode 100644 index 1464cfc..0000000 --- a/node_modules/kysely/dist/cjs/query-executor/default-query-executor.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DefaultQueryExecutor = void 0; -const query_executor_base_js_1 = require("./query-executor-base.js"); -class DefaultQueryExecutor extends query_executor_base_js_1.QueryExecutorBase { - #compiler; - #adapter; - #connectionProvider; - constructor(compiler, adapter, connectionProvider, plugins = []) { - super(plugins); - this.#compiler = compiler; - this.#adapter = adapter; - this.#connectionProvider = connectionProvider; - } - get adapter() { - return this.#adapter; - } - compileQuery(node, queryId) { - return this.#compiler.compileQuery(node, queryId); - } - provideConnection(consumer) { - return this.#connectionProvider.provideConnection(consumer); - } - withPlugins(plugins) { - return new DefaultQueryExecutor(this.#compiler, this.#adapter, this.#connectionProvider, [...this.plugins, ...plugins]); - } - withPlugin(plugin) { - return new DefaultQueryExecutor(this.#compiler, this.#adapter, this.#connectionProvider, [...this.plugins, plugin]); - } - withPluginAtFront(plugin) { - return new DefaultQueryExecutor(this.#compiler, this.#adapter, this.#connectionProvider, [plugin, ...this.plugins]); - } - withConnectionProvider(connectionProvider) { - return new DefaultQueryExecutor(this.#compiler, this.#adapter, connectionProvider, [...this.plugins]); - } - withoutPlugins() { - return new DefaultQueryExecutor(this.#compiler, this.#adapter, this.#connectionProvider, []); - } -} -exports.DefaultQueryExecutor = DefaultQueryExecutor; diff --git a/node_modules/kysely/dist/cjs/query-executor/noop-query-executor.d.ts b/node_modules/kysely/dist/cjs/query-executor/noop-query-executor.d.ts deleted file mode 100644 index d9dde83..0000000 --- a/node_modules/kysely/dist/cjs/query-executor/noop-query-executor.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { KyselyPlugin } from '../plugin/kysely-plugin.js'; -import type { DialectAdapter } from '../dialect/dialect-adapter.js'; -import { QueryExecutorBase } from './query-executor-base.js'; -/** - * A {@link QueryExecutor} subclass that can be used when you don't - * have a {@link QueryCompiler}, {@link ConnectionProvider} or any - * other needed things to actually execute queries. - */ -export declare class NoopQueryExecutor extends QueryExecutorBase { - /** - * Returns the adapter for the current dialect. - */ - get adapter(): DialectAdapter; - /** - * Compiles the transformed query into SQL. You usually want to pass - * the output of {@link transformQuery} into this method but you can - * compile any query using this method. - */ - compileQuery(): CompiledQuery; - /** - * Provides a connection for the callback and takes care of disposing - * the connection after the callback has been run. - */ - provideConnection(): Promise; - /** - * Returns a copy of this executor with a new connection provider. - */ - withConnectionProvider(): NoopQueryExecutor; - /** - * Returns a copy of this executor with a plugin added as the - * last plugin. - */ - withPlugin(plugin: KyselyPlugin): NoopQueryExecutor; - /** - * Returns a copy of this executor with a list of plugins added - * as the last plugins. - */ - withPlugins(plugins: ReadonlyArray): NoopQueryExecutor; - /** - * Returns a copy of this executor with a plugin added as the - * first plugin. - */ - withPluginAtFront(plugin: KyselyPlugin): NoopQueryExecutor; - /** - * Returns a copy of this executor without any plugins. - */ - withoutPlugins(): NoopQueryExecutor; -} -export declare const NOOP_QUERY_EXECUTOR: NoopQueryExecutor; diff --git a/node_modules/kysely/dist/cjs/query-executor/noop-query-executor.js b/node_modules/kysely/dist/cjs/query-executor/noop-query-executor.js deleted file mode 100644 index 1f98cb1..0000000 --- a/node_modules/kysely/dist/cjs/query-executor/noop-query-executor.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NOOP_QUERY_EXECUTOR = exports.NoopQueryExecutor = void 0; -const query_executor_base_js_1 = require("./query-executor-base.js"); -/** - * A {@link QueryExecutor} subclass that can be used when you don't - * have a {@link QueryCompiler}, {@link ConnectionProvider} or any - * other needed things to actually execute queries. - */ -class NoopQueryExecutor extends query_executor_base_js_1.QueryExecutorBase { - get adapter() { - throw new Error('this query cannot be compiled to SQL'); - } - compileQuery() { - throw new Error('this query cannot be compiled to SQL'); - } - provideConnection() { - throw new Error('this query cannot be executed'); - } - withConnectionProvider() { - throw new Error('this query cannot have a connection provider'); - } - withPlugin(plugin) { - return new NoopQueryExecutor([...this.plugins, plugin]); - } - withPlugins(plugins) { - return new NoopQueryExecutor([...this.plugins, ...plugins]); - } - withPluginAtFront(plugin) { - return new NoopQueryExecutor([plugin, ...this.plugins]); - } - withoutPlugins() { - return new NoopQueryExecutor([]); - } -} -exports.NoopQueryExecutor = NoopQueryExecutor; -exports.NOOP_QUERY_EXECUTOR = new NoopQueryExecutor(); diff --git a/node_modules/kysely/dist/cjs/query-executor/query-executor-base.d.ts b/node_modules/kysely/dist/cjs/query-executor/query-executor-base.d.ts deleted file mode 100644 index fe84c89..0000000 --- a/node_modules/kysely/dist/cjs/query-executor/query-executor-base.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -import type { ConnectionProvider } from '../driver/connection-provider.js'; -import type { DatabaseConnection, QueryResult } from '../driver/database-connection.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { RootOperationNode } from '../query-compiler/query-compiler.js'; -import type { KyselyPlugin } from '../plugin/kysely-plugin.js'; -import type { QueryId } from '../util/query-id.js'; -import type { DialectAdapter } from '../dialect/dialect-adapter.js'; -import type { QueryExecutor } from './query-executor.js'; -export declare abstract class QueryExecutorBase implements QueryExecutor { - #private; - constructor(plugins?: ReadonlyArray); - abstract get adapter(): DialectAdapter; - /** - * Returns all installed plugins. - */ - get plugins(): ReadonlyArray; - /** - * Given the query the user has built (expressed as an operation node tree) - * this method runs it through all plugins' `transformQuery` methods and - * returns the result. - */ - transformQuery(node: T, queryId: QueryId): T; - /** - * Compiles the transformed query into SQL. You usually want to pass - * the output of {@link transformQuery} into this method but you can - * compile any query using this method. - */ - abstract compileQuery(node: RootOperationNode, queryId: QueryId): CompiledQuery; - /** - * Provides a connection for the callback and takes care of disposing - * the connection after the callback has been run. - */ - abstract provideConnection(consumer: (connection: DatabaseConnection) => Promise): Promise; - /** - * Executes a compiled query and runs the result through all plugins' - * `transformResult` method. - */ - executeQuery(compiledQuery: CompiledQuery): Promise>; - /** - * Executes a compiled query and runs the result through all plugins' - * `transformResult` method. Results are streamead instead of loaded - * at once. - */ - stream(compiledQuery: CompiledQuery, chunkSize: number): AsyncIterableIterator>; - /** - * Returns a copy of this executor with a new connection provider. - */ - abstract withConnectionProvider(connectionProvider: ConnectionProvider): QueryExecutorBase; - /** - * Returns a copy of this executor with a plugin added as the - * last plugin. - */ - abstract withPlugin(plugin: KyselyPlugin): QueryExecutorBase; - /** - * Returns a copy of this executor with a list of plugins added - * as the last plugins. - */ - abstract withPlugins(plugin: ReadonlyArray): QueryExecutorBase; - /** - * Returns a copy of this executor with a plugin added as the - * first plugin. - */ - abstract withPluginAtFront(plugin: KyselyPlugin): QueryExecutorBase; - /** - * Returns a copy of this executor without any plugins. - */ - abstract withoutPlugins(): QueryExecutorBase; -} diff --git a/node_modules/kysely/dist/cjs/query-executor/query-executor-base.js b/node_modules/kysely/dist/cjs/query-executor/query-executor-base.js deleted file mode 100644 index f6a643d..0000000 --- a/node_modules/kysely/dist/cjs/query-executor/query-executor-base.js +++ /dev/null @@ -1,62 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.QueryExecutorBase = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const provide_controlled_connection_js_1 = require("../util/provide-controlled-connection.js"); -const log_once_js_1 = require("../util/log-once.js"); -const NO_PLUGINS = (0, object_utils_js_1.freeze)([]); -class QueryExecutorBase { - #plugins; - constructor(plugins = NO_PLUGINS) { - this.#plugins = plugins; - } - get plugins() { - return this.#plugins; - } - transformQuery(node, queryId) { - for (const plugin of this.#plugins) { - const transformedNode = plugin.transformQuery({ node, queryId }); - // We need to do a runtime check here. There is no good way - // to write types that enforce this constraint. - if (transformedNode.kind === node.kind) { - node = transformedNode; - } - else { - throw new Error([ - `KyselyPlugin.transformQuery must return a node`, - `of the same kind that was given to it.`, - `The plugin was given a ${node.kind}`, - `but it returned a ${transformedNode.kind}`, - ].join(' ')); - } - } - return node; - } - async executeQuery(compiledQuery) { - return await this.provideConnection(async (connection) => { - const result = await connection.executeQuery(compiledQuery); - if ('numUpdatedOrDeletedRows' in result) { - (0, log_once_js_1.logOnce)('kysely:warning: outdated driver/plugin detected! `QueryResult.numUpdatedOrDeletedRows` has been replaced with `QueryResult.numAffectedRows`.'); - } - return await this.#transformResult(result, compiledQuery.queryId); - }); - } - async *stream(compiledQuery, chunkSize) { - const { connection, release } = await (0, provide_controlled_connection_js_1.provideControlledConnection)(this); - try { - for await (const result of connection.streamQuery(compiledQuery, chunkSize)) { - yield await this.#transformResult(result, compiledQuery.queryId); - } - } - finally { - release(); - } - } - async #transformResult(result, queryId) { - for (const plugin of this.#plugins) { - result = await plugin.transformResult({ result, queryId }); - } - return result; - } -} -exports.QueryExecutorBase = QueryExecutorBase; diff --git a/node_modules/kysely/dist/cjs/query-executor/query-executor-provider.d.ts b/node_modules/kysely/dist/cjs/query-executor/query-executor-provider.d.ts deleted file mode 100644 index b3a2566..0000000 --- a/node_modules/kysely/dist/cjs/query-executor/query-executor-provider.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { QueryExecutor } from './query-executor.js'; -/** - * @internal - * @private - */ -export interface QueryExecutorProvider { - getExecutor(): QueryExecutor; -} diff --git a/node_modules/kysely/dist/cjs/query-executor/query-executor-provider.js b/node_modules/kysely/dist/cjs/query-executor/query-executor-provider.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/query-executor/query-executor-provider.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/query-executor/query-executor.d.ts b/node_modules/kysely/dist/cjs/query-executor/query-executor.d.ts deleted file mode 100644 index 2ddce73..0000000 --- a/node_modules/kysely/dist/cjs/query-executor/query-executor.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -import type { ConnectionProvider } from '../driver/connection-provider.js'; -import type { QueryResult } from '../driver/database-connection.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { RootOperationNode } from '../query-compiler/query-compiler.js'; -import type { KyselyPlugin } from '../plugin/kysely-plugin.js'; -import type { QueryId } from '../util/query-id.js'; -import type { DialectAdapter } from '../dialect/dialect-adapter.js'; -/** - * This interface abstracts away the details of how to compile a query into SQL - * and execute it. Instead of passing around all those details, {@link SelectQueryBuilder} - * and other classes that execute queries can just pass around and instance of - * `QueryExecutor`. - */ -export interface QueryExecutor extends ConnectionProvider { - /** - * Returns the adapter for the current dialect. - */ - get adapter(): DialectAdapter; - /** - * Returns all installed plugins. - */ - get plugins(): ReadonlyArray; - /** - * Given the query the user has built (expressed as an operation node tree) - * this method runs it through all plugins' `transformQuery` methods and - * returns the result. - */ - transformQuery(node: T, queryId: QueryId): T; - /** - * Compiles the transformed query into SQL. You usually want to pass - * the output of {@link transformQuery} into this method but you can - * compile any query using this method. - */ - compileQuery(node: RootOperationNode, queryId: QueryId): CompiledQuery; - /** - * Executes a compiled query and runs the result through all plugins' - * `transformResult` method. - */ - executeQuery(compiledQuery: CompiledQuery): Promise>; - /** - * Executes a compiled query and runs the result through all plugins' - * `transformResult` method. Results are streamead instead of loaded - * at once. - */ - stream(compiledQuery: CompiledQuery, - /** - * How many rows should be pulled from the database at once. Supported - * only by the postgres driver. - */ - chunkSize: number): AsyncIterableIterator>; - /** - * Returns a copy of this executor with a new connection provider. - */ - withConnectionProvider(connectionProvider: ConnectionProvider): QueryExecutor; - /** - * Returns a copy of this executor with a plugin added as the - * last plugin. - */ - withPlugin(plugin: KyselyPlugin): QueryExecutor; - /** - * Returns a copy of this executor with a list of plugins added - * as the last plugins. - */ - withPlugins(plugin: ReadonlyArray): QueryExecutor; - /** - * Returns a copy of this executor with a plugin added as the - * first plugin. - */ - withPluginAtFront(plugin: KyselyPlugin): QueryExecutor; - /** - * Returns a copy of this executor without any plugins. - */ - withoutPlugins(): QueryExecutor; -} diff --git a/node_modules/kysely/dist/cjs/query-executor/query-executor.js b/node_modules/kysely/dist/cjs/query-executor/query-executor.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/query-executor/query-executor.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/raw-builder/raw-builder.d.ts b/node_modules/kysely/dist/cjs/raw-builder/raw-builder.d.ts deleted file mode 100644 index 5d6920a..0000000 --- a/node_modules/kysely/dist/cjs/raw-builder/raw-builder.d.ts +++ /dev/null @@ -1,218 +0,0 @@ -import type { QueryResult } from '../driver/database-connection.js'; -import type { RawNode } from '../operation-node/raw-node.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { KyselyPlugin } from '../plugin/kysely-plugin.js'; -import type { QueryExecutorProvider } from '../query-executor/query-executor-provider.js'; -import type { QueryId } from '../util/query-id.js'; -import type { AliasableExpression, AliasedExpression, Expression } from '../expression/expression.js'; -/** - * An instance of this class can be used to create raw SQL snippets or queries. - * - * You shouldn't need to create `RawBuilder` instances directly. Instead you should - * use the {@link sql} template tag. - */ -export interface RawBuilder extends AliasableExpression { - get isRawBuilder(): true; - /** - * Returns an aliased version of the SQL expression. - * - * In addition to slapping `as "the_alias"` to the end of the SQL, - * this method also provides strict typing: - * - * ```ts - * import { sql } from 'kysely' - * - * const result = await db - * .selectFrom('person') - * .select( - * sql`concat(first_name, ' ', last_name)`.as('full_name') - * ) - * .executeTakeFirstOrThrow() - * - * // `full_name: string` field exists in the result type. - * console.log(result.full_name) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select concat(first_name, ' ', last_name) as "full_name" - * from "person" - * ``` - * - * You can also pass in a raw SQL snippet but in that case you must - * provide the alias as the only type argument: - * - * ```ts - * import { sql } from 'kysely' - * - * const values = sql<{ a: number, b: string }>`(values (1, 'foo'))` - * - * // The alias is `t(a, b)` which specifies the column names - * // in addition to the table name. We must tell kysely that - * // columns of the table can be referenced through `t` - * // by providing an explicit type argument. - * const aliasedValues = values.as<'t'>(sql`t(a, b)`) - * - * await db - * .insertInto('person') - * .columns(['first_name', 'last_name']) - * .expression( - * db.selectFrom(aliasedValues).select(['t.a', 't.b']) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name") - * from (values (1, 'foo')) as t(a, b) - * select "t"."a", "t"."b" - * ``` - */ - as(alias: A): AliasedRawBuilder; - /** - * Returns an aliased version of the expression. - * - * ### Examples - * - * In addition to slapping `as "the_alias"` at the end of the expression, - * this method also provides strict typing: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => - * // `eb.fn` returns an AliasableExpression - * eb.fn('concat', ['first_name', eb.val(' '), 'last_name']).as('full_name') - * ) - * .executeTakeFirstOrThrow() - * - * // `full_name: string` field exists in the result type. - * console.log(result.full_name) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * concat("first_name", $1, "last_name") as "full_name" - * from - * "person" - * ``` - * - * You can also pass in a raw SQL snippet (or any expression) but in that case you must - * provide the alias as the only type argument: - * - * ```ts - * import { sql } from 'kysely' - * - * const values = sql<{ a: number, b: string }>`(values (1, 'foo'))` - * - * // The alias is `t(a, b)` which specifies the column names - * // in addition to the table name. We must tell kysely that - * // columns of the table can be referenced through `t` - * // by providing an explicit type argument. - * const aliasedValues = values.as<'t'>(sql`t(a, b)`) - * - * await db - * .insertInto('person') - * .columns(['first_name', 'last_name']) - * .expression( - * db.selectFrom(aliasedValues).select(['t.a', 't.b']) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name") - * from (values (1, 'foo')) as t(a, b) - * select "t"."a", "t"."b" - * ``` - */ - as(alias: Expression): AliasedRawBuilder; - /** - * Change the output type of the raw expression. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `RawBuilder` with a new output type. - */ - $castTo(): RawBuilder; - /** - * Omit null from the expression's type. - * - * This function can be useful in cases where you know an expression can't be - * null, but Kysely is unable to infer it. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of `this` with a new output type. - */ - $notNull(): RawBuilder>; - /** - * Adds a plugin for this SQL snippet. - */ - withPlugin(plugin: KyselyPlugin): RawBuilder; - /** - * Compiles the builder to a `CompiledQuery`. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * const compiledQuery = sql`select * from ${sql.table('person')}`.compile(db) - * console.log(compiledQuery.sql) - * ``` - */ - compile(executorProvider: QueryExecutorProvider): CompiledQuery; - /** - * Executes the raw query. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * const result = await sql`select * from ${sql.table('person')}`.execute(db) - * ``` - */ - execute(executorProvider: QueryExecutorProvider): Promise>; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - * - * ### Examples - * - * If you are creating a custom expression, it's often easiest to use the {@link sql} - * template tag to build the node: - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - */ - toOperationNode(): RawNode; -} -export interface RawBuilderProps { - readonly queryId: QueryId; - readonly rawNode: RawNode; - readonly plugins?: ReadonlyArray; -} -export declare function createRawBuilder(props: RawBuilderProps): RawBuilder; -/** - * {@link RawBuilder} with an alias. The result of calling {@link RawBuilder.as}. - */ -export interface AliasedRawBuilder extends AliasedExpression { - get rawBuilder(): RawBuilder; -} diff --git a/node_modules/kysely/dist/cjs/raw-builder/raw-builder.js b/node_modules/kysely/dist/cjs/raw-builder/raw-builder.js deleted file mode 100644 index 08b09be..0000000 --- a/node_modules/kysely/dist/cjs/raw-builder/raw-builder.js +++ /dev/null @@ -1,86 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createRawBuilder = createRawBuilder; -const alias_node_js_1 = require("../operation-node/alias-node.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -const noop_query_executor_js_1 = require("../query-executor/noop-query-executor.js"); -const identifier_node_js_1 = require("../operation-node/identifier-node.js"); -const operation_node_source_js_1 = require("../operation-node/operation-node-source.js"); -class RawBuilderImpl { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - get expressionType() { - return undefined; - } - get isRawBuilder() { - return true; - } - as(alias) { - return new AliasedRawBuilderImpl(this, alias); - } - $castTo() { - return new RawBuilderImpl({ ...this.#props }); - } - $notNull() { - return new RawBuilderImpl(this.#props); - } - withPlugin(plugin) { - return new RawBuilderImpl({ - ...this.#props, - plugins: this.#props.plugins !== undefined - ? (0, object_utils_js_1.freeze)([...this.#props.plugins, plugin]) - : (0, object_utils_js_1.freeze)([plugin]), - }); - } - toOperationNode() { - return this.#toOperationNode(this.#getExecutor()); - } - compile(executorProvider) { - return this.#compile(this.#getExecutor(executorProvider)); - } - async execute(executorProvider) { - const executor = this.#getExecutor(executorProvider); - return executor.executeQuery(this.#compile(executor)); - } - #getExecutor(executorProvider) { - const executor = executorProvider !== undefined - ? executorProvider.getExecutor() - : noop_query_executor_js_1.NOOP_QUERY_EXECUTOR; - return this.#props.plugins !== undefined - ? executor.withPlugins(this.#props.plugins) - : executor; - } - #toOperationNode(executor) { - return executor.transformQuery(this.#props.rawNode, this.#props.queryId); - } - #compile(executor) { - return executor.compileQuery(this.#toOperationNode(executor), this.#props.queryId); - } -} -function createRawBuilder(props) { - return new RawBuilderImpl(props); -} -class AliasedRawBuilderImpl { - #rawBuilder; - #alias; - constructor(rawBuilder, alias) { - this.#rawBuilder = rawBuilder; - this.#alias = alias; - } - get expression() { - return this.#rawBuilder; - } - get alias() { - return this.#alias; - } - get rawBuilder() { - return this.#rawBuilder; - } - toOperationNode() { - return alias_node_js_1.AliasNode.create(this.#rawBuilder.toOperationNode(), (0, operation_node_source_js_1.isOperationNodeSource)(this.#alias) - ? this.#alias.toOperationNode() - : identifier_node_js_1.IdentifierNode.create(this.#alias)); - } -} diff --git a/node_modules/kysely/dist/cjs/raw-builder/sql.d.ts b/node_modules/kysely/dist/cjs/raw-builder/sql.d.ts deleted file mode 100644 index 8e6022f..0000000 --- a/node_modules/kysely/dist/cjs/raw-builder/sql.d.ts +++ /dev/null @@ -1,366 +0,0 @@ -import { type RawBuilder } from './raw-builder.js'; -export interface Sql { - /** - * Template tag for creating raw SQL snippets and queries. - * - * ```ts - * import { sql } from 'kysely' - * import type { Person } from 'type-editor' // imaginary module - * - * const id = 123 - * const snippet = sql`select * from person where id = ${id}` - * ``` - * - * Substitutions (the things inside `${}`) are automatically passed to the database - * as parameters and are never interpolated to the SQL string. There's no need to worry - * about SQL injection vulnerabilities. Substitutions can be values, other `sql` - * expressions, queries and almost anything else Kysely can produce and they get - * handled correctly. See the examples below. - * - * If you need your substitutions to be interpreted as identifiers, value literals or - * lists of things, see the {@link Sql.ref}, {@link Sql.table}, {@link Sql.id}, - * {@link Sql.lit}, {@link Sql.raw} and {@link Sql.join} functions. - * - * You can pass sql snippets returned by the `sql` tag pretty much anywhere. Whenever - * something can't be done using the Kysely API, you should be able to drop down to - * raw SQL using the `sql` tag. Here's an example query that uses raw sql in a bunch - * of methods: - * - * ```ts - * import { sql } from 'kysely' - * - * const nicknames = ['johnny', 'john', 'jon'] - * const date1 = new Date('2000-01-01') - * const date2 = new Date('2001-01-01') - * - * const persons = await db - * .selectFrom('person') - * .select( - * // If you use `sql` in a select statement, remember to call the `as` - * // method to give it an alias. - * sql`concat(first_name, ' ', last_name)`.as('full_name') - * ) - * .where(sql`birthdate between ${date1} and ${date2}`) - * // Here we assume we have list of nicknames for the person - * // (a list of strings) and we use the PostgreSQL `@>` operator - * // to test if all of them are valid nicknames for the user. - * .where('nicknames', '@>', sql`ARRAY[${sql.join(nicknames)}]`) - * .orderBy(sql`concat(first_name, ' ', last_name)`) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select concat(first_name, ' ', last_name) as "full_name" - * from "person" - * where birthdate between $1 and $2 - * and "nicknames" @> ARRAY[$3, $4, $5, $6, $7, $8, $9, $10] - * order by concat(first_name, ' ', last_name) - * ``` - * - * SQL snippets can be executed by calling the `execute` method and passing a `Kysely` - * instance as the only argument: - * - * ```ts - * import { sql } from 'kysely' - * import type { Person } from 'type-editor' - * - * const { rows: results } = await sql`select * from person`.execute(db) - * ``` - * - * You can merge other `sql` expressions and queries using substitutions: - * - * ```ts - * import { sql } from 'kysely' - * - * const petName = db.selectFrom('pet').select('name').limit(1) - * const fullName = sql`concat(first_name, ' ', last_name)` - * - * sql<{ full_name: string; pet_name: string }[]>` - * select ${fullName} as full_name, ${petName} as pet_name - * from person - * `.execute(db) - * ``` - * - * Substitutions also handle {@link ExpressionBuilder.ref}, - * {@link DynamicModule.ref} and pretty much anything else you - * throw at it. Here's an example of calling a function in a - * type-safe way: - * - * ```ts - * db.selectFrom('person') - * .select([ - * 'first_name', - * 'last_name', - * (eb) => { - * // The `eb.ref` method is type-safe and only accepts - * // column references that are possible. - * const firstName = eb.ref('first_name') - * const lastName = eb.ref('last_name') - * - * const fullName = sql`concat(${firstName}, ' ', ${lastName})` - * return fullName.as('full_name') - * } - * ]) - * ``` - * - * don't know if that amount of ceremony is worth the small increase in - * type-safety though... But it's possible. - */ - (sqlFragments: TemplateStringsArray, ...parameters: unknown[]): RawBuilder; - /** - * `sql.val(value)` is a shortcut for: - * - * ```ts - * import { sql } from 'kysely' - * - * const value = 123 - * type ValueType = typeof value - * - * sql`${value}` - * ``` - */ - val(value: V): RawBuilder; - /** - * @deprecated Use {@link Sql.val} instead. - */ - value(value: V): RawBuilder; - /** - * This can be used to add runtime column references to SQL snippets. - * - * By default `${}` substitutions in {@link sql} template strings get - * transformed into parameters. You can use this function to tell - * Kysely to interpret them as column references instead. - * - * WARNING! Using this with unchecked inputs WILL lead to SQL injection - * vulnerabilities. The input is not checked or escaped by Kysely in any way. - * - * ```ts - * const columnRef = 'first_name' - * - * sql`select ${sql.ref(columnRef)} from person` - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name" from person - * ``` - * - * The references can also include a table name: - * - * ```ts - * const columnRef = 'person.first_name' - * - * sql`select ${sql.ref(columnRef)}} from person` - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."first_name" from person - * ``` - * - * The references can also include a schema on supported databases: - * - * ```ts - * const columnRef = 'public.person.first_name' - * - * sql`select ${sql.ref(columnRef)}} from person` - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "public"."person"."first_name" from person - * ``` - */ - ref(columnReference: string): RawBuilder; - /** - * This can be used to add runtime table references to SQL snippets. - * - * By default `${}` substitutions in {@link sql} template strings get - * transformed into parameters. You can use this function to tell - * Kysely to interpret them as table references instead. - * - * WARNING! Using this with unchecked inputs WILL lead to SQL injection - * vulnerabilities. The input is not checked or escaped by Kysely in any way. - * - * ```ts - * const table = 'person' - * - * sql`select first_name from ${sql.table(table)}` - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select first_name from "person" - * ``` - * - * The references can also include a schema on supported databases: - * - * ```ts - * const table = 'public.person' - * - * sql`select first_name from ${sql.table(table)}` - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select first_name from "public"."person" - * ``` - */ - table(tableReference: string): RawBuilder; - /** - * This can be used to add arbitrary identifiers to SQL snippets. - * - * Does the same thing as {@link Sql.ref | ref} and {@link Sql.table | table} - * but can also be used for any other identifiers like index names. - * - * You should use {@link Sql.ref | ref} and {@link Sql.table | table} - * instead of this whenever possible as they produce a more semantic - * operation node tree. - * - * WARNING! Using this with unchecked inputs WILL lead to SQL injection - * vulnerabilities. The input is not checked or escaped by Kysely in any way. - * - * ```ts - * const indexName = 'person_first_name_index' - * - * sql`create index ${indexName} on person` - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create index "person_first_name_index" on person - * ``` - * - * Multiple identifiers get separated by dots: - * - * ```ts - * const schema = 'public' - * const columnName = 'first_name' - * const table = 'person' - * - * sql`select ${sql.id(schema, table, columnName)} from ${sql.id(schema, table)}` - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "public"."person"."first_name" from "public"."person" - * ``` - */ - id(...ids: readonly string[]): RawBuilder; - /** - * This can be used to add literal values to SQL snippets. - * - * WARNING! Using this with unchecked inputs WILL lead to SQL injection - * vulnerabilities. The input is not checked or escaped by Kysely in any way. - * You almost always want to use normal substitutions that get sent to the - * db as parameters. - * - * ```ts - * const firstName = 'first_name' - * - * sql`select * from person where first_name = ${sql.lit(firstName)}` - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from person where first_name = 'first_name' - * ``` - * - * As you can see from the example above, the value was added directly to - * the SQL string instead of as a parameter. Only use this function when - * something can't be sent as a parameter. - */ - lit(value: V): RawBuilder; - /** - * @deprecated Use {@link lit} instead. - */ - literal(value: V): RawBuilder; - /** - * This can be used to add arbitrary runtime SQL to SQL snippets. - * - * WARNING! Using this with unchecked inputs WILL lead to SQL injection - * vulnerabilities. The input is not checked or escaped by Kysely in any way. - * - * ```ts - * const firstName = "'first_name'" - * - * sql`select * from person where first_name = ${sql.raw(firstName)}` - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from person where first_name = 'first_name' - * ``` - * - * Note that the difference to `sql.lit` is that this function - * doesn't assume the inputs are values. The input to this function - * can be any sql and it's simply glued to the parent string as-is. - */ - raw(anySql: string): RawBuilder; - /** - * This can be used to add lists of things to SQL snippets. - * - * ### Examples - * - * ```ts - * import type { Person } from 'type-editor' // imaginary module - * - * function findByNicknames(nicknames: string[]): Promise { - * return db - * .selectFrom('person') - * .selectAll() - * .where('nicknames', '@>', sql`ARRAY[${sql.join(nicknames)}]`) - * .execute() - * } - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * where "nicknames" @> ARRAY[$1, $2, $3, $4, $5, $6, $7, $8] - * ``` - * - * The second argument is the joining SQL expression that defaults - * to - * - * ```ts - * sql`, ` - * ``` - * - * In addition to values, items in the list can be also {@link sql} - * expressions, queries or anything else the normal substitutions - * support: - * - * ```ts - * const things = [ - * 123, - * sql`(1 == 1)`, - * db.selectFrom('person').selectAll(), - * sql.lit(false), - * sql.id('first_name') - * ] - * - * sql`BEFORE ${sql.join(things, sql`::varchar, `)} AFTER` - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * BEFORE $1::varchar, (1 == 1)::varchar, (select * from "person")::varchar, false::varchar, "first_name" AFTER - * ``` - */ - join(array: readonly unknown[], separator?: RawBuilder): RawBuilder; -} -export declare const sql: Sql; diff --git a/node_modules/kysely/dist/cjs/raw-builder/sql.js b/node_modules/kysely/dist/cjs/raw-builder/sql.js deleted file mode 100644 index 30422b5..0000000 --- a/node_modules/kysely/dist/cjs/raw-builder/sql.js +++ /dev/null @@ -1,84 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.sql = void 0; -const identifier_node_js_1 = require("../operation-node/identifier-node.js"); -const operation_node_source_js_1 = require("../operation-node/operation-node-source.js"); -const raw_node_js_1 = require("../operation-node/raw-node.js"); -const value_node_js_1 = require("../operation-node/value-node.js"); -const reference_parser_js_1 = require("../parser/reference-parser.js"); -const table_parser_js_1 = require("../parser/table-parser.js"); -const value_parser_js_1 = require("../parser/value-parser.js"); -const query_id_js_1 = require("../util/query-id.js"); -const raw_builder_js_1 = require("./raw-builder.js"); -exports.sql = Object.assign((sqlFragments, ...parameters) => { - return (0, raw_builder_js_1.createRawBuilder)({ - queryId: (0, query_id_js_1.createQueryId)(), - rawNode: raw_node_js_1.RawNode.create(sqlFragments, parameters?.map(parseParameter) ?? []), - }); -}, { - ref(columnReference) { - return (0, raw_builder_js_1.createRawBuilder)({ - queryId: (0, query_id_js_1.createQueryId)(), - rawNode: raw_node_js_1.RawNode.createWithChild((0, reference_parser_js_1.parseStringReference)(columnReference)), - }); - }, - val(value) { - return (0, raw_builder_js_1.createRawBuilder)({ - queryId: (0, query_id_js_1.createQueryId)(), - rawNode: raw_node_js_1.RawNode.createWithChild((0, value_parser_js_1.parseValueExpression)(value)), - }); - }, - value(value) { - return this.val(value); - }, - table(tableReference) { - return (0, raw_builder_js_1.createRawBuilder)({ - queryId: (0, query_id_js_1.createQueryId)(), - rawNode: raw_node_js_1.RawNode.createWithChild((0, table_parser_js_1.parseTable)(tableReference)), - }); - }, - id(...ids) { - const fragments = new Array(ids.length + 1).fill('.'); - fragments[0] = ''; - fragments[fragments.length - 1] = ''; - return (0, raw_builder_js_1.createRawBuilder)({ - queryId: (0, query_id_js_1.createQueryId)(), - rawNode: raw_node_js_1.RawNode.create(fragments, ids.map(identifier_node_js_1.IdentifierNode.create)), - }); - }, - lit(value) { - return (0, raw_builder_js_1.createRawBuilder)({ - queryId: (0, query_id_js_1.createQueryId)(), - rawNode: raw_node_js_1.RawNode.createWithChild(value_node_js_1.ValueNode.createImmediate(value)), - }); - }, - literal(value) { - return this.lit(value); - }, - raw(sql) { - return (0, raw_builder_js_1.createRawBuilder)({ - queryId: (0, query_id_js_1.createQueryId)(), - rawNode: raw_node_js_1.RawNode.createWithSql(sql), - }); - }, - join(array, separator = (0, exports.sql) `, `) { - const nodes = new Array(Math.max(2 * array.length - 1, 0)); - const sep = separator.toOperationNode(); - for (let i = 0; i < array.length; ++i) { - nodes[2 * i] = parseParameter(array[i]); - if (i !== array.length - 1) { - nodes[2 * i + 1] = sep; - } - } - return (0, raw_builder_js_1.createRawBuilder)({ - queryId: (0, query_id_js_1.createQueryId)(), - rawNode: raw_node_js_1.RawNode.createWithChildren(nodes), - }); - }, -}); -function parseParameter(param) { - if ((0, operation_node_source_js_1.isOperationNodeSource)(param)) { - return param.toOperationNode(); - } - return (0, value_parser_js_1.parseValueExpression)(param); -} diff --git a/node_modules/kysely/dist/cjs/schema/alter-column-builder.d.ts b/node_modules/kysely/dist/cjs/schema/alter-column-builder.d.ts deleted file mode 100644 index 947a022..0000000 --- a/node_modules/kysely/dist/cjs/schema/alter-column-builder.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { AlterColumnNode } from '../operation-node/alter-column-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { type DataTypeExpression } from '../parser/data-type-parser.js'; -import { type DefaultValueExpression } from '../parser/default-value-parser.js'; -export declare class AlterColumnBuilder { - #private; - constructor(column: string); - setDataType(dataType: DataTypeExpression): AlteredColumnBuilder; - setDefault(value: DefaultValueExpression): AlteredColumnBuilder; - dropDefault(): AlteredColumnBuilder; - setNotNull(): AlteredColumnBuilder; - dropNotNull(): AlteredColumnBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; -} -/** - * Allows us to force consumers to do exactly one alteration to a column. - * - * One cannot do no alterations: - * - * ```ts - * await db.schema - * .alterTable('person') - * // .execute() // Property 'execute' does not exist on type 'AlteredColumnBuilder'. - * ``` - * - * ```ts - * await db.schema - * .alterTable('person') - * // .alterColumn('age', (ac) => ac) // Type 'AlterColumnBuilder' is not assignable to type 'AlteredColumnBuilder'. - * // .execute() - * ``` - * - * One cannot do multiple alterations: - * - * ```ts - * await db.schema - * .alterTable('person') - * // .alterColumn('age', (ac) => ac.dropNotNull().setNotNull()) // Property 'setNotNull' does not exist on type 'AlteredColumnBuilder'. - * // .execute() - * ``` - * - * Which would now throw a compilation error, instead of a runtime error. - */ -export declare class AlteredColumnBuilder implements OperationNodeSource { - #private; - constructor(alterColumnNode: AlterColumnNode); - toOperationNode(): AlterColumnNode; -} -export type AlterColumnBuilderCallback = (builder: AlterColumnBuilder) => AlteredColumnBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/alter-column-builder.js b/node_modules/kysely/dist/cjs/schema/alter-column-builder.js deleted file mode 100644 index a1d9d94..0000000 --- a/node_modules/kysely/dist/cjs/schema/alter-column-builder.js +++ /dev/null @@ -1,74 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AlteredColumnBuilder = exports.AlterColumnBuilder = void 0; -const alter_column_node_js_1 = require("../operation-node/alter-column-node.js"); -const data_type_parser_js_1 = require("../parser/data-type-parser.js"); -const default_value_parser_js_1 = require("../parser/default-value-parser.js"); -class AlterColumnBuilder { - #column; - constructor(column) { - this.#column = column; - } - setDataType(dataType) { - return new AlteredColumnBuilder(alter_column_node_js_1.AlterColumnNode.create(this.#column, 'dataType', (0, data_type_parser_js_1.parseDataTypeExpression)(dataType))); - } - setDefault(value) { - return new AlteredColumnBuilder(alter_column_node_js_1.AlterColumnNode.create(this.#column, 'setDefault', (0, default_value_parser_js_1.parseDefaultValueExpression)(value))); - } - dropDefault() { - return new AlteredColumnBuilder(alter_column_node_js_1.AlterColumnNode.create(this.#column, 'dropDefault', true)); - } - setNotNull() { - return new AlteredColumnBuilder(alter_column_node_js_1.AlterColumnNode.create(this.#column, 'setNotNull', true)); - } - dropNotNull() { - return new AlteredColumnBuilder(alter_column_node_js_1.AlterColumnNode.create(this.#column, 'dropNotNull', true)); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } -} -exports.AlterColumnBuilder = AlterColumnBuilder; -/** - * Allows us to force consumers to do exactly one alteration to a column. - * - * One cannot do no alterations: - * - * ```ts - * await db.schema - * .alterTable('person') - * // .execute() // Property 'execute' does not exist on type 'AlteredColumnBuilder'. - * ``` - * - * ```ts - * await db.schema - * .alterTable('person') - * // .alterColumn('age', (ac) => ac) // Type 'AlterColumnBuilder' is not assignable to type 'AlteredColumnBuilder'. - * // .execute() - * ``` - * - * One cannot do multiple alterations: - * - * ```ts - * await db.schema - * .alterTable('person') - * // .alterColumn('age', (ac) => ac.dropNotNull().setNotNull()) // Property 'setNotNull' does not exist on type 'AlteredColumnBuilder'. - * // .execute() - * ``` - * - * Which would now throw a compilation error, instead of a runtime error. - */ -class AlteredColumnBuilder { - #alterColumnNode; - constructor(alterColumnNode) { - this.#alterColumnNode = alterColumnNode; - } - toOperationNode() { - return this.#alterColumnNode; - } -} -exports.AlteredColumnBuilder = AlteredColumnBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/alter-table-add-foreign-key-constraint-builder.d.ts b/node_modules/kysely/dist/cjs/schema/alter-table-add-foreign-key-constraint-builder.d.ts deleted file mode 100644 index 7f510ec..0000000 --- a/node_modules/kysely/dist/cjs/schema/alter-table-add-foreign-key-constraint-builder.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { AlterTableNode } from '../operation-node/alter-table-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { OnModifyForeignAction } from '../operation-node/references-node.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryId } from '../util/query-id.js'; -import type { ForeignKeyConstraintBuilder, ForeignKeyConstraintBuilderInterface } from './foreign-key-constraint-builder.js'; -export declare class AlterTableAddForeignKeyConstraintBuilder implements ForeignKeyConstraintBuilderInterface, OperationNodeSource, Compilable { - #private; - constructor(props: AlterTableAddForeignKeyConstraintBuilderProps); - onDelete(onDelete: OnModifyForeignAction): AlterTableAddForeignKeyConstraintBuilder; - onUpdate(onUpdate: OnModifyForeignAction): AlterTableAddForeignKeyConstraintBuilder; - deferrable(): AlterTableAddForeignKeyConstraintBuilder; - notDeferrable(): AlterTableAddForeignKeyConstraintBuilder; - initiallyDeferred(): AlterTableAddForeignKeyConstraintBuilder; - initiallyImmediate(): AlterTableAddForeignKeyConstraintBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): AlterTableNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface AlterTableAddForeignKeyConstraintBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: AlterTableNode; - readonly constraintBuilder: ForeignKeyConstraintBuilder; -} diff --git a/node_modules/kysely/dist/cjs/schema/alter-table-add-foreign-key-constraint-builder.js b/node_modules/kysely/dist/cjs/schema/alter-table-add-foreign-key-constraint-builder.js deleted file mode 100644 index 2759411..0000000 --- a/node_modules/kysely/dist/cjs/schema/alter-table-add-foreign-key-constraint-builder.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AlterTableAddForeignKeyConstraintBuilder = void 0; -const add_constraint_node_js_1 = require("../operation-node/add-constraint-node.js"); -const alter_table_node_js_1 = require("../operation-node/alter-table-node.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -class AlterTableAddForeignKeyConstraintBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - onDelete(onDelete) { - return new AlterTableAddForeignKeyConstraintBuilder({ - ...this.#props, - constraintBuilder: this.#props.constraintBuilder.onDelete(onDelete), - }); - } - onUpdate(onUpdate) { - return new AlterTableAddForeignKeyConstraintBuilder({ - ...this.#props, - constraintBuilder: this.#props.constraintBuilder.onUpdate(onUpdate), - }); - } - deferrable() { - return new AlterTableAddForeignKeyConstraintBuilder({ - ...this.#props, - constraintBuilder: this.#props.constraintBuilder.deferrable(), - }); - } - notDeferrable() { - return new AlterTableAddForeignKeyConstraintBuilder({ - ...this.#props, - constraintBuilder: this.#props.constraintBuilder.notDeferrable(), - }); - } - initiallyDeferred() { - return new AlterTableAddForeignKeyConstraintBuilder({ - ...this.#props, - constraintBuilder: this.#props.constraintBuilder.initiallyDeferred(), - }); - } - initiallyImmediate() { - return new AlterTableAddForeignKeyConstraintBuilder({ - ...this.#props, - constraintBuilder: this.#props.constraintBuilder.initiallyImmediate(), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(alter_table_node_js_1.AlterTableNode.cloneWithTableProps(this.#props.node, { - addConstraint: add_constraint_node_js_1.AddConstraintNode.create(this.#props.constraintBuilder.toOperationNode()), - }), this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} -exports.AlterTableAddForeignKeyConstraintBuilder = AlterTableAddForeignKeyConstraintBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/alter-table-add-index-builder.d.ts b/node_modules/kysely/dist/cjs/schema/alter-table-add-index-builder.d.ts deleted file mode 100644 index 48c3ca9..0000000 --- a/node_modules/kysely/dist/cjs/schema/alter-table-add-index-builder.d.ts +++ /dev/null @@ -1,138 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -import { AlterTableNode } from '../operation-node/alter-table-node.js'; -import type { IndexType } from '../operation-node/create-index-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { type OrderedColumnName } from '../parser/reference-parser.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryId } from '../util/query-id.js'; -export declare class AlterTableAddIndexBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: AlterTableAddIndexBuilderProps); - /** - * Makes the index unique. - * - * ### Examples - * - * ```ts - * await db.schema - * .alterTable('person') - * .addIndex('person_first_name_index') - * .unique() - * .column('email') - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` add unique index `person_first_name_index` (`email`) - * ``` - */ - unique(): AlterTableAddIndexBuilder; - /** - * Adds a column to the index. - * - * Also see {@link columns} for adding multiple columns at once or {@link expression} - * for specifying an arbitrary expression. - * - * ### Examples - * - * ```ts - * await db.schema - * .alterTable('person') - * .addIndex('person_first_name_and_age_index') - * .column('first_name') - * .column('age desc') - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` add index `person_first_name_and_age_index` (`first_name`, `age` desc) - * ``` - */ - column(column: OrderedColumnName): AlterTableAddIndexBuilder; - /** - * Specifies a list of columns for the index. - * - * Also see {@link column} for adding a single column or {@link expression} for - * specifying an arbitrary expression. - * - * ### Examples - * - * ```ts - * await db.schema - * .alterTable('person') - * .addIndex('person_first_name_and_age_index') - * .columns(['first_name', 'age desc']) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` add index `person_first_name_and_age_index` (`first_name`, `age` desc) - * ``` - */ - columns(columns: OrderedColumnName[]): AlterTableAddIndexBuilder; - /** - * Specifies an arbitrary expression for the index. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .alterTable('person') - * .addIndex('person_first_name_index') - * .expression(sql`(first_name < 'Sami')`) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` add index `person_first_name_index` ((first_name < 'Sami')) - * ``` - */ - expression(expression: Expression): AlterTableAddIndexBuilder; - /** - * Specifies the index type. - * - * ### Examples - * - * ```ts - * await db.schema - * .alterTable('person') - * .addIndex('person_first_name_index') - * .column('first_name') - * .using('hash') - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` add index `person_first_name_index` (`first_name`) using hash - * ``` - */ - using(indexType: IndexType): AlterTableAddIndexBuilder; - using(indexType: string): AlterTableAddIndexBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): AlterTableNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface AlterTableAddIndexBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: AlterTableNode; -} diff --git a/node_modules/kysely/dist/cjs/schema/alter-table-add-index-builder.js b/node_modules/kysely/dist/cjs/schema/alter-table-add-index-builder.js deleted file mode 100644 index b740613..0000000 --- a/node_modules/kysely/dist/cjs/schema/alter-table-add-index-builder.js +++ /dev/null @@ -1,165 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AlterTableAddIndexBuilder = void 0; -const add_index_node_js_1 = require("../operation-node/add-index-node.js"); -const alter_table_node_js_1 = require("../operation-node/alter-table-node.js"); -const raw_node_js_1 = require("../operation-node/raw-node.js"); -const reference_parser_js_1 = require("../parser/reference-parser.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -class AlterTableAddIndexBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - /** - * Makes the index unique. - * - * ### Examples - * - * ```ts - * await db.schema - * .alterTable('person') - * .addIndex('person_first_name_index') - * .unique() - * .column('email') - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` add unique index `person_first_name_index` (`email`) - * ``` - */ - unique() { - return new AlterTableAddIndexBuilder({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithTableProps(this.#props.node, { - addIndex: add_index_node_js_1.AddIndexNode.cloneWith(this.#props.node.addIndex, { - unique: true, - }), - }), - }); - } - /** - * Adds a column to the index. - * - * Also see {@link columns} for adding multiple columns at once or {@link expression} - * for specifying an arbitrary expression. - * - * ### Examples - * - * ```ts - * await db.schema - * .alterTable('person') - * .addIndex('person_first_name_and_age_index') - * .column('first_name') - * .column('age desc') - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` add index `person_first_name_and_age_index` (`first_name`, `age` desc) - * ``` - */ - column(column) { - return new AlterTableAddIndexBuilder({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithTableProps(this.#props.node, { - addIndex: add_index_node_js_1.AddIndexNode.cloneWithColumns(this.#props.node.addIndex, [ - (0, reference_parser_js_1.parseOrderedColumnName)(column), - ]), - }), - }); - } - /** - * Specifies a list of columns for the index. - * - * Also see {@link column} for adding a single column or {@link expression} for - * specifying an arbitrary expression. - * - * ### Examples - * - * ```ts - * await db.schema - * .alterTable('person') - * .addIndex('person_first_name_and_age_index') - * .columns(['first_name', 'age desc']) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` add index `person_first_name_and_age_index` (`first_name`, `age` desc) - * ``` - */ - columns(columns) { - return new AlterTableAddIndexBuilder({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithTableProps(this.#props.node, { - addIndex: add_index_node_js_1.AddIndexNode.cloneWithColumns(this.#props.node.addIndex, columns.map(reference_parser_js_1.parseOrderedColumnName)), - }), - }); - } - /** - * Specifies an arbitrary expression for the index. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .alterTable('person') - * .addIndex('person_first_name_index') - * .expression(sql`(first_name < 'Sami')`) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` add index `person_first_name_index` ((first_name < 'Sami')) - * ``` - */ - expression(expression) { - return new AlterTableAddIndexBuilder({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithTableProps(this.#props.node, { - addIndex: add_index_node_js_1.AddIndexNode.cloneWithColumns(this.#props.node.addIndex, [ - expression.toOperationNode(), - ]), - }), - }); - } - using(indexType) { - return new AlterTableAddIndexBuilder({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithTableProps(this.#props.node, { - addIndex: add_index_node_js_1.AddIndexNode.cloneWith(this.#props.node.addIndex, { - using: raw_node_js_1.RawNode.createWithSql(indexType), - }), - }), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} -exports.AlterTableAddIndexBuilder = AlterTableAddIndexBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/alter-table-builder.d.ts b/node_modules/kysely/dist/cjs/schema/alter-table-builder.d.ts deleted file mode 100644 index 76e6da1..0000000 --- a/node_modules/kysely/dist/cjs/schema/alter-table-builder.d.ts +++ /dev/null @@ -1,148 +0,0 @@ -import { AlterTableNode } from '../operation-node/alter-table-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from '../util/compilable.js'; -import { type ColumnDefinitionBuilderCallback } from './column-definition-builder.js'; -import type { QueryId } from '../util/query-id.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import { type DataTypeExpression } from '../parser/data-type-parser.js'; -import { type ForeignKeyConstraintBuilderCallback } from './foreign-key-constraint-builder.js'; -import type { Expression } from '../expression/expression.js'; -import { type AlterColumnBuilderCallback } from './alter-column-builder.js'; -import { AlterTableExecutor } from './alter-table-executor.js'; -import { AlterTableAddForeignKeyConstraintBuilder } from './alter-table-add-foreign-key-constraint-builder.js'; -import { AlterTableDropConstraintBuilder } from './alter-table-drop-constraint-builder.js'; -import { AlterTableAddIndexBuilder } from './alter-table-add-index-builder.js'; -import { type UniqueConstraintNodeBuilderCallback } from './unique-constraint-builder.js'; -import { type PrimaryKeyConstraintBuilderCallback } from './primary-key-constraint-builder.js'; -import { type CheckConstraintBuilderCallback } from './check-constraint-builder.js'; -/** - * This builder can be used to create a `alter table` query. - */ -export declare class AlterTableBuilder implements ColumnAlteringInterface { - #private; - constructor(props: AlterTableBuilderProps); - renameTo(newTableName: string): AlterTableExecutor; - setSchema(newSchema: string): AlterTableExecutor; - alterColumn(column: string, alteration: AlterColumnBuilderCallback): AlterTableColumnAlteringBuilder; - dropColumn(column: string): AlterTableColumnAlteringBuilder; - renameColumn(column: string, newColumn: string): AlterTableColumnAlteringBuilder; - /** - * See {@link CreateTableBuilder.addColumn} - */ - addColumn(columnName: string, dataType: DataTypeExpression, build?: ColumnDefinitionBuilderCallback): AlterTableColumnAlteringBuilder; - /** - * Creates an `alter table modify column` query. The `modify column` statement - * is only implemeted by MySQL and oracle AFAIK. On other databases you - * should use the `alterColumn` method. - */ - modifyColumn(columnName: string, dataType: DataTypeExpression, build?: ColumnDefinitionBuilderCallback): AlterTableColumnAlteringBuilder; - /** - * See {@link CreateTableBuilder.addUniqueConstraint} - */ - addUniqueConstraint(constraintName: string, columns: string[], build?: UniqueConstraintNodeBuilderCallback): AlterTableExecutor; - /** - * See {@link CreateTableBuilder.addCheckConstraint} - */ - addCheckConstraint(constraintName: string, checkExpression: Expression, build?: CheckConstraintBuilderCallback): AlterTableExecutor; - /** - * See {@link CreateTableBuilder.addForeignKeyConstraint} - * - * Unlike {@link CreateTableBuilder.addForeignKeyConstraint} this method returns - * the constraint builder and doesn't take a callback as the last argument. This - * is because you can only add one column per `ALTER TABLE` query. - */ - addForeignKeyConstraint(constraintName: string, columns: string[], targetTable: string, targetColumns: string[], build?: ForeignKeyConstraintBuilderCallback): AlterTableAddForeignKeyConstraintBuilder; - /** - * See {@link CreateTableBuilder.addPrimaryKeyConstraint} - */ - addPrimaryKeyConstraint(constraintName: string, columns: string[], build?: PrimaryKeyConstraintBuilderCallback): AlterTableExecutor; - dropConstraint(constraintName: string): AlterTableDropConstraintBuilder; - renameConstraint(oldName: string, newName: string): AlterTableDropConstraintBuilder; - /** - * This can be used to add index to table. - * - * ### Examples - * - * ```ts - * db.schema.alterTable('person') - * .addIndex('person_email_index') - * .column('email') - * .unique() - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` add unique index `person_email_index` (`email`) - * ``` - */ - addIndex(indexName: string): AlterTableAddIndexBuilder; - /** - * This can be used to drop index from table. - * - * ### Examples - * - * ```ts - * db.schema.alterTable('person') - * .dropIndex('person_email_index') - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` drop index `test_first_name_index` - * ``` - */ - dropIndex(indexName: string): AlterTableExecutor; - /** - * Calls the given function passing `this` as the only argument. - * - * See {@link CreateTableBuilder.$call} - */ - $call(func: (qb: this) => T): T; -} -export interface AlterTableBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: AlterTableNode; -} -export interface ColumnAlteringInterface { - alterColumn(column: string, alteration: AlterColumnBuilderCallback): ColumnAlteringInterface; - dropColumn(column: string): ColumnAlteringInterface; - renameColumn(column: string, newColumn: string): ColumnAlteringInterface; - /** - * See {@link CreateTableBuilder.addColumn} - */ - addColumn(columnName: string, dataType: DataTypeExpression, build?: ColumnDefinitionBuilderCallback): ColumnAlteringInterface; - /** - * Creates an `alter table modify column` query. The `modify column` statement - * is only implemeted by MySQL and oracle AFAIK. On other databases you - * should use the `alterColumn` method. - */ - modifyColumn(columnName: string, dataType: DataTypeExpression, build: ColumnDefinitionBuilderCallback): ColumnAlteringInterface; -} -export declare class AlterTableColumnAlteringBuilder implements ColumnAlteringInterface, OperationNodeSource, Compilable { - #private; - constructor(props: AlterTableColumnAlteringBuilderProps); - alterColumn(column: string, alteration: AlterColumnBuilderCallback): AlterTableColumnAlteringBuilder; - dropColumn(column: string): AlterTableColumnAlteringBuilder; - renameColumn(column: string, newColumn: string): AlterTableColumnAlteringBuilder; - /** - * See {@link CreateTableBuilder.addColumn} - */ - addColumn(columnName: string, dataType: DataTypeExpression, build?: ColumnDefinitionBuilderCallback): AlterTableColumnAlteringBuilder; - /** - * Creates an `alter table modify column` query. The `modify column` statement - * is only implemeted by MySQL and oracle AFAIK. On other databases you - * should use the `alterColumn` method. - */ - modifyColumn(columnName: string, dataType: DataTypeExpression, build?: ColumnDefinitionBuilderCallback): AlterTableColumnAlteringBuilder; - toOperationNode(): AlterTableNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface AlterTableColumnAlteringBuilderProps extends AlterTableBuilderProps { -} diff --git a/node_modules/kysely/dist/cjs/schema/alter-table-builder.js b/node_modules/kysely/dist/cjs/schema/alter-table-builder.js deleted file mode 100644 index 3403b39..0000000 --- a/node_modules/kysely/dist/cjs/schema/alter-table-builder.js +++ /dev/null @@ -1,267 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AlterTableColumnAlteringBuilder = exports.AlterTableBuilder = void 0; -const add_column_node_js_1 = require("../operation-node/add-column-node.js"); -const alter_table_node_js_1 = require("../operation-node/alter-table-node.js"); -const column_definition_node_js_1 = require("../operation-node/column-definition-node.js"); -const drop_column_node_js_1 = require("../operation-node/drop-column-node.js"); -const identifier_node_js_1 = require("../operation-node/identifier-node.js"); -const rename_column_node_js_1 = require("../operation-node/rename-column-node.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -const column_definition_builder_js_1 = require("./column-definition-builder.js"); -const modify_column_node_js_1 = require("../operation-node/modify-column-node.js"); -const data_type_parser_js_1 = require("../parser/data-type-parser.js"); -const foreign_key_constraint_builder_js_1 = require("./foreign-key-constraint-builder.js"); -const add_constraint_node_js_1 = require("../operation-node/add-constraint-node.js"); -const unique_constraint_node_js_1 = require("../operation-node/unique-constraint-node.js"); -const check_constraint_node_js_1 = require("../operation-node/check-constraint-node.js"); -const foreign_key_constraint_node_js_1 = require("../operation-node/foreign-key-constraint-node.js"); -const column_node_js_1 = require("../operation-node/column-node.js"); -const table_parser_js_1 = require("../parser/table-parser.js"); -const drop_constraint_node_js_1 = require("../operation-node/drop-constraint-node.js"); -const alter_column_builder_js_1 = require("./alter-column-builder.js"); -const alter_table_executor_js_1 = require("./alter-table-executor.js"); -const alter_table_add_foreign_key_constraint_builder_js_1 = require("./alter-table-add-foreign-key-constraint-builder.js"); -const alter_table_drop_constraint_builder_js_1 = require("./alter-table-drop-constraint-builder.js"); -const primary_key_constraint_node_js_1 = require("../operation-node/primary-key-constraint-node.js"); -const drop_index_node_js_1 = require("../operation-node/drop-index-node.js"); -const add_index_node_js_1 = require("../operation-node/add-index-node.js"); -const alter_table_add_index_builder_js_1 = require("./alter-table-add-index-builder.js"); -const unique_constraint_builder_js_1 = require("./unique-constraint-builder.js"); -const primary_key_constraint_builder_js_1 = require("./primary-key-constraint-builder.js"); -const check_constraint_builder_js_1 = require("./check-constraint-builder.js"); -const rename_constraint_node_js_1 = require("../operation-node/rename-constraint-node.js"); -/** - * This builder can be used to create a `alter table` query. - */ -class AlterTableBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - renameTo(newTableName) { - return new alter_table_executor_js_1.AlterTableExecutor({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithTableProps(this.#props.node, { - renameTo: (0, table_parser_js_1.parseTable)(newTableName), - }), - }); - } - setSchema(newSchema) { - return new alter_table_executor_js_1.AlterTableExecutor({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithTableProps(this.#props.node, { - setSchema: identifier_node_js_1.IdentifierNode.create(newSchema), - }), - }); - } - alterColumn(column, alteration) { - const builder = alteration(new alter_column_builder_js_1.AlterColumnBuilder(column)); - return new AlterTableColumnAlteringBuilder({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithColumnAlteration(this.#props.node, builder.toOperationNode()), - }); - } - dropColumn(column) { - return new AlterTableColumnAlteringBuilder({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithColumnAlteration(this.#props.node, drop_column_node_js_1.DropColumnNode.create(column)), - }); - } - renameColumn(column, newColumn) { - return new AlterTableColumnAlteringBuilder({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithColumnAlteration(this.#props.node, rename_column_node_js_1.RenameColumnNode.create(column, newColumn)), - }); - } - addColumn(columnName, dataType, build = object_utils_js_1.noop) { - const builder = build(new column_definition_builder_js_1.ColumnDefinitionBuilder(column_definition_node_js_1.ColumnDefinitionNode.create(columnName, (0, data_type_parser_js_1.parseDataTypeExpression)(dataType)))); - return new AlterTableColumnAlteringBuilder({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithColumnAlteration(this.#props.node, add_column_node_js_1.AddColumnNode.create(builder.toOperationNode())), - }); - } - modifyColumn(columnName, dataType, build = object_utils_js_1.noop) { - const builder = build(new column_definition_builder_js_1.ColumnDefinitionBuilder(column_definition_node_js_1.ColumnDefinitionNode.create(columnName, (0, data_type_parser_js_1.parseDataTypeExpression)(dataType)))); - return new AlterTableColumnAlteringBuilder({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithColumnAlteration(this.#props.node, modify_column_node_js_1.ModifyColumnNode.create(builder.toOperationNode())), - }); - } - /** - * See {@link CreateTableBuilder.addUniqueConstraint} - */ - addUniqueConstraint(constraintName, columns, build = object_utils_js_1.noop) { - const uniqueConstraintBuilder = build(new unique_constraint_builder_js_1.UniqueConstraintNodeBuilder(unique_constraint_node_js_1.UniqueConstraintNode.create(columns, constraintName))); - return new alter_table_executor_js_1.AlterTableExecutor({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithTableProps(this.#props.node, { - addConstraint: add_constraint_node_js_1.AddConstraintNode.create(uniqueConstraintBuilder.toOperationNode()), - }), - }); - } - /** - * See {@link CreateTableBuilder.addCheckConstraint} - */ - addCheckConstraint(constraintName, checkExpression, build = object_utils_js_1.noop) { - const constraintBuilder = build(new check_constraint_builder_js_1.CheckConstraintBuilder(check_constraint_node_js_1.CheckConstraintNode.create(checkExpression.toOperationNode(), constraintName))); - return new alter_table_executor_js_1.AlterTableExecutor({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithTableProps(this.#props.node, { - addConstraint: add_constraint_node_js_1.AddConstraintNode.create(constraintBuilder.toOperationNode()), - }), - }); - } - /** - * See {@link CreateTableBuilder.addForeignKeyConstraint} - * - * Unlike {@link CreateTableBuilder.addForeignKeyConstraint} this method returns - * the constraint builder and doesn't take a callback as the last argument. This - * is because you can only add one column per `ALTER TABLE` query. - */ - addForeignKeyConstraint(constraintName, columns, targetTable, targetColumns, build = object_utils_js_1.noop) { - const constraintBuilder = build(new foreign_key_constraint_builder_js_1.ForeignKeyConstraintBuilder(foreign_key_constraint_node_js_1.ForeignKeyConstraintNode.create(columns.map(column_node_js_1.ColumnNode.create), (0, table_parser_js_1.parseTable)(targetTable), targetColumns.map(column_node_js_1.ColumnNode.create), constraintName))); - return new alter_table_add_foreign_key_constraint_builder_js_1.AlterTableAddForeignKeyConstraintBuilder({ - ...this.#props, - constraintBuilder, - }); - } - /** - * See {@link CreateTableBuilder.addPrimaryKeyConstraint} - */ - addPrimaryKeyConstraint(constraintName, columns, build = object_utils_js_1.noop) { - const constraintBuilder = build(new primary_key_constraint_builder_js_1.PrimaryKeyConstraintBuilder(primary_key_constraint_node_js_1.PrimaryKeyConstraintNode.create(columns, constraintName))); - return new alter_table_executor_js_1.AlterTableExecutor({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithTableProps(this.#props.node, { - addConstraint: add_constraint_node_js_1.AddConstraintNode.create(constraintBuilder.toOperationNode()), - }), - }); - } - dropConstraint(constraintName) { - return new alter_table_drop_constraint_builder_js_1.AlterTableDropConstraintBuilder({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithTableProps(this.#props.node, { - dropConstraint: drop_constraint_node_js_1.DropConstraintNode.create(constraintName), - }), - }); - } - renameConstraint(oldName, newName) { - return new alter_table_drop_constraint_builder_js_1.AlterTableDropConstraintBuilder({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithTableProps(this.#props.node, { - renameConstraint: rename_constraint_node_js_1.RenameConstraintNode.create(oldName, newName), - }), - }); - } - /** - * This can be used to add index to table. - * - * ### Examples - * - * ```ts - * db.schema.alterTable('person') - * .addIndex('person_email_index') - * .column('email') - * .unique() - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` add unique index `person_email_index` (`email`) - * ``` - */ - addIndex(indexName) { - return new alter_table_add_index_builder_js_1.AlterTableAddIndexBuilder({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithTableProps(this.#props.node, { - addIndex: add_index_node_js_1.AddIndexNode.create(indexName), - }), - }); - } - /** - * This can be used to drop index from table. - * - * ### Examples - * - * ```ts - * db.schema.alterTable('person') - * .dropIndex('person_email_index') - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` drop index `test_first_name_index` - * ``` - */ - dropIndex(indexName) { - return new alter_table_executor_js_1.AlterTableExecutor({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithTableProps(this.#props.node, { - dropIndex: drop_index_node_js_1.DropIndexNode.create(indexName), - }), - }); - } - /** - * Calls the given function passing `this` as the only argument. - * - * See {@link CreateTableBuilder.$call} - */ - $call(func) { - return func(this); - } -} -exports.AlterTableBuilder = AlterTableBuilder; -class AlterTableColumnAlteringBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - alterColumn(column, alteration) { - const builder = alteration(new alter_column_builder_js_1.AlterColumnBuilder(column)); - return new AlterTableColumnAlteringBuilder({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithColumnAlteration(this.#props.node, builder.toOperationNode()), - }); - } - dropColumn(column) { - return new AlterTableColumnAlteringBuilder({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithColumnAlteration(this.#props.node, drop_column_node_js_1.DropColumnNode.create(column)), - }); - } - renameColumn(column, newColumn) { - return new AlterTableColumnAlteringBuilder({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithColumnAlteration(this.#props.node, rename_column_node_js_1.RenameColumnNode.create(column, newColumn)), - }); - } - addColumn(columnName, dataType, build = object_utils_js_1.noop) { - const builder = build(new column_definition_builder_js_1.ColumnDefinitionBuilder(column_definition_node_js_1.ColumnDefinitionNode.create(columnName, (0, data_type_parser_js_1.parseDataTypeExpression)(dataType)))); - return new AlterTableColumnAlteringBuilder({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithColumnAlteration(this.#props.node, add_column_node_js_1.AddColumnNode.create(builder.toOperationNode())), - }); - } - modifyColumn(columnName, dataType, build = object_utils_js_1.noop) { - const builder = build(new column_definition_builder_js_1.ColumnDefinitionBuilder(column_definition_node_js_1.ColumnDefinitionNode.create(columnName, (0, data_type_parser_js_1.parseDataTypeExpression)(dataType)))); - return new AlterTableColumnAlteringBuilder({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithColumnAlteration(this.#props.node, modify_column_node_js_1.ModifyColumnNode.create(builder.toOperationNode())), - }); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} -exports.AlterTableColumnAlteringBuilder = AlterTableColumnAlteringBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/alter-table-drop-constraint-builder.d.ts b/node_modules/kysely/dist/cjs/schema/alter-table-drop-constraint-builder.d.ts deleted file mode 100644 index 4f82658..0000000 --- a/node_modules/kysely/dist/cjs/schema/alter-table-drop-constraint-builder.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { AlterTableNode } from '../operation-node/alter-table-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryId } from '../util/query-id.js'; -export declare class AlterTableDropConstraintBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: AlterTableDropConstraintBuilderProps); - ifExists(): AlterTableDropConstraintBuilder; - cascade(): AlterTableDropConstraintBuilder; - restrict(): AlterTableDropConstraintBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): AlterTableNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface AlterTableDropConstraintBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: AlterTableNode; -} diff --git a/node_modules/kysely/dist/cjs/schema/alter-table-drop-constraint-builder.js b/node_modules/kysely/dist/cjs/schema/alter-table-drop-constraint-builder.js deleted file mode 100644 index 83d7e78..0000000 --- a/node_modules/kysely/dist/cjs/schema/alter-table-drop-constraint-builder.js +++ /dev/null @@ -1,59 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AlterTableDropConstraintBuilder = void 0; -const alter_table_node_js_1 = require("../operation-node/alter-table-node.js"); -const drop_constraint_node_js_1 = require("../operation-node/drop-constraint-node.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -class AlterTableDropConstraintBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - ifExists() { - return new AlterTableDropConstraintBuilder({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithTableProps(this.#props.node, { - dropConstraint: drop_constraint_node_js_1.DropConstraintNode.cloneWith(this.#props.node.dropConstraint, { - ifExists: true, - }), - }), - }); - } - cascade() { - return new AlterTableDropConstraintBuilder({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithTableProps(this.#props.node, { - dropConstraint: drop_constraint_node_js_1.DropConstraintNode.cloneWith(this.#props.node.dropConstraint, { - modifier: 'cascade', - }), - }), - }); - } - restrict() { - return new AlterTableDropConstraintBuilder({ - ...this.#props, - node: alter_table_node_js_1.AlterTableNode.cloneWithTableProps(this.#props.node, { - dropConstraint: drop_constraint_node_js_1.DropConstraintNode.cloneWith(this.#props.node.dropConstraint, { - modifier: 'restrict', - }), - }), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} -exports.AlterTableDropConstraintBuilder = AlterTableDropConstraintBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/alter-table-executor.d.ts b/node_modules/kysely/dist/cjs/schema/alter-table-executor.d.ts deleted file mode 100644 index 309398b..0000000 --- a/node_modules/kysely/dist/cjs/schema/alter-table-executor.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { AlterTableNode } from '../operation-node/alter-table-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryId } from '../util/query-id.js'; -export declare class AlterTableExecutor implements OperationNodeSource, Compilable { - #private; - constructor(props: AlterTableExecutorProps); - toOperationNode(): AlterTableNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface AlterTableExecutorProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: AlterTableNode; -} diff --git a/node_modules/kysely/dist/cjs/schema/alter-table-executor.js b/node_modules/kysely/dist/cjs/schema/alter-table-executor.js deleted file mode 100644 index c297db3..0000000 --- a/node_modules/kysely/dist/cjs/schema/alter-table-executor.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AlterTableExecutor = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -class AlterTableExecutor { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} -exports.AlterTableExecutor = AlterTableExecutor; diff --git a/node_modules/kysely/dist/cjs/schema/check-constraint-builder.d.ts b/node_modules/kysely/dist/cjs/schema/check-constraint-builder.d.ts deleted file mode 100644 index f073045..0000000 --- a/node_modules/kysely/dist/cjs/schema/check-constraint-builder.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CheckConstraintNode } from '../operation-node/check-constraint-node.js'; -export declare class CheckConstraintBuilder implements OperationNodeSource { - #private; - constructor(node: CheckConstraintNode); - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): CheckConstraintNode; -} -export type CheckConstraintBuilderCallback = (builder: CheckConstraintBuilder) => CheckConstraintBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/check-constraint-builder.js b/node_modules/kysely/dist/cjs/schema/check-constraint-builder.js deleted file mode 100644 index ca551bb..0000000 --- a/node_modules/kysely/dist/cjs/schema/check-constraint-builder.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CheckConstraintBuilder = void 0; -class CheckConstraintBuilder { - #node; - constructor(node) { - this.#node = node; - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#node; - } -} -exports.CheckConstraintBuilder = CheckConstraintBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/column-definition-builder.d.ts b/node_modules/kysely/dist/cjs/schema/column-definition-builder.d.ts deleted file mode 100644 index dff3979..0000000 --- a/node_modules/kysely/dist/cjs/schema/column-definition-builder.d.ts +++ /dev/null @@ -1,514 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { type OnModifyForeignAction } from '../operation-node/references-node.js'; -import { ColumnDefinitionNode } from '../operation-node/column-definition-node.js'; -import { type DefaultValueExpression } from '../parser/default-value-parser.js'; -import type { Expression } from '../expression/expression.js'; -export declare class ColumnDefinitionBuilder implements OperationNodeSource { - #private; - constructor(node: ColumnDefinitionNode); - /** - * Adds `auto_increment` or `autoincrement` to the column definition - * depending on the dialect. - * - * Some dialects like PostgreSQL don't support this. On PostgreSQL - * you can use the `serial` or `bigserial` data type instead. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.autoIncrement().primaryKey()) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `id` integer primary key auto_increment - * ) - * ``` - */ - autoIncrement(): ColumnDefinitionBuilder; - /** - * Makes the column an identity column. - * - * This only works on some dialects like MS SQL Server (MSSQL). - * - * For PostgreSQL's `generated always as identity` use {@link generatedAlwaysAsIdentity}. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.identity().primaryKey()) - * .execute() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * create table "person" ( - * "id" integer identity primary key - * ) - * ``` - */ - identity(): ColumnDefinitionBuilder; - /** - * Makes the column the primary key. - * - * If you want to specify a composite primary key use the - * {@link CreateTableBuilder.addPrimaryKeyConstraint} method. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.primaryKey()) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `id` integer primary key - * ) - */ - primaryKey(): ColumnDefinitionBuilder; - /** - * Adds a foreign key constraint for the column. - * - * If your database engine doesn't support foreign key constraints in the - * column definition (like MySQL 5) you need to call the table level - * {@link CreateTableBuilder.addForeignKeyConstraint} method instead. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn('owner_id', 'integer', (col) => col.references('person.id')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create table "pet" ( - * "owner_id" integer references "person" ("id") - * ) - * ``` - */ - references(ref: string): ColumnDefinitionBuilder; - /** - * Adds an `on delete` constraint for the foreign key column. - * - * If your database engine doesn't support foreign key constraints in the - * column definition (like MySQL 5) you need to call the table level - * {@link CreateTableBuilder.addForeignKeyConstraint} method instead. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn( - * 'owner_id', - * 'integer', - * (col) => col.references('person.id').onDelete('cascade') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create table "pet" ( - * "owner_id" integer references "person" ("id") on delete cascade - * ) - * ``` - */ - onDelete(onDelete: OnModifyForeignAction): ColumnDefinitionBuilder; - /** - * Adds an `on update` constraint for the foreign key column. - * - * If your database engine doesn't support foreign key constraints in the - * column definition (like MySQL 5) you need to call the table level - * {@link CreateTableBuilder.addForeignKeyConstraint} method instead. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn( - * 'owner_id', - * 'integer', - * (col) => col.references('person.id').onUpdate('cascade') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create table "pet" ( - * "owner_id" integer references "person" ("id") on update cascade - * ) - * ``` - */ - onUpdate(onUpdate: OnModifyForeignAction): ColumnDefinitionBuilder; - /** - * Adds a unique constraint for the column. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('email', 'varchar(255)', col => col.unique()) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `email` varchar(255) unique - * ) - * ``` - */ - unique(): ColumnDefinitionBuilder; - /** - * Adds a `not null` constraint for the column. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('first_name', 'varchar(255)', col => col.notNull()) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `first_name` varchar(255) not null - * ) - * ``` - */ - notNull(): ColumnDefinitionBuilder; - /** - * Adds a `unsigned` modifier for the column. - * - * This only works on some dialects like MySQL. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('age', 'integer', col => col.unsigned()) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `age` integer unsigned - * ) - * ``` - */ - unsigned(): ColumnDefinitionBuilder; - /** - * Adds a default value constraint for the column. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn('number_of_legs', 'integer', (col) => col.defaultTo(4)) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `pet` ( - * `number_of_legs` integer default 4 - * ) - * ``` - * - * Values passed to `defaultTo` are interpreted as value literals by default. You can define - * an arbitrary SQL expression using the {@link sql} template tag: - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('pet') - * .addColumn( - * 'created_at', - * 'timestamp', - * (col) => col.defaultTo(sql`CURRENT_TIMESTAMP`) - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `pet` ( - * `created_at` timestamp default CURRENT_TIMESTAMP - * ) - * ``` - */ - defaultTo(value: DefaultValueExpression): ColumnDefinitionBuilder; - /** - * Adds a check constraint for the column. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('pet') - * .addColumn('number_of_legs', 'integer', (col) => - * col.check(sql`number_of_legs < 5`) - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `pet` ( - * `number_of_legs` integer check (number_of_legs < 5) - * ) - * ``` - */ - check(expression: Expression): ColumnDefinitionBuilder; - /** - * Makes the column a generated column using a `generated always as` statement. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .addColumn('full_name', 'varchar(255)', - * (col) => col.generatedAlwaysAs(sql`concat(first_name, ' ', last_name)`) - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `full_name` varchar(255) generated always as (concat(first_name, ' ', last_name)) - * ) - * ``` - */ - generatedAlwaysAs(expression: Expression): ColumnDefinitionBuilder; - /** - * Adds the `generated always as identity` specifier. - * - * This only works on some dialects like PostgreSQL. - * - * For MS SQL Server (MSSQL)'s identity column use {@link identity}. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.generatedAlwaysAsIdentity().primaryKey()) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create table "person" ( - * "id" integer generated always as identity primary key - * ) - * ``` - */ - generatedAlwaysAsIdentity(): ColumnDefinitionBuilder; - /** - * Adds the `generated by default as identity` specifier on supported dialects. - * - * This only works on some dialects like PostgreSQL. - * - * For MS SQL Server (MSSQL)'s identity column use {@link identity}. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.generatedByDefaultAsIdentity().primaryKey()) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create table "person" ( - * "id" integer generated by default as identity primary key - * ) - * ``` - */ - generatedByDefaultAsIdentity(): ColumnDefinitionBuilder; - /** - * Makes a generated column stored instead of virtual. This method can only - * be used with {@link generatedAlwaysAs} - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .addColumn('full_name', 'varchar(255)', (col) => col - * .generatedAlwaysAs(sql`concat(first_name, ' ', last_name)`) - * .stored() - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `full_name` varchar(255) generated always as (concat(first_name, ' ', last_name)) stored - * ) - * ``` - */ - stored(): ColumnDefinitionBuilder; - /** - * This can be used to add any additional SQL right after the column's data type. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.primaryKey()) - * .addColumn( - * 'first_name', - * 'varchar(36)', - * (col) => col.modifyFront(sql`collate utf8mb4_general_ci`).notNull() - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `id` integer primary key, - * `first_name` varchar(36) collate utf8mb4_general_ci not null - * ) - * ``` - */ - modifyFront(modifier: Expression): ColumnDefinitionBuilder; - /** - * Adds `nulls not distinct` specifier. - * Should be used with `unique` constraint. - * - * This only works on some dialects like PostgreSQL. - * - * ### Examples - * - * ```ts - * db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.primaryKey()) - * .addColumn('first_name', 'varchar(30)', col => col.unique().nullsNotDistinct()) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create table "person" ( - * "id" integer primary key, - * "first_name" varchar(30) unique nulls not distinct - * ) - * ``` - */ - nullsNotDistinct(): ColumnDefinitionBuilder; - /** - * Adds `if not exists` specifier. This only works for PostgreSQL. - * - * ### Examples - * - * ```ts - * await db.schema - * .alterTable('person') - * .addColumn('email', 'varchar(255)', col => col.unique().ifNotExists()) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * alter table "person" add column if not exists "email" varchar(255) unique - * ``` - */ - ifNotExists(): ColumnDefinitionBuilder; - /** - * This can be used to add any additional SQL to the end of the column definition. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.primaryKey()) - * .addColumn( - * 'age', - * 'integer', - * col => col.unsigned() - * .notNull() - * .modifyEnd(sql`comment ${sql.lit('it is not polite to ask a woman her age')}`) - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `id` integer primary key, - * `age` integer unsigned not null comment 'it is not polite to ask a woman her age' - * ) - * ``` - */ - modifyEnd(modifier: Expression): ColumnDefinitionBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): ColumnDefinitionNode; -} -export type ColumnDefinitionBuilderCallback = (builder: ColumnDefinitionBuilder) => ColumnDefinitionBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/column-definition-builder.js b/node_modules/kysely/dist/cjs/schema/column-definition-builder.js deleted file mode 100644 index 9f978e4..0000000 --- a/node_modules/kysely/dist/cjs/schema/column-definition-builder.js +++ /dev/null @@ -1,600 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ColumnDefinitionBuilder = void 0; -const check_constraint_node_js_1 = require("../operation-node/check-constraint-node.js"); -const references_node_js_1 = require("../operation-node/references-node.js"); -const select_all_node_js_1 = require("../operation-node/select-all-node.js"); -const reference_parser_js_1 = require("../parser/reference-parser.js"); -const column_definition_node_js_1 = require("../operation-node/column-definition-node.js"); -const default_value_parser_js_1 = require("../parser/default-value-parser.js"); -const generated_node_js_1 = require("../operation-node/generated-node.js"); -const default_value_node_js_1 = require("../operation-node/default-value-node.js"); -const on_modify_action_parser_js_1 = require("../parser/on-modify-action-parser.js"); -class ColumnDefinitionBuilder { - #node; - constructor(node) { - this.#node = node; - } - /** - * Adds `auto_increment` or `autoincrement` to the column definition - * depending on the dialect. - * - * Some dialects like PostgreSQL don't support this. On PostgreSQL - * you can use the `serial` or `bigserial` data type instead. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.autoIncrement().primaryKey()) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `id` integer primary key auto_increment - * ) - * ``` - */ - autoIncrement() { - return new ColumnDefinitionBuilder(column_definition_node_js_1.ColumnDefinitionNode.cloneWith(this.#node, { autoIncrement: true })); - } - /** - * Makes the column an identity column. - * - * This only works on some dialects like MS SQL Server (MSSQL). - * - * For PostgreSQL's `generated always as identity` use {@link generatedAlwaysAsIdentity}. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.identity().primaryKey()) - * .execute() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * create table "person" ( - * "id" integer identity primary key - * ) - * ``` - */ - identity() { - return new ColumnDefinitionBuilder(column_definition_node_js_1.ColumnDefinitionNode.cloneWith(this.#node, { identity: true })); - } - /** - * Makes the column the primary key. - * - * If you want to specify a composite primary key use the - * {@link CreateTableBuilder.addPrimaryKeyConstraint} method. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.primaryKey()) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `id` integer primary key - * ) - */ - primaryKey() { - return new ColumnDefinitionBuilder(column_definition_node_js_1.ColumnDefinitionNode.cloneWith(this.#node, { primaryKey: true })); - } - /** - * Adds a foreign key constraint for the column. - * - * If your database engine doesn't support foreign key constraints in the - * column definition (like MySQL 5) you need to call the table level - * {@link CreateTableBuilder.addForeignKeyConstraint} method instead. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn('owner_id', 'integer', (col) => col.references('person.id')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create table "pet" ( - * "owner_id" integer references "person" ("id") - * ) - * ``` - */ - references(ref) { - const references = (0, reference_parser_js_1.parseStringReference)(ref); - if (!references.table || select_all_node_js_1.SelectAllNode.is(references.column)) { - throw new Error(`invalid call references('${ref}'). The reference must have format table.column or schema.table.column`); - } - return new ColumnDefinitionBuilder(column_definition_node_js_1.ColumnDefinitionNode.cloneWith(this.#node, { - references: references_node_js_1.ReferencesNode.create(references.table, [ - references.column, - ]), - })); - } - /** - * Adds an `on delete` constraint for the foreign key column. - * - * If your database engine doesn't support foreign key constraints in the - * column definition (like MySQL 5) you need to call the table level - * {@link CreateTableBuilder.addForeignKeyConstraint} method instead. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn( - * 'owner_id', - * 'integer', - * (col) => col.references('person.id').onDelete('cascade') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create table "pet" ( - * "owner_id" integer references "person" ("id") on delete cascade - * ) - * ``` - */ - onDelete(onDelete) { - if (!this.#node.references) { - throw new Error('on delete constraint can only be added for foreign keys'); - } - return new ColumnDefinitionBuilder(column_definition_node_js_1.ColumnDefinitionNode.cloneWith(this.#node, { - references: references_node_js_1.ReferencesNode.cloneWithOnDelete(this.#node.references, (0, on_modify_action_parser_js_1.parseOnModifyForeignAction)(onDelete)), - })); - } - /** - * Adds an `on update` constraint for the foreign key column. - * - * If your database engine doesn't support foreign key constraints in the - * column definition (like MySQL 5) you need to call the table level - * {@link CreateTableBuilder.addForeignKeyConstraint} method instead. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn( - * 'owner_id', - * 'integer', - * (col) => col.references('person.id').onUpdate('cascade') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create table "pet" ( - * "owner_id" integer references "person" ("id") on update cascade - * ) - * ``` - */ - onUpdate(onUpdate) { - if (!this.#node.references) { - throw new Error('on update constraint can only be added for foreign keys'); - } - return new ColumnDefinitionBuilder(column_definition_node_js_1.ColumnDefinitionNode.cloneWith(this.#node, { - references: references_node_js_1.ReferencesNode.cloneWithOnUpdate(this.#node.references, (0, on_modify_action_parser_js_1.parseOnModifyForeignAction)(onUpdate)), - })); - } - /** - * Adds a unique constraint for the column. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('email', 'varchar(255)', col => col.unique()) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `email` varchar(255) unique - * ) - * ``` - */ - unique() { - return new ColumnDefinitionBuilder(column_definition_node_js_1.ColumnDefinitionNode.cloneWith(this.#node, { unique: true })); - } - /** - * Adds a `not null` constraint for the column. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('first_name', 'varchar(255)', col => col.notNull()) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `first_name` varchar(255) not null - * ) - * ``` - */ - notNull() { - return new ColumnDefinitionBuilder(column_definition_node_js_1.ColumnDefinitionNode.cloneWith(this.#node, { notNull: true })); - } - /** - * Adds a `unsigned` modifier for the column. - * - * This only works on some dialects like MySQL. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('age', 'integer', col => col.unsigned()) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `age` integer unsigned - * ) - * ``` - */ - unsigned() { - return new ColumnDefinitionBuilder(column_definition_node_js_1.ColumnDefinitionNode.cloneWith(this.#node, { unsigned: true })); - } - /** - * Adds a default value constraint for the column. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn('number_of_legs', 'integer', (col) => col.defaultTo(4)) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `pet` ( - * `number_of_legs` integer default 4 - * ) - * ``` - * - * Values passed to `defaultTo` are interpreted as value literals by default. You can define - * an arbitrary SQL expression using the {@link sql} template tag: - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('pet') - * .addColumn( - * 'created_at', - * 'timestamp', - * (col) => col.defaultTo(sql`CURRENT_TIMESTAMP`) - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `pet` ( - * `created_at` timestamp default CURRENT_TIMESTAMP - * ) - * ``` - */ - defaultTo(value) { - return new ColumnDefinitionBuilder(column_definition_node_js_1.ColumnDefinitionNode.cloneWith(this.#node, { - defaultTo: default_value_node_js_1.DefaultValueNode.create((0, default_value_parser_js_1.parseDefaultValueExpression)(value)), - })); - } - /** - * Adds a check constraint for the column. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('pet') - * .addColumn('number_of_legs', 'integer', (col) => - * col.check(sql`number_of_legs < 5`) - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `pet` ( - * `number_of_legs` integer check (number_of_legs < 5) - * ) - * ``` - */ - check(expression) { - return new ColumnDefinitionBuilder(column_definition_node_js_1.ColumnDefinitionNode.cloneWith(this.#node, { - check: check_constraint_node_js_1.CheckConstraintNode.create(expression.toOperationNode()), - })); - } - /** - * Makes the column a generated column using a `generated always as` statement. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .addColumn('full_name', 'varchar(255)', - * (col) => col.generatedAlwaysAs(sql`concat(first_name, ' ', last_name)`) - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `full_name` varchar(255) generated always as (concat(first_name, ' ', last_name)) - * ) - * ``` - */ - generatedAlwaysAs(expression) { - return new ColumnDefinitionBuilder(column_definition_node_js_1.ColumnDefinitionNode.cloneWith(this.#node, { - generated: generated_node_js_1.GeneratedNode.createWithExpression(expression.toOperationNode()), - })); - } - /** - * Adds the `generated always as identity` specifier. - * - * This only works on some dialects like PostgreSQL. - * - * For MS SQL Server (MSSQL)'s identity column use {@link identity}. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.generatedAlwaysAsIdentity().primaryKey()) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create table "person" ( - * "id" integer generated always as identity primary key - * ) - * ``` - */ - generatedAlwaysAsIdentity() { - return new ColumnDefinitionBuilder(column_definition_node_js_1.ColumnDefinitionNode.cloneWith(this.#node, { - generated: generated_node_js_1.GeneratedNode.create({ identity: true, always: true }), - })); - } - /** - * Adds the `generated by default as identity` specifier on supported dialects. - * - * This only works on some dialects like PostgreSQL. - * - * For MS SQL Server (MSSQL)'s identity column use {@link identity}. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.generatedByDefaultAsIdentity().primaryKey()) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create table "person" ( - * "id" integer generated by default as identity primary key - * ) - * ``` - */ - generatedByDefaultAsIdentity() { - return new ColumnDefinitionBuilder(column_definition_node_js_1.ColumnDefinitionNode.cloneWith(this.#node, { - generated: generated_node_js_1.GeneratedNode.create({ identity: true, byDefault: true }), - })); - } - /** - * Makes a generated column stored instead of virtual. This method can only - * be used with {@link generatedAlwaysAs} - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .addColumn('full_name', 'varchar(255)', (col) => col - * .generatedAlwaysAs(sql`concat(first_name, ' ', last_name)`) - * .stored() - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `full_name` varchar(255) generated always as (concat(first_name, ' ', last_name)) stored - * ) - * ``` - */ - stored() { - if (!this.#node.generated) { - throw new Error('stored() can only be called after generatedAlwaysAs'); - } - return new ColumnDefinitionBuilder(column_definition_node_js_1.ColumnDefinitionNode.cloneWith(this.#node, { - generated: generated_node_js_1.GeneratedNode.cloneWith(this.#node.generated, { - stored: true, - }), - })); - } - /** - * This can be used to add any additional SQL right after the column's data type. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.primaryKey()) - * .addColumn( - * 'first_name', - * 'varchar(36)', - * (col) => col.modifyFront(sql`collate utf8mb4_general_ci`).notNull() - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `id` integer primary key, - * `first_name` varchar(36) collate utf8mb4_general_ci not null - * ) - * ``` - */ - modifyFront(modifier) { - return new ColumnDefinitionBuilder(column_definition_node_js_1.ColumnDefinitionNode.cloneWithFrontModifier(this.#node, modifier.toOperationNode())); - } - /** - * Adds `nulls not distinct` specifier. - * Should be used with `unique` constraint. - * - * This only works on some dialects like PostgreSQL. - * - * ### Examples - * - * ```ts - * db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.primaryKey()) - * .addColumn('first_name', 'varchar(30)', col => col.unique().nullsNotDistinct()) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create table "person" ( - * "id" integer primary key, - * "first_name" varchar(30) unique nulls not distinct - * ) - * ``` - */ - nullsNotDistinct() { - return new ColumnDefinitionBuilder(column_definition_node_js_1.ColumnDefinitionNode.cloneWith(this.#node, { nullsNotDistinct: true })); - } - /** - * Adds `if not exists` specifier. This only works for PostgreSQL. - * - * ### Examples - * - * ```ts - * await db.schema - * .alterTable('person') - * .addColumn('email', 'varchar(255)', col => col.unique().ifNotExists()) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * alter table "person" add column if not exists "email" varchar(255) unique - * ``` - */ - ifNotExists() { - return new ColumnDefinitionBuilder(column_definition_node_js_1.ColumnDefinitionNode.cloneWith(this.#node, { ifNotExists: true })); - } - /** - * This can be used to add any additional SQL to the end of the column definition. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.primaryKey()) - * .addColumn( - * 'age', - * 'integer', - * col => col.unsigned() - * .notNull() - * .modifyEnd(sql`comment ${sql.lit('it is not polite to ask a woman her age')}`) - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `id` integer primary key, - * `age` integer unsigned not null comment 'it is not polite to ask a woman her age' - * ) - * ``` - */ - modifyEnd(modifier) { - return new ColumnDefinitionBuilder(column_definition_node_js_1.ColumnDefinitionNode.cloneWithEndModifier(this.#node, modifier.toOperationNode())); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#node; - } -} -exports.ColumnDefinitionBuilder = ColumnDefinitionBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/create-index-builder.d.ts b/node_modules/kysely/dist/cjs/schema/create-index-builder.d.ts deleted file mode 100644 index e29c40f..0000000 --- a/node_modules/kysely/dist/cjs/schema/create-index-builder.d.ts +++ /dev/null @@ -1,173 +0,0 @@ -import { CreateIndexNode, type IndexType } from '../operation-node/create-index-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { type ExtractColumnNameFromOrderedColumnName, type OrderedColumnName } from '../parser/reference-parser.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -import type { Expression } from '../expression/expression.js'; -import { type ComparisonOperatorExpression } from '../parser/binary-operation-parser.js'; -import type { ExpressionBuilder } from '../expression/expression-builder.js'; -import type { ShallowRecord, SqlBool } from '../util/type-utils.js'; -export declare class CreateIndexBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: CreateIndexBuilderProps); - /** - * Adds the "if not exists" modifier. - * - * If the index already exists, no error is thrown if this method has been called. - */ - ifNotExists(): CreateIndexBuilder; - /** - * Makes the index unique. - */ - unique(): CreateIndexBuilder; - /** - * Adds `nulls not distinct` specifier to index. - * This only works on some dialects like PostgreSQL. - * - * ### Examples - * - * ```ts - * db.schema.createIndex('person_first_name_index') - * .on('person') - * .column('first_name') - * .nullsNotDistinct() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create index "person_first_name_index" - * on "test" ("first_name") - * nulls not distinct; - * ``` - */ - nullsNotDistinct(): CreateIndexBuilder; - /** - * Specifies the table for the index. - */ - on(table: string): CreateIndexBuilder; - /** - * Adds a column to the index. - * - * Also see {@link columns} for adding multiple columns at once or {@link expression} - * for specifying an arbitrary expression. - * - * ### Examples - * - * ```ts - * await db.schema - * .createIndex('person_first_name_and_age_index') - * .on('person') - * .column('first_name') - * .column('age desc') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create index "person_first_name_and_age_index" on "person" ("first_name", "age" desc) - * ``` - */ - column(column: OrderedColumnName): CreateIndexBuilder>; - /** - * Specifies a list of columns for the index. - * - * Also see {@link column} for adding a single column or {@link expression} for - * specifying an arbitrary expression. - * - * ### Examples - * - * ```ts - * await db.schema - * .createIndex('person_first_name_and_age_index') - * .on('person') - * .columns(['first_name', 'age desc']) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create index "person_first_name_and_age_index" on "person" ("first_name", "age" desc) - * ``` - */ - columns(columns: OrderedColumnName[]): CreateIndexBuilder>; - /** - * Specifies an arbitrary expression for the index. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createIndex('person_first_name_index') - * .on('person') - * .expression(sql`first_name COLLATE "fi_FI"`) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create index "person_first_name_index" on "person" (first_name COLLATE "fi_FI") - * ``` - */ - expression(expression: Expression): CreateIndexBuilder; - /** - * Specifies the index type. - */ - using(indexType: IndexType): CreateIndexBuilder; - using(indexType: string): CreateIndexBuilder; - /** - * Adds a where clause to the query. This Effectively turns the index partial. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createIndex('orders_unbilled_index') - * .on('orders') - * .column('order_nr') - * .where(sql.ref('billed'), 'is not', true) - * .where('order_nr', 'like', '123%') - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create index "orders_unbilled_index" on "orders" ("order_nr") where "billed" is not true and "order_nr" like '123%' - * ``` - * - * Column names specified in {@link column} or {@link columns} are known at compile-time - * and can be referred to in the current query and context. - * - * Sometimes you may want to refer to columns that exist in the table but are not - * part of the current index. In that case you can refer to them using {@link sql} - * expressions. - * - * Parameters are always sent as literals due to database restrictions. - */ - where(lhs: C | Expression, op: ComparisonOperatorExpression, rhs: unknown): CreateIndexBuilder; - where(factory: (qb: ExpressionBuilder>, string>) => Expression): CreateIndexBuilder; - where(expression: Expression): CreateIndexBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): CreateIndexNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface CreateIndexBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: CreateIndexNode; -} diff --git a/node_modules/kysely/dist/cjs/schema/create-index-builder.js b/node_modules/kysely/dist/cjs/schema/create-index-builder.js deleted file mode 100644 index aba13d5..0000000 --- a/node_modules/kysely/dist/cjs/schema/create-index-builder.js +++ /dev/null @@ -1,202 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CreateIndexBuilder = void 0; -const create_index_node_js_1 = require("../operation-node/create-index-node.js"); -const raw_node_js_1 = require("../operation-node/raw-node.js"); -const reference_parser_js_1 = require("../parser/reference-parser.js"); -const table_parser_js_1 = require("../parser/table-parser.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -const binary_operation_parser_js_1 = require("../parser/binary-operation-parser.js"); -const query_node_js_1 = require("../operation-node/query-node.js"); -const immediate_value_transformer_js_1 = require("../plugin/immediate-value/immediate-value-transformer.js"); -class CreateIndexBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - /** - * Adds the "if not exists" modifier. - * - * If the index already exists, no error is thrown if this method has been called. - */ - ifNotExists() { - return new CreateIndexBuilder({ - ...this.#props, - node: create_index_node_js_1.CreateIndexNode.cloneWith(this.#props.node, { - ifNotExists: true, - }), - }); - } - /** - * Makes the index unique. - */ - unique() { - return new CreateIndexBuilder({ - ...this.#props, - node: create_index_node_js_1.CreateIndexNode.cloneWith(this.#props.node, { - unique: true, - }), - }); - } - /** - * Adds `nulls not distinct` specifier to index. - * This only works on some dialects like PostgreSQL. - * - * ### Examples - * - * ```ts - * db.schema.createIndex('person_first_name_index') - * .on('person') - * .column('first_name') - * .nullsNotDistinct() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create index "person_first_name_index" - * on "test" ("first_name") - * nulls not distinct; - * ``` - */ - nullsNotDistinct() { - return new CreateIndexBuilder({ - ...this.#props, - node: create_index_node_js_1.CreateIndexNode.cloneWith(this.#props.node, { - nullsNotDistinct: true, - }), - }); - } - /** - * Specifies the table for the index. - */ - on(table) { - return new CreateIndexBuilder({ - ...this.#props, - node: create_index_node_js_1.CreateIndexNode.cloneWith(this.#props.node, { - table: (0, table_parser_js_1.parseTable)(table), - }), - }); - } - /** - * Adds a column to the index. - * - * Also see {@link columns} for adding multiple columns at once or {@link expression} - * for specifying an arbitrary expression. - * - * ### Examples - * - * ```ts - * await db.schema - * .createIndex('person_first_name_and_age_index') - * .on('person') - * .column('first_name') - * .column('age desc') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create index "person_first_name_and_age_index" on "person" ("first_name", "age" desc) - * ``` - */ - column(column) { - return new CreateIndexBuilder({ - ...this.#props, - node: create_index_node_js_1.CreateIndexNode.cloneWithColumns(this.#props.node, [ - (0, reference_parser_js_1.parseOrderedColumnName)(column), - ]), - }); - } - /** - * Specifies a list of columns for the index. - * - * Also see {@link column} for adding a single column or {@link expression} for - * specifying an arbitrary expression. - * - * ### Examples - * - * ```ts - * await db.schema - * .createIndex('person_first_name_and_age_index') - * .on('person') - * .columns(['first_name', 'age desc']) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create index "person_first_name_and_age_index" on "person" ("first_name", "age" desc) - * ``` - */ - columns(columns) { - return new CreateIndexBuilder({ - ...this.#props, - node: create_index_node_js_1.CreateIndexNode.cloneWithColumns(this.#props.node, columns.map(reference_parser_js_1.parseOrderedColumnName)), - }); - } - /** - * Specifies an arbitrary expression for the index. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createIndex('person_first_name_index') - * .on('person') - * .expression(sql`first_name COLLATE "fi_FI"`) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create index "person_first_name_index" on "person" (first_name COLLATE "fi_FI") - * ``` - */ - expression(expression) { - return new CreateIndexBuilder({ - ...this.#props, - node: create_index_node_js_1.CreateIndexNode.cloneWithColumns(this.#props.node, [ - expression.toOperationNode(), - ]), - }); - } - using(indexType) { - return new CreateIndexBuilder({ - ...this.#props, - node: create_index_node_js_1.CreateIndexNode.cloneWith(this.#props.node, { - using: raw_node_js_1.RawNode.createWithSql(indexType), - }), - }); - } - where(...args) { - const transformer = new immediate_value_transformer_js_1.ImmediateValueTransformer(); - return new CreateIndexBuilder({ - ...this.#props, - node: query_node_js_1.QueryNode.cloneWithWhere(this.#props.node, transformer.transformNode((0, binary_operation_parser_js_1.parseValueBinaryOperationOrExpression)(args), this.#props.queryId)), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} -exports.CreateIndexBuilder = CreateIndexBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/create-schema-builder.d.ts b/node_modules/kysely/dist/cjs/schema/create-schema-builder.d.ts deleted file mode 100644 index 8917e68..0000000 --- a/node_modules/kysely/dist/cjs/schema/create-schema-builder.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { CreateSchemaNode } from '../operation-node/create-schema-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -export declare class CreateSchemaBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: CreateSchemaBuilderProps); - ifNotExists(): CreateSchemaBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): CreateSchemaNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface CreateSchemaBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: CreateSchemaNode; -} diff --git a/node_modules/kysely/dist/cjs/schema/create-schema-builder.js b/node_modules/kysely/dist/cjs/schema/create-schema-builder.js deleted file mode 100644 index 98bcaa3..0000000 --- a/node_modules/kysely/dist/cjs/schema/create-schema-builder.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CreateSchemaBuilder = void 0; -const create_schema_node_js_1 = require("../operation-node/create-schema-node.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -class CreateSchemaBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - ifNotExists() { - return new CreateSchemaBuilder({ - ...this.#props, - node: create_schema_node_js_1.CreateSchemaNode.cloneWith(this.#props.node, { ifNotExists: true }), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} -exports.CreateSchemaBuilder = CreateSchemaBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/create-table-builder.d.ts b/node_modules/kysely/dist/cjs/schema/create-table-builder.d.ts deleted file mode 100644 index 8516e12..0000000 --- a/node_modules/kysely/dist/cjs/schema/create-table-builder.d.ts +++ /dev/null @@ -1,331 +0,0 @@ -import { CreateTableNode, type OnCommitAction } from '../operation-node/create-table-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import { ColumnDefinitionBuilder } from './column-definition-builder.js'; -import type { QueryId } from '../util/query-id.js'; -import { type ForeignKeyConstraintBuilderCallback } from './foreign-key-constraint-builder.js'; -import { type DataTypeExpression } from '../parser/data-type-parser.js'; -import type { Expression } from '../expression/expression.js'; -import { type UniqueConstraintNodeBuilderCallback } from './unique-constraint-builder.js'; -import { type PrimaryKeyConstraintBuilderCallback } from './primary-key-constraint-builder.js'; -import { type CheckConstraintBuilderCallback } from './check-constraint-builder.js'; -/** - * This builder can be used to create a `create table` query. - */ -export declare class CreateTableBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: CreateTableBuilderProps); - /** - * Adds the "temporary" modifier. - * - * Use this to create a temporary table. - */ - temporary(): CreateTableBuilder; - /** - * Adds an "on commit" statement. - * - * This can be used in conjunction with temporary tables on supported databases - * like PostgreSQL. - */ - onCommit(onCommit: OnCommitAction): CreateTableBuilder; - /** - * Adds the "if not exists" modifier. - * - * If the table already exists, no error is thrown if this method has been called. - */ - ifNotExists(): CreateTableBuilder; - /** - * Adds a column to the table. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', (col) => col.autoIncrement().primaryKey()) - * .addColumn('first_name', 'varchar(50)', (col) => col.notNull()) - * .addColumn('last_name', 'varchar(255)') - * .addColumn('bank_balance', 'numeric(8, 2)') - * // You can specify any data type using the `sql` tag if the types - * // don't include it. - * .addColumn('data', sql`any_type_here`) - * .addColumn('parent_id', 'integer', (col) => - * col.references('person.id').onDelete('cascade') - * ) - * ``` - * - * With this method, it's once again good to remember that Kysely just builds the - * query and doesn't provide the same API for all databases. For example, some - * databases like older MySQL don't support the `references` statement in the - * column definition. Instead foreign key constraints need to be defined in the - * `create table` query. See the next example: - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', (col) => col.primaryKey()) - * .addColumn('parent_id', 'integer') - * .addForeignKeyConstraint( - * 'person_parent_id_fk', - * ['parent_id'], - * 'person', - * ['id'], - * (cb) => cb.onDelete('cascade') - * ) - * .execute() - * ``` - * - * Another good example is that PostgreSQL doesn't support the `auto_increment` - * keyword and you need to define an autoincrementing column for example using - * `serial`: - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'serial', (col) => col.primaryKey()) - * .execute() - * ``` - */ - addColumn(columnName: CN, dataType: DataTypeExpression, build?: ColumnBuilderCallback): CreateTableBuilder; - /** - * Adds a primary key constraint for one or more columns. - * - * The constraint name can be anything you want, but it must be unique - * across the whole database. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('first_name', 'varchar(64)') - * .addColumn('last_name', 'varchar(64)') - * .addPrimaryKeyConstraint('primary_key', ['first_name', 'last_name']) - * .execute() - * ``` - */ - addPrimaryKeyConstraint(constraintName: string, columns: C[], build?: PrimaryKeyConstraintBuilderCallback): CreateTableBuilder; - /** - * Adds a unique constraint for one or more columns. - * - * The constraint name can be anything you want, but it must be unique - * across the whole database. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('first_name', 'varchar(64)') - * .addColumn('last_name', 'varchar(64)') - * .addUniqueConstraint( - * 'first_name_last_name_unique', - * ['first_name', 'last_name'] - * ) - * .execute() - * ``` - * - * In dialects such as PostgreSQL you can specify `nulls not distinct` as follows: - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('first_name', 'varchar(64)') - * .addColumn('last_name', 'varchar(64)') - * .addUniqueConstraint( - * 'first_name_last_name_unique', - * ['first_name', 'last_name'], - * (cb) => cb.nullsNotDistinct() - * ) - * .execute() - * ``` - */ - addUniqueConstraint(constraintName: string, columns: C[], build?: UniqueConstraintNodeBuilderCallback): CreateTableBuilder; - /** - * Adds a check constraint. - * - * The constraint name can be anything you want, but it must be unique - * across the whole database. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('animal') - * .addColumn('number_of_legs', 'integer') - * .addCheckConstraint('check_legs', sql`number_of_legs < 5`) - * .execute() - * ``` - */ - addCheckConstraint(constraintName: string, checkExpression: Expression, build?: CheckConstraintBuilderCallback): CreateTableBuilder; - /** - * Adds a foreign key constraint. - * - * The constraint name can be anything you want, but it must be unique - * across the whole database. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn('owner_id', 'integer') - * .addForeignKeyConstraint( - * 'owner_id_foreign', - * ['owner_id'], - * 'person', - * ['id'], - * ) - * .execute() - * ``` - * - * Add constraint for multiple columns: - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn('owner_id1', 'integer') - * .addColumn('owner_id2', 'integer') - * .addForeignKeyConstraint( - * 'owner_id_foreign', - * ['owner_id1', 'owner_id2'], - * 'person', - * ['id1', 'id2'], - * (cb) => cb.onDelete('cascade') - * ) - * .execute() - * ``` - */ - addForeignKeyConstraint(constraintName: string, columns: C[], targetTable: string, targetColumns: string[], build?: ForeignKeyConstraintBuilderCallback): CreateTableBuilder; - /** - * This can be used to add any additional SQL to the front of the query __after__ the `create` keyword. - * - * Also see {@link temporary}. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .modifyFront(sql`global temporary`) - * .addColumn('id', 'integer', col => col.primaryKey()) - * .addColumn('first_name', 'varchar(64)', col => col.notNull()) - * .addColumn('last_name', 'varchar(64)', col => col.notNull()) - * .execute() - * ``` - * - * The generated SQL (Postgres): - * - * ```sql - * create global temporary table "person" ( - * "id" integer primary key, - * "first_name" varchar(64) not null, - * "last_name" varchar(64) not null - * ) - * ``` - */ - modifyFront(modifier: Expression): CreateTableBuilder; - /** - * This can be used to add any additional SQL to the end of the query. - * - * Also see {@link onCommit}. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.primaryKey()) - * .addColumn('first_name', 'varchar(64)', col => col.notNull()) - * .addColumn('last_name', 'varchar(64)', col => col.notNull()) - * .modifyEnd(sql`collate utf8_unicode_ci`) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `id` integer primary key, - * `first_name` varchar(64) not null, - * `last_name` varchar(64) not null - * ) collate utf8_unicode_ci - * ``` - */ - modifyEnd(modifier: Expression): CreateTableBuilder; - /** - * Allows to create table from `select` query. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('copy') - * .temporary() - * .as(db.selectFrom('person').select(['first_name', 'last_name'])) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create temporary table "copy" as - * select "first_name", "last_name" from "person" - * ``` - */ - as(expression: Expression): CreateTableBuilder; - /** - * Calls the given function passing `this` as the only argument. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('test') - * .$call((builder) => builder.addColumn('id', 'integer')) - * .execute() - * ``` - * - * This is useful for creating reusable functions that can be called with a builder. - * - * ```ts - * import { type CreateTableBuilder, sql } from 'kysely' - * - * const addDefaultColumns = (ctb: CreateTableBuilder) => { - * return ctb - * .addColumn('id', 'integer', (col) => col.notNull()) - * .addColumn('created_at', 'date', (col) => - * col.notNull().defaultTo(sql`now()`) - * ) - * .addColumn('updated_at', 'date', (col) => - * col.notNull().defaultTo(sql`now()`) - * ) - * } - * - * await db.schema - * .createTable('test') - * .$call(addDefaultColumns) - * .execute() - * ``` - */ - $call(func: (qb: this) => T): T; - toOperationNode(): CreateTableNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface CreateTableBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: CreateTableNode; -} -export type ColumnBuilderCallback = (builder: ColumnDefinitionBuilder) => ColumnDefinitionBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/create-table-builder.js b/node_modules/kysely/dist/cjs/schema/create-table-builder.js deleted file mode 100644 index 88da2a9..0000000 --- a/node_modules/kysely/dist/cjs/schema/create-table-builder.js +++ /dev/null @@ -1,411 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CreateTableBuilder = void 0; -const column_definition_node_js_1 = require("../operation-node/column-definition-node.js"); -const create_table_node_js_1 = require("../operation-node/create-table-node.js"); -const column_definition_builder_js_1 = require("./column-definition-builder.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -const foreign_key_constraint_node_js_1 = require("../operation-node/foreign-key-constraint-node.js"); -const column_node_js_1 = require("../operation-node/column-node.js"); -const foreign_key_constraint_builder_js_1 = require("./foreign-key-constraint-builder.js"); -const data_type_parser_js_1 = require("../parser/data-type-parser.js"); -const primary_key_constraint_node_js_1 = require("../operation-node/primary-key-constraint-node.js"); -const unique_constraint_node_js_1 = require("../operation-node/unique-constraint-node.js"); -const check_constraint_node_js_1 = require("../operation-node/check-constraint-node.js"); -const table_parser_js_1 = require("../parser/table-parser.js"); -const on_commit_action_parse_js_1 = require("../parser/on-commit-action-parse.js"); -const unique_constraint_builder_js_1 = require("./unique-constraint-builder.js"); -const expression_parser_js_1 = require("../parser/expression-parser.js"); -const primary_key_constraint_builder_js_1 = require("./primary-key-constraint-builder.js"); -const check_constraint_builder_js_1 = require("./check-constraint-builder.js"); -/** - * This builder can be used to create a `create table` query. - */ -class CreateTableBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - /** - * Adds the "temporary" modifier. - * - * Use this to create a temporary table. - */ - temporary() { - return new CreateTableBuilder({ - ...this.#props, - node: create_table_node_js_1.CreateTableNode.cloneWith(this.#props.node, { - temporary: true, - }), - }); - } - /** - * Adds an "on commit" statement. - * - * This can be used in conjunction with temporary tables on supported databases - * like PostgreSQL. - */ - onCommit(onCommit) { - return new CreateTableBuilder({ - ...this.#props, - node: create_table_node_js_1.CreateTableNode.cloneWith(this.#props.node, { - onCommit: (0, on_commit_action_parse_js_1.parseOnCommitAction)(onCommit), - }), - }); - } - /** - * Adds the "if not exists" modifier. - * - * If the table already exists, no error is thrown if this method has been called. - */ - ifNotExists() { - return new CreateTableBuilder({ - ...this.#props, - node: create_table_node_js_1.CreateTableNode.cloneWith(this.#props.node, { - ifNotExists: true, - }), - }); - } - /** - * Adds a column to the table. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', (col) => col.autoIncrement().primaryKey()) - * .addColumn('first_name', 'varchar(50)', (col) => col.notNull()) - * .addColumn('last_name', 'varchar(255)') - * .addColumn('bank_balance', 'numeric(8, 2)') - * // You can specify any data type using the `sql` tag if the types - * // don't include it. - * .addColumn('data', sql`any_type_here`) - * .addColumn('parent_id', 'integer', (col) => - * col.references('person.id').onDelete('cascade') - * ) - * ``` - * - * With this method, it's once again good to remember that Kysely just builds the - * query and doesn't provide the same API for all databases. For example, some - * databases like older MySQL don't support the `references` statement in the - * column definition. Instead foreign key constraints need to be defined in the - * `create table` query. See the next example: - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', (col) => col.primaryKey()) - * .addColumn('parent_id', 'integer') - * .addForeignKeyConstraint( - * 'person_parent_id_fk', - * ['parent_id'], - * 'person', - * ['id'], - * (cb) => cb.onDelete('cascade') - * ) - * .execute() - * ``` - * - * Another good example is that PostgreSQL doesn't support the `auto_increment` - * keyword and you need to define an autoincrementing column for example using - * `serial`: - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'serial', (col) => col.primaryKey()) - * .execute() - * ``` - */ - addColumn(columnName, dataType, build = object_utils_js_1.noop) { - const columnBuilder = build(new column_definition_builder_js_1.ColumnDefinitionBuilder(column_definition_node_js_1.ColumnDefinitionNode.create(columnName, (0, data_type_parser_js_1.parseDataTypeExpression)(dataType)))); - return new CreateTableBuilder({ - ...this.#props, - node: create_table_node_js_1.CreateTableNode.cloneWithColumn(this.#props.node, columnBuilder.toOperationNode()), - }); - } - /** - * Adds a primary key constraint for one or more columns. - * - * The constraint name can be anything you want, but it must be unique - * across the whole database. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('first_name', 'varchar(64)') - * .addColumn('last_name', 'varchar(64)') - * .addPrimaryKeyConstraint('primary_key', ['first_name', 'last_name']) - * .execute() - * ``` - */ - addPrimaryKeyConstraint(constraintName, columns, build = object_utils_js_1.noop) { - const constraintBuilder = build(new primary_key_constraint_builder_js_1.PrimaryKeyConstraintBuilder(primary_key_constraint_node_js_1.PrimaryKeyConstraintNode.create(columns, constraintName))); - return new CreateTableBuilder({ - ...this.#props, - node: create_table_node_js_1.CreateTableNode.cloneWithConstraint(this.#props.node, constraintBuilder.toOperationNode()), - }); - } - /** - * Adds a unique constraint for one or more columns. - * - * The constraint name can be anything you want, but it must be unique - * across the whole database. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('first_name', 'varchar(64)') - * .addColumn('last_name', 'varchar(64)') - * .addUniqueConstraint( - * 'first_name_last_name_unique', - * ['first_name', 'last_name'] - * ) - * .execute() - * ``` - * - * In dialects such as PostgreSQL you can specify `nulls not distinct` as follows: - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('first_name', 'varchar(64)') - * .addColumn('last_name', 'varchar(64)') - * .addUniqueConstraint( - * 'first_name_last_name_unique', - * ['first_name', 'last_name'], - * (cb) => cb.nullsNotDistinct() - * ) - * .execute() - * ``` - */ - addUniqueConstraint(constraintName, columns, build = object_utils_js_1.noop) { - const uniqueConstraintBuilder = build(new unique_constraint_builder_js_1.UniqueConstraintNodeBuilder(unique_constraint_node_js_1.UniqueConstraintNode.create(columns, constraintName))); - return new CreateTableBuilder({ - ...this.#props, - node: create_table_node_js_1.CreateTableNode.cloneWithConstraint(this.#props.node, uniqueConstraintBuilder.toOperationNode()), - }); - } - /** - * Adds a check constraint. - * - * The constraint name can be anything you want, but it must be unique - * across the whole database. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('animal') - * .addColumn('number_of_legs', 'integer') - * .addCheckConstraint('check_legs', sql`number_of_legs < 5`) - * .execute() - * ``` - */ - addCheckConstraint(constraintName, checkExpression, build = object_utils_js_1.noop) { - const constraintBuilder = build(new check_constraint_builder_js_1.CheckConstraintBuilder(check_constraint_node_js_1.CheckConstraintNode.create(checkExpression.toOperationNode(), constraintName))); - return new CreateTableBuilder({ - ...this.#props, - node: create_table_node_js_1.CreateTableNode.cloneWithConstraint(this.#props.node, constraintBuilder.toOperationNode()), - }); - } - /** - * Adds a foreign key constraint. - * - * The constraint name can be anything you want, but it must be unique - * across the whole database. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn('owner_id', 'integer') - * .addForeignKeyConstraint( - * 'owner_id_foreign', - * ['owner_id'], - * 'person', - * ['id'], - * ) - * .execute() - * ``` - * - * Add constraint for multiple columns: - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn('owner_id1', 'integer') - * .addColumn('owner_id2', 'integer') - * .addForeignKeyConstraint( - * 'owner_id_foreign', - * ['owner_id1', 'owner_id2'], - * 'person', - * ['id1', 'id2'], - * (cb) => cb.onDelete('cascade') - * ) - * .execute() - * ``` - */ - addForeignKeyConstraint(constraintName, columns, targetTable, targetColumns, build = object_utils_js_1.noop) { - const builder = build(new foreign_key_constraint_builder_js_1.ForeignKeyConstraintBuilder(foreign_key_constraint_node_js_1.ForeignKeyConstraintNode.create(columns.map(column_node_js_1.ColumnNode.create), (0, table_parser_js_1.parseTable)(targetTable), targetColumns.map(column_node_js_1.ColumnNode.create), constraintName))); - return new CreateTableBuilder({ - ...this.#props, - node: create_table_node_js_1.CreateTableNode.cloneWithConstraint(this.#props.node, builder.toOperationNode()), - }); - } - /** - * This can be used to add any additional SQL to the front of the query __after__ the `create` keyword. - * - * Also see {@link temporary}. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .modifyFront(sql`global temporary`) - * .addColumn('id', 'integer', col => col.primaryKey()) - * .addColumn('first_name', 'varchar(64)', col => col.notNull()) - * .addColumn('last_name', 'varchar(64)', col => col.notNull()) - * .execute() - * ``` - * - * The generated SQL (Postgres): - * - * ```sql - * create global temporary table "person" ( - * "id" integer primary key, - * "first_name" varchar(64) not null, - * "last_name" varchar(64) not null - * ) - * ``` - */ - modifyFront(modifier) { - return new CreateTableBuilder({ - ...this.#props, - node: create_table_node_js_1.CreateTableNode.cloneWithFrontModifier(this.#props.node, modifier.toOperationNode()), - }); - } - /** - * This can be used to add any additional SQL to the end of the query. - * - * Also see {@link onCommit}. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.primaryKey()) - * .addColumn('first_name', 'varchar(64)', col => col.notNull()) - * .addColumn('last_name', 'varchar(64)', col => col.notNull()) - * .modifyEnd(sql`collate utf8_unicode_ci`) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `id` integer primary key, - * `first_name` varchar(64) not null, - * `last_name` varchar(64) not null - * ) collate utf8_unicode_ci - * ``` - */ - modifyEnd(modifier) { - return new CreateTableBuilder({ - ...this.#props, - node: create_table_node_js_1.CreateTableNode.cloneWithEndModifier(this.#props.node, modifier.toOperationNode()), - }); - } - /** - * Allows to create table from `select` query. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('copy') - * .temporary() - * .as(db.selectFrom('person').select(['first_name', 'last_name'])) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create temporary table "copy" as - * select "first_name", "last_name" from "person" - * ``` - */ - as(expression) { - return new CreateTableBuilder({ - ...this.#props, - node: create_table_node_js_1.CreateTableNode.cloneWith(this.#props.node, { - selectQuery: (0, expression_parser_js_1.parseExpression)(expression), - }), - }); - } - /** - * Calls the given function passing `this` as the only argument. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('test') - * .$call((builder) => builder.addColumn('id', 'integer')) - * .execute() - * ``` - * - * This is useful for creating reusable functions that can be called with a builder. - * - * ```ts - * import { type CreateTableBuilder, sql } from 'kysely' - * - * const addDefaultColumns = (ctb: CreateTableBuilder) => { - * return ctb - * .addColumn('id', 'integer', (col) => col.notNull()) - * .addColumn('created_at', 'date', (col) => - * col.notNull().defaultTo(sql`now()`) - * ) - * .addColumn('updated_at', 'date', (col) => - * col.notNull().defaultTo(sql`now()`) - * ) - * } - * - * await db.schema - * .createTable('test') - * .$call(addDefaultColumns) - * .execute() - * ``` - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} -exports.CreateTableBuilder = CreateTableBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/create-type-builder.d.ts b/node_modules/kysely/dist/cjs/schema/create-type-builder.d.ts deleted file mode 100644 index 9989c49..0000000 --- a/node_modules/kysely/dist/cjs/schema/create-type-builder.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -import { CreateTypeNode } from '../operation-node/create-type-node.js'; -export declare class CreateTypeBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: CreateTypeBuilderProps); - toOperationNode(): CreateTypeNode; - /** - * Creates an anum type. - * - * ### Examples - * - * ```ts - * db.schema.createType('species').asEnum(['cat', 'dog', 'frog']) - * ``` - */ - asEnum(values: readonly string[]): CreateTypeBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - compile(): CompiledQuery; - execute(): Promise; -} -export interface CreateTypeBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: CreateTypeNode; -} diff --git a/node_modules/kysely/dist/cjs/schema/create-type-builder.js b/node_modules/kysely/dist/cjs/schema/create-type-builder.js deleted file mode 100644 index d0d0c32..0000000 --- a/node_modules/kysely/dist/cjs/schema/create-type-builder.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CreateTypeBuilder = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const create_type_node_js_1 = require("../operation-node/create-type-node.js"); -class CreateTypeBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - /** - * Creates an anum type. - * - * ### Examples - * - * ```ts - * db.schema.createType('species').asEnum(['cat', 'dog', 'frog']) - * ``` - */ - asEnum(values) { - return new CreateTypeBuilder({ - ...this.#props, - node: create_type_node_js_1.CreateTypeNode.cloneWithEnum(this.#props.node, values), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} -exports.CreateTypeBuilder = CreateTypeBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/create-view-builder.d.ts b/node_modules/kysely/dist/cjs/schema/create-view-builder.d.ts deleted file mode 100644 index 1bb4a46..0000000 --- a/node_modules/kysely/dist/cjs/schema/create-view-builder.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -import { CreateViewNode } from '../operation-node/create-view-node.js'; -import type { RawBuilder } from '../raw-builder/raw-builder.js'; -import type { SelectQueryBuilder } from '../query-builder/select-query-builder.js'; -export declare class CreateViewBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: CreateViewBuilderProps); - /** - * Adds the "temporary" modifier. - * - * Use this to create a temporary view. - */ - temporary(): CreateViewBuilder; - materialized(): CreateViewBuilder; - /** - * Only implemented on some dialects like SQLite. On most dialects, use {@link orReplace}. - */ - ifNotExists(): CreateViewBuilder; - orReplace(): CreateViewBuilder; - columns(columns: string[]): CreateViewBuilder; - /** - * Sets the select query or a `values` statement that creates the view. - * - * WARNING! - * Some dialects don't support parameterized queries in DDL statements and therefore - * the query or raw {@link sql } expression passed here is interpolated into a single - * string opening an SQL injection vulnerability. DO NOT pass unchecked user input - * into the query or raw expression passed to this method! - */ - as(query: SelectQueryBuilder | RawBuilder): CreateViewBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): CreateViewNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface CreateViewBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: CreateViewNode; -} diff --git a/node_modules/kysely/dist/cjs/schema/create-view-builder.js b/node_modules/kysely/dist/cjs/schema/create-view-builder.js deleted file mode 100644 index 7ce9ad0..0000000 --- a/node_modules/kysely/dist/cjs/schema/create-view-builder.js +++ /dev/null @@ -1,98 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CreateViewBuilder = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const create_view_node_js_1 = require("../operation-node/create-view-node.js"); -const reference_parser_js_1 = require("../parser/reference-parser.js"); -const immediate_value_plugin_js_1 = require("../plugin/immediate-value/immediate-value-plugin.js"); -class CreateViewBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - /** - * Adds the "temporary" modifier. - * - * Use this to create a temporary view. - */ - temporary() { - return new CreateViewBuilder({ - ...this.#props, - node: create_view_node_js_1.CreateViewNode.cloneWith(this.#props.node, { - temporary: true, - }), - }); - } - materialized() { - return new CreateViewBuilder({ - ...this.#props, - node: create_view_node_js_1.CreateViewNode.cloneWith(this.#props.node, { - materialized: true, - }), - }); - } - /** - * Only implemented on some dialects like SQLite. On most dialects, use {@link orReplace}. - */ - ifNotExists() { - return new CreateViewBuilder({ - ...this.#props, - node: create_view_node_js_1.CreateViewNode.cloneWith(this.#props.node, { - ifNotExists: true, - }), - }); - } - orReplace() { - return new CreateViewBuilder({ - ...this.#props, - node: create_view_node_js_1.CreateViewNode.cloneWith(this.#props.node, { - orReplace: true, - }), - }); - } - columns(columns) { - return new CreateViewBuilder({ - ...this.#props, - node: create_view_node_js_1.CreateViewNode.cloneWith(this.#props.node, { - columns: columns.map(reference_parser_js_1.parseColumnName), - }), - }); - } - /** - * Sets the select query or a `values` statement that creates the view. - * - * WARNING! - * Some dialects don't support parameterized queries in DDL statements and therefore - * the query or raw {@link sql } expression passed here is interpolated into a single - * string opening an SQL injection vulnerability. DO NOT pass unchecked user input - * into the query or raw expression passed to this method! - */ - as(query) { - const queryNode = query - .withPlugin(new immediate_value_plugin_js_1.ImmediateValuePlugin()) - .toOperationNode(); - return new CreateViewBuilder({ - ...this.#props, - node: create_view_node_js_1.CreateViewNode.cloneWith(this.#props.node, { - as: queryNode, - }), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} -exports.CreateViewBuilder = CreateViewBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/drop-index-builder.d.ts b/node_modules/kysely/dist/cjs/schema/drop-index-builder.d.ts deleted file mode 100644 index 7b0c816..0000000 --- a/node_modules/kysely/dist/cjs/schema/drop-index-builder.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { DropIndexNode } from '../operation-node/drop-index-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -export declare class DropIndexBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: DropIndexBuilderProps); - /** - * Specifies the table the index was created for. This is not needed - * in all dialects. - */ - on(table: string): DropIndexBuilder; - ifExists(): DropIndexBuilder; - cascade(): DropIndexBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): DropIndexNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface DropIndexBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: DropIndexNode; -} diff --git a/node_modules/kysely/dist/cjs/schema/drop-index-builder.js b/node_modules/kysely/dist/cjs/schema/drop-index-builder.js deleted file mode 100644 index 46560a7..0000000 --- a/node_modules/kysely/dist/cjs/schema/drop-index-builder.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DropIndexBuilder = void 0; -const drop_index_node_js_1 = require("../operation-node/drop-index-node.js"); -const table_parser_js_1 = require("../parser/table-parser.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -class DropIndexBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - /** - * Specifies the table the index was created for. This is not needed - * in all dialects. - */ - on(table) { - return new DropIndexBuilder({ - ...this.#props, - node: drop_index_node_js_1.DropIndexNode.cloneWith(this.#props.node, { - table: (0, table_parser_js_1.parseTable)(table), - }), - }); - } - ifExists() { - return new DropIndexBuilder({ - ...this.#props, - node: drop_index_node_js_1.DropIndexNode.cloneWith(this.#props.node, { - ifExists: true, - }), - }); - } - cascade() { - return new DropIndexBuilder({ - ...this.#props, - node: drop_index_node_js_1.DropIndexNode.cloneWith(this.#props.node, { - cascade: true, - }), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} -exports.DropIndexBuilder = DropIndexBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/drop-schema-builder.d.ts b/node_modules/kysely/dist/cjs/schema/drop-schema-builder.d.ts deleted file mode 100644 index 0e831b8..0000000 --- a/node_modules/kysely/dist/cjs/schema/drop-schema-builder.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { DropSchemaNode } from '../operation-node/drop-schema-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -export declare class DropSchemaBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: DropSchemaBuilderProps); - ifExists(): DropSchemaBuilder; - cascade(): DropSchemaBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): DropSchemaNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface DropSchemaBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: DropSchemaNode; -} diff --git a/node_modules/kysely/dist/cjs/schema/drop-schema-builder.js b/node_modules/kysely/dist/cjs/schema/drop-schema-builder.js deleted file mode 100644 index bc2662e..0000000 --- a/node_modules/kysely/dist/cjs/schema/drop-schema-builder.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DropSchemaBuilder = void 0; -const drop_schema_node_js_1 = require("../operation-node/drop-schema-node.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -class DropSchemaBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - ifExists() { - return new DropSchemaBuilder({ - ...this.#props, - node: drop_schema_node_js_1.DropSchemaNode.cloneWith(this.#props.node, { - ifExists: true, - }), - }); - } - cascade() { - return new DropSchemaBuilder({ - ...this.#props, - node: drop_schema_node_js_1.DropSchemaNode.cloneWith(this.#props.node, { - cascade: true, - }), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} -exports.DropSchemaBuilder = DropSchemaBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/drop-table-builder.d.ts b/node_modules/kysely/dist/cjs/schema/drop-table-builder.d.ts deleted file mode 100644 index 1f566c7..0000000 --- a/node_modules/kysely/dist/cjs/schema/drop-table-builder.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { DropTableNode } from '../operation-node/drop-table-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -export declare class DropTableBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: DropTableBuilderProps); - ifExists(): DropTableBuilder; - cascade(): DropTableBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): DropTableNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface DropTableBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: DropTableNode; -} diff --git a/node_modules/kysely/dist/cjs/schema/drop-table-builder.js b/node_modules/kysely/dist/cjs/schema/drop-table-builder.js deleted file mode 100644 index 09abe6e..0000000 --- a/node_modules/kysely/dist/cjs/schema/drop-table-builder.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DropTableBuilder = void 0; -const drop_table_node_js_1 = require("../operation-node/drop-table-node.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -class DropTableBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - ifExists() { - return new DropTableBuilder({ - ...this.#props, - node: drop_table_node_js_1.DropTableNode.cloneWith(this.#props.node, { - ifExists: true, - }), - }); - } - cascade() { - return new DropTableBuilder({ - ...this.#props, - node: drop_table_node_js_1.DropTableNode.cloneWith(this.#props.node, { - cascade: true, - }), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} -exports.DropTableBuilder = DropTableBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/drop-type-builder.d.ts b/node_modules/kysely/dist/cjs/schema/drop-type-builder.d.ts deleted file mode 100644 index f672f0c..0000000 --- a/node_modules/kysely/dist/cjs/schema/drop-type-builder.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { DropTypeNode } from '../operation-node/drop-type-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -export declare class DropTypeBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: DropTypeBuilderProps); - ifExists(): DropTypeBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): DropTypeNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface DropTypeBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: DropTypeNode; -} diff --git a/node_modules/kysely/dist/cjs/schema/drop-type-builder.js b/node_modules/kysely/dist/cjs/schema/drop-type-builder.js deleted file mode 100644 index 27547cb..0000000 --- a/node_modules/kysely/dist/cjs/schema/drop-type-builder.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DropTypeBuilder = void 0; -const drop_type_node_js_1 = require("../operation-node/drop-type-node.js"); -const object_utils_js_1 = require("../util/object-utils.js"); -class DropTypeBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - ifExists() { - return new DropTypeBuilder({ - ...this.#props, - node: drop_type_node_js_1.DropTypeNode.cloneWith(this.#props.node, { - ifExists: true, - }), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} -exports.DropTypeBuilder = DropTypeBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/drop-view-builder.d.ts b/node_modules/kysely/dist/cjs/schema/drop-view-builder.d.ts deleted file mode 100644 index 6104211..0000000 --- a/node_modules/kysely/dist/cjs/schema/drop-view-builder.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -import { DropViewNode } from '../operation-node/drop-view-node.js'; -export declare class DropViewBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: DropViewBuilderProps); - materialized(): DropViewBuilder; - ifExists(): DropViewBuilder; - cascade(): DropViewBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): DropViewNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface DropViewBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: DropViewNode; -} diff --git a/node_modules/kysely/dist/cjs/schema/drop-view-builder.js b/node_modules/kysely/dist/cjs/schema/drop-view-builder.js deleted file mode 100644 index e703060..0000000 --- a/node_modules/kysely/dist/cjs/schema/drop-view-builder.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DropViewBuilder = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const drop_view_node_js_1 = require("../operation-node/drop-view-node.js"); -class DropViewBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - materialized() { - return new DropViewBuilder({ - ...this.#props, - node: drop_view_node_js_1.DropViewNode.cloneWith(this.#props.node, { - materialized: true, - }), - }); - } - ifExists() { - return new DropViewBuilder({ - ...this.#props, - node: drop_view_node_js_1.DropViewNode.cloneWith(this.#props.node, { - ifExists: true, - }), - }); - } - cascade() { - return new DropViewBuilder({ - ...this.#props, - node: drop_view_node_js_1.DropViewNode.cloneWith(this.#props.node, { - cascade: true, - }), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} -exports.DropViewBuilder = DropViewBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/foreign-key-constraint-builder.d.ts b/node_modules/kysely/dist/cjs/schema/foreign-key-constraint-builder.d.ts deleted file mode 100644 index 770e874..0000000 --- a/node_modules/kysely/dist/cjs/schema/foreign-key-constraint-builder.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { ForeignKeyConstraintNode } from '../operation-node/foreign-key-constraint-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { OnModifyForeignAction } from '../operation-node/references-node.js'; -export interface ForeignKeyConstraintBuilderInterface { - onDelete(onDelete: OnModifyForeignAction): R; - onUpdate(onUpdate: OnModifyForeignAction): R; - deferrable(): R; - notDeferrable(): R; - initiallyDeferred(): R; - initiallyImmediate(): R; -} -export declare class ForeignKeyConstraintBuilder implements ForeignKeyConstraintBuilderInterface, OperationNodeSource { - #private; - constructor(node: ForeignKeyConstraintNode); - onDelete(onDelete: OnModifyForeignAction): ForeignKeyConstraintBuilder; - onUpdate(onUpdate: OnModifyForeignAction): ForeignKeyConstraintBuilder; - deferrable(): ForeignKeyConstraintBuilder; - notDeferrable(): ForeignKeyConstraintBuilder; - initiallyDeferred(): ForeignKeyConstraintBuilder; - initiallyImmediate(): ForeignKeyConstraintBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): ForeignKeyConstraintNode; -} -export type ForeignKeyConstraintBuilderCallback = (builder: ForeignKeyConstraintBuilder) => ForeignKeyConstraintBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/foreign-key-constraint-builder.js b/node_modules/kysely/dist/cjs/schema/foreign-key-constraint-builder.js deleted file mode 100644 index ecd1872..0000000 --- a/node_modules/kysely/dist/cjs/schema/foreign-key-constraint-builder.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ForeignKeyConstraintBuilder = void 0; -const foreign_key_constraint_node_js_1 = require("../operation-node/foreign-key-constraint-node.js"); -const on_modify_action_parser_js_1 = require("../parser/on-modify-action-parser.js"); -class ForeignKeyConstraintBuilder { - #node; - constructor(node) { - this.#node = node; - } - onDelete(onDelete) { - return new ForeignKeyConstraintBuilder(foreign_key_constraint_node_js_1.ForeignKeyConstraintNode.cloneWith(this.#node, { - onDelete: (0, on_modify_action_parser_js_1.parseOnModifyForeignAction)(onDelete), - })); - } - onUpdate(onUpdate) { - return new ForeignKeyConstraintBuilder(foreign_key_constraint_node_js_1.ForeignKeyConstraintNode.cloneWith(this.#node, { - onUpdate: (0, on_modify_action_parser_js_1.parseOnModifyForeignAction)(onUpdate), - })); - } - deferrable() { - return new ForeignKeyConstraintBuilder(foreign_key_constraint_node_js_1.ForeignKeyConstraintNode.cloneWith(this.#node, { deferrable: true })); - } - notDeferrable() { - return new ForeignKeyConstraintBuilder(foreign_key_constraint_node_js_1.ForeignKeyConstraintNode.cloneWith(this.#node, { deferrable: false })); - } - initiallyDeferred() { - return new ForeignKeyConstraintBuilder(foreign_key_constraint_node_js_1.ForeignKeyConstraintNode.cloneWith(this.#node, { - initiallyDeferred: true, - })); - } - initiallyImmediate() { - return new ForeignKeyConstraintBuilder(foreign_key_constraint_node_js_1.ForeignKeyConstraintNode.cloneWith(this.#node, { - initiallyDeferred: false, - })); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#node; - } -} -exports.ForeignKeyConstraintBuilder = ForeignKeyConstraintBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/primary-key-constraint-builder.d.ts b/node_modules/kysely/dist/cjs/schema/primary-key-constraint-builder.d.ts deleted file mode 100644 index e365831..0000000 --- a/node_modules/kysely/dist/cjs/schema/primary-key-constraint-builder.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { PrimaryKeyConstraintNode } from '../operation-node/primary-key-constraint-node.js'; -export declare class PrimaryKeyConstraintBuilder implements OperationNodeSource { - #private; - constructor(node: PrimaryKeyConstraintNode); - deferrable(): PrimaryKeyConstraintBuilder; - notDeferrable(): PrimaryKeyConstraintBuilder; - initiallyDeferred(): PrimaryKeyConstraintBuilder; - initiallyImmediate(): PrimaryKeyConstraintBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): PrimaryKeyConstraintNode; -} -export type PrimaryKeyConstraintBuilderCallback = (builder: PrimaryKeyConstraintBuilder) => PrimaryKeyConstraintBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/primary-key-constraint-builder.js b/node_modules/kysely/dist/cjs/schema/primary-key-constraint-builder.js deleted file mode 100644 index 913a73c..0000000 --- a/node_modules/kysely/dist/cjs/schema/primary-key-constraint-builder.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PrimaryKeyConstraintBuilder = void 0; -const primary_key_constraint_node_js_1 = require("../operation-node/primary-key-constraint-node.js"); -class PrimaryKeyConstraintBuilder { - #node; - constructor(node) { - this.#node = node; - } - deferrable() { - return new PrimaryKeyConstraintBuilder(primary_key_constraint_node_js_1.PrimaryKeyConstraintNode.cloneWith(this.#node, { deferrable: true })); - } - notDeferrable() { - return new PrimaryKeyConstraintBuilder(primary_key_constraint_node_js_1.PrimaryKeyConstraintNode.cloneWith(this.#node, { deferrable: false })); - } - initiallyDeferred() { - return new PrimaryKeyConstraintBuilder(primary_key_constraint_node_js_1.PrimaryKeyConstraintNode.cloneWith(this.#node, { - initiallyDeferred: true, - })); - } - initiallyImmediate() { - return new PrimaryKeyConstraintBuilder(primary_key_constraint_node_js_1.PrimaryKeyConstraintNode.cloneWith(this.#node, { - initiallyDeferred: false, - })); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#node; - } -} -exports.PrimaryKeyConstraintBuilder = PrimaryKeyConstraintBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/refresh-materialized-view-builder.d.ts b/node_modules/kysely/dist/cjs/schema/refresh-materialized-view-builder.d.ts deleted file mode 100644 index 77f6ad1..0000000 --- a/node_modules/kysely/dist/cjs/schema/refresh-materialized-view-builder.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -import { RefreshMaterializedViewNode } from '../operation-node/refresh-materialized-view-node.js'; -export declare class RefreshMaterializedViewBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: RefreshMaterializedViewBuilderProps); - /** - * Adds the "concurrently" modifier. - * - * Use this to refresh the view without locking out concurrent selects on the materialized view. - * - * WARNING! - * This cannot be used with the "with no data" modifier. - */ - concurrently(): RefreshMaterializedViewBuilder; - /** - * Adds the "with data" modifier. - * - * If specified (or defaults) the backing query is executed to provide the new data, and the materialized view is left in a scannable state - */ - withData(): RefreshMaterializedViewBuilder; - /** - * Adds the "with no data" modifier. - * - * If specified, no new data is generated and the materialized view is left in an unscannable state. - * - * WARNING! - * This cannot be used with the "concurrently" modifier. - */ - withNoData(): RefreshMaterializedViewBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): RefreshMaterializedViewNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface RefreshMaterializedViewBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: RefreshMaterializedViewNode; -} diff --git a/node_modules/kysely/dist/cjs/schema/refresh-materialized-view-builder.js b/node_modules/kysely/dist/cjs/schema/refresh-materialized-view-builder.js deleted file mode 100644 index 5aba401..0000000 --- a/node_modules/kysely/dist/cjs/schema/refresh-materialized-view-builder.js +++ /dev/null @@ -1,75 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.RefreshMaterializedViewBuilder = void 0; -const object_utils_js_1 = require("../util/object-utils.js"); -const refresh_materialized_view_node_js_1 = require("../operation-node/refresh-materialized-view-node.js"); -class RefreshMaterializedViewBuilder { - #props; - constructor(props) { - this.#props = (0, object_utils_js_1.freeze)(props); - } - /** - * Adds the "concurrently" modifier. - * - * Use this to refresh the view without locking out concurrent selects on the materialized view. - * - * WARNING! - * This cannot be used with the "with no data" modifier. - */ - concurrently() { - return new RefreshMaterializedViewBuilder({ - ...this.#props, - node: refresh_materialized_view_node_js_1.RefreshMaterializedViewNode.cloneWith(this.#props.node, { - concurrently: true, - withNoData: false, - }), - }); - } - /** - * Adds the "with data" modifier. - * - * If specified (or defaults) the backing query is executed to provide the new data, and the materialized view is left in a scannable state - */ - withData() { - return new RefreshMaterializedViewBuilder({ - ...this.#props, - node: refresh_materialized_view_node_js_1.RefreshMaterializedViewNode.cloneWith(this.#props.node, { - withNoData: false, - }), - }); - } - /** - * Adds the "with no data" modifier. - * - * If specified, no new data is generated and the materialized view is left in an unscannable state. - * - * WARNING! - * This cannot be used with the "concurrently" modifier. - */ - withNoData() { - return new RefreshMaterializedViewBuilder({ - ...this.#props, - node: refresh_materialized_view_node_js_1.RefreshMaterializedViewNode.cloneWith(this.#props.node, { - withNoData: true, - concurrently: false, - }), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} -exports.RefreshMaterializedViewBuilder = RefreshMaterializedViewBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/schema.d.ts b/node_modules/kysely/dist/cjs/schema/schema.d.ts deleted file mode 100644 index dc97c42..0000000 --- a/node_modules/kysely/dist/cjs/schema/schema.d.ts +++ /dev/null @@ -1,230 +0,0 @@ -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import { AlterTableBuilder } from './alter-table-builder.js'; -import { CreateIndexBuilder } from './create-index-builder.js'; -import { CreateSchemaBuilder } from './create-schema-builder.js'; -import { CreateTableBuilder } from './create-table-builder.js'; -import { DropIndexBuilder } from './drop-index-builder.js'; -import { DropSchemaBuilder } from './drop-schema-builder.js'; -import { DropTableBuilder } from './drop-table-builder.js'; -import { CreateViewBuilder } from './create-view-builder.js'; -import { DropViewBuilder } from './drop-view-builder.js'; -import type { KyselyPlugin } from '../plugin/kysely-plugin.js'; -import { CreateTypeBuilder } from './create-type-builder.js'; -import { DropTypeBuilder } from './drop-type-builder.js'; -import { RefreshMaterializedViewBuilder } from './refresh-materialized-view-builder.js'; -/** - * Provides methods for building database schema. - */ -export declare class SchemaModule { - #private; - constructor(executor: QueryExecutor); - /** - * Create a new table. - * - * ### Examples - * - * This example creates a new table with columns `id`, `first_name`, - * `last_name` and `gender`: - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.primaryKey().autoIncrement()) - * .addColumn('first_name', 'varchar', col => col.notNull()) - * .addColumn('last_name', 'varchar', col => col.notNull()) - * .addColumn('gender', 'varchar') - * .execute() - * ``` - * - * This example creates a table with a foreign key. Not all database - * engines support column-level foreign key constraint definitions. - * For example if you are using MySQL 5.X see the next example after - * this one. - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn('id', 'integer', col => col.primaryKey().autoIncrement()) - * .addColumn('owner_id', 'integer', col => col - * .references('person.id') - * .onDelete('cascade') - * ) - * .execute() - * ``` - * - * This example adds a foreign key constraint for a columns just - * like the previous example, but using a table-level statement. - * On MySQL 5.X you need to define foreign key constraints like - * this: - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn('id', 'integer', col => col.primaryKey().autoIncrement()) - * .addColumn('owner_id', 'integer') - * .addForeignKeyConstraint( - * 'pet_owner_id_foreign', ['owner_id'], 'person', ['id'], - * (constraint) => constraint.onDelete('cascade') - * ) - * .execute() - * ``` - */ - createTable(table: TB): CreateTableBuilder; - /** - * Drop a table. - * - * ### Examples - * - * ```ts - * await db.schema - * .dropTable('person') - * .execute() - * ``` - */ - dropTable(table: string): DropTableBuilder; - /** - * Create a new index. - * - * ### Examples - * - * ```ts - * await db.schema - * .createIndex('person_full_name_unique_index') - * .on('person') - * .columns(['first_name', 'last_name']) - * .execute() - * ``` - */ - createIndex(indexName: string): CreateIndexBuilder; - /** - * Drop an index. - * - * ### Examples - * - * ```ts - * await db.schema - * .dropIndex('person_full_name_unique_index') - * .execute() - * ``` - */ - dropIndex(indexName: string): DropIndexBuilder; - /** - * Create a new schema. - * - * ### Examples - * - * ```ts - * await db.schema - * .createSchema('some_schema') - * .execute() - * ``` - */ - createSchema(schema: string): CreateSchemaBuilder; - /** - * Drop a schema. - * - * ### Examples - * - * ```ts - * await db.schema - * .dropSchema('some_schema') - * .execute() - * ``` - */ - dropSchema(schema: string): DropSchemaBuilder; - /** - * Alter a table. - * - * ### Examples - * - * ```ts - * await db.schema - * .alterTable('person') - * .alterColumn('first_name', (ac) => ac.setDataType('text')) - * .execute() - * ``` - */ - alterTable(table: string): AlterTableBuilder; - /** - * Create a new view. - * - * ### Examples - * - * ```ts - * await db.schema - * .createView('dogs') - * .orReplace() - * .as(db.selectFrom('pet').selectAll().where('species', '=', 'dog')) - * .execute() - * ``` - */ - createView(viewName: string): CreateViewBuilder; - /** - * Refresh a materialized view. - * - * ### Examples - * - * ```ts - * await db.schema - * .refreshMaterializedView('my_view') - * .concurrently() - * .execute() - * ``` - */ - refreshMaterializedView(viewName: string): RefreshMaterializedViewBuilder; - /** - * Drop a view. - * - * ### Examples - * - * ```ts - * await db.schema - * .dropView('dogs') - * .ifExists() - * .execute() - * ``` - */ - dropView(viewName: string): DropViewBuilder; - /** - * Create a new type. - * - * Only some dialects like PostgreSQL have user-defined types. - * - * ### Examples - * - * ```ts - * await db.schema - * .createType('species') - * .asEnum(['dog', 'cat', 'frog']) - * .execute() - * ``` - */ - createType(typeName: string): CreateTypeBuilder; - /** - * Drop a type. - * - * Only some dialects like PostgreSQL have user-defined types. - * - * ### Examples - * - * ```ts - * await db.schema - * .dropType('species') - * .ifExists() - * .execute() - * ``` - */ - dropType(typeName: string): DropTypeBuilder; - /** - * Returns a copy of this schema module with the given plugin installed. - */ - withPlugin(plugin: KyselyPlugin): SchemaModule; - /** - * Returns a copy of this schema module without any plugins. - */ - withoutPlugins(): SchemaModule; - /** - * See {@link QueryCreator.withSchema} - */ - withSchema(schema: string): SchemaModule; -} diff --git a/node_modules/kysely/dist/cjs/schema/schema.js b/node_modules/kysely/dist/cjs/schema/schema.js deleted file mode 100644 index 66ea0db..0000000 --- a/node_modules/kysely/dist/cjs/schema/schema.js +++ /dev/null @@ -1,328 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SchemaModule = void 0; -const alter_table_node_js_1 = require("../operation-node/alter-table-node.js"); -const create_index_node_js_1 = require("../operation-node/create-index-node.js"); -const create_schema_node_js_1 = require("../operation-node/create-schema-node.js"); -const create_table_node_js_1 = require("../operation-node/create-table-node.js"); -const drop_index_node_js_1 = require("../operation-node/drop-index-node.js"); -const drop_schema_node_js_1 = require("../operation-node/drop-schema-node.js"); -const drop_table_node_js_1 = require("../operation-node/drop-table-node.js"); -const table_parser_js_1 = require("../parser/table-parser.js"); -const alter_table_builder_js_1 = require("./alter-table-builder.js"); -const create_index_builder_js_1 = require("./create-index-builder.js"); -const create_schema_builder_js_1 = require("./create-schema-builder.js"); -const create_table_builder_js_1 = require("./create-table-builder.js"); -const drop_index_builder_js_1 = require("./drop-index-builder.js"); -const drop_schema_builder_js_1 = require("./drop-schema-builder.js"); -const drop_table_builder_js_1 = require("./drop-table-builder.js"); -const query_id_js_1 = require("../util/query-id.js"); -const with_schema_plugin_js_1 = require("../plugin/with-schema/with-schema-plugin.js"); -const create_view_builder_js_1 = require("./create-view-builder.js"); -const create_view_node_js_1 = require("../operation-node/create-view-node.js"); -const drop_view_builder_js_1 = require("./drop-view-builder.js"); -const drop_view_node_js_1 = require("../operation-node/drop-view-node.js"); -const create_type_builder_js_1 = require("./create-type-builder.js"); -const drop_type_builder_js_1 = require("./drop-type-builder.js"); -const create_type_node_js_1 = require("../operation-node/create-type-node.js"); -const drop_type_node_js_1 = require("../operation-node/drop-type-node.js"); -const identifier_parser_js_1 = require("../parser/identifier-parser.js"); -const refresh_materialized_view_builder_js_1 = require("./refresh-materialized-view-builder.js"); -const refresh_materialized_view_node_js_1 = require("../operation-node/refresh-materialized-view-node.js"); -/** - * Provides methods for building database schema. - */ -class SchemaModule { - #executor; - constructor(executor) { - this.#executor = executor; - } - /** - * Create a new table. - * - * ### Examples - * - * This example creates a new table with columns `id`, `first_name`, - * `last_name` and `gender`: - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.primaryKey().autoIncrement()) - * .addColumn('first_name', 'varchar', col => col.notNull()) - * .addColumn('last_name', 'varchar', col => col.notNull()) - * .addColumn('gender', 'varchar') - * .execute() - * ``` - * - * This example creates a table with a foreign key. Not all database - * engines support column-level foreign key constraint definitions. - * For example if you are using MySQL 5.X see the next example after - * this one. - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn('id', 'integer', col => col.primaryKey().autoIncrement()) - * .addColumn('owner_id', 'integer', col => col - * .references('person.id') - * .onDelete('cascade') - * ) - * .execute() - * ``` - * - * This example adds a foreign key constraint for a columns just - * like the previous example, but using a table-level statement. - * On MySQL 5.X you need to define foreign key constraints like - * this: - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn('id', 'integer', col => col.primaryKey().autoIncrement()) - * .addColumn('owner_id', 'integer') - * .addForeignKeyConstraint( - * 'pet_owner_id_foreign', ['owner_id'], 'person', ['id'], - * (constraint) => constraint.onDelete('cascade') - * ) - * .execute() - * ``` - */ - createTable(table) { - return new create_table_builder_js_1.CreateTableBuilder({ - queryId: (0, query_id_js_1.createQueryId)(), - executor: this.#executor, - node: create_table_node_js_1.CreateTableNode.create((0, table_parser_js_1.parseTable)(table)), - }); - } - /** - * Drop a table. - * - * ### Examples - * - * ```ts - * await db.schema - * .dropTable('person') - * .execute() - * ``` - */ - dropTable(table) { - return new drop_table_builder_js_1.DropTableBuilder({ - queryId: (0, query_id_js_1.createQueryId)(), - executor: this.#executor, - node: drop_table_node_js_1.DropTableNode.create((0, table_parser_js_1.parseTable)(table)), - }); - } - /** - * Create a new index. - * - * ### Examples - * - * ```ts - * await db.schema - * .createIndex('person_full_name_unique_index') - * .on('person') - * .columns(['first_name', 'last_name']) - * .execute() - * ``` - */ - createIndex(indexName) { - return new create_index_builder_js_1.CreateIndexBuilder({ - queryId: (0, query_id_js_1.createQueryId)(), - executor: this.#executor, - node: create_index_node_js_1.CreateIndexNode.create(indexName), - }); - } - /** - * Drop an index. - * - * ### Examples - * - * ```ts - * await db.schema - * .dropIndex('person_full_name_unique_index') - * .execute() - * ``` - */ - dropIndex(indexName) { - return new drop_index_builder_js_1.DropIndexBuilder({ - queryId: (0, query_id_js_1.createQueryId)(), - executor: this.#executor, - node: drop_index_node_js_1.DropIndexNode.create(indexName), - }); - } - /** - * Create a new schema. - * - * ### Examples - * - * ```ts - * await db.schema - * .createSchema('some_schema') - * .execute() - * ``` - */ - createSchema(schema) { - return new create_schema_builder_js_1.CreateSchemaBuilder({ - queryId: (0, query_id_js_1.createQueryId)(), - executor: this.#executor, - node: create_schema_node_js_1.CreateSchemaNode.create(schema), - }); - } - /** - * Drop a schema. - * - * ### Examples - * - * ```ts - * await db.schema - * .dropSchema('some_schema') - * .execute() - * ``` - */ - dropSchema(schema) { - return new drop_schema_builder_js_1.DropSchemaBuilder({ - queryId: (0, query_id_js_1.createQueryId)(), - executor: this.#executor, - node: drop_schema_node_js_1.DropSchemaNode.create(schema), - }); - } - /** - * Alter a table. - * - * ### Examples - * - * ```ts - * await db.schema - * .alterTable('person') - * .alterColumn('first_name', (ac) => ac.setDataType('text')) - * .execute() - * ``` - */ - alterTable(table) { - return new alter_table_builder_js_1.AlterTableBuilder({ - queryId: (0, query_id_js_1.createQueryId)(), - executor: this.#executor, - node: alter_table_node_js_1.AlterTableNode.create((0, table_parser_js_1.parseTable)(table)), - }); - } - /** - * Create a new view. - * - * ### Examples - * - * ```ts - * await db.schema - * .createView('dogs') - * .orReplace() - * .as(db.selectFrom('pet').selectAll().where('species', '=', 'dog')) - * .execute() - * ``` - */ - createView(viewName) { - return new create_view_builder_js_1.CreateViewBuilder({ - queryId: (0, query_id_js_1.createQueryId)(), - executor: this.#executor, - node: create_view_node_js_1.CreateViewNode.create(viewName), - }); - } - /** - * Refresh a materialized view. - * - * ### Examples - * - * ```ts - * await db.schema - * .refreshMaterializedView('my_view') - * .concurrently() - * .execute() - * ``` - */ - refreshMaterializedView(viewName) { - return new refresh_materialized_view_builder_js_1.RefreshMaterializedViewBuilder({ - queryId: (0, query_id_js_1.createQueryId)(), - executor: this.#executor, - node: refresh_materialized_view_node_js_1.RefreshMaterializedViewNode.create(viewName), - }); - } - /** - * Drop a view. - * - * ### Examples - * - * ```ts - * await db.schema - * .dropView('dogs') - * .ifExists() - * .execute() - * ``` - */ - dropView(viewName) { - return new drop_view_builder_js_1.DropViewBuilder({ - queryId: (0, query_id_js_1.createQueryId)(), - executor: this.#executor, - node: drop_view_node_js_1.DropViewNode.create(viewName), - }); - } - /** - * Create a new type. - * - * Only some dialects like PostgreSQL have user-defined types. - * - * ### Examples - * - * ```ts - * await db.schema - * .createType('species') - * .asEnum(['dog', 'cat', 'frog']) - * .execute() - * ``` - */ - createType(typeName) { - return new create_type_builder_js_1.CreateTypeBuilder({ - queryId: (0, query_id_js_1.createQueryId)(), - executor: this.#executor, - node: create_type_node_js_1.CreateTypeNode.create((0, identifier_parser_js_1.parseSchemableIdentifier)(typeName)), - }); - } - /** - * Drop a type. - * - * Only some dialects like PostgreSQL have user-defined types. - * - * ### Examples - * - * ```ts - * await db.schema - * .dropType('species') - * .ifExists() - * .execute() - * ``` - */ - dropType(typeName) { - return new drop_type_builder_js_1.DropTypeBuilder({ - queryId: (0, query_id_js_1.createQueryId)(), - executor: this.#executor, - node: drop_type_node_js_1.DropTypeNode.create((0, identifier_parser_js_1.parseSchemableIdentifier)(typeName)), - }); - } - /** - * Returns a copy of this schema module with the given plugin installed. - */ - withPlugin(plugin) { - return new SchemaModule(this.#executor.withPlugin(plugin)); - } - /** - * Returns a copy of this schema module without any plugins. - */ - withoutPlugins() { - return new SchemaModule(this.#executor.withoutPlugins()); - } - /** - * See {@link QueryCreator.withSchema} - */ - withSchema(schema) { - return new SchemaModule(this.#executor.withPluginAtFront(new with_schema_plugin_js_1.WithSchemaPlugin(schema))); - } -} -exports.SchemaModule = SchemaModule; diff --git a/node_modules/kysely/dist/cjs/schema/unique-constraint-builder.d.ts b/node_modules/kysely/dist/cjs/schema/unique-constraint-builder.d.ts deleted file mode 100644 index c268f8d..0000000 --- a/node_modules/kysely/dist/cjs/schema/unique-constraint-builder.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { UniqueConstraintNode } from '../operation-node/unique-constraint-node.js'; -export declare class UniqueConstraintNodeBuilder implements OperationNodeSource { - #private; - constructor(node: UniqueConstraintNode); - /** - * Adds `nulls not distinct` to the unique constraint definition - * - * Supported by PostgreSQL dialect only - */ - nullsNotDistinct(): UniqueConstraintNodeBuilder; - deferrable(): UniqueConstraintNodeBuilder; - notDeferrable(): UniqueConstraintNodeBuilder; - initiallyDeferred(): UniqueConstraintNodeBuilder; - initiallyImmediate(): UniqueConstraintNodeBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): UniqueConstraintNode; -} -export type UniqueConstraintNodeBuilderCallback = (builder: UniqueConstraintNodeBuilder) => UniqueConstraintNodeBuilder; diff --git a/node_modules/kysely/dist/cjs/schema/unique-constraint-builder.js b/node_modules/kysely/dist/cjs/schema/unique-constraint-builder.js deleted file mode 100644 index e9c7094..0000000 --- a/node_modules/kysely/dist/cjs/schema/unique-constraint-builder.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UniqueConstraintNodeBuilder = void 0; -const unique_constraint_node_js_1 = require("../operation-node/unique-constraint-node.js"); -class UniqueConstraintNodeBuilder { - #node; - constructor(node) { - this.#node = node; - } - /** - * Adds `nulls not distinct` to the unique constraint definition - * - * Supported by PostgreSQL dialect only - */ - nullsNotDistinct() { - return new UniqueConstraintNodeBuilder(unique_constraint_node_js_1.UniqueConstraintNode.cloneWith(this.#node, { nullsNotDistinct: true })); - } - deferrable() { - return new UniqueConstraintNodeBuilder(unique_constraint_node_js_1.UniqueConstraintNode.cloneWith(this.#node, { deferrable: true })); - } - notDeferrable() { - return new UniqueConstraintNodeBuilder(unique_constraint_node_js_1.UniqueConstraintNode.cloneWith(this.#node, { deferrable: false })); - } - initiallyDeferred() { - return new UniqueConstraintNodeBuilder(unique_constraint_node_js_1.UniqueConstraintNode.cloneWith(this.#node, { - initiallyDeferred: true, - })); - } - initiallyImmediate() { - return new UniqueConstraintNodeBuilder(unique_constraint_node_js_1.UniqueConstraintNode.cloneWith(this.#node, { - initiallyDeferred: false, - })); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#node; - } -} -exports.UniqueConstraintNodeBuilder = UniqueConstraintNodeBuilder; diff --git a/node_modules/kysely/dist/cjs/util/assert.d.ts b/node_modules/kysely/dist/cjs/util/assert.d.ts deleted file mode 100644 index eb6e352..0000000 --- a/node_modules/kysely/dist/cjs/util/assert.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare function assertNotNullOrUndefined(value: T): asserts value is NonNullable; -export declare function assertIsString(value: any): asserts value is string; diff --git a/node_modules/kysely/dist/cjs/util/assert.js b/node_modules/kysely/dist/cjs/util/assert.js deleted file mode 100644 index 18db15d..0000000 --- a/node_modules/kysely/dist/cjs/util/assert.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.assertNotNullOrUndefined = assertNotNullOrUndefined; -exports.assertIsString = assertIsString; -function assertNotNullOrUndefined(value) { - if (value === null || value === undefined) { - throw new Error(`${value} must not be null or undefined`); - } -} -function assertIsString(value) { - if (typeof value !== 'string') { - throw new Error(`${value} must be a string`); - } -} diff --git a/node_modules/kysely/dist/cjs/util/column-type.d.ts b/node_modules/kysely/dist/cjs/util/column-type.d.ts deleted file mode 100644 index c9bac6b..0000000 --- a/node_modules/kysely/dist/cjs/util/column-type.d.ts +++ /dev/null @@ -1,175 +0,0 @@ -import type { DrainOuterGeneric } from './type-utils.js'; -/** - * This type can be used to specify a different type for - * select, insert and update operations. - * - * Also see the {@link Generated} type. - * - * ### Examples - * - * The next example defines a number column that is optional - * in inserts and updates. All columns are always optional - * in updates so therefore we don't need to specify `undefined` - * for the update type. The type below is useful for all kinds of - * database generated columns like identifiers. The `Generated` - * type is actually just a shortcut for the type in this example: - * - * ```ts - * type GeneratedNumber = ColumnType - * ``` - * - * The above example makes the column optional in inserts - * and updates, but you can still choose to provide the - * column. If you want to prevent insertion/update you - * can se the type as `never`: - * - * ```ts - * type ReadonlyNumber = ColumnType - * ``` - * - * Here's one more example where the type is different - * for each different operation: - * - * ```ts - * type UnupdateableDate = ColumnType - * ``` - */ -export type ColumnType = { - readonly __select__: SelectType; - readonly __insert__: InsertType; - readonly __update__: UpdateType; -}; -/** - * A shortcut for defining database-generated columns. The type - * is the same for all selects, inserts and updates but the - * column is optional for inserts and updates. - * - * The update type is `S` instead of `S | undefined` because updates are always - * optional --> no need to specify optionality. - * ``` - */ -export type Generated = ColumnType; -/** - * A shortcut for defining columns that are only database-generated - * (like postgres GENERATED ALWAYS AS IDENTITY). No insert/update - * is allowed. - */ -export type GeneratedAlways = ColumnType; -/** - * A shortcut for defining JSON columns, which are by default inserted/updated - * as stringified JSON strings. - */ -export type JSONColumnType = ColumnType; -/** - * Evaluates to `K` if `T` can be `null` or `undefined`. - */ -type IfNullable = undefined extends T ? K : null extends T ? K : never; -/** - * Evaluates to `K` if `T` can't be `null` or `undefined`. - */ -type IfNotNullable = undefined extends T ? never : null extends T ? never : T extends never ? never : K; -/** - * Evaluates to `K` if `T` isn't `never`. - */ -type IfNotNever = T extends never ? never : K; -export type SelectType = T extends ColumnType ? S : T; -export type InsertType = T extends ColumnType ? I : T; -export type UpdateType = T extends ColumnType ? U : T; -/** - * Keys of `R` whose `InsertType` values can be `null` or `undefined`. - */ -export type NullableInsertKeys = { - [K in keyof R]: IfNullable, K>; -}[keyof R]; -/** - * Keys of `R` whose `InsertType` values can't be `null` or `undefined`. - */ -export type NonNullableInsertKeys = { - [K in keyof R]: IfNotNullable, K>; -}[keyof R]; -/** - * Keys of `R` whose `SelectType` values are not `never` - */ -type NonNeverSelectKeys = { - [K in keyof R]: IfNotNever, K>; -}[keyof R]; -/** - * Keys of `R` whose `UpdateType` values are not `never` - */ -export type UpdateKeys = { - [K in keyof R]: IfNotNever, K>; -}[keyof R]; -/** - * Given a table interface, extracts the select type from all - * {@link ColumnType} types. - * - * ### Examples - * - * ```ts - * interface PersonTable { - * id: Generated - * first_name: string - * modified_at: ColumnType - * } - * - * type Person = Selectable - * // { - * // id: number, - * // first_name: string - * // modified_at: Date - * // } - * ``` - */ -export type Selectable = DrainOuterGeneric<{ - [K in NonNeverSelectKeys]: SelectType; -}>; -/** - * Given a table interface, extracts the insert type from all - * {@link ColumnType} types. - * - * ### Examples - * - * ```ts - * interface PersonTable { - * id: Generated - * first_name: string - * modified_at: ColumnType - * } - * - * type InsertablePerson = Insertable - * // { - * // id?: number, - * // first_name: string - * // modified_at: string - * // } - * ``` - */ -export type Insertable = DrainOuterGeneric<{ - [K in NonNullableInsertKeys]: InsertType; -} & { - [K in NullableInsertKeys]?: InsertType; -}>; -/** - * Given a table interface, extracts the update type from all - * {@link ColumnType} types. - * - * ### Examples - * - * ```ts - * interface PersonTable { - * id: Generated - * first_name: string - * modified_at: ColumnType - * } - * - * type UpdateablePerson = Updateable - * // { - * // id?: number, - * // first_name?: string - * // } - * ``` - */ -export type Updateable = DrainOuterGeneric<{ - [K in UpdateKeys]?: UpdateType; -}>; -export {}; diff --git a/node_modules/kysely/dist/cjs/util/column-type.js b/node_modules/kysely/dist/cjs/util/column-type.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/util/column-type.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/util/compilable.d.ts b/node_modules/kysely/dist/cjs/util/compilable.d.ts deleted file mode 100644 index 771760c..0000000 --- a/node_modules/kysely/dist/cjs/util/compilable.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -export interface Compilable { - compile(): CompiledQuery; -} -export declare function isCompilable(value: unknown): value is Compilable; diff --git a/node_modules/kysely/dist/cjs/util/compilable.js b/node_modules/kysely/dist/cjs/util/compilable.js deleted file mode 100644 index 9535074..0000000 --- a/node_modules/kysely/dist/cjs/util/compilable.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isCompilable = isCompilable; -const object_utils_js_1 = require("./object-utils.js"); -function isCompilable(value) { - return (0, object_utils_js_1.isObject)(value) && (0, object_utils_js_1.isFunction)(value.compile); -} diff --git a/node_modules/kysely/dist/cjs/util/deferred.d.ts b/node_modules/kysely/dist/cjs/util/deferred.d.ts deleted file mode 100644 index 32139b7..0000000 --- a/node_modules/kysely/dist/cjs/util/deferred.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare class Deferred { - #private; - constructor(); - get promise(): Promise; - resolve: (value: T | PromiseLike) => void; - reject: (reason?: any) => void; -} diff --git a/node_modules/kysely/dist/cjs/util/deferred.js b/node_modules/kysely/dist/cjs/util/deferred.js deleted file mode 100644 index afaf4c7..0000000 --- a/node_modules/kysely/dist/cjs/util/deferred.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Deferred = void 0; -class Deferred { - #promise; - #resolve; - #reject; - constructor() { - this.#promise = new Promise((resolve, reject) => { - this.#reject = reject; - this.#resolve = resolve; - }); - } - get promise() { - return this.#promise; - } - resolve = (value) => { - if (this.#resolve) { - this.#resolve(value); - } - }; - reject = (reason) => { - if (this.#reject) { - this.#reject(reason); - } - }; -} -exports.Deferred = Deferred; diff --git a/node_modules/kysely/dist/cjs/util/explainable.d.ts b/node_modules/kysely/dist/cjs/util/explainable.d.ts deleted file mode 100644 index 8486c65..0000000 --- a/node_modules/kysely/dist/cjs/util/explainable.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -export type ExplainFormat = 'text' | 'xml' | 'json' | 'yaml' | 'traditional' | 'tree'; -export interface Explainable { - /** - * Executes query with `explain` statement before the main query. - * - * ```ts - * const explained = await db - * .selectFrom('person') - * .where('gender', '=', 'female') - * .selectAll() - * .explain('json') - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * explain format=json select * from `person` where `gender` = ? - * ``` - * - * You can also execute `explain analyze` statements. - * - * ```ts - * import { sql } from 'kysely' - * - * const explained = await db - * .selectFrom('person') - * .where('gender', '=', 'female') - * .selectAll() - * .explain('json', sql`analyze`) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * explain (analyze, format json) select * from "person" where "gender" = $1 - * ``` - */ - explain = Record>(format?: ExplainFormat, options?: Expression): Promise; -} diff --git a/node_modules/kysely/dist/cjs/util/explainable.js b/node_modules/kysely/dist/cjs/util/explainable.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/util/explainable.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/util/infer-result.d.ts b/node_modules/kysely/dist/cjs/util/infer-result.d.ts deleted file mode 100644 index 4ed7fa2..0000000 --- a/node_modules/kysely/dist/cjs/util/infer-result.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import type { DeleteResult } from '../query-builder/delete-result.js'; -import type { InsertResult } from '../query-builder/insert-result.js'; -import type { MergeResult } from '../query-builder/merge-result.js'; -import type { UpdateResult } from '../query-builder/update-result.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from './compilable.js'; -import type { Simplify } from './type-utils.js'; -/** - * A helper type that allows inferring a select/insert/update/delete query's result - * type from a query builder or compiled query. - * - * ### Examples - * - * Infer a query builder's result type: - * - * ```ts - * import { InferResult } from 'kysely' - * - * const query = db - * .selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .select(['person.first_name', 'pet.name']) - * - * type QueryResult = InferResult // { first_name: string; name: string; }[] - * ``` - * - * Infer a compiled query's result type: - * - * ```ts - * import { InferResult } from 'kysely' - * - * const compiledQuery = db - * .insertInto('person') - * .values({ - * first_name: 'Foo', - * last_name: 'Barson', - * gender: 'other', - * age: 15, - * }) - * .returningAll() - * .compile() - * - * type QueryResult = InferResult // Selectable[] - * ``` - */ -export type InferResult | CompiledQuery> = C extends Compilable ? ResolveResult : C extends CompiledQuery ? ResolveResult : never; -type ResolveResult = O extends InsertResult | UpdateResult | DeleteResult | MergeResult ? O[] : Simplify[]; -export {}; diff --git a/node_modules/kysely/dist/cjs/util/infer-result.js b/node_modules/kysely/dist/cjs/util/infer-result.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/util/infer-result.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/util/json-object-args.d.ts b/node_modules/kysely/dist/cjs/util/json-object-args.d.ts deleted file mode 100644 index b512012..0000000 --- a/node_modules/kysely/dist/cjs/util/json-object-args.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -import type { SelectQueryNode } from '../operation-node/select-query-node.js'; -export declare function getJsonObjectArgs(node: SelectQueryNode, table: string): Expression[]; diff --git a/node_modules/kysely/dist/cjs/util/json-object-args.js b/node_modules/kysely/dist/cjs/util/json-object-args.js deleted file mode 100644 index 0ee62f7..0000000 --- a/node_modules/kysely/dist/cjs/util/json-object-args.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getJsonObjectArgs = getJsonObjectArgs; -const expression_wrapper_js_1 = require("../expression/expression-wrapper.js"); -const alias_node_js_1 = require("../operation-node/alias-node.js"); -const column_node_js_1 = require("../operation-node/column-node.js"); -const identifier_node_js_1 = require("../operation-node/identifier-node.js"); -const reference_node_js_1 = require("../operation-node/reference-node.js"); -const table_node_js_1 = require("../operation-node/table-node.js"); -const value_node_js_1 = require("../operation-node/value-node.js"); -function getJsonObjectArgs(node, table) { - const args = []; - for (const { selection: s } of node.selections ?? []) { - if (reference_node_js_1.ReferenceNode.is(s) && column_node_js_1.ColumnNode.is(s.column)) { - args.push(colName(s.column.column.name), colRef(table, s.column.column.name)); - } - else if (column_node_js_1.ColumnNode.is(s)) { - args.push(colName(s.column.name), colRef(table, s.column.name)); - } - else if (alias_node_js_1.AliasNode.is(s) && identifier_node_js_1.IdentifierNode.is(s.alias)) { - args.push(colName(s.alias.name), colRef(table, s.alias.name)); - } - else { - throw new Error(`can't extract column names from the select query node`); - } - } - return args; -} -function colName(col) { - return new expression_wrapper_js_1.ExpressionWrapper(value_node_js_1.ValueNode.createImmediate(col)); -} -function colRef(table, col) { - return new expression_wrapper_js_1.ExpressionWrapper(reference_node_js_1.ReferenceNode.create(column_node_js_1.ColumnNode.create(col), table_node_js_1.TableNode.create(table))); -} diff --git a/node_modules/kysely/dist/cjs/util/log-once.d.ts b/node_modules/kysely/dist/cjs/util/log-once.d.ts deleted file mode 100644 index 76ec788..0000000 --- a/node_modules/kysely/dist/cjs/util/log-once.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * Use for system-level logging, such as deprecation messages. - * Logs a message and ensures it won't be logged again. - */ -export declare function logOnce(message: string): void; diff --git a/node_modules/kysely/dist/cjs/util/log-once.js b/node_modules/kysely/dist/cjs/util/log-once.js deleted file mode 100644 index a6c55ef..0000000 --- a/node_modules/kysely/dist/cjs/util/log-once.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.logOnce = logOnce; -const LOGGED_MESSAGES = new Set(); -/** - * Use for system-level logging, such as deprecation messages. - * Logs a message and ensures it won't be logged again. - */ -function logOnce(message) { - if (LOGGED_MESSAGES.has(message)) { - return; - } - LOGGED_MESSAGES.add(message); - console.log(message); -} diff --git a/node_modules/kysely/dist/cjs/util/log.d.ts b/node_modules/kysely/dist/cjs/util/log.d.ts deleted file mode 100644 index 6106593..0000000 --- a/node_modules/kysely/dist/cjs/util/log.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { ArrayItemType } from './type-utils.js'; -declare const logLevels: readonly ["query", "error"]; -export declare const LOG_LEVELS: Readonly; -export type LogLevel = ArrayItemType; -export interface QueryLogEvent { - readonly level: 'query'; - readonly isStream?: boolean; - readonly query: CompiledQuery; - readonly queryDurationMillis: number; -} -export interface ErrorLogEvent { - readonly level: 'error'; - readonly error: unknown; - readonly query: CompiledQuery; - readonly queryDurationMillis: number; -} -export type LogEvent = QueryLogEvent | ErrorLogEvent; -export type Logger = (event: LogEvent) => void | Promise; -export type LogConfig = ReadonlyArray | Logger; -export declare class Log { - #private; - constructor(config: LogConfig); - isLevelEnabled(level: LogLevel): boolean; - query(getEvent: () => QueryLogEvent): Promise; - error(getEvent: () => ErrorLogEvent): Promise; -} -export {}; diff --git a/node_modules/kysely/dist/cjs/util/log.js b/node_modules/kysely/dist/cjs/util/log.js deleted file mode 100644 index a411e73..0000000 --- a/node_modules/kysely/dist/cjs/util/log.js +++ /dev/null @@ -1,59 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Log = exports.LOG_LEVELS = void 0; -const object_utils_js_1 = require("./object-utils.js"); -const logLevels = ['query', 'error']; -exports.LOG_LEVELS = (0, object_utils_js_1.freeze)(logLevels); -class Log { - #levels; - #logger; - constructor(config) { - if ((0, object_utils_js_1.isFunction)(config)) { - this.#logger = config; - this.#levels = (0, object_utils_js_1.freeze)({ - query: true, - error: true, - }); - } - else { - this.#logger = defaultLogger; - this.#levels = (0, object_utils_js_1.freeze)({ - query: config.includes('query'), - error: config.includes('error'), - }); - } - } - isLevelEnabled(level) { - return this.#levels[level]; - } - async query(getEvent) { - if (this.#levels.query) { - await this.#logger(getEvent()); - } - } - async error(getEvent) { - if (this.#levels.error) { - await this.#logger(getEvent()); - } - } -} -exports.Log = Log; -function defaultLogger(event) { - if (event.level === 'query') { - const prefix = `kysely:query:${event.isStream ? 'stream:' : ''}`; - console.log(`${prefix} ${event.query.sql}`); - console.log(`${prefix} duration: ${event.queryDurationMillis.toFixed(1)}ms`); - } - else if (event.level === 'error') { - if (event.error instanceof Error) { - console.error(`kysely:error: ${event.error.stack ?? event.error.message}`); - } - else { - console.error(`kysely:error: ${JSON.stringify({ - error: event.error, - query: event.query.sql, - queryDurationMillis: event.queryDurationMillis, - })}`); - } - } -} diff --git a/node_modules/kysely/dist/cjs/util/object-utils.d.ts b/node_modules/kysely/dist/cjs/util/object-utils.d.ts deleted file mode 100644 index 08138fd..0000000 --- a/node_modules/kysely/dist/cjs/util/object-utils.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { ShallowRecord } from './type-utils.js'; -export declare function isEmpty(obj: ArrayLike | string | object): boolean; -export declare function isUndefined(obj: unknown): obj is undefined; -export declare function isString(obj: unknown): obj is string; -export declare function isNumber(obj: unknown): obj is number; -export declare function isBoolean(obj: unknown): obj is boolean; -export declare function isNull(obj: unknown): obj is null; -export declare function isDate(obj: unknown): obj is Date; -export declare function isBigInt(obj: unknown): obj is bigint; -export declare function isBuffer(obj: unknown): obj is { - length: number; -}; -export declare function isFunction(obj: unknown): obj is Function; -export declare function isObject(obj: unknown): obj is ShallowRecord; -export declare function isArrayBufferOrView(obj: unknown): obj is ArrayBuffer | ArrayBufferView; -export declare function isPlainObject(obj: unknown): obj is Record; -export declare function getLast(arr: ArrayLike): T | undefined; -export declare function freeze(obj: T): Readonly; -export declare function asArray(arg: T | ReadonlyArray): ReadonlyArray; -export declare function asReadonlyArray(arg: T | ReadonlyArray): ReadonlyArray; -export declare function isReadonlyArray(arg: unknown): arg is ReadonlyArray; -export declare function noop(obj: T): T; -export declare function compare(obj1: unknown, obj2: unknown): boolean; diff --git a/node_modules/kysely/dist/cjs/util/object-utils.js b/node_modules/kysely/dist/cjs/util/object-utils.js deleted file mode 100644 index c5ffec8..0000000 --- a/node_modules/kysely/dist/cjs/util/object-utils.js +++ /dev/null @@ -1,162 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isEmpty = isEmpty; -exports.isUndefined = isUndefined; -exports.isString = isString; -exports.isNumber = isNumber; -exports.isBoolean = isBoolean; -exports.isNull = isNull; -exports.isDate = isDate; -exports.isBigInt = isBigInt; -exports.isBuffer = isBuffer; -exports.isFunction = isFunction; -exports.isObject = isObject; -exports.isArrayBufferOrView = isArrayBufferOrView; -exports.isPlainObject = isPlainObject; -exports.getLast = getLast; -exports.freeze = freeze; -exports.asArray = asArray; -exports.asReadonlyArray = asReadonlyArray; -exports.isReadonlyArray = isReadonlyArray; -exports.noop = noop; -exports.compare = compare; -function isEmpty(obj) { - if (Array.isArray(obj) || isString(obj) || isBuffer(obj)) { - return obj.length === 0; - } - else if (obj) { - return Object.keys(obj).length === 0; - } - return false; -} -function isUndefined(obj) { - return typeof obj === 'undefined' || obj === undefined; -} -function isString(obj) { - return typeof obj === 'string'; -} -function isNumber(obj) { - return typeof obj === 'number'; -} -function isBoolean(obj) { - return typeof obj === 'boolean'; -} -function isNull(obj) { - return obj === null; -} -function isDate(obj) { - return obj instanceof Date; -} -function isBigInt(obj) { - return typeof obj === 'bigint'; -} -// Don't change the returnd type to `obj is Buffer` to not create a -// hard dependency to node. -function isBuffer(obj) { - return typeof Buffer !== 'undefined' && Buffer.isBuffer(obj); -} -function isFunction(obj) { - return typeof obj === 'function'; -} -function isObject(obj) { - return typeof obj === 'object' && obj !== null; -} -function isArrayBufferOrView(obj) { - return obj instanceof ArrayBuffer || ArrayBuffer.isView(obj); -} -function isPlainObject(obj) { - if (!isObject(obj) || getTag(obj) !== '[object Object]') { - return false; - } - if (Object.getPrototypeOf(obj) === null) { - return true; - } - let proto = obj; - while (Object.getPrototypeOf(proto) !== null) { - proto = Object.getPrototypeOf(proto); - } - return Object.getPrototypeOf(obj) === proto; -} -function getLast(arr) { - return arr[arr.length - 1]; -} -function freeze(obj) { - return Object.freeze(obj); -} -function asArray(arg) { - if (isReadonlyArray(arg)) { - return arg; - } - else { - return [arg]; - } -} -function asReadonlyArray(arg) { - if (isReadonlyArray(arg)) { - return arg; - } - else { - return freeze([arg]); - } -} -function isReadonlyArray(arg) { - return Array.isArray(arg); -} -function noop(obj) { - return obj; -} -function compare(obj1, obj2) { - if (isReadonlyArray(obj1) && isReadonlyArray(obj2)) { - return compareArrays(obj1, obj2); - } - else if (isObject(obj1) && isObject(obj2)) { - return compareObjects(obj1, obj2); - } - return obj1 === obj2; -} -function compareArrays(arr1, arr2) { - if (arr1.length !== arr2.length) { - return false; - } - for (let i = 0; i < arr1.length; ++i) { - if (!compare(arr1[i], arr2[i])) { - return false; - } - } - return true; -} -function compareObjects(obj1, obj2) { - if (isBuffer(obj1) && isBuffer(obj2)) { - return compareBuffers(obj1, obj2); - } - else if (isDate(obj1) && isDate(obj2)) { - return compareDates(obj1, obj2); - } - return compareGenericObjects(obj1, obj2); -} -function compareBuffers(buf1, buf2) { - return Buffer.compare(buf1, buf2) === 0; -} -function compareDates(date1, date2) { - return date1.getTime() === date2.getTime(); -} -function compareGenericObjects(obj1, obj2) { - const keys1 = Object.keys(obj1); - const keys2 = Object.keys(obj2); - if (keys1.length !== keys2.length) { - return false; - } - for (const key of keys1) { - if (!compare(obj1[key], obj2[key])) { - return false; - } - } - return true; -} -const toString = Object.prototype.toString; -function getTag(value) { - if (value == null) { - return value === undefined ? '[object Undefined]' : '[object Null]'; - } - return toString.call(value); -} diff --git a/node_modules/kysely/dist/cjs/util/performance-now.d.ts b/node_modules/kysely/dist/cjs/util/performance-now.d.ts deleted file mode 100644 index 0150677..0000000 --- a/node_modules/kysely/dist/cjs/util/performance-now.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function performanceNow(): number; diff --git a/node_modules/kysely/dist/cjs/util/performance-now.js b/node_modules/kysely/dist/cjs/util/performance-now.js deleted file mode 100644 index 352a593..0000000 --- a/node_modules/kysely/dist/cjs/util/performance-now.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.performanceNow = performanceNow; -const object_utils_js_1 = require("./object-utils.js"); -function performanceNow() { - if (typeof performance !== 'undefined' && (0, object_utils_js_1.isFunction)(performance.now)) { - return performance.now(); - } - else { - return Date.now(); - } -} diff --git a/node_modules/kysely/dist/cjs/util/provide-controlled-connection.d.ts b/node_modules/kysely/dist/cjs/util/provide-controlled-connection.d.ts deleted file mode 100644 index 28a0708..0000000 --- a/node_modules/kysely/dist/cjs/util/provide-controlled-connection.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { ConnectionProvider } from '../driver/connection-provider.js'; -import type { DatabaseConnection } from '../driver/database-connection.js'; -export interface ControlledConnection { - readonly connection: DatabaseConnection; - readonly release: () => void; -} -export declare function provideControlledConnection(connectionProvider: ConnectionProvider): Promise; diff --git a/node_modules/kysely/dist/cjs/util/provide-controlled-connection.js b/node_modules/kysely/dist/cjs/util/provide-controlled-connection.js deleted file mode 100644 index e0ba18e..0000000 --- a/node_modules/kysely/dist/cjs/util/provide-controlled-connection.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.provideControlledConnection = provideControlledConnection; -const deferred_js_1 = require("./deferred.js"); -const object_utils_js_1 = require("./object-utils.js"); -async function provideControlledConnection(connectionProvider) { - const connectionDefer = new deferred_js_1.Deferred(); - const connectionReleaseDefer = new deferred_js_1.Deferred(); - connectionProvider - .provideConnection(async (connection) => { - connectionDefer.resolve(connection); - return await connectionReleaseDefer.promise; - }) - .catch((ex) => connectionDefer.reject(ex)); - // Create composite of the connection and the release method instead of - // modifying the connection or creating a new nesting `DatabaseConnection`. - // This way we don't accidentally override any methods of 3rd party - // connections and don't return wrapped connections to drivers that - // expect a certain specific connection class. - return (0, object_utils_js_1.freeze)({ - connection: await connectionDefer.promise, - release: connectionReleaseDefer.resolve, - }); -} diff --git a/node_modules/kysely/dist/cjs/util/query-id.d.ts b/node_modules/kysely/dist/cjs/util/query-id.d.ts deleted file mode 100644 index 3091b22..0000000 --- a/node_modules/kysely/dist/cjs/util/query-id.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface QueryId { - readonly queryId: string; -} -export declare function createQueryId(): QueryId; diff --git a/node_modules/kysely/dist/cjs/util/query-id.js b/node_modules/kysely/dist/cjs/util/query-id.js deleted file mode 100644 index ff9ad21..0000000 --- a/node_modules/kysely/dist/cjs/util/query-id.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createQueryId = createQueryId; -const random_string_js_1 = require("./random-string.js"); -function createQueryId() { - return new LazyQueryId(); -} -class LazyQueryId { - #queryId; - get queryId() { - if (this.#queryId === undefined) { - this.#queryId = (0, random_string_js_1.randomString)(8); - } - return this.#queryId; - } -} diff --git a/node_modules/kysely/dist/cjs/util/random-string.d.ts b/node_modules/kysely/dist/cjs/util/random-string.d.ts deleted file mode 100644 index 03b85f4..0000000 --- a/node_modules/kysely/dist/cjs/util/random-string.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function randomString(length: number): string; diff --git a/node_modules/kysely/dist/cjs/util/random-string.js b/node_modules/kysely/dist/cjs/util/random-string.js deleted file mode 100644 index cb4d503..0000000 --- a/node_modules/kysely/dist/cjs/util/random-string.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.randomString = randomString; -const CHARS = [ - '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', -]; -function randomString(length) { - let chars = ''; - for (let i = 0; i < length; ++i) { - chars += randomChar(); - } - return chars; -} -function randomChar() { - return CHARS[~~(Math.random() * CHARS.length)]; -} diff --git a/node_modules/kysely/dist/cjs/util/require-all-props.d.ts b/node_modules/kysely/dist/cjs/util/require-all-props.d.ts deleted file mode 100644 index 1afa3fa..0000000 --- a/node_modules/kysely/dist/cjs/util/require-all-props.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Utility type to force use of all properties of T. - * - * Similar to Required build-in type, but allows `undefined` values. - */ -type AllProps = T & { - [P in keyof T]-?: unknown; -}; -/** - * Helper function to check listed properties according to given type. Check if all properties has been used when object is initialised. - * - * Example use: - * - * ```ts - * type SomeType = { propA: string; propB?: number; } - * - * // propB has to be mentioned even it is optional. It still should be initialized with undefined. - * const a: SomeType = requireAllProps({ propA: "value A", propB: undefined }); - * - * // checked type is implicit for variable. - * const b = requireAllProps({ propA: "value A", propB: undefined }); - * ``` - * - * Wrong use of this helper: - * - * 1. Omit checked type - all checked properties will be expect as of type never - * - * ```ts - * type SomeType = { propA: string; propB?: number; } - * // const z: SomeType = requireAllProps({ propC: "no type will work" }); // Property 'propA' is missing in type '{ propC: string; }' but required in type 'SomeType'. - * ``` - * - * 2. Apply to spreaded object - there is no way how to check in compile time if spreaded object contains all properties - * - * ```ts - * type SomeType = { propA: string; propB?: number; } - * const y: SomeType = { propA: "" }; // valid object according to SomeType declaration - * // const x = requireAllProps({ ...y }); // Argument of type '{ propA: string; propB?: number; }' is not assignable to parameter of type 'AllProps'. - * ``` - * - * @param obj object to check if all properties has been used - * @returns untouched obj parameter is returned - */ -export declare function requireAllProps(obj: AllProps): T; -export {}; diff --git a/node_modules/kysely/dist/cjs/util/require-all-props.js b/node_modules/kysely/dist/cjs/util/require-all-props.js deleted file mode 100644 index 9e31cd3..0000000 --- a/node_modules/kysely/dist/cjs/util/require-all-props.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.requireAllProps = requireAllProps; -/** - * Helper function to check listed properties according to given type. Check if all properties has been used when object is initialised. - * - * Example use: - * - * ```ts - * type SomeType = { propA: string; propB?: number; } - * - * // propB has to be mentioned even it is optional. It still should be initialized with undefined. - * const a: SomeType = requireAllProps({ propA: "value A", propB: undefined }); - * - * // checked type is implicit for variable. - * const b = requireAllProps({ propA: "value A", propB: undefined }); - * ``` - * - * Wrong use of this helper: - * - * 1. Omit checked type - all checked properties will be expect as of type never - * - * ```ts - * type SomeType = { propA: string; propB?: number; } - * // const z: SomeType = requireAllProps({ propC: "no type will work" }); // Property 'propA' is missing in type '{ propC: string; }' but required in type 'SomeType'. - * ``` - * - * 2. Apply to spreaded object - there is no way how to check in compile time if spreaded object contains all properties - * - * ```ts - * type SomeType = { propA: string; propB?: number; } - * const y: SomeType = { propA: "" }; // valid object according to SomeType declaration - * // const x = requireAllProps({ ...y }); // Argument of type '{ propA: string; propB?: number; }' is not assignable to parameter of type 'AllProps'. - * ``` - * - * @param obj object to check if all properties has been used - * @returns untouched obj parameter is returned - */ -function requireAllProps(obj) { - return obj; -} diff --git a/node_modules/kysely/dist/cjs/util/stack-trace-utils.d.ts b/node_modules/kysely/dist/cjs/util/stack-trace-utils.d.ts deleted file mode 100644 index 5cdde38..0000000 --- a/node_modules/kysely/dist/cjs/util/stack-trace-utils.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function extendStackTrace(err: unknown, stackError: Error): unknown; diff --git a/node_modules/kysely/dist/cjs/util/stack-trace-utils.js b/node_modules/kysely/dist/cjs/util/stack-trace-utils.js deleted file mode 100644 index 8677da7..0000000 --- a/node_modules/kysely/dist/cjs/util/stack-trace-utils.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.extendStackTrace = extendStackTrace; -const object_utils_js_1 = require("./object-utils.js"); -function extendStackTrace(err, stackError) { - if (isStackHolder(err) && stackError.stack) { - // Remove the first line that just says `Error`. - const stackExtension = stackError.stack.split('\n').slice(1).join('\n'); - err.stack += `\n${stackExtension}`; - return err; - } - return err; -} -function isStackHolder(obj) { - return (0, object_utils_js_1.isObject)(obj) && (0, object_utils_js_1.isString)(obj.stack); -} diff --git a/node_modules/kysely/dist/cjs/util/streamable.d.ts b/node_modules/kysely/dist/cjs/util/streamable.d.ts deleted file mode 100644 index 5225310..0000000 --- a/node_modules/kysely/dist/cjs/util/streamable.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export interface Streamable { - /** - * Executes the query and streams the rows. - * - * The optional argument `chunkSize` defines how many rows to fetch from the database - * at a time. It only affects some dialects like PostgreSQL that support it. - * - * ### Examples - * - * ```ts - * const stream = db - * .selectFrom('person') - * .select(['first_name', 'last_name']) - * .where('gender', '=', 'other') - * .stream() - * - * for await (const person of stream) { - * console.log(person.first_name) - * - * if (person.last_name === 'Something') { - * // Breaking or returning before the stream has ended will release - * // the database connection and invalidate the stream. - * break - * } - * } - * ``` - */ - stream(chunkSize?: number): AsyncIterableIterator; -} diff --git a/node_modules/kysely/dist/cjs/util/streamable.js b/node_modules/kysely/dist/cjs/util/streamable.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/util/streamable.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/util/type-error.d.ts b/node_modules/kysely/dist/cjs/util/type-error.d.ts deleted file mode 100644 index 343f634..0000000 --- a/node_modules/kysely/dist/cjs/util/type-error.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface KyselyTypeError { - readonly __kyselyTypeError__: E; -} diff --git a/node_modules/kysely/dist/cjs/util/type-error.js b/node_modules/kysely/dist/cjs/util/type-error.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/util/type-error.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/cjs/util/type-utils.d.ts b/node_modules/kysely/dist/cjs/util/type-utils.d.ts deleted file mode 100644 index 2b56e49..0000000 --- a/node_modules/kysely/dist/cjs/util/type-utils.d.ts +++ /dev/null @@ -1,189 +0,0 @@ -import type { InsertResult } from '../query-builder/insert-result.js'; -import type { DeleteResult } from '../query-builder/delete-result.js'; -import type { UpdateResult } from '../query-builder/update-result.js'; -import type { KyselyTypeError } from './type-error.js'; -import type { MergeResult } from '../query-builder/merge-result.js'; -/** - * Given a database type and a union of table names in that db, returns - * a union type with all possible column names. - * - * Example: - * - * ```ts - * interface Person { - * id: number - * } - * - * interface Pet { - * name: string - * species: 'cat' | 'dog' - * } - * - * interface Movie { - * stars: number - * } - * - * interface Database { - * person: Person - * pet: Pet - * movie: Movie - * } - * - * type Columns = AnyColumn - * - * // Columns == 'id' | 'name' | 'species' - * ``` - */ -export type AnyColumn = { - [T in TB]: keyof DB[T]; -}[TB] & string; -/** - * Extracts a column type. - */ -export type ExtractColumnType = { - [T in TB]: C extends keyof DB[T] ? DB[T][C] : never; -}[TB]; -/** - * Given a database type and a union of table names in that db, returns - * a union type with all possible `table`.`column` combinations. - * - * Example: - * - * ```ts - * interface Person { - * id: number - * } - * - * interface Pet { - * name: string - * species: 'cat' | 'dog' - * } - * - * interface Movie { - * stars: number - * } - * - * interface Database { - * person: Person - * pet: Pet - * movie: Movie - * } - * - * type Columns = AnyColumnWithTable - * - * // Columns == 'person.id' | 'pet.name' | 'pet.species' - * ``` - */ -export type AnyColumnWithTable = { - [T in TB]: `${T & string}.${keyof DB[T] & string}`; -}[TB]; -/** - * Just like {@link AnyColumn} but with a ` as ` suffix. - */ -export type AnyAliasedColumn = `${AnyColumn} as ${string}`; -/** - * Just like {@link AnyColumnWithTable} but with a ` as ` suffix. - */ -export type AnyAliasedColumnWithTable = `${AnyColumnWithTable} as ${string}`; -/** - * Extracts the item type of an array. - */ -export type ArrayItemType = T extends ReadonlyArray ? I : never; -export type SimplifySingleResult = O extends InsertResult ? O : O extends DeleteResult ? O : O extends UpdateResult ? O : O extends MergeResult ? O : Simplify | undefined; -export type SimplifyResult = O extends InsertResult ? O : O extends DeleteResult ? O : O extends UpdateResult ? O : O extends MergeResult ? O : Simplify; -export type Simplify = DrainOuterGeneric<{ - [K in keyof T]: T[K]; -} & {}>; -/** - * Represents a database row whose column names and their types are unknown. - */ -export type UnknownRow = Record; -/** - * Makes all properties of object type `T` nullable. - */ -export type Nullable = { - [P in keyof T]: T[P] | null; -}; -/** - * Evaluates to `true` if `T` is `never`. - */ -export type IsNever = [T] extends [never] ? true : false; -/** - * Evaluates to `true` if `T` is `any`. - */ -export type IsAny = 0 extends T & 1 ? true : false; -/** - * Evaluates to `true` if the types `T` and `U` are equal. - */ -export type Equals = (() => G extends T ? 1 : 2) extends () => G extends U ? 1 : 2 ? true : false; -export type NarrowPartial = DrainOuterGeneric : T[K] extends O[K] ? T[K] : KyselyTypeError<`$narrowType() call failed: passed type does not exist in '${K}'s type union`> : O[K]; -} : never>; -/** - * A type constant for marking a column as not null. Can be used with `$narrowPartial`. - * - * Example: - * - * ```ts - * import type { NotNull } from 'kysely' - * - * await db.selectFrom('person') - * .where('nullable_column', 'is not', null) - * .selectAll() - * .$narrowType<{ nullable_column: NotNull }>() - * .executeTakeFirstOrThrow() - * ``` - */ -export type NotNull = { - readonly __notNull__: unique symbol; -}; -export type SqlBool = boolean | 0 | 1; -/** - * Utility to reduce depth of TypeScript's internal type instantiation stack. - * - * Example: - * - * ```ts - * type A = { item: T } - * - * type Test = A< - * A>>>>>>>>>>>>>>>>>>>>>>> - * > - * - * // type Error = Test // Type instantiation is excessively deep and possibly infinite.ts (2589) - * ``` - * - * To fix this, we can use `DrainOuterGeneric`: - * - * ```ts - * type A = DrainOuterGeneric<{ item: T }> - * - * type Test = A< - * A>>>>>>>>>>>>>>>>>>>>>>> - * > - * - * type Ok = Test // Ok - * ``` - */ -export type DrainOuterGeneric = [T] extends [unknown] ? T : never; -export type ShallowRecord = DrainOuterGeneric<{ - [P in K]: T; -}>; -/** - * Dehydrates any root properties of an object that are not valid JSON types. - * - * For now, we catch anything in {@link StringsWhenDataTypeNotAvailable} and convert it to `string`. - */ -export type ShallowDehydrateObject = { - [K in keyof O]: ShallowDehydrateValue; -}; -/** - * Dehydrates a value when it is not a valid JSON type. - * - * For now, we catch anything in {@link StringsWhenDataTypeNotAvailable} and convert it to `string`, - * and anything in {@link NumbersWhenDataTypeNotAvailable} and convert it to `number`. - */ -export type ShallowDehydrateValue = T extends null | undefined ? T : T extends (infer U)[] | null | undefined ? Array> | Extract : Exclude | ([Extract] extends [never] ? never : number) | ([Extract] extends [never] ? never : string); -export type StringsWhenDataTypeNotAvailable = Date | Uint8Array; -export type NumbersWhenDataTypeNotAvailable = bigint | NumericString; -export type NumericString = `${number}`; diff --git a/node_modules/kysely/dist/cjs/util/type-utils.js b/node_modules/kysely/dist/cjs/util/type-utils.js deleted file mode 100644 index c8ad2e5..0000000 --- a/node_modules/kysely/dist/cjs/util/type-utils.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/kysely/dist/esm/dialect/database-introspector.d.ts b/node_modules/kysely/dist/esm/dialect/database-introspector.d.ts deleted file mode 100644 index 3af2e16..0000000 --- a/node_modules/kysely/dist/esm/dialect/database-introspector.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -/** - * An interface for getting the database metadata (names of the tables and columns etc.) - */ -export interface DatabaseIntrospector { - /** - * Get schema metadata. - */ - getSchemas(): Promise; - /** - * Get tables and views metadata. - */ - getTables(options?: DatabaseMetadataOptions): Promise; - /** - * Get the database metadata such as table and column names. - * - * @deprecated Use getTables() instead. - */ - getMetadata(options?: DatabaseMetadataOptions): Promise; -} -export interface DatabaseMetadataOptions { - /** - * If this is true, the metadata contains the internal kysely tables - * such as the migration tables. - */ - withInternalKyselyTables: boolean; -} -export interface SchemaMetadata { - readonly name: string; -} -export interface DatabaseMetadata { - /** - * The tables and views found in the database. - * The propery isView can be used to tell them apart. - */ - readonly tables: TableMetadata[]; -} -export interface TableMetadata { - readonly name: string; - readonly isView: boolean; - readonly columns: ColumnMetadata[]; - readonly schema?: string; -} -export interface ColumnMetadata { - readonly name: string; - /** - * The data type of the column as reported by the database. - * - * NOTE: This value is whatever the database engine returns and it will be - * different on different dialects even if you run the same migrations. - * For example `integer` datatype in a migration will produce `int4` - * on PostgreSQL, `INTEGER` on SQLite and `int` on MySQL. - */ - readonly dataType: string; - /** - * The schema this column's data type was created in. - */ - readonly dataTypeSchema?: string; - readonly isAutoIncrementing: boolean; - readonly isNullable: boolean; - readonly hasDefaultValue: boolean; - readonly comment?: string; -} diff --git a/node_modules/kysely/dist/esm/dialect/database-introspector.js b/node_modules/kysely/dist/esm/dialect/database-introspector.js deleted file mode 100644 index e21326c..0000000 --- a/node_modules/kysely/dist/esm/dialect/database-introspector.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/dialect/dialect-adapter-base.d.ts b/node_modules/kysely/dist/esm/dialect/dialect-adapter-base.d.ts deleted file mode 100644 index 67ade0b..0000000 --- a/node_modules/kysely/dist/esm/dialect/dialect-adapter-base.d.ts +++ /dev/null @@ -1,94 +0,0 @@ -import type { Kysely } from '../kysely.js'; -import type { DialectAdapter, MigrationLockOptions } from './dialect-adapter.js'; -/** - * A basic implementation of `DialectAdapter` with sensible default values. - * Third-party dialects can extend this instead of implementing the `DialectAdapter` - * interface from scratch. That way all new settings will get default values when - * they are added and there will be less breaking changes. - */ -export declare abstract class DialectAdapterBase implements DialectAdapter { - /** - * Whether or not this dialect supports `if not exists` in creation of tables/schemas/views/etc. - * - * If this is false, Kysely's internal migrations tables and schemas are created - * without `if not exists` in migrations. This is not a problem if the dialect - * supports transactional DDL. - */ - get supportsCreateIfNotExists(): boolean; - /** - * Whether or not this dialect supports transactional DDL. - * - * If this is true, migrations are executed inside a transaction. - */ - get supportsTransactionalDdl(): boolean; - /** - * Whether or not this dialect supports the `returning` in inserts - * updates and deletes. - */ - get supportsReturning(): boolean; - get supportsOutput(): boolean; - /** - * This method is used to acquire a lock for the migrations so that - * it's not possible for two migration operations to run in parallel. - * - * Most dialects have explicit locks that can be used, like advisory locks - * in PostgreSQL and the get_lock function in MySQL. - * - * If the dialect doesn't have explicit locks the {@link MigrationLockOptions.lockTable} - * created by Kysely can be used instead. You can access it through the `options` object. - * The lock table has two columns `id` and `is_locked` and there's only one row in the table - * whose id is {@link MigrationLockOptions.lockRowId}. `is_locked` is an integer. Kysely - * takes care of creating the lock table and inserting the one single row to it before this - * method is executed. If the dialect supports schemas and the user has specified a custom - * schema in their migration settings, the options object also contains the schema name in - * {@link MigrationLockOptions.lockTableSchema}. - * - * Here's an example of how you might implement this method for a dialect that doesn't - * have explicit locks but supports `FOR UPDATE` row locks and transactional DDL: - * - * ```ts - * import { DialectAdapterBase, type MigrationLockOptions, Kysely } from 'kysely' - * - * export class MyAdapter extends DialectAdapterBase { - * override async acquireMigrationLock( - * db: Kysely, - * options: MigrationLockOptions - * ): Promise { - * const queryDb = options.lockTableSchema - * ? db.withSchema(options.lockTableSchema) - * : db - * - * // Since our imaginary dialect supports transactional DDL and has - * // row locks, we can simply take a row lock here and it will guarantee - * // all subsequent calls to this method from other transactions will - * // wait until this transaction finishes. - * await queryDb - * .selectFrom(options.lockTable) - * .selectAll() - * .where('id', '=', options.lockRowId) - * .forUpdate() - * .execute() - * } - * - * override async releaseMigrationLock() { - * // noop - * } - * } - * ``` - * - * If `supportsTransactionalDdl` is `true` then the `db` passed to this method - * is a transaction inside which the migrations will be executed. Otherwise - * `db` is a single connection (session) that will be used to execute the - * migrations. - */ - abstract acquireMigrationLock(db: Kysely, options: MigrationLockOptions): Promise; - /** - * Releases the migration lock. See {@link acquireMigrationLock}. - * - * If `supportsTransactionalDdl` is `true` then the `db` passed to this method - * is a transaction inside which the migrations were executed. Otherwise `db` - * is a single connection (session) that was used to execute the migrations - * and the `acquireMigrationLock` call. - */ - abstract releaseMigrationLock(db: Kysely, options: MigrationLockOptions): Promise; -} diff --git a/node_modules/kysely/dist/esm/dialect/dialect-adapter-base.js b/node_modules/kysely/dist/esm/dialect/dialect-adapter-base.js deleted file mode 100644 index 3a4e5b0..0000000 --- a/node_modules/kysely/dist/esm/dialect/dialect-adapter-base.js +++ /dev/null @@ -1,21 +0,0 @@ -/// -/** - * A basic implementation of `DialectAdapter` with sensible default values. - * Third-party dialects can extend this instead of implementing the `DialectAdapter` - * interface from scratch. That way all new settings will get default values when - * they are added and there will be less breaking changes. - */ -export class DialectAdapterBase { - get supportsCreateIfNotExists() { - return true; - } - get supportsTransactionalDdl() { - return false; - } - get supportsReturning() { - return false; - } - get supportsOutput() { - return false; - } -} diff --git a/node_modules/kysely/dist/esm/dialect/dialect-adapter.d.ts b/node_modules/kysely/dist/esm/dialect/dialect-adapter.d.ts deleted file mode 100644 index 25de4e1..0000000 --- a/node_modules/kysely/dist/esm/dialect/dialect-adapter.d.ts +++ /dev/null @@ -1,115 +0,0 @@ -import type { Kysely } from '../kysely.js'; -/** - * A `DialectAdapter` encapsulates all differences between dialects outside - * of `Driver` and `QueryCompiler`. - * - * For example, some databases support transactional DDL and therefore we want - * to run migrations inside a transaction, while other databases don't support - * it. For that there's a `supportsTransactionalDdl` boolean in this interface. - */ -export interface DialectAdapter { - /** - * Whether or not this dialect supports `if not exists` in creation of tables/schemas/views/etc. - * - * If this is false, Kysely's internal migrations tables and schemas are created - * without `if not exists` in migrations. This is not a problem if the dialect - * supports transactional DDL. - */ - readonly supportsCreateIfNotExists: boolean; - /** - * Whether or not this dialect supports transactional DDL. - * - * If this is true, migrations are executed inside a transaction. - */ - readonly supportsTransactionalDdl: boolean; - /** - * Whether or not this dialect supports the `returning` in inserts - * updates and deletes. - */ - readonly supportsReturning: boolean; - /** - * Whether or not this dialect supports the `output` clause in inserts - * updates and deletes. - */ - readonly supportsOutput?: boolean; - /** - * This method is used to acquire a lock for the migrations so that - * it's not possible for two migration operations to run in parallel. - * - * Most dialects have explicit locks that can be used, like advisory locks - * in PostgreSQL and the get_lock function in MySQL. - * - * If the dialect doesn't have explicit locks the {@link MigrationLockOptions.lockTable} - * created by Kysely can be used instead. You can access it through the `options` object. - * The lock table has two columns `id` and `is_locked` and there's only one row in the table - * whose id is {@link MigrationLockOptions.lockRowId}. `is_locked` is an integer. Kysely - * takes care of creating the lock table and inserting the one single row to it before this - * method is executed. If the dialect supports schemas and the user has specified a custom - * schema in their migration settings, the options object also contains the schema name in - * {@link MigrationLockOptions.lockTableSchema}. - * - * Here's an example of how you might implement this method for a dialect that doesn't - * have explicit locks but supports `FOR UPDATE` row locks and transactional DDL: - * - * ```ts - * import { DialectAdapterBase, type MigrationLockOptions, Kysely } from 'kysely' - * - * export class MyAdapter extends DialectAdapterBase { - * override async acquireMigrationLock( - * db: Kysely, - * options: MigrationLockOptions - * ): Promise { - * const queryDb = options.lockTableSchema - * ? db.withSchema(options.lockTableSchema) - * : db - * - * // Since our imaginary dialect supports transactional DDL and has - * // row locks, we can simply take a row lock here and it will guarantee - * // all subsequent calls to this method from other transactions will - * // wait until this transaction finishes. - * await queryDb - * .selectFrom(options.lockTable) - * .selectAll() - * .where('id', '=', options.lockRowId) - * .forUpdate() - * .execute() - * } - * - * override async releaseMigrationLock() { - * // noop - * } - * } - * ``` - * - * If `supportsTransactionalDdl` is `true` then the `db` passed to this method - * is a transaction inside which the migrations will be executed. Otherwise - * `db` is a single connection (session) that will be used to execute the - * migrations. - */ - acquireMigrationLock(db: Kysely, options: MigrationLockOptions): Promise; - /** - * Releases the migration lock. See {@link acquireMigrationLock}. - * - * If `supportsTransactionalDdl` is `true` then the `db` passed to this method - * is a transaction inside which the migrations were executed. Otherwise `db` - * is a single connection (session) that was used to execute the migrations - * and the `acquireMigrationLock` call. - */ - releaseMigrationLock(db: Kysely, options: MigrationLockOptions): Promise; -} -export interface MigrationLockOptions { - /** - * The name of the migration lock table. - */ - readonly lockTable: string; - /** - * The id of the only row in the migration lock table. - */ - readonly lockRowId: string; - /** - * The schema in which the migration lock table lives. This is only - * defined if the user has specified a custom schema in the migration - * settings. - */ - readonly lockTableSchema?: string; -} diff --git a/node_modules/kysely/dist/esm/dialect/dialect-adapter.js b/node_modules/kysely/dist/esm/dialect/dialect-adapter.js deleted file mode 100644 index 9603d57..0000000 --- a/node_modules/kysely/dist/esm/dialect/dialect-adapter.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/dialect/dialect.d.ts b/node_modules/kysely/dist/esm/dialect/dialect.d.ts deleted file mode 100644 index 50f055a..0000000 --- a/node_modules/kysely/dist/esm/dialect/dialect.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import type { Driver } from '../driver/driver.js'; -import type { Kysely } from '../kysely.js'; -import type { QueryCompiler } from '../query-compiler/query-compiler.js'; -import type { DatabaseIntrospector } from './database-introspector.js'; -import type { DialectAdapter } from './dialect-adapter.js'; -/** - * A Dialect is the glue between Kysely and the underlying database engine. - * - * See the built-in {@link PostgresDialect} as an example of a dialect. - * Users can implement their own dialects and use them by passing it - * in the {@link KyselyConfig.dialect} property. - */ -export interface Dialect { - /** - * Creates a driver for the dialect. - */ - createDriver(): Driver; - /** - * Creates a query compiler for the dialect. - */ - createQueryCompiler(): QueryCompiler; - /** - * Creates an adapter for the dialect. - */ - createAdapter(): DialectAdapter; - /** - * Creates a database introspector that can be used to get database metadata - * such as the table names and column names of those tables. - * - * `db` never has any plugins installed. It's created using - * {@link Kysely.withoutPlugins}. - */ - createIntrospector(db: Kysely): DatabaseIntrospector; -} diff --git a/node_modules/kysely/dist/esm/dialect/dialect.js b/node_modules/kysely/dist/esm/dialect/dialect.js deleted file mode 100644 index 93a1955..0000000 --- a/node_modules/kysely/dist/esm/dialect/dialect.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/dialect/mssql/mssql-adapter.d.ts b/node_modules/kysely/dist/esm/dialect/mssql/mssql-adapter.d.ts deleted file mode 100644 index 632e1d2..0000000 --- a/node_modules/kysely/dist/esm/dialect/mssql/mssql-adapter.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -import type { Kysely } from '../../kysely.js'; -import { DialectAdapterBase } from '../dialect-adapter-base.js'; -export declare class MssqlAdapter extends DialectAdapterBase { - /** - * Whether or not this dialect supports `if not exists` in creation of tables/schemas/views/etc. - * - * If this is false, Kysely's internal migrations tables and schemas are created - * without `if not exists` in migrations. This is not a problem if the dialect - * supports transactional DDL. - */ - get supportsCreateIfNotExists(): boolean; - /** - * Whether or not this dialect supports transactional DDL. - * - * If this is true, migrations are executed inside a transaction. - */ - get supportsTransactionalDdl(): boolean; - get supportsOutput(): boolean; - /** - * This method is used to acquire a lock for the migrations so that - * it's not possible for two migration operations to run in parallel. - * - * Most dialects have explicit locks that can be used, like advisory locks - * in PostgreSQL and the get_lock function in MySQL. - * - * If the dialect doesn't have explicit locks the {@link MigrationLockOptions.lockTable} - * created by Kysely can be used instead. You can access it through the `options` object. - * The lock table has two columns `id` and `is_locked` and there's only one row in the table - * whose id is {@link MigrationLockOptions.lockRowId}. `is_locked` is an integer. Kysely - * takes care of creating the lock table and inserting the one single row to it before this - * method is executed. If the dialect supports schemas and the user has specified a custom - * schema in their migration settings, the options object also contains the schema name in - * {@link MigrationLockOptions.lockTableSchema}. - * - * Here's an example of how you might implement this method for a dialect that doesn't - * have explicit locks but supports `FOR UPDATE` row locks and transactional DDL: - * - * ```ts - * import { DialectAdapterBase, type MigrationLockOptions, Kysely } from 'kysely' - * - * export class MyAdapter extends DialectAdapterBase { - * override async acquireMigrationLock( - * db: Kysely, - * options: MigrationLockOptions - * ): Promise { - * const queryDb = options.lockTableSchema - * ? db.withSchema(options.lockTableSchema) - * : db - * - * // Since our imaginary dialect supports transactional DDL and has - * // row locks, we can simply take a row lock here and it will guarantee - * // all subsequent calls to this method from other transactions will - * // wait until this transaction finishes. - * await queryDb - * .selectFrom(options.lockTable) - * .selectAll() - * .where('id', '=', options.lockRowId) - * .forUpdate() - * .execute() - * } - * - * override async releaseMigrationLock() { - * // noop - * } - * } - * ``` - * - * If `supportsTransactionalDdl` is `true` then the `db` passed to this method - * is a transaction inside which the migrations will be executed. Otherwise - * `db` is a single connection (session) that will be used to execute the - * migrations. - */ - acquireMigrationLock(db: Kysely): Promise; - /** - * Releases the migration lock. See {@link acquireMigrationLock}. - * - * If `supportsTransactionalDdl` is `true` then the `db` passed to this method - * is a transaction inside which the migrations were executed. Otherwise `db` - * is a single connection (session) that was used to execute the migrations - * and the `acquireMigrationLock` call. - */ - releaseMigrationLock(): Promise; -} diff --git a/node_modules/kysely/dist/esm/dialect/mssql/mssql-adapter.js b/node_modules/kysely/dist/esm/dialect/mssql/mssql-adapter.js deleted file mode 100644 index 60e9858..0000000 --- a/node_modules/kysely/dist/esm/dialect/mssql/mssql-adapter.js +++ /dev/null @@ -1,25 +0,0 @@ -/// -import { DEFAULT_MIGRATION_TABLE } from '../../migration/migrator.js'; -import { sql } from '../../raw-builder/sql.js'; -import { DialectAdapterBase } from '../dialect-adapter-base.js'; -export class MssqlAdapter extends DialectAdapterBase { - get supportsCreateIfNotExists() { - return false; - } - get supportsTransactionalDdl() { - return true; - } - get supportsOutput() { - return true; - } - async acquireMigrationLock(db) { - // Acquire a transaction-level exclusive lock on the migrations table. - // https://learn.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-getapplock-transact-sql?view=sql-server-ver16 - await sql `exec sp_getapplock @DbPrincipal = ${sql.lit('dbo')}, @Resource = ${sql.lit(DEFAULT_MIGRATION_TABLE)}, @LockMode = ${sql.lit('Exclusive')}`.execute(db); - } - async releaseMigrationLock() { - // Nothing to do here. `sp_getapplock` is automatically released at the - // end of the transaction and since `supportsTransactionalDdl` true, we know - // the `db` instance passed to acquireMigrationLock is actually a transaction. - } -} diff --git a/node_modules/kysely/dist/esm/dialect/mssql/mssql-dialect-config.d.ts b/node_modules/kysely/dist/esm/dialect/mssql/mssql-dialect-config.d.ts deleted file mode 100644 index 559652a..0000000 --- a/node_modules/kysely/dist/esm/dialect/mssql/mssql-dialect-config.d.ts +++ /dev/null @@ -1,181 +0,0 @@ -import type { KyselyTypeError } from '../../util/type-error.js'; -export interface MssqlDialectConfig { - /** - * When `true`, connections are reset to their initial states when released - * back to the pool, resulting in additional requests to the database. - * - * Defaults to `false`. - */ - resetConnectionsOnRelease?: boolean; - /** - * This dialect uses the `tarn` package to manage the connection pool to your - * database. To use it as a peer dependency and not bundle it with Kysely's code, - * you need to pass the `tarn` package itself. You also need to pass some pool options - * (excluding `create`, `destroy` and `validate` functions which are controlled by this dialect), - * `min` & `max` connections at the very least. - * - * ### Examples - * - * ```ts - * import { MssqlDialect } from 'kysely' - * import * as Tarn from 'tarn' - * import * as Tedious from 'tedious' - * - * const dialect = new MssqlDialect({ - * tarn: { ...Tarn, options: { max: 10, min: 0 } }, - * tedious: { - * ...Tedious, - * connectionFactory: () => new Tedious.Connection({ - * // ... - * server: 'localhost', - * // ... - * }), - * } - * }) - * ``` - */ - tarn: Tarn; - /** - * This dialect uses the `tedious` package to communicate with your MS SQL Server - * database. To use it as a peer dependency and not bundle it with Kysely's code, - * you need to pass the `tedious` package itself. You also need to pass a factory - * function that creates new `tedious` `Connection` instances on demand. - * - * ### Examples - * - * ```ts - * import { MssqlDialect } from 'kysely' - * import * as Tarn from 'tarn' - * import * as Tedious from 'tedious' - * - * const dialect = new MssqlDialect({ - * tarn: { ...Tarn, options: { max: 10, min: 0 } }, - * tedious: { - * ...Tedious, - * connectionFactory: () => new Tedious.Connection({ - * // ... - * server: 'localhost', - * // ... - * }), - * } - * }) - * ``` - */ - tedious: Tedious; - /** - * When `true`, connections are validated before being acquired from the pool, - * resulting in additional requests to the database. - * - * Defaults to `true`. - */ - validateConnections?: boolean; -} -export interface Tedious { - connectionFactory: () => TediousConnection | Promise; - ISOLATION_LEVEL: TediousIsolationLevel; - Request: TediousRequestClass; - /** - * @deprecated use {@link MssqlDialectConfig.resetConnectionsOnRelease} instead. - */ - resetConnectionOnRelease?: KyselyTypeError<'deprecated: use `MssqlDialectConfig.resetConnectionsOnRelease` instead'>; - TYPES: TediousTypes; -} -export interface TediousConnection { - beginTransaction(callback: (err: Error | null | undefined, transactionDescriptor?: any) => void, name?: string | undefined, isolationLevel?: number | undefined): void; - cancel(): boolean; - close(): void; - commitTransaction(callback: (err: Error | null | undefined) => void, name?: string | undefined): void; - connect(connectListener: (err?: Error) => void): void; - execSql(request: TediousRequest): void; - off(event: 'error', listener: (error: unknown) => void): this; - off(event: string, listener: (...args: any[]) => void): this; - on(event: 'error', listener: (error: unknown) => void): this; - on(event: string, listener: (...args: any[]) => void): this; - once(event: 'end', listener: () => void): this; - once(event: string, listener: (...args: any[]) => void): this; - reset(callback: (err: Error | null | undefined) => void): void; - rollbackTransaction(callback: (err: Error | null | undefined) => void, name?: string | undefined): void; - saveTransaction(callback: (err: Error | null | undefined) => void, name: string): void; -} -export type TediousIsolationLevel = Record; -export interface TediousRequestClass { - new (sqlTextOrProcedure: string | undefined, callback: (error?: Error | null, rowCount?: number, rows?: any) => void, options?: { - statementColumnEncryptionSetting?: any; - }): TediousRequest; -} -export declare class TediousRequest { - addParameter(name: string, dataType: TediousDataType, value?: unknown, options?: Readonly<{ - output?: boolean; - length?: number; - precision?: number; - scale?: number; - }> | null): void; - off(event: 'row', listener: (columns: any) => void): this; - off(event: string, listener: (...args: any[]) => void): this; - on(event: 'row', listener: (columns: any) => void): this; - on(event: string, listener: (...args: any[]) => void): this; - once(event: 'requestCompleted', listener: () => void): this; - once(event: string, listener: (...args: any[]) => void): this; - pause(): void; - resume(): void; -} -export interface TediousTypes { - NVarChar: TediousDataType; - BigInt: TediousDataType; - Int: TediousDataType; - Float: TediousDataType; - Bit: TediousDataType; - DateTime: TediousDataType; - VarBinary: TediousDataType; - [x: string]: TediousDataType; -} -export interface TediousDataType { -} -export interface TediousColumnValue { - metadata: { - colName: string; - }; - value: any; -} -export interface Tarn { - /** - * Tarn.js' pool options, excluding `create`, `destroy` and `validate` functions, - * which must be implemented by this dialect. - */ - options: Omit, 'create' | 'destroy' | 'validate'> & { - /** - * @deprecated use {@link MssqlDialectConfig.validateConnections} instead. - */ - validateConnections?: KyselyTypeError<'deprecated: use `MssqlDialectConfig.validateConnections` instead'>; - }; - /** - * Tarn.js' Pool class. - */ - Pool: typeof TarnPool; -} -export declare class TarnPool { - constructor(opt: TarnPoolOptions); - acquire(): TarnPendingRequest; - destroy(): any; - release(resource: R): void; -} -export interface TarnPoolOptions { - acquireTimeoutMillis?: number; - create(cb: (err: Error | null, resource: R) => void): any | (() => Promise); - createRetryIntervalMillis?: number; - createTimeoutMillis?: number; - destroy(resource: R): any; - destroyTimeoutMillis?: number; - idleTimeoutMillis?: number; - log?(msg: string): any; - max: number; - min: number; - propagateCreateError?: boolean; - reapIntervalMillis?: number; - validate?(resource: R): boolean; -} -export interface TarnPendingRequest { - promise: Promise; - resolve: (resource: R) => void; - reject: (err: Error) => void; -} diff --git a/node_modules/kysely/dist/esm/dialect/mssql/mssql-dialect-config.js b/node_modules/kysely/dist/esm/dialect/mssql/mssql-dialect-config.js deleted file mode 100644 index 1c56be3..0000000 --- a/node_modules/kysely/dist/esm/dialect/mssql/mssql-dialect-config.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/dialect/mssql/mssql-dialect.d.ts b/node_modules/kysely/dist/esm/dialect/mssql/mssql-dialect.d.ts deleted file mode 100644 index 4ea8391..0000000 --- a/node_modules/kysely/dist/esm/dialect/mssql/mssql-dialect.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -import type { Driver } from '../../driver/driver.js'; -import type { Kysely } from '../../kysely.js'; -import type { QueryCompiler } from '../../query-compiler/query-compiler.js'; -import type { DatabaseIntrospector } from '../database-introspector.js'; -import type { DialectAdapter } from '../dialect-adapter.js'; -import type { Dialect } from '../dialect.js'; -import type { MssqlDialectConfig } from './mssql-dialect-config.js'; -/** - * MS SQL Server dialect that uses the [tedious](https://tediousjs.github.io/tedious) - * library. - * - * The constructor takes an instance of {@link MssqlDialectConfig}. - * - * ```ts - * import * as Tedious from 'tedious' - * import * as Tarn from 'tarn' - * - * const dialect = new MssqlDialect({ - * tarn: { - * ...Tarn, - * options: { - * min: 0, - * max: 10, - * }, - * }, - * tedious: { - * ...Tedious, - * connectionFactory: () => new Tedious.Connection({ - * authentication: { - * options: { - * password: 'password', - * userName: 'username', - * }, - * type: 'default', - * }, - * options: { - * database: 'some_db', - * port: 1433, - * trustServerCertificate: true, - * }, - * server: 'localhost', - * }), - * }, - * }) - * ``` - */ -export declare class MssqlDialect implements Dialect { - #private; - constructor(config: MssqlDialectConfig); - /** - * Creates a driver for the dialect. - */ - createDriver(): Driver; - /** - * Creates a query compiler for the dialect. - */ - createQueryCompiler(): QueryCompiler; - /** - * Creates an adapter for the dialect. - */ - createAdapter(): DialectAdapter; - /** - * Creates a database introspector that can be used to get database metadata - * such as the table names and column names of those tables. - * - * `db` never has any plugins installed. It's created using - * {@link Kysely.withoutPlugins}. - */ - createIntrospector(db: Kysely): DatabaseIntrospector; -} diff --git a/node_modules/kysely/dist/esm/dialect/mssql/mssql-dialect.js b/node_modules/kysely/dist/esm/dialect/mssql/mssql-dialect.js deleted file mode 100644 index a257579..0000000 --- a/node_modules/kysely/dist/esm/dialect/mssql/mssql-dialect.js +++ /dev/null @@ -1,62 +0,0 @@ -/// -import { MssqlAdapter } from './mssql-adapter.js'; -import { MssqlDriver } from './mssql-driver.js'; -import { MssqlIntrospector } from './mssql-introspector.js'; -import { MssqlQueryCompiler } from './mssql-query-compiler.js'; -/** - * MS SQL Server dialect that uses the [tedious](https://tediousjs.github.io/tedious) - * library. - * - * The constructor takes an instance of {@link MssqlDialectConfig}. - * - * ```ts - * import * as Tedious from 'tedious' - * import * as Tarn from 'tarn' - * - * const dialect = new MssqlDialect({ - * tarn: { - * ...Tarn, - * options: { - * min: 0, - * max: 10, - * }, - * }, - * tedious: { - * ...Tedious, - * connectionFactory: () => new Tedious.Connection({ - * authentication: { - * options: { - * password: 'password', - * userName: 'username', - * }, - * type: 'default', - * }, - * options: { - * database: 'some_db', - * port: 1433, - * trustServerCertificate: true, - * }, - * server: 'localhost', - * }), - * }, - * }) - * ``` - */ -export class MssqlDialect { - #config; - constructor(config) { - this.#config = config; - } - createDriver() { - return new MssqlDriver(this.#config); - } - createQueryCompiler() { - return new MssqlQueryCompiler(); - } - createAdapter() { - return new MssqlAdapter(); - } - createIntrospector(db) { - return new MssqlIntrospector(db); - } -} diff --git a/node_modules/kysely/dist/esm/dialect/mssql/mssql-driver.d.ts b/node_modules/kysely/dist/esm/dialect/mssql/mssql-driver.d.ts deleted file mode 100644 index 8ad96b4..0000000 --- a/node_modules/kysely/dist/esm/dialect/mssql/mssql-driver.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import type { DatabaseConnection, QueryResult } from '../../driver/database-connection.js'; -import type { Driver, TransactionSettings } from '../../driver/driver.js'; -import type { MssqlDialectConfig, Tedious, TediousConnection } from './mssql-dialect-config.js'; -import { CompiledQuery } from '../../query-compiler/compiled-query.js'; -declare const PRIVATE_RESET_METHOD: unique symbol; -declare const PRIVATE_DESTROY_METHOD: unique symbol; -declare const PRIVATE_VALIDATE_METHOD: unique symbol; -export declare class MssqlDriver implements Driver { - #private; - constructor(config: MssqlDialectConfig); - /** - * Initializes the driver. - * - * After calling this method the driver should be usable and `acquireConnection` etc. - * methods should be callable. - */ - init(): Promise; - /** - * Acquires a new connection from the pool. - */ - acquireConnection(): Promise; - /** - * Begins a transaction. - */ - beginTransaction(connection: MssqlConnection, settings: TransactionSettings): Promise; - /** - * Commits a transaction. - */ - commitTransaction(connection: MssqlConnection): Promise; - /** - * Rolls back a transaction. - */ - rollbackTransaction(connection: MssqlConnection): Promise; - savepoint(connection: MssqlConnection, savepointName: string): Promise; - rollbackToSavepoint(connection: MssqlConnection, savepointName: string): Promise; - /** - * Releases a connection back to the pool. - */ - releaseConnection(connection: MssqlConnection): Promise; - /** - * Destroys the driver and releases all resources. - */ - destroy(): Promise; -} -declare class MssqlConnection implements DatabaseConnection { - #private; - constructor(connection: TediousConnection, tedious: Tedious); - beginTransaction(settings: TransactionSettings): Promise; - commitTransaction(): Promise; - connect(): Promise; - executeQuery(compiledQuery: CompiledQuery): Promise>; - rollbackTransaction(savepointName?: string): Promise; - savepoint(savepointName: string): Promise; - streamQuery(compiledQuery: CompiledQuery, chunkSize: number): AsyncIterableIterator>; - [PRIVATE_DESTROY_METHOD](): Promise; - [PRIVATE_RESET_METHOD](): Promise; - [PRIVATE_VALIDATE_METHOD](): Promise; -} -export {}; diff --git a/node_modules/kysely/dist/esm/dialect/mssql/mssql-driver.js b/node_modules/kysely/dist/esm/dialect/mssql/mssql-driver.js deleted file mode 100644 index 933aba2..0000000 --- a/node_modules/kysely/dist/esm/dialect/mssql/mssql-driver.js +++ /dev/null @@ -1,356 +0,0 @@ -/// -import { freeze, isBigInt, isBoolean, isBuffer, isDate, isNull, isNumber, isString, isUndefined, } from '../../util/object-utils.js'; -import { CompiledQuery } from '../../query-compiler/compiled-query.js'; -import { extendStackTrace } from '../../util/stack-trace-utils.js'; -import { randomString } from '../../util/random-string.js'; -import { Deferred } from '../../util/deferred.js'; -const PRIVATE_RESET_METHOD = Symbol(); -const PRIVATE_DESTROY_METHOD = Symbol(); -const PRIVATE_VALIDATE_METHOD = Symbol(); -export class MssqlDriver { - #config; - #pool; - constructor(config) { - this.#config = freeze({ ...config }); - const { tarn, tedious, validateConnections } = this.#config; - const { validateConnections: deprecatedValidateConnections, ...poolOptions } = tarn.options; - this.#pool = new tarn.Pool({ - ...poolOptions, - create: async () => { - const connection = await tedious.connectionFactory(); - return await new MssqlConnection(connection, tedious).connect(); - }, - destroy: async (connection) => { - await connection[PRIVATE_DESTROY_METHOD](); - }, - // @ts-ignore `tarn` accepts a function that returns a promise here, but - // the types are not aligned and it type errors. - validate: validateConnections === false || - deprecatedValidateConnections === false - ? undefined - : (connection) => connection[PRIVATE_VALIDATE_METHOD](), - }); - } - async init() { - // noop - } - async acquireConnection() { - return await this.#pool.acquire().promise; - } - async beginTransaction(connection, settings) { - await connection.beginTransaction(settings); - } - async commitTransaction(connection) { - await connection.commitTransaction(); - } - async rollbackTransaction(connection) { - await connection.rollbackTransaction(); - } - async savepoint(connection, savepointName) { - await connection.savepoint(savepointName); - } - async rollbackToSavepoint(connection, savepointName) { - await connection.rollbackTransaction(savepointName); - } - async releaseConnection(connection) { - if (this.#config.resetConnectionsOnRelease || - this.#config.tedious.resetConnectionOnRelease) { - await connection[PRIVATE_RESET_METHOD](); - } - this.#pool.release(connection); - } - async destroy() { - await this.#pool.destroy(); - } -} -class MssqlConnection { - #connection; - #hasSocketError; - #tedious; - constructor(connection, tedious) { - this.#connection = connection; - this.#hasSocketError = false; - this.#tedious = tedious; - } - async beginTransaction(settings) { - const { isolationLevel } = settings; - await new Promise((resolve, reject) => this.#connection.beginTransaction((error) => { - if (error) - reject(error); - else - resolve(undefined); - }, isolationLevel ? randomString(8) : undefined, isolationLevel - ? this.#getTediousIsolationLevel(isolationLevel) - : undefined)); - } - async commitTransaction() { - await new Promise((resolve, reject) => this.#connection.commitTransaction((error) => { - if (error) - reject(error); - else - resolve(undefined); - })); - } - async connect() { - const { promise: waitForConnected, reject, resolve } = new Deferred(); - this.#connection.connect((error) => { - if (error) { - return reject(error); - } - resolve(); - }); - this.#connection.on('error', (error) => { - if (error instanceof Error && - 'code' in error && - error.code === 'ESOCKET') { - this.#hasSocketError = true; - } - console.error(error); - reject(error); - }); - function endListener() { - reject(new Error('The connection ended without ever completing the connection')); - } - this.#connection.once('end', endListener); - await waitForConnected; - this.#connection.off('end', endListener); - return this; - } - async executeQuery(compiledQuery) { - try { - const deferred = new Deferred(); - const request = new MssqlRequest({ - compiledQuery, - tedious: this.#tedious, - onDone: deferred, - }); - this.#connection.execSql(request.request); - const { rowCount, rows } = await deferred.promise; - return { - numAffectedRows: rowCount !== undefined ? BigInt(rowCount) : undefined, - rows, - }; - } - catch (err) { - throw extendStackTrace(err, new Error()); - } - } - async rollbackTransaction(savepointName) { - await new Promise((resolve, reject) => this.#connection.rollbackTransaction((error) => { - if (error) - reject(error); - else - resolve(undefined); - }, savepointName)); - } - async savepoint(savepointName) { - await new Promise((resolve, reject) => this.#connection.saveTransaction((error) => { - if (error) - reject(error); - else - resolve(undefined); - }, savepointName)); - } - async *streamQuery(compiledQuery, chunkSize) { - if (!Number.isInteger(chunkSize) || chunkSize <= 0) { - throw new Error('chunkSize must be a positive integer'); - } - const request = new MssqlRequest({ - compiledQuery, - streamChunkSize: chunkSize, - tedious: this.#tedious, - }); - this.#connection.execSql(request.request); - try { - while (true) { - const rows = await request.readChunk(); - if (rows.length === 0) { - break; - } - yield { rows }; - if (rows.length < chunkSize) { - break; - } - } - } - finally { - await this.#cancelRequest(request); - } - } - #getTediousIsolationLevel(isolationLevel) { - const { ISOLATION_LEVEL } = this.#tedious; - const mapper = { - 'read committed': ISOLATION_LEVEL.READ_COMMITTED, - 'read uncommitted': ISOLATION_LEVEL.READ_UNCOMMITTED, - 'repeatable read': ISOLATION_LEVEL.REPEATABLE_READ, - serializable: ISOLATION_LEVEL.SERIALIZABLE, - snapshot: ISOLATION_LEVEL.SNAPSHOT, - }; - const tediousIsolationLevel = mapper[isolationLevel]; - if (tediousIsolationLevel === undefined) { - throw new Error(`Unknown isolation level: ${isolationLevel}`); - } - return tediousIsolationLevel; - } - #cancelRequest(request) { - return new Promise((resolve) => { - request.request.once('requestCompleted', resolve); - const wasCanceled = this.#connection.cancel(); - if (!wasCanceled) { - request.request.off('requestCompleted', resolve); - resolve(); - } - }); - } - [PRIVATE_DESTROY_METHOD]() { - if ('closed' in this.#connection && this.#connection.closed) { - return Promise.resolve(); - } - return new Promise((resolve) => { - this.#connection.once('end', resolve); - this.#connection.close(); - }); - } - async [PRIVATE_RESET_METHOD]() { - await new Promise((resolve, reject) => { - this.#connection.reset((error) => { - if (error) { - return reject(error); - } - resolve(); - }); - }); - } - async [PRIVATE_VALIDATE_METHOD]() { - if (this.#hasSocketError || this.#isConnectionClosed()) { - return false; - } - try { - const deferred = new Deferred(); - const request = new MssqlRequest({ - compiledQuery: CompiledQuery.raw('select 1'), - onDone: deferred, - tedious: this.#tedious, - }); - this.#connection.execSql(request.request); - await deferred.promise; - return true; - } - catch { - return false; - } - } - #isConnectionClosed() { - return 'closed' in this.#connection && Boolean(this.#connection.closed); - } -} -class MssqlRequest { - #request; - #rows; - #streamChunkSize; - #subscribers; - #tedious; - #rowCount; - constructor(props) { - const { compiledQuery, onDone, streamChunkSize, tedious } = props; - this.#rows = []; - this.#streamChunkSize = streamChunkSize; - this.#subscribers = {}; - this.#tedious = tedious; - if (onDone) { - const subscriptionKey = 'onDone'; - this.#subscribers[subscriptionKey] = (event, error) => { - if (event === 'chunkReady') { - return; - } - delete this.#subscribers[subscriptionKey]; - if (event === 'error') { - return onDone.reject(error); - } - onDone.resolve({ - rowCount: this.#rowCount, - rows: this.#rows, - }); - }; - } - this.#request = new this.#tedious.Request(compiledQuery.sql, (err, rowCount) => { - if (err) { - return Object.values(this.#subscribers).forEach((subscriber) => subscriber('error', err instanceof AggregateError ? err.errors : err)); - } - this.#rowCount = rowCount; - }); - this.#addParametersToRequest(compiledQuery.parameters); - this.#attachListeners(); - } - get request() { - return this.#request; - } - readChunk() { - const subscriptionKey = this.readChunk.name; - return new Promise((resolve, reject) => { - this.#subscribers[subscriptionKey] = (event, error) => { - delete this.#subscribers[subscriptionKey]; - if (event === 'error') { - return reject(error); - } - resolve(this.#rows.splice(0, this.#streamChunkSize)); - }; - this.#request.resume(); - }); - } - #addParametersToRequest(parameters) { - for (let i = 0; i < parameters.length; i++) { - const parameter = parameters[i]; - this.#request.addParameter(String(i + 1), this.#getTediousDataType(parameter), parameter); - } - } - #attachListeners() { - const pauseAndEmitChunkReady = this.#streamChunkSize - ? () => { - if (this.#streamChunkSize <= this.#rows.length) { - this.#request.pause(); - Object.values(this.#subscribers).forEach((subscriber) => subscriber('chunkReady')); - } - } - : () => { }; - const rowListener = (columns) => { - const row = {}; - for (const column of columns) { - row[column.metadata.colName] = column.value; - } - this.#rows.push(row); - pauseAndEmitChunkReady(); - }; - this.#request.on('row', rowListener); - this.#request.once('requestCompleted', () => { - Object.values(this.#subscribers).forEach((subscriber) => subscriber('completed')); - this.#request.off('row', rowListener); - }); - } - #getTediousDataType(value) { - if (isNull(value) || isUndefined(value) || isString(value)) { - return this.#tedious.TYPES.NVarChar; - } - if (isBigInt(value) || (isNumber(value) && value % 1 === 0)) { - if (value < -2147483648 || value > 2147483647) { - return this.#tedious.TYPES.BigInt; - } - else { - return this.#tedious.TYPES.Int; - } - } - if (isNumber(value)) { - return this.#tedious.TYPES.Float; - } - if (isBoolean(value)) { - return this.#tedious.TYPES.Bit; - } - if (isDate(value)) { - return this.#tedious.TYPES.DateTime; - } - if (isBuffer(value)) { - return this.#tedious.TYPES.VarBinary; - } - return this.#tedious.TYPES.NVarChar; - } -} diff --git a/node_modules/kysely/dist/esm/dialect/mssql/mssql-introspector.d.ts b/node_modules/kysely/dist/esm/dialect/mssql/mssql-introspector.d.ts deleted file mode 100644 index 7e429da..0000000 --- a/node_modules/kysely/dist/esm/dialect/mssql/mssql-introspector.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { Kysely } from '../../kysely.js'; -import type { DatabaseIntrospector, DatabaseMetadata, DatabaseMetadataOptions, SchemaMetadata, TableMetadata } from '../database-introspector.js'; -export declare class MssqlIntrospector implements DatabaseIntrospector { - #private; - constructor(db: Kysely); - /** - * Get schema metadata. - */ - getSchemas(): Promise; - /** - * Get tables and views metadata. - */ - getTables(options?: DatabaseMetadataOptions): Promise; - /** - * Get the database metadata such as table and column names. - * - * @deprecated Use getTables() instead. - */ - getMetadata(options?: DatabaseMetadataOptions): Promise; -} diff --git a/node_modules/kysely/dist/esm/dialect/mssql/mssql-introspector.js b/node_modules/kysely/dist/esm/dialect/mssql/mssql-introspector.js deleted file mode 100644 index 4c6c837..0000000 --- a/node_modules/kysely/dist/esm/dialect/mssql/mssql-introspector.js +++ /dev/null @@ -1,107 +0,0 @@ -/// -import { DEFAULT_MIGRATION_LOCK_TABLE, DEFAULT_MIGRATION_TABLE, } from '../../migration/migrator.js'; -import { freeze } from '../../util/object-utils.js'; -export class MssqlIntrospector { - #db; - constructor(db) { - this.#db = db; - } - async getSchemas() { - return await this.#db.selectFrom('sys.schemas').select('name').execute(); - } - async getTables(options = { withInternalKyselyTables: false }) { - const rawColumns = await this.#db - .selectFrom('sys.tables as tables') - .leftJoin('sys.schemas as table_schemas', 'table_schemas.schema_id', 'tables.schema_id') - .innerJoin('sys.columns as columns', 'columns.object_id', 'tables.object_id') - .innerJoin('sys.types as types', 'types.user_type_id', 'columns.user_type_id') - .leftJoin('sys.schemas as type_schemas', 'type_schemas.schema_id', 'types.schema_id') - .leftJoin('sys.extended_properties as comments', (join) => join - .onRef('comments.major_id', '=', 'tables.object_id') - .onRef('comments.minor_id', '=', 'columns.column_id') - .on('comments.name', '=', 'MS_Description')) - .$if(!options.withInternalKyselyTables, (qb) => qb - .where('tables.name', '!=', DEFAULT_MIGRATION_TABLE) - .where('tables.name', '!=', DEFAULT_MIGRATION_LOCK_TABLE)) - .select([ - 'tables.name as table_name', - (eb) => eb - .ref('tables.type') - .$castTo() - .as('table_type'), - 'table_schemas.name as table_schema_name', - 'columns.default_object_id as column_default_object_id', - 'columns.generated_always_type_desc as column_generated_always_type', - 'columns.is_computed as column_is_computed', - 'columns.is_identity as column_is_identity', - 'columns.is_nullable as column_is_nullable', - 'columns.is_rowguidcol as column_is_rowguidcol', - 'columns.name as column_name', - 'types.is_nullable as type_is_nullable', - 'types.name as type_name', - 'type_schemas.name as type_schema_name', - 'comments.value as column_comment', - ]) - .unionAll(this.#db - .selectFrom('sys.views as views') - .leftJoin('sys.schemas as view_schemas', 'view_schemas.schema_id', 'views.schema_id') - .innerJoin('sys.columns as columns', 'columns.object_id', 'views.object_id') - .innerJoin('sys.types as types', 'types.user_type_id', 'columns.user_type_id') - .leftJoin('sys.schemas as type_schemas', 'type_schemas.schema_id', 'types.schema_id') - .leftJoin('sys.extended_properties as comments', (join) => join - .onRef('comments.major_id', '=', 'views.object_id') - .onRef('comments.minor_id', '=', 'columns.column_id') - .on('comments.name', '=', 'MS_Description')) - .select([ - 'views.name as table_name', - 'views.type as table_type', - 'view_schemas.name as table_schema_name', - 'columns.default_object_id as column_default_object_id', - 'columns.generated_always_type_desc as column_generated_always_type', - 'columns.is_computed as column_is_computed', - 'columns.is_identity as column_is_identity', - 'columns.is_nullable as column_is_nullable', - 'columns.is_rowguidcol as column_is_rowguidcol', - 'columns.name as column_name', - 'types.is_nullable as type_is_nullable', - 'types.name as type_name', - 'type_schemas.name as type_schema_name', - 'comments.value as column_comment', - ])) - .orderBy('table_schema_name') - .orderBy('table_name') - .orderBy('column_name') - .execute(); - const tableDictionary = {}; - for (const rawColumn of rawColumns) { - const key = `${rawColumn.table_schema_name}.${rawColumn.table_name}`; - const table = (tableDictionary[key] = - tableDictionary[key] || - freeze({ - columns: [], - isView: rawColumn.table_type === 'V ', - name: rawColumn.table_name, - schema: rawColumn.table_schema_name ?? undefined, - })); - table.columns.push(freeze({ - dataType: rawColumn.type_name, - dataTypeSchema: rawColumn.type_schema_name ?? undefined, - hasDefaultValue: rawColumn.column_default_object_id > 0 || - rawColumn.column_generated_always_type !== 'NOT_APPLICABLE' || - rawColumn.column_is_identity || - rawColumn.column_is_computed || - rawColumn.column_is_rowguidcol, - isAutoIncrementing: rawColumn.column_is_identity, - isNullable: rawColumn.column_is_nullable && rawColumn.type_is_nullable, - name: rawColumn.column_name, - comment: rawColumn.column_comment ?? undefined, - })); - } - return Object.values(tableDictionary); - } - async getMetadata(options) { - return { - tables: await this.getTables(options), - }; - } -} diff --git a/node_modules/kysely/dist/esm/dialect/mssql/mssql-query-compiler.d.ts b/node_modules/kysely/dist/esm/dialect/mssql/mssql-query-compiler.d.ts deleted file mode 100644 index cfa2cf7..0000000 --- a/node_modules/kysely/dist/esm/dialect/mssql/mssql-query-compiler.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { AddColumnNode } from '../../operation-node/add-column-node.js'; -import type { AlterTableColumnAlterationNode } from '../../operation-node/alter-table-node.js'; -import type { DropColumnNode } from '../../operation-node/drop-column-node.js'; -import type { OffsetNode } from '../../operation-node/offset-node.js'; -import type { MergeQueryNode } from '../../operation-node/merge-query-node.js'; -import { DefaultQueryCompiler } from '../../query-compiler/default-query-compiler.js'; -import type { CollateNode } from '../../operation-node/collate-node.js'; -export declare class MssqlQueryCompiler extends DefaultQueryCompiler { - protected getCurrentParameterPlaceholder(): string; - protected visitOffset(node: OffsetNode): void; - protected compileColumnAlterations(columnAlterations: readonly AlterTableColumnAlterationNode[]): void; - protected visitAddColumn(node: AddColumnNode): void; - protected visitDropColumn(node: DropColumnNode): void; - protected visitMergeQuery(node: MergeQueryNode): void; - protected visitCollate(node: CollateNode): void; - protected announcesNewColumnDataType(): boolean; -} diff --git a/node_modules/kysely/dist/esm/dialect/mssql/mssql-query-compiler.js b/node_modules/kysely/dist/esm/dialect/mssql/mssql-query-compiler.js deleted file mode 100644 index c6067a3..0000000 --- a/node_modules/kysely/dist/esm/dialect/mssql/mssql-query-compiler.js +++ /dev/null @@ -1,80 +0,0 @@ -/// -import { DefaultQueryCompiler } from '../../query-compiler/default-query-compiler.js'; -const COLLATION_CHAR_REGEX = /^[a-z0-9_]$/i; -export class MssqlQueryCompiler extends DefaultQueryCompiler { - getCurrentParameterPlaceholder() { - return `@${this.numParameters}`; - } - visitOffset(node) { - super.visitOffset(node); - this.append(' rows'); - } - // mssql allows multi-column alterations in a single statement, - // but you can only use the command keyword/s once. - // it also doesn't support multiple kinds of commands in the same - // alter table statement, but we compile that anyway for the sake - // of WYSIWYG. - compileColumnAlterations(columnAlterations) { - const nodesByKind = {}; - for (const columnAlteration of columnAlterations) { - if (!nodesByKind[columnAlteration.kind]) { - nodesByKind[columnAlteration.kind] = []; - } - nodesByKind[columnAlteration.kind].push(columnAlteration); - } - let first = true; - if (nodesByKind.AddColumnNode) { - this.append('add '); - this.compileList(nodesByKind.AddColumnNode); - first = false; - } - // multiple of these are not really supported by mssql, - // but for the sake of WYSIWYG. - if (nodesByKind.AlterColumnNode) { - if (!first) - this.append(', '); - this.compileList(nodesByKind.AlterColumnNode); - } - if (nodesByKind.DropColumnNode) { - if (!first) - this.append(', '); - this.append('drop column '); - this.compileList(nodesByKind.DropColumnNode); - } - // not really supported by mssql, but for the sake of WYSIWYG. - if (nodesByKind.ModifyColumnNode) { - if (!first) - this.append(', '); - this.compileList(nodesByKind.ModifyColumnNode); - } - // not really supported by mssql, but for the sake of WYSIWYG. - if (nodesByKind.RenameColumnNode) { - if (!first) - this.append(', '); - this.compileList(nodesByKind.RenameColumnNode); - } - } - visitAddColumn(node) { - this.visitNode(node.column); - } - visitDropColumn(node) { - this.visitNode(node.column); - } - visitMergeQuery(node) { - super.visitMergeQuery(node); - this.append(';'); - } - visitCollate(node) { - this.append('collate '); - const { name } = node.collation; - for (const char of name) { - if (!COLLATION_CHAR_REGEX.test(char)) { - throw new Error(`Invalid collation: ${name}`); - } - } - this.append(name); - } - announcesNewColumnDataType() { - return false; - } -} diff --git a/node_modules/kysely/dist/esm/dialect/mysql/mysql-adapter.d.ts b/node_modules/kysely/dist/esm/dialect/mysql/mysql-adapter.d.ts deleted file mode 100644 index 7a7d5ed..0000000 --- a/node_modules/kysely/dist/esm/dialect/mysql/mysql-adapter.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -import type { Kysely } from '../../kysely.js'; -import { DialectAdapterBase } from '../dialect-adapter-base.js'; -import type { MigrationLockOptions } from '../dialect-adapter.js'; -export declare class MysqlAdapter extends DialectAdapterBase { - /** - * Whether or not this dialect supports transactional DDL. - * - * If this is true, migrations are executed inside a transaction. - */ - get supportsTransactionalDdl(): boolean; - /** - * Whether or not this dialect supports the `returning` in inserts - * updates and deletes. - */ - get supportsReturning(): boolean; - /** - * This method is used to acquire a lock for the migrations so that - * it's not possible for two migration operations to run in parallel. - * - * Most dialects have explicit locks that can be used, like advisory locks - * in PostgreSQL and the get_lock function in MySQL. - * - * If the dialect doesn't have explicit locks the {@link MigrationLockOptions.lockTable} - * created by Kysely can be used instead. You can access it through the `options` object. - * The lock table has two columns `id` and `is_locked` and there's only one row in the table - * whose id is {@link MigrationLockOptions.lockRowId}. `is_locked` is an integer. Kysely - * takes care of creating the lock table and inserting the one single row to it before this - * method is executed. If the dialect supports schemas and the user has specified a custom - * schema in their migration settings, the options object also contains the schema name in - * {@link MigrationLockOptions.lockTableSchema}. - * - * Here's an example of how you might implement this method for a dialect that doesn't - * have explicit locks but supports `FOR UPDATE` row locks and transactional DDL: - * - * ```ts - * import { DialectAdapterBase, type MigrationLockOptions, Kysely } from 'kysely' - * - * export class MyAdapter extends DialectAdapterBase { - * override async acquireMigrationLock( - * db: Kysely, - * options: MigrationLockOptions - * ): Promise { - * const queryDb = options.lockTableSchema - * ? db.withSchema(options.lockTableSchema) - * : db - * - * // Since our imaginary dialect supports transactional DDL and has - * // row locks, we can simply take a row lock here and it will guarantee - * // all subsequent calls to this method from other transactions will - * // wait until this transaction finishes. - * await queryDb - * .selectFrom(options.lockTable) - * .selectAll() - * .where('id', '=', options.lockRowId) - * .forUpdate() - * .execute() - * } - * - * override async releaseMigrationLock() { - * // noop - * } - * } - * ``` - * - * If `supportsTransactionalDdl` is `true` then the `db` passed to this method - * is a transaction inside which the migrations will be executed. Otherwise - * `db` is a single connection (session) that will be used to execute the - * migrations. - */ - acquireMigrationLock(db: Kysely, _opt: MigrationLockOptions): Promise; - /** - * Releases the migration lock. See {@link acquireMigrationLock}. - * - * If `supportsTransactionalDdl` is `true` then the `db` passed to this method - * is a transaction inside which the migrations were executed. Otherwise `db` - * is a single connection (session) that was used to execute the migrations - * and the `acquireMigrationLock` call. - */ - releaseMigrationLock(db: Kysely, _opt: MigrationLockOptions): Promise; -} diff --git a/node_modules/kysely/dist/esm/dialect/mysql/mysql-adapter.js b/node_modules/kysely/dist/esm/dialect/mysql/mysql-adapter.js deleted file mode 100644 index cbcca7f..0000000 --- a/node_modules/kysely/dist/esm/dialect/mysql/mysql-adapter.js +++ /dev/null @@ -1,25 +0,0 @@ -/// -import { sql } from '../../raw-builder/sql.js'; -import { DialectAdapterBase } from '../dialect-adapter-base.js'; -const LOCK_ID = 'ea586330-2c93-47c8-908d-981d9d270f9d'; -const LOCK_TIMEOUT_SECONDS = 60 * 60; -export class MysqlAdapter extends DialectAdapterBase { - get supportsTransactionalDdl() { - return false; - } - get supportsReturning() { - return false; - } - async acquireMigrationLock(db, _opt) { - // Kysely uses a single connection to run the migrations. Because of that, we - // can take a lock using `get_lock`. Locks acquired using `get_lock` get - // released when the connection is destroyed (session ends) or when the lock - // is released using `release_lock`. This way we know that the lock is either - // released by us after successfull or failed migrations OR it's released by - // MySQL if the process gets killed for some reason. - await sql `select get_lock(${sql.lit(LOCK_ID)}, ${sql.lit(LOCK_TIMEOUT_SECONDS)})`.execute(db); - } - async releaseMigrationLock(db, _opt) { - await sql `select release_lock(${sql.lit(LOCK_ID)})`.execute(db); - } -} diff --git a/node_modules/kysely/dist/esm/dialect/mysql/mysql-dialect-config.d.ts b/node_modules/kysely/dist/esm/dialect/mysql/mysql-dialect-config.d.ts deleted file mode 100644 index 6f48c9b..0000000 --- a/node_modules/kysely/dist/esm/dialect/mysql/mysql-dialect-config.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -import type { DatabaseConnection } from '../../driver/database-connection.js'; -/** - * Config for the MySQL dialect. - * - * https://github.com/sidorares/node-mysql2#using-connection-pools - */ -export interface MysqlDialectConfig { - /** - * A mysql2 Pool instance or a function that returns one. - * - * If a function is provided, it's called once when the first query is executed. - * - * https://github.com/sidorares/node-mysql2#using-connection-pools - */ - pool: MysqlPool | (() => Promise); - /** - * Called once for each created connection. - */ - onCreateConnection?: (connection: DatabaseConnection) => Promise; - /** - * Called every time a connection is acquired from the connection pool. - */ - onReserveConnection?: (connection: DatabaseConnection) => Promise; -} -/** - * This interface is the subset of mysql2 driver's `Pool` class that - * kysely needs. - * - * We don't use the type from `mysql2` here to not have a dependency to it. - * - * https://github.com/sidorares/node-mysql2#using-connection-pools - */ -export interface MysqlPool { - getConnection(callback: (error: unknown, connection: MysqlPoolConnection) => void): void; - end(callback: (error: unknown) => void): void; -} -export interface MysqlPoolConnection { - query(sql: string, parameters: Array): { - stream: (options: MysqlStreamOptions) => MysqlStream; - }; - query(sql: string, parameters: Array, callback: (error: unknown, result: MysqlQueryResult) => void): void; - release(): void; -} -export interface MysqlStreamOptions { - highWaterMark?: number; - objectMode?: true; -} -export interface MysqlStream { - [Symbol.asyncIterator](): AsyncIterableIterator; -} -export interface MysqlOkPacket { - affectedRows: number; - changedRows: number; - insertId: number; -} -export type MysqlQueryResult = MysqlOkPacket | Record[]; diff --git a/node_modules/kysely/dist/esm/dialect/mysql/mysql-dialect-config.js b/node_modules/kysely/dist/esm/dialect/mysql/mysql-dialect-config.js deleted file mode 100644 index 01e095e..0000000 --- a/node_modules/kysely/dist/esm/dialect/mysql/mysql-dialect-config.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/dialect/mysql/mysql-dialect.d.ts b/node_modules/kysely/dist/esm/dialect/mysql/mysql-dialect.d.ts deleted file mode 100644 index 8fda184..0000000 --- a/node_modules/kysely/dist/esm/dialect/mysql/mysql-dialect.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -import type { Driver } from '../../driver/driver.js'; -import type { Kysely } from '../../kysely.js'; -import type { QueryCompiler } from '../../query-compiler/query-compiler.js'; -import type { Dialect } from '../dialect.js'; -import type { DatabaseIntrospector } from '../database-introspector.js'; -import type { DialectAdapter } from '../dialect-adapter.js'; -import type { MysqlDialectConfig } from './mysql-dialect-config.js'; -/** - * MySQL dialect that uses the [mysql2](https://github.com/sidorares/node-mysql2#readme) library. - * - * The constructor takes an instance of {@link MysqlDialectConfig}. - * - * ```ts - * import { createPool } from 'mysql2' - * - * new MysqlDialect({ - * pool: createPool({ - * database: 'some_db', - * host: 'localhost', - * }) - * }) - * ``` - * - * If you want the pool to only be created once it's first used, `pool` - * can be a function: - * - * ```ts - * import { createPool } from 'mysql2' - * - * new MysqlDialect({ - * pool: async () => createPool({ - * database: 'some_db', - * host: 'localhost', - * }) - * }) - * ``` - */ -export declare class MysqlDialect implements Dialect { - #private; - constructor(config: MysqlDialectConfig); - /** - * Creates a driver for the dialect. - */ - createDriver(): Driver; - /** - * Creates a query compiler for the dialect. - */ - createQueryCompiler(): QueryCompiler; - /** - * Creates an adapter for the dialect. - */ - createAdapter(): DialectAdapter; - /** - * Creates a database introspector that can be used to get database metadata - * such as the table names and column names of those tables. - * - * `db` never has any plugins installed. It's created using - * {@link Kysely.withoutPlugins}. - */ - createIntrospector(db: Kysely): DatabaseIntrospector; -} diff --git a/node_modules/kysely/dist/esm/dialect/mysql/mysql-dialect.js b/node_modules/kysely/dist/esm/dialect/mysql/mysql-dialect.js deleted file mode 100644 index a3610f9..0000000 --- a/node_modules/kysely/dist/esm/dialect/mysql/mysql-dialect.js +++ /dev/null @@ -1,53 +0,0 @@ -/// -import { MysqlDriver } from './mysql-driver.js'; -import { MysqlQueryCompiler } from './mysql-query-compiler.js'; -import { MysqlIntrospector } from './mysql-introspector.js'; -import { MysqlAdapter } from './mysql-adapter.js'; -/** - * MySQL dialect that uses the [mysql2](https://github.com/sidorares/node-mysql2#readme) library. - * - * The constructor takes an instance of {@link MysqlDialectConfig}. - * - * ```ts - * import { createPool } from 'mysql2' - * - * new MysqlDialect({ - * pool: createPool({ - * database: 'some_db', - * host: 'localhost', - * }) - * }) - * ``` - * - * If you want the pool to only be created once it's first used, `pool` - * can be a function: - * - * ```ts - * import { createPool } from 'mysql2' - * - * new MysqlDialect({ - * pool: async () => createPool({ - * database: 'some_db', - * host: 'localhost', - * }) - * }) - * ``` - */ -export class MysqlDialect { - #config; - constructor(config) { - this.#config = config; - } - createDriver() { - return new MysqlDriver(this.#config); - } - createQueryCompiler() { - return new MysqlQueryCompiler(); - } - createAdapter() { - return new MysqlAdapter(); - } - createIntrospector(db) { - return new MysqlIntrospector(db); - } -} diff --git a/node_modules/kysely/dist/esm/dialect/mysql/mysql-driver.d.ts b/node_modules/kysely/dist/esm/dialect/mysql/mysql-driver.d.ts deleted file mode 100644 index f6167f1..0000000 --- a/node_modules/kysely/dist/esm/dialect/mysql/mysql-driver.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -import type { DatabaseConnection, QueryResult } from '../../driver/database-connection.js'; -import type { Driver, TransactionSettings } from '../../driver/driver.js'; -import { CompiledQuery } from '../../query-compiler/compiled-query.js'; -import type { QueryCompiler } from '../../query-compiler/query-compiler.js'; -import type { MysqlDialectConfig, MysqlPoolConnection } from './mysql-dialect-config.js'; -declare const PRIVATE_RELEASE_METHOD: unique symbol; -export declare class MysqlDriver implements Driver { - #private; - constructor(configOrPool: MysqlDialectConfig); - /** - * Initializes the driver. - * - * After calling this method the driver should be usable and `acquireConnection` etc. - * methods should be callable. - */ - init(): Promise; - /** - * Acquires a new connection from the pool. - */ - acquireConnection(): Promise; - /** - * Begins a transaction. - */ - beginTransaction(connection: DatabaseConnection, settings: TransactionSettings): Promise; - /** - * Commits a transaction. - */ - commitTransaction(connection: DatabaseConnection): Promise; - /** - * Rolls back a transaction. - */ - rollbackTransaction(connection: DatabaseConnection): Promise; - savepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - rollbackToSavepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - releaseSavepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - /** - * Releases a connection back to the pool. - */ - releaseConnection(connection: MysqlConnection): Promise; - /** - * Destroys the driver and releases all resources. - */ - destroy(): Promise; -} -declare class MysqlConnection implements DatabaseConnection { - #private; - constructor(rawConnection: MysqlPoolConnection); - executeQuery(compiledQuery: CompiledQuery): Promise>; - streamQuery(compiledQuery: CompiledQuery, _chunkSize: number): AsyncIterableIterator>; - [PRIVATE_RELEASE_METHOD](): void; -} -export {}; diff --git a/node_modules/kysely/dist/esm/dialect/mysql/mysql-driver.js b/node_modules/kysely/dist/esm/dialect/mysql/mysql-driver.js deleted file mode 100644 index 66db1de..0000000 --- a/node_modules/kysely/dist/esm/dialect/mysql/mysql-driver.js +++ /dev/null @@ -1,177 +0,0 @@ -/// -import { parseSavepointCommand } from '../../parser/savepoint-parser.js'; -import { CompiledQuery } from '../../query-compiler/compiled-query.js'; -import { isFunction, isObject, freeze } from '../../util/object-utils.js'; -import { createQueryId } from '../../util/query-id.js'; -import { extendStackTrace } from '../../util/stack-trace-utils.js'; -const PRIVATE_RELEASE_METHOD = Symbol(); -export class MysqlDriver { - #config; - #connections = new WeakMap(); - #pool; - constructor(configOrPool) { - this.#config = freeze({ ...configOrPool }); - } - async init() { - this.#pool = isFunction(this.#config.pool) - ? await this.#config.pool() - : this.#config.pool; - } - async acquireConnection() { - const rawConnection = await this.#acquireConnection(); - let connection = this.#connections.get(rawConnection); - if (!connection) { - connection = new MysqlConnection(rawConnection); - this.#connections.set(rawConnection, connection); - // The driver must take care of calling `onCreateConnection` when a new - // connection is created. The `mysql2` module doesn't provide an async hook - // for the connection creation. We need to call the method explicitly. - if (this.#config?.onCreateConnection) { - await this.#config.onCreateConnection(connection); - } - } - if (this.#config?.onReserveConnection) { - await this.#config.onReserveConnection(connection); - } - return connection; - } - async #acquireConnection() { - return new Promise((resolve, reject) => { - this.#pool.getConnection(async (err, rawConnection) => { - if (err) { - reject(err); - } - else { - resolve(rawConnection); - } - }); - }); - } - async beginTransaction(connection, settings) { - if (settings.isolationLevel || settings.accessMode) { - const parts = []; - if (settings.isolationLevel) { - parts.push(`isolation level ${settings.isolationLevel}`); - } - if (settings.accessMode) { - parts.push(settings.accessMode); - } - const sql = `set transaction ${parts.join(', ')}`; - // On MySQL this sets the isolation level of the next transaction. - await connection.executeQuery(CompiledQuery.raw(sql)); - } - await connection.executeQuery(CompiledQuery.raw('begin')); - } - async commitTransaction(connection) { - await connection.executeQuery(CompiledQuery.raw('commit')); - } - async rollbackTransaction(connection) { - await connection.executeQuery(CompiledQuery.raw('rollback')); - } - async savepoint(connection, savepointName, compileQuery) { - await connection.executeQuery(compileQuery(parseSavepointCommand('savepoint', savepointName), createQueryId())); - } - async rollbackToSavepoint(connection, savepointName, compileQuery) { - await connection.executeQuery(compileQuery(parseSavepointCommand('rollback to', savepointName), createQueryId())); - } - async releaseSavepoint(connection, savepointName, compileQuery) { - await connection.executeQuery(compileQuery(parseSavepointCommand('release savepoint', savepointName), createQueryId())); - } - async releaseConnection(connection) { - connection[PRIVATE_RELEASE_METHOD](); - } - async destroy() { - return new Promise((resolve, reject) => { - this.#pool.end((err) => { - if (err) { - reject(err); - } - else { - resolve(); - } - }); - }); - } -} -function isOkPacket(obj) { - return isObject(obj) && 'insertId' in obj && 'affectedRows' in obj; -} -class MysqlConnection { - #rawConnection; - constructor(rawConnection) { - this.#rawConnection = rawConnection; - } - async executeQuery(compiledQuery) { - try { - const result = await this.#executeQuery(compiledQuery); - if (isOkPacket(result)) { - const { insertId, affectedRows, changedRows } = result; - return { - insertId: insertId !== undefined && - insertId !== null && - insertId.toString() !== '0' - ? BigInt(insertId) - : undefined, - numAffectedRows: affectedRows !== undefined && affectedRows !== null - ? BigInt(affectedRows) - : undefined, - numChangedRows: changedRows !== undefined && changedRows !== null - ? BigInt(changedRows) - : undefined, - rows: [], - }; - } - else if (Array.isArray(result)) { - return { - rows: result, - }; - } - return { - rows: [], - }; - } - catch (err) { - throw extendStackTrace(err, new Error()); - } - } - #executeQuery(compiledQuery) { - return new Promise((resolve, reject) => { - this.#rawConnection.query(compiledQuery.sql, compiledQuery.parameters, (err, result) => { - if (err) { - reject(err); - } - else { - resolve(result); - } - }); - }); - } - async *streamQuery(compiledQuery, _chunkSize) { - const stream = this.#rawConnection - .query(compiledQuery.sql, compiledQuery.parameters) - .stream({ - objectMode: true, - }); - try { - for await (const row of stream) { - yield { - rows: [row], - }; - } - } - catch (ex) { - if (ex && - typeof ex === 'object' && - 'code' in ex && - // @ts-ignore - ex.code === 'ERR_STREAM_PREMATURE_CLOSE') { - // Most likely because of https://github.com/mysqljs/mysql/blob/master/lib/protocol/sequences/Query.js#L220 - return; - } - throw ex; - } - } - [PRIVATE_RELEASE_METHOD]() { - this.#rawConnection.release(); - } -} diff --git a/node_modules/kysely/dist/esm/dialect/mysql/mysql-introspector.d.ts b/node_modules/kysely/dist/esm/dialect/mysql/mysql-introspector.d.ts deleted file mode 100644 index 0363f2d..0000000 --- a/node_modules/kysely/dist/esm/dialect/mysql/mysql-introspector.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { DatabaseIntrospector, DatabaseMetadata, DatabaseMetadataOptions, SchemaMetadata, TableMetadata } from '../database-introspector.js'; -import type { Kysely } from '../../kysely.js'; -export declare class MysqlIntrospector implements DatabaseIntrospector { - #private; - constructor(db: Kysely); - /** - * Get schema metadata. - */ - getSchemas(): Promise; - /** - * Get tables and views metadata. - */ - getTables(options?: DatabaseMetadataOptions): Promise; - /** - * Get the database metadata such as table and column names. - * - * @deprecated Use getTables() instead. - */ - getMetadata(options?: DatabaseMetadataOptions): Promise; -} diff --git a/node_modules/kysely/dist/esm/dialect/mysql/mysql-introspector.js b/node_modules/kysely/dist/esm/dialect/mysql/mysql-introspector.js deleted file mode 100644 index ec5582b..0000000 --- a/node_modules/kysely/dist/esm/dialect/mysql/mysql-introspector.js +++ /dev/null @@ -1,76 +0,0 @@ -/// -import { DEFAULT_MIGRATION_LOCK_TABLE, DEFAULT_MIGRATION_TABLE, } from '../../migration/migrator.js'; -import { freeze } from '../../util/object-utils.js'; -import { sql } from '../../raw-builder/sql.js'; -export class MysqlIntrospector { - #db; - constructor(db) { - this.#db = db; - } - async getSchemas() { - let rawSchemas = await this.#db - .selectFrom('information_schema.schemata') - .select('schema_name') - .$castTo() - .execute(); - return rawSchemas.map((it) => ({ name: it.SCHEMA_NAME })); - } - async getTables(options = { withInternalKyselyTables: false }) { - let query = this.#db - .selectFrom('information_schema.columns as columns') - .innerJoin('information_schema.tables as tables', (b) => b - .onRef('columns.TABLE_CATALOG', '=', 'tables.TABLE_CATALOG') - .onRef('columns.TABLE_SCHEMA', '=', 'tables.TABLE_SCHEMA') - .onRef('columns.TABLE_NAME', '=', 'tables.TABLE_NAME')) - .select([ - 'columns.COLUMN_NAME', - 'columns.COLUMN_DEFAULT', - 'columns.TABLE_NAME', - 'columns.TABLE_SCHEMA', - 'tables.TABLE_TYPE', - 'columns.IS_NULLABLE', - 'columns.DATA_TYPE', - 'columns.EXTRA', - 'columns.COLUMN_COMMENT', - ]) - .where('columns.TABLE_SCHEMA', '=', sql `database()`) - .orderBy('columns.TABLE_NAME') - .orderBy('columns.ORDINAL_POSITION') - .$castTo(); - if (!options.withInternalKyselyTables) { - query = query - .where('columns.TABLE_NAME', '!=', DEFAULT_MIGRATION_TABLE) - .where('columns.TABLE_NAME', '!=', DEFAULT_MIGRATION_LOCK_TABLE); - } - const rawColumns = await query.execute(); - return this.#parseTableMetadata(rawColumns); - } - async getMetadata(options) { - return { - tables: await this.getTables(options), - }; - } - #parseTableMetadata(columns) { - return columns.reduce((tables, it) => { - let table = tables.find((tbl) => tbl.name === it.TABLE_NAME); - if (!table) { - table = freeze({ - name: it.TABLE_NAME, - isView: it.TABLE_TYPE === 'VIEW', - schema: it.TABLE_SCHEMA, - columns: [], - }); - tables.push(table); - } - table.columns.push(freeze({ - name: it.COLUMN_NAME, - dataType: it.DATA_TYPE, - isNullable: it.IS_NULLABLE === 'YES', - isAutoIncrementing: it.EXTRA.toLowerCase().includes('auto_increment'), - hasDefaultValue: it.COLUMN_DEFAULT !== null, - comment: it.COLUMN_COMMENT === '' ? undefined : it.COLUMN_COMMENT, - })); - return tables; - }, []); - } -} diff --git a/node_modules/kysely/dist/esm/dialect/mysql/mysql-query-compiler.d.ts b/node_modules/kysely/dist/esm/dialect/mysql/mysql-query-compiler.d.ts deleted file mode 100644 index 836856c..0000000 --- a/node_modules/kysely/dist/esm/dialect/mysql/mysql-query-compiler.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { CreateIndexNode } from '../../operation-node/create-index-node.js'; -import { DefaultQueryCompiler } from '../../query-compiler/default-query-compiler.js'; -export declare class MysqlQueryCompiler extends DefaultQueryCompiler { - protected getCurrentParameterPlaceholder(): string; - protected getLeftExplainOptionsWrapper(): string; - protected getExplainOptionAssignment(): string; - protected getExplainOptionsDelimiter(): string; - protected getRightExplainOptionsWrapper(): string; - protected getLeftIdentifierWrapper(): string; - protected getRightIdentifierWrapper(): string; - protected sanitizeIdentifier(identifier: string): string; - protected visitCreateIndex(node: CreateIndexNode): void; -} diff --git a/node_modules/kysely/dist/esm/dialect/mysql/mysql-query-compiler.js b/node_modules/kysely/dist/esm/dialect/mysql/mysql-query-compiler.js deleted file mode 100644 index 012996a..0000000 --- a/node_modules/kysely/dist/esm/dialect/mysql/mysql-query-compiler.js +++ /dev/null @@ -1,57 +0,0 @@ -/// -import { DefaultQueryCompiler } from '../../query-compiler/default-query-compiler.js'; -const ID_WRAP_REGEX = /`/g; -export class MysqlQueryCompiler extends DefaultQueryCompiler { - getCurrentParameterPlaceholder() { - return '?'; - } - getLeftExplainOptionsWrapper() { - return ''; - } - getExplainOptionAssignment() { - return '='; - } - getExplainOptionsDelimiter() { - return ' '; - } - getRightExplainOptionsWrapper() { - return ''; - } - getLeftIdentifierWrapper() { - return '`'; - } - getRightIdentifierWrapper() { - return '`'; - } - sanitizeIdentifier(identifier) { - return identifier.replace(ID_WRAP_REGEX, '``'); - } - visitCreateIndex(node) { - this.append('create '); - if (node.unique) { - this.append('unique '); - } - this.append('index '); - if (node.ifNotExists) { - this.append('if not exists '); - } - this.visitNode(node.name); - if (node.using) { - this.append(' using '); - this.visitNode(node.using); - } - if (node.table) { - this.append(' on '); - this.visitNode(node.table); - } - if (node.columns) { - this.append(' ('); - this.compileList(node.columns); - this.append(')'); - } - if (node.where) { - this.append(' '); - this.visitNode(node.where); - } - } -} diff --git a/node_modules/kysely/dist/esm/dialect/postgres/postgres-adapter.d.ts b/node_modules/kysely/dist/esm/dialect/postgres/postgres-adapter.d.ts deleted file mode 100644 index 77417bd..0000000 --- a/node_modules/kysely/dist/esm/dialect/postgres/postgres-adapter.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -import type { Kysely } from '../../kysely.js'; -import { DialectAdapterBase } from '../dialect-adapter-base.js'; -import type { MigrationLockOptions } from '../dialect-adapter.js'; -export declare class PostgresAdapter extends DialectAdapterBase { - /** - * Whether or not this dialect supports transactional DDL. - * - * If this is true, migrations are executed inside a transaction. - */ - get supportsTransactionalDdl(): boolean; - /** - * Whether or not this dialect supports the `returning` in inserts - * updates and deletes. - */ - get supportsReturning(): boolean; - /** - * This method is used to acquire a lock for the migrations so that - * it's not possible for two migration operations to run in parallel. - * - * Most dialects have explicit locks that can be used, like advisory locks - * in PostgreSQL and the get_lock function in MySQL. - * - * If the dialect doesn't have explicit locks the {@link MigrationLockOptions.lockTable} - * created by Kysely can be used instead. You can access it through the `options` object. - * The lock table has two columns `id` and `is_locked` and there's only one row in the table - * whose id is {@link MigrationLockOptions.lockRowId}. `is_locked` is an integer. Kysely - * takes care of creating the lock table and inserting the one single row to it before this - * method is executed. If the dialect supports schemas and the user has specified a custom - * schema in their migration settings, the options object also contains the schema name in - * {@link MigrationLockOptions.lockTableSchema}. - * - * Here's an example of how you might implement this method for a dialect that doesn't - * have explicit locks but supports `FOR UPDATE` row locks and transactional DDL: - * - * ```ts - * import { DialectAdapterBase, type MigrationLockOptions, Kysely } from 'kysely' - * - * export class MyAdapter extends DialectAdapterBase { - * override async acquireMigrationLock( - * db: Kysely, - * options: MigrationLockOptions - * ): Promise { - * const queryDb = options.lockTableSchema - * ? db.withSchema(options.lockTableSchema) - * : db - * - * // Since our imaginary dialect supports transactional DDL and has - * // row locks, we can simply take a row lock here and it will guarantee - * // all subsequent calls to this method from other transactions will - * // wait until this transaction finishes. - * await queryDb - * .selectFrom(options.lockTable) - * .selectAll() - * .where('id', '=', options.lockRowId) - * .forUpdate() - * .execute() - * } - * - * override async releaseMigrationLock() { - * // noop - * } - * } - * ``` - * - * If `supportsTransactionalDdl` is `true` then the `db` passed to this method - * is a transaction inside which the migrations will be executed. Otherwise - * `db` is a single connection (session) that will be used to execute the - * migrations. - */ - acquireMigrationLock(db: Kysely, _opt: MigrationLockOptions): Promise; - /** - * Releases the migration lock. See {@link acquireMigrationLock}. - * - * If `supportsTransactionalDdl` is `true` then the `db` passed to this method - * is a transaction inside which the migrations were executed. Otherwise `db` - * is a single connection (session) that was used to execute the migrations - * and the `acquireMigrationLock` call. - */ - releaseMigrationLock(_db: Kysely, _opt: MigrationLockOptions): Promise; -} diff --git a/node_modules/kysely/dist/esm/dialect/postgres/postgres-adapter.js b/node_modules/kysely/dist/esm/dialect/postgres/postgres-adapter.js deleted file mode 100644 index 9fb9ccb..0000000 --- a/node_modules/kysely/dist/esm/dialect/postgres/postgres-adapter.js +++ /dev/null @@ -1,22 +0,0 @@ -/// -import { sql } from '../../raw-builder/sql.js'; -import { DialectAdapterBase } from '../dialect-adapter-base.js'; -// Random id for our transaction lock. -const LOCK_ID = BigInt('3853314791062309107'); -export class PostgresAdapter extends DialectAdapterBase { - get supportsTransactionalDdl() { - return true; - } - get supportsReturning() { - return true; - } - async acquireMigrationLock(db, _opt) { - // Acquire a transaction level advisory lock. - await sql `select pg_advisory_xact_lock(${sql.lit(LOCK_ID)})`.execute(db); - } - async releaseMigrationLock(_db, _opt) { - // Nothing to do here. `pg_advisory_xact_lock` is automatically released at the - // end of the transaction and since `supportsTransactionalDdl` true, we know - // the `db` instance passed to acquireMigrationLock is actually a transaction. - } -} diff --git a/node_modules/kysely/dist/esm/dialect/postgres/postgres-dialect-config.d.ts b/node_modules/kysely/dist/esm/dialect/postgres/postgres-dialect-config.d.ts deleted file mode 100644 index 063116d..0000000 --- a/node_modules/kysely/dist/esm/dialect/postgres/postgres-dialect-config.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -import type { DatabaseConnection } from '../../driver/database-connection.js'; -/** - * Config for the PostgreSQL dialect. - */ -export interface PostgresDialectConfig { - /** - * A postgres Pool instance or a function that returns one. - * - * If a function is provided, it's called once when the first query is executed. - * - * https://node-postgres.com/apis/pool - */ - pool: PostgresPool | (() => Promise); - /** - * https://github.com/brianc/node-postgres/tree/master/packages/pg-cursor - * - * ```ts - * import { PostgresDialect } from 'kysely' - * import { Pool } from 'pg' - * import Cursor from 'pg-cursor' - * // or import * as Cursor from 'pg-cursor' - * - * new PostgresDialect({ - * cursor: Cursor, - * pool: new Pool('postgres://localhost:5432/mydb') - * }) - * ``` - */ - cursor?: PostgresCursorConstructor; - /** - * Called once for each created connection. - */ - onCreateConnection?: (connection: DatabaseConnection) => Promise; - /** - * Called every time a connection is acquired from the pool. - */ - onReserveConnection?: (connection: DatabaseConnection) => Promise; -} -/** - * This interface is the subset of pg driver's `Pool` class that - * kysely needs. - * - * We don't use the type from `pg` here to not have a dependency to it. - * - * https://node-postgres.com/apis/pool - */ -export interface PostgresPool { - connect(): Promise; - end(): Promise; -} -export interface PostgresPoolClient { - query(sql: string, parameters: ReadonlyArray): Promise>; - query(cursor: PostgresCursor): PostgresCursor; - release(): void; -} -export interface PostgresCursor { - read(rowsCount: number): Promise; - close(): Promise; -} -export type PostgresCursorConstructor = new (sql: string, parameters: unknown[]) => PostgresCursor; -export interface PostgresQueryResult { - command: 'UPDATE' | 'DELETE' | 'INSERT' | 'SELECT' | 'MERGE'; - rowCount: number; - rows: R[]; -} -export interface PostgresStream { - [Symbol.asyncIterator](): AsyncIterableIterator; -} diff --git a/node_modules/kysely/dist/esm/dialect/postgres/postgres-dialect-config.js b/node_modules/kysely/dist/esm/dialect/postgres/postgres-dialect-config.js deleted file mode 100644 index 75dc6fb..0000000 --- a/node_modules/kysely/dist/esm/dialect/postgres/postgres-dialect-config.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/dialect/postgres/postgres-dialect.d.ts b/node_modules/kysely/dist/esm/dialect/postgres/postgres-dialect.d.ts deleted file mode 100644 index 7423939..0000000 --- a/node_modules/kysely/dist/esm/dialect/postgres/postgres-dialect.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -import type { Driver } from '../../driver/driver.js'; -import type { Kysely } from '../../kysely.js'; -import type { QueryCompiler } from '../../query-compiler/query-compiler.js'; -import type { Dialect } from '../dialect.js'; -import type { DatabaseIntrospector } from '../database-introspector.js'; -import type { DialectAdapter } from '../dialect-adapter.js'; -import type { PostgresDialectConfig } from './postgres-dialect-config.js'; -/** - * PostgreSQL dialect that uses the [pg](https://node-postgres.com/) library. - * - * The constructor takes an instance of {@link PostgresDialectConfig}. - * - * ```ts - * import { Pool } from 'pg' - * - * new PostgresDialect({ - * pool: new Pool({ - * database: 'some_db', - * host: 'localhost', - * }) - * }) - * ``` - * - * If you want the pool to only be created once it's first used, `pool` - * can be a function: - * - * ```ts - * import { Pool } from 'pg' - * - * new PostgresDialect({ - * pool: async () => new Pool({ - * database: 'some_db', - * host: 'localhost', - * }) - * }) - * ``` - */ -export declare class PostgresDialect implements Dialect { - #private; - constructor(config: PostgresDialectConfig); - /** - * Creates a driver for the dialect. - */ - createDriver(): Driver; - /** - * Creates a query compiler for the dialect. - */ - createQueryCompiler(): QueryCompiler; - /** - * Creates an adapter for the dialect. - */ - createAdapter(): DialectAdapter; - /** - * Creates a database introspector that can be used to get database metadata - * such as the table names and column names of those tables. - * - * `db` never has any plugins installed. It's created using - * {@link Kysely.withoutPlugins}. - */ - createIntrospector(db: Kysely): DatabaseIntrospector; -} diff --git a/node_modules/kysely/dist/esm/dialect/postgres/postgres-dialect.js b/node_modules/kysely/dist/esm/dialect/postgres/postgres-dialect.js deleted file mode 100644 index b917138..0000000 --- a/node_modules/kysely/dist/esm/dialect/postgres/postgres-dialect.js +++ /dev/null @@ -1,53 +0,0 @@ -/// -import { PostgresDriver } from './postgres-driver.js'; -import { PostgresIntrospector } from './postgres-introspector.js'; -import { PostgresQueryCompiler } from './postgres-query-compiler.js'; -import { PostgresAdapter } from './postgres-adapter.js'; -/** - * PostgreSQL dialect that uses the [pg](https://node-postgres.com/) library. - * - * The constructor takes an instance of {@link PostgresDialectConfig}. - * - * ```ts - * import { Pool } from 'pg' - * - * new PostgresDialect({ - * pool: new Pool({ - * database: 'some_db', - * host: 'localhost', - * }) - * }) - * ``` - * - * If you want the pool to only be created once it's first used, `pool` - * can be a function: - * - * ```ts - * import { Pool } from 'pg' - * - * new PostgresDialect({ - * pool: async () => new Pool({ - * database: 'some_db', - * host: 'localhost', - * }) - * }) - * ``` - */ -export class PostgresDialect { - #config; - constructor(config) { - this.#config = config; - } - createDriver() { - return new PostgresDriver(this.#config); - } - createQueryCompiler() { - return new PostgresQueryCompiler(); - } - createAdapter() { - return new PostgresAdapter(); - } - createIntrospector(db) { - return new PostgresIntrospector(db); - } -} diff --git a/node_modules/kysely/dist/esm/dialect/postgres/postgres-driver.d.ts b/node_modules/kysely/dist/esm/dialect/postgres/postgres-driver.d.ts deleted file mode 100644 index 9883645..0000000 --- a/node_modules/kysely/dist/esm/dialect/postgres/postgres-driver.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -import type { DatabaseConnection, QueryResult } from '../../driver/database-connection.js'; -import type { Driver, TransactionSettings } from '../../driver/driver.js'; -import { CompiledQuery } from '../../query-compiler/compiled-query.js'; -import type { QueryCompiler } from '../../query-compiler/query-compiler.js'; -import type { PostgresCursorConstructor, PostgresDialectConfig, PostgresPoolClient } from './postgres-dialect-config.js'; -declare const PRIVATE_RELEASE_METHOD: unique symbol; -export declare class PostgresDriver implements Driver { - #private; - constructor(config: PostgresDialectConfig); - /** - * Initializes the driver. - * - * After calling this method the driver should be usable and `acquireConnection` etc. - * methods should be callable. - */ - init(): Promise; - /** - * Acquires a new connection from the pool. - */ - acquireConnection(): Promise; - /** - * Begins a transaction. - */ - beginTransaction(connection: DatabaseConnection, settings: TransactionSettings): Promise; - /** - * Commits a transaction. - */ - commitTransaction(connection: DatabaseConnection): Promise; - /** - * Rolls back a transaction. - */ - rollbackTransaction(connection: DatabaseConnection): Promise; - savepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - rollbackToSavepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - releaseSavepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - /** - * Releases a connection back to the pool. - */ - releaseConnection(connection: PostgresConnection): Promise; - /** - * Destroys the driver and releases all resources. - */ - destroy(): Promise; -} -interface PostgresConnectionOptions { - cursor: PostgresCursorConstructor | null; -} -declare class PostgresConnection implements DatabaseConnection { - #private; - constructor(client: PostgresPoolClient, options: PostgresConnectionOptions); - executeQuery(compiledQuery: CompiledQuery): Promise>; - streamQuery(compiledQuery: CompiledQuery, chunkSize: number): AsyncIterableIterator>; - [PRIVATE_RELEASE_METHOD](): void; -} -export {}; diff --git a/node_modules/kysely/dist/esm/dialect/postgres/postgres-driver.js b/node_modules/kysely/dist/esm/dialect/postgres/postgres-driver.js deleted file mode 100644 index 92cf67f..0000000 --- a/node_modules/kysely/dist/esm/dialect/postgres/postgres-driver.js +++ /dev/null @@ -1,131 +0,0 @@ -/// -import { parseSavepointCommand } from '../../parser/savepoint-parser.js'; -import { CompiledQuery } from '../../query-compiler/compiled-query.js'; -import { isFunction, freeze } from '../../util/object-utils.js'; -import { createQueryId } from '../../util/query-id.js'; -import { extendStackTrace } from '../../util/stack-trace-utils.js'; -const PRIVATE_RELEASE_METHOD = Symbol(); -export class PostgresDriver { - #config; - #connections = new WeakMap(); - #pool; - constructor(config) { - this.#config = freeze({ ...config }); - } - async init() { - this.#pool = isFunction(this.#config.pool) - ? await this.#config.pool() - : this.#config.pool; - } - async acquireConnection() { - const client = await this.#pool.connect(); - let connection = this.#connections.get(client); - if (!connection) { - connection = new PostgresConnection(client, { - cursor: this.#config.cursor ?? null, - }); - this.#connections.set(client, connection); - // The driver must take care of calling `onCreateConnection` when a new - // connection is created. The `pg` module doesn't provide an async hook - // for the connection creation. We need to call the method explicitly. - if (this.#config.onCreateConnection) { - await this.#config.onCreateConnection(connection); - } - } - if (this.#config.onReserveConnection) { - await this.#config.onReserveConnection(connection); - } - return connection; - } - async beginTransaction(connection, settings) { - if (settings.isolationLevel || settings.accessMode) { - let sql = 'start transaction'; - if (settings.isolationLevel) { - sql += ` isolation level ${settings.isolationLevel}`; - } - if (settings.accessMode) { - sql += ` ${settings.accessMode}`; - } - await connection.executeQuery(CompiledQuery.raw(sql)); - } - else { - await connection.executeQuery(CompiledQuery.raw('begin')); - } - } - async commitTransaction(connection) { - await connection.executeQuery(CompiledQuery.raw('commit')); - } - async rollbackTransaction(connection) { - await connection.executeQuery(CompiledQuery.raw('rollback')); - } - async savepoint(connection, savepointName, compileQuery) { - await connection.executeQuery(compileQuery(parseSavepointCommand('savepoint', savepointName), createQueryId())); - } - async rollbackToSavepoint(connection, savepointName, compileQuery) { - await connection.executeQuery(compileQuery(parseSavepointCommand('rollback to', savepointName), createQueryId())); - } - async releaseSavepoint(connection, savepointName, compileQuery) { - await connection.executeQuery(compileQuery(parseSavepointCommand('release', savepointName), createQueryId())); - } - async releaseConnection(connection) { - connection[PRIVATE_RELEASE_METHOD](); - } - async destroy() { - if (this.#pool) { - const pool = this.#pool; - this.#pool = undefined; - await pool.end(); - } - } -} -class PostgresConnection { - #client; - #options; - constructor(client, options) { - this.#client = client; - this.#options = options; - } - async executeQuery(compiledQuery) { - try { - const { command, rowCount, rows } = await this.#client.query(compiledQuery.sql, [...compiledQuery.parameters]); - return { - numAffectedRows: command === 'INSERT' || - command === 'UPDATE' || - command === 'DELETE' || - command === 'MERGE' - ? BigInt(rowCount) - : undefined, - rows: rows ?? [], - }; - } - catch (err) { - throw extendStackTrace(err, new Error()); - } - } - async *streamQuery(compiledQuery, chunkSize) { - if (!this.#options.cursor) { - throw new Error("'cursor' is not present in your postgres dialect config. It's required to make streaming work in postgres."); - } - if (!Number.isInteger(chunkSize) || chunkSize <= 0) { - throw new Error('chunkSize must be a positive integer'); - } - const cursor = this.#client.query(new this.#options.cursor(compiledQuery.sql, compiledQuery.parameters.slice())); - try { - while (true) { - const rows = await cursor.read(chunkSize); - if (rows.length === 0) { - break; - } - yield { - rows, - }; - } - } - finally { - await cursor.close(); - } - } - [PRIVATE_RELEASE_METHOD]() { - this.#client.release(); - } -} diff --git a/node_modules/kysely/dist/esm/dialect/postgres/postgres-introspector.d.ts b/node_modules/kysely/dist/esm/dialect/postgres/postgres-introspector.d.ts deleted file mode 100644 index dbceed6..0000000 --- a/node_modules/kysely/dist/esm/dialect/postgres/postgres-introspector.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { DatabaseIntrospector, DatabaseMetadata, DatabaseMetadataOptions, SchemaMetadata, TableMetadata } from '../database-introspector.js'; -import type { Kysely } from '../../kysely.js'; -export declare class PostgresIntrospector implements DatabaseIntrospector { - #private; - constructor(db: Kysely); - /** - * Get schema metadata. - */ - getSchemas(): Promise; - /** - * Get tables and views metadata. - */ - getTables(options?: DatabaseMetadataOptions): Promise; - /** - * Get the database metadata such as table and column names. - * - * @deprecated Use getTables() instead. - */ - getMetadata(options?: DatabaseMetadataOptions): Promise; -} diff --git a/node_modules/kysely/dist/esm/dialect/postgres/postgres-introspector.js b/node_modules/kysely/dist/esm/dialect/postgres/postgres-introspector.js deleted file mode 100644 index e0da598..0000000 --- a/node_modules/kysely/dist/esm/dialect/postgres/postgres-introspector.js +++ /dev/null @@ -1,97 +0,0 @@ -/// -import { DEFAULT_MIGRATION_LOCK_TABLE, DEFAULT_MIGRATION_TABLE, } from '../../migration/migrator.js'; -import { freeze } from '../../util/object-utils.js'; -import { sql } from '../../raw-builder/sql.js'; -export class PostgresIntrospector { - #db; - constructor(db) { - this.#db = db; - } - async getSchemas() { - let rawSchemas = await this.#db - .selectFrom('pg_catalog.pg_namespace') - .select('nspname') - .$castTo() - .execute(); - return rawSchemas.map((it) => ({ name: it.nspname })); - } - async getTables(options = { withInternalKyselyTables: false }) { - let query = this.#db - // column - .selectFrom('pg_catalog.pg_attribute as a') - // table - .innerJoin('pg_catalog.pg_class as c', 'a.attrelid', 'c.oid') - // table schema - .innerJoin('pg_catalog.pg_namespace as ns', 'c.relnamespace', 'ns.oid') - // column data type - .innerJoin('pg_catalog.pg_type as typ', 'a.atttypid', 'typ.oid') - // column data type schema - .innerJoin('pg_catalog.pg_namespace as dtns', 'typ.typnamespace', 'dtns.oid') - .select([ - 'a.attname as column', - 'a.attnotnull as not_null', - 'a.atthasdef as has_default', - 'c.relname as table', - 'c.relkind as table_type', - 'ns.nspname as schema', - 'typ.typname as type', - 'dtns.nspname as type_schema', - sql `col_description(a.attrelid, a.attnum)`.as('column_description'), - sql `pg_get_serial_sequence(quote_ident(ns.nspname) || '.' || quote_ident(c.relname), a.attname)`.as('auto_incrementing'), - ]) - .where('c.relkind', 'in', [ - 'r' /*regular table*/, - 'v' /*view*/, - 'p' /*partitioned table*/, - ]) - .where('ns.nspname', '!~', '^pg_') - .where('ns.nspname', '!=', 'information_schema') - // Filter out internal cockroachdb schema - .where('ns.nspname', '!=', 'crdb_internal') - // Only schemas where we are allowed access - .where(sql `has_schema_privilege(ns.nspname, 'USAGE')`) - // No system columns - .where('a.attnum', '>=', 0) - .where('a.attisdropped', '!=', true) - .orderBy('ns.nspname') - .orderBy('c.relname') - .orderBy('a.attnum') - .$castTo(); - if (!options.withInternalKyselyTables) { - query = query - .where('c.relname', '!=', DEFAULT_MIGRATION_TABLE) - .where('c.relname', '!=', DEFAULT_MIGRATION_LOCK_TABLE); - } - const rawColumns = await query.execute(); - return this.#parseTableMetadata(rawColumns); - } - async getMetadata(options) { - return { - tables: await this.getTables(options), - }; - } - #parseTableMetadata(columns) { - return columns.reduce((tables, it) => { - let table = tables.find((tbl) => tbl.name === it.table && tbl.schema === it.schema); - if (!table) { - table = freeze({ - name: it.table, - isView: it.table_type === 'v', - schema: it.schema, - columns: [], - }); - tables.push(table); - } - table.columns.push(freeze({ - name: it.column, - dataType: it.type, - dataTypeSchema: it.type_schema, - isNullable: !it.not_null, - isAutoIncrementing: it.auto_incrementing !== null, - hasDefaultValue: it.has_default, - comment: it.column_description ?? undefined, - })); - return tables; - }, []); - } -} diff --git a/node_modules/kysely/dist/esm/dialect/postgres/postgres-query-compiler.d.ts b/node_modules/kysely/dist/esm/dialect/postgres/postgres-query-compiler.d.ts deleted file mode 100644 index b5ab46c..0000000 --- a/node_modules/kysely/dist/esm/dialect/postgres/postgres-query-compiler.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { DefaultQueryCompiler } from '../../query-compiler/default-query-compiler.js'; -export declare class PostgresQueryCompiler extends DefaultQueryCompiler { - protected sanitizeIdentifier(identifier: string): string; -} diff --git a/node_modules/kysely/dist/esm/dialect/postgres/postgres-query-compiler.js b/node_modules/kysely/dist/esm/dialect/postgres/postgres-query-compiler.js deleted file mode 100644 index c8e38e9..0000000 --- a/node_modules/kysely/dist/esm/dialect/postgres/postgres-query-compiler.js +++ /dev/null @@ -1,8 +0,0 @@ -/// -import { DefaultQueryCompiler } from '../../query-compiler/default-query-compiler.js'; -const ID_WRAP_REGEX = /"/g; -export class PostgresQueryCompiler extends DefaultQueryCompiler { - sanitizeIdentifier(identifier) { - return identifier.replace(ID_WRAP_REGEX, '""'); - } -} diff --git a/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-adapter.d.ts b/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-adapter.d.ts deleted file mode 100644 index 1782b58..0000000 --- a/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-adapter.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -import type { Kysely } from '../../kysely.js'; -import { DialectAdapterBase } from '../dialect-adapter-base.js'; -import type { MigrationLockOptions } from '../dialect-adapter.js'; -export declare class SqliteAdapter extends DialectAdapterBase { - /** - * Whether or not this dialect supports transactional DDL. - * - * If this is true, migrations are executed inside a transaction. - */ - get supportsTransactionalDdl(): boolean; - /** - * Whether or not this dialect supports the `returning` in inserts - * updates and deletes. - */ - get supportsReturning(): boolean; - /** - * This method is used to acquire a lock for the migrations so that - * it's not possible for two migration operations to run in parallel. - * - * Most dialects have explicit locks that can be used, like advisory locks - * in PostgreSQL and the get_lock function in MySQL. - * - * If the dialect doesn't have explicit locks the {@link MigrationLockOptions.lockTable} - * created by Kysely can be used instead. You can access it through the `options` object. - * The lock table has two columns `id` and `is_locked` and there's only one row in the table - * whose id is {@link MigrationLockOptions.lockRowId}. `is_locked` is an integer. Kysely - * takes care of creating the lock table and inserting the one single row to it before this - * method is executed. If the dialect supports schemas and the user has specified a custom - * schema in their migration settings, the options object also contains the schema name in - * {@link MigrationLockOptions.lockTableSchema}. - * - * Here's an example of how you might implement this method for a dialect that doesn't - * have explicit locks but supports `FOR UPDATE` row locks and transactional DDL: - * - * ```ts - * import { DialectAdapterBase, type MigrationLockOptions, Kysely } from 'kysely' - * - * export class MyAdapter extends DialectAdapterBase { - * override async acquireMigrationLock( - * db: Kysely, - * options: MigrationLockOptions - * ): Promise { - * const queryDb = options.lockTableSchema - * ? db.withSchema(options.lockTableSchema) - * : db - * - * // Since our imaginary dialect supports transactional DDL and has - * // row locks, we can simply take a row lock here and it will guarantee - * // all subsequent calls to this method from other transactions will - * // wait until this transaction finishes. - * await queryDb - * .selectFrom(options.lockTable) - * .selectAll() - * .where('id', '=', options.lockRowId) - * .forUpdate() - * .execute() - * } - * - * override async releaseMigrationLock() { - * // noop - * } - * } - * ``` - * - * If `supportsTransactionalDdl` is `true` then the `db` passed to this method - * is a transaction inside which the migrations will be executed. Otherwise - * `db` is a single connection (session) that will be used to execute the - * migrations. - */ - acquireMigrationLock(_db: Kysely, _opt: MigrationLockOptions): Promise; - /** - * Releases the migration lock. See {@link acquireMigrationLock}. - * - * If `supportsTransactionalDdl` is `true` then the `db` passed to this method - * is a transaction inside which the migrations were executed. Otherwise `db` - * is a single connection (session) that was used to execute the migrations - * and the `acquireMigrationLock` call. - */ - releaseMigrationLock(_db: Kysely, _opt: MigrationLockOptions): Promise; -} diff --git a/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-adapter.js b/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-adapter.js deleted file mode 100644 index 4f1b71f..0000000 --- a/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-adapter.js +++ /dev/null @@ -1,20 +0,0 @@ -/// -import { DialectAdapterBase } from '../dialect-adapter-base.js'; -export class SqliteAdapter extends DialectAdapterBase { - get supportsTransactionalDdl() { - return false; - } - get supportsReturning() { - return true; - } - async acquireMigrationLock(_db, _opt) { - // SQLite only has one connection that's reserved by the migration system - // for the whole time between acquireMigrationLock and releaseMigrationLock. - // We don't need to do anything here. - } - async releaseMigrationLock(_db, _opt) { - // SQLite only has one connection that's reserved by the migration system - // for the whole time between acquireMigrationLock and releaseMigrationLock. - // We don't need to do anything here. - } -} diff --git a/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-dialect-config.d.ts b/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-dialect-config.d.ts deleted file mode 100644 index 627bcde..0000000 --- a/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-dialect-config.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import type { DatabaseConnection } from '../../driver/database-connection.js'; -/** - * Config for the SQLite dialect. - */ -export interface SqliteDialectConfig { - /** - * An sqlite Database instance or a function that returns one. - * - * If a function is provided, it's called once when the first query is executed. - * - * https://github.com/JoshuaWise/better-sqlite3/blob/master/docs/api.md#new-databasepath-options - */ - database: SqliteDatabase | (() => Promise); - /** - * Called once when the first query is executed. - * - * This is a Kysely specific feature and does not come from the `better-sqlite3` module. - */ - onCreateConnection?: (connection: DatabaseConnection) => Promise; -} -/** - * This interface is the subset of better-sqlite3 driver's `Database` class that - * kysely needs. - * - * We don't use the type from `better-sqlite3` here to not have a dependency to it. - * - * https://github.com/JoshuaWise/better-sqlite3/blob/master/docs/api.md#new-databasepath-options - */ -export interface SqliteDatabase { - close(): void; - prepare(sql: string): SqliteStatement; -} -export interface SqliteStatement { - readonly reader: boolean; - all(parameters: ReadonlyArray): unknown[]; - run(parameters: ReadonlyArray): { - changes: number | bigint; - lastInsertRowid: number | bigint; - }; - iterate(parameters: ReadonlyArray): IterableIterator; -} diff --git a/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-dialect-config.js b/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-dialect-config.js deleted file mode 100644 index f87440e..0000000 --- a/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-dialect-config.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-dialect.d.ts b/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-dialect.d.ts deleted file mode 100644 index 210b50c..0000000 --- a/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-dialect.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -import type { Driver } from '../../driver/driver.js'; -import type { Kysely } from '../../kysely.js'; -import type { QueryCompiler } from '../../query-compiler/query-compiler.js'; -import type { Dialect } from '../dialect.js'; -import type { DatabaseIntrospector } from '../database-introspector.js'; -import type { DialectAdapter } from '../dialect-adapter.js'; -import type { SqliteDialectConfig } from './sqlite-dialect-config.js'; -/** - * SQLite dialect that uses the [better-sqlite3](https://github.com/JoshuaWise/better-sqlite3) library. - * - * The constructor takes an instance of {@link SqliteDialectConfig}. - * - * ```ts - * import Database from 'better-sqlite3' - * - * new SqliteDialect({ - * database: new Database('db.sqlite') - * }) - * ``` - * - * If you want the pool to only be created once it's first used, `database` - * can be a function: - * - * ```ts - * import Database from 'better-sqlite3' - * - * new SqliteDialect({ - * database: async () => new Database('db.sqlite') - * }) - * ``` - */ -export declare class SqliteDialect implements Dialect { - #private; - constructor(config: SqliteDialectConfig); - /** - * Creates a driver for the dialect. - */ - createDriver(): Driver; - /** - * Creates a query compiler for the dialect. - */ - createQueryCompiler(): QueryCompiler; - /** - * Creates an adapter for the dialect. - */ - createAdapter(): DialectAdapter; - /** - * Creates a database introspector that can be used to get database metadata - * such as the table names and column names of those tables. - * - * `db` never has any plugins installed. It's created using - * {@link Kysely.withoutPlugins}. - */ - createIntrospector(db: Kysely): DatabaseIntrospector; -} diff --git a/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-dialect.js b/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-dialect.js deleted file mode 100644 index 512e113..0000000 --- a/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-dialect.js +++ /dev/null @@ -1,48 +0,0 @@ -/// -import { SqliteDriver } from './sqlite-driver.js'; -import { SqliteQueryCompiler } from './sqlite-query-compiler.js'; -import { SqliteIntrospector } from './sqlite-introspector.js'; -import { SqliteAdapter } from './sqlite-adapter.js'; -import { freeze } from '../../util/object-utils.js'; -/** - * SQLite dialect that uses the [better-sqlite3](https://github.com/JoshuaWise/better-sqlite3) library. - * - * The constructor takes an instance of {@link SqliteDialectConfig}. - * - * ```ts - * import Database from 'better-sqlite3' - * - * new SqliteDialect({ - * database: new Database('db.sqlite') - * }) - * ``` - * - * If you want the pool to only be created once it's first used, `database` - * can be a function: - * - * ```ts - * import Database from 'better-sqlite3' - * - * new SqliteDialect({ - * database: async () => new Database('db.sqlite') - * }) - * ``` - */ -export class SqliteDialect { - #config; - constructor(config) { - this.#config = freeze({ ...config }); - } - createDriver() { - return new SqliteDriver(this.#config); - } - createQueryCompiler() { - return new SqliteQueryCompiler(); - } - createAdapter() { - return new SqliteAdapter(); - } - createIntrospector(db) { - return new SqliteIntrospector(db); - } -} diff --git a/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-driver.d.ts b/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-driver.d.ts deleted file mode 100644 index 04f5196..0000000 --- a/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-driver.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { DatabaseConnection } from '../../driver/database-connection.js'; -import type { Driver } from '../../driver/driver.js'; -import type { QueryCompiler } from '../../query-compiler/query-compiler.js'; -import type { SqliteDialectConfig } from './sqlite-dialect-config.js'; -export declare class SqliteDriver implements Driver { - #private; - constructor(config: SqliteDialectConfig); - /** - * Initializes the driver. - * - * After calling this method the driver should be usable and `acquireConnection` etc. - * methods should be callable. - */ - init(): Promise; - /** - * Acquires a new connection from the pool. - */ - acquireConnection(): Promise; - /** - * Begins a transaction. - */ - beginTransaction(connection: DatabaseConnection): Promise; - /** - * Commits a transaction. - */ - commitTransaction(connection: DatabaseConnection): Promise; - /** - * Rolls back a transaction. - */ - rollbackTransaction(connection: DatabaseConnection): Promise; - savepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - rollbackToSavepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - releaseSavepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - /** - * Releases a connection back to the pool. - */ - releaseConnection(): Promise; - /** - * Destroys the driver and releases all resources. - */ - destroy(): Promise; -} diff --git a/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-driver.js b/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-driver.js deleted file mode 100644 index 7b5566d..0000000 --- a/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-driver.js +++ /dev/null @@ -1,110 +0,0 @@ -/// -import { SelectQueryNode } from '../../operation-node/select-query-node.js'; -import { parseSavepointCommand } from '../../parser/savepoint-parser.js'; -import { CompiledQuery } from '../../query-compiler/compiled-query.js'; -import { freeze, isFunction } from '../../util/object-utils.js'; -import { createQueryId } from '../../util/query-id.js'; -export class SqliteDriver { - #config; - #connectionMutex = new ConnectionMutex(); - #db; - #connection; - constructor(config) { - this.#config = freeze({ ...config }); - } - async init() { - this.#db = isFunction(this.#config.database) - ? await this.#config.database() - : this.#config.database; - this.#connection = new SqliteConnection(this.#db); - if (this.#config.onCreateConnection) { - await this.#config.onCreateConnection(this.#connection); - } - } - async acquireConnection() { - // SQLite only has one single connection. We use a mutex here to wait - // until the single connection has been released. - await this.#connectionMutex.lock(); - return this.#connection; - } - async beginTransaction(connection) { - await connection.executeQuery(CompiledQuery.raw('begin')); - } - async commitTransaction(connection) { - await connection.executeQuery(CompiledQuery.raw('commit')); - } - async rollbackTransaction(connection) { - await connection.executeQuery(CompiledQuery.raw('rollback')); - } - async savepoint(connection, savepointName, compileQuery) { - await connection.executeQuery(compileQuery(parseSavepointCommand('savepoint', savepointName), createQueryId())); - } - async rollbackToSavepoint(connection, savepointName, compileQuery) { - await connection.executeQuery(compileQuery(parseSavepointCommand('rollback to', savepointName), createQueryId())); - } - async releaseSavepoint(connection, savepointName, compileQuery) { - await connection.executeQuery(compileQuery(parseSavepointCommand('release', savepointName), createQueryId())); - } - async releaseConnection() { - this.#connectionMutex.unlock(); - } - async destroy() { - this.#db?.close(); - } -} -class SqliteConnection { - #db; - constructor(db) { - this.#db = db; - } - executeQuery(compiledQuery) { - const { sql, parameters } = compiledQuery; - const stmt = this.#db.prepare(sql); - if (stmt.reader) { - return Promise.resolve({ - rows: stmt.all(parameters), - }); - } - const { changes, lastInsertRowid } = stmt.run(parameters); - return Promise.resolve({ - numAffectedRows: changes !== undefined && changes !== null ? BigInt(changes) : undefined, - insertId: lastInsertRowid !== undefined && lastInsertRowid !== null - ? BigInt(lastInsertRowid) - : undefined, - rows: [], - }); - } - async *streamQuery(compiledQuery, _chunkSize) { - const { sql, parameters, query } = compiledQuery; - const stmt = this.#db.prepare(sql); - if (SelectQueryNode.is(query)) { - const iter = stmt.iterate(parameters); - for (const row of iter) { - yield { - rows: [row], - }; - } - } - else { - throw new Error('Sqlite driver only supports streaming of select queries'); - } - } -} -class ConnectionMutex { - #promise; - #resolve; - async lock() { - while (this.#promise) { - await this.#promise; - } - this.#promise = new Promise((resolve) => { - this.#resolve = resolve; - }); - } - unlock() { - const resolve = this.#resolve; - this.#promise = undefined; - this.#resolve = undefined; - resolve?.(); - } -} diff --git a/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-introspector.d.ts b/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-introspector.d.ts deleted file mode 100644 index 011ab7c..0000000 --- a/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-introspector.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { DatabaseIntrospector, DatabaseMetadata, DatabaseMetadataOptions, SchemaMetadata, TableMetadata } from '../database-introspector.js'; -import type { Kysely } from '../../kysely.js'; -export declare class SqliteIntrospector implements DatabaseIntrospector { - #private; - constructor(db: Kysely); - /** - * Get schema metadata. - */ - getSchemas(): Promise; - /** - * Get tables and views metadata. - */ - getTables(options?: DatabaseMetadataOptions): Promise; - /** - * Get the database metadata such as table and column names. - * - * @deprecated Use getTables() instead. - */ - getMetadata(options?: DatabaseMetadataOptions): Promise; -} diff --git a/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-introspector.js b/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-introspector.js deleted file mode 100644 index 0e317d3..0000000 --- a/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-introspector.js +++ /dev/null @@ -1,91 +0,0 @@ -/// -import { DEFAULT_MIGRATION_LOCK_TABLE, DEFAULT_MIGRATION_TABLE, } from '../../migration/migrator.js'; -import { sql } from '../../raw-builder/sql.js'; -export class SqliteIntrospector { - #db; - constructor(db) { - this.#db = db; - } - async getSchemas() { - // Sqlite doesn't support schemas. - return []; - } - async getTables(options = { withInternalKyselyTables: false }) { - return await this.#getTableMetadata(options); - } - async getMetadata(options) { - return { - tables: await this.getTables(options), - }; - } - #tablesQuery(qb, options) { - let tablesQuery = qb - .selectFrom('sqlite_master') - .where('type', 'in', ['table', 'view']) - .where('name', 'not like', 'sqlite_%') - .select(['name', 'sql', 'type']) - .orderBy('name'); - if (!options.withInternalKyselyTables) { - tablesQuery = tablesQuery - .where('name', '!=', DEFAULT_MIGRATION_TABLE) - .where('name', '!=', DEFAULT_MIGRATION_LOCK_TABLE); - } - return tablesQuery; - } - async #getTableMetadata(options) { - const tablesResult = await this.#tablesQuery(this.#db, options).execute(); - const tableMetadata = await this.#db - .with('table_list', (qb) => this.#tablesQuery(qb, options)) - .selectFrom([ - 'table_list as tl', - sql `pragma_table_info(tl.name)`.as('p'), - ]) - .select([ - 'tl.name as table', - 'p.cid', - 'p.name', - 'p.type', - 'p.notnull', - 'p.dflt_value', - 'p.pk', - ]) - .orderBy('tl.name') - .orderBy('p.cid') - .execute(); - const columnsByTable = {}; - for (const row of tableMetadata) { - columnsByTable[row.table] ??= []; - columnsByTable[row.table].push(row); - } - return tablesResult.map(({ name, sql, type }) => { - // // Try to find the name of the column that has `autoincrement` 🤦 - let autoIncrementCol = sql - ?.split(/[\(\),]/) - ?.find((it) => it.toLowerCase().includes('autoincrement')) - ?.trimStart() - ?.split(/\s+/)?.[0] - ?.replace(/["`]/g, ''); - const columns = columnsByTable[name] ?? []; - // Otherwise, check for an INTEGER PRIMARY KEY - // https://www.sqlite.org/autoinc.html - if (!autoIncrementCol) { - const pkCols = columns.filter((r) => r.pk > 0); - if (pkCols.length === 1 && pkCols[0].type.toLowerCase() === 'integer') { - autoIncrementCol = pkCols[0].name; - } - } - return { - name: name, - isView: type === 'view', - columns: columns.map((col) => ({ - name: col.name, - dataType: col.type, - isNullable: !col.notnull, - isAutoIncrementing: col.name === autoIncrementCol, - hasDefaultValue: col.dflt_value != null, - comment: undefined, - })), - }; - }); - } -} diff --git a/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-query-compiler.d.ts b/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-query-compiler.d.ts deleted file mode 100644 index 39ef0ec..0000000 --- a/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-query-compiler.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { DefaultInsertValueNode } from '../../operation-node/default-insert-value-node.js'; -import type { OrActionNode } from '../../operation-node/or-action-node.js'; -import { DefaultQueryCompiler } from '../../query-compiler/default-query-compiler.js'; -export declare class SqliteQueryCompiler extends DefaultQueryCompiler { - protected visitOrAction(node: OrActionNode): void; - protected getCurrentParameterPlaceholder(): string; - protected getLeftExplainOptionsWrapper(): string; - protected getRightExplainOptionsWrapper(): string; - protected getLeftIdentifierWrapper(): string; - protected getRightIdentifierWrapper(): string; - protected getAutoIncrement(): string; - protected sanitizeIdentifier(identifier: string): string; - protected visitDefaultInsertValue(_: DefaultInsertValueNode): void; -} diff --git a/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-query-compiler.js b/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-query-compiler.js deleted file mode 100644 index f43e45a..0000000 --- a/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-query-compiler.js +++ /dev/null @@ -1,34 +0,0 @@ -/// -import { DefaultQueryCompiler } from '../../query-compiler/default-query-compiler.js'; -const ID_WRAP_REGEX = /"/g; -export class SqliteQueryCompiler extends DefaultQueryCompiler { - visitOrAction(node) { - this.append('or '); - this.append(node.action); - } - getCurrentParameterPlaceholder() { - return '?'; - } - getLeftExplainOptionsWrapper() { - return ''; - } - getRightExplainOptionsWrapper() { - return ''; - } - getLeftIdentifierWrapper() { - return '"'; - } - getRightIdentifierWrapper() { - return '"'; - } - getAutoIncrement() { - return 'autoincrement'; - } - sanitizeIdentifier(identifier) { - return identifier.replace(ID_WRAP_REGEX, '""'); - } - visitDefaultInsertValue(_) { - // sqlite doesn't support the `default` keyword in inserts. - this.append('null'); - } -} diff --git a/node_modules/kysely/dist/esm/driver/connection-provider.d.ts b/node_modules/kysely/dist/esm/driver/connection-provider.d.ts deleted file mode 100644 index 72e0220..0000000 --- a/node_modules/kysely/dist/esm/driver/connection-provider.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { DatabaseConnection } from './database-connection.js'; -export interface ConnectionProvider { - /** - * Provides a connection for the callback and takes care of disposing - * the connection after the callback has been run. - */ - provideConnection(consumer: (connection: DatabaseConnection) => Promise): Promise; -} diff --git a/node_modules/kysely/dist/esm/driver/connection-provider.js b/node_modules/kysely/dist/esm/driver/connection-provider.js deleted file mode 100644 index 51db440..0000000 --- a/node_modules/kysely/dist/esm/driver/connection-provider.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/driver/database-connection.d.ts b/node_modules/kysely/dist/esm/driver/database-connection.d.ts deleted file mode 100644 index 76614a4..0000000 --- a/node_modules/kysely/dist/esm/driver/database-connection.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -/** - * A single connection to the database engine. - * - * These are created by an instance of {@link Driver}. - */ -export interface DatabaseConnection { - executeQuery(compiledQuery: CompiledQuery): Promise>; - streamQuery(compiledQuery: CompiledQuery, chunkSize?: number): AsyncIterableIterator>; -} -export interface QueryResult { - /** - * This is defined for insert, update, delete and merge queries and contains - * the number of rows the query inserted/updated/deleted. - */ - readonly numAffectedRows?: bigint; - /** - * This is defined for update queries and contains the number of rows - * the query changed. - * - * This is **optional** and only provided in dialects such as MySQL. - * You would probably use {@link numAffectedRows} in most cases. - */ - readonly numChangedRows?: bigint; - /** - * This is defined for insert queries on dialects that return - * the auto incrementing primary key from an insert. - */ - readonly insertId?: bigint; - /** - * The rows returned by the query. This is always defined and is - * empty if the query returned no rows. - */ - readonly rows: O[]; -} diff --git a/node_modules/kysely/dist/esm/driver/database-connection.js b/node_modules/kysely/dist/esm/driver/database-connection.js deleted file mode 100644 index f3b774d..0000000 --- a/node_modules/kysely/dist/esm/driver/database-connection.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/driver/default-connection-provider.d.ts b/node_modules/kysely/dist/esm/driver/default-connection-provider.d.ts deleted file mode 100644 index 74f5c0a..0000000 --- a/node_modules/kysely/dist/esm/driver/default-connection-provider.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { DatabaseConnection } from './database-connection.js'; -import type { ConnectionProvider } from './connection-provider.js'; -import type { Driver } from './driver.js'; -export declare class DefaultConnectionProvider implements ConnectionProvider { - #private; - constructor(driver: Driver); - /** - * Provides a connection for the callback and takes care of disposing - * the connection after the callback has been run. - */ - provideConnection(consumer: (connection: DatabaseConnection) => Promise): Promise; -} diff --git a/node_modules/kysely/dist/esm/driver/default-connection-provider.js b/node_modules/kysely/dist/esm/driver/default-connection-provider.js deleted file mode 100644 index c5b9138..0000000 --- a/node_modules/kysely/dist/esm/driver/default-connection-provider.js +++ /dev/null @@ -1,16 +0,0 @@ -/// -export class DefaultConnectionProvider { - #driver; - constructor(driver) { - this.#driver = driver; - } - async provideConnection(consumer) { - const connection = await this.#driver.acquireConnection(); - try { - return await consumer(connection); - } - finally { - await this.#driver.releaseConnection(connection); - } - } -} diff --git a/node_modules/kysely/dist/esm/driver/driver.d.ts b/node_modules/kysely/dist/esm/driver/driver.d.ts deleted file mode 100644 index 1f9b41a..0000000 --- a/node_modules/kysely/dist/esm/driver/driver.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -import type { QueryCompiler } from '../query-compiler/query-compiler.js'; -import type { ArrayItemType } from '../util/type-utils.js'; -import type { DatabaseConnection } from './database-connection.js'; -/** - * A Driver creates and releases {@link DatabaseConnection | database connections} - * and is also responsible for connection pooling (if the dialect supports pooling). - */ -export interface Driver { - /** - * Initializes the driver. - * - * After calling this method the driver should be usable and `acquireConnection` etc. - * methods should be callable. - */ - init(): Promise; - /** - * Acquires a new connection from the pool. - */ - acquireConnection(): Promise; - /** - * Begins a transaction. - */ - beginTransaction(connection: DatabaseConnection, settings: TransactionSettings): Promise; - /** - * Commits a transaction. - */ - commitTransaction(connection: DatabaseConnection): Promise; - /** - * Rolls back a transaction. - */ - rollbackTransaction(connection: DatabaseConnection): Promise; - /** - * Establishses a new savepoint within a transaction. - */ - savepoint?(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - /** - * Rolls back to a savepoint within a transaction. - */ - rollbackToSavepoint?(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - /** - * Releases a savepoint within a transaction. - */ - releaseSavepoint?(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - /** - * Releases a connection back to the pool. - */ - releaseConnection(connection: DatabaseConnection): Promise; - /** - * Destroys the driver and releases all resources. - */ - destroy(): Promise; -} -export interface TransactionSettings { - readonly accessMode?: AccessMode; - readonly isolationLevel?: IsolationLevel; -} -export declare const TRANSACTION_ACCESS_MODES: readonly ["read only", "read write"]; -export type AccessMode = ArrayItemType; -export declare const TRANSACTION_ISOLATION_LEVELS: readonly ["read uncommitted", "read committed", "repeatable read", "serializable", "snapshot"]; -export type IsolationLevel = ArrayItemType; -export declare function validateTransactionSettings(settings: TransactionSettings): void; diff --git a/node_modules/kysely/dist/esm/driver/driver.js b/node_modules/kysely/dist/esm/driver/driver.js deleted file mode 100644 index 577fa4b..0000000 --- a/node_modules/kysely/dist/esm/driver/driver.js +++ /dev/null @@ -1,19 +0,0 @@ -/// -export const TRANSACTION_ACCESS_MODES = ['read only', 'read write']; -export const TRANSACTION_ISOLATION_LEVELS = [ - 'read uncommitted', - 'read committed', - 'repeatable read', - 'serializable', - 'snapshot', -]; -export function validateTransactionSettings(settings) { - if (settings.accessMode && - !TRANSACTION_ACCESS_MODES.includes(settings.accessMode)) { - throw new Error(`invalid transaction access mode ${settings.accessMode}`); - } - if (settings.isolationLevel && - !TRANSACTION_ISOLATION_LEVELS.includes(settings.isolationLevel)) { - throw new Error(`invalid transaction isolation level ${settings.isolationLevel}`); - } -} diff --git a/node_modules/kysely/dist/esm/driver/dummy-driver.d.ts b/node_modules/kysely/dist/esm/driver/dummy-driver.d.ts deleted file mode 100644 index 1aeb364..0000000 --- a/node_modules/kysely/dist/esm/driver/dummy-driver.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -import type { DatabaseConnection } from './database-connection.js'; -import type { Driver } from './driver.js'; -/** - * A driver that does absolutely nothing. - * - * You can use this to create Kysely instances solely for building queries - * - * ### Examples - * - * This example creates a Kysely instance for building postgres queries: - * - * ```ts - * import { - * DummyDriver, - * Kysely, - * PostgresAdapter, - * PostgresIntrospector, - * PostgresQueryCompiler - * } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: { - * createAdapter: () => new PostgresAdapter(), - * createDriver: () => new DummyDriver(), - * createIntrospector: (db: Kysely) => new PostgresIntrospector(db), - * createQueryCompiler: () => new PostgresQueryCompiler(), - * }, - * }) - * ``` - * - * You can use it to build a query and compile it to SQL but trying to - * execute the query will throw an error. - * - * ```ts - * const { sql } = db.selectFrom('person').selectAll().compile() - * console.log(sql) // select * from "person" - * ``` - */ -export declare class DummyDriver implements Driver { - /** - * Initializes the driver. - * - * After calling this method the driver should be usable and `acquireConnection` etc. - * methods should be callable. - */ - init(): Promise; - /** - * Acquires a new connection from the pool. - */ - acquireConnection(): Promise; - /** - * Begins a transaction. - */ - beginTransaction(): Promise; - /** - * Commits a transaction. - */ - commitTransaction(): Promise; - /** - * Rolls back a transaction. - */ - rollbackTransaction(): Promise; - /** - * Releases a connection back to the pool. - */ - releaseConnection(): Promise; - /** - * Destroys the driver and releases all resources. - */ - destroy(): Promise; - releaseSavepoint(): Promise; - rollbackToSavepoint(): Promise; - savepoint(): Promise; -} diff --git a/node_modules/kysely/dist/esm/driver/dummy-driver.js b/node_modules/kysely/dist/esm/driver/dummy-driver.js deleted file mode 100644 index c55aea4..0000000 --- a/node_modules/kysely/dist/esm/driver/dummy-driver.js +++ /dev/null @@ -1,80 +0,0 @@ -/// -/** - * A driver that does absolutely nothing. - * - * You can use this to create Kysely instances solely for building queries - * - * ### Examples - * - * This example creates a Kysely instance for building postgres queries: - * - * ```ts - * import { - * DummyDriver, - * Kysely, - * PostgresAdapter, - * PostgresIntrospector, - * PostgresQueryCompiler - * } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: { - * createAdapter: () => new PostgresAdapter(), - * createDriver: () => new DummyDriver(), - * createIntrospector: (db: Kysely) => new PostgresIntrospector(db), - * createQueryCompiler: () => new PostgresQueryCompiler(), - * }, - * }) - * ``` - * - * You can use it to build a query and compile it to SQL but trying to - * execute the query will throw an error. - * - * ```ts - * const { sql } = db.selectFrom('person').selectAll().compile() - * console.log(sql) // select * from "person" - * ``` - */ -export class DummyDriver { - async init() { - // Nothing to do here. - } - async acquireConnection() { - return new DummyConnection(); - } - async beginTransaction() { - // Nothing to do here. - } - async commitTransaction() { - // Nothing to do here. - } - async rollbackTransaction() { - // Nothing to do here. - } - async releaseConnection() { - // Nothing to do here. - } - async destroy() { - // Nothing to do here. - } - async releaseSavepoint() { - // Nothing to do here. - } - async rollbackToSavepoint() { - // Nothing to do here. - } - async savepoint() { - // Nothing to do here. - } -} -class DummyConnection { - async executeQuery() { - return { - rows: [], - }; - } - async *streamQuery() { - // Nothing to do here. - } -} diff --git a/node_modules/kysely/dist/esm/driver/runtime-driver.d.ts b/node_modules/kysely/dist/esm/driver/runtime-driver.d.ts deleted file mode 100644 index 87a7f45..0000000 --- a/node_modules/kysely/dist/esm/driver/runtime-driver.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -import type { QueryCompiler } from '../query-compiler/query-compiler.js'; -import type { Log } from '../util/log.js'; -import type { DatabaseConnection } from './database-connection.js'; -import type { Driver, TransactionSettings } from './driver.js'; -/** - * A small wrapper around {@link Driver} that makes sure the driver is - * initialized before it is used, only initialized and destroyed - * once etc. - */ -export declare class RuntimeDriver implements Driver { - #private; - constructor(driver: Driver, log: Log); - /** - * Initializes the driver. - * - * After calling this method the driver should be usable and `acquireConnection` etc. - * methods should be callable. - */ - init(): Promise; - /** - * Acquires a new connection from the pool. - */ - acquireConnection(): Promise; - /** - * Releases a connection back to the pool. - */ - releaseConnection(connection: DatabaseConnection): Promise; - /** - * Begins a transaction. - */ - beginTransaction(connection: DatabaseConnection, settings: TransactionSettings): Promise; - /** - * Commits a transaction. - */ - commitTransaction(connection: DatabaseConnection): Promise; - /** - * Rolls back a transaction. - */ - rollbackTransaction(connection: DatabaseConnection): Promise; - savepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - rollbackToSavepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - releaseSavepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; - /** - * Destroys the driver and releases all resources. - */ - destroy(): Promise; -} diff --git a/node_modules/kysely/dist/esm/driver/runtime-driver.js b/node_modules/kysely/dist/esm/driver/runtime-driver.js deleted file mode 100644 index fe255df..0000000 --- a/node_modules/kysely/dist/esm/driver/runtime-driver.js +++ /dev/null @@ -1,162 +0,0 @@ -/// -import { performanceNow } from '../util/performance-now.js'; -/** - * A small wrapper around {@link Driver} that makes sure the driver is - * initialized before it is used, only initialized and destroyed - * once etc. - */ -export class RuntimeDriver { - #driver; - #log; - #initPromise; - #initDone; - #destroyPromise; - #connections = new WeakSet(); - constructor(driver, log) { - this.#initDone = false; - this.#driver = driver; - this.#log = log; - } - async init() { - if (this.#destroyPromise) { - throw new Error('driver has already been destroyed'); - } - if (!this.#initPromise) { - this.#initPromise = this.#driver - .init() - .then(() => { - this.#initDone = true; - }) - .catch((err) => { - this.#initPromise = undefined; - return Promise.reject(err); - }); - } - await this.#initPromise; - } - async acquireConnection() { - if (this.#destroyPromise) { - throw new Error('driver has already been destroyed'); - } - if (!this.#initDone) { - await this.init(); - } - const connection = await this.#driver.acquireConnection(); - if (!this.#connections.has(connection)) { - if (this.#needsLogging()) { - this.#addLogging(connection); - } - this.#connections.add(connection); - } - return connection; - } - async releaseConnection(connection) { - await this.#driver.releaseConnection(connection); - } - beginTransaction(connection, settings) { - return this.#driver.beginTransaction(connection, settings); - } - commitTransaction(connection) { - return this.#driver.commitTransaction(connection); - } - rollbackTransaction(connection) { - return this.#driver.rollbackTransaction(connection); - } - savepoint(connection, savepointName, compileQuery) { - if (this.#driver.savepoint) { - return this.#driver.savepoint(connection, savepointName, compileQuery); - } - throw new Error('The `savepoint` method is not supported by this driver'); - } - rollbackToSavepoint(connection, savepointName, compileQuery) { - if (this.#driver.rollbackToSavepoint) { - return this.#driver.rollbackToSavepoint(connection, savepointName, compileQuery); - } - throw new Error('The `rollbackToSavepoint` method is not supported by this driver'); - } - releaseSavepoint(connection, savepointName, compileQuery) { - if (this.#driver.releaseSavepoint) { - return this.#driver.releaseSavepoint(connection, savepointName, compileQuery); - } - throw new Error('The `releaseSavepoint` method is not supported by this driver'); - } - async destroy() { - if (!this.#initPromise) { - return; - } - await this.#initPromise; - if (!this.#destroyPromise) { - this.#destroyPromise = this.#driver.destroy().catch((err) => { - this.#destroyPromise = undefined; - return Promise.reject(err); - }); - } - await this.#destroyPromise; - } - #needsLogging() { - return (this.#log.isLevelEnabled('query') || this.#log.isLevelEnabled('error')); - } - // This method monkey patches the database connection's executeQuery method - // by adding logging code around it. Monkey patching is not pretty, but it's - // the best option in this case. - #addLogging(connection) { - const executeQuery = connection.executeQuery; - const streamQuery = connection.streamQuery; - const dis = this; - connection.executeQuery = async (compiledQuery) => { - let caughtError; - const startTime = performanceNow(); - try { - return await executeQuery.call(connection, compiledQuery); - } - catch (error) { - caughtError = error; - await dis.#logError(error, compiledQuery, startTime); - throw error; - } - finally { - if (!caughtError) { - await dis.#logQuery(compiledQuery, startTime); - } - } - }; - connection.streamQuery = async function* (compiledQuery, chunkSize) { - let caughtError; - const startTime = performanceNow(); - try { - for await (const result of streamQuery.call(connection, compiledQuery, chunkSize)) { - yield result; - } - } - catch (error) { - caughtError = error; - await dis.#logError(error, compiledQuery, startTime); - throw error; - } - finally { - if (!caughtError) { - await dis.#logQuery(compiledQuery, startTime, true); - } - } - }; - } - async #logError(error, compiledQuery, startTime) { - await this.#log.error(() => ({ - level: 'error', - error, - query: compiledQuery, - queryDurationMillis: this.#calculateDurationMillis(startTime), - })); - } - async #logQuery(compiledQuery, startTime, isStream = false) { - await this.#log.query(() => ({ - level: 'query', - isStream, - query: compiledQuery, - queryDurationMillis: this.#calculateDurationMillis(startTime), - })); - } - #calculateDurationMillis(startTime) { - return performanceNow() - startTime; - } -} diff --git a/node_modules/kysely/dist/esm/driver/single-connection-provider.d.ts b/node_modules/kysely/dist/esm/driver/single-connection-provider.d.ts deleted file mode 100644 index 0772443..0000000 --- a/node_modules/kysely/dist/esm/driver/single-connection-provider.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { DatabaseConnection } from './database-connection.js'; -import type { ConnectionProvider } from './connection-provider.js'; -export declare class SingleConnectionProvider implements ConnectionProvider { - #private; - constructor(connection: DatabaseConnection); - /** - * Provides a connection for the callback and takes care of disposing - * the connection after the callback has been run. - */ - provideConnection(consumer: (connection: DatabaseConnection) => Promise): Promise; -} diff --git a/node_modules/kysely/dist/esm/driver/single-connection-provider.js b/node_modules/kysely/dist/esm/driver/single-connection-provider.js deleted file mode 100644 index ef341ee..0000000 --- a/node_modules/kysely/dist/esm/driver/single-connection-provider.js +++ /dev/null @@ -1,26 +0,0 @@ -/// -const ignoreError = () => { }; -export class SingleConnectionProvider { - #connection; - #runningPromise; - constructor(connection) { - this.#connection = connection; - } - async provideConnection(consumer) { - while (this.#runningPromise) { - await this.#runningPromise.catch(ignoreError); - } - // `#runningPromise` must be set to undefined before it's - // resolved or rejected. Otherwise the while loop above - // will misbehave. - this.#runningPromise = this.#run(consumer).finally(() => { - this.#runningPromise = undefined; - }); - return this.#runningPromise; - } - // Run the runner in an async function to make sure it doesn't - // throw synchronous errors. - async #run(runner) { - return await runner(this.#connection); - } -} diff --git a/node_modules/kysely/dist/esm/dynamic/dynamic-reference-builder.d.ts b/node_modules/kysely/dist/esm/dynamic/dynamic-reference-builder.d.ts deleted file mode 100644 index eaf0339..0000000 --- a/node_modules/kysely/dist/esm/dynamic/dynamic-reference-builder.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { type OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { SimpleReferenceExpressionNode } from '../operation-node/simple-reference-expression-node.js'; -export declare class DynamicReferenceBuilder implements OperationNodeSource { - #private; - get dynamicReference(): string; - /** - * @private - * - * This needs to be here just so that the typings work. Without this - * the generated .d.ts file contains no reference to the type param R - * which causes this type to be equal to DynamicReferenceBuilder with - * any R. - */ - protected get refType(): R; - constructor(reference: string); - toOperationNode(): SimpleReferenceExpressionNode; -} -export declare function isDynamicReferenceBuilder(obj: unknown): obj is DynamicReferenceBuilder; diff --git a/node_modules/kysely/dist/esm/dynamic/dynamic-reference-builder.js b/node_modules/kysely/dist/esm/dynamic/dynamic-reference-builder.js deleted file mode 100644 index 0a3764e..0000000 --- a/node_modules/kysely/dist/esm/dynamic/dynamic-reference-builder.js +++ /dev/null @@ -1,32 +0,0 @@ -/// -import { isOperationNodeSource, } from '../operation-node/operation-node-source.js'; -import { parseSimpleReferenceExpression } from '../parser/reference-parser.js'; -import { isObject, isString } from '../util/object-utils.js'; -export class DynamicReferenceBuilder { - #dynamicReference; - get dynamicReference() { - return this.#dynamicReference; - } - /** - * @private - * - * This needs to be here just so that the typings work. Without this - * the generated .d.ts file contains no reference to the type param R - * which causes this type to be equal to DynamicReferenceBuilder with - * any R. - */ - get refType() { - return undefined; - } - constructor(reference) { - this.#dynamicReference = reference; - } - toOperationNode() { - return parseSimpleReferenceExpression(this.#dynamicReference); - } -} -export function isDynamicReferenceBuilder(obj) { - return (isObject(obj) && - isOperationNodeSource(obj) && - isString(obj.dynamicReference)); -} diff --git a/node_modules/kysely/dist/esm/dynamic/dynamic-table-builder.d.ts b/node_modules/kysely/dist/esm/dynamic/dynamic-table-builder.d.ts deleted file mode 100644 index 5963fc2..0000000 --- a/node_modules/kysely/dist/esm/dynamic/dynamic-table-builder.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { AliasNode } from '../operation-node/alias-node.js'; -import { type OperationNodeSource } from '../operation-node/operation-node-source.js'; -export declare class DynamicTableBuilder { - #private; - get table(): T; - constructor(table: T); - as(alias: A): AliasedDynamicTableBuilder; -} -export declare class AliasedDynamicTableBuilder implements OperationNodeSource { - #private; - get table(): T; - get alias(): A; - constructor(table: T, alias: A); - toOperationNode(): AliasNode; -} -export declare function isAliasedDynamicTableBuilder(obj: unknown): obj is AliasedDynamicTableBuilder; diff --git a/node_modules/kysely/dist/esm/dynamic/dynamic-table-builder.js b/node_modules/kysely/dist/esm/dynamic/dynamic-table-builder.js deleted file mode 100644 index dad4f7b..0000000 --- a/node_modules/kysely/dist/esm/dynamic/dynamic-table-builder.js +++ /dev/null @@ -1,41 +0,0 @@ -/// -import { AliasNode } from '../operation-node/alias-node.js'; -import { IdentifierNode } from '../operation-node/identifier-node.js'; -import { isOperationNodeSource, } from '../operation-node/operation-node-source.js'; -import { parseTable } from '../parser/table-parser.js'; -import { isObject, isString } from '../util/object-utils.js'; -export class DynamicTableBuilder { - #table; - get table() { - return this.#table; - } - constructor(table) { - this.#table = table; - } - as(alias) { - return new AliasedDynamicTableBuilder(this.#table, alias); - } -} -export class AliasedDynamicTableBuilder { - #table; - #alias; - get table() { - return this.#table; - } - get alias() { - return this.#alias; - } - constructor(table, alias) { - this.#table = table; - this.#alias = alias; - } - toOperationNode() { - return AliasNode.create(parseTable(this.#table), IdentifierNode.create(this.#alias)); - } -} -export function isAliasedDynamicTableBuilder(obj) { - return (isObject(obj) && - isOperationNodeSource(obj) && - isString(obj.table) && - isString(obj.alias)); -} diff --git a/node_modules/kysely/dist/esm/dynamic/dynamic.d.ts b/node_modules/kysely/dist/esm/dynamic/dynamic.d.ts deleted file mode 100644 index 8f42d72..0000000 --- a/node_modules/kysely/dist/esm/dynamic/dynamic.d.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { DynamicReferenceBuilder } from './dynamic-reference-builder.js'; -import { DynamicTableBuilder } from './dynamic-table-builder.js'; -export declare class DynamicModule { - /** - * Creates a dynamic reference to a column that is not know at compile time. - * - * Kysely is built in a way that by default you can't refer to tables or columns - * that are not actually visible in the current query and context. This is all - * done by TypeScript at compile time, which means that you need to know the - * columns and tables at compile time. This is not always the case of course. - * - * This method is meant to be used in those cases where the column names - * come from the user input or are not otherwise known at compile time. - * - * WARNING! Unlike values, column names are not escaped by the database engine - * or Kysely and if you pass in unchecked column names using this method, you - * create an SQL injection vulnerability. Always __always__ validate the user - * input before passing it to this method. - * - * There are couple of examples below for some use cases, but you can pass - * `ref` to other methods as well. If the types allow you to pass a `ref` - * value to some place, it should work. - * - * ### Examples - * - * Filter by a column not know at compile time: - * - * ```ts - * async function someQuery(filterColumn: string, filterValue: string) { - * const { ref } = db.dynamic - * - * return await db - * .selectFrom('person') - * .selectAll() - * .where(ref(filterColumn), '=', filterValue) - * .execute() - * } - * - * someQuery('first_name', 'Arnold') - * someQuery('person.last_name', 'Aniston') - * ``` - * - * Order by a column not know at compile time: - * - * ```ts - * async function someQuery(orderBy: string) { - * const { ref } = db.dynamic - * - * return await db - * .selectFrom('person') - * .select('person.first_name as fn') - * .orderBy(ref(orderBy)) - * .execute() - * } - * - * someQuery('fn') - * ``` - * - * In this example we add selections dynamically: - * - * ```ts - * const { ref } = db.dynamic - * - * // Some column name provided by the user. Value not known at compile time. - * const columnFromUserInput: PossibleColumns = 'birthdate'; - * - * // A type that lists all possible values `columnFromUserInput` can have. - * // You can use `keyof Person` if any column of an interface is allowed. - * type PossibleColumns = 'last_name' | 'first_name' | 'birthdate' - * - * const [person] = await db.selectFrom('person') - * .select([ - * ref(columnFromUserInput), - * 'id' - * ]) - * .execute() - * - * // The resulting type contains all `PossibleColumns` as optional fields - * // because we cannot know which field was actually selected before - * // running the code. - * const lastName: string | null | undefined = person?.last_name - * const firstName: string | undefined = person?.first_name - * const birthDate: Date | null | undefined = person?.birthdate - * - * // The result type also contains the compile time selection `id`. - * person?.id - * ``` - */ - ref(reference: string): DynamicReferenceBuilder; - /** - * Creates a table reference to a table that's not fully known at compile time. - * - * The type `T` is allowed to be a union of multiple tables. - * - * - * - * A generic type-safe helper function for finding a row by a column value: - * - * ```ts - * import { SelectType } from 'kysely' - * import { Database } from 'type-editor' - * - * async function getRowByColumn< - * T extends keyof Database, - * C extends keyof Database[T] & string, - * V extends SelectType, - * >(t: T, c: C, v: V) { - * // We need to use the dynamic module since the table name - * // is not known at compile time. - * const { table, ref } = db.dynamic - * - * return await db - * .selectFrom(table(t).as('t')) - * .selectAll() - * .where(ref(c), '=', v) - * .orderBy('t.id') - * .executeTakeFirstOrThrow() - * } - * - * const person = await getRowByColumn('person', 'first_name', 'Arnold') - * ``` - */ - table(table: T): DynamicTableBuilder; -} diff --git a/node_modules/kysely/dist/esm/dynamic/dynamic.js b/node_modules/kysely/dist/esm/dynamic/dynamic.js deleted file mode 100644 index 36da2f4..0000000 --- a/node_modules/kysely/dist/esm/dynamic/dynamic.js +++ /dev/null @@ -1,129 +0,0 @@ -/// -import { DynamicReferenceBuilder } from './dynamic-reference-builder.js'; -import { DynamicTableBuilder } from './dynamic-table-builder.js'; -export class DynamicModule { - /** - * Creates a dynamic reference to a column that is not know at compile time. - * - * Kysely is built in a way that by default you can't refer to tables or columns - * that are not actually visible in the current query and context. This is all - * done by TypeScript at compile time, which means that you need to know the - * columns and tables at compile time. This is not always the case of course. - * - * This method is meant to be used in those cases where the column names - * come from the user input or are not otherwise known at compile time. - * - * WARNING! Unlike values, column names are not escaped by the database engine - * or Kysely and if you pass in unchecked column names using this method, you - * create an SQL injection vulnerability. Always __always__ validate the user - * input before passing it to this method. - * - * There are couple of examples below for some use cases, but you can pass - * `ref` to other methods as well. If the types allow you to pass a `ref` - * value to some place, it should work. - * - * ### Examples - * - * Filter by a column not know at compile time: - * - * ```ts - * async function someQuery(filterColumn: string, filterValue: string) { - * const { ref } = db.dynamic - * - * return await db - * .selectFrom('person') - * .selectAll() - * .where(ref(filterColumn), '=', filterValue) - * .execute() - * } - * - * someQuery('first_name', 'Arnold') - * someQuery('person.last_name', 'Aniston') - * ``` - * - * Order by a column not know at compile time: - * - * ```ts - * async function someQuery(orderBy: string) { - * const { ref } = db.dynamic - * - * return await db - * .selectFrom('person') - * .select('person.first_name as fn') - * .orderBy(ref(orderBy)) - * .execute() - * } - * - * someQuery('fn') - * ``` - * - * In this example we add selections dynamically: - * - * ```ts - * const { ref } = db.dynamic - * - * // Some column name provided by the user. Value not known at compile time. - * const columnFromUserInput: PossibleColumns = 'birthdate'; - * - * // A type that lists all possible values `columnFromUserInput` can have. - * // You can use `keyof Person` if any column of an interface is allowed. - * type PossibleColumns = 'last_name' | 'first_name' | 'birthdate' - * - * const [person] = await db.selectFrom('person') - * .select([ - * ref(columnFromUserInput), - * 'id' - * ]) - * .execute() - * - * // The resulting type contains all `PossibleColumns` as optional fields - * // because we cannot know which field was actually selected before - * // running the code. - * const lastName: string | null | undefined = person?.last_name - * const firstName: string | undefined = person?.first_name - * const birthDate: Date | null | undefined = person?.birthdate - * - * // The result type also contains the compile time selection `id`. - * person?.id - * ``` - */ - ref(reference) { - return new DynamicReferenceBuilder(reference); - } - /** - * Creates a table reference to a table that's not fully known at compile time. - * - * The type `T` is allowed to be a union of multiple tables. - * - * - * - * A generic type-safe helper function for finding a row by a column value: - * - * ```ts - * import { SelectType } from 'kysely' - * import { Database } from 'type-editor' - * - * async function getRowByColumn< - * T extends keyof Database, - * C extends keyof Database[T] & string, - * V extends SelectType, - * >(t: T, c: C, v: V) { - * // We need to use the dynamic module since the table name - * // is not known at compile time. - * const { table, ref } = db.dynamic - * - * return await db - * .selectFrom(table(t).as('t')) - * .selectAll() - * .where(ref(c), '=', v) - * .orderBy('t.id') - * .executeTakeFirstOrThrow() - * } - * - * const person = await getRowByColumn('person', 'first_name', 'Arnold') - * ``` - */ - table(table) { - return new DynamicTableBuilder(table); - } -} diff --git a/node_modules/kysely/dist/esm/expression/expression-builder.d.ts b/node_modules/kysely/dist/esm/expression/expression-builder.d.ts deleted file mode 100644 index 8cc87ef..0000000 --- a/node_modules/kysely/dist/esm/expression/expression-builder.d.ts +++ /dev/null @@ -1,920 +0,0 @@ -import { type SelectQueryBuilder } from '../query-builder/select-query-builder.js'; -import { type TableExpressionOrList } from '../parser/table-parser.js'; -import { type FunctionModule } from '../query-builder/function-module.js'; -import { type ExtractTypeFromReferenceExpression, type ReferenceExpression, type SimpleReferenceExpression, type StringReference } from '../parser/reference-parser.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import { type BinaryOperatorExpression, type FilterObject, type OperandValueExpression, type OperandValueExpressionOrList } from '../parser/binary-operation-parser.js'; -import type { Expression } from './expression.js'; -import { ExpressionWrapper } from './expression-wrapper.js'; -import { type ComparisonOperator, type JSONOperatorWith$, type UnaryOperator } from '../operation-node/operator-node.js'; -import type { IsNever, SqlBool } from '../util/type-utils.js'; -import { type ExtractTypeFromValueExpression } from '../parser/value-parser.js'; -import { CaseBuilder } from '../query-builder/case-builder.js'; -import { JSONPathBuilder } from '../query-builder/json-path-builder.js'; -import type { OperandExpression } from '../parser/expression-parser.js'; -import type { RefTuple2, RefTuple3, RefTuple4, RefTuple5, ValTuple2, ValTuple3, ValTuple4, ValTuple5 } from '../parser/tuple-parser.js'; -import type { Selectable } from '../util/column-type.js'; -import type { KyselyTypeError } from '../util/type-error.js'; -import { type DataTypeExpression } from '../parser/data-type-parser.js'; -import type { SelectFrom } from '../parser/select-from-parser.js'; -export interface ExpressionBuilder { - /** - * Creates a binary expression. - * - * This function returns an {@link Expression} and can be used pretty much anywhere. - * See the examples for a couple of possible use cases. - * - * ### Examples - * - * A simple comparison: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll() - * .where((eb) => eb('first_name', '=', 'Jennifer')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where "first_name" = $1 - * ``` - * - * By default the third argument is interpreted as a value. To pass in - * a column reference, you can use {@link ref}: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll() - * .where((eb) => eb('first_name', '=', eb.ref('last_name'))) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where "first_name" = "last_name" - * ``` - * - * In the following example `eb` is used to increment an integer column: - * - * ```ts - * await db.updateTable('person') - * .set((eb) => ({ - * age: eb('age', '+', 1) - * })) - * .where('id', '=', 3) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * update "person" - * set "age" = "age" + $1 - * where "id" = $2 - * ``` - * - * As always, expressions can be nested. Both the first and the third argument - * can be any expression: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll() - * .where((eb) => eb( - * eb.fn('lower', ['first_name']), - * 'in', - * eb.selectFrom('pet') - * .select('pet.name') - * .where('pet.species', '=', 'cat') - * )) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where lower("first_name") in ( - * select "pet"."name" - * from "pet" - * where "pet"."species" = $1 - * ) - * ``` - */ - , OP extends BinaryOperatorExpression, VE extends OperandValueExpressionOrList>(lhs: RE, op: OP, rhs: VE): ExpressionWrapper ? unknown extends T ? SqlBool : T : ExtractTypeFromReferenceExpression>; - /** - * Returns a copy of `this` expression builder, for destructuring purposes. - * - * ### Examples - * - * ```ts - * const result = await db.selectFrom('person') - * .where(({ eb, exists, selectFrom }) => - * eb('first_name', '=', 'Jennifer').and(exists( - * selectFrom('pet').whereRef('owner_id', '=', 'person.id').select('pet.id') - * )) - * ) - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "first_name" = $1 and exists ( - * select "pet.id" from "pet" where "owner_id" = "person.id" - * ) - * ``` - */ - get eb(): ExpressionBuilder; - /** - * Returns a {@link FunctionModule} that can be used to write type safe function - * calls. - * - * The difference between this and {@link Kysely.fn} is that this one is more - * type safe. You can only refer to columns visible to the part of the query - * you are building. {@link Kysely.fn} allows you to refer to columns in any - * table of the database even if it doesn't produce valid SQL. - * - * ```ts - * const result = await db.selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .select((eb) => [ - * 'person.id', - * eb.fn.count('pet.id').as('pet_count') - * ]) - * .groupBy('person.id') - * .having((eb) => eb.fn.count('pet.id'), '>', 10) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."id", count("pet"."id") as "pet_count" - * from "person" - * inner join "pet" on "pet"."owner_id" = "person"."id" - * group by "person"."id" - * having count("pet"."id") > $1 - * ``` - */ - get fn(): FunctionModule; - /** - * Creates a subquery. - * - * The query builder returned by this method is typed in a way that you can refer to - * all tables of the parent query in addition to the subquery's tables. - * - * This method accepts all the same inputs as {@link QueryCreator.selectFrom}. - * - * ### Examples - * - * This example shows that you can refer to both `pet.owner_id` and `person.id` - * columns from the subquery. This is needed to be able to create correlated - * subqueries: - * - * ```ts - * const result = await db.selectFrom('pet') - * .select((eb) => [ - * 'pet.name', - * eb.selectFrom('person') - * .whereRef('person.id', '=', 'pet.owner_id') - * .select('person.first_name') - * .as('owner_name') - * ]) - * .execute() - * - * console.log(result[0]?.owner_name) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * "pet"."name", - * ( select "person"."first_name" - * from "person" - * where "person"."id" = "pet"."owner_id" - * ) as "owner_name" - * from "pet" - * ``` - * - * You can use a normal query in place of `(qb) => qb.selectFrom(...)` but in - * that case Kysely typings wouldn't allow you to reference `pet.owner_id` - * because `pet` is not joined to that query. - */ - selectFrom>(from: TE): SelectFrom; - /** - * Creates a `case` statement/operator. - * - * ### Examples - * - * Kitchen sink example with 2 flavors of `case` operator: - * - * ```ts - * const { title, name } = await db - * .selectFrom('person') - * .where('id', '=', 123) - * .select((eb) => [ - * eb.fn.coalesce('last_name', 'first_name').as('name'), - * eb - * .case() - * .when('gender', '=', 'male') - * .then('Mr.') - * .when('gender', '=', 'female') - * .then( - * eb - * .case('marital_status') - * .when('single') - * .then('Ms.') - * .else('Mrs.') - * .end() - * ) - * .end() - * .as('title'), - * ]) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * coalesce("last_name", "first_name") as "name", - * case - * when "gender" = $1 then $2 - * when "gender" = $3 then - * case "marital_status" - * when $4 then $5 - * else $6 - * end - * end as "title" - * from "person" - * where "id" = $7 - * ``` - */ - case(): CaseBuilder; - case>(column: C): CaseBuilder>; - case>(expression: E): CaseBuilder>; - /** - * This method can be used to reference columns within the query's context. For - * a non-type-safe version of this method see {@link sql}'s version. - * - * Additionally, this method can be used to reference nested JSON properties or - * array elements. See {@link JSONPathBuilder} for more information. For regular - * JSON path expressions you can use {@link jsonPath}. - * - * ### Examples - * - * By default the third argument of binary expressions is a value. - * This function can be used to pass in a column reference instead: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll('person') - * .where((eb) => eb.or([ - * eb('first_name', '=', eb.ref('last_name')), - * eb('first_name', '=', eb.ref('middle_name')) - * ])) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where "first_name" = "last_name" or "first_name" = "middle_name" - * ``` - * - * In the next example we use the `ref` method to reference columns of the virtual - * table `excluded` in a type-safe way to create an upsert operation: - * - * ```ts - * await db.insertInto('person') - * .values({ - * id: 3, - * first_name: 'Jennifer', - * last_name: 'Aniston', - * gender: 'female', - * }) - * .onConflict((oc) => oc - * .column('id') - * .doUpdateSet(({ ref }) => ({ - * first_name: ref('excluded.first_name'), - * last_name: ref('excluded.last_name'), - * gender: ref('excluded.gender'), - * })) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("id", "first_name", "last_name", "gender") - * values ($1, $2, $3, $4) - * on conflict ("id") do update set - * "first_name" = "excluded"."first_name", - * "last_name" = "excluded"."last_name", - * "gender" = "excluded"."gender" - * ``` - * - * In the next example we use `ref` in a raw sql expression. Unless you want - * to be as type-safe as possible, this is probably overkill: - * - * ```ts - * import { sql } from 'kysely' - * - * await db.updateTable('pet') - * .set((eb) => ({ - * name: sql`concat(${eb.ref('pet.name')}, ${' the animal'})` - * })) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * update "pet" set "name" = concat("pet"."name", $1) - * ``` - * - * In the next example we use `ref` to reference a nested JSON property: - * - * ```ts - * const result = await db.selectFrom('person') - * .where(({ eb, ref }) => eb( - * ref('profile', '->').key('addresses').at(0).key('city'), - * '=', - * 'San Diego' - * )) - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "profile"->'addresses'->0->'city' = $1 - * ``` - * - * You can also compile to a JSON path expression by using the `->$`or `->>$` operator: - * - * ```ts - * const result = await db.selectFrom('person') - * .select(({ ref }) => - * ref('profile', '->$') - * .key('addresses') - * .at('last') - * .key('city') - * .as('current_city') - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select `profile`->'$.addresses[last].city' as `current_city` from `person` - * ``` - */ - ref>(reference: RE): ExpressionWrapper>; - ref>(reference: RE, op: JSONOperatorWith$): JSONPathBuilder>; - /** - * Creates a JSON path expression with provided column as root document (the $). - * - * For a JSON reference expression, see {@link ref}. - * - * ### Examples - * - * ```ts - * await db.updateTable('person') - * .set('profile', (eb) => eb.fn('json_set', [ - * 'profile', - * eb.jsonPath<'profile'>().key('addresses').at('last').key('city'), - * eb.val('San Diego') - * ])) - * .where('id', '=', 3) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * update `person` - * set `profile` = json_set(`profile`, '$.addresses[last].city', $1) - * where `id` = $2 - * ``` - */ - jsonPath<$ extends StringReference = never>(): IsNever<$> extends true ? KyselyTypeError<"You must provide a column reference as this method's $ generic"> : JSONPathBuilder>; - /** - * Creates a table reference. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * import type { Pet } from 'type-editor' // imaginary module - * - * const result = await db.selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .select(eb => [ - * 'person.id', - * sql`jsonb_agg(${eb.table('pet')})`.as('pets') - * ]) - * .groupBy('person.id') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."id", jsonb_agg("pet") as "pets" - * from "person" - * inner join "pet" on "pet"."owner_id" = "person"."id" - * group by "person"."id" - * ``` - * - * If you need a column reference, use {@link ref}. - */ - table(table: T): ExpressionWrapper>; - /** - * Returns a value expression. - * - * This can be used to pass in a value where a reference is taken by default. - * - * This function returns an {@link Expression} and can be used pretty much anywhere. - * - * ### Examples - * - * Binary expressions take a reference by default as the first argument. `val` could - * be used to pass in a value instead: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll() - * .where((eb) => eb( - * eb.val('cat'), - * '=', - * eb.fn.any( - * eb.selectFrom('pet') - * .select('species') - * .whereRef('owner_id', '=', 'person.id') - * ) - * )) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where $1 = any( - * select "species" - * from "pet" - * where "owner_id" = "person"."id" - * ) - * ``` - */ - val(value: VE): ExpressionWrapper>; - /** - * Creates a tuple expression. - * - * This creates a tuple using column references by default. See {@link tuple} - * if you need to create value tuples. - * - * ### Examples - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll('person') - * .where(({ eb, refTuple, tuple }) => eb( - * refTuple('first_name', 'last_name'), - * 'in', - * [ - * tuple('Jennifer', 'Aniston'), - * tuple('Sylvester', 'Stallone') - * ] - * )) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * "person".* - * from - * "person" - * where - * ("first_name", "last_name") - * in - * ( - * ($1, $2), - * ($3, $4) - * ) - * ``` - * - * In the next example a reference tuple is compared to a subquery. Note that - * in this case you need to use the {@link @SelectQueryBuilder.$asTuple | $asTuple} - * function: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll('person') - * .where(({ eb, refTuple, selectFrom }) => eb( - * refTuple('first_name', 'last_name'), - * 'in', - * selectFrom('pet') - * .select(['name', 'species']) - * .where('species', '!=', 'cat') - * .$asTuple('name', 'species') - * )) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * "person".* - * from - * "person" - * where - * ("first_name", "last_name") - * in - * ( - * select "name", "species" - * from "pet" - * where "species" != $1 - * ) - * ``` - */ - refTuple, R2 extends ReferenceExpression>(value1: R1, value2: R2): ExpressionWrapper>; - refTuple, R2 extends ReferenceExpression, R3 extends ReferenceExpression>(value1: R1, value2: R2, value3: R3): ExpressionWrapper>; - refTuple, R2 extends ReferenceExpression, R3 extends ReferenceExpression, R4 extends ReferenceExpression>(value1: R1, value2: R2, value3: R3, value4: R4): ExpressionWrapper>; - refTuple, R2 extends ReferenceExpression, R3 extends ReferenceExpression, R4 extends ReferenceExpression, R5 extends ReferenceExpression>(value1: R1, value2: R2, value3: R3, value4: R4, value5: R5): ExpressionWrapper>; - /** - * Creates a value tuple expression. - * - * This creates a tuple using values by default. See {@link refTuple} if you need to create - * tuples using column references. - * - * ### Examples - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll('person') - * .where(({ eb, refTuple, tuple }) => eb( - * refTuple('first_name', 'last_name'), - * 'in', - * [ - * tuple('Jennifer', 'Aniston'), - * tuple('Sylvester', 'Stallone') - * ] - * )) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * "person".* - * from - * "person" - * where - * ("first_name", "last_name") - * in - * ( - * ($1, $2), - * ($3, $4) - * ) - * ``` - */ - tuple(value1: V1, value2: V2): ExpressionWrapper>; - tuple(value1: V1, value2: V2, value3: V3): ExpressionWrapper>; - tuple(value1: V1, value2: V2, value3: V3, value4: V4): ExpressionWrapper>; - tuple(value1: V1, value2: V2, value3: V3, value4: V4, value5: V5): ExpressionWrapper>; - /** - * Returns a literal value expression. - * - * Just like `val` but creates a literal value that gets merged in the SQL. - * To prevent SQL injections, only `boolean`, `number` and `null` values - * are accepted. If you need `string` or other literals, use `sql.lit` instead. - * - * ### Examples - * - * ```ts - * const result = await db.selectFrom('person') - * .select((eb) => eb.lit(1).as('one')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select 1 as "one" from "person" - * ``` - */ - lit(literal: VE): ExpressionWrapper; - /** - * Creates an unary expression. - * - * This function returns an {@link Expression} and can be used pretty much anywhere. - * See the examples for a couple of possible use cases. - * - * @see {@link not}, {@link exists} and {@link neg}. - * - * ### Examples - * - * ```ts - * const result = await db.selectFrom('person') - * .select((eb) => [ - * 'first_name', - * eb.unary('-', 'age').as('negative_age') - * ]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name", -"age" - * from "person" - * ``` - */ - unary>(op: UnaryOperator, expr: RE): ExpressionWrapper>; - /** - * Creates a `not` operation. - * - * A shortcut for `unary('not', expr)`. - * - * @see {@link unary} - */ - not>(expr: RE): ExpressionWrapper>; - /** - * Creates an `exists` operation. - * - * A shortcut for `unary('exists', expr)`. - * - * @see {@link unary} - */ - exists>(expr: RE): ExpressionWrapper; - /** - * Creates a negation operation. - * - * A shortcut for `unary('-', expr)`. - * - * @see {@link unary} - */ - neg>(expr: RE): ExpressionWrapper>; - /** - * Creates a `between` expression. - * - * ### Examples - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll() - * .where((eb) => eb.between('age', 40, 60)) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "age" between $1 and $2 - * ``` - */ - between, SE extends OperandValueExpression, EE extends OperandValueExpression>(expr: RE, start: SE, end: EE): ExpressionWrapper; - /** - * Creates a `between symmetric` expression. - * - * ### Examples - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll() - * .where((eb) => eb.betweenSymmetric('age', 40, 60)) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "age" between symmetric $1 and $2 - * ``` - */ - betweenSymmetric, SE extends OperandValueExpression, EE extends OperandValueExpression>(expr: RE, start: SE, end: EE): ExpressionWrapper; - /** - * Combines two or more expressions using the logical `and` operator. - * - * An empty array produces a `true` expression. - * - * This function returns an {@link Expression} and can be used pretty much anywhere. - * See the examples for a couple of possible use cases. - * - * ### Examples - * - * In this example we use `and` to create a `WHERE expr1 AND expr2 AND expr3` - * statement: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll('person') - * .where((eb) => eb.and([ - * eb('first_name', '=', 'Jennifer'), - * eb('first_name', '=', 'Arnold'), - * eb('first_name', '=', 'Sylvester') - * ])) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where ( - * "first_name" = $1 - * and "first_name" = $2 - * and "first_name" = $3 - * ) - * ``` - * - * Optionally you can use the simpler object notation if you only need - * equality comparisons: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll('person') - * .where((eb) => eb.and({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * })) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where ( - * "first_name" = $1 - * and "last_name" = $2 - * ) - * ``` - */ - and>(exprs: ReadonlyArray): ExpressionWrapper; - and>>(exprs: E): ExpressionWrapper; - /** - * Combines two or more expressions using the logical `or` operator. - * - * An empty array produces a `false` expression. - * - * This function returns an {@link Expression} and can be used pretty much anywhere. - * See the examples for a couple of possible use cases. - * - * ### Examples - * - * In this example we use `or` to create a `WHERE expr1 OR expr2 OR expr3` - * statement: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll('person') - * .where((eb) => eb.or([ - * eb('first_name', '=', 'Jennifer'), - * eb('first_name', '=', 'Arnold'), - * eb('first_name', '=', 'Sylvester') - * ])) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where ( - * "first_name" = $1 - * or "first_name" = $2 - * or "first_name" = $3 - * ) - * ``` - * - * Optionally you can use the simpler object notation if you only need - * equality comparisons: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll('person') - * .where((eb) => eb.or({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * })) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where ( - * "first_name" = $1 - * or "last_name" = $2 - * ) - * ``` - */ - or>(exprs: ReadonlyArray): ExpressionWrapper; - or>>(exprs: E): ExpressionWrapper; - /** - * Wraps the expression in parentheses. - * - * ### Examples - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll('person') - * .where((eb) => eb(eb.parens('age', '+', 1), '/', 100), '<', 0.1) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where ("age" + $1) / $2 < $3 - * ``` - * - * You can also pass in any expression as the only argument: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll('person') - * .where((eb) => eb.parens( - * eb('age', '=', 1).or('age', '=', 2) - * ).and( - * eb('first_name', '=', 'Jennifer').or('first_name', '=', 'Arnold') - * )) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where ("age" = $1 or "age" = $2) and ("first_name" = $3 or "first_name" = $4) - * ``` - */ - parens, OP extends BinaryOperatorExpression, VE extends OperandValueExpressionOrList>(lhs: RE, op: OP, rhs: VE): ExpressionWrapper>; - parens(expr: Expression): ExpressionWrapper; - /** - * Creates a `cast(expr as dataType)` expression. - * - * Since Kysely can't know the mapping between JavaScript and database types, - * you need to provide both explicitly. - * - * ### Examples - * - * ```ts - * const result = await db.selectFrom('person') - * .select((eb) => [ - * 'id', - * 'first_name', - * eb.cast('age', 'integer').as('age') - * ]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select cast("age" as integer) as "age" - * from "person" - * ``` - */ - cast = ReferenceExpression>(expr: RE, dataType: DataTypeExpression): ExpressionWrapper; - /** - * See {@link QueryCreator.withSchema} - * - * @deprecated Will be removed in kysely 0.25.0. - */ - withSchema(schema: string): ExpressionBuilder; -} -export declare function createExpressionBuilder(executor?: QueryExecutor): ExpressionBuilder; -export declare function expressionBuilder(_: SelectQueryBuilder): ExpressionBuilder; -export declare function expressionBuilder(): ExpressionBuilder; diff --git a/node_modules/kysely/dist/esm/expression/expression-builder.js b/node_modules/kysely/dist/esm/expression/expression-builder.js deleted file mode 100644 index d5e9be7..0000000 --- a/node_modules/kysely/dist/esm/expression/expression-builder.js +++ /dev/null @@ -1,125 +0,0 @@ -/// -import { createSelectQueryBuilder, } from '../query-builder/select-query-builder.js'; -import { SelectQueryNode } from '../operation-node/select-query-node.js'; -import { parseTableExpressionOrList, parseTable, } from '../parser/table-parser.js'; -import { WithSchemaPlugin } from '../plugin/with-schema/with-schema-plugin.js'; -import { createQueryId } from '../util/query-id.js'; -import { createFunctionModule, } from '../query-builder/function-module.js'; -import { parseJSONReference, parseReferenceExpression, parseStringReference, } from '../parser/reference-parser.js'; -import { parseFilterList, parseFilterObject, parseValueBinaryOperation, parseValueBinaryOperationOrExpression, } from '../parser/binary-operation-parser.js'; -import { ParensNode } from '../operation-node/parens-node.js'; -import { ExpressionWrapper } from './expression-wrapper.js'; -import { OperatorNode, } from '../operation-node/operator-node.js'; -import { parseUnaryOperation } from '../parser/unary-operation-parser.js'; -import { parseSafeImmediateValue, parseValueExpression, } from '../parser/value-parser.js'; -import { NOOP_QUERY_EXECUTOR } from '../query-executor/noop-query-executor.js'; -import { CaseBuilder } from '../query-builder/case-builder.js'; -import { CaseNode } from '../operation-node/case-node.js'; -import { isReadonlyArray, isUndefined } from '../util/object-utils.js'; -import { JSONPathBuilder } from '../query-builder/json-path-builder.js'; -import { BinaryOperationNode } from '../operation-node/binary-operation-node.js'; -import { AndNode } from '../operation-node/and-node.js'; -import { TupleNode } from '../operation-node/tuple-node.js'; -import { JSONPathNode } from '../operation-node/json-path-node.js'; -import { parseDataTypeExpression, } from '../parser/data-type-parser.js'; -import { CastNode } from '../operation-node/cast-node.js'; -export function createExpressionBuilder(executor = NOOP_QUERY_EXECUTOR) { - function binary(lhs, op, rhs) { - return new ExpressionWrapper(parseValueBinaryOperation(lhs, op, rhs)); - } - function unary(op, expr) { - return new ExpressionWrapper(parseUnaryOperation(op, expr)); - } - const eb = Object.assign(binary, { - fn: undefined, - eb: undefined, - selectFrom(table) { - return createSelectQueryBuilder({ - queryId: createQueryId(), - executor, - queryNode: SelectQueryNode.createFrom(parseTableExpressionOrList(table)), - }); - }, - case(reference) { - return new CaseBuilder({ - node: CaseNode.create(isUndefined(reference) - ? undefined - : parseReferenceExpression(reference)), - }); - }, - ref(reference, op) { - if (isUndefined(op)) { - return new ExpressionWrapper(parseStringReference(reference)); - } - return new JSONPathBuilder(parseJSONReference(reference, op)); - }, - jsonPath() { - return new JSONPathBuilder(JSONPathNode.create()); - }, - table(table) { - return new ExpressionWrapper(parseTable(table)); - }, - val(value) { - return new ExpressionWrapper(parseValueExpression(value)); - }, - refTuple(...values) { - return new ExpressionWrapper(TupleNode.create(values.map(parseReferenceExpression))); - }, - tuple(...values) { - return new ExpressionWrapper(TupleNode.create(values.map(parseValueExpression))); - }, - lit(value) { - return new ExpressionWrapper(parseSafeImmediateValue(value)); - }, - unary, - not(expr) { - return unary('not', expr); - }, - exists(expr) { - return unary('exists', expr); - }, - neg(expr) { - return unary('-', expr); - }, - between(expr, start, end) { - return new ExpressionWrapper(BinaryOperationNode.create(parseReferenceExpression(expr), OperatorNode.create('between'), AndNode.create(parseValueExpression(start), parseValueExpression(end)))); - }, - betweenSymmetric(expr, start, end) { - return new ExpressionWrapper(BinaryOperationNode.create(parseReferenceExpression(expr), OperatorNode.create('between symmetric'), AndNode.create(parseValueExpression(start), parseValueExpression(end)))); - }, - and(exprs) { - if (isReadonlyArray(exprs)) { - return new ExpressionWrapper(parseFilterList(exprs, 'and')); - } - return new ExpressionWrapper(parseFilterObject(exprs, 'and')); - }, - or(exprs) { - if (isReadonlyArray(exprs)) { - return new ExpressionWrapper(parseFilterList(exprs, 'or')); - } - return new ExpressionWrapper(parseFilterObject(exprs, 'or')); - }, - parens(...args) { - const node = parseValueBinaryOperationOrExpression(args); - if (ParensNode.is(node)) { - // No double wrapping. - return new ExpressionWrapper(node); - } - else { - return new ExpressionWrapper(ParensNode.create(node)); - } - }, - cast(expr, dataType) { - return new ExpressionWrapper(CastNode.create(parseReferenceExpression(expr), parseDataTypeExpression(dataType))); - }, - withSchema(schema) { - return createExpressionBuilder(executor.withPluginAtFront(new WithSchemaPlugin(schema))); - }, - }); - eb.fn = createFunctionModule(); - eb.eb = eb; - return eb; -} -export function expressionBuilder(_) { - return createExpressionBuilder(); -} diff --git a/node_modules/kysely/dist/esm/expression/expression-wrapper.d.ts b/node_modules/kysely/dist/esm/expression/expression-wrapper.d.ts deleted file mode 100644 index 39b8673..0000000 --- a/node_modules/kysely/dist/esm/expression/expression-wrapper.d.ts +++ /dev/null @@ -1,631 +0,0 @@ -import { AliasNode } from '../operation-node/alias-node.js'; -import { AndNode } from '../operation-node/and-node.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -import { OrNode } from '../operation-node/or-node.js'; -import { ParensNode } from '../operation-node/parens-node.js'; -import { type ComparisonOperatorExpression, type OperandValueExpressionOrList } from '../parser/binary-operation-parser.js'; -import type { OperandExpression } from '../parser/expression-parser.js'; -import type { ReferenceExpression } from '../parser/reference-parser.js'; -import type { KyselyTypeError } from '../util/type-error.js'; -import type { SqlBool } from '../util/type-utils.js'; -import type { AliasableExpression, AliasedExpression, Expression } from './expression.js'; -export declare class ExpressionWrapper implements AliasableExpression { - #private; - constructor(node: OperationNode); - /** @private */ - /** - * All expressions need to have this getter for complicated type-related reasons. - * Simply add this getter for your expression and always return `undefined` from it: - * - * ### Examples - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - * - * The getter is needed to make the expression assignable to another expression only - * if the types `T` are assignable. Without this property (or some other property - * that references `T`), you could assing `Expression` to `Expression`. - */ - get expressionType(): T | undefined; - /** - * Returns an aliased version of the expression. - * - * ### Examples - * - * In addition to slapping `as "the_alias"` to the end of the SQL, - * this method also provides strict typing: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => - * eb('first_name', '=', 'Jennifer').as('is_jennifer') - * ) - * .executeTakeFirstOrThrow() - * - * // `is_jennifer: SqlBool` field exists in the result type. - * console.log(result.is_jennifer) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name" = $1 as "is_jennifer" - * from "person" - * ``` - */ - as(alias: A): AliasedExpression; - /** - * Returns an aliased version of the expression. - * - * ### Examples - * - * In addition to slapping `as "the_alias"` at the end of the expression, - * this method also provides strict typing: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => - * // `eb.fn` returns an AliasableExpression - * eb.fn('concat', ['first_name', eb.val(' '), 'last_name']).as('full_name') - * ) - * .executeTakeFirstOrThrow() - * - * // `full_name: string` field exists in the result type. - * console.log(result.full_name) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * concat("first_name", $1, "last_name") as "full_name" - * from - * "person" - * ``` - * - * You can also pass in a raw SQL snippet (or any expression) but in that case you must - * provide the alias as the only type argument: - * - * ```ts - * import { sql } from 'kysely' - * - * const values = sql<{ a: number, b: string }>`(values (1, 'foo'))` - * - * // The alias is `t(a, b)` which specifies the column names - * // in addition to the table name. We must tell kysely that - * // columns of the table can be referenced through `t` - * // by providing an explicit type argument. - * const aliasedValues = values.as<'t'>(sql`t(a, b)`) - * - * await db - * .insertInto('person') - * .columns(['first_name', 'last_name']) - * .expression( - * db.selectFrom(aliasedValues).select(['t.a', 't.b']) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name") - * from (values (1, 'foo')) as t(a, b) - * select "t"."a", "t"."b" - * ``` - */ - as(alias: Expression): AliasedExpression; - /** - * Combines `this` and another expression using `OR`. - * - * Also see {@link ExpressionBuilder.or} - * - * ### Examples - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll() - * .where(eb => eb('first_name', '=', 'Jennifer') - * .or('first_name', '=', 'Arnold') - * .or('first_name', '=', 'Sylvester') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * "first_name" = $1 - * or "first_name" = $2 - * or "first_name" = $3 - * ) - * ``` - * - * You can also pass any expression as the only argument to - * this method: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll() - * .where(eb => eb('first_name', '=', 'Jennifer') - * .or(eb('first_name', '=', 'Sylvester').and('last_name', '=', 'Stallone')) - * .or(eb.exists( - * eb.selectFrom('pet') - * .select('id') - * .whereRef('pet.owner_id', '=', 'person.id') - * )) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * "first_name" = $1 - * or ("first_name" = $2 and "last_name" = $3) - * or exists ( - * select "id" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * ) - * ) - * ``` - */ - or, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): T extends SqlBool ? OrWrapper : KyselyTypeError<'or() method can only be called on boolean expressions'>; - or>(expression: E): T extends SqlBool ? OrWrapper : KyselyTypeError<'or() method can only be called on boolean expressions'>; - /** - * Combines `this` and another expression using `AND`. - * - * Also see {@link ExpressionBuilder.and} - * - * ### Examples - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll() - * .where(eb => eb('first_name', '=', 'Jennifer') - * .and('last_name', '=', 'Aniston') - * .and('age', '>', 40) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * "first_name" = $1 - * and "last_name" = $2 - * and "age" > $3 - * ) - * ``` - * - * You can also pass any expression as the only argument to - * this method: - * - * ```ts - * const result = await db.selectFrom('person') - * .selectAll() - * .where(eb => eb('first_name', '=', 'Jennifer') - * .and(eb('first_name', '=', 'Sylvester').or('last_name', '=', 'Stallone')) - * .and(eb.exists( - * eb.selectFrom('pet') - * .select('id') - * .whereRef('pet.owner_id', '=', 'person.id') - * )) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * "first_name" = $1 - * and ("first_name" = $2 or "last_name" = $3) - * and exists ( - * select "id" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * ) - * ) - * ``` - */ - and, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): T extends SqlBool ? AndWrapper : KyselyTypeError<'and() method can only be called on boolean expressions'>; - and>(expression: E): T extends SqlBool ? AndWrapper : KyselyTypeError<'and() method can only be called on boolean expressions'>; - /** - * Change the output type of the expression. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `ExpressionWrapper` with a new output type. - */ - $castTo(): ExpressionWrapper; - /** - * Omit null from the expression's type. - * - * This function can be useful in cases where you know an expression can't be - * null, but Kysely is unable to infer it. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of `this` with a new output type. - */ - $notNull(): ExpressionWrapper>; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - * - * ### Examples - * - * If you are creating a custom expression, it's often easiest to use the {@link sql} - * template tag to build the node: - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - */ - toOperationNode(): OperationNode; -} -export declare class AliasedExpressionWrapper implements AliasedExpression { - #private; - constructor(expr: Expression, alias: A | Expression); - /** @private */ - /** - * Returns the aliased expression. - */ - get expression(): Expression; - /** @private */ - /** - * Returns the alias. - */ - get alias(): A | Expression; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - */ - toOperationNode(): AliasNode; -} -export declare class OrWrapper implements AliasableExpression { - #private; - constructor(node: OrNode); - /** @private */ - /** - * All expressions need to have this getter for complicated type-related reasons. - * Simply add this getter for your expression and always return `undefined` from it: - * - * ### Examples - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - * - * The getter is needed to make the expression assignable to another expression only - * if the types `T` are assignable. Without this property (or some other property - * that references `T`), you could assing `Expression` to `Expression`. - */ - get expressionType(): T | undefined; - /** - * Returns an aliased version of the expression. - * - * In addition to slapping `as "the_alias"` to the end of the SQL, - * this method also provides strict typing: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select(eb => - * eb('first_name', '=', 'Jennifer') - * .or('first_name', '=', 'Sylvester') - * .as('is_jennifer_or_sylvester') - * ) - * .executeTakeFirstOrThrow() - * - * // `is_jennifer_or_sylvester: SqlBool` field exists in the result type. - * console.log(result.is_jennifer_or_sylvester) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name" = $1 or "first_name" = $2 as "is_jennifer_or_sylvester" - * from "person" - * ``` - */ - as(alias: A): AliasedExpression; - /** - * Returns an aliased version of the expression. - * - * ### Examples - * - * In addition to slapping `as "the_alias"` at the end of the expression, - * this method also provides strict typing: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => - * // `eb.fn` returns an AliasableExpression - * eb.fn('concat', ['first_name', eb.val(' '), 'last_name']).as('full_name') - * ) - * .executeTakeFirstOrThrow() - * - * // `full_name: string` field exists in the result type. - * console.log(result.full_name) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * concat("first_name", $1, "last_name") as "full_name" - * from - * "person" - * ``` - * - * You can also pass in a raw SQL snippet (or any expression) but in that case you must - * provide the alias as the only type argument: - * - * ```ts - * import { sql } from 'kysely' - * - * const values = sql<{ a: number, b: string }>`(values (1, 'foo'))` - * - * // The alias is `t(a, b)` which specifies the column names - * // in addition to the table name. We must tell kysely that - * // columns of the table can be referenced through `t` - * // by providing an explicit type argument. - * const aliasedValues = values.as<'t'>(sql`t(a, b)`) - * - * await db - * .insertInto('person') - * .columns(['first_name', 'last_name']) - * .expression( - * db.selectFrom(aliasedValues).select(['t.a', 't.b']) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name") - * from (values (1, 'foo')) as t(a, b) - * select "t"."a", "t"."b" - * ``` - */ - as(alias: Expression): AliasedExpression; - /** - * Combines `this` and another expression using `OR`. - * - * See {@link ExpressionWrapper.or} for examples. - */ - or, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): OrWrapper; - or>(expression: E): OrWrapper; - /** - * Change the output type of the expression. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `OrWrapper` with a new output type. - */ - $castTo(): OrWrapper; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - * - * ### Examples - * - * If you are creating a custom expression, it's often easiest to use the {@link sql} - * template tag to build the node: - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - */ - toOperationNode(): ParensNode; -} -export declare class AndWrapper implements AliasableExpression { - #private; - constructor(node: AndNode); - /** @private */ - /** - * All expressions need to have this getter for complicated type-related reasons. - * Simply add this getter for your expression and always return `undefined` from it: - * - * ### Examples - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - * - * The getter is needed to make the expression assignable to another expression only - * if the types `T` are assignable. Without this property (or some other property - * that references `T`), you could assing `Expression` to `Expression`. - */ - get expressionType(): T | undefined; - /** - * Returns an aliased version of the expression. - * - * In addition to slapping `as "the_alias"` to the end of the SQL, - * this method also provides strict typing: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select(eb => - * eb('first_name', '=', 'Jennifer') - * .and('last_name', '=', 'Aniston') - * .as('is_jennifer_aniston') - * ) - * .executeTakeFirstOrThrow() - * - * // `is_jennifer_aniston: SqlBool` field exists in the result type. - * console.log(result.is_jennifer_aniston) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name" = $1 and "first_name" = $2 as "is_jennifer_aniston" - * from "person" - * ``` - */ - as(alias: A): AliasedExpression; - /** - * Returns an aliased version of the expression. - * - * ### Examples - * - * In addition to slapping `as "the_alias"` at the end of the expression, - * this method also provides strict typing: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => - * // `eb.fn` returns an AliasableExpression - * eb.fn('concat', ['first_name', eb.val(' '), 'last_name']).as('full_name') - * ) - * .executeTakeFirstOrThrow() - * - * // `full_name: string` field exists in the result type. - * console.log(result.full_name) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * concat("first_name", $1, "last_name") as "full_name" - * from - * "person" - * ``` - * - * You can also pass in a raw SQL snippet (or any expression) but in that case you must - * provide the alias as the only type argument: - * - * ```ts - * import { sql } from 'kysely' - * - * const values = sql<{ a: number, b: string }>`(values (1, 'foo'))` - * - * // The alias is `t(a, b)` which specifies the column names - * // in addition to the table name. We must tell kysely that - * // columns of the table can be referenced through `t` - * // by providing an explicit type argument. - * const aliasedValues = values.as<'t'>(sql`t(a, b)`) - * - * await db - * .insertInto('person') - * .columns(['first_name', 'last_name']) - * .expression( - * db.selectFrom(aliasedValues).select(['t.a', 't.b']) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name") - * from (values (1, 'foo')) as t(a, b) - * select "t"."a", "t"."b" - * ``` - */ - as(alias: Expression): AliasedExpression; - /** - * Combines `this` and another expression using `AND`. - * - * See {@link ExpressionWrapper.and} for examples. - */ - and, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): AndWrapper; - and>(expression: E): AndWrapper; - /** - * Change the output type of the expression. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `AndWrapper` with a new output type. - */ - $castTo(): AndWrapper; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - * - * ### Examples - * - * If you are creating a custom expression, it's often easiest to use the {@link sql} - * template tag to build the node: - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - */ - toOperationNode(): ParensNode; -} diff --git a/node_modules/kysely/dist/esm/expression/expression-wrapper.js b/node_modules/kysely/dist/esm/expression/expression-wrapper.js deleted file mode 100644 index 79a42be..0000000 --- a/node_modules/kysely/dist/esm/expression/expression-wrapper.js +++ /dev/null @@ -1,128 +0,0 @@ -/// -import { AliasNode } from '../operation-node/alias-node.js'; -import { AndNode } from '../operation-node/and-node.js'; -import { IdentifierNode } from '../operation-node/identifier-node.js'; -import { isOperationNodeSource } from '../operation-node/operation-node-source.js'; -import { OrNode } from '../operation-node/or-node.js'; -import { ParensNode } from '../operation-node/parens-node.js'; -import { parseValueBinaryOperationOrExpression, } from '../parser/binary-operation-parser.js'; -export class ExpressionWrapper { - #node; - constructor(node) { - this.#node = node; - } - /** @private */ - get expressionType() { - return undefined; - } - as(alias) { - return new AliasedExpressionWrapper(this, alias); - } - or(...args) { - return new OrWrapper(OrNode.create(this.#node, parseValueBinaryOperationOrExpression(args))); - } - and(...args) { - return new AndWrapper(AndNode.create(this.#node, parseValueBinaryOperationOrExpression(args))); - } - /** - * Change the output type of the expression. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `ExpressionWrapper` with a new output type. - */ - $castTo() { - return new ExpressionWrapper(this.#node); - } - /** - * Omit null from the expression's type. - * - * This function can be useful in cases where you know an expression can't be - * null, but Kysely is unable to infer it. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of `this` with a new output type. - */ - $notNull() { - return new ExpressionWrapper(this.#node); - } - toOperationNode() { - return this.#node; - } -} -export class AliasedExpressionWrapper { - #expr; - #alias; - constructor(expr, alias) { - this.#expr = expr; - this.#alias = alias; - } - /** @private */ - get expression() { - return this.#expr; - } - /** @private */ - get alias() { - return this.#alias; - } - toOperationNode() { - return AliasNode.create(this.#expr.toOperationNode(), isOperationNodeSource(this.#alias) - ? this.#alias.toOperationNode() - : IdentifierNode.create(this.#alias)); - } -} -export class OrWrapper { - #node; - constructor(node) { - this.#node = node; - } - /** @private */ - get expressionType() { - return undefined; - } - as(alias) { - return new AliasedExpressionWrapper(this, alias); - } - or(...args) { - return new OrWrapper(OrNode.create(this.#node, parseValueBinaryOperationOrExpression(args))); - } - /** - * Change the output type of the expression. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `OrWrapper` with a new output type. - */ - $castTo() { - return new OrWrapper(this.#node); - } - toOperationNode() { - return ParensNode.create(this.#node); - } -} -export class AndWrapper { - #node; - constructor(node) { - this.#node = node; - } - /** @private */ - get expressionType() { - return undefined; - } - as(alias) { - return new AliasedExpressionWrapper(this, alias); - } - and(...args) { - return new AndWrapper(AndNode.create(this.#node, parseValueBinaryOperationOrExpression(args))); - } - /** - * Change the output type of the expression. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `AndWrapper` with a new output type. - */ - $castTo() { - return new AndWrapper(this.#node); - } - toOperationNode() { - return ParensNode.create(this.#node); - } -} diff --git a/node_modules/kysely/dist/esm/expression/expression.d.ts b/node_modules/kysely/dist/esm/expression/expression.d.ts deleted file mode 100644 index fa2eaec..0000000 --- a/node_modules/kysely/dist/esm/expression/expression.d.ts +++ /dev/null @@ -1,198 +0,0 @@ -import type { AliasNode } from '../operation-node/alias-node.js'; -import { type OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -/** - * `Expression` represents an arbitrary SQL expression with a type. - * - * Most Kysely methods accept instances of `Expression` and most classes like `SelectQueryBuilder` - * and the return value of the {@link sql} template tag implement it. - * - * ### Examples - * - * ```ts - * import { type Expression, sql } from 'kysely' - * - * const exp1: Expression = sql`CONCAT('hello', ' ', 'world')` - * const exp2: Expression<{ first_name: string }> = db.selectFrom('person').select('first_name') - * ``` - * - * You can implement the `Expression` interface to create your own type-safe utilities for Kysely. - */ -export interface Expression extends OperationNodeSource { - /** - * All expressions need to have this getter for complicated type-related reasons. - * Simply add this getter for your expression and always return `undefined` from it: - * - * ### Examples - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - * - * The getter is needed to make the expression assignable to another expression only - * if the types `T` are assignable. Without this property (or some other property - * that references `T`), you could assing `Expression` to `Expression`. - */ - get expressionType(): T | undefined; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - * - * ### Examples - * - * If you are creating a custom expression, it's often easiest to use the {@link sql} - * template tag to build the node: - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - */ - toOperationNode(): OperationNode; -} -/** - * An expression with an `as` method. - */ -export interface AliasableExpression extends Expression { - /** - * Returns an aliased version of the expression. - * - * ### Examples - * - * In addition to slapping `as "the_alias"` at the end of the expression, - * this method also provides strict typing: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => - * // `eb.fn` returns an AliasableExpression - * eb.fn('concat', ['first_name', eb.val(' '), 'last_name']).as('full_name') - * ) - * .executeTakeFirstOrThrow() - * - * // `full_name: string` field exists in the result type. - * console.log(result.full_name) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * concat("first_name", $1, "last_name") as "full_name" - * from - * "person" - * ``` - * - * You can also pass in a raw SQL snippet (or any expression) but in that case you must - * provide the alias as the only type argument: - * - * ```ts - * import { sql } from 'kysely' - * - * const values = sql<{ a: number, b: string }>`(values (1, 'foo'))` - * - * // The alias is `t(a, b)` which specifies the column names - * // in addition to the table name. We must tell kysely that - * // columns of the table can be referenced through `t` - * // by providing an explicit type argument. - * const aliasedValues = values.as<'t'>(sql`t(a, b)`) - * - * await db - * .insertInto('person') - * .columns(['first_name', 'last_name']) - * .expression( - * db.selectFrom(aliasedValues).select(['t.a', 't.b']) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name") - * from (values (1, 'foo')) as t(a, b) - * select "t"."a", "t"."b" - * ``` - */ - as(alias: A): AliasedExpression; - as(alias: Expression): AliasedExpression; -} -/** - * A type that holds an expression and an alias for it. - * - * `AliasedExpression` can be used in places where, in addition to the value type `T`, you - * also need a name `A` for that value. For example anything you can pass into the `select` method - * needs to implement an `AliasedExpression`. `A` becomes the name of the selected expression - * in the result and `T` becomes its type. - * - * ### Examples - * - * ```ts - * import { - * AliasNode, - * type AliasedExpression, - * type Expression, - * IdentifierNode - * } from 'kysely' - * - * class SomeAliasedExpression implements AliasedExpression { - * #expression: Expression - * #alias: A - * - * constructor(expression: Expression, alias: A) { - * this.#expression = expression - * this.#alias = alias - * } - * - * get expression(): Expression { - * return this.#expression - * } - * - * get alias(): A { - * return this.#alias - * } - * - * toOperationNode(): AliasNode { - * return AliasNode.create( - * this.#expression.toOperationNode(), - * IdentifierNode.create(this.#alias) - * ) - * } - * } - * ``` - */ -export interface AliasedExpression extends OperationNodeSource { - /** - * Returns the aliased expression. - */ - get expression(): Expression; - /** - * Returns the alias. - */ - get alias(): A | Expression; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - */ - toOperationNode(): AliasNode; -} -export declare function isExpression(obj: unknown): obj is Expression; -export declare function isAliasedExpression(obj: unknown): obj is AliasedExpression; diff --git a/node_modules/kysely/dist/esm/expression/expression.js b/node_modules/kysely/dist/esm/expression/expression.js deleted file mode 100644 index f243041..0000000 --- a/node_modules/kysely/dist/esm/expression/expression.js +++ /dev/null @@ -1,12 +0,0 @@ -/// -import { isOperationNodeSource, } from '../operation-node/operation-node-source.js'; -import { isObject, isString } from '../util/object-utils.js'; -export function isExpression(obj) { - return isObject(obj) && 'expressionType' in obj && isOperationNodeSource(obj); -} -export function isAliasedExpression(obj) { - return (isObject(obj) && - 'expression' in obj && - isString(obj.alias) && - isOperationNodeSource(obj)); -} diff --git a/node_modules/kysely/dist/esm/helpers/mssql.d.ts b/node_modules/kysely/dist/esm/helpers/mssql.d.ts deleted file mode 100644 index 2c9c3c6..0000000 --- a/node_modules/kysely/dist/esm/helpers/mssql.d.ts +++ /dev/null @@ -1,212 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -import type { RawBuilder } from '../raw-builder/raw-builder.js'; -import type { ShallowDehydrateObject, ShallowDehydrateValue, Simplify } from '../util/type-utils.js'; -/** - * An MS SQL Server helper for aggregating a subquery into a JSON array. - * - * NOTE: This helper only works correctly if you've installed the `ParseJSONResultsPlugin`. - * Otherwise the nested selections will be returned as JSON strings. - * - * The plugin can be installed like this: - * - * ```ts - * import { Kysely, MssqlDialect, ParseJSONResultsPlugin } from 'kysely' - * import * as Tarn from 'tarn' - * import * as Tedious from 'tedious' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new MssqlDialect({ - * tarn: { options: { max: 10, min: 0 }, ...Tarn }, - * tedious: { - * ...Tedious, - * connectionFactory: () => new Tedious.Connection({ - * authentication: { - * options: { password: 'password', userName: 'sa' }, - * type: 'default', - * }, - * options: { database: 'test', port: 21433, trustServerCertificate: true }, - * server: 'localhost', - * }), - * }, - * }), - * plugins: [new ParseJSONResultsPlugin()] - * }) - * ``` - * - * ### Examples - * - * ```ts - * import { jsonArrayFrom } from 'kysely/helpers/mssql' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonArrayFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .orderBy('pet.name') - * .offset(0) - * ).as('pets') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.pets[0]?.pet_id - * result[0]?.pets[0]?.name - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * select "id", ( - * select coalesce((select * from ( - * select "pet"."id" as "pet_id", "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * order by "pet"."name" - * offset @1 rows - * ) as "agg" for json path, include_null_values), '[]') - * ) as "pets" - * from "person" - * ``` - */ -export declare function jsonArrayFrom(expr: Expression): RawBuilder>[]>; -/** - * An MS SQL Server helper for turning a subquery into a JSON object. - * - * The subquery must only return one row. - * - * NOTE: This helper only works correctly if you've installed the `ParseJSONResultsPlugin`. - * Otherwise the nested selections will be returned as JSON strings. - * - * The plugin can be installed like this: - * - * ```ts - * import { Kysely, MssqlDialect, ParseJSONResultsPlugin } from 'kysely' - * import * as Tarn from 'tarn' - * import * as Tedious from 'tedious' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new MssqlDialect({ - * tarn: { options: { max: 10, min: 0 }, ...Tarn }, - * tedious: { - * ...Tedious, - * connectionFactory: () => new Tedious.Connection({ - * authentication: { - * options: { password: 'password', userName: 'sa' }, - * type: 'default', - * }, - * options: { database: 'test', port: 21433, trustServerCertificate: true }, - * server: 'localhost', - * }), - * }, - * }), - * plugins: [new ParseJSONResultsPlugin()] - * }) - * ``` - * - * ### Examples - * - * ```ts - * import { jsonObjectFrom } from 'kysely/helpers/mssql' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonObjectFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('pet.is_favorite', '=', 1) - * ).as('favorite_pet') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.favorite_pet?.pet_id - * result[0]?.favorite_pet?.name - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * select "id", ( - * select * from ( - * select "pet"."id" as "pet_id", "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * and "pet"."is_favorite" = @1 - * ) as "agg" for json path, include_null_values, without_array_wrapper - * ) as "favorite_pet" - * from "person" - * ``` - */ -export declare function jsonObjectFrom(expr: Expression): RawBuilder> | null>; -/** - * The MS SQL Server `json_query` function, single argument variant. - * - * NOTE: This helper only works correctly if you've installed the `ParseJSONResultsPlugin`. - * Otherwise the nested selections will be returned as JSON strings. - * - * The plugin can be installed like this: - * - * ```ts - * import { Kysely, MssqlDialect, ParseJSONResultsPlugin } from 'kysely' - * import * as Tarn from 'tarn' - * import * as Tedious from 'tedious' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new MssqlDialect({ - * tarn: { options: { max: 10, min: 0 }, ...Tarn }, - * tedious: { - * ...Tedious, - * connectionFactory: () => new Tedious.Connection({ - * authentication: { - * options: { password: 'password', userName: 'sa' }, - * type: 'default', - * }, - * options: { database: 'test', port: 21433, trustServerCertificate: true }, - * server: 'localhost', - * }), - * }, - * }), - * plugins: [new ParseJSONResultsPlugin()] - * }) - * ``` - * - * ### Examples - * - * ```ts - * import { jsonBuildObject } from 'kysely/helpers/mssql' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonBuildObject({ - * first: eb.ref('first_name'), - * last: eb.ref('last_name'), - * full: eb.fn('concat', ['first_name', eb.val(' '), 'last_name']) - * }).as('name') - * ]) - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * select "id", json_query( - * '{"first":"'+"first_name"+',"last":"'+"last_name"+',"full":"'+concat("first_name", ' ', "last_name")+'"}' - * ) as "name" - * from "person" - * ``` - */ -export declare function jsonBuildObject>>(obj: O): RawBuilder ? ShallowDehydrateValue : never; -}>>; diff --git a/node_modules/kysely/dist/esm/helpers/mssql.js b/node_modules/kysely/dist/esm/helpers/mssql.js deleted file mode 100644 index 2a4dc58..0000000 --- a/node_modules/kysely/dist/esm/helpers/mssql.js +++ /dev/null @@ -1,215 +0,0 @@ -/// -import { sql } from '../raw-builder/sql.js'; -/** - * An MS SQL Server helper for aggregating a subquery into a JSON array. - * - * NOTE: This helper only works correctly if you've installed the `ParseJSONResultsPlugin`. - * Otherwise the nested selections will be returned as JSON strings. - * - * The plugin can be installed like this: - * - * ```ts - * import { Kysely, MssqlDialect, ParseJSONResultsPlugin } from 'kysely' - * import * as Tarn from 'tarn' - * import * as Tedious from 'tedious' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new MssqlDialect({ - * tarn: { options: { max: 10, min: 0 }, ...Tarn }, - * tedious: { - * ...Tedious, - * connectionFactory: () => new Tedious.Connection({ - * authentication: { - * options: { password: 'password', userName: 'sa' }, - * type: 'default', - * }, - * options: { database: 'test', port: 21433, trustServerCertificate: true }, - * server: 'localhost', - * }), - * }, - * }), - * plugins: [new ParseJSONResultsPlugin()] - * }) - * ``` - * - * ### Examples - * - * ```ts - * import { jsonArrayFrom } from 'kysely/helpers/mssql' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonArrayFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .orderBy('pet.name') - * .offset(0) - * ).as('pets') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.pets[0]?.pet_id - * result[0]?.pets[0]?.name - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * select "id", ( - * select coalesce((select * from ( - * select "pet"."id" as "pet_id", "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * order by "pet"."name" - * offset @1 rows - * ) as "agg" for json path, include_null_values), '[]') - * ) as "pets" - * from "person" - * ``` - */ -export function jsonArrayFrom(expr) { - return sql `coalesce((select * from ${expr} as agg for json path, include_null_values), '[]')`; -} -/** - * An MS SQL Server helper for turning a subquery into a JSON object. - * - * The subquery must only return one row. - * - * NOTE: This helper only works correctly if you've installed the `ParseJSONResultsPlugin`. - * Otherwise the nested selections will be returned as JSON strings. - * - * The plugin can be installed like this: - * - * ```ts - * import { Kysely, MssqlDialect, ParseJSONResultsPlugin } from 'kysely' - * import * as Tarn from 'tarn' - * import * as Tedious from 'tedious' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new MssqlDialect({ - * tarn: { options: { max: 10, min: 0 }, ...Tarn }, - * tedious: { - * ...Tedious, - * connectionFactory: () => new Tedious.Connection({ - * authentication: { - * options: { password: 'password', userName: 'sa' }, - * type: 'default', - * }, - * options: { database: 'test', port: 21433, trustServerCertificate: true }, - * server: 'localhost', - * }), - * }, - * }), - * plugins: [new ParseJSONResultsPlugin()] - * }) - * ``` - * - * ### Examples - * - * ```ts - * import { jsonObjectFrom } from 'kysely/helpers/mssql' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonObjectFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('pet.is_favorite', '=', 1) - * ).as('favorite_pet') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.favorite_pet?.pet_id - * result[0]?.favorite_pet?.name - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * select "id", ( - * select * from ( - * select "pet"."id" as "pet_id", "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * and "pet"."is_favorite" = @1 - * ) as "agg" for json path, include_null_values, without_array_wrapper - * ) as "favorite_pet" - * from "person" - * ``` - */ -export function jsonObjectFrom(expr) { - return sql `(select * from ${expr} as agg for json path, include_null_values, without_array_wrapper)`; -} -/** - * The MS SQL Server `json_query` function, single argument variant. - * - * NOTE: This helper only works correctly if you've installed the `ParseJSONResultsPlugin`. - * Otherwise the nested selections will be returned as JSON strings. - * - * The plugin can be installed like this: - * - * ```ts - * import { Kysely, MssqlDialect, ParseJSONResultsPlugin } from 'kysely' - * import * as Tarn from 'tarn' - * import * as Tedious from 'tedious' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new MssqlDialect({ - * tarn: { options: { max: 10, min: 0 }, ...Tarn }, - * tedious: { - * ...Tedious, - * connectionFactory: () => new Tedious.Connection({ - * authentication: { - * options: { password: 'password', userName: 'sa' }, - * type: 'default', - * }, - * options: { database: 'test', port: 21433, trustServerCertificate: true }, - * server: 'localhost', - * }), - * }, - * }), - * plugins: [new ParseJSONResultsPlugin()] - * }) - * ``` - * - * ### Examples - * - * ```ts - * import { jsonBuildObject } from 'kysely/helpers/mssql' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonBuildObject({ - * first: eb.ref('first_name'), - * last: eb.ref('last_name'), - * full: eb.fn('concat', ['first_name', eb.val(' '), 'last_name']) - * }).as('name') - * ]) - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * select "id", json_query( - * '{"first":"'+"first_name"+',"last":"'+"last_name"+',"full":"'+concat("first_name", ' ', "last_name")+'"}' - * ) as "name" - * from "person" - * ``` - */ -export function jsonBuildObject(obj) { - return sql `json_query('{${sql.join(Object.keys(obj).map((k) => sql `"${sql.raw(k)}":"'+${obj[k]}+'"`), sql `,`)}}')`; -} diff --git a/node_modules/kysely/dist/esm/helpers/mysql.d.ts b/node_modules/kysely/dist/esm/helpers/mysql.d.ts deleted file mode 100644 index 009dba1..0000000 --- a/node_modules/kysely/dist/esm/helpers/mysql.d.ts +++ /dev/null @@ -1,147 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -import type { SelectQueryBuilderExpression } from '../query-builder/select-query-builder-expression.js'; -import type { RawBuilder } from '../raw-builder/raw-builder.js'; -import type { ShallowDehydrateObject, ShallowDehydrateValue, Simplify } from '../util/type-utils.js'; -/** - * A MySQL helper for aggregating a subquery into a JSON array. - * - * NOTE: This helper is only guaranteed to fully work with the built-in `MysqlDialect`. - * While the produced SQL is compatible with all MySQL databases, some third-party dialects - * may not parse the nested JSON into arrays. In these cases you can use the built in - * `ParseJSONResultsPlugin` to parse the results. - * - * ### Examples - * - * ```ts - * import { jsonArrayFrom } from 'kysely/helpers/mysql' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonArrayFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .orderBy('pet.name') - * ).as('pets') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.pets[0]?.pet_id - * result[0]?.pets[0]?.name - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select `id`, ( - * select cast(coalesce(json_arrayagg(json_object( - * 'pet_id', `agg`.`pet_id`, - * 'name', `agg`.`name` - * )), '[]') as json) from ( - * select `pet`.`id` as `pet_id`, `pet`.`name` - * from `pet` - * where `pet`.`owner_id` = `person`.`id` - * order by `pet`.`name` - * ) as `agg` - * ) as `pets` - * from `person` - * ``` - */ -export declare function jsonArrayFrom(expr: SelectQueryBuilderExpression): RawBuilder>[]>; -/** - * A MySQL helper for turning a subquery into a JSON object. - * - * The subquery must only return one row. - * - * NOTE: This helper is only guaranteed to fully work with the built-in `MysqlDialect`. - * While the produced SQL is compatible with all MySQL databases, some third-party dialects - * may not parse the nested JSON into objects. In these cases you can use the built in - * `ParseJSONResultsPlugin` to parse the results. - * - * ### Examples - * - * ```ts - * import { jsonObjectFrom } from 'kysely/helpers/mysql' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonObjectFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('pet.is_favorite', '=', true) - * ).as('favorite_pet') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.favorite_pet?.pet_id - * result[0]?.favorite_pet?.name - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select `id`, ( - * select json_object( - * 'pet_id', `obj`.`pet_id`, - * 'name', `obj`.`name` - * ) from ( - * select `pet`.`id` as `pet_id`, `pet`.`name` - * from `pet` - * where `pet`.`owner_id` = `person`.`id` - * and `pet`.`is_favorite` = ? - * ) as obj - * ) as `favorite_pet` - * from `person` - * ``` - */ -export declare function jsonObjectFrom(expr: SelectQueryBuilderExpression): RawBuilder> | null>; -/** - * The MySQL `json_object` function. - * - * NOTE: This helper is only guaranteed to fully work with the built-in `MysqlDialect`. - * While the produced SQL is compatible with all MySQL databases, some third-party dialects - * may not parse the nested JSON into objects. In these cases you can use the built in - * `ParseJSONResultsPlugin` to parse the results. - * - * ### Examples - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonBuildObject({ - * first: eb.ref('first_name'), - * last: eb.ref('last_name'), - * full: eb.fn('concat', ['first_name', eb.val(' '), 'last_name']) - * }).as('name') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.name.first - * result[0]?.name.last - * result[0]?.name.full - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select "id", json_object( - * 'first', first_name, - * 'last', last_name, - * 'full', concat(`first_name`, ?, `last_name`) - * ) as "name" - * from "person" - * ``` - */ -export declare function jsonBuildObject>>(obj: O): RawBuilder ? ShallowDehydrateValue : never; -}>>; diff --git a/node_modules/kysely/dist/esm/helpers/mysql.js b/node_modules/kysely/dist/esm/helpers/mysql.js deleted file mode 100644 index 6041d2e..0000000 --- a/node_modules/kysely/dist/esm/helpers/mysql.js +++ /dev/null @@ -1,158 +0,0 @@ -/// -import { sql } from '../raw-builder/sql.js'; -import { getJsonObjectArgs } from '../util/json-object-args.js'; -/** - * A MySQL helper for aggregating a subquery into a JSON array. - * - * NOTE: This helper is only guaranteed to fully work with the built-in `MysqlDialect`. - * While the produced SQL is compatible with all MySQL databases, some third-party dialects - * may not parse the nested JSON into arrays. In these cases you can use the built in - * `ParseJSONResultsPlugin` to parse the results. - * - * ### Examples - * - * ```ts - * import { jsonArrayFrom } from 'kysely/helpers/mysql' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonArrayFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .orderBy('pet.name') - * ).as('pets') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.pets[0]?.pet_id - * result[0]?.pets[0]?.name - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select `id`, ( - * select cast(coalesce(json_arrayagg(json_object( - * 'pet_id', `agg`.`pet_id`, - * 'name', `agg`.`name` - * )), '[]') as json) from ( - * select `pet`.`id` as `pet_id`, `pet`.`name` - * from `pet` - * where `pet`.`owner_id` = `person`.`id` - * order by `pet`.`name` - * ) as `agg` - * ) as `pets` - * from `person` - * ``` - */ -export function jsonArrayFrom(expr) { - return sql `(select cast(coalesce(json_arrayagg(json_object(${sql.join(getMysqlJsonObjectArgs(expr.toOperationNode(), 'agg'))})), '[]') as json) from ${expr} as agg)`; -} -/** - * A MySQL helper for turning a subquery into a JSON object. - * - * The subquery must only return one row. - * - * NOTE: This helper is only guaranteed to fully work with the built-in `MysqlDialect`. - * While the produced SQL is compatible with all MySQL databases, some third-party dialects - * may not parse the nested JSON into objects. In these cases you can use the built in - * `ParseJSONResultsPlugin` to parse the results. - * - * ### Examples - * - * ```ts - * import { jsonObjectFrom } from 'kysely/helpers/mysql' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonObjectFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('pet.is_favorite', '=', true) - * ).as('favorite_pet') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.favorite_pet?.pet_id - * result[0]?.favorite_pet?.name - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select `id`, ( - * select json_object( - * 'pet_id', `obj`.`pet_id`, - * 'name', `obj`.`name` - * ) from ( - * select `pet`.`id` as `pet_id`, `pet`.`name` - * from `pet` - * where `pet`.`owner_id` = `person`.`id` - * and `pet`.`is_favorite` = ? - * ) as obj - * ) as `favorite_pet` - * from `person` - * ``` - */ -export function jsonObjectFrom(expr) { - return sql `(select json_object(${sql.join(getMysqlJsonObjectArgs(expr.toOperationNode(), 'obj'))}) from ${expr} as obj)`; -} -/** - * The MySQL `json_object` function. - * - * NOTE: This helper is only guaranteed to fully work with the built-in `MysqlDialect`. - * While the produced SQL is compatible with all MySQL databases, some third-party dialects - * may not parse the nested JSON into objects. In these cases you can use the built in - * `ParseJSONResultsPlugin` to parse the results. - * - * ### Examples - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonBuildObject({ - * first: eb.ref('first_name'), - * last: eb.ref('last_name'), - * full: eb.fn('concat', ['first_name', eb.val(' '), 'last_name']) - * }).as('name') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.name.first - * result[0]?.name.last - * result[0]?.name.full - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select "id", json_object( - * 'first', first_name, - * 'last', last_name, - * 'full', concat(`first_name`, ?, `last_name`) - * ) as "name" - * from "person" - * ``` - */ -export function jsonBuildObject(obj) { - return sql `json_object(${sql.join(Object.keys(obj).flatMap((k) => [sql.lit(k), obj[k]]))})`; -} -function getMysqlJsonObjectArgs(node, table) { - try { - return getJsonObjectArgs(node, table); - } - catch { - throw new Error('MySQL jsonArrayFrom and jsonObjectFrom functions can only handle explicit selections due to limitations of the json_object function. selectAll() is not allowed in the subquery.'); - } -} diff --git a/node_modules/kysely/dist/esm/helpers/postgres.d.ts b/node_modules/kysely/dist/esm/helpers/postgres.d.ts deleted file mode 100644 index 5d2d7ef..0000000 --- a/node_modules/kysely/dist/esm/helpers/postgres.d.ts +++ /dev/null @@ -1,199 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -import type { RawBuilder } from '../raw-builder/raw-builder.js'; -import type { ShallowDehydrateValue, ShallowDehydrateObject, Simplify } from '../util/type-utils.js'; -/** - * A postgres helper for aggregating a subquery (or other expression) into a JSONB array. - * - * ### Examples - * - * - * - * While kysely is not an ORM and it doesn't have the concept of relations, we do provide - * helpers for fetching nested objects and arrays in a single query. In this example we - * use the `jsonArrayFrom` helper to fetch person's pets along with the person's id. - * - * Please keep in mind that the helpers under the `kysely/helpers` folder, including - * `jsonArrayFrom`, are not guaranteed to work with third party dialects. In order for - * them to work, the dialect must automatically parse the `json` data type into - * JavaScript JSON values like objects and arrays. Some dialects might simply return - * the data as a JSON string. In these cases you can use the built in `ParseJSONResultsPlugin` - * to parse the results. - * - * ```ts - * import { jsonArrayFrom } from 'kysely/helpers/postgres' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonArrayFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .orderBy('pet.name') - * ).as('pets') - * ]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", ( - * select coalesce(json_agg(agg), '[]') from ( - * select "pet"."id" as "pet_id", "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * order by "pet"."name" - * ) as agg - * ) as "pets" - * from "person" - * ``` - */ -export declare function jsonArrayFrom(expr: Expression): RawBuilder>[]>; -/** - * A postgres helper for turning a subquery (or other expression) into a JSON object. - * - * The subquery must only return one row. - * - * ### Examples - * - * - * - * While kysely is not an ORM and it doesn't have the concept of relations, we do provide - * helpers for fetching nested objects and arrays in a single query. In this example we - * use the `jsonObjectFrom` helper to fetch person's favorite pet along with the person's id. - * - * Please keep in mind that the helpers under the `kysely/helpers` folder, including - * `jsonObjectFrom`, are not guaranteed to work with third-party dialects. In order for - * them to work, the dialect must automatically parse the `json` data type into - * JavaScript JSON values like objects and arrays. Some dialects might simply return - * the data as a JSON string. In these cases you can use the built in `ParseJSONResultsPlugin` - * to parse the results. - * - * ```ts - * import { jsonObjectFrom } from 'kysely/helpers/postgres' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonObjectFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('pet.is_favorite', '=', true) - * ).as('favorite_pet') - * ]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", ( - * select to_json(obj) from ( - * select "pet"."id" as "pet_id", "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * and "pet"."is_favorite" = $1 - * ) as obj - * ) as "favorite_pet" - * from "person" - * ``` - */ -export declare function jsonObjectFrom(expr: Expression): RawBuilder> | null>; -/** - * The PostgreSQL `json_build_object` function. - * - * NOTE: This helper is only guaranteed to fully work with the built-in `PostgresDialect`. - * While the produced SQL is compatible with all PostgreSQL databases, some third-party dialects - * may not parse the nested JSON into objects. In these cases you can use the built in - * `ParseJSONResultsPlugin` to parse the results. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * import { jsonBuildObject } from 'kysely/helpers/postgres' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonBuildObject({ - * first: eb.ref('first_name'), - * last: eb.ref('last_name'), - * full: sql`first_name || ' ' || last_name` - * }).as('name') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.name.first - * result[0]?.name.last - * result[0]?.name.full - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", json_build_object( - * 'first', first_name, - * 'last', last_name, - * 'full', first_name || ' ' || last_name - * ) as "name" - * from "person" - * ``` - */ -export declare function jsonBuildObject>>(obj: O): RawBuilder ? ShallowDehydrateValue : never; -}>>; -export type MergeAction = 'INSERT' | 'UPDATE' | 'DELETE'; -/** - * The PostgreSQL `merge_action` function. - * - * This function can be used in a `returning` clause to get the action that was - * performed in a `mergeInto` query. The function returns one of the following - * strings: `'INSERT'`, `'UPDATE'`, or `'DELETE'`. - * - * ### Examples - * - * ```ts - * import { mergeAction } from 'kysely/helpers/postgres' - * - * const result = await db - * .mergeInto('person as p') - * .using('person_backup as pb', 'p.id', 'pb.id') - * .whenMatched() - * .thenUpdateSet(({ ref }) => ({ - * first_name: ref('pb.first_name'), - * updated_at: ref('pb.updated_at').$castTo(), - * })) - * .whenNotMatched() - * .thenInsertValues(({ ref}) => ({ - * id: ref('pb.id'), - * first_name: ref('pb.first_name'), - * created_at: ref('pb.updated_at'), - * updated_at: ref('pb.updated_at').$castTo(), - * })) - * .returning([mergeAction().as('action'), 'p.id', 'p.updated_at']) - * .execute() - * - * result[0].action - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" as "p" - * using "person_backup" as "pb" on "p"."id" = "pb"."id" - * when matched then update set - * "first_name" = "pb"."first_name", - * "updated_at" = "pb"."updated_at"::text - * when not matched then insert values ("id", "first_name", "created_at", "updated_at") - * values ("pb"."id", "pb"."first_name", "pb"."updated_at", "pb"."updated_at") - * returning merge_action() as "action", "p"."id", "p"."updated_at" - * ``` - */ -export declare function mergeAction(): RawBuilder; diff --git a/node_modules/kysely/dist/esm/helpers/postgres.js b/node_modules/kysely/dist/esm/helpers/postgres.js deleted file mode 100644 index 3266398..0000000 --- a/node_modules/kysely/dist/esm/helpers/postgres.js +++ /dev/null @@ -1,203 +0,0 @@ -/// -import { sql } from '../raw-builder/sql.js'; -/** - * A postgres helper for aggregating a subquery (or other expression) into a JSONB array. - * - * ### Examples - * - * - * - * While kysely is not an ORM and it doesn't have the concept of relations, we do provide - * helpers for fetching nested objects and arrays in a single query. In this example we - * use the `jsonArrayFrom` helper to fetch person's pets along with the person's id. - * - * Please keep in mind that the helpers under the `kysely/helpers` folder, including - * `jsonArrayFrom`, are not guaranteed to work with third party dialects. In order for - * them to work, the dialect must automatically parse the `json` data type into - * JavaScript JSON values like objects and arrays. Some dialects might simply return - * the data as a JSON string. In these cases you can use the built in `ParseJSONResultsPlugin` - * to parse the results. - * - * ```ts - * import { jsonArrayFrom } from 'kysely/helpers/postgres' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonArrayFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .orderBy('pet.name') - * ).as('pets') - * ]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", ( - * select coalesce(json_agg(agg), '[]') from ( - * select "pet"."id" as "pet_id", "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * order by "pet"."name" - * ) as agg - * ) as "pets" - * from "person" - * ``` - */ -export function jsonArrayFrom(expr) { - return sql `(select coalesce(json_agg(agg), '[]') from ${expr} as agg)`; -} -/** - * A postgres helper for turning a subquery (or other expression) into a JSON object. - * - * The subquery must only return one row. - * - * ### Examples - * - * - * - * While kysely is not an ORM and it doesn't have the concept of relations, we do provide - * helpers for fetching nested objects and arrays in a single query. In this example we - * use the `jsonObjectFrom` helper to fetch person's favorite pet along with the person's id. - * - * Please keep in mind that the helpers under the `kysely/helpers` folder, including - * `jsonObjectFrom`, are not guaranteed to work with third-party dialects. In order for - * them to work, the dialect must automatically parse the `json` data type into - * JavaScript JSON values like objects and arrays. Some dialects might simply return - * the data as a JSON string. In these cases you can use the built in `ParseJSONResultsPlugin` - * to parse the results. - * - * ```ts - * import { jsonObjectFrom } from 'kysely/helpers/postgres' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonObjectFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('pet.is_favorite', '=', true) - * ).as('favorite_pet') - * ]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", ( - * select to_json(obj) from ( - * select "pet"."id" as "pet_id", "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * and "pet"."is_favorite" = $1 - * ) as obj - * ) as "favorite_pet" - * from "person" - * ``` - */ -export function jsonObjectFrom(expr) { - return sql `(select to_json(obj) from ${expr} as obj)`; -} -/** - * The PostgreSQL `json_build_object` function. - * - * NOTE: This helper is only guaranteed to fully work with the built-in `PostgresDialect`. - * While the produced SQL is compatible with all PostgreSQL databases, some third-party dialects - * may not parse the nested JSON into objects. In these cases you can use the built in - * `ParseJSONResultsPlugin` to parse the results. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * import { jsonBuildObject } from 'kysely/helpers/postgres' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonBuildObject({ - * first: eb.ref('first_name'), - * last: eb.ref('last_name'), - * full: sql`first_name || ' ' || last_name` - * }).as('name') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.name.first - * result[0]?.name.last - * result[0]?.name.full - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", json_build_object( - * 'first', first_name, - * 'last', last_name, - * 'full', first_name || ' ' || last_name - * ) as "name" - * from "person" - * ``` - */ -export function jsonBuildObject(obj) { - return sql `json_build_object(${sql.join(Object.keys(obj).flatMap((k) => [sql.lit(k), obj[k]]))})`; -} -/** - * The PostgreSQL `merge_action` function. - * - * This function can be used in a `returning` clause to get the action that was - * performed in a `mergeInto` query. The function returns one of the following - * strings: `'INSERT'`, `'UPDATE'`, or `'DELETE'`. - * - * ### Examples - * - * ```ts - * import { mergeAction } from 'kysely/helpers/postgres' - * - * const result = await db - * .mergeInto('person as p') - * .using('person_backup as pb', 'p.id', 'pb.id') - * .whenMatched() - * .thenUpdateSet(({ ref }) => ({ - * first_name: ref('pb.first_name'), - * updated_at: ref('pb.updated_at').$castTo(), - * })) - * .whenNotMatched() - * .thenInsertValues(({ ref}) => ({ - * id: ref('pb.id'), - * first_name: ref('pb.first_name'), - * created_at: ref('pb.updated_at'), - * updated_at: ref('pb.updated_at').$castTo(), - * })) - * .returning([mergeAction().as('action'), 'p.id', 'p.updated_at']) - * .execute() - * - * result[0].action - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" as "p" - * using "person_backup" as "pb" on "p"."id" = "pb"."id" - * when matched then update set - * "first_name" = "pb"."first_name", - * "updated_at" = "pb"."updated_at"::text - * when not matched then insert values ("id", "first_name", "created_at", "updated_at") - * values ("pb"."id", "pb"."first_name", "pb"."updated_at", "pb"."updated_at") - * returning merge_action() as "action", "p"."id", "p"."updated_at" - * ``` - */ -export function mergeAction() { - return sql `merge_action()`; -} diff --git a/node_modules/kysely/dist/esm/helpers/sqlite.d.ts b/node_modules/kysely/dist/esm/helpers/sqlite.d.ts deleted file mode 100644 index c7fe474..0000000 --- a/node_modules/kysely/dist/esm/helpers/sqlite.d.ts +++ /dev/null @@ -1,189 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -import type { SelectQueryBuilderExpression } from '../query-builder/select-query-builder-expression.js'; -import type { RawBuilder } from '../raw-builder/raw-builder.js'; -import type { ShallowDehydrateObject, ShallowDehydrateValue, Simplify } from '../util/type-utils.js'; -/** - * A SQLite helper for aggregating a subquery into a JSON array. - * - * NOTE: This helper only works correctly if you've installed the `ParseJSONResultsPlugin`. - * Otherwise the nested selections will be returned as JSON strings. - * - * The plugin can be installed like this: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { Kysely, ParseJSONResultsPlugin, SqliteDialect } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:') - * }), - * plugins: [new ParseJSONResultsPlugin()] - * }) - * ``` - * - * ### Examples - * - * ```ts - * import { jsonArrayFrom } from 'kysely/helpers/sqlite' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonArrayFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .orderBy('pet.name') - * ).as('pets') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.pets[0].pet_id - * result[0]?.pets[0].name - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select "id", ( - * select coalesce(json_group_array(json_object( - * 'pet_id', "agg"."pet_id", - * 'name', "agg"."name" - * )), '[]') from ( - * select "pet"."id" as "pet_id", "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * order by "pet"."name" - * ) as "agg" - * ) as "pets" - * from "person" - * ``` - */ -export declare function jsonArrayFrom(expr: SelectQueryBuilderExpression): RawBuilder>[]>; -/** - * A SQLite helper for turning a subquery into a JSON object. - * - * The subquery must only return one row. - * - * NOTE: This helper only works correctly if you've installed the `ParseJSONResultsPlugin`. - * Otherwise the nested selections will be returned as JSON strings. - * - * The plugin can be installed like this: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { Kysely, ParseJSONResultsPlugin, SqliteDialect } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:') - * }), - * plugins: [new ParseJSONResultsPlugin()] - * }) - * ``` - * - * ### Examples - * - * ```ts - * import { jsonObjectFrom } from 'kysely/helpers/sqlite' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonObjectFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('pet.is_favorite', '=', true) - * ).as('favorite_pet') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.favorite_pet?.pet_id - * result[0]?.favorite_pet?.name - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select "id", ( - * select json_object( - * 'pet_id', "obj"."pet_id", - * 'name', "obj"."name" - * ) from ( - * select "pet"."id" as "pet_id", "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * and "pet"."is_favorite" = ? - * ) as obj - * ) as "favorite_pet" - * from "person"; - * ``` - */ -export declare function jsonObjectFrom(expr: SelectQueryBuilderExpression): RawBuilder> | null>; -/** - * The SQLite `json_object` function. - * - * NOTE: This helper only works correctly if you've installed the `ParseJSONResultsPlugin`. - * Otherwise the nested selections will be returned as JSON strings. - * - * The plugin can be installed like this: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { Kysely, ParseJSONResultsPlugin, SqliteDialect } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:') - * }), - * plugins: [new ParseJSONResultsPlugin()] - * }) - * ``` - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * import { jsonBuildObject } from 'kysely/helpers/sqlite' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonBuildObject({ - * first: eb.ref('first_name'), - * last: eb.ref('last_name'), - * full: sql`first_name || ' ' || last_name` - * }).as('name') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.name.first - * result[0]?.name.last - * result[0]?.name.full - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select "id", json_object( - * 'first', first_name, - * 'last', last_name, - * 'full', "first_name" || ' ' || "last_name" - * ) as "name" - * from "person" - * ``` - */ -export declare function jsonBuildObject>>(obj: O): RawBuilder ? ShallowDehydrateValue : never; -}>>; diff --git a/node_modules/kysely/dist/esm/helpers/sqlite.js b/node_modules/kysely/dist/esm/helpers/sqlite.js deleted file mode 100644 index fc450cb..0000000 --- a/node_modules/kysely/dist/esm/helpers/sqlite.js +++ /dev/null @@ -1,200 +0,0 @@ -/// -import { sql } from '../raw-builder/sql.js'; -import { getJsonObjectArgs } from '../util/json-object-args.js'; -/** - * A SQLite helper for aggregating a subquery into a JSON array. - * - * NOTE: This helper only works correctly if you've installed the `ParseJSONResultsPlugin`. - * Otherwise the nested selections will be returned as JSON strings. - * - * The plugin can be installed like this: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { Kysely, ParseJSONResultsPlugin, SqliteDialect } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:') - * }), - * plugins: [new ParseJSONResultsPlugin()] - * }) - * ``` - * - * ### Examples - * - * ```ts - * import { jsonArrayFrom } from 'kysely/helpers/sqlite' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonArrayFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .orderBy('pet.name') - * ).as('pets') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.pets[0].pet_id - * result[0]?.pets[0].name - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select "id", ( - * select coalesce(json_group_array(json_object( - * 'pet_id', "agg"."pet_id", - * 'name', "agg"."name" - * )), '[]') from ( - * select "pet"."id" as "pet_id", "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * order by "pet"."name" - * ) as "agg" - * ) as "pets" - * from "person" - * ``` - */ -export function jsonArrayFrom(expr) { - return sql `(select coalesce(json_group_array(json_object(${sql.join(getSqliteJsonObjectArgs(expr.toOperationNode(), 'agg'))})), '[]') from ${expr} as agg)`; -} -/** - * A SQLite helper for turning a subquery into a JSON object. - * - * The subquery must only return one row. - * - * NOTE: This helper only works correctly if you've installed the `ParseJSONResultsPlugin`. - * Otherwise the nested selections will be returned as JSON strings. - * - * The plugin can be installed like this: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { Kysely, ParseJSONResultsPlugin, SqliteDialect } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:') - * }), - * plugins: [new ParseJSONResultsPlugin()] - * }) - * ``` - * - * ### Examples - * - * ```ts - * import { jsonObjectFrom } from 'kysely/helpers/sqlite' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonObjectFrom( - * eb.selectFrom('pet') - * .select(['pet.id as pet_id', 'pet.name']) - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('pet.is_favorite', '=', true) - * ).as('favorite_pet') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.favorite_pet?.pet_id - * result[0]?.favorite_pet?.name - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select "id", ( - * select json_object( - * 'pet_id', "obj"."pet_id", - * 'name', "obj"."name" - * ) from ( - * select "pet"."id" as "pet_id", "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * and "pet"."is_favorite" = ? - * ) as obj - * ) as "favorite_pet" - * from "person"; - * ``` - */ -export function jsonObjectFrom(expr) { - return sql `(select json_object(${sql.join(getSqliteJsonObjectArgs(expr.toOperationNode(), 'obj'))}) from ${expr} as obj)`; -} -/** - * The SQLite `json_object` function. - * - * NOTE: This helper only works correctly if you've installed the `ParseJSONResultsPlugin`. - * Otherwise the nested selections will be returned as JSON strings. - * - * The plugin can be installed like this: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { Kysely, ParseJSONResultsPlugin, SqliteDialect } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:') - * }), - * plugins: [new ParseJSONResultsPlugin()] - * }) - * ``` - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * import { jsonBuildObject } from 'kysely/helpers/sqlite' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * jsonBuildObject({ - * first: eb.ref('first_name'), - * last: eb.ref('last_name'), - * full: sql`first_name || ' ' || last_name` - * }).as('name') - * ]) - * .execute() - * - * result[0]?.id - * result[0]?.name.first - * result[0]?.name.last - * result[0]?.name.full - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select "id", json_object( - * 'first', first_name, - * 'last', last_name, - * 'full', "first_name" || ' ' || "last_name" - * ) as "name" - * from "person" - * ``` - */ -export function jsonBuildObject(obj) { - return sql `json_object(${sql.join(Object.keys(obj).flatMap((k) => [sql.lit(k), obj[k]]))})`; -} -function getSqliteJsonObjectArgs(node, table) { - try { - return getJsonObjectArgs(node, table); - } - catch { - throw new Error('SQLite jsonArrayFrom and jsonObjectFrom functions can only handle explicit selections due to limitations of the json_object function. selectAll() is not allowed in the subquery.'); - } -} diff --git a/node_modules/kysely/dist/esm/index.d.ts b/node_modules/kysely/dist/esm/index.d.ts deleted file mode 100644 index 224e419..0000000 --- a/node_modules/kysely/dist/esm/index.d.ts +++ /dev/null @@ -1,226 +0,0 @@ -export * from './kysely.js'; -export * from './query-creator.js'; -export * from './expression/expression.js'; -export { type ExpressionBuilder, expressionBuilder, } from './expression/expression-builder.js'; -export * from './expression/expression-wrapper.js'; -export * from './query-builder/where-interface.js'; -export * from './query-builder/returning-interface.js'; -export * from './query-builder/output-interface.js'; -export * from './query-builder/having-interface.js'; -export * from './query-builder/order-by-interface.js'; -export * from './query-builder/select-query-builder.js'; -export * from './query-builder/insert-query-builder.js'; -export * from './query-builder/update-query-builder.js'; -export * from './query-builder/delete-query-builder.js'; -export * from './query-builder/no-result-error.js'; -export * from './query-builder/join-builder.js'; -export * from './query-builder/function-module.js'; -export * from './query-builder/insert-result.js'; -export * from './query-builder/delete-result.js'; -export * from './query-builder/update-result.js'; -export * from './query-builder/on-conflict-builder.js'; -export * from './query-builder/aggregate-function-builder.js'; -export * from './query-builder/case-builder.js'; -export * from './query-builder/json-path-builder.js'; -export * from './query-builder/merge-query-builder.js'; -export * from './query-builder/merge-result.js'; -export * from './query-builder/order-by-item-builder.js'; -export * from './raw-builder/raw-builder.js'; -export * from './raw-builder/sql.js'; -export * from './query-executor/query-executor.js'; -export * from './query-executor/default-query-executor.js'; -export * from './query-executor/noop-query-executor.js'; -export * from './query-executor/query-executor-provider.js'; -export * from './query-compiler/default-query-compiler.js'; -export * from './query-compiler/compiled-query.js'; -export * from './schema/schema.js'; -export * from './schema/create-table-builder.js'; -export * from './schema/create-type-builder.js'; -export * from './schema/drop-table-builder.js'; -export * from './schema/drop-type-builder.js'; -export * from './schema/create-index-builder.js'; -export * from './schema/drop-index-builder.js'; -export * from './schema/create-schema-builder.js'; -export * from './schema/drop-schema-builder.js'; -export * from './schema/column-definition-builder.js'; -export * from './schema/foreign-key-constraint-builder.js'; -export * from './schema/alter-table-builder.js'; -export * from './schema/create-view-builder.js'; -export * from './schema/refresh-materialized-view-builder.js'; -export * from './schema/drop-view-builder.js'; -export * from './schema/alter-column-builder.js'; -export * from './dynamic/dynamic.js'; -export * from './dynamic/dynamic-reference-builder.js'; -export * from './dynamic/dynamic-table-builder.js'; -export * from './driver/driver.js'; -export * from './driver/database-connection.js'; -export * from './driver/connection-provider.js'; -export * from './driver/default-connection-provider.js'; -export * from './driver/single-connection-provider.js'; -export * from './driver/dummy-driver.js'; -export * from './dialect/dialect.js'; -export * from './dialect/dialect-adapter.js'; -export * from './dialect/dialect-adapter-base.js'; -export * from './dialect/database-introspector.js'; -export * from './dialect/sqlite/sqlite-dialect.js'; -export * from './dialect/sqlite/sqlite-dialect-config.js'; -export * from './dialect/sqlite/sqlite-driver.js'; -export * from './dialect/postgres/postgres-query-compiler.js'; -export * from './dialect/postgres/postgres-introspector.js'; -export * from './dialect/postgres/postgres-adapter.js'; -export * from './dialect/mysql/mysql-dialect.js'; -export * from './dialect/mysql/mysql-dialect-config.js'; -export * from './dialect/mysql/mysql-driver.js'; -export * from './dialect/mysql/mysql-query-compiler.js'; -export * from './dialect/mysql/mysql-introspector.js'; -export * from './dialect/mysql/mysql-adapter.js'; -export * from './dialect/postgres/postgres-driver.js'; -export * from './dialect/postgres/postgres-dialect-config.js'; -export * from './dialect/postgres/postgres-dialect.js'; -export * from './dialect/sqlite/sqlite-query-compiler.js'; -export * from './dialect/sqlite/sqlite-introspector.js'; -export * from './dialect/sqlite/sqlite-adapter.js'; -export * from './dialect/mssql/mssql-adapter.js'; -export * from './dialect/mssql/mssql-dialect-config.js'; -export * from './dialect/mssql/mssql-dialect.js'; -export * from './dialect/mssql/mssql-driver.js'; -export * from './dialect/mssql/mssql-introspector.js'; -export * from './dialect/mssql/mssql-query-compiler.js'; -export * from './query-compiler/default-query-compiler.js'; -export * from './query-compiler/query-compiler.js'; -export * from './migration/migrator.js'; -export * from './migration/file-migration-provider.js'; -export * from './plugin/kysely-plugin.js'; -export * from './plugin/camel-case/camel-case-plugin.js'; -export * from './plugin/deduplicate-joins/deduplicate-joins-plugin.js'; -export * from './plugin/with-schema/with-schema-plugin.js'; -export * from './plugin/parse-json-results/parse-json-results-plugin.js'; -export * from './plugin/handle-empty-in-lists/handle-empty-in-lists-plugin.js'; -export * from './plugin/handle-empty-in-lists/handle-empty-in-lists.js'; -export * from './operation-node/add-column-node.js'; -export * from './operation-node/add-constraint-node.js'; -export * from './operation-node/add-index-node.js'; -export * from './operation-node/aggregate-function-node.js'; -export * from './operation-node/alias-node.js'; -export * from './operation-node/alter-column-node.js'; -export * from './operation-node/alter-table-node.js'; -export * from './operation-node/and-node.js'; -export * from './operation-node/binary-operation-node.js'; -export * from './operation-node/case-node.js'; -export * from './operation-node/cast-node.js'; -export * from './operation-node/check-constraint-node.js'; -export * from './operation-node/collate-node.js'; -export * from './operation-node/column-definition-node.js'; -export * from './operation-node/column-node.js'; -export * from './operation-node/column-update-node.js'; -export * from './operation-node/common-table-expression-name-node.js'; -export * from './operation-node/common-table-expression-node.js'; -export * from './operation-node/constraint-node.js'; -export * from './operation-node/create-index-node.js'; -export * from './operation-node/create-schema-node.js'; -export * from './operation-node/create-table-node.js'; -export * from './operation-node/create-type-node.js'; -export * from './operation-node/create-view-node.js'; -export * from './operation-node/refresh-materialized-view-node.js'; -export * from './operation-node/data-type-node.js'; -export * from './operation-node/default-insert-value-node.js'; -export * from './operation-node/default-value-node.js'; -export * from './operation-node/delete-query-node.js'; -export * from './operation-node/drop-column-node.js'; -export * from './operation-node/drop-constraint-node.js'; -export * from './operation-node/drop-index-node.js'; -export * from './operation-node/drop-schema-node.js'; -export * from './operation-node/drop-table-node.js'; -export * from './operation-node/drop-type-node.js'; -export * from './operation-node/drop-view-node.js'; -export * from './operation-node/explain-node.js'; -export * from './operation-node/fetch-node.js'; -export * from './operation-node/foreign-key-constraint-node.js'; -export * from './operation-node/from-node.js'; -export * from './operation-node/function-node.js'; -export * from './operation-node/generated-node.js'; -export * from './operation-node/group-by-item-node.js'; -export * from './operation-node/group-by-node.js'; -export * from './operation-node/having-node.js'; -export * from './operation-node/identifier-node.js'; -export * from './operation-node/insert-query-node.js'; -export * from './operation-node/join-node.js'; -export * from './operation-node/json-operator-chain-node.js'; -export * from './operation-node/json-path-leg-node.js'; -export * from './operation-node/json-path-node.js'; -export * from './operation-node/json-reference-node.js'; -export * from './operation-node/limit-node.js'; -export * from './operation-node/list-node.js'; -export * from './operation-node/matched-node.js'; -export * from './operation-node/merge-query-node.js'; -export * from './operation-node/modify-column-node.js'; -export * from './operation-node/offset-node.js'; -export * from './operation-node/on-conflict-node.js'; -export * from './operation-node/on-duplicate-key-node.js'; -export * from './operation-node/on-node.js'; -export * from './operation-node/operation-node-source.js'; -export * from './operation-node/operation-node-transformer.js'; -export * from './operation-node/operation-node-visitor.js'; -export * from './operation-node/operation-node.js'; -export * from './operation-node/operator-node.js'; -export * from './operation-node/or-action-node.js'; -export * from './operation-node/or-node.js'; -export * from './operation-node/order-by-item-node.js'; -export * from './operation-node/order-by-node.js'; -export * from './operation-node/output-node.js'; -export * from './operation-node/over-node.js'; -export * from './operation-node/parens-node.js'; -export * from './operation-node/partition-by-item-node.js'; -export * from './operation-node/partition-by-node.js'; -export * from './operation-node/primary-key-constraint-node.js'; -export * from './operation-node/primitive-value-list-node.js'; -export * from './operation-node/query-node.js'; -export * from './operation-node/raw-node.js'; -export * from './operation-node/reference-node.js'; -export * from './operation-node/references-node.js'; -export * from './operation-node/rename-column-node.js'; -export * from './operation-node/rename-constraint-node.js'; -export * from './operation-node/returning-node.js'; -export * from './operation-node/schemable-identifier-node.js'; -export * from './operation-node/select-all-node.js'; -export * from './operation-node/select-modifier-node.js'; -export * from './operation-node/select-query-node.js'; -export * from './operation-node/selection-node.js'; -export * from './operation-node/set-operation-node.js'; -export * from './operation-node/simple-reference-expression-node.js'; -export * from './operation-node/table-node.js'; -export * from './operation-node/top-node.js'; -export * from './operation-node/tuple-node.js'; -export * from './operation-node/unary-operation-node.js'; -export * from './operation-node/unique-constraint-node.js'; -export * from './operation-node/update-query-node.js'; -export * from './operation-node/using-node.js'; -export * from './operation-node/value-list-node.js'; -export * from './operation-node/value-node.js'; -export * from './operation-node/values-node.js'; -export * from './operation-node/when-node.js'; -export * from './operation-node/where-node.js'; -export * from './operation-node/with-node.js'; -export * from './util/column-type.js'; -export * from './util/compilable.js'; -export * from './util/explainable.js'; -export * from './util/streamable.js'; -export * from './util/log.js'; -export type { AnyAliasedColumn, AnyAliasedColumnWithTable, AnyColumn, AnyColumnWithTable, DrainOuterGeneric, Equals, ExtractColumnType, UnknownRow, Simplify, SqlBool, Nullable, NumbersWhenDataTypeNotAvailable, NotNull, NumericString, ShallowDehydrateObject, ShallowDehydrateValue, SimplifyResult, SimplifySingleResult, StringsWhenDataTypeNotAvailable, } from './util/type-utils.js'; -export * from './util/infer-result.js'; -export { logOnce } from './util/log-once.js'; -export { createQueryId, type QueryId } from './util/query-id.js'; -export type { KyselyTypeError } from './util/type-error.js'; -export type { SelectExpression, SelectCallback, SelectArg, Selection, CallbackSelection, } from './parser/select-parser.js'; -export type { ReferenceExpression, ReferenceExpressionOrList, SimpleReferenceExpression, StringReference, ExtractTypeFromStringReference, ExtractTypeFromReferenceExpression, } from './parser/reference-parser.js'; -export type { ValueExpression, ValueExpressionOrList, } from './parser/value-parser.js'; -export type { SimpleTableReference, TableExpression, TableExpressionOrList, } from './parser/table-parser.js'; -export type { JoinReferenceExpression, JoinCallbackExpression, } from './parser/join-parser.js'; -export type { InsertObject } from './parser/insert-values-parser.js'; -export type { UpdateObject } from './parser/update-set-parser.js'; -export type { OrderByExpression, OrderByDirectionExpression, OrderByModifiers, OrderByDirection, OrderByModifiersCallbackExpression, } from './parser/order-by-parser.js'; -export type { ComparisonOperatorExpression, OperandValueExpression, OperandValueExpressionOrList, FilterObject, } from './parser/binary-operation-parser.js'; -export type { ExistsExpression } from './parser/unary-operation-parser.js'; -export type { OperandExpression, ExpressionOrFactory, } from './parser/expression-parser.js'; -export type { Collation } from './parser/collate-parser.js'; -export type { QueryCreatorWithCommonTableExpression } from './parser/with-parser.js'; diff --git a/node_modules/kysely/dist/esm/index.js b/node_modules/kysely/dist/esm/index.js deleted file mode 100644 index 5182ed4..0000000 --- a/node_modules/kysely/dist/esm/index.js +++ /dev/null @@ -1,212 +0,0 @@ -/// -export * from './kysely.js'; -export * from './query-creator.js'; -export * from './expression/expression.js'; -export { expressionBuilder, } from './expression/expression-builder.js'; -export * from './expression/expression-wrapper.js'; -export * from './query-builder/where-interface.js'; -export * from './query-builder/returning-interface.js'; -export * from './query-builder/output-interface.js'; -export * from './query-builder/having-interface.js'; -export * from './query-builder/order-by-interface.js'; -export * from './query-builder/select-query-builder.js'; -export * from './query-builder/insert-query-builder.js'; -export * from './query-builder/update-query-builder.js'; -export * from './query-builder/delete-query-builder.js'; -export * from './query-builder/no-result-error.js'; -export * from './query-builder/join-builder.js'; -export * from './query-builder/function-module.js'; -export * from './query-builder/insert-result.js'; -export * from './query-builder/delete-result.js'; -export * from './query-builder/update-result.js'; -export * from './query-builder/on-conflict-builder.js'; -export * from './query-builder/aggregate-function-builder.js'; -export * from './query-builder/case-builder.js'; -export * from './query-builder/json-path-builder.js'; -export * from './query-builder/merge-query-builder.js'; -export * from './query-builder/merge-result.js'; -export * from './query-builder/order-by-item-builder.js'; -export * from './raw-builder/raw-builder.js'; -export * from './raw-builder/sql.js'; -export * from './query-executor/query-executor.js'; -export * from './query-executor/default-query-executor.js'; -export * from './query-executor/noop-query-executor.js'; -export * from './query-executor/query-executor-provider.js'; -export * from './query-compiler/default-query-compiler.js'; -export * from './query-compiler/compiled-query.js'; -export * from './schema/schema.js'; -export * from './schema/create-table-builder.js'; -export * from './schema/create-type-builder.js'; -export * from './schema/drop-table-builder.js'; -export * from './schema/drop-type-builder.js'; -export * from './schema/create-index-builder.js'; -export * from './schema/drop-index-builder.js'; -export * from './schema/create-schema-builder.js'; -export * from './schema/drop-schema-builder.js'; -export * from './schema/column-definition-builder.js'; -export * from './schema/foreign-key-constraint-builder.js'; -export * from './schema/alter-table-builder.js'; -export * from './schema/create-view-builder.js'; -export * from './schema/refresh-materialized-view-builder.js'; -export * from './schema/drop-view-builder.js'; -export * from './schema/alter-column-builder.js'; -export * from './dynamic/dynamic.js'; -export * from './dynamic/dynamic-reference-builder.js'; -export * from './dynamic/dynamic-table-builder.js'; -export * from './driver/driver.js'; -export * from './driver/database-connection.js'; -export * from './driver/connection-provider.js'; -export * from './driver/default-connection-provider.js'; -export * from './driver/single-connection-provider.js'; -export * from './driver/dummy-driver.js'; -export * from './dialect/dialect.js'; -export * from './dialect/dialect-adapter.js'; -export * from './dialect/dialect-adapter-base.js'; -export * from './dialect/database-introspector.js'; -export * from './dialect/sqlite/sqlite-dialect.js'; -export * from './dialect/sqlite/sqlite-dialect-config.js'; -export * from './dialect/sqlite/sqlite-driver.js'; -export * from './dialect/postgres/postgres-query-compiler.js'; -export * from './dialect/postgres/postgres-introspector.js'; -export * from './dialect/postgres/postgres-adapter.js'; -export * from './dialect/mysql/mysql-dialect.js'; -export * from './dialect/mysql/mysql-dialect-config.js'; -export * from './dialect/mysql/mysql-driver.js'; -export * from './dialect/mysql/mysql-query-compiler.js'; -export * from './dialect/mysql/mysql-introspector.js'; -export * from './dialect/mysql/mysql-adapter.js'; -export * from './dialect/postgres/postgres-driver.js'; -export * from './dialect/postgres/postgres-dialect-config.js'; -export * from './dialect/postgres/postgres-dialect.js'; -export * from './dialect/sqlite/sqlite-query-compiler.js'; -export * from './dialect/sqlite/sqlite-introspector.js'; -export * from './dialect/sqlite/sqlite-adapter.js'; -export * from './dialect/mssql/mssql-adapter.js'; -export * from './dialect/mssql/mssql-dialect-config.js'; -export * from './dialect/mssql/mssql-dialect.js'; -export * from './dialect/mssql/mssql-driver.js'; -export * from './dialect/mssql/mssql-introspector.js'; -export * from './dialect/mssql/mssql-query-compiler.js'; -export * from './query-compiler/default-query-compiler.js'; -export * from './query-compiler/query-compiler.js'; -export * from './migration/migrator.js'; -export * from './migration/file-migration-provider.js'; -export * from './plugin/kysely-plugin.js'; -export * from './plugin/camel-case/camel-case-plugin.js'; -export * from './plugin/deduplicate-joins/deduplicate-joins-plugin.js'; -export * from './plugin/with-schema/with-schema-plugin.js'; -export * from './plugin/parse-json-results/parse-json-results-plugin.js'; -export * from './plugin/handle-empty-in-lists/handle-empty-in-lists-plugin.js'; -export * from './plugin/handle-empty-in-lists/handle-empty-in-lists.js'; -export * from './operation-node/add-column-node.js'; -export * from './operation-node/add-constraint-node.js'; -export * from './operation-node/add-index-node.js'; -export * from './operation-node/aggregate-function-node.js'; -export * from './operation-node/alias-node.js'; -export * from './operation-node/alter-column-node.js'; -export * from './operation-node/alter-table-node.js'; -export * from './operation-node/and-node.js'; -export * from './operation-node/binary-operation-node.js'; -export * from './operation-node/case-node.js'; -export * from './operation-node/cast-node.js'; -export * from './operation-node/check-constraint-node.js'; -export * from './operation-node/collate-node.js'; -export * from './operation-node/column-definition-node.js'; -export * from './operation-node/column-node.js'; -export * from './operation-node/column-update-node.js'; -export * from './operation-node/common-table-expression-name-node.js'; -export * from './operation-node/common-table-expression-node.js'; -export * from './operation-node/constraint-node.js'; -export * from './operation-node/create-index-node.js'; -export * from './operation-node/create-schema-node.js'; -export * from './operation-node/create-table-node.js'; -export * from './operation-node/create-type-node.js'; -export * from './operation-node/create-view-node.js'; -export * from './operation-node/refresh-materialized-view-node.js'; -export * from './operation-node/data-type-node.js'; -export * from './operation-node/default-insert-value-node.js'; -export * from './operation-node/default-value-node.js'; -export * from './operation-node/delete-query-node.js'; -export * from './operation-node/drop-column-node.js'; -export * from './operation-node/drop-constraint-node.js'; -export * from './operation-node/drop-index-node.js'; -export * from './operation-node/drop-schema-node.js'; -export * from './operation-node/drop-table-node.js'; -export * from './operation-node/drop-type-node.js'; -export * from './operation-node/drop-view-node.js'; -export * from './operation-node/explain-node.js'; -export * from './operation-node/fetch-node.js'; -export * from './operation-node/foreign-key-constraint-node.js'; -export * from './operation-node/from-node.js'; -export * from './operation-node/function-node.js'; -export * from './operation-node/generated-node.js'; -export * from './operation-node/group-by-item-node.js'; -export * from './operation-node/group-by-node.js'; -export * from './operation-node/having-node.js'; -export * from './operation-node/identifier-node.js'; -export * from './operation-node/insert-query-node.js'; -export * from './operation-node/join-node.js'; -export * from './operation-node/json-operator-chain-node.js'; -export * from './operation-node/json-path-leg-node.js'; -export * from './operation-node/json-path-node.js'; -export * from './operation-node/json-reference-node.js'; -export * from './operation-node/limit-node.js'; -export * from './operation-node/list-node.js'; -export * from './operation-node/matched-node.js'; -export * from './operation-node/merge-query-node.js'; -export * from './operation-node/modify-column-node.js'; -export * from './operation-node/offset-node.js'; -export * from './operation-node/on-conflict-node.js'; -export * from './operation-node/on-duplicate-key-node.js'; -export * from './operation-node/on-node.js'; -export * from './operation-node/operation-node-source.js'; -export * from './operation-node/operation-node-transformer.js'; -export * from './operation-node/operation-node-visitor.js'; -export * from './operation-node/operation-node.js'; -export * from './operation-node/operator-node.js'; -export * from './operation-node/or-action-node.js'; -export * from './operation-node/or-node.js'; -export * from './operation-node/order-by-item-node.js'; -export * from './operation-node/order-by-node.js'; -export * from './operation-node/output-node.js'; -export * from './operation-node/over-node.js'; -export * from './operation-node/parens-node.js'; -export * from './operation-node/partition-by-item-node.js'; -export * from './operation-node/partition-by-node.js'; -export * from './operation-node/primary-key-constraint-node.js'; -export * from './operation-node/primitive-value-list-node.js'; -export * from './operation-node/query-node.js'; -export * from './operation-node/raw-node.js'; -export * from './operation-node/reference-node.js'; -export * from './operation-node/references-node.js'; -export * from './operation-node/rename-column-node.js'; -export * from './operation-node/rename-constraint-node.js'; -export * from './operation-node/returning-node.js'; -export * from './operation-node/schemable-identifier-node.js'; -export * from './operation-node/select-all-node.js'; -export * from './operation-node/select-modifier-node.js'; -export * from './operation-node/select-query-node.js'; -export * from './operation-node/selection-node.js'; -export * from './operation-node/set-operation-node.js'; -export * from './operation-node/simple-reference-expression-node.js'; -export * from './operation-node/table-node.js'; -export * from './operation-node/top-node.js'; -export * from './operation-node/tuple-node.js'; -export * from './operation-node/unary-operation-node.js'; -export * from './operation-node/unique-constraint-node.js'; -export * from './operation-node/update-query-node.js'; -export * from './operation-node/using-node.js'; -export * from './operation-node/value-list-node.js'; -export * from './operation-node/value-node.js'; -export * from './operation-node/values-node.js'; -export * from './operation-node/when-node.js'; -export * from './operation-node/where-node.js'; -export * from './operation-node/with-node.js'; -export * from './util/column-type.js'; -export * from './util/compilable.js'; -export * from './util/explainable.js'; -export * from './util/streamable.js'; -export * from './util/log.js'; -export * from './util/infer-result.js'; -export { logOnce } from './util/log-once.js'; -export { createQueryId } from './util/query-id.js'; diff --git a/node_modules/kysely/dist/esm/kysely.d.ts b/node_modules/kysely/dist/esm/kysely.d.ts deleted file mode 100644 index 5e2eb4b..0000000 --- a/node_modules/kysely/dist/esm/kysely.d.ts +++ /dev/null @@ -1,848 +0,0 @@ -import type { Dialect } from './dialect/dialect.js'; -import { SchemaModule } from './schema/schema.js'; -import { DynamicModule } from './dynamic/dynamic.js'; -import type { QueryExecutor } from './query-executor/query-executor.js'; -import { QueryCreator } from './query-creator.js'; -import type { KyselyPlugin } from './plugin/kysely-plugin.js'; -import type { DatabaseIntrospector } from './dialect/database-introspector.js'; -import { type Driver, type IsolationLevel, type AccessMode } from './driver/driver.js'; -import { type FunctionModule } from './query-builder/function-module.js'; -import { type LogConfig } from './util/log.js'; -import type { QueryExecutorProvider } from './query-executor/query-executor-provider.js'; -import type { QueryResult } from './driver/database-connection.js'; -import type { CompiledQuery } from './query-compiler/compiled-query.js'; -import { type QueryId } from './util/query-id.js'; -import { type Compilable } from './util/compilable.js'; -import { CaseBuilder } from './query-builder/case-builder.js'; -import type { Expression } from './expression/expression.js'; -import type { DrainOuterGeneric } from './util/type-utils.js'; -import type { ReleaseSavepoint, RollbackToSavepoint } from './parser/savepoint-parser.js'; -import { type ControlledConnection } from './util/provide-controlled-connection.js'; -declare global { - interface AsyncDisposable { - } - interface SymbolConstructor { - readonly asyncDispose: unique symbol; - } -} -/** - * The main Kysely class. - * - * You should create one instance of `Kysely` per database using the {@link Kysely} - * constructor. Each `Kysely` instance maintains its own connection pool. - * - * ### Examples - * - * This example assumes your database has a "person" table: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { type Generated, Kysely, SqliteDialect } from 'kysely' - * - * interface Database { - * person: { - * id: Generated - * first_name: string - * last_name: string | null - * } - * } - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }) - * }) - * ``` - * - * @typeParam DB - The database interface type. Keys of this type must be table names - * in the database and values must be interfaces that describe the rows in those - * tables. See the examples above. - */ -export declare class Kysely extends QueryCreator implements QueryExecutorProvider, AsyncDisposable { - #private; - constructor(args: KyselyConfig); - constructor(args: KyselyProps); - /** - * Returns the {@link SchemaModule} module for building database schema. - */ - get schema(): SchemaModule; - /** - * Returns a the {@link DynamicModule} module. - * - * The {@link DynamicModule} module can be used to bypass strict typing and - * passing in dynamic values for the queries. - */ - get dynamic(): DynamicModule; - /** - * Returns a {@link DatabaseIntrospector | database introspector}. - */ - get introspection(): DatabaseIntrospector; - /** - * Creates a `case` statement/operator. - * - * See {@link ExpressionBuilder.case} for more information. - */ - case(): CaseBuilder; - case(value: Expression): CaseBuilder; - /** - * Returns a {@link FunctionModule} that can be used to write somewhat type-safe function - * calls. - * - * ```ts - * const { count } = db.fn - * - * await db.selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .select([ - * 'id', - * count('pet.id').as('person_count'), - * ]) - * .groupBy('person.id') - * .having(count('pet.id'), '>', 10) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."id", count("pet"."id") as "person_count" - * from "person" - * inner join "pet" on "pet"."owner_id" = "person"."id" - * group by "person"."id" - * having count("pet"."id") > $1 - * ``` - * - * Why "somewhat" type-safe? Because the function calls are not bound to the - * current query context. They allow you to reference columns and tables that - * are not in the current query. E.g. remove the `innerJoin` from the previous - * query and TypeScript won't even complain. - * - * If you want to make the function calls fully type-safe, you can use the - * {@link ExpressionBuilder.fn} getter for a query context-aware, stricter {@link FunctionModule}. - * - * ```ts - * await db.selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .select((eb) => [ - * 'person.id', - * eb.fn.count('pet.id').as('pet_count') - * ]) - * .groupBy('person.id') - * .having((eb) => eb.fn.count('pet.id'), '>', 10) - * .execute() - * ``` - */ - get fn(): FunctionModule; - /** - * Creates a {@link TransactionBuilder} that can be used to run queries inside a transaction. - * - * The returned {@link TransactionBuilder} can be used to configure the transaction. The - * {@link TransactionBuilder.execute} method can then be called to run the transaction. - * {@link TransactionBuilder.execute} takes a function that is run inside the - * transaction. If the function throws an exception, - * 1. the exception is caught, - * 2. the transaction is rolled back, and - * 3. the exception is thrown again. - * Otherwise the transaction is committed. - * - * The callback function passed to the {@link TransactionBuilder.execute | execute} - * method gets the transaction object as its only argument. The transaction is - * of type {@link Transaction} which inherits {@link Kysely}. Any query - * started through the transaction object is executed inside the transaction. - * - * To run a controlled transaction, allowing you to commit and rollback manually, - * use {@link startTransaction} instead. - * - * ### Examples - * - * - * - * This example inserts two rows in a transaction. If an exception is thrown inside - * the callback passed to the `execute` method, - * 1. the exception is caught, - * 2. the transaction is rolled back, and - * 3. the exception is thrown again. - * Otherwise the transaction is committed. - * - * ```ts - * const catto = await db.transaction().execute(async (trx) => { - * const jennifer = await trx.insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40, - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * - * return await trx.insertInto('pet') - * .values({ - * owner_id: jennifer.id, - * name: 'Catto', - * species: 'cat', - * is_favorite: false, - * }) - * .returningAll() - * .executeTakeFirst() - * }) - * ``` - * - * Setting the isolation level: - * - * ```ts - * import type { Kysely } from 'kysely' - * - * await db - * .transaction() - * .setIsolationLevel('serializable') - * .execute(async (trx) => { - * await doStuff(trx) - * }) - * - * async function doStuff(kysely: typeof db) { - * // ... - * } - * ``` - */ - transaction(): TransactionBuilder; - /** - * Creates a {@link ControlledTransactionBuilder} that can be used to run queries inside a controlled transaction. - * - * The returned {@link ControlledTransactionBuilder} can be used to configure the transaction. - * The {@link ControlledTransactionBuilder.execute} method can then be called - * to start the transaction and return a {@link ControlledTransaction}. - * - * A {@link ControlledTransaction} allows you to commit and rollback manually, - * execute savepoint commands. It extends {@link Transaction} which extends {@link Kysely}, - * so you can run queries inside the transaction. Once the transaction is committed, - * or rolled back, it can't be used anymore - all queries will throw an error. - * This is to prevent accidentally running queries outside the transaction - where - * atomicity is not guaranteed anymore. - * - * ### Examples - * - * - * - * A controlled transaction allows you to commit and rollback manually, execute - * savepoint commands, and queries in general. - * - * In this example we start a transaction, use it to insert two rows and then commit - * the transaction. If an error is thrown, we catch it and rollback the transaction. - * - * ```ts - * const trx = await db.startTransaction().execute() - * - * try { - * const jennifer = await trx.insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40, - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * - * const catto = await trx.insertInto('pet') - * .values({ - * owner_id: jennifer.id, - * name: 'Catto', - * species: 'cat', - * is_favorite: false, - * }) - * .returningAll() - * .executeTakeFirstOrThrow() - * - * await trx.commit().execute() - * - * // ... - * } catch (error) { - * await trx.rollback().execute() - * } - * ``` - * - * - * - * A controlled transaction allows you to commit and rollback manually, execute - * savepoint commands, and queries in general. - * - * In this example we start a transaction, insert a person, create a savepoint, - * try inserting a toy and a pet, and if an error is thrown, we rollback to the - * savepoint. Eventually we release the savepoint, insert an audit record and - * commit the transaction. If an error is thrown, we catch it and rollback the - * transaction. - * - * ```ts - * const trx = await db.startTransaction().execute() - * - * try { - * const jennifer = await trx - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40, - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * - * const trxAfterJennifer = await trx.savepoint('after_jennifer').execute() - * - * try { - * const catto = await trxAfterJennifer - * .insertInto('pet') - * .values({ - * owner_id: jennifer.id, - * name: 'Catto', - * species: 'cat', - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * - * await trxAfterJennifer - * .insertInto('toy') - * .values({ name: 'Bone', price: 1.99, pet_id: catto.id }) - * .execute() - * } catch (error) { - * await trxAfterJennifer.rollbackToSavepoint('after_jennifer').execute() - * } - * - * await trxAfterJennifer.releaseSavepoint('after_jennifer').execute() - * - * await trx.insertInto('audit').values({ action: 'added Jennifer' }).execute() - * - * await trx.commit().execute() - * } catch (error) { - * await trx.rollback().execute() - * } - * ``` - */ - startTransaction(): ControlledTransactionBuilder; - /** - * Provides a kysely instance bound to a single database connection. - * - * ### Examples - * - * ```ts - * await db - * .connection() - * .execute(async (db) => { - * // `db` is an instance of `Kysely` that's bound to a single - * // database connection. All queries executed through `db` use - * // the same connection. - * await doStuff(db) - * }) - * - * async function doStuff(kysely: typeof db) { - * // ... - * } - * ``` - */ - connection(): ConnectionBuilder; - /** - * Returns a copy of this Kysely instance with the given plugin installed. - */ - withPlugin(plugin: KyselyPlugin): Kysely; - /** - * Returns a copy of this Kysely instance without any plugins. - */ - withoutPlugins(): Kysely; - /** - * @override - */ - withSchema(schema: string): Kysely; - /** - * Returns a copy of this Kysely instance with tables added to its - * database type. - * - * This method only modifies the types and doesn't affect any of the - * executed queries in any way. - * - * ### Examples - * - * The following example adds and uses a temporary table: - * - * ```ts - * await db.schema - * .createTable('temp_table') - * .temporary() - * .addColumn('some_column', 'integer') - * .execute() - * - * const tempDb = db.withTables<{ - * temp_table: { - * some_column: number - * } - * }>() - * - * await tempDb - * .insertInto('temp_table') - * .values({ some_column: 100 }) - * .execute() - * ``` - */ - withTables>>(): Kysely>; - /** - * Releases all resources and disconnects from the database. - * - * You need to call this when you are done using the `Kysely` instance. - */ - destroy(): Promise; - /** - * Returns true if this `Kysely` instance is a transaction. - * - * You can also use `db instanceof Transaction`. - */ - get isTransaction(): boolean; - /** - * @internal - * @private - */ - getExecutor(): QueryExecutor; - /** - * Executes a given compiled query or query builder. - * - * See {@link https://github.com/kysely-org/kysely/blob/master/site/docs/recipes/0004-splitting-query-building-and-execution.md#execute-compiled-queries splitting build, compile and execute code recipe} for more information. - */ - executeQuery(query: CompiledQuery | Compilable, queryId?: QueryId): Promise>; - [Symbol.asyncDispose](): Promise; -} -export declare class Transaction extends Kysely { - #private; - constructor(props: KyselyProps); - /** - * Returns true if this `Kysely` instance is a transaction. - * - * You can also use `db instanceof Transaction`. - */ - get isTransaction(): true; - /** - * Creates a {@link TransactionBuilder} that can be used to run queries inside a transaction. - * - * The returned {@link TransactionBuilder} can be used to configure the transaction. The - * {@link TransactionBuilder.execute} method can then be called to run the transaction. - * {@link TransactionBuilder.execute} takes a function that is run inside the - * transaction. If the function throws an exception, - * 1. the exception is caught, - * 2. the transaction is rolled back, and - * 3. the exception is thrown again. - * Otherwise the transaction is committed. - * - * The callback function passed to the {@link TransactionBuilder.execute | execute} - * method gets the transaction object as its only argument. The transaction is - * of type {@link Transaction} which inherits {@link Kysely}. Any query - * started through the transaction object is executed inside the transaction. - * - * To run a controlled transaction, allowing you to commit and rollback manually, - * use {@link startTransaction} instead. - * - * ### Examples - * - * - * - * This example inserts two rows in a transaction. If an exception is thrown inside - * the callback passed to the `execute` method, - * 1. the exception is caught, - * 2. the transaction is rolled back, and - * 3. the exception is thrown again. - * Otherwise the transaction is committed. - * - * ```ts - * const catto = await db.transaction().execute(async (trx) => { - * const jennifer = await trx.insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40, - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * - * return await trx.insertInto('pet') - * .values({ - * owner_id: jennifer.id, - * name: 'Catto', - * species: 'cat', - * is_favorite: false, - * }) - * .returningAll() - * .executeTakeFirst() - * }) - * ``` - * - * Setting the isolation level: - * - * ```ts - * import type { Kysely } from 'kysely' - * - * await db - * .transaction() - * .setIsolationLevel('serializable') - * .execute(async (trx) => { - * await doStuff(trx) - * }) - * - * async function doStuff(kysely: typeof db) { - * // ... - * } - * ``` - */ - transaction(): TransactionBuilder; - /** - * Provides a kysely instance bound to a single database connection. - * - * ### Examples - * - * ```ts - * await db - * .connection() - * .execute(async (db) => { - * // `db` is an instance of `Kysely` that's bound to a single - * // database connection. All queries executed through `db` use - * // the same connection. - * await doStuff(db) - * }) - * - * async function doStuff(kysely: typeof db) { - * // ... - * } - * ``` - */ - connection(): ConnectionBuilder; - /** - * Releases all resources and disconnects from the database. - * - * You need to call this when you are done using the `Kysely` instance. - */ - destroy(): Promise; - /** - * Returns a copy of this Kysely instance with the given plugin installed. - */ - withPlugin(plugin: KyselyPlugin): Transaction; - /** - * Returns a copy of this Kysely instance without any plugins. - */ - withoutPlugins(): Transaction; - /** - * @override - */ - withSchema(schema: string): Transaction; - /** - * Returns a copy of this Kysely instance with tables added to its - * database type. - * - * This method only modifies the types and doesn't affect any of the - * executed queries in any way. - * - * ### Examples - * - * The following example adds and uses a temporary table: - * - * ```ts - * await db.schema - * .createTable('temp_table') - * .temporary() - * .addColumn('some_column', 'integer') - * .execute() - * - * const tempDb = db.withTables<{ - * temp_table: { - * some_column: number - * } - * }>() - * - * await tempDb - * .insertInto('temp_table') - * .values({ some_column: 100 }) - * .execute() - * ``` - */ - withTables>>(): Transaction>; -} -export interface KyselyProps { - readonly config: KyselyConfig; - readonly driver: Driver; - readonly executor: QueryExecutor; - readonly dialect: Dialect; -} -export declare function isKyselyProps(obj: unknown): obj is KyselyProps; -export interface KyselyConfig { - readonly dialect: Dialect; - readonly plugins?: KyselyPlugin[]; - /** - * A list of log levels to log or a custom logger function. - * - * Currently there's only two levels: `query` and `error`. - * This will be expanded based on user feedback later. - * - * ### Examples - * - * Setting up built-in logging for preferred log levels: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { Kysely, SqliteDialect } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }), - * log: ['query', 'error'] - * }) - * ``` - * - * Setting up custom logging: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { Kysely, SqliteDialect } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }), - * log(event): void { - * if (event.level === 'query') { - * console.log(event.query.sql) - * console.log(event.query.parameters) - * } - * } - * }) - * ``` - */ - readonly log?: LogConfig; -} -export declare class ConnectionBuilder { - #private; - constructor(props: ConnectionBuilderProps); - execute(callback: (db: Kysely) => Promise): Promise; -} -interface ConnectionBuilderProps extends KyselyProps { -} -export declare class TransactionBuilder { - #private; - constructor(props: TransactionBuilderProps); - setAccessMode(accessMode: AccessMode): TransactionBuilder; - setIsolationLevel(isolationLevel: IsolationLevel): TransactionBuilder; - execute(callback: (trx: Transaction) => Promise): Promise; -} -interface TransactionBuilderProps extends KyselyProps { - readonly accessMode?: AccessMode; - readonly isolationLevel?: IsolationLevel; -} -export declare class ControlledTransactionBuilder { - #private; - constructor(props: TransactionBuilderProps); - setAccessMode(accessMode: AccessMode): ControlledTransactionBuilder; - setIsolationLevel(isolationLevel: IsolationLevel): ControlledTransactionBuilder; - execute(): Promise>; -} -export declare class ControlledTransaction extends Transaction { - #private; - constructor(props: ControlledTransactionProps); - get isCommitted(): boolean; - get isRolledBack(): boolean; - /** - * Commits the transaction. - * - * See {@link rollback}. - * - * ### Examples - * - * ```ts - * import type { Kysely } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const trx = await db.startTransaction().execute() - * - * try { - * await doSomething(trx) - * - * await trx.commit().execute() - * } catch (error) { - * await trx.rollback().execute() - * } - * - * async function doSomething(kysely: Kysely) {} - * ``` - */ - commit(): Command; - /** - * Rolls back the transaction. - * - * See {@link commit} and {@link rollbackToSavepoint}. - * - * ### Examples - * - * ```ts - * import type { Kysely } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const trx = await db.startTransaction().execute() - * - * try { - * await doSomething(trx) - * - * await trx.commit().execute() - * } catch (error) { - * await trx.rollback().execute() - * } - * - * async function doSomething(kysely: Kysely) {} - * ``` - */ - rollback(): Command; - /** - * Creates a savepoint with a given name. - * - * See {@link rollbackToSavepoint} and {@link releaseSavepoint}. - * - * For a type-safe experience, you should use the returned instance from now on. - * - * ### Examples - * - * ```ts - * import type { Kysely } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const trx = await db.startTransaction().execute() - * - * await insertJennifer(trx) - * - * const trxAfterJennifer = await trx.savepoint('after_jennifer').execute() - * - * try { - * await doSomething(trxAfterJennifer) - * } catch (error) { - * await trxAfterJennifer.rollbackToSavepoint('after_jennifer').execute() - * } - * - * async function insertJennifer(kysely: Kysely) {} - * async function doSomething(kysely: Kysely) {} - * ``` - */ - savepoint(savepointName: SN extends S ? never : SN): Command>; - /** - * Rolls back to a savepoint with a given name. - * - * See {@link savepoint} and {@link releaseSavepoint}. - * - * You must use the same instance returned by {@link savepoint}, or - * escape the type-check by using `as any`. - * - * ### Examples - * - * ```ts - * import type { Kysely } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const trx = await db.startTransaction().execute() - * - * await insertJennifer(trx) - * - * const trxAfterJennifer = await trx.savepoint('after_jennifer').execute() - * - * try { - * await doSomething(trxAfterJennifer) - * } catch (error) { - * await trxAfterJennifer.rollbackToSavepoint('after_jennifer').execute() - * } - * - * async function insertJennifer(kysely: Kysely) {} - * async function doSomething(kysely: Kysely) {} - * ``` - */ - rollbackToSavepoint(savepointName: SN): RollbackToSavepoint extends string[] ? Command>> : never; - /** - * Releases a savepoint with a given name. - * - * See {@link savepoint} and {@link rollbackToSavepoint}. - * - * You must use the same instance returned by {@link savepoint}, or - * escape the type-check by using `as any`. - * - * ### Examples - * - * ```ts - * import type { Kysely } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const trx = await db.startTransaction().execute() - * - * await insertJennifer(trx) - * - * const trxAfterJennifer = await trx.savepoint('after_jennifer').execute() - * - * try { - * await doSomething(trxAfterJennifer) - * } catch (error) { - * await trxAfterJennifer.rollbackToSavepoint('after_jennifer').execute() - * } - * - * await trxAfterJennifer.releaseSavepoint('after_jennifer').execute() - * - * await doSomethingElse(trx) - * - * async function insertJennifer(kysely: Kysely) {} - * async function doSomething(kysely: Kysely) {} - * async function doSomethingElse(kysely: Kysely) {} - * ``` - */ - releaseSavepoint(savepointName: SN): ReleaseSavepoint extends string[] ? Command>> : never; - /** - * Returns a copy of this Kysely instance with the given plugin installed. - */ - withPlugin(plugin: KyselyPlugin): ControlledTransaction; - /** - * Returns a copy of this Kysely instance without any plugins. - */ - withoutPlugins(): ControlledTransaction; - /** - * @override - */ - withSchema(schema: string): ControlledTransaction; - /** - * Returns a copy of this Kysely instance with tables added to its - * database type. - * - * This method only modifies the types and doesn't affect any of the - * executed queries in any way. - * - * ### Examples - * - * The following example adds and uses a temporary table: - * - * ```ts - * await db.schema - * .createTable('temp_table') - * .temporary() - * .addColumn('some_column', 'integer') - * .execute() - * - * const tempDb = db.withTables<{ - * temp_table: { - * some_column: number - * } - * }>() - * - * await tempDb - * .insertInto('temp_table') - * .values({ some_column: 100 }) - * .execute() - * ``` - */ - withTables>>(): ControlledTransaction, S>; -} -interface ControlledTransactionProps extends KyselyProps { - readonly connection: ControlledConnection; -} -export declare class Command { - #private; - constructor(cb: () => Promise); - /** - * Executes the command. - */ - execute(): Promise; -} -export {}; diff --git a/node_modules/kysely/dist/esm/kysely.js b/node_modules/kysely/dist/esm/kysely.js deleted file mode 100644 index cae5811..0000000 --- a/node_modules/kysely/dist/esm/kysely.js +++ /dev/null @@ -1,917 +0,0 @@ -/// -import { SchemaModule } from './schema/schema.js'; -import { DynamicModule } from './dynamic/dynamic.js'; -import { DefaultConnectionProvider } from './driver/default-connection-provider.js'; -import { QueryCreator } from './query-creator.js'; -import { DefaultQueryExecutor } from './query-executor/default-query-executor.js'; -import { freeze, isObject, isUndefined } from './util/object-utils.js'; -import { RuntimeDriver } from './driver/runtime-driver.js'; -import { SingleConnectionProvider } from './driver/single-connection-provider.js'; -import { validateTransactionSettings, } from './driver/driver.js'; -import { createFunctionModule, } from './query-builder/function-module.js'; -import { Log } from './util/log.js'; -import { createQueryId } from './util/query-id.js'; -import { isCompilable } from './util/compilable.js'; -import { CaseBuilder } from './query-builder/case-builder.js'; -import { CaseNode } from './operation-node/case-node.js'; -import { parseExpression } from './parser/expression-parser.js'; -import { WithSchemaPlugin } from './plugin/with-schema/with-schema-plugin.js'; -import { provideControlledConnection, } from './util/provide-controlled-connection.js'; -import { logOnce } from './util/log-once.js'; -// @ts-ignore -Symbol.asyncDispose ??= Symbol('Symbol.asyncDispose'); -/** - * The main Kysely class. - * - * You should create one instance of `Kysely` per database using the {@link Kysely} - * constructor. Each `Kysely` instance maintains its own connection pool. - * - * ### Examples - * - * This example assumes your database has a "person" table: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { type Generated, Kysely, SqliteDialect } from 'kysely' - * - * interface Database { - * person: { - * id: Generated - * first_name: string - * last_name: string | null - * } - * } - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }) - * }) - * ``` - * - * @typeParam DB - The database interface type. Keys of this type must be table names - * in the database and values must be interfaces that describe the rows in those - * tables. See the examples above. - */ -export class Kysely extends QueryCreator { - #props; - constructor(args) { - let superProps; - let props; - if (isKyselyProps(args)) { - superProps = { executor: args.executor }; - props = { ...args }; - } - else { - const dialect = args.dialect; - const driver = dialect.createDriver(); - const compiler = dialect.createQueryCompiler(); - const adapter = dialect.createAdapter(); - const log = new Log(args.log ?? []); - const runtimeDriver = new RuntimeDriver(driver, log); - const connectionProvider = new DefaultConnectionProvider(runtimeDriver); - const executor = new DefaultQueryExecutor(compiler, adapter, connectionProvider, args.plugins ?? []); - superProps = { executor }; - props = { - config: args, - executor, - dialect, - driver: runtimeDriver, - }; - } - super(superProps); - this.#props = freeze(props); - } - /** - * Returns the {@link SchemaModule} module for building database schema. - */ - get schema() { - return new SchemaModule(this.#props.executor); - } - /** - * Returns a the {@link DynamicModule} module. - * - * The {@link DynamicModule} module can be used to bypass strict typing and - * passing in dynamic values for the queries. - */ - get dynamic() { - return new DynamicModule(); - } - /** - * Returns a {@link DatabaseIntrospector | database introspector}. - */ - get introspection() { - return this.#props.dialect.createIntrospector(this.withoutPlugins()); - } - case(value) { - return new CaseBuilder({ - node: CaseNode.create(isUndefined(value) ? undefined : parseExpression(value)), - }); - } - /** - * Returns a {@link FunctionModule} that can be used to write somewhat type-safe function - * calls. - * - * ```ts - * const { count } = db.fn - * - * await db.selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .select([ - * 'id', - * count('pet.id').as('person_count'), - * ]) - * .groupBy('person.id') - * .having(count('pet.id'), '>', 10) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."id", count("pet"."id") as "person_count" - * from "person" - * inner join "pet" on "pet"."owner_id" = "person"."id" - * group by "person"."id" - * having count("pet"."id") > $1 - * ``` - * - * Why "somewhat" type-safe? Because the function calls are not bound to the - * current query context. They allow you to reference columns and tables that - * are not in the current query. E.g. remove the `innerJoin` from the previous - * query and TypeScript won't even complain. - * - * If you want to make the function calls fully type-safe, you can use the - * {@link ExpressionBuilder.fn} getter for a query context-aware, stricter {@link FunctionModule}. - * - * ```ts - * await db.selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .select((eb) => [ - * 'person.id', - * eb.fn.count('pet.id').as('pet_count') - * ]) - * .groupBy('person.id') - * .having((eb) => eb.fn.count('pet.id'), '>', 10) - * .execute() - * ``` - */ - get fn() { - return createFunctionModule(); - } - /** - * Creates a {@link TransactionBuilder} that can be used to run queries inside a transaction. - * - * The returned {@link TransactionBuilder} can be used to configure the transaction. The - * {@link TransactionBuilder.execute} method can then be called to run the transaction. - * {@link TransactionBuilder.execute} takes a function that is run inside the - * transaction. If the function throws an exception, - * 1. the exception is caught, - * 2. the transaction is rolled back, and - * 3. the exception is thrown again. - * Otherwise the transaction is committed. - * - * The callback function passed to the {@link TransactionBuilder.execute | execute} - * method gets the transaction object as its only argument. The transaction is - * of type {@link Transaction} which inherits {@link Kysely}. Any query - * started through the transaction object is executed inside the transaction. - * - * To run a controlled transaction, allowing you to commit and rollback manually, - * use {@link startTransaction} instead. - * - * ### Examples - * - * - * - * This example inserts two rows in a transaction. If an exception is thrown inside - * the callback passed to the `execute` method, - * 1. the exception is caught, - * 2. the transaction is rolled back, and - * 3. the exception is thrown again. - * Otherwise the transaction is committed. - * - * ```ts - * const catto = await db.transaction().execute(async (trx) => { - * const jennifer = await trx.insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40, - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * - * return await trx.insertInto('pet') - * .values({ - * owner_id: jennifer.id, - * name: 'Catto', - * species: 'cat', - * is_favorite: false, - * }) - * .returningAll() - * .executeTakeFirst() - * }) - * ``` - * - * Setting the isolation level: - * - * ```ts - * import type { Kysely } from 'kysely' - * - * await db - * .transaction() - * .setIsolationLevel('serializable') - * .execute(async (trx) => { - * await doStuff(trx) - * }) - * - * async function doStuff(kysely: typeof db) { - * // ... - * } - * ``` - */ - transaction() { - return new TransactionBuilder({ ...this.#props }); - } - /** - * Creates a {@link ControlledTransactionBuilder} that can be used to run queries inside a controlled transaction. - * - * The returned {@link ControlledTransactionBuilder} can be used to configure the transaction. - * The {@link ControlledTransactionBuilder.execute} method can then be called - * to start the transaction and return a {@link ControlledTransaction}. - * - * A {@link ControlledTransaction} allows you to commit and rollback manually, - * execute savepoint commands. It extends {@link Transaction} which extends {@link Kysely}, - * so you can run queries inside the transaction. Once the transaction is committed, - * or rolled back, it can't be used anymore - all queries will throw an error. - * This is to prevent accidentally running queries outside the transaction - where - * atomicity is not guaranteed anymore. - * - * ### Examples - * - * - * - * A controlled transaction allows you to commit and rollback manually, execute - * savepoint commands, and queries in general. - * - * In this example we start a transaction, use it to insert two rows and then commit - * the transaction. If an error is thrown, we catch it and rollback the transaction. - * - * ```ts - * const trx = await db.startTransaction().execute() - * - * try { - * const jennifer = await trx.insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40, - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * - * const catto = await trx.insertInto('pet') - * .values({ - * owner_id: jennifer.id, - * name: 'Catto', - * species: 'cat', - * is_favorite: false, - * }) - * .returningAll() - * .executeTakeFirstOrThrow() - * - * await trx.commit().execute() - * - * // ... - * } catch (error) { - * await trx.rollback().execute() - * } - * ``` - * - * - * - * A controlled transaction allows you to commit and rollback manually, execute - * savepoint commands, and queries in general. - * - * In this example we start a transaction, insert a person, create a savepoint, - * try inserting a toy and a pet, and if an error is thrown, we rollback to the - * savepoint. Eventually we release the savepoint, insert an audit record and - * commit the transaction. If an error is thrown, we catch it and rollback the - * transaction. - * - * ```ts - * const trx = await db.startTransaction().execute() - * - * try { - * const jennifer = await trx - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40, - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * - * const trxAfterJennifer = await trx.savepoint('after_jennifer').execute() - * - * try { - * const catto = await trxAfterJennifer - * .insertInto('pet') - * .values({ - * owner_id: jennifer.id, - * name: 'Catto', - * species: 'cat', - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * - * await trxAfterJennifer - * .insertInto('toy') - * .values({ name: 'Bone', price: 1.99, pet_id: catto.id }) - * .execute() - * } catch (error) { - * await trxAfterJennifer.rollbackToSavepoint('after_jennifer').execute() - * } - * - * await trxAfterJennifer.releaseSavepoint('after_jennifer').execute() - * - * await trx.insertInto('audit').values({ action: 'added Jennifer' }).execute() - * - * await trx.commit().execute() - * } catch (error) { - * await trx.rollback().execute() - * } - * ``` - */ - startTransaction() { - return new ControlledTransactionBuilder({ ...this.#props }); - } - /** - * Provides a kysely instance bound to a single database connection. - * - * ### Examples - * - * ```ts - * await db - * .connection() - * .execute(async (db) => { - * // `db` is an instance of `Kysely` that's bound to a single - * // database connection. All queries executed through `db` use - * // the same connection. - * await doStuff(db) - * }) - * - * async function doStuff(kysely: typeof db) { - * // ... - * } - * ``` - */ - connection() { - return new ConnectionBuilder({ ...this.#props }); - } - /** - * Returns a copy of this Kysely instance with the given plugin installed. - */ - withPlugin(plugin) { - return new Kysely({ - ...this.#props, - executor: this.#props.executor.withPlugin(plugin), - }); - } - /** - * Returns a copy of this Kysely instance without any plugins. - */ - withoutPlugins() { - return new Kysely({ - ...this.#props, - executor: this.#props.executor.withoutPlugins(), - }); - } - /** - * @override - */ - withSchema(schema) { - return new Kysely({ - ...this.#props, - executor: this.#props.executor.withPluginAtFront(new WithSchemaPlugin(schema)), - }); - } - /** - * Returns a copy of this Kysely instance with tables added to its - * database type. - * - * This method only modifies the types and doesn't affect any of the - * executed queries in any way. - * - * ### Examples - * - * The following example adds and uses a temporary table: - * - * ```ts - * await db.schema - * .createTable('temp_table') - * .temporary() - * .addColumn('some_column', 'integer') - * .execute() - * - * const tempDb = db.withTables<{ - * temp_table: { - * some_column: number - * } - * }>() - * - * await tempDb - * .insertInto('temp_table') - * .values({ some_column: 100 }) - * .execute() - * ``` - */ - withTables() { - return new Kysely({ ...this.#props }); - } - /** - * Releases all resources and disconnects from the database. - * - * You need to call this when you are done using the `Kysely` instance. - */ - async destroy() { - await this.#props.driver.destroy(); - } - /** - * Returns true if this `Kysely` instance is a transaction. - * - * You can also use `db instanceof Transaction`. - */ - get isTransaction() { - return false; - } - /** - * @internal - * @private - */ - getExecutor() { - return this.#props.executor; - } - /** - * Executes a given compiled query or query builder. - * - * See {@link https://github.com/kysely-org/kysely/blob/master/site/docs/recipes/0004-splitting-query-building-and-execution.md#execute-compiled-queries splitting build, compile and execute code recipe} for more information. - */ - executeQuery(query, - // TODO: remove this in the future. deprecated in 0.28.x - queryId) { - if (queryId !== undefined) { - logOnce('Passing `queryId` in `db.executeQuery` is deprecated and will result in a compile-time error in the future.'); - } - const compiledQuery = isCompilable(query) ? query.compile() : query; - return this.getExecutor().executeQuery(compiledQuery); - } - async [Symbol.asyncDispose]() { - await this.destroy(); - } -} -export class Transaction extends Kysely { - #props; - constructor(props) { - super(props); - this.#props = props; - } - // The return type is `true` instead of `boolean` to make Kysely - // unassignable to Transaction while allowing assignment the - // other way around. - get isTransaction() { - return true; - } - transaction() { - throw new Error('calling the transaction method for a Transaction is not supported'); - } - connection() { - throw new Error('calling the connection method for a Transaction is not supported'); - } - async destroy() { - throw new Error('calling the destroy method for a Transaction is not supported'); - } - withPlugin(plugin) { - return new Transaction({ - ...this.#props, - executor: this.#props.executor.withPlugin(plugin), - }); - } - withoutPlugins() { - return new Transaction({ - ...this.#props, - executor: this.#props.executor.withoutPlugins(), - }); - } - withSchema(schema) { - return new Transaction({ - ...this.#props, - executor: this.#props.executor.withPluginAtFront(new WithSchemaPlugin(schema)), - }); - } - withTables() { - return new Transaction({ ...this.#props }); - } -} -export function isKyselyProps(obj) { - return (isObject(obj) && - isObject(obj.config) && - isObject(obj.driver) && - isObject(obj.executor) && - isObject(obj.dialect)); -} -export class ConnectionBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - async execute(callback) { - return this.#props.executor.provideConnection(async (connection) => { - const executor = this.#props.executor.withConnectionProvider(new SingleConnectionProvider(connection)); - const db = new Kysely({ - ...this.#props, - executor, - }); - return await callback(db); - }); - } -} -export class TransactionBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - setAccessMode(accessMode) { - return new TransactionBuilder({ - ...this.#props, - accessMode, - }); - } - setIsolationLevel(isolationLevel) { - return new TransactionBuilder({ - ...this.#props, - isolationLevel, - }); - } - async execute(callback) { - const { isolationLevel, accessMode, ...kyselyProps } = this.#props; - const settings = { isolationLevel, accessMode }; - validateTransactionSettings(settings); - return this.#props.executor.provideConnection(async (connection) => { - const state = { isCommitted: false, isRolledBack: false }; - const executor = new NotCommittedOrRolledBackAssertingExecutor(this.#props.executor.withConnectionProvider(new SingleConnectionProvider(connection)), state); - const transaction = new Transaction({ - ...kyselyProps, - executor, - }); - let transactionBegun = false; - try { - await this.#props.driver.beginTransaction(connection, settings); - transactionBegun = true; - const result = await callback(transaction); - await this.#props.driver.commitTransaction(connection); - state.isCommitted = true; - return result; - } - catch (error) { - if (transactionBegun) { - await this.#props.driver.rollbackTransaction(connection); - state.isRolledBack = true; - } - throw error; - } - }); - } -} -export class ControlledTransactionBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - setAccessMode(accessMode) { - return new ControlledTransactionBuilder({ - ...this.#props, - accessMode, - }); - } - setIsolationLevel(isolationLevel) { - return new ControlledTransactionBuilder({ - ...this.#props, - isolationLevel, - }); - } - async execute() { - const { isolationLevel, accessMode, ...props } = this.#props; - const settings = { isolationLevel, accessMode }; - validateTransactionSettings(settings); - const connection = await provideControlledConnection(this.#props.executor); - await this.#props.driver.beginTransaction(connection.connection, settings); - return new ControlledTransaction({ - ...props, - connection, - executor: this.#props.executor.withConnectionProvider(new SingleConnectionProvider(connection.connection)), - }); - } -} -export class ControlledTransaction extends Transaction { - #props; - #compileQuery; - #state; - constructor(props) { - const state = { isCommitted: false, isRolledBack: false }; - props = { - ...props, - executor: new NotCommittedOrRolledBackAssertingExecutor(props.executor, state), - }; - const { connection, ...transactionProps } = props; - super(transactionProps); - this.#props = freeze(props); - this.#state = state; - const queryId = createQueryId(); - this.#compileQuery = (node) => props.executor.compileQuery(node, queryId); - } - get isCommitted() { - return this.#state.isCommitted; - } - get isRolledBack() { - return this.#state.isRolledBack; - } - /** - * Commits the transaction. - * - * See {@link rollback}. - * - * ### Examples - * - * ```ts - * import type { Kysely } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const trx = await db.startTransaction().execute() - * - * try { - * await doSomething(trx) - * - * await trx.commit().execute() - * } catch (error) { - * await trx.rollback().execute() - * } - * - * async function doSomething(kysely: Kysely) {} - * ``` - */ - commit() { - assertNotCommittedOrRolledBack(this.#state); - return new Command(async () => { - await this.#props.driver.commitTransaction(this.#props.connection.connection); - this.#state.isCommitted = true; - this.#props.connection.release(); - }); - } - /** - * Rolls back the transaction. - * - * See {@link commit} and {@link rollbackToSavepoint}. - * - * ### Examples - * - * ```ts - * import type { Kysely } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const trx = await db.startTransaction().execute() - * - * try { - * await doSomething(trx) - * - * await trx.commit().execute() - * } catch (error) { - * await trx.rollback().execute() - * } - * - * async function doSomething(kysely: Kysely) {} - * ``` - */ - rollback() { - assertNotCommittedOrRolledBack(this.#state); - return new Command(async () => { - await this.#props.driver.rollbackTransaction(this.#props.connection.connection); - this.#state.isRolledBack = true; - this.#props.connection.release(); - }); - } - /** - * Creates a savepoint with a given name. - * - * See {@link rollbackToSavepoint} and {@link releaseSavepoint}. - * - * For a type-safe experience, you should use the returned instance from now on. - * - * ### Examples - * - * ```ts - * import type { Kysely } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const trx = await db.startTransaction().execute() - * - * await insertJennifer(trx) - * - * const trxAfterJennifer = await trx.savepoint('after_jennifer').execute() - * - * try { - * await doSomething(trxAfterJennifer) - * } catch (error) { - * await trxAfterJennifer.rollbackToSavepoint('after_jennifer').execute() - * } - * - * async function insertJennifer(kysely: Kysely) {} - * async function doSomething(kysely: Kysely) {} - * ``` - */ - savepoint(savepointName) { - assertNotCommittedOrRolledBack(this.#state); - return new Command(async () => { - await this.#props.driver.savepoint?.(this.#props.connection.connection, savepointName, this.#compileQuery); - return new ControlledTransaction({ ...this.#props }); - }); - } - /** - * Rolls back to a savepoint with a given name. - * - * See {@link savepoint} and {@link releaseSavepoint}. - * - * You must use the same instance returned by {@link savepoint}, or - * escape the type-check by using `as any`. - * - * ### Examples - * - * ```ts - * import type { Kysely } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const trx = await db.startTransaction().execute() - * - * await insertJennifer(trx) - * - * const trxAfterJennifer = await trx.savepoint('after_jennifer').execute() - * - * try { - * await doSomething(trxAfterJennifer) - * } catch (error) { - * await trxAfterJennifer.rollbackToSavepoint('after_jennifer').execute() - * } - * - * async function insertJennifer(kysely: Kysely) {} - * async function doSomething(kysely: Kysely) {} - * ``` - */ - rollbackToSavepoint(savepointName) { - assertNotCommittedOrRolledBack(this.#state); - return new Command(async () => { - await this.#props.driver.rollbackToSavepoint?.(this.#props.connection.connection, savepointName, this.#compileQuery); - return new ControlledTransaction({ ...this.#props }); - }); - } - /** - * Releases a savepoint with a given name. - * - * See {@link savepoint} and {@link rollbackToSavepoint}. - * - * You must use the same instance returned by {@link savepoint}, or - * escape the type-check by using `as any`. - * - * ### Examples - * - * ```ts - * import type { Kysely } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const trx = await db.startTransaction().execute() - * - * await insertJennifer(trx) - * - * const trxAfterJennifer = await trx.savepoint('after_jennifer').execute() - * - * try { - * await doSomething(trxAfterJennifer) - * } catch (error) { - * await trxAfterJennifer.rollbackToSavepoint('after_jennifer').execute() - * } - * - * await trxAfterJennifer.releaseSavepoint('after_jennifer').execute() - * - * await doSomethingElse(trx) - * - * async function insertJennifer(kysely: Kysely) {} - * async function doSomething(kysely: Kysely) {} - * async function doSomethingElse(kysely: Kysely) {} - * ``` - */ - releaseSavepoint(savepointName) { - assertNotCommittedOrRolledBack(this.#state); - return new Command(async () => { - await this.#props.driver.releaseSavepoint?.(this.#props.connection.connection, savepointName, this.#compileQuery); - return new ControlledTransaction({ ...this.#props }); - }); - } - withPlugin(plugin) { - return new ControlledTransaction({ - ...this.#props, - executor: this.#props.executor.withPlugin(plugin), - }); - } - withoutPlugins() { - return new ControlledTransaction({ - ...this.#props, - executor: this.#props.executor.withoutPlugins(), - }); - } - withSchema(schema) { - return new ControlledTransaction({ - ...this.#props, - executor: this.#props.executor.withPluginAtFront(new WithSchemaPlugin(schema)), - }); - } - withTables() { - return new ControlledTransaction({ ...this.#props }); - } -} -export class Command { - #cb; - constructor(cb) { - this.#cb = cb; - } - /** - * Executes the command. - */ - async execute() { - return await this.#cb(); - } -} -function assertNotCommittedOrRolledBack(state) { - if (state.isCommitted) { - throw new Error('Transaction is already committed'); - } - if (state.isRolledBack) { - throw new Error('Transaction is already rolled back'); - } -} -/** - * An executor wrapper that asserts that the transaction state is not committed - * or rolled back when a query is executed. - * - * @internal - */ -class NotCommittedOrRolledBackAssertingExecutor { - #executor; - #state; - constructor(executor, state) { - if (executor instanceof NotCommittedOrRolledBackAssertingExecutor) { - this.#executor = executor.#executor; - } - else { - this.#executor = executor; - } - this.#state = state; - } - get adapter() { - return this.#executor.adapter; - } - get plugins() { - return this.#executor.plugins; - } - transformQuery(node, queryId) { - return this.#executor.transformQuery(node, queryId); - } - compileQuery(node, queryId) { - return this.#executor.compileQuery(node, queryId); - } - provideConnection(consumer) { - return this.#executor.provideConnection(consumer); - } - executeQuery(compiledQuery) { - assertNotCommittedOrRolledBack(this.#state); - return this.#executor.executeQuery(compiledQuery); - } - stream(compiledQuery, chunkSize) { - assertNotCommittedOrRolledBack(this.#state); - return this.#executor.stream(compiledQuery, chunkSize); - } - withConnectionProvider(connectionProvider) { - return new NotCommittedOrRolledBackAssertingExecutor(this.#executor.withConnectionProvider(connectionProvider), this.#state); - } - withPlugin(plugin) { - return new NotCommittedOrRolledBackAssertingExecutor(this.#executor.withPlugin(plugin), this.#state); - } - withPlugins(plugins) { - return new NotCommittedOrRolledBackAssertingExecutor(this.#executor.withPlugins(plugins), this.#state); - } - withPluginAtFront(plugin) { - return new NotCommittedOrRolledBackAssertingExecutor(this.#executor.withPluginAtFront(plugin), this.#state); - } - withoutPlugins() { - return new NotCommittedOrRolledBackAssertingExecutor(this.#executor.withoutPlugins(), this.#state); - } -} diff --git a/node_modules/kysely/dist/esm/migration/file-migration-provider.d.ts b/node_modules/kysely/dist/esm/migration/file-migration-provider.d.ts deleted file mode 100644 index 92222dc..0000000 --- a/node_modules/kysely/dist/esm/migration/file-migration-provider.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import type { Migration, MigrationProvider } from './migrator.js'; -/** - * Reads all migrations from a folder in node.js. - * - * ### Examples - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * - * new FileMigrationProvider({ - * fs, - * path, - * migrationFolder: 'path/to/migrations/folder' - * }) - * ``` - */ -export declare class FileMigrationProvider implements MigrationProvider { - #private; - constructor(props: FileMigrationProviderProps); - /** - * Returns all migrations, old and new. - * - * For example if you have your migrations in a folder as separate files, - * you can implement this method to return all migration in that folder - * as {@link Migration} objects. - * - * Kysely already has a built-in {@link FileMigrationProvider} for node.js - * that does exactly that. - * - * The keys of the returned object are migration names and values are the - * migrations. The order of the migrations is determined by the alphabetical - * order of the migration names. The items in the object don't need to be - * sorted, they are sorted by Kysely. - */ - getMigrations(): Promise>; -} -export interface FileMigrationProviderFS { - readdir(path: string): Promise; -} -export interface FileMigrationProviderPath { - join(...path: string[]): string; -} -export interface FileMigrationProviderProps { - fs: FileMigrationProviderFS; - path: FileMigrationProviderPath; - migrationFolder: string; -} diff --git a/node_modules/kysely/dist/esm/migration/file-migration-provider.js b/node_modules/kysely/dist/esm/migration/file-migration-provider.js deleted file mode 100644 index f410a83..0000000 --- a/node_modules/kysely/dist/esm/migration/file-migration-provider.js +++ /dev/null @@ -1,49 +0,0 @@ -/// -import { isFunction, isObject } from '../util/object-utils.js'; -/** - * Reads all migrations from a folder in node.js. - * - * ### Examples - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * - * new FileMigrationProvider({ - * fs, - * path, - * migrationFolder: 'path/to/migrations/folder' - * }) - * ``` - */ -export class FileMigrationProvider { - #props; - constructor(props) { - this.#props = props; - } - async getMigrations() { - const migrations = {}; - const files = await this.#props.fs.readdir(this.#props.migrationFolder); - for (const fileName of files) { - if (fileName.endsWith('.js') || - (fileName.endsWith('.ts') && !fileName.endsWith('.d.ts')) || - fileName.endsWith('.mjs') || - (fileName.endsWith('.mts') && !fileName.endsWith('.d.mts'))) { - const migration = await import( - /* webpackIgnore: true */ this.#props.path.join(this.#props.migrationFolder, fileName)); - const migrationKey = fileName.substring(0, fileName.lastIndexOf('.')); - // Handle esModuleInterop export's `default` prop... - if (isMigration(migration?.default)) { - migrations[migrationKey] = migration.default; - } - else if (isMigration(migration)) { - migrations[migrationKey] = migration; - } - } - } - return migrations; - } -} -function isMigration(obj) { - return isObject(obj) && isFunction(obj.up); -} diff --git a/node_modules/kysely/dist/esm/migration/migrator.d.ts b/node_modules/kysely/dist/esm/migration/migrator.d.ts deleted file mode 100644 index 4984b9f..0000000 --- a/node_modules/kysely/dist/esm/migration/migrator.d.ts +++ /dev/null @@ -1,395 +0,0 @@ -import type { Kysely } from '../kysely.js'; -export declare const DEFAULT_MIGRATION_TABLE = "kysely_migration"; -export declare const DEFAULT_MIGRATION_LOCK_TABLE = "kysely_migration_lock"; -export declare const DEFAULT_ALLOW_UNORDERED_MIGRATIONS = false; -export declare const MIGRATION_LOCK_ID = "migration_lock"; -export declare const NO_MIGRATIONS: NoMigrations; -export interface Migration { - up(db: Kysely): Promise; - /** - * An optional down method. - * - * If you don't provide a down method, the migration is skipped when - * migrating down. - */ - down?(db: Kysely): Promise; -} -/** - * A class for running migrations. - * - * ### Example - * - * This example uses the {@link FileMigrationProvider} that reads migrations - * files from a single folder. You can easily implement your own - * {@link MigrationProvider} if you want to provide migrations some - * other way. - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * import * as Sqlite from 'better-sqlite3' - * import { - * FileMigrationProvider, - * Kysely, - * Migrator, - * SqliteDialect - * } from 'kysely' - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: Sqlite(':memory:') - * }) - * }) - * - * const migrator = new Migrator({ - * db, - * provider: new FileMigrationProvider({ - * fs, - * // Path to the folder that contains all your migrations. - * migrationFolder: 'some/path/to/migrations', - * path, - * }) - * }) - * ``` - */ -export declare class Migrator { - #private; - constructor(props: MigratorProps); - /** - * Returns a {@link MigrationInfo} object for each migration. - * - * The returned array is sorted by migration name. - */ - getMigrations(): Promise>; - /** - * Runs all migrations that have not yet been run. - * - * This method returns a {@link MigrationResultSet} instance and _never_ throws. - * {@link MigrationResultSet.error} holds the error if something went wrong. - * {@link MigrationResultSet.results} contains information about which migrations - * were executed and which failed. See the examples below. - * - * This method goes through all possible migrations provided by the provider and runs the - * ones whose names come alphabetically after the last migration that has been run. If the - * list of executed migrations doesn't match the beginning of the list of possible migrations - * an error is returned. - * - * ### Examples - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * import * as Sqlite from 'better-sqlite3' - * import { FileMigrationProvider, Migrator } from 'kysely' - * - * const migrator = new Migrator({ - * db, - * provider: new FileMigrationProvider({ - * fs, - * migrationFolder: 'some/path/to/migrations', - * path, - * }) - * }) - * - * const { error, results } = await migrator.migrateToLatest() - * - * results?.forEach((it) => { - * if (it.status === 'Success') { - * console.log(`migration "${it.migrationName}" was executed successfully`) - * } else if (it.status === 'Error') { - * console.error(`failed to execute migration "${it.migrationName}"`) - * } - * }) - * - * if (error) { - * console.error('failed to run `migrateToLatest`') - * console.error(error) - * } - * ``` - */ - migrateToLatest(): Promise; - /** - * Migrate up/down to a specific migration. - * - * This method returns a {@link MigrationResultSet} instance and _never_ throws. - * {@link MigrationResultSet.error} holds the error if something went wrong. - * {@link MigrationResultSet.results} contains information about which migrations - * were executed and which failed. - * - * ### Examples - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * import { FileMigrationProvider, Migrator } from 'kysely' - * - * const migrator = new Migrator({ - * db, - * provider: new FileMigrationProvider({ - * fs, - * // Path to the folder that contains all your migrations. - * migrationFolder: 'some/path/to/migrations', - * path, - * }) - * }) - * - * await migrator.migrateTo('some_migration') - * ``` - * - * If you specify the name of the first migration, this method migrates - * down to the first migration, but doesn't run the `down` method of - * the first migration. In case you want to migrate all the way down, - * you can use a special constant `NO_MIGRATIONS`: - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * import { FileMigrationProvider, Migrator, NO_MIGRATIONS } from 'kysely' - * - * const migrator = new Migrator({ - * db, - * provider: new FileMigrationProvider({ - * fs, - * // Path to the folder that contains all your migrations. - * migrationFolder: 'some/path/to/migrations', - * path, - * }) - * }) - * - * await migrator.migrateTo(NO_MIGRATIONS) - * ``` - */ - migrateTo(targetMigrationName: string | NoMigrations): Promise; - /** - * Migrate one step up. - * - * This method returns a {@link MigrationResultSet} instance and _never_ throws. - * {@link MigrationResultSet.error} holds the error if something went wrong. - * {@link MigrationResultSet.results} contains information about which migrations - * were executed and which failed. - * - * ### Examples - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * import { FileMigrationProvider, Migrator } from 'kysely' - * - * const migrator = new Migrator({ - * db, - * provider: new FileMigrationProvider({ - * fs, - * // Path to the folder that contains all your migrations. - * migrationFolder: 'some/path/to/migrations', - * path, - * }) - * }) - * - * await migrator.migrateUp() - * ``` - */ - migrateUp(): Promise; - /** - * Migrate one step down. - * - * This method returns a {@link MigrationResultSet} instance and _never_ throws. - * {@link MigrationResultSet.error} holds the error if something went wrong. - * {@link MigrationResultSet.results} contains information about which migrations - * were executed and which failed. - * - * ### Examples - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * import { FileMigrationProvider, Migrator } from 'kysely' - * - * const migrator = new Migrator({ - * db, - * provider: new FileMigrationProvider({ - * fs, - * // Path to the folder that contains all your migrations. - * migrationFolder: 'some/path/to/migrations', - * path, - * }) - * }) - * - * await migrator.migrateDown() - * ``` - */ - migrateDown(): Promise; -} -export interface MigratorProps { - readonly db: Kysely; - readonly provider: MigrationProvider; - /** - * The name of the internal migration table. Defaults to `kysely_migration`. - * - * If you do specify this, you need to ALWAYS use the same value. Kysely doesn't - * support changing the table on the fly. If you run the migrator even once with a - * table name X and then change the table name to Y, kysely will create a new empty - * migration table and attempt to run the migrations again, which will obviously - * fail. - * - * If you do specify this, ALWAYS ALWAYS use the same value from the beginning of - * the project, to the end of time or prepare to manually migrate the migration - * tables. - */ - readonly migrationTableName?: string; - /** - * The name of the internal migration lock table. Defaults to `kysely_migration_lock`. - * - * If you do specify this, you need to ALWAYS use the same value. Kysely doesn't - * support changing the table on the fly. If you run the migrator even once with a - * table name X and then change the table name to Y, kysely will create a new empty - * lock table. - * - * If you do specify this, ALWAYS ALWAYS use the same value from the beginning of - * the project, to the end of time or prepare to manually migrate the migration - * tables. - */ - readonly migrationLockTableName?: string; - /** - * The schema of the internal migration tables. Defaults to the default schema - * on dialects that support schemas. - * - * If you do specify this, you need to ALWAYS use the same value. Kysely doesn't - * support changing the schema on the fly. If you run the migrator even once with a - * schema name X and then change the schema name to Y, kysely will create a new empty - * migration tables in the new schema and attempt to run the migrations again, which - * will obviously fail. - * - * If you do specify this, ALWAYS ALWAYS use the same value from the beginning of - * the project, to the end of time or prepare to manually migrate the migration - * tables. - * - * This only works on postgres and mssql. - */ - readonly migrationTableSchema?: string; - /** - * Enforces whether or not migrations must be run in alpha-numeric order. - * - * When false, migrations must be run in their exact alpha-numeric order. - * This is checked against the migrations already run in the database - * (`migrationTableName`). This ensures your migrations are always run in - * the same order and is the safest option. - * - * When true, migrations are still run in alpha-numeric order, but - * the order is not checked against already-run migrations in the database. - * Kysely will simply run all migrations that haven't run yet, in alpha-numeric - * order. - */ - readonly allowUnorderedMigrations?: boolean; - /** - * A function that compares migration names, used when sorting migrations in - * ascending order. - * - * Default is `name0.localeCompare(name1)`. - */ - readonly nameComparator?: (name0: string, name1: string) => number; - /** - * When `true`, don't run migrations in transactions even if the dialect supports transactional DDL. - * - * Default is `false`. - * - * This is useful when some migrations include queries that would fail otherwise. - */ - readonly disableTransactions?: boolean; -} -/** - * All migration methods ({@link Migrator.migrateTo | migrateTo}, - * {@link Migrator.migrateToLatest | migrateToLatest} etc.) never - * throw but return this object instead. - */ -export interface MigrationResultSet { - /** - * This is defined if something went wrong. - * - * An error may have occurred in one of the migrations in which case the - * {@link results} list contains an item with `status === 'Error'` to - * indicate which migration failed. - * - * An error may also have occurred before Kysely was able to figure out - * which migrations should be executed, in which case the {@link results} - * list is undefined. - */ - readonly error?: unknown; - /** - * {@link MigrationResult} for each individual migration that was supposed - * to be executed by the operation. - * - * If all went well, each result's `status` is `Success`. If some migration - * failed, the failed migration's result's `status` is `Error` and all - * results after that one have `status` ´NotExecuted`. - * - * This property can be undefined if an error occurred before Kysely was - * able to figure out which migrations should be executed. - * - * If this list is empty, there were no migrations to execute. - */ - readonly results?: MigrationResult[]; -} -type MigrationDirection = 'Up' | 'Down'; -export interface MigrationResult { - readonly migrationName: string; - /** - * The direction in which this migration was executed. - */ - readonly direction: MigrationDirection; - /** - * The execution status. - * - * - `Success` means the migration was successfully executed. Note that - * if any of the later migrations in the {@link MigrationResultSet.results} - * list failed (have status `Error`) AND the dialect supports transactional - * DDL, even the successfull migrations were rolled back. - * - * - `Error` means the migration failed. In this case the - * {@link MigrationResultSet.error} contains the error. - * - * - `NotExecuted` means that the migration was supposed to be executed - * but wasn't because an earlier migration failed. - */ - readonly status: 'Success' | 'Error' | 'NotExecuted'; -} -export interface MigrationProvider { - /** - * Returns all migrations, old and new. - * - * For example if you have your migrations in a folder as separate files, - * you can implement this method to return all migration in that folder - * as {@link Migration} objects. - * - * Kysely already has a built-in {@link FileMigrationProvider} for node.js - * that does exactly that. - * - * The keys of the returned object are migration names and values are the - * migrations. The order of the migrations is determined by the alphabetical - * order of the migration names. The items in the object don't need to be - * sorted, they are sorted by Kysely. - */ - getMigrations(): Promise>; -} -/** - * Type for the {@link NO_MIGRATIONS} constant. Never create one of these. - */ -export interface NoMigrations { - readonly __noMigrations__: true; -} -export interface MigrationInfo { - /** - * Name of the migration. - */ - name: string; - /** - * The actual migration. - */ - migration: Migration; - /** - * When was the migration executed. - * - * If this is undefined, the migration hasn't been executed yet. - */ - executedAt?: Date; -} -export {}; diff --git a/node_modules/kysely/dist/esm/migration/migrator.js b/node_modules/kysely/dist/esm/migration/migrator.js deleted file mode 100644 index 88308be..0000000 --- a/node_modules/kysely/dist/esm/migration/migrator.js +++ /dev/null @@ -1,608 +0,0 @@ -/// -import { NoopPlugin } from '../plugin/noop-plugin.js'; -import { WithSchemaPlugin } from '../plugin/with-schema/with-schema-plugin.js'; -import { freeze, getLast, isObject } from '../util/object-utils.js'; -export const DEFAULT_MIGRATION_TABLE = 'kysely_migration'; -export const DEFAULT_MIGRATION_LOCK_TABLE = 'kysely_migration_lock'; -export const DEFAULT_ALLOW_UNORDERED_MIGRATIONS = false; -export const MIGRATION_LOCK_ID = 'migration_lock'; -export const NO_MIGRATIONS = freeze({ __noMigrations__: true }); -/** - * A class for running migrations. - * - * ### Example - * - * This example uses the {@link FileMigrationProvider} that reads migrations - * files from a single folder. You can easily implement your own - * {@link MigrationProvider} if you want to provide migrations some - * other way. - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * import * as Sqlite from 'better-sqlite3' - * import { - * FileMigrationProvider, - * Kysely, - * Migrator, - * SqliteDialect - * } from 'kysely' - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: Sqlite(':memory:') - * }) - * }) - * - * const migrator = new Migrator({ - * db, - * provider: new FileMigrationProvider({ - * fs, - * // Path to the folder that contains all your migrations. - * migrationFolder: 'some/path/to/migrations', - * path, - * }) - * }) - * ``` - */ -export class Migrator { - #props; - constructor(props) { - this.#props = freeze(props); - } - /** - * Returns a {@link MigrationInfo} object for each migration. - * - * The returned array is sorted by migration name. - */ - async getMigrations() { - const tableExists = await this.#doesTableExist(this.#migrationTable); - const executedMigrations = tableExists - ? await this.#props.db - .withPlugin(this.#schemaPlugin) - .selectFrom(this.#migrationTable) - .select(['name', 'timestamp']) - .$narrowType() - .execute() - : []; - const migrations = await this.#resolveMigrations(); - return migrations.map(({ name, ...migration }) => { - const executed = executedMigrations.find((it) => it.name === name); - return { - name, - migration, - executedAt: executed ? new Date(executed.timestamp) : undefined, - }; - }); - } - /** - * Runs all migrations that have not yet been run. - * - * This method returns a {@link MigrationResultSet} instance and _never_ throws. - * {@link MigrationResultSet.error} holds the error if something went wrong. - * {@link MigrationResultSet.results} contains information about which migrations - * were executed and which failed. See the examples below. - * - * This method goes through all possible migrations provided by the provider and runs the - * ones whose names come alphabetically after the last migration that has been run. If the - * list of executed migrations doesn't match the beginning of the list of possible migrations - * an error is returned. - * - * ### Examples - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * import * as Sqlite from 'better-sqlite3' - * import { FileMigrationProvider, Migrator } from 'kysely' - * - * const migrator = new Migrator({ - * db, - * provider: new FileMigrationProvider({ - * fs, - * migrationFolder: 'some/path/to/migrations', - * path, - * }) - * }) - * - * const { error, results } = await migrator.migrateToLatest() - * - * results?.forEach((it) => { - * if (it.status === 'Success') { - * console.log(`migration "${it.migrationName}" was executed successfully`) - * } else if (it.status === 'Error') { - * console.error(`failed to execute migration "${it.migrationName}"`) - * } - * }) - * - * if (error) { - * console.error('failed to run `migrateToLatest`') - * console.error(error) - * } - * ``` - */ - async migrateToLatest() { - return this.#migrate(() => ({ direction: 'Up', step: Infinity })); - } - /** - * Migrate up/down to a specific migration. - * - * This method returns a {@link MigrationResultSet} instance and _never_ throws. - * {@link MigrationResultSet.error} holds the error if something went wrong. - * {@link MigrationResultSet.results} contains information about which migrations - * were executed and which failed. - * - * ### Examples - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * import { FileMigrationProvider, Migrator } from 'kysely' - * - * const migrator = new Migrator({ - * db, - * provider: new FileMigrationProvider({ - * fs, - * // Path to the folder that contains all your migrations. - * migrationFolder: 'some/path/to/migrations', - * path, - * }) - * }) - * - * await migrator.migrateTo('some_migration') - * ``` - * - * If you specify the name of the first migration, this method migrates - * down to the first migration, but doesn't run the `down` method of - * the first migration. In case you want to migrate all the way down, - * you can use a special constant `NO_MIGRATIONS`: - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * import { FileMigrationProvider, Migrator, NO_MIGRATIONS } from 'kysely' - * - * const migrator = new Migrator({ - * db, - * provider: new FileMigrationProvider({ - * fs, - * // Path to the folder that contains all your migrations. - * migrationFolder: 'some/path/to/migrations', - * path, - * }) - * }) - * - * await migrator.migrateTo(NO_MIGRATIONS) - * ``` - */ - async migrateTo(targetMigrationName) { - return this.#migrate(({ migrations, executedMigrations, pendingMigrations, }) => { - if (isObject(targetMigrationName) && - targetMigrationName.__noMigrations__ === true) { - return { direction: 'Down', step: Infinity }; - } - if (!migrations.find((m) => m.name === targetMigrationName)) { - throw new Error(`migration "${targetMigrationName}" doesn't exist`); - } - const executedIndex = executedMigrations.indexOf(targetMigrationName); - const pendingIndex = pendingMigrations.findIndex((m) => m.name === targetMigrationName); - if (executedIndex !== -1) { - return { - direction: 'Down', - step: executedMigrations.length - executedIndex - 1, - }; - } - else if (pendingIndex !== -1) { - return { direction: 'Up', step: pendingIndex + 1 }; - } - else { - throw new Error(`migration "${targetMigrationName}" isn't executed or pending`); - } - }); - } - /** - * Migrate one step up. - * - * This method returns a {@link MigrationResultSet} instance and _never_ throws. - * {@link MigrationResultSet.error} holds the error if something went wrong. - * {@link MigrationResultSet.results} contains information about which migrations - * were executed and which failed. - * - * ### Examples - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * import { FileMigrationProvider, Migrator } from 'kysely' - * - * const migrator = new Migrator({ - * db, - * provider: new FileMigrationProvider({ - * fs, - * // Path to the folder that contains all your migrations. - * migrationFolder: 'some/path/to/migrations', - * path, - * }) - * }) - * - * await migrator.migrateUp() - * ``` - */ - async migrateUp() { - return this.#migrate(() => ({ direction: 'Up', step: 1 })); - } - /** - * Migrate one step down. - * - * This method returns a {@link MigrationResultSet} instance and _never_ throws. - * {@link MigrationResultSet.error} holds the error if something went wrong. - * {@link MigrationResultSet.results} contains information about which migrations - * were executed and which failed. - * - * ### Examples - * - * ```ts - * import { promises as fs } from 'node:fs' - * import path from 'node:path' - * import { FileMigrationProvider, Migrator } from 'kysely' - * - * const migrator = new Migrator({ - * db, - * provider: new FileMigrationProvider({ - * fs, - * // Path to the folder that contains all your migrations. - * migrationFolder: 'some/path/to/migrations', - * path, - * }) - * }) - * - * await migrator.migrateDown() - * ``` - */ - async migrateDown() { - return this.#migrate(() => ({ direction: 'Down', step: 1 })); - } - async #migrate(getMigrationDirectionAndStep) { - try { - await this.#ensureMigrationTableSchemaExists(); - await this.#ensureMigrationTableExists(); - await this.#ensureMigrationLockTableExists(); - await this.#ensureLockRowExists(); - return await this.#runMigrations(getMigrationDirectionAndStep); - } - catch (error) { - if (error instanceof MigrationResultSetError) { - return error.resultSet; - } - return { error }; - } - } - get #migrationTableSchema() { - return this.#props.migrationTableSchema; - } - get #migrationTable() { - return this.#props.migrationTableName ?? DEFAULT_MIGRATION_TABLE; - } - get #migrationLockTable() { - return this.#props.migrationLockTableName ?? DEFAULT_MIGRATION_LOCK_TABLE; - } - get #allowUnorderedMigrations() { - return (this.#props.allowUnorderedMigrations ?? DEFAULT_ALLOW_UNORDERED_MIGRATIONS); - } - get #schemaPlugin() { - if (this.#migrationTableSchema) { - return new WithSchemaPlugin(this.#migrationTableSchema); - } - return new NoopPlugin(); - } - async #ensureMigrationTableSchemaExists() { - if (!this.#migrationTableSchema) { - // Use default schema. Nothing to do. - return; - } - const schemaExists = await this.#doesSchemaExist(); - if (schemaExists) { - return; - } - try { - await this.#createIfNotExists(this.#props.db.schema.createSchema(this.#migrationTableSchema)); - } - catch (error) { - const schemaExists = await this.#doesSchemaExist(); - // At least on PostgreSQL, `if not exists` doesn't guarantee the `create schema` - // query doesn't throw if the schema already exits. That's why we check if - // the schema exist here and ignore the error if it does. - if (!schemaExists) { - throw error; - } - } - } - async #ensureMigrationTableExists() { - const tableExists = await this.#doesTableExist(this.#migrationTable); - if (tableExists) { - return; - } - try { - await this.#createIfNotExists(this.#props.db.schema - .withPlugin(this.#schemaPlugin) - .createTable(this.#migrationTable) - .addColumn('name', 'varchar(255)', (col) => col.notNull().primaryKey()) - // The migration run time as ISO string. This is not a real date type as we - // can't know which data type is supported by all future dialects. - .addColumn('timestamp', 'varchar(255)', (col) => col.notNull())); - } - catch (error) { - const tableExists = await this.#doesTableExist(this.#migrationTable); - // At least on PostgreSQL, `if not exists` doesn't guarantee the `create table` - // query doesn't throw if the table already exits. That's why we check if - // the table exist here and ignore the error if it does. - if (!tableExists) { - throw error; - } - } - } - async #ensureMigrationLockTableExists() { - const tableExists = await this.#doesTableExist(this.#migrationLockTable); - if (tableExists) { - return; - } - try { - await this.#createIfNotExists(this.#props.db.schema - .withPlugin(this.#schemaPlugin) - .createTable(this.#migrationLockTable) - .addColumn('id', 'varchar(255)', (col) => col.notNull().primaryKey()) - .addColumn('is_locked', 'integer', (col) => col.notNull().defaultTo(0))); - } - catch (error) { - const tableExists = await this.#doesTableExist(this.#migrationLockTable); - // At least on PostgreSQL, `if not exists` doesn't guarantee the `create table` - // query doesn't throw if the table already exits. That's why we check if - // the table exist here and ignore the error if it does. - if (!tableExists) { - throw error; - } - } - } - async #ensureLockRowExists() { - const lockRowExists = await this.#doesLockRowExists(); - if (lockRowExists) { - return; - } - try { - await this.#props.db - .withPlugin(this.#schemaPlugin) - .insertInto(this.#migrationLockTable) - .values({ id: MIGRATION_LOCK_ID, is_locked: 0 }) - .execute(); - } - catch (error) { - const lockRowExists = await this.#doesLockRowExists(); - if (!lockRowExists) { - throw error; - } - } - } - async #doesSchemaExist() { - const schemas = await this.#props.db.introspection.getSchemas(); - return schemas.some((it) => it.name === this.#migrationTableSchema); - } - async #doesTableExist(tableName) { - const schema = this.#migrationTableSchema; - const tables = await this.#props.db.introspection.getTables({ - withInternalKyselyTables: true, - }); - return tables.some((it) => it.name === tableName && (!schema || it.schema === schema)); - } - async #doesLockRowExists() { - const lockRow = await this.#props.db - .withPlugin(this.#schemaPlugin) - .selectFrom(this.#migrationLockTable) - .where('id', '=', MIGRATION_LOCK_ID) - .select('id') - .executeTakeFirst(); - return !!lockRow; - } - async #runMigrations(getMigrationDirectionAndStep) { - const adapter = this.#props.db.getExecutor().adapter; - const lockOptions = freeze({ - lockTable: this.#props.migrationLockTableName ?? DEFAULT_MIGRATION_LOCK_TABLE, - lockRowId: MIGRATION_LOCK_ID, - lockTableSchema: this.#props.migrationTableSchema, - }); - const run = async (db) => { - try { - await adapter.acquireMigrationLock(db, lockOptions); - const state = await this.#getState(db); - if (state.migrations.length === 0) { - return { results: [] }; - } - const { direction, step } = getMigrationDirectionAndStep(state); - if (step <= 0) { - return { results: [] }; - } - if (direction === 'Down') { - return await this.#migrateDown(db, state, step); - } - else if (direction === 'Up') { - return await this.#migrateUp(db, state, step); - } - return { results: [] }; - } - finally { - await adapter.releaseMigrationLock(db, lockOptions); - } - }; - if (adapter.supportsTransactionalDdl && !this.#props.disableTransactions) { - return this.#props.db.transaction().execute(run); - } - else { - return this.#props.db.connection().execute(run); - } - } - async #getState(db) { - const migrations = await this.#resolveMigrations(); - const executedMigrations = await this.#getExecutedMigrations(db); - this.#ensureNoMissingMigrations(migrations, executedMigrations); - if (!this.#allowUnorderedMigrations) { - this.#ensureMigrationsInOrder(migrations, executedMigrations); - } - const pendingMigrations = this.#getPendingMigrations(migrations, executedMigrations); - return freeze({ - migrations, - executedMigrations, - lastMigration: getLast(executedMigrations), - pendingMigrations, - }); - } - #getPendingMigrations(migrations, executedMigrations) { - return migrations.filter((migration) => { - return !executedMigrations.includes(migration.name); - }); - } - async #resolveMigrations() { - const allMigrations = await this.#props.provider.getMigrations(); - return Object.keys(allMigrations) - .sort() - .map((name) => ({ - ...allMigrations[name], - name, - })); - } - async #getExecutedMigrations(db) { - const executedMigrations = await db - .withPlugin(this.#schemaPlugin) - .selectFrom(this.#migrationTable) - .select(['name', 'timestamp']) - .$narrowType() - .execute(); - const nameComparator = this.#props.nameComparator || ((a, b) => a.localeCompare(b)); - return (executedMigrations - // https://github.com/kysely-org/kysely/issues/843 - .sort((a, b) => { - if (a.timestamp === b.timestamp) { - return nameComparator(a.name, b.name); - } - return (new Date(a.timestamp).getTime() - new Date(b.timestamp).getTime()); - }) - .map((it) => it.name)); - } - #ensureNoMissingMigrations(migrations, executedMigrations) { - // Ensure all executed migrations exist in the `migrations` list. - for (const executed of executedMigrations) { - if (!migrations.some((it) => it.name === executed)) { - throw new Error(`corrupted migrations: previously executed migration ${executed} is missing`); - } - } - } - #ensureMigrationsInOrder(migrations, executedMigrations) { - // Ensure the executed migrations are the first ones in the migration list. - for (let i = 0; i < executedMigrations.length; ++i) { - if (migrations[i].name !== executedMigrations[i]) { - throw new Error(`corrupted migrations: expected previously executed migration ${executedMigrations[i]} to be at index ${i} but ${migrations[i].name} was found in its place. New migrations must always have a name that comes alphabetically after the last executed migration.`); - } - } - } - async #migrateDown(db, state, step) { - const migrationsToRollback = state.executedMigrations - .slice() - .reverse() - .slice(0, step) - .map((name) => { - return state.migrations.find((it) => it.name === name); - }); - const results = migrationsToRollback.map((migration) => { - return { - migrationName: migration.name, - direction: 'Down', - status: 'NotExecuted', - }; - }); - for (let i = 0; i < results.length; ++i) { - const migration = migrationsToRollback[i]; - try { - if (migration.down) { - await migration.down(db); - await db - .withPlugin(this.#schemaPlugin) - .deleteFrom(this.#migrationTable) - .where('name', '=', migration.name) - .execute(); - results[i] = { - migrationName: migration.name, - direction: 'Down', - status: 'Success', - }; - } - } - catch (error) { - results[i] = { - migrationName: migration.name, - direction: 'Down', - status: 'Error', - }; - throw new MigrationResultSetError({ - error, - results, - }); - } - } - return { results }; - } - async #migrateUp(db, state, step) { - const migrationsToRun = state.pendingMigrations.slice(0, step); - const results = migrationsToRun.map((migration) => { - return { - migrationName: migration.name, - direction: 'Up', - status: 'NotExecuted', - }; - }); - for (let i = 0; i < results.length; i++) { - const migration = state.pendingMigrations[i]; - try { - await migration.up(db); - await db - .withPlugin(this.#schemaPlugin) - .insertInto(this.#migrationTable) - .values({ - name: migration.name, - timestamp: new Date().toISOString(), - }) - .execute(); - results[i] = { - migrationName: migration.name, - direction: 'Up', - status: 'Success', - }; - } - catch (error) { - results[i] = { - migrationName: migration.name, - direction: 'Up', - status: 'Error', - }; - throw new MigrationResultSetError({ - error, - results, - }); - } - } - return { results }; - } - async #createIfNotExists(qb) { - if (this.#props.db.getExecutor().adapter.supportsCreateIfNotExists) { - qb = qb.ifNotExists(); - } - await qb.execute(); - } -} -class MigrationResultSetError extends Error { - #resultSet; - constructor(result) { - super(); - this.#resultSet = result; - } - get resultSet() { - return this.#resultSet; - } -} diff --git a/node_modules/kysely/dist/esm/operation-node/add-column-node.d.ts b/node_modules/kysely/dist/esm/operation-node/add-column-node.d.ts deleted file mode 100644 index 6b10f3b..0000000 --- a/node_modules/kysely/dist/esm/operation-node/add-column-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { ColumnDefinitionNode } from './column-definition-node.js'; -import type { OperationNode } from './operation-node.js'; -export interface AddColumnNode extends OperationNode { - readonly kind: 'AddColumnNode'; - readonly column: ColumnDefinitionNode; -} -type AddColumnNodeFactory = Readonly<{ - is(node: OperationNode): node is AddColumnNode; - create(column: ColumnDefinitionNode): Readonly; -}>; -/** - * @internal - */ -export declare const AddColumnNode: AddColumnNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/add-column-node.js b/node_modules/kysely/dist/esm/operation-node/add-column-node.js deleted file mode 100644 index b2c055a..0000000 --- a/node_modules/kysely/dist/esm/operation-node/add-column-node.js +++ /dev/null @@ -1,16 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const AddColumnNode = freeze({ - is(node) { - return node.kind === 'AddColumnNode'; - }, - create(column) { - return freeze({ - kind: 'AddColumnNode', - column, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/add-constraint-node.d.ts b/node_modules/kysely/dist/esm/operation-node/add-constraint-node.d.ts deleted file mode 100644 index 27f5b80..0000000 --- a/node_modules/kysely/dist/esm/operation-node/add-constraint-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { ConstraintNode } from './constraint-node.js'; -export interface AddConstraintNode extends OperationNode { - readonly kind: 'AddConstraintNode'; - readonly constraint: ConstraintNode; -} -type AddConstraintNodeFactory = Readonly<{ - is(node: OperationNode): node is AddConstraintNode; - create(constraint: ConstraintNode): Readonly; -}>; -/** - * @internal - */ -export declare const AddConstraintNode: AddConstraintNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/add-constraint-node.js b/node_modules/kysely/dist/esm/operation-node/add-constraint-node.js deleted file mode 100644 index 64b047e..0000000 --- a/node_modules/kysely/dist/esm/operation-node/add-constraint-node.js +++ /dev/null @@ -1,16 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const AddConstraintNode = freeze({ - is(node) { - return node.kind === 'AddConstraintNode'; - }, - create(constraint) { - return freeze({ - kind: 'AddConstraintNode', - constraint, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/add-index-node.d.ts b/node_modules/kysely/dist/esm/operation-node/add-index-node.d.ts deleted file mode 100644 index c3ae3f2..0000000 --- a/node_modules/kysely/dist/esm/operation-node/add-index-node.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { IdentifierNode } from './identifier-node.js'; -import type { OperationNode } from './operation-node.js'; -import type { RawNode } from './raw-node.js'; -export type AddIndexNodeProps = Omit; -export interface AddIndexNode extends OperationNode { - readonly kind: 'AddIndexNode'; - readonly name: IdentifierNode; - readonly columns?: OperationNode[]; - readonly unique?: boolean; - readonly using?: RawNode; - readonly ifNotExists?: boolean; -} -type AddIndexNodeFactory = Readonly<{ - is(node: OperationNode): node is AddIndexNode; - create(name: string): Readonly; - cloneWith(node: AddIndexNode, props: Omit): Readonly; - cloneWithColumns(node: AddIndexNode, columns: OperationNode[]): Readonly; -}>; -/** - * @internal - */ -export declare const AddIndexNode: AddIndexNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/add-index-node.js b/node_modules/kysely/dist/esm/operation-node/add-index-node.js deleted file mode 100644 index 74e2466..0000000 --- a/node_modules/kysely/dist/esm/operation-node/add-index-node.js +++ /dev/null @@ -1,29 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { IdentifierNode } from './identifier-node.js'; -/** - * @internal - */ -export const AddIndexNode = freeze({ - is(node) { - return node.kind === 'AddIndexNode'; - }, - create(name) { - return freeze({ - kind: 'AddIndexNode', - name: IdentifierNode.create(name), - }); - }, - cloneWith(node, props) { - return freeze({ - ...node, - ...props, - }); - }, - cloneWithColumns(node, columns) { - return freeze({ - ...node, - columns: [...(node.columns || []), ...columns], - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/aggregate-function-node.d.ts b/node_modules/kysely/dist/esm/operation-node/aggregate-function-node.d.ts deleted file mode 100644 index f61a7d0..0000000 --- a/node_modules/kysely/dist/esm/operation-node/aggregate-function-node.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { OverNode } from './over-node.js'; -import { WhereNode } from './where-node.js'; -import { OrderByNode } from './order-by-node.js'; -import type { OrderByItemNode } from './order-by-item-node.js'; -export interface AggregateFunctionNode extends OperationNode { - readonly kind: 'AggregateFunctionNode'; - readonly func: string; - readonly aggregated: readonly OperationNode[]; - readonly distinct?: boolean; - readonly orderBy?: OrderByNode; - readonly withinGroup?: OrderByNode; - readonly filter?: WhereNode; - readonly over?: OverNode; -} -type AggregateFunctionNodeFactory = Readonly<{ - is(node: OperationNode): node is AggregateFunctionNode; - create(aggregateFunction: string, aggregated?: readonly OperationNode[]): Readonly; - cloneWithDistinct(aggregateFunctionNode: AggregateFunctionNode): Readonly; - cloneWithOrderBy(aggregateFunctionNode: AggregateFunctionNode, orderItems: ReadonlyArray, withinGroup?: boolean): Readonly; - cloneWithFilter(aggregateFunctionNode: AggregateFunctionNode, filter: OperationNode): Readonly; - cloneWithOrFilter(aggregateFunctionNode: AggregateFunctionNode, filter: OperationNode): Readonly; - cloneWithOver(aggregateFunctionNode: AggregateFunctionNode, over?: OverNode): Readonly; -}>; -/** - * @internal - */ -export declare const AggregateFunctionNode: AggregateFunctionNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/aggregate-function-node.js b/node_modules/kysely/dist/esm/operation-node/aggregate-function-node.js deleted file mode 100644 index ae676fb..0000000 --- a/node_modules/kysely/dist/esm/operation-node/aggregate-function-node.js +++ /dev/null @@ -1,56 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { WhereNode } from './where-node.js'; -import { OrderByNode } from './order-by-node.js'; -/** - * @internal - */ -export const AggregateFunctionNode = freeze({ - is(node) { - return node.kind === 'AggregateFunctionNode'; - }, - create(aggregateFunction, aggregated = []) { - return freeze({ - kind: 'AggregateFunctionNode', - func: aggregateFunction, - aggregated, - }); - }, - cloneWithDistinct(aggregateFunctionNode) { - return freeze({ - ...aggregateFunctionNode, - distinct: true, - }); - }, - cloneWithOrderBy(aggregateFunctionNode, orderItems, withinGroup = false) { - const prop = withinGroup ? 'withinGroup' : 'orderBy'; - return freeze({ - ...aggregateFunctionNode, - [prop]: aggregateFunctionNode[prop] - ? OrderByNode.cloneWithItems(aggregateFunctionNode[prop], orderItems) - : OrderByNode.create(orderItems), - }); - }, - cloneWithFilter(aggregateFunctionNode, filter) { - return freeze({ - ...aggregateFunctionNode, - filter: aggregateFunctionNode.filter - ? WhereNode.cloneWithOperation(aggregateFunctionNode.filter, 'And', filter) - : WhereNode.create(filter), - }); - }, - cloneWithOrFilter(aggregateFunctionNode, filter) { - return freeze({ - ...aggregateFunctionNode, - filter: aggregateFunctionNode.filter - ? WhereNode.cloneWithOperation(aggregateFunctionNode.filter, 'Or', filter) - : WhereNode.create(filter), - }); - }, - cloneWithOver(aggregateFunctionNode, over) { - return freeze({ - ...aggregateFunctionNode, - over, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/alias-node.d.ts b/node_modules/kysely/dist/esm/operation-node/alias-node.d.ts deleted file mode 100644 index c977211..0000000 --- a/node_modules/kysely/dist/esm/operation-node/alias-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface AliasNode extends OperationNode { - readonly kind: 'AliasNode'; - readonly node: OperationNode; - readonly alias: OperationNode; -} -type AliasNodeFactory = Readonly<{ - is(node: OperationNode): node is AliasNode; - create(node: OperationNode, alias: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const AliasNode: AliasNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/alias-node.js b/node_modules/kysely/dist/esm/operation-node/alias-node.js deleted file mode 100644 index f00c422..0000000 --- a/node_modules/kysely/dist/esm/operation-node/alias-node.js +++ /dev/null @@ -1,17 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const AliasNode = freeze({ - is(node) { - return node.kind === 'AliasNode'; - }, - create(node, alias) { - return freeze({ - kind: 'AliasNode', - node, - alias, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/alter-column-node.d.ts b/node_modules/kysely/dist/esm/operation-node/alter-column-node.d.ts deleted file mode 100644 index a7e65e2..0000000 --- a/node_modules/kysely/dist/esm/operation-node/alter-column-node.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import { ColumnNode } from './column-node.js'; -import type { RawNode } from './raw-node.js'; -export type AlterColumnNodeProps = Omit; -export interface AlterColumnNode extends OperationNode { - readonly kind: 'AlterColumnNode'; - readonly column: ColumnNode; - readonly dataType?: OperationNode; - readonly dataTypeExpression?: RawNode; - readonly setDefault?: OperationNode; - readonly dropDefault?: true; - readonly setNotNull?: true; - readonly dropNotNull?: true; -} -type AlterColumnNodeFactory = Readonly<{ - is(node: OperationNode): node is AlterColumnNode; - create(column: string, prop: T, value: Required[T]): Readonly; -}>; -/** - * @internal - */ -export declare const AlterColumnNode: AlterColumnNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/alter-column-node.js b/node_modules/kysely/dist/esm/operation-node/alter-column-node.js deleted file mode 100644 index f5223a3..0000000 --- a/node_modules/kysely/dist/esm/operation-node/alter-column-node.js +++ /dev/null @@ -1,18 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { ColumnNode } from './column-node.js'; -/** - * @internal - */ -export const AlterColumnNode = freeze({ - is(node) { - return node.kind === 'AlterColumnNode'; - }, - create(column, prop, value) { - return freeze({ - kind: 'AlterColumnNode', - column: ColumnNode.create(column), - [prop]: value, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/alter-table-node.d.ts b/node_modules/kysely/dist/esm/operation-node/alter-table-node.d.ts deleted file mode 100644 index 4ee76b9..0000000 --- a/node_modules/kysely/dist/esm/operation-node/alter-table-node.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { AddColumnNode } from './add-column-node.js'; -import type { DropColumnNode } from './drop-column-node.js'; -import type { TableNode } from './table-node.js'; -import type { IdentifierNode } from './identifier-node.js'; -import type { RenameColumnNode } from './rename-column-node.js'; -import type { AlterColumnNode } from './alter-column-node.js'; -import type { AddConstraintNode } from './add-constraint-node.js'; -import type { DropConstraintNode } from './drop-constraint-node.js'; -import type { ModifyColumnNode } from './modify-column-node.js'; -import type { DropIndexNode } from './drop-index-node.js'; -import type { AddIndexNode } from './add-index-node.js'; -import type { RenameConstraintNode } from './rename-constraint-node.js'; -export type AlterTableNodeTableProps = Pick; -export type AlterTableColumnAlterationNode = RenameColumnNode | AddColumnNode | DropColumnNode | AlterColumnNode | ModifyColumnNode; -export interface AlterTableNode extends OperationNode { - readonly kind: 'AlterTableNode'; - readonly table: TableNode; - readonly renameTo?: TableNode; - readonly setSchema?: IdentifierNode; - readonly columnAlterations?: ReadonlyArray; - readonly addConstraint?: AddConstraintNode; - readonly dropConstraint?: DropConstraintNode; - readonly renameConstraint?: RenameConstraintNode; - readonly addIndex?: AddIndexNode; - readonly dropIndex?: DropIndexNode; -} -type AlterTableNodeFactory = Readonly<{ - is(node: OperationNode): node is AlterTableNode; - create(table: TableNode): Readonly; - cloneWithTableProps(node: AlterTableNode, props: AlterTableNodeTableProps): Readonly; - cloneWithColumnAlteration(node: AlterTableNode, columnAlteration: AlterTableColumnAlterationNode): Readonly; -}>; -/** - * @internal - */ -export declare const AlterTableNode: AlterTableNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/alter-table-node.js b/node_modules/kysely/dist/esm/operation-node/alter-table-node.js deleted file mode 100644 index 3204321..0000000 --- a/node_modules/kysely/dist/esm/operation-node/alter-table-node.js +++ /dev/null @@ -1,30 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const AlterTableNode = freeze({ - is(node) { - return node.kind === 'AlterTableNode'; - }, - create(table) { - return freeze({ - kind: 'AlterTableNode', - table, - }); - }, - cloneWithTableProps(node, props) { - return freeze({ - ...node, - ...props, - }); - }, - cloneWithColumnAlteration(node, columnAlteration) { - return freeze({ - ...node, - columnAlterations: node.columnAlterations - ? [...node.columnAlterations, columnAlteration] - : [columnAlteration], - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/and-node.d.ts b/node_modules/kysely/dist/esm/operation-node/and-node.d.ts deleted file mode 100644 index e9a494e..0000000 --- a/node_modules/kysely/dist/esm/operation-node/and-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface AndNode extends OperationNode { - readonly kind: 'AndNode'; - readonly left: OperationNode; - readonly right: OperationNode; -} -type AndNodeFactory = Readonly<{ - is(node: OperationNode): node is AndNode; - create(left: OperationNode, right: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const AndNode: AndNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/and-node.js b/node_modules/kysely/dist/esm/operation-node/and-node.js deleted file mode 100644 index a0d957d..0000000 --- a/node_modules/kysely/dist/esm/operation-node/and-node.js +++ /dev/null @@ -1,17 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const AndNode = freeze({ - is(node) { - return node.kind === 'AndNode'; - }, - create(left, right) { - return freeze({ - kind: 'AndNode', - left, - right, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/binary-operation-node.d.ts b/node_modules/kysely/dist/esm/operation-node/binary-operation-node.d.ts deleted file mode 100644 index 0f0bdae..0000000 --- a/node_modules/kysely/dist/esm/operation-node/binary-operation-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface BinaryOperationNode extends OperationNode { - readonly kind: 'BinaryOperationNode'; - readonly leftOperand: OperationNode; - readonly operator: OperationNode; - readonly rightOperand: OperationNode; -} -type BinaryOperationNodeFactory = Readonly<{ - is(node: OperationNode): node is BinaryOperationNode; - create(leftOperand: OperationNode, operator: OperationNode, rightOperand: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const BinaryOperationNode: BinaryOperationNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/binary-operation-node.js b/node_modules/kysely/dist/esm/operation-node/binary-operation-node.js deleted file mode 100644 index ed8525d..0000000 --- a/node_modules/kysely/dist/esm/operation-node/binary-operation-node.js +++ /dev/null @@ -1,18 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const BinaryOperationNode = freeze({ - is(node) { - return node.kind === 'BinaryOperationNode'; - }, - create(leftOperand, operator, rightOperand) { - return freeze({ - kind: 'BinaryOperationNode', - leftOperand, - operator, - rightOperand, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/case-node.d.ts b/node_modules/kysely/dist/esm/operation-node/case-node.d.ts deleted file mode 100644 index b4d6f1e..0000000 --- a/node_modules/kysely/dist/esm/operation-node/case-node.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import { WhenNode } from './when-node.js'; -export interface CaseNode extends OperationNode { - readonly kind: 'CaseNode'; - readonly value?: OperationNode; - readonly when?: ReadonlyArray; - readonly else?: OperationNode; - readonly isStatement?: boolean; -} -type CaseNodeFactory = Readonly<{ - is(node: OperationNode): node is CaseNode; - create(value?: OperationNode): Readonly; - cloneWithWhen(caseNode: CaseNode, when: WhenNode): Readonly; - cloneWithThen(caseNode: CaseNode, then: OperationNode): Readonly; - cloneWith(caseNode: CaseNode, props: Partial>): Readonly; -}>; -/** - * @internal - */ -export declare const CaseNode: CaseNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/case-node.js b/node_modules/kysely/dist/esm/operation-node/case-node.js deleted file mode 100644 index 1a607ec..0000000 --- a/node_modules/kysely/dist/esm/operation-node/case-node.js +++ /dev/null @@ -1,40 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { WhenNode } from './when-node.js'; -/** - * @internal - */ -export const CaseNode = freeze({ - is(node) { - return node.kind === 'CaseNode'; - }, - create(value) { - return freeze({ - kind: 'CaseNode', - value, - }); - }, - cloneWithWhen(caseNode, when) { - return freeze({ - ...caseNode, - when: freeze(caseNode.when ? [...caseNode.when, when] : [when]), - }); - }, - cloneWithThen(caseNode, then) { - return freeze({ - ...caseNode, - when: caseNode.when - ? freeze([ - ...caseNode.when.slice(0, -1), - WhenNode.cloneWithResult(caseNode.when[caseNode.when.length - 1], then), - ]) - : undefined, - }); - }, - cloneWith(caseNode, props) { - return freeze({ - ...caseNode, - ...props, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/cast-node.d.ts b/node_modules/kysely/dist/esm/operation-node/cast-node.d.ts deleted file mode 100644 index c29c8de..0000000 --- a/node_modules/kysely/dist/esm/operation-node/cast-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface CastNode extends OperationNode { - readonly kind: 'CastNode'; - readonly expression: OperationNode; - readonly dataType: OperationNode; -} -type CastNodeFactory = Readonly<{ - is(node: OperationNode): node is CastNode; - create(expression: OperationNode, dataType: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const CastNode: CastNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/cast-node.js b/node_modules/kysely/dist/esm/operation-node/cast-node.js deleted file mode 100644 index bdb7bcc..0000000 --- a/node_modules/kysely/dist/esm/operation-node/cast-node.js +++ /dev/null @@ -1,17 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const CastNode = freeze({ - is(node) { - return node.kind === 'CastNode'; - }, - create(expression, dataType) { - return freeze({ - kind: 'CastNode', - expression, - dataType, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/check-constraint-node.d.ts b/node_modules/kysely/dist/esm/operation-node/check-constraint-node.d.ts deleted file mode 100644 index 230f7bd..0000000 --- a/node_modules/kysely/dist/esm/operation-node/check-constraint-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import { IdentifierNode } from './identifier-node.js'; -export interface CheckConstraintNode extends OperationNode { - readonly kind: 'CheckConstraintNode'; - readonly expression: OperationNode; - readonly name?: IdentifierNode; -} -type CheckConstraintNodeFactory = Readonly<{ - is(node: OperationNode): node is CheckConstraintNode; - create(expression: OperationNode, constraintName?: string): Readonly; -}>; -/** - * @internal - */ -export declare const CheckConstraintNode: CheckConstraintNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/check-constraint-node.js b/node_modules/kysely/dist/esm/operation-node/check-constraint-node.js deleted file mode 100644 index 8d596ea..0000000 --- a/node_modules/kysely/dist/esm/operation-node/check-constraint-node.js +++ /dev/null @@ -1,20 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { IdentifierNode } from './identifier-node.js'; -/** - * @internal - */ -export const CheckConstraintNode = freeze({ - is(node) { - return node.kind === 'CheckConstraintNode'; - }, - create(expression, constraintName) { - return freeze({ - kind: 'CheckConstraintNode', - expression, - name: constraintName - ? IdentifierNode.create(constraintName) - : undefined, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/collate-node.d.ts b/node_modules/kysely/dist/esm/operation-node/collate-node.d.ts deleted file mode 100644 index d87cb31..0000000 --- a/node_modules/kysely/dist/esm/operation-node/collate-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { IdentifierNode } from './identifier-node.js'; -import type { OperationNode } from './operation-node.js'; -export interface CollateNode extends OperationNode { - readonly kind: 'CollateNode'; - readonly collation: IdentifierNode; -} -type CollateNodeFactory = Readonly<{ - is(node: OperationNode): node is CollateNode; - create(collation: string): Readonly; -}>; -/** - * @internal - */ -export declare const CollateNode: CollateNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/collate-node.js b/node_modules/kysely/dist/esm/operation-node/collate-node.js deleted file mode 100644 index 26bcb23..0000000 --- a/node_modules/kysely/dist/esm/operation-node/collate-node.js +++ /dev/null @@ -1,17 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { IdentifierNode } from './identifier-node.js'; -/** - * @internal - */ -export const CollateNode = freeze({ - is(node) { - return node.kind === 'CollateNode'; - }, - create(collation) { - return freeze({ - kind: 'CollateNode', - collation: IdentifierNode.create(collation), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/column-definition-node.d.ts b/node_modules/kysely/dist/esm/operation-node/column-definition-node.d.ts deleted file mode 100644 index d2e9012..0000000 --- a/node_modules/kysely/dist/esm/operation-node/column-definition-node.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import type { CheckConstraintNode } from './check-constraint-node.js'; -import { ColumnNode } from './column-node.js'; -import type { DefaultValueNode } from './default-value-node.js'; -import type { GeneratedNode } from './generated-node.js'; -import type { OperationNode } from './operation-node.js'; -import type { ReferencesNode } from './references-node.js'; -export type ColumnDefinitionNodeProps = Omit, 'kind' | 'dataType'>; -export interface ColumnDefinitionNode extends OperationNode { - readonly kind: 'ColumnDefinitionNode'; - readonly column: ColumnNode; - readonly dataType: OperationNode; - readonly references?: ReferencesNode; - readonly primaryKey?: boolean; - readonly autoIncrement?: boolean; - readonly unique?: boolean; - readonly notNull?: boolean; - readonly defaultTo?: DefaultValueNode; - readonly check?: CheckConstraintNode; - readonly generated?: GeneratedNode; - readonly unsigned?: boolean; - readonly frontModifiers?: ReadonlyArray; - readonly endModifiers?: ReadonlyArray; - readonly nullsNotDistinct?: boolean; - readonly identity?: boolean; - readonly ifNotExists?: boolean; -} -type ColumnDefinitionNodeFactory = Readonly<{ - is(node: OperationNode): node is ColumnDefinitionNode; - create(column: string, dataType: OperationNode): Readonly; - cloneWithFrontModifier(node: ColumnDefinitionNode, modifier: OperationNode): Readonly; - cloneWithEndModifier(node: ColumnDefinitionNode, modifier: OperationNode): Readonly; - cloneWith(node: ColumnDefinitionNode, props: ColumnDefinitionNodeProps): Readonly; -}>; -/** - * @internal - */ -export declare const ColumnDefinitionNode: ColumnDefinitionNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/column-definition-node.js b/node_modules/kysely/dist/esm/operation-node/column-definition-node.js deleted file mode 100644 index 31fe802..0000000 --- a/node_modules/kysely/dist/esm/operation-node/column-definition-node.js +++ /dev/null @@ -1,40 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { ColumnNode } from './column-node.js'; -/** - * @internal - */ -export const ColumnDefinitionNode = freeze({ - is(node) { - return node.kind === 'ColumnDefinitionNode'; - }, - create(column, dataType) { - return freeze({ - kind: 'ColumnDefinitionNode', - column: ColumnNode.create(column), - dataType, - }); - }, - cloneWithFrontModifier(node, modifier) { - return freeze({ - ...node, - frontModifiers: node.frontModifiers - ? freeze([...node.frontModifiers, modifier]) - : [modifier], - }); - }, - cloneWithEndModifier(node, modifier) { - return freeze({ - ...node, - endModifiers: node.endModifiers - ? freeze([...node.endModifiers, modifier]) - : [modifier], - }); - }, - cloneWith(node, props) { - return freeze({ - ...node, - ...props, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/column-node.d.ts b/node_modules/kysely/dist/esm/operation-node/column-node.d.ts deleted file mode 100644 index e1438c1..0000000 --- a/node_modules/kysely/dist/esm/operation-node/column-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { IdentifierNode } from './identifier-node.js'; -import type { OperationNode } from './operation-node.js'; -export interface ColumnNode extends OperationNode { - readonly kind: 'ColumnNode'; - readonly column: IdentifierNode; -} -type ColumnNodeFactory = Readonly<{ - is(node: OperationNode): node is ColumnNode; - create(column: string): Readonly; -}>; -/** - * @internal - */ -export declare const ColumnNode: ColumnNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/column-node.js b/node_modules/kysely/dist/esm/operation-node/column-node.js deleted file mode 100644 index b17a111..0000000 --- a/node_modules/kysely/dist/esm/operation-node/column-node.js +++ /dev/null @@ -1,17 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { IdentifierNode } from './identifier-node.js'; -/** - * @internal - */ -export const ColumnNode = freeze({ - is(node) { - return node.kind === 'ColumnNode'; - }, - create(column) { - return freeze({ - kind: 'ColumnNode', - column: IdentifierNode.create(column), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/column-update-node.d.ts b/node_modules/kysely/dist/esm/operation-node/column-update-node.d.ts deleted file mode 100644 index a741b9a..0000000 --- a/node_modules/kysely/dist/esm/operation-node/column-update-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface ColumnUpdateNode extends OperationNode { - readonly kind: 'ColumnUpdateNode'; - readonly column: OperationNode; - readonly value: OperationNode; -} -type ColumnUpdateNodeFactory = Readonly<{ - is(node: OperationNode): node is ColumnUpdateNode; - create(column: OperationNode, value: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const ColumnUpdateNode: ColumnUpdateNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/column-update-node.js b/node_modules/kysely/dist/esm/operation-node/column-update-node.js deleted file mode 100644 index 008becd..0000000 --- a/node_modules/kysely/dist/esm/operation-node/column-update-node.js +++ /dev/null @@ -1,17 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const ColumnUpdateNode = freeze({ - is(node) { - return node.kind === 'ColumnUpdateNode'; - }, - create(column, value) { - return freeze({ - kind: 'ColumnUpdateNode', - column, - value, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/common-table-expression-name-node.d.ts b/node_modules/kysely/dist/esm/operation-node/common-table-expression-name-node.d.ts deleted file mode 100644 index 31d9f0c..0000000 --- a/node_modules/kysely/dist/esm/operation-node/common-table-expression-name-node.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { ColumnNode } from './column-node.js'; -import type { OperationNode } from './operation-node.js'; -import { TableNode } from './table-node.js'; -export interface CommonTableExpressionNameNode extends OperationNode { - readonly kind: 'CommonTableExpressionNameNode'; - readonly table: TableNode; - readonly columns?: ReadonlyArray; -} -type CommonTableExpressionNameNodeFactory = Readonly<{ - is(node: OperationNode): node is CommonTableExpressionNameNode; - create(tableName: string, columnNames?: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const CommonTableExpressionNameNode: CommonTableExpressionNameNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/common-table-expression-name-node.js b/node_modules/kysely/dist/esm/operation-node/common-table-expression-name-node.js deleted file mode 100644 index d68cdd1..0000000 --- a/node_modules/kysely/dist/esm/operation-node/common-table-expression-name-node.js +++ /dev/null @@ -1,21 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { ColumnNode } from './column-node.js'; -import { TableNode } from './table-node.js'; -/** - * @internal - */ -export const CommonTableExpressionNameNode = freeze({ - is(node) { - return node.kind === 'CommonTableExpressionNameNode'; - }, - create(tableName, columnNames) { - return freeze({ - kind: 'CommonTableExpressionNameNode', - table: TableNode.create(tableName), - columns: columnNames - ? freeze(columnNames.map(ColumnNode.create)) - : undefined, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/common-table-expression-node.d.ts b/node_modules/kysely/dist/esm/operation-node/common-table-expression-node.d.ts deleted file mode 100644 index c1d8e75..0000000 --- a/node_modules/kysely/dist/esm/operation-node/common-table-expression-node.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { CommonTableExpressionNameNode } from './common-table-expression-name-node.js'; -import type { OperationNode } from './operation-node.js'; -type CommonTableExpressionNodeProps = Pick; -export interface CommonTableExpressionNode extends OperationNode { - readonly kind: 'CommonTableExpressionNode'; - readonly name: CommonTableExpressionNameNode; - readonly materialized?: boolean; - readonly expression: OperationNode; -} -type CommonTableExpressionNodeFactory = Readonly<{ - is(node: OperationNode): node is CommonTableExpressionNode; - create(name: CommonTableExpressionNameNode, expression: OperationNode): Readonly; - cloneWith(node: CommonTableExpressionNode, props: CommonTableExpressionNodeProps): Readonly; -}>; -/** - * @internal - */ -export declare const CommonTableExpressionNode: CommonTableExpressionNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/common-table-expression-node.js b/node_modules/kysely/dist/esm/operation-node/common-table-expression-node.js deleted file mode 100644 index d8399ef..0000000 --- a/node_modules/kysely/dist/esm/operation-node/common-table-expression-node.js +++ /dev/null @@ -1,23 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const CommonTableExpressionNode = freeze({ - is(node) { - return node.kind === 'CommonTableExpressionNode'; - }, - create(name, expression) { - return freeze({ - kind: 'CommonTableExpressionNode', - name, - expression, - }); - }, - cloneWith(node, props) { - return freeze({ - ...node, - ...props, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/constraint-node.d.ts b/node_modules/kysely/dist/esm/operation-node/constraint-node.d.ts deleted file mode 100644 index d0f72aa..0000000 --- a/node_modules/kysely/dist/esm/operation-node/constraint-node.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { CheckConstraintNode } from './check-constraint-node.js'; -import type { ForeignKeyConstraintNode } from './foreign-key-constraint-node.js'; -import type { PrimaryKeyConstraintNode } from './primary-key-constraint-node.js'; -import type { UniqueConstraintNode } from './unique-constraint-node.js'; -export type ConstraintNode = PrimaryKeyConstraintNode | UniqueConstraintNode | CheckConstraintNode | ForeignKeyConstraintNode; diff --git a/node_modules/kysely/dist/esm/operation-node/constraint-node.js b/node_modules/kysely/dist/esm/operation-node/constraint-node.js deleted file mode 100644 index 3d61fc9..0000000 --- a/node_modules/kysely/dist/esm/operation-node/constraint-node.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/create-index-node.d.ts b/node_modules/kysely/dist/esm/operation-node/create-index-node.d.ts deleted file mode 100644 index 1dc2b40..0000000 --- a/node_modules/kysely/dist/esm/operation-node/create-index-node.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { IdentifierNode } from './identifier-node.js'; -import type { OperationNode } from './operation-node.js'; -import type { RawNode } from './raw-node.js'; -import type { TableNode } from './table-node.js'; -import type { WhereNode } from './where-node.js'; -export type CreateIndexNodeProps = Omit; -export type IndexType = 'btree' | 'hash' | 'gist' | 'gin'; -export interface CreateIndexNode extends OperationNode { - readonly kind: 'CreateIndexNode'; - readonly name: IdentifierNode; - readonly table?: TableNode; - readonly columns?: OperationNode[]; - readonly unique?: boolean; - readonly using?: RawNode; - readonly ifNotExists?: boolean; - readonly where?: WhereNode; - readonly nullsNotDistinct?: boolean; -} -type CreateIndexNodeFactory = Readonly<{ - is(node: OperationNode): node is CreateIndexNode; - create(name: string): Readonly; - cloneWith(node: CreateIndexNode, props: CreateIndexNodeProps): Readonly; - cloneWithColumns(node: CreateIndexNode, columns: OperationNode[]): Readonly; -}>; -/** - * @internal - */ -export declare const CreateIndexNode: CreateIndexNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/create-index-node.js b/node_modules/kysely/dist/esm/operation-node/create-index-node.js deleted file mode 100644 index 526532c..0000000 --- a/node_modules/kysely/dist/esm/operation-node/create-index-node.js +++ /dev/null @@ -1,29 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { IdentifierNode } from './identifier-node.js'; -/** - * @internal - */ -export const CreateIndexNode = freeze({ - is(node) { - return node.kind === 'CreateIndexNode'; - }, - create(name) { - return freeze({ - kind: 'CreateIndexNode', - name: IdentifierNode.create(name), - }); - }, - cloneWith(node, props) { - return freeze({ - ...node, - ...props, - }); - }, - cloneWithColumns(node, columns) { - return freeze({ - ...node, - columns: [...(node.columns || []), ...columns], - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/create-schema-node.d.ts b/node_modules/kysely/dist/esm/operation-node/create-schema-node.d.ts deleted file mode 100644 index 1fa0404..0000000 --- a/node_modules/kysely/dist/esm/operation-node/create-schema-node.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { IdentifierNode } from './identifier-node.js'; -import type { OperationNode } from './operation-node.js'; -export type CreateSchemaNodeParams = Omit, 'kind' | 'schema'>; -export interface CreateSchemaNode extends OperationNode { - readonly kind: 'CreateSchemaNode'; - readonly schema: IdentifierNode; - readonly ifNotExists?: boolean; -} -type CreateSchemaNodeFactory = Readonly<{ - is(node: OperationNode): node is CreateSchemaNode; - create(schema: string, params?: CreateSchemaNodeParams): Readonly; - cloneWith(createSchema: CreateSchemaNode, params: CreateSchemaNodeParams): Readonly; -}>; -/** - * @internal - */ -export declare const CreateSchemaNode: CreateSchemaNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/create-schema-node.js b/node_modules/kysely/dist/esm/operation-node/create-schema-node.js deleted file mode 100644 index 9aa7a93..0000000 --- a/node_modules/kysely/dist/esm/operation-node/create-schema-node.js +++ /dev/null @@ -1,24 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { IdentifierNode } from './identifier-node.js'; -/** - * @internal - */ -export const CreateSchemaNode = freeze({ - is(node) { - return node.kind === 'CreateSchemaNode'; - }, - create(schema, params) { - return freeze({ - kind: 'CreateSchemaNode', - schema: IdentifierNode.create(schema), - ...params, - }); - }, - cloneWith(createSchema, params) { - return freeze({ - ...createSchema, - ...params, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/create-table-node.d.ts b/node_modules/kysely/dist/esm/operation-node/create-table-node.d.ts deleted file mode 100644 index f5d6cd7..0000000 --- a/node_modules/kysely/dist/esm/operation-node/create-table-node.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { TableNode } from './table-node.js'; -import type { ConstraintNode } from './constraint-node.js'; -import type { ColumnDefinitionNode } from './column-definition-node.js'; -import type { ArrayItemType } from '../util/type-utils.js'; -export declare const ON_COMMIT_ACTIONS: string[]; -export type OnCommitAction = ArrayItemType; -export type CreateTableNodeParams = Omit; -export interface CreateTableNode extends OperationNode { - readonly kind: 'CreateTableNode'; - readonly table: TableNode; - readonly columns: ReadonlyArray; - readonly constraints?: ReadonlyArray; - readonly temporary?: boolean; - readonly ifNotExists?: boolean; - readonly onCommit?: OnCommitAction; - readonly frontModifiers?: ReadonlyArray; - readonly endModifiers?: ReadonlyArray; - readonly selectQuery?: OperationNode; -} -type CreateTableNodeFactory = Readonly<{ - is(node: OperationNode): node is CreateTableNode; - create(table: TableNode): Readonly; - cloneWithColumn(createTable: CreateTableNode, column: ColumnDefinitionNode): Readonly; - cloneWithConstraint(createTable: CreateTableNode, constraint: ConstraintNode): Readonly; - cloneWithFrontModifier(createTable: CreateTableNode, modifier: OperationNode): Readonly; - cloneWithEndModifier(createTable: CreateTableNode, modifier: OperationNode): Readonly; - cloneWith(createTable: CreateTableNode, params: CreateTableNodeParams): Readonly; -}>; -/** - * @internal - */ -export declare const CreateTableNode: CreateTableNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/create-table-node.js b/node_modules/kysely/dist/esm/operation-node/create-table-node.js deleted file mode 100644 index 4a5cc3a..0000000 --- a/node_modules/kysely/dist/esm/operation-node/create-table-node.js +++ /dev/null @@ -1,54 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -export const ON_COMMIT_ACTIONS = ['preserve rows', 'delete rows', 'drop']; -/** - * @internal - */ -export const CreateTableNode = freeze({ - is(node) { - return node.kind === 'CreateTableNode'; - }, - create(table) { - return freeze({ - kind: 'CreateTableNode', - table, - columns: freeze([]), - }); - }, - cloneWithColumn(createTable, column) { - return freeze({ - ...createTable, - columns: freeze([...createTable.columns, column]), - }); - }, - cloneWithConstraint(createTable, constraint) { - return freeze({ - ...createTable, - constraints: createTable.constraints - ? freeze([...createTable.constraints, constraint]) - : freeze([constraint]), - }); - }, - cloneWithFrontModifier(createTable, modifier) { - return freeze({ - ...createTable, - frontModifiers: createTable.frontModifiers - ? freeze([...createTable.frontModifiers, modifier]) - : freeze([modifier]), - }); - }, - cloneWithEndModifier(createTable, modifier) { - return freeze({ - ...createTable, - endModifiers: createTable.endModifiers - ? freeze([...createTable.endModifiers, modifier]) - : freeze([modifier]), - }); - }, - cloneWith(createTable, params) { - return freeze({ - ...createTable, - ...params, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/create-type-node.d.ts b/node_modules/kysely/dist/esm/operation-node/create-type-node.d.ts deleted file mode 100644 index dc2400e..0000000 --- a/node_modules/kysely/dist/esm/operation-node/create-type-node.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { SchemableIdentifierNode } from './schemable-identifier-node.js'; -import { ValueListNode } from './value-list-node.js'; -export type CreateTypeNodeParams = Omit, 'kind'>; -export interface CreateTypeNode extends OperationNode { - readonly kind: 'CreateTypeNode'; - readonly name: SchemableIdentifierNode; - readonly enum?: ValueListNode; -} -type CreateTypeNodeFactory = Readonly<{ - is(node: OperationNode): node is CreateTypeNode; - create(name: SchemableIdentifierNode): Readonly; - cloneWithEnum(createType: CreateTypeNode, values: readonly string[]): Readonly; -}>; -/** - * @internal - */ -export declare const CreateTypeNode: CreateTypeNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/create-type-node.js b/node_modules/kysely/dist/esm/operation-node/create-type-node.js deleted file mode 100644 index afe4f08..0000000 --- a/node_modules/kysely/dist/esm/operation-node/create-type-node.js +++ /dev/null @@ -1,24 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { ValueListNode } from './value-list-node.js'; -import { ValueNode } from './value-node.js'; -/** - * @internal - */ -export const CreateTypeNode = freeze({ - is(node) { - return node.kind === 'CreateTypeNode'; - }, - create(name) { - return freeze({ - kind: 'CreateTypeNode', - name, - }); - }, - cloneWithEnum(createType, values) { - return freeze({ - ...createType, - enum: ValueListNode.create(values.map(ValueNode.createImmediate)), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/create-view-node.d.ts b/node_modules/kysely/dist/esm/operation-node/create-view-node.d.ts deleted file mode 100644 index cab2f4e..0000000 --- a/node_modules/kysely/dist/esm/operation-node/create-view-node.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import type { ColumnNode } from './column-node.js'; -import type { OperationNode } from './operation-node.js'; -import type { RawNode } from './raw-node.js'; -import { SchemableIdentifierNode } from './schemable-identifier-node.js'; -import type { SelectQueryNode } from './select-query-node.js'; -export type CreateViewNodeParams = Omit, 'kind' | 'name'>; -export interface CreateViewNode extends OperationNode { - readonly kind: 'CreateViewNode'; - readonly name: SchemableIdentifierNode; - readonly temporary?: boolean; - readonly materialized?: boolean; - readonly orReplace?: boolean; - readonly ifNotExists?: boolean; - readonly columns?: ReadonlyArray; - readonly as?: SelectQueryNode | RawNode; -} -type CreateViewNodeFactory = Readonly<{ - is(node: OperationNode): node is CreateViewNode; - create(name: string): Readonly; - cloneWith(createView: CreateViewNode, params: CreateViewNodeParams): Readonly; -}>; -/** - * @internal - */ -export declare const CreateViewNode: CreateViewNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/create-view-node.js b/node_modules/kysely/dist/esm/operation-node/create-view-node.js deleted file mode 100644 index 4c01b3c..0000000 --- a/node_modules/kysely/dist/esm/operation-node/create-view-node.js +++ /dev/null @@ -1,23 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { SchemableIdentifierNode } from './schemable-identifier-node.js'; -/** - * @internal - */ -export const CreateViewNode = freeze({ - is(node) { - return node.kind === 'CreateViewNode'; - }, - create(name) { - return freeze({ - kind: 'CreateViewNode', - name: SchemableIdentifierNode.create(name), - }); - }, - cloneWith(createView, params) { - return freeze({ - ...createView, - ...params, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/data-type-node.d.ts b/node_modules/kysely/dist/esm/operation-node/data-type-node.d.ts deleted file mode 100644 index 15abd4d..0000000 --- a/node_modules/kysely/dist/esm/operation-node/data-type-node.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -declare const SIMPLE_COLUMN_DATA_TYPES: readonly ["varchar", "char", "text", "integer", "int2", "int4", "int8", "smallint", "bigint", "boolean", "real", "double precision", "float4", "float8", "decimal", "numeric", "binary", "bytea", "date", "datetime", "time", "timetz", "timestamp", "timestamptz", "serial", "bigserial", "uuid", "json", "jsonb", "blob", "varbinary", "int4range", "int4multirange", "int8range", "int8multirange", "numrange", "nummultirange", "tsrange", "tsmultirange", "tstzrange", "tstzmultirange", "daterange", "datemultirange"]; -type SimpleColumnDataType = (typeof SIMPLE_COLUMN_DATA_TYPES)[number]; -export type ColumnDataType = SimpleColumnDataType | `varchar(${number})` | `char(${number})` | `decimal(${number}, ${number})` | `numeric(${number}, ${number})` | `binary(${number})` | `datetime(${number})` | `time(${number})` | `timetz(${number})` | `timestamp(${number})` | `timestamptz(${number})` | `varbinary(${number})`; -export type DataTypeParams = Omit; -export interface DataTypeNode extends OperationNode { - readonly kind: 'DataTypeNode'; - readonly dataType: ColumnDataType; -} -type DataTypeNodeFactory = Readonly<{ - is(node: OperationNode): node is DataTypeNode; - create(dataType: ColumnDataType): Readonly; -}>; -/** - * @internal - */ -export declare const DataTypeNode: DataTypeNodeFactory; -export declare function isColumnDataType(dataType: string): dataType is ColumnDataType; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/data-type-node.js b/node_modules/kysely/dist/esm/operation-node/data-type-node.js deleted file mode 100644 index 7f5544e..0000000 --- a/node_modules/kysely/dist/esm/operation-node/data-type-node.js +++ /dev/null @@ -1,83 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -const SIMPLE_COLUMN_DATA_TYPES = [ - 'varchar', - 'char', - 'text', - 'integer', - 'int2', - 'int4', - 'int8', - 'smallint', - 'bigint', - 'boolean', - 'real', - 'double precision', - 'float4', - 'float8', - 'decimal', - 'numeric', - 'binary', - 'bytea', - 'date', - 'datetime', - 'time', - 'timetz', - 'timestamp', - 'timestamptz', - 'serial', - 'bigserial', - 'uuid', - 'json', - 'jsonb', - 'blob', - 'varbinary', - 'int4range', - 'int4multirange', - 'int8range', - 'int8multirange', - 'numrange', - 'nummultirange', - 'tsrange', - 'tsmultirange', - 'tstzrange', - 'tstzmultirange', - 'daterange', - 'datemultirange', -]; -const COLUMN_DATA_TYPE_REGEX = [ - /^varchar\(\d+\)$/, - /^char\(\d+\)$/, - /^decimal\(\d+, \d+\)$/, - /^numeric\(\d+, \d+\)$/, - /^binary\(\d+\)$/, - /^datetime\(\d+\)$/, - /^time\(\d+\)$/, - /^timetz\(\d+\)$/, - /^timestamp\(\d+\)$/, - /^timestamptz\(\d+\)$/, - /^varbinary\(\d+\)$/, -]; -/** - * @internal - */ -export const DataTypeNode = freeze({ - is(node) { - return node.kind === 'DataTypeNode'; - }, - create(dataType) { - return freeze({ - kind: 'DataTypeNode', - dataType, - }); - }, -}); -export function isColumnDataType(dataType) { - if (SIMPLE_COLUMN_DATA_TYPES.includes(dataType)) { - return true; - } - if (COLUMN_DATA_TYPE_REGEX.some((r) => r.test(dataType))) { - return true; - } - return false; -} diff --git a/node_modules/kysely/dist/esm/operation-node/default-insert-value-node.d.ts b/node_modules/kysely/dist/esm/operation-node/default-insert-value-node.d.ts deleted file mode 100644 index aeff284..0000000 --- a/node_modules/kysely/dist/esm/operation-node/default-insert-value-node.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface DefaultInsertValueNode extends OperationNode { - readonly kind: 'DefaultInsertValueNode'; -} -type DefaultInsertValueNodeFactory = Readonly<{ - is(node: OperationNode): node is DefaultInsertValueNode; - create(): Readonly; -}>; -/** - * @internal - */ -export declare const DefaultInsertValueNode: DefaultInsertValueNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/default-insert-value-node.js b/node_modules/kysely/dist/esm/operation-node/default-insert-value-node.js deleted file mode 100644 index 5868539..0000000 --- a/node_modules/kysely/dist/esm/operation-node/default-insert-value-node.js +++ /dev/null @@ -1,15 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const DefaultInsertValueNode = freeze({ - is(node) { - return node.kind === 'DefaultInsertValueNode'; - }, - create() { - return freeze({ - kind: 'DefaultInsertValueNode', - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/default-value-node.d.ts b/node_modules/kysely/dist/esm/operation-node/default-value-node.d.ts deleted file mode 100644 index b9798bb..0000000 --- a/node_modules/kysely/dist/esm/operation-node/default-value-node.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface DefaultValueNode extends OperationNode { - readonly kind: 'DefaultValueNode'; - readonly defaultValue: OperationNode; -} -type DefaultValueNodeFactory = Readonly<{ - is(node: OperationNode): node is DefaultValueNode; - create(defaultValue: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const DefaultValueNode: DefaultValueNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/default-value-node.js b/node_modules/kysely/dist/esm/operation-node/default-value-node.js deleted file mode 100644 index 6893eb1e..0000000 --- a/node_modules/kysely/dist/esm/operation-node/default-value-node.js +++ /dev/null @@ -1,16 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const DefaultValueNode = freeze({ - is(node) { - return node.kind === 'DefaultValueNode'; - }, - create(defaultValue) { - return freeze({ - kind: 'DefaultValueNode', - defaultValue, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/delete-query-node.d.ts b/node_modules/kysely/dist/esm/operation-node/delete-query-node.d.ts deleted file mode 100644 index e598a18..0000000 --- a/node_modules/kysely/dist/esm/operation-node/delete-query-node.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { FromNode } from './from-node.js'; -import type { JoinNode } from './join-node.js'; -import type { OperationNode } from './operation-node.js'; -import type { ReturningNode } from './returning-node.js'; -import type { WhereNode } from './where-node.js'; -import type { WithNode } from './with-node.js'; -import type { LimitNode } from './limit-node.js'; -import type { OrderByNode } from './order-by-node.js'; -import type { OrderByItemNode } from './order-by-item-node.js'; -import type { ExplainNode } from './explain-node.js'; -import { UsingNode } from './using-node.js'; -import type { TopNode } from './top-node.js'; -import type { OutputNode } from './output-node.js'; -export interface DeleteQueryNode extends OperationNode { - readonly kind: 'DeleteQueryNode'; - readonly from: FromNode; - readonly using?: UsingNode; - readonly joins?: ReadonlyArray; - readonly where?: WhereNode; - readonly returning?: ReturningNode; - readonly with?: WithNode; - readonly orderBy?: OrderByNode; - readonly limit?: LimitNode; - readonly explain?: ExplainNode; - readonly endModifiers?: ReadonlyArray; - readonly top?: TopNode; - readonly output?: OutputNode; -} -type DeleteQueryNodeFactory = Readonly<{ - is(node: OperationNode): node is DeleteQueryNode; - create(fromItems: OperationNode[], withNode?: WithNode): Readonly; - cloneWithOrderByItems(node: DeleteQueryNode, items: ReadonlyArray): Readonly; - cloneWithoutOrderBy(node: DeleteQueryNode): Readonly; - cloneWithLimit(deleteNode: DeleteQueryNode, limit: LimitNode): Readonly; - cloneWithoutLimit(deleteNode: DeleteQueryNode): Readonly; - cloneWithUsing(deleteNode: DeleteQueryNode, tables: OperationNode[]): Readonly; -}>; -/** - * @internal - */ -export declare const DeleteQueryNode: DeleteQueryNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/delete-query-node.js b/node_modules/kysely/dist/esm/operation-node/delete-query-node.js deleted file mode 100644 index e1e1db8..0000000 --- a/node_modules/kysely/dist/esm/operation-node/delete-query-node.js +++ /dev/null @@ -1,50 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { FromNode } from './from-node.js'; -import { UsingNode } from './using-node.js'; -import { QueryNode } from './query-node.js'; -/** - * @internal - */ -export const DeleteQueryNode = freeze({ - is(node) { - return node.kind === 'DeleteQueryNode'; - }, - create(fromItems, withNode) { - return freeze({ - kind: 'DeleteQueryNode', - from: FromNode.create(fromItems), - ...(withNode && { with: withNode }), - }); - }, - // TODO: remove in v0.29 - /** - * @deprecated Use `QueryNode.cloneWithoutOrderBy` instead. - */ - cloneWithOrderByItems: (node, items) => QueryNode.cloneWithOrderByItems(node, items), - // TODO: remove in v0.29 - /** - * @deprecated Use `QueryNode.cloneWithoutOrderBy` instead. - */ - cloneWithoutOrderBy: (node) => QueryNode.cloneWithoutOrderBy(node), - cloneWithLimit(deleteNode, limit) { - return freeze({ - ...deleteNode, - limit, - }); - }, - cloneWithoutLimit(deleteNode) { - return freeze({ - ...deleteNode, - limit: undefined, - }); - }, - cloneWithUsing(deleteNode, tables) { - return freeze({ - ...deleteNode, - using: deleteNode.using !== undefined - ? UsingNode.cloneWithTables(deleteNode.using, tables) - : UsingNode.create(tables), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/drop-column-node.d.ts b/node_modules/kysely/dist/esm/operation-node/drop-column-node.d.ts deleted file mode 100644 index 41789f6..0000000 --- a/node_modules/kysely/dist/esm/operation-node/drop-column-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import { ColumnNode } from './column-node.js'; -export interface DropColumnNode extends OperationNode { - readonly kind: 'DropColumnNode'; - readonly column: ColumnNode; -} -type DropColumnNodeFactory = Readonly<{ - is(node: OperationNode): node is DropColumnNode; - create(column: string): Readonly; -}>; -/** - * @internal - */ -export declare const DropColumnNode: DropColumnNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/drop-column-node.js b/node_modules/kysely/dist/esm/operation-node/drop-column-node.js deleted file mode 100644 index b389086..0000000 --- a/node_modules/kysely/dist/esm/operation-node/drop-column-node.js +++ /dev/null @@ -1,17 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { ColumnNode } from './column-node.js'; -/** - * @internal - */ -export const DropColumnNode = freeze({ - is(node) { - return node.kind === 'DropColumnNode'; - }, - create(column) { - return freeze({ - kind: 'DropColumnNode', - column: ColumnNode.create(column), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/drop-constraint-node.d.ts b/node_modules/kysely/dist/esm/operation-node/drop-constraint-node.d.ts deleted file mode 100644 index 88b3234..0000000 --- a/node_modules/kysely/dist/esm/operation-node/drop-constraint-node.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import { IdentifierNode } from './identifier-node.js'; -export type DropConstraintNodeProps = Omit; -export interface DropConstraintNode extends OperationNode { - readonly kind: 'DropConstraintNode'; - readonly constraintName: IdentifierNode; - readonly ifExists?: boolean; - readonly modifier?: 'cascade' | 'restrict'; -} -type DropConstraintNodeFactory = Readonly<{ - is(node: OperationNode): node is DropConstraintNode; - create(constraintName: string, params?: DropConstraintNodeProps): Readonly; - cloneWith(dropConstraint: DropConstraintNode, props: DropConstraintNodeProps): Readonly; -}>; -/** - * @internal - */ -export declare const DropConstraintNode: DropConstraintNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/drop-constraint-node.js b/node_modules/kysely/dist/esm/operation-node/drop-constraint-node.js deleted file mode 100644 index a347399..0000000 --- a/node_modules/kysely/dist/esm/operation-node/drop-constraint-node.js +++ /dev/null @@ -1,23 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { IdentifierNode } from './identifier-node.js'; -/** - * @internal - */ -export const DropConstraintNode = freeze({ - is(node) { - return node.kind === 'DropConstraintNode'; - }, - create(constraintName) { - return freeze({ - kind: 'DropConstraintNode', - constraintName: IdentifierNode.create(constraintName), - }); - }, - cloneWith(dropConstraint, props) { - return freeze({ - ...dropConstraint, - ...props, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/drop-index-node.d.ts b/node_modules/kysely/dist/esm/operation-node/drop-index-node.d.ts deleted file mode 100644 index 5d3ff4d..0000000 --- a/node_modules/kysely/dist/esm/operation-node/drop-index-node.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import { SchemableIdentifierNode } from './schemable-identifier-node.js'; -import type { TableNode } from './table-node.js'; -export type DropIndexNodeProps = Omit; -export interface DropIndexNode extends OperationNode { - readonly kind: 'DropIndexNode'; - readonly name: SchemableIdentifierNode; - readonly table?: TableNode; - readonly ifExists?: boolean; - readonly cascade?: boolean; -} -type DropIndexNodeFactory = Readonly<{ - is(node: OperationNode): node is DropIndexNode; - create(name: string, params?: DropIndexNodeProps): Readonly; - cloneWith(dropIndex: DropIndexNode, props: DropIndexNodeProps): Readonly; -}>; -/** - * @internal - */ -export declare const DropIndexNode: DropIndexNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/drop-index-node.js b/node_modules/kysely/dist/esm/operation-node/drop-index-node.js deleted file mode 100644 index 23331ed..0000000 --- a/node_modules/kysely/dist/esm/operation-node/drop-index-node.js +++ /dev/null @@ -1,24 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { SchemableIdentifierNode } from './schemable-identifier-node.js'; -/** - * @internal - */ -export const DropIndexNode = freeze({ - is(node) { - return node.kind === 'DropIndexNode'; - }, - create(name, params) { - return freeze({ - kind: 'DropIndexNode', - name: SchemableIdentifierNode.create(name), - ...params, - }); - }, - cloneWith(dropIndex, props) { - return freeze({ - ...dropIndex, - ...props, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/drop-schema-node.d.ts b/node_modules/kysely/dist/esm/operation-node/drop-schema-node.d.ts deleted file mode 100644 index c539c63..0000000 --- a/node_modules/kysely/dist/esm/operation-node/drop-schema-node.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { IdentifierNode } from './identifier-node.js'; -import type { OperationNode } from './operation-node.js'; -export type DropSchemaNodeParams = Omit, 'kind' | 'schema'>; -export interface DropSchemaNode extends OperationNode { - readonly kind: 'DropSchemaNode'; - readonly schema: IdentifierNode; - readonly ifExists?: boolean; - readonly cascade?: boolean; -} -type DropSchemaNodeFactory = Readonly<{ - is(node: OperationNode): node is DropSchemaNode; - create(schema: string, params?: DropSchemaNodeParams): Readonly; - cloneWith(dropSchema: DropSchemaNode, params: DropSchemaNodeParams): Readonly; -}>; -/** - * @internal - */ -export declare const DropSchemaNode: DropSchemaNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/drop-schema-node.js b/node_modules/kysely/dist/esm/operation-node/drop-schema-node.js deleted file mode 100644 index 44a6c10..0000000 --- a/node_modules/kysely/dist/esm/operation-node/drop-schema-node.js +++ /dev/null @@ -1,24 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { IdentifierNode } from './identifier-node.js'; -/** - * @internal - */ -export const DropSchemaNode = freeze({ - is(node) { - return node.kind === 'DropSchemaNode'; - }, - create(schema, params) { - return freeze({ - kind: 'DropSchemaNode', - schema: IdentifierNode.create(schema), - ...params, - }); - }, - cloneWith(dropSchema, params) { - return freeze({ - ...dropSchema, - ...params, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/drop-table-node.d.ts b/node_modules/kysely/dist/esm/operation-node/drop-table-node.d.ts deleted file mode 100644 index 97aab82..0000000 --- a/node_modules/kysely/dist/esm/operation-node/drop-table-node.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { TableNode } from './table-node.js'; -export type DropTablexNodeParams = Omit, 'kind' | 'table'>; -export interface DropTableNode extends OperationNode { - readonly kind: 'DropTableNode'; - readonly table: TableNode; - readonly ifExists?: boolean; - readonly cascade?: boolean; -} -type DropTableNodeFactory = Readonly<{ - is(node: OperationNode): node is DropTableNode; - create(table: TableNode, params?: DropTablexNodeParams): Readonly; - cloneWith(dropIndex: DropTableNode, params: DropTablexNodeParams): Readonly; -}>; -/** - * @internal - */ -export declare const DropTableNode: DropTableNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/drop-table-node.js b/node_modules/kysely/dist/esm/operation-node/drop-table-node.js deleted file mode 100644 index 832e3f3..0000000 --- a/node_modules/kysely/dist/esm/operation-node/drop-table-node.js +++ /dev/null @@ -1,23 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const DropTableNode = freeze({ - is(node) { - return node.kind === 'DropTableNode'; - }, - create(table, params) { - return freeze({ - kind: 'DropTableNode', - table, - ...params, - }); - }, - cloneWith(dropIndex, params) { - return freeze({ - ...dropIndex, - ...params, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/drop-type-node.d.ts b/node_modules/kysely/dist/esm/operation-node/drop-type-node.d.ts deleted file mode 100644 index 07aed5f..0000000 --- a/node_modules/kysely/dist/esm/operation-node/drop-type-node.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { SchemableIdentifierNode } from './schemable-identifier-node.js'; -export type DropTypeNodeParams = Omit, 'kind' | 'name'>; -export interface DropTypeNode extends OperationNode { - readonly kind: 'DropTypeNode'; - readonly name: SchemableIdentifierNode; - readonly ifExists?: boolean; -} -type DropTypeNodeFactory = Readonly<{ - is(node: OperationNode): node is DropTypeNode; - create(name: SchemableIdentifierNode): Readonly; - cloneWith(dropType: DropTypeNode, params: DropTypeNodeParams): Readonly; -}>; -/** - * @internal - */ -export declare const DropTypeNode: DropTypeNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/drop-type-node.js b/node_modules/kysely/dist/esm/operation-node/drop-type-node.js deleted file mode 100644 index b317e10..0000000 --- a/node_modules/kysely/dist/esm/operation-node/drop-type-node.js +++ /dev/null @@ -1,22 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const DropTypeNode = freeze({ - is(node) { - return node.kind === 'DropTypeNode'; - }, - create(name) { - return freeze({ - kind: 'DropTypeNode', - name, - }); - }, - cloneWith(dropType, params) { - return freeze({ - ...dropType, - ...params, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/drop-view-node.d.ts b/node_modules/kysely/dist/esm/operation-node/drop-view-node.d.ts deleted file mode 100644 index 6d194b7..0000000 --- a/node_modules/kysely/dist/esm/operation-node/drop-view-node.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import { SchemableIdentifierNode } from './schemable-identifier-node.js'; -export type DropViewNodeParams = Omit, 'kind' | 'name'>; -export interface DropViewNode extends OperationNode { - readonly kind: 'DropViewNode'; - readonly name: SchemableIdentifierNode; - readonly ifExists?: boolean; - readonly materialized?: boolean; - readonly cascade?: boolean; -} -type DropViewNodeFactory = Readonly<{ - is(node: OperationNode): node is DropViewNode; - create(name: string): Readonly; - cloneWith(dropView: DropViewNode, params: DropViewNodeParams): Readonly; -}>; -/** - * @internal - */ -export declare const DropViewNode: DropViewNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/drop-view-node.js b/node_modules/kysely/dist/esm/operation-node/drop-view-node.js deleted file mode 100644 index 1e74e64..0000000 --- a/node_modules/kysely/dist/esm/operation-node/drop-view-node.js +++ /dev/null @@ -1,23 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { SchemableIdentifierNode } from './schemable-identifier-node.js'; -/** - * @internal - */ -export const DropViewNode = freeze({ - is(node) { - return node.kind === 'DropViewNode'; - }, - create(name) { - return freeze({ - kind: 'DropViewNode', - name: SchemableIdentifierNode.create(name), - }); - }, - cloneWith(dropView, params) { - return freeze({ - ...dropView, - ...params, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/explain-node.d.ts b/node_modules/kysely/dist/esm/operation-node/explain-node.d.ts deleted file mode 100644 index e796278..0000000 --- a/node_modules/kysely/dist/esm/operation-node/explain-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { ExplainFormat } from '../util/explainable.js'; -import type { OperationNode } from './operation-node.js'; -export interface ExplainNode extends OperationNode { - readonly kind: 'ExplainNode'; - readonly format?: ExplainFormat; - readonly options?: OperationNode; -} -type ExplainNodeFactory = Readonly<{ - is(node: OperationNode): node is ExplainNode; - create(format?: ExplainFormat, options?: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const ExplainNode: ExplainNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/explain-node.js b/node_modules/kysely/dist/esm/operation-node/explain-node.js deleted file mode 100644 index efc574b..0000000 --- a/node_modules/kysely/dist/esm/operation-node/explain-node.js +++ /dev/null @@ -1,17 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const ExplainNode = freeze({ - is(node) { - return node.kind === 'ExplainNode'; - }, - create(format, options) { - return freeze({ - kind: 'ExplainNode', - format, - options, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/fetch-node.d.ts b/node_modules/kysely/dist/esm/operation-node/fetch-node.d.ts deleted file mode 100644 index 1719023..0000000 --- a/node_modules/kysely/dist/esm/operation-node/fetch-node.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import { ValueNode } from './value-node.js'; -export type FetchModifier = 'only' | 'with ties'; -export interface FetchNode extends OperationNode { - readonly kind: 'FetchNode'; - readonly rowCount: ValueNode; - readonly modifier: FetchModifier; -} -type FetchNodeFactory = Readonly<{ - is(node: OperationNode): node is FetchNode; - create(rowCount: number | bigint, modifier: FetchModifier): Readonly; -}>; -/** - * @internal - */ -export declare const FetchNode: FetchNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/fetch-node.js b/node_modules/kysely/dist/esm/operation-node/fetch-node.js deleted file mode 100644 index 56ffb47..0000000 --- a/node_modules/kysely/dist/esm/operation-node/fetch-node.js +++ /dev/null @@ -1,18 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { ValueNode } from './value-node.js'; -/** - * @internal - */ -export const FetchNode = freeze({ - is(node) { - return node.kind === 'FetchNode'; - }, - create(rowCount, modifier) { - return { - kind: 'FetchNode', - rowCount: ValueNode.create(rowCount), - modifier, - }; - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/foreign-key-constraint-node.d.ts b/node_modules/kysely/dist/esm/operation-node/foreign-key-constraint-node.d.ts deleted file mode 100644 index 7dc6333..0000000 --- a/node_modules/kysely/dist/esm/operation-node/foreign-key-constraint-node.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import type { ColumnNode } from './column-node.js'; -import { IdentifierNode } from './identifier-node.js'; -import type { OperationNode } from './operation-node.js'; -import { type OnModifyForeignAction, ReferencesNode } from './references-node.js'; -import type { TableNode } from './table-node.js'; -export type ForeignKeyConstraintNodeProps = Omit; -export interface ForeignKeyConstraintNode extends OperationNode { - readonly kind: 'ForeignKeyConstraintNode'; - readonly columns: ReadonlyArray; - readonly references: ReferencesNode; - readonly onDelete?: OnModifyForeignAction; - readonly onUpdate?: OnModifyForeignAction; - readonly name?: IdentifierNode; - readonly deferrable?: boolean; - readonly initiallyDeferred?: boolean; -} -type ForeignKeyConstraintNodeFactory = Readonly<{ - is(node: OperationNode): node is ForeignKeyConstraintNode; - create(sourceColumns: ReadonlyArray, targetTable: TableNode, targetColumns: ReadonlyArray, constraintName?: string): Readonly; - cloneWith(node: ForeignKeyConstraintNode, props: ForeignKeyConstraintNodeProps): Readonly; -}>; -/** - * @internal - */ -export declare const ForeignKeyConstraintNode: ForeignKeyConstraintNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/foreign-key-constraint-node.js b/node_modules/kysely/dist/esm/operation-node/foreign-key-constraint-node.js deleted file mode 100644 index df88e29..0000000 --- a/node_modules/kysely/dist/esm/operation-node/foreign-key-constraint-node.js +++ /dev/null @@ -1,28 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { IdentifierNode } from './identifier-node.js'; -import { ReferencesNode, } from './references-node.js'; -/** - * @internal - */ -export const ForeignKeyConstraintNode = freeze({ - is(node) { - return node.kind === 'ForeignKeyConstraintNode'; - }, - create(sourceColumns, targetTable, targetColumns, constraintName) { - return freeze({ - kind: 'ForeignKeyConstraintNode', - columns: sourceColumns, - references: ReferencesNode.create(targetTable, targetColumns), - name: constraintName - ? IdentifierNode.create(constraintName) - : undefined, - }); - }, - cloneWith(node, props) { - return freeze({ - ...node, - ...props, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/from-node.d.ts b/node_modules/kysely/dist/esm/operation-node/from-node.d.ts deleted file mode 100644 index 1ee2606..0000000 --- a/node_modules/kysely/dist/esm/operation-node/from-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface FromNode extends OperationNode { - readonly kind: 'FromNode'; - readonly froms: ReadonlyArray; -} -type FromNodeFactory = Readonly<{ - is(node: OperationNode): node is FromNode; - create(froms: ReadonlyArray): Readonly; - cloneWithFroms(from: FromNode, froms: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const FromNode: FromNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/from-node.js b/node_modules/kysely/dist/esm/operation-node/from-node.js deleted file mode 100644 index 0392ea3..0000000 --- a/node_modules/kysely/dist/esm/operation-node/from-node.js +++ /dev/null @@ -1,22 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const FromNode = freeze({ - is(node) { - return node.kind === 'FromNode'; - }, - create(froms) { - return freeze({ - kind: 'FromNode', - froms: freeze(froms), - }); - }, - cloneWithFroms(from, froms) { - return freeze({ - ...from, - froms: freeze([...from.froms, ...froms]), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/function-node.d.ts b/node_modules/kysely/dist/esm/operation-node/function-node.d.ts deleted file mode 100644 index ff9c17e..0000000 --- a/node_modules/kysely/dist/esm/operation-node/function-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface FunctionNode extends OperationNode { - readonly kind: 'FunctionNode'; - readonly func: string; - readonly arguments: ReadonlyArray; -} -type FunctionNodeFactory = Readonly<{ - is(node: OperationNode): node is FunctionNode; - create(func: string, args: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const FunctionNode: FunctionNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/function-node.js b/node_modules/kysely/dist/esm/operation-node/function-node.js deleted file mode 100644 index cef60ba..0000000 --- a/node_modules/kysely/dist/esm/operation-node/function-node.js +++ /dev/null @@ -1,17 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const FunctionNode = freeze({ - is(node) { - return node.kind === 'FunctionNode'; - }, - create(func, args) { - return freeze({ - kind: 'FunctionNode', - func, - arguments: args, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/generated-node.d.ts b/node_modules/kysely/dist/esm/operation-node/generated-node.d.ts deleted file mode 100644 index b05d1fb..0000000 --- a/node_modules/kysely/dist/esm/operation-node/generated-node.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export type GeneratedNodeParams = Omit; -export interface GeneratedNode extends OperationNode { - readonly kind: 'GeneratedNode'; - readonly byDefault?: boolean; - readonly always?: boolean; - readonly identity?: boolean; - readonly stored?: boolean; - readonly expression?: OperationNode; -} -type GeneratedNodeFactory = Readonly<{ - is(node: OperationNode): node is GeneratedNode; - create(params: GeneratedNodeParams): Readonly; - createWithExpression(expression: OperationNode): Readonly; - cloneWith(node: GeneratedNode, params: GeneratedNodeParams): Readonly; -}>; -/** - * @internal - */ -export declare const GeneratedNode: GeneratedNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/generated-node.js b/node_modules/kysely/dist/esm/operation-node/generated-node.js deleted file mode 100644 index 2d5a233..0000000 --- a/node_modules/kysely/dist/esm/operation-node/generated-node.js +++ /dev/null @@ -1,29 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const GeneratedNode = freeze({ - is(node) { - return node.kind === 'GeneratedNode'; - }, - create(params) { - return freeze({ - kind: 'GeneratedNode', - ...params, - }); - }, - createWithExpression(expression) { - return freeze({ - kind: 'GeneratedNode', - always: true, - expression, - }); - }, - cloneWith(node, params) { - return freeze({ - ...node, - ...params, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/group-by-item-node.d.ts b/node_modules/kysely/dist/esm/operation-node/group-by-item-node.d.ts deleted file mode 100644 index 8bff7fe..0000000 --- a/node_modules/kysely/dist/esm/operation-node/group-by-item-node.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface GroupByItemNode extends OperationNode { - readonly kind: 'GroupByItemNode'; - readonly groupBy: OperationNode; -} -type GroupByItemNodeFactory = Readonly<{ - is(node: OperationNode): node is GroupByItemNode; - create(groupBy: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const GroupByItemNode: GroupByItemNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/group-by-item-node.js b/node_modules/kysely/dist/esm/operation-node/group-by-item-node.js deleted file mode 100644 index 34f790b..0000000 --- a/node_modules/kysely/dist/esm/operation-node/group-by-item-node.js +++ /dev/null @@ -1,16 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const GroupByItemNode = freeze({ - is(node) { - return node.kind === 'GroupByItemNode'; - }, - create(groupBy) { - return freeze({ - kind: 'GroupByItemNode', - groupBy, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/group-by-node.d.ts b/node_modules/kysely/dist/esm/operation-node/group-by-node.d.ts deleted file mode 100644 index a1092b3..0000000 --- a/node_modules/kysely/dist/esm/operation-node/group-by-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { GroupByItemNode } from './group-by-item-node.js'; -export interface GroupByNode extends OperationNode { - readonly kind: 'GroupByNode'; - readonly items: ReadonlyArray; -} -type GroupByNodeFactory = Readonly<{ - is(node: OperationNode): node is GroupByNode; - create(items: ReadonlyArray): Readonly; - cloneWithItems(groupBy: GroupByNode, items: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const GroupByNode: GroupByNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/group-by-node.js b/node_modules/kysely/dist/esm/operation-node/group-by-node.js deleted file mode 100644 index b201971..0000000 --- a/node_modules/kysely/dist/esm/operation-node/group-by-node.js +++ /dev/null @@ -1,22 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const GroupByNode = freeze({ - is(node) { - return node.kind === 'GroupByNode'; - }, - create(items) { - return freeze({ - kind: 'GroupByNode', - items: freeze(items), - }); - }, - cloneWithItems(groupBy, items) { - return freeze({ - ...groupBy, - items: freeze([...groupBy.items, ...items]), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/having-node.d.ts b/node_modules/kysely/dist/esm/operation-node/having-node.d.ts deleted file mode 100644 index 584d7c5..0000000 --- a/node_modules/kysely/dist/esm/operation-node/having-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface HavingNode extends OperationNode { - readonly kind: 'HavingNode'; - readonly having: OperationNode; -} -type HavingNodeFactory = Readonly<{ - is(node: OperationNode): node is HavingNode; - create(filter: OperationNode): Readonly; - cloneWithOperation(havingNode: HavingNode, operator: 'And' | 'Or', operation: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const HavingNode: HavingNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/having-node.js b/node_modules/kysely/dist/esm/operation-node/having-node.js deleted file mode 100644 index 5515fab..0000000 --- a/node_modules/kysely/dist/esm/operation-node/having-node.js +++ /dev/null @@ -1,26 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { AndNode } from './and-node.js'; -import { OrNode } from './or-node.js'; -/** - * @internal - */ -export const HavingNode = freeze({ - is(node) { - return node.kind === 'HavingNode'; - }, - create(filter) { - return freeze({ - kind: 'HavingNode', - having: filter, - }); - }, - cloneWithOperation(havingNode, operator, operation) { - return freeze({ - ...havingNode, - having: operator === 'And' - ? AndNode.create(havingNode.having, operation) - : OrNode.create(havingNode.having, operation), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/identifier-node.d.ts b/node_modules/kysely/dist/esm/operation-node/identifier-node.d.ts deleted file mode 100644 index 0ad0ff9..0000000 --- a/node_modules/kysely/dist/esm/operation-node/identifier-node.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface IdentifierNode extends OperationNode { - readonly kind: 'IdentifierNode'; - readonly name: string; -} -type IdentifierNodeFactory = Readonly<{ - is(node: OperationNode): node is IdentifierNode; - create(name: string): Readonly; -}>; -/** - * @internal - */ -export declare const IdentifierNode: IdentifierNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/identifier-node.js b/node_modules/kysely/dist/esm/operation-node/identifier-node.js deleted file mode 100644 index 5769c40..0000000 --- a/node_modules/kysely/dist/esm/operation-node/identifier-node.js +++ /dev/null @@ -1,16 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const IdentifierNode = freeze({ - is(node) { - return node.kind === 'IdentifierNode'; - }, - create(name) { - return freeze({ - kind: 'IdentifierNode', - name, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/insert-query-node.d.ts b/node_modules/kysely/dist/esm/operation-node/insert-query-node.d.ts deleted file mode 100644 index eddd5b8..0000000 --- a/node_modules/kysely/dist/esm/operation-node/insert-query-node.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { ColumnNode } from './column-node.js'; -import type { ExplainNode } from './explain-node.js'; -import type { OnConflictNode } from './on-conflict-node.js'; -import type { OnDuplicateKeyNode } from './on-duplicate-key-node.js'; -import type { OperationNode } from './operation-node.js'; -import type { OrActionNode } from './or-action-node.js'; -import type { OutputNode } from './output-node.js'; -import type { ReturningNode } from './returning-node.js'; -import type { TableNode } from './table-node.js'; -import type { TopNode } from './top-node.js'; -import type { WithNode } from './with-node.js'; -export type InsertQueryNodeProps = Omit; -export interface InsertQueryNode extends OperationNode { - readonly kind: 'InsertQueryNode'; - readonly into?: TableNode; - readonly columns?: ReadonlyArray; - readonly values?: OperationNode; - readonly returning?: ReturningNode; - readonly onConflict?: OnConflictNode; - readonly onDuplicateKey?: OnDuplicateKeyNode; - readonly with?: WithNode; - /** @deprecated use {@link orAction} instead. */ - readonly ignore?: boolean; - readonly orAction?: OrActionNode; - readonly replace?: boolean; - readonly explain?: ExplainNode; - readonly defaultValues?: boolean; - readonly endModifiers?: ReadonlyArray; - readonly top?: TopNode; - readonly output?: OutputNode; -} -type InsertQueryNodeFactory = Readonly<{ - is(node: OperationNode): node is InsertQueryNode; - create(into: TableNode, withNode?: WithNode, replace?: boolean): Readonly; - createWithoutInto(): Readonly; - cloneWith(insertQuery: InsertQueryNode, props: InsertQueryNodeProps): Readonly; -}>; -/** - * @internal - */ -export declare const InsertQueryNode: InsertQueryNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/insert-query-node.js b/node_modules/kysely/dist/esm/operation-node/insert-query-node.js deleted file mode 100644 index 34c7efc..0000000 --- a/node_modules/kysely/dist/esm/operation-node/insert-query-node.js +++ /dev/null @@ -1,29 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const InsertQueryNode = freeze({ - is(node) { - return node.kind === 'InsertQueryNode'; - }, - create(into, withNode, replace) { - return freeze({ - kind: 'InsertQueryNode', - into, - ...(withNode && { with: withNode }), - replace, - }); - }, - createWithoutInto() { - return freeze({ - kind: 'InsertQueryNode', - }); - }, - cloneWith(insertQuery, props) { - return freeze({ - ...insertQuery, - ...props, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/join-node.d.ts b/node_modules/kysely/dist/esm/operation-node/join-node.d.ts deleted file mode 100644 index bb95e41..0000000 --- a/node_modules/kysely/dist/esm/operation-node/join-node.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { OnNode } from './on-node.js'; -import type { OperationNode } from './operation-node.js'; -export type JoinType = 'InnerJoin' | 'LeftJoin' | 'RightJoin' | 'FullJoin' | 'CrossJoin' | 'LateralInnerJoin' | 'LateralLeftJoin' | 'LateralCrossJoin' | 'Using' | 'OuterApply' | 'CrossApply'; -export interface JoinNode extends OperationNode { - readonly kind: 'JoinNode'; - readonly joinType: JoinType; - readonly table: OperationNode; - readonly on?: OnNode; -} -type JoinNodeFactory = Readonly<{ - is(node: OperationNode): node is JoinNode; - create(joinType: JoinType, table: OperationNode): Readonly; - createWithOn(joinType: JoinType, table: OperationNode, on: OperationNode): Readonly; - cloneWithOn(joinNode: JoinNode, operation: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const JoinNode: JoinNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/join-node.js b/node_modules/kysely/dist/esm/operation-node/join-node.js deleted file mode 100644 index e1c33c0..0000000 --- a/node_modules/kysely/dist/esm/operation-node/join-node.js +++ /dev/null @@ -1,35 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { OnNode } from './on-node.js'; -/** - * @internal - */ -export const JoinNode = freeze({ - is(node) { - return node.kind === 'JoinNode'; - }, - create(joinType, table) { - return freeze({ - kind: 'JoinNode', - joinType, - table, - on: undefined, - }); - }, - createWithOn(joinType, table, on) { - return freeze({ - kind: 'JoinNode', - joinType, - table, - on: OnNode.create(on), - }); - }, - cloneWithOn(joinNode, operation) { - return freeze({ - ...joinNode, - on: joinNode.on - ? OnNode.cloneWithOperation(joinNode.on, 'And', operation) - : OnNode.create(operation), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/json-operator-chain-node.d.ts b/node_modules/kysely/dist/esm/operation-node/json-operator-chain-node.d.ts deleted file mode 100644 index b04117c..0000000 --- a/node_modules/kysely/dist/esm/operation-node/json-operator-chain-node.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { OperatorNode } from './operator-node.js'; -import type { ValueNode } from './value-node.js'; -export interface JSONOperatorChainNode extends OperationNode { - readonly kind: 'JSONOperatorChainNode'; - readonly operator: OperatorNode; - readonly values: readonly ValueNode[]; -} -type JSONOperatorChainNodeFactory = Readonly<{ - is(node: OperationNode): node is JSONOperatorChainNode; - create(operator: OperatorNode): Readonly; - cloneWithValue(node: JSONOperatorChainNode, value: ValueNode): Readonly; -}>; -/** - * @internal - */ -export declare const JSONOperatorChainNode: JSONOperatorChainNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/json-operator-chain-node.js b/node_modules/kysely/dist/esm/operation-node/json-operator-chain-node.js deleted file mode 100644 index c71550a..0000000 --- a/node_modules/kysely/dist/esm/operation-node/json-operator-chain-node.js +++ /dev/null @@ -1,23 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const JSONOperatorChainNode = freeze({ - is(node) { - return node.kind === 'JSONOperatorChainNode'; - }, - create(operator) { - return freeze({ - kind: 'JSONOperatorChainNode', - operator, - values: freeze([]), - }); - }, - cloneWithValue(node, value) { - return freeze({ - ...node, - values: freeze([...node.values, value]), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/json-path-leg-node.d.ts b/node_modules/kysely/dist/esm/operation-node/json-path-leg-node.d.ts deleted file mode 100644 index c56114e..0000000 --- a/node_modules/kysely/dist/esm/operation-node/json-path-leg-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export type JSONPathLegType = 'Member' | 'ArrayLocation'; -export interface JSONPathLegNode extends OperationNode { - readonly kind: 'JSONPathLegNode'; - readonly type: JSONPathLegType; - readonly value: string | number; -} -type JSONPathLegNodeFactory = Readonly<{ - is(node: OperationNode): node is JSONPathLegNode; - create(type: JSONPathLegType, value: string | number): Readonly; -}>; -/** - * @internal - */ -export declare const JSONPathLegNode: JSONPathLegNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/json-path-leg-node.js b/node_modules/kysely/dist/esm/operation-node/json-path-leg-node.js deleted file mode 100644 index 3bc0af5..0000000 --- a/node_modules/kysely/dist/esm/operation-node/json-path-leg-node.js +++ /dev/null @@ -1,17 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const JSONPathLegNode = freeze({ - is(node) { - return node.kind === 'JSONPathLegNode'; - }, - create(type, value) { - return freeze({ - kind: 'JSONPathLegNode', - type, - value, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/json-path-node.d.ts b/node_modules/kysely/dist/esm/operation-node/json-path-node.d.ts deleted file mode 100644 index 70df23f..0000000 --- a/node_modules/kysely/dist/esm/operation-node/json-path-node.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { JSONPathLegNode } from './json-path-leg-node.js'; -import type { OperationNode } from './operation-node.js'; -import type { OperatorNode } from './operator-node.js'; -export interface JSONPathNode extends OperationNode { - readonly kind: 'JSONPathNode'; - readonly inOperator?: OperatorNode; - readonly pathLegs: ReadonlyArray; -} -type JSONPathNodeFactory = Readonly<{ - is(node: OperationNode): node is JSONPathNode; - create(inOperator?: OperatorNode): Readonly; - cloneWithLeg(jsonPathNode: JSONPathNode, pathLeg: JSONPathLegNode): Readonly; -}>; -/** - * @internal - */ -export declare const JSONPathNode: JSONPathNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/json-path-node.js b/node_modules/kysely/dist/esm/operation-node/json-path-node.js deleted file mode 100644 index 46ebe2f..0000000 --- a/node_modules/kysely/dist/esm/operation-node/json-path-node.js +++ /dev/null @@ -1,23 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const JSONPathNode = freeze({ - is(node) { - return node.kind === 'JSONPathNode'; - }, - create(inOperator) { - return freeze({ - kind: 'JSONPathNode', - inOperator, - pathLegs: freeze([]), - }); - }, - cloneWithLeg(jsonPathNode, pathLeg) { - return freeze({ - ...jsonPathNode, - pathLegs: freeze([...jsonPathNode.pathLegs, pathLeg]), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/json-reference-node.d.ts b/node_modules/kysely/dist/esm/operation-node/json-reference-node.d.ts deleted file mode 100644 index 2ba7c0b..0000000 --- a/node_modules/kysely/dist/esm/operation-node/json-reference-node.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { JSONOperatorChainNode } from './json-operator-chain-node.js'; -import type { JSONPathNode } from './json-path-node.js'; -import type { OperationNode } from './operation-node.js'; -import type { ReferenceNode } from './reference-node.js'; -export interface JSONReferenceNode extends OperationNode { - readonly kind: 'JSONReferenceNode'; - readonly reference: ReferenceNode; - readonly traversal: JSONPathNode | JSONOperatorChainNode; -} -type JSONReferenceNodeFactory = Readonly<{ - is(node: OperationNode): node is JSONReferenceNode; - create(reference: ReferenceNode, traversal: JSONPathNode | JSONOperatorChainNode): Readonly; - cloneWithTraversal(node: JSONReferenceNode, traversal: JSONPathNode | JSONOperatorChainNode): Readonly; -}>; -/** - * @internal - */ -export declare const JSONReferenceNode: JSONReferenceNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/json-reference-node.js b/node_modules/kysely/dist/esm/operation-node/json-reference-node.js deleted file mode 100644 index ce2f75f..0000000 --- a/node_modules/kysely/dist/esm/operation-node/json-reference-node.js +++ /dev/null @@ -1,23 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const JSONReferenceNode = freeze({ - is(node) { - return node.kind === 'JSONReferenceNode'; - }, - create(reference, traversal) { - return freeze({ - kind: 'JSONReferenceNode', - reference, - traversal, - }); - }, - cloneWithTraversal(node, traversal) { - return freeze({ - ...node, - traversal, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/limit-node.d.ts b/node_modules/kysely/dist/esm/operation-node/limit-node.d.ts deleted file mode 100644 index 7c0c778..0000000 --- a/node_modules/kysely/dist/esm/operation-node/limit-node.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface LimitNode extends OperationNode { - readonly kind: 'LimitNode'; - readonly limit: OperationNode; -} -type LimitNodeFactory = Readonly<{ - is(node: OperationNode): node is LimitNode; - create(limit: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const LimitNode: LimitNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/limit-node.js b/node_modules/kysely/dist/esm/operation-node/limit-node.js deleted file mode 100644 index ffc1475..0000000 --- a/node_modules/kysely/dist/esm/operation-node/limit-node.js +++ /dev/null @@ -1,16 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const LimitNode = freeze({ - is(node) { - return node.kind === 'LimitNode'; - }, - create(limit) { - return freeze({ - kind: 'LimitNode', - limit, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/list-node.d.ts b/node_modules/kysely/dist/esm/operation-node/list-node.d.ts deleted file mode 100644 index 4091b32..0000000 --- a/node_modules/kysely/dist/esm/operation-node/list-node.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface ListNode extends OperationNode { - readonly kind: 'ListNode'; - readonly items: ReadonlyArray; -} -type ListNodeFactory = Readonly<{ - is(node: OperationNode): node is ListNode; - create(items: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const ListNode: ListNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/list-node.js b/node_modules/kysely/dist/esm/operation-node/list-node.js deleted file mode 100644 index 7ca0b0f..0000000 --- a/node_modules/kysely/dist/esm/operation-node/list-node.js +++ /dev/null @@ -1,16 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const ListNode = freeze({ - is(node) { - return node.kind === 'ListNode'; - }, - create(items) { - return freeze({ - kind: 'ListNode', - items: freeze(items), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/matched-node.d.ts b/node_modules/kysely/dist/esm/operation-node/matched-node.d.ts deleted file mode 100644 index 2bda2b5..0000000 --- a/node_modules/kysely/dist/esm/operation-node/matched-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface MatchedNode extends OperationNode { - readonly kind: 'MatchedNode'; - readonly not: boolean; - readonly bySource: boolean; -} -type MatchedNodeFactory = Readonly<{ - is(node: OperationNode): node is MatchedNode; - create(not: boolean, bySource?: boolean): Readonly; -}>; -/** - * @internal - */ -export declare const MatchedNode: MatchedNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/matched-node.js b/node_modules/kysely/dist/esm/operation-node/matched-node.js deleted file mode 100644 index f1607e1..0000000 --- a/node_modules/kysely/dist/esm/operation-node/matched-node.js +++ /dev/null @@ -1,17 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const MatchedNode = freeze({ - is(node) { - return node.kind === 'MatchedNode'; - }, - create(not, bySource = false) { - return freeze({ - kind: 'MatchedNode', - not, - bySource, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/merge-query-node.d.ts b/node_modules/kysely/dist/esm/operation-node/merge-query-node.d.ts deleted file mode 100644 index be394c1..0000000 --- a/node_modules/kysely/dist/esm/operation-node/merge-query-node.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { AliasNode } from './alias-node.js'; -import type { JoinNode } from './join-node.js'; -import type { OperationNode } from './operation-node.js'; -import type { OutputNode } from './output-node.js'; -import type { ReturningNode } from './returning-node.js'; -import type { TableNode } from './table-node.js'; -import type { TopNode } from './top-node.js'; -import { WhenNode } from './when-node.js'; -import type { WithNode } from './with-node.js'; -export interface MergeQueryNode extends OperationNode { - readonly kind: 'MergeQueryNode'; - readonly into: TableNode | AliasNode; - readonly using?: JoinNode; - readonly whens?: ReadonlyArray; - readonly with?: WithNode; - readonly top?: TopNode; - readonly returning?: ReturningNode; - readonly output?: OutputNode; - readonly endModifiers?: ReadonlyArray; -} -type MergeQueryNodeFactory = Readonly<{ - is(node: OperationNode): node is MergeQueryNode; - create(into: TableNode | AliasNode, withNode?: WithNode): Readonly; - cloneWithUsing(mergeNode: MergeQueryNode, using: JoinNode): Readonly; - cloneWithWhen(mergeNode: MergeQueryNode, when: WhenNode): Readonly; - cloneWithThen(mergeNode: MergeQueryNode, then: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const MergeQueryNode: MergeQueryNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/merge-query-node.js b/node_modules/kysely/dist/esm/operation-node/merge-query-node.js deleted file mode 100644 index 4c2a443..0000000 --- a/node_modules/kysely/dist/esm/operation-node/merge-query-node.js +++ /dev/null @@ -1,43 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { WhenNode } from './when-node.js'; -/** - * @internal - */ -export const MergeQueryNode = freeze({ - is(node) { - return node.kind === 'MergeQueryNode'; - }, - create(into, withNode) { - return freeze({ - kind: 'MergeQueryNode', - into, - ...(withNode && { with: withNode }), - }); - }, - cloneWithUsing(mergeNode, using) { - return freeze({ - ...mergeNode, - using, - }); - }, - cloneWithWhen(mergeNode, when) { - return freeze({ - ...mergeNode, - whens: mergeNode.whens - ? freeze([...mergeNode.whens, when]) - : freeze([when]), - }); - }, - cloneWithThen(mergeNode, then) { - return freeze({ - ...mergeNode, - whens: mergeNode.whens - ? freeze([ - ...mergeNode.whens.slice(0, -1), - WhenNode.cloneWithResult(mergeNode.whens[mergeNode.whens.length - 1], then), - ]) - : undefined, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/modify-column-node.d.ts b/node_modules/kysely/dist/esm/operation-node/modify-column-node.d.ts deleted file mode 100644 index 609ed36..0000000 --- a/node_modules/kysely/dist/esm/operation-node/modify-column-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { ColumnDefinitionNode } from './column-definition-node.js'; -import type { OperationNode } from './operation-node.js'; -export interface ModifyColumnNode extends OperationNode { - readonly kind: 'ModifyColumnNode'; - readonly column: ColumnDefinitionNode; -} -type ModifyColumnNodeFactory = Readonly<{ - is(node: OperationNode): node is ModifyColumnNode; - create(column: ColumnDefinitionNode): Readonly; -}>; -/** - * @internal - */ -export declare const ModifyColumnNode: ModifyColumnNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/modify-column-node.js b/node_modules/kysely/dist/esm/operation-node/modify-column-node.js deleted file mode 100644 index 1d7d38e..0000000 --- a/node_modules/kysely/dist/esm/operation-node/modify-column-node.js +++ /dev/null @@ -1,16 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const ModifyColumnNode = freeze({ - is(node) { - return node.kind === 'ModifyColumnNode'; - }, - create(column) { - return freeze({ - kind: 'ModifyColumnNode', - column, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/offset-node.d.ts b/node_modules/kysely/dist/esm/operation-node/offset-node.d.ts deleted file mode 100644 index c3d70a1..0000000 --- a/node_modules/kysely/dist/esm/operation-node/offset-node.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface OffsetNode extends OperationNode { - readonly kind: 'OffsetNode'; - readonly offset: OperationNode; -} -type OffsetNodeFactory = Readonly<{ - is(node: OperationNode): node is OffsetNode; - create(offset: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const OffsetNode: OffsetNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/offset-node.js b/node_modules/kysely/dist/esm/operation-node/offset-node.js deleted file mode 100644 index 4d1d77b..0000000 --- a/node_modules/kysely/dist/esm/operation-node/offset-node.js +++ /dev/null @@ -1,16 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const OffsetNode = freeze({ - is(node) { - return node.kind === 'OffsetNode'; - }, - create(offset) { - return freeze({ - kind: 'OffsetNode', - offset, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/on-conflict-node.d.ts b/node_modules/kysely/dist/esm/operation-node/on-conflict-node.d.ts deleted file mode 100644 index 8f1263f..0000000 --- a/node_modules/kysely/dist/esm/operation-node/on-conflict-node.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { ColumnNode } from './column-node.js'; -import type { ColumnUpdateNode } from './column-update-node.js'; -import type { IdentifierNode } from './identifier-node.js'; -import type { OperationNode } from './operation-node.js'; -import { WhereNode } from './where-node.js'; -export type OnConflictNodeProps = Omit; -export interface OnConflictNode extends OperationNode { - readonly kind: 'OnConflictNode'; - readonly columns?: ReadonlyArray; - readonly constraint?: IdentifierNode; - readonly indexExpression?: OperationNode; - readonly indexWhere?: WhereNode; - readonly updates?: ReadonlyArray; - readonly updateWhere?: WhereNode; - readonly doNothing?: boolean; -} -type OnConflictNodeFactory = Readonly<{ - is(node: OperationNode): node is OnConflictNode; - create(): Readonly; - cloneWith(node: OnConflictNode, props: OnConflictNodeProps): Readonly; - cloneWithIndexWhere(node: OnConflictNode, operation: OperationNode): Readonly; - cloneWithIndexOrWhere(node: OnConflictNode, operation: OperationNode): Readonly; - cloneWithUpdateWhere(node: OnConflictNode, operation: OperationNode): Readonly; - cloneWithUpdateOrWhere(node: OnConflictNode, operation: OperationNode): Readonly; - cloneWithoutIndexWhere(node: OnConflictNode): Readonly; - cloneWithoutUpdateWhere(node: OnConflictNode): Readonly; -}>; -/** - * @internal - */ -export declare const OnConflictNode: OnConflictNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/on-conflict-node.js b/node_modules/kysely/dist/esm/operation-node/on-conflict-node.js deleted file mode 100644 index 961e75a..0000000 --- a/node_modules/kysely/dist/esm/operation-node/on-conflict-node.js +++ /dev/null @@ -1,66 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { WhereNode } from './where-node.js'; -/** - * @internal - */ -export const OnConflictNode = freeze({ - is(node) { - return node.kind === 'OnConflictNode'; - }, - create() { - return freeze({ - kind: 'OnConflictNode', - }); - }, - cloneWith(node, props) { - return freeze({ - ...node, - ...props, - }); - }, - cloneWithIndexWhere(node, operation) { - return freeze({ - ...node, - indexWhere: node.indexWhere - ? WhereNode.cloneWithOperation(node.indexWhere, 'And', operation) - : WhereNode.create(operation), - }); - }, - cloneWithIndexOrWhere(node, operation) { - return freeze({ - ...node, - indexWhere: node.indexWhere - ? WhereNode.cloneWithOperation(node.indexWhere, 'Or', operation) - : WhereNode.create(operation), - }); - }, - cloneWithUpdateWhere(node, operation) { - return freeze({ - ...node, - updateWhere: node.updateWhere - ? WhereNode.cloneWithOperation(node.updateWhere, 'And', operation) - : WhereNode.create(operation), - }); - }, - cloneWithUpdateOrWhere(node, operation) { - return freeze({ - ...node, - updateWhere: node.updateWhere - ? WhereNode.cloneWithOperation(node.updateWhere, 'Or', operation) - : WhereNode.create(operation), - }); - }, - cloneWithoutIndexWhere(node) { - return freeze({ - ...node, - indexWhere: undefined, - }); - }, - cloneWithoutUpdateWhere(node) { - return freeze({ - ...node, - updateWhere: undefined, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/on-duplicate-key-node.d.ts b/node_modules/kysely/dist/esm/operation-node/on-duplicate-key-node.d.ts deleted file mode 100644 index 261d830..0000000 --- a/node_modules/kysely/dist/esm/operation-node/on-duplicate-key-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { ColumnUpdateNode } from './column-update-node.js'; -import type { OperationNode } from './operation-node.js'; -export type OnDuplicateKeyNodeProps = Omit; -export interface OnDuplicateKeyNode extends OperationNode { - readonly kind: 'OnDuplicateKeyNode'; - readonly updates: ReadonlyArray; -} -type OnDuplicateKeyNodeFactory = Readonly<{ - is(node: OperationNode): node is OnDuplicateKeyNode; - create(updates: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const OnDuplicateKeyNode: OnDuplicateKeyNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/on-duplicate-key-node.js b/node_modules/kysely/dist/esm/operation-node/on-duplicate-key-node.js deleted file mode 100644 index 8cc298d..0000000 --- a/node_modules/kysely/dist/esm/operation-node/on-duplicate-key-node.js +++ /dev/null @@ -1,16 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const OnDuplicateKeyNode = freeze({ - is(node) { - return node.kind === 'OnDuplicateKeyNode'; - }, - create(updates) { - return freeze({ - kind: 'OnDuplicateKeyNode', - updates, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/on-node.d.ts b/node_modules/kysely/dist/esm/operation-node/on-node.d.ts deleted file mode 100644 index 4178633..0000000 --- a/node_modules/kysely/dist/esm/operation-node/on-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface OnNode extends OperationNode { - readonly kind: 'OnNode'; - readonly on: OperationNode; -} -type OnNodeFactory = Readonly<{ - is(node: OperationNode): node is OnNode; - create(filter: OperationNode): Readonly; - cloneWithOperation(onNode: OnNode, operator: 'And' | 'Or', operation: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const OnNode: OnNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/on-node.js b/node_modules/kysely/dist/esm/operation-node/on-node.js deleted file mode 100644 index cb3be24..0000000 --- a/node_modules/kysely/dist/esm/operation-node/on-node.js +++ /dev/null @@ -1,26 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { AndNode } from './and-node.js'; -import { OrNode } from './or-node.js'; -/** - * @internal - */ -export const OnNode = freeze({ - is(node) { - return node.kind === 'OnNode'; - }, - create(filter) { - return freeze({ - kind: 'OnNode', - on: filter, - }); - }, - cloneWithOperation(onNode, operator, operation) { - return freeze({ - ...onNode, - on: operator === 'And' - ? AndNode.create(onNode.on, operation) - : OrNode.create(onNode.on, operation), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/operation-node-source.d.ts b/node_modules/kysely/dist/esm/operation-node/operation-node-source.d.ts deleted file mode 100644 index 5550f83..0000000 --- a/node_modules/kysely/dist/esm/operation-node/operation-node-source.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface OperationNodeSource { - toOperationNode(): OperationNode; -} -export declare function isOperationNodeSource(obj: unknown): obj is OperationNodeSource; diff --git a/node_modules/kysely/dist/esm/operation-node/operation-node-source.js b/node_modules/kysely/dist/esm/operation-node/operation-node-source.js deleted file mode 100644 index 745cec4..0000000 --- a/node_modules/kysely/dist/esm/operation-node/operation-node-source.js +++ /dev/null @@ -1,5 +0,0 @@ -/// -import { isFunction, isObject } from '../util/object-utils.js'; -export function isOperationNodeSource(obj) { - return isObject(obj) && isFunction(obj.toOperationNode); -} diff --git a/node_modules/kysely/dist/esm/operation-node/operation-node-transformer.d.ts b/node_modules/kysely/dist/esm/operation-node/operation-node-transformer.d.ts deleted file mode 100644 index ff3485a..0000000 --- a/node_modules/kysely/dist/esm/operation-node/operation-node-transformer.d.ts +++ /dev/null @@ -1,238 +0,0 @@ -import type { AliasNode } from './alias-node.js'; -import type { ColumnNode } from './column-node.js'; -import type { IdentifierNode } from './identifier-node.js'; -import type { OperationNode } from './operation-node.js'; -import type { ReferenceNode } from './reference-node.js'; -import type { SelectAllNode } from './select-all-node.js'; -import type { SelectionNode } from './selection-node.js'; -import type { TableNode } from './table-node.js'; -import type { AndNode } from './and-node.js'; -import type { JoinNode } from './join-node.js'; -import type { OrNode } from './or-node.js'; -import type { ParensNode } from './parens-node.js'; -import type { PrimitiveValueListNode } from './primitive-value-list-node.js'; -import type { RawNode } from './raw-node.js'; -import type { SelectQueryNode } from './select-query-node.js'; -import type { ValueListNode } from './value-list-node.js'; -import type { ValueNode } from './value-node.js'; -import type { OperatorNode } from './operator-node.js'; -import type { FromNode } from './from-node.js'; -import type { WhereNode } from './where-node.js'; -import type { InsertQueryNode } from './insert-query-node.js'; -import type { DeleteQueryNode } from './delete-query-node.js'; -import type { ReturningNode } from './returning-node.js'; -import type { CreateTableNode } from './create-table-node.js'; -import type { AddColumnNode } from './add-column-node.js'; -import type { DropTableNode } from './drop-table-node.js'; -import type { DataTypeNode } from './data-type-node.js'; -import type { OrderByNode } from './order-by-node.js'; -import type { OrderByItemNode } from './order-by-item-node.js'; -import type { GroupByNode } from './group-by-node.js'; -import type { GroupByItemNode } from './group-by-item-node.js'; -import type { UpdateQueryNode } from './update-query-node.js'; -import type { ColumnUpdateNode } from './column-update-node.js'; -import type { LimitNode } from './limit-node.js'; -import type { OffsetNode } from './offset-node.js'; -import type { OnConflictNode } from './on-conflict-node.js'; -import type { CreateIndexNode } from './create-index-node.js'; -import type { ListNode } from './list-node.js'; -import type { DropIndexNode } from './drop-index-node.js'; -import type { PrimaryKeyConstraintNode } from './primary-key-constraint-node.js'; -import type { UniqueConstraintNode } from './unique-constraint-node.js'; -import type { ReferencesNode } from './references-node.js'; -import type { CheckConstraintNode } from './check-constraint-node.js'; -import type { WithNode } from './with-node.js'; -import type { CommonTableExpressionNode } from './common-table-expression-node.js'; -import type { CommonTableExpressionNameNode } from './common-table-expression-name-node.js'; -import type { HavingNode } from './having-node.js'; -import type { CreateSchemaNode } from './create-schema-node.js'; -import type { DropSchemaNode } from './drop-schema-node.js'; -import type { AlterTableNode } from './alter-table-node.js'; -import type { DropColumnNode } from './drop-column-node.js'; -import type { RenameColumnNode } from './rename-column-node.js'; -import type { AlterColumnNode } from './alter-column-node.js'; -import type { AddConstraintNode } from './add-constraint-node.js'; -import type { DropConstraintNode } from './drop-constraint-node.js'; -import type { ForeignKeyConstraintNode } from './foreign-key-constraint-node.js'; -import type { ColumnDefinitionNode } from './column-definition-node.js'; -import type { ModifyColumnNode } from './modify-column-node.js'; -import type { OnDuplicateKeyNode } from './on-duplicate-key-node.js'; -import type { CreateViewNode } from './create-view-node.js'; -import type { DropViewNode } from './drop-view-node.js'; -import type { GeneratedNode } from './generated-node.js'; -import type { DefaultValueNode } from './default-value-node.js'; -import type { OnNode } from './on-node.js'; -import type { ValuesNode } from './values-node.js'; -import type { SelectModifierNode } from './select-modifier-node.js'; -import type { CreateTypeNode } from './create-type-node.js'; -import type { DropTypeNode } from './drop-type-node.js'; -import type { ExplainNode } from './explain-node.js'; -import type { SchemableIdentifierNode } from './schemable-identifier-node.js'; -import type { DefaultInsertValueNode } from './default-insert-value-node.js'; -import type { AggregateFunctionNode } from './aggregate-function-node.js'; -import type { OverNode } from './over-node.js'; -import type { PartitionByNode } from './partition-by-node.js'; -import type { PartitionByItemNode } from './partition-by-item-node.js'; -import type { SetOperationNode } from './set-operation-node.js'; -import type { BinaryOperationNode } from './binary-operation-node.js'; -import type { UnaryOperationNode } from './unary-operation-node.js'; -import type { UsingNode } from './using-node.js'; -import type { FunctionNode } from './function-node.js'; -import type { CaseNode } from './case-node.js'; -import type { WhenNode } from './when-node.js'; -import type { JSONReferenceNode } from './json-reference-node.js'; -import type { JSONPathNode } from './json-path-node.js'; -import type { JSONPathLegNode } from './json-path-leg-node.js'; -import type { JSONOperatorChainNode } from './json-operator-chain-node.js'; -import type { TupleNode } from './tuple-node.js'; -import type { MergeQueryNode } from './merge-query-node.js'; -import type { MatchedNode } from './matched-node.js'; -import type { AddIndexNode } from './add-index-node.js'; -import type { CastNode } from './cast-node.js'; -import type { FetchNode } from './fetch-node.js'; -import type { TopNode } from './top-node.js'; -import type { OutputNode } from './output-node.js'; -import type { RefreshMaterializedViewNode } from './refresh-materialized-view-node.js'; -import type { OrActionNode } from './or-action-node.js'; -import type { CollateNode } from './collate-node.js'; -import type { QueryId } from '../util/query-id.js'; -import type { RenameConstraintNode } from './rename-constraint-node.js'; -/** - * Transforms an operation node tree into another one. - * - * Kysely queries are expressed internally as a tree of objects (operation nodes). - * `OperationNodeTransformer` takes such a tree as its input and returns a - * transformed deep copy of it. By default the `OperationNodeTransformer` - * does nothing. You need to override one or more methods to make it do - * something. - * - * There's a method for each node type. For example if you'd like to convert - * each identifier (table name, column name, alias etc.) from camelCase to - * snake_case, you'd do something like this: - * - * ```ts - * import { type IdentifierNode, OperationNodeTransformer } from 'kysely' - * import snakeCase from 'lodash/snakeCase' - * - * class CamelCaseTransformer extends OperationNodeTransformer { - * override transformIdentifier(node: IdentifierNode): IdentifierNode { - * node = super.transformIdentifier(node) - * - * return { - * ...node, - * name: snakeCase(node.name), - * } - * } - * } - * - * const transformer = new CamelCaseTransformer() - * - * const query = db.selectFrom('person').select(['first_name', 'last_name']) - * - * const tree = transformer.transformNode(query.toOperationNode()) - * ``` - */ -export declare class OperationNodeTransformer { - #private; - protected readonly nodeStack: OperationNode[]; - transformNode(node: T, queryId?: QueryId): T; - protected transformNodeImpl(node: T, queryId?: QueryId): T; - protected transformNodeList | undefined>(list: T, queryId?: QueryId): T; - protected transformSelectQuery(node: SelectQueryNode, queryId?: QueryId): SelectQueryNode; - protected transformSelection(node: SelectionNode, queryId?: QueryId): SelectionNode; - protected transformColumn(node: ColumnNode, queryId?: QueryId): ColumnNode; - protected transformAlias(node: AliasNode, queryId?: QueryId): AliasNode; - protected transformTable(node: TableNode, queryId?: QueryId): TableNode; - protected transformFrom(node: FromNode, queryId?: QueryId): FromNode; - protected transformReference(node: ReferenceNode, queryId?: QueryId): ReferenceNode; - protected transformAnd(node: AndNode, queryId?: QueryId): AndNode; - protected transformOr(node: OrNode, queryId?: QueryId): OrNode; - protected transformValueList(node: ValueListNode, queryId?: QueryId): ValueListNode; - protected transformParens(node: ParensNode, queryId?: QueryId): ParensNode; - protected transformJoin(node: JoinNode, queryId?: QueryId): JoinNode; - protected transformRaw(node: RawNode, queryId?: QueryId): RawNode; - protected transformWhere(node: WhereNode, queryId?: QueryId): WhereNode; - protected transformInsertQuery(node: InsertQueryNode, queryId?: QueryId): InsertQueryNode; - protected transformValues(node: ValuesNode, queryId?: QueryId): ValuesNode; - protected transformDeleteQuery(node: DeleteQueryNode, queryId?: QueryId): DeleteQueryNode; - protected transformReturning(node: ReturningNode, queryId?: QueryId): ReturningNode; - protected transformCreateTable(node: CreateTableNode, queryId?: QueryId): CreateTableNode; - protected transformColumnDefinition(node: ColumnDefinitionNode, queryId?: QueryId): ColumnDefinitionNode; - protected transformAddColumn(node: AddColumnNode, queryId?: QueryId): AddColumnNode; - protected transformDropTable(node: DropTableNode, queryId?: QueryId): DropTableNode; - protected transformOrderBy(node: OrderByNode, queryId?: QueryId): OrderByNode; - protected transformOrderByItem(node: OrderByItemNode, queryId?: QueryId): OrderByItemNode; - protected transformGroupBy(node: GroupByNode, queryId?: QueryId): GroupByNode; - protected transformGroupByItem(node: GroupByItemNode, queryId?: QueryId): GroupByItemNode; - protected transformUpdateQuery(node: UpdateQueryNode, queryId?: QueryId): UpdateQueryNode; - protected transformColumnUpdate(node: ColumnUpdateNode, queryId?: QueryId): ColumnUpdateNode; - protected transformLimit(node: LimitNode, queryId?: QueryId): LimitNode; - protected transformOffset(node: OffsetNode, queryId?: QueryId): OffsetNode; - protected transformOnConflict(node: OnConflictNode, queryId?: QueryId): OnConflictNode; - protected transformOnDuplicateKey(node: OnDuplicateKeyNode, queryId?: QueryId): OnDuplicateKeyNode; - protected transformCreateIndex(node: CreateIndexNode, queryId?: QueryId): CreateIndexNode; - protected transformList(node: ListNode, queryId?: QueryId): ListNode; - protected transformDropIndex(node: DropIndexNode, queryId?: QueryId): DropIndexNode; - protected transformPrimaryKeyConstraint(node: PrimaryKeyConstraintNode, queryId?: QueryId): PrimaryKeyConstraintNode; - protected transformUniqueConstraint(node: UniqueConstraintNode, queryId?: QueryId): UniqueConstraintNode; - protected transformForeignKeyConstraint(node: ForeignKeyConstraintNode, queryId?: QueryId): ForeignKeyConstraintNode; - protected transformSetOperation(node: SetOperationNode, queryId?: QueryId): SetOperationNode; - protected transformReferences(node: ReferencesNode, queryId?: QueryId): ReferencesNode; - protected transformCheckConstraint(node: CheckConstraintNode, queryId?: QueryId): CheckConstraintNode; - protected transformWith(node: WithNode, queryId?: QueryId): WithNode; - protected transformCommonTableExpression(node: CommonTableExpressionNode, queryId?: QueryId): CommonTableExpressionNode; - protected transformCommonTableExpressionName(node: CommonTableExpressionNameNode, queryId?: QueryId): CommonTableExpressionNameNode; - protected transformHaving(node: HavingNode, queryId?: QueryId): HavingNode; - protected transformCreateSchema(node: CreateSchemaNode, queryId?: QueryId): CreateSchemaNode; - protected transformDropSchema(node: DropSchemaNode, queryId?: QueryId): DropSchemaNode; - protected transformAlterTable(node: AlterTableNode, queryId?: QueryId): AlterTableNode; - protected transformDropColumn(node: DropColumnNode, queryId?: QueryId): DropColumnNode; - protected transformRenameColumn(node: RenameColumnNode, queryId?: QueryId): RenameColumnNode; - protected transformAlterColumn(node: AlterColumnNode, queryId?: QueryId): AlterColumnNode; - protected transformModifyColumn(node: ModifyColumnNode, queryId?: QueryId): ModifyColumnNode; - protected transformAddConstraint(node: AddConstraintNode, queryId?: QueryId): AddConstraintNode; - protected transformDropConstraint(node: DropConstraintNode, queryId?: QueryId): DropConstraintNode; - protected transformRenameConstraint(node: RenameConstraintNode, queryId?: QueryId): RenameConstraintNode; - protected transformCreateView(node: CreateViewNode, queryId?: QueryId): CreateViewNode; - protected transformRefreshMaterializedView(node: RefreshMaterializedViewNode, queryId?: QueryId): RefreshMaterializedViewNode; - protected transformDropView(node: DropViewNode, queryId?: QueryId): DropViewNode; - protected transformGenerated(node: GeneratedNode, queryId?: QueryId): GeneratedNode; - protected transformDefaultValue(node: DefaultValueNode, queryId?: QueryId): DefaultValueNode; - protected transformOn(node: OnNode, queryId?: QueryId): OnNode; - protected transformSelectModifier(node: SelectModifierNode, queryId?: QueryId): SelectModifierNode; - protected transformCreateType(node: CreateTypeNode, queryId?: QueryId): CreateTypeNode; - protected transformDropType(node: DropTypeNode, queryId?: QueryId): DropTypeNode; - protected transformExplain(node: ExplainNode, queryId?: QueryId): ExplainNode; - protected transformSchemableIdentifier(node: SchemableIdentifierNode, queryId?: QueryId): SchemableIdentifierNode; - protected transformAggregateFunction(node: AggregateFunctionNode, queryId?: QueryId): AggregateFunctionNode; - protected transformOver(node: OverNode, queryId?: QueryId): OverNode; - protected transformPartitionBy(node: PartitionByNode, queryId?: QueryId): PartitionByNode; - protected transformPartitionByItem(node: PartitionByItemNode, queryId?: QueryId): PartitionByItemNode; - protected transformBinaryOperation(node: BinaryOperationNode, queryId?: QueryId): BinaryOperationNode; - protected transformUnaryOperation(node: UnaryOperationNode, queryId?: QueryId): UnaryOperationNode; - protected transformUsing(node: UsingNode, queryId?: QueryId): UsingNode; - protected transformFunction(node: FunctionNode, queryId?: QueryId): FunctionNode; - protected transformCase(node: CaseNode, queryId?: QueryId): CaseNode; - protected transformWhen(node: WhenNode, queryId?: QueryId): WhenNode; - protected transformJSONReference(node: JSONReferenceNode, queryId?: QueryId): JSONReferenceNode; - protected transformJSONPath(node: JSONPathNode, queryId?: QueryId): JSONPathNode; - protected transformJSONPathLeg(node: JSONPathLegNode, _queryId?: QueryId): JSONPathLegNode; - protected transformJSONOperatorChain(node: JSONOperatorChainNode, queryId?: QueryId): JSONOperatorChainNode; - protected transformTuple(node: TupleNode, queryId?: QueryId): TupleNode; - protected transformMergeQuery(node: MergeQueryNode, queryId?: QueryId): MergeQueryNode; - protected transformMatched(node: MatchedNode, _queryId?: QueryId): MatchedNode; - protected transformAddIndex(node: AddIndexNode, queryId?: QueryId): AddIndexNode; - protected transformCast(node: CastNode, queryId?: QueryId): CastNode; - protected transformFetch(node: FetchNode, queryId?: QueryId): FetchNode; - protected transformTop(node: TopNode, _queryId?: QueryId): TopNode; - protected transformOutput(node: OutputNode, queryId?: QueryId): OutputNode; - protected transformDataType(node: DataTypeNode, _queryId?: QueryId): DataTypeNode; - protected transformSelectAll(node: SelectAllNode, _queryId?: QueryId): SelectAllNode; - protected transformIdentifier(node: IdentifierNode, _queryId?: QueryId): IdentifierNode; - protected transformValue(node: ValueNode, _queryId?: QueryId): ValueNode; - protected transformPrimitiveValueList(node: PrimitiveValueListNode, _queryId?: QueryId): PrimitiveValueListNode; - protected transformOperator(node: OperatorNode, _queryId?: QueryId): OperatorNode; - protected transformDefaultInsertValue(node: DefaultInsertValueNode, _queryId?: QueryId): DefaultInsertValueNode; - protected transformOrAction(node: OrActionNode, _queryId?: QueryId): OrActionNode; - protected transformCollate(node: CollateNode, _queryId?: QueryId): CollateNode; -} diff --git a/node_modules/kysely/dist/esm/operation-node/operation-node-transformer.js b/node_modules/kysely/dist/esm/operation-node/operation-node-transformer.js deleted file mode 100644 index a059504..0000000 --- a/node_modules/kysely/dist/esm/operation-node/operation-node-transformer.js +++ /dev/null @@ -1,926 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { requireAllProps } from '../util/require-all-props.js'; -/** - * Transforms an operation node tree into another one. - * - * Kysely queries are expressed internally as a tree of objects (operation nodes). - * `OperationNodeTransformer` takes such a tree as its input and returns a - * transformed deep copy of it. By default the `OperationNodeTransformer` - * does nothing. You need to override one or more methods to make it do - * something. - * - * There's a method for each node type. For example if you'd like to convert - * each identifier (table name, column name, alias etc.) from camelCase to - * snake_case, you'd do something like this: - * - * ```ts - * import { type IdentifierNode, OperationNodeTransformer } from 'kysely' - * import snakeCase from 'lodash/snakeCase' - * - * class CamelCaseTransformer extends OperationNodeTransformer { - * override transformIdentifier(node: IdentifierNode): IdentifierNode { - * node = super.transformIdentifier(node) - * - * return { - * ...node, - * name: snakeCase(node.name), - * } - * } - * } - * - * const transformer = new CamelCaseTransformer() - * - * const query = db.selectFrom('person').select(['first_name', 'last_name']) - * - * const tree = transformer.transformNode(query.toOperationNode()) - * ``` - */ -export class OperationNodeTransformer { - nodeStack = []; - #transformers = freeze({ - AliasNode: this.transformAlias.bind(this), - ColumnNode: this.transformColumn.bind(this), - IdentifierNode: this.transformIdentifier.bind(this), - SchemableIdentifierNode: this.transformSchemableIdentifier.bind(this), - RawNode: this.transformRaw.bind(this), - ReferenceNode: this.transformReference.bind(this), - SelectQueryNode: this.transformSelectQuery.bind(this), - SelectionNode: this.transformSelection.bind(this), - TableNode: this.transformTable.bind(this), - FromNode: this.transformFrom.bind(this), - SelectAllNode: this.transformSelectAll.bind(this), - AndNode: this.transformAnd.bind(this), - OrNode: this.transformOr.bind(this), - ValueNode: this.transformValue.bind(this), - ValueListNode: this.transformValueList.bind(this), - PrimitiveValueListNode: this.transformPrimitiveValueList.bind(this), - ParensNode: this.transformParens.bind(this), - JoinNode: this.transformJoin.bind(this), - OperatorNode: this.transformOperator.bind(this), - WhereNode: this.transformWhere.bind(this), - InsertQueryNode: this.transformInsertQuery.bind(this), - DeleteQueryNode: this.transformDeleteQuery.bind(this), - ReturningNode: this.transformReturning.bind(this), - CreateTableNode: this.transformCreateTable.bind(this), - AddColumnNode: this.transformAddColumn.bind(this), - ColumnDefinitionNode: this.transformColumnDefinition.bind(this), - DropTableNode: this.transformDropTable.bind(this), - DataTypeNode: this.transformDataType.bind(this), - OrderByNode: this.transformOrderBy.bind(this), - OrderByItemNode: this.transformOrderByItem.bind(this), - GroupByNode: this.transformGroupBy.bind(this), - GroupByItemNode: this.transformGroupByItem.bind(this), - UpdateQueryNode: this.transformUpdateQuery.bind(this), - ColumnUpdateNode: this.transformColumnUpdate.bind(this), - LimitNode: this.transformLimit.bind(this), - OffsetNode: this.transformOffset.bind(this), - OnConflictNode: this.transformOnConflict.bind(this), - OnDuplicateKeyNode: this.transformOnDuplicateKey.bind(this), - CreateIndexNode: this.transformCreateIndex.bind(this), - DropIndexNode: this.transformDropIndex.bind(this), - ListNode: this.transformList.bind(this), - PrimaryKeyConstraintNode: this.transformPrimaryKeyConstraint.bind(this), - UniqueConstraintNode: this.transformUniqueConstraint.bind(this), - ReferencesNode: this.transformReferences.bind(this), - CheckConstraintNode: this.transformCheckConstraint.bind(this), - WithNode: this.transformWith.bind(this), - CommonTableExpressionNode: this.transformCommonTableExpression.bind(this), - CommonTableExpressionNameNode: this.transformCommonTableExpressionName.bind(this), - HavingNode: this.transformHaving.bind(this), - CreateSchemaNode: this.transformCreateSchema.bind(this), - DropSchemaNode: this.transformDropSchema.bind(this), - AlterTableNode: this.transformAlterTable.bind(this), - DropColumnNode: this.transformDropColumn.bind(this), - RenameColumnNode: this.transformRenameColumn.bind(this), - AlterColumnNode: this.transformAlterColumn.bind(this), - ModifyColumnNode: this.transformModifyColumn.bind(this), - AddConstraintNode: this.transformAddConstraint.bind(this), - DropConstraintNode: this.transformDropConstraint.bind(this), - RenameConstraintNode: this.transformRenameConstraint.bind(this), - ForeignKeyConstraintNode: this.transformForeignKeyConstraint.bind(this), - CreateViewNode: this.transformCreateView.bind(this), - RefreshMaterializedViewNode: this.transformRefreshMaterializedView.bind(this), - DropViewNode: this.transformDropView.bind(this), - GeneratedNode: this.transformGenerated.bind(this), - DefaultValueNode: this.transformDefaultValue.bind(this), - OnNode: this.transformOn.bind(this), - ValuesNode: this.transformValues.bind(this), - SelectModifierNode: this.transformSelectModifier.bind(this), - CreateTypeNode: this.transformCreateType.bind(this), - DropTypeNode: this.transformDropType.bind(this), - ExplainNode: this.transformExplain.bind(this), - DefaultInsertValueNode: this.transformDefaultInsertValue.bind(this), - AggregateFunctionNode: this.transformAggregateFunction.bind(this), - OverNode: this.transformOver.bind(this), - PartitionByNode: this.transformPartitionBy.bind(this), - PartitionByItemNode: this.transformPartitionByItem.bind(this), - SetOperationNode: this.transformSetOperation.bind(this), - BinaryOperationNode: this.transformBinaryOperation.bind(this), - UnaryOperationNode: this.transformUnaryOperation.bind(this), - UsingNode: this.transformUsing.bind(this), - FunctionNode: this.transformFunction.bind(this), - CaseNode: this.transformCase.bind(this), - WhenNode: this.transformWhen.bind(this), - JSONReferenceNode: this.transformJSONReference.bind(this), - JSONPathNode: this.transformJSONPath.bind(this), - JSONPathLegNode: this.transformJSONPathLeg.bind(this), - JSONOperatorChainNode: this.transformJSONOperatorChain.bind(this), - TupleNode: this.transformTuple.bind(this), - MergeQueryNode: this.transformMergeQuery.bind(this), - MatchedNode: this.transformMatched.bind(this), - AddIndexNode: this.transformAddIndex.bind(this), - CastNode: this.transformCast.bind(this), - FetchNode: this.transformFetch.bind(this), - TopNode: this.transformTop.bind(this), - OutputNode: this.transformOutput.bind(this), - OrActionNode: this.transformOrAction.bind(this), - CollateNode: this.transformCollate.bind(this), - }); - transformNode(node, queryId) { - if (!node) { - return node; - } - this.nodeStack.push(node); - const out = this.transformNodeImpl(node, queryId); - this.nodeStack.pop(); - return freeze(out); - } - transformNodeImpl(node, queryId) { - return this.#transformers[node.kind](node, queryId); - } - transformNodeList(list, queryId) { - if (!list) { - return list; - } - return freeze(list.map((node) => this.transformNode(node, queryId))); - } - transformSelectQuery(node, queryId) { - return requireAllProps({ - kind: 'SelectQueryNode', - from: this.transformNode(node.from, queryId), - selections: this.transformNodeList(node.selections, queryId), - distinctOn: this.transformNodeList(node.distinctOn, queryId), - joins: this.transformNodeList(node.joins, queryId), - groupBy: this.transformNode(node.groupBy, queryId), - orderBy: this.transformNode(node.orderBy, queryId), - where: this.transformNode(node.where, queryId), - frontModifiers: this.transformNodeList(node.frontModifiers, queryId), - endModifiers: this.transformNodeList(node.endModifiers, queryId), - limit: this.transformNode(node.limit, queryId), - offset: this.transformNode(node.offset, queryId), - with: this.transformNode(node.with, queryId), - having: this.transformNode(node.having, queryId), - explain: this.transformNode(node.explain, queryId), - setOperations: this.transformNodeList(node.setOperations, queryId), - fetch: this.transformNode(node.fetch, queryId), - top: this.transformNode(node.top, queryId), - }); - } - transformSelection(node, queryId) { - return requireAllProps({ - kind: 'SelectionNode', - selection: this.transformNode(node.selection, queryId), - }); - } - transformColumn(node, queryId) { - return requireAllProps({ - kind: 'ColumnNode', - column: this.transformNode(node.column, queryId), - }); - } - transformAlias(node, queryId) { - return requireAllProps({ - kind: 'AliasNode', - node: this.transformNode(node.node, queryId), - alias: this.transformNode(node.alias, queryId), - }); - } - transformTable(node, queryId) { - return requireAllProps({ - kind: 'TableNode', - table: this.transformNode(node.table, queryId), - }); - } - transformFrom(node, queryId) { - return requireAllProps({ - kind: 'FromNode', - froms: this.transformNodeList(node.froms, queryId), - }); - } - transformReference(node, queryId) { - return requireAllProps({ - kind: 'ReferenceNode', - column: this.transformNode(node.column, queryId), - table: this.transformNode(node.table, queryId), - }); - } - transformAnd(node, queryId) { - return requireAllProps({ - kind: 'AndNode', - left: this.transformNode(node.left, queryId), - right: this.transformNode(node.right, queryId), - }); - } - transformOr(node, queryId) { - return requireAllProps({ - kind: 'OrNode', - left: this.transformNode(node.left, queryId), - right: this.transformNode(node.right, queryId), - }); - } - transformValueList(node, queryId) { - return requireAllProps({ - kind: 'ValueListNode', - values: this.transformNodeList(node.values, queryId), - }); - } - transformParens(node, queryId) { - return requireAllProps({ - kind: 'ParensNode', - node: this.transformNode(node.node, queryId), - }); - } - transformJoin(node, queryId) { - return requireAllProps({ - kind: 'JoinNode', - joinType: node.joinType, - table: this.transformNode(node.table, queryId), - on: this.transformNode(node.on, queryId), - }); - } - transformRaw(node, queryId) { - return requireAllProps({ - kind: 'RawNode', - sqlFragments: freeze([...node.sqlFragments]), - parameters: this.transformNodeList(node.parameters, queryId), - }); - } - transformWhere(node, queryId) { - return requireAllProps({ - kind: 'WhereNode', - where: this.transformNode(node.where, queryId), - }); - } - transformInsertQuery(node, queryId) { - return requireAllProps({ - kind: 'InsertQueryNode', - into: this.transformNode(node.into, queryId), - columns: this.transformNodeList(node.columns, queryId), - values: this.transformNode(node.values, queryId), - returning: this.transformNode(node.returning, queryId), - onConflict: this.transformNode(node.onConflict, queryId), - onDuplicateKey: this.transformNode(node.onDuplicateKey, queryId), - endModifiers: this.transformNodeList(node.endModifiers, queryId), - with: this.transformNode(node.with, queryId), - ignore: node.ignore, - orAction: this.transformNode(node.orAction, queryId), - replace: node.replace, - explain: this.transformNode(node.explain, queryId), - defaultValues: node.defaultValues, - top: this.transformNode(node.top, queryId), - output: this.transformNode(node.output, queryId), - }); - } - transformValues(node, queryId) { - return requireAllProps({ - kind: 'ValuesNode', - values: this.transformNodeList(node.values, queryId), - }); - } - transformDeleteQuery(node, queryId) { - return requireAllProps({ - kind: 'DeleteQueryNode', - from: this.transformNode(node.from, queryId), - using: this.transformNode(node.using, queryId), - joins: this.transformNodeList(node.joins, queryId), - where: this.transformNode(node.where, queryId), - returning: this.transformNode(node.returning, queryId), - endModifiers: this.transformNodeList(node.endModifiers, queryId), - with: this.transformNode(node.with, queryId), - orderBy: this.transformNode(node.orderBy, queryId), - limit: this.transformNode(node.limit, queryId), - explain: this.transformNode(node.explain, queryId), - top: this.transformNode(node.top, queryId), - output: this.transformNode(node.output, queryId), - }); - } - transformReturning(node, queryId) { - return requireAllProps({ - kind: 'ReturningNode', - selections: this.transformNodeList(node.selections, queryId), - }); - } - transformCreateTable(node, queryId) { - return requireAllProps({ - kind: 'CreateTableNode', - table: this.transformNode(node.table, queryId), - columns: this.transformNodeList(node.columns, queryId), - constraints: this.transformNodeList(node.constraints, queryId), - temporary: node.temporary, - ifNotExists: node.ifNotExists, - onCommit: node.onCommit, - frontModifiers: this.transformNodeList(node.frontModifiers, queryId), - endModifiers: this.transformNodeList(node.endModifiers, queryId), - selectQuery: this.transformNode(node.selectQuery, queryId), - }); - } - transformColumnDefinition(node, queryId) { - return requireAllProps({ - kind: 'ColumnDefinitionNode', - column: this.transformNode(node.column, queryId), - dataType: this.transformNode(node.dataType, queryId), - references: this.transformNode(node.references, queryId), - primaryKey: node.primaryKey, - autoIncrement: node.autoIncrement, - unique: node.unique, - notNull: node.notNull, - unsigned: node.unsigned, - defaultTo: this.transformNode(node.defaultTo, queryId), - check: this.transformNode(node.check, queryId), - generated: this.transformNode(node.generated, queryId), - frontModifiers: this.transformNodeList(node.frontModifiers, queryId), - endModifiers: this.transformNodeList(node.endModifiers, queryId), - nullsNotDistinct: node.nullsNotDistinct, - identity: node.identity, - ifNotExists: node.ifNotExists, - }); - } - transformAddColumn(node, queryId) { - return requireAllProps({ - kind: 'AddColumnNode', - column: this.transformNode(node.column, queryId), - }); - } - transformDropTable(node, queryId) { - return requireAllProps({ - kind: 'DropTableNode', - table: this.transformNode(node.table, queryId), - ifExists: node.ifExists, - cascade: node.cascade, - }); - } - transformOrderBy(node, queryId) { - return requireAllProps({ - kind: 'OrderByNode', - items: this.transformNodeList(node.items, queryId), - }); - } - transformOrderByItem(node, queryId) { - return requireAllProps({ - kind: 'OrderByItemNode', - orderBy: this.transformNode(node.orderBy, queryId), - direction: this.transformNode(node.direction, queryId), - collation: this.transformNode(node.collation, queryId), - nulls: node.nulls, - }); - } - transformGroupBy(node, queryId) { - return requireAllProps({ - kind: 'GroupByNode', - items: this.transformNodeList(node.items, queryId), - }); - } - transformGroupByItem(node, queryId) { - return requireAllProps({ - kind: 'GroupByItemNode', - groupBy: this.transformNode(node.groupBy, queryId), - }); - } - transformUpdateQuery(node, queryId) { - return requireAllProps({ - kind: 'UpdateQueryNode', - table: this.transformNode(node.table, queryId), - from: this.transformNode(node.from, queryId), - joins: this.transformNodeList(node.joins, queryId), - where: this.transformNode(node.where, queryId), - updates: this.transformNodeList(node.updates, queryId), - returning: this.transformNode(node.returning, queryId), - endModifiers: this.transformNodeList(node.endModifiers, queryId), - with: this.transformNode(node.with, queryId), - explain: this.transformNode(node.explain, queryId), - limit: this.transformNode(node.limit, queryId), - top: this.transformNode(node.top, queryId), - output: this.transformNode(node.output, queryId), - orderBy: this.transformNode(node.orderBy, queryId), - }); - } - transformColumnUpdate(node, queryId) { - return requireAllProps({ - kind: 'ColumnUpdateNode', - column: this.transformNode(node.column, queryId), - value: this.transformNode(node.value, queryId), - }); - } - transformLimit(node, queryId) { - return requireAllProps({ - kind: 'LimitNode', - limit: this.transformNode(node.limit, queryId), - }); - } - transformOffset(node, queryId) { - return requireAllProps({ - kind: 'OffsetNode', - offset: this.transformNode(node.offset, queryId), - }); - } - transformOnConflict(node, queryId) { - return requireAllProps({ - kind: 'OnConflictNode', - columns: this.transformNodeList(node.columns, queryId), - constraint: this.transformNode(node.constraint, queryId), - indexExpression: this.transformNode(node.indexExpression, queryId), - indexWhere: this.transformNode(node.indexWhere, queryId), - updates: this.transformNodeList(node.updates, queryId), - updateWhere: this.transformNode(node.updateWhere, queryId), - doNothing: node.doNothing, - }); - } - transformOnDuplicateKey(node, queryId) { - return requireAllProps({ - kind: 'OnDuplicateKeyNode', - updates: this.transformNodeList(node.updates, queryId), - }); - } - transformCreateIndex(node, queryId) { - return requireAllProps({ - kind: 'CreateIndexNode', - name: this.transformNode(node.name, queryId), - table: this.transformNode(node.table, queryId), - columns: this.transformNodeList(node.columns, queryId), - unique: node.unique, - using: this.transformNode(node.using, queryId), - ifNotExists: node.ifNotExists, - where: this.transformNode(node.where, queryId), - nullsNotDistinct: node.nullsNotDistinct, - }); - } - transformList(node, queryId) { - return requireAllProps({ - kind: 'ListNode', - items: this.transformNodeList(node.items, queryId), - }); - } - transformDropIndex(node, queryId) { - return requireAllProps({ - kind: 'DropIndexNode', - name: this.transformNode(node.name, queryId), - table: this.transformNode(node.table, queryId), - ifExists: node.ifExists, - cascade: node.cascade, - }); - } - transformPrimaryKeyConstraint(node, queryId) { - return requireAllProps({ - kind: 'PrimaryKeyConstraintNode', - columns: this.transformNodeList(node.columns, queryId), - name: this.transformNode(node.name, queryId), - deferrable: node.deferrable, - initiallyDeferred: node.initiallyDeferred, - }); - } - transformUniqueConstraint(node, queryId) { - return requireAllProps({ - kind: 'UniqueConstraintNode', - columns: this.transformNodeList(node.columns, queryId), - name: this.transformNode(node.name, queryId), - nullsNotDistinct: node.nullsNotDistinct, - deferrable: node.deferrable, - initiallyDeferred: node.initiallyDeferred, - }); - } - transformForeignKeyConstraint(node, queryId) { - return requireAllProps({ - kind: 'ForeignKeyConstraintNode', - columns: this.transformNodeList(node.columns, queryId), - references: this.transformNode(node.references, queryId), - name: this.transformNode(node.name, queryId), - onDelete: node.onDelete, - onUpdate: node.onUpdate, - deferrable: node.deferrable, - initiallyDeferred: node.initiallyDeferred, - }); - } - transformSetOperation(node, queryId) { - return requireAllProps({ - kind: 'SetOperationNode', - operator: node.operator, - expression: this.transformNode(node.expression, queryId), - all: node.all, - }); - } - transformReferences(node, queryId) { - return requireAllProps({ - kind: 'ReferencesNode', - table: this.transformNode(node.table, queryId), - columns: this.transformNodeList(node.columns, queryId), - onDelete: node.onDelete, - onUpdate: node.onUpdate, - }); - } - transformCheckConstraint(node, queryId) { - return requireAllProps({ - kind: 'CheckConstraintNode', - expression: this.transformNode(node.expression, queryId), - name: this.transformNode(node.name, queryId), - }); - } - transformWith(node, queryId) { - return requireAllProps({ - kind: 'WithNode', - expressions: this.transformNodeList(node.expressions, queryId), - recursive: node.recursive, - }); - } - transformCommonTableExpression(node, queryId) { - return requireAllProps({ - kind: 'CommonTableExpressionNode', - name: this.transformNode(node.name, queryId), - materialized: node.materialized, - expression: this.transformNode(node.expression, queryId), - }); - } - transformCommonTableExpressionName(node, queryId) { - return requireAllProps({ - kind: 'CommonTableExpressionNameNode', - table: this.transformNode(node.table, queryId), - columns: this.transformNodeList(node.columns, queryId), - }); - } - transformHaving(node, queryId) { - return requireAllProps({ - kind: 'HavingNode', - having: this.transformNode(node.having, queryId), - }); - } - transformCreateSchema(node, queryId) { - return requireAllProps({ - kind: 'CreateSchemaNode', - schema: this.transformNode(node.schema, queryId), - ifNotExists: node.ifNotExists, - }); - } - transformDropSchema(node, queryId) { - return requireAllProps({ - kind: 'DropSchemaNode', - schema: this.transformNode(node.schema, queryId), - ifExists: node.ifExists, - cascade: node.cascade, - }); - } - transformAlterTable(node, queryId) { - return requireAllProps({ - kind: 'AlterTableNode', - table: this.transformNode(node.table, queryId), - renameTo: this.transformNode(node.renameTo, queryId), - setSchema: this.transformNode(node.setSchema, queryId), - columnAlterations: this.transformNodeList(node.columnAlterations, queryId), - addConstraint: this.transformNode(node.addConstraint, queryId), - dropConstraint: this.transformNode(node.dropConstraint, queryId), - renameConstraint: this.transformNode(node.renameConstraint, queryId), - addIndex: this.transformNode(node.addIndex, queryId), - dropIndex: this.transformNode(node.dropIndex, queryId), - }); - } - transformDropColumn(node, queryId) { - return requireAllProps({ - kind: 'DropColumnNode', - column: this.transformNode(node.column, queryId), - }); - } - transformRenameColumn(node, queryId) { - return requireAllProps({ - kind: 'RenameColumnNode', - column: this.transformNode(node.column, queryId), - renameTo: this.transformNode(node.renameTo, queryId), - }); - } - transformAlterColumn(node, queryId) { - return requireAllProps({ - kind: 'AlterColumnNode', - column: this.transformNode(node.column, queryId), - dataType: this.transformNode(node.dataType, queryId), - dataTypeExpression: this.transformNode(node.dataTypeExpression, queryId), - setDefault: this.transformNode(node.setDefault, queryId), - dropDefault: node.dropDefault, - setNotNull: node.setNotNull, - dropNotNull: node.dropNotNull, - }); - } - transformModifyColumn(node, queryId) { - return requireAllProps({ - kind: 'ModifyColumnNode', - column: this.transformNode(node.column, queryId), - }); - } - transformAddConstraint(node, queryId) { - return requireAllProps({ - kind: 'AddConstraintNode', - constraint: this.transformNode(node.constraint, queryId), - }); - } - transformDropConstraint(node, queryId) { - return requireAllProps({ - kind: 'DropConstraintNode', - constraintName: this.transformNode(node.constraintName, queryId), - ifExists: node.ifExists, - modifier: node.modifier, - }); - } - transformRenameConstraint(node, queryId) { - return requireAllProps({ - kind: 'RenameConstraintNode', - oldName: this.transformNode(node.oldName, queryId), - newName: this.transformNode(node.newName, queryId), - }); - } - transformCreateView(node, queryId) { - return requireAllProps({ - kind: 'CreateViewNode', - name: this.transformNode(node.name, queryId), - temporary: node.temporary, - orReplace: node.orReplace, - ifNotExists: node.ifNotExists, - materialized: node.materialized, - columns: this.transformNodeList(node.columns, queryId), - as: this.transformNode(node.as, queryId), - }); - } - transformRefreshMaterializedView(node, queryId) { - return requireAllProps({ - kind: 'RefreshMaterializedViewNode', - name: this.transformNode(node.name, queryId), - concurrently: node.concurrently, - withNoData: node.withNoData, - }); - } - transformDropView(node, queryId) { - return requireAllProps({ - kind: 'DropViewNode', - name: this.transformNode(node.name, queryId), - ifExists: node.ifExists, - materialized: node.materialized, - cascade: node.cascade, - }); - } - transformGenerated(node, queryId) { - return requireAllProps({ - kind: 'GeneratedNode', - byDefault: node.byDefault, - always: node.always, - identity: node.identity, - stored: node.stored, - expression: this.transformNode(node.expression, queryId), - }); - } - transformDefaultValue(node, queryId) { - return requireAllProps({ - kind: 'DefaultValueNode', - defaultValue: this.transformNode(node.defaultValue, queryId), - }); - } - transformOn(node, queryId) { - return requireAllProps({ - kind: 'OnNode', - on: this.transformNode(node.on, queryId), - }); - } - transformSelectModifier(node, queryId) { - return requireAllProps({ - kind: 'SelectModifierNode', - modifier: node.modifier, - rawModifier: this.transformNode(node.rawModifier, queryId), - of: this.transformNodeList(node.of, queryId), - }); - } - transformCreateType(node, queryId) { - return requireAllProps({ - kind: 'CreateTypeNode', - name: this.transformNode(node.name, queryId), - enum: this.transformNode(node.enum, queryId), - }); - } - transformDropType(node, queryId) { - return requireAllProps({ - kind: 'DropTypeNode', - name: this.transformNode(node.name, queryId), - ifExists: node.ifExists, - }); - } - transformExplain(node, queryId) { - return requireAllProps({ - kind: 'ExplainNode', - format: node.format, - options: this.transformNode(node.options, queryId), - }); - } - transformSchemableIdentifier(node, queryId) { - return requireAllProps({ - kind: 'SchemableIdentifierNode', - schema: this.transformNode(node.schema, queryId), - identifier: this.transformNode(node.identifier, queryId), - }); - } - transformAggregateFunction(node, queryId) { - return requireAllProps({ - kind: 'AggregateFunctionNode', - func: node.func, - aggregated: this.transformNodeList(node.aggregated, queryId), - distinct: node.distinct, - orderBy: this.transformNode(node.orderBy, queryId), - withinGroup: this.transformNode(node.withinGroup, queryId), - filter: this.transformNode(node.filter, queryId), - over: this.transformNode(node.over, queryId), - }); - } - transformOver(node, queryId) { - return requireAllProps({ - kind: 'OverNode', - orderBy: this.transformNode(node.orderBy, queryId), - partitionBy: this.transformNode(node.partitionBy, queryId), - }); - } - transformPartitionBy(node, queryId) { - return requireAllProps({ - kind: 'PartitionByNode', - items: this.transformNodeList(node.items, queryId), - }); - } - transformPartitionByItem(node, queryId) { - return requireAllProps({ - kind: 'PartitionByItemNode', - partitionBy: this.transformNode(node.partitionBy, queryId), - }); - } - transformBinaryOperation(node, queryId) { - return requireAllProps({ - kind: 'BinaryOperationNode', - leftOperand: this.transformNode(node.leftOperand, queryId), - operator: this.transformNode(node.operator, queryId), - rightOperand: this.transformNode(node.rightOperand, queryId), - }); - } - transformUnaryOperation(node, queryId) { - return requireAllProps({ - kind: 'UnaryOperationNode', - operator: this.transformNode(node.operator, queryId), - operand: this.transformNode(node.operand, queryId), - }); - } - transformUsing(node, queryId) { - return requireAllProps({ - kind: 'UsingNode', - tables: this.transformNodeList(node.tables, queryId), - }); - } - transformFunction(node, queryId) { - return requireAllProps({ - kind: 'FunctionNode', - func: node.func, - arguments: this.transformNodeList(node.arguments, queryId), - }); - } - transformCase(node, queryId) { - return requireAllProps({ - kind: 'CaseNode', - value: this.transformNode(node.value, queryId), - when: this.transformNodeList(node.when, queryId), - else: this.transformNode(node.else, queryId), - isStatement: node.isStatement, - }); - } - transformWhen(node, queryId) { - return requireAllProps({ - kind: 'WhenNode', - condition: this.transformNode(node.condition, queryId), - result: this.transformNode(node.result, queryId), - }); - } - transformJSONReference(node, queryId) { - return requireAllProps({ - kind: 'JSONReferenceNode', - reference: this.transformNode(node.reference, queryId), - traversal: this.transformNode(node.traversal, queryId), - }); - } - transformJSONPath(node, queryId) { - return requireAllProps({ - kind: 'JSONPathNode', - inOperator: this.transformNode(node.inOperator, queryId), - pathLegs: this.transformNodeList(node.pathLegs, queryId), - }); - } - transformJSONPathLeg(node, _queryId) { - return requireAllProps({ - kind: 'JSONPathLegNode', - type: node.type, - value: node.value, - }); - } - transformJSONOperatorChain(node, queryId) { - return requireAllProps({ - kind: 'JSONOperatorChainNode', - operator: this.transformNode(node.operator, queryId), - values: this.transformNodeList(node.values, queryId), - }); - } - transformTuple(node, queryId) { - return requireAllProps({ - kind: 'TupleNode', - values: this.transformNodeList(node.values, queryId), - }); - } - transformMergeQuery(node, queryId) { - return requireAllProps({ - kind: 'MergeQueryNode', - into: this.transformNode(node.into, queryId), - using: this.transformNode(node.using, queryId), - whens: this.transformNodeList(node.whens, queryId), - with: this.transformNode(node.with, queryId), - top: this.transformNode(node.top, queryId), - endModifiers: this.transformNodeList(node.endModifiers, queryId), - output: this.transformNode(node.output, queryId), - returning: this.transformNode(node.returning, queryId), - }); - } - transformMatched(node, _queryId) { - return requireAllProps({ - kind: 'MatchedNode', - not: node.not, - bySource: node.bySource, - }); - } - transformAddIndex(node, queryId) { - return requireAllProps({ - kind: 'AddIndexNode', - name: this.transformNode(node.name, queryId), - columns: this.transformNodeList(node.columns, queryId), - unique: node.unique, - using: this.transformNode(node.using, queryId), - ifNotExists: node.ifNotExists, - }); - } - transformCast(node, queryId) { - return requireAllProps({ - kind: 'CastNode', - expression: this.transformNode(node.expression, queryId), - dataType: this.transformNode(node.dataType, queryId), - }); - } - transformFetch(node, queryId) { - return requireAllProps({ - kind: 'FetchNode', - rowCount: this.transformNode(node.rowCount, queryId), - modifier: node.modifier, - }); - } - transformTop(node, _queryId) { - return requireAllProps({ - kind: 'TopNode', - expression: node.expression, - modifiers: node.modifiers, - }); - } - transformOutput(node, queryId) { - return requireAllProps({ - kind: 'OutputNode', - selections: this.transformNodeList(node.selections, queryId), - }); - } - transformDataType(node, _queryId) { - // An Object.freezed leaf node. No need to clone. - return node; - } - transformSelectAll(node, _queryId) { - // An Object.freezed leaf node. No need to clone. - return node; - } - transformIdentifier(node, _queryId) { - // An Object.freezed leaf node. No need to clone. - return node; - } - transformValue(node, _queryId) { - // An Object.freezed leaf node. No need to clone. - return node; - } - transformPrimitiveValueList(node, _queryId) { - // An Object.freezed leaf node. No need to clone. - return node; - } - transformOperator(node, _queryId) { - // An Object.freezed leaf node. No need to clone. - return node; - } - transformDefaultInsertValue(node, _queryId) { - // An Object.freezed leaf node. No need to clone. - return node; - } - transformOrAction(node, _queryId) { - // An Object.freezed leaf node. No need to clone. - return node; - } - transformCollate(node, _queryId) { - // An Object.freezed leaf node. No need to clone. - return node; - } -} diff --git a/node_modules/kysely/dist/esm/operation-node/operation-node-visitor.d.ts b/node_modules/kysely/dist/esm/operation-node/operation-node-visitor.d.ts deleted file mode 100644 index 7a31c7f..0000000 --- a/node_modules/kysely/dist/esm/operation-node/operation-node-visitor.d.ts +++ /dev/null @@ -1,201 +0,0 @@ -import type { AliasNode } from '../operation-node/alias-node.js'; -import type { ColumnNode } from '../operation-node/column-node.js'; -import type { IdentifierNode } from '../operation-node/identifier-node.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -import type { ReferenceNode } from '../operation-node/reference-node.js'; -import type { SelectAllNode } from '../operation-node/select-all-node.js'; -import type { SelectionNode } from '../operation-node/selection-node.js'; -import type { TableNode } from '../operation-node/table-node.js'; -import type { AndNode } from './and-node.js'; -import type { JoinNode } from './join-node.js'; -import type { OrNode } from './or-node.js'; -import type { ParensNode } from './parens-node.js'; -import type { PrimitiveValueListNode } from './primitive-value-list-node.js'; -import type { RawNode } from './raw-node.js'; -import type { SelectQueryNode } from './select-query-node.js'; -import type { ValueListNode } from './value-list-node.js'; -import type { ValueNode } from './value-node.js'; -import type { OperatorNode } from './operator-node.js'; -import type { FromNode } from './from-node.js'; -import type { WhereNode } from './where-node.js'; -import type { InsertQueryNode } from './insert-query-node.js'; -import type { DeleteQueryNode } from './delete-query-node.js'; -import type { ReturningNode } from './returning-node.js'; -import type { CreateTableNode } from './create-table-node.js'; -import type { AddColumnNode } from './add-column-node.js'; -import type { DropTableNode } from './drop-table-node.js'; -import type { DataTypeNode } from './data-type-node.js'; -import type { OrderByNode } from './order-by-node.js'; -import type { OrderByItemNode } from './order-by-item-node.js'; -import type { GroupByNode } from './group-by-node.js'; -import type { GroupByItemNode } from './group-by-item-node.js'; -import type { UpdateQueryNode } from './update-query-node.js'; -import type { ColumnUpdateNode } from './column-update-node.js'; -import type { LimitNode } from './limit-node.js'; -import type { OffsetNode } from './offset-node.js'; -import type { OnConflictNode } from './on-conflict-node.js'; -import type { CreateIndexNode } from './create-index-node.js'; -import type { ListNode } from './list-node.js'; -import type { DropIndexNode } from './drop-index-node.js'; -import type { PrimaryKeyConstraintNode } from './primary-key-constraint-node.js'; -import type { UniqueConstraintNode } from './unique-constraint-node.js'; -import type { ReferencesNode } from './references-node.js'; -import type { CheckConstraintNode } from './check-constraint-node.js'; -import type { WithNode } from './with-node.js'; -import type { CommonTableExpressionNode } from './common-table-expression-node.js'; -import type { CommonTableExpressionNameNode } from './common-table-expression-name-node.js'; -import type { HavingNode } from './having-node.js'; -import type { CreateSchemaNode } from './create-schema-node.js'; -import type { DropSchemaNode } from './drop-schema-node.js'; -import type { AlterTableNode } from './alter-table-node.js'; -import type { DropColumnNode } from './drop-column-node.js'; -import type { RenameColumnNode } from './rename-column-node.js'; -import type { AlterColumnNode } from './alter-column-node.js'; -import type { AddConstraintNode } from './add-constraint-node.js'; -import type { DropConstraintNode } from './drop-constraint-node.js'; -import type { ForeignKeyConstraintNode } from './foreign-key-constraint-node.js'; -import type { ColumnDefinitionNode } from './column-definition-node.js'; -import type { ModifyColumnNode } from './modify-column-node.js'; -import type { OnDuplicateKeyNode } from './on-duplicate-key-node.js'; -import type { CreateViewNode } from './create-view-node.js'; -import type { DropViewNode } from './drop-view-node.js'; -import type { GeneratedNode } from './generated-node.js'; -import type { DefaultValueNode } from './default-value-node.js'; -import type { OnNode } from './on-node.js'; -import type { ValuesNode } from './values-node.js'; -import type { SelectModifierNode } from './select-modifier-node.js'; -import type { CreateTypeNode } from './create-type-node.js'; -import type { DropTypeNode } from './drop-type-node.js'; -import type { ExplainNode } from './explain-node.js'; -import type { SchemableIdentifierNode } from './schemable-identifier-node.js'; -import type { DefaultInsertValueNode } from './default-insert-value-node.js'; -import type { AggregateFunctionNode } from './aggregate-function-node.js'; -import type { OverNode } from './over-node.js'; -import type { PartitionByNode } from './partition-by-node.js'; -import type { PartitionByItemNode } from './partition-by-item-node.js'; -import type { SetOperationNode } from './set-operation-node.js'; -import type { BinaryOperationNode } from './binary-operation-node.js'; -import type { UnaryOperationNode } from './unary-operation-node.js'; -import type { UsingNode } from './using-node.js'; -import type { FunctionNode } from './function-node.js'; -import type { WhenNode } from './when-node.js'; -import type { CaseNode } from './case-node.js'; -import type { JSONReferenceNode } from './json-reference-node.js'; -import type { JSONPathNode } from './json-path-node.js'; -import type { JSONPathLegNode } from './json-path-leg-node.js'; -import type { JSONOperatorChainNode } from './json-operator-chain-node.js'; -import type { TupleNode } from './tuple-node.js'; -import type { MergeQueryNode } from './merge-query-node.js'; -import type { MatchedNode } from './matched-node.js'; -import type { AddIndexNode } from './add-index-node.js'; -import type { CastNode } from './cast-node.js'; -import type { FetchNode } from './fetch-node.js'; -import type { TopNode } from './top-node.js'; -import type { OutputNode } from './output-node.js'; -import type { RefreshMaterializedViewNode } from './refresh-materialized-view-node.js'; -import type { OrActionNode } from './or-action-node.js'; -import type { CollateNode } from './collate-node.js'; -import type { RenameConstraintNode } from './rename-constraint-node.js'; -export declare abstract class OperationNodeVisitor { - #private; - protected readonly nodeStack: OperationNode[]; - protected get parentNode(): OperationNode | undefined; - protected readonly visitNode: (node: OperationNode) => void; - protected abstract visitSelectQuery(node: SelectQueryNode): void; - protected abstract visitSelection(node: SelectionNode): void; - protected abstract visitColumn(node: ColumnNode): void; - protected abstract visitAlias(node: AliasNode): void; - protected abstract visitTable(node: TableNode): void; - protected abstract visitFrom(node: FromNode): void; - protected abstract visitReference(node: ReferenceNode): void; - protected abstract visitAnd(node: AndNode): void; - protected abstract visitOr(node: OrNode): void; - protected abstract visitValueList(node: ValueListNode): void; - protected abstract visitParens(node: ParensNode): void; - protected abstract visitJoin(node: JoinNode): void; - protected abstract visitRaw(node: RawNode): void; - protected abstract visitWhere(node: WhereNode): void; - protected abstract visitInsertQuery(node: InsertQueryNode): void; - protected abstract visitDeleteQuery(node: DeleteQueryNode): void; - protected abstract visitReturning(node: ReturningNode): void; - protected abstract visitCreateTable(node: CreateTableNode): void; - protected abstract visitAddColumn(node: AddColumnNode): void; - protected abstract visitColumnDefinition(node: ColumnDefinitionNode): void; - protected abstract visitDropTable(node: DropTableNode): void; - protected abstract visitOrderBy(node: OrderByNode): void; - protected abstract visitOrderByItem(node: OrderByItemNode): void; - protected abstract visitGroupBy(node: GroupByNode): void; - protected abstract visitGroupByItem(node: GroupByItemNode): void; - protected abstract visitUpdateQuery(node: UpdateQueryNode): void; - protected abstract visitColumnUpdate(node: ColumnUpdateNode): void; - protected abstract visitLimit(node: LimitNode): void; - protected abstract visitOffset(node: OffsetNode): void; - protected abstract visitOnConflict(node: OnConflictNode): void; - protected abstract visitOnDuplicateKey(node: OnDuplicateKeyNode): void; - protected abstract visitCreateIndex(node: CreateIndexNode): void; - protected abstract visitDropIndex(node: DropIndexNode): void; - protected abstract visitList(node: ListNode): void; - protected abstract visitPrimaryKeyConstraint(node: PrimaryKeyConstraintNode): void; - protected abstract visitUniqueConstraint(node: UniqueConstraintNode): void; - protected abstract visitReferences(node: ReferencesNode): void; - protected abstract visitCheckConstraint(node: CheckConstraintNode): void; - protected abstract visitWith(node: WithNode): void; - protected abstract visitCommonTableExpression(node: CommonTableExpressionNode): void; - protected abstract visitCommonTableExpressionName(node: CommonTableExpressionNameNode): void; - protected abstract visitHaving(node: HavingNode): void; - protected abstract visitCreateSchema(node: CreateSchemaNode): void; - protected abstract visitDropSchema(node: DropSchemaNode): void; - protected abstract visitAlterTable(node: AlterTableNode): void; - protected abstract visitDropColumn(node: DropColumnNode): void; - protected abstract visitRenameColumn(node: RenameColumnNode): void; - protected abstract visitAlterColumn(node: AlterColumnNode): void; - protected abstract visitModifyColumn(node: ModifyColumnNode): void; - protected abstract visitAddConstraint(node: AddConstraintNode): void; - protected abstract visitDropConstraint(node: DropConstraintNode): void; - protected abstract visitRenameConstraint(node: RenameConstraintNode): void; - protected abstract visitForeignKeyConstraint(node: ForeignKeyConstraintNode): void; - protected abstract visitDataType(node: DataTypeNode): void; - protected abstract visitSelectAll(node: SelectAllNode): void; - protected abstract visitIdentifier(node: IdentifierNode): void; - protected abstract visitSchemableIdentifier(node: SchemableIdentifierNode): void; - protected abstract visitValue(node: ValueNode): void; - protected abstract visitPrimitiveValueList(node: PrimitiveValueListNode): void; - protected abstract visitOperator(node: OperatorNode): void; - protected abstract visitCreateView(node: CreateViewNode): void; - protected abstract visitRefreshMaterializedView(node: RefreshMaterializedViewNode): void; - protected abstract visitDropView(node: DropViewNode): void; - protected abstract visitGenerated(node: GeneratedNode): void; - protected abstract visitDefaultValue(node: DefaultValueNode): void; - protected abstract visitOn(node: OnNode): void; - protected abstract visitValues(node: ValuesNode): void; - protected abstract visitSelectModifier(node: SelectModifierNode): void; - protected abstract visitCreateType(node: CreateTypeNode): void; - protected abstract visitDropType(node: DropTypeNode): void; - protected abstract visitExplain(node: ExplainNode): void; - protected abstract visitDefaultInsertValue(node: DefaultInsertValueNode): void; - protected abstract visitAggregateFunction(node: AggregateFunctionNode): void; - protected abstract visitOver(node: OverNode): void; - protected abstract visitPartitionBy(node: PartitionByNode): void; - protected abstract visitPartitionByItem(node: PartitionByItemNode): void; - protected abstract visitSetOperation(node: SetOperationNode): void; - protected abstract visitBinaryOperation(node: BinaryOperationNode): void; - protected abstract visitUnaryOperation(node: UnaryOperationNode): void; - protected abstract visitUsing(node: UsingNode): void; - protected abstract visitFunction(node: FunctionNode): void; - protected abstract visitCase(node: CaseNode): void; - protected abstract visitWhen(node: WhenNode): void; - protected abstract visitJSONReference(node: JSONReferenceNode): void; - protected abstract visitJSONPath(node: JSONPathNode): void; - protected abstract visitJSONPathLeg(node: JSONPathLegNode): void; - protected abstract visitJSONOperatorChain(node: JSONOperatorChainNode): void; - protected abstract visitTuple(node: TupleNode): void; - protected abstract visitMergeQuery(node: MergeQueryNode): void; - protected abstract visitMatched(node: MatchedNode): void; - protected abstract visitAddIndex(node: AddIndexNode): void; - protected abstract visitCast(node: CastNode): void; - protected abstract visitFetch(node: FetchNode): void; - protected abstract visitTop(node: TopNode): void; - protected abstract visitOutput(node: OutputNode): void; - protected abstract visitOrAction(node: OrActionNode): void; - protected abstract visitCollate(node: CollateNode): void; -} diff --git a/node_modules/kysely/dist/esm/operation-node/operation-node-visitor.js b/node_modules/kysely/dist/esm/operation-node/operation-node-visitor.js deleted file mode 100644 index 06d024e..0000000 --- a/node_modules/kysely/dist/esm/operation-node/operation-node-visitor.js +++ /dev/null @@ -1,112 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -export class OperationNodeVisitor { - nodeStack = []; - get parentNode() { - return this.nodeStack[this.nodeStack.length - 2]; - } - #visitors = freeze({ - AliasNode: this.visitAlias.bind(this), - ColumnNode: this.visitColumn.bind(this), - IdentifierNode: this.visitIdentifier.bind(this), - SchemableIdentifierNode: this.visitSchemableIdentifier.bind(this), - RawNode: this.visitRaw.bind(this), - ReferenceNode: this.visitReference.bind(this), - SelectQueryNode: this.visitSelectQuery.bind(this), - SelectionNode: this.visitSelection.bind(this), - TableNode: this.visitTable.bind(this), - FromNode: this.visitFrom.bind(this), - SelectAllNode: this.visitSelectAll.bind(this), - AndNode: this.visitAnd.bind(this), - OrNode: this.visitOr.bind(this), - ValueNode: this.visitValue.bind(this), - ValueListNode: this.visitValueList.bind(this), - PrimitiveValueListNode: this.visitPrimitiveValueList.bind(this), - ParensNode: this.visitParens.bind(this), - JoinNode: this.visitJoin.bind(this), - OperatorNode: this.visitOperator.bind(this), - WhereNode: this.visitWhere.bind(this), - InsertQueryNode: this.visitInsertQuery.bind(this), - DeleteQueryNode: this.visitDeleteQuery.bind(this), - ReturningNode: this.visitReturning.bind(this), - CreateTableNode: this.visitCreateTable.bind(this), - AddColumnNode: this.visitAddColumn.bind(this), - ColumnDefinitionNode: this.visitColumnDefinition.bind(this), - DropTableNode: this.visitDropTable.bind(this), - DataTypeNode: this.visitDataType.bind(this), - OrderByNode: this.visitOrderBy.bind(this), - OrderByItemNode: this.visitOrderByItem.bind(this), - GroupByNode: this.visitGroupBy.bind(this), - GroupByItemNode: this.visitGroupByItem.bind(this), - UpdateQueryNode: this.visitUpdateQuery.bind(this), - ColumnUpdateNode: this.visitColumnUpdate.bind(this), - LimitNode: this.visitLimit.bind(this), - OffsetNode: this.visitOffset.bind(this), - OnConflictNode: this.visitOnConflict.bind(this), - OnDuplicateKeyNode: this.visitOnDuplicateKey.bind(this), - CreateIndexNode: this.visitCreateIndex.bind(this), - DropIndexNode: this.visitDropIndex.bind(this), - ListNode: this.visitList.bind(this), - PrimaryKeyConstraintNode: this.visitPrimaryKeyConstraint.bind(this), - UniqueConstraintNode: this.visitUniqueConstraint.bind(this), - ReferencesNode: this.visitReferences.bind(this), - CheckConstraintNode: this.visitCheckConstraint.bind(this), - WithNode: this.visitWith.bind(this), - CommonTableExpressionNode: this.visitCommonTableExpression.bind(this), - CommonTableExpressionNameNode: this.visitCommonTableExpressionName.bind(this), - HavingNode: this.visitHaving.bind(this), - CreateSchemaNode: this.visitCreateSchema.bind(this), - DropSchemaNode: this.visitDropSchema.bind(this), - AlterTableNode: this.visitAlterTable.bind(this), - DropColumnNode: this.visitDropColumn.bind(this), - RenameColumnNode: this.visitRenameColumn.bind(this), - AlterColumnNode: this.visitAlterColumn.bind(this), - ModifyColumnNode: this.visitModifyColumn.bind(this), - AddConstraintNode: this.visitAddConstraint.bind(this), - DropConstraintNode: this.visitDropConstraint.bind(this), - RenameConstraintNode: this.visitRenameConstraint.bind(this), - ForeignKeyConstraintNode: this.visitForeignKeyConstraint.bind(this), - CreateViewNode: this.visitCreateView.bind(this), - RefreshMaterializedViewNode: this.visitRefreshMaterializedView.bind(this), - DropViewNode: this.visitDropView.bind(this), - GeneratedNode: this.visitGenerated.bind(this), - DefaultValueNode: this.visitDefaultValue.bind(this), - OnNode: this.visitOn.bind(this), - ValuesNode: this.visitValues.bind(this), - SelectModifierNode: this.visitSelectModifier.bind(this), - CreateTypeNode: this.visitCreateType.bind(this), - DropTypeNode: this.visitDropType.bind(this), - ExplainNode: this.visitExplain.bind(this), - DefaultInsertValueNode: this.visitDefaultInsertValue.bind(this), - AggregateFunctionNode: this.visitAggregateFunction.bind(this), - OverNode: this.visitOver.bind(this), - PartitionByNode: this.visitPartitionBy.bind(this), - PartitionByItemNode: this.visitPartitionByItem.bind(this), - SetOperationNode: this.visitSetOperation.bind(this), - BinaryOperationNode: this.visitBinaryOperation.bind(this), - UnaryOperationNode: this.visitUnaryOperation.bind(this), - UsingNode: this.visitUsing.bind(this), - FunctionNode: this.visitFunction.bind(this), - CaseNode: this.visitCase.bind(this), - WhenNode: this.visitWhen.bind(this), - JSONReferenceNode: this.visitJSONReference.bind(this), - JSONPathNode: this.visitJSONPath.bind(this), - JSONPathLegNode: this.visitJSONPathLeg.bind(this), - JSONOperatorChainNode: this.visitJSONOperatorChain.bind(this), - TupleNode: this.visitTuple.bind(this), - MergeQueryNode: this.visitMergeQuery.bind(this), - MatchedNode: this.visitMatched.bind(this), - AddIndexNode: this.visitAddIndex.bind(this), - CastNode: this.visitCast.bind(this), - FetchNode: this.visitFetch.bind(this), - TopNode: this.visitTop.bind(this), - OutputNode: this.visitOutput.bind(this), - OrActionNode: this.visitOrAction.bind(this), - CollateNode: this.visitCollate.bind(this), - }); - visitNode = (node) => { - this.nodeStack.push(node); - this.#visitors[node.kind](node); - this.nodeStack.pop(); - }; -} diff --git a/node_modules/kysely/dist/esm/operation-node/operation-node.d.ts b/node_modules/kysely/dist/esm/operation-node/operation-node.d.ts deleted file mode 100644 index b3f0a08..0000000 --- a/node_modules/kysely/dist/esm/operation-node/operation-node.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export type OperationNodeKind = 'IdentifierNode' | 'SchemableIdentifierNode' | 'RawNode' | 'SelectQueryNode' | 'SelectionNode' | 'ReferenceNode' | 'ColumnNode' | 'TableNode' | 'AliasNode' | 'FromNode' | 'SelectAllNode' | 'AndNode' | 'OrNode' | 'ParensNode' | 'ValueNode' | 'ValueListNode' | 'PrimitiveValueListNode' | 'JoinNode' | 'OperatorNode' | 'WhereNode' | 'InsertQueryNode' | 'DeleteQueryNode' | 'ReturningNode' | 'CreateTableNode' | 'ColumnDefinitionNode' | 'AddColumnNode' | 'DropTableNode' | 'DataTypeNode' | 'OrderByNode' | 'OrderByItemNode' | 'GroupByNode' | 'GroupByItemNode' | 'UpdateQueryNode' | 'ColumnUpdateNode' | 'LimitNode' | 'OffsetNode' | 'OnConflictNode' | 'OnDuplicateKeyNode' | 'CreateIndexNode' | 'DropIndexNode' | 'ListNode' | 'ReferencesNode' | 'PrimaryKeyConstraintNode' | 'UniqueConstraintNode' | 'CheckConstraintNode' | 'ForeignKeyConstraintNode' | 'WithNode' | 'CommonTableExpressionNode' | 'HavingNode' | 'CreateSchemaNode' | 'DropSchemaNode' | 'AlterTableNode' | 'ModifyColumnNode' | 'DropColumnNode' | 'RenameColumnNode' | 'AlterColumnNode' | 'AddConstraintNode' | 'DropConstraintNode' | 'CreateViewNode' | 'RefreshMaterializedViewNode' | 'DropViewNode' | 'GeneratedNode' | 'DefaultValueNode' | 'OnNode' | 'ValuesNode' | 'CommonTableExpressionNameNode' | 'SelectModifierNode' | 'CreateTypeNode' | 'DropTypeNode' | 'ExplainNode' | 'DefaultInsertValueNode' | 'AggregateFunctionNode' | 'OverNode' | 'PartitionByNode' | 'PartitionByItemNode' | 'SetOperationNode' | 'BinaryOperationNode' | 'UnaryOperationNode' | 'UsingNode' | 'FunctionNode' | 'CaseNode' | 'WhenNode' | 'JSONReferenceNode' | 'JSONPathNode' | 'JSONPathLegNode' | 'JSONOperatorChainNode' | 'TupleNode' | 'MergeQueryNode' | 'MatchedNode' | 'AddIndexNode' | 'CastNode' | 'FetchNode' | 'TopNode' | 'OutputNode' | 'OrActionNode' | 'CollateNode' | 'RenameConstraintNode'; -export interface OperationNode { - readonly kind: OperationNodeKind; -} diff --git a/node_modules/kysely/dist/esm/operation-node/operation-node.js b/node_modules/kysely/dist/esm/operation-node/operation-node.js deleted file mode 100644 index 5b61859..0000000 --- a/node_modules/kysely/dist/esm/operation-node/operation-node.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/operator-node.d.ts b/node_modules/kysely/dist/esm/operation-node/operator-node.d.ts deleted file mode 100644 index 7ddc7f9..0000000 --- a/node_modules/kysely/dist/esm/operation-node/operator-node.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export declare const COMPARISON_OPERATORS: readonly ["=", "==", "!=", "<>", ">", ">=", "<", "<=", "in", "not in", "is", "is not", "like", "not like", "match", "ilike", "not ilike", "@>", "<@", "^@", "&&", "?", "?&", "?|", "!<", "!>", "<=>", "!~", "~", "~*", "!~*", "@@", "@@@", "!!", "<->", "regexp", "is distinct from", "is not distinct from"]; -export declare const ARITHMETIC_OPERATORS: readonly ["+", "-", "*", "/", "%", "^", "&", "|", "#", "<<", ">>"]; -export declare const JSON_OPERATORS: readonly ["->", "->>"]; -export declare const BINARY_OPERATORS: readonly ["=", "==", "!=", "<>", ">", ">=", "<", "<=", "in", "not in", "is", "is not", "like", "not like", "match", "ilike", "not ilike", "@>", "<@", "^@", "&&", "?", "?&", "?|", "!<", "!>", "<=>", "!~", "~", "~*", "!~*", "@@", "@@@", "!!", "<->", "regexp", "is distinct from", "is not distinct from", "+", "-", "*", "/", "%", "^", "&", "|", "#", "<<", ">>", "&&", "||"]; -export declare const UNARY_FILTER_OPERATORS: readonly ["exists", "not exists"]; -export declare const UNARY_OPERATORS: readonly ["not", "-", "exists", "not exists"]; -export declare const OPERATORS: readonly ["=", "==", "!=", "<>", ">", ">=", "<", "<=", "in", "not in", "is", "is not", "like", "not like", "match", "ilike", "not ilike", "@>", "<@", "^@", "&&", "?", "?&", "?|", "!<", "!>", "<=>", "!~", "~", "~*", "!~*", "@@", "@@@", "!!", "<->", "regexp", "is distinct from", "is not distinct from", "+", "-", "*", "/", "%", "^", "&", "|", "#", "<<", ">>", "&&", "||", "->", "->>", "not", "-", "exists", "not exists", "between", "between symmetric"]; -export type ComparisonOperator = (typeof COMPARISON_OPERATORS)[number]; -export type ArithmeticOperator = (typeof ARITHMETIC_OPERATORS)[number]; -export type JSONOperator = (typeof JSON_OPERATORS)[number]; -export type JSONOperatorWith$ = JSONOperator | `${JSONOperator}$`; -export type BinaryOperator = (typeof BINARY_OPERATORS)[number]; -export type UnaryOperator = (typeof UNARY_OPERATORS)[number]; -export type UnaryFilterOperator = (typeof UNARY_FILTER_OPERATORS)[number]; -export type Operator = (typeof OPERATORS)[number]; -export interface OperatorNode extends OperationNode { - readonly kind: 'OperatorNode'; - readonly operator: Operator; -} -type OperatorNodeFactory = Readonly<{ - is(node: OperationNode): node is OperatorNode; - create(operator: Operator): Readonly; -}>; -/** - * @internal - */ -export declare const OperatorNode: OperatorNodeFactory; -export declare function isOperator(op: unknown): op is Operator; -export declare function isBinaryOperator(op: unknown): op is BinaryOperator; -export declare function isComparisonOperator(op: unknown): op is ComparisonOperator; -export declare function isArithmeticOperator(op: unknown): op is ArithmeticOperator; -export declare function isJSONOperator(op: unknown): op is JSONOperator; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/operator-node.js b/node_modules/kysely/dist/esm/operation-node/operator-node.js deleted file mode 100644 index 053ea77..0000000 --- a/node_modules/kysely/dist/esm/operation-node/operator-node.js +++ /dev/null @@ -1,100 +0,0 @@ -/// -import { freeze, isString } from '../util/object-utils.js'; -export const COMPARISON_OPERATORS = [ - '=', - '==', - '!=', - '<>', - '>', - '>=', - '<', - '<=', - 'in', - 'not in', - 'is', - 'is not', - 'like', - 'not like', - 'match', - 'ilike', - 'not ilike', - '@>', - '<@', - '^@', - '&&', - '?', - '?&', - '?|', - '!<', - '!>', - '<=>', - '!~', - '~', - '~*', - '!~*', - '@@', - '@@@', - '!!', - '<->', - 'regexp', - 'is distinct from', - 'is not distinct from', -]; -export const ARITHMETIC_OPERATORS = [ - '+', - '-', - '*', - '/', - '%', - '^', - '&', - '|', - '#', - '<<', - '>>', -]; -export const JSON_OPERATORS = ['->', '->>']; -export const BINARY_OPERATORS = [ - ...COMPARISON_OPERATORS, - ...ARITHMETIC_OPERATORS, - '&&', - '||', -]; -export const UNARY_FILTER_OPERATORS = ['exists', 'not exists']; -export const UNARY_OPERATORS = ['not', '-', ...UNARY_FILTER_OPERATORS]; -export const OPERATORS = [ - ...BINARY_OPERATORS, - ...JSON_OPERATORS, - ...UNARY_OPERATORS, - 'between', - 'between symmetric', -]; -/** - * @internal - */ -export const OperatorNode = freeze({ - is(node) { - return node.kind === 'OperatorNode'; - }, - create(operator) { - return freeze({ - kind: 'OperatorNode', - operator, - }); - }, -}); -export function isOperator(op) { - return isString(op) && OPERATORS.includes(op); -} -export function isBinaryOperator(op) { - return isString(op) && BINARY_OPERATORS.includes(op); -} -export function isComparisonOperator(op) { - return isString(op) && COMPARISON_OPERATORS.includes(op); -} -export function isArithmeticOperator(op) { - return isString(op) && ARITHMETIC_OPERATORS.includes(op); -} -export function isJSONOperator(op) { - return isString(op) && JSON_OPERATORS.includes(op); -} diff --git a/node_modules/kysely/dist/esm/operation-node/or-action-node.d.ts b/node_modules/kysely/dist/esm/operation-node/or-action-node.d.ts deleted file mode 100644 index b42f15c..0000000 --- a/node_modules/kysely/dist/esm/operation-node/or-action-node.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface OrActionNode extends OperationNode { - readonly kind: 'OrActionNode'; - readonly action: string; -} -type OrActionNodeFactory = Readonly<{ - is(node: OperationNode): node is OrActionNode; - create(action: string): Readonly; -}>; -/** - * @internal - */ -export declare const OrActionNode: OrActionNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/or-action-node.js b/node_modules/kysely/dist/esm/operation-node/or-action-node.js deleted file mode 100644 index 4ced3d3..0000000 --- a/node_modules/kysely/dist/esm/operation-node/or-action-node.js +++ /dev/null @@ -1,16 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const OrActionNode = freeze({ - is(node) { - return node.kind === 'OrActionNode'; - }, - create(action) { - return freeze({ - kind: 'OrActionNode', - action, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/or-node.d.ts b/node_modules/kysely/dist/esm/operation-node/or-node.d.ts deleted file mode 100644 index e5476b1..0000000 --- a/node_modules/kysely/dist/esm/operation-node/or-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface OrNode extends OperationNode { - readonly kind: 'OrNode'; - readonly left: OperationNode; - readonly right: OperationNode; -} -type OrNodeFactory = Readonly<{ - is(node: OperationNode): node is OrNode; - create(left: OperationNode, right: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const OrNode: OrNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/or-node.js b/node_modules/kysely/dist/esm/operation-node/or-node.js deleted file mode 100644 index e169188..0000000 --- a/node_modules/kysely/dist/esm/operation-node/or-node.js +++ /dev/null @@ -1,17 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const OrNode = freeze({ - is(node) { - return node.kind === 'OrNode'; - }, - create(left, right) { - return freeze({ - kind: 'OrNode', - left, - right, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/order-by-item-node.d.ts b/node_modules/kysely/dist/esm/operation-node/order-by-item-node.d.ts deleted file mode 100644 index 4c5814b..0000000 --- a/node_modules/kysely/dist/esm/operation-node/order-by-item-node.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { CollateNode } from './collate-node.js'; -import type { OperationNode } from './operation-node.js'; -export type OrderByItemNodeProps = Omit; -export interface OrderByItemNode extends OperationNode { - readonly kind: 'OrderByItemNode'; - readonly orderBy: OperationNode; - readonly direction?: OperationNode; - readonly nulls?: 'first' | 'last'; - readonly collation?: CollateNode; -} -type OrderByItemNodeFactory = Readonly<{ - is(node: OperationNode): node is OrderByItemNode; - create(orderBy: OperationNode, direction?: OperationNode): Readonly; - cloneWith(node: OrderByItemNode, props: OrderByItemNodeProps): Readonly; -}>; -/** - * @internal - */ -export declare const OrderByItemNode: OrderByItemNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/order-by-item-node.js b/node_modules/kysely/dist/esm/operation-node/order-by-item-node.js deleted file mode 100644 index 63de940..0000000 --- a/node_modules/kysely/dist/esm/operation-node/order-by-item-node.js +++ /dev/null @@ -1,23 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const OrderByItemNode = freeze({ - is(node) { - return node.kind === 'OrderByItemNode'; - }, - create(orderBy, direction) { - return freeze({ - kind: 'OrderByItemNode', - orderBy, - direction, - }); - }, - cloneWith(node, props) { - return freeze({ - ...node, - ...props, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/order-by-node.d.ts b/node_modules/kysely/dist/esm/operation-node/order-by-node.d.ts deleted file mode 100644 index 0768ecd..0000000 --- a/node_modules/kysely/dist/esm/operation-node/order-by-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { OrderByItemNode } from './order-by-item-node.js'; -export interface OrderByNode extends OperationNode { - readonly kind: 'OrderByNode'; - readonly items: ReadonlyArray; -} -type OrderByNodeFactory = Readonly<{ - is(node: OperationNode): node is OrderByNode; - create(items: ReadonlyArray): Readonly; - cloneWithItems(orderBy: OrderByNode, items: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const OrderByNode: OrderByNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/order-by-node.js b/node_modules/kysely/dist/esm/operation-node/order-by-node.js deleted file mode 100644 index 3f0b858..0000000 --- a/node_modules/kysely/dist/esm/operation-node/order-by-node.js +++ /dev/null @@ -1,22 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const OrderByNode = freeze({ - is(node) { - return node.kind === 'OrderByNode'; - }, - create(items) { - return freeze({ - kind: 'OrderByNode', - items: freeze([...items]), - }); - }, - cloneWithItems(orderBy, items) { - return freeze({ - ...orderBy, - items: freeze([...orderBy.items, ...items]), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/output-node.d.ts b/node_modules/kysely/dist/esm/operation-node/output-node.d.ts deleted file mode 100644 index 4a2c2ef..0000000 --- a/node_modules/kysely/dist/esm/operation-node/output-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface OutputNode extends OperationNode { - readonly kind: 'OutputNode'; - readonly selections: ReadonlyArray; -} -type OutputNodeFactory = Readonly<{ - is(node: OperationNode): node is OutputNode; - create(selections: ReadonlyArray): Readonly; - cloneWithSelections(output: OutputNode, selections: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const OutputNode: OutputNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/output-node.js b/node_modules/kysely/dist/esm/operation-node/output-node.js deleted file mode 100644 index 03312e7..0000000 --- a/node_modules/kysely/dist/esm/operation-node/output-node.js +++ /dev/null @@ -1,24 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const OutputNode = freeze({ - is(node) { - return node.kind === 'OutputNode'; - }, - create(selections) { - return freeze({ - kind: 'OutputNode', - selections: freeze(selections), - }); - }, - cloneWithSelections(output, selections) { - return freeze({ - ...output, - selections: output.selections - ? freeze([...output.selections, ...selections]) - : freeze(selections), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/over-node.d.ts b/node_modules/kysely/dist/esm/operation-node/over-node.d.ts deleted file mode 100644 index 9650354..0000000 --- a/node_modules/kysely/dist/esm/operation-node/over-node.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { OrderByItemNode } from './order-by-item-node.js'; -import { OrderByNode } from './order-by-node.js'; -import type { PartitionByItemNode } from './partition-by-item-node.js'; -import { PartitionByNode } from './partition-by-node.js'; -export interface OverNode extends OperationNode { - readonly kind: 'OverNode'; - readonly orderBy?: OrderByNode; - readonly partitionBy?: PartitionByNode; -} -type OverNodeFactory = Readonly<{ - is(node: OperationNode): node is OverNode; - create(): Readonly; - cloneWithOrderByItems(overNode: OverNode, items: ReadonlyArray): Readonly; - cloneWithPartitionByItems(overNode: OverNode, items: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const OverNode: OverNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/over-node.js b/node_modules/kysely/dist/esm/operation-node/over-node.js deleted file mode 100644 index e36dae1..0000000 --- a/node_modules/kysely/dist/esm/operation-node/over-node.js +++ /dev/null @@ -1,33 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { OrderByNode } from './order-by-node.js'; -import { PartitionByNode } from './partition-by-node.js'; -/** - * @internal - */ -export const OverNode = freeze({ - is(node) { - return node.kind === 'OverNode'; - }, - create() { - return freeze({ - kind: 'OverNode', - }); - }, - cloneWithOrderByItems(overNode, items) { - return freeze({ - ...overNode, - orderBy: overNode.orderBy - ? OrderByNode.cloneWithItems(overNode.orderBy, items) - : OrderByNode.create(items), - }); - }, - cloneWithPartitionByItems(overNode, items) { - return freeze({ - ...overNode, - partitionBy: overNode.partitionBy - ? PartitionByNode.cloneWithItems(overNode.partitionBy, items) - : PartitionByNode.create(items), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/parens-node.d.ts b/node_modules/kysely/dist/esm/operation-node/parens-node.d.ts deleted file mode 100644 index a1c975d..0000000 --- a/node_modules/kysely/dist/esm/operation-node/parens-node.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface ParensNode extends OperationNode { - readonly kind: 'ParensNode'; - readonly node: OperationNode; -} -type ParensNodeFactory = Readonly<{ - is(node: OperationNode): node is ParensNode; - create(node: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const ParensNode: ParensNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/parens-node.js b/node_modules/kysely/dist/esm/operation-node/parens-node.js deleted file mode 100644 index b3f49c9..0000000 --- a/node_modules/kysely/dist/esm/operation-node/parens-node.js +++ /dev/null @@ -1,16 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const ParensNode = freeze({ - is(node) { - return node.kind === 'ParensNode'; - }, - create(node) { - return freeze({ - kind: 'ParensNode', - node, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/partition-by-item-node.d.ts b/node_modules/kysely/dist/esm/operation-node/partition-by-item-node.d.ts deleted file mode 100644 index 4f21b3b..0000000 --- a/node_modules/kysely/dist/esm/operation-node/partition-by-item-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { SimpleReferenceExpressionNode } from './simple-reference-expression-node.js'; -export interface PartitionByItemNode extends OperationNode { - readonly kind: 'PartitionByItemNode'; - readonly partitionBy: SimpleReferenceExpressionNode; -} -type PartitionByItemNodeFactory = Readonly<{ - is(node: OperationNode): node is PartitionByItemNode; - create(partitionBy: SimpleReferenceExpressionNode): Readonly; -}>; -/** - * @internal - */ -export declare const PartitionByItemNode: PartitionByItemNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/partition-by-item-node.js b/node_modules/kysely/dist/esm/operation-node/partition-by-item-node.js deleted file mode 100644 index 7075c88..0000000 --- a/node_modules/kysely/dist/esm/operation-node/partition-by-item-node.js +++ /dev/null @@ -1,16 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const PartitionByItemNode = freeze({ - is(node) { - return node.kind === 'PartitionByItemNode'; - }, - create(partitionBy) { - return freeze({ - kind: 'PartitionByItemNode', - partitionBy, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/partition-by-node.d.ts b/node_modules/kysely/dist/esm/operation-node/partition-by-node.d.ts deleted file mode 100644 index bd939dc..0000000 --- a/node_modules/kysely/dist/esm/operation-node/partition-by-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { PartitionByItemNode } from './partition-by-item-node.js'; -import type { OperationNode } from './operation-node.js'; -export interface PartitionByNode extends OperationNode { - readonly kind: 'PartitionByNode'; - readonly items: ReadonlyArray; -} -type PartitionByNodeFactory = Readonly<{ - is(node: OperationNode): node is PartitionByNode; - create(items: ReadonlyArray): Readonly; - cloneWithItems(partitionBy: PartitionByNode, items: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const PartitionByNode: PartitionByNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/partition-by-node.js b/node_modules/kysely/dist/esm/operation-node/partition-by-node.js deleted file mode 100644 index 475cc19..0000000 --- a/node_modules/kysely/dist/esm/operation-node/partition-by-node.js +++ /dev/null @@ -1,22 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const PartitionByNode = freeze({ - is(node) { - return node.kind === 'PartitionByNode'; - }, - create(items) { - return freeze({ - kind: 'PartitionByNode', - items: freeze(items), - }); - }, - cloneWithItems(partitionBy, items) { - return freeze({ - ...partitionBy, - items: freeze([...partitionBy.items, ...items]), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/primary-key-constraint-node.d.ts b/node_modules/kysely/dist/esm/operation-node/primary-key-constraint-node.d.ts deleted file mode 100644 index 242fa40..0000000 --- a/node_modules/kysely/dist/esm/operation-node/primary-key-constraint-node.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { ColumnNode } from './column-node.js'; -import { IdentifierNode } from './identifier-node.js'; -import type { OperationNode } from './operation-node.js'; -export interface PrimaryKeyConstraintNode extends OperationNode { - readonly kind: 'PrimaryKeyConstraintNode'; - readonly columns: ReadonlyArray; - readonly name?: IdentifierNode; - readonly deferrable?: boolean; - readonly initiallyDeferred?: boolean; -} -export type PrimaryKeyConstraintNodeProps = Omit, 'kind'>; -type PrimaryKeyConstraintNodeFactory = Readonly<{ - is(node: OperationNode): node is PrimaryKeyConstraintNode; - create(columns: string[], constraintName?: string): Readonly; - cloneWith(node: PrimaryKeyConstraintNode, props: PrimaryKeyConstraintNodeProps): Readonly; -}>; -/** - * @internal - */ -export declare const PrimaryKeyConstraintNode: PrimaryKeyConstraintNodeFactory; -/** - * Backwards compatibility for a typo in the codebase. - * - * @deprecated Use {@link PrimaryKeyConstraintNode} instead. - */ -export declare const PrimaryConstraintNode: Readonly<{ - is(node: OperationNode): node is PrimaryKeyConstraintNode; - create(columns: string[], constraintName?: string): Readonly; - cloneWith(node: PrimaryKeyConstraintNode, props: PrimaryKeyConstraintNodeProps): Readonly; -}>; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/primary-key-constraint-node.js b/node_modules/kysely/dist/esm/operation-node/primary-key-constraint-node.js deleted file mode 100644 index 61ddeff..0000000 --- a/node_modules/kysely/dist/esm/operation-node/primary-key-constraint-node.js +++ /dev/null @@ -1,30 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { ColumnNode } from './column-node.js'; -import { IdentifierNode } from './identifier-node.js'; -/** - * @internal - */ -export const PrimaryKeyConstraintNode = freeze({ - is(node) { - return node.kind === 'PrimaryKeyConstraintNode'; - }, - create(columns, constraintName) { - return freeze({ - kind: 'PrimaryKeyConstraintNode', - columns: freeze(columns.map(ColumnNode.create)), - name: constraintName - ? IdentifierNode.create(constraintName) - : undefined, - }); - }, - cloneWith(node, props) { - return freeze({ ...node, ...props }); - }, -}); -/** - * Backwards compatibility for a typo in the codebase. - * - * @deprecated Use {@link PrimaryKeyConstraintNode} instead. - */ -export const PrimaryConstraintNode = PrimaryKeyConstraintNode; diff --git a/node_modules/kysely/dist/esm/operation-node/primitive-value-list-node.d.ts b/node_modules/kysely/dist/esm/operation-node/primitive-value-list-node.d.ts deleted file mode 100644 index 61dce91..0000000 --- a/node_modules/kysely/dist/esm/operation-node/primitive-value-list-node.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -/** - * This node is basically just a performance optimization over the normal ValueListNode. - * The queries often contain large arrays of primitive values (for example in a `where in` list) - * and we don't want to create a ValueNode for each item in those lists. - */ -export interface PrimitiveValueListNode extends OperationNode { - readonly kind: 'PrimitiveValueListNode'; - readonly values: ReadonlyArray; -} -type PrimitiveValueListNodeFactory = Readonly<{ - is(node: OperationNode): node is PrimitiveValueListNode; - create(values: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const PrimitiveValueListNode: PrimitiveValueListNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/primitive-value-list-node.js b/node_modules/kysely/dist/esm/operation-node/primitive-value-list-node.js deleted file mode 100644 index b433e4b..0000000 --- a/node_modules/kysely/dist/esm/operation-node/primitive-value-list-node.js +++ /dev/null @@ -1,16 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const PrimitiveValueListNode = freeze({ - is(node) { - return node.kind === 'PrimitiveValueListNode'; - }, - create(values) { - return freeze({ - kind: 'PrimitiveValueListNode', - values: freeze([...values]), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/query-node.d.ts b/node_modules/kysely/dist/esm/operation-node/query-node.d.ts deleted file mode 100644 index 61c46f9..0000000 --- a/node_modules/kysely/dist/esm/operation-node/query-node.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { InsertQueryNode } from './insert-query-node.js'; -import { SelectQueryNode } from './select-query-node.js'; -import { UpdateQueryNode } from './update-query-node.js'; -import { DeleteQueryNode } from './delete-query-node.js'; -import { WhereNode } from './where-node.js'; -import type { JoinNode } from './join-node.js'; -import type { SelectionNode } from './selection-node.js'; -import { ReturningNode } from './returning-node.js'; -import type { OperationNode } from './operation-node.js'; -import { ExplainNode } from './explain-node.js'; -import type { ExplainFormat } from '../util/explainable.js'; -import type { Expression } from '../expression/expression.js'; -import { MergeQueryNode } from './merge-query-node.js'; -import type { TopNode } from './top-node.js'; -import { OutputNode } from './output-node.js'; -import { OrderByNode } from './order-by-node.js'; -import type { OrderByItemNode } from './order-by-item-node.js'; -export type QueryNode = SelectQueryNode | InsertQueryNode | UpdateQueryNode | DeleteQueryNode | MergeQueryNode; -type HasJoins = { - joins?: ReadonlyArray; -}; -type HasWhere = { - where?: WhereNode; -}; -type HasReturning = { - returning?: ReturningNode; -}; -type HasExplain = { - explain?: ExplainNode; -}; -type HasTop = { - top?: TopNode; -}; -type HasOutput = { - output?: OutputNode; -}; -type HasEndModifiers = { - endModifiers?: ReadonlyArray; -}; -type HasOrderBy = { - orderBy?: OrderByNode; -}; -type QueryNodeFactory = Readonly<{ - is(node: OperationNode): node is QueryNode; - cloneWithEndModifier(node: T, modifier: OperationNode): Readonly; - cloneWithWhere(node: T, operation: OperationNode): Readonly; - cloneWithJoin(node: T, join: JoinNode): Readonly; - cloneWithReturning(node: T, selections: ReadonlyArray): Readonly; - cloneWithoutReturning(node: T): Readonly; - cloneWithoutWhere(node: T): Readonly; - cloneWithExplain(node: T, format: ExplainFormat | undefined, options: Expression | undefined): Readonly; - cloneWithTop(node: T, top: TopNode): Readonly; - cloneWithOutput(node: T, selections: ReadonlyArray): Readonly; - cloneWithOrderByItems(node: T, items: ReadonlyArray): Readonly; - cloneWithoutOrderBy(node: T): Readonly; -}>; -/** - * @internal - */ -export declare const QueryNode: QueryNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/query-node.js b/node_modules/kysely/dist/esm/operation-node/query-node.js deleted file mode 100644 index f2b6e33..0000000 --- a/node_modules/kysely/dist/esm/operation-node/query-node.js +++ /dev/null @@ -1,100 +0,0 @@ -/// -import { InsertQueryNode } from './insert-query-node.js'; -import { SelectQueryNode } from './select-query-node.js'; -import { UpdateQueryNode } from './update-query-node.js'; -import { DeleteQueryNode } from './delete-query-node.js'; -import { WhereNode } from './where-node.js'; -import { freeze } from '../util/object-utils.js'; -import { ReturningNode } from './returning-node.js'; -import { ExplainNode } from './explain-node.js'; -import { MergeQueryNode } from './merge-query-node.js'; -import { OutputNode } from './output-node.js'; -import { OrderByNode } from './order-by-node.js'; -/** - * @internal - */ -export const QueryNode = freeze({ - is(node) { - return (SelectQueryNode.is(node) || - InsertQueryNode.is(node) || - UpdateQueryNode.is(node) || - DeleteQueryNode.is(node) || - MergeQueryNode.is(node)); - }, - cloneWithEndModifier(node, modifier) { - return freeze({ - ...node, - endModifiers: node.endModifiers - ? freeze([...node.endModifiers, modifier]) - : freeze([modifier]), - }); - }, - cloneWithWhere(node, operation) { - return freeze({ - ...node, - where: node.where - ? WhereNode.cloneWithOperation(node.where, 'And', operation) - : WhereNode.create(operation), - }); - }, - cloneWithJoin(node, join) { - return freeze({ - ...node, - joins: node.joins ? freeze([...node.joins, join]) : freeze([join]), - }); - }, - cloneWithReturning(node, selections) { - return freeze({ - ...node, - returning: node.returning - ? ReturningNode.cloneWithSelections(node.returning, selections) - : ReturningNode.create(selections), - }); - }, - cloneWithoutReturning(node) { - return freeze({ - ...node, - returning: undefined, - }); - }, - cloneWithoutWhere(node) { - return freeze({ - ...node, - where: undefined, - }); - }, - cloneWithExplain(node, format, options) { - return freeze({ - ...node, - explain: ExplainNode.create(format, options?.toOperationNode()), - }); - }, - cloneWithTop(node, top) { - return freeze({ - ...node, - top, - }); - }, - cloneWithOutput(node, selections) { - return freeze({ - ...node, - output: node.output - ? OutputNode.cloneWithSelections(node.output, selections) - : OutputNode.create(selections), - }); - }, - cloneWithOrderByItems(node, items) { - return freeze({ - ...node, - orderBy: node.orderBy - ? OrderByNode.cloneWithItems(node.orderBy, items) - : OrderByNode.create(items), - }); - }, - cloneWithoutOrderBy(node) { - return freeze({ - ...node, - orderBy: undefined, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/raw-node.d.ts b/node_modules/kysely/dist/esm/operation-node/raw-node.d.ts deleted file mode 100644 index 33ba295..0000000 --- a/node_modules/kysely/dist/esm/operation-node/raw-node.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface RawNode extends OperationNode { - readonly kind: 'RawNode'; - readonly sqlFragments: ReadonlyArray; - readonly parameters: ReadonlyArray; -} -type RawNodeFactory = Readonly<{ - is(node: OperationNode): node is RawNode; - create(sqlFragments: ReadonlyArray, parameters: ReadonlyArray): Readonly; - createWithSql(sql: string): Readonly; - createWithChild(child: OperationNode): Readonly; - createWithChildren(children: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const RawNode: RawNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/raw-node.js b/node_modules/kysely/dist/esm/operation-node/raw-node.js deleted file mode 100644 index de4bbcc..0000000 --- a/node_modules/kysely/dist/esm/operation-node/raw-node.js +++ /dev/null @@ -1,26 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const RawNode = freeze({ - is(node) { - return node.kind === 'RawNode'; - }, - create(sqlFragments, parameters) { - return freeze({ - kind: 'RawNode', - sqlFragments: freeze(sqlFragments), - parameters: freeze(parameters), - }); - }, - createWithSql(sql) { - return RawNode.create([sql], []); - }, - createWithChild(child) { - return RawNode.create(['', ''], [child]); - }, - createWithChildren(children) { - return RawNode.create(new Array(children.length + 1).fill(''), children); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/reference-node.d.ts b/node_modules/kysely/dist/esm/operation-node/reference-node.d.ts deleted file mode 100644 index f81b1fa..0000000 --- a/node_modules/kysely/dist/esm/operation-node/reference-node.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { ColumnNode } from './column-node.js'; -import type { TableNode } from './table-node.js'; -import { SelectAllNode } from './select-all-node.js'; -export interface ReferenceNode extends OperationNode { - readonly kind: 'ReferenceNode'; - readonly column: ColumnNode | SelectAllNode; - readonly table?: TableNode; -} -type ReferenceNodeFactory = Readonly<{ - is(node: OperationNode): node is ReferenceNode; - create(column: ColumnNode, table?: TableNode): Readonly; - createSelectAll(table: TableNode): Readonly; -}>; -/** - * @internal - */ -export declare const ReferenceNode: ReferenceNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/reference-node.js b/node_modules/kysely/dist/esm/operation-node/reference-node.js deleted file mode 100644 index 927363e..0000000 --- a/node_modules/kysely/dist/esm/operation-node/reference-node.js +++ /dev/null @@ -1,25 +0,0 @@ -/// -import { SelectAllNode } from './select-all-node.js'; -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const ReferenceNode = freeze({ - is(node) { - return node.kind === 'ReferenceNode'; - }, - create(column, table) { - return freeze({ - kind: 'ReferenceNode', - table, - column, - }); - }, - createSelectAll(table) { - return freeze({ - kind: 'ReferenceNode', - table, - column: SelectAllNode.create(), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/references-node.d.ts b/node_modules/kysely/dist/esm/operation-node/references-node.d.ts deleted file mode 100644 index a7d5c1f..0000000 --- a/node_modules/kysely/dist/esm/operation-node/references-node.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { ColumnNode } from './column-node.js'; -import type { TableNode } from './table-node.js'; -import type { ArrayItemType } from '../util/type-utils.js'; -export declare const ON_MODIFY_FOREIGN_ACTIONS: readonly ["no action", "restrict", "cascade", "set null", "set default"]; -export type OnModifyForeignAction = ArrayItemType; -export interface ReferencesNode extends OperationNode { - readonly kind: 'ReferencesNode'; - readonly table: TableNode; - readonly columns: ReadonlyArray; - readonly onDelete?: OnModifyForeignAction; - readonly onUpdate?: OnModifyForeignAction; -} -type ReferencesNodeFactory = Readonly<{ - is(node: OperationNode): node is ReferencesNode; - create(table: TableNode, columns: ReadonlyArray): Readonly; - cloneWithOnDelete(references: ReferencesNode, onDelete: OnModifyForeignAction): Readonly; - cloneWithOnUpdate(references: ReferencesNode, onUpdate: OnModifyForeignAction): Readonly; -}>; -/** - * @internal - */ -export declare const ReferencesNode: ReferencesNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/references-node.js b/node_modules/kysely/dist/esm/operation-node/references-node.js deleted file mode 100644 index fd2345d..0000000 --- a/node_modules/kysely/dist/esm/operation-node/references-node.js +++ /dev/null @@ -1,36 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -export const ON_MODIFY_FOREIGN_ACTIONS = [ - 'no action', - 'restrict', - 'cascade', - 'set null', - 'set default', -]; -/** - * @internal - */ -export const ReferencesNode = freeze({ - is(node) { - return node.kind === 'ReferencesNode'; - }, - create(table, columns) { - return freeze({ - kind: 'ReferencesNode', - table, - columns: freeze([...columns]), - }); - }, - cloneWithOnDelete(references, onDelete) { - return freeze({ - ...references, - onDelete, - }); - }, - cloneWithOnUpdate(references, onUpdate) { - return freeze({ - ...references, - onUpdate, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/refresh-materialized-view-node.d.ts b/node_modules/kysely/dist/esm/operation-node/refresh-materialized-view-node.d.ts deleted file mode 100644 index 9f71b5a..0000000 --- a/node_modules/kysely/dist/esm/operation-node/refresh-materialized-view-node.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import { SchemableIdentifierNode } from './schemable-identifier-node.js'; -export type RefreshMaterializedViewNodeParams = Omit, 'kind' | 'name'>; -export interface RefreshMaterializedViewNode extends OperationNode { - readonly kind: 'RefreshMaterializedViewNode'; - readonly name: SchemableIdentifierNode; - readonly concurrently?: boolean; - readonly withNoData?: boolean; -} -type RefreshMaterializedViewNodeFactory = Readonly<{ - is(node: OperationNode): node is RefreshMaterializedViewNode; - create(name: string): Readonly; - cloneWith(createView: RefreshMaterializedViewNode, params: RefreshMaterializedViewNodeParams): Readonly; -}>; -/** - * @internal - */ -export declare const RefreshMaterializedViewNode: RefreshMaterializedViewNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/refresh-materialized-view-node.js b/node_modules/kysely/dist/esm/operation-node/refresh-materialized-view-node.js deleted file mode 100644 index 3111daa..0000000 --- a/node_modules/kysely/dist/esm/operation-node/refresh-materialized-view-node.js +++ /dev/null @@ -1,23 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { SchemableIdentifierNode } from './schemable-identifier-node.js'; -/** - * @internal - */ -export const RefreshMaterializedViewNode = freeze({ - is(node) { - return node.kind === 'RefreshMaterializedViewNode'; - }, - create(name) { - return freeze({ - kind: 'RefreshMaterializedViewNode', - name: SchemableIdentifierNode.create(name), - }); - }, - cloneWith(createView, params) { - return freeze({ - ...createView, - ...params, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/rename-column-node.d.ts b/node_modules/kysely/dist/esm/operation-node/rename-column-node.d.ts deleted file mode 100644 index 93541cd..0000000 --- a/node_modules/kysely/dist/esm/operation-node/rename-column-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import { ColumnNode } from './column-node.js'; -export interface RenameColumnNode extends OperationNode { - readonly kind: 'RenameColumnNode'; - readonly column: ColumnNode; - readonly renameTo: ColumnNode; -} -type RenameColumnNodeFactory = Readonly<{ - is(node: OperationNode): node is RenameColumnNode; - create(column: string, newColumn: string): Readonly; -}>; -/** - * @internal - */ -export declare const RenameColumnNode: RenameColumnNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/rename-column-node.js b/node_modules/kysely/dist/esm/operation-node/rename-column-node.js deleted file mode 100644 index 188cefb..0000000 --- a/node_modules/kysely/dist/esm/operation-node/rename-column-node.js +++ /dev/null @@ -1,18 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { ColumnNode } from './column-node.js'; -/** - * @internal - */ -export const RenameColumnNode = freeze({ - is(node) { - return node.kind === 'RenameColumnNode'; - }, - create(column, newColumn) { - return freeze({ - kind: 'RenameColumnNode', - column: ColumnNode.create(column), - renameTo: ColumnNode.create(newColumn), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/rename-constraint-node.d.ts b/node_modules/kysely/dist/esm/operation-node/rename-constraint-node.d.ts deleted file mode 100644 index 1848256..0000000 --- a/node_modules/kysely/dist/esm/operation-node/rename-constraint-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import { IdentifierNode } from './identifier-node.js'; -export interface RenameConstraintNode extends OperationNode { - readonly kind: 'RenameConstraintNode'; - readonly oldName: IdentifierNode; - readonly newName: IdentifierNode; -} -type RenameConstraintNodeFactory = Readonly<{ - is(node: OperationNode): node is RenameConstraintNode; - create(oldName: string, newName: string): Readonly; -}>; -/** - * @internal - */ -export declare const RenameConstraintNode: RenameConstraintNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/rename-constraint-node.js b/node_modules/kysely/dist/esm/operation-node/rename-constraint-node.js deleted file mode 100644 index bc5505c..0000000 --- a/node_modules/kysely/dist/esm/operation-node/rename-constraint-node.js +++ /dev/null @@ -1,18 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { IdentifierNode } from './identifier-node.js'; -/** - * @internal - */ -export const RenameConstraintNode = freeze({ - is(node) { - return node.kind === 'RenameConstraintNode'; - }, - create(oldName, newName) { - return freeze({ - kind: 'RenameConstraintNode', - oldName: IdentifierNode.create(oldName), - newName: IdentifierNode.create(newName), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/returning-node.d.ts b/node_modules/kysely/dist/esm/operation-node/returning-node.d.ts deleted file mode 100644 index 3d6e38f..0000000 --- a/node_modules/kysely/dist/esm/operation-node/returning-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { SelectionNode } from './selection-node.js'; -export interface ReturningNode extends OperationNode { - readonly kind: 'ReturningNode'; - readonly selections: ReadonlyArray; -} -type ReturningNodeFactory = Readonly<{ - is(node: OperationNode): node is ReturningNode; - create(selections: ReadonlyArray): Readonly; - cloneWithSelections(returning: ReturningNode, selections: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const ReturningNode: ReturningNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/returning-node.js b/node_modules/kysely/dist/esm/operation-node/returning-node.js deleted file mode 100644 index 2baccf2..0000000 --- a/node_modules/kysely/dist/esm/operation-node/returning-node.js +++ /dev/null @@ -1,24 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const ReturningNode = freeze({ - is(node) { - return node.kind === 'ReturningNode'; - }, - create(selections) { - return freeze({ - kind: 'ReturningNode', - selections: freeze(selections), - }); - }, - cloneWithSelections(returning, selections) { - return freeze({ - ...returning, - selections: returning.selections - ? freeze([...returning.selections, ...selections]) - : freeze(selections), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/schemable-identifier-node.d.ts b/node_modules/kysely/dist/esm/operation-node/schemable-identifier-node.d.ts deleted file mode 100644 index e3f9428..0000000 --- a/node_modules/kysely/dist/esm/operation-node/schemable-identifier-node.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { IdentifierNode } from './identifier-node.js'; -import type { OperationNode } from './operation-node.js'; -export interface SchemableIdentifierNode extends OperationNode { - readonly kind: 'SchemableIdentifierNode'; - readonly schema?: IdentifierNode; - readonly identifier: IdentifierNode; -} -type SchemableIdentifierNodeFactory = Readonly<{ - is(node: OperationNode): node is SchemableIdentifierNode; - create(identifier: string): Readonly; - createWithSchema(schema: string, identifier: string): Readonly; -}>; -/** - * @internal - */ -export declare const SchemableIdentifierNode: SchemableIdentifierNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/schemable-identifier-node.js b/node_modules/kysely/dist/esm/operation-node/schemable-identifier-node.js deleted file mode 100644 index b7ebfc6..0000000 --- a/node_modules/kysely/dist/esm/operation-node/schemable-identifier-node.js +++ /dev/null @@ -1,24 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { IdentifierNode } from './identifier-node.js'; -/** - * @internal - */ -export const SchemableIdentifierNode = freeze({ - is(node) { - return node.kind === 'SchemableIdentifierNode'; - }, - create(identifier) { - return freeze({ - kind: 'SchemableIdentifierNode', - identifier: IdentifierNode.create(identifier), - }); - }, - createWithSchema(schema, identifier) { - return freeze({ - kind: 'SchemableIdentifierNode', - schema: IdentifierNode.create(schema), - identifier: IdentifierNode.create(identifier), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/select-all-node.d.ts b/node_modules/kysely/dist/esm/operation-node/select-all-node.d.ts deleted file mode 100644 index a5e1628..0000000 --- a/node_modules/kysely/dist/esm/operation-node/select-all-node.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface SelectAllNode extends OperationNode { - readonly kind: 'SelectAllNode'; -} -type SelectAllNodeFactory = Readonly<{ - is(node: OperationNode): node is SelectAllNode; - create(): Readonly; -}>; -/** - * @internal - */ -export declare const SelectAllNode: SelectAllNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/select-all-node.js b/node_modules/kysely/dist/esm/operation-node/select-all-node.js deleted file mode 100644 index b7a3f8c..0000000 --- a/node_modules/kysely/dist/esm/operation-node/select-all-node.js +++ /dev/null @@ -1,15 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const SelectAllNode = freeze({ - is(node) { - return node.kind === 'SelectAllNode'; - }, - create() { - return freeze({ - kind: 'SelectAllNode', - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/select-modifier-node.d.ts b/node_modules/kysely/dist/esm/operation-node/select-modifier-node.d.ts deleted file mode 100644 index ba96198..0000000 --- a/node_modules/kysely/dist/esm/operation-node/select-modifier-node.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export type SelectModifier = 'ForUpdate' | 'ForNoKeyUpdate' | 'ForShare' | 'ForKeyShare' | 'NoWait' | 'SkipLocked' | 'Distinct'; -export interface SelectModifierNode extends OperationNode { - readonly kind: 'SelectModifierNode'; - readonly modifier?: SelectModifier; - readonly rawModifier?: OperationNode; - readonly of?: ReadonlyArray; -} -type SelectModifierNodeFactory = Readonly<{ - is(node: OperationNode): node is SelectModifierNode; - create(modifier: SelectModifier, of?: ReadonlyArray): Readonly; - createWithExpression(modifier: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const SelectModifierNode: SelectModifierNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/select-modifier-node.js b/node_modules/kysely/dist/esm/operation-node/select-modifier-node.js deleted file mode 100644 index ebd9043..0000000 --- a/node_modules/kysely/dist/esm/operation-node/select-modifier-node.js +++ /dev/null @@ -1,23 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const SelectModifierNode = freeze({ - is(node) { - return node.kind === 'SelectModifierNode'; - }, - create(modifier, of) { - return freeze({ - kind: 'SelectModifierNode', - modifier, - of, - }); - }, - createWithExpression(modifier) { - return freeze({ - kind: 'SelectModifierNode', - rawModifier: modifier, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/select-query-node.d.ts b/node_modules/kysely/dist/esm/operation-node/select-query-node.d.ts deleted file mode 100644 index 8b9ec4b..0000000 --- a/node_modules/kysely/dist/esm/operation-node/select-query-node.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { FromNode } from './from-node.js'; -import type { GroupByItemNode } from './group-by-item-node.js'; -import { GroupByNode } from './group-by-node.js'; -import { HavingNode } from './having-node.js'; -import type { JoinNode } from './join-node.js'; -import type { LimitNode } from './limit-node.js'; -import type { OffsetNode } from './offset-node.js'; -import type { OperationNode } from './operation-node.js'; -import type { OrderByItemNode } from './order-by-item-node.js'; -import type { OrderByNode } from './order-by-node.js'; -import type { SelectionNode } from './selection-node.js'; -import type { WhereNode } from './where-node.js'; -import type { WithNode } from './with-node.js'; -import type { SelectModifierNode } from './select-modifier-node.js'; -import type { ExplainNode } from './explain-node.js'; -import type { SetOperationNode } from './set-operation-node.js'; -import type { FetchNode } from './fetch-node.js'; -import type { TopNode } from './top-node.js'; -export interface SelectQueryNode extends OperationNode { - readonly kind: 'SelectQueryNode'; - readonly from?: FromNode; - readonly selections?: ReadonlyArray; - readonly distinctOn?: ReadonlyArray; - readonly joins?: ReadonlyArray; - readonly groupBy?: GroupByNode; - readonly orderBy?: OrderByNode; - readonly where?: WhereNode; - readonly frontModifiers?: ReadonlyArray; - readonly endModifiers?: ReadonlyArray; - readonly limit?: LimitNode; - readonly offset?: OffsetNode; - readonly with?: WithNode; - readonly having?: HavingNode; - readonly explain?: ExplainNode; - readonly setOperations?: ReadonlyArray; - readonly fetch?: FetchNode; - readonly top?: TopNode; -} -type SelectQueryNodeFactory = Readonly<{ - is(node: OperationNode): node is SelectQueryNode; - create(withNode?: WithNode): Readonly; - createFrom(fromItems: ReadonlyArray, withNode?: WithNode): Readonly; - cloneWithSelections(select: SelectQueryNode, selections: ReadonlyArray): Readonly; - cloneWithDistinctOn(select: SelectQueryNode, expressions: ReadonlyArray): Readonly; - cloneWithFrontModifier(select: SelectQueryNode, modifier: SelectModifierNode): Readonly; - cloneWithOrderByItems(node: SelectQueryNode, items: ReadonlyArray): Readonly; - cloneWithGroupByItems(selectNode: SelectQueryNode, items: ReadonlyArray): Readonly; - cloneWithLimit(selectNode: SelectQueryNode, limit: LimitNode): Readonly; - cloneWithOffset(selectNode: SelectQueryNode, offset: OffsetNode): Readonly; - cloneWithFetch(selectNode: SelectQueryNode, fetch: FetchNode): Readonly; - cloneWithHaving(selectNode: SelectQueryNode, operation: OperationNode): Readonly; - cloneWithSetOperations(selectNode: SelectQueryNode, setOperations: ReadonlyArray): Readonly; - cloneWithoutSelections(select: SelectQueryNode): Readonly; - cloneWithoutLimit(select: SelectQueryNode): Readonly; - cloneWithoutOffset(select: SelectQueryNode): Readonly; - cloneWithoutOrderBy(node: SelectQueryNode): Readonly; - cloneWithoutGroupBy(select: SelectQueryNode): Readonly; -}>; -/** - * @internal - */ -export declare const SelectQueryNode: SelectQueryNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/select-query-node.js b/node_modules/kysely/dist/esm/operation-node/select-query-node.js deleted file mode 100644 index 096d1cb..0000000 --- a/node_modules/kysely/dist/esm/operation-node/select-query-node.js +++ /dev/null @@ -1,127 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { FromNode } from './from-node.js'; -import { GroupByNode } from './group-by-node.js'; -import { HavingNode } from './having-node.js'; -import { QueryNode } from './query-node.js'; -/** - * @internal - */ -export const SelectQueryNode = freeze({ - is(node) { - return node.kind === 'SelectQueryNode'; - }, - create(withNode) { - return freeze({ - kind: 'SelectQueryNode', - ...(withNode && { with: withNode }), - }); - }, - createFrom(fromItems, withNode) { - return freeze({ - kind: 'SelectQueryNode', - from: FromNode.create(fromItems), - ...(withNode && { with: withNode }), - }); - }, - cloneWithSelections(select, selections) { - return freeze({ - ...select, - selections: select.selections - ? freeze([...select.selections, ...selections]) - : freeze(selections), - }); - }, - cloneWithDistinctOn(select, expressions) { - return freeze({ - ...select, - distinctOn: select.distinctOn - ? freeze([...select.distinctOn, ...expressions]) - : freeze(expressions), - }); - }, - cloneWithFrontModifier(select, modifier) { - return freeze({ - ...select, - frontModifiers: select.frontModifiers - ? freeze([...select.frontModifiers, modifier]) - : freeze([modifier]), - }); - }, - // TODO: remove in v0.29 - /** - * @deprecated Use `QueryNode.cloneWithoutOrderBy` instead. - */ - cloneWithOrderByItems: (node, items) => QueryNode.cloneWithOrderByItems(node, items), - cloneWithGroupByItems(selectNode, items) { - return freeze({ - ...selectNode, - groupBy: selectNode.groupBy - ? GroupByNode.cloneWithItems(selectNode.groupBy, items) - : GroupByNode.create(items), - }); - }, - cloneWithLimit(selectNode, limit) { - return freeze({ - ...selectNode, - limit, - }); - }, - cloneWithOffset(selectNode, offset) { - return freeze({ - ...selectNode, - offset, - }); - }, - cloneWithFetch(selectNode, fetch) { - return freeze({ - ...selectNode, - fetch, - }); - }, - cloneWithHaving(selectNode, operation) { - return freeze({ - ...selectNode, - having: selectNode.having - ? HavingNode.cloneWithOperation(selectNode.having, 'And', operation) - : HavingNode.create(operation), - }); - }, - cloneWithSetOperations(selectNode, setOperations) { - return freeze({ - ...selectNode, - setOperations: selectNode.setOperations - ? freeze([...selectNode.setOperations, ...setOperations]) - : freeze([...setOperations]), - }); - }, - cloneWithoutSelections(select) { - return freeze({ - ...select, - selections: [], - }); - }, - cloneWithoutLimit(select) { - return freeze({ - ...select, - limit: undefined, - }); - }, - cloneWithoutOffset(select) { - return freeze({ - ...select, - offset: undefined, - }); - }, - // TODO: remove in v0.29 - /** - * @deprecated Use `QueryNode.cloneWithoutOrderBy` instead. - */ - cloneWithoutOrderBy: (node) => QueryNode.cloneWithoutOrderBy(node), - cloneWithoutGroupBy(select) { - return freeze({ - ...select, - groupBy: undefined, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/selection-node.d.ts b/node_modules/kysely/dist/esm/operation-node/selection-node.d.ts deleted file mode 100644 index 7c588b4..0000000 --- a/node_modules/kysely/dist/esm/operation-node/selection-node.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { AliasNode } from './alias-node.js'; -import type { OperationNode } from './operation-node.js'; -import { SelectAllNode } from './select-all-node.js'; -import type { SimpleReferenceExpressionNode } from './simple-reference-expression-node.js'; -import type { TableNode } from './table-node.js'; -type SelectionNodeChild = SimpleReferenceExpressionNode | AliasNode | SelectAllNode; -export interface SelectionNode extends OperationNode { - readonly kind: 'SelectionNode'; - readonly selection: SelectionNodeChild; -} -type SelectionNodeFactory = Readonly<{ - is(node: OperationNode): node is SelectionNode; - create(selection: SelectionNodeChild): Readonly; - createSelectAll(): Readonly; - createSelectAllFromTable(table: TableNode): Readonly; -}>; -/** - * @internal - */ -export declare const SelectionNode: SelectionNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/selection-node.js b/node_modules/kysely/dist/esm/operation-node/selection-node.js deleted file mode 100644 index 925d26f..0000000 --- a/node_modules/kysely/dist/esm/operation-node/selection-node.js +++ /dev/null @@ -1,30 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { ReferenceNode } from './reference-node.js'; -import { SelectAllNode } from './select-all-node.js'; -/** - * @internal - */ -export const SelectionNode = freeze({ - is(node) { - return node.kind === 'SelectionNode'; - }, - create(selection) { - return freeze({ - kind: 'SelectionNode', - selection: selection, - }); - }, - createSelectAll() { - return freeze({ - kind: 'SelectionNode', - selection: SelectAllNode.create(), - }); - }, - createSelectAllFromTable(table) { - return freeze({ - kind: 'SelectionNode', - selection: ReferenceNode.createSelectAll(table), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/set-operation-node.d.ts b/node_modules/kysely/dist/esm/operation-node/set-operation-node.d.ts deleted file mode 100644 index f6046dd..0000000 --- a/node_modules/kysely/dist/esm/operation-node/set-operation-node.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export type SetOperator = 'union' | 'intersect' | 'except'; -export interface SetOperationNode extends OperationNode { - kind: 'SetOperationNode'; - operator: SetOperator; - expression: OperationNode; - all: boolean; -} -type SetOperationNodeFactory = Readonly<{ - is(node: OperationNode): node is SetOperationNode; - create(operator: SetOperator, expression: OperationNode, all: boolean): Readonly; -}>; -/** - * @internal - */ -export declare const SetOperationNode: SetOperationNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/set-operation-node.js b/node_modules/kysely/dist/esm/operation-node/set-operation-node.js deleted file mode 100644 index 038cb03..0000000 --- a/node_modules/kysely/dist/esm/operation-node/set-operation-node.js +++ /dev/null @@ -1,18 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const SetOperationNode = freeze({ - is(node) { - return node.kind === 'SetOperationNode'; - }, - create(operator, expression, all) { - return freeze({ - kind: 'SetOperationNode', - operator, - expression, - all, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/simple-reference-expression-node.d.ts b/node_modules/kysely/dist/esm/operation-node/simple-reference-expression-node.d.ts deleted file mode 100644 index e56ba57..0000000 --- a/node_modules/kysely/dist/esm/operation-node/simple-reference-expression-node.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { ColumnNode } from './column-node.js'; -import type { ReferenceNode } from './reference-node.js'; -export type SimpleReferenceExpressionNode = ColumnNode | ReferenceNode; diff --git a/node_modules/kysely/dist/esm/operation-node/simple-reference-expression-node.js b/node_modules/kysely/dist/esm/operation-node/simple-reference-expression-node.js deleted file mode 100644 index d58a929..0000000 --- a/node_modules/kysely/dist/esm/operation-node/simple-reference-expression-node.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/table-node.d.ts b/node_modules/kysely/dist/esm/operation-node/table-node.d.ts deleted file mode 100644 index 3cddd5b..0000000 --- a/node_modules/kysely/dist/esm/operation-node/table-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import { SchemableIdentifierNode } from './schemable-identifier-node.js'; -export interface TableNode extends OperationNode { - readonly kind: 'TableNode'; - readonly table: SchemableIdentifierNode; -} -type TableNodeFactory = Readonly<{ - is(node: OperationNode): node is TableNode; - create(table: string): Readonly; - createWithSchema(schema: string, table: string): Readonly; -}>; -/** - * @internal - */ -export declare const TableNode: TableNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/table-node.js b/node_modules/kysely/dist/esm/operation-node/table-node.js deleted file mode 100644 index b29cb1e..0000000 --- a/node_modules/kysely/dist/esm/operation-node/table-node.js +++ /dev/null @@ -1,23 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { SchemableIdentifierNode } from './schemable-identifier-node.js'; -/** - * @internal - */ -export const TableNode = freeze({ - is(node) { - return node.kind === 'TableNode'; - }, - create(table) { - return freeze({ - kind: 'TableNode', - table: SchemableIdentifierNode.create(table), - }); - }, - createWithSchema(schema, table) { - return freeze({ - kind: 'TableNode', - table: SchemableIdentifierNode.createWithSchema(schema, table), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/top-node.d.ts b/node_modules/kysely/dist/esm/operation-node/top-node.d.ts deleted file mode 100644 index dde582e..0000000 --- a/node_modules/kysely/dist/esm/operation-node/top-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export type TopModifier = 'percent' | 'with ties' | 'percent with ties'; -export interface TopNode extends OperationNode { - readonly kind: 'TopNode'; - readonly expression: number | bigint; - readonly modifiers?: TopModifier; -} -type TopNodeFactory = Readonly<{ - is(node: OperationNode): node is TopNode; - create(expression: number | bigint, modifiers?: TopModifier): Readonly; -}>; -/** - * @internal - */ -export declare const TopNode: TopNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/top-node.js b/node_modules/kysely/dist/esm/operation-node/top-node.js deleted file mode 100644 index 516c80b..0000000 --- a/node_modules/kysely/dist/esm/operation-node/top-node.js +++ /dev/null @@ -1,17 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const TopNode = freeze({ - is(node) { - return node.kind === 'TopNode'; - }, - create(expression, modifiers) { - return freeze({ - kind: 'TopNode', - expression, - modifiers, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/tuple-node.d.ts b/node_modules/kysely/dist/esm/operation-node/tuple-node.d.ts deleted file mode 100644 index 10478ac..0000000 --- a/node_modules/kysely/dist/esm/operation-node/tuple-node.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface TupleNode extends OperationNode { - readonly kind: 'TupleNode'; - readonly values: ReadonlyArray; -} -type TupleNodeFactory = Readonly<{ - is(node: OperationNode): node is TupleNode; - create(values: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const TupleNode: TupleNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/tuple-node.js b/node_modules/kysely/dist/esm/operation-node/tuple-node.js deleted file mode 100644 index d05d507..0000000 --- a/node_modules/kysely/dist/esm/operation-node/tuple-node.js +++ /dev/null @@ -1,16 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const TupleNode = freeze({ - is(node) { - return node.kind === 'TupleNode'; - }, - create(values) { - return freeze({ - kind: 'TupleNode', - values: freeze(values), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/unary-operation-node.d.ts b/node_modules/kysely/dist/esm/operation-node/unary-operation-node.d.ts deleted file mode 100644 index b45b4dd..0000000 --- a/node_modules/kysely/dist/esm/operation-node/unary-operation-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface UnaryOperationNode extends OperationNode { - readonly kind: 'UnaryOperationNode'; - readonly operator: OperationNode; - readonly operand: OperationNode; -} -type UnaryOperationNodeFactory = Readonly<{ - is(node: OperationNode): node is UnaryOperationNode; - create(operator: OperationNode, operand: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const UnaryOperationNode: UnaryOperationNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/unary-operation-node.js b/node_modules/kysely/dist/esm/operation-node/unary-operation-node.js deleted file mode 100644 index 7efd071..0000000 --- a/node_modules/kysely/dist/esm/operation-node/unary-operation-node.js +++ /dev/null @@ -1,17 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const UnaryOperationNode = freeze({ - is(node) { - return node.kind === 'UnaryOperationNode'; - }, - create(operator, operand) { - return freeze({ - kind: 'UnaryOperationNode', - operator, - operand, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/unique-constraint-node.d.ts b/node_modules/kysely/dist/esm/operation-node/unique-constraint-node.d.ts deleted file mode 100644 index 7dcd495..0000000 --- a/node_modules/kysely/dist/esm/operation-node/unique-constraint-node.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ColumnNode } from './column-node.js'; -import { IdentifierNode } from './identifier-node.js'; -import type { OperationNode } from './operation-node.js'; -export interface UniqueConstraintNode extends OperationNode { - readonly kind: 'UniqueConstraintNode'; - readonly columns: ReadonlyArray; - readonly name?: IdentifierNode; - readonly nullsNotDistinct?: boolean; - readonly deferrable?: boolean; - readonly initiallyDeferred?: boolean; -} -export type UniqueConstraintNodeProps = Omit, 'kind'>; -type UniqueConstraintNodeFactory = Readonly<{ - is(node: OperationNode): node is UniqueConstraintNode; - create(columns: string[], constraintName?: string, nullsNotDistinct?: boolean): Readonly; - cloneWith(node: UniqueConstraintNode, props: UniqueConstraintNodeProps): Readonly; -}>; -/** - * @internal - */ -export declare const UniqueConstraintNode: UniqueConstraintNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/unique-constraint-node.js b/node_modules/kysely/dist/esm/operation-node/unique-constraint-node.js deleted file mode 100644 index 96545c2..0000000 --- a/node_modules/kysely/dist/esm/operation-node/unique-constraint-node.js +++ /dev/null @@ -1,28 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { ColumnNode } from './column-node.js'; -import { IdentifierNode } from './identifier-node.js'; -/** - * @internal - */ -export const UniqueConstraintNode = freeze({ - is(node) { - return node.kind === 'UniqueConstraintNode'; - }, - create(columns, constraintName, nullsNotDistinct) { - return freeze({ - kind: 'UniqueConstraintNode', - columns: freeze(columns.map(ColumnNode.create)), - name: constraintName - ? IdentifierNode.create(constraintName) - : undefined, - nullsNotDistinct, - }); - }, - cloneWith(node, props) { - return freeze({ - ...node, - ...props, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/update-query-node.d.ts b/node_modules/kysely/dist/esm/operation-node/update-query-node.d.ts deleted file mode 100644 index 968c5ec..0000000 --- a/node_modules/kysely/dist/esm/operation-node/update-query-node.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import type { ColumnUpdateNode } from './column-update-node.js'; -import type { JoinNode } from './join-node.js'; -import type { OperationNode } from './operation-node.js'; -import type { ReturningNode } from './returning-node.js'; -import type { WhereNode } from './where-node.js'; -import type { WithNode } from './with-node.js'; -import { FromNode } from './from-node.js'; -import type { ExplainNode } from './explain-node.js'; -import type { LimitNode } from './limit-node.js'; -import type { TopNode } from './top-node.js'; -import type { OutputNode } from './output-node.js'; -import type { OrderByNode } from './order-by-node.js'; -export interface UpdateQueryNode extends OperationNode { - readonly kind: 'UpdateQueryNode'; - readonly table?: OperationNode; - readonly from?: FromNode; - readonly joins?: ReadonlyArray; - readonly where?: WhereNode; - readonly updates?: ReadonlyArray; - readonly returning?: ReturningNode; - readonly with?: WithNode; - readonly explain?: ExplainNode; - readonly endModifiers?: ReadonlyArray; - readonly limit?: LimitNode; - readonly top?: TopNode; - readonly output?: OutputNode; - readonly orderBy?: OrderByNode; -} -type UpdateQueryNodeFactory = Readonly<{ - is(node: OperationNode): node is UpdateQueryNode; - create(tables: ReadonlyArray, withNode?: WithNode): Readonly; - createWithoutTable(): Readonly; - cloneWithFromItems(updateQuery: UpdateQueryNode, fromItems: ReadonlyArray): Readonly; - cloneWithUpdates(updateQuery: UpdateQueryNode, updates: ReadonlyArray): Readonly; - cloneWithLimit(updateQuery: UpdateQueryNode, limit: LimitNode): Readonly; -}>; -/** - * @internal - */ -export declare const UpdateQueryNode: UpdateQueryNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/update-query-node.js b/node_modules/kysely/dist/esm/operation-node/update-query-node.js deleted file mode 100644 index 6181745..0000000 --- a/node_modules/kysely/dist/esm/operation-node/update-query-node.js +++ /dev/null @@ -1,48 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { FromNode } from './from-node.js'; -import { ListNode } from './list-node.js'; -/** - * @internal - */ -export const UpdateQueryNode = freeze({ - is(node) { - return node.kind === 'UpdateQueryNode'; - }, - create(tables, withNode) { - return freeze({ - kind: 'UpdateQueryNode', - // For backwards compatibility, use the raw table node when there's only one table - // and don't rename the property to something like `tables`. - table: tables.length === 1 ? tables[0] : ListNode.create(tables), - ...(withNode && { with: withNode }), - }); - }, - createWithoutTable() { - return freeze({ - kind: 'UpdateQueryNode', - }); - }, - cloneWithFromItems(updateQuery, fromItems) { - return freeze({ - ...updateQuery, - from: updateQuery.from - ? FromNode.cloneWithFroms(updateQuery.from, fromItems) - : FromNode.create(fromItems), - }); - }, - cloneWithUpdates(updateQuery, updates) { - return freeze({ - ...updateQuery, - updates: updateQuery.updates - ? freeze([...updateQuery.updates, ...updates]) - : updates, - }); - }, - cloneWithLimit(updateQuery, limit) { - return freeze({ - ...updateQuery, - limit, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/using-node.d.ts b/node_modules/kysely/dist/esm/operation-node/using-node.d.ts deleted file mode 100644 index 40bc5aa..0000000 --- a/node_modules/kysely/dist/esm/operation-node/using-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface UsingNode extends OperationNode { - readonly kind: 'UsingNode'; - readonly tables: ReadonlyArray; -} -type UsingNodeFactory = Readonly<{ - is(node: OperationNode): node is UsingNode; - create(tables: ReadonlyArray): Readonly; - cloneWithTables(using: UsingNode, tables: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const UsingNode: UsingNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/using-node.js b/node_modules/kysely/dist/esm/operation-node/using-node.js deleted file mode 100644 index b44ccd4..0000000 --- a/node_modules/kysely/dist/esm/operation-node/using-node.js +++ /dev/null @@ -1,22 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const UsingNode = freeze({ - is(node) { - return node.kind === 'UsingNode'; - }, - create(tables) { - return freeze({ - kind: 'UsingNode', - tables: freeze(tables), - }); - }, - cloneWithTables(using, tables) { - return freeze({ - ...using, - tables: freeze([...using.tables, ...tables]), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/value-list-node.d.ts b/node_modules/kysely/dist/esm/operation-node/value-list-node.d.ts deleted file mode 100644 index ad30859..0000000 --- a/node_modules/kysely/dist/esm/operation-node/value-list-node.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface ValueListNode extends OperationNode { - readonly kind: 'ValueListNode'; - readonly values: ReadonlyArray; -} -type ValueListNodeFactory = Readonly<{ - is(node: OperationNode): node is ValueListNode; - create(values: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const ValueListNode: ValueListNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/value-list-node.js b/node_modules/kysely/dist/esm/operation-node/value-list-node.js deleted file mode 100644 index 934d047..0000000 --- a/node_modules/kysely/dist/esm/operation-node/value-list-node.js +++ /dev/null @@ -1,16 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const ValueListNode = freeze({ - is(node) { - return node.kind === 'ValueListNode'; - }, - create(values) { - return freeze({ - kind: 'ValueListNode', - values: freeze(values), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/value-node.d.ts b/node_modules/kysely/dist/esm/operation-node/value-node.d.ts deleted file mode 100644 index f3a4afa..0000000 --- a/node_modules/kysely/dist/esm/operation-node/value-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface ValueNode extends OperationNode { - readonly kind: 'ValueNode'; - readonly value: unknown; - readonly immediate?: boolean; -} -type ValueNodeFactory = Readonly<{ - is(node: OperationNode): node is ValueNode; - create(value: unknown): Readonly; - createImmediate(value: unknown): Readonly; -}>; -/** - * @internal - */ -export declare const ValueNode: ValueNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/value-node.js b/node_modules/kysely/dist/esm/operation-node/value-node.js deleted file mode 100644 index 9abdfa8..0000000 --- a/node_modules/kysely/dist/esm/operation-node/value-node.js +++ /dev/null @@ -1,23 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const ValueNode = freeze({ - is(node) { - return node.kind === 'ValueNode'; - }, - create(value) { - return freeze({ - kind: 'ValueNode', - value, - }); - }, - createImmediate(value) { - return freeze({ - kind: 'ValueNode', - value, - immediate: true, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/values-node.d.ts b/node_modules/kysely/dist/esm/operation-node/values-node.d.ts deleted file mode 100644 index aa4a928..0000000 --- a/node_modules/kysely/dist/esm/operation-node/values-node.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { PrimitiveValueListNode } from './primitive-value-list-node.js'; -import type { ValueListNode } from './value-list-node.js'; -export type ValuesItemNode = ValueListNode | PrimitiveValueListNode; -export interface ValuesNode extends OperationNode { - readonly kind: 'ValuesNode'; - readonly values: ReadonlyArray; -} -type ValuesNodeFactory = Readonly<{ - is(node: OperationNode): node is ValuesNode; - create(values: ReadonlyArray): Readonly; -}>; -/** - * @internal - */ -export declare const ValuesNode: ValuesNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/values-node.js b/node_modules/kysely/dist/esm/operation-node/values-node.js deleted file mode 100644 index fc4daf1..0000000 --- a/node_modules/kysely/dist/esm/operation-node/values-node.js +++ /dev/null @@ -1,16 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const ValuesNode = freeze({ - is(node) { - return node.kind === 'ValuesNode'; - }, - create(values) { - return freeze({ - kind: 'ValuesNode', - values: freeze(values), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/when-node.d.ts b/node_modules/kysely/dist/esm/operation-node/when-node.d.ts deleted file mode 100644 index c6daa4f..0000000 --- a/node_modules/kysely/dist/esm/operation-node/when-node.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface WhenNode extends OperationNode { - readonly kind: 'WhenNode'; - readonly condition: OperationNode; - readonly result?: OperationNode; -} -type WhenNodeFactory = Readonly<{ - is(node: OperationNode): node is WhenNode; - create(condition: OperationNode): Readonly; - cloneWithResult(whenNode: WhenNode, result: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const WhenNode: WhenNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/when-node.js b/node_modules/kysely/dist/esm/operation-node/when-node.js deleted file mode 100644 index 733f8d3..0000000 --- a/node_modules/kysely/dist/esm/operation-node/when-node.js +++ /dev/null @@ -1,22 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const WhenNode = freeze({ - is(node) { - return node.kind === 'WhenNode'; - }, - create(condition) { - return freeze({ - kind: 'WhenNode', - condition, - }); - }, - cloneWithResult(whenNode, result) { - return freeze({ - ...whenNode, - result, - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/where-node.d.ts b/node_modules/kysely/dist/esm/operation-node/where-node.d.ts deleted file mode 100644 index 15bf056..0000000 --- a/node_modules/kysely/dist/esm/operation-node/where-node.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -export interface WhereNode extends OperationNode { - readonly kind: 'WhereNode'; - readonly where: OperationNode; -} -type WhereNodeFactory = Readonly<{ - is(node: OperationNode): node is WhereNode; - create(filter: OperationNode): Readonly; - cloneWithOperation(whereNode: WhereNode, operator: 'And' | 'Or', operation: OperationNode): Readonly; -}>; -/** - * @internal - */ -export declare const WhereNode: WhereNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/where-node.js b/node_modules/kysely/dist/esm/operation-node/where-node.js deleted file mode 100644 index cac4c66..0000000 --- a/node_modules/kysely/dist/esm/operation-node/where-node.js +++ /dev/null @@ -1,26 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { AndNode } from './and-node.js'; -import { OrNode } from './or-node.js'; -/** - * @internal - */ -export const WhereNode = freeze({ - is(node) { - return node.kind === 'WhereNode'; - }, - create(filter) { - return freeze({ - kind: 'WhereNode', - where: filter, - }); - }, - cloneWithOperation(whereNode, operator, operation) { - return freeze({ - ...whereNode, - where: operator === 'And' - ? AndNode.create(whereNode.where, operation) - : OrNode.create(whereNode.where, operation), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/operation-node/with-node.d.ts b/node_modules/kysely/dist/esm/operation-node/with-node.d.ts deleted file mode 100644 index fde4405..0000000 --- a/node_modules/kysely/dist/esm/operation-node/with-node.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { OperationNode } from './operation-node.js'; -import type { CommonTableExpressionNode } from './common-table-expression-node.js'; -export type WithNodeParams = Omit; -export interface WithNode extends OperationNode { - readonly kind: 'WithNode'; - readonly expressions: ReadonlyArray; - readonly recursive?: boolean; -} -type WithNodeFactory = Readonly<{ - is(node: OperationNode): node is WithNode; - create(expression: CommonTableExpressionNode, params?: WithNodeParams): Readonly; - cloneWithExpression(withNode: WithNode, expression: CommonTableExpressionNode): Readonly; -}>; -/** - * @internal - */ -export declare const WithNode: WithNodeFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/operation-node/with-node.js b/node_modules/kysely/dist/esm/operation-node/with-node.js deleted file mode 100644 index 18fd4e1..0000000 --- a/node_modules/kysely/dist/esm/operation-node/with-node.js +++ /dev/null @@ -1,23 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -/** - * @internal - */ -export const WithNode = freeze({ - is(node) { - return node.kind === 'WithNode'; - }, - create(expression, params) { - return freeze({ - kind: 'WithNode', - expressions: freeze([expression]), - ...params, - }); - }, - cloneWithExpression(withNode, expression) { - return freeze({ - ...withNode, - expressions: freeze([...withNode.expressions, expression]), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/package.json b/node_modules/kysely/dist/esm/package.json deleted file mode 100644 index 2bd6e50..0000000 --- a/node_modules/kysely/dist/esm/package.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"module","sideEffects":false} \ No newline at end of file diff --git a/node_modules/kysely/dist/esm/parser/binary-operation-parser.d.ts b/node_modules/kysely/dist/esm/parser/binary-operation-parser.d.ts deleted file mode 100644 index 076a691..0000000 --- a/node_modules/kysely/dist/esm/parser/binary-operation-parser.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { BinaryOperationNode } from '../operation-node/binary-operation-node.js'; -import { type OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { type ComparisonOperator, type BinaryOperator, type Operator } from '../operation-node/operator-node.js'; -import { type ExtractTypeFromReferenceExpression, type ExtractTypeFromStringReference, type ReferenceExpression, type StringReference } from './reference-parser.js'; -import { type ValueExpression, type ValueExpressionOrList } from './value-parser.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -import type { Expression } from '../expression/expression.js'; -import type { SelectType } from '../util/column-type.js'; -export type OperandValueExpression = ValueExpression>; -export type OperandValueExpressionOrList = ValueExpressionOrList | null>; -export type OperatorExpression = Operator | Expression; -export type BinaryOperatorExpression = BinaryOperator | Expression; -export type ComparisonOperatorExpression = ComparisonOperator | Expression; -export type FilterObject = { - [R in StringReference]?: ValueExpressionOrList>>; -}; -export declare function parseValueBinaryOperationOrExpression(args: any[]): OperationNode; -export declare function parseValueBinaryOperation(left: ReferenceExpression, operator: BinaryOperatorExpression, right: OperandValueExpressionOrList): BinaryOperationNode; -export declare function parseReferentialBinaryOperation(left: ReferenceExpression, operator: BinaryOperatorExpression, right: OperandValueExpressionOrList): BinaryOperationNode; -export declare function parseFilterObject(obj: Readonly>, combinator: 'and' | 'or'): OperationNode; -export declare function parseFilterList(list: ReadonlyArray, combinator: 'and' | 'or', withParens?: boolean): OperationNode; diff --git a/node_modules/kysely/dist/esm/parser/binary-operation-parser.js b/node_modules/kysely/dist/esm/parser/binary-operation-parser.js deleted file mode 100644 index 02bead4..0000000 --- a/node_modules/kysely/dist/esm/parser/binary-operation-parser.js +++ /dev/null @@ -1,68 +0,0 @@ -/// -import { BinaryOperationNode } from '../operation-node/binary-operation-node.js'; -import { isBoolean, isNull, isString, isUndefined, } from '../util/object-utils.js'; -import { isOperationNodeSource, } from '../operation-node/operation-node-source.js'; -import { OperatorNode, OPERATORS, } from '../operation-node/operator-node.js'; -import { parseReferenceExpression, } from './reference-parser.js'; -import { parseValueExpression, parseValueExpressionOrList, } from './value-parser.js'; -import { ValueNode } from '../operation-node/value-node.js'; -import { AndNode } from '../operation-node/and-node.js'; -import { ParensNode } from '../operation-node/parens-node.js'; -import { OrNode } from '../operation-node/or-node.js'; -export function parseValueBinaryOperationOrExpression(args) { - if (args.length === 3) { - return parseValueBinaryOperation(args[0], args[1], args[2]); - } - else if (args.length === 1) { - return parseValueExpression(args[0]); - } - throw new Error(`invalid arguments: ${JSON.stringify(args)}`); -} -export function parseValueBinaryOperation(left, operator, right) { - if (isIsOperator(operator) && needsIsOperator(right)) { - return BinaryOperationNode.create(parseReferenceExpression(left), parseOperator(operator), ValueNode.createImmediate(right)); - } - return BinaryOperationNode.create(parseReferenceExpression(left), parseOperator(operator), parseValueExpressionOrList(right)); -} -export function parseReferentialBinaryOperation(left, operator, right) { - return BinaryOperationNode.create(parseReferenceExpression(left), parseOperator(operator), parseReferenceExpression(right)); -} -export function parseFilterObject(obj, combinator) { - return parseFilterList(Object.entries(obj) - .filter(([, v]) => !isUndefined(v)) - .map(([k, v]) => parseValueBinaryOperation(k, needsIsOperator(v) ? 'is' : '=', v)), combinator); -} -export function parseFilterList(list, combinator, withParens = true) { - const combine = combinator === 'and' ? AndNode.create : OrNode.create; - if (list.length === 0) { - return BinaryOperationNode.create(ValueNode.createImmediate(1), OperatorNode.create('='), ValueNode.createImmediate(combinator === 'and' ? 1 : 0)); - } - let node = toOperationNode(list[0]); - for (let i = 1; i < list.length; ++i) { - node = combine(node, toOperationNode(list[i])); - } - if (list.length > 1 && withParens) { - return ParensNode.create(node); - } - return node; -} -function isIsOperator(operator) { - return operator === 'is' || operator === 'is not'; -} -function needsIsOperator(value) { - return isNull(value) || isBoolean(value); -} -function parseOperator(operator) { - if (isString(operator) && OPERATORS.includes(operator)) { - return OperatorNode.create(operator); - } - if (isOperationNodeSource(operator)) { - return operator.toOperationNode(); - } - throw new Error(`invalid operator ${JSON.stringify(operator)}`); -} -function toOperationNode(nodeOrSource) { - return isOperationNodeSource(nodeOrSource) - ? nodeOrSource.toOperationNode() - : nodeOrSource; -} diff --git a/node_modules/kysely/dist/esm/parser/coalesce-parser.d.ts b/node_modules/kysely/dist/esm/parser/coalesce-parser.d.ts deleted file mode 100644 index 9c55941..0000000 --- a/node_modules/kysely/dist/esm/parser/coalesce-parser.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { ExtractTypeFromReferenceExpression } from './reference-parser.js'; -export type ExtractTypeFromCoalesce1 = ExtractTypeFromReferenceExpression; -export type ExtractTypeFromCoalesce2 = ExtractTypeFromCoalesceValues2, ExtractTypeFromReferenceExpression>; -type ExtractTypeFromCoalesceValues2 = null extends V1 ? null extends V2 ? V1 | V2 : NotNull : NotNull; -export type ExtractTypeFromCoalesce3 = ExtractTypeFromCoalesceValues3, ExtractTypeFromReferenceExpression, ExtractTypeFromReferenceExpression>; -type ExtractTypeFromCoalesceValues3 = null extends V1 ? null extends V2 ? null extends V3 ? V1 | V2 | V3 : NotNull : NotNull : NotNull; -export type ExtractTypeFromCoalesce4 = ExtractTypeFromCoalesceValues4, ExtractTypeFromReferenceExpression, ExtractTypeFromReferenceExpression, ExtractTypeFromReferenceExpression>; -type ExtractTypeFromCoalesceValues4 = null extends V1 ? null extends V2 ? null extends V3 ? null extends V4 ? V1 | V2 | V3 | V4 : NotNull : NotNull : NotNull : NotNull; -export type ExtractTypeFromCoalesce5 = ExtractTypeFromCoalesceValues5, ExtractTypeFromReferenceExpression, ExtractTypeFromReferenceExpression, ExtractTypeFromReferenceExpression, ExtractTypeFromReferenceExpression>; -type ExtractTypeFromCoalesceValues5 = null extends V1 ? null extends V2 ? null extends V3 ? null extends V4 ? null extends V5 ? V1 | V2 | V3 | V4 | V5 : NotNull : NotNull : NotNull : NotNull : NotNull; -type NotNull = Exclude; -export {}; diff --git a/node_modules/kysely/dist/esm/parser/coalesce-parser.js b/node_modules/kysely/dist/esm/parser/coalesce-parser.js deleted file mode 100644 index d2814e6..0000000 --- a/node_modules/kysely/dist/esm/parser/coalesce-parser.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/parser/collate-parser.d.ts b/node_modules/kysely/dist/esm/parser/collate-parser.d.ts deleted file mode 100644 index 0b34c48..0000000 --- a/node_modules/kysely/dist/esm/parser/collate-parser.d.ts +++ /dev/null @@ -1 +0,0 @@ -export type Collation = 'nocase' | 'binary' | 'rtrim' | (string & {}); diff --git a/node_modules/kysely/dist/esm/parser/collate-parser.js b/node_modules/kysely/dist/esm/parser/collate-parser.js deleted file mode 100644 index d3e4170..0000000 --- a/node_modules/kysely/dist/esm/parser/collate-parser.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/parser/data-type-parser.d.ts b/node_modules/kysely/dist/esm/parser/data-type-parser.d.ts deleted file mode 100644 index 404183e..0000000 --- a/node_modules/kysely/dist/esm/parser/data-type-parser.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -import { type ColumnDataType } from '../operation-node/data-type-node.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -export type DataTypeExpression = ColumnDataType | Expression; -export declare function parseDataTypeExpression(dataType: DataTypeExpression): OperationNode; diff --git a/node_modules/kysely/dist/esm/parser/data-type-parser.js b/node_modules/kysely/dist/esm/parser/data-type-parser.js deleted file mode 100644 index ed7456c..0000000 --- a/node_modules/kysely/dist/esm/parser/data-type-parser.js +++ /dev/null @@ -1,12 +0,0 @@ -/// -import { DataTypeNode, isColumnDataType, } from '../operation-node/data-type-node.js'; -import { isOperationNodeSource } from '../operation-node/operation-node-source.js'; -export function parseDataTypeExpression(dataType) { - if (isOperationNodeSource(dataType)) { - return dataType.toOperationNode(); - } - if (isColumnDataType(dataType)) { - return DataTypeNode.create(dataType); - } - throw new Error(`invalid column data type ${JSON.stringify(dataType)}`); -} diff --git a/node_modules/kysely/dist/esm/parser/default-value-parser.d.ts b/node_modules/kysely/dist/esm/parser/default-value-parser.d.ts deleted file mode 100644 index 8938d53..0000000 --- a/node_modules/kysely/dist/esm/parser/default-value-parser.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -export type DefaultValueExpression = unknown | Expression; -export declare function parseDefaultValueExpression(value: DefaultValueExpression): OperationNode; diff --git a/node_modules/kysely/dist/esm/parser/default-value-parser.js b/node_modules/kysely/dist/esm/parser/default-value-parser.js deleted file mode 100644 index 8d7b152..0000000 --- a/node_modules/kysely/dist/esm/parser/default-value-parser.js +++ /dev/null @@ -1,8 +0,0 @@ -/// -import { isOperationNodeSource } from '../operation-node/operation-node-source.js'; -import { ValueNode } from '../operation-node/value-node.js'; -export function parseDefaultValueExpression(value) { - return isOperationNodeSource(value) - ? value.toOperationNode() - : ValueNode.createImmediate(value); -} diff --git a/node_modules/kysely/dist/esm/parser/delete-from-parser.d.ts b/node_modules/kysely/dist/esm/parser/delete-from-parser.d.ts deleted file mode 100644 index 4ecb5f3..0000000 --- a/node_modules/kysely/dist/esm/parser/delete-from-parser.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { DeleteQueryBuilder } from '../query-builder/delete-query-builder.js'; -import type { DeleteResult } from '../query-builder/delete-result.js'; -import type { ShallowRecord } from '../util/type-utils.js'; -import type { ExtractTableAlias, From, FromTables, TableExpressionOrList } from './table-parser.js'; -export type DeleteFrom> = [ - TE -] extends [keyof DB] ? DeleteQueryBuilder, DeleteResult> : [ - TE -] extends [`${infer T} as ${infer A}`] ? T extends keyof DB ? DeleteQueryBuilder, A, DeleteResult> : never : TE extends ReadonlyArray ? DeleteQueryBuilder, FromTables, DeleteResult> : DeleteQueryBuilder, FromTables, DeleteResult>; diff --git a/node_modules/kysely/dist/esm/parser/delete-from-parser.js b/node_modules/kysely/dist/esm/parser/delete-from-parser.js deleted file mode 100644 index 36391c0..0000000 --- a/node_modules/kysely/dist/esm/parser/delete-from-parser.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/parser/expression-parser.d.ts b/node_modules/kysely/dist/esm/parser/expression-parser.d.ts deleted file mode 100644 index 06c5783..0000000 --- a/node_modules/kysely/dist/esm/parser/expression-parser.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { type AliasedExpression, type Expression } from '../expression/expression.js'; -import type { AliasNode } from '../operation-node/alias-node.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -import { type ExpressionBuilder } from '../expression/expression-builder.js'; -import type { SelectQueryBuilderExpression } from '../query-builder/select-query-builder-expression.js'; -/** - * Like `Expression` but also accepts a select query with an output - * type extending `Record`. This type is useful because SQL - * treats records with a single column as single values. - */ -export type OperandExpression = Expression | SelectQueryBuilderExpression>; -export type ExpressionOrFactory = OperandExpression | OperandExpressionFactory; -export type AliasedExpressionOrFactory = AliasedExpression | AliasedExpressionFactory; -export type ExpressionFactory = (eb: ExpressionBuilder) => Expression; -type OperandExpressionFactory = (eb: ExpressionBuilder) => OperandExpression; -type AliasedExpressionFactory = (eb: ExpressionBuilder) => AliasedExpression; -export declare function parseExpression(exp: ExpressionOrFactory): OperationNode; -export declare function parseAliasedExpression(exp: AliasedExpressionOrFactory): AliasNode; -export declare function isExpressionOrFactory(obj: unknown): obj is ExpressionOrFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/parser/expression-parser.js b/node_modules/kysely/dist/esm/parser/expression-parser.js deleted file mode 100644 index b88801b..0000000 --- a/node_modules/kysely/dist/esm/parser/expression-parser.js +++ /dev/null @@ -1,26 +0,0 @@ -/// -import { isAliasedExpression, isExpression, } from '../expression/expression.js'; -import { isOperationNodeSource } from '../operation-node/operation-node-source.js'; -import { expressionBuilder, } from '../expression/expression-builder.js'; -import { isFunction } from '../util/object-utils.js'; -export function parseExpression(exp) { - if (isOperationNodeSource(exp)) { - return exp.toOperationNode(); - } - else if (isFunction(exp)) { - return exp(expressionBuilder()).toOperationNode(); - } - throw new Error(`invalid expression: ${JSON.stringify(exp)}`); -} -export function parseAliasedExpression(exp) { - if (isOperationNodeSource(exp)) { - return exp.toOperationNode(); - } - else if (isFunction(exp)) { - return exp(expressionBuilder()).toOperationNode(); - } - throw new Error(`invalid aliased expression: ${JSON.stringify(exp)}`); -} -export function isExpressionOrFactory(obj) { - return isExpression(obj) || isAliasedExpression(obj) || isFunction(obj); -} diff --git a/node_modules/kysely/dist/esm/parser/fetch-parser.d.ts b/node_modules/kysely/dist/esm/parser/fetch-parser.d.ts deleted file mode 100644 index 56ffd6c..0000000 --- a/node_modules/kysely/dist/esm/parser/fetch-parser.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { type FetchModifier, FetchNode } from '../operation-node/fetch-node.js'; -export declare function parseFetch(rowCount: number | bigint, modifier: FetchModifier): FetchNode; diff --git a/node_modules/kysely/dist/esm/parser/fetch-parser.js b/node_modules/kysely/dist/esm/parser/fetch-parser.js deleted file mode 100644 index c0eb618..0000000 --- a/node_modules/kysely/dist/esm/parser/fetch-parser.js +++ /dev/null @@ -1,15 +0,0 @@ -/// -import { FetchNode } from '../operation-node/fetch-node.js'; -import { isBigInt, isNumber } from '../util/object-utils.js'; -export function parseFetch(rowCount, modifier) { - if (!isNumber(rowCount) && !isBigInt(rowCount)) { - throw new Error(`Invalid fetch row count: ${rowCount}`); - } - if (!isFetchModifier(modifier)) { - throw new Error(`Invalid fetch modifier: ${modifier}`); - } - return FetchNode.create(rowCount, modifier); -} -function isFetchModifier(value) { - return value === 'only' || value === 'with ties'; -} diff --git a/node_modules/kysely/dist/esm/parser/group-by-parser.d.ts b/node_modules/kysely/dist/esm/parser/group-by-parser.d.ts deleted file mode 100644 index 807559c..0000000 --- a/node_modules/kysely/dist/esm/parser/group-by-parser.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { GroupByItemNode } from '../operation-node/group-by-item-node.js'; -import { type ExpressionBuilder } from '../expression/expression-builder.js'; -import { type ReferenceExpression } from './reference-parser.js'; -export type GroupByExpression = ReferenceExpression | (keyof O & string); -export type GroupByArg = GroupByExpression | ReadonlyArray> | ((eb: ExpressionBuilder) => ReadonlyArray>); -export declare function parseGroupBy(groupBy: GroupByArg): GroupByItemNode[]; diff --git a/node_modules/kysely/dist/esm/parser/group-by-parser.js b/node_modules/kysely/dist/esm/parser/group-by-parser.js deleted file mode 100644 index 35b7968..0000000 --- a/node_modules/kysely/dist/esm/parser/group-by-parser.js +++ /dev/null @@ -1,9 +0,0 @@ -/// -import { GroupByItemNode } from '../operation-node/group-by-item-node.js'; -import { expressionBuilder, } from '../expression/expression-builder.js'; -import { isFunction } from '../util/object-utils.js'; -import { parseReferenceExpressionOrList, } from './reference-parser.js'; -export function parseGroupBy(groupBy) { - groupBy = isFunction(groupBy) ? groupBy(expressionBuilder()) : groupBy; - return parseReferenceExpressionOrList(groupBy).map(GroupByItemNode.create); -} diff --git a/node_modules/kysely/dist/esm/parser/identifier-parser.d.ts b/node_modules/kysely/dist/esm/parser/identifier-parser.d.ts deleted file mode 100644 index 1ffa667..0000000 --- a/node_modules/kysely/dist/esm/parser/identifier-parser.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { SchemableIdentifierNode } from '../operation-node/schemable-identifier-node.js'; -export declare function parseSchemableIdentifier(id: string): SchemableIdentifierNode; diff --git a/node_modules/kysely/dist/esm/parser/identifier-parser.js b/node_modules/kysely/dist/esm/parser/identifier-parser.js deleted file mode 100644 index 92d1e4e..0000000 --- a/node_modules/kysely/dist/esm/parser/identifier-parser.js +++ /dev/null @@ -1,20 +0,0 @@ -/// -import { SchemableIdentifierNode } from '../operation-node/schemable-identifier-node.js'; -export function parseSchemableIdentifier(id) { - const SCHEMA_SEPARATOR = '.'; - if (id.includes(SCHEMA_SEPARATOR)) { - const parts = id.split(SCHEMA_SEPARATOR).map(trim); - if (parts.length === 2) { - return SchemableIdentifierNode.createWithSchema(parts[0], parts[1]); - } - else { - throw new Error(`invalid schemable identifier ${id}`); - } - } - else { - return SchemableIdentifierNode.create(id); - } -} -function trim(str) { - return str.trim(); -} diff --git a/node_modules/kysely/dist/esm/parser/insert-values-parser.d.ts b/node_modules/kysely/dist/esm/parser/insert-values-parser.d.ts deleted file mode 100644 index f77f26d..0000000 --- a/node_modules/kysely/dist/esm/parser/insert-values-parser.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { ColumnNode } from '../operation-node/column-node.js'; -import { type ValueExpression } from './value-parser.js'; -import { ValuesNode } from '../operation-node/values-node.js'; -import type { NonNullableInsertKeys, NullableInsertKeys, InsertType } from '../util/column-type.js'; -import { type ExpressionBuilder } from '../expression/expression-builder.js'; -export type InsertObject = { - [C in NonNullableInsertKeys]: ValueExpression>; -} & { - [C in NullableInsertKeys]?: ValueExpression> | undefined; -}; -export type InsertObjectOrList = InsertObject | ReadonlyArray>; -export type InsertObjectOrListFactory = (eb: ExpressionBuilder) => InsertObjectOrList; -export type InsertExpression = InsertObjectOrList | InsertObjectOrListFactory; -export declare function parseInsertExpression(arg: InsertExpression): [ReadonlyArray, ValuesNode]; diff --git a/node_modules/kysely/dist/esm/parser/insert-values-parser.js b/node_modules/kysely/dist/esm/parser/insert-values-parser.js deleted file mode 100644 index 5f0d560..0000000 --- a/node_modules/kysely/dist/esm/parser/insert-values-parser.js +++ /dev/null @@ -1,62 +0,0 @@ -/// -import { ColumnNode } from '../operation-node/column-node.js'; -import { PrimitiveValueListNode } from '../operation-node/primitive-value-list-node.js'; -import { ValueListNode } from '../operation-node/value-list-node.js'; -import { freeze, isFunction, isReadonlyArray, isUndefined, } from '../util/object-utils.js'; -import { parseValueExpression } from './value-parser.js'; -import { ValuesNode } from '../operation-node/values-node.js'; -import { isExpressionOrFactory } from './expression-parser.js'; -import { DefaultInsertValueNode } from '../operation-node/default-insert-value-node.js'; -import { expressionBuilder, } from '../expression/expression-builder.js'; -export function parseInsertExpression(arg) { - const objectOrList = isFunction(arg) ? arg(expressionBuilder()) : arg; - const list = isReadonlyArray(objectOrList) - ? objectOrList - : freeze([objectOrList]); - return parseInsertColumnsAndValues(list); -} -function parseInsertColumnsAndValues(rows) { - const columns = parseColumnNamesAndIndexes(rows); - return [ - freeze([...columns.keys()].map(ColumnNode.create)), - ValuesNode.create(rows.map((row) => parseRowValues(row, columns))), - ]; -} -function parseColumnNamesAndIndexes(rows) { - const columns = new Map(); - for (const row of rows) { - const cols = Object.keys(row); - for (const col of cols) { - if (!columns.has(col) && row[col] !== undefined) { - columns.set(col, columns.size); - } - } - } - return columns; -} -function parseRowValues(row, columns) { - const rowColumns = Object.keys(row); - const rowValues = Array.from({ - length: columns.size, - }); - let hasUndefinedOrComplexColumns = false; - let indexedRowColumns = rowColumns.length; - for (const col of rowColumns) { - const columnIdx = columns.get(col); - if (isUndefined(columnIdx)) { - indexedRowColumns--; - continue; - } - const value = row[col]; - if (isUndefined(value) || isExpressionOrFactory(value)) { - hasUndefinedOrComplexColumns = true; - } - rowValues[columnIdx] = value; - } - const hasMissingColumns = indexedRowColumns < columns.size; - if (hasMissingColumns || hasUndefinedOrComplexColumns) { - const defaultValue = DefaultInsertValueNode.create(); - return ValueListNode.create(rowValues.map((it) => isUndefined(it) ? defaultValue : parseValueExpression(it))); - } - return PrimitiveValueListNode.create(rowValues); -} diff --git a/node_modules/kysely/dist/esm/parser/join-parser.d.ts b/node_modules/kysely/dist/esm/parser/join-parser.d.ts deleted file mode 100644 index 8952285..0000000 --- a/node_modules/kysely/dist/esm/parser/join-parser.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { JoinNode, type JoinType } from '../operation-node/join-node.js'; -import type { JoinBuilder } from '../query-builder/join-builder.js'; -import type { AnyColumn, AnyColumnWithTable, DrainOuterGeneric } from '../util/type-utils.js'; -import { type From, type FromTables } from './table-parser.js'; -export type JoinReferenceExpression = DrainOuterGeneric | AnyJoinColumnWithTable>; -export type JoinCallbackExpression = (join: JoinBuilder, FromTables>) => JoinBuilder; -type AnyJoinColumn = AnyColumn, FromTables>; -type AnyJoinColumnWithTable = AnyColumnWithTable, FromTables>; -export declare function parseJoin(joinType: JoinType, args: any[]): JoinNode; -export {}; diff --git a/node_modules/kysely/dist/esm/parser/join-parser.js b/node_modules/kysely/dist/esm/parser/join-parser.js deleted file mode 100644 index 334bc21..0000000 --- a/node_modules/kysely/dist/esm/parser/join-parser.js +++ /dev/null @@ -1,28 +0,0 @@ -/// -import { JoinNode } from '../operation-node/join-node.js'; -import { parseReferentialBinaryOperation } from './binary-operation-parser.js'; -import { createJoinBuilder } from './parse-utils.js'; -import { parseTableExpression, } from './table-parser.js'; -export function parseJoin(joinType, args) { - if (args.length === 3) { - return parseSingleOnJoin(joinType, args[0], args[1], args[2]); - } - else if (args.length === 2) { - return parseCallbackJoin(joinType, args[0], args[1]); - } - else if (args.length === 1) { - return parseOnlessJoin(joinType, args[0]); - } - else { - throw new Error('not implemented'); - } -} -function parseCallbackJoin(joinType, from, callback) { - return callback(createJoinBuilder(joinType, from)).toOperationNode(); -} -function parseSingleOnJoin(joinType, from, lhsColumn, rhsColumn) { - return JoinNode.createWithOn(joinType, parseTableExpression(from), parseReferentialBinaryOperation(lhsColumn, '=', rhsColumn)); -} -function parseOnlessJoin(joinType, from) { - return JoinNode.create(joinType, parseTableExpression(from)); -} diff --git a/node_modules/kysely/dist/esm/parser/merge-into-parser.d.ts b/node_modules/kysely/dist/esm/parser/merge-into-parser.d.ts deleted file mode 100644 index 9a7ea48..0000000 --- a/node_modules/kysely/dist/esm/parser/merge-into-parser.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { MergeQueryBuilder } from '../query-builder/merge-query-builder.js'; -import type { MergeResult } from '../query-builder/merge-result.js'; -import type { ShallowRecord } from '../util/type-utils.js'; -import type { ExtractTableAlias, SimpleTableReference } from './table-parser.js'; -export type MergeInto> = [TE] extends [ - keyof DB -] ? MergeQueryBuilder, MergeResult> : [TE] extends [`${infer T} as ${infer A}`] ? T extends keyof DB ? MergeQueryBuilder, A, MergeResult> : never : never; diff --git a/node_modules/kysely/dist/esm/parser/merge-into-parser.js b/node_modules/kysely/dist/esm/parser/merge-into-parser.js deleted file mode 100644 index 3f1e855..0000000 --- a/node_modules/kysely/dist/esm/parser/merge-into-parser.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/parser/merge-parser.d.ts b/node_modules/kysely/dist/esm/parser/merge-parser.d.ts deleted file mode 100644 index 7675d7b..0000000 --- a/node_modules/kysely/dist/esm/parser/merge-parser.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { InsertQueryNode } from '../operation-node/insert-query-node.js'; -import { type OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -import { WhenNode } from '../operation-node/when-node.js'; -export declare function parseMergeWhen(type: { - isMatched: boolean; - bySource?: boolean; -}, args?: any[], refRight?: boolean): WhenNode; -export declare function parseMergeThen(result: 'delete' | 'do nothing' | OperationNodeSource | InsertQueryNode): OperationNode; diff --git a/node_modules/kysely/dist/esm/parser/merge-parser.js b/node_modules/kysely/dist/esm/parser/merge-parser.js deleted file mode 100644 index f595a2b..0000000 --- a/node_modules/kysely/dist/esm/parser/merge-parser.js +++ /dev/null @@ -1,28 +0,0 @@ -/// -import { MatchedNode } from '../operation-node/matched-node.js'; -import { isOperationNodeSource, } from '../operation-node/operation-node-source.js'; -import { RawNode } from '../operation-node/raw-node.js'; -import { WhenNode } from '../operation-node/when-node.js'; -import { isString } from '../util/object-utils.js'; -import { parseFilterList, parseReferentialBinaryOperation, parseValueBinaryOperationOrExpression, } from './binary-operation-parser.js'; -export function parseMergeWhen(type, args, refRight) { - return WhenNode.create(parseFilterList([ - MatchedNode.create(!type.isMatched, type.bySource), - ...(args && args.length > 0 - ? [ - args.length === 3 && refRight - ? parseReferentialBinaryOperation(args[0], args[1], args[2]) - : parseValueBinaryOperationOrExpression(args), - ] - : []), - ], 'and', false)); -} -export function parseMergeThen(result) { - if (isString(result)) { - return RawNode.create([result], []); - } - if (isOperationNodeSource(result)) { - return result.toOperationNode(); - } - return result; -} diff --git a/node_modules/kysely/dist/esm/parser/on-commit-action-parse.d.ts b/node_modules/kysely/dist/esm/parser/on-commit-action-parse.d.ts deleted file mode 100644 index bb90d1b..0000000 --- a/node_modules/kysely/dist/esm/parser/on-commit-action-parse.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { type OnCommitAction } from '../operation-node/create-table-node.js'; -export declare function parseOnCommitAction(action: OnCommitAction): OnCommitAction; diff --git a/node_modules/kysely/dist/esm/parser/on-commit-action-parse.js b/node_modules/kysely/dist/esm/parser/on-commit-action-parse.js deleted file mode 100644 index 0497874..0000000 --- a/node_modules/kysely/dist/esm/parser/on-commit-action-parse.js +++ /dev/null @@ -1,8 +0,0 @@ -/// -import { ON_COMMIT_ACTIONS, } from '../operation-node/create-table-node.js'; -export function parseOnCommitAction(action) { - if (ON_COMMIT_ACTIONS.includes(action)) { - return action; - } - throw new Error(`invalid OnCommitAction ${action}`); -} diff --git a/node_modules/kysely/dist/esm/parser/on-modify-action-parser.d.ts b/node_modules/kysely/dist/esm/parser/on-modify-action-parser.d.ts deleted file mode 100644 index 7a7e0f0..0000000 --- a/node_modules/kysely/dist/esm/parser/on-modify-action-parser.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { type OnModifyForeignAction } from '../operation-node/references-node.js'; -export declare function parseOnModifyForeignAction(action: OnModifyForeignAction): OnModifyForeignAction; diff --git a/node_modules/kysely/dist/esm/parser/on-modify-action-parser.js b/node_modules/kysely/dist/esm/parser/on-modify-action-parser.js deleted file mode 100644 index 6bccd0b..0000000 --- a/node_modules/kysely/dist/esm/parser/on-modify-action-parser.js +++ /dev/null @@ -1,8 +0,0 @@ -/// -import { ON_MODIFY_FOREIGN_ACTIONS, } from '../operation-node/references-node.js'; -export function parseOnModifyForeignAction(action) { - if (ON_MODIFY_FOREIGN_ACTIONS.includes(action)) { - return action; - } - throw new Error(`invalid OnModifyForeignAction ${action}`); -} diff --git a/node_modules/kysely/dist/esm/parser/order-by-parser.d.ts b/node_modules/kysely/dist/esm/parser/order-by-parser.d.ts deleted file mode 100644 index 5c5498d..0000000 --- a/node_modules/kysely/dist/esm/parser/order-by-parser.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { type DynamicReferenceBuilder } from '../dynamic/dynamic-reference-builder.js'; -import { type Expression } from '../expression/expression.js'; -import { OrderByItemNode } from '../operation-node/order-by-item-node.js'; -import { OrderByItemBuilder } from '../query-builder/order-by-item-builder.js'; -import { type ExpressionOrFactory } from './expression-parser.js'; -import { type ReferenceExpression, type StringReference } from './reference-parser.js'; -export type OrderByExpression = StringReference | (keyof O & string) | ExpressionOrFactory | DynamicReferenceBuilder; -export type OrderByModifiers = OrderByDirection | OrderByModifiersCallbackExpression; -export type OrderByDirection = 'asc' | 'desc'; -export declare function isOrderByDirection(thing: unknown): thing is OrderByDirection; -export type OrderByModifiersCallbackExpression = (builder: OrderByItemBuilder) => OrderByItemBuilder; -/** - * @deprecated performance reasons, use {@link OrderByExpression} instead. - */ -export type DirectedOrderByStringReference = `${StringReference | (keyof O & string)} ${OrderByDirection}`; -/** - * @deprecated replaced with {@link OrderByModifiers} - */ -export type OrderByDirectionExpression = OrderByDirection | Expression; -/** - * @deprecated use {@link OrderByExpression} instead. - */ -export type UndirectedOrderByExpression = ReferenceExpression | (keyof O & string); -export declare function parseOrderBy(args: any[]): OrderByItemNode[]; -export declare function parseOrderByItem(expr: OrderByExpression, modifiers?: OrderByModifiers): OrderByItemNode; diff --git a/node_modules/kysely/dist/esm/parser/order-by-parser.js b/node_modules/kysely/dist/esm/parser/order-by-parser.js deleted file mode 100644 index fc00d66..0000000 --- a/node_modules/kysely/dist/esm/parser/order-by-parser.js +++ /dev/null @@ -1,67 +0,0 @@ -/// -import { isDynamicReferenceBuilder, } from '../dynamic/dynamic-reference-builder.js'; -import { isExpression } from '../expression/expression.js'; -import { OrderByItemNode } from '../operation-node/order-by-item-node.js'; -import { RawNode } from '../operation-node/raw-node.js'; -import { OrderByItemBuilder } from '../query-builder/order-by-item-builder.js'; -import { logOnce } from '../util/log-once.js'; -import { isExpressionOrFactory, parseExpression, } from './expression-parser.js'; -import { parseStringReference, } from './reference-parser.js'; -export function isOrderByDirection(thing) { - return thing === 'asc' || thing === 'desc'; -} -export function parseOrderBy(args) { - if (args.length === 2) { - return [parseOrderByItem(args[0], args[1])]; - } - if (args.length === 1) { - const [orderBy] = args; - if (Array.isArray(orderBy)) { - logOnce('orderBy(array) is deprecated, use multiple orderBy calls instead.'); - return orderBy.map((item) => parseOrderByItem(item)); - } - return [parseOrderByItem(orderBy)]; - } - throw new Error(`Invalid number of arguments at order by! expected 1-2, received ${args.length}`); -} -export function parseOrderByItem(expr, modifiers) { - const parsedRef = parseOrderByExpression(expr); - if (OrderByItemNode.is(parsedRef)) { - if (modifiers) { - throw new Error('Cannot specify direction twice!'); - } - return parsedRef; - } - return parseOrderByWithModifiers(parsedRef, modifiers); -} -function parseOrderByExpression(expr) { - if (isExpressionOrFactory(expr)) { - return parseExpression(expr); - } - if (isDynamicReferenceBuilder(expr)) { - return expr.toOperationNode(); - } - const [ref, direction] = expr.split(' '); - if (direction) { - logOnce("`orderBy('column asc')` is deprecated. Use `orderBy('column', 'asc')` instead."); - return parseOrderByWithModifiers(parseStringReference(ref), direction); - } - return parseStringReference(expr); -} -function parseOrderByWithModifiers(expr, modifiers) { - if (typeof modifiers === 'string') { - if (!isOrderByDirection(modifiers)) { - throw new Error(`Invalid order by direction: ${modifiers}`); - } - return OrderByItemNode.create(expr, RawNode.createWithSql(modifiers)); - } - if (isExpression(modifiers)) { - logOnce("`orderBy(..., expr)` is deprecated. Use `orderBy(..., 'asc')` or `orderBy(..., (ob) => ...)` instead."); - return OrderByItemNode.create(expr, modifiers.toOperationNode()); - } - const node = OrderByItemNode.create(expr); - if (!modifiers) { - return node; - } - return modifiers(new OrderByItemBuilder({ node })).toOperationNode(); -} diff --git a/node_modules/kysely/dist/esm/parser/parse-utils.d.ts b/node_modules/kysely/dist/esm/parser/parse-utils.d.ts deleted file mode 100644 index 96cb9cc..0000000 --- a/node_modules/kysely/dist/esm/parser/parse-utils.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { type JoinType } from '../operation-node/join-node.js'; -import { JoinBuilder } from '../query-builder/join-builder.js'; -import { OverBuilder } from '../query-builder/over-builder.js'; -import { type SelectQueryBuilder } from '../query-builder/select-query-builder.js'; -import { QueryCreator } from '../query-creator.js'; -import { type TableExpression } from './table-parser.js'; -export declare function createSelectQueryBuilder(): SelectQueryBuilder; -export declare function createQueryCreator(): QueryCreator; -export declare function createJoinBuilder(joinType: JoinType, table: TableExpression): JoinBuilder; -export declare function createOverBuilder(): OverBuilder; diff --git a/node_modules/kysely/dist/esm/parser/parse-utils.js b/node_modules/kysely/dist/esm/parser/parse-utils.js deleted file mode 100644 index aaf8725..0000000 --- a/node_modules/kysely/dist/esm/parser/parse-utils.js +++ /dev/null @@ -1,33 +0,0 @@ -/// -import { JoinNode } from '../operation-node/join-node.js'; -import { OverNode } from '../operation-node/over-node.js'; -import { SelectQueryNode } from '../operation-node/select-query-node.js'; -import { JoinBuilder } from '../query-builder/join-builder.js'; -import { OverBuilder } from '../query-builder/over-builder.js'; -import { createSelectQueryBuilder as newSelectQueryBuilder, } from '../query-builder/select-query-builder.js'; -import { QueryCreator } from '../query-creator.js'; -import { NOOP_QUERY_EXECUTOR } from '../query-executor/noop-query-executor.js'; -import { createQueryId } from '../util/query-id.js'; -import { parseTableExpression, parseTableExpressionOrList, } from './table-parser.js'; -export function createSelectQueryBuilder() { - return newSelectQueryBuilder({ - queryId: createQueryId(), - executor: NOOP_QUERY_EXECUTOR, - queryNode: SelectQueryNode.createFrom(parseTableExpressionOrList([])), - }); -} -export function createQueryCreator() { - return new QueryCreator({ - executor: NOOP_QUERY_EXECUTOR, - }); -} -export function createJoinBuilder(joinType, table) { - return new JoinBuilder({ - joinNode: JoinNode.create(joinType, parseTableExpression(table)), - }); -} -export function createOverBuilder() { - return new OverBuilder({ - overNode: OverNode.create(), - }); -} diff --git a/node_modules/kysely/dist/esm/parser/partition-by-parser.d.ts b/node_modules/kysely/dist/esm/parser/partition-by-parser.d.ts deleted file mode 100644 index 38a4e2d..0000000 --- a/node_modules/kysely/dist/esm/parser/partition-by-parser.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { DynamicReferenceBuilder } from '../dynamic/dynamic-reference-builder.js'; -import { PartitionByItemNode } from '../operation-node/partition-by-item-node.js'; -import { type StringReference } from './reference-parser.js'; -export type PartitionByExpression = StringReference | DynamicReferenceBuilder; -export type PartitionByExpressionOrList = ReadonlyArray> | PartitionByExpression; -export declare function parsePartitionBy(partitionBy: PartitionByExpressionOrList): PartitionByItemNode[]; diff --git a/node_modules/kysely/dist/esm/parser/partition-by-parser.js b/node_modules/kysely/dist/esm/parser/partition-by-parser.js deleted file mode 100644 index 755b647..0000000 --- a/node_modules/kysely/dist/esm/parser/partition-by-parser.js +++ /dev/null @@ -1,6 +0,0 @@ -/// -import { PartitionByItemNode } from '../operation-node/partition-by-item-node.js'; -import { parseReferenceExpressionOrList, } from './reference-parser.js'; -export function parsePartitionBy(partitionBy) { - return parseReferenceExpressionOrList(partitionBy).map(PartitionByItemNode.create); -} diff --git a/node_modules/kysely/dist/esm/parser/reference-parser.d.ts b/node_modules/kysely/dist/esm/parser/reference-parser.d.ts deleted file mode 100644 index 896803b..0000000 --- a/node_modules/kysely/dist/esm/parser/reference-parser.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { AliasNode } from '../operation-node/alias-node.js'; -import { ColumnNode } from '../operation-node/column-node.js'; -import { ReferenceNode } from '../operation-node/reference-node.js'; -import type { AnyColumn, AnyColumnWithTable, ExtractColumnType } from '../util/type-utils.js'; -import type { SelectQueryBuilderExpression } from '../query-builder/select-query-builder-expression.js'; -import { type ExpressionOrFactory } from './expression-parser.js'; -import type { DynamicReferenceBuilder } from '../dynamic/dynamic-reference-builder.js'; -import type { SelectType } from '../util/column-type.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -import type { Expression } from '../expression/expression.js'; -import type { SimpleReferenceExpressionNode } from '../operation-node/simple-reference-expression-node.js'; -import { type OrderByDirection } from './order-by-parser.js'; -import { type JSONOperatorWith$ } from '../operation-node/operator-node.js'; -import { JSONReferenceNode } from '../operation-node/json-reference-node.js'; -export type StringReference = AnyColumn | AnyColumnWithTable; -export type SimpleReferenceExpression = StringReference | DynamicReferenceBuilder; -export type ReferenceExpression = SimpleReferenceExpression | ExpressionOrFactory; -export type ReferenceExpressionOrList = ReferenceExpression | ReadonlyArray>; -export type ExtractTypeFromReferenceExpression = SelectType>; -export type ExtractRawTypeFromReferenceExpression = RE extends string ? ExtractTypeFromStringReference : RE extends SelectQueryBuilderExpression ? O[keyof O] | null : RE extends (qb: any) => SelectQueryBuilderExpression ? O[keyof O] | null : RE extends Expression ? O : RE extends (qb: any) => Expression ? O : DV; -export type ExtractTypeFromStringReference = RE extends `${infer SC}.${infer T}.${infer C}` ? `${SC}.${T}` extends TB ? C extends keyof DB[`${SC}.${T}`] ? DB[`${SC}.${T}`][C] : never : never : RE extends `${infer T}.${infer C}` ? T extends TB ? C extends keyof DB[T] ? DB[T][C] : never : never : RE extends AnyColumn ? ExtractColumnType : DV; -export type OrderedColumnName = C extends `${string} ${infer O}` ? O extends OrderByDirection ? C : never : C; -export type ExtractColumnNameFromOrderedColumnName = C extends `${infer CL} ${infer O}` ? O extends OrderByDirection ? CL : never : C; -export declare function parseSimpleReferenceExpression(exp: SimpleReferenceExpression): SimpleReferenceExpressionNode; -export declare function parseReferenceExpressionOrList(arg: ReferenceExpressionOrList): OperationNode[]; -export declare function parseReferenceExpression(exp: ReferenceExpression): OperationNode; -export declare function parseJSONReference(ref: string, op: JSONOperatorWith$): JSONReferenceNode; -export declare function parseStringReference(ref: string): ReferenceNode; -export declare function parseAliasedStringReference(ref: string): SimpleReferenceExpressionNode | AliasNode; -export declare function parseColumnName(column: AnyColumn): ColumnNode; -export declare function parseOrderedColumnName(column: string): OperationNode; diff --git a/node_modules/kysely/dist/esm/parser/reference-parser.js b/node_modules/kysely/dist/esm/parser/reference-parser.js deleted file mode 100644 index cdfc9d6..0000000 --- a/node_modules/kysely/dist/esm/parser/reference-parser.js +++ /dev/null @@ -1,95 +0,0 @@ -/// -import { AliasNode } from '../operation-node/alias-node.js'; -import { ColumnNode } from '../operation-node/column-node.js'; -import { ReferenceNode } from '../operation-node/reference-node.js'; -import { TableNode } from '../operation-node/table-node.js'; -import { isReadonlyArray, isString } from '../util/object-utils.js'; -import { parseExpression, isExpressionOrFactory, } from './expression-parser.js'; -import { IdentifierNode } from '../operation-node/identifier-node.js'; -import { isOrderByDirection, parseOrderBy, } from './order-by-parser.js'; -import { OperatorNode, isJSONOperator, } from '../operation-node/operator-node.js'; -import { JSONReferenceNode } from '../operation-node/json-reference-node.js'; -import { JSONOperatorChainNode } from '../operation-node/json-operator-chain-node.js'; -import { JSONPathNode } from '../operation-node/json-path-node.js'; -export function parseSimpleReferenceExpression(exp) { - if (isString(exp)) { - return parseStringReference(exp); - } - return exp.toOperationNode(); -} -export function parseReferenceExpressionOrList(arg) { - if (isReadonlyArray(arg)) { - return arg.map((it) => parseReferenceExpression(it)); - } - else { - return [parseReferenceExpression(arg)]; - } -} -export function parseReferenceExpression(exp) { - if (isExpressionOrFactory(exp)) { - return parseExpression(exp); - } - return parseSimpleReferenceExpression(exp); -} -export function parseJSONReference(ref, op) { - const referenceNode = parseStringReference(ref); - if (isJSONOperator(op)) { - return JSONReferenceNode.create(referenceNode, JSONOperatorChainNode.create(OperatorNode.create(op))); - } - const opWithoutLastChar = op.slice(0, -1); - if (isJSONOperator(opWithoutLastChar)) { - return JSONReferenceNode.create(referenceNode, JSONPathNode.create(OperatorNode.create(opWithoutLastChar))); - } - throw new Error(`Invalid JSON operator: ${op}`); -} -export function parseStringReference(ref) { - const COLUMN_SEPARATOR = '.'; - if (!ref.includes(COLUMN_SEPARATOR)) { - return ReferenceNode.create(ColumnNode.create(ref)); - } - const parts = ref.split(COLUMN_SEPARATOR).map(trim); - if (parts.length === 3) { - return parseStringReferenceWithTableAndSchema(parts); - } - if (parts.length === 2) { - return parseStringReferenceWithTable(parts); - } - throw new Error(`invalid column reference ${ref}`); -} -export function parseAliasedStringReference(ref) { - const ALIAS_SEPARATOR = ' as '; - if (ref.includes(ALIAS_SEPARATOR)) { - const [columnRef, alias] = ref.split(ALIAS_SEPARATOR).map(trim); - return AliasNode.create(parseStringReference(columnRef), IdentifierNode.create(alias)); - } - else { - return parseStringReference(ref); - } -} -export function parseColumnName(column) { - return ColumnNode.create(column); -} -export function parseOrderedColumnName(column) { - const ORDER_SEPARATOR = ' '; - if (column.includes(ORDER_SEPARATOR)) { - const [columnName, order] = column.split(ORDER_SEPARATOR).map(trim); - if (!isOrderByDirection(order)) { - throw new Error(`invalid order direction "${order}" next to "${columnName}"`); - } - return parseOrderBy([columnName, order])[0]; - } - else { - return parseColumnName(column); - } -} -function parseStringReferenceWithTableAndSchema(parts) { - const [schema, table, column] = parts; - return ReferenceNode.create(ColumnNode.create(column), TableNode.createWithSchema(schema, table)); -} -function parseStringReferenceWithTable(parts) { - const [table, column] = parts; - return ReferenceNode.create(ColumnNode.create(column), TableNode.create(table)); -} -function trim(str) { - return str.trim(); -} diff --git a/node_modules/kysely/dist/esm/parser/returning-parser.d.ts b/node_modules/kysely/dist/esm/parser/returning-parser.d.ts deleted file mode 100644 index 49bfe53..0000000 --- a/node_modules/kysely/dist/esm/parser/returning-parser.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { DeleteResult } from '../query-builder/delete-result.js'; -import type { InsertResult } from '../query-builder/insert-result.js'; -import type { MergeResult } from '../query-builder/merge-result.js'; -import type { UpdateResult } from '../query-builder/update-result.js'; -import type { Selection, AllSelection, CallbackSelection } from './select-parser.js'; -export type ReturningRow = O extends InsertResult | DeleteResult | UpdateResult | MergeResult ? Selection : O & Selection; -export type ReturningCallbackRow = O extends InsertResult | DeleteResult | UpdateResult | MergeResult ? CallbackSelection : O & CallbackSelection; -export type ReturningAllRow = O extends InsertResult | DeleteResult | UpdateResult | MergeResult ? AllSelection : O & AllSelection; diff --git a/node_modules/kysely/dist/esm/parser/returning-parser.js b/node_modules/kysely/dist/esm/parser/returning-parser.js deleted file mode 100644 index 8865865..0000000 --- a/node_modules/kysely/dist/esm/parser/returning-parser.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/parser/savepoint-parser.d.ts b/node_modules/kysely/dist/esm/parser/savepoint-parser.d.ts deleted file mode 100644 index 6064e74..0000000 --- a/node_modules/kysely/dist/esm/parser/savepoint-parser.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { RawNode } from '../operation-node/raw-node.js'; -export type RollbackToSavepoint = S extends [...infer L, infer R] ? R extends SN ? S : RollbackToSavepoint : never; -export type ReleaseSavepoint = S extends [...infer L, infer R] ? R extends SN ? L : ReleaseSavepoint : never; -export declare function parseSavepointCommand(command: string, savepointName: string): RawNode; diff --git a/node_modules/kysely/dist/esm/parser/savepoint-parser.js b/node_modules/kysely/dist/esm/parser/savepoint-parser.js deleted file mode 100644 index f876456..0000000 --- a/node_modules/kysely/dist/esm/parser/savepoint-parser.js +++ /dev/null @@ -1,9 +0,0 @@ -/// -import { IdentifierNode } from '../operation-node/identifier-node.js'; -import { RawNode } from '../operation-node/raw-node.js'; -export function parseSavepointCommand(command, savepointName) { - return RawNode.createWithChildren([ - RawNode.createWithSql(`${command} `), - IdentifierNode.create(savepointName), // ensures savepointName gets sanitized - ]); -} diff --git a/node_modules/kysely/dist/esm/parser/select-from-parser.d.ts b/node_modules/kysely/dist/esm/parser/select-from-parser.d.ts deleted file mode 100644 index 130de4e..0000000 --- a/node_modules/kysely/dist/esm/parser/select-from-parser.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { SelectQueryBuilder } from '../query-builder/select-query-builder.js'; -import type { ShallowRecord } from '../util/type-utils.js'; -import type { ExtractTableAlias, From, FromTables, TableExpressionOrList } from './table-parser.js'; -export type SelectFrom> = [TE] extends [keyof DB] ? SelectQueryBuilder, {}> : [ - TE -] extends [`${infer T} as ${infer A}`] ? T extends keyof DB ? SelectQueryBuilder, TB | A, {}> : never : TE extends ReadonlyArray ? SelectQueryBuilder, FromTables, {}> : SelectQueryBuilder, FromTables, {}>; diff --git a/node_modules/kysely/dist/esm/parser/select-from-parser.js b/node_modules/kysely/dist/esm/parser/select-from-parser.js deleted file mode 100644 index 7e56ad3..0000000 --- a/node_modules/kysely/dist/esm/parser/select-from-parser.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/parser/select-parser.d.ts b/node_modules/kysely/dist/esm/parser/select-parser.d.ts deleted file mode 100644 index 16a407a..0000000 --- a/node_modules/kysely/dist/esm/parser/select-parser.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import type { AliasedSelectQueryBuilder } from '../query-builder/select-query-builder.js'; -import { SelectionNode } from '../operation-node/selection-node.js'; -import type { AnyAliasedColumn, AnyAliasedColumnWithTable, AnyColumn, AnyColumnWithTable, DrainOuterGeneric, ExtractColumnType } from '../util/type-utils.js'; -import { type DynamicReferenceBuilder } from '../dynamic/dynamic-reference-builder.js'; -import { type AliasedExpressionOrFactory } from './expression-parser.js'; -import type { SelectType } from '../util/column-type.js'; -import type { AliasedExpression } from '../expression/expression.js'; -import { type ExpressionBuilder } from '../expression/expression-builder.js'; -export type SelectExpression = AnyAliasedColumnWithTable | AnyAliasedColumn | AnyColumnWithTable | AnyColumn | DynamicReferenceBuilder | AliasedExpressionOrFactory; -export type SelectCallback = (eb: ExpressionBuilder) => ReadonlyArray>; -/** - * Turns a SelectExpression or a union of them into a selection object. - */ -export type Selection = [DB] extends [unknown] ? { - [E in FlattenSelectExpression as ExtractAliasFromSelectExpression]: SelectType>; -} : {}; -/** - * Turns a SelectCallback into a selection object. - */ -export type CallbackSelection = CB extends (eb: any) => ReadonlyArray ? Selection : never; -export type SelectArg> = SE | ReadonlyArray | ((eb: ExpressionBuilder) => ReadonlyArray); -type FlattenSelectExpression = SE extends DynamicReferenceBuilder ? { - [R in RA]: DynamicReferenceBuilder; -}[RA] : SE; -type ExtractAliasFromSelectExpression = SE extends string ? ExtractAliasFromStringSelectExpression : SE extends AliasedExpression ? EA : SE extends (qb: any) => AliasedExpression ? EA : SE extends DynamicReferenceBuilder ? ExtractAliasFromStringSelectExpression : never; -type ExtractAliasFromStringSelectExpression = SE extends `${string}.${string}.${string} as ${infer A}` ? A : SE extends `${string}.${string} as ${infer A}` ? A : SE extends `${string} as ${infer A}` ? A : SE extends `${string}.${string}.${infer C}` ? C : SE extends `${string}.${infer C}` ? C : SE; -type ExtractTypeFromSelectExpression = SE extends string ? ExtractTypeFromStringSelectExpression : SE extends AliasedSelectQueryBuilder ? O[keyof O] | null : SE extends (eb: any) => AliasedSelectQueryBuilder ? O[keyof O] | null : SE extends AliasedExpression ? O : SE extends (eb: any) => AliasedExpression ? O : SE extends DynamicReferenceBuilder ? ExtractTypeFromStringSelectExpression | undefined : never; -type ExtractTypeFromStringSelectExpression = SE extends `${infer SC}.${infer T}.${infer C} as ${string}` ? `${SC}.${T}` extends TB ? C extends keyof DB[`${SC}.${T}`] ? DB[`${SC}.${T}`][C] : never : never : SE extends `${infer T}.${infer C} as ${string}` ? T extends TB ? C extends keyof DB[T] ? DB[T][C] : never : never : SE extends `${infer C} as ${string}` ? C extends AnyColumn ? ExtractColumnType : never : SE extends `${infer SC}.${infer T}.${infer C}` ? `${SC}.${T}` extends TB ? C extends keyof DB[`${SC}.${T}`] ? DB[`${SC}.${T}`][C] : never : never : SE extends `${infer T}.${infer C}` ? T extends TB ? C extends keyof DB[T] ? DB[T][C] : never : never : SE extends AnyColumn ? ExtractColumnType : never; -export type AllSelection = DrainOuterGeneric<{ - [C in AnyColumn]: { - [T in TB]: SelectType; - }[TB]; -}>; -export declare function parseSelectArg(selection: SelectArg>): SelectionNode[]; -export declare function parseSelectAll(table?: string | string[]): SelectionNode[]; -export {}; diff --git a/node_modules/kysely/dist/esm/parser/select-parser.js b/node_modules/kysely/dist/esm/parser/select-parser.js deleted file mode 100644 index 1b0c84c..0000000 --- a/node_modules/kysely/dist/esm/parser/select-parser.js +++ /dev/null @@ -1,47 +0,0 @@ -/// -import { isFunction, isReadonlyArray, isString } from '../util/object-utils.js'; -import { SelectionNode } from '../operation-node/selection-node.js'; -import { parseAliasedStringReference } from './reference-parser.js'; -import { isDynamicReferenceBuilder, } from '../dynamic/dynamic-reference-builder.js'; -import { parseAliasedExpression, } from './expression-parser.js'; -import { parseTable } from './table-parser.js'; -import { expressionBuilder, } from '../expression/expression-builder.js'; -export function parseSelectArg(selection) { - if (isFunction(selection)) { - return parseSelectArg(selection(expressionBuilder())); - } - else if (isReadonlyArray(selection)) { - return selection.map((it) => parseSelectExpression(it)); - } - else { - return [parseSelectExpression(selection)]; - } -} -function parseSelectExpression(selection) { - if (isString(selection)) { - return SelectionNode.create(parseAliasedStringReference(selection)); - } - else if (isDynamicReferenceBuilder(selection)) { - return SelectionNode.create(selection.toOperationNode()); - } - else { - return SelectionNode.create(parseAliasedExpression(selection)); - } -} -export function parseSelectAll(table) { - if (!table) { - return [SelectionNode.createSelectAll()]; - } - else if (Array.isArray(table)) { - return table.map(parseSelectAllArg); - } - else { - return [parseSelectAllArg(table)]; - } -} -function parseSelectAllArg(table) { - if (isString(table)) { - return SelectionNode.createSelectAllFromTable(parseTable(table)); - } - throw new Error(`invalid value selectAll expression: ${JSON.stringify(table)}`); -} diff --git a/node_modules/kysely/dist/esm/parser/set-operation-parser.d.ts b/node_modules/kysely/dist/esm/parser/set-operation-parser.d.ts deleted file mode 100644 index cdb3d72..0000000 --- a/node_modules/kysely/dist/esm/parser/set-operation-parser.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { type ExpressionBuilder } from '../expression/expression-builder.js'; -import type { Expression } from '../expression/expression.js'; -import { type SetOperator, SetOperationNode } from '../operation-node/set-operation-node.js'; -export type SetOperandExpression = Expression | ReadonlyArray> | ((eb: ExpressionBuilder) => Expression | ReadonlyArray>); -export declare function parseSetOperations(operator: SetOperator, expression: SetOperandExpression, all: boolean): Readonly[]; diff --git a/node_modules/kysely/dist/esm/parser/set-operation-parser.js b/node_modules/kysely/dist/esm/parser/set-operation-parser.js deleted file mode 100644 index 3058136..0000000 --- a/node_modules/kysely/dist/esm/parser/set-operation-parser.js +++ /dev/null @@ -1,14 +0,0 @@ -/// -import { createExpressionBuilder, } from '../expression/expression-builder.js'; -import { SetOperationNode, } from '../operation-node/set-operation-node.js'; -import { isFunction, isReadonlyArray } from '../util/object-utils.js'; -import { parseExpression } from './expression-parser.js'; -export function parseSetOperations(operator, expression, all) { - if (isFunction(expression)) { - expression = expression(createExpressionBuilder()); - } - if (!isReadonlyArray(expression)) { - expression = [expression]; - } - return expression.map((expr) => SetOperationNode.create(operator, parseExpression(expr), all)); -} diff --git a/node_modules/kysely/dist/esm/parser/table-parser.d.ts b/node_modules/kysely/dist/esm/parser/table-parser.d.ts deleted file mode 100644 index ccfd057..0000000 --- a/node_modules/kysely/dist/esm/parser/table-parser.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { AliasNode } from '../operation-node/alias-node.js'; -import { TableNode } from '../operation-node/table-node.js'; -import { type AliasedExpressionOrFactory } from './expression-parser.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -import type { AliasedExpression } from '../expression/expression.js'; -import type { DrainOuterGeneric } from '../util/type-utils.js'; -import { type AliasedDynamicTableBuilder } from '../dynamic/dynamic-table-builder.js'; -export type TableExpression = AnyAliasedTable | AnyTable | AliasedExpressionOrFactory | AliasedDynamicTableBuilder; -export type TableExpressionOrList = TableExpression | ReadonlyArray>; -export type SimpleTableReference = AnyAliasedTable | AnyTable; -export type AnyAliasedTable = `${AnyTable} as ${string}`; -export type AnyTable = keyof DB & string; -export type From = DrainOuterGeneric<{ - [C in keyof DB | ExtractAliasFromTableExpression]: C extends ExtractAliasFromTableExpression ? ExtractRowTypeFromTableExpression : C extends keyof DB ? DB[C] : never; -}>; -export type FromTables = DrainOuterGeneric>; -export type ExtractTableAlias = TE extends `${string} as ${infer TA}` ? TA extends keyof DB ? TA : never : TE extends keyof DB ? TE : never; -type ExtractAliasFromTableExpression = TE extends string ? TE extends `${string} as ${infer TA}` ? TA : TE extends keyof DB ? TE : never : TE extends AliasedExpression ? QA : TE extends (qb: any) => AliasedExpression ? QA : TE extends AliasedDynamicTableBuilder ? DA : never; -type ExtractRowTypeFromTableExpression = TE extends `${infer T} as ${infer TA}` ? TA extends A ? T extends keyof DB ? DB[T] : never : never : TE extends A ? TE extends keyof DB ? DB[TE] : never : TE extends AliasedExpression ? QA extends A ? O : never : TE extends (qb: any) => AliasedExpression ? QA extends A ? O : never : TE extends AliasedDynamicTableBuilder ? DA extends A ? T extends keyof DB ? DB[T] : never : never : never; -export declare function parseTableExpressionOrList(table: TableExpressionOrList): OperationNode[]; -export declare function parseTableExpression(table: TableExpression): OperationNode; -export declare function parseAliasedTable(from: string): TableNode | AliasNode; -export declare function parseTable(from: string): TableNode; -export {}; diff --git a/node_modules/kysely/dist/esm/parser/table-parser.js b/node_modules/kysely/dist/esm/parser/table-parser.js deleted file mode 100644 index 6cb4872..0000000 --- a/node_modules/kysely/dist/esm/parser/table-parser.js +++ /dev/null @@ -1,49 +0,0 @@ -/// -import { isReadonlyArray, isString } from '../util/object-utils.js'; -import { AliasNode } from '../operation-node/alias-node.js'; -import { TableNode } from '../operation-node/table-node.js'; -import { parseAliasedExpression, } from './expression-parser.js'; -import { IdentifierNode } from '../operation-node/identifier-node.js'; -import { isAliasedDynamicTableBuilder, } from '../dynamic/dynamic-table-builder.js'; -export function parseTableExpressionOrList(table) { - if (isReadonlyArray(table)) { - return table.map((it) => parseTableExpression(it)); - } - else { - return [parseTableExpression(table)]; - } -} -export function parseTableExpression(table) { - if (isString(table)) { - return parseAliasedTable(table); - } - else if (isAliasedDynamicTableBuilder(table)) { - return table.toOperationNode(); - } - else { - return parseAliasedExpression(table); - } -} -export function parseAliasedTable(from) { - const ALIAS_SEPARATOR = ' as '; - if (from.includes(ALIAS_SEPARATOR)) { - const [table, alias] = from.split(ALIAS_SEPARATOR).map(trim); - return AliasNode.create(parseTable(table), IdentifierNode.create(alias)); - } - else { - return parseTable(from); - } -} -export function parseTable(from) { - const SCHEMA_SEPARATOR = '.'; - if (from.includes(SCHEMA_SEPARATOR)) { - const [schema, table] = from.split(SCHEMA_SEPARATOR).map(trim); - return TableNode.createWithSchema(schema, table); - } - else { - return TableNode.create(from); - } -} -function trim(str) { - return str.trim(); -} diff --git a/node_modules/kysely/dist/esm/parser/top-parser.d.ts b/node_modules/kysely/dist/esm/parser/top-parser.d.ts deleted file mode 100644 index e8946df..0000000 --- a/node_modules/kysely/dist/esm/parser/top-parser.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { type TopModifier, TopNode } from '../operation-node/top-node.js'; -export declare function parseTop(expression: number | bigint, modifiers?: TopModifier): TopNode; diff --git a/node_modules/kysely/dist/esm/parser/top-parser.js b/node_modules/kysely/dist/esm/parser/top-parser.js deleted file mode 100644 index 7786524..0000000 --- a/node_modules/kysely/dist/esm/parser/top-parser.js +++ /dev/null @@ -1,17 +0,0 @@ -/// -import { TopNode } from '../operation-node/top-node.js'; -import { isBigInt, isNumber, isUndefined } from '../util/object-utils.js'; -export function parseTop(expression, modifiers) { - if (!isNumber(expression) && !isBigInt(expression)) { - throw new Error(`Invalid top expression: ${expression}`); - } - if (!isUndefined(modifiers) && !isTopModifiers(modifiers)) { - throw new Error(`Invalid top modifiers: ${modifiers}`); - } - return TopNode.create(expression, modifiers); -} -function isTopModifiers(modifiers) { - return (modifiers === 'percent' || - modifiers === 'with ties' || - modifiers === 'percent with ties'); -} diff --git a/node_modules/kysely/dist/esm/parser/tuple-parser.d.ts b/node_modules/kysely/dist/esm/parser/tuple-parser.d.ts deleted file mode 100644 index 127c14a..0000000 --- a/node_modules/kysely/dist/esm/parser/tuple-parser.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -import type { DrainOuterGeneric } from '../util/type-utils.js'; -import type { ExtractTypeFromReferenceExpression } from './reference-parser.js'; -import type { ExtractTypeFromValueExpression } from './value-parser.js'; -export type RefTuple2 = DrainOuterGeneric<[ - ExtractTypeFromReferenceExpression, - ExtractTypeFromReferenceExpression -]>; -export type RefTuple3 = DrainOuterGeneric<[ - ExtractTypeFromReferenceExpression, - ExtractTypeFromReferenceExpression, - ExtractTypeFromReferenceExpression -]>; -export type RefTuple4 = DrainOuterGeneric<[ - ExtractTypeFromReferenceExpression, - ExtractTypeFromReferenceExpression, - ExtractTypeFromReferenceExpression, - ExtractTypeFromReferenceExpression -]>; -export type RefTuple5 = DrainOuterGeneric<[ - ExtractTypeFromReferenceExpression, - ExtractTypeFromReferenceExpression, - ExtractTypeFromReferenceExpression, - ExtractTypeFromReferenceExpression, - ExtractTypeFromReferenceExpression -]>; -export type ValTuple2 = DrainOuterGeneric<[ - ExtractTypeFromValueExpression, - ExtractTypeFromValueExpression -]>; -export type ValTuple3 = DrainOuterGeneric<[ - ExtractTypeFromValueExpression, - ExtractTypeFromValueExpression, - ExtractTypeFromValueExpression -]>; -export type ValTuple4 = DrainOuterGeneric<[ - ExtractTypeFromValueExpression, - ExtractTypeFromValueExpression, - ExtractTypeFromValueExpression, - ExtractTypeFromValueExpression -]>; -export type ValTuple5 = DrainOuterGeneric<[ - ExtractTypeFromValueExpression, - ExtractTypeFromValueExpression, - ExtractTypeFromValueExpression, - ExtractTypeFromValueExpression, - ExtractTypeFromValueExpression -]>; diff --git a/node_modules/kysely/dist/esm/parser/tuple-parser.js b/node_modules/kysely/dist/esm/parser/tuple-parser.js deleted file mode 100644 index e83e15b..0000000 --- a/node_modules/kysely/dist/esm/parser/tuple-parser.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/parser/unary-operation-parser.d.ts b/node_modules/kysely/dist/esm/parser/unary-operation-parser.d.ts deleted file mode 100644 index 9fc1d0b..0000000 --- a/node_modules/kysely/dist/esm/parser/unary-operation-parser.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { type UnaryOperator } from '../operation-node/operator-node.js'; -import { UnaryOperationNode } from '../operation-node/unary-operation-node.js'; -import type { ExpressionOrFactory } from './expression-parser.js'; -import { type ReferenceExpression } from './reference-parser.js'; -export type ExistsExpression = ExpressionOrFactory; -export declare function parseExists(operand: ExistsExpression): UnaryOperationNode; -export declare function parseNotExists(operand: ExistsExpression): UnaryOperationNode; -export declare function parseUnaryOperation(operator: UnaryOperator, operand: ReferenceExpression): UnaryOperationNode; diff --git a/node_modules/kysely/dist/esm/parser/unary-operation-parser.js b/node_modules/kysely/dist/esm/parser/unary-operation-parser.js deleted file mode 100644 index 5cc1778..0000000 --- a/node_modules/kysely/dist/esm/parser/unary-operation-parser.js +++ /dev/null @@ -1,13 +0,0 @@ -/// -import { OperatorNode, } from '../operation-node/operator-node.js'; -import { UnaryOperationNode } from '../operation-node/unary-operation-node.js'; -import { parseReferenceExpression, } from './reference-parser.js'; -export function parseExists(operand) { - return parseUnaryOperation('exists', operand); -} -export function parseNotExists(operand) { - return parseUnaryOperation('not exists', operand); -} -export function parseUnaryOperation(operator, operand) { - return UnaryOperationNode.create(OperatorNode.create(operator), parseReferenceExpression(operand)); -} diff --git a/node_modules/kysely/dist/esm/parser/update-parser.d.ts b/node_modules/kysely/dist/esm/parser/update-parser.d.ts deleted file mode 100644 index 4613e2e..0000000 --- a/node_modules/kysely/dist/esm/parser/update-parser.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { UpdateQueryBuilder } from '../query-builder/update-query-builder.js'; -import type { UpdateResult } from '../query-builder/update-result.js'; -import type { ShallowRecord } from '../util/type-utils.js'; -import type { ExtractTableAlias, From, FromTables, TableExpressionOrList } from './table-parser.js'; -export type UpdateTable> = [ - TE -] extends [keyof DB] ? UpdateQueryBuilder, ExtractTableAlias, UpdateResult> : [ - TE -] extends [`${infer T} as ${infer A}`] ? T extends keyof DB ? UpdateQueryBuilder, A, A, UpdateResult> : never : TE extends ReadonlyArray ? UpdateQueryBuilder, FromTables, FromTables, UpdateResult> : UpdateQueryBuilder, FromTables, FromTables, UpdateResult>; diff --git a/node_modules/kysely/dist/esm/parser/update-parser.js b/node_modules/kysely/dist/esm/parser/update-parser.js deleted file mode 100644 index 43d392e..0000000 --- a/node_modules/kysely/dist/esm/parser/update-parser.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/parser/update-set-parser.d.ts b/node_modules/kysely/dist/esm/parser/update-set-parser.d.ts deleted file mode 100644 index 967f93c..0000000 --- a/node_modules/kysely/dist/esm/parser/update-set-parser.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { ColumnUpdateNode } from '../operation-node/column-update-node.js'; -import { type ExpressionBuilder } from '../expression/expression-builder.js'; -import type { UpdateType } from '../util/column-type.js'; -import { type ValueExpression } from './value-parser.js'; -import { type ExtractRawTypeFromReferenceExpression, type ReferenceExpression } from './reference-parser.js'; -import type { AnyColumn, DrainOuterGeneric } from '../util/type-utils.js'; -export type UpdateObject = DrainOuterGeneric<{ - [C in AnyColumn]?: { - [T in UT]: C extends keyof DB[T] ? ValueExpression> | undefined : never; - }[UT]; -}>; -export type UpdateObjectFactory = (eb: ExpressionBuilder) => UpdateObject; -export type UpdateObjectExpression = UpdateObject | UpdateObjectFactory; -export type ExtractUpdateTypeFromReferenceExpression = UpdateType>; -export declare function parseUpdate(...args: [UpdateObjectExpression] | [ReferenceExpression, ValueExpression]): ReadonlyArray; -export declare function parseUpdateObjectExpression(update: UpdateObjectExpression): ReadonlyArray; diff --git a/node_modules/kysely/dist/esm/parser/update-set-parser.js b/node_modules/kysely/dist/esm/parser/update-set-parser.js deleted file mode 100644 index e644c94..0000000 --- a/node_modules/kysely/dist/esm/parser/update-set-parser.js +++ /dev/null @@ -1,23 +0,0 @@ -/// -import { ColumnNode } from '../operation-node/column-node.js'; -import { ColumnUpdateNode } from '../operation-node/column-update-node.js'; -import { expressionBuilder, } from '../expression/expression-builder.js'; -import { isFunction } from '../util/object-utils.js'; -import { parseValueExpression } from './value-parser.js'; -import { parseReferenceExpression, } from './reference-parser.js'; -export function parseUpdate(...args) { - if (args.length === 2) { - return [ - ColumnUpdateNode.create(parseReferenceExpression(args[0]), parseValueExpression(args[1])), - ]; - } - return parseUpdateObjectExpression(args[0]); -} -export function parseUpdateObjectExpression(update) { - const updateObj = isFunction(update) ? update(expressionBuilder()) : update; - return Object.entries(updateObj) - .filter(([_, value]) => value !== undefined) - .map(([key, value]) => { - return ColumnUpdateNode.create(ColumnNode.create(key), parseValueExpression(value)); - }); -} diff --git a/node_modules/kysely/dist/esm/parser/value-parser.d.ts b/node_modules/kysely/dist/esm/parser/value-parser.d.ts deleted file mode 100644 index 00c6d27..0000000 --- a/node_modules/kysely/dist/esm/parser/value-parser.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { ValueNode } from '../operation-node/value-node.js'; -import { type ExpressionOrFactory } from './expression-parser.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -import type { Expression } from '../expression/expression.js'; -import type { SelectQueryBuilderExpression } from '../query-builder/select-query-builder-expression.js'; -export type ValueExpression = V | ExpressionOrFactory; -export type ValueExpressionOrList = ValueExpression | ReadonlyArray>; -export type ExtractTypeFromValueExpressionOrList = VE extends ReadonlyArray ? ExtractTypeFromValueExpression : ExtractTypeFromValueExpression; -export type ExtractTypeFromValueExpression = VE extends SelectQueryBuilderExpression> ? SV : VE extends Expression ? V : VE; -export declare function parseValueExpressionOrList(arg: ValueExpressionOrList): OperationNode; -export declare function parseValueExpression(exp: ValueExpression): OperationNode; -export declare function isSafeImmediateValue(value: unknown): value is number | boolean | null; -export declare function parseSafeImmediateValue(value: number | boolean | null): ValueNode; diff --git a/node_modules/kysely/dist/esm/parser/value-parser.js b/node_modules/kysely/dist/esm/parser/value-parser.js deleted file mode 100644 index 6ff6779..0000000 --- a/node_modules/kysely/dist/esm/parser/value-parser.js +++ /dev/null @@ -1,33 +0,0 @@ -/// -import { PrimitiveValueListNode } from '../operation-node/primitive-value-list-node.js'; -import { ValueListNode } from '../operation-node/value-list-node.js'; -import { ValueNode } from '../operation-node/value-node.js'; -import { isBoolean, isNull, isNumber, isReadonlyArray, } from '../util/object-utils.js'; -import { parseExpression, isExpressionOrFactory, } from './expression-parser.js'; -export function parseValueExpressionOrList(arg) { - if (isReadonlyArray(arg)) { - return parseValueExpressionList(arg); - } - return parseValueExpression(arg); -} -export function parseValueExpression(exp) { - if (isExpressionOrFactory(exp)) { - return parseExpression(exp); - } - return ValueNode.create(exp); -} -export function isSafeImmediateValue(value) { - return isNumber(value) || isBoolean(value) || isNull(value); -} -export function parseSafeImmediateValue(value) { - if (!isSafeImmediateValue(value)) { - throw new Error(`unsafe immediate value ${JSON.stringify(value)}`); - } - return ValueNode.createImmediate(value); -} -function parseValueExpressionList(arg) { - if (arg.some(isExpressionOrFactory)) { - return ValueListNode.create(arg.map((it) => parseValueExpression(it))); - } - return PrimitiveValueListNode.create(arg); -} diff --git a/node_modules/kysely/dist/esm/parser/with-parser.d.ts b/node_modules/kysely/dist/esm/parser/with-parser.d.ts deleted file mode 100644 index e3a54b5..0000000 --- a/node_modules/kysely/dist/esm/parser/with-parser.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import type { UpdateQueryBuilder } from '../query-builder/update-query-builder.js'; -import type { DeleteQueryBuilder } from '../query-builder/delete-query-builder.js'; -import type { InsertQueryBuilder } from '../query-builder/insert-query-builder.js'; -import type { QueryCreator } from '../query-creator.js'; -import type { Expression } from '../expression/expression.js'; -import type { ShallowRecord } from '../util/type-utils.js'; -import { type CTEBuilderCallback } from '../query-builder/cte-builder.js'; -import { CommonTableExpressionNode } from '../operation-node/common-table-expression-node.js'; -export type CommonTableExpression = (creator: QueryCreator) => CommonTableExpressionOutput; -export type RecursiveCommonTableExpression = (creator: QueryCreator]: ExtractRowFromCommonTableExpressionName; -}>) => CommonTableExpressionOutput; -export type QueryCreatorWithCommonTableExpression = QueryCreator]: ExtractRowFromCommonTableExpression; -}>; -type CommonTableExpressionOutput = Expression> | InsertQueryBuilder> | UpdateQueryBuilder> | DeleteQueryBuilder>; -/** - * Given a common CommonTableExpression CTE extracts the row type from it. - * - * For example a CTE `(db) => db.selectFrom('person').select(['id', 'first_name'])` - * would result in `Pick`. - */ -type ExtractRowFromCommonTableExpression = CTE extends (creator: QueryCreator) => infer Q ? Q extends Expression ? QO : Q extends InsertQueryBuilder ? QO : Q extends UpdateQueryBuilder ? QO : Q extends DeleteQueryBuilder ? QO : never : never; -/** - * Extracts 'person' from a string like 'person(id, first_name)'. - */ -type ExtractTableFromCommonTableExpressionName = CN extends `${infer TB}(${string})` ? TB : CN; -/** - * Parses a string like 'person(id, first_name)' into a type: - * - * { - * id: any, - * first_name: any - * } - * - */ -type ExtractRowFromCommonTableExpressionName = CN extends `${string}(${infer CL})` ? { - [C in ExtractColumnNamesFromColumnList]: any; -} : ShallowRecord; -/** - * Parses a string like 'id, first_name' into a type 'id' | 'first_name' - */ -type ExtractColumnNamesFromColumnList = R extends `${infer C}, ${infer RS}` ? C | ExtractColumnNamesFromColumnList : R; -export declare function parseCommonTableExpression(nameOrBuilderCallback: string | CTEBuilderCallback, expression: CommonTableExpression): CommonTableExpressionNode; -export {}; diff --git a/node_modules/kysely/dist/esm/parser/with-parser.js b/node_modules/kysely/dist/esm/parser/with-parser.js deleted file mode 100644 index e43f7f1..0000000 --- a/node_modules/kysely/dist/esm/parser/with-parser.js +++ /dev/null @@ -1,31 +0,0 @@ -/// -import { CommonTableExpressionNameNode } from '../operation-node/common-table-expression-name-node.js'; -import { createQueryCreator } from './parse-utils.js'; -import { isFunction } from '../util/object-utils.js'; -import { CTEBuilder, } from '../query-builder/cte-builder.js'; -import { CommonTableExpressionNode } from '../operation-node/common-table-expression-node.js'; -export function parseCommonTableExpression(nameOrBuilderCallback, expression) { - const expressionNode = expression(createQueryCreator()).toOperationNode(); - if (isFunction(nameOrBuilderCallback)) { - return nameOrBuilderCallback(cteBuilderFactory(expressionNode)).toOperationNode(); - } - return CommonTableExpressionNode.create(parseCommonTableExpressionName(nameOrBuilderCallback), expressionNode); -} -function cteBuilderFactory(expressionNode) { - return (name) => { - return new CTEBuilder({ - node: CommonTableExpressionNode.create(parseCommonTableExpressionName(name), expressionNode), - }); - }; -} -function parseCommonTableExpressionName(name) { - if (name.includes('(')) { - const parts = name.split(/[\(\)]/); - const table = parts[0]; - const columns = parts[1].split(',').map((it) => it.trim()); - return CommonTableExpressionNameNode.create(table, columns); - } - else { - return CommonTableExpressionNameNode.create(name); - } -} diff --git a/node_modules/kysely/dist/esm/plugin/camel-case/camel-case-plugin.d.ts b/node_modules/kysely/dist/esm/plugin/camel-case/camel-case-plugin.d.ts deleted file mode 100644 index 89da711..0000000 --- a/node_modules/kysely/dist/esm/plugin/camel-case/camel-case-plugin.d.ts +++ /dev/null @@ -1,170 +0,0 @@ -import type { QueryResult } from '../../driver/database-connection.js'; -import type { RootOperationNode } from '../../query-compiler/query-compiler.js'; -import type { UnknownRow } from '../../util/type-utils.js'; -import type { KyselyPlugin, PluginTransformQueryArgs, PluginTransformResultArgs } from '../kysely-plugin.js'; -export interface CamelCasePluginOptions { - /** - * If true, camelCase is transformed into upper case SNAKE_CASE. - * For example `fooBar => FOO_BAR` and `FOO_BAR => fooBar` - * - * Defaults to false. - */ - upperCase?: boolean; - /** - * If true, an underscore is added before each digit when converting - * camelCase to snake_case. For example `foo12Bar => foo_12_bar` and - * `foo_12_bar => foo12Bar` - * - * Defaults to false. - */ - underscoreBeforeDigits?: boolean; - /** - * If true, an underscore is added between consecutive upper case - * letters when converting from camelCase to snake_case. For example - * `fooBAR => foo_b_a_r` and `foo_b_a_r => fooBAR`. - * - * Defaults to false. - */ - underscoreBetweenUppercaseLetters?: boolean; - /** - * If true, nested object's keys will not be converted to camel case. - * - * Defaults to false. - */ - maintainNestedObjectKeys?: boolean; -} -/** - * A plugin that converts snake_case identifiers in the database into - * camelCase in the JavaScript side. - * - * For example let's assume we have a table called `person_table` - * with columns `first_name` and `last_name` in the database. When - * using `CamelCasePlugin` we would setup Kysely like this: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { CamelCasePlugin, Kysely, SqliteDialect } from 'kysely' - * - * interface CamelCasedDatabase { - * userMetadata: { - * firstName: string - * lastName: string - * } - * } - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }), - * plugins: [new CamelCasePlugin()], - * }) - * - * const person = await db.selectFrom('userMetadata') - * .where('firstName', '=', 'Arnold') - * .select(['firstName', 'lastName']) - * .executeTakeFirst() - * - * if (person) { - * console.log(person.firstName) - * } - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select "first_name", "last_name" from "user_metadata" where "first_name" = ? - * ``` - * - * As you can see from the example, __everything__ needs to be defined - * in camelCase in the TypeScript code: table names, columns, schemas, - * __everything__. When using the `CamelCasePlugin` Kysely works as if - * the database was defined in camelCase. - * - * There are various options you can give to the plugin to modify - * the way identifiers are converted. See {@link CamelCasePluginOptions}. - * If those options are not enough, you can override this plugin's - * `snakeCase` and `camelCase` methods to make the conversion exactly - * the way you like: - * - * ```ts - * class MyCamelCasePlugin extends CamelCasePlugin { - * protected override snakeCase(str: string): string { - * // ... - * - * return str - * } - * - * protected override camelCase(str: string): string { - * // ... - * - * return str - * } - * } - * ``` - */ -export declare class CamelCasePlugin implements KyselyPlugin { - #private; - readonly opt: CamelCasePluginOptions; - constructor(opt?: CamelCasePluginOptions); - /** - * This is called for each query before it is executed. You can modify the query by - * transforming its {@link OperationNode} tree provided in {@link PluginTransformQueryArgs.node | args.node} - * and returning the transformed tree. You'd usually want to use an {@link OperationNodeTransformer} - * for this. - * - * If you need to pass some query-related data between this method and `transformResult` you - * can use a `WeakMap` with {@link PluginTransformQueryArgs.queryId | args.queryId} as the key: - * - * ```ts - * import type { - * KyselyPlugin, - * QueryResult, - * RootOperationNode, - * UnknownRow - * } from 'kysely' - * - * interface MyData { - * // ... - * } - * const data = new WeakMap() - * - * const plugin = { - * transformQuery(args: PluginTransformQueryArgs): RootOperationNode { - * const something: MyData = {} - * - * // ... - * - * data.set(args.queryId, something) - * - * // ... - * - * return args.node - * }, - * - * async transformResult(args: PluginTransformResultArgs): Promise> { - * // ... - * - * const something = data.get(args.queryId) - * - * // ... - * - * return args.result - * } - * } satisfies KyselyPlugin - * ``` - * - * You should use a `WeakMap` instead of a `Map` or some other strong references because `transformQuery` - * is not always matched by a call to `transformResult` which would leave orphaned items in the map - * and cause a memory leak. - */ - transformQuery(args: PluginTransformQueryArgs): RootOperationNode; - /** - * This method is called for each query after it has been executed. The result - * of the query can be accessed through {@link PluginTransformResultArgs.result | args.result}. - * You can modify the result and return the modifier result. - */ - transformResult(args: PluginTransformResultArgs): Promise>; - protected mapRow(row: UnknownRow): UnknownRow; - protected snakeCase(str: string): string; - protected camelCase(str: string): string; -} diff --git a/node_modules/kysely/dist/esm/plugin/camel-case/camel-case-plugin.js b/node_modules/kysely/dist/esm/plugin/camel-case/camel-case-plugin.js deleted file mode 100644 index f075697..0000000 --- a/node_modules/kysely/dist/esm/plugin/camel-case/camel-case-plugin.js +++ /dev/null @@ -1,119 +0,0 @@ -/// -import { isPlainObject } from '../../util/object-utils.js'; -import { SnakeCaseTransformer } from './camel-case-transformer.js'; -import { createCamelCaseMapper, createSnakeCaseMapper, } from './camel-case.js'; -/** - * A plugin that converts snake_case identifiers in the database into - * camelCase in the JavaScript side. - * - * For example let's assume we have a table called `person_table` - * with columns `first_name` and `last_name` in the database. When - * using `CamelCasePlugin` we would setup Kysely like this: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { CamelCasePlugin, Kysely, SqliteDialect } from 'kysely' - * - * interface CamelCasedDatabase { - * userMetadata: { - * firstName: string - * lastName: string - * } - * } - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }), - * plugins: [new CamelCasePlugin()], - * }) - * - * const person = await db.selectFrom('userMetadata') - * .where('firstName', '=', 'Arnold') - * .select(['firstName', 'lastName']) - * .executeTakeFirst() - * - * if (person) { - * console.log(person.firstName) - * } - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select "first_name", "last_name" from "user_metadata" where "first_name" = ? - * ``` - * - * As you can see from the example, __everything__ needs to be defined - * in camelCase in the TypeScript code: table names, columns, schemas, - * __everything__. When using the `CamelCasePlugin` Kysely works as if - * the database was defined in camelCase. - * - * There are various options you can give to the plugin to modify - * the way identifiers are converted. See {@link CamelCasePluginOptions}. - * If those options are not enough, you can override this plugin's - * `snakeCase` and `camelCase` methods to make the conversion exactly - * the way you like: - * - * ```ts - * class MyCamelCasePlugin extends CamelCasePlugin { - * protected override snakeCase(str: string): string { - * // ... - * - * return str - * } - * - * protected override camelCase(str: string): string { - * // ... - * - * return str - * } - * } - * ``` - */ -export class CamelCasePlugin { - opt; - #camelCase; - #snakeCase; - #snakeCaseTransformer; - constructor(opt = {}) { - this.opt = opt; - this.#camelCase = createCamelCaseMapper(opt); - this.#snakeCase = createSnakeCaseMapper(opt); - this.#snakeCaseTransformer = new SnakeCaseTransformer(this.snakeCase.bind(this)); - } - transformQuery(args) { - return this.#snakeCaseTransformer.transformNode(args.node, args.queryId); - } - async transformResult(args) { - if (args.result.rows && Array.isArray(args.result.rows)) { - return { - ...args.result, - rows: args.result.rows.map((row) => this.mapRow(row)), - }; - } - return args.result; - } - mapRow(row) { - return Object.keys(row).reduce((obj, key) => { - let value = row[key]; - if (Array.isArray(value)) { - value = value.map((it) => (canMap(it, this.opt) ? this.mapRow(it) : it)); - } - else if (canMap(value, this.opt)) { - value = this.mapRow(value); - } - obj[this.camelCase(key)] = value; - return obj; - }, {}); - } - snakeCase(str) { - return this.#snakeCase(str); - } - camelCase(str) { - return this.#camelCase(str); - } -} -function canMap(obj, opt) { - return isPlainObject(obj) && !opt?.maintainNestedObjectKeys; -} diff --git a/node_modules/kysely/dist/esm/plugin/camel-case/camel-case-transformer.d.ts b/node_modules/kysely/dist/esm/plugin/camel-case/camel-case-transformer.d.ts deleted file mode 100644 index b26cc86..0000000 --- a/node_modules/kysely/dist/esm/plugin/camel-case/camel-case-transformer.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { IdentifierNode } from '../../operation-node/identifier-node.js'; -import { OperationNodeTransformer } from '../../operation-node/operation-node-transformer.js'; -import type { QueryId } from '../../util/query-id.js'; -import type { StringMapper } from './camel-case.js'; -export declare class SnakeCaseTransformer extends OperationNodeTransformer { - #private; - constructor(snakeCase: StringMapper); - protected transformIdentifier(node: IdentifierNode, queryId: QueryId): IdentifierNode; -} diff --git a/node_modules/kysely/dist/esm/plugin/camel-case/camel-case-transformer.js b/node_modules/kysely/dist/esm/plugin/camel-case/camel-case-transformer.js deleted file mode 100644 index 27477ca..0000000 --- a/node_modules/kysely/dist/esm/plugin/camel-case/camel-case-transformer.js +++ /dev/null @@ -1,16 +0,0 @@ -/// -import { OperationNodeTransformer } from '../../operation-node/operation-node-transformer.js'; -export class SnakeCaseTransformer extends OperationNodeTransformer { - #snakeCase; - constructor(snakeCase) { - super(); - this.#snakeCase = snakeCase; - } - transformIdentifier(node, queryId) { - node = super.transformIdentifier(node, queryId); - return { - ...node, - name: this.#snakeCase(node.name), - }; - } -} diff --git a/node_modules/kysely/dist/esm/plugin/camel-case/camel-case.d.ts b/node_modules/kysely/dist/esm/plugin/camel-case/camel-case.d.ts deleted file mode 100644 index ae29105..0000000 --- a/node_modules/kysely/dist/esm/plugin/camel-case/camel-case.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export type StringMapper = (str: string) => string; -/** - * Creates a function that transforms camel case strings to snake case. - */ -export declare function createSnakeCaseMapper({ upperCase, underscoreBeforeDigits, underscoreBetweenUppercaseLetters, }?: { - upperCase?: boolean | undefined; - underscoreBeforeDigits?: boolean | undefined; - underscoreBetweenUppercaseLetters?: boolean | undefined; -}): StringMapper; -/** - * Creates a function that transforms snake case strings to camel case. - */ -export declare function createCamelCaseMapper({ upperCase, }?: { - upperCase?: boolean | undefined; -}): StringMapper; diff --git a/node_modules/kysely/dist/esm/plugin/camel-case/camel-case.js b/node_modules/kysely/dist/esm/plugin/camel-case/camel-case.js deleted file mode 100644 index 7eabea6..0000000 --- a/node_modules/kysely/dist/esm/plugin/camel-case/camel-case.js +++ /dev/null @@ -1,108 +0,0 @@ -/// -/** - * Creates a function that transforms camel case strings to snake case. - */ -export function createSnakeCaseMapper({ upperCase = false, underscoreBeforeDigits = false, underscoreBetweenUppercaseLetters = false, } = {}) { - return memoize((str) => { - if (str.length === 0) { - return str; - } - const upper = str.toUpperCase(); - const lower = str.toLowerCase(); - let out = lower[0]; - for (let i = 1, l = str.length; i < l; ++i) { - const char = str[i]; - const prevChar = str[i - 1]; - const upperChar = upper[i]; - const prevUpperChar = upper[i - 1]; - const lowerChar = lower[i]; - const prevLowerChar = lower[i - 1]; - // If underScoreBeforeDigits is true then, well, insert an underscore - // before digits :). Only the first digit gets an underscore if - // there are multiple. - if (underscoreBeforeDigits && - isDigit(char) && - !isDigit(prevChar) && - !out.endsWith('_')) { - out += '_' + char; - continue; - } - // Test if `char` is an upper-case character and that the character - // actually has different upper and lower case versions. - if (char === upperChar && upperChar !== lowerChar) { - const prevCharacterIsUppercase = prevChar === prevUpperChar && prevUpperChar !== prevLowerChar; - // If underscoreBetweenUppercaseLetters is true, we always place an underscore - // before consecutive uppercase letters (e.g. "fooBAR" becomes "foo_b_a_r"). - // Otherwise, we don't (e.g. "fooBAR" becomes "foo_bar"). - if (underscoreBetweenUppercaseLetters || !prevCharacterIsUppercase) { - out += '_' + lowerChar; - } - else { - out += lowerChar; - } - } - else { - out += char; - } - } - if (upperCase) { - return out.toUpperCase(); - } - else { - return out; - } - }); -} -/** - * Creates a function that transforms snake case strings to camel case. - */ -export function createCamelCaseMapper({ upperCase = false, } = {}) { - return memoize((str) => { - if (str.length === 0) { - return str; - } - if (upperCase && isAllUpperCaseSnakeCase(str)) { - // Only convert to lower case if the string is all upper - // case snake_case. This allows camelCase strings to go - // through without changing. - str = str.toLowerCase(); - } - let out = str[0]; - for (let i = 1, l = str.length; i < l; ++i) { - const char = str[i]; - const prevChar = str[i - 1]; - if (char !== '_') { - if (prevChar === '_') { - out += char.toUpperCase(); - } - else { - out += char; - } - } - } - return out; - }); -} -function isAllUpperCaseSnakeCase(str) { - for (let i = 1, l = str.length; i < l; ++i) { - const char = str[i]; - if (char !== '_' && char !== char.toUpperCase()) { - return false; - } - } - return true; -} -function isDigit(char) { - return char >= '0' && char <= '9'; -} -function memoize(func) { - const cache = new Map(); - return (str) => { - let mapped = cache.get(str); - if (!mapped) { - mapped = func(str); - cache.set(str, mapped); - } - return mapped; - }; -} diff --git a/node_modules/kysely/dist/esm/plugin/deduplicate-joins/deduplicate-joins-plugin.d.ts b/node_modules/kysely/dist/esm/plugin/deduplicate-joins/deduplicate-joins-plugin.d.ts deleted file mode 100644 index 0ce3a68..0000000 --- a/node_modules/kysely/dist/esm/plugin/deduplicate-joins/deduplicate-joins-plugin.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -import type { QueryResult } from '../../driver/database-connection.js'; -import type { RootOperationNode } from '../../query-compiler/query-compiler.js'; -import type { UnknownRow } from '../../util/type-utils.js'; -import type { KyselyPlugin, PluginTransformQueryArgs, PluginTransformResultArgs } from '../kysely-plugin.js'; -/** - * Plugin that removes duplicate joins from queries. - * - * See [this recipe](https://github.com/kysely-org/kysely/blob/master/site/docs/recipes/0008-deduplicate-joins.md) - */ -export declare class DeduplicateJoinsPlugin implements KyselyPlugin { - #private; - /** - * This is called for each query before it is executed. You can modify the query by - * transforming its {@link OperationNode} tree provided in {@link PluginTransformQueryArgs.node | args.node} - * and returning the transformed tree. You'd usually want to use an {@link OperationNodeTransformer} - * for this. - * - * If you need to pass some query-related data between this method and `transformResult` you - * can use a `WeakMap` with {@link PluginTransformQueryArgs.queryId | args.queryId} as the key: - * - * ```ts - * import type { - * KyselyPlugin, - * QueryResult, - * RootOperationNode, - * UnknownRow - * } from 'kysely' - * - * interface MyData { - * // ... - * } - * const data = new WeakMap() - * - * const plugin = { - * transformQuery(args: PluginTransformQueryArgs): RootOperationNode { - * const something: MyData = {} - * - * // ... - * - * data.set(args.queryId, something) - * - * // ... - * - * return args.node - * }, - * - * async transformResult(args: PluginTransformResultArgs): Promise> { - * // ... - * - * const something = data.get(args.queryId) - * - * // ... - * - * return args.result - * } - * } satisfies KyselyPlugin - * ``` - * - * You should use a `WeakMap` instead of a `Map` or some other strong references because `transformQuery` - * is not always matched by a call to `transformResult` which would leave orphaned items in the map - * and cause a memory leak. - */ - transformQuery(args: PluginTransformQueryArgs): RootOperationNode; - /** - * This method is called for each query after it has been executed. The result - * of the query can be accessed through {@link PluginTransformResultArgs.result | args.result}. - * You can modify the result and return the modifier result. - */ - transformResult(args: PluginTransformResultArgs): Promise>; -} diff --git a/node_modules/kysely/dist/esm/plugin/deduplicate-joins/deduplicate-joins-plugin.js b/node_modules/kysely/dist/esm/plugin/deduplicate-joins/deduplicate-joins-plugin.js deleted file mode 100644 index b786a59..0000000 --- a/node_modules/kysely/dist/esm/plugin/deduplicate-joins/deduplicate-joins-plugin.js +++ /dev/null @@ -1,16 +0,0 @@ -/// -import { DeduplicateJoinsTransformer } from './deduplicate-joins-transformer.js'; -/** - * Plugin that removes duplicate joins from queries. - * - * See [this recipe](https://github.com/kysely-org/kysely/blob/master/site/docs/recipes/0008-deduplicate-joins.md) - */ -export class DeduplicateJoinsPlugin { - #transformer = new DeduplicateJoinsTransformer(); - transformQuery(args) { - return this.#transformer.transformNode(args.node, args.queryId); - } - transformResult(args) { - return Promise.resolve(args.result); - } -} diff --git a/node_modules/kysely/dist/esm/plugin/deduplicate-joins/deduplicate-joins-transformer.d.ts b/node_modules/kysely/dist/esm/plugin/deduplicate-joins/deduplicate-joins-transformer.d.ts deleted file mode 100644 index f13edb4..0000000 --- a/node_modules/kysely/dist/esm/plugin/deduplicate-joins/deduplicate-joins-transformer.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { DeleteQueryNode } from '../../operation-node/delete-query-node.js'; -import { OperationNodeTransformer } from '../../operation-node/operation-node-transformer.js'; -import type { SelectQueryNode } from '../../operation-node/select-query-node.js'; -import type { UpdateQueryNode } from '../../operation-node/update-query-node.js'; -import type { QueryId } from '../../util/query-id.js'; -export declare class DeduplicateJoinsTransformer extends OperationNodeTransformer { - #private; - protected transformSelectQuery(node: SelectQueryNode, queryId: QueryId): SelectQueryNode; - protected transformUpdateQuery(node: UpdateQueryNode, queryId: QueryId): UpdateQueryNode; - protected transformDeleteQuery(node: DeleteQueryNode, queryId: QueryId): DeleteQueryNode; -} diff --git a/node_modules/kysely/dist/esm/plugin/deduplicate-joins/deduplicate-joins-transformer.js b/node_modules/kysely/dist/esm/plugin/deduplicate-joins/deduplicate-joins-transformer.js deleted file mode 100644 index eb45fe0..0000000 --- a/node_modules/kysely/dist/esm/plugin/deduplicate-joins/deduplicate-joins-transformer.js +++ /dev/null @@ -1,39 +0,0 @@ -/// -import { OperationNodeTransformer } from '../../operation-node/operation-node-transformer.js'; -import { compare, freeze } from '../../util/object-utils.js'; -export class DeduplicateJoinsTransformer extends OperationNodeTransformer { - transformSelectQuery(node, queryId) { - return this.#transformQuery(super.transformSelectQuery(node, queryId)); - } - transformUpdateQuery(node, queryId) { - return this.#transformQuery(super.transformUpdateQuery(node, queryId)); - } - transformDeleteQuery(node, queryId) { - return this.#transformQuery(super.transformDeleteQuery(node, queryId)); - } - #transformQuery(node) { - if (!node.joins || node.joins.length === 0) { - return node; - } - return freeze({ - ...node, - joins: this.#deduplicateJoins(node.joins), - }); - } - #deduplicateJoins(joins) { - const out = []; - for (let i = 0; i < joins.length; ++i) { - let foundDuplicate = false; - for (let j = 0; j < out.length; ++j) { - if (compare(joins[i], out[j])) { - foundDuplicate = true; - break; - } - } - if (!foundDuplicate) { - out.push(joins[i]); - } - } - return freeze(out); - } -} diff --git a/node_modules/kysely/dist/esm/plugin/handle-empty-in-lists/handle-empty-in-lists-plugin.d.ts b/node_modules/kysely/dist/esm/plugin/handle-empty-in-lists/handle-empty-in-lists-plugin.d.ts deleted file mode 100644 index 8407089..0000000 --- a/node_modules/kysely/dist/esm/plugin/handle-empty-in-lists/handle-empty-in-lists-plugin.d.ts +++ /dev/null @@ -1,211 +0,0 @@ -import type { QueryResult } from '../../driver/database-connection.js'; -import type { RootOperationNode } from '../../query-compiler/query-compiler.js'; -import type { KyselyPlugin, PluginTransformQueryArgs, PluginTransformResultArgs } from '../kysely-plugin.js'; -import type { UnknownRow } from '../../util/type-utils.js'; -import type { HandleEmptyInListsOptions } from './handle-empty-in-lists.js'; -/** - * A plugin that allows handling `in ()` and `not in ()` expressions. - * - * These expressions are invalid SQL syntax for many databases, and result in runtime - * database errors. - * - * The workarounds used by other libraries always involve modifying the query under - * the hood, which is not aligned with Kysely's philosophy of WYSIWYG. We recommend manually checking - * for empty arrays before passing them as arguments to `in` and `not in` expressions - * instead, but understand that this can be cumbersome. Hence we're going with an - * opt-in approach where you can choose if and how to handle these cases. We do - * not want to make this the default behavior, as it can lead to unexpected behavior. - * Use it at your own risk. Test it. Make sure it works as expected for you. - * - * Using this plugin also allows you to throw an error (thus avoiding unnecessary - * requests to the database) or print a warning in these cases. - * - * ### Examples - * - * The following strategy replaces the `in`/`not in` expression with a noncontingent - * expression. A contradiction (falsy) `1 = 0` for `in`, and a tautology (truthy) `1 = 1` for `not in`), - * similarily to how {@link https://github.com/knex/knex/blob/176151d8048b2a7feeb89a3d649a5580786d4f4e/docs/src/guide/query-builder.md#L1763 | Knex.js}, - * {@link https://github.com/prisma/prisma-engines/blob/99168c54187178484dae45d9478aa40cfd1866d2/quaint/src/visitor.rs#L804-L823 | PrismaORM}, - * {@link https://github.com/laravel/framework/blob/8.x/src/Illuminate/Database/Query/Grammars/Grammar.php#L284-L291 | Laravel}, - * {@link https://docs.sqlalchemy.org/en/13/core/engines.html#sqlalchemy.create_engine.params.empty_in_strategy | SQLAlchemy} - * handle this. - * - * ```ts - * import Sqlite from 'better-sqlite3' - * import { - * HandleEmptyInListsPlugin, - * Kysely, - * replaceWithNoncontingentExpression, - * SqliteDialect, - * } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }), - * plugins: [ - * new HandleEmptyInListsPlugin({ - * strategy: replaceWithNoncontingentExpression - * }) - * ], - * }) - * - * const results = await db - * .selectFrom('person') - * .where('id', 'in', []) - * .where('first_name', 'not in', []) - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select * from "person" where 1 = 0 and 1 = 1 - * ``` - * - * The following strategy does the following: - * - * When `in`, pushes a `null` value into the empty list resulting in `in (null)`, - * similiarly to how {@link https://github.com/typeorm/typeorm/blob/0280cdc451c35ef73c830eb1191c95d34f6ce06e/src/query-builder/QueryBuilder.ts#L919-L922 | TypeORM} - * and {@link https://github.com/sequelize/sequelize/blob/0f2891c6897e12bf9bf56df344aae5b698f58c7d/packages/core/src/abstract-dialect/where-sql-builder.ts#L368-L379 | Sequelize} - * handle `in ()`. `in (null)` is logically the equivalent of `= null`, which returns - * `null`, which is a falsy expression in most SQL databases. We recommend NOT - * using this strategy if you plan to use `in` in `select`, `returning`, or `output` - * clauses, as the return type differs from the `SqlBool` default type for comparisons. - * - * When `not in`, casts the left operand as `char` and pushes a unique value into - * the empty list resulting in `cast({{lhs}} as char) not in ({{VALUE}})`. Casting - * is required to avoid database errors with non-string values. - * - * ```ts - * import Sqlite from 'better-sqlite3' - * import { - * HandleEmptyInListsPlugin, - * Kysely, - * pushValueIntoList, - * SqliteDialect - * } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }), - * plugins: [ - * new HandleEmptyInListsPlugin({ - * strategy: pushValueIntoList('__kysely_no_values_were_provided__') // choose a unique value for not in. has to be something with zero chance being in the data. - * }) - * ], - * }) - * - * const results = await db - * .selectFrom('person') - * .where('id', 'in', []) - * .where('first_name', 'not in', []) - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select * from "person" where "id" in (null) and cast("first_name" as char) not in ('__kysely_no_values_were_provided__') - * ``` - * - * The following custom strategy throws an error when an empty list is encountered - * to avoid unnecessary requests to the database: - * - * ```ts - * import Sqlite from 'better-sqlite3' - * import { - * HandleEmptyInListsPlugin, - * Kysely, - * SqliteDialect - * } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }), - * plugins: [ - * new HandleEmptyInListsPlugin({ - * strategy: () => { - * throw new Error('Empty in/not-in is not allowed') - * } - * }) - * ], - * }) - * - * const results = await db - * .selectFrom('person') - * .where('id', 'in', []) - * .selectAll() - * .execute() // throws an error with 'Empty in/not-in is not allowed' message! - * ``` - */ -export declare class HandleEmptyInListsPlugin implements KyselyPlugin { - #private; - readonly opt: HandleEmptyInListsOptions; - constructor(opt: HandleEmptyInListsOptions); - /** - * This is called for each query before it is executed. You can modify the query by - * transforming its {@link OperationNode} tree provided in {@link PluginTransformQueryArgs.node | args.node} - * and returning the transformed tree. You'd usually want to use an {@link OperationNodeTransformer} - * for this. - * - * If you need to pass some query-related data between this method and `transformResult` you - * can use a `WeakMap` with {@link PluginTransformQueryArgs.queryId | args.queryId} as the key: - * - * ```ts - * import type { - * KyselyPlugin, - * QueryResult, - * RootOperationNode, - * UnknownRow - * } from 'kysely' - * - * interface MyData { - * // ... - * } - * const data = new WeakMap() - * - * const plugin = { - * transformQuery(args: PluginTransformQueryArgs): RootOperationNode { - * const something: MyData = {} - * - * // ... - * - * data.set(args.queryId, something) - * - * // ... - * - * return args.node - * }, - * - * async transformResult(args: PluginTransformResultArgs): Promise> { - * // ... - * - * const something = data.get(args.queryId) - * - * // ... - * - * return args.result - * } - * } satisfies KyselyPlugin - * ``` - * - * You should use a `WeakMap` instead of a `Map` or some other strong references because `transformQuery` - * is not always matched by a call to `transformResult` which would leave orphaned items in the map - * and cause a memory leak. - */ - transformQuery(args: PluginTransformQueryArgs): RootOperationNode; - /** - * This method is called for each query after it has been executed. The result - * of the query can be accessed through {@link PluginTransformResultArgs.result | args.result}. - * You can modify the result and return the modifier result. - */ - transformResult(args: PluginTransformResultArgs): Promise>; -} diff --git a/node_modules/kysely/dist/esm/plugin/handle-empty-in-lists/handle-empty-in-lists-plugin.js b/node_modules/kysely/dist/esm/plugin/handle-empty-in-lists/handle-empty-in-lists-plugin.js deleted file mode 100644 index 026b24a..0000000 --- a/node_modules/kysely/dist/esm/plugin/handle-empty-in-lists/handle-empty-in-lists-plugin.js +++ /dev/null @@ -1,159 +0,0 @@ -/// -import { HandleEmptyInListsTransformer } from './handle-empty-in-lists-transformer.js'; -/** - * A plugin that allows handling `in ()` and `not in ()` expressions. - * - * These expressions are invalid SQL syntax for many databases, and result in runtime - * database errors. - * - * The workarounds used by other libraries always involve modifying the query under - * the hood, which is not aligned with Kysely's philosophy of WYSIWYG. We recommend manually checking - * for empty arrays before passing them as arguments to `in` and `not in` expressions - * instead, but understand that this can be cumbersome. Hence we're going with an - * opt-in approach where you can choose if and how to handle these cases. We do - * not want to make this the default behavior, as it can lead to unexpected behavior. - * Use it at your own risk. Test it. Make sure it works as expected for you. - * - * Using this plugin also allows you to throw an error (thus avoiding unnecessary - * requests to the database) or print a warning in these cases. - * - * ### Examples - * - * The following strategy replaces the `in`/`not in` expression with a noncontingent - * expression. A contradiction (falsy) `1 = 0` for `in`, and a tautology (truthy) `1 = 1` for `not in`), - * similarily to how {@link https://github.com/knex/knex/blob/176151d8048b2a7feeb89a3d649a5580786d4f4e/docs/src/guide/query-builder.md#L1763 | Knex.js}, - * {@link https://github.com/prisma/prisma-engines/blob/99168c54187178484dae45d9478aa40cfd1866d2/quaint/src/visitor.rs#L804-L823 | PrismaORM}, - * {@link https://github.com/laravel/framework/blob/8.x/src/Illuminate/Database/Query/Grammars/Grammar.php#L284-L291 | Laravel}, - * {@link https://docs.sqlalchemy.org/en/13/core/engines.html#sqlalchemy.create_engine.params.empty_in_strategy | SQLAlchemy} - * handle this. - * - * ```ts - * import Sqlite from 'better-sqlite3' - * import { - * HandleEmptyInListsPlugin, - * Kysely, - * replaceWithNoncontingentExpression, - * SqliteDialect, - * } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }), - * plugins: [ - * new HandleEmptyInListsPlugin({ - * strategy: replaceWithNoncontingentExpression - * }) - * ], - * }) - * - * const results = await db - * .selectFrom('person') - * .where('id', 'in', []) - * .where('first_name', 'not in', []) - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select * from "person" where 1 = 0 and 1 = 1 - * ``` - * - * The following strategy does the following: - * - * When `in`, pushes a `null` value into the empty list resulting in `in (null)`, - * similiarly to how {@link https://github.com/typeorm/typeorm/blob/0280cdc451c35ef73c830eb1191c95d34f6ce06e/src/query-builder/QueryBuilder.ts#L919-L922 | TypeORM} - * and {@link https://github.com/sequelize/sequelize/blob/0f2891c6897e12bf9bf56df344aae5b698f58c7d/packages/core/src/abstract-dialect/where-sql-builder.ts#L368-L379 | Sequelize} - * handle `in ()`. `in (null)` is logically the equivalent of `= null`, which returns - * `null`, which is a falsy expression in most SQL databases. We recommend NOT - * using this strategy if you plan to use `in` in `select`, `returning`, or `output` - * clauses, as the return type differs from the `SqlBool` default type for comparisons. - * - * When `not in`, casts the left operand as `char` and pushes a unique value into - * the empty list resulting in `cast({{lhs}} as char) not in ({{VALUE}})`. Casting - * is required to avoid database errors with non-string values. - * - * ```ts - * import Sqlite from 'better-sqlite3' - * import { - * HandleEmptyInListsPlugin, - * Kysely, - * pushValueIntoList, - * SqliteDialect - * } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }), - * plugins: [ - * new HandleEmptyInListsPlugin({ - * strategy: pushValueIntoList('__kysely_no_values_were_provided__') // choose a unique value for not in. has to be something with zero chance being in the data. - * }) - * ], - * }) - * - * const results = await db - * .selectFrom('person') - * .where('id', 'in', []) - * .where('first_name', 'not in', []) - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select * from "person" where "id" in (null) and cast("first_name" as char) not in ('__kysely_no_values_were_provided__') - * ``` - * - * The following custom strategy throws an error when an empty list is encountered - * to avoid unnecessary requests to the database: - * - * ```ts - * import Sqlite from 'better-sqlite3' - * import { - * HandleEmptyInListsPlugin, - * Kysely, - * SqliteDialect - * } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }), - * plugins: [ - * new HandleEmptyInListsPlugin({ - * strategy: () => { - * throw new Error('Empty in/not-in is not allowed') - * } - * }) - * ], - * }) - * - * const results = await db - * .selectFrom('person') - * .where('id', 'in', []) - * .selectAll() - * .execute() // throws an error with 'Empty in/not-in is not allowed' message! - * ``` - */ -export class HandleEmptyInListsPlugin { - opt; - #transformer; - constructor(opt) { - this.opt = opt; - this.#transformer = new HandleEmptyInListsTransformer(opt.strategy); - } - transformQuery(args) { - return this.#transformer.transformNode(args.node, args.queryId); - } - async transformResult(args) { - return args.result; - } -} diff --git a/node_modules/kysely/dist/esm/plugin/handle-empty-in-lists/handle-empty-in-lists-transformer.d.ts b/node_modules/kysely/dist/esm/plugin/handle-empty-in-lists/handle-empty-in-lists-transformer.d.ts deleted file mode 100644 index 1869a12..0000000 --- a/node_modules/kysely/dist/esm/plugin/handle-empty-in-lists/handle-empty-in-lists-transformer.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { BinaryOperationNode } from '../../operation-node/binary-operation-node.js'; -import { OperationNodeTransformer } from '../../operation-node/operation-node-transformer.js'; -import type { EmptyInListsStrategy } from './handle-empty-in-lists.js'; -export declare class HandleEmptyInListsTransformer extends OperationNodeTransformer { - #private; - constructor(strategy: EmptyInListsStrategy); - protected transformBinaryOperation(node: BinaryOperationNode): BinaryOperationNode; -} diff --git a/node_modules/kysely/dist/esm/plugin/handle-empty-in-lists/handle-empty-in-lists-transformer.js b/node_modules/kysely/dist/esm/plugin/handle-empty-in-lists/handle-empty-in-lists-transformer.js deleted file mode 100644 index 655c0f7..0000000 --- a/node_modules/kysely/dist/esm/plugin/handle-empty-in-lists/handle-empty-in-lists-transformer.js +++ /dev/null @@ -1,26 +0,0 @@ -/// -import { OperationNodeTransformer } from '../../operation-node/operation-node-transformer.js'; -import { PrimitiveValueListNode } from '../../operation-node/primitive-value-list-node.js'; -import { OperatorNode } from '../../operation-node/operator-node.js'; -import { ValueListNode } from '../../operation-node/value-list-node.js'; -export class HandleEmptyInListsTransformer extends OperationNodeTransformer { - #strategy; - constructor(strategy) { - super(); - this.#strategy = strategy; - } - transformBinaryOperation(node) { - if (this.#isEmptyInListNode(node)) { - return this.#strategy(node); - } - return node; - } - #isEmptyInListNode(node) { - const { operator, rightOperand } = node; - return ((PrimitiveValueListNode.is(rightOperand) || - ValueListNode.is(rightOperand)) && - rightOperand.values.length === 0 && - OperatorNode.is(operator) && - (operator.operator === 'in' || operator.operator === 'not in')); - } -} diff --git a/node_modules/kysely/dist/esm/plugin/handle-empty-in-lists/handle-empty-in-lists.d.ts b/node_modules/kysely/dist/esm/plugin/handle-empty-in-lists/handle-empty-in-lists.d.ts deleted file mode 100644 index ce9effe..0000000 --- a/node_modules/kysely/dist/esm/plugin/handle-empty-in-lists/handle-empty-in-lists.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { BinaryOperationNode } from '../../operation-node/binary-operation-node.js'; -import { OperatorNode } from '../../operation-node/operator-node.js'; -import type { PrimitiveValueListNode } from '../../operation-node/primitive-value-list-node.js'; -import { ValueListNode } from '../../operation-node/value-list-node.js'; -export interface HandleEmptyInListsOptions { - /** - * The strategy to use when handling `in ()` and `not in ()`. - * - * See {@link HandleEmptyInListsPlugin} for examples. - */ - strategy: EmptyInListsStrategy; -} -export type EmptyInListNode = BinaryOperationNode & { - operator: OperatorNode & { - operator: 'in' | 'not in'; - }; - rightOperand: (ValueListNode | PrimitiveValueListNode) & { - values: Readonly<[]>; - }; -}; -export type EmptyInListsStrategy = (node: EmptyInListNode) => BinaryOperationNode; -/** - * Replaces the `in`/`not in` expression with a noncontingent expression (always true or always - * false) depending on the original operator. - * - * This is how Knex.js, PrismaORM, Laravel, and SQLAlchemy handle `in ()` and `not in ()`. - * - * See {@link pushValueIntoList} for an alternative strategy. - */ -export declare function replaceWithNoncontingentExpression(node: EmptyInListNode): BinaryOperationNode; -/** - * When `in`, pushes a `null` value into the list resulting in `in (null)`. This - * is how TypeORM and Sequelize handle `in ()`. `in (null)` is logically the equivalent - * of `= null`, which returns `null`, which is a falsy expression in most SQL databases. - * We recommend NOT using this strategy if you plan to use `in` in `select`, `returning`, - * or `output` clauses, as the return type differs from the `SqlBool` default type. - * - * When `not in`, casts the left operand as `char` and pushes a literal value into - * the list resulting in `cast({{lhs}} as char) not in ({{VALUE}})`. Casting - * is required to avoid database errors with non-string columns. - * - * See {@link replaceWithNoncontingentExpression} for an alternative strategy. - */ -export declare function pushValueIntoList(uniqueNotInLiteral: '__kysely_no_values_were_provided__' | (string & {})): EmptyInListsStrategy; diff --git a/node_modules/kysely/dist/esm/plugin/handle-empty-in-lists/handle-empty-in-lists.js b/node_modules/kysely/dist/esm/plugin/handle-empty-in-lists/handle-empty-in-lists.js deleted file mode 100644 index e72a8b1..0000000 --- a/node_modules/kysely/dist/esm/plugin/handle-empty-in-lists/handle-empty-in-lists.js +++ /dev/null @@ -1,63 +0,0 @@ -/// -import { BinaryOperationNode } from '../../operation-node/binary-operation-node.js'; -import { CastNode } from '../../operation-node/cast-node.js'; -import { DataTypeNode } from '../../operation-node/data-type-node.js'; -import { OperatorNode } from '../../operation-node/operator-node.js'; -import { ValueListNode } from '../../operation-node/value-list-node.js'; -import { ValueNode } from '../../operation-node/value-node.js'; -import { freeze } from '../../util/object-utils.js'; -let contradiction; -let eq; -let one; -let tautology; -/** - * Replaces the `in`/`not in` expression with a noncontingent expression (always true or always - * false) depending on the original operator. - * - * This is how Knex.js, PrismaORM, Laravel, and SQLAlchemy handle `in ()` and `not in ()`. - * - * See {@link pushValueIntoList} for an alternative strategy. - */ -export function replaceWithNoncontingentExpression(node) { - const _one = (one ||= ValueNode.createImmediate(1)); - const _eq = (eq ||= OperatorNode.create('=')); - if (node.operator.operator === 'in') { - return (contradiction ||= BinaryOperationNode.create(_one, _eq, ValueNode.createImmediate(0))); - } - return (tautology ||= BinaryOperationNode.create(_one, _eq, _one)); -} -let char; -let listNull; -let listVal; -/** - * When `in`, pushes a `null` value into the list resulting in `in (null)`. This - * is how TypeORM and Sequelize handle `in ()`. `in (null)` is logically the equivalent - * of `= null`, which returns `null`, which is a falsy expression in most SQL databases. - * We recommend NOT using this strategy if you plan to use `in` in `select`, `returning`, - * or `output` clauses, as the return type differs from the `SqlBool` default type. - * - * When `not in`, casts the left operand as `char` and pushes a literal value into - * the list resulting in `cast({{lhs}} as char) not in ({{VALUE}})`. Casting - * is required to avoid database errors with non-string columns. - * - * See {@link replaceWithNoncontingentExpression} for an alternative strategy. - */ -export function pushValueIntoList(uniqueNotInLiteral) { - return function pushValueIntoList(node) { - if (node.operator.operator === 'in') { - return freeze({ - ...node, - rightOperand: (listNull ||= ValueListNode.create([ - ValueNode.createImmediate(null), - ])), - }); - } - return freeze({ - ...node, - leftOperand: CastNode.create(node.leftOperand, (char ||= DataTypeNode.create('char'))), - rightOperand: (listVal ||= ValueListNode.create([ - ValueNode.createImmediate(uniqueNotInLiteral), - ])), - }); - }; -} diff --git a/node_modules/kysely/dist/esm/plugin/immediate-value/immediate-value-plugin.d.ts b/node_modules/kysely/dist/esm/plugin/immediate-value/immediate-value-plugin.d.ts deleted file mode 100644 index a31e937..0000000 --- a/node_modules/kysely/dist/esm/plugin/immediate-value/immediate-value-plugin.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -import type { QueryResult } from '../../driver/database-connection.js'; -import type { RootOperationNode } from '../../query-compiler/query-compiler.js'; -import type { UnknownRow } from '../../util/type-utils.js'; -import type { KyselyPlugin, PluginTransformQueryArgs, PluginTransformResultArgs } from '../kysely-plugin.js'; -/** - * Transforms all ValueNodes to immediate. - * - * WARNING! This should never be part of the public API. Users should never use this. - * This is an internal helper. - * - * @internal - */ -export declare class ImmediateValuePlugin implements KyselyPlugin { - #private; - /** - * This is called for each query before it is executed. You can modify the query by - * transforming its {@link OperationNode} tree provided in {@link PluginTransformQueryArgs.node | args.node} - * and returning the transformed tree. You'd usually want to use an {@link OperationNodeTransformer} - * for this. - * - * If you need to pass some query-related data between this method and `transformResult` you - * can use a `WeakMap` with {@link PluginTransformQueryArgs.queryId | args.queryId} as the key: - * - * ```ts - * import type { - * KyselyPlugin, - * QueryResult, - * RootOperationNode, - * UnknownRow - * } from 'kysely' - * - * interface MyData { - * // ... - * } - * const data = new WeakMap() - * - * const plugin = { - * transformQuery(args: PluginTransformQueryArgs): RootOperationNode { - * const something: MyData = {} - * - * // ... - * - * data.set(args.queryId, something) - * - * // ... - * - * return args.node - * }, - * - * async transformResult(args: PluginTransformResultArgs): Promise> { - * // ... - * - * const something = data.get(args.queryId) - * - * // ... - * - * return args.result - * } - * } satisfies KyselyPlugin - * ``` - * - * You should use a `WeakMap` instead of a `Map` or some other strong references because `transformQuery` - * is not always matched by a call to `transformResult` which would leave orphaned items in the map - * and cause a memory leak. - */ - transformQuery(args: PluginTransformQueryArgs): RootOperationNode; - /** - * This method is called for each query after it has been executed. The result - * of the query can be accessed through {@link PluginTransformResultArgs.result | args.result}. - * You can modify the result and return the modifier result. - */ - transformResult(args: PluginTransformResultArgs): Promise>; -} diff --git a/node_modules/kysely/dist/esm/plugin/immediate-value/immediate-value-plugin.js b/node_modules/kysely/dist/esm/plugin/immediate-value/immediate-value-plugin.js deleted file mode 100644 index bf8b4b3..0000000 --- a/node_modules/kysely/dist/esm/plugin/immediate-value/immediate-value-plugin.js +++ /dev/null @@ -1,19 +0,0 @@ -/// -import { ImmediateValueTransformer } from './immediate-value-transformer.js'; -/** - * Transforms all ValueNodes to immediate. - * - * WARNING! This should never be part of the public API. Users should never use this. - * This is an internal helper. - * - * @internal - */ -export class ImmediateValuePlugin { - #transformer = new ImmediateValueTransformer(); - transformQuery(args) { - return this.#transformer.transformNode(args.node, args.queryId); - } - transformResult(args) { - return Promise.resolve(args.result); - } -} diff --git a/node_modules/kysely/dist/esm/plugin/immediate-value/immediate-value-transformer.d.ts b/node_modules/kysely/dist/esm/plugin/immediate-value/immediate-value-transformer.d.ts deleted file mode 100644 index 69b5d65..0000000 --- a/node_modules/kysely/dist/esm/plugin/immediate-value/immediate-value-transformer.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { OperationNodeTransformer } from '../../operation-node/operation-node-transformer.js'; -import type { PrimitiveValueListNode } from '../../operation-node/primitive-value-list-node.js'; -import { ValueNode } from '../../operation-node/value-node.js'; -/** - * Transforms all ValueNodes to immediate. - * - * WARNING! This should never be part of the public API. Users should never use this. - * This is an internal helper. - * - * @internal - */ -export declare class ImmediateValueTransformer extends OperationNodeTransformer { - transformPrimitiveValueList(node: PrimitiveValueListNode): PrimitiveValueListNode; - transformValue(node: ValueNode): ValueNode; -} diff --git a/node_modules/kysely/dist/esm/plugin/immediate-value/immediate-value-transformer.js b/node_modules/kysely/dist/esm/plugin/immediate-value/immediate-value-transformer.js deleted file mode 100644 index fbd5d46..0000000 --- a/node_modules/kysely/dist/esm/plugin/immediate-value/immediate-value-transformer.js +++ /dev/null @@ -1,20 +0,0 @@ -/// -import { OperationNodeTransformer } from '../../operation-node/operation-node-transformer.js'; -import { ValueListNode } from '../../operation-node/value-list-node.js'; -import { ValueNode } from '../../operation-node/value-node.js'; -/** - * Transforms all ValueNodes to immediate. - * - * WARNING! This should never be part of the public API. Users should never use this. - * This is an internal helper. - * - * @internal - */ -export class ImmediateValueTransformer extends OperationNodeTransformer { - transformPrimitiveValueList(node) { - return ValueListNode.create(node.values.map(ValueNode.createImmediate)); - } - transformValue(node) { - return ValueNode.createImmediate(node.value); - } -} diff --git a/node_modules/kysely/dist/esm/plugin/kysely-plugin.d.ts b/node_modules/kysely/dist/esm/plugin/kysely-plugin.d.ts deleted file mode 100644 index 91e9715..0000000 --- a/node_modules/kysely/dist/esm/plugin/kysely-plugin.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -import type { QueryResult } from '../driver/database-connection.js'; -import type { RootOperationNode } from '../query-compiler/query-compiler.js'; -import type { QueryId } from '../util/query-id.js'; -import type { UnknownRow } from '../util/type-utils.js'; -export interface KyselyPlugin { - /** - * This is called for each query before it is executed. You can modify the query by - * transforming its {@link OperationNode} tree provided in {@link PluginTransformQueryArgs.node | args.node} - * and returning the transformed tree. You'd usually want to use an {@link OperationNodeTransformer} - * for this. - * - * If you need to pass some query-related data between this method and `transformResult` you - * can use a `WeakMap` with {@link PluginTransformQueryArgs.queryId | args.queryId} as the key: - * - * ```ts - * import type { - * KyselyPlugin, - * QueryResult, - * RootOperationNode, - * UnknownRow - * } from 'kysely' - * - * interface MyData { - * // ... - * } - * const data = new WeakMap() - * - * const plugin = { - * transformQuery(args: PluginTransformQueryArgs): RootOperationNode { - * const something: MyData = {} - * - * // ... - * - * data.set(args.queryId, something) - * - * // ... - * - * return args.node - * }, - * - * async transformResult(args: PluginTransformResultArgs): Promise> { - * // ... - * - * const something = data.get(args.queryId) - * - * // ... - * - * return args.result - * } - * } satisfies KyselyPlugin - * ``` - * - * You should use a `WeakMap` instead of a `Map` or some other strong references because `transformQuery` - * is not always matched by a call to `transformResult` which would leave orphaned items in the map - * and cause a memory leak. - */ - transformQuery(args: PluginTransformQueryArgs): RootOperationNode; - /** - * This method is called for each query after it has been executed. The result - * of the query can be accessed through {@link PluginTransformResultArgs.result | args.result}. - * You can modify the result and return the modifier result. - */ - transformResult(args: PluginTransformResultArgs): Promise>; -} -export interface PluginTransformQueryArgs { - readonly queryId: QueryId; - readonly node: RootOperationNode; -} -export interface PluginTransformResultArgs { - readonly queryId: QueryId; - readonly result: QueryResult; -} diff --git a/node_modules/kysely/dist/esm/plugin/kysely-plugin.js b/node_modules/kysely/dist/esm/plugin/kysely-plugin.js deleted file mode 100644 index cdd3e5e..0000000 --- a/node_modules/kysely/dist/esm/plugin/kysely-plugin.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/plugin/noop-plugin.d.ts b/node_modules/kysely/dist/esm/plugin/noop-plugin.d.ts deleted file mode 100644 index b3695cd..0000000 --- a/node_modules/kysely/dist/esm/plugin/noop-plugin.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -import type { QueryResult } from '../driver/database-connection.js'; -import type { RootOperationNode } from '../query-compiler/query-compiler.js'; -import type { UnknownRow } from '../util/type-utils.js'; -import type { KyselyPlugin, PluginTransformQueryArgs, PluginTransformResultArgs } from './kysely-plugin.js'; -export declare class NoopPlugin implements KyselyPlugin { - /** - * This is called for each query before it is executed. You can modify the query by - * transforming its {@link OperationNode} tree provided in {@link PluginTransformQueryArgs.node | args.node} - * and returning the transformed tree. You'd usually want to use an {@link OperationNodeTransformer} - * for this. - * - * If you need to pass some query-related data between this method and `transformResult` you - * can use a `WeakMap` with {@link PluginTransformQueryArgs.queryId | args.queryId} as the key: - * - * ```ts - * import type { - * KyselyPlugin, - * QueryResult, - * RootOperationNode, - * UnknownRow - * } from 'kysely' - * - * interface MyData { - * // ... - * } - * const data = new WeakMap() - * - * const plugin = { - * transformQuery(args: PluginTransformQueryArgs): RootOperationNode { - * const something: MyData = {} - * - * // ... - * - * data.set(args.queryId, something) - * - * // ... - * - * return args.node - * }, - * - * async transformResult(args: PluginTransformResultArgs): Promise> { - * // ... - * - * const something = data.get(args.queryId) - * - * // ... - * - * return args.result - * } - * } satisfies KyselyPlugin - * ``` - * - * You should use a `WeakMap` instead of a `Map` or some other strong references because `transformQuery` - * is not always matched by a call to `transformResult` which would leave orphaned items in the map - * and cause a memory leak. - */ - transformQuery(args: PluginTransformQueryArgs): RootOperationNode; - /** - * This method is called for each query after it has been executed. The result - * of the query can be accessed through {@link PluginTransformResultArgs.result | args.result}. - * You can modify the result and return the modifier result. - */ - transformResult(args: PluginTransformResultArgs): Promise>; -} diff --git a/node_modules/kysely/dist/esm/plugin/noop-plugin.js b/node_modules/kysely/dist/esm/plugin/noop-plugin.js deleted file mode 100644 index b8072bf..0000000 --- a/node_modules/kysely/dist/esm/plugin/noop-plugin.js +++ /dev/null @@ -1,9 +0,0 @@ -/// -export class NoopPlugin { - transformQuery(args) { - return args.node; - } - async transformResult(args) { - return args.result; - } -} diff --git a/node_modules/kysely/dist/esm/plugin/parse-json-results/parse-json-results-plugin.d.ts b/node_modules/kysely/dist/esm/plugin/parse-json-results/parse-json-results-plugin.d.ts deleted file mode 100644 index aaac929..0000000 --- a/node_modules/kysely/dist/esm/plugin/parse-json-results/parse-json-results-plugin.d.ts +++ /dev/null @@ -1,126 +0,0 @@ -import type { QueryResult } from '../../driver/database-connection.js'; -import type { RootOperationNode } from '../../query-compiler/query-compiler.js'; -import type { UnknownRow } from '../../util/type-utils.js'; -import type { KyselyPlugin, PluginTransformQueryArgs, PluginTransformResultArgs } from '../kysely-plugin.js'; -export interface ParseJSONResultsPluginOptions { - /** - * When `'in-place'`, arrays' and objects' values are parsed in-place. This is - * the most time and space efficient option. - * - * This can result in runtime errors if some objects/arrays are readonly. - * - * When `'create'`, new arrays and objects are created to avoid such errors. - * - * Defaults to `'in-place'`. - */ - objectStrategy?: ObjectStrategy; -} -type ObjectStrategy = 'in-place' | 'create'; -/** - * Parses JSON strings in query results into JSON objects. - * - * This plugin can be useful with dialects that don't automatically parse - * JSON into objects and arrays but return JSON strings instead. - * - * To apply this plugin globally, pass an instance of it to the `plugins` option - * when creating a new `Kysely` instance: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { Kysely, ParseJSONResultsPlugin, SqliteDialect } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }), - * plugins: [new ParseJSONResultsPlugin()], - * }) - * ``` - * - * To apply this plugin to a single query: - * - * ```ts - * import { ParseJSONResultsPlugin } from 'kysely' - * import { jsonArrayFrom } from 'kysely/helpers/sqlite' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * 'first_name', - * 'last_name', - * jsonArrayFrom( - * eb.selectFrom('pet') - * .whereRef('owner_id', '=', 'person.id') - * .select(['name', 'species']) - * ).as('pets') - * ]) - * .withPlugin(new ParseJSONResultsPlugin()) - * .execute() - * ``` - */ -export declare class ParseJSONResultsPlugin implements KyselyPlugin { - #private; - readonly opt: ParseJSONResultsPluginOptions; - constructor(opt?: ParseJSONResultsPluginOptions); - /** - * This is called for each query before it is executed. You can modify the query by - * transforming its {@link OperationNode} tree provided in {@link PluginTransformQueryArgs.node | args.node} - * and returning the transformed tree. You'd usually want to use an {@link OperationNodeTransformer} - * for this. - * - * If you need to pass some query-related data between this method and `transformResult` you - * can use a `WeakMap` with {@link PluginTransformQueryArgs.queryId | args.queryId} as the key: - * - * ```ts - * import type { - * KyselyPlugin, - * QueryResult, - * RootOperationNode, - * UnknownRow - * } from 'kysely' - * - * interface MyData { - * // ... - * } - * const data = new WeakMap() - * - * const plugin = { - * transformQuery(args: PluginTransformQueryArgs): RootOperationNode { - * const something: MyData = {} - * - * // ... - * - * data.set(args.queryId, something) - * - * // ... - * - * return args.node - * }, - * - * async transformResult(args: PluginTransformResultArgs): Promise> { - * // ... - * - * const something = data.get(args.queryId) - * - * // ... - * - * return args.result - * } - * } satisfies KyselyPlugin - * ``` - * - * You should use a `WeakMap` instead of a `Map` or some other strong references because `transformQuery` - * is not always matched by a call to `transformResult` which would leave orphaned items in the map - * and cause a memory leak. - */ - transformQuery(args: PluginTransformQueryArgs): RootOperationNode; - /** - * This method is called for each query after it has been executed. The result - * of the query can be accessed through {@link PluginTransformResultArgs.result | args.result}. - * You can modify the result and return the modifier result. - */ - transformResult(args: PluginTransformResultArgs): Promise>; -} -export {}; diff --git a/node_modules/kysely/dist/esm/plugin/parse-json-results/parse-json-results-plugin.js b/node_modules/kysely/dist/esm/plugin/parse-json-results/parse-json-results-plugin.js deleted file mode 100644 index 84d54fc..0000000 --- a/node_modules/kysely/dist/esm/plugin/parse-json-results/parse-json-results-plugin.js +++ /dev/null @@ -1,104 +0,0 @@ -/// -import { isPlainObject, isString } from '../../util/object-utils.js'; -/** - * Parses JSON strings in query results into JSON objects. - * - * This plugin can be useful with dialects that don't automatically parse - * JSON into objects and arrays but return JSON strings instead. - * - * To apply this plugin globally, pass an instance of it to the `plugins` option - * when creating a new `Kysely` instance: - * - * ```ts - * import * as Sqlite from 'better-sqlite3' - * import { Kysely, ParseJSONResultsPlugin, SqliteDialect } from 'kysely' - * import type { Database } from 'type-editor' // imaginary module - * - * const db = new Kysely({ - * dialect: new SqliteDialect({ - * database: new Sqlite(':memory:'), - * }), - * plugins: [new ParseJSONResultsPlugin()], - * }) - * ``` - * - * To apply this plugin to a single query: - * - * ```ts - * import { ParseJSONResultsPlugin } from 'kysely' - * import { jsonArrayFrom } from 'kysely/helpers/sqlite' - * - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * 'id', - * 'first_name', - * 'last_name', - * jsonArrayFrom( - * eb.selectFrom('pet') - * .whereRef('owner_id', '=', 'person.id') - * .select(['name', 'species']) - * ).as('pets') - * ]) - * .withPlugin(new ParseJSONResultsPlugin()) - * .execute() - * ``` - */ -export class ParseJSONResultsPlugin { - opt; - #objectStrategy; - constructor(opt = {}) { - this.opt = opt; - this.#objectStrategy = opt.objectStrategy || 'in-place'; - } - // noop - transformQuery(args) { - return args.node; - } - async transformResult(args) { - return { - ...args.result, - rows: parseArray(args.result.rows, this.#objectStrategy), - }; - } -} -function parseArray(arr, objectStrategy) { - const target = objectStrategy === 'create' ? new Array(arr.length) : arr; - for (let i = 0; i < arr.length; ++i) { - target[i] = parse(arr[i], objectStrategy); - } - return target; -} -function parse(obj, objectStrategy) { - if (isString(obj)) { - return parseString(obj); - } - if (Array.isArray(obj)) { - return parseArray(obj, objectStrategy); - } - if (isPlainObject(obj)) { - return parseObject(obj, objectStrategy); - } - return obj; -} -function parseString(str) { - if (maybeJson(str)) { - try { - return parse(JSON.parse(str), 'in-place'); - } - catch (err) { - // this catch block is intentionally empty. - } - } - return str; -} -function maybeJson(value) { - return value.match(/^[\[\{]/) != null; -} -function parseObject(obj, objectStrategy) { - const target = objectStrategy === 'create' ? {} : obj; - for (const key in obj) { - target[key] = parse(obj[key], objectStrategy); - } - return target; -} diff --git a/node_modules/kysely/dist/esm/plugin/with-schema/with-schema-plugin.d.ts b/node_modules/kysely/dist/esm/plugin/with-schema/with-schema-plugin.d.ts deleted file mode 100644 index 58cdef2..0000000 --- a/node_modules/kysely/dist/esm/plugin/with-schema/with-schema-plugin.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -import type { QueryResult } from '../../driver/database-connection.js'; -import type { RootOperationNode } from '../../query-compiler/query-compiler.js'; -import type { KyselyPlugin, PluginTransformQueryArgs, PluginTransformResultArgs } from '../kysely-plugin.js'; -import type { UnknownRow } from '../../util/type-utils.js'; -export declare class WithSchemaPlugin implements KyselyPlugin { - #private; - constructor(schema: string); - /** - * This is called for each query before it is executed. You can modify the query by - * transforming its {@link OperationNode} tree provided in {@link PluginTransformQueryArgs.node | args.node} - * and returning the transformed tree. You'd usually want to use an {@link OperationNodeTransformer} - * for this. - * - * If you need to pass some query-related data between this method and `transformResult` you - * can use a `WeakMap` with {@link PluginTransformQueryArgs.queryId | args.queryId} as the key: - * - * ```ts - * import type { - * KyselyPlugin, - * QueryResult, - * RootOperationNode, - * UnknownRow - * } from 'kysely' - * - * interface MyData { - * // ... - * } - * const data = new WeakMap() - * - * const plugin = { - * transformQuery(args: PluginTransformQueryArgs): RootOperationNode { - * const something: MyData = {} - * - * // ... - * - * data.set(args.queryId, something) - * - * // ... - * - * return args.node - * }, - * - * async transformResult(args: PluginTransformResultArgs): Promise> { - * // ... - * - * const something = data.get(args.queryId) - * - * // ... - * - * return args.result - * } - * } satisfies KyselyPlugin - * ``` - * - * You should use a `WeakMap` instead of a `Map` or some other strong references because `transformQuery` - * is not always matched by a call to `transformResult` which would leave orphaned items in the map - * and cause a memory leak. - */ - transformQuery(args: PluginTransformQueryArgs): RootOperationNode; - /** - * This method is called for each query after it has been executed. The result - * of the query can be accessed through {@link PluginTransformResultArgs.result | args.result}. - * You can modify the result and return the modifier result. - */ - transformResult(args: PluginTransformResultArgs): Promise>; -} diff --git a/node_modules/kysely/dist/esm/plugin/with-schema/with-schema-plugin.js b/node_modules/kysely/dist/esm/plugin/with-schema/with-schema-plugin.js deleted file mode 100644 index 468bfc9..0000000 --- a/node_modules/kysely/dist/esm/plugin/with-schema/with-schema-plugin.js +++ /dev/null @@ -1,14 +0,0 @@ -/// -import { WithSchemaTransformer } from './with-schema-transformer.js'; -export class WithSchemaPlugin { - #transformer; - constructor(schema) { - this.#transformer = new WithSchemaTransformer(schema); - } - transformQuery(args) { - return this.#transformer.transformNode(args.node, args.queryId); - } - async transformResult(args) { - return args.result; - } -} diff --git a/node_modules/kysely/dist/esm/plugin/with-schema/with-schema-transformer.d.ts b/node_modules/kysely/dist/esm/plugin/with-schema/with-schema-transformer.d.ts deleted file mode 100644 index b7adb03..0000000 --- a/node_modules/kysely/dist/esm/plugin/with-schema/with-schema-transformer.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { AggregateFunctionNode } from '../../operation-node/aggregate-function-node.js'; -import type { FunctionNode } from '../../operation-node/function-node.js'; -import { OperationNodeTransformer } from '../../operation-node/operation-node-transformer.js'; -import type { OperationNode } from '../../operation-node/operation-node.js'; -import type { ReferencesNode } from '../../operation-node/references-node.js'; -import { SchemableIdentifierNode } from '../../operation-node/schemable-identifier-node.js'; -import type { SelectModifierNode } from '../../operation-node/select-modifier-node.js'; -import type { QueryId } from '../../util/query-id.js'; -export declare class WithSchemaTransformer extends OperationNodeTransformer { - #private; - constructor(schema: string); - protected transformNodeImpl(node: T, queryId: QueryId): T; - protected transformSchemableIdentifier(node: SchemableIdentifierNode, queryId: QueryId): SchemableIdentifierNode; - protected transformReferences(node: ReferencesNode, queryId: QueryId): ReferencesNode; - protected transformAggregateFunction(node: AggregateFunctionNode, queryId: QueryId): AggregateFunctionNode; - protected transformFunction(node: FunctionNode, queryId: QueryId): FunctionNode; - protected transformSelectModifier(node: SelectModifierNode, queryId: QueryId): SelectModifierNode; -} diff --git a/node_modules/kysely/dist/esm/plugin/with-schema/with-schema-transformer.js b/node_modules/kysely/dist/esm/plugin/with-schema/with-schema-transformer.js deleted file mode 100644 index 875e010..0000000 --- a/node_modules/kysely/dist/esm/plugin/with-schema/with-schema-transformer.js +++ /dev/null @@ -1,197 +0,0 @@ -/// -import { AliasNode } from '../../operation-node/alias-node.js'; -import { IdentifierNode } from '../../operation-node/identifier-node.js'; -import { JoinNode } from '../../operation-node/join-node.js'; -import { ListNode } from '../../operation-node/list-node.js'; -import { OperationNodeTransformer } from '../../operation-node/operation-node-transformer.js'; -import { SchemableIdentifierNode } from '../../operation-node/schemable-identifier-node.js'; -import { TableNode } from '../../operation-node/table-node.js'; -import { UsingNode } from '../../operation-node/using-node.js'; -import { freeze } from '../../util/object-utils.js'; -// This object exist only so that we get a type error when a new RootOperationNode -// is added. If you get a type error here, make sure to add the new root node and -// handle it correctly in the transformer. -// -// DO NOT REFACTOR THIS EVEN IF IT SEEMS USELESS TO YOU! -const ROOT_OPERATION_NODES = freeze({ - AlterTableNode: true, - CreateIndexNode: true, - CreateSchemaNode: true, - CreateTableNode: true, - CreateTypeNode: true, - CreateViewNode: true, - RefreshMaterializedViewNode: true, - DeleteQueryNode: true, - DropIndexNode: true, - DropSchemaNode: true, - DropTableNode: true, - DropTypeNode: true, - DropViewNode: true, - InsertQueryNode: true, - RawNode: true, - SelectQueryNode: true, - UpdateQueryNode: true, - MergeQueryNode: true, -}); -const SCHEMALESS_FUNCTIONS = { - json_agg: true, - to_json: true, -}; -export class WithSchemaTransformer extends OperationNodeTransformer { - #schema; - #schemableIds = new Set(); - #ctes = new Set(); - constructor(schema) { - super(); - this.#schema = schema; - } - transformNodeImpl(node, queryId) { - if (!this.#isRootOperationNode(node)) { - return super.transformNodeImpl(node, queryId); - } - const ctes = this.#collectCTEs(node); - for (const cte of ctes) { - this.#ctes.add(cte); - } - const tables = this.#collectSchemableIds(node); - for (const table of tables) { - this.#schemableIds.add(table); - } - const transformed = super.transformNodeImpl(node, queryId); - for (const table of tables) { - this.#schemableIds.delete(table); - } - for (const cte of ctes) { - this.#ctes.delete(cte); - } - return transformed; - } - transformSchemableIdentifier(node, queryId) { - const transformed = super.transformSchemableIdentifier(node, queryId); - if (transformed.schema || !this.#schemableIds.has(node.identifier.name)) { - return transformed; - } - return { - ...transformed, - schema: IdentifierNode.create(this.#schema), - }; - } - transformReferences(node, queryId) { - const transformed = super.transformReferences(node, queryId); - if (transformed.table.table.schema) { - return transformed; - } - return { - ...transformed, - table: TableNode.createWithSchema(this.#schema, transformed.table.table.identifier.name), - }; - } - transformAggregateFunction(node, queryId) { - return { - ...super.transformAggregateFunction({ ...node, aggregated: [] }, queryId), - aggregated: this.#transformTableArgsWithoutSchemas(node, queryId, 'aggregated'), - }; - } - transformFunction(node, queryId) { - return { - ...super.transformFunction({ ...node, arguments: [] }, queryId), - arguments: this.#transformTableArgsWithoutSchemas(node, queryId, 'arguments'), - }; - } - transformSelectModifier(node, queryId) { - return { - ...super.transformSelectModifier({ ...node, of: undefined }, queryId), - of: node.of?.map((item) => TableNode.is(item) && !item.table.schema - ? { - ...item, - table: this.transformIdentifier(item.table.identifier, queryId), - } - : this.transformNode(item, queryId)), - }; - } - #transformTableArgsWithoutSchemas(node, queryId, argsKey) { - return SCHEMALESS_FUNCTIONS[node.func] - ? node[argsKey].map((arg) => !TableNode.is(arg) || arg.table.schema - ? this.transformNode(arg, queryId) - : { - ...arg, - table: this.transformIdentifier(arg.table.identifier, queryId), - }) - : this.transformNodeList(node[argsKey], queryId); - } - #isRootOperationNode(node) { - return node.kind in ROOT_OPERATION_NODES; - } - #collectSchemableIds(node) { - const schemableIds = new Set(); - if ('name' in node && node.name && SchemableIdentifierNode.is(node.name)) { - this.#collectSchemableId(node.name, schemableIds); - } - if ('from' in node && node.from) { - for (const from of node.from.froms) { - this.#collectSchemableIdsFromTableExpr(from, schemableIds); - } - } - if ('into' in node && node.into) { - this.#collectSchemableIdsFromTableExpr(node.into, schemableIds); - } - if ('table' in node && node.table) { - this.#collectSchemableIdsFromTableExpr(node.table, schemableIds); - } - if ('joins' in node && node.joins) { - for (const join of node.joins) { - this.#collectSchemableIdsFromTableExpr(join.table, schemableIds); - } - } - if ('using' in node && node.using) { - if (JoinNode.is(node.using)) { - this.#collectSchemableIdsFromTableExpr(node.using.table, schemableIds); - } - else { - this.#collectSchemableIdsFromTableExpr(node.using, schemableIds); - } - } - return schemableIds; - } - #collectCTEs(node) { - const ctes = new Set(); - if ('with' in node && node.with) { - this.#collectCTEIds(node.with, ctes); - } - return ctes; - } - #collectSchemableIdsFromTableExpr(node, schemableIds) { - if (TableNode.is(node)) { - return this.#collectSchemableId(node.table, schemableIds); - } - if (AliasNode.is(node) && TableNode.is(node.node)) { - return this.#collectSchemableId(node.node.table, schemableIds); - } - if (ListNode.is(node)) { - for (const table of node.items) { - this.#collectSchemableIdsFromTableExpr(table, schemableIds); - } - return; - } - if (UsingNode.is(node)) { - for (const table of node.tables) { - this.#collectSchemableIdsFromTableExpr(table, schemableIds); - } - return; - } - } - #collectSchemableId(node, schemableIds) { - const id = node.identifier.name; - if (!this.#schemableIds.has(id) && !this.#ctes.has(id)) { - schemableIds.add(id); - } - } - #collectCTEIds(node, ctes) { - for (const expr of node.expressions) { - const cteId = expr.name.table.table.identifier.name; - if (!this.#ctes.has(cteId)) { - ctes.add(cteId); - } - } - } -} diff --git a/node_modules/kysely/dist/esm/query-builder/aggregate-function-builder.d.ts b/node_modules/kysely/dist/esm/query-builder/aggregate-function-builder.d.ts deleted file mode 100644 index bfaedaf..0000000 --- a/node_modules/kysely/dist/esm/query-builder/aggregate-function-builder.d.ts +++ /dev/null @@ -1,379 +0,0 @@ -import { AggregateFunctionNode } from '../operation-node/aggregate-function-node.js'; -import { AliasNode } from '../operation-node/alias-node.js'; -import type { OverBuilder } from './over-builder.js'; -import type { AliasableExpression, AliasedExpression, Expression } from '../expression/expression.js'; -import type { ReferenceExpression } from '../parser/reference-parser.js'; -import { type ComparisonOperatorExpression, type OperandValueExpressionOrList } from '../parser/binary-operation-parser.js'; -import type { SqlBool } from '../util/type-utils.js'; -import type { ExpressionOrFactory } from '../parser/expression-parser.js'; -import { type DirectedOrderByStringReference, type OrderByExpression, type OrderByModifiers } from '../parser/order-by-parser.js'; -import type { OrderByInterface } from './order-by-interface.js'; -export declare class AggregateFunctionBuilder implements OrderByInterface, AliasableExpression { - #private; - constructor(props: AggregateFunctionBuilderProps); - /** @private */ - /** - * All expressions need to have this getter for complicated type-related reasons. - * Simply add this getter for your expression and always return `undefined` from it: - * - * ### Examples - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - * - * The getter is needed to make the expression assignable to another expression only - * if the types `T` are assignable. Without this property (or some other property - * that references `T`), you could assing `Expression` to `Expression`. - */ - get expressionType(): O | undefined; - /** - * Returns an aliased version of the function. - * - * In addition to slapping `as "the_alias"` to the end of the SQL, - * this method also provides strict typing: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select( - * (eb) => eb.fn.count('id').as('person_count') - * ) - * .executeTakeFirstOrThrow() - * - * // `person_count: number` field exists in the result type. - * console.log(result.person_count) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select count("id") as "person_count" - * from "person" - * ``` - */ - as(alias: A): AliasedAggregateFunctionBuilder; - /** - * Adds a `distinct` clause inside the function. - * - * ### Examples - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => - * eb.fn.count('first_name').distinct().as('first_name_count') - * ) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select count(distinct "first_name") as "first_name_count" - * from "person" - * ``` - */ - distinct(): AggregateFunctionBuilder; - /** - * Adds an `order by` clause inside the aggregate function. - * - * ### Examples - * - * ```ts - * const result = await db - * .selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .select((eb) => - * eb.fn.jsonAgg('pet').orderBy('pet.name').as('person_pets') - * ) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select json_agg("pet" order by "pet"."name") as "person_pets" - * from "person" - * inner join "pet" ON "pet"."owner_id" = "person"."id" - * ``` - */ - orderBy>(expr: OE, modifiers?: OrderByModifiers): AggregateFunctionBuilder; - /** - * @deprecated It does ~2-2.6x more compile-time instantiations compared to multiple chained `orderBy(expr, modifiers?)` calls (in `order by` clauses with reasonable item counts), and has broken autocompletion. - */ - orderBy | DirectedOrderByStringReference>(exprs: ReadonlyArray): AggregateFunctionBuilder; - /** - * @deprecated It does ~2.9x more compile-time instantiations compared to a `orderBy(expr, direction)` call. - */ - orderBy>(expr: OE): AggregateFunctionBuilder; - /** - * @deprecated Use `orderBy(expr, (ob) => ...)` instead. - */ - orderBy>(expr: OE, modifiers: Expression): AggregateFunctionBuilder; - /** - * Clears the `order by` clause from the query. - * - * See {@link orderBy} for adding an `order by` clause or item to a query. - * - * ### Examples - * - * ```ts - * const query = db - * .selectFrom('person') - * .selectAll() - * .orderBy('id', 'desc') - * - * const results = await query - * .clearOrderBy() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearOrderBy(): AggregateFunctionBuilder; - /** - * Adds a `withing group` clause with a nested `order by` clause after the function. - * - * This is only supported by some dialects like PostgreSQL or MS SQL Server. - * - * ### Examples - * - * Most frequent person name: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * eb.fn - * .agg('mode') - * .withinGroupOrderBy('person.first_name') - * .as('most_frequent_name') - * ]) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select mode() within group (order by "person"."first_name") as "most_frequent_name" - * from "person" - * ``` - */ - withinGroupOrderBy>(expr: OE, modifiers?: OrderByModifiers): AggregateFunctionBuilder; - /** - * @deprecated It does ~2-2.6x more compile-time instantiations compared to multiple chained `withinGroupOrderBy(expr, modifiers?)` calls (in `order by` clauses with reasonable item counts), and has broken autocompletion. - */ - withinGroupOrderBy | DirectedOrderByStringReference>(exprs: ReadonlyArray): AggregateFunctionBuilder; - /** - * @deprecated It does ~2.9x more compile-time instantiations compared to a `withinGroupOrderBy(expr, direction)` call. - */ - withinGroupOrderBy>(expr: OE): AggregateFunctionBuilder; - /** - * @deprecated Use `withinGroupOrderBy(expr, (ob) => ...)` instead. - */ - withinGroupOrderBy>(expr: OE, modifiers: Expression): AggregateFunctionBuilder; - /** - * Adds a `filter` clause with a nested `where` clause after the function. - * - * Similar to {@link WhereInterface}'s `where` method. - * - * Also see {@link filterWhereRef}. - * - * ### Examples - * - * Count by gender: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * eb.fn - * .count('id') - * .filterWhere('gender', '=', 'female') - * .as('female_count'), - * eb.fn - * .count('id') - * .filterWhere('gender', '=', 'male') - * .as('male_count'), - * eb.fn - * .count('id') - * .filterWhere('gender', '=', 'other') - * .as('other_count'), - * ]) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * count("id") filter(where "gender" = $1) as "female_count", - * count("id") filter(where "gender" = $2) as "male_count", - * count("id") filter(where "gender" = $3) as "other_count" - * from "person" - * ``` - */ - filterWhere, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): AggregateFunctionBuilder; - filterWhere>(expression: E): AggregateFunctionBuilder; - /** - * Adds a `filter` clause with a nested `where` clause after the function, where - * both sides of the operator are references to columns. - * - * Similar to {@link WhereInterface}'s `whereRef` method. - * - * ### Examples - * - * Count people with same first and last names versus general public: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * eb.fn - * .count('id') - * .filterWhereRef('first_name', '=', 'last_name') - * .as('repeat_name_count'), - * eb.fn.count('id').as('total_count'), - * ]) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * count("id") filter(where "first_name" = "last_name") as "repeat_name_count", - * count("id") as "total_count" - * from "person" - * ``` - */ - filterWhereRef, RRE extends ReferenceExpression>(lhs: LRE, op: ComparisonOperatorExpression, rhs: RRE): AggregateFunctionBuilder; - /** - * Adds an `over` clause (window functions) after the function. - * - * ### Examples - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select( - * (eb) => eb.fn.avg('age').over().as('average_age') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select avg("age") over() as "average_age" - * from "person" - * ``` - * - * Also supports passing a callback that returns an over builder, - * allowing to add partition by and sort by clauses inside over. - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select( - * (eb) => eb.fn.avg('age').over( - * ob => ob.partitionBy('last_name').orderBy('first_name', 'asc') - * ).as('average_age') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select avg("age") over(partition by "last_name" order by "first_name" asc) as "average_age" - * from "person" - * ``` - */ - over(over?: OverBuilderCallback): AggregateFunctionBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - /** - * Casts the expression to the given type. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `AggregateFunctionBuilder` with a new output type. - */ - $castTo(): AggregateFunctionBuilder; - /** - * Omit null from the expression's type. - * - * This function can be useful in cases where you know an expression can't be - * null, but Kysely is unable to infer it. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of `this` with a new output type. - */ - $notNull(): AggregateFunctionBuilder>; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - * - * ### Examples - * - * If you are creating a custom expression, it's often easiest to use the {@link sql} - * template tag to build the node: - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - */ - toOperationNode(): AggregateFunctionNode; -} -/** - * {@link AggregateFunctionBuilder} with an alias. The result of calling {@link AggregateFunctionBuilder.as}. - */ -export declare class AliasedAggregateFunctionBuilder implements AliasedExpression { - #private; - constructor(aggregateFunctionBuilder: AggregateFunctionBuilder, alias: A); - /** @private */ - /** - * Returns the aliased expression. - */ - get expression(): Expression; - /** @private */ - /** - * Returns the alias. - */ - get alias(): A; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - */ - toOperationNode(): AliasNode; -} -export interface AggregateFunctionBuilderProps { - aggregateFunctionNode: AggregateFunctionNode; -} -export type OverBuilderCallback = (builder: OverBuilder) => OverBuilder; diff --git a/node_modules/kysely/dist/esm/query-builder/aggregate-function-builder.js b/node_modules/kysely/dist/esm/query-builder/aggregate-function-builder.js deleted file mode 100644 index f44b4e9..0000000 --- a/node_modules/kysely/dist/esm/query-builder/aggregate-function-builder.js +++ /dev/null @@ -1,238 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { AggregateFunctionNode } from '../operation-node/aggregate-function-node.js'; -import { AliasNode } from '../operation-node/alias-node.js'; -import { IdentifierNode } from '../operation-node/identifier-node.js'; -import { createOverBuilder } from '../parser/parse-utils.js'; -import { parseReferentialBinaryOperation, parseValueBinaryOperationOrExpression, } from '../parser/binary-operation-parser.js'; -import { parseOrderBy, } from '../parser/order-by-parser.js'; -import { QueryNode } from '../operation-node/query-node.js'; -export class AggregateFunctionBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - /** @private */ - get expressionType() { - return undefined; - } - /** - * Returns an aliased version of the function. - * - * In addition to slapping `as "the_alias"` to the end of the SQL, - * this method also provides strict typing: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select( - * (eb) => eb.fn.count('id').as('person_count') - * ) - * .executeTakeFirstOrThrow() - * - * // `person_count: number` field exists in the result type. - * console.log(result.person_count) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select count("id") as "person_count" - * from "person" - * ``` - */ - as(alias) { - return new AliasedAggregateFunctionBuilder(this, alias); - } - /** - * Adds a `distinct` clause inside the function. - * - * ### Examples - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => - * eb.fn.count('first_name').distinct().as('first_name_count') - * ) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select count(distinct "first_name") as "first_name_count" - * from "person" - * ``` - */ - distinct() { - return new AggregateFunctionBuilder({ - ...this.#props, - aggregateFunctionNode: AggregateFunctionNode.cloneWithDistinct(this.#props.aggregateFunctionNode), - }); - } - orderBy(...args) { - return new AggregateFunctionBuilder({ - ...this.#props, - aggregateFunctionNode: QueryNode.cloneWithOrderByItems(this.#props.aggregateFunctionNode, parseOrderBy(args)), - }); - } - clearOrderBy() { - return new AggregateFunctionBuilder({ - ...this.#props, - aggregateFunctionNode: QueryNode.cloneWithoutOrderBy(this.#props.aggregateFunctionNode), - }); - } - withinGroupOrderBy(...args) { - return new AggregateFunctionBuilder({ - ...this.#props, - aggregateFunctionNode: AggregateFunctionNode.cloneWithOrderBy(this.#props.aggregateFunctionNode, parseOrderBy(args), true), - }); - } - filterWhere(...args) { - return new AggregateFunctionBuilder({ - ...this.#props, - aggregateFunctionNode: AggregateFunctionNode.cloneWithFilter(this.#props.aggregateFunctionNode, parseValueBinaryOperationOrExpression(args)), - }); - } - /** - * Adds a `filter` clause with a nested `where` clause after the function, where - * both sides of the operator are references to columns. - * - * Similar to {@link WhereInterface}'s `whereRef` method. - * - * ### Examples - * - * Count people with same first and last names versus general public: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => [ - * eb.fn - * .count('id') - * .filterWhereRef('first_name', '=', 'last_name') - * .as('repeat_name_count'), - * eb.fn.count('id').as('total_count'), - * ]) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * count("id") filter(where "first_name" = "last_name") as "repeat_name_count", - * count("id") as "total_count" - * from "person" - * ``` - */ - filterWhereRef(lhs, op, rhs) { - return new AggregateFunctionBuilder({ - ...this.#props, - aggregateFunctionNode: AggregateFunctionNode.cloneWithFilter(this.#props.aggregateFunctionNode, parseReferentialBinaryOperation(lhs, op, rhs)), - }); - } - /** - * Adds an `over` clause (window functions) after the function. - * - * ### Examples - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select( - * (eb) => eb.fn.avg('age').over().as('average_age') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select avg("age") over() as "average_age" - * from "person" - * ``` - * - * Also supports passing a callback that returns an over builder, - * allowing to add partition by and sort by clauses inside over. - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select( - * (eb) => eb.fn.avg('age').over( - * ob => ob.partitionBy('last_name').orderBy('first_name', 'asc') - * ).as('average_age') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select avg("age") over(partition by "last_name" order by "first_name" asc) as "average_age" - * from "person" - * ``` - */ - over(over) { - const builder = createOverBuilder(); - return new AggregateFunctionBuilder({ - ...this.#props, - aggregateFunctionNode: AggregateFunctionNode.cloneWithOver(this.#props.aggregateFunctionNode, (over ? over(builder) : builder).toOperationNode()), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - /** - * Casts the expression to the given type. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `AggregateFunctionBuilder` with a new output type. - */ - $castTo() { - return new AggregateFunctionBuilder(this.#props); - } - /** - * Omit null from the expression's type. - * - * This function can be useful in cases where you know an expression can't be - * null, but Kysely is unable to infer it. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of `this` with a new output type. - */ - $notNull() { - return new AggregateFunctionBuilder(this.#props); - } - toOperationNode() { - return this.#props.aggregateFunctionNode; - } -} -/** - * {@link AggregateFunctionBuilder} with an alias. The result of calling {@link AggregateFunctionBuilder.as}. - */ -export class AliasedAggregateFunctionBuilder { - #aggregateFunctionBuilder; - #alias; - constructor(aggregateFunctionBuilder, alias) { - this.#aggregateFunctionBuilder = aggregateFunctionBuilder; - this.#alias = alias; - } - /** @private */ - get expression() { - return this.#aggregateFunctionBuilder; - } - /** @private */ - get alias() { - return this.#alias; - } - toOperationNode() { - return AliasNode.create(this.#aggregateFunctionBuilder.toOperationNode(), IdentifierNode.create(this.#alias)); - } -} diff --git a/node_modules/kysely/dist/esm/query-builder/case-builder.d.ts b/node_modules/kysely/dist/esm/query-builder/case-builder.d.ts deleted file mode 100644 index 153976c..0000000 --- a/node_modules/kysely/dist/esm/query-builder/case-builder.d.ts +++ /dev/null @@ -1,112 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -import { ExpressionWrapper } from '../expression/expression-wrapper.js'; -import type { ReferenceExpression } from '../parser/reference-parser.js'; -import { CaseNode } from '../operation-node/case-node.js'; -import { type ComparisonOperatorExpression, type OperandValueExpressionOrList } from '../parser/binary-operation-parser.js'; -import { type ExtractTypeFromValueExpression } from '../parser/value-parser.js'; -import type { KyselyTypeError } from '../util/type-error.js'; -export declare class CaseBuilder implements Whenable { - #private; - constructor(props: CaseBuilderProps); - /** - * Adds a `when` clause to the case statement. - * - * A `when` call must be followed by a {@link CaseThenBuilder.then} call. - */ - when, VE extends OperandValueExpressionOrList>(lhs: unknown extends W ? RE : KyselyTypeError<'when(lhs, op, rhs) is not supported when using case(value)'>, op: ComparisonOperatorExpression, rhs: VE): CaseThenBuilder; - when(expression: Expression): CaseThenBuilder; - when(value: unknown extends W ? KyselyTypeError<'when(value) is only supported when using case(value)'> : W): CaseThenBuilder; -} -interface CaseBuilderProps { - readonly node: CaseNode; -} -export declare class CaseThenBuilder { - #private; - constructor(props: CaseBuilderProps); - /** - * Adds a `then` clause to the `case` statement. - * - * A `then` call can be followed by {@link Whenable.when}, {@link CaseWhenBuilder.else}, - * {@link CaseWhenBuilder.end} or {@link CaseWhenBuilder.endCase} call. - */ - then>(expression: E): CaseWhenBuilder>; - then(value: V): CaseWhenBuilder; -} -export declare class CaseWhenBuilder implements Whenable, Endable { - #private; - constructor(props: CaseBuilderProps); - /** - * Adds a `when` clause to the case statement. - * - * A `when` call must be followed by a {@link CaseThenBuilder.then} call. - */ - when, VE extends OperandValueExpressionOrList>(lhs: unknown extends W ? RE : KyselyTypeError<'when(lhs, op, rhs) is not supported when using case(value)'>, op: ComparisonOperatorExpression, rhs: VE): CaseThenBuilder; - when(expression: Expression): CaseThenBuilder; - when(value: unknown extends W ? KyselyTypeError<'when(value) is only supported when using case(value)'> : W): CaseThenBuilder; - /** - * Adds an `else` clause to the `case` statement. - * - * An `else` call must be followed by an {@link Endable.end} or {@link Endable.endCase} call. - */ - else>(expression: E): CaseEndBuilder>; - else(value: V): CaseEndBuilder; - /** - * Adds an `end` keyword to the case operator. - * - * `case` operators can only be used as part of a query. - * For a `case` statement used as part of a stored program, use {@link endCase} instead. - */ - end(): ExpressionWrapper; - /** - * Adds `end case` keywords to the case statement. - * - * `case` statements can only be used for flow control in stored programs. - * For a `case` operator used as part of a query, use {@link end} instead. - */ - endCase(): ExpressionWrapper; -} -export declare class CaseEndBuilder implements Endable { - #private; - constructor(props: CaseBuilderProps); - /** - * Adds an `end` keyword to the case operator. - * - * `case` operators can only be used as part of a query. - * For a `case` statement used as part of a stored program, use {@link endCase} instead. - */ - end(): ExpressionWrapper; - /** - * Adds `end case` keywords to the case statement. - * - * `case` statements can only be used for flow control in stored programs. - * For a `case` operator used as part of a query, use {@link end} instead. - */ - endCase(): ExpressionWrapper; -} -interface Whenable { - /** - * Adds a `when` clause to the case statement. - * - * A `when` call must be followed by a {@link CaseThenBuilder.then} call. - */ - when, VE extends OperandValueExpressionOrList>(lhs: unknown extends W ? RE : KyselyTypeError<'when(lhs, op, rhs) is not supported when using case(value)'>, op: ComparisonOperatorExpression, rhs: VE): CaseThenBuilder; - when(expression: Expression): CaseThenBuilder; - when(value: unknown extends W ? KyselyTypeError<'when(value) is only supported when using case(value)'> : W): CaseThenBuilder; -} -interface Endable { - /** - * Adds an `end` keyword to the case operator. - * - * `case` operators can only be used as part of a query. - * For a `case` statement used as part of a stored program, use {@link endCase} instead. - */ - end(): ExpressionWrapper; - /** - * Adds `end case` keywords to the case statement. - * - * `case` statements can only be used for flow control in stored programs. - * For a `case` operator used as part of a query, use {@link end} instead. - */ - endCase(): ExpressionWrapper; -} -export {}; diff --git a/node_modules/kysely/dist/esm/query-builder/case-builder.js b/node_modules/kysely/dist/esm/query-builder/case-builder.js deleted file mode 100644 index ca1bbb9..0000000 --- a/node_modules/kysely/dist/esm/query-builder/case-builder.js +++ /dev/null @@ -1,73 +0,0 @@ -/// -import { ExpressionWrapper } from '../expression/expression-wrapper.js'; -import { freeze } from '../util/object-utils.js'; -import { CaseNode } from '../operation-node/case-node.js'; -import { WhenNode } from '../operation-node/when-node.js'; -import { parseValueBinaryOperationOrExpression, } from '../parser/binary-operation-parser.js'; -import { isSafeImmediateValue, parseSafeImmediateValue, parseValueExpression, } from '../parser/value-parser.js'; -export class CaseBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - when(...args) { - return new CaseThenBuilder({ - ...this.#props, - node: CaseNode.cloneWithWhen(this.#props.node, WhenNode.create(parseValueBinaryOperationOrExpression(args))), - }); - } -} -export class CaseThenBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - then(valueExpression) { - return new CaseWhenBuilder({ - ...this.#props, - node: CaseNode.cloneWithThen(this.#props.node, isSafeImmediateValue(valueExpression) - ? parseSafeImmediateValue(valueExpression) - : parseValueExpression(valueExpression)), - }); - } -} -export class CaseWhenBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - when(...args) { - return new CaseThenBuilder({ - ...this.#props, - node: CaseNode.cloneWithWhen(this.#props.node, WhenNode.create(parseValueBinaryOperationOrExpression(args))), - }); - } - else(valueExpression) { - return new CaseEndBuilder({ - ...this.#props, - node: CaseNode.cloneWith(this.#props.node, { - else: isSafeImmediateValue(valueExpression) - ? parseSafeImmediateValue(valueExpression) - : parseValueExpression(valueExpression), - }), - }); - } - end() { - return new ExpressionWrapper(CaseNode.cloneWith(this.#props.node, { isStatement: false })); - } - endCase() { - return new ExpressionWrapper(CaseNode.cloneWith(this.#props.node, { isStatement: true })); - } -} -export class CaseEndBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - end() { - return new ExpressionWrapper(CaseNode.cloneWith(this.#props.node, { isStatement: false })); - } - endCase() { - return new ExpressionWrapper(CaseNode.cloneWith(this.#props.node, { isStatement: true })); - } -} diff --git a/node_modules/kysely/dist/esm/query-builder/cte-builder.d.ts b/node_modules/kysely/dist/esm/query-builder/cte-builder.d.ts deleted file mode 100644 index d55a80c..0000000 --- a/node_modules/kysely/dist/esm/query-builder/cte-builder.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { CommonTableExpressionNode } from '../operation-node/common-table-expression-node.js'; -export declare class CTEBuilder implements OperationNodeSource { - #private; - constructor(props: CTEBuilderProps); - /** - * Makes the common table expression materialized. - */ - materialized(): CTEBuilder; - /** - * Makes the common table expression not materialized. - */ - notMaterialized(): CTEBuilder; - toOperationNode(): CommonTableExpressionNode; -} -interface CTEBuilderProps { - readonly node: CommonTableExpressionNode; -} -export type CTEBuilderCallback = (cte: (name: N2) => CTEBuilder) => CTEBuilder; -export {}; diff --git a/node_modules/kysely/dist/esm/query-builder/cte-builder.js b/node_modules/kysely/dist/esm/query-builder/cte-builder.js deleted file mode 100644 index 46208bc..0000000 --- a/node_modules/kysely/dist/esm/query-builder/cte-builder.js +++ /dev/null @@ -1,34 +0,0 @@ -/// -import { CommonTableExpressionNode } from '../operation-node/common-table-expression-node.js'; -import { freeze } from '../util/object-utils.js'; -export class CTEBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - /** - * Makes the common table expression materialized. - */ - materialized() { - return new CTEBuilder({ - ...this.#props, - node: CommonTableExpressionNode.cloneWith(this.#props.node, { - materialized: true, - }), - }); - } - /** - * Makes the common table expression not materialized. - */ - notMaterialized() { - return new CTEBuilder({ - ...this.#props, - node: CommonTableExpressionNode.cloneWith(this.#props.node, { - materialized: false, - }), - }); - } - toOperationNode() { - return this.#props.node; - } -} diff --git a/node_modules/kysely/dist/esm/query-builder/delete-query-builder.d.ts b/node_modules/kysely/dist/esm/query-builder/delete-query-builder.d.ts deleted file mode 100644 index d04d28d..0000000 --- a/node_modules/kysely/dist/esm/query-builder/delete-query-builder.d.ts +++ /dev/null @@ -1,1348 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import { type JoinCallbackExpression, type JoinReferenceExpression } from '../parser/join-parser.js'; -import { type From, type FromTables, type TableExpression } from '../parser/table-parser.js'; -import { type SelectExpression, type SelectCallback } from '../parser/select-parser.js'; -import type { ReturningAllRow, ReturningCallbackRow, ReturningRow } from '../parser/returning-parser.js'; -import type { ReferenceExpression } from '../parser/reference-parser.js'; -import { QueryNode } from '../operation-node/query-node.js'; -import type { DrainOuterGeneric, NarrowPartial, Nullable, ShallowRecord, SimplifyResult, SimplifySingleResult, SqlBool } from '../util/type-utils.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -import type { KyselyPlugin } from '../plugin/kysely-plugin.js'; -import type { WhereInterface } from './where-interface.js'; -import type { MultiTableReturningInterface } from './returning-interface.js'; -import { type NoResultErrorConstructor } from './no-result-error.js'; -import { DeleteResult } from './delete-result.js'; -import { DeleteQueryNode } from '../operation-node/delete-query-node.js'; -import { type OrderByExpression, type OrderByModifiers, type DirectedOrderByStringReference } from '../parser/order-by-parser.js'; -import type { Explainable, ExplainFormat } from '../util/explainable.js'; -import type { AliasedExpression, Expression } from '../expression/expression.js'; -import { type ComparisonOperatorExpression, type OperandValueExpressionOrList } from '../parser/binary-operation-parser.js'; -import type { KyselyTypeError } from '../util/type-error.js'; -import type { Streamable } from '../util/streamable.js'; -import type { ExpressionOrFactory } from '../parser/expression-parser.js'; -import { type ValueExpression } from '../parser/value-parser.js'; -import type { OutputCallback, OutputExpression, OutputInterface, SelectExpressionFromOutputCallback, SelectExpressionFromOutputExpression } from './output-interface.js'; -import type { OrderByInterface } from './order-by-interface.js'; -export declare class DeleteQueryBuilder implements WhereInterface, MultiTableReturningInterface, OutputInterface, OrderByInterface, OperationNodeSource, Compilable, Explainable, Streamable { - #private; - constructor(props: DeleteQueryBuilderProps); - /** - * Adds a `where` expression to the query. - * - * Calling this method multiple times will combine the expressions using `and`. - * - * Also see {@link whereRef} - * - * ### Examples - * - * - * - * `where` method calls are combined with `AND`: - * - * ```ts - * const person = await db - * .selectFrom('person') - * .selectAll() - * .where('first_name', '=', 'Jennifer') - * .where('age', '>', 40) - * .executeTakeFirst() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "first_name" = $1 and "age" > $2 - * ``` - * - * Operator can be any supported operator or if the typings don't support it - * you can always use: - * - * ```ts - * import { sql } from 'kysely' - * - * sql`your operator` - * ``` - * - * - * - * Find multiple items using a list of identifiers: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where('id', 'in', [1, 2, 3]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "id" in ($1, $2, $3) - * ``` - * - * - * - * You can use the `and` function to create a simple equality - * filter using an object - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where((eb) => eb.and({ - * first_name: 'Jennifer', - * last_name: eb.ref('first_name') - * })) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * "first_name" = $1 - * and "last_name" = "first_name" - * ) - * ``` - * - * - * - * To combine conditions using `OR`, you can use the expression builder. - * There are two ways to create `OR` expressions. Both are shown in this - * example: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * // 1. Using the `or` method on the expression builder: - * .where((eb) => eb.or([ - * eb('first_name', '=', 'Jennifer'), - * eb('first_name', '=', 'Sylvester') - * ])) - * // 2. Chaining expressions using the `or` method on the - * // created expressions: - * .where((eb) => - * eb('last_name', '=', 'Aniston').or('last_name', '=', 'Stallone') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * ("first_name" = $1 or "first_name" = $2) - * and - * ("last_name" = $3 or "last_name" = $4) - * ) - * ``` - * - * - * - * You can add expressions conditionally like this: - * - * ```ts - * import { Expression, SqlBool } from 'kysely' - * - * const firstName: string | undefined = 'Jennifer' - * const lastName: string | undefined = 'Aniston' - * const under18 = true - * const over60 = true - * - * let query = db - * .selectFrom('person') - * .selectAll() - * - * if (firstName) { - * // The query builder is immutable. Remember to reassign - * // the result back to the query variable. - * query = query.where('first_name', '=', firstName) - * } - * - * if (lastName) { - * query = query.where('last_name', '=', lastName) - * } - * - * if (under18 || over60) { - * // Conditional OR expressions can be added like this. - * query = query.where((eb) => { - * const ors: Expression[] = [] - * - * if (under18) { - * ors.push(eb('age', '<', 18)) - * } - * - * if (over60) { - * ors.push(eb('age', '>', 60)) - * } - * - * return eb.or(ors) - * }) - * } - * - * const persons = await query.execute() - * ``` - * - * Both the first and third argument can also be arbitrary expressions like - * subqueries. An expression can defined by passing a function and calling - * the methods of the {@link ExpressionBuilder} passed to the callback: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where( - * (qb) => qb.selectFrom('pet') - * .select('pet.name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1), - * '=', - * 'Fluffy' - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * select "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) = $2 - * ``` - * - * A `where in` query can be built by using the `in` operator and an array - * of values. The values in the array can also be expressions: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where('person.id', 'in', [100, 200, 300]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "id" in ($1, $2, $3) - * ``` - * - * - * - * For complex `where` expressions you can pass in a single callback and - * use the `ExpressionBuilder` to build your expression: - * - * ```ts - * const firstName = 'Jennifer' - * const maxAge = 60 - * - * const persons = await db - * .selectFrom('person') - * .selectAll('person') - * .where(({ eb, or, and, not, exists, selectFrom }) => and([ - * or([ - * eb('first_name', '=', firstName), - * eb('age', '<', maxAge) - * ]), - * not(exists( - * selectFrom('pet') - * .select('pet.id') - * .whereRef('pet.owner_id', '=', 'person.id') - * )) - * ])) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where ( - * ( - * "first_name" = $1 - * or "age" < $2 - * ) - * and not exists ( - * select "pet"."id" from "pet" where "pet"."owner_id" = "person"."id" - * ) - * ) - * ``` - * - * If everything else fails, you can always use the {@link sql} tag - * as any of the arguments, including the operator: - * - * ```ts - * import { sql } from 'kysely' - * - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where( - * sql`coalesce(first_name, last_name)`, - * 'like', - * '%' + name + '%', - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * where coalesce(first_name, last_name) like $1 - * ``` - * - * In all examples above the columns were known at compile time - * (except for the raw {@link sql} expressions). By default kysely only - * allows you to refer to columns that exist in the database **and** - * can be referred to in the current query and context. - * - * Sometimes you may want to refer to columns that come from the user - * input and thus are not available at compile time. - * - * You have two options, the {@link sql} tag or `db.dynamic`. The example below - * uses both: - * - * ```ts - * import { sql } from 'kysely' - * const { ref } = db.dynamic - * - * const columnFromUserInput: string = 'id' - * - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where(ref(columnFromUserInput), '=', 1) - * .where(sql.id(columnFromUserInput), '=', 2) - * .execute() - * ``` - */ - where, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): DeleteQueryBuilder; - where>(expression: E): DeleteQueryBuilder; - /** - * Adds a `where` clause where both sides of the operator are references - * to columns. - * - * The normal `where` method treats the right hand side argument as a - * value by default. `whereRef` treats it as a column reference. This method is - * expecially useful with joins and correlated subqueries. - * - * ### Examples - * - * Usage with a join: - * - * ```ts - * db.selectFrom(['person', 'pet']) - * .selectAll() - * .whereRef('person.first_name', '=', 'pet.name') - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person", "pet" where "person"."first_name" = "pet"."name" - * ``` - * - * Usage in a subquery: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll('person') - * .select((eb) => eb - * .selectFrom('pet') - * .select('name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1) - * .as('pet_name') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".*, ( - * select "name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) as "pet_name" - * from "person" - */ - whereRef, RRE extends ReferenceExpression>(lhs: LRE, op: ComparisonOperatorExpression, rhs: RRE): DeleteQueryBuilder; - /** - * Clears all where expressions from the query. - * - * ### Examples - * - * ```ts - * db.selectFrom('person') - * .selectAll() - * .where('id','=',42) - * .clearWhere() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearWhere(): DeleteQueryBuilder; - /** - * Changes a `delete from` query into a `delete top from` query. - * - * `top` clause is only supported by some dialects like MS SQL Server. - * - * ### Examples - * - * Delete the first 5 rows: - * - * ```ts - * await db - * .deleteFrom('person') - * .top(5) - * .where('age', '>', 18) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * delete top(5) from "person" where "age" > @1 - * ``` - * - * Delete the first 50% of rows: - * - * ```ts - * await db - * .deleteFrom('person') - * .top(50, 'percent') - * .where('age', '>', 18) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * delete top(50) percent from "person" where "age" > @1 - * ``` - */ - top(expression: number | bigint, modifiers?: 'percent'): DeleteQueryBuilder; - /** - * Adds a `using` clause to the query. - * - * This clause allows adding additional tables to the query for filtering/returning - * only. Usually a non-standard syntactic-sugar alternative to a `where` with a sub-query. - * - * ### Examples: - * - * ```ts - * await db - * .deleteFrom('pet') - * .using('person') - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('person.first_name', '=', 'Bob') - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * delete from "pet" - * using "person" - * where "pet"."owner_id" = "person"."id" - * and "person"."first_name" = $1 - * ``` - * - * On supported databases such as MySQL, this clause allows using joins, but requires - * at least one of the tables after the `from` keyword to be also named after - * the `using` keyword. See also {@link innerJoin}, {@link leftJoin}, {@link rightJoin} - * and {@link fullJoin}. - * - * ```ts - * await db - * .deleteFrom('pet') - * .using('pet') - * .leftJoin('person', 'person.id', 'pet.owner_id') - * .where('person.first_name', '=', 'Bob') - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * delete from `pet` - * using `pet` - * left join `person` on `person`.`id` = `pet`.`owner_id` - * where `person`.`first_name` = ? - * ``` - * - * You can also chain multiple invocations of this method, or pass an array to - * a single invocation to name multiple tables. - * - * ```ts - * await db - * .deleteFrom('toy') - * .using(['pet', 'person']) - * .whereRef('toy.pet_id', '=', 'pet.id') - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('person.first_name', '=', 'Bob') - * .returning('pet.name') - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * delete from "toy" - * using "pet", "person" - * where "toy"."pet_id" = "pet"."id" - * and "pet"."owner_id" = "person"."id" - * and "person"."first_name" = $1 - * returning "pet"."name" - * ``` - */ - using>(tables: TE[]): DeleteQueryBuilder, FromTables, O>; - using>(table: TE): DeleteQueryBuilder, FromTables, O>; - /** - * Joins another table to the query using an inner join. - * - * ### Examples - * - * Simple usage by providing a table name and two columns to join: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * // `select` needs to come after the call to `innerJoin` so - * // that you can select from the joined table. - * .select(['person.id', 'pet.name']) - * .execute() - * - * result[0].id - * result[0].name - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."id", "pet"."name" - * from "person" - * inner join "pet" - * on "pet"."owner_id" = "person"."id" - * ``` - * - * You can give an alias for the joined table like this: - * - * ```ts - * await db.selectFrom('person') - * .innerJoin('pet as p', 'p.owner_id', 'person.id') - * .where('p.name', '=', 'Doggo') - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * inner join "pet" as "p" - * on "p"."owner_id" = "person"."id" - * where "p".name" = $1 - * ``` - * - * You can provide a function as the second argument to get a join - * builder for creating more complex joins. The join builder has a - * bunch of `on*` methods for building the `on` clause of the join. - * There's basically an equivalent for every `where` method - * (`on`, `onRef`, `onExists` etc.). You can do all the same things - * with the `on` method that you can with the corresponding `where` - * method. See the `where` method documentation for more examples. - * - * ```ts - * await db.selectFrom('person') - * .innerJoin( - * 'pet', - * (join) => join - * .onRef('pet.owner_id', '=', 'person.id') - * .on('pet.name', '=', 'Doggo') - * ) - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * inner join "pet" - * on "pet"."owner_id" = "person"."id" - * and "pet"."name" = $1 - * ``` - * - * You can join a subquery by providing a select query (or a callback) - * as the first argument: - * - * ```ts - * await db.selectFrom('person') - * .innerJoin( - * db.selectFrom('pet') - * .select(['owner_id', 'name']) - * .where('name', '=', 'Doggo') - * .as('doggos'), - * 'doggos.owner_id', - * 'person.id', - * ) - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * inner join ( - * select "owner_id", "name" - * from "pet" - * where "name" = $1 - * ) as "doggos" - * on "doggos"."owner_id" = "person"."id" - * ``` - */ - innerJoin, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): DeleteQueryBuilderWithInnerJoin; - innerJoin, FN extends JoinCallbackExpression>(table: TE, callback: FN): DeleteQueryBuilderWithInnerJoin; - /** - * Just like {@link innerJoin} but adds a left join instead of an inner join. - */ - leftJoin, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): DeleteQueryBuilderWithLeftJoin; - leftJoin, FN extends JoinCallbackExpression>(table: TE, callback: FN): DeleteQueryBuilderWithLeftJoin; - /** - * Just like {@link innerJoin} but adds a right join instead of an inner join. - */ - rightJoin, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): DeleteQueryBuilderWithRightJoin; - rightJoin, FN extends JoinCallbackExpression>(table: TE, callback: FN): DeleteQueryBuilderWithRightJoin; - /** - * Just like {@link innerJoin} but adds a full join instead of an inner join. - */ - fullJoin, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): DeleteQueryBuilderWithFullJoin; - fullJoin, FN extends JoinCallbackExpression>(table: TE, callback: FN): DeleteQueryBuilderWithFullJoin; - /** - * Allows you to return data from modified rows. - * - * On supported databases like PostgreSQL, this method can be chained to - * `insert`, `update`, `delete` and `merge` queries to return data. - * - * Note that on SQLite you need to give aliases for the expressions to avoid - * [this bug](https://sqlite.org/forum/forumpost/033daf0b32) in SQLite. - * For example `.returning('id as id')`. - * - * Also see the {@link returningAll} method. - * - * ### Examples - * - * Return one column: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * ``` - * - * Return multiple columns: - * - * ```ts - * const { id, last_name } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning(['id', 'last_name']) - * .executeTakeFirstOrThrow() - * ``` - * - * Return arbitrary expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * const { id, full_name, first_pet_id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning((eb) => [ - * 'id as id', - * sql`concat(first_name, ' ', last_name)`.as('full_name'), - * eb.selectFrom('pet').select('pet.id').limit(1).as('first_pet_id') - * ]) - * .executeTakeFirstOrThrow() - * ``` - */ - returning>(selections: ReadonlyArray): DeleteQueryBuilder>; - returning>(callback: CB): DeleteQueryBuilder>; - returning>(selection: SE): DeleteQueryBuilder>; - /** - * Adds `returning *` or `returning table.*` clause to the query. - * - * ### Examples - * - * Return all columns. - * - * ```ts - * const pets = await db - * .deleteFrom('pet') - * .returningAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL) - * - * ```sql - * delete from "pet" returning * - * ``` - * - * Return all columns from all tables - * - * ```ts - * const result = await db - * .deleteFrom('toy') - * .using(['pet', 'person']) - * .whereRef('toy.pet_id', '=', 'pet.id') - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('person.first_name', '=', 'Zoro') - * .returningAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL) - * - * ```sql - * delete from "toy" - * using "pet", "person" - * where "toy"."pet_id" = "pet"."id" - * and "pet"."owner_id" = "person"."id" - * and "person"."first_name" = $1 - * returning * - * ``` - * - * Return all columns from a single table. - * - * ```ts - * const result = await db - * .deleteFrom('toy') - * .using(['pet', 'person']) - * .whereRef('toy.pet_id', '=', 'pet.id') - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('person.first_name', '=', 'Itachi') - * .returningAll('pet') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL) - * - * ```sql - * delete from "toy" - * using "pet", "person" - * where "toy"."pet_id" = "pet"."id" - * and "pet"."owner_id" = "person"."id" - * and "person"."first_name" = $1 - * returning "pet".* - * ``` - * - * Return all columns from multiple tables. - * - * ```ts - * const result = await db - * .deleteFrom('toy') - * .using(['pet', 'person']) - * .whereRef('toy.pet_id', '=', 'pet.id') - * .whereRef('pet.owner_id', '=', 'person.id') - * .where('person.first_name', '=', 'Luffy') - * .returningAll(['toy', 'pet']) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL) - * - * ```sql - * delete from "toy" - * using "pet", "person" - * where "toy"."pet_id" = "pet"."id" - * and "pet"."owner_id" = "person"."id" - * and "person"."first_name" = $1 - * returning "toy".*, "pet".* - * ``` - */ - returningAll(tables: ReadonlyArray): DeleteQueryBuilder>; - /** - * Adds a `returning *` or `returning table.*` to an insert/update/delete/merge - * query on databases that support `returning` such as PostgreSQL. - * - * Also see the {@link returning} method. - */ - returningAll(table: T): DeleteQueryBuilder>; - returningAll(): DeleteQueryBuilder>; - /** - * Allows you to return data from modified rows. - * - * On supported databases like MS SQL Server (MSSQL), this method can be chained - * to `insert`, `update`, `delete` and `merge` queries to return data. - * - * Also see the {@link outputAll} method. - * - * ### Examples - * - * Return one column: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .output('inserted.id') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * gender: 'female', - * }) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "gender") - * output "inserted"."id" - * values (@1, @2, @3) - * ``` - * - * Return multiple columns: - * - * ```ts - * const { old_first_name, old_last_name, new_first_name, new_last_name } = await db - * .updateTable('person') - * .set({ first_name: 'John', last_name: 'Doe' }) - * .output([ - * 'deleted.first_name as old_first_name', - * 'deleted.last_name as old_last_name', - * 'inserted.first_name as new_first_name', - * 'inserted.last_name as new_last_name', - * ]) - * .where('created_at', '<', new Date()) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * update "person" - * set "first_name" = @1, "last_name" = @2 - * output "deleted"."first_name" as "old_first_name", - * "deleted"."last_name" as "old_last_name", - * "inserted"."first_name" as "new_first_name", - * "inserted"."last_name" as "new_last_name" - * where "created_at" < @3 - * ``` - * - * Return arbitrary expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * const { full_name } = await db - * .deleteFrom('person') - * .output((eb) => sql`concat(${eb.ref('deleted.first_name')}, ' ', ${eb.ref('deleted.last_name')})`.as('full_name')) - * .where('created_at', '<', new Date()) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * delete from "person" - * output concat("deleted"."first_name", ' ', "deleted"."last_name") as "full_name" - * where "created_at" < @1 - * ``` - * - * Return the action performed on the row: - * - * ```ts - * await db - * .mergeInto('person') - * .using('pet', 'pet.owner_id', 'person.id') - * .whenMatched() - * .thenDelete() - * .whenNotMatched() - * .thenInsertValues({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male' - * }) - * .output([ - * 'inserted.id as inserted_id', - * 'deleted.id as deleted_id', - * ]) - * .execute() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * merge into "person" - * using "pet" on "pet"."owner_id" = "person"."id" - * when matched then delete - * when not matched then - * insert ("first_name", "last_name", "gender") - * values (@1, @2, @3) - * output "inserted"."id" as "inserted_id", "deleted"."id" as "deleted_id" - * ``` - * - */ - output>(selections: readonly OE[]): DeleteQueryBuilder>>; - output>(callback: CB): DeleteQueryBuilder>>; - output>(selection: OE): DeleteQueryBuilder>>; - /** - * Adds an `output {prefix}.*` to an `insert`/`update`/`delete`/`merge` query on databases - * that support `output` such as MS SQL Server (MSSQL). - * - * Also see the {@link output} method. - */ - outputAll(table: 'deleted'): DeleteQueryBuilder>; - /** - * Clears all `returning` clauses from the query. - * - * ### Examples - * - * ```ts - * await db.deleteFrom('pet') - * .returningAll() - * .where('name', '=', 'Max') - * .clearReturning() - * .execute() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * delete from "pet" where "name" = "Max" - * ``` - */ - clearReturning(): DeleteQueryBuilder; - /** - * Clears the `limit` clause from the query. - * - * ### Examples - * - * ```ts - * await db.deleteFrom('pet') - * .returningAll() - * .where('name', '=', 'Max') - * .limit(5) - * .clearLimit() - * .execute() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * delete from "pet" where "name" = "Max" returning * - * ``` - */ - clearLimit(): DeleteQueryBuilder; - /** - * @description This is only supported by some dialects like MySQL or SQLite with `SQLITE_ENABLE_UPDATE_DELETE_LIMIT`. - */ - orderBy>(expr: OE, modifiers?: OrderByModifiers): DeleteQueryBuilder; - /** - * @description This is only supported by some dialects like MySQL or SQLite with `SQLITE_ENABLE_UPDATE_DELETE_LIMIT`. - * @deprecated It does ~2-2.6x more compile-time instantiations compared to multiple chained `orderBy(expr, modifiers?)` calls (in `order by` clauses with reasonable item counts), and has broken autocompletion. - */ - orderBy | DirectedOrderByStringReference>(exprs: ReadonlyArray): DeleteQueryBuilder; - /** - * @description This is only supported by some dialects like MySQL or SQLite with `SQLITE_ENABLE_UPDATE_DELETE_LIMIT`. - * @deprecated It does ~2.9x more compile-time instantiations compared to a `orderBy(expr, direction)` call. - */ - orderBy>(expr: OE): DeleteQueryBuilder; - /** - * @description This is only supported by some dialects like MySQL or SQLite with `SQLITE_ENABLE_UPDATE_DELETE_LIMIT`. - * @deprecated Use `orderBy(expr, (ob) => ...)` instead. - */ - orderBy>(expr: OE, modifiers: Expression): DeleteQueryBuilder; - /** - * Clears the `order by` clause from the query. - * - * See {@link orderBy} for adding an `order by` clause or item to a query. - * - * ### Examples - * - * ```ts - * const query = db - * .selectFrom('person') - * .selectAll() - * .orderBy('id', 'desc') - * - * const results = await query - * .clearOrderBy() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearOrderBy(): DeleteQueryBuilder; - /** - * Adds a limit clause to the query. - * - * A limit clause in a delete query is only supported by some dialects - * like MySQL. - * - * ### Examples - * - * Delete 5 oldest items in a table: - * - * ```ts - * await db - * .deleteFrom('pet') - * .orderBy('created_at') - * .limit(5) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * delete from `pet` order by `created_at` limit ? - * ``` - */ - limit(limit: ValueExpression): DeleteQueryBuilder; - /** - * This can be used to add any additional SQL to the end of the query. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.deleteFrom('person') - * .where('first_name', '=', 'John') - * .modifyEnd(sql`-- This is a comment`) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * delete from `person` - * where `first_name` = "John" -- This is a comment - * ``` - */ - modifyEnd(modifier: Expression): DeleteQueryBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - * - * If you want to conditionally call a method on `this`, see - * the {@link $if} method. - * - * ### Examples - * - * The next example uses a helper function `log` to log a query: - * - * ```ts - * import type { Compilable } from 'kysely' - * - * function log(qb: T): T { - * console.log(qb.compile()) - * return qb - * } - * - * await db.deleteFrom('person') - * .$call(log) - * .execute() - * ``` - */ - $call(func: (qb: this) => T): T; - /** - * Call `func(this)` if `condition` is true. - * - * This method is especially handy with optional selects. Any `returning` or `returningAll` - * method calls add columns as optional fields to the output type when called inside - * the `func` callback. This is because we can't know if those selections were actually - * made before running the code. - * - * You can also call any other methods inside the callback. - * - * ### Examples - * - * ```ts - * async function deletePerson(id: number, returnLastName: boolean) { - * return await db - * .deleteFrom('person') - * .where('id', '=', id) - * .returning(['id', 'first_name']) - * .$if(returnLastName, (qb) => qb.returning('last_name')) - * .executeTakeFirstOrThrow() - * } - * ``` - * - * Any selections added inside the `if` callback will be added as optional fields to the - * output type since we can't know if the selections were actually made before running - * the code. In the example above the return type of the `deletePerson` function is: - * - * ```ts - * Promise<{ - * id: number - * first_name: string - * last_name?: string - * }> - * ``` - */ - $if(condition: boolean, func: (qb: this) => DeleteQueryBuilder): O2 extends DeleteResult ? DeleteQueryBuilder : O2 extends O & infer E ? DeleteQueryBuilder> : DeleteQueryBuilder>; - /** - * Change the output type of the query. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `DeleteQueryBuilder` with a new output type. - */ - $castTo(): DeleteQueryBuilder; - /** - * Narrows (parts of) the output type of the query. - * - * Kysely tries to be as type-safe as possible, but in some cases we have to make - * compromises for better maintainability and compilation performance. At present, - * Kysely doesn't narrow the output type of the query when using {@link where} and {@link returning} or {@link returningAll}. - * - * This utility method is very useful for these situations, as it removes unncessary - * runtime assertion/guard code. Its input type is limited to the output type - * of the query, so you can't add a column that doesn't exist, or change a column's - * type to something that doesn't exist in its union type. - * - * ### Examples - * - * Turn this code: - * - * ```ts - * import type { Person } from 'type-editor' // imaginary module - * - * const person = await db.deleteFrom('person') - * .where('id', '=', 3) - * .where('nullable_column', 'is not', null) - * .returningAll() - * .executeTakeFirstOrThrow() - * - * if (isWithNoNullValue(person)) { - * functionThatExpectsPersonWithNonNullValue(person) - * } - * - * function isWithNoNullValue(person: Person): person is Person & { nullable_column: string } { - * return person.nullable_column != null - * } - * ``` - * - * Into this: - * - * ```ts - * import type { NotNull } from 'kysely' - * - * const person = await db.deleteFrom('person') - * .where('id', '=', 3) - * .where('nullable_column', 'is not', null) - * .returningAll() - * .$narrowType<{ nullable_column: NotNull }>() - * .executeTakeFirstOrThrow() - * - * functionThatExpectsPersonWithNonNullValue(person) - * ``` - */ - $narrowType(): DeleteQueryBuilder>; - /** - * Asserts that query's output row type equals the given type `T`. - * - * This method can be used to simplify excessively complex types to make TypeScript happy - * and much faster. - * - * Kysely uses complex type magic to achieve its type safety. This complexity is sometimes too much - * for TypeScript and you get errors like this: - * - * ``` - * error TS2589: Type instantiation is excessively deep and possibly infinite. - * ``` - * - * In these case you can often use this method to help TypeScript a little bit. When you use this - * method to assert the output type of a query, Kysely can drop the complex output type that - * consists of multiple nested helper types and replace it with the simple asserted type. - * - * Using this method doesn't reduce type safety at all. You have to pass in a type that is - * structurally equal to the current type. - * - * ### Examples - * - * ```ts - * import type { Species } from 'type-editor' // imaginary module - * - * async function deletePersonAndPets(personId: number) { - * return await db - * .with('deleted_person', (qb) => qb - * .deleteFrom('person') - * .where('id', '=', personId) - * .returning('first_name') - * .$assertType<{ first_name: string }>() - * ) - * .with('deleted_pets', (qb) => qb - * .deleteFrom('pet') - * .where('owner_id', '=', personId) - * .returning(['name as pet_name', 'species']) - * .$assertType<{ pet_name: string, species: Species }>() - * ) - * .selectFrom(['deleted_person', 'deleted_pets']) - * .selectAll() - * .execute() - * } - * ``` - */ - $assertType(): O extends T ? DeleteQueryBuilder : KyselyTypeError<`$assertType() call failed: The type passed in is not equal to the output type of the query.`>; - /** - * Returns a copy of this DeleteQueryBuilder instance with the given plugin installed. - */ - withPlugin(plugin: KyselyPlugin): DeleteQueryBuilder; - toOperationNode(): DeleteQueryNode; - compile(): CompiledQuery>; - /** - * Executes the query and returns an array of rows. - * - * Also see the {@link executeTakeFirst} and {@link executeTakeFirstOrThrow} methods. - */ - execute(): Promise[]>; - /** - * Executes the query and returns the first result or undefined if - * the query returned no result. - */ - executeTakeFirst(): Promise>; - /** - * Executes the query and returns the first result or throws if - * the query returned no result. - * - * By default an instance of {@link NoResultError} is thrown, but you can - * provide a custom error class, or callback as the only argument to throw a different - * error. - */ - executeTakeFirstOrThrow(errorConstructor?: NoResultErrorConstructor | ((node: QueryNode) => Error)): Promise>; - /** - * Executes the query and streams the rows. - * - * The optional argument `chunkSize` defines how many rows to fetch from the database - * at a time. It only affects some dialects like PostgreSQL that support it. - * - * ### Examples - * - * ```ts - * const stream = db - * .selectFrom('person') - * .select(['first_name', 'last_name']) - * .where('gender', '=', 'other') - * .stream() - * - * for await (const person of stream) { - * console.log(person.first_name) - * - * if (person.last_name === 'Something') { - * // Breaking or returning before the stream has ended will release - * // the database connection and invalidate the stream. - * break - * } - * } - * ``` - */ - stream(chunkSize?: number): AsyncIterableIterator; - /** - * Executes query with `explain` statement before the main query. - * - * ```ts - * const explained = await db - * .selectFrom('person') - * .where('gender', '=', 'female') - * .selectAll() - * .explain('json') - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * explain format=json select * from `person` where `gender` = ? - * ``` - * - * You can also execute `explain analyze` statements. - * - * ```ts - * import { sql } from 'kysely' - * - * const explained = await db - * .selectFrom('person') - * .where('gender', '=', 'female') - * .selectAll() - * .explain('json', sql`analyze`) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * explain (analyze, format json) select * from "person" where "gender" = $1 - * ``` - */ - explain = Record>(format?: ExplainFormat, options?: Expression): Promise; -} -export interface DeleteQueryBuilderProps { - readonly queryId: QueryId; - readonly queryNode: DeleteQueryNode; - readonly executor: QueryExecutor; -} -export type DeleteQueryBuilderWithInnerJoin> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? InnerJoinedBuilder : never : TE extends keyof DB ? DeleteQueryBuilder : TE extends AliasedExpression ? InnerJoinedBuilder : TE extends (qb: any) => AliasedExpression ? InnerJoinedBuilder : never; -type InnerJoinedBuilder = A extends keyof DB ? DeleteQueryBuilder, TB | A, O> : DeleteQueryBuilder, TB | A, O>; -type InnerJoinedDB = DrainOuterGeneric<{ - [C in keyof DB | A]: C extends A ? R : C extends keyof DB ? DB[C] : never; -}>; -export type DeleteQueryBuilderWithLeftJoin> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? LeftJoinedBuilder : never : TE extends keyof DB ? LeftJoinedBuilder : TE extends AliasedExpression ? LeftJoinedBuilder : TE extends (qb: any) => AliasedExpression ? LeftJoinedBuilder : never; -type LeftJoinedBuilder = A extends keyof DB ? DeleteQueryBuilder, TB | A, O> : DeleteQueryBuilder>, TB | A, O>; -type LeftJoinedDB = DrainOuterGeneric<{ - [C in keyof DB | A]: C extends A ? Nullable : C extends keyof DB ? DB[C] : never; -}>; -export type DeleteQueryBuilderWithRightJoin> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? RightJoinedBuilder : never : TE extends keyof DB ? RightJoinedBuilder : TE extends AliasedExpression ? RightJoinedBuilder : TE extends (qb: any) => AliasedExpression ? RightJoinedBuilder : never; -type RightJoinedBuilder = DeleteQueryBuilder, TB | A, O>; -type RightJoinedDB = DrainOuterGeneric<{ - [C in keyof DB | A]: C extends A ? R : C extends TB ? Nullable : C extends keyof DB ? DB[C] : never; -}>; -export type DeleteQueryBuilderWithFullJoin> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? OuterJoinedBuilder : never : TE extends keyof DB ? OuterJoinedBuilder : TE extends AliasedExpression ? OuterJoinedBuilder : TE extends (qb: any) => AliasedExpression ? OuterJoinedBuilder : never; -type OuterJoinedBuilder = DeleteQueryBuilder, TB | A, O>; -type OuterJoinedBuilderDB = DrainOuterGeneric<{ - [C in keyof DB | A]: C extends A ? Nullable : C extends TB ? Nullable : C extends keyof DB ? DB[C] : never; -}>; -export {}; diff --git a/node_modules/kysely/dist/esm/query-builder/delete-query-builder.js b/node_modules/kysely/dist/esm/query-builder/delete-query-builder.js deleted file mode 100644 index f710be3..0000000 --- a/node_modules/kysely/dist/esm/query-builder/delete-query-builder.js +++ /dev/null @@ -1,501 +0,0 @@ -/// -import { parseJoin, } from '../parser/join-parser.js'; -import { parseTableExpressionOrList, } from '../parser/table-parser.js'; -import { parseSelectArg, parseSelectAll, } from '../parser/select-parser.js'; -import { QueryNode } from '../operation-node/query-node.js'; -import { freeze } from '../util/object-utils.js'; -import { isNoResultErrorConstructor, NoResultError, } from './no-result-error.js'; -import { DeleteResult } from './delete-result.js'; -import { DeleteQueryNode } from '../operation-node/delete-query-node.js'; -import { LimitNode } from '../operation-node/limit-node.js'; -import { parseOrderBy, } from '../parser/order-by-parser.js'; -import { parseValueBinaryOperationOrExpression, parseReferentialBinaryOperation, } from '../parser/binary-operation-parser.js'; -import { parseValueExpression, } from '../parser/value-parser.js'; -import { parseTop } from '../parser/top-parser.js'; -export class DeleteQueryBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - where(...args) { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithWhere(this.#props.queryNode, parseValueBinaryOperationOrExpression(args)), - }); - } - whereRef(lhs, op, rhs) { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithWhere(this.#props.queryNode, parseReferentialBinaryOperation(lhs, op, rhs)), - }); - } - clearWhere() { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithoutWhere(this.#props.queryNode), - }); - } - /** - * Changes a `delete from` query into a `delete top from` query. - * - * `top` clause is only supported by some dialects like MS SQL Server. - * - * ### Examples - * - * Delete the first 5 rows: - * - * ```ts - * await db - * .deleteFrom('person') - * .top(5) - * .where('age', '>', 18) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * delete top(5) from "person" where "age" > @1 - * ``` - * - * Delete the first 50% of rows: - * - * ```ts - * await db - * .deleteFrom('person') - * .top(50, 'percent') - * .where('age', '>', 18) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * delete top(50) percent from "person" where "age" > @1 - * ``` - */ - top(expression, modifiers) { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithTop(this.#props.queryNode, parseTop(expression, modifiers)), - }); - } - using(tables) { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: DeleteQueryNode.cloneWithUsing(this.#props.queryNode, parseTableExpressionOrList(tables)), - }); - } - innerJoin(...args) { - return this.#join('InnerJoin', args); - } - leftJoin(...args) { - return this.#join('LeftJoin', args); - } - rightJoin(...args) { - return this.#join('RightJoin', args); - } - fullJoin(...args) { - return this.#join('FullJoin', args); - } - #join(joinType, args) { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithJoin(this.#props.queryNode, parseJoin(joinType, args)), - }); - } - returning(selection) { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithReturning(this.#props.queryNode, parseSelectArg(selection)), - }); - } - returningAll(table) { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithReturning(this.#props.queryNode, parseSelectAll(table)), - }); - } - output(args) { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithOutput(this.#props.queryNode, parseSelectArg(args)), - }); - } - outputAll(table) { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithOutput(this.#props.queryNode, parseSelectAll(table)), - }); - } - /** - * Clears all `returning` clauses from the query. - * - * ### Examples - * - * ```ts - * await db.deleteFrom('pet') - * .returningAll() - * .where('name', '=', 'Max') - * .clearReturning() - * .execute() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * delete from "pet" where "name" = "Max" - * ``` - */ - clearReturning() { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithoutReturning(this.#props.queryNode), - }); - } - /** - * Clears the `limit` clause from the query. - * - * ### Examples - * - * ```ts - * await db.deleteFrom('pet') - * .returningAll() - * .where('name', '=', 'Max') - * .limit(5) - * .clearLimit() - * .execute() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * delete from "pet" where "name" = "Max" returning * - * ``` - */ - clearLimit() { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: DeleteQueryNode.cloneWithoutLimit(this.#props.queryNode), - }); - } - orderBy(...args) { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithOrderByItems(this.#props.queryNode, parseOrderBy(args)), - }); - } - clearOrderBy() { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithoutOrderBy(this.#props.queryNode), - }); - } - /** - * Adds a limit clause to the query. - * - * A limit clause in a delete query is only supported by some dialects - * like MySQL. - * - * ### Examples - * - * Delete 5 oldest items in a table: - * - * ```ts - * await db - * .deleteFrom('pet') - * .orderBy('created_at') - * .limit(5) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * delete from `pet` order by `created_at` limit ? - * ``` - */ - limit(limit) { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: DeleteQueryNode.cloneWithLimit(this.#props.queryNode, LimitNode.create(parseValueExpression(limit))), - }); - } - /** - * This can be used to add any additional SQL to the end of the query. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.deleteFrom('person') - * .where('first_name', '=', 'John') - * .modifyEnd(sql`-- This is a comment`) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * delete from `person` - * where `first_name` = "John" -- This is a comment - * ``` - */ - modifyEnd(modifier) { - return new DeleteQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithEndModifier(this.#props.queryNode, modifier.toOperationNode()), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - * - * If you want to conditionally call a method on `this`, see - * the {@link $if} method. - * - * ### Examples - * - * The next example uses a helper function `log` to log a query: - * - * ```ts - * import type { Compilable } from 'kysely' - * - * function log(qb: T): T { - * console.log(qb.compile()) - * return qb - * } - * - * await db.deleteFrom('person') - * .$call(log) - * .execute() - * ``` - */ - $call(func) { - return func(this); - } - /** - * Call `func(this)` if `condition` is true. - * - * This method is especially handy with optional selects. Any `returning` or `returningAll` - * method calls add columns as optional fields to the output type when called inside - * the `func` callback. This is because we can't know if those selections were actually - * made before running the code. - * - * You can also call any other methods inside the callback. - * - * ### Examples - * - * ```ts - * async function deletePerson(id: number, returnLastName: boolean) { - * return await db - * .deleteFrom('person') - * .where('id', '=', id) - * .returning(['id', 'first_name']) - * .$if(returnLastName, (qb) => qb.returning('last_name')) - * .executeTakeFirstOrThrow() - * } - * ``` - * - * Any selections added inside the `if` callback will be added as optional fields to the - * output type since we can't know if the selections were actually made before running - * the code. In the example above the return type of the `deletePerson` function is: - * - * ```ts - * Promise<{ - * id: number - * first_name: string - * last_name?: string - * }> - * ``` - */ - $if(condition, func) { - if (condition) { - return func(this); - } - return new DeleteQueryBuilder({ - ...this.#props, - }); - } - /** - * Change the output type of the query. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `DeleteQueryBuilder` with a new output type. - */ - $castTo() { - return new DeleteQueryBuilder(this.#props); - } - /** - * Narrows (parts of) the output type of the query. - * - * Kysely tries to be as type-safe as possible, but in some cases we have to make - * compromises for better maintainability and compilation performance. At present, - * Kysely doesn't narrow the output type of the query when using {@link where} and {@link returning} or {@link returningAll}. - * - * This utility method is very useful for these situations, as it removes unncessary - * runtime assertion/guard code. Its input type is limited to the output type - * of the query, so you can't add a column that doesn't exist, or change a column's - * type to something that doesn't exist in its union type. - * - * ### Examples - * - * Turn this code: - * - * ```ts - * import type { Person } from 'type-editor' // imaginary module - * - * const person = await db.deleteFrom('person') - * .where('id', '=', 3) - * .where('nullable_column', 'is not', null) - * .returningAll() - * .executeTakeFirstOrThrow() - * - * if (isWithNoNullValue(person)) { - * functionThatExpectsPersonWithNonNullValue(person) - * } - * - * function isWithNoNullValue(person: Person): person is Person & { nullable_column: string } { - * return person.nullable_column != null - * } - * ``` - * - * Into this: - * - * ```ts - * import type { NotNull } from 'kysely' - * - * const person = await db.deleteFrom('person') - * .where('id', '=', 3) - * .where('nullable_column', 'is not', null) - * .returningAll() - * .$narrowType<{ nullable_column: NotNull }>() - * .executeTakeFirstOrThrow() - * - * functionThatExpectsPersonWithNonNullValue(person) - * ``` - */ - $narrowType() { - return new DeleteQueryBuilder(this.#props); - } - /** - * Asserts that query's output row type equals the given type `T`. - * - * This method can be used to simplify excessively complex types to make TypeScript happy - * and much faster. - * - * Kysely uses complex type magic to achieve its type safety. This complexity is sometimes too much - * for TypeScript and you get errors like this: - * - * ``` - * error TS2589: Type instantiation is excessively deep and possibly infinite. - * ``` - * - * In these case you can often use this method to help TypeScript a little bit. When you use this - * method to assert the output type of a query, Kysely can drop the complex output type that - * consists of multiple nested helper types and replace it with the simple asserted type. - * - * Using this method doesn't reduce type safety at all. You have to pass in a type that is - * structurally equal to the current type. - * - * ### Examples - * - * ```ts - * import type { Species } from 'type-editor' // imaginary module - * - * async function deletePersonAndPets(personId: number) { - * return await db - * .with('deleted_person', (qb) => qb - * .deleteFrom('person') - * .where('id', '=', personId) - * .returning('first_name') - * .$assertType<{ first_name: string }>() - * ) - * .with('deleted_pets', (qb) => qb - * .deleteFrom('pet') - * .where('owner_id', '=', personId) - * .returning(['name as pet_name', 'species']) - * .$assertType<{ pet_name: string, species: Species }>() - * ) - * .selectFrom(['deleted_person', 'deleted_pets']) - * .selectAll() - * .execute() - * } - * ``` - */ - $assertType() { - return new DeleteQueryBuilder(this.#props); - } - /** - * Returns a copy of this DeleteQueryBuilder instance with the given plugin installed. - */ - withPlugin(plugin) { - return new DeleteQueryBuilder({ - ...this.#props, - executor: this.#props.executor.withPlugin(plugin), - }); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.queryNode, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - /** - * Executes the query and returns an array of rows. - * - * Also see the {@link executeTakeFirst} and {@link executeTakeFirstOrThrow} methods. - */ - async execute() { - const compiledQuery = this.compile(); - const result = await this.#props.executor.executeQuery(compiledQuery); - const { adapter } = this.#props.executor; - const query = compiledQuery.query; - if ((query.returning && adapter.supportsReturning) || - (query.output && adapter.supportsOutput)) { - return result.rows; - } - return [new DeleteResult(result.numAffectedRows ?? BigInt(0))]; - } - /** - * Executes the query and returns the first result or undefined if - * the query returned no result. - */ - async executeTakeFirst() { - const [result] = await this.execute(); - return result; - } - /** - * Executes the query and returns the first result or throws if - * the query returned no result. - * - * By default an instance of {@link NoResultError} is thrown, but you can - * provide a custom error class, or callback as the only argument to throw a different - * error. - */ - async executeTakeFirstOrThrow(errorConstructor = NoResultError) { - const result = await this.executeTakeFirst(); - if (result === undefined) { - const error = isNoResultErrorConstructor(errorConstructor) - ? new errorConstructor(this.toOperationNode()) - : errorConstructor(this.toOperationNode()); - throw error; - } - return result; - } - async *stream(chunkSize = 100) { - const compiledQuery = this.compile(); - const stream = this.#props.executor.stream(compiledQuery, chunkSize); - for await (const item of stream) { - yield* item.rows; - } - } - async explain(format, options) { - const builder = new DeleteQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithExplain(this.#props.queryNode, format, options), - }); - return await builder.execute(); - } -} diff --git a/node_modules/kysely/dist/esm/query-builder/delete-result.d.ts b/node_modules/kysely/dist/esm/query-builder/delete-result.d.ts deleted file mode 100644 index 7502c4c..0000000 --- a/node_modules/kysely/dist/esm/query-builder/delete-result.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare class DeleteResult { - readonly numDeletedRows: bigint; - constructor(numDeletedRows: bigint); -} diff --git a/node_modules/kysely/dist/esm/query-builder/delete-result.js b/node_modules/kysely/dist/esm/query-builder/delete-result.js deleted file mode 100644 index 5d90752..0000000 --- a/node_modules/kysely/dist/esm/query-builder/delete-result.js +++ /dev/null @@ -1,7 +0,0 @@ -/// -export class DeleteResult { - numDeletedRows; - constructor(numDeletedRows) { - this.numDeletedRows = numDeletedRows; - } -} diff --git a/node_modules/kysely/dist/esm/query-builder/function-module.d.ts b/node_modules/kysely/dist/esm/query-builder/function-module.d.ts deleted file mode 100644 index 6143e25..0000000 --- a/node_modules/kysely/dist/esm/query-builder/function-module.d.ts +++ /dev/null @@ -1,592 +0,0 @@ -import { ExpressionWrapper } from '../expression/expression-wrapper.js'; -import type { Expression } from '../expression/expression.js'; -import type { ExtractTypeFromCoalesce1, ExtractTypeFromCoalesce3, ExtractTypeFromCoalesce2, ExtractTypeFromCoalesce4, ExtractTypeFromCoalesce5 } from '../parser/coalesce-parser.js'; -import { type ExtractTypeFromReferenceExpression, type ReferenceExpression, type StringReference, type ExtractTypeFromStringReference } from '../parser/reference-parser.js'; -import type { KyselyTypeError } from '../util/type-error.js'; -import type { IsNever, ShallowDehydrateObject, ShallowDehydrateValue, Simplify } from '../util/type-utils.js'; -import { AggregateFunctionBuilder } from './aggregate-function-builder.js'; -import type { SelectQueryBuilderExpression } from '../query-builder/select-query-builder-expression.js'; -import type { Selectable, SelectType } from '../util/column-type.js'; -/** - * Helpers for type safe SQL function calls. - * - * You can always use the {@link sql} tag to call functions and build arbitrary - * expressions. This module simply has shortcuts for most common function calls. - * - * ### Examples - * - * - * - * This example shows how to create function calls. These examples also work in any - * other place (`where` calls, updates, inserts etc.). The only difference is that you - * leave out the alias (the `as` call) if you use these in any other place than `select`. - * - * ```ts - * import { sql } from 'kysely' - * - * const result = await db.selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .select(({ fn, val, ref }) => [ - * 'person.id', - * - * // The `fn` module contains the most common - * // functions. - * fn.count('pet.id').as('pet_count'), - * - * // You can call any function by calling `fn` - * // directly. The arguments are treated as column - * // references by default. If you want to pass in - * // values, use the `val` function. - * fn('concat', [ - * val('Ms. '), - * 'first_name', - * val(' '), - * 'last_name' - * ]).as('full_name_with_title'), - * - * // You can call any aggregate function using the - * // `fn.agg` function. - * fn.agg('array_agg', ['pet.name']).as('pet_names'), - * - * // And once again, you can use the `sql` - * // template tag. The template tag substitutions - * // are treated as values by default. If you want - * // to reference columns, you can use the `ref` - * // function. - * sql`concat( - * ${ref('first_name')}, - * ' ', - * ${ref('last_name')} - * )`.as('full_name') - * ]) - * .groupBy('person.id') - * .having((eb) => eb.fn.count('pet.id'), '>', 10) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * "person"."id", - * count("pet"."id") as "pet_count", - * concat($1, "first_name", $2, "last_name") as "full_name_with_title", - * array_agg("pet"."name") as "pet_names", - * concat("first_name", ' ', "last_name") as "full_name" - * from "person" - * inner join "pet" on "pet"."owner_id" = "person"."id" - * group by "person"."id" - * having count("pet"."id") > $3 - * ``` - */ -export interface FunctionModule { - /** - * Creates a function call. - * - * To create an aggregate function call, use {@link FunctionModule.agg}. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .selectAll('person') - * .where(db.fn('upper', ['first_name']), '=', 'JENNIFER') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where upper("first_name") = $1 - * ``` - * - * If you prefer readability over type-safety, you can always use raw `sql`: - * - * ```ts - * import { sql } from 'kysely' - * - * await db.selectFrom('person') - * .selectAll('person') - * .where(sql`upper(first_name)`, '=', 'JENNIFER') - * .execute() - * ``` - */ - = ReferenceExpression>(name: string, args?: ReadonlyArray): ExpressionWrapper; - /** - * Creates an aggregate function call. - * - * This is a specialized version of the `fn` method, that returns an {@link AggregateFunctionBuilder} - * instance. A builder that allows you to chain additional methods such as `distinct`, - * `filterWhere` and `over`. - * - * See {@link avg}, {@link count}, {@link countAll}, {@link max}, {@link min}, {@link sum} - * shortcuts of common aggregate functions. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .select(({ fn }) => [ - * fn.agg('rank').over().as('rank'), - * fn.agg('group_concat', ['first_name']).distinct().as('first_names') - * ]) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select rank() over() as "rank", - * group_concat(distinct "first_name") as "first_names" - * from "person" - * ``` - */ - agg = ReferenceExpression>(name: string, args?: ReadonlyArray): AggregateFunctionBuilder; - /** - * Calls the `avg` function for the column or expression given as the argument. - * - * This sql function calculates the average value for a given column. - * - * For additional functionality such as distinct, filtering and window functions, - * refer to {@link AggregateFunctionBuilder}. An instance of this builder is - * returned when calling this function. - * - * ### Examples - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.avg('price').as('avg_price')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select avg("price") as "avg_price" from "toy" - * ``` - * - * If this function is used in a `select` statement, the type of the selected - * expression will be `number | string` by default. This is because Kysely can't know the - * type the db driver outputs. Sometimes the output can be larger than the largest - * JavaScript number and a string is returned instead. Most drivers allow you - * to configure the output type of large numbers and Kysely can't know if you've - * done so. - * - * You can specify the output type of the expression by providing the type as - * the first type argument: - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.avg('price').as('avg_price')) - * .execute() - * ``` - * - * Sometimes a null is returned, e.g. when row count is 0, and no `group by` - * was used. It is highly recommended to include null in the output type union - * and handle null values in post-execute code, or wrap the function with a {@link coalesce} - * function. - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.avg('price').as('avg_price')) - * .execute() - * ``` - */ - avg = ReferenceExpression>(expr: RE): AggregateFunctionBuilder; - /** - * Calls the `coalesce` function for given arguments. - * - * This sql function returns the first non-null value from left to right, commonly - * used to provide a default scalar for nullable columns or functions. - * - * If this function is used in a `select` statement, the type of the selected - * expression is inferred in the same manner that the sql function computes. - * A union of arguments' types - if a non-nullable argument exists, it stops - * there (ignoring any further arguments' types) and exludes null from the final - * union type. - * - * `(string | null, number | null)` is inferred as `string | number | null`. - * - * `(string | null, number, Date | null)` is inferred as `string | number`. - * - * `(number, string | null)` is inferred as `number`. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.selectFrom('person') - * .select((eb) => eb.fn.coalesce('nullable_column', sql.lit('')).as('column')) - * .where('first_name', '=', 'Jessie') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select coalesce("nullable_column", '') as "column" from "person" where "first_name" = $1 - * ``` - * - * You can combine this function with other helpers in this module: - * - * ```ts - * await db.selectFrom('person') - * .select((eb) => eb.fn.coalesce(eb.fn.avg('age'), eb.lit(0)).as('avg_age')) - * .where('first_name', '=', 'Jennifer') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select coalesce(avg("age"), 0) as "avg_age" from "person" where "first_name" = $1 - * ``` - */ - coalesce>(v1: V1): ExpressionWrapper>; - coalesce, V2 extends ReferenceExpression>(v1: V1, v2: V2): ExpressionWrapper>; - coalesce, V2 extends ReferenceExpression, V3 extends ReferenceExpression>(v1: V1, v2: V2, v3: V3): ExpressionWrapper>; - coalesce, V2 extends ReferenceExpression, V3 extends ReferenceExpression, V4 extends ReferenceExpression>(v1: V1, v2: V2, v3: V3, v4: V4): ExpressionWrapper>; - coalesce, V2 extends ReferenceExpression, V3 extends ReferenceExpression, V4 extends ReferenceExpression, V5 extends ReferenceExpression>(v1: V1, v2: V2, v3: V3, v4: V4, v5: V5): ExpressionWrapper>; - /** - * Calls the `count` function for the column or expression given as the argument. - * - * When called with a column as argument, this sql function counts the number of rows where there - * is a non-null value in that column. - * - * For counting all rows nulls included (`count(*)`), see {@link countAll}. - * - * For additional functionality such as distinct, filtering and window functions, - * refer to {@link AggregateFunctionBuilder}. An instance of this builder is - * returned when calling this function. - * - * ### Examples - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.count('id').as('num_toys')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select count("id") as "num_toys" from "toy" - * ``` - * - * If this function is used in a `select` statement, the type of the selected - * expression will be `number | string | bigint` by default. This is because - * Kysely can't know the type the db driver outputs. Sometimes the output can - * be larger than the largest JavaScript number and a string is returned instead. - * Most drivers allow you to configure the output type of large numbers and Kysely - * can't know if you've done so. - * - * You can specify the output type of the expression by providing - * the type as the first type argument: - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.count('id').as('num_toys')) - * .execute() - * ``` - */ - count = ReferenceExpression>(expr: RE): AggregateFunctionBuilder; - /** - * Calls the `count` function with `*` or `table.*` as argument. - * - * When called with `*` as argument, this sql function counts the number of rows, - * nulls included. - * - * For counting rows with non-null values in a given column (`count(column)`), - * see {@link count}. - * - * For additional functionality such as filtering and window functions, refer - * to {@link AggregateFunctionBuilder}. An instance of this builder is returned - * when calling this function. - * - * ### Examples - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.countAll().as('num_toys')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select count(*) as "num_toys" from "toy" - * ``` - * - * If this is used in a `select` statement, the type of the selected expression - * will be `number | string | bigint` by default. This is because Kysely - * can't know the type the db driver outputs. Sometimes the output can be larger - * than the largest JavaScript number and a string is returned instead. Most - * drivers allow you to configure the output type of large numbers and Kysely - * can't know if you've done so. - * - * You can specify the output type of the expression by providing - * the type as the first type argument: - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.countAll().as('num_toys')) - * .execute() - * ``` - * - * Some databases, such as PostgreSQL, support scoping the function to a specific - * table: - * - * ```ts - * await db.selectFrom('toy') - * .innerJoin('pet', 'pet.id', 'toy.pet_id') - * .select((eb) => eb.fn.countAll('toy').as('num_toys')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select count("toy".*) as "num_toys" - * from "toy" inner join "pet" on "pet"."id" = "toy"."pet_id" - * ``` - */ - countAll(table: T): AggregateFunctionBuilder; - countAll(): AggregateFunctionBuilder; - /** - * Calls the `max` function for the column or expression given as the argument. - * - * This sql function calculates the maximum value for a given column. - * - * For additional functionality such as distinct, filtering and window functions, - * refer to {@link AggregateFunctionBuilder}. An instance of this builder is - * returned when calling this function. - * - * If this function is used in a `select` statement, the type of the selected - * expression will be the referenced column's type. This is because the result - * is within the column's value range. - * - * ### Examples - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.max('price').as('max_price')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select max("price") as "max_price" from "toy" - * ``` - * - * Sometimes a null is returned, e.g. when row count is 0, and no `group by` - * was used. It is highly recommended to include null in the output type union - * and handle null values in post-execute code, or wrap the function with a {@link coalesce} - * function. - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.max('price').as('max_price')) - * .execute() - * ``` - */ - max = ReferenceExpression>(expr: RE): AggregateFunctionBuilder extends true ? ExtractTypeFromReferenceExpression : O>; - /** - * Calls the `min` function for the column or expression given as the argument. - * - * This sql function calculates the minimum value for a given column. - * - * For additional functionality such as distinct, filtering and window functions, - * refer to {@link AggregateFunctionBuilder}. An instance of this builder is - * returned when calling this function. - * - * If this function is used in a `select` statement, the type of the selected - * expression will be the referenced column's type. This is because the result - * is within the column's value range. - * - * ### Examples - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.min('price').as('min_price')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select min("price") as "min_price" from "toy" - * ``` - * - * Sometimes a null is returned, e.g. when row count is 0, and no `group by` - * was used. It is highly recommended to include null in the output type union - * and handle null values in post-execute code, or wrap the function with a {@link coalesce} - * function. - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.min('price').as('min_price')) - * .execute() - * ``` - */ - min = ReferenceExpression>(expr: RE): AggregateFunctionBuilder extends true ? ExtractTypeFromReferenceExpression : O>; - /** - * Calls the `sum` function for the column or expression given as the argument. - * - * This sql function sums the values of a given column. - * - * For additional functionality such as distinct, filtering and window functions, - * refer to {@link AggregateFunctionBuilder}. An instance of this builder is - * returned when calling this function. - * - * ### Examples - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.sum('price').as('total_price')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select sum("price") as "total_price" from "toy" - * ``` - * - * If this function is used in a `select` statement, the type of the selected - * expression will be `number | string` by default. This is because Kysely can't know the - * type the db driver outputs. Sometimes the output can be larger than the largest - * JavaScript number and a string is returned instead. Most drivers allow you - * to configure the output type of large numbers and Kysely can't know if you've - * done so. - * - * You can specify the output type of the expression by providing the type as - * the first type argument: - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.sum('price').as('total_price')) - * .execute() - * ``` - * - * Sometimes a null is returned, e.g. when row count is 0, and no `group by` - * was used. It is highly recommended to include null in the output type union - * and handle null values in post-execute code, or wrap the function with a {@link coalesce} - * function. - * - * ```ts - * await db.selectFrom('toy') - * .select((eb) => eb.fn.sum('price').as('total_price')) - * .execute() - * ``` - */ - sum = ReferenceExpression>(expr: RE): AggregateFunctionBuilder; - /** - * Calls the `any` function for the column or expression given as the argument. - * - * The argument must be a subquery or evaluate to an array. - * - * ### Examples - * - * In the following example, `nicknames` is assumed to be a column of type `string[]`: - * - * ```ts - * await db.selectFrom('person') - * .selectAll('person') - * .where((eb) => eb( - * eb.val('Jen'), '=', eb.fn.any('person.nicknames') - * )) - * .execute() - * ``` - * - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * "person".* - * from - * "person" - * where - * $1 = any("person"."nicknames") - * ``` - */ - any>(expr: RE): Exclude, null> extends ReadonlyArray ? ExpressionWrapper : KyselyTypeError<'any(expr) call failed: expr must be an array'>; - any(subquery: SelectQueryBuilderExpression>): ExpressionWrapper; - any(expr: Expression>): ExpressionWrapper; - /** - * Creates a `json_agg` function call. - * - * This is only supported by some dialects like PostgreSQL. - * - * ### Examples - * - * You can use it on table expressions: - * - * ```ts - * await db.selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .select((eb) => ['first_name', eb.fn.jsonAgg('pet').as('pets')]) - * .groupBy('person.first_name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name", json_agg("pet") as "pets" - * from "person" - * inner join "pet" on "pet"."owner_id" = "person"."id" - * group by "person"."first_name" - * ``` - * - * or on columns: - * - * ```ts - * await db.selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .select((eb) => [ - * 'first_name', - * eb.fn.jsonAgg('pet.name').as('pet_names'), - * ]) - * .groupBy('person.first_name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name", json_agg("pet"."name") AS "pet_names" - * from "person" - * inner join "pet" ON "pet"."owner_id" = "person"."id" - * group by "person"."first_name" - * ``` - */ - jsonAgg>(table: T): AggregateFunctionBuilder>>[] : T extends Expression ? Simplify>[] : never>; - jsonAgg>(column: RE): AggregateFunctionBuilder>>[] | null>; - /** - * Creates a to_json function call. - * - * This function is only available on PostgreSQL. - * - * ```ts - * await db.selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .select((eb) => ['first_name', eb.fn.toJson('pet').as('pet')]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name", to_json("pet") as "pet" - * from "person" - * inner join "pet" on "pet"."owner_id" = "person"."id" - * ``` - */ - toJson>(table: T): ExpressionWrapper>> : T extends Expression ? Simplify> : never>; -} -export declare function createFunctionModule(): FunctionModule; diff --git a/node_modules/kysely/dist/esm/query-builder/function-module.js b/node_modules/kysely/dist/esm/query-builder/function-module.js deleted file mode 100644 index 94bced2..0000000 --- a/node_modules/kysely/dist/esm/query-builder/function-module.js +++ /dev/null @@ -1,60 +0,0 @@ -/// -import { ExpressionWrapper } from '../expression/expression-wrapper.js'; -import { AggregateFunctionNode } from '../operation-node/aggregate-function-node.js'; -import { FunctionNode } from '../operation-node/function-node.js'; -import { parseReferenceExpressionOrList, } from '../parser/reference-parser.js'; -import { parseSelectAll } from '../parser/select-parser.js'; -import { AggregateFunctionBuilder } from './aggregate-function-builder.js'; -import { isString } from '../util/object-utils.js'; -import { parseTable } from '../parser/table-parser.js'; -export function createFunctionModule() { - const fn = (name, args) => { - return new ExpressionWrapper(FunctionNode.create(name, parseReferenceExpressionOrList(args ?? []))); - }; - const agg = (name, args) => { - return new AggregateFunctionBuilder({ - aggregateFunctionNode: AggregateFunctionNode.create(name, args ? parseReferenceExpressionOrList(args) : undefined), - }); - }; - return Object.assign(fn, { - agg, - avg(column) { - return agg('avg', [column]); - }, - coalesce(...values) { - return fn('coalesce', values); - }, - count(column) { - return agg('count', [column]); - }, - countAll(table) { - return new AggregateFunctionBuilder({ - aggregateFunctionNode: AggregateFunctionNode.create('count', parseSelectAll(table)), - }); - }, - max(column) { - return agg('max', [column]); - }, - min(column) { - return agg('min', [column]); - }, - sum(column) { - return agg('sum', [column]); - }, - any(column) { - return fn('any', [column]); - }, - jsonAgg(table) { - return new AggregateFunctionBuilder({ - aggregateFunctionNode: AggregateFunctionNode.create('json_agg', [ - isString(table) ? parseTable(table) : table.toOperationNode(), - ]), - }); - }, - toJson(table) { - return new ExpressionWrapper(FunctionNode.create('to_json', [ - isString(table) ? parseTable(table) : table.toOperationNode(), - ])); - }, - }); -} diff --git a/node_modules/kysely/dist/esm/query-builder/having-interface.d.ts b/node_modules/kysely/dist/esm/query-builder/having-interface.d.ts deleted file mode 100644 index 26d7980..0000000 --- a/node_modules/kysely/dist/esm/query-builder/having-interface.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { ComparisonOperatorExpression, OperandValueExpressionOrList } from '../parser/binary-operation-parser.js'; -import type { ReferenceExpression } from '../parser/reference-parser.js'; -export interface HavingInterface { - /** - * Just like {@link WhereInterface.where | where} but adds a `having` statement - * instead of a `where` statement. - */ - having, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): HavingInterface; - having(expression: E): HavingInterface; - /** - * Just like {@link WhereInterface.whereRef | whereRef} but adds a `having` statement - * instead of a `where` statement. - */ - havingRef, RRE extends ReferenceExpression>(lhs: LRE, op: ComparisonOperatorExpression, rhs: RRE): HavingInterface; -} diff --git a/node_modules/kysely/dist/esm/query-builder/having-interface.js b/node_modules/kysely/dist/esm/query-builder/having-interface.js deleted file mode 100644 index f7aae95..0000000 --- a/node_modules/kysely/dist/esm/query-builder/having-interface.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/query-builder/insert-query-builder.d.ts b/node_modules/kysely/dist/esm/query-builder/insert-query-builder.d.ts deleted file mode 100644 index 204a4f5..0000000 --- a/node_modules/kysely/dist/esm/query-builder/insert-query-builder.d.ts +++ /dev/null @@ -1,1235 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import { type SelectExpression, type SelectCallback } from '../parser/select-parser.js'; -import { type InsertExpression } from '../parser/insert-values-parser.js'; -import { InsertQueryNode } from '../operation-node/insert-query-node.js'; -import { QueryNode } from '../operation-node/query-node.js'; -import type { NarrowPartial, SimplifyResult, SimplifySingleResult } from '../util/type-utils.js'; -import { type UpdateObjectExpression } from '../parser/update-set-parser.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -import { InsertResult } from './insert-result.js'; -import type { KyselyPlugin } from '../plugin/kysely-plugin.js'; -import type { ReturningAllRow, ReturningCallbackRow, ReturningRow } from '../parser/returning-parser.js'; -import { type NoResultErrorConstructor } from './no-result-error.js'; -import { type ExpressionOrFactory } from '../parser/expression-parser.js'; -import type { ReturningInterface } from './returning-interface.js'; -import { OnConflictBuilder, type OnConflictDatabase, type OnConflictDoNothingBuilder, type OnConflictTables, type OnConflictUpdateBuilder } from './on-conflict-builder.js'; -import type { Selectable } from '../util/column-type.js'; -import type { Explainable, ExplainFormat } from '../util/explainable.js'; -import type { Expression } from '../expression/expression.js'; -import type { KyselyTypeError } from '../util/type-error.js'; -import type { Streamable } from '../util/streamable.js'; -import type { OutputCallback, OutputExpression, OutputInterface, SelectExpressionFromOutputCallback, SelectExpressionFromOutputExpression } from './output-interface.js'; -export declare class InsertQueryBuilder implements ReturningInterface, OutputInterface, OperationNodeSource, Compilable, Explainable, Streamable { - #private; - constructor(props: InsertQueryBuilderProps); - /** - * Sets the values to insert for an {@link Kysely.insertInto | insert} query. - * - * This method takes an object whose keys are column names and values are - * values to insert. In addition to the column's type, the values can be - * raw {@link sql} snippets or select queries. - * - * You must provide all fields you haven't explicitly marked as nullable - * or optional using {@link Generated} or {@link ColumnType}. - * - * The return value of an `insert` query is an instance of {@link InsertResult}. The - * {@link InsertResult.insertId | insertId} field holds the auto incremented primary - * key if the database returned one. - * - * On PostgreSQL and some other dialects, you need to call `returning` to get - * something out of the query. - * - * Also see the {@link expression} method for inserting the result of a select - * query or any other expression. - * - * ### Examples - * - * - * - * Insert a single row: - * - * ```ts - * const result = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40 - * }) - * .executeTakeFirst() - * - * // `insertId` is only available on dialects that - * // automatically return the id of the inserted row - * // such as MySQL and SQLite. On PostgreSQL, for example, - * // you need to add a `returning` clause to the query to - * // get anything out. See the "returning data" example. - * console.log(result.insertId) - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * insert into `person` (`first_name`, `last_name`, `age`) values (?, ?, ?) - * ``` - * - * - * - * On dialects that support it (for example PostgreSQL) you can insert multiple - * rows by providing an array. Note that the return value is once again very - * dialect-specific. Some databases may only return the id of the *last* inserted - * row and some return nothing at all unless you call `returning`. - * - * ```ts - * await db - * .insertInto('person') - * .values([{ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40, - * }, { - * first_name: 'Arnold', - * last_name: 'Schwarzenegger', - * age: 70, - * }]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "age") values (($1, $2, $3), ($4, $5, $6)) - * ``` - * - * - * - * On supported dialects like PostgreSQL you need to chain `returning` to the query to get - * the inserted row's columns (or any other expression) as the return value. `returning` - * works just like `select`. Refer to `select` method's examples and documentation for - * more info. - * - * ```ts - * const result = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40, - * }) - * .returning(['id', 'first_name as name']) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "age") values ($1, $2, $3) returning "id", "first_name" as "name" - * ``` - * - * - * - * In addition to primitives, the values can also be arbitrary expressions. - * You can build the expressions by using a callback and calling the methods - * on the expression builder passed to it: - * - * ```ts - * import { sql } from 'kysely' - * - * const ani = "Ani" - * const ston = "ston" - * - * const result = await db - * .insertInto('person') - * .values(({ ref, selectFrom, fn }) => ({ - * first_name: 'Jennifer', - * last_name: sql`concat(${ani}, ${ston})`, - * middle_name: ref('first_name'), - * age: selectFrom('person') - * .select(fn.avg('age').as('avg_age')), - * })) - * .executeTakeFirst() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ( - * "first_name", - * "last_name", - * "middle_name", - * "age" - * ) - * values ( - * $1, - * concat($2, $3), - * "first_name", - * (select avg("age") as "avg_age" from "person") - * ) - * ``` - * - * You can also use the callback version of subqueries or raw expressions: - * - * ```ts - * await db.with('jennifer', (db) => db - * .selectFrom('person') - * .where('first_name', '=', 'Jennifer') - * .select(['id', 'first_name', 'gender']) - * .limit(1) - * ).insertInto('pet').values((eb) => ({ - * owner_id: eb.selectFrom('jennifer').select('id'), - * name: eb.selectFrom('jennifer').select('first_name'), - * species: 'cat', - * })) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * with "jennifer" as ( - * select "id", "first_name", "gender" - * from "person" - * where "first_name" = $1 - * limit $2 - * ) - * insert into "pet" ("owner_id", "name", "species") - * values ( - * (select "id" from "jennifer"), - * (select "first_name" from "jennifer"), - * $3 - * ) - * ``` - */ - values(insert: InsertExpression): InsertQueryBuilder; - /** - * Sets the columns to insert. - * - * The {@link values} method sets both the columns and the values and this method - * is not needed. But if you are using the {@link expression} method, you can use - * this method to set the columns to insert. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .columns(['first_name']) - * .expression((eb) => eb.selectFrom('pet').select('pet.name')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name") - * select "pet"."name" from "pet" - * ``` - */ - columns(columns: ReadonlyArray): InsertQueryBuilder; - /** - * Insert an arbitrary expression. For example the result of a select query. - * - * ### Examples - * - * - * - * You can create an `INSERT INTO SELECT FROM` query using the `expression` method. - * This API doesn't follow our WYSIWYG principles and might be a bit difficult to - * remember. The reasons for this design stem from implementation difficulties. - * - * ```ts - * const result = await db.insertInto('person') - * .columns(['first_name', 'last_name', 'age']) - * .expression((eb) => eb - * .selectFrom('pet') - * .select((eb) => [ - * 'pet.name', - * eb.val('Petson').as('last_name'), - * eb.lit(7).as('age'), - * ]) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "age") - * select "pet"."name", $1 as "last_name", 7 as "age from "pet" - * ``` - */ - expression(expression: ExpressionOrFactory): InsertQueryBuilder; - /** - * Creates an `insert into "person" default values` query. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .defaultValues() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" default values - * ``` - */ - defaultValues(): InsertQueryBuilder; - /** - * This can be used to add any additional SQL to the end of the query. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.insertInto('person') - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male', - * }) - * .modifyEnd(sql`-- This is a comment`) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * insert into `person` ("first_name", "last_name", "gender") - * values (?, ?, ?) -- This is a comment - * ``` - */ - modifyEnd(modifier: Expression): InsertQueryBuilder; - /** - * Changes an `insert into` query to an `insert ignore into` query. - * - * This is only supported by some dialects like MySQL. - * - * To avoid a footgun, when invoked with the SQLite dialect, this method will - * be handled like {@link orIgnore}. See also, {@link orAbort}, {@link orFail}, - * {@link orReplace}, and {@link orRollback}. - * - * If you use the ignore modifier, ignorable errors that occur while executing the - * insert statement are ignored. For example, without ignore, a row that duplicates - * an existing unique index or primary key value in the table causes a duplicate-key - * error and the statement is aborted. With ignore, the row is discarded and no error - * occurs. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .ignore() - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'female', - * }) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * insert ignore into `person` (`first_name`, `last_name`, `gender`) values (?, ?, ?) - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * insert or ignore into "person" ("first_name", "last_name", "gender") values (?, ?, ?) - * ``` - */ - ignore(): InsertQueryBuilder; - /** - * Changes an `insert into` query to an `insert or ignore into` query. - * - * This is only supported by some dialects like SQLite. - * - * To avoid a footgun, when invoked with the MySQL dialect, this method will - * be handled like {@link ignore}. - * - * See also, {@link orAbort}, {@link orFail}, {@link orReplace}, and {@link orRollback}. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .orIgnore() - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'female', - * }) - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * insert or ignore into "person" ("first_name", "last_name", "gender") values (?, ?, ?) - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * insert ignore into `person` (`first_name`, `last_name`, `gender`) values (?, ?, ?) - * ``` - */ - orIgnore(): InsertQueryBuilder; - /** - * Changes an `insert into` query to an `insert or abort into` query. - * - * This is only supported by some dialects like SQLite. - * - * See also, {@link orIgnore}, {@link orFail}, {@link orReplace}, and {@link orRollback}. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .orAbort() - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'female', - * }) - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * insert or abort into "person" ("first_name", "last_name", "gender") values (?, ?, ?) - * ``` - */ - orAbort(): InsertQueryBuilder; - /** - * Changes an `insert into` query to an `insert or fail into` query. - * - * This is only supported by some dialects like SQLite. - * - * See also, {@link orIgnore}, {@link orAbort}, {@link orReplace}, and {@link orRollback}. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .orFail() - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'female', - * }) - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * insert or fail into "person" ("first_name", "last_name", "gender") values (?, ?, ?) - * ``` - */ - orFail(): InsertQueryBuilder; - /** - * Changes an `insert into` query to an `insert or replace into` query. - * - * This is only supported by some dialects like SQLite. - * - * You can also use {@link Kysely.replaceInto} to achieve the same result. - * - * See also, {@link orIgnore}, {@link orAbort}, {@link orFail}, and {@link orRollback}. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .orReplace() - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'female', - * }) - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * insert or replace into "person" ("first_name", "last_name", "gender") values (?, ?, ?) - * ``` - */ - orReplace(): InsertQueryBuilder; - /** - * Changes an `insert into` query to an `insert or rollback into` query. - * - * This is only supported by some dialects like SQLite. - * - * See also, {@link orIgnore}, {@link orAbort}, {@link orFail}, and {@link orReplace}. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .orRollback() - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'female', - * }) - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * insert or rollback into "person" ("first_name", "last_name", "gender") values (?, ?, ?) - * ``` - */ - orRollback(): InsertQueryBuilder; - /** - * Changes an `insert into` query to an `insert top into` query. - * - * `top` clause is only supported by some dialects like MS SQL Server. - * - * ### Examples - * - * Insert the first 5 rows: - * - * ```ts - * import { sql } from 'kysely' - * - * await db.insertInto('person') - * .top(5) - * .columns(['first_name', 'gender']) - * .expression( - * (eb) => eb.selectFrom('pet').select(['name', sql.lit('other').as('gender')]) - * ) - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * insert top(5) into "person" ("first_name", "gender") select "name", 'other' as "gender" from "pet" - * ``` - * - * Insert the first 50 percent of rows: - * - * ```ts - * import { sql } from 'kysely' - * - * await db.insertInto('person') - * .top(50, 'percent') - * .columns(['first_name', 'gender']) - * .expression( - * (eb) => eb.selectFrom('pet').select(['name', sql.lit('other').as('gender')]) - * ) - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * insert top(50) percent into "person" ("first_name", "gender") select "name", 'other' as "gender" from "pet" - * ``` - */ - top(expression: number | bigint, modifiers?: 'percent'): InsertQueryBuilder; - /** - * Adds an `on conflict` clause to the query. - * - * `on conflict` is only supported by some dialects like PostgreSQL and SQLite. On MySQL - * you can use {@link ignore} and {@link onDuplicateKeyUpdate} to achieve similar results. - * - * ### Examples - * - * ```ts - * await db - * .insertInto('pet') - * .values({ - * name: 'Catto', - * species: 'cat', - * owner_id: 3, - * }) - * .onConflict((oc) => oc - * .column('name') - * .doUpdateSet({ species: 'hamster' }) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "pet" ("name", "species", "owner_id") - * values ($1, $2, $3) - * on conflict ("name") - * do update set "species" = $4 - * ``` - * - * You can provide the name of the constraint instead of a column name: - * - * ```ts - * await db - * .insertInto('pet') - * .values({ - * name: 'Catto', - * species: 'cat', - * owner_id: 3, - * }) - * .onConflict((oc) => oc - * .constraint('pet_name_key') - * .doUpdateSet({ species: 'hamster' }) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "pet" ("name", "species", "owner_id") - * values ($1, $2, $3) - * on conflict on constraint "pet_name_key" - * do update set "species" = $4 - * ``` - * - * You can also specify an expression as the conflict target in case - * the unique index is an expression index: - * - * ```ts - * import { sql } from 'kysely' - * - * await db - * .insertInto('pet') - * .values({ - * name: 'Catto', - * species: 'cat', - * owner_id: 3, - * }) - * .onConflict((oc) => oc - * .expression(sql`lower(name)`) - * .doUpdateSet({ species: 'hamster' }) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "pet" ("name", "species", "owner_id") - * values ($1, $2, $3) - * on conflict (lower(name)) - * do update set "species" = $4 - * ``` - * - * You can add a filter for the update statement like this: - * - * ```ts - * await db - * .insertInto('pet') - * .values({ - * name: 'Catto', - * species: 'cat', - * owner_id: 3, - * }) - * .onConflict((oc) => oc - * .column('name') - * .doUpdateSet({ species: 'hamster' }) - * .where('excluded.name', '!=', 'Catto') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "pet" ("name", "species", "owner_id") - * values ($1, $2, $3) - * on conflict ("name") - * do update set "species" = $4 - * where "excluded"."name" != $5 - * ``` - * - * You can create an `on conflict do nothing` clauses like this: - * - * ```ts - * await db - * .insertInto('pet') - * .values({ - * name: 'Catto', - * species: 'cat', - * owner_id: 3, - * }) - * .onConflict((oc) => oc - * .column('name') - * .doNothing() - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "pet" ("name", "species", "owner_id") - * values ($1, $2, $3) - * on conflict ("name") do nothing - * ``` - * - * You can refer to the columns of the virtual `excluded` table - * in a type-safe way using a callback and the `ref` method of - * `ExpressionBuilder`: - * - * ```ts - * await db.insertInto('person') - * .values({ - * id: 1, - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male', - * }) - * .onConflict(oc => oc - * .column('id') - * .doUpdateSet({ - * first_name: (eb) => eb.ref('excluded.first_name'), - * last_name: (eb) => eb.ref('excluded.last_name') - * }) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("id", "first_name", "last_name", "gender") - * values ($1, $2, $3, $4) - * on conflict ("id") - * do update set - * "first_name" = "excluded"."first_name", - * "last_name" = "excluded"."last_name" - * ``` - */ - onConflict(callback: (builder: OnConflictBuilder) => OnConflictUpdateBuilder, OnConflictTables> | OnConflictDoNothingBuilder): InsertQueryBuilder; - /** - * Adds `on duplicate key update` to the query. - * - * If you specify `on duplicate key update`, and a row is inserted that would cause - * a duplicate value in a unique index or primary key, an update of the old row occurs. - * - * This is only implemented by some dialects like MySQL. On most dialects you should - * use {@link onConflict} instead. - * - * ### Examples - * - * ```ts - * await db - * .insertInto('person') - * .values({ - * id: 1, - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male', - * }) - * .onDuplicateKeyUpdate({ updated_at: new Date().toISOString() }) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * insert into `person` (`id`, `first_name`, `last_name`, `gender`) - * values (?, ?, ?, ?) - * on duplicate key update `updated_at` = ? - * ``` - */ - onDuplicateKeyUpdate(update: UpdateObjectExpression): InsertQueryBuilder; - /** - * Allows you to return data from modified rows. - * - * On supported databases like PostgreSQL, this method can be chained to - * `insert`, `update`, `delete` and `merge` queries to return data. - * - * Note that on SQLite you need to give aliases for the expressions to avoid - * [this bug](https://sqlite.org/forum/forumpost/033daf0b32) in SQLite. - * For example `.returning('id as id')`. - * - * Also see the {@link returningAll} method. - * - * ### Examples - * - * Return one column: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * ``` - * - * Return multiple columns: - * - * ```ts - * const { id, last_name } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning(['id', 'last_name']) - * .executeTakeFirstOrThrow() - * ``` - * - * Return arbitrary expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * const { id, full_name, first_pet_id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning((eb) => [ - * 'id as id', - * sql`concat(first_name, ' ', last_name)`.as('full_name'), - * eb.selectFrom('pet').select('pet.id').limit(1).as('first_pet_id') - * ]) - * .executeTakeFirstOrThrow() - * ``` - */ - returning>(selections: ReadonlyArray): InsertQueryBuilder>; - returning>(callback: CB): InsertQueryBuilder>; - returning>(selection: SE): InsertQueryBuilder>; - /** - * Adds a `returning *` to an insert/update/delete/merge query on databases - * that support `returning` such as PostgreSQL. - * - * Also see the {@link returning} method. - */ - returningAll(): InsertQueryBuilder>; - /** - * Allows you to return data from modified rows. - * - * On supported databases like MS SQL Server (MSSQL), this method can be chained - * to `insert`, `update`, `delete` and `merge` queries to return data. - * - * Also see the {@link outputAll} method. - * - * ### Examples - * - * Return one column: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .output('inserted.id') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * gender: 'female', - * }) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "gender") - * output "inserted"."id" - * values (@1, @2, @3) - * ``` - * - * Return multiple columns: - * - * ```ts - * const { old_first_name, old_last_name, new_first_name, new_last_name } = await db - * .updateTable('person') - * .set({ first_name: 'John', last_name: 'Doe' }) - * .output([ - * 'deleted.first_name as old_first_name', - * 'deleted.last_name as old_last_name', - * 'inserted.first_name as new_first_name', - * 'inserted.last_name as new_last_name', - * ]) - * .where('created_at', '<', new Date()) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * update "person" - * set "first_name" = @1, "last_name" = @2 - * output "deleted"."first_name" as "old_first_name", - * "deleted"."last_name" as "old_last_name", - * "inserted"."first_name" as "new_first_name", - * "inserted"."last_name" as "new_last_name" - * where "created_at" < @3 - * ``` - * - * Return arbitrary expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * const { full_name } = await db - * .deleteFrom('person') - * .output((eb) => sql`concat(${eb.ref('deleted.first_name')}, ' ', ${eb.ref('deleted.last_name')})`.as('full_name')) - * .where('created_at', '<', new Date()) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * delete from "person" - * output concat("deleted"."first_name", ' ', "deleted"."last_name") as "full_name" - * where "created_at" < @1 - * ``` - * - * Return the action performed on the row: - * - * ```ts - * await db - * .mergeInto('person') - * .using('pet', 'pet.owner_id', 'person.id') - * .whenMatched() - * .thenDelete() - * .whenNotMatched() - * .thenInsertValues({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male' - * }) - * .output([ - * 'inserted.id as inserted_id', - * 'deleted.id as deleted_id', - * ]) - * .execute() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * merge into "person" - * using "pet" on "pet"."owner_id" = "person"."id" - * when matched then delete - * when not matched then - * insert ("first_name", "last_name", "gender") - * values (@1, @2, @3) - * output "inserted"."id" as "inserted_id", "deleted"."id" as "deleted_id" - * ``` - * - */ - output>(selections: readonly OE[]): InsertQueryBuilder>>; - output>(callback: CB): InsertQueryBuilder>>; - output>(selection: OE): InsertQueryBuilder>>; - /** - * Adds an `output {prefix}.*` to an `insert`/`update`/`delete`/`merge` query on databases - * that support `output` such as MS SQL Server (MSSQL). - * - * Also see the {@link output} method. - */ - outputAll(table: 'inserted'): InsertQueryBuilder>; - /** - * Clears all `returning` clauses from the query. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .values({ first_name: 'James', last_name: 'Smith', gender: 'male' }) - * .returning(['first_name']) - * .clearReturning() - * .execute() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "gender") values ($1, $2, $3) - * ``` - */ - clearReturning(): InsertQueryBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - * - * If you want to conditionally call a method on `this`, see - * the {@link $if} method. - * - * ### Examples - * - * The next example uses a helper function `log` to log a query: - * - * ```ts - * import type { Compilable } from 'kysely' - * - * function log(qb: T): T { - * console.log(qb.compile()) - * return qb - * } - * - * await db.insertInto('person') - * .values({ first_name: 'John', last_name: 'Doe', gender: 'male' }) - * .$call(log) - * .execute() - * ``` - */ - $call(func: (qb: this) => T): T; - /** - * Call `func(this)` if `condition` is true. - * - * This method is especially handy with optional selects. Any `returning` or `returningAll` - * method calls add columns as optional fields to the output type when called inside - * the `func` callback. This is because we can't know if those selections were actually - * made before running the code. - * - * You can also call any other methods inside the callback. - * - * ### Examples - * - * ```ts - * import type { NewPerson } from 'type-editor' // imaginary module - * - * async function insertPerson(values: NewPerson, returnLastName: boolean) { - * return await db - * .insertInto('person') - * .values(values) - * .returning(['id', 'first_name']) - * .$if(returnLastName, (qb) => qb.returning('last_name')) - * .executeTakeFirstOrThrow() - * } - * ``` - * - * Any selections added inside the `if` callback will be added as optional fields to the - * output type since we can't know if the selections were actually made before running - * the code. In the example above the return type of the `insertPerson` function is: - * - * ```ts - * Promise<{ - * id: number - * first_name: string - * last_name?: string - * }> - * ``` - */ - $if(condition: boolean, func: (qb: this) => InsertQueryBuilder): O2 extends InsertResult ? InsertQueryBuilder : O2 extends O & infer E ? InsertQueryBuilder> : InsertQueryBuilder>; - /** - * Change the output type of the query. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `InsertQueryBuilder` with a new output type. - */ - $castTo(): InsertQueryBuilder; - /** - * Narrows (parts of) the output type of the query. - * - * Kysely tries to be as type-safe as possible, but in some cases we have to make - * compromises for better maintainability and compilation performance. At present, - * Kysely doesn't narrow the output type of the query based on {@link values} input - * when using {@link returning} or {@link returningAll}. - * - * This utility method is very useful for these situations, as it removes unncessary - * runtime assertion/guard code. Its input type is limited to the output type - * of the query, so you can't add a column that doesn't exist, or change a column's - * type to something that doesn't exist in its union type. - * - * ### Examples - * - * Turn this code: - * - * ```ts - * import type { Person } from 'type-editor' // imaginary module - * - * const person = await db.insertInto('person') - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male', - * nullable_column: 'hell yeah!' - * }) - * .returningAll() - * .executeTakeFirstOrThrow() - * - * if (isWithNoNullValue(person)) { - * functionThatExpectsPersonWithNonNullValue(person) - * } - * - * function isWithNoNullValue(person: Person): person is Person & { nullable_column: string } { - * return person.nullable_column != null - * } - * ``` - * - * Into this: - * - * ```ts - * import type { NotNull } from 'kysely' - * - * const person = await db.insertInto('person') - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male', - * nullable_column: 'hell yeah!' - * }) - * .returningAll() - * .$narrowType<{ nullable_column: NotNull }>() - * .executeTakeFirstOrThrow() - * - * functionThatExpectsPersonWithNonNullValue(person) - * ``` - */ - $narrowType(): InsertQueryBuilder>; - /** - * Asserts that query's output row type equals the given type `T`. - * - * This method can be used to simplify excessively complex types to make TypeScript happy - * and much faster. - * - * Kysely uses complex type magic to achieve its type safety. This complexity is sometimes too much - * for TypeScript and you get errors like this: - * - * ``` - * error TS2589: Type instantiation is excessively deep and possibly infinite. - * ``` - * - * In these case you can often use this method to help TypeScript a little bit. When you use this - * method to assert the output type of a query, Kysely can drop the complex output type that - * consists of multiple nested helper types and replace it with the simple asserted type. - * - * Using this method doesn't reduce type safety at all. You have to pass in a type that is - * structurally equal to the current type. - * - * ### Examples - * - * ```ts - * import type { NewPerson, NewPet, Species } from 'type-editor' // imaginary module - * - * async function insertPersonAndPet(person: NewPerson, pet: Omit) { - * return await db - * .with('new_person', (qb) => qb - * .insertInto('person') - * .values(person) - * .returning('id') - * .$assertType<{ id: number }>() - * ) - * .with('new_pet', (qb) => qb - * .insertInto('pet') - * .values((eb) => ({ - * owner_id: eb.selectFrom('new_person').select('id'), - * ...pet - * })) - * .returning(['name as pet_name', 'species']) - * .$assertType<{ pet_name: string, species: Species }>() - * ) - * .selectFrom(['new_person', 'new_pet']) - * .selectAll() - * .executeTakeFirstOrThrow() - * } - * ``` - */ - $assertType(): O extends T ? InsertQueryBuilder : KyselyTypeError<`$assertType() call failed: The type passed in is not equal to the output type of the query.`>; - /** - * Returns a copy of this InsertQueryBuilder instance with the given plugin installed. - */ - withPlugin(plugin: KyselyPlugin): InsertQueryBuilder; - toOperationNode(): InsertQueryNode; - compile(): CompiledQuery; - /** - * Executes the query and returns an array of rows. - * - * Also see the {@link executeTakeFirst} and {@link executeTakeFirstOrThrow} methods. - */ - execute(): Promise[]>; - /** - * Executes the query and returns the first result or undefined if - * the query returned no result. - */ - executeTakeFirst(): Promise>; - /** - * Executes the query and returns the first result or throws if - * the query returned no result. - * - * By default an instance of {@link NoResultError} is thrown, but you can - * provide a custom error class, or callback as the only argument to throw a different - * error. - */ - executeTakeFirstOrThrow(errorConstructor?: NoResultErrorConstructor | ((node: QueryNode) => Error)): Promise>; - /** - * Executes the query and streams the rows. - * - * The optional argument `chunkSize` defines how many rows to fetch from the database - * at a time. It only affects some dialects like PostgreSQL that support it. - * - * ### Examples - * - * ```ts - * const stream = db - * .selectFrom('person') - * .select(['first_name', 'last_name']) - * .where('gender', '=', 'other') - * .stream() - * - * for await (const person of stream) { - * console.log(person.first_name) - * - * if (person.last_name === 'Something') { - * // Breaking or returning before the stream has ended will release - * // the database connection and invalidate the stream. - * break - * } - * } - * ``` - */ - stream(chunkSize?: number): AsyncIterableIterator; - /** - * Executes query with `explain` statement before the main query. - * - * ```ts - * const explained = await db - * .selectFrom('person') - * .where('gender', '=', 'female') - * .selectAll() - * .explain('json') - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * explain format=json select * from `person` where `gender` = ? - * ``` - * - * You can also execute `explain analyze` statements. - * - * ```ts - * import { sql } from 'kysely' - * - * const explained = await db - * .selectFrom('person') - * .where('gender', '=', 'female') - * .selectAll() - * .explain('json', sql`analyze`) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * explain (analyze, format json) select * from "person" where "gender" = $1 - * ``` - */ - explain = Record>(format?: ExplainFormat, options?: Expression): Promise; -} -export interface InsertQueryBuilderProps { - readonly queryId: QueryId; - readonly queryNode: InsertQueryNode; - readonly executor: QueryExecutor; -} diff --git a/node_modules/kysely/dist/esm/query-builder/insert-query-builder.js b/node_modules/kysely/dist/esm/query-builder/insert-query-builder.js deleted file mode 100644 index 622fc96..0000000 --- a/node_modules/kysely/dist/esm/query-builder/insert-query-builder.js +++ /dev/null @@ -1,1157 +0,0 @@ -/// -import { parseSelectArg, parseSelectAll, } from '../parser/select-parser.js'; -import { parseInsertExpression, } from '../parser/insert-values-parser.js'; -import { InsertQueryNode } from '../operation-node/insert-query-node.js'; -import { QueryNode } from '../operation-node/query-node.js'; -import { parseUpdateObjectExpression, } from '../parser/update-set-parser.js'; -import { freeze } from '../util/object-utils.js'; -import { OnDuplicateKeyNode } from '../operation-node/on-duplicate-key-node.js'; -import { InsertResult } from './insert-result.js'; -import { isNoResultErrorConstructor, NoResultError, } from './no-result-error.js'; -import { parseExpression, } from '../parser/expression-parser.js'; -import { ColumnNode } from '../operation-node/column-node.js'; -import { OnConflictBuilder, } from './on-conflict-builder.js'; -import { OnConflictNode } from '../operation-node/on-conflict-node.js'; -import { parseTop } from '../parser/top-parser.js'; -import { OrActionNode } from '../operation-node/or-action-node.js'; -export class InsertQueryBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - /** - * Sets the values to insert for an {@link Kysely.insertInto | insert} query. - * - * This method takes an object whose keys are column names and values are - * values to insert. In addition to the column's type, the values can be - * raw {@link sql} snippets or select queries. - * - * You must provide all fields you haven't explicitly marked as nullable - * or optional using {@link Generated} or {@link ColumnType}. - * - * The return value of an `insert` query is an instance of {@link InsertResult}. The - * {@link InsertResult.insertId | insertId} field holds the auto incremented primary - * key if the database returned one. - * - * On PostgreSQL and some other dialects, you need to call `returning` to get - * something out of the query. - * - * Also see the {@link expression} method for inserting the result of a select - * query or any other expression. - * - * ### Examples - * - * - * - * Insert a single row: - * - * ```ts - * const result = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40 - * }) - * .executeTakeFirst() - * - * // `insertId` is only available on dialects that - * // automatically return the id of the inserted row - * // such as MySQL and SQLite. On PostgreSQL, for example, - * // you need to add a `returning` clause to the query to - * // get anything out. See the "returning data" example. - * console.log(result.insertId) - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * insert into `person` (`first_name`, `last_name`, `age`) values (?, ?, ?) - * ``` - * - * - * - * On dialects that support it (for example PostgreSQL) you can insert multiple - * rows by providing an array. Note that the return value is once again very - * dialect-specific. Some databases may only return the id of the *last* inserted - * row and some return nothing at all unless you call `returning`. - * - * ```ts - * await db - * .insertInto('person') - * .values([{ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40, - * }, { - * first_name: 'Arnold', - * last_name: 'Schwarzenegger', - * age: 70, - * }]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "age") values (($1, $2, $3), ($4, $5, $6)) - * ``` - * - * - * - * On supported dialects like PostgreSQL you need to chain `returning` to the query to get - * the inserted row's columns (or any other expression) as the return value. `returning` - * works just like `select`. Refer to `select` method's examples and documentation for - * more info. - * - * ```ts - * const result = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * age: 40, - * }) - * .returning(['id', 'first_name as name']) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "age") values ($1, $2, $3) returning "id", "first_name" as "name" - * ``` - * - * - * - * In addition to primitives, the values can also be arbitrary expressions. - * You can build the expressions by using a callback and calling the methods - * on the expression builder passed to it: - * - * ```ts - * import { sql } from 'kysely' - * - * const ani = "Ani" - * const ston = "ston" - * - * const result = await db - * .insertInto('person') - * .values(({ ref, selectFrom, fn }) => ({ - * first_name: 'Jennifer', - * last_name: sql`concat(${ani}, ${ston})`, - * middle_name: ref('first_name'), - * age: selectFrom('person') - * .select(fn.avg('age').as('avg_age')), - * })) - * .executeTakeFirst() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ( - * "first_name", - * "last_name", - * "middle_name", - * "age" - * ) - * values ( - * $1, - * concat($2, $3), - * "first_name", - * (select avg("age") as "avg_age" from "person") - * ) - * ``` - * - * You can also use the callback version of subqueries or raw expressions: - * - * ```ts - * await db.with('jennifer', (db) => db - * .selectFrom('person') - * .where('first_name', '=', 'Jennifer') - * .select(['id', 'first_name', 'gender']) - * .limit(1) - * ).insertInto('pet').values((eb) => ({ - * owner_id: eb.selectFrom('jennifer').select('id'), - * name: eb.selectFrom('jennifer').select('first_name'), - * species: 'cat', - * })) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * with "jennifer" as ( - * select "id", "first_name", "gender" - * from "person" - * where "first_name" = $1 - * limit $2 - * ) - * insert into "pet" ("owner_id", "name", "species") - * values ( - * (select "id" from "jennifer"), - * (select "first_name" from "jennifer"), - * $3 - * ) - * ``` - */ - values(insert) { - const [columns, values] = parseInsertExpression(insert); - return new InsertQueryBuilder({ - ...this.#props, - queryNode: InsertQueryNode.cloneWith(this.#props.queryNode, { - columns, - values, - }), - }); - } - /** - * Sets the columns to insert. - * - * The {@link values} method sets both the columns and the values and this method - * is not needed. But if you are using the {@link expression} method, you can use - * this method to set the columns to insert. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .columns(['first_name']) - * .expression((eb) => eb.selectFrom('pet').select('pet.name')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name") - * select "pet"."name" from "pet" - * ``` - */ - columns(columns) { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: InsertQueryNode.cloneWith(this.#props.queryNode, { - columns: freeze(columns.map(ColumnNode.create)), - }), - }); - } - /** - * Insert an arbitrary expression. For example the result of a select query. - * - * ### Examples - * - * - * - * You can create an `INSERT INTO SELECT FROM` query using the `expression` method. - * This API doesn't follow our WYSIWYG principles and might be a bit difficult to - * remember. The reasons for this design stem from implementation difficulties. - * - * ```ts - * const result = await db.insertInto('person') - * .columns(['first_name', 'last_name', 'age']) - * .expression((eb) => eb - * .selectFrom('pet') - * .select((eb) => [ - * 'pet.name', - * eb.val('Petson').as('last_name'), - * eb.lit(7).as('age'), - * ]) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "age") - * select "pet"."name", $1 as "last_name", 7 as "age from "pet" - * ``` - */ - expression(expression) { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: InsertQueryNode.cloneWith(this.#props.queryNode, { - values: parseExpression(expression), - }), - }); - } - /** - * Creates an `insert into "person" default values` query. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .defaultValues() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" default values - * ``` - */ - defaultValues() { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: InsertQueryNode.cloneWith(this.#props.queryNode, { - defaultValues: true, - }), - }); - } - /** - * This can be used to add any additional SQL to the end of the query. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.insertInto('person') - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male', - * }) - * .modifyEnd(sql`-- This is a comment`) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * insert into `person` ("first_name", "last_name", "gender") - * values (?, ?, ?) -- This is a comment - * ``` - */ - modifyEnd(modifier) { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithEndModifier(this.#props.queryNode, modifier.toOperationNode()), - }); - } - /** - * Changes an `insert into` query to an `insert ignore into` query. - * - * This is only supported by some dialects like MySQL. - * - * To avoid a footgun, when invoked with the SQLite dialect, this method will - * be handled like {@link orIgnore}. See also, {@link orAbort}, {@link orFail}, - * {@link orReplace}, and {@link orRollback}. - * - * If you use the ignore modifier, ignorable errors that occur while executing the - * insert statement are ignored. For example, without ignore, a row that duplicates - * an existing unique index or primary key value in the table causes a duplicate-key - * error and the statement is aborted. With ignore, the row is discarded and no error - * occurs. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .ignore() - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'female', - * }) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * insert ignore into `person` (`first_name`, `last_name`, `gender`) values (?, ?, ?) - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * insert or ignore into "person" ("first_name", "last_name", "gender") values (?, ?, ?) - * ``` - */ - ignore() { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: InsertQueryNode.cloneWith(this.#props.queryNode, { - orAction: OrActionNode.create('ignore'), - }), - }); - } - /** - * Changes an `insert into` query to an `insert or ignore into` query. - * - * This is only supported by some dialects like SQLite. - * - * To avoid a footgun, when invoked with the MySQL dialect, this method will - * be handled like {@link ignore}. - * - * See also, {@link orAbort}, {@link orFail}, {@link orReplace}, and {@link orRollback}. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .orIgnore() - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'female', - * }) - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * insert or ignore into "person" ("first_name", "last_name", "gender") values (?, ?, ?) - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * insert ignore into `person` (`first_name`, `last_name`, `gender`) values (?, ?, ?) - * ``` - */ - orIgnore() { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: InsertQueryNode.cloneWith(this.#props.queryNode, { - orAction: OrActionNode.create('ignore'), - }), - }); - } - /** - * Changes an `insert into` query to an `insert or abort into` query. - * - * This is only supported by some dialects like SQLite. - * - * See also, {@link orIgnore}, {@link orFail}, {@link orReplace}, and {@link orRollback}. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .orAbort() - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'female', - * }) - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * insert or abort into "person" ("first_name", "last_name", "gender") values (?, ?, ?) - * ``` - */ - orAbort() { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: InsertQueryNode.cloneWith(this.#props.queryNode, { - orAction: OrActionNode.create('abort'), - }), - }); - } - /** - * Changes an `insert into` query to an `insert or fail into` query. - * - * This is only supported by some dialects like SQLite. - * - * See also, {@link orIgnore}, {@link orAbort}, {@link orReplace}, and {@link orRollback}. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .orFail() - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'female', - * }) - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * insert or fail into "person" ("first_name", "last_name", "gender") values (?, ?, ?) - * ``` - */ - orFail() { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: InsertQueryNode.cloneWith(this.#props.queryNode, { - orAction: OrActionNode.create('fail'), - }), - }); - } - /** - * Changes an `insert into` query to an `insert or replace into` query. - * - * This is only supported by some dialects like SQLite. - * - * You can also use {@link Kysely.replaceInto} to achieve the same result. - * - * See also, {@link orIgnore}, {@link orAbort}, {@link orFail}, and {@link orRollback}. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .orReplace() - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'female', - * }) - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * insert or replace into "person" ("first_name", "last_name", "gender") values (?, ?, ?) - * ``` - */ - orReplace() { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: InsertQueryNode.cloneWith(this.#props.queryNode, { - orAction: OrActionNode.create('replace'), - }), - }); - } - /** - * Changes an `insert into` query to an `insert or rollback into` query. - * - * This is only supported by some dialects like SQLite. - * - * See also, {@link orIgnore}, {@link orAbort}, {@link orFail}, and {@link orReplace}. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .orRollback() - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'female', - * }) - * .execute() - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * insert or rollback into "person" ("first_name", "last_name", "gender") values (?, ?, ?) - * ``` - */ - orRollback() { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: InsertQueryNode.cloneWith(this.#props.queryNode, { - orAction: OrActionNode.create('rollback'), - }), - }); - } - /** - * Changes an `insert into` query to an `insert top into` query. - * - * `top` clause is only supported by some dialects like MS SQL Server. - * - * ### Examples - * - * Insert the first 5 rows: - * - * ```ts - * import { sql } from 'kysely' - * - * await db.insertInto('person') - * .top(5) - * .columns(['first_name', 'gender']) - * .expression( - * (eb) => eb.selectFrom('pet').select(['name', sql.lit('other').as('gender')]) - * ) - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * insert top(5) into "person" ("first_name", "gender") select "name", 'other' as "gender" from "pet" - * ``` - * - * Insert the first 50 percent of rows: - * - * ```ts - * import { sql } from 'kysely' - * - * await db.insertInto('person') - * .top(50, 'percent') - * .columns(['first_name', 'gender']) - * .expression( - * (eb) => eb.selectFrom('pet').select(['name', sql.lit('other').as('gender')]) - * ) - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * insert top(50) percent into "person" ("first_name", "gender") select "name", 'other' as "gender" from "pet" - * ``` - */ - top(expression, modifiers) { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithTop(this.#props.queryNode, parseTop(expression, modifiers)), - }); - } - /** - * Adds an `on conflict` clause to the query. - * - * `on conflict` is only supported by some dialects like PostgreSQL and SQLite. On MySQL - * you can use {@link ignore} and {@link onDuplicateKeyUpdate} to achieve similar results. - * - * ### Examples - * - * ```ts - * await db - * .insertInto('pet') - * .values({ - * name: 'Catto', - * species: 'cat', - * owner_id: 3, - * }) - * .onConflict((oc) => oc - * .column('name') - * .doUpdateSet({ species: 'hamster' }) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "pet" ("name", "species", "owner_id") - * values ($1, $2, $3) - * on conflict ("name") - * do update set "species" = $4 - * ``` - * - * You can provide the name of the constraint instead of a column name: - * - * ```ts - * await db - * .insertInto('pet') - * .values({ - * name: 'Catto', - * species: 'cat', - * owner_id: 3, - * }) - * .onConflict((oc) => oc - * .constraint('pet_name_key') - * .doUpdateSet({ species: 'hamster' }) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "pet" ("name", "species", "owner_id") - * values ($1, $2, $3) - * on conflict on constraint "pet_name_key" - * do update set "species" = $4 - * ``` - * - * You can also specify an expression as the conflict target in case - * the unique index is an expression index: - * - * ```ts - * import { sql } from 'kysely' - * - * await db - * .insertInto('pet') - * .values({ - * name: 'Catto', - * species: 'cat', - * owner_id: 3, - * }) - * .onConflict((oc) => oc - * .expression(sql`lower(name)`) - * .doUpdateSet({ species: 'hamster' }) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "pet" ("name", "species", "owner_id") - * values ($1, $2, $3) - * on conflict (lower(name)) - * do update set "species" = $4 - * ``` - * - * You can add a filter for the update statement like this: - * - * ```ts - * await db - * .insertInto('pet') - * .values({ - * name: 'Catto', - * species: 'cat', - * owner_id: 3, - * }) - * .onConflict((oc) => oc - * .column('name') - * .doUpdateSet({ species: 'hamster' }) - * .where('excluded.name', '!=', 'Catto') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "pet" ("name", "species", "owner_id") - * values ($1, $2, $3) - * on conflict ("name") - * do update set "species" = $4 - * where "excluded"."name" != $5 - * ``` - * - * You can create an `on conflict do nothing` clauses like this: - * - * ```ts - * await db - * .insertInto('pet') - * .values({ - * name: 'Catto', - * species: 'cat', - * owner_id: 3, - * }) - * .onConflict((oc) => oc - * .column('name') - * .doNothing() - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "pet" ("name", "species", "owner_id") - * values ($1, $2, $3) - * on conflict ("name") do nothing - * ``` - * - * You can refer to the columns of the virtual `excluded` table - * in a type-safe way using a callback and the `ref` method of - * `ExpressionBuilder`: - * - * ```ts - * await db.insertInto('person') - * .values({ - * id: 1, - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male', - * }) - * .onConflict(oc => oc - * .column('id') - * .doUpdateSet({ - * first_name: (eb) => eb.ref('excluded.first_name'), - * last_name: (eb) => eb.ref('excluded.last_name') - * }) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("id", "first_name", "last_name", "gender") - * values ($1, $2, $3, $4) - * on conflict ("id") - * do update set - * "first_name" = "excluded"."first_name", - * "last_name" = "excluded"."last_name" - * ``` - */ - onConflict(callback) { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: InsertQueryNode.cloneWith(this.#props.queryNode, { - onConflict: callback(new OnConflictBuilder({ - onConflictNode: OnConflictNode.create(), - })).toOperationNode(), - }), - }); - } - /** - * Adds `on duplicate key update` to the query. - * - * If you specify `on duplicate key update`, and a row is inserted that would cause - * a duplicate value in a unique index or primary key, an update of the old row occurs. - * - * This is only implemented by some dialects like MySQL. On most dialects you should - * use {@link onConflict} instead. - * - * ### Examples - * - * ```ts - * await db - * .insertInto('person') - * .values({ - * id: 1, - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male', - * }) - * .onDuplicateKeyUpdate({ updated_at: new Date().toISOString() }) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * insert into `person` (`id`, `first_name`, `last_name`, `gender`) - * values (?, ?, ?, ?) - * on duplicate key update `updated_at` = ? - * ``` - */ - onDuplicateKeyUpdate(update) { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: InsertQueryNode.cloneWith(this.#props.queryNode, { - onDuplicateKey: OnDuplicateKeyNode.create(parseUpdateObjectExpression(update)), - }), - }); - } - returning(selection) { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithReturning(this.#props.queryNode, parseSelectArg(selection)), - }); - } - returningAll() { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithReturning(this.#props.queryNode, parseSelectAll()), - }); - } - output(args) { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithOutput(this.#props.queryNode, parseSelectArg(args)), - }); - } - outputAll(table) { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithOutput(this.#props.queryNode, parseSelectAll(table)), - }); - } - /** - * Clears all `returning` clauses from the query. - * - * ### Examples - * - * ```ts - * await db.insertInto('person') - * .values({ first_name: 'James', last_name: 'Smith', gender: 'male' }) - * .returning(['first_name']) - * .clearReturning() - * .execute() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "gender") values ($1, $2, $3) - * ``` - */ - clearReturning() { - return new InsertQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithoutReturning(this.#props.queryNode), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - * - * If you want to conditionally call a method on `this`, see - * the {@link $if} method. - * - * ### Examples - * - * The next example uses a helper function `log` to log a query: - * - * ```ts - * import type { Compilable } from 'kysely' - * - * function log(qb: T): T { - * console.log(qb.compile()) - * return qb - * } - * - * await db.insertInto('person') - * .values({ first_name: 'John', last_name: 'Doe', gender: 'male' }) - * .$call(log) - * .execute() - * ``` - */ - $call(func) { - return func(this); - } - /** - * Call `func(this)` if `condition` is true. - * - * This method is especially handy with optional selects. Any `returning` or `returningAll` - * method calls add columns as optional fields to the output type when called inside - * the `func` callback. This is because we can't know if those selections were actually - * made before running the code. - * - * You can also call any other methods inside the callback. - * - * ### Examples - * - * ```ts - * import type { NewPerson } from 'type-editor' // imaginary module - * - * async function insertPerson(values: NewPerson, returnLastName: boolean) { - * return await db - * .insertInto('person') - * .values(values) - * .returning(['id', 'first_name']) - * .$if(returnLastName, (qb) => qb.returning('last_name')) - * .executeTakeFirstOrThrow() - * } - * ``` - * - * Any selections added inside the `if` callback will be added as optional fields to the - * output type since we can't know if the selections were actually made before running - * the code. In the example above the return type of the `insertPerson` function is: - * - * ```ts - * Promise<{ - * id: number - * first_name: string - * last_name?: string - * }> - * ``` - */ - $if(condition, func) { - if (condition) { - return func(this); - } - return new InsertQueryBuilder({ - ...this.#props, - }); - } - /** - * Change the output type of the query. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `InsertQueryBuilder` with a new output type. - */ - $castTo() { - return new InsertQueryBuilder(this.#props); - } - /** - * Narrows (parts of) the output type of the query. - * - * Kysely tries to be as type-safe as possible, but in some cases we have to make - * compromises for better maintainability and compilation performance. At present, - * Kysely doesn't narrow the output type of the query based on {@link values} input - * when using {@link returning} or {@link returningAll}. - * - * This utility method is very useful for these situations, as it removes unncessary - * runtime assertion/guard code. Its input type is limited to the output type - * of the query, so you can't add a column that doesn't exist, or change a column's - * type to something that doesn't exist in its union type. - * - * ### Examples - * - * Turn this code: - * - * ```ts - * import type { Person } from 'type-editor' // imaginary module - * - * const person = await db.insertInto('person') - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male', - * nullable_column: 'hell yeah!' - * }) - * .returningAll() - * .executeTakeFirstOrThrow() - * - * if (isWithNoNullValue(person)) { - * functionThatExpectsPersonWithNonNullValue(person) - * } - * - * function isWithNoNullValue(person: Person): person is Person & { nullable_column: string } { - * return person.nullable_column != null - * } - * ``` - * - * Into this: - * - * ```ts - * import type { NotNull } from 'kysely' - * - * const person = await db.insertInto('person') - * .values({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male', - * nullable_column: 'hell yeah!' - * }) - * .returningAll() - * .$narrowType<{ nullable_column: NotNull }>() - * .executeTakeFirstOrThrow() - * - * functionThatExpectsPersonWithNonNullValue(person) - * ``` - */ - $narrowType() { - return new InsertQueryBuilder(this.#props); - } - /** - * Asserts that query's output row type equals the given type `T`. - * - * This method can be used to simplify excessively complex types to make TypeScript happy - * and much faster. - * - * Kysely uses complex type magic to achieve its type safety. This complexity is sometimes too much - * for TypeScript and you get errors like this: - * - * ``` - * error TS2589: Type instantiation is excessively deep and possibly infinite. - * ``` - * - * In these case you can often use this method to help TypeScript a little bit. When you use this - * method to assert the output type of a query, Kysely can drop the complex output type that - * consists of multiple nested helper types and replace it with the simple asserted type. - * - * Using this method doesn't reduce type safety at all. You have to pass in a type that is - * structurally equal to the current type. - * - * ### Examples - * - * ```ts - * import type { NewPerson, NewPet, Species } from 'type-editor' // imaginary module - * - * async function insertPersonAndPet(person: NewPerson, pet: Omit) { - * return await db - * .with('new_person', (qb) => qb - * .insertInto('person') - * .values(person) - * .returning('id') - * .$assertType<{ id: number }>() - * ) - * .with('new_pet', (qb) => qb - * .insertInto('pet') - * .values((eb) => ({ - * owner_id: eb.selectFrom('new_person').select('id'), - * ...pet - * })) - * .returning(['name as pet_name', 'species']) - * .$assertType<{ pet_name: string, species: Species }>() - * ) - * .selectFrom(['new_person', 'new_pet']) - * .selectAll() - * .executeTakeFirstOrThrow() - * } - * ``` - */ - $assertType() { - return new InsertQueryBuilder(this.#props); - } - /** - * Returns a copy of this InsertQueryBuilder instance with the given plugin installed. - */ - withPlugin(plugin) { - return new InsertQueryBuilder({ - ...this.#props, - executor: this.#props.executor.withPlugin(plugin), - }); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.queryNode, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - /** - * Executes the query and returns an array of rows. - * - * Also see the {@link executeTakeFirst} and {@link executeTakeFirstOrThrow} methods. - */ - async execute() { - const compiledQuery = this.compile(); - const result = await this.#props.executor.executeQuery(compiledQuery); - const { adapter } = this.#props.executor; - const query = compiledQuery.query; - if ((query.returning && adapter.supportsReturning) || - (query.output && adapter.supportsOutput)) { - return result.rows; - } - return [ - new InsertResult(result.insertId, result.numAffectedRows ?? BigInt(0)), - ]; - } - /** - * Executes the query and returns the first result or undefined if - * the query returned no result. - */ - async executeTakeFirst() { - const [result] = await this.execute(); - return result; - } - /** - * Executes the query and returns the first result or throws if - * the query returned no result. - * - * By default an instance of {@link NoResultError} is thrown, but you can - * provide a custom error class, or callback as the only argument to throw a different - * error. - */ - async executeTakeFirstOrThrow(errorConstructor = NoResultError) { - const result = await this.executeTakeFirst(); - if (result === undefined) { - const error = isNoResultErrorConstructor(errorConstructor) - ? new errorConstructor(this.toOperationNode()) - : errorConstructor(this.toOperationNode()); - throw error; - } - return result; - } - async *stream(chunkSize = 100) { - const compiledQuery = this.compile(); - const stream = this.#props.executor.stream(compiledQuery, chunkSize); - for await (const item of stream) { - yield* item.rows; - } - } - async explain(format, options) { - const builder = new InsertQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithExplain(this.#props.queryNode, format, options), - }); - return await builder.execute(); - } -} diff --git a/node_modules/kysely/dist/esm/query-builder/insert-result.d.ts b/node_modules/kysely/dist/esm/query-builder/insert-result.d.ts deleted file mode 100644 index 1a8d763..0000000 --- a/node_modules/kysely/dist/esm/query-builder/insert-result.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * The result of an insert query. - * - * If the table has an auto incrementing primary key {@link insertId} will hold - * the generated id on dialects that support it. For example PostgreSQL doesn't - * return the id by default and {@link insertId} is undefined. On PostgreSQL you - * need to use {@link ReturningInterface.returning} or {@link ReturningInterface.returningAll} - * to get out the inserted id. - * - * {@link numInsertedOrUpdatedRows} holds the number of (actually) inserted rows. - * On MySQL, updated rows are counted twice when using `on duplicate key update`. - * - * ### Examples - * - * ```ts - * import type { NewPerson } from 'type-editor' // imaginary module - * - * async function insertPerson(person: NewPerson) { - * const result = await db - * .insertInto('person') - * .values(person) - * .executeTakeFirstOrThrow() - * - * console.log(result.insertId) // relevant on MySQL - * console.log(result.numInsertedOrUpdatedRows) // always relevant - * } - * ``` - */ -export declare class InsertResult { - /** - * The auto incrementing primary key of the inserted row. - * - * This property can be undefined when the query contains an `on conflict` - * clause that makes the query succeed even when nothing gets inserted. - * - * This property is always undefined on dialects like PostgreSQL that - * don't return the inserted id by default. On those dialects you need - * to use the {@link ReturningInterface.returning | returning} method. - */ - readonly insertId: bigint | undefined; - /** - * Affected rows count. - */ - readonly numInsertedOrUpdatedRows: bigint | undefined; - constructor(insertId: bigint | undefined, numInsertedOrUpdatedRows: bigint | undefined); -} diff --git a/node_modules/kysely/dist/esm/query-builder/insert-result.js b/node_modules/kysely/dist/esm/query-builder/insert-result.js deleted file mode 100644 index b4f9b2d..0000000 --- a/node_modules/kysely/dist/esm/query-builder/insert-result.js +++ /dev/null @@ -1,50 +0,0 @@ -/// -/** - * The result of an insert query. - * - * If the table has an auto incrementing primary key {@link insertId} will hold - * the generated id on dialects that support it. For example PostgreSQL doesn't - * return the id by default and {@link insertId} is undefined. On PostgreSQL you - * need to use {@link ReturningInterface.returning} or {@link ReturningInterface.returningAll} - * to get out the inserted id. - * - * {@link numInsertedOrUpdatedRows} holds the number of (actually) inserted rows. - * On MySQL, updated rows are counted twice when using `on duplicate key update`. - * - * ### Examples - * - * ```ts - * import type { NewPerson } from 'type-editor' // imaginary module - * - * async function insertPerson(person: NewPerson) { - * const result = await db - * .insertInto('person') - * .values(person) - * .executeTakeFirstOrThrow() - * - * console.log(result.insertId) // relevant on MySQL - * console.log(result.numInsertedOrUpdatedRows) // always relevant - * } - * ``` - */ -export class InsertResult { - /** - * The auto incrementing primary key of the inserted row. - * - * This property can be undefined when the query contains an `on conflict` - * clause that makes the query succeed even when nothing gets inserted. - * - * This property is always undefined on dialects like PostgreSQL that - * don't return the inserted id by default. On those dialects you need - * to use the {@link ReturningInterface.returning | returning} method. - */ - insertId; - /** - * Affected rows count. - */ - numInsertedOrUpdatedRows; - constructor(insertId, numInsertedOrUpdatedRows) { - this.insertId = insertId; - this.numInsertedOrUpdatedRows = numInsertedOrUpdatedRows; - } -} diff --git a/node_modules/kysely/dist/esm/query-builder/join-builder.d.ts b/node_modules/kysely/dist/esm/query-builder/join-builder.d.ts deleted file mode 100644 index df42b6d..0000000 --- a/node_modules/kysely/dist/esm/query-builder/join-builder.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { JoinNode } from '../operation-node/join-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { type ComparisonOperatorExpression, type OperandValueExpressionOrList } from '../parser/binary-operation-parser.js'; -import type { ExpressionOrFactory } from '../parser/expression-parser.js'; -import type { ReferenceExpression } from '../parser/reference-parser.js'; -import type { SqlBool } from '../util/type-utils.js'; -export declare class JoinBuilder implements OperationNodeSource { - #private; - constructor(props: JoinBuilderProps); - /** - * Just like {@link WhereInterface.where} but adds an item to the join's - * `on` clause instead. - * - * See {@link WhereInterface.where} for documentation and examples. - */ - on>(lhs: RE, op: ComparisonOperatorExpression, rhs: OperandValueExpressionOrList): JoinBuilder; - on(expression: ExpressionOrFactory): JoinBuilder; - /** - * Just like {@link WhereInterface.whereRef} but adds an item to the join's - * `on` clause instead. - * - * See {@link WhereInterface.whereRef} for documentation and examples. - */ - onRef(lhs: ReferenceExpression, op: ComparisonOperatorExpression, rhs: ReferenceExpression): JoinBuilder; - /** - * Adds `on true`. - */ - onTrue(): JoinBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): JoinNode; -} -export interface JoinBuilderProps { - readonly joinNode: JoinNode; -} diff --git a/node_modules/kysely/dist/esm/query-builder/join-builder.js b/node_modules/kysely/dist/esm/query-builder/join-builder.js deleted file mode 100644 index 6c230bb..0000000 --- a/node_modules/kysely/dist/esm/query-builder/join-builder.js +++ /dev/null @@ -1,48 +0,0 @@ -/// -import { JoinNode } from '../operation-node/join-node.js'; -import { RawNode } from '../operation-node/raw-node.js'; -import { parseValueBinaryOperationOrExpression, parseReferentialBinaryOperation, } from '../parser/binary-operation-parser.js'; -import { freeze } from '../util/object-utils.js'; -export class JoinBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - on(...args) { - return new JoinBuilder({ - ...this.#props, - joinNode: JoinNode.cloneWithOn(this.#props.joinNode, parseValueBinaryOperationOrExpression(args)), - }); - } - /** - * Just like {@link WhereInterface.whereRef} but adds an item to the join's - * `on` clause instead. - * - * See {@link WhereInterface.whereRef} for documentation and examples. - */ - onRef(lhs, op, rhs) { - return new JoinBuilder({ - ...this.#props, - joinNode: JoinNode.cloneWithOn(this.#props.joinNode, parseReferentialBinaryOperation(lhs, op, rhs)), - }); - } - /** - * Adds `on true`. - */ - onTrue() { - return new JoinBuilder({ - ...this.#props, - joinNode: JoinNode.cloneWithOn(this.#props.joinNode, RawNode.createWithSql('true')), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.joinNode; - } -} diff --git a/node_modules/kysely/dist/esm/query-builder/json-path-builder.d.ts b/node_modules/kysely/dist/esm/query-builder/json-path-builder.d.ts deleted file mode 100644 index 4a9bf9d..0000000 --- a/node_modules/kysely/dist/esm/query-builder/json-path-builder.d.ts +++ /dev/null @@ -1,294 +0,0 @@ -import type { AliasableExpression, AliasedExpression, Expression } from '../expression/expression.js'; -import { AliasNode } from '../operation-node/alias-node.js'; -import { JSONPathNode } from '../operation-node/json-path-node.js'; -import { JSONReferenceNode } from '../operation-node/json-reference-node.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -export declare class JSONPathBuilder { - #private; - constructor(node: JSONReferenceNode | JSONPathNode); - /** - * Access an element of a JSON array in a specific location. - * - * Since there's no guarantee an element exists in the given array location, the - * resulting type is always nullable. If you're sure the element exists, you - * should use {@link SelectQueryBuilder.$assertType} to narrow the type safely. - * - * See also {@link key} to access properties of JSON objects. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .select(eb => - * eb.ref('nicknames', '->').at(0).as('primary_nickname') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "nicknames"->0 as "primary_nickname" from "person" - *``` - * - * Combined with {@link key}: - * - * ```ts - * db.selectFrom('person').select(eb => - * eb.ref('experience', '->').at(0).key('role').as('first_role') - * ) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "experience"->0->'role' as "first_role" from "person" - * ``` - * - * You can use `'last'` to access the last element of the array in MySQL: - * - * ```ts - * db.selectFrom('person').select(eb => - * eb.ref('nicknames', '->$').at('last').as('last_nickname') - * ) - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select `nicknames`->'$[last]' as `last_nickname` from `person` - * ``` - * - * Or `'#-1'` in SQLite: - * - * ```ts - * db.selectFrom('person').select(eb => - * eb.ref('nicknames', '->>$').at('#-1').as('last_nickname') - * ) - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select "nicknames"->>'$[#-1]' as `last_nickname` from `person` - * ``` - */ - at[keyof NonNullable & number]>>(index: `${I}` extends `${any}.${any}` | `#--${any}` ? never : I): TraversedJSONPathBuilder; - /** - * Access a property of a JSON object. - * - * If a field is optional, the resulting type will be nullable. - * - * See also {@link at} to access elements of JSON arrays. - * - * ### Examples - * - * ```ts - * db.selectFrom('person').select(eb => - * eb.ref('address', '->').key('city').as('city') - * ) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "address"->'city' as "city" from "person" - * ``` - * - * Going deeper: - * - * ```ts - * db.selectFrom('person').select(eb => - * eb.ref('profile', '->$').key('website').key('url').as('website_url') - * ) - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select `profile`->'$.website.url' as `website_url` from `person` - * ``` - * - * Combined with {@link at}: - * - * ```ts - * db.selectFrom('person').select(eb => - * eb.ref('profile', '->').key('addresses').at(0).key('city').as('city') - * ) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "profile"->'addresses'->0->'city' as "city" from "person" - * ``` - */ - key & string : never, O2 = undefined extends O ? null | NonNullable[K]> : null extends O ? null | NonNullable[K]> : string extends keyof NonNullable ? null | NonNullable[K]> : NonNullable[K]>(key: K): TraversedJSONPathBuilder; -} -export declare class TraversedJSONPathBuilder extends JSONPathBuilder implements AliasableExpression { - #private; - constructor(node: JSONReferenceNode | JSONPathNode); - /** @private */ - /** - * All expressions need to have this getter for complicated type-related reasons. - * Simply add this getter for your expression and always return `undefined` from it: - * - * ### Examples - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - * - * The getter is needed to make the expression assignable to another expression only - * if the types `T` are assignable. Without this property (or some other property - * that references `T`), you could assing `Expression` to `Expression`. - */ - get expressionType(): O | undefined; - /** - * Returns an aliased version of the expression. - * - * In addition to slapping `as "the_alias"` to the end of the SQL, - * this method also provides strict typing: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select(eb => - * eb('first_name', '=', 'Jennifer').as('is_jennifer') - * ) - * .executeTakeFirstOrThrow() - * - * // `is_jennifer: SqlBool` field exists in the result type. - * console.log(result.is_jennifer) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name" = $1 as "is_jennifer" - * from "person" - * ``` - */ - as(alias: A): AliasedExpression; - /** - * Returns an aliased version of the expression. - * - * ### Examples - * - * In addition to slapping `as "the_alias"` at the end of the expression, - * this method also provides strict typing: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => - * // `eb.fn` returns an AliasableExpression - * eb.fn('concat', ['first_name', eb.val(' '), 'last_name']).as('full_name') - * ) - * .executeTakeFirstOrThrow() - * - * // `full_name: string` field exists in the result type. - * console.log(result.full_name) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * concat("first_name", $1, "last_name") as "full_name" - * from - * "person" - * ``` - * - * You can also pass in a raw SQL snippet (or any expression) but in that case you must - * provide the alias as the only type argument: - * - * ```ts - * import { sql } from 'kysely' - * - * const values = sql<{ a: number, b: string }>`(values (1, 'foo'))` - * - * // The alias is `t(a, b)` which specifies the column names - * // in addition to the table name. We must tell kysely that - * // columns of the table can be referenced through `t` - * // by providing an explicit type argument. - * const aliasedValues = values.as<'t'>(sql`t(a, b)`) - * - * await db - * .insertInto('person') - * .columns(['first_name', 'last_name']) - * .expression( - * db.selectFrom(aliasedValues).select(['t.a', 't.b']) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name") - * from (values (1, 'foo')) as t(a, b) - * select "t"."a", "t"."b" - * ``` - */ - as(alias: Expression): AliasedExpression; - /** - * Change the output type of the json path. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `JSONPathBuilder` with a new output type. - */ - $castTo(): TraversedJSONPathBuilder; - $notNull(): TraversedJSONPathBuilder>; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - * - * ### Examples - * - * If you are creating a custom expression, it's often easiest to use the {@link sql} - * template tag to build the node: - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - */ - toOperationNode(): OperationNode; -} -export declare class AliasedJSONPathBuilder implements AliasedExpression { - #private; - constructor(jsonPath: TraversedJSONPathBuilder, alias: A | Expression); - /** @private */ - /** - * Returns the aliased expression. - */ - get expression(): Expression; - /** @private */ - /** - * Returns the alias. - */ - get alias(): A | Expression; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - */ - toOperationNode(): AliasNode; -} diff --git a/node_modules/kysely/dist/esm/query-builder/json-path-builder.js b/node_modules/kysely/dist/esm/query-builder/json-path-builder.js deleted file mode 100644 index 8b2778f..0000000 --- a/node_modules/kysely/dist/esm/query-builder/json-path-builder.js +++ /dev/null @@ -1,195 +0,0 @@ -/// -import { AliasNode } from '../operation-node/alias-node.js'; -import { IdentifierNode } from '../operation-node/identifier-node.js'; -import { JSONOperatorChainNode } from '../operation-node/json-operator-chain-node.js'; -import { JSONPathLegNode, } from '../operation-node/json-path-leg-node.js'; -import { JSONPathNode } from '../operation-node/json-path-node.js'; -import { JSONReferenceNode } from '../operation-node/json-reference-node.js'; -import { isOperationNodeSource } from '../operation-node/operation-node-source.js'; -import { ValueNode } from '../operation-node/value-node.js'; -export class JSONPathBuilder { - #node; - constructor(node) { - this.#node = node; - } - /** - * Access an element of a JSON array in a specific location. - * - * Since there's no guarantee an element exists in the given array location, the - * resulting type is always nullable. If you're sure the element exists, you - * should use {@link SelectQueryBuilder.$assertType} to narrow the type safely. - * - * See also {@link key} to access properties of JSON objects. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .select(eb => - * eb.ref('nicknames', '->').at(0).as('primary_nickname') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "nicknames"->0 as "primary_nickname" from "person" - *``` - * - * Combined with {@link key}: - * - * ```ts - * db.selectFrom('person').select(eb => - * eb.ref('experience', '->').at(0).key('role').as('first_role') - * ) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "experience"->0->'role' as "first_role" from "person" - * ``` - * - * You can use `'last'` to access the last element of the array in MySQL: - * - * ```ts - * db.selectFrom('person').select(eb => - * eb.ref('nicknames', '->$').at('last').as('last_nickname') - * ) - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select `nicknames`->'$[last]' as `last_nickname` from `person` - * ``` - * - * Or `'#-1'` in SQLite: - * - * ```ts - * db.selectFrom('person').select(eb => - * eb.ref('nicknames', '->>$').at('#-1').as('last_nickname') - * ) - * ``` - * - * The generated SQL (SQLite): - * - * ```sql - * select "nicknames"->>'$[#-1]' as `last_nickname` from `person` - * ``` - */ - at(index) { - return this.#createBuilderWithPathLeg('ArrayLocation', index); - } - /** - * Access a property of a JSON object. - * - * If a field is optional, the resulting type will be nullable. - * - * See also {@link at} to access elements of JSON arrays. - * - * ### Examples - * - * ```ts - * db.selectFrom('person').select(eb => - * eb.ref('address', '->').key('city').as('city') - * ) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "address"->'city' as "city" from "person" - * ``` - * - * Going deeper: - * - * ```ts - * db.selectFrom('person').select(eb => - * eb.ref('profile', '->$').key('website').key('url').as('website_url') - * ) - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select `profile`->'$.website.url' as `website_url` from `person` - * ``` - * - * Combined with {@link at}: - * - * ```ts - * db.selectFrom('person').select(eb => - * eb.ref('profile', '->').key('addresses').at(0).key('city').as('city') - * ) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "profile"->'addresses'->0->'city' as "city" from "person" - * ``` - */ - key(key) { - return this.#createBuilderWithPathLeg('Member', key); - } - #createBuilderWithPathLeg(legType, value) { - if (JSONReferenceNode.is(this.#node)) { - return new TraversedJSONPathBuilder(JSONReferenceNode.cloneWithTraversal(this.#node, JSONPathNode.is(this.#node.traversal) - ? JSONPathNode.cloneWithLeg(this.#node.traversal, JSONPathLegNode.create(legType, value)) - : JSONOperatorChainNode.cloneWithValue(this.#node.traversal, ValueNode.createImmediate(value)))); - } - return new TraversedJSONPathBuilder(JSONPathNode.cloneWithLeg(this.#node, JSONPathLegNode.create(legType, value))); - } -} -export class TraversedJSONPathBuilder extends JSONPathBuilder { - #node; - constructor(node) { - super(node); - this.#node = node; - } - /** @private */ - get expressionType() { - return undefined; - } - as(alias) { - return new AliasedJSONPathBuilder(this, alias); - } - /** - * Change the output type of the json path. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `JSONPathBuilder` with a new output type. - */ - $castTo() { - return new TraversedJSONPathBuilder(this.#node); - } - $notNull() { - return new TraversedJSONPathBuilder(this.#node); - } - toOperationNode() { - return this.#node; - } -} -export class AliasedJSONPathBuilder { - #jsonPath; - #alias; - constructor(jsonPath, alias) { - this.#jsonPath = jsonPath; - this.#alias = alias; - } - /** @private */ - get expression() { - return this.#jsonPath; - } - /** @private */ - get alias() { - return this.#alias; - } - toOperationNode() { - return AliasNode.create(this.#jsonPath.toOperationNode(), isOperationNodeSource(this.#alias) - ? this.#alias.toOperationNode() - : IdentifierNode.create(this.#alias)); - } -} diff --git a/node_modules/kysely/dist/esm/query-builder/merge-query-builder.d.ts b/node_modules/kysely/dist/esm/query-builder/merge-query-builder.d.ts deleted file mode 100644 index 3a731d9..0000000 --- a/node_modules/kysely/dist/esm/query-builder/merge-query-builder.d.ts +++ /dev/null @@ -1,1001 +0,0 @@ -import type { AliasedExpression, Expression } from '../expression/expression.js'; -import { MergeQueryNode } from '../operation-node/merge-query-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { QueryNode } from '../operation-node/query-node.js'; -import type { ComparisonOperatorExpression, OperandValueExpressionOrList } from '../parser/binary-operation-parser.js'; -import type { ExpressionOrFactory } from '../parser/expression-parser.js'; -import { type InsertObjectOrList, type InsertObjectOrListFactory } from '../parser/insert-values-parser.js'; -import { type JoinCallbackExpression, type JoinReferenceExpression } from '../parser/join-parser.js'; -import type { ReferenceExpression } from '../parser/reference-parser.js'; -import type { ReturningAllRow, ReturningCallbackRow, ReturningRow } from '../parser/returning-parser.js'; -import { type SelectCallback, type SelectExpression } from '../parser/select-parser.js'; -import type { TableExpression } from '../parser/table-parser.js'; -import type { ExtractUpdateTypeFromReferenceExpression, UpdateObject, UpdateObjectFactory } from '../parser/update-set-parser.js'; -import type { ValueExpression } from '../parser/value-parser.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryId } from '../util/query-id.js'; -import type { ShallowRecord, SimplifyResult, SimplifySingleResult, SqlBool } from '../util/type-utils.js'; -import { MergeResult } from './merge-result.js'; -import { type NoResultErrorConstructor } from './no-result-error.js'; -import type { OutputCallback, OutputExpression, OutputInterface, OutputPrefix, SelectExpressionFromOutputCallback, SelectExpressionFromOutputExpression } from './output-interface.js'; -import type { MultiTableReturningInterface } from './returning-interface.js'; -import { UpdateQueryBuilder } from './update-query-builder.js'; -export declare class MergeQueryBuilder implements MultiTableReturningInterface, OutputInterface { - #private; - constructor(props: MergeQueryBuilderProps); - /** - * This can be used to add any additional SQL to the end of the query. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db - * .mergeInto('person') - * .using('pet', 'pet.owner_id', 'person.id') - * .whenMatched() - * .thenDelete() - * .modifyEnd(sql.raw('-- this is a comment')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" using "pet" on "pet"."owner_id" = "person"."id" when matched then delete -- this is a comment - * ``` - */ - modifyEnd(modifier: Expression): MergeQueryBuilder; - /** - * Changes a `merge into` query to an `merge top into` query. - * - * `top` clause is only supported by some dialects like MS SQL Server. - * - * ### Examples - * - * Affect 5 matched rows at most: - * - * ```ts - * await db.mergeInto('person') - * .top(5) - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenDelete() - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * merge top(5) into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * delete - * ``` - * - * Affect 50% of matched rows: - * - * ```ts - * await db.mergeInto('person') - * .top(50, 'percent') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenDelete() - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * merge top(50) percent into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * delete - * ``` - */ - top(expression: number | bigint, modifiers?: 'percent'): MergeQueryBuilder; - /** - * Adds the `using` clause to the query. - * - * This method is similar to {@link SelectQueryBuilder.innerJoin}, so see the - * documentation for that method for more examples. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenDelete() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * delete - * ``` - */ - using, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(sourceTable: TE, k1: K1, k2: K2): ExtractWheneableMergeQueryBuilder; - using, FN extends JoinCallbackExpression>(sourceTable: TE, callback: FN): ExtractWheneableMergeQueryBuilder; - /** - * Allows you to return data from modified rows. - * - * On supported databases like PostgreSQL, this method can be chained to - * `insert`, `update`, `delete` and `merge` queries to return data. - * - * Note that on SQLite you need to give aliases for the expressions to avoid - * [this bug](https://sqlite.org/forum/forumpost/033daf0b32) in SQLite. - * For example `.returning('id as id')`. - * - * Also see the {@link returningAll} method. - * - * ### Examples - * - * Return one column: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * ``` - * - * Return multiple columns: - * - * ```ts - * const { id, last_name } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning(['id', 'last_name']) - * .executeTakeFirstOrThrow() - * ``` - * - * Return arbitrary expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * const { id, full_name, first_pet_id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning((eb) => [ - * 'id as id', - * sql`concat(first_name, ' ', last_name)`.as('full_name'), - * eb.selectFrom('pet').select('pet.id').limit(1).as('first_pet_id') - * ]) - * .executeTakeFirstOrThrow() - * ``` - */ - returning>(selections: ReadonlyArray): MergeQueryBuilder>; - returning>(callback: CB): MergeQueryBuilder>; - returning>(selection: SE): MergeQueryBuilder>; - /** - * Adds a `returning *` or `returning table.*` to an insert/update/delete/merge - * query on databases that support `returning` such as PostgreSQL. - * - * Also see the {@link returning} method. - */ - returningAll(table: T): MergeQueryBuilder>; - returningAll(): MergeQueryBuilder>; - /** - * Allows you to return data from modified rows. - * - * On supported databases like MS SQL Server (MSSQL), this method can be chained - * to `insert`, `update`, `delete` and `merge` queries to return data. - * - * Also see the {@link outputAll} method. - * - * ### Examples - * - * Return one column: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .output('inserted.id') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * gender: 'female', - * }) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "gender") - * output "inserted"."id" - * values (@1, @2, @3) - * ``` - * - * Return multiple columns: - * - * ```ts - * const { old_first_name, old_last_name, new_first_name, new_last_name } = await db - * .updateTable('person') - * .set({ first_name: 'John', last_name: 'Doe' }) - * .output([ - * 'deleted.first_name as old_first_name', - * 'deleted.last_name as old_last_name', - * 'inserted.first_name as new_first_name', - * 'inserted.last_name as new_last_name', - * ]) - * .where('created_at', '<', new Date()) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * update "person" - * set "first_name" = @1, "last_name" = @2 - * output "deleted"."first_name" as "old_first_name", - * "deleted"."last_name" as "old_last_name", - * "inserted"."first_name" as "new_first_name", - * "inserted"."last_name" as "new_last_name" - * where "created_at" < @3 - * ``` - * - * Return arbitrary expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * const { full_name } = await db - * .deleteFrom('person') - * .output((eb) => sql`concat(${eb.ref('deleted.first_name')}, ' ', ${eb.ref('deleted.last_name')})`.as('full_name')) - * .where('created_at', '<', new Date()) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * delete from "person" - * output concat("deleted"."first_name", ' ', "deleted"."last_name") as "full_name" - * where "created_at" < @1 - * ``` - * - * Return the action performed on the row: - * - * ```ts - * await db - * .mergeInto('person') - * .using('pet', 'pet.owner_id', 'person.id') - * .whenMatched() - * .thenDelete() - * .whenNotMatched() - * .thenInsertValues({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male' - * }) - * .output([ - * 'inserted.id as inserted_id', - * 'deleted.id as deleted_id', - * ]) - * .execute() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * merge into "person" - * using "pet" on "pet"."owner_id" = "person"."id" - * when matched then delete - * when not matched then - * insert ("first_name", "last_name", "gender") - * values (@1, @2, @3) - * output "inserted"."id" as "inserted_id", "deleted"."id" as "deleted_id" - * ``` - * - */ - output>(selections: readonly OE[]): MergeQueryBuilder>>; - output>(callback: CB): MergeQueryBuilder>>; - output>(selection: OE): MergeQueryBuilder>>; - /** - * Adds an `output {prefix}.*` to an `insert`/`update`/`delete`/`merge` query on databases - * that support `output` such as MS SQL Server (MSSQL). - * - * Also see the {@link output} method. - */ - outputAll(table: OutputPrefix): MergeQueryBuilder>; -} -export interface MergeQueryBuilderProps { - readonly queryId: QueryId; - readonly queryNode: MergeQueryNode; - readonly executor: QueryExecutor; -} -export declare class WheneableMergeQueryBuilder implements Compilable, MultiTableReturningInterface, OutputInterface, OperationNodeSource { - #private; - constructor(props: MergeQueryBuilderProps); - /** - * This can be used to add any additional SQL to the end of the query. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db - * .mergeInto('person') - * .using('pet', 'pet.owner_id', 'person.id') - * .whenMatched() - * .thenDelete() - * .modifyEnd(sql.raw('-- this is a comment')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" using "pet" on "pet"."owner_id" = "person"."id" when matched then delete -- this is a comment - * ``` - */ - modifyEnd(modifier: Expression): WheneableMergeQueryBuilder; - /** - * See {@link MergeQueryBuilder.top}. - */ - top(expression: number | bigint, modifiers?: 'percent'): WheneableMergeQueryBuilder; - /** - * Adds a simple `when matched` clause to the query. - * - * For a `when matched` clause with an `and` condition, see {@link whenMatchedAnd}. - * - * For a simple `when not matched` clause, see {@link whenNotMatched}. - * - * For a `when not matched` clause with an `and` condition, see {@link whenNotMatchedAnd}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenDelete() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * delete - * ``` - */ - whenMatched(): MatchedThenableMergeQueryBuilder; - /** - * Adds the `when matched` clause to the query with an `and` condition. - * - * This method is similar to {@link SelectQueryBuilder.where}, so see the documentation - * for that method for more examples. - * - * For a simple `when matched` clause (without an `and` condition) see {@link whenMatched}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatchedAnd('person.first_name', '=', 'John') - * .thenDelete() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched and "person"."first_name" = $1 then - * delete - * ``` - */ - whenMatchedAnd, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): MatchedThenableMergeQueryBuilder; - whenMatchedAnd>(expression: E): MatchedThenableMergeQueryBuilder; - /** - * Adds the `when matched` clause to the query with an `and` condition. But unlike - * {@link whenMatchedAnd}, this method accepts a column reference as the 3rd argument. - * - * This method is similar to {@link SelectQueryBuilder.whereRef}, so see the documentation - * for that method for more examples. - */ - whenMatchedAndRef, RRE extends ReferenceExpression>(lhs: LRE, op: ComparisonOperatorExpression, rhs: RRE): MatchedThenableMergeQueryBuilder; - /** - * Adds a simple `when not matched` clause to the query. - * - * For a `when not matched` clause with an `and` condition, see {@link whenNotMatchedAnd}. - * - * For a simple `when matched` clause, see {@link whenMatched}. - * - * For a `when matched` clause with an `and` condition, see {@link whenMatchedAnd}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenNotMatched() - * .thenInsertValues({ - * first_name: 'John', - * last_name: 'Doe', - * }) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when not matched then - * insert ("first_name", "last_name") values ($1, $2) - * ``` - */ - whenNotMatched(): NotMatchedThenableMergeQueryBuilder; - /** - * Adds the `when not matched` clause to the query with an `and` condition. - * - * This method is similar to {@link SelectQueryBuilder.where}, so see the documentation - * for that method for more examples. - * - * For a simple `when not matched` clause (without an `and` condition) see {@link whenNotMatched}. - * - * Unlike {@link whenMatchedAnd}, you cannot reference columns from the table merged into. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenNotMatchedAnd('pet.name', '=', 'Lucky') - * .thenInsertValues({ - * first_name: 'John', - * last_name: 'Doe', - * }) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when not matched and "pet"."name" = $1 then - * insert ("first_name", "last_name") values ($2, $3) - * ``` - */ - whenNotMatchedAnd, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): NotMatchedThenableMergeQueryBuilder; - whenNotMatchedAnd>(expression: E): NotMatchedThenableMergeQueryBuilder; - /** - * Adds the `when not matched` clause to the query with an `and` condition. But unlike - * {@link whenNotMatchedAnd}, this method accepts a column reference as the 3rd argument. - * - * Unlike {@link whenMatchedAndRef}, you cannot reference columns from the target table. - * - * This method is similar to {@link SelectQueryBuilder.whereRef}, so see the documentation - * for that method for more examples. - */ - whenNotMatchedAndRef, RRE extends ReferenceExpression>(lhs: LRE, op: ComparisonOperatorExpression, rhs: RRE): NotMatchedThenableMergeQueryBuilder; - /** - * Adds a simple `when not matched by source` clause to the query. - * - * Supported in MS SQL Server. - * - * Similar to {@link whenNotMatched}, but returns a {@link MatchedThenableMergeQueryBuilder}. - */ - whenNotMatchedBySource(): MatchedThenableMergeQueryBuilder; - /** - * Adds the `when not matched by source` clause to the query with an `and` condition. - * - * Supported in MS SQL Server. - * - * Similar to {@link whenNotMatchedAnd}, but returns a {@link MatchedThenableMergeQueryBuilder}. - */ - whenNotMatchedBySourceAnd, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): MatchedThenableMergeQueryBuilder; - whenNotMatchedBySourceAnd>(expression: E): MatchedThenableMergeQueryBuilder; - /** - * Adds the `when not matched by source` clause to the query with an `and` condition. - * - * Similar to {@link whenNotMatchedAndRef}, but you can reference columns from - * the target table, and not from source table and returns a {@link MatchedThenableMergeQueryBuilder}. - */ - whenNotMatchedBySourceAndRef, RRE extends ReferenceExpression>(lhs: LRE, op: ComparisonOperatorExpression, rhs: RRE): MatchedThenableMergeQueryBuilder; - /** - * Allows you to return data from modified rows. - * - * On supported databases like PostgreSQL, this method can be chained to - * `insert`, `update`, `delete` and `merge` queries to return data. - * - * Note that on SQLite you need to give aliases for the expressions to avoid - * [this bug](https://sqlite.org/forum/forumpost/033daf0b32) in SQLite. - * For example `.returning('id as id')`. - * - * Also see the {@link returningAll} method. - * - * ### Examples - * - * Return one column: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * ``` - * - * Return multiple columns: - * - * ```ts - * const { id, last_name } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning(['id', 'last_name']) - * .executeTakeFirstOrThrow() - * ``` - * - * Return arbitrary expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * const { id, full_name, first_pet_id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning((eb) => [ - * 'id as id', - * sql`concat(first_name, ' ', last_name)`.as('full_name'), - * eb.selectFrom('pet').select('pet.id').limit(1).as('first_pet_id') - * ]) - * .executeTakeFirstOrThrow() - * ``` - */ - returning>(selections: ReadonlyArray): WheneableMergeQueryBuilder>; - returning>(callback: CB): WheneableMergeQueryBuilder>; - returning>(selection: SE): WheneableMergeQueryBuilder>; - /** - * Adds a `returning *` or `returning table.*` to an insert/update/delete/merge - * query on databases that support `returning` such as PostgreSQL. - * - * Also see the {@link returning} method. - */ - returningAll(table: T): WheneableMergeQueryBuilder>; - returningAll(): WheneableMergeQueryBuilder>; - /** - * Allows you to return data from modified rows. - * - * On supported databases like MS SQL Server (MSSQL), this method can be chained - * to `insert`, `update`, `delete` and `merge` queries to return data. - * - * Also see the {@link outputAll} method. - * - * ### Examples - * - * Return one column: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .output('inserted.id') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * gender: 'female', - * }) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "gender") - * output "inserted"."id" - * values (@1, @2, @3) - * ``` - * - * Return multiple columns: - * - * ```ts - * const { old_first_name, old_last_name, new_first_name, new_last_name } = await db - * .updateTable('person') - * .set({ first_name: 'John', last_name: 'Doe' }) - * .output([ - * 'deleted.first_name as old_first_name', - * 'deleted.last_name as old_last_name', - * 'inserted.first_name as new_first_name', - * 'inserted.last_name as new_last_name', - * ]) - * .where('created_at', '<', new Date()) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * update "person" - * set "first_name" = @1, "last_name" = @2 - * output "deleted"."first_name" as "old_first_name", - * "deleted"."last_name" as "old_last_name", - * "inserted"."first_name" as "new_first_name", - * "inserted"."last_name" as "new_last_name" - * where "created_at" < @3 - * ``` - * - * Return arbitrary expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * const { full_name } = await db - * .deleteFrom('person') - * .output((eb) => sql`concat(${eb.ref('deleted.first_name')}, ' ', ${eb.ref('deleted.last_name')})`.as('full_name')) - * .where('created_at', '<', new Date()) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * delete from "person" - * output concat("deleted"."first_name", ' ', "deleted"."last_name") as "full_name" - * where "created_at" < @1 - * ``` - * - * Return the action performed on the row: - * - * ```ts - * await db - * .mergeInto('person') - * .using('pet', 'pet.owner_id', 'person.id') - * .whenMatched() - * .thenDelete() - * .whenNotMatched() - * .thenInsertValues({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male' - * }) - * .output([ - * 'inserted.id as inserted_id', - * 'deleted.id as deleted_id', - * ]) - * .execute() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * merge into "person" - * using "pet" on "pet"."owner_id" = "person"."id" - * when matched then delete - * when not matched then - * insert ("first_name", "last_name", "gender") - * values (@1, @2, @3) - * output "inserted"."id" as "inserted_id", "deleted"."id" as "deleted_id" - * ``` - * - */ - output>(selections: readonly OE[]): WheneableMergeQueryBuilder>>; - output>(callback: CB): WheneableMergeQueryBuilder>>; - output>(selection: OE): WheneableMergeQueryBuilder>>; - /** - * Adds an `output {prefix}.*` to an `insert`/`update`/`delete`/`merge` query on databases - * that support `output` such as MS SQL Server (MSSQL). - * - * Also see the {@link output} method. - */ - outputAll(table: OutputPrefix): WheneableMergeQueryBuilder>; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - * - * If you want to conditionally call a method on `this`, see - * the {@link $if} method. - * - * ### Examples - * - * The next example uses a helper function `log` to log a query: - * - * ```ts - * import type { Compilable } from 'kysely' - * - * function log(qb: T): T { - * console.log(qb.compile()) - * return qb - * } - * - * await db.updateTable('person') - * .set({ first_name: 'John' }) - * .$call(log) - * .execute() - * ``` - */ - $call(func: (qb: this) => T): T; - /** - * Call `func(this)` if `condition` is true. - * - * This method is especially handy with optional selects. Any `returning` or `returningAll` - * method calls add columns as optional fields to the output type when called inside - * the `func` callback. This is because we can't know if those selections were actually - * made before running the code. - * - * You can also call any other methods inside the callback. - * - * ### Examples - * - * ```ts - * import type { PersonUpdate } from 'type-editor' // imaginary module - * - * async function updatePerson(id: number, updates: PersonUpdate, returnLastName: boolean) { - * return await db - * .updateTable('person') - * .set(updates) - * .where('id', '=', id) - * .returning(['id', 'first_name']) - * .$if(returnLastName, (qb) => qb.returning('last_name')) - * .executeTakeFirstOrThrow() - * } - * ``` - * - * Any selections added inside the `if` callback will be added as optional fields to the - * output type since we can't know if the selections were actually made before running - * the code. In the example above the return type of the `updatePerson` function is: - * - * ```ts - * Promise<{ - * id: number - * first_name: string - * last_name?: string - * }> - * ``` - */ - $if(condition: boolean, func: (qb: this) => WheneableMergeQueryBuilder): O2 extends MergeResult ? WheneableMergeQueryBuilder : O2 extends O & infer E ? WheneableMergeQueryBuilder> : WheneableMergeQueryBuilder>; - toOperationNode(): MergeQueryNode; - compile(): CompiledQuery; - /** - * Executes the query and returns an array of rows. - * - * Also see the {@link executeTakeFirst} and {@link executeTakeFirstOrThrow} methods. - */ - execute(): Promise[]>; - /** - * Executes the query and returns the first result or undefined if - * the query returned no result. - */ - executeTakeFirst(): Promise>; - /** - * Executes the query and returns the first result or throws if - * the query returned no result. - * - * By default an instance of {@link NoResultError} is thrown, but you can - * provide a custom error class, or callback as the only argument to throw a different - * error. - */ - executeTakeFirstOrThrow(errorConstructor?: NoResultErrorConstructor | ((node: QueryNode) => Error)): Promise>; -} -export declare class MatchedThenableMergeQueryBuilder { - #private; - constructor(props: MergeQueryBuilderProps); - /** - * Performs the `delete` action. - * - * To perform the `do nothing` action, see {@link thenDoNothing}. - * - * To perform the `update` action, see {@link thenUpdate} or {@link thenUpdateSet}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenDelete() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * delete - * ``` - */ - thenDelete(): WheneableMergeQueryBuilder; - /** - * Performs the `do nothing` action. - * - * This is supported in PostgreSQL. - * - * To perform the `delete` action, see {@link thenDelete}. - * - * To perform the `update` action, see {@link thenUpdate} or {@link thenUpdateSet}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenDoNothing() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * do nothing - * ``` - */ - thenDoNothing(): WheneableMergeQueryBuilder; - /** - * Perform an `update` operation with a full-fledged {@link UpdateQueryBuilder}. - * This is handy when multiple `set` invocations are needed. - * - * For a shorthand version of this method, see {@link thenUpdateSet}. - * - * To perform the `delete` action, see {@link thenDelete}. - * - * To perform the `do nothing` action, see {@link thenDoNothing}. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenUpdate((ub) => ub - * .set(sql`metadata['has_pets']`, 'Y') - * .set({ - * updated_at: new Date().toISOString(), - * }) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * update set metadata['has_pets'] = $1, "updated_at" = $2 - * ``` - */ - thenUpdate>(set: (ub: QB) => QB): WheneableMergeQueryBuilder; - /** - * Performs an `update set` action, similar to {@link UpdateQueryBuilder.set}. - * - * For a full-fledged update query builder, see {@link thenUpdate}. - * - * To perform the `delete` action, see {@link thenDelete}. - * - * To perform the `do nothing` action, see {@link thenDoNothing}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenUpdateSet({ - * middle_name: 'dog owner', - * }) - * .execute() - * ``` - * - * The generate SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * update set "middle_name" = $1 - * ``` - */ - thenUpdateSet>(update: UO): WheneableMergeQueryBuilder; - thenUpdateSet>(update: U): WheneableMergeQueryBuilder; - thenUpdateSet, VE extends ValueExpression>>(key: RE, value: VE): WheneableMergeQueryBuilder; -} -export declare class NotMatchedThenableMergeQueryBuilder { - #private; - constructor(props: MergeQueryBuilderProps); - /** - * Performs the `do nothing` action. - * - * This is supported in PostgreSQL. - * - * To perform the `insert` action, see {@link thenInsertValues}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenNotMatched() - * .thenDoNothing() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when not matched then - * do nothing - * ``` - */ - thenDoNothing(): WheneableMergeQueryBuilder; - /** - * Performs the `insert (...) values` action. - * - * This method is similar to {@link InsertQueryBuilder.values}, so see the documentation - * for that method for more examples. - * - * To perform the `do nothing` action, see {@link thenDoNothing}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenNotMatched() - * .thenInsertValues({ - * first_name: 'John', - * last_name: 'Doe', - * }) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when not matched then - * insert ("first_name", "last_name") values ($1, $2) - * ``` - */ - thenInsertValues>(insert: I): WheneableMergeQueryBuilder; - thenInsertValues>(insert: IO): WheneableMergeQueryBuilder; -} -export type ExtractWheneableMergeQueryBuilder, O> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? UsingBuilder : never : TE extends keyof DB ? WheneableMergeQueryBuilder : TE extends AliasedExpression ? UsingBuilder : TE extends (qb: any) => AliasedExpression ? UsingBuilder : never; -type UsingBuilder = A extends keyof DB ? WheneableMergeQueryBuilder : WheneableMergeQueryBuilder, TT, A, O>; -export {}; diff --git a/node_modules/kysely/dist/esm/query-builder/merge-query-builder.js b/node_modules/kysely/dist/esm/query-builder/merge-query-builder.js deleted file mode 100644 index 51ec42c..0000000 --- a/node_modules/kysely/dist/esm/query-builder/merge-query-builder.js +++ /dev/null @@ -1,624 +0,0 @@ -/// -import { InsertQueryNode } from '../operation-node/insert-query-node.js'; -import { MergeQueryNode } from '../operation-node/merge-query-node.js'; -import { QueryNode } from '../operation-node/query-node.js'; -import { UpdateQueryNode } from '../operation-node/update-query-node.js'; -import { parseInsertExpression, } from '../parser/insert-values-parser.js'; -import { parseJoin, } from '../parser/join-parser.js'; -import { parseMergeThen, parseMergeWhen } from '../parser/merge-parser.js'; -import { parseSelectAll, parseSelectArg, } from '../parser/select-parser.js'; -import { parseTop } from '../parser/top-parser.js'; -import { NOOP_QUERY_EXECUTOR } from '../query-executor/noop-query-executor.js'; -import { freeze } from '../util/object-utils.js'; -import { MergeResult } from './merge-result.js'; -import { NoResultError, isNoResultErrorConstructor, } from './no-result-error.js'; -import { UpdateQueryBuilder } from './update-query-builder.js'; -export class MergeQueryBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - /** - * This can be used to add any additional SQL to the end of the query. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db - * .mergeInto('person') - * .using('pet', 'pet.owner_id', 'person.id') - * .whenMatched() - * .thenDelete() - * .modifyEnd(sql.raw('-- this is a comment')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" using "pet" on "pet"."owner_id" = "person"."id" when matched then delete -- this is a comment - * ``` - */ - modifyEnd(modifier) { - return new MergeQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithEndModifier(this.#props.queryNode, modifier.toOperationNode()), - }); - } - /** - * Changes a `merge into` query to an `merge top into` query. - * - * `top` clause is only supported by some dialects like MS SQL Server. - * - * ### Examples - * - * Affect 5 matched rows at most: - * - * ```ts - * await db.mergeInto('person') - * .top(5) - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenDelete() - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * merge top(5) into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * delete - * ``` - * - * Affect 50% of matched rows: - * - * ```ts - * await db.mergeInto('person') - * .top(50, 'percent') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenDelete() - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * merge top(50) percent into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * delete - * ``` - */ - top(expression, modifiers) { - return new MergeQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithTop(this.#props.queryNode, parseTop(expression, modifiers)), - }); - } - using(...args) { - return new WheneableMergeQueryBuilder({ - ...this.#props, - queryNode: MergeQueryNode.cloneWithUsing(this.#props.queryNode, parseJoin('Using', args)), - }); - } - returning(args) { - return new MergeQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithReturning(this.#props.queryNode, parseSelectArg(args)), - }); - } - returningAll(table) { - return new MergeQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithReturning(this.#props.queryNode, parseSelectAll(table)), - }); - } - output(args) { - return new MergeQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithOutput(this.#props.queryNode, parseSelectArg(args)), - }); - } - outputAll(table) { - return new MergeQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithOutput(this.#props.queryNode, parseSelectAll(table)), - }); - } -} -export class WheneableMergeQueryBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - /** - * This can be used to add any additional SQL to the end of the query. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db - * .mergeInto('person') - * .using('pet', 'pet.owner_id', 'person.id') - * .whenMatched() - * .thenDelete() - * .modifyEnd(sql.raw('-- this is a comment')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" using "pet" on "pet"."owner_id" = "person"."id" when matched then delete -- this is a comment - * ``` - */ - modifyEnd(modifier) { - return new WheneableMergeQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithEndModifier(this.#props.queryNode, modifier.toOperationNode()), - }); - } - /** - * See {@link MergeQueryBuilder.top}. - */ - top(expression, modifiers) { - return new WheneableMergeQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithTop(this.#props.queryNode, parseTop(expression, modifiers)), - }); - } - /** - * Adds a simple `when matched` clause to the query. - * - * For a `when matched` clause with an `and` condition, see {@link whenMatchedAnd}. - * - * For a simple `when not matched` clause, see {@link whenNotMatched}. - * - * For a `when not matched` clause with an `and` condition, see {@link whenNotMatchedAnd}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenDelete() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * delete - * ``` - */ - whenMatched() { - return this.#whenMatched([]); - } - whenMatchedAnd(...args) { - return this.#whenMatched(args); - } - /** - * Adds the `when matched` clause to the query with an `and` condition. But unlike - * {@link whenMatchedAnd}, this method accepts a column reference as the 3rd argument. - * - * This method is similar to {@link SelectQueryBuilder.whereRef}, so see the documentation - * for that method for more examples. - */ - whenMatchedAndRef(lhs, op, rhs) { - return this.#whenMatched([lhs, op, rhs], true); - } - #whenMatched(args, refRight) { - return new MatchedThenableMergeQueryBuilder({ - ...this.#props, - queryNode: MergeQueryNode.cloneWithWhen(this.#props.queryNode, parseMergeWhen({ isMatched: true }, args, refRight)), - }); - } - /** - * Adds a simple `when not matched` clause to the query. - * - * For a `when not matched` clause with an `and` condition, see {@link whenNotMatchedAnd}. - * - * For a simple `when matched` clause, see {@link whenMatched}. - * - * For a `when matched` clause with an `and` condition, see {@link whenMatchedAnd}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenNotMatched() - * .thenInsertValues({ - * first_name: 'John', - * last_name: 'Doe', - * }) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when not matched then - * insert ("first_name", "last_name") values ($1, $2) - * ``` - */ - whenNotMatched() { - return this.#whenNotMatched([]); - } - whenNotMatchedAnd(...args) { - return this.#whenNotMatched(args); - } - /** - * Adds the `when not matched` clause to the query with an `and` condition. But unlike - * {@link whenNotMatchedAnd}, this method accepts a column reference as the 3rd argument. - * - * Unlike {@link whenMatchedAndRef}, you cannot reference columns from the target table. - * - * This method is similar to {@link SelectQueryBuilder.whereRef}, so see the documentation - * for that method for more examples. - */ - whenNotMatchedAndRef(lhs, op, rhs) { - return this.#whenNotMatched([lhs, op, rhs], true); - } - /** - * Adds a simple `when not matched by source` clause to the query. - * - * Supported in MS SQL Server. - * - * Similar to {@link whenNotMatched}, but returns a {@link MatchedThenableMergeQueryBuilder}. - */ - whenNotMatchedBySource() { - return this.#whenNotMatched([], false, true); - } - whenNotMatchedBySourceAnd(...args) { - return this.#whenNotMatched(args, false, true); - } - /** - * Adds the `when not matched by source` clause to the query with an `and` condition. - * - * Similar to {@link whenNotMatchedAndRef}, but you can reference columns from - * the target table, and not from source table and returns a {@link MatchedThenableMergeQueryBuilder}. - */ - whenNotMatchedBySourceAndRef(lhs, op, rhs) { - return this.#whenNotMatched([lhs, op, rhs], true, true); - } - returning(args) { - return new WheneableMergeQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithReturning(this.#props.queryNode, parseSelectArg(args)), - }); - } - returningAll(table) { - return new WheneableMergeQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithReturning(this.#props.queryNode, parseSelectAll(table)), - }); - } - output(args) { - return new WheneableMergeQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithOutput(this.#props.queryNode, parseSelectArg(args)), - }); - } - outputAll(table) { - return new WheneableMergeQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithOutput(this.#props.queryNode, parseSelectAll(table)), - }); - } - #whenNotMatched(args, refRight = false, bySource = false) { - const props = { - ...this.#props, - queryNode: MergeQueryNode.cloneWithWhen(this.#props.queryNode, parseMergeWhen({ isMatched: false, bySource }, args, refRight)), - }; - const Builder = bySource - ? MatchedThenableMergeQueryBuilder - : NotMatchedThenableMergeQueryBuilder; - return new Builder(props); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - * - * If you want to conditionally call a method on `this`, see - * the {@link $if} method. - * - * ### Examples - * - * The next example uses a helper function `log` to log a query: - * - * ```ts - * import type { Compilable } from 'kysely' - * - * function log(qb: T): T { - * console.log(qb.compile()) - * return qb - * } - * - * await db.updateTable('person') - * .set({ first_name: 'John' }) - * .$call(log) - * .execute() - * ``` - */ - $call(func) { - return func(this); - } - /** - * Call `func(this)` if `condition` is true. - * - * This method is especially handy with optional selects. Any `returning` or `returningAll` - * method calls add columns as optional fields to the output type when called inside - * the `func` callback. This is because we can't know if those selections were actually - * made before running the code. - * - * You can also call any other methods inside the callback. - * - * ### Examples - * - * ```ts - * import type { PersonUpdate } from 'type-editor' // imaginary module - * - * async function updatePerson(id: number, updates: PersonUpdate, returnLastName: boolean) { - * return await db - * .updateTable('person') - * .set(updates) - * .where('id', '=', id) - * .returning(['id', 'first_name']) - * .$if(returnLastName, (qb) => qb.returning('last_name')) - * .executeTakeFirstOrThrow() - * } - * ``` - * - * Any selections added inside the `if` callback will be added as optional fields to the - * output type since we can't know if the selections were actually made before running - * the code. In the example above the return type of the `updatePerson` function is: - * - * ```ts - * Promise<{ - * id: number - * first_name: string - * last_name?: string - * }> - * ``` - */ - $if(condition, func) { - if (condition) { - return func(this); - } - return new WheneableMergeQueryBuilder({ - ...this.#props, - }); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.queryNode, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - /** - * Executes the query and returns an array of rows. - * - * Also see the {@link executeTakeFirst} and {@link executeTakeFirstOrThrow} methods. - */ - async execute() { - const compiledQuery = this.compile(); - const result = await this.#props.executor.executeQuery(compiledQuery); - const { adapter } = this.#props.executor; - const query = compiledQuery.query; - if ((query.returning && adapter.supportsReturning) || - (query.output && adapter.supportsOutput)) { - return result.rows; - } - return [new MergeResult(result.numAffectedRows)]; - } - /** - * Executes the query and returns the first result or undefined if - * the query returned no result. - */ - async executeTakeFirst() { - const [result] = await this.execute(); - return result; - } - /** - * Executes the query and returns the first result or throws if - * the query returned no result. - * - * By default an instance of {@link NoResultError} is thrown, but you can - * provide a custom error class, or callback as the only argument to throw a different - * error. - */ - async executeTakeFirstOrThrow(errorConstructor = NoResultError) { - const result = await this.executeTakeFirst(); - if (result === undefined) { - const error = isNoResultErrorConstructor(errorConstructor) - ? new errorConstructor(this.toOperationNode()) - : errorConstructor(this.toOperationNode()); - throw error; - } - return result; - } -} -export class MatchedThenableMergeQueryBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - /** - * Performs the `delete` action. - * - * To perform the `do nothing` action, see {@link thenDoNothing}. - * - * To perform the `update` action, see {@link thenUpdate} or {@link thenUpdateSet}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenDelete() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * delete - * ``` - */ - thenDelete() { - return new WheneableMergeQueryBuilder({ - ...this.#props, - queryNode: MergeQueryNode.cloneWithThen(this.#props.queryNode, parseMergeThen('delete')), - }); - } - /** - * Performs the `do nothing` action. - * - * This is supported in PostgreSQL. - * - * To perform the `delete` action, see {@link thenDelete}. - * - * To perform the `update` action, see {@link thenUpdate} or {@link thenUpdateSet}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenDoNothing() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * do nothing - * ``` - */ - thenDoNothing() { - return new WheneableMergeQueryBuilder({ - ...this.#props, - queryNode: MergeQueryNode.cloneWithThen(this.#props.queryNode, parseMergeThen('do nothing')), - }); - } - /** - * Perform an `update` operation with a full-fledged {@link UpdateQueryBuilder}. - * This is handy when multiple `set` invocations are needed. - * - * For a shorthand version of this method, see {@link thenUpdateSet}. - * - * To perform the `delete` action, see {@link thenDelete}. - * - * To perform the `do nothing` action, see {@link thenDoNothing}. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenMatched() - * .thenUpdate((ub) => ub - * .set(sql`metadata['has_pets']`, 'Y') - * .set({ - * updated_at: new Date().toISOString(), - * }) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when matched then - * update set metadata['has_pets'] = $1, "updated_at" = $2 - * ``` - */ - thenUpdate(set) { - return new WheneableMergeQueryBuilder({ - ...this.#props, - queryNode: MergeQueryNode.cloneWithThen(this.#props.queryNode, parseMergeThen(set(new UpdateQueryBuilder({ - queryId: this.#props.queryId, - executor: NOOP_QUERY_EXECUTOR, - queryNode: UpdateQueryNode.createWithoutTable(), - })))), - }); - } - thenUpdateSet(...args) { - // @ts-ignore not sure how to type this so it won't complain about set(...args). - return this.thenUpdate((ub) => ub.set(...args)); - } -} -export class NotMatchedThenableMergeQueryBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - /** - * Performs the `do nothing` action. - * - * This is supported in PostgreSQL. - * - * To perform the `insert` action, see {@link thenInsertValues}. - * - * ### Examples - * - * ```ts - * const result = await db.mergeInto('person') - * .using('pet', 'person.id', 'pet.owner_id') - * .whenNotMatched() - * .thenDoNothing() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" on "person"."id" = "pet"."owner_id" - * when not matched then - * do nothing - * ``` - */ - thenDoNothing() { - return new WheneableMergeQueryBuilder({ - ...this.#props, - queryNode: MergeQueryNode.cloneWithThen(this.#props.queryNode, parseMergeThen('do nothing')), - }); - } - thenInsertValues(insert) { - const [columns, values] = parseInsertExpression(insert); - return new WheneableMergeQueryBuilder({ - ...this.#props, - queryNode: MergeQueryNode.cloneWithThen(this.#props.queryNode, parseMergeThen(InsertQueryNode.cloneWith(InsertQueryNode.createWithoutInto(), { - columns, - values, - }))), - }); - } -} diff --git a/node_modules/kysely/dist/esm/query-builder/merge-result.d.ts b/node_modules/kysely/dist/esm/query-builder/merge-result.d.ts deleted file mode 100644 index fcad45f..0000000 --- a/node_modules/kysely/dist/esm/query-builder/merge-result.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export declare class MergeResult { - readonly numChangedRows: bigint | undefined; - constructor(numChangedRows: bigint | undefined); -} diff --git a/node_modules/kysely/dist/esm/query-builder/merge-result.js b/node_modules/kysely/dist/esm/query-builder/merge-result.js deleted file mode 100644 index 61ca74b..0000000 --- a/node_modules/kysely/dist/esm/query-builder/merge-result.js +++ /dev/null @@ -1,7 +0,0 @@ -/// -export class MergeResult { - numChangedRows; - constructor(numChangedRows) { - this.numChangedRows = numChangedRows; - } -} diff --git a/node_modules/kysely/dist/esm/query-builder/no-result-error.d.ts b/node_modules/kysely/dist/esm/query-builder/no-result-error.d.ts deleted file mode 100644 index 656ef04..0000000 --- a/node_modules/kysely/dist/esm/query-builder/no-result-error.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { QueryNode } from '../operation-node/query-node.js'; -export type NoResultErrorConstructor = new (node: QueryNode) => Error; -export declare class NoResultError extends Error { - /** - * The operation node tree of the query that was executed. - */ - readonly node: QueryNode; - constructor(node: QueryNode); -} -export declare function isNoResultErrorConstructor(fn: NoResultErrorConstructor | ((node: QueryNode) => Error)): fn is NoResultErrorConstructor; diff --git a/node_modules/kysely/dist/esm/query-builder/no-result-error.js b/node_modules/kysely/dist/esm/query-builder/no-result-error.js deleted file mode 100644 index 7d7d744..0000000 --- a/node_modules/kysely/dist/esm/query-builder/no-result-error.js +++ /dev/null @@ -1,14 +0,0 @@ -/// -export class NoResultError extends Error { - /** - * The operation node tree of the query that was executed. - */ - node; - constructor(node) { - super('no result'); - this.node = node; - } -} -export function isNoResultErrorConstructor(fn) { - return Object.prototype.hasOwnProperty.call(fn, 'prototype'); -} diff --git a/node_modules/kysely/dist/esm/query-builder/on-conflict-builder.d.ts b/node_modules/kysely/dist/esm/query-builder/on-conflict-builder.d.ts deleted file mode 100644 index af9df91..0000000 --- a/node_modules/kysely/dist/esm/query-builder/on-conflict-builder.d.ts +++ /dev/null @@ -1,872 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -import { OnConflictNode } from '../operation-node/on-conflict-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { type ComparisonOperatorExpression, type OperandValueExpressionOrList } from '../parser/binary-operation-parser.js'; -import type { ExpressionOrFactory } from '../parser/expression-parser.js'; -import type { ReferenceExpression } from '../parser/reference-parser.js'; -import { type UpdateObjectExpression } from '../parser/update-set-parser.js'; -import type { Updateable } from '../util/column-type.js'; -import type { AnyColumn, SqlBool } from '../util/type-utils.js'; -import type { WhereInterface } from './where-interface.js'; -export declare class OnConflictBuilder implements WhereInterface { - #private; - constructor(props: OnConflictBuilderProps); - /** - * Specify a single column as the conflict target. - * - * Also see the {@link columns}, {@link constraint} and {@link expression} - * methods for alternative ways to specify the conflict target. - */ - column(column: AnyColumn): OnConflictBuilder; - /** - * Specify a list of columns as the conflict target. - * - * Also see the {@link column}, {@link constraint} and {@link expression} - * methods for alternative ways to specify the conflict target. - */ - columns(columns: ReadonlyArray>): OnConflictBuilder; - /** - * Specify a specific constraint by name as the conflict target. - * - * Also see the {@link column}, {@link columns} and {@link expression} - * methods for alternative ways to specify the conflict target. - */ - constraint(constraintName: string): OnConflictBuilder; - /** - * Specify an expression as the conflict target. - * - * This can be used if the unique index is an expression index. - * - * Also see the {@link column}, {@link columns} and {@link constraint} - * methods for alternative ways to specify the conflict target. - */ - expression(expression: Expression): OnConflictBuilder; - /** - * Adds a `where` expression to the query. - * - * Calling this method multiple times will combine the expressions using `and`. - * - * Also see {@link whereRef} - * - * ### Examples - * - * - * - * `where` method calls are combined with `AND`: - * - * ```ts - * const person = await db - * .selectFrom('person') - * .selectAll() - * .where('first_name', '=', 'Jennifer') - * .where('age', '>', 40) - * .executeTakeFirst() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "first_name" = $1 and "age" > $2 - * ``` - * - * Operator can be any supported operator or if the typings don't support it - * you can always use: - * - * ```ts - * import { sql } from 'kysely' - * - * sql`your operator` - * ``` - * - * - * - * Find multiple items using a list of identifiers: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where('id', 'in', [1, 2, 3]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "id" in ($1, $2, $3) - * ``` - * - * - * - * You can use the `and` function to create a simple equality - * filter using an object - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where((eb) => eb.and({ - * first_name: 'Jennifer', - * last_name: eb.ref('first_name') - * })) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * "first_name" = $1 - * and "last_name" = "first_name" - * ) - * ``` - * - * - * - * To combine conditions using `OR`, you can use the expression builder. - * There are two ways to create `OR` expressions. Both are shown in this - * example: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * // 1. Using the `or` method on the expression builder: - * .where((eb) => eb.or([ - * eb('first_name', '=', 'Jennifer'), - * eb('first_name', '=', 'Sylvester') - * ])) - * // 2. Chaining expressions using the `or` method on the - * // created expressions: - * .where((eb) => - * eb('last_name', '=', 'Aniston').or('last_name', '=', 'Stallone') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * ("first_name" = $1 or "first_name" = $2) - * and - * ("last_name" = $3 or "last_name" = $4) - * ) - * ``` - * - * - * - * You can add expressions conditionally like this: - * - * ```ts - * import { Expression, SqlBool } from 'kysely' - * - * const firstName: string | undefined = 'Jennifer' - * const lastName: string | undefined = 'Aniston' - * const under18 = true - * const over60 = true - * - * let query = db - * .selectFrom('person') - * .selectAll() - * - * if (firstName) { - * // The query builder is immutable. Remember to reassign - * // the result back to the query variable. - * query = query.where('first_name', '=', firstName) - * } - * - * if (lastName) { - * query = query.where('last_name', '=', lastName) - * } - * - * if (under18 || over60) { - * // Conditional OR expressions can be added like this. - * query = query.where((eb) => { - * const ors: Expression[] = [] - * - * if (under18) { - * ors.push(eb('age', '<', 18)) - * } - * - * if (over60) { - * ors.push(eb('age', '>', 60)) - * } - * - * return eb.or(ors) - * }) - * } - * - * const persons = await query.execute() - * ``` - * - * Both the first and third argument can also be arbitrary expressions like - * subqueries. An expression can defined by passing a function and calling - * the methods of the {@link ExpressionBuilder} passed to the callback: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where( - * (qb) => qb.selectFrom('pet') - * .select('pet.name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1), - * '=', - * 'Fluffy' - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * select "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) = $2 - * ``` - * - * A `where in` query can be built by using the `in` operator and an array - * of values. The values in the array can also be expressions: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where('person.id', 'in', [100, 200, 300]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "id" in ($1, $2, $3) - * ``` - * - * - * - * For complex `where` expressions you can pass in a single callback and - * use the `ExpressionBuilder` to build your expression: - * - * ```ts - * const firstName = 'Jennifer' - * const maxAge = 60 - * - * const persons = await db - * .selectFrom('person') - * .selectAll('person') - * .where(({ eb, or, and, not, exists, selectFrom }) => and([ - * or([ - * eb('first_name', '=', firstName), - * eb('age', '<', maxAge) - * ]), - * not(exists( - * selectFrom('pet') - * .select('pet.id') - * .whereRef('pet.owner_id', '=', 'person.id') - * )) - * ])) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where ( - * ( - * "first_name" = $1 - * or "age" < $2 - * ) - * and not exists ( - * select "pet"."id" from "pet" where "pet"."owner_id" = "person"."id" - * ) - * ) - * ``` - * - * If everything else fails, you can always use the {@link sql} tag - * as any of the arguments, including the operator: - * - * ```ts - * import { sql } from 'kysely' - * - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where( - * sql`coalesce(first_name, last_name)`, - * 'like', - * '%' + name + '%', - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * where coalesce(first_name, last_name) like $1 - * ``` - * - * In all examples above the columns were known at compile time - * (except for the raw {@link sql} expressions). By default kysely only - * allows you to refer to columns that exist in the database **and** - * can be referred to in the current query and context. - * - * Sometimes you may want to refer to columns that come from the user - * input and thus are not available at compile time. - * - * You have two options, the {@link sql} tag or `db.dynamic`. The example below - * uses both: - * - * ```ts - * import { sql } from 'kysely' - * const { ref } = db.dynamic - * - * const columnFromUserInput: string = 'id' - * - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where(ref(columnFromUserInput), '=', 1) - * .where(sql.id(columnFromUserInput), '=', 2) - * .execute() - * ``` - */ - where, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): OnConflictBuilder; - where>(expression: E): OnConflictBuilder; - /** - * Adds a `where` clause where both sides of the operator are references - * to columns. - * - * The normal `where` method treats the right hand side argument as a - * value by default. `whereRef` treats it as a column reference. This method is - * expecially useful with joins and correlated subqueries. - * - * ### Examples - * - * Usage with a join: - * - * ```ts - * db.selectFrom(['person', 'pet']) - * .selectAll() - * .whereRef('person.first_name', '=', 'pet.name') - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person", "pet" where "person"."first_name" = "pet"."name" - * ``` - * - * Usage in a subquery: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll('person') - * .select((eb) => eb - * .selectFrom('pet') - * .select('name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1) - * .as('pet_name') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".*, ( - * select "name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) as "pet_name" - * from "person" - */ - whereRef, RRE extends ReferenceExpression>(lhs: LRE, op: ComparisonOperatorExpression, rhs: RRE): OnConflictBuilder; - /** - * Clears all where expressions from the query. - * - * ### Examples - * - * ```ts - * db.selectFrom('person') - * .selectAll() - * .where('id','=',42) - * .clearWhere() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearWhere(): OnConflictBuilder; - /** - * Adds the "do nothing" conflict action. - * - * ### Examples - * - * ```ts - * const id = 1 - * const first_name = 'John' - * - * await db - * .insertInto('person') - * .values({ first_name, id }) - * .onConflict((oc) => oc - * .column('id') - * .doNothing() - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "id") - * values ($1, $2) - * on conflict ("id") do nothing - * ``` - */ - doNothing(): OnConflictDoNothingBuilder; - /** - * Adds the "do update set" conflict action. - * - * ### Examples - * - * ```ts - * const id = 1 - * const first_name = 'John' - * - * await db - * .insertInto('person') - * .values({ first_name, id }) - * .onConflict((oc) => oc - * .column('id') - * .doUpdateSet({ first_name }) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "id") - * values ($1, $2) - * on conflict ("id") - * do update set "first_name" = $3 - * ``` - * - * In the next example we use the `ref` method to reference - * columns of the virtual table `excluded` in a type-safe way - * to create an upsert operation: - * - * ```ts - * import type { NewPerson } from 'type-editor' // imaginary module - * - * async function upsertPerson(person: NewPerson): Promise { - * await db.insertInto('person') - * .values(person) - * .onConflict((oc) => oc - * .column('id') - * .doUpdateSet((eb) => ({ - * first_name: eb.ref('excluded.first_name'), - * last_name: eb.ref('excluded.last_name') - * }) - * ) - * ) - * .execute() - * } - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name") - * values ($1, $2) - * on conflict ("id") - * do update set - * "first_name" = excluded."first_name", - * "last_name" = excluded."last_name" - * ``` - */ - doUpdateSet(update: UpdateObjectExpression, OnConflictTables, OnConflictTables>): OnConflictUpdateBuilder, OnConflictTables>; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; -} -export interface OnConflictBuilderProps { - readonly onConflictNode: OnConflictNode; -} -export type OnConflictDatabase = { - [K in keyof DB | 'excluded']: Updateable; -}; -export type OnConflictTables = TB | 'excluded'; -export declare class OnConflictDoNothingBuilder implements OperationNodeSource { - #private; - constructor(props: OnConflictBuilderProps); - toOperationNode(): OnConflictNode; -} -export declare class OnConflictUpdateBuilder implements WhereInterface, OperationNodeSource { - #private; - constructor(props: OnConflictBuilderProps); - /** - * Specify a where condition for the update operation. - * - * See {@link WhereInterface.where} for more info. - */ - where, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): OnConflictUpdateBuilder; - /** - * Adds a `where` expression to the query. - * - * Calling this method multiple times will combine the expressions using `and`. - * - * Also see {@link whereRef} - * - * ### Examples - * - * - * - * `where` method calls are combined with `AND`: - * - * ```ts - * const person = await db - * .selectFrom('person') - * .selectAll() - * .where('first_name', '=', 'Jennifer') - * .where('age', '>', 40) - * .executeTakeFirst() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "first_name" = $1 and "age" > $2 - * ``` - * - * Operator can be any supported operator or if the typings don't support it - * you can always use: - * - * ```ts - * import { sql } from 'kysely' - * - * sql`your operator` - * ``` - * - * - * - * Find multiple items using a list of identifiers: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where('id', 'in', [1, 2, 3]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "id" in ($1, $2, $3) - * ``` - * - * - * - * You can use the `and` function to create a simple equality - * filter using an object - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where((eb) => eb.and({ - * first_name: 'Jennifer', - * last_name: eb.ref('first_name') - * })) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * "first_name" = $1 - * and "last_name" = "first_name" - * ) - * ``` - * - * - * - * To combine conditions using `OR`, you can use the expression builder. - * There are two ways to create `OR` expressions. Both are shown in this - * example: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * // 1. Using the `or` method on the expression builder: - * .where((eb) => eb.or([ - * eb('first_name', '=', 'Jennifer'), - * eb('first_name', '=', 'Sylvester') - * ])) - * // 2. Chaining expressions using the `or` method on the - * // created expressions: - * .where((eb) => - * eb('last_name', '=', 'Aniston').or('last_name', '=', 'Stallone') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * ("first_name" = $1 or "first_name" = $2) - * and - * ("last_name" = $3 or "last_name" = $4) - * ) - * ``` - * - * - * - * You can add expressions conditionally like this: - * - * ```ts - * import { Expression, SqlBool } from 'kysely' - * - * const firstName: string | undefined = 'Jennifer' - * const lastName: string | undefined = 'Aniston' - * const under18 = true - * const over60 = true - * - * let query = db - * .selectFrom('person') - * .selectAll() - * - * if (firstName) { - * // The query builder is immutable. Remember to reassign - * // the result back to the query variable. - * query = query.where('first_name', '=', firstName) - * } - * - * if (lastName) { - * query = query.where('last_name', '=', lastName) - * } - * - * if (under18 || over60) { - * // Conditional OR expressions can be added like this. - * query = query.where((eb) => { - * const ors: Expression[] = [] - * - * if (under18) { - * ors.push(eb('age', '<', 18)) - * } - * - * if (over60) { - * ors.push(eb('age', '>', 60)) - * } - * - * return eb.or(ors) - * }) - * } - * - * const persons = await query.execute() - * ``` - * - * Both the first and third argument can also be arbitrary expressions like - * subqueries. An expression can defined by passing a function and calling - * the methods of the {@link ExpressionBuilder} passed to the callback: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where( - * (qb) => qb.selectFrom('pet') - * .select('pet.name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1), - * '=', - * 'Fluffy' - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * select "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) = $2 - * ``` - * - * A `where in` query can be built by using the `in` operator and an array - * of values. The values in the array can also be expressions: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where('person.id', 'in', [100, 200, 300]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "id" in ($1, $2, $3) - * ``` - * - * - * - * For complex `where` expressions you can pass in a single callback and - * use the `ExpressionBuilder` to build your expression: - * - * ```ts - * const firstName = 'Jennifer' - * const maxAge = 60 - * - * const persons = await db - * .selectFrom('person') - * .selectAll('person') - * .where(({ eb, or, and, not, exists, selectFrom }) => and([ - * or([ - * eb('first_name', '=', firstName), - * eb('age', '<', maxAge) - * ]), - * not(exists( - * selectFrom('pet') - * .select('pet.id') - * .whereRef('pet.owner_id', '=', 'person.id') - * )) - * ])) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where ( - * ( - * "first_name" = $1 - * or "age" < $2 - * ) - * and not exists ( - * select "pet"."id" from "pet" where "pet"."owner_id" = "person"."id" - * ) - * ) - * ``` - * - * If everything else fails, you can always use the {@link sql} tag - * as any of the arguments, including the operator: - * - * ```ts - * import { sql } from 'kysely' - * - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where( - * sql`coalesce(first_name, last_name)`, - * 'like', - * '%' + name + '%', - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * where coalesce(first_name, last_name) like $1 - * ``` - * - * In all examples above the columns were known at compile time - * (except for the raw {@link sql} expressions). By default kysely only - * allows you to refer to columns that exist in the database **and** - * can be referred to in the current query and context. - * - * Sometimes you may want to refer to columns that come from the user - * input and thus are not available at compile time. - * - * You have two options, the {@link sql} tag or `db.dynamic`. The example below - * uses both: - * - * ```ts - * import { sql } from 'kysely' - * const { ref } = db.dynamic - * - * const columnFromUserInput: string = 'id' - * - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where(ref(columnFromUserInput), '=', 1) - * .where(sql.id(columnFromUserInput), '=', 2) - * .execute() - * ``` - */ - where>(expression: E): OnConflictUpdateBuilder; - /** - * Specify a where condition for the update operation. - * - * See {@link WhereInterface.whereRef} for more info. - */ - whereRef, RRE extends ReferenceExpression>(lhs: LRE, op: ComparisonOperatorExpression, rhs: RRE): OnConflictUpdateBuilder; - /** - * Clears all where expressions from the query. - * - * ### Examples - * - * ```ts - * db.selectFrom('person') - * .selectAll() - * .where('id','=',42) - * .clearWhere() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearWhere(): OnConflictUpdateBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): OnConflictNode; -} diff --git a/node_modules/kysely/dist/esm/query-builder/on-conflict-builder.js b/node_modules/kysely/dist/esm/query-builder/on-conflict-builder.js deleted file mode 100644 index 0287b61..0000000 --- a/node_modules/kysely/dist/esm/query-builder/on-conflict-builder.js +++ /dev/null @@ -1,254 +0,0 @@ -/// -import { ColumnNode } from '../operation-node/column-node.js'; -import { IdentifierNode } from '../operation-node/identifier-node.js'; -import { OnConflictNode } from '../operation-node/on-conflict-node.js'; -import { parseValueBinaryOperationOrExpression, parseReferentialBinaryOperation, } from '../parser/binary-operation-parser.js'; -import { parseUpdateObjectExpression, } from '../parser/update-set-parser.js'; -import { freeze } from '../util/object-utils.js'; -export class OnConflictBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - /** - * Specify a single column as the conflict target. - * - * Also see the {@link columns}, {@link constraint} and {@link expression} - * methods for alternative ways to specify the conflict target. - */ - column(column) { - const columnNode = ColumnNode.create(column); - return new OnConflictBuilder({ - ...this.#props, - onConflictNode: OnConflictNode.cloneWith(this.#props.onConflictNode, { - columns: this.#props.onConflictNode.columns - ? freeze([...this.#props.onConflictNode.columns, columnNode]) - : freeze([columnNode]), - }), - }); - } - /** - * Specify a list of columns as the conflict target. - * - * Also see the {@link column}, {@link constraint} and {@link expression} - * methods for alternative ways to specify the conflict target. - */ - columns(columns) { - const columnNodes = columns.map(ColumnNode.create); - return new OnConflictBuilder({ - ...this.#props, - onConflictNode: OnConflictNode.cloneWith(this.#props.onConflictNode, { - columns: this.#props.onConflictNode.columns - ? freeze([...this.#props.onConflictNode.columns, ...columnNodes]) - : freeze(columnNodes), - }), - }); - } - /** - * Specify a specific constraint by name as the conflict target. - * - * Also see the {@link column}, {@link columns} and {@link expression} - * methods for alternative ways to specify the conflict target. - */ - constraint(constraintName) { - return new OnConflictBuilder({ - ...this.#props, - onConflictNode: OnConflictNode.cloneWith(this.#props.onConflictNode, { - constraint: IdentifierNode.create(constraintName), - }), - }); - } - /** - * Specify an expression as the conflict target. - * - * This can be used if the unique index is an expression index. - * - * Also see the {@link column}, {@link columns} and {@link constraint} - * methods for alternative ways to specify the conflict target. - */ - expression(expression) { - return new OnConflictBuilder({ - ...this.#props, - onConflictNode: OnConflictNode.cloneWith(this.#props.onConflictNode, { - indexExpression: expression.toOperationNode(), - }), - }); - } - where(...args) { - return new OnConflictBuilder({ - ...this.#props, - onConflictNode: OnConflictNode.cloneWithIndexWhere(this.#props.onConflictNode, parseValueBinaryOperationOrExpression(args)), - }); - } - whereRef(lhs, op, rhs) { - return new OnConflictBuilder({ - ...this.#props, - onConflictNode: OnConflictNode.cloneWithIndexWhere(this.#props.onConflictNode, parseReferentialBinaryOperation(lhs, op, rhs)), - }); - } - clearWhere() { - return new OnConflictBuilder({ - ...this.#props, - onConflictNode: OnConflictNode.cloneWithoutIndexWhere(this.#props.onConflictNode), - }); - } - /** - * Adds the "do nothing" conflict action. - * - * ### Examples - * - * ```ts - * const id = 1 - * const first_name = 'John' - * - * await db - * .insertInto('person') - * .values({ first_name, id }) - * .onConflict((oc) => oc - * .column('id') - * .doNothing() - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "id") - * values ($1, $2) - * on conflict ("id") do nothing - * ``` - */ - doNothing() { - return new OnConflictDoNothingBuilder({ - ...this.#props, - onConflictNode: OnConflictNode.cloneWith(this.#props.onConflictNode, { - doNothing: true, - }), - }); - } - /** - * Adds the "do update set" conflict action. - * - * ### Examples - * - * ```ts - * const id = 1 - * const first_name = 'John' - * - * await db - * .insertInto('person') - * .values({ first_name, id }) - * .onConflict((oc) => oc - * .column('id') - * .doUpdateSet({ first_name }) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "id") - * values ($1, $2) - * on conflict ("id") - * do update set "first_name" = $3 - * ``` - * - * In the next example we use the `ref` method to reference - * columns of the virtual table `excluded` in a type-safe way - * to create an upsert operation: - * - * ```ts - * import type { NewPerson } from 'type-editor' // imaginary module - * - * async function upsertPerson(person: NewPerson): Promise { - * await db.insertInto('person') - * .values(person) - * .onConflict((oc) => oc - * .column('id') - * .doUpdateSet((eb) => ({ - * first_name: eb.ref('excluded.first_name'), - * last_name: eb.ref('excluded.last_name') - * }) - * ) - * ) - * .execute() - * } - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name") - * values ($1, $2) - * on conflict ("id") - * do update set - * "first_name" = excluded."first_name", - * "last_name" = excluded."last_name" - * ``` - */ - doUpdateSet(update) { - return new OnConflictUpdateBuilder({ - ...this.#props, - onConflictNode: OnConflictNode.cloneWith(this.#props.onConflictNode, { - updates: parseUpdateObjectExpression(update), - }), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } -} -export class OnConflictDoNothingBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - toOperationNode() { - return this.#props.onConflictNode; - } -} -export class OnConflictUpdateBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - where(...args) { - return new OnConflictUpdateBuilder({ - ...this.#props, - onConflictNode: OnConflictNode.cloneWithUpdateWhere(this.#props.onConflictNode, parseValueBinaryOperationOrExpression(args)), - }); - } - /** - * Specify a where condition for the update operation. - * - * See {@link WhereInterface.whereRef} for more info. - */ - whereRef(lhs, op, rhs) { - return new OnConflictUpdateBuilder({ - ...this.#props, - onConflictNode: OnConflictNode.cloneWithUpdateWhere(this.#props.onConflictNode, parseReferentialBinaryOperation(lhs, op, rhs)), - }); - } - clearWhere() { - return new OnConflictUpdateBuilder({ - ...this.#props, - onConflictNode: OnConflictNode.cloneWithoutUpdateWhere(this.#props.onConflictNode), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.onConflictNode; - } -} diff --git a/node_modules/kysely/dist/esm/query-builder/order-by-interface.d.ts b/node_modules/kysely/dist/esm/query-builder/order-by-interface.d.ts deleted file mode 100644 index 0b15dd5..0000000 --- a/node_modules/kysely/dist/esm/query-builder/order-by-interface.d.ts +++ /dev/null @@ -1,158 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -import type { OrderByExpression, DirectedOrderByStringReference, OrderByModifiers } from '../parser/order-by-parser.js'; -export interface OrderByInterface { - /** - * Adds an `order by` clause to the query. - * - * `orderBy` calls are additive. Meaning, additional `orderBy` calls append to - * the existing order by clause. - * - * `orderBy` is supported in select queries on all dialects. In MySQL, you can - * also use `orderBy` in update and delete queries. - * - * In a single call you can add a single column/expression or multiple columns/expressions. - * - * Single column/expression calls can have 1-2 arguments. The first argument is - * the expression to order by, while the second optional argument is the direction - * (`asc` or `desc`), a callback that accepts and returns an {@link OrderByItemBuilder} - * or an expression. - * - * See {@link clearOrderBy} to remove the `order by` clause from a query. - * - * ### Examples - * - * Single column/expression per call: - * - * ```ts - * await db - * .selectFrom('person') - * .select('person.first_name as fn') - * .orderBy('id') - * .orderBy('fn', 'desc') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."first_name" as "fn" - * from "person" - * order by "id", "fn" desc - * ``` - * - * Building advanced modifiers: - * - * ```ts - * await db - * .selectFrom('person') - * .select('person.first_name as fn') - * .orderBy('id', (ob) => ob.desc().nullsFirst()) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."first_name" as "fn" - * from "person" - * order by "id" desc nulls first - * ``` - * - * The order by expression can also be a raw sql expression or a subquery - * in addition to column references: - * - * ```ts - * import { sql } from 'kysely' - * - * await db - * .selectFrom('person') - * .selectAll() - * .orderBy((eb) => eb.selectFrom('pet') - * .select('pet.name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1) - * ) - * .orderBy( - * sql`concat(first_name, last_name) asc` - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * order by - * ( select "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) asc, - * concat(first_name, last_name) asc - * ``` - * - * `dynamic.ref` can be used to refer to columns not known at - * compile time: - * - * ```ts - * async function someQuery(orderBy: string) { - * const { ref } = db.dynamic - * - * return await db - * .selectFrom('person') - * .select('person.first_name as fn') - * .orderBy(ref(orderBy)) - * .execute() - * } - * - * someQuery('fn') - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."first_name" as "fn" - * from "person" - * order by "fn" - * ``` - */ - orderBy>(expr: OE, modifiers?: OrderByModifiers): OrderByInterface; - /** - * @deprecated It does ~2-2.6x more compile-time instantiations compared to multiple chained `orderBy(expr, modifiers?)` calls (in `order by` clauses with reasonable item counts), and has broken autocompletion. - */ - orderBy | DirectedOrderByStringReference>(exprs: ReadonlyArray): OrderByInterface; - /** - * @deprecated It does ~2.9x more compile-time instantiations compared to a `orderBy(expr, direction)` call. - */ - orderBy>(expr: OE): OrderByInterface; - /** - * @deprecated Use `orderBy(expr, (ob) => ...)` instead. - */ - orderBy>(expr: OE, modifiers: Expression): OrderByInterface; - /** - * Clears the `order by` clause from the query. - * - * See {@link orderBy} for adding an `order by` clause or item to a query. - * - * ### Examples - * - * ```ts - * const query = db - * .selectFrom('person') - * .selectAll() - * .orderBy('id', 'desc') - * - * const results = await query - * .clearOrderBy() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearOrderBy(): OrderByInterface; -} diff --git a/node_modules/kysely/dist/esm/query-builder/order-by-interface.js b/node_modules/kysely/dist/esm/query-builder/order-by-interface.js deleted file mode 100644 index 1fd72a8..0000000 --- a/node_modules/kysely/dist/esm/query-builder/order-by-interface.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/query-builder/order-by-item-builder.d.ts b/node_modules/kysely/dist/esm/query-builder/order-by-item-builder.d.ts deleted file mode 100644 index c8538a5..0000000 --- a/node_modules/kysely/dist/esm/query-builder/order-by-item-builder.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { OrderByItemNode } from '../operation-node/order-by-item-node.js'; -import type { Collation } from '../parser/collate-parser.js'; -export declare class OrderByItemBuilder implements OperationNodeSource { - #private; - constructor(props: OrderByItemBuilderProps); - /** - * Adds `desc` to the `order by` item. - * - * See {@link asc} for the opposite. - */ - desc(): OrderByItemBuilder; - /** - * Adds `asc` to the `order by` item. - * - * See {@link desc} for the opposite. - */ - asc(): OrderByItemBuilder; - /** - * Adds `nulls last` to the `order by` item. - * - * This is only supported by some dialects like PostgreSQL and SQLite. - * - * See {@link nullsFirst} for the opposite. - */ - nullsLast(): OrderByItemBuilder; - /** - * Adds `nulls first` to the `order by` item. - * - * This is only supported by some dialects like PostgreSQL and SQLite. - * - * See {@link nullsLast} for the opposite. - */ - nullsFirst(): OrderByItemBuilder; - /** - * Adds `collate ` to the `order by` item. - */ - collate(collation: Collation): OrderByItemBuilder; - toOperationNode(): OrderByItemNode; -} -export interface OrderByItemBuilderProps { - readonly node: OrderByItemNode; -} diff --git a/node_modules/kysely/dist/esm/query-builder/order-by-item-builder.js b/node_modules/kysely/dist/esm/query-builder/order-by-item-builder.js deleted file mode 100644 index d367227..0000000 --- a/node_modules/kysely/dist/esm/query-builder/order-by-item-builder.js +++ /dev/null @@ -1,72 +0,0 @@ -/// -import { CollateNode } from '../operation-node/collate-node.js'; -import { OrderByItemNode } from '../operation-node/order-by-item-node.js'; -import { RawNode } from '../operation-node/raw-node.js'; -import { freeze } from '../util/object-utils.js'; -export class OrderByItemBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - /** - * Adds `desc` to the `order by` item. - * - * See {@link asc} for the opposite. - */ - desc() { - return new OrderByItemBuilder({ - node: OrderByItemNode.cloneWith(this.#props.node, { - direction: RawNode.createWithSql('desc'), - }), - }); - } - /** - * Adds `asc` to the `order by` item. - * - * See {@link desc} for the opposite. - */ - asc() { - return new OrderByItemBuilder({ - node: OrderByItemNode.cloneWith(this.#props.node, { - direction: RawNode.createWithSql('asc'), - }), - }); - } - /** - * Adds `nulls last` to the `order by` item. - * - * This is only supported by some dialects like PostgreSQL and SQLite. - * - * See {@link nullsFirst} for the opposite. - */ - nullsLast() { - return new OrderByItemBuilder({ - node: OrderByItemNode.cloneWith(this.#props.node, { nulls: 'last' }), - }); - } - /** - * Adds `nulls first` to the `order by` item. - * - * This is only supported by some dialects like PostgreSQL and SQLite. - * - * See {@link nullsLast} for the opposite. - */ - nullsFirst() { - return new OrderByItemBuilder({ - node: OrderByItemNode.cloneWith(this.#props.node, { nulls: 'first' }), - }); - } - /** - * Adds `collate ` to the `order by` item. - */ - collate(collation) { - return new OrderByItemBuilder({ - node: OrderByItemNode.cloneWith(this.#props.node, { - collation: CollateNode.create(collation), - }), - }); - } - toOperationNode() { - return this.#props.node; - } -} diff --git a/node_modules/kysely/dist/esm/query-builder/output-interface.d.ts b/node_modules/kysely/dist/esm/query-builder/output-interface.d.ts deleted file mode 100644 index 0ebfa7f..0000000 --- a/node_modules/kysely/dist/esm/query-builder/output-interface.d.ts +++ /dev/null @@ -1,138 +0,0 @@ -import type { ExpressionBuilder } from '../expression/expression-builder.js'; -import type { AliasedExpressionOrFactory } from '../parser/expression-parser.js'; -import type { ReturningAllRow, ReturningRow } from '../parser/returning-parser.js'; -import type { AnyAliasedColumnWithTable, AnyColumnWithTable } from '../util/type-utils.js'; -export interface OutputInterface { - /** - * Allows you to return data from modified rows. - * - * On supported databases like MS SQL Server (MSSQL), this method can be chained - * to `insert`, `update`, `delete` and `merge` queries to return data. - * - * Also see the {@link outputAll} method. - * - * ### Examples - * - * Return one column: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .output('inserted.id') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * gender: 'female', - * }) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "gender") - * output "inserted"."id" - * values (@1, @2, @3) - * ``` - * - * Return multiple columns: - * - * ```ts - * const { old_first_name, old_last_name, new_first_name, new_last_name } = await db - * .updateTable('person') - * .set({ first_name: 'John', last_name: 'Doe' }) - * .output([ - * 'deleted.first_name as old_first_name', - * 'deleted.last_name as old_last_name', - * 'inserted.first_name as new_first_name', - * 'inserted.last_name as new_last_name', - * ]) - * .where('created_at', '<', new Date()) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * update "person" - * set "first_name" = @1, "last_name" = @2 - * output "deleted"."first_name" as "old_first_name", - * "deleted"."last_name" as "old_last_name", - * "inserted"."first_name" as "new_first_name", - * "inserted"."last_name" as "new_last_name" - * where "created_at" < @3 - * ``` - * - * Return arbitrary expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * const { full_name } = await db - * .deleteFrom('person') - * .output((eb) => sql`concat(${eb.ref('deleted.first_name')}, ' ', ${eb.ref('deleted.last_name')})`.as('full_name')) - * .where('created_at', '<', new Date()) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * delete from "person" - * output concat("deleted"."first_name", ' ', "deleted"."last_name") as "full_name" - * where "created_at" < @1 - * ``` - * - * Return the action performed on the row: - * - * ```ts - * await db - * .mergeInto('person') - * .using('pet', 'pet.owner_id', 'person.id') - * .whenMatched() - * .thenDelete() - * .whenNotMatched() - * .thenInsertValues({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male' - * }) - * .output([ - * 'inserted.id as inserted_id', - * 'deleted.id as deleted_id', - * ]) - * .execute() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * merge into "person" - * using "pet" on "pet"."owner_id" = "person"."id" - * when matched then delete - * when not matched then - * insert ("first_name", "last_name", "gender") - * values (@1, @2, @3) - * output "inserted"."id" as "inserted_id", "deleted"."id" as "deleted_id" - * ``` - * - */ - output>(selections: ReadonlyArray): OutputInterface>, OP>; - output>(callback: CB): OutputInterface>, OP>; - output>(selection: OE): OutputInterface>, OP>; - /** - * Adds an `output {prefix}.*` to an `insert`/`update`/`delete`/`merge` query on databases - * that support `output` such as MS SQL Server (MSSQL). - * - * Also see the {@link output} method. - */ - outputAll(table: OP): OutputInterface, OP>; -} -export type OutputPrefix = 'deleted' | 'inserted'; -export type OutputDatabase = { - [K in OP]: DB[TB]; -}; -export type OutputExpression, OTB extends keyof ODB = keyof ODB> = AnyAliasedColumnWithTable | AnyColumnWithTable | AliasedExpressionOrFactory; -export type OutputCallback = (eb: ExpressionBuilder, OP>) => ReadonlyArray>; -export type SelectExpressionFromOutputExpression = OE extends `${OutputPrefix}.${infer C}` ? C : OE; -export type SelectExpressionFromOutputCallback = CB extends (eb: ExpressionBuilder) => ReadonlyArray ? SelectExpressionFromOutputExpression : never; diff --git a/node_modules/kysely/dist/esm/query-builder/output-interface.js b/node_modules/kysely/dist/esm/query-builder/output-interface.js deleted file mode 100644 index c665603..0000000 --- a/node_modules/kysely/dist/esm/query-builder/output-interface.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/query-builder/over-builder.d.ts b/node_modules/kysely/dist/esm/query-builder/over-builder.d.ts deleted file mode 100644 index fb43163..0000000 --- a/node_modules/kysely/dist/esm/query-builder/over-builder.d.ts +++ /dev/null @@ -1,101 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { OverNode } from '../operation-node/over-node.js'; -import { type DirectedOrderByStringReference, type OrderByExpression, type OrderByModifiers } from '../parser/order-by-parser.js'; -import { type PartitionByExpression } from '../parser/partition-by-parser.js'; -import type { OrderByInterface } from './order-by-interface.js'; -export declare class OverBuilder implements OrderByInterface, OperationNodeSource { - #private; - constructor(props: OverBuilderProps); - /** - * Adds an `order by` clause or item inside the `over` function. - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select( - * (eb) => eb.fn.avg('age').over( - * ob => ob.orderBy('first_name', 'asc').orderBy('last_name', 'asc') - * ).as('average_age') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select avg("age") over(order by "first_name" asc, "last_name" asc) as "average_age" - * from "person" - * ``` - */ - orderBy>(expr: OE, modifiers?: OrderByModifiers): OverBuilder; - /** - * @deprecated It does ~2-2.6x more compile-time instantiations compared to multiple chained `orderBy(expr, modifiers?)` calls (in `order by` clauses with reasonable item counts), and has broken autocompletion. - */ - orderBy | DirectedOrderByStringReference>(exprs: ReadonlyArray): OverBuilder; - /** - * @deprecated It does ~2.9x more compile-time instantiations compared to a `orderBy(expr, direction)` call. - */ - orderBy>(expr: OE): OverBuilder; - /** - * @deprecated Use `orderBy(expr, (ob) => ...)` instead. - */ - orderBy>(expr: OE, modifiers: Expression): OverBuilder; - /** - * Clears the `order by` clause from the query. - * - * See {@link orderBy} for adding an `order by` clause or item to a query. - * - * ### Examples - * - * ```ts - * const query = db - * .selectFrom('person') - * .selectAll() - * .orderBy('id', 'desc') - * - * const results = await query - * .clearOrderBy() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearOrderBy(): OverBuilder; - /** - * Adds partition by clause item/s inside the over function. - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select( - * (eb) => eb.fn.avg('age').over( - * ob => ob.partitionBy(['last_name', 'first_name']) - * ).as('average_age') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select avg("age") over(partition by "last_name", "first_name") as "average_age" - * from "person" - * ``` - */ - partitionBy(partitionBy: ReadonlyArray>): OverBuilder; - partitionBy>(partitionBy: PE): OverBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): OverNode; -} -export interface OverBuilderProps { - readonly overNode: OverNode; -} diff --git a/node_modules/kysely/dist/esm/query-builder/over-builder.js b/node_modules/kysely/dist/esm/query-builder/over-builder.js deleted file mode 100644 index 461fd6e..0000000 --- a/node_modules/kysely/dist/esm/query-builder/over-builder.js +++ /dev/null @@ -1,37 +0,0 @@ -/// -import { OverNode } from '../operation-node/over-node.js'; -import { QueryNode } from '../operation-node/query-node.js'; -import { parseOrderBy, } from '../parser/order-by-parser.js'; -import { parsePartitionBy, } from '../parser/partition-by-parser.js'; -import { freeze } from '../util/object-utils.js'; -export class OverBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - orderBy(...args) { - return new OverBuilder({ - overNode: OverNode.cloneWithOrderByItems(this.#props.overNode, parseOrderBy(args)), - }); - } - clearOrderBy() { - return new OverBuilder({ - overNode: QueryNode.cloneWithoutOrderBy(this.#props.overNode), - }); - } - partitionBy(partitionBy) { - return new OverBuilder({ - overNode: OverNode.cloneWithPartitionByItems(this.#props.overNode, parsePartitionBy(partitionBy)), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.overNode; - } -} diff --git a/node_modules/kysely/dist/esm/query-builder/returning-interface.d.ts b/node_modules/kysely/dist/esm/query-builder/returning-interface.d.ts deleted file mode 100644 index f03e401..0000000 --- a/node_modules/kysely/dist/esm/query-builder/returning-interface.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -import type { ReturningAllRow, ReturningCallbackRow, ReturningRow } from '../parser/returning-parser.js'; -import type { SelectCallback, SelectExpression } from '../parser/select-parser.js'; -import type { Selectable } from '../util/column-type.js'; -export interface ReturningInterface { - /** - * Allows you to return data from modified rows. - * - * On supported databases like PostgreSQL, this method can be chained to - * `insert`, `update`, `delete` and `merge` queries to return data. - * - * Note that on SQLite you need to give aliases for the expressions to avoid - * [this bug](https://sqlite.org/forum/forumpost/033daf0b32) in SQLite. - * For example `.returning('id as id')`. - * - * Also see the {@link returningAll} method. - * - * ### Examples - * - * Return one column: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * ``` - * - * Return multiple columns: - * - * ```ts - * const { id, last_name } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning(['id', 'last_name']) - * .executeTakeFirstOrThrow() - * ``` - * - * Return arbitrary expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * const { id, full_name, first_pet_id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning((eb) => [ - * 'id as id', - * sql`concat(first_name, ' ', last_name)`.as('full_name'), - * eb.selectFrom('pet').select('pet.id').limit(1).as('first_pet_id') - * ]) - * .executeTakeFirstOrThrow() - * ``` - */ - returning>(selections: ReadonlyArray): ReturningInterface>; - returning>(callback: CB): ReturningInterface>; - returning>(selection: SE): ReturningInterface>; - /** - * Adds a `returning *` to an insert/update/delete/merge query on databases - * that support `returning` such as PostgreSQL. - * - * Also see the {@link returning} method. - */ - returningAll(): ReturningInterface>; -} -export interface MultiTableReturningInterface extends ReturningInterface { - /** - * Adds a `returning *` or `returning table.*` to an insert/update/delete/merge - * query on databases that support `returning` such as PostgreSQL. - * - * Also see the {@link returning} method. - */ - returningAll(tables: ReadonlyArray): MultiTableReturningInterface>; - /** - * Adds a `returning *` to an insert/update/delete/merge query on databases - * that support `returning` such as PostgreSQL. - * - * Also see the {@link returning} method. - */ - returningAll(table: T): MultiTableReturningInterface>; - returningAll(): ReturningInterface>; -} diff --git a/node_modules/kysely/dist/esm/query-builder/returning-interface.js b/node_modules/kysely/dist/esm/query-builder/returning-interface.js deleted file mode 100644 index 56d58a3..0000000 --- a/node_modules/kysely/dist/esm/query-builder/returning-interface.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/query-builder/select-query-builder-expression.d.ts b/node_modules/kysely/dist/esm/query-builder/select-query-builder-expression.d.ts deleted file mode 100644 index 47efff3..0000000 --- a/node_modules/kysely/dist/esm/query-builder/select-query-builder-expression.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { AliasableExpression } from '../expression/expression.js'; -import type { SelectQueryNode } from '../operation-node/select-query-node.js'; -export interface SelectQueryBuilderExpression extends AliasableExpression { - get isSelectQueryBuilder(): true; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - * - * ### Examples - * - * If you are creating a custom expression, it's often easiest to use the {@link sql} - * template tag to build the node: - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - */ - toOperationNode(): SelectQueryNode; -} diff --git a/node_modules/kysely/dist/esm/query-builder/select-query-builder-expression.js b/node_modules/kysely/dist/esm/query-builder/select-query-builder-expression.js deleted file mode 100644 index 4559568..0000000 --- a/node_modules/kysely/dist/esm/query-builder/select-query-builder-expression.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/query-builder/select-query-builder.d.ts b/node_modules/kysely/dist/esm/query-builder/select-query-builder.d.ts deleted file mode 100644 index f159773..0000000 --- a/node_modules/kysely/dist/esm/query-builder/select-query-builder.d.ts +++ /dev/null @@ -1,2391 +0,0 @@ -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import { type JoinCallbackExpression, type JoinReferenceExpression } from '../parser/join-parser.js'; -import { type TableExpression } from '../parser/table-parser.js'; -import { type SelectExpression, type Selection, type AllSelection, type SelectCallback, type CallbackSelection } from '../parser/select-parser.js'; -import { type ReferenceExpression } from '../parser/reference-parser.js'; -import { SelectQueryNode } from '../operation-node/select-query-node.js'; -import { QueryNode } from '../operation-node/query-node.js'; -import type { DrainOuterGeneric, NarrowPartial, Nullable, ShallowRecord, Simplify, SimplifySingleResult, SqlBool } from '../util/type-utils.js'; -import { type DirectedOrderByStringReference, type OrderByExpression, type OrderByModifiers } from '../parser/order-by-parser.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -import { type GroupByArg } from '../parser/group-by-parser.js'; -import type { KyselyPlugin } from '../plugin/kysely-plugin.js'; -import type { WhereInterface } from './where-interface.js'; -import { type NoResultErrorConstructor } from './no-result-error.js'; -import type { HavingInterface } from './having-interface.js'; -import type { Explainable, ExplainFormat } from '../util/explainable.js'; -import { type SetOperandExpression } from '../parser/set-operation-parser.js'; -import type { AliasedExpression, Expression } from '../expression/expression.js'; -import { type ComparisonOperatorExpression, type OperandValueExpressionOrList } from '../parser/binary-operation-parser.js'; -import type { KyselyTypeError } from '../util/type-error.js'; -import type { Selectable } from '../util/column-type.js'; -import type { Streamable } from '../util/streamable.js'; -import type { ExpressionOrFactory } from '../parser/expression-parser.js'; -import { ExpressionWrapper } from '../expression/expression-wrapper.js'; -import type { SelectQueryBuilderExpression } from './select-query-builder-expression.js'; -import { type ValueExpression } from '../parser/value-parser.js'; -import type { FetchModifier } from '../operation-node/fetch-node.js'; -import type { TopModifier } from '../operation-node/top-node.js'; -import type { OrderByInterface } from './order-by-interface.js'; -export interface SelectQueryBuilder extends WhereInterface, HavingInterface, OrderByInterface, SelectQueryBuilderExpression, Compilable, Explainable, Streamable { - /** - * Adds a `where` expression to the query. - * - * Calling this method multiple times will combine the expressions using `and`. - * - * Also see {@link whereRef} - * - * ### Examples - * - * - * - * `where` method calls are combined with `AND`: - * - * ```ts - * const person = await db - * .selectFrom('person') - * .selectAll() - * .where('first_name', '=', 'Jennifer') - * .where('age', '>', 40) - * .executeTakeFirst() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "first_name" = $1 and "age" > $2 - * ``` - * - * Operator can be any supported operator or if the typings don't support it - * you can always use: - * - * ```ts - * import { sql } from 'kysely' - * - * sql`your operator` - * ``` - * - * - * - * Find multiple items using a list of identifiers: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where('id', 'in', [1, 2, 3]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "id" in ($1, $2, $3) - * ``` - * - * - * - * You can use the `and` function to create a simple equality - * filter using an object - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where((eb) => eb.and({ - * first_name: 'Jennifer', - * last_name: eb.ref('first_name') - * })) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * "first_name" = $1 - * and "last_name" = "first_name" - * ) - * ``` - * - * - * - * To combine conditions using `OR`, you can use the expression builder. - * There are two ways to create `OR` expressions. Both are shown in this - * example: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * // 1. Using the `or` method on the expression builder: - * .where((eb) => eb.or([ - * eb('first_name', '=', 'Jennifer'), - * eb('first_name', '=', 'Sylvester') - * ])) - * // 2. Chaining expressions using the `or` method on the - * // created expressions: - * .where((eb) => - * eb('last_name', '=', 'Aniston').or('last_name', '=', 'Stallone') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * ("first_name" = $1 or "first_name" = $2) - * and - * ("last_name" = $3 or "last_name" = $4) - * ) - * ``` - * - * - * - * You can add expressions conditionally like this: - * - * ```ts - * import { Expression, SqlBool } from 'kysely' - * - * const firstName: string | undefined = 'Jennifer' - * const lastName: string | undefined = 'Aniston' - * const under18 = true - * const over60 = true - * - * let query = db - * .selectFrom('person') - * .selectAll() - * - * if (firstName) { - * // The query builder is immutable. Remember to reassign - * // the result back to the query variable. - * query = query.where('first_name', '=', firstName) - * } - * - * if (lastName) { - * query = query.where('last_name', '=', lastName) - * } - * - * if (under18 || over60) { - * // Conditional OR expressions can be added like this. - * query = query.where((eb) => { - * const ors: Expression[] = [] - * - * if (under18) { - * ors.push(eb('age', '<', 18)) - * } - * - * if (over60) { - * ors.push(eb('age', '>', 60)) - * } - * - * return eb.or(ors) - * }) - * } - * - * const persons = await query.execute() - * ``` - * - * Both the first and third argument can also be arbitrary expressions like - * subqueries. An expression can defined by passing a function and calling - * the methods of the {@link ExpressionBuilder} passed to the callback: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where( - * (qb) => qb.selectFrom('pet') - * .select('pet.name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1), - * '=', - * 'Fluffy' - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * select "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) = $2 - * ``` - * - * A `where in` query can be built by using the `in` operator and an array - * of values. The values in the array can also be expressions: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where('person.id', 'in', [100, 200, 300]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "id" in ($1, $2, $3) - * ``` - * - * - * - * For complex `where` expressions you can pass in a single callback and - * use the `ExpressionBuilder` to build your expression: - * - * ```ts - * const firstName = 'Jennifer' - * const maxAge = 60 - * - * const persons = await db - * .selectFrom('person') - * .selectAll('person') - * .where(({ eb, or, and, not, exists, selectFrom }) => and([ - * or([ - * eb('first_name', '=', firstName), - * eb('age', '<', maxAge) - * ]), - * not(exists( - * selectFrom('pet') - * .select('pet.id') - * .whereRef('pet.owner_id', '=', 'person.id') - * )) - * ])) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where ( - * ( - * "first_name" = $1 - * or "age" < $2 - * ) - * and not exists ( - * select "pet"."id" from "pet" where "pet"."owner_id" = "person"."id" - * ) - * ) - * ``` - * - * If everything else fails, you can always use the {@link sql} tag - * as any of the arguments, including the operator: - * - * ```ts - * import { sql } from 'kysely' - * - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where( - * sql`coalesce(first_name, last_name)`, - * 'like', - * '%' + name + '%', - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * where coalesce(first_name, last_name) like $1 - * ``` - * - * In all examples above the columns were known at compile time - * (except for the raw {@link sql} expressions). By default kysely only - * allows you to refer to columns that exist in the database **and** - * can be referred to in the current query and context. - * - * Sometimes you may want to refer to columns that come from the user - * input and thus are not available at compile time. - * - * You have two options, the {@link sql} tag or `db.dynamic`. The example below - * uses both: - * - * ```ts - * import { sql } from 'kysely' - * const { ref } = db.dynamic - * - * const columnFromUserInput: string = 'id' - * - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where(ref(columnFromUserInput), '=', 1) - * .where(sql.id(columnFromUserInput), '=', 2) - * .execute() - * ``` - */ - where, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): SelectQueryBuilder; - where>(expression: E): SelectQueryBuilder; - /** - * Adds a `where` clause where both sides of the operator are references - * to columns. - * - * The normal `where` method treats the right hand side argument as a - * value by default. `whereRef` treats it as a column reference. This method is - * expecially useful with joins and correlated subqueries. - * - * ### Examples - * - * Usage with a join: - * - * ```ts - * db.selectFrom(['person', 'pet']) - * .selectAll() - * .whereRef('person.first_name', '=', 'pet.name') - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person", "pet" where "person"."first_name" = "pet"."name" - * ``` - * - * Usage in a subquery: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll('person') - * .select((eb) => eb - * .selectFrom('pet') - * .select('name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1) - * .as('pet_name') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".*, ( - * select "name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) as "pet_name" - * from "person" - */ - whereRef, RRE extends ReferenceExpression>(lhs: LRE, op: ComparisonOperatorExpression, rhs: RRE): SelectQueryBuilder; - /** - * Just like {@link WhereInterface.where | where} but adds a `having` statement - * instead of a `where` statement. - */ - having, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): SelectQueryBuilder; - having>(expression: E): SelectQueryBuilder; - /** - * Just like {@link WhereInterface.whereRef | whereRef} but adds a `having` statement - * instead of a `where` statement. - */ - havingRef, RRE extends ReferenceExpression>(lhs: LRE, op: ComparisonOperatorExpression, rhs: RRE): SelectQueryBuilder; - /** - * Adds a select statement to the query. - * - * When a column (or any expression) is selected, Kysely adds its type to the return - * type of the query. Kysely is smart enough to parse the selection names and types - * from aliased columns, subqueries, raw expressions etc. - * - * Kysely only allows you to select columns and expressions that exist and would - * produce valid SQL. However, Kysely is not perfect and there may be cases where - * the type inference doesn't work and you need to override it. You can always - * use the {@link Kysely.dynamic | dynamic} module and the {@link sql} tag - * to override the types. - * - * Select calls are additive. Calling `select('id').select('first_name')` is the - * same as calling `select(['id', 'first_name'])`. - * - * To select all columns of the query or specific tables see the - * {@link selectAll} method. - * - * See the {@link $if} method if you are looking for a way to add selections - * based on a runtime condition. - * - * ### Examples - * - * - * - * Select a single column: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .select('id') - * .where('first_name', '=', 'Arnold') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id" from "person" where "first_name" = $1 - * ``` - * - * - * - * Select a single column and specify a table: - * - * ```ts - * const persons = await db - * .selectFrom(['person', 'pet']) - * .select('person.id') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."id" from "person", "pet" - * ``` - * - * - * - * Select multiple columns: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .select(['person.id', 'first_name']) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."id", "first_name" from "person" - * ``` - * - * - * - * You can give an alias for selections and tables by appending `as the_alias` to the name: - * - * ```ts - * const persons = await db - * .selectFrom('person as p') - * .select([ - * 'first_name as fn', - * 'p.last_name as ln' - * ]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * "first_name" as "fn", - * "p"."last_name" as "ln" - * from "person" as "p" - * ``` - * - * - * - * You can select arbitrary expression including subqueries and raw sql snippets. - * When you do that, you need to give a name for the selections using the `as` method: - * - * ```ts - * import { sql } from 'kysely' - * - * const persons = await db.selectFrom('person') - * .select(({ eb, selectFrom, or, val, lit }) => [ - * // Select a correlated subquery - * selectFrom('pet') - * .whereRef('person.id', '=', 'pet.owner_id') - * .select('pet.name') - * .orderBy('pet.name') - * .limit(1) - * .as('first_pet_name'), - * - * // Build and select an expression using - * // the expression builder - * or([ - * eb('first_name', '=', 'Jennifer'), - * eb('first_name', '=', 'Arnold') - * ]).as('is_jennifer_or_arnold'), - * - * // Select a raw sql expression - * sql`concat(first_name, ' ', last_name)`.as('full_name'), - * - * // Select a static string value - * val('Some value').as('string_value'), - * - * // Select a literal value - * lit(42).as('literal_value'), - * ]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * ( - * select "pet"."name" - * from "pet" - * where "person"."id" = "pet"."owner_id" - * order by "pet"."name" - * limit $1 - * ) as "pet_name", - * ("first_name" = $2 or "first_name" = $3) as "jennifer_or_arnold", - * concat(first_name, ' ', last_name) as "full_name", - * $4 as "string_value", - * 42 as "literal_value" - * from "person" - * ``` - * - * In case you use the {@link sql} tag you need to specify the type of the expression - * (in this example `string`). - * - * - * - * Sometimes you can be sure something's not null, but Kysely isn't able to infer - * it. For example calling `where('last_name', 'is not', null)` doesn't make - * `last_name` not null in the result type, but unless you have other where statements - * you can be sure it's never null. - * - * Kysely has a couple of helpers for dealing with these cases: `$notNull()` and `$narrowType`. - * Both are used in the following example: - * - * ```ts - * import { NotNull } from 'kysely' - * import { jsonObjectFrom } from 'kysely/helpers/postgres' - * - * const persons = db - * .selectFrom('person') - * .select((eb) => [ - * 'last_name', - * // Let's assume we know the person has at least one - * // pet. We can use the `.$notNull()` method to make - * // the expression not null. You could just as well - * // add `pet` to the `$narrowType` call below. - * jsonObjectFrom( - * eb.selectFrom('pet') - * .selectAll() - * .limit(1) - * .whereRef('person.id', '=', 'pet.owner_id') - * ).$notNull().as('pet') - * ]) - * .where('last_name', 'is not', null) - * // $narrowType can be used to narrow the output type. - * // The special `NotNull` type can be used to make a - * // selection not null. You could add `pet: NotNull` - * // here and omit the `$notNull()` call on it. - * // Use whichever way you prefer. - * .$narrowType<{ last_name: NotNull }>() - * .execute() - * ``` - * - * All the examples above assume you know the column names at compile time. - * While it's better to build your code like that (that way you also know - * the types) sometimes it's not possible or you just prefer to write more - * dynamic code. - *

- * In this example, we use the `dynamic` module's methods to add selections - * dynamically: - * - * ```ts - * const { ref } = db.dynamic - * - * // Some column name provided by the user. Value not known at compile time. - * const columnFromUserInput: string = 'first_name'; - * - * // A type that lists all possible values `columnFromUserInput` can have. - * // You can use `keyof Person` if any column of an interface is allowed. - * type PossibleColumns = 'last_name' | 'first_name' | 'birthdate' - * - * const people = await db - * .selectFrom('person') - * .select([ - * ref(columnFromUserInput), - * 'id' - * ]) - * .execute() - * - * // The resulting type contains all `PossibleColumns` as optional fields - * // because we cannot know which field was actually selected before - * // running the code. - * const lastName: string | null | undefined = people[0].last_name - * const firstName: string | undefined = people[0].first_name - * const birthDate: Date | null | undefined = people[0].birthdate - * - * // The result type also contains the compile time selection `id`. - * people[0].id - * ``` - */ - select>(selections: ReadonlyArray): SelectQueryBuilder>; - select>(callback: CB): SelectQueryBuilder>; - select>(selection: SE): SelectQueryBuilder>; - /** - * Adds `distinct on` expressions to the select clause. - * - * ### Examples - * - * - * - * ```ts - * const persons = await db.selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .where('pet.name', '=', 'Doggo') - * .distinctOn('person.id') - * .selectAll('person') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select distinct on ("person"."id") "person".* - * from "person" - * inner join "pet" on "pet"."owner_id" = "person"."id" - * where "pet"."name" = $1 - * ``` - */ - distinctOn>(selections: ReadonlyArray): SelectQueryBuilder; - distinctOn>(selection: RE): SelectQueryBuilder; - /** - * This can be used to add any additional SQL to the front of the query __after__ the `select` keyword. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.selectFrom('person') - * .modifyFront(sql`sql_no_cache`) - * .select('first_name') - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * select sql_no_cache `first_name` - * from `person` - * ``` - */ - modifyFront(modifier: Expression): SelectQueryBuilder; - /** - * This can be used to add any additional SQL to the end of the query. - * - * Also see {@link forUpdate}, {@link forShare}, {@link forKeyShare}, {@link forNoKeyUpdate} - * {@link skipLocked} and {@link noWait}. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.selectFrom('person') - * .select('first_name') - * .modifyEnd(sql`for update`) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name" - * from "person" - * for update - * ``` - */ - modifyEnd(modifier: Expression): SelectQueryBuilder; - /** - * Makes the selection distinct. - * - * ### Examples - * - * - * - * ```ts - * const persons = await db.selectFrom('person') - * .select('first_name') - * .distinct() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select distinct "first_name" from "person" - * ``` - */ - distinct(): SelectQueryBuilder; - /** - * Adds the `for update` modifier to a select query on supported databases. - */ - forUpdate(of?: TableOrList): SelectQueryBuilder; - /** - * Adds the `for share` modifier to a select query on supported databases. - */ - forShare(of?: TableOrList): SelectQueryBuilder; - /** - * Adds the `for key share` modifier to a select query on supported databases. - */ - forKeyShare(of?: TableOrList): SelectQueryBuilder; - /** - * Adds the `for no key update` modifier to a select query on supported databases. - */ - forNoKeyUpdate(of?: TableOrList): SelectQueryBuilder; - /** - * Adds the `skip locked` modifier to a select query on supported databases. - */ - skipLocked(): SelectQueryBuilder; - /** - * Adds the `nowait` modifier to a select query on supported databases. - */ - noWait(): SelectQueryBuilder; - /** - * Adds a `select *` or `select table.*` clause to the query. - * - * ### Examples - * - * - * - * The `selectAll` method generates `SELECT *`: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - * - * - * - * Select all columns of a table: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll('person') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* from "person" - * ``` - * - * Select all columns of multiple tables: - * - * ```ts - * const personsPets = await db - * .selectFrom(['person', 'pet']) - * .selectAll(['person', 'pet']) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".*, "pet".* from "person", "pet" - * ``` - */ - selectAll(table: ReadonlyArray): SelectQueryBuilder>; - selectAll(table: T): SelectQueryBuilder>; - selectAll(): SelectQueryBuilder>; - /** - * Joins another table to the query using an `inner join`. - * - * ### Examples - * - * - * - * Simple `inner join`s can be done by providing a table name and two columns to join: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * // `select` needs to come after the call to `innerJoin` so - * // that you can select from the joined table. - * .select(['person.id', 'pet.name as pet_name']) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."id", "pet"."name" as "pet_name" - * from "person" - * inner join "pet" - * on "pet"."owner_id" = "person"."id" - * ``` - * - * - * - * You can give an alias for the joined table like this: - * - * ```ts - * await db.selectFrom('person') - * .innerJoin('pet as p', 'p.owner_id', 'person.id') - * .where('p.name', '=', 'Doggo') - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * inner join "pet" as "p" - * on "p"."owner_id" = "person"."id" - * where "p".name" = $1 - * ``` - * - * - * - * You can provide a function as the second argument to get a join - * builder for creating more complex joins. The join builder has a - * bunch of `on*` methods for building the `on` clause of the join. - * There's basically an equivalent for every `where` method - * (`on`, `onRef` etc.). - * - * You can do all the same things with the - * `on` method that you can with the corresponding `where` method (like [OR expressions for example](https://kysely.dev/docs/examples/WHERE/or-where)). - * See the `where` method documentation for more examples. - * - * ```ts - * await db.selectFrom('person') - * .innerJoin( - * 'pet', - * (join) => join - * .onRef('pet.owner_id', '=', 'person.id') - * .on('pet.name', '=', 'Doggo') - * .on((eb) => eb.or([ - * eb('person.age', '>', 18), - * eb('person.age', '<', 100) - * ])) - * ) - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * inner join "pet" - * on "pet"."owner_id" = "person"."id" - * and "pet"."name" = $1 - * and ( - * "person"."age" > $2 - * OR "person"."age" < $3 - * ) - * ``` - * - * - * - * You can join a subquery by providing two callbacks: - * - * ```ts - * const result = await db.selectFrom('person') - * .innerJoin( - * (eb) => eb - * .selectFrom('pet') - * .select(['owner_id as owner', 'name']) - * .where('name', '=', 'Doggo') - * .as('doggos'), - * (join) => join - * .onRef('doggos.owner', '=', 'person.id'), - * ) - * .selectAll('doggos') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "doggos".* - * from "person" - * inner join ( - * select "owner_id" as "owner", "name" - * from "pet" - * where "name" = $1 - * ) as "doggos" - * on "doggos"."owner" = "person"."id" - * ``` - */ - innerJoin, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): SelectQueryBuilderWithInnerJoin; - innerJoin, FN extends JoinCallbackExpression>(table: TE, callback: FN): SelectQueryBuilderWithInnerJoin; - /** - * Just like {@link innerJoin} but adds a `left join` instead of an `inner join`. - */ - leftJoin, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): SelectQueryBuilderWithLeftJoin; - leftJoin, FN extends JoinCallbackExpression>(table: TE, callback: FN): SelectQueryBuilderWithLeftJoin; - /** - * Just like {@link innerJoin} but adds a `right join` instead of an `inner join`. - */ - rightJoin, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): SelectQueryBuilderWithRightJoin; - rightJoin, FN extends JoinCallbackExpression>(table: TE, callback: FN): SelectQueryBuilderWithRightJoin; - /** - * Just like {@link innerJoin} but adds a `full join` instead of an `inner join`. - * - * This is only supported by some dialects like PostgreSQL, MS SQL Server and SQLite. - */ - fullJoin, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): SelectQueryBuilderWithFullJoin; - fullJoin, FN extends JoinCallbackExpression>(table: TE, callback: FN): SelectQueryBuilderWithFullJoin; - /** - * Just like {@link innerJoin} but adds a `cross join` instead of an `inner join`. - */ - crossJoin>(table: TE): SelectQueryBuilderWithInnerJoin; - /** - * Just like {@link innerJoin} but adds a lateral join instead of an inner join. - * - * This is only supported by some dialects like PostgreSQL and MySQL. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .innerJoinLateral( - * (eb) => - * eb.selectFrom('pet') - * .select('name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .as('p'), - * (join) => join.onTrue() - * ) - * .select(['first_name', 'p.name']) - * .orderBy('first_name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."first_name", "p"."name" - * from "person" - * inner join lateral ( - * select "name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * ) as "p" on true - * order by "first_name" - * ``` - */ - innerJoinLateral, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): SelectQueryBuilderWithInnerJoin; - innerJoinLateral, FN extends JoinCallbackExpression>(table: TE, callback: FN): SelectQueryBuilderWithInnerJoin; - /** - * Just like {@link innerJoin} but adds a `left join lateral` instead of an `inner join`. - * - * This is only supported by some dialects like PostgreSQL and MySQL. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .leftJoinLateral( - * (eb) => - * eb.selectFrom('pet') - * .select('name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .as('p'), - * (join) => join.onTrue() - * ) - * .select(['first_name', 'p.name']) - * .orderBy('first_name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."first_name", "p"."name" - * from "person" - * left join lateral ( - * select "name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * ) as "p" on true - * order by "first_name" - * ``` - */ - leftJoinLateral, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): SelectQueryBuilderWithLeftJoin; - leftJoinLateral, FN extends JoinCallbackExpression>(table: TE, callback: FN): SelectQueryBuilderWithLeftJoin; - /** - * Just like {@link innerJoin} but adds a `cross join lateral` instead of an `inner join`. - * - * This is only supported by some dialects like PostgreSQL. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .crossJoinLateral( - * (eb) => - * eb.selectFrom('pet') - * .select('name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .as('p') - * ) - * .select(['first_name', 'p.name']) - * .orderBy('first_name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."first_name", "p"."name" - * from "person" - * cross join lateral ( - * select "name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * ) as "p" - * order by "first_name" - * ``` - */ - crossJoinLateral>(table: TE): SelectQueryBuilderWithInnerJoin; - /** - * Joins another table to the query using a `cross apply`. - * - * This is only supported by some dialects like MS SQL Server. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .crossApply( - * (eb) => - * eb.selectFrom('pet') - * .select('name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .as('p') - * ) - * .select(['first_name', 'p.name']) - * .orderBy('first_name') - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * select "person"."first_name", "p"."name" - * from "person" - * cross apply ( - * select "name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * ) as "p" - * order by "first_name" - * ``` - */ - crossApply>(table: TE): SelectQueryBuilderWithInnerJoin; - /** - * Just like {@link crossApply} but adds an `outer apply` instead of a `cross apply`. - * - * This is only supported by some dialects like MS SQL Server. - */ - outerApply>(table: TE): SelectQueryBuilderWithLeftJoin; - /** - * Adds a `group by` clause to the query. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db - * .selectFrom('person') - * .select([ - * 'first_name', - * sql`max(id)`.as('max_id') - * ]) - * .groupBy('first_name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name", max(id) - * from "person" - * group by "first_name" - * ``` - * - * `groupBy` also accepts an array: - * - * ```ts - * import { sql } from 'kysely' - * - * await db - * .selectFrom('person') - * .select([ - * 'first_name', - * 'last_name', - * sql`max(id)`.as('max_id') - * ]) - * .groupBy([ - * 'first_name', - * 'last_name' - * ]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name", "last_name", max(id) - * from "person" - * group by "first_name", "last_name" - * ``` - * - * The group by expressions can also be subqueries or - * raw sql expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * await db - * .selectFrom('person') - * .select([ - * 'first_name', - * 'last_name', - * sql`max(id)`.as('max_id') - * ]) - * .groupBy([ - * sql`concat(first_name, last_name)`, - * (qb) => qb.selectFrom('pet').select('id').limit(1) - * ]) - * .execute() - * ``` - * - * `dynamic.ref` can be used to refer to columns not known at - * compile time: - * - * ```ts - * async function someQuery(groupBy: string) { - * const { ref } = db.dynamic - * - * return await db - * .selectFrom('person') - * .select('first_name') - * .groupBy(ref(groupBy)) - * .execute() - * } - * - * someQuery('first_name') - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name" - * from "person" - * group by "first_name" - * ``` - */ - groupBy>(groupBy: GE): SelectQueryBuilder; - /** - * Adds an `order by` clause to the query. - * - * `orderBy` calls are additive. Meaning, additional `orderBy` calls append to - * the existing order by clause. - * - * `orderBy` is supported in select queries on all dialects. In MySQL, you can - * also use `orderBy` in update and delete queries. - * - * In a single call you can add a single column/expression or multiple columns/expressions. - * - * Single column/expression calls can have 1-2 arguments. The first argument is - * the expression to order by, while the second optional argument is the direction - * (`asc` or `desc`), a callback that accepts and returns an {@link OrderByItemBuilder} - * or an expression. - * - * See {@link clearOrderBy} to remove the `order by` clause from a query. - * - * ### Examples - * - * Single column/expression per call: - * - * ```ts - * await db - * .selectFrom('person') - * .select('person.first_name as fn') - * .orderBy('id') - * .orderBy('fn', 'desc') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."first_name" as "fn" - * from "person" - * order by "id", "fn" desc - * ``` - * - * Building advanced modifiers: - * - * ```ts - * await db - * .selectFrom('person') - * .select('person.first_name as fn') - * .orderBy('id', (ob) => ob.desc().nullsFirst()) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."first_name" as "fn" - * from "person" - * order by "id" desc nulls first - * ``` - * - * The order by expression can also be a raw sql expression or a subquery - * in addition to column references: - * - * ```ts - * import { sql } from 'kysely' - * - * await db - * .selectFrom('person') - * .selectAll() - * .orderBy((eb) => eb.selectFrom('pet') - * .select('pet.name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1) - * ) - * .orderBy( - * sql`concat(first_name, last_name) asc` - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * order by - * ( select "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) asc, - * concat(first_name, last_name) asc - * ``` - * - * `dynamic.ref` can be used to refer to columns not known at - * compile time: - * - * ```ts - * async function someQuery(orderBy: string) { - * const { ref } = db.dynamic - * - * return await db - * .selectFrom('person') - * .select('person.first_name as fn') - * .orderBy(ref(orderBy)) - * .execute() - * } - * - * someQuery('fn') - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."first_name" as "fn" - * from "person" - * order by "fn" - * ``` - */ - orderBy>(expr: OE, modifiers?: OrderByModifiers): SelectQueryBuilder; - /** - * @deprecated It does ~2-2.5x more compile-time instantiations than multiple `orderBy(expr, modifiers?)` calls, and has broken autocompletion. - */ - orderBy | DirectedOrderByStringReference>(exprs: ReadonlyArray): SelectQueryBuilder; - /** - * @deprecated Use orderBy(expr, direction) instead. - */ - orderBy>(expr: OE): SelectQueryBuilder; - /** - * @deprecated Use `orderBy(expr, (ob) => ...)` instead. - */ - orderBy>(expr: OE, modifiers: Expression): SelectQueryBuilder; - /** - * Adds a limit clause to the query. - * - * Passing a `null` value is only supported by some dialects like PostgreSQL, - * and will result in a no-op limit clause. - * - * ### Examples - * - * Select the first 10 rows of the result: - * - * ```ts - * await db - * .selectFrom('person') - * .select('first_name') - * .limit(10) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name" from "person" limit $1 - * ``` - * - * Select rows from index 10 to index 19 of the result: - * - * ```ts - * await db - * .selectFrom('person') - * .select('first_name') - * .limit(10) - * .offset(10) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name" from "person" limit $1 offset $2 - * ``` - */ - limit(limit: ValueExpression): SelectQueryBuilder; - /** - * Adds an `offset` clause to the query. - * - * ### Examples - * - * Select rows from index 10 to index 19 of the result: - * - * ```ts - * await db - * .selectFrom('person') - * .select('first_name') - * .limit(10) - * .offset(10) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name" from "person" limit $1 offset $2 - * ``` - */ - offset(offset: ValueExpression): SelectQueryBuilder; - /** - * Adds a `fetch` clause to the query. - * - * This clause is only supported by some dialects like PostgreSQL or MS SQL Server. - * - * ### Examples - * - * ```ts - * await db - * .selectFrom('person') - * .select('first_name') - * .orderBy('first_name') - * .offset(0) - * .fetch(10) - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * select "first_name" - * from "person" - * order by "first_name" - * offset 0 rows - * fetch next 10 rows only - * ``` - */ - fetch(rowCount: number | bigint, modifier?: FetchModifier): SelectQueryBuilder; - /** - * Adds a `top` clause to the query. - * - * This clause is only supported by some dialects like MS SQL Server. - * - * ### Examples - * - * Select 10 biggest ages: - * - * ```ts - * await db - * .selectFrom('person') - * .select('age') - * .top(10) - * .orderBy('age desc') - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * select top(10) "age" from "person" order by "age" desc - * ``` - * - * Select 10% first rows: - * - * ```ts - * await db - * .selectFrom('person') - * .selectAll() - * .top(10, 'percent') - * .execute() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * select top(10) percent * from "person" - * ``` - */ - top(expression: number | bigint, modifiers?: TopModifier): SelectQueryBuilder; - /** - * Combines another select query or raw expression to this query using `union`. - * - * The output row type of the combined query must match `this` query. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name as name']) - * .union(db.selectFrom('pet').select(['id', 'name'])) - * .orderBy('name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", "first_name" as "name" - * from "person" - * union - * select "id", "name" - * from "pet" - * order by "name" - * ``` - * - * You can provide a callback to get an expression builder. - * In the following example, this allows us to wrap the query in parentheses: - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name as name']) - * .union((eb) => eb.parens( - * eb.selectFrom('pet').select(['id', 'name']) - * )) - * .orderBy('name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", "first_name" as "name" - * from "person" - * union - * ( - * select "id", "name" - * from "pet" - * ) - * order by "name" - * ``` - */ - union>(expression: E): SelectQueryBuilder; - /** - * Combines another select query or raw expression to this query using `union all`. - * - * The output row type of the combined query must match `this` query. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name as name']) - * .unionAll(db.selectFrom('pet').select(['id', 'name'])) - * .orderBy('name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", "first_name" as "name" - * from "person" - * union all - * select "id", "name" - * from "pet" - * order by "name" - * ``` - * - * You can provide a callback to get an expression builder. - * In the following example, this allows us to wrap the query in parentheses: - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name as name']) - * .unionAll((eb) => eb.parens( - * eb.selectFrom('pet').select(['id', 'name']) - * )) - * .orderBy('name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", "first_name" as "name" - * from "person" - * union all - * ( - * select "id", "name" - * from "pet" - * ) - * order by "name" - * ``` - */ - unionAll>(expression: E): SelectQueryBuilder; - /** - * Combines another select query or raw expression to this query using `intersect`. - * - * The output row type of the combined query must match `this` query. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name as name']) - * .intersect(db.selectFrom('pet').select(['id', 'name'])) - * .orderBy('name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", "first_name" as "name" - * from "person" - * intersect - * select "id", "name" - * from "pet" - * order by "name" - * ``` - * - * You can provide a callback to get an expression builder. - * In the following example, this allows us to wrap the query in parentheses: - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name as name']) - * .intersect((eb) => eb.parens( - * eb.selectFrom('pet').select(['id', 'name']) - * )) - * .orderBy('name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", "first_name" as "name" - * from "person" - * intersect - * ( - * select "id", "name" - * from "pet" - * ) - * order by "name" - * ``` - */ - intersect>(expression: E): SelectQueryBuilder; - /** - * Combines another select query or raw expression to this query using `intersect all`. - * - * The output row type of the combined query must match `this` query. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name as name']) - * .intersectAll(db.selectFrom('pet').select(['id', 'name'])) - * .orderBy('name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", "first_name" as "name" - * from "person" - * intersect all - * select "id", "name" - * from "pet" - * order by "name" - * ``` - * - * You can provide a callback to get an expression builder. - * In the following example, this allows us to wrap the query in parentheses: - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name as name']) - * .intersectAll((eb) => eb.parens( - * eb.selectFrom('pet').select(['id', 'name']) - * )) - * .orderBy('name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", "first_name" as "name" - * from "person" - * intersect all - * ( - * select "id", "name" - * from "pet" - * ) - * order by "name" - * ``` - */ - intersectAll>(expression: E): SelectQueryBuilder; - /** - * Combines another select query or raw expression to this query using `except`. - * - * The output row type of the combined query must match `this` query. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name as name']) - * .except(db.selectFrom('pet').select(['id', 'name'])) - * .orderBy('name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", "first_name" as "name" - * from "person" - * except - * select "id", "name" - * from "pet" - * order by "name" - * ``` - * - * You can provide a callback to get an expression builder. - * In the following example, this allows us to wrap the query in parentheses: - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name as name']) - * .except((eb) => eb.parens( - * eb.selectFrom('pet').select(['id', 'name']) - * )) - * .orderBy('name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", "first_name" as "name" - * from "person" - * except - * ( - * select "id", "name" - * from "pet" - * ) - * order by "name" - * ``` - */ - except>(expression: E): SelectQueryBuilder; - /** - * Combines another select query or raw expression to this query using `except all`. - * - * The output row type of the combined query must match `this` query. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name as name']) - * .exceptAll(db.selectFrom('pet').select(['id', 'name'])) - * .orderBy('name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", "first_name" as "name" - * from "person" - * except all - * select "id", "name" - * from "pet" - * order by "name" - * ``` - * - * You can provide a callback to get an expression builder. - * In the following example, this allows us to wrap the query in parentheses: - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name as name']) - * .exceptAll((eb) => eb.parens( - * eb.selectFrom('pet').select(['id', 'name']) - * )) - * .orderBy('name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "id", "first_name" as "name" - * from "person" - * except all - * ( - * select "id", "name" - * from "pet" - * ) - * order by "name" - * ``` - */ - exceptAll>(expression: E): SelectQueryBuilder; - /** - * Gives an alias for the query. This method is only useful for sub queries. - * - * ### Examples - * - * ```ts - * const pets = await db.selectFrom('pet') - * .selectAll('pet') - * .select( - * (qb) => qb.selectFrom('person') - * .select('first_name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .as('owner_first_name') - * ) - * .execute() - * - * pets[0].owner_first_name - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "pet".*, ( - * select "first_name" - * from "person" - * where "pet"."owner_id" = "person"."id" - * ) as "owner_first_name" - * from "pet" - * ``` - */ - as
(alias: A): AliasedSelectQueryBuilder; - /** - * Clears all select clauses from the query. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .select(['id', 'first_name']) - * .clearSelect() - * .select(['id', 'gender']) - * .execute() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * select "id", "gender" from "person" - * ``` - */ - clearSelect(): SelectQueryBuilder; - /** - * Clears all where expressions from the query. - * - * ### Examples - * - * ```ts - * db.selectFrom('person') - * .selectAll() - * .where('id','=',42) - * .clearWhere() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearWhere(): SelectQueryBuilder; - /** - * Clears limit clause from the query. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .selectAll() - * .limit(10) - * .clearLimit() - * .execute() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearLimit(): SelectQueryBuilder; - /** - * Clears offset clause from the query. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .selectAll() - * .limit(10) - * .offset(20) - * .clearOffset() - * .execute() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * select * from "person" limit 10 - * ``` - */ - clearOffset(): SelectQueryBuilder; - /** - * Clears all `order by` clauses from the query. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .selectAll() - * .orderBy('id') - * .clearOrderBy() - * .execute() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearOrderBy(): SelectQueryBuilder; - /** - * Clears `group by` clause from the query. - * - * ### Examples - * - * ```ts - * await db.selectFrom('person') - * .selectAll() - * .groupBy('id') - * .clearGroupBy() - * .execute() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearGroupBy(): SelectQueryBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - * - * If you want to conditionally call a method on `this`, see - * the {@link $if} method. - * - * ### Examples - * - * The next example uses a helper function `log` to log a query: - * - * ```ts - * import type { Compilable } from 'kysely' - * - * function log(qb: T): T { - * console.log(qb.compile()) - * return qb - * } - * - * await db.selectFrom('person') - * .selectAll() - * .$call(log) - * .execute() - * ``` - */ - $call(func: (qb: this) => T): T; - /** - * Call `func(this)` if `condition` is true. - * - * NOTE: This method has an impact on TypeScript performance and it should only be used - * when necessary. Remember that you can call most methods like `where` conditionally - * like this: - * - * ```ts - * async function getPeople(firstName?: string, lastName?: string) { - * let query = db.selectFrom('person').selectAll() - * - * if (firstName) { - * query = query.where('first_name', '=', firstName) - * } - * - * if (lastName) { - * query = query.where('last_name', '=', lastName) - * } - * - * return await query.execute() - * } - * ``` - * - * This method is mainly useful with optional selects. Any `select` or `selectAll` - * method called inside the callback add optional fields to the result type. This is - * because we can't know if those selections were actually made before running the code. - * - * Also see [this recipe](https://github.com/kysely-org/kysely/blob/master/site/docs/recipes/0005-conditional-selects.md) - * - * ### Examples - * - * ```ts - * async function getPerson(id: number, withLastName: boolean) { - * return await db - * .selectFrom('person') - * .select(['id', 'first_name']) - * .$if(withLastName, (qb) => qb.select('last_name')) - * .where('id', '=', id) - * .executeTakeFirstOrThrow() - * } - * ``` - * - * Any selections added inside the `if` callback will be added as optional fields to the - * output type since we can't know if the selections were actually made before running - * the code. In the example above the return type of the `getPerson` function is: - * - * ```ts - * Promise<{ - * id: number - * first_name: string - * last_name?: string - * }> - * ``` - * - * You can also call any other methods inside the callback: - * - * ```ts - * async function getPeople(firstName?: string, petCountLimit?: number) { - * return await db.selectFrom('person') - * .select('person.id') - * .$if(firstName != null, (qb) => qb.where('first_name', '=', firstName!)) - * .$if(petCountLimit != null, (qb) => qb - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .having((eb) => eb.fn.count('pet.id'), '>', petCountLimit!) - * .groupBy('person.id') - * ) - * .execute() - * } - * ``` - */ - $if(condition: boolean, func: (qb: this) => SelectQueryBuilder): SelectQueryBuilder>>; - /** - * Change the output type of the query. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `SelectQueryBuilder` with a new output type. - */ - $castTo(): SelectQueryBuilder; - /** - * Changes the output type from an object to a tuple. - * - * This doesn't affect the generated SQL in any way. This function is - * just a necessary evil when you need to convert a query's output - * record type to a tuple type. Typescript doesn't currently offer - * tools to do this automatically (without insane hackery). - * - * The returned object can no longer be executed. It can only be used - * as a subquery. - * - * ### Examples - * - * ```ts - * const result = await db - * .selectFrom('person') - * .selectAll('person') - * .where(({ eb, refTuple, selectFrom }) => eb( - * refTuple('first_name', 'last_name'), - * 'in', - * selectFrom('pet') - * .select(['name', 'species']) - * .where('pet.species', '!=', 'cat') - * .$asTuple('name', 'species') - * )) - * .execute() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * select - * "person".* - * from - * "person" - * where - * ("first_name", "last_name") - * in - * ( - * select "name", "species" - * from "pet" - * where "pet"."species" != $1 - * ) - * ``` - */ - $asTuple>(key1: K1, key2: K2): keyof O extends K1 | K2 ? ExpressionWrapper : KyselyTypeError<'$asTuple() call failed: All selected columns must be provided as arguments'>; - $asTuple, K3 extends Exclude>(key1: K1, key2: K2, key3: K3): keyof O extends K1 | K2 | K3 ? ExpressionWrapper : KyselyTypeError<'$asTuple() call failed: All selected columns must be provided as arguments'>; - $asTuple, K3 extends Exclude, K4 extends Exclude>(key1: K1, key2: K2, key3: K3, key4: K4): keyof O extends K1 | K2 | K3 | K4 ? ExpressionWrapper : KyselyTypeError<'$asTuple() call failed: All selected columns must be provided as arguments'>; - $asTuple, K3 extends Exclude, K4 extends Exclude, K5 extends Exclude>(key1: K1, key2: K2, key3: K3, key4: K4, key5: K5): keyof O extends K1 | K2 | K3 | K4 | K5 ? ExpressionWrapper : KyselyTypeError<'$asTuple() call failed: All selected columns must be provided as arguments'>; - /** - * Plucks the value type of the output record. - * - * In SQL, any record type that only has one column can be used as a scalar. - * For example a query like this works: - * - * ```sql - * select - * id, - * first_name - * from - * person as p - * where - * -- This is ok since the query only selects one row - * -- and one column. - * (select name from pet where pet.owner_id = p.id limit 1) = 'Doggo' - * ``` - * - * In many cases Kysely handles this automatically and picks the correct - * scalar type instead of the record type, but sometimes you need to give - * Kysely a hint. - * - * One such case are custom helper functions that take `Expression` - * instances as inputs: - * - * ```ts - * import type { Expression } from 'kysely' - * - * function doStuff(expr: Expression) { - * // ... - * } - * - * // Error! This is not ok because the expression type is - * // `{ first_name: string }` instead of `string`. - * // doStuff(db.selectFrom('person').select('first_name')) - * - * // Ok! This is ok since we've plucked the `string` type of the - * // only column in the output type. - * doStuff(db.selectFrom('person').select('first_name').$asScalar()) - * ``` - * - * This function has absolutely no effect on the generated SQL. It's - * purely a type-level helper. - * - * This method returns an `ExpressionWrapper` instead of a `SelectQueryBuilder` - * since the return value should only be used as a part of an expression - * and never executed as the main query. - */ - $asScalar(): ExpressionWrapper; - /** - * Narrows (parts of) the output type of the query. - * - * Kysely tries to be as type-safe as possible, but in some cases we have to make - * compromises for better maintainability and compilation performance. At present, - * Kysely doesn't narrow the output type of the query when using {@link where}, {@link having} - * or {@link JoinQueryBuilder.on}. - * - * This utility method is very useful for these situations, as it removes unncessary - * runtime assertion/guard code. Its input type is limited to the output type - * of the query, so you can't add a column that doesn't exist, or change a column's - * type to something that doesn't exist in its union type. - * - * ### Examples - * - * Turn this code: - * - * ```ts - * import type { Person } from 'type-editor' // imaginary module - * - * const person = await db.selectFrom('person') - * .where('nullable_column', 'is not', null) - * .selectAll() - * .executeTakeFirstOrThrow() - * - * if (isWithNoNullValue(person)) { - * functionThatExpectsPersonWithNonNullValue(person) - * } - * - * function isWithNoNullValue(person: Person): person is Person & { nullable_column: string } { - * return person.nullable_column != null - * } - * ``` - * - * Into this: - * - * ```ts - * import type { NotNull } from 'kysely' - * - * const person = await db.selectFrom('person') - * .where('nullable_column', 'is not', null) - * .selectAll() - * .$narrowType<{ nullable_column: NotNull }>() - * .executeTakeFirstOrThrow() - * - * functionThatExpectsPersonWithNonNullValue(person) - * ``` - * - * Giving the explicit narrowed type (`string` in the example above) works fine for - * simple types. If the type is complex, for example a JSON column or a subquery, - * you can use the special `NotNull` type to make the column not null. - * - * ```ts - * import { NotNull } from 'kysely' - * - * const person = await db.selectFrom('person') - * .where('nullable_column', 'is not', null) - * .selectAll() - * .$narrowType<{ nullable_column: NotNull }>() - * .executeTakeFirstOrThrow() - * - * functionThatExpectsPersonWithNonNullValue(person) - * ``` - */ - $narrowType(): SelectQueryBuilder>; - /** - * Asserts that query's output row type equals the given type `T`. - * - * This method can be used to simplify excessively complex types to make TypeScript happy - * and much faster. - * - * Kysely uses complex type magic to achieve its type safety. This complexity is sometimes too much - * for TypeScript and you get errors like this: - * - * ``` - * error TS2589: Type instantiation is excessively deep and possibly infinite. - * ``` - * - * In these case you can often use this method to help TypeScript a little bit. When you use this - * method to assert the output type of a query, Kysely can drop the complex output type that - * consists of multiple nested helper types and replace it with the simple asserted type. - * - * Using this method doesn't reduce type safety at all. You have to pass in a type that is - * structurally equal to the current type. - * - * ### Examples - * - * ```ts - * const result = await db - * .with('first_and_last', (qb) => qb - * .selectFrom('person') - * .select(['first_name', 'last_name']) - * .$assertType<{ first_name: string, last_name: string | null }>() - * ) - * .with('age', (qb) => qb - * .selectFrom('person') - * .select('age') - * .$assertType<{ age: number | null }>() - * ) - * .selectFrom(['first_and_last', 'age']) - * .selectAll() - * .executeTakeFirstOrThrow() - * ``` - */ - $assertType(): O extends T ? SelectQueryBuilder : KyselyTypeError<`$assertType() call failed: The type passed in is not equal to the output type of the query.`>; - /** - * Returns a copy of this SelectQueryBuilder instance with the given plugin installed. - */ - withPlugin(plugin: KyselyPlugin): SelectQueryBuilder; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - * - * ### Examples - * - * If you are creating a custom expression, it's often easiest to use the {@link sql} - * template tag to build the node: - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - */ - toOperationNode(): SelectQueryNode; - compile(): CompiledQuery>; - /** - * Executes the query and returns an array of rows. - * - * Also see the {@link executeTakeFirst} and {@link executeTakeFirstOrThrow} methods. - */ - execute(): Promise[]>; - /** - * Executes the query and returns the first result or undefined if - * the query returned no result. - */ - executeTakeFirst(): Promise>; - /** - * Executes the query and returns the first result or throws if - * the query returned no result. - * - * By default an instance of {@link NoResultError} is thrown, but you can - * provide a custom error class, or callback to throw a different - * error. - */ - executeTakeFirstOrThrow(errorConstructor?: NoResultErrorConstructor | ((node: QueryNode) => Error)): Promise>; - /** - * Executes the query and streams the rows. - * - * The optional argument `chunkSize` defines how many rows to fetch from the database - * at a time. It only affects some dialects like PostgreSQL that support it. - * - * ### Examples - * - * ```ts - * const stream = db - * .selectFrom('person') - * .select(['first_name', 'last_name']) - * .where('gender', '=', 'other') - * .stream() - * - * for await (const person of stream) { - * console.log(person.first_name) - * - * if (person.last_name === 'Something') { - * // Breaking or returning before the stream has ended will release - * // the database connection and invalidate the stream. - * break - * } - * } - * ``` - */ - stream(chunkSize?: number): AsyncIterableIterator; - /** - * Executes query with `explain` statement before the main query. - * - * ```ts - * const explained = await db - * .selectFrom('person') - * .where('gender', '=', 'female') - * .selectAll() - * .explain('json') - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * explain format=json select * from `person` where `gender` = ? - * ``` - * - * You can also execute `explain analyze` statements. - * - * ```ts - * import { sql } from 'kysely' - * - * const explained = await db - * .selectFrom('person') - * .where('gender', '=', 'female') - * .selectAll() - * .explain('json', sql`analyze`) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * explain (analyze, format json) select * from "person" where "gender" = $1 - * ``` - */ - explain = Record>(format?: ExplainFormat, options?: Expression): Promise; -} -export declare function createSelectQueryBuilder(props: SelectQueryBuilderProps): SelectQueryBuilder; -export interface SelectQueryBuilderProps { - readonly queryId: QueryId; - readonly queryNode: SelectQueryNode; - readonly executor: QueryExecutor; -} -export interface AliasedSelectQueryBuilder extends AliasedExpression { - get isAliasedSelectQueryBuilder(): true; -} -export type SelectQueryBuilderWithInnerJoin> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? InnerJoinedBuilder : never : TE extends keyof DB ? SelectQueryBuilder : TE extends AliasedExpression ? InnerJoinedBuilder : TE extends (qb: any) => AliasedExpression ? InnerJoinedBuilder : never; -type InnerJoinedBuilder = A extends keyof DB ? SelectQueryBuilder, TB | A, O> : SelectQueryBuilder, TB | A, O>; -type InnerJoinedDB = DrainOuterGeneric<{ - [C in keyof DB | A]: C extends A ? R : C extends keyof DB ? DB[C] : never; -}>; -export type SelectQueryBuilderWithLeftJoin> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? LeftJoinedBuilder : never : TE extends keyof DB ? LeftJoinedBuilder : TE extends AliasedExpression ? LeftJoinedBuilder : TE extends (qb: any) => AliasedExpression ? LeftJoinedBuilder : never; -type LeftJoinedBuilder = A extends keyof DB ? SelectQueryBuilder, TB | A, O> : SelectQueryBuilder>, TB | A, O>; -type LeftJoinedDB = DrainOuterGeneric<{ - [C in keyof DB | A]: C extends A ? Nullable : C extends keyof DB ? DB[C] : never; -}>; -export type SelectQueryBuilderWithRightJoin> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? RightJoinedBuilder : never : TE extends keyof DB ? RightJoinedBuilder : TE extends AliasedExpression ? RightJoinedBuilder : TE extends (qb: any) => AliasedExpression ? RightJoinedBuilder : never; -type RightJoinedBuilder = SelectQueryBuilder, TB | A, O>; -type RightJoinedDB = DrainOuterGeneric<{ - [C in keyof DB | A]: C extends A ? R : C extends TB ? Nullable : C extends keyof DB ? DB[C] : never; -}>; -export type SelectQueryBuilderWithFullJoin> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? OuterJoinedBuilder : never : TE extends keyof DB ? OuterJoinedBuilder : TE extends AliasedExpression ? OuterJoinedBuilder : TE extends (qb: any) => AliasedExpression ? OuterJoinedBuilder : never; -type OuterJoinedBuilder = SelectQueryBuilder, TB | A, O>; -type OuterJoinedBuilderDB = DrainOuterGeneric<{ - [C in keyof DB | A]: C extends A ? Nullable : C extends TB ? Nullable : C extends keyof DB ? DB[C] : never; -}>; -type TableOrList = (TB & string) | ReadonlyArray; -export {}; diff --git a/node_modules/kysely/dist/esm/query-builder/select-query-builder.js b/node_modules/kysely/dist/esm/query-builder/select-query-builder.js deleted file mode 100644 index 62994d9..0000000 --- a/node_modules/kysely/dist/esm/query-builder/select-query-builder.js +++ /dev/null @@ -1,374 +0,0 @@ -/// -import { AliasNode } from '../operation-node/alias-node.js'; -import { SelectModifierNode } from '../operation-node/select-modifier-node.js'; -import { parseJoin, } from '../parser/join-parser.js'; -import { parseTable } from '../parser/table-parser.js'; -import { parseSelectArg, parseSelectAll, } from '../parser/select-parser.js'; -import { parseReferenceExpressionOrList, } from '../parser/reference-parser.js'; -import { SelectQueryNode } from '../operation-node/select-query-node.js'; -import { QueryNode } from '../operation-node/query-node.js'; -import { parseOrderBy, } from '../parser/order-by-parser.js'; -import { LimitNode } from '../operation-node/limit-node.js'; -import { OffsetNode } from '../operation-node/offset-node.js'; -import { asArray, freeze } from '../util/object-utils.js'; -import { parseGroupBy } from '../parser/group-by-parser.js'; -import { isNoResultErrorConstructor, NoResultError, } from './no-result-error.js'; -import { IdentifierNode } from '../operation-node/identifier-node.js'; -import { parseSetOperations, } from '../parser/set-operation-parser.js'; -import { parseValueBinaryOperationOrExpression, parseReferentialBinaryOperation, } from '../parser/binary-operation-parser.js'; -import { ExpressionWrapper } from '../expression/expression-wrapper.js'; -import { parseValueExpression, } from '../parser/value-parser.js'; -import { parseFetch } from '../parser/fetch-parser.js'; -import { parseTop } from '../parser/top-parser.js'; -class SelectQueryBuilderImpl { - #props; - constructor(props) { - this.#props = freeze(props); - } - get expressionType() { - return undefined; - } - get isSelectQueryBuilder() { - return true; - } - where(...args) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: QueryNode.cloneWithWhere(this.#props.queryNode, parseValueBinaryOperationOrExpression(args)), - }); - } - whereRef(lhs, op, rhs) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: QueryNode.cloneWithWhere(this.#props.queryNode, parseReferentialBinaryOperation(lhs, op, rhs)), - }); - } - having(...args) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: SelectQueryNode.cloneWithHaving(this.#props.queryNode, parseValueBinaryOperationOrExpression(args)), - }); - } - havingRef(lhs, op, rhs) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: SelectQueryNode.cloneWithHaving(this.#props.queryNode, parseReferentialBinaryOperation(lhs, op, rhs)), - }); - } - select(selection) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: SelectQueryNode.cloneWithSelections(this.#props.queryNode, parseSelectArg(selection)), - }); - } - distinctOn(selection) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: SelectQueryNode.cloneWithDistinctOn(this.#props.queryNode, parseReferenceExpressionOrList(selection)), - }); - } - modifyFront(modifier) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: SelectQueryNode.cloneWithFrontModifier(this.#props.queryNode, SelectModifierNode.createWithExpression(modifier.toOperationNode())), - }); - } - modifyEnd(modifier) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: QueryNode.cloneWithEndModifier(this.#props.queryNode, SelectModifierNode.createWithExpression(modifier.toOperationNode())), - }); - } - distinct() { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: SelectQueryNode.cloneWithFrontModifier(this.#props.queryNode, SelectModifierNode.create('Distinct')), - }); - } - forUpdate(of) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: QueryNode.cloneWithEndModifier(this.#props.queryNode, SelectModifierNode.create('ForUpdate', of ? asArray(of).map(parseTable) : undefined)), - }); - } - forShare(of) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: QueryNode.cloneWithEndModifier(this.#props.queryNode, SelectModifierNode.create('ForShare', of ? asArray(of).map(parseTable) : undefined)), - }); - } - forKeyShare(of) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: QueryNode.cloneWithEndModifier(this.#props.queryNode, SelectModifierNode.create('ForKeyShare', of ? asArray(of).map(parseTable) : undefined)), - }); - } - forNoKeyUpdate(of) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: QueryNode.cloneWithEndModifier(this.#props.queryNode, SelectModifierNode.create('ForNoKeyUpdate', of ? asArray(of).map(parseTable) : undefined)), - }); - } - skipLocked() { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: QueryNode.cloneWithEndModifier(this.#props.queryNode, SelectModifierNode.create('SkipLocked')), - }); - } - noWait() { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: QueryNode.cloneWithEndModifier(this.#props.queryNode, SelectModifierNode.create('NoWait')), - }); - } - selectAll(table) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: SelectQueryNode.cloneWithSelections(this.#props.queryNode, parseSelectAll(table)), - }); - } - innerJoin(...args) { - return this.#join('InnerJoin', args); - } - leftJoin(...args) { - return this.#join('LeftJoin', args); - } - rightJoin(...args) { - return this.#join('RightJoin', args); - } - fullJoin(...args) { - return this.#join('FullJoin', args); - } - crossJoin(...args) { - return this.#join('CrossJoin', args); - } - innerJoinLateral(...args) { - return this.#join('LateralInnerJoin', args); - } - leftJoinLateral(...args) { - return this.#join('LateralLeftJoin', args); - } - crossJoinLateral(...args) { - return this.#join('LateralCrossJoin', args); - } - crossApply(...args) { - return this.#join('CrossApply', args); - } - outerApply(...args) { - return this.#join('OuterApply', args); - } - #join(joinType, args) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: QueryNode.cloneWithJoin(this.#props.queryNode, parseJoin(joinType, args)), - }); - } - orderBy(...args) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: QueryNode.cloneWithOrderByItems(this.#props.queryNode, parseOrderBy(args)), - }); - } - groupBy(groupBy) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: SelectQueryNode.cloneWithGroupByItems(this.#props.queryNode, parseGroupBy(groupBy)), - }); - } - limit(limit) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: SelectQueryNode.cloneWithLimit(this.#props.queryNode, LimitNode.create(parseValueExpression(limit))), - }); - } - offset(offset) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: SelectQueryNode.cloneWithOffset(this.#props.queryNode, OffsetNode.create(parseValueExpression(offset))), - }); - } - fetch(rowCount, modifier = 'only') { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: SelectQueryNode.cloneWithFetch(this.#props.queryNode, parseFetch(rowCount, modifier)), - }); - } - top(expression, modifiers) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: QueryNode.cloneWithTop(this.#props.queryNode, parseTop(expression, modifiers)), - }); - } - union(expression) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: SelectQueryNode.cloneWithSetOperations(this.#props.queryNode, parseSetOperations('union', expression, false)), - }); - } - unionAll(expression) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: SelectQueryNode.cloneWithSetOperations(this.#props.queryNode, parseSetOperations('union', expression, true)), - }); - } - intersect(expression) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: SelectQueryNode.cloneWithSetOperations(this.#props.queryNode, parseSetOperations('intersect', expression, false)), - }); - } - intersectAll(expression) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: SelectQueryNode.cloneWithSetOperations(this.#props.queryNode, parseSetOperations('intersect', expression, true)), - }); - } - except(expression) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: SelectQueryNode.cloneWithSetOperations(this.#props.queryNode, parseSetOperations('except', expression, false)), - }); - } - exceptAll(expression) { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: SelectQueryNode.cloneWithSetOperations(this.#props.queryNode, parseSetOperations('except', expression, true)), - }); - } - as(alias) { - return new AliasedSelectQueryBuilderImpl(this, alias); - } - clearSelect() { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: SelectQueryNode.cloneWithoutSelections(this.#props.queryNode), - }); - } - clearWhere() { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: QueryNode.cloneWithoutWhere(this.#props.queryNode), - }); - } - clearLimit() { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: SelectQueryNode.cloneWithoutLimit(this.#props.queryNode), - }); - } - clearOffset() { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: SelectQueryNode.cloneWithoutOffset(this.#props.queryNode), - }); - } - clearOrderBy() { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: QueryNode.cloneWithoutOrderBy(this.#props.queryNode), - }); - } - clearGroupBy() { - return new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: SelectQueryNode.cloneWithoutGroupBy(this.#props.queryNode), - }); - } - $call(func) { - return func(this); - } - $if(condition, func) { - if (condition) { - return func(this); - } - return new SelectQueryBuilderImpl({ - ...this.#props, - }); - } - $castTo() { - return new SelectQueryBuilderImpl(this.#props); - } - $narrowType() { - return new SelectQueryBuilderImpl(this.#props); - } - $assertType() { - return new SelectQueryBuilderImpl(this.#props); - } - $asTuple() { - return new ExpressionWrapper(this.toOperationNode()); - } - $asScalar() { - return new ExpressionWrapper(this.toOperationNode()); - } - withPlugin(plugin) { - return new SelectQueryBuilderImpl({ - ...this.#props, - executor: this.#props.executor.withPlugin(plugin), - }); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.queryNode, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - const compiledQuery = this.compile(); - const result = await this.#props.executor.executeQuery(compiledQuery); - return result.rows; - } - async executeTakeFirst() { - const [result] = await this.execute(); - return result; - } - async executeTakeFirstOrThrow(errorConstructor = NoResultError) { - const result = await this.executeTakeFirst(); - if (result === undefined) { - const error = isNoResultErrorConstructor(errorConstructor) - ? new errorConstructor(this.toOperationNode()) - : errorConstructor(this.toOperationNode()); - throw error; - } - return result; - } - async *stream(chunkSize = 100) { - const compiledQuery = this.compile(); - const stream = this.#props.executor.stream(compiledQuery, chunkSize); - for await (const item of stream) { - yield* item.rows; - } - } - async explain(format, options) { - const builder = new SelectQueryBuilderImpl({ - ...this.#props, - queryNode: QueryNode.cloneWithExplain(this.#props.queryNode, format, options), - }); - return await builder.execute(); - } -} -export function createSelectQueryBuilder(props) { - return new SelectQueryBuilderImpl(props); -} -/** - * {@link SelectQueryBuilder} with an alias. The result of calling {@link SelectQueryBuilder.as}. - */ -class AliasedSelectQueryBuilderImpl { - #queryBuilder; - #alias; - constructor(queryBuilder, alias) { - this.#queryBuilder = queryBuilder; - this.#alias = alias; - } - get expression() { - return this.#queryBuilder; - } - get alias() { - return this.#alias; - } - get isAliasedSelectQueryBuilder() { - return true; - } - toOperationNode() { - return AliasNode.create(this.#queryBuilder.toOperationNode(), IdentifierNode.create(this.#alias)); - } -} diff --git a/node_modules/kysely/dist/esm/query-builder/update-query-builder.d.ts b/node_modules/kysely/dist/esm/query-builder/update-query-builder.d.ts deleted file mode 100644 index 0c6b25e..0000000 --- a/node_modules/kysely/dist/esm/query-builder/update-query-builder.d.ts +++ /dev/null @@ -1,1392 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import { type JoinCallbackExpression, type JoinReferenceExpression } from '../parser/join-parser.js'; -import { type TableExpression, type From, type FromTables } from '../parser/table-parser.js'; -import { type SelectExpression, type SelectCallback } from '../parser/select-parser.js'; -import type { ReturningAllRow, ReturningCallbackRow, ReturningRow } from '../parser/returning-parser.js'; -import type { ReferenceExpression } from '../parser/reference-parser.js'; -import { QueryNode } from '../operation-node/query-node.js'; -import type { DrainOuterGeneric, NarrowPartial, Nullable, ShallowRecord, SimplifyResult, SimplifySingleResult, SqlBool } from '../util/type-utils.js'; -import { UpdateQueryNode } from '../operation-node/update-query-node.js'; -import { type UpdateObjectExpression, type ExtractUpdateTypeFromReferenceExpression } from '../parser/update-set-parser.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -import { UpdateResult } from './update-result.js'; -import type { KyselyPlugin } from '../plugin/kysely-plugin.js'; -import type { WhereInterface } from './where-interface.js'; -import type { MultiTableReturningInterface } from './returning-interface.js'; -import { type NoResultErrorConstructor } from './no-result-error.js'; -import type { Explainable, ExplainFormat } from '../util/explainable.js'; -import type { AliasedExpression, Expression } from '../expression/expression.js'; -import { type ComparisonOperatorExpression, type OperandValueExpressionOrList } from '../parser/binary-operation-parser.js'; -import type { KyselyTypeError } from '../util/type-error.js'; -import type { Streamable } from '../util/streamable.js'; -import type { ExpressionOrFactory } from '../parser/expression-parser.js'; -import { type ValueExpression } from '../parser/value-parser.js'; -import type { OutputCallback, OutputExpression, OutputInterface, OutputPrefix, SelectExpressionFromOutputCallback, SelectExpressionFromOutputExpression } from './output-interface.js'; -import type { OrderByInterface } from './order-by-interface.js'; -import { type DirectedOrderByStringReference, type OrderByExpression, type OrderByModifiers } from '../parser/order-by-parser.js'; -export declare class UpdateQueryBuilder implements WhereInterface, MultiTableReturningInterface, OutputInterface, OrderByInterface, OperationNodeSource, Compilable, Explainable, Streamable { - #private; - constructor(props: UpdateQueryBuilderProps); - /** - * Adds a `where` expression to the query. - * - * Calling this method multiple times will combine the expressions using `and`. - * - * Also see {@link whereRef} - * - * ### Examples - * - * - * - * `where` method calls are combined with `AND`: - * - * ```ts - * const person = await db - * .selectFrom('person') - * .selectAll() - * .where('first_name', '=', 'Jennifer') - * .where('age', '>', 40) - * .executeTakeFirst() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "first_name" = $1 and "age" > $2 - * ``` - * - * Operator can be any supported operator or if the typings don't support it - * you can always use: - * - * ```ts - * import { sql } from 'kysely' - * - * sql`your operator` - * ``` - * - * - * - * Find multiple items using a list of identifiers: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where('id', 'in', [1, 2, 3]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "id" in ($1, $2, $3) - * ``` - * - * - * - * You can use the `and` function to create a simple equality - * filter using an object - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where((eb) => eb.and({ - * first_name: 'Jennifer', - * last_name: eb.ref('first_name') - * })) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * "first_name" = $1 - * and "last_name" = "first_name" - * ) - * ``` - * - * - * - * To combine conditions using `OR`, you can use the expression builder. - * There are two ways to create `OR` expressions. Both are shown in this - * example: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * // 1. Using the `or` method on the expression builder: - * .where((eb) => eb.or([ - * eb('first_name', '=', 'Jennifer'), - * eb('first_name', '=', 'Sylvester') - * ])) - * // 2. Chaining expressions using the `or` method on the - * // created expressions: - * .where((eb) => - * eb('last_name', '=', 'Aniston').or('last_name', '=', 'Stallone') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * ("first_name" = $1 or "first_name" = $2) - * and - * ("last_name" = $3 or "last_name" = $4) - * ) - * ``` - * - * - * - * You can add expressions conditionally like this: - * - * ```ts - * import { Expression, SqlBool } from 'kysely' - * - * const firstName: string | undefined = 'Jennifer' - * const lastName: string | undefined = 'Aniston' - * const under18 = true - * const over60 = true - * - * let query = db - * .selectFrom('person') - * .selectAll() - * - * if (firstName) { - * // The query builder is immutable. Remember to reassign - * // the result back to the query variable. - * query = query.where('first_name', '=', firstName) - * } - * - * if (lastName) { - * query = query.where('last_name', '=', lastName) - * } - * - * if (under18 || over60) { - * // Conditional OR expressions can be added like this. - * query = query.where((eb) => { - * const ors: Expression[] = [] - * - * if (under18) { - * ors.push(eb('age', '<', 18)) - * } - * - * if (over60) { - * ors.push(eb('age', '>', 60)) - * } - * - * return eb.or(ors) - * }) - * } - * - * const persons = await query.execute() - * ``` - * - * Both the first and third argument can also be arbitrary expressions like - * subqueries. An expression can defined by passing a function and calling - * the methods of the {@link ExpressionBuilder} passed to the callback: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where( - * (qb) => qb.selectFrom('pet') - * .select('pet.name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1), - * '=', - * 'Fluffy' - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * select "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) = $2 - * ``` - * - * A `where in` query can be built by using the `in` operator and an array - * of values. The values in the array can also be expressions: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where('person.id', 'in', [100, 200, 300]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "id" in ($1, $2, $3) - * ``` - * - * - * - * For complex `where` expressions you can pass in a single callback and - * use the `ExpressionBuilder` to build your expression: - * - * ```ts - * const firstName = 'Jennifer' - * const maxAge = 60 - * - * const persons = await db - * .selectFrom('person') - * .selectAll('person') - * .where(({ eb, or, and, not, exists, selectFrom }) => and([ - * or([ - * eb('first_name', '=', firstName), - * eb('age', '<', maxAge) - * ]), - * not(exists( - * selectFrom('pet') - * .select('pet.id') - * .whereRef('pet.owner_id', '=', 'person.id') - * )) - * ])) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where ( - * ( - * "first_name" = $1 - * or "age" < $2 - * ) - * and not exists ( - * select "pet"."id" from "pet" where "pet"."owner_id" = "person"."id" - * ) - * ) - * ``` - * - * If everything else fails, you can always use the {@link sql} tag - * as any of the arguments, including the operator: - * - * ```ts - * import { sql } from 'kysely' - * - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where( - * sql`coalesce(first_name, last_name)`, - * 'like', - * '%' + name + '%', - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * where coalesce(first_name, last_name) like $1 - * ``` - * - * In all examples above the columns were known at compile time - * (except for the raw {@link sql} expressions). By default kysely only - * allows you to refer to columns that exist in the database **and** - * can be referred to in the current query and context. - * - * Sometimes you may want to refer to columns that come from the user - * input and thus are not available at compile time. - * - * You have two options, the {@link sql} tag or `db.dynamic`. The example below - * uses both: - * - * ```ts - * import { sql } from 'kysely' - * const { ref } = db.dynamic - * - * const columnFromUserInput: string = 'id' - * - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where(ref(columnFromUserInput), '=', 1) - * .where(sql.id(columnFromUserInput), '=', 2) - * .execute() - * ``` - */ - where, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): UpdateQueryBuilder; - where>(expression: E): UpdateQueryBuilder; - /** - * Adds a `where` clause where both sides of the operator are references - * to columns. - * - * The normal `where` method treats the right hand side argument as a - * value by default. `whereRef` treats it as a column reference. This method is - * expecially useful with joins and correlated subqueries. - * - * ### Examples - * - * Usage with a join: - * - * ```ts - * db.selectFrom(['person', 'pet']) - * .selectAll() - * .whereRef('person.first_name', '=', 'pet.name') - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person", "pet" where "person"."first_name" = "pet"."name" - * ``` - * - * Usage in a subquery: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll('person') - * .select((eb) => eb - * .selectFrom('pet') - * .select('name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1) - * .as('pet_name') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".*, ( - * select "name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) as "pet_name" - * from "person" - */ - whereRef, RRE extends ReferenceExpression>(lhs: LRE, op: ComparisonOperatorExpression, rhs: RRE): UpdateQueryBuilder; - /** - * Clears all where expressions from the query. - * - * ### Examples - * - * ```ts - * db.selectFrom('person') - * .selectAll() - * .where('id','=',42) - * .clearWhere() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearWhere(): UpdateQueryBuilder; - /** - * Changes an `update` query into a `update top` query. - * - * `top` clause is only supported by some dialects like MS SQL Server. - * - * ### Examples - * - * Update the first row: - * - * ```ts - * await db.updateTable('person') - * .top(1) - * .set({ first_name: 'Foo' }) - * .where('age', '>', 18) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * update top(1) "person" set "first_name" = @1 where "age" > @2 - * ``` - * - * Update the 50% first rows: - * - * ```ts - * await db.updateTable('person') - * .top(50, 'percent') - * .set({ first_name: 'Foo' }) - * .where('age', '>', 18) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * update top(50) percent "person" set "first_name" = @1 where "age" > @2 - * ``` - */ - top(expression: number | bigint, modifiers?: 'percent'): UpdateQueryBuilder; - /** - * Adds a from clause to the update query. - * - * This is supported only on some databases like PostgreSQL. - * - * The API is the same as {@link QueryCreator.selectFrom}. - * - * ### Examples - * - * ```ts - * db.updateTable('person') - * .from('pet') - * .set((eb) => ({ - * first_name: eb.ref('pet.name') - * })) - * .whereRef('pet.owner_id', '=', 'person.id') - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * update "person" - * set "first_name" = "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * ``` - */ - from>(table: TE): UpdateQueryBuilder, UT, FromTables, O>; - from>(table: TE[]): UpdateQueryBuilder, UT, FromTables, O>; - /** - * Joins another table to the query using an inner join. - * - * ### Examples - * - * Simple usage by providing a table name and two columns to join: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * // `select` needs to come after the call to `innerJoin` so - * // that you can select from the joined table. - * .select(['person.id', 'pet.name']) - * .execute() - * - * result[0].id - * result[0].name - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."id", "pet"."name" - * from "person" - * inner join "pet" - * on "pet"."owner_id" = "person"."id" - * ``` - * - * You can give an alias for the joined table like this: - * - * ```ts - * await db.selectFrom('person') - * .innerJoin('pet as p', 'p.owner_id', 'person.id') - * .where('p.name', '=', 'Doggo') - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * inner join "pet" as "p" - * on "p"."owner_id" = "person"."id" - * where "p".name" = $1 - * ``` - * - * You can provide a function as the second argument to get a join - * builder for creating more complex joins. The join builder has a - * bunch of `on*` methods for building the `on` clause of the join. - * There's basically an equivalent for every `where` method - * (`on`, `onRef`, `onExists` etc.). You can do all the same things - * with the `on` method that you can with the corresponding `where` - * method. See the `where` method documentation for more examples. - * - * ```ts - * await db.selectFrom('person') - * .innerJoin( - * 'pet', - * (join) => join - * .onRef('pet.owner_id', '=', 'person.id') - * .on('pet.name', '=', 'Doggo') - * ) - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * inner join "pet" - * on "pet"."owner_id" = "person"."id" - * and "pet"."name" = $1 - * ``` - * - * You can join a subquery by providing a select query (or a callback) - * as the first argument: - * - * ```ts - * await db.selectFrom('person') - * .innerJoin( - * db.selectFrom('pet') - * .select(['owner_id', 'name']) - * .where('name', '=', 'Doggo') - * .as('doggos'), - * 'doggos.owner_id', - * 'person.id', - * ) - * .selectAll() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * inner join ( - * select "owner_id", "name" - * from "pet" - * where "name" = $1 - * ) as "doggos" - * on "doggos"."owner_id" = "person"."id" - * ``` - */ - innerJoin, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): UpdateQueryBuilderWithInnerJoin; - innerJoin, FN extends JoinCallbackExpression>(table: TE, callback: FN): UpdateQueryBuilderWithInnerJoin; - /** - * Just like {@link innerJoin} but adds a left join instead of an inner join. - */ - leftJoin, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): UpdateQueryBuilderWithLeftJoin; - leftJoin, FN extends JoinCallbackExpression>(table: TE, callback: FN): UpdateQueryBuilderWithLeftJoin; - /** - * Just like {@link innerJoin} but adds a right join instead of an inner join. - */ - rightJoin, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): UpdateQueryBuilderWithRightJoin; - rightJoin, FN extends JoinCallbackExpression>(table: TE, callback: FN): UpdateQueryBuilderWithRightJoin; - /** - * Just like {@link innerJoin} but adds a full join instead of an inner join. - */ - fullJoin, K1 extends JoinReferenceExpression, K2 extends JoinReferenceExpression>(table: TE, k1: K1, k2: K2): UpdateQueryBuilderWithFullJoin; - fullJoin, FN extends JoinCallbackExpression>(table: TE, callback: FN): UpdateQueryBuilderWithFullJoin; - /** - * @description This is only supported by some dialects like MySQL or SQLite with `SQLITE_ENABLE_UPDATE_DELETE_LIMIT`. - */ - orderBy>(expr: OE, modifiers?: OrderByModifiers): UpdateQueryBuilder; - /** - * @description This is only supported by some dialects like MySQL or SQLite with `SQLITE_ENABLE_UPDATE_DELETE_LIMIT`. - * @deprecated It does ~2-2.6x more compile-time instantiations compared to multiple chained `orderBy(expr, modifiers?)` calls (in `order by` clauses with reasonable item counts), and has broken autocompletion. - */ - orderBy | DirectedOrderByStringReference>(exprs: ReadonlyArray): UpdateQueryBuilder; - /** - * @description This is only supported by some dialects like MySQL or SQLite with `SQLITE_ENABLE_UPDATE_DELETE_LIMIT`. - * @deprecated It does ~2.9x more compile-time instantiations compared to a `orderBy(expr, direction)` call. - */ - orderBy>(expr: OE): UpdateQueryBuilder; - /** - * @description This is only supported by some dialects like MySQL or SQLite with `SQLITE_ENABLE_UPDATE_DELETE_LIMIT`. - * @deprecated Use `orderBy(expr, (ob) => ...)` instead. - */ - orderBy>(expr: OE, modifiers: Expression): UpdateQueryBuilder; - /** - * Clears the `order by` clause from the query. - * - * See {@link orderBy} for adding an `order by` clause or item to a query. - * - * ### Examples - * - * ```ts - * const query = db - * .selectFrom('person') - * .selectAll() - * .orderBy('id', 'desc') - * - * const results = await query - * .clearOrderBy() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearOrderBy(): UpdateQueryBuilder; - /** - * Adds a limit clause to the update query for supported databases, such as MySQL. - * - * ### Examples - * - * Update the first 2 rows in the 'person' table: - * - * ```ts - * await db - * .updateTable('person') - * .set({ first_name: 'Foo' }) - * .limit(2) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * update `person` set `first_name` = ? limit ? - * ``` - */ - limit(limit: ValueExpression): UpdateQueryBuilder; - /** - * Sets the values to update for an {@link Kysely.updateTable | update} query. - * - * This method takes an object whose keys are column names and values are - * values to update. In addition to the column's type, the values can be - * any expressions such as raw {@link sql} snippets or select queries. - * - * This method also accepts a callback that returns the update object. The - * callback takes an instance of {@link ExpressionBuilder} as its only argument. - * The expression builder can be used to create arbitrary update expressions. - * - * The return value of an update query is an instance of {@link UpdateResult}. - * You can use the {@link returning} method on supported databases to get out - * the updated rows. - * - * ### Examples - * - * - * - * Update a row in `person` table: - * - * ```ts - * const result = await db - * .updateTable('person') - * .set({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .where('id', '=', 1) - * .executeTakeFirst() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * update "person" set "first_name" = $1, "last_name" = $2 where "id" = $3 - * ``` - * - * - * - * As always, you can provide a callback to the `set` method to get access - * to an expression builder: - * - * ```ts - * const result = await db - * .updateTable('person') - * .set((eb) => ({ - * age: eb('age', '+', 1), - * first_name: eb.selectFrom('pet').select('name').limit(1), - * last_name: 'updated', - * })) - * .where('id', '=', 1) - * .executeTakeFirst() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * update "person" - * set - * "first_name" = (select "name" from "pet" limit $1), - * "age" = "age" + $2, - * "last_name" = $3 - * where - * "id" = $4 - * ``` - * - * If you provide two arguments the first one is interpreted as the column - * (or other target) and the second as the value: - * - * ```ts - * import { sql } from 'kysely' - * - * const result = await db - * .updateTable('person') - * .set('first_name', 'Foo') - * // As always, both arguments can be arbitrary expressions or - * // callbacks that give you access to an expression builder: - * .set(sql`address['postalCode']`, (eb) => eb.val('61710')) - * .where('id', '=', 1) - * .executeTakeFirst() - * ``` - * - * On PostgreSQL you can chain `returning` to the query to get - * the updated rows' columns (or any other expression) as the - * return value: - * - * ```ts - * const row = await db - * .updateTable('person') - * .set({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .where('id', '=', 1) - * .returning('id') - * .executeTakeFirstOrThrow() - * - * row.id - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * update "person" set "first_name" = $1, "last_name" = $2 where "id" = $3 returning "id" - * ``` - * - * In addition to primitives, the values can arbitrary expressions including - * raw `sql` snippets or subqueries: - * - * ```ts - * import { sql } from 'kysely' - * - * const result = await db - * .updateTable('person') - * .set(({ selectFrom, ref, fn, eb }) => ({ - * first_name: selectFrom('person').select('first_name').limit(1), - * middle_name: ref('first_name'), - * age: eb('age', '+', 1), - * last_name: sql`${'Ani'} || ${'ston'}`, - * })) - * .where('id', '=', 1) - * .executeTakeFirst() - * - * console.log(result.numUpdatedRows) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * update "person" set - * "first_name" = (select "first_name" from "person" limit $1), - * "middle_name" = "first_name", - * "age" = "age" + $2, - * "last_name" = $3 || $4 - * where "id" = $5 - * ``` - * - * - * - * MySQL allows you to join tables directly to the "main" table and update - * rows of all joined tables. This is possible by passing all tables to the - * `updateTable` method as a list and adding the `ON` conditions as `WHERE` - * statements. You can then use the `set(column, value)` variant to update - * columns using table qualified names. - * - * The `UpdateQueryBuilder` also has `innerJoin` etc. join methods, but those - * can only be used as part of a PostgreSQL `update set from join` query. - * Due to type complexity issues, we unfortunately can't make the same - * methods work in both cases. - * - * ```ts - * const result = await db - * .updateTable(['person', 'pet']) - * .set('person.first_name', 'Updated person') - * .set('pet.name', 'Updated doggo') - * .whereRef('person.id', '=', 'pet.owner_id') - * .where('person.id', '=', 1) - * .executeTakeFirst() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * update - * `person`, - * `pet` - * set - * `person`.`first_name` = ?, - * `pet`.`name` = ? - * where - * `person`.`id` = `pet`.`owner_id` - * and `person`.`id` = ? - * ``` - */ - set(update: UpdateObjectExpression): UpdateQueryBuilder; - set>(key: RE, value: ValueExpression>): UpdateQueryBuilder; - /** - * Allows you to return data from modified rows. - * - * On supported databases like PostgreSQL, this method can be chained to - * `insert`, `update`, `delete` and `merge` queries to return data. - * - * Note that on SQLite you need to give aliases for the expressions to avoid - * [this bug](https://sqlite.org/forum/forumpost/033daf0b32) in SQLite. - * For example `.returning('id as id')`. - * - * Also see the {@link returningAll} method. - * - * ### Examples - * - * Return one column: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * ``` - * - * Return multiple columns: - * - * ```ts - * const { id, last_name } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning(['id', 'last_name']) - * .executeTakeFirstOrThrow() - * ``` - * - * Return arbitrary expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * const { id, full_name, first_pet_id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning((eb) => [ - * 'id as id', - * sql`concat(first_name, ' ', last_name)`.as('full_name'), - * eb.selectFrom('pet').select('pet.id').limit(1).as('first_pet_id') - * ]) - * .executeTakeFirstOrThrow() - * ``` - */ - returning>(selections: ReadonlyArray): UpdateQueryBuilder>; - returning>(callback: CB): UpdateQueryBuilder>; - returning>(selection: SE): UpdateQueryBuilder>; - /** - * Adds a `returning *` or `returning table.*` to an insert/update/delete/merge - * query on databases that support `returning` such as PostgreSQL. - * - * Also see the {@link returning} method. - */ - returningAll(tables: ReadonlyArray): UpdateQueryBuilder>; - returningAll(table: T): UpdateQueryBuilder>; - returningAll(): UpdateQueryBuilder>; - /** - * Allows you to return data from modified rows. - * - * On supported databases like MS SQL Server (MSSQL), this method can be chained - * to `insert`, `update`, `delete` and `merge` queries to return data. - * - * Also see the {@link outputAll} method. - * - * ### Examples - * - * Return one column: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .output('inserted.id') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston', - * gender: 'female', - * }) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name", "gender") - * output "inserted"."id" - * values (@1, @2, @3) - * ``` - * - * Return multiple columns: - * - * ```ts - * const { old_first_name, old_last_name, new_first_name, new_last_name } = await db - * .updateTable('person') - * .set({ first_name: 'John', last_name: 'Doe' }) - * .output([ - * 'deleted.first_name as old_first_name', - * 'deleted.last_name as old_last_name', - * 'inserted.first_name as new_first_name', - * 'inserted.last_name as new_last_name', - * ]) - * .where('created_at', '<', new Date()) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * update "person" - * set "first_name" = @1, "last_name" = @2 - * output "deleted"."first_name" as "old_first_name", - * "deleted"."last_name" as "old_last_name", - * "inserted"."first_name" as "new_first_name", - * "inserted"."last_name" as "new_last_name" - * where "created_at" < @3 - * ``` - * - * Return arbitrary expressions: - * - * ```ts - * import { sql } from 'kysely' - * - * const { full_name } = await db - * .deleteFrom('person') - * .output((eb) => sql`concat(${eb.ref('deleted.first_name')}, ' ', ${eb.ref('deleted.last_name')})`.as('full_name')) - * .where('created_at', '<', new Date()) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * delete from "person" - * output concat("deleted"."first_name", ' ', "deleted"."last_name") as "full_name" - * where "created_at" < @1 - * ``` - * - * Return the action performed on the row: - * - * ```ts - * await db - * .mergeInto('person') - * .using('pet', 'pet.owner_id', 'person.id') - * .whenMatched() - * .thenDelete() - * .whenNotMatched() - * .thenInsertValues({ - * first_name: 'John', - * last_name: 'Doe', - * gender: 'male' - * }) - * .output([ - * 'inserted.id as inserted_id', - * 'deleted.id as deleted_id', - * ]) - * .execute() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * merge into "person" - * using "pet" on "pet"."owner_id" = "person"."id" - * when matched then delete - * when not matched then - * insert ("first_name", "last_name", "gender") - * values (@1, @2, @3) - * output "inserted"."id" as "inserted_id", "deleted"."id" as "deleted_id" - * ``` - * - */ - output>(selections: readonly OE[]): UpdateQueryBuilder>>; - output>(callback: CB): UpdateQueryBuilder>>; - output>(selection: OE): UpdateQueryBuilder>>; - /** - * Adds an `output {prefix}.*` to an `insert`/`update`/`delete`/`merge` query on databases - * that support `output` such as MS SQL Server (MSSQL). - * - * Also see the {@link output} method. - */ - outputAll(table: OutputPrefix): UpdateQueryBuilder>; - /** - * This can be used to add any additional SQL to the end of the query. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.updateTable('person') - * .set({ age: 39 }) - * .where('first_name', '=', 'John') - * .modifyEnd(sql.raw('-- This is a comment')) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * update `person` - * set `age` = 39 - * where `first_name` = "John" -- This is a comment - * ``` - */ - modifyEnd(modifier: Expression): UpdateQueryBuilder; - /** - * Clears all `returning` clauses from the query. - * - * ### Examples - * - * ```ts - * db.updateTable('person') - * .returningAll() - * .set({ age: 39 }) - * .where('first_name', '=', 'John') - * .clearReturning() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * update "person" set "age" = 39 where "first_name" = "John" - * ``` - */ - clearReturning(): UpdateQueryBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - * - * If you want to conditionally call a method on `this`, see - * the {@link $if} method. - * - * ### Examples - * - * The next example uses a helper function `log` to log a query: - * - * ```ts - * import type { Compilable } from 'kysely' - * import type { PersonUpdate } from 'type-editor' // imaginary module - * - * function log(qb: T): T { - * console.log(qb.compile()) - * return qb - * } - * - * const values = { - * first_name: 'John', - * } satisfies PersonUpdate - * - * db.updateTable('person') - * .set(values) - * .$call(log) - * .execute() - * ``` - */ - $call(func: (qb: this) => T): T; - /** - * Call `func(this)` if `condition` is true. - * - * This method is especially handy with optional selects. Any `returning` or `returningAll` - * method calls add columns as optional fields to the output type when called inside - * the `func` callback. This is because we can't know if those selections were actually - * made before running the code. - * - * You can also call any other methods inside the callback. - * - * ### Examples - * - * ```ts - * import type { PersonUpdate } from 'type-editor' // imaginary module - * - * async function updatePerson(id: number, updates: PersonUpdate, returnLastName: boolean) { - * return await db - * .updateTable('person') - * .set(updates) - * .where('id', '=', id) - * .returning(['id', 'first_name']) - * .$if(returnLastName, (qb) => qb.returning('last_name')) - * .executeTakeFirstOrThrow() - * } - * ``` - * - * Any selections added inside the `if` callback will be added as optional fields to the - * output type since we can't know if the selections were actually made before running - * the code. In the example above the return type of the `updatePerson` function is: - * - * ```ts - * Promise<{ - * id: number - * first_name: string - * last_name?: string - * }> - * ``` - */ - $if(condition: boolean, func: (qb: this) => UpdateQueryBuilder): O2 extends UpdateResult ? UpdateQueryBuilder : O2 extends O & infer E ? UpdateQueryBuilder> : UpdateQueryBuilder>; - /** - * Change the output type of the query. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `UpdateQueryBuilder` with a new output type. - */ - $castTo(): UpdateQueryBuilder; - /** - * Narrows (parts of) the output type of the query. - * - * Kysely tries to be as type-safe as possible, but in some cases we have to make - * compromises for better maintainability and compilation performance. At present, - * Kysely doesn't narrow the output type of the query based on {@link set} input - * when using {@link where} and/or {@link returning} or {@link returningAll}. - * - * This utility method is very useful for these situations, as it removes unncessary - * runtime assertion/guard code. Its input type is limited to the output type - * of the query, so you can't add a column that doesn't exist, or change a column's - * type to something that doesn't exist in its union type. - * - * ### Examples - * - * Turn this code: - * - * ```ts - * import type { Person } from 'type-editor' // imaginary module - * - * const id = 1 - * const now = new Date().toISOString() - * - * const person = await db.updateTable('person') - * .set({ deleted_at: now }) - * .where('id', '=', id) - * .where('nullable_column', 'is not', null) - * .returningAll() - * .executeTakeFirstOrThrow() - * - * if (isWithNoNullValue(person)) { - * functionThatExpectsPersonWithNonNullValue(person) - * } - * - * function isWithNoNullValue(person: Person): person is Person & { nullable_column: string } { - * return person.nullable_column != null - * } - * ``` - * - * Into this: - * - * ```ts - * import type { NotNull } from 'kysely' - * - * const id = 1 - * const now = new Date().toISOString() - * - * const person = await db.updateTable('person') - * .set({ deleted_at: now }) - * .where('id', '=', id) - * .where('nullable_column', 'is not', null) - * .returningAll() - * .$narrowType<{ deleted_at: Date; nullable_column: NotNull }>() - * .executeTakeFirstOrThrow() - * - * functionThatExpectsPersonWithNonNullValue(person) - * ``` - */ - $narrowType(): UpdateQueryBuilder>; - /** - * Asserts that query's output row type equals the given type `T`. - * - * This method can be used to simplify excessively complex types to make TypeScript happy - * and much faster. - * - * Kysely uses complex type magic to achieve its type safety. This complexity is sometimes too much - * for TypeScript and you get errors like this: - * - * ``` - * error TS2589: Type instantiation is excessively deep and possibly infinite. - * ``` - * - * In these case you can often use this method to help TypeScript a little bit. When you use this - * method to assert the output type of a query, Kysely can drop the complex output type that - * consists of multiple nested helper types and replace it with the simple asserted type. - * - * Using this method doesn't reduce type safety at all. You have to pass in a type that is - * structurally equal to the current type. - * - * ### Examples - * - * ```ts - * import type { PersonUpdate, PetUpdate, Species } from 'type-editor' // imaginary module - * - * const person = { - * id: 1, - * gender: 'other', - * } satisfies PersonUpdate - * - * const pet = { - * name: 'Fluffy', - * } satisfies PetUpdate - * - * const result = await db - * .with('updated_person', (qb) => qb - * .updateTable('person') - * .set(person) - * .where('id', '=', person.id) - * .returning('first_name') - * .$assertType<{ first_name: string }>() - * ) - * .with('updated_pet', (qb) => qb - * .updateTable('pet') - * .set(pet) - * .where('owner_id', '=', person.id) - * .returning(['name as pet_name', 'species']) - * .$assertType<{ pet_name: string, species: Species }>() - * ) - * .selectFrom(['updated_person', 'updated_pet']) - * .selectAll() - * .executeTakeFirstOrThrow() - * ``` - */ - $assertType(): O extends T ? UpdateQueryBuilder : KyselyTypeError<`$assertType() call failed: The type passed in is not equal to the output type of the query.`>; - /** - * Returns a copy of this UpdateQueryBuilder instance with the given plugin installed. - */ - withPlugin(plugin: KyselyPlugin): UpdateQueryBuilder; - toOperationNode(): UpdateQueryNode; - compile(): CompiledQuery>; - /** - * Executes the query and returns an array of rows. - * - * Also see the {@link executeTakeFirst} and {@link executeTakeFirstOrThrow} methods. - */ - execute(): Promise[]>; - /** - * Executes the query and returns the first result or undefined if - * the query returned no result. - */ - executeTakeFirst(): Promise>; - /** - * Executes the query and returns the first result or throws if - * the query returned no result. - * - * By default an instance of {@link NoResultError} is thrown, but you can - * provide a custom error class, or callback as the only argument to throw a different - * error. - */ - executeTakeFirstOrThrow(errorConstructor?: NoResultErrorConstructor | ((node: QueryNode) => Error)): Promise>; - /** - * Executes the query and streams the rows. - * - * The optional argument `chunkSize` defines how many rows to fetch from the database - * at a time. It only affects some dialects like PostgreSQL that support it. - * - * ### Examples - * - * ```ts - * const stream = db - * .selectFrom('person') - * .select(['first_name', 'last_name']) - * .where('gender', '=', 'other') - * .stream() - * - * for await (const person of stream) { - * console.log(person.first_name) - * - * if (person.last_name === 'Something') { - * // Breaking or returning before the stream has ended will release - * // the database connection and invalidate the stream. - * break - * } - * } - * ``` - */ - stream(chunkSize?: number): AsyncIterableIterator; - /** - * Executes query with `explain` statement before the main query. - * - * ```ts - * const explained = await db - * .selectFrom('person') - * .where('gender', '=', 'female') - * .selectAll() - * .explain('json') - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * explain format=json select * from `person` where `gender` = ? - * ``` - * - * You can also execute `explain analyze` statements. - * - * ```ts - * import { sql } from 'kysely' - * - * const explained = await db - * .selectFrom('person') - * .where('gender', '=', 'female') - * .selectAll() - * .explain('json', sql`analyze`) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * explain (analyze, format json) select * from "person" where "gender" = $1 - * ``` - */ - explain = Record>(format?: ExplainFormat, options?: Expression): Promise; -} -export interface UpdateQueryBuilderProps { - readonly queryId: QueryId; - readonly queryNode: UpdateQueryNode; - readonly executor: QueryExecutor; -} -export type UpdateQueryBuilderWithInnerJoin> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? InnerJoinedBuilder : never : TE extends keyof DB ? UpdateQueryBuilder : TE extends AliasedExpression ? InnerJoinedBuilder : TE extends (qb: any) => AliasedExpression ? InnerJoinedBuilder : never; -type InnerJoinedBuilder = A extends keyof DB ? UpdateQueryBuilder, UT, TB | A, O> : UpdateQueryBuilder, UT, TB | A, O>; -type InnerJoinedDB = DrainOuterGeneric<{ - [C in keyof DB | A]: C extends A ? R : C extends keyof DB ? DB[C] : never; -}>; -export type UpdateQueryBuilderWithLeftJoin> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? LeftJoinedBuilder : never : TE extends keyof DB ? LeftJoinedBuilder : TE extends AliasedExpression ? LeftJoinedBuilder : TE extends (qb: any) => AliasedExpression ? LeftJoinedBuilder : never; -type LeftJoinedBuilder = A extends keyof DB ? UpdateQueryBuilder, UT, TB | A, O> : UpdateQueryBuilder>, UT, TB | A, O>; -type LeftJoinedDB = DrainOuterGeneric<{ - [C in keyof DB | A]: C extends A ? Nullable : C extends keyof DB ? DB[C] : never; -}>; -export type UpdateQueryBuilderWithRightJoin> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? RightJoinedBuilder : never : TE extends keyof DB ? RightJoinedBuilder : TE extends AliasedExpression ? RightJoinedBuilder : TE extends (qb: any) => AliasedExpression ? RightJoinedBuilder : never; -type RightJoinedBuilder = UpdateQueryBuilder, UT, TB | A, O>; -type RightJoinedDB = DrainOuterGeneric<{ - [C in keyof DB | A]: C extends A ? R : C extends TB ? Nullable : C extends keyof DB ? DB[C] : never; -}>; -export type UpdateQueryBuilderWithFullJoin> = TE extends `${infer T} as ${infer A}` ? T extends keyof DB ? OuterJoinedBuilder : never : TE extends keyof DB ? OuterJoinedBuilder : TE extends AliasedExpression ? OuterJoinedBuilder : TE extends (qb: any) => AliasedExpression ? OuterJoinedBuilder : never; -type OuterJoinedBuilder = UpdateQueryBuilder, UT, TB | A, O>; -type OuterJoinedBuilderDB = DrainOuterGeneric<{ - [C in keyof DB | A]: C extends A ? Nullable : C extends TB ? Nullable : C extends keyof DB ? DB[C] : never; -}>; -export {}; diff --git a/node_modules/kysely/dist/esm/query-builder/update-query-builder.js b/node_modules/kysely/dist/esm/query-builder/update-query-builder.js deleted file mode 100644 index e1cf7f7..0000000 --- a/node_modules/kysely/dist/esm/query-builder/update-query-builder.js +++ /dev/null @@ -1,510 +0,0 @@ -/// -import { parseJoin, } from '../parser/join-parser.js'; -import { parseTableExpressionOrList, } from '../parser/table-parser.js'; -import { parseSelectArg, parseSelectAll, } from '../parser/select-parser.js'; -import { QueryNode } from '../operation-node/query-node.js'; -import { UpdateQueryNode } from '../operation-node/update-query-node.js'; -import { parseUpdate, } from '../parser/update-set-parser.js'; -import { freeze } from '../util/object-utils.js'; -import { UpdateResult } from './update-result.js'; -import { isNoResultErrorConstructor, NoResultError, } from './no-result-error.js'; -import { parseReferentialBinaryOperation, parseValueBinaryOperationOrExpression, } from '../parser/binary-operation-parser.js'; -import { parseValueExpression, } from '../parser/value-parser.js'; -import { LimitNode } from '../operation-node/limit-node.js'; -import { parseTop } from '../parser/top-parser.js'; -import { parseOrderBy, } from '../parser/order-by-parser.js'; -export class UpdateQueryBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - where(...args) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithWhere(this.#props.queryNode, parseValueBinaryOperationOrExpression(args)), - }); - } - whereRef(lhs, op, rhs) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithWhere(this.#props.queryNode, parseReferentialBinaryOperation(lhs, op, rhs)), - }); - } - clearWhere() { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithoutWhere(this.#props.queryNode), - }); - } - /** - * Changes an `update` query into a `update top` query. - * - * `top` clause is only supported by some dialects like MS SQL Server. - * - * ### Examples - * - * Update the first row: - * - * ```ts - * await db.updateTable('person') - * .top(1) - * .set({ first_name: 'Foo' }) - * .where('age', '>', 18) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * update top(1) "person" set "first_name" = @1 where "age" > @2 - * ``` - * - * Update the 50% first rows: - * - * ```ts - * await db.updateTable('person') - * .top(50, 'percent') - * .set({ first_name: 'Foo' }) - * .where('age', '>', 18) - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (MS SQL Server): - * - * ```sql - * update top(50) percent "person" set "first_name" = @1 where "age" > @2 - * ``` - */ - top(expression, modifiers) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithTop(this.#props.queryNode, parseTop(expression, modifiers)), - }); - } - from(from) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: UpdateQueryNode.cloneWithFromItems(this.#props.queryNode, parseTableExpressionOrList(from)), - }); - } - innerJoin(...args) { - return this.#join('InnerJoin', args); - } - leftJoin(...args) { - return this.#join('LeftJoin', args); - } - rightJoin(...args) { - return this.#join('RightJoin', args); - } - fullJoin(...args) { - return this.#join('FullJoin', args); - } - #join(joinType, args) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithJoin(this.#props.queryNode, parseJoin(joinType, args)), - }); - } - orderBy(...args) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithOrderByItems(this.#props.queryNode, parseOrderBy(args)), - }); - } - clearOrderBy() { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithoutOrderBy(this.#props.queryNode), - }); - } - /** - * Adds a limit clause to the update query for supported databases, such as MySQL. - * - * ### Examples - * - * Update the first 2 rows in the 'person' table: - * - * ```ts - * await db - * .updateTable('person') - * .set({ first_name: 'Foo' }) - * .limit(2) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * update `person` set `first_name` = ? limit ? - * ``` - */ - limit(limit) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: UpdateQueryNode.cloneWithLimit(this.#props.queryNode, LimitNode.create(parseValueExpression(limit))), - }); - } - set(...args) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: UpdateQueryNode.cloneWithUpdates(this.#props.queryNode, parseUpdate(...args)), - }); - } - returning(selection) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithReturning(this.#props.queryNode, parseSelectArg(selection)), - }); - } - returningAll(table) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithReturning(this.#props.queryNode, parseSelectAll(table)), - }); - } - output(args) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithOutput(this.#props.queryNode, parseSelectArg(args)), - }); - } - outputAll(table) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithOutput(this.#props.queryNode, parseSelectAll(table)), - }); - } - /** - * This can be used to add any additional SQL to the end of the query. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.updateTable('person') - * .set({ age: 39 }) - * .where('first_name', '=', 'John') - * .modifyEnd(sql.raw('-- This is a comment')) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * update `person` - * set `age` = 39 - * where `first_name` = "John" -- This is a comment - * ``` - */ - modifyEnd(modifier) { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithEndModifier(this.#props.queryNode, modifier.toOperationNode()), - }); - } - /** - * Clears all `returning` clauses from the query. - * - * ### Examples - * - * ```ts - * db.updateTable('person') - * .returningAll() - * .set({ age: 39 }) - * .where('first_name', '=', 'John') - * .clearReturning() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * update "person" set "age" = 39 where "first_name" = "John" - * ``` - */ - clearReturning() { - return new UpdateQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithoutReturning(this.#props.queryNode), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - * - * If you want to conditionally call a method on `this`, see - * the {@link $if} method. - * - * ### Examples - * - * The next example uses a helper function `log` to log a query: - * - * ```ts - * import type { Compilable } from 'kysely' - * import type { PersonUpdate } from 'type-editor' // imaginary module - * - * function log(qb: T): T { - * console.log(qb.compile()) - * return qb - * } - * - * const values = { - * first_name: 'John', - * } satisfies PersonUpdate - * - * db.updateTable('person') - * .set(values) - * .$call(log) - * .execute() - * ``` - */ - $call(func) { - return func(this); - } - /** - * Call `func(this)` if `condition` is true. - * - * This method is especially handy with optional selects. Any `returning` or `returningAll` - * method calls add columns as optional fields to the output type when called inside - * the `func` callback. This is because we can't know if those selections were actually - * made before running the code. - * - * You can also call any other methods inside the callback. - * - * ### Examples - * - * ```ts - * import type { PersonUpdate } from 'type-editor' // imaginary module - * - * async function updatePerson(id: number, updates: PersonUpdate, returnLastName: boolean) { - * return await db - * .updateTable('person') - * .set(updates) - * .where('id', '=', id) - * .returning(['id', 'first_name']) - * .$if(returnLastName, (qb) => qb.returning('last_name')) - * .executeTakeFirstOrThrow() - * } - * ``` - * - * Any selections added inside the `if` callback will be added as optional fields to the - * output type since we can't know if the selections were actually made before running - * the code. In the example above the return type of the `updatePerson` function is: - * - * ```ts - * Promise<{ - * id: number - * first_name: string - * last_name?: string - * }> - * ``` - */ - $if(condition, func) { - if (condition) { - return func(this); - } - return new UpdateQueryBuilder({ - ...this.#props, - }); - } - /** - * Change the output type of the query. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `UpdateQueryBuilder` with a new output type. - */ - $castTo() { - return new UpdateQueryBuilder(this.#props); - } - /** - * Narrows (parts of) the output type of the query. - * - * Kysely tries to be as type-safe as possible, but in some cases we have to make - * compromises for better maintainability and compilation performance. At present, - * Kysely doesn't narrow the output type of the query based on {@link set} input - * when using {@link where} and/or {@link returning} or {@link returningAll}. - * - * This utility method is very useful for these situations, as it removes unncessary - * runtime assertion/guard code. Its input type is limited to the output type - * of the query, so you can't add a column that doesn't exist, or change a column's - * type to something that doesn't exist in its union type. - * - * ### Examples - * - * Turn this code: - * - * ```ts - * import type { Person } from 'type-editor' // imaginary module - * - * const id = 1 - * const now = new Date().toISOString() - * - * const person = await db.updateTable('person') - * .set({ deleted_at: now }) - * .where('id', '=', id) - * .where('nullable_column', 'is not', null) - * .returningAll() - * .executeTakeFirstOrThrow() - * - * if (isWithNoNullValue(person)) { - * functionThatExpectsPersonWithNonNullValue(person) - * } - * - * function isWithNoNullValue(person: Person): person is Person & { nullable_column: string } { - * return person.nullable_column != null - * } - * ``` - * - * Into this: - * - * ```ts - * import type { NotNull } from 'kysely' - * - * const id = 1 - * const now = new Date().toISOString() - * - * const person = await db.updateTable('person') - * .set({ deleted_at: now }) - * .where('id', '=', id) - * .where('nullable_column', 'is not', null) - * .returningAll() - * .$narrowType<{ deleted_at: Date; nullable_column: NotNull }>() - * .executeTakeFirstOrThrow() - * - * functionThatExpectsPersonWithNonNullValue(person) - * ``` - */ - $narrowType() { - return new UpdateQueryBuilder(this.#props); - } - /** - * Asserts that query's output row type equals the given type `T`. - * - * This method can be used to simplify excessively complex types to make TypeScript happy - * and much faster. - * - * Kysely uses complex type magic to achieve its type safety. This complexity is sometimes too much - * for TypeScript and you get errors like this: - * - * ``` - * error TS2589: Type instantiation is excessively deep and possibly infinite. - * ``` - * - * In these case you can often use this method to help TypeScript a little bit. When you use this - * method to assert the output type of a query, Kysely can drop the complex output type that - * consists of multiple nested helper types and replace it with the simple asserted type. - * - * Using this method doesn't reduce type safety at all. You have to pass in a type that is - * structurally equal to the current type. - * - * ### Examples - * - * ```ts - * import type { PersonUpdate, PetUpdate, Species } from 'type-editor' // imaginary module - * - * const person = { - * id: 1, - * gender: 'other', - * } satisfies PersonUpdate - * - * const pet = { - * name: 'Fluffy', - * } satisfies PetUpdate - * - * const result = await db - * .with('updated_person', (qb) => qb - * .updateTable('person') - * .set(person) - * .where('id', '=', person.id) - * .returning('first_name') - * .$assertType<{ first_name: string }>() - * ) - * .with('updated_pet', (qb) => qb - * .updateTable('pet') - * .set(pet) - * .where('owner_id', '=', person.id) - * .returning(['name as pet_name', 'species']) - * .$assertType<{ pet_name: string, species: Species }>() - * ) - * .selectFrom(['updated_person', 'updated_pet']) - * .selectAll() - * .executeTakeFirstOrThrow() - * ``` - */ - $assertType() { - return new UpdateQueryBuilder(this.#props); - } - /** - * Returns a copy of this UpdateQueryBuilder instance with the given plugin installed. - */ - withPlugin(plugin) { - return new UpdateQueryBuilder({ - ...this.#props, - executor: this.#props.executor.withPlugin(plugin), - }); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.queryNode, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - /** - * Executes the query and returns an array of rows. - * - * Also see the {@link executeTakeFirst} and {@link executeTakeFirstOrThrow} methods. - */ - async execute() { - const compiledQuery = this.compile(); - const result = await this.#props.executor.executeQuery(compiledQuery); - const { adapter } = this.#props.executor; - const query = compiledQuery.query; - if ((query.returning && adapter.supportsReturning) || - (query.output && adapter.supportsOutput)) { - return result.rows; - } - return [ - new UpdateResult(result.numAffectedRows ?? BigInt(0), result.numChangedRows), - ]; - } - /** - * Executes the query and returns the first result or undefined if - * the query returned no result. - */ - async executeTakeFirst() { - const [result] = await this.execute(); - return result; - } - /** - * Executes the query and returns the first result or throws if - * the query returned no result. - * - * By default an instance of {@link NoResultError} is thrown, but you can - * provide a custom error class, or callback as the only argument to throw a different - * error. - */ - async executeTakeFirstOrThrow(errorConstructor = NoResultError) { - const result = await this.executeTakeFirst(); - if (result === undefined) { - const error = isNoResultErrorConstructor(errorConstructor) - ? new errorConstructor(this.toOperationNode()) - : errorConstructor(this.toOperationNode()); - throw error; - } - return result; - } - async *stream(chunkSize = 100) { - const compiledQuery = this.compile(); - const stream = this.#props.executor.stream(compiledQuery, chunkSize); - for await (const item of stream) { - yield* item.rows; - } - } - async explain(format, options) { - const builder = new UpdateQueryBuilder({ - ...this.#props, - queryNode: QueryNode.cloneWithExplain(this.#props.queryNode, format, options), - }); - return await builder.execute(); - } -} diff --git a/node_modules/kysely/dist/esm/query-builder/update-result.d.ts b/node_modules/kysely/dist/esm/query-builder/update-result.d.ts deleted file mode 100644 index 26b50bc..0000000 --- a/node_modules/kysely/dist/esm/query-builder/update-result.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export declare class UpdateResult { - /** - * The number of rows the update query updated (even if not changed). - */ - readonly numUpdatedRows: bigint; - /** - * The number of rows the update query changed. - * - * This is **optional** and only supported in dialects such as MySQL. - * You would probably use {@link numUpdatedRows} in most cases. - */ - readonly numChangedRows?: bigint; - constructor(numUpdatedRows: bigint, numChangedRows: bigint | undefined); -} diff --git a/node_modules/kysely/dist/esm/query-builder/update-result.js b/node_modules/kysely/dist/esm/query-builder/update-result.js deleted file mode 100644 index 0da8f38..0000000 --- a/node_modules/kysely/dist/esm/query-builder/update-result.js +++ /dev/null @@ -1,18 +0,0 @@ -/// -export class UpdateResult { - /** - * The number of rows the update query updated (even if not changed). - */ - numUpdatedRows; - /** - * The number of rows the update query changed. - * - * This is **optional** and only supported in dialects such as MySQL. - * You would probably use {@link numUpdatedRows} in most cases. - */ - numChangedRows; - constructor(numUpdatedRows, numChangedRows) { - this.numUpdatedRows = numUpdatedRows; - this.numChangedRows = numChangedRows; - } -} diff --git a/node_modules/kysely/dist/esm/query-builder/where-interface.d.ts b/node_modules/kysely/dist/esm/query-builder/where-interface.d.ts deleted file mode 100644 index 29330ac..0000000 --- a/node_modules/kysely/dist/esm/query-builder/where-interface.d.ts +++ /dev/null @@ -1,382 +0,0 @@ -import type { ComparisonOperatorExpression, OperandValueExpressionOrList } from '../parser/binary-operation-parser.js'; -import type { ReferenceExpression } from '../parser/reference-parser.js'; -import type { SqlBool } from '../util/type-utils.js'; -import type { ExpressionOrFactory } from '../parser/expression-parser.js'; -export interface WhereInterface { - /** - * Adds a `where` expression to the query. - * - * Calling this method multiple times will combine the expressions using `and`. - * - * Also see {@link whereRef} - * - * ### Examples - * - * - * - * `where` method calls are combined with `AND`: - * - * ```ts - * const person = await db - * .selectFrom('person') - * .selectAll() - * .where('first_name', '=', 'Jennifer') - * .where('age', '>', 40) - * .executeTakeFirst() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "first_name" = $1 and "age" > $2 - * ``` - * - * Operator can be any supported operator or if the typings don't support it - * you can always use: - * - * ```ts - * import { sql } from 'kysely' - * - * sql`your operator` - * ``` - * - * - * - * Find multiple items using a list of identifiers: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where('id', 'in', [1, 2, 3]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "id" in ($1, $2, $3) - * ``` - * - * - * - * You can use the `and` function to create a simple equality - * filter using an object - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where((eb) => eb.and({ - * first_name: 'Jennifer', - * last_name: eb.ref('first_name') - * })) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * "first_name" = $1 - * and "last_name" = "first_name" - * ) - * ``` - * - * - * - * To combine conditions using `OR`, you can use the expression builder. - * There are two ways to create `OR` expressions. Both are shown in this - * example: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * // 1. Using the `or` method on the expression builder: - * .where((eb) => eb.or([ - * eb('first_name', '=', 'Jennifer'), - * eb('first_name', '=', 'Sylvester') - * ])) - * // 2. Chaining expressions using the `or` method on the - * // created expressions: - * .where((eb) => - * eb('last_name', '=', 'Aniston').or('last_name', '=', 'Stallone') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * ("first_name" = $1 or "first_name" = $2) - * and - * ("last_name" = $3 or "last_name" = $4) - * ) - * ``` - * - * - * - * You can add expressions conditionally like this: - * - * ```ts - * import { Expression, SqlBool } from 'kysely' - * - * const firstName: string | undefined = 'Jennifer' - * const lastName: string | undefined = 'Aniston' - * const under18 = true - * const over60 = true - * - * let query = db - * .selectFrom('person') - * .selectAll() - * - * if (firstName) { - * // The query builder is immutable. Remember to reassign - * // the result back to the query variable. - * query = query.where('first_name', '=', firstName) - * } - * - * if (lastName) { - * query = query.where('last_name', '=', lastName) - * } - * - * if (under18 || over60) { - * // Conditional OR expressions can be added like this. - * query = query.where((eb) => { - * const ors: Expression[] = [] - * - * if (under18) { - * ors.push(eb('age', '<', 18)) - * } - * - * if (over60) { - * ors.push(eb('age', '>', 60)) - * } - * - * return eb.or(ors) - * }) - * } - * - * const persons = await query.execute() - * ``` - * - * Both the first and third argument can also be arbitrary expressions like - * subqueries. An expression can defined by passing a function and calling - * the methods of the {@link ExpressionBuilder} passed to the callback: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where( - * (qb) => qb.selectFrom('pet') - * .select('pet.name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1), - * '=', - * 'Fluffy' - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * - * from "person" - * where ( - * select "pet"."name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) = $2 - * ``` - * - * A `where in` query can be built by using the `in` operator and an array - * of values. The values in the array can also be expressions: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where('person.id', 'in', [100, 200, 300]) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" where "id" in ($1, $2, $3) - * ``` - * - * - * - * For complex `where` expressions you can pass in a single callback and - * use the `ExpressionBuilder` to build your expression: - * - * ```ts - * const firstName = 'Jennifer' - * const maxAge = 60 - * - * const persons = await db - * .selectFrom('person') - * .selectAll('person') - * .where(({ eb, or, and, not, exists, selectFrom }) => and([ - * or([ - * eb('first_name', '=', firstName), - * eb('age', '<', maxAge) - * ]), - * not(exists( - * selectFrom('pet') - * .select('pet.id') - * .whereRef('pet.owner_id', '=', 'person.id') - * )) - * ])) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".* - * from "person" - * where ( - * ( - * "first_name" = $1 - * or "age" < $2 - * ) - * and not exists ( - * select "pet"."id" from "pet" where "pet"."owner_id" = "person"."id" - * ) - * ) - * ``` - * - * If everything else fails, you can always use the {@link sql} tag - * as any of the arguments, including the operator: - * - * ```ts - * import { sql } from 'kysely' - * - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where( - * sql`coalesce(first_name, last_name)`, - * 'like', - * '%' + name + '%', - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * where coalesce(first_name, last_name) like $1 - * ``` - * - * In all examples above the columns were known at compile time - * (except for the raw {@link sql} expressions). By default kysely only - * allows you to refer to columns that exist in the database **and** - * can be referred to in the current query and context. - * - * Sometimes you may want to refer to columns that come from the user - * input and thus are not available at compile time. - * - * You have two options, the {@link sql} tag or `db.dynamic`. The example below - * uses both: - * - * ```ts - * import { sql } from 'kysely' - * const { ref } = db.dynamic - * - * const columnFromUserInput: string = 'id' - * - * const persons = await db - * .selectFrom('person') - * .selectAll() - * .where(ref(columnFromUserInput), '=', 1) - * .where(sql.id(columnFromUserInput), '=', 2) - * .execute() - * ``` - */ - where, VE extends OperandValueExpressionOrList>(lhs: RE, op: ComparisonOperatorExpression, rhs: VE): WhereInterface; - where>(expression: E): WhereInterface; - /** - * Adds a `where` clause where both sides of the operator are references - * to columns. - * - * The normal `where` method treats the right hand side argument as a - * value by default. `whereRef` treats it as a column reference. This method is - * expecially useful with joins and correlated subqueries. - * - * ### Examples - * - * Usage with a join: - * - * ```ts - * db.selectFrom(['person', 'pet']) - * .selectAll() - * .whereRef('person.first_name', '=', 'pet.name') - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person", "pet" where "person"."first_name" = "pet"."name" - * ``` - * - * Usage in a subquery: - * - * ```ts - * const persons = await db - * .selectFrom('person') - * .selectAll('person') - * .select((eb) => eb - * .selectFrom('pet') - * .select('name') - * .whereRef('pet.owner_id', '=', 'person.id') - * .limit(1) - * .as('pet_name') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person".*, ( - * select "name" - * from "pet" - * where "pet"."owner_id" = "person"."id" - * limit $1 - * ) as "pet_name" - * from "person" - */ - whereRef, RRE extends ReferenceExpression>(lhs: LRE, op: ComparisonOperatorExpression, rhs: RRE): WhereInterface; - /** - * Clears all where expressions from the query. - * - * ### Examples - * - * ```ts - * db.selectFrom('person') - * .selectAll() - * .where('id','=',42) - * .clearWhere() - * ``` - * - * The generated SQL(PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - */ - clearWhere(): WhereInterface; -} diff --git a/node_modules/kysely/dist/esm/query-builder/where-interface.js b/node_modules/kysely/dist/esm/query-builder/where-interface.js deleted file mode 100644 index 44e72a1..0000000 --- a/node_modules/kysely/dist/esm/query-builder/where-interface.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/query-compiler/compiled-query.d.ts b/node_modules/kysely/dist/esm/query-compiler/compiled-query.d.ts deleted file mode 100644 index 09a89a5..0000000 --- a/node_modules/kysely/dist/esm/query-compiler/compiled-query.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { type QueryId } from '../util/query-id.js'; -import type { RootOperationNode } from './query-compiler.js'; -export interface CompiledQuery { - readonly query: RootOperationNode; - readonly queryId: QueryId; - readonly sql: string; - readonly parameters: ReadonlyArray; -} -type CompiledQueryFactory = Readonly<{ - raw(sql: string, parameters?: unknown[]): Readonly; -}>; -export declare const CompiledQuery: CompiledQueryFactory; -export {}; diff --git a/node_modules/kysely/dist/esm/query-compiler/compiled-query.js b/node_modules/kysely/dist/esm/query-compiler/compiled-query.js deleted file mode 100644 index e6e7b55..0000000 --- a/node_modules/kysely/dist/esm/query-compiler/compiled-query.js +++ /dev/null @@ -1,14 +0,0 @@ -/// -import { RawNode } from '../operation-node/raw-node.js'; -import { freeze } from '../util/object-utils.js'; -import { createQueryId } from '../util/query-id.js'; -export const CompiledQuery = freeze({ - raw(sql, parameters = []) { - return freeze({ - sql, - query: RawNode.createWithSql(sql), - parameters: freeze(parameters), - queryId: createQueryId(), - }); - }, -}); diff --git a/node_modules/kysely/dist/esm/query-compiler/default-query-compiler.d.ts b/node_modules/kysely/dist/esm/query-compiler/default-query-compiler.d.ts deleted file mode 100644 index 3b71eef..0000000 --- a/node_modules/kysely/dist/esm/query-compiler/default-query-compiler.d.ts +++ /dev/null @@ -1,235 +0,0 @@ -import type { AliasNode } from '../operation-node/alias-node.js'; -import type { AndNode } from '../operation-node/and-node.js'; -import type { CheckConstraintNode } from '../operation-node/check-constraint-node.js'; -import type { AddColumnNode } from '../operation-node/add-column-node.js'; -import type { ColumnUpdateNode } from '../operation-node/column-update-node.js'; -import type { CreateIndexNode } from '../operation-node/create-index-node.js'; -import { CreateTableNode } from '../operation-node/create-table-node.js'; -import type { DataTypeNode } from '../operation-node/data-type-node.js'; -import type { DeleteQueryNode } from '../operation-node/delete-query-node.js'; -import type { DropIndexNode } from '../operation-node/drop-index-node.js'; -import type { DropTableNode } from '../operation-node/drop-table-node.js'; -import type { FromNode } from '../operation-node/from-node.js'; -import type { GroupByItemNode } from '../operation-node/group-by-item-node.js'; -import type { GroupByNode } from '../operation-node/group-by-node.js'; -import type { IdentifierNode } from '../operation-node/identifier-node.js'; -import { InsertQueryNode } from '../operation-node/insert-query-node.js'; -import type { JoinNode } from '../operation-node/join-node.js'; -import type { LimitNode } from '../operation-node/limit-node.js'; -import type { ListNode } from '../operation-node/list-node.js'; -import type { OffsetNode } from '../operation-node/offset-node.js'; -import type { OnConflictNode } from '../operation-node/on-conflict-node.js'; -import type { OperationNode } from '../operation-node/operation-node.js'; -import { OperationNodeVisitor } from '../operation-node/operation-node-visitor.js'; -import { OperatorNode } from '../operation-node/operator-node.js'; -import type { OrNode } from '../operation-node/or-node.js'; -import type { OrderByItemNode } from '../operation-node/order-by-item-node.js'; -import type { OrderByNode } from '../operation-node/order-by-node.js'; -import { ParensNode } from '../operation-node/parens-node.js'; -import type { PrimitiveValueListNode } from '../operation-node/primitive-value-list-node.js'; -import { RawNode } from '../operation-node/raw-node.js'; -import type { ReferenceNode } from '../operation-node/reference-node.js'; -import type { ReferencesNode } from '../operation-node/references-node.js'; -import type { ReturningNode } from '../operation-node/returning-node.js'; -import type { SelectAllNode } from '../operation-node/select-all-node.js'; -import type { SelectQueryNode } from '../operation-node/select-query-node.js'; -import type { SelectionNode } from '../operation-node/selection-node.js'; -import type { TableNode } from '../operation-node/table-node.js'; -import type { PrimaryKeyConstraintNode } from '../operation-node/primary-key-constraint-node.js'; -import type { UniqueConstraintNode } from '../operation-node/unique-constraint-node.js'; -import type { UpdateQueryNode } from '../operation-node/update-query-node.js'; -import type { ValueListNode } from '../operation-node/value-list-node.js'; -import type { ValueNode } from '../operation-node/value-node.js'; -import type { WhereNode } from '../operation-node/where-node.js'; -import type { CommonTableExpressionNode } from '../operation-node/common-table-expression-node.js'; -import type { WithNode } from '../operation-node/with-node.js'; -import type { CompiledQuery } from './compiled-query.js'; -import type { RootOperationNode, QueryCompiler } from './query-compiler.js'; -import type { HavingNode } from '../operation-node/having-node.js'; -import type { CreateSchemaNode } from '../operation-node/create-schema-node.js'; -import type { DropSchemaNode } from '../operation-node/drop-schema-node.js'; -import type { AlterTableColumnAlterationNode, AlterTableNode } from '../operation-node/alter-table-node.js'; -import type { DropColumnNode } from '../operation-node/drop-column-node.js'; -import type { RenameColumnNode } from '../operation-node/rename-column-node.js'; -import type { AlterColumnNode } from '../operation-node/alter-column-node.js'; -import type { AddConstraintNode } from '../operation-node/add-constraint-node.js'; -import type { DropConstraintNode } from '../operation-node/drop-constraint-node.js'; -import type { ForeignKeyConstraintNode } from '../operation-node/foreign-key-constraint-node.js'; -import type { ColumnDefinitionNode } from '../operation-node/column-definition-node.js'; -import type { ModifyColumnNode } from '../operation-node/modify-column-node.js'; -import type { OnDuplicateKeyNode } from '../operation-node/on-duplicate-key-node.js'; -import type { ColumnNode } from '../operation-node/column-node.js'; -import { CreateViewNode } from '../operation-node/create-view-node.js'; -import type { DropViewNode } from '../operation-node/drop-view-node.js'; -import type { GeneratedNode } from '../operation-node/generated-node.js'; -import type { DefaultValueNode } from '../operation-node/default-value-node.js'; -import type { OnNode } from '../operation-node/on-node.js'; -import type { ValuesNode } from '../operation-node/values-node.js'; -import type { CommonTableExpressionNameNode } from '../operation-node/common-table-expression-name-node.js'; -import type { SelectModifierNode } from '../operation-node/select-modifier-node.js'; -import type { CreateTypeNode } from '../operation-node/create-type-node.js'; -import type { DropTypeNode } from '../operation-node/drop-type-node.js'; -import type { ExplainNode } from '../operation-node/explain-node.js'; -import type { SchemableIdentifierNode } from '../operation-node/schemable-identifier-node.js'; -import type { DefaultInsertValueNode } from '../operation-node/default-insert-value-node.js'; -import type { AggregateFunctionNode } from '../operation-node/aggregate-function-node.js'; -import type { OverNode } from '../operation-node/over-node.js'; -import type { PartitionByNode } from '../operation-node/partition-by-node.js'; -import type { PartitionByItemNode } from '../operation-node/partition-by-item-node.js'; -import { SetOperationNode } from '../operation-node/set-operation-node.js'; -import type { BinaryOperationNode } from '../operation-node/binary-operation-node.js'; -import type { UnaryOperationNode } from '../operation-node/unary-operation-node.js'; -import type { UsingNode } from '../operation-node/using-node.js'; -import type { FunctionNode } from '../operation-node/function-node.js'; -import type { CaseNode } from '../operation-node/case-node.js'; -import { WhenNode } from '../operation-node/when-node.js'; -import type { JSONReferenceNode } from '../operation-node/json-reference-node.js'; -import type { JSONPathNode } from '../operation-node/json-path-node.js'; -import type { JSONPathLegNode } from '../operation-node/json-path-leg-node.js'; -import type { JSONOperatorChainNode } from '../operation-node/json-operator-chain-node.js'; -import type { TupleNode } from '../operation-node/tuple-node.js'; -import type { MergeQueryNode } from '../operation-node/merge-query-node.js'; -import type { MatchedNode } from '../operation-node/matched-node.js'; -import type { AddIndexNode } from '../operation-node/add-index-node.js'; -import type { CastNode } from '../operation-node/cast-node.js'; -import type { FetchNode } from '../operation-node/fetch-node.js'; -import type { TopNode } from '../operation-node/top-node.js'; -import type { OutputNode } from '../operation-node/output-node.js'; -import type { RefreshMaterializedViewNode } from '../operation-node/refresh-materialized-view-node.js'; -import type { OrActionNode } from '../operation-node/or-action-node.js'; -import type { CollateNode } from '../operation-node/collate-node.js'; -import type { QueryId } from '../util/query-id.js'; -import type { RenameConstraintNode } from '../operation-node/rename-constraint-node.js'; -export declare class DefaultQueryCompiler extends OperationNodeVisitor implements QueryCompiler { - #private; - protected get numParameters(): number; - compileQuery(node: RootOperationNode, queryId: QueryId): CompiledQuery; - protected getSql(): string; - protected visitSelectQuery(node: SelectQueryNode): void; - protected visitFrom(node: FromNode): void; - protected visitSelection(node: SelectionNode): void; - protected visitColumn(node: ColumnNode): void; - protected compileDistinctOn(expressions: ReadonlyArray): void; - protected compileList(nodes: ReadonlyArray, separator?: string): void; - protected visitWhere(node: WhereNode): void; - protected visitHaving(node: HavingNode): void; - protected visitInsertQuery(node: InsertQueryNode): void; - protected visitValues(node: ValuesNode): void; - protected visitDeleteQuery(node: DeleteQueryNode): void; - protected visitReturning(node: ReturningNode): void; - protected visitAlias(node: AliasNode): void; - protected visitReference(node: ReferenceNode): void; - protected visitSelectAll(_: SelectAllNode): void; - protected visitIdentifier(node: IdentifierNode): void; - protected compileUnwrappedIdentifier(node: IdentifierNode): void; - protected visitAnd(node: AndNode): void; - protected visitOr(node: OrNode): void; - protected visitValue(node: ValueNode): void; - protected visitValueList(node: ValueListNode): void; - protected visitTuple(node: TupleNode): void; - protected visitPrimitiveValueList(node: PrimitiveValueListNode): void; - protected visitParens(node: ParensNode): void; - protected visitJoin(node: JoinNode): void; - protected visitOn(node: OnNode): void; - protected visitRaw(node: RawNode): void; - protected visitOperator(node: OperatorNode): void; - protected visitTable(node: TableNode): void; - protected visitSchemableIdentifier(node: SchemableIdentifierNode): void; - protected visitCreateTable(node: CreateTableNode): void; - protected visitColumnDefinition(node: ColumnDefinitionNode): void; - protected getAutoIncrement(): string; - protected visitReferences(node: ReferencesNode): void; - protected visitDropTable(node: DropTableNode): void; - protected visitDataType(node: DataTypeNode): void; - protected visitOrderBy(node: OrderByNode): void; - protected visitOrderByItem(node: OrderByItemNode): void; - protected visitGroupBy(node: GroupByNode): void; - protected visitGroupByItem(node: GroupByItemNode): void; - protected visitUpdateQuery(node: UpdateQueryNode): void; - protected visitColumnUpdate(node: ColumnUpdateNode): void; - protected visitLimit(node: LimitNode): void; - protected visitOffset(node: OffsetNode): void; - protected visitOnConflict(node: OnConflictNode): void; - protected visitOnDuplicateKey(node: OnDuplicateKeyNode): void; - protected visitCreateIndex(node: CreateIndexNode): void; - protected visitDropIndex(node: DropIndexNode): void; - protected visitCreateSchema(node: CreateSchemaNode): void; - protected visitDropSchema(node: DropSchemaNode): void; - protected visitPrimaryKeyConstraint(node: PrimaryKeyConstraintNode): void; - protected buildDeferrable(node: { - deferrable?: boolean; - initiallyDeferred?: boolean; - }): void; - protected visitUniqueConstraint(node: UniqueConstraintNode): void; - protected visitCheckConstraint(node: CheckConstraintNode): void; - protected visitForeignKeyConstraint(node: ForeignKeyConstraintNode): void; - protected visitList(node: ListNode): void; - protected visitWith(node: WithNode): void; - protected visitCommonTableExpression(node: CommonTableExpressionNode): void; - protected visitCommonTableExpressionName(node: CommonTableExpressionNameNode): void; - protected visitAlterTable(node: AlterTableNode): void; - protected visitAddColumn(node: AddColumnNode): void; - protected visitRenameColumn(node: RenameColumnNode): void; - protected visitDropColumn(node: DropColumnNode): void; - protected visitAlterColumn(node: AlterColumnNode): void; - protected visitModifyColumn(node: ModifyColumnNode): void; - protected visitAddConstraint(node: AddConstraintNode): void; - protected visitDropConstraint(node: DropConstraintNode): void; - protected visitRenameConstraint(node: RenameConstraintNode): void; - protected visitSetOperation(node: SetOperationNode): void; - protected visitCreateView(node: CreateViewNode): void; - protected visitRefreshMaterializedView(node: RefreshMaterializedViewNode): void; - protected visitDropView(node: DropViewNode): void; - protected visitGenerated(node: GeneratedNode): void; - protected visitDefaultValue(node: DefaultValueNode): void; - protected visitSelectModifier(node: SelectModifierNode): void; - protected visitCreateType(node: CreateTypeNode): void; - protected visitDropType(node: DropTypeNode): void; - protected visitExplain(node: ExplainNode): void; - protected visitDefaultInsertValue(_: DefaultInsertValueNode): void; - protected visitAggregateFunction(node: AggregateFunctionNode): void; - protected visitOver(node: OverNode): void; - protected visitPartitionBy(node: PartitionByNode): void; - protected visitPartitionByItem(node: PartitionByItemNode): void; - protected visitBinaryOperation(node: BinaryOperationNode): void; - protected visitUnaryOperation(node: UnaryOperationNode): void; - protected isMinusOperator(node: OperationNode): node is OperatorNode; - protected visitUsing(node: UsingNode): void; - protected visitFunction(node: FunctionNode): void; - protected visitCase(node: CaseNode): void; - protected visitWhen(node: WhenNode): void; - protected visitJSONReference(node: JSONReferenceNode): void; - protected visitJSONPath(node: JSONPathNode): void; - protected visitJSONPathLeg(node: JSONPathLegNode): void; - protected visitJSONOperatorChain(node: JSONOperatorChainNode): void; - protected visitMergeQuery(node: MergeQueryNode): void; - protected visitMatched(node: MatchedNode): void; - protected visitAddIndex(node: AddIndexNode): void; - protected visitCast(node: CastNode): void; - protected visitFetch(node: FetchNode): void; - protected visitOutput(node: OutputNode): void; - protected visitTop(node: TopNode): void; - protected visitOrAction(node: OrActionNode): void; - protected visitCollate(node: CollateNode): void; - protected append(str: string): void; - protected appendValue(parameter: unknown): void; - protected getLeftIdentifierWrapper(): string; - protected getRightIdentifierWrapper(): string; - protected getCurrentParameterPlaceholder(): string; - protected getLeftExplainOptionsWrapper(): string; - protected getExplainOptionAssignment(): string; - protected getExplainOptionsDelimiter(): string; - protected getRightExplainOptionsWrapper(): string; - protected sanitizeIdentifier(identifier: string): string; - protected sanitizeStringLiteral(value: string): string; - protected addParameter(parameter: unknown): void; - protected appendImmediateValue(value: unknown): void; - protected appendStringLiteral(value: string): void; - protected sortSelectModifiers(arr: SelectModifierNode[]): ReadonlyArray; - protected compileColumnAlterations(columnAlterations: readonly AlterTableColumnAlterationNode[]): void; - /** - * controls whether the dialect adds a "type" keyword before a column's new data - * type in an ALTER TABLE statement. - */ - protected announcesNewColumnDataType(): boolean; -} diff --git a/node_modules/kysely/dist/esm/query-compiler/default-query-compiler.js b/node_modules/kysely/dist/esm/query-compiler/default-query-compiler.js deleted file mode 100644 index 8fc2d56..0000000 --- a/node_modules/kysely/dist/esm/query-compiler/default-query-compiler.js +++ /dev/null @@ -1,1395 +0,0 @@ -/// -import { CreateTableNode } from '../operation-node/create-table-node.js'; -import { InsertQueryNode } from '../operation-node/insert-query-node.js'; -import { OperationNodeVisitor } from '../operation-node/operation-node-visitor.js'; -import { OperatorNode } from '../operation-node/operator-node.js'; -import { ParensNode } from '../operation-node/parens-node.js'; -import { RawNode } from '../operation-node/raw-node.js'; -import { freeze, isString, isNumber, isBoolean, isNull, isDate, isBigInt, } from '../util/object-utils.js'; -import { CreateViewNode } from '../operation-node/create-view-node.js'; -import { SetOperationNode } from '../operation-node/set-operation-node.js'; -import { WhenNode } from '../operation-node/when-node.js'; -import { logOnce } from '../util/log-once.js'; -const LIT_WRAP_REGEX = /'/g; -export class DefaultQueryCompiler extends OperationNodeVisitor { - #sql = ''; - #parameters = []; - get numParameters() { - return this.#parameters.length; - } - compileQuery(node, queryId) { - this.#sql = ''; - this.#parameters = []; - this.nodeStack.splice(0, this.nodeStack.length); - this.visitNode(node); - return freeze({ - query: node, - queryId, - sql: this.getSql(), - parameters: [...this.#parameters], - }); - } - getSql() { - return this.#sql; - } - visitSelectQuery(node) { - const wrapInParens = this.parentNode !== undefined && - !ParensNode.is(this.parentNode) && - !InsertQueryNode.is(this.parentNode) && - !CreateTableNode.is(this.parentNode) && - !CreateViewNode.is(this.parentNode) && - !SetOperationNode.is(this.parentNode); - if (this.parentNode === undefined && node.explain) { - this.visitNode(node.explain); - this.append(' '); - } - if (wrapInParens) { - this.append('('); - } - if (node.with) { - this.visitNode(node.with); - this.append(' '); - } - this.append('select'); - if (node.distinctOn) { - this.append(' '); - this.compileDistinctOn(node.distinctOn); - } - if (node.frontModifiers?.length) { - this.append(' '); - this.compileList(node.frontModifiers, ' '); - } - if (node.top) { - this.append(' '); - this.visitNode(node.top); - } - if (node.selections) { - this.append(' '); - this.compileList(node.selections); - } - if (node.from) { - this.append(' '); - this.visitNode(node.from); - } - if (node.joins) { - this.append(' '); - this.compileList(node.joins, ' '); - } - if (node.where) { - this.append(' '); - this.visitNode(node.where); - } - if (node.groupBy) { - this.append(' '); - this.visitNode(node.groupBy); - } - if (node.having) { - this.append(' '); - this.visitNode(node.having); - } - if (node.setOperations) { - this.append(' '); - this.compileList(node.setOperations, ' '); - } - if (node.orderBy) { - this.append(' '); - this.visitNode(node.orderBy); - } - if (node.limit) { - this.append(' '); - this.visitNode(node.limit); - } - if (node.offset) { - this.append(' '); - this.visitNode(node.offset); - } - if (node.fetch) { - this.append(' '); - this.visitNode(node.fetch); - } - if (node.endModifiers?.length) { - this.append(' '); - this.compileList(this.sortSelectModifiers([...node.endModifiers]), ' '); - } - if (wrapInParens) { - this.append(')'); - } - } - visitFrom(node) { - this.append('from '); - this.compileList(node.froms); - } - visitSelection(node) { - this.visitNode(node.selection); - } - visitColumn(node) { - this.visitNode(node.column); - } - compileDistinctOn(expressions) { - this.append('distinct on ('); - this.compileList(expressions); - this.append(')'); - } - compileList(nodes, separator = ', ') { - const lastIndex = nodes.length - 1; - for (let i = 0; i <= lastIndex; i++) { - this.visitNode(nodes[i]); - if (i < lastIndex) { - this.append(separator); - } - } - } - visitWhere(node) { - this.append('where '); - this.visitNode(node.where); - } - visitHaving(node) { - this.append('having '); - this.visitNode(node.having); - } - visitInsertQuery(node) { - const wrapInParens = this.parentNode !== undefined && - !ParensNode.is(this.parentNode) && - !RawNode.is(this.parentNode) && - !WhenNode.is(this.parentNode); - if (this.parentNode === undefined && node.explain) { - this.visitNode(node.explain); - this.append(' '); - } - if (wrapInParens) { - this.append('('); - } - if (node.with) { - this.visitNode(node.with); - this.append(' '); - } - this.append(node.replace ? 'replace' : 'insert'); - // TODO: remove in 0.29. - if (node.ignore) { - logOnce('`InsertQueryNode.ignore` is deprecated. Use `InsertQueryNode.orAction` instead.'); - this.append(' ignore'); - } - if (node.orAction) { - this.append(' '); - this.visitNode(node.orAction); - } - if (node.top) { - this.append(' '); - this.visitNode(node.top); - } - if (node.into) { - this.append(' into '); - this.visitNode(node.into); - } - if (node.columns) { - this.append(' ('); - this.compileList(node.columns); - this.append(')'); - } - if (node.output) { - this.append(' '); - this.visitNode(node.output); - } - if (node.values) { - this.append(' '); - this.visitNode(node.values); - } - if (node.defaultValues) { - this.append(' '); - this.append('default values'); - } - if (node.onConflict) { - this.append(' '); - this.visitNode(node.onConflict); - } - if (node.onDuplicateKey) { - this.append(' '); - this.visitNode(node.onDuplicateKey); - } - if (node.returning) { - this.append(' '); - this.visitNode(node.returning); - } - if (wrapInParens) { - this.append(')'); - } - if (node.endModifiers?.length) { - this.append(' '); - this.compileList(node.endModifiers, ' '); - } - } - visitValues(node) { - this.append('values '); - this.compileList(node.values); - } - visitDeleteQuery(node) { - const wrapInParens = this.parentNode !== undefined && - !ParensNode.is(this.parentNode) && - !RawNode.is(this.parentNode); - if (this.parentNode === undefined && node.explain) { - this.visitNode(node.explain); - this.append(' '); - } - if (wrapInParens) { - this.append('('); - } - if (node.with) { - this.visitNode(node.with); - this.append(' '); - } - this.append('delete '); - if (node.top) { - this.visitNode(node.top); - this.append(' '); - } - this.visitNode(node.from); - if (node.output) { - this.append(' '); - this.visitNode(node.output); - } - if (node.using) { - this.append(' '); - this.visitNode(node.using); - } - if (node.joins) { - this.append(' '); - this.compileList(node.joins, ' '); - } - if (node.where) { - this.append(' '); - this.visitNode(node.where); - } - if (node.orderBy) { - this.append(' '); - this.visitNode(node.orderBy); - } - if (node.limit) { - this.append(' '); - this.visitNode(node.limit); - } - if (node.returning) { - this.append(' '); - this.visitNode(node.returning); - } - if (wrapInParens) { - this.append(')'); - } - if (node.endModifiers?.length) { - this.append(' '); - this.compileList(node.endModifiers, ' '); - } - } - visitReturning(node) { - this.append('returning '); - this.compileList(node.selections); - } - visitAlias(node) { - this.visitNode(node.node); - this.append(' as '); - this.visitNode(node.alias); - } - visitReference(node) { - if (node.table) { - this.visitNode(node.table); - this.append('.'); - } - this.visitNode(node.column); - } - visitSelectAll(_) { - this.append('*'); - } - visitIdentifier(node) { - this.append(this.getLeftIdentifierWrapper()); - this.compileUnwrappedIdentifier(node); - this.append(this.getRightIdentifierWrapper()); - } - compileUnwrappedIdentifier(node) { - if (!isString(node.name)) { - throw new Error('a non-string identifier was passed to compileUnwrappedIdentifier.'); - } - this.append(this.sanitizeIdentifier(node.name)); - } - visitAnd(node) { - this.visitNode(node.left); - this.append(' and '); - this.visitNode(node.right); - } - visitOr(node) { - this.visitNode(node.left); - this.append(' or '); - this.visitNode(node.right); - } - visitValue(node) { - if (node.immediate) { - this.appendImmediateValue(node.value); - } - else { - this.appendValue(node.value); - } - } - visitValueList(node) { - this.append('('); - this.compileList(node.values); - this.append(')'); - } - visitTuple(node) { - this.append('('); - this.compileList(node.values); - this.append(')'); - } - visitPrimitiveValueList(node) { - this.append('('); - const { values } = node; - for (let i = 0; i < values.length; ++i) { - this.appendValue(values[i]); - if (i !== values.length - 1) { - this.append(', '); - } - } - this.append(')'); - } - visitParens(node) { - this.append('('); - this.visitNode(node.node); - this.append(')'); - } - visitJoin(node) { - this.append(JOIN_TYPE_SQL[node.joinType]); - this.append(' '); - this.visitNode(node.table); - if (node.on) { - this.append(' '); - this.visitNode(node.on); - } - } - visitOn(node) { - this.append('on '); - this.visitNode(node.on); - } - visitRaw(node) { - const { sqlFragments, parameters: params } = node; - for (let i = 0; i < sqlFragments.length; ++i) { - this.append(sqlFragments[i]); - if (params.length > i) { - this.visitNode(params[i]); - } - } - } - visitOperator(node) { - this.append(node.operator); - } - visitTable(node) { - this.visitNode(node.table); - } - visitSchemableIdentifier(node) { - if (node.schema) { - this.visitNode(node.schema); - this.append('.'); - } - this.visitNode(node.identifier); - } - visitCreateTable(node) { - this.append('create '); - if (node.frontModifiers && node.frontModifiers.length > 0) { - this.compileList(node.frontModifiers, ' '); - this.append(' '); - } - if (node.temporary) { - this.append('temporary '); - } - this.append('table '); - if (node.ifNotExists) { - this.append('if not exists '); - } - this.visitNode(node.table); - if (node.selectQuery) { - this.append(' as '); - this.visitNode(node.selectQuery); - } - else { - this.append(' ('); - this.compileList([...node.columns, ...(node.constraints ?? [])]); - this.append(')'); - if (node.onCommit) { - this.append(' on commit '); - this.append(node.onCommit); - } - if (node.endModifiers && node.endModifiers.length > 0) { - this.append(' '); - this.compileList(node.endModifiers, ' '); - } - } - } - visitColumnDefinition(node) { - if (node.ifNotExists) { - this.append('if not exists '); - } - this.visitNode(node.column); - this.append(' '); - this.visitNode(node.dataType); - if (node.unsigned) { - this.append(' unsigned'); - } - if (node.frontModifiers && node.frontModifiers.length > 0) { - this.append(' '); - this.compileList(node.frontModifiers, ' '); - } - if (node.generated) { - this.append(' '); - this.visitNode(node.generated); - } - if (node.identity) { - this.append(' identity'); - } - if (node.defaultTo) { - this.append(' '); - this.visitNode(node.defaultTo); - } - if (node.notNull) { - this.append(' not null'); - } - if (node.unique) { - this.append(' unique'); - } - if (node.nullsNotDistinct) { - this.append(' nulls not distinct'); - } - if (node.primaryKey) { - this.append(' primary key'); - } - if (node.autoIncrement) { - this.append(' '); - this.append(this.getAutoIncrement()); - } - if (node.references) { - this.append(' '); - this.visitNode(node.references); - } - if (node.check) { - this.append(' '); - this.visitNode(node.check); - } - if (node.endModifiers && node.endModifiers.length > 0) { - this.append(' '); - this.compileList(node.endModifiers, ' '); - } - } - getAutoIncrement() { - return 'auto_increment'; - } - visitReferences(node) { - this.append('references '); - this.visitNode(node.table); - this.append(' ('); - this.compileList(node.columns); - this.append(')'); - if (node.onDelete) { - this.append(' on delete '); - this.append(node.onDelete); - } - if (node.onUpdate) { - this.append(' on update '); - this.append(node.onUpdate); - } - } - visitDropTable(node) { - this.append('drop table '); - if (node.ifExists) { - this.append('if exists '); - } - this.visitNode(node.table); - if (node.cascade) { - this.append(' cascade'); - } - } - visitDataType(node) { - this.append(node.dataType); - } - visitOrderBy(node) { - this.append('order by '); - this.compileList(node.items); - } - visitOrderByItem(node) { - this.visitNode(node.orderBy); - if (node.collation) { - this.append(' '); - this.visitNode(node.collation); - } - if (node.direction) { - this.append(' '); - this.visitNode(node.direction); - } - if (node.nulls) { - this.append(' nulls '); - this.append(node.nulls); - } - } - visitGroupBy(node) { - this.append('group by '); - this.compileList(node.items); - } - visitGroupByItem(node) { - this.visitNode(node.groupBy); - } - visitUpdateQuery(node) { - const wrapInParens = this.parentNode !== undefined && - !ParensNode.is(this.parentNode) && - !RawNode.is(this.parentNode) && - !WhenNode.is(this.parentNode); - if (this.parentNode === undefined && node.explain) { - this.visitNode(node.explain); - this.append(' '); - } - if (wrapInParens) { - this.append('('); - } - if (node.with) { - this.visitNode(node.with); - this.append(' '); - } - this.append('update '); - if (node.top) { - this.visitNode(node.top); - this.append(' '); - } - if (node.table) { - this.visitNode(node.table); - this.append(' '); - } - this.append('set '); - if (node.updates) { - this.compileList(node.updates); - } - if (node.output) { - this.append(' '); - this.visitNode(node.output); - } - if (node.from) { - this.append(' '); - this.visitNode(node.from); - } - if (node.joins) { - if (!node.from) { - throw new Error("Joins in an update query are only supported as a part of a PostgreSQL 'update set from join' query. If you want to create a MySQL 'update join set' query, see https://kysely.dev/docs/examples/update/my-sql-joins"); - } - this.append(' '); - this.compileList(node.joins, ' '); - } - if (node.where) { - this.append(' '); - this.visitNode(node.where); - } - if (node.returning) { - this.append(' '); - this.visitNode(node.returning); - } - if (node.orderBy) { - this.append(' '); - this.visitNode(node.orderBy); - } - if (node.limit) { - this.append(' '); - this.visitNode(node.limit); - } - if (wrapInParens) { - this.append(')'); - } - if (node.endModifiers?.length) { - this.append(' '); - this.compileList(node.endModifiers, ' '); - } - } - visitColumnUpdate(node) { - this.visitNode(node.column); - this.append(' = '); - this.visitNode(node.value); - } - visitLimit(node) { - this.append('limit '); - this.visitNode(node.limit); - } - visitOffset(node) { - this.append('offset '); - this.visitNode(node.offset); - } - visitOnConflict(node) { - this.append('on conflict'); - if (node.columns) { - this.append(' ('); - this.compileList(node.columns); - this.append(')'); - } - else if (node.constraint) { - this.append(' on constraint '); - this.visitNode(node.constraint); - } - else if (node.indexExpression) { - this.append(' ('); - this.visitNode(node.indexExpression); - this.append(')'); - } - if (node.indexWhere) { - this.append(' '); - this.visitNode(node.indexWhere); - } - if (node.doNothing === true) { - this.append(' do nothing'); - } - else if (node.updates) { - this.append(' do update set '); - this.compileList(node.updates); - if (node.updateWhere) { - this.append(' '); - this.visitNode(node.updateWhere); - } - } - } - visitOnDuplicateKey(node) { - this.append('on duplicate key update '); - this.compileList(node.updates); - } - visitCreateIndex(node) { - this.append('create '); - if (node.unique) { - this.append('unique '); - } - this.append('index '); - if (node.ifNotExists) { - this.append('if not exists '); - } - this.visitNode(node.name); - if (node.table) { - this.append(' on '); - this.visitNode(node.table); - } - if (node.using) { - this.append(' using '); - this.visitNode(node.using); - } - if (node.columns) { - this.append(' ('); - this.compileList(node.columns); - this.append(')'); - } - if (node.nullsNotDistinct) { - this.append(' nulls not distinct'); - } - if (node.where) { - this.append(' '); - this.visitNode(node.where); - } - } - visitDropIndex(node) { - this.append('drop index '); - if (node.ifExists) { - this.append('if exists '); - } - this.visitNode(node.name); - if (node.table) { - this.append(' on '); - this.visitNode(node.table); - } - if (node.cascade) { - this.append(' cascade'); - } - } - visitCreateSchema(node) { - this.append('create schema '); - if (node.ifNotExists) { - this.append('if not exists '); - } - this.visitNode(node.schema); - } - visitDropSchema(node) { - this.append('drop schema '); - if (node.ifExists) { - this.append('if exists '); - } - this.visitNode(node.schema); - if (node.cascade) { - this.append(' cascade'); - } - } - visitPrimaryKeyConstraint(node) { - if (node.name) { - this.append('constraint '); - this.visitNode(node.name); - this.append(' '); - } - this.append('primary key ('); - this.compileList(node.columns); - this.append(')'); - this.buildDeferrable(node); - } - buildDeferrable(node) { - if (node.deferrable !== undefined) { - if (node.deferrable) { - this.append(' deferrable'); - } - else { - this.append(' not deferrable'); - } - } - if (node.initiallyDeferred !== undefined) { - if (node.initiallyDeferred) { - this.append(' initially deferred'); - } - else { - this.append(' initially immediate'); - } - } - } - visitUniqueConstraint(node) { - if (node.name) { - this.append('constraint '); - this.visitNode(node.name); - this.append(' '); - } - this.append('unique'); - if (node.nullsNotDistinct) { - this.append(' nulls not distinct'); - } - this.append(' ('); - this.compileList(node.columns); - this.append(')'); - this.buildDeferrable(node); - } - visitCheckConstraint(node) { - if (node.name) { - this.append('constraint '); - this.visitNode(node.name); - this.append(' '); - } - this.append('check ('); - this.visitNode(node.expression); - this.append(')'); - } - visitForeignKeyConstraint(node) { - if (node.name) { - this.append('constraint '); - this.visitNode(node.name); - this.append(' '); - } - this.append('foreign key ('); - this.compileList(node.columns); - this.append(') '); - this.visitNode(node.references); - if (node.onDelete) { - this.append(' on delete '); - this.append(node.onDelete); - } - if (node.onUpdate) { - this.append(' on update '); - this.append(node.onUpdate); - } - this.buildDeferrable(node); - } - visitList(node) { - this.compileList(node.items); - } - visitWith(node) { - this.append('with '); - if (node.recursive) { - this.append('recursive '); - } - this.compileList(node.expressions); - } - visitCommonTableExpression(node) { - this.visitNode(node.name); - this.append(' as '); - if (isBoolean(node.materialized)) { - if (!node.materialized) { - this.append('not '); - } - this.append('materialized '); - } - this.visitNode(node.expression); - } - visitCommonTableExpressionName(node) { - this.visitNode(node.table); - if (node.columns) { - this.append('('); - this.compileList(node.columns); - this.append(')'); - } - } - visitAlterTable(node) { - this.append('alter table '); - this.visitNode(node.table); - this.append(' '); - if (node.renameTo) { - this.append('rename to '); - this.visitNode(node.renameTo); - } - if (node.setSchema) { - this.append('set schema '); - this.visitNode(node.setSchema); - } - if (node.addConstraint) { - this.visitNode(node.addConstraint); - } - if (node.dropConstraint) { - this.visitNode(node.dropConstraint); - } - if (node.renameConstraint) { - this.visitNode(node.renameConstraint); - } - if (node.columnAlterations) { - this.compileColumnAlterations(node.columnAlterations); - } - if (node.addIndex) { - this.visitNode(node.addIndex); - } - if (node.dropIndex) { - this.visitNode(node.dropIndex); - } - } - visitAddColumn(node) { - this.append('add column '); - this.visitNode(node.column); - } - visitRenameColumn(node) { - this.append('rename column '); - this.visitNode(node.column); - this.append(' to '); - this.visitNode(node.renameTo); - } - visitDropColumn(node) { - this.append('drop column '); - this.visitNode(node.column); - } - visitAlterColumn(node) { - this.append('alter column '); - this.visitNode(node.column); - this.append(' '); - if (node.dataType) { - if (this.announcesNewColumnDataType()) { - this.append('type '); - } - this.visitNode(node.dataType); - if (node.dataTypeExpression) { - this.append('using '); - this.visitNode(node.dataTypeExpression); - } - } - if (node.setDefault) { - this.append('set default '); - this.visitNode(node.setDefault); - } - if (node.dropDefault) { - this.append('drop default'); - } - if (node.setNotNull) { - this.append('set not null'); - } - if (node.dropNotNull) { - this.append('drop not null'); - } - } - visitModifyColumn(node) { - this.append('modify column '); - this.visitNode(node.column); - } - visitAddConstraint(node) { - this.append('add '); - this.visitNode(node.constraint); - } - visitDropConstraint(node) { - this.append('drop constraint '); - if (node.ifExists) { - this.append('if exists '); - } - this.visitNode(node.constraintName); - if (node.modifier === 'cascade') { - this.append(' cascade'); - } - else if (node.modifier === 'restrict') { - this.append(' restrict'); - } - } - visitRenameConstraint(node) { - this.append('rename constraint '); - this.visitNode(node.oldName); - this.append(' to '); - this.visitNode(node.newName); - } - visitSetOperation(node) { - this.append(node.operator); - this.append(' '); - if (node.all) { - this.append('all '); - } - this.visitNode(node.expression); - } - visitCreateView(node) { - this.append('create '); - if (node.orReplace) { - this.append('or replace '); - } - if (node.materialized) { - this.append('materialized '); - } - if (node.temporary) { - this.append('temporary '); - } - this.append('view '); - if (node.ifNotExists) { - this.append('if not exists '); - } - this.visitNode(node.name); - this.append(' '); - if (node.columns) { - this.append('('); - this.compileList(node.columns); - this.append(') '); - } - if (node.as) { - this.append('as '); - this.visitNode(node.as); - } - } - visitRefreshMaterializedView(node) { - this.append('refresh materialized view '); - if (node.concurrently) { - this.append('concurrently '); - } - this.visitNode(node.name); - if (node.withNoData) { - this.append(' with no data'); - } - else { - this.append(' with data'); - } - } - visitDropView(node) { - this.append('drop '); - if (node.materialized) { - this.append('materialized '); - } - this.append('view '); - if (node.ifExists) { - this.append('if exists '); - } - this.visitNode(node.name); - if (node.cascade) { - this.append(' cascade'); - } - } - visitGenerated(node) { - this.append('generated '); - if (node.always) { - this.append('always '); - } - if (node.byDefault) { - this.append('by default '); - } - this.append('as '); - if (node.identity) { - this.append('identity'); - } - if (node.expression) { - this.append('('); - this.visitNode(node.expression); - this.append(')'); - } - if (node.stored) { - this.append(' stored'); - } - } - visitDefaultValue(node) { - this.append('default '); - this.visitNode(node.defaultValue); - } - visitSelectModifier(node) { - if (node.rawModifier) { - this.visitNode(node.rawModifier); - } - else { - this.append(SELECT_MODIFIER_SQL[node.modifier]); - } - if (node.of) { - this.append(' of '); - this.compileList(node.of, ', '); - } - } - visitCreateType(node) { - this.append('create type '); - this.visitNode(node.name); - if (node.enum) { - this.append(' as enum '); - this.visitNode(node.enum); - } - } - visitDropType(node) { - this.append('drop type '); - if (node.ifExists) { - this.append('if exists '); - } - this.visitNode(node.name); - } - visitExplain(node) { - this.append('explain'); - if (node.options || node.format) { - this.append(' '); - this.append(this.getLeftExplainOptionsWrapper()); - if (node.options) { - this.visitNode(node.options); - if (node.format) { - this.append(this.getExplainOptionsDelimiter()); - } - } - if (node.format) { - this.append('format'); - this.append(this.getExplainOptionAssignment()); - this.append(node.format); - } - this.append(this.getRightExplainOptionsWrapper()); - } - } - visitDefaultInsertValue(_) { - this.append('default'); - } - visitAggregateFunction(node) { - this.append(node.func); - this.append('('); - if (node.distinct) { - this.append('distinct '); - } - this.compileList(node.aggregated); - if (node.orderBy) { - this.append(' '); - this.visitNode(node.orderBy); - } - this.append(')'); - if (node.withinGroup) { - this.append(' within group ('); - this.visitNode(node.withinGroup); - this.append(')'); - } - if (node.filter) { - this.append(' filter('); - this.visitNode(node.filter); - this.append(')'); - } - if (node.over) { - this.append(' '); - this.visitNode(node.over); - } - } - visitOver(node) { - this.append('over('); - if (node.partitionBy) { - this.visitNode(node.partitionBy); - if (node.orderBy) { - this.append(' '); - } - } - if (node.orderBy) { - this.visitNode(node.orderBy); - } - this.append(')'); - } - visitPartitionBy(node) { - this.append('partition by '); - this.compileList(node.items); - } - visitPartitionByItem(node) { - this.visitNode(node.partitionBy); - } - visitBinaryOperation(node) { - this.visitNode(node.leftOperand); - this.append(' '); - this.visitNode(node.operator); - this.append(' '); - this.visitNode(node.rightOperand); - } - visitUnaryOperation(node) { - this.visitNode(node.operator); - if (!this.isMinusOperator(node.operator)) { - this.append(' '); - } - this.visitNode(node.operand); - } - isMinusOperator(node) { - return OperatorNode.is(node) && node.operator === '-'; - } - visitUsing(node) { - this.append('using '); - this.compileList(node.tables); - } - visitFunction(node) { - this.append(node.func); - this.append('('); - this.compileList(node.arguments); - this.append(')'); - } - visitCase(node) { - this.append('case'); - if (node.value) { - this.append(' '); - this.visitNode(node.value); - } - if (node.when) { - this.append(' '); - this.compileList(node.when, ' '); - } - if (node.else) { - this.append(' else '); - this.visitNode(node.else); - } - this.append(' end'); - if (node.isStatement) { - this.append(' case'); - } - } - visitWhen(node) { - this.append('when '); - this.visitNode(node.condition); - if (node.result) { - this.append(' then '); - this.visitNode(node.result); - } - } - visitJSONReference(node) { - this.visitNode(node.reference); - this.visitNode(node.traversal); - } - visitJSONPath(node) { - if (node.inOperator) { - this.visitNode(node.inOperator); - } - this.append("'$"); - for (const pathLeg of node.pathLegs) { - this.visitNode(pathLeg); - } - this.append("'"); - } - visitJSONPathLeg(node) { - const isArrayLocation = node.type === 'ArrayLocation'; - this.append(isArrayLocation ? '[' : '.'); - this.append(typeof node.value === 'string' - ? this.sanitizeStringLiteral(node.value) - : String(node.value)); - if (isArrayLocation) { - this.append(']'); - } - } - visitJSONOperatorChain(node) { - for (let i = 0, len = node.values.length; i < len; i++) { - if (i === len - 1) { - this.visitNode(node.operator); - } - else { - this.append('->'); - } - this.visitNode(node.values[i]); - } - } - visitMergeQuery(node) { - if (node.with) { - this.visitNode(node.with); - this.append(' '); - } - this.append('merge '); - if (node.top) { - this.visitNode(node.top); - this.append(' '); - } - this.append('into '); - this.visitNode(node.into); - if (node.using) { - this.append(' '); - this.visitNode(node.using); - } - if (node.whens) { - this.append(' '); - this.compileList(node.whens, ' '); - } - if (node.returning) { - this.append(' '); - this.visitNode(node.returning); - } - if (node.output) { - this.append(' '); - this.visitNode(node.output); - } - if (node.endModifiers?.length) { - this.append(' '); - this.compileList(node.endModifiers, ' '); - } - } - visitMatched(node) { - if (node.not) { - this.append('not '); - } - this.append('matched'); - if (node.bySource) { - this.append(' by source'); - } - } - visitAddIndex(node) { - this.append('add '); - if (node.unique) { - this.append('unique '); - } - this.append('index '); - this.visitNode(node.name); - if (node.columns) { - this.append(' ('); - this.compileList(node.columns); - this.append(')'); - } - if (node.using) { - this.append(' using '); - this.visitNode(node.using); - } - } - visitCast(node) { - this.append('cast('); - this.visitNode(node.expression); - this.append(' as '); - this.visitNode(node.dataType); - this.append(')'); - } - visitFetch(node) { - this.append('fetch next '); - this.visitNode(node.rowCount); - this.append(` rows ${node.modifier}`); - } - visitOutput(node) { - this.append('output '); - this.compileList(node.selections); - } - visitTop(node) { - this.append(`top(${node.expression})`); - if (node.modifiers) { - this.append(` ${node.modifiers}`); - } - } - visitOrAction(node) { - this.append(node.action); - } - visitCollate(node) { - this.append('collate '); - this.visitNode(node.collation); - } - append(str) { - this.#sql += str; - } - appendValue(parameter) { - this.addParameter(parameter); - this.append(this.getCurrentParameterPlaceholder()); - } - getLeftIdentifierWrapper() { - return '"'; - } - getRightIdentifierWrapper() { - return '"'; - } - getCurrentParameterPlaceholder() { - return '$' + this.numParameters; - } - getLeftExplainOptionsWrapper() { - return '('; - } - getExplainOptionAssignment() { - return ' '; - } - getExplainOptionsDelimiter() { - return ', '; - } - getRightExplainOptionsWrapper() { - return ')'; - } - sanitizeIdentifier(identifier) { - const leftWrap = this.getLeftIdentifierWrapper(); - const rightWrap = this.getRightIdentifierWrapper(); - let sanitized = ''; - for (const c of identifier) { - sanitized += c; - if (c === leftWrap) { - sanitized += leftWrap; - } - else if (c === rightWrap) { - sanitized += rightWrap; - } - } - return sanitized; - } - sanitizeStringLiteral(value) { - return value.replace(LIT_WRAP_REGEX, "''"); - } - addParameter(parameter) { - this.#parameters.push(parameter); - } - appendImmediateValue(value) { - if (isString(value)) { - this.appendStringLiteral(value); - } - else if (isNumber(value) || isBoolean(value) || isBigInt(value)) { - this.append(value.toString()); - } - else if (isNull(value)) { - this.append('null'); - } - else if (isDate(value)) { - this.appendImmediateValue(value.toISOString()); - } - else { - throw new Error(`invalid immediate value ${value}`); - } - } - appendStringLiteral(value) { - this.append("'"); - this.append(this.sanitizeStringLiteral(value)); - this.append("'"); - } - sortSelectModifiers(arr) { - arr.sort((left, right) => left.modifier && right.modifier - ? SELECT_MODIFIER_PRIORITY[left.modifier] - - SELECT_MODIFIER_PRIORITY[right.modifier] - : 1); - return freeze(arr); - } - compileColumnAlterations(columnAlterations) { - this.compileList(columnAlterations); - } - /** - * controls whether the dialect adds a "type" keyword before a column's new data - * type in an ALTER TABLE statement. - */ - announcesNewColumnDataType() { - return true; - } -} -const SELECT_MODIFIER_SQL = freeze({ - ForKeyShare: 'for key share', - ForNoKeyUpdate: 'for no key update', - ForUpdate: 'for update', - ForShare: 'for share', - NoWait: 'nowait', - SkipLocked: 'skip locked', - Distinct: 'distinct', -}); -const SELECT_MODIFIER_PRIORITY = freeze({ - ForKeyShare: 1, - ForNoKeyUpdate: 1, - ForUpdate: 1, - ForShare: 1, - NoWait: 2, - SkipLocked: 2, - Distinct: 0, -}); -const JOIN_TYPE_SQL = freeze({ - InnerJoin: 'inner join', - LeftJoin: 'left join', - RightJoin: 'right join', - FullJoin: 'full join', - CrossJoin: 'cross join', - LateralInnerJoin: 'inner join lateral', - LateralLeftJoin: 'left join lateral', - LateralCrossJoin: 'cross join lateral', - OuterApply: 'outer apply', - CrossApply: 'cross apply', - Using: 'using', -}); diff --git a/node_modules/kysely/dist/esm/query-compiler/query-compiler.d.ts b/node_modules/kysely/dist/esm/query-compiler/query-compiler.d.ts deleted file mode 100644 index 3e981ee..0000000 --- a/node_modules/kysely/dist/esm/query-compiler/query-compiler.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { AlterTableNode } from '../operation-node/alter-table-node.js'; -import type { CreateIndexNode } from '../operation-node/create-index-node.js'; -import type { CreateSchemaNode } from '../operation-node/create-schema-node.js'; -import type { CreateTableNode } from '../operation-node/create-table-node.js'; -import type { CreateTypeNode } from '../operation-node/create-type-node.js'; -import type { CreateViewNode } from '../operation-node/create-view-node.js'; -import type { DropIndexNode } from '../operation-node/drop-index-node.js'; -import type { DropSchemaNode } from '../operation-node/drop-schema-node.js'; -import type { DropTableNode } from '../operation-node/drop-table-node.js'; -import type { DropTypeNode } from '../operation-node/drop-type-node.js'; -import type { DropViewNode } from '../operation-node/drop-view-node.js'; -import type { MergeQueryNode } from '../operation-node/merge-query-node.js'; -import type { QueryNode } from '../operation-node/query-node.js'; -import type { RawNode } from '../operation-node/raw-node.js'; -import type { RefreshMaterializedViewNode } from '../operation-node/refresh-materialized-view-node.js'; -import type { QueryId } from '../util/query-id.js'; -import type { CompiledQuery } from './compiled-query.js'; -export type RootOperationNode = QueryNode | CreateTableNode | CreateIndexNode | CreateSchemaNode | CreateViewNode | RefreshMaterializedViewNode | DropTableNode | DropIndexNode | DropSchemaNode | DropViewNode | AlterTableNode | RawNode | CreateTypeNode | DropTypeNode | MergeQueryNode; -/** - * a `QueryCompiler` compiles a query expressed as a tree of `OperationNodes` into SQL. - */ -export interface QueryCompiler { - compileQuery(node: RootOperationNode, queryId: QueryId): CompiledQuery; -} diff --git a/node_modules/kysely/dist/esm/query-compiler/query-compiler.js b/node_modules/kysely/dist/esm/query-compiler/query-compiler.js deleted file mode 100644 index ebaf539..0000000 --- a/node_modules/kysely/dist/esm/query-compiler/query-compiler.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/query-creator.d.ts b/node_modules/kysely/dist/esm/query-creator.d.ts deleted file mode 100644 index dce7197..0000000 --- a/node_modules/kysely/dist/esm/query-creator.d.ts +++ /dev/null @@ -1,592 +0,0 @@ -import { type SelectQueryBuilder } from './query-builder/select-query-builder.js'; -import { InsertQueryBuilder } from './query-builder/insert-query-builder.js'; -import { type TableExpressionOrList, type SimpleTableReference } from './parser/table-parser.js'; -import type { QueryExecutor } from './query-executor/query-executor.js'; -import { type CommonTableExpression, type QueryCreatorWithCommonTableExpression, type RecursiveCommonTableExpression } from './parser/with-parser.js'; -import { WithNode } from './operation-node/with-node.js'; -import type { InsertResult } from './query-builder/insert-result.js'; -import type { KyselyPlugin } from './plugin/kysely-plugin.js'; -import type { CTEBuilderCallback } from './query-builder/cte-builder.js'; -import { type CallbackSelection, type SelectCallback, type SelectExpression, type Selection } from './parser/select-parser.js'; -import type { SelectFrom } from './parser/select-from-parser.js'; -import type { DeleteFrom } from './parser/delete-from-parser.js'; -import type { UpdateTable } from './parser/update-parser.js'; -import type { MergeInto } from './parser/merge-into-parser.js'; -export declare class QueryCreator { - #private; - constructor(props: QueryCreatorProps); - /** - * Creates a `select` query builder for the given table or tables. - * - * The tables passed to this method are built as the query's `from` clause. - * - * ### Examples - * - * Create a select query for one table: - * - * ```ts - * db.selectFrom('person').selectAll() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - * - * Create a select query for one table with an alias: - * - * ```ts - * const persons = await db.selectFrom('person as p') - * .select(['p.id', 'first_name']) - * .execute() - * - * console.log(persons[0].id) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "p"."id", "first_name" from "person" as "p" - * ``` - * - * Create a select query from a subquery: - * - * ```ts - * const persons = await db.selectFrom( - * (eb) => eb.selectFrom('person').select('person.id as identifier').as('p') - * ) - * .select('p.identifier') - * .execute() - * - * console.log(persons[0].identifier) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "p"."identifier", - * from ( - * select "person"."id" as "identifier" from "person" - * ) as p - * ``` - * - * Create a select query from raw sql: - * - * ```ts - * import { sql } from 'kysely' - * - * const items = await db - * .selectFrom(sql<{ one: number }>`(select 1 as one)`.as('q')) - * .select('q.one') - * .execute() - * - * console.log(items[0].one) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "q"."one", - * from ( - * select 1 as one - * ) as q - * ``` - * - * When you use the `sql` tag you need to also provide the result type of the - * raw snippet / query so that Kysely can figure out what columns are - * available for the rest of the query. - * - * The `selectFrom` method also accepts an array for multiple tables. All - * the above examples can also be used in an array. - * - * ```ts - * import { sql } from 'kysely' - * - * const items = await db.selectFrom([ - * 'person as p', - * db.selectFrom('pet').select('pet.species').as('a'), - * sql<{ one: number }>`(select 1 as one)`.as('q') - * ]) - * .select(['p.id', 'a.species', 'q.one']) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "p".id, "a"."species", "q"."one" - * from - * "person" as "p", - * (select "pet"."species" from "pet") as a, - * (select 1 as one) as "q" - * ``` - */ - selectFrom>(from: TE): SelectFrom; - /** - * Creates a `select` query builder without a `from` clause. - * - * If you want to create a `select from` query, use the `selectFrom` method instead. - * This one can be used to create a plain `select` statement without a `from` clause. - * - * This method accepts the same inputs as {@link SelectQueryBuilder.select}. See its - * documentation for more examples. - * - * ### Examples - * - * ```ts - * const result = await db.selectNoFrom((eb) => [ - * eb.selectFrom('person') - * .select('id') - * .where('first_name', '=', 'Jennifer') - * .limit(1) - * .as('jennifer_id'), - * eb.selectFrom('pet') - * .select('id') - * .where('name', '=', 'Doggo') - * .limit(1) - * .as('doggo_id') - * ]) - * .executeTakeFirstOrThrow() - * - * console.log(result.jennifer_id) - * console.log(result.doggo_id) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select ( - * select "id" - * from "person" - * where "first_name" = $1 - * limit $2 - * ) as "jennifer_id", ( - * select "id" - * from "pet" - * where "name" = $3 - * limit $4 - * ) as "doggo_id" - * ``` - */ - selectNoFrom>(selections: ReadonlyArray): SelectQueryBuilder>; - selectNoFrom>(callback: CB): SelectQueryBuilder>; - selectNoFrom>(selection: SE): SelectQueryBuilder>; - /** - * Creates an insert query. - * - * The return value of this query is an instance of {@link InsertResult}. {@link InsertResult} - * has the {@link InsertResult.insertId | insertId} field that holds the auto incremented id of - * the inserted row if the db returned one. - * - * See the {@link InsertQueryBuilder.values | values} method for more info and examples. Also see - * the {@link ReturningInterface.returning | returning} method for a way to return columns - * on supported databases like PostgreSQL. - * - * ### Examples - * - * ```ts - * const result = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .executeTakeFirst() - * - * console.log(result.insertId) - * ``` - * - * Some databases like PostgreSQL support the `returning` method: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * ``` - */ - insertInto(table: T): InsertQueryBuilder; - /** - * Creates a "replace into" query. - * - * This is only supported by some dialects like MySQL or SQLite. - * - * Similar to MySQL's {@link InsertQueryBuilder.onDuplicateKeyUpdate} that deletes - * and inserts values on collision instead of updating existing rows. - * - * An alias of SQLite's {@link InsertQueryBuilder.orReplace}. - * - * The return value of this query is an instance of {@link InsertResult}. {@link InsertResult} - * has the {@link InsertResult.insertId | insertId} field that holds the auto incremented id of - * the inserted row if the db returned one. - * - * See the {@link InsertQueryBuilder.values | values} method for more info and examples. - * - * ### Examples - * - * ```ts - * const result = await db - * .replaceInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .executeTakeFirstOrThrow() - * - * console.log(result.insertId) - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * replace into `person` (`first_name`, `last_name`) values (?, ?) - * ``` - */ - replaceInto(table: T): InsertQueryBuilder; - /** - * Creates a delete query. - * - * See the {@link DeleteQueryBuilder.where} method for examples on how to specify - * a where clause for the delete operation. - * - * The return value of the query is an instance of {@link DeleteResult}. - * - * ### Examples - * - * - * - * Delete a single row: - * - * ```ts - * const result = await db - * .deleteFrom('person') - * .where('person.id', '=', 1) - * .executeTakeFirst() - * - * console.log(result.numDeletedRows) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * delete from "person" where "person"."id" = $1 - * ``` - * - * Some databases such as MySQL support deleting from multiple tables: - * - * ```ts - * const result = await db - * .deleteFrom(['person', 'pet']) - * .using('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .where('person.id', '=', 1) - * .executeTakeFirst() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * delete from `person`, `pet` - * using `person` - * inner join `pet` on `pet`.`owner_id` = `person`.`id` - * where `person`.`id` = ? - * ``` - */ - deleteFrom>(from: TE): DeleteFrom; - /** - * Creates an update query. - * - * See the {@link UpdateQueryBuilder.where} method for examples on how to specify - * a where clause for the update operation. - * - * See the {@link UpdateQueryBuilder.set} method for examples on how to - * specify the updates. - * - * The return value of the query is an {@link UpdateResult}. - * - * ### Examples - * - * ```ts - * const result = await db - * .updateTable('person') - * .set({ first_name: 'Jennifer' }) - * .where('person.id', '=', 1) - * .executeTakeFirst() - * - * console.log(result.numUpdatedRows) - * ``` - */ - updateTable>(tables: TE): UpdateTable; - /** - * Creates a merge query. - * - * The return value of the query is a {@link MergeResult}. - * - * See the {@link MergeQueryBuilder.using} method for examples on how to specify - * the other table. - * - * ### Examples - * - * - * - * Update a target column based on the existence of a source row: - * - * ```ts - * const result = await db - * .mergeInto('person as target') - * .using('pet as source', 'source.owner_id', 'target.id') - * .whenMatchedAnd('target.has_pets', '!=', 'Y') - * .thenUpdateSet({ has_pets: 'Y' }) - * .whenNotMatchedBySourceAnd('target.has_pets', '=', 'Y') - * .thenUpdateSet({ has_pets: 'N' }) - * .executeTakeFirstOrThrow() - * - * console.log(result.numChangedRows) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" - * on "pet"."owner_id" = "person"."id" - * when matched and "has_pets" != $1 - * then update set "has_pets" = $2 - * when not matched by source and "has_pets" = $3 - * then update set "has_pets" = $4 - * ``` - * - * - * - * Merge new entries from a temporary changes table: - * - * ```ts - * const result = await db - * .mergeInto('wine as target') - * .using( - * 'wine_stock_change as source', - * 'source.wine_name', - * 'target.name', - * ) - * .whenNotMatchedAnd('source.stock_delta', '>', 0) - * .thenInsertValues(({ ref }) => ({ - * name: ref('source.wine_name'), - * stock: ref('source.stock_delta'), - * })) - * .whenMatchedAnd( - * (eb) => eb('target.stock', '+', eb.ref('source.stock_delta')), - * '>', - * 0, - * ) - * .thenUpdateSet('stock', (eb) => - * eb('target.stock', '+', eb.ref('source.stock_delta')), - * ) - * .whenMatched() - * .thenDelete() - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "wine" as "target" - * using "wine_stock_change" as "source" - * on "source"."wine_name" = "target"."name" - * when not matched and "source"."stock_delta" > $1 - * then insert ("name", "stock") values ("source"."wine_name", "source"."stock_delta") - * when matched and "target"."stock" + "source"."stock_delta" > $2 - * then update set "stock" = "target"."stock" + "source"."stock_delta" - * when matched - * then delete - * ``` - */ - mergeInto>(targetTable: TR): MergeInto; - /** - * Creates a `with` query (Common Table Expression). - * - * ### Examples - * - * - * - * Common table expressions (CTE) are a great way to modularize complex queries. - * Essentially they allow you to run multiple separate queries within a - * single roundtrip to the DB. - * - * Since CTEs are a part of the main query, query optimizers inside DB - * engines are able to optimize the overall query. For example, postgres - * is able to inline the CTEs inside the using queries if it decides it's - * faster. - * - * ```ts - * const result = await db - * // Create a CTE called `jennifers` that selects all - * // persons named 'Jennifer'. - * .with('jennifers', (db) => db - * .selectFrom('person') - * .where('first_name', '=', 'Jennifer') - * .select(['id', 'age']) - * ) - * // Select all rows from the `jennifers` CTE and - * // further filter it. - * .with('adult_jennifers', (db) => db - * .selectFrom('jennifers') - * .where('age', '>', 18) - * .select(['id', 'age']) - * ) - * // Finally select all adult jennifers that are - * // also younger than 60. - * .selectFrom('adult_jennifers') - * .where('age', '<', 60) - * .selectAll() - * .execute() - * ``` - * - * - * - * Some databases like postgres also allow you to run other queries than selects - * in CTEs. On these databases CTEs are extremely powerful: - * - * ```ts - * const result = await db - * .with('new_person', (db) => db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * age: 35, - * }) - * .returning('id') - * ) - * .with('new_pet', (db) => db - * .insertInto('pet') - * .values({ - * name: 'Doggo', - * species: 'dog', - * is_favorite: true, - * // Use the id of the person we just inserted. - * owner_id: db - * .selectFrom('new_person') - * .select('id') - * }) - * .returning('id') - * ) - * .selectFrom(['new_person', 'new_pet']) - * .select([ - * 'new_person.id as person_id', - * 'new_pet.id as pet_id' - * ]) - * .execute() - * ``` - * - * The CTE name can optionally specify column names in addition to - * a name. In that case Kysely requires the expression to retun - * rows with the same columns. - * - * ```ts - * await db - * .with('jennifers(id, age)', (db) => db - * .selectFrom('person') - * .where('first_name', '=', 'Jennifer') - * // This is ok since we return columns with the same - * // names as specified by `jennifers(id, age)`. - * .select(['id', 'age']) - * ) - * .selectFrom('jennifers') - * .selectAll() - * .execute() - * ``` - * - * The first argument can also be a callback. The callback is passed - * a `CTEBuilder` instance that can be used to configure the CTE: - * - * ```ts - * await db - * .with( - * (cte) => cte('jennifers').materialized(), - * (db) => db - * .selectFrom('person') - * .where('first_name', '=', 'Jennifer') - * .select(['id', 'age']) - * ) - * .selectFrom('jennifers') - * .selectAll() - * .execute() - * ``` - */ - with>(nameOrBuilder: N | CTEBuilderCallback, expression: E): QueryCreatorWithCommonTableExpression; - /** - * Creates a recursive `with` query (Common Table Expression). - * - * Note that recursiveness is a property of the whole `with` statement. - * You cannot have recursive and non-recursive CTEs in a same `with` statement. - * Therefore the recursiveness is determined by the **first** `with` or - * `withRecusive` call you make. - * - * See the {@link with} method for examples and more documentation. - */ - withRecursive>(nameOrBuilder: N | CTEBuilderCallback, expression: E): QueryCreatorWithCommonTableExpression; - /** - * Returns a copy of this query creator instance with the given plugin installed. - */ - withPlugin(plugin: KyselyPlugin): QueryCreator; - /** - * Returns a copy of this query creator instance without any plugins. - */ - withoutPlugins(): QueryCreator; - /** - * Sets the schema to be used for all table references that don't explicitly - * specify a schema. - * - * This only affects the query created through the builder returned from - * this method and doesn't modify the `db` instance. - * - * See [this recipe](https://github.com/kysely-org/kysely/blob/master/site/docs/recipes/0007-schemas.md) - * for a more detailed explanation. - * - * ### Examples - * - * ``` - * await db - * .withSchema('mammals') - * .selectFrom('pet') - * .selectAll() - * .innerJoin('public.person', 'public.person.id', 'pet.owner_id') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "mammals"."pet" - * inner join "public"."person" - * on "public"."person"."id" = "mammals"."pet"."owner_id" - * ``` - * - * `withSchema` is smart enough to not add schema for aliases, - * common table expressions or other places where the schema - * doesn't belong to: - * - * ``` - * await db - * .withSchema('mammals') - * .selectFrom('pet as p') - * .select('p.name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "p"."name" from "mammals"."pet" as "p" - * ``` - */ - withSchema(schema: string): QueryCreator; -} -export interface QueryCreatorProps { - readonly executor: QueryExecutor; - readonly withNode?: WithNode; -} diff --git a/node_modules/kysely/dist/esm/query-creator.js b/node_modules/kysely/dist/esm/query-creator.js deleted file mode 100644 index 4eec030..0000000 --- a/node_modules/kysely/dist/esm/query-creator.js +++ /dev/null @@ -1,619 +0,0 @@ -/// -import { createSelectQueryBuilder, } from './query-builder/select-query-builder.js'; -import { InsertQueryBuilder } from './query-builder/insert-query-builder.js'; -import { DeleteQueryBuilder } from './query-builder/delete-query-builder.js'; -import { UpdateQueryBuilder } from './query-builder/update-query-builder.js'; -import { DeleteQueryNode } from './operation-node/delete-query-node.js'; -import { InsertQueryNode } from './operation-node/insert-query-node.js'; -import { SelectQueryNode } from './operation-node/select-query-node.js'; -import { UpdateQueryNode } from './operation-node/update-query-node.js'; -import { parseTable, parseTableExpressionOrList, parseAliasedTable, } from './parser/table-parser.js'; -import { parseCommonTableExpression, } from './parser/with-parser.js'; -import { WithNode } from './operation-node/with-node.js'; -import { createQueryId } from './util/query-id.js'; -import { WithSchemaPlugin } from './plugin/with-schema/with-schema-plugin.js'; -import { freeze } from './util/object-utils.js'; -import { parseSelectArg, } from './parser/select-parser.js'; -import { MergeQueryBuilder } from './query-builder/merge-query-builder.js'; -import { MergeQueryNode } from './operation-node/merge-query-node.js'; -export class QueryCreator { - #props; - constructor(props) { - this.#props = freeze(props); - } - /** - * Creates a `select` query builder for the given table or tables. - * - * The tables passed to this method are built as the query's `from` clause. - * - * ### Examples - * - * Create a select query for one table: - * - * ```ts - * db.selectFrom('person').selectAll() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * ``` - * - * Create a select query for one table with an alias: - * - * ```ts - * const persons = await db.selectFrom('person as p') - * .select(['p.id', 'first_name']) - * .execute() - * - * console.log(persons[0].id) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "p"."id", "first_name" from "person" as "p" - * ``` - * - * Create a select query from a subquery: - * - * ```ts - * const persons = await db.selectFrom( - * (eb) => eb.selectFrom('person').select('person.id as identifier').as('p') - * ) - * .select('p.identifier') - * .execute() - * - * console.log(persons[0].identifier) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "p"."identifier", - * from ( - * select "person"."id" as "identifier" from "person" - * ) as p - * ``` - * - * Create a select query from raw sql: - * - * ```ts - * import { sql } from 'kysely' - * - * const items = await db - * .selectFrom(sql<{ one: number }>`(select 1 as one)`.as('q')) - * .select('q.one') - * .execute() - * - * console.log(items[0].one) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "q"."one", - * from ( - * select 1 as one - * ) as q - * ``` - * - * When you use the `sql` tag you need to also provide the result type of the - * raw snippet / query so that Kysely can figure out what columns are - * available for the rest of the query. - * - * The `selectFrom` method also accepts an array for multiple tables. All - * the above examples can also be used in an array. - * - * ```ts - * import { sql } from 'kysely' - * - * const items = await db.selectFrom([ - * 'person as p', - * db.selectFrom('pet').select('pet.species').as('a'), - * sql<{ one: number }>`(select 1 as one)`.as('q') - * ]) - * .select(['p.id', 'a.species', 'q.one']) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "p".id, "a"."species", "q"."one" - * from - * "person" as "p", - * (select "pet"."species" from "pet") as a, - * (select 1 as one) as "q" - * ``` - */ - selectFrom(from) { - return createSelectQueryBuilder({ - queryId: createQueryId(), - executor: this.#props.executor, - queryNode: SelectQueryNode.createFrom(parseTableExpressionOrList(from), this.#props.withNode), - }); - } - selectNoFrom(selection) { - return createSelectQueryBuilder({ - queryId: createQueryId(), - executor: this.#props.executor, - queryNode: SelectQueryNode.cloneWithSelections(SelectQueryNode.create(this.#props.withNode), parseSelectArg(selection)), - }); - } - /** - * Creates an insert query. - * - * The return value of this query is an instance of {@link InsertResult}. {@link InsertResult} - * has the {@link InsertResult.insertId | insertId} field that holds the auto incremented id of - * the inserted row if the db returned one. - * - * See the {@link InsertQueryBuilder.values | values} method for more info and examples. Also see - * the {@link ReturningInterface.returning | returning} method for a way to return columns - * on supported databases like PostgreSQL. - * - * ### Examples - * - * ```ts - * const result = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .executeTakeFirst() - * - * console.log(result.insertId) - * ``` - * - * Some databases like PostgreSQL support the `returning` method: - * - * ```ts - * const { id } = await db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .returning('id') - * .executeTakeFirstOrThrow() - * ``` - */ - insertInto(table) { - return new InsertQueryBuilder({ - queryId: createQueryId(), - executor: this.#props.executor, - queryNode: InsertQueryNode.create(parseTable(table), this.#props.withNode), - }); - } - /** - * Creates a "replace into" query. - * - * This is only supported by some dialects like MySQL or SQLite. - * - * Similar to MySQL's {@link InsertQueryBuilder.onDuplicateKeyUpdate} that deletes - * and inserts values on collision instead of updating existing rows. - * - * An alias of SQLite's {@link InsertQueryBuilder.orReplace}. - * - * The return value of this query is an instance of {@link InsertResult}. {@link InsertResult} - * has the {@link InsertResult.insertId | insertId} field that holds the auto incremented id of - * the inserted row if the db returned one. - * - * See the {@link InsertQueryBuilder.values | values} method for more info and examples. - * - * ### Examples - * - * ```ts - * const result = await db - * .replaceInto('person') - * .values({ - * first_name: 'Jennifer', - * last_name: 'Aniston' - * }) - * .executeTakeFirstOrThrow() - * - * console.log(result.insertId) - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * replace into `person` (`first_name`, `last_name`) values (?, ?) - * ``` - */ - replaceInto(table) { - return new InsertQueryBuilder({ - queryId: createQueryId(), - executor: this.#props.executor, - queryNode: InsertQueryNode.create(parseTable(table), this.#props.withNode, true), - }); - } - /** - * Creates a delete query. - * - * See the {@link DeleteQueryBuilder.where} method for examples on how to specify - * a where clause for the delete operation. - * - * The return value of the query is an instance of {@link DeleteResult}. - * - * ### Examples - * - * - * - * Delete a single row: - * - * ```ts - * const result = await db - * .deleteFrom('person') - * .where('person.id', '=', 1) - * .executeTakeFirst() - * - * console.log(result.numDeletedRows) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * delete from "person" where "person"."id" = $1 - * ``` - * - * Some databases such as MySQL support deleting from multiple tables: - * - * ```ts - * const result = await db - * .deleteFrom(['person', 'pet']) - * .using('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .where('person.id', '=', 1) - * .executeTakeFirst() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * delete from `person`, `pet` - * using `person` - * inner join `pet` on `pet`.`owner_id` = `person`.`id` - * where `person`.`id` = ? - * ``` - */ - deleteFrom(from) { - return new DeleteQueryBuilder({ - queryId: createQueryId(), - executor: this.#props.executor, - queryNode: DeleteQueryNode.create(parseTableExpressionOrList(from), this.#props.withNode), - }); - } - /** - * Creates an update query. - * - * See the {@link UpdateQueryBuilder.where} method for examples on how to specify - * a where clause for the update operation. - * - * See the {@link UpdateQueryBuilder.set} method for examples on how to - * specify the updates. - * - * The return value of the query is an {@link UpdateResult}. - * - * ### Examples - * - * ```ts - * const result = await db - * .updateTable('person') - * .set({ first_name: 'Jennifer' }) - * .where('person.id', '=', 1) - * .executeTakeFirst() - * - * console.log(result.numUpdatedRows) - * ``` - */ - updateTable(tables) { - return new UpdateQueryBuilder({ - queryId: createQueryId(), - executor: this.#props.executor, - queryNode: UpdateQueryNode.create(parseTableExpressionOrList(tables), this.#props.withNode), - }); - } - /** - * Creates a merge query. - * - * The return value of the query is a {@link MergeResult}. - * - * See the {@link MergeQueryBuilder.using} method for examples on how to specify - * the other table. - * - * ### Examples - * - * - * - * Update a target column based on the existence of a source row: - * - * ```ts - * const result = await db - * .mergeInto('person as target') - * .using('pet as source', 'source.owner_id', 'target.id') - * .whenMatchedAnd('target.has_pets', '!=', 'Y') - * .thenUpdateSet({ has_pets: 'Y' }) - * .whenNotMatchedBySourceAnd('target.has_pets', '=', 'Y') - * .thenUpdateSet({ has_pets: 'N' }) - * .executeTakeFirstOrThrow() - * - * console.log(result.numChangedRows) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "person" - * using "pet" - * on "pet"."owner_id" = "person"."id" - * when matched and "has_pets" != $1 - * then update set "has_pets" = $2 - * when not matched by source and "has_pets" = $3 - * then update set "has_pets" = $4 - * ``` - * - * - * - * Merge new entries from a temporary changes table: - * - * ```ts - * const result = await db - * .mergeInto('wine as target') - * .using( - * 'wine_stock_change as source', - * 'source.wine_name', - * 'target.name', - * ) - * .whenNotMatchedAnd('source.stock_delta', '>', 0) - * .thenInsertValues(({ ref }) => ({ - * name: ref('source.wine_name'), - * stock: ref('source.stock_delta'), - * })) - * .whenMatchedAnd( - * (eb) => eb('target.stock', '+', eb.ref('source.stock_delta')), - * '>', - * 0, - * ) - * .thenUpdateSet('stock', (eb) => - * eb('target.stock', '+', eb.ref('source.stock_delta')), - * ) - * .whenMatched() - * .thenDelete() - * .executeTakeFirstOrThrow() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * merge into "wine" as "target" - * using "wine_stock_change" as "source" - * on "source"."wine_name" = "target"."name" - * when not matched and "source"."stock_delta" > $1 - * then insert ("name", "stock") values ("source"."wine_name", "source"."stock_delta") - * when matched and "target"."stock" + "source"."stock_delta" > $2 - * then update set "stock" = "target"."stock" + "source"."stock_delta" - * when matched - * then delete - * ``` - */ - mergeInto(targetTable) { - return new MergeQueryBuilder({ - queryId: createQueryId(), - executor: this.#props.executor, - queryNode: MergeQueryNode.create(parseAliasedTable(targetTable), this.#props.withNode), - }); - } - /** - * Creates a `with` query (Common Table Expression). - * - * ### Examples - * - * - * - * Common table expressions (CTE) are a great way to modularize complex queries. - * Essentially they allow you to run multiple separate queries within a - * single roundtrip to the DB. - * - * Since CTEs are a part of the main query, query optimizers inside DB - * engines are able to optimize the overall query. For example, postgres - * is able to inline the CTEs inside the using queries if it decides it's - * faster. - * - * ```ts - * const result = await db - * // Create a CTE called `jennifers` that selects all - * // persons named 'Jennifer'. - * .with('jennifers', (db) => db - * .selectFrom('person') - * .where('first_name', '=', 'Jennifer') - * .select(['id', 'age']) - * ) - * // Select all rows from the `jennifers` CTE and - * // further filter it. - * .with('adult_jennifers', (db) => db - * .selectFrom('jennifers') - * .where('age', '>', 18) - * .select(['id', 'age']) - * ) - * // Finally select all adult jennifers that are - * // also younger than 60. - * .selectFrom('adult_jennifers') - * .where('age', '<', 60) - * .selectAll() - * .execute() - * ``` - * - * - * - * Some databases like postgres also allow you to run other queries than selects - * in CTEs. On these databases CTEs are extremely powerful: - * - * ```ts - * const result = await db - * .with('new_person', (db) => db - * .insertInto('person') - * .values({ - * first_name: 'Jennifer', - * age: 35, - * }) - * .returning('id') - * ) - * .with('new_pet', (db) => db - * .insertInto('pet') - * .values({ - * name: 'Doggo', - * species: 'dog', - * is_favorite: true, - * // Use the id of the person we just inserted. - * owner_id: db - * .selectFrom('new_person') - * .select('id') - * }) - * .returning('id') - * ) - * .selectFrom(['new_person', 'new_pet']) - * .select([ - * 'new_person.id as person_id', - * 'new_pet.id as pet_id' - * ]) - * .execute() - * ``` - * - * The CTE name can optionally specify column names in addition to - * a name. In that case Kysely requires the expression to retun - * rows with the same columns. - * - * ```ts - * await db - * .with('jennifers(id, age)', (db) => db - * .selectFrom('person') - * .where('first_name', '=', 'Jennifer') - * // This is ok since we return columns with the same - * // names as specified by `jennifers(id, age)`. - * .select(['id', 'age']) - * ) - * .selectFrom('jennifers') - * .selectAll() - * .execute() - * ``` - * - * The first argument can also be a callback. The callback is passed - * a `CTEBuilder` instance that can be used to configure the CTE: - * - * ```ts - * await db - * .with( - * (cte) => cte('jennifers').materialized(), - * (db) => db - * .selectFrom('person') - * .where('first_name', '=', 'Jennifer') - * .select(['id', 'age']) - * ) - * .selectFrom('jennifers') - * .selectAll() - * .execute() - * ``` - */ - with(nameOrBuilder, expression) { - const cte = parseCommonTableExpression(nameOrBuilder, expression); - return new QueryCreator({ - ...this.#props, - withNode: this.#props.withNode - ? WithNode.cloneWithExpression(this.#props.withNode, cte) - : WithNode.create(cte), - }); - } - /** - * Creates a recursive `with` query (Common Table Expression). - * - * Note that recursiveness is a property of the whole `with` statement. - * You cannot have recursive and non-recursive CTEs in a same `with` statement. - * Therefore the recursiveness is determined by the **first** `with` or - * `withRecusive` call you make. - * - * See the {@link with} method for examples and more documentation. - */ - withRecursive(nameOrBuilder, expression) { - const cte = parseCommonTableExpression(nameOrBuilder, expression); - return new QueryCreator({ - ...this.#props, - withNode: this.#props.withNode - ? WithNode.cloneWithExpression(this.#props.withNode, cte) - : WithNode.create(cte, { recursive: true }), - }); - } - /** - * Returns a copy of this query creator instance with the given plugin installed. - */ - withPlugin(plugin) { - return new QueryCreator({ - ...this.#props, - executor: this.#props.executor.withPlugin(plugin), - }); - } - /** - * Returns a copy of this query creator instance without any plugins. - */ - withoutPlugins() { - return new QueryCreator({ - ...this.#props, - executor: this.#props.executor.withoutPlugins(), - }); - } - /** - * Sets the schema to be used for all table references that don't explicitly - * specify a schema. - * - * This only affects the query created through the builder returned from - * this method and doesn't modify the `db` instance. - * - * See [this recipe](https://github.com/kysely-org/kysely/blob/master/site/docs/recipes/0007-schemas.md) - * for a more detailed explanation. - * - * ### Examples - * - * ``` - * await db - * .withSchema('mammals') - * .selectFrom('pet') - * .selectAll() - * .innerJoin('public.person', 'public.person.id', 'pet.owner_id') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "mammals"."pet" - * inner join "public"."person" - * on "public"."person"."id" = "mammals"."pet"."owner_id" - * ``` - * - * `withSchema` is smart enough to not add schema for aliases, - * common table expressions or other places where the schema - * doesn't belong to: - * - * ``` - * await db - * .withSchema('mammals') - * .selectFrom('pet as p') - * .select('p.name') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "p"."name" from "mammals"."pet" as "p" - * ``` - */ - withSchema(schema) { - return new QueryCreator({ - ...this.#props, - executor: this.#props.executor.withPluginAtFront(new WithSchemaPlugin(schema)), - }); - } -} diff --git a/node_modules/kysely/dist/esm/query-executor/default-query-executor.d.ts b/node_modules/kysely/dist/esm/query-executor/default-query-executor.d.ts deleted file mode 100644 index 5a224e7..0000000 --- a/node_modules/kysely/dist/esm/query-executor/default-query-executor.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -import type { ConnectionProvider } from '../driver/connection-provider.js'; -import type { DatabaseConnection } from '../driver/database-connection.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { RootOperationNode, QueryCompiler } from '../query-compiler/query-compiler.js'; -import type { KyselyPlugin } from '../plugin/kysely-plugin.js'; -import { QueryExecutorBase } from './query-executor-base.js'; -import type { DialectAdapter } from '../dialect/dialect-adapter.js'; -import type { QueryId } from '../util/query-id.js'; -export declare class DefaultQueryExecutor extends QueryExecutorBase { - #private; - constructor(compiler: QueryCompiler, adapter: DialectAdapter, connectionProvider: ConnectionProvider, plugins?: KyselyPlugin[]); - /** - * Returns the adapter for the current dialect. - */ - get adapter(): DialectAdapter; - /** - * Compiles the transformed query into SQL. You usually want to pass - * the output of {@link transformQuery} into this method but you can - * compile any query using this method. - */ - compileQuery(node: RootOperationNode, queryId: QueryId): CompiledQuery; - /** - * Provides a connection for the callback and takes care of disposing - * the connection after the callback has been run. - */ - provideConnection(consumer: (connection: DatabaseConnection) => Promise): Promise; - /** - * Returns a copy of this executor with a list of plugins added - * as the last plugins. - */ - withPlugins(plugins: ReadonlyArray): DefaultQueryExecutor; - /** - * Returns a copy of this executor with a plugin added as the - * last plugin. - */ - withPlugin(plugin: KyselyPlugin): DefaultQueryExecutor; - /** - * Returns a copy of this executor with a plugin added as the - * first plugin. - */ - withPluginAtFront(plugin: KyselyPlugin): DefaultQueryExecutor; - /** - * Returns a copy of this executor with a new connection provider. - */ - withConnectionProvider(connectionProvider: ConnectionProvider): DefaultQueryExecutor; - /** - * Returns a copy of this executor without any plugins. - */ - withoutPlugins(): DefaultQueryExecutor; -} diff --git a/node_modules/kysely/dist/esm/query-executor/default-query-executor.js b/node_modules/kysely/dist/esm/query-executor/default-query-executor.js deleted file mode 100644 index 97b8460..0000000 --- a/node_modules/kysely/dist/esm/query-executor/default-query-executor.js +++ /dev/null @@ -1,37 +0,0 @@ -/// -import { QueryExecutorBase } from './query-executor-base.js'; -export class DefaultQueryExecutor extends QueryExecutorBase { - #compiler; - #adapter; - #connectionProvider; - constructor(compiler, adapter, connectionProvider, plugins = []) { - super(plugins); - this.#compiler = compiler; - this.#adapter = adapter; - this.#connectionProvider = connectionProvider; - } - get adapter() { - return this.#adapter; - } - compileQuery(node, queryId) { - return this.#compiler.compileQuery(node, queryId); - } - provideConnection(consumer) { - return this.#connectionProvider.provideConnection(consumer); - } - withPlugins(plugins) { - return new DefaultQueryExecutor(this.#compiler, this.#adapter, this.#connectionProvider, [...this.plugins, ...plugins]); - } - withPlugin(plugin) { - return new DefaultQueryExecutor(this.#compiler, this.#adapter, this.#connectionProvider, [...this.plugins, plugin]); - } - withPluginAtFront(plugin) { - return new DefaultQueryExecutor(this.#compiler, this.#adapter, this.#connectionProvider, [plugin, ...this.plugins]); - } - withConnectionProvider(connectionProvider) { - return new DefaultQueryExecutor(this.#compiler, this.#adapter, connectionProvider, [...this.plugins]); - } - withoutPlugins() { - return new DefaultQueryExecutor(this.#compiler, this.#adapter, this.#connectionProvider, []); - } -} diff --git a/node_modules/kysely/dist/esm/query-executor/noop-query-executor.d.ts b/node_modules/kysely/dist/esm/query-executor/noop-query-executor.d.ts deleted file mode 100644 index d9dde83..0000000 --- a/node_modules/kysely/dist/esm/query-executor/noop-query-executor.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { KyselyPlugin } from '../plugin/kysely-plugin.js'; -import type { DialectAdapter } from '../dialect/dialect-adapter.js'; -import { QueryExecutorBase } from './query-executor-base.js'; -/** - * A {@link QueryExecutor} subclass that can be used when you don't - * have a {@link QueryCompiler}, {@link ConnectionProvider} or any - * other needed things to actually execute queries. - */ -export declare class NoopQueryExecutor extends QueryExecutorBase { - /** - * Returns the adapter for the current dialect. - */ - get adapter(): DialectAdapter; - /** - * Compiles the transformed query into SQL. You usually want to pass - * the output of {@link transformQuery} into this method but you can - * compile any query using this method. - */ - compileQuery(): CompiledQuery; - /** - * Provides a connection for the callback and takes care of disposing - * the connection after the callback has been run. - */ - provideConnection(): Promise; - /** - * Returns a copy of this executor with a new connection provider. - */ - withConnectionProvider(): NoopQueryExecutor; - /** - * Returns a copy of this executor with a plugin added as the - * last plugin. - */ - withPlugin(plugin: KyselyPlugin): NoopQueryExecutor; - /** - * Returns a copy of this executor with a list of plugins added - * as the last plugins. - */ - withPlugins(plugins: ReadonlyArray): NoopQueryExecutor; - /** - * Returns a copy of this executor with a plugin added as the - * first plugin. - */ - withPluginAtFront(plugin: KyselyPlugin): NoopQueryExecutor; - /** - * Returns a copy of this executor without any plugins. - */ - withoutPlugins(): NoopQueryExecutor; -} -export declare const NOOP_QUERY_EXECUTOR: NoopQueryExecutor; diff --git a/node_modules/kysely/dist/esm/query-executor/noop-query-executor.js b/node_modules/kysely/dist/esm/query-executor/noop-query-executor.js deleted file mode 100644 index edfb965..0000000 --- a/node_modules/kysely/dist/esm/query-executor/noop-query-executor.js +++ /dev/null @@ -1,34 +0,0 @@ -/// -import { QueryExecutorBase } from './query-executor-base.js'; -/** - * A {@link QueryExecutor} subclass that can be used when you don't - * have a {@link QueryCompiler}, {@link ConnectionProvider} or any - * other needed things to actually execute queries. - */ -export class NoopQueryExecutor extends QueryExecutorBase { - get adapter() { - throw new Error('this query cannot be compiled to SQL'); - } - compileQuery() { - throw new Error('this query cannot be compiled to SQL'); - } - provideConnection() { - throw new Error('this query cannot be executed'); - } - withConnectionProvider() { - throw new Error('this query cannot have a connection provider'); - } - withPlugin(plugin) { - return new NoopQueryExecutor([...this.plugins, plugin]); - } - withPlugins(plugins) { - return new NoopQueryExecutor([...this.plugins, ...plugins]); - } - withPluginAtFront(plugin) { - return new NoopQueryExecutor([plugin, ...this.plugins]); - } - withoutPlugins() { - return new NoopQueryExecutor([]); - } -} -export const NOOP_QUERY_EXECUTOR = new NoopQueryExecutor(); diff --git a/node_modules/kysely/dist/esm/query-executor/query-executor-base.d.ts b/node_modules/kysely/dist/esm/query-executor/query-executor-base.d.ts deleted file mode 100644 index fe84c89..0000000 --- a/node_modules/kysely/dist/esm/query-executor/query-executor-base.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -import type { ConnectionProvider } from '../driver/connection-provider.js'; -import type { DatabaseConnection, QueryResult } from '../driver/database-connection.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { RootOperationNode } from '../query-compiler/query-compiler.js'; -import type { KyselyPlugin } from '../plugin/kysely-plugin.js'; -import type { QueryId } from '../util/query-id.js'; -import type { DialectAdapter } from '../dialect/dialect-adapter.js'; -import type { QueryExecutor } from './query-executor.js'; -export declare abstract class QueryExecutorBase implements QueryExecutor { - #private; - constructor(plugins?: ReadonlyArray); - abstract get adapter(): DialectAdapter; - /** - * Returns all installed plugins. - */ - get plugins(): ReadonlyArray; - /** - * Given the query the user has built (expressed as an operation node tree) - * this method runs it through all plugins' `transformQuery` methods and - * returns the result. - */ - transformQuery(node: T, queryId: QueryId): T; - /** - * Compiles the transformed query into SQL. You usually want to pass - * the output of {@link transformQuery} into this method but you can - * compile any query using this method. - */ - abstract compileQuery(node: RootOperationNode, queryId: QueryId): CompiledQuery; - /** - * Provides a connection for the callback and takes care of disposing - * the connection after the callback has been run. - */ - abstract provideConnection(consumer: (connection: DatabaseConnection) => Promise): Promise; - /** - * Executes a compiled query and runs the result through all plugins' - * `transformResult` method. - */ - executeQuery(compiledQuery: CompiledQuery): Promise>; - /** - * Executes a compiled query and runs the result through all plugins' - * `transformResult` method. Results are streamead instead of loaded - * at once. - */ - stream(compiledQuery: CompiledQuery, chunkSize: number): AsyncIterableIterator>; - /** - * Returns a copy of this executor with a new connection provider. - */ - abstract withConnectionProvider(connectionProvider: ConnectionProvider): QueryExecutorBase; - /** - * Returns a copy of this executor with a plugin added as the - * last plugin. - */ - abstract withPlugin(plugin: KyselyPlugin): QueryExecutorBase; - /** - * Returns a copy of this executor with a list of plugins added - * as the last plugins. - */ - abstract withPlugins(plugin: ReadonlyArray): QueryExecutorBase; - /** - * Returns a copy of this executor with a plugin added as the - * first plugin. - */ - abstract withPluginAtFront(plugin: KyselyPlugin): QueryExecutorBase; - /** - * Returns a copy of this executor without any plugins. - */ - abstract withoutPlugins(): QueryExecutorBase; -} diff --git a/node_modules/kysely/dist/esm/query-executor/query-executor-base.js b/node_modules/kysely/dist/esm/query-executor/query-executor-base.js deleted file mode 100644 index baa20bc..0000000 --- a/node_modules/kysely/dist/esm/query-executor/query-executor-base.js +++ /dev/null @@ -1,59 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { provideControlledConnection } from '../util/provide-controlled-connection.js'; -import { logOnce } from '../util/log-once.js'; -const NO_PLUGINS = freeze([]); -export class QueryExecutorBase { - #plugins; - constructor(plugins = NO_PLUGINS) { - this.#plugins = plugins; - } - get plugins() { - return this.#plugins; - } - transformQuery(node, queryId) { - for (const plugin of this.#plugins) { - const transformedNode = plugin.transformQuery({ node, queryId }); - // We need to do a runtime check here. There is no good way - // to write types that enforce this constraint. - if (transformedNode.kind === node.kind) { - node = transformedNode; - } - else { - throw new Error([ - `KyselyPlugin.transformQuery must return a node`, - `of the same kind that was given to it.`, - `The plugin was given a ${node.kind}`, - `but it returned a ${transformedNode.kind}`, - ].join(' ')); - } - } - return node; - } - async executeQuery(compiledQuery) { - return await this.provideConnection(async (connection) => { - const result = await connection.executeQuery(compiledQuery); - if ('numUpdatedOrDeletedRows' in result) { - logOnce('kysely:warning: outdated driver/plugin detected! `QueryResult.numUpdatedOrDeletedRows` has been replaced with `QueryResult.numAffectedRows`.'); - } - return await this.#transformResult(result, compiledQuery.queryId); - }); - } - async *stream(compiledQuery, chunkSize) { - const { connection, release } = await provideControlledConnection(this); - try { - for await (const result of connection.streamQuery(compiledQuery, chunkSize)) { - yield await this.#transformResult(result, compiledQuery.queryId); - } - } - finally { - release(); - } - } - async #transformResult(result, queryId) { - for (const plugin of this.#plugins) { - result = await plugin.transformResult({ result, queryId }); - } - return result; - } -} diff --git a/node_modules/kysely/dist/esm/query-executor/query-executor-provider.d.ts b/node_modules/kysely/dist/esm/query-executor/query-executor-provider.d.ts deleted file mode 100644 index b3a2566..0000000 --- a/node_modules/kysely/dist/esm/query-executor/query-executor-provider.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { QueryExecutor } from './query-executor.js'; -/** - * @internal - * @private - */ -export interface QueryExecutorProvider { - getExecutor(): QueryExecutor; -} diff --git a/node_modules/kysely/dist/esm/query-executor/query-executor-provider.js b/node_modules/kysely/dist/esm/query-executor/query-executor-provider.js deleted file mode 100644 index d70ed78..0000000 --- a/node_modules/kysely/dist/esm/query-executor/query-executor-provider.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/query-executor/query-executor.d.ts b/node_modules/kysely/dist/esm/query-executor/query-executor.d.ts deleted file mode 100644 index 2ddce73..0000000 --- a/node_modules/kysely/dist/esm/query-executor/query-executor.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -import type { ConnectionProvider } from '../driver/connection-provider.js'; -import type { QueryResult } from '../driver/database-connection.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { RootOperationNode } from '../query-compiler/query-compiler.js'; -import type { KyselyPlugin } from '../plugin/kysely-plugin.js'; -import type { QueryId } from '../util/query-id.js'; -import type { DialectAdapter } from '../dialect/dialect-adapter.js'; -/** - * This interface abstracts away the details of how to compile a query into SQL - * and execute it. Instead of passing around all those details, {@link SelectQueryBuilder} - * and other classes that execute queries can just pass around and instance of - * `QueryExecutor`. - */ -export interface QueryExecutor extends ConnectionProvider { - /** - * Returns the adapter for the current dialect. - */ - get adapter(): DialectAdapter; - /** - * Returns all installed plugins. - */ - get plugins(): ReadonlyArray; - /** - * Given the query the user has built (expressed as an operation node tree) - * this method runs it through all plugins' `transformQuery` methods and - * returns the result. - */ - transformQuery(node: T, queryId: QueryId): T; - /** - * Compiles the transformed query into SQL. You usually want to pass - * the output of {@link transformQuery} into this method but you can - * compile any query using this method. - */ - compileQuery(node: RootOperationNode, queryId: QueryId): CompiledQuery; - /** - * Executes a compiled query and runs the result through all plugins' - * `transformResult` method. - */ - executeQuery(compiledQuery: CompiledQuery): Promise>; - /** - * Executes a compiled query and runs the result through all plugins' - * `transformResult` method. Results are streamead instead of loaded - * at once. - */ - stream(compiledQuery: CompiledQuery, - /** - * How many rows should be pulled from the database at once. Supported - * only by the postgres driver. - */ - chunkSize: number): AsyncIterableIterator>; - /** - * Returns a copy of this executor with a new connection provider. - */ - withConnectionProvider(connectionProvider: ConnectionProvider): QueryExecutor; - /** - * Returns a copy of this executor with a plugin added as the - * last plugin. - */ - withPlugin(plugin: KyselyPlugin): QueryExecutor; - /** - * Returns a copy of this executor with a list of plugins added - * as the last plugins. - */ - withPlugins(plugin: ReadonlyArray): QueryExecutor; - /** - * Returns a copy of this executor with a plugin added as the - * first plugin. - */ - withPluginAtFront(plugin: KyselyPlugin): QueryExecutor; - /** - * Returns a copy of this executor without any plugins. - */ - withoutPlugins(): QueryExecutor; -} diff --git a/node_modules/kysely/dist/esm/query-executor/query-executor.js b/node_modules/kysely/dist/esm/query-executor/query-executor.js deleted file mode 100644 index 04079f6..0000000 --- a/node_modules/kysely/dist/esm/query-executor/query-executor.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/raw-builder/raw-builder.d.ts b/node_modules/kysely/dist/esm/raw-builder/raw-builder.d.ts deleted file mode 100644 index 5d6920a..0000000 --- a/node_modules/kysely/dist/esm/raw-builder/raw-builder.d.ts +++ /dev/null @@ -1,218 +0,0 @@ -import type { QueryResult } from '../driver/database-connection.js'; -import type { RawNode } from '../operation-node/raw-node.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { KyselyPlugin } from '../plugin/kysely-plugin.js'; -import type { QueryExecutorProvider } from '../query-executor/query-executor-provider.js'; -import type { QueryId } from '../util/query-id.js'; -import type { AliasableExpression, AliasedExpression, Expression } from '../expression/expression.js'; -/** - * An instance of this class can be used to create raw SQL snippets or queries. - * - * You shouldn't need to create `RawBuilder` instances directly. Instead you should - * use the {@link sql} template tag. - */ -export interface RawBuilder extends AliasableExpression { - get isRawBuilder(): true; - /** - * Returns an aliased version of the SQL expression. - * - * In addition to slapping `as "the_alias"` to the end of the SQL, - * this method also provides strict typing: - * - * ```ts - * import { sql } from 'kysely' - * - * const result = await db - * .selectFrom('person') - * .select( - * sql`concat(first_name, ' ', last_name)`.as('full_name') - * ) - * .executeTakeFirstOrThrow() - * - * // `full_name: string` field exists in the result type. - * console.log(result.full_name) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select concat(first_name, ' ', last_name) as "full_name" - * from "person" - * ``` - * - * You can also pass in a raw SQL snippet but in that case you must - * provide the alias as the only type argument: - * - * ```ts - * import { sql } from 'kysely' - * - * const values = sql<{ a: number, b: string }>`(values (1, 'foo'))` - * - * // The alias is `t(a, b)` which specifies the column names - * // in addition to the table name. We must tell kysely that - * // columns of the table can be referenced through `t` - * // by providing an explicit type argument. - * const aliasedValues = values.as<'t'>(sql`t(a, b)`) - * - * await db - * .insertInto('person') - * .columns(['first_name', 'last_name']) - * .expression( - * db.selectFrom(aliasedValues).select(['t.a', 't.b']) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name") - * from (values (1, 'foo')) as t(a, b) - * select "t"."a", "t"."b" - * ``` - */ - as(alias: A): AliasedRawBuilder; - /** - * Returns an aliased version of the expression. - * - * ### Examples - * - * In addition to slapping `as "the_alias"` at the end of the expression, - * this method also provides strict typing: - * - * ```ts - * const result = await db - * .selectFrom('person') - * .select((eb) => - * // `eb.fn` returns an AliasableExpression - * eb.fn('concat', ['first_name', eb.val(' '), 'last_name']).as('full_name') - * ) - * .executeTakeFirstOrThrow() - * - * // `full_name: string` field exists in the result type. - * console.log(result.full_name) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select - * concat("first_name", $1, "last_name") as "full_name" - * from - * "person" - * ``` - * - * You can also pass in a raw SQL snippet (or any expression) but in that case you must - * provide the alias as the only type argument: - * - * ```ts - * import { sql } from 'kysely' - * - * const values = sql<{ a: number, b: string }>`(values (1, 'foo'))` - * - * // The alias is `t(a, b)` which specifies the column names - * // in addition to the table name. We must tell kysely that - * // columns of the table can be referenced through `t` - * // by providing an explicit type argument. - * const aliasedValues = values.as<'t'>(sql`t(a, b)`) - * - * await db - * .insertInto('person') - * .columns(['first_name', 'last_name']) - * .expression( - * db.selectFrom(aliasedValues).select(['t.a', 't.b']) - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * insert into "person" ("first_name", "last_name") - * from (values (1, 'foo')) as t(a, b) - * select "t"."a", "t"."b" - * ``` - */ - as(alias: Expression): AliasedRawBuilder; - /** - * Change the output type of the raw expression. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of this `RawBuilder` with a new output type. - */ - $castTo(): RawBuilder; - /** - * Omit null from the expression's type. - * - * This function can be useful in cases where you know an expression can't be - * null, but Kysely is unable to infer it. - * - * This method call doesn't change the SQL in any way. This methods simply - * returns a copy of `this` with a new output type. - */ - $notNull(): RawBuilder>; - /** - * Adds a plugin for this SQL snippet. - */ - withPlugin(plugin: KyselyPlugin): RawBuilder; - /** - * Compiles the builder to a `CompiledQuery`. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * const compiledQuery = sql`select * from ${sql.table('person')}`.compile(db) - * console.log(compiledQuery.sql) - * ``` - */ - compile(executorProvider: QueryExecutorProvider): CompiledQuery; - /** - * Executes the raw query. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * const result = await sql`select * from ${sql.table('person')}`.execute(db) - * ``` - */ - execute(executorProvider: QueryExecutorProvider): Promise>; - /** - * Creates the OperationNode that describes how to compile this expression into SQL. - * - * ### Examples - * - * If you are creating a custom expression, it's often easiest to use the {@link sql} - * template tag to build the node: - * - * ```ts - * import { type Expression, type OperationNode, sql } from 'kysely' - * - * class SomeExpression implements Expression { - * get expressionType(): T | undefined { - * return undefined - * } - * - * toOperationNode(): OperationNode { - * return sql`some sql here`.toOperationNode() - * } - * } - * ``` - */ - toOperationNode(): RawNode; -} -export interface RawBuilderProps { - readonly queryId: QueryId; - readonly rawNode: RawNode; - readonly plugins?: ReadonlyArray; -} -export declare function createRawBuilder(props: RawBuilderProps): RawBuilder; -/** - * {@link RawBuilder} with an alias. The result of calling {@link RawBuilder.as}. - */ -export interface AliasedRawBuilder extends AliasedExpression { - get rawBuilder(): RawBuilder; -} diff --git a/node_modules/kysely/dist/esm/raw-builder/raw-builder.js b/node_modules/kysely/dist/esm/raw-builder/raw-builder.js deleted file mode 100644 index 52833dc..0000000 --- a/node_modules/kysely/dist/esm/raw-builder/raw-builder.js +++ /dev/null @@ -1,84 +0,0 @@ -/// -import { AliasNode } from '../operation-node/alias-node.js'; -import { freeze } from '../util/object-utils.js'; -import { NOOP_QUERY_EXECUTOR } from '../query-executor/noop-query-executor.js'; -import { IdentifierNode } from '../operation-node/identifier-node.js'; -import { isOperationNodeSource } from '../operation-node/operation-node-source.js'; -class RawBuilderImpl { - #props; - constructor(props) { - this.#props = freeze(props); - } - get expressionType() { - return undefined; - } - get isRawBuilder() { - return true; - } - as(alias) { - return new AliasedRawBuilderImpl(this, alias); - } - $castTo() { - return new RawBuilderImpl({ ...this.#props }); - } - $notNull() { - return new RawBuilderImpl(this.#props); - } - withPlugin(plugin) { - return new RawBuilderImpl({ - ...this.#props, - plugins: this.#props.plugins !== undefined - ? freeze([...this.#props.plugins, plugin]) - : freeze([plugin]), - }); - } - toOperationNode() { - return this.#toOperationNode(this.#getExecutor()); - } - compile(executorProvider) { - return this.#compile(this.#getExecutor(executorProvider)); - } - async execute(executorProvider) { - const executor = this.#getExecutor(executorProvider); - return executor.executeQuery(this.#compile(executor)); - } - #getExecutor(executorProvider) { - const executor = executorProvider !== undefined - ? executorProvider.getExecutor() - : NOOP_QUERY_EXECUTOR; - return this.#props.plugins !== undefined - ? executor.withPlugins(this.#props.plugins) - : executor; - } - #toOperationNode(executor) { - return executor.transformQuery(this.#props.rawNode, this.#props.queryId); - } - #compile(executor) { - return executor.compileQuery(this.#toOperationNode(executor), this.#props.queryId); - } -} -export function createRawBuilder(props) { - return new RawBuilderImpl(props); -} -class AliasedRawBuilderImpl { - #rawBuilder; - #alias; - constructor(rawBuilder, alias) { - this.#rawBuilder = rawBuilder; - this.#alias = alias; - } - get expression() { - return this.#rawBuilder; - } - get alias() { - return this.#alias; - } - get rawBuilder() { - return this.#rawBuilder; - } - toOperationNode() { - return AliasNode.create(this.#rawBuilder.toOperationNode(), isOperationNodeSource(this.#alias) - ? this.#alias.toOperationNode() - : IdentifierNode.create(this.#alias)); - } -} diff --git a/node_modules/kysely/dist/esm/raw-builder/sql.d.ts b/node_modules/kysely/dist/esm/raw-builder/sql.d.ts deleted file mode 100644 index 8e6022f..0000000 --- a/node_modules/kysely/dist/esm/raw-builder/sql.d.ts +++ /dev/null @@ -1,366 +0,0 @@ -import { type RawBuilder } from './raw-builder.js'; -export interface Sql { - /** - * Template tag for creating raw SQL snippets and queries. - * - * ```ts - * import { sql } from 'kysely' - * import type { Person } from 'type-editor' // imaginary module - * - * const id = 123 - * const snippet = sql`select * from person where id = ${id}` - * ``` - * - * Substitutions (the things inside `${}`) are automatically passed to the database - * as parameters and are never interpolated to the SQL string. There's no need to worry - * about SQL injection vulnerabilities. Substitutions can be values, other `sql` - * expressions, queries and almost anything else Kysely can produce and they get - * handled correctly. See the examples below. - * - * If you need your substitutions to be interpreted as identifiers, value literals or - * lists of things, see the {@link Sql.ref}, {@link Sql.table}, {@link Sql.id}, - * {@link Sql.lit}, {@link Sql.raw} and {@link Sql.join} functions. - * - * You can pass sql snippets returned by the `sql` tag pretty much anywhere. Whenever - * something can't be done using the Kysely API, you should be able to drop down to - * raw SQL using the `sql` tag. Here's an example query that uses raw sql in a bunch - * of methods: - * - * ```ts - * import { sql } from 'kysely' - * - * const nicknames = ['johnny', 'john', 'jon'] - * const date1 = new Date('2000-01-01') - * const date2 = new Date('2001-01-01') - * - * const persons = await db - * .selectFrom('person') - * .select( - * // If you use `sql` in a select statement, remember to call the `as` - * // method to give it an alias. - * sql`concat(first_name, ' ', last_name)`.as('full_name') - * ) - * .where(sql`birthdate between ${date1} and ${date2}`) - * // Here we assume we have list of nicknames for the person - * // (a list of strings) and we use the PostgreSQL `@>` operator - * // to test if all of them are valid nicknames for the user. - * .where('nicknames', '@>', sql`ARRAY[${sql.join(nicknames)}]`) - * .orderBy(sql`concat(first_name, ' ', last_name)`) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select concat(first_name, ' ', last_name) as "full_name" - * from "person" - * where birthdate between $1 and $2 - * and "nicknames" @> ARRAY[$3, $4, $5, $6, $7, $8, $9, $10] - * order by concat(first_name, ' ', last_name) - * ``` - * - * SQL snippets can be executed by calling the `execute` method and passing a `Kysely` - * instance as the only argument: - * - * ```ts - * import { sql } from 'kysely' - * import type { Person } from 'type-editor' - * - * const { rows: results } = await sql`select * from person`.execute(db) - * ``` - * - * You can merge other `sql` expressions and queries using substitutions: - * - * ```ts - * import { sql } from 'kysely' - * - * const petName = db.selectFrom('pet').select('name').limit(1) - * const fullName = sql`concat(first_name, ' ', last_name)` - * - * sql<{ full_name: string; pet_name: string }[]>` - * select ${fullName} as full_name, ${petName} as pet_name - * from person - * `.execute(db) - * ``` - * - * Substitutions also handle {@link ExpressionBuilder.ref}, - * {@link DynamicModule.ref} and pretty much anything else you - * throw at it. Here's an example of calling a function in a - * type-safe way: - * - * ```ts - * db.selectFrom('person') - * .select([ - * 'first_name', - * 'last_name', - * (eb) => { - * // The `eb.ref` method is type-safe and only accepts - * // column references that are possible. - * const firstName = eb.ref('first_name') - * const lastName = eb.ref('last_name') - * - * const fullName = sql`concat(${firstName}, ' ', ${lastName})` - * return fullName.as('full_name') - * } - * ]) - * ``` - * - * don't know if that amount of ceremony is worth the small increase in - * type-safety though... But it's possible. - */ - (sqlFragments: TemplateStringsArray, ...parameters: unknown[]): RawBuilder; - /** - * `sql.val(value)` is a shortcut for: - * - * ```ts - * import { sql } from 'kysely' - * - * const value = 123 - * type ValueType = typeof value - * - * sql`${value}` - * ``` - */ - val(value: V): RawBuilder; - /** - * @deprecated Use {@link Sql.val} instead. - */ - value(value: V): RawBuilder; - /** - * This can be used to add runtime column references to SQL snippets. - * - * By default `${}` substitutions in {@link sql} template strings get - * transformed into parameters. You can use this function to tell - * Kysely to interpret them as column references instead. - * - * WARNING! Using this with unchecked inputs WILL lead to SQL injection - * vulnerabilities. The input is not checked or escaped by Kysely in any way. - * - * ```ts - * const columnRef = 'first_name' - * - * sql`select ${sql.ref(columnRef)} from person` - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "first_name" from person - * ``` - * - * The references can also include a table name: - * - * ```ts - * const columnRef = 'person.first_name' - * - * sql`select ${sql.ref(columnRef)}} from person` - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "person"."first_name" from person - * ``` - * - * The references can also include a schema on supported databases: - * - * ```ts - * const columnRef = 'public.person.first_name' - * - * sql`select ${sql.ref(columnRef)}} from person` - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "public"."person"."first_name" from person - * ``` - */ - ref(columnReference: string): RawBuilder; - /** - * This can be used to add runtime table references to SQL snippets. - * - * By default `${}` substitutions in {@link sql} template strings get - * transformed into parameters. You can use this function to tell - * Kysely to interpret them as table references instead. - * - * WARNING! Using this with unchecked inputs WILL lead to SQL injection - * vulnerabilities. The input is not checked or escaped by Kysely in any way. - * - * ```ts - * const table = 'person' - * - * sql`select first_name from ${sql.table(table)}` - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select first_name from "person" - * ``` - * - * The references can also include a schema on supported databases: - * - * ```ts - * const table = 'public.person' - * - * sql`select first_name from ${sql.table(table)}` - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select first_name from "public"."person" - * ``` - */ - table(tableReference: string): RawBuilder; - /** - * This can be used to add arbitrary identifiers to SQL snippets. - * - * Does the same thing as {@link Sql.ref | ref} and {@link Sql.table | table} - * but can also be used for any other identifiers like index names. - * - * You should use {@link Sql.ref | ref} and {@link Sql.table | table} - * instead of this whenever possible as they produce a more semantic - * operation node tree. - * - * WARNING! Using this with unchecked inputs WILL lead to SQL injection - * vulnerabilities. The input is not checked or escaped by Kysely in any way. - * - * ```ts - * const indexName = 'person_first_name_index' - * - * sql`create index ${indexName} on person` - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create index "person_first_name_index" on person - * ``` - * - * Multiple identifiers get separated by dots: - * - * ```ts - * const schema = 'public' - * const columnName = 'first_name' - * const table = 'person' - * - * sql`select ${sql.id(schema, table, columnName)} from ${sql.id(schema, table)}` - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select "public"."person"."first_name" from "public"."person" - * ``` - */ - id(...ids: readonly string[]): RawBuilder; - /** - * This can be used to add literal values to SQL snippets. - * - * WARNING! Using this with unchecked inputs WILL lead to SQL injection - * vulnerabilities. The input is not checked or escaped by Kysely in any way. - * You almost always want to use normal substitutions that get sent to the - * db as parameters. - * - * ```ts - * const firstName = 'first_name' - * - * sql`select * from person where first_name = ${sql.lit(firstName)}` - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from person where first_name = 'first_name' - * ``` - * - * As you can see from the example above, the value was added directly to - * the SQL string instead of as a parameter. Only use this function when - * something can't be sent as a parameter. - */ - lit(value: V): RawBuilder; - /** - * @deprecated Use {@link lit} instead. - */ - literal(value: V): RawBuilder; - /** - * This can be used to add arbitrary runtime SQL to SQL snippets. - * - * WARNING! Using this with unchecked inputs WILL lead to SQL injection - * vulnerabilities. The input is not checked or escaped by Kysely in any way. - * - * ```ts - * const firstName = "'first_name'" - * - * sql`select * from person where first_name = ${sql.raw(firstName)}` - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from person where first_name = 'first_name' - * ``` - * - * Note that the difference to `sql.lit` is that this function - * doesn't assume the inputs are values. The input to this function - * can be any sql and it's simply glued to the parent string as-is. - */ - raw(anySql: string): RawBuilder; - /** - * This can be used to add lists of things to SQL snippets. - * - * ### Examples - * - * ```ts - * import type { Person } from 'type-editor' // imaginary module - * - * function findByNicknames(nicknames: string[]): Promise { - * return db - * .selectFrom('person') - * .selectAll() - * .where('nicknames', '@>', sql`ARRAY[${sql.join(nicknames)}]`) - * .execute() - * } - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * select * from "person" - * where "nicknames" @> ARRAY[$1, $2, $3, $4, $5, $6, $7, $8] - * ``` - * - * The second argument is the joining SQL expression that defaults - * to - * - * ```ts - * sql`, ` - * ``` - * - * In addition to values, items in the list can be also {@link sql} - * expressions, queries or anything else the normal substitutions - * support: - * - * ```ts - * const things = [ - * 123, - * sql`(1 == 1)`, - * db.selectFrom('person').selectAll(), - * sql.lit(false), - * sql.id('first_name') - * ] - * - * sql`BEFORE ${sql.join(things, sql`::varchar, `)} AFTER` - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * BEFORE $1::varchar, (1 == 1)::varchar, (select * from "person")::varchar, false::varchar, "first_name" AFTER - * ``` - */ - join(array: readonly unknown[], separator?: RawBuilder): RawBuilder; -} -export declare const sql: Sql; diff --git a/node_modules/kysely/dist/esm/raw-builder/sql.js b/node_modules/kysely/dist/esm/raw-builder/sql.js deleted file mode 100644 index 0feb300..0000000 --- a/node_modules/kysely/dist/esm/raw-builder/sql.js +++ /dev/null @@ -1,82 +0,0 @@ -/// -import { IdentifierNode } from '../operation-node/identifier-node.js'; -import { isOperationNodeSource } from '../operation-node/operation-node-source.js'; -import { RawNode } from '../operation-node/raw-node.js'; -import { ValueNode } from '../operation-node/value-node.js'; -import { parseStringReference } from '../parser/reference-parser.js'; -import { parseTable } from '../parser/table-parser.js'; -import { parseValueExpression } from '../parser/value-parser.js'; -import { createQueryId } from '../util/query-id.js'; -import { createRawBuilder } from './raw-builder.js'; -export const sql = Object.assign((sqlFragments, ...parameters) => { - return createRawBuilder({ - queryId: createQueryId(), - rawNode: RawNode.create(sqlFragments, parameters?.map(parseParameter) ?? []), - }); -}, { - ref(columnReference) { - return createRawBuilder({ - queryId: createQueryId(), - rawNode: RawNode.createWithChild(parseStringReference(columnReference)), - }); - }, - val(value) { - return createRawBuilder({ - queryId: createQueryId(), - rawNode: RawNode.createWithChild(parseValueExpression(value)), - }); - }, - value(value) { - return this.val(value); - }, - table(tableReference) { - return createRawBuilder({ - queryId: createQueryId(), - rawNode: RawNode.createWithChild(parseTable(tableReference)), - }); - }, - id(...ids) { - const fragments = new Array(ids.length + 1).fill('.'); - fragments[0] = ''; - fragments[fragments.length - 1] = ''; - return createRawBuilder({ - queryId: createQueryId(), - rawNode: RawNode.create(fragments, ids.map(IdentifierNode.create)), - }); - }, - lit(value) { - return createRawBuilder({ - queryId: createQueryId(), - rawNode: RawNode.createWithChild(ValueNode.createImmediate(value)), - }); - }, - literal(value) { - return this.lit(value); - }, - raw(sql) { - return createRawBuilder({ - queryId: createQueryId(), - rawNode: RawNode.createWithSql(sql), - }); - }, - join(array, separator = sql `, `) { - const nodes = new Array(Math.max(2 * array.length - 1, 0)); - const sep = separator.toOperationNode(); - for (let i = 0; i < array.length; ++i) { - nodes[2 * i] = parseParameter(array[i]); - if (i !== array.length - 1) { - nodes[2 * i + 1] = sep; - } - } - return createRawBuilder({ - queryId: createQueryId(), - rawNode: RawNode.createWithChildren(nodes), - }); - }, -}); -function parseParameter(param) { - if (isOperationNodeSource(param)) { - return param.toOperationNode(); - } - return parseValueExpression(param); -} diff --git a/node_modules/kysely/dist/esm/schema/alter-column-builder.d.ts b/node_modules/kysely/dist/esm/schema/alter-column-builder.d.ts deleted file mode 100644 index 947a022..0000000 --- a/node_modules/kysely/dist/esm/schema/alter-column-builder.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { AlterColumnNode } from '../operation-node/alter-column-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { type DataTypeExpression } from '../parser/data-type-parser.js'; -import { type DefaultValueExpression } from '../parser/default-value-parser.js'; -export declare class AlterColumnBuilder { - #private; - constructor(column: string); - setDataType(dataType: DataTypeExpression): AlteredColumnBuilder; - setDefault(value: DefaultValueExpression): AlteredColumnBuilder; - dropDefault(): AlteredColumnBuilder; - setNotNull(): AlteredColumnBuilder; - dropNotNull(): AlteredColumnBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; -} -/** - * Allows us to force consumers to do exactly one alteration to a column. - * - * One cannot do no alterations: - * - * ```ts - * await db.schema - * .alterTable('person') - * // .execute() // Property 'execute' does not exist on type 'AlteredColumnBuilder'. - * ``` - * - * ```ts - * await db.schema - * .alterTable('person') - * // .alterColumn('age', (ac) => ac) // Type 'AlterColumnBuilder' is not assignable to type 'AlteredColumnBuilder'. - * // .execute() - * ``` - * - * One cannot do multiple alterations: - * - * ```ts - * await db.schema - * .alterTable('person') - * // .alterColumn('age', (ac) => ac.dropNotNull().setNotNull()) // Property 'setNotNull' does not exist on type 'AlteredColumnBuilder'. - * // .execute() - * ``` - * - * Which would now throw a compilation error, instead of a runtime error. - */ -export declare class AlteredColumnBuilder implements OperationNodeSource { - #private; - constructor(alterColumnNode: AlterColumnNode); - toOperationNode(): AlterColumnNode; -} -export type AlterColumnBuilderCallback = (builder: AlterColumnBuilder) => AlteredColumnBuilder; diff --git a/node_modules/kysely/dist/esm/schema/alter-column-builder.js b/node_modules/kysely/dist/esm/schema/alter-column-builder.js deleted file mode 100644 index ebdbc3c..0000000 --- a/node_modules/kysely/dist/esm/schema/alter-column-builder.js +++ /dev/null @@ -1,70 +0,0 @@ -/// -import { AlterColumnNode } from '../operation-node/alter-column-node.js'; -import { parseDataTypeExpression, } from '../parser/data-type-parser.js'; -import { parseDefaultValueExpression, } from '../parser/default-value-parser.js'; -export class AlterColumnBuilder { - #column; - constructor(column) { - this.#column = column; - } - setDataType(dataType) { - return new AlteredColumnBuilder(AlterColumnNode.create(this.#column, 'dataType', parseDataTypeExpression(dataType))); - } - setDefault(value) { - return new AlteredColumnBuilder(AlterColumnNode.create(this.#column, 'setDefault', parseDefaultValueExpression(value))); - } - dropDefault() { - return new AlteredColumnBuilder(AlterColumnNode.create(this.#column, 'dropDefault', true)); - } - setNotNull() { - return new AlteredColumnBuilder(AlterColumnNode.create(this.#column, 'setNotNull', true)); - } - dropNotNull() { - return new AlteredColumnBuilder(AlterColumnNode.create(this.#column, 'dropNotNull', true)); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } -} -/** - * Allows us to force consumers to do exactly one alteration to a column. - * - * One cannot do no alterations: - * - * ```ts - * await db.schema - * .alterTable('person') - * // .execute() // Property 'execute' does not exist on type 'AlteredColumnBuilder'. - * ``` - * - * ```ts - * await db.schema - * .alterTable('person') - * // .alterColumn('age', (ac) => ac) // Type 'AlterColumnBuilder' is not assignable to type 'AlteredColumnBuilder'. - * // .execute() - * ``` - * - * One cannot do multiple alterations: - * - * ```ts - * await db.schema - * .alterTable('person') - * // .alterColumn('age', (ac) => ac.dropNotNull().setNotNull()) // Property 'setNotNull' does not exist on type 'AlteredColumnBuilder'. - * // .execute() - * ``` - * - * Which would now throw a compilation error, instead of a runtime error. - */ -export class AlteredColumnBuilder { - #alterColumnNode; - constructor(alterColumnNode) { - this.#alterColumnNode = alterColumnNode; - } - toOperationNode() { - return this.#alterColumnNode; - } -} diff --git a/node_modules/kysely/dist/esm/schema/alter-table-add-foreign-key-constraint-builder.d.ts b/node_modules/kysely/dist/esm/schema/alter-table-add-foreign-key-constraint-builder.d.ts deleted file mode 100644 index 7f510ec..0000000 --- a/node_modules/kysely/dist/esm/schema/alter-table-add-foreign-key-constraint-builder.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { AlterTableNode } from '../operation-node/alter-table-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { OnModifyForeignAction } from '../operation-node/references-node.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryId } from '../util/query-id.js'; -import type { ForeignKeyConstraintBuilder, ForeignKeyConstraintBuilderInterface } from './foreign-key-constraint-builder.js'; -export declare class AlterTableAddForeignKeyConstraintBuilder implements ForeignKeyConstraintBuilderInterface, OperationNodeSource, Compilable { - #private; - constructor(props: AlterTableAddForeignKeyConstraintBuilderProps); - onDelete(onDelete: OnModifyForeignAction): AlterTableAddForeignKeyConstraintBuilder; - onUpdate(onUpdate: OnModifyForeignAction): AlterTableAddForeignKeyConstraintBuilder; - deferrable(): AlterTableAddForeignKeyConstraintBuilder; - notDeferrable(): AlterTableAddForeignKeyConstraintBuilder; - initiallyDeferred(): AlterTableAddForeignKeyConstraintBuilder; - initiallyImmediate(): AlterTableAddForeignKeyConstraintBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): AlterTableNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface AlterTableAddForeignKeyConstraintBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: AlterTableNode; - readonly constraintBuilder: ForeignKeyConstraintBuilder; -} diff --git a/node_modules/kysely/dist/esm/schema/alter-table-add-foreign-key-constraint-builder.js b/node_modules/kysely/dist/esm/schema/alter-table-add-foreign-key-constraint-builder.js deleted file mode 100644 index 6401009..0000000 --- a/node_modules/kysely/dist/esm/schema/alter-table-add-foreign-key-constraint-builder.js +++ /dev/null @@ -1,64 +0,0 @@ -/// -import { AddConstraintNode } from '../operation-node/add-constraint-node.js'; -import { AlterTableNode } from '../operation-node/alter-table-node.js'; -import { freeze } from '../util/object-utils.js'; -export class AlterTableAddForeignKeyConstraintBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - onDelete(onDelete) { - return new AlterTableAddForeignKeyConstraintBuilder({ - ...this.#props, - constraintBuilder: this.#props.constraintBuilder.onDelete(onDelete), - }); - } - onUpdate(onUpdate) { - return new AlterTableAddForeignKeyConstraintBuilder({ - ...this.#props, - constraintBuilder: this.#props.constraintBuilder.onUpdate(onUpdate), - }); - } - deferrable() { - return new AlterTableAddForeignKeyConstraintBuilder({ - ...this.#props, - constraintBuilder: this.#props.constraintBuilder.deferrable(), - }); - } - notDeferrable() { - return new AlterTableAddForeignKeyConstraintBuilder({ - ...this.#props, - constraintBuilder: this.#props.constraintBuilder.notDeferrable(), - }); - } - initiallyDeferred() { - return new AlterTableAddForeignKeyConstraintBuilder({ - ...this.#props, - constraintBuilder: this.#props.constraintBuilder.initiallyDeferred(), - }); - } - initiallyImmediate() { - return new AlterTableAddForeignKeyConstraintBuilder({ - ...this.#props, - constraintBuilder: this.#props.constraintBuilder.initiallyImmediate(), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(AlterTableNode.cloneWithTableProps(this.#props.node, { - addConstraint: AddConstraintNode.create(this.#props.constraintBuilder.toOperationNode()), - }), this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} diff --git a/node_modules/kysely/dist/esm/schema/alter-table-add-index-builder.d.ts b/node_modules/kysely/dist/esm/schema/alter-table-add-index-builder.d.ts deleted file mode 100644 index 48c3ca9..0000000 --- a/node_modules/kysely/dist/esm/schema/alter-table-add-index-builder.d.ts +++ /dev/null @@ -1,138 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -import { AlterTableNode } from '../operation-node/alter-table-node.js'; -import type { IndexType } from '../operation-node/create-index-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { type OrderedColumnName } from '../parser/reference-parser.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryId } from '../util/query-id.js'; -export declare class AlterTableAddIndexBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: AlterTableAddIndexBuilderProps); - /** - * Makes the index unique. - * - * ### Examples - * - * ```ts - * await db.schema - * .alterTable('person') - * .addIndex('person_first_name_index') - * .unique() - * .column('email') - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` add unique index `person_first_name_index` (`email`) - * ``` - */ - unique(): AlterTableAddIndexBuilder; - /** - * Adds a column to the index. - * - * Also see {@link columns} for adding multiple columns at once or {@link expression} - * for specifying an arbitrary expression. - * - * ### Examples - * - * ```ts - * await db.schema - * .alterTable('person') - * .addIndex('person_first_name_and_age_index') - * .column('first_name') - * .column('age desc') - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` add index `person_first_name_and_age_index` (`first_name`, `age` desc) - * ``` - */ - column(column: OrderedColumnName): AlterTableAddIndexBuilder; - /** - * Specifies a list of columns for the index. - * - * Also see {@link column} for adding a single column or {@link expression} for - * specifying an arbitrary expression. - * - * ### Examples - * - * ```ts - * await db.schema - * .alterTable('person') - * .addIndex('person_first_name_and_age_index') - * .columns(['first_name', 'age desc']) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` add index `person_first_name_and_age_index` (`first_name`, `age` desc) - * ``` - */ - columns(columns: OrderedColumnName[]): AlterTableAddIndexBuilder; - /** - * Specifies an arbitrary expression for the index. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .alterTable('person') - * .addIndex('person_first_name_index') - * .expression(sql`(first_name < 'Sami')`) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` add index `person_first_name_index` ((first_name < 'Sami')) - * ``` - */ - expression(expression: Expression): AlterTableAddIndexBuilder; - /** - * Specifies the index type. - * - * ### Examples - * - * ```ts - * await db.schema - * .alterTable('person') - * .addIndex('person_first_name_index') - * .column('first_name') - * .using('hash') - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` add index `person_first_name_index` (`first_name`) using hash - * ``` - */ - using(indexType: IndexType): AlterTableAddIndexBuilder; - using(indexType: string): AlterTableAddIndexBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): AlterTableNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface AlterTableAddIndexBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: AlterTableNode; -} diff --git a/node_modules/kysely/dist/esm/schema/alter-table-add-index-builder.js b/node_modules/kysely/dist/esm/schema/alter-table-add-index-builder.js deleted file mode 100644 index 14c64b1..0000000 --- a/node_modules/kysely/dist/esm/schema/alter-table-add-index-builder.js +++ /dev/null @@ -1,162 +0,0 @@ -/// -import { AddIndexNode } from '../operation-node/add-index-node.js'; -import { AlterTableNode } from '../operation-node/alter-table-node.js'; -import { RawNode } from '../operation-node/raw-node.js'; -import { parseOrderedColumnName, } from '../parser/reference-parser.js'; -import { freeze } from '../util/object-utils.js'; -export class AlterTableAddIndexBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - /** - * Makes the index unique. - * - * ### Examples - * - * ```ts - * await db.schema - * .alterTable('person') - * .addIndex('person_first_name_index') - * .unique() - * .column('email') - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` add unique index `person_first_name_index` (`email`) - * ``` - */ - unique() { - return new AlterTableAddIndexBuilder({ - ...this.#props, - node: AlterTableNode.cloneWithTableProps(this.#props.node, { - addIndex: AddIndexNode.cloneWith(this.#props.node.addIndex, { - unique: true, - }), - }), - }); - } - /** - * Adds a column to the index. - * - * Also see {@link columns} for adding multiple columns at once or {@link expression} - * for specifying an arbitrary expression. - * - * ### Examples - * - * ```ts - * await db.schema - * .alterTable('person') - * .addIndex('person_first_name_and_age_index') - * .column('first_name') - * .column('age desc') - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` add index `person_first_name_and_age_index` (`first_name`, `age` desc) - * ``` - */ - column(column) { - return new AlterTableAddIndexBuilder({ - ...this.#props, - node: AlterTableNode.cloneWithTableProps(this.#props.node, { - addIndex: AddIndexNode.cloneWithColumns(this.#props.node.addIndex, [ - parseOrderedColumnName(column), - ]), - }), - }); - } - /** - * Specifies a list of columns for the index. - * - * Also see {@link column} for adding a single column or {@link expression} for - * specifying an arbitrary expression. - * - * ### Examples - * - * ```ts - * await db.schema - * .alterTable('person') - * .addIndex('person_first_name_and_age_index') - * .columns(['first_name', 'age desc']) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` add index `person_first_name_and_age_index` (`first_name`, `age` desc) - * ``` - */ - columns(columns) { - return new AlterTableAddIndexBuilder({ - ...this.#props, - node: AlterTableNode.cloneWithTableProps(this.#props.node, { - addIndex: AddIndexNode.cloneWithColumns(this.#props.node.addIndex, columns.map(parseOrderedColumnName)), - }), - }); - } - /** - * Specifies an arbitrary expression for the index. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .alterTable('person') - * .addIndex('person_first_name_index') - * .expression(sql`(first_name < 'Sami')`) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` add index `person_first_name_index` ((first_name < 'Sami')) - * ``` - */ - expression(expression) { - return new AlterTableAddIndexBuilder({ - ...this.#props, - node: AlterTableNode.cloneWithTableProps(this.#props.node, { - addIndex: AddIndexNode.cloneWithColumns(this.#props.node.addIndex, [ - expression.toOperationNode(), - ]), - }), - }); - } - using(indexType) { - return new AlterTableAddIndexBuilder({ - ...this.#props, - node: AlterTableNode.cloneWithTableProps(this.#props.node, { - addIndex: AddIndexNode.cloneWith(this.#props.node.addIndex, { - using: RawNode.createWithSql(indexType), - }), - }), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} diff --git a/node_modules/kysely/dist/esm/schema/alter-table-builder.d.ts b/node_modules/kysely/dist/esm/schema/alter-table-builder.d.ts deleted file mode 100644 index 76e6da1..0000000 --- a/node_modules/kysely/dist/esm/schema/alter-table-builder.d.ts +++ /dev/null @@ -1,148 +0,0 @@ -import { AlterTableNode } from '../operation-node/alter-table-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from '../util/compilable.js'; -import { type ColumnDefinitionBuilderCallback } from './column-definition-builder.js'; -import type { QueryId } from '../util/query-id.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import { type DataTypeExpression } from '../parser/data-type-parser.js'; -import { type ForeignKeyConstraintBuilderCallback } from './foreign-key-constraint-builder.js'; -import type { Expression } from '../expression/expression.js'; -import { type AlterColumnBuilderCallback } from './alter-column-builder.js'; -import { AlterTableExecutor } from './alter-table-executor.js'; -import { AlterTableAddForeignKeyConstraintBuilder } from './alter-table-add-foreign-key-constraint-builder.js'; -import { AlterTableDropConstraintBuilder } from './alter-table-drop-constraint-builder.js'; -import { AlterTableAddIndexBuilder } from './alter-table-add-index-builder.js'; -import { type UniqueConstraintNodeBuilderCallback } from './unique-constraint-builder.js'; -import { type PrimaryKeyConstraintBuilderCallback } from './primary-key-constraint-builder.js'; -import { type CheckConstraintBuilderCallback } from './check-constraint-builder.js'; -/** - * This builder can be used to create a `alter table` query. - */ -export declare class AlterTableBuilder implements ColumnAlteringInterface { - #private; - constructor(props: AlterTableBuilderProps); - renameTo(newTableName: string): AlterTableExecutor; - setSchema(newSchema: string): AlterTableExecutor; - alterColumn(column: string, alteration: AlterColumnBuilderCallback): AlterTableColumnAlteringBuilder; - dropColumn(column: string): AlterTableColumnAlteringBuilder; - renameColumn(column: string, newColumn: string): AlterTableColumnAlteringBuilder; - /** - * See {@link CreateTableBuilder.addColumn} - */ - addColumn(columnName: string, dataType: DataTypeExpression, build?: ColumnDefinitionBuilderCallback): AlterTableColumnAlteringBuilder; - /** - * Creates an `alter table modify column` query. The `modify column` statement - * is only implemeted by MySQL and oracle AFAIK. On other databases you - * should use the `alterColumn` method. - */ - modifyColumn(columnName: string, dataType: DataTypeExpression, build?: ColumnDefinitionBuilderCallback): AlterTableColumnAlteringBuilder; - /** - * See {@link CreateTableBuilder.addUniqueConstraint} - */ - addUniqueConstraint(constraintName: string, columns: string[], build?: UniqueConstraintNodeBuilderCallback): AlterTableExecutor; - /** - * See {@link CreateTableBuilder.addCheckConstraint} - */ - addCheckConstraint(constraintName: string, checkExpression: Expression, build?: CheckConstraintBuilderCallback): AlterTableExecutor; - /** - * See {@link CreateTableBuilder.addForeignKeyConstraint} - * - * Unlike {@link CreateTableBuilder.addForeignKeyConstraint} this method returns - * the constraint builder and doesn't take a callback as the last argument. This - * is because you can only add one column per `ALTER TABLE` query. - */ - addForeignKeyConstraint(constraintName: string, columns: string[], targetTable: string, targetColumns: string[], build?: ForeignKeyConstraintBuilderCallback): AlterTableAddForeignKeyConstraintBuilder; - /** - * See {@link CreateTableBuilder.addPrimaryKeyConstraint} - */ - addPrimaryKeyConstraint(constraintName: string, columns: string[], build?: PrimaryKeyConstraintBuilderCallback): AlterTableExecutor; - dropConstraint(constraintName: string): AlterTableDropConstraintBuilder; - renameConstraint(oldName: string, newName: string): AlterTableDropConstraintBuilder; - /** - * This can be used to add index to table. - * - * ### Examples - * - * ```ts - * db.schema.alterTable('person') - * .addIndex('person_email_index') - * .column('email') - * .unique() - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` add unique index `person_email_index` (`email`) - * ``` - */ - addIndex(indexName: string): AlterTableAddIndexBuilder; - /** - * This can be used to drop index from table. - * - * ### Examples - * - * ```ts - * db.schema.alterTable('person') - * .dropIndex('person_email_index') - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` drop index `test_first_name_index` - * ``` - */ - dropIndex(indexName: string): AlterTableExecutor; - /** - * Calls the given function passing `this` as the only argument. - * - * See {@link CreateTableBuilder.$call} - */ - $call(func: (qb: this) => T): T; -} -export interface AlterTableBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: AlterTableNode; -} -export interface ColumnAlteringInterface { - alterColumn(column: string, alteration: AlterColumnBuilderCallback): ColumnAlteringInterface; - dropColumn(column: string): ColumnAlteringInterface; - renameColumn(column: string, newColumn: string): ColumnAlteringInterface; - /** - * See {@link CreateTableBuilder.addColumn} - */ - addColumn(columnName: string, dataType: DataTypeExpression, build?: ColumnDefinitionBuilderCallback): ColumnAlteringInterface; - /** - * Creates an `alter table modify column` query. The `modify column` statement - * is only implemeted by MySQL and oracle AFAIK. On other databases you - * should use the `alterColumn` method. - */ - modifyColumn(columnName: string, dataType: DataTypeExpression, build: ColumnDefinitionBuilderCallback): ColumnAlteringInterface; -} -export declare class AlterTableColumnAlteringBuilder implements ColumnAlteringInterface, OperationNodeSource, Compilable { - #private; - constructor(props: AlterTableColumnAlteringBuilderProps); - alterColumn(column: string, alteration: AlterColumnBuilderCallback): AlterTableColumnAlteringBuilder; - dropColumn(column: string): AlterTableColumnAlteringBuilder; - renameColumn(column: string, newColumn: string): AlterTableColumnAlteringBuilder; - /** - * See {@link CreateTableBuilder.addColumn} - */ - addColumn(columnName: string, dataType: DataTypeExpression, build?: ColumnDefinitionBuilderCallback): AlterTableColumnAlteringBuilder; - /** - * Creates an `alter table modify column` query. The `modify column` statement - * is only implemeted by MySQL and oracle AFAIK. On other databases you - * should use the `alterColumn` method. - */ - modifyColumn(columnName: string, dataType: DataTypeExpression, build?: ColumnDefinitionBuilderCallback): AlterTableColumnAlteringBuilder; - toOperationNode(): AlterTableNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface AlterTableColumnAlteringBuilderProps extends AlterTableBuilderProps { -} diff --git a/node_modules/kysely/dist/esm/schema/alter-table-builder.js b/node_modules/kysely/dist/esm/schema/alter-table-builder.js deleted file mode 100644 index 2bdcd09..0000000 --- a/node_modules/kysely/dist/esm/schema/alter-table-builder.js +++ /dev/null @@ -1,263 +0,0 @@ -/// -import { AddColumnNode } from '../operation-node/add-column-node.js'; -import { AlterTableNode } from '../operation-node/alter-table-node.js'; -import { ColumnDefinitionNode } from '../operation-node/column-definition-node.js'; -import { DropColumnNode } from '../operation-node/drop-column-node.js'; -import { IdentifierNode } from '../operation-node/identifier-node.js'; -import { RenameColumnNode } from '../operation-node/rename-column-node.js'; -import { freeze, noop } from '../util/object-utils.js'; -import { ColumnDefinitionBuilder, } from './column-definition-builder.js'; -import { ModifyColumnNode } from '../operation-node/modify-column-node.js'; -import { parseDataTypeExpression, } from '../parser/data-type-parser.js'; -import { ForeignKeyConstraintBuilder, } from './foreign-key-constraint-builder.js'; -import { AddConstraintNode } from '../operation-node/add-constraint-node.js'; -import { UniqueConstraintNode } from '../operation-node/unique-constraint-node.js'; -import { CheckConstraintNode } from '../operation-node/check-constraint-node.js'; -import { ForeignKeyConstraintNode } from '../operation-node/foreign-key-constraint-node.js'; -import { ColumnNode } from '../operation-node/column-node.js'; -import { parseTable } from '../parser/table-parser.js'; -import { DropConstraintNode } from '../operation-node/drop-constraint-node.js'; -import { AlterColumnBuilder, } from './alter-column-builder.js'; -import { AlterTableExecutor } from './alter-table-executor.js'; -import { AlterTableAddForeignKeyConstraintBuilder } from './alter-table-add-foreign-key-constraint-builder.js'; -import { AlterTableDropConstraintBuilder } from './alter-table-drop-constraint-builder.js'; -import { PrimaryKeyConstraintNode } from '../operation-node/primary-key-constraint-node.js'; -import { DropIndexNode } from '../operation-node/drop-index-node.js'; -import { AddIndexNode } from '../operation-node/add-index-node.js'; -import { AlterTableAddIndexBuilder } from './alter-table-add-index-builder.js'; -import { UniqueConstraintNodeBuilder, } from './unique-constraint-builder.js'; -import { PrimaryKeyConstraintBuilder, } from './primary-key-constraint-builder.js'; -import { CheckConstraintBuilder, } from './check-constraint-builder.js'; -import { RenameConstraintNode } from '../operation-node/rename-constraint-node.js'; -/** - * This builder can be used to create a `alter table` query. - */ -export class AlterTableBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - renameTo(newTableName) { - return new AlterTableExecutor({ - ...this.#props, - node: AlterTableNode.cloneWithTableProps(this.#props.node, { - renameTo: parseTable(newTableName), - }), - }); - } - setSchema(newSchema) { - return new AlterTableExecutor({ - ...this.#props, - node: AlterTableNode.cloneWithTableProps(this.#props.node, { - setSchema: IdentifierNode.create(newSchema), - }), - }); - } - alterColumn(column, alteration) { - const builder = alteration(new AlterColumnBuilder(column)); - return new AlterTableColumnAlteringBuilder({ - ...this.#props, - node: AlterTableNode.cloneWithColumnAlteration(this.#props.node, builder.toOperationNode()), - }); - } - dropColumn(column) { - return new AlterTableColumnAlteringBuilder({ - ...this.#props, - node: AlterTableNode.cloneWithColumnAlteration(this.#props.node, DropColumnNode.create(column)), - }); - } - renameColumn(column, newColumn) { - return new AlterTableColumnAlteringBuilder({ - ...this.#props, - node: AlterTableNode.cloneWithColumnAlteration(this.#props.node, RenameColumnNode.create(column, newColumn)), - }); - } - addColumn(columnName, dataType, build = noop) { - const builder = build(new ColumnDefinitionBuilder(ColumnDefinitionNode.create(columnName, parseDataTypeExpression(dataType)))); - return new AlterTableColumnAlteringBuilder({ - ...this.#props, - node: AlterTableNode.cloneWithColumnAlteration(this.#props.node, AddColumnNode.create(builder.toOperationNode())), - }); - } - modifyColumn(columnName, dataType, build = noop) { - const builder = build(new ColumnDefinitionBuilder(ColumnDefinitionNode.create(columnName, parseDataTypeExpression(dataType)))); - return new AlterTableColumnAlteringBuilder({ - ...this.#props, - node: AlterTableNode.cloneWithColumnAlteration(this.#props.node, ModifyColumnNode.create(builder.toOperationNode())), - }); - } - /** - * See {@link CreateTableBuilder.addUniqueConstraint} - */ - addUniqueConstraint(constraintName, columns, build = noop) { - const uniqueConstraintBuilder = build(new UniqueConstraintNodeBuilder(UniqueConstraintNode.create(columns, constraintName))); - return new AlterTableExecutor({ - ...this.#props, - node: AlterTableNode.cloneWithTableProps(this.#props.node, { - addConstraint: AddConstraintNode.create(uniqueConstraintBuilder.toOperationNode()), - }), - }); - } - /** - * See {@link CreateTableBuilder.addCheckConstraint} - */ - addCheckConstraint(constraintName, checkExpression, build = noop) { - const constraintBuilder = build(new CheckConstraintBuilder(CheckConstraintNode.create(checkExpression.toOperationNode(), constraintName))); - return new AlterTableExecutor({ - ...this.#props, - node: AlterTableNode.cloneWithTableProps(this.#props.node, { - addConstraint: AddConstraintNode.create(constraintBuilder.toOperationNode()), - }), - }); - } - /** - * See {@link CreateTableBuilder.addForeignKeyConstraint} - * - * Unlike {@link CreateTableBuilder.addForeignKeyConstraint} this method returns - * the constraint builder and doesn't take a callback as the last argument. This - * is because you can only add one column per `ALTER TABLE` query. - */ - addForeignKeyConstraint(constraintName, columns, targetTable, targetColumns, build = noop) { - const constraintBuilder = build(new ForeignKeyConstraintBuilder(ForeignKeyConstraintNode.create(columns.map(ColumnNode.create), parseTable(targetTable), targetColumns.map(ColumnNode.create), constraintName))); - return new AlterTableAddForeignKeyConstraintBuilder({ - ...this.#props, - constraintBuilder, - }); - } - /** - * See {@link CreateTableBuilder.addPrimaryKeyConstraint} - */ - addPrimaryKeyConstraint(constraintName, columns, build = noop) { - const constraintBuilder = build(new PrimaryKeyConstraintBuilder(PrimaryKeyConstraintNode.create(columns, constraintName))); - return new AlterTableExecutor({ - ...this.#props, - node: AlterTableNode.cloneWithTableProps(this.#props.node, { - addConstraint: AddConstraintNode.create(constraintBuilder.toOperationNode()), - }), - }); - } - dropConstraint(constraintName) { - return new AlterTableDropConstraintBuilder({ - ...this.#props, - node: AlterTableNode.cloneWithTableProps(this.#props.node, { - dropConstraint: DropConstraintNode.create(constraintName), - }), - }); - } - renameConstraint(oldName, newName) { - return new AlterTableDropConstraintBuilder({ - ...this.#props, - node: AlterTableNode.cloneWithTableProps(this.#props.node, { - renameConstraint: RenameConstraintNode.create(oldName, newName), - }), - }); - } - /** - * This can be used to add index to table. - * - * ### Examples - * - * ```ts - * db.schema.alterTable('person') - * .addIndex('person_email_index') - * .column('email') - * .unique() - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` add unique index `person_email_index` (`email`) - * ``` - */ - addIndex(indexName) { - return new AlterTableAddIndexBuilder({ - ...this.#props, - node: AlterTableNode.cloneWithTableProps(this.#props.node, { - addIndex: AddIndexNode.create(indexName), - }), - }); - } - /** - * This can be used to drop index from table. - * - * ### Examples - * - * ```ts - * db.schema.alterTable('person') - * .dropIndex('person_email_index') - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * alter table `person` drop index `test_first_name_index` - * ``` - */ - dropIndex(indexName) { - return new AlterTableExecutor({ - ...this.#props, - node: AlterTableNode.cloneWithTableProps(this.#props.node, { - dropIndex: DropIndexNode.create(indexName), - }), - }); - } - /** - * Calls the given function passing `this` as the only argument. - * - * See {@link CreateTableBuilder.$call} - */ - $call(func) { - return func(this); - } -} -export class AlterTableColumnAlteringBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - alterColumn(column, alteration) { - const builder = alteration(new AlterColumnBuilder(column)); - return new AlterTableColumnAlteringBuilder({ - ...this.#props, - node: AlterTableNode.cloneWithColumnAlteration(this.#props.node, builder.toOperationNode()), - }); - } - dropColumn(column) { - return new AlterTableColumnAlteringBuilder({ - ...this.#props, - node: AlterTableNode.cloneWithColumnAlteration(this.#props.node, DropColumnNode.create(column)), - }); - } - renameColumn(column, newColumn) { - return new AlterTableColumnAlteringBuilder({ - ...this.#props, - node: AlterTableNode.cloneWithColumnAlteration(this.#props.node, RenameColumnNode.create(column, newColumn)), - }); - } - addColumn(columnName, dataType, build = noop) { - const builder = build(new ColumnDefinitionBuilder(ColumnDefinitionNode.create(columnName, parseDataTypeExpression(dataType)))); - return new AlterTableColumnAlteringBuilder({ - ...this.#props, - node: AlterTableNode.cloneWithColumnAlteration(this.#props.node, AddColumnNode.create(builder.toOperationNode())), - }); - } - modifyColumn(columnName, dataType, build = noop) { - const builder = build(new ColumnDefinitionBuilder(ColumnDefinitionNode.create(columnName, parseDataTypeExpression(dataType)))); - return new AlterTableColumnAlteringBuilder({ - ...this.#props, - node: AlterTableNode.cloneWithColumnAlteration(this.#props.node, ModifyColumnNode.create(builder.toOperationNode())), - }); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} diff --git a/node_modules/kysely/dist/esm/schema/alter-table-drop-constraint-builder.d.ts b/node_modules/kysely/dist/esm/schema/alter-table-drop-constraint-builder.d.ts deleted file mode 100644 index 4f82658..0000000 --- a/node_modules/kysely/dist/esm/schema/alter-table-drop-constraint-builder.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { AlterTableNode } from '../operation-node/alter-table-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryId } from '../util/query-id.js'; -export declare class AlterTableDropConstraintBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: AlterTableDropConstraintBuilderProps); - ifExists(): AlterTableDropConstraintBuilder; - cascade(): AlterTableDropConstraintBuilder; - restrict(): AlterTableDropConstraintBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): AlterTableNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface AlterTableDropConstraintBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: AlterTableNode; -} diff --git a/node_modules/kysely/dist/esm/schema/alter-table-drop-constraint-builder.js b/node_modules/kysely/dist/esm/schema/alter-table-drop-constraint-builder.js deleted file mode 100644 index 414bf38..0000000 --- a/node_modules/kysely/dist/esm/schema/alter-table-drop-constraint-builder.js +++ /dev/null @@ -1,56 +0,0 @@ -/// -import { AlterTableNode } from '../operation-node/alter-table-node.js'; -import { DropConstraintNode } from '../operation-node/drop-constraint-node.js'; -import { freeze } from '../util/object-utils.js'; -export class AlterTableDropConstraintBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - ifExists() { - return new AlterTableDropConstraintBuilder({ - ...this.#props, - node: AlterTableNode.cloneWithTableProps(this.#props.node, { - dropConstraint: DropConstraintNode.cloneWith(this.#props.node.dropConstraint, { - ifExists: true, - }), - }), - }); - } - cascade() { - return new AlterTableDropConstraintBuilder({ - ...this.#props, - node: AlterTableNode.cloneWithTableProps(this.#props.node, { - dropConstraint: DropConstraintNode.cloneWith(this.#props.node.dropConstraint, { - modifier: 'cascade', - }), - }), - }); - } - restrict() { - return new AlterTableDropConstraintBuilder({ - ...this.#props, - node: AlterTableNode.cloneWithTableProps(this.#props.node, { - dropConstraint: DropConstraintNode.cloneWith(this.#props.node.dropConstraint, { - modifier: 'restrict', - }), - }), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} diff --git a/node_modules/kysely/dist/esm/schema/alter-table-executor.d.ts b/node_modules/kysely/dist/esm/schema/alter-table-executor.d.ts deleted file mode 100644 index 309398b..0000000 --- a/node_modules/kysely/dist/esm/schema/alter-table-executor.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { AlterTableNode } from '../operation-node/alter-table-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryId } from '../util/query-id.js'; -export declare class AlterTableExecutor implements OperationNodeSource, Compilable { - #private; - constructor(props: AlterTableExecutorProps); - toOperationNode(): AlterTableNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface AlterTableExecutorProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: AlterTableNode; -} diff --git a/node_modules/kysely/dist/esm/schema/alter-table-executor.js b/node_modules/kysely/dist/esm/schema/alter-table-executor.js deleted file mode 100644 index 2be2f2c..0000000 --- a/node_modules/kysely/dist/esm/schema/alter-table-executor.js +++ /dev/null @@ -1,17 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -export class AlterTableExecutor { - #props; - constructor(props) { - this.#props = freeze(props); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} diff --git a/node_modules/kysely/dist/esm/schema/check-constraint-builder.d.ts b/node_modules/kysely/dist/esm/schema/check-constraint-builder.d.ts deleted file mode 100644 index f073045..0000000 --- a/node_modules/kysely/dist/esm/schema/check-constraint-builder.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CheckConstraintNode } from '../operation-node/check-constraint-node.js'; -export declare class CheckConstraintBuilder implements OperationNodeSource { - #private; - constructor(node: CheckConstraintNode); - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): CheckConstraintNode; -} -export type CheckConstraintBuilderCallback = (builder: CheckConstraintBuilder) => CheckConstraintBuilder; diff --git a/node_modules/kysely/dist/esm/schema/check-constraint-builder.js b/node_modules/kysely/dist/esm/schema/check-constraint-builder.js deleted file mode 100644 index fbdc997..0000000 --- a/node_modules/kysely/dist/esm/schema/check-constraint-builder.js +++ /dev/null @@ -1,17 +0,0 @@ -/// -export class CheckConstraintBuilder { - #node; - constructor(node) { - this.#node = node; - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#node; - } -} diff --git a/node_modules/kysely/dist/esm/schema/column-definition-builder.d.ts b/node_modules/kysely/dist/esm/schema/column-definition-builder.d.ts deleted file mode 100644 index dff3979..0000000 --- a/node_modules/kysely/dist/esm/schema/column-definition-builder.d.ts +++ /dev/null @@ -1,514 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { type OnModifyForeignAction } from '../operation-node/references-node.js'; -import { ColumnDefinitionNode } from '../operation-node/column-definition-node.js'; -import { type DefaultValueExpression } from '../parser/default-value-parser.js'; -import type { Expression } from '../expression/expression.js'; -export declare class ColumnDefinitionBuilder implements OperationNodeSource { - #private; - constructor(node: ColumnDefinitionNode); - /** - * Adds `auto_increment` or `autoincrement` to the column definition - * depending on the dialect. - * - * Some dialects like PostgreSQL don't support this. On PostgreSQL - * you can use the `serial` or `bigserial` data type instead. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.autoIncrement().primaryKey()) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `id` integer primary key auto_increment - * ) - * ``` - */ - autoIncrement(): ColumnDefinitionBuilder; - /** - * Makes the column an identity column. - * - * This only works on some dialects like MS SQL Server (MSSQL). - * - * For PostgreSQL's `generated always as identity` use {@link generatedAlwaysAsIdentity}. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.identity().primaryKey()) - * .execute() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * create table "person" ( - * "id" integer identity primary key - * ) - * ``` - */ - identity(): ColumnDefinitionBuilder; - /** - * Makes the column the primary key. - * - * If you want to specify a composite primary key use the - * {@link CreateTableBuilder.addPrimaryKeyConstraint} method. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.primaryKey()) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `id` integer primary key - * ) - */ - primaryKey(): ColumnDefinitionBuilder; - /** - * Adds a foreign key constraint for the column. - * - * If your database engine doesn't support foreign key constraints in the - * column definition (like MySQL 5) you need to call the table level - * {@link CreateTableBuilder.addForeignKeyConstraint} method instead. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn('owner_id', 'integer', (col) => col.references('person.id')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create table "pet" ( - * "owner_id" integer references "person" ("id") - * ) - * ``` - */ - references(ref: string): ColumnDefinitionBuilder; - /** - * Adds an `on delete` constraint for the foreign key column. - * - * If your database engine doesn't support foreign key constraints in the - * column definition (like MySQL 5) you need to call the table level - * {@link CreateTableBuilder.addForeignKeyConstraint} method instead. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn( - * 'owner_id', - * 'integer', - * (col) => col.references('person.id').onDelete('cascade') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create table "pet" ( - * "owner_id" integer references "person" ("id") on delete cascade - * ) - * ``` - */ - onDelete(onDelete: OnModifyForeignAction): ColumnDefinitionBuilder; - /** - * Adds an `on update` constraint for the foreign key column. - * - * If your database engine doesn't support foreign key constraints in the - * column definition (like MySQL 5) you need to call the table level - * {@link CreateTableBuilder.addForeignKeyConstraint} method instead. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn( - * 'owner_id', - * 'integer', - * (col) => col.references('person.id').onUpdate('cascade') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create table "pet" ( - * "owner_id" integer references "person" ("id") on update cascade - * ) - * ``` - */ - onUpdate(onUpdate: OnModifyForeignAction): ColumnDefinitionBuilder; - /** - * Adds a unique constraint for the column. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('email', 'varchar(255)', col => col.unique()) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `email` varchar(255) unique - * ) - * ``` - */ - unique(): ColumnDefinitionBuilder; - /** - * Adds a `not null` constraint for the column. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('first_name', 'varchar(255)', col => col.notNull()) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `first_name` varchar(255) not null - * ) - * ``` - */ - notNull(): ColumnDefinitionBuilder; - /** - * Adds a `unsigned` modifier for the column. - * - * This only works on some dialects like MySQL. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('age', 'integer', col => col.unsigned()) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `age` integer unsigned - * ) - * ``` - */ - unsigned(): ColumnDefinitionBuilder; - /** - * Adds a default value constraint for the column. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn('number_of_legs', 'integer', (col) => col.defaultTo(4)) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `pet` ( - * `number_of_legs` integer default 4 - * ) - * ``` - * - * Values passed to `defaultTo` are interpreted as value literals by default. You can define - * an arbitrary SQL expression using the {@link sql} template tag: - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('pet') - * .addColumn( - * 'created_at', - * 'timestamp', - * (col) => col.defaultTo(sql`CURRENT_TIMESTAMP`) - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `pet` ( - * `created_at` timestamp default CURRENT_TIMESTAMP - * ) - * ``` - */ - defaultTo(value: DefaultValueExpression): ColumnDefinitionBuilder; - /** - * Adds a check constraint for the column. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('pet') - * .addColumn('number_of_legs', 'integer', (col) => - * col.check(sql`number_of_legs < 5`) - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `pet` ( - * `number_of_legs` integer check (number_of_legs < 5) - * ) - * ``` - */ - check(expression: Expression): ColumnDefinitionBuilder; - /** - * Makes the column a generated column using a `generated always as` statement. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .addColumn('full_name', 'varchar(255)', - * (col) => col.generatedAlwaysAs(sql`concat(first_name, ' ', last_name)`) - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `full_name` varchar(255) generated always as (concat(first_name, ' ', last_name)) - * ) - * ``` - */ - generatedAlwaysAs(expression: Expression): ColumnDefinitionBuilder; - /** - * Adds the `generated always as identity` specifier. - * - * This only works on some dialects like PostgreSQL. - * - * For MS SQL Server (MSSQL)'s identity column use {@link identity}. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.generatedAlwaysAsIdentity().primaryKey()) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create table "person" ( - * "id" integer generated always as identity primary key - * ) - * ``` - */ - generatedAlwaysAsIdentity(): ColumnDefinitionBuilder; - /** - * Adds the `generated by default as identity` specifier on supported dialects. - * - * This only works on some dialects like PostgreSQL. - * - * For MS SQL Server (MSSQL)'s identity column use {@link identity}. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.generatedByDefaultAsIdentity().primaryKey()) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create table "person" ( - * "id" integer generated by default as identity primary key - * ) - * ``` - */ - generatedByDefaultAsIdentity(): ColumnDefinitionBuilder; - /** - * Makes a generated column stored instead of virtual. This method can only - * be used with {@link generatedAlwaysAs} - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .addColumn('full_name', 'varchar(255)', (col) => col - * .generatedAlwaysAs(sql`concat(first_name, ' ', last_name)`) - * .stored() - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `full_name` varchar(255) generated always as (concat(first_name, ' ', last_name)) stored - * ) - * ``` - */ - stored(): ColumnDefinitionBuilder; - /** - * This can be used to add any additional SQL right after the column's data type. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.primaryKey()) - * .addColumn( - * 'first_name', - * 'varchar(36)', - * (col) => col.modifyFront(sql`collate utf8mb4_general_ci`).notNull() - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `id` integer primary key, - * `first_name` varchar(36) collate utf8mb4_general_ci not null - * ) - * ``` - */ - modifyFront(modifier: Expression): ColumnDefinitionBuilder; - /** - * Adds `nulls not distinct` specifier. - * Should be used with `unique` constraint. - * - * This only works on some dialects like PostgreSQL. - * - * ### Examples - * - * ```ts - * db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.primaryKey()) - * .addColumn('first_name', 'varchar(30)', col => col.unique().nullsNotDistinct()) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create table "person" ( - * "id" integer primary key, - * "first_name" varchar(30) unique nulls not distinct - * ) - * ``` - */ - nullsNotDistinct(): ColumnDefinitionBuilder; - /** - * Adds `if not exists` specifier. This only works for PostgreSQL. - * - * ### Examples - * - * ```ts - * await db.schema - * .alterTable('person') - * .addColumn('email', 'varchar(255)', col => col.unique().ifNotExists()) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * alter table "person" add column if not exists "email" varchar(255) unique - * ``` - */ - ifNotExists(): ColumnDefinitionBuilder; - /** - * This can be used to add any additional SQL to the end of the column definition. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.primaryKey()) - * .addColumn( - * 'age', - * 'integer', - * col => col.unsigned() - * .notNull() - * .modifyEnd(sql`comment ${sql.lit('it is not polite to ask a woman her age')}`) - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `id` integer primary key, - * `age` integer unsigned not null comment 'it is not polite to ask a woman her age' - * ) - * ``` - */ - modifyEnd(modifier: Expression): ColumnDefinitionBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): ColumnDefinitionNode; -} -export type ColumnDefinitionBuilderCallback = (builder: ColumnDefinitionBuilder) => ColumnDefinitionBuilder; diff --git a/node_modules/kysely/dist/esm/schema/column-definition-builder.js b/node_modules/kysely/dist/esm/schema/column-definition-builder.js deleted file mode 100644 index c5dbab4..0000000 --- a/node_modules/kysely/dist/esm/schema/column-definition-builder.js +++ /dev/null @@ -1,597 +0,0 @@ -/// -import { CheckConstraintNode } from '../operation-node/check-constraint-node.js'; -import { ReferencesNode, } from '../operation-node/references-node.js'; -import { SelectAllNode } from '../operation-node/select-all-node.js'; -import { parseStringReference } from '../parser/reference-parser.js'; -import { ColumnDefinitionNode } from '../operation-node/column-definition-node.js'; -import { parseDefaultValueExpression, } from '../parser/default-value-parser.js'; -import { GeneratedNode } from '../operation-node/generated-node.js'; -import { DefaultValueNode } from '../operation-node/default-value-node.js'; -import { parseOnModifyForeignAction } from '../parser/on-modify-action-parser.js'; -export class ColumnDefinitionBuilder { - #node; - constructor(node) { - this.#node = node; - } - /** - * Adds `auto_increment` or `autoincrement` to the column definition - * depending on the dialect. - * - * Some dialects like PostgreSQL don't support this. On PostgreSQL - * you can use the `serial` or `bigserial` data type instead. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.autoIncrement().primaryKey()) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `id` integer primary key auto_increment - * ) - * ``` - */ - autoIncrement() { - return new ColumnDefinitionBuilder(ColumnDefinitionNode.cloneWith(this.#node, { autoIncrement: true })); - } - /** - * Makes the column an identity column. - * - * This only works on some dialects like MS SQL Server (MSSQL). - * - * For PostgreSQL's `generated always as identity` use {@link generatedAlwaysAsIdentity}. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.identity().primaryKey()) - * .execute() - * ``` - * - * The generated SQL (MSSQL): - * - * ```sql - * create table "person" ( - * "id" integer identity primary key - * ) - * ``` - */ - identity() { - return new ColumnDefinitionBuilder(ColumnDefinitionNode.cloneWith(this.#node, { identity: true })); - } - /** - * Makes the column the primary key. - * - * If you want to specify a composite primary key use the - * {@link CreateTableBuilder.addPrimaryKeyConstraint} method. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.primaryKey()) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `id` integer primary key - * ) - */ - primaryKey() { - return new ColumnDefinitionBuilder(ColumnDefinitionNode.cloneWith(this.#node, { primaryKey: true })); - } - /** - * Adds a foreign key constraint for the column. - * - * If your database engine doesn't support foreign key constraints in the - * column definition (like MySQL 5) you need to call the table level - * {@link CreateTableBuilder.addForeignKeyConstraint} method instead. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn('owner_id', 'integer', (col) => col.references('person.id')) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create table "pet" ( - * "owner_id" integer references "person" ("id") - * ) - * ``` - */ - references(ref) { - const references = parseStringReference(ref); - if (!references.table || SelectAllNode.is(references.column)) { - throw new Error(`invalid call references('${ref}'). The reference must have format table.column or schema.table.column`); - } - return new ColumnDefinitionBuilder(ColumnDefinitionNode.cloneWith(this.#node, { - references: ReferencesNode.create(references.table, [ - references.column, - ]), - })); - } - /** - * Adds an `on delete` constraint for the foreign key column. - * - * If your database engine doesn't support foreign key constraints in the - * column definition (like MySQL 5) you need to call the table level - * {@link CreateTableBuilder.addForeignKeyConstraint} method instead. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn( - * 'owner_id', - * 'integer', - * (col) => col.references('person.id').onDelete('cascade') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create table "pet" ( - * "owner_id" integer references "person" ("id") on delete cascade - * ) - * ``` - */ - onDelete(onDelete) { - if (!this.#node.references) { - throw new Error('on delete constraint can only be added for foreign keys'); - } - return new ColumnDefinitionBuilder(ColumnDefinitionNode.cloneWith(this.#node, { - references: ReferencesNode.cloneWithOnDelete(this.#node.references, parseOnModifyForeignAction(onDelete)), - })); - } - /** - * Adds an `on update` constraint for the foreign key column. - * - * If your database engine doesn't support foreign key constraints in the - * column definition (like MySQL 5) you need to call the table level - * {@link CreateTableBuilder.addForeignKeyConstraint} method instead. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn( - * 'owner_id', - * 'integer', - * (col) => col.references('person.id').onUpdate('cascade') - * ) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create table "pet" ( - * "owner_id" integer references "person" ("id") on update cascade - * ) - * ``` - */ - onUpdate(onUpdate) { - if (!this.#node.references) { - throw new Error('on update constraint can only be added for foreign keys'); - } - return new ColumnDefinitionBuilder(ColumnDefinitionNode.cloneWith(this.#node, { - references: ReferencesNode.cloneWithOnUpdate(this.#node.references, parseOnModifyForeignAction(onUpdate)), - })); - } - /** - * Adds a unique constraint for the column. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('email', 'varchar(255)', col => col.unique()) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `email` varchar(255) unique - * ) - * ``` - */ - unique() { - return new ColumnDefinitionBuilder(ColumnDefinitionNode.cloneWith(this.#node, { unique: true })); - } - /** - * Adds a `not null` constraint for the column. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('first_name', 'varchar(255)', col => col.notNull()) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `first_name` varchar(255) not null - * ) - * ``` - */ - notNull() { - return new ColumnDefinitionBuilder(ColumnDefinitionNode.cloneWith(this.#node, { notNull: true })); - } - /** - * Adds a `unsigned` modifier for the column. - * - * This only works on some dialects like MySQL. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('age', 'integer', col => col.unsigned()) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `age` integer unsigned - * ) - * ``` - */ - unsigned() { - return new ColumnDefinitionBuilder(ColumnDefinitionNode.cloneWith(this.#node, { unsigned: true })); - } - /** - * Adds a default value constraint for the column. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn('number_of_legs', 'integer', (col) => col.defaultTo(4)) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `pet` ( - * `number_of_legs` integer default 4 - * ) - * ``` - * - * Values passed to `defaultTo` are interpreted as value literals by default. You can define - * an arbitrary SQL expression using the {@link sql} template tag: - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('pet') - * .addColumn( - * 'created_at', - * 'timestamp', - * (col) => col.defaultTo(sql`CURRENT_TIMESTAMP`) - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `pet` ( - * `created_at` timestamp default CURRENT_TIMESTAMP - * ) - * ``` - */ - defaultTo(value) { - return new ColumnDefinitionBuilder(ColumnDefinitionNode.cloneWith(this.#node, { - defaultTo: DefaultValueNode.create(parseDefaultValueExpression(value)), - })); - } - /** - * Adds a check constraint for the column. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('pet') - * .addColumn('number_of_legs', 'integer', (col) => - * col.check(sql`number_of_legs < 5`) - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `pet` ( - * `number_of_legs` integer check (number_of_legs < 5) - * ) - * ``` - */ - check(expression) { - return new ColumnDefinitionBuilder(ColumnDefinitionNode.cloneWith(this.#node, { - check: CheckConstraintNode.create(expression.toOperationNode()), - })); - } - /** - * Makes the column a generated column using a `generated always as` statement. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .addColumn('full_name', 'varchar(255)', - * (col) => col.generatedAlwaysAs(sql`concat(first_name, ' ', last_name)`) - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `full_name` varchar(255) generated always as (concat(first_name, ' ', last_name)) - * ) - * ``` - */ - generatedAlwaysAs(expression) { - return new ColumnDefinitionBuilder(ColumnDefinitionNode.cloneWith(this.#node, { - generated: GeneratedNode.createWithExpression(expression.toOperationNode()), - })); - } - /** - * Adds the `generated always as identity` specifier. - * - * This only works on some dialects like PostgreSQL. - * - * For MS SQL Server (MSSQL)'s identity column use {@link identity}. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.generatedAlwaysAsIdentity().primaryKey()) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create table "person" ( - * "id" integer generated always as identity primary key - * ) - * ``` - */ - generatedAlwaysAsIdentity() { - return new ColumnDefinitionBuilder(ColumnDefinitionNode.cloneWith(this.#node, { - generated: GeneratedNode.create({ identity: true, always: true }), - })); - } - /** - * Adds the `generated by default as identity` specifier on supported dialects. - * - * This only works on some dialects like PostgreSQL. - * - * For MS SQL Server (MSSQL)'s identity column use {@link identity}. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.generatedByDefaultAsIdentity().primaryKey()) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create table "person" ( - * "id" integer generated by default as identity primary key - * ) - * ``` - */ - generatedByDefaultAsIdentity() { - return new ColumnDefinitionBuilder(ColumnDefinitionNode.cloneWith(this.#node, { - generated: GeneratedNode.create({ identity: true, byDefault: true }), - })); - } - /** - * Makes a generated column stored instead of virtual. This method can only - * be used with {@link generatedAlwaysAs} - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .addColumn('full_name', 'varchar(255)', (col) => col - * .generatedAlwaysAs(sql`concat(first_name, ' ', last_name)`) - * .stored() - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `full_name` varchar(255) generated always as (concat(first_name, ' ', last_name)) stored - * ) - * ``` - */ - stored() { - if (!this.#node.generated) { - throw new Error('stored() can only be called after generatedAlwaysAs'); - } - return new ColumnDefinitionBuilder(ColumnDefinitionNode.cloneWith(this.#node, { - generated: GeneratedNode.cloneWith(this.#node.generated, { - stored: true, - }), - })); - } - /** - * This can be used to add any additional SQL right after the column's data type. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.primaryKey()) - * .addColumn( - * 'first_name', - * 'varchar(36)', - * (col) => col.modifyFront(sql`collate utf8mb4_general_ci`).notNull() - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `id` integer primary key, - * `first_name` varchar(36) collate utf8mb4_general_ci not null - * ) - * ``` - */ - modifyFront(modifier) { - return new ColumnDefinitionBuilder(ColumnDefinitionNode.cloneWithFrontModifier(this.#node, modifier.toOperationNode())); - } - /** - * Adds `nulls not distinct` specifier. - * Should be used with `unique` constraint. - * - * This only works on some dialects like PostgreSQL. - * - * ### Examples - * - * ```ts - * db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.primaryKey()) - * .addColumn('first_name', 'varchar(30)', col => col.unique().nullsNotDistinct()) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create table "person" ( - * "id" integer primary key, - * "first_name" varchar(30) unique nulls not distinct - * ) - * ``` - */ - nullsNotDistinct() { - return new ColumnDefinitionBuilder(ColumnDefinitionNode.cloneWith(this.#node, { nullsNotDistinct: true })); - } - /** - * Adds `if not exists` specifier. This only works for PostgreSQL. - * - * ### Examples - * - * ```ts - * await db.schema - * .alterTable('person') - * .addColumn('email', 'varchar(255)', col => col.unique().ifNotExists()) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * alter table "person" add column if not exists "email" varchar(255) unique - * ``` - */ - ifNotExists() { - return new ColumnDefinitionBuilder(ColumnDefinitionNode.cloneWith(this.#node, { ifNotExists: true })); - } - /** - * This can be used to add any additional SQL to the end of the column definition. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.primaryKey()) - * .addColumn( - * 'age', - * 'integer', - * col => col.unsigned() - * .notNull() - * .modifyEnd(sql`comment ${sql.lit('it is not polite to ask a woman her age')}`) - * ) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `id` integer primary key, - * `age` integer unsigned not null comment 'it is not polite to ask a woman her age' - * ) - * ``` - */ - modifyEnd(modifier) { - return new ColumnDefinitionBuilder(ColumnDefinitionNode.cloneWithEndModifier(this.#node, modifier.toOperationNode())); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#node; - } -} diff --git a/node_modules/kysely/dist/esm/schema/create-index-builder.d.ts b/node_modules/kysely/dist/esm/schema/create-index-builder.d.ts deleted file mode 100644 index e29c40f..0000000 --- a/node_modules/kysely/dist/esm/schema/create-index-builder.d.ts +++ /dev/null @@ -1,173 +0,0 @@ -import { CreateIndexNode, type IndexType } from '../operation-node/create-index-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { type ExtractColumnNameFromOrderedColumnName, type OrderedColumnName } from '../parser/reference-parser.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -import type { Expression } from '../expression/expression.js'; -import { type ComparisonOperatorExpression } from '../parser/binary-operation-parser.js'; -import type { ExpressionBuilder } from '../expression/expression-builder.js'; -import type { ShallowRecord, SqlBool } from '../util/type-utils.js'; -export declare class CreateIndexBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: CreateIndexBuilderProps); - /** - * Adds the "if not exists" modifier. - * - * If the index already exists, no error is thrown if this method has been called. - */ - ifNotExists(): CreateIndexBuilder; - /** - * Makes the index unique. - */ - unique(): CreateIndexBuilder; - /** - * Adds `nulls not distinct` specifier to index. - * This only works on some dialects like PostgreSQL. - * - * ### Examples - * - * ```ts - * db.schema.createIndex('person_first_name_index') - * .on('person') - * .column('first_name') - * .nullsNotDistinct() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create index "person_first_name_index" - * on "test" ("first_name") - * nulls not distinct; - * ``` - */ - nullsNotDistinct(): CreateIndexBuilder; - /** - * Specifies the table for the index. - */ - on(table: string): CreateIndexBuilder; - /** - * Adds a column to the index. - * - * Also see {@link columns} for adding multiple columns at once or {@link expression} - * for specifying an arbitrary expression. - * - * ### Examples - * - * ```ts - * await db.schema - * .createIndex('person_first_name_and_age_index') - * .on('person') - * .column('first_name') - * .column('age desc') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create index "person_first_name_and_age_index" on "person" ("first_name", "age" desc) - * ``` - */ - column(column: OrderedColumnName): CreateIndexBuilder>; - /** - * Specifies a list of columns for the index. - * - * Also see {@link column} for adding a single column or {@link expression} for - * specifying an arbitrary expression. - * - * ### Examples - * - * ```ts - * await db.schema - * .createIndex('person_first_name_and_age_index') - * .on('person') - * .columns(['first_name', 'age desc']) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create index "person_first_name_and_age_index" on "person" ("first_name", "age" desc) - * ``` - */ - columns(columns: OrderedColumnName[]): CreateIndexBuilder>; - /** - * Specifies an arbitrary expression for the index. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createIndex('person_first_name_index') - * .on('person') - * .expression(sql`first_name COLLATE "fi_FI"`) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create index "person_first_name_index" on "person" (first_name COLLATE "fi_FI") - * ``` - */ - expression(expression: Expression): CreateIndexBuilder; - /** - * Specifies the index type. - */ - using(indexType: IndexType): CreateIndexBuilder; - using(indexType: string): CreateIndexBuilder; - /** - * Adds a where clause to the query. This Effectively turns the index partial. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createIndex('orders_unbilled_index') - * .on('orders') - * .column('order_nr') - * .where(sql.ref('billed'), 'is not', true) - * .where('order_nr', 'like', '123%') - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create index "orders_unbilled_index" on "orders" ("order_nr") where "billed" is not true and "order_nr" like '123%' - * ``` - * - * Column names specified in {@link column} or {@link columns} are known at compile-time - * and can be referred to in the current query and context. - * - * Sometimes you may want to refer to columns that exist in the table but are not - * part of the current index. In that case you can refer to them using {@link sql} - * expressions. - * - * Parameters are always sent as literals due to database restrictions. - */ - where(lhs: C | Expression, op: ComparisonOperatorExpression, rhs: unknown): CreateIndexBuilder; - where(factory: (qb: ExpressionBuilder>, string>) => Expression): CreateIndexBuilder; - where(expression: Expression): CreateIndexBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): CreateIndexNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface CreateIndexBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: CreateIndexNode; -} diff --git a/node_modules/kysely/dist/esm/schema/create-index-builder.js b/node_modules/kysely/dist/esm/schema/create-index-builder.js deleted file mode 100644 index d8c5bcc..0000000 --- a/node_modules/kysely/dist/esm/schema/create-index-builder.js +++ /dev/null @@ -1,199 +0,0 @@ -/// -import { CreateIndexNode, } from '../operation-node/create-index-node.js'; -import { RawNode } from '../operation-node/raw-node.js'; -import { parseOrderedColumnName, } from '../parser/reference-parser.js'; -import { parseTable } from '../parser/table-parser.js'; -import { freeze } from '../util/object-utils.js'; -import { parseValueBinaryOperationOrExpression, } from '../parser/binary-operation-parser.js'; -import { QueryNode } from '../operation-node/query-node.js'; -import { ImmediateValueTransformer } from '../plugin/immediate-value/immediate-value-transformer.js'; -export class CreateIndexBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - /** - * Adds the "if not exists" modifier. - * - * If the index already exists, no error is thrown if this method has been called. - */ - ifNotExists() { - return new CreateIndexBuilder({ - ...this.#props, - node: CreateIndexNode.cloneWith(this.#props.node, { - ifNotExists: true, - }), - }); - } - /** - * Makes the index unique. - */ - unique() { - return new CreateIndexBuilder({ - ...this.#props, - node: CreateIndexNode.cloneWith(this.#props.node, { - unique: true, - }), - }); - } - /** - * Adds `nulls not distinct` specifier to index. - * This only works on some dialects like PostgreSQL. - * - * ### Examples - * - * ```ts - * db.schema.createIndex('person_first_name_index') - * .on('person') - * .column('first_name') - * .nullsNotDistinct() - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create index "person_first_name_index" - * on "test" ("first_name") - * nulls not distinct; - * ``` - */ - nullsNotDistinct() { - return new CreateIndexBuilder({ - ...this.#props, - node: CreateIndexNode.cloneWith(this.#props.node, { - nullsNotDistinct: true, - }), - }); - } - /** - * Specifies the table for the index. - */ - on(table) { - return new CreateIndexBuilder({ - ...this.#props, - node: CreateIndexNode.cloneWith(this.#props.node, { - table: parseTable(table), - }), - }); - } - /** - * Adds a column to the index. - * - * Also see {@link columns} for adding multiple columns at once or {@link expression} - * for specifying an arbitrary expression. - * - * ### Examples - * - * ```ts - * await db.schema - * .createIndex('person_first_name_and_age_index') - * .on('person') - * .column('first_name') - * .column('age desc') - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create index "person_first_name_and_age_index" on "person" ("first_name", "age" desc) - * ``` - */ - column(column) { - return new CreateIndexBuilder({ - ...this.#props, - node: CreateIndexNode.cloneWithColumns(this.#props.node, [ - parseOrderedColumnName(column), - ]), - }); - } - /** - * Specifies a list of columns for the index. - * - * Also see {@link column} for adding a single column or {@link expression} for - * specifying an arbitrary expression. - * - * ### Examples - * - * ```ts - * await db.schema - * .createIndex('person_first_name_and_age_index') - * .on('person') - * .columns(['first_name', 'age desc']) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create index "person_first_name_and_age_index" on "person" ("first_name", "age" desc) - * ``` - */ - columns(columns) { - return new CreateIndexBuilder({ - ...this.#props, - node: CreateIndexNode.cloneWithColumns(this.#props.node, columns.map(parseOrderedColumnName)), - }); - } - /** - * Specifies an arbitrary expression for the index. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createIndex('person_first_name_index') - * .on('person') - * .expression(sql`first_name COLLATE "fi_FI"`) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create index "person_first_name_index" on "person" (first_name COLLATE "fi_FI") - * ``` - */ - expression(expression) { - return new CreateIndexBuilder({ - ...this.#props, - node: CreateIndexNode.cloneWithColumns(this.#props.node, [ - expression.toOperationNode(), - ]), - }); - } - using(indexType) { - return new CreateIndexBuilder({ - ...this.#props, - node: CreateIndexNode.cloneWith(this.#props.node, { - using: RawNode.createWithSql(indexType), - }), - }); - } - where(...args) { - const transformer = new ImmediateValueTransformer(); - return new CreateIndexBuilder({ - ...this.#props, - node: QueryNode.cloneWithWhere(this.#props.node, transformer.transformNode(parseValueBinaryOperationOrExpression(args), this.#props.queryId)), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} diff --git a/node_modules/kysely/dist/esm/schema/create-schema-builder.d.ts b/node_modules/kysely/dist/esm/schema/create-schema-builder.d.ts deleted file mode 100644 index 8917e68..0000000 --- a/node_modules/kysely/dist/esm/schema/create-schema-builder.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { CreateSchemaNode } from '../operation-node/create-schema-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -export declare class CreateSchemaBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: CreateSchemaBuilderProps); - ifNotExists(): CreateSchemaBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): CreateSchemaNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface CreateSchemaBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: CreateSchemaNode; -} diff --git a/node_modules/kysely/dist/esm/schema/create-schema-builder.js b/node_modules/kysely/dist/esm/schema/create-schema-builder.js deleted file mode 100644 index ffe6f62..0000000 --- a/node_modules/kysely/dist/esm/schema/create-schema-builder.js +++ /dev/null @@ -1,31 +0,0 @@ -/// -import { CreateSchemaNode } from '../operation-node/create-schema-node.js'; -import { freeze } from '../util/object-utils.js'; -export class CreateSchemaBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - ifNotExists() { - return new CreateSchemaBuilder({ - ...this.#props, - node: CreateSchemaNode.cloneWith(this.#props.node, { ifNotExists: true }), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} diff --git a/node_modules/kysely/dist/esm/schema/create-table-builder.d.ts b/node_modules/kysely/dist/esm/schema/create-table-builder.d.ts deleted file mode 100644 index 8516e12..0000000 --- a/node_modules/kysely/dist/esm/schema/create-table-builder.d.ts +++ /dev/null @@ -1,331 +0,0 @@ -import { CreateTableNode, type OnCommitAction } from '../operation-node/create-table-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import { ColumnDefinitionBuilder } from './column-definition-builder.js'; -import type { QueryId } from '../util/query-id.js'; -import { type ForeignKeyConstraintBuilderCallback } from './foreign-key-constraint-builder.js'; -import { type DataTypeExpression } from '../parser/data-type-parser.js'; -import type { Expression } from '../expression/expression.js'; -import { type UniqueConstraintNodeBuilderCallback } from './unique-constraint-builder.js'; -import { type PrimaryKeyConstraintBuilderCallback } from './primary-key-constraint-builder.js'; -import { type CheckConstraintBuilderCallback } from './check-constraint-builder.js'; -/** - * This builder can be used to create a `create table` query. - */ -export declare class CreateTableBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: CreateTableBuilderProps); - /** - * Adds the "temporary" modifier. - * - * Use this to create a temporary table. - */ - temporary(): CreateTableBuilder; - /** - * Adds an "on commit" statement. - * - * This can be used in conjunction with temporary tables on supported databases - * like PostgreSQL. - */ - onCommit(onCommit: OnCommitAction): CreateTableBuilder; - /** - * Adds the "if not exists" modifier. - * - * If the table already exists, no error is thrown if this method has been called. - */ - ifNotExists(): CreateTableBuilder; - /** - * Adds a column to the table. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', (col) => col.autoIncrement().primaryKey()) - * .addColumn('first_name', 'varchar(50)', (col) => col.notNull()) - * .addColumn('last_name', 'varchar(255)') - * .addColumn('bank_balance', 'numeric(8, 2)') - * // You can specify any data type using the `sql` tag if the types - * // don't include it. - * .addColumn('data', sql`any_type_here`) - * .addColumn('parent_id', 'integer', (col) => - * col.references('person.id').onDelete('cascade') - * ) - * ``` - * - * With this method, it's once again good to remember that Kysely just builds the - * query and doesn't provide the same API for all databases. For example, some - * databases like older MySQL don't support the `references` statement in the - * column definition. Instead foreign key constraints need to be defined in the - * `create table` query. See the next example: - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', (col) => col.primaryKey()) - * .addColumn('parent_id', 'integer') - * .addForeignKeyConstraint( - * 'person_parent_id_fk', - * ['parent_id'], - * 'person', - * ['id'], - * (cb) => cb.onDelete('cascade') - * ) - * .execute() - * ``` - * - * Another good example is that PostgreSQL doesn't support the `auto_increment` - * keyword and you need to define an autoincrementing column for example using - * `serial`: - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'serial', (col) => col.primaryKey()) - * .execute() - * ``` - */ - addColumn(columnName: CN, dataType: DataTypeExpression, build?: ColumnBuilderCallback): CreateTableBuilder; - /** - * Adds a primary key constraint for one or more columns. - * - * The constraint name can be anything you want, but it must be unique - * across the whole database. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('first_name', 'varchar(64)') - * .addColumn('last_name', 'varchar(64)') - * .addPrimaryKeyConstraint('primary_key', ['first_name', 'last_name']) - * .execute() - * ``` - */ - addPrimaryKeyConstraint(constraintName: string, columns: C[], build?: PrimaryKeyConstraintBuilderCallback): CreateTableBuilder; - /** - * Adds a unique constraint for one or more columns. - * - * The constraint name can be anything you want, but it must be unique - * across the whole database. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('first_name', 'varchar(64)') - * .addColumn('last_name', 'varchar(64)') - * .addUniqueConstraint( - * 'first_name_last_name_unique', - * ['first_name', 'last_name'] - * ) - * .execute() - * ``` - * - * In dialects such as PostgreSQL you can specify `nulls not distinct` as follows: - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('first_name', 'varchar(64)') - * .addColumn('last_name', 'varchar(64)') - * .addUniqueConstraint( - * 'first_name_last_name_unique', - * ['first_name', 'last_name'], - * (cb) => cb.nullsNotDistinct() - * ) - * .execute() - * ``` - */ - addUniqueConstraint(constraintName: string, columns: C[], build?: UniqueConstraintNodeBuilderCallback): CreateTableBuilder; - /** - * Adds a check constraint. - * - * The constraint name can be anything you want, but it must be unique - * across the whole database. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('animal') - * .addColumn('number_of_legs', 'integer') - * .addCheckConstraint('check_legs', sql`number_of_legs < 5`) - * .execute() - * ``` - */ - addCheckConstraint(constraintName: string, checkExpression: Expression, build?: CheckConstraintBuilderCallback): CreateTableBuilder; - /** - * Adds a foreign key constraint. - * - * The constraint name can be anything you want, but it must be unique - * across the whole database. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn('owner_id', 'integer') - * .addForeignKeyConstraint( - * 'owner_id_foreign', - * ['owner_id'], - * 'person', - * ['id'], - * ) - * .execute() - * ``` - * - * Add constraint for multiple columns: - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn('owner_id1', 'integer') - * .addColumn('owner_id2', 'integer') - * .addForeignKeyConstraint( - * 'owner_id_foreign', - * ['owner_id1', 'owner_id2'], - * 'person', - * ['id1', 'id2'], - * (cb) => cb.onDelete('cascade') - * ) - * .execute() - * ``` - */ - addForeignKeyConstraint(constraintName: string, columns: C[], targetTable: string, targetColumns: string[], build?: ForeignKeyConstraintBuilderCallback): CreateTableBuilder; - /** - * This can be used to add any additional SQL to the front of the query __after__ the `create` keyword. - * - * Also see {@link temporary}. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .modifyFront(sql`global temporary`) - * .addColumn('id', 'integer', col => col.primaryKey()) - * .addColumn('first_name', 'varchar(64)', col => col.notNull()) - * .addColumn('last_name', 'varchar(64)', col => col.notNull()) - * .execute() - * ``` - * - * The generated SQL (Postgres): - * - * ```sql - * create global temporary table "person" ( - * "id" integer primary key, - * "first_name" varchar(64) not null, - * "last_name" varchar(64) not null - * ) - * ``` - */ - modifyFront(modifier: Expression): CreateTableBuilder; - /** - * This can be used to add any additional SQL to the end of the query. - * - * Also see {@link onCommit}. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.primaryKey()) - * .addColumn('first_name', 'varchar(64)', col => col.notNull()) - * .addColumn('last_name', 'varchar(64)', col => col.notNull()) - * .modifyEnd(sql`collate utf8_unicode_ci`) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `id` integer primary key, - * `first_name` varchar(64) not null, - * `last_name` varchar(64) not null - * ) collate utf8_unicode_ci - * ``` - */ - modifyEnd(modifier: Expression): CreateTableBuilder; - /** - * Allows to create table from `select` query. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('copy') - * .temporary() - * .as(db.selectFrom('person').select(['first_name', 'last_name'])) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create temporary table "copy" as - * select "first_name", "last_name" from "person" - * ``` - */ - as(expression: Expression): CreateTableBuilder; - /** - * Calls the given function passing `this` as the only argument. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('test') - * .$call((builder) => builder.addColumn('id', 'integer')) - * .execute() - * ``` - * - * This is useful for creating reusable functions that can be called with a builder. - * - * ```ts - * import { type CreateTableBuilder, sql } from 'kysely' - * - * const addDefaultColumns = (ctb: CreateTableBuilder) => { - * return ctb - * .addColumn('id', 'integer', (col) => col.notNull()) - * .addColumn('created_at', 'date', (col) => - * col.notNull().defaultTo(sql`now()`) - * ) - * .addColumn('updated_at', 'date', (col) => - * col.notNull().defaultTo(sql`now()`) - * ) - * } - * - * await db.schema - * .createTable('test') - * .$call(addDefaultColumns) - * .execute() - * ``` - */ - $call(func: (qb: this) => T): T; - toOperationNode(): CreateTableNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface CreateTableBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: CreateTableNode; -} -export type ColumnBuilderCallback = (builder: ColumnDefinitionBuilder) => ColumnDefinitionBuilder; diff --git a/node_modules/kysely/dist/esm/schema/create-table-builder.js b/node_modules/kysely/dist/esm/schema/create-table-builder.js deleted file mode 100644 index bf44160..0000000 --- a/node_modules/kysely/dist/esm/schema/create-table-builder.js +++ /dev/null @@ -1,408 +0,0 @@ -/// -import { ColumnDefinitionNode } from '../operation-node/column-definition-node.js'; -import { CreateTableNode, } from '../operation-node/create-table-node.js'; -import { ColumnDefinitionBuilder } from './column-definition-builder.js'; -import { freeze, noop } from '../util/object-utils.js'; -import { ForeignKeyConstraintNode } from '../operation-node/foreign-key-constraint-node.js'; -import { ColumnNode } from '../operation-node/column-node.js'; -import { ForeignKeyConstraintBuilder, } from './foreign-key-constraint-builder.js'; -import { parseDataTypeExpression, } from '../parser/data-type-parser.js'; -import { PrimaryKeyConstraintNode } from '../operation-node/primary-key-constraint-node.js'; -import { UniqueConstraintNode } from '../operation-node/unique-constraint-node.js'; -import { CheckConstraintNode } from '../operation-node/check-constraint-node.js'; -import { parseTable } from '../parser/table-parser.js'; -import { parseOnCommitAction } from '../parser/on-commit-action-parse.js'; -import { UniqueConstraintNodeBuilder, } from './unique-constraint-builder.js'; -import { parseExpression } from '../parser/expression-parser.js'; -import { PrimaryKeyConstraintBuilder, } from './primary-key-constraint-builder.js'; -import { CheckConstraintBuilder, } from './check-constraint-builder.js'; -/** - * This builder can be used to create a `create table` query. - */ -export class CreateTableBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - /** - * Adds the "temporary" modifier. - * - * Use this to create a temporary table. - */ - temporary() { - return new CreateTableBuilder({ - ...this.#props, - node: CreateTableNode.cloneWith(this.#props.node, { - temporary: true, - }), - }); - } - /** - * Adds an "on commit" statement. - * - * This can be used in conjunction with temporary tables on supported databases - * like PostgreSQL. - */ - onCommit(onCommit) { - return new CreateTableBuilder({ - ...this.#props, - node: CreateTableNode.cloneWith(this.#props.node, { - onCommit: parseOnCommitAction(onCommit), - }), - }); - } - /** - * Adds the "if not exists" modifier. - * - * If the table already exists, no error is thrown if this method has been called. - */ - ifNotExists() { - return new CreateTableBuilder({ - ...this.#props, - node: CreateTableNode.cloneWith(this.#props.node, { - ifNotExists: true, - }), - }); - } - /** - * Adds a column to the table. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', (col) => col.autoIncrement().primaryKey()) - * .addColumn('first_name', 'varchar(50)', (col) => col.notNull()) - * .addColumn('last_name', 'varchar(255)') - * .addColumn('bank_balance', 'numeric(8, 2)') - * // You can specify any data type using the `sql` tag if the types - * // don't include it. - * .addColumn('data', sql`any_type_here`) - * .addColumn('parent_id', 'integer', (col) => - * col.references('person.id').onDelete('cascade') - * ) - * ``` - * - * With this method, it's once again good to remember that Kysely just builds the - * query and doesn't provide the same API for all databases. For example, some - * databases like older MySQL don't support the `references` statement in the - * column definition. Instead foreign key constraints need to be defined in the - * `create table` query. See the next example: - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', (col) => col.primaryKey()) - * .addColumn('parent_id', 'integer') - * .addForeignKeyConstraint( - * 'person_parent_id_fk', - * ['parent_id'], - * 'person', - * ['id'], - * (cb) => cb.onDelete('cascade') - * ) - * .execute() - * ``` - * - * Another good example is that PostgreSQL doesn't support the `auto_increment` - * keyword and you need to define an autoincrementing column for example using - * `serial`: - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'serial', (col) => col.primaryKey()) - * .execute() - * ``` - */ - addColumn(columnName, dataType, build = noop) { - const columnBuilder = build(new ColumnDefinitionBuilder(ColumnDefinitionNode.create(columnName, parseDataTypeExpression(dataType)))); - return new CreateTableBuilder({ - ...this.#props, - node: CreateTableNode.cloneWithColumn(this.#props.node, columnBuilder.toOperationNode()), - }); - } - /** - * Adds a primary key constraint for one or more columns. - * - * The constraint name can be anything you want, but it must be unique - * across the whole database. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('first_name', 'varchar(64)') - * .addColumn('last_name', 'varchar(64)') - * .addPrimaryKeyConstraint('primary_key', ['first_name', 'last_name']) - * .execute() - * ``` - */ - addPrimaryKeyConstraint(constraintName, columns, build = noop) { - const constraintBuilder = build(new PrimaryKeyConstraintBuilder(PrimaryKeyConstraintNode.create(columns, constraintName))); - return new CreateTableBuilder({ - ...this.#props, - node: CreateTableNode.cloneWithConstraint(this.#props.node, constraintBuilder.toOperationNode()), - }); - } - /** - * Adds a unique constraint for one or more columns. - * - * The constraint name can be anything you want, but it must be unique - * across the whole database. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('first_name', 'varchar(64)') - * .addColumn('last_name', 'varchar(64)') - * .addUniqueConstraint( - * 'first_name_last_name_unique', - * ['first_name', 'last_name'] - * ) - * .execute() - * ``` - * - * In dialects such as PostgreSQL you can specify `nulls not distinct` as follows: - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('first_name', 'varchar(64)') - * .addColumn('last_name', 'varchar(64)') - * .addUniqueConstraint( - * 'first_name_last_name_unique', - * ['first_name', 'last_name'], - * (cb) => cb.nullsNotDistinct() - * ) - * .execute() - * ``` - */ - addUniqueConstraint(constraintName, columns, build = noop) { - const uniqueConstraintBuilder = build(new UniqueConstraintNodeBuilder(UniqueConstraintNode.create(columns, constraintName))); - return new CreateTableBuilder({ - ...this.#props, - node: CreateTableNode.cloneWithConstraint(this.#props.node, uniqueConstraintBuilder.toOperationNode()), - }); - } - /** - * Adds a check constraint. - * - * The constraint name can be anything you want, but it must be unique - * across the whole database. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('animal') - * .addColumn('number_of_legs', 'integer') - * .addCheckConstraint('check_legs', sql`number_of_legs < 5`) - * .execute() - * ``` - */ - addCheckConstraint(constraintName, checkExpression, build = noop) { - const constraintBuilder = build(new CheckConstraintBuilder(CheckConstraintNode.create(checkExpression.toOperationNode(), constraintName))); - return new CreateTableBuilder({ - ...this.#props, - node: CreateTableNode.cloneWithConstraint(this.#props.node, constraintBuilder.toOperationNode()), - }); - } - /** - * Adds a foreign key constraint. - * - * The constraint name can be anything you want, but it must be unique - * across the whole database. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn('owner_id', 'integer') - * .addForeignKeyConstraint( - * 'owner_id_foreign', - * ['owner_id'], - * 'person', - * ['id'], - * ) - * .execute() - * ``` - * - * Add constraint for multiple columns: - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn('owner_id1', 'integer') - * .addColumn('owner_id2', 'integer') - * .addForeignKeyConstraint( - * 'owner_id_foreign', - * ['owner_id1', 'owner_id2'], - * 'person', - * ['id1', 'id2'], - * (cb) => cb.onDelete('cascade') - * ) - * .execute() - * ``` - */ - addForeignKeyConstraint(constraintName, columns, targetTable, targetColumns, build = noop) { - const builder = build(new ForeignKeyConstraintBuilder(ForeignKeyConstraintNode.create(columns.map(ColumnNode.create), parseTable(targetTable), targetColumns.map(ColumnNode.create), constraintName))); - return new CreateTableBuilder({ - ...this.#props, - node: CreateTableNode.cloneWithConstraint(this.#props.node, builder.toOperationNode()), - }); - } - /** - * This can be used to add any additional SQL to the front of the query __after__ the `create` keyword. - * - * Also see {@link temporary}. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .modifyFront(sql`global temporary`) - * .addColumn('id', 'integer', col => col.primaryKey()) - * .addColumn('first_name', 'varchar(64)', col => col.notNull()) - * .addColumn('last_name', 'varchar(64)', col => col.notNull()) - * .execute() - * ``` - * - * The generated SQL (Postgres): - * - * ```sql - * create global temporary table "person" ( - * "id" integer primary key, - * "first_name" varchar(64) not null, - * "last_name" varchar(64) not null - * ) - * ``` - */ - modifyFront(modifier) { - return new CreateTableBuilder({ - ...this.#props, - node: CreateTableNode.cloneWithFrontModifier(this.#props.node, modifier.toOperationNode()), - }); - } - /** - * This can be used to add any additional SQL to the end of the query. - * - * Also see {@link onCommit}. - * - * ### Examples - * - * ```ts - * import { sql } from 'kysely' - * - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.primaryKey()) - * .addColumn('first_name', 'varchar(64)', col => col.notNull()) - * .addColumn('last_name', 'varchar(64)', col => col.notNull()) - * .modifyEnd(sql`collate utf8_unicode_ci`) - * .execute() - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * create table `person` ( - * `id` integer primary key, - * `first_name` varchar(64) not null, - * `last_name` varchar(64) not null - * ) collate utf8_unicode_ci - * ``` - */ - modifyEnd(modifier) { - return new CreateTableBuilder({ - ...this.#props, - node: CreateTableNode.cloneWithEndModifier(this.#props.node, modifier.toOperationNode()), - }); - } - /** - * Allows to create table from `select` query. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('copy') - * .temporary() - * .as(db.selectFrom('person').select(['first_name', 'last_name'])) - * .execute() - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * create temporary table "copy" as - * select "first_name", "last_name" from "person" - * ``` - */ - as(expression) { - return new CreateTableBuilder({ - ...this.#props, - node: CreateTableNode.cloneWith(this.#props.node, { - selectQuery: parseExpression(expression), - }), - }); - } - /** - * Calls the given function passing `this` as the only argument. - * - * ### Examples - * - * ```ts - * await db.schema - * .createTable('test') - * .$call((builder) => builder.addColumn('id', 'integer')) - * .execute() - * ``` - * - * This is useful for creating reusable functions that can be called with a builder. - * - * ```ts - * import { type CreateTableBuilder, sql } from 'kysely' - * - * const addDefaultColumns = (ctb: CreateTableBuilder) => { - * return ctb - * .addColumn('id', 'integer', (col) => col.notNull()) - * .addColumn('created_at', 'date', (col) => - * col.notNull().defaultTo(sql`now()`) - * ) - * .addColumn('updated_at', 'date', (col) => - * col.notNull().defaultTo(sql`now()`) - * ) - * } - * - * await db.schema - * .createTable('test') - * .$call(addDefaultColumns) - * .execute() - * ``` - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} diff --git a/node_modules/kysely/dist/esm/schema/create-type-builder.d.ts b/node_modules/kysely/dist/esm/schema/create-type-builder.d.ts deleted file mode 100644 index 9989c49..0000000 --- a/node_modules/kysely/dist/esm/schema/create-type-builder.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -import { CreateTypeNode } from '../operation-node/create-type-node.js'; -export declare class CreateTypeBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: CreateTypeBuilderProps); - toOperationNode(): CreateTypeNode; - /** - * Creates an anum type. - * - * ### Examples - * - * ```ts - * db.schema.createType('species').asEnum(['cat', 'dog', 'frog']) - * ``` - */ - asEnum(values: readonly string[]): CreateTypeBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - compile(): CompiledQuery; - execute(): Promise; -} -export interface CreateTypeBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: CreateTypeNode; -} diff --git a/node_modules/kysely/dist/esm/schema/create-type-builder.js b/node_modules/kysely/dist/esm/schema/create-type-builder.js deleted file mode 100644 index a870c2c..0000000 --- a/node_modules/kysely/dist/esm/schema/create-type-builder.js +++ /dev/null @@ -1,40 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { CreateTypeNode } from '../operation-node/create-type-node.js'; -export class CreateTypeBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - /** - * Creates an anum type. - * - * ### Examples - * - * ```ts - * db.schema.createType('species').asEnum(['cat', 'dog', 'frog']) - * ``` - */ - asEnum(values) { - return new CreateTypeBuilder({ - ...this.#props, - node: CreateTypeNode.cloneWithEnum(this.#props.node, values), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} diff --git a/node_modules/kysely/dist/esm/schema/create-view-builder.d.ts b/node_modules/kysely/dist/esm/schema/create-view-builder.d.ts deleted file mode 100644 index 1bb4a46..0000000 --- a/node_modules/kysely/dist/esm/schema/create-view-builder.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -import { CreateViewNode } from '../operation-node/create-view-node.js'; -import type { RawBuilder } from '../raw-builder/raw-builder.js'; -import type { SelectQueryBuilder } from '../query-builder/select-query-builder.js'; -export declare class CreateViewBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: CreateViewBuilderProps); - /** - * Adds the "temporary" modifier. - * - * Use this to create a temporary view. - */ - temporary(): CreateViewBuilder; - materialized(): CreateViewBuilder; - /** - * Only implemented on some dialects like SQLite. On most dialects, use {@link orReplace}. - */ - ifNotExists(): CreateViewBuilder; - orReplace(): CreateViewBuilder; - columns(columns: string[]): CreateViewBuilder; - /** - * Sets the select query or a `values` statement that creates the view. - * - * WARNING! - * Some dialects don't support parameterized queries in DDL statements and therefore - * the query or raw {@link sql } expression passed here is interpolated into a single - * string opening an SQL injection vulnerability. DO NOT pass unchecked user input - * into the query or raw expression passed to this method! - */ - as(query: SelectQueryBuilder | RawBuilder): CreateViewBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): CreateViewNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface CreateViewBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: CreateViewNode; -} diff --git a/node_modules/kysely/dist/esm/schema/create-view-builder.js b/node_modules/kysely/dist/esm/schema/create-view-builder.js deleted file mode 100644 index c2b0ea0..0000000 --- a/node_modules/kysely/dist/esm/schema/create-view-builder.js +++ /dev/null @@ -1,95 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { CreateViewNode } from '../operation-node/create-view-node.js'; -import { parseColumnName } from '../parser/reference-parser.js'; -import { ImmediateValuePlugin } from '../plugin/immediate-value/immediate-value-plugin.js'; -export class CreateViewBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - /** - * Adds the "temporary" modifier. - * - * Use this to create a temporary view. - */ - temporary() { - return new CreateViewBuilder({ - ...this.#props, - node: CreateViewNode.cloneWith(this.#props.node, { - temporary: true, - }), - }); - } - materialized() { - return new CreateViewBuilder({ - ...this.#props, - node: CreateViewNode.cloneWith(this.#props.node, { - materialized: true, - }), - }); - } - /** - * Only implemented on some dialects like SQLite. On most dialects, use {@link orReplace}. - */ - ifNotExists() { - return new CreateViewBuilder({ - ...this.#props, - node: CreateViewNode.cloneWith(this.#props.node, { - ifNotExists: true, - }), - }); - } - orReplace() { - return new CreateViewBuilder({ - ...this.#props, - node: CreateViewNode.cloneWith(this.#props.node, { - orReplace: true, - }), - }); - } - columns(columns) { - return new CreateViewBuilder({ - ...this.#props, - node: CreateViewNode.cloneWith(this.#props.node, { - columns: columns.map(parseColumnName), - }), - }); - } - /** - * Sets the select query or a `values` statement that creates the view. - * - * WARNING! - * Some dialects don't support parameterized queries in DDL statements and therefore - * the query or raw {@link sql } expression passed here is interpolated into a single - * string opening an SQL injection vulnerability. DO NOT pass unchecked user input - * into the query or raw expression passed to this method! - */ - as(query) { - const queryNode = query - .withPlugin(new ImmediateValuePlugin()) - .toOperationNode(); - return new CreateViewBuilder({ - ...this.#props, - node: CreateViewNode.cloneWith(this.#props.node, { - as: queryNode, - }), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} diff --git a/node_modules/kysely/dist/esm/schema/drop-index-builder.d.ts b/node_modules/kysely/dist/esm/schema/drop-index-builder.d.ts deleted file mode 100644 index 7b0c816..0000000 --- a/node_modules/kysely/dist/esm/schema/drop-index-builder.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { DropIndexNode } from '../operation-node/drop-index-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -export declare class DropIndexBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: DropIndexBuilderProps); - /** - * Specifies the table the index was created for. This is not needed - * in all dialects. - */ - on(table: string): DropIndexBuilder; - ifExists(): DropIndexBuilder; - cascade(): DropIndexBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): DropIndexNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface DropIndexBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: DropIndexNode; -} diff --git a/node_modules/kysely/dist/esm/schema/drop-index-builder.js b/node_modules/kysely/dist/esm/schema/drop-index-builder.js deleted file mode 100644 index e26fca9..0000000 --- a/node_modules/kysely/dist/esm/schema/drop-index-builder.js +++ /dev/null @@ -1,54 +0,0 @@ -/// -import { DropIndexNode } from '../operation-node/drop-index-node.js'; -import { parseTable } from '../parser/table-parser.js'; -import { freeze } from '../util/object-utils.js'; -export class DropIndexBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - /** - * Specifies the table the index was created for. This is not needed - * in all dialects. - */ - on(table) { - return new DropIndexBuilder({ - ...this.#props, - node: DropIndexNode.cloneWith(this.#props.node, { - table: parseTable(table), - }), - }); - } - ifExists() { - return new DropIndexBuilder({ - ...this.#props, - node: DropIndexNode.cloneWith(this.#props.node, { - ifExists: true, - }), - }); - } - cascade() { - return new DropIndexBuilder({ - ...this.#props, - node: DropIndexNode.cloneWith(this.#props.node, { - cascade: true, - }), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} diff --git a/node_modules/kysely/dist/esm/schema/drop-schema-builder.d.ts b/node_modules/kysely/dist/esm/schema/drop-schema-builder.d.ts deleted file mode 100644 index 0e831b8..0000000 --- a/node_modules/kysely/dist/esm/schema/drop-schema-builder.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { DropSchemaNode } from '../operation-node/drop-schema-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -export declare class DropSchemaBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: DropSchemaBuilderProps); - ifExists(): DropSchemaBuilder; - cascade(): DropSchemaBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): DropSchemaNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface DropSchemaBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: DropSchemaNode; -} diff --git a/node_modules/kysely/dist/esm/schema/drop-schema-builder.js b/node_modules/kysely/dist/esm/schema/drop-schema-builder.js deleted file mode 100644 index e178c14..0000000 --- a/node_modules/kysely/dist/esm/schema/drop-schema-builder.js +++ /dev/null @@ -1,41 +0,0 @@ -/// -import { DropSchemaNode } from '../operation-node/drop-schema-node.js'; -import { freeze } from '../util/object-utils.js'; -export class DropSchemaBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - ifExists() { - return new DropSchemaBuilder({ - ...this.#props, - node: DropSchemaNode.cloneWith(this.#props.node, { - ifExists: true, - }), - }); - } - cascade() { - return new DropSchemaBuilder({ - ...this.#props, - node: DropSchemaNode.cloneWith(this.#props.node, { - cascade: true, - }), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} diff --git a/node_modules/kysely/dist/esm/schema/drop-table-builder.d.ts b/node_modules/kysely/dist/esm/schema/drop-table-builder.d.ts deleted file mode 100644 index 1f566c7..0000000 --- a/node_modules/kysely/dist/esm/schema/drop-table-builder.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { DropTableNode } from '../operation-node/drop-table-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -export declare class DropTableBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: DropTableBuilderProps); - ifExists(): DropTableBuilder; - cascade(): DropTableBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): DropTableNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface DropTableBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: DropTableNode; -} diff --git a/node_modules/kysely/dist/esm/schema/drop-table-builder.js b/node_modules/kysely/dist/esm/schema/drop-table-builder.js deleted file mode 100644 index ab14b1f..0000000 --- a/node_modules/kysely/dist/esm/schema/drop-table-builder.js +++ /dev/null @@ -1,41 +0,0 @@ -/// -import { DropTableNode } from '../operation-node/drop-table-node.js'; -import { freeze } from '../util/object-utils.js'; -export class DropTableBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - ifExists() { - return new DropTableBuilder({ - ...this.#props, - node: DropTableNode.cloneWith(this.#props.node, { - ifExists: true, - }), - }); - } - cascade() { - return new DropTableBuilder({ - ...this.#props, - node: DropTableNode.cloneWith(this.#props.node, { - cascade: true, - }), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} diff --git a/node_modules/kysely/dist/esm/schema/drop-type-builder.d.ts b/node_modules/kysely/dist/esm/schema/drop-type-builder.d.ts deleted file mode 100644 index f672f0c..0000000 --- a/node_modules/kysely/dist/esm/schema/drop-type-builder.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { DropTypeNode } from '../operation-node/drop-type-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -export declare class DropTypeBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: DropTypeBuilderProps); - ifExists(): DropTypeBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): DropTypeNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface DropTypeBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: DropTypeNode; -} diff --git a/node_modules/kysely/dist/esm/schema/drop-type-builder.js b/node_modules/kysely/dist/esm/schema/drop-type-builder.js deleted file mode 100644 index 23341ae..0000000 --- a/node_modules/kysely/dist/esm/schema/drop-type-builder.js +++ /dev/null @@ -1,33 +0,0 @@ -/// -import { DropTypeNode } from '../operation-node/drop-type-node.js'; -import { freeze } from '../util/object-utils.js'; -export class DropTypeBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - ifExists() { - return new DropTypeBuilder({ - ...this.#props, - node: DropTypeNode.cloneWith(this.#props.node, { - ifExists: true, - }), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} diff --git a/node_modules/kysely/dist/esm/schema/drop-view-builder.d.ts b/node_modules/kysely/dist/esm/schema/drop-view-builder.d.ts deleted file mode 100644 index 6104211..0000000 --- a/node_modules/kysely/dist/esm/schema/drop-view-builder.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -import { DropViewNode } from '../operation-node/drop-view-node.js'; -export declare class DropViewBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: DropViewBuilderProps); - materialized(): DropViewBuilder; - ifExists(): DropViewBuilder; - cascade(): DropViewBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): DropViewNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface DropViewBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: DropViewNode; -} diff --git a/node_modules/kysely/dist/esm/schema/drop-view-builder.js b/node_modules/kysely/dist/esm/schema/drop-view-builder.js deleted file mode 100644 index 2f14f34..0000000 --- a/node_modules/kysely/dist/esm/schema/drop-view-builder.js +++ /dev/null @@ -1,49 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { DropViewNode } from '../operation-node/drop-view-node.js'; -export class DropViewBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - materialized() { - return new DropViewBuilder({ - ...this.#props, - node: DropViewNode.cloneWith(this.#props.node, { - materialized: true, - }), - }); - } - ifExists() { - return new DropViewBuilder({ - ...this.#props, - node: DropViewNode.cloneWith(this.#props.node, { - ifExists: true, - }), - }); - } - cascade() { - return new DropViewBuilder({ - ...this.#props, - node: DropViewNode.cloneWith(this.#props.node, { - cascade: true, - }), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} diff --git a/node_modules/kysely/dist/esm/schema/foreign-key-constraint-builder.d.ts b/node_modules/kysely/dist/esm/schema/foreign-key-constraint-builder.d.ts deleted file mode 100644 index 770e874..0000000 --- a/node_modules/kysely/dist/esm/schema/foreign-key-constraint-builder.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { ForeignKeyConstraintNode } from '../operation-node/foreign-key-constraint-node.js'; -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { OnModifyForeignAction } from '../operation-node/references-node.js'; -export interface ForeignKeyConstraintBuilderInterface { - onDelete(onDelete: OnModifyForeignAction): R; - onUpdate(onUpdate: OnModifyForeignAction): R; - deferrable(): R; - notDeferrable(): R; - initiallyDeferred(): R; - initiallyImmediate(): R; -} -export declare class ForeignKeyConstraintBuilder implements ForeignKeyConstraintBuilderInterface, OperationNodeSource { - #private; - constructor(node: ForeignKeyConstraintNode); - onDelete(onDelete: OnModifyForeignAction): ForeignKeyConstraintBuilder; - onUpdate(onUpdate: OnModifyForeignAction): ForeignKeyConstraintBuilder; - deferrable(): ForeignKeyConstraintBuilder; - notDeferrable(): ForeignKeyConstraintBuilder; - initiallyDeferred(): ForeignKeyConstraintBuilder; - initiallyImmediate(): ForeignKeyConstraintBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): ForeignKeyConstraintNode; -} -export type ForeignKeyConstraintBuilderCallback = (builder: ForeignKeyConstraintBuilder) => ForeignKeyConstraintBuilder; diff --git a/node_modules/kysely/dist/esm/schema/foreign-key-constraint-builder.js b/node_modules/kysely/dist/esm/schema/foreign-key-constraint-builder.js deleted file mode 100644 index befa397..0000000 --- a/node_modules/kysely/dist/esm/schema/foreign-key-constraint-builder.js +++ /dev/null @@ -1,45 +0,0 @@ -/// -import { ForeignKeyConstraintNode } from '../operation-node/foreign-key-constraint-node.js'; -import { parseOnModifyForeignAction } from '../parser/on-modify-action-parser.js'; -export class ForeignKeyConstraintBuilder { - #node; - constructor(node) { - this.#node = node; - } - onDelete(onDelete) { - return new ForeignKeyConstraintBuilder(ForeignKeyConstraintNode.cloneWith(this.#node, { - onDelete: parseOnModifyForeignAction(onDelete), - })); - } - onUpdate(onUpdate) { - return new ForeignKeyConstraintBuilder(ForeignKeyConstraintNode.cloneWith(this.#node, { - onUpdate: parseOnModifyForeignAction(onUpdate), - })); - } - deferrable() { - return new ForeignKeyConstraintBuilder(ForeignKeyConstraintNode.cloneWith(this.#node, { deferrable: true })); - } - notDeferrable() { - return new ForeignKeyConstraintBuilder(ForeignKeyConstraintNode.cloneWith(this.#node, { deferrable: false })); - } - initiallyDeferred() { - return new ForeignKeyConstraintBuilder(ForeignKeyConstraintNode.cloneWith(this.#node, { - initiallyDeferred: true, - })); - } - initiallyImmediate() { - return new ForeignKeyConstraintBuilder(ForeignKeyConstraintNode.cloneWith(this.#node, { - initiallyDeferred: false, - })); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#node; - } -} diff --git a/node_modules/kysely/dist/esm/schema/primary-key-constraint-builder.d.ts b/node_modules/kysely/dist/esm/schema/primary-key-constraint-builder.d.ts deleted file mode 100644 index e365831..0000000 --- a/node_modules/kysely/dist/esm/schema/primary-key-constraint-builder.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { PrimaryKeyConstraintNode } from '../operation-node/primary-key-constraint-node.js'; -export declare class PrimaryKeyConstraintBuilder implements OperationNodeSource { - #private; - constructor(node: PrimaryKeyConstraintNode); - deferrable(): PrimaryKeyConstraintBuilder; - notDeferrable(): PrimaryKeyConstraintBuilder; - initiallyDeferred(): PrimaryKeyConstraintBuilder; - initiallyImmediate(): PrimaryKeyConstraintBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): PrimaryKeyConstraintNode; -} -export type PrimaryKeyConstraintBuilderCallback = (builder: PrimaryKeyConstraintBuilder) => PrimaryKeyConstraintBuilder; diff --git a/node_modules/kysely/dist/esm/schema/primary-key-constraint-builder.js b/node_modules/kysely/dist/esm/schema/primary-key-constraint-builder.js deleted file mode 100644 index bb90108..0000000 --- a/node_modules/kysely/dist/esm/schema/primary-key-constraint-builder.js +++ /dev/null @@ -1,34 +0,0 @@ -/// -import { PrimaryKeyConstraintNode } from '../operation-node/primary-key-constraint-node.js'; -export class PrimaryKeyConstraintBuilder { - #node; - constructor(node) { - this.#node = node; - } - deferrable() { - return new PrimaryKeyConstraintBuilder(PrimaryKeyConstraintNode.cloneWith(this.#node, { deferrable: true })); - } - notDeferrable() { - return new PrimaryKeyConstraintBuilder(PrimaryKeyConstraintNode.cloneWith(this.#node, { deferrable: false })); - } - initiallyDeferred() { - return new PrimaryKeyConstraintBuilder(PrimaryKeyConstraintNode.cloneWith(this.#node, { - initiallyDeferred: true, - })); - } - initiallyImmediate() { - return new PrimaryKeyConstraintBuilder(PrimaryKeyConstraintNode.cloneWith(this.#node, { - initiallyDeferred: false, - })); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#node; - } -} diff --git a/node_modules/kysely/dist/esm/schema/refresh-materialized-view-builder.d.ts b/node_modules/kysely/dist/esm/schema/refresh-materialized-view-builder.d.ts deleted file mode 100644 index 77f6ad1..0000000 --- a/node_modules/kysely/dist/esm/schema/refresh-materialized-view-builder.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from '../util/compilable.js'; -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import type { QueryId } from '../util/query-id.js'; -import { RefreshMaterializedViewNode } from '../operation-node/refresh-materialized-view-node.js'; -export declare class RefreshMaterializedViewBuilder implements OperationNodeSource, Compilable { - #private; - constructor(props: RefreshMaterializedViewBuilderProps); - /** - * Adds the "concurrently" modifier. - * - * Use this to refresh the view without locking out concurrent selects on the materialized view. - * - * WARNING! - * This cannot be used with the "with no data" modifier. - */ - concurrently(): RefreshMaterializedViewBuilder; - /** - * Adds the "with data" modifier. - * - * If specified (or defaults) the backing query is executed to provide the new data, and the materialized view is left in a scannable state - */ - withData(): RefreshMaterializedViewBuilder; - /** - * Adds the "with no data" modifier. - * - * If specified, no new data is generated and the materialized view is left in an unscannable state. - * - * WARNING! - * This cannot be used with the "concurrently" modifier. - */ - withNoData(): RefreshMaterializedViewBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): RefreshMaterializedViewNode; - compile(): CompiledQuery; - execute(): Promise; -} -export interface RefreshMaterializedViewBuilderProps { - readonly queryId: QueryId; - readonly executor: QueryExecutor; - readonly node: RefreshMaterializedViewNode; -} diff --git a/node_modules/kysely/dist/esm/schema/refresh-materialized-view-builder.js b/node_modules/kysely/dist/esm/schema/refresh-materialized-view-builder.js deleted file mode 100644 index 1828005..0000000 --- a/node_modules/kysely/dist/esm/schema/refresh-materialized-view-builder.js +++ /dev/null @@ -1,72 +0,0 @@ -/// -import { freeze } from '../util/object-utils.js'; -import { RefreshMaterializedViewNode } from '../operation-node/refresh-materialized-view-node.js'; -export class RefreshMaterializedViewBuilder { - #props; - constructor(props) { - this.#props = freeze(props); - } - /** - * Adds the "concurrently" modifier. - * - * Use this to refresh the view without locking out concurrent selects on the materialized view. - * - * WARNING! - * This cannot be used with the "with no data" modifier. - */ - concurrently() { - return new RefreshMaterializedViewBuilder({ - ...this.#props, - node: RefreshMaterializedViewNode.cloneWith(this.#props.node, { - concurrently: true, - withNoData: false, - }), - }); - } - /** - * Adds the "with data" modifier. - * - * If specified (or defaults) the backing query is executed to provide the new data, and the materialized view is left in a scannable state - */ - withData() { - return new RefreshMaterializedViewBuilder({ - ...this.#props, - node: RefreshMaterializedViewNode.cloneWith(this.#props.node, { - withNoData: false, - }), - }); - } - /** - * Adds the "with no data" modifier. - * - * If specified, no new data is generated and the materialized view is left in an unscannable state. - * - * WARNING! - * This cannot be used with the "concurrently" modifier. - */ - withNoData() { - return new RefreshMaterializedViewBuilder({ - ...this.#props, - node: RefreshMaterializedViewNode.cloneWith(this.#props.node, { - withNoData: true, - concurrently: false, - }), - }); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#props.executor.transformQuery(this.#props.node, this.#props.queryId); - } - compile() { - return this.#props.executor.compileQuery(this.toOperationNode(), this.#props.queryId); - } - async execute() { - await this.#props.executor.executeQuery(this.compile()); - } -} diff --git a/node_modules/kysely/dist/esm/schema/schema.d.ts b/node_modules/kysely/dist/esm/schema/schema.d.ts deleted file mode 100644 index dc97c42..0000000 --- a/node_modules/kysely/dist/esm/schema/schema.d.ts +++ /dev/null @@ -1,230 +0,0 @@ -import type { QueryExecutor } from '../query-executor/query-executor.js'; -import { AlterTableBuilder } from './alter-table-builder.js'; -import { CreateIndexBuilder } from './create-index-builder.js'; -import { CreateSchemaBuilder } from './create-schema-builder.js'; -import { CreateTableBuilder } from './create-table-builder.js'; -import { DropIndexBuilder } from './drop-index-builder.js'; -import { DropSchemaBuilder } from './drop-schema-builder.js'; -import { DropTableBuilder } from './drop-table-builder.js'; -import { CreateViewBuilder } from './create-view-builder.js'; -import { DropViewBuilder } from './drop-view-builder.js'; -import type { KyselyPlugin } from '../plugin/kysely-plugin.js'; -import { CreateTypeBuilder } from './create-type-builder.js'; -import { DropTypeBuilder } from './drop-type-builder.js'; -import { RefreshMaterializedViewBuilder } from './refresh-materialized-view-builder.js'; -/** - * Provides methods for building database schema. - */ -export declare class SchemaModule { - #private; - constructor(executor: QueryExecutor); - /** - * Create a new table. - * - * ### Examples - * - * This example creates a new table with columns `id`, `first_name`, - * `last_name` and `gender`: - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.primaryKey().autoIncrement()) - * .addColumn('first_name', 'varchar', col => col.notNull()) - * .addColumn('last_name', 'varchar', col => col.notNull()) - * .addColumn('gender', 'varchar') - * .execute() - * ``` - * - * This example creates a table with a foreign key. Not all database - * engines support column-level foreign key constraint definitions. - * For example if you are using MySQL 5.X see the next example after - * this one. - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn('id', 'integer', col => col.primaryKey().autoIncrement()) - * .addColumn('owner_id', 'integer', col => col - * .references('person.id') - * .onDelete('cascade') - * ) - * .execute() - * ``` - * - * This example adds a foreign key constraint for a columns just - * like the previous example, but using a table-level statement. - * On MySQL 5.X you need to define foreign key constraints like - * this: - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn('id', 'integer', col => col.primaryKey().autoIncrement()) - * .addColumn('owner_id', 'integer') - * .addForeignKeyConstraint( - * 'pet_owner_id_foreign', ['owner_id'], 'person', ['id'], - * (constraint) => constraint.onDelete('cascade') - * ) - * .execute() - * ``` - */ - createTable(table: TB): CreateTableBuilder; - /** - * Drop a table. - * - * ### Examples - * - * ```ts - * await db.schema - * .dropTable('person') - * .execute() - * ``` - */ - dropTable(table: string): DropTableBuilder; - /** - * Create a new index. - * - * ### Examples - * - * ```ts - * await db.schema - * .createIndex('person_full_name_unique_index') - * .on('person') - * .columns(['first_name', 'last_name']) - * .execute() - * ``` - */ - createIndex(indexName: string): CreateIndexBuilder; - /** - * Drop an index. - * - * ### Examples - * - * ```ts - * await db.schema - * .dropIndex('person_full_name_unique_index') - * .execute() - * ``` - */ - dropIndex(indexName: string): DropIndexBuilder; - /** - * Create a new schema. - * - * ### Examples - * - * ```ts - * await db.schema - * .createSchema('some_schema') - * .execute() - * ``` - */ - createSchema(schema: string): CreateSchemaBuilder; - /** - * Drop a schema. - * - * ### Examples - * - * ```ts - * await db.schema - * .dropSchema('some_schema') - * .execute() - * ``` - */ - dropSchema(schema: string): DropSchemaBuilder; - /** - * Alter a table. - * - * ### Examples - * - * ```ts - * await db.schema - * .alterTable('person') - * .alterColumn('first_name', (ac) => ac.setDataType('text')) - * .execute() - * ``` - */ - alterTable(table: string): AlterTableBuilder; - /** - * Create a new view. - * - * ### Examples - * - * ```ts - * await db.schema - * .createView('dogs') - * .orReplace() - * .as(db.selectFrom('pet').selectAll().where('species', '=', 'dog')) - * .execute() - * ``` - */ - createView(viewName: string): CreateViewBuilder; - /** - * Refresh a materialized view. - * - * ### Examples - * - * ```ts - * await db.schema - * .refreshMaterializedView('my_view') - * .concurrently() - * .execute() - * ``` - */ - refreshMaterializedView(viewName: string): RefreshMaterializedViewBuilder; - /** - * Drop a view. - * - * ### Examples - * - * ```ts - * await db.schema - * .dropView('dogs') - * .ifExists() - * .execute() - * ``` - */ - dropView(viewName: string): DropViewBuilder; - /** - * Create a new type. - * - * Only some dialects like PostgreSQL have user-defined types. - * - * ### Examples - * - * ```ts - * await db.schema - * .createType('species') - * .asEnum(['dog', 'cat', 'frog']) - * .execute() - * ``` - */ - createType(typeName: string): CreateTypeBuilder; - /** - * Drop a type. - * - * Only some dialects like PostgreSQL have user-defined types. - * - * ### Examples - * - * ```ts - * await db.schema - * .dropType('species') - * .ifExists() - * .execute() - * ``` - */ - dropType(typeName: string): DropTypeBuilder; - /** - * Returns a copy of this schema module with the given plugin installed. - */ - withPlugin(plugin: KyselyPlugin): SchemaModule; - /** - * Returns a copy of this schema module without any plugins. - */ - withoutPlugins(): SchemaModule; - /** - * See {@link QueryCreator.withSchema} - */ - withSchema(schema: string): SchemaModule; -} diff --git a/node_modules/kysely/dist/esm/schema/schema.js b/node_modules/kysely/dist/esm/schema/schema.js deleted file mode 100644 index 202dba5..0000000 --- a/node_modules/kysely/dist/esm/schema/schema.js +++ /dev/null @@ -1,325 +0,0 @@ -/// -import { AlterTableNode } from '../operation-node/alter-table-node.js'; -import { CreateIndexNode } from '../operation-node/create-index-node.js'; -import { CreateSchemaNode } from '../operation-node/create-schema-node.js'; -import { CreateTableNode } from '../operation-node/create-table-node.js'; -import { DropIndexNode } from '../operation-node/drop-index-node.js'; -import { DropSchemaNode } from '../operation-node/drop-schema-node.js'; -import { DropTableNode } from '../operation-node/drop-table-node.js'; -import { parseTable } from '../parser/table-parser.js'; -import { AlterTableBuilder } from './alter-table-builder.js'; -import { CreateIndexBuilder } from './create-index-builder.js'; -import { CreateSchemaBuilder } from './create-schema-builder.js'; -import { CreateTableBuilder } from './create-table-builder.js'; -import { DropIndexBuilder } from './drop-index-builder.js'; -import { DropSchemaBuilder } from './drop-schema-builder.js'; -import { DropTableBuilder } from './drop-table-builder.js'; -import { createQueryId } from '../util/query-id.js'; -import { WithSchemaPlugin } from '../plugin/with-schema/with-schema-plugin.js'; -import { CreateViewBuilder } from './create-view-builder.js'; -import { CreateViewNode } from '../operation-node/create-view-node.js'; -import { DropViewBuilder } from './drop-view-builder.js'; -import { DropViewNode } from '../operation-node/drop-view-node.js'; -import { CreateTypeBuilder } from './create-type-builder.js'; -import { DropTypeBuilder } from './drop-type-builder.js'; -import { CreateTypeNode } from '../operation-node/create-type-node.js'; -import { DropTypeNode } from '../operation-node/drop-type-node.js'; -import { parseSchemableIdentifier } from '../parser/identifier-parser.js'; -import { RefreshMaterializedViewBuilder } from './refresh-materialized-view-builder.js'; -import { RefreshMaterializedViewNode } from '../operation-node/refresh-materialized-view-node.js'; -/** - * Provides methods for building database schema. - */ -export class SchemaModule { - #executor; - constructor(executor) { - this.#executor = executor; - } - /** - * Create a new table. - * - * ### Examples - * - * This example creates a new table with columns `id`, `first_name`, - * `last_name` and `gender`: - * - * ```ts - * await db.schema - * .createTable('person') - * .addColumn('id', 'integer', col => col.primaryKey().autoIncrement()) - * .addColumn('first_name', 'varchar', col => col.notNull()) - * .addColumn('last_name', 'varchar', col => col.notNull()) - * .addColumn('gender', 'varchar') - * .execute() - * ``` - * - * This example creates a table with a foreign key. Not all database - * engines support column-level foreign key constraint definitions. - * For example if you are using MySQL 5.X see the next example after - * this one. - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn('id', 'integer', col => col.primaryKey().autoIncrement()) - * .addColumn('owner_id', 'integer', col => col - * .references('person.id') - * .onDelete('cascade') - * ) - * .execute() - * ``` - * - * This example adds a foreign key constraint for a columns just - * like the previous example, but using a table-level statement. - * On MySQL 5.X you need to define foreign key constraints like - * this: - * - * ```ts - * await db.schema - * .createTable('pet') - * .addColumn('id', 'integer', col => col.primaryKey().autoIncrement()) - * .addColumn('owner_id', 'integer') - * .addForeignKeyConstraint( - * 'pet_owner_id_foreign', ['owner_id'], 'person', ['id'], - * (constraint) => constraint.onDelete('cascade') - * ) - * .execute() - * ``` - */ - createTable(table) { - return new CreateTableBuilder({ - queryId: createQueryId(), - executor: this.#executor, - node: CreateTableNode.create(parseTable(table)), - }); - } - /** - * Drop a table. - * - * ### Examples - * - * ```ts - * await db.schema - * .dropTable('person') - * .execute() - * ``` - */ - dropTable(table) { - return new DropTableBuilder({ - queryId: createQueryId(), - executor: this.#executor, - node: DropTableNode.create(parseTable(table)), - }); - } - /** - * Create a new index. - * - * ### Examples - * - * ```ts - * await db.schema - * .createIndex('person_full_name_unique_index') - * .on('person') - * .columns(['first_name', 'last_name']) - * .execute() - * ``` - */ - createIndex(indexName) { - return new CreateIndexBuilder({ - queryId: createQueryId(), - executor: this.#executor, - node: CreateIndexNode.create(indexName), - }); - } - /** - * Drop an index. - * - * ### Examples - * - * ```ts - * await db.schema - * .dropIndex('person_full_name_unique_index') - * .execute() - * ``` - */ - dropIndex(indexName) { - return new DropIndexBuilder({ - queryId: createQueryId(), - executor: this.#executor, - node: DropIndexNode.create(indexName), - }); - } - /** - * Create a new schema. - * - * ### Examples - * - * ```ts - * await db.schema - * .createSchema('some_schema') - * .execute() - * ``` - */ - createSchema(schema) { - return new CreateSchemaBuilder({ - queryId: createQueryId(), - executor: this.#executor, - node: CreateSchemaNode.create(schema), - }); - } - /** - * Drop a schema. - * - * ### Examples - * - * ```ts - * await db.schema - * .dropSchema('some_schema') - * .execute() - * ``` - */ - dropSchema(schema) { - return new DropSchemaBuilder({ - queryId: createQueryId(), - executor: this.#executor, - node: DropSchemaNode.create(schema), - }); - } - /** - * Alter a table. - * - * ### Examples - * - * ```ts - * await db.schema - * .alterTable('person') - * .alterColumn('first_name', (ac) => ac.setDataType('text')) - * .execute() - * ``` - */ - alterTable(table) { - return new AlterTableBuilder({ - queryId: createQueryId(), - executor: this.#executor, - node: AlterTableNode.create(parseTable(table)), - }); - } - /** - * Create a new view. - * - * ### Examples - * - * ```ts - * await db.schema - * .createView('dogs') - * .orReplace() - * .as(db.selectFrom('pet').selectAll().where('species', '=', 'dog')) - * .execute() - * ``` - */ - createView(viewName) { - return new CreateViewBuilder({ - queryId: createQueryId(), - executor: this.#executor, - node: CreateViewNode.create(viewName), - }); - } - /** - * Refresh a materialized view. - * - * ### Examples - * - * ```ts - * await db.schema - * .refreshMaterializedView('my_view') - * .concurrently() - * .execute() - * ``` - */ - refreshMaterializedView(viewName) { - return new RefreshMaterializedViewBuilder({ - queryId: createQueryId(), - executor: this.#executor, - node: RefreshMaterializedViewNode.create(viewName), - }); - } - /** - * Drop a view. - * - * ### Examples - * - * ```ts - * await db.schema - * .dropView('dogs') - * .ifExists() - * .execute() - * ``` - */ - dropView(viewName) { - return new DropViewBuilder({ - queryId: createQueryId(), - executor: this.#executor, - node: DropViewNode.create(viewName), - }); - } - /** - * Create a new type. - * - * Only some dialects like PostgreSQL have user-defined types. - * - * ### Examples - * - * ```ts - * await db.schema - * .createType('species') - * .asEnum(['dog', 'cat', 'frog']) - * .execute() - * ``` - */ - createType(typeName) { - return new CreateTypeBuilder({ - queryId: createQueryId(), - executor: this.#executor, - node: CreateTypeNode.create(parseSchemableIdentifier(typeName)), - }); - } - /** - * Drop a type. - * - * Only some dialects like PostgreSQL have user-defined types. - * - * ### Examples - * - * ```ts - * await db.schema - * .dropType('species') - * .ifExists() - * .execute() - * ``` - */ - dropType(typeName) { - return new DropTypeBuilder({ - queryId: createQueryId(), - executor: this.#executor, - node: DropTypeNode.create(parseSchemableIdentifier(typeName)), - }); - } - /** - * Returns a copy of this schema module with the given plugin installed. - */ - withPlugin(plugin) { - return new SchemaModule(this.#executor.withPlugin(plugin)); - } - /** - * Returns a copy of this schema module without any plugins. - */ - withoutPlugins() { - return new SchemaModule(this.#executor.withoutPlugins()); - } - /** - * See {@link QueryCreator.withSchema} - */ - withSchema(schema) { - return new SchemaModule(this.#executor.withPluginAtFront(new WithSchemaPlugin(schema))); - } -} diff --git a/node_modules/kysely/dist/esm/schema/unique-constraint-builder.d.ts b/node_modules/kysely/dist/esm/schema/unique-constraint-builder.d.ts deleted file mode 100644 index c268f8d..0000000 --- a/node_modules/kysely/dist/esm/schema/unique-constraint-builder.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { OperationNodeSource } from '../operation-node/operation-node-source.js'; -import { UniqueConstraintNode } from '../operation-node/unique-constraint-node.js'; -export declare class UniqueConstraintNodeBuilder implements OperationNodeSource { - #private; - constructor(node: UniqueConstraintNode); - /** - * Adds `nulls not distinct` to the unique constraint definition - * - * Supported by PostgreSQL dialect only - */ - nullsNotDistinct(): UniqueConstraintNodeBuilder; - deferrable(): UniqueConstraintNodeBuilder; - notDeferrable(): UniqueConstraintNodeBuilder; - initiallyDeferred(): UniqueConstraintNodeBuilder; - initiallyImmediate(): UniqueConstraintNodeBuilder; - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func: (qb: this) => T): T; - toOperationNode(): UniqueConstraintNode; -} -export type UniqueConstraintNodeBuilderCallback = (builder: UniqueConstraintNodeBuilder) => UniqueConstraintNodeBuilder; diff --git a/node_modules/kysely/dist/esm/schema/unique-constraint-builder.js b/node_modules/kysely/dist/esm/schema/unique-constraint-builder.js deleted file mode 100644 index c0b5b97..0000000 --- a/node_modules/kysely/dist/esm/schema/unique-constraint-builder.js +++ /dev/null @@ -1,42 +0,0 @@ -/// -import { UniqueConstraintNode } from '../operation-node/unique-constraint-node.js'; -export class UniqueConstraintNodeBuilder { - #node; - constructor(node) { - this.#node = node; - } - /** - * Adds `nulls not distinct` to the unique constraint definition - * - * Supported by PostgreSQL dialect only - */ - nullsNotDistinct() { - return new UniqueConstraintNodeBuilder(UniqueConstraintNode.cloneWith(this.#node, { nullsNotDistinct: true })); - } - deferrable() { - return new UniqueConstraintNodeBuilder(UniqueConstraintNode.cloneWith(this.#node, { deferrable: true })); - } - notDeferrable() { - return new UniqueConstraintNodeBuilder(UniqueConstraintNode.cloneWith(this.#node, { deferrable: false })); - } - initiallyDeferred() { - return new UniqueConstraintNodeBuilder(UniqueConstraintNode.cloneWith(this.#node, { - initiallyDeferred: true, - })); - } - initiallyImmediate() { - return new UniqueConstraintNodeBuilder(UniqueConstraintNode.cloneWith(this.#node, { - initiallyDeferred: false, - })); - } - /** - * Simply calls the provided function passing `this` as the only argument. `$call` returns - * what the provided function returns. - */ - $call(func) { - return func(this); - } - toOperationNode() { - return this.#node; - } -} diff --git a/node_modules/kysely/dist/esm/util/assert.d.ts b/node_modules/kysely/dist/esm/util/assert.d.ts deleted file mode 100644 index eb6e352..0000000 --- a/node_modules/kysely/dist/esm/util/assert.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare function assertNotNullOrUndefined(value: T): asserts value is NonNullable; -export declare function assertIsString(value: any): asserts value is string; diff --git a/node_modules/kysely/dist/esm/util/assert.js b/node_modules/kysely/dist/esm/util/assert.js deleted file mode 100644 index e94144a..0000000 --- a/node_modules/kysely/dist/esm/util/assert.js +++ /dev/null @@ -1,11 +0,0 @@ -/// -export function assertNotNullOrUndefined(value) { - if (value === null || value === undefined) { - throw new Error(`${value} must not be null or undefined`); - } -} -export function assertIsString(value) { - if (typeof value !== 'string') { - throw new Error(`${value} must be a string`); - } -} diff --git a/node_modules/kysely/dist/esm/util/column-type.d.ts b/node_modules/kysely/dist/esm/util/column-type.d.ts deleted file mode 100644 index c9bac6b..0000000 --- a/node_modules/kysely/dist/esm/util/column-type.d.ts +++ /dev/null @@ -1,175 +0,0 @@ -import type { DrainOuterGeneric } from './type-utils.js'; -/** - * This type can be used to specify a different type for - * select, insert and update operations. - * - * Also see the {@link Generated} type. - * - * ### Examples - * - * The next example defines a number column that is optional - * in inserts and updates. All columns are always optional - * in updates so therefore we don't need to specify `undefined` - * for the update type. The type below is useful for all kinds of - * database generated columns like identifiers. The `Generated` - * type is actually just a shortcut for the type in this example: - * - * ```ts - * type GeneratedNumber = ColumnType - * ``` - * - * The above example makes the column optional in inserts - * and updates, but you can still choose to provide the - * column. If you want to prevent insertion/update you - * can se the type as `never`: - * - * ```ts - * type ReadonlyNumber = ColumnType - * ``` - * - * Here's one more example where the type is different - * for each different operation: - * - * ```ts - * type UnupdateableDate = ColumnType - * ``` - */ -export type ColumnType = { - readonly __select__: SelectType; - readonly __insert__: InsertType; - readonly __update__: UpdateType; -}; -/** - * A shortcut for defining database-generated columns. The type - * is the same for all selects, inserts and updates but the - * column is optional for inserts and updates. - * - * The update type is `S` instead of `S | undefined` because updates are always - * optional --> no need to specify optionality. - * ``` - */ -export type Generated = ColumnType; -/** - * A shortcut for defining columns that are only database-generated - * (like postgres GENERATED ALWAYS AS IDENTITY). No insert/update - * is allowed. - */ -export type GeneratedAlways = ColumnType; -/** - * A shortcut for defining JSON columns, which are by default inserted/updated - * as stringified JSON strings. - */ -export type JSONColumnType = ColumnType; -/** - * Evaluates to `K` if `T` can be `null` or `undefined`. - */ -type IfNullable = undefined extends T ? K : null extends T ? K : never; -/** - * Evaluates to `K` if `T` can't be `null` or `undefined`. - */ -type IfNotNullable = undefined extends T ? never : null extends T ? never : T extends never ? never : K; -/** - * Evaluates to `K` if `T` isn't `never`. - */ -type IfNotNever = T extends never ? never : K; -export type SelectType = T extends ColumnType ? S : T; -export type InsertType = T extends ColumnType ? I : T; -export type UpdateType = T extends ColumnType ? U : T; -/** - * Keys of `R` whose `InsertType` values can be `null` or `undefined`. - */ -export type NullableInsertKeys = { - [K in keyof R]: IfNullable, K>; -}[keyof R]; -/** - * Keys of `R` whose `InsertType` values can't be `null` or `undefined`. - */ -export type NonNullableInsertKeys = { - [K in keyof R]: IfNotNullable, K>; -}[keyof R]; -/** - * Keys of `R` whose `SelectType` values are not `never` - */ -type NonNeverSelectKeys = { - [K in keyof R]: IfNotNever, K>; -}[keyof R]; -/** - * Keys of `R` whose `UpdateType` values are not `never` - */ -export type UpdateKeys = { - [K in keyof R]: IfNotNever, K>; -}[keyof R]; -/** - * Given a table interface, extracts the select type from all - * {@link ColumnType} types. - * - * ### Examples - * - * ```ts - * interface PersonTable { - * id: Generated - * first_name: string - * modified_at: ColumnType - * } - * - * type Person = Selectable - * // { - * // id: number, - * // first_name: string - * // modified_at: Date - * // } - * ``` - */ -export type Selectable = DrainOuterGeneric<{ - [K in NonNeverSelectKeys]: SelectType; -}>; -/** - * Given a table interface, extracts the insert type from all - * {@link ColumnType} types. - * - * ### Examples - * - * ```ts - * interface PersonTable { - * id: Generated - * first_name: string - * modified_at: ColumnType - * } - * - * type InsertablePerson = Insertable - * // { - * // id?: number, - * // first_name: string - * // modified_at: string - * // } - * ``` - */ -export type Insertable = DrainOuterGeneric<{ - [K in NonNullableInsertKeys]: InsertType; -} & { - [K in NullableInsertKeys]?: InsertType; -}>; -/** - * Given a table interface, extracts the update type from all - * {@link ColumnType} types. - * - * ### Examples - * - * ```ts - * interface PersonTable { - * id: Generated - * first_name: string - * modified_at: ColumnType - * } - * - * type UpdateablePerson = Updateable - * // { - * // id?: number, - * // first_name?: string - * // } - * ``` - */ -export type Updateable = DrainOuterGeneric<{ - [K in UpdateKeys]?: UpdateType; -}>; -export {}; diff --git a/node_modules/kysely/dist/esm/util/column-type.js b/node_modules/kysely/dist/esm/util/column-type.js deleted file mode 100644 index b5c3956..0000000 --- a/node_modules/kysely/dist/esm/util/column-type.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/util/compilable.d.ts b/node_modules/kysely/dist/esm/util/compilable.d.ts deleted file mode 100644 index 771760c..0000000 --- a/node_modules/kysely/dist/esm/util/compilable.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -export interface Compilable { - compile(): CompiledQuery; -} -export declare function isCompilable(value: unknown): value is Compilable; diff --git a/node_modules/kysely/dist/esm/util/compilable.js b/node_modules/kysely/dist/esm/util/compilable.js deleted file mode 100644 index bac141f..0000000 --- a/node_modules/kysely/dist/esm/util/compilable.js +++ /dev/null @@ -1,5 +0,0 @@ -/// -import { isFunction, isObject } from './object-utils.js'; -export function isCompilable(value) { - return isObject(value) && isFunction(value.compile); -} diff --git a/node_modules/kysely/dist/esm/util/deferred.d.ts b/node_modules/kysely/dist/esm/util/deferred.d.ts deleted file mode 100644 index 32139b7..0000000 --- a/node_modules/kysely/dist/esm/util/deferred.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare class Deferred { - #private; - constructor(); - get promise(): Promise; - resolve: (value: T | PromiseLike) => void; - reject: (reason?: any) => void; -} diff --git a/node_modules/kysely/dist/esm/util/deferred.js b/node_modules/kysely/dist/esm/util/deferred.js deleted file mode 100644 index c9f6f05..0000000 --- a/node_modules/kysely/dist/esm/util/deferred.js +++ /dev/null @@ -1,25 +0,0 @@ -/// -export class Deferred { - #promise; - #resolve; - #reject; - constructor() { - this.#promise = new Promise((resolve, reject) => { - this.#reject = reject; - this.#resolve = resolve; - }); - } - get promise() { - return this.#promise; - } - resolve = (value) => { - if (this.#resolve) { - this.#resolve(value); - } - }; - reject = (reason) => { - if (this.#reject) { - this.#reject(reason); - } - }; -} diff --git a/node_modules/kysely/dist/esm/util/explainable.d.ts b/node_modules/kysely/dist/esm/util/explainable.d.ts deleted file mode 100644 index 8486c65..0000000 --- a/node_modules/kysely/dist/esm/util/explainable.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -export type ExplainFormat = 'text' | 'xml' | 'json' | 'yaml' | 'traditional' | 'tree'; -export interface Explainable { - /** - * Executes query with `explain` statement before the main query. - * - * ```ts - * const explained = await db - * .selectFrom('person') - * .where('gender', '=', 'female') - * .selectAll() - * .explain('json') - * ``` - * - * The generated SQL (MySQL): - * - * ```sql - * explain format=json select * from `person` where `gender` = ? - * ``` - * - * You can also execute `explain analyze` statements. - * - * ```ts - * import { sql } from 'kysely' - * - * const explained = await db - * .selectFrom('person') - * .where('gender', '=', 'female') - * .selectAll() - * .explain('json', sql`analyze`) - * ``` - * - * The generated SQL (PostgreSQL): - * - * ```sql - * explain (analyze, format json) select * from "person" where "gender" = $1 - * ``` - */ - explain = Record>(format?: ExplainFormat, options?: Expression): Promise; -} diff --git a/node_modules/kysely/dist/esm/util/explainable.js b/node_modules/kysely/dist/esm/util/explainable.js deleted file mode 100644 index f5be139..0000000 --- a/node_modules/kysely/dist/esm/util/explainable.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/util/infer-result.d.ts b/node_modules/kysely/dist/esm/util/infer-result.d.ts deleted file mode 100644 index 4ed7fa2..0000000 --- a/node_modules/kysely/dist/esm/util/infer-result.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import type { DeleteResult } from '../query-builder/delete-result.js'; -import type { InsertResult } from '../query-builder/insert-result.js'; -import type { MergeResult } from '../query-builder/merge-result.js'; -import type { UpdateResult } from '../query-builder/update-result.js'; -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { Compilable } from './compilable.js'; -import type { Simplify } from './type-utils.js'; -/** - * A helper type that allows inferring a select/insert/update/delete query's result - * type from a query builder or compiled query. - * - * ### Examples - * - * Infer a query builder's result type: - * - * ```ts - * import { InferResult } from 'kysely' - * - * const query = db - * .selectFrom('person') - * .innerJoin('pet', 'pet.owner_id', 'person.id') - * .select(['person.first_name', 'pet.name']) - * - * type QueryResult = InferResult // { first_name: string; name: string; }[] - * ``` - * - * Infer a compiled query's result type: - * - * ```ts - * import { InferResult } from 'kysely' - * - * const compiledQuery = db - * .insertInto('person') - * .values({ - * first_name: 'Foo', - * last_name: 'Barson', - * gender: 'other', - * age: 15, - * }) - * .returningAll() - * .compile() - * - * type QueryResult = InferResult // Selectable[] - * ``` - */ -export type InferResult | CompiledQuery> = C extends Compilable ? ResolveResult : C extends CompiledQuery ? ResolveResult : never; -type ResolveResult = O extends InsertResult | UpdateResult | DeleteResult | MergeResult ? O[] : Simplify[]; -export {}; diff --git a/node_modules/kysely/dist/esm/util/infer-result.js b/node_modules/kysely/dist/esm/util/infer-result.js deleted file mode 100644 index 0dbc2e9..0000000 --- a/node_modules/kysely/dist/esm/util/infer-result.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/util/json-object-args.d.ts b/node_modules/kysely/dist/esm/util/json-object-args.d.ts deleted file mode 100644 index b512012..0000000 --- a/node_modules/kysely/dist/esm/util/json-object-args.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Expression } from '../expression/expression.js'; -import type { SelectQueryNode } from '../operation-node/select-query-node.js'; -export declare function getJsonObjectArgs(node: SelectQueryNode, table: string): Expression[]; diff --git a/node_modules/kysely/dist/esm/util/json-object-args.js b/node_modules/kysely/dist/esm/util/json-object-args.js deleted file mode 100644 index 0a32daa..0000000 --- a/node_modules/kysely/dist/esm/util/json-object-args.js +++ /dev/null @@ -1,32 +0,0 @@ -/// -import { ExpressionWrapper } from '../expression/expression-wrapper.js'; -import { AliasNode } from '../operation-node/alias-node.js'; -import { ColumnNode } from '../operation-node/column-node.js'; -import { IdentifierNode } from '../operation-node/identifier-node.js'; -import { ReferenceNode } from '../operation-node/reference-node.js'; -import { TableNode } from '../operation-node/table-node.js'; -import { ValueNode } from '../operation-node/value-node.js'; -export function getJsonObjectArgs(node, table) { - const args = []; - for (const { selection: s } of node.selections ?? []) { - if (ReferenceNode.is(s) && ColumnNode.is(s.column)) { - args.push(colName(s.column.column.name), colRef(table, s.column.column.name)); - } - else if (ColumnNode.is(s)) { - args.push(colName(s.column.name), colRef(table, s.column.name)); - } - else if (AliasNode.is(s) && IdentifierNode.is(s.alias)) { - args.push(colName(s.alias.name), colRef(table, s.alias.name)); - } - else { - throw new Error(`can't extract column names from the select query node`); - } - } - return args; -} -function colName(col) { - return new ExpressionWrapper(ValueNode.createImmediate(col)); -} -function colRef(table, col) { - return new ExpressionWrapper(ReferenceNode.create(ColumnNode.create(col), TableNode.create(table))); -} diff --git a/node_modules/kysely/dist/esm/util/log-once.d.ts b/node_modules/kysely/dist/esm/util/log-once.d.ts deleted file mode 100644 index 76ec788..0000000 --- a/node_modules/kysely/dist/esm/util/log-once.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * Use for system-level logging, such as deprecation messages. - * Logs a message and ensures it won't be logged again. - */ -export declare function logOnce(message: string): void; diff --git a/node_modules/kysely/dist/esm/util/log-once.js b/node_modules/kysely/dist/esm/util/log-once.js deleted file mode 100644 index 76a9aed..0000000 --- a/node_modules/kysely/dist/esm/util/log-once.js +++ /dev/null @@ -1,13 +0,0 @@ -/// -const LOGGED_MESSAGES = new Set(); -/** - * Use for system-level logging, such as deprecation messages. - * Logs a message and ensures it won't be logged again. - */ -export function logOnce(message) { - if (LOGGED_MESSAGES.has(message)) { - return; - } - LOGGED_MESSAGES.add(message); - console.log(message); -} diff --git a/node_modules/kysely/dist/esm/util/log.d.ts b/node_modules/kysely/dist/esm/util/log.d.ts deleted file mode 100644 index 6106593..0000000 --- a/node_modules/kysely/dist/esm/util/log.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { CompiledQuery } from '../query-compiler/compiled-query.js'; -import type { ArrayItemType } from './type-utils.js'; -declare const logLevels: readonly ["query", "error"]; -export declare const LOG_LEVELS: Readonly; -export type LogLevel = ArrayItemType; -export interface QueryLogEvent { - readonly level: 'query'; - readonly isStream?: boolean; - readonly query: CompiledQuery; - readonly queryDurationMillis: number; -} -export interface ErrorLogEvent { - readonly level: 'error'; - readonly error: unknown; - readonly query: CompiledQuery; - readonly queryDurationMillis: number; -} -export type LogEvent = QueryLogEvent | ErrorLogEvent; -export type Logger = (event: LogEvent) => void | Promise; -export type LogConfig = ReadonlyArray | Logger; -export declare class Log { - #private; - constructor(config: LogConfig); - isLevelEnabled(level: LogLevel): boolean; - query(getEvent: () => QueryLogEvent): Promise; - error(getEvent: () => ErrorLogEvent): Promise; -} -export {}; diff --git a/node_modules/kysely/dist/esm/util/log.js b/node_modules/kysely/dist/esm/util/log.js deleted file mode 100644 index 2fadc36..0000000 --- a/node_modules/kysely/dist/esm/util/log.js +++ /dev/null @@ -1,56 +0,0 @@ -/// -import { freeze, isFunction } from './object-utils.js'; -const logLevels = ['query', 'error']; -export const LOG_LEVELS = freeze(logLevels); -export class Log { - #levels; - #logger; - constructor(config) { - if (isFunction(config)) { - this.#logger = config; - this.#levels = freeze({ - query: true, - error: true, - }); - } - else { - this.#logger = defaultLogger; - this.#levels = freeze({ - query: config.includes('query'), - error: config.includes('error'), - }); - } - } - isLevelEnabled(level) { - return this.#levels[level]; - } - async query(getEvent) { - if (this.#levels.query) { - await this.#logger(getEvent()); - } - } - async error(getEvent) { - if (this.#levels.error) { - await this.#logger(getEvent()); - } - } -} -function defaultLogger(event) { - if (event.level === 'query') { - const prefix = `kysely:query:${event.isStream ? 'stream:' : ''}`; - console.log(`${prefix} ${event.query.sql}`); - console.log(`${prefix} duration: ${event.queryDurationMillis.toFixed(1)}ms`); - } - else if (event.level === 'error') { - if (event.error instanceof Error) { - console.error(`kysely:error: ${event.error.stack ?? event.error.message}`); - } - else { - console.error(`kysely:error: ${JSON.stringify({ - error: event.error, - query: event.query.sql, - queryDurationMillis: event.queryDurationMillis, - })}`); - } - } -} diff --git a/node_modules/kysely/dist/esm/util/object-utils.d.ts b/node_modules/kysely/dist/esm/util/object-utils.d.ts deleted file mode 100644 index 08138fd..0000000 --- a/node_modules/kysely/dist/esm/util/object-utils.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { ShallowRecord } from './type-utils.js'; -export declare function isEmpty(obj: ArrayLike | string | object): boolean; -export declare function isUndefined(obj: unknown): obj is undefined; -export declare function isString(obj: unknown): obj is string; -export declare function isNumber(obj: unknown): obj is number; -export declare function isBoolean(obj: unknown): obj is boolean; -export declare function isNull(obj: unknown): obj is null; -export declare function isDate(obj: unknown): obj is Date; -export declare function isBigInt(obj: unknown): obj is bigint; -export declare function isBuffer(obj: unknown): obj is { - length: number; -}; -export declare function isFunction(obj: unknown): obj is Function; -export declare function isObject(obj: unknown): obj is ShallowRecord; -export declare function isArrayBufferOrView(obj: unknown): obj is ArrayBuffer | ArrayBufferView; -export declare function isPlainObject(obj: unknown): obj is Record; -export declare function getLast(arr: ArrayLike): T | undefined; -export declare function freeze(obj: T): Readonly; -export declare function asArray(arg: T | ReadonlyArray): ReadonlyArray; -export declare function asReadonlyArray(arg: T | ReadonlyArray): ReadonlyArray; -export declare function isReadonlyArray(arg: unknown): arg is ReadonlyArray; -export declare function noop(obj: T): T; -export declare function compare(obj1: unknown, obj2: unknown): boolean; diff --git a/node_modules/kysely/dist/esm/util/object-utils.js b/node_modules/kysely/dist/esm/util/object-utils.js deleted file mode 100644 index 57014cd..0000000 --- a/node_modules/kysely/dist/esm/util/object-utils.js +++ /dev/null @@ -1,141 +0,0 @@ -/// -export function isEmpty(obj) { - if (Array.isArray(obj) || isString(obj) || isBuffer(obj)) { - return obj.length === 0; - } - else if (obj) { - return Object.keys(obj).length === 0; - } - return false; -} -export function isUndefined(obj) { - return typeof obj === 'undefined' || obj === undefined; -} -export function isString(obj) { - return typeof obj === 'string'; -} -export function isNumber(obj) { - return typeof obj === 'number'; -} -export function isBoolean(obj) { - return typeof obj === 'boolean'; -} -export function isNull(obj) { - return obj === null; -} -export function isDate(obj) { - return obj instanceof Date; -} -export function isBigInt(obj) { - return typeof obj === 'bigint'; -} -// Don't change the returnd type to `obj is Buffer` to not create a -// hard dependency to node. -export function isBuffer(obj) { - return typeof Buffer !== 'undefined' && Buffer.isBuffer(obj); -} -export function isFunction(obj) { - return typeof obj === 'function'; -} -export function isObject(obj) { - return typeof obj === 'object' && obj !== null; -} -export function isArrayBufferOrView(obj) { - return obj instanceof ArrayBuffer || ArrayBuffer.isView(obj); -} -export function isPlainObject(obj) { - if (!isObject(obj) || getTag(obj) !== '[object Object]') { - return false; - } - if (Object.getPrototypeOf(obj) === null) { - return true; - } - let proto = obj; - while (Object.getPrototypeOf(proto) !== null) { - proto = Object.getPrototypeOf(proto); - } - return Object.getPrototypeOf(obj) === proto; -} -export function getLast(arr) { - return arr[arr.length - 1]; -} -export function freeze(obj) { - return Object.freeze(obj); -} -export function asArray(arg) { - if (isReadonlyArray(arg)) { - return arg; - } - else { - return [arg]; - } -} -export function asReadonlyArray(arg) { - if (isReadonlyArray(arg)) { - return arg; - } - else { - return freeze([arg]); - } -} -export function isReadonlyArray(arg) { - return Array.isArray(arg); -} -export function noop(obj) { - return obj; -} -export function compare(obj1, obj2) { - if (isReadonlyArray(obj1) && isReadonlyArray(obj2)) { - return compareArrays(obj1, obj2); - } - else if (isObject(obj1) && isObject(obj2)) { - return compareObjects(obj1, obj2); - } - return obj1 === obj2; -} -function compareArrays(arr1, arr2) { - if (arr1.length !== arr2.length) { - return false; - } - for (let i = 0; i < arr1.length; ++i) { - if (!compare(arr1[i], arr2[i])) { - return false; - } - } - return true; -} -function compareObjects(obj1, obj2) { - if (isBuffer(obj1) && isBuffer(obj2)) { - return compareBuffers(obj1, obj2); - } - else if (isDate(obj1) && isDate(obj2)) { - return compareDates(obj1, obj2); - } - return compareGenericObjects(obj1, obj2); -} -function compareBuffers(buf1, buf2) { - return Buffer.compare(buf1, buf2) === 0; -} -function compareDates(date1, date2) { - return date1.getTime() === date2.getTime(); -} -function compareGenericObjects(obj1, obj2) { - const keys1 = Object.keys(obj1); - const keys2 = Object.keys(obj2); - if (keys1.length !== keys2.length) { - return false; - } - for (const key of keys1) { - if (!compare(obj1[key], obj2[key])) { - return false; - } - } - return true; -} -const toString = Object.prototype.toString; -function getTag(value) { - if (value == null) { - return value === undefined ? '[object Undefined]' : '[object Null]'; - } - return toString.call(value); -} diff --git a/node_modules/kysely/dist/esm/util/performance-now.d.ts b/node_modules/kysely/dist/esm/util/performance-now.d.ts deleted file mode 100644 index 0150677..0000000 --- a/node_modules/kysely/dist/esm/util/performance-now.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function performanceNow(): number; diff --git a/node_modules/kysely/dist/esm/util/performance-now.js b/node_modules/kysely/dist/esm/util/performance-now.js deleted file mode 100644 index 5908fa8..0000000 --- a/node_modules/kysely/dist/esm/util/performance-now.js +++ /dev/null @@ -1,10 +0,0 @@ -/// -import { isFunction } from './object-utils.js'; -export function performanceNow() { - if (typeof performance !== 'undefined' && isFunction(performance.now)) { - return performance.now(); - } - else { - return Date.now(); - } -} diff --git a/node_modules/kysely/dist/esm/util/provide-controlled-connection.d.ts b/node_modules/kysely/dist/esm/util/provide-controlled-connection.d.ts deleted file mode 100644 index 28a0708..0000000 --- a/node_modules/kysely/dist/esm/util/provide-controlled-connection.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { ConnectionProvider } from '../driver/connection-provider.js'; -import type { DatabaseConnection } from '../driver/database-connection.js'; -export interface ControlledConnection { - readonly connection: DatabaseConnection; - readonly release: () => void; -} -export declare function provideControlledConnection(connectionProvider: ConnectionProvider): Promise; diff --git a/node_modules/kysely/dist/esm/util/provide-controlled-connection.js b/node_modules/kysely/dist/esm/util/provide-controlled-connection.js deleted file mode 100644 index 66209fd..0000000 --- a/node_modules/kysely/dist/esm/util/provide-controlled-connection.js +++ /dev/null @@ -1,22 +0,0 @@ -/// -import { Deferred } from './deferred.js'; -import { freeze } from './object-utils.js'; -export async function provideControlledConnection(connectionProvider) { - const connectionDefer = new Deferred(); - const connectionReleaseDefer = new Deferred(); - connectionProvider - .provideConnection(async (connection) => { - connectionDefer.resolve(connection); - return await connectionReleaseDefer.promise; - }) - .catch((ex) => connectionDefer.reject(ex)); - // Create composite of the connection and the release method instead of - // modifying the connection or creating a new nesting `DatabaseConnection`. - // This way we don't accidentally override any methods of 3rd party - // connections and don't return wrapped connections to drivers that - // expect a certain specific connection class. - return freeze({ - connection: await connectionDefer.promise, - release: connectionReleaseDefer.resolve, - }); -} diff --git a/node_modules/kysely/dist/esm/util/query-id.d.ts b/node_modules/kysely/dist/esm/util/query-id.d.ts deleted file mode 100644 index 3091b22..0000000 --- a/node_modules/kysely/dist/esm/util/query-id.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface QueryId { - readonly queryId: string; -} -export declare function createQueryId(): QueryId; diff --git a/node_modules/kysely/dist/esm/util/query-id.js b/node_modules/kysely/dist/esm/util/query-id.js deleted file mode 100644 index 9ab8ee1..0000000 --- a/node_modules/kysely/dist/esm/util/query-id.js +++ /dev/null @@ -1,14 +0,0 @@ -/// -import { randomString } from './random-string.js'; -export function createQueryId() { - return new LazyQueryId(); -} -class LazyQueryId { - #queryId; - get queryId() { - if (this.#queryId === undefined) { - this.#queryId = randomString(8); - } - return this.#queryId; - } -} diff --git a/node_modules/kysely/dist/esm/util/random-string.d.ts b/node_modules/kysely/dist/esm/util/random-string.d.ts deleted file mode 100644 index 03b85f4..0000000 --- a/node_modules/kysely/dist/esm/util/random-string.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function randomString(length: number): string; diff --git a/node_modules/kysely/dist/esm/util/random-string.js b/node_modules/kysely/dist/esm/util/random-string.js deleted file mode 100644 index 92f1319..0000000 --- a/node_modules/kysely/dist/esm/util/random-string.js +++ /dev/null @@ -1,75 +0,0 @@ -/// -const CHARS = [ - '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', -]; -export function randomString(length) { - let chars = ''; - for (let i = 0; i < length; ++i) { - chars += randomChar(); - } - return chars; -} -function randomChar() { - return CHARS[~~(Math.random() * CHARS.length)]; -} diff --git a/node_modules/kysely/dist/esm/util/require-all-props.d.ts b/node_modules/kysely/dist/esm/util/require-all-props.d.ts deleted file mode 100644 index 1afa3fa..0000000 --- a/node_modules/kysely/dist/esm/util/require-all-props.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Utility type to force use of all properties of T. - * - * Similar to Required build-in type, but allows `undefined` values. - */ -type AllProps = T & { - [P in keyof T]-?: unknown; -}; -/** - * Helper function to check listed properties according to given type. Check if all properties has been used when object is initialised. - * - * Example use: - * - * ```ts - * type SomeType = { propA: string; propB?: number; } - * - * // propB has to be mentioned even it is optional. It still should be initialized with undefined. - * const a: SomeType = requireAllProps({ propA: "value A", propB: undefined }); - * - * // checked type is implicit for variable. - * const b = requireAllProps({ propA: "value A", propB: undefined }); - * ``` - * - * Wrong use of this helper: - * - * 1. Omit checked type - all checked properties will be expect as of type never - * - * ```ts - * type SomeType = { propA: string; propB?: number; } - * // const z: SomeType = requireAllProps({ propC: "no type will work" }); // Property 'propA' is missing in type '{ propC: string; }' but required in type 'SomeType'. - * ``` - * - * 2. Apply to spreaded object - there is no way how to check in compile time if spreaded object contains all properties - * - * ```ts - * type SomeType = { propA: string; propB?: number; } - * const y: SomeType = { propA: "" }; // valid object according to SomeType declaration - * // const x = requireAllProps({ ...y }); // Argument of type '{ propA: string; propB?: number; }' is not assignable to parameter of type 'AllProps'. - * ``` - * - * @param obj object to check if all properties has been used - * @returns untouched obj parameter is returned - */ -export declare function requireAllProps(obj: AllProps): T; -export {}; diff --git a/node_modules/kysely/dist/esm/util/require-all-props.js b/node_modules/kysely/dist/esm/util/require-all-props.js deleted file mode 100644 index 53c31c7..0000000 --- a/node_modules/kysely/dist/esm/util/require-all-props.js +++ /dev/null @@ -1,39 +0,0 @@ -/// -/** - * Helper function to check listed properties according to given type. Check if all properties has been used when object is initialised. - * - * Example use: - * - * ```ts - * type SomeType = { propA: string; propB?: number; } - * - * // propB has to be mentioned even it is optional. It still should be initialized with undefined. - * const a: SomeType = requireAllProps({ propA: "value A", propB: undefined }); - * - * // checked type is implicit for variable. - * const b = requireAllProps({ propA: "value A", propB: undefined }); - * ``` - * - * Wrong use of this helper: - * - * 1. Omit checked type - all checked properties will be expect as of type never - * - * ```ts - * type SomeType = { propA: string; propB?: number; } - * // const z: SomeType = requireAllProps({ propC: "no type will work" }); // Property 'propA' is missing in type '{ propC: string; }' but required in type 'SomeType'. - * ``` - * - * 2. Apply to spreaded object - there is no way how to check in compile time if spreaded object contains all properties - * - * ```ts - * type SomeType = { propA: string; propB?: number; } - * const y: SomeType = { propA: "" }; // valid object according to SomeType declaration - * // const x = requireAllProps({ ...y }); // Argument of type '{ propA: string; propB?: number; }' is not assignable to parameter of type 'AllProps'. - * ``` - * - * @param obj object to check if all properties has been used - * @returns untouched obj parameter is returned - */ -export function requireAllProps(obj) { - return obj; -} diff --git a/node_modules/kysely/dist/esm/util/stack-trace-utils.d.ts b/node_modules/kysely/dist/esm/util/stack-trace-utils.d.ts deleted file mode 100644 index 5cdde38..0000000 --- a/node_modules/kysely/dist/esm/util/stack-trace-utils.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare function extendStackTrace(err: unknown, stackError: Error): unknown; diff --git a/node_modules/kysely/dist/esm/util/stack-trace-utils.js b/node_modules/kysely/dist/esm/util/stack-trace-utils.js deleted file mode 100644 index e773e40..0000000 --- a/node_modules/kysely/dist/esm/util/stack-trace-utils.js +++ /dev/null @@ -1,14 +0,0 @@ -/// -import { isObject, isString } from './object-utils.js'; -export function extendStackTrace(err, stackError) { - if (isStackHolder(err) && stackError.stack) { - // Remove the first line that just says `Error`. - const stackExtension = stackError.stack.split('\n').slice(1).join('\n'); - err.stack += `\n${stackExtension}`; - return err; - } - return err; -} -function isStackHolder(obj) { - return isObject(obj) && isString(obj.stack); -} diff --git a/node_modules/kysely/dist/esm/util/streamable.d.ts b/node_modules/kysely/dist/esm/util/streamable.d.ts deleted file mode 100644 index 5225310..0000000 --- a/node_modules/kysely/dist/esm/util/streamable.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export interface Streamable { - /** - * Executes the query and streams the rows. - * - * The optional argument `chunkSize` defines how many rows to fetch from the database - * at a time. It only affects some dialects like PostgreSQL that support it. - * - * ### Examples - * - * ```ts - * const stream = db - * .selectFrom('person') - * .select(['first_name', 'last_name']) - * .where('gender', '=', 'other') - * .stream() - * - * for await (const person of stream) { - * console.log(person.first_name) - * - * if (person.last_name === 'Something') { - * // Breaking or returning before the stream has ended will release - * // the database connection and invalidate the stream. - * break - * } - * } - * ``` - */ - stream(chunkSize?: number): AsyncIterableIterator; -} diff --git a/node_modules/kysely/dist/esm/util/streamable.js b/node_modules/kysely/dist/esm/util/streamable.js deleted file mode 100644 index 4eaf86c..0000000 --- a/node_modules/kysely/dist/esm/util/streamable.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/util/type-error.d.ts b/node_modules/kysely/dist/esm/util/type-error.d.ts deleted file mode 100644 index 343f634..0000000 --- a/node_modules/kysely/dist/esm/util/type-error.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface KyselyTypeError { - readonly __kyselyTypeError__: E; -} diff --git a/node_modules/kysely/dist/esm/util/type-error.js b/node_modules/kysely/dist/esm/util/type-error.js deleted file mode 100644 index b0e9b1f..0000000 --- a/node_modules/kysely/dist/esm/util/type-error.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/dist/esm/util/type-utils.d.ts b/node_modules/kysely/dist/esm/util/type-utils.d.ts deleted file mode 100644 index 2b56e49..0000000 --- a/node_modules/kysely/dist/esm/util/type-utils.d.ts +++ /dev/null @@ -1,189 +0,0 @@ -import type { InsertResult } from '../query-builder/insert-result.js'; -import type { DeleteResult } from '../query-builder/delete-result.js'; -import type { UpdateResult } from '../query-builder/update-result.js'; -import type { KyselyTypeError } from './type-error.js'; -import type { MergeResult } from '../query-builder/merge-result.js'; -/** - * Given a database type and a union of table names in that db, returns - * a union type with all possible column names. - * - * Example: - * - * ```ts - * interface Person { - * id: number - * } - * - * interface Pet { - * name: string - * species: 'cat' | 'dog' - * } - * - * interface Movie { - * stars: number - * } - * - * interface Database { - * person: Person - * pet: Pet - * movie: Movie - * } - * - * type Columns = AnyColumn - * - * // Columns == 'id' | 'name' | 'species' - * ``` - */ -export type AnyColumn = { - [T in TB]: keyof DB[T]; -}[TB] & string; -/** - * Extracts a column type. - */ -export type ExtractColumnType = { - [T in TB]: C extends keyof DB[T] ? DB[T][C] : never; -}[TB]; -/** - * Given a database type and a union of table names in that db, returns - * a union type with all possible `table`.`column` combinations. - * - * Example: - * - * ```ts - * interface Person { - * id: number - * } - * - * interface Pet { - * name: string - * species: 'cat' | 'dog' - * } - * - * interface Movie { - * stars: number - * } - * - * interface Database { - * person: Person - * pet: Pet - * movie: Movie - * } - * - * type Columns = AnyColumnWithTable - * - * // Columns == 'person.id' | 'pet.name' | 'pet.species' - * ``` - */ -export type AnyColumnWithTable = { - [T in TB]: `${T & string}.${keyof DB[T] & string}`; -}[TB]; -/** - * Just like {@link AnyColumn} but with a ` as ` suffix. - */ -export type AnyAliasedColumn = `${AnyColumn} as ${string}`; -/** - * Just like {@link AnyColumnWithTable} but with a ` as ` suffix. - */ -export type AnyAliasedColumnWithTable = `${AnyColumnWithTable} as ${string}`; -/** - * Extracts the item type of an array. - */ -export type ArrayItemType = T extends ReadonlyArray ? I : never; -export type SimplifySingleResult = O extends InsertResult ? O : O extends DeleteResult ? O : O extends UpdateResult ? O : O extends MergeResult ? O : Simplify | undefined; -export type SimplifyResult = O extends InsertResult ? O : O extends DeleteResult ? O : O extends UpdateResult ? O : O extends MergeResult ? O : Simplify; -export type Simplify = DrainOuterGeneric<{ - [K in keyof T]: T[K]; -} & {}>; -/** - * Represents a database row whose column names and their types are unknown. - */ -export type UnknownRow = Record; -/** - * Makes all properties of object type `T` nullable. - */ -export type Nullable = { - [P in keyof T]: T[P] | null; -}; -/** - * Evaluates to `true` if `T` is `never`. - */ -export type IsNever = [T] extends [never] ? true : false; -/** - * Evaluates to `true` if `T` is `any`. - */ -export type IsAny = 0 extends T & 1 ? true : false; -/** - * Evaluates to `true` if the types `T` and `U` are equal. - */ -export type Equals = (() => G extends T ? 1 : 2) extends () => G extends U ? 1 : 2 ? true : false; -export type NarrowPartial = DrainOuterGeneric : T[K] extends O[K] ? T[K] : KyselyTypeError<`$narrowType() call failed: passed type does not exist in '${K}'s type union`> : O[K]; -} : never>; -/** - * A type constant for marking a column as not null. Can be used with `$narrowPartial`. - * - * Example: - * - * ```ts - * import type { NotNull } from 'kysely' - * - * await db.selectFrom('person') - * .where('nullable_column', 'is not', null) - * .selectAll() - * .$narrowType<{ nullable_column: NotNull }>() - * .executeTakeFirstOrThrow() - * ``` - */ -export type NotNull = { - readonly __notNull__: unique symbol; -}; -export type SqlBool = boolean | 0 | 1; -/** - * Utility to reduce depth of TypeScript's internal type instantiation stack. - * - * Example: - * - * ```ts - * type A = { item: T } - * - * type Test = A< - * A>>>>>>>>>>>>>>>>>>>>>>> - * > - * - * // type Error = Test // Type instantiation is excessively deep and possibly infinite.ts (2589) - * ``` - * - * To fix this, we can use `DrainOuterGeneric`: - * - * ```ts - * type A = DrainOuterGeneric<{ item: T }> - * - * type Test = A< - * A>>>>>>>>>>>>>>>>>>>>>>> - * > - * - * type Ok = Test // Ok - * ``` - */ -export type DrainOuterGeneric = [T] extends [unknown] ? T : never; -export type ShallowRecord = DrainOuterGeneric<{ - [P in K]: T; -}>; -/** - * Dehydrates any root properties of an object that are not valid JSON types. - * - * For now, we catch anything in {@link StringsWhenDataTypeNotAvailable} and convert it to `string`. - */ -export type ShallowDehydrateObject = { - [K in keyof O]: ShallowDehydrateValue; -}; -/** - * Dehydrates a value when it is not a valid JSON type. - * - * For now, we catch anything in {@link StringsWhenDataTypeNotAvailable} and convert it to `string`, - * and anything in {@link NumbersWhenDataTypeNotAvailable} and convert it to `number`. - */ -export type ShallowDehydrateValue = T extends null | undefined ? T : T extends (infer U)[] | null | undefined ? Array> | Extract : Exclude | ([Extract] extends [never] ? never : number) | ([Extract] extends [never] ? never : string); -export type StringsWhenDataTypeNotAvailable = Date | Uint8Array; -export type NumbersWhenDataTypeNotAvailable = bigint | NumericString; -export type NumericString = `${number}`; diff --git a/node_modules/kysely/dist/esm/util/type-utils.js b/node_modules/kysely/dist/esm/util/type-utils.js deleted file mode 100644 index 0c174b2..0000000 --- a/node_modules/kysely/dist/esm/util/type-utils.js +++ /dev/null @@ -1,2 +0,0 @@ -/// -export {}; diff --git a/node_modules/kysely/helpers/mssql.d.ts b/node_modules/kysely/helpers/mssql.d.ts deleted file mode 100644 index 407f951..0000000 --- a/node_modules/kysely/helpers/mssql.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '../dist/cjs/helpers/mssql.js' \ No newline at end of file diff --git a/node_modules/kysely/helpers/mssql.js b/node_modules/kysely/helpers/mssql.js deleted file mode 100644 index e4df608..0000000 --- a/node_modules/kysely/helpers/mssql.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../dist/cjs/helpers/mssql.js') \ No newline at end of file diff --git a/node_modules/kysely/helpers/mysql.d.ts b/node_modules/kysely/helpers/mysql.d.ts deleted file mode 100644 index 67dc7f9..0000000 --- a/node_modules/kysely/helpers/mysql.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '../dist/cjs/helpers/mysql.js' \ No newline at end of file diff --git a/node_modules/kysely/helpers/mysql.js b/node_modules/kysely/helpers/mysql.js deleted file mode 100644 index 0144f59..0000000 --- a/node_modules/kysely/helpers/mysql.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../dist/cjs/helpers/mysql.js') \ No newline at end of file diff --git a/node_modules/kysely/helpers/postgres.d.ts b/node_modules/kysely/helpers/postgres.d.ts deleted file mode 100644 index 59d5681..0000000 --- a/node_modules/kysely/helpers/postgres.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '../dist/cjs/helpers/postgres.js' \ No newline at end of file diff --git a/node_modules/kysely/helpers/postgres.js b/node_modules/kysely/helpers/postgres.js deleted file mode 100644 index c2239a9..0000000 --- a/node_modules/kysely/helpers/postgres.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../dist/cjs/helpers/postgres.js') \ No newline at end of file diff --git a/node_modules/kysely/helpers/sqlite.d.ts b/node_modules/kysely/helpers/sqlite.d.ts deleted file mode 100644 index 036611c..0000000 --- a/node_modules/kysely/helpers/sqlite.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '../dist/cjs/helpers/sqlite.js' \ No newline at end of file diff --git a/node_modules/kysely/helpers/sqlite.js b/node_modules/kysely/helpers/sqlite.js deleted file mode 100644 index cc6b411..0000000 --- a/node_modules/kysely/helpers/sqlite.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../dist/cjs/helpers/sqlite.js') \ No newline at end of file diff --git a/node_modules/kysely/outdated-typescript.d.ts b/node_modules/kysely/outdated-typescript.d.ts deleted file mode 100644 index ec28058..0000000 --- a/node_modules/kysely/outdated-typescript.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { KyselyTypeError } from './dist/cjs/util/type-error' - -declare const Kysely: KyselyTypeError<'The installed TypeScript version is outdated and cannot guarantee type-safety with Kysely. Please upgrade to version 4.6 or newer.'> -declare const RawBuilder: KyselyTypeError<'The installed TypeScript version is outdated and cannot guarantee type-safety with Kysely. Please upgrade to version 4.6 or newer.'> -declare const sql: KyselyTypeError<'The installed TypeScript version is outdated and cannot guarantee type-safety with Kysely. Please upgrade to version 4.6 or newer.'> diff --git a/node_modules/kysely/package.json b/node_modules/kysely/package.json deleted file mode 100644 index 8d84a7d..0000000 --- a/node_modules/kysely/package.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "name": "kysely", - "version": "0.28.12", - "description": "Type safe SQL query builder", - "repository": { - "type": "git", - "url": "git://github.com/kysely-org/kysely.git" - }, - "homepage": "https://kysely.dev", - "keywords": [ - "query", - "builder", - "query builder", - "sql", - "typescript", - "postgres", - "postgresql", - "mysql", - "sqlite", - "mssql", - "ms sql server", - "sql server", - "type-safe", - "type-safety", - "plugins" - ], - "engines": { - "node": ">=20.0.0" - }, - "main": "dist/cjs/index.js", - "module": "dist/esm/index.js", - "typesVersions": { - "<4.6": { - "*": [ - "outdated-typescript.d.ts" - ] - } - }, - "files": [ - "dist", - "helpers", - "outdated-typescript.d.ts" - ], - "exports": { - ".": { - "import": "./dist/esm/index.js", - "require": "./dist/cjs/index.js", - "default": "./dist/cjs/index.js" - }, - "./helpers/postgres": { - "import": "./dist/esm/helpers/postgres.js", - "require": "./dist/cjs/helpers/postgres.js", - "default": "./dist/cjs/helpers/postgres.js" - }, - "./helpers/mysql": { - "import": "./dist/esm/helpers/mysql.js", - "require": "./dist/cjs/helpers/mysql.js", - "default": "./dist/cjs/helpers/mysql.js" - }, - "./helpers/mssql": { - "import": "./dist/esm/helpers/mssql.js", - "require": "./dist/cjs/helpers/mssql.js", - "default": "./dist/cjs/helpers/mssql.js" - }, - "./helpers/sqlite": { - "import": "./dist/esm/helpers/sqlite.js", - "require": "./dist/cjs/helpers/sqlite.js", - "default": "./dist/cjs/helpers/sqlite.js" - } - }, - "author": "Sami Koskimäki ", - "license": "MIT", - "contributors": [ - "Sami Koskimäki ", - "Igal Klebanov " - ], - "devDependencies": { - "@arethetypeswrong/cli": "^0.18.2", - "@ark/attest": "^0.56.0", - "@types/better-sqlite3": "^7.6.13", - "@types/chai": "^5.2.3", - "@types/chai-as-promised": "^8.0.2", - "@types/mocha": "^10.0.10", - "@types/node": "^25.5.0", - "@types/pg": "^8.18.0", - "@types/pg-cursor": "^2.7.2", - "@types/semver": "^7.7.1", - "@types/sinon": "^21.0.0", - "better-sqlite3": "^12.6.2", - "chai": "^6.2.2", - "chai-as-promised": "^8.0.2", - "esbuild": "^0.27.4", - "jsr": "^0.14.3", - "lodash": "^4.17.23", - "mocha": "^11.7.5", - "mysql2": "^3.19.1", - "pathe": "^2.0.3", - "pg": "^8.20.0", - "pg-cursor": "^2.19.0", - "pkg-types": "^2.3.0", - "playwright": "^1.58.2", - "prettier": "^3.8.1", - "semver": "^7.7.4", - "sinon": "^21.0.2", - "std-env": "^4.0.0", - "tarn": "^3.0.2", - "tedious": "^19.2.1", - "tsd": "^0.33.0", - "typescript": "~5.9.3" - }, - "scripts": { - "clean": "rm -rf dist & rm -rf test/node/dist & rm -rf test/browser/bundle.js & rm -rf helpers", - "bench:ts": "pnpm build && cd ./test/ts-benchmarks && node --experimental-strip-types ./index.ts", - "test": "pnpm build && pnpm test:node:build && pnpm test:node:run && pnpm test:typings && pnpm test:esmimports && pnpm test:exports", - "test:node:build": "tsc -p test/node", - "test:node": "pnpm build && pnpm test:node:build && pnpm test:node:run", - "test:node:run": "mocha --timeout 15000 test/node/dist/**/*.test.js", - "test:browser:build": "rm -rf test/browser/bundle.js && esbuild test/browser/main.ts --bundle --outfile=test/browser/bundle.js", - "test:browser": "pnpm build && pnpm test:browser:build && node test/browser/test.js", - "test:bun": "pnpm build && bun link && cd test/bun && bun install && bun run test", - "test:cloudflare-workers": "pnpm build && pnpm -r test --filter kysely-cloudflare-workers-test", - "test:deno": "deno run --allow-env --allow-read --allow-net --no-lock test/deno/local.test.ts && deno run --allow-env --allow-read --allow-net --no-lock test/deno/cdn.test.ts", - "test:typings": "tsd test/typings", - "test:esmimports": "node scripts/check-esm-imports.js", - "test:esbuild": "esbuild --bundle --platform=node --external:pg-native dist/esm/index.js --outfile=/dev/null", - "test:exports": "attw --pack . && node scripts/check-exports.js", - "test:jsdocs": "deno check --doc-only --no-lock --unstable-sloppy-imports --config=\"deno.check.json\" ./src", - "test:outdatedts": "pnpm build && cd test/outdated-ts && pnpm i && pnpm test", - "lint:deno": "deno lint --config=\"deno.lint.json\" ./src", - "prettier": "prettier --write 'src/**/*.ts' 'test/**/*.ts'", - "build": "pnpm clean && (pnpm build:esm & pnpm build:cjs) && pnpm script:module-fixup && pnpm script:copy-interface-doc", - "build:esm": "tsc -p tsconfig.json && pnpm script:add-deno-type-references", - "build:cjs": "tsc -p tsconfig-cjs.json", - "script:module-fixup": "node scripts/module-fixup.js", - "script:copy-interface-doc": "node scripts/copy-interface-documentation.js", - "script:add-deno-type-references": "node scripts/add-deno-type-references.js", - "script:align-versions": "node --experimental-strip-types scripts/align-versions.mts", - "script:generate-site-examples": "node scripts/generate-site-examples.js", - "script:exclude-test-files-for-backwards-compat": "node --experimental-strip-types scripts/exclude-test-files-for-backwards-compat.mts", - "script:remove-global-augmentations": "node --experimental-strip-types scripts/remove-global-augmentations.mts", - "version": "pnpm script:align-versions && git add ." - } -} \ No newline at end of file diff --git a/node_modules/load-esm/LICENSE.txt b/node_modules/load-esm/LICENSE.txt deleted file mode 100644 index ba0bc94..0000000 --- a/node_modules/load-esm/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright © 2025 Borewit - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/load-esm/README.md b/node_modules/load-esm/README.md deleted file mode 100644 index d73a4fd..0000000 --- a/node_modules/load-esm/README.md +++ /dev/null @@ -1,140 +0,0 @@ -[![Node.js CI](https://github.com/Borewit/load-esm/actions/workflows/nodejs-ci.yml/badge.svg)](https://github.com/Borewit/load-esm/actions/workflows/nodejs-ci.yml) -[![NPM version](https://img.shields.io/npm/v/load-esm.svg)](https://npmjs.org/package/load-esm) -[![npm downloads](http://img.shields.io/npm/dm/load-esm.svg)](https://npmcharts.com/compare/load-esm?start=365) - -# load-esm - -**load-esm** is a tiny utility that lets CommonJS (CJS) TypeScript projects **dynamically import pure ESM packages** at runtime—without hacks like `eval()`. - -It helps avoid errors like: - -* `Error [ERR_REQUIRE_ESM]: require() of ES Module` -* `Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in ...` - ---- - -## Installation - -```bash -npm install load-esm -# or -yarn add load-esm -# or -pnpm add load-esm -``` - -> Works in CJS TypeScript projects. No config changes required. - ---- - -## Quick start - -```ts -// TypeScript (CJS project) -import { loadEsm } from "load-esm"; - -(async () => { - const esmModule = await loadEsm("esm-module"); - // use esmModule... -})(); -``` - -### With typings - -```ts -import { loadEsm } from "load-esm"; - -(async () => { - const esmModule = await loadEsm("esm-module"); - // esmModule is fully typed -})(); -``` - -### Concrete example (pure ESM package) - -```ts -import { loadEsm } from "load-esm"; - -(async () => { - try { - // Import a pure ESM package from a CommonJS TS project - const { fileTypeFromFile } = await loadEsm( - "file-type" - ); - - const type = await fileTypeFromFile("fixture.gif"); - console.log(type); - } catch (error) { - console.error("Error importing module:", error); - } -})(); -``` - -> Note: Because top‑level `await` isn’t available in CommonJS, examples use an async IIFE. - ---- - -## API - -```ts -function loadEsm(name: string): Promise -``` - -**Parameters** - -* `name` — Package name or file path to import. - -**Returns** - -* `Promise` resolving to the imported module namespace. - ---- - -## How it works - -In CJS TypeScript projects (`"module": "commonjs"`), the TS compiler transpiles dynamic `import()` to `require()`, which **breaks** when the target is a pure ESM package. - -`load-esm` executes the `import()` **outside of TypeScript’s transpilation scope**, preserving native dynamic `import()` semantics at runtime. This keeps your code type‑safe while avoiding brittle workarounds (e.g., wrapping `import()` in `eval()`). - -### What about Node.js ≥ 22.12? - -Since Node.js 22.12, `require` can load **some** ESM modules, but there are [documented constraints](https://nodejs.org/api/modules.html#loading-ecmascript-modules-using-require). If your dependencies are compatible with that path, you might not need this utility. `load-esm` remains useful when: - -* You’re on older Node.js versions that support `import()` (see Compatibility) but not the newer `require()` behavior. -* You want a single, consistent pattern that works across environments and avoids edge cases. - -> If Node’s built‑in `require(esm)` works for your packages and version, feel free to use it. - ---- - -## Compatibility - -* **Node.js**: ≥ 13.2.0 (first version with native `import()` support) -* **TypeScript**: Fully typed; works in CJS projects. - ---- - -## Troubleshooting - -* **`ERR_REQUIRE_ESM`**: Ensure you’re using `load-esm(...)` to import the ESM dependency from CJS code. -* **`No "exports" main defined`**: Some packages only expose ESM entry points. Import them via `load-esm`. -* **Type declarations**: Use the generic form `loadEsm("pkg")` for typed access. -* **Top‑level await**: Wrap usage in an async IIFE in CJS. - ---- - -## License - -[MIT](./LICENSE.txt) - ---- - -### Changelog - -See [Releases](https://github.com/Borewit/load-esm/releases). - ---- - -### Acknowledgements - -Inspired by common pain points when mixing CJS projects with modern ESM‑only libraries. diff --git a/node_modules/load-esm/index.d.ts b/node_modules/load-esm/index.d.ts deleted file mode 100644 index c861ff1..0000000 --- a/node_modules/load-esm/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export function loadEsm(name: string): Promise; diff --git a/node_modules/load-esm/index.js b/node_modules/load-esm/index.js deleted file mode 100644 index 71238a0..0000000 --- a/node_modules/load-esm/index.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - loadEsm: (module) => import(module) -}; \ No newline at end of file diff --git a/node_modules/load-esm/package.json b/node_modules/load-esm/package.json deleted file mode 100644 index 7d870b7..0000000 --- a/node_modules/load-esm/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "load-esm", - "version": "1.0.3", - "type": "commonjs", - "main": "index.js", - "types": "index.d.ts", - "scripts": { - "test": "mocha", - "compile-test": "tsc -p test" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "author": { - "name": "Borewit", - "url": "https://github.com/Borewit" - }, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - }, - { - "type": "buymeacoffee", - "url": "https://buymeacoffee.com/borewit" - } - ], - "license": "MIT", - "description": "Utility to dynamically load ESM modules in TypeScript CommonJS projects", - "repository": { - "type": "git", - "url": "git+https://github.com/Borewit/load-esm.git" - }, - "bugs": { - "url": "https://github.com/Borewit/load-esm/issues" - }, - "homepage": "https://github.com/Borewit/load-esm#readme", - "keywords": [ - "load-esm", - "ESM", - "Import ESM", - "CJS", - "CommonJS", - "TypeScript", - "Node.js", - "dynamic import", - "dynamic module loading", - "dynamic load", - "JavaScript modules", - "CJS ESM interoperability", - "import ESM in CommonJS", - "typescript commonjs import esm", - "module interoperability", - "node esm loader", - "mixed module", - "dynamic esm import typescript", - "cjs to esm bridge", - "ERR_REQUIRE_ESM", - "require ESM error", - "ERR_PACKAGE_PATH_NOT_EXPORTED", - "No \"exports\" main defined in", - "exports not defined error" - ], - "engines": { - "node": ">=13.2.0" - }, - "devDependencies": { - "@types/chai": "^5.0.1", - "@types/mocha": "^10.0.10", - "@types/node": "^22.10.2", - "chai": "^4.3.4", - "mocha": "^11.0.1", - "typescript": "^5.7.2" - } -} diff --git a/node_modules/lodash.includes/LICENSE b/node_modules/lodash.includes/LICENSE deleted file mode 100644 index e0c69d5..0000000 --- a/node_modules/lodash.includes/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Copyright jQuery Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/node_modules/lodash.includes/README.md b/node_modules/lodash.includes/README.md deleted file mode 100644 index 26e9377..0000000 --- a/node_modules/lodash.includes/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.includes v4.3.0 - -The [lodash](https://lodash.com/) method `_.includes` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.includes -``` - -In Node.js: -```js -var includes = require('lodash.includes'); -``` - -See the [documentation](https://lodash.com/docs#includes) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.includes) for more details. diff --git a/node_modules/lodash.includes/index.js b/node_modules/lodash.includes/index.js deleted file mode 100644 index e88d533..0000000 --- a/node_modules/lodash.includes/index.js +++ /dev/null @@ -1,745 +0,0 @@ -/** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_SAFE_INTEGER = 9007199254740991, - MAX_INTEGER = 1.7976931348623157e+308, - NAN = 0 / 0; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - stringTag = '[object String]', - symbolTag = '[object Symbol]'; - -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Used to detect unsigned integer values. */ -var reIsUint = /^(?:0|[1-9]\d*)$/; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array ? array.length : 0, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; -} - -/** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; -} - -/** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOf(array, value, fromIndex) { - if (value !== value) { - return baseFindIndex(array, baseIsNaN, fromIndex); - } - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; -} - -/** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ -function baseIsNaN(value) { - return value !== value; -} - -/** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ -function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - return result; -} - -/** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ -function baseValues(object, props) { - return arrayMap(props, function(key) { - return object[key]; - }); -} - -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; -} - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeKeys = overArg(Object.keys, Object), - nativeMax = Math.max; - -/** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ -function arrayLikeKeys(value, inherited) { - // Safari 8.1 makes `arguments.callee` enumerable in strict mode. - // Safari 9 makes `arguments.length` enumerable in strict mode. - var result = (isArray(value) || isArguments(value)) - ? baseTimes(value.length, String) - : []; - - var length = result.length, - skipIndexes = !!length; - - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && - !(skipIndexes && (key == 'length' || isIndex(key, length)))) { - result.push(key); - } - } - return result; -} - -/** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != 'constructor') { - result.push(key); - } - } - return result; -} - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && - (typeof value == 'number' || reIsUint.test(value)) && - (value > -1 && value % 1 == 0 && value < length); -} - -/** - * Checks if `value` is likely a prototype object. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. - */ -function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; -} - -/** - * Checks if `value` is in `collection`. If `collection` is a string, it's - * checked for a substring of `value`, otherwise - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * is used for equality comparisons. If `fromIndex` is negative, it's used as - * the offset from the end of `collection`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. - * @returns {boolean} Returns `true` if `value` is found, else `false`. - * @example - * - * _.includes([1, 2, 3], 1); - * // => true - * - * _.includes([1, 2, 3], 1, 2); - * // => false - * - * _.includes({ 'a': 1, 'b': 2 }, 1); - * // => true - * - * _.includes('abcd', 'bc'); - * // => true - */ -function includes(collection, value, fromIndex, guard) { - collection = isArrayLike(collection) ? collection : values(collection); - fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; - - var length = collection.length; - if (fromIndex < 0) { - fromIndex = nativeMax(length + fromIndex, 0); - } - return isString(collection) - ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) - : (!!length && baseIndexOf(collection, value, fromIndex) > -1); -} - -/** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -function isArguments(value) { - // Safari 8.1 makes `arguments.callee` enumerable in strict mode. - return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && - (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); -} - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -/** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ -function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); -} - -/** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ -function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); -} - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8-9 which returns 'object' for typed array and other constructors. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag); -} - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && objectToString.call(value) == symbolTag); -} - -/** - * Converts `value` to a finite number. - * - * @static - * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. - * @example - * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toFinite('3.2'); - * // => 3.2 - */ -function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - return value === value ? value : 0; -} - -/** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ -function toInteger(value) { - var result = toFinite(value), - remainder = result % 1; - - return result === result ? (remainder ? result - remainder : result) : 0; -} - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ -function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - if (isObject(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ''); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); -} - -/** - * Creates an array of the own enumerable string keyed property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ -function values(object) { - return object ? baseValues(object, keys(object)) : []; -} - -module.exports = includes; diff --git a/node_modules/lodash.includes/package.json b/node_modules/lodash.includes/package.json deleted file mode 100644 index a02e645..0000000 --- a/node_modules/lodash.includes/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "lodash.includes", - "version": "4.3.0", - "description": "The lodash method `_.includes` exported as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": "lodash-modularized, includes", - "author": "John-David Dalton (http://allyoucanleet.com/)", - "contributors": [ - "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", - "Mathias Bynens (https://mathiasbynens.be/)" - ], - "repository": "lodash/lodash", - "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } -} diff --git a/node_modules/lodash.isboolean/LICENSE b/node_modules/lodash.isboolean/LICENSE deleted file mode 100644 index b054ca5..0000000 --- a/node_modules/lodash.isboolean/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/lodash.isboolean/README.md b/node_modules/lodash.isboolean/README.md deleted file mode 100644 index b3c476b..0000000 --- a/node_modules/lodash.isboolean/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.isboolean v3.0.3 - -The [lodash](https://lodash.com/) method `_.isBoolean` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.isboolean -``` - -In Node.js: -```js -var isBoolean = require('lodash.isboolean'); -``` - -See the [documentation](https://lodash.com/docs#isBoolean) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.isboolean) for more details. diff --git a/node_modules/lodash.isboolean/index.js b/node_modules/lodash.isboolean/index.js deleted file mode 100644 index 23bbabd..0000000 --- a/node_modules/lodash.isboolean/index.js +++ /dev/null @@ -1,70 +0,0 @@ -/** - * lodash 3.0.3 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** - * Checks if `value` is classified as a boolean primitive or object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isBoolean(false); - * // => true - * - * _.isBoolean(null); - * // => false - */ -function isBoolean(value) { - return value === true || value === false || - (isObjectLike(value) && objectToString.call(value) == boolTag); -} - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -module.exports = isBoolean; diff --git a/node_modules/lodash.isboolean/package.json b/node_modules/lodash.isboolean/package.json deleted file mode 100644 index 01d6e8b..0000000 --- a/node_modules/lodash.isboolean/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "lodash.isboolean", - "version": "3.0.3", - "description": "The lodash method `_.isBoolean` exported as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": "lodash-modularized, isboolean", - "author": "John-David Dalton (http://allyoucanleet.com/)", - "contributors": [ - "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", - "Mathias Bynens (https://mathiasbynens.be/)" - ], - "repository": "lodash/lodash", - "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } -} diff --git a/node_modules/lodash.isinteger/LICENSE b/node_modules/lodash.isinteger/LICENSE deleted file mode 100644 index e0c69d5..0000000 --- a/node_modules/lodash.isinteger/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Copyright jQuery Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/node_modules/lodash.isinteger/README.md b/node_modules/lodash.isinteger/README.md deleted file mode 100644 index 3a78567..0000000 --- a/node_modules/lodash.isinteger/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.isinteger v4.0.4 - -The [lodash](https://lodash.com/) method `_.isInteger` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.isinteger -``` - -In Node.js: -```js -var isInteger = require('lodash.isinteger'); -``` - -See the [documentation](https://lodash.com/docs#isInteger) or [package source](https://github.com/lodash/lodash/blob/4.0.4-npm-packages/lodash.isinteger) for more details. diff --git a/node_modules/lodash.isinteger/index.js b/node_modules/lodash.isinteger/index.js deleted file mode 100644 index 3bf06f0..0000000 --- a/node_modules/lodash.isinteger/index.js +++ /dev/null @@ -1,265 +0,0 @@ -/** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_INTEGER = 1.7976931348623157e+308, - NAN = 0 / 0; - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** - * Checks if `value` is an integer. - * - * **Note:** This method is based on - * [`Number.isInteger`](https://mdn.io/Number/isInteger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an integer, else `false`. - * @example - * - * _.isInteger(3); - * // => true - * - * _.isInteger(Number.MIN_VALUE); - * // => false - * - * _.isInteger(Infinity); - * // => false - * - * _.isInteger('3'); - * // => false - */ -function isInteger(value) { - return typeof value == 'number' && value == toInteger(value); -} - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && objectToString.call(value) == symbolTag); -} - -/** - * Converts `value` to a finite number. - * - * @static - * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. - * @example - * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toFinite('3.2'); - * // => 3.2 - */ -function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - return value === value ? value : 0; -} - -/** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ -function toInteger(value) { - var result = toFinite(value), - remainder = result % 1; - - return result === result ? (remainder ? result - remainder : result) : 0; -} - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ -function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - if (isObject(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ''); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -module.exports = isInteger; diff --git a/node_modules/lodash.isinteger/package.json b/node_modules/lodash.isinteger/package.json deleted file mode 100644 index 92db256..0000000 --- a/node_modules/lodash.isinteger/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "lodash.isinteger", - "version": "4.0.4", - "description": "The lodash method `_.isInteger` exported as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": "lodash-modularized, isinteger", - "author": "John-David Dalton (http://allyoucanleet.com/)", - "contributors": [ - "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", - "Mathias Bynens (https://mathiasbynens.be/)" - ], - "repository": "lodash/lodash", - "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } -} diff --git a/node_modules/lodash.isnumber/LICENSE b/node_modules/lodash.isnumber/LICENSE deleted file mode 100644 index b054ca5..0000000 --- a/node_modules/lodash.isnumber/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/lodash.isnumber/README.md b/node_modules/lodash.isnumber/README.md deleted file mode 100644 index a1d434d..0000000 --- a/node_modules/lodash.isnumber/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.isnumber v3.0.3 - -The [lodash](https://lodash.com/) method `_.isNumber` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.isnumber -``` - -In Node.js: -```js -var isNumber = require('lodash.isnumber'); -``` - -See the [documentation](https://lodash.com/docs#isNumber) or [package source](https://github.com/lodash/lodash/blob/3.0.3-npm-packages/lodash.isnumber) for more details. diff --git a/node_modules/lodash.isnumber/index.js b/node_modules/lodash.isnumber/index.js deleted file mode 100644 index 35a8573..0000000 --- a/node_modules/lodash.isnumber/index.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * lodash 3.0.3 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** `Object#toString` result references. */ -var numberTag = '[object Number]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is classified as a `Number` primitive or object. - * - * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified - * as numbers, use the `_.isFinite` method. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isNumber(3); - * // => true - * - * _.isNumber(Number.MIN_VALUE); - * // => true - * - * _.isNumber(Infinity); - * // => true - * - * _.isNumber('3'); - * // => false - */ -function isNumber(value) { - return typeof value == 'number' || - (isObjectLike(value) && objectToString.call(value) == numberTag); -} - -module.exports = isNumber; diff --git a/node_modules/lodash.isnumber/package.json b/node_modules/lodash.isnumber/package.json deleted file mode 100644 index 4c33c2a..0000000 --- a/node_modules/lodash.isnumber/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "lodash.isnumber", - "version": "3.0.3", - "description": "The lodash method `_.isNumber` exported as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": "lodash-modularized, isnumber", - "author": "John-David Dalton (http://allyoucanleet.com/)", - "contributors": [ - "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", - "Mathias Bynens (https://mathiasbynens.be/)" - ], - "repository": "lodash/lodash", - "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } -} diff --git a/node_modules/lodash.isplainobject/LICENSE b/node_modules/lodash.isplainobject/LICENSE deleted file mode 100644 index e0c69d5..0000000 --- a/node_modules/lodash.isplainobject/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Copyright jQuery Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/node_modules/lodash.isplainobject/README.md b/node_modules/lodash.isplainobject/README.md deleted file mode 100644 index aeefd74..0000000 --- a/node_modules/lodash.isplainobject/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.isplainobject v4.0.6 - -The [lodash](https://lodash.com/) method `_.isPlainObject` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.isplainobject -``` - -In Node.js: -```js -var isPlainObject = require('lodash.isplainobject'); -``` - -See the [documentation](https://lodash.com/docs#isPlainObject) or [package source](https://github.com/lodash/lodash/blob/4.0.6-npm-packages/lodash.isplainobject) for more details. diff --git a/node_modules/lodash.isplainobject/index.js b/node_modules/lodash.isplainobject/index.js deleted file mode 100644 index 0f820ee..0000000 --- a/node_modules/lodash.isplainobject/index.js +++ /dev/null @@ -1,139 +0,0 @@ -/** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** `Object#toString` result references. */ -var objectTag = '[object Object]'; - -/** - * Checks if `value` is a host object in IE < 9. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. - */ -function isHostObject(value) { - // Many host objects are `Object` objects that can coerce to strings - // despite having improperly defined `toString` methods. - var result = false; - if (value != null && typeof value.toString != 'function') { - try { - result = !!(value + ''); - } catch (e) {} - } - return result; -} - -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; -} - -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Used to infer the `Object` constructor. */ -var objectCtorString = funcToString.call(Object); - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** Built-in value references. */ -var getPrototype = overArg(Object.getPrototypeOf, Object); - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - if (!isObjectLike(value) || - objectToString.call(value) != objectTag || isHostObject(value)) { - return false; - } - var proto = getPrototype(value); - if (proto === null) { - return true; - } - var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return (typeof Ctor == 'function' && - Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString); -} - -module.exports = isPlainObject; diff --git a/node_modules/lodash.isplainobject/package.json b/node_modules/lodash.isplainobject/package.json deleted file mode 100644 index 86f6a07..0000000 --- a/node_modules/lodash.isplainobject/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "lodash.isplainobject", - "version": "4.0.6", - "description": "The lodash method `_.isPlainObject` exported as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": "lodash-modularized, isplainobject", - "author": "John-David Dalton (http://allyoucanleet.com/)", - "contributors": [ - "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", - "Mathias Bynens (https://mathiasbynens.be/)" - ], - "repository": "lodash/lodash", - "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } -} diff --git a/node_modules/lodash.isstring/LICENSE b/node_modules/lodash.isstring/LICENSE deleted file mode 100644 index b054ca5..0000000 --- a/node_modules/lodash.isstring/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 2012-2016 The Dojo Foundation -Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/lodash.isstring/README.md b/node_modules/lodash.isstring/README.md deleted file mode 100644 index f184029..0000000 --- a/node_modules/lodash.isstring/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.isstring v4.0.1 - -The [lodash](https://lodash.com/) method `_.isString` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.isstring -``` - -In Node.js: -```js -var isString = require('lodash.isstring'); -``` - -See the [documentation](https://lodash.com/docs#isString) or [package source](https://github.com/lodash/lodash/blob/4.0.1-npm-packages/lodash.isstring) for more details. diff --git a/node_modules/lodash.isstring/index.js b/node_modules/lodash.isstring/index.js deleted file mode 100644 index 408225c..0000000 --- a/node_modules/lodash.isstring/index.js +++ /dev/null @@ -1,95 +0,0 @@ -/** - * lodash 4.0.1 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** `Object#toString` result references. */ -var stringTag = '[object String]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @type Function - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag); -} - -module.exports = isString; diff --git a/node_modules/lodash.isstring/package.json b/node_modules/lodash.isstring/package.json deleted file mode 100644 index 1331535..0000000 --- a/node_modules/lodash.isstring/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "lodash.isstring", - "version": "4.0.1", - "description": "The lodash method `_.isString` exported as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": "lodash-modularized, isstring", - "author": "John-David Dalton (http://allyoucanleet.com/)", - "contributors": [ - "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", - "Mathias Bynens (https://mathiasbynens.be/)" - ], - "repository": "lodash/lodash", - "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } -} diff --git a/node_modules/lodash.once/LICENSE b/node_modules/lodash.once/LICENSE deleted file mode 100644 index e0c69d5..0000000 --- a/node_modules/lodash.once/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Copyright jQuery Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/node_modules/lodash.once/README.md b/node_modules/lodash.once/README.md deleted file mode 100644 index c4a2f16..0000000 --- a/node_modules/lodash.once/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.once v4.1.1 - -The [lodash](https://lodash.com/) method `_.once` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.once -``` - -In Node.js: -```js -var once = require('lodash.once'); -``` - -See the [documentation](https://lodash.com/docs#once) or [package source](https://github.com/lodash/lodash/blob/4.1.1-npm-packages/lodash.once) for more details. diff --git a/node_modules/lodash.once/index.js b/node_modules/lodash.once/index.js deleted file mode 100644 index 414ceb3..0000000 --- a/node_modules/lodash.once/index.js +++ /dev/null @@ -1,294 +0,0 @@ -/** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_INTEGER = 1.7976931348623157e+308, - NAN = 0 / 0; - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** - * Creates a function that invokes `func`, with the `this` binding and arguments - * of the created function, while it's called less than `n` times. Subsequent - * calls to the created function return the result of the last `func` invocation. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {number} n The number of calls at which `func` is no longer invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * jQuery(element).on('click', _.before(5, addContactToList)); - * // => Allows adding up to 4 contacts to the list. - */ -function before(n, func) { - var result; - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - n = toInteger(n); - return function() { - if (--n > 0) { - result = func.apply(this, arguments); - } - if (n <= 1) { - func = undefined; - } - return result; - }; -} - -/** - * Creates a function that is restricted to invoking `func` once. Repeat calls - * to the function return the value of the first invocation. The `func` is - * invoked with the `this` binding and arguments of the created function. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var initialize = _.once(createApplication); - * initialize(); - * initialize(); - * // => `createApplication` is invoked once - */ -function once(func) { - return before(2, func); -} - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && objectToString.call(value) == symbolTag); -} - -/** - * Converts `value` to a finite number. - * - * @static - * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. - * @example - * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toFinite('3.2'); - * // => 3.2 - */ -function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - return value === value ? value : 0; -} - -/** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ -function toInteger(value) { - var result = toFinite(value), - remainder = result % 1; - - return result === result ? (remainder ? result - remainder : result) : 0; -} - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ -function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - if (isObject(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ''); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -module.exports = once; diff --git a/node_modules/lodash.once/package.json b/node_modules/lodash.once/package.json deleted file mode 100644 index fae782c..0000000 --- a/node_modules/lodash.once/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "lodash.once", - "version": "4.1.1", - "description": "The lodash method `_.once` exported as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "license": "MIT", - "keywords": "lodash-modularized, once", - "author": "John-David Dalton (http://allyoucanleet.com/)", - "contributors": [ - "John-David Dalton (http://allyoucanleet.com/)", - "Blaine Bublitz (https://github.com/phated)", - "Mathias Bynens (https://mathiasbynens.be/)" - ], - "repository": "lodash/lodash", - "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } -} diff --git a/node_modules/make-error/LICENSE b/node_modules/make-error/LICENSE deleted file mode 100644 index 9dcf797..0000000 --- a/node_modules/make-error/LICENSE +++ /dev/null @@ -1,5 +0,0 @@ -Copyright 2014 Julien Fontanet - -Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/make-error/README.md b/node_modules/make-error/README.md deleted file mode 100644 index 5c089a2..0000000 --- a/node_modules/make-error/README.md +++ /dev/null @@ -1,112 +0,0 @@ -# make-error - -[![Package Version](https://badgen.net/npm/v/make-error)](https://npmjs.org/package/make-error) [![Build Status](https://travis-ci.org/JsCommunity/make-error.png?branch=master)](https://travis-ci.org/JsCommunity/make-error) [![PackagePhobia](https://badgen.net/packagephobia/install/make-error)](https://packagephobia.now.sh/result?p=make-error) [![Latest Commit](https://badgen.net/github/last-commit/JsCommunity/make-error)](https://github.com/JsCommunity/make-error/commits/master) - -> Make your own error types! - -## Features - -- Compatible Node & browsers -- `instanceof` support -- `error.name` & `error.stack` support -- compatible with [CSP](https://en.wikipedia.org/wiki/Content_Security_Policy) (i.e. no `eval()`) - -## Installation - -### Node & [Browserify](http://browserify.org/)/[Webpack](https://webpack.js.org/) - -Installation of the [npm package](https://npmjs.org/package/make-error): - -``` -> npm install --save make-error -``` - -Then require the package: - -```javascript -var makeError = require("make-error"); -``` - -### Browser - -You can directly use the build provided at [unpkg.com](https://unpkg.com): - -```html - -``` - -## Usage - -### Basic named error - -```javascript -var CustomError = makeError("CustomError"); - -// Parameters are forwarded to the super class (here Error). -throw new CustomError("a message"); -``` - -### Advanced error class - -```javascript -function CustomError(customValue) { - CustomError.super.call(this, "custom error message"); - - this.customValue = customValue; -} -makeError(CustomError); - -// Feel free to extend the prototype. -CustomError.prototype.myMethod = function CustomError$myMethod() { - console.log("CustomError.myMethod (%s, %s)", this.code, this.message); -}; - -//----- - -try { - throw new CustomError(42); -} catch (error) { - error.myMethod(); -} -``` - -### Specialized error - -```javascript -var SpecializedError = makeError("SpecializedError", CustomError); - -throw new SpecializedError(42); -``` - -### Inheritance - -> Best for ES2015+. - -```javascript -import { BaseError } from "make-error"; - -class CustomError extends BaseError { - constructor() { - super("custom error message"); - } -} -``` - -## Related - -- [make-error-cause](https://www.npmjs.com/package/make-error-cause): Make your own error types, with a cause! - -## Contributions - -Contributions are _very_ welcomed, either on the documentation or on -the code. - -You may: - -- report any [issue](https://github.com/JsCommunity/make-error/issues) - you've encountered; -- fork and create a pull request. - -## License - -ISC © [Julien Fontanet](http://julien.isonoe.net) diff --git a/node_modules/make-error/dist/make-error.js b/node_modules/make-error/dist/make-error.js deleted file mode 100644 index 32444c6..0000000 --- a/node_modules/make-error/dist/make-error.js +++ /dev/null @@ -1 +0,0 @@ -!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).makeError=f()}}(function(){return function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){return o(e[i][1][r]||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i; - -/** - * Set the constructor prototype to `BaseError`. - */ -declare function makeError(super_: { - new (...args: any[]): T; -}): makeError.Constructor; - -/** - * Create a specialized error instance. - */ -declare function makeError( - name: string | Function, - super_: K -): K & makeError.SpecializedConstructor; - -declare namespace makeError { - /** - * Use with ES2015+ inheritance. - */ - export class BaseError extends Error { - message: string; - name: string; - stack: string; - - constructor(message?: string); - } - - export interface Constructor { - new (message?: string): T; - super_: any; - prototype: T; - } - - export interface SpecializedConstructor { - super_: any; - prototype: T; - } -} - -export = makeError; diff --git a/node_modules/make-error/index.js b/node_modules/make-error/index.js deleted file mode 100644 index fab6040..0000000 --- a/node_modules/make-error/index.js +++ /dev/null @@ -1,151 +0,0 @@ -// ISC @ Julien Fontanet - -"use strict"; - -// =================================================================== - -var construct = typeof Reflect !== "undefined" ? Reflect.construct : undefined; -var defineProperty = Object.defineProperty; - -// ------------------------------------------------------------------- - -var captureStackTrace = Error.captureStackTrace; -if (captureStackTrace === undefined) { - captureStackTrace = function captureStackTrace(error) { - var container = new Error(); - - defineProperty(error, "stack", { - configurable: true, - get: function getStack() { - var stack = container.stack; - - // Replace property with value for faster future accesses. - defineProperty(this, "stack", { - configurable: true, - value: stack, - writable: true, - }); - - return stack; - }, - set: function setStack(stack) { - defineProperty(error, "stack", { - configurable: true, - value: stack, - writable: true, - }); - }, - }); - }; -} - -// ------------------------------------------------------------------- - -function BaseError(message) { - if (message !== undefined) { - defineProperty(this, "message", { - configurable: true, - value: message, - writable: true, - }); - } - - var cname = this.constructor.name; - if (cname !== undefined && cname !== this.name) { - defineProperty(this, "name", { - configurable: true, - value: cname, - writable: true, - }); - } - - captureStackTrace(this, this.constructor); -} - -BaseError.prototype = Object.create(Error.prototype, { - // See: https://github.com/JsCommunity/make-error/issues/4 - constructor: { - configurable: true, - value: BaseError, - writable: true, - }, -}); - -// ------------------------------------------------------------------- - -// Sets the name of a function if possible (depends of the JS engine). -var setFunctionName = (function() { - function setFunctionName(fn, name) { - return defineProperty(fn, "name", { - configurable: true, - value: name, - }); - } - try { - var f = function() {}; - setFunctionName(f, "foo"); - if (f.name === "foo") { - return setFunctionName; - } - } catch (_) {} -})(); - -// ------------------------------------------------------------------- - -function makeError(constructor, super_) { - if (super_ == null || super_ === Error) { - super_ = BaseError; - } else if (typeof super_ !== "function") { - throw new TypeError("super_ should be a function"); - } - - var name; - if (typeof constructor === "string") { - name = constructor; - constructor = - construct !== undefined - ? function() { - return construct(super_, arguments, this.constructor); - } - : function() { - super_.apply(this, arguments); - }; - - // If the name can be set, do it once and for all. - if (setFunctionName !== undefined) { - setFunctionName(constructor, name); - name = undefined; - } - } else if (typeof constructor !== "function") { - throw new TypeError("constructor should be either a string or a function"); - } - - // Also register the super constructor also as `constructor.super_` just - // like Node's `util.inherits()`. - // - // eslint-disable-next-line dot-notation - constructor.super_ = constructor["super"] = super_; - - var properties = { - constructor: { - configurable: true, - value: constructor, - writable: true, - }, - }; - - // If the name could not be set on the constructor, set it on the - // prototype. - if (name !== undefined) { - properties.name = { - configurable: true, - value: name, - writable: true, - }; - } - constructor.prototype = Object.create(super_.prototype, properties); - - return constructor; -} -exports = module.exports = makeError; -exports.BaseError = BaseError; diff --git a/node_modules/make-error/package.json b/node_modules/make-error/package.json deleted file mode 100644 index 2af27e1..0000000 --- a/node_modules/make-error/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "make-error", - "version": "1.3.6", - "main": "index.js", - "license": "ISC", - "description": "Make your own error types!", - "keywords": [ - "create", - "custom", - "derive", - "error", - "errors", - "extend", - "extending", - "extension", - "factory", - "inherit", - "make", - "subclass" - ], - "homepage": "https://github.com/JsCommunity/make-error", - "bugs": "https://github.com/JsCommunity/make-error/issues", - "author": "Julien Fontanet ", - "repository": { - "type": "git", - "url": "git://github.com/JsCommunity/make-error.git" - }, - "devDependencies": { - "browserify": "^16.2.3", - "eslint": "^6.5.1", - "eslint-config-prettier": "^6.4.0", - "eslint-config-standard": "^14.1.0", - "eslint-plugin-import": "^2.14.0", - "eslint-plugin-node": "^10.0.0", - "eslint-plugin-promise": "^4.0.1", - "eslint-plugin-standard": "^4.0.0", - "husky": "^3.0.9", - "jest": "^24", - "prettier": "^1.14.3", - "uglify-js": "^3.3.2" - }, - "jest": { - "testEnvironment": "node" - }, - "scripts": { - "dev-test": "jest --watch", - "format": "prettier --write '**'", - "prepublishOnly": "mkdir -p dist && browserify -s makeError index.js | uglifyjs -c > dist/make-error.js", - "pretest": "eslint --ignore-path .gitignore .", - "test": "jest" - }, - "files": [ - "dist/", - "index.js", - "index.d.ts" - ], - "husky": { - "hooks": { - "commit-msg": "npm run test" - } - } -} diff --git a/node_modules/math-intrinsics/.eslintrc b/node_modules/math-intrinsics/.eslintrc deleted file mode 100644 index d90a1bc..0000000 --- a/node_modules/math-intrinsics/.eslintrc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "eqeqeq": ["error", "allow-null"], - "id-length": "off", - "new-cap": ["error", { - "capIsNewExceptions": [ - "RequireObjectCoercible", - "ToObject", - ], - }], - }, -} diff --git a/node_modules/math-intrinsics/.github/FUNDING.yml b/node_modules/math-intrinsics/.github/FUNDING.yml deleted file mode 100644 index 868f4ff..0000000 --- a/node_modules/math-intrinsics/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/math-intrinsics -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/math-intrinsics/CHANGELOG.md b/node_modules/math-intrinsics/CHANGELOG.md deleted file mode 100644 index 9cf48f5..0000000 --- a/node_modules/math-intrinsics/CHANGELOG.md +++ /dev/null @@ -1,24 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.1.0](https://github.com/es-shims/math-intrinsics/compare/v1.0.0...v1.1.0) - 2024-12-18 - -### Commits - -- [New] add `round` [`7cfb044`](https://github.com/es-shims/math-intrinsics/commit/7cfb04460c0fbdf1ca101eecbac3f59d11994130) -- [Tests] add attw [`e96be8f`](https://github.com/es-shims/math-intrinsics/commit/e96be8fbf58449eafe976446a0470e6ea561ad8d) -- [Dev Deps] update `@types/tape` [`30d0023`](https://github.com/es-shims/math-intrinsics/commit/30d00234ce8a3fa0094a61cd55d6686eb91e36ec) - -## v1.0.0 - 2024-12-11 - -### Commits - -- Initial implementation, tests, readme, types [`b898caa`](https://github.com/es-shims/math-intrinsics/commit/b898caae94e9994a94a42b8740f7bbcfd0a868fe) -- Initial commit [`02745b0`](https://github.com/es-shims/math-intrinsics/commit/02745b03a62255af8a332771987b55d127538d9c) -- [New] add `constants/maxArrayLength`, `mod` [`b978178`](https://github.com/es-shims/math-intrinsics/commit/b978178a57685bd23ed1c7efe2137f3784f5fcc5) -- npm init [`a39fc57`](https://github.com/es-shims/math-intrinsics/commit/a39fc57e5639a645d0bd52a0dc56202480223be2) -- Only apps should have lockfiles [`9451580`](https://github.com/es-shims/math-intrinsics/commit/94515800fb34db4f3cc7e99290042d45609ac7bd) diff --git a/node_modules/math-intrinsics/LICENSE b/node_modules/math-intrinsics/LICENSE deleted file mode 100644 index 34995e7..0000000 --- a/node_modules/math-intrinsics/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 ECMAScript Shims - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/math-intrinsics/README.md b/node_modules/math-intrinsics/README.md deleted file mode 100644 index 4a66dcf..0000000 --- a/node_modules/math-intrinsics/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# math-intrinsics [![Version Badge][npm-version-svg]][package-url] - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -ES Math-related intrinsics and helpers, robustly cached. - - - `abs` - - `floor` - - `isFinite` - - `isInteger` - - `isNaN` - - `isNegativeZero` - - `max` - - `min` - - `mod` - - `pow` - - `round` - - `sign` - - `constants/maxArrayLength` - - `constants/maxSafeInteger` - - `constants/maxValue` - - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -## Security - -Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. - -[package-url]: https://npmjs.org/package/math-intrinsics -[npm-version-svg]: https://versionbadg.es/es-shims/math-intrinsics.svg -[deps-svg]: https://david-dm.org/es-shims/math-intrinsics.svg -[deps-url]: https://david-dm.org/es-shims/math-intrinsics -[dev-deps-svg]: https://david-dm.org/es-shims/math-intrinsics/dev-status.svg -[dev-deps-url]: https://david-dm.org/es-shims/math-intrinsics#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/math-intrinsics.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/math-intrinsics.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/es-object.svg -[downloads-url]: https://npm-stat.com/charts.html?package=math-intrinsics -[codecov-image]: https://codecov.io/gh/es-shims/math-intrinsics/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/es-shims/math-intrinsics/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/math-intrinsics -[actions-url]: https://github.com/es-shims/math-intrinsics/actions diff --git a/node_modules/math-intrinsics/abs.d.ts b/node_modules/math-intrinsics/abs.d.ts deleted file mode 100644 index 14ad9c6..0000000 --- a/node_modules/math-intrinsics/abs.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = Math.abs; \ No newline at end of file diff --git a/node_modules/math-intrinsics/abs.js b/node_modules/math-intrinsics/abs.js deleted file mode 100644 index a751424..0000000 --- a/node_modules/math-intrinsics/abs.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./abs')} */ -module.exports = Math.abs; diff --git a/node_modules/math-intrinsics/constants/maxArrayLength.d.ts b/node_modules/math-intrinsics/constants/maxArrayLength.d.ts deleted file mode 100644 index b92d46b..0000000 --- a/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const MAX_ARRAY_LENGTH: 4294967295; - -export = MAX_ARRAY_LENGTH; \ No newline at end of file diff --git a/node_modules/math-intrinsics/constants/maxArrayLength.js b/node_modules/math-intrinsics/constants/maxArrayLength.js deleted file mode 100644 index cfc6aff..0000000 --- a/node_modules/math-intrinsics/constants/maxArrayLength.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./maxArrayLength')} */ -module.exports = 4294967295; // Math.pow(2, 32) - 1; diff --git a/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts b/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts deleted file mode 100644 index fee3f62..0000000 --- a/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const MAX_SAFE_INTEGER: 9007199254740991; - -export = MAX_SAFE_INTEGER; \ No newline at end of file diff --git a/node_modules/math-intrinsics/constants/maxSafeInteger.js b/node_modules/math-intrinsics/constants/maxSafeInteger.js deleted file mode 100644 index b568ad3..0000000 --- a/node_modules/math-intrinsics/constants/maxSafeInteger.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -/** @type {import('./maxSafeInteger')} */ -// eslint-disable-next-line no-extra-parens -module.exports = /** @type {import('./maxSafeInteger')} */ (Number.MAX_SAFE_INTEGER) || 9007199254740991; // Math.pow(2, 53) - 1; diff --git a/node_modules/math-intrinsics/constants/maxValue.d.ts b/node_modules/math-intrinsics/constants/maxValue.d.ts deleted file mode 100644 index 292cb82..0000000 --- a/node_modules/math-intrinsics/constants/maxValue.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare const MAX_VALUE: 1.7976931348623157e+308; - -export = MAX_VALUE; diff --git a/node_modules/math-intrinsics/constants/maxValue.js b/node_modules/math-intrinsics/constants/maxValue.js deleted file mode 100644 index a2202dc..0000000 --- a/node_modules/math-intrinsics/constants/maxValue.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -/** @type {import('./maxValue')} */ -// eslint-disable-next-line no-extra-parens -module.exports = /** @type {import('./maxValue')} */ (Number.MAX_VALUE) || 1.7976931348623157e+308; diff --git a/node_modules/math-intrinsics/floor.d.ts b/node_modules/math-intrinsics/floor.d.ts deleted file mode 100644 index 9265236..0000000 --- a/node_modules/math-intrinsics/floor.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = Math.floor; \ No newline at end of file diff --git a/node_modules/math-intrinsics/floor.js b/node_modules/math-intrinsics/floor.js deleted file mode 100644 index ab0e5d7..0000000 --- a/node_modules/math-intrinsics/floor.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./floor')} */ -module.exports = Math.floor; diff --git a/node_modules/math-intrinsics/isFinite.d.ts b/node_modules/math-intrinsics/isFinite.d.ts deleted file mode 100644 index 6daae33..0000000 --- a/node_modules/math-intrinsics/isFinite.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function isFinite(x: unknown): x is number | bigint; - -export = isFinite; \ No newline at end of file diff --git a/node_modules/math-intrinsics/isFinite.js b/node_modules/math-intrinsics/isFinite.js deleted file mode 100644 index b201a5a..0000000 --- a/node_modules/math-intrinsics/isFinite.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -var $isNaN = require('./isNaN'); - -/** @type {import('./isFinite')} */ -module.exports = function isFinite(x) { - return (typeof x === 'number' || typeof x === 'bigint') - && !$isNaN(x) - && x !== Infinity - && x !== -Infinity; -}; - diff --git a/node_modules/math-intrinsics/isInteger.d.ts b/node_modules/math-intrinsics/isInteger.d.ts deleted file mode 100644 index 13935a8..0000000 --- a/node_modules/math-intrinsics/isInteger.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function isInteger(argument: unknown): argument is number; - -export = isInteger; \ No newline at end of file diff --git a/node_modules/math-intrinsics/isInteger.js b/node_modules/math-intrinsics/isInteger.js deleted file mode 100644 index 4b1b9a5..0000000 --- a/node_modules/math-intrinsics/isInteger.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -var $abs = require('./abs'); -var $floor = require('./floor'); - -var $isNaN = require('./isNaN'); -var $isFinite = require('./isFinite'); - -/** @type {import('./isInteger')} */ -module.exports = function isInteger(argument) { - if (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) { - return false; - } - var absValue = $abs(argument); - return $floor(absValue) === absValue; -}; diff --git a/node_modules/math-intrinsics/isNaN.d.ts b/node_modules/math-intrinsics/isNaN.d.ts deleted file mode 100644 index c1d4c55..0000000 --- a/node_modules/math-intrinsics/isNaN.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = Number.isNaN; \ No newline at end of file diff --git a/node_modules/math-intrinsics/isNaN.js b/node_modules/math-intrinsics/isNaN.js deleted file mode 100644 index e36475c..0000000 --- a/node_modules/math-intrinsics/isNaN.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -/** @type {import('./isNaN')} */ -module.exports = Number.isNaN || function isNaN(a) { - return a !== a; -}; diff --git a/node_modules/math-intrinsics/isNegativeZero.d.ts b/node_modules/math-intrinsics/isNegativeZero.d.ts deleted file mode 100644 index 7ad8819..0000000 --- a/node_modules/math-intrinsics/isNegativeZero.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function isNegativeZero(x: unknown): boolean; - -export = isNegativeZero; \ No newline at end of file diff --git a/node_modules/math-intrinsics/isNegativeZero.js b/node_modules/math-intrinsics/isNegativeZero.js deleted file mode 100644 index b69adcc..0000000 --- a/node_modules/math-intrinsics/isNegativeZero.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -/** @type {import('./isNegativeZero')} */ -module.exports = function isNegativeZero(x) { - return x === 0 && 1 / x === 1 / -0; -}; diff --git a/node_modules/math-intrinsics/max.d.ts b/node_modules/math-intrinsics/max.d.ts deleted file mode 100644 index ad6f43e..0000000 --- a/node_modules/math-intrinsics/max.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = Math.max; \ No newline at end of file diff --git a/node_modules/math-intrinsics/max.js b/node_modules/math-intrinsics/max.js deleted file mode 100644 index edb55df..0000000 --- a/node_modules/math-intrinsics/max.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./max')} */ -module.exports = Math.max; diff --git a/node_modules/math-intrinsics/min.d.ts b/node_modules/math-intrinsics/min.d.ts deleted file mode 100644 index fd90f2d..0000000 --- a/node_modules/math-intrinsics/min.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = Math.min; \ No newline at end of file diff --git a/node_modules/math-intrinsics/min.js b/node_modules/math-intrinsics/min.js deleted file mode 100644 index 5a4a7c7..0000000 --- a/node_modules/math-intrinsics/min.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./min')} */ -module.exports = Math.min; diff --git a/node_modules/math-intrinsics/mod.d.ts b/node_modules/math-intrinsics/mod.d.ts deleted file mode 100644 index 549dbd4..0000000 --- a/node_modules/math-intrinsics/mod.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function mod(number: number, modulo: number): number; - -export = mod; \ No newline at end of file diff --git a/node_modules/math-intrinsics/mod.js b/node_modules/math-intrinsics/mod.js deleted file mode 100644 index 4a98362..0000000 --- a/node_modules/math-intrinsics/mod.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict'; - -var $floor = require('./floor'); - -/** @type {import('./mod')} */ -module.exports = function mod(number, modulo) { - var remain = number % modulo; - return $floor(remain >= 0 ? remain : remain + modulo); -}; diff --git a/node_modules/math-intrinsics/package.json b/node_modules/math-intrinsics/package.json deleted file mode 100644 index 0676273..0000000 --- a/node_modules/math-intrinsics/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "name": "math-intrinsics", - "version": "1.1.0", - "description": "ES Math-related intrinsics and helpers, robustly cached.", - "main": false, - "exports": { - "./abs": "./abs.js", - "./floor": "./floor.js", - "./isFinite": "./isFinite.js", - "./isInteger": "./isInteger.js", - "./isNaN": "./isNaN.js", - "./isNegativeZero": "./isNegativeZero.js", - "./max": "./max.js", - "./min": "./min.js", - "./mod": "./mod.js", - "./pow": "./pow.js", - "./sign": "./sign.js", - "./round": "./round.js", - "./constants/maxArrayLength": "./constants/maxArrayLength.js", - "./constants/maxSafeInteger": "./constants/maxSafeInteger.js", - "./constants/maxValue": "./constants/maxValue.js", - "./package.json": "./package.json" - }, - "sideEffects": false, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "pretest": "npm run lint", - "test": "npm run tests-only", - "tests-only": "nyc tape 'test/**/*.js'", - "posttest": "npx npm@'>= 10.2' audit --production", - "prelint": "evalmd README.md && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)", - "lint": "eslint --ext=js,mjs .", - "postlint": "tsc && attw -P", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/es-shims/math-intrinsics.git" - }, - "author": "Jordan Harband ", - "license": "MIT", - "bugs": { - "url": "https://github.com/es-shims/math-intrinsics/issues" - }, - "homepage": "https://github.com/es-shims/math-intrinsics#readme", - "devDependencies": { - "@arethetypeswrong/cli": "^0.17.1", - "@ljharb/eslint-config": "^21.1.1", - "@ljharb/tsconfig": "^0.2.2", - "@types/for-each": "^0.3.3", - "@types/object-inspect": "^1.13.0", - "@types/tape": "^5.8.0", - "auto-changelog": "^2.5.0", - "eclint": "^2.8.1", - "es-value-fixtures": "^1.5.0", - "eslint": "^8.8.0", - "evalmd": "^0.0.19", - "for-each": "^0.3.3", - "in-publish": "^2.0.1", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "object-inspect": "^1.13.3", - "safe-publish-latest": "^2.0.0", - "tape": "^5.9.0", - "typescript": "next" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - }, - "engines": { - "node": ">= 0.4" - } -} diff --git a/node_modules/math-intrinsics/pow.d.ts b/node_modules/math-intrinsics/pow.d.ts deleted file mode 100644 index 5873c44..0000000 --- a/node_modules/math-intrinsics/pow.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = Math.pow; \ No newline at end of file diff --git a/node_modules/math-intrinsics/pow.js b/node_modules/math-intrinsics/pow.js deleted file mode 100644 index c0a4103..0000000 --- a/node_modules/math-intrinsics/pow.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./pow')} */ -module.exports = Math.pow; diff --git a/node_modules/math-intrinsics/round.d.ts b/node_modules/math-intrinsics/round.d.ts deleted file mode 100644 index da1fde3..0000000 --- a/node_modules/math-intrinsics/round.d.ts +++ /dev/null @@ -1 +0,0 @@ -export = Math.round; \ No newline at end of file diff --git a/node_modules/math-intrinsics/round.js b/node_modules/math-intrinsics/round.js deleted file mode 100644 index b792156..0000000 --- a/node_modules/math-intrinsics/round.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -/** @type {import('./round')} */ -module.exports = Math.round; diff --git a/node_modules/math-intrinsics/sign.d.ts b/node_modules/math-intrinsics/sign.d.ts deleted file mode 100644 index c49ceca..0000000 --- a/node_modules/math-intrinsics/sign.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare function sign(x: number): number; - -export = sign; \ No newline at end of file diff --git a/node_modules/math-intrinsics/sign.js b/node_modules/math-intrinsics/sign.js deleted file mode 100644 index 9e5173c..0000000 --- a/node_modules/math-intrinsics/sign.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -var $isNaN = require('./isNaN'); - -/** @type {import('./sign')} */ -module.exports = function sign(number) { - if ($isNaN(number) || number === 0) { - return number; - } - return number < 0 ? -1 : +1; -}; diff --git a/node_modules/math-intrinsics/test/index.js b/node_modules/math-intrinsics/test/index.js deleted file mode 100644 index 0f90a5d..0000000 --- a/node_modules/math-intrinsics/test/index.js +++ /dev/null @@ -1,192 +0,0 @@ -'use strict'; - -var test = require('tape'); -var v = require('es-value-fixtures'); -var forEach = require('for-each'); -var inspect = require('object-inspect'); - -var abs = require('../abs'); -var floor = require('../floor'); -var isFinite = require('../isFinite'); -var isInteger = require('../isInteger'); -var isNaN = require('../isNaN'); -var isNegativeZero = require('../isNegativeZero'); -var max = require('../max'); -var min = require('../min'); -var mod = require('../mod'); -var pow = require('../pow'); -var round = require('../round'); -var sign = require('../sign'); - -var maxArrayLength = require('../constants/maxArrayLength'); -var maxSafeInteger = require('../constants/maxSafeInteger'); -var maxValue = require('../constants/maxValue'); - -test('abs', function (t) { - t.equal(abs(-1), 1, 'abs(-1) === 1'); - t.equal(abs(+1), 1, 'abs(+1) === 1'); - t.equal(abs(+0), +0, 'abs(+0) === +0'); - t.equal(abs(-0), +0, 'abs(-0) === +0'); - - t.end(); -}); - -test('floor', function (t) { - t.equal(floor(-1.1), -2, 'floor(-1.1) === -2'); - t.equal(floor(+1.1), 1, 'floor(+1.1) === 1'); - t.equal(floor(+0), +0, 'floor(+0) === +0'); - t.equal(floor(-0), -0, 'floor(-0) === -0'); - t.equal(floor(-Infinity), -Infinity, 'floor(-Infinity) === -Infinity'); - t.equal(floor(Number(Infinity)), Number(Infinity), 'floor(+Infinity) === +Infinity'); - t.equal(floor(NaN), NaN, 'floor(NaN) === NaN'); - t.equal(floor(0), +0, 'floor(0) === +0'); - t.equal(floor(-0), -0, 'floor(-0) === -0'); - t.equal(floor(1), 1, 'floor(1) === 1'); - t.equal(floor(-1), -1, 'floor(-1) === -1'); - t.equal(floor(1.1), 1, 'floor(1.1) === 1'); - t.equal(floor(-1.1), -2, 'floor(-1.1) === -2'); - t.equal(floor(maxValue), maxValue, 'floor(maxValue) === maxValue'); - t.equal(floor(maxSafeInteger), maxSafeInteger, 'floor(maxSafeInteger) === maxSafeInteger'); - - t.end(); -}); - -test('isFinite', function (t) { - t.equal(isFinite(0), true, 'isFinite(+0) === true'); - t.equal(isFinite(-0), true, 'isFinite(-0) === true'); - t.equal(isFinite(1), true, 'isFinite(1) === true'); - t.equal(isFinite(Infinity), false, 'isFinite(Infinity) === false'); - t.equal(isFinite(-Infinity), false, 'isFinite(-Infinity) === false'); - t.equal(isFinite(NaN), false, 'isFinite(NaN) === false'); - - forEach(v.nonNumbers, function (nonNumber) { - t.equal(isFinite(nonNumber), false, 'isFinite(' + inspect(nonNumber) + ') === false'); - }); - - t.end(); -}); - -test('isInteger', function (t) { - forEach([].concat( - // @ts-expect-error TS sucks with concat - v.nonNumbers, - v.nonIntegerNumbers - ), function (nonInteger) { - t.equal(isInteger(nonInteger), false, 'isInteger(' + inspect(nonInteger) + ') === false'); - }); - - t.end(); -}); - -test('isNaN', function (t) { - forEach([].concat( - // @ts-expect-error TS sucks with concat - v.nonNumbers, - v.infinities, - v.zeroes, - v.integerNumbers - ), function (nonNaN) { - t.equal(isNaN(nonNaN), false, 'isNaN(' + inspect(nonNaN) + ') === false'); - }); - - t.equal(isNaN(NaN), true, 'isNaN(NaN) === true'); - - t.end(); -}); - -test('isNegativeZero', function (t) { - t.equal(isNegativeZero(-0), true, 'isNegativeZero(-0) === true'); - t.equal(isNegativeZero(+0), false, 'isNegativeZero(+0) === false'); - t.equal(isNegativeZero(1), false, 'isNegativeZero(1) === false'); - t.equal(isNegativeZero(-1), false, 'isNegativeZero(-1) === false'); - t.equal(isNegativeZero(NaN), false, 'isNegativeZero(NaN) === false'); - t.equal(isNegativeZero(Infinity), false, 'isNegativeZero(Infinity) === false'); - t.equal(isNegativeZero(-Infinity), false, 'isNegativeZero(-Infinity) === false'); - - forEach(v.nonNumbers, function (nonNumber) { - t.equal(isNegativeZero(nonNumber), false, 'isNegativeZero(' + inspect(nonNumber) + ') === false'); - }); - - t.end(); -}); - -test('max', function (t) { - t.equal(max(1, 2), 2, 'max(1, 2) === 2'); - t.equal(max(1, 2, 3), 3, 'max(1, 2, 3) === 3'); - t.equal(max(1, 2, 3, 4), 4, 'max(1, 2, 3, 4) === 4'); - t.equal(max(1, 2, 3, 4, 5), 5, 'max(1, 2, 3, 4, 5) === 5'); - t.equal(max(1, 2, 3, 4, 5, 6), 6, 'max(1, 2, 3, 4, 5, 6) === 6'); - t.equal(max(1, 2, 3, 4, 5, 6, 7), 7, 'max(1, 2, 3, 4, 5, 6, 7) === 7'); - - t.end(); -}); - -test('min', function (t) { - t.equal(min(1, 2), 1, 'min(1, 2) === 1'); - t.equal(min(1, 2, 3), 1, 'min(1, 2, 3) === 1'); - t.equal(min(1, 2, 3, 4), 1, 'min(1, 2, 3, 4) === 1'); - t.equal(min(1, 2, 3, 4, 5), 1, 'min(1, 2, 3, 4, 5) === 1'); - t.equal(min(1, 2, 3, 4, 5, 6), 1, 'min(1, 2, 3, 4, 5, 6) === 1'); - - t.end(); -}); - -test('mod', function (t) { - t.equal(mod(1, 2), 1, 'mod(1, 2) === 1'); - t.equal(mod(2, 2), 0, 'mod(2, 2) === 0'); - t.equal(mod(3, 2), 1, 'mod(3, 2) === 1'); - t.equal(mod(4, 2), 0, 'mod(4, 2) === 0'); - t.equal(mod(5, 2), 1, 'mod(5, 2) === 1'); - t.equal(mod(6, 2), 0, 'mod(6, 2) === 0'); - t.equal(mod(7, 2), 1, 'mod(7, 2) === 1'); - t.equal(mod(8, 2), 0, 'mod(8, 2) === 0'); - t.equal(mod(9, 2), 1, 'mod(9, 2) === 1'); - t.equal(mod(10, 2), 0, 'mod(10, 2) === 0'); - t.equal(mod(11, 2), 1, 'mod(11, 2) === 1'); - - t.end(); -}); - -test('pow', function (t) { - t.equal(pow(2, 2), 4, 'pow(2, 2) === 4'); - t.equal(pow(2, 3), 8, 'pow(2, 3) === 8'); - t.equal(pow(2, 4), 16, 'pow(2, 4) === 16'); - t.equal(pow(2, 5), 32, 'pow(2, 5) === 32'); - t.equal(pow(2, 6), 64, 'pow(2, 6) === 64'); - t.equal(pow(2, 7), 128, 'pow(2, 7) === 128'); - t.equal(pow(2, 8), 256, 'pow(2, 8) === 256'); - t.equal(pow(2, 9), 512, 'pow(2, 9) === 512'); - t.equal(pow(2, 10), 1024, 'pow(2, 10) === 1024'); - - t.end(); -}); - -test('round', function (t) { - t.equal(round(1.1), 1, 'round(1.1) === 1'); - t.equal(round(1.5), 2, 'round(1.5) === 2'); - t.equal(round(1.9), 2, 'round(1.9) === 2'); - - t.end(); -}); - -test('sign', function (t) { - t.equal(sign(-1), -1, 'sign(-1) === -1'); - t.equal(sign(+1), +1, 'sign(+1) === +1'); - t.equal(sign(+0), +0, 'sign(+0) === +0'); - t.equal(sign(-0), -0, 'sign(-0) === -0'); - t.equal(sign(NaN), NaN, 'sign(NaN) === NaN'); - t.equal(sign(Infinity), +1, 'sign(Infinity) === +1'); - t.equal(sign(-Infinity), -1, 'sign(-Infinity) === -1'); - t.equal(sign(maxValue), +1, 'sign(maxValue) === +1'); - t.equal(sign(maxSafeInteger), +1, 'sign(maxSafeInteger) === +1'); - - t.end(); -}); - -test('constants', function (t) { - t.equal(typeof maxArrayLength, 'number', 'typeof maxArrayLength === "number"'); - t.equal(typeof maxSafeInteger, 'number', 'typeof maxSafeInteger === "number"'); - t.equal(typeof maxValue, 'number', 'typeof maxValue === "number"'); - - t.end(); -}); diff --git a/node_modules/math-intrinsics/tsconfig.json b/node_modules/math-intrinsics/tsconfig.json deleted file mode 100644 index b131000..0000000 --- a/node_modules/math-intrinsics/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "@ljharb/tsconfig", -} diff --git a/node_modules/media-typer/HISTORY.md b/node_modules/media-typer/HISTORY.md deleted file mode 100644 index 62c2003..0000000 --- a/node_modules/media-typer/HISTORY.md +++ /dev/null @@ -1,22 +0,0 @@ -0.3.0 / 2014-09-07 -================== - - * Support Node.js 0.6 - * Throw error when parameter format invalid on parse - -0.2.0 / 2014-06-18 -================== - - * Add `typer.format()` to format media types - -0.1.0 / 2014-06-17 -================== - - * Accept `req` as argument to `parse` - * Accept `res` as argument to `parse` - * Parse media type with extra LWS between type and first parameter - -0.0.0 / 2014-06-13 -================== - - * Initial implementation diff --git a/node_modules/media-typer/LICENSE b/node_modules/media-typer/LICENSE deleted file mode 100644 index b7dce6c..0000000 --- a/node_modules/media-typer/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/media-typer/README.md b/node_modules/media-typer/README.md deleted file mode 100644 index d8df623..0000000 --- a/node_modules/media-typer/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# media-typer - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Simple RFC 6838 media type parser - -## Installation - -```sh -$ npm install media-typer -``` - -## API - -```js -var typer = require('media-typer') -``` - -### typer.parse(string) - -```js -var obj = typer.parse('image/svg+xml; charset=utf-8') -``` - -Parse a media type string. This will return an object with the following -properties (examples are shown for the string `'image/svg+xml; charset=utf-8'`): - - - `type`: The type of the media type (always lower case). Example: `'image'` - - - `subtype`: The subtype of the media type (always lower case). Example: `'svg'` - - - `suffix`: The suffix of the media type (always lower case). Example: `'xml'` - - - `parameters`: An object of the parameters in the media type (name of parameter always lower case). Example: `{charset: 'utf-8'}` - -### typer.parse(req) - -```js -var obj = typer.parse(req) -``` - -Parse the `content-type` header from the given `req`. Short-cut for -`typer.parse(req.headers['content-type'])`. - -### typer.parse(res) - -```js -var obj = typer.parse(res) -``` - -Parse the `content-type` header set on the given `res`. Short-cut for -`typer.parse(res.getHeader('content-type'))`. - -### typer.format(obj) - -```js -var obj = typer.format({type: 'image', subtype: 'svg', suffix: 'xml'}) -``` - -Format an object into a media type string. This will return a string of the -mime type for the given object. For the properties of the object, see the -documentation for `typer.parse(string)`. - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/media-typer.svg?style=flat -[npm-url]: https://npmjs.org/package/media-typer -[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat -[node-version-url]: http://nodejs.org/download/ -[travis-image]: https://img.shields.io/travis/jshttp/media-typer.svg?style=flat -[travis-url]: https://travis-ci.org/jshttp/media-typer -[coveralls-image]: https://img.shields.io/coveralls/jshttp/media-typer.svg?style=flat -[coveralls-url]: https://coveralls.io/r/jshttp/media-typer -[downloads-image]: https://img.shields.io/npm/dm/media-typer.svg?style=flat -[downloads-url]: https://npmjs.org/package/media-typer diff --git a/node_modules/media-typer/index.js b/node_modules/media-typer/index.js deleted file mode 100644 index 07f7295..0000000 --- a/node_modules/media-typer/index.js +++ /dev/null @@ -1,270 +0,0 @@ -/*! - * media-typer - * Copyright(c) 2014 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * RegExp to match *( ";" parameter ) in RFC 2616 sec 3.7 - * - * parameter = token "=" ( token | quoted-string ) - * token = 1* - * separators = "(" | ")" | "<" | ">" | "@" - * | "," | ";" | ":" | "\" | <"> - * | "/" | "[" | "]" | "?" | "=" - * | "{" | "}" | SP | HT - * quoted-string = ( <"> *(qdtext | quoted-pair ) <"> ) - * qdtext = > - * quoted-pair = "\" CHAR - * CHAR = - * TEXT = - * LWS = [CRLF] 1*( SP | HT ) - * CRLF = CR LF - * CR = - * LF = - * SP = - * SHT = - * CTL = - * OCTET = - */ -var paramRegExp = /; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u0020-\u007e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g; -var textRegExp = /^[\u0020-\u007e\u0080-\u00ff]+$/ -var tokenRegExp = /^[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+$/ - -/** - * RegExp to match quoted-pair in RFC 2616 - * - * quoted-pair = "\" CHAR - * CHAR = - */ -var qescRegExp = /\\([\u0000-\u007f])/g; - -/** - * RegExp to match chars that must be quoted-pair in RFC 2616 - */ -var quoteRegExp = /([\\"])/g; - -/** - * RegExp to match type in RFC 6838 - * - * type-name = restricted-name - * subtype-name = restricted-name - * restricted-name = restricted-name-first *126restricted-name-chars - * restricted-name-first = ALPHA / DIGIT - * restricted-name-chars = ALPHA / DIGIT / "!" / "#" / - * "$" / "&" / "-" / "^" / "_" - * restricted-name-chars =/ "." ; Characters before first dot always - * ; specify a facet name - * restricted-name-chars =/ "+" ; Characters after last plus always - * ; specify a structured syntax suffix - * ALPHA = %x41-5A / %x61-7A ; A-Z / a-z - * DIGIT = %x30-39 ; 0-9 - */ -var subtypeNameRegExp = /^[A-Za-z0-9][A-Za-z0-9!#$&^_.-]{0,126}$/ -var typeNameRegExp = /^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/ -var typeRegExp = /^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/; - -/** - * Module exports. - */ - -exports.format = format -exports.parse = parse - -/** - * Format object to media type. - * - * @param {object} obj - * @return {string} - * @api public - */ - -function format(obj) { - if (!obj || typeof obj !== 'object') { - throw new TypeError('argument obj is required') - } - - var parameters = obj.parameters - var subtype = obj.subtype - var suffix = obj.suffix - var type = obj.type - - if (!type || !typeNameRegExp.test(type)) { - throw new TypeError('invalid type') - } - - if (!subtype || !subtypeNameRegExp.test(subtype)) { - throw new TypeError('invalid subtype') - } - - // format as type/subtype - var string = type + '/' + subtype - - // append +suffix - if (suffix) { - if (!typeNameRegExp.test(suffix)) { - throw new TypeError('invalid suffix') - } - - string += '+' + suffix - } - - // append parameters - if (parameters && typeof parameters === 'object') { - var param - var params = Object.keys(parameters).sort() - - for (var i = 0; i < params.length; i++) { - param = params[i] - - if (!tokenRegExp.test(param)) { - throw new TypeError('invalid parameter name') - } - - string += '; ' + param + '=' + qstring(parameters[param]) - } - } - - return string -} - -/** - * Parse media type to object. - * - * @param {string|object} string - * @return {Object} - * @api public - */ - -function parse(string) { - if (!string) { - throw new TypeError('argument string is required') - } - - // support req/res-like objects as argument - if (typeof string === 'object') { - string = getcontenttype(string) - } - - if (typeof string !== 'string') { - throw new TypeError('argument string is required to be a string') - } - - var index = string.indexOf(';') - var type = index !== -1 - ? string.substr(0, index) - : string - - var key - var match - var obj = splitType(type) - var params = {} - var value - - paramRegExp.lastIndex = index - - while (match = paramRegExp.exec(string)) { - if (match.index !== index) { - throw new TypeError('invalid parameter format') - } - - index += match[0].length - key = match[1].toLowerCase() - value = match[2] - - if (value[0] === '"') { - // remove quotes and escapes - value = value - .substr(1, value.length - 2) - .replace(qescRegExp, '$1') - } - - params[key] = value - } - - if (index !== -1 && index !== string.length) { - throw new TypeError('invalid parameter format') - } - - obj.parameters = params - - return obj -} - -/** - * Get content-type from req/res objects. - * - * @param {object} - * @return {Object} - * @api private - */ - -function getcontenttype(obj) { - if (typeof obj.getHeader === 'function') { - // res-like - return obj.getHeader('content-type') - } - - if (typeof obj.headers === 'object') { - // req-like - return obj.headers && obj.headers['content-type'] - } -} - -/** - * Quote a string if necessary. - * - * @param {string} val - * @return {string} - * @api private - */ - -function qstring(val) { - var str = String(val) - - // no need to quote tokens - if (tokenRegExp.test(str)) { - return str - } - - if (str.length > 0 && !textRegExp.test(str)) { - throw new TypeError('invalid parameter value') - } - - return '"' + str.replace(quoteRegExp, '\\$1') + '"' -} - -/** - * Simply "type/subtype+siffx" into parts. - * - * @param {string} string - * @return {Object} - * @api private - */ - -function splitType(string) { - var match = typeRegExp.exec(string.toLowerCase()) - - if (!match) { - throw new TypeError('invalid media type') - } - - var type = match[1] - var subtype = match[2] - var suffix - - // suffix after last + - var index = subtype.lastIndexOf('+') - if (index !== -1) { - suffix = subtype.substr(index + 1) - subtype = subtype.substr(0, index) - } - - var obj = { - type: type, - subtype: subtype, - suffix: suffix - } - - return obj -} diff --git a/node_modules/media-typer/package.json b/node_modules/media-typer/package.json deleted file mode 100644 index 8cf3ebc..0000000 --- a/node_modules/media-typer/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "media-typer", - "description": "Simple RFC 6838 media type parser and formatter", - "version": "0.3.0", - "author": "Douglas Christopher Wilson ", - "license": "MIT", - "repository": "jshttp/media-typer", - "devDependencies": { - "istanbul": "0.3.2", - "mocha": "~1.21.4", - "should": "~4.0.4" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "test": "mocha --reporter spec --check-leaks --bail test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" - } -} diff --git a/node_modules/merge-descriptors/HISTORY.md b/node_modules/merge-descriptors/HISTORY.md deleted file mode 100644 index 486771f..0000000 --- a/node_modules/merge-descriptors/HISTORY.md +++ /dev/null @@ -1,21 +0,0 @@ -1.0.1 / 2016-01-17 -================== - - * perf: enable strict mode - -1.0.0 / 2015-03-01 -================== - - * Add option to only add new descriptors - * Add simple argument validation - * Add jsdoc to source file - -0.0.2 / 2013-12-14 -================== - - * Move repository to `component` organization - -0.0.1 / 2013-10-29 -================== - - * Initial release diff --git a/node_modules/merge-descriptors/LICENSE b/node_modules/merge-descriptors/LICENSE deleted file mode 100644 index 274bfd8..0000000 --- a/node_modules/merge-descriptors/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2013 Jonathan Ong -Copyright (c) 2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/merge-descriptors/README.md b/node_modules/merge-descriptors/README.md deleted file mode 100644 index 3403f4a..0000000 --- a/node_modules/merge-descriptors/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# merge-descriptors - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Merge objects using descriptors. - -```js -var thing = { - get name() { - return 'jon' - } -} - -var animal = { - -} - -merge(animal, thing) - -animal.name === 'jon' -``` - -## API - -### merge(destination, source) - -Redefines `destination`'s descriptors with `source`'s. The return value is the -`destination` object. - -### merge(destination, source, false) - -Defines `source`'s descriptors on `destination` if `destination` does not have -a descriptor by the same name. The return value is the `destination` object. - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/merge-descriptors.svg -[npm-url]: https://npmjs.org/package/merge-descriptors -[travis-image]: https://img.shields.io/travis/component/merge-descriptors/master.svg -[travis-url]: https://travis-ci.org/component/merge-descriptors -[coveralls-image]: https://img.shields.io/coveralls/component/merge-descriptors/master.svg -[coveralls-url]: https://coveralls.io/r/component/merge-descriptors?branch=master -[downloads-image]: https://img.shields.io/npm/dm/merge-descriptors.svg -[downloads-url]: https://npmjs.org/package/merge-descriptors diff --git a/node_modules/merge-descriptors/index.js b/node_modules/merge-descriptors/index.js deleted file mode 100644 index f22ebab..0000000 --- a/node_modules/merge-descriptors/index.js +++ /dev/null @@ -1,60 +0,0 @@ -/*! - * merge-descriptors - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module exports. - * @public - */ - -module.exports = merge - -/** - * Module variables. - * @private - */ - -var hasOwnProperty = Object.prototype.hasOwnProperty - -/** - * Merge the property descriptors of `src` into `dest` - * - * @param {object} dest Object to add descriptors to - * @param {object} src Object to clone descriptors from - * @param {boolean} [redefine=true] Redefine `dest` properties with `src` properties - * @returns {object} Reference to dest - * @public - */ - -function merge (dest, src, redefine) { - if (!dest) { - throw new TypeError('argument dest is required') - } - - if (!src) { - throw new TypeError('argument src is required') - } - - if (redefine === undefined) { - // Default to true - redefine = true - } - - Object.getOwnPropertyNames(src).forEach(function forEachOwnPropertyName (name) { - if (!redefine && hasOwnProperty.call(dest, name)) { - // Skip descriptor - return - } - - // Copy descriptor - var descriptor = Object.getOwnPropertyDescriptor(src, name) - Object.defineProperty(dest, name, descriptor) - }) - - return dest -} diff --git a/node_modules/merge-descriptors/package.json b/node_modules/merge-descriptors/package.json deleted file mode 100644 index aa9af0a..0000000 --- a/node_modules/merge-descriptors/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "merge-descriptors", - "description": "Merge objects using descriptors", - "version": "1.0.3", - "author": { - "name": "Jonathan Ong", - "email": "me@jongleberry.com", - "url": "http://jongleberry.com", - "twitter": "https://twitter.com/jongleberry" - }, - "contributors": [ - "Douglas Christopher Wilson ", - "Mike Grabowski " - ], - "license": "MIT", - "repository": "sindresorhus/merge-descriptors", - "funding": "https://github.com/sponsors/sindresorhus", - "devDependencies": { - "eslint": "5.9.0", - "eslint-config-standard": "12.0.0", - "eslint-plugin-import": "2.14.0", - "eslint-plugin-node": "7.0.1", - "eslint-plugin-promise": "4.0.1", - "eslint-plugin-standard": "4.0.0", - "mocha": "5.2.0", - "nyc": "13.1.0" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "README.md", - "index.js" - ], - "scripts": { - "lint": "eslint .", - "test": "mocha test/", - "test-cov": "nyc --reporter=html --reporter=text npm test" - } -} diff --git a/node_modules/methods/HISTORY.md b/node_modules/methods/HISTORY.md deleted file mode 100644 index c0ecf07..0000000 --- a/node_modules/methods/HISTORY.md +++ /dev/null @@ -1,29 +0,0 @@ -1.1.2 / 2016-01-17 -================== - - * perf: enable strict mode - -1.1.1 / 2014-12-30 -================== - - * Improve `browserify` support - -1.1.0 / 2014-07-05 -================== - - * Add `CONNECT` method - -1.0.1 / 2014-06-02 -================== - - * Fix module to work with harmony transform - -1.0.0 / 2014-05-08 -================== - - * Add `PURGE` method - -0.1.0 / 2013-10-28 -================== - - * Add `http.METHODS` support diff --git a/node_modules/methods/LICENSE b/node_modules/methods/LICENSE deleted file mode 100644 index 220dc1a..0000000 --- a/node_modules/methods/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2013-2014 TJ Holowaychuk -Copyright (c) 2015-2016 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/methods/README.md b/node_modules/methods/README.md deleted file mode 100644 index 672a32b..0000000 --- a/node_modules/methods/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# Methods - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -HTTP verbs that Node.js core's HTTP parser supports. - -This module provides an export that is just like `http.METHODS` from Node.js core, -with the following differences: - - * All method names are lower-cased. - * Contains a fallback list of methods for Node.js versions that do not have a - `http.METHODS` export (0.10 and lower). - * Provides the fallback list when using tools like `browserify` without pulling - in the `http` shim module. - -## Install - -```bash -$ npm install methods -``` - -## API - -```js -var methods = require('methods') -``` - -### methods - -This is an array of lower-cased method names that Node.js supports. If Node.js -provides the `http.METHODS` export, then this is the same array lower-cased, -otherwise it is a snapshot of the verbs from Node.js 0.10. - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/methods.svg?style=flat -[npm-url]: https://npmjs.org/package/methods -[node-version-image]: https://img.shields.io/node/v/methods.svg?style=flat -[node-version-url]: https://nodejs.org/en/download/ -[travis-image]: https://img.shields.io/travis/jshttp/methods.svg?style=flat -[travis-url]: https://travis-ci.org/jshttp/methods -[coveralls-image]: https://img.shields.io/coveralls/jshttp/methods.svg?style=flat -[coveralls-url]: https://coveralls.io/r/jshttp/methods?branch=master -[downloads-image]: https://img.shields.io/npm/dm/methods.svg?style=flat -[downloads-url]: https://npmjs.org/package/methods diff --git a/node_modules/methods/index.js b/node_modules/methods/index.js deleted file mode 100644 index 667a50b..0000000 --- a/node_modules/methods/index.js +++ /dev/null @@ -1,69 +0,0 @@ -/*! - * methods - * Copyright(c) 2013-2014 TJ Holowaychuk - * Copyright(c) 2015-2016 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module dependencies. - * @private - */ - -var http = require('http'); - -/** - * Module exports. - * @public - */ - -module.exports = getCurrentNodeMethods() || getBasicNodeMethods(); - -/** - * Get the current Node.js methods. - * @private - */ - -function getCurrentNodeMethods() { - return http.METHODS && http.METHODS.map(function lowerCaseMethod(method) { - return method.toLowerCase(); - }); -} - -/** - * Get the "basic" Node.js methods, a snapshot from Node.js 0.10. - * @private - */ - -function getBasicNodeMethods() { - return [ - 'get', - 'post', - 'put', - 'head', - 'delete', - 'options', - 'trace', - 'copy', - 'lock', - 'mkcol', - 'move', - 'purge', - 'propfind', - 'proppatch', - 'unlock', - 'report', - 'mkactivity', - 'checkout', - 'merge', - 'm-search', - 'notify', - 'subscribe', - 'unsubscribe', - 'patch', - 'search', - 'connect' - ]; -} diff --git a/node_modules/methods/package.json b/node_modules/methods/package.json deleted file mode 100644 index c4ce6f0..0000000 --- a/node_modules/methods/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "methods", - "description": "HTTP methods that node supports", - "version": "1.1.2", - "contributors": [ - "Douglas Christopher Wilson ", - "Jonathan Ong (http://jongleberry.com)", - "TJ Holowaychuk (http://tjholowaychuk.com)" - ], - "license": "MIT", - "repository": "jshttp/methods", - "devDependencies": { - "istanbul": "0.4.1", - "mocha": "1.21.5" - }, - "files": [ - "index.js", - "HISTORY.md", - "LICENSE" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" - }, - "browser": { - "http": false - }, - "keywords": [ - "http", - "methods" - ] -} diff --git a/node_modules/mime-db/HISTORY.md b/node_modules/mime-db/HISTORY.md deleted file mode 100644 index 7436f64..0000000 --- a/node_modules/mime-db/HISTORY.md +++ /dev/null @@ -1,507 +0,0 @@ -1.52.0 / 2022-02-21 -=================== - - * Add extensions from IANA for more `image/*` types - * Add extension `.asc` to `application/pgp-keys` - * Add extensions to various XML types - * Add new upstream MIME types - -1.51.0 / 2021-11-08 -=================== - - * Add new upstream MIME types - * Mark `image/vnd.microsoft.icon` as compressible - * Mark `image/vnd.ms-dds` as compressible - -1.50.0 / 2021-09-15 -=================== - - * Add deprecated iWorks mime types and extensions - * Add new upstream MIME types - -1.49.0 / 2021-07-26 -=================== - - * Add extension `.trig` to `application/trig` - * Add new upstream MIME types - -1.48.0 / 2021-05-30 -=================== - - * Add extension `.mvt` to `application/vnd.mapbox-vector-tile` - * Add new upstream MIME types - * Mark `text/yaml` as compressible - -1.47.0 / 2021-04-01 -=================== - - * Add new upstream MIME types - * Remove ambigious extensions from IANA for `application/*+xml` types - * Update primary extension to `.es` for `application/ecmascript` - -1.46.0 / 2021-02-13 -=================== - - * Add extension `.amr` to `audio/amr` - * Add extension `.m4s` to `video/iso.segment` - * Add extension `.opus` to `audio/ogg` - * Add new upstream MIME types - -1.45.0 / 2020-09-22 -=================== - - * Add `application/ubjson` with extension `.ubj` - * Add `image/avif` with extension `.avif` - * Add `image/ktx2` with extension `.ktx2` - * Add extension `.dbf` to `application/vnd.dbf` - * Add extension `.rar` to `application/vnd.rar` - * Add extension `.td` to `application/urc-targetdesc+xml` - * Add new upstream MIME types - * Fix extension of `application/vnd.apple.keynote` to be `.key` - -1.44.0 / 2020-04-22 -=================== - - * Add charsets from IANA - * Add extension `.cjs` to `application/node` - * Add new upstream MIME types - -1.43.0 / 2020-01-05 -=================== - - * Add `application/x-keepass2` with extension `.kdbx` - * Add extension `.mxmf` to `audio/mobile-xmf` - * Add extensions from IANA for `application/*+xml` types - * Add new upstream MIME types - -1.42.0 / 2019-09-25 -=================== - - * Add `image/vnd.ms-dds` with extension `.dds` - * Add new upstream MIME types - * Remove compressible from `multipart/mixed` - -1.41.0 / 2019-08-30 -=================== - - * Add new upstream MIME types - * Add `application/toml` with extension `.toml` - * Mark `font/ttf` as compressible - -1.40.0 / 2019-04-20 -=================== - - * Add extensions from IANA for `model/*` types - * Add `text/mdx` with extension `.mdx` - -1.39.0 / 2019-04-04 -=================== - - * Add extensions `.siv` and `.sieve` to `application/sieve` - * Add new upstream MIME types - -1.38.0 / 2019-02-04 -=================== - - * Add extension `.nq` to `application/n-quads` - * Add extension `.nt` to `application/n-triples` - * Add new upstream MIME types - * Mark `text/less` as compressible - -1.37.0 / 2018-10-19 -=================== - - * Add extensions to HEIC image types - * Add new upstream MIME types - -1.36.0 / 2018-08-20 -=================== - - * Add Apple file extensions from IANA - * Add extensions from IANA for `image/*` types - * Add new upstream MIME types - -1.35.0 / 2018-07-15 -=================== - - * Add extension `.owl` to `application/rdf+xml` - * Add new upstream MIME types - - Removes extension `.woff` from `application/font-woff` - -1.34.0 / 2018-06-03 -=================== - - * Add extension `.csl` to `application/vnd.citationstyles.style+xml` - * Add extension `.es` to `application/ecmascript` - * Add new upstream MIME types - * Add `UTF-8` as default charset for `text/turtle` - * Mark all XML-derived types as compressible - -1.33.0 / 2018-02-15 -=================== - - * Add extensions from IANA for `message/*` types - * Add new upstream MIME types - * Fix some incorrect OOXML types - * Remove `application/font-woff2` - -1.32.0 / 2017-11-29 -=================== - - * Add new upstream MIME types - * Update `text/hjson` to registered `application/hjson` - * Add `text/shex` with extension `.shex` - -1.31.0 / 2017-10-25 -=================== - - * Add `application/raml+yaml` with extension `.raml` - * Add `application/wasm` with extension `.wasm` - * Add new `font` type from IANA - * Add new upstream font extensions - * Add new upstream MIME types - * Add extensions for JPEG-2000 images - -1.30.0 / 2017-08-27 -=================== - - * Add `application/vnd.ms-outlook` - * Add `application/x-arj` - * Add extension `.mjs` to `application/javascript` - * Add glTF types and extensions - * Add new upstream MIME types - * Add `text/x-org` - * Add VirtualBox MIME types - * Fix `source` records for `video/*` types that are IANA - * Update `font/opentype` to registered `font/otf` - -1.29.0 / 2017-07-10 -=================== - - * Add `application/fido.trusted-apps+json` - * Add extension `.wadl` to `application/vnd.sun.wadl+xml` - * Add new upstream MIME types - * Add `UTF-8` as default charset for `text/css` - -1.28.0 / 2017-05-14 -=================== - - * Add new upstream MIME types - * Add extension `.gz` to `application/gzip` - * Update extensions `.md` and `.markdown` to be `text/markdown` - -1.27.0 / 2017-03-16 -=================== - - * Add new upstream MIME types - * Add `image/apng` with extension `.apng` - -1.26.0 / 2017-01-14 -=================== - - * Add new upstream MIME types - * Add extension `.geojson` to `application/geo+json` - -1.25.0 / 2016-11-11 -=================== - - * Add new upstream MIME types - -1.24.0 / 2016-09-18 -=================== - - * Add `audio/mp3` - * Add new upstream MIME types - -1.23.0 / 2016-05-01 -=================== - - * Add new upstream MIME types - * Add extension `.3gpp` to `audio/3gpp` - -1.22.0 / 2016-02-15 -=================== - - * Add `text/slim` - * Add extension `.rng` to `application/xml` - * Add new upstream MIME types - * Fix extension of `application/dash+xml` to be `.mpd` - * Update primary extension to `.m4a` for `audio/mp4` - -1.21.0 / 2016-01-06 -=================== - - * Add Google document types - * Add new upstream MIME types - -1.20.0 / 2015-11-10 -=================== - - * Add `text/x-suse-ymp` - * Add new upstream MIME types - -1.19.0 / 2015-09-17 -=================== - - * Add `application/vnd.apple.pkpass` - * Add new upstream MIME types - -1.18.0 / 2015-09-03 -=================== - - * Add new upstream MIME types - -1.17.0 / 2015-08-13 -=================== - - * Add `application/x-msdos-program` - * Add `audio/g711-0` - * Add `image/vnd.mozilla.apng` - * Add extension `.exe` to `application/x-msdos-program` - -1.16.0 / 2015-07-29 -=================== - - * Add `application/vnd.uri-map` - -1.15.0 / 2015-07-13 -=================== - - * Add `application/x-httpd-php` - -1.14.0 / 2015-06-25 -=================== - - * Add `application/scim+json` - * Add `application/vnd.3gpp.ussd+xml` - * Add `application/vnd.biopax.rdf+xml` - * Add `text/x-processing` - -1.13.0 / 2015-06-07 -=================== - - * Add nginx as a source - * Add `application/x-cocoa` - * Add `application/x-java-archive-diff` - * Add `application/x-makeself` - * Add `application/x-perl` - * Add `application/x-pilot` - * Add `application/x-redhat-package-manager` - * Add `application/x-sea` - * Add `audio/x-m4a` - * Add `audio/x-realaudio` - * Add `image/x-jng` - * Add `text/mathml` - -1.12.0 / 2015-06-05 -=================== - - * Add `application/bdoc` - * Add `application/vnd.hyperdrive+json` - * Add `application/x-bdoc` - * Add extension `.rtf` to `text/rtf` - -1.11.0 / 2015-05-31 -=================== - - * Add `audio/wav` - * Add `audio/wave` - * Add extension `.litcoffee` to `text/coffeescript` - * Add extension `.sfd-hdstx` to `application/vnd.hydrostatix.sof-data` - * Add extension `.n-gage` to `application/vnd.nokia.n-gage.symbian.install` - -1.10.0 / 2015-05-19 -=================== - - * Add `application/vnd.balsamiq.bmpr` - * Add `application/vnd.microsoft.portable-executable` - * Add `application/x-ns-proxy-autoconfig` - -1.9.1 / 2015-04-19 -================== - - * Remove `.json` extension from `application/manifest+json` - - This is causing bugs downstream - -1.9.0 / 2015-04-19 -================== - - * Add `application/manifest+json` - * Add `application/vnd.micro+json` - * Add `image/vnd.zbrush.pcx` - * Add `image/x-ms-bmp` - -1.8.0 / 2015-03-13 -================== - - * Add `application/vnd.citationstyles.style+xml` - * Add `application/vnd.fastcopy-disk-image` - * Add `application/vnd.gov.sk.xmldatacontainer+xml` - * Add extension `.jsonld` to `application/ld+json` - -1.7.0 / 2015-02-08 -================== - - * Add `application/vnd.gerber` - * Add `application/vnd.msa-disk-image` - -1.6.1 / 2015-02-05 -================== - - * Community extensions ownership transferred from `node-mime` - -1.6.0 / 2015-01-29 -================== - - * Add `application/jose` - * Add `application/jose+json` - * Add `application/json-seq` - * Add `application/jwk+json` - * Add `application/jwk-set+json` - * Add `application/jwt` - * Add `application/rdap+json` - * Add `application/vnd.gov.sk.e-form+xml` - * Add `application/vnd.ims.imsccv1p3` - -1.5.0 / 2014-12-30 -================== - - * Add `application/vnd.oracle.resource+json` - * Fix various invalid MIME type entries - - `application/mbox+xml` - - `application/oscp-response` - - `application/vwg-multiplexed` - - `audio/g721` - -1.4.0 / 2014-12-21 -================== - - * Add `application/vnd.ims.imsccv1p2` - * Fix various invalid MIME type entries - - `application/vnd-acucobol` - - `application/vnd-curl` - - `application/vnd-dart` - - `application/vnd-dxr` - - `application/vnd-fdf` - - `application/vnd-mif` - - `application/vnd-sema` - - `application/vnd-wap-wmlc` - - `application/vnd.adobe.flash-movie` - - `application/vnd.dece-zip` - - `application/vnd.dvb_service` - - `application/vnd.micrografx-igx` - - `application/vnd.sealed-doc` - - `application/vnd.sealed-eml` - - `application/vnd.sealed-mht` - - `application/vnd.sealed-ppt` - - `application/vnd.sealed-tiff` - - `application/vnd.sealed-xls` - - `application/vnd.sealedmedia.softseal-html` - - `application/vnd.sealedmedia.softseal-pdf` - - `application/vnd.wap-slc` - - `application/vnd.wap-wbxml` - - `audio/vnd.sealedmedia.softseal-mpeg` - - `image/vnd-djvu` - - `image/vnd-svf` - - `image/vnd-wap-wbmp` - - `image/vnd.sealed-png` - - `image/vnd.sealedmedia.softseal-gif` - - `image/vnd.sealedmedia.softseal-jpg` - - `model/vnd-dwf` - - `model/vnd.parasolid.transmit-binary` - - `model/vnd.parasolid.transmit-text` - - `text/vnd-a` - - `text/vnd-curl` - - `text/vnd.wap-wml` - * Remove example template MIME types - - `application/example` - - `audio/example` - - `image/example` - - `message/example` - - `model/example` - - `multipart/example` - - `text/example` - - `video/example` - -1.3.1 / 2014-12-16 -================== - - * Fix missing extensions - - `application/json5` - - `text/hjson` - -1.3.0 / 2014-12-07 -================== - - * Add `application/a2l` - * Add `application/aml` - * Add `application/atfx` - * Add `application/atxml` - * Add `application/cdfx+xml` - * Add `application/dii` - * Add `application/json5` - * Add `application/lxf` - * Add `application/mf4` - * Add `application/vnd.apache.thrift.compact` - * Add `application/vnd.apache.thrift.json` - * Add `application/vnd.coffeescript` - * Add `application/vnd.enphase.envoy` - * Add `application/vnd.ims.imsccv1p1` - * Add `text/csv-schema` - * Add `text/hjson` - * Add `text/markdown` - * Add `text/yaml` - -1.2.0 / 2014-11-09 -================== - - * Add `application/cea` - * Add `application/dit` - * Add `application/vnd.gov.sk.e-form+zip` - * Add `application/vnd.tmd.mediaflex.api+xml` - * Type `application/epub+zip` is now IANA-registered - -1.1.2 / 2014-10-23 -================== - - * Rebuild database for `application/x-www-form-urlencoded` change - -1.1.1 / 2014-10-20 -================== - - * Mark `application/x-www-form-urlencoded` as compressible. - -1.1.0 / 2014-09-28 -================== - - * Add `application/font-woff2` - -1.0.3 / 2014-09-25 -================== - - * Fix engine requirement in package - -1.0.2 / 2014-09-25 -================== - - * Add `application/coap-group+json` - * Add `application/dcd` - * Add `application/vnd.apache.thrift.binary` - * Add `image/vnd.tencent.tap` - * Mark all JSON-derived types as compressible - * Update `text/vtt` data - -1.0.1 / 2014-08-30 -================== - - * Fix extension ordering - -1.0.0 / 2014-08-30 -================== - - * Add `application/atf` - * Add `application/merge-patch+json` - * Add `multipart/x-mixed-replace` - * Add `source: 'apache'` metadata - * Add `source: 'iana'` metadata - * Remove badly-assumed charset data diff --git a/node_modules/mime-db/LICENSE b/node_modules/mime-db/LICENSE deleted file mode 100644 index 0751cb1..0000000 --- a/node_modules/mime-db/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2015-2022 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/mime-db/README.md b/node_modules/mime-db/README.md deleted file mode 100644 index 5a8fcfe..0000000 --- a/node_modules/mime-db/README.md +++ /dev/null @@ -1,100 +0,0 @@ -# mime-db - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-image]][node-url] -[![Build Status][ci-image]][ci-url] -[![Coverage Status][coveralls-image]][coveralls-url] - -This is a large database of mime types and information about them. -It consists of a single, public JSON file and does not include any logic, -allowing it to remain as un-opinionated as possible with an API. -It aggregates data from the following sources: - -- http://www.iana.org/assignments/media-types/media-types.xhtml -- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types -- http://hg.nginx.org/nginx/raw-file/default/conf/mime.types - -## Installation - -```bash -npm install mime-db -``` - -### Database Download - -If you're crazy enough to use this in the browser, you can just grab the -JSON file using [jsDelivr](https://www.jsdelivr.com/). It is recommended to -replace `master` with [a release tag](https://github.com/jshttp/mime-db/tags) -as the JSON format may change in the future. - -``` -https://cdn.jsdelivr.net/gh/jshttp/mime-db@master/db.json -``` - -## Usage - -```js -var db = require('mime-db') - -// grab data on .js files -var data = db['application/javascript'] -``` - -## Data Structure - -The JSON file is a map lookup for lowercased mime types. -Each mime type has the following properties: - -- `.source` - where the mime type is defined. - If not set, it's probably a custom media type. - - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types) - - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml) - - `nginx` - [nginx media types](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types) -- `.extensions[]` - known extensions associated with this mime type. -- `.compressible` - whether a file of this type can be gzipped. -- `.charset` - the default charset associated with this type, if any. - -If unknown, every property could be `undefined`. - -## Contributing - -To edit the database, only make PRs against `src/custom-types.json` or -`src/custom-suffix.json`. - -The `src/custom-types.json` file is a JSON object with the MIME type as the -keys and the values being an object with the following keys: - -- `compressible` - leave out if you don't know, otherwise `true`/`false` to - indicate whether the data represented by the type is typically compressible. -- `extensions` - include an array of file extensions that are associated with - the type. -- `notes` - human-readable notes about the type, typically what the type is. -- `sources` - include an array of URLs of where the MIME type and the associated - extensions are sourced from. This needs to be a [primary source](https://en.wikipedia.org/wiki/Primary_source); - links to type aggregating sites and Wikipedia are _not acceptable_. - -To update the build, run `npm run build`. - -### Adding Custom Media Types - -The best way to get new media types included in this library is to register -them with the IANA. The community registration procedure is outlined in -[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types -registered with the IANA are automatically pulled into this library. - -If that is not possible / feasible, they can be added directly here as a -"custom" type. To do this, it is required to have a primary source that -definitively lists the media type. If an extension is going to be listed as -associateed with this media type, the source must definitively link the -media type and extension as well. - -[ci-image]: https://badgen.net/github/checks/jshttp/mime-db/master?label=ci -[ci-url]: https://github.com/jshttp/mime-db/actions?query=workflow%3Aci -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-db/master -[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master -[node-image]: https://badgen.net/npm/node/mime-db -[node-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/mime-db -[npm-url]: https://npmjs.org/package/mime-db -[npm-version-image]: https://badgen.net/npm/v/mime-db diff --git a/node_modules/mime-db/db.json b/node_modules/mime-db/db.json deleted file mode 100644 index eb9c42c..0000000 --- a/node_modules/mime-db/db.json +++ /dev/null @@ -1,8519 +0,0 @@ -{ - "application/1d-interleaved-parityfec": { - "source": "iana" - }, - "application/3gpdash-qoe-report+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/3gpp-ims+xml": { - "source": "iana", - "compressible": true - }, - "application/3gpphal+json": { - "source": "iana", - "compressible": true - }, - "application/3gpphalforms+json": { - "source": "iana", - "compressible": true - }, - "application/a2l": { - "source": "iana" - }, - "application/ace+cbor": { - "source": "iana" - }, - "application/activemessage": { - "source": "iana" - }, - "application/activity+json": { - "source": "iana", - "compressible": true - }, - "application/alto-costmap+json": { - "source": "iana", - "compressible": true - }, - "application/alto-costmapfilter+json": { - "source": "iana", - "compressible": true - }, - "application/alto-directory+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointcost+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointcostparams+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointprop+json": { - "source": "iana", - "compressible": true - }, - "application/alto-endpointpropparams+json": { - "source": "iana", - "compressible": true - }, - "application/alto-error+json": { - "source": "iana", - "compressible": true - }, - "application/alto-networkmap+json": { - "source": "iana", - "compressible": true - }, - "application/alto-networkmapfilter+json": { - "source": "iana", - "compressible": true - }, - "application/alto-updatestreamcontrol+json": { - "source": "iana", - "compressible": true - }, - "application/alto-updatestreamparams+json": { - "source": "iana", - "compressible": true - }, - "application/aml": { - "source": "iana" - }, - "application/andrew-inset": { - "source": "iana", - "extensions": ["ez"] - }, - "application/applefile": { - "source": "iana" - }, - "application/applixware": { - "source": "apache", - "extensions": ["aw"] - }, - "application/at+jwt": { - "source": "iana" - }, - "application/atf": { - "source": "iana" - }, - "application/atfx": { - "source": "iana" - }, - "application/atom+xml": { - "source": "iana", - "compressible": true, - "extensions": ["atom"] - }, - "application/atomcat+xml": { - "source": "iana", - "compressible": true, - "extensions": ["atomcat"] - }, - "application/atomdeleted+xml": { - "source": "iana", - "compressible": true, - "extensions": ["atomdeleted"] - }, - "application/atomicmail": { - "source": "iana" - }, - "application/atomsvc+xml": { - "source": "iana", - "compressible": true, - "extensions": ["atomsvc"] - }, - "application/atsc-dwd+xml": { - "source": "iana", - "compressible": true, - "extensions": ["dwd"] - }, - "application/atsc-dynamic-event-message": { - "source": "iana" - }, - "application/atsc-held+xml": { - "source": "iana", - "compressible": true, - "extensions": ["held"] - }, - "application/atsc-rdt+json": { - "source": "iana", - "compressible": true - }, - "application/atsc-rsat+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rsat"] - }, - "application/atxml": { - "source": "iana" - }, - "application/auth-policy+xml": { - "source": "iana", - "compressible": true - }, - "application/bacnet-xdd+zip": { - "source": "iana", - "compressible": false - }, - "application/batch-smtp": { - "source": "iana" - }, - "application/bdoc": { - "compressible": false, - "extensions": ["bdoc"] - }, - "application/beep+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/calendar+json": { - "source": "iana", - "compressible": true - }, - "application/calendar+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xcs"] - }, - "application/call-completion": { - "source": "iana" - }, - "application/cals-1840": { - "source": "iana" - }, - "application/captive+json": { - "source": "iana", - "compressible": true - }, - "application/cbor": { - "source": "iana" - }, - "application/cbor-seq": { - "source": "iana" - }, - "application/cccex": { - "source": "iana" - }, - "application/ccmp+xml": { - "source": "iana", - "compressible": true - }, - "application/ccxml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["ccxml"] - }, - "application/cdfx+xml": { - "source": "iana", - "compressible": true, - "extensions": ["cdfx"] - }, - "application/cdmi-capability": { - "source": "iana", - "extensions": ["cdmia"] - }, - "application/cdmi-container": { - "source": "iana", - "extensions": ["cdmic"] - }, - "application/cdmi-domain": { - "source": "iana", - "extensions": ["cdmid"] - }, - "application/cdmi-object": { - "source": "iana", - "extensions": ["cdmio"] - }, - "application/cdmi-queue": { - "source": "iana", - "extensions": ["cdmiq"] - }, - "application/cdni": { - "source": "iana" - }, - "application/cea": { - "source": "iana" - }, - "application/cea-2018+xml": { - "source": "iana", - "compressible": true - }, - "application/cellml+xml": { - "source": "iana", - "compressible": true - }, - "application/cfw": { - "source": "iana" - }, - "application/city+json": { - "source": "iana", - "compressible": true - }, - "application/clr": { - "source": "iana" - }, - "application/clue+xml": { - "source": "iana", - "compressible": true - }, - "application/clue_info+xml": { - "source": "iana", - "compressible": true - }, - "application/cms": { - "source": "iana" - }, - "application/cnrp+xml": { - "source": "iana", - "compressible": true - }, - "application/coap-group+json": { - "source": "iana", - "compressible": true - }, - "application/coap-payload": { - "source": "iana" - }, - "application/commonground": { - "source": "iana" - }, - "application/conference-info+xml": { - "source": "iana", - "compressible": true - }, - "application/cose": { - "source": "iana" - }, - "application/cose-key": { - "source": "iana" - }, - "application/cose-key-set": { - "source": "iana" - }, - "application/cpl+xml": { - "source": "iana", - "compressible": true, - "extensions": ["cpl"] - }, - "application/csrattrs": { - "source": "iana" - }, - "application/csta+xml": { - "source": "iana", - "compressible": true - }, - "application/cstadata+xml": { - "source": "iana", - "compressible": true - }, - "application/csvm+json": { - "source": "iana", - "compressible": true - }, - "application/cu-seeme": { - "source": "apache", - "extensions": ["cu"] - }, - "application/cwt": { - "source": "iana" - }, - "application/cybercash": { - "source": "iana" - }, - "application/dart": { - "compressible": true - }, - "application/dash+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mpd"] - }, - "application/dash-patch+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mpp"] - }, - "application/dashdelta": { - "source": "iana" - }, - "application/davmount+xml": { - "source": "iana", - "compressible": true, - "extensions": ["davmount"] - }, - "application/dca-rft": { - "source": "iana" - }, - "application/dcd": { - "source": "iana" - }, - "application/dec-dx": { - "source": "iana" - }, - "application/dialog-info+xml": { - "source": "iana", - "compressible": true - }, - "application/dicom": { - "source": "iana" - }, - "application/dicom+json": { - "source": "iana", - "compressible": true - }, - "application/dicom+xml": { - "source": "iana", - "compressible": true - }, - "application/dii": { - "source": "iana" - }, - "application/dit": { - "source": "iana" - }, - "application/dns": { - "source": "iana" - }, - "application/dns+json": { - "source": "iana", - "compressible": true - }, - "application/dns-message": { - "source": "iana" - }, - "application/docbook+xml": { - "source": "apache", - "compressible": true, - "extensions": ["dbk"] - }, - "application/dots+cbor": { - "source": "iana" - }, - "application/dskpp+xml": { - "source": "iana", - "compressible": true - }, - "application/dssc+der": { - "source": "iana", - "extensions": ["dssc"] - }, - "application/dssc+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xdssc"] - }, - "application/dvcs": { - "source": "iana" - }, - "application/ecmascript": { - "source": "iana", - "compressible": true, - "extensions": ["es","ecma"] - }, - "application/edi-consent": { - "source": "iana" - }, - "application/edi-x12": { - "source": "iana", - "compressible": false - }, - "application/edifact": { - "source": "iana", - "compressible": false - }, - "application/efi": { - "source": "iana" - }, - "application/elm+json": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/elm+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.cap+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/emergencycalldata.comment+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.control+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.deviceinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.ecall.msd": { - "source": "iana" - }, - "application/emergencycalldata.providerinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.serviceinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.subscriberinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/emergencycalldata.veds+xml": { - "source": "iana", - "compressible": true - }, - "application/emma+xml": { - "source": "iana", - "compressible": true, - "extensions": ["emma"] - }, - "application/emotionml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["emotionml"] - }, - "application/encaprtp": { - "source": "iana" - }, - "application/epp+xml": { - "source": "iana", - "compressible": true - }, - "application/epub+zip": { - "source": "iana", - "compressible": false, - "extensions": ["epub"] - }, - "application/eshop": { - "source": "iana" - }, - "application/exi": { - "source": "iana", - "extensions": ["exi"] - }, - "application/expect-ct-report+json": { - "source": "iana", - "compressible": true - }, - "application/express": { - "source": "iana", - "extensions": ["exp"] - }, - "application/fastinfoset": { - "source": "iana" - }, - "application/fastsoap": { - "source": "iana" - }, - "application/fdt+xml": { - "source": "iana", - "compressible": true, - "extensions": ["fdt"] - }, - "application/fhir+json": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/fhir+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/fido.trusted-apps+json": { - "compressible": true - }, - "application/fits": { - "source": "iana" - }, - "application/flexfec": { - "source": "iana" - }, - "application/font-sfnt": { - "source": "iana" - }, - "application/font-tdpfr": { - "source": "iana", - "extensions": ["pfr"] - }, - "application/font-woff": { - "source": "iana", - "compressible": false - }, - "application/framework-attributes+xml": { - "source": "iana", - "compressible": true - }, - "application/geo+json": { - "source": "iana", - "compressible": true, - "extensions": ["geojson"] - }, - "application/geo+json-seq": { - "source": "iana" - }, - "application/geopackage+sqlite3": { - "source": "iana" - }, - "application/geoxacml+xml": { - "source": "iana", - "compressible": true - }, - "application/gltf-buffer": { - "source": "iana" - }, - "application/gml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["gml"] - }, - "application/gpx+xml": { - "source": "apache", - "compressible": true, - "extensions": ["gpx"] - }, - "application/gxf": { - "source": "apache", - "extensions": ["gxf"] - }, - "application/gzip": { - "source": "iana", - "compressible": false, - "extensions": ["gz"] - }, - "application/h224": { - "source": "iana" - }, - "application/held+xml": { - "source": "iana", - "compressible": true - }, - "application/hjson": { - "extensions": ["hjson"] - }, - "application/http": { - "source": "iana" - }, - "application/hyperstudio": { - "source": "iana", - "extensions": ["stk"] - }, - "application/ibe-key-request+xml": { - "source": "iana", - "compressible": true - }, - "application/ibe-pkg-reply+xml": { - "source": "iana", - "compressible": true - }, - "application/ibe-pp-data": { - "source": "iana" - }, - "application/iges": { - "source": "iana" - }, - "application/im-iscomposing+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/index": { - "source": "iana" - }, - "application/index.cmd": { - "source": "iana" - }, - "application/index.obj": { - "source": "iana" - }, - "application/index.response": { - "source": "iana" - }, - "application/index.vnd": { - "source": "iana" - }, - "application/inkml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["ink","inkml"] - }, - "application/iotp": { - "source": "iana" - }, - "application/ipfix": { - "source": "iana", - "extensions": ["ipfix"] - }, - "application/ipp": { - "source": "iana" - }, - "application/isup": { - "source": "iana" - }, - "application/its+xml": { - "source": "iana", - "compressible": true, - "extensions": ["its"] - }, - "application/java-archive": { - "source": "apache", - "compressible": false, - "extensions": ["jar","war","ear"] - }, - "application/java-serialized-object": { - "source": "apache", - "compressible": false, - "extensions": ["ser"] - }, - "application/java-vm": { - "source": "apache", - "compressible": false, - "extensions": ["class"] - }, - "application/javascript": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["js","mjs"] - }, - "application/jf2feed+json": { - "source": "iana", - "compressible": true - }, - "application/jose": { - "source": "iana" - }, - "application/jose+json": { - "source": "iana", - "compressible": true - }, - "application/jrd+json": { - "source": "iana", - "compressible": true - }, - "application/jscalendar+json": { - "source": "iana", - "compressible": true - }, - "application/json": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["json","map"] - }, - "application/json-patch+json": { - "source": "iana", - "compressible": true - }, - "application/json-seq": { - "source": "iana" - }, - "application/json5": { - "extensions": ["json5"] - }, - "application/jsonml+json": { - "source": "apache", - "compressible": true, - "extensions": ["jsonml"] - }, - "application/jwk+json": { - "source": "iana", - "compressible": true - }, - "application/jwk-set+json": { - "source": "iana", - "compressible": true - }, - "application/jwt": { - "source": "iana" - }, - "application/kpml-request+xml": { - "source": "iana", - "compressible": true - }, - "application/kpml-response+xml": { - "source": "iana", - "compressible": true - }, - "application/ld+json": { - "source": "iana", - "compressible": true, - "extensions": ["jsonld"] - }, - "application/lgr+xml": { - "source": "iana", - "compressible": true, - "extensions": ["lgr"] - }, - "application/link-format": { - "source": "iana" - }, - "application/load-control+xml": { - "source": "iana", - "compressible": true - }, - "application/lost+xml": { - "source": "iana", - "compressible": true, - "extensions": ["lostxml"] - }, - "application/lostsync+xml": { - "source": "iana", - "compressible": true - }, - "application/lpf+zip": { - "source": "iana", - "compressible": false - }, - "application/lxf": { - "source": "iana" - }, - "application/mac-binhex40": { - "source": "iana", - "extensions": ["hqx"] - }, - "application/mac-compactpro": { - "source": "apache", - "extensions": ["cpt"] - }, - "application/macwriteii": { - "source": "iana" - }, - "application/mads+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mads"] - }, - "application/manifest+json": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["webmanifest"] - }, - "application/marc": { - "source": "iana", - "extensions": ["mrc"] - }, - "application/marcxml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mrcx"] - }, - "application/mathematica": { - "source": "iana", - "extensions": ["ma","nb","mb"] - }, - "application/mathml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mathml"] - }, - "application/mathml-content+xml": { - "source": "iana", - "compressible": true - }, - "application/mathml-presentation+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-associated-procedure-description+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-deregister+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-envelope+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-msk+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-msk-response+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-protection-description+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-reception-report+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-register+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-register-response+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-schedule+xml": { - "source": "iana", - "compressible": true - }, - "application/mbms-user-service-description+xml": { - "source": "iana", - "compressible": true - }, - "application/mbox": { - "source": "iana", - "extensions": ["mbox"] - }, - "application/media-policy-dataset+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mpf"] - }, - "application/media_control+xml": { - "source": "iana", - "compressible": true - }, - "application/mediaservercontrol+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mscml"] - }, - "application/merge-patch+json": { - "source": "iana", - "compressible": true - }, - "application/metalink+xml": { - "source": "apache", - "compressible": true, - "extensions": ["metalink"] - }, - "application/metalink4+xml": { - "source": "iana", - "compressible": true, - "extensions": ["meta4"] - }, - "application/mets+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mets"] - }, - "application/mf4": { - "source": "iana" - }, - "application/mikey": { - "source": "iana" - }, - "application/mipc": { - "source": "iana" - }, - "application/missing-blocks+cbor-seq": { - "source": "iana" - }, - "application/mmt-aei+xml": { - "source": "iana", - "compressible": true, - "extensions": ["maei"] - }, - "application/mmt-usd+xml": { - "source": "iana", - "compressible": true, - "extensions": ["musd"] - }, - "application/mods+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mods"] - }, - "application/moss-keys": { - "source": "iana" - }, - "application/moss-signature": { - "source": "iana" - }, - "application/mosskey-data": { - "source": "iana" - }, - "application/mosskey-request": { - "source": "iana" - }, - "application/mp21": { - "source": "iana", - "extensions": ["m21","mp21"] - }, - "application/mp4": { - "source": "iana", - "extensions": ["mp4s","m4p"] - }, - "application/mpeg4-generic": { - "source": "iana" - }, - "application/mpeg4-iod": { - "source": "iana" - }, - "application/mpeg4-iod-xmt": { - "source": "iana" - }, - "application/mrb-consumer+xml": { - "source": "iana", - "compressible": true - }, - "application/mrb-publish+xml": { - "source": "iana", - "compressible": true - }, - "application/msc-ivr+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/msc-mixer+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/msword": { - "source": "iana", - "compressible": false, - "extensions": ["doc","dot"] - }, - "application/mud+json": { - "source": "iana", - "compressible": true - }, - "application/multipart-core": { - "source": "iana" - }, - "application/mxf": { - "source": "iana", - "extensions": ["mxf"] - }, - "application/n-quads": { - "source": "iana", - "extensions": ["nq"] - }, - "application/n-triples": { - "source": "iana", - "extensions": ["nt"] - }, - "application/nasdata": { - "source": "iana" - }, - "application/news-checkgroups": { - "source": "iana", - "charset": "US-ASCII" - }, - "application/news-groupinfo": { - "source": "iana", - "charset": "US-ASCII" - }, - "application/news-transmission": { - "source": "iana" - }, - "application/nlsml+xml": { - "source": "iana", - "compressible": true - }, - "application/node": { - "source": "iana", - "extensions": ["cjs"] - }, - "application/nss": { - "source": "iana" - }, - "application/oauth-authz-req+jwt": { - "source": "iana" - }, - "application/oblivious-dns-message": { - "source": "iana" - }, - "application/ocsp-request": { - "source": "iana" - }, - "application/ocsp-response": { - "source": "iana" - }, - "application/octet-stream": { - "source": "iana", - "compressible": false, - "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"] - }, - "application/oda": { - "source": "iana", - "extensions": ["oda"] - }, - "application/odm+xml": { - "source": "iana", - "compressible": true - }, - "application/odx": { - "source": "iana" - }, - "application/oebps-package+xml": { - "source": "iana", - "compressible": true, - "extensions": ["opf"] - }, - "application/ogg": { - "source": "iana", - "compressible": false, - "extensions": ["ogx"] - }, - "application/omdoc+xml": { - "source": "apache", - "compressible": true, - "extensions": ["omdoc"] - }, - "application/onenote": { - "source": "apache", - "extensions": ["onetoc","onetoc2","onetmp","onepkg"] - }, - "application/opc-nodeset+xml": { - "source": "iana", - "compressible": true - }, - "application/oscore": { - "source": "iana" - }, - "application/oxps": { - "source": "iana", - "extensions": ["oxps"] - }, - "application/p21": { - "source": "iana" - }, - "application/p21+zip": { - "source": "iana", - "compressible": false - }, - "application/p2p-overlay+xml": { - "source": "iana", - "compressible": true, - "extensions": ["relo"] - }, - "application/parityfec": { - "source": "iana" - }, - "application/passport": { - "source": "iana" - }, - "application/patch-ops-error+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xer"] - }, - "application/pdf": { - "source": "iana", - "compressible": false, - "extensions": ["pdf"] - }, - "application/pdx": { - "source": "iana" - }, - "application/pem-certificate-chain": { - "source": "iana" - }, - "application/pgp-encrypted": { - "source": "iana", - "compressible": false, - "extensions": ["pgp"] - }, - "application/pgp-keys": { - "source": "iana", - "extensions": ["asc"] - }, - "application/pgp-signature": { - "source": "iana", - "extensions": ["asc","sig"] - }, - "application/pics-rules": { - "source": "apache", - "extensions": ["prf"] - }, - "application/pidf+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/pidf-diff+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/pkcs10": { - "source": "iana", - "extensions": ["p10"] - }, - "application/pkcs12": { - "source": "iana" - }, - "application/pkcs7-mime": { - "source": "iana", - "extensions": ["p7m","p7c"] - }, - "application/pkcs7-signature": { - "source": "iana", - "extensions": ["p7s"] - }, - "application/pkcs8": { - "source": "iana", - "extensions": ["p8"] - }, - "application/pkcs8-encrypted": { - "source": "iana" - }, - "application/pkix-attr-cert": { - "source": "iana", - "extensions": ["ac"] - }, - "application/pkix-cert": { - "source": "iana", - "extensions": ["cer"] - }, - "application/pkix-crl": { - "source": "iana", - "extensions": ["crl"] - }, - "application/pkix-pkipath": { - "source": "iana", - "extensions": ["pkipath"] - }, - "application/pkixcmp": { - "source": "iana", - "extensions": ["pki"] - }, - "application/pls+xml": { - "source": "iana", - "compressible": true, - "extensions": ["pls"] - }, - "application/poc-settings+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/postscript": { - "source": "iana", - "compressible": true, - "extensions": ["ai","eps","ps"] - }, - "application/ppsp-tracker+json": { - "source": "iana", - "compressible": true - }, - "application/problem+json": { - "source": "iana", - "compressible": true - }, - "application/problem+xml": { - "source": "iana", - "compressible": true - }, - "application/provenance+xml": { - "source": "iana", - "compressible": true, - "extensions": ["provx"] - }, - "application/prs.alvestrand.titrax-sheet": { - "source": "iana" - }, - "application/prs.cww": { - "source": "iana", - "extensions": ["cww"] - }, - "application/prs.cyn": { - "source": "iana", - "charset": "7-BIT" - }, - "application/prs.hpub+zip": { - "source": "iana", - "compressible": false - }, - "application/prs.nprend": { - "source": "iana" - }, - "application/prs.plucker": { - "source": "iana" - }, - "application/prs.rdf-xml-crypt": { - "source": "iana" - }, - "application/prs.xsf+xml": { - "source": "iana", - "compressible": true - }, - "application/pskc+xml": { - "source": "iana", - "compressible": true, - "extensions": ["pskcxml"] - }, - "application/pvd+json": { - "source": "iana", - "compressible": true - }, - "application/qsig": { - "source": "iana" - }, - "application/raml+yaml": { - "compressible": true, - "extensions": ["raml"] - }, - "application/raptorfec": { - "source": "iana" - }, - "application/rdap+json": { - "source": "iana", - "compressible": true - }, - "application/rdf+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rdf","owl"] - }, - "application/reginfo+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rif"] - }, - "application/relax-ng-compact-syntax": { - "source": "iana", - "extensions": ["rnc"] - }, - "application/remote-printing": { - "source": "iana" - }, - "application/reputon+json": { - "source": "iana", - "compressible": true - }, - "application/resource-lists+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rl"] - }, - "application/resource-lists-diff+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rld"] - }, - "application/rfc+xml": { - "source": "iana", - "compressible": true - }, - "application/riscos": { - "source": "iana" - }, - "application/rlmi+xml": { - "source": "iana", - "compressible": true - }, - "application/rls-services+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rs"] - }, - "application/route-apd+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rapd"] - }, - "application/route-s-tsid+xml": { - "source": "iana", - "compressible": true, - "extensions": ["sls"] - }, - "application/route-usd+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rusd"] - }, - "application/rpki-ghostbusters": { - "source": "iana", - "extensions": ["gbr"] - }, - "application/rpki-manifest": { - "source": "iana", - "extensions": ["mft"] - }, - "application/rpki-publication": { - "source": "iana" - }, - "application/rpki-roa": { - "source": "iana", - "extensions": ["roa"] - }, - "application/rpki-updown": { - "source": "iana" - }, - "application/rsd+xml": { - "source": "apache", - "compressible": true, - "extensions": ["rsd"] - }, - "application/rss+xml": { - "source": "apache", - "compressible": true, - "extensions": ["rss"] - }, - "application/rtf": { - "source": "iana", - "compressible": true, - "extensions": ["rtf"] - }, - "application/rtploopback": { - "source": "iana" - }, - "application/rtx": { - "source": "iana" - }, - "application/samlassertion+xml": { - "source": "iana", - "compressible": true - }, - "application/samlmetadata+xml": { - "source": "iana", - "compressible": true - }, - "application/sarif+json": { - "source": "iana", - "compressible": true - }, - "application/sarif-external-properties+json": { - "source": "iana", - "compressible": true - }, - "application/sbe": { - "source": "iana" - }, - "application/sbml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["sbml"] - }, - "application/scaip+xml": { - "source": "iana", - "compressible": true - }, - "application/scim+json": { - "source": "iana", - "compressible": true - }, - "application/scvp-cv-request": { - "source": "iana", - "extensions": ["scq"] - }, - "application/scvp-cv-response": { - "source": "iana", - "extensions": ["scs"] - }, - "application/scvp-vp-request": { - "source": "iana", - "extensions": ["spq"] - }, - "application/scvp-vp-response": { - "source": "iana", - "extensions": ["spp"] - }, - "application/sdp": { - "source": "iana", - "extensions": ["sdp"] - }, - "application/secevent+jwt": { - "source": "iana" - }, - "application/senml+cbor": { - "source": "iana" - }, - "application/senml+json": { - "source": "iana", - "compressible": true - }, - "application/senml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["senmlx"] - }, - "application/senml-etch+cbor": { - "source": "iana" - }, - "application/senml-etch+json": { - "source": "iana", - "compressible": true - }, - "application/senml-exi": { - "source": "iana" - }, - "application/sensml+cbor": { - "source": "iana" - }, - "application/sensml+json": { - "source": "iana", - "compressible": true - }, - "application/sensml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["sensmlx"] - }, - "application/sensml-exi": { - "source": "iana" - }, - "application/sep+xml": { - "source": "iana", - "compressible": true - }, - "application/sep-exi": { - "source": "iana" - }, - "application/session-info": { - "source": "iana" - }, - "application/set-payment": { - "source": "iana" - }, - "application/set-payment-initiation": { - "source": "iana", - "extensions": ["setpay"] - }, - "application/set-registration": { - "source": "iana" - }, - "application/set-registration-initiation": { - "source": "iana", - "extensions": ["setreg"] - }, - "application/sgml": { - "source": "iana" - }, - "application/sgml-open-catalog": { - "source": "iana" - }, - "application/shf+xml": { - "source": "iana", - "compressible": true, - "extensions": ["shf"] - }, - "application/sieve": { - "source": "iana", - "extensions": ["siv","sieve"] - }, - "application/simple-filter+xml": { - "source": "iana", - "compressible": true - }, - "application/simple-message-summary": { - "source": "iana" - }, - "application/simplesymbolcontainer": { - "source": "iana" - }, - "application/sipc": { - "source": "iana" - }, - "application/slate": { - "source": "iana" - }, - "application/smil": { - "source": "iana" - }, - "application/smil+xml": { - "source": "iana", - "compressible": true, - "extensions": ["smi","smil"] - }, - "application/smpte336m": { - "source": "iana" - }, - "application/soap+fastinfoset": { - "source": "iana" - }, - "application/soap+xml": { - "source": "iana", - "compressible": true - }, - "application/sparql-query": { - "source": "iana", - "extensions": ["rq"] - }, - "application/sparql-results+xml": { - "source": "iana", - "compressible": true, - "extensions": ["srx"] - }, - "application/spdx+json": { - "source": "iana", - "compressible": true - }, - "application/spirits-event+xml": { - "source": "iana", - "compressible": true - }, - "application/sql": { - "source": "iana" - }, - "application/srgs": { - "source": "iana", - "extensions": ["gram"] - }, - "application/srgs+xml": { - "source": "iana", - "compressible": true, - "extensions": ["grxml"] - }, - "application/sru+xml": { - "source": "iana", - "compressible": true, - "extensions": ["sru"] - }, - "application/ssdl+xml": { - "source": "apache", - "compressible": true, - "extensions": ["ssdl"] - }, - "application/ssml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["ssml"] - }, - "application/stix+json": { - "source": "iana", - "compressible": true - }, - "application/swid+xml": { - "source": "iana", - "compressible": true, - "extensions": ["swidtag"] - }, - "application/tamp-apex-update": { - "source": "iana" - }, - "application/tamp-apex-update-confirm": { - "source": "iana" - }, - "application/tamp-community-update": { - "source": "iana" - }, - "application/tamp-community-update-confirm": { - "source": "iana" - }, - "application/tamp-error": { - "source": "iana" - }, - "application/tamp-sequence-adjust": { - "source": "iana" - }, - "application/tamp-sequence-adjust-confirm": { - "source": "iana" - }, - "application/tamp-status-query": { - "source": "iana" - }, - "application/tamp-status-response": { - "source": "iana" - }, - "application/tamp-update": { - "source": "iana" - }, - "application/tamp-update-confirm": { - "source": "iana" - }, - "application/tar": { - "compressible": true - }, - "application/taxii+json": { - "source": "iana", - "compressible": true - }, - "application/td+json": { - "source": "iana", - "compressible": true - }, - "application/tei+xml": { - "source": "iana", - "compressible": true, - "extensions": ["tei","teicorpus"] - }, - "application/tetra_isi": { - "source": "iana" - }, - "application/thraud+xml": { - "source": "iana", - "compressible": true, - "extensions": ["tfi"] - }, - "application/timestamp-query": { - "source": "iana" - }, - "application/timestamp-reply": { - "source": "iana" - }, - "application/timestamped-data": { - "source": "iana", - "extensions": ["tsd"] - }, - "application/tlsrpt+gzip": { - "source": "iana" - }, - "application/tlsrpt+json": { - "source": "iana", - "compressible": true - }, - "application/tnauthlist": { - "source": "iana" - }, - "application/token-introspection+jwt": { - "source": "iana" - }, - "application/toml": { - "compressible": true, - "extensions": ["toml"] - }, - "application/trickle-ice-sdpfrag": { - "source": "iana" - }, - "application/trig": { - "source": "iana", - "extensions": ["trig"] - }, - "application/ttml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["ttml"] - }, - "application/tve-trigger": { - "source": "iana" - }, - "application/tzif": { - "source": "iana" - }, - "application/tzif-leap": { - "source": "iana" - }, - "application/ubjson": { - "compressible": false, - "extensions": ["ubj"] - }, - "application/ulpfec": { - "source": "iana" - }, - "application/urc-grpsheet+xml": { - "source": "iana", - "compressible": true - }, - "application/urc-ressheet+xml": { - "source": "iana", - "compressible": true, - "extensions": ["rsheet"] - }, - "application/urc-targetdesc+xml": { - "source": "iana", - "compressible": true, - "extensions": ["td"] - }, - "application/urc-uisocketdesc+xml": { - "source": "iana", - "compressible": true - }, - "application/vcard+json": { - "source": "iana", - "compressible": true - }, - "application/vcard+xml": { - "source": "iana", - "compressible": true - }, - "application/vemmi": { - "source": "iana" - }, - "application/vividence.scriptfile": { - "source": "apache" - }, - "application/vnd.1000minds.decision-model+xml": { - "source": "iana", - "compressible": true, - "extensions": ["1km"] - }, - "application/vnd.3gpp-prose+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp-prose-pc3ch+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp-v2x-local-service-information": { - "source": "iana" - }, - "application/vnd.3gpp.5gnas": { - "source": "iana" - }, - "application/vnd.3gpp.access-transfer-events+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.bsf+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.gmop+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.gtpc": { - "source": "iana" - }, - "application/vnd.3gpp.interworking-data": { - "source": "iana" - }, - "application/vnd.3gpp.lpp": { - "source": "iana" - }, - "application/vnd.3gpp.mc-signalling-ear": { - "source": "iana" - }, - "application/vnd.3gpp.mcdata-affiliation-command+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcdata-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcdata-payload": { - "source": "iana" - }, - "application/vnd.3gpp.mcdata-service-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcdata-signalling": { - "source": "iana" - }, - "application/vnd.3gpp.mcdata-ue-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcdata-user-profile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-affiliation-command+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-floor-request+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-location-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-mbms-usage-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-service-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-signed+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-ue-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-ue-init-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcptt-user-profile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-affiliation-command+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-affiliation-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-location-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-mbms-usage-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-service-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-transmission-request+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-ue-config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mcvideo-user-profile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.mid-call+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.ngap": { - "source": "iana" - }, - "application/vnd.3gpp.pfcp": { - "source": "iana" - }, - "application/vnd.3gpp.pic-bw-large": { - "source": "iana", - "extensions": ["plb"] - }, - "application/vnd.3gpp.pic-bw-small": { - "source": "iana", - "extensions": ["psb"] - }, - "application/vnd.3gpp.pic-bw-var": { - "source": "iana", - "extensions": ["pvb"] - }, - "application/vnd.3gpp.s1ap": { - "source": "iana" - }, - "application/vnd.3gpp.sms": { - "source": "iana" - }, - "application/vnd.3gpp.sms+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.srvcc-ext+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.srvcc-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.state-and-event-info+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp.ussd+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp2.bcmcsinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.3gpp2.sms": { - "source": "iana" - }, - "application/vnd.3gpp2.tcap": { - "source": "iana", - "extensions": ["tcap"] - }, - "application/vnd.3lightssoftware.imagescal": { - "source": "iana" - }, - "application/vnd.3m.post-it-notes": { - "source": "iana", - "extensions": ["pwn"] - }, - "application/vnd.accpac.simply.aso": { - "source": "iana", - "extensions": ["aso"] - }, - "application/vnd.accpac.simply.imp": { - "source": "iana", - "extensions": ["imp"] - }, - "application/vnd.acucobol": { - "source": "iana", - "extensions": ["acu"] - }, - "application/vnd.acucorp": { - "source": "iana", - "extensions": ["atc","acutc"] - }, - "application/vnd.adobe.air-application-installer-package+zip": { - "source": "apache", - "compressible": false, - "extensions": ["air"] - }, - "application/vnd.adobe.flash.movie": { - "source": "iana" - }, - "application/vnd.adobe.formscentral.fcdt": { - "source": "iana", - "extensions": ["fcdt"] - }, - "application/vnd.adobe.fxp": { - "source": "iana", - "extensions": ["fxp","fxpl"] - }, - "application/vnd.adobe.partial-upload": { - "source": "iana" - }, - "application/vnd.adobe.xdp+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xdp"] - }, - "application/vnd.adobe.xfdf": { - "source": "iana", - "extensions": ["xfdf"] - }, - "application/vnd.aether.imp": { - "source": "iana" - }, - "application/vnd.afpc.afplinedata": { - "source": "iana" - }, - "application/vnd.afpc.afplinedata-pagedef": { - "source": "iana" - }, - "application/vnd.afpc.cmoca-cmresource": { - "source": "iana" - }, - "application/vnd.afpc.foca-charset": { - "source": "iana" - }, - "application/vnd.afpc.foca-codedfont": { - "source": "iana" - }, - "application/vnd.afpc.foca-codepage": { - "source": "iana" - }, - "application/vnd.afpc.modca": { - "source": "iana" - }, - "application/vnd.afpc.modca-cmtable": { - "source": "iana" - }, - "application/vnd.afpc.modca-formdef": { - "source": "iana" - }, - "application/vnd.afpc.modca-mediummap": { - "source": "iana" - }, - "application/vnd.afpc.modca-objectcontainer": { - "source": "iana" - }, - "application/vnd.afpc.modca-overlay": { - "source": "iana" - }, - "application/vnd.afpc.modca-pagesegment": { - "source": "iana" - }, - "application/vnd.age": { - "source": "iana", - "extensions": ["age"] - }, - "application/vnd.ah-barcode": { - "source": "iana" - }, - "application/vnd.ahead.space": { - "source": "iana", - "extensions": ["ahead"] - }, - "application/vnd.airzip.filesecure.azf": { - "source": "iana", - "extensions": ["azf"] - }, - "application/vnd.airzip.filesecure.azs": { - "source": "iana", - "extensions": ["azs"] - }, - "application/vnd.amadeus+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.amazon.ebook": { - "source": "apache", - "extensions": ["azw"] - }, - "application/vnd.amazon.mobi8-ebook": { - "source": "iana" - }, - "application/vnd.americandynamics.acc": { - "source": "iana", - "extensions": ["acc"] - }, - "application/vnd.amiga.ami": { - "source": "iana", - "extensions": ["ami"] - }, - "application/vnd.amundsen.maze+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.android.ota": { - "source": "iana" - }, - "application/vnd.android.package-archive": { - "source": "apache", - "compressible": false, - "extensions": ["apk"] - }, - "application/vnd.anki": { - "source": "iana" - }, - "application/vnd.anser-web-certificate-issue-initiation": { - "source": "iana", - "extensions": ["cii"] - }, - "application/vnd.anser-web-funds-transfer-initiation": { - "source": "apache", - "extensions": ["fti"] - }, - "application/vnd.antix.game-component": { - "source": "iana", - "extensions": ["atx"] - }, - "application/vnd.apache.arrow.file": { - "source": "iana" - }, - "application/vnd.apache.arrow.stream": { - "source": "iana" - }, - "application/vnd.apache.thrift.binary": { - "source": "iana" - }, - "application/vnd.apache.thrift.compact": { - "source": "iana" - }, - "application/vnd.apache.thrift.json": { - "source": "iana" - }, - "application/vnd.api+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.aplextor.warrp+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.apothekende.reservation+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.apple.installer+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mpkg"] - }, - "application/vnd.apple.keynote": { - "source": "iana", - "extensions": ["key"] - }, - "application/vnd.apple.mpegurl": { - "source": "iana", - "extensions": ["m3u8"] - }, - "application/vnd.apple.numbers": { - "source": "iana", - "extensions": ["numbers"] - }, - "application/vnd.apple.pages": { - "source": "iana", - "extensions": ["pages"] - }, - "application/vnd.apple.pkpass": { - "compressible": false, - "extensions": ["pkpass"] - }, - "application/vnd.arastra.swi": { - "source": "iana" - }, - "application/vnd.aristanetworks.swi": { - "source": "iana", - "extensions": ["swi"] - }, - "application/vnd.artisan+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.artsquare": { - "source": "iana" - }, - "application/vnd.astraea-software.iota": { - "source": "iana", - "extensions": ["iota"] - }, - "application/vnd.audiograph": { - "source": "iana", - "extensions": ["aep"] - }, - "application/vnd.autopackage": { - "source": "iana" - }, - "application/vnd.avalon+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.avistar+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.balsamiq.bmml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["bmml"] - }, - "application/vnd.balsamiq.bmpr": { - "source": "iana" - }, - "application/vnd.banana-accounting": { - "source": "iana" - }, - "application/vnd.bbf.usp.error": { - "source": "iana" - }, - "application/vnd.bbf.usp.msg": { - "source": "iana" - }, - "application/vnd.bbf.usp.msg+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.bekitzur-stech+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.bint.med-content": { - "source": "iana" - }, - "application/vnd.biopax.rdf+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.blink-idb-value-wrapper": { - "source": "iana" - }, - "application/vnd.blueice.multipass": { - "source": "iana", - "extensions": ["mpm"] - }, - "application/vnd.bluetooth.ep.oob": { - "source": "iana" - }, - "application/vnd.bluetooth.le.oob": { - "source": "iana" - }, - "application/vnd.bmi": { - "source": "iana", - "extensions": ["bmi"] - }, - "application/vnd.bpf": { - "source": "iana" - }, - "application/vnd.bpf3": { - "source": "iana" - }, - "application/vnd.businessobjects": { - "source": "iana", - "extensions": ["rep"] - }, - "application/vnd.byu.uapi+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.cab-jscript": { - "source": "iana" - }, - "application/vnd.canon-cpdl": { - "source": "iana" - }, - "application/vnd.canon-lips": { - "source": "iana" - }, - "application/vnd.capasystems-pg+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.cendio.thinlinc.clientconf": { - "source": "iana" - }, - "application/vnd.century-systems.tcp_stream": { - "source": "iana" - }, - "application/vnd.chemdraw+xml": { - "source": "iana", - "compressible": true, - "extensions": ["cdxml"] - }, - "application/vnd.chess-pgn": { - "source": "iana" - }, - "application/vnd.chipnuts.karaoke-mmd": { - "source": "iana", - "extensions": ["mmd"] - }, - "application/vnd.ciedi": { - "source": "iana" - }, - "application/vnd.cinderella": { - "source": "iana", - "extensions": ["cdy"] - }, - "application/vnd.cirpack.isdn-ext": { - "source": "iana" - }, - "application/vnd.citationstyles.style+xml": { - "source": "iana", - "compressible": true, - "extensions": ["csl"] - }, - "application/vnd.claymore": { - "source": "iana", - "extensions": ["cla"] - }, - "application/vnd.cloanto.rp9": { - "source": "iana", - "extensions": ["rp9"] - }, - "application/vnd.clonk.c4group": { - "source": "iana", - "extensions": ["c4g","c4d","c4f","c4p","c4u"] - }, - "application/vnd.cluetrust.cartomobile-config": { - "source": "iana", - "extensions": ["c11amc"] - }, - "application/vnd.cluetrust.cartomobile-config-pkg": { - "source": "iana", - "extensions": ["c11amz"] - }, - "application/vnd.coffeescript": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.document": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.document-template": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.presentation": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.presentation-template": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.spreadsheet": { - "source": "iana" - }, - "application/vnd.collabio.xodocuments.spreadsheet-template": { - "source": "iana" - }, - "application/vnd.collection+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.collection.doc+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.collection.next+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.comicbook+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.comicbook-rar": { - "source": "iana" - }, - "application/vnd.commerce-battelle": { - "source": "iana" - }, - "application/vnd.commonspace": { - "source": "iana", - "extensions": ["csp"] - }, - "application/vnd.contact.cmsg": { - "source": "iana", - "extensions": ["cdbcmsg"] - }, - "application/vnd.coreos.ignition+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.cosmocaller": { - "source": "iana", - "extensions": ["cmc"] - }, - "application/vnd.crick.clicker": { - "source": "iana", - "extensions": ["clkx"] - }, - "application/vnd.crick.clicker.keyboard": { - "source": "iana", - "extensions": ["clkk"] - }, - "application/vnd.crick.clicker.palette": { - "source": "iana", - "extensions": ["clkp"] - }, - "application/vnd.crick.clicker.template": { - "source": "iana", - "extensions": ["clkt"] - }, - "application/vnd.crick.clicker.wordbank": { - "source": "iana", - "extensions": ["clkw"] - }, - "application/vnd.criticaltools.wbs+xml": { - "source": "iana", - "compressible": true, - "extensions": ["wbs"] - }, - "application/vnd.cryptii.pipe+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.crypto-shade-file": { - "source": "iana" - }, - "application/vnd.cryptomator.encrypted": { - "source": "iana" - }, - "application/vnd.cryptomator.vault": { - "source": "iana" - }, - "application/vnd.ctc-posml": { - "source": "iana", - "extensions": ["pml"] - }, - "application/vnd.ctct.ws+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.cups-pdf": { - "source": "iana" - }, - "application/vnd.cups-postscript": { - "source": "iana" - }, - "application/vnd.cups-ppd": { - "source": "iana", - "extensions": ["ppd"] - }, - "application/vnd.cups-raster": { - "source": "iana" - }, - "application/vnd.cups-raw": { - "source": "iana" - }, - "application/vnd.curl": { - "source": "iana" - }, - "application/vnd.curl.car": { - "source": "apache", - "extensions": ["car"] - }, - "application/vnd.curl.pcurl": { - "source": "apache", - "extensions": ["pcurl"] - }, - "application/vnd.cyan.dean.root+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.cybank": { - "source": "iana" - }, - "application/vnd.cyclonedx+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.cyclonedx+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.d2l.coursepackage1p0+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.d3m-dataset": { - "source": "iana" - }, - "application/vnd.d3m-problem": { - "source": "iana" - }, - "application/vnd.dart": { - "source": "iana", - "compressible": true, - "extensions": ["dart"] - }, - "application/vnd.data-vision.rdz": { - "source": "iana", - "extensions": ["rdz"] - }, - "application/vnd.datapackage+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.dataresource+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.dbf": { - "source": "iana", - "extensions": ["dbf"] - }, - "application/vnd.debian.binary-package": { - "source": "iana" - }, - "application/vnd.dece.data": { - "source": "iana", - "extensions": ["uvf","uvvf","uvd","uvvd"] - }, - "application/vnd.dece.ttml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["uvt","uvvt"] - }, - "application/vnd.dece.unspecified": { - "source": "iana", - "extensions": ["uvx","uvvx"] - }, - "application/vnd.dece.zip": { - "source": "iana", - "extensions": ["uvz","uvvz"] - }, - "application/vnd.denovo.fcselayout-link": { - "source": "iana", - "extensions": ["fe_launch"] - }, - "application/vnd.desmume.movie": { - "source": "iana" - }, - "application/vnd.dir-bi.plate-dl-nosuffix": { - "source": "iana" - }, - "application/vnd.dm.delegation+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dna": { - "source": "iana", - "extensions": ["dna"] - }, - "application/vnd.document+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.dolby.mlp": { - "source": "apache", - "extensions": ["mlp"] - }, - "application/vnd.dolby.mobile.1": { - "source": "iana" - }, - "application/vnd.dolby.mobile.2": { - "source": "iana" - }, - "application/vnd.doremir.scorecloud-binary-document": { - "source": "iana" - }, - "application/vnd.dpgraph": { - "source": "iana", - "extensions": ["dpg"] - }, - "application/vnd.dreamfactory": { - "source": "iana", - "extensions": ["dfac"] - }, - "application/vnd.drive+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ds-keypoint": { - "source": "apache", - "extensions": ["kpxx"] - }, - "application/vnd.dtg.local": { - "source": "iana" - }, - "application/vnd.dtg.local.flash": { - "source": "iana" - }, - "application/vnd.dtg.local.html": { - "source": "iana" - }, - "application/vnd.dvb.ait": { - "source": "iana", - "extensions": ["ait"] - }, - "application/vnd.dvb.dvbisl+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.dvbj": { - "source": "iana" - }, - "application/vnd.dvb.esgcontainer": { - "source": "iana" - }, - "application/vnd.dvb.ipdcdftnotifaccess": { - "source": "iana" - }, - "application/vnd.dvb.ipdcesgaccess": { - "source": "iana" - }, - "application/vnd.dvb.ipdcesgaccess2": { - "source": "iana" - }, - "application/vnd.dvb.ipdcesgpdd": { - "source": "iana" - }, - "application/vnd.dvb.ipdcroaming": { - "source": "iana" - }, - "application/vnd.dvb.iptv.alfec-base": { - "source": "iana" - }, - "application/vnd.dvb.iptv.alfec-enhancement": { - "source": "iana" - }, - "application/vnd.dvb.notif-aggregate-root+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-container+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-generic+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-ia-msglist+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-ia-registration-request+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-ia-registration-response+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.notif-init+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.dvb.pfr": { - "source": "iana" - }, - "application/vnd.dvb.service": { - "source": "iana", - "extensions": ["svc"] - }, - "application/vnd.dxr": { - "source": "iana" - }, - "application/vnd.dynageo": { - "source": "iana", - "extensions": ["geo"] - }, - "application/vnd.dzr": { - "source": "iana" - }, - "application/vnd.easykaraoke.cdgdownload": { - "source": "iana" - }, - "application/vnd.ecdis-update": { - "source": "iana" - }, - "application/vnd.ecip.rlp": { - "source": "iana" - }, - "application/vnd.eclipse.ditto+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ecowin.chart": { - "source": "iana", - "extensions": ["mag"] - }, - "application/vnd.ecowin.filerequest": { - "source": "iana" - }, - "application/vnd.ecowin.fileupdate": { - "source": "iana" - }, - "application/vnd.ecowin.series": { - "source": "iana" - }, - "application/vnd.ecowin.seriesrequest": { - "source": "iana" - }, - "application/vnd.ecowin.seriesupdate": { - "source": "iana" - }, - "application/vnd.efi.img": { - "source": "iana" - }, - "application/vnd.efi.iso": { - "source": "iana" - }, - "application/vnd.emclient.accessrequest+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.enliven": { - "source": "iana", - "extensions": ["nml"] - }, - "application/vnd.enphase.envoy": { - "source": "iana" - }, - "application/vnd.eprints.data+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.epson.esf": { - "source": "iana", - "extensions": ["esf"] - }, - "application/vnd.epson.msf": { - "source": "iana", - "extensions": ["msf"] - }, - "application/vnd.epson.quickanime": { - "source": "iana", - "extensions": ["qam"] - }, - "application/vnd.epson.salt": { - "source": "iana", - "extensions": ["slt"] - }, - "application/vnd.epson.ssf": { - "source": "iana", - "extensions": ["ssf"] - }, - "application/vnd.ericsson.quickcall": { - "source": "iana" - }, - "application/vnd.espass-espass+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.eszigno3+xml": { - "source": "iana", - "compressible": true, - "extensions": ["es3","et3"] - }, - "application/vnd.etsi.aoc+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.asic-e+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.etsi.asic-s+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.etsi.cug+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvcommand+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvdiscovery+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvprofile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvsad-bc+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvsad-cod+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvsad-npvr+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvservice+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvsync+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.iptvueprofile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.mcid+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.mheg5": { - "source": "iana" - }, - "application/vnd.etsi.overload-control-policy-dataset+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.pstn+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.sci+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.simservs+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.timestamp-token": { - "source": "iana" - }, - "application/vnd.etsi.tsl+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.etsi.tsl.der": { - "source": "iana" - }, - "application/vnd.eu.kasparian.car+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.eudora.data": { - "source": "iana" - }, - "application/vnd.evolv.ecig.profile": { - "source": "iana" - }, - "application/vnd.evolv.ecig.settings": { - "source": "iana" - }, - "application/vnd.evolv.ecig.theme": { - "source": "iana" - }, - "application/vnd.exstream-empower+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.exstream-package": { - "source": "iana" - }, - "application/vnd.ezpix-album": { - "source": "iana", - "extensions": ["ez2"] - }, - "application/vnd.ezpix-package": { - "source": "iana", - "extensions": ["ez3"] - }, - "application/vnd.f-secure.mobile": { - "source": "iana" - }, - "application/vnd.familysearch.gedcom+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.fastcopy-disk-image": { - "source": "iana" - }, - "application/vnd.fdf": { - "source": "iana", - "extensions": ["fdf"] - }, - "application/vnd.fdsn.mseed": { - "source": "iana", - "extensions": ["mseed"] - }, - "application/vnd.fdsn.seed": { - "source": "iana", - "extensions": ["seed","dataless"] - }, - "application/vnd.ffsns": { - "source": "iana" - }, - "application/vnd.ficlab.flb+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.filmit.zfc": { - "source": "iana" - }, - "application/vnd.fints": { - "source": "iana" - }, - "application/vnd.firemonkeys.cloudcell": { - "source": "iana" - }, - "application/vnd.flographit": { - "source": "iana", - "extensions": ["gph"] - }, - "application/vnd.fluxtime.clip": { - "source": "iana", - "extensions": ["ftc"] - }, - "application/vnd.font-fontforge-sfd": { - "source": "iana" - }, - "application/vnd.framemaker": { - "source": "iana", - "extensions": ["fm","frame","maker","book"] - }, - "application/vnd.frogans.fnc": { - "source": "iana", - "extensions": ["fnc"] - }, - "application/vnd.frogans.ltf": { - "source": "iana", - "extensions": ["ltf"] - }, - "application/vnd.fsc.weblaunch": { - "source": "iana", - "extensions": ["fsc"] - }, - "application/vnd.fujifilm.fb.docuworks": { - "source": "iana" - }, - "application/vnd.fujifilm.fb.docuworks.binder": { - "source": "iana" - }, - "application/vnd.fujifilm.fb.docuworks.container": { - "source": "iana" - }, - "application/vnd.fujifilm.fb.jfi+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.fujitsu.oasys": { - "source": "iana", - "extensions": ["oas"] - }, - "application/vnd.fujitsu.oasys2": { - "source": "iana", - "extensions": ["oa2"] - }, - "application/vnd.fujitsu.oasys3": { - "source": "iana", - "extensions": ["oa3"] - }, - "application/vnd.fujitsu.oasysgp": { - "source": "iana", - "extensions": ["fg5"] - }, - "application/vnd.fujitsu.oasysprs": { - "source": "iana", - "extensions": ["bh2"] - }, - "application/vnd.fujixerox.art-ex": { - "source": "iana" - }, - "application/vnd.fujixerox.art4": { - "source": "iana" - }, - "application/vnd.fujixerox.ddd": { - "source": "iana", - "extensions": ["ddd"] - }, - "application/vnd.fujixerox.docuworks": { - "source": "iana", - "extensions": ["xdw"] - }, - "application/vnd.fujixerox.docuworks.binder": { - "source": "iana", - "extensions": ["xbd"] - }, - "application/vnd.fujixerox.docuworks.container": { - "source": "iana" - }, - "application/vnd.fujixerox.hbpl": { - "source": "iana" - }, - "application/vnd.fut-misnet": { - "source": "iana" - }, - "application/vnd.futoin+cbor": { - "source": "iana" - }, - "application/vnd.futoin+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.fuzzysheet": { - "source": "iana", - "extensions": ["fzs"] - }, - "application/vnd.genomatix.tuxedo": { - "source": "iana", - "extensions": ["txd"] - }, - "application/vnd.gentics.grd+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.geo+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.geocube+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.geogebra.file": { - "source": "iana", - "extensions": ["ggb"] - }, - "application/vnd.geogebra.slides": { - "source": "iana" - }, - "application/vnd.geogebra.tool": { - "source": "iana", - "extensions": ["ggt"] - }, - "application/vnd.geometry-explorer": { - "source": "iana", - "extensions": ["gex","gre"] - }, - "application/vnd.geonext": { - "source": "iana", - "extensions": ["gxt"] - }, - "application/vnd.geoplan": { - "source": "iana", - "extensions": ["g2w"] - }, - "application/vnd.geospace": { - "source": "iana", - "extensions": ["g3w"] - }, - "application/vnd.gerber": { - "source": "iana" - }, - "application/vnd.globalplatform.card-content-mgt": { - "source": "iana" - }, - "application/vnd.globalplatform.card-content-mgt-response": { - "source": "iana" - }, - "application/vnd.gmx": { - "source": "iana", - "extensions": ["gmx"] - }, - "application/vnd.google-apps.document": { - "compressible": false, - "extensions": ["gdoc"] - }, - "application/vnd.google-apps.presentation": { - "compressible": false, - "extensions": ["gslides"] - }, - "application/vnd.google-apps.spreadsheet": { - "compressible": false, - "extensions": ["gsheet"] - }, - "application/vnd.google-earth.kml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["kml"] - }, - "application/vnd.google-earth.kmz": { - "source": "iana", - "compressible": false, - "extensions": ["kmz"] - }, - "application/vnd.gov.sk.e-form+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.gov.sk.e-form+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.gov.sk.xmldatacontainer+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.grafeq": { - "source": "iana", - "extensions": ["gqf","gqs"] - }, - "application/vnd.gridmp": { - "source": "iana" - }, - "application/vnd.groove-account": { - "source": "iana", - "extensions": ["gac"] - }, - "application/vnd.groove-help": { - "source": "iana", - "extensions": ["ghf"] - }, - "application/vnd.groove-identity-message": { - "source": "iana", - "extensions": ["gim"] - }, - "application/vnd.groove-injector": { - "source": "iana", - "extensions": ["grv"] - }, - "application/vnd.groove-tool-message": { - "source": "iana", - "extensions": ["gtm"] - }, - "application/vnd.groove-tool-template": { - "source": "iana", - "extensions": ["tpl"] - }, - "application/vnd.groove-vcard": { - "source": "iana", - "extensions": ["vcg"] - }, - "application/vnd.hal+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hal+xml": { - "source": "iana", - "compressible": true, - "extensions": ["hal"] - }, - "application/vnd.handheld-entertainment+xml": { - "source": "iana", - "compressible": true, - "extensions": ["zmm"] - }, - "application/vnd.hbci": { - "source": "iana", - "extensions": ["hbci"] - }, - "application/vnd.hc+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hcl-bireports": { - "source": "iana" - }, - "application/vnd.hdt": { - "source": "iana" - }, - "application/vnd.heroku+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hhe.lesson-player": { - "source": "iana", - "extensions": ["les"] - }, - "application/vnd.hl7cda+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/vnd.hl7v2+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/vnd.hp-hpgl": { - "source": "iana", - "extensions": ["hpgl"] - }, - "application/vnd.hp-hpid": { - "source": "iana", - "extensions": ["hpid"] - }, - "application/vnd.hp-hps": { - "source": "iana", - "extensions": ["hps"] - }, - "application/vnd.hp-jlyt": { - "source": "iana", - "extensions": ["jlt"] - }, - "application/vnd.hp-pcl": { - "source": "iana", - "extensions": ["pcl"] - }, - "application/vnd.hp-pclxl": { - "source": "iana", - "extensions": ["pclxl"] - }, - "application/vnd.httphone": { - "source": "iana" - }, - "application/vnd.hydrostatix.sof-data": { - "source": "iana", - "extensions": ["sfd-hdstx"] - }, - "application/vnd.hyper+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hyper-item+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hyperdrive+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.hzn-3d-crossword": { - "source": "iana" - }, - "application/vnd.ibm.afplinedata": { - "source": "iana" - }, - "application/vnd.ibm.electronic-media": { - "source": "iana" - }, - "application/vnd.ibm.minipay": { - "source": "iana", - "extensions": ["mpy"] - }, - "application/vnd.ibm.modcap": { - "source": "iana", - "extensions": ["afp","listafp","list3820"] - }, - "application/vnd.ibm.rights-management": { - "source": "iana", - "extensions": ["irm"] - }, - "application/vnd.ibm.secure-container": { - "source": "iana", - "extensions": ["sc"] - }, - "application/vnd.iccprofile": { - "source": "iana", - "extensions": ["icc","icm"] - }, - "application/vnd.ieee.1905": { - "source": "iana" - }, - "application/vnd.igloader": { - "source": "iana", - "extensions": ["igl"] - }, - "application/vnd.imagemeter.folder+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.imagemeter.image+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.immervision-ivp": { - "source": "iana", - "extensions": ["ivp"] - }, - "application/vnd.immervision-ivu": { - "source": "iana", - "extensions": ["ivu"] - }, - "application/vnd.ims.imsccv1p1": { - "source": "iana" - }, - "application/vnd.ims.imsccv1p2": { - "source": "iana" - }, - "application/vnd.ims.imsccv1p3": { - "source": "iana" - }, - "application/vnd.ims.lis.v2.result+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolconsumerprofile+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolproxy+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolproxy.id+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolsettings+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ims.lti.v2.toolsettings.simple+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.informedcontrol.rms+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.informix-visionary": { - "source": "iana" - }, - "application/vnd.infotech.project": { - "source": "iana" - }, - "application/vnd.infotech.project+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.innopath.wamp.notification": { - "source": "iana" - }, - "application/vnd.insors.igm": { - "source": "iana", - "extensions": ["igm"] - }, - "application/vnd.intercon.formnet": { - "source": "iana", - "extensions": ["xpw","xpx"] - }, - "application/vnd.intergeo": { - "source": "iana", - "extensions": ["i2g"] - }, - "application/vnd.intertrust.digibox": { - "source": "iana" - }, - "application/vnd.intertrust.nncp": { - "source": "iana" - }, - "application/vnd.intu.qbo": { - "source": "iana", - "extensions": ["qbo"] - }, - "application/vnd.intu.qfx": { - "source": "iana", - "extensions": ["qfx"] - }, - "application/vnd.iptc.g2.catalogitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.conceptitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.knowledgeitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.newsitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.newsmessage+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.packageitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.iptc.g2.planningitem+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.ipunplugged.rcprofile": { - "source": "iana", - "extensions": ["rcprofile"] - }, - "application/vnd.irepository.package+xml": { - "source": "iana", - "compressible": true, - "extensions": ["irp"] - }, - "application/vnd.is-xpr": { - "source": "iana", - "extensions": ["xpr"] - }, - "application/vnd.isac.fcs": { - "source": "iana", - "extensions": ["fcs"] - }, - "application/vnd.iso11783-10+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.jam": { - "source": "iana", - "extensions": ["jam"] - }, - "application/vnd.japannet-directory-service": { - "source": "iana" - }, - "application/vnd.japannet-jpnstore-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-payment-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-registration": { - "source": "iana" - }, - "application/vnd.japannet-registration-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-setstore-wakeup": { - "source": "iana" - }, - "application/vnd.japannet-verification": { - "source": "iana" - }, - "application/vnd.japannet-verification-wakeup": { - "source": "iana" - }, - "application/vnd.jcp.javame.midlet-rms": { - "source": "iana", - "extensions": ["rms"] - }, - "application/vnd.jisp": { - "source": "iana", - "extensions": ["jisp"] - }, - "application/vnd.joost.joda-archive": { - "source": "iana", - "extensions": ["joda"] - }, - "application/vnd.jsk.isdn-ngn": { - "source": "iana" - }, - "application/vnd.kahootz": { - "source": "iana", - "extensions": ["ktz","ktr"] - }, - "application/vnd.kde.karbon": { - "source": "iana", - "extensions": ["karbon"] - }, - "application/vnd.kde.kchart": { - "source": "iana", - "extensions": ["chrt"] - }, - "application/vnd.kde.kformula": { - "source": "iana", - "extensions": ["kfo"] - }, - "application/vnd.kde.kivio": { - "source": "iana", - "extensions": ["flw"] - }, - "application/vnd.kde.kontour": { - "source": "iana", - "extensions": ["kon"] - }, - "application/vnd.kde.kpresenter": { - "source": "iana", - "extensions": ["kpr","kpt"] - }, - "application/vnd.kde.kspread": { - "source": "iana", - "extensions": ["ksp"] - }, - "application/vnd.kde.kword": { - "source": "iana", - "extensions": ["kwd","kwt"] - }, - "application/vnd.kenameaapp": { - "source": "iana", - "extensions": ["htke"] - }, - "application/vnd.kidspiration": { - "source": "iana", - "extensions": ["kia"] - }, - "application/vnd.kinar": { - "source": "iana", - "extensions": ["kne","knp"] - }, - "application/vnd.koan": { - "source": "iana", - "extensions": ["skp","skd","skt","skm"] - }, - "application/vnd.kodak-descriptor": { - "source": "iana", - "extensions": ["sse"] - }, - "application/vnd.las": { - "source": "iana" - }, - "application/vnd.las.las+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.las.las+xml": { - "source": "iana", - "compressible": true, - "extensions": ["lasxml"] - }, - "application/vnd.laszip": { - "source": "iana" - }, - "application/vnd.leap+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.liberty-request+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.llamagraphics.life-balance.desktop": { - "source": "iana", - "extensions": ["lbd"] - }, - "application/vnd.llamagraphics.life-balance.exchange+xml": { - "source": "iana", - "compressible": true, - "extensions": ["lbe"] - }, - "application/vnd.logipipe.circuit+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.loom": { - "source": "iana" - }, - "application/vnd.lotus-1-2-3": { - "source": "iana", - "extensions": ["123"] - }, - "application/vnd.lotus-approach": { - "source": "iana", - "extensions": ["apr"] - }, - "application/vnd.lotus-freelance": { - "source": "iana", - "extensions": ["pre"] - }, - "application/vnd.lotus-notes": { - "source": "iana", - "extensions": ["nsf"] - }, - "application/vnd.lotus-organizer": { - "source": "iana", - "extensions": ["org"] - }, - "application/vnd.lotus-screencam": { - "source": "iana", - "extensions": ["scm"] - }, - "application/vnd.lotus-wordpro": { - "source": "iana", - "extensions": ["lwp"] - }, - "application/vnd.macports.portpkg": { - "source": "iana", - "extensions": ["portpkg"] - }, - "application/vnd.mapbox-vector-tile": { - "source": "iana", - "extensions": ["mvt"] - }, - "application/vnd.marlin.drm.actiontoken+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.marlin.drm.conftoken+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.marlin.drm.license+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.marlin.drm.mdcf": { - "source": "iana" - }, - "application/vnd.mason+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.maxar.archive.3tz+zip": { - "source": "iana", - "compressible": false - }, - "application/vnd.maxmind.maxmind-db": { - "source": "iana" - }, - "application/vnd.mcd": { - "source": "iana", - "extensions": ["mcd"] - }, - "application/vnd.medcalcdata": { - "source": "iana", - "extensions": ["mc1"] - }, - "application/vnd.mediastation.cdkey": { - "source": "iana", - "extensions": ["cdkey"] - }, - "application/vnd.meridian-slingshot": { - "source": "iana" - }, - "application/vnd.mfer": { - "source": "iana", - "extensions": ["mwf"] - }, - "application/vnd.mfmp": { - "source": "iana", - "extensions": ["mfm"] - }, - "application/vnd.micro+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.micrografx.flo": { - "source": "iana", - "extensions": ["flo"] - }, - "application/vnd.micrografx.igx": { - "source": "iana", - "extensions": ["igx"] - }, - "application/vnd.microsoft.portable-executable": { - "source": "iana" - }, - "application/vnd.microsoft.windows.thumbnail-cache": { - "source": "iana" - }, - "application/vnd.miele+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.mif": { - "source": "iana", - "extensions": ["mif"] - }, - "application/vnd.minisoft-hp3000-save": { - "source": "iana" - }, - "application/vnd.mitsubishi.misty-guard.trustweb": { - "source": "iana" - }, - "application/vnd.mobius.daf": { - "source": "iana", - "extensions": ["daf"] - }, - "application/vnd.mobius.dis": { - "source": "iana", - "extensions": ["dis"] - }, - "application/vnd.mobius.mbk": { - "source": "iana", - "extensions": ["mbk"] - }, - "application/vnd.mobius.mqy": { - "source": "iana", - "extensions": ["mqy"] - }, - "application/vnd.mobius.msl": { - "source": "iana", - "extensions": ["msl"] - }, - "application/vnd.mobius.plc": { - "source": "iana", - "extensions": ["plc"] - }, - "application/vnd.mobius.txf": { - "source": "iana", - "extensions": ["txf"] - }, - "application/vnd.mophun.application": { - "source": "iana", - "extensions": ["mpn"] - }, - "application/vnd.mophun.certificate": { - "source": "iana", - "extensions": ["mpc"] - }, - "application/vnd.motorola.flexsuite": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.adsi": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.fis": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.gotap": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.kmr": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.ttc": { - "source": "iana" - }, - "application/vnd.motorola.flexsuite.wem": { - "source": "iana" - }, - "application/vnd.motorola.iprm": { - "source": "iana" - }, - "application/vnd.mozilla.xul+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xul"] - }, - "application/vnd.ms-3mfdocument": { - "source": "iana" - }, - "application/vnd.ms-artgalry": { - "source": "iana", - "extensions": ["cil"] - }, - "application/vnd.ms-asf": { - "source": "iana" - }, - "application/vnd.ms-cab-compressed": { - "source": "iana", - "extensions": ["cab"] - }, - "application/vnd.ms-color.iccprofile": { - "source": "apache" - }, - "application/vnd.ms-excel": { - "source": "iana", - "compressible": false, - "extensions": ["xls","xlm","xla","xlc","xlt","xlw"] - }, - "application/vnd.ms-excel.addin.macroenabled.12": { - "source": "iana", - "extensions": ["xlam"] - }, - "application/vnd.ms-excel.sheet.binary.macroenabled.12": { - "source": "iana", - "extensions": ["xlsb"] - }, - "application/vnd.ms-excel.sheet.macroenabled.12": { - "source": "iana", - "extensions": ["xlsm"] - }, - "application/vnd.ms-excel.template.macroenabled.12": { - "source": "iana", - "extensions": ["xltm"] - }, - "application/vnd.ms-fontobject": { - "source": "iana", - "compressible": true, - "extensions": ["eot"] - }, - "application/vnd.ms-htmlhelp": { - "source": "iana", - "extensions": ["chm"] - }, - "application/vnd.ms-ims": { - "source": "iana", - "extensions": ["ims"] - }, - "application/vnd.ms-lrm": { - "source": "iana", - "extensions": ["lrm"] - }, - "application/vnd.ms-office.activex+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.ms-officetheme": { - "source": "iana", - "extensions": ["thmx"] - }, - "application/vnd.ms-opentype": { - "source": "apache", - "compressible": true - }, - "application/vnd.ms-outlook": { - "compressible": false, - "extensions": ["msg"] - }, - "application/vnd.ms-package.obfuscated-opentype": { - "source": "apache" - }, - "application/vnd.ms-pki.seccat": { - "source": "apache", - "extensions": ["cat"] - }, - "application/vnd.ms-pki.stl": { - "source": "apache", - "extensions": ["stl"] - }, - "application/vnd.ms-playready.initiator+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.ms-powerpoint": { - "source": "iana", - "compressible": false, - "extensions": ["ppt","pps","pot"] - }, - "application/vnd.ms-powerpoint.addin.macroenabled.12": { - "source": "iana", - "extensions": ["ppam"] - }, - "application/vnd.ms-powerpoint.presentation.macroenabled.12": { - "source": "iana", - "extensions": ["pptm"] - }, - "application/vnd.ms-powerpoint.slide.macroenabled.12": { - "source": "iana", - "extensions": ["sldm"] - }, - "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { - "source": "iana", - "extensions": ["ppsm"] - }, - "application/vnd.ms-powerpoint.template.macroenabled.12": { - "source": "iana", - "extensions": ["potm"] - }, - "application/vnd.ms-printdevicecapabilities+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.ms-printing.printticket+xml": { - "source": "apache", - "compressible": true - }, - "application/vnd.ms-printschematicket+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.ms-project": { - "source": "iana", - "extensions": ["mpp","mpt"] - }, - "application/vnd.ms-tnef": { - "source": "iana" - }, - "application/vnd.ms-windows.devicepairing": { - "source": "iana" - }, - "application/vnd.ms-windows.nwprinting.oob": { - "source": "iana" - }, - "application/vnd.ms-windows.printerpairing": { - "source": "iana" - }, - "application/vnd.ms-windows.wsd.oob": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.lic-chlg-req": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.lic-resp": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.meter-chlg-req": { - "source": "iana" - }, - "application/vnd.ms-wmdrm.meter-resp": { - "source": "iana" - }, - "application/vnd.ms-word.document.macroenabled.12": { - "source": "iana", - "extensions": ["docm"] - }, - "application/vnd.ms-word.template.macroenabled.12": { - "source": "iana", - "extensions": ["dotm"] - }, - "application/vnd.ms-works": { - "source": "iana", - "extensions": ["wps","wks","wcm","wdb"] - }, - "application/vnd.ms-wpl": { - "source": "iana", - "extensions": ["wpl"] - }, - "application/vnd.ms-xpsdocument": { - "source": "iana", - "compressible": false, - "extensions": ["xps"] - }, - "application/vnd.msa-disk-image": { - "source": "iana" - }, - "application/vnd.mseq": { - "source": "iana", - "extensions": ["mseq"] - }, - "application/vnd.msign": { - "source": "iana" - }, - "application/vnd.multiad.creator": { - "source": "iana" - }, - "application/vnd.multiad.creator.cif": { - "source": "iana" - }, - "application/vnd.music-niff": { - "source": "iana" - }, - "application/vnd.musician": { - "source": "iana", - "extensions": ["mus"] - }, - "application/vnd.muvee.style": { - "source": "iana", - "extensions": ["msty"] - }, - "application/vnd.mynfc": { - "source": "iana", - "extensions": ["taglet"] - }, - "application/vnd.nacamar.ybrid+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.ncd.control": { - "source": "iana" - }, - "application/vnd.ncd.reference": { - "source": "iana" - }, - "application/vnd.nearst.inv+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.nebumind.line": { - "source": "iana" - }, - "application/vnd.nervana": { - "source": "iana" - }, - "application/vnd.netfpx": { - "source": "iana" - }, - "application/vnd.neurolanguage.nlu": { - "source": "iana", - "extensions": ["nlu"] - }, - "application/vnd.nimn": { - "source": "iana" - }, - "application/vnd.nintendo.nitro.rom": { - "source": "iana" - }, - "application/vnd.nintendo.snes.rom": { - "source": "iana" - }, - "application/vnd.nitf": { - "source": "iana", - "extensions": ["ntf","nitf"] - }, - "application/vnd.noblenet-directory": { - "source": "iana", - "extensions": ["nnd"] - }, - "application/vnd.noblenet-sealer": { - "source": "iana", - "extensions": ["nns"] - }, - "application/vnd.noblenet-web": { - "source": "iana", - "extensions": ["nnw"] - }, - "application/vnd.nokia.catalogs": { - "source": "iana" - }, - "application/vnd.nokia.conml+wbxml": { - "source": "iana" - }, - "application/vnd.nokia.conml+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.iptv.config+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.isds-radio-presets": { - "source": "iana" - }, - "application/vnd.nokia.landmark+wbxml": { - "source": "iana" - }, - "application/vnd.nokia.landmark+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.landmarkcollection+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.n-gage.ac+xml": { - "source": "iana", - "compressible": true, - "extensions": ["ac"] - }, - "application/vnd.nokia.n-gage.data": { - "source": "iana", - "extensions": ["ngdat"] - }, - "application/vnd.nokia.n-gage.symbian.install": { - "source": "iana", - "extensions": ["n-gage"] - }, - "application/vnd.nokia.ncd": { - "source": "iana" - }, - "application/vnd.nokia.pcd+wbxml": { - "source": "iana" - }, - "application/vnd.nokia.pcd+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.nokia.radio-preset": { - "source": "iana", - "extensions": ["rpst"] - }, - "application/vnd.nokia.radio-presets": { - "source": "iana", - "extensions": ["rpss"] - }, - "application/vnd.novadigm.edm": { - "source": "iana", - "extensions": ["edm"] - }, - "application/vnd.novadigm.edx": { - "source": "iana", - "extensions": ["edx"] - }, - "application/vnd.novadigm.ext": { - "source": "iana", - "extensions": ["ext"] - }, - "application/vnd.ntt-local.content-share": { - "source": "iana" - }, - "application/vnd.ntt-local.file-transfer": { - "source": "iana" - }, - "application/vnd.ntt-local.ogw_remote-access": { - "source": "iana" - }, - "application/vnd.ntt-local.sip-ta_remote": { - "source": "iana" - }, - "application/vnd.ntt-local.sip-ta_tcp_stream": { - "source": "iana" - }, - "application/vnd.oasis.opendocument.chart": { - "source": "iana", - "extensions": ["odc"] - }, - "application/vnd.oasis.opendocument.chart-template": { - "source": "iana", - "extensions": ["otc"] - }, - "application/vnd.oasis.opendocument.database": { - "source": "iana", - "extensions": ["odb"] - }, - "application/vnd.oasis.opendocument.formula": { - "source": "iana", - "extensions": ["odf"] - }, - "application/vnd.oasis.opendocument.formula-template": { - "source": "iana", - "extensions": ["odft"] - }, - "application/vnd.oasis.opendocument.graphics": { - "source": "iana", - "compressible": false, - "extensions": ["odg"] - }, - "application/vnd.oasis.opendocument.graphics-template": { - "source": "iana", - "extensions": ["otg"] - }, - "application/vnd.oasis.opendocument.image": { - "source": "iana", - "extensions": ["odi"] - }, - "application/vnd.oasis.opendocument.image-template": { - "source": "iana", - "extensions": ["oti"] - }, - "application/vnd.oasis.opendocument.presentation": { - "source": "iana", - "compressible": false, - "extensions": ["odp"] - }, - "application/vnd.oasis.opendocument.presentation-template": { - "source": "iana", - "extensions": ["otp"] - }, - "application/vnd.oasis.opendocument.spreadsheet": { - "source": "iana", - "compressible": false, - "extensions": ["ods"] - }, - "application/vnd.oasis.opendocument.spreadsheet-template": { - "source": "iana", - "extensions": ["ots"] - }, - "application/vnd.oasis.opendocument.text": { - "source": "iana", - "compressible": false, - "extensions": ["odt"] - }, - "application/vnd.oasis.opendocument.text-master": { - "source": "iana", - "extensions": ["odm"] - }, - "application/vnd.oasis.opendocument.text-template": { - "source": "iana", - "extensions": ["ott"] - }, - "application/vnd.oasis.opendocument.text-web": { - "source": "iana", - "extensions": ["oth"] - }, - "application/vnd.obn": { - "source": "iana" - }, - "application/vnd.ocf+cbor": { - "source": "iana" - }, - "application/vnd.oci.image.manifest.v1+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.oftn.l10n+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.contentaccessdownload+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.contentaccessstreaming+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.cspg-hexbinary": { - "source": "iana" - }, - "application/vnd.oipf.dae.svg+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.dae.xhtml+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.mippvcontrolmessage+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.pae.gem": { - "source": "iana" - }, - "application/vnd.oipf.spdiscovery+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.spdlist+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.ueprofile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oipf.userprofile+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.olpc-sugar": { - "source": "iana", - "extensions": ["xo"] - }, - "application/vnd.oma-scws-config": { - "source": "iana" - }, - "application/vnd.oma-scws-http-request": { - "source": "iana" - }, - "application/vnd.oma-scws-http-response": { - "source": "iana" - }, - "application/vnd.oma.bcast.associated-procedure-parameter+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.drm-trigger+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.imd+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.ltkm": { - "source": "iana" - }, - "application/vnd.oma.bcast.notification+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.provisioningtrigger": { - "source": "iana" - }, - "application/vnd.oma.bcast.sgboot": { - "source": "iana" - }, - "application/vnd.oma.bcast.sgdd+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.sgdu": { - "source": "iana" - }, - "application/vnd.oma.bcast.simple-symbol-container": { - "source": "iana" - }, - "application/vnd.oma.bcast.smartcard-trigger+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.sprov+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.bcast.stkm": { - "source": "iana" - }, - "application/vnd.oma.cab-address-book+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.cab-feature-handler+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.cab-pcc+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.cab-subs-invite+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.cab-user-prefs+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.dcd": { - "source": "iana" - }, - "application/vnd.oma.dcdc": { - "source": "iana" - }, - "application/vnd.oma.dd2+xml": { - "source": "iana", - "compressible": true, - "extensions": ["dd2"] - }, - "application/vnd.oma.drm.risd+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.group-usage-list+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.lwm2m+cbor": { - "source": "iana" - }, - "application/vnd.oma.lwm2m+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.lwm2m+tlv": { - "source": "iana" - }, - "application/vnd.oma.pal+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.poc.detailed-progress-report+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.poc.final-report+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.poc.groups+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.poc.invocation-descriptor+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.poc.optimized-progress-report+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.push": { - "source": "iana" - }, - "application/vnd.oma.scidm.messages+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oma.xcap-directory+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.omads-email+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/vnd.omads-file+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/vnd.omads-folder+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/vnd.omaloc-supl-init": { - "source": "iana" - }, - "application/vnd.onepager": { - "source": "iana" - }, - "application/vnd.onepagertamp": { - "source": "iana" - }, - "application/vnd.onepagertamx": { - "source": "iana" - }, - "application/vnd.onepagertat": { - "source": "iana" - }, - "application/vnd.onepagertatp": { - "source": "iana" - }, - "application/vnd.onepagertatx": { - "source": "iana" - }, - "application/vnd.openblox.game+xml": { - "source": "iana", - "compressible": true, - "extensions": ["obgx"] - }, - "application/vnd.openblox.game-binary": { - "source": "iana" - }, - "application/vnd.openeye.oeb": { - "source": "iana" - }, - "application/vnd.openofficeorg.extension": { - "source": "apache", - "extensions": ["oxt"] - }, - "application/vnd.openstreetmap.data+xml": { - "source": "iana", - "compressible": true, - "extensions": ["osm"] - }, - "application/vnd.opentimestamps.ots": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.custom-properties+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawing+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.extended-properties+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.presentation": { - "source": "iana", - "compressible": false, - "extensions": ["pptx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.slide": { - "source": "iana", - "extensions": ["sldx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { - "source": "iana", - "extensions": ["ppsx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.template": { - "source": "iana", - "extensions": ["potx"] - }, - "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { - "source": "iana", - "compressible": false, - "extensions": ["xlsx"] - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { - "source": "iana", - "extensions": ["xltx"] - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.theme+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.themeoverride+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.vmldrawing": { - "source": "iana" - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { - "source": "iana", - "compressible": false, - "extensions": ["docx"] - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { - "source": "iana", - "extensions": ["dotx"] - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-package.core-properties+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.openxmlformats-package.relationships+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oracle.resource+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.orange.indata": { - "source": "iana" - }, - "application/vnd.osa.netdeploy": { - "source": "iana" - }, - "application/vnd.osgeo.mapguide.package": { - "source": "iana", - "extensions": ["mgp"] - }, - "application/vnd.osgi.bundle": { - "source": "iana" - }, - "application/vnd.osgi.dp": { - "source": "iana", - "extensions": ["dp"] - }, - "application/vnd.osgi.subsystem": { - "source": "iana", - "extensions": ["esa"] - }, - "application/vnd.otps.ct-kip+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.oxli.countgraph": { - "source": "iana" - }, - "application/vnd.pagerduty+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.palm": { - "source": "iana", - "extensions": ["pdb","pqa","oprc"] - }, - "application/vnd.panoply": { - "source": "iana" - }, - "application/vnd.paos.xml": { - "source": "iana" - }, - "application/vnd.patentdive": { - "source": "iana" - }, - "application/vnd.patientecommsdoc": { - "source": "iana" - }, - "application/vnd.pawaafile": { - "source": "iana", - "extensions": ["paw"] - }, - "application/vnd.pcos": { - "source": "iana" - }, - "application/vnd.pg.format": { - "source": "iana", - "extensions": ["str"] - }, - "application/vnd.pg.osasli": { - "source": "iana", - "extensions": ["ei6"] - }, - "application/vnd.piaccess.application-licence": { - "source": "iana" - }, - "application/vnd.picsel": { - "source": "iana", - "extensions": ["efif"] - }, - "application/vnd.pmi.widget": { - "source": "iana", - "extensions": ["wg"] - }, - "application/vnd.poc.group-advertisement+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.pocketlearn": { - "source": "iana", - "extensions": ["plf"] - }, - "application/vnd.powerbuilder6": { - "source": "iana", - "extensions": ["pbd"] - }, - "application/vnd.powerbuilder6-s": { - "source": "iana" - }, - "application/vnd.powerbuilder7": { - "source": "iana" - }, - "application/vnd.powerbuilder7-s": { - "source": "iana" - }, - "application/vnd.powerbuilder75": { - "source": "iana" - }, - "application/vnd.powerbuilder75-s": { - "source": "iana" - }, - "application/vnd.preminet": { - "source": "iana" - }, - "application/vnd.previewsystems.box": { - "source": "iana", - "extensions": ["box"] - }, - "application/vnd.proteus.magazine": { - "source": "iana", - "extensions": ["mgz"] - }, - "application/vnd.psfs": { - "source": "iana" - }, - "application/vnd.publishare-delta-tree": { - "source": "iana", - "extensions": ["qps"] - }, - "application/vnd.pvi.ptid1": { - "source": "iana", - "extensions": ["ptid"] - }, - "application/vnd.pwg-multiplexed": { - "source": "iana" - }, - "application/vnd.pwg-xhtml-print+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.qualcomm.brew-app-res": { - "source": "iana" - }, - "application/vnd.quarantainenet": { - "source": "iana" - }, - "application/vnd.quark.quarkxpress": { - "source": "iana", - "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"] - }, - "application/vnd.quobject-quoxdocument": { - "source": "iana" - }, - "application/vnd.radisys.moml+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-audit+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-audit-conf+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-audit-conn+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-audit-dialog+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-audit-stream+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-conf+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-base+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-fax-detect+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-group+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-speech+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.radisys.msml-dialog-transform+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.rainstor.data": { - "source": "iana" - }, - "application/vnd.rapid": { - "source": "iana" - }, - "application/vnd.rar": { - "source": "iana", - "extensions": ["rar"] - }, - "application/vnd.realvnc.bed": { - "source": "iana", - "extensions": ["bed"] - }, - "application/vnd.recordare.musicxml": { - "source": "iana", - "extensions": ["mxl"] - }, - "application/vnd.recordare.musicxml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["musicxml"] - }, - "application/vnd.renlearn.rlprint": { - "source": "iana" - }, - "application/vnd.resilient.logic": { - "source": "iana" - }, - "application/vnd.restful+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.rig.cryptonote": { - "source": "iana", - "extensions": ["cryptonote"] - }, - "application/vnd.rim.cod": { - "source": "apache", - "extensions": ["cod"] - }, - "application/vnd.rn-realmedia": { - "source": "apache", - "extensions": ["rm"] - }, - "application/vnd.rn-realmedia-vbr": { - "source": "apache", - "extensions": ["rmvb"] - }, - "application/vnd.route66.link66+xml": { - "source": "iana", - "compressible": true, - "extensions": ["link66"] - }, - "application/vnd.rs-274x": { - "source": "iana" - }, - "application/vnd.ruckus.download": { - "source": "iana" - }, - "application/vnd.s3sms": { - "source": "iana" - }, - "application/vnd.sailingtracker.track": { - "source": "iana", - "extensions": ["st"] - }, - "application/vnd.sar": { - "source": "iana" - }, - "application/vnd.sbm.cid": { - "source": "iana" - }, - "application/vnd.sbm.mid2": { - "source": "iana" - }, - "application/vnd.scribus": { - "source": "iana" - }, - "application/vnd.sealed.3df": { - "source": "iana" - }, - "application/vnd.sealed.csf": { - "source": "iana" - }, - "application/vnd.sealed.doc": { - "source": "iana" - }, - "application/vnd.sealed.eml": { - "source": "iana" - }, - "application/vnd.sealed.mht": { - "source": "iana" - }, - "application/vnd.sealed.net": { - "source": "iana" - }, - "application/vnd.sealed.ppt": { - "source": "iana" - }, - "application/vnd.sealed.tiff": { - "source": "iana" - }, - "application/vnd.sealed.xls": { - "source": "iana" - }, - "application/vnd.sealedmedia.softseal.html": { - "source": "iana" - }, - "application/vnd.sealedmedia.softseal.pdf": { - "source": "iana" - }, - "application/vnd.seemail": { - "source": "iana", - "extensions": ["see"] - }, - "application/vnd.seis+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.sema": { - "source": "iana", - "extensions": ["sema"] - }, - "application/vnd.semd": { - "source": "iana", - "extensions": ["semd"] - }, - "application/vnd.semf": { - "source": "iana", - "extensions": ["semf"] - }, - "application/vnd.shade-save-file": { - "source": "iana" - }, - "application/vnd.shana.informed.formdata": { - "source": "iana", - "extensions": ["ifm"] - }, - "application/vnd.shana.informed.formtemplate": { - "source": "iana", - "extensions": ["itp"] - }, - "application/vnd.shana.informed.interchange": { - "source": "iana", - "extensions": ["iif"] - }, - "application/vnd.shana.informed.package": { - "source": "iana", - "extensions": ["ipk"] - }, - "application/vnd.shootproof+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.shopkick+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.shp": { - "source": "iana" - }, - "application/vnd.shx": { - "source": "iana" - }, - "application/vnd.sigrok.session": { - "source": "iana" - }, - "application/vnd.simtech-mindmapper": { - "source": "iana", - "extensions": ["twd","twds"] - }, - "application/vnd.siren+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.smaf": { - "source": "iana", - "extensions": ["mmf"] - }, - "application/vnd.smart.notebook": { - "source": "iana" - }, - "application/vnd.smart.teacher": { - "source": "iana", - "extensions": ["teacher"] - }, - "application/vnd.snesdev-page-table": { - "source": "iana" - }, - "application/vnd.software602.filler.form+xml": { - "source": "iana", - "compressible": true, - "extensions": ["fo"] - }, - "application/vnd.software602.filler.form-xml-zip": { - "source": "iana" - }, - "application/vnd.solent.sdkm+xml": { - "source": "iana", - "compressible": true, - "extensions": ["sdkm","sdkd"] - }, - "application/vnd.spotfire.dxp": { - "source": "iana", - "extensions": ["dxp"] - }, - "application/vnd.spotfire.sfs": { - "source": "iana", - "extensions": ["sfs"] - }, - "application/vnd.sqlite3": { - "source": "iana" - }, - "application/vnd.sss-cod": { - "source": "iana" - }, - "application/vnd.sss-dtf": { - "source": "iana" - }, - "application/vnd.sss-ntf": { - "source": "iana" - }, - "application/vnd.stardivision.calc": { - "source": "apache", - "extensions": ["sdc"] - }, - "application/vnd.stardivision.draw": { - "source": "apache", - "extensions": ["sda"] - }, - "application/vnd.stardivision.impress": { - "source": "apache", - "extensions": ["sdd"] - }, - "application/vnd.stardivision.math": { - "source": "apache", - "extensions": ["smf"] - }, - "application/vnd.stardivision.writer": { - "source": "apache", - "extensions": ["sdw","vor"] - }, - "application/vnd.stardivision.writer-global": { - "source": "apache", - "extensions": ["sgl"] - }, - "application/vnd.stepmania.package": { - "source": "iana", - "extensions": ["smzip"] - }, - "application/vnd.stepmania.stepchart": { - "source": "iana", - "extensions": ["sm"] - }, - "application/vnd.street-stream": { - "source": "iana" - }, - "application/vnd.sun.wadl+xml": { - "source": "iana", - "compressible": true, - "extensions": ["wadl"] - }, - "application/vnd.sun.xml.calc": { - "source": "apache", - "extensions": ["sxc"] - }, - "application/vnd.sun.xml.calc.template": { - "source": "apache", - "extensions": ["stc"] - }, - "application/vnd.sun.xml.draw": { - "source": "apache", - "extensions": ["sxd"] - }, - "application/vnd.sun.xml.draw.template": { - "source": "apache", - "extensions": ["std"] - }, - "application/vnd.sun.xml.impress": { - "source": "apache", - "extensions": ["sxi"] - }, - "application/vnd.sun.xml.impress.template": { - "source": "apache", - "extensions": ["sti"] - }, - "application/vnd.sun.xml.math": { - "source": "apache", - "extensions": ["sxm"] - }, - "application/vnd.sun.xml.writer": { - "source": "apache", - "extensions": ["sxw"] - }, - "application/vnd.sun.xml.writer.global": { - "source": "apache", - "extensions": ["sxg"] - }, - "application/vnd.sun.xml.writer.template": { - "source": "apache", - "extensions": ["stw"] - }, - "application/vnd.sus-calendar": { - "source": "iana", - "extensions": ["sus","susp"] - }, - "application/vnd.svd": { - "source": "iana", - "extensions": ["svd"] - }, - "application/vnd.swiftview-ics": { - "source": "iana" - }, - "application/vnd.sycle+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.syft+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.symbian.install": { - "source": "apache", - "extensions": ["sis","sisx"] - }, - "application/vnd.syncml+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["xsm"] - }, - "application/vnd.syncml.dm+wbxml": { - "source": "iana", - "charset": "UTF-8", - "extensions": ["bdm"] - }, - "application/vnd.syncml.dm+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["xdm"] - }, - "application/vnd.syncml.dm.notification": { - "source": "iana" - }, - "application/vnd.syncml.dmddf+wbxml": { - "source": "iana" - }, - "application/vnd.syncml.dmddf+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["ddf"] - }, - "application/vnd.syncml.dmtnds+wbxml": { - "source": "iana" - }, - "application/vnd.syncml.dmtnds+xml": { - "source": "iana", - "charset": "UTF-8", - "compressible": true - }, - "application/vnd.syncml.ds.notification": { - "source": "iana" - }, - "application/vnd.tableschema+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.tao.intent-module-archive": { - "source": "iana", - "extensions": ["tao"] - }, - "application/vnd.tcpdump.pcap": { - "source": "iana", - "extensions": ["pcap","cap","dmp"] - }, - "application/vnd.think-cell.ppttc+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.tmd.mediaflex.api+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.tml": { - "source": "iana" - }, - "application/vnd.tmobile-livetv": { - "source": "iana", - "extensions": ["tmo"] - }, - "application/vnd.tri.onesource": { - "source": "iana" - }, - "application/vnd.trid.tpt": { - "source": "iana", - "extensions": ["tpt"] - }, - "application/vnd.triscape.mxs": { - "source": "iana", - "extensions": ["mxs"] - }, - "application/vnd.trueapp": { - "source": "iana", - "extensions": ["tra"] - }, - "application/vnd.truedoc": { - "source": "iana" - }, - "application/vnd.ubisoft.webplayer": { - "source": "iana" - }, - "application/vnd.ufdl": { - "source": "iana", - "extensions": ["ufd","ufdl"] - }, - "application/vnd.uiq.theme": { - "source": "iana", - "extensions": ["utz"] - }, - "application/vnd.umajin": { - "source": "iana", - "extensions": ["umj"] - }, - "application/vnd.unity": { - "source": "iana", - "extensions": ["unityweb"] - }, - "application/vnd.uoml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["uoml"] - }, - "application/vnd.uplanet.alert": { - "source": "iana" - }, - "application/vnd.uplanet.alert-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.bearer-choice": { - "source": "iana" - }, - "application/vnd.uplanet.bearer-choice-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.cacheop": { - "source": "iana" - }, - "application/vnd.uplanet.cacheop-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.channel": { - "source": "iana" - }, - "application/vnd.uplanet.channel-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.list": { - "source": "iana" - }, - "application/vnd.uplanet.list-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.listcmd": { - "source": "iana" - }, - "application/vnd.uplanet.listcmd-wbxml": { - "source": "iana" - }, - "application/vnd.uplanet.signal": { - "source": "iana" - }, - "application/vnd.uri-map": { - "source": "iana" - }, - "application/vnd.valve.source.material": { - "source": "iana" - }, - "application/vnd.vcx": { - "source": "iana", - "extensions": ["vcx"] - }, - "application/vnd.vd-study": { - "source": "iana" - }, - "application/vnd.vectorworks": { - "source": "iana" - }, - "application/vnd.vel+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.verimatrix.vcas": { - "source": "iana" - }, - "application/vnd.veritone.aion+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.veryant.thin": { - "source": "iana" - }, - "application/vnd.ves.encrypted": { - "source": "iana" - }, - "application/vnd.vidsoft.vidconference": { - "source": "iana" - }, - "application/vnd.visio": { - "source": "iana", - "extensions": ["vsd","vst","vss","vsw"] - }, - "application/vnd.visionary": { - "source": "iana", - "extensions": ["vis"] - }, - "application/vnd.vividence.scriptfile": { - "source": "iana" - }, - "application/vnd.vsf": { - "source": "iana", - "extensions": ["vsf"] - }, - "application/vnd.wap.sic": { - "source": "iana" - }, - "application/vnd.wap.slc": { - "source": "iana" - }, - "application/vnd.wap.wbxml": { - "source": "iana", - "charset": "UTF-8", - "extensions": ["wbxml"] - }, - "application/vnd.wap.wmlc": { - "source": "iana", - "extensions": ["wmlc"] - }, - "application/vnd.wap.wmlscriptc": { - "source": "iana", - "extensions": ["wmlsc"] - }, - "application/vnd.webturbo": { - "source": "iana", - "extensions": ["wtb"] - }, - "application/vnd.wfa.dpp": { - "source": "iana" - }, - "application/vnd.wfa.p2p": { - "source": "iana" - }, - "application/vnd.wfa.wsc": { - "source": "iana" - }, - "application/vnd.windows.devicepairing": { - "source": "iana" - }, - "application/vnd.wmc": { - "source": "iana" - }, - "application/vnd.wmf.bootstrap": { - "source": "iana" - }, - "application/vnd.wolfram.mathematica": { - "source": "iana" - }, - "application/vnd.wolfram.mathematica.package": { - "source": "iana" - }, - "application/vnd.wolfram.player": { - "source": "iana", - "extensions": ["nbp"] - }, - "application/vnd.wordperfect": { - "source": "iana", - "extensions": ["wpd"] - }, - "application/vnd.wqd": { - "source": "iana", - "extensions": ["wqd"] - }, - "application/vnd.wrq-hp3000-labelled": { - "source": "iana" - }, - "application/vnd.wt.stf": { - "source": "iana", - "extensions": ["stf"] - }, - "application/vnd.wv.csp+wbxml": { - "source": "iana" - }, - "application/vnd.wv.csp+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.wv.ssp+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.xacml+json": { - "source": "iana", - "compressible": true - }, - "application/vnd.xara": { - "source": "iana", - "extensions": ["xar"] - }, - "application/vnd.xfdl": { - "source": "iana", - "extensions": ["xfdl"] - }, - "application/vnd.xfdl.webform": { - "source": "iana" - }, - "application/vnd.xmi+xml": { - "source": "iana", - "compressible": true - }, - "application/vnd.xmpie.cpkg": { - "source": "iana" - }, - "application/vnd.xmpie.dpkg": { - "source": "iana" - }, - "application/vnd.xmpie.plan": { - "source": "iana" - }, - "application/vnd.xmpie.ppkg": { - "source": "iana" - }, - "application/vnd.xmpie.xlim": { - "source": "iana" - }, - "application/vnd.yamaha.hv-dic": { - "source": "iana", - "extensions": ["hvd"] - }, - "application/vnd.yamaha.hv-script": { - "source": "iana", - "extensions": ["hvs"] - }, - "application/vnd.yamaha.hv-voice": { - "source": "iana", - "extensions": ["hvp"] - }, - "application/vnd.yamaha.openscoreformat": { - "source": "iana", - "extensions": ["osf"] - }, - "application/vnd.yamaha.openscoreformat.osfpvg+xml": { - "source": "iana", - "compressible": true, - "extensions": ["osfpvg"] - }, - "application/vnd.yamaha.remote-setup": { - "source": "iana" - }, - "application/vnd.yamaha.smaf-audio": { - "source": "iana", - "extensions": ["saf"] - }, - "application/vnd.yamaha.smaf-phrase": { - "source": "iana", - "extensions": ["spf"] - }, - "application/vnd.yamaha.through-ngn": { - "source": "iana" - }, - "application/vnd.yamaha.tunnel-udpencap": { - "source": "iana" - }, - "application/vnd.yaoweme": { - "source": "iana" - }, - "application/vnd.yellowriver-custom-menu": { - "source": "iana", - "extensions": ["cmp"] - }, - "application/vnd.youtube.yt": { - "source": "iana" - }, - "application/vnd.zul": { - "source": "iana", - "extensions": ["zir","zirz"] - }, - "application/vnd.zzazz.deck+xml": { - "source": "iana", - "compressible": true, - "extensions": ["zaz"] - }, - "application/voicexml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["vxml"] - }, - "application/voucher-cms+json": { - "source": "iana", - "compressible": true - }, - "application/vq-rtcpxr": { - "source": "iana" - }, - "application/wasm": { - "source": "iana", - "compressible": true, - "extensions": ["wasm"] - }, - "application/watcherinfo+xml": { - "source": "iana", - "compressible": true, - "extensions": ["wif"] - }, - "application/webpush-options+json": { - "source": "iana", - "compressible": true - }, - "application/whoispp-query": { - "source": "iana" - }, - "application/whoispp-response": { - "source": "iana" - }, - "application/widget": { - "source": "iana", - "extensions": ["wgt"] - }, - "application/winhlp": { - "source": "apache", - "extensions": ["hlp"] - }, - "application/wita": { - "source": "iana" - }, - "application/wordperfect5.1": { - "source": "iana" - }, - "application/wsdl+xml": { - "source": "iana", - "compressible": true, - "extensions": ["wsdl"] - }, - "application/wspolicy+xml": { - "source": "iana", - "compressible": true, - "extensions": ["wspolicy"] - }, - "application/x-7z-compressed": { - "source": "apache", - "compressible": false, - "extensions": ["7z"] - }, - "application/x-abiword": { - "source": "apache", - "extensions": ["abw"] - }, - "application/x-ace-compressed": { - "source": "apache", - "extensions": ["ace"] - }, - "application/x-amf": { - "source": "apache" - }, - "application/x-apple-diskimage": { - "source": "apache", - "extensions": ["dmg"] - }, - "application/x-arj": { - "compressible": false, - "extensions": ["arj"] - }, - "application/x-authorware-bin": { - "source": "apache", - "extensions": ["aab","x32","u32","vox"] - }, - "application/x-authorware-map": { - "source": "apache", - "extensions": ["aam"] - }, - "application/x-authorware-seg": { - "source": "apache", - "extensions": ["aas"] - }, - "application/x-bcpio": { - "source": "apache", - "extensions": ["bcpio"] - }, - "application/x-bdoc": { - "compressible": false, - "extensions": ["bdoc"] - }, - "application/x-bittorrent": { - "source": "apache", - "extensions": ["torrent"] - }, - "application/x-blorb": { - "source": "apache", - "extensions": ["blb","blorb"] - }, - "application/x-bzip": { - "source": "apache", - "compressible": false, - "extensions": ["bz"] - }, - "application/x-bzip2": { - "source": "apache", - "compressible": false, - "extensions": ["bz2","boz"] - }, - "application/x-cbr": { - "source": "apache", - "extensions": ["cbr","cba","cbt","cbz","cb7"] - }, - "application/x-cdlink": { - "source": "apache", - "extensions": ["vcd"] - }, - "application/x-cfs-compressed": { - "source": "apache", - "extensions": ["cfs"] - }, - "application/x-chat": { - "source": "apache", - "extensions": ["chat"] - }, - "application/x-chess-pgn": { - "source": "apache", - "extensions": ["pgn"] - }, - "application/x-chrome-extension": { - "extensions": ["crx"] - }, - "application/x-cocoa": { - "source": "nginx", - "extensions": ["cco"] - }, - "application/x-compress": { - "source": "apache" - }, - "application/x-conference": { - "source": "apache", - "extensions": ["nsc"] - }, - "application/x-cpio": { - "source": "apache", - "extensions": ["cpio"] - }, - "application/x-csh": { - "source": "apache", - "extensions": ["csh"] - }, - "application/x-deb": { - "compressible": false - }, - "application/x-debian-package": { - "source": "apache", - "extensions": ["deb","udeb"] - }, - "application/x-dgc-compressed": { - "source": "apache", - "extensions": ["dgc"] - }, - "application/x-director": { - "source": "apache", - "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"] - }, - "application/x-doom": { - "source": "apache", - "extensions": ["wad"] - }, - "application/x-dtbncx+xml": { - "source": "apache", - "compressible": true, - "extensions": ["ncx"] - }, - "application/x-dtbook+xml": { - "source": "apache", - "compressible": true, - "extensions": ["dtb"] - }, - "application/x-dtbresource+xml": { - "source": "apache", - "compressible": true, - "extensions": ["res"] - }, - "application/x-dvi": { - "source": "apache", - "compressible": false, - "extensions": ["dvi"] - }, - "application/x-envoy": { - "source": "apache", - "extensions": ["evy"] - }, - "application/x-eva": { - "source": "apache", - "extensions": ["eva"] - }, - "application/x-font-bdf": { - "source": "apache", - "extensions": ["bdf"] - }, - "application/x-font-dos": { - "source": "apache" - }, - "application/x-font-framemaker": { - "source": "apache" - }, - "application/x-font-ghostscript": { - "source": "apache", - "extensions": ["gsf"] - }, - "application/x-font-libgrx": { - "source": "apache" - }, - "application/x-font-linux-psf": { - "source": "apache", - "extensions": ["psf"] - }, - "application/x-font-pcf": { - "source": "apache", - "extensions": ["pcf"] - }, - "application/x-font-snf": { - "source": "apache", - "extensions": ["snf"] - }, - "application/x-font-speedo": { - "source": "apache" - }, - "application/x-font-sunos-news": { - "source": "apache" - }, - "application/x-font-type1": { - "source": "apache", - "extensions": ["pfa","pfb","pfm","afm"] - }, - "application/x-font-vfont": { - "source": "apache" - }, - "application/x-freearc": { - "source": "apache", - "extensions": ["arc"] - }, - "application/x-futuresplash": { - "source": "apache", - "extensions": ["spl"] - }, - "application/x-gca-compressed": { - "source": "apache", - "extensions": ["gca"] - }, - "application/x-glulx": { - "source": "apache", - "extensions": ["ulx"] - }, - "application/x-gnumeric": { - "source": "apache", - "extensions": ["gnumeric"] - }, - "application/x-gramps-xml": { - "source": "apache", - "extensions": ["gramps"] - }, - "application/x-gtar": { - "source": "apache", - "extensions": ["gtar"] - }, - "application/x-gzip": { - "source": "apache" - }, - "application/x-hdf": { - "source": "apache", - "extensions": ["hdf"] - }, - "application/x-httpd-php": { - "compressible": true, - "extensions": ["php"] - }, - "application/x-install-instructions": { - "source": "apache", - "extensions": ["install"] - }, - "application/x-iso9660-image": { - "source": "apache", - "extensions": ["iso"] - }, - "application/x-iwork-keynote-sffkey": { - "extensions": ["key"] - }, - "application/x-iwork-numbers-sffnumbers": { - "extensions": ["numbers"] - }, - "application/x-iwork-pages-sffpages": { - "extensions": ["pages"] - }, - "application/x-java-archive-diff": { - "source": "nginx", - "extensions": ["jardiff"] - }, - "application/x-java-jnlp-file": { - "source": "apache", - "compressible": false, - "extensions": ["jnlp"] - }, - "application/x-javascript": { - "compressible": true - }, - "application/x-keepass2": { - "extensions": ["kdbx"] - }, - "application/x-latex": { - "source": "apache", - "compressible": false, - "extensions": ["latex"] - }, - "application/x-lua-bytecode": { - "extensions": ["luac"] - }, - "application/x-lzh-compressed": { - "source": "apache", - "extensions": ["lzh","lha"] - }, - "application/x-makeself": { - "source": "nginx", - "extensions": ["run"] - }, - "application/x-mie": { - "source": "apache", - "extensions": ["mie"] - }, - "application/x-mobipocket-ebook": { - "source": "apache", - "extensions": ["prc","mobi"] - }, - "application/x-mpegurl": { - "compressible": false - }, - "application/x-ms-application": { - "source": "apache", - "extensions": ["application"] - }, - "application/x-ms-shortcut": { - "source": "apache", - "extensions": ["lnk"] - }, - "application/x-ms-wmd": { - "source": "apache", - "extensions": ["wmd"] - }, - "application/x-ms-wmz": { - "source": "apache", - "extensions": ["wmz"] - }, - "application/x-ms-xbap": { - "source": "apache", - "extensions": ["xbap"] - }, - "application/x-msaccess": { - "source": "apache", - "extensions": ["mdb"] - }, - "application/x-msbinder": { - "source": "apache", - "extensions": ["obd"] - }, - "application/x-mscardfile": { - "source": "apache", - "extensions": ["crd"] - }, - "application/x-msclip": { - "source": "apache", - "extensions": ["clp"] - }, - "application/x-msdos-program": { - "extensions": ["exe"] - }, - "application/x-msdownload": { - "source": "apache", - "extensions": ["exe","dll","com","bat","msi"] - }, - "application/x-msmediaview": { - "source": "apache", - "extensions": ["mvb","m13","m14"] - }, - "application/x-msmetafile": { - "source": "apache", - "extensions": ["wmf","wmz","emf","emz"] - }, - "application/x-msmoney": { - "source": "apache", - "extensions": ["mny"] - }, - "application/x-mspublisher": { - "source": "apache", - "extensions": ["pub"] - }, - "application/x-msschedule": { - "source": "apache", - "extensions": ["scd"] - }, - "application/x-msterminal": { - "source": "apache", - "extensions": ["trm"] - }, - "application/x-mswrite": { - "source": "apache", - "extensions": ["wri"] - }, - "application/x-netcdf": { - "source": "apache", - "extensions": ["nc","cdf"] - }, - "application/x-ns-proxy-autoconfig": { - "compressible": true, - "extensions": ["pac"] - }, - "application/x-nzb": { - "source": "apache", - "extensions": ["nzb"] - }, - "application/x-perl": { - "source": "nginx", - "extensions": ["pl","pm"] - }, - "application/x-pilot": { - "source": "nginx", - "extensions": ["prc","pdb"] - }, - "application/x-pkcs12": { - "source": "apache", - "compressible": false, - "extensions": ["p12","pfx"] - }, - "application/x-pkcs7-certificates": { - "source": "apache", - "extensions": ["p7b","spc"] - }, - "application/x-pkcs7-certreqresp": { - "source": "apache", - "extensions": ["p7r"] - }, - "application/x-pki-message": { - "source": "iana" - }, - "application/x-rar-compressed": { - "source": "apache", - "compressible": false, - "extensions": ["rar"] - }, - "application/x-redhat-package-manager": { - "source": "nginx", - "extensions": ["rpm"] - }, - "application/x-research-info-systems": { - "source": "apache", - "extensions": ["ris"] - }, - "application/x-sea": { - "source": "nginx", - "extensions": ["sea"] - }, - "application/x-sh": { - "source": "apache", - "compressible": true, - "extensions": ["sh"] - }, - "application/x-shar": { - "source": "apache", - "extensions": ["shar"] - }, - "application/x-shockwave-flash": { - "source": "apache", - "compressible": false, - "extensions": ["swf"] - }, - "application/x-silverlight-app": { - "source": "apache", - "extensions": ["xap"] - }, - "application/x-sql": { - "source": "apache", - "extensions": ["sql"] - }, - "application/x-stuffit": { - "source": "apache", - "compressible": false, - "extensions": ["sit"] - }, - "application/x-stuffitx": { - "source": "apache", - "extensions": ["sitx"] - }, - "application/x-subrip": { - "source": "apache", - "extensions": ["srt"] - }, - "application/x-sv4cpio": { - "source": "apache", - "extensions": ["sv4cpio"] - }, - "application/x-sv4crc": { - "source": "apache", - "extensions": ["sv4crc"] - }, - "application/x-t3vm-image": { - "source": "apache", - "extensions": ["t3"] - }, - "application/x-tads": { - "source": "apache", - "extensions": ["gam"] - }, - "application/x-tar": { - "source": "apache", - "compressible": true, - "extensions": ["tar"] - }, - "application/x-tcl": { - "source": "apache", - "extensions": ["tcl","tk"] - }, - "application/x-tex": { - "source": "apache", - "extensions": ["tex"] - }, - "application/x-tex-tfm": { - "source": "apache", - "extensions": ["tfm"] - }, - "application/x-texinfo": { - "source": "apache", - "extensions": ["texinfo","texi"] - }, - "application/x-tgif": { - "source": "apache", - "extensions": ["obj"] - }, - "application/x-ustar": { - "source": "apache", - "extensions": ["ustar"] - }, - "application/x-virtualbox-hdd": { - "compressible": true, - "extensions": ["hdd"] - }, - "application/x-virtualbox-ova": { - "compressible": true, - "extensions": ["ova"] - }, - "application/x-virtualbox-ovf": { - "compressible": true, - "extensions": ["ovf"] - }, - "application/x-virtualbox-vbox": { - "compressible": true, - "extensions": ["vbox"] - }, - "application/x-virtualbox-vbox-extpack": { - "compressible": false, - "extensions": ["vbox-extpack"] - }, - "application/x-virtualbox-vdi": { - "compressible": true, - "extensions": ["vdi"] - }, - "application/x-virtualbox-vhd": { - "compressible": true, - "extensions": ["vhd"] - }, - "application/x-virtualbox-vmdk": { - "compressible": true, - "extensions": ["vmdk"] - }, - "application/x-wais-source": { - "source": "apache", - "extensions": ["src"] - }, - "application/x-web-app-manifest+json": { - "compressible": true, - "extensions": ["webapp"] - }, - "application/x-www-form-urlencoded": { - "source": "iana", - "compressible": true - }, - "application/x-x509-ca-cert": { - "source": "iana", - "extensions": ["der","crt","pem"] - }, - "application/x-x509-ca-ra-cert": { - "source": "iana" - }, - "application/x-x509-next-ca-cert": { - "source": "iana" - }, - "application/x-xfig": { - "source": "apache", - "extensions": ["fig"] - }, - "application/x-xliff+xml": { - "source": "apache", - "compressible": true, - "extensions": ["xlf"] - }, - "application/x-xpinstall": { - "source": "apache", - "compressible": false, - "extensions": ["xpi"] - }, - "application/x-xz": { - "source": "apache", - "extensions": ["xz"] - }, - "application/x-zmachine": { - "source": "apache", - "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"] - }, - "application/x400-bp": { - "source": "iana" - }, - "application/xacml+xml": { - "source": "iana", - "compressible": true - }, - "application/xaml+xml": { - "source": "apache", - "compressible": true, - "extensions": ["xaml"] - }, - "application/xcap-att+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xav"] - }, - "application/xcap-caps+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xca"] - }, - "application/xcap-diff+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xdf"] - }, - "application/xcap-el+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xel"] - }, - "application/xcap-error+xml": { - "source": "iana", - "compressible": true - }, - "application/xcap-ns+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xns"] - }, - "application/xcon-conference-info+xml": { - "source": "iana", - "compressible": true - }, - "application/xcon-conference-info-diff+xml": { - "source": "iana", - "compressible": true - }, - "application/xenc+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xenc"] - }, - "application/xhtml+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xhtml","xht"] - }, - "application/xhtml-voice+xml": { - "source": "apache", - "compressible": true - }, - "application/xliff+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xlf"] - }, - "application/xml": { - "source": "iana", - "compressible": true, - "extensions": ["xml","xsl","xsd","rng"] - }, - "application/xml-dtd": { - "source": "iana", - "compressible": true, - "extensions": ["dtd"] - }, - "application/xml-external-parsed-entity": { - "source": "iana" - }, - "application/xml-patch+xml": { - "source": "iana", - "compressible": true - }, - "application/xmpp+xml": { - "source": "iana", - "compressible": true - }, - "application/xop+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xop"] - }, - "application/xproc+xml": { - "source": "apache", - "compressible": true, - "extensions": ["xpl"] - }, - "application/xslt+xml": { - "source": "iana", - "compressible": true, - "extensions": ["xsl","xslt"] - }, - "application/xspf+xml": { - "source": "apache", - "compressible": true, - "extensions": ["xspf"] - }, - "application/xv+xml": { - "source": "iana", - "compressible": true, - "extensions": ["mxml","xhvml","xvml","xvm"] - }, - "application/yang": { - "source": "iana", - "extensions": ["yang"] - }, - "application/yang-data+json": { - "source": "iana", - "compressible": true - }, - "application/yang-data+xml": { - "source": "iana", - "compressible": true - }, - "application/yang-patch+json": { - "source": "iana", - "compressible": true - }, - "application/yang-patch+xml": { - "source": "iana", - "compressible": true - }, - "application/yin+xml": { - "source": "iana", - "compressible": true, - "extensions": ["yin"] - }, - "application/zip": { - "source": "iana", - "compressible": false, - "extensions": ["zip"] - }, - "application/zlib": { - "source": "iana" - }, - "application/zstd": { - "source": "iana" - }, - "audio/1d-interleaved-parityfec": { - "source": "iana" - }, - "audio/32kadpcm": { - "source": "iana" - }, - "audio/3gpp": { - "source": "iana", - "compressible": false, - "extensions": ["3gpp"] - }, - "audio/3gpp2": { - "source": "iana" - }, - "audio/aac": { - "source": "iana" - }, - "audio/ac3": { - "source": "iana" - }, - "audio/adpcm": { - "source": "apache", - "extensions": ["adp"] - }, - "audio/amr": { - "source": "iana", - "extensions": ["amr"] - }, - "audio/amr-wb": { - "source": "iana" - }, - "audio/amr-wb+": { - "source": "iana" - }, - "audio/aptx": { - "source": "iana" - }, - "audio/asc": { - "source": "iana" - }, - "audio/atrac-advanced-lossless": { - "source": "iana" - }, - "audio/atrac-x": { - "source": "iana" - }, - "audio/atrac3": { - "source": "iana" - }, - "audio/basic": { - "source": "iana", - "compressible": false, - "extensions": ["au","snd"] - }, - "audio/bv16": { - "source": "iana" - }, - "audio/bv32": { - "source": "iana" - }, - "audio/clearmode": { - "source": "iana" - }, - "audio/cn": { - "source": "iana" - }, - "audio/dat12": { - "source": "iana" - }, - "audio/dls": { - "source": "iana" - }, - "audio/dsr-es201108": { - "source": "iana" - }, - "audio/dsr-es202050": { - "source": "iana" - }, - "audio/dsr-es202211": { - "source": "iana" - }, - "audio/dsr-es202212": { - "source": "iana" - }, - "audio/dv": { - "source": "iana" - }, - "audio/dvi4": { - "source": "iana" - }, - "audio/eac3": { - "source": "iana" - }, - "audio/encaprtp": { - "source": "iana" - }, - "audio/evrc": { - "source": "iana" - }, - "audio/evrc-qcp": { - "source": "iana" - }, - "audio/evrc0": { - "source": "iana" - }, - "audio/evrc1": { - "source": "iana" - }, - "audio/evrcb": { - "source": "iana" - }, - "audio/evrcb0": { - "source": "iana" - }, - "audio/evrcb1": { - "source": "iana" - }, - "audio/evrcnw": { - "source": "iana" - }, - "audio/evrcnw0": { - "source": "iana" - }, - "audio/evrcnw1": { - "source": "iana" - }, - "audio/evrcwb": { - "source": "iana" - }, - "audio/evrcwb0": { - "source": "iana" - }, - "audio/evrcwb1": { - "source": "iana" - }, - "audio/evs": { - "source": "iana" - }, - "audio/flexfec": { - "source": "iana" - }, - "audio/fwdred": { - "source": "iana" - }, - "audio/g711-0": { - "source": "iana" - }, - "audio/g719": { - "source": "iana" - }, - "audio/g722": { - "source": "iana" - }, - "audio/g7221": { - "source": "iana" - }, - "audio/g723": { - "source": "iana" - }, - "audio/g726-16": { - "source": "iana" - }, - "audio/g726-24": { - "source": "iana" - }, - "audio/g726-32": { - "source": "iana" - }, - "audio/g726-40": { - "source": "iana" - }, - "audio/g728": { - "source": "iana" - }, - "audio/g729": { - "source": "iana" - }, - "audio/g7291": { - "source": "iana" - }, - "audio/g729d": { - "source": "iana" - }, - "audio/g729e": { - "source": "iana" - }, - "audio/gsm": { - "source": "iana" - }, - "audio/gsm-efr": { - "source": "iana" - }, - "audio/gsm-hr-08": { - "source": "iana" - }, - "audio/ilbc": { - "source": "iana" - }, - "audio/ip-mr_v2.5": { - "source": "iana" - }, - "audio/isac": { - "source": "apache" - }, - "audio/l16": { - "source": "iana" - }, - "audio/l20": { - "source": "iana" - }, - "audio/l24": { - "source": "iana", - "compressible": false - }, - "audio/l8": { - "source": "iana" - }, - "audio/lpc": { - "source": "iana" - }, - "audio/melp": { - "source": "iana" - }, - "audio/melp1200": { - "source": "iana" - }, - "audio/melp2400": { - "source": "iana" - }, - "audio/melp600": { - "source": "iana" - }, - "audio/mhas": { - "source": "iana" - }, - "audio/midi": { - "source": "apache", - "extensions": ["mid","midi","kar","rmi"] - }, - "audio/mobile-xmf": { - "source": "iana", - "extensions": ["mxmf"] - }, - "audio/mp3": { - "compressible": false, - "extensions": ["mp3"] - }, - "audio/mp4": { - "source": "iana", - "compressible": false, - "extensions": ["m4a","mp4a"] - }, - "audio/mp4a-latm": { - "source": "iana" - }, - "audio/mpa": { - "source": "iana" - }, - "audio/mpa-robust": { - "source": "iana" - }, - "audio/mpeg": { - "source": "iana", - "compressible": false, - "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"] - }, - "audio/mpeg4-generic": { - "source": "iana" - }, - "audio/musepack": { - "source": "apache" - }, - "audio/ogg": { - "source": "iana", - "compressible": false, - "extensions": ["oga","ogg","spx","opus"] - }, - "audio/opus": { - "source": "iana" - }, - "audio/parityfec": { - "source": "iana" - }, - "audio/pcma": { - "source": "iana" - }, - "audio/pcma-wb": { - "source": "iana" - }, - "audio/pcmu": { - "source": "iana" - }, - "audio/pcmu-wb": { - "source": "iana" - }, - "audio/prs.sid": { - "source": "iana" - }, - "audio/qcelp": { - "source": "iana" - }, - "audio/raptorfec": { - "source": "iana" - }, - "audio/red": { - "source": "iana" - }, - "audio/rtp-enc-aescm128": { - "source": "iana" - }, - "audio/rtp-midi": { - "source": "iana" - }, - "audio/rtploopback": { - "source": "iana" - }, - "audio/rtx": { - "source": "iana" - }, - "audio/s3m": { - "source": "apache", - "extensions": ["s3m"] - }, - "audio/scip": { - "source": "iana" - }, - "audio/silk": { - "source": "apache", - "extensions": ["sil"] - }, - "audio/smv": { - "source": "iana" - }, - "audio/smv-qcp": { - "source": "iana" - }, - "audio/smv0": { - "source": "iana" - }, - "audio/sofa": { - "source": "iana" - }, - "audio/sp-midi": { - "source": "iana" - }, - "audio/speex": { - "source": "iana" - }, - "audio/t140c": { - "source": "iana" - }, - "audio/t38": { - "source": "iana" - }, - "audio/telephone-event": { - "source": "iana" - }, - "audio/tetra_acelp": { - "source": "iana" - }, - "audio/tetra_acelp_bb": { - "source": "iana" - }, - "audio/tone": { - "source": "iana" - }, - "audio/tsvcis": { - "source": "iana" - }, - "audio/uemclip": { - "source": "iana" - }, - "audio/ulpfec": { - "source": "iana" - }, - "audio/usac": { - "source": "iana" - }, - "audio/vdvi": { - "source": "iana" - }, - "audio/vmr-wb": { - "source": "iana" - }, - "audio/vnd.3gpp.iufp": { - "source": "iana" - }, - "audio/vnd.4sb": { - "source": "iana" - }, - "audio/vnd.audiokoz": { - "source": "iana" - }, - "audio/vnd.celp": { - "source": "iana" - }, - "audio/vnd.cisco.nse": { - "source": "iana" - }, - "audio/vnd.cmles.radio-events": { - "source": "iana" - }, - "audio/vnd.cns.anp1": { - "source": "iana" - }, - "audio/vnd.cns.inf1": { - "source": "iana" - }, - "audio/vnd.dece.audio": { - "source": "iana", - "extensions": ["uva","uvva"] - }, - "audio/vnd.digital-winds": { - "source": "iana", - "extensions": ["eol"] - }, - "audio/vnd.dlna.adts": { - "source": "iana" - }, - "audio/vnd.dolby.heaac.1": { - "source": "iana" - }, - "audio/vnd.dolby.heaac.2": { - "source": "iana" - }, - "audio/vnd.dolby.mlp": { - "source": "iana" - }, - "audio/vnd.dolby.mps": { - "source": "iana" - }, - "audio/vnd.dolby.pl2": { - "source": "iana" - }, - "audio/vnd.dolby.pl2x": { - "source": "iana" - }, - "audio/vnd.dolby.pl2z": { - "source": "iana" - }, - "audio/vnd.dolby.pulse.1": { - "source": "iana" - }, - "audio/vnd.dra": { - "source": "iana", - "extensions": ["dra"] - }, - "audio/vnd.dts": { - "source": "iana", - "extensions": ["dts"] - }, - "audio/vnd.dts.hd": { - "source": "iana", - "extensions": ["dtshd"] - }, - "audio/vnd.dts.uhd": { - "source": "iana" - }, - "audio/vnd.dvb.file": { - "source": "iana" - }, - "audio/vnd.everad.plj": { - "source": "iana" - }, - "audio/vnd.hns.audio": { - "source": "iana" - }, - "audio/vnd.lucent.voice": { - "source": "iana", - "extensions": ["lvp"] - }, - "audio/vnd.ms-playready.media.pya": { - "source": "iana", - "extensions": ["pya"] - }, - "audio/vnd.nokia.mobile-xmf": { - "source": "iana" - }, - "audio/vnd.nortel.vbk": { - "source": "iana" - }, - "audio/vnd.nuera.ecelp4800": { - "source": "iana", - "extensions": ["ecelp4800"] - }, - "audio/vnd.nuera.ecelp7470": { - "source": "iana", - "extensions": ["ecelp7470"] - }, - "audio/vnd.nuera.ecelp9600": { - "source": "iana", - "extensions": ["ecelp9600"] - }, - "audio/vnd.octel.sbc": { - "source": "iana" - }, - "audio/vnd.presonus.multitrack": { - "source": "iana" - }, - "audio/vnd.qcelp": { - "source": "iana" - }, - "audio/vnd.rhetorex.32kadpcm": { - "source": "iana" - }, - "audio/vnd.rip": { - "source": "iana", - "extensions": ["rip"] - }, - "audio/vnd.rn-realaudio": { - "compressible": false - }, - "audio/vnd.sealedmedia.softseal.mpeg": { - "source": "iana" - }, - "audio/vnd.vmx.cvsd": { - "source": "iana" - }, - "audio/vnd.wave": { - "compressible": false - }, - "audio/vorbis": { - "source": "iana", - "compressible": false - }, - "audio/vorbis-config": { - "source": "iana" - }, - "audio/wav": { - "compressible": false, - "extensions": ["wav"] - }, - "audio/wave": { - "compressible": false, - "extensions": ["wav"] - }, - "audio/webm": { - "source": "apache", - "compressible": false, - "extensions": ["weba"] - }, - "audio/x-aac": { - "source": "apache", - "compressible": false, - "extensions": ["aac"] - }, - "audio/x-aiff": { - "source": "apache", - "extensions": ["aif","aiff","aifc"] - }, - "audio/x-caf": { - "source": "apache", - "compressible": false, - "extensions": ["caf"] - }, - "audio/x-flac": { - "source": "apache", - "extensions": ["flac"] - }, - "audio/x-m4a": { - "source": "nginx", - "extensions": ["m4a"] - }, - "audio/x-matroska": { - "source": "apache", - "extensions": ["mka"] - }, - "audio/x-mpegurl": { - "source": "apache", - "extensions": ["m3u"] - }, - "audio/x-ms-wax": { - "source": "apache", - "extensions": ["wax"] - }, - "audio/x-ms-wma": { - "source": "apache", - "extensions": ["wma"] - }, - "audio/x-pn-realaudio": { - "source": "apache", - "extensions": ["ram","ra"] - }, - "audio/x-pn-realaudio-plugin": { - "source": "apache", - "extensions": ["rmp"] - }, - "audio/x-realaudio": { - "source": "nginx", - "extensions": ["ra"] - }, - "audio/x-tta": { - "source": "apache" - }, - "audio/x-wav": { - "source": "apache", - "extensions": ["wav"] - }, - "audio/xm": { - "source": "apache", - "extensions": ["xm"] - }, - "chemical/x-cdx": { - "source": "apache", - "extensions": ["cdx"] - }, - "chemical/x-cif": { - "source": "apache", - "extensions": ["cif"] - }, - "chemical/x-cmdf": { - "source": "apache", - "extensions": ["cmdf"] - }, - "chemical/x-cml": { - "source": "apache", - "extensions": ["cml"] - }, - "chemical/x-csml": { - "source": "apache", - "extensions": ["csml"] - }, - "chemical/x-pdb": { - "source": "apache" - }, - "chemical/x-xyz": { - "source": "apache", - "extensions": ["xyz"] - }, - "font/collection": { - "source": "iana", - "extensions": ["ttc"] - }, - "font/otf": { - "source": "iana", - "compressible": true, - "extensions": ["otf"] - }, - "font/sfnt": { - "source": "iana" - }, - "font/ttf": { - "source": "iana", - "compressible": true, - "extensions": ["ttf"] - }, - "font/woff": { - "source": "iana", - "extensions": ["woff"] - }, - "font/woff2": { - "source": "iana", - "extensions": ["woff2"] - }, - "image/aces": { - "source": "iana", - "extensions": ["exr"] - }, - "image/apng": { - "compressible": false, - "extensions": ["apng"] - }, - "image/avci": { - "source": "iana", - "extensions": ["avci"] - }, - "image/avcs": { - "source": "iana", - "extensions": ["avcs"] - }, - "image/avif": { - "source": "iana", - "compressible": false, - "extensions": ["avif"] - }, - "image/bmp": { - "source": "iana", - "compressible": true, - "extensions": ["bmp"] - }, - "image/cgm": { - "source": "iana", - "extensions": ["cgm"] - }, - "image/dicom-rle": { - "source": "iana", - "extensions": ["drle"] - }, - "image/emf": { - "source": "iana", - "extensions": ["emf"] - }, - "image/fits": { - "source": "iana", - "extensions": ["fits"] - }, - "image/g3fax": { - "source": "iana", - "extensions": ["g3"] - }, - "image/gif": { - "source": "iana", - "compressible": false, - "extensions": ["gif"] - }, - "image/heic": { - "source": "iana", - "extensions": ["heic"] - }, - "image/heic-sequence": { - "source": "iana", - "extensions": ["heics"] - }, - "image/heif": { - "source": "iana", - "extensions": ["heif"] - }, - "image/heif-sequence": { - "source": "iana", - "extensions": ["heifs"] - }, - "image/hej2k": { - "source": "iana", - "extensions": ["hej2"] - }, - "image/hsj2": { - "source": "iana", - "extensions": ["hsj2"] - }, - "image/ief": { - "source": "iana", - "extensions": ["ief"] - }, - "image/jls": { - "source": "iana", - "extensions": ["jls"] - }, - "image/jp2": { - "source": "iana", - "compressible": false, - "extensions": ["jp2","jpg2"] - }, - "image/jpeg": { - "source": "iana", - "compressible": false, - "extensions": ["jpeg","jpg","jpe"] - }, - "image/jph": { - "source": "iana", - "extensions": ["jph"] - }, - "image/jphc": { - "source": "iana", - "extensions": ["jhc"] - }, - "image/jpm": { - "source": "iana", - "compressible": false, - "extensions": ["jpm"] - }, - "image/jpx": { - "source": "iana", - "compressible": false, - "extensions": ["jpx","jpf"] - }, - "image/jxr": { - "source": "iana", - "extensions": ["jxr"] - }, - "image/jxra": { - "source": "iana", - "extensions": ["jxra"] - }, - "image/jxrs": { - "source": "iana", - "extensions": ["jxrs"] - }, - "image/jxs": { - "source": "iana", - "extensions": ["jxs"] - }, - "image/jxsc": { - "source": "iana", - "extensions": ["jxsc"] - }, - "image/jxsi": { - "source": "iana", - "extensions": ["jxsi"] - }, - "image/jxss": { - "source": "iana", - "extensions": ["jxss"] - }, - "image/ktx": { - "source": "iana", - "extensions": ["ktx"] - }, - "image/ktx2": { - "source": "iana", - "extensions": ["ktx2"] - }, - "image/naplps": { - "source": "iana" - }, - "image/pjpeg": { - "compressible": false - }, - "image/png": { - "source": "iana", - "compressible": false, - "extensions": ["png"] - }, - "image/prs.btif": { - "source": "iana", - "extensions": ["btif"] - }, - "image/prs.pti": { - "source": "iana", - "extensions": ["pti"] - }, - "image/pwg-raster": { - "source": "iana" - }, - "image/sgi": { - "source": "apache", - "extensions": ["sgi"] - }, - "image/svg+xml": { - "source": "iana", - "compressible": true, - "extensions": ["svg","svgz"] - }, - "image/t38": { - "source": "iana", - "extensions": ["t38"] - }, - "image/tiff": { - "source": "iana", - "compressible": false, - "extensions": ["tif","tiff"] - }, - "image/tiff-fx": { - "source": "iana", - "extensions": ["tfx"] - }, - "image/vnd.adobe.photoshop": { - "source": "iana", - "compressible": true, - "extensions": ["psd"] - }, - "image/vnd.airzip.accelerator.azv": { - "source": "iana", - "extensions": ["azv"] - }, - "image/vnd.cns.inf2": { - "source": "iana" - }, - "image/vnd.dece.graphic": { - "source": "iana", - "extensions": ["uvi","uvvi","uvg","uvvg"] - }, - "image/vnd.djvu": { - "source": "iana", - "extensions": ["djvu","djv"] - }, - "image/vnd.dvb.subtitle": { - "source": "iana", - "extensions": ["sub"] - }, - "image/vnd.dwg": { - "source": "iana", - "extensions": ["dwg"] - }, - "image/vnd.dxf": { - "source": "iana", - "extensions": ["dxf"] - }, - "image/vnd.fastbidsheet": { - "source": "iana", - "extensions": ["fbs"] - }, - "image/vnd.fpx": { - "source": "iana", - "extensions": ["fpx"] - }, - "image/vnd.fst": { - "source": "iana", - "extensions": ["fst"] - }, - "image/vnd.fujixerox.edmics-mmr": { - "source": "iana", - "extensions": ["mmr"] - }, - "image/vnd.fujixerox.edmics-rlc": { - "source": "iana", - "extensions": ["rlc"] - }, - "image/vnd.globalgraphics.pgb": { - "source": "iana" - }, - "image/vnd.microsoft.icon": { - "source": "iana", - "compressible": true, - "extensions": ["ico"] - }, - "image/vnd.mix": { - "source": "iana" - }, - "image/vnd.mozilla.apng": { - "source": "iana" - }, - "image/vnd.ms-dds": { - "compressible": true, - "extensions": ["dds"] - }, - "image/vnd.ms-modi": { - "source": "iana", - "extensions": ["mdi"] - }, - "image/vnd.ms-photo": { - "source": "apache", - "extensions": ["wdp"] - }, - "image/vnd.net-fpx": { - "source": "iana", - "extensions": ["npx"] - }, - "image/vnd.pco.b16": { - "source": "iana", - "extensions": ["b16"] - }, - "image/vnd.radiance": { - "source": "iana" - }, - "image/vnd.sealed.png": { - "source": "iana" - }, - "image/vnd.sealedmedia.softseal.gif": { - "source": "iana" - }, - "image/vnd.sealedmedia.softseal.jpg": { - "source": "iana" - }, - "image/vnd.svf": { - "source": "iana" - }, - "image/vnd.tencent.tap": { - "source": "iana", - "extensions": ["tap"] - }, - "image/vnd.valve.source.texture": { - "source": "iana", - "extensions": ["vtf"] - }, - "image/vnd.wap.wbmp": { - "source": "iana", - "extensions": ["wbmp"] - }, - "image/vnd.xiff": { - "source": "iana", - "extensions": ["xif"] - }, - "image/vnd.zbrush.pcx": { - "source": "iana", - "extensions": ["pcx"] - }, - "image/webp": { - "source": "apache", - "extensions": ["webp"] - }, - "image/wmf": { - "source": "iana", - "extensions": ["wmf"] - }, - "image/x-3ds": { - "source": "apache", - "extensions": ["3ds"] - }, - "image/x-cmu-raster": { - "source": "apache", - "extensions": ["ras"] - }, - "image/x-cmx": { - "source": "apache", - "extensions": ["cmx"] - }, - "image/x-freehand": { - "source": "apache", - "extensions": ["fh","fhc","fh4","fh5","fh7"] - }, - "image/x-icon": { - "source": "apache", - "compressible": true, - "extensions": ["ico"] - }, - "image/x-jng": { - "source": "nginx", - "extensions": ["jng"] - }, - "image/x-mrsid-image": { - "source": "apache", - "extensions": ["sid"] - }, - "image/x-ms-bmp": { - "source": "nginx", - "compressible": true, - "extensions": ["bmp"] - }, - "image/x-pcx": { - "source": "apache", - "extensions": ["pcx"] - }, - "image/x-pict": { - "source": "apache", - "extensions": ["pic","pct"] - }, - "image/x-portable-anymap": { - "source": "apache", - "extensions": ["pnm"] - }, - "image/x-portable-bitmap": { - "source": "apache", - "extensions": ["pbm"] - }, - "image/x-portable-graymap": { - "source": "apache", - "extensions": ["pgm"] - }, - "image/x-portable-pixmap": { - "source": "apache", - "extensions": ["ppm"] - }, - "image/x-rgb": { - "source": "apache", - "extensions": ["rgb"] - }, - "image/x-tga": { - "source": "apache", - "extensions": ["tga"] - }, - "image/x-xbitmap": { - "source": "apache", - "extensions": ["xbm"] - }, - "image/x-xcf": { - "compressible": false - }, - "image/x-xpixmap": { - "source": "apache", - "extensions": ["xpm"] - }, - "image/x-xwindowdump": { - "source": "apache", - "extensions": ["xwd"] - }, - "message/cpim": { - "source": "iana" - }, - "message/delivery-status": { - "source": "iana" - }, - "message/disposition-notification": { - "source": "iana", - "extensions": [ - "disposition-notification" - ] - }, - "message/external-body": { - "source": "iana" - }, - "message/feedback-report": { - "source": "iana" - }, - "message/global": { - "source": "iana", - "extensions": ["u8msg"] - }, - "message/global-delivery-status": { - "source": "iana", - "extensions": ["u8dsn"] - }, - "message/global-disposition-notification": { - "source": "iana", - "extensions": ["u8mdn"] - }, - "message/global-headers": { - "source": "iana", - "extensions": ["u8hdr"] - }, - "message/http": { - "source": "iana", - "compressible": false - }, - "message/imdn+xml": { - "source": "iana", - "compressible": true - }, - "message/news": { - "source": "iana" - }, - "message/partial": { - "source": "iana", - "compressible": false - }, - "message/rfc822": { - "source": "iana", - "compressible": true, - "extensions": ["eml","mime"] - }, - "message/s-http": { - "source": "iana" - }, - "message/sip": { - "source": "iana" - }, - "message/sipfrag": { - "source": "iana" - }, - "message/tracking-status": { - "source": "iana" - }, - "message/vnd.si.simp": { - "source": "iana" - }, - "message/vnd.wfa.wsc": { - "source": "iana", - "extensions": ["wsc"] - }, - "model/3mf": { - "source": "iana", - "extensions": ["3mf"] - }, - "model/e57": { - "source": "iana" - }, - "model/gltf+json": { - "source": "iana", - "compressible": true, - "extensions": ["gltf"] - }, - "model/gltf-binary": { - "source": "iana", - "compressible": true, - "extensions": ["glb"] - }, - "model/iges": { - "source": "iana", - "compressible": false, - "extensions": ["igs","iges"] - }, - "model/mesh": { - "source": "iana", - "compressible": false, - "extensions": ["msh","mesh","silo"] - }, - "model/mtl": { - "source": "iana", - "extensions": ["mtl"] - }, - "model/obj": { - "source": "iana", - "extensions": ["obj"] - }, - "model/step": { - "source": "iana" - }, - "model/step+xml": { - "source": "iana", - "compressible": true, - "extensions": ["stpx"] - }, - "model/step+zip": { - "source": "iana", - "compressible": false, - "extensions": ["stpz"] - }, - "model/step-xml+zip": { - "source": "iana", - "compressible": false, - "extensions": ["stpxz"] - }, - "model/stl": { - "source": "iana", - "extensions": ["stl"] - }, - "model/vnd.collada+xml": { - "source": "iana", - "compressible": true, - "extensions": ["dae"] - }, - "model/vnd.dwf": { - "source": "iana", - "extensions": ["dwf"] - }, - "model/vnd.flatland.3dml": { - "source": "iana" - }, - "model/vnd.gdl": { - "source": "iana", - "extensions": ["gdl"] - }, - "model/vnd.gs-gdl": { - "source": "apache" - }, - "model/vnd.gs.gdl": { - "source": "iana" - }, - "model/vnd.gtw": { - "source": "iana", - "extensions": ["gtw"] - }, - "model/vnd.moml+xml": { - "source": "iana", - "compressible": true - }, - "model/vnd.mts": { - "source": "iana", - "extensions": ["mts"] - }, - "model/vnd.opengex": { - "source": "iana", - "extensions": ["ogex"] - }, - "model/vnd.parasolid.transmit.binary": { - "source": "iana", - "extensions": ["x_b"] - }, - "model/vnd.parasolid.transmit.text": { - "source": "iana", - "extensions": ["x_t"] - }, - "model/vnd.pytha.pyox": { - "source": "iana" - }, - "model/vnd.rosette.annotated-data-model": { - "source": "iana" - }, - "model/vnd.sap.vds": { - "source": "iana", - "extensions": ["vds"] - }, - "model/vnd.usdz+zip": { - "source": "iana", - "compressible": false, - "extensions": ["usdz"] - }, - "model/vnd.valve.source.compiled-map": { - "source": "iana", - "extensions": ["bsp"] - }, - "model/vnd.vtu": { - "source": "iana", - "extensions": ["vtu"] - }, - "model/vrml": { - "source": "iana", - "compressible": false, - "extensions": ["wrl","vrml"] - }, - "model/x3d+binary": { - "source": "apache", - "compressible": false, - "extensions": ["x3db","x3dbz"] - }, - "model/x3d+fastinfoset": { - "source": "iana", - "extensions": ["x3db"] - }, - "model/x3d+vrml": { - "source": "apache", - "compressible": false, - "extensions": ["x3dv","x3dvz"] - }, - "model/x3d+xml": { - "source": "iana", - "compressible": true, - "extensions": ["x3d","x3dz"] - }, - "model/x3d-vrml": { - "source": "iana", - "extensions": ["x3dv"] - }, - "multipart/alternative": { - "source": "iana", - "compressible": false - }, - "multipart/appledouble": { - "source": "iana" - }, - "multipart/byteranges": { - "source": "iana" - }, - "multipart/digest": { - "source": "iana" - }, - "multipart/encrypted": { - "source": "iana", - "compressible": false - }, - "multipart/form-data": { - "source": "iana", - "compressible": false - }, - "multipart/header-set": { - "source": "iana" - }, - "multipart/mixed": { - "source": "iana" - }, - "multipart/multilingual": { - "source": "iana" - }, - "multipart/parallel": { - "source": "iana" - }, - "multipart/related": { - "source": "iana", - "compressible": false - }, - "multipart/report": { - "source": "iana" - }, - "multipart/signed": { - "source": "iana", - "compressible": false - }, - "multipart/vnd.bint.med-plus": { - "source": "iana" - }, - "multipart/voice-message": { - "source": "iana" - }, - "multipart/x-mixed-replace": { - "source": "iana" - }, - "text/1d-interleaved-parityfec": { - "source": "iana" - }, - "text/cache-manifest": { - "source": "iana", - "compressible": true, - "extensions": ["appcache","manifest"] - }, - "text/calendar": { - "source": "iana", - "extensions": ["ics","ifb"] - }, - "text/calender": { - "compressible": true - }, - "text/cmd": { - "compressible": true - }, - "text/coffeescript": { - "extensions": ["coffee","litcoffee"] - }, - "text/cql": { - "source": "iana" - }, - "text/cql-expression": { - "source": "iana" - }, - "text/cql-identifier": { - "source": "iana" - }, - "text/css": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["css"] - }, - "text/csv": { - "source": "iana", - "compressible": true, - "extensions": ["csv"] - }, - "text/csv-schema": { - "source": "iana" - }, - "text/directory": { - "source": "iana" - }, - "text/dns": { - "source": "iana" - }, - "text/ecmascript": { - "source": "iana" - }, - "text/encaprtp": { - "source": "iana" - }, - "text/enriched": { - "source": "iana" - }, - "text/fhirpath": { - "source": "iana" - }, - "text/flexfec": { - "source": "iana" - }, - "text/fwdred": { - "source": "iana" - }, - "text/gff3": { - "source": "iana" - }, - "text/grammar-ref-list": { - "source": "iana" - }, - "text/html": { - "source": "iana", - "compressible": true, - "extensions": ["html","htm","shtml"] - }, - "text/jade": { - "extensions": ["jade"] - }, - "text/javascript": { - "source": "iana", - "compressible": true - }, - "text/jcr-cnd": { - "source": "iana" - }, - "text/jsx": { - "compressible": true, - "extensions": ["jsx"] - }, - "text/less": { - "compressible": true, - "extensions": ["less"] - }, - "text/markdown": { - "source": "iana", - "compressible": true, - "extensions": ["markdown","md"] - }, - "text/mathml": { - "source": "nginx", - "extensions": ["mml"] - }, - "text/mdx": { - "compressible": true, - "extensions": ["mdx"] - }, - "text/mizar": { - "source": "iana" - }, - "text/n3": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["n3"] - }, - "text/parameters": { - "source": "iana", - "charset": "UTF-8" - }, - "text/parityfec": { - "source": "iana" - }, - "text/plain": { - "source": "iana", - "compressible": true, - "extensions": ["txt","text","conf","def","list","log","in","ini"] - }, - "text/provenance-notation": { - "source": "iana", - "charset": "UTF-8" - }, - "text/prs.fallenstein.rst": { - "source": "iana" - }, - "text/prs.lines.tag": { - "source": "iana", - "extensions": ["dsc"] - }, - "text/prs.prop.logic": { - "source": "iana" - }, - "text/raptorfec": { - "source": "iana" - }, - "text/red": { - "source": "iana" - }, - "text/rfc822-headers": { - "source": "iana" - }, - "text/richtext": { - "source": "iana", - "compressible": true, - "extensions": ["rtx"] - }, - "text/rtf": { - "source": "iana", - "compressible": true, - "extensions": ["rtf"] - }, - "text/rtp-enc-aescm128": { - "source": "iana" - }, - "text/rtploopback": { - "source": "iana" - }, - "text/rtx": { - "source": "iana" - }, - "text/sgml": { - "source": "iana", - "extensions": ["sgml","sgm"] - }, - "text/shaclc": { - "source": "iana" - }, - "text/shex": { - "source": "iana", - "extensions": ["shex"] - }, - "text/slim": { - "extensions": ["slim","slm"] - }, - "text/spdx": { - "source": "iana", - "extensions": ["spdx"] - }, - "text/strings": { - "source": "iana" - }, - "text/stylus": { - "extensions": ["stylus","styl"] - }, - "text/t140": { - "source": "iana" - }, - "text/tab-separated-values": { - "source": "iana", - "compressible": true, - "extensions": ["tsv"] - }, - "text/troff": { - "source": "iana", - "extensions": ["t","tr","roff","man","me","ms"] - }, - "text/turtle": { - "source": "iana", - "charset": "UTF-8", - "extensions": ["ttl"] - }, - "text/ulpfec": { - "source": "iana" - }, - "text/uri-list": { - "source": "iana", - "compressible": true, - "extensions": ["uri","uris","urls"] - }, - "text/vcard": { - "source": "iana", - "compressible": true, - "extensions": ["vcard"] - }, - "text/vnd.a": { - "source": "iana" - }, - "text/vnd.abc": { - "source": "iana" - }, - "text/vnd.ascii-art": { - "source": "iana" - }, - "text/vnd.curl": { - "source": "iana", - "extensions": ["curl"] - }, - "text/vnd.curl.dcurl": { - "source": "apache", - "extensions": ["dcurl"] - }, - "text/vnd.curl.mcurl": { - "source": "apache", - "extensions": ["mcurl"] - }, - "text/vnd.curl.scurl": { - "source": "apache", - "extensions": ["scurl"] - }, - "text/vnd.debian.copyright": { - "source": "iana", - "charset": "UTF-8" - }, - "text/vnd.dmclientscript": { - "source": "iana" - }, - "text/vnd.dvb.subtitle": { - "source": "iana", - "extensions": ["sub"] - }, - "text/vnd.esmertec.theme-descriptor": { - "source": "iana", - "charset": "UTF-8" - }, - "text/vnd.familysearch.gedcom": { - "source": "iana", - "extensions": ["ged"] - }, - "text/vnd.ficlab.flt": { - "source": "iana" - }, - "text/vnd.fly": { - "source": "iana", - "extensions": ["fly"] - }, - "text/vnd.fmi.flexstor": { - "source": "iana", - "extensions": ["flx"] - }, - "text/vnd.gml": { - "source": "iana" - }, - "text/vnd.graphviz": { - "source": "iana", - "extensions": ["gv"] - }, - "text/vnd.hans": { - "source": "iana" - }, - "text/vnd.hgl": { - "source": "iana" - }, - "text/vnd.in3d.3dml": { - "source": "iana", - "extensions": ["3dml"] - }, - "text/vnd.in3d.spot": { - "source": "iana", - "extensions": ["spot"] - }, - "text/vnd.iptc.newsml": { - "source": "iana" - }, - "text/vnd.iptc.nitf": { - "source": "iana" - }, - "text/vnd.latex-z": { - "source": "iana" - }, - "text/vnd.motorola.reflex": { - "source": "iana" - }, - "text/vnd.ms-mediapackage": { - "source": "iana" - }, - "text/vnd.net2phone.commcenter.command": { - "source": "iana" - }, - "text/vnd.radisys.msml-basic-layout": { - "source": "iana" - }, - "text/vnd.senx.warpscript": { - "source": "iana" - }, - "text/vnd.si.uricatalogue": { - "source": "iana" - }, - "text/vnd.sosi": { - "source": "iana" - }, - "text/vnd.sun.j2me.app-descriptor": { - "source": "iana", - "charset": "UTF-8", - "extensions": ["jad"] - }, - "text/vnd.trolltech.linguist": { - "source": "iana", - "charset": "UTF-8" - }, - "text/vnd.wap.si": { - "source": "iana" - }, - "text/vnd.wap.sl": { - "source": "iana" - }, - "text/vnd.wap.wml": { - "source": "iana", - "extensions": ["wml"] - }, - "text/vnd.wap.wmlscript": { - "source": "iana", - "extensions": ["wmls"] - }, - "text/vtt": { - "source": "iana", - "charset": "UTF-8", - "compressible": true, - "extensions": ["vtt"] - }, - "text/x-asm": { - "source": "apache", - "extensions": ["s","asm"] - }, - "text/x-c": { - "source": "apache", - "extensions": ["c","cc","cxx","cpp","h","hh","dic"] - }, - "text/x-component": { - "source": "nginx", - "extensions": ["htc"] - }, - "text/x-fortran": { - "source": "apache", - "extensions": ["f","for","f77","f90"] - }, - "text/x-gwt-rpc": { - "compressible": true - }, - "text/x-handlebars-template": { - "extensions": ["hbs"] - }, - "text/x-java-source": { - "source": "apache", - "extensions": ["java"] - }, - "text/x-jquery-tmpl": { - "compressible": true - }, - "text/x-lua": { - "extensions": ["lua"] - }, - "text/x-markdown": { - "compressible": true, - "extensions": ["mkd"] - }, - "text/x-nfo": { - "source": "apache", - "extensions": ["nfo"] - }, - "text/x-opml": { - "source": "apache", - "extensions": ["opml"] - }, - "text/x-org": { - "compressible": true, - "extensions": ["org"] - }, - "text/x-pascal": { - "source": "apache", - "extensions": ["p","pas"] - }, - "text/x-processing": { - "compressible": true, - "extensions": ["pde"] - }, - "text/x-sass": { - "extensions": ["sass"] - }, - "text/x-scss": { - "extensions": ["scss"] - }, - "text/x-setext": { - "source": "apache", - "extensions": ["etx"] - }, - "text/x-sfv": { - "source": "apache", - "extensions": ["sfv"] - }, - "text/x-suse-ymp": { - "compressible": true, - "extensions": ["ymp"] - }, - "text/x-uuencode": { - "source": "apache", - "extensions": ["uu"] - }, - "text/x-vcalendar": { - "source": "apache", - "extensions": ["vcs"] - }, - "text/x-vcard": { - "source": "apache", - "extensions": ["vcf"] - }, - "text/xml": { - "source": "iana", - "compressible": true, - "extensions": ["xml"] - }, - "text/xml-external-parsed-entity": { - "source": "iana" - }, - "text/yaml": { - "compressible": true, - "extensions": ["yaml","yml"] - }, - "video/1d-interleaved-parityfec": { - "source": "iana" - }, - "video/3gpp": { - "source": "iana", - "extensions": ["3gp","3gpp"] - }, - "video/3gpp-tt": { - "source": "iana" - }, - "video/3gpp2": { - "source": "iana", - "extensions": ["3g2"] - }, - "video/av1": { - "source": "iana" - }, - "video/bmpeg": { - "source": "iana" - }, - "video/bt656": { - "source": "iana" - }, - "video/celb": { - "source": "iana" - }, - "video/dv": { - "source": "iana" - }, - "video/encaprtp": { - "source": "iana" - }, - "video/ffv1": { - "source": "iana" - }, - "video/flexfec": { - "source": "iana" - }, - "video/h261": { - "source": "iana", - "extensions": ["h261"] - }, - "video/h263": { - "source": "iana", - "extensions": ["h263"] - }, - "video/h263-1998": { - "source": "iana" - }, - "video/h263-2000": { - "source": "iana" - }, - "video/h264": { - "source": "iana", - "extensions": ["h264"] - }, - "video/h264-rcdo": { - "source": "iana" - }, - "video/h264-svc": { - "source": "iana" - }, - "video/h265": { - "source": "iana" - }, - "video/iso.segment": { - "source": "iana", - "extensions": ["m4s"] - }, - "video/jpeg": { - "source": "iana", - "extensions": ["jpgv"] - }, - "video/jpeg2000": { - "source": "iana" - }, - "video/jpm": { - "source": "apache", - "extensions": ["jpm","jpgm"] - }, - "video/jxsv": { - "source": "iana" - }, - "video/mj2": { - "source": "iana", - "extensions": ["mj2","mjp2"] - }, - "video/mp1s": { - "source": "iana" - }, - "video/mp2p": { - "source": "iana" - }, - "video/mp2t": { - "source": "iana", - "extensions": ["ts"] - }, - "video/mp4": { - "source": "iana", - "compressible": false, - "extensions": ["mp4","mp4v","mpg4"] - }, - "video/mp4v-es": { - "source": "iana" - }, - "video/mpeg": { - "source": "iana", - "compressible": false, - "extensions": ["mpeg","mpg","mpe","m1v","m2v"] - }, - "video/mpeg4-generic": { - "source": "iana" - }, - "video/mpv": { - "source": "iana" - }, - "video/nv": { - "source": "iana" - }, - "video/ogg": { - "source": "iana", - "compressible": false, - "extensions": ["ogv"] - }, - "video/parityfec": { - "source": "iana" - }, - "video/pointer": { - "source": "iana" - }, - "video/quicktime": { - "source": "iana", - "compressible": false, - "extensions": ["qt","mov"] - }, - "video/raptorfec": { - "source": "iana" - }, - "video/raw": { - "source": "iana" - }, - "video/rtp-enc-aescm128": { - "source": "iana" - }, - "video/rtploopback": { - "source": "iana" - }, - "video/rtx": { - "source": "iana" - }, - "video/scip": { - "source": "iana" - }, - "video/smpte291": { - "source": "iana" - }, - "video/smpte292m": { - "source": "iana" - }, - "video/ulpfec": { - "source": "iana" - }, - "video/vc1": { - "source": "iana" - }, - "video/vc2": { - "source": "iana" - }, - "video/vnd.cctv": { - "source": "iana" - }, - "video/vnd.dece.hd": { - "source": "iana", - "extensions": ["uvh","uvvh"] - }, - "video/vnd.dece.mobile": { - "source": "iana", - "extensions": ["uvm","uvvm"] - }, - "video/vnd.dece.mp4": { - "source": "iana" - }, - "video/vnd.dece.pd": { - "source": "iana", - "extensions": ["uvp","uvvp"] - }, - "video/vnd.dece.sd": { - "source": "iana", - "extensions": ["uvs","uvvs"] - }, - "video/vnd.dece.video": { - "source": "iana", - "extensions": ["uvv","uvvv"] - }, - "video/vnd.directv.mpeg": { - "source": "iana" - }, - "video/vnd.directv.mpeg-tts": { - "source": "iana" - }, - "video/vnd.dlna.mpeg-tts": { - "source": "iana" - }, - "video/vnd.dvb.file": { - "source": "iana", - "extensions": ["dvb"] - }, - "video/vnd.fvt": { - "source": "iana", - "extensions": ["fvt"] - }, - "video/vnd.hns.video": { - "source": "iana" - }, - "video/vnd.iptvforum.1dparityfec-1010": { - "source": "iana" - }, - "video/vnd.iptvforum.1dparityfec-2005": { - "source": "iana" - }, - "video/vnd.iptvforum.2dparityfec-1010": { - "source": "iana" - }, - "video/vnd.iptvforum.2dparityfec-2005": { - "source": "iana" - }, - "video/vnd.iptvforum.ttsavc": { - "source": "iana" - }, - "video/vnd.iptvforum.ttsmpeg2": { - "source": "iana" - }, - "video/vnd.motorola.video": { - "source": "iana" - }, - "video/vnd.motorola.videop": { - "source": "iana" - }, - "video/vnd.mpegurl": { - "source": "iana", - "extensions": ["mxu","m4u"] - }, - "video/vnd.ms-playready.media.pyv": { - "source": "iana", - "extensions": ["pyv"] - }, - "video/vnd.nokia.interleaved-multimedia": { - "source": "iana" - }, - "video/vnd.nokia.mp4vr": { - "source": "iana" - }, - "video/vnd.nokia.videovoip": { - "source": "iana" - }, - "video/vnd.objectvideo": { - "source": "iana" - }, - "video/vnd.radgamettools.bink": { - "source": "iana" - }, - "video/vnd.radgamettools.smacker": { - "source": "iana" - }, - "video/vnd.sealed.mpeg1": { - "source": "iana" - }, - "video/vnd.sealed.mpeg4": { - "source": "iana" - }, - "video/vnd.sealed.swf": { - "source": "iana" - }, - "video/vnd.sealedmedia.softseal.mov": { - "source": "iana" - }, - "video/vnd.uvvu.mp4": { - "source": "iana", - "extensions": ["uvu","uvvu"] - }, - "video/vnd.vivo": { - "source": "iana", - "extensions": ["viv"] - }, - "video/vnd.youtube.yt": { - "source": "iana" - }, - "video/vp8": { - "source": "iana" - }, - "video/vp9": { - "source": "iana" - }, - "video/webm": { - "source": "apache", - "compressible": false, - "extensions": ["webm"] - }, - "video/x-f4v": { - "source": "apache", - "extensions": ["f4v"] - }, - "video/x-fli": { - "source": "apache", - "extensions": ["fli"] - }, - "video/x-flv": { - "source": "apache", - "compressible": false, - "extensions": ["flv"] - }, - "video/x-m4v": { - "source": "apache", - "extensions": ["m4v"] - }, - "video/x-matroska": { - "source": "apache", - "compressible": false, - "extensions": ["mkv","mk3d","mks"] - }, - "video/x-mng": { - "source": "apache", - "extensions": ["mng"] - }, - "video/x-ms-asf": { - "source": "apache", - "extensions": ["asf","asx"] - }, - "video/x-ms-vob": { - "source": "apache", - "extensions": ["vob"] - }, - "video/x-ms-wm": { - "source": "apache", - "extensions": ["wm"] - }, - "video/x-ms-wmv": { - "source": "apache", - "compressible": false, - "extensions": ["wmv"] - }, - "video/x-ms-wmx": { - "source": "apache", - "extensions": ["wmx"] - }, - "video/x-ms-wvx": { - "source": "apache", - "extensions": ["wvx"] - }, - "video/x-msvideo": { - "source": "apache", - "extensions": ["avi"] - }, - "video/x-sgi-movie": { - "source": "apache", - "extensions": ["movie"] - }, - "video/x-smv": { - "source": "apache", - "extensions": ["smv"] - }, - "x-conference/x-cooltalk": { - "source": "apache", - "extensions": ["ice"] - }, - "x-shader/x-fragment": { - "compressible": true - }, - "x-shader/x-vertex": { - "compressible": true - } -} diff --git a/node_modules/mime-db/index.js b/node_modules/mime-db/index.js deleted file mode 100644 index ec2be30..0000000 --- a/node_modules/mime-db/index.js +++ /dev/null @@ -1,12 +0,0 @@ -/*! - * mime-db - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015-2022 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * Module exports. - */ - -module.exports = require('./db.json') diff --git a/node_modules/mime-db/package.json b/node_modules/mime-db/package.json deleted file mode 100644 index 32c14b8..0000000 --- a/node_modules/mime-db/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "mime-db", - "description": "Media Type Database", - "version": "1.52.0", - "contributors": [ - "Douglas Christopher Wilson ", - "Jonathan Ong (http://jongleberry.com)", - "Robert Kieffer (http://github.com/broofa)" - ], - "license": "MIT", - "keywords": [ - "mime", - "db", - "type", - "types", - "database", - "charset", - "charsets" - ], - "repository": "jshttp/mime-db", - "devDependencies": { - "bluebird": "3.7.2", - "co": "4.6.0", - "cogent": "1.0.1", - "csv-parse": "4.16.3", - "eslint": "7.32.0", - "eslint-config-standard": "15.0.1", - "eslint-plugin-import": "2.25.4", - "eslint-plugin-markdown": "2.2.1", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "5.1.1", - "eslint-plugin-standard": "4.1.0", - "gnode": "0.1.2", - "media-typer": "1.1.0", - "mocha": "9.2.1", - "nyc": "15.1.0", - "raw-body": "2.5.0", - "stream-to-array": "2.3.0" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "README.md", - "db.json", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "build": "node scripts/build", - "fetch": "node scripts/fetch-apache && gnode scripts/fetch-iana && node scripts/fetch-nginx", - "lint": "eslint .", - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "update": "npm run fetch && npm run build", - "version": "node scripts/version-history.js && git add HISTORY.md" - } -} diff --git a/node_modules/mime-types/HISTORY.md b/node_modules/mime-types/HISTORY.md deleted file mode 100644 index c5043b7..0000000 --- a/node_modules/mime-types/HISTORY.md +++ /dev/null @@ -1,397 +0,0 @@ -2.1.35 / 2022-03-12 -=================== - - * deps: mime-db@1.52.0 - - Add extensions from IANA for more `image/*` types - - Add extension `.asc` to `application/pgp-keys` - - Add extensions to various XML types - - Add new upstream MIME types - -2.1.34 / 2021-11-08 -=================== - - * deps: mime-db@1.51.0 - - Add new upstream MIME types - -2.1.33 / 2021-10-01 -=================== - - * deps: mime-db@1.50.0 - - Add deprecated iWorks mime types and extensions - - Add new upstream MIME types - -2.1.32 / 2021-07-27 -=================== - - * deps: mime-db@1.49.0 - - Add extension `.trig` to `application/trig` - - Add new upstream MIME types - -2.1.31 / 2021-06-01 -=================== - - * deps: mime-db@1.48.0 - - Add extension `.mvt` to `application/vnd.mapbox-vector-tile` - - Add new upstream MIME types - -2.1.30 / 2021-04-02 -=================== - - * deps: mime-db@1.47.0 - - Add extension `.amr` to `audio/amr` - - Remove ambigious extensions from IANA for `application/*+xml` types - - Update primary extension to `.es` for `application/ecmascript` - -2.1.29 / 2021-02-17 -=================== - - * deps: mime-db@1.46.0 - - Add extension `.amr` to `audio/amr` - - Add extension `.m4s` to `video/iso.segment` - - Add extension `.opus` to `audio/ogg` - - Add new upstream MIME types - -2.1.28 / 2021-01-01 -=================== - - * deps: mime-db@1.45.0 - - Add `application/ubjson` with extension `.ubj` - - Add `image/avif` with extension `.avif` - - Add `image/ktx2` with extension `.ktx2` - - Add extension `.dbf` to `application/vnd.dbf` - - Add extension `.rar` to `application/vnd.rar` - - Add extension `.td` to `application/urc-targetdesc+xml` - - Add new upstream MIME types - - Fix extension of `application/vnd.apple.keynote` to be `.key` - -2.1.27 / 2020-04-23 -=================== - - * deps: mime-db@1.44.0 - - Add charsets from IANA - - Add extension `.cjs` to `application/node` - - Add new upstream MIME types - -2.1.26 / 2020-01-05 -=================== - - * deps: mime-db@1.43.0 - - Add `application/x-keepass2` with extension `.kdbx` - - Add extension `.mxmf` to `audio/mobile-xmf` - - Add extensions from IANA for `application/*+xml` types - - Add new upstream MIME types - -2.1.25 / 2019-11-12 -=================== - - * deps: mime-db@1.42.0 - - Add new upstream MIME types - - Add `application/toml` with extension `.toml` - - Add `image/vnd.ms-dds` with extension `.dds` - -2.1.24 / 2019-04-20 -=================== - - * deps: mime-db@1.40.0 - - Add extensions from IANA for `model/*` types - - Add `text/mdx` with extension `.mdx` - -2.1.23 / 2019-04-17 -=================== - - * deps: mime-db@~1.39.0 - - Add extensions `.siv` and `.sieve` to `application/sieve` - - Add new upstream MIME types - -2.1.22 / 2019-02-14 -=================== - - * deps: mime-db@~1.38.0 - - Add extension `.nq` to `application/n-quads` - - Add extension `.nt` to `application/n-triples` - - Add new upstream MIME types - -2.1.21 / 2018-10-19 -=================== - - * deps: mime-db@~1.37.0 - - Add extensions to HEIC image types - - Add new upstream MIME types - -2.1.20 / 2018-08-26 -=================== - - * deps: mime-db@~1.36.0 - - Add Apple file extensions from IANA - - Add extensions from IANA for `image/*` types - - Add new upstream MIME types - -2.1.19 / 2018-07-17 -=================== - - * deps: mime-db@~1.35.0 - - Add extension `.csl` to `application/vnd.citationstyles.style+xml` - - Add extension `.es` to `application/ecmascript` - - Add extension `.owl` to `application/rdf+xml` - - Add new upstream MIME types - - Add UTF-8 as default charset for `text/turtle` - -2.1.18 / 2018-02-16 -=================== - - * deps: mime-db@~1.33.0 - - Add `application/raml+yaml` with extension `.raml` - - Add `application/wasm` with extension `.wasm` - - Add `text/shex` with extension `.shex` - - Add extensions for JPEG-2000 images - - Add extensions from IANA for `message/*` types - - Add new upstream MIME types - - Update font MIME types - - Update `text/hjson` to registered `application/hjson` - -2.1.17 / 2017-09-01 -=================== - - * deps: mime-db@~1.30.0 - - Add `application/vnd.ms-outlook` - - Add `application/x-arj` - - Add extension `.mjs` to `application/javascript` - - Add glTF types and extensions - - Add new upstream MIME types - - Add `text/x-org` - - Add VirtualBox MIME types - - Fix `source` records for `video/*` types that are IANA - - Update `font/opentype` to registered `font/otf` - -2.1.16 / 2017-07-24 -=================== - - * deps: mime-db@~1.29.0 - - Add `application/fido.trusted-apps+json` - - Add extension `.wadl` to `application/vnd.sun.wadl+xml` - - Add extension `.gz` to `application/gzip` - - Add new upstream MIME types - - Update extensions `.md` and `.markdown` to be `text/markdown` - -2.1.15 / 2017-03-23 -=================== - - * deps: mime-db@~1.27.0 - - Add new mime types - - Add `image/apng` - -2.1.14 / 2017-01-14 -=================== - - * deps: mime-db@~1.26.0 - - Add new mime types - -2.1.13 / 2016-11-18 -=================== - - * deps: mime-db@~1.25.0 - - Add new mime types - -2.1.12 / 2016-09-18 -=================== - - * deps: mime-db@~1.24.0 - - Add new mime types - - Add `audio/mp3` - -2.1.11 / 2016-05-01 -=================== - - * deps: mime-db@~1.23.0 - - Add new mime types - -2.1.10 / 2016-02-15 -=================== - - * deps: mime-db@~1.22.0 - - Add new mime types - - Fix extension of `application/dash+xml` - - Update primary extension for `audio/mp4` - -2.1.9 / 2016-01-06 -================== - - * deps: mime-db@~1.21.0 - - Add new mime types - -2.1.8 / 2015-11-30 -================== - - * deps: mime-db@~1.20.0 - - Add new mime types - -2.1.7 / 2015-09-20 -================== - - * deps: mime-db@~1.19.0 - - Add new mime types - -2.1.6 / 2015-09-03 -================== - - * deps: mime-db@~1.18.0 - - Add new mime types - -2.1.5 / 2015-08-20 -================== - - * deps: mime-db@~1.17.0 - - Add new mime types - -2.1.4 / 2015-07-30 -================== - - * deps: mime-db@~1.16.0 - - Add new mime types - -2.1.3 / 2015-07-13 -================== - - * deps: mime-db@~1.15.0 - - Add new mime types - -2.1.2 / 2015-06-25 -================== - - * deps: mime-db@~1.14.0 - - Add new mime types - -2.1.1 / 2015-06-08 -================== - - * perf: fix deopt during mapping - -2.1.0 / 2015-06-07 -================== - - * Fix incorrectly treating extension-less file name as extension - - i.e. `'path/to/json'` will no longer return `application/json` - * Fix `.charset(type)` to accept parameters - * Fix `.charset(type)` to match case-insensitive - * Improve generation of extension to MIME mapping - * Refactor internals for readability and no argument reassignment - * Prefer `application/*` MIME types from the same source - * Prefer any type over `application/octet-stream` - * deps: mime-db@~1.13.0 - - Add nginx as a source - - Add new mime types - -2.0.14 / 2015-06-06 -=================== - - * deps: mime-db@~1.12.0 - - Add new mime types - -2.0.13 / 2015-05-31 -=================== - - * deps: mime-db@~1.11.0 - - Add new mime types - -2.0.12 / 2015-05-19 -=================== - - * deps: mime-db@~1.10.0 - - Add new mime types - -2.0.11 / 2015-05-05 -=================== - - * deps: mime-db@~1.9.1 - - Add new mime types - -2.0.10 / 2015-03-13 -=================== - - * deps: mime-db@~1.8.0 - - Add new mime types - -2.0.9 / 2015-02-09 -================== - - * deps: mime-db@~1.7.0 - - Add new mime types - - Community extensions ownership transferred from `node-mime` - -2.0.8 / 2015-01-29 -================== - - * deps: mime-db@~1.6.0 - - Add new mime types - -2.0.7 / 2014-12-30 -================== - - * deps: mime-db@~1.5.0 - - Add new mime types - - Fix various invalid MIME type entries - -2.0.6 / 2014-12-30 -================== - - * deps: mime-db@~1.4.0 - - Add new mime types - - Fix various invalid MIME type entries - - Remove example template MIME types - -2.0.5 / 2014-12-29 -================== - - * deps: mime-db@~1.3.1 - - Fix missing extensions - -2.0.4 / 2014-12-10 -================== - - * deps: mime-db@~1.3.0 - - Add new mime types - -2.0.3 / 2014-11-09 -================== - - * deps: mime-db@~1.2.0 - - Add new mime types - -2.0.2 / 2014-09-28 -================== - - * deps: mime-db@~1.1.0 - - Add new mime types - - Update charsets - -2.0.1 / 2014-09-07 -================== - - * Support Node.js 0.6 - -2.0.0 / 2014-09-02 -================== - - * Use `mime-db` - * Remove `.define()` - -1.0.2 / 2014-08-04 -================== - - * Set charset=utf-8 for `text/javascript` - -1.0.1 / 2014-06-24 -================== - - * Add `text/jsx` type - -1.0.0 / 2014-05-12 -================== - - * Return `false` for unknown types - * Set charset=utf-8 for `application/json` - -0.1.0 / 2014-05-02 -================== - - * Initial release diff --git a/node_modules/mime-types/LICENSE b/node_modules/mime-types/LICENSE deleted file mode 100644 index 0616607..0000000 --- a/node_modules/mime-types/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/mime-types/README.md b/node_modules/mime-types/README.md deleted file mode 100644 index 48d2fb4..0000000 --- a/node_modules/mime-types/README.md +++ /dev/null @@ -1,113 +0,0 @@ -# mime-types - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][ci-image]][ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -The ultimate javascript content-type utility. - -Similar to [the `mime@1.x` module](https://www.npmjs.com/package/mime), except: - -- __No fallbacks.__ Instead of naively returning the first available type, - `mime-types` simply returns `false`, so do - `var type = mime.lookup('unrecognized') || 'application/octet-stream'`. -- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`. -- No `.define()` functionality -- Bug fixes for `.lookup(path)` - -Otherwise, the API is compatible with `mime` 1.x. - -## Install - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install mime-types -``` - -## Adding Types - -All mime types are based on [mime-db](https://www.npmjs.com/package/mime-db), -so open a PR there if you'd like to add mime types. - -## API - -```js -var mime = require('mime-types') -``` - -All functions return `false` if input is invalid or not found. - -### mime.lookup(path) - -Lookup the content-type associated with a file. - -```js -mime.lookup('json') // 'application/json' -mime.lookup('.md') // 'text/markdown' -mime.lookup('file.html') // 'text/html' -mime.lookup('folder/file.js') // 'application/javascript' -mime.lookup('folder/.htaccess') // false - -mime.lookup('cats') // false -``` - -### mime.contentType(type) - -Create a full content-type header given a content-type or extension. -When given an extension, `mime.lookup` is used to get the matching -content-type, otherwise the given content-type is used. Then if the -content-type does not already have a `charset` parameter, `mime.charset` -is used to get the default charset and add to the returned content-type. - -```js -mime.contentType('markdown') // 'text/x-markdown; charset=utf-8' -mime.contentType('file.json') // 'application/json; charset=utf-8' -mime.contentType('text/html') // 'text/html; charset=utf-8' -mime.contentType('text/html; charset=iso-8859-1') // 'text/html; charset=iso-8859-1' - -// from a full path -mime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8' -``` - -### mime.extension(type) - -Get the default extension for a content-type. - -```js -mime.extension('application/octet-stream') // 'bin' -``` - -### mime.charset(type) - -Lookup the implied default charset of a content-type. - -```js -mime.charset('text/markdown') // 'UTF-8' -``` - -### var type = mime.types[extension] - -A map of content-types by extension. - -### [extensions...] = mime.extensions[type] - -A map of extensions by content-type. - -## License - -[MIT](LICENSE) - -[ci-image]: https://badgen.net/github/checks/jshttp/mime-types/master?label=ci -[ci-url]: https://github.com/jshttp/mime-types/actions/workflows/ci.yml -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-types/master -[coveralls-url]: https://coveralls.io/r/jshttp/mime-types?branch=master -[node-version-image]: https://badgen.net/npm/node/mime-types -[node-version-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/mime-types -[npm-url]: https://npmjs.org/package/mime-types -[npm-version-image]: https://badgen.net/npm/v/mime-types diff --git a/node_modules/mime-types/index.js b/node_modules/mime-types/index.js deleted file mode 100644 index b9f34d5..0000000 --- a/node_modules/mime-types/index.js +++ /dev/null @@ -1,188 +0,0 @@ -/*! - * mime-types - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var db = require('mime-db') -var extname = require('path').extname - -/** - * Module variables. - * @private - */ - -var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ -var TEXT_TYPE_REGEXP = /^text\//i - -/** - * Module exports. - * @public - */ - -exports.charset = charset -exports.charsets = { lookup: charset } -exports.contentType = contentType -exports.extension = extension -exports.extensions = Object.create(null) -exports.lookup = lookup -exports.types = Object.create(null) - -// Populate the extensions/types maps -populateMaps(exports.extensions, exports.types) - -/** - * Get the default charset for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ - -function charset (type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - var mime = match && db[match[1].toLowerCase()] - - if (mime && mime.charset) { - return mime.charset - } - - // default text/* to utf-8 - if (match && TEXT_TYPE_REGEXP.test(match[1])) { - return 'UTF-8' - } - - return false -} - -/** - * Create a full Content-Type header given a MIME type or extension. - * - * @param {string} str - * @return {boolean|string} - */ - -function contentType (str) { - // TODO: should this even be in this module? - if (!str || typeof str !== 'string') { - return false - } - - var mime = str.indexOf('/') === -1 - ? exports.lookup(str) - : str - - if (!mime) { - return false - } - - // TODO: use content-type or other module - if (mime.indexOf('charset') === -1) { - var charset = exports.charset(mime) - if (charset) mime += '; charset=' + charset.toLowerCase() - } - - return mime -} - -/** - * Get the default extension for a MIME type. - * - * @param {string} type - * @return {boolean|string} - */ - -function extension (type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - - // get extensions - var exts = match && exports.extensions[match[1].toLowerCase()] - - if (!exts || !exts.length) { - return false - } - - return exts[0] -} - -/** - * Lookup the MIME type for a file path/extension. - * - * @param {string} path - * @return {boolean|string} - */ - -function lookup (path) { - if (!path || typeof path !== 'string') { - return false - } - - // get the extension ("ext" or ".ext" or full path) - var extension = extname('x.' + path) - .toLowerCase() - .substr(1) - - if (!extension) { - return false - } - - return exports.types[extension] || false -} - -/** - * Populate the extensions and types maps. - * @private - */ - -function populateMaps (extensions, types) { - // source preference (least -> most) - var preference = ['nginx', 'apache', undefined, 'iana'] - - Object.keys(db).forEach(function forEachMimeType (type) { - var mime = db[type] - var exts = mime.extensions - - if (!exts || !exts.length) { - return - } - - // mime -> extensions - extensions[type] = exts - - // extension -> mime - for (var i = 0; i < exts.length; i++) { - var extension = exts[i] - - if (types[extension]) { - var from = preference.indexOf(db[types[extension]].source) - var to = preference.indexOf(mime.source) - - if (types[extension] !== 'application/octet-stream' && - (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { - // skip the remapping - continue - } - } - - // set the extension -> mime - types[extension] = type - } - }) -} diff --git a/node_modules/mime-types/package.json b/node_modules/mime-types/package.json deleted file mode 100644 index bbef696..0000000 --- a/node_modules/mime-types/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "mime-types", - "description": "The ultimate javascript content-type utility.", - "version": "2.1.35", - "contributors": [ - "Douglas Christopher Wilson ", - "Jeremiah Senkpiel (https://searchbeam.jit.su)", - "Jonathan Ong (http://jongleberry.com)" - ], - "license": "MIT", - "keywords": [ - "mime", - "types" - ], - "repository": "jshttp/mime-types", - "dependencies": { - "mime-db": "1.52.0" - }, - "devDependencies": { - "eslint": "7.32.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.25.4", - "eslint-plugin-markdown": "2.2.1", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "5.2.0", - "eslint-plugin-standard": "4.1.0", - "mocha": "9.2.2", - "nyc": "15.1.0" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "lint": "eslint .", - "test": "mocha --reporter spec test/test.js", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test" - } -} diff --git a/node_modules/mime/.npmignore b/node_modules/mime/.npmignore deleted file mode 100644 index e69de29..0000000 diff --git a/node_modules/mime/CHANGELOG.md b/node_modules/mime/CHANGELOG.md deleted file mode 100644 index f127535..0000000 --- a/node_modules/mime/CHANGELOG.md +++ /dev/null @@ -1,164 +0,0 @@ -# Changelog - -## v1.6.0 (24/11/2017) -*No changelog for this release.* - ---- - -## v2.0.4 (24/11/2017) -- [**closed**] Switch to mime-score module for resolving extension contention issues. [#182](https://github.com/broofa/node-mime/issues/182) -- [**closed**] Update mime-db to 1.31.0 in v1.x branch [#181](https://github.com/broofa/node-mime/issues/181) - ---- - -## v1.5.0 (22/11/2017) -- [**closed**] need ES5 version ready in npm package [#179](https://github.com/broofa/node-mime/issues/179) -- [**closed**] mime-db no trace of iWork - pages / numbers / etc. [#178](https://github.com/broofa/node-mime/issues/178) -- [**closed**] How it works in brownser ? [#176](https://github.com/broofa/node-mime/issues/176) -- [**closed**] Missing `./Mime` [#175](https://github.com/broofa/node-mime/issues/175) -- [**closed**] Vulnerable Regular Expression [#167](https://github.com/broofa/node-mime/issues/167) - ---- - -## v2.0.3 (25/09/2017) -*No changelog for this release.* - ---- - -## v1.4.1 (25/09/2017) -- [**closed**] Issue when bundling with webpack [#172](https://github.com/broofa/node-mime/issues/172) - ---- - -## v2.0.2 (15/09/2017) -- [**V2**] fs.readFileSync is not a function [#165](https://github.com/broofa/node-mime/issues/165) -- [**closed**] The extension for video/quicktime should map to .mov, not .qt [#164](https://github.com/broofa/node-mime/issues/164) -- [**V2**] [v2 Feedback request] Mime class API [#163](https://github.com/broofa/node-mime/issues/163) -- [**V2**] [v2 Feedback request] Resolving conflicts over extensions [#162](https://github.com/broofa/node-mime/issues/162) -- [**V2**] Allow callers to load module with official, full, or no defined types. [#161](https://github.com/broofa/node-mime/issues/161) -- [**V2**] Use "facets" to resolve extension conflicts [#160](https://github.com/broofa/node-mime/issues/160) -- [**V2**] Remove fs and path dependencies [#152](https://github.com/broofa/node-mime/issues/152) -- [**V2**] Default content-type should not be application/octet-stream [#139](https://github.com/broofa/node-mime/issues/139) -- [**V2**] reset mime-types [#124](https://github.com/broofa/node-mime/issues/124) -- [**V2**] Extensionless paths should return null or false [#113](https://github.com/broofa/node-mime/issues/113) - ---- - -## v2.0.1 (14/09/2017) -- [**closed**] Changelog for v2.0 does not mention breaking changes [#171](https://github.com/broofa/node-mime/issues/171) -- [**closed**] MIME breaking with 'class' declaration as it is without 'use strict mode' [#170](https://github.com/broofa/node-mime/issues/170) - ---- - -## v2.0.0 (12/09/2017) -- [**closed**] woff and woff2 [#168](https://github.com/broofa/node-mime/issues/168) - ---- - -## v1.4.0 (28/08/2017) -- [**closed**] support for ac3 voc files [#159](https://github.com/broofa/node-mime/issues/159) -- [**closed**] Help understanding change from application/xml to text/xml [#158](https://github.com/broofa/node-mime/issues/158) -- [**closed**] no longer able to override mimetype [#157](https://github.com/broofa/node-mime/issues/157) -- [**closed**] application/vnd.adobe.photoshop [#147](https://github.com/broofa/node-mime/issues/147) -- [**closed**] Directories should appear as something other than application/octet-stream [#135](https://github.com/broofa/node-mime/issues/135) -- [**closed**] requested features [#131](https://github.com/broofa/node-mime/issues/131) -- [**closed**] Make types.json loading optional? [#129](https://github.com/broofa/node-mime/issues/129) -- [**closed**] Cannot find module './types.json' [#120](https://github.com/broofa/node-mime/issues/120) -- [**V2**] .wav files show up as "audio/x-wav" instead of "audio/x-wave" [#118](https://github.com/broofa/node-mime/issues/118) -- [**closed**] Don't be a pain in the ass for node community [#108](https://github.com/broofa/node-mime/issues/108) -- [**closed**] don't make default_type global [#78](https://github.com/broofa/node-mime/issues/78) -- [**closed**] mime.extension() fails if the content-type is parameterized [#74](https://github.com/broofa/node-mime/issues/74) - ---- - -## v1.3.6 (11/05/2017) -- [**closed**] .md should be text/markdown as of March 2016 [#154](https://github.com/broofa/node-mime/issues/154) -- [**closed**] Error while installing mime [#153](https://github.com/broofa/node-mime/issues/153) -- [**closed**] application/manifest+json [#149](https://github.com/broofa/node-mime/issues/149) -- [**closed**] Dynamic adaptive streaming over HTTP (DASH) file extension typo [#141](https://github.com/broofa/node-mime/issues/141) -- [**closed**] charsets image/png undefined [#140](https://github.com/broofa/node-mime/issues/140) -- [**closed**] Mime-db dependency out of date [#130](https://github.com/broofa/node-mime/issues/130) -- [**closed**] how to support plist? [#126](https://github.com/broofa/node-mime/issues/126) -- [**closed**] how does .types file format look like? [#123](https://github.com/broofa/node-mime/issues/123) -- [**closed**] Feature: support for expanding MIME patterns [#121](https://github.com/broofa/node-mime/issues/121) -- [**closed**] DEBUG_MIME doesn't work [#117](https://github.com/broofa/node-mime/issues/117) - ---- - -## v1.3.4 (06/02/2015) -*No changelog for this release.* - ---- - -## v1.3.3 (06/02/2015) -*No changelog for this release.* - ---- - -## v1.3.1 (05/02/2015) -- [**closed**] Consider adding support for Handlebars .hbs file ending [#111](https://github.com/broofa/node-mime/issues/111) -- [**closed**] Consider adding support for hjson. [#110](https://github.com/broofa/node-mime/issues/110) -- [**closed**] Add mime type for Opus audio files [#94](https://github.com/broofa/node-mime/issues/94) -- [**closed**] Consider making the `Requesting New Types` information more visible [#77](https://github.com/broofa/node-mime/issues/77) - ---- - -## v1.3.0 (05/02/2015) -- [**closed**] Add common name? [#114](https://github.com/broofa/node-mime/issues/114) -- [**closed**] application/x-yaml [#104](https://github.com/broofa/node-mime/issues/104) -- [**closed**] Add mime type for WOFF file format 2.0 [#102](https://github.com/broofa/node-mime/issues/102) -- [**closed**] application/x-msi for .msi [#99](https://github.com/broofa/node-mime/issues/99) -- [**closed**] Add mimetype for gettext translation files [#98](https://github.com/broofa/node-mime/issues/98) -- [**closed**] collaborators [#88](https://github.com/broofa/node-mime/issues/88) -- [**closed**] getting errot in installation of mime module...any1 can help? [#87](https://github.com/broofa/node-mime/issues/87) -- [**closed**] should application/json's charset be utf8? [#86](https://github.com/broofa/node-mime/issues/86) -- [**closed**] Add "license" and "licenses" to package.json [#81](https://github.com/broofa/node-mime/issues/81) -- [**closed**] lookup with extension-less file on Windows returns wrong type [#68](https://github.com/broofa/node-mime/issues/68) - ---- - -## v1.2.11 (15/08/2013) -- [**closed**] Update mime.types [#65](https://github.com/broofa/node-mime/issues/65) -- [**closed**] Publish a new version [#63](https://github.com/broofa/node-mime/issues/63) -- [**closed**] README should state upfront that "application/octet-stream" is default for unknown extension [#55](https://github.com/broofa/node-mime/issues/55) -- [**closed**] Suggested improvement to the charset API [#52](https://github.com/broofa/node-mime/issues/52) - ---- - -## v1.2.10 (25/07/2013) -- [**closed**] Mime type for woff files should be application/font-woff and not application/x-font-woff [#62](https://github.com/broofa/node-mime/issues/62) -- [**closed**] node.types in conflict with mime.types [#51](https://github.com/broofa/node-mime/issues/51) - ---- - -## v1.2.9 (17/01/2013) -- [**closed**] Please update "mime" NPM [#49](https://github.com/broofa/node-mime/issues/49) -- [**closed**] Please add semicolon [#46](https://github.com/broofa/node-mime/issues/46) -- [**closed**] parse full mime types [#43](https://github.com/broofa/node-mime/issues/43) - ---- - -## v1.2.8 (10/01/2013) -- [**closed**] /js directory mime is application/javascript. Is it correct? [#47](https://github.com/broofa/node-mime/issues/47) -- [**closed**] Add mime types for lua code. [#45](https://github.com/broofa/node-mime/issues/45) - ---- - -## v1.2.7 (19/10/2012) -- [**closed**] cannot install 1.2.7 via npm [#41](https://github.com/broofa/node-mime/issues/41) -- [**closed**] Transfer ownership to @broofa [#36](https://github.com/broofa/node-mime/issues/36) -- [**closed**] it's wrong to set charset to UTF-8 for text [#30](https://github.com/broofa/node-mime/issues/30) -- [**closed**] Allow multiple instances of MIME types container [#27](https://github.com/broofa/node-mime/issues/27) - ---- - -## v1.2.5 (16/02/2012) -- [**closed**] When looking up a types, check hasOwnProperty [#23](https://github.com/broofa/node-mime/issues/23) -- [**closed**] Bump version to 1.2.2 [#18](https://github.com/broofa/node-mime/issues/18) -- [**closed**] No license [#16](https://github.com/broofa/node-mime/issues/16) -- [**closed**] Some types missing that are used by html5/css3 [#13](https://github.com/broofa/node-mime/issues/13) -- [**closed**] npm install fails for 1.2.1 [#12](https://github.com/broofa/node-mime/issues/12) -- [**closed**] image/pjpeg + image/x-png [#10](https://github.com/broofa/node-mime/issues/10) -- [**closed**] symlink [#8](https://github.com/broofa/node-mime/issues/8) -- [**closed**] gzip [#2](https://github.com/broofa/node-mime/issues/2) -- [**closed**] ALL CAPS filenames return incorrect mime type [#1](https://github.com/broofa/node-mime/issues/1) diff --git a/node_modules/mime/LICENSE b/node_modules/mime/LICENSE deleted file mode 100644 index d3f46f7..0000000 --- a/node_modules/mime/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2010 Benjamin Thomas, Robert Kieffer - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/mime/README.md b/node_modules/mime/README.md deleted file mode 100644 index 506fbe5..0000000 --- a/node_modules/mime/README.md +++ /dev/null @@ -1,90 +0,0 @@ -# mime - -Comprehensive MIME type mapping API based on mime-db module. - -## Install - -Install with [npm](http://github.com/isaacs/npm): - - npm install mime - -## Contributing / Testing - - npm run test - -## Command Line - - mime [path_string] - -E.g. - - > mime scripts/jquery.js - application/javascript - -## API - Queries - -### mime.lookup(path) -Get the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g. - -```js -var mime = require('mime'); - -mime.lookup('/path/to/file.txt'); // => 'text/plain' -mime.lookup('file.txt'); // => 'text/plain' -mime.lookup('.TXT'); // => 'text/plain' -mime.lookup('htm'); // => 'text/html' -``` - -### mime.default_type -Sets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.) - -### mime.extension(type) -Get the default extension for `type` - -```js -mime.extension('text/html'); // => 'html' -mime.extension('application/octet-stream'); // => 'bin' -``` - -### mime.charsets.lookup() - -Map mime-type to charset - -```js -mime.charsets.lookup('text/plain'); // => 'UTF-8' -``` - -(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.) - -## API - Defining Custom Types - -Custom type mappings can be added on a per-project basis via the following APIs. - -### mime.define() - -Add custom mime/extension mappings - -```js -mime.define({ - 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'], - 'application/x-my-type': ['x-mt', 'x-mtt'], - // etc ... -}); - -mime.lookup('x-sft'); // => 'text/x-some-format' -``` - -The first entry in the extensions array is returned by `mime.extension()`. E.g. - -```js -mime.extension('text/x-some-format'); // => 'x-sf' -``` - -### mime.load(filepath) - -Load mappings from an Apache ".types" format file - -```js -mime.load('./my_project.types'); -``` -The .types file format is simple - See the `types` dir for examples. diff --git a/node_modules/mime/cli.js b/node_modules/mime/cli.js deleted file mode 100644 index 20b1ffe..0000000 --- a/node_modules/mime/cli.js +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env node - -var mime = require('./mime.js'); -var file = process.argv[2]; -var type = mime.lookup(file); - -process.stdout.write(type + '\n'); - diff --git a/node_modules/mime/mime.js b/node_modules/mime/mime.js deleted file mode 100644 index d7efbde..0000000 --- a/node_modules/mime/mime.js +++ /dev/null @@ -1,108 +0,0 @@ -var path = require('path'); -var fs = require('fs'); - -function Mime() { - // Map of extension -> mime type - this.types = Object.create(null); - - // Map of mime type -> extension - this.extensions = Object.create(null); -} - -/** - * Define mimetype -> extension mappings. Each key is a mime-type that maps - * to an array of extensions associated with the type. The first extension is - * used as the default extension for the type. - * - * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']}); - * - * @param map (Object) type definitions - */ -Mime.prototype.define = function (map) { - for (var type in map) { - var exts = map[type]; - for (var i = 0; i < exts.length; i++) { - if (process.env.DEBUG_MIME && this.types[exts[i]]) { - console.warn((this._loading || "define()").replace(/.*\//, ''), 'changes "' + exts[i] + '" extension type from ' + - this.types[exts[i]] + ' to ' + type); - } - - this.types[exts[i]] = type; - } - - // Default extension is the first one we encounter - if (!this.extensions[type]) { - this.extensions[type] = exts[0]; - } - } -}; - -/** - * Load an Apache2-style ".types" file - * - * This may be called multiple times (it's expected). Where files declare - * overlapping types/extensions, the last file wins. - * - * @param file (String) path of file to load. - */ -Mime.prototype.load = function(file) { - this._loading = file; - // Read file and split into lines - var map = {}, - content = fs.readFileSync(file, 'ascii'), - lines = content.split(/[\r\n]+/); - - lines.forEach(function(line) { - // Clean up whitespace/comments, and split into fields - var fields = line.replace(/\s*#.*|^\s*|\s*$/g, '').split(/\s+/); - map[fields.shift()] = fields; - }); - - this.define(map); - - this._loading = null; -}; - -/** - * Lookup a mime type based on extension - */ -Mime.prototype.lookup = function(path, fallback) { - var ext = path.replace(/^.*[\.\/\\]/, '').toLowerCase(); - - return this.types[ext] || fallback || this.default_type; -}; - -/** - * Return file extension associated with a mime type - */ -Mime.prototype.extension = function(mimeType) { - var type = mimeType.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase(); - return this.extensions[type]; -}; - -// Default instance -var mime = new Mime(); - -// Define built-in types -mime.define(require('./types.json')); - -// Default type -mime.default_type = mime.lookup('bin'); - -// -// Additional API specific to the default instance -// - -mime.Mime = Mime; - -/** - * Lookup a charset based on mime type. - */ -mime.charsets = { - lookup: function(mimeType, fallback) { - // Assume text types are utf8 - return (/^text\/|^application\/(javascript|json)/).test(mimeType) ? 'UTF-8' : fallback; - } -}; - -module.exports = mime; diff --git a/node_modules/mime/package.json b/node_modules/mime/package.json deleted file mode 100644 index 6bd24bc..0000000 --- a/node_modules/mime/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "author": { - "name": "Robert Kieffer", - "url": "http://github.com/broofa", - "email": "robert@broofa.com" - }, - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - }, - "contributors": [ - { - "name": "Benjamin Thomas", - "url": "http://github.com/bentomas", - "email": "benjamin@benjaminthomas.org" - } - ], - "description": "A comprehensive library for mime-type mapping", - "license": "MIT", - "dependencies": {}, - "devDependencies": { - "github-release-notes": "0.13.1", - "mime-db": "1.31.0", - "mime-score": "1.1.0" - }, - "scripts": { - "prepare": "node src/build.js", - "changelog": "gren changelog --tags=all --generate --override", - "test": "node src/test.js" - }, - "keywords": [ - "util", - "mime" - ], - "main": "mime.js", - "name": "mime", - "repository": { - "url": "https://github.com/broofa/node-mime", - "type": "git" - }, - "version": "1.6.0" -} diff --git a/node_modules/mime/src/build.js b/node_modules/mime/src/build.js deleted file mode 100644 index 4928e48..0000000 --- a/node_modules/mime/src/build.js +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env node - -'use strict'; - -const fs = require('fs'); -const path = require('path'); -const mimeScore = require('mime-score'); - -let db = require('mime-db'); -let chalk = require('chalk'); - -const STANDARD_FACET_SCORE = 900; - -const byExtension = {}; - -// Clear out any conflict extensions in mime-db -for (let type in db) { - let entry = db[type]; - entry.type = type; - - if (!entry.extensions) continue; - - entry.extensions.forEach(ext => { - if (ext in byExtension) { - const e0 = entry; - const e1 = byExtension[ext]; - e0.pri = mimeScore(e0.type, e0.source); - e1.pri = mimeScore(e1.type, e1.source); - - let drop = e0.pri < e1.pri ? e0 : e1; - let keep = e0.pri >= e1.pri ? e0 : e1; - drop.extensions = drop.extensions.filter(e => e !== ext); - - console.log(`${ext}: Keeping ${chalk.green(keep.type)} (${keep.pri}), dropping ${chalk.red(drop.type)} (${drop.pri})`); - } - byExtension[ext] = entry; - }); -} - -function writeTypesFile(types, path) { - fs.writeFileSync(path, JSON.stringify(types)); -} - -// Segregate into standard and non-standard types based on facet per -// https://tools.ietf.org/html/rfc6838#section-3.1 -const types = {}; - -Object.keys(db).sort().forEach(k => { - const entry = db[k]; - types[entry.type] = entry.extensions; -}); - -writeTypesFile(types, path.join(__dirname, '..', 'types.json')); diff --git a/node_modules/mime/src/test.js b/node_modules/mime/src/test.js deleted file mode 100644 index 42958a2..0000000 --- a/node_modules/mime/src/test.js +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Usage: node test.js - */ - -var mime = require('../mime'); -var assert = require('assert'); -var path = require('path'); - -// -// Test mime lookups -// - -assert.equal('text/plain', mime.lookup('text.txt')); // normal file -assert.equal('text/plain', mime.lookup('TEXT.TXT')); // uppercase -assert.equal('text/plain', mime.lookup('dir/text.txt')); // dir + file -assert.equal('text/plain', mime.lookup('.text.txt')); // hidden file -assert.equal('text/plain', mime.lookup('.txt')); // nameless -assert.equal('text/plain', mime.lookup('txt')); // extension-only -assert.equal('text/plain', mime.lookup('/txt')); // extension-less () -assert.equal('text/plain', mime.lookup('\\txt')); // Windows, extension-less -assert.equal('application/octet-stream', mime.lookup('text.nope')); // unrecognized -assert.equal('fallback', mime.lookup('text.fallback', 'fallback')); // alternate default - -// -// Test extensions -// - -assert.equal('txt', mime.extension(mime.types.text)); -assert.equal('html', mime.extension(mime.types.htm)); -assert.equal('bin', mime.extension('application/octet-stream')); -assert.equal('bin', mime.extension('application/octet-stream ')); -assert.equal('html', mime.extension(' text/html; charset=UTF-8')); -assert.equal('html', mime.extension('text/html; charset=UTF-8 ')); -assert.equal('html', mime.extension('text/html; charset=UTF-8')); -assert.equal('html', mime.extension('text/html ; charset=UTF-8')); -assert.equal('html', mime.extension('text/html;charset=UTF-8')); -assert.equal('html', mime.extension('text/Html;charset=UTF-8')); -assert.equal(undefined, mime.extension('unrecognized')); - -// -// Test node.types lookups -// - -assert.equal('font/woff', mime.lookup('file.woff')); -assert.equal('application/octet-stream', mime.lookup('file.buffer')); -// TODO: Uncomment once #157 is resolved -// assert.equal('audio/mp4', mime.lookup('file.m4a')); -assert.equal('font/otf', mime.lookup('file.otf')); - -// -// Test charsets -// - -assert.equal('UTF-8', mime.charsets.lookup('text/plain')); -assert.equal('UTF-8', mime.charsets.lookup(mime.types.js)); -assert.equal('UTF-8', mime.charsets.lookup(mime.types.json)); -assert.equal(undefined, mime.charsets.lookup(mime.types.bin)); -assert.equal('fallback', mime.charsets.lookup('application/octet-stream', 'fallback')); - -console.log('\nAll tests passed'); diff --git a/node_modules/mime/types.json b/node_modules/mime/types.json deleted file mode 100644 index bec78ab..0000000 --- a/node_modules/mime/types.json +++ /dev/null @@ -1 +0,0 @@ -{"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/bdoc":["bdoc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":[],"application/font-woff2":[],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/prs.cww":["cww"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":[],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":[],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":[],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":[],"application/x-msdownload":["com","bat"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":[],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"application/xaml+xml":["xaml"],"application/xcap-diff+xml":["xdf"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":[],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp3":[],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/wav":["wav"],"audio/wave":[],"audio/webm":["weba"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":[],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":[],"audio/x-wav":[],"audio/xm":["xm"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/ktx":["ktx"],"image/png":["png"],"image/prs.btif":["btif"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/tiff":["tiff","tif"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":[],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/webp":["webp"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":[],"image/x-pcx":["pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/rfc822":["eml","mime"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.vtu":["vtu"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["x3db","x3dbz"],"model/x3d+vrml":["x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/hjson":["hjson"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/prs.lines.tag":["dsc"],"text/richtext":["rtx"],"text/rtf":[],"text/sgml":["sgml","sgm"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/vtt":["vtt"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":[],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"text/xml":[],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/webm":["webm"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]} \ No newline at end of file diff --git a/node_modules/minimatch/LICENSE b/node_modules/minimatch/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/minimatch/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/minimatch/README.md b/node_modules/minimatch/README.md deleted file mode 100644 index 60d8850..0000000 --- a/node_modules/minimatch/README.md +++ /dev/null @@ -1,267 +0,0 @@ -# minimatch - -A minimal matching utility. - -[![Build Status](https://travis-ci.org/isaacs/minimatch.svg?branch=master)](http://travis-ci.org/isaacs/minimatch) - - -This is the matching library used internally by npm. - -It works by converting glob expressions into JavaScript `RegExp` -objects. - -## Important Security Consideration! - -> [!WARNING] -> This library uses JavaScript regular expressions. Please read -> the following warning carefully, and be thoughtful about what -> you provide to this library in production systems. - -_Any_ library in JavaScript that deals with matching string -patterns using regular expressions will be subject to -[ReDoS](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS) -if the pattern is generated using untrusted input. - -Efforts have been made to mitigate risk as much as is feasible in -such a library, providing maximum recursion depths and so forth, -but these measures can only ultimately protect against accidents, -not malice. A dedicated attacker can _always_ find patterns that -cannot be defended against by a bash-compatible glob pattern -matching system that uses JavaScript regular expressions. - -To be extremely clear: - -> [!WARNING] -> **If you create a system where you take user input, and use -> that input as the source of a Regular Expression pattern, in -> this or any extant glob matcher in JavaScript, you will be -> pwned.** - -A future version of this library _may_ use a different matching -algorithm which does not exhibit backtracking problems. If and -when that happens, it will likely be a sweeping change, and those -improvements will **not** be backported to legacy versions. - -In the near term, it is not reasonable to continue to play -whack-a-mole with security advisories, and so any future ReDoS -reports will be considered "working as intended", and resolved -entirely by this warning. - -## Usage - -```javascript -var minimatch = require("minimatch") - -minimatch("bar.foo", "*.foo") // true! -minimatch("bar.foo", "*.bar") // false! -minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! -``` - -## Features - -Supports these glob features: - -* Brace Expansion -* Extended glob matching -* "Globstar" `**` matching - -See: - -* `man sh` -* `man bash` -* `man 3 fnmatch` -* `man 5 gitignore` - -## Minimatch Class - -Create a minimatch object by instantiating the `minimatch.Minimatch` class. - -```javascript -var Minimatch = require("minimatch").Minimatch -var mm = new Minimatch(pattern, options) -``` - -### Properties - -* `pattern` The original pattern the minimatch object represents. -* `options` The options supplied to the constructor. -* `set` A 2-dimensional array of regexp or string expressions. - Each row in the - array corresponds to a brace-expanded pattern. Each item in the row - corresponds to a single path-part. For example, the pattern - `{a,b/c}/d` would expand to a set of patterns like: - - [ [ a, d ] - , [ b, c, d ] ] - - If a portion of the pattern doesn't have any "magic" in it - (that is, it's something like `"foo"` rather than `fo*o?`), then it - will be left as a string rather than converted to a regular - expression. - -* `regexp` Created by the `makeRe` method. A single regular expression - expressing the entire pattern. This is useful in cases where you wish - to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. -* `negate` True if the pattern is negated. -* `comment` True if the pattern is a comment. -* `empty` True if the pattern is `""`. - -### Methods - -* `makeRe` Generate the `regexp` member if necessary, and return it. - Will return `false` if the pattern is invalid. -* `match(fname)` Return true if the filename matches the pattern, or - false otherwise. -* `matchOne(fileArray, patternArray, partial)` Take a `/`-split - filename, and match it against a single row in the `regExpSet`. This - method is mainly for internal use, but is exposed so that it can be - used by a glob-walker that needs to avoid excessive filesystem calls. - -All other methods are internal, and will be called as necessary. - -### minimatch(path, pattern, options) - -Main export. Tests a path against the pattern using the options. - -```javascript -var isJS = minimatch(file, "*.js", { matchBase: true }) -``` - -### minimatch.filter(pattern, options) - -Returns a function that tests its -supplied argument, suitable for use with `Array.filter`. Example: - -```javascript -var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) -``` - -### minimatch.match(list, pattern, options) - -Match against the list of -files, in the style of fnmatch or glob. If nothing is matched, and -options.nonull is set, then return a list containing the pattern itself. - -```javascript -var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) -``` - -### minimatch.makeRe(pattern, options) - -Make a regular expression object from the pattern. - -## Options - -All options are `false` by default. - -### debug - -Dump a ton of stuff to stderr. - -### nobrace - -Do not expand `{a,b}` and `{1..3}` brace sets. - -### noglobstar - -Disable `**` matching against multiple folder names. - -### dot - -Allow patterns to match filenames starting with a period, even if -the pattern does not explicitly have a period in that spot. - -Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` -is set. - -### noext - -Disable "extglob" style patterns like `+(a|b)`. - -### nocase - -Perform a case-insensitive match. - -### nonull - -When a match is not found by `minimatch.match`, return a list containing -the pattern itself if this option is set. When not set, an empty list -is returned if there are no matches. - -### matchBase - -If set, then patterns without slashes will be matched -against the basename of the path if it contains slashes. For example, -`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. - -### nocomment - -Suppress the behavior of treating `#` at the start of a pattern as a -comment. - -### nonegate - -Suppress the behavior of treating a leading `!` character as negation. - -### flipNegate - -Returns from negate expressions the same as if they were not negated. -(Ie, true on a hit, false on a miss.) - -### partial - -Compare a partial path to a pattern. As long as the parts of the path that -are present are not contradicted by the pattern, it will be treated as a -match. This is useful in applications where you're walking through a -folder structure, and don't yet have the full path, but want to ensure that -you do not walk down paths that can never be a match. - -For example, - -```js -minimatch('/a/b', '/a/*/c/d', { partial: true }) // true, might be /a/b/c/d -minimatch('/a/b', '/**/d', { partial: true }) // true, might be /a/b/.../d -minimatch('/x/y/z', '/a/**/z', { partial: true }) // false, because x !== a -``` - -### allowWindowsEscape - -Windows path separator `\` is by default converted to `/`, which -prohibits the usage of `\` as a escape character. This flag skips that -behavior and allows using the escape character. - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between minimatch and other -implementations, and are intentional. - -If the pattern starts with a `!` character, then it is negated. Set the -`nonegate` flag to suppress this behavior, and treat leading `!` -characters normally. This is perhaps relevant if you wish to start the -pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` -characters at the start of a pattern will negate the pattern multiple -times. - -If a pattern starts with `#`, then it is treated as a comment, and -will not match anything. Use `\#` to match a literal `#` at the -start of a line, or set the `nocomment` flag to suppress this behavior. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.1, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then minimatch.match returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. diff --git a/node_modules/minimatch/minimatch.js b/node_modules/minimatch/minimatch.js deleted file mode 100644 index 2e4a058..0000000 --- a/node_modules/minimatch/minimatch.js +++ /dev/null @@ -1,1005 +0,0 @@ -module.exports = minimatch -minimatch.Minimatch = Minimatch - -var path = (function () { try { return require('path') } catch (e) {}}()) || { - sep: '/' -} -minimatch.sep = path.sep - -var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} -var expand = require('brace-expansion') - -var plTypes = { - '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, - '?': { open: '(?:', close: ')?' }, - '+': { open: '(?:', close: ')+' }, - '*': { open: '(?:', close: ')*' }, - '@': { open: '(?:', close: ')' } -} - -// any single thing other than / -// don't need to escape / when using new RegExp() -var qmark = '[^/]' - -// * => any number of characters -var star = qmark + '*?' - -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' - -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' - -// characters that need to be escaped in RegExp. -var reSpecials = charSet('().*{}+?[]^$\\!') - -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split('').reduce(function (set, c) { - set[c] = true - return set - }, {}) -} - -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} - -function ext (a, b) { - b = b || {} - var t = {} - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || typeof def !== 'object' || !Object.keys(def).length) { - return minimatch - } - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - m.Minimatch.defaults = function defaults (options) { - return orig.defaults(ext(def, options)).Minimatch - } - - m.filter = function filter (pattern, options) { - return orig.filter(pattern, ext(def, options)) - } - - m.defaults = function defaults (options) { - return orig.defaults(ext(def, options)) - } - - m.makeRe = function makeRe (pattern, options) { - return orig.makeRe(pattern, ext(def, options)) - } - - m.braceExpand = function braceExpand (pattern, options) { - return orig.braceExpand(pattern, ext(def, options)) - } - - m.match = function (list, pattern, options) { - return orig.match(list, pattern, ext(def, options)) - } - - return m -} - -Minimatch.defaults = function (def) { - return minimatch.defaults(def).Minimatch -} - -function minimatch (p, pattern, options) { - assertValidPattern(pattern) - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false - } - - return new Minimatch(pattern, options).match(p) -} - -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options) - } - - assertValidPattern(pattern) - - if (!options) options = {} - - pattern = pattern.trim() - - // windows support: need to use /, not \ - if (!options.allowWindowsEscape && path.sep !== '/') { - pattern = pattern.split(path.sep).join('/') - } - - this.options = options - this.maxGlobstarRecursion = options.maxGlobstarRecursion !== undefined - ? options.maxGlobstarRecursion : 200 - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - this.partial = !!options.partial - - // make the set of regexps etc. - this.make() -} - -Minimatch.prototype.debug = function () {} - -Minimatch.prototype.make = make -function make () { - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - var set = this.globSet = this.braceExpand() - - if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) } - - this.debug(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) - - this.debug(this.pattern, set) - - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - this.debug(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return s.indexOf(false) === -1 - }) - - this.debug(this.pattern, set) - - this.set = set -} - -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - var negate = false - var options = this.options - var negateOffset = 0 - - if (options.nonegate) return - - for (var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === '!' - ; i++) { - negate = !negate - negateOffset++ - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) -} - -Minimatch.prototype.braceExpand = braceExpand - -function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options - } else { - options = {} - } - } - - pattern = typeof pattern === 'undefined' - ? this.pattern : pattern - - assertValidPattern(pattern) - - // Thanks to Yeting Li for - // improving this regexp to avoid a ReDOS vulnerability. - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - // shortcut. no need to expand. - return [pattern] - } - - return expand(pattern) -} - -var MAX_PATTERN_LENGTH = 1024 * 64 -var assertValidPattern = function (pattern) { - if (typeof pattern !== 'string') { - throw new TypeError('invalid pattern') - } - - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError('pattern is too long') - } -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - assertValidPattern(pattern) - - var options = this.options - - // shortcuts - if (pattern === '**') { - if (!options.noglobstar) - return GLOBSTAR - else - pattern = '*' - } - if (pattern === '') return '' - - var re = '' - var hasMagic = !!options.nocase - var escaping = false - // ? => one single character - var patternListStack = [] - var negativeLists = [] - var stateChar - var inClass = false - var reClassStart = -1 - var classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - var patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' - var self = this - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star - hasMagic = true - break - case '?': - re += qmark - hasMagic = true - break - default: - re += '\\' + stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } - - for (var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c) - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += '\\' + c - escaping = false - continue - } - - switch (c) { - /* istanbul ignore next */ - case '/': { - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - } - - case '\\': - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === '!' && i === classStart + 1) c = '^' - re += c - continue - } - - // coalesce consecutive non-globstar * characters - if (c === '*' && stateChar === '*') continue - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case '(': - if (inClass) { - re += '(' - continue - } - - if (!stateChar) { - re += '\\(' - continue - } - - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:' - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - - case ')': - if (inClass || !patternListStack.length) { - re += '\\)' - continue - } - - clearStateChar() - hasMagic = true - var pl = patternListStack.pop() - // negation is (?:(?!js)[^/]*) - // The others are (?:) - re += pl.close - if (pl.type === '!') { - negativeLists.push(pl) - } - pl.reEnd = re.length - continue - - case '|': - if (inClass || !patternListStack.length || escaping) { - re += '\\|' - escaping = false - continue - } - - clearStateChar() - re += '|' - continue - - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += '\\' + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c - escaping = false - continue - } - - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === '^' && inClass)) { - re += '\\' - } - - re += c - - } // switch - } // for - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.substr(classStart + 1) - sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length) - this.debug('setting tail', re, pl) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\' - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|' - }) - - this.debug('tail=%j\n %s', tail, tail, pl, re) - var t = pl.type === '*' ? star - : pl.type === '?' ? qmark - : '\\' + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) + t + '\\(' + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += '\\\\' - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case '[': case '.': case '(': addPatternStart = true - } - - // Hack to work around lack of negative lookbehind in JS - // A pattern like: *.!(x).!(y|z) needs to ensure that a name - // like 'a.xyz.yz' doesn't match. So, the first negative - // lookahead, has to look ALL the way ahead, to the end of - // the pattern. - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n] - - var nlBefore = re.slice(0, nl.reStart) - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) - var nlAfter = re.slice(nl.reEnd) - - nlLast += nlAfter - - // Handle nested stuff like *(*.js|!(*.json)), where open parens - // mean that we should *not* include the ) in the bit that is considered - // "after" the negated section. - var openParensBefore = nlBefore.split('(').length - 1 - var cleanAfter = nlAfter - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') - } - nlAfter = cleanAfter - - var dollar = '' - if (nlAfter === '' && isSub !== SUBPARSE) { - dollar = '$' - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast - re = newRe - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) { - re = '(?=.)' + re - } - - if (addPatternStart) { - re = patternStart + re - } - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? 'i' : '' - try { - var regExp = new RegExp('^' + re + '$', flags) - } catch (er) /* istanbul ignore next - should be impossible */ { - // If it was an invalid regular expression, then it can't match - // anything. This trick looks for a character after the end of - // the string, which is of course impossible, except in multi-line - // mode, but it's not a /m regex. - return new RegExp('$.') - } - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} - -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) { - this.regexp = false - return this.regexp - } - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - var flags = options.nocase ? 'i' : '' - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === 'string') ? regExpEscape(p) - : p._src - }).join('\\\/') - }).join('|') - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$' - - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$' - - try { - this.regexp = new RegExp(re, flags) - } catch (ex) /* istanbul ignore next - should be impossible */ { - this.regexp = false - } - return this.regexp -} - -minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -Minimatch.prototype.match = function match (f, partial) { - if (typeof partial === 'undefined') partial = this.partial - this.debug('match', f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === '' - - if (f === '/' && partial) return true - - var options = this.options - - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/') - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, 'split', f) - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - this.debug(this.pattern, 'set', set) - - // Find the basename of the path by looking for the last non-empty segment - var filename - var i - for (i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } - - for (i = 0; i < set.length; i++) { - var pattern = set[i] - var file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - if (pattern.indexOf(GLOBSTAR) !== -1) { - return this._matchGlobstar(file, pattern, partial, 0, 0) - } - return this._matchOne(file, pattern, partial, 0, 0) -} - -Minimatch.prototype._matchGlobstar = function (file, pattern, partial, fileIndex, patternIndex) { - var i - - // find first globstar from patternIndex - var firstgs = -1 - for (i = patternIndex; i < pattern.length; i++) { - if (pattern[i] === GLOBSTAR) { firstgs = i; break } - } - - // find last globstar - var lastgs = -1 - for (i = pattern.length - 1; i >= 0; i--) { - if (pattern[i] === GLOBSTAR) { lastgs = i; break } - } - - var head = pattern.slice(patternIndex, firstgs) - var body = partial ? pattern.slice(firstgs + 1) : pattern.slice(firstgs + 1, lastgs) - var tail = partial ? [] : pattern.slice(lastgs + 1) - - // check the head - if (head.length) { - var fileHead = file.slice(fileIndex, fileIndex + head.length) - if (!this._matchOne(fileHead, head, partial, 0, 0)) { - return false - } - fileIndex += head.length - } - - // check the tail - var fileTailMatch = 0 - if (tail.length) { - if (tail.length + fileIndex > file.length) return false - - var tailStart = file.length - tail.length - if (this._matchOne(file, tail, partial, tailStart, 0)) { - fileTailMatch = tail.length - } else { - // affordance for stuff like a/**/* matching a/b/ - if (file[file.length - 1] !== '' || - fileIndex + tail.length === file.length) { - return false - } - tailStart-- - if (!this._matchOne(file, tail, partial, tailStart, 0)) { - return false - } - fileTailMatch = tail.length + 1 - } - } - - // if body is empty (single ** between head and tail) - if (!body.length) { - var sawSome = !!fileTailMatch - for (i = fileIndex; i < file.length - fileTailMatch; i++) { - var f = String(file[i]) - sawSome = true - if (f === '.' || f === '..' || - (!this.options.dot && f.charAt(0) === '.')) { - return false - } - } - return partial || sawSome - } - - // split body into segments at each GLOBSTAR - var bodySegments = [[[], 0]] - var currentBody = bodySegments[0] - var nonGsParts = 0 - var nonGsPartsSums = [0] - for (var bi = 0; bi < body.length; bi++) { - var b = body[bi] - if (b === GLOBSTAR) { - nonGsPartsSums.push(nonGsParts) - currentBody = [[], 0] - bodySegments.push(currentBody) - } else { - currentBody[0].push(b) - nonGsParts++ - } - } - - var idx = bodySegments.length - 1 - var fileLength = file.length - fileTailMatch - for (var si = 0; si < bodySegments.length; si++) { - bodySegments[si][1] = fileLength - - (nonGsPartsSums[idx--] + bodySegments[si][0].length) - } - - return !!this._matchGlobStarBodySections( - file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch - ) -} - -// return false for "nope, not matching" -// return null for "not matching, cannot keep trying" -Minimatch.prototype._matchGlobStarBodySections = function ( - file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail -) { - var bs = bodySegments[bodyIndex] - if (!bs) { - // just make sure there are no bad dots - for (var i = fileIndex; i < file.length; i++) { - sawTail = true - var f = file[i] - if (f === '.' || f === '..' || - (!this.options.dot && f.charAt(0) === '.')) { - return false - } - } - return sawTail - } - - var body = bs[0] - var after = bs[1] - while (fileIndex <= after) { - var m = this._matchOne( - file.slice(0, fileIndex + body.length), - body, - partial, - fileIndex, - 0 - ) - // if limit exceeded, no match. intentional false negative, - // acceptable break in correctness for security. - if (m && globStarDepth < this.maxGlobstarRecursion) { - var sub = this._matchGlobStarBodySections( - file, bodySegments, - fileIndex + body.length, bodyIndex + 1, - partial, globStarDepth + 1, sawTail - ) - if (sub !== false) { - return sub - } - } - var f = file[fileIndex] - if (f === '.' || f === '..' || - (!this.options.dot && f.charAt(0) === '.')) { - return false - } - fileIndex++ - } - return partial || null -} - -Minimatch.prototype._matchOne = function (file, pattern, partial, fileIndex, patternIndex) { - var fi, pi, fl, pl - for ( - fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi++, pi++ - ) { - this.debug('matchOne loop') - var p = pattern[pi] - var f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - /* istanbul ignore if */ - if (p === false || p === GLOBSTAR) return false - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === 'string') { - hit = f === p - this.debug('string match', p, f, hit) - } else { - hit = f.match(p) - this.debug('pattern match', p, f, hit) - } - - if (!hit) return false - } - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else /* istanbul ignore else */ if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - return (fi === fl - 1) && (file[fi] === '') - } - - // should be unreachable. - /* istanbul ignore next */ - throw new Error('wtf?') -} - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, '$1') -} - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') -} diff --git a/node_modules/minimatch/package.json b/node_modules/minimatch/package.json deleted file mode 100644 index 563d218..0000000 --- a/node_modules/minimatch/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "author": "Isaac Z. Schlueter (http://blog.izs.me)", - "name": "minimatch", - "description": "a glob matcher in javascript", - "version": "3.1.5", - "publishConfig": { - "tag": "legacy-v3" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/minimatch.git" - }, - "main": "minimatch.js", - "scripts": { - "test": "tap", - "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --all; git push origin --tags" - }, - "engines": { - "node": "*" - }, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "devDependencies": { - "tap": "^15.1.6" - }, - "license": "ISC", - "files": [ - "minimatch.js" - ] -} diff --git a/node_modules/minimist/.eslintrc b/node_modules/minimist/.eslintrc deleted file mode 100644 index bd1a5e0..0000000 --- a/node_modules/minimist/.eslintrc +++ /dev/null @@ -1,29 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb/eslint-config/node/0.4", - - "rules": { - "array-element-newline": 0, - "complexity": 0, - "func-style": [2, "declaration"], - "max-lines-per-function": 0, - "max-nested-callbacks": 1, - "max-statements-per-line": 1, - "max-statements": 0, - "multiline-comment-style": 0, - "no-continue": 1, - "no-param-reassign": 1, - "no-restricted-syntax": 1, - "object-curly-newline": 0, - }, - - "overrides": [ - { - "files": "test/**", - "rules": { - "camelcase": 0, - }, - }, - ] -} diff --git a/node_modules/minimist/.github/FUNDING.yml b/node_modules/minimist/.github/FUNDING.yml deleted file mode 100644 index a936622..0000000 --- a/node_modules/minimist/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/minimist -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/minimist/.nycrc b/node_modules/minimist/.nycrc deleted file mode 100644 index 55c3d29..0000000 --- a/node_modules/minimist/.nycrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, - "exclude": [ - "coverage", - "example", - "test" - ] -} diff --git a/node_modules/minimist/CHANGELOG.md b/node_modules/minimist/CHANGELOG.md deleted file mode 100644 index c9a1e15..0000000 --- a/node_modules/minimist/CHANGELOG.md +++ /dev/null @@ -1,298 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.2.8](https://github.com/minimistjs/minimist/compare/v1.2.7...v1.2.8) - 2023-02-09 - -### Merged - -- [Fix] Fix long option followed by single dash [`#17`](https://github.com/minimistjs/minimist/pull/17) -- [Tests] Remove duplicate test [`#12`](https://github.com/minimistjs/minimist/pull/12) -- [Fix] opt.string works with multiple aliases [`#10`](https://github.com/minimistjs/minimist/pull/10) - -### Fixed - -- [Fix] Fix long option followed by single dash (#17) [`#15`](https://github.com/minimistjs/minimist/issues/15) -- [Tests] Remove duplicate test (#12) [`#8`](https://github.com/minimistjs/minimist/issues/8) -- [Fix] Fix long option followed by single dash [`#15`](https://github.com/minimistjs/minimist/issues/15) -- [Fix] opt.string works with multiple aliases (#10) [`#9`](https://github.com/minimistjs/minimist/issues/9) -- [Fix] Fix handling of short option with non-trivial equals [`#5`](https://github.com/minimistjs/minimist/issues/5) -- [Tests] Remove duplicate test [`#8`](https://github.com/minimistjs/minimist/issues/8) -- [Fix] opt.string works with multiple aliases [`#9`](https://github.com/minimistjs/minimist/issues/9) - -### Commits - -- Merge tag 'v0.2.3' [`a026794`](https://github.com/minimistjs/minimist/commit/a0267947c7870fc5847cf2d437fbe33f392767da) -- [eslint] fix indentation and whitespace [`5368ca4`](https://github.com/minimistjs/minimist/commit/5368ca4147e974138a54cc0dc4cea8f756546b70) -- [eslint] fix indentation and whitespace [`e5f5067`](https://github.com/minimistjs/minimist/commit/e5f5067259ceeaf0b098d14bec910f87e58708c7) -- [eslint] more cleanup [`62fde7d`](https://github.com/minimistjs/minimist/commit/62fde7d935f83417fb046741531a9e2346a36976) -- [eslint] more cleanup [`36ac5d0`](https://github.com/minimistjs/minimist/commit/36ac5d0d95e4947d074e5737d94814034ca335d1) -- [meta] add `auto-changelog` [`73923d2`](https://github.com/minimistjs/minimist/commit/73923d223553fca08b1ba77e3fbc2a492862ae4c) -- [actions] add reusable workflows [`d80727d`](https://github.com/minimistjs/minimist/commit/d80727df77bfa9e631044d7f16368d8f09242c91) -- [eslint] add eslint; rules to enable later are warnings [`48bc06a`](https://github.com/minimistjs/minimist/commit/48bc06a1b41f00e9cdf183db34f7a51ba70e98d4) -- [eslint] fix indentation [`34b0f1c`](https://github.com/minimistjs/minimist/commit/34b0f1ccaa45183c3c4f06a91f9b405180a6f982) -- [readme] rename and add badges [`5df0fe4`](https://github.com/minimistjs/minimist/commit/5df0fe49211bd09a3636f8686a7cb3012c3e98f0) -- [Dev Deps] switch from `covert` to `nyc` [`a48b128`](https://github.com/minimistjs/minimist/commit/a48b128fdb8d427dfb20a15273f83e38d97bef07) -- [Dev Deps] update `covert`, `tape`; remove unnecessary `tap` [`f0fb958`](https://github.com/minimistjs/minimist/commit/f0fb958e9a1fe980cdffc436a211b0bda58f621b) -- [meta] create FUNDING.yml; add `funding` in package.json [`3639e0c`](https://github.com/minimistjs/minimist/commit/3639e0c819359a366387e425ab6eabf4c78d3caa) -- [meta] use `npmignore` to autogenerate an npmignore file [`be2e038`](https://github.com/minimistjs/minimist/commit/be2e038c342d8333b32f0fde67a0026b79c8150e) -- Only apps should have lockfiles [`282b570`](https://github.com/minimistjs/minimist/commit/282b570e7489d01b03f2d6d3dabf79cd3e5f84cf) -- isConstructorOrProto adapted from PR [`ef9153f`](https://github.com/minimistjs/minimist/commit/ef9153fc52b6cea0744b2239921c5dcae4697f11) -- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`098873c`](https://github.com/minimistjs/minimist/commit/098873c213cdb7c92e55ae1ef5aa1af3a8192a79) -- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`3124ed3`](https://github.com/minimistjs/minimist/commit/3124ed3e46306301ebb3c834874ce0241555c2c4) -- [meta] add `safe-publish-latest` [`4b927de`](https://github.com/minimistjs/minimist/commit/4b927de696d561c636b4f43bf49d4597cb36d6d6) -- [Tests] add `aud` in `posttest` [`b32d9bd`](https://github.com/minimistjs/minimist/commit/b32d9bd0ab340f4e9f8c3a97ff2a4424f25fab8c) -- [meta] update repo URLs [`f9fdfc0`](https://github.com/minimistjs/minimist/commit/f9fdfc032c54884d9a9996a390c63cd0719bbe1a) -- [actions] Avoid 0.6 tests due to build failures [`ba92fe6`](https://github.com/minimistjs/minimist/commit/ba92fe6ebbdc0431cca9a2ea8f27beb492f5e4ec) -- [Dev Deps] update `tape` [`950eaa7`](https://github.com/minimistjs/minimist/commit/950eaa74f112e04d23e9c606c67472c46739b473) -- [Dev Deps] add missing `npmignore` dev dep [`3226afa`](https://github.com/minimistjs/minimist/commit/3226afaf09e9d127ca369742437fe6e88f752d6b) -- Merge tag 'v0.2.2' [`980d7ac`](https://github.com/minimistjs/minimist/commit/980d7ac61a0b4bd552711251ac107d506b23e41f) - -## [v1.2.7](https://github.com/minimistjs/minimist/compare/v1.2.6...v1.2.7) - 2022-10-10 - -### Commits - -- [meta] add `auto-changelog` [`0ebf4eb`](https://github.com/minimistjs/minimist/commit/0ebf4ebcd5f7787a5524d31a849ef41316b83c3c) -- [actions] add reusable workflows [`e115b63`](https://github.com/minimistjs/minimist/commit/e115b63fa9d3909f33b00a2db647ff79068388de) -- [eslint] add eslint; rules to enable later are warnings [`f58745b`](https://github.com/minimistjs/minimist/commit/f58745b9bb84348e1be72af7dbba5840c7c13013) -- [Dev Deps] switch from `covert` to `nyc` [`ab03356`](https://github.com/minimistjs/minimist/commit/ab033567b9c8b31117cb026dc7f1e592ce455c65) -- [readme] rename and add badges [`236f4a0`](https://github.com/minimistjs/minimist/commit/236f4a07e4ebe5ee44f1496ec6974991ab293ffd) -- [meta] create FUNDING.yml; add `funding` in package.json [`783a49b`](https://github.com/minimistjs/minimist/commit/783a49bfd47e8335d3098a8cac75662cf71eb32a) -- [meta] use `npmignore` to autogenerate an npmignore file [`f81ece6`](https://github.com/minimistjs/minimist/commit/f81ece6aaec2fa14e69ff4f1e0407a8c4e2635a2) -- Only apps should have lockfiles [`56cad44`](https://github.com/minimistjs/minimist/commit/56cad44c7f879b9bb5ec18fcc349308024a89bfc) -- [Dev Deps] update `covert`, `tape`; remove unnecessary `tap` [`49c5f9f`](https://github.com/minimistjs/minimist/commit/49c5f9fb7e6a92db9eb340cc679de92fb3aacded) -- [Tests] add `aud` in `posttest` [`228ae93`](https://github.com/minimistjs/minimist/commit/228ae938f3cd9db9dfd8bd7458b076a7b2aef280) -- [meta] add `safe-publish-latest` [`01fc23f`](https://github.com/minimistjs/minimist/commit/01fc23f5104f85c75059972e01dd33796ab529ff) -- [meta] update repo URLs [`6b164c7`](https://github.com/minimistjs/minimist/commit/6b164c7d68e0b6bf32f894699effdfb7c63041dd) - -## [v1.2.6](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.6) - 2022-03-21 - -### Commits - -- test from prototype pollution PR [`bc8ecee`](https://github.com/minimistjs/minimist/commit/bc8ecee43875261f4f17eb20b1243d3ed15e70eb) -- isConstructorOrProto adapted from PR [`c2b9819`](https://github.com/minimistjs/minimist/commit/c2b981977fa834b223b408cfb860f933c9811e4d) -- security notice for additional prototype pollution issue [`ef88b93`](https://github.com/minimistjs/minimist/commit/ef88b9325f77b5ee643ccfc97e2ebda577e4c4e2) - -## [v1.2.5](https://github.com/minimistjs/minimist/compare/v1.2.4...v1.2.5) - 2020-03-12 - -## [v1.2.4](https://github.com/minimistjs/minimist/compare/v1.2.3...v1.2.4) - 2020-03-11 - -### Commits - -- security notice [`4cf1354`](https://github.com/minimistjs/minimist/commit/4cf1354839cb972e38496d35e12f806eea92c11f) -- additional test for constructor prototype pollution [`1043d21`](https://github.com/minimistjs/minimist/commit/1043d212c3caaf871966e710f52cfdf02f9eea4b) - -## [v1.2.3](https://github.com/minimistjs/minimist/compare/v1.2.2...v1.2.3) - 2020-03-10 - -### Commits - -- more failing proto pollution tests [`13c01a5`](https://github.com/minimistjs/minimist/commit/13c01a5327736903704984b7f65616b8476850cc) -- even more aggressive checks for protocol pollution [`38a4d1c`](https://github.com/minimistjs/minimist/commit/38a4d1caead72ef99e824bb420a2528eec03d9ab) - -## [v1.2.2](https://github.com/minimistjs/minimist/compare/v1.2.1...v1.2.2) - 2020-03-10 - -### Commits - -- failing test for protocol pollution [`0efed03`](https://github.com/minimistjs/minimist/commit/0efed0340ec8433638758f7ca0c77cb20a0bfbab) -- cleanup [`67d3722`](https://github.com/minimistjs/minimist/commit/67d3722413448d00a62963d2d30c34656a92d7e2) -- console.dir -> console.log [`47acf72`](https://github.com/minimistjs/minimist/commit/47acf72c715a630bf9ea013867f47f1dd69dfc54) -- don't assign onto __proto__ [`63e7ed0`](https://github.com/minimistjs/minimist/commit/63e7ed05aa4b1889ec2f3b196426db4500cbda94) - -## [v1.2.1](https://github.com/minimistjs/minimist/compare/v1.2.0...v1.2.1) - 2020-03-10 - -### Merged - -- move the `opts['--']` example back where it belongs [`#63`](https://github.com/minimistjs/minimist/pull/63) - -### Commits - -- add test [`6be5dae`](https://github.com/minimistjs/minimist/commit/6be5dae35a32a987bcf4137fcd6c19c5200ee909) -- fix bad boolean regexp [`ac3fc79`](https://github.com/minimistjs/minimist/commit/ac3fc796e63b95128fdbdf67ea7fad71bd59aa76) - -## [v1.2.0](https://github.com/minimistjs/minimist/compare/v1.1.3...v1.2.0) - 2015-08-24 - -### Commits - -- failing -k=v short test [`63416b8`](https://github.com/minimistjs/minimist/commit/63416b8cd1d0d70e4714564cce465a36e4dd26d7) -- kv short fix [`6bbe145`](https://github.com/minimistjs/minimist/commit/6bbe14529166245e86424f220a2321442fe88dc3) -- failing kv short test [`f72ab7f`](https://github.com/minimistjs/minimist/commit/f72ab7f4572adc52902c9b6873cc969192f01b10) -- fixed kv test [`f5a48c3`](https://github.com/minimistjs/minimist/commit/f5a48c3e50e40ca54f00c8e84de4b4d6e9897fa8) -- enforce space between arg key and value [`86b321a`](https://github.com/minimistjs/minimist/commit/86b321affe648a8e016c095a4f0efa9d9074f502) - -## [v1.1.3](https://github.com/minimistjs/minimist/compare/v1.1.2...v1.1.3) - 2015-08-06 - -### Commits - -- add failing test - boolean alias array [`0fa3c5b`](https://github.com/minimistjs/minimist/commit/0fa3c5b3dd98551ddecf5392831b4c21211743fc) -- fix boolean values with multiple aliases [`9c0a6e7`](https://github.com/minimistjs/minimist/commit/9c0a6e7de25a273b11bbf9a7464f0bd833779795) - -## [v1.1.2](https://github.com/minimistjs/minimist/compare/v1.1.1...v1.1.2) - 2015-07-22 - -### Commits - -- Convert boolean arguments to boolean values [`8f3dc27`](https://github.com/minimistjs/minimist/commit/8f3dc27cf833f1d54671b6d0bcb55c2fe19672a9) -- use non-ancient npm, node 0.12 and iojs [`61ed1d0`](https://github.com/minimistjs/minimist/commit/61ed1d034b9ec7282764ce76f3992b1a0b4906ae) -- an older npm for 0.8 [`25cf778`](https://github.com/minimistjs/minimist/commit/25cf778b1220e7838a526832ad6972f75244054f) - -## [v1.1.1](https://github.com/minimistjs/minimist/compare/v1.1.0...v1.1.1) - 2015-03-10 - -### Commits - -- check that they type of a value is a boolean, not just that it is currently set to a boolean [`6863198`](https://github.com/minimistjs/minimist/commit/6863198e36139830ff1f20ffdceaddd93f2c1db9) -- upgrade tape, fix type issues from old tape version [`806712d`](https://github.com/minimistjs/minimist/commit/806712df91604ed02b8e39aa372b84aea659ee34) -- test for setting a boolean to a null default [`8c444fe`](https://github.com/minimistjs/minimist/commit/8c444fe89384ded7d441c120915ea60620b01dd3) -- if the previous value was a boolean, without an default (or with an alias) don't make an array either [`e5f419a`](https://github.com/minimistjs/minimist/commit/e5f419a3b5b3bc3f9e5ac71b7040621af70ed2dd) - -## [v1.1.0](https://github.com/minimistjs/minimist/compare/v1.0.0...v1.1.0) - 2014-08-10 - -### Commits - -- add support for handling "unknown" options not registered with the parser. [`6f3cc5d`](https://github.com/minimistjs/minimist/commit/6f3cc5d4e84524932a6ef2ce3592acc67cdd4383) -- reformat package.json [`02ed371`](https://github.com/minimistjs/minimist/commit/02ed37115194d3697ff358e8e25e5e66bab1d9f8) -- coverage script [`e5531ba`](https://github.com/minimistjs/minimist/commit/e5531ba0479da3b8138d3d8cac545d84ccb1c8df) -- extra fn to get 100% coverage again [`a6972da`](https://github.com/minimistjs/minimist/commit/a6972da89e56bf77642f8ec05a13b6558db93498) - -## [v1.0.0](https://github.com/minimistjs/minimist/compare/v0.2.3...v1.0.0) - 2014-08-10 - -### Commits - -- added stopEarly option [`471c7e4`](https://github.com/minimistjs/minimist/commit/471c7e4a7e910fc7ad8f9df850a186daf32c64e9) -- fix list [`fef6ae7`](https://github.com/minimistjs/minimist/commit/fef6ae79c38b9dc1c49569abb7cd04eb965eac5e) - -## [v0.2.3](https://github.com/minimistjs/minimist/compare/v0.2.2...v0.2.3) - 2023-02-09 - -### Merged - -- [Fix] Fix long option followed by single dash [`#17`](https://github.com/minimistjs/minimist/pull/17) -- [Tests] Remove duplicate test [`#12`](https://github.com/minimistjs/minimist/pull/12) -- [Fix] opt.string works with multiple aliases [`#10`](https://github.com/minimistjs/minimist/pull/10) - -### Fixed - -- [Fix] Fix long option followed by single dash (#17) [`#15`](https://github.com/minimistjs/minimist/issues/15) -- [Tests] Remove duplicate test (#12) [`#8`](https://github.com/minimistjs/minimist/issues/8) -- [Fix] opt.string works with multiple aliases (#10) [`#9`](https://github.com/minimistjs/minimist/issues/9) - -### Commits - -- [eslint] fix indentation and whitespace [`e5f5067`](https://github.com/minimistjs/minimist/commit/e5f5067259ceeaf0b098d14bec910f87e58708c7) -- [eslint] more cleanup [`36ac5d0`](https://github.com/minimistjs/minimist/commit/36ac5d0d95e4947d074e5737d94814034ca335d1) -- [eslint] fix indentation [`34b0f1c`](https://github.com/minimistjs/minimist/commit/34b0f1ccaa45183c3c4f06a91f9b405180a6f982) -- isConstructorOrProto adapted from PR [`ef9153f`](https://github.com/minimistjs/minimist/commit/ef9153fc52b6cea0744b2239921c5dcae4697f11) -- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`098873c`](https://github.com/minimistjs/minimist/commit/098873c213cdb7c92e55ae1ef5aa1af3a8192a79) -- [Dev Deps] add missing `npmignore` dev dep [`3226afa`](https://github.com/minimistjs/minimist/commit/3226afaf09e9d127ca369742437fe6e88f752d6b) - -## [v0.2.2](https://github.com/minimistjs/minimist/compare/v0.2.1...v0.2.2) - 2022-10-10 - -### Commits - -- [meta] add `auto-changelog` [`73923d2`](https://github.com/minimistjs/minimist/commit/73923d223553fca08b1ba77e3fbc2a492862ae4c) -- [actions] add reusable workflows [`d80727d`](https://github.com/minimistjs/minimist/commit/d80727df77bfa9e631044d7f16368d8f09242c91) -- [eslint] add eslint; rules to enable later are warnings [`48bc06a`](https://github.com/minimistjs/minimist/commit/48bc06a1b41f00e9cdf183db34f7a51ba70e98d4) -- [readme] rename and add badges [`5df0fe4`](https://github.com/minimistjs/minimist/commit/5df0fe49211bd09a3636f8686a7cb3012c3e98f0) -- [Dev Deps] switch from `covert` to `nyc` [`a48b128`](https://github.com/minimistjs/minimist/commit/a48b128fdb8d427dfb20a15273f83e38d97bef07) -- [Dev Deps] update `covert`, `tape`; remove unnecessary `tap` [`f0fb958`](https://github.com/minimistjs/minimist/commit/f0fb958e9a1fe980cdffc436a211b0bda58f621b) -- [meta] create FUNDING.yml; add `funding` in package.json [`3639e0c`](https://github.com/minimistjs/minimist/commit/3639e0c819359a366387e425ab6eabf4c78d3caa) -- [meta] use `npmignore` to autogenerate an npmignore file [`be2e038`](https://github.com/minimistjs/minimist/commit/be2e038c342d8333b32f0fde67a0026b79c8150e) -- Only apps should have lockfiles [`282b570`](https://github.com/minimistjs/minimist/commit/282b570e7489d01b03f2d6d3dabf79cd3e5f84cf) -- [meta] add `safe-publish-latest` [`4b927de`](https://github.com/minimistjs/minimist/commit/4b927de696d561c636b4f43bf49d4597cb36d6d6) -- [Tests] add `aud` in `posttest` [`b32d9bd`](https://github.com/minimistjs/minimist/commit/b32d9bd0ab340f4e9f8c3a97ff2a4424f25fab8c) -- [meta] update repo URLs [`f9fdfc0`](https://github.com/minimistjs/minimist/commit/f9fdfc032c54884d9a9996a390c63cd0719bbe1a) - -## [v0.2.1](https://github.com/minimistjs/minimist/compare/v0.2.0...v0.2.1) - 2020-03-12 - -## [v0.2.0](https://github.com/minimistjs/minimist/compare/v0.1.0...v0.2.0) - 2014-06-19 - -### Commits - -- support all-boolean mode [`450a97f`](https://github.com/minimistjs/minimist/commit/450a97f6e2bc85c7a4a13185c19a818d9a5ebe69) - -## [v0.1.0](https://github.com/minimistjs/minimist/compare/v0.0.10...v0.1.0) - 2014-05-12 - -### Commits - -- Provide a mechanism to segregate -- arguments [`ce4a1e6`](https://github.com/minimistjs/minimist/commit/ce4a1e63a7e8d5ab88d2a3768adefa6af98a445a) -- documented argv['--'] [`14db0e6`](https://github.com/minimistjs/minimist/commit/14db0e6dbc6d2b9e472adaa54dad7004b364634f) -- Adding a test-case for notFlags segregation [`715c1e3`](https://github.com/minimistjs/minimist/commit/715c1e3714be223f998f6c537af6b505f0236c16) - -## [v0.0.10](https://github.com/minimistjs/minimist/compare/v0.0.9...v0.0.10) - 2014-05-11 - -### Commits - -- dedicated boolean test [`46e448f`](https://github.com/minimistjs/minimist/commit/46e448f9f513cfeb2bcc8b688b9b47ba1e515c2b) -- dedicated num test [`9bf2d36`](https://github.com/minimistjs/minimist/commit/9bf2d36f1d3b8795be90b8f7de0a937f098aa394) -- aliased values treated as strings [`1ab743b`](https://github.com/minimistjs/minimist/commit/1ab743bad4484d69f1259bed42f9531de01119de) -- cover the case of already numbers, at 100% coverage [`b2bb044`](https://github.com/minimistjs/minimist/commit/b2bb04436599d77a2ce029e8e555e25b3aa55d13) -- another test for higher coverage [`3662624`](https://github.com/minimistjs/minimist/commit/3662624be976d5489d486a856849c048d13be903) - -## [v0.0.9](https://github.com/minimistjs/minimist/compare/v0.0.8...v0.0.9) - 2014-05-08 - -### Commits - -- Eliminate `longest` fn. [`824f642`](https://github.com/minimistjs/minimist/commit/824f642038d1b02ede68b6261d1d65163390929a) - -## [v0.0.8](https://github.com/minimistjs/minimist/compare/v0.0.7...v0.0.8) - 2014-02-20 - -### Commits - -- return '' if flag is string and empty [`fa63ed4`](https://github.com/minimistjs/minimist/commit/fa63ed4651a4ef4eefddce34188e0d98d745a263) -- handle joined single letters [`66c248f`](https://github.com/minimistjs/minimist/commit/66c248f0241d4d421d193b022e9e365f11178534) - -## [v0.0.7](https://github.com/minimistjs/minimist/compare/v0.0.6...v0.0.7) - 2014-02-08 - -### Commits - -- another swap of .test for .match [`d1da408`](https://github.com/minimistjs/minimist/commit/d1da40819acbe846d89a5c02721211e3c1260dde) - -## [v0.0.6](https://github.com/minimistjs/minimist/compare/v0.0.5...v0.0.6) - 2014-02-08 - -### Commits - -- use .test() instead of .match() to not crash on non-string values in the arguments array [`7e0d1ad`](https://github.com/minimistjs/minimist/commit/7e0d1add8c9e5b9b20a4d3d0f9a94d824c578da1) - -## [v0.0.5](https://github.com/minimistjs/minimist/compare/v0.0.4...v0.0.5) - 2013-09-18 - -### Commits - -- Improve '--' handling. [`b11822c`](https://github.com/minimistjs/minimist/commit/b11822c09cc9d2460f30384d12afc0b953c037a4) - -## [v0.0.4](https://github.com/minimistjs/minimist/compare/v0.0.3...v0.0.4) - 2013-09-17 - -## [v0.0.3](https://github.com/minimistjs/minimist/compare/v0.0.2...v0.0.3) - 2013-09-12 - -### Commits - -- failing test for single dash preceeding a double dash [`b465514`](https://github.com/minimistjs/minimist/commit/b465514b82c9ae28972d714facd951deb2ad762b) -- fix for the dot test [`6a095f1`](https://github.com/minimistjs/minimist/commit/6a095f1d364c8fab2d6753d2291a0649315d297a) - -## [v0.0.2](https://github.com/minimistjs/minimist/compare/v0.0.1...v0.0.2) - 2013-08-28 - -### Commits - -- allow dotted aliases & defaults [`321c33e`](https://github.com/minimistjs/minimist/commit/321c33e755485faaeb44eeb1c05d33b2e0a5a7c4) -- use a better version of ff [`e40f611`](https://github.com/minimistjs/minimist/commit/e40f61114cf7be6f7947f7b3eed345853a67dbbb) - -## [v0.0.1](https://github.com/minimistjs/minimist/compare/v0.0.0...v0.0.1) - 2013-06-25 - -### Commits - -- remove trailing commas [`6ff0fa0`](https://github.com/minimistjs/minimist/commit/6ff0fa055064f15dbe06d50b89d5173a6796e1db) - -## v0.0.0 - 2013-06-25 - -### Commits - -- half of the parse test ported [`3079326`](https://github.com/minimistjs/minimist/commit/307932601325087de6cf94188eb798ffc4f3088a) -- stripped down code and a passing test from optimist [`7cced88`](https://github.com/minimistjs/minimist/commit/7cced88d82e399d1a03ed23eb667f04d3f320d10) -- ported parse tests completely over [`9448754`](https://github.com/minimistjs/minimist/commit/944875452e0820df6830b1408c26a0f7d3e1db04) -- docs, package.json [`a5bf46a`](https://github.com/minimistjs/minimist/commit/a5bf46ac9bb3bd114a9c340276c62c1091e538d5) -- move more short tests into short.js [`503edb5`](https://github.com/minimistjs/minimist/commit/503edb5c41d89c0d40831ee517154fc13b0f18b9) -- default bool test was wrong, not the code [`1b9f5db`](https://github.com/minimistjs/minimist/commit/1b9f5db4741b49962846081b68518de824992097) -- passing long tests ripped out of parse.js [`7972c4a`](https://github.com/minimistjs/minimist/commit/7972c4aff1f4803079e1668006658e2a761a0428) -- badges [`84c0370`](https://github.com/minimistjs/minimist/commit/84c037063664d42878aace715fe6572ce01b6f3b) -- all the tests now ported, some failures [`64239ed`](https://github.com/minimistjs/minimist/commit/64239edfe92c711c4eb0da254fcdfad2a5fdb605) -- failing short test [`f8a5341`](https://github.com/minimistjs/minimist/commit/f8a534112dd1138d2fad722def56a848480c446f) -- fixed the numeric test [`6b034f3`](https://github.com/minimistjs/minimist/commit/6b034f37c79342c60083ed97fd222e16928aac51) diff --git a/node_modules/minimist/LICENSE b/node_modules/minimist/LICENSE deleted file mode 100644 index ee27ba4..0000000 --- a/node_modules/minimist/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/minimist/README.md b/node_modules/minimist/README.md deleted file mode 100644 index 74da323..0000000 --- a/node_modules/minimist/README.md +++ /dev/null @@ -1,121 +0,0 @@ -# minimist [![Version Badge][npm-version-svg]][package-url] - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -parse argument options - -This module is the guts of optimist's argument parser without all the -fanciful decoration. - -# example - -``` js -var argv = require('minimist')(process.argv.slice(2)); -console.log(argv); -``` - -``` -$ node example/parse.js -a beep -b boop -{ _: [], a: 'beep', b: 'boop' } -``` - -``` -$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz -{ - _: ['foo', 'bar', 'baz'], - x: 3, - y: 4, - n: 5, - a: true, - b: true, - c: true, - beep: 'boop' -} -``` - -# security - -Previous versions had a prototype pollution bug that could cause privilege -escalation in some circumstances when handling untrusted user input. - -Please use version 1.2.6 or later: - -* https://security.snyk.io/vuln/SNYK-JS-MINIMIST-2429795 (version <=1.2.5) -* https://snyk.io/vuln/SNYK-JS-MINIMIST-559764 (version <=1.2.3) - -# methods - -``` js -var parseArgs = require('minimist') -``` - -## var argv = parseArgs(args, opts={}) - -Return an argument object `argv` populated with the array arguments from `args`. - -`argv._` contains all the arguments that didn't have an option associated with -them. - -Numeric-looking arguments will be returned as numbers unless `opts.string` or -`opts.boolean` is set for that argument name. - -Any arguments after `'--'` will not be parsed and will end up in `argv._`. - -options can be: - -* `opts.string` - a string or array of strings argument names to always treat as -strings -* `opts.boolean` - a boolean, string or array of strings to always treat as -booleans. if `true` will treat all double hyphenated arguments without equal signs -as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`) -* `opts.alias` - an object mapping string names to strings or arrays of string -argument names to use as aliases -* `opts.default` - an object mapping string argument names to default values -* `opts.stopEarly` - when true, populate `argv._` with everything after the -first non-option -* `opts['--']` - when true, populate `argv._` with everything before the `--` -and `argv['--']` with everything after the `--`. Here's an example: - - ``` - > require('./')('one two three -- four five --six'.split(' '), { '--': true }) - { - _: ['one', 'two', 'three'], - '--': ['four', 'five', '--six'] - } - ``` - - Note that with `opts['--']` set, parsing for arguments still stops after the - `--`. - -* `opts.unknown` - a function which is invoked with a command line parameter not -defined in the `opts` configuration object. If the function returns `false`, the -unknown option is not added to `argv`. - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install minimist -``` - -# license - -MIT - -[package-url]: https://npmjs.org/package/minimist -[npm-version-svg]: https://versionbadg.es/minimistjs/minimist.svg -[npm-badge-png]: https://nodei.co/npm/minimist.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/minimist.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/minimist.svg -[downloads-url]: https://npm-stat.com/charts.html?package=minimist -[codecov-image]: https://codecov.io/gh/minimistjs/minimist/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/minimistjs/minimist/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/minimistjs/minimist -[actions-url]: https://github.com/minimistjs/minimist/actions diff --git a/node_modules/minimist/example/parse.js b/node_modules/minimist/example/parse.js deleted file mode 100644 index 9d90ffb..0000000 --- a/node_modules/minimist/example/parse.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -var argv = require('../')(process.argv.slice(2)); -console.log(argv); diff --git a/node_modules/minimist/index.js b/node_modules/minimist/index.js deleted file mode 100644 index f020f39..0000000 --- a/node_modules/minimist/index.js +++ /dev/null @@ -1,263 +0,0 @@ -'use strict'; - -function hasKey(obj, keys) { - var o = obj; - keys.slice(0, -1).forEach(function (key) { - o = o[key] || {}; - }); - - var key = keys[keys.length - 1]; - return key in o; -} - -function isNumber(x) { - if (typeof x === 'number') { return true; } - if ((/^0x[0-9a-f]+$/i).test(x)) { return true; } - return (/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/).test(x); -} - -function isConstructorOrProto(obj, key) { - return (key === 'constructor' && typeof obj[key] === 'function') || key === '__proto__'; -} - -module.exports = function (args, opts) { - if (!opts) { opts = {}; } - - var flags = { - bools: {}, - strings: {}, - unknownFn: null, - }; - - if (typeof opts.unknown === 'function') { - flags.unknownFn = opts.unknown; - } - - if (typeof opts.boolean === 'boolean' && opts.boolean) { - flags.allBools = true; - } else { - [].concat(opts.boolean).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); - } - - var aliases = {}; - - function aliasIsBoolean(key) { - return aliases[key].some(function (x) { - return flags.bools[x]; - }); - } - - Object.keys(opts.alias || {}).forEach(function (key) { - aliases[key] = [].concat(opts.alias[key]); - aliases[key].forEach(function (x) { - aliases[x] = [key].concat(aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - - [].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - if (aliases[key]) { - [].concat(aliases[key]).forEach(function (k) { - flags.strings[k] = true; - }); - } - }); - - var defaults = opts.default || {}; - - var argv = { _: [] }; - - function argDefined(key, arg) { - return (flags.allBools && (/^--[^=]+$/).test(arg)) - || flags.strings[key] - || flags.bools[key] - || aliases[key]; - } - - function setKey(obj, keys, value) { - var o = obj; - for (var i = 0; i < keys.length - 1; i++) { - var key = keys[i]; - if (isConstructorOrProto(o, key)) { return; } - if (o[key] === undefined) { o[key] = {}; } - if ( - o[key] === Object.prototype - || o[key] === Number.prototype - || o[key] === String.prototype - ) { - o[key] = {}; - } - if (o[key] === Array.prototype) { o[key] = []; } - o = o[key]; - } - - var lastKey = keys[keys.length - 1]; - if (isConstructorOrProto(o, lastKey)) { return; } - if ( - o === Object.prototype - || o === Number.prototype - || o === String.prototype - ) { - o = {}; - } - if (o === Array.prototype) { o = []; } - if (o[lastKey] === undefined || flags.bools[lastKey] || typeof o[lastKey] === 'boolean') { - o[lastKey] = value; - } else if (Array.isArray(o[lastKey])) { - o[lastKey].push(value); - } else { - o[lastKey] = [o[lastKey], value]; - } - } - - function setArg(key, val, arg) { - if (arg && flags.unknownFn && !argDefined(key, arg)) { - if (flags.unknownFn(arg) === false) { return; } - } - - var value = !flags.strings[key] && isNumber(val) - ? Number(val) - : val; - setKey(argv, key.split('.'), value); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), value); - }); - } - - Object.keys(flags.bools).forEach(function (key) { - setArg(key, defaults[key] === undefined ? false : defaults[key]); - }); - - var notFlags = []; - - if (args.indexOf('--') !== -1) { - notFlags = args.slice(args.indexOf('--') + 1); - args = args.slice(0, args.indexOf('--')); - } - - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - var key; - var next; - - if ((/^--.+=/).test(arg)) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - key = m[1]; - var value = m[2]; - if (flags.bools[key]) { - value = value !== 'false'; - } - setArg(key, value, arg); - } else if ((/^--no-.+/).test(arg)) { - key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false, arg); - } else if ((/^--.+/).test(arg)) { - key = arg.match(/^--(.+)/)[1]; - next = args[i + 1]; - if ( - next !== undefined - && !(/^(-|--)[^-]/).test(next) - && !flags.bools[key] - && !flags.allBools - && (aliases[key] ? !aliasIsBoolean(key) : true) - ) { - setArg(key, next, arg); - i += 1; - } else if ((/^(true|false)$/).test(next)) { - setArg(key, next === 'true', arg); - i += 1; - } else { - setArg(key, flags.strings[key] ? '' : true, arg); - } - } else if ((/^-[^-]+/).test(arg)) { - var letters = arg.slice(1, -1).split(''); - - var broken = false; - for (var j = 0; j < letters.length; j++) { - next = arg.slice(j + 2); - - if (next === '-') { - setArg(letters[j], next, arg); - continue; - } - - if ((/[A-Za-z]/).test(letters[j]) && next[0] === '=') { - setArg(letters[j], next.slice(1), arg); - broken = true; - break; - } - - if ( - (/[A-Za-z]/).test(letters[j]) - && (/-?\d+(\.\d*)?(e-?\d+)?$/).test(next) - ) { - setArg(letters[j], next, arg); - broken = true; - break; - } - - if (letters[j + 1] && letters[j + 1].match(/\W/)) { - setArg(letters[j], arg.slice(j + 2), arg); - broken = true; - break; - } else { - setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); - } - } - - key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if ( - args[i + 1] - && !(/^(-|--)[^-]/).test(args[i + 1]) - && !flags.bools[key] - && (aliases[key] ? !aliasIsBoolean(key) : true) - ) { - setArg(key, args[i + 1], arg); - i += 1; - } else if (args[i + 1] && (/^(true|false)$/).test(args[i + 1])) { - setArg(key, args[i + 1] === 'true', arg); - i += 1; - } else { - setArg(key, flags.strings[key] ? '' : true, arg); - } - } - } else { - if (!flags.unknownFn || flags.unknownFn(arg) !== false) { - argv._.push(flags.strings._ || !isNumber(arg) ? arg : Number(arg)); - } - if (opts.stopEarly) { - argv._.push.apply(argv._, args.slice(i + 1)); - break; - } - } - } - - Object.keys(defaults).forEach(function (k) { - if (!hasKey(argv, k.split('.'))) { - setKey(argv, k.split('.'), defaults[k]); - - (aliases[k] || []).forEach(function (x) { - setKey(argv, x.split('.'), defaults[k]); - }); - } - }); - - if (opts['--']) { - argv['--'] = notFlags.slice(); - } else { - notFlags.forEach(function (k) { - argv._.push(k); - }); - } - - return argv; -}; diff --git a/node_modules/minimist/package.json b/node_modules/minimist/package.json deleted file mode 100644 index c10a334..0000000 --- a/node_modules/minimist/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "minimist", - "version": "1.2.8", - "description": "parse argument options", - "main": "index.js", - "devDependencies": { - "@ljharb/eslint-config": "^21.0.1", - "aud": "^2.0.2", - "auto-changelog": "^2.4.0", - "eslint": "=8.8.0", - "in-publish": "^2.0.1", - "npmignore": "^0.3.0", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.6.3" - }, - "scripts": { - "prepack": "npmignore --auto --commentLines=auto", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "lint": "eslint --ext=js,mjs .", - "pretest": "npm run lint", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "aud --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "ff/5", - "firefox/latest", - "chrome/10", - "chrome/latest", - "safari/5.1", - "safari/latest", - "opera/12" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/minimistjs/minimist.git" - }, - "homepage": "https://github.com/minimistjs/minimist", - "keywords": [ - "argv", - "getopt", - "parser", - "optimist" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - } -} diff --git a/node_modules/minimist/test/all_bool.js b/node_modules/minimist/test/all_bool.js deleted file mode 100644 index befa0c9..0000000 --- a/node_modules/minimist/test/all_bool.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('flag boolean true (default all --args to boolean)', function (t) { - var argv = parse(['moo', '--honk', 'cow'], { - boolean: true, - }); - - t.deepEqual(argv, { - honk: true, - _: ['moo', 'cow'], - }); - - t.deepEqual(typeof argv.honk, 'boolean'); - t.end(); -}); - -test('flag boolean true only affects double hyphen arguments without equals signs', function (t) { - var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], { - boolean: true, - }); - - t.deepEqual(argv, { - honk: true, - tacos: 'good', - p: 55, - _: ['moo', 'cow'], - }); - - t.deepEqual(typeof argv.honk, 'boolean'); - t.end(); -}); diff --git a/node_modules/minimist/test/bool.js b/node_modules/minimist/test/bool.js deleted file mode 100644 index e58d47e..0000000 --- a/node_modules/minimist/test/bool.js +++ /dev/null @@ -1,177 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('flag boolean default false', function (t) { - var argv = parse(['moo'], { - boolean: ['t', 'verbose'], - default: { verbose: false, t: false }, - }); - - t.deepEqual(argv, { - verbose: false, - t: false, - _: ['moo'], - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); - -}); - -test('boolean groups', function (t) { - var argv = parse(['-x', '-z', 'one', 'two', 'three'], { - boolean: ['x', 'y', 'z'], - }); - - t.deepEqual(argv, { - x: true, - y: false, - z: true, - _: ['one', 'two', 'three'], - }); - - t.deepEqual(typeof argv.x, 'boolean'); - t.deepEqual(typeof argv.y, 'boolean'); - t.deepEqual(typeof argv.z, 'boolean'); - t.end(); -}); -test('boolean and alias with chainable api', function (t) { - var aliased = ['-h', 'derp']; - var regular = ['--herp', 'derp']; - var aliasedArgv = parse(aliased, { - boolean: 'herp', - alias: { h: 'herp' }, - }); - var propertyArgv = parse(regular, { - boolean: 'herp', - alias: { h: 'herp' }, - }); - var expected = { - herp: true, - h: true, - _: ['derp'], - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias with options hash', function (t) { - var aliased = ['-h', 'derp']; - var regular = ['--herp', 'derp']; - var opts = { - alias: { h: 'herp' }, - boolean: 'herp', - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - _: ['derp'], - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias array with options hash', function (t) { - var aliased = ['-h', 'derp']; - var regular = ['--herp', 'derp']; - var alt = ['--harp', 'derp']; - var opts = { - alias: { h: ['herp', 'harp'] }, - boolean: 'h', - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var altPropertyArgv = parse(alt, opts); - var expected = { - harp: true, - herp: true, - h: true, - _: ['derp'], - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.same(altPropertyArgv, expected); - t.end(); -}); - -test('boolean and alias using explicit true', function (t) { - var aliased = ['-h', 'true']; - var regular = ['--herp', 'true']; - var opts = { - alias: { h: 'herp' }, - boolean: 'h', - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - _: [], - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -// regression, see https://github.com/substack/node-optimist/issues/71 -test('boolean and --x=true', function (t) { - var parsed = parse(['--boool', '--other=true'], { - boolean: 'boool', - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'true'); - - parsed = parse(['--boool', '--other=false'], { - boolean: 'boool', - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'false'); - t.end(); -}); - -test('boolean --boool=true', function (t) { - var parsed = parse(['--boool=true'], { - default: { - boool: false, - }, - boolean: ['boool'], - }); - - t.same(parsed.boool, true); - t.end(); -}); - -test('boolean --boool=false', function (t) { - var parsed = parse(['--boool=false'], { - default: { - boool: true, - }, - boolean: ['boool'], - }); - - t.same(parsed.boool, false); - t.end(); -}); - -test('boolean using something similar to true', function (t) { - var opts = { boolean: 'h' }; - var result = parse(['-h', 'true.txt'], opts); - var expected = { - h: true, - _: ['true.txt'], - }; - - t.same(result, expected); - t.end(); -}); diff --git a/node_modules/minimist/test/dash.js b/node_modules/minimist/test/dash.js deleted file mode 100644 index 7078817..0000000 --- a/node_modules/minimist/test/dash.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('-', function (t) { - t.plan(6); - t.deepEqual(parse(['-n', '-']), { n: '-', _: [] }); - t.deepEqual(parse(['--nnn', '-']), { nnn: '-', _: [] }); - t.deepEqual(parse(['-']), { _: ['-'] }); - t.deepEqual(parse(['-f-']), { f: '-', _: [] }); - t.deepEqual( - parse(['-b', '-'], { boolean: 'b' }), - { b: true, _: ['-'] } - ); - t.deepEqual( - parse(['-s', '-'], { string: 's' }), - { s: '-', _: [] } - ); -}); - -test('-a -- b', function (t) { - t.plan(2); - t.deepEqual(parse(['-a', '--', 'b']), { a: true, _: ['b'] }); - t.deepEqual(parse(['--a', '--', 'b']), { a: true, _: ['b'] }); -}); - -test('move arguments after the -- into their own `--` array', function (t) { - t.plan(1); - t.deepEqual( - parse(['--name', 'John', 'before', '--', 'after'], { '--': true }), - { name: 'John', _: ['before'], '--': ['after'] } - ); -}); - -test('--- option value', function (t) { - // A multi-dash value is largely an edge case, but check the behaviour is as expected, - // and in particular the same for short option and long option (as made consistent in Jan 2023). - t.plan(2); - t.deepEqual(parse(['-n', '---']), { n: '---', _: [] }); - t.deepEqual(parse(['--nnn', '---']), { nnn: '---', _: [] }); -}); - diff --git a/node_modules/minimist/test/default_bool.js b/node_modules/minimist/test/default_bool.js deleted file mode 100644 index 4e9f625..0000000 --- a/node_modules/minimist/test/default_bool.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -var test = require('tape'); -var parse = require('../'); - -test('boolean default true', function (t) { - var argv = parse([], { - boolean: 'sometrue', - default: { sometrue: true }, - }); - t.equal(argv.sometrue, true); - t.end(); -}); - -test('boolean default false', function (t) { - var argv = parse([], { - boolean: 'somefalse', - default: { somefalse: false }, - }); - t.equal(argv.somefalse, false); - t.end(); -}); - -test('boolean default to null', function (t) { - var argv = parse([], { - boolean: 'maybe', - default: { maybe: null }, - }); - t.equal(argv.maybe, null); - - var argvLong = parse(['--maybe'], { - boolean: 'maybe', - default: { maybe: null }, - }); - t.equal(argvLong.maybe, true); - t.end(); -}); diff --git a/node_modules/minimist/test/dotted.js b/node_modules/minimist/test/dotted.js deleted file mode 100644 index 126ff03..0000000 --- a/node_modules/minimist/test/dotted.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('dotted alias', function (t) { - var argv = parse(['--a.b', '22'], { default: { 'a.b': 11 }, alias: { 'a.b': 'aa.bb' } }); - t.equal(argv.a.b, 22); - t.equal(argv.aa.bb, 22); - t.end(); -}); - -test('dotted default', function (t) { - var argv = parse('', { default: { 'a.b': 11 }, alias: { 'a.b': 'aa.bb' } }); - t.equal(argv.a.b, 11); - t.equal(argv.aa.bb, 11); - t.end(); -}); - -test('dotted default with no alias', function (t) { - var argv = parse('', { default: { 'a.b': 11 } }); - t.equal(argv.a.b, 11); - t.end(); -}); diff --git a/node_modules/minimist/test/kv_short.js b/node_modules/minimist/test/kv_short.js deleted file mode 100644 index 6d1b53a..0000000 --- a/node_modules/minimist/test/kv_short.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('short -k=v', function (t) { - t.plan(1); - - var argv = parse(['-b=123']); - t.deepEqual(argv, { b: 123, _: [] }); -}); - -test('multi short -k=v', function (t) { - t.plan(1); - - var argv = parse(['-a=whatever', '-b=robots']); - t.deepEqual(argv, { a: 'whatever', b: 'robots', _: [] }); -}); - -test('short with embedded equals -k=a=b', function (t) { - t.plan(1); - - var argv = parse(['-k=a=b']); - t.deepEqual(argv, { k: 'a=b', _: [] }); -}); - -test('short with later equals like -ab=c', function (t) { - t.plan(1); - - var argv = parse(['-ab=c']); - t.deepEqual(argv, { a: true, b: 'c', _: [] }); -}); diff --git a/node_modules/minimist/test/long.js b/node_modules/minimist/test/long.js deleted file mode 100644 index 9fef51f..0000000 --- a/node_modules/minimist/test/long.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -var test = require('tape'); -var parse = require('../'); - -test('long opts', function (t) { - t.deepEqual( - parse(['--bool']), - { bool: true, _: [] }, - 'long boolean' - ); - t.deepEqual( - parse(['--pow', 'xixxle']), - { pow: 'xixxle', _: [] }, - 'long capture sp' - ); - t.deepEqual( - parse(['--pow=xixxle']), - { pow: 'xixxle', _: [] }, - 'long capture eq' - ); - t.deepEqual( - parse(['--host', 'localhost', '--port', '555']), - { host: 'localhost', port: 555, _: [] }, - 'long captures sp' - ); - t.deepEqual( - parse(['--host=localhost', '--port=555']), - { host: 'localhost', port: 555, _: [] }, - 'long captures eq' - ); - t.end(); -}); diff --git a/node_modules/minimist/test/num.js b/node_modules/minimist/test/num.js deleted file mode 100644 index 074393e..0000000 --- a/node_modules/minimist/test/num.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('nums', function (t) { - var argv = parse([ - '-x', '1234', - '-y', '5.67', - '-z', '1e7', - '-w', '10f', - '--hex', '0xdeadbeef', - '789', - ]); - t.deepEqual(argv, { - x: 1234, - y: 5.67, - z: 1e7, - w: '10f', - hex: 0xdeadbeef, - _: [789], - }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv.y, 'number'); - t.deepEqual(typeof argv.z, 'number'); - t.deepEqual(typeof argv.w, 'string'); - t.deepEqual(typeof argv.hex, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); - -test('already a number', function (t) { - var argv = parse(['-x', 1234, 789]); - t.deepEqual(argv, { x: 1234, _: [789] }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); diff --git a/node_modules/minimist/test/parse.js b/node_modules/minimist/test/parse.js deleted file mode 100644 index 65d9d90..0000000 --- a/node_modules/minimist/test/parse.js +++ /dev/null @@ -1,209 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('parse args', function (t) { - t.deepEqual( - parse(['--no-moo']), - { moo: false, _: [] }, - 'no' - ); - t.deepEqual( - parse(['-v', 'a', '-v', 'b', '-v', 'c']), - { v: ['a', 'b', 'c'], _: [] }, - 'multi' - ); - t.end(); -}); - -test('comprehensive', function (t) { - t.deepEqual( - parse([ - '--name=meowmers', 'bare', '-cats', 'woo', - '-h', 'awesome', '--multi=quux', - '--key', 'value', - '-b', '--bool', '--no-meep', '--multi=baz', - '--', '--not-a-flag', 'eek', - ]), - { - c: true, - a: true, - t: true, - s: 'woo', - h: 'awesome', - b: true, - bool: true, - key: 'value', - multi: ['quux', 'baz'], - meep: false, - name: 'meowmers', - _: ['bare', '--not-a-flag', 'eek'], - } - ); - t.end(); -}); - -test('flag boolean', function (t) { - var argv = parse(['-t', 'moo'], { boolean: 't' }); - t.deepEqual(argv, { t: true, _: ['moo'] }); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean value', function (t) { - var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { - boolean: ['t', 'verbose'], - default: { verbose: true }, - }); - - t.deepEqual(argv, { - verbose: false, - t: true, - _: ['moo'], - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('newlines in params', function (t) { - var args = parse(['-s', 'X\nX']); - t.deepEqual(args, { _: [], s: 'X\nX' }); - - // reproduce in bash: - // VALUE="new - // line" - // node program.js --s="$VALUE" - args = parse(['--s=X\nX']); - t.deepEqual(args, { _: [], s: 'X\nX' }); - t.end(); -}); - -test('strings', function (t) { - var s = parse(['-s', '0001234'], { string: 's' }).s; - t.equal(s, '0001234'); - t.equal(typeof s, 'string'); - - var x = parse(['-x', '56'], { string: 'x' }).x; - t.equal(x, '56'); - t.equal(typeof x, 'string'); - t.end(); -}); - -test('stringArgs', function (t) { - var s = parse([' ', ' '], { string: '_' })._; - t.same(s.length, 2); - t.same(typeof s[0], 'string'); - t.same(s[0], ' '); - t.same(typeof s[1], 'string'); - t.same(s[1], ' '); - t.end(); -}); - -test('empty strings', function (t) { - var s = parse(['-s'], { string: 's' }).s; - t.equal(s, ''); - t.equal(typeof s, 'string'); - - var str = parse(['--str'], { string: 'str' }).str; - t.equal(str, ''); - t.equal(typeof str, 'string'); - - var letters = parse(['-art'], { - string: ['a', 't'], - }); - - t.equal(letters.a, ''); - t.equal(letters.r, true); - t.equal(letters.t, ''); - - t.end(); -}); - -test('string and alias', function (t) { - var x = parse(['--str', '000123'], { - string: 's', - alias: { s: 'str' }, - }); - - t.equal(x.str, '000123'); - t.equal(typeof x.str, 'string'); - t.equal(x.s, '000123'); - t.equal(typeof x.s, 'string'); - - var y = parse(['-s', '000123'], { - string: 'str', - alias: { str: 's' }, - }); - - t.equal(y.str, '000123'); - t.equal(typeof y.str, 'string'); - t.equal(y.s, '000123'); - t.equal(typeof y.s, 'string'); - - var z = parse(['-s123'], { - alias: { str: ['s', 'S'] }, - string: ['str'], - }); - - t.deepEqual( - z, - { _: [], s: '123', S: '123', str: '123' }, - 'opt.string works with multiple aliases' - ); - t.end(); -}); - -test('slashBreak', function (t) { - t.same( - parse(['-I/foo/bar/baz']), - { I: '/foo/bar/baz', _: [] } - ); - t.same( - parse(['-xyz/foo/bar/baz']), - { x: true, y: true, z: '/foo/bar/baz', _: [] } - ); - t.end(); -}); - -test('alias', function (t) { - var argv = parse(['-f', '11', '--zoom', '55'], { - alias: { z: 'zoom' }, - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.f, 11); - t.end(); -}); - -test('multiAlias', function (t) { - var argv = parse(['-f', '11', '--zoom', '55'], { - alias: { z: ['zm', 'zoom'] }, - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.z, argv.zm); - t.equal(argv.f, 11); - t.end(); -}); - -test('nested dotted objects', function (t) { - var argv = parse([ - '--foo.bar', '3', '--foo.baz', '4', - '--foo.quux.quibble', '5', '--foo.quux.o_O', - '--beep.boop', - ]); - - t.same(argv.foo, { - bar: 3, - baz: 4, - quux: { - quibble: 5, - o_O: true, - }, - }); - t.same(argv.beep, { boop: true }); - t.end(); -}); diff --git a/node_modules/minimist/test/parse_modified.js b/node_modules/minimist/test/parse_modified.js deleted file mode 100644 index 32965d1..0000000 --- a/node_modules/minimist/test/parse_modified.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('parse with modifier functions', function (t) { - t.plan(1); - - var argv = parse(['-b', '123'], { boolean: 'b' }); - t.deepEqual(argv, { b: true, _: [123] }); -}); diff --git a/node_modules/minimist/test/proto.js b/node_modules/minimist/test/proto.js deleted file mode 100644 index 6e629dd..0000000 --- a/node_modules/minimist/test/proto.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict'; - -/* eslint no-proto: 0 */ - -var parse = require('../'); -var test = require('tape'); - -test('proto pollution', function (t) { - var argv = parse(['--__proto__.x', '123']); - t.equal({}.x, undefined); - t.equal(argv.__proto__.x, undefined); - t.equal(argv.x, undefined); - t.end(); -}); - -test('proto pollution (array)', function (t) { - var argv = parse(['--x', '4', '--x', '5', '--x.__proto__.z', '789']); - t.equal({}.z, undefined); - t.deepEqual(argv.x, [4, 5]); - t.equal(argv.x.z, undefined); - t.equal(argv.x.__proto__.z, undefined); - t.end(); -}); - -test('proto pollution (number)', function (t) { - var argv = parse(['--x', '5', '--x.__proto__.z', '100']); - t.equal({}.z, undefined); - t.equal((4).z, undefined); - t.equal(argv.x, 5); - t.equal(argv.x.z, undefined); - t.end(); -}); - -test('proto pollution (string)', function (t) { - var argv = parse(['--x', 'abc', '--x.__proto__.z', 'def']); - t.equal({}.z, undefined); - t.equal('...'.z, undefined); - t.equal(argv.x, 'abc'); - t.equal(argv.x.z, undefined); - t.end(); -}); - -test('proto pollution (constructor)', function (t) { - var argv = parse(['--constructor.prototype.y', '123']); - t.equal({}.y, undefined); - t.equal(argv.y, undefined); - t.end(); -}); - -test('proto pollution (constructor function)', function (t) { - var argv = parse(['--_.concat.constructor.prototype.y', '123']); - function fnToBeTested() {} - t.equal(fnToBeTested.y, undefined); - t.equal(argv.y, undefined); - t.end(); -}); - -// powered by snyk - https://github.com/backstage/backstage/issues/10343 -test('proto pollution (constructor function) snyk', function (t) { - var argv = parse('--_.constructor.constructor.prototype.foo bar'.split(' ')); - t.equal(function () {}.foo, undefined); - t.equal(argv.y, undefined); - t.end(); -}); diff --git a/node_modules/minimist/test/short.js b/node_modules/minimist/test/short.js deleted file mode 100644 index 4a7b843..0000000 --- a/node_modules/minimist/test/short.js +++ /dev/null @@ -1,69 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('numeric short args', function (t) { - t.plan(2); - t.deepEqual(parse(['-n123']), { n: 123, _: [] }); - t.deepEqual( - parse(['-123', '456']), - { 1: true, 2: true, 3: 456, _: [] } - ); -}); - -test('short', function (t) { - t.deepEqual( - parse(['-b']), - { b: true, _: [] }, - 'short boolean' - ); - t.deepEqual( - parse(['foo', 'bar', 'baz']), - { _: ['foo', 'bar', 'baz'] }, - 'bare' - ); - t.deepEqual( - parse(['-cats']), - { c: true, a: true, t: true, s: true, _: [] }, - 'group' - ); - t.deepEqual( - parse(['-cats', 'meow']), - { c: true, a: true, t: true, s: 'meow', _: [] }, - 'short group next' - ); - t.deepEqual( - parse(['-h', 'localhost']), - { h: 'localhost', _: [] }, - 'short capture' - ); - t.deepEqual( - parse(['-h', 'localhost', '-p', '555']), - { h: 'localhost', p: 555, _: [] }, - 'short captures' - ); - t.end(); -}); - -test('mixed short bool and capture', function (t) { - t.same( - parse(['-h', 'localhost', '-fp', '555', 'script.js']), - { - f: true, p: 555, h: 'localhost', - _: ['script.js'], - } - ); - t.end(); -}); - -test('short and long', function (t) { - t.deepEqual( - parse(['-h', 'localhost', '-fp', '555', 'script.js']), - { - f: true, p: 555, h: 'localhost', - _: ['script.js'], - } - ); - t.end(); -}); diff --git a/node_modules/minimist/test/stop_early.js b/node_modules/minimist/test/stop_early.js deleted file mode 100644 index 52a6a91..0000000 --- a/node_modules/minimist/test/stop_early.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('stops parsing on the first non-option when stopEarly is set', function (t) { - var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], { - stopEarly: true, - }); - - t.deepEqual(argv, { - aaa: 'bbb', - _: ['ccc', '--ddd'], - }); - - t.end(); -}); diff --git a/node_modules/minimist/test/unknown.js b/node_modules/minimist/test/unknown.js deleted file mode 100644 index 4f2e0ca..0000000 --- a/node_modules/minimist/test/unknown.js +++ /dev/null @@ -1,104 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('boolean and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = ['-h', 'true', '--derp', 'true']; - var regular = ['--herp', 'true', '-d', 'true']; - var opts = { - alias: { h: 'herp' }, - boolean: 'h', - unknown: unknownFn, - }; - parse(aliased, opts); - parse(regular, opts); - - t.same(unknown, ['--derp', '-d']); - t.end(); -}); - -test('flag boolean true any double hyphen argument is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], { - boolean: true, - unknown: unknownFn, - }); - t.same(unknown, ['--tacos=good', 'cow', '-p']); - t.same(argv, { - honk: true, - _: [], - }); - t.end(); -}); - -test('string and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = ['-h', 'hello', '--derp', 'goodbye']; - var regular = ['--herp', 'hello', '-d', 'moon']; - var opts = { - alias: { h: 'herp' }, - string: 'h', - unknown: unknownFn, - }; - parse(aliased, opts); - parse(regular, opts); - - t.same(unknown, ['--derp', '-d']); - t.end(); -}); - -test('default and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = ['-h', 'hello']; - var regular = ['--herp', 'hello']; - var opts = { - default: { h: 'bar' }, - alias: { h: 'herp' }, - unknown: unknownFn, - }; - parse(aliased, opts); - parse(regular, opts); - - t.same(unknown, []); - t.end(); - unknownFn(); // exercise fn for 100% coverage -}); - -test('value following -- is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = ['--bad', '--', 'good', 'arg']; - var opts = { - '--': true, - unknown: unknownFn, - }; - var argv = parse(aliased, opts); - - t.same(unknown, ['--bad']); - t.same(argv, { - '--': ['good', 'arg'], - _: [], - }); - t.end(); -}); diff --git a/node_modules/minimist/test/whitespace.js b/node_modules/minimist/test/whitespace.js deleted file mode 100644 index 4fdaf1d..0000000 --- a/node_modules/minimist/test/whitespace.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -var parse = require('../'); -var test = require('tape'); - -test('whitespace should be whitespace', function (t) { - t.plan(1); - var x = parse(['-x', '\t']).x; - t.equal(x, '\t'); -}); diff --git a/node_modules/ms/index.js b/node_modules/ms/index.js deleted file mode 100644 index ea734fb..0000000 --- a/node_modules/ms/index.js +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Helpers. - */ - -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var w = d * 7; -var y = d * 365.25; - -/** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - -module.exports = function (val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isFinite(val)) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); -}; - -/** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'weeks': - case 'week': - case 'w': - return n * w; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; - } -} - -/** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtShort(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return Math.round(ms / d) + 'd'; - } - if (msAbs >= h) { - return Math.round(ms / h) + 'h'; - } - if (msAbs >= m) { - return Math.round(ms / m) + 'm'; - } - if (msAbs >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; -} - -/** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - -function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return plural(ms, msAbs, d, 'day'); - } - if (msAbs >= h) { - return plural(ms, msAbs, h, 'hour'); - } - if (msAbs >= m) { - return plural(ms, msAbs, m, 'minute'); - } - if (msAbs >= s) { - return plural(ms, msAbs, s, 'second'); - } - return ms + ' ms'; -} - -/** - * Pluralization helper. - */ - -function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); -} diff --git a/node_modules/ms/license.md b/node_modules/ms/license.md deleted file mode 100644 index fa5d39b..0000000 --- a/node_modules/ms/license.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2020 Vercel, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/ms/package.json b/node_modules/ms/package.json deleted file mode 100644 index 4997189..0000000 --- a/node_modules/ms/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "ms", - "version": "2.1.3", - "description": "Tiny millisecond conversion utility", - "repository": "vercel/ms", - "main": "./index", - "files": [ - "index.js" - ], - "scripts": { - "precommit": "lint-staged", - "lint": "eslint lib/* bin/*", - "test": "mocha tests.js" - }, - "eslintConfig": { - "extends": "eslint:recommended", - "env": { - "node": true, - "es6": true - } - }, - "lint-staged": { - "*.js": [ - "npm run lint", - "prettier --single-quote --write", - "git add" - ] - }, - "license": "MIT", - "devDependencies": { - "eslint": "4.18.2", - "expect.js": "0.3.1", - "husky": "0.14.3", - "lint-staged": "5.0.0", - "mocha": "4.0.1", - "prettier": "2.0.5" - } -} diff --git a/node_modules/ms/readme.md b/node_modules/ms/readme.md deleted file mode 100644 index 0fc1abb..0000000 --- a/node_modules/ms/readme.md +++ /dev/null @@ -1,59 +0,0 @@ -# ms - -![CI](https://github.com/vercel/ms/workflows/CI/badge.svg) - -Use this package to easily convert various time formats to milliseconds. - -## Examples - -```js -ms('2 days') // 172800000 -ms('1d') // 86400000 -ms('10h') // 36000000 -ms('2.5 hrs') // 9000000 -ms('2h') // 7200000 -ms('1m') // 60000 -ms('5s') // 5000 -ms('1y') // 31557600000 -ms('100') // 100 -ms('-3 days') // -259200000 -ms('-1h') // -3600000 -ms('-200') // -200 -``` - -### Convert from Milliseconds - -```js -ms(60000) // "1m" -ms(2 * 60000) // "2m" -ms(-3 * 60000) // "-3m" -ms(ms('10 hours')) // "10h" -``` - -### Time Format Written-Out - -```js -ms(60000, { long: true }) // "1 minute" -ms(2 * 60000, { long: true }) // "2 minutes" -ms(-3 * 60000, { long: true }) // "-3 minutes" -ms(ms('10 hours'), { long: true }) // "10 hours" -``` - -## Features - -- Works both in [Node.js](https://nodejs.org) and in the browser -- If a number is supplied to `ms`, a string with a unit is returned -- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`) -- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned - -## Related Packages - -- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time. - -## Caught a Bug? - -1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device -2. Link the package to the global module directory: `npm link` -3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms! - -As always, you can run the tests using: `npm test` diff --git a/node_modules/multer/LICENSE b/node_modules/multer/LICENSE deleted file mode 100644 index 6c011b1..0000000 --- a/node_modules/multer/LICENSE +++ /dev/null @@ -1,17 +0,0 @@ -Copyright (c) 2014 Hage Yaapa <[http://www.hacksparrow.com](http://www.hacksparrow.com)> - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/multer/README.md b/node_modules/multer/README.md deleted file mode 100644 index 630a495..0000000 --- a/node_modules/multer/README.md +++ /dev/null @@ -1,351 +0,0 @@ -# Multer [![NPM Version][npm-version-image]][npm-url] [![NPM Downloads][npm-downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Test Coverage][test-image]][test-url] [![OpenSSF Scorecard Badge][ossf-scorecard-badge]][ossf-scorecard-visualizer] - -Multer is a node.js middleware for handling `multipart/form-data`, which is primarily used for uploading files. It is written -on top of [busboy](https://github.com/mscdex/busboy) for maximum efficiency. - -**NOTE**: Multer will not process any form which is not multipart (`multipart/form-data`). - -## Translations - -This README is also available in other languages: - -| | | -| ------------------------------------------------------------------------------ | --------------- | -| [العربية](https://github.com/expressjs/multer/blob/main/doc/README-ar.md) | Arabic | -| [简体中文](https://github.com/expressjs/multer/blob/main/doc/README-zh-cn.md) | Chinese | -| [Français](https://github.com/expressjs/multer/blob/main/doc/README-fr.md) | French | -| [한국어](https://github.com/expressjs/multer/blob/main/doc/README-ko.md) | Korean | -| [Português](https://github.com/expressjs/multer/blob/main/doc/README-pt-br.md) | Portuguese (BR) | -| [Русский язык](https://github.com/expressjs/multer/blob/main/doc/README-ru.md) | Russian | -| [Español](https://github.com/expressjs/multer/blob/main/doc/README-es.md) | Spanish | -| [O'zbek tili](https://github.com/expressjs/multer/blob/main/doc/README-uz.md) | Uzbek | -| [Việt Nam](https://github.com/expressjs/multer/blob/main/doc/README-vi.md) | Vietnamese | -| [Türkçe](https://github.com/expressjs/multer/blob/main/doc/README-tr.md) | Turkish | - - -## Installation - -```sh -$ npm install multer -``` - -## Usage - -Multer adds a `body` object and a `file` or `files` object to the `request` object. The `body` object contains the values of the text fields of the form, the `file` or `files` object contains the files uploaded via the form. - -Basic usage example: - -Don't forget the `enctype="multipart/form-data"` in your form. - -```html -
- -
-``` - -```javascript -const express = require('express') -const multer = require('multer') -const upload = multer({ dest: 'uploads/' }) - -const app = express() - -app.post('/profile', upload.single('avatar'), function (req, res, next) { - // req.file is the `avatar` file - // req.body will hold the text fields, if there were any -}) - -app.post('/photos/upload', upload.array('photos', 12), function (req, res, next) { - // req.files is array of `photos` files - // req.body will contain the text fields, if there were any -}) - -const uploadMiddleware = upload.fields([{ name: 'avatar', maxCount: 1 }, { name: 'gallery', maxCount: 8 }]) -app.post('/cool-profile', uploadMiddleware, function (req, res, next) { - // req.files is an object (String -> Array) where fieldname is the key, and the value is array of files - // - // e.g. - // req.files['avatar'][0] -> File - // req.files['gallery'] -> Array - // - // req.body will contain the text fields, if there were any -}) -``` - -In case you need to handle a text-only multipart form, you should use the `.none()` method: - -```javascript -const express = require('express') -const app = express() -const multer = require('multer') -const upload = multer() - -app.post('/profile', upload.none(), function (req, res, next) { - // req.body contains the text fields -}) -``` - -Here's an example on how multer is used in a HTML form. Take special note of the `enctype="multipart/form-data"` and `name="uploaded_file"` fields: - -```html -
-
- - - -
-
-``` - -Then in your javascript file you would add these lines to access both the file and the body. It is important that you use the `name` field value from the form in your upload function. This tells multer which field on the request it should look for the files in. If these fields aren't the same in the HTML form and on your server, your upload will fail: - -```javascript -const multer = require('multer') -const upload = multer({ dest: './public/data/uploads/' }) -app.post('/stats', upload.single('uploaded_file'), function (req, res) { - // req.file is the name of your file in the form above, here 'uploaded_file' - // req.body will hold the text fields, if there were any - console.log(req.file, req.body) -}); -``` - - - -## API - -### File information - -Each file contains the following information: - -Key | Description | Note ---- | --- | --- -`fieldname` | Field name specified in the form | -`originalname` | Name of the file on the user's computer | -`encoding` | Encoding type of the file | -`mimetype` | Mime type of the file | -`size` | Size of the file in bytes | -`destination` | The folder to which the file has been saved | `DiskStorage` -`filename` | The name of the file within the `destination` | `DiskStorage` -`path` | The full path to the uploaded file | `DiskStorage` -`buffer` | A `Buffer` of the entire file | `MemoryStorage` - -### `multer(opts)` - -Multer accepts an options object, the most basic of which is the `dest` -property, which tells Multer where to upload the files. In case you omit the -options object, the files will be kept in memory and never written to disk. - -By default, Multer will rename the files so as to avoid naming conflicts. The -renaming function can be customized according to your needs. - -The following are the options that can be passed to Multer. - -Key | Description ---- | --- -`dest` or `storage` | Where to store the files -`fileFilter` | Function to control which files are accepted -`limits` | Limits of the uploaded data -`preservePath` | Keep the full path of files instead of just the base name -`defParamCharset` | Default character set to use for values of part header parameters (e.g. filename) that are not extended parameters (that contain an explicit charset). Default: `'latin1'` - -In an average web app, only `dest` might be required, and configured as shown in -the following example. - -```javascript -const upload = multer({ dest: 'uploads/' }) -``` - -If you want more control over your uploads, you'll want to use the `storage` -option instead of `dest`. Multer ships with storage engines `DiskStorage` -and `MemoryStorage`; More engines are available from third parties. - -#### `.single(fieldname)` - -Accept a single file with the name `fieldname`. The single file will be stored -in `req.file`. - -#### `.array(fieldname[, maxCount])` - -Accept an array of files, all with the name `fieldname`. Optionally error out if -more than `maxCount` files are uploaded. The array of files will be stored in -`req.files`. - -#### `.fields(fields)` - -Accept a mix of files, specified by `fields`. An object with arrays of files -will be stored in `req.files`. - -`fields` should be an array of objects with `name` and optionally a `maxCount`. -Example: - -```javascript -[ - { name: 'avatar', maxCount: 1 }, - { name: 'gallery', maxCount: 8 } -] -``` - -#### `.none()` - -Accept only text fields. If any file upload is made, error with code -"LIMIT\_UNEXPECTED\_FILE" will be issued. - -#### `.any()` - -Accepts all files that comes over the wire. An array of files will be stored in -`req.files`. - -**WARNING:** Make sure that you always handle the files that a user uploads. -Never add multer as a global middleware since a malicious user could upload -files to a route that you didn't anticipate. Only use this function on routes -where you are handling the uploaded files. - -### `storage` - -#### `DiskStorage` - -The disk storage engine gives you full control on storing files to disk. - -```javascript -const storage = multer.diskStorage({ - destination: function (req, file, cb) { - cb(null, '/tmp/my-uploads') - }, - filename: function (req, file, cb) { - const uniqueSuffix = Date.now() + '-' + Math.round(Math.random() * 1E9) - cb(null, file.fieldname + '-' + uniqueSuffix) - } -}) - -const upload = multer({ storage: storage }) -``` - -There are two options available, `destination` and `filename`. They are both -functions that determine where the file should be stored. - -`destination` is used to determine within which folder the uploaded files should -be stored. This can also be given as a `string` (e.g. `'/tmp/uploads'`). If no -`destination` is given, the operating system's default directory for temporary -files is used. - -**Note:** You are responsible for creating the directory when providing -`destination` as a function. When passing a string, multer will make sure that -the directory is created for you. - -`filename` is used to determine what the file should be named inside the folder. -If no `filename` is given, each file will be given a random name that doesn't -include any file extension. - -**Note:** Multer will not append any file extension for you, your function -should return a filename complete with a file extension. - -Each function gets passed both the request (`req`) and some information about -the file (`file`) to aid with the decision. - -Note that `req.body` might not have been fully populated yet. It depends on the -order that the client transmits fields and files to the server. - -For understanding the calling convention used in the callback (needing to pass -null as the first param), refer to -[Node.js error handling](https://web.archive.org/web/20220417042018/https://www.joyent.com/node-js/production/design/errors) - -#### `MemoryStorage` - -The memory storage engine stores the files in memory as `Buffer` objects. It -doesn't have any options. - -```javascript -const storage = multer.memoryStorage() -const upload = multer({ storage: storage }) -``` - -When using memory storage, the file info will contain a field called -`buffer` that contains the entire file. - -**WARNING**: Uploading very large files, or relatively small files in large -numbers very quickly, can cause your application to run out of memory when -memory storage is used. - -### `limits` - -An object specifying the size limits of the following optional properties. Multer passes this object into busboy directly, and the details of the properties can be found on [busboy's page](https://github.com/mscdex/busboy#busboy-methods). - -The following integer values are available: - -Key | Description | Default ---- | --- | --- -`fieldNameSize` | Max field name size | 100 bytes -`fieldSize` | Max field value size (in bytes) | 1MB -`fields` | Max number of non-file fields | Infinity -`fileSize` | For multipart forms, the max file size (in bytes) | Infinity -`files` | For multipart forms, the max number of file fields | Infinity -`parts` | For multipart forms, the max number of parts (fields + files) | Infinity -`headerPairs` | For multipart forms, the max number of header key=>value pairs to parse | 2000 - -Specifying the limits can help protect your site against denial of service (DoS) attacks. - -### `fileFilter` - -Set this to a function to control which files should be uploaded and which -should be skipped. The function should look like this: - -```javascript -function fileFilter (req, file, cb) { - - // The function should call `cb` with a boolean - // to indicate if the file should be accepted - - // To reject this file pass `false`, like so: - cb(null, false) - - // To accept the file pass `true`, like so: - cb(null, true) - - // You can always pass an error if something goes wrong: - cb(new Error('I don\'t have a clue!')) - -} -``` - -## Error handling - -When encountering an error, Multer will delegate the error to Express. You can -display a nice error page using [the standard express way](http://expressjs.com/guide/error-handling.html). - -If you want to catch errors specifically from Multer, you can call the -middleware function by yourself. Also, if you want to catch only [the Multer errors](https://github.com/expressjs/multer/blob/main/lib/multer-error.js), you can use the `MulterError` class that is attached to the `multer` object itself (e.g. `err instanceof multer.MulterError`). - -```javascript -const multer = require('multer') -const upload = multer().single('avatar') - -app.post('/profile', function (req, res) { - upload(req, res, function (err) { - if (err instanceof multer.MulterError) { - // A Multer error occurred when uploading. - } else if (err) { - // An unknown error occurred when uploading. - } - - // Everything went fine. - }) -}) -``` - -## Custom storage engine - -For information on how to build your own storage engine, see [Multer Storage Engine](https://github.com/expressjs/multer/blob/main/StorageEngine.md). - -## License - -[MIT](LICENSE) - -[ci-image]: https://github.com/expressjs/multer/actions/workflows/ci.yml/badge.svg -[ci-url]: https://github.com/expressjs/multer/actions/workflows/ci.yml -[test-url]: https://coveralls.io/r/expressjs/multer?branch=main -[test-image]: https://badgen.net/coveralls/c/github/expressjs/multer/main -[npm-downloads-image]: https://badgen.net/npm/dm/multer -[npm-url]: https://npmjs.org/package/multer -[npm-version-image]: https://badgen.net/npm/v/multer -[ossf-scorecard-badge]: https://api.scorecard.dev/projects/github.com/expressjs/multer/badge -[ossf-scorecard-visualizer]: https://ossf.github.io/scorecard-visualizer/#/projects/github.com/expressjs/multer diff --git a/node_modules/multer/index.js b/node_modules/multer/index.js deleted file mode 100644 index 1dbfaac..0000000 --- a/node_modules/multer/index.js +++ /dev/null @@ -1,107 +0,0 @@ -var makeMiddleware = require('./lib/make-middleware') - -var diskStorage = require('./storage/disk') -var memoryStorage = require('./storage/memory') -var MulterError = require('./lib/multer-error') - -function allowAll (req, file, cb) { - cb(null, true) -} - -function Multer (options) { - if (options.storage) { - this.storage = options.storage - } else if (options.dest) { - this.storage = diskStorage({ destination: options.dest }) - } else { - this.storage = memoryStorage() - } - - this.limits = options.limits - this.preservePath = options.preservePath - this.defParamCharset = options.defParamCharset || 'latin1' - this.fileFilter = options.fileFilter || allowAll -} - -Multer.prototype._makeMiddleware = function (fields, fileStrategy) { - function setup () { - var fileFilter = this.fileFilter - var filesLeft = Object.create(null) - - fields.forEach(function (field) { - if (typeof field.maxCount === 'number') { - filesLeft[field.name] = field.maxCount - } else { - filesLeft[field.name] = Infinity - } - }) - - function wrappedFileFilter (req, file, cb) { - if ((filesLeft[file.fieldname] || 0) <= 0) { - return cb(new MulterError('LIMIT_UNEXPECTED_FILE', file.fieldname)) - } - - filesLeft[file.fieldname] -= 1 - fileFilter(req, file, cb) - } - - return { - limits: this.limits, - preservePath: this.preservePath, - defParamCharset: this.defParamCharset, - storage: this.storage, - fileFilter: wrappedFileFilter, - fileStrategy: fileStrategy - } - } - - return makeMiddleware(setup.bind(this)) -} - -Multer.prototype.single = function (name) { - return this._makeMiddleware([{ name: name, maxCount: 1 }], 'VALUE') -} - -Multer.prototype.array = function (name, maxCount) { - return this._makeMiddleware([{ name: name, maxCount: maxCount }], 'ARRAY') -} - -Multer.prototype.fields = function (fields) { - return this._makeMiddleware(fields, 'OBJECT') -} - -Multer.prototype.none = function () { - return this._makeMiddleware([], 'NONE') -} - -Multer.prototype.any = function () { - function setup () { - return { - limits: this.limits, - preservePath: this.preservePath, - defParamCharset: this.defParamCharset, - storage: this.storage, - fileFilter: this.fileFilter, - fileStrategy: 'ARRAY' - } - } - - return makeMiddleware(setup.bind(this)) -} - -function multer (options) { - if (options === undefined) { - return new Multer({}) - } - - if (typeof options === 'object' && options !== null) { - return new Multer(options) - } - - throw new TypeError('Expected object for argument options') -} - -module.exports = multer -module.exports.diskStorage = diskStorage -module.exports.memoryStorage = memoryStorage -module.exports.MulterError = MulterError diff --git a/node_modules/multer/lib/counter.js b/node_modules/multer/lib/counter.js deleted file mode 100644 index 29c410c..0000000 --- a/node_modules/multer/lib/counter.js +++ /dev/null @@ -1,28 +0,0 @@ -var EventEmitter = require('events').EventEmitter - -function Counter () { - EventEmitter.call(this) - this.value = 0 -} - -Counter.prototype = Object.create(EventEmitter.prototype) - -Counter.prototype.increment = function increment () { - this.value++ -} - -Counter.prototype.decrement = function decrement () { - if (--this.value === 0) this.emit('zero') -} - -Counter.prototype.isZero = function isZero () { - return (this.value === 0) -} - -Counter.prototype.onceZero = function onceZero (fn) { - if (this.isZero()) return fn() - - this.once('zero', fn) -} - -module.exports = Counter diff --git a/node_modules/multer/lib/file-appender.js b/node_modules/multer/lib/file-appender.js deleted file mode 100644 index a760d8b..0000000 --- a/node_modules/multer/lib/file-appender.js +++ /dev/null @@ -1,65 +0,0 @@ -function arrayRemove (arr, item) { - var idx = arr.indexOf(item) - if (~idx) arr.splice(idx, 1) -} - -function FileAppender (strategy, req) { - this.strategy = strategy - this.req = req - - switch (strategy) { - case 'NONE': break - case 'VALUE': break - case 'ARRAY': req.files = []; break - case 'OBJECT': req.files = Object.create(null); break - default: throw new Error('Unknown file strategy: ' + strategy) - } -} - -FileAppender.prototype.insertPlaceholder = function (file) { - var placeholder = { - fieldname: file.fieldname - } - - switch (this.strategy) { - case 'NONE': break - case 'VALUE': break - case 'ARRAY': this.req.files.push(placeholder); break - case 'OBJECT': - if (this.req.files[file.fieldname]) { - this.req.files[file.fieldname].push(placeholder) - } else { - this.req.files[file.fieldname] = [placeholder] - } - break - } - - return placeholder -} - -FileAppender.prototype.removePlaceholder = function (placeholder) { - switch (this.strategy) { - case 'NONE': break - case 'VALUE': break - case 'ARRAY': arrayRemove(this.req.files, placeholder); break - case 'OBJECT': - if (this.req.files[placeholder.fieldname].length === 1) { - delete this.req.files[placeholder.fieldname] - } else { - arrayRemove(this.req.files[placeholder.fieldname], placeholder) - } - break - } -} - -FileAppender.prototype.replacePlaceholder = function (placeholder, file) { - if (this.strategy === 'VALUE') { - this.req.file = file - return - } - - delete placeholder.fieldname - Object.assign(placeholder, file) -} - -module.exports = FileAppender diff --git a/node_modules/multer/lib/make-middleware.js b/node_modules/multer/lib/make-middleware.js deleted file mode 100644 index ee50988..0000000 --- a/node_modules/multer/lib/make-middleware.js +++ /dev/null @@ -1,250 +0,0 @@ -var is = require('type-is') -var Busboy = require('busboy') -var appendField = require('append-field') - -var Counter = require('./counter') -var MulterError = require('./multer-error') -var FileAppender = require('./file-appender') -var removeUploadedFiles = require('./remove-uploaded-files') - -function drainStream (stream) { - stream.on('readable', () => { - while (stream.read() !== null) {} - }) -} - -function makeMiddleware (setup) { - return function multerMiddleware (req, res, next) { - if (!is(req, ['multipart'])) return next() - - var options = setup() - - var limits = options.limits - var storage = options.storage - var fileFilter = options.fileFilter - var fileStrategy = options.fileStrategy - var preservePath = options.preservePath - var defParamCharset = options.defParamCharset - - req.body = Object.create(null) - - var busboy - var appender = null - var isDone = false - var readFinished = false - var errorOccured = false - var pendingWrites = new Counter() - var uploadedFiles = [] - - function done (err) { - var called = false - function onFinished () { - if (called) return - called = true - next(err) - } - - if (isDone) return - isDone = true - if (busboy) { - req.unpipe(busboy) - setImmediate(() => { - busboy.removeAllListeners() - }) - } - drainStream(req) - req.resume() - - // - if responding with an error, drain request body before calling - // next(err) -- avoids EPIPE on the client (server closing connection - // while the client is still sending the request body) - // - also listen for 'close' so we don't hang when the client aborts (stream may never 'end') - // - skip waiting if the stream is already destroyed (e.g. client aborted) - if (err && req.readable && !req.destroyed) { - req.once('end', onFinished) - req.once('error', onFinished) - req.once('close', onFinished) - return - } - next(err) - } - - function indicateDone () { - if (readFinished && pendingWrites.isZero() && !errorOccured) done() - } - - function abortWithError (uploadError, skipPendingWait) { - if (errorOccured) return - errorOccured = true - - function finishAbort () { - function remove (file, cb) { - storage._removeFile(req, file, cb) - } - - removeUploadedFiles(uploadedFiles, remove, function (err, storageErrors) { - if (err) return done(err) - - uploadError.storageErrors = storageErrors - done(uploadError) - }) - } - - if (skipPendingWait) { - finishAbort() - } else { - pendingWrites.onceZero(finishAbort) - } - } - - function abortWithCode (code, optionalField) { - abortWithError(new MulterError(code, optionalField)) - } - - function handleRequestFailure (err) { - if (isDone) return - if (busboy) { - req.unpipe(busboy) - busboy.destroy(err) - } - abortWithError(err, true) - } - - req.on('error', function (err) { - handleRequestFailure(err || new Error('Request error')) - }) - - req.on('aborted', function () { - handleRequestFailure(new Error('Request aborted')) - }) - - req.on('close', function () { - if (req.readableEnded) return - handleRequestFailure(new Error('Request closed')) - }) - - try { - busboy = Busboy({ - headers: req.headers, - limits: limits, - preservePath: preservePath, - defParamCharset: defParamCharset - }) - } catch (err) { - return next(err) - } - - appender = new FileAppender(fileStrategy, req) - - // handle text field data - busboy.on('field', function (fieldname, value, { nameTruncated, valueTruncated }) { - if (fieldname == null) return abortWithCode('MISSING_FIELD_NAME') - if (nameTruncated) return abortWithCode('LIMIT_FIELD_KEY') - if (valueTruncated) return abortWithCode('LIMIT_FIELD_VALUE', fieldname) - - // Work around bug in Busboy (https://github.com/mscdex/busboy/issues/6) - if (limits && Object.prototype.hasOwnProperty.call(limits, 'fieldNameSize')) { - if (fieldname.length > limits.fieldNameSize) return abortWithCode('LIMIT_FIELD_KEY') - } - - appendField(req.body, fieldname, value) - }) - - // handle files - busboy.on('file', function (fieldname, fileStream, { filename, encoding, mimeType }) { - var pendingWritesIncremented = false - - fileStream.on('error', function (err) { - if (pendingWritesIncremented) { - pendingWrites.decrement() - } - abortWithError(err) - }) - - if (fieldname == null) return abortWithCode('MISSING_FIELD_NAME') - - // don't attach to the files object, if there is no file - if (!filename) return fileStream.resume() - - // Work around bug in Busboy (https://github.com/mscdex/busboy/issues/6) - if (limits && Object.prototype.hasOwnProperty.call(limits, 'fieldNameSize')) { - if (fieldname.length > limits.fieldNameSize) return abortWithCode('LIMIT_FIELD_KEY') - } - - var file = { - fieldname: fieldname, - originalname: filename, - encoding: encoding, - mimetype: mimeType - } - - var placeholder = appender.insertPlaceholder(file) - - fileFilter(req, file, function (err, includeFile) { - if (errorOccured) { - appender.removePlaceholder(placeholder) - return fileStream.resume() - } - - if (err) { - appender.removePlaceholder(placeholder) - return abortWithError(err) - } - - if (!includeFile) { - appender.removePlaceholder(placeholder) - return fileStream.resume() - } - - var aborting = false - pendingWritesIncremented = true - pendingWrites.increment() - - Object.defineProperty(file, 'stream', { - configurable: true, - enumerable: false, - value: fileStream - }) - - fileStream.on('limit', function () { - aborting = true - abortWithCode('LIMIT_FILE_SIZE', fieldname) - }) - - storage._handleFile(req, file, function (err, info) { - if (aborting) { - appender.removePlaceholder(placeholder) - uploadedFiles.push({ ...file, ...info }) - return pendingWrites.decrement() - } - - if (err) { - appender.removePlaceholder(placeholder) - pendingWrites.decrement() - return abortWithError(err) - } - - var fileInfo = { ...file, ...info } - - appender.replacePlaceholder(placeholder, fileInfo) - uploadedFiles.push(fileInfo) - pendingWrites.decrement() - indicateDone() - }) - }) - }) - - busboy.on('error', function (err) { abortWithError(err) }) - busboy.on('partsLimit', function () { abortWithCode('LIMIT_PART_COUNT') }) - busboy.on('filesLimit', function () { abortWithCode('LIMIT_FILE_COUNT') }) - busboy.on('fieldsLimit', function () { abortWithCode('LIMIT_FIELD_COUNT') }) - busboy.on('close', function () { - readFinished = true - indicateDone() - }) - - req.pipe(busboy) - } -} - -module.exports = makeMiddleware diff --git a/node_modules/multer/lib/multer-error.js b/node_modules/multer/lib/multer-error.js deleted file mode 100644 index d56b00e..0000000 --- a/node_modules/multer/lib/multer-error.js +++ /dev/null @@ -1,24 +0,0 @@ -var util = require('util') - -var errorMessages = { - LIMIT_PART_COUNT: 'Too many parts', - LIMIT_FILE_SIZE: 'File too large', - LIMIT_FILE_COUNT: 'Too many files', - LIMIT_FIELD_KEY: 'Field name too long', - LIMIT_FIELD_VALUE: 'Field value too long', - LIMIT_FIELD_COUNT: 'Too many fields', - LIMIT_UNEXPECTED_FILE: 'Unexpected field', - MISSING_FIELD_NAME: 'Field name missing' -} - -function MulterError (code, field) { - Error.captureStackTrace(this, this.constructor) - this.name = this.constructor.name - this.message = errorMessages[code] - this.code = code - if (field) this.field = field -} - -util.inherits(MulterError, Error) - -module.exports = MulterError diff --git a/node_modules/multer/lib/remove-uploaded-files.js b/node_modules/multer/lib/remove-uploaded-files.js deleted file mode 100644 index d225c48..0000000 --- a/node_modules/multer/lib/remove-uploaded-files.js +++ /dev/null @@ -1,28 +0,0 @@ -function removeUploadedFiles (uploadedFiles, remove, cb) { - var length = uploadedFiles.length - var errors = [] - - if (length === 0) return cb(null, errors) - - function handleFile (idx) { - var file = uploadedFiles[idx] - - remove(file, function (err) { - if (err) { - err.file = file - err.field = file.fieldname - errors.push(err) - } - - if (idx < length - 1) { - setImmediate(function () { handleFile(idx + 1) }) - } else { - cb(null, errors) - } - }) - } - - handleFile(0) -} - -module.exports = removeUploadedFiles diff --git a/node_modules/multer/package.json b/node_modules/multer/package.json deleted file mode 100644 index db89511..0000000 --- a/node_modules/multer/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "multer", - "description": "Middleware for handling `multipart/form-data`.", - "version": "2.1.1", - "contributors": [ - "Hage Yaapa (http://www.hacksparrow.com)", - "Jaret Pfluger ", - "Linus Unnebäck " - ], - "license": "MIT", - "repository": "expressjs/multer", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - }, - "keywords": [ - "form", - "post", - "multipart", - "form-data", - "formdata", - "express", - "middleware" - ], - "dependencies": { - "append-field": "^1.0.0", - "busboy": "^1.6.0", - "concat-stream": "^2.0.0", - "type-is": "^1.6.18" - }, - "devDependencies": { - "deep-equal": "^2.0.3", - "express": "^4.21.2", - "form-data": "^4.0.2", - "fs-temp": "^1.2.1", - "mocha": "^11.5.0", - "nyc": "^15.1.0", - "rimraf": "^2.4.1", - "standard": "^14.3.3", - "testdata-w3c-json-form": "^1.0.0" - }, - "engines": { - "node": ">= 10.16.0" - }, - "files": [ - "LICENSE", - "index.js", - "storage/", - "lib/" - ], - "scripts": { - "lint": "standard", - "lint:fix": "standard --fix", - "test": "mocha --reporter spec --exit --check-leaks test/", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test" - } -} diff --git a/node_modules/multer/storage/disk.js b/node_modules/multer/storage/disk.js deleted file mode 100644 index ae1f7bb..0000000 --- a/node_modules/multer/storage/disk.js +++ /dev/null @@ -1,65 +0,0 @@ -var fs = require('fs') -var os = require('os') -var path = require('path') -var crypto = require('crypto') - -function getFilename (req, file, cb) { - crypto.randomBytes(16, function (err, raw) { - cb(err, err ? undefined : raw.toString('hex')) - }) -} - -function getDestination (req, file, cb) { - cb(null, os.tmpdir()) -} - -function DiskStorage (opts) { - this.getFilename = (opts.filename || getFilename) - - if (typeof opts.destination === 'string') { - fs.mkdirSync(opts.destination, { recursive: true }) - this.getDestination = function ($0, $1, cb) { cb(null, opts.destination) } - } else { - this.getDestination = (opts.destination || getDestination) - } -} - -DiskStorage.prototype._handleFile = function _handleFile (req, file, cb) { - var that = this - - that.getDestination(req, file, function (err, destination) { - if (err) return cb(err) - - that.getFilename(req, file, function (err, filename) { - if (err) return cb(err) - - var finalPath = path.join(destination, filename) - var outStream = fs.createWriteStream(finalPath) - - file.stream.pipe(outStream) - outStream.on('error', cb) - outStream.on('finish', function () { - cb(null, { - destination: destination, - filename: filename, - path: finalPath, - size: outStream.bytesWritten - }) - }) - }) - }) -} - -DiskStorage.prototype._removeFile = function _removeFile (req, file, cb) { - var path = file.path - - delete file.destination - delete file.filename - delete file.path - - fs.unlink(path, cb) -} - -module.exports = function (opts) { - return new DiskStorage(opts) -} diff --git a/node_modules/multer/storage/memory.js b/node_modules/multer/storage/memory.js deleted file mode 100644 index f953ded..0000000 --- a/node_modules/multer/storage/memory.js +++ /dev/null @@ -1,21 +0,0 @@ -var concat = require('concat-stream') - -function MemoryStorage (opts) {} - -MemoryStorage.prototype._handleFile = function _handleFile (req, file, cb) { - file.stream.pipe(concat({ encoding: 'buffer' }, function (data) { - cb(null, { - buffer: data, - size: data.length - }) - })) -} - -MemoryStorage.prototype._removeFile = function _removeFile (req, file, cb) { - delete file.buffer - cb(null) -} - -module.exports = function (opts) { - return new MemoryStorage(opts) -} diff --git a/node_modules/negotiator/HISTORY.md b/node_modules/negotiator/HISTORY.md deleted file mode 100644 index a9a5449..0000000 --- a/node_modules/negotiator/HISTORY.md +++ /dev/null @@ -1,108 +0,0 @@ -0.6.3 / 2022-01-22 -================== - - * Revert "Lazy-load modules from main entry point" - -0.6.2 / 2019-04-29 -================== - - * Fix sorting charset, encoding, and language with extra parameters - -0.6.1 / 2016-05-02 -================== - - * perf: improve `Accept` parsing speed - * perf: improve `Accept-Charset` parsing speed - * perf: improve `Accept-Encoding` parsing speed - * perf: improve `Accept-Language` parsing speed - -0.6.0 / 2015-09-29 -================== - - * Fix including type extensions in parameters in `Accept` parsing - * Fix parsing `Accept` parameters with quoted equals - * Fix parsing `Accept` parameters with quoted semicolons - * Lazy-load modules from main entry point - * perf: delay type concatenation until needed - * perf: enable strict mode - * perf: hoist regular expressions - * perf: remove closures getting spec properties - * perf: remove a closure from media type parsing - * perf: remove property delete from media type parsing - -0.5.3 / 2015-05-10 -================== - - * Fix media type parameter matching to be case-insensitive - -0.5.2 / 2015-05-06 -================== - - * Fix comparing media types with quoted values - * Fix splitting media types with quoted commas - -0.5.1 / 2015-02-14 -================== - - * Fix preference sorting to be stable for long acceptable lists - -0.5.0 / 2014-12-18 -================== - - * Fix list return order when large accepted list - * Fix missing identity encoding when q=0 exists - * Remove dynamic building of Negotiator class - -0.4.9 / 2014-10-14 -================== - - * Fix error when media type has invalid parameter - -0.4.8 / 2014-09-28 -================== - - * Fix all negotiations to be case-insensitive - * Stable sort preferences of same quality according to client order - * Support Node.js 0.6 - -0.4.7 / 2014-06-24 -================== - - * Handle invalid provided languages - * Handle invalid provided media types - -0.4.6 / 2014-06-11 -================== - - * Order by specificity when quality is the same - -0.4.5 / 2014-05-29 -================== - - * Fix regression in empty header handling - -0.4.4 / 2014-05-29 -================== - - * Fix behaviors when headers are not present - -0.4.3 / 2014-04-16 -================== - - * Handle slashes on media params correctly - -0.4.2 / 2014-02-28 -================== - - * Fix media type sorting - * Handle media types params strictly - -0.4.1 / 2014-01-16 -================== - - * Use most specific matches - -0.4.0 / 2014-01-09 -================== - - * Remove preferred prefix from methods diff --git a/node_modules/negotiator/LICENSE b/node_modules/negotiator/LICENSE deleted file mode 100644 index ea6b9e2..0000000 --- a/node_modules/negotiator/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2012-2014 Federico Romero -Copyright (c) 2012-2014 Isaac Z. Schlueter -Copyright (c) 2014-2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/negotiator/README.md b/node_modules/negotiator/README.md deleted file mode 100644 index 82915e5..0000000 --- a/node_modules/negotiator/README.md +++ /dev/null @@ -1,203 +0,0 @@ -# negotiator - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][github-actions-ci-image]][github-actions-ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -An HTTP content negotiator for Node.js - -## Installation - -```sh -$ npm install negotiator -``` - -## API - -```js -var Negotiator = require('negotiator') -``` - -### Accept Negotiation - -```js -availableMediaTypes = ['text/html', 'text/plain', 'application/json'] - -// The negotiator constructor receives a request object -negotiator = new Negotiator(request) - -// Let's say Accept header is 'text/html, application/*;q=0.2, image/jpeg;q=0.8' - -negotiator.mediaTypes() -// -> ['text/html', 'image/jpeg', 'application/*'] - -negotiator.mediaTypes(availableMediaTypes) -// -> ['text/html', 'application/json'] - -negotiator.mediaType(availableMediaTypes) -// -> 'text/html' -``` - -You can check a working example at `examples/accept.js`. - -#### Methods - -##### mediaType() - -Returns the most preferred media type from the client. - -##### mediaType(availableMediaType) - -Returns the most preferred media type from a list of available media types. - -##### mediaTypes() - -Returns an array of preferred media types ordered by the client preference. - -##### mediaTypes(availableMediaTypes) - -Returns an array of preferred media types ordered by priority from a list of -available media types. - -### Accept-Language Negotiation - -```js -negotiator = new Negotiator(request) - -availableLanguages = ['en', 'es', 'fr'] - -// Let's say Accept-Language header is 'en;q=0.8, es, pt' - -negotiator.languages() -// -> ['es', 'pt', 'en'] - -negotiator.languages(availableLanguages) -// -> ['es', 'en'] - -language = negotiator.language(availableLanguages) -// -> 'es' -``` - -You can check a working example at `examples/language.js`. - -#### Methods - -##### language() - -Returns the most preferred language from the client. - -##### language(availableLanguages) - -Returns the most preferred language from a list of available languages. - -##### languages() - -Returns an array of preferred languages ordered by the client preference. - -##### languages(availableLanguages) - -Returns an array of preferred languages ordered by priority from a list of -available languages. - -### Accept-Charset Negotiation - -```js -availableCharsets = ['utf-8', 'iso-8859-1', 'iso-8859-5'] - -negotiator = new Negotiator(request) - -// Let's say Accept-Charset header is 'utf-8, iso-8859-1;q=0.8, utf-7;q=0.2' - -negotiator.charsets() -// -> ['utf-8', 'iso-8859-1', 'utf-7'] - -negotiator.charsets(availableCharsets) -// -> ['utf-8', 'iso-8859-1'] - -negotiator.charset(availableCharsets) -// -> 'utf-8' -``` - -You can check a working example at `examples/charset.js`. - -#### Methods - -##### charset() - -Returns the most preferred charset from the client. - -##### charset(availableCharsets) - -Returns the most preferred charset from a list of available charsets. - -##### charsets() - -Returns an array of preferred charsets ordered by the client preference. - -##### charsets(availableCharsets) - -Returns an array of preferred charsets ordered by priority from a list of -available charsets. - -### Accept-Encoding Negotiation - -```js -availableEncodings = ['identity', 'gzip'] - -negotiator = new Negotiator(request) - -// Let's say Accept-Encoding header is 'gzip, compress;q=0.2, identity;q=0.5' - -negotiator.encodings() -// -> ['gzip', 'identity', 'compress'] - -negotiator.encodings(availableEncodings) -// -> ['gzip', 'identity'] - -negotiator.encoding(availableEncodings) -// -> 'gzip' -``` - -You can check a working example at `examples/encoding.js`. - -#### Methods - -##### encoding() - -Returns the most preferred encoding from the client. - -##### encoding(availableEncodings) - -Returns the most preferred encoding from a list of available encodings. - -##### encodings() - -Returns an array of preferred encodings ordered by the client preference. - -##### encodings(availableEncodings) - -Returns an array of preferred encodings ordered by priority from a list of -available encodings. - -## See Also - -The [accepts](https://npmjs.org/package/accepts#readme) module builds on -this module and provides an alternative interface, mime type validation, -and more. - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/negotiator.svg -[npm-url]: https://npmjs.org/package/negotiator -[node-version-image]: https://img.shields.io/node/v/negotiator.svg -[node-version-url]: https://nodejs.org/en/download/ -[coveralls-image]: https://img.shields.io/coveralls/jshttp/negotiator/master.svg -[coveralls-url]: https://coveralls.io/r/jshttp/negotiator?branch=master -[downloads-image]: https://img.shields.io/npm/dm/negotiator.svg -[downloads-url]: https://npmjs.org/package/negotiator -[github-actions-ci-image]: https://img.shields.io/github/workflow/status/jshttp/negotiator/ci/master?label=ci -[github-actions-ci-url]: https://github.com/jshttp/negotiator/actions/workflows/ci.yml diff --git a/node_modules/negotiator/index.js b/node_modules/negotiator/index.js deleted file mode 100644 index 4788264..0000000 --- a/node_modules/negotiator/index.js +++ /dev/null @@ -1,82 +0,0 @@ -/*! - * negotiator - * Copyright(c) 2012 Federico Romero - * Copyright(c) 2012-2014 Isaac Z. Schlueter - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -var preferredCharsets = require('./lib/charset') -var preferredEncodings = require('./lib/encoding') -var preferredLanguages = require('./lib/language') -var preferredMediaTypes = require('./lib/mediaType') - -/** - * Module exports. - * @public - */ - -module.exports = Negotiator; -module.exports.Negotiator = Negotiator; - -/** - * Create a Negotiator instance from a request. - * @param {object} request - * @public - */ - -function Negotiator(request) { - if (!(this instanceof Negotiator)) { - return new Negotiator(request); - } - - this.request = request; -} - -Negotiator.prototype.charset = function charset(available) { - var set = this.charsets(available); - return set && set[0]; -}; - -Negotiator.prototype.charsets = function charsets(available) { - return preferredCharsets(this.request.headers['accept-charset'], available); -}; - -Negotiator.prototype.encoding = function encoding(available) { - var set = this.encodings(available); - return set && set[0]; -}; - -Negotiator.prototype.encodings = function encodings(available) { - return preferredEncodings(this.request.headers['accept-encoding'], available); -}; - -Negotiator.prototype.language = function language(available) { - var set = this.languages(available); - return set && set[0]; -}; - -Negotiator.prototype.languages = function languages(available) { - return preferredLanguages(this.request.headers['accept-language'], available); -}; - -Negotiator.prototype.mediaType = function mediaType(available) { - var set = this.mediaTypes(available); - return set && set[0]; -}; - -Negotiator.prototype.mediaTypes = function mediaTypes(available) { - return preferredMediaTypes(this.request.headers.accept, available); -}; - -// Backwards compatibility -Negotiator.prototype.preferredCharset = Negotiator.prototype.charset; -Negotiator.prototype.preferredCharsets = Negotiator.prototype.charsets; -Negotiator.prototype.preferredEncoding = Negotiator.prototype.encoding; -Negotiator.prototype.preferredEncodings = Negotiator.prototype.encodings; -Negotiator.prototype.preferredLanguage = Negotiator.prototype.language; -Negotiator.prototype.preferredLanguages = Negotiator.prototype.languages; -Negotiator.prototype.preferredMediaType = Negotiator.prototype.mediaType; -Negotiator.prototype.preferredMediaTypes = Negotiator.prototype.mediaTypes; diff --git a/node_modules/negotiator/lib/charset.js b/node_modules/negotiator/lib/charset.js deleted file mode 100644 index cdd0148..0000000 --- a/node_modules/negotiator/lib/charset.js +++ /dev/null @@ -1,169 +0,0 @@ -/** - * negotiator - * Copyright(c) 2012 Isaac Z. Schlueter - * Copyright(c) 2014 Federico Romero - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module exports. - * @public - */ - -module.exports = preferredCharsets; -module.exports.preferredCharsets = preferredCharsets; - -/** - * Module variables. - * @private - */ - -var simpleCharsetRegExp = /^\s*([^\s;]+)\s*(?:;(.*))?$/; - -/** - * Parse the Accept-Charset header. - * @private - */ - -function parseAcceptCharset(accept) { - var accepts = accept.split(','); - - for (var i = 0, j = 0; i < accepts.length; i++) { - var charset = parseCharset(accepts[i].trim(), i); - - if (charset) { - accepts[j++] = charset; - } - } - - // trim accepts - accepts.length = j; - - return accepts; -} - -/** - * Parse a charset from the Accept-Charset header. - * @private - */ - -function parseCharset(str, i) { - var match = simpleCharsetRegExp.exec(str); - if (!match) return null; - - var charset = match[1]; - var q = 1; - if (match[2]) { - var params = match[2].split(';') - for (var j = 0; j < params.length; j++) { - var p = params[j].trim().split('='); - if (p[0] === 'q') { - q = parseFloat(p[1]); - break; - } - } - } - - return { - charset: charset, - q: q, - i: i - }; -} - -/** - * Get the priority of a charset. - * @private - */ - -function getCharsetPriority(charset, accepted, index) { - var priority = {o: -1, q: 0, s: 0}; - - for (var i = 0; i < accepted.length; i++) { - var spec = specify(charset, accepted[i], index); - - if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { - priority = spec; - } - } - - return priority; -} - -/** - * Get the specificity of the charset. - * @private - */ - -function specify(charset, spec, index) { - var s = 0; - if(spec.charset.toLowerCase() === charset.toLowerCase()){ - s |= 1; - } else if (spec.charset !== '*' ) { - return null - } - - return { - i: index, - o: spec.i, - q: spec.q, - s: s - } -} - -/** - * Get the preferred charsets from an Accept-Charset header. - * @public - */ - -function preferredCharsets(accept, provided) { - // RFC 2616 sec 14.2: no header = * - var accepts = parseAcceptCharset(accept === undefined ? '*' : accept || ''); - - if (!provided) { - // sorted list of all charsets - return accepts - .filter(isQuality) - .sort(compareSpecs) - .map(getFullCharset); - } - - var priorities = provided.map(function getPriority(type, index) { - return getCharsetPriority(type, accepts, index); - }); - - // sorted list of accepted charsets - return priorities.filter(isQuality).sort(compareSpecs).map(function getCharset(priority) { - return provided[priorities.indexOf(priority)]; - }); -} - -/** - * Compare two specs. - * @private - */ - -function compareSpecs(a, b) { - return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0; -} - -/** - * Get full charset string. - * @private - */ - -function getFullCharset(spec) { - return spec.charset; -} - -/** - * Check if a spec has any quality. - * @private - */ - -function isQuality(spec) { - return spec.q > 0; -} diff --git a/node_modules/negotiator/lib/encoding.js b/node_modules/negotiator/lib/encoding.js deleted file mode 100644 index 8432cd7..0000000 --- a/node_modules/negotiator/lib/encoding.js +++ /dev/null @@ -1,184 +0,0 @@ -/** - * negotiator - * Copyright(c) 2012 Isaac Z. Schlueter - * Copyright(c) 2014 Federico Romero - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module exports. - * @public - */ - -module.exports = preferredEncodings; -module.exports.preferredEncodings = preferredEncodings; - -/** - * Module variables. - * @private - */ - -var simpleEncodingRegExp = /^\s*([^\s;]+)\s*(?:;(.*))?$/; - -/** - * Parse the Accept-Encoding header. - * @private - */ - -function parseAcceptEncoding(accept) { - var accepts = accept.split(','); - var hasIdentity = false; - var minQuality = 1; - - for (var i = 0, j = 0; i < accepts.length; i++) { - var encoding = parseEncoding(accepts[i].trim(), i); - - if (encoding) { - accepts[j++] = encoding; - hasIdentity = hasIdentity || specify('identity', encoding); - minQuality = Math.min(minQuality, encoding.q || 1); - } - } - - if (!hasIdentity) { - /* - * If identity doesn't explicitly appear in the accept-encoding header, - * it's added to the list of acceptable encoding with the lowest q - */ - accepts[j++] = { - encoding: 'identity', - q: minQuality, - i: i - }; - } - - // trim accepts - accepts.length = j; - - return accepts; -} - -/** - * Parse an encoding from the Accept-Encoding header. - * @private - */ - -function parseEncoding(str, i) { - var match = simpleEncodingRegExp.exec(str); - if (!match) return null; - - var encoding = match[1]; - var q = 1; - if (match[2]) { - var params = match[2].split(';'); - for (var j = 0; j < params.length; j++) { - var p = params[j].trim().split('='); - if (p[0] === 'q') { - q = parseFloat(p[1]); - break; - } - } - } - - return { - encoding: encoding, - q: q, - i: i - }; -} - -/** - * Get the priority of an encoding. - * @private - */ - -function getEncodingPriority(encoding, accepted, index) { - var priority = {o: -1, q: 0, s: 0}; - - for (var i = 0; i < accepted.length; i++) { - var spec = specify(encoding, accepted[i], index); - - if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { - priority = spec; - } - } - - return priority; -} - -/** - * Get the specificity of the encoding. - * @private - */ - -function specify(encoding, spec, index) { - var s = 0; - if(spec.encoding.toLowerCase() === encoding.toLowerCase()){ - s |= 1; - } else if (spec.encoding !== '*' ) { - return null - } - - return { - i: index, - o: spec.i, - q: spec.q, - s: s - } -}; - -/** - * Get the preferred encodings from an Accept-Encoding header. - * @public - */ - -function preferredEncodings(accept, provided) { - var accepts = parseAcceptEncoding(accept || ''); - - if (!provided) { - // sorted list of all encodings - return accepts - .filter(isQuality) - .sort(compareSpecs) - .map(getFullEncoding); - } - - var priorities = provided.map(function getPriority(type, index) { - return getEncodingPriority(type, accepts, index); - }); - - // sorted list of accepted encodings - return priorities.filter(isQuality).sort(compareSpecs).map(function getEncoding(priority) { - return provided[priorities.indexOf(priority)]; - }); -} - -/** - * Compare two specs. - * @private - */ - -function compareSpecs(a, b) { - return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0; -} - -/** - * Get full encoding string. - * @private - */ - -function getFullEncoding(spec) { - return spec.encoding; -} - -/** - * Check if a spec has any quality. - * @private - */ - -function isQuality(spec) { - return spec.q > 0; -} diff --git a/node_modules/negotiator/lib/language.js b/node_modules/negotiator/lib/language.js deleted file mode 100644 index a231672..0000000 --- a/node_modules/negotiator/lib/language.js +++ /dev/null @@ -1,179 +0,0 @@ -/** - * negotiator - * Copyright(c) 2012 Isaac Z. Schlueter - * Copyright(c) 2014 Federico Romero - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module exports. - * @public - */ - -module.exports = preferredLanguages; -module.exports.preferredLanguages = preferredLanguages; - -/** - * Module variables. - * @private - */ - -var simpleLanguageRegExp = /^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/; - -/** - * Parse the Accept-Language header. - * @private - */ - -function parseAcceptLanguage(accept) { - var accepts = accept.split(','); - - for (var i = 0, j = 0; i < accepts.length; i++) { - var language = parseLanguage(accepts[i].trim(), i); - - if (language) { - accepts[j++] = language; - } - } - - // trim accepts - accepts.length = j; - - return accepts; -} - -/** - * Parse a language from the Accept-Language header. - * @private - */ - -function parseLanguage(str, i) { - var match = simpleLanguageRegExp.exec(str); - if (!match) return null; - - var prefix = match[1] - var suffix = match[2] - var full = prefix - - if (suffix) full += "-" + suffix; - - var q = 1; - if (match[3]) { - var params = match[3].split(';') - for (var j = 0; j < params.length; j++) { - var p = params[j].split('='); - if (p[0] === 'q') q = parseFloat(p[1]); - } - } - - return { - prefix: prefix, - suffix: suffix, - q: q, - i: i, - full: full - }; -} - -/** - * Get the priority of a language. - * @private - */ - -function getLanguagePriority(language, accepted, index) { - var priority = {o: -1, q: 0, s: 0}; - - for (var i = 0; i < accepted.length; i++) { - var spec = specify(language, accepted[i], index); - - if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { - priority = spec; - } - } - - return priority; -} - -/** - * Get the specificity of the language. - * @private - */ - -function specify(language, spec, index) { - var p = parseLanguage(language) - if (!p) return null; - var s = 0; - if(spec.full.toLowerCase() === p.full.toLowerCase()){ - s |= 4; - } else if (spec.prefix.toLowerCase() === p.full.toLowerCase()) { - s |= 2; - } else if (spec.full.toLowerCase() === p.prefix.toLowerCase()) { - s |= 1; - } else if (spec.full !== '*' ) { - return null - } - - return { - i: index, - o: spec.i, - q: spec.q, - s: s - } -}; - -/** - * Get the preferred languages from an Accept-Language header. - * @public - */ - -function preferredLanguages(accept, provided) { - // RFC 2616 sec 14.4: no header = * - var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || ''); - - if (!provided) { - // sorted list of all languages - return accepts - .filter(isQuality) - .sort(compareSpecs) - .map(getFullLanguage); - } - - var priorities = provided.map(function getPriority(type, index) { - return getLanguagePriority(type, accepts, index); - }); - - // sorted list of accepted languages - return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) { - return provided[priorities.indexOf(priority)]; - }); -} - -/** - * Compare two specs. - * @private - */ - -function compareSpecs(a, b) { - return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0; -} - -/** - * Get full language string. - * @private - */ - -function getFullLanguage(spec) { - return spec.full; -} - -/** - * Check if a spec has any quality. - * @private - */ - -function isQuality(spec) { - return spec.q > 0; -} diff --git a/node_modules/negotiator/lib/mediaType.js b/node_modules/negotiator/lib/mediaType.js deleted file mode 100644 index 67309dd..0000000 --- a/node_modules/negotiator/lib/mediaType.js +++ /dev/null @@ -1,294 +0,0 @@ -/** - * negotiator - * Copyright(c) 2012 Isaac Z. Schlueter - * Copyright(c) 2014 Federico Romero - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict'; - -/** - * Module exports. - * @public - */ - -module.exports = preferredMediaTypes; -module.exports.preferredMediaTypes = preferredMediaTypes; - -/** - * Module variables. - * @private - */ - -var simpleMediaTypeRegExp = /^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/; - -/** - * Parse the Accept header. - * @private - */ - -function parseAccept(accept) { - var accepts = splitMediaTypes(accept); - - for (var i = 0, j = 0; i < accepts.length; i++) { - var mediaType = parseMediaType(accepts[i].trim(), i); - - if (mediaType) { - accepts[j++] = mediaType; - } - } - - // trim accepts - accepts.length = j; - - return accepts; -} - -/** - * Parse a media type from the Accept header. - * @private - */ - -function parseMediaType(str, i) { - var match = simpleMediaTypeRegExp.exec(str); - if (!match) return null; - - var params = Object.create(null); - var q = 1; - var subtype = match[2]; - var type = match[1]; - - if (match[3]) { - var kvps = splitParameters(match[3]).map(splitKeyValuePair); - - for (var j = 0; j < kvps.length; j++) { - var pair = kvps[j]; - var key = pair[0].toLowerCase(); - var val = pair[1]; - - // get the value, unwrapping quotes - var value = val && val[0] === '"' && val[val.length - 1] === '"' - ? val.substr(1, val.length - 2) - : val; - - if (key === 'q') { - q = parseFloat(value); - break; - } - - // store parameter - params[key] = value; - } - } - - return { - type: type, - subtype: subtype, - params: params, - q: q, - i: i - }; -} - -/** - * Get the priority of a media type. - * @private - */ - -function getMediaTypePriority(type, accepted, index) { - var priority = {o: -1, q: 0, s: 0}; - - for (var i = 0; i < accepted.length; i++) { - var spec = specify(type, accepted[i], index); - - if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { - priority = spec; - } - } - - return priority; -} - -/** - * Get the specificity of the media type. - * @private - */ - -function specify(type, spec, index) { - var p = parseMediaType(type); - var s = 0; - - if (!p) { - return null; - } - - if(spec.type.toLowerCase() == p.type.toLowerCase()) { - s |= 4 - } else if(spec.type != '*') { - return null; - } - - if(spec.subtype.toLowerCase() == p.subtype.toLowerCase()) { - s |= 2 - } else if(spec.subtype != '*') { - return null; - } - - var keys = Object.keys(spec.params); - if (keys.length > 0) { - if (keys.every(function (k) { - return spec.params[k] == '*' || (spec.params[k] || '').toLowerCase() == (p.params[k] || '').toLowerCase(); - })) { - s |= 1 - } else { - return null - } - } - - return { - i: index, - o: spec.i, - q: spec.q, - s: s, - } -} - -/** - * Get the preferred media types from an Accept header. - * @public - */ - -function preferredMediaTypes(accept, provided) { - // RFC 2616 sec 14.2: no header = */* - var accepts = parseAccept(accept === undefined ? '*/*' : accept || ''); - - if (!provided) { - // sorted list of all types - return accepts - .filter(isQuality) - .sort(compareSpecs) - .map(getFullType); - } - - var priorities = provided.map(function getPriority(type, index) { - return getMediaTypePriority(type, accepts, index); - }); - - // sorted list of accepted types - return priorities.filter(isQuality).sort(compareSpecs).map(function getType(priority) { - return provided[priorities.indexOf(priority)]; - }); -} - -/** - * Compare two specs. - * @private - */ - -function compareSpecs(a, b) { - return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0; -} - -/** - * Get full type string. - * @private - */ - -function getFullType(spec) { - return spec.type + '/' + spec.subtype; -} - -/** - * Check if a spec has any quality. - * @private - */ - -function isQuality(spec) { - return spec.q > 0; -} - -/** - * Count the number of quotes in a string. - * @private - */ - -function quoteCount(string) { - var count = 0; - var index = 0; - - while ((index = string.indexOf('"', index)) !== -1) { - count++; - index++; - } - - return count; -} - -/** - * Split a key value pair. - * @private - */ - -function splitKeyValuePair(str) { - var index = str.indexOf('='); - var key; - var val; - - if (index === -1) { - key = str; - } else { - key = str.substr(0, index); - val = str.substr(index + 1); - } - - return [key, val]; -} - -/** - * Split an Accept header into media types. - * @private - */ - -function splitMediaTypes(accept) { - var accepts = accept.split(','); - - for (var i = 1, j = 0; i < accepts.length; i++) { - if (quoteCount(accepts[j]) % 2 == 0) { - accepts[++j] = accepts[i]; - } else { - accepts[j] += ',' + accepts[i]; - } - } - - // trim accepts - accepts.length = j + 1; - - return accepts; -} - -/** - * Split a string of parameters. - * @private - */ - -function splitParameters(str) { - var parameters = str.split(';'); - - for (var i = 1, j = 0; i < parameters.length; i++) { - if (quoteCount(parameters[j]) % 2 == 0) { - parameters[++j] = parameters[i]; - } else { - parameters[j] += ';' + parameters[i]; - } - } - - // trim parameters - parameters.length = j + 1; - - for (var i = 0; i < parameters.length; i++) { - parameters[i] = parameters[i].trim(); - } - - return parameters; -} diff --git a/node_modules/negotiator/package.json b/node_modules/negotiator/package.json deleted file mode 100644 index 297635f..0000000 --- a/node_modules/negotiator/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "negotiator", - "description": "HTTP content negotiation", - "version": "0.6.3", - "contributors": [ - "Douglas Christopher Wilson ", - "Federico Romero ", - "Isaac Z. Schlueter (http://blog.izs.me/)" - ], - "license": "MIT", - "keywords": [ - "http", - "content negotiation", - "accept", - "accept-language", - "accept-encoding", - "accept-charset" - ], - "repository": "jshttp/negotiator", - "devDependencies": { - "eslint": "7.32.0", - "eslint-plugin-markdown": "2.2.1", - "mocha": "9.1.3", - "nyc": "15.1.0" - }, - "files": [ - "lib/", - "HISTORY.md", - "LICENSE", - "index.js", - "README.md" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "lint": "eslint .", - "test": "mocha --reporter spec --check-leaks --bail test/", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test" - } -} diff --git a/node_modules/nodemon/LICENSE b/node_modules/nodemon/LICENSE deleted file mode 100644 index 19c91a2..0000000 --- a/node_modules/nodemon/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2010 - present, Remy Sharp, https://remysharp.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/nodemon/README.md b/node_modules/nodemon/README.md deleted file mode 100644 index 60f254e..0000000 --- a/node_modules/nodemon/README.md +++ /dev/null @@ -1,434 +0,0 @@ -
- -# nodemon - -nodemon is a tool that helps develop Node.js based applications by automatically restarting the node application when file changes in the directory are detected. - -nodemon does **not** require *any* additional changes to your code or method of development. nodemon is a replacement wrapper for `node`. To use `nodemon`, replace the word `node` on the command line when executing your script. - -[![NPM version](https://badge.fury.io/js/nodemon.svg)](https://npmjs.org/package/nodemon) -[![Travis Status](https://travis-ci.org/remy/nodemon.svg?branch=master)](https://travis-ci.org/remy/nodemon) [![Backers on Open Collective](https://opencollective.com/nodemon/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/nodemon/sponsors/badge.svg)](#sponsors) - -# Installation - -Either through cloning with git or by using [npm](http://npmjs.org) (the recommended way): - -```bash -npm install -g nodemon # or using yarn: yarn global add nodemon -``` - -And nodemon will be installed globally to your system path. - -You can also install nodemon as a development dependency: - -```bash -npm install --save-dev nodemon # or using yarn: yarn add nodemon -D -``` - -With a local installation, nodemon will not be available in your system path or you can't use it directly from the command line. Instead, the local installation of nodemon can be run by calling it from within an npm script (such as `npm start`) or using `npx nodemon`. - -# Usage - -nodemon wraps your application, so you can pass all the arguments you would normally pass to your app: - -```bash -nodemon [your node app] -``` - -For CLI options, use the `-h` (or `--help`) argument: - -```bash -nodemon -h -``` - -Using nodemon is simple, if my application accepted a host and port as the arguments, I would start it as so: - -```bash -nodemon ./server.js localhost 8080 -``` - -Any output from this script is prefixed with `[nodemon]`, otherwise all output from your application, errors included, will be echoed out as expected. - -You can also pass the `inspect` flag to node through the command line as you would normally: - -```bash -nodemon --inspect ./server.js 80 -``` - -If you have a `package.json` file for your app, you can omit the main script entirely and nodemon will read the `package.json` for the `main` property and use that value as the app ([ref](https://github.com/remy/nodemon/issues/14)). - -nodemon will also search for the `scripts.start` property in `package.json` (as of nodemon 1.1.x). - -Also check out the [FAQ](https://github.com/remy/nodemon/blob/master/faq.md) or [issues](https://github.com/remy/nodemon/issues) for nodemon. - -## Automatic re-running - -nodemon was originally written to restart hanging processes such as web servers, but now supports apps that cleanly exit. If your script exits cleanly, nodemon will continue to monitor the directory (or directories) and restart the script if there are any changes. - -## Manual restarting - -Whilst nodemon is running, if you need to manually restart your application, instead of stopping and restart nodemon, you can type `rs` with a carriage return, and nodemon will restart your process. - -## Config files - -nodemon supports local and global configuration files. These are usually named `nodemon.json` and can be located in the current working directory or in your home directory. An alternative local configuration file can be specified with the `--config ` option. - -The specificity is as follows, so that a command line argument will always override the config file settings: - -- command line arguments -- local config -- global config - -A config file can take any of the command line arguments as JSON key values, for example: - -```json -{ - "verbose": true, - "ignore": ["*.test.js", "**/fixtures/**"], - "execMap": { - "rb": "ruby", - "pde": "processing --sketch={{pwd}} --run" - } -} -``` - -The above `nodemon.json` file might be my global config so that I have support for ruby files and processing files, and I can run `nodemon demo.pde` and nodemon will automatically know how to run the script even though out of the box support for processing scripts. - -A further example of options can be seen in [sample-nodemon.md](https://github.com/remy/nodemon/blob/master/doc/sample-nodemon.md) - -### package.json - -If you want to keep all your package configurations in one place, nodemon supports using `package.json` for configuration. -Specify the config in the same format as you would for a config file but under `nodemonConfig` in the `package.json` file, for example, take the following `package.json`: - -```json -{ - "name": "nodemon", - "homepage": "http://nodemon.io", - "...": "... other standard package.json values", - "nodemonConfig": { - "ignore": ["**/test/**", "**/docs/**"], - "delay": 2500 - } -} -``` - -Note that if you specify a `--config` file or provide a local `nodemon.json` any `package.json` config is ignored. - -*This section needs better documentation, but for now you can also see `nodemon --help config` ([also here](https://github.com/remy/nodemon/blob/master/doc/cli/config.txt))*. - -## Using nodemon as a module - -Please see [doc/requireable.md](doc/requireable.md) - -## Using nodemon as child process - -Please see [doc/events.md](doc/events.md#Using_nodemon_as_child_process) - -## Running non-node scripts - -nodemon can also be used to execute and monitor other programs. nodemon will read the file extension of the script being run and monitor that extension instead of `.js` if there's no `nodemon.json`: - -```bash -nodemon --exec "python -v" ./app.py -``` - -Now nodemon will run `app.py` with python in verbose mode (note that if you're not passing args to the exec program, you don't need the quotes), and look for new or modified files with the `.py` extension. - -### Default executables - -Using the `nodemon.json` config file, you can define your own default executables using the `execMap` property. This is particularly useful if you're working with a language that isn't supported by default by nodemon. - -To add support for nodemon to know about the `.pl` extension (for Perl), the `nodemon.json` file would add: - -```json -{ - "execMap": { - "pl": "perl" - } -} -``` - -Now running the following, nodemon will know to use `perl` as the executable: - -```bash -nodemon script.pl -``` - -It's generally recommended to use the global `nodemon.json` to add your own `execMap` options. However, if there's a common default that's missing, this can be merged in to the project so that nodemon supports it by default, by changing [default.js](https://github.com/remy/nodemon/blob/master/lib/config/defaults.js) and sending a pull request. - -## Monitoring multiple directories - -By default nodemon monitors the current working directory. If you want to take control of that option, use the `--watch` option to add specific paths: - -```bash -nodemon --watch app --watch libs app/server.js -``` - -Now nodemon will only restart if there are changes in the `./app` or `./libs` directory. By default nodemon will traverse sub-directories, so there's no need in explicitly including sub-directories. - -Nodemon also supports unix globbing, e.g `--watch './lib/*'`. The globbing pattern must be quoted. - -## Specifying extension watch list - -By default, nodemon looks for files with the `.js`, `.mjs`, `.coffee`, `.litcoffee`, and `.json` extensions. If you use the `--exec` option and monitor `app.py` nodemon will monitor files with the extension of `.py`. However, you can specify your own list with the `-e` (or `--ext`) switch like so: - -```bash -nodemon -e js,pug -``` - -Now nodemon will restart on any changes to files in the directory (or subdirectories) with the extensions `.js`, `.pug`. - -## Ignoring files - -By default, nodemon will only restart when a `.js` JavaScript file changes. In some cases you will want to ignore some specific files, directories or file patterns, to prevent nodemon from prematurely restarting your application. - -This can be done via the command line: - -```bash -nodemon --ignore lib/ --ignore tests/ -``` - -Or specific files can be ignored: - -```bash -nodemon --ignore lib/app.js -``` - -Patterns can also be ignored (but be sure to quote the arguments): - -```bash -nodemon --ignore 'lib/*.js' -``` - -**Important** the ignore rules are patterns matched to the full absolute path, and this determines how many files are monitored. If using a wild card glob pattern, it needs to be used as `**` or omitted entirely. For example, `nodemon --ignore '**/test/**'` will work, whereas `--ignore '*/test/*'` will not. - -Note that by default, nodemon will ignore the `.git`, `node_modules`, `bower_components`, `.nyc_output`, `coverage` and `.sass-cache` directories and *add* your ignored patterns to the list. If you want to indeed watch a directory like `node_modules`, you need to [override the underlying default ignore rules](https://github.com/remy/nodemon/blob/master/faq.md#overriding-the-underlying-default-ignore-rules). - -## Application isn't restarting - -In some networked environments (such as a container running nodemon reading across a mounted drive), you will need to use the `legacyWatch: true` which enables Chokidar's polling. - -Via the CLI, use either `--legacy-watch` or `-L` for short: - -```bash -nodemon -L -``` - -Though this should be a last resort as it will poll every file it can find. - -## Delaying restarting - -In some situations, you may want to wait until a number of files have changed. The timeout before checking for new file changes is 1 second. If you're uploading a number of files and it's taking some number of seconds, this could cause your app to restart multiple times unnecessarily. - -To add an extra throttle, or delay restarting, use the `--delay` command: - -```bash -nodemon --delay 10 server.js -``` - -For more precision, milliseconds can be specified. Either as a float: - -```bash -nodemon --delay 2.5 server.js -``` - -Or using the time specifier (ms): - -```bash -nodemon --delay 2500ms server.js -``` - -The delay figure is number of seconds (or milliseconds, if specified) to delay before restarting. So nodemon will only restart your app the given number of seconds after the *last* file change. - -If you are setting this value in `nodemon.json`, the value will always be interpreted in milliseconds. E.g., the following are equivalent: - -```bash -nodemon --delay 2.5 - -{ - "delay": 2500 -} -``` - -## Gracefully reloading down your script - -It is possible to have nodemon send any signal that you specify to your application. - -```bash -nodemon --signal SIGHUP server.js -``` - -Your application can handle the signal as follows. - -```js -process.once("SIGHUP", function () { - reloadSomeConfiguration(); -}) -``` - -Please note that nodemon will send this signal to every process in the process tree. - -If you are using `cluster`, then each workers (as well as the master) will receive the signal. If you wish to terminate all workers on receiving a `SIGHUP`, a common pattern is to catch the `SIGHUP` in the master, and forward `SIGTERM` to all workers, while ensuring that all workers ignore `SIGHUP`. - -```js -if (cluster.isMaster) { - process.on("SIGHUP", function () { - for (const worker of Object.values(cluster.workers)) { - worker.process.kill("SIGTERM"); - } - }); -} else { - process.on("SIGHUP", function() {}) -} -``` - -## Controlling shutdown of your script - -nodemon sends a kill signal to your application when it sees a file update. If you need to clean up on shutdown inside your script you can capture the kill signal and handle it yourself. - -The following example will listen once for the `SIGUSR2` signal (used by nodemon to restart), run the clean up process and then kill itself for nodemon to continue control: - -```js -process.once('SIGUSR2', function () { - gracefulShutdown(function () { - process.kill(process.pid, 'SIGUSR2'); - }); -}); -``` - -Note that the `process.kill` is *only* called once your shutdown jobs are complete. Hat tip to [Benjie Gillam](http://www.benjiegillam.com/2011/08/node-js-clean-restart-and-faster-development-with-nodemon/) for writing this technique up. - -## Triggering events when nodemon state changes - -If you want growl like notifications when nodemon restarts or to trigger an action when an event happens, then you can either `require` nodemon or add event actions to your `nodemon.json` file. - -For example, to trigger a notification on a Mac when nodemon restarts, `nodemon.json` looks like this: - -```json -{ - "events": { - "restart": "osascript -e 'display notification \"app restarted\" with title \"nodemon\"'" - } -} -``` - -A full list of available events is listed on the [event states wiki](https://github.com/remy/nodemon/wiki/Events#states). Note that you can bind to both states and messages. - -## Pipe output to somewhere else - -```js -nodemon({ - script: ..., - stdout: false // important: this tells nodemon not to output to console -}).on('readable', function() { // the `readable` event indicates that data is ready to pick up - this.stdout.pipe(fs.createWriteStream('output.txt')); - this.stderr.pipe(fs.createWriteStream('err.txt')); -}); -``` - -## Using nodemon in your gulp workflow - -Check out the [gulp-nodemon](https://github.com/JacksonGariety/gulp-nodemon) plugin to integrate nodemon with the rest of your project's gulp workflow. - -## Using nodemon in your Grunt workflow - -Check out the [grunt-nodemon](https://github.com/ChrisWren/grunt-nodemon) plugin to integrate nodemon with the rest of your project's grunt workflow. - -## Pronunciation - -> nodemon, is it pronounced: node-mon, no-demon or node-e-mon (like pokémon)? - -Well...I've been asked this many times before. I like that I've been asked this before. There's been bets as to which one it actually is. - -The answer is simple, but possibly frustrating. I'm not saying (how I pronounce it). It's up to you to call it as you like. All answers are correct :) - -## Design principles - -- Fewer flags is better -- Works across all platforms -- Fewer features -- Let individuals build on top of nodemon -- Offer all CLI functionality as an API -- Contributions must have and pass tests - -Nodemon is not perfect, and CLI arguments has sprawled beyond where I'm completely happy, but perhaps it can be reduced a little one day. - -## FAQ - -See the [FAQ](https://github.com/remy/nodemon/blob/master/faq.md) and please add your own questions if you think they would help others. - -## Backers - -Thank you to all [our backers](https://opencollective.com/nodemon#backer)! 🙏 - -[![nodemon backers](https://opencollective.com/nodemon/backers.svg?width=890)](https://opencollective.com/nodemon#backers) - -## Sponsors - -Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Sponsor this project today ❤️](https://opencollective.com/nodemon#sponsor) - -
null -#1 Aussie Gambling Guide -NettiCasinoHEX.com is a real giant among casino guides. It provides Finnish players with the most informative and honest casino rewievs. Beside that, there are free casino games and tips there which help to win the best jackpots. -null -Casinoonlineaams.com -aussielowdepositcasino.com -null -null -The UK’s number one place for all things GamStop. -null -freebets.ltd.uk -null -Marketing -Best Online Casino Guide in Australia -Rating of best betting sites in Australia -null -null -null -null -null -null - -null -We are the most advanced casino guide! -Best Australian online casinos. Reviewed by Correct Casinos. -casino online sicuri -null -null - - -null -Best Online Casinos -null -Buy Instagram Views -Website dedicated to finding the best and safest licensed online casinos in India -null -null -null -null -null -null -null -null -Broadband.deals -null -null -At Casinoaustraliaonline.com, we review, compare and list all the best gambling sites for Aussies.
- -Data-Driven SEO Agency -We offer SEO Services in Europe. Scale your traffic and grow more users online via Google -Australia Online Casino Reviewer -Casino utan svensk licens är online casinon som inte har en svensk spellicens. -We provide Marketing Services for the iGaming and Technology space -Likes.io is a social media engagement service that helps users increase their visibility and boost their online presence. With Likes.io, users can easily and quickly get more likes, followers, and views for their social media profiles, including Instagram -null -null -Buy Instagram Likes -
- -# License - -MIT [http://rem.mit-license.org](http://rem.mit-license.org) diff --git a/node_modules/nodemon/bin/nodemon.js b/node_modules/nodemon/bin/nodemon.js deleted file mode 100644 index 3d490f1..0000000 --- a/node_modules/nodemon/bin/nodemon.js +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env node - -const cli = require('../lib/cli'); -const nodemon = require('../lib/'); -const options = cli.parse(process.argv); - -nodemon(options); - -const fs = require('fs'); - -// checks for available update and returns an instance -const pkg = JSON.parse(fs.readFileSync(__dirname + '/../package.json')); - -if (pkg.version.indexOf('0.0.0') !== 0 && options.noUpdateNotifier !== true) { - require('simple-update-notifier')({ pkg }); -} diff --git a/node_modules/nodemon/bin/windows-kill.exe b/node_modules/nodemon/bin/windows-kill.exe deleted file mode 100644 index 98d7d7f..0000000 Binary files a/node_modules/nodemon/bin/windows-kill.exe and /dev/null differ diff --git a/node_modules/nodemon/doc/cli/authors.txt b/node_modules/nodemon/doc/cli/authors.txt deleted file mode 100644 index 6c77a12..0000000 --- a/node_modules/nodemon/doc/cli/authors.txt +++ /dev/null @@ -1,8 +0,0 @@ - - Remy Sharp - author and maintainer - https://github.com/remy - https://twitter.com/rem - - Contributors: https://github.com/remy/nodemon/graphs/contributors ❤︎ - - Please help make nodemon better: https://github.com/remy/nodemon/ diff --git a/node_modules/nodemon/doc/cli/config.txt b/node_modules/nodemon/doc/cli/config.txt deleted file mode 100644 index 5de9bba..0000000 --- a/node_modules/nodemon/doc/cli/config.txt +++ /dev/null @@ -1,44 +0,0 @@ - - Typically the options to control nodemon are passed in via the CLI and are - listed under: nodemon --help options - - nodemon can also be configured via a local and global config file: - - * $HOME/nodemon.json - * $PWD/nodemon.json OR --config - * nodemonConfig in package.json - - All config options in the .json file map 1-to-1 with the CLI options, so a - config could read as: - - { - "ext": "*.pde", - "verbose": true, - "exec": "processing --sketch=game --run" - } - - There are a limited number of variables available in the config (since you - could use backticks on the CLI to use a variable, backticks won't work in - the .json config). - - * {{pwd}} - the current directory - * {{filename}} - the filename you pass to nodemon - - For example: - - { - "ext": "*.pde", - "verbose": true, - "exec": "processing --sketch={{pwd}} --run" - } - - The global config file is useful for setting up default executables - instead of repeating the same option in each of your local configs: - - { - "verbose": true, - "execMap": { - "rb": "ruby", - "pde": "processing --sketch={{pwd}} --run" - } - } diff --git a/node_modules/nodemon/doc/cli/help.txt b/node_modules/nodemon/doc/cli/help.txt deleted file mode 100644 index 7ba4ff2..0000000 --- a/node_modules/nodemon/doc/cli/help.txt +++ /dev/null @@ -1,29 +0,0 @@ - Usage: nodemon [options] [script.js] [args] - - Options: - - --config file ............ alternate nodemon.json config file to use - -e, --ext ................ extensions to look for, ie. js,pug,hbs. - -x, --exec app ........... execute script with "app", ie. -x "python -v". - -w, --watch path ......... watch directory "path" or files. use once for - each directory or file to watch. - -i, --ignore ............. ignore specific files or directories. - -V, --verbose ............ show detail on what is causing restarts. - -- ........... to tell nodemon stop slurping arguments. - - Note: if the script is omitted, nodemon will try to read "main" from - package.json and without a nodemon.json, nodemon will monitor .js, .mjs, .coffee, - .litcoffee, and .json by default. - - For advanced nodemon configuration use nodemon.json: nodemon --help config - See also the sample: https://github.com/remy/nodemon/wiki/Sample-nodemon.json - - Examples: - - $ nodemon server.js - $ nodemon -w ../foo server.js apparg1 apparg2 - $ nodemon --exec python app.py - $ nodemon --exec "make build" -e "styl hbs" - $ nodemon app.js -- --config # pass config to app.js - - \x1B[1mAll options are documented under: \x1B[4mnodemon --help options\x1B[0m diff --git a/node_modules/nodemon/doc/cli/logo.txt b/node_modules/nodemon/doc/cli/logo.txt deleted file mode 100644 index 150f97f..0000000 --- a/node_modules/nodemon/doc/cli/logo.txt +++ /dev/null @@ -1,20 +0,0 @@ - ; ; - kO. x0 - KMX, .:x0kc. 'KMN - 0MMM0: 'oKMMMMMMMXd, ;OMMMX - oMMMMMWKOONMMMMMMMMMMMMMWOOKWMMMMMx - OMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMK. - .oWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMd. - KMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMN - KMMMMMMMMMMMMMMW0k0WMMMMMMMMMMMMMMW - KMMMMMMMMMMMNk:. :xNMMMMMMMMMMMW - KMMMMMMMMMMK OMMMMMMMMMMW - KMMMMMMMMMMO xMMMMMMMMMMN - KMMMMMMMMMMO xMMMMMMMMMMN - KMMMMMMMMMMO xMMMMMMMMMMN - KMMMMMMMMMMO xMMMMMMMMMMN - KMMMMMMMMMMO xMMMMMMMMMMN - KMMMMMMMMMNc ;NMMMMMMMMMN - KMMMMMW0o' .lOWMMMMMN - KMMKd; ,oKMMN - kX: ,K0 \ No newline at end of file diff --git a/node_modules/nodemon/doc/cli/options.txt b/node_modules/nodemon/doc/cli/options.txt deleted file mode 100644 index 598ae63..0000000 --- a/node_modules/nodemon/doc/cli/options.txt +++ /dev/null @@ -1,36 +0,0 @@ - -Configuration - --config .......... alternate nodemon.json config file to use - --exitcrash .............. exit on crash, allows nodemon to work with other watchers - -i, --ignore ............. ignore specific files or directories - --no-colors .............. disable color output - --signal ........ use specified kill signal instead of default (ex. SIGTERM) - -w, --watch path ......... watch directory "dir" or files. use once for each - directory or file to watch - --no-update-notifier ..... opt-out of update version check - -Execution - -C, --on-change-only ..... execute script on change only, not startup - --cwd .............. change into before running the script - -e, --ext ................ extensions to look for, ie. "js,pug,hbs" - -I, --no-stdin ........... nodemon passes stdin directly to child process - --spawn .................. force nodemon to use spawn (over fork) [node only] - -x, --exec app ........... execute script with "app", ie. -x "python -v" - -- ........... to tell nodemon stop slurping arguments - -Watching - -d, --delay n ............ debounce restart for "n" seconds - -L, --legacy-watch ....... use polling to watch for changes (typically needed - when watching over a network/Docker) - -P, --polling-interval ... combined with -L, milliseconds to poll for (default 100) - -Information - --dump ................... print full debug configuration - -h, --help ............... default help - --help ........... help on a specific feature. Try "--help topics" - -q, --quiet .............. minimise nodemon messages to start/stop only - -v, --version ............ current nodemon version - -V, --verbose ............ show detail on what is causing restarts - - -> Note that any unrecognised arguments are passed to the executing command. diff --git a/node_modules/nodemon/doc/cli/topics.txt b/node_modules/nodemon/doc/cli/topics.txt deleted file mode 100644 index 9fe3e2b..0000000 --- a/node_modules/nodemon/doc/cli/topics.txt +++ /dev/null @@ -1,8 +0,0 @@ - - options .................. show all available nodemon options - config ................... default config options using nodemon.json - authors .................. contributors to this project - logo ..................... <3 - whoami ................... I, AM, NODEMON \o/ - - Please support https://github.com/remy/nodemon/ diff --git a/node_modules/nodemon/doc/cli/usage.txt b/node_modules/nodemon/doc/cli/usage.txt deleted file mode 100644 index bca98b5..0000000 --- a/node_modules/nodemon/doc/cli/usage.txt +++ /dev/null @@ -1,3 +0,0 @@ - Usage: nodemon [nodemon options] [script.js] [args] - - See "nodemon --help" for more. diff --git a/node_modules/nodemon/doc/cli/whoami.txt b/node_modules/nodemon/doc/cli/whoami.txt deleted file mode 100644 index efc3382..0000000 --- a/node_modules/nodemon/doc/cli/whoami.txt +++ /dev/null @@ -1,9 +0,0 @@ -__/\\\\\_____/\\\_______/\\\\\_______/\\\\\\\\\\\\_____/\\\\\\\\\\\\\\\__/\\\\____________/\\\\_______/\\\\\_______/\\\\\_____/\\\_ - _\/\\\\\\___\/\\\_____/\\\///\\\____\/\\\////////\\\__\/\\\///////////__\/\\\\\\________/\\\\\\_____/\\\///\\\____\/\\\\\\___\/\\\_ - _\/\\\/\\\__\/\\\___/\\\/__\///\\\__\/\\\______\//\\\_\/\\\_____________\/\\\//\\\____/\\\//\\\___/\\\/__\///\\\__\/\\\/\\\__\/\\\_ - _\/\\\//\\\_\/\\\__/\\\______\//\\\_\/\\\_______\/\\\_\/\\\\\\\\\\\_____\/\\\\///\\\/\\\/_\/\\\__/\\\______\//\\\_\/\\\//\\\_\/\\\_ - _\/\\\\//\\\\/\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/\\\///////______\/\\\__\///\\\/___\/\\\_\/\\\_______\/\\\_\/\\\\//\\\\/\\\_ - _\/\\\_\//\\\/\\\_\//\\\______/\\\__\/\\\_______\/\\\_\/\\\_____________\/\\\____\///_____\/\\\_\//\\\______/\\\__\/\\\_\//\\\/\\\_ - _\/\\\__\//\\\\\\__\///\\\__/\\\____\/\\\_______/\\\__\/\\\_____________\/\\\_____________\/\\\__\///\\\__/\\\____\/\\\__\//\\\\\\_ - _\/\\\___\//\\\\\____\///\\\\\/_____\/\\\\\\\\\\\\/___\/\\\\\\\\\\\\\\\_\/\\\_____________\/\\\____\///\\\\\/_____\/\\\___\//\\\\\_ - _\///_____\/////_______\/////_______\////////////_____\///////////////__\///______________\///_______\/////_______\///_____\/////__ \ No newline at end of file diff --git a/node_modules/nodemon/lib/cli/index.js b/node_modules/nodemon/lib/cli/index.js deleted file mode 100644 index bf9e809..0000000 --- a/node_modules/nodemon/lib/cli/index.js +++ /dev/null @@ -1,49 +0,0 @@ -var parse = require('./parse'); - -/** - * Converts a string to command line args, in particular - * groups together quoted values. - * This is a utility function to allow calling nodemon as a required - * library, but with the CLI args passed in (instead of an object). - * - * @param {String} string - * @return {Array} - */ -function stringToArgs(string) { - var args = []; - - var parts = string.split(' '); - var length = parts.length; - var i = 0; - var open = false; - var grouped = ''; - var lead = ''; - - for (; i < length; i++) { - lead = parts[i].substring(0, 1); - if (lead === '"' || lead === '\'') { - open = lead; - grouped = parts[i].substring(1); - } else if (open && parts[i].slice(-1) === open) { - open = false; - grouped += ' ' + parts[i].slice(0, -1); - args.push(grouped); - } else if (open) { - grouped += ' ' + parts[i]; - } else { - args.push(parts[i]); - } - } - - return args; -} - -module.exports = { - parse: function (argv) { - if (typeof argv === 'string') { - argv = stringToArgs(argv); - } - - return parse(argv); - }, -}; \ No newline at end of file diff --git a/node_modules/nodemon/lib/cli/parse.js b/node_modules/nodemon/lib/cli/parse.js deleted file mode 100644 index ad74003..0000000 --- a/node_modules/nodemon/lib/cli/parse.js +++ /dev/null @@ -1,230 +0,0 @@ -/* - -nodemon is a utility for node, and replaces the use of the executable -node. So the user calls `nodemon foo.js` instead. - -nodemon can be run in a number of ways: - -`nodemon` - tries to use package.json#main property to run -`nodemon` - if no package, looks for index.js -`nodemon app.js` - runs app.js -`nodemon --arg app.js --apparg` - eats arg1, and runs app.js with apparg -`nodemon --apparg` - as above, but passes apparg to package.json#main (or - index.js) -`nodemon --debug app.js - -*/ - -var fs = require('fs'); -var path = require('path'); -var existsSync = fs.existsSync || path.existsSync; - -module.exports = parse; - -/** - * Parses the command line arguments `process.argv` and returns the - * nodemon options, the user script and the executable script. - * - * @param {Array} full process arguments, including `node` leading arg - * @return {Object} { options, script, args } - */ -function parse(argv) { - if (typeof argv === 'string') { - argv = argv.split(' '); - } - - var eat = function (i, args) { - if (i <= args.length) { - return args.splice(i + 1, 1).pop(); - } - }; - - var args = argv.slice(2); - var script = null; - var nodemonOptions = { scriptPosition: null }; - - var nodemonOpt = nodemonOption.bind(null, nodemonOptions); - var lookForArgs = true; - - // move forward through the arguments - for (var i = 0; i < args.length; i++) { - // if the argument looks like a file, then stop eating - if (!script) { - if (args[i] === '.' || existsSync(args[i])) { - script = args.splice(i, 1).pop(); - - // we capture the position of the script because we'll reinsert it in - // the right place in run.js:command (though I'm not sure we should even - // take it out of the array in the first place, but this solves passing - // arguments to the exec process for now). - nodemonOptions.scriptPosition = i; - i--; - continue; - } - } - - if (lookForArgs) { - // respect the standard way of saying: hereafter belongs to my script - if (args[i] === '--') { - args.splice(i, 1); - nodemonOptions.scriptPosition = i; - // cycle back one argument, as we just ate this one up - i--; - - // ignore all further nodemon arguments - lookForArgs = false; - - // move to the next iteration - continue; - } - - if (nodemonOpt(args[i], eat.bind(null, i, args)) !== false) { - args.splice(i, 1); - // cycle back one argument, as we just ate this one up - i--; - } - } - } - - nodemonOptions.script = script; - nodemonOptions.args = args; - - return nodemonOptions; -} - - -/** - * Given an argument (ie. from process.argv), sets nodemon - * options and can eat up the argument value - * - * @param {Object} options object that will be updated - * @param {Sting} current argument from argv - * @param {Function} the callback to eat up the next argument in argv - * @return {Boolean} false if argument was not a nodemon arg - */ -function nodemonOption(options, arg, eatNext) { - // line separation on purpose to help legibility - if (arg === '--help' || arg === '-h' || arg === '-?') { - var help = eatNext(); - options.help = help ? help : true; - } else - - if (arg === '--version' || arg === '-v') { - options.version = true; - } else - - if (arg === '--no-update-notifier') { - options.noUpdateNotifier = true; - } else - - if (arg === '--spawn') { - options.spawn = true; - } else - - if (arg === '--dump') { - options.dump = true; - } else - - if (arg === '--verbose' || arg === '-V') { - options.verbose = true; - } else - - if (arg === '--legacy-watch' || arg === '-L') { - options.legacyWatch = true; - } else - - if (arg === '--polling-interval' || arg === '-P') { - options.pollingInterval = parseInt(eatNext(), 10); - } else - - // Depricated as this is "on" by default - if (arg === '--js') { - options.js = true; - } else - - if (arg === '--quiet' || arg === '-q') { - options.quiet = true; - } else - - if (arg === '--config') { - options.configFile = eatNext(); - } else - - if (arg === '--watch' || arg === '-w') { - if (!options.watch) { options.watch = []; } - options.watch.push(eatNext()); - } else - - if (arg === '--ignore' || arg === '-i') { - if (!options.ignore) { options.ignore = []; } - options.ignore.push(eatNext()); - } else - - if (arg === '--exitcrash') { - options.exitcrash = true; - } else - - if (arg === '--delay' || arg === '-d') { - options.delay = parseDelay(eatNext()); - } else - - if (arg === '--exec' || arg === '-x') { - options.exec = eatNext(); - } else - - if (arg === '--no-stdin' || arg === '-I') { - options.stdin = false; - } else - - if (arg === '--on-change-only' || arg === '-C') { - options.runOnChangeOnly = true; - } else - - if (arg === '--ext' || arg === '-e') { - options.ext = eatNext(); - } else - - if (arg === '--no-colours' || arg === '--no-colors') { - options.colours = false; - } else - - if (arg === '--signal' || arg === '-s') { - options.signal = eatNext(); - } else - - if (arg === '--cwd') { - options.cwd = eatNext(); - - // go ahead and change directory. This is primarily for nodemon tools like - // grunt-nodemon - we're doing this early because it will affect where the - // user script is searched for. - process.chdir(path.resolve(options.cwd)); - } else { - - // this means we didn't match - return false; - } -} - -/** - * Given an argument (ie. from nodemonOption()), will parse and return the - * equivalent millisecond value or 0 if the argument cannot be parsed - * - * @param {String} argument value given to the --delay option - * @return {Number} millisecond equivalent of the argument - */ -function parseDelay(value) { - var millisPerSecond = 1000; - var millis = 0; - - if (value.match(/^\d*ms$/)) { - // Explicitly parse for milliseconds when using ms time specifier - millis = parseInt(value, 10); - } else { - // Otherwise, parse for seconds, with or without time specifier then convert - millis = parseFloat(value) * millisPerSecond; - } - - return isNaN(millis) ? 0 : millis; -} - diff --git a/node_modules/nodemon/lib/config/command.js b/node_modules/nodemon/lib/config/command.js deleted file mode 100644 index 9839b5c..0000000 --- a/node_modules/nodemon/lib/config/command.js +++ /dev/null @@ -1,43 +0,0 @@ -module.exports = command; - -/** - * command constructs the executable command to run in a shell including the - * user script, the command arguments. - * - * @param {Object} settings Object as: - * { execOptions: { - * exec: String, - * [script: String], - * [scriptPosition: Number], - * [execArgs: Array] - * } - * } - * @return {Object} an object with the node executable and the - * arguments to the command - */ -function command(settings) { - var options = settings.execOptions; - var executable = options.exec; - var args = []; - - // after "executable" go the exec args (like --debug, etc) - if (options.execArgs) { - [].push.apply(args, options.execArgs); - } - - // then goes the user's script arguments - if (options.args) { - [].push.apply(args, options.args); - } - - // after the "executable" goes the user's script - if (options.script) { - args.splice((options.scriptPosition || 0) + - options.execArgs.length, 0, options.script); - } - - return { - executable: executable, - args: args, - }; -} diff --git a/node_modules/nodemon/lib/config/defaults.js b/node_modules/nodemon/lib/config/defaults.js deleted file mode 100644 index c1795b9..0000000 --- a/node_modules/nodemon/lib/config/defaults.js +++ /dev/null @@ -1,32 +0,0 @@ -var ignoreRoot = require('ignore-by-default').directories(); - -// default options for config.options -const defaults = { - restartable: 'rs', - colours: true, - execMap: { - py: 'python', - rb: 'ruby', - ts: 'ts-node', - // more can be added here such as ls: lsc - but please ensure it's cross - // compatible with linux, mac and windows, or make the default.js - // dynamically append the `.cmd` for node based utilities - }, - ignoreRoot: ignoreRoot.map((_) => `**/${_}/**`), - watch: ['*.*'], - stdin: true, - runOnChangeOnly: false, - verbose: false, - signal: 'SIGUSR2', - // 'stdout' refers to the default behaviour of a required nodemon's child, - // but also includes stderr. If this is false, data is still dispatched via - // nodemon.on('stdout/stderr') - stdout: true, - watchOptions: {}, -}; - -if ((process.env.NODE_OPTIONS || '').includes('--loader')) { - delete defaults.execMap.ts; -} - -module.exports = defaults; diff --git a/node_modules/nodemon/lib/config/exec.js b/node_modules/nodemon/lib/config/exec.js deleted file mode 100644 index 68c2a2d..0000000 --- a/node_modules/nodemon/lib/config/exec.js +++ /dev/null @@ -1,225 +0,0 @@ -const path = require('path'); -const fs = require('fs'); -const existsSync = fs.existsSync; -const utils = require('../utils'); - -module.exports = exec; -module.exports.expandScript = expandScript; - -/** - * Reads the cwd/package.json file and looks to see if it can load a script - * and possibly an exec first from package.main, then package.start. - * - * @return {Object} exec & script if found - */ -function execFromPackage() { - // doing a try/catch because we can't use the path.exist callback pattern - // or we could, but the code would get messy, so this will do exactly - // what we're after - if the file doesn't exist, it'll throw. - try { - // note: this isn't nodemon's package, it's the user's cwd package - var pkg = require(path.join(process.cwd(), 'package.json')); - if (pkg.main !== undefined) { - // no app found to run - so give them a tip and get the feck out - return { exec: null, script: pkg.main }; - } - - if (pkg.scripts && pkg.scripts.start) { - return { exec: pkg.scripts.start }; - } - } catch (e) { } - - return null; -} - -function replace(map, str) { - var re = new RegExp('{{(' + Object.keys(map).join('|') + ')}}', 'g'); - return str.replace(re, function (all, m) { - return map[m] || all || ''; - }); -} - -function expandScript(script, ext) { - if (!ext) { - ext = '.js'; - } - if (script.indexOf(ext) !== -1) { - return script; - } - - if (existsSync(path.resolve(script))) { - return script; - } - - if (existsSync(path.resolve(script + ext))) { - return script + ext; - } - - return script; -} - -/** - * Discovers all the options required to run the script - * and if a custom exec has been passed in, then it will - * also try to work out what extensions to monitor and - * whether there's a special way of running that script. - * - * @param {Object} nodemonOptions - * @param {Object} execMap - * @return {Object} new and updated version of nodemonOptions - */ -function exec(nodemonOptions, execMap) { - if (!execMap) { - execMap = {}; - } - - var options = utils.clone(nodemonOptions || {}); - var script; - - // if there's no script passed, try to get it from the first argument - if (!options.script && (options.args || []).length) { - script = expandScript(options.args[0], - options.ext && ('.' + (options.ext || 'js').split(',')[0])); - - // if the script was found, shift it off our args - if (script !== options.args[0]) { - options.script = script; - options.args.shift(); - } - } - - // if there's no exec found yet, then try to read it from the local - // package.json this logic used to sit in the cli/parse, but actually the cli - // should be parsed first, then the user options (via nodemon.json) then - // finally default down to pot shots at the directory via package.json - if (!options.exec && !options.script) { - var found = execFromPackage(); - if (found !== null) { - if (found.exec) { - options.exec = found.exec; - } - if (!options.script) { - options.script = found.script; - } - if (Array.isArray(options.args) && - options.scriptPosition === null) { - options.scriptPosition = options.args.length; - } - } - } - - // var options = utils.clone(nodemonOptions || {}); - script = path.basename(options.script || ''); - - var scriptExt = path.extname(script).slice(1); - - var extension = options.ext; - if (extension === undefined) { - var isJS = scriptExt === 'js' || scriptExt === 'mjs'; - extension = (isJS || !scriptExt) ? 'js,mjs' : scriptExt; - extension += ',json'; // Always watch JSON files - } - - var execDefined = !!options.exec; - - // allows the user to simplify cli usage: - // https://github.com/remy/nodemon/issues/195 - // but always give preference to the user defined argument - if (!options.exec && execMap[scriptExt] !== undefined) { - options.exec = execMap[scriptExt]; - execDefined = true; - } - - options.execArgs = nodemonOptions.execArgs || []; - - if (Array.isArray(options.exec)) { - options.execArgs = options.exec; - options.exec = options.execArgs.shift(); - } - - if (options.exec === undefined) { - options.exec = 'node'; - } else { - // allow variable substitution for {{filename}} and {{pwd}} - var substitution = replace.bind(null, { - filename: options.script, - pwd: process.cwd(), - }); - - var newExec = substitution(options.exec); - if (newExec !== options.exec && - options.exec.indexOf('{{filename}}') !== -1) { - options.script = null; - } - options.exec = newExec; - - var newExecArgs = options.execArgs.map(substitution); - if (newExecArgs.join('') !== options.execArgs.join('')) { - options.execArgs = newExecArgs; - delete options.script; - } - } - - - if (options.exec === 'node' && options.nodeArgs && options.nodeArgs.length) { - options.execArgs = options.execArgs.concat(options.nodeArgs); - } - - // note: indexOf('coffee') handles both .coffee and .litcoffee - if (!execDefined && options.exec === 'node' && - scriptExt.indexOf('coffee') !== -1) { - options.exec = 'coffee'; - - // we need to get execArgs set before the script - // for example, in `nodemon --debug my-script.coffee --my-flag`, debug is an - // execArg, while my-flag is a script arg - var leadingArgs = (options.args || []).splice(0, options.scriptPosition); - options.execArgs = options.execArgs.concat(leadingArgs); - options.scriptPosition = 0; - - if (options.execArgs.length > 0) { - // because this is the coffee executable, we need to combine the exec args - // into a single argument after the nodejs flag - options.execArgs = ['--nodejs', options.execArgs.join(' ')]; - } - } - - if (options.exec === 'coffee') { - // don't override user specified extension tracking - if (options.ext === undefined) { - if (extension) { extension += ','; } - extension += 'coffee,litcoffee'; - } - - // because windows can't find 'coffee', it needs the real file 'coffee.cmd' - if (utils.isWindows) { - options.exec += '.cmd'; - } - } - - // allow users to make a mistake on the extension to monitor - // converts .js, pug => js,pug - // BIG NOTE: user can't do this: nodemon -e *.js - // because the terminal will automatically expand the glob against - // the file system :( - extension = (extension.match(/[^,*\s]+/g) || []) - .map(ext => ext.replace(/^\./, '')) - .join(','); - - options.ext = extension; - - if (options.script) { - options.script = expandScript(options.script, - extension && ('.' + extension.split(',')[0])); - } - - options.env = {}; - // make sure it's an object (and since we don't have ) - if (({}).toString.apply(nodemonOptions.env) === '[object Object]') { - options.env = utils.clone(nodemonOptions.env); - } else if (nodemonOptions.env !== undefined) { - throw new Error('nodemon env values must be an object: { PORT: 8000 }'); - } - - return options; -} diff --git a/node_modules/nodemon/lib/config/index.js b/node_modules/nodemon/lib/config/index.js deleted file mode 100644 index c78c435..0000000 --- a/node_modules/nodemon/lib/config/index.js +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Manages the internal config of nodemon, checking for the state of support - * with fs.watch, how nodemon can watch files (using find or fs methods). - * - * This is *not* the user's config. - */ -var debug = require('debug')('nodemon'); -var load = require('./load'); -var rules = require('../rules'); -var utils = require('../utils'); -var pinVersion = require('../version').pin; -var command = require('./command'); -var rulesToMonitor = require('../monitor/match').rulesToMonitor; -var bus = utils.bus; - -function reset() { - rules.reset(); - - config.dirs = []; - config.options = { ignore: [], watch: [], monitor: [] }; - config.lastStarted = 0; - config.loaded = []; -} - -var config = { - run: false, - system: { - cwd: process.cwd(), - }, - required: false, - dirs: [], - timeout: 1000, - options: {}, -}; - -/** - * Take user defined settings, then detect the local machine capability, then - * look for local and global nodemon.json files and merge together the final - * settings with the config for nodemon. - * - * @param {Object} settings user defined settings for nodemon (typically on - * the cli) - * @param {Function} ready callback fired once the config is loaded - */ -config.load = function (settings, ready) { - reset(); - var config = this; - load(settings, config.options, config, function (options) { - config.options = options; - - if (options.watch.length === 0) { - // this is to catch when the watch is left blank - options.watch.push('*.*'); - } - - if (options['watch_interval']) { // jshint ignore:line - options.watchInterval = options['watch_interval']; // jshint ignore:line - } - - config.watchInterval = options.watchInterval || null; - if (options.signal) { - config.signal = options.signal; - } - - var cmd = command(config.options); - config.command = { - raw: cmd, - string: utils.stringify(cmd.executable, cmd.args), - }; - - // now run automatic checks on system adding to the config object - options.monitor = rulesToMonitor(options.watch, options.ignore, config); - - var cwd = process.cwd(); - debug('config: dirs', config.dirs); - if (config.dirs.length === 0) { - config.dirs.unshift(cwd); - } - - bus.emit('config:update', config); - pinVersion().then(function () { - ready(config); - }).catch(e => { - // this doesn't help testing, but does give exposure on syntax errors - console.error(e.stack); - setTimeout(() => { throw e; }, 0); - }); - }); -}; - -config.reset = reset; - -module.exports = config; diff --git a/node_modules/nodemon/lib/config/load.js b/node_modules/nodemon/lib/config/load.js deleted file mode 100644 index bd5a03d..0000000 --- a/node_modules/nodemon/lib/config/load.js +++ /dev/null @@ -1,256 +0,0 @@ -var debug = require('debug')('nodemon'); -var fs = require('fs'); -var path = require('path'); -var exists = fs.exists || path.exists; -var utils = require('../utils'); -var rules = require('../rules'); -var parse = require('../rules/parse'); -var exec = require('./exec'); -var defaults = require('./defaults'); - -module.exports = load; -module.exports.mutateExecOptions = mutateExecOptions; - -var existsSync = fs.existsSync || path.existsSync; - -function findAppScript() { - // nodemon has been run alone, so try to read the package file - // or try to read the index.js file - if (existsSync('./index.js')) { - return 'index.js'; - } -} - -/** - * Load the nodemon config, first reading the global root/nodemon.json, then - * the local nodemon.json to the exec and then overwriting using any user - * specified settings (i.e. from the cli) - * - * @param {Object} settings user defined settings - * @param {Function} ready callback that receives complete config - */ -function load(settings, options, config, callback) { - config.loaded = []; - // first load the root nodemon.json - loadFile(options, config, utils.home, function (options) { - // then load the user's local configuration file - if (settings.configFile) { - options.configFile = path.resolve(settings.configFile); - } - loadFile(options, config, process.cwd(), function (options) { - // Then merge over with the user settings (parsed from the cli). - // Note that merge protects and favours existing values over new values, - // and thus command line arguments get priority - options = utils.merge(settings, options); - - // legacy support - if (!Array.isArray(options.ignore)) { - options.ignore = [options.ignore]; - } - - if (!options.ignoreRoot) { - options.ignoreRoot = defaults.ignoreRoot; - } - - // blend the user ignore and the default ignore together - if (options.ignoreRoot && options.ignore) { - if (!Array.isArray(options.ignoreRoot)) { - options.ignoreRoot = [options.ignoreRoot]; - } - options.ignore = options.ignoreRoot.concat(options.ignore); - } else { - options.ignore = defaults.ignore.concat(options.ignore); - } - - - // add in any missing defaults - options = utils.merge(options, defaults); - - if (!options.script && !options.exec) { - var found = findAppScript(); - if (found) { - if (!options.args) { - options.args = []; - } - // if the script is found as a result of not being on the command - // line, then we move any of the pre double-dash args in execArgs - const n = options.scriptPosition === null ? - options.args.length : options.scriptPosition; - - options.execArgs = (options.execArgs || []) - .concat(options.args.splice(0, n)); - options.scriptPosition = null; - - options.script = found; - } - } - - mutateExecOptions(options); - - if (options.quiet) { - utils.quiet(); - } - - if (options.verbose) { - utils.debug = true; - } - - // simplify the ready callback to be called after the rules are normalised - // from strings to regexp through the rules lib. Note that this gets - // created *after* options is overwritten twice in the lines above. - var ready = function (options) { - normaliseRules(options, callback); - }; - - // if we didn't pick up a nodemon.json file & there's no cli ignores - // then try loading an old style .nodemonignore file - if (config.loaded.length === 0) { - var legacy = loadLegacyIgnore.bind(null, options, config, ready); - - // first try .nodemonignore, if that doesn't exist, try nodemon-ignore - return legacy('.nodemonignore', function () { - legacy('nodemon-ignore', function (options) { - ready(options); - }); - }); - } - - ready(options); - }); - }); -} - -/** - * Loads the old style nodemonignore files which is a list of patterns - * in a file to ignore - * - * @param {Object} options nodemon user options - * @param {Function} success - * @param {String} filename ignore file (.nodemonignore or nodemon-ignore) - * @param {Function} fail (optional) failure callback - */ -function loadLegacyIgnore(options, config, success, filename, fail) { - var ignoreFile = path.join(process.cwd(), filename); - - exists(ignoreFile, function (exists) { - if (exists) { - config.loaded.push(ignoreFile); - return parse(ignoreFile, function (error, rules) { - options.ignore = rules.raw; - success(options); - }); - } - - if (fail) { - fail(options); - } else { - success(options); - } - }); -} - -function normaliseRules(options, ready) { - // convert ignore and watch options to rules/regexp - rules.watch.add(options.watch); - rules.ignore.add(options.ignore); - - // normalise the watch and ignore arrays - options.watch = options.watch === false ? false : rules.rules.watch; - options.ignore = rules.rules.ignore; - - ready(options); -} - -/** - * Looks for a config in the current working directory, and a config in the - * user's home directory, merging the two together, giving priority to local - * config. This can then be overwritten later by command line arguments - * - * @param {Function} ready callback to pass loaded settings to - */ -function loadFile(options, config, dir, ready) { - if (!ready) { - ready = function () { }; - } - - var callback = function (settings) { - // prefer the local nodemon.json and fill in missing items using - // the global options - ready(utils.merge(settings, options)); - }; - - if (!dir) { - return callback({}); - } - - var filename = options.configFile || path.join(dir, 'nodemon.json'); - - if (config.loaded.indexOf(filename) !== -1) { - // don't bother re-parsing the same config file - return callback({}); - } - - fs.readFile(filename, 'utf8', function (err, data) { - if (err) { - if (err.code === 'ENOENT') { - if (!options.configFile && dir !== utils.home) { - // if no specified local config file and local nodemon.json - // doesn't exist, try the package.json - return loadPackageJSON(config, callback); - } - } - return callback({}); - } - - var settings = {}; - - try { - settings = JSON.parse(data.toString('utf8').replace(/^\uFEFF/, '')); - if (!filename.endsWith('package.json') || settings.nodemonConfig) { - config.loaded.push(filename); - } - } catch (e) { - utils.log.fail('Failed to parse config ' + filename); - console.error(e); - process.exit(1); - } - - // options values will overwrite settings - callback(settings); - }); -} - -function loadPackageJSON(config, ready) { - if (!ready) { - ready = () => { }; - } - - const dir = process.cwd(); - const filename = path.join(dir, 'package.json'); - const packageLoadOptions = { configFile: filename }; - return loadFile(packageLoadOptions, config, dir, settings => { - ready(settings.nodemonConfig || {}); - }); -} - -function mutateExecOptions(options) { - // work out the execOptions based on the final config we have - options.execOptions = exec({ - script: options.script, - exec: options.exec, - args: options.args, - scriptPosition: options.scriptPosition, - nodeArgs: options.nodeArgs, - execArgs: options.execArgs, - ext: options.ext, - env: options.env, - }, options.execMap); - - // clean up values that we don't need at the top level - delete options.scriptPosition; - delete options.script; - delete options.args; - delete options.ext; - - return options; -} diff --git a/node_modules/nodemon/lib/help/index.js b/node_modules/nodemon/lib/help/index.js deleted file mode 100644 index 1054b60..0000000 --- a/node_modules/nodemon/lib/help/index.js +++ /dev/null @@ -1,27 +0,0 @@ -var fs = require('fs'); -var path = require('path'); -const supportsColor = require('supports-color'); - -module.exports = help; - -const highlight = supportsColor.stdout ? '\x1B\[$1m' : ''; - -function help(item) { - if (!item) { - item = 'help'; - } else if (item === true) { // if used with -h or --help and no args - item = 'help'; - } - - // cleanse the filename to only contain letters - // aka: /\W/g but figured this was eaiser to read - item = item.replace(/[^a-z]/gi, ''); - - try { - var dir = path.join(__dirname, '..', '..', 'doc', 'cli', item + '.txt'); - var body = fs.readFileSync(dir, 'utf8'); - return body.replace(/\\x1B\[(.)m/g, highlight); - } catch (e) { - return '"' + item + '" help can\'t be found'; - } -} diff --git a/node_modules/nodemon/lib/index.js b/node_modules/nodemon/lib/index.js deleted file mode 100644 index 0eca5c4..0000000 --- a/node_modules/nodemon/lib/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./nodemon'); \ No newline at end of file diff --git a/node_modules/nodemon/lib/monitor/index.js b/node_modules/nodemon/lib/monitor/index.js deleted file mode 100644 index 89db029..0000000 --- a/node_modules/nodemon/lib/monitor/index.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - run: require('./run'), - watch: require('./watch').watch, -}; diff --git a/node_modules/nodemon/lib/monitor/match.js b/node_modules/nodemon/lib/monitor/match.js deleted file mode 100644 index 2ac3b29..0000000 --- a/node_modules/nodemon/lib/monitor/match.js +++ /dev/null @@ -1,276 +0,0 @@ -const minimatch = require('minimatch'); -const path = require('path'); -const fs = require('fs'); -const debug = require('debug')('nodemon:match'); -const utils = require('../utils'); - -module.exports = match; -module.exports.rulesToMonitor = rulesToMonitor; - -function rulesToMonitor(watch, ignore, config) { - var monitor = []; - - if (!Array.isArray(ignore)) { - if (ignore) { - ignore = [ignore]; - } else { - ignore = []; - } - } - - if (!Array.isArray(watch)) { - if (watch) { - watch = [watch]; - } else { - watch = []; - } - } - - if (watch && watch.length) { - monitor = utils.clone(watch); - } - - if (ignore) { - [].push.apply(monitor, (ignore || []).map(function (rule) { - return '!' + rule; - })); - } - - var cwd = process.cwd(); - - // next check if the monitored paths are actual directories - // or just patterns - and expand the rule to include *.* - monitor = monitor.map(function (rule) { - var not = rule.slice(0, 1) === '!'; - - if (not) { - rule = rule.slice(1); - } - - if (rule === '.' || rule === '.*') { - rule = '*.*'; - } - - var dir = path.resolve(cwd, rule); - - try { - var stat = fs.statSync(dir); - if (stat.isDirectory()) { - rule = dir; - if (rule.slice(-1) !== '/') { - rule += '/'; - } - rule += '**/*'; - - // `!not` ... sorry. - if (!not) { - config.dirs.push(dir); - } - } else { - // ensures we end up in the check that tries to get a base directory - // and then adds it to the watch list - throw new Error(); - } - } catch (e) { - var base = tryBaseDir(dir); - if (!not && base) { - if (config.dirs.indexOf(base) === -1) { - config.dirs.push(base); - } - } - } - - if (rule.slice(-1) === '/') { - // just slap on a * anyway - rule += '*'; - } - - // if the url ends with * but not **/* and not *.* - // then convert to **/* - somehow it was missed :-\ - if (rule.slice(-4) !== '**/*' && - rule.slice(-1) === '*' && - rule.indexOf('*.') === -1) { - - if (rule.slice(-2) !== '**') { - rule += '*/*'; - } - } - - - return (not ? '!' : '') + rule; - }); - - return monitor; -} - -function tryBaseDir(dir) { - var stat; - if (/[?*\{\[]+/.test(dir)) { // if this is pattern, then try to find the base - try { - var base = path.dirname(dir.replace(/([?*\{\[]+.*$)/, 'foo')); - stat = fs.statSync(base); - if (stat.isDirectory()) { - return base; - } - } catch (error) { - // console.log(error); - } - } else { - try { - stat = fs.statSync(dir); - // if this path is actually a single file that exists, then just monitor - // that, *specifically*. - if (stat.isFile() || stat.isDirectory()) { - return dir; - } - } catch (e) { } - } - - return false; -} - -function match(files, monitor, ext) { - // sort the rules by highest specificity (based on number of slashes) - // ignore rules (!) get sorted highest as they take precedent - const cwd = process.cwd(); - var rules = monitor.sort(function (a, b) { - var r = b.split(path.sep).length - a.split(path.sep).length; - var aIsIgnore = a.slice(0, 1) === '!'; - var bIsIgnore = b.slice(0, 1) === '!'; - - if (aIsIgnore || bIsIgnore) { - if (aIsIgnore) { - return -1; - } - - return 1; - } - - if (r === 0) { - return b.length - a.length; - } - return r; - }).map(function (s) { - var prefix = s.slice(0, 1); - - if (prefix === '!') { - if (s.indexOf('!' + cwd) === 0) { - return s; - } - - // if it starts with a period, then let's get the relative path - if (s.indexOf('!.') === 0) { - return '!' + path.resolve(cwd, s.substring(1)); - } - - return '!**' + (prefix !== path.sep ? path.sep : '') + s.slice(1); - } - - // if it starts with a period, then let's get the relative path - if (s.indexOf('.') === 0) { - return path.resolve(cwd, s); - } - - if (s.indexOf(cwd) === 0) { - return s; - } - - return '**' + (prefix !== path.sep ? path.sep : '') + s; - }); - - debug('rules', rules); - - var good = []; - var whitelist = []; // files that we won't check against the extension - var ignored = 0; - var watched = 0; - var usedRules = []; - var minimatchOpts = { - dot: true, - }; - - // enable case-insensitivity on Windows - if (utils.isWindows) { - minimatchOpts.nocase = true; - } - - files.forEach(function (file) { - file = path.resolve(cwd, file); - - var matched = false; - for (var i = 0; i < rules.length; i++) { - if (rules[i].slice(0, 1) === '!') { - if (!minimatch(file, rules[i], minimatchOpts)) { - debug('ignored', file, 'rule:', rules[i]); - ignored++; - matched = true; - break; - } - } else { - debug('matched', file, 'rule:', rules[i]); - if (minimatch(file, rules[i], minimatchOpts)) { - watched++; - - // don't repeat the output if a rule is matched - if (usedRules.indexOf(rules[i]) === -1) { - usedRules.push(rules[i]); - utils.log.detail('matched rule: ' + rules[i]); - } - - // if the rule doesn't match the WATCH EVERYTHING - // but *does* match a rule that ends with *.*, then - // white list it - in that we don't run it through - // the extension check too. - if (rules[i] !== '**' + path.sep + '*.*' && - rules[i].slice(-3) === '*.*') { - whitelist.push(file); - } else if (path.basename(file) === path.basename(rules[i])) { - // if the file matches the actual rule, then it's put on whitelist - whitelist.push(file); - } else { - good.push(file); - } - matched = true; - break; - } else { - // utils.log.detail('no match: ' + rules[i], file); - } - } - } - if (!matched) { - ignored++; - } - }); - - debug('good', good) - - // finally check the good files against the extensions that we're monitoring - if (ext) { - if (ext.indexOf(',') === -1) { - ext = '**/*.' + ext; - } else { - ext = '**/*.{' + ext + '}'; - } - - good = good.filter(function (file) { - // only compare the filename to the extension test - return minimatch(path.basename(file), ext, minimatchOpts); - }); - } // else assume *.* - - var result = good.concat(whitelist); - - if (utils.isWindows) { - // fix for windows testing - I *think* this is okay to do - result = result.map(function (file) { - return file.slice(0, 1).toLowerCase() + file.slice(1); - }); - } - - return { - result: result, - ignored: ignored, - watched: watched, - total: files.length, - }; -} diff --git a/node_modules/nodemon/lib/monitor/run.js b/node_modules/nodemon/lib/monitor/run.js deleted file mode 100644 index cbd905c..0000000 --- a/node_modules/nodemon/lib/monitor/run.js +++ /dev/null @@ -1,546 +0,0 @@ -var debug = require('debug')('nodemon:run'); -const statSync = require('fs').statSync; -var utils = require('../utils'); -var bus = utils.bus; -var childProcess = require('child_process'); -var spawn = childProcess.spawn; -var exec = childProcess.exec; -var execSync = childProcess.execSync; -var fork = childProcess.fork; -var watch = require('./watch').watch; -var config = require('../config'); -var child = null; // the actual child process we spawn -var killedAfterChange = false; -var noop = () => {}; -var restart = null; -var psTree = require('pstree.remy'); -var path = require('path'); -var signals = require('./signals'); -const osRelease = parseInt(require('os').release().split('.')[0], 10); - -function run(options) { - var cmd = config.command.raw; - // moved up - // we need restart function below in the global scope for run.kill - /*jshint validthis:true*/ - restart = run.bind(this, options); - run.restart = restart; - - // binding options with instance of run - // so that we can use it in run.kill - run.options = options; - - var runCmd = !options.runOnChangeOnly || config.lastStarted !== 0; - if (runCmd) { - utils.log.status('starting `' + config.command.string + '`'); - } else { - // should just watch file if command is not to be run - // had another alternate approach - // to stop process being forked/spawned in the below code - // but this approach does early exit and makes code cleaner - debug('start watch on: %s', config.options.watch); - if (config.options.watch !== false) { - watch(); - return; - } - } - - config.lastStarted = Date.now(); - - var stdio = ['pipe', 'pipe', 'pipe']; - - if (config.options.stdout) { - stdio = ['pipe', process.stdout, process.stderr]; - } - - if (config.options.stdin === false) { - stdio = [process.stdin, process.stdout, process.stderr]; - } - - var sh = 'sh'; - var shFlag = '-c'; - - const binPath = process.cwd() + '/node_modules/.bin'; - - const spawnOptions = { - env: Object.assign({}, process.env, options.execOptions.env, { - PATH: binPath + path.delimiter + process.env.PATH, - }), - stdio: stdio, - }; - - var executable = cmd.executable; - - if (utils.isWindows) { - // if the exec includes a forward slash, reverse it for windows compat - // but *only* apply to the first command, and none of the arguments. - // ref #1251 and #1236 - if (executable.indexOf('/') !== -1) { - executable = executable - .split(' ') - .map((e, i) => { - if (i === 0) { - return path.normalize(e); - } - return e; - }) - .join(' '); - } - // taken from npm's cli: https://git.io/vNFD4 - sh = process.env.comspec || 'cmd'; - shFlag = '/d /s /c'; - spawnOptions.windowsVerbatimArguments = true; - spawnOptions.windowsHide = true; - } - - var args = runCmd ? utils.stringify(executable, cmd.args) : ':'; - var spawnArgs = [sh, [shFlag, args], spawnOptions]; - - const firstArg = cmd.args[0] || ''; - - var inBinPath = false; - try { - inBinPath = statSync(`${binPath}/${executable}`).isFile(); - } catch (e) {} - - // hasStdio allows us to correctly handle stdin piping - // see: https://git.io/vNtX3 - const hasStdio = utils.satisfies('>= 6.4.0 || < 5'); - - // forking helps with sub-process handling and tends to clean up better - // than spawning, but it should only be used under specific conditions - const shouldFork = - !config.options.spawn && - !inBinPath && - !(firstArg.indexOf('-') === 0) && // don't fork if there's a node exec arg - firstArg !== 'inspect' && // don't fork it's `inspect` debugger - executable === 'node' && // only fork if node - utils.version.major > 4; // only fork if node version > 4 - - if (shouldFork) { - // this assumes the first argument is the script and slices it out, since - // we're forking - var forkArgs = cmd.args.slice(1); - var env = utils.merge(options.execOptions.env, process.env); - stdio.push('ipc'); - const forkOptions = { - env: env, - stdio: stdio, - silent: !hasStdio, - }; - if (utils.isWindows) { - forkOptions.windowsHide = true; - } - child = fork(options.execOptions.script, forkArgs, forkOptions); - utils.log.detail('forking'); - debug('fork', sh, shFlag, args); - } else { - utils.log.detail('spawning'); - child = spawn.apply(null, spawnArgs); - debug('spawn', sh, shFlag, args); - } - - if (config.required) { - var emit = { - stdout: function (data) { - bus.emit('stdout', data); - }, - stderr: function (data) { - bus.emit('stderr', data); - }, - }; - - // now work out what to bind to... - if (config.options.stdout) { - child.on('stdout', emit.stdout).on('stderr', emit.stderr); - } else { - child.stdout.on('data', emit.stdout); - child.stderr.on('data', emit.stderr); - - bus.stdout = child.stdout; - bus.stderr = child.stderr; - } - - if (shouldFork) { - child.on('message', function (message, sendHandle) { - bus.emit('message', message, sendHandle); - }); - } - } - - bus.emit('start'); - - utils.log.detail('child pid: ' + child.pid); - - child.on('error', function (error) { - bus.emit('error', error); - if (error.code === 'ENOENT') { - utils.log.error('unable to run executable: "' + cmd.executable + '"'); - process.exit(1); - } else { - utils.log.error('failed to start child process: ' + error.code); - throw error; - } - }); - - child.on('exit', function (code, signal) { - if (child && child.stdin) { - process.stdin.unpipe(child.stdin); - } - - if (code === 127) { - utils.log.error( - 'failed to start process, "' + cmd.executable + '" exec not found' - ); - bus.emit('error', code); - process.exit(); - } - - // If the command failed with code 2, it may or may not be a syntax error - // See: http://git.io/fNOAR - // We will only assume a parse error, if the child failed quickly - if (code === 2 && Date.now() < config.lastStarted + 500) { - utils.log.error('process failed, unhandled exit code (2)'); - utils.log.error(''); - utils.log.error('Either the command has a syntax error,'); - utils.log.error('or it is exiting with reserved code 2.'); - utils.log.error(''); - utils.log.error('To keep nodemon running even after a code 2,'); - utils.log.error('add this to the end of your command: || exit 1'); - utils.log.error(''); - utils.log.error('Read more here: https://git.io/fNOAG'); - utils.log.error(''); - utils.log.error('nodemon will stop now so that you can fix the command.'); - utils.log.error(''); - bus.emit('error', code); - process.exit(); - } - - // In case we killed the app ourselves, set the signal thusly - if (killedAfterChange) { - killedAfterChange = false; - signal = config.signal; - } - // this is nasty, but it gives it windows support - if (utils.isWindows && signal === 'SIGTERM') { - signal = config.signal; - } - - if (signal === config.signal || code === 0) { - // this was a clean exit, so emit exit, rather than crash - debug('bus.emit(exit) via ' + config.signal); - bus.emit('exit', signal); - - // exit the monitor, but do it gracefully - if (signal === config.signal) { - return restart(); - } - - if (code === 0) { - // clean exit - wait until file change to restart - if (runCmd) { - utils.log.status('clean exit - waiting for changes before restart'); - } - child = null; - } - } else { - bus.emit('crash'); - if (options.exitcrash) { - utils.log.fail('app crashed'); - if (!config.required) { - process.exit(1); - } - } else { - utils.log.fail( - 'app crashed - waiting for file changes before' + ' starting...' - ); - child = null; - } - } - - if (config.options.restartable) { - // stdin needs to kick in again to be able to listen to the - // restart command - process.stdin.resume(); - } - }); - - // moved the run.kill outside to handle both the cases - // intial start - // no start - - // connect stdin to the child process (options.stdin is on by default) - if (options.stdin) { - process.stdin.resume(); - // FIXME decide whether or not we need to decide the encoding - // process.stdin.setEncoding('utf8'); - - // swallow the stdin error if it happens - // ref: https://github.com/remy/nodemon/issues/1195 - if (hasStdio) { - child.stdin.on('error', () => {}); - process.stdin.pipe(child.stdin); - } else { - if (child.stdout) { - child.stdout.pipe(process.stdout); - } else { - utils.log.error( - 'running an unsupported version of node ' + process.version - ); - utils.log.error( - 'nodemon may not work as expected - ' + - 'please consider upgrading to LTS' - ); - } - } - - bus.once('exit', function () { - if (child && process.stdin.unpipe) { - // node > 0.8 - process.stdin.unpipe(child.stdin); - } - }); - } - - debug('start watch on: %s', config.options.watch); - if (config.options.watch !== false) { - watch(); - } -} - -function waitForSubProcesses(pid, callback) { - debug('checking ps tree for pids of ' + pid); - psTree(pid, (err, pids) => { - if (!pids.length) { - return callback(); - } - - utils.log.status( - `still waiting for ${pids.length} sub-process${ - pids.length > 2 ? 'es' : '' - } to finish...` - ); - setTimeout(() => waitForSubProcesses(pid, callback), 1000); - }); -} - -function kill(child, signal, callback) { - if (!callback) { - callback = noop; - } - - if (utils.isWindows) { - const taskKill = () => { - try { - exec('taskkill /pid ' + child.pid + ' /T /F'); - } catch (e) { - utils.log.error('Could not shutdown sub process cleanly'); - } - }; - - // We are handling a 'SIGKILL' , 'SIGUSR2' and 'SIGUSR1' POSIX signal under Windows the - // same way it is handled on a UNIX system: We are performing - // a hard shutdown without waiting for the process to clean-up. - if (signal === 'SIGKILL' || osRelease < 10 || signal === 'SIGUSR2' || signal==="SIGUSR1" ) { - debug('terminating process group by force: %s', child.pid); - - // We are using the taskkill utility to terminate the whole - // process group ('/t') of the child ('/pid') by force ('/f'). - // We need to end all sub processes, because the 'child' - // process in this context is actually a cmd.exe wrapper. - taskKill(); - callback(); - return; - } - - try { - // We are using the Windows Management Instrumentation Command-line - // (wmic.exe) to resolve the sub-child process identifier, because the - // 'child' process in this context is actually a cmd.exe wrapper. - // We want to send the termination signal directly to the node process. - // The '2> nul' silences the no process found error message. - const resultBuffer = execSync( - `wmic process where (ParentProcessId=${child.pid}) get ProcessId 2> nul` - ); - const result = resultBuffer.toString().match(/^[0-9]+/m); - - // If there is no sub-child process we fall back to the child process. - const processId = Array.isArray(result) ? result[0] : child.pid; - - debug('sending kill signal SIGINT to process: %s', processId); - - // We are using the standalone 'windows-kill' executable to send the - // standard POSIX signal 'SIGINT' to the node process. This fixes #1720. - const windowsKill = path.normalize( - `${__dirname}/../../bin/windows-kill.exe` - ); - - // We have to detach the 'windows-kill' execution completely from this - // process group to avoid terminating the nodemon process itself. - // See: https://github.com/alirdn/windows-kill#how-it-works--limitations - // - // Therefore we are using 'start' to create a new cmd.exe context. - // The '/min' option hides the new terminal window and the '/wait' - // option lets the process wait for the command to finish. - - execSync( - `start "windows-kill" /min /wait "${windowsKill}" -SIGINT ${processId}` - ); - } catch (e) { - taskKill(); - } - callback(); - } else { - // we use psTree to kill the full subtree of nodemon, because when - // spawning processes like `coffee` under the `--debug` flag, it'll spawn - // it's own child, and that can't be killed by nodemon, so psTree gives us - // an array of PIDs that have spawned under nodemon, and we send each the - // configured signal (default: SIGUSR2) signal, which fixes #335 - // note that psTree also works if `ps` is missing by looking in /proc - let sig = signal.replace('SIG', ''); - - psTree(child.pid, function (err, pids) { - // if ps isn't native to the OS, then we need to send the numeric value - // for the signal during the kill, `signals` is a lookup table for that. - if (!psTree.hasPS) { - sig = signals[signal]; - } - - // the sub processes need to be killed from smallest to largest - debug('sending kill signal to ' + pids.join(', ')); - - child.kill(signal); - - pids.sort().forEach((pid) => exec(`kill -${sig} ${pid}`, noop)); - - waitForSubProcesses(child.pid, () => { - // finally kill the main user process - exec(`kill -${sig} ${child.pid}`, callback); - }); - }); - } -} - -run.kill = function (noRestart, callback) { - // I hate code like this :( - Remy (author of said code) - if (typeof noRestart === 'function') { - callback = noRestart; - noRestart = false; - } - - if (!callback) { - callback = noop; - } - - if (child !== null) { - // if the stdin piping is on, we need to unpipe, but also close stdin on - // the child, otherwise linux can throw EPIPE or ECONNRESET errors. - if (run.options.stdin) { - process.stdin.unpipe(child.stdin); - } - - // For the on('exit', ...) handler above the following looks like a - // crash, so we set the killedAfterChange flag if a restart is planned - if (!noRestart) { - killedAfterChange = true; - } - - /* Now kill the entire subtree of processes belonging to nodemon */ - var oldPid = child.pid; - if (child) { - kill(child, config.signal, function () { - // this seems to fix the 0.11.x issue with the "rs" restart command, - // though I'm unsure why. it seems like more data is streamed in to - // stdin after we close. - if (child && run.options.stdin && child.stdin && oldPid === child.pid) { - child.stdin.end(); - } - callback(); - }); - } - } else if (!noRestart) { - // if there's no child, then we need to manually start the process - // this is because as there was no child, the child.on('exit') event - // handler doesn't exist which would normally trigger the restart. - bus.once('start', callback); - run.restart(); - } else { - callback(); - } -}; - -run.restart = noop; - -bus.on('quit', function onQuit(code) { - if (code === undefined) { - code = 0; - } - - // remove event listener - var exitTimer = null; - var exit = function () { - clearTimeout(exitTimer); - exit = noop; // null out in case of race condition - child = null; - if (!config.required) { - // Execute all other quit listeners. - bus.listeners('quit').forEach(function (listener) { - if (listener !== onQuit) { - listener(); - } - }); - process.exit(code); - } else { - bus.emit('exit'); - } - }; - - // if we're not running already, don't bother with trying to kill - if (config.run === false) { - return exit(); - } - - // immediately try to stop any polling - config.run = false; - - if (child) { - // give up waiting for the kids after 10 seconds - exitTimer = setTimeout(exit, 10 * 1000); - child.removeAllListeners('exit'); - child.once('exit', exit); - - kill(child, 'SIGINT'); - } else { - exit(); - } -}); - -bus.on('restart', function () { - // run.kill will send a SIGINT to the child process, which will cause it - // to terminate, which in turn uses the 'exit' event handler to restart - run.kill(); -}); - -// remove the child file on exit -process.on('exit', function () { - utils.log.detail('exiting'); - if (child) { - child.kill(); - } -}); - -// because windows borks when listening for the SIG* events -if (!utils.isWindows) { - bus.once('boot', () => { - // usual suspect: ctrl+c exit - process.once('SIGINT', () => bus.emit('quit', 130)); - process.once('SIGTERM', () => { - bus.emit('quit', 143); - if (child) { - child.kill('SIGTERM'); - } - }); - }); -} - -module.exports = run; diff --git a/node_modules/nodemon/lib/monitor/signals.js b/node_modules/nodemon/lib/monitor/signals.js deleted file mode 100644 index daff6e0..0000000 --- a/node_modules/nodemon/lib/monitor/signals.js +++ /dev/null @@ -1,34 +0,0 @@ -module.exports = { - SIGHUP: 1, - SIGINT: 2, - SIGQUIT: 3, - SIGILL: 4, - SIGTRAP: 5, - SIGABRT: 6, - SIGBUS: 7, - SIGFPE: 8, - SIGKILL: 9, - SIGUSR1: 10, - SIGSEGV: 11, - SIGUSR2: 12, - SIGPIPE: 13, - SIGALRM: 14, - SIGTERM: 15, - SIGSTKFLT: 16, - SIGCHLD: 17, - SIGCONT: 18, - SIGSTOP: 19, - SIGTSTP: 20, - SIGTTIN: 21, - SIGTTOU: 22, - SIGURG: 23, - SIGXCPU: 24, - SIGXFSZ: 25, - SIGVTALRM: 26, - SIGPROF: 27, - SIGWINCH: 28, - SIGIO: 29, - SIGPWR: 30, - SIGSYS: 31, - SIGRTMIN: 35, -} diff --git a/node_modules/nodemon/lib/monitor/watch.js b/node_modules/nodemon/lib/monitor/watch.js deleted file mode 100644 index 1ef1408..0000000 --- a/node_modules/nodemon/lib/monitor/watch.js +++ /dev/null @@ -1,239 +0,0 @@ -module.exports.watch = watch; -module.exports.resetWatchers = resetWatchers; - -var debug = require('debug')('nodemon:watch'); -var debugRoot = require('debug')('nodemon'); -var chokidar = require('chokidar'); -var undefsafe = require('undefsafe'); -var config = require('../config'); -var path = require('path'); -var utils = require('../utils'); -var bus = utils.bus; -var match = require('./match'); -var watchers = []; -var debouncedBus; - -bus.on('reset', resetWatchers); - -function resetWatchers() { - debugRoot('resetting watchers'); - watchers.forEach(function (watcher) { - watcher.close(); - }); - watchers = []; -} - -function watch() { - if (watchers.length) { - debug('early exit on watch, still watching (%s)', watchers.length); - return; - } - - var dirs = [].slice.call(config.dirs); - - debugRoot('start watch on: %s', dirs.join(', ')); - const rootIgnored = config.options.ignore; - debugRoot('ignored', rootIgnored); - - var watchedFiles = []; - - const promise = new Promise(function (resolve) { - const dotFilePattern = /[/\\]\./; - var ignored = match.rulesToMonitor( - [], // not needed - Array.from(rootIgnored), - config - ).map(pattern => pattern.slice(1)); - - const addDotFile = dirs.filter(dir => dir.match(dotFilePattern)); - - // don't ignore dotfiles if explicitly watched. - if (addDotFile.length === 0) { - ignored.push(dotFilePattern); - } - - var watchOptions = { - ignorePermissionErrors: true, - ignored: ignored, - persistent: true, - usePolling: config.options.legacyWatch || false, - interval: config.options.pollingInterval, - // note to future developer: I've gone back and forth on adding `cwd` - // to the props and in some cases it fixes bugs but typically it causes - // bugs elsewhere (since nodemon is used is so many ways). the final - // decision is to *not* use it at all and work around it - // cwd: ... - }; - - if (utils.isWindows) { - watchOptions.disableGlobbing = true; - } - - if (process.env.TEST) { - watchOptions.useFsEvents = false; - } - - var watcher = chokidar.watch( - dirs, - Object.assign({}, watchOptions, config.options.watchOptions || {}) - ); - - watcher.ready = false; - - var total = 0; - - watcher.on('change', filterAndRestart); - watcher.on('add', function (file) { - if (watcher.ready) { - return filterAndRestart(file); - } - - watchedFiles.push(file); - bus.emit('watching', file); - debug('chokidar watching: %s', file); - }); - watcher.on('ready', function () { - watchedFiles = Array.from(new Set(watchedFiles)); // ensure no dupes - total = watchedFiles.length; - watcher.ready = true; - resolve(total); - debugRoot('watch is complete'); - }); - - watcher.on('error', function (error) { - if (error.code === 'EINVAL') { - utils.log.error( - 'Internal watch failed. Likely cause: too many ' + - 'files being watched (perhaps from the root of a drive?\n' + - 'See https://github.com/paulmillr/chokidar/issues/229 for details' - ); - } else { - utils.log.error('Internal watch failed: ' + error.message); - process.exit(1); - } - }); - - watchers.push(watcher); - }); - - return promise.catch(e => { - // this is a core error and it should break nodemon - so I have to break - // out of a promise using the setTimeout - setTimeout(() => { - throw e; - }); - }).then(function () { - utils.log.detail(`watching ${watchedFiles.length} file${ - watchedFiles.length === 1 ? '' : 's'}`); - return watchedFiles; - }); -} - -function filterAndRestart(files) { - if (!Array.isArray(files)) { - files = [files]; - } - - if (files.length) { - var cwd = process.cwd(); - if (this.options && this.options.cwd) { - cwd = this.options.cwd; - } - - utils.log.detail( - 'files triggering change check: ' + - files - .map(file => { - const res = path.relative(cwd, file); - return res; - }) - .join(', ') - ); - - // make sure the path is right and drop an empty - // filenames (sometimes on windows) - files = files.filter(Boolean).map(file => { - return path.relative(process.cwd(), path.relative(cwd, file)); - }); - - if (utils.isWindows) { - // ensure the drive letter is in uppercase (c:\foo -> C:\foo) - files = files.map(f => { - if (f.indexOf(':') === -1) { return f; } - return f[0].toUpperCase() + f.slice(1); - }); - } - - - debug('filterAndRestart on', files); - - var matched = match( - files, - config.options.monitor, - undefsafe(config, 'options.execOptions.ext') - ); - - debug('matched?', JSON.stringify(matched)); - - // if there's no matches, then test to see if the changed file is the - // running script, if so, let's allow a restart - if (config.options.execOptions && config.options.execOptions.script) { - const script = path.resolve(config.options.execOptions.script); - if (matched.result.length === 0 && script) { - const length = script.length; - files.find(file => { - if (file.substr(-length, length) === script) { - matched = { - result: [file], - total: 1, - }; - return true; - } - }); - } - } - - utils.log.detail( - 'changes after filters (before/after): ' + - [files.length, matched.result.length].join('/') - ); - - // reset the last check so we're only looking at recently modified files - config.lastStarted = Date.now(); - - if (matched.result.length) { - if (config.options.delay > 0) { - utils.log.detail('delaying restart for ' + config.options.delay + 'ms'); - if (debouncedBus === undefined) { - debouncedBus = debounce(restartBus, config.options.delay); - } - debouncedBus(matched); - } else { - return restartBus(matched); - } - } - } -} - -function restartBus(matched) { - utils.log.status('restarting due to changes...'); - matched.result.map(file => { - utils.log.detail(path.relative(process.cwd(), file)); - }); - - if (config.options.verbose) { - utils.log._log(''); - } - - bus.emit('restart', matched.result); -} - -function debounce(fn, delay) { - var timer = null; - return function () { - const context = this; - const args = arguments; - clearTimeout(timer); - timer = setTimeout(() =>fn.apply(context, args), delay); - }; -} diff --git a/node_modules/nodemon/lib/nodemon.js b/node_modules/nodemon/lib/nodemon.js deleted file mode 100644 index ce649cb..0000000 --- a/node_modules/nodemon/lib/nodemon.js +++ /dev/null @@ -1,311 +0,0 @@ -var debug = require('debug')('nodemon'); -var path = require('path'); -var monitor = require('./monitor'); -var cli = require('./cli'); -var version = require('./version'); -var util = require('util'); -var utils = require('./utils'); -var bus = utils.bus; -var help = require('./help'); -var config = require('./config'); -var spawn = require('./spawn'); -const defaults = require('./config/defaults') -var eventHandlers = {}; - -// this is fairly dirty, but theoretically sound since it's part of the -// stable module API -config.required = utils.isRequired; - -function nodemon(settings) { - bus.emit('boot'); - nodemon.reset(); - - // allow the cli string as the argument to nodemon, and allow for - // `node nodemon -V app.js` or just `-V app.js` - if (typeof settings === 'string') { - settings = settings.trim(); - if (settings.indexOf('node') !== 0) { - if (settings.indexOf('nodemon') !== 0) { - settings = 'nodemon ' + settings; - } - settings = 'node ' + settings; - } - settings = cli.parse(settings); - } - - // set the debug flag as early as possible to get all the detailed logging - if (settings.verbose) { - utils.debug = true; - } - - if (settings.help) { - if (process.stdout.isTTY) { - process.stdout._handle.setBlocking(true); // nodejs/node#6456 - } - console.log(help(settings.help)); - if (!config.required) { - process.exit(0); - } - } - - if (settings.version) { - version().then(function (v) { - console.log(v); - if (!config.required) { - process.exit(0); - } - }); - return; - } - - // nodemon tools like grunt-nodemon. This affects where - // the script is being run from, and will affect where - // nodemon looks for the nodemon.json files - if (settings.cwd) { - // this is protection to make sure we haven't dont the chdir already... - // say like in cli/parse.js (which is where we do this once already!) - if (process.cwd() !== path.resolve(config.system.cwd, settings.cwd)) { - process.chdir(settings.cwd); - } - } - - const cwd = process.cwd(); - - config.load(settings, function (config) { - if (!config.options.dump && !config.options.execOptions.script && - config.options.execOptions.exec === 'node') { - if (!config.required) { - console.log(help('usage')); - process.exit(); - } - return; - } - - // before we print anything, update the colour setting on logging - utils.colours = config.options.colours; - - // always echo out the current version - utils.log.info(version.pinned); - - const cwd = process.cwd(); - - if (config.options.cwd) { - utils.log.detail('process root: ' + cwd); - } - - config.loaded.map(file => file.replace(cwd, '.')).forEach(file => { - utils.log.detail('reading config ' + file); - }); - - if (config.options.stdin && config.options.restartable) { - // allow nodemon to restart when the use types 'rs\n' - process.stdin.resume(); - process.stdin.setEncoding('utf8'); - process.stdin.on('data', data => { - const str = data.toString().trim().toLowerCase(); - - // if the keys entered match the restartable value, then restart! - if (str === config.options.restartable) { - bus.emit('restart'); - } else if (data.charCodeAt(0) === 12) { // ctrl+l - console.clear(); - } - }); - } else if (config.options.stdin) { - // so let's make sure we don't eat the key presses - // but also, since we're wrapping, watch out for - // special keys, like ctrl+c x 2 or '.exit' or ctrl+d or ctrl+l - var ctrlC = false; - var buffer = ''; - - process.stdin.on('data', function (data) { - data = data.toString(); - buffer += data; - const chr = data.charCodeAt(0); - - // if restartable, echo back - if (chr === 3) { - if (ctrlC) { - process.exit(0); - } - - ctrlC = true; - return; - } else if (buffer === '.exit' || chr === 4) { // ctrl+d - process.exit(); - } else if (chr === 13 || chr === 10) { // enter / carriage return - buffer = ''; - } else if (chr === 12) { // ctrl+l - console.clear(); - buffer = ''; - } - ctrlC = false; - }); - if (process.stdin.setRawMode) { - process.stdin.setRawMode(true); - } - } - - if (config.options.restartable) { - utils.log.info('to restart at any time, enter `' + - config.options.restartable + '`'); - } - - if (!config.required) { - const restartSignal = config.options.signal === 'SIGUSR2' ? 'SIGHUP' : 'SIGUSR2'; - process.on(restartSignal, nodemon.restart); - utils.bus.on('error', () => { - utils.log.fail((new Error().stack)); - }); - utils.log.detail((config.options.restartable ? 'or ' : '') + 'send ' + - restartSignal + ' to ' + process.pid + ' to restart'); - } - - const ignoring = config.options.monitor.map(function (rule) { - if (rule.slice(0, 1) !== '!') { - return false; - } - - rule = rule.slice(1); - - // don't notify of default ignores - if (defaults.ignoreRoot.indexOf(rule) !== -1) { - return false; - return rule.slice(3).slice(0, -3); - } - - if (rule.startsWith(cwd)) { - return rule.replace(cwd, '.'); - } - - return rule; - }).filter(Boolean).join(' '); - if (ignoring) utils.log.detail('ignoring: ' + ignoring); - - utils.log.info('watching path(s): ' + config.options.monitor.map(function (rule) { - if (rule.slice(0, 1) !== '!') { - try { - rule = path.relative(process.cwd(), rule); - } catch (e) {} - - return rule; - } - - return false; - }).filter(Boolean).join(' ')); - - utils.log.info('watching extensions: ' + (config.options.execOptions.ext || '(all)')); - - if (config.options.dump) { - utils.log._log('log', '--------------'); - utils.log._log('log', 'node: ' + process.version); - utils.log._log('log', 'nodemon: ' + version.pinned); - utils.log._log('log', 'command: ' + process.argv.join(' ')); - utils.log._log('log', 'cwd: ' + cwd); - utils.log._log('log', ['OS:', process.platform, process.arch].join(' ')); - utils.log._log('log', '--------------'); - utils.log._log('log', util.inspect(config, { depth: null })); - utils.log._log('log', '--------------'); - if (!config.required) { - process.exit(); - } - - return; - } - - config.run = true; - - if (config.options.stdout === false) { - nodemon.on('start', function () { - nodemon.stdout = bus.stdout; - nodemon.stderr = bus.stderr; - - bus.emit('readable'); - }); - } - - if (config.options.events && Object.keys(config.options.events).length) { - Object.keys(config.options.events).forEach(function (key) { - utils.log.detail('bind ' + key + ' -> `' + - config.options.events[key] + '`'); - nodemon.on(key, function () { - if (config.options && config.options.events) { - spawn(config.options.events[key], config, - [].slice.apply(arguments)); - } - }); - }); - } - - monitor.run(config.options); - - }); - - return nodemon; -} - -nodemon.restart = function () { - utils.log.status('restarting child process'); - bus.emit('restart'); - return nodemon; -}; - -nodemon.addListener = nodemon.on = function (event, handler) { - if (!eventHandlers[event]) { eventHandlers[event] = []; } - eventHandlers[event].push(handler); - bus.on(event, handler); - return nodemon; -}; - -nodemon.once = function (event, handler) { - if (!eventHandlers[event]) { eventHandlers[event] = []; } - eventHandlers[event].push(handler); - bus.once(event, function () { - debug('bus.once(%s)', event); - eventHandlers[event].splice(eventHandlers[event].indexOf(handler), 1); - handler.apply(this, arguments); - }); - return nodemon; -}; - -nodemon.emit = function () { - bus.emit.apply(bus, [].slice.call(arguments)); - return nodemon; -}; - -nodemon.removeAllListeners = function (event) { - // unbind only the `nodemon.on` event handlers - Object.keys(eventHandlers).filter(function (e) { - return event ? e === event : true; - }).forEach(function (event) { - eventHandlers[event].forEach(function (handler) { - bus.removeListener(event, handler); - eventHandlers[event].splice(eventHandlers[event].indexOf(handler), 1); - }); - }); - - return nodemon; -}; - -nodemon.reset = function (done) { - bus.emit('reset', done); -}; - -bus.on('reset', function (done) { - debug('reset'); - nodemon.removeAllListeners(); - monitor.run.kill(true, function () { - utils.reset(); - config.reset(); - config.run = false; - if (done) { - done(); - } - }); -}); - -// expose the full config -nodemon.config = config; - -module.exports = nodemon; - diff --git a/node_modules/nodemon/lib/rules/add.js b/node_modules/nodemon/lib/rules/add.js deleted file mode 100644 index de85bb7..0000000 --- a/node_modules/nodemon/lib/rules/add.js +++ /dev/null @@ -1,89 +0,0 @@ -'use strict'; - -var utils = require('../utils'); - -// internal -var reEscComments = /\\#/g; -// note that '^^' is used in place of escaped comments -var reUnescapeComments = /\^\^/g; -var reComments = /#.*$/; -var reEscapeChars = /[.|\-[\]()\\]/g; -var reAsterisk = /\*/g; - -module.exports = add; - -/** - * Converts file patterns or regular expressions to nodemon - * compatible RegExp matching rules. Note: the `rules` argument - * object is modified to include the new rule and new RegExp - * - * ### Example: - * - * var rules = { watch: [], ignore: [] }; - * add(rules, 'watch', '*.js'); - * add(rules, 'ignore', '/public/'); - * add(rules, 'watch', ':(\d)*\.js'); // note: string based regexp - * add(rules, 'watch', /\d*\.js/); - * - * @param {Object} rules containing `watch` and `ignore`. Also updated during - * execution - * @param {String} which must be either "watch" or "ignore" - * @param {String|RegExp} the actual rule. - */ -function add(rules, which, rule) { - if (!{ ignore: 1, watch: 1}[which]) { - throw new Error('rules/index.js#add requires "ignore" or "watch" as the ' + - 'first argument'); - } - - if (Array.isArray(rule)) { - rule.forEach(function (rule) { - add(rules, which, rule); - }); - return; - } - - // support the rule being a RegExp, but reformat it to - // the custom : format that we're working with. - if (rule instanceof RegExp) { - // rule = ':' + rule.toString().replace(/^\/(.*?)\/$/g, '$1'); - utils.log.error('RegExp format no longer supported, but globs are.'); - return; - } - - // remove comments and trim lines - // this mess of replace methods is escaping "\#" to allow for emacs temp files - - // first up strip comments and remove blank head or tails - rule = (rule || '').replace(reEscComments, '^^') - .replace(reComments, '') - .replace(reUnescapeComments, '#').trim(); - - var regexp = false; - - if (typeof rule === 'string' && rule.substring(0, 1) === ':') { - rule = rule.substring(1); - utils.log.error('RegExp no longer supported: ' + rule); - regexp = true; - } else if (rule.length === 0) { - // blank line (or it was a comment) - return; - } - - if (regexp) { - // rules[which].push(rule); - } else { - // rule = rule.replace(reEscapeChars, '\\$&') - // .replace(reAsterisk, '.*'); - - rules[which].push(rule); - // compile a regexp of all the rules for this ignore or watch - var re = rules[which].map(function (rule) { - return rule.replace(reEscapeChars, '\\$&') - .replace(reAsterisk, '.*'); - }).join('|'); - - // used for the directory matching - rules[which].re = new RegExp(re); - } -} diff --git a/node_modules/nodemon/lib/rules/index.js b/node_modules/nodemon/lib/rules/index.js deleted file mode 100644 index 04aa92f..0000000 --- a/node_modules/nodemon/lib/rules/index.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; -var utils = require('../utils'); -var add = require('./add'); -var parse = require('./parse'); - -// exported -var rules = { ignore: [], watch: [] }; - -/** - * Loads a nodemon config file and populates the ignore - * and watch rules with it's contents, and calls callback - * with the new rules - * - * @param {String} filename - * @param {Function} callback - */ -function load(filename, callback) { - parse(filename, function (err, result) { - if (err) { - // we should have bombed already, but - utils.log.error(err); - callback(err); - } - - if (result.raw) { - result.raw.forEach(add.bind(null, rules, 'ignore')); - } else { - result.ignore.forEach(add.bind(null, rules, 'ignore')); - result.watch.forEach(add.bind(null, rules, 'watch')); - } - - callback(null, rules); - }); -} - -module.exports = { - reset: function () { // just used for testing - rules.ignore.length = rules.watch.length = 0; - delete rules.ignore.re; - delete rules.watch.re; - }, - load: load, - ignore: { - test: add.bind(null, rules, 'ignore'), - add: add.bind(null, rules, 'ignore'), - }, - watch: { - test: add.bind(null, rules, 'watch'), - add: add.bind(null, rules, 'watch'), - }, - add: add.bind(null, rules), - rules: rules, -}; \ No newline at end of file diff --git a/node_modules/nodemon/lib/rules/parse.js b/node_modules/nodemon/lib/rules/parse.js deleted file mode 100644 index 6e1cace..0000000 --- a/node_modules/nodemon/lib/rules/parse.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; -var fs = require('fs'); - -/** - * Parse the nodemon config file, supporting both old style - * plain text config file, and JSON version of the config - * - * @param {String} filename - * @param {Function} callback - */ -function parse(filename, callback) { - var rules = { - ignore: [], - watch: [], - }; - - fs.readFile(filename, 'utf8', function (err, content) { - - if (err) { - return callback(err); - } - - var json = null; - try { - json = JSON.parse(content); - } catch (e) {} - - if (json !== null) { - rules = { - ignore: json.ignore || [], - watch: json.watch || [], - }; - - return callback(null, rules); - } - - // otherwise return the raw file - return callback(null, { raw: content.split(/\n/) }); - }); -} - -module.exports = parse; - diff --git a/node_modules/nodemon/lib/spawn.js b/node_modules/nodemon/lib/spawn.js deleted file mode 100644 index 256734a..0000000 --- a/node_modules/nodemon/lib/spawn.js +++ /dev/null @@ -1,74 +0,0 @@ -const path = require('path'); -const utils = require('./utils'); -const merge = utils.merge; -const bus = utils.bus; -const spawn = require('child_process').spawn; - -module.exports = function spawnCommand(command, config, eventArgs) { - var stdio = ['pipe', 'pipe', 'pipe']; - - if (config.options.stdout) { - stdio = ['pipe', process.stdout, process.stderr]; - } - - const env = merge(process.env, { FILENAME: eventArgs[0] }); - - var sh = 'sh'; - var shFlag = '-c'; - var spawnOptions = { - env: merge(config.options.execOptions.env, env), - stdio: stdio, - }; - - if (!Array.isArray(command)) { - command = [command]; - } - - if (utils.isWindows) { - // if the exec includes a forward slash, reverse it for windows compat - // but *only* apply to the first command, and none of the arguments. - // ref #1251 and #1236 - command = command.map(executable => { - if (executable.indexOf('/') === -1) { - return executable; - } - - return executable.split(' ').map((e, i) => { - if (i === 0) { - return path.normalize(e); - } - return e; - }).join(' '); - }); - // taken from npm's cli: https://git.io/vNFD4 - sh = process.env.comspec || 'cmd'; - shFlag = '/d /s /c'; - spawnOptions.windowsVerbatimArguments = true; - spawnOptions.windowsHide = true; - } - - const args = command.join(' '); - const child = spawn(sh, [shFlag, args], spawnOptions); - - if (config.required) { - var emit = { - stdout: function (data) { - bus.emit('stdout', data); - }, - stderr: function (data) { - bus.emit('stderr', data); - }, - }; - - // now work out what to bind to... - if (config.options.stdout) { - child.on('stdout', emit.stdout).on('stderr', emit.stderr); - } else { - child.stdout.on('data', emit.stdout); - child.stderr.on('data', emit.stderr); - - bus.stdout = child.stdout; - bus.stderr = child.stderr; - } - } -}; diff --git a/node_modules/nodemon/lib/utils/bus.js b/node_modules/nodemon/lib/utils/bus.js deleted file mode 100644 index 4e120c5..0000000 --- a/node_modules/nodemon/lib/utils/bus.js +++ /dev/null @@ -1,44 +0,0 @@ -var events = require('events'); -var debug = require('debug')('nodemon'); -var util = require('util'); - -var Bus = function () { - events.EventEmitter.call(this); -}; - -util.inherits(Bus, events.EventEmitter); - -var bus = new Bus(); - -// /* -var collected = {}; -bus.on('newListener', function (event) { - debug('bus new listener: %s (%s)', event, bus.listeners(event).length); - if (!collected[event]) { - collected[event] = true; - bus.on(event, function () { - debug('bus emit: %s', event); - }); - } -}); - -// */ - -// proxy process messages (if forked) to the bus -process.on('message', function (event) { - debug('process.message(%s)', event); - bus.emit(event); -}); - -var emit = bus.emit; - -// if nodemon was spawned via a fork, allow upstream communication -// via process.send -if (process.send) { - bus.emit = function (event, data) { - process.send({ type: event, data: data }); - emit.apply(bus, arguments); - }; -} - -module.exports = bus; diff --git a/node_modules/nodemon/lib/utils/clone.js b/node_modules/nodemon/lib/utils/clone.js deleted file mode 100644 index 6ba6330..0000000 --- a/node_modules/nodemon/lib/utils/clone.js +++ /dev/null @@ -1,40 +0,0 @@ -module.exports = clone; - -// via http://stackoverflow.com/a/728694/22617 -function clone(obj) { - // Handle the 3 simple types, and null or undefined - if (null === obj || 'object' !== typeof obj) { - return obj; - } - - var copy; - - // Handle Date - if (obj instanceof Date) { - copy = new Date(); - copy.setTime(obj.getTime()); - return copy; - } - - // Handle Array - if (obj instanceof Array) { - copy = []; - for (var i = 0, len = obj.length; i < len; i++) { - copy[i] = clone(obj[i]); - } - return copy; - } - - // Handle Object - if (obj instanceof Object) { - copy = {}; - for (var attr in obj) { - if (obj.hasOwnProperty && obj.hasOwnProperty(attr)) { - copy[attr] = clone(obj[attr]); - } - } - return copy; - } - - throw new Error('Unable to copy obj! Its type isn\'t supported.'); -} \ No newline at end of file diff --git a/node_modules/nodemon/lib/utils/colour.js b/node_modules/nodemon/lib/utils/colour.js deleted file mode 100644 index 8c1b590..0000000 --- a/node_modules/nodemon/lib/utils/colour.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Encodes a string in a colour: red, yellow or green - * @param {String} c colour to highlight in - * @param {String} str the string to encode - * @return {String} coloured string for terminal printing - */ -function colour(c, str) { - return (colour[c] || colour.black) + str + colour.black; -} - -function strip(str) { - re.lastIndex = 0; // reset position - return str.replace(re, ''); -} - -colour.red = '\x1B[31m'; -colour.yellow = '\x1B[33m'; -colour.green = '\x1B[32m'; -colour.black = '\x1B[39m'; - -var reStr = Object.keys(colour).map(key => colour[key]).join('|'); -var re = new RegExp(('(' + reStr + ')').replace(/\[/g, '\\['), 'g'); - -colour.strip = strip; - -module.exports = colour; diff --git a/node_modules/nodemon/lib/utils/index.js b/node_modules/nodemon/lib/utils/index.js deleted file mode 100644 index c480338..0000000 --- a/node_modules/nodemon/lib/utils/index.js +++ /dev/null @@ -1,102 +0,0 @@ -var noop = function () { }; -var path = require('path'); -const semver = require('semver'); -var version = process.versions.node.split('.') || [null, null, null]; - -var utils = (module.exports = { - semver: semver, - satisfies: test => semver.satisfies(process.versions.node, test), - version: { - major: parseInt(version[0] || 0, 10), - minor: parseInt(version[1] || 0, 10), - patch: parseInt(version[2] || 0, 10), - }, - clone: require('./clone'), - merge: require('./merge'), - bus: require('./bus'), - isWindows: process.platform === 'win32', - isMac: process.platform === 'darwin', - isLinux: process.platform === 'linux', - isRequired: (function () { - var p = module.parent; - while (p) { - // in electron.js engine it happens - if (!p.filename) { - return true; - } - if (p.filename.indexOf('bin' + path.sep + 'nodemon.js') !== -1) { - return false; - } - p = p.parent; - } - - return true; - })(), - home: process.env.HOME || process.env.HOMEPATH, - quiet: function () { - // nukes the logging - if (!this.debug) { - for (var method in utils.log) { - if (typeof utils.log[method] === 'function') { - utils.log[method] = noop; - } - } - } - }, - reset: function () { - if (!this.debug) { - for (var method in utils.log) { - if (typeof utils.log[method] === 'function') { - delete utils.log[method]; - } - } - } - this.debug = false; - }, - regexpToText: function (t) { - return t - .replace(/\.\*\\./g, '*.') - .replace(/\\{2}/g, '^^') - .replace(/\\/g, '') - .replace(/\^\^/g, '\\'); - }, - stringify: function (exec, args) { - // serializes an executable string and array of arguments into a string - args = args || []; - - return [exec] - .concat( - args.map(function (arg) { - // if an argument contains a space, we want to show it with quotes - // around it to indicate that it is a single argument - if (arg.length > 0 && arg.indexOf(' ') === -1) { - return arg; - } - // this should correctly escape nested quotes - return JSON.stringify(arg); - }) - ) - .join(' ') - .trim(); - }, -}); - -utils.log = require('./log')(utils.isRequired); - -Object.defineProperty(utils, 'debug', { - set: function (value) { - this.log.debug = value; - }, - get: function () { - return this.log.debug; - }, -}); - -Object.defineProperty(utils, 'colours', { - set: function (value) { - this.log.useColours = value; - }, - get: function () { - return this.log.useColours; - }, -}); diff --git a/node_modules/nodemon/lib/utils/log.js b/node_modules/nodemon/lib/utils/log.js deleted file mode 100644 index 6580087..0000000 --- a/node_modules/nodemon/lib/utils/log.js +++ /dev/null @@ -1,82 +0,0 @@ -var colour = require('./colour'); -var bus = require('./bus'); -var required = false; -var useColours = true; - -var coding = { - log: 'black', - info: 'yellow', - status: 'green', - detail: 'yellow', - fail: 'red', - error: 'red', -}; - -function log(type, text) { - var msg = '[nodemon] ' + (text || ''); - - if (useColours) { - msg = colour(coding[type], msg); - } - - // always push the message through our bus, using nextTick - // to help testing and get _out of_ promises. - process.nextTick(() => { - bus.emit('log', { type: type, message: text, colour: msg }); - }); - - // but if we're running on the command line, also echo out - // question: should we actually just consume our own events? - if (!required) { - if (type === 'error') { - console.error(msg); - } else { - console.log(msg || ''); - } - } -} - -var Logger = function (r) { - if (!(this instanceof Logger)) { - return new Logger(r); - } - this.required(r); - return this; -}; - -Object.keys(coding).forEach(function (type) { - Logger.prototype[type] = log.bind(null, type); -}); - -// detail is for messages that are turned on during debug -Logger.prototype.detail = function (msg) { - if (this.debug) { - log('detail', msg); - } -}; - -Logger.prototype.required = function (val) { - required = val; -}; - -Logger.prototype.debug = false; -Logger.prototype._log = function (type, msg) { - if (required) { - bus.emit('log', { type: type, message: msg || '', colour: msg || '' }); - } else if (type === 'error') { - console.error(msg); - } else { - console.log(msg || ''); - } -}; - -Object.defineProperty(Logger.prototype, 'useColours', { - set: function (val) { - useColours = val; - }, - get: function () { - return useColours; - }, -}); - -module.exports = Logger; diff --git a/node_modules/nodemon/lib/utils/merge.js b/node_modules/nodemon/lib/utils/merge.js deleted file mode 100644 index 1f3440b..0000000 --- a/node_modules/nodemon/lib/utils/merge.js +++ /dev/null @@ -1,47 +0,0 @@ -var clone = require('./clone'); - -module.exports = merge; - -function typesMatch(a, b) { - return (typeof a === typeof b) && (Array.isArray(a) === Array.isArray(b)); -} - -/** - * A deep merge of the source based on the target. - * @param {Object} source [description] - * @param {Object} target [description] - * @return {Object} [description] - */ -function merge(source, target, result) { - if (result === undefined) { - result = clone(source); - } - - // merge missing values from the target to the source - Object.getOwnPropertyNames(target).forEach(function (key) { - if (source[key] === undefined) { - result[key] = target[key]; - } - }); - - Object.getOwnPropertyNames(source).forEach(function (key) { - var value = source[key]; - - if (target[key] && typesMatch(value, target[key])) { - // merge empty values - if (value === '') { - result[key] = target[key]; - } - - if (Array.isArray(value)) { - if (value.length === 0 && target[key].length) { - result[key] = target[key].slice(0); - } - } else if (typeof value === 'object') { - result[key] = merge(value, target[key]); - } - } - }); - - return result; -} \ No newline at end of file diff --git a/node_modules/nodemon/lib/version.js b/node_modules/nodemon/lib/version.js deleted file mode 100644 index d0f5104..0000000 --- a/node_modules/nodemon/lib/version.js +++ /dev/null @@ -1,100 +0,0 @@ -module.exports = version; -module.exports.pin = pin; - -var fs = require('fs'); -var path = require('path'); -var exec = require('child_process').exec; -var root = null; - -function pin() { - return version().then(function (v) { - version.pinned = v; - }); -} - -function version(callback) { - // first find the package.json as this will be our root - var promise = findPackage(path.dirname(module.parent.filename)) - .then(function (dir) { - // now try to load the package - var v = require(path.resolve(dir, 'package.json')).version; - - if (v && v !== '0.0.0-development') { - return v; - } - - root = dir; - - // else we're in development, give the commit out - // get the last commit and whether the working dir is dirty - var promises = [ - branch().catch(function () { return 'master'; }), - commit().catch(function () { return ''; }), - dirty().catch(function () { return 0; }), - ]; - - // use the cached result as the export - return Promise.all(promises).then(function (res) { - var branch = res[0]; - var commit = res[1]; - var dirtyCount = parseInt(res[2], 10); - var curr = branch + ': ' + commit; - if (dirtyCount !== 0) { - curr += ' (' + dirtyCount + ' dirty files)'; - } - - return curr; - }); - }).catch(function (error) { - console.log(error.stack); - throw error; - }); - - if (callback) { - promise.then(function (res) { - callback(null, res); - }, callback); - } - - return promise; -} - -function findPackage(dir) { - if (dir === '/') { - return Promise.reject(new Error('package not found')); - } - return new Promise(function (resolve) { - fs.stat(path.resolve(dir, 'package.json'), function (error, exists) { - if (error || !exists) { - return resolve(findPackage(path.resolve(dir, '..'))); - } - - resolve(dir); - }); - }); -} - -function command(cmd) { - return new Promise(function (resolve, reject) { - exec(cmd, { cwd: root }, function (err, stdout, stderr) { - var error = stderr.trim(); - if (error) { - return reject(new Error(error)); - } - resolve(stdout.split('\n').join('')); - }); - }); -} - -function commit() { - return command('git rev-parse HEAD'); -} - -function branch() { - return command('git rev-parse --abbrev-ref HEAD'); -} - -function dirty() { - return command('expr $(git status --porcelain 2>/dev/null| ' + - 'egrep "^(M| M)" | wc -l)'); -} diff --git a/node_modules/nodemon/node_modules/.bin/semver b/node_modules/nodemon/node_modules/.bin/semver deleted file mode 100644 index 384db49..0000000 --- a/node_modules/nodemon/node_modules/.bin/semver +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") - -case `uname` in - *CYGWIN*|*MINGW*|*MSYS*) - if command -v cygpath > /dev/null 2>&1; then - basedir=`cygpath -w "$basedir"` - fi - ;; -esac - -if [ -x "$basedir/node" ]; then - exec "$basedir/node" "$basedir/../semver/bin/semver" "$@" -else - exec node "$basedir/../semver/bin/semver" "$@" -fi diff --git a/node_modules/nodemon/node_modules/.bin/semver.cmd b/node_modules/nodemon/node_modules/.bin/semver.cmd deleted file mode 100644 index 22d9286..0000000 --- a/node_modules/nodemon/node_modules/.bin/semver.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@ECHO off -GOTO start -:find_dp0 -SET dp0=%~dp0 -EXIT /b -:start -SETLOCAL -CALL :find_dp0 - -IF EXIST "%dp0%\node.exe" ( - SET "_prog=%dp0%\node.exe" -) ELSE ( - SET "_prog=node" - SET PATHEXT=%PATHEXT:;.JS;=;% -) - -endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver" %* diff --git a/node_modules/nodemon/node_modules/.bin/semver.ps1 b/node_modules/nodemon/node_modules/.bin/semver.ps1 deleted file mode 100644 index 98c1b09..0000000 --- a/node_modules/nodemon/node_modules/.bin/semver.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -} -$ret=0 -if (Test-Path "$basedir/node$exe") { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "$basedir/node$exe" "$basedir/../semver/bin/semver" $args - } else { - & "$basedir/node$exe" "$basedir/../semver/bin/semver" $args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & "node$exe" "$basedir/../semver/bin/semver" $args - } else { - & "node$exe" "$basedir/../semver/bin/semver" $args - } - $ret=$LASTEXITCODE -} -exit $ret diff --git a/node_modules/nodemon/node_modules/has-flag/index.js b/node_modules/nodemon/node_modules/has-flag/index.js deleted file mode 100644 index 5139728..0000000 --- a/node_modules/nodemon/node_modules/has-flag/index.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; -module.exports = (flag, argv) => { - argv = argv || process.argv; - const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); - const pos = argv.indexOf(prefix + flag); - const terminatorPos = argv.indexOf('--'); - return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); -}; diff --git a/node_modules/nodemon/node_modules/has-flag/license b/node_modules/nodemon/node_modules/has-flag/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/nodemon/node_modules/has-flag/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/nodemon/node_modules/has-flag/package.json b/node_modules/nodemon/node_modules/has-flag/package.json deleted file mode 100644 index e1eb17a..0000000 --- a/node_modules/nodemon/node_modules/has-flag/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "has-flag", - "version": "3.0.0", - "description": "Check if argv has a specific flag", - "license": "MIT", - "repository": "sindresorhus/has-flag", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js" - ], - "keywords": [ - "has", - "check", - "detect", - "contains", - "find", - "flag", - "cli", - "command-line", - "argv", - "process", - "arg", - "args", - "argument", - "arguments", - "getopt", - "minimist", - "optimist" - ], - "devDependencies": { - "ava": "*", - "xo": "*" - } -} diff --git a/node_modules/nodemon/node_modules/has-flag/readme.md b/node_modules/nodemon/node_modules/has-flag/readme.md deleted file mode 100644 index 677893c..0000000 --- a/node_modules/nodemon/node_modules/has-flag/readme.md +++ /dev/null @@ -1,70 +0,0 @@ -# has-flag [![Build Status](https://travis-ci.org/sindresorhus/has-flag.svg?branch=master)](https://travis-ci.org/sindresorhus/has-flag) - -> Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag - -Correctly stops looking after an `--` argument terminator. - - -## Install - -``` -$ npm install has-flag -``` - - -## Usage - -```js -// foo.js -const hasFlag = require('has-flag'); - -hasFlag('unicorn'); -//=> true - -hasFlag('--unicorn'); -//=> true - -hasFlag('f'); -//=> true - -hasFlag('-f'); -//=> true - -hasFlag('foo=bar'); -//=> true - -hasFlag('foo'); -//=> false - -hasFlag('rainbow'); -//=> false -``` - -``` -$ node foo.js -f --unicorn --foo=bar -- --rainbow -``` - - -## API - -### hasFlag(flag, [argv]) - -Returns a boolean for whether the flag exists. - -#### flag - -Type: `string` - -CLI flag to look for. The `--` prefix is optional. - -#### argv - -Type: `string[]`
-Default: `process.argv` - -CLI arguments. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/nodemon/node_modules/semver/LICENSE b/node_modules/nodemon/node_modules/semver/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/nodemon/node_modules/semver/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/nodemon/node_modules/semver/README.md b/node_modules/nodemon/node_modules/semver/README.md deleted file mode 100644 index f8dfa5a..0000000 --- a/node_modules/nodemon/node_modules/semver/README.md +++ /dev/null @@ -1,412 +0,0 @@ -semver(1) -- The semantic versioner for npm -=========================================== - -## Install - -```bash -npm install --save semver -```` - -## Usage - -As a node module: - -```js -const semver = require('semver') - -semver.valid('1.2.3') // '1.2.3' -semver.valid('a.b.c') // null -semver.clean(' =v1.2.3 ') // '1.2.3' -semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true -semver.gt('1.2.3', '9.8.7') // false -semver.lt('1.2.3', '9.8.7') // true -semver.minVersion('>=1.0.0') // '1.0.0' -semver.valid(semver.coerce('v2')) // '2.0.0' -semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' -``` - -As a command-line utility: - -``` -$ semver -h - -A JavaScript implementation of the https://semver.org/ specification -Copyright Isaac Z. Schlueter - -Usage: semver [options] [ [...]] -Prints valid versions sorted by SemVer precedence - -Options: --r --range - Print versions that match the specified range. - --i --increment [] - Increment a version by the specified level. Level can - be one of: major, minor, patch, premajor, preminor, - prepatch, or prerelease. Default level is 'patch'. - Only one version may be specified. - ---preid - Identifier to be used to prefix premajor, preminor, - prepatch or prerelease version increments. - --l --loose - Interpret versions and ranges loosely - --p --include-prerelease - Always include prerelease versions in range matching - --c --coerce - Coerce a string into SemVer if possible - (does not imply --loose) - -Program exits successfully if any valid version satisfies -all supplied ranges, and prints all satisfying versions. - -If no satisfying versions are found, then exits failure. - -Versions are printed in ascending order, so supplying -multiple versions to the utility will just sort them. -``` - -## Versions - -A "version" is described by the `v2.0.0` specification found at -. - -A leading `"="` or `"v"` character is stripped off and ignored. - -## Ranges - -A `version range` is a set of `comparators` which specify versions -that satisfy the range. - -A `comparator` is composed of an `operator` and a `version`. The set -of primitive `operators` is: - -* `<` Less than -* `<=` Less than or equal to -* `>` Greater than -* `>=` Greater than or equal to -* `=` Equal. If no operator is specified, then equality is assumed, - so this operator is optional, but MAY be included. - -For example, the comparator `>=1.2.7` would match the versions -`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` -or `1.1.0`. - -Comparators can be joined by whitespace to form a `comparator set`, -which is satisfied by the **intersection** of all of the comparators -it includes. - -A range is composed of one or more comparator sets, joined by `||`. A -version matches a range if and only if every comparator in at least -one of the `||`-separated comparator sets is satisfied by the version. - -For example, the range `>=1.2.7 <1.3.0` would match the versions -`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, -or `1.1.0`. - -The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, -`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. - -### Prerelease Tags - -If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then -it will only be allowed to satisfy comparator sets if at least one -comparator with the same `[major, minor, patch]` tuple also has a -prerelease tag. - -For example, the range `>1.2.3-alpha.3` would be allowed to match the -version `1.2.3-alpha.7`, but it would *not* be satisfied by -`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater -than" `1.2.3-alpha.3` according to the SemVer sort rules. The version -range only accepts prerelease tags on the `1.2.3` version. The -version `3.4.5` *would* satisfy the range, because it does not have a -prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. - -The purpose for this behavior is twofold. First, prerelease versions -frequently are updated very quickly, and contain many breaking changes -that are (by the author's design) not yet fit for public consumption. -Therefore, by default, they are excluded from range matching -semantics. - -Second, a user who has opted into using a prerelease version has -clearly indicated the intent to use *that specific* set of -alpha/beta/rc versions. By including a prerelease tag in the range, -the user is indicating that they are aware of the risk. However, it -is still not appropriate to assume that they have opted into taking a -similar risk on the *next* set of prerelease versions. - -Note that this behavior can be suppressed (treating all prerelease -versions as if they were normal versions, for the purpose of range -matching) by setting the `includePrerelease` flag on the options -object to any -[functions](https://github.com/npm/node-semver#functions) that do -range matching. - -#### Prerelease Identifiers - -The method `.inc` takes an additional `identifier` string argument that -will append the value of the string as a prerelease identifier: - -```javascript -semver.inc('1.2.3', 'prerelease', 'beta') -// '1.2.4-beta.0' -``` - -command-line example: - -```bash -$ semver 1.2.3 -i prerelease --preid beta -1.2.4-beta.0 -``` - -Which then can be used to increment further: - -```bash -$ semver 1.2.4-beta.0 -i prerelease -1.2.4-beta.1 -``` - -### Advanced Range Syntax - -Advanced range syntax desugars to primitive comparators in -deterministic ways. - -Advanced ranges may be combined in the same way as primitive -comparators using white space or `||`. - -#### Hyphen Ranges `X.Y.Z - A.B.C` - -Specifies an inclusive set. - -* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` - -If a partial version is provided as the first version in the inclusive -range, then the missing pieces are replaced with zeroes. - -* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` - -If a partial version is provided as the second version in the -inclusive range, then all versions that start with the supplied parts -of the tuple are accepted, but nothing that would be greater than the -provided tuple parts. - -* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` -* `1.2.3 - 2` := `>=1.2.3 <3.0.0` - -#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` - -Any of `X`, `x`, or `*` may be used to "stand in" for one of the -numeric values in the `[major, minor, patch]` tuple. - -* `*` := `>=0.0.0` (Any version satisfies) -* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) -* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) - -A partial version range is treated as an X-Range, so the special -character is in fact optional. - -* `""` (empty string) := `*` := `>=0.0.0` -* `1` := `1.x.x` := `>=1.0.0 <2.0.0` -* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` - -#### Tilde Ranges `~1.2.3` `~1.2` `~1` - -Allows patch-level changes if a minor version is specified on the -comparator. Allows minor-level changes if not. - -* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` -* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) -* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) -* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` -* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) -* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) -* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. - -#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` - -Allows changes that do not modify the left-most non-zero digit in the -`[major, minor, patch]` tuple. In other words, this allows patch and -minor updates for versions `1.0.0` and above, patch updates for -versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. - -Many authors treat a `0.x` version as if the `x` were the major -"breaking-change" indicator. - -Caret ranges are ideal when an author may make breaking changes -between `0.2.4` and `0.3.0` releases, which is a common practice. -However, it presumes that there will *not* be breaking changes between -`0.2.4` and `0.2.5`. It allows for changes that are presumed to be -additive (but non-breaking), according to commonly observed practices. - -* `^1.2.3` := `>=1.2.3 <2.0.0` -* `^0.2.3` := `>=0.2.3 <0.3.0` -* `^0.0.3` := `>=0.0.3 <0.0.4` -* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. -* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the - `0.0.3` version *only* will be allowed, if they are greater than or - equal to `beta`. So, `0.0.3-pr.2` would be allowed. - -When parsing caret ranges, a missing `patch` value desugars to the -number `0`, but will allow flexibility within that value, even if the -major and minor versions are both `0`. - -* `^1.2.x` := `>=1.2.0 <2.0.0` -* `^0.0.x` := `>=0.0.0 <0.1.0` -* `^0.0` := `>=0.0.0 <0.1.0` - -A missing `minor` and `patch` values will desugar to zero, but also -allow flexibility within those values, even if the major version is -zero. - -* `^1.x` := `>=1.0.0 <2.0.0` -* `^0.x` := `>=0.0.0 <1.0.0` - -### Range Grammar - -Putting all this together, here is a Backus-Naur grammar for ranges, -for the benefit of parser authors: - -```bnf -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ -``` - -## Functions - -All methods and classes take a final `options` object argument. All -options in this object are `false` by default. The options supported -are: - -- `loose` Be more forgiving about not-quite-valid semver strings. - (Any resulting output will always be 100% strict compliant, of - course.) For backwards compatibility reasons, if the `options` - argument is a boolean value instead of an object, it is interpreted - to be the `loose` param. -- `includePrerelease` Set to suppress the [default - behavior](https://github.com/npm/node-semver#prerelease-tags) of - excluding prerelease tagged versions from ranges unless they are - explicitly opted into. - -Strict-mode Comparators and Ranges will be strict about the SemVer -strings that they parse. - -* `valid(v)`: Return the parsed version, or null if it's not valid. -* `inc(v, release)`: Return the version incremented by the release - type (`major`, `premajor`, `minor`, `preminor`, `patch`, - `prepatch`, or `prerelease`), or null if it's not valid - * `premajor` in one call will bump the version up to the next major - version and down to a prerelease of that major version. - `preminor`, and `prepatch` work the same way. - * If called from a non-prerelease version, the `prerelease` will work the - same as `prepatch`. It increments the patch version, then makes a - prerelease. If the input version is already a prerelease it simply - increments it. -* `prerelease(v)`: Returns an array of prerelease components, or null - if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` -* `major(v)`: Return the major version number. -* `minor(v)`: Return the minor version number. -* `patch(v)`: Return the patch version number. -* `intersects(r1, r2, loose)`: Return true if the two supplied ranges - or comparators intersect. -* `parse(v)`: Attempt to parse a string as a semantic version, returning either - a `SemVer` object or `null`. - -### Comparison - -* `gt(v1, v2)`: `v1 > v2` -* `gte(v1, v2)`: `v1 >= v2` -* `lt(v1, v2)`: `v1 < v2` -* `lte(v1, v2)`: `v1 <= v2` -* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, - even if they're not the exact same string. You already know how to - compare strings. -* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. -* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call - the corresponding function above. `"==="` and `"!=="` do simple - string comparison, but are included for completeness. Throws if an - invalid comparison string is provided. -* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if - `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. -* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions - in descending order when passed to `Array.sort()`. -* `diff(v1, v2)`: Returns difference between two versions by the release type - (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), - or null if the versions are the same. - -### Comparators - -* `intersects(comparator)`: Return true if the comparators intersect - -### Ranges - -* `validRange(range)`: Return the valid range or null if it's not valid -* `satisfies(version, range)`: Return true if the version satisfies the - range. -* `maxSatisfying(versions, range)`: Return the highest version in the list - that satisfies the range, or `null` if none of them do. -* `minSatisfying(versions, range)`: Return the lowest version in the list - that satisfies the range, or `null` if none of them do. -* `minVersion(range)`: Return the lowest version that can possibly match - the given range. -* `gtr(version, range)`: Return `true` if version is greater than all the - versions possible in the range. -* `ltr(version, range)`: Return `true` if version is less than all the - versions possible in the range. -* `outside(version, range, hilo)`: Return true if the version is outside - the bounds of the range in either the high or low direction. The - `hilo` argument must be either the string `'>'` or `'<'`. (This is - the function called by `gtr` and `ltr`.) -* `intersects(range)`: Return true if any of the ranges comparators intersect - -Note that, since ranges may be non-contiguous, a version might not be -greater than a range, less than a range, *or* satisfy a range! For -example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` -until `2.0.0`, so the version `1.2.10` would not be greater than the -range (because `2.0.1` satisfies, which is higher), nor less than the -range (since `1.2.8` satisfies, which is lower), and it also does not -satisfy the range. - -If you want to know if a version satisfies or does not satisfy a -range, use the `satisfies(version, range)` function. - -### Coercion - -* `coerce(version)`: Coerces a string to semver if possible - -This aims to provide a very forgiving translation of a non-semver string to -semver. It looks for the first digit in a string, and consumes all -remaining characters which satisfy at least a partial semver (e.g., `1`, -`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer -versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All -surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes -`3.4.0`). Only text which lacks digits will fail coercion (`version one` -is not valid). The maximum length for any semver component considered for -coercion is 16 characters; longer components will be ignored -(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any -semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value -components are invalid (`9999999999999999.4.7.4` is likely invalid). diff --git a/node_modules/nodemon/node_modules/semver/bin/semver b/node_modules/nodemon/node_modules/semver/bin/semver deleted file mode 100644 index 801e77f..0000000 --- a/node_modules/nodemon/node_modules/semver/bin/semver +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env node -// Standalone semver comparison program. -// Exits successfully and prints matching version(s) if -// any supplied version is valid and passes all tests. - -var argv = process.argv.slice(2) - -var versions = [] - -var range = [] - -var inc = null - -var version = require('../package.json').version - -var loose = false - -var includePrerelease = false - -var coerce = false - -var identifier - -var semver = require('../semver') - -var reverse = false - -var options = {} - -main() - -function main () { - if (!argv.length) return help() - while (argv.length) { - var a = argv.shift() - var indexOfEqualSign = a.indexOf('=') - if (indexOfEqualSign !== -1) { - a = a.slice(0, indexOfEqualSign) - argv.unshift(a.slice(indexOfEqualSign + 1)) - } - switch (a) { - case '-rv': case '-rev': case '--rev': case '--reverse': - reverse = true - break - case '-l': case '--loose': - loose = true - break - case '-p': case '--include-prerelease': - includePrerelease = true - break - case '-v': case '--version': - versions.push(argv.shift()) - break - case '-i': case '--inc': case '--increment': - switch (argv[0]) { - case 'major': case 'minor': case 'patch': case 'prerelease': - case 'premajor': case 'preminor': case 'prepatch': - inc = argv.shift() - break - default: - inc = 'patch' - break - } - break - case '--preid': - identifier = argv.shift() - break - case '-r': case '--range': - range.push(argv.shift()) - break - case '-c': case '--coerce': - coerce = true - break - case '-h': case '--help': case '-?': - return help() - default: - versions.push(a) - break - } - } - - var options = { loose: loose, includePrerelease: includePrerelease } - - versions = versions.map(function (v) { - return coerce ? (semver.coerce(v) || { version: v }).version : v - }).filter(function (v) { - return semver.valid(v) - }) - if (!versions.length) return fail() - if (inc && (versions.length !== 1 || range.length)) { return failInc() } - - for (var i = 0, l = range.length; i < l; i++) { - versions = versions.filter(function (v) { - return semver.satisfies(v, range[i], options) - }) - if (!versions.length) return fail() - } - return success(versions) -} - -function failInc () { - console.error('--inc can only be used on a single version with no range') - fail() -} - -function fail () { process.exit(1) } - -function success () { - var compare = reverse ? 'rcompare' : 'compare' - versions.sort(function (a, b) { - return semver[compare](a, b, options) - }).map(function (v) { - return semver.clean(v, options) - }).map(function (v) { - return inc ? semver.inc(v, inc, options, identifier) : v - }).forEach(function (v, i, _) { console.log(v) }) -} - -function help () { - console.log(['SemVer ' + version, - '', - 'A JavaScript implementation of the https://semver.org/ specification', - 'Copyright Isaac Z. Schlueter', - '', - 'Usage: semver [options] [ [...]]', - 'Prints valid versions sorted by SemVer precedence', - '', - 'Options:', - '-r --range ', - ' Print versions that match the specified range.', - '', - '-i --increment []', - ' Increment a version by the specified level. Level can', - ' be one of: major, minor, patch, premajor, preminor,', - " prepatch, or prerelease. Default level is 'patch'.", - ' Only one version may be specified.', - '', - '--preid ', - ' Identifier to be used to prefix premajor, preminor,', - ' prepatch or prerelease version increments.', - '', - '-l --loose', - ' Interpret versions and ranges loosely', - '', - '-p --include-prerelease', - ' Always include prerelease versions in range matching', - '', - '-c --coerce', - ' Coerce a string into SemVer if possible', - ' (does not imply --loose)', - '', - 'Program exits successfully if any valid version satisfies', - 'all supplied ranges, and prints all satisfying versions.', - '', - 'If no satisfying versions are found, then exits failure.', - '', - 'Versions are printed in ascending order, so supplying', - 'multiple versions to the utility will just sort them.' - ].join('\n')) -} diff --git a/node_modules/nodemon/node_modules/semver/package.json b/node_modules/nodemon/node_modules/semver/package.json deleted file mode 100644 index db035e9..0000000 --- a/node_modules/nodemon/node_modules/semver/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "semver", - "version": "5.7.2", - "description": "The semantic version parser used by npm.", - "main": "semver.js", - "scripts": { - "test": "tap test/ --100 --timeout=30", - "lint": "echo linting disabled", - "postlint": "template-oss-check", - "template-oss-apply": "template-oss-apply --force", - "lintfix": "npm run lint -- --fix", - "snap": "tap test/ --100 --timeout=30", - "posttest": "npm run lint" - }, - "devDependencies": { - "@npmcli/template-oss": "4.17.0", - "tap": "^12.7.0" - }, - "license": "ISC", - "repository": { - "type": "git", - "url": "https://github.com/npm/node-semver.git" - }, - "bin": { - "semver": "./bin/semver" - }, - "files": [ - "bin", - "range.bnf", - "semver.js" - ], - "author": "GitHub Inc.", - "templateOSS": { - "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "content": "./scripts/template-oss", - "version": "4.17.0" - } -} diff --git a/node_modules/nodemon/node_modules/semver/range.bnf b/node_modules/nodemon/node_modules/semver/range.bnf deleted file mode 100644 index d4c6ae0..0000000 --- a/node_modules/nodemon/node_modules/semver/range.bnf +++ /dev/null @@ -1,16 +0,0 @@ -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | [1-9] ( [0-9] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ diff --git a/node_modules/nodemon/node_modules/semver/semver.js b/node_modules/nodemon/node_modules/semver/semver.js deleted file mode 100644 index dcb6833..0000000 --- a/node_modules/nodemon/node_modules/semver/semver.js +++ /dev/null @@ -1,1525 +0,0 @@ -exports = module.exports = SemVer - -var debug -/* istanbul ignore next */ -if (typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG)) { - debug = function () { - var args = Array.prototype.slice.call(arguments, 0) - args.unshift('SEMVER') - console.log.apply(console, args) - } -} else { - debug = function () {} -} - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0' - -var MAX_LENGTH = 256 -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || - /* istanbul ignore next */ 9007199254740991 - -// Max safe segment length for coercion. -var MAX_SAFE_COMPONENT_LENGTH = 16 - -var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6 - -// The actual regexps go on exports.re -var re = exports.re = [] -var safeRe = exports.safeRe = [] -var src = exports.src = [] -var R = 0 - -var LETTERDASHNUMBER = '[a-zA-Z0-9-]' - -// Replace some greedy regex tokens to prevent regex dos issues. These regex are -// used internally via the safeRe object since all inputs in this library get -// normalized first to trim and collapse all extra whitespace. The original -// regexes are exported for userland consumption and lower level usage. A -// future breaking change could export the safer regex only with a note that -// all input should have extra whitespace removed. -var safeRegexReplacements = [ - ['\\s', 1], - ['\\d', MAX_LENGTH], - [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH], -] - -function makeSafeRe (value) { - for (var i = 0; i < safeRegexReplacements.length; i++) { - var token = safeRegexReplacements[i][0] - var max = safeRegexReplacements[i][1] - value = value - .split(token + '*').join(token + '{0,' + max + '}') - .split(token + '+').join(token + '{1,' + max + '}') - } - return value -} - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -var NUMERICIDENTIFIER = R++ -src[NUMERICIDENTIFIER] = '0|[1-9]\\d*' -var NUMERICIDENTIFIERLOOSE = R++ -src[NUMERICIDENTIFIERLOOSE] = '\\d+' - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -var NONNUMERICIDENTIFIER = R++ -src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-]' + LETTERDASHNUMBER + '*' - -// ## Main Version -// Three dot-separated numeric identifiers. - -var MAINVERSION = R++ -src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')' - -var MAINVERSIONLOOSE = R++ -src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')' - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -var PRERELEASEIDENTIFIER = R++ -src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -var PRERELEASEIDENTIFIERLOOSE = R++ -src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + - '|' + src[NONNUMERICIDENTIFIER] + ')' - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -var PRERELEASE = R++ -src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + - '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))' - -var PRERELEASELOOSE = R++ -src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))' - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -var BUILDIDENTIFIER = R++ -src[BUILDIDENTIFIER] = LETTERDASHNUMBER + '+' - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -var BUILD = R++ -src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + - '(?:\\.' + src[BUILDIDENTIFIER] + ')*))' - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -var FULL = R++ -var FULLPLAIN = 'v?' + src[MAINVERSION] + - src[PRERELEASE] + '?' + - src[BUILD] + '?' - -src[FULL] = '^' + FULLPLAIN + '$' - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + - src[PRERELEASELOOSE] + '?' + - src[BUILD] + '?' - -var LOOSE = R++ -src[LOOSE] = '^' + LOOSEPLAIN + '$' - -var GTLT = R++ -src[GTLT] = '((?:<|>)?=?)' - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -var XRANGEIDENTIFIERLOOSE = R++ -src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*' -var XRANGEIDENTIFIER = R++ -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*' - -var XRANGEPLAIN = R++ -src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:' + src[PRERELEASE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGEPLAINLOOSE = R++ -src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:' + src[PRERELEASELOOSE] + ')?' + - src[BUILD] + '?' + - ')?)?' - -var XRANGE = R++ -src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$' -var XRANGELOOSE = R++ -src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$' - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -var COERCE = R++ -src[COERCE] = '(?:^|[^\\d])' + - '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:$|[^\\d])' - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -var LONETILDE = R++ -src[LONETILDE] = '(?:~>?)' - -var TILDETRIM = R++ -src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+' -re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g') -safeRe[TILDETRIM] = new RegExp(makeSafeRe(src[TILDETRIM]), 'g') -var tildeTrimReplace = '$1~' - -var TILDE = R++ -src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$' -var TILDELOOSE = R++ -src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$' - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -var LONECARET = R++ -src[LONECARET] = '(?:\\^)' - -var CARETTRIM = R++ -src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+' -re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g') -safeRe[CARETTRIM] = new RegExp(makeSafeRe(src[CARETTRIM]), 'g') -var caretTrimReplace = '$1^' - -var CARET = R++ -src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$' -var CARETLOOSE = R++ -src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$' - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -var COMPARATORLOOSE = R++ -src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$' -var COMPARATOR = R++ -src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$' - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -var COMPARATORTRIM = R++ -src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + - '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')' - -// this one has to use the /g flag -re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g') -safeRe[COMPARATORTRIM] = new RegExp(makeSafeRe(src[COMPARATORTRIM]), 'g') -var comparatorTrimReplace = '$1$2$3' - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -var HYPHENRANGE = R++ -src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAIN] + ')' + - '\\s*$' - -var HYPHENRANGELOOSE = R++ -src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s*$' - -// Star ranges basically just allow anything at all. -var STAR = R++ -src[STAR] = '(<|>)?=?\\s*\\*' - -// Compile to actual regexp objects. -// All are flag-free, unless they were created above with a flag. -for (var i = 0; i < R; i++) { - debug(i, src[i]) - if (!re[i]) { - re[i] = new RegExp(src[i]) - - // Replace all greedy whitespace to prevent regex dos issues. These regex are - // used internally via the safeRe object since all inputs in this library get - // normalized first to trim and collapse all extra whitespace. The original - // regexes are exported for userland consumption and lower level usage. A - // future breaking change could export the safer regex only with a note that - // all input should have extra whitespace removed. - safeRe[i] = new RegExp(makeSafeRe(src[i])) - } -} - -exports.parse = parse -function parse (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - if (version.length > MAX_LENGTH) { - return null - } - - var r = options.loose ? safeRe[LOOSE] : safeRe[FULL] - if (!r.test(version)) { - return null - } - - try { - return new SemVer(version, options) - } catch (er) { - return null - } -} - -exports.valid = valid -function valid (version, options) { - var v = parse(version, options) - return v ? v.version : null -} - -exports.clean = clean -function clean (version, options) { - var s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} - -exports.SemVer = SemVer - -function SemVer (version, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - if (version instanceof SemVer) { - if (version.loose === options.loose) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError('Invalid Version: ' + version) - } - - if (version.length > MAX_LENGTH) { - throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') - } - - if (!(this instanceof SemVer)) { - return new SemVer(version, options) - } - - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - - var m = version.trim().match(options.loose ? safeRe[LOOSE] : safeRe[FULL]) - - if (!m) { - throw new TypeError('Invalid Version: ' + version) - } - - this.raw = version - - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } - - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map(function (id) { - if (/^[0-9]+$/.test(id)) { - var num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } - - this.build = m[5] ? m[5].split('.') : [] - this.format() -} - -SemVer.prototype.format = function () { - this.version = this.major + '.' + this.minor + '.' + this.patch - if (this.prerelease.length) { - this.version += '-' + this.prerelease.join('.') - } - return this.version -} - -SemVer.prototype.toString = function () { - return this.version -} - -SemVer.prototype.compare = function (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return this.compareMain(other) || this.comparePre(other) -} - -SemVer.prototype.compareMain = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) -} - -SemVer.prototype.comparePre = function (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } - - var i = 0 - do { - var a = this.prerelease[i] - var b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) -} - -// preminor will bump the version up to the next minor release, and immediately -// down to pre-release. premajor and prepatch work the same way. -SemVer.prototype.inc = function (release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier) - this.inc('pre', identifier) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier) - } - this.inc('pre', identifier) - break - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if (this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) { - this.prerelease = [0] - } else { - var i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - this.prerelease.push(0) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, 0] - } - } else { - this.prerelease = [identifier, 0] - } - } - break - - default: - throw new Error('invalid increment argument: ' + release) - } - this.format() - this.raw = this.version - return this -} - -exports.inc = inc -function inc (version, release, loose, identifier) { - if (typeof (loose) === 'string') { - identifier = loose - loose = undefined - } - - try { - return new SemVer(version, loose).inc(release, identifier).version - } catch (er) { - return null - } -} - -exports.diff = diff -function diff (version1, version2) { - if (eq(version1, version2)) { - return null - } else { - var v1 = parse(version1) - var v2 = parse(version2) - var prefix = '' - if (v1.prerelease.length || v2.prerelease.length) { - prefix = 'pre' - var defaultResult = 'prerelease' - } - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return prefix + key - } - } - } - return defaultResult // may be undefined - } -} - -exports.compareIdentifiers = compareIdentifiers - -var numeric = /^[0-9]+$/ -function compareIdentifiers (a, b) { - var anum = numeric.test(a) - var bnum = numeric.test(b) - - if (anum && bnum) { - a = +a - b = +b - } - - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} - -exports.rcompareIdentifiers = rcompareIdentifiers -function rcompareIdentifiers (a, b) { - return compareIdentifiers(b, a) -} - -exports.major = major -function major (a, loose) { - return new SemVer(a, loose).major -} - -exports.minor = minor -function minor (a, loose) { - return new SemVer(a, loose).minor -} - -exports.patch = patch -function patch (a, loose) { - return new SemVer(a, loose).patch -} - -exports.compare = compare -function compare (a, b, loose) { - return new SemVer(a, loose).compare(new SemVer(b, loose)) -} - -exports.compareLoose = compareLoose -function compareLoose (a, b) { - return compare(a, b, true) -} - -exports.rcompare = rcompare -function rcompare (a, b, loose) { - return compare(b, a, loose) -} - -exports.sort = sort -function sort (list, loose) { - return list.sort(function (a, b) { - return exports.compare(a, b, loose) - }) -} - -exports.rsort = rsort -function rsort (list, loose) { - return list.sort(function (a, b) { - return exports.rcompare(a, b, loose) - }) -} - -exports.gt = gt -function gt (a, b, loose) { - return compare(a, b, loose) > 0 -} - -exports.lt = lt -function lt (a, b, loose) { - return compare(a, b, loose) < 0 -} - -exports.eq = eq -function eq (a, b, loose) { - return compare(a, b, loose) === 0 -} - -exports.neq = neq -function neq (a, b, loose) { - return compare(a, b, loose) !== 0 -} - -exports.gte = gte -function gte (a, b, loose) { - return compare(a, b, loose) >= 0 -} - -exports.lte = lte -function lte (a, b, loose) { - return compare(a, b, loose) <= 0 -} - -exports.cmp = cmp -function cmp (a, op, b, loose) { - switch (op) { - case '===': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a === b - - case '!==': - if (typeof a === 'object') - a = a.version - if (typeof b === 'object') - b = b.version - return a !== b - - case '': - case '=': - case '==': - return eq(a, b, loose) - - case '!=': - return neq(a, b, loose) - - case '>': - return gt(a, b, loose) - - case '>=': - return gte(a, b, loose) - - case '<': - return lt(a, b, loose) - - case '<=': - return lte(a, b, loose) - - default: - throw new TypeError('Invalid operator: ' + op) - } -} - -exports.Comparator = Comparator -function Comparator (comp, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } - - if (!(this instanceof Comparator)) { - return new Comparator(comp, options) - } - - comp = comp.trim().split(/\s+/).join(' ') - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) - - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } - - debug('comp', this) -} - -var ANY = {} -Comparator.prototype.parse = function (comp) { - var r = this.options.loose ? safeRe[COMPARATORLOOSE] : safeRe[COMPARATOR] - var m = comp.match(r) - - if (!m) { - throw new TypeError('Invalid comparator: ' + comp) - } - - this.operator = m[1] - if (this.operator === '=') { - this.operator = '' - } - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } -} - -Comparator.prototype.toString = function () { - return this.value -} - -Comparator.prototype.test = function (version) { - debug('Comparator.test', version, this.options.loose) - - if (this.semver === ANY) { - return true - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - return cmp(version, this.operator, this.semver, this.options) -} - -Comparator.prototype.intersects = function (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } - - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - var rangeTmp - - if (this.operator === '') { - rangeTmp = new Range(comp.value, options) - return satisfies(this.value, rangeTmp, options) - } else if (comp.operator === '') { - rangeTmp = new Range(this.value, options) - return satisfies(comp.semver, rangeTmp, options) - } - - var sameDirectionIncreasing = - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '>=' || comp.operator === '>') - var sameDirectionDecreasing = - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '<=' || comp.operator === '<') - var sameSemVer = this.semver.version === comp.semver.version - var differentDirectionsInclusive = - (this.operator === '>=' || this.operator === '<=') && - (comp.operator === '>=' || comp.operator === '<=') - var oppositeDirectionsLessThan = - cmp(this.semver, '<', comp.semver, options) && - ((this.operator === '>=' || this.operator === '>') && - (comp.operator === '<=' || comp.operator === '<')) - var oppositeDirectionsGreaterThan = - cmp(this.semver, '>', comp.semver, options) && - ((this.operator === '<=' || this.operator === '<') && - (comp.operator === '>=' || comp.operator === '>')) - - return sameDirectionIncreasing || sameDirectionDecreasing || - (sameSemVer && differentDirectionsInclusive) || - oppositeDirectionsLessThan || oppositeDirectionsGreaterThan -} - -exports.Range = Range -function Range (range, options) { - if (!options || typeof options !== 'object') { - options = { - loose: !!options, - includePrerelease: false - } - } - - if (range instanceof Range) { - if (range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease) { - return range - } else { - return new Range(range.raw, options) - } - } - - if (range instanceof Comparator) { - return new Range(range.value, options) - } - - if (!(this instanceof Range)) { - return new Range(range, options) - } - - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease - - // First reduce all whitespace as much as possible so we do not have to rely - // on potentially slow regexes like \s*. This is then stored and used for - // future error messages as well. - this.raw = range - .trim() - .split(/\s+/) - .join(' ') - - // First, split based on boolean or || - this.set = this.raw.split('||').map(function (range) { - return this.parseRange(range.trim()) - }, this).filter(function (c) { - // throw out any that are not relevant for whatever reason - return c.length - }) - - if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + this.raw) - } - - this.format() -} - -Range.prototype.format = function () { - this.range = this.set.map(function (comps) { - return comps.join(' ').trim() - }).join('||').trim() - return this.range -} - -Range.prototype.toString = function () { - return this.range -} - -Range.prototype.parseRange = function (range) { - var loose = this.options.loose - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? safeRe[HYPHENRANGELOOSE] : safeRe[HYPHENRANGE] - range = range.replace(hr, hyphenReplace) - debug('hyphen replace', range) - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(safeRe[COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range, safeRe[COMPARATORTRIM]) - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(safeRe[TILDETRIM], tildeTrimReplace) - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(safeRe[CARETTRIM], caretTrimReplace) - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - var compRe = loose ? safeRe[COMPARATORLOOSE] : safeRe[COMPARATOR] - var set = range.split(' ').map(function (comp) { - return parseComparator(comp, this.options) - }, this).join(' ').split(/\s+/) - if (this.options.loose) { - // in loose mode, throw out any that are not valid comparators - set = set.filter(function (comp) { - return !!comp.match(compRe) - }) - } - set = set.map(function (comp) { - return new Comparator(comp, this.options) - }, this) - - return set -} - -Range.prototype.intersects = function (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } - - return this.set.some(function (thisComparators) { - return thisComparators.every(function (thisComparator) { - return range.set.some(function (rangeComparators) { - return rangeComparators.every(function (rangeComparator) { - return thisComparator.intersects(rangeComparator, options) - }) - }) - }) - }) -} - -// Mostly just for testing and legacy API reasons -exports.toComparators = toComparators -function toComparators (range, options) { - return new Range(range, options).set.map(function (comp) { - return comp.map(function (c) { - return c.value - }).join(' ').trim().split(' ') - }) -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -function parseComparator (comp, options) { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} - -function isX (id) { - return !id || id.toLowerCase() === 'x' || id === '*' -} - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceTilde(comp, options) - }).join(' ') -} - -function replaceTilde (comp, options) { - var r = options.loose ? safeRe[TILDELOOSE] : safeRe[TILDE] - return comp.replace(r, function (_, M, m, p, pr) { - debug('tilde', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0 - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else if (pr) { - debug('replaceTilde pr', pr) - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } else { - // ~1.2.3 == >=1.2.3 <1.3.0 - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - - debug('tilde return', ret) - return ret - }) -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets (comp, options) { - return comp.trim().split(/\s+/).map(function (comp) { - return replaceCaret(comp, options) - }).join(' ') -} - -function replaceCaret (comp, options) { - debug('caret', comp, options) - var r = options.loose ? safeRe[CARETLOOSE] : safeRe[CARET] - return comp.replace(r, function (_, M, m, p, pr) { - debug('caret', comp, _, M, m, p, pr) - var ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (isX(p)) { - if (M === '0') { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } else { - ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0' - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + '-' + pr + - ' <' + (+M + 1) + '.0.0' - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + m + '.' + (+p + 1) - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0' - } - } else { - ret = '>=' + M + '.' + m + '.' + p + - ' <' + (+M + 1) + '.0.0' - } - } - - debug('caret return', ret) - return ret - }) -} - -function replaceXRanges (comp, options) { - debug('replaceXRanges', comp, options) - return comp.split(/\s+/).map(function (comp) { - return replaceXRange(comp, options) - }).join(' ') -} - -function replaceXRange (comp, options) { - comp = comp.trim() - var r = options.loose ? safeRe[XRANGELOOSE] : safeRe[XRANGE] - return comp.replace(r, function (ret, gtlt, M, m, p, pr) { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - var xM = isX(M) - var xm = xM || isX(m) - var xp = xm || isX(p) - var anyX = xp - - if (gtlt === '=' && anyX) { - gtlt = '' - } - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - // >1.2.3 => >= 1.2.4 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 - } - } - - ret = gtlt + M + '.' + m + '.' + p - } else if (xm) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0' - } else if (xp) { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0' - } - - debug('xRange return', ret) - - return ret - }) -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -function replaceStars (comp, options) { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(safeRe[STAR], '') -} - -// This function is passed to string.replace(safeRe[HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0 -function hyphenReplace ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = '>=' + fM + '.0.0' - } else if (isX(fp)) { - from = '>=' + fM + '.' + fm + '.0' - } else { - from = '>=' + from - } - - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = '<' + (+tM + 1) + '.0.0' - } else if (isX(tp)) { - to = '<' + tM + '.' + (+tm + 1) + '.0' - } else if (tpr) { - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr - } else { - to = '<=' + to - } - - return (from + ' ' + to).trim() -} - -// if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function (version) { - if (!version) { - return false - } - - if (typeof version === 'string') { - version = new SemVer(version, this.options) - } - - for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false -} - -function testSet (set, version, options) { - for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } - - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === ANY) { - continue - } - - if (set[i].semver.prerelease.length > 0) { - var allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false - } - - return true -} - -exports.satisfies = satisfies -function satisfies (version, range, options) { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} - -exports.maxSatisfying = maxSatisfying -function maxSatisfying (versions, range, options) { - var max = null - var maxSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max -} - -exports.minSatisfying = minSatisfying -function minSatisfying (versions, range, options) { - var min = null - var minSV = null - try { - var rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } - } - }) - return min -} - -exports.minVersion = minVersion -function minVersion (range, loose) { - range = new Range(range, loose) - - var minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } - - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } - - minver = null - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - comparators.forEach(function (comparator) { - // Clone to avoid manipulating the comparator's semver object. - var compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!minver || gt(minver, compver)) { - minver = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error('Unexpected operation: ' + comparator.operator) - } - }) - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} - -exports.validRange = validRange -function validRange (range, options) { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null - } -} - -// Determine if version is less than all the versions possible in the range -exports.ltr = ltr -function ltr (version, range, options) { - return outside(version, range, '<', options) -} - -// Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr -function gtr (version, range, options) { - return outside(version, range, '>', options) -} - -exports.outside = outside -function outside (version, range, hilo, options) { - version = new SemVer(version, options) - range = new Range(range, options) - - var gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - - // If it satisifes the range it is not outside - if (satisfies(version, range, options)) { - return false - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i] - - var high = null - var low = null - - comparators.forEach(function (comparator) { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator - } - }) - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false - } - } - return true -} - -exports.prerelease = prerelease -function prerelease (version, options) { - var parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} - -exports.intersects = intersects -function intersects (r1, r2, options) { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2) -} - -exports.coerce = coerce -function coerce (version) { - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - var match = version.match(safeRe[COERCE]) - - if (match == null) { - return null - } - - return parse(match[1] + - '.' + (match[2] || '0') + - '.' + (match[3] || '0')) -} diff --git a/node_modules/nodemon/node_modules/supports-color/browser.js b/node_modules/nodemon/node_modules/supports-color/browser.js deleted file mode 100644 index 62afa3a..0000000 --- a/node_modules/nodemon/node_modules/supports-color/browser.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; -module.exports = { - stdout: false, - stderr: false -}; diff --git a/node_modules/nodemon/node_modules/supports-color/index.js b/node_modules/nodemon/node_modules/supports-color/index.js deleted file mode 100644 index 1704131..0000000 --- a/node_modules/nodemon/node_modules/supports-color/index.js +++ /dev/null @@ -1,131 +0,0 @@ -'use strict'; -const os = require('os'); -const hasFlag = require('has-flag'); - -const env = process.env; - -let forceColor; -if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false')) { - forceColor = false; -} else if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - forceColor = true; -} -if ('FORCE_COLOR' in env) { - forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; -} - -function translateLevel(level) { - if (level === 0) { - return false; - } - - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; -} - -function supportsColor(stream) { - if (forceColor === false) { - return 0; - } - - if (hasFlag('color=16m') || - hasFlag('color=full') || - hasFlag('color=truecolor')) { - return 3; - } - - if (hasFlag('color=256')) { - return 2; - } - - if (stream && !stream.isTTY && forceColor !== true) { - return 0; - } - - const min = forceColor ? 1 : 0; - - if (process.platform === 'win32') { - // Node.js 7.5.0 is the first version of Node.js to include a patch to - // libuv that enables 256 color output on Windows. Anything earlier and it - // won't work. However, here we target Node.js 8 at minimum as it is an LTS - // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows - // release that supports 256 colors. Windows 10 build 14931 is the first release - // that supports 16m/TrueColor. - const osRelease = os.release().split('.'); - if ( - Number(process.versions.node.split('.')[0]) >= 8 && - Number(osRelease[0]) >= 10 && - Number(osRelease[2]) >= 10586 - ) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - - return 1; - } - - if ('CI' in env) { - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') { - return 1; - } - - return min; - } - - if ('TEAMCITY_VERSION' in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } - - if (env.COLORTERM === 'truecolor') { - return 3; - } - - if ('TERM_PROGRAM' in env) { - const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); - - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - return version >= 3 ? 3 : 2; - case 'Apple_Terminal': - return 2; - // No default - } - } - - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - - if ('COLORTERM' in env) { - return 1; - } - - if (env.TERM === 'dumb') { - return min; - } - - return min; -} - -function getSupportLevel(stream) { - const level = supportsColor(stream); - return translateLevel(level); -} - -module.exports = { - supportsColor: getSupportLevel, - stdout: getSupportLevel(process.stdout), - stderr: getSupportLevel(process.stderr) -}; diff --git a/node_modules/nodemon/node_modules/supports-color/license b/node_modules/nodemon/node_modules/supports-color/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/nodemon/node_modules/supports-color/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/nodemon/node_modules/supports-color/package.json b/node_modules/nodemon/node_modules/supports-color/package.json deleted file mode 100644 index ad199f5..0000000 --- a/node_modules/nodemon/node_modules/supports-color/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "supports-color", - "version": "5.5.0", - "description": "Detect whether a terminal supports color", - "license": "MIT", - "repository": "chalk/supports-color", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava" - }, - "files": [ - "index.js", - "browser.js" - ], - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "ansi", - "styles", - "tty", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "support", - "supports", - "capability", - "detect", - "truecolor", - "16m" - ], - "dependencies": { - "has-flag": "^3.0.0" - }, - "devDependencies": { - "ava": "^0.25.0", - "import-fresh": "^2.0.0", - "xo": "^0.20.0" - }, - "browser": "browser.js" -} diff --git a/node_modules/nodemon/node_modules/supports-color/readme.md b/node_modules/nodemon/node_modules/supports-color/readme.md deleted file mode 100644 index f6e4019..0000000 --- a/node_modules/nodemon/node_modules/supports-color/readme.md +++ /dev/null @@ -1,66 +0,0 @@ -# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color) - -> Detect whether a terminal supports color - - -## Install - -``` -$ npm install supports-color -``` - - -## Usage - -```js -const supportsColor = require('supports-color'); - -if (supportsColor.stdout) { - console.log('Terminal stdout supports color'); -} - -if (supportsColor.stdout.has256) { - console.log('Terminal stdout supports 256 colors'); -} - -if (supportsColor.stderr.has16m) { - console.log('Terminal stderr supports 16 million colors (truecolor)'); -} -``` - - -## API - -Returns an `Object` with a `stdout` and `stderr` property for testing either streams. Each property is an `Object`, or `false` if color is not supported. - -The `stdout`/`stderr` objects specifies a level of support for color through a `.level` property and a corresponding flag: - -- `.level = 1` and `.hasBasic = true`: Basic color support (16 colors) -- `.level = 2` and `.has256 = true`: 256 color support -- `.level = 3` and `.has16m = true`: Truecolor support (16 million colors) - - -## Info - -It obeys the `--color` and `--no-color` CLI flags. - -Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add the environment variable `FORCE_COLOR=1` to forcefully enable color or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks. - -Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively. - - -## Related - -- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/node_modules/nodemon/package.json b/node_modules/nodemon/package.json deleted file mode 100644 index 25542e3..0000000 --- a/node_modules/nodemon/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "name": "nodemon", - "homepage": "https://nodemon.io", - "author": { - "name": "Remy Sharp", - "url": "https://github.com/remy" - }, - "bin": { - "nodemon": "./bin/nodemon.js" - }, - "engines": { - "node": ">=8.10.0" - }, - "repository": { - "type": "git", - "url": "https://github.com/remy/nodemon.git" - }, - "description": "Simple monitor script for use during development of a Node.js app.", - "keywords": [ - "cli", - "monitor", - "monitor", - "development", - "restart", - "autoload", - "reload", - "terminal" - ], - "license": "MIT", - "main": "./lib/nodemon", - "scripts": { - "commitmsg": "commitlint -e", - "coverage": "istanbul cover _mocha -- --timeout 30000 --ui bdd --reporter list test/**/*.test.js", - "lint": "eslint lib/**/*.js", - "test": "npm run lint && npm run spec", - "spec": "for FILE in test/**/*.test.js; do echo $FILE; TEST=1 mocha --exit --timeout 30000 $FILE; if [ $? -ne 0 ]; then exit 1; fi; sleep 1; done", - "postspec": "npm run clean", - "clean": "rm -rf test/fixtures/test*.js test/fixtures/test*.md", - "web": "node web", - "semantic-release": "semantic-release", - "prepush": "npm run lint", - "killall": "ps auxww | grep node | grep -v grep | awk '{ print $2 }' | xargs kill -9" - }, - "devDependencies": { - "@commitlint/cli": "^11.0.0", - "@commitlint/config-conventional": "^11.0.0", - "async": "1.4.2", - "coffee-script": "~1.7.1", - "eslint": "^7.32.0", - "husky": "^7.0.4", - "mocha": "^2.5.3", - "nyc": "^15.1.0", - "proxyquire": "^1.8.0", - "semantic-release": "^18.0.0", - "should": "~4.0.0" - }, - "dependencies": { - "chokidar": "^3.5.2", - "debug": "^3.2.7", - "ignore-by-default": "^1.0.1", - "minimatch": "^3.1.2", - "pstree.remy": "^1.1.8", - "semver": "^5.7.1", - "simple-update-notifier": "^1.0.7", - "supports-color": "^5.5.0", - "touch": "^3.1.0", - "undefsafe": "^2.0.5" - }, - "version": "2.0.22", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/nodemon" - } -} diff --git a/node_modules/normalize-path/LICENSE b/node_modules/normalize-path/LICENSE deleted file mode 100644 index d32ab44..0000000 --- a/node_modules/normalize-path/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2018, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/normalize-path/README.md b/node_modules/normalize-path/README.md deleted file mode 100644 index 726d4d6..0000000 --- a/node_modules/normalize-path/README.md +++ /dev/null @@ -1,127 +0,0 @@ -# normalize-path [![NPM version](https://img.shields.io/npm/v/normalize-path.svg?style=flat)](https://www.npmjs.com/package/normalize-path) [![NPM monthly downloads](https://img.shields.io/npm/dm/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![NPM total downloads](https://img.shields.io/npm/dt/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/normalize-path.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/normalize-path) - -> Normalize slashes in a file path to be posix/unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes, unless disabled. - -Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save normalize-path -``` - -## Usage - -```js -const normalize = require('normalize-path'); - -console.log(normalize('\\foo\\bar\\baz\\')); -//=> '/foo/bar/baz' -``` - -**win32 namespaces** - -```js -console.log(normalize('\\\\?\\UNC\\Server01\\user\\docs\\Letter.txt')); -//=> '//?/UNC/Server01/user/docs/Letter.txt' - -console.log(normalize('\\\\.\\CdRomX')); -//=> '//./CdRomX' -``` - -**Consecutive slashes** - -Condenses multiple consecutive forward slashes (except for leading slashes in win32 namespaces) to a single slash. - -```js -console.log(normalize('.//foo//bar///////baz/')); -//=> './foo/bar/baz' -``` - -### Trailing slashes - -By default trailing slashes are removed. Pass `false` as the last argument to disable this behavior and _**keep** trailing slashes_: - -```js -console.log(normalize('foo\\bar\\baz\\', false)); //=> 'foo/bar/baz/' -console.log(normalize('./foo/bar/baz/', false)); //=> './foo/bar/baz/' -``` - -## Release history - -### v3.0 - -No breaking changes in this release. - -* a check was added to ensure that [win32 namespaces](https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces) are handled properly by win32 `path.parse()` after a path has been normalized by this library. -* a minor optimization was made to simplify how the trailing separator was handled - -## About - -
-Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -
- -
-Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -
- -
-Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
- -### Related projects - -Other useful path-related libraries: - -* [contains-path](https://www.npmjs.com/package/contains-path): Return true if a file path contains the given path. | [homepage](https://github.com/jonschlinkert/contains-path "Return true if a file path contains the given path.") -* [is-absolute](https://www.npmjs.com/package/is-absolute): Returns true if a file path is absolute. Does not rely on the path module… [more](https://github.com/jonschlinkert/is-absolute) | [homepage](https://github.com/jonschlinkert/is-absolute "Returns true if a file path is absolute. Does not rely on the path module and can be used as a polyfill for node.js native `path.isAbolute`.") -* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns `true` if the path appears to be relative.") -* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Pollyfill for node.js `path.parse`, parses a filepath into an object. | [homepage](https://github.com/jonschlinkert/parse-filepath "Pollyfill for node.js `path.parse`, parses a filepath into an object.") -* [path-ends-with](https://www.npmjs.com/package/path-ends-with): Return `true` if a file path ends with the given string/suffix. | [homepage](https://github.com/jonschlinkert/path-ends-with "Return `true` if a file path ends with the given string/suffix.") -* [unixify](https://www.npmjs.com/package/unixify): Convert Windows file paths to unix paths. | [homepage](https://github.com/jonschlinkert/unixify "Convert Windows file paths to unix paths.") - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 35 | [jonschlinkert](https://github.com/jonschlinkert) | -| 1 | [phated](https://github.com/phated) | - -### Author - -**Jon Schlinkert** - -* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) -* [GitHub Profile](https://github.com/jonschlinkert) -* [Twitter Profile](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on April 19, 2018._ \ No newline at end of file diff --git a/node_modules/normalize-path/index.js b/node_modules/normalize-path/index.js deleted file mode 100644 index 6fac553..0000000 --- a/node_modules/normalize-path/index.js +++ /dev/null @@ -1,35 +0,0 @@ -/*! - * normalize-path - * - * Copyright (c) 2014-2018, Jon Schlinkert. - * Released under the MIT License. - */ - -module.exports = function(path, stripTrailing) { - if (typeof path !== 'string') { - throw new TypeError('expected path to be a string'); - } - - if (path === '\\' || path === '/') return '/'; - - var len = path.length; - if (len <= 1) return path; - - // ensure that win32 namespaces has two leading slashes, so that the path is - // handled properly by the win32 version of path.parse() after being normalized - // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces - var prefix = ''; - if (len > 4 && path[3] === '\\') { - var ch = path[2]; - if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\') { - path = path.slice(2); - prefix = '//'; - } - } - - var segs = path.split(/[/\\]+/); - if (stripTrailing !== false && segs[segs.length - 1] === '') { - segs.pop(); - } - return prefix + segs.join('/'); -}; diff --git a/node_modules/normalize-path/package.json b/node_modules/normalize-path/package.json deleted file mode 100644 index ad61098..0000000 --- a/node_modules/normalize-path/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "normalize-path", - "description": "Normalize slashes in a file path to be posix/unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes, unless disabled.", - "version": "3.0.0", - "homepage": "https://github.com/jonschlinkert/normalize-path", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "Blaine Bublitz (https://twitter.com/BlaineBublitz)", - "Jon Schlinkert (http://twitter.com/jonschlinkert)" - ], - "repository": "jonschlinkert/normalize-path", - "bugs": { - "url": "https://github.com/jonschlinkert/normalize-path/issues" - }, - "license": "MIT", - "files": [ - "index.js" - ], - "main": "index.js", - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha" - }, - "devDependencies": { - "gulp-format-md": "^1.0.0", - "minimist": "^1.2.0", - "mocha": "^3.5.3" - }, - "keywords": [ - "absolute", - "backslash", - "delimiter", - "file", - "file-path", - "filepath", - "fix", - "forward", - "fp", - "fs", - "normalize", - "path", - "relative", - "separator", - "slash", - "slashes", - "trailing", - "unix", - "urix" - ], - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "related": { - "description": "Other useful path-related libraries:", - "list": [ - "contains-path", - "is-absolute", - "is-relative", - "parse-filepath", - "path-ends-with", - "path-ends-with", - "unixify" - ] - }, - "lint": { - "reflinks": true - } - } -} diff --git a/node_modules/object-assign/index.js b/node_modules/object-assign/index.js deleted file mode 100644 index 0930cf8..0000000 --- a/node_modules/object-assign/index.js +++ /dev/null @@ -1,90 +0,0 @@ -/* -object-assign -(c) Sindre Sorhus -@license MIT -*/ - -'use strict'; -/* eslint-disable no-unused-vars */ -var getOwnPropertySymbols = Object.getOwnPropertySymbols; -var hasOwnProperty = Object.prototype.hasOwnProperty; -var propIsEnumerable = Object.prototype.propertyIsEnumerable; - -function toObject(val) { - if (val === null || val === undefined) { - throw new TypeError('Object.assign cannot be called with null or undefined'); - } - - return Object(val); -} - -function shouldUseNative() { - try { - if (!Object.assign) { - return false; - } - - // Detect buggy property enumeration order in older V8 versions. - - // https://bugs.chromium.org/p/v8/issues/detail?id=4118 - var test1 = new String('abc'); // eslint-disable-line no-new-wrappers - test1[5] = 'de'; - if (Object.getOwnPropertyNames(test1)[0] === '5') { - return false; - } - - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test2 = {}; - for (var i = 0; i < 10; i++) { - test2['_' + String.fromCharCode(i)] = i; - } - var order2 = Object.getOwnPropertyNames(test2).map(function (n) { - return test2[n]; - }); - if (order2.join('') !== '0123456789') { - return false; - } - - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test3 = {}; - 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { - test3[letter] = letter; - }); - if (Object.keys(Object.assign({}, test3)).join('') !== - 'abcdefghijklmnopqrst') { - return false; - } - - return true; - } catch (err) { - // We don't expect any of the above to throw, but better to be safe. - return false; - } -} - -module.exports = shouldUseNative() ? Object.assign : function (target, source) { - var from; - var to = toObject(target); - var symbols; - - for (var s = 1; s < arguments.length; s++) { - from = Object(arguments[s]); - - for (var key in from) { - if (hasOwnProperty.call(from, key)) { - to[key] = from[key]; - } - } - - if (getOwnPropertySymbols) { - symbols = getOwnPropertySymbols(from); - for (var i = 0; i < symbols.length; i++) { - if (propIsEnumerable.call(from, symbols[i])) { - to[symbols[i]] = from[symbols[i]]; - } - } - } - } - - return to; -}; diff --git a/node_modules/object-assign/license b/node_modules/object-assign/license deleted file mode 100644 index 654d0bf..0000000 --- a/node_modules/object-assign/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/object-assign/package.json b/node_modules/object-assign/package.json deleted file mode 100644 index 503eb1e..0000000 --- a/node_modules/object-assign/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "object-assign", - "version": "4.1.1", - "description": "ES2015 `Object.assign()` ponyfill", - "license": "MIT", - "repository": "sindresorhus/object-assign", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "xo && ava", - "bench": "matcha bench.js" - }, - "files": [ - "index.js" - ], - "keywords": [ - "object", - "assign", - "extend", - "properties", - "es2015", - "ecmascript", - "harmony", - "ponyfill", - "prollyfill", - "polyfill", - "shim", - "browser" - ], - "devDependencies": { - "ava": "^0.16.0", - "lodash": "^4.16.4", - "matcha": "^0.7.0", - "xo": "^0.16.0" - } -} diff --git a/node_modules/object-assign/readme.md b/node_modules/object-assign/readme.md deleted file mode 100644 index 1be09d3..0000000 --- a/node_modules/object-assign/readme.md +++ /dev/null @@ -1,61 +0,0 @@ -# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign) - -> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) [ponyfill](https://ponyfill.com) - - -## Use the built-in - -Node.js 4 and up, as well as every evergreen browser (Chrome, Edge, Firefox, Opera, Safari), -support `Object.assign()` :tada:. If you target only those environments, then by all -means, use `Object.assign()` instead of this package. - - -## Install - -``` -$ npm install --save object-assign -``` - - -## Usage - -```js -const objectAssign = require('object-assign'); - -objectAssign({foo: 0}, {bar: 1}); -//=> {foo: 0, bar: 1} - -// multiple sources -objectAssign({foo: 0}, {bar: 1}, {baz: 2}); -//=> {foo: 0, bar: 1, baz: 2} - -// overwrites equal keys -objectAssign({foo: 0}, {foo: 1}, {foo: 2}); -//=> {foo: 2} - -// ignores null and undefined sources -objectAssign({foo: 0}, null, {bar: 1}, undefined); -//=> {foo: 0, bar: 1} -``` - - -## API - -### objectAssign(target, [source, ...]) - -Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones. - - -## Resources - -- [ES2015 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign) - - -## Related - -- [deep-assign](https://github.com/sindresorhus/deep-assign) - Recursive `Object.assign()` - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/object-inspect/.eslintrc b/node_modules/object-inspect/.eslintrc deleted file mode 100644 index 21f9039..0000000 --- a/node_modules/object-inspect/.eslintrc +++ /dev/null @@ -1,53 +0,0 @@ -{ - "root": true, - "extends": "@ljharb", - "rules": { - "complexity": 0, - "func-style": [2, "declaration"], - "indent": [2, 4], - "max-lines": 1, - "max-lines-per-function": 1, - "max-params": [2, 4], - "max-statements": 0, - "max-statements-per-line": [2, { "max": 2 }], - "no-magic-numbers": 0, - "no-param-reassign": 1, - "strict": 0, // TODO - }, - "overrides": [ - { - "files": ["test/**", "test-*", "example/**"], - "extends": "@ljharb/eslint-config/tests", - "rules": { - "id-length": 0, - }, - }, - { - "files": ["example/**"], - "rules": { - "no-console": 0, - }, - }, - { - "files": ["test/browser/**"], - "env": { - "browser": true, - }, - }, - { - "files": ["test/bigint*"], - "rules": { - "new-cap": [2, { "capIsNewExceptions": ["BigInt"] }], - }, - }, - { - "files": "index.js", - "globals": { - "HTMLElement": false, - }, - "rules": { - "no-use-before-define": 1, - }, - }, - ], -} diff --git a/node_modules/object-inspect/.github/FUNDING.yml b/node_modules/object-inspect/.github/FUNDING.yml deleted file mode 100644 index 730276b..0000000 --- a/node_modules/object-inspect/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/object-inspect -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/object-inspect/.nycrc b/node_modules/object-inspect/.nycrc deleted file mode 100644 index 58a5db7..0000000 --- a/node_modules/object-inspect/.nycrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "instrumentation": false, - "sourceMap": false, - "reporter": ["text-summary", "text", "html", "json"], - "exclude": [ - "coverage", - "example", - "test", - "test-core-js.js" - ] -} diff --git a/node_modules/object-inspect/CHANGELOG.md b/node_modules/object-inspect/CHANGELOG.md deleted file mode 100644 index bdf9002..0000000 --- a/node_modules/object-inspect/CHANGELOG.md +++ /dev/null @@ -1,424 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.13.4](https://github.com/inspect-js/object-inspect/compare/v1.13.3...v1.13.4) - 2025-02-04 - -### Commits - -- [Fix] avoid being fooled by a `Symbol.toStringTag` [`fa5870d`](https://github.com/inspect-js/object-inspect/commit/fa5870da468a525d2f20193700f70752f506cbf7) -- [Tests] fix tests in node v6.0 - v6.4 [`2abfe1b`](https://github.com/inspect-js/object-inspect/commit/2abfe1bc3c69f9293c07c5cd65a9d7d87a628b84) -- [Dev Deps] update `es-value-fixtures`, `for-each`, `has-symbols` [`3edfb01`](https://github.com/inspect-js/object-inspect/commit/3edfb01cc8cce220fba0dfdfe2dc8bc955758cdd) - -## [v1.13.3](https://github.com/inspect-js/object-inspect/compare/v1.13.2...v1.13.3) - 2024-11-09 - -### Commits - -- [actions] split out node 10-20, and 20+ [`44395a8`](https://github.com/inspect-js/object-inspect/commit/44395a8fc1deda6718a5e125e86b9ffcaa1c7580) -- [Fix] `quoteStyle`: properly escape only the containing quotes [`5137f8f`](https://github.com/inspect-js/object-inspect/commit/5137f8f7bea69a7fc671bb683fd35f244f38fc52) -- [Refactor] clean up `quoteStyle` code [`450680c`](https://github.com/inspect-js/object-inspect/commit/450680cd50de4e689ee3b8e1d6db3a1bcf3fc18c) -- [Tests] add `quoteStyle` escaping tests [`e997c59`](https://github.com/inspect-js/object-inspect/commit/e997c595aeaea84fd98ca35d7e1c3b5ab3ae26e0) -- [Dev Deps] update `auto-changelog`, `es-value-fixtures`, `tape` [`d5a469c`](https://github.com/inspect-js/object-inspect/commit/d5a469c99ec07ccaeafc36ac4b36a93285086d48) -- [Tests] replace `aud` with `npm audit` [`fb7815f`](https://github.com/inspect-js/object-inspect/commit/fb7815f9b72cae277a04f65bbb0543f85b88be62) -- [Dev Deps] update `mock-property` [`11c817b`](https://github.com/inspect-js/object-inspect/commit/11c817bf10392aa017755962ba6bc89d731359ee) - -## [v1.13.2](https://github.com/inspect-js/object-inspect/compare/v1.13.1...v1.13.2) - 2024-06-21 - -### Commits - -- [readme] update badges [`8a51e6b`](https://github.com/inspect-js/object-inspect/commit/8a51e6bedaf389ec40cc4659e9df53e8543d176e) -- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`ef05f58`](https://github.com/inspect-js/object-inspect/commit/ef05f58c9761a41416ab907299bf0fa79517014b) -- [Dev Deps] update `error-cause`, `has-tostringtag`, `tape` [`c0c6c26`](https://github.com/inspect-js/object-inspect/commit/c0c6c26c44cee6671f7c5d43d2b91d27c5c00d90) -- [Fix] Don't throw when `global` is not defined [`d4d0965`](https://github.com/inspect-js/object-inspect/commit/d4d096570f7dbd0e03266a96de11d05eb7b63e0f) -- [meta] add missing `engines.node` [`17a352a`](https://github.com/inspect-js/object-inspect/commit/17a352af6fe1ba6b70a19081674231eb1a50c940) -- [Dev Deps] update `globalthis` [`9c08884`](https://github.com/inspect-js/object-inspect/commit/9c08884aa662a149e2f11403f413927736b97da7) -- [Dev Deps] update `error-cause` [`6af352d`](https://github.com/inspect-js/object-inspect/commit/6af352d7c3929a4cc4c55768c27bf547a5e900f4) -- [Dev Deps] update `npmignore` [`94e617d`](https://github.com/inspect-js/object-inspect/commit/94e617d38831722562fa73dff4c895746861d267) -- [Dev Deps] update `mock-property` [`2ac24d7`](https://github.com/inspect-js/object-inspect/commit/2ac24d7e58cd388ad093c33249e413e05bbfd6c3) -- [Dev Deps] update `tape` [`46125e5`](https://github.com/inspect-js/object-inspect/commit/46125e58f1d1dcfb170ed3d1ea69da550ea8d77b) - -## [v1.13.1](https://github.com/inspect-js/object-inspect/compare/v1.13.0...v1.13.1) - 2023-10-19 - -### Commits - -- [Fix] in IE 8, global can !== window despite them being prototypes of each other [`30d0859`](https://github.com/inspect-js/object-inspect/commit/30d0859dc4606cf75c2410edcd5d5c6355f8d372) - -## [v1.13.0](https://github.com/inspect-js/object-inspect/compare/v1.12.3...v1.13.0) - 2023-10-14 - -### Commits - -- [New] add special handling for the global object [`431bab2`](https://github.com/inspect-js/object-inspect/commit/431bab21a490ee51d35395966a504501e8c685da) -- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`fd4f619`](https://github.com/inspect-js/object-inspect/commit/fd4f6193562b4b0e95dcf5c0201b4e8cbbc4f58d) -- [Dev Deps] update `mock-property`, `tape` [`b453f6c`](https://github.com/inspect-js/object-inspect/commit/b453f6ceeebf8a1b738a1029754092e0367a4134) -- [Dev Deps] update `error-cause` [`e8ffc57`](https://github.com/inspect-js/object-inspect/commit/e8ffc577d73b92bb6a4b00c44f14e3319e374888) -- [Dev Deps] update `tape` [`054b8b9`](https://github.com/inspect-js/object-inspect/commit/054b8b9b98633284cf989e582450ebfbbe53503c) -- [Dev Deps] temporarily remove `aud` due to breaking change in transitive deps [`2476845`](https://github.com/inspect-js/object-inspect/commit/2476845e0678dd290c541c81cd3dec8420782c52) -- [Dev Deps] pin `glob`, since v10.3.8+ requires a broken `jackspeak` [`383fa5e`](https://github.com/inspect-js/object-inspect/commit/383fa5eebc0afd705cc778a4b49d8e26452e49a8) -- [Dev Deps] pin `jackspeak` since 2.1.2+ depends on npm aliases, which kill the install process in npm < 6 [`68c244c`](https://github.com/inspect-js/object-inspect/commit/68c244c5174cdd877e5dcb8ee90aa3f44b2f25be) - -## [v1.12.3](https://github.com/inspect-js/object-inspect/compare/v1.12.2...v1.12.3) - 2023-01-12 - -### Commits - -- [Fix] in eg FF 24, collections lack forEach [`75fc226`](https://github.com/inspect-js/object-inspect/commit/75fc22673c82d45f28322b1946bb0eb41b672b7f) -- [actions] update rebase action to use reusable workflow [`250a277`](https://github.com/inspect-js/object-inspect/commit/250a277a095e9dacc029ab8454dcfc15de549dcd) -- [Dev Deps] update `aud`, `es-value-fixtures`, `tape` [`66a19b3`](https://github.com/inspect-js/object-inspect/commit/66a19b3209ccc3c5ef4b34c3cb0160e65d1ce9d5) -- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `error-cause` [`c43d332`](https://github.com/inspect-js/object-inspect/commit/c43d3324b48384a16fd3dc444e5fc589d785bef3) -- [Tests] add `@pkgjs/support` to `postlint` [`e2618d2`](https://github.com/inspect-js/object-inspect/commit/e2618d22a7a3fa361b6629b53c1752fddc9c4d80) - -## [v1.12.2](https://github.com/inspect-js/object-inspect/compare/v1.12.1...v1.12.2) - 2022-05-26 - -### Commits - -- [Fix] use `util.inspect` for a custom inspection symbol method [`e243bf2`](https://github.com/inspect-js/object-inspect/commit/e243bf2eda6c4403ac6f1146fddb14d12e9646c1) -- [meta] add support info [`ca20ba3`](https://github.com/inspect-js/object-inspect/commit/ca20ba35713c17068ca912a86c542f5e8acb656c) -- [Fix] ignore `cause` in node v16.9 and v16.10 where it has a bug [`86aa553`](https://github.com/inspect-js/object-inspect/commit/86aa553a4a455562c2c56f1540f0bf857b9d314b) - -## [v1.12.1](https://github.com/inspect-js/object-inspect/compare/v1.12.0...v1.12.1) - 2022-05-21 - -### Commits - -- [Tests] use `mock-property` [`4ec8893`](https://github.com/inspect-js/object-inspect/commit/4ec8893ea9bfd28065ca3638cf6762424bf44352) -- [meta] use `npmignore` to autogenerate an npmignore file [`07f868c`](https://github.com/inspect-js/object-inspect/commit/07f868c10bd25a9d18686528339bb749c211fc9a) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`b05244b`](https://github.com/inspect-js/object-inspect/commit/b05244b4f331e00c43b3151bc498041be77ccc91) -- [Dev Deps] update `@ljharb/eslint-config`, `error-cause`, `es-value-fixtures`, `functions-have-names`, `tape` [`d037398`](https://github.com/inspect-js/object-inspect/commit/d037398dcc5d531532e4c19c4a711ed677f579c1) -- [Fix] properly handle callable regexes in older engines [`848fe48`](https://github.com/inspect-js/object-inspect/commit/848fe48bd6dd0064ba781ee6f3c5e54a94144c37) - -## [v1.12.0](https://github.com/inspect-js/object-inspect/compare/v1.11.1...v1.12.0) - 2021-12-18 - -### Commits - -- [New] add `numericSeparator` boolean option [`2d2d537`](https://github.com/inspect-js/object-inspect/commit/2d2d537f5359a4300ce1c10241369f8024f89e11) -- [Robustness] cache more prototype methods [`191533d`](https://github.com/inspect-js/object-inspect/commit/191533da8aec98a05eadd73a5a6e979c9c8653e8) -- [New] ensure an Error’s `cause` is displayed [`53bc2ce`](https://github.com/inspect-js/object-inspect/commit/53bc2cee4e5a9cc4986f3cafa22c0685f340715e) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`bc164b6`](https://github.com/inspect-js/object-inspect/commit/bc164b6e2e7d36b263970f16f54de63048b84a36) -- [Robustness] cache `RegExp.prototype.test` [`a314ab8`](https://github.com/inspect-js/object-inspect/commit/a314ab8271b905cbabc594c82914d2485a8daf12) -- [meta] fix auto-changelog settings [`5ed0983`](https://github.com/inspect-js/object-inspect/commit/5ed0983be72f73e32e2559997517a95525c7e20d) - -## [v1.11.1](https://github.com/inspect-js/object-inspect/compare/v1.11.0...v1.11.1) - 2021-12-05 - -### Commits - -- [meta] add `auto-changelog` [`7dbdd22`](https://github.com/inspect-js/object-inspect/commit/7dbdd228401d6025d8b7391476d88aee9ea9bbdf) -- [actions] reuse common workflows [`c8823bc`](https://github.com/inspect-js/object-inspect/commit/c8823bc0a8790729680709d45fb6e652432e91aa) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`7532b12`](https://github.com/inspect-js/object-inspect/commit/7532b120598307497b712890f75af8056f6d37a6) -- [Refactor] use `has-tostringtag` to behave correctly in the presence of symbol shams [`94abb5d`](https://github.com/inspect-js/object-inspect/commit/94abb5d4e745bf33253942dea86b3e538d2ff6c6) -- [actions] update codecov uploader [`5ed5102`](https://github.com/inspect-js/object-inspect/commit/5ed51025267a00e53b1341357315490ac4eb0874) -- [Dev Deps] update `eslint`, `tape` [`37b2ad2`](https://github.com/inspect-js/object-inspect/commit/37b2ad26c08d94bfd01d5d07069a0b28ef4e2ad7) -- [meta] add `sideEffects` flag [`d341f90`](https://github.com/inspect-js/object-inspect/commit/d341f905ef8bffa6a694cda6ddc5ba343532cd4f) - -## [v1.11.0](https://github.com/inspect-js/object-inspect/compare/v1.10.3...v1.11.0) - 2021-07-12 - -### Commits - -- [New] `customInspect`: add `symbol` option, to mimic modern util.inspect behavior [`e973a6e`](https://github.com/inspect-js/object-inspect/commit/e973a6e21f8140c5837cf25e9d89bdde88dc3120) -- [Dev Deps] update `eslint` [`05f1cb3`](https://github.com/inspect-js/object-inspect/commit/05f1cb3cbcfe1f238e8b51cf9bc294305b7ed793) - -## [v1.10.3](https://github.com/inspect-js/object-inspect/compare/v1.10.2...v1.10.3) - 2021-05-07 - -### Commits - -- [Fix] handle core-js Symbol shams [`4acfc2c`](https://github.com/inspect-js/object-inspect/commit/4acfc2c4b503498759120eb517abad6d51c9c5d6) -- [readme] update badges [`95c323a`](https://github.com/inspect-js/object-inspect/commit/95c323ad909d6cbabb95dd6015c190ba6db9c1f2) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud` [`cb38f48`](https://github.com/inspect-js/object-inspect/commit/cb38f485de6ec7a95109b5a9bbd0a1deba2f6611) - -## [v1.10.2](https://github.com/inspect-js/object-inspect/compare/v1.10.1...v1.10.2) - 2021-04-17 - -### Commits - -- [Fix] use a robust check for a boxed Symbol [`87f12d6`](https://github.com/inspect-js/object-inspect/commit/87f12d6e69ce530be04659c81a4cd502943acac5) - -## [v1.10.1](https://github.com/inspect-js/object-inspect/compare/v1.10.0...v1.10.1) - 2021-04-17 - -### Commits - -- [Fix] use a robust check for a boxed bigint [`d5ca829`](https://github.com/inspect-js/object-inspect/commit/d5ca8298b6d2e5c7b9334a5b21b96ed95d225c91) - -## [v1.10.0](https://github.com/inspect-js/object-inspect/compare/v1.9.0...v1.10.0) - 2021-04-17 - -### Commits - -- [Tests] increase coverage [`d8abb8a`](https://github.com/inspect-js/object-inspect/commit/d8abb8a62c2f084919df994a433b346e0d87a227) -- [actions] use `node/install` instead of `node/run`; use `codecov` action [`4bfec2e`](https://github.com/inspect-js/object-inspect/commit/4bfec2e30aaef6ddef6cbb1448306f9f8b9520b7) -- [New] respect `Symbol.toStringTag` on objects [`799b58f`](https://github.com/inspect-js/object-inspect/commit/799b58f536a45e4484633a8e9daeb0330835f175) -- [Fix] do not allow Symbol.toStringTag to masquerade as builtins [`d6c5b37`](https://github.com/inspect-js/object-inspect/commit/d6c5b37d7e94427796b82432fb0c8964f033a6ab) -- [New] add `WeakRef` support [`b6d898e`](https://github.com/inspect-js/object-inspect/commit/b6d898ee21868c780a7ee66b28532b5b34ed7f09) -- [meta] do not publish github action workflow files [`918cdfc`](https://github.com/inspect-js/object-inspect/commit/918cdfc4b6fe83f559ff6ef04fe66201e3ff5cbd) -- [meta] create `FUNDING.yml` [`0bb5fc5`](https://github.com/inspect-js/object-inspect/commit/0bb5fc516dbcd2cd728bd89cee0b580acc5ce301) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`22c8dc0`](https://github.com/inspect-js/object-inspect/commit/22c8dc0cac113d70f4781e49a950070923a671be) -- [meta] use `prepublishOnly` script for npm 7+ [`e52ee09`](https://github.com/inspect-js/object-inspect/commit/e52ee09e8050b8dbac94ef57f786675567728223) -- [Dev Deps] update `eslint` [`7c4e6fd`](https://github.com/inspect-js/object-inspect/commit/7c4e6fdedcd27cc980e13c9ad834d05a96f3d40c) - -## [v1.9.0](https://github.com/inspect-js/object-inspect/compare/v1.8.0...v1.9.0) - 2020-11-30 - -### Commits - -- [Tests] migrate tests to Github Actions [`d262251`](https://github.com/inspect-js/object-inspect/commit/d262251e13e16d3490b5473672f6b6d6ff86675d) -- [New] add enumerable own Symbols to plain object output [`ee60c03`](https://github.com/inspect-js/object-inspect/commit/ee60c033088cff9d33baa71e59a362a541b48284) -- [Tests] add passing tests [`01ac3e4`](https://github.com/inspect-js/object-inspect/commit/01ac3e4b5a30f97875a63dc9b1416b3bd626afc9) -- [actions] add "Require Allow Edits" action [`c2d7746`](https://github.com/inspect-js/object-inspect/commit/c2d774680cde4ca4af332d84d4121b26f798ba9e) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `core-js` [`70058de`](https://github.com/inspect-js/object-inspect/commit/70058de1579fc54d1d15ed6c2dbe246637ce70ff) -- [Fix] hex characters in strings should be uppercased, to match node `assert` [`6ab8faa`](https://github.com/inspect-js/object-inspect/commit/6ab8faaa0abc08fe7a8e2afd8b39c6f1f0e00113) -- [Tests] run `nyc` on all tests [`4c47372`](https://github.com/inspect-js/object-inspect/commit/4c473727879ddc8e28b599202551ddaaf07b6210) -- [Tests] node 0.8 has an unpredictable property order; fix `groups` test by removing property [`f192069`](https://github.com/inspect-js/object-inspect/commit/f192069a978a3b60e6f0e0d45ac7df260ab9a778) -- [New] add enumerable properties to Function inspect result, per node’s `assert` [`fd38e1b`](https://github.com/inspect-js/object-inspect/commit/fd38e1bc3e2a1dc82091ce3e021917462eee64fc) -- [Tests] fix tests for node < 10, due to regex match `groups` [`2ac6462`](https://github.com/inspect-js/object-inspect/commit/2ac6462cc4f72eaa0b63a8cfee9aabe3008b2330) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`44b59e2`](https://github.com/inspect-js/object-inspect/commit/44b59e2676a7f825ef530dfd19dafb599e3b9456) -- [Robustness] cache `Symbol.prototype.toString` [`f3c2074`](https://github.com/inspect-js/object-inspect/commit/f3c2074d8f32faf8292587c07c9678ea931703dd) -- [Dev Deps] update `eslint` [`9411294`](https://github.com/inspect-js/object-inspect/commit/94112944b9245e3302e25453277876402d207e7f) -- [meta] `require-allow-edits` no longer requires an explicit github token [`36c0220`](https://github.com/inspect-js/object-inspect/commit/36c02205de3c2b0e84d53777c5c9fd54a36c48ab) -- [actions] update rebase checkout action to v2 [`55a39a6`](https://github.com/inspect-js/object-inspect/commit/55a39a64e944f19c6a7d8efddf3df27700f20d14) -- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`f59fd3c`](https://github.com/inspect-js/object-inspect/commit/f59fd3cf406c3a7c7ece140904a80bbc6bacfcca) -- [Dev Deps] update `eslint` [`a492bec`](https://github.com/inspect-js/object-inspect/commit/a492becec644b0155c9c4bc1caf6f9fac11fb2c7) - -## [v1.8.0](https://github.com/inspect-js/object-inspect/compare/v1.7.0...v1.8.0) - 2020-06-18 - -### Fixed - -- [New] add `indent` option [`#27`](https://github.com/inspect-js/object-inspect/issues/27) - -### Commits - -- [Tests] add codecov [`4324cbb`](https://github.com/inspect-js/object-inspect/commit/4324cbb1a2bd7710822a4151ff373570db22453e) -- [New] add `maxStringLength` option [`b3995cb`](https://github.com/inspect-js/object-inspect/commit/b3995cb71e15b5ee127a3094c43994df9d973502) -- [New] add `customInspect` option, to disable custom inspect methods [`28b9179`](https://github.com/inspect-js/object-inspect/commit/28b9179ee802bb3b90810100c11637db90c2fb6d) -- [Tests] add Date and RegExp tests [`3b28eca`](https://github.com/inspect-js/object-inspect/commit/3b28eca57b0367aeadffac604ea09e8bdae7d97b) -- [actions] add automatic rebasing / merge commit blocking [`0d9c6c0`](https://github.com/inspect-js/object-inspect/commit/0d9c6c044e83475ff0bfffb9d35b149834c83a2e) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `tape`; add `aud` [`7c204f2`](https://github.com/inspect-js/object-inspect/commit/7c204f22b9e41bc97147f4d32d4cb045b17769a6) -- [readme] fix repo URLs, remove testling [`34ca9a0`](https://github.com/inspect-js/object-inspect/commit/34ca9a0dabfe75bd311f806a326fadad029909a3) -- [Fix] when truncating a deep array, note it as `[Array]` instead of just `[Object]` [`f74c82d`](https://github.com/inspect-js/object-inspect/commit/f74c82dd0b35386445510deb250f34c41be3ec0e) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`1a8a5ea`](https://github.com/inspect-js/object-inspect/commit/1a8a5ea069ea2bee89d77caedad83ffa23d35711) -- [Fix] do not be fooled by a function’s own `toString` method [`7cb5c65`](https://github.com/inspect-js/object-inspect/commit/7cb5c657a976f94715c19c10556a30f15bb7d5d7) -- [patch] indicate explicitly that anon functions are anonymous, to match node [`81ebdd4`](https://github.com/inspect-js/object-inspect/commit/81ebdd4215005144074bbdff3f6bafa01407910a) -- [Dev Deps] loosen the `core-js` dep [`e7472e8`](https://github.com/inspect-js/object-inspect/commit/e7472e8e242117670560bd995830c2a4d12080f5) -- [Dev Deps] update `tape` [`699827e`](https://github.com/inspect-js/object-inspect/commit/699827e6b37258b5203c33c78c009bf4b0e6a66d) -- [meta] add `safe-publish-latest` [`c5d2868`](https://github.com/inspect-js/object-inspect/commit/c5d2868d6eb33c472f37a20f89ceef2787046088) -- [Dev Deps] update `@ljharb/eslint-config` [`9199501`](https://github.com/inspect-js/object-inspect/commit/919950195d486114ccebacbdf9d74d7f382693b0) - -## [v1.7.0](https://github.com/inspect-js/object-inspect/compare/v1.6.0...v1.7.0) - 2019-11-10 - -### Commits - -- [Tests] use shared travis-ci configs [`19899ed`](https://github.com/inspect-js/object-inspect/commit/19899edbf31f4f8809acf745ce34ad1ce1bfa63b) -- [Tests] add linting [`a00f057`](https://github.com/inspect-js/object-inspect/commit/a00f057d917f66ea26dd37769c6b810ec4af97e8) -- [Tests] lint last file [`2698047`](https://github.com/inspect-js/object-inspect/commit/2698047b58af1e2e88061598ef37a75f228dddf6) -- [Tests] up to `node` `v12.7`, `v11.15`, `v10.16`, `v8.16`, `v6.17` [`589e87a`](https://github.com/inspect-js/object-inspect/commit/589e87a99cadcff4b600e6a303418e9d922836e8) -- [New] add support for `WeakMap` and `WeakSet` [`3ddb3e4`](https://github.com/inspect-js/object-inspect/commit/3ddb3e4e0c8287130c61a12e0ed9c104b1549306) -- [meta] clean up license so github can detect it properly [`27527bb`](https://github.com/inspect-js/object-inspect/commit/27527bb801520c9610c68cc3b55d6f20a2bee56d) -- [Tests] cover `util.inspect.custom` [`36d47b9`](https://github.com/inspect-js/object-inspect/commit/36d47b9c59056a57ef2f1491602c726359561800) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `tape` [`b614eaa`](https://github.com/inspect-js/object-inspect/commit/b614eaac901da0e5c69151f534671f990a94cace) -- [Tests] fix coverage thresholds [`7b7b176`](https://github.com/inspect-js/object-inspect/commit/7b7b176e15f8bd6e8b2f261ff5a493c2fe78d9c2) -- [Tests] bigint tests now can run on unflagged node [`063af31`](https://github.com/inspect-js/object-inspect/commit/063af31ce9cd13c202e3b67c07ba06dc9b7c0f81) -- [Refactor] add early bailout to `isMap` and `isSet` checks [`fc51047`](https://github.com/inspect-js/object-inspect/commit/fc5104714a3671d37e225813db79470d6335683b) -- [meta] add `funding` field [`7f9953a`](https://github.com/inspect-js/object-inspect/commit/7f9953a113eec7b064a6393cf9f90ba15f1d131b) -- [Tests] Fix invalid strict-mode syntax with hexadecimal [`a8b5425`](https://github.com/inspect-js/object-inspect/commit/a8b542503b4af1599a275209a1a99f5fdedb1ead) -- [Dev Deps] update `@ljharb/eslint-config` [`98df157`](https://github.com/inspect-js/object-inspect/commit/98df1577314d9188a3fc3f17fdcf2fba697ae1bd) -- add copyright to LICENSE [`bb69fd0`](https://github.com/inspect-js/object-inspect/commit/bb69fd017a062d299e44da1f9b2c7dcd67f621e6) -- [Tests] use `npx aud` in `posttest` [`4838353`](https://github.com/inspect-js/object-inspect/commit/4838353593974cf7f905b9ef04c03c094f0cdbe2) -- [Tests] move `0.6` to allowed failures, because it won‘t build on travis [`1bff32a`](https://github.com/inspect-js/object-inspect/commit/1bff32aa52e8aea687f0856b28ba754b3e43ebf7) - -## [v1.6.0](https://github.com/inspect-js/object-inspect/compare/v1.5.0...v1.6.0) - 2018-05-02 - -### Commits - -- [New] add support for boxed BigInt primitives [`356c66a`](https://github.com/inspect-js/object-inspect/commit/356c66a410e7aece7162c8319880a5ef647beaa9) -- [Tests] up to `node` `v10.0`, `v9.11`, `v8.11`, `v6.14`, `v4.9` [`c77b65b`](https://github.com/inspect-js/object-inspect/commit/c77b65bba593811b906b9ec57561c5cba92e2db3) -- [New] Add support for upcoming `BigInt` [`1ac548e`](https://github.com/inspect-js/object-inspect/commit/1ac548e4b27e26466c28c9a5e63e5d4e0591c31f) -- [Tests] run bigint tests in CI with --harmony-bigint flag [`d31b738`](https://github.com/inspect-js/object-inspect/commit/d31b73831880254b5c6cf5691cda9a149fbc5f04) -- [Dev Deps] update `core-js`, `tape` [`ff9eff6`](https://github.com/inspect-js/object-inspect/commit/ff9eff67113341ee1aaf80c1c22d683f43bfbccf) -- [Docs] fix example to use `safer-buffer` [`48cae12`](https://github.com/inspect-js/object-inspect/commit/48cae12a73ec6cacc955175bc56bbe6aee6a211f) - -## [v1.5.0](https://github.com/inspect-js/object-inspect/compare/v1.4.1...v1.5.0) - 2017-12-25 - -### Commits - -- [New] add `quoteStyle` option [`f5a72d2`](https://github.com/inspect-js/object-inspect/commit/f5a72d26edb3959b048f74c056ca7100a6b091e4) -- [Tests] add more test coverage [`30ebe4e`](https://github.com/inspect-js/object-inspect/commit/30ebe4e1fa943b99ecbb85be7614256d536e2759) -- [Tests] require 0.6 to pass [`99a008c`](https://github.com/inspect-js/object-inspect/commit/99a008ccace189a60fd7da18bf00e32c9572b980) - -## [v1.4.1](https://github.com/inspect-js/object-inspect/compare/v1.4.0...v1.4.1) - 2017-12-19 - -### Commits - -- [Tests] up to `node` `v9.3`, `v8.9`, `v6.12` [`6674476`](https://github.com/inspect-js/object-inspect/commit/6674476cc56acaac1bde96c84fed5ef631911906) -- [Fix] `inspect(Object(-0))` should be “Object(-0)”, not “Object(0)” [`d0a031f`](https://github.com/inspect-js/object-inspect/commit/d0a031f1cbb3024ee9982bfe364dd18a7e4d1bd3) - -## [v1.4.0](https://github.com/inspect-js/object-inspect/compare/v1.3.0...v1.4.0) - 2017-10-24 - -### Commits - -- [Tests] add `npm run coverage` [`3b48fb2`](https://github.com/inspect-js/object-inspect/commit/3b48fb25db037235eeb808f0b2830aad7aa36f70) -- [Tests] remove commented-out osx builds [`71e24db`](https://github.com/inspect-js/object-inspect/commit/71e24db8ad6ee3b9b381c5300b0475f2ba595a73) -- [New] add support for `util.inspect.custom`, in node only. [`20cca77`](https://github.com/inspect-js/object-inspect/commit/20cca7762d7e17f15b21a90793dff84acce155df) -- [Tests] up to `node` `v8.6`; use `nvm install-latest-npm` to ensure new npm doesn’t break old node [`252952d`](https://github.com/inspect-js/object-inspect/commit/252952d230d8065851dd3d4d5fe8398aae068529) -- [Tests] up to `node` `v8.8` [`4aa868d`](https://github.com/inspect-js/object-inspect/commit/4aa868d3a62914091d489dd6ec6eed194ee67cd3) -- [Dev Deps] update `core-js`, `tape` [`59483d1`](https://github.com/inspect-js/object-inspect/commit/59483d1df418f852f51fa0db7b24aa6b0209a27a) - -## [v1.3.0](https://github.com/inspect-js/object-inspect/compare/v1.2.2...v1.3.0) - 2017-07-31 - -### Fixed - -- [Fix] Map/Set: work around core-js bug < v2.5.0 [`#9`](https://github.com/inspect-js/object-inspect/issues/9) - -### Commits - -- [New] add support for arrays with additional object keys [`0d19937`](https://github.com/inspect-js/object-inspect/commit/0d199374ee37959e51539616666f420ccb29acb9) -- [Tests] up to `node` `v8.2`, `v7.10`, `v6.11`; fix new npm breaking on older nodes [`e24784a`](https://github.com/inspect-js/object-inspect/commit/e24784a90c49117787157a12a63897c49cf89bbb) -- Only apps should have lockfiles [`c6faebc`](https://github.com/inspect-js/object-inspect/commit/c6faebcb2ee486a889a4a1c4d78c0776c7576185) -- [Dev Deps] update `tape` [`7345a0a`](https://github.com/inspect-js/object-inspect/commit/7345a0aeba7e91b888a079c10004d17696a7f586) - -## [v1.2.2](https://github.com/inspect-js/object-inspect/compare/v1.2.1...v1.2.2) - 2017-03-24 - -### Commits - -- [Tests] up to `node` `v7.7`, `v6.10`, `v4.8`; improve test matrix [`a2ddc15`](https://github.com/inspect-js/object-inspect/commit/a2ddc15a1f2c65af18076eea1c0eb9cbceb478a0) -- [Tests] up to `node` `v7.0`, `v6.9`, `v5.12`, `v4.6`, `io.js` `v3.3`; improve test matrix [`a48949f`](https://github.com/inspect-js/object-inspect/commit/a48949f6b574b2d4d2298109d8e8d0eb3e7a83e7) -- [Performance] check for primitive types as early as possible. [`3b8092a`](https://github.com/inspect-js/object-inspect/commit/3b8092a2a4deffd0575f94334f00194e2d48dad3) -- [Refactor] remove unneeded `else`s. [`7255034`](https://github.com/inspect-js/object-inspect/commit/725503402e08de4f96f6bf2d8edef44ac36f26b6) -- [Refactor] avoid recreating `lowbyte` function every time. [`81edd34`](https://github.com/inspect-js/object-inspect/commit/81edd3475bd15bdd18e84de7472033dcf5004aaa) -- [Fix] differentiate -0 from 0 [`521d345`](https://github.com/inspect-js/object-inspect/commit/521d3456b009da7bf1c5785c8a9df5a9f8718264) -- [Refactor] move object key gathering into separate function [`aca6265`](https://github.com/inspect-js/object-inspect/commit/aca626536eaeef697196c6e9db3e90e7e0355b6a) -- [Refactor] consolidate wrapping logic for boxed primitives into a function. [`4e440cd`](https://github.com/inspect-js/object-inspect/commit/4e440cd9065df04802a2a1dead03f48c353ca301) -- [Robustness] use `typeof` instead of comparing to literal `undefined` [`5ca6f60`](https://github.com/inspect-js/object-inspect/commit/5ca6f601937506daff8ed2fcf686363b55807b69) -- [Refactor] consolidate Map/Set notations. [`4e576e5`](https://github.com/inspect-js/object-inspect/commit/4e576e5d7ed2f9ec3fb7f37a0d16732eb10758a9) -- [Tests] ensure that this function remains anonymous, despite ES6 name inference. [`7540ae5`](https://github.com/inspect-js/object-inspect/commit/7540ae591278756db614fa4def55ca413150e1a3) -- [Refactor] explicitly coerce Error objects to strings. [`7f4ca84`](https://github.com/inspect-js/object-inspect/commit/7f4ca8424ee8dc2c0ca5a422d94f7fac40327261) -- [Refactor] split up `var` declarations for debuggability [`6f2c11e`](https://github.com/inspect-js/object-inspect/commit/6f2c11e6a85418586a00292dcec5e97683f89bc3) -- [Robustness] cache `Object.prototype.toString` [`df44a20`](https://github.com/inspect-js/object-inspect/commit/df44a20adfccf31529d60d1df2079bfc3c836e27) -- [Dev Deps] update `tape` [`3ec714e`](https://github.com/inspect-js/object-inspect/commit/3ec714eba57bc3f58a6eb4fca1376f49e70d300a) -- [Dev Deps] update `tape` [`beb72d9`](https://github.com/inspect-js/object-inspect/commit/beb72d969653747d7cde300393c28755375329b0) - -## [v1.2.1](https://github.com/inspect-js/object-inspect/compare/v1.2.0...v1.2.1) - 2016-04-09 - -### Fixed - -- [Fix] fix Boolean `false` object inspection. [`#7`](https://github.com/substack/object-inspect/pull/7) - -## [v1.2.0](https://github.com/inspect-js/object-inspect/compare/v1.1.0...v1.2.0) - 2016-04-09 - -### Fixed - -- [New] add support for inspecting String/Number/Boolean objects. [`#6`](https://github.com/inspect-js/object-inspect/issues/6) - -### Commits - -- [Dev Deps] update `tape` [`742caa2`](https://github.com/inspect-js/object-inspect/commit/742caa262cf7af4c815d4821c8bd0129c1446432) - -## [v1.1.0](https://github.com/inspect-js/object-inspect/compare/1.0.2...v1.1.0) - 2015-12-14 - -### Merged - -- [New] add ES6 Map/Set support. [`#4`](https://github.com/inspect-js/object-inspect/pull/4) - -### Fixed - -- [New] add ES6 Map/Set support. [`#3`](https://github.com/inspect-js/object-inspect/issues/3) - -### Commits - -- Update `travis.yml` to test on bunches of `iojs` and `node` versions. [`4c1fd65`](https://github.com/inspect-js/object-inspect/commit/4c1fd65cc3bd95307e854d114b90478324287fd2) -- [Dev Deps] update `tape` [`88a907e`](https://github.com/inspect-js/object-inspect/commit/88a907e33afbe408e4b5d6e4e42a33143f88848c) - -## [1.0.2](https://github.com/inspect-js/object-inspect/compare/1.0.1...1.0.2) - 2015-08-07 - -### Commits - -- [Fix] Cache `Object.prototype.hasOwnProperty` in case it's deleted later. [`1d0075d`](https://github.com/inspect-js/object-inspect/commit/1d0075d3091dc82246feeb1f9871cb2b8ed227b3) -- [Dev Deps] Update `tape` [`ca8d5d7`](https://github.com/inspect-js/object-inspect/commit/ca8d5d75635ddbf76f944e628267581e04958457) -- gitignore node_modules since this is a reusable modules. [`ed41407`](https://github.com/inspect-js/object-inspect/commit/ed41407811743ca530cdeb28f982beb96026af82) - -## [1.0.1](https://github.com/inspect-js/object-inspect/compare/1.0.0...1.0.1) - 2015-07-19 - -### Commits - -- Make `inspect` work with symbol primitives and objects, including in node 0.11 and 0.12. [`ddf1b94`](https://github.com/inspect-js/object-inspect/commit/ddf1b94475ab951f1e3bccdc0a48e9073cfbfef4) -- bump tape [`103d674`](https://github.com/inspect-js/object-inspect/commit/103d67496b504bdcfdd765d303a773f87ec106e2) -- use newer travis config [`d497276`](https://github.com/inspect-js/object-inspect/commit/d497276c1da14234bb5098a59cf20de75fbc316a) - -## [1.0.0](https://github.com/inspect-js/object-inspect/compare/0.4.0...1.0.0) - 2014-08-05 - -### Commits - -- error inspect works properly [`260a22d`](https://github.com/inspect-js/object-inspect/commit/260a22d134d3a8a482c67d52091c6040c34f4299) -- seen coverage [`57269e8`](https://github.com/inspect-js/object-inspect/commit/57269e8baa992a7439047f47325111fdcbcb8417) -- htmlelement instance coverage [`397ffe1`](https://github.com/inspect-js/object-inspect/commit/397ffe10a1980350868043ef9de65686d438979f) -- more element coverage [`6905cc2`](https://github.com/inspect-js/object-inspect/commit/6905cc2f7df35600177e613b0642b4df5efd3eca) -- failing test for type errors [`385b615`](https://github.com/inspect-js/object-inspect/commit/385b6152e49b51b68449a662f410b084ed7c601a) -- fn name coverage [`edc906d`](https://github.com/inspect-js/object-inspect/commit/edc906d40fca6b9194d304062c037ee8e398c4c2) -- server-side element test [`362d1d3`](https://github.com/inspect-js/object-inspect/commit/362d1d3e86f187651c29feeb8478110afada385b) -- custom inspect fn [`e89b0f6`](https://github.com/inspect-js/object-inspect/commit/e89b0f6fe6d5e03681282af83732a509160435a6) -- fixed browser test [`b530882`](https://github.com/inspect-js/object-inspect/commit/b5308824a1c8471c5617e394766a03a6977102a9) -- depth test, matches node [`1cfd9e0`](https://github.com/inspect-js/object-inspect/commit/1cfd9e0285a4ae1dff44101ad482915d9bf47e48) -- exercise hasOwnProperty path [`8d753fb`](https://github.com/inspect-js/object-inspect/commit/8d753fb362a534fa1106e4d80f2ee9bea06a66d9) -- more cases covered for errors [`c5c46a5`](https://github.com/inspect-js/object-inspect/commit/c5c46a569ec4606583497e8550f0d8c7ad39a4a4) -- \W obj key test case [`b0eceee`](https://github.com/inspect-js/object-inspect/commit/b0eceeea6e0eb94d686c1046e99b9e25e5005f75) -- coverage for explicit depth param [`e12b91c`](https://github.com/inspect-js/object-inspect/commit/e12b91cd59683362f3a0e80f46481a0211e26c15) - -## [0.4.0](https://github.com/inspect-js/object-inspect/compare/0.3.1...0.4.0) - 2014-03-21 - -### Commits - -- passing lowbyte interpolation test [`b847511`](https://github.com/inspect-js/object-inspect/commit/b8475114f5def7e7961c5353d48d3d8d9a520985) -- lowbyte test [`4a2b0e1`](https://github.com/inspect-js/object-inspect/commit/4a2b0e142667fc933f195472759385ac08f3946c) - -## [0.3.1](https://github.com/inspect-js/object-inspect/compare/0.3.0...0.3.1) - 2014-03-04 - -### Commits - -- sort keys [`a07b19c`](https://github.com/inspect-js/object-inspect/commit/a07b19cc3b1521a82d4fafb6368b7a9775428a05) - -## [0.3.0](https://github.com/inspect-js/object-inspect/compare/0.2.0...0.3.0) - 2014-03-04 - -### Commits - -- [] and {} instead of [ ] and { } [`654c44b`](https://github.com/inspect-js/object-inspect/commit/654c44b2865811f3519e57bb8526e0821caf5c6b) - -## [0.2.0](https://github.com/inspect-js/object-inspect/compare/0.1.3...0.2.0) - 2014-03-04 - -### Commits - -- failing holes test [`99cdfad`](https://github.com/inspect-js/object-inspect/commit/99cdfad03c6474740275a75636fe6ca86c77737a) -- regex already work [`e324033`](https://github.com/inspect-js/object-inspect/commit/e324033267025995ec97d32ed0a65737c99477a6) -- failing undef/null test [`1f88a00`](https://github.com/inspect-js/object-inspect/commit/1f88a00265d3209719dda8117b7e6360b4c20943) -- holes in the all example [`7d345f3`](https://github.com/inspect-js/object-inspect/commit/7d345f3676dcbe980cff89a4f6c243269ebbb709) -- check for .inspect(), fixes Buffer use-case [`c3f7546`](https://github.com/inspect-js/object-inspect/commit/c3f75466dbca125347d49847c05262c292f12b79) -- fixes for holes [`ce25f73`](https://github.com/inspect-js/object-inspect/commit/ce25f736683de4b92ff27dc5471218415e2d78d8) -- weird null behavior [`405c1ea`](https://github.com/inspect-js/object-inspect/commit/405c1ea72cd5a8cf3b498c3eaa903d01b9fbcab5) -- tape is actually a devDependency, upgrade [`703b0ce`](https://github.com/inspect-js/object-inspect/commit/703b0ce6c5817b4245a082564bccd877e0bb6990) -- put date in the example [`a342219`](https://github.com/inspect-js/object-inspect/commit/a3422190eeaa013215f46df2d0d37b48595ac058) -- passing the null test [`4ab737e`](https://github.com/inspect-js/object-inspect/commit/4ab737ebf862a75d247ebe51e79307a34d6380d4) - -## [0.1.3](https://github.com/inspect-js/object-inspect/compare/0.1.1...0.1.3) - 2013-07-26 - -### Commits - -- special isElement() check [`882768a`](https://github.com/inspect-js/object-inspect/commit/882768a54035d30747be9de1baf14e5aa0daa128) -- oh right old IEs don't have indexOf either [`36d1275`](https://github.com/inspect-js/object-inspect/commit/36d12756c38b08a74370b0bb696c809e529913a5) - -## [0.1.1](https://github.com/inspect-js/object-inspect/compare/0.1.0...0.1.1) - 2013-07-26 - -### Commits - -- tests! [`4422fd9`](https://github.com/inspect-js/object-inspect/commit/4422fd95532c2745aa6c4f786f35f1090be29998) -- fix for ie<9, doesn't have hasOwnProperty [`6b7d611`](https://github.com/inspect-js/object-inspect/commit/6b7d61183050f6da801ea04473211da226482613) -- fix for all IEs: no f.name [`4e0c2f6`](https://github.com/inspect-js/object-inspect/commit/4e0c2f6dfd01c306d067d7163319acc97c94ee50) -- badges [`5ed0d88`](https://github.com/inspect-js/object-inspect/commit/5ed0d88e4e407f9cb327fa4a146c17921f9680f3) - -## [0.1.0](https://github.com/inspect-js/object-inspect/compare/0.0.0...0.1.0) - 2013-07-26 - -### Commits - -- [Function] for functions [`ad5c485`](https://github.com/inspect-js/object-inspect/commit/ad5c485098fc83352cb540a60b2548ca56820e0b) - -## 0.0.0 - 2013-07-26 - -### Commits - -- working browser example [`34be6b6`](https://github.com/inspect-js/object-inspect/commit/34be6b6548f9ce92bdc3c27572857ba0c4a1218d) -- package.json etc [`cad51f2`](https://github.com/inspect-js/object-inspect/commit/cad51f23fc6bcf1a456ed6abe16088256c2f632f) -- docs complete [`b80cce2`](https://github.com/inspect-js/object-inspect/commit/b80cce2490c4e7183a9ee11ea89071f0abec4446) -- circular example [`4b4a7b9`](https://github.com/inspect-js/object-inspect/commit/4b4a7b92209e4e6b4630976cb6bcd17d14165a59) -- string rep [`7afb479`](https://github.com/inspect-js/object-inspect/commit/7afb479baa798d27f09e0a178b72ea327f60f5c8) diff --git a/node_modules/object-inspect/LICENSE b/node_modules/object-inspect/LICENSE deleted file mode 100644 index ca64cc1..0000000 --- a/node_modules/object-inspect/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2013 James Halliday - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/object-inspect/example/all.js b/node_modules/object-inspect/example/all.js deleted file mode 100644 index 2f3355c..0000000 --- a/node_modules/object-inspect/example/all.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -var inspect = require('../'); -var Buffer = require('safer-buffer').Buffer; - -var holes = ['a', 'b']; -holes[4] = 'e'; -holes[6] = 'g'; - -var obj = { - a: 1, - b: [3, 4, undefined, null], - c: undefined, - d: null, - e: { - regex: /^x/i, - buf: Buffer.from('abc'), - holes: holes - }, - now: new Date() -}; -obj.self = obj; -console.log(inspect(obj)); diff --git a/node_modules/object-inspect/example/circular.js b/node_modules/object-inspect/example/circular.js deleted file mode 100644 index 487a7c1..0000000 --- a/node_modules/object-inspect/example/circular.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; - -var inspect = require('../'); -var obj = { a: 1, b: [3, 4] }; -obj.c = obj; -console.log(inspect(obj)); diff --git a/node_modules/object-inspect/example/fn.js b/node_modules/object-inspect/example/fn.js deleted file mode 100644 index 9b5db8d..0000000 --- a/node_modules/object-inspect/example/fn.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -var inspect = require('../'); -var obj = [1, 2, function f(n) { return n + 5; }, 4]; -console.log(inspect(obj)); diff --git a/node_modules/object-inspect/example/inspect.js b/node_modules/object-inspect/example/inspect.js deleted file mode 100644 index e2df7c9..0000000 --- a/node_modules/object-inspect/example/inspect.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -/* eslint-env browser */ -var inspect = require('../'); - -var d = document.createElement('div'); -d.setAttribute('id', 'beep'); -d.innerHTML = 'woooiiiii'; - -console.log(inspect([d, { a: 3, b: 4, c: [5, 6, [7, [8, [9]]]] }])); diff --git a/node_modules/object-inspect/index.js b/node_modules/object-inspect/index.js deleted file mode 100644 index a4b2d4c..0000000 --- a/node_modules/object-inspect/index.js +++ /dev/null @@ -1,544 +0,0 @@ -var hasMap = typeof Map === 'function' && Map.prototype; -var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null; -var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null; -var mapForEach = hasMap && Map.prototype.forEach; -var hasSet = typeof Set === 'function' && Set.prototype; -var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null; -var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null; -var setForEach = hasSet && Set.prototype.forEach; -var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype; -var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; -var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype; -var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; -var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype; -var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; -var booleanValueOf = Boolean.prototype.valueOf; -var objectToString = Object.prototype.toString; -var functionToString = Function.prototype.toString; -var $match = String.prototype.match; -var $slice = String.prototype.slice; -var $replace = String.prototype.replace; -var $toUpperCase = String.prototype.toUpperCase; -var $toLowerCase = String.prototype.toLowerCase; -var $test = RegExp.prototype.test; -var $concat = Array.prototype.concat; -var $join = Array.prototype.join; -var $arrSlice = Array.prototype.slice; -var $floor = Math.floor; -var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null; -var gOPS = Object.getOwnPropertySymbols; -var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null; -var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object'; -// ie, `has-tostringtag/shams -var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol') - ? Symbol.toStringTag - : null; -var isEnumerable = Object.prototype.propertyIsEnumerable; - -var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ( - [].__proto__ === Array.prototype // eslint-disable-line no-proto - ? function (O) { - return O.__proto__; // eslint-disable-line no-proto - } - : null -); - -function addNumericSeparator(num, str) { - if ( - num === Infinity - || num === -Infinity - || num !== num - || (num && num > -1000 && num < 1000) - || $test.call(/e/, str) - ) { - return str; - } - var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; - if (typeof num === 'number') { - var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num) - if (int !== num) { - var intStr = String(int); - var dec = $slice.call(str, intStr.length + 1); - return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, ''); - } - } - return $replace.call(str, sepRegex, '$&_'); -} - -var utilInspect = require('./util.inspect'); -var inspectCustom = utilInspect.custom; -var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; - -var quotes = { - __proto__: null, - 'double': '"', - single: "'" -}; -var quoteREs = { - __proto__: null, - 'double': /(["\\])/g, - single: /(['\\])/g -}; - -module.exports = function inspect_(obj, options, depth, seen) { - var opts = options || {}; - - if (has(opts, 'quoteStyle') && !has(quotes, opts.quoteStyle)) { - throw new TypeError('option "quoteStyle" must be "single" or "double"'); - } - if ( - has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' - ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity - : opts.maxStringLength !== null - ) - ) { - throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); - } - var customInspect = has(opts, 'customInspect') ? opts.customInspect : true; - if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') { - throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`'); - } - - if ( - has(opts, 'indent') - && opts.indent !== null - && opts.indent !== '\t' - && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0) - ) { - throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); - } - if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') { - throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); - } - var numericSeparator = opts.numericSeparator; - - if (typeof obj === 'undefined') { - return 'undefined'; - } - if (obj === null) { - return 'null'; - } - if (typeof obj === 'boolean') { - return obj ? 'true' : 'false'; - } - - if (typeof obj === 'string') { - return inspectString(obj, opts); - } - if (typeof obj === 'number') { - if (obj === 0) { - return Infinity / obj > 0 ? '0' : '-0'; - } - var str = String(obj); - return numericSeparator ? addNumericSeparator(obj, str) : str; - } - if (typeof obj === 'bigint') { - var bigIntStr = String(obj) + 'n'; - return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; - } - - var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth; - if (typeof depth === 'undefined') { depth = 0; } - if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') { - return isArray(obj) ? '[Array]' : '[Object]'; - } - - var indent = getIndent(opts, depth); - - if (typeof seen === 'undefined') { - seen = []; - } else if (indexOf(seen, obj) >= 0) { - return '[Circular]'; - } - - function inspect(value, from, noIndent) { - if (from) { - seen = $arrSlice.call(seen); - seen.push(from); - } - if (noIndent) { - var newOpts = { - depth: opts.depth - }; - if (has(opts, 'quoteStyle')) { - newOpts.quoteStyle = opts.quoteStyle; - } - return inspect_(value, newOpts, depth + 1, seen); - } - return inspect_(value, opts, depth + 1, seen); - } - - if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable - var name = nameOf(obj); - var keys = arrObjKeys(obj, inspect); - return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : ''); - } - if (isSymbol(obj)) { - var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj); - return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString; - } - if (isElement(obj)) { - var s = '<' + $toLowerCase.call(String(obj.nodeName)); - var attrs = obj.attributes || []; - for (var i = 0; i < attrs.length; i++) { - s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts); - } - s += '>'; - if (obj.childNodes && obj.childNodes.length) { s += '...'; } - s += ''; - return s; - } - if (isArray(obj)) { - if (obj.length === 0) { return '[]'; } - var xs = arrObjKeys(obj, inspect); - if (indent && !singleLineValues(xs)) { - return '[' + indentedJoin(xs, indent) + ']'; - } - return '[ ' + $join.call(xs, ', ') + ' ]'; - } - if (isError(obj)) { - var parts = arrObjKeys(obj, inspect); - if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) { - return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }'; - } - if (parts.length === 0) { return '[' + String(obj) + ']'; } - return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }'; - } - if (typeof obj === 'object' && customInspect) { - if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) { - return utilInspect(obj, { depth: maxDepth - depth }); - } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') { - return obj.inspect(); - } - } - if (isMap(obj)) { - var mapParts = []; - if (mapForEach) { - mapForEach.call(obj, function (value, key) { - mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj)); - }); - } - return collectionOf('Map', mapSize.call(obj), mapParts, indent); - } - if (isSet(obj)) { - var setParts = []; - if (setForEach) { - setForEach.call(obj, function (value) { - setParts.push(inspect(value, obj)); - }); - } - return collectionOf('Set', setSize.call(obj), setParts, indent); - } - if (isWeakMap(obj)) { - return weakCollectionOf('WeakMap'); - } - if (isWeakSet(obj)) { - return weakCollectionOf('WeakSet'); - } - if (isWeakRef(obj)) { - return weakCollectionOf('WeakRef'); - } - if (isNumber(obj)) { - return markBoxed(inspect(Number(obj))); - } - if (isBigInt(obj)) { - return markBoxed(inspect(bigIntValueOf.call(obj))); - } - if (isBoolean(obj)) { - return markBoxed(booleanValueOf.call(obj)); - } - if (isString(obj)) { - return markBoxed(inspect(String(obj))); - } - // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other - /* eslint-env browser */ - if (typeof window !== 'undefined' && obj === window) { - return '{ [object Window] }'; - } - if ( - (typeof globalThis !== 'undefined' && obj === globalThis) - || (typeof global !== 'undefined' && obj === global) - ) { - return '{ [object globalThis] }'; - } - if (!isDate(obj) && !isRegExp(obj)) { - var ys = arrObjKeys(obj, inspect); - var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; - var protoTag = obj instanceof Object ? '' : 'null prototype'; - var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : ''; - var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : ''; - var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : ''); - if (ys.length === 0) { return tag + '{}'; } - if (indent) { - return tag + '{' + indentedJoin(ys, indent) + '}'; - } - return tag + '{ ' + $join.call(ys, ', ') + ' }'; - } - return String(obj); -}; - -function wrapQuotes(s, defaultStyle, opts) { - var style = opts.quoteStyle || defaultStyle; - var quoteChar = quotes[style]; - return quoteChar + s + quoteChar; -} - -function quote(s) { - return $replace.call(String(s), /"/g, '"'); -} - -function canTrustToString(obj) { - return !toStringTag || !(typeof obj === 'object' && (toStringTag in obj || typeof obj[toStringTag] !== 'undefined')); -} -function isArray(obj) { return toStr(obj) === '[object Array]' && canTrustToString(obj); } -function isDate(obj) { return toStr(obj) === '[object Date]' && canTrustToString(obj); } -function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && canTrustToString(obj); } -function isError(obj) { return toStr(obj) === '[object Error]' && canTrustToString(obj); } -function isString(obj) { return toStr(obj) === '[object String]' && canTrustToString(obj); } -function isNumber(obj) { return toStr(obj) === '[object Number]' && canTrustToString(obj); } -function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && canTrustToString(obj); } - -// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives -function isSymbol(obj) { - if (hasShammedSymbols) { - return obj && typeof obj === 'object' && obj instanceof Symbol; - } - if (typeof obj === 'symbol') { - return true; - } - if (!obj || typeof obj !== 'object' || !symToString) { - return false; - } - try { - symToString.call(obj); - return true; - } catch (e) {} - return false; -} - -function isBigInt(obj) { - if (!obj || typeof obj !== 'object' || !bigIntValueOf) { - return false; - } - try { - bigIntValueOf.call(obj); - return true; - } catch (e) {} - return false; -} - -var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; }; -function has(obj, key) { - return hasOwn.call(obj, key); -} - -function toStr(obj) { - return objectToString.call(obj); -} - -function nameOf(f) { - if (f.name) { return f.name; } - var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); - if (m) { return m[1]; } - return null; -} - -function indexOf(xs, x) { - if (xs.indexOf) { return xs.indexOf(x); } - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) { return i; } - } - return -1; -} - -function isMap(x) { - if (!mapSize || !x || typeof x !== 'object') { - return false; - } - try { - mapSize.call(x); - try { - setSize.call(x); - } catch (s) { - return true; - } - return x instanceof Map; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} - -function isWeakMap(x) { - if (!weakMapHas || !x || typeof x !== 'object') { - return false; - } - try { - weakMapHas.call(x, weakMapHas); - try { - weakSetHas.call(x, weakSetHas); - } catch (s) { - return true; - } - return x instanceof WeakMap; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} - -function isWeakRef(x) { - if (!weakRefDeref || !x || typeof x !== 'object') { - return false; - } - try { - weakRefDeref.call(x); - return true; - } catch (e) {} - return false; -} - -function isSet(x) { - if (!setSize || !x || typeof x !== 'object') { - return false; - } - try { - setSize.call(x); - try { - mapSize.call(x); - } catch (m) { - return true; - } - return x instanceof Set; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} - -function isWeakSet(x) { - if (!weakSetHas || !x || typeof x !== 'object') { - return false; - } - try { - weakSetHas.call(x, weakSetHas); - try { - weakMapHas.call(x, weakMapHas); - } catch (s) { - return true; - } - return x instanceof WeakSet; // core-js workaround, pre-v2.5.0 - } catch (e) {} - return false; -} - -function isElement(x) { - if (!x || typeof x !== 'object') { return false; } - if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) { - return true; - } - return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function'; -} - -function inspectString(str, opts) { - if (str.length > opts.maxStringLength) { - var remaining = str.length - opts.maxStringLength; - var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : ''); - return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; - } - var quoteRE = quoteREs[opts.quoteStyle || 'single']; - quoteRE.lastIndex = 0; - // eslint-disable-next-line no-control-regex - var s = $replace.call($replace.call(str, quoteRE, '\\$1'), /[\x00-\x1f]/g, lowbyte); - return wrapQuotes(s, 'single', opts); -} - -function lowbyte(c) { - var n = c.charCodeAt(0); - var x = { - 8: 'b', - 9: 't', - 10: 'n', - 12: 'f', - 13: 'r' - }[n]; - if (x) { return '\\' + x; } - return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16)); -} - -function markBoxed(str) { - return 'Object(' + str + ')'; -} - -function weakCollectionOf(type) { - return type + ' { ? }'; -} - -function collectionOf(type, size, entries, indent) { - var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', '); - return type + ' (' + size + ') {' + joinedEntries + '}'; -} - -function singleLineValues(xs) { - for (var i = 0; i < xs.length; i++) { - if (indexOf(xs[i], '\n') >= 0) { - return false; - } - } - return true; -} - -function getIndent(opts, depth) { - var baseIndent; - if (opts.indent === '\t') { - baseIndent = '\t'; - } else if (typeof opts.indent === 'number' && opts.indent > 0) { - baseIndent = $join.call(Array(opts.indent + 1), ' '); - } else { - return null; - } - return { - base: baseIndent, - prev: $join.call(Array(depth + 1), baseIndent) - }; -} - -function indentedJoin(xs, indent) { - if (xs.length === 0) { return ''; } - var lineJoiner = '\n' + indent.prev + indent.base; - return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev; -} - -function arrObjKeys(obj, inspect) { - var isArr = isArray(obj); - var xs = []; - if (isArr) { - xs.length = obj.length; - for (var i = 0; i < obj.length; i++) { - xs[i] = has(obj, i) ? inspect(obj[i], obj) : ''; - } - } - var syms = typeof gOPS === 'function' ? gOPS(obj) : []; - var symMap; - if (hasShammedSymbols) { - symMap = {}; - for (var k = 0; k < syms.length; k++) { - symMap['$' + syms[k]] = syms[k]; - } - } - - for (var key in obj) { // eslint-disable-line no-restricted-syntax - if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue - if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue - if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) { - // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section - continue; // eslint-disable-line no-restricted-syntax, no-continue - } else if ($test.call(/[^\w$]/, key)) { - xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj)); - } else { - xs.push(key + ': ' + inspect(obj[key], obj)); - } - } - if (typeof gOPS === 'function') { - for (var j = 0; j < syms.length; j++) { - if (isEnumerable.call(obj, syms[j])) { - xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj)); - } - } - } - return xs; -} diff --git a/node_modules/object-inspect/package-support.json b/node_modules/object-inspect/package-support.json deleted file mode 100644 index 5cc12d0..0000000 --- a/node_modules/object-inspect/package-support.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "versions": [ - { - "version": "*", - "target": { - "node": "all" - }, - "response": { - "type": "time-permitting" - }, - "backing": { - "npm-funding": true, - "donations": [ - "https://github.com/ljharb", - "https://tidelift.com/funding/github/npm/object-inspect" - ] - } - } - ] -} diff --git a/node_modules/object-inspect/package.json b/node_modules/object-inspect/package.json deleted file mode 100644 index 9fd97ff..0000000 --- a/node_modules/object-inspect/package.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "name": "object-inspect", - "version": "1.13.4", - "description": "string representations of objects in node and the browser", - "main": "index.js", - "sideEffects": false, - "devDependencies": { - "@ljharb/eslint-config": "^21.1.1", - "@pkgjs/support": "^0.0.6", - "auto-changelog": "^2.5.0", - "core-js": "^2.6.12", - "error-cause": "^1.0.8", - "es-value-fixtures": "^1.7.1", - "eslint": "=8.8.0", - "for-each": "^0.3.4", - "functions-have-names": "^1.2.3", - "glob": "=10.3.7", - "globalthis": "^1.0.4", - "has-symbols": "^1.1.0", - "has-tostringtag": "^1.0.2", - "in-publish": "^2.0.1", - "jackspeak": "=2.1.1", - "make-arrow-function": "^1.2.0", - "mock-property": "^1.1.0", - "npmignore": "^0.3.1", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "safer-buffer": "^2.1.2", - "semver": "^6.3.1", - "string.prototype.repeat": "^1.0.0", - "tape": "^5.9.0" - }, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublish": "not-in-publish || npm run prepublishOnly", - "prepublishOnly": "safe-publish-latest", - "pretest": "npm run lint", - "lint": "eslint --ext=js,mjs .", - "postlint": "npx @pkgjs/support validate", - "test": "npm run tests-only && npm run test:corejs", - "tests-only": "nyc tape 'test/*.js'", - "test:corejs": "nyc tape test-core-js.js 'test/*.js'", - "posttest": "npx npm@'>=10.2' audit --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "testling": { - "files": [ - "test/*.js", - "test/browser/*.js" - ], - "browsers": [ - "ie/6..latest", - "chrome/latest", - "firefox/latest", - "safari/latest", - "opera/latest", - "iphone/latest", - "ipad/latest", - "android/latest" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/inspect-js/object-inspect.git" - }, - "homepage": "https://github.com/inspect-js/object-inspect", - "keywords": [ - "inspect", - "util.inspect", - "object", - "stringify", - "pretty" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "browser": { - "./util.inspect.js": false - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows", - "./test-core-js.js" - ] - }, - "support": true, - "engines": { - "node": ">= 0.4" - } -} diff --git a/node_modules/object-inspect/readme.markdown b/node_modules/object-inspect/readme.markdown deleted file mode 100644 index f91617d..0000000 --- a/node_modules/object-inspect/readme.markdown +++ /dev/null @@ -1,84 +0,0 @@ -# object-inspect [![Version Badge][npm-version-svg]][package-url] - -string representations of objects in node and the browser - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][npm-badge-png]][package-url] - -# example - -## circular - -``` js -var inspect = require('object-inspect'); -var obj = { a: 1, b: [3,4] }; -obj.c = obj; -console.log(inspect(obj)); -``` - -## dom element - -``` js -var inspect = require('object-inspect'); - -var d = document.createElement('div'); -d.setAttribute('id', 'beep'); -d.innerHTML = 'woooiiiii'; - -console.log(inspect([ d, { a: 3, b : 4, c: [5,6,[7,[8,[9]]]] } ])); -``` - -output: - -``` -[
...
, { a: 3, b: 4, c: [ 5, 6, [ 7, [ 8, [ ... ] ] ] ] } ] -``` - -# methods - -``` js -var inspect = require('object-inspect') -``` - -## var s = inspect(obj, opts={}) - -Return a string `s` with the string representation of `obj` up to a depth of `opts.depth`. - -Additional options: - - `quoteStyle`: must be "single" or "double", if present. Default `'single'` for strings, `'double'` for HTML elements. - - `maxStringLength`: must be `0`, a positive integer, `Infinity`, or `null`, if present. Default `Infinity`. - - `customInspect`: When `true`, a custom inspect method function will be invoked (either undere the `util.inspect.custom` symbol, or the `inspect` property). When the string `'symbol'`, only the symbol method will be invoked. Default `true`. - - `indent`: must be "\t", `null`, or a positive integer. Default `null`. - - `numericSeparator`: must be a boolean, if present. Default `false`. If `true`, all numbers will be printed with numeric separators (eg, `1234.5678` will be printed as `'1_234.567_8'`) - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install object-inspect -``` - -# license - -MIT - -[package-url]: https://npmjs.org/package/object-inspect -[npm-version-svg]: https://versionbadg.es/inspect-js/object-inspect.svg -[deps-svg]: https://david-dm.org/inspect-js/object-inspect.svg -[deps-url]: https://david-dm.org/inspect-js/object-inspect -[dev-deps-svg]: https://david-dm.org/inspect-js/object-inspect/dev-status.svg -[dev-deps-url]: https://david-dm.org/inspect-js/object-inspect#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/object-inspect.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/object-inspect.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/object-inspect.svg -[downloads-url]: https://npm-stat.com/charts.html?package=object-inspect -[codecov-image]: https://codecov.io/gh/inspect-js/object-inspect/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/inspect-js/object-inspect/ -[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/object-inspect -[actions-url]: https://github.com/inspect-js/object-inspect/actions diff --git a/node_modules/object-inspect/test-core-js.js b/node_modules/object-inspect/test-core-js.js deleted file mode 100644 index e53c400..0000000 --- a/node_modules/object-inspect/test-core-js.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -require('core-js'); - -var inspect = require('./'); -var test = require('tape'); - -test('Maps', function (t) { - t.equal(inspect(new Map([[1, 2]])), 'Map (1) {1 => 2}'); - t.end(); -}); - -test('WeakMaps', function (t) { - t.equal(inspect(new WeakMap([[{}, 2]])), 'WeakMap { ? }'); - t.end(); -}); - -test('Sets', function (t) { - t.equal(inspect(new Set([[1, 2]])), 'Set (1) {[ 1, 2 ]}'); - t.end(); -}); - -test('WeakSets', function (t) { - t.equal(inspect(new WeakSet([[1, 2]])), 'WeakSet { ? }'); - t.end(); -}); diff --git a/node_modules/object-inspect/test/bigint.js b/node_modules/object-inspect/test/bigint.js deleted file mode 100644 index 4ecc31d..0000000 --- a/node_modules/object-inspect/test/bigint.js +++ /dev/null @@ -1,58 +0,0 @@ -'use strict'; - -var inspect = require('../'); -var test = require('tape'); -var hasToStringTag = require('has-tostringtag/shams')(); - -test('bigint', { skip: typeof BigInt === 'undefined' }, function (t) { - t.test('primitives', function (st) { - st.plan(3); - - st.equal(inspect(BigInt(-256)), '-256n'); - st.equal(inspect(BigInt(0)), '0n'); - st.equal(inspect(BigInt(256)), '256n'); - }); - - t.test('objects', function (st) { - st.plan(3); - - st.equal(inspect(Object(BigInt(-256))), 'Object(-256n)'); - st.equal(inspect(Object(BigInt(0))), 'Object(0n)'); - st.equal(inspect(Object(BigInt(256))), 'Object(256n)'); - }); - - t.test('syntactic primitives', function (st) { - st.plan(3); - - /* eslint-disable no-new-func */ - st.equal(inspect(Function('return -256n')()), '-256n'); - st.equal(inspect(Function('return 0n')()), '0n'); - st.equal(inspect(Function('return 256n')()), '256n'); - }); - - t.test('toStringTag', { skip: !hasToStringTag }, function (st) { - st.plan(1); - - var faker = {}; - faker[Symbol.toStringTag] = 'BigInt'; - st.equal( - inspect(faker), - '{ [Symbol(Symbol.toStringTag)]: \'BigInt\' }', - 'object lying about being a BigInt inspects as an object' - ); - }); - - t.test('numericSeparator', function (st) { - st.equal(inspect(BigInt(0), { numericSeparator: false }), '0n', '0n, numericSeparator false'); - st.equal(inspect(BigInt(0), { numericSeparator: true }), '0n', '0n, numericSeparator true'); - - st.equal(inspect(BigInt(1234), { numericSeparator: false }), '1234n', '1234n, numericSeparator false'); - st.equal(inspect(BigInt(1234), { numericSeparator: true }), '1_234n', '1234n, numericSeparator true'); - st.equal(inspect(BigInt(-1234), { numericSeparator: false }), '-1234n', '1234n, numericSeparator false'); - st.equal(inspect(BigInt(-1234), { numericSeparator: true }), '-1_234n', '1234n, numericSeparator true'); - - st.end(); - }); - - t.end(); -}); diff --git a/node_modules/object-inspect/test/browser/dom.js b/node_modules/object-inspect/test/browser/dom.js deleted file mode 100644 index 210c0b2..0000000 --- a/node_modules/object-inspect/test/browser/dom.js +++ /dev/null @@ -1,15 +0,0 @@ -var inspect = require('../../'); -var test = require('tape'); - -test('dom element', function (t) { - t.plan(1); - - var d = document.createElement('div'); - d.setAttribute('id', 'beep'); - d.innerHTML = 'woooiiiii'; - - t.equal( - inspect([d, { a: 3, b: 4, c: [5, 6, [7, [8, [9]]]] }]), - '[
...
, { a: 3, b: 4, c: [ 5, 6, [ 7, [ 8, [Object] ] ] ] } ]' - ); -}); diff --git a/node_modules/object-inspect/test/circular.js b/node_modules/object-inspect/test/circular.js deleted file mode 100644 index 5df4233..0000000 --- a/node_modules/object-inspect/test/circular.js +++ /dev/null @@ -1,16 +0,0 @@ -var inspect = require('../'); -var test = require('tape'); - -test('circular', function (t) { - t.plan(2); - var obj = { a: 1, b: [3, 4] }; - obj.c = obj; - t.equal(inspect(obj), '{ a: 1, b: [ 3, 4 ], c: [Circular] }'); - - var double = {}; - double.a = [double]; - double.b = {}; - double.b.inner = double.b; - double.b.obj = double; - t.equal(inspect(double), '{ a: [ [Circular] ], b: { inner: [Circular], obj: [Circular] } }'); -}); diff --git a/node_modules/object-inspect/test/deep.js b/node_modules/object-inspect/test/deep.js deleted file mode 100644 index 99ce32a..0000000 --- a/node_modules/object-inspect/test/deep.js +++ /dev/null @@ -1,12 +0,0 @@ -var inspect = require('../'); -var test = require('tape'); - -test('deep', function (t) { - t.plan(4); - var obj = [[[[[[500]]]]]]; - t.equal(inspect(obj), '[ [ [ [ [ [Array] ] ] ] ] ]'); - t.equal(inspect(obj, { depth: 4 }), '[ [ [ [ [Array] ] ] ] ]'); - t.equal(inspect(obj, { depth: 2 }), '[ [ [Array] ] ]'); - - t.equal(inspect([[[{ a: 1 }]]], { depth: 3 }), '[ [ [ [Object] ] ] ]'); -}); diff --git a/node_modules/object-inspect/test/element.js b/node_modules/object-inspect/test/element.js deleted file mode 100644 index 47fa9e2..0000000 --- a/node_modules/object-inspect/test/element.js +++ /dev/null @@ -1,53 +0,0 @@ -var inspect = require('../'); -var test = require('tape'); - -test('element', function (t) { - t.plan(3); - var elem = { - nodeName: 'div', - attributes: [{ name: 'class', value: 'row' }], - getAttribute: function (key) { return key; }, - childNodes: [] - }; - var obj = [1, elem, 3]; - t.deepEqual(inspect(obj), '[ 1,
, 3 ]'); - t.deepEqual(inspect(obj, { quoteStyle: 'single' }), "[ 1,
, 3 ]"); - t.deepEqual(inspect(obj, { quoteStyle: 'double' }), '[ 1,
, 3 ]'); -}); - -test('element no attr', function (t) { - t.plan(1); - var elem = { - nodeName: 'div', - getAttribute: function (key) { return key; }, - childNodes: [] - }; - var obj = [1, elem, 3]; - t.deepEqual(inspect(obj), '[ 1,
, 3 ]'); -}); - -test('element with contents', function (t) { - t.plan(1); - var elem = { - nodeName: 'div', - getAttribute: function (key) { return key; }, - childNodes: [{ nodeName: 'b' }] - }; - var obj = [1, elem, 3]; - t.deepEqual(inspect(obj), '[ 1,
...
, 3 ]'); -}); - -test('element instance', function (t) { - t.plan(1); - var h = global.HTMLElement; - global.HTMLElement = function (name, attr) { - this.nodeName = name; - this.attributes = attr; - }; - global.HTMLElement.prototype.getAttribute = function () {}; - - var elem = new global.HTMLElement('div', []); - var obj = [1, elem, 3]; - t.deepEqual(inspect(obj), '[ 1,
, 3 ]'); - global.HTMLElement = h; -}); diff --git a/node_modules/object-inspect/test/err.js b/node_modules/object-inspect/test/err.js deleted file mode 100644 index cc1d884..0000000 --- a/node_modules/object-inspect/test/err.js +++ /dev/null @@ -1,48 +0,0 @@ -var test = require('tape'); -var ErrorWithCause = require('error-cause/Error'); - -var inspect = require('../'); - -test('type error', function (t) { - t.plan(1); - var aerr = new TypeError(); - aerr.foo = 555; - aerr.bar = [1, 2, 3]; - - var berr = new TypeError('tuv'); - berr.baz = 555; - - var cerr = new SyntaxError(); - cerr.message = 'whoa'; - cerr['a-b'] = 5; - - var withCause = new ErrorWithCause('foo', { cause: 'bar' }); - var withCausePlus = new ErrorWithCause('foo', { cause: 'bar' }); - withCausePlus.foo = 'bar'; - var withUndefinedCause = new ErrorWithCause('foo', { cause: undefined }); - var withEnumerableCause = new Error('foo'); - withEnumerableCause.cause = 'bar'; - - var obj = [ - new TypeError(), - new TypeError('xxx'), - aerr, - berr, - cerr, - withCause, - withCausePlus, - withUndefinedCause, - withEnumerableCause - ]; - t.equal(inspect(obj), '[ ' + [ - '[TypeError]', - '[TypeError: xxx]', - '{ [TypeError] foo: 555, bar: [ 1, 2, 3 ] }', - '{ [TypeError: tuv] baz: 555 }', - '{ [SyntaxError: whoa] message: \'whoa\', \'a-b\': 5 }', - 'cause' in Error.prototype ? '[Error: foo]' : '{ [Error: foo] [cause]: \'bar\' }', - '{ [Error: foo] ' + ('cause' in Error.prototype ? '' : '[cause]: \'bar\', ') + 'foo: \'bar\' }', - 'cause' in Error.prototype ? '[Error: foo]' : '{ [Error: foo] [cause]: undefined }', - '{ [Error: foo] cause: \'bar\' }' - ].join(', ') + ' ]'); -}); diff --git a/node_modules/object-inspect/test/fakes.js b/node_modules/object-inspect/test/fakes.js deleted file mode 100644 index a65c08c..0000000 --- a/node_modules/object-inspect/test/fakes.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -var inspect = require('../'); -var test = require('tape'); -var hasToStringTag = require('has-tostringtag/shams')(); -var forEach = require('for-each'); - -test('fakes', { skip: !hasToStringTag }, function (t) { - forEach([ - 'Array', - 'Boolean', - 'Date', - 'Error', - 'Number', - 'RegExp', - 'String' - ], function (expected) { - var faker = {}; - faker[Symbol.toStringTag] = expected; - - t.equal( - inspect(faker), - '{ [Symbol(Symbol.toStringTag)]: \'' + expected + '\' }', - 'faker masquerading as ' + expected + ' is not shown as one' - ); - }); - - t.end(); -}); diff --git a/node_modules/object-inspect/test/fn.js b/node_modules/object-inspect/test/fn.js deleted file mode 100644 index de3ca62..0000000 --- a/node_modules/object-inspect/test/fn.js +++ /dev/null @@ -1,76 +0,0 @@ -var inspect = require('../'); -var test = require('tape'); -var arrow = require('make-arrow-function')(); -var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames(); - -test('function', function (t) { - t.plan(1); - var obj = [1, 2, function f(n) { return n; }, 4]; - t.equal(inspect(obj), '[ 1, 2, [Function: f], 4 ]'); -}); - -test('function name', function (t) { - t.plan(1); - var f = (function () { - return function () {}; - }()); - f.toString = function toStr() { return 'function xxx () {}'; }; - var obj = [1, 2, f, 4]; - t.equal(inspect(obj), '[ 1, 2, [Function (anonymous)] { toString: [Function: toStr] }, 4 ]'); -}); - -test('anon function', function (t) { - var f = (function () { - return function () {}; - }()); - var obj = [1, 2, f, 4]; - t.equal(inspect(obj), '[ 1, 2, [Function (anonymous)], 4 ]'); - - t.end(); -}); - -test('arrow function', { skip: !arrow }, function (t) { - t.equal(inspect(arrow), '[Function (anonymous)]'); - - t.end(); -}); - -test('truly nameless function', { skip: !arrow || !functionsHaveConfigurableNames }, function (t) { - function f() {} - Object.defineProperty(f, 'name', { value: false }); - t.equal(f.name, false); - t.equal( - inspect(f), - '[Function: f]', - 'named function with falsy `.name` does not hide its original name' - ); - - function g() {} - Object.defineProperty(g, 'name', { value: true }); - t.equal(g.name, true); - t.equal( - inspect(g), - '[Function: true]', - 'named function with truthy `.name` hides its original name' - ); - - var anon = function () {}; // eslint-disable-line func-style - Object.defineProperty(anon, 'name', { value: null }); - t.equal(anon.name, null); - t.equal( - inspect(anon), - '[Function (anonymous)]', - 'anon function with falsy `.name` does not hide its anonymity' - ); - - var anon2 = function () {}; // eslint-disable-line func-style - Object.defineProperty(anon2, 'name', { value: 1 }); - t.equal(anon2.name, 1); - t.equal( - inspect(anon2), - '[Function: 1]', - 'anon function with truthy `.name` hides its anonymity' - ); - - t.end(); -}); diff --git a/node_modules/object-inspect/test/global.js b/node_modules/object-inspect/test/global.js deleted file mode 100644 index c57216a..0000000 --- a/node_modules/object-inspect/test/global.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -var inspect = require('../'); - -var test = require('tape'); -var globalThis = require('globalthis')(); - -test('global object', function (t) { - /* eslint-env browser */ - var expected = typeof window === 'undefined' ? 'globalThis' : 'Window'; - t.equal( - inspect([globalThis]), - '[ { [object ' + expected + '] } ]' - ); - - t.end(); -}); diff --git a/node_modules/object-inspect/test/has.js b/node_modules/object-inspect/test/has.js deleted file mode 100644 index 01800de..0000000 --- a/node_modules/object-inspect/test/has.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -var inspect = require('../'); -var test = require('tape'); -var mockProperty = require('mock-property'); - -test('when Object#hasOwnProperty is deleted', function (t) { - t.plan(1); - var arr = [1, , 3]; // eslint-disable-line no-sparse-arrays - - t.teardown(mockProperty(Array.prototype, 1, { value: 2 })); // this is needed to account for "in" vs "hasOwnProperty" - t.teardown(mockProperty(Object.prototype, 'hasOwnProperty', { 'delete': true })); - - t.equal(inspect(arr), '[ 1, , 3 ]'); -}); diff --git a/node_modules/object-inspect/test/holes.js b/node_modules/object-inspect/test/holes.js deleted file mode 100644 index 87fc8c8..0000000 --- a/node_modules/object-inspect/test/holes.js +++ /dev/null @@ -1,15 +0,0 @@ -var test = require('tape'); -var inspect = require('../'); - -var xs = ['a', 'b']; -xs[5] = 'f'; -xs[7] = 'j'; -xs[8] = 'k'; - -test('holes', function (t) { - t.plan(1); - t.equal( - inspect(xs), - "[ 'a', 'b', , , , 'f', , 'j', 'k' ]" - ); -}); diff --git a/node_modules/object-inspect/test/indent-option.js b/node_modules/object-inspect/test/indent-option.js deleted file mode 100644 index 89d8fce..0000000 --- a/node_modules/object-inspect/test/indent-option.js +++ /dev/null @@ -1,271 +0,0 @@ -var test = require('tape'); -var forEach = require('for-each'); - -var inspect = require('../'); - -test('bad indent options', function (t) { - forEach([ - undefined, - true, - false, - -1, - 1.2, - Infinity, - -Infinity, - NaN - ], function (indent) { - t['throws']( - function () { inspect('', { indent: indent }); }, - TypeError, - inspect(indent) + ' is invalid' - ); - }); - - t.end(); -}); - -test('simple object with indent', function (t) { - t.plan(2); - - var obj = { a: 1, b: 2 }; - - var expectedSpaces = [ - '{', - ' a: 1,', - ' b: 2', - '}' - ].join('\n'); - var expectedTabs = [ - '{', - ' a: 1,', - ' b: 2', - '}' - ].join('\n'); - - t.equal(inspect(obj, { indent: 2 }), expectedSpaces, 'two'); - t.equal(inspect(obj, { indent: '\t' }), expectedTabs, 'tabs'); -}); - -test('two deep object with indent', function (t) { - t.plan(2); - - var obj = { a: 1, b: { c: 3, d: 4 } }; - - var expectedSpaces = [ - '{', - ' a: 1,', - ' b: {', - ' c: 3,', - ' d: 4', - ' }', - '}' - ].join('\n'); - var expectedTabs = [ - '{', - ' a: 1,', - ' b: {', - ' c: 3,', - ' d: 4', - ' }', - '}' - ].join('\n'); - - t.equal(inspect(obj, { indent: 2 }), expectedSpaces, 'two'); - t.equal(inspect(obj, { indent: '\t' }), expectedTabs, 'tabs'); -}); - -test('simple array with all single line elements', function (t) { - t.plan(2); - - var obj = [1, 2, 3, 'asdf\nsdf']; - - var expected = '[ 1, 2, 3, \'asdf\\nsdf\' ]'; - - t.equal(inspect(obj, { indent: 2 }), expected, 'two'); - t.equal(inspect(obj, { indent: '\t' }), expected, 'tabs'); -}); - -test('array with complex elements', function (t) { - t.plan(2); - - var obj = [1, { a: 1, b: { c: 1 } }, 'asdf\nsdf']; - - var expectedSpaces = [ - '[', - ' 1,', - ' {', - ' a: 1,', - ' b: {', - ' c: 1', - ' }', - ' },', - ' \'asdf\\nsdf\'', - ']' - ].join('\n'); - var expectedTabs = [ - '[', - ' 1,', - ' {', - ' a: 1,', - ' b: {', - ' c: 1', - ' }', - ' },', - ' \'asdf\\nsdf\'', - ']' - ].join('\n'); - - t.equal(inspect(obj, { indent: 2 }), expectedSpaces, 'two'); - t.equal(inspect(obj, { indent: '\t' }), expectedTabs, 'tabs'); -}); - -test('values', function (t) { - t.plan(2); - var obj = [{}, [], { 'a-b': 5 }]; - - var expectedSpaces = [ - '[', - ' {},', - ' [],', - ' {', - ' \'a-b\': 5', - ' }', - ']' - ].join('\n'); - var expectedTabs = [ - '[', - ' {},', - ' [],', - ' {', - ' \'a-b\': 5', - ' }', - ']' - ].join('\n'); - - t.equal(inspect(obj, { indent: 2 }), expectedSpaces, 'two'); - t.equal(inspect(obj, { indent: '\t' }), expectedTabs, 'tabs'); -}); - -test('Map', { skip: typeof Map !== 'function' }, function (t) { - var map = new Map(); - map.set({ a: 1 }, ['b']); - map.set(3, NaN); - - var expectedStringSpaces = [ - 'Map (2) {', - ' { a: 1 } => [ \'b\' ],', - ' 3 => NaN', - '}' - ].join('\n'); - var expectedStringTabs = [ - 'Map (2) {', - ' { a: 1 } => [ \'b\' ],', - ' 3 => NaN', - '}' - ].join('\n'); - var expectedStringTabsDoubleQuotes = [ - 'Map (2) {', - ' { a: 1 } => [ "b" ],', - ' 3 => NaN', - '}' - ].join('\n'); - - t.equal( - inspect(map, { indent: 2 }), - expectedStringSpaces, - 'Map keys are not indented (two)' - ); - t.equal( - inspect(map, { indent: '\t' }), - expectedStringTabs, - 'Map keys are not indented (tabs)' - ); - t.equal( - inspect(map, { indent: '\t', quoteStyle: 'double' }), - expectedStringTabsDoubleQuotes, - 'Map keys are not indented (tabs + double quotes)' - ); - - t.equal(inspect(new Map(), { indent: 2 }), 'Map (0) {}', 'empty Map should show as empty (two)'); - t.equal(inspect(new Map(), { indent: '\t' }), 'Map (0) {}', 'empty Map should show as empty (tabs)'); - - var nestedMap = new Map(); - nestedMap.set(nestedMap, map); - var expectedNestedSpaces = [ - 'Map (1) {', - ' [Circular] => Map (2) {', - ' { a: 1 } => [ \'b\' ],', - ' 3 => NaN', - ' }', - '}' - ].join('\n'); - var expectedNestedTabs = [ - 'Map (1) {', - ' [Circular] => Map (2) {', - ' { a: 1 } => [ \'b\' ],', - ' 3 => NaN', - ' }', - '}' - ].join('\n'); - t.equal(inspect(nestedMap, { indent: 2 }), expectedNestedSpaces, 'Map containing a Map should work (two)'); - t.equal(inspect(nestedMap, { indent: '\t' }), expectedNestedTabs, 'Map containing a Map should work (tabs)'); - - t.end(); -}); - -test('Set', { skip: typeof Set !== 'function' }, function (t) { - var set = new Set(); - set.add({ a: 1 }); - set.add(['b']); - var expectedStringSpaces = [ - 'Set (2) {', - ' {', - ' a: 1', - ' },', - ' [ \'b\' ]', - '}' - ].join('\n'); - var expectedStringTabs = [ - 'Set (2) {', - ' {', - ' a: 1', - ' },', - ' [ \'b\' ]', - '}' - ].join('\n'); - t.equal(inspect(set, { indent: 2 }), expectedStringSpaces, 'new Set([{ a: 1 }, ["b"]]) should show size and contents (two)'); - t.equal(inspect(set, { indent: '\t' }), expectedStringTabs, 'new Set([{ a: 1 }, ["b"]]) should show size and contents (tabs)'); - - t.equal(inspect(new Set(), { indent: 2 }), 'Set (0) {}', 'empty Set should show as empty (two)'); - t.equal(inspect(new Set(), { indent: '\t' }), 'Set (0) {}', 'empty Set should show as empty (tabs)'); - - var nestedSet = new Set(); - nestedSet.add(set); - nestedSet.add(nestedSet); - var expectedNestedSpaces = [ - 'Set (2) {', - ' Set (2) {', - ' {', - ' a: 1', - ' },', - ' [ \'b\' ]', - ' },', - ' [Circular]', - '}' - ].join('\n'); - var expectedNestedTabs = [ - 'Set (2) {', - ' Set (2) {', - ' {', - ' a: 1', - ' },', - ' [ \'b\' ]', - ' },', - ' [Circular]', - '}' - ].join('\n'); - t.equal(inspect(nestedSet, { indent: 2 }), expectedNestedSpaces, 'Set containing a Set should work (two)'); - t.equal(inspect(nestedSet, { indent: '\t' }), expectedNestedTabs, 'Set containing a Set should work (tabs)'); - - t.end(); -}); diff --git a/node_modules/object-inspect/test/inspect.js b/node_modules/object-inspect/test/inspect.js deleted file mode 100644 index 1abf81b..0000000 --- a/node_modules/object-inspect/test/inspect.js +++ /dev/null @@ -1,139 +0,0 @@ -var test = require('tape'); -var hasSymbols = require('has-symbols/shams')(); -var utilInspect = require('../util.inspect'); -var repeat = require('string.prototype.repeat'); - -var inspect = require('..'); - -test('inspect', function (t) { - t.plan(5); - - var obj = [{ inspect: function xyzInspect() { return '!XYZ¡'; } }, []]; - var stringResult = '[ !XYZ¡, [] ]'; - var falseResult = '[ { inspect: [Function: xyzInspect] }, [] ]'; - - t.equal(inspect(obj), stringResult); - t.equal(inspect(obj, { customInspect: true }), stringResult); - t.equal(inspect(obj, { customInspect: 'symbol' }), falseResult); - t.equal(inspect(obj, { customInspect: false }), falseResult); - t['throws']( - function () { inspect(obj, { customInspect: 'not a boolean or "symbol"' }); }, - TypeError, - '`customInspect` must be a boolean or the string "symbol"' - ); -}); - -test('inspect custom symbol', { skip: !hasSymbols || !utilInspect || !utilInspect.custom }, function (t) { - t.plan(4); - - var obj = { inspect: function stringInspect() { return 'string'; } }; - obj[utilInspect.custom] = function custom() { return 'symbol'; }; - - var symbolResult = '[ symbol, [] ]'; - var stringResult = '[ string, [] ]'; - var falseResult = '[ { inspect: [Function: stringInspect]' + (utilInspect.custom ? ', [' + inspect(utilInspect.custom) + ']: [Function: custom]' : '') + ' }, [] ]'; - - var symbolStringFallback = utilInspect.custom ? symbolResult : stringResult; - var symbolFalseFallback = utilInspect.custom ? symbolResult : falseResult; - - t.equal(inspect([obj, []]), symbolStringFallback); - t.equal(inspect([obj, []], { customInspect: true }), symbolStringFallback); - t.equal(inspect([obj, []], { customInspect: 'symbol' }), symbolFalseFallback); - t.equal(inspect([obj, []], { customInspect: false }), falseResult); -}); - -test('symbols', { skip: !hasSymbols }, function (t) { - t.plan(2); - - var obj = { a: 1 }; - obj[Symbol('test')] = 2; - obj[Symbol.iterator] = 3; - Object.defineProperty(obj, Symbol('non-enum'), { - enumerable: false, - value: 4 - }); - - if (typeof Symbol.iterator === 'symbol') { - t.equal(inspect(obj), '{ a: 1, [Symbol(test)]: 2, [Symbol(Symbol.iterator)]: 3 }', 'object with symbols'); - t.equal(inspect([obj, []]), '[ { a: 1, [Symbol(test)]: 2, [Symbol(Symbol.iterator)]: 3 }, [] ]', 'object with symbols in array'); - } else { - // symbol sham key ordering is unreliable - t.match( - inspect(obj), - /^(?:{ a: 1, \[Symbol\(test\)\]: 2, \[Symbol\(Symbol.iterator\)\]: 3 }|{ a: 1, \[Symbol\(Symbol.iterator\)\]: 3, \[Symbol\(test\)\]: 2 })$/, - 'object with symbols (nondeterministic symbol sham key ordering)' - ); - t.match( - inspect([obj, []]), - /^\[ (?:{ a: 1, \[Symbol\(test\)\]: 2, \[Symbol\(Symbol.iterator\)\]: 3 }|{ a: 1, \[Symbol\(Symbol.iterator\)\]: 3, \[Symbol\(test\)\]: 2 }), \[\] \]$/, - 'object with symbols in array (nondeterministic symbol sham key ordering)' - ); - } -}); - -test('maxStringLength', function (t) { - t['throws']( - function () { inspect('', { maxStringLength: -1 }); }, - TypeError, - 'maxStringLength must be >= 0, or Infinity, not negative' - ); - - var str = repeat('a', 1e8); - - t.equal( - inspect([str], { maxStringLength: 10 }), - '[ \'aaaaaaaaaa\'... 99999990 more characters ]', - 'maxStringLength option limits output' - ); - - t.equal( - inspect(['f'], { maxStringLength: null }), - '[ \'\'... 1 more character ]', - 'maxStringLength option accepts `null`' - ); - - t.equal( - inspect([str], { maxStringLength: Infinity }), - '[ \'' + str + '\' ]', - 'maxStringLength option accepts ∞' - ); - - t.end(); -}); - -test('inspect options', { skip: !utilInspect.custom }, function (t) { - var obj = {}; - obj[utilInspect.custom] = function () { - return JSON.stringify(arguments); - }; - t.equal( - inspect(obj), - utilInspect(obj, { depth: 5 }), - 'custom symbols will use node\'s inspect' - ); - t.equal( - inspect(obj, { depth: 2 }), - utilInspect(obj, { depth: 2 }), - 'a reduced depth will be passed to node\'s inspect' - ); - t.equal( - inspect({ d1: obj }, { depth: 3 }), - '{ d1: ' + utilInspect(obj, { depth: 2 }) + ' }', - 'deep objects will receive a reduced depth' - ); - t.equal( - inspect({ d1: obj }, { depth: 1 }), - '{ d1: [Object] }', - 'unlike nodejs inspect, customInspect will not be used once the depth is exceeded.' - ); - t.end(); -}); - -test('inspect URL', { skip: typeof URL === 'undefined' }, function (t) { - t.match( - inspect(new URL('https://nodejs.org')), - /nodejs\.org/, // Different environments stringify it differently - 'url can be inspected' - ); - t.end(); -}); diff --git a/node_modules/object-inspect/test/lowbyte.js b/node_modules/object-inspect/test/lowbyte.js deleted file mode 100644 index 68a345d..0000000 --- a/node_modules/object-inspect/test/lowbyte.js +++ /dev/null @@ -1,12 +0,0 @@ -var test = require('tape'); -var inspect = require('../'); - -var obj = { x: 'a\r\nb', y: '\x05! \x1f \x12' }; - -test('interpolate low bytes', function (t) { - t.plan(1); - t.equal( - inspect(obj), - "{ x: 'a\\r\\nb', y: '\\x05! \\x1F \\x12' }" - ); -}); diff --git a/node_modules/object-inspect/test/number.js b/node_modules/object-inspect/test/number.js deleted file mode 100644 index 8f287e8..0000000 --- a/node_modules/object-inspect/test/number.js +++ /dev/null @@ -1,58 +0,0 @@ -var test = require('tape'); -var v = require('es-value-fixtures'); -var forEach = require('for-each'); - -var inspect = require('../'); - -test('negative zero', function (t) { - t.equal(inspect(0), '0', 'inspect(0) === "0"'); - t.equal(inspect(Object(0)), 'Object(0)', 'inspect(Object(0)) === "Object(0)"'); - - t.equal(inspect(-0), '-0', 'inspect(-0) === "-0"'); - t.equal(inspect(Object(-0)), 'Object(-0)', 'inspect(Object(-0)) === "Object(-0)"'); - - t.end(); -}); - -test('numericSeparator', function (t) { - forEach(v.nonBooleans, function (nonBoolean) { - t['throws']( - function () { inspect(true, { numericSeparator: nonBoolean }); }, - TypeError, - inspect(nonBoolean) + ' is not a boolean' - ); - }); - - t.test('3 digit numbers', function (st) { - var failed = false; - for (var i = -999; i < 1000; i += 1) { - var actual = inspect(i); - var actualSepNo = inspect(i, { numericSeparator: false }); - var actualSepYes = inspect(i, { numericSeparator: true }); - var expected = String(i); - if (actual !== expected || actualSepNo !== expected || actualSepYes !== expected) { - failed = true; - t.equal(actual, expected); - t.equal(actualSepNo, expected); - t.equal(actualSepYes, expected); - } - } - - st.notOk(failed, 'all 3 digit numbers passed'); - - st.end(); - }); - - t.equal(inspect(1e3), '1000', '1000'); - t.equal(inspect(1e3, { numericSeparator: false }), '1000', '1000, numericSeparator false'); - t.equal(inspect(1e3, { numericSeparator: true }), '1_000', '1000, numericSeparator true'); - t.equal(inspect(-1e3), '-1000', '-1000'); - t.equal(inspect(-1e3, { numericSeparator: false }), '-1000', '-1000, numericSeparator false'); - t.equal(inspect(-1e3, { numericSeparator: true }), '-1_000', '-1000, numericSeparator true'); - - t.equal(inspect(1234.5678, { numericSeparator: true }), '1_234.567_8', 'fractional numbers get separators'); - t.equal(inspect(1234.56789, { numericSeparator: true }), '1_234.567_89', 'fractional numbers get separators'); - t.equal(inspect(1234.567891, { numericSeparator: true }), '1_234.567_891', 'fractional numbers get separators'); - - t.end(); -}); diff --git a/node_modules/object-inspect/test/quoteStyle.js b/node_modules/object-inspect/test/quoteStyle.js deleted file mode 100644 index da23e63..0000000 --- a/node_modules/object-inspect/test/quoteStyle.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -var inspect = require('../'); -var test = require('tape'); - -test('quoteStyle option', function (t) { - t['throws'](function () { inspect(null, { quoteStyle: false }); }, 'false is not a valid value'); - t['throws'](function () { inspect(null, { quoteStyle: true }); }, 'true is not a valid value'); - t['throws'](function () { inspect(null, { quoteStyle: '' }); }, '"" is not a valid value'); - t['throws'](function () { inspect(null, { quoteStyle: {} }); }, '{} is not a valid value'); - t['throws'](function () { inspect(null, { quoteStyle: [] }); }, '[] is not a valid value'); - t['throws'](function () { inspect(null, { quoteStyle: 42 }); }, '42 is not a valid value'); - t['throws'](function () { inspect(null, { quoteStyle: NaN }); }, 'NaN is not a valid value'); - t['throws'](function () { inspect(null, { quoteStyle: function () {} }); }, 'a function is not a valid value'); - - t.equal(inspect('"', { quoteStyle: 'single' }), '\'"\'', 'double quote, quoteStyle: "single"'); - t.equal(inspect('"', { quoteStyle: 'double' }), '"\\""', 'double quote, quoteStyle: "double"'); - - t.equal(inspect('\'', { quoteStyle: 'single' }), '\'\\\'\'', 'single quote, quoteStyle: "single"'); - t.equal(inspect('\'', { quoteStyle: 'double' }), '"\'"', 'single quote, quoteStyle: "double"'); - - t.equal(inspect('`', { quoteStyle: 'single' }), '\'`\'', 'backtick, quoteStyle: "single"'); - t.equal(inspect('`', { quoteStyle: 'double' }), '"`"', 'backtick, quoteStyle: "double"'); - - t.end(); -}); diff --git a/node_modules/object-inspect/test/toStringTag.js b/node_modules/object-inspect/test/toStringTag.js deleted file mode 100644 index 95f8270..0000000 --- a/node_modules/object-inspect/test/toStringTag.js +++ /dev/null @@ -1,40 +0,0 @@ -'use strict'; - -var test = require('tape'); -var hasToStringTag = require('has-tostringtag/shams')(); - -var inspect = require('../'); - -test('Symbol.toStringTag', { skip: !hasToStringTag }, function (t) { - t.plan(4); - - var obj = { a: 1 }; - t.equal(inspect(obj), '{ a: 1 }', 'object, no Symbol.toStringTag'); - - obj[Symbol.toStringTag] = 'foo'; - t.equal(inspect(obj), '{ a: 1, [Symbol(Symbol.toStringTag)]: \'foo\' }', 'object with Symbol.toStringTag'); - - t.test('null objects', { skip: 'toString' in { __proto__: null } }, function (st) { - st.plan(2); - - var dict = { __proto__: null, a: 1 }; - st.equal(inspect(dict), '[Object: null prototype] { a: 1 }', 'null object with Symbol.toStringTag'); - - dict[Symbol.toStringTag] = 'Dict'; - st.equal(inspect(dict), '[Dict: null prototype] { a: 1, [Symbol(Symbol.toStringTag)]: \'Dict\' }', 'null object with Symbol.toStringTag'); - }); - - t.test('instances', function (st) { - st.plan(4); - - function C() { - this.a = 1; - } - st.equal(Object.prototype.toString.call(new C()), '[object Object]', 'instance, no toStringTag, Object.prototype.toString'); - st.equal(inspect(new C()), 'C { a: 1 }', 'instance, no toStringTag'); - - C.prototype[Symbol.toStringTag] = 'Class!'; - st.equal(Object.prototype.toString.call(new C()), '[object Class!]', 'instance, with toStringTag, Object.prototype.toString'); - st.equal(inspect(new C()), 'C [Class!] { a: 1 }', 'instance, with toStringTag'); - }); -}); diff --git a/node_modules/object-inspect/test/undef.js b/node_modules/object-inspect/test/undef.js deleted file mode 100644 index e3f4961..0000000 --- a/node_modules/object-inspect/test/undef.js +++ /dev/null @@ -1,12 +0,0 @@ -var test = require('tape'); -var inspect = require('../'); - -var obj = { a: 1, b: [3, 4, undefined, null], c: undefined, d: null }; - -test('undef and null', function (t) { - t.plan(1); - t.equal( - inspect(obj), - '{ a: 1, b: [ 3, 4, undefined, null ], c: undefined, d: null }' - ); -}); diff --git a/node_modules/object-inspect/test/values.js b/node_modules/object-inspect/test/values.js deleted file mode 100644 index 15986cd..0000000 --- a/node_modules/object-inspect/test/values.js +++ /dev/null @@ -1,261 +0,0 @@ -'use strict'; - -var inspect = require('../'); -var test = require('tape'); -var mockProperty = require('mock-property'); -var hasSymbols = require('has-symbols/shams')(); -var hasToStringTag = require('has-tostringtag/shams')(); -var forEach = require('for-each'); -var semver = require('semver'); - -test('values', function (t) { - t.plan(1); - var obj = [{}, [], { 'a-b': 5 }]; - t.equal(inspect(obj), '[ {}, [], { \'a-b\': 5 } ]'); -}); - -test('arrays with properties', function (t) { - t.plan(1); - var arr = [3]; - arr.foo = 'bar'; - var obj = [1, 2, arr]; - obj.baz = 'quux'; - obj.index = -1; - t.equal(inspect(obj), '[ 1, 2, [ 3, foo: \'bar\' ], baz: \'quux\', index: -1 ]'); -}); - -test('has', function (t) { - t.plan(1); - t.teardown(mockProperty(Object.prototype, 'hasOwnProperty', { 'delete': true })); - - t.equal(inspect({ a: 1, b: 2 }), '{ a: 1, b: 2 }'); -}); - -test('indexOf seen', function (t) { - t.plan(1); - var xs = [1, 2, 3, {}]; - xs.push(xs); - - var seen = []; - seen.indexOf = undefined; - - t.equal( - inspect(xs, {}, 0, seen), - '[ 1, 2, 3, {}, [Circular] ]' - ); -}); - -test('seen seen', function (t) { - t.plan(1); - var xs = [1, 2, 3]; - - var seen = [xs]; - seen.indexOf = undefined; - - t.equal( - inspect(xs, {}, 0, seen), - '[Circular]' - ); -}); - -test('seen seen seen', function (t) { - t.plan(1); - var xs = [1, 2, 3]; - - var seen = [5, xs]; - seen.indexOf = undefined; - - t.equal( - inspect(xs, {}, 0, seen), - '[Circular]' - ); -}); - -test('symbols', { skip: !hasSymbols }, function (t) { - var sym = Symbol('foo'); - t.equal(inspect(sym), 'Symbol(foo)', 'Symbol("foo") should be "Symbol(foo)"'); - if (typeof sym === 'symbol') { - // Symbol shams are incapable of differentiating boxed from unboxed symbols - t.equal(inspect(Object(sym)), 'Object(Symbol(foo))', 'Object(Symbol("foo")) should be "Object(Symbol(foo))"'); - } - - t.test('toStringTag', { skip: !hasToStringTag }, function (st) { - st.plan(1); - - var faker = {}; - faker[Symbol.toStringTag] = 'Symbol'; - st.equal( - inspect(faker), - '{ [Symbol(Symbol.toStringTag)]: \'Symbol\' }', - 'object lying about being a Symbol inspects as an object' - ); - }); - - t.end(); -}); - -test('Map', { skip: typeof Map !== 'function' }, function (t) { - var map = new Map(); - map.set({ a: 1 }, ['b']); - map.set(3, NaN); - var expectedString = 'Map (2) {' + inspect({ a: 1 }) + ' => ' + inspect(['b']) + ', 3 => NaN}'; - t.equal(inspect(map), expectedString, 'new Map([[{ a: 1 }, ["b"]], [3, NaN]]) should show size and contents'); - t.equal(inspect(new Map()), 'Map (0) {}', 'empty Map should show as empty'); - - var nestedMap = new Map(); - nestedMap.set(nestedMap, map); - t.equal(inspect(nestedMap), 'Map (1) {[Circular] => ' + expectedString + '}', 'Map containing a Map should work'); - - t.end(); -}); - -test('WeakMap', { skip: typeof WeakMap !== 'function' }, function (t) { - var map = new WeakMap(); - map.set({ a: 1 }, ['b']); - var expectedString = 'WeakMap { ? }'; - t.equal(inspect(map), expectedString, 'new WeakMap([[{ a: 1 }, ["b"]]]) should not show size or contents'); - t.equal(inspect(new WeakMap()), 'WeakMap { ? }', 'empty WeakMap should not show as empty'); - - t.end(); -}); - -test('Set', { skip: typeof Set !== 'function' }, function (t) { - var set = new Set(); - set.add({ a: 1 }); - set.add(['b']); - var expectedString = 'Set (2) {' + inspect({ a: 1 }) + ', ' + inspect(['b']) + '}'; - t.equal(inspect(set), expectedString, 'new Set([{ a: 1 }, ["b"]]) should show size and contents'); - t.equal(inspect(new Set()), 'Set (0) {}', 'empty Set should show as empty'); - - var nestedSet = new Set(); - nestedSet.add(set); - nestedSet.add(nestedSet); - t.equal(inspect(nestedSet), 'Set (2) {' + expectedString + ', [Circular]}', 'Set containing a Set should work'); - - t.end(); -}); - -test('WeakSet', { skip: typeof WeakSet !== 'function' }, function (t) { - var map = new WeakSet(); - map.add({ a: 1 }); - var expectedString = 'WeakSet { ? }'; - t.equal(inspect(map), expectedString, 'new WeakSet([{ a: 1 }]) should not show size or contents'); - t.equal(inspect(new WeakSet()), 'WeakSet { ? }', 'empty WeakSet should not show as empty'); - - t.end(); -}); - -test('WeakRef', { skip: typeof WeakRef !== 'function' }, function (t) { - var ref = new WeakRef({ a: 1 }); - var expectedString = 'WeakRef { ? }'; - t.equal(inspect(ref), expectedString, 'new WeakRef({ a: 1 }) should not show contents'); - - t.end(); -}); - -test('FinalizationRegistry', { skip: typeof FinalizationRegistry !== 'function' }, function (t) { - var registry = new FinalizationRegistry(function () {}); - var expectedString = 'FinalizationRegistry [FinalizationRegistry] {}'; - t.equal(inspect(registry), expectedString, 'new FinalizationRegistry(function () {}) should work normallys'); - - t.end(); -}); - -test('Strings', function (t) { - var str = 'abc'; - - t.equal(inspect(str), "'" + str + "'", 'primitive string shows as such'); - t.equal(inspect(str, { quoteStyle: 'single' }), "'" + str + "'", 'primitive string shows as such, single quoted'); - t.equal(inspect(str, { quoteStyle: 'double' }), '"' + str + '"', 'primitive string shows as such, double quoted'); - t.equal(inspect(Object(str)), 'Object(' + inspect(str) + ')', 'String object shows as such'); - t.equal(inspect(Object(str), { quoteStyle: 'single' }), 'Object(' + inspect(str, { quoteStyle: 'single' }) + ')', 'String object shows as such, single quoted'); - t.equal(inspect(Object(str), { quoteStyle: 'double' }), 'Object(' + inspect(str, { quoteStyle: 'double' }) + ')', 'String object shows as such, double quoted'); - - t.end(); -}); - -test('Numbers', function (t) { - var num = 42; - - t.equal(inspect(num), String(num), 'primitive number shows as such'); - t.equal(inspect(Object(num)), 'Object(' + inspect(num) + ')', 'Number object shows as such'); - - t.end(); -}); - -test('Booleans', function (t) { - t.equal(inspect(true), String(true), 'primitive true shows as such'); - t.equal(inspect(Object(true)), 'Object(' + inspect(true) + ')', 'Boolean object true shows as such'); - - t.equal(inspect(false), String(false), 'primitive false shows as such'); - t.equal(inspect(Object(false)), 'Object(' + inspect(false) + ')', 'Boolean false object shows as such'); - - t.end(); -}); - -test('Date', function (t) { - var now = new Date(); - t.equal(inspect(now), String(now), 'Date shows properly'); - t.equal(inspect(new Date(NaN)), 'Invalid Date', 'Invalid Date shows properly'); - - t.end(); -}); - -test('RegExps', function (t) { - t.equal(inspect(/a/g), '/a/g', 'regex shows properly'); - t.equal(inspect(new RegExp('abc', 'i')), '/abc/i', 'new RegExp shows properly'); - - var match = 'abc abc'.match(/[ab]+/); - delete match.groups; // for node < 10 - t.equal(inspect(match), '[ \'ab\', index: 0, input: \'abc abc\' ]', 'RegExp match object shows properly'); - - t.end(); -}); - -test('Proxies', { skip: typeof Proxy !== 'function' || !hasToStringTag }, function (t) { - var target = { proxy: true }; - var fake = new Proxy(target, { has: function () { return false; } }); - - // needed to work around a weird difference in node v6.0 - v6.4 where non-present properties are not logged - var isNode60 = semver.satisfies(process.version, '6.0 - 6.4'); - - forEach([ - 'Boolean', - 'Number', - 'String', - 'Symbol', - 'Date' - ], function (tag) { - target[Symbol.toStringTag] = tag; - - t.equal( - inspect(fake), - '{ ' + (isNode60 ? '' : 'proxy: true, ') + '[Symbol(Symbol.toStringTag)]: \'' + tag + '\' }', - 'Proxy for + ' + tag + ' shows as the target, which has no slots' - ); - }); - - t.end(); -}); - -test('fakers', { skip: !hasToStringTag }, function (t) { - var target = { proxy: false }; - - forEach([ - 'Boolean', - 'Number', - 'String', - 'Symbol', - 'Date' - ], function (tag) { - target[Symbol.toStringTag] = tag; - - t.equal( - inspect(target), - '{ proxy: false, [Symbol(Symbol.toStringTag)]: \'' + tag + '\' }', - 'Object pretending to be ' + tag + ' does not trick us' - ); - }); - - t.end(); -}); diff --git a/node_modules/object-inspect/util.inspect.js b/node_modules/object-inspect/util.inspect.js deleted file mode 100644 index 7784fab..0000000 --- a/node_modules/object-inspect/util.inspect.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('util').inspect; diff --git a/node_modules/on-finished/HISTORY.md b/node_modules/on-finished/HISTORY.md deleted file mode 100644 index 1917595..0000000 --- a/node_modules/on-finished/HISTORY.md +++ /dev/null @@ -1,98 +0,0 @@ -2.4.1 / 2022-02-22 -================== - - * Fix error on early async hooks implementations - -2.4.0 / 2022-02-21 -================== - - * Prevent loss of async hooks context - -2.3.0 / 2015-05-26 -================== - - * Add defined behavior for HTTP `CONNECT` requests - * Add defined behavior for HTTP `Upgrade` requests - * deps: ee-first@1.1.1 - -2.2.1 / 2015-04-22 -================== - - * Fix `isFinished(req)` when data buffered - -2.2.0 / 2014-12-22 -================== - - * Add message object to callback arguments - -2.1.1 / 2014-10-22 -================== - - * Fix handling of pipelined requests - -2.1.0 / 2014-08-16 -================== - - * Check if `socket` is detached - * Return `undefined` for `isFinished` if state unknown - -2.0.0 / 2014-08-16 -================== - - * Add `isFinished` function - * Move to `jshttp` organization - * Remove support for plain socket argument - * Rename to `on-finished` - * Support both `req` and `res` as arguments - * deps: ee-first@1.0.5 - -1.2.2 / 2014-06-10 -================== - - * Reduce listeners added to emitters - - avoids "event emitter leak" warnings when used multiple times on same request - -1.2.1 / 2014-06-08 -================== - - * Fix returned value when already finished - -1.2.0 / 2014-06-05 -================== - - * Call callback when called on already-finished socket - -1.1.4 / 2014-05-27 -================== - - * Support node.js 0.8 - -1.1.3 / 2014-04-30 -================== - - * Make sure errors passed as instanceof `Error` - -1.1.2 / 2014-04-18 -================== - - * Default the `socket` to passed-in object - -1.1.1 / 2014-01-16 -================== - - * Rename module to `finished` - -1.1.0 / 2013-12-25 -================== - - * Call callback when called on already-errored socket - -1.0.1 / 2013-12-20 -================== - - * Actually pass the error to the callback - -1.0.0 / 2013-12-20 -================== - - * Initial release diff --git a/node_modules/on-finished/LICENSE b/node_modules/on-finished/LICENSE deleted file mode 100644 index 5931fd2..0000000 --- a/node_modules/on-finished/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2013 Jonathan Ong -Copyright (c) 2014 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/on-finished/README.md b/node_modules/on-finished/README.md deleted file mode 100644 index 8973cde..0000000 --- a/node_modules/on-finished/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# on-finished - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-image]][node-url] -[![Build Status][ci-image]][ci-url] -[![Coverage Status][coveralls-image]][coveralls-url] - -Execute a callback when a HTTP request closes, finishes, or errors. - -## Install - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install on-finished -``` - -## API - -```js -var onFinished = require('on-finished') -``` - -### onFinished(res, listener) - -Attach a listener to listen for the response to finish. The listener will -be invoked only once when the response finished. If the response finished -to an error, the first argument will contain the error. If the response -has already finished, the listener will be invoked. - -Listening to the end of a response would be used to close things associated -with the response, like open files. - -Listener is invoked as `listener(err, res)`. - - - -```js -onFinished(res, function (err, res) { - // clean up open fds, etc. - // err contains the error if request error'd -}) -``` - -### onFinished(req, listener) - -Attach a listener to listen for the request to finish. The listener will -be invoked only once when the request finished. If the request finished -to an error, the first argument will contain the error. If the request -has already finished, the listener will be invoked. - -Listening to the end of a request would be used to know when to continue -after reading the data. - -Listener is invoked as `listener(err, req)`. - - - -```js -var data = '' - -req.setEncoding('utf8') -req.on('data', function (str) { - data += str -}) - -onFinished(req, function (err, req) { - // data is read unless there is err -}) -``` - -### onFinished.isFinished(res) - -Determine if `res` is already finished. This would be useful to check and -not even start certain operations if the response has already finished. - -### onFinished.isFinished(req) - -Determine if `req` is already finished. This would be useful to check and -not even start certain operations if the request has already finished. - -## Special Node.js requests - -### HTTP CONNECT method - -The meaning of the `CONNECT` method from RFC 7231, section 4.3.6: - -> The CONNECT method requests that the recipient establish a tunnel to -> the destination origin server identified by the request-target and, -> if successful, thereafter restrict its behavior to blind forwarding -> of packets, in both directions, until the tunnel is closed. Tunnels -> are commonly used to create an end-to-end virtual connection, through -> one or more proxies, which can then be secured using TLS (Transport -> Layer Security, [RFC5246]). - -In Node.js, these request objects come from the `'connect'` event on -the HTTP server. - -When this module is used on a HTTP `CONNECT` request, the request is -considered "finished" immediately, **due to limitations in the Node.js -interface**. This means if the `CONNECT` request contains a request entity, -the request will be considered "finished" even before it has been read. - -There is no such thing as a response object to a `CONNECT` request in -Node.js, so there is no support for one. - -### HTTP Upgrade request - -The meaning of the `Upgrade` header from RFC 7230, section 6.1: - -> The "Upgrade" header field is intended to provide a simple mechanism -> for transitioning from HTTP/1.1 to some other protocol on the same -> connection. - -In Node.js, these request objects come from the `'upgrade'` event on -the HTTP server. - -When this module is used on a HTTP request with an `Upgrade` header, the -request is considered "finished" immediately, **due to limitations in the -Node.js interface**. This means if the `Upgrade` request contains a request -entity, the request will be considered "finished" even before it has been -read. - -There is no such thing as a response object to a `Upgrade` request in -Node.js, so there is no support for one. - -## Example - -The following code ensures that file descriptors are always closed -once the response finishes. - -```js -var destroy = require('destroy') -var fs = require('fs') -var http = require('http') -var onFinished = require('on-finished') - -http.createServer(function onRequest (req, res) { - var stream = fs.createReadStream('package.json') - stream.pipe(res) - onFinished(res, function () { - destroy(stream) - }) -}) -``` - -## License - -[MIT](LICENSE) - -[ci-image]: https://badgen.net/github/checks/jshttp/on-finished/master?label=ci -[ci-url]: https://github.com/jshttp/on-finished/actions/workflows/ci.yml -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/on-finished/master -[coveralls-url]: https://coveralls.io/r/jshttp/on-finished?branch=master -[node-image]: https://badgen.net/npm/node/on-finished -[node-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/on-finished -[npm-url]: https://npmjs.org/package/on-finished -[npm-version-image]: https://badgen.net/npm/v/on-finished diff --git a/node_modules/on-finished/index.js b/node_modules/on-finished/index.js deleted file mode 100644 index e68df7b..0000000 --- a/node_modules/on-finished/index.js +++ /dev/null @@ -1,234 +0,0 @@ -/*! - * on-finished - * Copyright(c) 2013 Jonathan Ong - * Copyright(c) 2014 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module exports. - * @public - */ - -module.exports = onFinished -module.exports.isFinished = isFinished - -/** - * Module dependencies. - * @private - */ - -var asyncHooks = tryRequireAsyncHooks() -var first = require('ee-first') - -/** - * Variables. - * @private - */ - -/* istanbul ignore next */ -var defer = typeof setImmediate === 'function' - ? setImmediate - : function (fn) { process.nextTick(fn.bind.apply(fn, arguments)) } - -/** - * Invoke callback when the response has finished, useful for - * cleaning up resources afterwards. - * - * @param {object} msg - * @param {function} listener - * @return {object} - * @public - */ - -function onFinished (msg, listener) { - if (isFinished(msg) !== false) { - defer(listener, null, msg) - return msg - } - - // attach the listener to the message - attachListener(msg, wrap(listener)) - - return msg -} - -/** - * Determine if message is already finished. - * - * @param {object} msg - * @return {boolean} - * @public - */ - -function isFinished (msg) { - var socket = msg.socket - - if (typeof msg.finished === 'boolean') { - // OutgoingMessage - return Boolean(msg.finished || (socket && !socket.writable)) - } - - if (typeof msg.complete === 'boolean') { - // IncomingMessage - return Boolean(msg.upgrade || !socket || !socket.readable || (msg.complete && !msg.readable)) - } - - // don't know - return undefined -} - -/** - * Attach a finished listener to the message. - * - * @param {object} msg - * @param {function} callback - * @private - */ - -function attachFinishedListener (msg, callback) { - var eeMsg - var eeSocket - var finished = false - - function onFinish (error) { - eeMsg.cancel() - eeSocket.cancel() - - finished = true - callback(error) - } - - // finished on first message event - eeMsg = eeSocket = first([[msg, 'end', 'finish']], onFinish) - - function onSocket (socket) { - // remove listener - msg.removeListener('socket', onSocket) - - if (finished) return - if (eeMsg !== eeSocket) return - - // finished on first socket event - eeSocket = first([[socket, 'error', 'close']], onFinish) - } - - if (msg.socket) { - // socket already assigned - onSocket(msg.socket) - return - } - - // wait for socket to be assigned - msg.on('socket', onSocket) - - if (msg.socket === undefined) { - // istanbul ignore next: node.js 0.8 patch - patchAssignSocket(msg, onSocket) - } -} - -/** - * Attach the listener to the message. - * - * @param {object} msg - * @return {function} - * @private - */ - -function attachListener (msg, listener) { - var attached = msg.__onFinished - - // create a private single listener with queue - if (!attached || !attached.queue) { - attached = msg.__onFinished = createListener(msg) - attachFinishedListener(msg, attached) - } - - attached.queue.push(listener) -} - -/** - * Create listener on message. - * - * @param {object} msg - * @return {function} - * @private - */ - -function createListener (msg) { - function listener (err) { - if (msg.__onFinished === listener) msg.__onFinished = null - if (!listener.queue) return - - var queue = listener.queue - listener.queue = null - - for (var i = 0; i < queue.length; i++) { - queue[i](err, msg) - } - } - - listener.queue = [] - - return listener -} - -/** - * Patch ServerResponse.prototype.assignSocket for node.js 0.8. - * - * @param {ServerResponse} res - * @param {function} callback - * @private - */ - -// istanbul ignore next: node.js 0.8 patch -function patchAssignSocket (res, callback) { - var assignSocket = res.assignSocket - - if (typeof assignSocket !== 'function') return - - // res.on('socket', callback) is broken in 0.8 - res.assignSocket = function _assignSocket (socket) { - assignSocket.call(this, socket) - callback(socket) - } -} - -/** - * Try to require async_hooks - * @private - */ - -function tryRequireAsyncHooks () { - try { - return require('async_hooks') - } catch (e) { - return {} - } -} - -/** - * Wrap function with async resource, if possible. - * AsyncResource.bind static method backported. - * @private - */ - -function wrap (fn) { - var res - - // create anonymous resource - if (asyncHooks.AsyncResource) { - res = new asyncHooks.AsyncResource(fn.name || 'bound-anonymous-fn') - } - - // incompatible node.js - if (!res || !res.runInAsyncScope) { - return fn - } - - // return bound function - return res.runInAsyncScope.bind(res, fn, null) -} diff --git a/node_modules/on-finished/package.json b/node_modules/on-finished/package.json deleted file mode 100644 index 644cd81..0000000 --- a/node_modules/on-finished/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "on-finished", - "description": "Execute a callback when a request closes, finishes, or errors", - "version": "2.4.1", - "contributors": [ - "Douglas Christopher Wilson ", - "Jonathan Ong (http://jongleberry.com)" - ], - "license": "MIT", - "repository": "jshttp/on-finished", - "dependencies": { - "ee-first": "1.1.1" - }, - "devDependencies": { - "eslint": "7.32.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.25.4", - "eslint-plugin-markdown": "2.2.1", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "5.2.0", - "eslint-plugin-standard": "4.1.0", - "mocha": "9.2.1", - "nyc": "15.1.0" - }, - "engines": { - "node": ">= 0.8" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "index.js" - ], - "scripts": { - "lint": "eslint .", - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-ci": "nyc --reporter=lcovonly --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test" - } -} diff --git a/node_modules/once/LICENSE b/node_modules/once/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/once/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/once/README.md b/node_modules/once/README.md deleted file mode 100644 index 1f1ffca..0000000 --- a/node_modules/once/README.md +++ /dev/null @@ -1,79 +0,0 @@ -# once - -Only call a function once. - -## usage - -```javascript -var once = require('once') - -function load (file, cb) { - cb = once(cb) - loader.load('file') - loader.once('load', cb) - loader.once('error', cb) -} -``` - -Or add to the Function.prototype in a responsible way: - -```javascript -// only has to be done once -require('once').proto() - -function load (file, cb) { - cb = cb.once() - loader.load('file') - loader.once('load', cb) - loader.once('error', cb) -} -``` - -Ironically, the prototype feature makes this module twice as -complicated as necessary. - -To check whether you function has been called, use `fn.called`. Once the -function is called for the first time the return value of the original -function is saved in `fn.value` and subsequent calls will continue to -return this value. - -```javascript -var once = require('once') - -function load (cb) { - cb = once(cb) - var stream = createStream() - stream.once('data', cb) - stream.once('end', function () { - if (!cb.called) cb(new Error('not found')) - }) -} -``` - -## `once.strict(func)` - -Throw an error if the function is called twice. - -Some functions are expected to be called only once. Using `once` for them would -potentially hide logical errors. - -In the example below, the `greet` function has to call the callback only once: - -```javascript -function greet (name, cb) { - // return is missing from the if statement - // when no name is passed, the callback is called twice - if (!name) cb('Hello anonymous') - cb('Hello ' + name) -} - -function log (msg) { - console.log(msg) -} - -// this will print 'Hello anonymous' but the logical error will be missed -greet(null, once(msg)) - -// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time -greet(null, once.strict(msg)) -``` diff --git a/node_modules/once/once.js b/node_modules/once/once.js deleted file mode 100644 index 2354067..0000000 --- a/node_modules/once/once.js +++ /dev/null @@ -1,42 +0,0 @@ -var wrappy = require('wrappy') -module.exports = wrappy(once) -module.exports.strict = wrappy(onceStrict) - -once.proto = once(function () { - Object.defineProperty(Function.prototype, 'once', { - value: function () { - return once(this) - }, - configurable: true - }) - - Object.defineProperty(Function.prototype, 'onceStrict', { - value: function () { - return onceStrict(this) - }, - configurable: true - }) -}) - -function once (fn) { - var f = function () { - if (f.called) return f.value - f.called = true - return f.value = fn.apply(this, arguments) - } - f.called = false - return f -} - -function onceStrict (fn) { - var f = function () { - if (f.called) - throw new Error(f.onceError) - f.called = true - return f.value = fn.apply(this, arguments) - } - var name = fn.name || 'Function wrapped with `once`' - f.onceError = name + " shouldn't be called more than once" - f.called = false - return f -} diff --git a/node_modules/once/package.json b/node_modules/once/package.json deleted file mode 100644 index 16815b2..0000000 --- a/node_modules/once/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "once", - "version": "1.4.0", - "description": "Run a function exactly one time", - "main": "once.js", - "directories": { - "test": "test" - }, - "dependencies": { - "wrappy": "1" - }, - "devDependencies": { - "tap": "^7.0.1" - }, - "scripts": { - "test": "tap test/*.js" - }, - "files": [ - "once.js" - ], - "repository": { - "type": "git", - "url": "git://github.com/isaacs/once" - }, - "keywords": [ - "once", - "function", - "one", - "single" - ], - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC" -} diff --git a/node_modules/parseurl/HISTORY.md b/node_modules/parseurl/HISTORY.md deleted file mode 100644 index 8e40954..0000000 --- a/node_modules/parseurl/HISTORY.md +++ /dev/null @@ -1,58 +0,0 @@ -1.3.3 / 2019-04-15 -================== - - * Fix Node.js 0.8 return value inconsistencies - -1.3.2 / 2017-09-09 -================== - - * perf: reduce overhead for full URLs - * perf: unroll the "fast-path" `RegExp` - -1.3.1 / 2016-01-17 -================== - - * perf: enable strict mode - -1.3.0 / 2014-08-09 -================== - - * Add `parseurl.original` for parsing `req.originalUrl` with fallback - * Return `undefined` if `req.url` is `undefined` - -1.2.0 / 2014-07-21 -================== - - * Cache URLs based on original value - * Remove no-longer-needed URL mis-parse work-around - * Simplify the "fast-path" `RegExp` - -1.1.3 / 2014-07-08 -================== - - * Fix typo - -1.1.2 / 2014-07-08 -================== - - * Seriously fix Node.js 0.8 compatibility - -1.1.1 / 2014-07-08 -================== - - * Fix Node.js 0.8 compatibility - -1.1.0 / 2014-07-08 -================== - - * Incorporate URL href-only parse fast-path - -1.0.1 / 2014-03-08 -================== - - * Add missing `require` - -1.0.0 / 2014-03-08 -================== - - * Genesis from `connect` diff --git a/node_modules/parseurl/LICENSE b/node_modules/parseurl/LICENSE deleted file mode 100644 index 27653d3..0000000 --- a/node_modules/parseurl/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ - -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2014-2017 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/parseurl/README.md b/node_modules/parseurl/README.md deleted file mode 100644 index 443e716..0000000 --- a/node_modules/parseurl/README.md +++ /dev/null @@ -1,133 +0,0 @@ -# parseurl - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-image]][node-url] -[![Build Status][travis-image]][travis-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Parse a URL with memoization. - -## Install - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install parseurl -``` - -## API - -```js -var parseurl = require('parseurl') -``` - -### parseurl(req) - -Parse the URL of the given request object (looks at the `req.url` property) -and return the result. The result is the same as `url.parse` in Node.js core. -Calling this function multiple times on the same `req` where `req.url` does -not change will return a cached parsed object, rather than parsing again. - -### parseurl.original(req) - -Parse the original URL of the given request object and return the result. -This works by trying to parse `req.originalUrl` if it is a string, otherwise -parses `req.url`. The result is the same as `url.parse` in Node.js core. -Calling this function multiple times on the same `req` where `req.originalUrl` -does not change will return a cached parsed object, rather than parsing again. - -## Benchmark - -```bash -$ npm run-script bench - -> parseurl@1.3.3 bench nodejs-parseurl -> node benchmark/index.js - - http_parser@2.8.0 - node@10.6.0 - v8@6.7.288.46-node.13 - uv@1.21.0 - zlib@1.2.11 - ares@1.14.0 - modules@64 - nghttp2@1.32.0 - napi@3 - openssl@1.1.0h - icu@61.1 - unicode@10.0 - cldr@33.0 - tz@2018c - -> node benchmark/fullurl.js - - Parsing URL "http://localhost:8888/foo/bar?user=tj&pet=fluffy" - - 4 tests completed. - - fasturl x 2,207,842 ops/sec ±3.76% (184 runs sampled) - nativeurl - legacy x 507,180 ops/sec ±0.82% (191 runs sampled) - nativeurl - whatwg x 290,044 ops/sec ±1.96% (189 runs sampled) - parseurl x 488,907 ops/sec ±2.13% (192 runs sampled) - -> node benchmark/pathquery.js - - Parsing URL "/foo/bar?user=tj&pet=fluffy" - - 4 tests completed. - - fasturl x 3,812,564 ops/sec ±3.15% (188 runs sampled) - nativeurl - legacy x 2,651,631 ops/sec ±1.68% (189 runs sampled) - nativeurl - whatwg x 161,837 ops/sec ±2.26% (189 runs sampled) - parseurl x 4,166,338 ops/sec ±2.23% (184 runs sampled) - -> node benchmark/samerequest.js - - Parsing URL "/foo/bar?user=tj&pet=fluffy" on same request object - - 4 tests completed. - - fasturl x 3,821,651 ops/sec ±2.42% (185 runs sampled) - nativeurl - legacy x 2,651,162 ops/sec ±1.90% (187 runs sampled) - nativeurl - whatwg x 175,166 ops/sec ±1.44% (188 runs sampled) - parseurl x 14,912,606 ops/sec ±3.59% (183 runs sampled) - -> node benchmark/simplepath.js - - Parsing URL "/foo/bar" - - 4 tests completed. - - fasturl x 12,421,765 ops/sec ±2.04% (191 runs sampled) - nativeurl - legacy x 7,546,036 ops/sec ±1.41% (188 runs sampled) - nativeurl - whatwg x 198,843 ops/sec ±1.83% (189 runs sampled) - parseurl x 24,244,006 ops/sec ±0.51% (194 runs sampled) - -> node benchmark/slash.js - - Parsing URL "/" - - 4 tests completed. - - fasturl x 17,159,456 ops/sec ±3.25% (188 runs sampled) - nativeurl - legacy x 11,635,097 ops/sec ±3.79% (184 runs sampled) - nativeurl - whatwg x 240,693 ops/sec ±0.83% (189 runs sampled) - parseurl x 42,279,067 ops/sec ±0.55% (190 runs sampled) -``` - -## License - - [MIT](LICENSE) - -[coveralls-image]: https://badgen.net/coveralls/c/github/pillarjs/parseurl/master -[coveralls-url]: https://coveralls.io/r/pillarjs/parseurl?branch=master -[node-image]: https://badgen.net/npm/node/parseurl -[node-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/parseurl -[npm-url]: https://npmjs.org/package/parseurl -[npm-version-image]: https://badgen.net/npm/v/parseurl -[travis-image]: https://badgen.net/travis/pillarjs/parseurl/master -[travis-url]: https://travis-ci.org/pillarjs/parseurl diff --git a/node_modules/parseurl/index.js b/node_modules/parseurl/index.js deleted file mode 100644 index ece7223..0000000 --- a/node_modules/parseurl/index.js +++ /dev/null @@ -1,158 +0,0 @@ -/*! - * parseurl - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2014-2017 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var url = require('url') -var parse = url.parse -var Url = url.Url - -/** - * Module exports. - * @public - */ - -module.exports = parseurl -module.exports.original = originalurl - -/** - * Parse the `req` url with memoization. - * - * @param {ServerRequest} req - * @return {Object} - * @public - */ - -function parseurl (req) { - var url = req.url - - if (url === undefined) { - // URL is undefined - return undefined - } - - var parsed = req._parsedUrl - - if (fresh(url, parsed)) { - // Return cached URL parse - return parsed - } - - // Parse the URL - parsed = fastparse(url) - parsed._raw = url - - return (req._parsedUrl = parsed) -}; - -/** - * Parse the `req` original url with fallback and memoization. - * - * @param {ServerRequest} req - * @return {Object} - * @public - */ - -function originalurl (req) { - var url = req.originalUrl - - if (typeof url !== 'string') { - // Fallback - return parseurl(req) - } - - var parsed = req._parsedOriginalUrl - - if (fresh(url, parsed)) { - // Return cached URL parse - return parsed - } - - // Parse the URL - parsed = fastparse(url) - parsed._raw = url - - return (req._parsedOriginalUrl = parsed) -}; - -/** - * Parse the `str` url with fast-path short-cut. - * - * @param {string} str - * @return {Object} - * @private - */ - -function fastparse (str) { - if (typeof str !== 'string' || str.charCodeAt(0) !== 0x2f /* / */) { - return parse(str) - } - - var pathname = str - var query = null - var search = null - - // This takes the regexp from https://github.com/joyent/node/pull/7878 - // Which is /^(\/[^?#\s]*)(\?[^#\s]*)?$/ - // And unrolls it into a for loop - for (var i = 1; i < str.length; i++) { - switch (str.charCodeAt(i)) { - case 0x3f: /* ? */ - if (search === null) { - pathname = str.substring(0, i) - query = str.substring(i + 1) - search = str.substring(i) - } - break - case 0x09: /* \t */ - case 0x0a: /* \n */ - case 0x0c: /* \f */ - case 0x0d: /* \r */ - case 0x20: /* */ - case 0x23: /* # */ - case 0xa0: - case 0xfeff: - return parse(str) - } - } - - var url = Url !== undefined - ? new Url() - : {} - - url.path = str - url.href = str - url.pathname = pathname - - if (search !== null) { - url.query = query - url.search = search - } - - return url -} - -/** - * Determine if parsed is still fresh for url. - * - * @param {string} url - * @param {object} parsedUrl - * @return {boolean} - * @private - */ - -function fresh (url, parsedUrl) { - return typeof parsedUrl === 'object' && - parsedUrl !== null && - (Url === undefined || parsedUrl instanceof Url) && - parsedUrl._raw === url -} diff --git a/node_modules/parseurl/package.json b/node_modules/parseurl/package.json deleted file mode 100644 index 6b443ca..0000000 --- a/node_modules/parseurl/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "parseurl", - "description": "parse a url with memoization", - "version": "1.3.3", - "contributors": [ - "Douglas Christopher Wilson ", - "Jonathan Ong (http://jongleberry.com)" - ], - "repository": "pillarjs/parseurl", - "license": "MIT", - "devDependencies": { - "beautify-benchmark": "0.2.4", - "benchmark": "2.1.4", - "eslint": "5.16.0", - "eslint-config-standard": "12.0.0", - "eslint-plugin-import": "2.17.1", - "eslint-plugin-node": "7.0.1", - "eslint-plugin-promise": "4.1.1", - "eslint-plugin-standard": "4.0.0", - "fast-url-parser": "1.1.3", - "istanbul": "0.4.5", - "mocha": "6.1.3" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "README.md", - "index.js" - ], - "engines": { - "node": ">= 0.8" - }, - "scripts": { - "bench": "node benchmark/index.js", - "lint": "eslint .", - "test": "mocha --check-leaks --bail --reporter spec test/", - "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot test/", - "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec test/" - } -} diff --git a/node_modules/path-to-regexp/LICENSE b/node_modules/path-to-regexp/LICENSE deleted file mode 100644 index 983fbe8..0000000 --- a/node_modules/path-to-regexp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/path-to-regexp/Readme.md b/node_modules/path-to-regexp/Readme.md deleted file mode 100644 index f5df40a..0000000 --- a/node_modules/path-to-regexp/Readme.md +++ /dev/null @@ -1,224 +0,0 @@ -# Path-to-RegExp - -> Turn a path string such as `/user/:name` into a regular expression. - -[![NPM version][npm-image]][npm-url] -[![NPM downloads][downloads-image]][downloads-url] -[![Build status][build-image]][build-url] -[![Build coverage][coverage-image]][coverage-url] -[![License][license-image]][license-url] - -## Installation - -``` -npm install path-to-regexp --save -``` - -## Usage - -```js -const { - match, - pathToRegexp, - compile, - parse, - stringify, -} = require("path-to-regexp"); -``` - -### Parameters - -Parameters match arbitrary strings in a path by matching up to the end of the segment, or up to any proceeding tokens. They are defined by prefixing a colon to the parameter name (`:foo`). Parameter names can use any valid JavaScript identifier, or be double quoted to use other characters (`:"param-name"`). - -```js -const fn = match("/:foo/:bar"); - -fn("/test/route"); -//=> { path: '/test/route', params: { foo: 'test', bar: 'route' } } -``` - -### Wildcard - -Wildcard parameters match one or more characters across multiple segments. They are defined the same way as regular parameters, but are prefixed with an asterisk (`*foo`). - -```js -const fn = match("/*splat"); - -fn("/bar/baz"); -//=> { path: '/bar/baz', params: { splat: [ 'bar', 'baz' ] } } -``` - -### Optional - -Braces can be used to define parts of the path that are optional. - -```js -const fn = match("/users{/:id}/delete"); - -fn("/users/delete"); -//=> { path: '/users/delete', params: {} } - -fn("/users/123/delete"); -//=> { path: '/users/123/delete', params: { id: '123' } } -``` - -## Match - -The `match` function returns a function for matching strings against a path: - -- **path** String, `TokenData` object, or array of strings and `TokenData` objects. -- **options** _(optional)_ (Extends [pathToRegexp](#pathToRegexp) options) - - **decode** Function for decoding strings to params, or `false` to disable all processing. (default: `decodeURIComponent`) - -```js -const fn = match("/foo/:bar"); -``` - -**Please note:** `path-to-regexp` is intended for ordered data (e.g. paths, hosts). It can not handle arbitrarily ordered data (e.g. query strings, URL fragments, JSON, etc). - -## PathToRegexp - -The `pathToRegexp` function returns the `regexp` for matching strings against paths, and an array of `keys` for understanding the `RegExp#exec` matches. - -- **path** String, `TokenData` object, or array of strings and `TokenData` objects. -- **options** _(optional)_ (See [parse](#parse) for more options) - - **sensitive** Regexp will be case sensitive. (default: `false`) - - **end** Validate the match reaches the end of the string. (default: `true`) - - **delimiter** The default delimiter for segments, e.g. `[^/]` for `:named` parameters. (default: `'/'`) - - **trailing** Allows optional trailing delimiter to match. (default: `true`) - -```js -const { regexp, keys } = pathToRegexp("/foo/:bar"); - -regexp.exec("/foo/123"); //=> ["/foo/123", "123"] -``` - -## Compile ("Reverse" Path-To-RegExp) - -The `compile` function will return a function for transforming parameters into a valid path: - -- **path** A string or `TokenData` object. -- **options** (See [parse](#parse) for more options) - - **delimiter** The default delimiter for segments, e.g. `[^/]` for `:named` parameters. (default: `'/'`) - - **encode** Function for encoding input strings for output into the path, or `false` to disable entirely. (default: `encodeURIComponent`) - -```js -const toPath = compile("/user/:id"); - -toPath({ id: "name" }); //=> "/user/name" -toPath({ id: "café" }); //=> "/user/caf%C3%A9" - -const toPathRepeated = compile("/*segment"); - -toPathRepeated({ segment: ["foo"] }); //=> "/foo" -toPathRepeated({ segment: ["a", "b", "c"] }); //=> "/a/b/c" - -// When disabling `encode`, you need to make sure inputs are encoded correctly. No arrays are accepted. -const toPathRaw = compile("/user/:id", { encode: false }); - -toPathRaw({ id: "%3A%2F" }); //=> "/user/%3A%2F" -``` - -## Stringify - -Transform a `TokenData` object to a Path-to-RegExp string. - -- **data** A `TokenData` object. - -```js -const data = { - tokens: [ - { type: "text", value: "/" }, - { type: "param", name: "foo" }, - ], -}; - -const path = stringify(data); //=> "/:foo" -``` - -## Developers - -- If you are rewriting paths with match and compile, consider using `encode: false` and `decode: false` to keep raw paths passed around. -- To ensure matches work on paths containing characters usually encoded, such as emoji, consider using [encodeurl](https://github.com/pillarjs/encodeurl) for `encodePath`. - -### Parse - -The `parse` function accepts a string and returns `TokenData`, which can be used with `match` and `compile`. - -- **path** A string. -- **options** _(optional)_ - - **encodePath** A function for encoding input strings. (default: `x => x`, recommended: [`encodeurl`](https://github.com/pillarjs/encodeurl)) - -### Tokens - -`TokenData` has two properties: - -- **tokens** A sequence of tokens, currently of types `text`, `parameter`, `wildcard`, or `group`. -- **originalPath** The original path used with `parse`, shown in error messages to assist debugging. - -### Custom path - -In some applications you may not be able to use the `path-to-regexp` syntax, but you still want to use this library for `match` and `compile`. For example: - -```js -import { match } from "path-to-regexp"; - -const tokens = [ - { type: "text", value: "/" }, - { type: "parameter", name: "foo" }, -]; -const originalPath = "/[foo]"; // To help debug error messages. -const path = { tokens, originalPath }; -const fn = match(path); - -fn("/test"); //=> { path: '/test', index: 0, params: { foo: 'test' } } -``` - -## Errors - -An effort has been made to ensure ambiguous paths from previous releases throw an error. This means you might be seeing an error when things worked before. - -### Missing parameter name - -Parameter names must be provided after `:` or `*`, for example `/*path`. They can be valid JavaScript identifiers (e.g. `:myName`) or JSON strings (`:"my-name"`). - -### Unexpected `?` or `+` - -In past releases, `?`, `*`, and `+` were used to denote optional or repeating parameters. As an alternative, try these: - -- For optional (`?`), use braces: `/file{.:ext}`. -- For one or more (`+`), use a wildcard: `/*path`. -- For zero or more (`*`), use both: `/files{/*path}`. - -### Unexpected `(`, `)`, `[`, `]`, etc. - -Previous versions of Path-to-RegExp used these for RegExp features. This version no longer supports them so they've been reserved to avoid ambiguity. To match these characters literally, escape them with a backslash, e.g. `"\\("`. - -### Unterminated quote - -Parameter names can be wrapped in double quote characters, and this error means you forgot to close the quote character. For example, `:"foo`. - -### Express <= 4.x - -Path-To-RegExp breaks compatibility with Express <= `4.x` in the following ways: - -- The wildcard `*` must have a name and matches the behavior of parameters `:`. -- The optional character `?` is no longer supported, use braces instead: `/:file{.:ext}`. -- Regexp characters are not supported. -- Some characters have been reserved to avoid confusion during upgrade (`()[]?+!`). -- Parameter names now support valid JavaScript identifiers, or quoted like `:"this"`. - -## License - -MIT - -[npm-image]: https://img.shields.io/npm/v/path-to-regexp -[npm-url]: https://npmjs.org/package/path-to-regexp -[downloads-image]: https://img.shields.io/npm/dm/path-to-regexp -[downloads-url]: https://npmjs.org/package/path-to-regexp -[build-image]: https://img.shields.io/github/actions/workflow/status/pillarjs/path-to-regexp/ci.yml?branch=master -[build-url]: https://github.com/pillarjs/path-to-regexp/actions/workflows/ci.yml?query=branch%3Amaster -[coverage-image]: https://img.shields.io/codecov/c/gh/pillarjs/path-to-regexp -[coverage-url]: https://codecov.io/gh/pillarjs/path-to-regexp -[license-image]: http://img.shields.io/npm/l/path-to-regexp.svg?style=flat -[license-url]: LICENSE.md diff --git a/node_modules/path-to-regexp/dist/index.d.ts b/node_modules/path-to-regexp/dist/index.d.ts deleted file mode 100644 index b59dff0..0000000 --- a/node_modules/path-to-regexp/dist/index.d.ts +++ /dev/null @@ -1,144 +0,0 @@ -/** - * Encode a string into another string. - */ -export type Encode = (value: string) => string; -/** - * Decode a string into another string. - */ -export type Decode = (value: string) => string; -export interface ParseOptions { - /** - * A function for encoding input strings. - */ - encodePath?: Encode; -} -export interface PathToRegexpOptions { - /** - * Matches the path completely without trailing characters. (default: `true`) - */ - end?: boolean; - /** - * Allows optional trailing delimiter to match. (default: `true`) - */ - trailing?: boolean; - /** - * Match will be case sensitive. (default: `false`) - */ - sensitive?: boolean; - /** - * The default delimiter for segments. (default: `'/'`) - */ - delimiter?: string; -} -export interface MatchOptions extends PathToRegexpOptions { - /** - * Function for decoding strings for params, or `false` to disable entirely. (default: `decodeURIComponent`) - */ - decode?: Decode | false; -} -export interface CompileOptions { - /** - * Function for encoding input strings for output into the path, or `false` to disable entirely. (default: `encodeURIComponent`) - */ - encode?: Encode | false; - /** - * The default delimiter for segments. (default: `'/'`) - */ - delimiter?: string; -} -/** - * Plain text. - */ -export interface Text { - type: "text"; - value: string; -} -/** - * A parameter designed to match arbitrary text within a segment. - */ -export interface Parameter { - type: "param"; - name: string; -} -/** - * A wildcard parameter designed to match multiple segments. - */ -export interface Wildcard { - type: "wildcard"; - name: string; -} -/** - * A set of possible tokens to expand when matching. - */ -export interface Group { - type: "group"; - tokens: Token[]; -} -/** - * A token that corresponds with a regexp capture. - */ -export type Key = Parameter | Wildcard; -/** - * A sequence of `path-to-regexp` keys that match capturing groups. - */ -export type Keys = Array; -/** - * A sequence of path match characters. - */ -export type Token = Text | Parameter | Wildcard | Group; -/** - * Tokenized path instance. - */ -export declare class TokenData { - readonly tokens: Token[]; - readonly originalPath?: string | undefined; - constructor(tokens: Token[], originalPath?: string | undefined); -} -/** - * ParseError is thrown when there is an error processing the path. - */ -export declare class PathError extends TypeError { - readonly originalPath: string | undefined; - constructor(message: string, originalPath: string | undefined); -} -/** - * Parse a string for the raw tokens. - */ -export declare function parse(str: string, options?: ParseOptions): TokenData; -/** - * Compile a string to a template function for the path. - */ -export declare function compile

(path: Path, options?: CompileOptions & ParseOptions): (params?: P) => string; -export type ParamData = Partial>; -export type PathFunction

= (data?: P) => string; -/** - * A match result contains data about the path match. - */ -export interface MatchResult

{ - path: string; - params: P; -} -/** - * A match is either `false` (no match) or a match result. - */ -export type Match

= false | MatchResult

; -/** - * The match function takes a string and returns whether it matched the path. - */ -export type MatchFunction

= (path: string) => Match

; -/** - * Supported path types. - */ -export type Path = string | TokenData; -/** - * Transform a path into a match function. - */ -export declare function match

(path: Path | Path[], options?: MatchOptions & ParseOptions): MatchFunction

; -export declare function pathToRegexp(path: Path | Path[], options?: PathToRegexpOptions & ParseOptions): { - regexp: RegExp; - keys: Keys; -}; -/** - * Stringify token data into a path string. - */ -export declare function stringify(data: TokenData): string; diff --git a/node_modules/path-to-regexp/dist/index.js b/node_modules/path-to-regexp/dist/index.js deleted file mode 100644 index 9331ae0..0000000 --- a/node_modules/path-to-regexp/dist/index.js +++ /dev/null @@ -1,409 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PathError = exports.TokenData = void 0; -exports.parse = parse; -exports.compile = compile; -exports.match = match; -exports.pathToRegexp = pathToRegexp; -exports.stringify = stringify; -const DEFAULT_DELIMITER = "/"; -const NOOP_VALUE = (value) => value; -const ID_START = /^[$_\p{ID_Start}]$/u; -const ID_CONTINUE = /^[$\u200c\u200d\p{ID_Continue}]$/u; -const SIMPLE_TOKENS = { - // Groups. - "{": "{", - "}": "}", - // Reserved. - "(": "(", - ")": ")", - "[": "[", - "]": "]", - "+": "+", - "?": "?", - "!": "!", -}; -/** - * Escape text for stringify to path. - */ -function escapeText(str) { - return str.replace(/[{}()\[\]+?!:*\\]/g, "\\$&"); -} -/** - * Escape a regular expression string. - */ -function escape(str) { - return str.replace(/[.+*?^${}()[\]|/\\]/g, "\\$&"); -} -/** - * Tokenized path instance. - */ -class TokenData { - constructor(tokens, originalPath) { - this.tokens = tokens; - this.originalPath = originalPath; - } -} -exports.TokenData = TokenData; -/** - * ParseError is thrown when there is an error processing the path. - */ -class PathError extends TypeError { - constructor(message, originalPath) { - let text = message; - if (originalPath) - text += `: ${originalPath}`; - text += `; visit https://git.new/pathToRegexpError for info`; - super(text); - this.originalPath = originalPath; - } -} -exports.PathError = PathError; -/** - * Parse a string for the raw tokens. - */ -function parse(str, options = {}) { - const { encodePath = NOOP_VALUE } = options; - const chars = [...str]; - const tokens = []; - let index = 0; - let pos = 0; - function name() { - let value = ""; - if (ID_START.test(chars[index])) { - do { - value += chars[index++]; - } while (ID_CONTINUE.test(chars[index])); - } - else if (chars[index] === '"') { - let quoteStart = index; - while (index++ < chars.length) { - if (chars[index] === '"') { - index++; - quoteStart = 0; - break; - } - // Increment over escape characters. - if (chars[index] === "\\") - index++; - value += chars[index]; - } - if (quoteStart) { - throw new PathError(`Unterminated quote at index ${quoteStart}`, str); - } - } - if (!value) { - throw new PathError(`Missing parameter name at index ${index}`, str); - } - return value; - } - while (index < chars.length) { - const value = chars[index]; - const type = SIMPLE_TOKENS[value]; - if (type) { - tokens.push({ type, index: index++, value }); - } - else if (value === "\\") { - tokens.push({ type: "escape", index: index++, value: chars[index++] }); - } - else if (value === ":") { - tokens.push({ type: "param", index: index++, value: name() }); - } - else if (value === "*") { - tokens.push({ type: "wildcard", index: index++, value: name() }); - } - else { - tokens.push({ type: "char", index: index++, value }); - } - } - tokens.push({ type: "end", index, value: "" }); - function consumeUntil(endType) { - const output = []; - while (true) { - const token = tokens[pos++]; - if (token.type === endType) - break; - if (token.type === "char" || token.type === "escape") { - let path = token.value; - let cur = tokens[pos]; - while (cur.type === "char" || cur.type === "escape") { - path += cur.value; - cur = tokens[++pos]; - } - output.push({ - type: "text", - value: encodePath(path), - }); - continue; - } - if (token.type === "param" || token.type === "wildcard") { - output.push({ - type: token.type, - name: token.value, - }); - continue; - } - if (token.type === "{") { - output.push({ - type: "group", - tokens: consumeUntil("}"), - }); - continue; - } - throw new PathError(`Unexpected ${token.type} at index ${token.index}, expected ${endType}`, str); - } - return output; - } - return new TokenData(consumeUntil("end"), str); -} -/** - * Compile a string to a template function for the path. - */ -function compile(path, options = {}) { - const { encode = encodeURIComponent, delimiter = DEFAULT_DELIMITER } = options; - const data = typeof path === "object" ? path : parse(path, options); - const fn = tokensToFunction(data.tokens, delimiter, encode); - return function path(params = {}) { - const [path, ...missing] = fn(params); - if (missing.length) { - throw new TypeError(`Missing parameters: ${missing.join(", ")}`); - } - return path; - }; -} -function tokensToFunction(tokens, delimiter, encode) { - const encoders = tokens.map((token) => tokenToFunction(token, delimiter, encode)); - return (data) => { - const result = [""]; - for (const encoder of encoders) { - const [value, ...extras] = encoder(data); - result[0] += value; - result.push(...extras); - } - return result; - }; -} -/** - * Convert a single token into a path building function. - */ -function tokenToFunction(token, delimiter, encode) { - if (token.type === "text") - return () => [token.value]; - if (token.type === "group") { - const fn = tokensToFunction(token.tokens, delimiter, encode); - return (data) => { - const [value, ...missing] = fn(data); - if (!missing.length) - return [value]; - return [""]; - }; - } - const encodeValue = encode || NOOP_VALUE; - if (token.type === "wildcard" && encode !== false) { - return (data) => { - const value = data[token.name]; - if (value == null) - return ["", token.name]; - if (!Array.isArray(value) || value.length === 0) { - throw new TypeError(`Expected "${token.name}" to be a non-empty array`); - } - return [ - value - .map((value, index) => { - if (typeof value !== "string") { - throw new TypeError(`Expected "${token.name}/${index}" to be a string`); - } - return encodeValue(value); - }) - .join(delimiter), - ]; - }; - } - return (data) => { - const value = data[token.name]; - if (value == null) - return ["", token.name]; - if (typeof value !== "string") { - throw new TypeError(`Expected "${token.name}" to be a string`); - } - return [encodeValue(value)]; - }; -} -/** - * Transform a path into a match function. - */ -function match(path, options = {}) { - const { decode = decodeURIComponent, delimiter = DEFAULT_DELIMITER } = options; - const { regexp, keys } = pathToRegexp(path, options); - const decoders = keys.map((key) => { - if (decode === false) - return NOOP_VALUE; - if (key.type === "param") - return decode; - return (value) => value.split(delimiter).map(decode); - }); - return function match(input) { - const m = regexp.exec(input); - if (!m) - return false; - const path = m[0]; - const params = Object.create(null); - for (let i = 1; i < m.length; i++) { - if (m[i] === undefined) - continue; - const key = keys[i - 1]; - const decoder = decoders[i - 1]; - params[key.name] = decoder(m[i]); - } - return { path, params }; - }; -} -function pathToRegexp(path, options = {}) { - const { delimiter = DEFAULT_DELIMITER, end = true, sensitive = false, trailing = true, } = options; - const keys = []; - const flags = sensitive ? "" : "i"; - const sources = []; - for (const input of pathsToArray(path, [])) { - const data = typeof input === "object" ? input : parse(input, options); - for (const tokens of flatten(data.tokens, 0, [])) { - sources.push(toRegExpSource(tokens, delimiter, keys, data.originalPath)); - } - } - let pattern = `^(?:${sources.join("|")})`; - if (trailing) - pattern += `(?:${escape(delimiter)}$)?`; - pattern += end ? "$" : `(?=${escape(delimiter)}|$)`; - const regexp = new RegExp(pattern, flags); - return { regexp, keys }; -} -/** - * Convert a path or array of paths into a flat array. - */ -function pathsToArray(paths, init) { - if (Array.isArray(paths)) { - for (const p of paths) - pathsToArray(p, init); - } - else { - init.push(paths); - } - return init; -} -/** - * Generate a flat list of sequence tokens from the given tokens. - */ -function* flatten(tokens, index, init) { - if (index === tokens.length) { - return yield init; - } - const token = tokens[index]; - if (token.type === "group") { - for (const seq of flatten(token.tokens, 0, init.slice())) { - yield* flatten(tokens, index + 1, seq); - } - } - else { - init.push(token); - } - yield* flatten(tokens, index + 1, init); -} -/** - * Transform a flat sequence of tokens into a regular expression. - */ -function toRegExpSource(tokens, delimiter, keys, originalPath) { - let result = ""; - let backtrack = ""; - let isSafeSegmentParam = true; - for (const token of tokens) { - if (token.type === "text") { - result += escape(token.value); - backtrack += token.value; - isSafeSegmentParam || (isSafeSegmentParam = token.value.includes(delimiter)); - continue; - } - if (token.type === "param" || token.type === "wildcard") { - if (!isSafeSegmentParam && !backtrack) { - throw new PathError(`Missing text before "${token.name}" ${token.type}`, originalPath); - } - if (token.type === "param") { - result += `(${negate(delimiter, isSafeSegmentParam ? "" : backtrack)}+)`; - } - else { - result += `([\\s\\S]+)`; - } - keys.push(token); - backtrack = ""; - isSafeSegmentParam = false; - continue; - } - } - return result; -} -/** - * Block backtracking on previous text and ignore delimiter string. - */ -function negate(delimiter, backtrack) { - if (backtrack.length < 2) { - if (delimiter.length < 2) - return `[^${escape(delimiter + backtrack)}]`; - return `(?:(?!${escape(delimiter)})[^${escape(backtrack)}])`; - } - if (delimiter.length < 2) { - return `(?:(?!${escape(backtrack)})[^${escape(delimiter)}])`; - } - return `(?:(?!${escape(backtrack)}|${escape(delimiter)})[\\s\\S])`; -} -/** - * Stringify an array of tokens into a path string. - */ -function stringifyTokens(tokens) { - let value = ""; - let i = 0; - function name(value) { - const isSafe = isNameSafe(value) && isNextNameSafe(tokens[i]); - return isSafe ? value : JSON.stringify(value); - } - while (i < tokens.length) { - const token = tokens[i++]; - if (token.type === "text") { - value += escapeText(token.value); - continue; - } - if (token.type === "group") { - value += `{${stringifyTokens(token.tokens)}}`; - continue; - } - if (token.type === "param") { - value += `:${name(token.name)}`; - continue; - } - if (token.type === "wildcard") { - value += `*${name(token.name)}`; - continue; - } - throw new TypeError(`Unknown token type: ${token.type}`); - } - return value; -} -/** - * Stringify token data into a path string. - */ -function stringify(data) { - return stringifyTokens(data.tokens); -} -/** - * Validate the parameter name contains valid ID characters. - */ -function isNameSafe(name) { - const [first, ...rest] = name; - return ID_START.test(first) && rest.every((char) => ID_CONTINUE.test(char)); -} -/** - * Validate the next token does not interfere with the current param name. - */ -function isNextNameSafe(token) { - if (token && token.type === "text") - return !ID_CONTINUE.test(token.value[0]); - return true; -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/path-to-regexp/dist/index.js.map b/node_modules/path-to-regexp/dist/index.js.map deleted file mode 100644 index ec14c73..0000000 --- a/node_modules/path-to-regexp/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AA4LA,sBA8GC;AAKD,0BAgBC;AAgHD,sBA+BC;AAED,oCA2BC;AAmJD,8BAEC;AAhoBD,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAC9B,MAAM,UAAU,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,CAAC;AAC5C,MAAM,QAAQ,GAAG,qBAAqB,CAAC;AACvC,MAAM,WAAW,GAAG,mCAAmC,CAAC;AAkFxD,MAAM,aAAa,GAA8B;IAC/C,UAAU;IACV,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,YAAY;IACZ,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;CACT,CAAC;AAEF;;GAEG;AACH,SAAS,UAAU,CAAC,GAAW;IAC7B,OAAO,GAAG,CAAC,OAAO,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC;AACnD,CAAC;AAED;;GAEG;AACH,SAAS,MAAM,CAAC,GAAW;IACzB,OAAO,GAAG,CAAC,OAAO,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAC;AACrD,CAAC;AAiDD;;GAEG;AACH,MAAa,SAAS;IACpB,YACkB,MAAe,EACf,YAAqB;QADrB,WAAM,GAAN,MAAM,CAAS;QACf,iBAAY,GAAZ,YAAY,CAAS;IACpC,CAAC;CACL;AALD,8BAKC;AAED;;GAEG;AACH,MAAa,SAAU,SAAQ,SAAS;IACtC,YACE,OAAe,EACC,YAAgC;QAEhD,IAAI,IAAI,GAAG,OAAO,CAAC;QACnB,IAAI,YAAY;YAAE,IAAI,IAAI,KAAK,YAAY,EAAE,CAAC;QAC9C,IAAI,IAAI,oDAAoD,CAAC;QAC7D,KAAK,CAAC,IAAI,CAAC,CAAC;QALI,iBAAY,GAAZ,YAAY,CAAoB;IAMlD,CAAC;CACF;AAVD,8BAUC;AAED;;GAEG;AACH,SAAgB,KAAK,CAAC,GAAW,EAAE,UAAwB,EAAE;IAC3D,MAAM,EAAE,UAAU,GAAG,UAAU,EAAE,GAAG,OAAO,CAAC;IAC5C,MAAM,KAAK,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;IACvB,MAAM,MAAM,GAAoB,EAAE,CAAC;IACnC,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,GAAG,GAAG,CAAC,CAAC;IAEZ,SAAS,IAAI;QACX,IAAI,KAAK,GAAG,EAAE,CAAC;QAEf,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;YAChC,GAAG,CAAC;gBACF,KAAK,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;YAC1B,CAAC,QAAQ,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE;QAC3C,CAAC;aAAM,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC;YAChC,IAAI,UAAU,GAAG,KAAK,CAAC;YAEvB,OAAO,KAAK,EAAE,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;gBAC9B,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC;oBACzB,KAAK,EAAE,CAAC;oBACR,UAAU,GAAG,CAAC,CAAC;oBACf,MAAM;gBACR,CAAC;gBAED,oCAAoC;gBACpC,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,IAAI;oBAAE,KAAK,EAAE,CAAC;gBAEnC,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;YACxB,CAAC;YAED,IAAI,UAAU,EAAE,CAAC;gBACf,MAAM,IAAI,SAAS,CAAC,+BAA+B,UAAU,EAAE,EAAE,GAAG,CAAC,CAAC;YACxE,CAAC;QACH,CAAC;QAED,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,SAAS,CAAC,mCAAmC,KAAK,EAAE,EAAE,GAAG,CAAC,CAAC;QACvE,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;QAC5B,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;QAC3B,MAAM,IAAI,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;QAElC,IAAI,IAAI,EAAE,CAAC;YACT,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QAC/C,CAAC;aAAM,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YAC1B,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;QACzE,CAAC;aAAM,IAAI,KAAK,KAAK,GAAG,EAAE,CAAC;YACzB,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QAChE,CAAC;aAAM,IAAI,KAAK,KAAK,GAAG,EAAE,CAAC;YACzB,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QACnE,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QACvD,CAAC;IACH,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IAE/C,SAAS,YAAY,CAAC,OAAkB;QACtC,MAAM,MAAM,GAAY,EAAE,CAAC;QAE3B,OAAO,IAAI,EAAE,CAAC;YACZ,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC;YAC5B,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO;gBAAE,MAAM;YAElC,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;gBACrD,IAAI,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC;gBACvB,IAAI,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;gBAEtB,OAAO,GAAG,CAAC,IAAI,KAAK,MAAM,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;oBACpD,IAAI,IAAI,GAAG,CAAC,KAAK,CAAC;oBAClB,GAAG,GAAG,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC;gBACtB,CAAC;gBAED,MAAM,CAAC,IAAI,CAAC;oBACV,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC;iBACxB,CAAC,CAAC;gBACH,SAAS;YACX,CAAC;YAED,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;gBACxD,MAAM,CAAC,IAAI,CAAC;oBACV,IAAI,EAAE,KAAK,CAAC,IAAI;oBAChB,IAAI,EAAE,KAAK,CAAC,KAAK;iBAClB,CAAC,CAAC;gBACH,SAAS;YACX,CAAC;YAED,IAAI,KAAK,CAAC,IAAI,KAAK,GAAG,EAAE,CAAC;gBACvB,MAAM,CAAC,IAAI,CAAC;oBACV,IAAI,EAAE,OAAO;oBACb,MAAM,EAAE,YAAY,CAAC,GAAG,CAAC;iBAC1B,CAAC,CAAC;gBACH,SAAS;YACX,CAAC;YAED,MAAM,IAAI,SAAS,CACjB,cAAc,KAAK,CAAC,IAAI,aAAa,KAAK,CAAC,KAAK,cAAc,OAAO,EAAE,EACvE,GAAG,CACJ,CAAC;QACJ,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,IAAI,SAAS,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC;AACjD,CAAC;AAED;;GAEG;AACH,SAAgB,OAAO,CACrB,IAAU,EACV,UAAyC,EAAE;IAE3C,MAAM,EAAE,MAAM,GAAG,kBAAkB,EAAE,SAAS,GAAG,iBAAiB,EAAE,GAClE,OAAO,CAAC;IACV,MAAM,IAAI,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACpE,MAAM,EAAE,GAAG,gBAAgB,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IAE5D,OAAO,SAAS,IAAI,CAAC,SAAY,EAAO;QACtC,MAAM,CAAC,IAAI,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC;QACtC,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YACnB,MAAM,IAAI,SAAS,CAAC,uBAAuB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACnE,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC;AAKD,SAAS,gBAAgB,CACvB,MAAe,EACf,SAAiB,EACjB,MAAsB;IAEtB,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CACpC,eAAe,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,CAC1C,CAAC;IAEF,OAAO,CAAC,IAAe,EAAE,EAAE;QACzB,MAAM,MAAM,GAAa,CAAC,EAAE,CAAC,CAAC;QAE9B,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;YAC/B,MAAM,CAAC,KAAK,EAAE,GAAG,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;YACzC,MAAM,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC;YACnB,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC;QACzB,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,eAAe,CACtB,KAAY,EACZ,SAAiB,EACjB,MAAsB;IAEtB,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM;QAAE,OAAO,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAEtD,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;QAC3B,MAAM,EAAE,GAAG,gBAAgB,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;QAE7D,OAAO,CAAC,IAAI,EAAE,EAAE;YACd,MAAM,CAAC,KAAK,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;YACrC,IAAI,CAAC,OAAO,CAAC,MAAM;gBAAE,OAAO,CAAC,KAAK,CAAC,CAAC;YACpC,OAAO,CAAC,EAAE,CAAC,CAAC;QACd,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,WAAW,GAAG,MAAM,IAAI,UAAU,CAAC;IAEzC,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,IAAI,MAAM,KAAK,KAAK,EAAE,CAAC;QAClD,OAAO,CAAC,IAAI,EAAE,EAAE;YACd,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC/B,IAAI,KAAK,IAAI,IAAI;gBAAE,OAAO,CAAC,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;YAE3C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAChD,MAAM,IAAI,SAAS,CAAC,aAAa,KAAK,CAAC,IAAI,2BAA2B,CAAC,CAAC;YAC1E,CAAC;YAED,OAAO;gBACL,KAAK;qBACF,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;oBACpB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;wBAC9B,MAAM,IAAI,SAAS,CACjB,aAAa,KAAK,CAAC,IAAI,IAAI,KAAK,kBAAkB,CACnD,CAAC;oBACJ,CAAC;oBAED,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;gBAC5B,CAAC,CAAC;qBACD,IAAI,CAAC,SAAS,CAAC;aACnB,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,IAAI,EAAE,EAAE;QACd,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC/B,IAAI,KAAK,IAAI,IAAI;YAAE,OAAO,CAAC,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAE3C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,MAAM,IAAI,SAAS,CAAC,aAAa,KAAK,CAAC,IAAI,kBAAkB,CAAC,CAAC;QACjE,CAAC;QAED,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9B,CAAC,CAAC;AACJ,CAAC;AAyBD;;GAEG;AACH,SAAgB,KAAK,CACnB,IAAmB,EACnB,UAAuC,EAAE;IAEzC,MAAM,EAAE,MAAM,GAAG,kBAAkB,EAAE,SAAS,GAAG,iBAAiB,EAAE,GAClE,OAAO,CAAC;IACV,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAErD,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;QAChC,IAAI,MAAM,KAAK,KAAK;YAAE,OAAO,UAAU,CAAC;QACxC,IAAI,GAAG,CAAC,IAAI,KAAK,OAAO;YAAE,OAAO,MAAM,CAAC;QACxC,OAAO,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,KAAK,CAAC,KAAa;QACjC,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC7B,IAAI,CAAC,CAAC;YAAE,OAAO,KAAK,CAAC;QAErB,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAClB,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAEnC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAClC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,SAAS;gBAAE,SAAS;YAEjC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACxB,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YAChC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACnC,CAAC;QAED,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC1B,CAAC,CAAC;AACJ,CAAC;AAED,SAAgB,YAAY,CAC1B,IAAmB,EACnB,UAA8C,EAAE;IAEhD,MAAM,EACJ,SAAS,GAAG,iBAAiB,EAC7B,GAAG,GAAG,IAAI,EACV,SAAS,GAAG,KAAK,EACjB,QAAQ,GAAG,IAAI,GAChB,GAAG,OAAO,CAAC;IACZ,MAAM,IAAI,GAAS,EAAE,CAAC;IACtB,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;IACnC,MAAM,OAAO,GAAa,EAAE,CAAC;IAE7B,KAAK,MAAM,KAAK,IAAI,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC;QAC3C,MAAM,IAAI,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACvE,KAAK,MAAM,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;YACjD,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;QAC3E,CAAC;IACH,CAAC;IAED,IAAI,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;IAC1C,IAAI,QAAQ;QAAE,OAAO,IAAI,MAAM,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC;IACtD,OAAO,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC;IAEpD,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC1C,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AAC1B,CAAC;AAED;;GAEG;AACH,SAAS,YAAY,CAAC,KAAoB,EAAE,IAAY;IACtD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,KAAK,MAAM,CAAC,IAAI,KAAK;YAAE,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;IAC/C,CAAC;SAAM,CAAC;QACN,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAOD;;GAEG;AACH,QAAQ,CAAC,CAAC,OAAO,CACf,MAAe,EACf,KAAa,EACb,IAAiB;IAEjB,IAAI,KAAK,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC;QAC5B,OAAO,MAAM,IAAI,CAAC;IACpB,CAAC;IAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAE5B,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;QAC3B,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC;YACzD,KAAK,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;QACzC,CAAC;IACH,CAAC;SAAM,CAAC;QACN,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;AAC1C,CAAC;AAED;;GAEG;AACH,SAAS,cAAc,CACrB,MAAmB,EACnB,SAAiB,EACjB,IAAU,EACV,YAAgC;IAEhC,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,SAAS,GAAG,EAAE,CAAC;IACnB,IAAI,kBAAkB,GAAG,IAAI,CAAC;IAE9B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;YAC1B,MAAM,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAC9B,SAAS,IAAI,KAAK,CAAC,KAAK,CAAC;YACzB,kBAAkB,KAAlB,kBAAkB,GAAK,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAC;YACvD,SAAS;QACX,CAAC;QAED,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;YACxD,IAAI,CAAC,kBAAkB,IAAI,CAAC,SAAS,EAAE,CAAC;gBACtC,MAAM,IAAI,SAAS,CACjB,wBAAwB,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,EAAE,EACnD,YAAY,CACb,CAAC;YACJ,CAAC;YAED,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;gBAC3B,MAAM,IAAI,IAAI,MAAM,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC;YAC3E,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,aAAa,CAAC;YAC1B,CAAC;YAED,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACjB,SAAS,GAAG,EAAE,CAAC;YACf,kBAAkB,GAAG,KAAK,CAAC;YAC3B,SAAS;QACX,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,SAAS,MAAM,CAAC,SAAiB,EAAE,SAAiB;IAClD,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzB,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC;YAAE,OAAO,KAAK,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC,GAAG,CAAC;QACvE,OAAO,SAAS,MAAM,CAAC,SAAS,CAAC,MAAM,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC;IAC/D,CAAC;IACD,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzB,OAAO,SAAS,MAAM,CAAC,SAAS,CAAC,MAAM,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC;IAC/D,CAAC;IACD,OAAO,SAAS,MAAM,CAAC,SAAS,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC;AACrE,CAAC;AAED;;GAEG;AACH,SAAS,eAAe,CAAC,MAAe;IACtC,IAAI,KAAK,GAAG,EAAE,CAAC;IACf,IAAI,CAAC,GAAG,CAAC,CAAC;IAEV,SAAS,IAAI,CAAC,KAAa;QACzB,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9D,OAAO,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC;IAED,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;QACzB,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;QAE1B,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;YAC1B,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACjC,SAAS;QACX,CAAC;QAED,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YAC3B,KAAK,IAAI,IAAI,eAAe,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;YAC9C,SAAS;QACX,CAAC;QAED,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YAC3B,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YAChC,SAAS;QACX,CAAC;QAED,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;YAC9B,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YAChC,SAAS;QACX,CAAC;QAED,MAAM,IAAI,SAAS,CAAC,uBAAwB,KAAa,CAAC,IAAI,EAAE,CAAC,CAAC;IACpE,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,SAAgB,SAAS,CAAC,IAAe;IACvC,OAAO,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACtC,CAAC;AAED;;GAEG;AACH,SAAS,UAAU,CAAC,IAAY;IAC9B,MAAM,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;IAC9B,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC9E,CAAC;AAED;;GAEG;AACH,SAAS,cAAc,CAAC,KAAwB;IAC9C,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM;QAAE,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7E,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["const DEFAULT_DELIMITER = \"/\";\nconst NOOP_VALUE = (value: string) => value;\nconst ID_START = /^[$_\\p{ID_Start}]$/u;\nconst ID_CONTINUE = /^[$\\u200c\\u200d\\p{ID_Continue}]$/u;\n\n/**\n * Encode a string into another string.\n */\nexport type Encode = (value: string) => string;\n\n/**\n * Decode a string into another string.\n */\nexport type Decode = (value: string) => string;\n\nexport interface ParseOptions {\n /**\n * A function for encoding input strings.\n */\n encodePath?: Encode;\n}\n\nexport interface PathToRegexpOptions {\n /**\n * Matches the path completely without trailing characters. (default: `true`)\n */\n end?: boolean;\n /**\n * Allows optional trailing delimiter to match. (default: `true`)\n */\n trailing?: boolean;\n /**\n * Match will be case sensitive. (default: `false`)\n */\n sensitive?: boolean;\n /**\n * The default delimiter for segments. (default: `'/'`)\n */\n delimiter?: string;\n}\n\nexport interface MatchOptions extends PathToRegexpOptions {\n /**\n * Function for decoding strings for params, or `false` to disable entirely. (default: `decodeURIComponent`)\n */\n decode?: Decode | false;\n}\n\nexport interface CompileOptions {\n /**\n * Function for encoding input strings for output into the path, or `false` to disable entirely. (default: `encodeURIComponent`)\n */\n encode?: Encode | false;\n /**\n * The default delimiter for segments. (default: `'/'`)\n */\n delimiter?: string;\n}\n\ntype TokenType =\n | \"{\"\n | \"}\"\n | \"wildcard\"\n | \"param\"\n | \"char\"\n | \"escape\"\n | \"end\"\n // Reserved for use or ambiguous due to past use.\n | \"(\"\n | \")\"\n | \"[\"\n | \"]\"\n | \"+\"\n | \"?\"\n | \"!\";\n\n/**\n * Tokenizer results.\n */\ninterface LexToken {\n type: TokenType;\n index: number;\n value: string;\n}\n\nconst SIMPLE_TOKENS: Record = {\n // Groups.\n \"{\": \"{\",\n \"}\": \"}\",\n // Reserved.\n \"(\": \"(\",\n \")\": \")\",\n \"[\": \"[\",\n \"]\": \"]\",\n \"+\": \"+\",\n \"?\": \"?\",\n \"!\": \"!\",\n};\n\n/**\n * Escape text for stringify to path.\n */\nfunction escapeText(str: string) {\n return str.replace(/[{}()\\[\\]+?!:*\\\\]/g, \"\\\\$&\");\n}\n\n/**\n * Escape a regular expression string.\n */\nfunction escape(str: string) {\n return str.replace(/[.+*?^${}()[\\]|/\\\\]/g, \"\\\\$&\");\n}\n\n/**\n * Plain text.\n */\nexport interface Text {\n type: \"text\";\n value: string;\n}\n\n/**\n * A parameter designed to match arbitrary text within a segment.\n */\nexport interface Parameter {\n type: \"param\";\n name: string;\n}\n\n/**\n * A wildcard parameter designed to match multiple segments.\n */\nexport interface Wildcard {\n type: \"wildcard\";\n name: string;\n}\n\n/**\n * A set of possible tokens to expand when matching.\n */\nexport interface Group {\n type: \"group\";\n tokens: Token[];\n}\n\n/**\n * A token that corresponds with a regexp capture.\n */\nexport type Key = Parameter | Wildcard;\n\n/**\n * A sequence of `path-to-regexp` keys that match capturing groups.\n */\nexport type Keys = Array;\n\n/**\n * A sequence of path match characters.\n */\nexport type Token = Text | Parameter | Wildcard | Group;\n\n/**\n * Tokenized path instance.\n */\nexport class TokenData {\n constructor(\n public readonly tokens: Token[],\n public readonly originalPath?: string,\n ) {}\n}\n\n/**\n * ParseError is thrown when there is an error processing the path.\n */\nexport class PathError extends TypeError {\n constructor(\n message: string,\n public readonly originalPath: string | undefined,\n ) {\n let text = message;\n if (originalPath) text += `: ${originalPath}`;\n text += `; visit https://git.new/pathToRegexpError for info`;\n super(text);\n }\n}\n\n/**\n * Parse a string for the raw tokens.\n */\nexport function parse(str: string, options: ParseOptions = {}): TokenData {\n const { encodePath = NOOP_VALUE } = options;\n const chars = [...str];\n const tokens: Array = [];\n let index = 0;\n let pos = 0;\n\n function name() {\n let value = \"\";\n\n if (ID_START.test(chars[index])) {\n do {\n value += chars[index++];\n } while (ID_CONTINUE.test(chars[index]));\n } else if (chars[index] === '\"') {\n let quoteStart = index;\n\n while (index++ < chars.length) {\n if (chars[index] === '\"') {\n index++;\n quoteStart = 0;\n break;\n }\n\n // Increment over escape characters.\n if (chars[index] === \"\\\\\") index++;\n\n value += chars[index];\n }\n\n if (quoteStart) {\n throw new PathError(`Unterminated quote at index ${quoteStart}`, str);\n }\n }\n\n if (!value) {\n throw new PathError(`Missing parameter name at index ${index}`, str);\n }\n\n return value;\n }\n\n while (index < chars.length) {\n const value = chars[index];\n const type = SIMPLE_TOKENS[value];\n\n if (type) {\n tokens.push({ type, index: index++, value });\n } else if (value === \"\\\\\") {\n tokens.push({ type: \"escape\", index: index++, value: chars[index++] });\n } else if (value === \":\") {\n tokens.push({ type: \"param\", index: index++, value: name() });\n } else if (value === \"*\") {\n tokens.push({ type: \"wildcard\", index: index++, value: name() });\n } else {\n tokens.push({ type: \"char\", index: index++, value });\n }\n }\n\n tokens.push({ type: \"end\", index, value: \"\" });\n\n function consumeUntil(endType: TokenType): Token[] {\n const output: Token[] = [];\n\n while (true) {\n const token = tokens[pos++];\n if (token.type === endType) break;\n\n if (token.type === \"char\" || token.type === \"escape\") {\n let path = token.value;\n let cur = tokens[pos];\n\n while (cur.type === \"char\" || cur.type === \"escape\") {\n path += cur.value;\n cur = tokens[++pos];\n }\n\n output.push({\n type: \"text\",\n value: encodePath(path),\n });\n continue;\n }\n\n if (token.type === \"param\" || token.type === \"wildcard\") {\n output.push({\n type: token.type,\n name: token.value,\n });\n continue;\n }\n\n if (token.type === \"{\") {\n output.push({\n type: \"group\",\n tokens: consumeUntil(\"}\"),\n });\n continue;\n }\n\n throw new PathError(\n `Unexpected ${token.type} at index ${token.index}, expected ${endType}`,\n str,\n );\n }\n\n return output;\n }\n\n return new TokenData(consumeUntil(\"end\"), str);\n}\n\n/**\n * Compile a string to a template function for the path.\n */\nexport function compile

(\n path: Path,\n options: CompileOptions & ParseOptions = {},\n) {\n const { encode = encodeURIComponent, delimiter = DEFAULT_DELIMITER } =\n options;\n const data = typeof path === \"object\" ? path : parse(path, options);\n const fn = tokensToFunction(data.tokens, delimiter, encode);\n\n return function path(params: P = {} as P) {\n const [path, ...missing] = fn(params);\n if (missing.length) {\n throw new TypeError(`Missing parameters: ${missing.join(\", \")}`);\n }\n return path;\n };\n}\n\nexport type ParamData = Partial>;\nexport type PathFunction

= (data?: P) => string;\n\nfunction tokensToFunction(\n tokens: Token[],\n delimiter: string,\n encode: Encode | false,\n) {\n const encoders = tokens.map((token) =>\n tokenToFunction(token, delimiter, encode),\n );\n\n return (data: ParamData) => {\n const result: string[] = [\"\"];\n\n for (const encoder of encoders) {\n const [value, ...extras] = encoder(data);\n result[0] += value;\n result.push(...extras);\n }\n\n return result;\n };\n}\n\n/**\n * Convert a single token into a path building function.\n */\nfunction tokenToFunction(\n token: Token,\n delimiter: string,\n encode: Encode | false,\n): (data: ParamData) => string[] {\n if (token.type === \"text\") return () => [token.value];\n\n if (token.type === \"group\") {\n const fn = tokensToFunction(token.tokens, delimiter, encode);\n\n return (data) => {\n const [value, ...missing] = fn(data);\n if (!missing.length) return [value];\n return [\"\"];\n };\n }\n\n const encodeValue = encode || NOOP_VALUE;\n\n if (token.type === \"wildcard\" && encode !== false) {\n return (data) => {\n const value = data[token.name];\n if (value == null) return [\"\", token.name];\n\n if (!Array.isArray(value) || value.length === 0) {\n throw new TypeError(`Expected \"${token.name}\" to be a non-empty array`);\n }\n\n return [\n value\n .map((value, index) => {\n if (typeof value !== \"string\") {\n throw new TypeError(\n `Expected \"${token.name}/${index}\" to be a string`,\n );\n }\n\n return encodeValue(value);\n })\n .join(delimiter),\n ];\n };\n }\n\n return (data) => {\n const value = data[token.name];\n if (value == null) return [\"\", token.name];\n\n if (typeof value !== \"string\") {\n throw new TypeError(`Expected \"${token.name}\" to be a string`);\n }\n\n return [encodeValue(value)];\n };\n}\n\n/**\n * A match result contains data about the path match.\n */\nexport interface MatchResult

{\n path: string;\n params: P;\n}\n\n/**\n * A match is either `false` (no match) or a match result.\n */\nexport type Match

= false | MatchResult

;\n\n/**\n * The match function takes a string and returns whether it matched the path.\n */\nexport type MatchFunction

= (path: string) => Match

;\n\n/**\n * Supported path types.\n */\nexport type Path = string | TokenData;\n\n/**\n * Transform a path into a match function.\n */\nexport function match

(\n path: Path | Path[],\n options: MatchOptions & ParseOptions = {},\n): MatchFunction

{\n const { decode = decodeURIComponent, delimiter = DEFAULT_DELIMITER } =\n options;\n const { regexp, keys } = pathToRegexp(path, options);\n\n const decoders = keys.map((key) => {\n if (decode === false) return NOOP_VALUE;\n if (key.type === \"param\") return decode;\n return (value: string) => value.split(delimiter).map(decode);\n });\n\n return function match(input: string) {\n const m = regexp.exec(input);\n if (!m) return false;\n\n const path = m[0];\n const params = Object.create(null);\n\n for (let i = 1; i < m.length; i++) {\n if (m[i] === undefined) continue;\n\n const key = keys[i - 1];\n const decoder = decoders[i - 1];\n params[key.name] = decoder(m[i]);\n }\n\n return { path, params };\n };\n}\n\nexport function pathToRegexp(\n path: Path | Path[],\n options: PathToRegexpOptions & ParseOptions = {},\n) {\n const {\n delimiter = DEFAULT_DELIMITER,\n end = true,\n sensitive = false,\n trailing = true,\n } = options;\n const keys: Keys = [];\n const flags = sensitive ? \"\" : \"i\";\n const sources: string[] = [];\n\n for (const input of pathsToArray(path, [])) {\n const data = typeof input === \"object\" ? input : parse(input, options);\n for (const tokens of flatten(data.tokens, 0, [])) {\n sources.push(toRegExpSource(tokens, delimiter, keys, data.originalPath));\n }\n }\n\n let pattern = `^(?:${sources.join(\"|\")})`;\n if (trailing) pattern += `(?:${escape(delimiter)}$)?`;\n pattern += end ? \"$\" : `(?=${escape(delimiter)}|$)`;\n\n const regexp = new RegExp(pattern, flags);\n return { regexp, keys };\n}\n\n/**\n * Convert a path or array of paths into a flat array.\n */\nfunction pathsToArray(paths: Path | Path[], init: Path[]): Path[] {\n if (Array.isArray(paths)) {\n for (const p of paths) pathsToArray(p, init);\n } else {\n init.push(paths);\n }\n return init;\n}\n\n/**\n * Flattened token set.\n */\ntype FlatToken = Text | Parameter | Wildcard;\n\n/**\n * Generate a flat list of sequence tokens from the given tokens.\n */\nfunction* flatten(\n tokens: Token[],\n index: number,\n init: FlatToken[],\n): Generator {\n if (index === tokens.length) {\n return yield init;\n }\n\n const token = tokens[index];\n\n if (token.type === \"group\") {\n for (const seq of flatten(token.tokens, 0, init.slice())) {\n yield* flatten(tokens, index + 1, seq);\n }\n } else {\n init.push(token);\n }\n\n yield* flatten(tokens, index + 1, init);\n}\n\n/**\n * Transform a flat sequence of tokens into a regular expression.\n */\nfunction toRegExpSource(\n tokens: FlatToken[],\n delimiter: string,\n keys: Keys,\n originalPath: string | undefined,\n): string {\n let result = \"\";\n let backtrack = \"\";\n let isSafeSegmentParam = true;\n\n for (const token of tokens) {\n if (token.type === \"text\") {\n result += escape(token.value);\n backtrack += token.value;\n isSafeSegmentParam ||= token.value.includes(delimiter);\n continue;\n }\n\n if (token.type === \"param\" || token.type === \"wildcard\") {\n if (!isSafeSegmentParam && !backtrack) {\n throw new PathError(\n `Missing text before \"${token.name}\" ${token.type}`,\n originalPath,\n );\n }\n\n if (token.type === \"param\") {\n result += `(${negate(delimiter, isSafeSegmentParam ? \"\" : backtrack)}+)`;\n } else {\n result += `([\\\\s\\\\S]+)`;\n }\n\n keys.push(token);\n backtrack = \"\";\n isSafeSegmentParam = false;\n continue;\n }\n }\n\n return result;\n}\n\n/**\n * Block backtracking on previous text and ignore delimiter string.\n */\nfunction negate(delimiter: string, backtrack: string): string {\n if (backtrack.length < 2) {\n if (delimiter.length < 2) return `[^${escape(delimiter + backtrack)}]`;\n return `(?:(?!${escape(delimiter)})[^${escape(backtrack)}])`;\n }\n if (delimiter.length < 2) {\n return `(?:(?!${escape(backtrack)})[^${escape(delimiter)}])`;\n }\n return `(?:(?!${escape(backtrack)}|${escape(delimiter)})[\\\\s\\\\S])`;\n}\n\n/**\n * Stringify an array of tokens into a path string.\n */\nfunction stringifyTokens(tokens: Token[]): string {\n let value = \"\";\n let i = 0;\n\n function name(value: string) {\n const isSafe = isNameSafe(value) && isNextNameSafe(tokens[i]);\n return isSafe ? value : JSON.stringify(value);\n }\n\n while (i < tokens.length) {\n const token = tokens[i++];\n\n if (token.type === \"text\") {\n value += escapeText(token.value);\n continue;\n }\n\n if (token.type === \"group\") {\n value += `{${stringifyTokens(token.tokens)}}`;\n continue;\n }\n\n if (token.type === \"param\") {\n value += `:${name(token.name)}`;\n continue;\n }\n\n if (token.type === \"wildcard\") {\n value += `*${name(token.name)}`;\n continue;\n }\n\n throw new TypeError(`Unknown token type: ${(token as any).type}`);\n }\n\n return value;\n}\n\n/**\n * Stringify token data into a path string.\n */\nexport function stringify(data: TokenData): string {\n return stringifyTokens(data.tokens);\n}\n\n/**\n * Validate the parameter name contains valid ID characters.\n */\nfunction isNameSafe(name: string): boolean {\n const [first, ...rest] = name;\n return ID_START.test(first) && rest.every((char) => ID_CONTINUE.test(char));\n}\n\n/**\n * Validate the next token does not interfere with the current param name.\n */\nfunction isNextNameSafe(token: Token | undefined): boolean {\n if (token && token.type === \"text\") return !ID_CONTINUE.test(token.value[0]);\n return true;\n}\n"]} \ No newline at end of file diff --git a/node_modules/path-to-regexp/package.json b/node_modules/path-to-regexp/package.json deleted file mode 100644 index 7ae266e..0000000 --- a/node_modules/path-to-regexp/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "path-to-regexp", - "version": "8.3.0", - "description": "Express style path to RegExp utility", - "keywords": [ - "express", - "regexp", - "route", - "routing" - ], - "repository": { - "type": "git", - "url": "https://github.com/pillarjs/path-to-regexp.git" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - }, - "license": "MIT", - "exports": "./dist/index.js", - "main": "dist/index.js", - "typings": "dist/index.d.ts", - "files": [ - "dist/" - ], - "scripts": { - "bench": "vitest bench", - "build": "ts-scripts build", - "format": "ts-scripts format", - "lint": "ts-scripts lint", - "prepare": "ts-scripts install && npm run build", - "size": "size-limit", - "specs": "ts-scripts specs", - "test": "ts-scripts test && npm run size" - }, - "devDependencies": { - "@borderless/ts-scripts": "^0.15.0", - "@size-limit/preset-small-lib": "^11.1.2", - "@types/node": "^22.7.2", - "@types/semver": "^7.3.1", - "@vitest/coverage-v8": "^3.0.5", - "recheck": "^4.4.5", - "size-limit": "^11.1.2", - "typescript": "^5.7.3", - "vitest": "^3.0.5" - }, - "publishConfig": { - "access": "public" - }, - "size-limit": [ - { - "path": "dist/index.js", - "limit": "2 kB" - } - ], - "ts-scripts": { - "dist": [ - "dist" - ], - "project": [ - "tsconfig.build.json" - ] - } -} diff --git a/node_modules/pg-cloudflare/LICENSE b/node_modules/pg-cloudflare/LICENSE deleted file mode 100644 index 5c14056..0000000 --- a/node_modules/pg-cloudflare/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2010 - 2021 Brian Carlson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/pg-cloudflare/README.md b/node_modules/pg-cloudflare/README.md deleted file mode 100644 index 68663c4..0000000 --- a/node_modules/pg-cloudflare/README.md +++ /dev/null @@ -1,112 +0,0 @@ -# pg-cloudflare - -`pg-cloudflare` makes it easier to take an existing package that relies on `tls` and `net`, and make it work in environments where only `connect()` is supported, such as Cloudflare Workers. - -`pg-cloudflare` wraps `connect()`, the [TCP Socket API](https://github.com/wintercg/proposal-sockets-api) proposed within WinterCG, and implemented in [Cloudflare Workers](https://developers.cloudflare.com/workers/runtime-apis/tcp-sockets/), and exposes an interface with methods similar to what the `net` and `tls` modules in Node.js expose. (ex: `net.connect(path[, options][, callback])`). This minimizes the number of changes needed in order to make an existing package work across JavaScript runtimes. - -## Installation - -``` -npm i --save-dev pg-cloudflare -``` - -The package uses conditional exports to support bundlers that don't know about -`cloudflare:sockets`, so the consumer code by default imports an empty file. To -enable the package, resolve to the `cloudflare` condition in your bundler's -config. For example: - -- `webpack.config.js` - ```js - export default { - ..., - resolve: { conditionNames: [..., "workerd"] }, - plugins: [ - // ignore cloudflare:sockets imports - new webpack.IgnorePlugin({ - resourceRegExp: /^cloudflare:sockets$/, - }), - ], - } - ``` -- `vite.config.js` - - > [!NOTE] - > If you are using the [Cloudflare Vite plugin](https://www.npmjs.com/package/@cloudflare/vite-plugin) then the following configuration is not necessary. - - ```js - export default defineConfig({ - ..., - resolve: { - conditions: [..., "workerd"], - }, - build: { - ..., - // don't try to bundle cloudflare:sockets - rollupOptions: { - external: [..., 'cloudflare:sockets'], - }, - }, - }) - ``` - -- `rollup.config.js` - ```js - export default defineConfig({ - ..., - plugins: [..., nodeResolve({ exportConditions: [..., 'workerd'] })], - // don't try to bundle cloudflare:sockets - external: [..., 'cloudflare:sockets'], - }) - ``` -- `esbuild.config.js` - ```js - await esbuild.build({ - ..., - conditions: [..., 'workerd'], - }) - ``` - -The concrete examples can be found in `packages/pg-bundler-test`. - -## How to use conditionally, in non-Node.js environments - -As implemented in `pg` [here](https://github.com/brianc/node-postgres/commit/07553428e9c0eacf761a5d4541a3300ff7859578#diff-34588ad868ebcb232660aba7ee6a99d1e02f4bc93f73497d2688c3f074e60533R5-R13), a typical use case might look as follows, where in a Node.js environment the `net` module is used, while in a non-Node.js environment, where `net` is unavailable, `pg-cloudflare` is used instead, providing an equivalent interface: - -```js -module.exports.getStream = function getStream(ssl = false) { - const net = require('net') - if (typeof net.Socket === 'function') { - return net.Socket() - } - const { CloudflareSocket } = require('pg-cloudflare') - return new CloudflareSocket(ssl) -} -``` - -## Node.js implementation of the Socket API proposal - -If you're looking for a way to rely on `connect()` as the interface you use to interact with raw sockets, but need this interface to be available in a Node.js environment, [`@arrowood.dev/socket`](https://github.com/Ethan-Arrowood/socket) provides a Node.js implementation of the Socket API. - -### license - -The MIT License (MIT) - -Copyright (c) 2023 Brian M. Carlson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/pg-cloudflare/dist/empty.d.ts b/node_modules/pg-cloudflare/dist/empty.d.ts deleted file mode 100644 index d87c485..0000000 --- a/node_modules/pg-cloudflare/dist/empty.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: {}; -export default _default; diff --git a/node_modules/pg-cloudflare/dist/empty.js b/node_modules/pg-cloudflare/dist/empty.js deleted file mode 100644 index bd78fc9..0000000 --- a/node_modules/pg-cloudflare/dist/empty.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -// This is an empty module that is served up when outside of a workerd environment -// See the `exports` field in package.json -exports.default = {}; -//# sourceMappingURL=empty.js.map \ No newline at end of file diff --git a/node_modules/pg-cloudflare/dist/empty.js.map b/node_modules/pg-cloudflare/dist/empty.js.map deleted file mode 100644 index 3eaa3b1..0000000 --- a/node_modules/pg-cloudflare/dist/empty.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"empty.js","sourceRoot":"","sources":["../src/empty.ts"],"names":[],"mappings":";;AAAA,kFAAkF;AAClF,0CAA0C;AAC1C,kBAAe,EAAE,CAAA"} \ No newline at end of file diff --git a/node_modules/pg-cloudflare/dist/index.d.ts b/node_modules/pg-cloudflare/dist/index.d.ts deleted file mode 100644 index a779d14..0000000 --- a/node_modules/pg-cloudflare/dist/index.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/// -/// -/// -import { TlsOptions } from 'cloudflare:sockets'; -import { EventEmitter } from 'events'; -/** - * Wrapper around the Cloudflare built-in socket that can be used by the `Connection`. - */ -export declare class CloudflareSocket extends EventEmitter { - readonly ssl: boolean; - writable: boolean; - destroyed: boolean; - private _upgrading; - private _upgraded; - private _cfSocket; - private _cfWriter; - private _cfReader; - constructor(ssl: boolean); - setNoDelay(): this; - setKeepAlive(): this; - ref(): this; - unref(): this; - connect(port: number, host: string, connectListener?: (...args: unknown[]) => void): Promise; - _listen(): Promise; - _listenOnce(): Promise; - write(data: Uint8Array | string, encoding?: BufferEncoding, callback?: (...args: unknown[]) => void): true | void; - end(data?: Buffer, encoding?: BufferEncoding, callback?: (...args: unknown[]) => void): this; - destroy(reason: string): this; - startTls(options: TlsOptions): void; - _addClosedHandler(): void; -} diff --git a/node_modules/pg-cloudflare/dist/index.js b/node_modules/pg-cloudflare/dist/index.js deleted file mode 100644 index 0323398..0000000 --- a/node_modules/pg-cloudflare/dist/index.js +++ /dev/null @@ -1,152 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CloudflareSocket = void 0; -const events_1 = require("events"); -/** - * Wrapper around the Cloudflare built-in socket that can be used by the `Connection`. - */ -class CloudflareSocket extends events_1.EventEmitter { - constructor(ssl) { - super(); - this.ssl = ssl; - this.writable = false; - this.destroyed = false; - this._upgrading = false; - this._upgraded = false; - this._cfSocket = null; - this._cfWriter = null; - this._cfReader = null; - } - setNoDelay() { - return this; - } - setKeepAlive() { - return this; - } - ref() { - return this; - } - unref() { - return this; - } - async connect(port, host, connectListener) { - try { - log('connecting'); - if (connectListener) - this.once('connect', connectListener); - const options = this.ssl ? { secureTransport: 'starttls' } : {}; - const mod = await import('cloudflare:sockets'); - const connect = mod.connect; - this._cfSocket = connect(`${host}:${port}`, options); - this._cfWriter = this._cfSocket.writable.getWriter(); - this._addClosedHandler(); - this._cfReader = this._cfSocket.readable.getReader(); - if (this.ssl) { - this._listenOnce().catch((e) => this.emit('error', e)); - } - else { - this._listen().catch((e) => this.emit('error', e)); - } - await this._cfWriter.ready; - log('socket ready'); - this.writable = true; - this.emit('connect'); - return this; - } - catch (e) { - this.emit('error', e); - } - } - async _listen() { - // eslint-disable-next-line no-constant-condition - while (true) { - log('awaiting receive from CF socket'); - const { done, value } = await this._cfReader.read(); - log('CF socket received:', done, value); - if (done) { - log('done'); - break; - } - this.emit('data', Buffer.from(value)); - } - } - async _listenOnce() { - log('awaiting first receive from CF socket'); - const { done, value } = await this._cfReader.read(); - log('First CF socket received:', done, value); - this.emit('data', Buffer.from(value)); - } - write(data, encoding = 'utf8', callback = () => { }) { - if (data.length === 0) - return callback(); - if (typeof data === 'string') - data = Buffer.from(data, encoding); - log('sending data direct:', data); - this._cfWriter.write(data).then(() => { - log('data sent'); - callback(); - }, (err) => { - log('send error', err); - callback(err); - }); - return true; - } - end(data = Buffer.alloc(0), encoding = 'utf8', callback = () => { }) { - log('ending CF socket'); - this.write(data, encoding, (err) => { - this._cfSocket.close(); - if (callback) - callback(err); - }); - return this; - } - destroy(reason) { - log('destroying CF socket', reason); - this.destroyed = true; - return this.end(); - } - startTls(options) { - if (this._upgraded) { - // Don't try to upgrade again. - this.emit('error', 'Cannot call `startTls()` more than once on a socket'); - return; - } - this._cfWriter.releaseLock(); - this._cfReader.releaseLock(); - this._upgrading = true; - this._cfSocket = this._cfSocket.startTls(options); - this._cfWriter = this._cfSocket.writable.getWriter(); - this._cfReader = this._cfSocket.readable.getReader(); - this._addClosedHandler(); - this._listen().catch((e) => this.emit('error', e)); - } - _addClosedHandler() { - this._cfSocket.closed.then(() => { - if (!this._upgrading) { - log('CF socket closed'); - this._cfSocket = null; - this.emit('close'); - } - else { - this._upgrading = false; - this._upgraded = true; - } - }).catch((e) => this.emit('error', e)); - } -} -exports.CloudflareSocket = CloudflareSocket; -const debug = false; -function dump(data) { - if (data instanceof Uint8Array || data instanceof ArrayBuffer) { - const hex = Buffer.from(data).toString('hex'); - const str = new TextDecoder().decode(data); - return `\n>>> STR: "${str.replace(/\n/g, '\\n')}"\n>>> HEX: ${hex}\n`; - } - else { - return data; - } -} -function log(...args) { - debug && console.log(...args.map(dump)); -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/pg-cloudflare/dist/index.js.map b/node_modules/pg-cloudflare/dist/index.js.map deleted file mode 100644 index abfb848..0000000 --- a/node_modules/pg-cloudflare/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,mCAAqC;AAErC;;GAEG;AACH,MAAa,gBAAiB,SAAQ,qBAAY;IAUhD,YAAqB,GAAY;QAC/B,KAAK,EAAE,CAAA;QADY,QAAG,GAAH,GAAG,CAAS;QATjC,aAAQ,GAAG,KAAK,CAAA;QAChB,cAAS,GAAG,KAAK,CAAA;QAET,eAAU,GAAG,KAAK,CAAA;QAClB,cAAS,GAAG,KAAK,CAAA;QACjB,cAAS,GAAkB,IAAI,CAAA;QAC/B,cAAS,GAAuC,IAAI,CAAA;QACpD,cAAS,GAAuC,IAAI,CAAA;IAI5D,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAA;IACb,CAAC;IACD,YAAY;QACV,OAAO,IAAI,CAAA;IACb,CAAC;IACD,GAAG;QACD,OAAO,IAAI,CAAA;IACb,CAAC;IACD,KAAK;QACH,OAAO,IAAI,CAAA;IACb,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,IAAY,EAAE,IAAY,EAAE,eAA8C;QACtF,IAAI;YACF,GAAG,CAAC,YAAY,CAAC,CAAA;YACjB,IAAI,eAAe;gBAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,eAAe,CAAC,CAAA;YAE1D,MAAM,OAAO,GAAkB,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;YAC9E,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,oBAAoB,CAAC,CAAA;YAC9C,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAA;YAC3B,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;YACpD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAA;YACpD,IAAI,CAAC,iBAAiB,EAAE,CAAA;YAExB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAA;YACpD,IAAI,IAAI,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAA;aACvD;iBAAM;gBACL,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAA;aACnD;YAED,MAAM,IAAI,CAAC,SAAU,CAAC,KAAK,CAAA;YAC3B,GAAG,CAAC,cAAc,CAAC,CAAA;YACnB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAA;YACpB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;YAEpB,OAAO,IAAI,CAAA;SACZ;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;SACtB;IACH,CAAC;IAED,KAAK,CAAC,OAAO;QACX,iDAAiD;QACjD,OAAO,IAAI,EAAE;YACX,GAAG,CAAC,iCAAiC,CAAC,CAAA;YACtC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,SAAU,CAAC,IAAI,EAAE,CAAA;YACpD,GAAG,CAAC,qBAAqB,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;YACvC,IAAI,IAAI,EAAE;gBACR,GAAG,CAAC,MAAM,CAAC,CAAA;gBACX,MAAK;aACN;YACD,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;SACtC;IACH,CAAC;IAED,KAAK,CAAC,WAAW;QACf,GAAG,CAAC,uCAAuC,CAAC,CAAA;QAC5C,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,SAAU,CAAC,IAAI,EAAE,CAAA;QACpD,GAAG,CAAC,2BAA2B,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;QAC7C,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;IACvC,CAAC;IAED,KAAK,CACH,IAAyB,EACzB,WAA2B,MAAM,EACjC,WAAyC,GAAG,EAAE,GAAE,CAAC;QAEjD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,QAAQ,EAAE,CAAA;QACxC,IAAI,OAAO,IAAI,KAAK,QAAQ;YAAE,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;QAEhE,GAAG,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAA;QACjC,IAAI,CAAC,SAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAC9B,GAAG,EAAE;YACH,GAAG,CAAC,WAAW,CAAC,CAAA;YAChB,QAAQ,EAAE,CAAA;QACZ,CAAC,EACD,CAAC,GAAG,EAAE,EAAE;YACN,GAAG,CAAC,YAAY,EAAE,GAAG,CAAC,CAAA;YACtB,QAAQ,CAAC,GAAG,CAAC,CAAA;QACf,CAAC,CACF,CAAA;QACD,OAAO,IAAI,CAAA;IACb,CAAC;IAED,GAAG,CAAC,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,WAA2B,MAAM,EAAE,WAAyC,GAAG,EAAE,GAAE,CAAC;QAC9G,GAAG,CAAC,kBAAkB,CAAC,CAAA;QACvB,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,EAAE;YACjC,IAAI,CAAC,SAAU,CAAC,KAAK,EAAE,CAAA;YACvB,IAAI,QAAQ;gBAAE,QAAQ,CAAC,GAAG,CAAC,CAAA;QAC7B,CAAC,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO,CAAC,MAAc;QACpB,GAAG,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAA;QACnC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA;QACrB,OAAO,IAAI,CAAC,GAAG,EAAE,CAAA;IACnB,CAAC;IAED,QAAQ,CAAC,OAAmB;QAC1B,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,8BAA8B;YAC9B,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,qDAAqD,CAAC,CAAA;YACzE,OAAM;SACP;QACD,IAAI,CAAC,SAAU,CAAC,WAAW,EAAE,CAAA;QAC7B,IAAI,CAAC,SAAU,CAAC,WAAW,EAAE,CAAA;QAC7B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAA;QACtB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;QAClD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAA;QACpD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAA;QACpD,IAAI,CAAC,iBAAiB,EAAE,CAAA;QACxB,IAAI,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAA;IACpD,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,SAAU,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE;YAC/B,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;gBACpB,GAAG,CAAC,kBAAkB,CAAC,CAAA;gBACvB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA;gBACrB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;aACnB;iBAAM;gBACL,IAAI,CAAC,UAAU,GAAG,KAAK,CAAA;gBACvB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA;aACtB;QACH,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAA;IACxC,CAAC;CACF;AA/ID,4CA+IC;AAED,MAAM,KAAK,GAAG,KAAK,CAAA;AAEnB,SAAS,IAAI,CAAC,IAAa;IACzB,IAAI,IAAI,YAAY,UAAU,IAAI,IAAI,YAAY,WAAW,EAAE;QAC7D,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;QAC7C,MAAM,GAAG,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QAC1C,OAAO,eAAe,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,eAAe,GAAG,IAAI,CAAA;KACtE;SAAM;QACL,OAAO,IAAI,CAAA;KACZ;AACH,CAAC;AAED,SAAS,GAAG,CAAC,GAAG,IAAe;IAC7B,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAA;AACzC,CAAC"} \ No newline at end of file diff --git a/node_modules/pg-cloudflare/esm/index.mjs b/node_modules/pg-cloudflare/esm/index.mjs deleted file mode 100644 index 6384216..0000000 --- a/node_modules/pg-cloudflare/esm/index.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import cf from '../dist/index.js' - -export const CloudflareSocket = cf.CloudflareSocket diff --git a/node_modules/pg-cloudflare/package.json b/node_modules/pg-cloudflare/package.json deleted file mode 100644 index 7eebd46..0000000 --- a/node_modules/pg-cloudflare/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "pg-cloudflare", - "version": "1.3.0", - "description": "A socket implementation that can run on Cloudflare Workers using native TCP connections.", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "license": "MIT", - "devDependencies": { - "ts-node": "^8.5.4", - "typescript": "^4.0.3" - }, - "exports": { - ".": { - "workerd": { - "import": "./esm/index.mjs", - "require": "./dist/index.js" - }, - "default": "./dist/empty.js" - }, - "./package.json": "./package.json" - }, - "scripts": { - "build": "tsc", - "build:watch": "tsc --watch", - "prepublish": "yarn build", - "test": "echo e2e test in pg package" - }, - "repository": { - "type": "git", - "url": "git://github.com/brianc/node-postgres.git", - "directory": "packages/pg-cloudflare" - }, - "files": [ - "/dist/*{js,ts,map}", - "/src", - "/esm" - ], - "gitHead": "d10e09c888f94abf77382aba6f353ca665a1cf09" -} diff --git a/node_modules/pg-cloudflare/src/empty.ts b/node_modules/pg-cloudflare/src/empty.ts deleted file mode 100644 index f1e6740..0000000 --- a/node_modules/pg-cloudflare/src/empty.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This is an empty module that is served up when outside of a workerd environment -// See the `exports` field in package.json -export default {} diff --git a/node_modules/pg-cloudflare/src/index.ts b/node_modules/pg-cloudflare/src/index.ts deleted file mode 100644 index d83882e..0000000 --- a/node_modules/pg-cloudflare/src/index.ts +++ /dev/null @@ -1,166 +0,0 @@ -import { SocketOptions, Socket, TlsOptions } from 'cloudflare:sockets' -import { EventEmitter } from 'events' - -/** - * Wrapper around the Cloudflare built-in socket that can be used by the `Connection`. - */ -export class CloudflareSocket extends EventEmitter { - writable = false - destroyed = false - - private _upgrading = false - private _upgraded = false - private _cfSocket: Socket | null = null - private _cfWriter: WritableStreamDefaultWriter | null = null - private _cfReader: ReadableStreamDefaultReader | null = null - - constructor(readonly ssl: boolean) { - super() - } - - setNoDelay() { - return this - } - setKeepAlive() { - return this - } - ref() { - return this - } - unref() { - return this - } - - async connect(port: number, host: string, connectListener?: (...args: unknown[]) => void) { - try { - log('connecting') - if (connectListener) this.once('connect', connectListener) - - const options: SocketOptions = this.ssl ? { secureTransport: 'starttls' } : {} - const mod = await import('cloudflare:sockets') - const connect = mod.connect - this._cfSocket = connect(`${host}:${port}`, options) - this._cfWriter = this._cfSocket.writable.getWriter() - this._addClosedHandler() - - this._cfReader = this._cfSocket.readable.getReader() - if (this.ssl) { - this._listenOnce().catch((e) => this.emit('error', e)) - } else { - this._listen().catch((e) => this.emit('error', e)) - } - - await this._cfWriter!.ready - log('socket ready') - this.writable = true - this.emit('connect') - - return this - } catch (e) { - this.emit('error', e) - } - } - - async _listen() { - // eslint-disable-next-line no-constant-condition - while (true) { - log('awaiting receive from CF socket') - const { done, value } = await this._cfReader!.read() - log('CF socket received:', done, value) - if (done) { - log('done') - break - } - this.emit('data', Buffer.from(value)) - } - } - - async _listenOnce() { - log('awaiting first receive from CF socket') - const { done, value } = await this._cfReader!.read() - log('First CF socket received:', done, value) - this.emit('data', Buffer.from(value)) - } - - write( - data: Uint8Array | string, - encoding: BufferEncoding = 'utf8', - callback: (...args: unknown[]) => void = () => {} - ) { - if (data.length === 0) return callback() - if (typeof data === 'string') data = Buffer.from(data, encoding) - - log('sending data direct:', data) - this._cfWriter!.write(data).then( - () => { - log('data sent') - callback() - }, - (err) => { - log('send error', err) - callback(err) - } - ) - return true - } - - end(data = Buffer.alloc(0), encoding: BufferEncoding = 'utf8', callback: (...args: unknown[]) => void = () => {}) { - log('ending CF socket') - this.write(data, encoding, (err) => { - this._cfSocket!.close() - if (callback) callback(err) - }) - return this - } - - destroy(reason: string) { - log('destroying CF socket', reason) - this.destroyed = true - return this.end() - } - - startTls(options: TlsOptions) { - if (this._upgraded) { - // Don't try to upgrade again. - this.emit('error', 'Cannot call `startTls()` more than once on a socket') - return - } - this._cfWriter!.releaseLock() - this._cfReader!.releaseLock() - this._upgrading = true - this._cfSocket = this._cfSocket!.startTls(options) - this._cfWriter = this._cfSocket.writable.getWriter() - this._cfReader = this._cfSocket.readable.getReader() - this._addClosedHandler() - this._listen().catch((e) => this.emit('error', e)) - } - - _addClosedHandler() { - this._cfSocket!.closed.then(() => { - if (!this._upgrading) { - log('CF socket closed') - this._cfSocket = null - this.emit('close') - } else { - this._upgrading = false - this._upgraded = true - } - }).catch((e) => this.emit('error', e)) - } -} - -const debug = false - -function dump(data: unknown) { - if (data instanceof Uint8Array || data instanceof ArrayBuffer) { - const hex = Buffer.from(data).toString('hex') - const str = new TextDecoder().decode(data) - return `\n>>> STR: "${str.replace(/\n/g, '\\n')}"\n>>> HEX: ${hex}\n` - } else { - return data - } -} - -function log(...args: unknown[]) { - debug && console.log(...args.map(dump)) -} diff --git a/node_modules/pg-cloudflare/src/types.d.ts b/node_modules/pg-cloudflare/src/types.d.ts deleted file mode 100644 index f6f1c3f..0000000 --- a/node_modules/pg-cloudflare/src/types.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -declare module 'cloudflare:sockets' { - export class Socket { - public readonly readable: any - public readonly writable: any - public readonly closed: Promise - public close(): Promise - public startTls(options: TlsOptions): Socket - } - - export type TlsOptions = { - expectedServerHostname?: string - } - - export type SocketAddress = { - hostname: string - port: number - } - - export type SocketOptions = { - secureTransport?: 'off' | 'on' | 'starttls' - allowHalfOpen?: boolean - } - - export function connect(address: string | SocketAddress, options?: SocketOptions): Socket -} diff --git a/node_modules/pg-connection-string/LICENSE b/node_modules/pg-connection-string/LICENSE deleted file mode 100644 index b068a6c..0000000 --- a/node_modules/pg-connection-string/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Iced Development - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/node_modules/pg-connection-string/README.md b/node_modules/pg-connection-string/README.md deleted file mode 100644 index e47adc8..0000000 --- a/node_modules/pg-connection-string/README.md +++ /dev/null @@ -1,105 +0,0 @@ -pg-connection-string -==================== - -[![NPM](https://nodei.co/npm/pg-connection-string.png?compact=true)](https://nodei.co/npm/pg-connection-string/) - -Functions for dealing with a PostgresSQL connection string - -`parse` method taken from [node-postgres](https://github.com/brianc/node-postgres.git) -Copyright (c) 2010-2014 Brian Carlson (brian.m.carlson@gmail.com) -MIT License - -## Usage - -```js -const parse = require('pg-connection-string').parse; - -const config = parse('postgres://someuser:somepassword@somehost:381/somedatabase') -``` - -The resulting config contains a subset of the following properties: - -* `user` - User with which to authenticate to the server -* `password` - Corresponding password -* `host` - Postgres server hostname or, for UNIX domain sockets, the socket filename -* `port` - port on which to connect -* `database` - Database name within the server -* `client_encoding` - string encoding the client will use -* `ssl`, either a boolean or an object with properties - * `rejectUnauthorized` - * `cert` - * `key` - * `ca` -* any other query parameters (for example, `application_name`) are preserved intact. - -### ClientConfig Compatibility for TypeScript - -The pg-connection-string `ConnectionOptions` interface is not compatible with the `ClientConfig` interface that [pg.Client](https://node-postgres.com/apis/client) expects. To remedy this, use the `parseIntoClientConfig` function instead of `parse`: - -```ts -import { ClientConfig } from 'pg'; -import { parseIntoClientConfig } from 'pg-connection-string'; - -const config: ClientConfig = parseIntoClientConfig('postgres://someuser:somepassword@somehost:381/somedatabase') -``` - -You can also use `toClientConfig` to convert an existing `ConnectionOptions` interface into a `ClientConfig` interface: - -```ts -import { ClientConfig } from 'pg'; -import { parse, toClientConfig } from 'pg-connection-string'; - -const config = parse('postgres://someuser:somepassword@somehost:381/somedatabase') -const clientConfig: ClientConfig = toClientConfig(config) -``` - -## Connection Strings - -The short summary of acceptable URLs is: - - * `socket:?` - UNIX domain socket - * `postgres://:@:/?` - TCP connection - -But see below for more details. - -### UNIX Domain Sockets - -When user and password are not given, the socket path follows `socket:`, as in `socket:/var/run/pgsql`. -This form can be shortened to just a path: `/var/run/pgsql`. - -When user and password are given, they are included in the typical URL positions, with an empty `host`, as in `socket://user:pass@/var/run/pgsql`. - -Query parameters follow a `?` character, including the following special query parameters: - - * `db=` - sets the database name (urlencoded) - * `encoding=` - sets the `client_encoding` property - -### TCP Connections - -TCP connections to the Postgres server are indicated with `pg:` or `postgres:` schemes (in fact, any scheme but `socket:` is accepted). -If username and password are included, they should be urlencoded. -The database name, however, should *not* be urlencoded. - -Query parameters follow a `?` character, including the following special query parameters: - * `host=` - sets `host` property, overriding the URL's host - * `encoding=` - sets the `client_encoding` property - * `ssl=1`, `ssl=true`, `ssl=0`, `ssl=false` - sets `ssl` to true or false, accordingly - * `uselibpqcompat=true` - use libpq semantics - * `sslmode=` when `uselibpqcompat=true` is not set - * `sslmode=disable` - sets `ssl` to false - * `sslmode=no-verify` - sets `ssl` to `{ rejectUnauthorized: false }` - * `sslmode=prefer`, `sslmode=require`, `sslmode=verify-ca`, `sslmode=verify-full` - sets `ssl` to true - * `sslmode=` when `uselibpqcompat=true` - * `sslmode=disable` - sets `ssl` to false - * `sslmode=prefer` - sets `ssl` to `{ rejectUnauthorized: false }` - * `sslmode=require` - sets `ssl` to `{ rejectUnauthorized: false }` unless `sslrootcert` is specified, in which case it behaves like `verify-ca` - * `sslmode=verify-ca` - sets `ssl` to `{ checkServerIdentity: no-op }` (verify CA, but not server identity). This verifies the presented certificate against the effective CA specified in sslrootcert. - * `sslmode=verify-full` - sets `ssl` to `{}` (verify CA and server identity) - * `sslcert=` - reads data from the given file and includes the result as `ssl.cert` - * `sslkey=` - reads data from the given file and includes the result as `ssl.key` - * `sslrootcert=` - reads data from the given file and includes the result as `ssl.ca` - -A bare relative URL, such as `salesdata`, will indicate a database name while leaving other properties empty. - -> [!CAUTION] -> Choosing an sslmode other than verify-full has serious security implications. Please read https://www.postgresql.org/docs/current/libpq-ssl.html#LIBPQ-SSL-SSLMODE-STATEMENTS to understand the trade-offs. diff --git a/node_modules/pg-connection-string/esm/index.mjs b/node_modules/pg-connection-string/esm/index.mjs deleted file mode 100644 index 7b390c5..0000000 --- a/node_modules/pg-connection-string/esm/index.mjs +++ /dev/null @@ -1,8 +0,0 @@ -// ESM wrapper for pg-connection-string -import connectionString from '../index.js' - -// Re-export the parse function -export default connectionString.parse -export const parse = connectionString.parse -export const toClientConfig = connectionString.toClientConfig -export const parseIntoClientConfig = connectionString.parseIntoClientConfig diff --git a/node_modules/pg-connection-string/index.d.ts b/node_modules/pg-connection-string/index.d.ts deleted file mode 100644 index 2ebe675..0000000 --- a/node_modules/pg-connection-string/index.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { ClientConfig } from 'pg' - -export function parse(connectionString: string, options?: Options): ConnectionOptions - -export interface Options { - // Use libpq semantics when interpreting the connection string - useLibpqCompat?: boolean -} - -interface SSLConfig { - ca?: string - cert?: string | null - key?: string - rejectUnauthorized?: boolean -} - -export interface ConnectionOptions { - host: string | null - password?: string - user?: string - port?: string | null - database: string | null | undefined - client_encoding?: string - ssl?: boolean | string | SSLConfig - - application_name?: string - fallback_application_name?: string - options?: string - keepalives?: number - - // We allow any other options to be passed through - [key: string]: unknown -} - -export function toClientConfig(config: ConnectionOptions): ClientConfig -export function parseIntoClientConfig(connectionString: string): ClientConfig diff --git a/node_modules/pg-connection-string/index.js b/node_modules/pg-connection-string/index.js deleted file mode 100644 index 29ffeaf..0000000 --- a/node_modules/pg-connection-string/index.js +++ /dev/null @@ -1,231 +0,0 @@ -'use strict' - -//Parse method copied from https://github.com/brianc/node-postgres -//Copyright (c) 2010-2014 Brian Carlson (brian.m.carlson@gmail.com) -//MIT License - -//parses a connection string -function parse(str, options = {}) { - //unix socket - if (str.charAt(0) === '/') { - const config = str.split(' ') - return { host: config[0], database: config[1] } - } - - // Check for empty host in URL - - const config = {} - let result - let dummyHost = false - if (/ |%[^a-f0-9]|%[a-f0-9][^a-f0-9]/i.test(str)) { - // Ensure spaces are encoded as %20 - str = encodeURI(str).replace(/%25(\d\d)/g, '%$1') - } - - try { - try { - result = new URL(str, 'postgres://base') - } catch (e) { - // The URL is invalid so try again with a dummy host - result = new URL(str.replace('@/', '@___DUMMY___/'), 'postgres://base') - dummyHost = true - } - } catch (err) { - // Remove the input from the error message to avoid leaking sensitive information - err.input && (err.input = '*****REDACTED*****') - throw err - } - - // We'd like to use Object.fromEntries() here but Node.js 10 does not support it - for (const entry of result.searchParams.entries()) { - config[entry[0]] = entry[1] - } - - config.user = config.user || decodeURIComponent(result.username) - config.password = config.password || decodeURIComponent(result.password) - - if (result.protocol == 'socket:') { - config.host = decodeURI(result.pathname) - config.database = result.searchParams.get('db') - config.client_encoding = result.searchParams.get('encoding') - return config - } - const hostname = dummyHost ? '' : result.hostname - if (!config.host) { - // Only set the host if there is no equivalent query param. - config.host = decodeURIComponent(hostname) - } else if (hostname && /^%2f/i.test(hostname)) { - // Only prepend the hostname to the pathname if it is not a URL encoded Unix socket host. - result.pathname = hostname + result.pathname - } - if (!config.port) { - // Only set the port if there is no equivalent query param. - config.port = result.port - } - - const pathname = result.pathname.slice(1) || null - config.database = pathname ? decodeURI(pathname) : null - - if (config.ssl === 'true' || config.ssl === '1') { - config.ssl = true - } - - if (config.ssl === '0') { - config.ssl = false - } - - if (config.sslcert || config.sslkey || config.sslrootcert || config.sslmode) { - config.ssl = {} - } - - // Only try to load fs if we expect to read from the disk - const fs = config.sslcert || config.sslkey || config.sslrootcert ? require('fs') : null - - if (config.sslcert) { - config.ssl.cert = fs.readFileSync(config.sslcert).toString() - } - - if (config.sslkey) { - config.ssl.key = fs.readFileSync(config.sslkey).toString() - } - - if (config.sslrootcert) { - config.ssl.ca = fs.readFileSync(config.sslrootcert).toString() - } - - if (options.useLibpqCompat && config.uselibpqcompat) { - throw new Error('Both useLibpqCompat and uselibpqcompat are set. Please use only one of them.') - } - - if (config.uselibpqcompat === 'true' || options.useLibpqCompat) { - switch (config.sslmode) { - case 'disable': { - config.ssl = false - break - } - case 'prefer': { - config.ssl.rejectUnauthorized = false - break - } - case 'require': { - if (config.sslrootcert) { - // If a root CA is specified, behavior of `sslmode=require` will be the same as that of `verify-ca` - config.ssl.checkServerIdentity = function () {} - } else { - config.ssl.rejectUnauthorized = false - } - break - } - case 'verify-ca': { - if (!config.ssl.ca) { - throw new Error( - 'SECURITY WARNING: Using sslmode=verify-ca requires specifying a CA with sslrootcert. If a public CA is used, verify-ca allows connections to a server that somebody else may have registered with the CA, making you vulnerable to Man-in-the-Middle attacks. Either specify a custom CA certificate with sslrootcert parameter or use sslmode=verify-full for proper security.' - ) - } - config.ssl.checkServerIdentity = function () {} - break - } - case 'verify-full': { - break - } - } - } else { - switch (config.sslmode) { - case 'disable': { - config.ssl = false - break - } - case 'prefer': - case 'require': - case 'verify-ca': - case 'verify-full': { - if (config.sslmode !== 'verify-full') { - deprecatedSslModeWarning(config.sslmode) - } - break - } - case 'no-verify': { - config.ssl.rejectUnauthorized = false - break - } - } - } - - return config -} - -// convert pg-connection-string ssl config to a ClientConfig.ConnectionOptions -function toConnectionOptions(sslConfig) { - const connectionOptions = Object.entries(sslConfig).reduce((c, [key, value]) => { - // we explicitly check for undefined and null instead of `if (value)` because some - // options accept falsy values. Example: `ssl.rejectUnauthorized = false` - if (value !== undefined && value !== null) { - c[key] = value - } - - return c - }, {}) - - return connectionOptions -} - -// convert pg-connection-string config to a ClientConfig -function toClientConfig(config) { - const poolConfig = Object.entries(config).reduce((c, [key, value]) => { - if (key === 'ssl') { - const sslConfig = value - - if (typeof sslConfig === 'boolean') { - c[key] = sslConfig - } - - if (typeof sslConfig === 'object') { - c[key] = toConnectionOptions(sslConfig) - } - } else if (value !== undefined && value !== null) { - if (key === 'port') { - // when port is not specified, it is converted into an empty string - // we want to avoid NaN or empty string as a values in ClientConfig - if (value !== '') { - const v = parseInt(value, 10) - if (isNaN(v)) { - throw new Error(`Invalid ${key}: ${value}`) - } - - c[key] = v - } - } else { - c[key] = value - } - } - - return c - }, {}) - - return poolConfig -} - -// parses a connection string into ClientConfig -function parseIntoClientConfig(str) { - return toClientConfig(parse(str)) -} - -function deprecatedSslModeWarning(sslmode) { - if (!deprecatedSslModeWarning.warned && typeof process !== 'undefined' && process.emitWarning) { - deprecatedSslModeWarning.warned = true - process.emitWarning(`SECURITY WARNING: The SSL modes 'prefer', 'require', and 'verify-ca' are treated as aliases for 'verify-full'. -In the next major version (pg-connection-string v3.0.0 and pg v9.0.0), these modes will adopt standard libpq semantics, which have weaker security guarantees. - -To prepare for this change: -- If you want the current behavior, explicitly use 'sslmode=verify-full' -- If you want libpq compatibility now, use 'uselibpqcompat=true&sslmode=${sslmode}' - -See https://www.postgresql.org/docs/current/libpq-ssl.html for libpq SSL mode definitions.`) - } -} - -module.exports = parse - -parse.parse = parse -parse.toClientConfig = toClientConfig -parse.parseIntoClientConfig = parseIntoClientConfig diff --git a/node_modules/pg-connection-string/package.json b/node_modules/pg-connection-string/package.json deleted file mode 100644 index 083f44b..0000000 --- a/node_modules/pg-connection-string/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "pg-connection-string", - "version": "2.12.0", - "description": "Functions for dealing with a PostgresSQL connection string", - "main": "./index.js", - "types": "./index.d.ts", - "exports": { - ".": { - "types": "./index.d.ts", - "import": "./esm/index.mjs", - "require": "./index.js", - "default": "./index.js" - } - }, - "scripts": { - "test": "nyc --reporter=lcov mocha && npm run check-coverage", - "check-coverage": "nyc check-coverage --statements 100 --branches 100 --lines 100 --functions 100" - }, - "repository": { - "type": "git", - "url": "git://github.com/brianc/node-postgres.git", - "directory": "packages/pg-connection-string" - }, - "keywords": [ - "pg", - "connection", - "string", - "parse" - ], - "author": "Blaine Bublitz (http://iceddev.com/)", - "license": "MIT", - "bugs": { - "url": "https://github.com/brianc/node-postgres/issues" - }, - "homepage": "https://github.com/brianc/node-postgres/tree/master/packages/pg-connection-string", - "devDependencies": { - "@types/pg": "^8.12.0", - "chai": "^4.1.1", - "coveralls": "^3.0.4", - "istanbul": "^0.4.5", - "mocha": "^11.7.5", - "nyc": "^15", - "tsx": "^4.19.4", - "typescript": "^4.0.3" - }, - "files": [ - "index.js", - "index.d.ts", - "esm" - ], - "gitHead": "c9070cc8d526fca65780cedc25c1966b57cf7532" -} diff --git a/node_modules/pg-cursor/LICENSE b/node_modules/pg-cursor/LICENSE deleted file mode 100644 index 5c14056..0000000 --- a/node_modules/pg-cursor/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2010 - 2021 Brian Carlson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/pg-cursor/README.md b/node_modules/pg-cursor/README.md deleted file mode 100644 index a3fdf4d..0000000 --- a/node_modules/pg-cursor/README.md +++ /dev/null @@ -1,37 +0,0 @@ -node-pg-cursor -============== - -Use a PostgreSQL result cursor from node with an easy to use API. - -### install - -```sh -$ npm install pg-cursor -``` -___note___: this depends on _either_ `npm install pg` or `npm install pg.js`, but you __must__ be using the pure JavaScript client. This will __not work__ with the native bindings. - -### :star: [Documentation](https://node-postgres.com/apis/cursor) :star: - -### license - -The MIT License (MIT) - -Copyright (c) 2013 Brian M. Carlson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/pg-cursor/esm/index.mjs b/node_modules/pg-cursor/esm/index.mjs deleted file mode 100644 index 65b0db0..0000000 --- a/node_modules/pg-cursor/esm/index.mjs +++ /dev/null @@ -1,5 +0,0 @@ -// ESM wrapper for pg-cursor -import Cursor from '../index.js' - -// Export as default only to match CJS module -export default Cursor diff --git a/node_modules/pg-cursor/index.js b/node_modules/pg-cursor/index.js deleted file mode 100644 index f1553cc..0000000 --- a/node_modules/pg-cursor/index.js +++ /dev/null @@ -1,265 +0,0 @@ -'use strict' -// note: can remove these deep requires when we bump min version of pg to 9.x -const Result = require('pg/lib/result.js') -const prepare = require('pg/lib/utils.js').prepareValue -const EventEmitter = require('events').EventEmitter -const util = require('util') - -let nextUniqueID = 1 // concept borrowed from org.postgresql.core.v3.QueryExecutorImpl - -class Cursor extends EventEmitter { - constructor(text, values, config) { - super() - - this._conf = config || {} - this.text = text - this.values = values ? values.map(prepare) : null - this.connection = null - this._queue = [] - this.state = 'initialized' - this._result = new Result(this._conf.rowMode, this._conf.types) - this._Promise = this._conf.Promise || global.Promise - this._cb = null - this._rows = null - this._portal = null - this._ifNoData = this._ifNoData.bind(this) - this._rowDescription = this._rowDescription.bind(this) - } - - _ifNoData() { - this.state = 'idle' - this._shiftQueue() - if (this.connection) { - this.connection.removeListener('rowDescription', this._rowDescription) - } - } - - _rowDescription() { - if (this.connection) { - this.connection.removeListener('noData', this._ifNoData) - } - } - - submit(connection) { - this.state = 'submitted' - this.connection = connection - this._portal = 'C_' + nextUniqueID++ - - const con = connection - - con.parse( - { - text: this.text, - }, - true - ) - - con.bind( - { - portal: this._portal, - values: this.values, - }, - true - ) - - con.describe( - { - type: 'P', - name: this._portal, // AWS Redshift requires a portal name - }, - true - ) - - con.flush() - - if (this._conf.types) { - this._result._getTypeParser = this._conf.types.getTypeParser - } - - con.once('noData', this._ifNoData) - con.once('rowDescription', this._rowDescription) - } - - _shiftQueue() { - if (this._queue.length) { - this._getRows.apply(this, this._queue.shift()) - } - } - - _closePortal() { - if (this.state === 'done') return - - // because we opened a named portal to stream results - // we need to close the same named portal. Leaving a named portal - // open can lock tables for modification if inside a transaction. - // see https://github.com/brianc/node-pg-cursor/issues/56 - this.connection.close({ type: 'P', name: this._portal }) - - // If we've received an error we already sent a sync message. - // do not send another sync as it triggers another readyForQuery message. - if (this.state !== 'error') { - this.connection.sync() - } - - this.state = 'done' - } - - handleRowDescription(msg) { - this._result.addFields(msg.fields) - this.state = 'idle' - this._shiftQueue() - } - - handleDataRow(msg) { - const row = this._result.parseRow(msg.fields) - this.emit('row', row, this._result) - this._rows.push(row) - } - - _sendRows() { - this.state = 'idle' - setImmediate(() => { - const cb = this._cb - // remove callback before calling it - // because likely a new one will be added - // within the call to this callback - this._cb = null - if (cb) { - this._result.rows = this._rows - cb(null, this._rows, this._result) - } - this._rows = [] - }) - } - - handleCommandComplete(msg) { - this._result.addCommandComplete(msg) - this._closePortal() - } - - handlePortalSuspended() { - this._sendRows() - } - - handleReadyForQuery() { - this._sendRows() - this.state = 'done' - this.emit('end', this._result) - } - - handleEmptyQuery() { - this.connection.sync() - } - - handleError(msg) { - // If this cursor has already closed, don't try to handle the error. - if (this.state === 'done') return - - // If we're in an initialized state we've never been submitted - // and don't have a connection instance reference yet. - // This can happen if you queue a stream and close the client before - // the client has submitted the stream. In this scenario we don't have - // a connection so there's nothing to unsubscribe from. - if (this.state !== 'initialized') { - this.connection.removeListener('noData', this._ifNoData) - this.connection.removeListener('rowDescription', this._rowDescription) - // call sync to trigger a readyForQuery - this.connection.sync() - } - - this.state = 'error' - this._error = msg - // satisfy any waiting callback - if (this._cb) { - this._cb(msg) - } - // dispatch error to all waiting callbacks - for (let i = 0; i < this._queue.length; i++) { - const queuedCallback = this._queue[i][1] - queuedCallback.call(this, msg) - } - this._queue.length = 0 - - if (this.listenerCount('error') > 0) { - // only dispatch error events if we have a listener - this.emit('error', msg) - } - } - - _getRows(rows, cb) { - this.state = 'busy' - this._cb = cb - this._rows = [] - const msg = { - portal: this._portal, - rows: rows, - } - this.connection.execute(msg, true) - this.connection.flush() - } - - // users really shouldn't be calling 'end' here and terminating a connection to postgres - // via the low level connection.end api - end(cb) { - if (this.state !== 'initialized') { - this.connection.sync() - } - this.connection.once('end', cb) - this.connection.end() - } - - close(cb) { - let promise - - if (!cb) { - promise = new this._Promise((resolve, reject) => { - cb = (err) => (err ? reject(err) : resolve()) - }) - } - - if (!this.connection || this.state === 'done') { - setImmediate(cb) - return promise - } - - this._closePortal() - this.connection.once('readyForQuery', function () { - cb() - }) - - // Return the promise (or undefined) - return promise - } - - read(rows, cb) { - let promise - - if (!cb) { - promise = new this._Promise((resolve, reject) => { - cb = (err, rows) => (err ? reject(err) : resolve(rows)) - }) - } - - if (this.state === 'idle' || this.state === 'submitted') { - this._getRows(rows, cb) - } else if (this.state === 'busy' || this.state === 'initialized') { - this._queue.push([rows, cb]) - } else if (this.state === 'error') { - setImmediate(() => cb(this._error)) - } else if (this.state === 'done') { - setImmediate(() => cb(null, [])) - } else { - throw new Error('Unknown state: ' + this.state) - } - - // Return the promise (or undefined) - return promise - } -} - -Cursor.prototype.end = util.deprecate( - Cursor.prototype.end, - 'Cursor.end is deprecated. Call end on the client itself to end a connection to the database.' -) - -module.exports = Cursor diff --git a/node_modules/pg-cursor/package.json b/node_modules/pg-cursor/package.json deleted file mode 100644 index c30b646..0000000 --- a/node_modules/pg-cursor/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "pg-cursor", - "version": "2.19.0", - "description": "Query cursor extension for node-postgres", - "main": "index.js", - "exports": { - ".": { - "import": "./esm/index.mjs", - "require": "./index.js", - "default": "./index.js" - } - }, - "directories": { - "test": "test" - }, - "scripts": { - "test": "mocha" - }, - "repository": { - "type": "git", - "url": "git://github.com/brianc/node-postgres.git", - "directory": "packages/pg-cursor" - }, - "author": "Brian M. Carlson", - "license": "MIT", - "devDependencies": { - "mocha": "^11.7.5", - "pg": "^8.20.0" - }, - "peerDependencies": { - "pg": "^8" - }, - "files": [ - "index.js", - "esm" - ], - "gitHead": "c9070cc8d526fca65780cedc25c1966b57cf7532" -} diff --git a/node_modules/pg-int8/LICENSE b/node_modules/pg-int8/LICENSE deleted file mode 100644 index c56c973..0000000 --- a/node_modules/pg-int8/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright © 2017, Charmander <~@charmander.me> - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/pg-int8/README.md b/node_modules/pg-int8/README.md deleted file mode 100644 index ef2e608..0000000 --- a/node_modules/pg-int8/README.md +++ /dev/null @@ -1,16 +0,0 @@ -[![Build status][ci image]][ci] - -64-bit big-endian signed integer-to-string conversion designed for [pg][]. - -```js -const readInt8 = require('pg-int8'); - -readInt8(Buffer.from([0, 1, 2, 3, 4, 5, 6, 7])) -// '283686952306183' -``` - - - [pg]: https://github.com/brianc/node-postgres - - [ci]: https://travis-ci.org/charmander/pg-int8 - [ci image]: https://api.travis-ci.org/charmander/pg-int8.svg diff --git a/node_modules/pg-int8/index.js b/node_modules/pg-int8/index.js deleted file mode 100644 index db77975..0000000 --- a/node_modules/pg-int8/index.js +++ /dev/null @@ -1,100 +0,0 @@ -'use strict'; - -// selected so (BASE - 1) * 0x100000000 + 0xffffffff is a safe integer -var BASE = 1000000; - -function readInt8(buffer) { - var high = buffer.readInt32BE(0); - var low = buffer.readUInt32BE(4); - var sign = ''; - - if (high < 0) { - high = ~high + (low === 0); - low = (~low + 1) >>> 0; - sign = '-'; - } - - var result = ''; - var carry; - var t; - var digits; - var pad; - var l; - var i; - - { - carry = high % BASE; - high = high / BASE >>> 0; - - t = 0x100000000 * carry + low; - low = t / BASE >>> 0; - digits = '' + (t - BASE * low); - - if (low === 0 && high === 0) { - return sign + digits + result; - } - - pad = ''; - l = 6 - digits.length; - - for (i = 0; i < l; i++) { - pad += '0'; - } - - result = pad + digits + result; - } - - { - carry = high % BASE; - high = high / BASE >>> 0; - - t = 0x100000000 * carry + low; - low = t / BASE >>> 0; - digits = '' + (t - BASE * low); - - if (low === 0 && high === 0) { - return sign + digits + result; - } - - pad = ''; - l = 6 - digits.length; - - for (i = 0; i < l; i++) { - pad += '0'; - } - - result = pad + digits + result; - } - - { - carry = high % BASE; - high = high / BASE >>> 0; - - t = 0x100000000 * carry + low; - low = t / BASE >>> 0; - digits = '' + (t - BASE * low); - - if (low === 0 && high === 0) { - return sign + digits + result; - } - - pad = ''; - l = 6 - digits.length; - - for (i = 0; i < l; i++) { - pad += '0'; - } - - result = pad + digits + result; - } - - { - carry = high % BASE; - t = 0x100000000 * carry + low; - digits = '' + t % BASE; - - return sign + digits + result; - } -} - -module.exports = readInt8; diff --git a/node_modules/pg-int8/package.json b/node_modules/pg-int8/package.json deleted file mode 100644 index 4b937e1..0000000 --- a/node_modules/pg-int8/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "pg-int8", - "version": "1.0.1", - "description": "64-bit big-endian signed integer-to-string conversion", - "bugs": "https://github.com/charmander/pg-int8/issues", - "license": "ISC", - "files": [ - "index.js" - ], - "repository": { - "type": "git", - "url": "https://github.com/charmander/pg-int8" - }, - "scripts": { - "test": "tap test" - }, - "devDependencies": { - "@charmander/eslint-config-base": "1.0.2", - "tap": "10.7.3" - }, - "engines": { - "node": ">=4.0.0" - } -} diff --git a/node_modules/pg-pool/LICENSE b/node_modules/pg-pool/LICENSE deleted file mode 100644 index 4e90581..0000000 --- a/node_modules/pg-pool/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Brian M. Carlson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/pg-pool/README.md b/node_modules/pg-pool/README.md deleted file mode 100644 index 80c6447..0000000 --- a/node_modules/pg-pool/README.md +++ /dev/null @@ -1,357 +0,0 @@ -# pg-pool - -[![Build Status](https://travis-ci.org/brianc/node-pg-pool.svg?branch=master)](https://travis-ci.org/brianc/node-pg-pool) - -A connection pool for node-postgres - -## install - -```sh -npm i pg-pool pg -``` - -## use - -### create - -to use pg-pool you must first create an instance of a pool - -```js -const Pool = require('pg-pool') - -// by default the pool uses the same -// configuration as whatever `pg` version you have installed -const pool = new Pool() - -// you can pass properties to the pool -// these properties are passed unchanged to both the node-postgres Client constructor -// and the pool constructor, allowing you to fully configure the behavior of both -const pool2 = new Pool({ - database: 'postgres', - user: 'brianc', - password: 'secret!', - port: 5432, - ssl: true, - max: 20, // set pool max size to 20 - idleTimeoutMillis: 1000, // close idle clients after 1 second - connectionTimeoutMillis: 1000, // return an error after 1 second if connection could not be established - maxUses: 7500, // close (and replace) a connection after it has been used 7500 times (see below for discussion) -}) - -// you can supply a custom client constructor -// if you want to use the native postgres client -const NativeClient = require('pg').native.Client -const nativePool = new Pool({ Client: NativeClient }) - -// you can even pool pg-native clients directly -const PgNativeClient = require('pg-native') -const pgNativePool = new Pool({ Client: PgNativeClient }) -``` - -##### Note: - -The Pool constructor does not support passing a Database URL as the parameter. To use pg-pool on heroku, for example, you need to parse the URL into a config object. Here is an example of how to parse a Database URL. - -```js -const Pool = require('pg-pool') -const url = require('url') - -const params = url.parse(process.env.DATABASE_URL) -const auth = params.auth.split(':') - -const config = { - user: auth[0], - password: auth[1], - host: params.hostname, - port: params.port, - database: params.pathname.split('/')[1], - ssl: true, -} - -const pool = new Pool(config) - -/* - Transforms, 'postgres://DBuser:secret@DBHost:#####/myDB', into - config = { - user: 'DBuser', - password: 'secret', - host: 'DBHost', - port: '#####', - database: 'myDB', - ssl: true - } -*/ -``` - -### acquire clients with a promise - -pg-pool supports a fully promise-based api for acquiring clients - -```js -const pool = new Pool() -pool.connect().then((client) => { - client - .query('select $1::text as name', ['pg-pool']) - .then((res) => { - client.release() - console.log('hello from', res.rows[0].name) - }) - .catch((e) => { - client.release() - console.error('query error', e.message, e.stack) - }) -}) -``` - -### plays nice with async/await - -this ends up looking much nicer if you're using [co](https://github.com/tj/co) or async/await: - -```js -// with async/await -;(async () => { - const pool = new Pool() - const client = await pool.connect() - try { - const result = await client.query('select $1::text as name', ['brianc']) - console.log('hello from', result.rows[0]) - } finally { - client.release() - } -})().catch((e) => console.error(e.message, e.stack)) - -// with co -co(function* () { - const client = yield pool.connect() - try { - const result = yield client.query('select $1::text as name', ['brianc']) - console.log('hello from', result.rows[0]) - } finally { - client.release() - } -}).catch((e) => console.error(e.message, e.stack)) -``` - -### your new favorite helper method - -because its so common to just run a query and return the client to the pool afterward pg-pool has this built-in: - -```js -const pool = new Pool() -const time = await pool.query('SELECT NOW()') -const name = await pool.query('select $1::text as name', ['brianc']) -console.log(name.rows[0].name, 'says hello at', time.rows[0].now) -``` - -you can also use a callback here if you'd like: - -```js -const pool = new Pool() -pool.query('SELECT $1::text as name', ['brianc'], function (err, res) { - console.log(res.rows[0].name) // brianc -}) -``` - -**pro tip:** unless you need to run a transaction (which requires a single client for multiple queries) or you -have some other edge case like [streaming rows](https://github.com/brianc/node-pg-query-stream) or using a [cursor](https://github.com/brianc/node-pg-cursor) -you should almost always just use `pool.query`. Its easy, it does the right thing :tm:, and wont ever forget to return -clients back to the pool after the query is done. - -### drop-in backwards compatible - -pg-pool still and will always support the traditional callback api for acquiring a client. This is the exact API node-postgres has shipped with for years: - -```js -const pool = new Pool() -pool.connect((err, client, done) => { - if (err) return done(err) - - client.query('SELECT $1::text as name', ['pg-pool'], (err, res) => { - done() - if (err) { - return console.error('query error', err.message, err.stack) - } - console.log('hello from', res.rows[0].name) - }) -}) -``` - -### shut it down - -When you are finished with the pool if all the clients are idle the pool will close them after `config.idleTimeoutMillis` and your app -will shutdown gracefully. If you don't want to wait for the timeout you can end the pool as follows: - -```js -const pool = new Pool() -const client = await pool.connect() -console.log(await client.query('select now()')) -client.release() -await pool.end() -``` - -### a note on instances - -The pool should be a **long-lived object** in your application. Generally you'll want to instantiate one pool when your app starts up and use the same instance of the pool throughout the lifetime of your application. If you are frequently creating a new pool within your code you likely don't have your pool initialization code in the correct place. Example: - -```js -// assume this is a file in your program at ./your-app/lib/db.js - -// correct usage: create the pool and let it live -// 'globally' here, controlling access to it through exported methods -const pool = new pg.Pool() - -// this is the right way to export the query method -module.exports.query = (text, values) => { - console.log('query:', text, values) - return pool.query(text, values) -} - -// this would be the WRONG way to export the connect method -module.exports.connect = () => { - // notice how we would be creating a pool instance here - // every time we called 'connect' to get a new client? - // that's a bad thing & results in creating an unbounded - // number of pools & therefore connections - const aPool = new pg.Pool() - return aPool.connect() -} -``` - -### events - -Every instance of a `Pool` is an event emitter. These instances emit the following events: - -#### error - -Emitted whenever an idle client in the pool encounters an error. This is common when your PostgreSQL server shuts down, reboots, or a network partition otherwise causes it to become unavailable while your pool has connected clients. - -Example: - -```js -const Pool = require('pg-pool') -const pool = new Pool() - -// attach an error handler to the pool for when a connected, idle client -// receives an error by being disconnected, etc -pool.on('error', function (error, client) { - // handle this in the same way you would treat process.on('uncaughtException') - // it is supplied the error as well as the idle client which received the error -}) -``` - -#### connect - -Fired whenever the pool creates a **new** `pg.Client` instance and successfully connects it to the backend. - -Example: - -```js -const Pool = require('pg-pool') -const pool = new Pool() - -const count = 0 - -pool.on('connect', (client) => { - client.count = count++ -}) - -pool - .connect() - .then((client) => { - return client - .query('SELECT $1::int AS "clientCount"', [client.count]) - .then((res) => console.log(res.rows[0].clientCount)) // outputs 0 - .then(() => client) - }) - .then((client) => client.release()) -``` - -#### acquire - -Fired whenever a client is acquired from the pool - -Example: - -This allows you to count the number of clients which have ever been acquired from the pool. - -```js -const Pool = require('pg-pool') -const pool = new Pool() - -const acquireCount = 0 -pool.on('acquire', function (client) { - acquireCount++ -}) - -const connectCount = 0 -pool.on('connect', function () { - connectCount++ -}) - -for (let i = 0; i < 200; i++) { - pool.query('SELECT NOW()') -} - -setTimeout(function () { - console.log('connect count:', connectCount) // output: connect count: 10 - console.log('acquire count:', acquireCount) // output: acquire count: 200 -}, 100) -``` - -### environment variables - -pg-pool & node-postgres support some of the same environment variables as `psql` supports. The most common are: - -``` -PGDATABASE=my_db -PGUSER=username -PGPASSWORD="my awesome password" -PGPORT=5432 -PGSSLMODE=require -``` - -Usually I will export these into my local environment via a `.env` file with environment settings or export them in `~/.bash_profile` or something similar. This way I get configurability which works with both the postgres suite of tools (`psql`, `pg_dump`, `pg_restore`) and node, I can vary the environment variables locally and in production, and it supports the concept of a [12-factor app](http://12factor.net/) out of the box. - -## maxUses and read-replica autoscaling (e.g. AWS Aurora) - -The maxUses config option can help an application instance rebalance load against a replica set that has been auto-scaled after the connection pool is already full of healthy connections. - -The mechanism here is that a connection is considered "expended" after it has been acquired and released `maxUses` number of times. Depending on the load on your system, this means there will be an approximate time in which any given connection will live, thus creating a window for rebalancing. - -Imagine a scenario where you have 10 app instances providing an API running against a replica cluster of 3 that are accessed via a round-robin DNS entry. Each instance runs a connection pool size of 20. With an ambient load of 50 requests per second, the connection pool will likely fill up in a few minutes with healthy connections. - -If you have weekly bursts of traffic which peak at 1,000 requests per second, you might want to grow your replicas to 10 during this period. Without setting `maxUses`, the new replicas will not be adopted by the app servers without an intervention -- namely, restarting each in turn in order to build up new connection pools that are balanced against all the replicas. Adding additional app server instances will help to some extent because they will adopt all the replicas in an even way, but the initial app servers will continue to focus additional load on the original replicas. - -This is where the `maxUses` configuration option comes into play. Setting `maxUses` to 7500 will ensure that over a period of 30 minutes or so the new replicas will be adopted as the pre-existing connections are closed and replaced with new ones, thus creating a window for eventual balance. - -You'll want to test based on your own scenarios, but one way to make a first guess at `maxUses` is to identify an acceptable window for rebalancing and then solve for the value: - -``` -maxUses = rebalanceWindowSeconds * totalRequestsPerSecond / numAppInstances / poolSize -``` - -In the example above, assuming we acquire and release 1 connection per request and we are aiming for a 30 minute rebalancing window: - -``` -maxUses = rebalanceWindowSeconds * totalRequestsPerSecond / numAppInstances / poolSize - 7200 = 1800 * 1000 / 10 / 25 -``` - -## tests - -To run tests clone the repo, `npm i` in the working dir, and then run `npm test` - -## contributions - -I love contributions. Please make sure they have tests, and submit a PR. If you're not sure if the issue is worth it or will be accepted it never hurts to open an issue to begin the conversation. If you're interested in keeping up with node-postgres releated stuff, you can follow me on twitter at [@briancarlson](https://twitter.com/briancarlson) - I generally announce any noteworthy updates there. - -## license - -The MIT License (MIT) -Copyright (c) 2016 Brian M. Carlson - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/pg-pool/esm/index.mjs b/node_modules/pg-pool/esm/index.mjs deleted file mode 100644 index a97fb62..0000000 --- a/node_modules/pg-pool/esm/index.mjs +++ /dev/null @@ -1,5 +0,0 @@ -// ESM wrapper for pg-pool -import Pool from '../index.js' - -// Export as default only to match CJS module -export default Pool diff --git a/node_modules/pg-pool/index.js b/node_modules/pg-pool/index.js deleted file mode 100644 index 2fbdb78..0000000 --- a/node_modules/pg-pool/index.js +++ /dev/null @@ -1,517 +0,0 @@ -'use strict' -const EventEmitter = require('events').EventEmitter - -const NOOP = function () {} - -const removeWhere = (list, predicate) => { - const i = list.findIndex(predicate) - - return i === -1 ? undefined : list.splice(i, 1)[0] -} - -class IdleItem { - constructor(client, idleListener, timeoutId) { - this.client = client - this.idleListener = idleListener - this.timeoutId = timeoutId - } -} - -class PendingItem { - constructor(callback) { - this.callback = callback - } -} - -function throwOnDoubleRelease() { - throw new Error('Release called on client which has already been released to the pool.') -} - -function promisify(Promise, callback) { - if (callback) { - return { callback: callback, result: undefined } - } - let rej - let res - const cb = function (err, client) { - err ? rej(err) : res(client) - } - const result = new Promise(function (resolve, reject) { - res = resolve - rej = reject - }).catch((err) => { - // replace the stack trace that leads to `TCP.onStreamRead` with one that leads back to the - // application that created the query - Error.captureStackTrace(err) - throw err - }) - return { callback: cb, result: result } -} - -function makeIdleListener(pool, client) { - return function idleListener(err) { - err.client = client - - client.removeListener('error', idleListener) - client.on('error', () => { - pool.log('additional client error after disconnection due to error', err) - }) - pool._remove(client) - // TODO - document that once the pool emits an error - // the client has already been closed & purged and is unusable - pool.emit('error', err, client) - } -} - -class Pool extends EventEmitter { - constructor(options, Client) { - super() - this.options = Object.assign({}, options) - - if (options != null && 'password' in options) { - // "hiding" the password so it doesn't show up in stack traces - // or if the client is console.logged - Object.defineProperty(this.options, 'password', { - configurable: true, - enumerable: false, - writable: true, - value: options.password, - }) - } - if (options != null && options.ssl && options.ssl.key) { - // "hiding" the ssl->key so it doesn't show up in stack traces - // or if the client is console.logged - Object.defineProperty(this.options.ssl, 'key', { - enumerable: false, - }) - } - - this.options.max = this.options.max || this.options.poolSize || 10 - this.options.min = this.options.min || 0 - this.options.maxUses = this.options.maxUses || Infinity - this.options.allowExitOnIdle = this.options.allowExitOnIdle || false - this.options.maxLifetimeSeconds = this.options.maxLifetimeSeconds || 0 - this.log = this.options.log || function () {} - this.Client = this.options.Client || Client || require('pg').Client - this.Promise = this.options.Promise || global.Promise - - if (typeof this.options.idleTimeoutMillis === 'undefined') { - this.options.idleTimeoutMillis = 10000 - } - - this._clients = [] - this._idle = [] - this._expired = new WeakSet() - this._pendingQueue = [] - this._endCallback = undefined - this.ending = false - this.ended = false - } - - _promiseTry(f) { - const Promise = this.Promise - if (typeof Promise.try === 'function') { - return Promise.try(f) - } - return new Promise((resolve) => resolve(f())) - } - - _isFull() { - return this._clients.length >= this.options.max - } - - _isAboveMin() { - return this._clients.length > this.options.min - } - - _pulseQueue() { - this.log('pulse queue') - if (this.ended) { - this.log('pulse queue ended') - return - } - if (this.ending) { - this.log('pulse queue on ending') - if (this._idle.length) { - this._idle.slice().map((item) => { - this._remove(item.client) - }) - } - if (!this._clients.length) { - this.ended = true - this._endCallback() - } - return - } - - // if we don't have any waiting, do nothing - if (!this._pendingQueue.length) { - this.log('no queued requests') - return - } - // if we don't have any idle clients and we have no more room do nothing - if (!this._idle.length && this._isFull()) { - return - } - const pendingItem = this._pendingQueue.shift() - if (this._idle.length) { - const idleItem = this._idle.pop() - clearTimeout(idleItem.timeoutId) - const client = idleItem.client - client.ref && client.ref() - const idleListener = idleItem.idleListener - - return this._acquireClient(client, pendingItem, idleListener, false) - } - if (!this._isFull()) { - return this.newClient(pendingItem) - } - throw new Error('unexpected condition') - } - - _remove(client, callback) { - const removed = removeWhere(this._idle, (item) => item.client === client) - - if (removed !== undefined) { - clearTimeout(removed.timeoutId) - } - - this._clients = this._clients.filter((c) => c !== client) - const context = this - client.end(() => { - context.emit('remove', client) - - if (typeof callback === 'function') { - callback() - } - }) - } - - connect(cb) { - if (this.ending) { - const err = new Error('Cannot use a pool after calling end on the pool') - return cb ? cb(err) : this.Promise.reject(err) - } - - const response = promisify(this.Promise, cb) - const result = response.result - - // if we don't have to connect a new client, don't do so - if (this._isFull() || this._idle.length) { - // if we have idle clients schedule a pulse immediately - if (this._idle.length) { - process.nextTick(() => this._pulseQueue()) - } - - if (!this.options.connectionTimeoutMillis) { - this._pendingQueue.push(new PendingItem(response.callback)) - return result - } - - const queueCallback = (err, res, done) => { - clearTimeout(tid) - response.callback(err, res, done) - } - - const pendingItem = new PendingItem(queueCallback) - - // set connection timeout on checking out an existing client - const tid = setTimeout(() => { - // remove the callback from pending waiters because - // we're going to call it with a timeout error - removeWhere(this._pendingQueue, (i) => i.callback === queueCallback) - pendingItem.timedOut = true - response.callback(new Error('timeout exceeded when trying to connect')) - }, this.options.connectionTimeoutMillis) - - if (tid.unref) { - tid.unref() - } - - this._pendingQueue.push(pendingItem) - return result - } - - this.newClient(new PendingItem(response.callback)) - - return result - } - - newClient(pendingItem) { - const client = new this.Client(this.options) - this._clients.push(client) - const idleListener = makeIdleListener(this, client) - - this.log('checking client timeout') - - // connection timeout logic - let tid - let timeoutHit = false - if (this.options.connectionTimeoutMillis) { - tid = setTimeout(() => { - if (client.connection) { - this.log('ending client due to timeout') - timeoutHit = true - client.connection.stream.destroy() - } else if (!client.isConnected()) { - this.log('ending client due to timeout') - timeoutHit = true - // force kill the node driver, and let libpq do its teardown - client.end() - } - }, this.options.connectionTimeoutMillis) - } - - this.log('connecting new client') - client.connect((err) => { - if (tid) { - clearTimeout(tid) - } - client.on('error', idleListener) - if (err) { - this.log('client failed to connect', err) - // remove the dead client from our list of clients - this._clients = this._clients.filter((c) => c !== client) - if (timeoutHit) { - err = new Error('Connection terminated due to connection timeout', { cause: err }) - } - - // this client won’t be released, so move on immediately - this._pulseQueue() - - if (!pendingItem.timedOut) { - pendingItem.callback(err, undefined, NOOP) - } - } else { - this.log('new client connected') - - if (this.options.onConnect) { - this._promiseTry(() => this.options.onConnect(client)).then( - () => { - this._afterConnect(client, pendingItem, idleListener) - }, - (hookErr) => { - this._clients = this._clients.filter((c) => c !== client) - client.end(() => { - this._pulseQueue() - if (!pendingItem.timedOut) { - pendingItem.callback(hookErr, undefined, NOOP) - } - }) - } - ) - return - } - - return this._afterConnect(client, pendingItem, idleListener) - } - }) - } - - _afterConnect(client, pendingItem, idleListener) { - if (this.options.maxLifetimeSeconds !== 0) { - const maxLifetimeTimeout = setTimeout(() => { - this.log('ending client due to expired lifetime') - this._expired.add(client) - const idleIndex = this._idle.findIndex((idleItem) => idleItem.client === client) - if (idleIndex !== -1) { - this._acquireClient( - client, - new PendingItem((err, client, clientRelease) => clientRelease()), - idleListener, - false - ) - } - }, this.options.maxLifetimeSeconds * 1000) - - maxLifetimeTimeout.unref() - client.once('end', () => clearTimeout(maxLifetimeTimeout)) - } - - return this._acquireClient(client, pendingItem, idleListener, true) - } - - // acquire a client for a pending work item - _acquireClient(client, pendingItem, idleListener, isNew) { - if (isNew) { - this.emit('connect', client) - } - - this.emit('acquire', client) - - client.release = this._releaseOnce(client, idleListener) - - client.removeListener('error', idleListener) - - if (!pendingItem.timedOut) { - if (isNew && this.options.verify) { - this.options.verify(client, (err) => { - if (err) { - client.release(err) - return pendingItem.callback(err, undefined, NOOP) - } - - pendingItem.callback(undefined, client, client.release) - }) - } else { - pendingItem.callback(undefined, client, client.release) - } - } else { - if (isNew && this.options.verify) { - this.options.verify(client, client.release) - } else { - client.release() - } - } - } - - // returns a function that wraps _release and throws if called more than once - _releaseOnce(client, idleListener) { - let released = false - - return (err) => { - if (released) { - throwOnDoubleRelease() - } - - released = true - this._release(client, idleListener, err) - } - } - - // release a client back to the poll, include an error - // to remove it from the pool - _release(client, idleListener, err) { - client.on('error', idleListener) - - client._poolUseCount = (client._poolUseCount || 0) + 1 - - this.emit('release', err, client) - - // TODO(bmc): expose a proper, public interface _queryable and _ending - if (err || this.ending || !client._queryable || client._ending || client._poolUseCount >= this.options.maxUses) { - if (client._poolUseCount >= this.options.maxUses) { - this.log('remove expended client') - } - - return this._remove(client, this._pulseQueue.bind(this)) - } - - const isExpired = this._expired.has(client) - if (isExpired) { - this.log('remove expired client') - this._expired.delete(client) - return this._remove(client, this._pulseQueue.bind(this)) - } - - // idle timeout - let tid - if (this.options.idleTimeoutMillis && this._isAboveMin()) { - tid = setTimeout(() => { - if (this._isAboveMin()) { - this.log('remove idle client') - this._remove(client, this._pulseQueue.bind(this)) - } - }, this.options.idleTimeoutMillis) - - if (this.options.allowExitOnIdle) { - // allow Node to exit if this is all that's left - tid.unref() - } - } - - if (this.options.allowExitOnIdle) { - client.unref() - } - - this._idle.push(new IdleItem(client, idleListener, tid)) - this._pulseQueue() - } - - query(text, values, cb) { - // guard clause against passing a function as the first parameter - if (typeof text === 'function') { - const response = promisify(this.Promise, text) - setImmediate(function () { - return response.callback(new Error('Passing a function as the first parameter to pool.query is not supported')) - }) - return response.result - } - - // allow plain text query without values - if (typeof values === 'function') { - cb = values - values = undefined - } - const response = promisify(this.Promise, cb) - cb = response.callback - - this.connect((err, client) => { - if (err) { - return cb(err) - } - - let clientReleased = false - const onError = (err) => { - if (clientReleased) { - return - } - clientReleased = true - client.release(err) - cb(err) - } - - client.once('error', onError) - this.log('dispatching query') - try { - client.query(text, values, (err, res) => { - this.log('query dispatched') - client.removeListener('error', onError) - if (clientReleased) { - return - } - clientReleased = true - client.release(err) - if (err) { - return cb(err) - } - return cb(undefined, res) - }) - } catch (err) { - client.release(err) - return cb(err) - } - }) - return response.result - } - - end(cb) { - this.log('ending') - if (this.ending) { - const err = new Error('Called end on pool more than once') - return cb ? cb(err) : this.Promise.reject(err) - } - this.ending = true - const promised = promisify(this.Promise, cb) - this._endCallback = promised.callback - this._pulseQueue() - return promised.result - } - - get waitingCount() { - return this._pendingQueue.length - } - - get idleCount() { - return this._idle.length - } - - get expiredCount() { - return this._clients.reduce((acc, client) => acc + (this._expired.has(client) ? 1 : 0), 0) - } - - get totalCount() { - return this._clients.length - } -} -module.exports = Pool diff --git a/node_modules/pg-pool/package.json b/node_modules/pg-pool/package.json deleted file mode 100644 index a7fe587..0000000 --- a/node_modules/pg-pool/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "pg-pool", - "version": "3.13.0", - "description": "Connection pool for node-postgres", - "main": "index.js", - "exports": { - ".": { - "import": "./esm/index.mjs", - "require": "./index.js", - "default": "./index.js" - } - }, - "directories": { - "test": "test" - }, - "scripts": { - "test": " node_modules/.bin/mocha" - }, - "repository": { - "type": "git", - "url": "git://github.com/brianc/node-postgres.git", - "directory": "packages/pg-pool" - }, - "keywords": [ - "pg", - "postgres", - "pool", - "database" - ], - "author": "Brian M. Carlson", - "license": "MIT", - "bugs": { - "url": "https://github.com/brianc/node-postgres/issues" - }, - "homepage": "https://github.com/brianc/node-postgres/tree/master/packages/pg-pool#readme", - "devDependencies": { - "bluebird": "3.7.2", - "co": "4.6.0", - "expect.js": "0.3.1", - "lodash": "^4.17.11", - "mocha": "^11.7.5" - }, - "peerDependencies": { - "pg": ">=8.0" - }, - "files": [ - "index.js", - "esm" - ], - "gitHead": "c9070cc8d526fca65780cedc25c1966b57cf7532" -} diff --git a/node_modules/pg-protocol/LICENSE b/node_modules/pg-protocol/LICENSE deleted file mode 100644 index 5c14056..0000000 --- a/node_modules/pg-protocol/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2010 - 2021 Brian Carlson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/pg-protocol/README.md b/node_modules/pg-protocol/README.md deleted file mode 100644 index 8c52e40..0000000 --- a/node_modules/pg-protocol/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# pg-protocol - -Low level postgres wire protocol parser and serializer written in Typescript. Used by node-postgres. Needs more documentation. :smile: diff --git a/node_modules/pg-protocol/dist/b.d.ts b/node_modules/pg-protocol/dist/b.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/pg-protocol/dist/b.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/pg-protocol/dist/b.js b/node_modules/pg-protocol/dist/b.js deleted file mode 100644 index 6c47c10..0000000 --- a/node_modules/pg-protocol/dist/b.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -// file for microbenchmarking -Object.defineProperty(exports, "__esModule", { value: true }); -const buffer_reader_1 = require("./buffer-reader"); -const LOOPS = 1000; -let count = 0; -const start = performance.now(); -const reader = new buffer_reader_1.BufferReader(); -const buffer = Buffer.from([33, 33, 33, 33, 33, 33, 33, 0]); -const run = () => { - if (count > LOOPS) { - console.log(performance.now() - start); - return; - } - count++; - for (let i = 0; i < LOOPS; i++) { - reader.setBuffer(0, buffer); - reader.cstring(); - } - setImmediate(run); -}; -run(); -//# sourceMappingURL=b.js.map \ No newline at end of file diff --git a/node_modules/pg-protocol/dist/b.js.map b/node_modules/pg-protocol/dist/b.js.map deleted file mode 100644 index ccc8d6f..0000000 --- a/node_modules/pg-protocol/dist/b.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"b.js","sourceRoot":"","sources":["../src/b.ts"],"names":[],"mappings":";AAAA,6BAA6B;;AAE7B,mDAA8C;AAE9C,MAAM,KAAK,GAAG,IAAI,CAAA;AAClB,IAAI,KAAK,GAAG,CAAC,CAAA;AACb,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,CAAA;AAE/B,MAAM,MAAM,GAAG,IAAI,4BAAY,EAAE,CAAA;AACjC,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAA;AAE3D,MAAM,GAAG,GAAG,GAAG,EAAE;IACf,IAAI,KAAK,GAAG,KAAK,EAAE;QACjB,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAA;QACtC,OAAM;KACP;IACD,KAAK,EAAE,CAAA;IACP,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;QAC9B,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;QAC3B,MAAM,CAAC,OAAO,EAAE,CAAA;KACjB;IACD,YAAY,CAAC,GAAG,CAAC,CAAA;AACnB,CAAC,CAAA;AAED,GAAG,EAAE,CAAA"} \ No newline at end of file diff --git a/node_modules/pg-protocol/dist/buffer-reader.d.ts b/node_modules/pg-protocol/dist/buffer-reader.d.ts deleted file mode 100644 index 41f753e..0000000 --- a/node_modules/pg-protocol/dist/buffer-reader.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/// -export declare class BufferReader { - private offset; - private buffer; - private encoding; - constructor(offset?: number); - setBuffer(offset: number, buffer: Buffer): void; - int16(): number; - byte(): number; - int32(): number; - uint32(): number; - string(length: number): string; - cstring(): string; - bytes(length: number): Buffer; -} diff --git a/node_modules/pg-protocol/dist/buffer-reader.js b/node_modules/pg-protocol/dist/buffer-reader.js deleted file mode 100644 index 1679fa8..0000000 --- a/node_modules/pg-protocol/dist/buffer-reader.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BufferReader = void 0; -class BufferReader { - constructor(offset = 0) { - this.offset = offset; - this.buffer = Buffer.allocUnsafe(0); - // TODO(bmc): support non-utf8 encoding? - this.encoding = 'utf-8'; - } - setBuffer(offset, buffer) { - this.offset = offset; - this.buffer = buffer; - } - int16() { - const result = this.buffer.readInt16BE(this.offset); - this.offset += 2; - return result; - } - byte() { - const result = this.buffer[this.offset]; - this.offset++; - return result; - } - int32() { - const result = this.buffer.readInt32BE(this.offset); - this.offset += 4; - return result; - } - uint32() { - const result = this.buffer.readUInt32BE(this.offset); - this.offset += 4; - return result; - } - string(length) { - const result = this.buffer.toString(this.encoding, this.offset, this.offset + length); - this.offset += length; - return result; - } - cstring() { - const start = this.offset; - let end = start; - // eslint-disable-next-line no-empty - while (this.buffer[end++] !== 0) { } - this.offset = end; - return this.buffer.toString(this.encoding, start, end - 1); - } - bytes(length) { - const result = this.buffer.slice(this.offset, this.offset + length); - this.offset += length; - return result; - } -} -exports.BufferReader = BufferReader; -//# sourceMappingURL=buffer-reader.js.map \ No newline at end of file diff --git a/node_modules/pg-protocol/dist/buffer-reader.js.map b/node_modules/pg-protocol/dist/buffer-reader.js.map deleted file mode 100644 index c8459d0..0000000 --- a/node_modules/pg-protocol/dist/buffer-reader.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"buffer-reader.js","sourceRoot":"","sources":["../src/buffer-reader.ts"],"names":[],"mappings":";;;AAAA,MAAa,YAAY;IAMvB,YAAoB,SAAiB,CAAC;QAAlB,WAAM,GAAN,MAAM,CAAY;QAL9B,WAAM,GAAW,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;QAE9C,wCAAwC;QAChC,aAAQ,GAAW,OAAO,CAAA;IAEO,CAAC;IAEnC,SAAS,CAAC,MAAc,EAAE,MAAc;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAEM,KAAK;QACV,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACnD,IAAI,CAAC,MAAM,IAAI,CAAC,CAAA;QAChB,OAAO,MAAM,CAAA;IACf,CAAC;IAEM,IAAI;QACT,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACvC,IAAI,CAAC,MAAM,EAAE,CAAA;QACb,OAAO,MAAM,CAAA;IACf,CAAC;IAEM,KAAK;QACV,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACnD,IAAI,CAAC,MAAM,IAAI,CAAC,CAAA;QAChB,OAAO,MAAM,CAAA;IACf,CAAC;IAEM,MAAM;QACX,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACpD,IAAI,CAAC,MAAM,IAAI,CAAC,CAAA;QAChB,OAAO,MAAM,CAAA;IACf,CAAC;IAEM,MAAM,CAAC,MAAc;QAC1B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,CAAA;QACrF,IAAI,CAAC,MAAM,IAAI,MAAM,CAAA;QACrB,OAAO,MAAM,CAAA;IACf,CAAC;IAEM,OAAO;QACZ,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;QACzB,IAAI,GAAG,GAAG,KAAK,CAAA;QACf,oCAAoC;QACpC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,EAAE,GAAE;QACnC,IAAI,CAAC,MAAM,GAAG,GAAG,CAAA;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,GAAG,CAAC,CAAC,CAAA;IAC5D,CAAC;IAEM,KAAK,CAAC,MAAc;QACzB,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,CAAA;QACnE,IAAI,CAAC,MAAM,IAAI,MAAM,CAAA;QACrB,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAzDD,oCAyDC"} \ No newline at end of file diff --git a/node_modules/pg-protocol/dist/buffer-writer.d.ts b/node_modules/pg-protocol/dist/buffer-writer.d.ts deleted file mode 100644 index 4ac41e6..0000000 --- a/node_modules/pg-protocol/dist/buffer-writer.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/// -export declare class Writer { - private size; - private buffer; - private offset; - private headerPosition; - constructor(size?: number); - private ensure; - addInt32(num: number): Writer; - addInt16(num: number): Writer; - addCString(string: string): Writer; - addString(string?: string): Writer; - add(otherBuffer: Buffer): Writer; - private join; - flush(code?: number): Buffer; -} diff --git a/node_modules/pg-protocol/dist/buffer-writer.js b/node_modules/pg-protocol/dist/buffer-writer.js deleted file mode 100644 index 76b3f8c..0000000 --- a/node_modules/pg-protocol/dist/buffer-writer.js +++ /dev/null @@ -1,81 +0,0 @@ -"use strict"; -//binary data writer tuned for encoding binary specific to the postgres binary protocol -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Writer = void 0; -class Writer { - constructor(size = 256) { - this.size = size; - this.offset = 5; - this.headerPosition = 0; - this.buffer = Buffer.allocUnsafe(size); - } - ensure(size) { - const remaining = this.buffer.length - this.offset; - if (remaining < size) { - const oldBuffer = this.buffer; - // exponential growth factor of around ~ 1.5 - // https://stackoverflow.com/questions/2269063/buffer-growth-strategy - const newSize = oldBuffer.length + (oldBuffer.length >> 1) + size; - this.buffer = Buffer.allocUnsafe(newSize); - oldBuffer.copy(this.buffer); - } - } - addInt32(num) { - this.ensure(4); - this.buffer[this.offset++] = (num >>> 24) & 0xff; - this.buffer[this.offset++] = (num >>> 16) & 0xff; - this.buffer[this.offset++] = (num >>> 8) & 0xff; - this.buffer[this.offset++] = (num >>> 0) & 0xff; - return this; - } - addInt16(num) { - this.ensure(2); - this.buffer[this.offset++] = (num >>> 8) & 0xff; - this.buffer[this.offset++] = (num >>> 0) & 0xff; - return this; - } - addCString(string) { - if (!string) { - this.ensure(1); - } - else { - const len = Buffer.byteLength(string); - this.ensure(len + 1); // +1 for null terminator - this.buffer.write(string, this.offset, 'utf-8'); - this.offset += len; - } - this.buffer[this.offset++] = 0; // null terminator - return this; - } - addString(string = '') { - const len = Buffer.byteLength(string); - this.ensure(len); - this.buffer.write(string, this.offset); - this.offset += len; - return this; - } - add(otherBuffer) { - this.ensure(otherBuffer.length); - otherBuffer.copy(this.buffer, this.offset); - this.offset += otherBuffer.length; - return this; - } - join(code) { - if (code) { - this.buffer[this.headerPosition] = code; - //length is everything in this packet minus the code - const length = this.offset - (this.headerPosition + 1); - this.buffer.writeInt32BE(length, this.headerPosition + 1); - } - return this.buffer.slice(code ? 0 : 5, this.offset); - } - flush(code) { - const result = this.join(code); - this.offset = 5; - this.headerPosition = 0; - this.buffer = Buffer.allocUnsafe(this.size); - return result; - } -} -exports.Writer = Writer; -//# sourceMappingURL=buffer-writer.js.map \ No newline at end of file diff --git a/node_modules/pg-protocol/dist/buffer-writer.js.map b/node_modules/pg-protocol/dist/buffer-writer.js.map deleted file mode 100644 index 5aa1ba0..0000000 --- a/node_modules/pg-protocol/dist/buffer-writer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"buffer-writer.js","sourceRoot":"","sources":["../src/buffer-writer.ts"],"names":[],"mappings":";AAAA,uFAAuF;;;AAEvF,MAAa,MAAM;IAIjB,YAAoB,OAAO,GAAG;QAAV,SAAI,GAAJ,IAAI,CAAM;QAFtB,WAAM,GAAW,CAAC,CAAA;QAClB,mBAAc,GAAW,CAAC,CAAA;QAEhC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;IACxC,CAAC;IAEO,MAAM,CAAC,IAAY;QACzB,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;QAClD,IAAI,SAAS,GAAG,IAAI,EAAE;YACpB,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAA;YAC7B,4CAA4C;YAC5C,qEAAqE;YACrE,MAAM,OAAO,GAAG,SAAS,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,IAAI,CAAA;YACjE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;YACzC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;SAC5B;IACH,CAAC;IAEM,QAAQ,CAAC,GAAW;QACzB,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QACd,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,IAAI,CAAA;QAChD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,IAAI,CAAA;QAChD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,IAAI,CAAA;QAC/C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,IAAI,CAAA;QAC/C,OAAO,IAAI,CAAA;IACb,CAAC;IAEM,QAAQ,CAAC,GAAW;QACzB,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QACd,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,IAAI,CAAA;QAC/C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,IAAI,CAAA;QAC/C,OAAO,IAAI,CAAA;IACb,CAAC;IAEM,UAAU,CAAC,MAAc;QAC9B,IAAI,CAAC,MAAM,EAAE;YACX,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;SACf;aAAM;YACL,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;YACrC,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAA,CAAC,yBAAyB;YAC9C,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;YAC/C,IAAI,CAAC,MAAM,IAAI,GAAG,CAAA;SACnB;QAED,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAA,CAAC,kBAAkB;QACjD,OAAO,IAAI,CAAA;IACb,CAAC;IAEM,SAAS,CAAC,SAAiB,EAAE;QAClC,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;QACrC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QAChB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;QACtC,IAAI,CAAC,MAAM,IAAI,GAAG,CAAA;QAClB,OAAO,IAAI,CAAA;IACb,CAAC;IAEM,GAAG,CAAC,WAAmB;QAC5B,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;QAC/B,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;QAC1C,IAAI,CAAC,MAAM,IAAI,WAAW,CAAC,MAAM,CAAA;QACjC,OAAO,IAAI,CAAA;IACb,CAAC;IAEO,IAAI,CAAC,IAAa;QACxB,IAAI,IAAI,EAAE;YACR,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,IAAI,CAAA;YACvC,oDAAoD;YACpD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,CAAA;YACtD,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC,CAAA;SAC1D;QACD,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;IACrD,CAAC;IAEM,KAAK,CAAC,IAAa;QACxB,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC9B,IAAI,CAAC,MAAM,GAAG,CAAC,CAAA;QACf,IAAI,CAAC,cAAc,GAAG,CAAC,CAAA;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3C,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAlFD,wBAkFC"} \ No newline at end of file diff --git a/node_modules/pg-protocol/dist/inbound-parser.test.d.ts b/node_modules/pg-protocol/dist/inbound-parser.test.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/pg-protocol/dist/inbound-parser.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/pg-protocol/dist/inbound-parser.test.js b/node_modules/pg-protocol/dist/inbound-parser.test.js deleted file mode 100644 index f64fa74..0000000 --- a/node_modules/pg-protocol/dist/inbound-parser.test.js +++ /dev/null @@ -1,530 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const test_buffers_1 = __importDefault(require("./testing/test-buffers")); -const buffer_list_1 = __importDefault(require("./testing/buffer-list")); -const _1 = require("."); -const assert_1 = __importDefault(require("assert")); -const stream_1 = require("stream"); -const parser_1 = require("./parser"); -const authOkBuffer = test_buffers_1.default.authenticationOk(); -const paramStatusBuffer = test_buffers_1.default.parameterStatus('client_encoding', 'UTF8'); -const readyForQueryBuffer = test_buffers_1.default.readyForQuery(); -const backendKeyDataBuffer = test_buffers_1.default.backendKeyData(1, 2); -const commandCompleteBuffer = test_buffers_1.default.commandComplete('SELECT 3'); -const parseCompleteBuffer = test_buffers_1.default.parseComplete(); -const bindCompleteBuffer = test_buffers_1.default.bindComplete(); -const portalSuspendedBuffer = test_buffers_1.default.portalSuspended(); -const row1 = { - name: 'id', - tableID: 1, - attributeNumber: 2, - dataTypeID: 3, - dataTypeSize: 4, - typeModifier: 5, - formatCode: 0, -}; -const oneRowDescBuff = test_buffers_1.default.rowDescription([row1]); -row1.name = 'bang'; -const twoRowBuf = test_buffers_1.default.rowDescription([ - row1, - { - name: 'whoah', - tableID: 10, - attributeNumber: 11, - dataTypeID: 12, - dataTypeSize: 13, - typeModifier: 14, - formatCode: 0, - }, -]); -const rowWithBigOids = { - name: 'bigoid', - tableID: 3000000001, - attributeNumber: 2, - dataTypeID: 3000000003, - dataTypeSize: 4, - typeModifier: 5, - formatCode: 0, -}; -const bigOidDescBuff = test_buffers_1.default.rowDescription([rowWithBigOids]); -const emptyRowFieldBuf = test_buffers_1.default.dataRow([]); -const oneFieldBuf = test_buffers_1.default.dataRow(['test']); -const expectedAuthenticationOkayMessage = { - name: 'authenticationOk', - length: 8, -}; -const expectedParameterStatusMessage = { - name: 'parameterStatus', - parameterName: 'client_encoding', - parameterValue: 'UTF8', - length: 25, -}; -const expectedBackendKeyDataMessage = { - name: 'backendKeyData', - processID: 1, - secretKey: 2, -}; -const expectedReadyForQueryMessage = { - name: 'readyForQuery', - length: 5, - status: 'I', -}; -const expectedCommandCompleteMessage = { - name: 'commandComplete', - length: 13, - text: 'SELECT 3', -}; -const emptyRowDescriptionBuffer = new buffer_list_1.default() - .addInt16(0) // number of fields - .join(true, 'T'); -const expectedEmptyRowDescriptionMessage = { - name: 'rowDescription', - length: 6, - fieldCount: 0, - fields: [], -}; -const expectedOneRowMessage = { - name: 'rowDescription', - length: 27, - fieldCount: 1, - fields: [ - { - name: 'id', - tableID: 1, - columnID: 2, - dataTypeID: 3, - dataTypeSize: 4, - dataTypeModifier: 5, - format: 'text', - }, - ], -}; -const expectedTwoRowMessage = { - name: 'rowDescription', - length: 53, - fieldCount: 2, - fields: [ - { - name: 'bang', - tableID: 1, - columnID: 2, - dataTypeID: 3, - dataTypeSize: 4, - dataTypeModifier: 5, - format: 'text', - }, - { - name: 'whoah', - tableID: 10, - columnID: 11, - dataTypeID: 12, - dataTypeSize: 13, - dataTypeModifier: 14, - format: 'text', - }, - ], -}; -const expectedBigOidMessage = { - name: 'rowDescription', - length: 31, - fieldCount: 1, - fields: [ - { - name: 'bigoid', - tableID: 3000000001, - columnID: 2, - dataTypeID: 3000000003, - dataTypeSize: 4, - dataTypeModifier: 5, - format: 'text', - }, - ], -}; -const emptyParameterDescriptionBuffer = new buffer_list_1.default() - .addInt16(0) // number of parameters - .join(true, 't'); -const oneParameterDescBuf = test_buffers_1.default.parameterDescription([1111]); -const twoParameterDescBuf = test_buffers_1.default.parameterDescription([2222, 3333]); -const expectedEmptyParameterDescriptionMessage = { - name: 'parameterDescription', - length: 6, - parameterCount: 0, - dataTypeIDs: [], -}; -const expectedOneParameterMessage = { - name: 'parameterDescription', - length: 10, - parameterCount: 1, - dataTypeIDs: [1111], -}; -const expectedTwoParameterMessage = { - name: 'parameterDescription', - length: 14, - parameterCount: 2, - dataTypeIDs: [2222, 3333], -}; -const testForMessage = function (buffer, expectedMessage) { - it('receives and parses ' + expectedMessage.name, () => __awaiter(this, void 0, void 0, function* () { - const messages = yield parseBuffers([buffer]); - const [lastMessage] = messages; - for (const key in expectedMessage) { - assert_1.default.deepEqual(lastMessage[key], expectedMessage[key]); - } - })); -}; -const plainPasswordBuffer = test_buffers_1.default.authenticationCleartextPassword(); -const md5PasswordBuffer = test_buffers_1.default.authenticationMD5Password(); -const SASLBuffer = test_buffers_1.default.authenticationSASL(); -const SASLContinueBuffer = test_buffers_1.default.authenticationSASLContinue(); -const SASLFinalBuffer = test_buffers_1.default.authenticationSASLFinal(); -const expectedPlainPasswordMessage = { - name: 'authenticationCleartextPassword', -}; -const expectedMD5PasswordMessage = { - name: 'authenticationMD5Password', - salt: Buffer.from([1, 2, 3, 4]), -}; -const expectedSASLMessage = { - name: 'authenticationSASL', - mechanisms: ['SCRAM-SHA-256'], -}; -const expectedSASLContinueMessage = { - name: 'authenticationSASLContinue', - data: 'data', -}; -const expectedSASLFinalMessage = { - name: 'authenticationSASLFinal', - data: 'data', -}; -const notificationResponseBuffer = test_buffers_1.default.notification(4, 'hi', 'boom'); -const expectedNotificationResponseMessage = { - name: 'notification', - processId: 4, - channel: 'hi', - payload: 'boom', -}; -const parseBuffers = (buffers) => __awaiter(void 0, void 0, void 0, function* () { - const stream = new stream_1.PassThrough(); - for (const buffer of buffers) { - stream.write(buffer); - } - stream.end(); - const msgs = []; - yield (0, _1.parse)(stream, (msg) => msgs.push(msg)); - return msgs; -}); -describe('PgPacketStream', function () { - testForMessage(authOkBuffer, expectedAuthenticationOkayMessage); - testForMessage(plainPasswordBuffer, expectedPlainPasswordMessage); - testForMessage(md5PasswordBuffer, expectedMD5PasswordMessage); - testForMessage(SASLBuffer, expectedSASLMessage); - testForMessage(SASLContinueBuffer, expectedSASLContinueMessage); - // this exercises a found bug in the parser: - // https://github.com/brianc/node-postgres/pull/2210#issuecomment-627626084 - // and adds a test which is deterministic, rather than relying on network packet chunking - const extendedSASLContinueBuffer = Buffer.concat([SASLContinueBuffer, Buffer.from([1, 2, 3, 4])]); - testForMessage(extendedSASLContinueBuffer, expectedSASLContinueMessage); - testForMessage(SASLFinalBuffer, expectedSASLFinalMessage); - // this exercises a found bug in the parser: - // https://github.com/brianc/node-postgres/pull/2210#issuecomment-627626084 - // and adds a test which is deterministic, rather than relying on network packet chunking - const extendedSASLFinalBuffer = Buffer.concat([SASLFinalBuffer, Buffer.from([1, 2, 4, 5])]); - testForMessage(extendedSASLFinalBuffer, expectedSASLFinalMessage); - testForMessage(paramStatusBuffer, expectedParameterStatusMessage); - testForMessage(backendKeyDataBuffer, expectedBackendKeyDataMessage); - testForMessage(readyForQueryBuffer, expectedReadyForQueryMessage); - testForMessage(commandCompleteBuffer, expectedCommandCompleteMessage); - testForMessage(notificationResponseBuffer, expectedNotificationResponseMessage); - testForMessage(test_buffers_1.default.emptyQuery(), { - name: 'emptyQuery', - length: 4, - }); - testForMessage(Buffer.from([0x6e, 0, 0, 0, 4]), { - name: 'noData', - }); - describe('rowDescription messages', function () { - testForMessage(emptyRowDescriptionBuffer, expectedEmptyRowDescriptionMessage); - testForMessage(oneRowDescBuff, expectedOneRowMessage); - testForMessage(twoRowBuf, expectedTwoRowMessage); - testForMessage(bigOidDescBuff, expectedBigOidMessage); - }); - describe('parameterDescription messages', function () { - testForMessage(emptyParameterDescriptionBuffer, expectedEmptyParameterDescriptionMessage); - testForMessage(oneParameterDescBuf, expectedOneParameterMessage); - testForMessage(twoParameterDescBuf, expectedTwoParameterMessage); - }); - describe('parsing rows', function () { - describe('parsing empty row', function () { - testForMessage(emptyRowFieldBuf, { - name: 'dataRow', - fieldCount: 0, - }); - }); - describe('parsing data row with fields', function () { - testForMessage(oneFieldBuf, { - name: 'dataRow', - fieldCount: 1, - fields: ['test'], - }); - }); - }); - describe('notice message', function () { - // this uses the same logic as error message - const buff = test_buffers_1.default.notice([{ type: 'C', value: 'code' }]); - testForMessage(buff, { - name: 'notice', - code: 'code', - }); - }); - testForMessage(test_buffers_1.default.error([]), { - name: 'error', - }); - describe('with all the fields', function () { - const buffer = test_buffers_1.default.error([ - { - type: 'S', - value: 'ERROR', - }, - { - type: 'C', - value: 'code', - }, - { - type: 'M', - value: 'message', - }, - { - type: 'D', - value: 'details', - }, - { - type: 'H', - value: 'hint', - }, - { - type: 'P', - value: '100', - }, - { - type: 'p', - value: '101', - }, - { - type: 'q', - value: 'query', - }, - { - type: 'W', - value: 'where', - }, - { - type: 'F', - value: 'file', - }, - { - type: 'L', - value: 'line', - }, - { - type: 'R', - value: 'routine', - }, - { - type: 'Z', - value: 'alsdkf', - }, - ]); - testForMessage(buffer, { - name: 'error', - severity: 'ERROR', - code: 'code', - message: 'message', - detail: 'details', - hint: 'hint', - position: '100', - internalPosition: '101', - internalQuery: 'query', - where: 'where', - file: 'file', - line: 'line', - routine: 'routine', - }); - }); - testForMessage(parseCompleteBuffer, { - name: 'parseComplete', - }); - testForMessage(bindCompleteBuffer, { - name: 'bindComplete', - }); - testForMessage(bindCompleteBuffer, { - name: 'bindComplete', - }); - testForMessage(test_buffers_1.default.closeComplete(), { - name: 'closeComplete', - }); - describe('parses portal suspended message', function () { - testForMessage(portalSuspendedBuffer, { - name: 'portalSuspended', - }); - }); - describe('parses replication start message', function () { - testForMessage(Buffer.from([0x57, 0x00, 0x00, 0x00, 0x04]), { - name: 'replicationStart', - length: 4, - }); - }); - describe('copy', () => { - testForMessage(test_buffers_1.default.copyIn(0), { - name: 'copyInResponse', - length: 7, - binary: false, - columnTypes: [], - }); - testForMessage(test_buffers_1.default.copyIn(2), { - name: 'copyInResponse', - length: 11, - binary: false, - columnTypes: [0, 1], - }); - testForMessage(test_buffers_1.default.copyOut(0), { - name: 'copyOutResponse', - length: 7, - binary: false, - columnTypes: [], - }); - testForMessage(test_buffers_1.default.copyOut(3), { - name: 'copyOutResponse', - length: 13, - binary: false, - columnTypes: [0, 1, 2], - }); - testForMessage(test_buffers_1.default.copyDone(), { - name: 'copyDone', - length: 4, - }); - testForMessage(test_buffers_1.default.copyData(Buffer.from([5, 6, 7])), { - name: 'copyData', - length: 7, - chunk: Buffer.from([5, 6, 7]), - }); - }); - // since the data message on a stream can randomly divide the incomming - // tcp packets anywhere, we need to make sure we can parse every single - // split on a tcp message - describe('split buffer, single message parsing', function () { - const fullBuffer = test_buffers_1.default.dataRow([null, 'bang', 'zug zug', null, '!']); - it('parses when full buffer comes in', function () { - return __awaiter(this, void 0, void 0, function* () { - const messages = yield parseBuffers([fullBuffer]); - const message = messages[0]; - assert_1.default.equal(message.fields.length, 5); - assert_1.default.equal(message.fields[0], null); - assert_1.default.equal(message.fields[1], 'bang'); - assert_1.default.equal(message.fields[2], 'zug zug'); - assert_1.default.equal(message.fields[3], null); - assert_1.default.equal(message.fields[4], '!'); - }); - }); - const testMessageReceivedAfterSplitAt = function (split) { - return __awaiter(this, void 0, void 0, function* () { - const firstBuffer = Buffer.alloc(fullBuffer.length - split); - const secondBuffer = Buffer.alloc(fullBuffer.length - firstBuffer.length); - fullBuffer.copy(firstBuffer, 0, 0); - fullBuffer.copy(secondBuffer, 0, firstBuffer.length); - const messages = yield parseBuffers([firstBuffer, secondBuffer]); - const message = messages[0]; - assert_1.default.equal(message.fields.length, 5); - assert_1.default.equal(message.fields[0], null); - assert_1.default.equal(message.fields[1], 'bang'); - assert_1.default.equal(message.fields[2], 'zug zug'); - assert_1.default.equal(message.fields[3], null); - assert_1.default.equal(message.fields[4], '!'); - }); - }; - it('parses when split in the middle', function () { - return testMessageReceivedAfterSplitAt(6); - }); - it('parses when split at end', function () { - return testMessageReceivedAfterSplitAt(2); - }); - it('parses when split at beginning', function () { - return Promise.all([ - testMessageReceivedAfterSplitAt(fullBuffer.length - 2), - testMessageReceivedAfterSplitAt(fullBuffer.length - 1), - testMessageReceivedAfterSplitAt(fullBuffer.length - 5), - ]); - }); - }); - describe('split buffer, multiple message parsing', function () { - const dataRowBuffer = test_buffers_1.default.dataRow(['!']); - const readyForQueryBuffer = test_buffers_1.default.readyForQuery(); - const fullBuffer = Buffer.alloc(dataRowBuffer.length + readyForQueryBuffer.length); - dataRowBuffer.copy(fullBuffer, 0, 0); - readyForQueryBuffer.copy(fullBuffer, dataRowBuffer.length, 0); - const verifyMessages = function (messages) { - assert_1.default.strictEqual(messages.length, 2); - assert_1.default.deepEqual(messages[0], { - name: 'dataRow', - fieldCount: 1, - length: 11, - fields: ['!'], - }); - assert_1.default.equal(messages[0].fields[0], '!'); - assert_1.default.deepEqual(messages[1], { - name: 'readyForQuery', - length: 5, - status: 'I', - }); - }; - // sanity check - it('receives both messages when packet is not split', function () { - return __awaiter(this, void 0, void 0, function* () { - const messages = yield parseBuffers([fullBuffer]); - verifyMessages(messages); - }); - }); - const splitAndVerifyTwoMessages = function (split) { - return __awaiter(this, void 0, void 0, function* () { - const firstBuffer = Buffer.alloc(fullBuffer.length - split); - const secondBuffer = Buffer.alloc(fullBuffer.length - firstBuffer.length); - fullBuffer.copy(firstBuffer, 0, 0); - fullBuffer.copy(secondBuffer, 0, firstBuffer.length); - const messages = yield parseBuffers([firstBuffer, secondBuffer]); - verifyMessages(messages); - }); - }; - describe('receives both messages when packet is split', function () { - it('in the middle', function () { - return splitAndVerifyTwoMessages(11); - }); - it('at the front', function () { - return Promise.all([ - splitAndVerifyTwoMessages(fullBuffer.length - 1), - splitAndVerifyTwoMessages(fullBuffer.length - 4), - splitAndVerifyTwoMessages(fullBuffer.length - 6), - ]); - }); - it('at the end', function () { - return Promise.all([splitAndVerifyTwoMessages(8), splitAndVerifyTwoMessages(1)]); - }); - }); - }); - it('cleans up the reader after handling a packet', function () { - const parser = new parser_1.Parser(); - parser.parse(oneFieldBuf, () => { }); - assert_1.default.strictEqual(parser.reader.buffer.byteLength, 0); - }); -}); -//# sourceMappingURL=inbound-parser.test.js.map \ No newline at end of file diff --git a/node_modules/pg-protocol/dist/inbound-parser.test.js.map b/node_modules/pg-protocol/dist/inbound-parser.test.js.map deleted file mode 100644 index aaa00e6..0000000 --- a/node_modules/pg-protocol/dist/inbound-parser.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"inbound-parser.test.js","sourceRoot":"","sources":["../src/inbound-parser.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,0EAA4C;AAC5C,wEAA8C;AAC9C,wBAAyB;AACzB,oDAA2B;AAC3B,mCAAoC;AAEpC,qCAAiC;AAEjC,MAAM,YAAY,GAAG,sBAAO,CAAC,gBAAgB,EAAE,CAAA;AAC/C,MAAM,iBAAiB,GAAG,sBAAO,CAAC,eAAe,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAA;AAC5E,MAAM,mBAAmB,GAAG,sBAAO,CAAC,aAAa,EAAE,CAAA;AACnD,MAAM,oBAAoB,GAAG,sBAAO,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AACzD,MAAM,qBAAqB,GAAG,sBAAO,CAAC,eAAe,CAAC,UAAU,CAAC,CAAA;AACjE,MAAM,mBAAmB,GAAG,sBAAO,CAAC,aAAa,EAAE,CAAA;AACnD,MAAM,kBAAkB,GAAG,sBAAO,CAAC,YAAY,EAAE,CAAA;AACjD,MAAM,qBAAqB,GAAG,sBAAO,CAAC,eAAe,EAAE,CAAA;AAEvD,MAAM,IAAI,GAAG;IACX,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,CAAC;IACV,eAAe,EAAE,CAAC;IAClB,UAAU,EAAE,CAAC;IACb,YAAY,EAAE,CAAC;IACf,YAAY,EAAE,CAAC;IACf,UAAU,EAAE,CAAC;CACd,CAAA;AACD,MAAM,cAAc,GAAG,sBAAO,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;AACrD,IAAI,CAAC,IAAI,GAAG,MAAM,CAAA;AAElB,MAAM,SAAS,GAAG,sBAAO,CAAC,cAAc,CAAC;IACvC,IAAI;IACJ;QACE,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,EAAE;QACX,eAAe,EAAE,EAAE;QACnB,UAAU,EAAE,EAAE;QACd,YAAY,EAAE,EAAE;QAChB,YAAY,EAAE,EAAE;QAChB,UAAU,EAAE,CAAC;KACd;CACF,CAAC,CAAA;AAEF,MAAM,cAAc,GAAG;IACrB,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,UAAU;IACnB,eAAe,EAAE,CAAC;IAClB,UAAU,EAAE,UAAU;IACtB,YAAY,EAAE,CAAC;IACf,YAAY,EAAE,CAAC;IACf,UAAU,EAAE,CAAC;CACd,CAAA;AACD,MAAM,cAAc,GAAG,sBAAO,CAAC,cAAc,CAAC,CAAC,cAAc,CAAC,CAAC,CAAA;AAE/D,MAAM,gBAAgB,GAAG,sBAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;AAE5C,MAAM,WAAW,GAAG,sBAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;AAE7C,MAAM,iCAAiC,GAAG;IACxC,IAAI,EAAE,kBAAkB;IACxB,MAAM,EAAE,CAAC;CACV,CAAA;AAED,MAAM,8BAA8B,GAAG;IACrC,IAAI,EAAE,iBAAiB;IACvB,aAAa,EAAE,iBAAiB;IAChC,cAAc,EAAE,MAAM;IACtB,MAAM,EAAE,EAAE;CACX,CAAA;AAED,MAAM,6BAA6B,GAAG;IACpC,IAAI,EAAE,gBAAgB;IACtB,SAAS,EAAE,CAAC;IACZ,SAAS,EAAE,CAAC;CACb,CAAA;AAED,MAAM,4BAA4B,GAAG;IACnC,IAAI,EAAE,eAAe;IACrB,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,GAAG;CACZ,CAAA;AAED,MAAM,8BAA8B,GAAG;IACrC,IAAI,EAAE,iBAAiB;IACvB,MAAM,EAAE,EAAE;IACV,IAAI,EAAE,UAAU;CACjB,CAAA;AACD,MAAM,yBAAyB,GAAG,IAAI,qBAAU,EAAE;KAC/C,QAAQ,CAAC,CAAC,CAAC,CAAC,mBAAmB;KAC/B,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;AAElB,MAAM,kCAAkC,GAAG;IACzC,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE,CAAC;IACT,UAAU,EAAE,CAAC;IACb,MAAM,EAAE,EAAE;CACX,CAAA;AACD,MAAM,qBAAqB,GAAG;IAC5B,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE,EAAE;IACV,UAAU,EAAE,CAAC;IACb,MAAM,EAAE;QACN;YACE,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,CAAC;YACX,UAAU,EAAE,CAAC;YACb,YAAY,EAAE,CAAC;YACf,gBAAgB,EAAE,CAAC;YACnB,MAAM,EAAE,MAAM;SACf;KACF;CACF,CAAA;AAED,MAAM,qBAAqB,GAAG;IAC5B,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE,EAAE;IACV,UAAU,EAAE,CAAC;IACb,MAAM,EAAE;QACN;YACE,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,CAAC;YACX,UAAU,EAAE,CAAC;YACb,YAAY,EAAE,CAAC;YACf,gBAAgB,EAAE,CAAC;YACnB,MAAM,EAAE,MAAM;SACf;QACD;YACE,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,EAAE;YACd,YAAY,EAAE,EAAE;YAChB,gBAAgB,EAAE,EAAE;YACpB,MAAM,EAAE,MAAM;SACf;KACF;CACF,CAAA;AACD,MAAM,qBAAqB,GAAG;IAC5B,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE,EAAE;IACV,UAAU,EAAE,CAAC;IACb,MAAM,EAAE;QACN;YACE,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,UAAU;YACnB,QAAQ,EAAE,CAAC;YACX,UAAU,EAAE,UAAU;YACtB,YAAY,EAAE,CAAC;YACf,gBAAgB,EAAE,CAAC;YACnB,MAAM,EAAE,MAAM;SACf;KACF;CACF,CAAA;AAED,MAAM,+BAA+B,GAAG,IAAI,qBAAU,EAAE;KACrD,QAAQ,CAAC,CAAC,CAAC,CAAC,uBAAuB;KACnC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;AAElB,MAAM,mBAAmB,GAAG,sBAAO,CAAC,oBAAoB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;AAEhE,MAAM,mBAAmB,GAAG,sBAAO,CAAC,oBAAoB,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAEtE,MAAM,wCAAwC,GAAG;IAC/C,IAAI,EAAE,sBAAsB;IAC5B,MAAM,EAAE,CAAC;IACT,cAAc,EAAE,CAAC;IACjB,WAAW,EAAE,EAAE;CAChB,CAAA;AAED,MAAM,2BAA2B,GAAG;IAClC,IAAI,EAAE,sBAAsB;IAC5B,MAAM,EAAE,EAAE;IACV,cAAc,EAAE,CAAC;IACjB,WAAW,EAAE,CAAC,IAAI,CAAC;CACpB,CAAA;AAED,MAAM,2BAA2B,GAAG;IAClC,IAAI,EAAE,sBAAsB;IAC5B,MAAM,EAAE,EAAE;IACV,cAAc,EAAE,CAAC;IACjB,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;CAC1B,CAAA;AAED,MAAM,cAAc,GAAG,UAAU,MAAc,EAAE,eAAoB;IACnE,EAAE,CAAC,sBAAsB,GAAG,eAAe,CAAC,IAAI,EAAE,GAAS,EAAE;QAC3D,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;QAC7C,MAAM,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAA;QAE9B,KAAK,MAAM,GAAG,IAAI,eAAe,EAAE;YACjC,gBAAM,CAAC,SAAS,CAAE,WAAmB,CAAC,GAAG,CAAC,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,CAAA;SAClE;IACH,CAAC,CAAA,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,mBAAmB,GAAG,sBAAO,CAAC,+BAA+B,EAAE,CAAA;AACrE,MAAM,iBAAiB,GAAG,sBAAO,CAAC,yBAAyB,EAAE,CAAA;AAC7D,MAAM,UAAU,GAAG,sBAAO,CAAC,kBAAkB,EAAE,CAAA;AAC/C,MAAM,kBAAkB,GAAG,sBAAO,CAAC,0BAA0B,EAAE,CAAA;AAC/D,MAAM,eAAe,GAAG,sBAAO,CAAC,uBAAuB,EAAE,CAAA;AAEzD,MAAM,4BAA4B,GAAG;IACnC,IAAI,EAAE,iCAAiC;CACxC,CAAA;AAED,MAAM,0BAA0B,GAAG;IACjC,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAChC,CAAA;AAED,MAAM,mBAAmB,GAAG;IAC1B,IAAI,EAAE,oBAAoB;IAC1B,UAAU,EAAE,CAAC,eAAe,CAAC;CAC9B,CAAA;AAED,MAAM,2BAA2B,GAAG;IAClC,IAAI,EAAE,4BAA4B;IAClC,IAAI,EAAE,MAAM;CACb,CAAA;AAED,MAAM,wBAAwB,GAAG;IAC/B,IAAI,EAAE,yBAAyB;IAC/B,IAAI,EAAE,MAAM;CACb,CAAA;AAED,MAAM,0BAA0B,GAAG,sBAAO,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;AACxE,MAAM,mCAAmC,GAAG;IAC1C,IAAI,EAAE,cAAc;IACpB,SAAS,EAAE,CAAC;IACZ,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,MAAM;CAChB,CAAA;AAED,MAAM,YAAY,GAAG,CAAO,OAAiB,EAA6B,EAAE;IAC1E,MAAM,MAAM,GAAG,IAAI,oBAAW,EAAE,CAAA;IAChC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;QAC5B,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;KACrB;IACD,MAAM,CAAC,GAAG,EAAE,CAAA;IACZ,MAAM,IAAI,GAAqB,EAAE,CAAA;IACjC,MAAM,IAAA,QAAK,EAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;IAC5C,OAAO,IAAI,CAAA;AACb,CAAC,CAAA,CAAA;AAED,QAAQ,CAAC,gBAAgB,EAAE;IACzB,cAAc,CAAC,YAAY,EAAE,iCAAiC,CAAC,CAAA;IAC/D,cAAc,CAAC,mBAAmB,EAAE,4BAA4B,CAAC,CAAA;IACjE,cAAc,CAAC,iBAAiB,EAAE,0BAA0B,CAAC,CAAA;IAC7D,cAAc,CAAC,UAAU,EAAE,mBAAmB,CAAC,CAAA;IAC/C,cAAc,CAAC,kBAAkB,EAAE,2BAA2B,CAAC,CAAA;IAE/D,4CAA4C;IAC5C,2EAA2E;IAC3E,yFAAyF;IACzF,MAAM,0BAA0B,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,kBAAkB,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IACjG,cAAc,CAAC,0BAA0B,EAAE,2BAA2B,CAAC,CAAA;IAEvE,cAAc,CAAC,eAAe,EAAE,wBAAwB,CAAC,CAAA;IAEzD,4CAA4C;IAC5C,2EAA2E;IAC3E,yFAAyF;IACzF,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,eAAe,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAC3F,cAAc,CAAC,uBAAuB,EAAE,wBAAwB,CAAC,CAAA;IAEjE,cAAc,CAAC,iBAAiB,EAAE,8BAA8B,CAAC,CAAA;IACjE,cAAc,CAAC,oBAAoB,EAAE,6BAA6B,CAAC,CAAA;IACnE,cAAc,CAAC,mBAAmB,EAAE,4BAA4B,CAAC,CAAA;IACjE,cAAc,CAAC,qBAAqB,EAAE,8BAA8B,CAAC,CAAA;IACrE,cAAc,CAAC,0BAA0B,EAAE,mCAAmC,CAAC,CAAA;IAC/E,cAAc,CAAC,sBAAO,CAAC,UAAU,EAAE,EAAE;QACnC,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,CAAC;KACV,CAAC,CAAA;IAEF,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;QAC9C,IAAI,EAAE,QAAQ;KACf,CAAC,CAAA;IAEF,QAAQ,CAAC,yBAAyB,EAAE;QAClC,cAAc,CAAC,yBAAyB,EAAE,kCAAkC,CAAC,CAAA;QAC7E,cAAc,CAAC,cAAc,EAAE,qBAAqB,CAAC,CAAA;QACrD,cAAc,CAAC,SAAS,EAAE,qBAAqB,CAAC,CAAA;QAChD,cAAc,CAAC,cAAc,EAAE,qBAAqB,CAAC,CAAA;IACvD,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,+BAA+B,EAAE;QACxC,cAAc,CAAC,+BAA+B,EAAE,wCAAwC,CAAC,CAAA;QACzF,cAAc,CAAC,mBAAmB,EAAE,2BAA2B,CAAC,CAAA;QAChE,cAAc,CAAC,mBAAmB,EAAE,2BAA2B,CAAC,CAAA;IAClE,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,cAAc,EAAE;QACvB,QAAQ,CAAC,mBAAmB,EAAE;YAC5B,cAAc,CAAC,gBAAgB,EAAE;gBAC/B,IAAI,EAAE,SAAS;gBACf,UAAU,EAAE,CAAC;aACd,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;QAEF,QAAQ,CAAC,8BAA8B,EAAE;YACvC,cAAc,CAAC,WAAW,EAAE;gBAC1B,IAAI,EAAE,SAAS;gBACf,UAAU,EAAE,CAAC;gBACb,MAAM,EAAE,CAAC,MAAM,CAAC;aACjB,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,gBAAgB,EAAE;QACzB,4CAA4C;QAC5C,MAAM,IAAI,GAAG,sBAAO,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAAA;QAC3D,cAAc,CAAC,IAAI,EAAE;YACnB,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,MAAM;SACb,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,cAAc,CAAC,sBAAO,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE;QAChC,IAAI,EAAE,OAAO;KACd,CAAC,CAAA;IAEF,QAAQ,CAAC,qBAAqB,EAAE;QAC9B,MAAM,MAAM,GAAG,sBAAO,CAAC,KAAK,CAAC;YAC3B;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,OAAO;aACf;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,MAAM;aACd;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,SAAS;aACjB;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,SAAS;aACjB;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,MAAM;aACd;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,KAAK;aACb;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,KAAK;aACb;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,OAAO;aACf;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,OAAO;aACf;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,MAAM;aACd;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,MAAM;aACd;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,SAAS;aACjB;YACD;gBACE,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,QAAQ;aAChB;SACF,CAAC,CAAA;QAEF,cAAc,CAAC,MAAM,EAAE;YACrB,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,OAAO;YACjB,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,SAAS;YAClB,MAAM,EAAE,SAAS;YACjB,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,KAAK;YACf,gBAAgB,EAAE,KAAK;YACvB,aAAa,EAAE,OAAO;YACtB,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,SAAS;SACnB,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,cAAc,CAAC,mBAAmB,EAAE;QAClC,IAAI,EAAE,eAAe;KACtB,CAAC,CAAA;IAEF,cAAc,CAAC,kBAAkB,EAAE;QACjC,IAAI,EAAE,cAAc;KACrB,CAAC,CAAA;IAEF,cAAc,CAAC,kBAAkB,EAAE;QACjC,IAAI,EAAE,cAAc;KACrB,CAAC,CAAA;IAEF,cAAc,CAAC,sBAAO,CAAC,aAAa,EAAE,EAAE;QACtC,IAAI,EAAE,eAAe;KACtB,CAAC,CAAA;IAEF,QAAQ,CAAC,iCAAiC,EAAE;QAC1C,cAAc,CAAC,qBAAqB,EAAE;YACpC,IAAI,EAAE,iBAAiB;SACxB,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,kCAAkC,EAAE;QAC3C,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,EAAE;YAC1D,IAAI,EAAE,kBAAkB;YACxB,MAAM,EAAE,CAAC;SACV,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;QACpB,cAAc,CAAC,sBAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;YAChC,IAAI,EAAE,gBAAgB;YACtB,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,EAAE;SAChB,CAAC,CAAA;QAEF,cAAc,CAAC,sBAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;YAChC,IAAI,EAAE,gBAAgB;YACtB,MAAM,EAAE,EAAE;YACV,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;SACpB,CAAC,CAAA;QAEF,cAAc,CAAC,sBAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YACjC,IAAI,EAAE,iBAAiB;YACvB,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,EAAE;SAChB,CAAC,CAAA;QAEF,cAAc,CAAC,sBAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YACjC,IAAI,EAAE,iBAAiB;YACvB,MAAM,EAAE,EAAE;YACV,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;SACvB,CAAC,CAAA;QAEF,cAAc,CAAC,sBAAO,CAAC,QAAQ,EAAE,EAAE;YACjC,IAAI,EAAE,UAAU;YAChB,MAAM,EAAE,CAAC;SACV,CAAC,CAAA;QAEF,cAAc,CAAC,sBAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE;YACvD,IAAI,EAAE,UAAU;YAChB,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;SAC9B,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,uEAAuE;IACvE,uEAAuE;IACvE,yBAAyB;IACzB,QAAQ,CAAC,sCAAsC,EAAE;QAC/C,MAAM,UAAU,GAAG,sBAAO,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;QAExE,EAAE,CAAC,kCAAkC,EAAE;;gBACrC,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,CAAC,UAAU,CAAC,CAAC,CAAA;gBACjD,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAQ,CAAA;gBAClC,gBAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;gBACtC,gBAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;gBACrC,gBAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;gBACvC,gBAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;gBAC1C,gBAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;gBACrC,gBAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;YACtC,CAAC;SAAA,CAAC,CAAA;QAEF,MAAM,+BAA+B,GAAG,UAAgB,KAAa;;gBACnE,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,GAAG,KAAK,CAAC,CAAA;gBAC3D,MAAM,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,CAAA;gBACzE,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;gBAClC,UAAU,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;gBACpD,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC,CAAA;gBAChE,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAQ,CAAA;gBAClC,gBAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;gBACtC,gBAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;gBACrC,gBAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;gBACvC,gBAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;gBAC1C,gBAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;gBACrC,gBAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;YACtC,CAAC;SAAA,CAAA;QAED,EAAE,CAAC,iCAAiC,EAAE;YACpC,OAAO,+BAA+B,CAAC,CAAC,CAAC,CAAA;QAC3C,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,0BAA0B,EAAE;YAC7B,OAAO,+BAA+B,CAAC,CAAC,CAAC,CAAA;QAC3C,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,gCAAgC,EAAE;YACnC,OAAO,OAAO,CAAC,GAAG,CAAC;gBACjB,+BAA+B,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;gBACtD,+BAA+B,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;gBACtD,+BAA+B,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;aACvD,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,wCAAwC,EAAE;QACjD,MAAM,aAAa,GAAG,sBAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;QAC5C,MAAM,mBAAmB,GAAG,sBAAO,CAAC,aAAa,EAAE,CAAA;QACnD,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAA;QAClF,aAAa,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;QACpC,mBAAmB,CAAC,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;QAE7D,MAAM,cAAc,GAAG,UAAU,QAAe;YAC9C,gBAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;YACtC,gBAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;gBAC5B,IAAI,EAAE,SAAS;gBACf,UAAU,EAAE,CAAC;gBACb,MAAM,EAAE,EAAE;gBACV,MAAM,EAAE,CAAC,GAAG,CAAC;aACd,CAAC,CAAA;YACF,gBAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;YACxC,gBAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;gBAC5B,IAAI,EAAE,eAAe;gBACrB,MAAM,EAAE,CAAC;gBACT,MAAM,EAAE,GAAG;aACZ,CAAC,CAAA;QACJ,CAAC,CAAA;QACD,eAAe;QACf,EAAE,CAAC,iDAAiD,EAAE;;gBACpD,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,CAAC,UAAU,CAAC,CAAC,CAAA;gBACjD,cAAc,CAAC,QAAQ,CAAC,CAAA;YAC1B,CAAC;SAAA,CAAC,CAAA;QAEF,MAAM,yBAAyB,GAAG,UAAgB,KAAa;;gBAC7D,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,GAAG,KAAK,CAAC,CAAA;gBAC3D,MAAM,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,CAAA;gBACzE,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;gBAClC,UAAU,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;gBACpD,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC,CAAA;gBAChE,cAAc,CAAC,QAAQ,CAAC,CAAA;YAC1B,CAAC;SAAA,CAAA;QAED,QAAQ,CAAC,6CAA6C,EAAE;YACtD,EAAE,CAAC,eAAe,EAAE;gBAClB,OAAO,yBAAyB,CAAC,EAAE,CAAC,CAAA;YACtC,CAAC,CAAC,CAAA;YACF,EAAE,CAAC,cAAc,EAAE;gBACjB,OAAO,OAAO,CAAC,GAAG,CAAC;oBACjB,yBAAyB,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;oBAChD,yBAAyB,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;oBAChD,yBAAyB,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;iBACjD,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;YAEF,EAAE,CAAC,YAAY,EAAE;gBACf,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,EAAE,yBAAyB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;YAClF,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,8CAA8C,EAAE;QACjD,MAAM,MAAM,GAAG,IAAI,eAAM,EAAE,CAAA;QAC3B,MAAM,CAAC,KAAK,CAAC,WAAW,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAA;QACnC,gBAAM,CAAC,WAAW,CAAE,MAAc,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAA;IACjE,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"} \ No newline at end of file diff --git a/node_modules/pg-protocol/dist/index.d.ts b/node_modules/pg-protocol/dist/index.d.ts deleted file mode 100644 index 3961def..0000000 --- a/node_modules/pg-protocol/dist/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/// -import { DatabaseError } from './messages'; -import { serialize } from './serializer'; -import { MessageCallback } from './parser'; -export declare function parse(stream: NodeJS.ReadableStream, callback: MessageCallback): Promise; -export { serialize, DatabaseError }; diff --git a/node_modules/pg-protocol/dist/index.js b/node_modules/pg-protocol/dist/index.js deleted file mode 100644 index 7eca3bf..0000000 --- a/node_modules/pg-protocol/dist/index.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DatabaseError = exports.serialize = exports.parse = void 0; -const messages_1 = require("./messages"); -Object.defineProperty(exports, "DatabaseError", { enumerable: true, get: function () { return messages_1.DatabaseError; } }); -const serializer_1 = require("./serializer"); -Object.defineProperty(exports, "serialize", { enumerable: true, get: function () { return serializer_1.serialize; } }); -const parser_1 = require("./parser"); -function parse(stream, callback) { - const parser = new parser_1.Parser(); - stream.on('data', (buffer) => parser.parse(buffer, callback)); - return new Promise((resolve) => stream.on('end', () => resolve())); -} -exports.parse = parse; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/pg-protocol/dist/index.js.map b/node_modules/pg-protocol/dist/index.js.map deleted file mode 100644 index db9423f..0000000 --- a/node_modules/pg-protocol/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,yCAA0C;AAUtB,8FAVX,wBAAa,OAUW;AATjC,6CAAwC;AAS/B,0FATA,sBAAS,OASA;AARlB,qCAAkD;AAElD,SAAgB,KAAK,CAAC,MAA6B,EAAE,QAAyB;IAC5E,MAAM,MAAM,GAAG,IAAI,eAAM,EAAE,CAAA;IAC3B,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAA;IACrE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;AACpE,CAAC;AAJD,sBAIC"} \ No newline at end of file diff --git a/node_modules/pg-protocol/dist/messages.d.ts b/node_modules/pg-protocol/dist/messages.d.ts deleted file mode 100644 index f8f2e63..0000000 --- a/node_modules/pg-protocol/dist/messages.d.ts +++ /dev/null @@ -1,162 +0,0 @@ -/// -export declare type Mode = 'text' | 'binary'; -export declare type MessageName = 'parseComplete' | 'bindComplete' | 'closeComplete' | 'noData' | 'portalSuspended' | 'replicationStart' | 'emptyQuery' | 'copyDone' | 'copyData' | 'rowDescription' | 'parameterDescription' | 'parameterStatus' | 'backendKeyData' | 'notification' | 'readyForQuery' | 'commandComplete' | 'dataRow' | 'copyInResponse' | 'copyOutResponse' | 'authenticationOk' | 'authenticationMD5Password' | 'authenticationCleartextPassword' | 'authenticationSASL' | 'authenticationSASLContinue' | 'authenticationSASLFinal' | 'error' | 'notice'; -export interface BackendMessage { - name: MessageName; - length: number; -} -export declare const parseComplete: BackendMessage; -export declare const bindComplete: BackendMessage; -export declare const closeComplete: BackendMessage; -export declare const noData: BackendMessage; -export declare const portalSuspended: BackendMessage; -export declare const replicationStart: BackendMessage; -export declare const emptyQuery: BackendMessage; -export declare const copyDone: BackendMessage; -interface NoticeOrError { - message: string | undefined; - severity: string | undefined; - code: string | undefined; - detail: string | undefined; - hint: string | undefined; - position: string | undefined; - internalPosition: string | undefined; - internalQuery: string | undefined; - where: string | undefined; - schema: string | undefined; - table: string | undefined; - column: string | undefined; - dataType: string | undefined; - constraint: string | undefined; - file: string | undefined; - line: string | undefined; - routine: string | undefined; -} -export declare class DatabaseError extends Error implements NoticeOrError { - readonly length: number; - readonly name: MessageName; - severity: string | undefined; - code: string | undefined; - detail: string | undefined; - hint: string | undefined; - position: string | undefined; - internalPosition: string | undefined; - internalQuery: string | undefined; - where: string | undefined; - schema: string | undefined; - table: string | undefined; - column: string | undefined; - dataType: string | undefined; - constraint: string | undefined; - file: string | undefined; - line: string | undefined; - routine: string | undefined; - constructor(message: string, length: number, name: MessageName); -} -export declare class CopyDataMessage { - readonly length: number; - readonly chunk: Buffer; - readonly name = "copyData"; - constructor(length: number, chunk: Buffer); -} -export declare class CopyResponse { - readonly length: number; - readonly name: MessageName; - readonly binary: boolean; - readonly columnTypes: number[]; - constructor(length: number, name: MessageName, binary: boolean, columnCount: number); -} -export declare class Field { - readonly name: string; - readonly tableID: number; - readonly columnID: number; - readonly dataTypeID: number; - readonly dataTypeSize: number; - readonly dataTypeModifier: number; - readonly format: Mode; - constructor(name: string, tableID: number, columnID: number, dataTypeID: number, dataTypeSize: number, dataTypeModifier: number, format: Mode); -} -export declare class RowDescriptionMessage { - readonly length: number; - readonly fieldCount: number; - readonly name: MessageName; - readonly fields: Field[]; - constructor(length: number, fieldCount: number); -} -export declare class ParameterDescriptionMessage { - readonly length: number; - readonly parameterCount: number; - readonly name: MessageName; - readonly dataTypeIDs: number[]; - constructor(length: number, parameterCount: number); -} -export declare class ParameterStatusMessage { - readonly length: number; - readonly parameterName: string; - readonly parameterValue: string; - readonly name: MessageName; - constructor(length: number, parameterName: string, parameterValue: string); -} -export declare class AuthenticationMD5Password implements BackendMessage { - readonly length: number; - readonly salt: Buffer; - readonly name: MessageName; - constructor(length: number, salt: Buffer); -} -export declare class BackendKeyDataMessage { - readonly length: number; - readonly processID: number; - readonly secretKey: number; - readonly name: MessageName; - constructor(length: number, processID: number, secretKey: number); -} -export declare class NotificationResponseMessage { - readonly length: number; - readonly processId: number; - readonly channel: string; - readonly payload: string; - readonly name: MessageName; - constructor(length: number, processId: number, channel: string, payload: string); -} -export declare class ReadyForQueryMessage { - readonly length: number; - readonly status: string; - readonly name: MessageName; - constructor(length: number, status: string); -} -export declare class CommandCompleteMessage { - readonly length: number; - readonly text: string; - readonly name: MessageName; - constructor(length: number, text: string); -} -export declare class DataRowMessage { - length: number; - fields: any[]; - readonly fieldCount: number; - readonly name: MessageName; - constructor(length: number, fields: any[]); -} -export declare class NoticeMessage implements BackendMessage, NoticeOrError { - readonly length: number; - readonly message: string | undefined; - constructor(length: number, message: string | undefined); - readonly name = "notice"; - severity: string | undefined; - code: string | undefined; - detail: string | undefined; - hint: string | undefined; - position: string | undefined; - internalPosition: string | undefined; - internalQuery: string | undefined; - where: string | undefined; - schema: string | undefined; - table: string | undefined; - column: string | undefined; - dataType: string | undefined; - constraint: string | undefined; - file: string | undefined; - line: string | undefined; - routine: string | undefined; -} -export {}; diff --git a/node_modules/pg-protocol/dist/messages.js b/node_modules/pg-protocol/dist/messages.js deleted file mode 100644 index b9f2c44..0000000 --- a/node_modules/pg-protocol/dist/messages.js +++ /dev/null @@ -1,160 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NoticeMessage = exports.DataRowMessage = exports.CommandCompleteMessage = exports.ReadyForQueryMessage = exports.NotificationResponseMessage = exports.BackendKeyDataMessage = exports.AuthenticationMD5Password = exports.ParameterStatusMessage = exports.ParameterDescriptionMessage = exports.RowDescriptionMessage = exports.Field = exports.CopyResponse = exports.CopyDataMessage = exports.DatabaseError = exports.copyDone = exports.emptyQuery = exports.replicationStart = exports.portalSuspended = exports.noData = exports.closeComplete = exports.bindComplete = exports.parseComplete = void 0; -exports.parseComplete = { - name: 'parseComplete', - length: 5, -}; -exports.bindComplete = { - name: 'bindComplete', - length: 5, -}; -exports.closeComplete = { - name: 'closeComplete', - length: 5, -}; -exports.noData = { - name: 'noData', - length: 5, -}; -exports.portalSuspended = { - name: 'portalSuspended', - length: 5, -}; -exports.replicationStart = { - name: 'replicationStart', - length: 4, -}; -exports.emptyQuery = { - name: 'emptyQuery', - length: 4, -}; -exports.copyDone = { - name: 'copyDone', - length: 4, -}; -class DatabaseError extends Error { - constructor(message, length, name) { - super(message); - this.length = length; - this.name = name; - } -} -exports.DatabaseError = DatabaseError; -class CopyDataMessage { - constructor(length, chunk) { - this.length = length; - this.chunk = chunk; - this.name = 'copyData'; - } -} -exports.CopyDataMessage = CopyDataMessage; -class CopyResponse { - constructor(length, name, binary, columnCount) { - this.length = length; - this.name = name; - this.binary = binary; - this.columnTypes = new Array(columnCount); - } -} -exports.CopyResponse = CopyResponse; -class Field { - constructor(name, tableID, columnID, dataTypeID, dataTypeSize, dataTypeModifier, format) { - this.name = name; - this.tableID = tableID; - this.columnID = columnID; - this.dataTypeID = dataTypeID; - this.dataTypeSize = dataTypeSize; - this.dataTypeModifier = dataTypeModifier; - this.format = format; - } -} -exports.Field = Field; -class RowDescriptionMessage { - constructor(length, fieldCount) { - this.length = length; - this.fieldCount = fieldCount; - this.name = 'rowDescription'; - this.fields = new Array(this.fieldCount); - } -} -exports.RowDescriptionMessage = RowDescriptionMessage; -class ParameterDescriptionMessage { - constructor(length, parameterCount) { - this.length = length; - this.parameterCount = parameterCount; - this.name = 'parameterDescription'; - this.dataTypeIDs = new Array(this.parameterCount); - } -} -exports.ParameterDescriptionMessage = ParameterDescriptionMessage; -class ParameterStatusMessage { - constructor(length, parameterName, parameterValue) { - this.length = length; - this.parameterName = parameterName; - this.parameterValue = parameterValue; - this.name = 'parameterStatus'; - } -} -exports.ParameterStatusMessage = ParameterStatusMessage; -class AuthenticationMD5Password { - constructor(length, salt) { - this.length = length; - this.salt = salt; - this.name = 'authenticationMD5Password'; - } -} -exports.AuthenticationMD5Password = AuthenticationMD5Password; -class BackendKeyDataMessage { - constructor(length, processID, secretKey) { - this.length = length; - this.processID = processID; - this.secretKey = secretKey; - this.name = 'backendKeyData'; - } -} -exports.BackendKeyDataMessage = BackendKeyDataMessage; -class NotificationResponseMessage { - constructor(length, processId, channel, payload) { - this.length = length; - this.processId = processId; - this.channel = channel; - this.payload = payload; - this.name = 'notification'; - } -} -exports.NotificationResponseMessage = NotificationResponseMessage; -class ReadyForQueryMessage { - constructor(length, status) { - this.length = length; - this.status = status; - this.name = 'readyForQuery'; - } -} -exports.ReadyForQueryMessage = ReadyForQueryMessage; -class CommandCompleteMessage { - constructor(length, text) { - this.length = length; - this.text = text; - this.name = 'commandComplete'; - } -} -exports.CommandCompleteMessage = CommandCompleteMessage; -class DataRowMessage { - constructor(length, fields) { - this.length = length; - this.fields = fields; - this.name = 'dataRow'; - this.fieldCount = fields.length; - } -} -exports.DataRowMessage = DataRowMessage; -class NoticeMessage { - constructor(length, message) { - this.length = length; - this.message = message; - this.name = 'notice'; - } -} -exports.NoticeMessage = NoticeMessage; -//# sourceMappingURL=messages.js.map \ No newline at end of file diff --git a/node_modules/pg-protocol/dist/messages.js.map b/node_modules/pg-protocol/dist/messages.js.map deleted file mode 100644 index 9cf2581..0000000 --- a/node_modules/pg-protocol/dist/messages.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"messages.js","sourceRoot":"","sources":["../src/messages.ts"],"names":[],"mappings":";;;AAoCa,QAAA,aAAa,GAAmB;IAC3C,IAAI,EAAE,eAAe;IACrB,MAAM,EAAE,CAAC;CACV,CAAA;AAEY,QAAA,YAAY,GAAmB;IAC1C,IAAI,EAAE,cAAc;IACpB,MAAM,EAAE,CAAC;CACV,CAAA;AAEY,QAAA,aAAa,GAAmB;IAC3C,IAAI,EAAE,eAAe;IACrB,MAAM,EAAE,CAAC;CACV,CAAA;AAEY,QAAA,MAAM,GAAmB;IACpC,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE,CAAC;CACV,CAAA;AAEY,QAAA,eAAe,GAAmB;IAC7C,IAAI,EAAE,iBAAiB;IACvB,MAAM,EAAE,CAAC;CACV,CAAA;AAEY,QAAA,gBAAgB,GAAmB;IAC9C,IAAI,EAAE,kBAAkB;IACxB,MAAM,EAAE,CAAC;CACV,CAAA;AAEY,QAAA,UAAU,GAAmB;IACxC,IAAI,EAAE,YAAY;IAClB,MAAM,EAAE,CAAC;CACV,CAAA;AAEY,QAAA,QAAQ,GAAmB;IACtC,IAAI,EAAE,UAAU;IAChB,MAAM,EAAE,CAAC;CACV,CAAA;AAsBD,MAAa,aAAc,SAAQ,KAAK;IAiBtC,YACE,OAAe,EACC,MAAc,EACd,IAAiB;QAEjC,KAAK,CAAC,OAAO,CAAC,CAAA;QAHE,WAAM,GAAN,MAAM,CAAQ;QACd,SAAI,GAAJ,IAAI,CAAa;IAGnC,CAAC;CACF;AAxBD,sCAwBC;AAED,MAAa,eAAe;IAE1B,YACkB,MAAc,EACd,KAAa;QADb,WAAM,GAAN,MAAM,CAAQ;QACd,UAAK,GAAL,KAAK,CAAQ;QAHf,SAAI,GAAG,UAAU,CAAA;IAI9B,CAAC;CACL;AAND,0CAMC;AAED,MAAa,YAAY;IAEvB,YACkB,MAAc,EACd,IAAiB,EACjB,MAAe,EAC/B,WAAmB;QAHH,WAAM,GAAN,MAAM,CAAQ;QACd,SAAI,GAAJ,IAAI,CAAa;QACjB,WAAM,GAAN,MAAM,CAAS;QAG/B,IAAI,CAAC,WAAW,GAAG,IAAI,KAAK,CAAC,WAAW,CAAC,CAAA;IAC3C,CAAC;CACF;AAVD,oCAUC;AAED,MAAa,KAAK;IAChB,YACkB,IAAY,EACZ,OAAe,EACf,QAAgB,EAChB,UAAkB,EAClB,YAAoB,EACpB,gBAAwB,EACxB,MAAY;QANZ,SAAI,GAAJ,IAAI,CAAQ;QACZ,YAAO,GAAP,OAAO,CAAQ;QACf,aAAQ,GAAR,QAAQ,CAAQ;QAChB,eAAU,GAAV,UAAU,CAAQ;QAClB,iBAAY,GAAZ,YAAY,CAAQ;QACpB,qBAAgB,GAAhB,gBAAgB,CAAQ;QACxB,WAAM,GAAN,MAAM,CAAM;IAC3B,CAAC;CACL;AAVD,sBAUC;AAED,MAAa,qBAAqB;IAGhC,YACkB,MAAc,EACd,UAAkB;QADlB,WAAM,GAAN,MAAM,CAAQ;QACd,eAAU,GAAV,UAAU,CAAQ;QAJpB,SAAI,GAAgB,gBAAgB,CAAA;QAMlD,IAAI,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;IAC1C,CAAC;CACF;AATD,sDASC;AAED,MAAa,2BAA2B;IAGtC,YACkB,MAAc,EACd,cAAsB;QADtB,WAAM,GAAN,MAAM,CAAQ;QACd,mBAAc,GAAd,cAAc,CAAQ;QAJxB,SAAI,GAAgB,sBAAsB,CAAA;QAMxD,IAAI,CAAC,WAAW,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;IACnD,CAAC;CACF;AATD,kEASC;AAED,MAAa,sBAAsB;IAEjC,YACkB,MAAc,EACd,aAAqB,EACrB,cAAsB;QAFtB,WAAM,GAAN,MAAM,CAAQ;QACd,kBAAa,GAAb,aAAa,CAAQ;QACrB,mBAAc,GAAd,cAAc,CAAQ;QAJxB,SAAI,GAAgB,iBAAiB,CAAA;IAKlD,CAAC;CACL;AAPD,wDAOC;AAED,MAAa,yBAAyB;IAEpC,YACkB,MAAc,EACd,IAAY;QADZ,WAAM,GAAN,MAAM,CAAQ;QACd,SAAI,GAAJ,IAAI,CAAQ;QAHd,SAAI,GAAgB,2BAA2B,CAAA;IAI5D,CAAC;CACL;AAND,8DAMC;AAED,MAAa,qBAAqB;IAEhC,YACkB,MAAc,EACd,SAAiB,EACjB,SAAiB;QAFjB,WAAM,GAAN,MAAM,CAAQ;QACd,cAAS,GAAT,SAAS,CAAQ;QACjB,cAAS,GAAT,SAAS,CAAQ;QAJnB,SAAI,GAAgB,gBAAgB,CAAA;IAKjD,CAAC;CACL;AAPD,sDAOC;AAED,MAAa,2BAA2B;IAEtC,YACkB,MAAc,EACd,SAAiB,EACjB,OAAe,EACf,OAAe;QAHf,WAAM,GAAN,MAAM,CAAQ;QACd,cAAS,GAAT,SAAS,CAAQ;QACjB,YAAO,GAAP,OAAO,CAAQ;QACf,YAAO,GAAP,OAAO,CAAQ;QALjB,SAAI,GAAgB,cAAc,CAAA;IAM/C,CAAC;CACL;AARD,kEAQC;AAED,MAAa,oBAAoB;IAE/B,YACkB,MAAc,EACd,MAAc;QADd,WAAM,GAAN,MAAM,CAAQ;QACd,WAAM,GAAN,MAAM,CAAQ;QAHhB,SAAI,GAAgB,eAAe,CAAA;IAIhD,CAAC;CACL;AAND,oDAMC;AAED,MAAa,sBAAsB;IAEjC,YACkB,MAAc,EACd,IAAY;QADZ,WAAM,GAAN,MAAM,CAAQ;QACd,SAAI,GAAJ,IAAI,CAAQ;QAHd,SAAI,GAAgB,iBAAiB,CAAA;IAIlD,CAAC;CACL;AAND,wDAMC;AAED,MAAa,cAAc;IAGzB,YACS,MAAc,EACd,MAAa;QADb,WAAM,GAAN,MAAM,CAAQ;QACd,WAAM,GAAN,MAAM,CAAO;QAHN,SAAI,GAAgB,SAAS,CAAA;QAK3C,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,CAAA;IACjC,CAAC;CACF;AATD,wCASC;AAED,MAAa,aAAa;IACxB,YACkB,MAAc,EACd,OAA2B;QAD3B,WAAM,GAAN,MAAM,CAAQ;QACd,YAAO,GAAP,OAAO,CAAoB;QAE7B,SAAI,GAAG,QAAQ,CAAA;IAD5B,CAAC;CAkBL;AAtBD,sCAsBC"} \ No newline at end of file diff --git a/node_modules/pg-protocol/dist/outbound-serializer.test.d.ts b/node_modules/pg-protocol/dist/outbound-serializer.test.d.ts deleted file mode 100644 index cb0ff5c..0000000 --- a/node_modules/pg-protocol/dist/outbound-serializer.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/node_modules/pg-protocol/dist/outbound-serializer.test.js b/node_modules/pg-protocol/dist/outbound-serializer.test.js deleted file mode 100644 index 9644e1e..0000000 --- a/node_modules/pg-protocol/dist/outbound-serializer.test.js +++ /dev/null @@ -1,252 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const assert_1 = __importDefault(require("assert")); -const serializer_1 = require("./serializer"); -const buffer_list_1 = __importDefault(require("./testing/buffer-list")); -describe('serializer', () => { - it('builds startup message', function () { - const actual = serializer_1.serialize.startup({ - user: 'brian', - database: 'bang', - }); - assert_1.default.deepEqual(actual, new buffer_list_1.default() - .addInt16(3) - .addInt16(0) - .addCString('user') - .addCString('brian') - .addCString('database') - .addCString('bang') - .addCString('client_encoding') - .addCString('UTF8') - .addCString('') - .join(true)); - }); - it('builds password message', function () { - const actual = serializer_1.serialize.password('!'); - assert_1.default.deepEqual(actual, new buffer_list_1.default().addCString('!').join(true, 'p')); - }); - it('builds request ssl message', function () { - const actual = serializer_1.serialize.requestSsl(); - const expected = new buffer_list_1.default().addInt32(80877103).join(true); - assert_1.default.deepEqual(actual, expected); - }); - it('builds SASLInitialResponseMessage message', function () { - const actual = serializer_1.serialize.sendSASLInitialResponseMessage('mech', 'data'); - assert_1.default.deepEqual(actual, new buffer_list_1.default().addCString('mech').addInt32(4).addString('data').join(true, 'p')); - }); - it('builds SCRAMClientFinalMessage message', function () { - const actual = serializer_1.serialize.sendSCRAMClientFinalMessage('data'); - assert_1.default.deepEqual(actual, new buffer_list_1.default().addString('data').join(true, 'p')); - }); - it('builds query message', function () { - const txt = 'select * from boom'; - const actual = serializer_1.serialize.query(txt); - assert_1.default.deepEqual(actual, new buffer_list_1.default().addCString(txt).join(true, 'Q')); - }); - describe('parse message', () => { - it('builds parse message', function () { - const actual = serializer_1.serialize.parse({ text: '!' }); - const expected = new buffer_list_1.default().addCString('').addCString('!').addInt16(0).join(true, 'P'); - assert_1.default.deepEqual(actual, expected); - }); - it('builds parse message with named query', function () { - const actual = serializer_1.serialize.parse({ - name: 'boom', - text: 'select * from boom', - types: [], - }); - const expected = new buffer_list_1.default().addCString('boom').addCString('select * from boom').addInt16(0).join(true, 'P'); - assert_1.default.deepEqual(actual, expected); - }); - it('with multiple parameters', function () { - const actual = serializer_1.serialize.parse({ - name: 'force', - text: 'select * from bang where name = $1', - types: [1, 2, 3, 4], - }); - const expected = new buffer_list_1.default() - .addCString('force') - .addCString('select * from bang where name = $1') - .addInt16(4) - .addInt32(1) - .addInt32(2) - .addInt32(3) - .addInt32(4) - .join(true, 'P'); - assert_1.default.deepEqual(actual, expected); - }); - }); - describe('bind messages', function () { - it('with no values', function () { - const actual = serializer_1.serialize.bind(); - const expectedBuffer = new buffer_list_1.default() - .addCString('') - .addCString('') - .addInt16(0) - .addInt16(0) - .addInt16(1) - .addInt16(0) - .join(true, 'B'); - assert_1.default.deepEqual(actual, expectedBuffer); - }); - it('with named statement, portal, and values', function () { - const actual = serializer_1.serialize.bind({ - portal: 'bang', - statement: 'woo', - values: ['1', 'hi', null, 'zing'], - }); - const expectedBuffer = new buffer_list_1.default() - .addCString('bang') // portal name - .addCString('woo') // statement name - .addInt16(4) - .addInt16(0) - .addInt16(0) - .addInt16(0) - .addInt16(0) - .addInt16(4) - .addInt32(1) - .add(Buffer.from('1')) - .addInt32(2) - .add(Buffer.from('hi')) - .addInt32(-1) - .addInt32(4) - .add(Buffer.from('zing')) - .addInt16(1) - .addInt16(0) - .join(true, 'B'); - assert_1.default.deepEqual(actual, expectedBuffer); - }); - }); - it('with custom valueMapper', function () { - const actual = serializer_1.serialize.bind({ - portal: 'bang', - statement: 'woo', - values: ['1', 'hi', null, 'zing'], - valueMapper: () => null, - }); - const expectedBuffer = new buffer_list_1.default() - .addCString('bang') // portal name - .addCString('woo') // statement name - .addInt16(4) - .addInt16(0) - .addInt16(0) - .addInt16(0) - .addInt16(0) - .addInt16(4) - .addInt32(-1) - .addInt32(-1) - .addInt32(-1) - .addInt32(-1) - .addInt16(1) - .addInt16(0) - .join(true, 'B'); - assert_1.default.deepEqual(actual, expectedBuffer); - }); - it('with named statement, portal, and buffer value', function () { - const actual = serializer_1.serialize.bind({ - portal: 'bang', - statement: 'woo', - values: ['1', 'hi', null, Buffer.from('zing', 'utf8')], - }); - const expectedBuffer = new buffer_list_1.default() - .addCString('bang') // portal name - .addCString('woo') // statement name - .addInt16(4) // value count - .addInt16(0) // string - .addInt16(0) // string - .addInt16(0) // string - .addInt16(1) // binary - .addInt16(4) - .addInt32(1) - .add(Buffer.from('1')) - .addInt32(2) - .add(Buffer.from('hi')) - .addInt32(-1) - .addInt32(4) - .add(Buffer.from('zing', 'utf-8')) - .addInt16(1) - .addInt16(0) - .join(true, 'B'); - assert_1.default.deepEqual(actual, expectedBuffer); - }); - describe('builds execute message', function () { - it('for unamed portal with no row limit', function () { - const actual = serializer_1.serialize.execute(); - const expectedBuffer = new buffer_list_1.default().addCString('').addInt32(0).join(true, 'E'); - assert_1.default.deepEqual(actual, expectedBuffer); - }); - it('for named portal with row limit', function () { - const actual = serializer_1.serialize.execute({ - portal: 'my favorite portal', - rows: 100, - }); - const expectedBuffer = new buffer_list_1.default().addCString('my favorite portal').addInt32(100).join(true, 'E'); - assert_1.default.deepEqual(actual, expectedBuffer); - }); - }); - it('builds flush command', function () { - const actual = serializer_1.serialize.flush(); - const expected = new buffer_list_1.default().join(true, 'H'); - assert_1.default.deepEqual(actual, expected); - }); - it('builds sync command', function () { - const actual = serializer_1.serialize.sync(); - const expected = new buffer_list_1.default().join(true, 'S'); - assert_1.default.deepEqual(actual, expected); - }); - it('builds end command', function () { - const actual = serializer_1.serialize.end(); - const expected = Buffer.from([0x58, 0, 0, 0, 4]); - assert_1.default.deepEqual(actual, expected); - }); - describe('builds describe command', function () { - it('describe statement', function () { - const actual = serializer_1.serialize.describe({ type: 'S', name: 'bang' }); - const expected = new buffer_list_1.default().addChar('S').addCString('bang').join(true, 'D'); - assert_1.default.deepEqual(actual, expected); - }); - it('describe unnamed portal', function () { - const actual = serializer_1.serialize.describe({ type: 'P' }); - const expected = new buffer_list_1.default().addChar('P').addCString('').join(true, 'D'); - assert_1.default.deepEqual(actual, expected); - }); - }); - describe('builds close command', function () { - it('describe statement', function () { - const actual = serializer_1.serialize.close({ type: 'S', name: 'bang' }); - const expected = new buffer_list_1.default().addChar('S').addCString('bang').join(true, 'C'); - assert_1.default.deepEqual(actual, expected); - }); - it('describe unnamed portal', function () { - const actual = serializer_1.serialize.close({ type: 'P' }); - const expected = new buffer_list_1.default().addChar('P').addCString('').join(true, 'C'); - assert_1.default.deepEqual(actual, expected); - }); - }); - describe('copy messages', function () { - it('builds copyFromChunk', () => { - const actual = serializer_1.serialize.copyData(Buffer.from([1, 2, 3])); - const expected = new buffer_list_1.default().add(Buffer.from([1, 2, 3])).join(true, 'd'); - assert_1.default.deepEqual(actual, expected); - }); - it('builds copy fail', () => { - const actual = serializer_1.serialize.copyFail('err!'); - const expected = new buffer_list_1.default().addCString('err!').join(true, 'f'); - assert_1.default.deepEqual(actual, expected); - }); - it('builds copy done', () => { - const actual = serializer_1.serialize.copyDone(); - const expected = new buffer_list_1.default().join(true, 'c'); - assert_1.default.deepEqual(actual, expected); - }); - }); - it('builds cancel message', () => { - const actual = serializer_1.serialize.cancel(3, 4); - const expected = new buffer_list_1.default().addInt16(1234).addInt16(5678).addInt32(3).addInt32(4).join(true); - assert_1.default.deepEqual(actual, expected); - }); -}); -//# sourceMappingURL=outbound-serializer.test.js.map \ No newline at end of file diff --git a/node_modules/pg-protocol/dist/outbound-serializer.test.js.map b/node_modules/pg-protocol/dist/outbound-serializer.test.js.map deleted file mode 100644 index 0a3cdce..0000000 --- a/node_modules/pg-protocol/dist/outbound-serializer.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"outbound-serializer.test.js","sourceRoot":"","sources":["../src/outbound-serializer.test.ts"],"names":[],"mappings":";;;;;AAAA,oDAA2B;AAC3B,6CAAwC;AACxC,wEAA8C;AAE9C,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,EAAE,CAAC,wBAAwB,EAAE;QAC3B,MAAM,MAAM,GAAG,sBAAS,CAAC,OAAO,CAAC;YAC/B,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,MAAM;SACjB,CAAC,CAAA;QACF,gBAAM,CAAC,SAAS,CACd,MAAM,EACN,IAAI,qBAAU,EAAE;aACb,QAAQ,CAAC,CAAC,CAAC;aACX,QAAQ,CAAC,CAAC,CAAC;aACX,UAAU,CAAC,MAAM,CAAC;aAClB,UAAU,CAAC,OAAO,CAAC;aACnB,UAAU,CAAC,UAAU,CAAC;aACtB,UAAU,CAAC,MAAM,CAAC;aAClB,UAAU,CAAC,iBAAiB,CAAC;aAC7B,UAAU,CAAC,MAAM,CAAC;aAClB,UAAU,CAAC,EAAE,CAAC;aACd,IAAI,CAAC,IAAI,CAAC,CACd,CAAA;IACH,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,yBAAyB,EAAE;QAC5B,MAAM,MAAM,GAAG,sBAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;QACtC,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,qBAAU,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;IAC5E,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,4BAA4B,EAAE;QAC/B,MAAM,MAAM,GAAG,sBAAS,CAAC,UAAU,EAAE,CAAA;QACrC,MAAM,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC/D,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IACpC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,2CAA2C,EAAE;QAC9C,MAAM,MAAM,GAAG,sBAAS,CAAC,8BAA8B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QACvE,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,qBAAU,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;IAC7G,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,wCAAwC,EAAE;QAC3C,MAAM,MAAM,GAAG,sBAAS,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAA;QAC5D,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,qBAAU,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;IAC9E,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,sBAAsB,EAAE;QACzB,MAAM,GAAG,GAAG,oBAAoB,CAAA;QAChC,MAAM,MAAM,GAAG,sBAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QACnC,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,qBAAU,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;IAC5E,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;QAC7B,EAAE,CAAC,sBAAsB,EAAE;YACzB,MAAM,MAAM,GAAG,sBAAS,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAA;YAC7C,MAAM,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YAC5F,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,uCAAuC,EAAE;YAC1C,MAAM,MAAM,GAAG,sBAAS,CAAC,KAAK,CAAC;gBAC7B,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,oBAAoB;gBAC1B,KAAK,EAAE,EAAE;aACV,CAAC,CAAA;YACF,MAAM,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YACjH,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,0BAA0B,EAAE;YAC7B,MAAM,MAAM,GAAG,sBAAS,CAAC,KAAK,CAAC;gBAC7B,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,oCAAoC;gBAC1C,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;aACpB,CAAC,CAAA;YACF,MAAM,QAAQ,GAAG,IAAI,qBAAU,EAAE;iBAC9B,UAAU,CAAC,OAAO,CAAC;iBACnB,UAAU,CAAC,oCAAoC,CAAC;iBAChD,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YAClB,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,eAAe,EAAE;QACxB,EAAE,CAAC,gBAAgB,EAAE;YACnB,MAAM,MAAM,GAAG,sBAAS,CAAC,IAAI,EAAE,CAAA;YAE/B,MAAM,cAAc,GAAG,IAAI,qBAAU,EAAE;iBACpC,UAAU,CAAC,EAAE,CAAC;iBACd,UAAU,CAAC,EAAE,CAAC;iBACd,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YAClB,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;QAC1C,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,0CAA0C,EAAE;YAC7C,MAAM,MAAM,GAAG,sBAAS,CAAC,IAAI,CAAC;gBAC5B,MAAM,EAAE,MAAM;gBACd,SAAS,EAAE,KAAK;gBAChB,MAAM,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC;aAClC,CAAC,CAAA;YACF,MAAM,cAAc,GAAG,IAAI,qBAAU,EAAE;iBACpC,UAAU,CAAC,MAAM,CAAC,CAAC,cAAc;iBACjC,UAAU,CAAC,KAAK,CAAC,CAAC,iBAAiB;iBACnC,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;iBACrB,QAAQ,CAAC,CAAC,CAAC;iBACX,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;iBACtB,QAAQ,CAAC,CAAC,CAAC,CAAC;iBACZ,QAAQ,CAAC,CAAC,CAAC;iBACX,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;iBACxB,QAAQ,CAAC,CAAC,CAAC;iBACX,QAAQ,CAAC,CAAC,CAAC;iBACX,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YAClB,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;QAC1C,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,yBAAyB,EAAE;QAC5B,MAAM,MAAM,GAAG,sBAAS,CAAC,IAAI,CAAC;YAC5B,MAAM,EAAE,MAAM;YACd,SAAS,EAAE,KAAK;YAChB,MAAM,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC;YACjC,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI;SACxB,CAAC,CAAA;QACF,MAAM,cAAc,GAAG,IAAI,qBAAU,EAAE;aACpC,UAAU,CAAC,MAAM,CAAC,CAAC,cAAc;aACjC,UAAU,CAAC,KAAK,CAAC,CAAC,iBAAiB;aACnC,QAAQ,CAAC,CAAC,CAAC;aACX,QAAQ,CAAC,CAAC,CAAC;aACX,QAAQ,CAAC,CAAC,CAAC;aACX,QAAQ,CAAC,CAAC,CAAC;aACX,QAAQ,CAAC,CAAC,CAAC;aACX,QAAQ,CAAC,CAAC,CAAC;aACX,QAAQ,CAAC,CAAC,CAAC,CAAC;aACZ,QAAQ,CAAC,CAAC,CAAC,CAAC;aACZ,QAAQ,CAAC,CAAC,CAAC,CAAC;aACZ,QAAQ,CAAC,CAAC,CAAC,CAAC;aACZ,QAAQ,CAAC,CAAC,CAAC;aACX,QAAQ,CAAC,CAAC,CAAC;aACX,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;QAClB,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;IAC1C,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,gDAAgD,EAAE;QACnD,MAAM,MAAM,GAAG,sBAAS,CAAC,IAAI,CAAC;YAC5B,MAAM,EAAE,MAAM;YACd,SAAS,EAAE,KAAK;YAChB,MAAM,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;SACvD,CAAC,CAAA;QACF,MAAM,cAAc,GAAG,IAAI,qBAAU,EAAE;aACpC,UAAU,CAAC,MAAM,CAAC,CAAC,cAAc;aACjC,UAAU,CAAC,KAAK,CAAC,CAAC,iBAAiB;aACnC,QAAQ,CAAC,CAAC,CAAC,CAAC,cAAc;aAC1B,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS;aACrB,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS;aACrB,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS;aACrB,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS;aACrB,QAAQ,CAAC,CAAC,CAAC;aACX,QAAQ,CAAC,CAAC,CAAC;aACX,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aACrB,QAAQ,CAAC,CAAC,CAAC;aACX,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aACtB,QAAQ,CAAC,CAAC,CAAC,CAAC;aACZ,QAAQ,CAAC,CAAC,CAAC;aACX,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;aACjC,QAAQ,CAAC,CAAC,CAAC;aACX,QAAQ,CAAC,CAAC,CAAC;aACX,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;QAClB,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;IAC1C,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,wBAAwB,EAAE;QACjC,EAAE,CAAC,qCAAqC,EAAE;YACxC,MAAM,MAAM,GAAG,sBAAS,CAAC,OAAO,EAAE,CAAA;YAClC,MAAM,cAAc,GAAG,IAAI,qBAAU,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YAClF,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;QAC1C,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,iCAAiC,EAAE;YACpC,MAAM,MAAM,GAAG,sBAAS,CAAC,OAAO,CAAC;gBAC/B,MAAM,EAAE,oBAAoB;gBAC5B,IAAI,EAAE,GAAG;aACV,CAAC,CAAA;YACF,MAAM,cAAc,GAAG,IAAI,qBAAU,EAAE,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YACtG,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;QAC1C,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,sBAAsB,EAAE;QACzB,MAAM,MAAM,GAAG,sBAAS,CAAC,KAAK,EAAE,CAAA;QAChC,MAAM,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;QACjD,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IACpC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,qBAAqB,EAAE;QACxB,MAAM,MAAM,GAAG,sBAAS,CAAC,IAAI,EAAE,CAAA;QAC/B,MAAM,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;QACjD,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IACpC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,oBAAoB,EAAE;QACvB,MAAM,MAAM,GAAG,sBAAS,CAAC,GAAG,EAAE,CAAA;QAC9B,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;QAChD,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IACpC,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,yBAAyB,EAAE;QAClC,EAAE,CAAC,oBAAoB,EAAE;YACvB,MAAM,MAAM,GAAG,sBAAS,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;YAC9D,MAAM,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YACjF,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,yBAAyB,EAAE;YAC5B,MAAM,MAAM,GAAG,sBAAS,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAA;YAChD,MAAM,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YAC7E,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,sBAAsB,EAAE;QAC/B,EAAE,CAAC,oBAAoB,EAAE;YACvB,MAAM,MAAM,GAAG,sBAAS,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;YAC3D,MAAM,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YACjF,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,yBAAyB,EAAE;YAC5B,MAAM,MAAM,GAAG,sBAAS,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAA;YAC7C,MAAM,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YAC7E,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,eAAe,EAAE;QACxB,EAAE,CAAC,sBAAsB,EAAE,GAAG,EAAE;YAC9B,MAAM,MAAM,GAAG,sBAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;YACzD,MAAM,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YAC7E,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,kBAAkB,EAAE,GAAG,EAAE;YAC1B,MAAM,MAAM,GAAG,sBAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;YACzC,MAAM,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YACpE,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,kBAAkB,EAAE,GAAG,EAAE;YAC1B,MAAM,MAAM,GAAG,sBAAS,CAAC,QAAQ,EAAE,CAAA;YACnC,MAAM,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;YACjD,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,uBAAuB,EAAE,GAAG,EAAE;QAC/B,MAAM,MAAM,GAAG,sBAAS,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QACrC,MAAM,QAAQ,GAAG,IAAI,qBAAU,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAClG,gBAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IACpC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"} \ No newline at end of file diff --git a/node_modules/pg-protocol/dist/parser.d.ts b/node_modules/pg-protocol/dist/parser.d.ts deleted file mode 100644 index f1e37f9..0000000 --- a/node_modules/pg-protocol/dist/parser.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/// -/// -import { TransformOptions } from 'stream'; -import { Mode, BackendMessage } from './messages'; -export declare type Packet = { - code: number; - packet: Buffer; -}; -declare type StreamOptions = TransformOptions & { - mode: Mode; -}; -export declare type MessageCallback = (msg: BackendMessage) => void; -export declare class Parser { - private buffer; - private bufferLength; - private bufferOffset; - private reader; - private mode; - constructor(opts?: StreamOptions); - parse(buffer: Buffer, callback: MessageCallback): void; - private mergeBuffer; - private handlePacket; -} -export {}; diff --git a/node_modules/pg-protocol/dist/parser.js b/node_modules/pg-protocol/dist/parser.js deleted file mode 100644 index b05fe75..0000000 --- a/node_modules/pg-protocol/dist/parser.js +++ /dev/null @@ -1,324 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Parser = void 0; -const messages_1 = require("./messages"); -const buffer_reader_1 = require("./buffer-reader"); -// every message is prefixed with a single bye -const CODE_LENGTH = 1; -// every message has an int32 length which includes itself but does -// NOT include the code in the length -const LEN_LENGTH = 4; -const HEADER_LENGTH = CODE_LENGTH + LEN_LENGTH; -// A placeholder for a `BackendMessage`’s length value that will be set after construction. -const LATEINIT_LENGTH = -1; -const emptyBuffer = Buffer.allocUnsafe(0); -class Parser { - constructor(opts) { - this.buffer = emptyBuffer; - this.bufferLength = 0; - this.bufferOffset = 0; - this.reader = new buffer_reader_1.BufferReader(); - if ((opts === null || opts === void 0 ? void 0 : opts.mode) === 'binary') { - throw new Error('Binary mode not supported yet'); - } - this.mode = (opts === null || opts === void 0 ? void 0 : opts.mode) || 'text'; - } - parse(buffer, callback) { - this.mergeBuffer(buffer); - const bufferFullLength = this.bufferOffset + this.bufferLength; - let offset = this.bufferOffset; - while (offset + HEADER_LENGTH <= bufferFullLength) { - // code is 1 byte long - it identifies the message type - const code = this.buffer[offset]; - // length is 1 Uint32BE - it is the length of the message EXCLUDING the code - const length = this.buffer.readUInt32BE(offset + CODE_LENGTH); - const fullMessageLength = CODE_LENGTH + length; - if (fullMessageLength + offset <= bufferFullLength) { - const message = this.handlePacket(offset + HEADER_LENGTH, code, length, this.buffer); - callback(message); - offset += fullMessageLength; - } - else { - break; - } - } - if (offset === bufferFullLength) { - // No more use for the buffer - this.buffer = emptyBuffer; - this.bufferLength = 0; - this.bufferOffset = 0; - } - else { - // Adjust the cursors of remainingBuffer - this.bufferLength = bufferFullLength - offset; - this.bufferOffset = offset; - } - } - mergeBuffer(buffer) { - if (this.bufferLength > 0) { - const newLength = this.bufferLength + buffer.byteLength; - const newFullLength = newLength + this.bufferOffset; - if (newFullLength > this.buffer.byteLength) { - // We can't concat the new buffer with the remaining one - let newBuffer; - if (newLength <= this.buffer.byteLength && this.bufferOffset >= this.bufferLength) { - // We can move the relevant part to the beginning of the buffer instead of allocating a new buffer - newBuffer = this.buffer; - } - else { - // Allocate a new larger buffer - let newBufferLength = this.buffer.byteLength * 2; - while (newLength >= newBufferLength) { - newBufferLength *= 2; - } - newBuffer = Buffer.allocUnsafe(newBufferLength); - } - // Move the remaining buffer to the new one - this.buffer.copy(newBuffer, 0, this.bufferOffset, this.bufferOffset + this.bufferLength); - this.buffer = newBuffer; - this.bufferOffset = 0; - } - // Concat the new buffer with the remaining one - buffer.copy(this.buffer, this.bufferOffset + this.bufferLength); - this.bufferLength = newLength; - } - else { - this.buffer = buffer; - this.bufferOffset = 0; - this.bufferLength = buffer.byteLength; - } - } - handlePacket(offset, code, length, bytes) { - const { reader } = this; - // NOTE: This undesirably retains the buffer in `this.reader` if the `parse*Message` calls below throw. However, those should only throw in the case of a protocol error, which normally results in the reader being discarded. - reader.setBuffer(offset, bytes); - let message; - switch (code) { - case 50 /* MessageCodes.BindComplete */: - message = messages_1.bindComplete; - break; - case 49 /* MessageCodes.ParseComplete */: - message = messages_1.parseComplete; - break; - case 51 /* MessageCodes.CloseComplete */: - message = messages_1.closeComplete; - break; - case 110 /* MessageCodes.NoData */: - message = messages_1.noData; - break; - case 115 /* MessageCodes.PortalSuspended */: - message = messages_1.portalSuspended; - break; - case 99 /* MessageCodes.CopyDone */: - message = messages_1.copyDone; - break; - case 87 /* MessageCodes.ReplicationStart */: - message = messages_1.replicationStart; - break; - case 73 /* MessageCodes.EmptyQuery */: - message = messages_1.emptyQuery; - break; - case 68 /* MessageCodes.DataRow */: - message = parseDataRowMessage(reader); - break; - case 67 /* MessageCodes.CommandComplete */: - message = parseCommandCompleteMessage(reader); - break; - case 90 /* MessageCodes.ReadyForQuery */: - message = parseReadyForQueryMessage(reader); - break; - case 65 /* MessageCodes.NotificationResponse */: - message = parseNotificationMessage(reader); - break; - case 82 /* MessageCodes.AuthenticationResponse */: - message = parseAuthenticationResponse(reader, length); - break; - case 83 /* MessageCodes.ParameterStatus */: - message = parseParameterStatusMessage(reader); - break; - case 75 /* MessageCodes.BackendKeyData */: - message = parseBackendKeyData(reader); - break; - case 69 /* MessageCodes.ErrorMessage */: - message = parseErrorMessage(reader, 'error'); - break; - case 78 /* MessageCodes.NoticeMessage */: - message = parseErrorMessage(reader, 'notice'); - break; - case 84 /* MessageCodes.RowDescriptionMessage */: - message = parseRowDescriptionMessage(reader); - break; - case 116 /* MessageCodes.ParameterDescriptionMessage */: - message = parseParameterDescriptionMessage(reader); - break; - case 71 /* MessageCodes.CopyIn */: - message = parseCopyInMessage(reader); - break; - case 72 /* MessageCodes.CopyOut */: - message = parseCopyOutMessage(reader); - break; - case 100 /* MessageCodes.CopyData */: - message = parseCopyData(reader, length); - break; - default: - return new messages_1.DatabaseError('received invalid response: ' + code.toString(16), length, 'error'); - } - reader.setBuffer(0, emptyBuffer); - message.length = length; - return message; - } -} -exports.Parser = Parser; -const parseReadyForQueryMessage = (reader) => { - const status = reader.string(1); - return new messages_1.ReadyForQueryMessage(LATEINIT_LENGTH, status); -}; -const parseCommandCompleteMessage = (reader) => { - const text = reader.cstring(); - return new messages_1.CommandCompleteMessage(LATEINIT_LENGTH, text); -}; -const parseCopyData = (reader, length) => { - const chunk = reader.bytes(length - 4); - return new messages_1.CopyDataMessage(LATEINIT_LENGTH, chunk); -}; -const parseCopyInMessage = (reader) => parseCopyMessage(reader, 'copyInResponse'); -const parseCopyOutMessage = (reader) => parseCopyMessage(reader, 'copyOutResponse'); -const parseCopyMessage = (reader, messageName) => { - const isBinary = reader.byte() !== 0; - const columnCount = reader.int16(); - const message = new messages_1.CopyResponse(LATEINIT_LENGTH, messageName, isBinary, columnCount); - for (let i = 0; i < columnCount; i++) { - message.columnTypes[i] = reader.int16(); - } - return message; -}; -const parseNotificationMessage = (reader) => { - const processId = reader.int32(); - const channel = reader.cstring(); - const payload = reader.cstring(); - return new messages_1.NotificationResponseMessage(LATEINIT_LENGTH, processId, channel, payload); -}; -const parseRowDescriptionMessage = (reader) => { - const fieldCount = reader.int16(); - const message = new messages_1.RowDescriptionMessage(LATEINIT_LENGTH, fieldCount); - for (let i = 0; i < fieldCount; i++) { - message.fields[i] = parseField(reader); - } - return message; -}; -const parseField = (reader) => { - const name = reader.cstring(); - const tableID = reader.uint32(); - const columnID = reader.int16(); - const dataTypeID = reader.uint32(); - const dataTypeSize = reader.int16(); - const dataTypeModifier = reader.int32(); - const mode = reader.int16() === 0 ? 'text' : 'binary'; - return new messages_1.Field(name, tableID, columnID, dataTypeID, dataTypeSize, dataTypeModifier, mode); -}; -const parseParameterDescriptionMessage = (reader) => { - const parameterCount = reader.int16(); - const message = new messages_1.ParameterDescriptionMessage(LATEINIT_LENGTH, parameterCount); - for (let i = 0; i < parameterCount; i++) { - message.dataTypeIDs[i] = reader.int32(); - } - return message; -}; -const parseDataRowMessage = (reader) => { - const fieldCount = reader.int16(); - const fields = new Array(fieldCount); - for (let i = 0; i < fieldCount; i++) { - const len = reader.int32(); - // a -1 for length means the value of the field is null - fields[i] = len === -1 ? null : reader.string(len); - } - return new messages_1.DataRowMessage(LATEINIT_LENGTH, fields); -}; -const parseParameterStatusMessage = (reader) => { - const name = reader.cstring(); - const value = reader.cstring(); - return new messages_1.ParameterStatusMessage(LATEINIT_LENGTH, name, value); -}; -const parseBackendKeyData = (reader) => { - const processID = reader.int32(); - const secretKey = reader.int32(); - return new messages_1.BackendKeyDataMessage(LATEINIT_LENGTH, processID, secretKey); -}; -const parseAuthenticationResponse = (reader, length) => { - const code = reader.int32(); - // TODO(bmc): maybe better types here - const message = { - name: 'authenticationOk', - length, - }; - switch (code) { - case 0: // AuthenticationOk - break; - case 3: // AuthenticationCleartextPassword - if (message.length === 8) { - message.name = 'authenticationCleartextPassword'; - } - break; - case 5: // AuthenticationMD5Password - if (message.length === 12) { - message.name = 'authenticationMD5Password'; - const salt = reader.bytes(4); - return new messages_1.AuthenticationMD5Password(LATEINIT_LENGTH, salt); - } - break; - case 10: // AuthenticationSASL - { - message.name = 'authenticationSASL'; - message.mechanisms = []; - let mechanism; - do { - mechanism = reader.cstring(); - if (mechanism) { - message.mechanisms.push(mechanism); - } - } while (mechanism); - } - break; - case 11: // AuthenticationSASLContinue - message.name = 'authenticationSASLContinue'; - message.data = reader.string(length - 8); - break; - case 12: // AuthenticationSASLFinal - message.name = 'authenticationSASLFinal'; - message.data = reader.string(length - 8); - break; - default: - throw new Error('Unknown authenticationOk message type ' + code); - } - return message; -}; -const parseErrorMessage = (reader, name) => { - const fields = {}; - let fieldType = reader.string(1); - while (fieldType !== '\0') { - fields[fieldType] = reader.cstring(); - fieldType = reader.string(1); - } - const messageValue = fields.M; - const message = name === 'notice' - ? new messages_1.NoticeMessage(LATEINIT_LENGTH, messageValue) - : new messages_1.DatabaseError(messageValue, LATEINIT_LENGTH, name); - message.severity = fields.S; - message.code = fields.C; - message.detail = fields.D; - message.hint = fields.H; - message.position = fields.P; - message.internalPosition = fields.p; - message.internalQuery = fields.q; - message.where = fields.W; - message.schema = fields.s; - message.table = fields.t; - message.column = fields.c; - message.dataType = fields.d; - message.constraint = fields.n; - message.file = fields.F; - message.line = fields.L; - message.routine = fields.R; - return message; -}; -//# sourceMappingURL=parser.js.map \ No newline at end of file diff --git a/node_modules/pg-protocol/dist/parser.js.map b/node_modules/pg-protocol/dist/parser.js.map deleted file mode 100644 index 947ab29..0000000 --- a/node_modules/pg-protocol/dist/parser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parser.js","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":";;;AACA,yCA0BmB;AACnB,mDAA8C;AAE9C,8CAA8C;AAC9C,MAAM,WAAW,GAAG,CAAC,CAAA;AACrB,mEAAmE;AACnE,qCAAqC;AACrC,MAAM,UAAU,GAAG,CAAC,CAAA;AAEpB,MAAM,aAAa,GAAG,WAAW,GAAG,UAAU,CAAA;AAE9C,2FAA2F;AAC3F,MAAM,eAAe,GAAG,CAAC,CAAC,CAAA;AAO1B,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AAiCzC,MAAa,MAAM;IAOjB,YAAY,IAAoB;QANxB,WAAM,GAAW,WAAW,CAAA;QAC5B,iBAAY,GAAW,CAAC,CAAA;QACxB,iBAAY,GAAW,CAAC,CAAA;QACxB,WAAM,GAAG,IAAI,4BAAY,EAAE,CAAA;QAIjC,IAAI,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,MAAK,QAAQ,EAAE;YAC3B,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAA;SACjD;QACD,IAAI,CAAC,IAAI,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,KAAI,MAAM,CAAA;IAClC,CAAC;IAEM,KAAK,CAAC,MAAc,EAAE,QAAyB;QACpD,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;QACxB,MAAM,gBAAgB,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAA;QAC9D,IAAI,MAAM,GAAG,IAAI,CAAC,YAAY,CAAA;QAC9B,OAAO,MAAM,GAAG,aAAa,IAAI,gBAAgB,EAAE;YACjD,uDAAuD;YACvD,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;YAChC,4EAA4E;YAC5E,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,GAAG,WAAW,CAAC,CAAA;YAC7D,MAAM,iBAAiB,GAAG,WAAW,GAAG,MAAM,CAAA;YAC9C,IAAI,iBAAiB,GAAG,MAAM,IAAI,gBAAgB,EAAE;gBAClD,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;gBACpF,QAAQ,CAAC,OAAO,CAAC,CAAA;gBACjB,MAAM,IAAI,iBAAiB,CAAA;aAC5B;iBAAM;gBACL,MAAK;aACN;SACF;QACD,IAAI,MAAM,KAAK,gBAAgB,EAAE;YAC/B,6BAA6B;YAC7B,IAAI,CAAC,MAAM,GAAG,WAAW,CAAA;YACzB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAA;YACrB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAA;SACtB;aAAM;YACL,wCAAwC;YACxC,IAAI,CAAC,YAAY,GAAG,gBAAgB,GAAG,MAAM,CAAA;YAC7C,IAAI,CAAC,YAAY,GAAG,MAAM,CAAA;SAC3B;IACH,CAAC;IAEO,WAAW,CAAC,MAAc;QAChC,IAAI,IAAI,CAAC,YAAY,GAAG,CAAC,EAAE;YACzB,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,UAAU,CAAA;YACvD,MAAM,aAAa,GAAG,SAAS,GAAG,IAAI,CAAC,YAAY,CAAA;YACnD,IAAI,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;gBAC1C,wDAAwD;gBACxD,IAAI,SAAiB,CAAA;gBACrB,IAAI,SAAS,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,EAAE;oBACjF,kGAAkG;oBAClG,SAAS,GAAG,IAAI,CAAC,MAAM,CAAA;iBACxB;qBAAM;oBACL,+BAA+B;oBAC/B,IAAI,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,GAAG,CAAC,CAAA;oBAChD,OAAO,SAAS,IAAI,eAAe,EAAE;wBACnC,eAAe,IAAI,CAAC,CAAA;qBACrB;oBACD,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,eAAe,CAAC,CAAA;iBAChD;gBACD,2CAA2C;gBAC3C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,CAAA;gBACxF,IAAI,CAAC,MAAM,GAAG,SAAS,CAAA;gBACvB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAA;aACtB;YACD,+CAA+C;YAC/C,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,CAAA;YAC/D,IAAI,CAAC,YAAY,GAAG,SAAS,CAAA;SAC9B;aAAM;YACL,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;YACpB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAA;YACrB,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,UAAU,CAAA;SACtC;IACH,CAAC;IAEO,YAAY,CAAC,MAAc,EAAE,IAAY,EAAE,MAAc,EAAE,KAAa;QAC9E,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;QAEvB,+NAA+N;QAC/N,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QAE/B,IAAI,OAAuB,CAAA;QAE3B,QAAQ,IAAI,EAAE;YACZ;gBACE,OAAO,GAAG,uBAAY,CAAA;gBACtB,MAAK;YACP;gBACE,OAAO,GAAG,wBAAa,CAAA;gBACvB,MAAK;YACP;gBACE,OAAO,GAAG,wBAAa,CAAA;gBACvB,MAAK;YACP;gBACE,OAAO,GAAG,iBAAM,CAAA;gBAChB,MAAK;YACP;gBACE,OAAO,GAAG,0BAAe,CAAA;gBACzB,MAAK;YACP;gBACE,OAAO,GAAG,mBAAQ,CAAA;gBAClB,MAAK;YACP;gBACE,OAAO,GAAG,2BAAgB,CAAA;gBAC1B,MAAK;YACP;gBACE,OAAO,GAAG,qBAAU,CAAA;gBACpB,MAAK;YACP;gBACE,OAAO,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAA;gBACrC,MAAK;YACP;gBACE,OAAO,GAAG,2BAA2B,CAAC,MAAM,CAAC,CAAA;gBAC7C,MAAK;YACP;gBACE,OAAO,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAA;gBAC3C,MAAK;YACP;gBACE,OAAO,GAAG,wBAAwB,CAAC,MAAM,CAAC,CAAA;gBAC1C,MAAK;YACP;gBACE,OAAO,GAAG,2BAA2B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;gBACrD,MAAK;YACP;gBACE,OAAO,GAAG,2BAA2B,CAAC,MAAM,CAAC,CAAA;gBAC7C,MAAK;YACP;gBACE,OAAO,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAA;gBACrC,MAAK;YACP;gBACE,OAAO,GAAG,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;gBAC5C,MAAK;YACP;gBACE,OAAO,GAAG,iBAAiB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;gBAC7C,MAAK;YACP;gBACE,OAAO,GAAG,0BAA0B,CAAC,MAAM,CAAC,CAAA;gBAC5C,MAAK;YACP;gBACE,OAAO,GAAG,gCAAgC,CAAC,MAAM,CAAC,CAAA;gBAClD,MAAK;YACP;gBACE,OAAO,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAA;gBACpC,MAAK;YACP;gBACE,OAAO,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAA;gBACrC,MAAK;YACP;gBACE,OAAO,GAAG,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;gBACvC,MAAK;YACP;gBACE,OAAO,IAAI,wBAAa,CAAC,6BAA6B,GAAG,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,CAAA;SAC/F;QAED,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,WAAW,CAAC,CAAA;QAEhC,OAAO,CAAC,MAAM,GAAG,MAAM,CAAA;QACvB,OAAO,OAAO,CAAA;IAChB,CAAC;CACF;AAjKD,wBAiKC;AAED,MAAM,yBAAyB,GAAG,CAAC,MAAoB,EAAE,EAAE;IACzD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;IAC/B,OAAO,IAAI,+BAAoB,CAAC,eAAe,EAAE,MAAM,CAAC,CAAA;AAC1D,CAAC,CAAA;AAED,MAAM,2BAA2B,GAAG,CAAC,MAAoB,EAAE,EAAE;IAC3D,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,EAAE,CAAA;IAC7B,OAAO,IAAI,iCAAsB,CAAC,eAAe,EAAE,IAAI,CAAC,CAAA;AAC1D,CAAC,CAAA;AAED,MAAM,aAAa,GAAG,CAAC,MAAoB,EAAE,MAAc,EAAE,EAAE;IAC7D,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;IACtC,OAAO,IAAI,0BAAe,CAAC,eAAe,EAAE,KAAK,CAAC,CAAA;AACpD,CAAC,CAAA;AAED,MAAM,kBAAkB,GAAG,CAAC,MAAoB,EAAE,EAAE,CAAC,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAA;AAE/F,MAAM,mBAAmB,GAAG,CAAC,MAAoB,EAAE,EAAE,CAAC,gBAAgB,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;AAEjG,MAAM,gBAAgB,GAAG,CAAC,MAAoB,EAAE,WAAwB,EAAE,EAAE;IAC1E,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;IACpC,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,EAAE,CAAA;IAClC,MAAM,OAAO,GAAG,IAAI,uBAAY,CAAC,eAAe,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAA;IACrF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,EAAE,CAAC,EAAE,EAAE;QACpC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,EAAE,CAAA;KACxC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AAED,MAAM,wBAAwB,GAAG,CAAC,MAAoB,EAAE,EAAE;IACxD,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,EAAE,CAAA;IAChC,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,CAAA;IAChC,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,CAAA;IAChC,OAAO,IAAI,sCAA2B,CAAC,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;AACtF,CAAC,CAAA;AAED,MAAM,0BAA0B,GAAG,CAAC,MAAoB,EAAE,EAAE;IAC1D,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,EAAE,CAAA;IACjC,MAAM,OAAO,GAAG,IAAI,gCAAqB,CAAC,eAAe,EAAE,UAAU,CAAC,CAAA;IACtE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE,EAAE;QACnC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;KACvC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AAED,MAAM,UAAU,GAAG,CAAC,MAAoB,EAAE,EAAE;IAC1C,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,EAAE,CAAA;IAC7B,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,CAAA;IAC/B,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,EAAE,CAAA;IAC/B,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,CAAA;IAClC,MAAM,YAAY,GAAG,MAAM,CAAC,KAAK,EAAE,CAAA;IACnC,MAAM,gBAAgB,GAAG,MAAM,CAAC,KAAK,EAAE,CAAA;IACvC,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAA;IACrD,OAAO,IAAI,gBAAK,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,gBAAgB,EAAE,IAAI,CAAC,CAAA;AAC7F,CAAC,CAAA;AAED,MAAM,gCAAgC,GAAG,CAAC,MAAoB,EAAE,EAAE;IAChE,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,EAAE,CAAA;IACrC,MAAM,OAAO,GAAG,IAAI,sCAA2B,CAAC,eAAe,EAAE,cAAc,CAAC,CAAA;IAChF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,EAAE,CAAC,EAAE,EAAE;QACvC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,EAAE,CAAA;KACxC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AAED,MAAM,mBAAmB,GAAG,CAAC,MAAoB,EAAE,EAAE;IACnD,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,EAAE,CAAA;IACjC,MAAM,MAAM,GAAU,IAAI,KAAK,CAAC,UAAU,CAAC,CAAA;IAC3C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE,EAAE;QACnC,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,EAAE,CAAA;QAC1B,uDAAuD;QACvD,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;KACnD;IACD,OAAO,IAAI,yBAAc,CAAC,eAAe,EAAE,MAAM,CAAC,CAAA;AACpD,CAAC,CAAA;AAED,MAAM,2BAA2B,GAAG,CAAC,MAAoB,EAAE,EAAE;IAC3D,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,EAAE,CAAA;IAC7B,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,EAAE,CAAA;IAC9B,OAAO,IAAI,iCAAsB,CAAC,eAAe,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;AACjE,CAAC,CAAA;AAED,MAAM,mBAAmB,GAAG,CAAC,MAAoB,EAAE,EAAE;IACnD,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,EAAE,CAAA;IAChC,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,EAAE,CAAA;IAChC,OAAO,IAAI,gCAAqB,CAAC,eAAe,EAAE,SAAS,EAAE,SAAS,CAAC,CAAA;AACzE,CAAC,CAAA;AAED,MAAM,2BAA2B,GAAG,CAAC,MAAoB,EAAE,MAAc,EAAE,EAAE;IAC3E,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,EAAE,CAAA;IAC3B,qCAAqC;IACrC,MAAM,OAAO,GAAyB;QACpC,IAAI,EAAE,kBAAkB;QACxB,MAAM;KACP,CAAA;IAED,QAAQ,IAAI,EAAE;QACZ,KAAK,CAAC,EAAE,mBAAmB;YACzB,MAAK;QACP,KAAK,CAAC,EAAE,kCAAkC;YACxC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;gBACxB,OAAO,CAAC,IAAI,GAAG,iCAAiC,CAAA;aACjD;YACD,MAAK;QACP,KAAK,CAAC,EAAE,4BAA4B;YAClC,IAAI,OAAO,CAAC,MAAM,KAAK,EAAE,EAAE;gBACzB,OAAO,CAAC,IAAI,GAAG,2BAA2B,CAAA;gBAC1C,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;gBAC5B,OAAO,IAAI,oCAAyB,CAAC,eAAe,EAAE,IAAI,CAAC,CAAA;aAC5D;YACD,MAAK;QACP,KAAK,EAAE,EAAE,qBAAqB;YAC5B;gBACE,OAAO,CAAC,IAAI,GAAG,oBAAoB,CAAA;gBACnC,OAAO,CAAC,UAAU,GAAG,EAAE,CAAA;gBACvB,IAAI,SAAiB,CAAA;gBACrB,GAAG;oBACD,SAAS,GAAG,MAAM,CAAC,OAAO,EAAE,CAAA;oBAC5B,IAAI,SAAS,EAAE;wBACb,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;qBACnC;iBACF,QAAQ,SAAS,EAAC;aACpB;YACD,MAAK;QACP,KAAK,EAAE,EAAE,6BAA6B;YACpC,OAAO,CAAC,IAAI,GAAG,4BAA4B,CAAA;YAC3C,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;YACxC,MAAK;QACP,KAAK,EAAE,EAAE,0BAA0B;YACjC,OAAO,CAAC,IAAI,GAAG,yBAAyB,CAAA;YACxC,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;YACxC,MAAK;QACP;YACE,MAAM,IAAI,KAAK,CAAC,wCAAwC,GAAG,IAAI,CAAC,CAAA;KACnE;IACD,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AAED,MAAM,iBAAiB,GAAG,CAAC,MAAoB,EAAE,IAAiB,EAAE,EAAE;IACpE,MAAM,MAAM,GAA2B,EAAE,CAAA;IACzC,IAAI,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;IAChC,OAAO,SAAS,KAAK,IAAI,EAAE;QACzB,MAAM,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,OAAO,EAAE,CAAA;QACpC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;KAC7B;IAED,MAAM,YAAY,GAAG,MAAM,CAAC,CAAC,CAAA;IAE7B,MAAM,OAAO,GACX,IAAI,KAAK,QAAQ;QACf,CAAC,CAAC,IAAI,wBAAa,CAAC,eAAe,EAAE,YAAY,CAAC;QAClD,CAAC,CAAC,IAAI,wBAAa,CAAC,YAAY,EAAE,eAAe,EAAE,IAAI,CAAC,CAAA;IAE5D,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAA;IAC3B,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC,CAAA;IACvB,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAA;IACzB,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC,CAAA;IACvB,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAA;IAC3B,OAAO,CAAC,gBAAgB,GAAG,MAAM,CAAC,CAAC,CAAA;IACnC,OAAO,CAAC,aAAa,GAAG,MAAM,CAAC,CAAC,CAAA;IAChC,OAAO,CAAC,KAAK,GAAG,MAAM,CAAC,CAAC,CAAA;IACxB,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAA;IACzB,OAAO,CAAC,KAAK,GAAG,MAAM,CAAC,CAAC,CAAA;IACxB,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAA;IACzB,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAA;IAC3B,OAAO,CAAC,UAAU,GAAG,MAAM,CAAC,CAAC,CAAA;IAC7B,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC,CAAA;IACvB,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC,CAAA;IACvB,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAA;IAC1B,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA"} \ No newline at end of file diff --git a/node_modules/pg-protocol/dist/serializer.d.ts b/node_modules/pg-protocol/dist/serializer.d.ts deleted file mode 100644 index a9ef64a..0000000 --- a/node_modules/pg-protocol/dist/serializer.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -declare type ParseOpts = { - name?: string; - types?: number[]; - text: string; -}; -declare type ValueMapper = (param: any, index: number) => any; -declare type BindOpts = { - portal?: string; - binary?: boolean; - statement?: string; - values?: any[]; - valueMapper?: ValueMapper; -}; -declare type ExecOpts = { - portal?: string; - rows?: number; -}; -declare type PortalOpts = { - type: 'S' | 'P'; - name?: string; -}; -declare const serialize: { - startup: (opts: Record) => Buffer; - password: (password: string) => Buffer; - requestSsl: () => Buffer; - sendSASLInitialResponseMessage: (mechanism: string, initialResponse: string) => Buffer; - sendSCRAMClientFinalMessage: (additionalData: string) => Buffer; - query: (text: string) => Buffer; - parse: (query: ParseOpts) => Buffer; - bind: (config?: BindOpts) => Buffer; - execute: (config?: ExecOpts) => Buffer; - describe: (msg: PortalOpts) => Buffer; - close: (msg: PortalOpts) => Buffer; - flush: () => Buffer; - sync: () => Buffer; - end: () => Buffer; - copyData: (chunk: Buffer) => Buffer; - copyDone: () => Buffer; - copyFail: (message: string) => Buffer; - cancel: (processID: number, secretKey: number) => Buffer; -}; -export { serialize }; diff --git a/node_modules/pg-protocol/dist/serializer.js b/node_modules/pg-protocol/dist/serializer.js deleted file mode 100644 index f3e5d28..0000000 --- a/node_modules/pg-protocol/dist/serializer.js +++ /dev/null @@ -1,189 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.serialize = void 0; -const buffer_writer_1 = require("./buffer-writer"); -const writer = new buffer_writer_1.Writer(); -const startup = (opts) => { - // protocol version - writer.addInt16(3).addInt16(0); - for (const key of Object.keys(opts)) { - writer.addCString(key).addCString(opts[key]); - } - writer.addCString('client_encoding').addCString('UTF8'); - const bodyBuffer = writer.addCString('').flush(); - // this message is sent without a code - const length = bodyBuffer.length + 4; - return new buffer_writer_1.Writer().addInt32(length).add(bodyBuffer).flush(); -}; -const requestSsl = () => { - const response = Buffer.allocUnsafe(8); - response.writeInt32BE(8, 0); - response.writeInt32BE(80877103, 4); - return response; -}; -const password = (password) => { - return writer.addCString(password).flush(112 /* code.startup */); -}; -const sendSASLInitialResponseMessage = function (mechanism, initialResponse) { - // 0x70 = 'p' - writer.addCString(mechanism).addInt32(Buffer.byteLength(initialResponse)).addString(initialResponse); - return writer.flush(112 /* code.startup */); -}; -const sendSCRAMClientFinalMessage = function (additionalData) { - return writer.addString(additionalData).flush(112 /* code.startup */); -}; -const query = (text) => { - return writer.addCString(text).flush(81 /* code.query */); -}; -const emptyArray = []; -const parse = (query) => { - // expect something like this: - // { name: 'queryName', - // text: 'select * from blah', - // types: ['int8', 'bool'] } - // normalize missing query names to allow for null - const name = query.name || ''; - if (name.length > 63) { - console.error('Warning! Postgres only supports 63 characters for query names.'); - console.error('You supplied %s (%s)', name, name.length); - console.error('This can cause conflicts and silent errors executing queries'); - } - const types = query.types || emptyArray; - const len = types.length; - const buffer = writer - .addCString(name) // name of query - .addCString(query.text) // actual query text - .addInt16(len); - for (let i = 0; i < len; i++) { - buffer.addInt32(types[i]); - } - return writer.flush(80 /* code.parse */); -}; -const paramWriter = new buffer_writer_1.Writer(); -const writeValues = function (values, valueMapper) { - for (let i = 0; i < values.length; i++) { - const mappedVal = valueMapper ? valueMapper(values[i], i) : values[i]; - if (mappedVal == null) { - // add the param type (string) to the writer - writer.addInt16(0 /* ParamType.STRING */); - // write -1 to the param writer to indicate null - paramWriter.addInt32(-1); - } - else if (mappedVal instanceof Buffer) { - // add the param type (binary) to the writer - writer.addInt16(1 /* ParamType.BINARY */); - // add the buffer to the param writer - paramWriter.addInt32(mappedVal.length); - paramWriter.add(mappedVal); - } - else { - // add the param type (string) to the writer - writer.addInt16(0 /* ParamType.STRING */); - paramWriter.addInt32(Buffer.byteLength(mappedVal)); - paramWriter.addString(mappedVal); - } - } -}; -const bind = (config = {}) => { - // normalize config - const portal = config.portal || ''; - const statement = config.statement || ''; - const binary = config.binary || false; - const values = config.values || emptyArray; - const len = values.length; - writer.addCString(portal).addCString(statement); - writer.addInt16(len); - writeValues(values, config.valueMapper); - writer.addInt16(len); - writer.add(paramWriter.flush()); - // all results use the same format code - writer.addInt16(1); - // format code - writer.addInt16(binary ? 1 /* ParamType.BINARY */ : 0 /* ParamType.STRING */); - return writer.flush(66 /* code.bind */); -}; -const emptyExecute = Buffer.from([69 /* code.execute */, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00]); -const execute = (config) => { - // this is the happy path for most queries - if (!config || (!config.portal && !config.rows)) { - return emptyExecute; - } - const portal = config.portal || ''; - const rows = config.rows || 0; - const portalLength = Buffer.byteLength(portal); - const len = 4 + portalLength + 1 + 4; - // one extra bit for code - const buff = Buffer.allocUnsafe(1 + len); - buff[0] = 69 /* code.execute */; - buff.writeInt32BE(len, 1); - buff.write(portal, 5, 'utf-8'); - buff[portalLength + 5] = 0; // null terminate portal cString - buff.writeUInt32BE(rows, buff.length - 4); - return buff; -}; -const cancel = (processID, secretKey) => { - const buffer = Buffer.allocUnsafe(16); - buffer.writeInt32BE(16, 0); - buffer.writeInt16BE(1234, 4); - buffer.writeInt16BE(5678, 6); - buffer.writeInt32BE(processID, 8); - buffer.writeInt32BE(secretKey, 12); - return buffer; -}; -const cstringMessage = (code, string) => { - const stringLen = Buffer.byteLength(string); - const len = 4 + stringLen + 1; - // one extra bit for code - const buffer = Buffer.allocUnsafe(1 + len); - buffer[0] = code; - buffer.writeInt32BE(len, 1); - buffer.write(string, 5, 'utf-8'); - buffer[len] = 0; // null terminate cString - return buffer; -}; -const emptyDescribePortal = writer.addCString('P').flush(68 /* code.describe */); -const emptyDescribeStatement = writer.addCString('S').flush(68 /* code.describe */); -const describe = (msg) => { - return msg.name - ? cstringMessage(68 /* code.describe */, `${msg.type}${msg.name || ''}`) - : msg.type === 'P' - ? emptyDescribePortal - : emptyDescribeStatement; -}; -const close = (msg) => { - const text = `${msg.type}${msg.name || ''}`; - return cstringMessage(67 /* code.close */, text); -}; -const copyData = (chunk) => { - return writer.add(chunk).flush(100 /* code.copyFromChunk */); -}; -const copyFail = (message) => { - return cstringMessage(102 /* code.copyFail */, message); -}; -const codeOnlyBuffer = (code) => Buffer.from([code, 0x00, 0x00, 0x00, 0x04]); -const flushBuffer = codeOnlyBuffer(72 /* code.flush */); -const syncBuffer = codeOnlyBuffer(83 /* code.sync */); -const endBuffer = codeOnlyBuffer(88 /* code.end */); -const copyDoneBuffer = codeOnlyBuffer(99 /* code.copyDone */); -const serialize = { - startup, - password, - requestSsl, - sendSASLInitialResponseMessage, - sendSCRAMClientFinalMessage, - query, - parse, - bind, - execute, - describe, - close, - flush: () => flushBuffer, - sync: () => syncBuffer, - end: () => endBuffer, - copyData, - copyDone: () => copyDoneBuffer, - copyFail, - cancel, -}; -exports.serialize = serialize; -//# sourceMappingURL=serializer.js.map \ No newline at end of file diff --git a/node_modules/pg-protocol/dist/serializer.js.map b/node_modules/pg-protocol/dist/serializer.js.map deleted file mode 100644 index 513c2fa..0000000 --- a/node_modules/pg-protocol/dist/serializer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"serializer.js","sourceRoot":"","sources":["../src/serializer.ts"],"names":[],"mappings":";;;AAAA,mDAAwC;AAkBxC,MAAM,MAAM,GAAG,IAAI,sBAAM,EAAE,CAAA;AAE3B,MAAM,OAAO,GAAG,CAAC,IAA4B,EAAU,EAAE;IACvD,mBAAmB;IACnB,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;IAC9B,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;QACnC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;KAC7C;IAED,MAAM,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;IAEvD,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAA;IAChD,sCAAsC;IAEtC,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,CAAA;IAEpC,OAAO,IAAI,sBAAM,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,CAAA;AAC9D,CAAC,CAAA;AAED,MAAM,UAAU,GAAG,GAAW,EAAE;IAC9B,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;IACtC,QAAQ,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAC3B,QAAQ,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAA;IAClC,OAAO,QAAQ,CAAA;AACjB,CAAC,CAAA;AAED,MAAM,QAAQ,GAAG,CAAC,QAAgB,EAAU,EAAE;IAC5C,OAAO,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,KAAK,wBAAc,CAAA;AACxD,CAAC,CAAA;AAED,MAAM,8BAA8B,GAAG,UAAU,SAAiB,EAAE,eAAuB;IACzF,aAAa;IACb,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAA;IAEpG,OAAO,MAAM,CAAC,KAAK,wBAAc,CAAA;AACnC,CAAC,CAAA;AAED,MAAM,2BAA2B,GAAG,UAAU,cAAsB;IAClE,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,KAAK,wBAAc,CAAA;AAC7D,CAAC,CAAA;AAED,MAAM,KAAK,GAAG,CAAC,IAAY,EAAU,EAAE;IACrC,OAAO,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,KAAK,qBAAY,CAAA;AAClD,CAAC,CAAA;AAQD,MAAM,UAAU,GAAU,EAAE,CAAA;AAE5B,MAAM,KAAK,GAAG,CAAC,KAAgB,EAAU,EAAE;IACzC,8BAA8B;IAC9B,uBAAuB;IACvB,gCAAgC;IAChC,8BAA8B;IAE9B,kDAAkD;IAClD,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,EAAE,CAAA;IAC7B,IAAI,IAAI,CAAC,MAAM,GAAG,EAAE,EAAE;QACpB,OAAO,CAAC,KAAK,CAAC,gEAAgE,CAAC,CAAA;QAC/E,OAAO,CAAC,KAAK,CAAC,sBAAsB,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;QACxD,OAAO,CAAC,KAAK,CAAC,8DAA8D,CAAC,CAAA;KAC9E;IAED,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,IAAI,UAAU,CAAA;IAEvC,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAA;IAExB,MAAM,MAAM,GAAG,MAAM;SAClB,UAAU,CAAC,IAAI,CAAC,CAAC,gBAAgB;SACjC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,oBAAoB;SAC3C,QAAQ,CAAC,GAAG,CAAC,CAAA;IAEhB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;QAC5B,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;KAC1B;IAED,OAAO,MAAM,CAAC,KAAK,qBAAY,CAAA;AACjC,CAAC,CAAA;AAaD,MAAM,WAAW,GAAG,IAAI,sBAAM,EAAE,CAAA;AAQhC,MAAM,WAAW,GAAG,UAAU,MAAa,EAAE,WAAyB;IACpE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtC,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QACrE,IAAI,SAAS,IAAI,IAAI,EAAE;YACrB,4CAA4C;YAC5C,MAAM,CAAC,QAAQ,0BAAkB,CAAA;YACjC,gDAAgD;YAChD,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;SACzB;aAAM,IAAI,SAAS,YAAY,MAAM,EAAE;YACtC,4CAA4C;YAC5C,MAAM,CAAC,QAAQ,0BAAkB,CAAA;YACjC,qCAAqC;YACrC,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;YACtC,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;SAC3B;aAAM;YACL,4CAA4C;YAC5C,MAAM,CAAC,QAAQ,0BAAkB,CAAA;YACjC,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAA;YAClD,WAAW,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;SACjC;KACF;AACH,CAAC,CAAA;AAED,MAAM,IAAI,GAAG,CAAC,SAAmB,EAAE,EAAU,EAAE;IAC7C,mBAAmB;IACnB,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,EAAE,CAAA;IAClC,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,EAAE,CAAA;IACxC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,KAAK,CAAA;IACrC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,UAAU,CAAA;IAC1C,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAA;IAEzB,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAA;IAC/C,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;IAEpB,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,CAAA;IAEvC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;IACpB,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC,CAAA;IAE/B,uCAAuC;IACvC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;IAClB,cAAc;IACd,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,0BAAkB,CAAC,yBAAiB,CAAC,CAAA;IAC7D,OAAO,MAAM,CAAC,KAAK,oBAAW,CAAA;AAChC,CAAC,CAAA;AAOD,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,wBAAe,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAEtG,MAAM,OAAO,GAAG,CAAC,MAAiB,EAAU,EAAE;IAC5C,0CAA0C;IAC1C,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;QAC/C,OAAO,YAAY,CAAA;KACpB;IAED,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,EAAE,CAAA;IAClC,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,CAAC,CAAA;IAE7B,MAAM,YAAY,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;IAC9C,MAAM,GAAG,GAAG,CAAC,GAAG,YAAY,GAAG,CAAC,GAAG,CAAC,CAAA;IACpC,yBAAyB;IACzB,MAAM,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,GAAG,GAAG,CAAC,CAAA;IACxC,IAAI,CAAC,CAAC,CAAC,wBAAe,CAAA;IACtB,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;IACzB,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,CAAA;IAC9B,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,GAAG,CAAC,CAAA,CAAC,gCAAgC;IAC3D,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;IACzC,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,MAAM,MAAM,GAAG,CAAC,SAAiB,EAAE,SAAiB,EAAU,EAAE;IAC9D,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAA;IACrC,MAAM,CAAC,YAAY,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;IAC1B,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;IAC5B,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;IAC5B,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;IACjC,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,EAAE,CAAC,CAAA;IAClC,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AAOD,MAAM,cAAc,GAAG,CAAC,IAAU,EAAE,MAAc,EAAU,EAAE;IAC5D,MAAM,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;IAC3C,MAAM,GAAG,GAAG,CAAC,GAAG,SAAS,GAAG,CAAC,CAAA;IAC7B,yBAAyB;IACzB,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,GAAG,GAAG,CAAC,CAAA;IAC1C,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;IAChB,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;IAC3B,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,CAAA;IAChC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA,CAAC,yBAAyB;IACzC,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AAED,MAAM,mBAAmB,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,wBAAe,CAAA;AACvE,MAAM,sBAAsB,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,wBAAe,CAAA;AAE1E,MAAM,QAAQ,GAAG,CAAC,GAAe,EAAU,EAAE;IAC3C,OAAO,GAAG,CAAC,IAAI;QACb,CAAC,CAAC,cAAc,yBAAgB,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;QAC/D,CAAC,CAAC,GAAG,CAAC,IAAI,KAAK,GAAG;YAClB,CAAC,CAAC,mBAAmB;YACrB,CAAC,CAAC,sBAAsB,CAAA;AAC5B,CAAC,CAAA;AAED,MAAM,KAAK,GAAG,CAAC,GAAe,EAAU,EAAE;IACxC,MAAM,IAAI,GAAG,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,IAAI,EAAE,EAAE,CAAA;IAC3C,OAAO,cAAc,sBAAa,IAAI,CAAC,CAAA;AACzC,CAAC,CAAA;AAED,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAU,EAAE;IACzC,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,KAAK,8BAAoB,CAAA;AACpD,CAAC,CAAA;AAED,MAAM,QAAQ,GAAG,CAAC,OAAe,EAAU,EAAE;IAC3C,OAAO,cAAc,0BAAgB,OAAO,CAAC,CAAA;AAC/C,CAAC,CAAA;AAED,MAAM,cAAc,GAAG,CAAC,IAAU,EAAU,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;AAE1F,MAAM,WAAW,GAAG,cAAc,qBAAY,CAAA;AAC9C,MAAM,UAAU,GAAG,cAAc,oBAAW,CAAA;AAC5C,MAAM,SAAS,GAAG,cAAc,mBAAU,CAAA;AAC1C,MAAM,cAAc,GAAG,cAAc,wBAAe,CAAA;AAEpD,MAAM,SAAS,GAAG;IAChB,OAAO;IACP,QAAQ;IACR,UAAU;IACV,8BAA8B;IAC9B,2BAA2B;IAC3B,KAAK;IACL,KAAK;IACL,IAAI;IACJ,OAAO;IACP,QAAQ;IACR,KAAK;IACL,KAAK,EAAE,GAAG,EAAE,CAAC,WAAW;IACxB,IAAI,EAAE,GAAG,EAAE,CAAC,UAAU;IACtB,GAAG,EAAE,GAAG,EAAE,CAAC,SAAS;IACpB,QAAQ;IACR,QAAQ,EAAE,GAAG,EAAE,CAAC,cAAc;IAC9B,QAAQ;IACR,MAAM;CACP,CAAA;AAEQ,8BAAS"} \ No newline at end of file diff --git a/node_modules/pg-protocol/esm/index.js b/node_modules/pg-protocol/esm/index.js deleted file mode 100644 index c52807d..0000000 --- a/node_modules/pg-protocol/esm/index.js +++ /dev/null @@ -1,11 +0,0 @@ -// ESM wrapper for pg-protocol -import * as protocol from '../dist/index.js' - -// Re-export all the properties -export const DatabaseError = protocol.DatabaseError -export const SASL = protocol.SASL -export const serialize = protocol.serialize -export const parse = protocol.parse - -// Re-export the default -export default protocol diff --git a/node_modules/pg-protocol/package.json b/node_modules/pg-protocol/package.json deleted file mode 100644 index 42a565c..0000000 --- a/node_modules/pg-protocol/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "pg-protocol", - "version": "1.13.0", - "description": "The postgres client/server binary protocol, implemented in TypeScript", - "main": "dist/index.js", - "types": "dist/index.d.ts", - "exports": { - ".": { - "import": "./esm/index.js", - "require": "./dist/index.js", - "default": "./dist/index.js" - }, - "./dist/*": "./dist/*.js", - "./dist/*.js": "./dist/*.js" - }, - "license": "MIT", - "devDependencies": { - "@types/chai": "^4.2.7", - "@types/mocha": "^10.0.10", - "@types/node": "^12.12.21", - "chai": "^4.2.0", - "chunky": "^0.0.0", - "mocha": "^11.7.5", - "ts-node": "^8.5.4", - "typescript": "^4.0.3" - }, - "scripts": { - "test": "mocha dist/**/*.test.js", - "build": "tsc", - "build:watch": "tsc --watch", - "prepublish": "yarn build", - "pretest": "yarn build" - }, - "repository": { - "type": "git", - "url": "git://github.com/brianc/node-postgres.git", - "directory": "packages/pg-protocol" - }, - "files": [ - "/dist/*{js,ts,map}", - "/src", - "/esm" - ], - "gitHead": "c9070cc8d526fca65780cedc25c1966b57cf7532" -} diff --git a/node_modules/pg-protocol/src/b.ts b/node_modules/pg-protocol/src/b.ts deleted file mode 100644 index c8a2411..0000000 --- a/node_modules/pg-protocol/src/b.ts +++ /dev/null @@ -1,25 +0,0 @@ -// file for microbenchmarking - -import { BufferReader } from './buffer-reader' - -const LOOPS = 1000 -let count = 0 -const start = performance.now() - -const reader = new BufferReader() -const buffer = Buffer.from([33, 33, 33, 33, 33, 33, 33, 0]) - -const run = () => { - if (count > LOOPS) { - console.log(performance.now() - start) - return - } - count++ - for (let i = 0; i < LOOPS; i++) { - reader.setBuffer(0, buffer) - reader.cstring() - } - setImmediate(run) -} - -run() diff --git a/node_modules/pg-protocol/src/buffer-reader.ts b/node_modules/pg-protocol/src/buffer-reader.ts deleted file mode 100644 index b89aceb..0000000 --- a/node_modules/pg-protocol/src/buffer-reader.ts +++ /dev/null @@ -1,58 +0,0 @@ -export class BufferReader { - private buffer: Buffer = Buffer.allocUnsafe(0) - - // TODO(bmc): support non-utf8 encoding? - private encoding: string = 'utf-8' - - constructor(private offset: number = 0) {} - - public setBuffer(offset: number, buffer: Buffer): void { - this.offset = offset - this.buffer = buffer - } - - public int16(): number { - const result = this.buffer.readInt16BE(this.offset) - this.offset += 2 - return result - } - - public byte(): number { - const result = this.buffer[this.offset] - this.offset++ - return result - } - - public int32(): number { - const result = this.buffer.readInt32BE(this.offset) - this.offset += 4 - return result - } - - public uint32(): number { - const result = this.buffer.readUInt32BE(this.offset) - this.offset += 4 - return result - } - - public string(length: number): string { - const result = this.buffer.toString(this.encoding, this.offset, this.offset + length) - this.offset += length - return result - } - - public cstring(): string { - const start = this.offset - let end = start - // eslint-disable-next-line no-empty - while (this.buffer[end++] !== 0) {} - this.offset = end - return this.buffer.toString(this.encoding, start, end - 1) - } - - public bytes(length: number): Buffer { - const result = this.buffer.slice(this.offset, this.offset + length) - this.offset += length - return result - } -} diff --git a/node_modules/pg-protocol/src/buffer-writer.ts b/node_modules/pg-protocol/src/buffer-writer.ts deleted file mode 100644 index cebb0d9..0000000 --- a/node_modules/pg-protocol/src/buffer-writer.ts +++ /dev/null @@ -1,85 +0,0 @@ -//binary data writer tuned for encoding binary specific to the postgres binary protocol - -export class Writer { - private buffer: Buffer - private offset: number = 5 - private headerPosition: number = 0 - constructor(private size = 256) { - this.buffer = Buffer.allocUnsafe(size) - } - - private ensure(size: number): void { - const remaining = this.buffer.length - this.offset - if (remaining < size) { - const oldBuffer = this.buffer - // exponential growth factor of around ~ 1.5 - // https://stackoverflow.com/questions/2269063/buffer-growth-strategy - const newSize = oldBuffer.length + (oldBuffer.length >> 1) + size - this.buffer = Buffer.allocUnsafe(newSize) - oldBuffer.copy(this.buffer) - } - } - - public addInt32(num: number): Writer { - this.ensure(4) - this.buffer[this.offset++] = (num >>> 24) & 0xff - this.buffer[this.offset++] = (num >>> 16) & 0xff - this.buffer[this.offset++] = (num >>> 8) & 0xff - this.buffer[this.offset++] = (num >>> 0) & 0xff - return this - } - - public addInt16(num: number): Writer { - this.ensure(2) - this.buffer[this.offset++] = (num >>> 8) & 0xff - this.buffer[this.offset++] = (num >>> 0) & 0xff - return this - } - - public addCString(string: string): Writer { - if (!string) { - this.ensure(1) - } else { - const len = Buffer.byteLength(string) - this.ensure(len + 1) // +1 for null terminator - this.buffer.write(string, this.offset, 'utf-8') - this.offset += len - } - - this.buffer[this.offset++] = 0 // null terminator - return this - } - - public addString(string: string = ''): Writer { - const len = Buffer.byteLength(string) - this.ensure(len) - this.buffer.write(string, this.offset) - this.offset += len - return this - } - - public add(otherBuffer: Buffer): Writer { - this.ensure(otherBuffer.length) - otherBuffer.copy(this.buffer, this.offset) - this.offset += otherBuffer.length - return this - } - - private join(code?: number): Buffer { - if (code) { - this.buffer[this.headerPosition] = code - //length is everything in this packet minus the code - const length = this.offset - (this.headerPosition + 1) - this.buffer.writeInt32BE(length, this.headerPosition + 1) - } - return this.buffer.slice(code ? 0 : 5, this.offset) - } - - public flush(code?: number): Buffer { - const result = this.join(code) - this.offset = 5 - this.headerPosition = 0 - this.buffer = Buffer.allocUnsafe(this.size) - return result - } -} diff --git a/node_modules/pg-protocol/src/inbound-parser.test.ts b/node_modules/pg-protocol/src/inbound-parser.test.ts deleted file mode 100644 index 285f4bf..0000000 --- a/node_modules/pg-protocol/src/inbound-parser.test.ts +++ /dev/null @@ -1,575 +0,0 @@ -import buffers from './testing/test-buffers' -import BufferList from './testing/buffer-list' -import { parse } from '.' -import assert from 'assert' -import { PassThrough } from 'stream' -import { BackendMessage } from './messages' -import { Parser } from './parser' - -const authOkBuffer = buffers.authenticationOk() -const paramStatusBuffer = buffers.parameterStatus('client_encoding', 'UTF8') -const readyForQueryBuffer = buffers.readyForQuery() -const backendKeyDataBuffer = buffers.backendKeyData(1, 2) -const commandCompleteBuffer = buffers.commandComplete('SELECT 3') -const parseCompleteBuffer = buffers.parseComplete() -const bindCompleteBuffer = buffers.bindComplete() -const portalSuspendedBuffer = buffers.portalSuspended() - -const row1 = { - name: 'id', - tableID: 1, - attributeNumber: 2, - dataTypeID: 3, - dataTypeSize: 4, - typeModifier: 5, - formatCode: 0, -} -const oneRowDescBuff = buffers.rowDescription([row1]) -row1.name = 'bang' - -const twoRowBuf = buffers.rowDescription([ - row1, - { - name: 'whoah', - tableID: 10, - attributeNumber: 11, - dataTypeID: 12, - dataTypeSize: 13, - typeModifier: 14, - formatCode: 0, - }, -]) - -const rowWithBigOids = { - name: 'bigoid', - tableID: 3000000001, - attributeNumber: 2, - dataTypeID: 3000000003, - dataTypeSize: 4, - typeModifier: 5, - formatCode: 0, -} -const bigOidDescBuff = buffers.rowDescription([rowWithBigOids]) - -const emptyRowFieldBuf = buffers.dataRow([]) - -const oneFieldBuf = buffers.dataRow(['test']) - -const expectedAuthenticationOkayMessage = { - name: 'authenticationOk', - length: 8, -} - -const expectedParameterStatusMessage = { - name: 'parameterStatus', - parameterName: 'client_encoding', - parameterValue: 'UTF8', - length: 25, -} - -const expectedBackendKeyDataMessage = { - name: 'backendKeyData', - processID: 1, - secretKey: 2, -} - -const expectedReadyForQueryMessage = { - name: 'readyForQuery', - length: 5, - status: 'I', -} - -const expectedCommandCompleteMessage = { - name: 'commandComplete', - length: 13, - text: 'SELECT 3', -} -const emptyRowDescriptionBuffer = new BufferList() - .addInt16(0) // number of fields - .join(true, 'T') - -const expectedEmptyRowDescriptionMessage = { - name: 'rowDescription', - length: 6, - fieldCount: 0, - fields: [], -} -const expectedOneRowMessage = { - name: 'rowDescription', - length: 27, - fieldCount: 1, - fields: [ - { - name: 'id', - tableID: 1, - columnID: 2, - dataTypeID: 3, - dataTypeSize: 4, - dataTypeModifier: 5, - format: 'text', - }, - ], -} - -const expectedTwoRowMessage = { - name: 'rowDescription', - length: 53, - fieldCount: 2, - fields: [ - { - name: 'bang', - tableID: 1, - columnID: 2, - dataTypeID: 3, - dataTypeSize: 4, - dataTypeModifier: 5, - format: 'text', - }, - { - name: 'whoah', - tableID: 10, - columnID: 11, - dataTypeID: 12, - dataTypeSize: 13, - dataTypeModifier: 14, - format: 'text', - }, - ], -} -const expectedBigOidMessage = { - name: 'rowDescription', - length: 31, - fieldCount: 1, - fields: [ - { - name: 'bigoid', - tableID: 3000000001, - columnID: 2, - dataTypeID: 3000000003, - dataTypeSize: 4, - dataTypeModifier: 5, - format: 'text', - }, - ], -} - -const emptyParameterDescriptionBuffer = new BufferList() - .addInt16(0) // number of parameters - .join(true, 't') - -const oneParameterDescBuf = buffers.parameterDescription([1111]) - -const twoParameterDescBuf = buffers.parameterDescription([2222, 3333]) - -const expectedEmptyParameterDescriptionMessage = { - name: 'parameterDescription', - length: 6, - parameterCount: 0, - dataTypeIDs: [], -} - -const expectedOneParameterMessage = { - name: 'parameterDescription', - length: 10, - parameterCount: 1, - dataTypeIDs: [1111], -} - -const expectedTwoParameterMessage = { - name: 'parameterDescription', - length: 14, - parameterCount: 2, - dataTypeIDs: [2222, 3333], -} - -const testForMessage = function (buffer: Buffer, expectedMessage: any) { - it('receives and parses ' + expectedMessage.name, async () => { - const messages = await parseBuffers([buffer]) - const [lastMessage] = messages - - for (const key in expectedMessage) { - assert.deepEqual((lastMessage as any)[key], expectedMessage[key]) - } - }) -} - -const plainPasswordBuffer = buffers.authenticationCleartextPassword() -const md5PasswordBuffer = buffers.authenticationMD5Password() -const SASLBuffer = buffers.authenticationSASL() -const SASLContinueBuffer = buffers.authenticationSASLContinue() -const SASLFinalBuffer = buffers.authenticationSASLFinal() - -const expectedPlainPasswordMessage = { - name: 'authenticationCleartextPassword', -} - -const expectedMD5PasswordMessage = { - name: 'authenticationMD5Password', - salt: Buffer.from([1, 2, 3, 4]), -} - -const expectedSASLMessage = { - name: 'authenticationSASL', - mechanisms: ['SCRAM-SHA-256'], -} - -const expectedSASLContinueMessage = { - name: 'authenticationSASLContinue', - data: 'data', -} - -const expectedSASLFinalMessage = { - name: 'authenticationSASLFinal', - data: 'data', -} - -const notificationResponseBuffer = buffers.notification(4, 'hi', 'boom') -const expectedNotificationResponseMessage = { - name: 'notification', - processId: 4, - channel: 'hi', - payload: 'boom', -} - -const parseBuffers = async (buffers: Buffer[]): Promise => { - const stream = new PassThrough() - for (const buffer of buffers) { - stream.write(buffer) - } - stream.end() - const msgs: BackendMessage[] = [] - await parse(stream, (msg) => msgs.push(msg)) - return msgs -} - -describe('PgPacketStream', function () { - testForMessage(authOkBuffer, expectedAuthenticationOkayMessage) - testForMessage(plainPasswordBuffer, expectedPlainPasswordMessage) - testForMessage(md5PasswordBuffer, expectedMD5PasswordMessage) - testForMessage(SASLBuffer, expectedSASLMessage) - testForMessage(SASLContinueBuffer, expectedSASLContinueMessage) - - // this exercises a found bug in the parser: - // https://github.com/brianc/node-postgres/pull/2210#issuecomment-627626084 - // and adds a test which is deterministic, rather than relying on network packet chunking - const extendedSASLContinueBuffer = Buffer.concat([SASLContinueBuffer, Buffer.from([1, 2, 3, 4])]) - testForMessage(extendedSASLContinueBuffer, expectedSASLContinueMessage) - - testForMessage(SASLFinalBuffer, expectedSASLFinalMessage) - - // this exercises a found bug in the parser: - // https://github.com/brianc/node-postgres/pull/2210#issuecomment-627626084 - // and adds a test which is deterministic, rather than relying on network packet chunking - const extendedSASLFinalBuffer = Buffer.concat([SASLFinalBuffer, Buffer.from([1, 2, 4, 5])]) - testForMessage(extendedSASLFinalBuffer, expectedSASLFinalMessage) - - testForMessage(paramStatusBuffer, expectedParameterStatusMessage) - testForMessage(backendKeyDataBuffer, expectedBackendKeyDataMessage) - testForMessage(readyForQueryBuffer, expectedReadyForQueryMessage) - testForMessage(commandCompleteBuffer, expectedCommandCompleteMessage) - testForMessage(notificationResponseBuffer, expectedNotificationResponseMessage) - testForMessage(buffers.emptyQuery(), { - name: 'emptyQuery', - length: 4, - }) - - testForMessage(Buffer.from([0x6e, 0, 0, 0, 4]), { - name: 'noData', - }) - - describe('rowDescription messages', function () { - testForMessage(emptyRowDescriptionBuffer, expectedEmptyRowDescriptionMessage) - testForMessage(oneRowDescBuff, expectedOneRowMessage) - testForMessage(twoRowBuf, expectedTwoRowMessage) - testForMessage(bigOidDescBuff, expectedBigOidMessage) - }) - - describe('parameterDescription messages', function () { - testForMessage(emptyParameterDescriptionBuffer, expectedEmptyParameterDescriptionMessage) - testForMessage(oneParameterDescBuf, expectedOneParameterMessage) - testForMessage(twoParameterDescBuf, expectedTwoParameterMessage) - }) - - describe('parsing rows', function () { - describe('parsing empty row', function () { - testForMessage(emptyRowFieldBuf, { - name: 'dataRow', - fieldCount: 0, - }) - }) - - describe('parsing data row with fields', function () { - testForMessage(oneFieldBuf, { - name: 'dataRow', - fieldCount: 1, - fields: ['test'], - }) - }) - }) - - describe('notice message', function () { - // this uses the same logic as error message - const buff = buffers.notice([{ type: 'C', value: 'code' }]) - testForMessage(buff, { - name: 'notice', - code: 'code', - }) - }) - - testForMessage(buffers.error([]), { - name: 'error', - }) - - describe('with all the fields', function () { - const buffer = buffers.error([ - { - type: 'S', - value: 'ERROR', - }, - { - type: 'C', - value: 'code', - }, - { - type: 'M', - value: 'message', - }, - { - type: 'D', - value: 'details', - }, - { - type: 'H', - value: 'hint', - }, - { - type: 'P', - value: '100', - }, - { - type: 'p', - value: '101', - }, - { - type: 'q', - value: 'query', - }, - { - type: 'W', - value: 'where', - }, - { - type: 'F', - value: 'file', - }, - { - type: 'L', - value: 'line', - }, - { - type: 'R', - value: 'routine', - }, - { - type: 'Z', // ignored - value: 'alsdkf', - }, - ]) - - testForMessage(buffer, { - name: 'error', - severity: 'ERROR', - code: 'code', - message: 'message', - detail: 'details', - hint: 'hint', - position: '100', - internalPosition: '101', - internalQuery: 'query', - where: 'where', - file: 'file', - line: 'line', - routine: 'routine', - }) - }) - - testForMessage(parseCompleteBuffer, { - name: 'parseComplete', - }) - - testForMessage(bindCompleteBuffer, { - name: 'bindComplete', - }) - - testForMessage(bindCompleteBuffer, { - name: 'bindComplete', - }) - - testForMessage(buffers.closeComplete(), { - name: 'closeComplete', - }) - - describe('parses portal suspended message', function () { - testForMessage(portalSuspendedBuffer, { - name: 'portalSuspended', - }) - }) - - describe('parses replication start message', function () { - testForMessage(Buffer.from([0x57, 0x00, 0x00, 0x00, 0x04]), { - name: 'replicationStart', - length: 4, - }) - }) - - describe('copy', () => { - testForMessage(buffers.copyIn(0), { - name: 'copyInResponse', - length: 7, - binary: false, - columnTypes: [], - }) - - testForMessage(buffers.copyIn(2), { - name: 'copyInResponse', - length: 11, - binary: false, - columnTypes: [0, 1], - }) - - testForMessage(buffers.copyOut(0), { - name: 'copyOutResponse', - length: 7, - binary: false, - columnTypes: [], - }) - - testForMessage(buffers.copyOut(3), { - name: 'copyOutResponse', - length: 13, - binary: false, - columnTypes: [0, 1, 2], - }) - - testForMessage(buffers.copyDone(), { - name: 'copyDone', - length: 4, - }) - - testForMessage(buffers.copyData(Buffer.from([5, 6, 7])), { - name: 'copyData', - length: 7, - chunk: Buffer.from([5, 6, 7]), - }) - }) - - // since the data message on a stream can randomly divide the incomming - // tcp packets anywhere, we need to make sure we can parse every single - // split on a tcp message - describe('split buffer, single message parsing', function () { - const fullBuffer = buffers.dataRow([null, 'bang', 'zug zug', null, '!']) - - it('parses when full buffer comes in', async function () { - const messages = await parseBuffers([fullBuffer]) - const message = messages[0] as any - assert.equal(message.fields.length, 5) - assert.equal(message.fields[0], null) - assert.equal(message.fields[1], 'bang') - assert.equal(message.fields[2], 'zug zug') - assert.equal(message.fields[3], null) - assert.equal(message.fields[4], '!') - }) - - const testMessageReceivedAfterSplitAt = async function (split: number) { - const firstBuffer = Buffer.alloc(fullBuffer.length - split) - const secondBuffer = Buffer.alloc(fullBuffer.length - firstBuffer.length) - fullBuffer.copy(firstBuffer, 0, 0) - fullBuffer.copy(secondBuffer, 0, firstBuffer.length) - const messages = await parseBuffers([firstBuffer, secondBuffer]) - const message = messages[0] as any - assert.equal(message.fields.length, 5) - assert.equal(message.fields[0], null) - assert.equal(message.fields[1], 'bang') - assert.equal(message.fields[2], 'zug zug') - assert.equal(message.fields[3], null) - assert.equal(message.fields[4], '!') - } - - it('parses when split in the middle', function () { - return testMessageReceivedAfterSplitAt(6) - }) - - it('parses when split at end', function () { - return testMessageReceivedAfterSplitAt(2) - }) - - it('parses when split at beginning', function () { - return Promise.all([ - testMessageReceivedAfterSplitAt(fullBuffer.length - 2), - testMessageReceivedAfterSplitAt(fullBuffer.length - 1), - testMessageReceivedAfterSplitAt(fullBuffer.length - 5), - ]) - }) - }) - - describe('split buffer, multiple message parsing', function () { - const dataRowBuffer = buffers.dataRow(['!']) - const readyForQueryBuffer = buffers.readyForQuery() - const fullBuffer = Buffer.alloc(dataRowBuffer.length + readyForQueryBuffer.length) - dataRowBuffer.copy(fullBuffer, 0, 0) - readyForQueryBuffer.copy(fullBuffer, dataRowBuffer.length, 0) - - const verifyMessages = function (messages: any[]) { - assert.strictEqual(messages.length, 2) - assert.deepEqual(messages[0], { - name: 'dataRow', - fieldCount: 1, - length: 11, - fields: ['!'], - }) - assert.equal(messages[0].fields[0], '!') - assert.deepEqual(messages[1], { - name: 'readyForQuery', - length: 5, - status: 'I', - }) - } - // sanity check - it('receives both messages when packet is not split', async function () { - const messages = await parseBuffers([fullBuffer]) - verifyMessages(messages) - }) - - const splitAndVerifyTwoMessages = async function (split: number) { - const firstBuffer = Buffer.alloc(fullBuffer.length - split) - const secondBuffer = Buffer.alloc(fullBuffer.length - firstBuffer.length) - fullBuffer.copy(firstBuffer, 0, 0) - fullBuffer.copy(secondBuffer, 0, firstBuffer.length) - const messages = await parseBuffers([firstBuffer, secondBuffer]) - verifyMessages(messages) - } - - describe('receives both messages when packet is split', function () { - it('in the middle', function () { - return splitAndVerifyTwoMessages(11) - }) - it('at the front', function () { - return Promise.all([ - splitAndVerifyTwoMessages(fullBuffer.length - 1), - splitAndVerifyTwoMessages(fullBuffer.length - 4), - splitAndVerifyTwoMessages(fullBuffer.length - 6), - ]) - }) - - it('at the end', function () { - return Promise.all([splitAndVerifyTwoMessages(8), splitAndVerifyTwoMessages(1)]) - }) - }) - }) - - it('cleans up the reader after handling a packet', function () { - const parser = new Parser() - parser.parse(oneFieldBuf, () => {}) - assert.strictEqual((parser as any).reader.buffer.byteLength, 0) - }) -}) diff --git a/node_modules/pg-protocol/src/index.ts b/node_modules/pg-protocol/src/index.ts deleted file mode 100644 index 703ff2e..0000000 --- a/node_modules/pg-protocol/src/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { DatabaseError } from './messages' -import { serialize } from './serializer' -import { Parser, MessageCallback } from './parser' - -export function parse(stream: NodeJS.ReadableStream, callback: MessageCallback): Promise { - const parser = new Parser() - stream.on('data', (buffer: Buffer) => parser.parse(buffer, callback)) - return new Promise((resolve) => stream.on('end', () => resolve())) -} - -export { serialize, DatabaseError } diff --git a/node_modules/pg-protocol/src/messages.ts b/node_modules/pg-protocol/src/messages.ts deleted file mode 100644 index c3fbbdd..0000000 --- a/node_modules/pg-protocol/src/messages.ts +++ /dev/null @@ -1,262 +0,0 @@ -export type Mode = 'text' | 'binary' - -export type MessageName = - | 'parseComplete' - | 'bindComplete' - | 'closeComplete' - | 'noData' - | 'portalSuspended' - | 'replicationStart' - | 'emptyQuery' - | 'copyDone' - | 'copyData' - | 'rowDescription' - | 'parameterDescription' - | 'parameterStatus' - | 'backendKeyData' - | 'notification' - | 'readyForQuery' - | 'commandComplete' - | 'dataRow' - | 'copyInResponse' - | 'copyOutResponse' - | 'authenticationOk' - | 'authenticationMD5Password' - | 'authenticationCleartextPassword' - | 'authenticationSASL' - | 'authenticationSASLContinue' - | 'authenticationSASLFinal' - | 'error' - | 'notice' - -export interface BackendMessage { - name: MessageName - length: number -} - -export const parseComplete: BackendMessage = { - name: 'parseComplete', - length: 5, -} - -export const bindComplete: BackendMessage = { - name: 'bindComplete', - length: 5, -} - -export const closeComplete: BackendMessage = { - name: 'closeComplete', - length: 5, -} - -export const noData: BackendMessage = { - name: 'noData', - length: 5, -} - -export const portalSuspended: BackendMessage = { - name: 'portalSuspended', - length: 5, -} - -export const replicationStart: BackendMessage = { - name: 'replicationStart', - length: 4, -} - -export const emptyQuery: BackendMessage = { - name: 'emptyQuery', - length: 4, -} - -export const copyDone: BackendMessage = { - name: 'copyDone', - length: 4, -} - -interface NoticeOrError { - message: string | undefined - severity: string | undefined - code: string | undefined - detail: string | undefined - hint: string | undefined - position: string | undefined - internalPosition: string | undefined - internalQuery: string | undefined - where: string | undefined - schema: string | undefined - table: string | undefined - column: string | undefined - dataType: string | undefined - constraint: string | undefined - file: string | undefined - line: string | undefined - routine: string | undefined -} - -export class DatabaseError extends Error implements NoticeOrError { - public severity: string | undefined - public code: string | undefined - public detail: string | undefined - public hint: string | undefined - public position: string | undefined - public internalPosition: string | undefined - public internalQuery: string | undefined - public where: string | undefined - public schema: string | undefined - public table: string | undefined - public column: string | undefined - public dataType: string | undefined - public constraint: string | undefined - public file: string | undefined - public line: string | undefined - public routine: string | undefined - constructor( - message: string, - public readonly length: number, - public readonly name: MessageName - ) { - super(message) - } -} - -export class CopyDataMessage { - public readonly name = 'copyData' - constructor( - public readonly length: number, - public readonly chunk: Buffer - ) {} -} - -export class CopyResponse { - public readonly columnTypes: number[] - constructor( - public readonly length: number, - public readonly name: MessageName, - public readonly binary: boolean, - columnCount: number - ) { - this.columnTypes = new Array(columnCount) - } -} - -export class Field { - constructor( - public readonly name: string, - public readonly tableID: number, - public readonly columnID: number, - public readonly dataTypeID: number, - public readonly dataTypeSize: number, - public readonly dataTypeModifier: number, - public readonly format: Mode - ) {} -} - -export class RowDescriptionMessage { - public readonly name: MessageName = 'rowDescription' - public readonly fields: Field[] - constructor( - public readonly length: number, - public readonly fieldCount: number - ) { - this.fields = new Array(this.fieldCount) - } -} - -export class ParameterDescriptionMessage { - public readonly name: MessageName = 'parameterDescription' - public readonly dataTypeIDs: number[] - constructor( - public readonly length: number, - public readonly parameterCount: number - ) { - this.dataTypeIDs = new Array(this.parameterCount) - } -} - -export class ParameterStatusMessage { - public readonly name: MessageName = 'parameterStatus' - constructor( - public readonly length: number, - public readonly parameterName: string, - public readonly parameterValue: string - ) {} -} - -export class AuthenticationMD5Password implements BackendMessage { - public readonly name: MessageName = 'authenticationMD5Password' - constructor( - public readonly length: number, - public readonly salt: Buffer - ) {} -} - -export class BackendKeyDataMessage { - public readonly name: MessageName = 'backendKeyData' - constructor( - public readonly length: number, - public readonly processID: number, - public readonly secretKey: number - ) {} -} - -export class NotificationResponseMessage { - public readonly name: MessageName = 'notification' - constructor( - public readonly length: number, - public readonly processId: number, - public readonly channel: string, - public readonly payload: string - ) {} -} - -export class ReadyForQueryMessage { - public readonly name: MessageName = 'readyForQuery' - constructor( - public readonly length: number, - public readonly status: string - ) {} -} - -export class CommandCompleteMessage { - public readonly name: MessageName = 'commandComplete' - constructor( - public readonly length: number, - public readonly text: string - ) {} -} - -export class DataRowMessage { - public readonly fieldCount: number - public readonly name: MessageName = 'dataRow' - constructor( - public length: number, - public fields: any[] - ) { - this.fieldCount = fields.length - } -} - -export class NoticeMessage implements BackendMessage, NoticeOrError { - constructor( - public readonly length: number, - public readonly message: string | undefined - ) {} - public readonly name = 'notice' - public severity: string | undefined - public code: string | undefined - public detail: string | undefined - public hint: string | undefined - public position: string | undefined - public internalPosition: string | undefined - public internalQuery: string | undefined - public where: string | undefined - public schema: string | undefined - public table: string | undefined - public column: string | undefined - public dataType: string | undefined - public constraint: string | undefined - public file: string | undefined - public line: string | undefined - public routine: string | undefined -} diff --git a/node_modules/pg-protocol/src/outbound-serializer.test.ts b/node_modules/pg-protocol/src/outbound-serializer.test.ts deleted file mode 100644 index 0d3e387..0000000 --- a/node_modules/pg-protocol/src/outbound-serializer.test.ts +++ /dev/null @@ -1,276 +0,0 @@ -import assert from 'assert' -import { serialize } from './serializer' -import BufferList from './testing/buffer-list' - -describe('serializer', () => { - it('builds startup message', function () { - const actual = serialize.startup({ - user: 'brian', - database: 'bang', - }) - assert.deepEqual( - actual, - new BufferList() - .addInt16(3) - .addInt16(0) - .addCString('user') - .addCString('brian') - .addCString('database') - .addCString('bang') - .addCString('client_encoding') - .addCString('UTF8') - .addCString('') - .join(true) - ) - }) - - it('builds password message', function () { - const actual = serialize.password('!') - assert.deepEqual(actual, new BufferList().addCString('!').join(true, 'p')) - }) - - it('builds request ssl message', function () { - const actual = serialize.requestSsl() - const expected = new BufferList().addInt32(80877103).join(true) - assert.deepEqual(actual, expected) - }) - - it('builds SASLInitialResponseMessage message', function () { - const actual = serialize.sendSASLInitialResponseMessage('mech', 'data') - assert.deepEqual(actual, new BufferList().addCString('mech').addInt32(4).addString('data').join(true, 'p')) - }) - - it('builds SCRAMClientFinalMessage message', function () { - const actual = serialize.sendSCRAMClientFinalMessage('data') - assert.deepEqual(actual, new BufferList().addString('data').join(true, 'p')) - }) - - it('builds query message', function () { - const txt = 'select * from boom' - const actual = serialize.query(txt) - assert.deepEqual(actual, new BufferList().addCString(txt).join(true, 'Q')) - }) - - describe('parse message', () => { - it('builds parse message', function () { - const actual = serialize.parse({ text: '!' }) - const expected = new BufferList().addCString('').addCString('!').addInt16(0).join(true, 'P') - assert.deepEqual(actual, expected) - }) - - it('builds parse message with named query', function () { - const actual = serialize.parse({ - name: 'boom', - text: 'select * from boom', - types: [], - }) - const expected = new BufferList().addCString('boom').addCString('select * from boom').addInt16(0).join(true, 'P') - assert.deepEqual(actual, expected) - }) - - it('with multiple parameters', function () { - const actual = serialize.parse({ - name: 'force', - text: 'select * from bang where name = $1', - types: [1, 2, 3, 4], - }) - const expected = new BufferList() - .addCString('force') - .addCString('select * from bang where name = $1') - .addInt16(4) - .addInt32(1) - .addInt32(2) - .addInt32(3) - .addInt32(4) - .join(true, 'P') - assert.deepEqual(actual, expected) - }) - }) - - describe('bind messages', function () { - it('with no values', function () { - const actual = serialize.bind() - - const expectedBuffer = new BufferList() - .addCString('') - .addCString('') - .addInt16(0) - .addInt16(0) - .addInt16(1) - .addInt16(0) - .join(true, 'B') - assert.deepEqual(actual, expectedBuffer) - }) - - it('with named statement, portal, and values', function () { - const actual = serialize.bind({ - portal: 'bang', - statement: 'woo', - values: ['1', 'hi', null, 'zing'], - }) - const expectedBuffer = new BufferList() - .addCString('bang') // portal name - .addCString('woo') // statement name - .addInt16(4) - .addInt16(0) - .addInt16(0) - .addInt16(0) - .addInt16(0) - .addInt16(4) - .addInt32(1) - .add(Buffer.from('1')) - .addInt32(2) - .add(Buffer.from('hi')) - .addInt32(-1) - .addInt32(4) - .add(Buffer.from('zing')) - .addInt16(1) - .addInt16(0) - .join(true, 'B') - assert.deepEqual(actual, expectedBuffer) - }) - }) - - it('with custom valueMapper', function () { - const actual = serialize.bind({ - portal: 'bang', - statement: 'woo', - values: ['1', 'hi', null, 'zing'], - valueMapper: () => null, - }) - const expectedBuffer = new BufferList() - .addCString('bang') // portal name - .addCString('woo') // statement name - .addInt16(4) - .addInt16(0) - .addInt16(0) - .addInt16(0) - .addInt16(0) - .addInt16(4) - .addInt32(-1) - .addInt32(-1) - .addInt32(-1) - .addInt32(-1) - .addInt16(1) - .addInt16(0) - .join(true, 'B') - assert.deepEqual(actual, expectedBuffer) - }) - - it('with named statement, portal, and buffer value', function () { - const actual = serialize.bind({ - portal: 'bang', - statement: 'woo', - values: ['1', 'hi', null, Buffer.from('zing', 'utf8')], - }) - const expectedBuffer = new BufferList() - .addCString('bang') // portal name - .addCString('woo') // statement name - .addInt16(4) // value count - .addInt16(0) // string - .addInt16(0) // string - .addInt16(0) // string - .addInt16(1) // binary - .addInt16(4) - .addInt32(1) - .add(Buffer.from('1')) - .addInt32(2) - .add(Buffer.from('hi')) - .addInt32(-1) - .addInt32(4) - .add(Buffer.from('zing', 'utf-8')) - .addInt16(1) - .addInt16(0) - .join(true, 'B') - assert.deepEqual(actual, expectedBuffer) - }) - - describe('builds execute message', function () { - it('for unamed portal with no row limit', function () { - const actual = serialize.execute() - const expectedBuffer = new BufferList().addCString('').addInt32(0).join(true, 'E') - assert.deepEqual(actual, expectedBuffer) - }) - - it('for named portal with row limit', function () { - const actual = serialize.execute({ - portal: 'my favorite portal', - rows: 100, - }) - const expectedBuffer = new BufferList().addCString('my favorite portal').addInt32(100).join(true, 'E') - assert.deepEqual(actual, expectedBuffer) - }) - }) - - it('builds flush command', function () { - const actual = serialize.flush() - const expected = new BufferList().join(true, 'H') - assert.deepEqual(actual, expected) - }) - - it('builds sync command', function () { - const actual = serialize.sync() - const expected = new BufferList().join(true, 'S') - assert.deepEqual(actual, expected) - }) - - it('builds end command', function () { - const actual = serialize.end() - const expected = Buffer.from([0x58, 0, 0, 0, 4]) - assert.deepEqual(actual, expected) - }) - - describe('builds describe command', function () { - it('describe statement', function () { - const actual = serialize.describe({ type: 'S', name: 'bang' }) - const expected = new BufferList().addChar('S').addCString('bang').join(true, 'D') - assert.deepEqual(actual, expected) - }) - - it('describe unnamed portal', function () { - const actual = serialize.describe({ type: 'P' }) - const expected = new BufferList().addChar('P').addCString('').join(true, 'D') - assert.deepEqual(actual, expected) - }) - }) - - describe('builds close command', function () { - it('describe statement', function () { - const actual = serialize.close({ type: 'S', name: 'bang' }) - const expected = new BufferList().addChar('S').addCString('bang').join(true, 'C') - assert.deepEqual(actual, expected) - }) - - it('describe unnamed portal', function () { - const actual = serialize.close({ type: 'P' }) - const expected = new BufferList().addChar('P').addCString('').join(true, 'C') - assert.deepEqual(actual, expected) - }) - }) - - describe('copy messages', function () { - it('builds copyFromChunk', () => { - const actual = serialize.copyData(Buffer.from([1, 2, 3])) - const expected = new BufferList().add(Buffer.from([1, 2, 3])).join(true, 'd') - assert.deepEqual(actual, expected) - }) - - it('builds copy fail', () => { - const actual = serialize.copyFail('err!') - const expected = new BufferList().addCString('err!').join(true, 'f') - assert.deepEqual(actual, expected) - }) - - it('builds copy done', () => { - const actual = serialize.copyDone() - const expected = new BufferList().join(true, 'c') - assert.deepEqual(actual, expected) - }) - }) - - it('builds cancel message', () => { - const actual = serialize.cancel(3, 4) - const expected = new BufferList().addInt16(1234).addInt16(5678).addInt32(3).addInt32(4).join(true) - assert.deepEqual(actual, expected) - }) -}) diff --git a/node_modules/pg-protocol/src/parser.ts b/node_modules/pg-protocol/src/parser.ts deleted file mode 100644 index 998077a..0000000 --- a/node_modules/pg-protocol/src/parser.ts +++ /dev/null @@ -1,413 +0,0 @@ -import { TransformOptions } from 'stream' -import { - Mode, - bindComplete, - parseComplete, - closeComplete, - noData, - portalSuspended, - copyDone, - replicationStart, - emptyQuery, - ReadyForQueryMessage, - CommandCompleteMessage, - CopyDataMessage, - CopyResponse, - NotificationResponseMessage, - RowDescriptionMessage, - ParameterDescriptionMessage, - Field, - DataRowMessage, - ParameterStatusMessage, - BackendKeyDataMessage, - DatabaseError, - BackendMessage, - MessageName, - AuthenticationMD5Password, - NoticeMessage, -} from './messages' -import { BufferReader } from './buffer-reader' - -// every message is prefixed with a single bye -const CODE_LENGTH = 1 -// every message has an int32 length which includes itself but does -// NOT include the code in the length -const LEN_LENGTH = 4 - -const HEADER_LENGTH = CODE_LENGTH + LEN_LENGTH - -// A placeholder for a `BackendMessage`’s length value that will be set after construction. -const LATEINIT_LENGTH = -1 - -export type Packet = { - code: number - packet: Buffer -} - -const emptyBuffer = Buffer.allocUnsafe(0) - -type StreamOptions = TransformOptions & { - mode: Mode -} - -const enum MessageCodes { - DataRow = 0x44, // D - ParseComplete = 0x31, // 1 - BindComplete = 0x32, // 2 - CloseComplete = 0x33, // 3 - CommandComplete = 0x43, // C - ReadyForQuery = 0x5a, // Z - NoData = 0x6e, // n - NotificationResponse = 0x41, // A - AuthenticationResponse = 0x52, // R - ParameterStatus = 0x53, // S - BackendKeyData = 0x4b, // K - ErrorMessage = 0x45, // E - NoticeMessage = 0x4e, // N - RowDescriptionMessage = 0x54, // T - ParameterDescriptionMessage = 0x74, // t - PortalSuspended = 0x73, // s - ReplicationStart = 0x57, // W - EmptyQuery = 0x49, // I - CopyIn = 0x47, // G - CopyOut = 0x48, // H - CopyDone = 0x63, // c - CopyData = 0x64, // d -} - -export type MessageCallback = (msg: BackendMessage) => void - -export class Parser { - private buffer: Buffer = emptyBuffer - private bufferLength: number = 0 - private bufferOffset: number = 0 - private reader = new BufferReader() - private mode: Mode - - constructor(opts?: StreamOptions) { - if (opts?.mode === 'binary') { - throw new Error('Binary mode not supported yet') - } - this.mode = opts?.mode || 'text' - } - - public parse(buffer: Buffer, callback: MessageCallback) { - this.mergeBuffer(buffer) - const bufferFullLength = this.bufferOffset + this.bufferLength - let offset = this.bufferOffset - while (offset + HEADER_LENGTH <= bufferFullLength) { - // code is 1 byte long - it identifies the message type - const code = this.buffer[offset] - // length is 1 Uint32BE - it is the length of the message EXCLUDING the code - const length = this.buffer.readUInt32BE(offset + CODE_LENGTH) - const fullMessageLength = CODE_LENGTH + length - if (fullMessageLength + offset <= bufferFullLength) { - const message = this.handlePacket(offset + HEADER_LENGTH, code, length, this.buffer) - callback(message) - offset += fullMessageLength - } else { - break - } - } - if (offset === bufferFullLength) { - // No more use for the buffer - this.buffer = emptyBuffer - this.bufferLength = 0 - this.bufferOffset = 0 - } else { - // Adjust the cursors of remainingBuffer - this.bufferLength = bufferFullLength - offset - this.bufferOffset = offset - } - } - - private mergeBuffer(buffer: Buffer): void { - if (this.bufferLength > 0) { - const newLength = this.bufferLength + buffer.byteLength - const newFullLength = newLength + this.bufferOffset - if (newFullLength > this.buffer.byteLength) { - // We can't concat the new buffer with the remaining one - let newBuffer: Buffer - if (newLength <= this.buffer.byteLength && this.bufferOffset >= this.bufferLength) { - // We can move the relevant part to the beginning of the buffer instead of allocating a new buffer - newBuffer = this.buffer - } else { - // Allocate a new larger buffer - let newBufferLength = this.buffer.byteLength * 2 - while (newLength >= newBufferLength) { - newBufferLength *= 2 - } - newBuffer = Buffer.allocUnsafe(newBufferLength) - } - // Move the remaining buffer to the new one - this.buffer.copy(newBuffer, 0, this.bufferOffset, this.bufferOffset + this.bufferLength) - this.buffer = newBuffer - this.bufferOffset = 0 - } - // Concat the new buffer with the remaining one - buffer.copy(this.buffer, this.bufferOffset + this.bufferLength) - this.bufferLength = newLength - } else { - this.buffer = buffer - this.bufferOffset = 0 - this.bufferLength = buffer.byteLength - } - } - - private handlePacket(offset: number, code: number, length: number, bytes: Buffer): BackendMessage { - const { reader } = this - - // NOTE: This undesirably retains the buffer in `this.reader` if the `parse*Message` calls below throw. However, those should only throw in the case of a protocol error, which normally results in the reader being discarded. - reader.setBuffer(offset, bytes) - - let message: BackendMessage - - switch (code) { - case MessageCodes.BindComplete: - message = bindComplete - break - case MessageCodes.ParseComplete: - message = parseComplete - break - case MessageCodes.CloseComplete: - message = closeComplete - break - case MessageCodes.NoData: - message = noData - break - case MessageCodes.PortalSuspended: - message = portalSuspended - break - case MessageCodes.CopyDone: - message = copyDone - break - case MessageCodes.ReplicationStart: - message = replicationStart - break - case MessageCodes.EmptyQuery: - message = emptyQuery - break - case MessageCodes.DataRow: - message = parseDataRowMessage(reader) - break - case MessageCodes.CommandComplete: - message = parseCommandCompleteMessage(reader) - break - case MessageCodes.ReadyForQuery: - message = parseReadyForQueryMessage(reader) - break - case MessageCodes.NotificationResponse: - message = parseNotificationMessage(reader) - break - case MessageCodes.AuthenticationResponse: - message = parseAuthenticationResponse(reader, length) - break - case MessageCodes.ParameterStatus: - message = parseParameterStatusMessage(reader) - break - case MessageCodes.BackendKeyData: - message = parseBackendKeyData(reader) - break - case MessageCodes.ErrorMessage: - message = parseErrorMessage(reader, 'error') - break - case MessageCodes.NoticeMessage: - message = parseErrorMessage(reader, 'notice') - break - case MessageCodes.RowDescriptionMessage: - message = parseRowDescriptionMessage(reader) - break - case MessageCodes.ParameterDescriptionMessage: - message = parseParameterDescriptionMessage(reader) - break - case MessageCodes.CopyIn: - message = parseCopyInMessage(reader) - break - case MessageCodes.CopyOut: - message = parseCopyOutMessage(reader) - break - case MessageCodes.CopyData: - message = parseCopyData(reader, length) - break - default: - return new DatabaseError('received invalid response: ' + code.toString(16), length, 'error') - } - - reader.setBuffer(0, emptyBuffer) - - message.length = length - return message - } -} - -const parseReadyForQueryMessage = (reader: BufferReader) => { - const status = reader.string(1) - return new ReadyForQueryMessage(LATEINIT_LENGTH, status) -} - -const parseCommandCompleteMessage = (reader: BufferReader) => { - const text = reader.cstring() - return new CommandCompleteMessage(LATEINIT_LENGTH, text) -} - -const parseCopyData = (reader: BufferReader, length: number) => { - const chunk = reader.bytes(length - 4) - return new CopyDataMessage(LATEINIT_LENGTH, chunk) -} - -const parseCopyInMessage = (reader: BufferReader) => parseCopyMessage(reader, 'copyInResponse') - -const parseCopyOutMessage = (reader: BufferReader) => parseCopyMessage(reader, 'copyOutResponse') - -const parseCopyMessage = (reader: BufferReader, messageName: MessageName) => { - const isBinary = reader.byte() !== 0 - const columnCount = reader.int16() - const message = new CopyResponse(LATEINIT_LENGTH, messageName, isBinary, columnCount) - for (let i = 0; i < columnCount; i++) { - message.columnTypes[i] = reader.int16() - } - return message -} - -const parseNotificationMessage = (reader: BufferReader) => { - const processId = reader.int32() - const channel = reader.cstring() - const payload = reader.cstring() - return new NotificationResponseMessage(LATEINIT_LENGTH, processId, channel, payload) -} - -const parseRowDescriptionMessage = (reader: BufferReader) => { - const fieldCount = reader.int16() - const message = new RowDescriptionMessage(LATEINIT_LENGTH, fieldCount) - for (let i = 0; i < fieldCount; i++) { - message.fields[i] = parseField(reader) - } - return message -} - -const parseField = (reader: BufferReader) => { - const name = reader.cstring() - const tableID = reader.uint32() - const columnID = reader.int16() - const dataTypeID = reader.uint32() - const dataTypeSize = reader.int16() - const dataTypeModifier = reader.int32() - const mode = reader.int16() === 0 ? 'text' : 'binary' - return new Field(name, tableID, columnID, dataTypeID, dataTypeSize, dataTypeModifier, mode) -} - -const parseParameterDescriptionMessage = (reader: BufferReader) => { - const parameterCount = reader.int16() - const message = new ParameterDescriptionMessage(LATEINIT_LENGTH, parameterCount) - for (let i = 0; i < parameterCount; i++) { - message.dataTypeIDs[i] = reader.int32() - } - return message -} - -const parseDataRowMessage = (reader: BufferReader) => { - const fieldCount = reader.int16() - const fields: any[] = new Array(fieldCount) - for (let i = 0; i < fieldCount; i++) { - const len = reader.int32() - // a -1 for length means the value of the field is null - fields[i] = len === -1 ? null : reader.string(len) - } - return new DataRowMessage(LATEINIT_LENGTH, fields) -} - -const parseParameterStatusMessage = (reader: BufferReader) => { - const name = reader.cstring() - const value = reader.cstring() - return new ParameterStatusMessage(LATEINIT_LENGTH, name, value) -} - -const parseBackendKeyData = (reader: BufferReader) => { - const processID = reader.int32() - const secretKey = reader.int32() - return new BackendKeyDataMessage(LATEINIT_LENGTH, processID, secretKey) -} - -const parseAuthenticationResponse = (reader: BufferReader, length: number) => { - const code = reader.int32() - // TODO(bmc): maybe better types here - const message: BackendMessage & any = { - name: 'authenticationOk', - length, - } - - switch (code) { - case 0: // AuthenticationOk - break - case 3: // AuthenticationCleartextPassword - if (message.length === 8) { - message.name = 'authenticationCleartextPassword' - } - break - case 5: // AuthenticationMD5Password - if (message.length === 12) { - message.name = 'authenticationMD5Password' - const salt = reader.bytes(4) - return new AuthenticationMD5Password(LATEINIT_LENGTH, salt) - } - break - case 10: // AuthenticationSASL - { - message.name = 'authenticationSASL' - message.mechanisms = [] - let mechanism: string - do { - mechanism = reader.cstring() - if (mechanism) { - message.mechanisms.push(mechanism) - } - } while (mechanism) - } - break - case 11: // AuthenticationSASLContinue - message.name = 'authenticationSASLContinue' - message.data = reader.string(length - 8) - break - case 12: // AuthenticationSASLFinal - message.name = 'authenticationSASLFinal' - message.data = reader.string(length - 8) - break - default: - throw new Error('Unknown authenticationOk message type ' + code) - } - return message -} - -const parseErrorMessage = (reader: BufferReader, name: MessageName) => { - const fields: Record = {} - let fieldType = reader.string(1) - while (fieldType !== '\0') { - fields[fieldType] = reader.cstring() - fieldType = reader.string(1) - } - - const messageValue = fields.M - - const message = - name === 'notice' - ? new NoticeMessage(LATEINIT_LENGTH, messageValue) - : new DatabaseError(messageValue, LATEINIT_LENGTH, name) - - message.severity = fields.S - message.code = fields.C - message.detail = fields.D - message.hint = fields.H - message.position = fields.P - message.internalPosition = fields.p - message.internalQuery = fields.q - message.where = fields.W - message.schema = fields.s - message.table = fields.t - message.column = fields.c - message.dataType = fields.d - message.constraint = fields.n - message.file = fields.F - message.line = fields.L - message.routine = fields.R - return message -} diff --git a/node_modules/pg-protocol/src/serializer.ts b/node_modules/pg-protocol/src/serializer.ts deleted file mode 100644 index bb0441f..0000000 --- a/node_modules/pg-protocol/src/serializer.ts +++ /dev/null @@ -1,274 +0,0 @@ -import { Writer } from './buffer-writer' - -const enum code { - startup = 0x70, - query = 0x51, - parse = 0x50, - bind = 0x42, - execute = 0x45, - flush = 0x48, - sync = 0x53, - end = 0x58, - close = 0x43, - describe = 0x44, - copyFromChunk = 0x64, - copyDone = 0x63, - copyFail = 0x66, -} - -const writer = new Writer() - -const startup = (opts: Record): Buffer => { - // protocol version - writer.addInt16(3).addInt16(0) - for (const key of Object.keys(opts)) { - writer.addCString(key).addCString(opts[key]) - } - - writer.addCString('client_encoding').addCString('UTF8') - - const bodyBuffer = writer.addCString('').flush() - // this message is sent without a code - - const length = bodyBuffer.length + 4 - - return new Writer().addInt32(length).add(bodyBuffer).flush() -} - -const requestSsl = (): Buffer => { - const response = Buffer.allocUnsafe(8) - response.writeInt32BE(8, 0) - response.writeInt32BE(80877103, 4) - return response -} - -const password = (password: string): Buffer => { - return writer.addCString(password).flush(code.startup) -} - -const sendSASLInitialResponseMessage = function (mechanism: string, initialResponse: string): Buffer { - // 0x70 = 'p' - writer.addCString(mechanism).addInt32(Buffer.byteLength(initialResponse)).addString(initialResponse) - - return writer.flush(code.startup) -} - -const sendSCRAMClientFinalMessage = function (additionalData: string): Buffer { - return writer.addString(additionalData).flush(code.startup) -} - -const query = (text: string): Buffer => { - return writer.addCString(text).flush(code.query) -} - -type ParseOpts = { - name?: string - types?: number[] - text: string -} - -const emptyArray: any[] = [] - -const parse = (query: ParseOpts): Buffer => { - // expect something like this: - // { name: 'queryName', - // text: 'select * from blah', - // types: ['int8', 'bool'] } - - // normalize missing query names to allow for null - const name = query.name || '' - if (name.length > 63) { - console.error('Warning! Postgres only supports 63 characters for query names.') - console.error('You supplied %s (%s)', name, name.length) - console.error('This can cause conflicts and silent errors executing queries') - } - - const types = query.types || emptyArray - - const len = types.length - - const buffer = writer - .addCString(name) // name of query - .addCString(query.text) // actual query text - .addInt16(len) - - for (let i = 0; i < len; i++) { - buffer.addInt32(types[i]) - } - - return writer.flush(code.parse) -} - -type ValueMapper = (param: any, index: number) => any - -type BindOpts = { - portal?: string - binary?: boolean - statement?: string - values?: any[] - // optional map from JS value to postgres value per parameter - valueMapper?: ValueMapper -} - -const paramWriter = new Writer() - -// make this a const enum so typescript will inline the value -const enum ParamType { - STRING = 0, - BINARY = 1, -} - -const writeValues = function (values: any[], valueMapper?: ValueMapper): void { - for (let i = 0; i < values.length; i++) { - const mappedVal = valueMapper ? valueMapper(values[i], i) : values[i] - if (mappedVal == null) { - // add the param type (string) to the writer - writer.addInt16(ParamType.STRING) - // write -1 to the param writer to indicate null - paramWriter.addInt32(-1) - } else if (mappedVal instanceof Buffer) { - // add the param type (binary) to the writer - writer.addInt16(ParamType.BINARY) - // add the buffer to the param writer - paramWriter.addInt32(mappedVal.length) - paramWriter.add(mappedVal) - } else { - // add the param type (string) to the writer - writer.addInt16(ParamType.STRING) - paramWriter.addInt32(Buffer.byteLength(mappedVal)) - paramWriter.addString(mappedVal) - } - } -} - -const bind = (config: BindOpts = {}): Buffer => { - // normalize config - const portal = config.portal || '' - const statement = config.statement || '' - const binary = config.binary || false - const values = config.values || emptyArray - const len = values.length - - writer.addCString(portal).addCString(statement) - writer.addInt16(len) - - writeValues(values, config.valueMapper) - - writer.addInt16(len) - writer.add(paramWriter.flush()) - - // all results use the same format code - writer.addInt16(1) - // format code - writer.addInt16(binary ? ParamType.BINARY : ParamType.STRING) - return writer.flush(code.bind) -} - -type ExecOpts = { - portal?: string - rows?: number -} - -const emptyExecute = Buffer.from([code.execute, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00]) - -const execute = (config?: ExecOpts): Buffer => { - // this is the happy path for most queries - if (!config || (!config.portal && !config.rows)) { - return emptyExecute - } - - const portal = config.portal || '' - const rows = config.rows || 0 - - const portalLength = Buffer.byteLength(portal) - const len = 4 + portalLength + 1 + 4 - // one extra bit for code - const buff = Buffer.allocUnsafe(1 + len) - buff[0] = code.execute - buff.writeInt32BE(len, 1) - buff.write(portal, 5, 'utf-8') - buff[portalLength + 5] = 0 // null terminate portal cString - buff.writeUInt32BE(rows, buff.length - 4) - return buff -} - -const cancel = (processID: number, secretKey: number): Buffer => { - const buffer = Buffer.allocUnsafe(16) - buffer.writeInt32BE(16, 0) - buffer.writeInt16BE(1234, 4) - buffer.writeInt16BE(5678, 6) - buffer.writeInt32BE(processID, 8) - buffer.writeInt32BE(secretKey, 12) - return buffer -} - -type PortalOpts = { - type: 'S' | 'P' - name?: string -} - -const cstringMessage = (code: code, string: string): Buffer => { - const stringLen = Buffer.byteLength(string) - const len = 4 + stringLen + 1 - // one extra bit for code - const buffer = Buffer.allocUnsafe(1 + len) - buffer[0] = code - buffer.writeInt32BE(len, 1) - buffer.write(string, 5, 'utf-8') - buffer[len] = 0 // null terminate cString - return buffer -} - -const emptyDescribePortal = writer.addCString('P').flush(code.describe) -const emptyDescribeStatement = writer.addCString('S').flush(code.describe) - -const describe = (msg: PortalOpts): Buffer => { - return msg.name - ? cstringMessage(code.describe, `${msg.type}${msg.name || ''}`) - : msg.type === 'P' - ? emptyDescribePortal - : emptyDescribeStatement -} - -const close = (msg: PortalOpts): Buffer => { - const text = `${msg.type}${msg.name || ''}` - return cstringMessage(code.close, text) -} - -const copyData = (chunk: Buffer): Buffer => { - return writer.add(chunk).flush(code.copyFromChunk) -} - -const copyFail = (message: string): Buffer => { - return cstringMessage(code.copyFail, message) -} - -const codeOnlyBuffer = (code: code): Buffer => Buffer.from([code, 0x00, 0x00, 0x00, 0x04]) - -const flushBuffer = codeOnlyBuffer(code.flush) -const syncBuffer = codeOnlyBuffer(code.sync) -const endBuffer = codeOnlyBuffer(code.end) -const copyDoneBuffer = codeOnlyBuffer(code.copyDone) - -const serialize = { - startup, - password, - requestSsl, - sendSASLInitialResponseMessage, - sendSCRAMClientFinalMessage, - query, - parse, - bind, - execute, - describe, - close, - flush: () => flushBuffer, - sync: () => syncBuffer, - end: () => endBuffer, - copyData, - copyDone: () => copyDoneBuffer, - copyFail, - cancel, -} - -export { serialize } diff --git a/node_modules/pg-protocol/src/testing/buffer-list.ts b/node_modules/pg-protocol/src/testing/buffer-list.ts deleted file mode 100644 index bef75d4..0000000 --- a/node_modules/pg-protocol/src/testing/buffer-list.ts +++ /dev/null @@ -1,67 +0,0 @@ -export default class BufferList { - constructor(public buffers: Buffer[] = []) {} - - public add(buffer: Buffer, front?: boolean) { - this.buffers[front ? 'unshift' : 'push'](buffer) - return this - } - - public addInt16(val: number, front?: boolean) { - return this.add(Buffer.from([val >>> 8, val >>> 0]), front) - } - - public getByteLength() { - return this.buffers.reduce(function (previous, current) { - return previous + current.length - }, 0) - } - - public addInt32(val: number, first?: boolean) { - return this.add( - Buffer.from([(val >>> 24) & 0xff, (val >>> 16) & 0xff, (val >>> 8) & 0xff, (val >>> 0) & 0xff]), - first - ) - } - - public addCString(val: string, front?: boolean) { - const len = Buffer.byteLength(val) - const buffer = Buffer.alloc(len + 1) - buffer.write(val) - buffer[len] = 0 - return this.add(buffer, front) - } - - public addString(val: string, front?: boolean) { - const len = Buffer.byteLength(val) - const buffer = Buffer.alloc(len) - buffer.write(val) - return this.add(buffer, front) - } - - public addChar(char: string, first?: boolean) { - return this.add(Buffer.from(char, 'utf8'), first) - } - - public addByte(byte: number) { - return this.add(Buffer.from([byte])) - } - - public join(appendLength?: boolean, char?: string): Buffer { - let length = this.getByteLength() - if (appendLength) { - this.addInt32(length + 4, true) - return this.join(false, char) - } - if (char) { - this.addChar(char, true) - length++ - } - const result = Buffer.alloc(length) - let index = 0 - this.buffers.forEach(function (buffer) { - buffer.copy(result, index, 0) - index += buffer.length - }) - return result - } -} diff --git a/node_modules/pg-protocol/src/testing/test-buffers.ts b/node_modules/pg-protocol/src/testing/test-buffers.ts deleted file mode 100644 index 1f0d71f..0000000 --- a/node_modules/pg-protocol/src/testing/test-buffers.ts +++ /dev/null @@ -1,166 +0,0 @@ -// https://www.postgresql.org/docs/current/protocol-message-formats.html -import BufferList from './buffer-list' - -const buffers = { - readyForQuery: function () { - return new BufferList().add(Buffer.from('I')).join(true, 'Z') - }, - - authenticationOk: function () { - return new BufferList().addInt32(0).join(true, 'R') - }, - - authenticationCleartextPassword: function () { - return new BufferList().addInt32(3).join(true, 'R') - }, - - authenticationMD5Password: function () { - return new BufferList() - .addInt32(5) - .add(Buffer.from([1, 2, 3, 4])) - .join(true, 'R') - }, - - authenticationSASL: function () { - return new BufferList().addInt32(10).addCString('SCRAM-SHA-256').addCString('').join(true, 'R') - }, - - authenticationSASLContinue: function () { - return new BufferList().addInt32(11).addString('data').join(true, 'R') - }, - - authenticationSASLFinal: function () { - return new BufferList().addInt32(12).addString('data').join(true, 'R') - }, - - parameterStatus: function (name: string, value: string) { - return new BufferList().addCString(name).addCString(value).join(true, 'S') - }, - - backendKeyData: function (processID: number, secretKey: number) { - return new BufferList().addInt32(processID).addInt32(secretKey).join(true, 'K') - }, - - commandComplete: function (string: string) { - return new BufferList().addCString(string).join(true, 'C') - }, - - rowDescription: function (fields: any[]) { - fields = fields || [] - const buf = new BufferList() - buf.addInt16(fields.length) - fields.forEach(function (field) { - buf - .addCString(field.name) - .addInt32(field.tableID || 0) - .addInt16(field.attributeNumber || 0) - .addInt32(field.dataTypeID || 0) - .addInt16(field.dataTypeSize || 0) - .addInt32(field.typeModifier || 0) - .addInt16(field.formatCode || 0) - }) - return buf.join(true, 'T') - }, - - parameterDescription: function (dataTypeIDs: number[]) { - dataTypeIDs = dataTypeIDs || [] - const buf = new BufferList() - buf.addInt16(dataTypeIDs.length) - dataTypeIDs.forEach(function (dataTypeID) { - buf.addInt32(dataTypeID) - }) - return buf.join(true, 't') - }, - - dataRow: function (columns: any[]) { - columns = columns || [] - const buf = new BufferList() - buf.addInt16(columns.length) - columns.forEach(function (col) { - if (col == null) { - buf.addInt32(-1) - } else { - const strBuf = Buffer.from(col, 'utf8') - buf.addInt32(strBuf.length) - buf.add(strBuf) - } - }) - return buf.join(true, 'D') - }, - - error: function (fields: any) { - return buffers.errorOrNotice(fields).join(true, 'E') - }, - - notice: function (fields: any) { - return buffers.errorOrNotice(fields).join(true, 'N') - }, - - errorOrNotice: function (fields: any) { - fields = fields || [] - const buf = new BufferList() - fields.forEach(function (field: any) { - buf.addChar(field.type) - buf.addCString(field.value) - }) - return buf.add(Buffer.from([0])) // terminator - }, - - parseComplete: function () { - return new BufferList().join(true, '1') - }, - - bindComplete: function () { - return new BufferList().join(true, '2') - }, - - notification: function (id: number, channel: string, payload: string) { - return new BufferList().addInt32(id).addCString(channel).addCString(payload).join(true, 'A') - }, - - emptyQuery: function () { - return new BufferList().join(true, 'I') - }, - - portalSuspended: function () { - return new BufferList().join(true, 's') - }, - - closeComplete: function () { - return new BufferList().join(true, '3') - }, - - copyIn: function (cols: number) { - const list = new BufferList() - // text mode - .addByte(0) - // column count - .addInt16(cols) - for (let i = 0; i < cols; i++) { - list.addInt16(i) - } - return list.join(true, 'G') - }, - - copyOut: function (cols: number) { - const list = new BufferList() - // text mode - .addByte(0) - // column count - .addInt16(cols) - for (let i = 0; i < cols; i++) { - list.addInt16(i) - } - return list.join(true, 'H') - }, - - copyData: function (bytes: Buffer) { - return new BufferList().add(bytes).join(true, 'd') - }, - - copyDone: function () { - return new BufferList().join(true, 'c') - }, -} - -export default buffers diff --git a/node_modules/pg-protocol/src/types/chunky.d.ts b/node_modules/pg-protocol/src/types/chunky.d.ts deleted file mode 100644 index 7389bda..0000000 --- a/node_modules/pg-protocol/src/types/chunky.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare module 'chunky' diff --git a/node_modules/pg-types/.travis.yml b/node_modules/pg-types/.travis.yml deleted file mode 100644 index dd6b033..0000000 --- a/node_modules/pg-types/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -node_js: - - '4' - - 'lts/*' - - 'node' -env: - - PGUSER=postgres diff --git a/node_modules/pg-types/Makefile b/node_modules/pg-types/Makefile deleted file mode 100644 index d7ec83d..0000000 --- a/node_modules/pg-types/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -.PHONY: publish-patch test - -test: - npm test - -patch: test - npm version patch -m "Bump version" - git push origin master --tags - npm publish - -minor: test - npm version minor -m "Bump version" - git push origin master --tags - npm publish diff --git a/node_modules/pg-types/README.md b/node_modules/pg-types/README.md deleted file mode 100644 index 54a3f2c..0000000 --- a/node_modules/pg-types/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# pg-types - -This is the code that turns all the raw text from postgres into JavaScript types for [node-postgres](https://github.com/brianc/node-postgres.git) - -## use - -This module is consumed and exported from the root `pg` object of node-postgres. To access it, do the following: - -```js -var types = require('pg').types -``` - -Generally what you'll want to do is override how a specific data-type is parsed and turned into a JavaScript type. By default the PostgreSQL backend server returns everything as strings. Every data type corresponds to a unique `OID` within the server, and these `OIDs` are sent back with the query response. So, you need to match a particluar `OID` to a function you'd like to use to take the raw text input and produce a valid JavaScript object as a result. `null` values are never parsed. - -Let's do something I commonly like to do on projects: return 64-bit integers `(int8)` as JavaScript integers. Because JavaScript doesn't have support for 64-bit integers node-postgres cannot confidently parse `int8` data type results as numbers because if you have a _huge_ number it will overflow and the result you'd get back from node-postgres would not be the result in the datbase. That would be a __very bad thing__ so node-postgres just returns `int8` results as strings and leaves the parsing up to you. Let's say that you know you don't and wont ever have numbers greater than `int4` in your database, but you're tired of recieving results from the `COUNT(*)` function as strings (because that function returns `int8`). You would do this: - -```js -var types = require('pg').types -types.setTypeParser(20, function(val) { - return parseInt(val) -}) -``` - -__boom__: now you get numbers instead of strings. - -Just as another example -- not saying this is a good idea -- let's say you want to return all dates from your database as [moment](http://momentjs.com/docs/) objects. Okay, do this: - -```js -var types = require('pg').types -var moment = require('moment') -var parseFn = function(val) { - return val === null ? null : moment(val) -} -types.setTypeParser(types.builtins.TIMESTAMPTZ, parseFn) -types.setTypeParser(types.builtins.TIMESTAMP, parseFn) -``` -_note: I've never done that with my dates, and I'm not 100% sure moment can parse all the date strings returned from postgres. It's just an example!_ - -If you're thinking "gee, this seems pretty handy, but how can I get a list of all the OIDs in the database and what they correspond to?!?!?!" worry not: - -```bash -$ psql -c "select typname, oid, typarray from pg_type order by oid" -``` - -If you want to find out the OID of a specific type: - -```bash -$ psql -c "select typname, oid, typarray from pg_type where typname = 'daterange' order by oid" -``` - -:smile: - -## license - -The MIT License (MIT) - -Copyright (c) 2014 Brian M. Carlson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/pg-types/index.d.ts b/node_modules/pg-types/index.d.ts deleted file mode 100644 index 4bebcbe..0000000 --- a/node_modules/pg-types/index.d.ts +++ /dev/null @@ -1,137 +0,0 @@ -export enum TypeId { - BOOL = 16, - BYTEA = 17, - CHAR = 18, - INT8 = 20, - INT2 = 21, - INT4 = 23, - REGPROC = 24, - TEXT = 25, - OID = 26, - TID = 27, - XID = 28, - CID = 29, - JSON = 114, - XML = 142, - PG_NODE_TREE = 194, - SMGR = 210, - PATH = 602, - POLYGON = 604, - CIDR = 650, - FLOAT4 = 700, - FLOAT8 = 701, - ABSTIME = 702, - RELTIME = 703, - TINTERVAL = 704, - CIRCLE = 718, - MACADDR8 = 774, - MONEY = 790, - MACADDR = 829, - INET = 869, - ACLITEM = 1033, - BPCHAR = 1042, - VARCHAR = 1043, - DATE = 1082, - TIME = 1083, - TIMESTAMP = 1114, - TIMESTAMPTZ = 1184, - INTERVAL = 1186, - TIMETZ = 1266, - BIT = 1560, - VARBIT = 1562, - NUMERIC = 1700, - REFCURSOR = 1790, - REGPROCEDURE = 2202, - REGOPER = 2203, - REGOPERATOR = 2204, - REGCLASS = 2205, - REGTYPE = 2206, - UUID = 2950, - TXID_SNAPSHOT = 2970, - PG_LSN = 3220, - PG_NDISTINCT = 3361, - PG_DEPENDENCIES = 3402, - TSVECTOR = 3614, - TSQUERY = 3615, - GTSVECTOR = 3642, - REGCONFIG = 3734, - REGDICTIONARY = 3769, - JSONB = 3802, - REGNAMESPACE = 4089, - REGROLE = 4096 -} - -export type builtinsTypes = - 'BOOL' | - 'BYTEA' | - 'CHAR' | - 'INT8' | - 'INT2' | - 'INT4' | - 'REGPROC' | - 'TEXT' | - 'OID' | - 'TID' | - 'XID' | - 'CID' | - 'JSON' | - 'XML' | - 'PG_NODE_TREE' | - 'SMGR' | - 'PATH' | - 'POLYGON' | - 'CIDR' | - 'FLOAT4' | - 'FLOAT8' | - 'ABSTIME' | - 'RELTIME' | - 'TINTERVAL' | - 'CIRCLE' | - 'MACADDR8' | - 'MONEY' | - 'MACADDR' | - 'INET' | - 'ACLITEM' | - 'BPCHAR' | - 'VARCHAR' | - 'DATE' | - 'TIME' | - 'TIMESTAMP' | - 'TIMESTAMPTZ' | - 'INTERVAL' | - 'TIMETZ' | - 'BIT' | - 'VARBIT' | - 'NUMERIC' | - 'REFCURSOR' | - 'REGPROCEDURE' | - 'REGOPER' | - 'REGOPERATOR' | - 'REGCLASS' | - 'REGTYPE' | - 'UUID' | - 'TXID_SNAPSHOT' | - 'PG_LSN' | - 'PG_NDISTINCT' | - 'PG_DEPENDENCIES' | - 'TSVECTOR' | - 'TSQUERY' | - 'GTSVECTOR' | - 'REGCONFIG' | - 'REGDICTIONARY' | - 'JSONB' | - 'REGNAMESPACE' | - 'REGROLE'; - -export type TypesBuiltins = {[key in builtinsTypes]: TypeId}; - -export type TypeFormat = 'text' | 'binary'; - -export const builtins: TypesBuiltins; - -export function setTypeParser (id: TypeId, parseFn: ((value: string) => any)): void; -export function setTypeParser (id: TypeId, format: TypeFormat, parseFn: (value: string) => any): void; - -export const getTypeParser: (id: TypeId, format?: TypeFormat) => any - -export const arrayParser: (source: string, transform: (entry: any) => any) => any[]; diff --git a/node_modules/pg-types/index.js b/node_modules/pg-types/index.js deleted file mode 100644 index 952d8c2..0000000 --- a/node_modules/pg-types/index.js +++ /dev/null @@ -1,47 +0,0 @@ -var textParsers = require('./lib/textParsers'); -var binaryParsers = require('./lib/binaryParsers'); -var arrayParser = require('./lib/arrayParser'); -var builtinTypes = require('./lib/builtins'); - -exports.getTypeParser = getTypeParser; -exports.setTypeParser = setTypeParser; -exports.arrayParser = arrayParser; -exports.builtins = builtinTypes; - -var typeParsers = { - text: {}, - binary: {} -}; - -//the empty parse function -function noParse (val) { - return String(val); -}; - -//returns a function used to convert a specific type (specified by -//oid) into a result javascript type -//note: the oid can be obtained via the following sql query: -//SELECT oid FROM pg_type WHERE typname = 'TYPE_NAME_HERE'; -function getTypeParser (oid, format) { - format = format || 'text'; - if (!typeParsers[format]) { - return noParse; - } - return typeParsers[format][oid] || noParse; -}; - -function setTypeParser (oid, format, parseFn) { - if(typeof format == 'function') { - parseFn = format; - format = 'text'; - } - typeParsers[format][oid] = parseFn; -}; - -textParsers.init(function(oid, converter) { - typeParsers.text[oid] = converter; -}); - -binaryParsers.init(function(oid, converter) { - typeParsers.binary[oid] = converter; -}); diff --git a/node_modules/pg-types/index.test-d.ts b/node_modules/pg-types/index.test-d.ts deleted file mode 100644 index d530e6e..0000000 --- a/node_modules/pg-types/index.test-d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as types from '.'; -import { expectType } from 'tsd'; - -// builtins -expectType(types.builtins); - -// getTypeParser -const noParse = types.getTypeParser(types.builtins.NUMERIC, 'text'); -const numericParser = types.getTypeParser(types.builtins.NUMERIC, 'binary'); -expectType(noParse('noParse')); -expectType(numericParser([200, 1, 0, 15])); - -// getArrayParser -const value = types.arrayParser('{1,2,3}', (num) => parseInt(num)); -expectType(value); - -//setTypeParser -types.setTypeParser(types.builtins.INT8, parseInt); -types.setTypeParser(types.builtins.FLOAT8, parseFloat); -types.setTypeParser(types.builtins.FLOAT8, 'binary', (data) => data[0]); -types.setTypeParser(types.builtins.FLOAT8, 'text', parseFloat); diff --git a/node_modules/pg-types/lib/arrayParser.js b/node_modules/pg-types/lib/arrayParser.js deleted file mode 100644 index 81ccffb..0000000 --- a/node_modules/pg-types/lib/arrayParser.js +++ /dev/null @@ -1,11 +0,0 @@ -var array = require('postgres-array'); - -module.exports = { - create: function (source, transform) { - return { - parse: function() { - return array.parse(source, transform); - } - }; - } -}; diff --git a/node_modules/pg-types/lib/binaryParsers.js b/node_modules/pg-types/lib/binaryParsers.js deleted file mode 100644 index e12c2f4..0000000 --- a/node_modules/pg-types/lib/binaryParsers.js +++ /dev/null @@ -1,257 +0,0 @@ -var parseInt64 = require('pg-int8'); - -var parseBits = function(data, bits, offset, invert, callback) { - offset = offset || 0; - invert = invert || false; - callback = callback || function(lastValue, newValue, bits) { return (lastValue * Math.pow(2, bits)) + newValue; }; - var offsetBytes = offset >> 3; - - var inv = function(value) { - if (invert) { - return ~value & 0xff; - } - - return value; - }; - - // read first (maybe partial) byte - var mask = 0xff; - var firstBits = 8 - (offset % 8); - if (bits < firstBits) { - mask = (0xff << (8 - bits)) & 0xff; - firstBits = bits; - } - - if (offset) { - mask = mask >> (offset % 8); - } - - var result = 0; - if ((offset % 8) + bits >= 8) { - result = callback(0, inv(data[offsetBytes]) & mask, firstBits); - } - - // read bytes - var bytes = (bits + offset) >> 3; - for (var i = offsetBytes + 1; i < bytes; i++) { - result = callback(result, inv(data[i]), 8); - } - - // bits to read, that are not a complete byte - var lastBits = (bits + offset) % 8; - if (lastBits > 0) { - result = callback(result, inv(data[bytes]) >> (8 - lastBits), lastBits); - } - - return result; -}; - -var parseFloatFromBits = function(data, precisionBits, exponentBits) { - var bias = Math.pow(2, exponentBits - 1) - 1; - var sign = parseBits(data, 1); - var exponent = parseBits(data, exponentBits, 1); - - if (exponent === 0) { - return 0; - } - - // parse mantissa - var precisionBitsCounter = 1; - var parsePrecisionBits = function(lastValue, newValue, bits) { - if (lastValue === 0) { - lastValue = 1; - } - - for (var i = 1; i <= bits; i++) { - precisionBitsCounter /= 2; - if ((newValue & (0x1 << (bits - i))) > 0) { - lastValue += precisionBitsCounter; - } - } - - return lastValue; - }; - - var mantissa = parseBits(data, precisionBits, exponentBits + 1, false, parsePrecisionBits); - - // special cases - if (exponent == (Math.pow(2, exponentBits + 1) - 1)) { - if (mantissa === 0) { - return (sign === 0) ? Infinity : -Infinity; - } - - return NaN; - } - - // normale number - return ((sign === 0) ? 1 : -1) * Math.pow(2, exponent - bias) * mantissa; -}; - -var parseInt16 = function(value) { - if (parseBits(value, 1) == 1) { - return -1 * (parseBits(value, 15, 1, true) + 1); - } - - return parseBits(value, 15, 1); -}; - -var parseInt32 = function(value) { - if (parseBits(value, 1) == 1) { - return -1 * (parseBits(value, 31, 1, true) + 1); - } - - return parseBits(value, 31, 1); -}; - -var parseFloat32 = function(value) { - return parseFloatFromBits(value, 23, 8); -}; - -var parseFloat64 = function(value) { - return parseFloatFromBits(value, 52, 11); -}; - -var parseNumeric = function(value) { - var sign = parseBits(value, 16, 32); - if (sign == 0xc000) { - return NaN; - } - - var weight = Math.pow(10000, parseBits(value, 16, 16)); - var result = 0; - - var digits = []; - var ndigits = parseBits(value, 16); - for (var i = 0; i < ndigits; i++) { - result += parseBits(value, 16, 64 + (16 * i)) * weight; - weight /= 10000; - } - - var scale = Math.pow(10, parseBits(value, 16, 48)); - return ((sign === 0) ? 1 : -1) * Math.round(result * scale) / scale; -}; - -var parseDate = function(isUTC, value) { - var sign = parseBits(value, 1); - var rawValue = parseBits(value, 63, 1); - - // discard usecs and shift from 2000 to 1970 - var result = new Date((((sign === 0) ? 1 : -1) * rawValue / 1000) + 946684800000); - - if (!isUTC) { - result.setTime(result.getTime() + result.getTimezoneOffset() * 60000); - } - - // add microseconds to the date - result.usec = rawValue % 1000; - result.getMicroSeconds = function() { - return this.usec; - }; - result.setMicroSeconds = function(value) { - this.usec = value; - }; - result.getUTCMicroSeconds = function() { - return this.usec; - }; - - return result; -}; - -var parseArray = function(value) { - var dim = parseBits(value, 32); - - var flags = parseBits(value, 32, 32); - var elementType = parseBits(value, 32, 64); - - var offset = 96; - var dims = []; - for (var i = 0; i < dim; i++) { - // parse dimension - dims[i] = parseBits(value, 32, offset); - offset += 32; - - // ignore lower bounds - offset += 32; - } - - var parseElement = function(elementType) { - // parse content length - var length = parseBits(value, 32, offset); - offset += 32; - - // parse null values - if (length == 0xffffffff) { - return null; - } - - var result; - if ((elementType == 0x17) || (elementType == 0x14)) { - // int/bigint - result = parseBits(value, length * 8, offset); - offset += length * 8; - return result; - } - else if (elementType == 0x19) { - // string - result = value.toString(this.encoding, offset >> 3, (offset += (length << 3)) >> 3); - return result; - } - else { - console.log("ERROR: ElementType not implemented: " + elementType); - } - }; - - var parse = function(dimension, elementType) { - var array = []; - var i; - - if (dimension.length > 1) { - var count = dimension.shift(); - for (i = 0; i < count; i++) { - array[i] = parse(dimension, elementType); - } - dimension.unshift(count); - } - else { - for (i = 0; i < dimension[0]; i++) { - array[i] = parseElement(elementType); - } - } - - return array; - }; - - return parse(dims, elementType); -}; - -var parseText = function(value) { - return value.toString('utf8'); -}; - -var parseBool = function(value) { - if(value === null) return null; - return (parseBits(value, 8) > 0); -}; - -var init = function(register) { - register(20, parseInt64); - register(21, parseInt16); - register(23, parseInt32); - register(26, parseInt32); - register(1700, parseNumeric); - register(700, parseFloat32); - register(701, parseFloat64); - register(16, parseBool); - register(1114, parseDate.bind(null, false)); - register(1184, parseDate.bind(null, true)); - register(1000, parseArray); - register(1007, parseArray); - register(1016, parseArray); - register(1008, parseArray); - register(1009, parseArray); - register(25, parseText); -}; - -module.exports = { - init: init -}; diff --git a/node_modules/pg-types/lib/builtins.js b/node_modules/pg-types/lib/builtins.js deleted file mode 100644 index f0c134a..0000000 --- a/node_modules/pg-types/lib/builtins.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Following query was used to generate this file: - - SELECT json_object_agg(UPPER(PT.typname), PT.oid::int4 ORDER BY pt.oid) - FROM pg_type PT - WHERE typnamespace = (SELECT pgn.oid FROM pg_namespace pgn WHERE nspname = 'pg_catalog') -- Take only builting Postgres types with stable OID (extension types are not guaranted to be stable) - AND typtype = 'b' -- Only basic types - AND typelem = 0 -- Ignore aliases - AND typisdefined -- Ignore undefined types - */ - -module.exports = { - BOOL: 16, - BYTEA: 17, - CHAR: 18, - INT8: 20, - INT2: 21, - INT4: 23, - REGPROC: 24, - TEXT: 25, - OID: 26, - TID: 27, - XID: 28, - CID: 29, - JSON: 114, - XML: 142, - PG_NODE_TREE: 194, - SMGR: 210, - PATH: 602, - POLYGON: 604, - CIDR: 650, - FLOAT4: 700, - FLOAT8: 701, - ABSTIME: 702, - RELTIME: 703, - TINTERVAL: 704, - CIRCLE: 718, - MACADDR8: 774, - MONEY: 790, - MACADDR: 829, - INET: 869, - ACLITEM: 1033, - BPCHAR: 1042, - VARCHAR: 1043, - DATE: 1082, - TIME: 1083, - TIMESTAMP: 1114, - TIMESTAMPTZ: 1184, - INTERVAL: 1186, - TIMETZ: 1266, - BIT: 1560, - VARBIT: 1562, - NUMERIC: 1700, - REFCURSOR: 1790, - REGPROCEDURE: 2202, - REGOPER: 2203, - REGOPERATOR: 2204, - REGCLASS: 2205, - REGTYPE: 2206, - UUID: 2950, - TXID_SNAPSHOT: 2970, - PG_LSN: 3220, - PG_NDISTINCT: 3361, - PG_DEPENDENCIES: 3402, - TSVECTOR: 3614, - TSQUERY: 3615, - GTSVECTOR: 3642, - REGCONFIG: 3734, - REGDICTIONARY: 3769, - JSONB: 3802, - REGNAMESPACE: 4089, - REGROLE: 4096 -}; diff --git a/node_modules/pg-types/lib/textParsers.js b/node_modules/pg-types/lib/textParsers.js deleted file mode 100644 index b1218bf..0000000 --- a/node_modules/pg-types/lib/textParsers.js +++ /dev/null @@ -1,215 +0,0 @@ -var array = require('postgres-array') -var arrayParser = require('./arrayParser'); -var parseDate = require('postgres-date'); -var parseInterval = require('postgres-interval'); -var parseByteA = require('postgres-bytea'); - -function allowNull (fn) { - return function nullAllowed (value) { - if (value === null) return value - return fn(value) - } -} - -function parseBool (value) { - if (value === null) return value - return value === 'TRUE' || - value === 't' || - value === 'true' || - value === 'y' || - value === 'yes' || - value === 'on' || - value === '1'; -} - -function parseBoolArray (value) { - if (!value) return null - return array.parse(value, parseBool) -} - -function parseBaseTenInt (string) { - return parseInt(string, 10) -} - -function parseIntegerArray (value) { - if (!value) return null - return array.parse(value, allowNull(parseBaseTenInt)) -} - -function parseBigIntegerArray (value) { - if (!value) return null - return array.parse(value, allowNull(function (entry) { - return parseBigInteger(entry).trim() - })) -} - -var parsePointArray = function(value) { - if(!value) { return null; } - var p = arrayParser.create(value, function(entry) { - if(entry !== null) { - entry = parsePoint(entry); - } - return entry; - }); - - return p.parse(); -}; - -var parseFloatArray = function(value) { - if(!value) { return null; } - var p = arrayParser.create(value, function(entry) { - if(entry !== null) { - entry = parseFloat(entry); - } - return entry; - }); - - return p.parse(); -}; - -var parseStringArray = function(value) { - if(!value) { return null; } - - var p = arrayParser.create(value); - return p.parse(); -}; - -var parseDateArray = function(value) { - if (!value) { return null; } - - var p = arrayParser.create(value, function(entry) { - if (entry !== null) { - entry = parseDate(entry); - } - return entry; - }); - - return p.parse(); -}; - -var parseIntervalArray = function(value) { - if (!value) { return null; } - - var p = arrayParser.create(value, function(entry) { - if (entry !== null) { - entry = parseInterval(entry); - } - return entry; - }); - - return p.parse(); -}; - -var parseByteAArray = function(value) { - if (!value) { return null; } - - return array.parse(value, allowNull(parseByteA)); -}; - -var parseInteger = function(value) { - return parseInt(value, 10); -}; - -var parseBigInteger = function(value) { - var valStr = String(value); - if (/^\d+$/.test(valStr)) { return valStr; } - return value; -}; - -var parseJsonArray = function(value) { - if (!value) { return null; } - - return array.parse(value, allowNull(JSON.parse)); -}; - -var parsePoint = function(value) { - if (value[0] !== '(') { return null; } - - value = value.substring( 1, value.length - 1 ).split(','); - - return { - x: parseFloat(value[0]) - , y: parseFloat(value[1]) - }; -}; - -var parseCircle = function(value) { - if (value[0] !== '<' && value[1] !== '(') { return null; } - - var point = '('; - var radius = ''; - var pointParsed = false; - for (var i = 2; i < value.length - 1; i++){ - if (!pointParsed) { - point += value[i]; - } - - if (value[i] === ')') { - pointParsed = true; - continue; - } else if (!pointParsed) { - continue; - } - - if (value[i] === ','){ - continue; - } - - radius += value[i]; - } - var result = parsePoint(point); - result.radius = parseFloat(radius); - - return result; -}; - -var init = function(register) { - register(20, parseBigInteger); // int8 - register(21, parseInteger); // int2 - register(23, parseInteger); // int4 - register(26, parseInteger); // oid - register(700, parseFloat); // float4/real - register(701, parseFloat); // float8/double - register(16, parseBool); - register(1082, parseDate); // date - register(1114, parseDate); // timestamp without timezone - register(1184, parseDate); // timestamp - register(600, parsePoint); // point - register(651, parseStringArray); // cidr[] - register(718, parseCircle); // circle - register(1000, parseBoolArray); - register(1001, parseByteAArray); - register(1005, parseIntegerArray); // _int2 - register(1007, parseIntegerArray); // _int4 - register(1028, parseIntegerArray); // oid[] - register(1016, parseBigIntegerArray); // _int8 - register(1017, parsePointArray); // point[] - register(1021, parseFloatArray); // _float4 - register(1022, parseFloatArray); // _float8 - register(1231, parseFloatArray); // _numeric - register(1014, parseStringArray); //char - register(1015, parseStringArray); //varchar - register(1008, parseStringArray); - register(1009, parseStringArray); - register(1040, parseStringArray); // macaddr[] - register(1041, parseStringArray); // inet[] - register(1115, parseDateArray); // timestamp without time zone[] - register(1182, parseDateArray); // _date - register(1185, parseDateArray); // timestamp with time zone[] - register(1186, parseInterval); - register(1187, parseIntervalArray); - register(17, parseByteA); - register(114, JSON.parse.bind(JSON)); // json - register(3802, JSON.parse.bind(JSON)); // jsonb - register(199, parseJsonArray); // json[] - register(3807, parseJsonArray); // jsonb[] - register(3907, parseStringArray); // numrange[] - register(2951, parseStringArray); // uuid[] - register(791, parseStringArray); // money[] - register(1183, parseStringArray); // time[] - register(1270, parseStringArray); // timetz[] -}; - -module.exports = { - init: init -}; diff --git a/node_modules/pg-types/package.json b/node_modules/pg-types/package.json deleted file mode 100644 index 5f18026..0000000 --- a/node_modules/pg-types/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "pg-types", - "version": "2.2.0", - "description": "Query result type converters for node-postgres", - "main": "index.js", - "scripts": { - "test": "tape test/*.js | tap-spec && npm run test-ts", - "test-ts": "if-node-version '>= 8' tsd" - }, - "repository": { - "type": "git", - "url": "git://github.com/brianc/node-pg-types.git" - }, - "keywords": [ - "postgres", - "PostgreSQL", - "pg" - ], - "author": "Brian M. Carlson", - "license": "MIT", - "bugs": { - "url": "https://github.com/brianc/node-pg-types/issues" - }, - "homepage": "https://github.com/brianc/node-pg-types", - "devDependencies": { - "if-node-version": "^1.1.1", - "pff": "^1.0.0", - "tap-spec": "^4.0.0", - "tape": "^4.0.0", - "tsd": "^0.7.4" - }, - "dependencies": { - "pg-int8": "1.0.1", - "postgres-array": "~2.0.0", - "postgres-bytea": "~1.0.0", - "postgres-date": "~1.0.4", - "postgres-interval": "^1.1.0" - }, - "engines": { - "node": ">=4" - } -} diff --git a/node_modules/pg-types/test/index.js b/node_modules/pg-types/test/index.js deleted file mode 100644 index b7d05cd..0000000 --- a/node_modules/pg-types/test/index.js +++ /dev/null @@ -1,24 +0,0 @@ - -var test = require('tape') -var printf = require('pff') -var getTypeParser = require('../').getTypeParser -var types = require('./types') - -test('types', function (t) { - Object.keys(types).forEach(function (typeName) { - var type = types[typeName] - t.test(typeName, function (t) { - var parser = getTypeParser(type.id, type.format) - type.tests.forEach(function (tests) { - var input = tests[0] - var expected = tests[1] - var result = parser(input) - if (typeof expected === 'function') { - return expected(t, result) - } - t.equal(result, expected) - }) - t.end() - }) - }) -}) diff --git a/node_modules/pg-types/test/types.js b/node_modules/pg-types/test/types.js deleted file mode 100644 index af708a5..0000000 --- a/node_modules/pg-types/test/types.js +++ /dev/null @@ -1,597 +0,0 @@ -'use strict' - -exports['string/varchar'] = { - format: 'text', - id: 1043, - tests: [ - ['bang', 'bang'] - ] -} - -exports['integer/int4'] = { - format: 'text', - id: 23, - tests: [ - ['2147483647', 2147483647] - ] -} - -exports['smallint/int2'] = { - format: 'text', - id: 21, - tests: [ - ['32767', 32767] - ] -} - -exports['bigint/int8'] = { - format: 'text', - id: 20, - tests: [ - ['9223372036854775807', '9223372036854775807'] - ] -} - -exports.oid = { - format: 'text', - id: 26, - tests: [ - ['103', 103] - ] -} - -var bignum = '31415926535897932384626433832795028841971693993751058.16180339887498948482045868343656381177203091798057628' -exports.numeric = { - format: 'text', - id: 1700, - tests: [ - [bignum, bignum] - ] -} - -exports['real/float4'] = { - format: 'text', - id: 700, - tests: [ - ['123.456', 123.456] - ] -} - -exports['double precision / float 8'] = { - format: 'text', - id: 701, - tests: [ - ['12345678.12345678', 12345678.12345678] - ] -} - -exports.boolean = { - format: 'text', - id: 16, - tests: [ - ['TRUE', true], - ['t', true], - ['true', true], - ['y', true], - ['yes', true], - ['on', true], - ['1', true], - ['f', false], - [null, null] - ] -} - -exports.timestamptz = { - format: 'text', - id: 1184, - tests: [ - [ - '2010-10-31 14:54:13.74-05:30', - dateEquals(2010, 9, 31, 20, 24, 13, 740) - ], - [ - '2011-01-23 22:05:00.68-06', - dateEquals(2011, 0, 24, 4, 5, 0, 680) - ], - [ - '2010-10-30 14:11:12.730838Z', - dateEquals(2010, 9, 30, 14, 11, 12, 730) - ], - [ - '2010-10-30 13:10:01+05', - dateEquals(2010, 9, 30, 8, 10, 1, 0) - ] - ] -} - -exports.timestamp = { - format: 'text', - id: 1114, - tests: [ - [ - '2010-10-31 00:00:00', - function (t, value) { - t.equal( - value.toUTCString(), - new Date(2010, 9, 31, 0, 0, 0, 0, 0).toUTCString() - ) - t.equal( - value.toString(), - new Date(2010, 9, 31, 0, 0, 0, 0, 0, 0).toString() - ) - } - ] - ] -} - -exports.date = { - format: 'text', - id: 1082, - tests: [ - ['2010-10-31', function (t, value) { - var now = new Date(2010, 9, 31) - dateEquals( - 2010, - now.getUTCMonth(), - now.getUTCDate(), - now.getUTCHours(), 0, 0, 0)(t, value) - t.equal(value.getHours(), now.getHours()) - }] - ] -} - -exports.inet = { - format: 'text', - id: 869, - tests: [ - ['8.8.8.8', '8.8.8.8'], - ['2001:4860:4860::8888', '2001:4860:4860::8888'], - ['127.0.0.1', '127.0.0.1'], - ['fd00:1::40e', 'fd00:1::40e'], - ['1.2.3.4', '1.2.3.4'] - ] -} - -exports.cidr = { - format: 'text', - id: 650, - tests: [ - ['172.16.0.0/12', '172.16.0.0/12'], - ['fe80::/10', 'fe80::/10'], - ['fc00::/7', 'fc00::/7'], - ['192.168.0.0/24', '192.168.0.0/24'], - ['10.0.0.0/8', '10.0.0.0/8'] - ] -} - -exports.macaddr = { - format: 'text', - id: 829, - tests: [ - ['08:00:2b:01:02:03', '08:00:2b:01:02:03'], - ['16:10:9f:0d:66:00', '16:10:9f:0d:66:00'] - ] -} - -exports.numrange = { - format: 'text', - id: 3906, - tests: [ - ['[,]', '[,]'], - ['(,)', '(,)'], - ['(,]', '(,]'], - ['[1,)', '[1,)'], - ['[,1]', '[,1]'], - ['(1,2)', '(1,2)'], - ['(1,20.5]', '(1,20.5]'] - ] -} - -exports.interval = { - format: 'text', - id: 1186, - tests: [ - ['01:02:03', function (t, value) { - t.equal(value.toPostgres(), '3 seconds 2 minutes 1 hours') - t.deepEqual(value, {hours: 1, minutes: 2, seconds: 3}) - }], - ['01:02:03.456', function (t, value) { - t.deepEqual(value, {hours: 1, minutes:2, seconds: 3, milliseconds: 456}) - }], - ['1 year -32 days', function (t, value) { - t.equal(value.toPostgres(), '-32 days 1 years') - t.deepEqual(value, {years: 1, days: -32}) - }], - ['1 day -00:00:03', function (t, value) { - t.equal(value.toPostgres(), '-3 seconds 1 days') - t.deepEqual(value, {days: 1, seconds: -3}) - }] - ] -} - -exports.bytea = { - format: 'text', - id: 17, - tests: [ - ['foo\\000\\200\\\\\\377', function (t, value) { - var buffer = new Buffer([102, 111, 111, 0, 128, 92, 255]) - t.ok(buffer.equals(value)) - }], - ['', function (t, value) { - var buffer = new Buffer(0) - t.ok(buffer.equals(value)) - }] - ] -} - -exports['array/boolean'] = { - format: 'text', - id: 1000, - tests: [ - ['{true,false}', function (t, value) { - t.deepEqual(value, [true, false]) - }] - ] -} - -exports['array/char'] = { - format: 'text', - id: 1014, - tests: [ - ['{foo,bar}', function (t, value) { - t.deepEqual(value, ['foo', 'bar']) - }] - ] -} - -exports['array/varchar'] = { - format: 'text', - id: 1015, - tests: [ - ['{foo,bar}', function (t, value) { - t.deepEqual(value, ['foo', 'bar']) - }] - ] -} - -exports['array/text'] = { - format: 'text', - id: 1008, - tests: [ - ['{foo}', function (t, value) { - t.deepEqual(value, ['foo']) - }] - ] -} - -exports['array/bytea'] = { - format: 'text', - id: 1001, - tests: [ - ['{"\\\\x00000000"}', function (t, value) { - var buffer = new Buffer('00000000', 'hex') - t.ok(Array.isArray(value)) - t.equal(value.length, 1) - t.ok(buffer.equals(value[0])) - }], - ['{NULL,"\\\\x4e554c4c"}', function (t, value) { - var buffer = new Buffer('4e554c4c', 'hex') - t.ok(Array.isArray(value)) - t.equal(value.length, 2) - t.equal(value[0], null) - t.ok(buffer.equals(value[1])) - }], - ] -} - -exports['array/numeric'] = { - format: 'text', - id: 1231, - tests: [ - ['{1.2,3.4}', function (t, value) { - t.deepEqual(value, [1.2, 3.4]) - }] - ] -} - -exports['array/int2'] = { - format: 'text', - id: 1005, - tests: [ - ['{-32768, -32767, 32766, 32767}', function (t, value) { - t.deepEqual(value, [-32768, -32767, 32766, 32767]) - }] - ] -} - -exports['array/int4'] = { - format: 'text', - id: 1005, - tests: [ - ['{-2147483648, -2147483647, 2147483646, 2147483647}', function (t, value) { - t.deepEqual(value, [-2147483648, -2147483647, 2147483646, 2147483647]) - }] - ] -} - -exports['array/int8'] = { - format: 'text', - id: 1016, - tests: [ - [ - '{-9223372036854775808, -9223372036854775807, 9223372036854775806, 9223372036854775807}', - function (t, value) { - t.deepEqual(value, [ - '-9223372036854775808', - '-9223372036854775807', - '9223372036854775806', - '9223372036854775807' - ]) - } - ] - ] -} - -exports['array/json'] = { - format: 'text', - id: 199, - tests: [ - [ - '{{1,2},{[3],"[4,5]"},{null,NULL}}', - function (t, value) { - t.deepEqual(value, [ - [1, 2], - [[3], [4, 5]], - [null, null], - ]) - } - ] - ] -} - -exports['array/jsonb'] = { - format: 'text', - id: 3807, - tests: exports['array/json'].tests -} - -exports['array/point'] = { - format: 'text', - id: 1017, - tests: [ - ['{"(25.1,50.5)","(10.1,40)"}', function (t, value) { - t.deepEqual(value, [{x: 25.1, y: 50.5}, {x: 10.1, y: 40}]) - }] - ] -} - -exports['array/oid'] = { - format: 'text', - id: 1028, - tests: [ - ['{25864,25860}', function (t, value) { - t.deepEqual(value, [25864, 25860]) - }] - ] -} - -exports['array/float4'] = { - format: 'text', - id: 1021, - tests: [ - ['{1.2, 3.4}', function (t, value) { - t.deepEqual(value, [1.2, 3.4]) - }] - ] -} - -exports['array/float8'] = { - format: 'text', - id: 1022, - tests: [ - ['{-12345678.1234567, 12345678.12345678}', function (t, value) { - t.deepEqual(value, [-12345678.1234567, 12345678.12345678]) - }] - ] -} - -exports['array/date'] = { - format: 'text', - id: 1182, - tests: [ - ['{2014-01-01,2015-12-31}', function (t, value) { - var expecteds = [new Date(2014, 0, 1), new Date(2015, 11, 31)] - t.equal(value.length, 2) - value.forEach(function (date, index) { - var expected = expecteds[index] - dateEquals( - expected.getUTCFullYear(), - expected.getUTCMonth(), - expected.getUTCDate(), - expected.getUTCHours(), 0, 0, 0)(t, date) - }) - }] - ] -} - -exports['array/interval'] = { - format: 'text', - id: 1187, - tests: [ - ['{01:02:03,1 day -00:00:03}', function (t, value) { - var expecteds = [{hours: 1, minutes: 2, seconds: 3}, - {days: 1, seconds: -3}] - t.equal(value.length, 2) - t.deepEqual(value, expecteds); - }] - ] -} - -exports['array/inet'] = { - format: 'text', - id: 1041, - tests: [ - ['{8.8.8.8}', function (t, value) { - t.deepEqual(value, ['8.8.8.8']); - }], - ['{2001:4860:4860::8888}', function (t, value) { - t.deepEqual(value, ['2001:4860:4860::8888']); - }], - ['{127.0.0.1,fd00:1::40e,1.2.3.4}', function (t, value) { - t.deepEqual(value, ['127.0.0.1', 'fd00:1::40e', '1.2.3.4']); - }] - ] -} - -exports['array/cidr'] = { - format: 'text', - id: 651, - tests: [ - ['{172.16.0.0/12}', function (t, value) { - t.deepEqual(value, ['172.16.0.0/12']); - }], - ['{fe80::/10}', function (t, value) { - t.deepEqual(value, ['fe80::/10']); - }], - ['{10.0.0.0/8,fc00::/7,192.168.0.0/24}', function (t, value) { - t.deepEqual(value, ['10.0.0.0/8', 'fc00::/7', '192.168.0.0/24']); - }] - ] -} - -exports['array/macaddr'] = { - format: 'text', - id: 1040, - tests: [ - ['{08:00:2b:01:02:03,16:10:9f:0d:66:00}', function (t, value) { - t.deepEqual(value, ['08:00:2b:01:02:03', '16:10:9f:0d:66:00']); - }] - ] -} - -exports['array/numrange'] = { - format: 'text', - id: 3907, - tests: [ - ['{"[1,2]","(4.5,8)","[10,40)","(-21.2,60.3]"}', function (t, value) { - t.deepEqual(value, ['[1,2]', '(4.5,8)', '[10,40)', '(-21.2,60.3]']); - }], - ['{"[,20]","[3,]","[,]","(,35)","(1,)","(,)"}', function (t, value) { - t.deepEqual(value, ['[,20]', '[3,]', '[,]', '(,35)', '(1,)', '(,)']); - }], - ['{"[,20)","[3,)","[,)","[,35)","[1,)","[,)"}', function (t, value) { - t.deepEqual(value, ['[,20)', '[3,)', '[,)', '[,35)', '[1,)', '[,)']); - }] - ] -} - -exports['binary-string/varchar'] = { - format: 'binary', - id: 1043, - tests: [ - ['bang', 'bang'] - ] -} - -exports['binary-integer/int4'] = { - format: 'binary', - id: 23, - tests: [ - [[0, 0, 0, 100], 100] - ] -} - -exports['binary-smallint/int2'] = { - format: 'binary', - id: 21, - tests: [ - [[0, 101], 101] - ] -} - -exports['binary-bigint/int8'] = { - format: 'binary', - id: 20, - tests: [ - [new Buffer([0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), '9223372036854775807'] - ] -} - -exports['binary-oid'] = { - format: 'binary', - id: 26, - tests: [ - [[0, 0, 0, 103], 103] - ] -} - -exports['binary-numeric'] = { - format: 'binary', - id: 1700, - tests: [ - [ - [0, 2, 0, 0, 0, 0, 0, hex('0x64'), 0, 12, hex('0xd'), hex('0x48'), 0, 0, 0, 0], - 12.34 - ] - ] -} - -exports['binary-real/float4'] = { - format: 'binary', - id: 700, - tests: [ - [['0x41', '0x48', '0x00', '0x00'].map(hex), 12.5] - ] -} - -exports['binary-boolean'] = { - format: 'binary', - id: 16, - tests: [ - [[1], true], - [[0], false], - [null, null] - ] -} - -exports['binary-string'] = { - format: 'binary', - id: 25, - tests: [ - [ - new Buffer(['0x73', '0x6c', '0x61', '0x64', '0x64', '0x61'].map(hex)), - 'sladda' - ] - ] -} - -exports.point = { - format: 'text', - id: 600, - tests: [ - ['(25.1,50.5)', function (t, value) { - t.deepEqual(value, {x: 25.1, y: 50.5}) - }] - ] -} - -exports.circle = { - format: 'text', - id: 718, - tests: [ - ['<(25,10),5>', function (t, value) { - t.deepEqual(value, {x: 25, y: 10, radius: 5}) - }] - ] -} - -function hex (string) { - return parseInt(string, 16) -} - -function dateEquals () { - var timestamp = Date.UTC.apply(Date, arguments) - return function (t, value) { - t.equal(value.toUTCString(), new Date(timestamp).toUTCString()) - } -} diff --git a/node_modules/pg/LICENSE b/node_modules/pg/LICENSE deleted file mode 100644 index 5c14056..0000000 --- a/node_modules/pg/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2010 - 2021 Brian Carlson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/pg/README.md b/node_modules/pg/README.md deleted file mode 100644 index bf4effe..0000000 --- a/node_modules/pg/README.md +++ /dev/null @@ -1,95 +0,0 @@ -# node-postgres - -[![Build Status](https://secure.travis-ci.org/brianc/node-postgres.svg?branch=master)](http://travis-ci.org/brianc/node-postgres) -NPM version -NPM downloads - -Non-blocking PostgreSQL client for Node.js. Pure JavaScript and optional native libpq bindings. - -## Install - -```sh -$ npm install pg -``` - ---- - -## :star: [Documentation](https://node-postgres.com) :star: - -### Features - -- Pure JavaScript client and native libpq bindings share _the same API_ -- Connection pooling -- Extensible JS ↔ PostgreSQL data-type coercion -- Supported PostgreSQL features - - Parameterized queries - - Named statements with query plan caching - - Async notifications with `LISTEN/NOTIFY` - - Bulk import & export with `COPY TO/COPY FROM` - -### Extras - -node-postgres is by design pretty light on abstractions. These are some handy modules we've been using over the years to complete the picture. -The entire list can be found on our [wiki](https://github.com/brianc/node-postgres/wiki/Extras). - -## Support - -node-postgres is free software. If you encounter a bug with the library please open an issue on the [GitHub repo](https://github.com/brianc/node-postgres). If you have questions unanswered by the documentation please open an issue pointing out how the documentation was unclear & I will do my best to make it better! - -When you open an issue please provide: - -- version of Node -- version of Postgres -- smallest possible snippet of code to reproduce the problem - -You can also follow me [@briancarlson](https://twitter.com/briancarlson) if that's your thing. I try to always announce noteworthy changes & developments with node-postgres on Twitter. - -## Sponsorship :two_hearts: - -node-postgres's continued development has been made possible in part by generous financial support from [the community](https://github.com/brianc/node-postgres/blob/master/SPONSORS.md). - -If you or your company are benefiting from node-postgres and would like to help keep the project financially sustainable [please consider supporting](https://github.com/sponsors/brianc) its development. - -### Featured sponsor - -Special thanks to [medplum](https://medplum.com) for their generous and thoughtful support of node-postgres! - -![medplum](https://raw.githubusercontent.com/medplum/medplum-logo/refs/heads/main/medplum-logo.png) - -## Contributing - -**:heart: contributions!** - -I will **happily** accept your pull request if it: - -- **has tests** -- looks reasonable -- does not break backwards compatibility - -If your change involves breaking backwards compatibility please please point that out in the pull request & we can discuss & plan when and how to release it and what type of documentation or communicate it will require. - -## Troubleshooting and FAQ - -The causes and solutions to common errors can be found among the [Frequently Asked Questions (FAQ)](https://github.com/brianc/node-postgres/wiki/FAQ) - -## License - -Copyright (c) 2010-2020 Brian Carlson (brian.m.carlson@gmail.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/pg/esm/index.mjs b/node_modules/pg/esm/index.mjs deleted file mode 100644 index 587d80c..0000000 --- a/node_modules/pg/esm/index.mjs +++ /dev/null @@ -1,20 +0,0 @@ -// ESM wrapper for pg -import pg from '../lib/index.js' - -// Re-export all the properties -export const Client = pg.Client -export const Pool = pg.Pool -export const Connection = pg.Connection -export const types = pg.types -export const Query = pg.Query -export const DatabaseError = pg.DatabaseError -export const escapeIdentifier = pg.escapeIdentifier -export const escapeLiteral = pg.escapeLiteral -export const Result = pg.Result -export const TypeOverrides = pg.TypeOverrides - -// Also export the defaults -export const defaults = pg.defaults - -// Re-export the default -export default pg diff --git a/node_modules/pg/lib/client.js b/node_modules/pg/lib/client.js deleted file mode 100644 index 9200dde..0000000 --- a/node_modules/pg/lib/client.js +++ /dev/null @@ -1,743 +0,0 @@ -const EventEmitter = require('events').EventEmitter -const utils = require('./utils') -const nodeUtils = require('util') -const sasl = require('./crypto/sasl') -const TypeOverrides = require('./type-overrides') - -const ConnectionParameters = require('./connection-parameters') -const Query = require('./query') -const defaults = require('./defaults') -const Connection = require('./connection') -const crypto = require('./crypto/utils') - -const activeQueryDeprecationNotice = nodeUtils.deprecate( - () => {}, - 'Client.activeQuery is deprecated and will be removed in pg@9.0' -) - -const queryQueueDeprecationNotice = nodeUtils.deprecate( - () => {}, - 'Client.queryQueue is deprecated and will be removed in pg@9.0.' -) - -const pgPassDeprecationNotice = nodeUtils.deprecate( - () => {}, - 'pgpass support is deprecated and will be removed in pg@9.0. ' + - 'You can provide an async function as the password property to the Client/Pool constructor that returns a password instead. Within this function you can call the pgpass module in your own code.' -) - -const byoPromiseDeprecationNotice = nodeUtils.deprecate( - () => {}, - 'Passing a custom Promise implementation to the Client/Pool constructor is deprecated and will be removed in pg@9.0.' -) - -const queryQueueLengthDeprecationNotice = nodeUtils.deprecate( - () => {}, - 'Calling client.query() when the client is already executing a query is deprecated and will be removed in pg@9.0. Use async/await or an external async flow control mechanism instead.' -) - -class Client extends EventEmitter { - constructor(config) { - super() - - this.connectionParameters = new ConnectionParameters(config) - this.user = this.connectionParameters.user - this.database = this.connectionParameters.database - this.port = this.connectionParameters.port - this.host = this.connectionParameters.host - - // "hiding" the password so it doesn't show up in stack traces - // or if the client is console.logged - Object.defineProperty(this, 'password', { - configurable: true, - enumerable: false, - writable: true, - value: this.connectionParameters.password, - }) - - this.replication = this.connectionParameters.replication - - const c = config || {} - - if (c.Promise) { - byoPromiseDeprecationNotice() - } - this._Promise = c.Promise || global.Promise - this._types = new TypeOverrides(c.types) - this._ending = false - this._ended = false - this._connecting = false - this._connected = false - this._connectionError = false - this._queryable = true - this._activeQuery = null - - this.enableChannelBinding = Boolean(c.enableChannelBinding) // set true to use SCRAM-SHA-256-PLUS when offered - this.connection = - c.connection || - new Connection({ - stream: c.stream, - ssl: this.connectionParameters.ssl, - keepAlive: c.keepAlive || false, - keepAliveInitialDelayMillis: c.keepAliveInitialDelayMillis || 0, - encoding: this.connectionParameters.client_encoding || 'utf8', - }) - this._queryQueue = [] - this.binary = c.binary || defaults.binary - this.processID = null - this.secretKey = null - this.ssl = this.connectionParameters.ssl || false - // As with Password, make SSL->Key (the private key) non-enumerable. - // It won't show up in stack traces - // or if the client is console.logged - if (this.ssl && this.ssl.key) { - Object.defineProperty(this.ssl, 'key', { - enumerable: false, - }) - } - - this._connectionTimeoutMillis = c.connectionTimeoutMillis || 0 - } - - get activeQuery() { - activeQueryDeprecationNotice() - return this._activeQuery - } - - set activeQuery(val) { - activeQueryDeprecationNotice() - this._activeQuery = val - } - - _getActiveQuery() { - return this._activeQuery - } - - _errorAllQueries(err) { - const enqueueError = (query) => { - process.nextTick(() => { - query.handleError(err, this.connection) - }) - } - - const activeQuery = this._getActiveQuery() - if (activeQuery) { - enqueueError(activeQuery) - this._activeQuery = null - } - - this._queryQueue.forEach(enqueueError) - this._queryQueue.length = 0 - } - - _connect(callback) { - const self = this - const con = this.connection - this._connectionCallback = callback - - if (this._connecting || this._connected) { - const err = new Error('Client has already been connected. You cannot reuse a client.') - process.nextTick(() => { - callback(err) - }) - return - } - this._connecting = true - - if (this._connectionTimeoutMillis > 0) { - this.connectionTimeoutHandle = setTimeout(() => { - con._ending = true - con.stream.destroy(new Error('timeout expired')) - }, this._connectionTimeoutMillis) - - if (this.connectionTimeoutHandle.unref) { - this.connectionTimeoutHandle.unref() - } - } - - if (this.host && this.host.indexOf('/') === 0) { - con.connect(this.host + '/.s.PGSQL.' + this.port) - } else { - con.connect(this.port, this.host) - } - - // once connection is established send startup message - con.on('connect', function () { - if (self.ssl) { - con.requestSsl() - } else { - con.startup(self.getStartupConf()) - } - }) - - con.on('sslconnect', function () { - con.startup(self.getStartupConf()) - }) - - this._attachListeners(con) - - con.once('end', () => { - const error = this._ending ? new Error('Connection terminated') : new Error('Connection terminated unexpectedly') - - clearTimeout(this.connectionTimeoutHandle) - this._errorAllQueries(error) - this._ended = true - - if (!this._ending) { - // if the connection is ended without us calling .end() - // on this client then we have an unexpected disconnection - // treat this as an error unless we've already emitted an error - // during connection. - if (this._connecting && !this._connectionError) { - if (this._connectionCallback) { - this._connectionCallback(error) - } else { - this._handleErrorEvent(error) - } - } else if (!this._connectionError) { - this._handleErrorEvent(error) - } - } - - process.nextTick(() => { - this.emit('end') - }) - }) - } - - connect(callback) { - if (callback) { - this._connect(callback) - return - } - - return new this._Promise((resolve, reject) => { - this._connect((error) => { - if (error) { - reject(error) - } else { - resolve(this) - } - }) - }) - } - - _attachListeners(con) { - // password request handling - con.on('authenticationCleartextPassword', this._handleAuthCleartextPassword.bind(this)) - // password request handling - con.on('authenticationMD5Password', this._handleAuthMD5Password.bind(this)) - // password request handling (SASL) - con.on('authenticationSASL', this._handleAuthSASL.bind(this)) - con.on('authenticationSASLContinue', this._handleAuthSASLContinue.bind(this)) - con.on('authenticationSASLFinal', this._handleAuthSASLFinal.bind(this)) - con.on('backendKeyData', this._handleBackendKeyData.bind(this)) - con.on('error', this._handleErrorEvent.bind(this)) - con.on('errorMessage', this._handleErrorMessage.bind(this)) - con.on('readyForQuery', this._handleReadyForQuery.bind(this)) - con.on('notice', this._handleNotice.bind(this)) - con.on('rowDescription', this._handleRowDescription.bind(this)) - con.on('dataRow', this._handleDataRow.bind(this)) - con.on('portalSuspended', this._handlePortalSuspended.bind(this)) - con.on('emptyQuery', this._handleEmptyQuery.bind(this)) - con.on('commandComplete', this._handleCommandComplete.bind(this)) - con.on('parseComplete', this._handleParseComplete.bind(this)) - con.on('copyInResponse', this._handleCopyInResponse.bind(this)) - con.on('copyData', this._handleCopyData.bind(this)) - con.on('notification', this._handleNotification.bind(this)) - } - - _getPassword(cb) { - const con = this.connection - if (typeof this.password === 'function') { - this._Promise - .resolve() - .then(() => this.password(this.connectionParameters)) - .then((pass) => { - if (pass !== undefined) { - if (typeof pass !== 'string') { - con.emit('error', new TypeError('Password must be a string')) - return - } - this.connectionParameters.password = this.password = pass - } else { - this.connectionParameters.password = this.password = null - } - cb() - }) - .catch((err) => { - con.emit('error', err) - }) - } else if (this.password !== null) { - cb() - } else { - try { - const pgPass = require('pgpass') - pgPass(this.connectionParameters, (pass) => { - if (undefined !== pass) { - pgPassDeprecationNotice() - this.connectionParameters.password = this.password = pass - } - cb() - }) - } catch (e) { - this.emit('error', e) - } - } - } - - _handleAuthCleartextPassword(msg) { - this._getPassword(() => { - this.connection.password(this.password) - }) - } - - _handleAuthMD5Password(msg) { - this._getPassword(async () => { - try { - const hashedPassword = await crypto.postgresMd5PasswordHash(this.user, this.password, msg.salt) - this.connection.password(hashedPassword) - } catch (e) { - this.emit('error', e) - } - }) - } - - _handleAuthSASL(msg) { - this._getPassword(() => { - try { - this.saslSession = sasl.startSession(msg.mechanisms, this.enableChannelBinding && this.connection.stream) - this.connection.sendSASLInitialResponseMessage(this.saslSession.mechanism, this.saslSession.response) - } catch (err) { - this.connection.emit('error', err) - } - }) - } - - async _handleAuthSASLContinue(msg) { - try { - await sasl.continueSession( - this.saslSession, - this.password, - msg.data, - this.enableChannelBinding && this.connection.stream - ) - this.connection.sendSCRAMClientFinalMessage(this.saslSession.response) - } catch (err) { - this.connection.emit('error', err) - } - } - - _handleAuthSASLFinal(msg) { - try { - sasl.finalizeSession(this.saslSession, msg.data) - this.saslSession = null - } catch (err) { - this.connection.emit('error', err) - } - } - - _handleBackendKeyData(msg) { - this.processID = msg.processID - this.secretKey = msg.secretKey - } - - _handleReadyForQuery(msg) { - if (this._connecting) { - this._connecting = false - this._connected = true - clearTimeout(this.connectionTimeoutHandle) - - // process possible callback argument to Client#connect - if (this._connectionCallback) { - this._connectionCallback(null, this) - // remove callback for proper error handling - // after the connect event - this._connectionCallback = null - } - this.emit('connect') - } - const activeQuery = this._getActiveQuery() - this._activeQuery = null - this.readyForQuery = true - if (activeQuery) { - activeQuery.handleReadyForQuery(this.connection) - } - this._pulseQueryQueue() - } - - // if we receive an error event or error message - // during the connection process we handle it here - _handleErrorWhileConnecting(err) { - if (this._connectionError) { - // TODO(bmc): this is swallowing errors - we shouldn't do this - return - } - this._connectionError = true - clearTimeout(this.connectionTimeoutHandle) - if (this._connectionCallback) { - return this._connectionCallback(err) - } - this.emit('error', err) - } - - // if we're connected and we receive an error event from the connection - // this means the socket is dead - do a hard abort of all queries and emit - // the socket error on the client as well - _handleErrorEvent(err) { - if (this._connecting) { - return this._handleErrorWhileConnecting(err) - } - this._queryable = false - this._errorAllQueries(err) - this.emit('error', err) - } - - // handle error messages from the postgres backend - _handleErrorMessage(msg) { - if (this._connecting) { - return this._handleErrorWhileConnecting(msg) - } - const activeQuery = this._getActiveQuery() - - if (!activeQuery) { - this._handleErrorEvent(msg) - return - } - - this._activeQuery = null - activeQuery.handleError(msg, this.connection) - } - - _handleRowDescription(msg) { - const activeQuery = this._getActiveQuery() - if (activeQuery == null) { - const error = new Error('Received unexpected rowDescription message from backend.') - this._handleErrorEvent(error) - return - } - // delegate rowDescription to active query - activeQuery.handleRowDescription(msg) - } - - _handleDataRow(msg) { - const activeQuery = this._getActiveQuery() - if (activeQuery == null) { - const error = new Error('Received unexpected dataRow message from backend.') - this._handleErrorEvent(error) - return - } - // delegate dataRow to active query - activeQuery.handleDataRow(msg) - } - - _handlePortalSuspended(msg) { - const activeQuery = this._getActiveQuery() - if (activeQuery == null) { - const error = new Error('Received unexpected portalSuspended message from backend.') - this._handleErrorEvent(error) - return - } - // delegate portalSuspended to active query - activeQuery.handlePortalSuspended(this.connection) - } - - _handleEmptyQuery(msg) { - const activeQuery = this._getActiveQuery() - if (activeQuery == null) { - const error = new Error('Received unexpected emptyQuery message from backend.') - this._handleErrorEvent(error) - return - } - // delegate emptyQuery to active query - activeQuery.handleEmptyQuery(this.connection) - } - - _handleCommandComplete(msg) { - const activeQuery = this._getActiveQuery() - if (activeQuery == null) { - const error = new Error('Received unexpected commandComplete message from backend.') - this._handleErrorEvent(error) - return - } - // delegate commandComplete to active query - activeQuery.handleCommandComplete(msg, this.connection) - } - - _handleParseComplete() { - const activeQuery = this._getActiveQuery() - if (activeQuery == null) { - const error = new Error('Received unexpected parseComplete message from backend.') - this._handleErrorEvent(error) - return - } - // if a prepared statement has a name and properly parses - // we track that its already been executed so we don't parse - // it again on the same client - if (activeQuery.name) { - this.connection.parsedStatements[activeQuery.name] = activeQuery.text - } - } - - _handleCopyInResponse(msg) { - const activeQuery = this._getActiveQuery() - if (activeQuery == null) { - const error = new Error('Received unexpected copyInResponse message from backend.') - this._handleErrorEvent(error) - return - } - activeQuery.handleCopyInResponse(this.connection) - } - - _handleCopyData(msg) { - const activeQuery = this._getActiveQuery() - if (activeQuery == null) { - const error = new Error('Received unexpected copyData message from backend.') - this._handleErrorEvent(error) - return - } - activeQuery.handleCopyData(msg, this.connection) - } - - _handleNotification(msg) { - this.emit('notification', msg) - } - - _handleNotice(msg) { - this.emit('notice', msg) - } - - getStartupConf() { - const params = this.connectionParameters - - const data = { - user: params.user, - database: params.database, - } - - const appName = params.application_name || params.fallback_application_name - if (appName) { - data.application_name = appName - } - if (params.replication) { - data.replication = '' + params.replication - } - if (params.statement_timeout) { - data.statement_timeout = String(parseInt(params.statement_timeout, 10)) - } - if (params.lock_timeout) { - data.lock_timeout = String(parseInt(params.lock_timeout, 10)) - } - if (params.idle_in_transaction_session_timeout) { - data.idle_in_transaction_session_timeout = String(parseInt(params.idle_in_transaction_session_timeout, 10)) - } - if (params.options) { - data.options = params.options - } - - return data - } - - cancel(client, query) { - if (client.activeQuery === query) { - const con = this.connection - - if (this.host && this.host.indexOf('/') === 0) { - con.connect(this.host + '/.s.PGSQL.' + this.port) - } else { - con.connect(this.port, this.host) - } - - // once connection is established send cancel message - con.on('connect', function () { - con.cancel(client.processID, client.secretKey) - }) - } else if (client._queryQueue.indexOf(query) !== -1) { - client._queryQueue.splice(client._queryQueue.indexOf(query), 1) - } - } - - setTypeParser(oid, format, parseFn) { - return this._types.setTypeParser(oid, format, parseFn) - } - - getTypeParser(oid, format) { - return this._types.getTypeParser(oid, format) - } - - // escapeIdentifier and escapeLiteral moved to utility functions & exported - // on PG - // re-exported here for backwards compatibility - escapeIdentifier(str) { - return utils.escapeIdentifier(str) - } - - escapeLiteral(str) { - return utils.escapeLiteral(str) - } - - _pulseQueryQueue() { - if (this.readyForQuery === true) { - this._activeQuery = this._queryQueue.shift() - const activeQuery = this._getActiveQuery() - if (activeQuery) { - this.readyForQuery = false - this.hasExecuted = true - - const queryError = activeQuery.submit(this.connection) - if (queryError) { - process.nextTick(() => { - activeQuery.handleError(queryError, this.connection) - this.readyForQuery = true - this._pulseQueryQueue() - }) - } - } else if (this.hasExecuted) { - this._activeQuery = null - this.emit('drain') - } - } - } - - query(config, values, callback) { - // can take in strings, config object or query object - let query - let result - let readTimeout - let readTimeoutTimer - let queryCallback - - if (config === null || config === undefined) { - throw new TypeError('Client was passed a null or undefined query') - } else if (typeof config.submit === 'function') { - readTimeout = config.query_timeout || this.connectionParameters.query_timeout - result = query = config - if (!query.callback) { - if (typeof values === 'function') { - query.callback = values - } else if (callback) { - query.callback = callback - } - } - } else { - readTimeout = config.query_timeout || this.connectionParameters.query_timeout - query = new Query(config, values, callback) - if (!query.callback) { - result = new this._Promise((resolve, reject) => { - query.callback = (err, res) => (err ? reject(err) : resolve(res)) - }).catch((err) => { - // replace the stack trace that leads to `TCP.onStreamRead` with one that leads back to the - // application that created the query - Error.captureStackTrace(err) - throw err - }) - } - } - - if (readTimeout) { - queryCallback = query.callback || (() => {}) - - readTimeoutTimer = setTimeout(() => { - const error = new Error('Query read timeout') - - process.nextTick(() => { - query.handleError(error, this.connection) - }) - - queryCallback(error) - - // we already returned an error, - // just do nothing if query completes - query.callback = () => {} - - // Remove from queue - const index = this._queryQueue.indexOf(query) - if (index > -1) { - this._queryQueue.splice(index, 1) - } - - this._pulseQueryQueue() - }, readTimeout) - - query.callback = (err, res) => { - clearTimeout(readTimeoutTimer) - queryCallback(err, res) - } - } - - if (this.binary && !query.binary) { - query.binary = true - } - - if (query._result && !query._result._types) { - query._result._types = this._types - } - - if (!this._queryable) { - process.nextTick(() => { - query.handleError(new Error('Client has encountered a connection error and is not queryable'), this.connection) - }) - return result - } - - if (this._ending) { - process.nextTick(() => { - query.handleError(new Error('Client was closed and is not queryable'), this.connection) - }) - return result - } - - if (this._queryQueue.length > 0) { - queryQueueLengthDeprecationNotice() - } - this._queryQueue.push(query) - this._pulseQueryQueue() - return result - } - - ref() { - this.connection.ref() - } - - unref() { - this.connection.unref() - } - - end(cb) { - this._ending = true - - // if we have never connected, then end is a noop, callback immediately - if (!this.connection._connecting || this._ended) { - if (cb) { - cb() - } else { - return this._Promise.resolve() - } - } - - if (this._getActiveQuery() || !this._queryable) { - // if we have an active query we need to force a disconnect - // on the socket - otherwise a hung query could block end forever - this.connection.stream.destroy() - } else { - this.connection.end() - } - - if (cb) { - this.connection.once('end', cb) - } else { - return new this._Promise((resolve) => { - this.connection.once('end', resolve) - }) - } - } - get queryQueue() { - queryQueueDeprecationNotice() - return this._queryQueue - } -} - -// expose a Query constructor -Client.Query = Query - -module.exports = Client diff --git a/node_modules/pg/lib/connection-parameters.js b/node_modules/pg/lib/connection-parameters.js deleted file mode 100644 index c153932..0000000 --- a/node_modules/pg/lib/connection-parameters.js +++ /dev/null @@ -1,171 +0,0 @@ -'use strict' - -const dns = require('dns') - -const defaults = require('./defaults') - -const parse = require('pg-connection-string').parse // parses a connection string - -const val = function (key, config, envVar) { - if (config[key]) { - return config[key] - } - - if (envVar === undefined) { - envVar = process.env['PG' + key.toUpperCase()] - } else if (envVar === false) { - // do nothing ... use false - } else { - envVar = process.env[envVar] - } - - return envVar || defaults[key] -} - -const readSSLConfigFromEnvironment = function () { - switch (process.env.PGSSLMODE) { - case 'disable': - return false - case 'prefer': - case 'require': - case 'verify-ca': - case 'verify-full': - return true - case 'no-verify': - return { rejectUnauthorized: false } - } - return defaults.ssl -} - -// Convert arg to a string, surround in single quotes, and escape single quotes and backslashes -const quoteParamValue = function (value) { - return "'" + ('' + value).replace(/\\/g, '\\\\').replace(/'/g, "\\'") + "'" -} - -const add = function (params, config, paramName) { - const value = config[paramName] - if (value !== undefined && value !== null) { - params.push(paramName + '=' + quoteParamValue(value)) - } -} - -class ConnectionParameters { - constructor(config) { - // if a string is passed, it is a raw connection string so we parse it into a config - config = typeof config === 'string' ? parse(config) : config || {} - - // if the config has a connectionString defined, parse IT into the config we use - // this will override other default values with what is stored in connectionString - if (config.connectionString) { - config = Object.assign({}, config, parse(config.connectionString)) - } - - this.user = val('user', config) - this.database = val('database', config) - - if (this.database === undefined) { - this.database = this.user - } - - this.port = parseInt(val('port', config), 10) - this.host = val('host', config) - - // "hiding" the password so it doesn't show up in stack traces - // or if the client is console.logged - Object.defineProperty(this, 'password', { - configurable: true, - enumerable: false, - writable: true, - value: val('password', config), - }) - - this.binary = val('binary', config) - this.options = val('options', config) - - this.ssl = typeof config.ssl === 'undefined' ? readSSLConfigFromEnvironment() : config.ssl - - if (typeof this.ssl === 'string') { - if (this.ssl === 'true') { - this.ssl = true - } - } - // support passing in ssl=no-verify via connection string - if (this.ssl === 'no-verify') { - this.ssl = { rejectUnauthorized: false } - } - if (this.ssl && this.ssl.key) { - Object.defineProperty(this.ssl, 'key', { - enumerable: false, - }) - } - - this.client_encoding = val('client_encoding', config) - this.replication = val('replication', config) - // a domain socket begins with '/' - this.isDomainSocket = !(this.host || '').indexOf('/') - - this.application_name = val('application_name', config, 'PGAPPNAME') - this.fallback_application_name = val('fallback_application_name', config, false) - this.statement_timeout = val('statement_timeout', config, false) - this.lock_timeout = val('lock_timeout', config, false) - this.idle_in_transaction_session_timeout = val('idle_in_transaction_session_timeout', config, false) - this.query_timeout = val('query_timeout', config, false) - - if (config.connectionTimeoutMillis === undefined) { - this.connect_timeout = process.env.PGCONNECT_TIMEOUT || 0 - } else { - this.connect_timeout = Math.floor(config.connectionTimeoutMillis / 1000) - } - - if (config.keepAlive === false) { - this.keepalives = 0 - } else if (config.keepAlive === true) { - this.keepalives = 1 - } - - if (typeof config.keepAliveInitialDelayMillis === 'number') { - this.keepalives_idle = Math.floor(config.keepAliveInitialDelayMillis / 1000) - } - } - - getLibpqConnectionString(cb) { - const params = [] - add(params, this, 'user') - add(params, this, 'password') - add(params, this, 'port') - add(params, this, 'application_name') - add(params, this, 'fallback_application_name') - add(params, this, 'connect_timeout') - add(params, this, 'options') - - const ssl = typeof this.ssl === 'object' ? this.ssl : this.ssl ? { sslmode: this.ssl } : {} - add(params, ssl, 'sslmode') - add(params, ssl, 'sslca') - add(params, ssl, 'sslkey') - add(params, ssl, 'sslcert') - add(params, ssl, 'sslrootcert') - - if (this.database) { - params.push('dbname=' + quoteParamValue(this.database)) - } - if (this.replication) { - params.push('replication=' + quoteParamValue(this.replication)) - } - if (this.host) { - params.push('host=' + quoteParamValue(this.host)) - } - if (this.isDomainSocket) { - return cb(null, params.join(' ')) - } - if (this.client_encoding) { - params.push('client_encoding=' + quoteParamValue(this.client_encoding)) - } - dns.lookup(this.host, function (err, address) { - if (err) return cb(err, null) - params.push('hostaddr=' + quoteParamValue(address)) - return cb(null, params.join(' ')) - }) - } -} - -module.exports = ConnectionParameters diff --git a/node_modules/pg/lib/connection.js b/node_modules/pg/lib/connection.js deleted file mode 100644 index 027f939..0000000 --- a/node_modules/pg/lib/connection.js +++ /dev/null @@ -1,221 +0,0 @@ -'use strict' - -const EventEmitter = require('events').EventEmitter - -const { parse, serialize } = require('pg-protocol') -const { getStream, getSecureStream } = require('./stream') - -const flushBuffer = serialize.flush() -const syncBuffer = serialize.sync() -const endBuffer = serialize.end() - -// TODO(bmc) support binary mode at some point -class Connection extends EventEmitter { - constructor(config) { - super() - config = config || {} - - this.stream = config.stream || getStream(config.ssl) - if (typeof this.stream === 'function') { - this.stream = this.stream(config) - } - - this._keepAlive = config.keepAlive - this._keepAliveInitialDelayMillis = config.keepAliveInitialDelayMillis - this.parsedStatements = {} - this.ssl = config.ssl || false - this._ending = false - this._emitMessage = false - const self = this - this.on('newListener', function (eventName) { - if (eventName === 'message') { - self._emitMessage = true - } - }) - } - - connect(port, host) { - const self = this - - this._connecting = true - this.stream.setNoDelay(true) - this.stream.connect(port, host) - - this.stream.once('connect', function () { - if (self._keepAlive) { - self.stream.setKeepAlive(true, self._keepAliveInitialDelayMillis) - } - self.emit('connect') - }) - - const reportStreamError = function (error) { - // errors about disconnections should be ignored during disconnect - if (self._ending && (error.code === 'ECONNRESET' || error.code === 'EPIPE')) { - return - } - self.emit('error', error) - } - this.stream.on('error', reportStreamError) - - this.stream.on('close', function () { - self.emit('end') - }) - - if (!this.ssl) { - return this.attachListeners(this.stream) - } - - this.stream.once('data', function (buffer) { - const responseCode = buffer.toString('utf8') - switch (responseCode) { - case 'S': // Server supports SSL connections, continue with a secure connection - break - case 'N': // Server does not support SSL connections - self.stream.end() - return self.emit('error', new Error('The server does not support SSL connections')) - default: - // Any other response byte, including 'E' (ErrorResponse) indicating a server error - self.stream.end() - return self.emit('error', new Error('There was an error establishing an SSL connection')) - } - const options = { - socket: self.stream, - } - - if (self.ssl !== true) { - Object.assign(options, self.ssl) - - if ('key' in self.ssl) { - options.key = self.ssl.key - } - } - - const net = require('net') - if (net.isIP && net.isIP(host) === 0) { - options.servername = host - } - try { - self.stream = getSecureStream(options) - } catch (err) { - return self.emit('error', err) - } - self.attachListeners(self.stream) - self.stream.on('error', reportStreamError) - - self.emit('sslconnect') - }) - } - - attachListeners(stream) { - parse(stream, (msg) => { - const eventName = msg.name === 'error' ? 'errorMessage' : msg.name - if (this._emitMessage) { - this.emit('message', msg) - } - this.emit(eventName, msg) - }) - } - - requestSsl() { - this.stream.write(serialize.requestSsl()) - } - - startup(config) { - this.stream.write(serialize.startup(config)) - } - - cancel(processID, secretKey) { - this._send(serialize.cancel(processID, secretKey)) - } - - password(password) { - this._send(serialize.password(password)) - } - - sendSASLInitialResponseMessage(mechanism, initialResponse) { - this._send(serialize.sendSASLInitialResponseMessage(mechanism, initialResponse)) - } - - sendSCRAMClientFinalMessage(additionalData) { - this._send(serialize.sendSCRAMClientFinalMessage(additionalData)) - } - - _send(buffer) { - if (!this.stream.writable) { - return false - } - return this.stream.write(buffer) - } - - query(text) { - this._send(serialize.query(text)) - } - - // send parse message - parse(query) { - this._send(serialize.parse(query)) - } - - // send bind message - bind(config) { - this._send(serialize.bind(config)) - } - - // send execute message - execute(config) { - this._send(serialize.execute(config)) - } - - flush() { - if (this.stream.writable) { - this.stream.write(flushBuffer) - } - } - - sync() { - this._ending = true - this._send(syncBuffer) - } - - ref() { - this.stream.ref() - } - - unref() { - this.stream.unref() - } - - end() { - // 0x58 = 'X' - this._ending = true - if (!this._connecting || !this.stream.writable) { - this.stream.end() - return - } - return this.stream.write(endBuffer, () => { - this.stream.end() - }) - } - - close(msg) { - this._send(serialize.close(msg)) - } - - describe(msg) { - this._send(serialize.describe(msg)) - } - - sendCopyFromChunk(chunk) { - this._send(serialize.copyData(chunk)) - } - - endCopyFrom() { - this._send(serialize.copyDone()) - } - - sendCopyFail(msg) { - this._send(serialize.copyFail(msg)) - } -} - -module.exports = Connection diff --git a/node_modules/pg/lib/crypto/cert-signatures.js b/node_modules/pg/lib/crypto/cert-signatures.js deleted file mode 100644 index 8d8df34..0000000 --- a/node_modules/pg/lib/crypto/cert-signatures.js +++ /dev/null @@ -1,122 +0,0 @@ -function x509Error(msg, cert) { - return new Error('SASL channel binding: ' + msg + ' when parsing public certificate ' + cert.toString('base64')) -} - -function readASN1Length(data, index) { - let length = data[index++] - if (length < 0x80) return { length, index } - - const lengthBytes = length & 0x7f - if (lengthBytes > 4) throw x509Error('bad length', data) - - length = 0 - for (let i = 0; i < lengthBytes; i++) { - length = (length << 8) | data[index++] - } - - return { length, index } -} - -function readASN1OID(data, index) { - if (data[index++] !== 0x6) throw x509Error('non-OID data', data) // 6 = OID - - const { length: OIDLength, index: indexAfterOIDLength } = readASN1Length(data, index) - index = indexAfterOIDLength - const lastIndex = index + OIDLength - - const byte1 = data[index++] - let oid = ((byte1 / 40) >> 0) + '.' + (byte1 % 40) - - while (index < lastIndex) { - // loop over numbers in OID - let value = 0 - while (index < lastIndex) { - // loop over bytes in number - const nextByte = data[index++] - value = (value << 7) | (nextByte & 0x7f) - if (nextByte < 0x80) break - } - oid += '.' + value - } - - return { oid, index } -} - -function expectASN1Seq(data, index) { - if (data[index++] !== 0x30) throw x509Error('non-sequence data', data) // 30 = Sequence - return readASN1Length(data, index) -} - -function signatureAlgorithmHashFromCertificate(data, index) { - // read this thread: https://www.postgresql.org/message-id/17760-b6c61e752ec07060%40postgresql.org - if (index === undefined) index = 0 - index = expectASN1Seq(data, index).index - const { length: certInfoLength, index: indexAfterCertInfoLength } = expectASN1Seq(data, index) - index = indexAfterCertInfoLength + certInfoLength // skip over certificate info - index = expectASN1Seq(data, index).index // skip over signature length field - const { oid, index: indexAfterOID } = readASN1OID(data, index) - switch (oid) { - // RSA - case '1.2.840.113549.1.1.4': - return 'MD5' - case '1.2.840.113549.1.1.5': - return 'SHA-1' - case '1.2.840.113549.1.1.11': - return 'SHA-256' - case '1.2.840.113549.1.1.12': - return 'SHA-384' - case '1.2.840.113549.1.1.13': - return 'SHA-512' - case '1.2.840.113549.1.1.14': - return 'SHA-224' - case '1.2.840.113549.1.1.15': - return 'SHA512-224' - case '1.2.840.113549.1.1.16': - return 'SHA512-256' - // ECDSA - case '1.2.840.10045.4.1': - return 'SHA-1' - case '1.2.840.10045.4.3.1': - return 'SHA-224' - case '1.2.840.10045.4.3.2': - return 'SHA-256' - case '1.2.840.10045.4.3.3': - return 'SHA-384' - case '1.2.840.10045.4.3.4': - return 'SHA-512' - // RSASSA-PSS: hash is indicated separately - case '1.2.840.113549.1.1.10': { - index = indexAfterOID - index = expectASN1Seq(data, index).index - if (data[index++] !== 0xa0) throw x509Error('non-tag data', data) // a0 = constructed tag 0 - index = readASN1Length(data, index).index // skip over tag length field - index = expectASN1Seq(data, index).index // skip over sequence length field - const { oid: hashOID } = readASN1OID(data, index) - switch (hashOID) { - // standalone hash OIDs - case '1.2.840.113549.2.5': - return 'MD5' - case '1.3.14.3.2.26': - return 'SHA-1' - case '2.16.840.1.101.3.4.2.1': - return 'SHA-256' - case '2.16.840.1.101.3.4.2.2': - return 'SHA-384' - case '2.16.840.1.101.3.4.2.3': - return 'SHA-512' - } - throw x509Error('unknown hash OID ' + hashOID, data) - } - // Ed25519 -- see https: return//github.com/openssl/openssl/issues/15477 - case '1.3.101.110': - case '1.3.101.112': // ph - return 'SHA-512' - // Ed448 -- still not in pg 17.2 (if supported, digest would be SHAKE256 x 64 bytes) - case '1.3.101.111': - case '1.3.101.113': // ph - throw x509Error('Ed448 certificate channel binding is not currently supported by Postgres') - } - throw x509Error('unknown OID ' + oid, data) -} - -module.exports = { signatureAlgorithmHashFromCertificate } diff --git a/node_modules/pg/lib/crypto/sasl.js b/node_modules/pg/lib/crypto/sasl.js deleted file mode 100644 index 47b7761..0000000 --- a/node_modules/pg/lib/crypto/sasl.js +++ /dev/null @@ -1,212 +0,0 @@ -'use strict' -const crypto = require('./utils') -const { signatureAlgorithmHashFromCertificate } = require('./cert-signatures') - -function startSession(mechanisms, stream) { - const candidates = ['SCRAM-SHA-256'] - if (stream) candidates.unshift('SCRAM-SHA-256-PLUS') // higher-priority, so placed first - - const mechanism = candidates.find((candidate) => mechanisms.includes(candidate)) - - if (!mechanism) { - throw new Error('SASL: Only mechanism(s) ' + candidates.join(' and ') + ' are supported') - } - - if (mechanism === 'SCRAM-SHA-256-PLUS' && typeof stream.getPeerCertificate !== 'function') { - // this should never happen if we are really talking to a Postgres server - throw new Error('SASL: Mechanism SCRAM-SHA-256-PLUS requires a certificate') - } - - const clientNonce = crypto.randomBytes(18).toString('base64') - const gs2Header = mechanism === 'SCRAM-SHA-256-PLUS' ? 'p=tls-server-end-point' : stream ? 'y' : 'n' - - return { - mechanism, - clientNonce, - response: gs2Header + ',,n=*,r=' + clientNonce, - message: 'SASLInitialResponse', - } -} - -async function continueSession(session, password, serverData, stream) { - if (session.message !== 'SASLInitialResponse') { - throw new Error('SASL: Last message was not SASLInitialResponse') - } - if (typeof password !== 'string') { - throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string') - } - if (password === '') { - throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a non-empty string') - } - if (typeof serverData !== 'string') { - throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: serverData must be a string') - } - - const sv = parseServerFirstMessage(serverData) - - if (!sv.nonce.startsWith(session.clientNonce)) { - throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce does not start with client nonce') - } else if (sv.nonce.length === session.clientNonce.length) { - throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce is too short') - } - - const clientFirstMessageBare = 'n=*,r=' + session.clientNonce - const serverFirstMessage = 'r=' + sv.nonce + ',s=' + sv.salt + ',i=' + sv.iteration - - // without channel binding: - let channelBinding = stream ? 'eSws' : 'biws' // 'y,,' or 'n,,', base64-encoded - - // override if channel binding is in use: - if (session.mechanism === 'SCRAM-SHA-256-PLUS') { - const peerCert = stream.getPeerCertificate().raw - let hashName = signatureAlgorithmHashFromCertificate(peerCert) - if (hashName === 'MD5' || hashName === 'SHA-1') hashName = 'SHA-256' - const certHash = await crypto.hashByName(hashName, peerCert) - const bindingData = Buffer.concat([Buffer.from('p=tls-server-end-point,,'), Buffer.from(certHash)]) - channelBinding = bindingData.toString('base64') - } - - const clientFinalMessageWithoutProof = 'c=' + channelBinding + ',r=' + sv.nonce - const authMessage = clientFirstMessageBare + ',' + serverFirstMessage + ',' + clientFinalMessageWithoutProof - - const saltBytes = Buffer.from(sv.salt, 'base64') - const saltedPassword = await crypto.deriveKey(password, saltBytes, sv.iteration) - const clientKey = await crypto.hmacSha256(saltedPassword, 'Client Key') - const storedKey = await crypto.sha256(clientKey) - const clientSignature = await crypto.hmacSha256(storedKey, authMessage) - const clientProof = xorBuffers(Buffer.from(clientKey), Buffer.from(clientSignature)).toString('base64') - const serverKey = await crypto.hmacSha256(saltedPassword, 'Server Key') - const serverSignatureBytes = await crypto.hmacSha256(serverKey, authMessage) - - session.message = 'SASLResponse' - session.serverSignature = Buffer.from(serverSignatureBytes).toString('base64') - session.response = clientFinalMessageWithoutProof + ',p=' + clientProof -} - -function finalizeSession(session, serverData) { - if (session.message !== 'SASLResponse') { - throw new Error('SASL: Last message was not SASLResponse') - } - if (typeof serverData !== 'string') { - throw new Error('SASL: SCRAM-SERVER-FINAL-MESSAGE: serverData must be a string') - } - - const { serverSignature } = parseServerFinalMessage(serverData) - - if (serverSignature !== session.serverSignature) { - throw new Error('SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature does not match') - } -} - -/** - * printable = %x21-2B / %x2D-7E - * ;; Printable ASCII except ",". - * ;; Note that any "printable" is also - * ;; a valid "value". - */ -function isPrintableChars(text) { - if (typeof text !== 'string') { - throw new TypeError('SASL: text must be a string') - } - return text - .split('') - .map((_, i) => text.charCodeAt(i)) - .every((c) => (c >= 0x21 && c <= 0x2b) || (c >= 0x2d && c <= 0x7e)) -} - -/** - * base64-char = ALPHA / DIGIT / "/" / "+" - * - * base64-4 = 4base64-char - * - * base64-3 = 3base64-char "=" - * - * base64-2 = 2base64-char "==" - * - * base64 = *base64-4 [base64-3 / base64-2] - */ -function isBase64(text) { - return /^(?:[a-zA-Z0-9+/]{4})*(?:[a-zA-Z0-9+/]{2}==|[a-zA-Z0-9+/]{3}=)?$/.test(text) -} - -function parseAttributePairs(text) { - if (typeof text !== 'string') { - throw new TypeError('SASL: attribute pairs text must be a string') - } - - return new Map( - text.split(',').map((attrValue) => { - if (!/^.=/.test(attrValue)) { - throw new Error('SASL: Invalid attribute pair entry') - } - const name = attrValue[0] - const value = attrValue.substring(2) - return [name, value] - }) - ) -} - -function parseServerFirstMessage(data) { - const attrPairs = parseAttributePairs(data) - - const nonce = attrPairs.get('r') - if (!nonce) { - throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: nonce missing') - } else if (!isPrintableChars(nonce)) { - throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: nonce must only contain printable characters') - } - const salt = attrPairs.get('s') - if (!salt) { - throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: salt missing') - } else if (!isBase64(salt)) { - throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: salt must be base64') - } - const iterationText = attrPairs.get('i') - if (!iterationText) { - throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: iteration missing') - } else if (!/^[1-9][0-9]*$/.test(iterationText)) { - throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: invalid iteration count') - } - const iteration = parseInt(iterationText, 10) - - return { - nonce, - salt, - iteration, - } -} - -function parseServerFinalMessage(serverData) { - const attrPairs = parseAttributePairs(serverData) - const serverSignature = attrPairs.get('v') - if (!serverSignature) { - throw new Error('SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature is missing') - } else if (!isBase64(serverSignature)) { - throw new Error('SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature must be base64') - } - return { - serverSignature, - } -} - -function xorBuffers(a, b) { - if (!Buffer.isBuffer(a)) { - throw new TypeError('first argument must be a Buffer') - } - if (!Buffer.isBuffer(b)) { - throw new TypeError('second argument must be a Buffer') - } - if (a.length !== b.length) { - throw new Error('Buffer lengths must match') - } - if (a.length === 0) { - throw new Error('Buffers cannot be empty') - } - return Buffer.from(a.map((_, i) => a[i] ^ b[i])) -} - -module.exports = { - startSession, - continueSession, - finalizeSession, -} diff --git a/node_modules/pg/lib/crypto/utils-legacy.js b/node_modules/pg/lib/crypto/utils-legacy.js deleted file mode 100644 index d70fdb6..0000000 --- a/node_modules/pg/lib/crypto/utils-legacy.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict' -// This file contains crypto utility functions for versions of Node.js < 15.0.0, -// which does not support the WebCrypto.subtle API. - -const nodeCrypto = require('crypto') - -function md5(string) { - return nodeCrypto.createHash('md5').update(string, 'utf-8').digest('hex') -} - -// See AuthenticationMD5Password at https://www.postgresql.org/docs/current/static/protocol-flow.html -function postgresMd5PasswordHash(user, password, salt) { - const inner = md5(password + user) - const outer = md5(Buffer.concat([Buffer.from(inner), salt])) - return 'md5' + outer -} - -function sha256(text) { - return nodeCrypto.createHash('sha256').update(text).digest() -} - -function hashByName(hashName, text) { - hashName = hashName.replace(/(\D)-/, '$1') // e.g. SHA-256 -> SHA256 - return nodeCrypto.createHash(hashName).update(text).digest() -} - -function hmacSha256(key, msg) { - return nodeCrypto.createHmac('sha256', key).update(msg).digest() -} - -async function deriveKey(password, salt, iterations) { - return nodeCrypto.pbkdf2Sync(password, salt, iterations, 32, 'sha256') -} - -module.exports = { - postgresMd5PasswordHash, - randomBytes: nodeCrypto.randomBytes, - deriveKey, - sha256, - hashByName, - hmacSha256, - md5, -} diff --git a/node_modules/pg/lib/crypto/utils-webcrypto.js b/node_modules/pg/lib/crypto/utils-webcrypto.js deleted file mode 100644 index 65aa4a1..0000000 --- a/node_modules/pg/lib/crypto/utils-webcrypto.js +++ /dev/null @@ -1,89 +0,0 @@ -const nodeCrypto = require('crypto') - -module.exports = { - postgresMd5PasswordHash, - randomBytes, - deriveKey, - sha256, - hashByName, - hmacSha256, - md5, -} - -/** - * The Web Crypto API - grabbed from the Node.js library or the global - * @type Crypto - */ -// eslint-disable-next-line no-undef -const webCrypto = nodeCrypto.webcrypto || globalThis.crypto -/** - * The SubtleCrypto API for low level crypto operations. - * @type SubtleCrypto - */ -const subtleCrypto = webCrypto.subtle -const textEncoder = new TextEncoder() - -/** - * - * @param {*} length - * @returns - */ -function randomBytes(length) { - return webCrypto.getRandomValues(Buffer.alloc(length)) -} - -async function md5(string) { - try { - return nodeCrypto.createHash('md5').update(string, 'utf-8').digest('hex') - } catch (e) { - // `createHash()` failed so we are probably not in Node.js, use the WebCrypto API instead. - // Note that the MD5 algorithm on WebCrypto is not available in Node.js. - // This is why we cannot just use WebCrypto in all environments. - const data = typeof string === 'string' ? textEncoder.encode(string) : string - const hash = await subtleCrypto.digest('MD5', data) - return Array.from(new Uint8Array(hash)) - .map((b) => b.toString(16).padStart(2, '0')) - .join('') - } -} - -// See AuthenticationMD5Password at https://www.postgresql.org/docs/current/static/protocol-flow.html -async function postgresMd5PasswordHash(user, password, salt) { - const inner = await md5(password + user) - const outer = await md5(Buffer.concat([Buffer.from(inner), salt])) - return 'md5' + outer -} - -/** - * Create a SHA-256 digest of the given data - * @param {Buffer} data - */ -async function sha256(text) { - return await subtleCrypto.digest('SHA-256', text) -} - -async function hashByName(hashName, text) { - return await subtleCrypto.digest(hashName, text) -} - -/** - * Sign the message with the given key - * @param {ArrayBuffer} keyBuffer - * @param {string} msg - */ -async function hmacSha256(keyBuffer, msg) { - const key = await subtleCrypto.importKey('raw', keyBuffer, { name: 'HMAC', hash: 'SHA-256' }, false, ['sign']) - return await subtleCrypto.sign('HMAC', key, textEncoder.encode(msg)) -} - -/** - * Derive a key from the password and salt - * @param {string} password - * @param {Uint8Array} salt - * @param {number} iterations - */ -async function deriveKey(password, salt, iterations) { - const key = await subtleCrypto.importKey('raw', textEncoder.encode(password), 'PBKDF2', false, ['deriveBits']) - const params = { name: 'PBKDF2', hash: 'SHA-256', salt: salt, iterations: iterations } - return await subtleCrypto.deriveBits(params, key, 32 * 8, ['deriveBits']) -} diff --git a/node_modules/pg/lib/crypto/utils.js b/node_modules/pg/lib/crypto/utils.js deleted file mode 100644 index 9644b15..0000000 --- a/node_modules/pg/lib/crypto/utils.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict' - -const useLegacyCrypto = parseInt(process.versions && process.versions.node && process.versions.node.split('.')[0]) < 15 -if (useLegacyCrypto) { - // We are on an old version of Node.js that requires legacy crypto utilities. - module.exports = require('./utils-legacy') -} else { - module.exports = require('./utils-webcrypto') -} diff --git a/node_modules/pg/lib/defaults.js b/node_modules/pg/lib/defaults.js deleted file mode 100644 index 673696f..0000000 --- a/node_modules/pg/lib/defaults.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict' - -let user -try { - user = process.platform === 'win32' ? process.env.USERNAME : process.env.USER -} catch { - // ignore, e.g., Deno without --allow-env -} - -module.exports = { - // database host. defaults to localhost - host: 'localhost', - - // database user's name - user, - - // name of database to connect - database: undefined, - - // database user's password - password: null, - - // a Postgres connection string to be used instead of setting individual connection items - // NOTE: Setting this value will cause it to override any other value (such as database or user) defined - // in the defaults object. - connectionString: undefined, - - // database port - port: 5432, - - // number of rows to return at a time from a prepared statement's - // portal. 0 will return all rows at once - rows: 0, - - // binary result mode - binary: false, - - // Connection pool options - see https://github.com/brianc/node-pg-pool - - // number of connections to use in connection pool - // 0 will disable connection pooling - max: 10, - - // max milliseconds a client can go unused before it is removed - // from the pool and destroyed - idleTimeoutMillis: 30000, - - client_encoding: '', - - ssl: false, - - application_name: undefined, - - fallback_application_name: undefined, - - options: undefined, - - parseInputDatesAsUTC: false, - - // max milliseconds any query using this connection will execute for before timing out in error. - // false=unlimited - statement_timeout: false, - - // Abort any statement that waits longer than the specified duration in milliseconds while attempting to acquire a lock. - // false=unlimited - lock_timeout: false, - - // Terminate any session with an open transaction that has been idle for longer than the specified duration in milliseconds - // false=unlimited - idle_in_transaction_session_timeout: false, - - // max milliseconds to wait for query to complete (client side) - query_timeout: false, - - connect_timeout: 0, - - keepalives: 1, - - keepalives_idle: 0, -} - -const pgTypes = require('pg-types') -// save default parsers -const parseBigInteger = pgTypes.getTypeParser(20, 'text') -const parseBigIntegerArray = pgTypes.getTypeParser(1016, 'text') - -// parse int8 so you can get your count values as actual numbers -module.exports.__defineSetter__('parseInt8', function (val) { - pgTypes.setTypeParser(20, 'text', val ? pgTypes.getTypeParser(23, 'text') : parseBigInteger) - pgTypes.setTypeParser(1016, 'text', val ? pgTypes.getTypeParser(1007, 'text') : parseBigIntegerArray) -}) diff --git a/node_modules/pg/lib/index.js b/node_modules/pg/lib/index.js deleted file mode 100644 index e8b7461..0000000 --- a/node_modules/pg/lib/index.js +++ /dev/null @@ -1,73 +0,0 @@ -'use strict' - -const Client = require('./client') -const defaults = require('./defaults') -const Connection = require('./connection') -const Result = require('./result') -const utils = require('./utils') -const Pool = require('pg-pool') -const TypeOverrides = require('./type-overrides') -const { DatabaseError } = require('pg-protocol') -const { escapeIdentifier, escapeLiteral } = require('./utils') - -const poolFactory = (Client) => { - return class BoundPool extends Pool { - constructor(options) { - super(options, Client) - } - } -} - -const PG = function (clientConstructor) { - this.defaults = defaults - this.Client = clientConstructor - this.Query = this.Client.Query - this.Pool = poolFactory(this.Client) - this._pools = [] - this.Connection = Connection - this.types = require('pg-types') - this.DatabaseError = DatabaseError - this.TypeOverrides = TypeOverrides - this.escapeIdentifier = escapeIdentifier - this.escapeLiteral = escapeLiteral - this.Result = Result - this.utils = utils -} - -let clientConstructor = Client - -let forceNative = false -try { - forceNative = !!process.env.NODE_PG_FORCE_NATIVE -} catch { - // ignore, e.g., Deno without --allow-env -} - -if (forceNative) { - clientConstructor = require('./native') -} - -module.exports = new PG(clientConstructor) - -// lazy require native module...the native module may not have installed -Object.defineProperty(module.exports, 'native', { - configurable: true, - enumerable: false, - get() { - let native = null - try { - native = new PG(require('./native')) - } catch (err) { - if (err.code !== 'MODULE_NOT_FOUND') { - throw err - } - } - - // overwrite module.exports.native so that getter is never called again - Object.defineProperty(module.exports, 'native', { - value: native, - }) - - return native - }, -}) diff --git a/node_modules/pg/lib/native/client.js b/node_modules/pg/lib/native/client.js deleted file mode 100644 index d8bb4dc..0000000 --- a/node_modules/pg/lib/native/client.js +++ /dev/null @@ -1,323 +0,0 @@ -const nodeUtils = require('util') -// eslint-disable-next-line -var Native -// eslint-disable-next-line no-useless-catch -try { - // Wrap this `require()` in a try-catch to avoid upstream bundlers from complaining that this might not be available since it is an optional import - Native = require('pg-native') -} catch (e) { - throw e -} -const TypeOverrides = require('../type-overrides') -const EventEmitter = require('events').EventEmitter -const util = require('util') -const ConnectionParameters = require('../connection-parameters') - -const NativeQuery = require('./query') - -const queryQueueLengthDeprecationNotice = nodeUtils.deprecate( - () => {}, - 'Calling client.query() when the client is already executing a query is deprecated and will be removed in pg@9.0. Use async/await or an external async flow control mechanism instead.' -) - -const Client = (module.exports = function (config) { - EventEmitter.call(this) - config = config || {} - - this._Promise = config.Promise || global.Promise - this._types = new TypeOverrides(config.types) - - this.native = new Native({ - types: this._types, - }) - - this._queryQueue = [] - this._ending = false - this._connecting = false - this._connected = false - this._queryable = true - - // keep these on the object for legacy reasons - // for the time being. TODO: deprecate all this jazz - const cp = (this.connectionParameters = new ConnectionParameters(config)) - if (config.nativeConnectionString) cp.nativeConnectionString = config.nativeConnectionString - this.user = cp.user - - // "hiding" the password so it doesn't show up in stack traces - // or if the client is console.logged - Object.defineProperty(this, 'password', { - configurable: true, - enumerable: false, - writable: true, - value: cp.password, - }) - this.database = cp.database - this.host = cp.host - this.port = cp.port - - // a hash to hold named queries - this.namedQueries = {} -}) - -Client.Query = NativeQuery - -util.inherits(Client, EventEmitter) - -Client.prototype._errorAllQueries = function (err) { - const enqueueError = (query) => { - process.nextTick(() => { - query.native = this.native - query.handleError(err) - }) - } - - if (this._hasActiveQuery()) { - enqueueError(this._activeQuery) - this._activeQuery = null - } - - this._queryQueue.forEach(enqueueError) - this._queryQueue.length = 0 -} - -// connect to the backend -// pass an optional callback to be called once connected -// or with an error if there was a connection error -Client.prototype._connect = function (cb) { - const self = this - - if (this._connecting) { - process.nextTick(() => cb(new Error('Client has already been connected. You cannot reuse a client.'))) - return - } - - this._connecting = true - - this.connectionParameters.getLibpqConnectionString(function (err, conString) { - if (self.connectionParameters.nativeConnectionString) conString = self.connectionParameters.nativeConnectionString - if (err) return cb(err) - self.native.connect(conString, function (err) { - if (err) { - self.native.end() - return cb(err) - } - - // set internal states to connected - self._connected = true - - // handle connection errors from the native layer - self.native.on('error', function (err) { - self._queryable = false - self._errorAllQueries(err) - self.emit('error', err) - }) - - self.native.on('notification', function (msg) { - self.emit('notification', { - channel: msg.relname, - payload: msg.extra, - }) - }) - - // signal we are connected now - self.emit('connect') - self._pulseQueryQueue(true) - - cb(null, this) - }) - }) -} - -Client.prototype.connect = function (callback) { - if (callback) { - this._connect(callback) - return - } - - return new this._Promise((resolve, reject) => { - this._connect((error) => { - if (error) { - reject(error) - } else { - resolve(this) - } - }) - }) -} - -// send a query to the server -// this method is highly overloaded to take -// 1) string query, optional array of parameters, optional function callback -// 2) object query with { -// string query -// optional array values, -// optional function callback instead of as a separate parameter -// optional string name to name & cache the query plan -// optional string rowMode = 'array' for an array of results -// } -Client.prototype.query = function (config, values, callback) { - let query - let result - let readTimeout - let readTimeoutTimer - let queryCallback - - if (config === null || config === undefined) { - throw new TypeError('Client was passed a null or undefined query') - } else if (typeof config.submit === 'function') { - readTimeout = config.query_timeout || this.connectionParameters.query_timeout - result = query = config - // accept query(new Query(...), (err, res) => { }) style - if (typeof values === 'function') { - config.callback = values - } - } else { - readTimeout = config.query_timeout || this.connectionParameters.query_timeout - query = new NativeQuery(config, values, callback) - if (!query.callback) { - let resolveOut, rejectOut - result = new this._Promise((resolve, reject) => { - resolveOut = resolve - rejectOut = reject - }).catch((err) => { - Error.captureStackTrace(err) - throw err - }) - query.callback = (err, res) => (err ? rejectOut(err) : resolveOut(res)) - } - } - - if (readTimeout) { - queryCallback = query.callback || (() => {}) - - readTimeoutTimer = setTimeout(() => { - const error = new Error('Query read timeout') - - process.nextTick(() => { - query.handleError(error, this.connection) - }) - - queryCallback(error) - - // we already returned an error, - // just do nothing if query completes - query.callback = () => {} - - // Remove from queue - const index = this._queryQueue.indexOf(query) - if (index > -1) { - this._queryQueue.splice(index, 1) - } - - this._pulseQueryQueue() - }, readTimeout) - - query.callback = (err, res) => { - clearTimeout(readTimeoutTimer) - queryCallback(err, res) - } - } - - if (!this._queryable) { - query.native = this.native - process.nextTick(() => { - query.handleError(new Error('Client has encountered a connection error and is not queryable')) - }) - return result - } - - if (this._ending) { - query.native = this.native - process.nextTick(() => { - query.handleError(new Error('Client was closed and is not queryable')) - }) - return result - } - - if (this._queryQueue.length > 0) { - queryQueueLengthDeprecationNotice() - } - - this._queryQueue.push(query) - this._pulseQueryQueue() - return result -} - -// disconnect from the backend server -Client.prototype.end = function (cb) { - const self = this - - this._ending = true - - if (!this._connected) { - this.once('connect', this.end.bind(this, cb)) - } - let result - if (!cb) { - result = new this._Promise(function (resolve, reject) { - cb = (err) => (err ? reject(err) : resolve()) - }) - } - - this.native.end(function () { - self._connected = false - - self._errorAllQueries(new Error('Connection terminated')) - - process.nextTick(() => { - self.emit('end') - if (cb) cb() - }) - }) - return result -} - -Client.prototype._hasActiveQuery = function () { - return this._activeQuery && this._activeQuery.state !== 'error' && this._activeQuery.state !== 'end' -} - -Client.prototype._pulseQueryQueue = function (initialConnection) { - if (!this._connected) { - return - } - if (this._hasActiveQuery()) { - return - } - const query = this._queryQueue.shift() - if (!query) { - if (!initialConnection) { - this.emit('drain') - } - return - } - this._activeQuery = query - query.submit(this) - const self = this - query.once('_done', function () { - self._pulseQueryQueue() - }) -} - -// attempt to cancel an in-progress query -Client.prototype.cancel = function (query) { - if (this._activeQuery === query) { - this.native.cancel(function () {}) - } else if (this._queryQueue.indexOf(query) !== -1) { - this._queryQueue.splice(this._queryQueue.indexOf(query), 1) - } -} - -Client.prototype.ref = function () {} -Client.prototype.unref = function () {} - -Client.prototype.setTypeParser = function (oid, format, parseFn) { - return this._types.setTypeParser(oid, format, parseFn) -} - -Client.prototype.getTypeParser = function (oid, format) { - return this._types.getTypeParser(oid, format) -} - -Client.prototype.isConnected = function () { - return this._connected -} diff --git a/node_modules/pg/lib/native/index.js b/node_modules/pg/lib/native/index.js deleted file mode 100644 index eead422..0000000 --- a/node_modules/pg/lib/native/index.js +++ /dev/null @@ -1,2 +0,0 @@ -'use strict' -module.exports = require('./client') diff --git a/node_modules/pg/lib/native/query.js b/node_modules/pg/lib/native/query.js deleted file mode 100644 index e02294f..0000000 --- a/node_modules/pg/lib/native/query.js +++ /dev/null @@ -1,165 +0,0 @@ -'use strict' - -const EventEmitter = require('events').EventEmitter -const util = require('util') -const utils = require('../utils') - -const NativeQuery = (module.exports = function (config, values, callback) { - EventEmitter.call(this) - config = utils.normalizeQueryConfig(config, values, callback) - this.text = config.text - this.values = config.values - this.name = config.name - this.queryMode = config.queryMode - this.callback = config.callback - this.state = 'new' - this._arrayMode = config.rowMode === 'array' - - // if the 'row' event is listened for - // then emit them as they come in - // without setting singleRowMode to true - // this has almost no meaning because libpq - // reads all rows into memory before returning any - this._emitRowEvents = false - this.on( - 'newListener', - function (event) { - if (event === 'row') this._emitRowEvents = true - }.bind(this) - ) -}) - -util.inherits(NativeQuery, EventEmitter) - -const errorFieldMap = { - sqlState: 'code', - statementPosition: 'position', - messagePrimary: 'message', - context: 'where', - schemaName: 'schema', - tableName: 'table', - columnName: 'column', - dataTypeName: 'dataType', - constraintName: 'constraint', - sourceFile: 'file', - sourceLine: 'line', - sourceFunction: 'routine', -} - -NativeQuery.prototype.handleError = function (err) { - // copy pq error fields into the error object - const fields = this.native.pq.resultErrorFields() - if (fields) { - for (const key in fields) { - const normalizedFieldName = errorFieldMap[key] || key - err[normalizedFieldName] = fields[key] - } - } - if (this.callback) { - this.callback(err) - } else { - this.emit('error', err) - } - this.state = 'error' -} - -NativeQuery.prototype.then = function (onSuccess, onFailure) { - return this._getPromise().then(onSuccess, onFailure) -} - -NativeQuery.prototype.catch = function (callback) { - return this._getPromise().catch(callback) -} - -NativeQuery.prototype._getPromise = function () { - if (this._promise) return this._promise - this._promise = new Promise( - function (resolve, reject) { - this._once('end', resolve) - this._once('error', reject) - }.bind(this) - ) - return this._promise -} - -NativeQuery.prototype.submit = function (client) { - this.state = 'running' - const self = this - this.native = client.native - client.native.arrayMode = this._arrayMode - - let after = function (err, rows, results) { - client.native.arrayMode = false - setImmediate(function () { - self.emit('_done') - }) - - // handle possible query error - if (err) { - return self.handleError(err) - } - - // emit row events for each row in the result - if (self._emitRowEvents) { - if (results.length > 1) { - rows.forEach((rowOfRows, i) => { - rowOfRows.forEach((row) => { - self.emit('row', row, results[i]) - }) - }) - } else { - rows.forEach(function (row) { - self.emit('row', row, results) - }) - } - } - - // handle successful result - self.state = 'end' - self.emit('end', results) - if (self.callback) { - self.callback(null, results) - } - } - - if (process.domain) { - after = process.domain.bind(after) - } - - // named query - if (this.name) { - if (this.name.length > 63) { - console.error('Warning! Postgres only supports 63 characters for query names.') - console.error('You supplied %s (%s)', this.name, this.name.length) - console.error('This can cause conflicts and silent errors executing queries') - } - const values = (this.values || []).map(utils.prepareValue) - - // check if the client has already executed this named query - // if so...just execute it again - skip the planning phase - if (client.namedQueries[this.name]) { - if (this.text && client.namedQueries[this.name] !== this.text) { - const err = new Error(`Prepared statements must be unique - '${this.name}' was used for a different statement`) - return after(err) - } - return client.native.execute(this.name, values, after) - } - // plan the named query the first time, then execute it - return client.native.prepare(this.name, this.text, values.length, function (err) { - if (err) return after(err) - client.namedQueries[self.name] = self.text - return self.native.execute(self.name, values, after) - }) - } else if (this.values) { - if (!Array.isArray(this.values)) { - const err = new Error('Query values must be an array') - return after(err) - } - const vals = this.values.map(utils.prepareValue) - client.native.query(this.text, vals, after) - } else if (this.queryMode === 'extended') { - client.native.query(this.text, [], after) - } else { - client.native.query(this.text, after) - } -} diff --git a/node_modules/pg/lib/query.js b/node_modules/pg/lib/query.js deleted file mode 100644 index 64aab5f..0000000 --- a/node_modules/pg/lib/query.js +++ /dev/null @@ -1,252 +0,0 @@ -'use strict' - -const { EventEmitter } = require('events') - -const Result = require('./result') -const utils = require('./utils') - -class Query extends EventEmitter { - constructor(config, values, callback) { - super() - - config = utils.normalizeQueryConfig(config, values, callback) - - this.text = config.text - this.values = config.values - this.rows = config.rows - this.types = config.types - this.name = config.name - this.queryMode = config.queryMode - this.binary = config.binary - // use unique portal name each time - this.portal = config.portal || '' - this.callback = config.callback - this._rowMode = config.rowMode - if (process.domain && config.callback) { - this.callback = process.domain.bind(config.callback) - } - this._result = new Result(this._rowMode, this.types) - - // potential for multiple results - this._results = this._result - this._canceledDueToError = false - } - - requiresPreparation() { - if (this.queryMode === 'extended') { - return true - } - - // named queries must always be prepared - if (this.name) { - return true - } - // always prepare if there are max number of rows expected per - // portal execution - if (this.rows) { - return true - } - // don't prepare empty text queries - if (!this.text) { - return false - } - // prepare if there are values - if (!this.values) { - return false - } - return this.values.length > 0 - } - - _checkForMultirow() { - // if we already have a result with a command property - // then we've already executed one query in a multi-statement simple query - // turn our results into an array of results - if (this._result.command) { - if (!Array.isArray(this._results)) { - this._results = [this._result] - } - this._result = new Result(this._rowMode, this._result._types) - this._results.push(this._result) - } - } - - // associates row metadata from the supplied - // message with this query object - // metadata used when parsing row results - handleRowDescription(msg) { - this._checkForMultirow() - this._result.addFields(msg.fields) - this._accumulateRows = this.callback || !this.listeners('row').length - } - - handleDataRow(msg) { - let row - - if (this._canceledDueToError) { - return - } - - try { - row = this._result.parseRow(msg.fields) - } catch (err) { - this._canceledDueToError = err - return - } - - this.emit('row', row, this._result) - if (this._accumulateRows) { - this._result.addRow(row) - } - } - - handleCommandComplete(msg, connection) { - this._checkForMultirow() - this._result.addCommandComplete(msg) - // need to sync after each command complete of a prepared statement - // if we were using a row count which results in multiple calls to _getRows - if (this.rows) { - connection.sync() - } - } - - // if a named prepared statement is created with empty query text - // the backend will send an emptyQuery message but *not* a command complete message - // since we pipeline sync immediately after execute we don't need to do anything here - // unless we have rows specified, in which case we did not pipeline the initial sync call - handleEmptyQuery(connection) { - if (this.rows) { - connection.sync() - } - } - - handleError(err, connection) { - // need to sync after error during a prepared statement - if (this._canceledDueToError) { - err = this._canceledDueToError - this._canceledDueToError = false - } - // if callback supplied do not emit error event as uncaught error - // events will bubble up to node process - if (this.callback) { - return this.callback(err) - } - this.emit('error', err) - } - - handleReadyForQuery(con) { - if (this._canceledDueToError) { - return this.handleError(this._canceledDueToError, con) - } - if (this.callback) { - try { - this.callback(null, this._results) - } catch (err) { - process.nextTick(() => { - throw err - }) - } - } - this.emit('end', this._results) - } - - submit(connection) { - if (typeof this.text !== 'string' && typeof this.name !== 'string') { - return new Error('A query must have either text or a name. Supplying neither is unsupported.') - } - const previous = connection.parsedStatements[this.name] - if (this.text && previous && this.text !== previous) { - return new Error(`Prepared statements must be unique - '${this.name}' was used for a different statement`) - } - if (this.values && !Array.isArray(this.values)) { - return new Error('Query values must be an array') - } - if (this.requiresPreparation()) { - // If we're using the extended query protocol we fire off several separate commands - // to the backend. On some versions of node & some operating system versions - // the network stack writes each message separately instead of buffering them together - // causing the client & network to send more slowly. Corking & uncorking the stream - // allows node to buffer up the messages internally before sending them all off at once. - // note: we're checking for existence of cork/uncork because some versions of streams - // might not have this (cloudflare?) - connection.stream.cork && connection.stream.cork() - try { - this.prepare(connection) - } finally { - // while unlikely for this.prepare to throw, if it does & we don't uncork this stream - // this client becomes unresponsive, so put in finally block "just in case" - connection.stream.uncork && connection.stream.uncork() - } - } else { - connection.query(this.text) - } - return null - } - - hasBeenParsed(connection) { - return this.name && connection.parsedStatements[this.name] - } - - handlePortalSuspended(connection) { - this._getRows(connection, this.rows) - } - - _getRows(connection, rows) { - connection.execute({ - portal: this.portal, - rows: rows, - }) - // if we're not reading pages of rows send the sync command - // to indicate the pipeline is finished - if (!rows) { - connection.sync() - } else { - // otherwise flush the call out to read more rows - connection.flush() - } - } - - // http://developer.postgresql.org/pgdocs/postgres/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY - prepare(connection) { - // TODO refactor this poor encapsulation - if (!this.hasBeenParsed(connection)) { - connection.parse({ - text: this.text, - name: this.name, - types: this.types, - }) - } - - // because we're mapping user supplied values to - // postgres wire protocol compatible values it could - // throw an exception, so try/catch this section - try { - connection.bind({ - portal: this.portal, - statement: this.name, - values: this.values, - binary: this.binary, - valueMapper: utils.prepareValue, - }) - } catch (err) { - this.handleError(err, connection) - return - } - - connection.describe({ - type: 'P', - name: this.portal || '', - }) - - this._getRows(connection, this.rows) - } - - handleCopyInResponse(connection) { - connection.sendCopyFail('No source stream defined') - } - - handleCopyData(msg, connection) { - // noop - } -} - -module.exports = Query diff --git a/node_modules/pg/lib/result.js b/node_modules/pg/lib/result.js deleted file mode 100644 index 0ab7bb8..0000000 --- a/node_modules/pg/lib/result.js +++ /dev/null @@ -1,109 +0,0 @@ -'use strict' - -const types = require('pg-types') - -const matchRegexp = /^([A-Za-z]+)(?: (\d+))?(?: (\d+))?/ - -// result object returned from query -// in the 'end' event and also -// passed as second argument to provided callback -class Result { - constructor(rowMode, types) { - this.command = null - this.rowCount = null - this.oid = null - this.rows = [] - this.fields = [] - this._parsers = undefined - this._types = types - this.RowCtor = null - this.rowAsArray = rowMode === 'array' - if (this.rowAsArray) { - this.parseRow = this._parseRowAsArray - } - this._prebuiltEmptyResultObject = null - } - - // adds a command complete message - addCommandComplete(msg) { - let match - if (msg.text) { - // pure javascript - match = matchRegexp.exec(msg.text) - } else { - // native bindings - match = matchRegexp.exec(msg.command) - } - if (match) { - this.command = match[1] - if (match[3]) { - // COMMAND OID ROWS - this.oid = parseInt(match[2], 10) - this.rowCount = parseInt(match[3], 10) - } else if (match[2]) { - // COMMAND ROWS - this.rowCount = parseInt(match[2], 10) - } - } - } - - _parseRowAsArray(rowData) { - const row = new Array(rowData.length) - for (let i = 0, len = rowData.length; i < len; i++) { - const rawValue = rowData[i] - if (rawValue !== null) { - row[i] = this._parsers[i](rawValue) - } else { - row[i] = null - } - } - return row - } - - parseRow(rowData) { - const row = { ...this._prebuiltEmptyResultObject } - for (let i = 0, len = rowData.length; i < len; i++) { - const rawValue = rowData[i] - const field = this.fields[i].name - if (rawValue !== null) { - const v = this.fields[i].format === 'binary' ? Buffer.from(rawValue) : rawValue - row[field] = this._parsers[i](v) - } else { - row[field] = null - } - } - return row - } - - addRow(row) { - this.rows.push(row) - } - - addFields(fieldDescriptions) { - // clears field definitions - // multiple query statements in 1 action can result in multiple sets - // of rowDescriptions...eg: 'select NOW(); select 1::int;' - // you need to reset the fields - this.fields = fieldDescriptions - if (this.fields.length) { - this._parsers = new Array(fieldDescriptions.length) - } - - const row = {} - - for (let i = 0; i < fieldDescriptions.length; i++) { - const desc = fieldDescriptions[i] - row[desc.name] = null - - if (this._types) { - this._parsers[i] = this._types.getTypeParser(desc.dataTypeID, desc.format || 'text') - } else { - this._parsers[i] = types.getTypeParser(desc.dataTypeID, desc.format || 'text') - } - } - - this._prebuiltEmptyResultObject = { ...row } - } -} - -module.exports = Result diff --git a/node_modules/pg/lib/stream.js b/node_modules/pg/lib/stream.js deleted file mode 100644 index edc3018..0000000 --- a/node_modules/pg/lib/stream.js +++ /dev/null @@ -1,83 +0,0 @@ -const { getStream, getSecureStream } = getStreamFuncs() - -module.exports = { - /** - * Get a socket stream compatible with the current runtime environment. - * @returns {Duplex} - */ - getStream, - /** - * Get a TLS secured socket, compatible with the current environment, - * using the socket and other settings given in `options`. - * @returns {Duplex} - */ - getSecureStream, -} - -/** - * The stream functions that work in Node.js - */ -function getNodejsStreamFuncs() { - function getStream(ssl) { - const net = require('net') - return new net.Socket() - } - - function getSecureStream(options) { - const tls = require('tls') - return tls.connect(options) - } - return { - getStream, - getSecureStream, - } -} - -/** - * The stream functions that work in Cloudflare Workers - */ -function getCloudflareStreamFuncs() { - function getStream(ssl) { - const { CloudflareSocket } = require('pg-cloudflare') - return new CloudflareSocket(ssl) - } - - function getSecureStream(options) { - options.socket.startTls(options) - return options.socket - } - return { - getStream, - getSecureStream, - } -} - -/** - * Are we running in a Cloudflare Worker? - * - * @returns true if the code is currently running inside a Cloudflare Worker. - */ -function isCloudflareRuntime() { - // Since 2022-03-21 the `global_navigator` compatibility flag is on for Cloudflare Workers - // which means that `navigator.userAgent` will be defined. - // eslint-disable-next-line no-undef - if (typeof navigator === 'object' && navigator !== null && typeof navigator.userAgent === 'string') { - // eslint-disable-next-line no-undef - return navigator.userAgent === 'Cloudflare-Workers' - } - // In case `navigator` or `navigator.userAgent` is not defined then try a more sneaky approach - if (typeof Response === 'function') { - const resp = new Response(null, { cf: { thing: true } }) - if (typeof resp.cf === 'object' && resp.cf !== null && resp.cf.thing) { - return true - } - } - return false -} - -function getStreamFuncs() { - if (isCloudflareRuntime()) { - return getCloudflareStreamFuncs() - } - return getNodejsStreamFuncs() -} diff --git a/node_modules/pg/lib/type-overrides.js b/node_modules/pg/lib/type-overrides.js deleted file mode 100644 index 9d219e5..0000000 --- a/node_modules/pg/lib/type-overrides.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict' - -const types = require('pg-types') - -function TypeOverrides(userTypes) { - this._types = userTypes || types - this.text = {} - this.binary = {} -} - -TypeOverrides.prototype.getOverrides = function (format) { - switch (format) { - case 'text': - return this.text - case 'binary': - return this.binary - default: - return {} - } -} - -TypeOverrides.prototype.setTypeParser = function (oid, format, parseFn) { - if (typeof format === 'function') { - parseFn = format - format = 'text' - } - this.getOverrides(format)[oid] = parseFn -} - -TypeOverrides.prototype.getTypeParser = function (oid, format) { - format = format || 'text' - return this.getOverrides(format)[oid] || this._types.getTypeParser(oid, format) -} - -module.exports = TypeOverrides diff --git a/node_modules/pg/lib/utils.js b/node_modules/pg/lib/utils.js deleted file mode 100644 index e23a55e..0000000 --- a/node_modules/pg/lib/utils.js +++ /dev/null @@ -1,217 +0,0 @@ -'use strict' - -const defaults = require('./defaults') - -const util = require('util') -const { isDate } = util.types || util // Node 8 doesn't have `util.types` - -function escapeElement(elementRepresentation) { - const escaped = elementRepresentation.replace(/\\/g, '\\\\').replace(/"/g, '\\"') - - return '"' + escaped + '"' -} - -// convert a JS array to a postgres array literal -// uses comma separator so won't work for types like box that use -// a different array separator. -function arrayString(val) { - let result = '{' - for (let i = 0; i < val.length; i++) { - if (i > 0) { - result = result + ',' - } - if (val[i] === null || typeof val[i] === 'undefined') { - result = result + 'NULL' - } else if (Array.isArray(val[i])) { - result = result + arrayString(val[i]) - } else if (ArrayBuffer.isView(val[i])) { - let item = val[i] - if (!(item instanceof Buffer)) { - const buf = Buffer.from(item.buffer, item.byteOffset, item.byteLength) - if (buf.length === item.byteLength) { - item = buf - } else { - item = buf.slice(item.byteOffset, item.byteOffset + item.byteLength) - } - } - result += '\\\\x' + item.toString('hex') - } else { - result += escapeElement(prepareValue(val[i])) - } - } - result = result + '}' - return result -} - -// converts values from javascript types -// to their 'raw' counterparts for use as a postgres parameter -// note: you can override this function to provide your own conversion mechanism -// for complex types, etc... -const prepareValue = function (val, seen) { - // null and undefined are both null for postgres - if (val == null) { - return null - } - if (typeof val === 'object') { - if (val instanceof Buffer) { - return val - } - if (ArrayBuffer.isView(val)) { - const buf = Buffer.from(val.buffer, val.byteOffset, val.byteLength) - if (buf.length === val.byteLength) { - return buf - } - return buf.slice(val.byteOffset, val.byteOffset + val.byteLength) // Node.js v4 does not support those Buffer.from params - } - if (isDate(val)) { - if (defaults.parseInputDatesAsUTC) { - return dateToStringUTC(val) - } else { - return dateToString(val) - } - } - if (Array.isArray(val)) { - return arrayString(val) - } - - return prepareObject(val, seen) - } - return val.toString() -} - -function prepareObject(val, seen) { - if (val && typeof val.toPostgres === 'function') { - seen = seen || [] - if (seen.indexOf(val) !== -1) { - throw new Error('circular reference detected while preparing "' + val + '" for query') - } - seen.push(val) - - return prepareValue(val.toPostgres(prepareValue), seen) - } - return JSON.stringify(val) -} - -function dateToString(date) { - let offset = -date.getTimezoneOffset() - - let year = date.getFullYear() - const isBCYear = year < 1 - if (isBCYear) year = Math.abs(year) + 1 // negative years are 1 off their BC representation - - let ret = - String(year).padStart(4, '0') + - '-' + - String(date.getMonth() + 1).padStart(2, '0') + - '-' + - String(date.getDate()).padStart(2, '0') + - 'T' + - String(date.getHours()).padStart(2, '0') + - ':' + - String(date.getMinutes()).padStart(2, '0') + - ':' + - String(date.getSeconds()).padStart(2, '0') + - '.' + - String(date.getMilliseconds()).padStart(3, '0') - - if (offset < 0) { - ret += '-' - offset *= -1 - } else { - ret += '+' - } - - ret += String(Math.floor(offset / 60)).padStart(2, '0') + ':' + String(offset % 60).padStart(2, '0') - if (isBCYear) ret += ' BC' - return ret -} - -function dateToStringUTC(date) { - let year = date.getUTCFullYear() - const isBCYear = year < 1 - if (isBCYear) year = Math.abs(year) + 1 // negative years are 1 off their BC representation - - let ret = - String(year).padStart(4, '0') + - '-' + - String(date.getUTCMonth() + 1).padStart(2, '0') + - '-' + - String(date.getUTCDate()).padStart(2, '0') + - 'T' + - String(date.getUTCHours()).padStart(2, '0') + - ':' + - String(date.getUTCMinutes()).padStart(2, '0') + - ':' + - String(date.getUTCSeconds()).padStart(2, '0') + - '.' + - String(date.getUTCMilliseconds()).padStart(3, '0') - - ret += '+00:00' - if (isBCYear) ret += ' BC' - return ret -} - -function normalizeQueryConfig(config, values, callback) { - // can take in strings or config objects - config = typeof config === 'string' ? { text: config } : config - if (values) { - if (typeof values === 'function') { - config.callback = values - } else { - config.values = values - } - } - if (callback) { - config.callback = callback - } - return config -} - -// Ported from PostgreSQL 9.2.4 source code in src/interfaces/libpq/fe-exec.c -const escapeIdentifier = function (str) { - return '"' + str.replace(/"/g, '""') + '"' -} - -const escapeLiteral = function (str) { - let hasBackslash = false - let escaped = "'" - - if (str == null) { - return "''" - } - - if (typeof str !== 'string') { - return "''" - } - - for (let i = 0; i < str.length; i++) { - const c = str[i] - if (c === "'") { - escaped += c + c - } else if (c === '\\') { - escaped += c + c - hasBackslash = true - } else { - escaped += c - } - } - - escaped += "'" - - if (hasBackslash === true) { - escaped = ' E' + escaped - } - - return escaped -} - -module.exports = { - prepareValue: function prepareValueWrapper(value) { - // this ensures that extra arguments do not get passed into prepareValue - // by accident, eg: from calling values.map(utils.prepareValue) - return prepareValue(value) - }, - normalizeQueryConfig, - escapeIdentifier, - escapeLiteral, -} diff --git a/node_modules/pg/package.json b/node_modules/pg/package.json deleted file mode 100644 index 27f1885..0000000 --- a/node_modules/pg/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "name": "pg", - "version": "8.20.0", - "description": "PostgreSQL client - pure javascript & libpq with the same API", - "keywords": [ - "database", - "libpq", - "pg", - "postgre", - "postgres", - "postgresql", - "rdbms" - ], - "homepage": "https://github.com/brianc/node-postgres", - "repository": { - "type": "git", - "url": "git://github.com/brianc/node-postgres.git", - "directory": "packages/pg" - }, - "author": "Brian Carlson ", - "main": "./lib", - "exports": { - ".": { - "import": "./esm/index.mjs", - "require": "./lib/index.js", - "default": "./lib/index.js" - }, - "./package.json": { - "default": "./package.json" - }, - "./lib/*": "./lib/*.js", - "./lib/*.js": "./lib/*.js" - }, - "dependencies": { - "pg-connection-string": "^2.12.0", - "pg-pool": "^3.13.0", - "pg-protocol": "^1.13.0", - "pg-types": "2.2.0", - "pgpass": "1.0.5" - }, - "devDependencies": { - "@cloudflare/vitest-pool-workers": "0.8.23", - "@cloudflare/workers-types": "^4.20230404.0", - "async": "2.6.4", - "bluebird": "3.7.2", - "co": "4.6.0", - "pg-copy-streams": "0.3.0", - "typescript": "^4.0.3", - "vitest": "~3.0.9", - "wrangler": "^3.x" - }, - "optionalDependencies": { - "pg-cloudflare": "^1.3.0" - }, - "peerDependencies": { - "pg-native": ">=3.0.1" - }, - "peerDependenciesMeta": { - "pg-native": { - "optional": true - } - }, - "scripts": { - "test": "make test-all" - }, - "files": [ - "lib", - "esm", - "SPONSORS.md" - ], - "license": "MIT", - "engines": { - "node": ">= 16.0.0" - }, - "gitHead": "c9070cc8d526fca65780cedc25c1966b57cf7532" -} diff --git a/node_modules/pgpass/README.md b/node_modules/pgpass/README.md deleted file mode 100644 index bbc5193..0000000 --- a/node_modules/pgpass/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# pgpass - -[![Build Status](https://github.com/hoegaarden/pgpass/workflows/CI/badge.svg?branch=master)](https://github.com/hoegaarden/pgpass/actions?query=workflow%3ACI+branch%3Amaster) - -## Install - -```sh -npm install pgpass -``` - -## Usage -```js -var pgPass = require('pgpass'); - -var connInfo = { - 'host' : 'pgserver' , - 'user' : 'the_user_name' , -}; - -pgPass(connInfo, function(pass){ - conn_info.password = pass; - // connect to postgresql server -}); -``` - -## Description - -This module tries to read the `~/.pgpass` file (or the equivalent for windows systems). If the environment variable `PGPASSFILE` is set, this file is used instead. If everything goes right, the password from said file is passed to the callback; if the password cannot be read `undefined` is passed to the callback. - -Cases where `undefined` is returned: - -- the environment variable `PGPASSWORD` is set -- the file cannot be read (wrong permissions, no such file, ...) -- for non windows systems: the file is write-/readable by the group or by other users -- there is no matching line for the given connection info - -There should be no need to use this module directly; it is already included in `node-postgres`. - -## Configuration - -The module reads the environment variable `PGPASS_NO_DEESCAPE` to decide if the the read tokens from the password file should be de-escaped or not. Default is to do de-escaping. For further information on this see [this commit](https://github.com/postgres/postgres/commit/8d15e3ec4fcb735875a8a70a09ec0c62153c3329). - - -## Tests - -There are tests in `./test/`; including linting and coverage testing. Running `npm test` runs: - -- `jshint` -- `mocha` tests -- `jscoverage` and `mocha -R html-cov` - -You can see the coverage report in `coverage.html`. - - -## Development, Patches, Bugs, ... - -If you find Bugs or have improvements, please feel free to open a issue on GitHub. If you provide a pull request, I'm more than happy to merge them, just make sure to add tests for your changes. - -## Links - -- https://github.com/hoegaarden/node-pgpass -- http://www.postgresql.org/docs/current/static/libpq-pgpass.html -- https://wiki.postgresql.org/wiki/Pgpass -- https://github.com/postgres/postgres/blob/master/src/interfaces/libpq/fe-connect.c - -## License - -Copyright (c) 2013-2016 Hannes Hörl - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/pgpass/lib/helper.js b/node_modules/pgpass/lib/helper.js deleted file mode 100644 index f988460..0000000 --- a/node_modules/pgpass/lib/helper.js +++ /dev/null @@ -1,233 +0,0 @@ -'use strict'; - -var path = require('path') - , Stream = require('stream').Stream - , split = require('split2') - , util = require('util') - , defaultPort = 5432 - , isWin = (process.platform === 'win32') - , warnStream = process.stderr -; - - -var S_IRWXG = 56 // 00070(8) - , S_IRWXO = 7 // 00007(8) - , S_IFMT = 61440 // 00170000(8) - , S_IFREG = 32768 // 0100000(8) -; -function isRegFile(mode) { - return ((mode & S_IFMT) == S_IFREG); -} - -var fieldNames = [ 'host', 'port', 'database', 'user', 'password' ]; -var nrOfFields = fieldNames.length; -var passKey = fieldNames[ nrOfFields -1 ]; - - -function warn() { - var isWritable = ( - warnStream instanceof Stream && - true === warnStream.writable - ); - - if (isWritable) { - var args = Array.prototype.slice.call(arguments).concat("\n"); - warnStream.write( util.format.apply(util, args) ); - } -} - - -Object.defineProperty(module.exports, 'isWin', { - get : function() { - return isWin; - } , - set : function(val) { - isWin = val; - } -}); - - -module.exports.warnTo = function(stream) { - var old = warnStream; - warnStream = stream; - return old; -}; - -module.exports.getFileName = function(rawEnv){ - var env = rawEnv || process.env; - var file = env.PGPASSFILE || ( - isWin ? - path.join( env.APPDATA || './' , 'postgresql', 'pgpass.conf' ) : - path.join( env.HOME || './', '.pgpass' ) - ); - return file; -}; - -module.exports.usePgPass = function(stats, fname) { - if (Object.prototype.hasOwnProperty.call(process.env, 'PGPASSWORD')) { - return false; - } - - if (isWin) { - return true; - } - - fname = fname || ''; - - if (! isRegFile(stats.mode)) { - warn('WARNING: password file "%s" is not a plain file', fname); - return false; - } - - if (stats.mode & (S_IRWXG | S_IRWXO)) { - /* If password file is insecure, alert the user and ignore it. */ - warn('WARNING: password file "%s" has group or world access; permissions should be u=rw (0600) or less', fname); - return false; - } - - return true; -}; - - -var matcher = module.exports.match = function(connInfo, entry) { - return fieldNames.slice(0, -1).reduce(function(prev, field, idx){ - if (idx == 1) { - // the port - if ( Number( connInfo[field] || defaultPort ) === Number( entry[field] ) ) { - return prev && true; - } - } - return prev && ( - entry[field] === '*' || - entry[field] === connInfo[field] - ); - }, true); -}; - - -module.exports.getPassword = function(connInfo, stream, cb) { - var pass; - var lineStream = stream.pipe(split()); - - function onLine(line) { - var entry = parseLine(line); - if (entry && isValidEntry(entry) && matcher(connInfo, entry)) { - pass = entry[passKey]; - lineStream.end(); // -> calls onEnd(), but pass is set now - } - } - - var onEnd = function() { - stream.destroy(); - cb(pass); - }; - - var onErr = function(err) { - stream.destroy(); - warn('WARNING: error on reading file: %s', err); - cb(undefined); - }; - - stream.on('error', onErr); - lineStream - .on('data', onLine) - .on('end', onEnd) - .on('error', onErr) - ; - -}; - - -var parseLine = module.exports.parseLine = function(line) { - if (line.length < 11 || line.match(/^\s+#/)) { - return null; - } - - var curChar = ''; - var prevChar = ''; - var fieldIdx = 0; - var startIdx = 0; - var endIdx = 0; - var obj = {}; - var isLastField = false; - var addToObj = function(idx, i0, i1) { - var field = line.substring(i0, i1); - - if (! Object.hasOwnProperty.call(process.env, 'PGPASS_NO_DEESCAPE')) { - field = field.replace(/\\([:\\])/g, '$1'); - } - - obj[ fieldNames[idx] ] = field; - }; - - for (var i = 0 ; i < line.length-1 ; i += 1) { - curChar = line.charAt(i+1); - prevChar = line.charAt(i); - - isLastField = (fieldIdx == nrOfFields-1); - - if (isLastField) { - addToObj(fieldIdx, startIdx); - break; - } - - if (i >= 0 && curChar == ':' && prevChar !== '\\') { - addToObj(fieldIdx, startIdx, i+1); - - startIdx = i+2; - fieldIdx += 1; - } - } - - obj = ( Object.keys(obj).length === nrOfFields ) ? obj : null; - - return obj; -}; - - -var isValidEntry = module.exports.isValidEntry = function(entry){ - var rules = { - // host - 0 : function(x){ - return x.length > 0; - } , - // port - 1 : function(x){ - if (x === '*') { - return true; - } - x = Number(x); - return ( - isFinite(x) && - x > 0 && - x < 9007199254740992 && - Math.floor(x) === x - ); - } , - // database - 2 : function(x){ - return x.length > 0; - } , - // username - 3 : function(x){ - return x.length > 0; - } , - // password - 4 : function(x){ - return x.length > 0; - } - }; - - for (var idx = 0 ; idx < fieldNames.length ; idx += 1) { - var rule = rules[idx]; - var value = entry[ fieldNames[idx] ] || ''; - - var res = rule(value); - if (!res) { - return false; - } - } - - return true; -}; - diff --git a/node_modules/pgpass/lib/index.js b/node_modules/pgpass/lib/index.js deleted file mode 100644 index ecfcf30..0000000 --- a/node_modules/pgpass/lib/index.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -var path = require('path') - , fs = require('fs') - , helper = require('./helper.js') -; - - -module.exports = function(connInfo, cb) { - var file = helper.getFileName(); - - fs.stat(file, function(err, stat){ - if (err || !helper.usePgPass(stat, file)) { - return cb(undefined); - } - - var st = fs.createReadStream(file); - - helper.getPassword(connInfo, st, cb); - }); -}; - -module.exports.warnTo = helper.warnTo; diff --git a/node_modules/pgpass/package.json b/node_modules/pgpass/package.json deleted file mode 100644 index 22bfe84..0000000 --- a/node_modules/pgpass/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "pgpass", - "version": "1.0.5", - "description": "Module for reading .pgpass", - "main": "lib/index", - "scripts": { - "pretest": "chmod 600 ./test/_pgpass", - "_hint": "jshint --exclude node_modules --verbose lib test", - "_test": "mocha --recursive -R list", - "_covered_test": "nyc --reporter html --reporter text \"$npm_execpath\" run _test", - "test": "\"$npm_execpath\" run _hint && \"$npm_execpath\" run _covered_test" - }, - "author": "Hannes Hörl ", - "license": "MIT", - "dependencies": { - "split2": "^4.1.0" - }, - "devDependencies": { - "jshint": "^2.12.0", - "mocha": "^8.2.0", - "nyc": "^15.1.0", - "pg": "^8.4.1", - "pg-escape": "^0.2.0", - "pg-native": "3.0.0", - "resumer": "0.0.0", - "tmp": "^0.2.1", - "which": "^2.0.2" - }, - "keywords": [ - "postgres", - "pg", - "pgpass", - "password", - "postgresql" - ], - "bugs": "https://github.com/hoegaarden/pgpass/issues", - "repository": { - "type": "git", - "url": "https://github.com/hoegaarden/pgpass.git" - } -} diff --git a/node_modules/picomatch/CHANGELOG.md b/node_modules/picomatch/CHANGELOG.md deleted file mode 100644 index 8ccc6c1..0000000 --- a/node_modules/picomatch/CHANGELOG.md +++ /dev/null @@ -1,136 +0,0 @@ -# Release history - -**All notable changes to this project will be documented in this file.** - -The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - -

- Guiding Principles - -- Changelogs are for humans, not machines. -- There should be an entry for every single version. -- The same types of changes should be grouped. -- Versions and sections should be linkable. -- The latest version comes first. -- The release date of each versions is displayed. -- Mention whether you follow Semantic Versioning. - -
- -
- Types of changes - -Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): - -- `Added` for new features. -- `Changed` for changes in existing functionality. -- `Deprecated` for soon-to-be removed features. -- `Removed` for now removed features. -- `Fixed` for any bug fixes. -- `Security` in case of vulnerabilities. - -
- -## 2.3.1 (2022-01-02) - -### Fixed - -* Fixes bug when a pattern containing an expression after the closing parenthesis (`/!(*.d).{ts,tsx}`) was incorrectly converted to regexp ([9f241ef](https://github.com/micromatch/picomatch/commit/9f241ef)). - -### Changed - -* Some documentation improvements ([f81d236](https://github.com/micromatch/picomatch/commit/f81d236), [421e0e7](https://github.com/micromatch/picomatch/commit/421e0e7)). - -## 2.3.0 (2021-05-21) - -### Fixed - -* Fixes bug where file names with two dots were not being matched consistently with negation extglobs containing a star ([56083ef](https://github.com/micromatch/picomatch/commit/56083ef)) - -## 2.2.3 (2021-04-10) - -### Fixed - -* Do not skip pattern seperator for square brackets ([fb08a30](https://github.com/micromatch/picomatch/commit/fb08a30)). -* Set negatedExtGlob also if it does not span the whole pattern ([032e3f5](https://github.com/micromatch/picomatch/commit/032e3f5)). - -## 2.2.2 (2020-03-21) - -### Fixed - -* Correctly handle parts of the pattern after parentheses in the `scan` method ([e15b920](https://github.com/micromatch/picomatch/commit/e15b920)). - -## 2.2.1 (2020-01-04) - -* Fixes [#49](https://github.com/micromatch/picomatch/issues/49), so that braces with no sets or ranges are now propertly treated as literals. - -## 2.2.0 (2020-01-04) - -* Disable fastpaths mode for the parse method ([5b8d33f](https://github.com/micromatch/picomatch/commit/5b8d33f)) -* Add `tokens`, `slashes`, and `parts` to the object returned by `picomatch.scan()`. - -## 2.1.0 (2019-10-31) - -* add benchmarks for scan ([4793b92](https://github.com/micromatch/picomatch/commit/4793b92)) -* Add eslint object-curly-spacing rule ([707c650](https://github.com/micromatch/picomatch/commit/707c650)) -* Add prefer-const eslint rule ([5c7501c](https://github.com/micromatch/picomatch/commit/5c7501c)) -* Add support for nonegate in scan API ([275c9b9](https://github.com/micromatch/picomatch/commit/275c9b9)) -* Change lets to consts. Move root import up. ([4840625](https://github.com/micromatch/picomatch/commit/4840625)) -* closes https://github.com/micromatch/picomatch/issues/21 ([766bcb0](https://github.com/micromatch/picomatch/commit/766bcb0)) -* Fix "Extglobs" table in readme ([eb19da8](https://github.com/micromatch/picomatch/commit/eb19da8)) -* fixes https://github.com/micromatch/picomatch/issues/20 ([9caca07](https://github.com/micromatch/picomatch/commit/9caca07)) -* fixes https://github.com/micromatch/picomatch/issues/26 ([fa58f45](https://github.com/micromatch/picomatch/commit/fa58f45)) -* Lint test ([d433a34](https://github.com/micromatch/picomatch/commit/d433a34)) -* lint unit tests ([0159b55](https://github.com/micromatch/picomatch/commit/0159b55)) -* Make scan work with noext ([6c02e03](https://github.com/micromatch/picomatch/commit/6c02e03)) -* minor linting ([c2a2b87](https://github.com/micromatch/picomatch/commit/c2a2b87)) -* minor parser improvements ([197671d](https://github.com/micromatch/picomatch/commit/197671d)) -* remove eslint since it... ([07876fa](https://github.com/micromatch/picomatch/commit/07876fa)) -* remove funding file ([8ebe96d](https://github.com/micromatch/picomatch/commit/8ebe96d)) -* Remove unused funks ([cbc6d54](https://github.com/micromatch/picomatch/commit/cbc6d54)) -* Run eslint during pretest, fix existing eslint findings ([0682367](https://github.com/micromatch/picomatch/commit/0682367)) -* support `noparen` in scan ([3d37569](https://github.com/micromatch/picomatch/commit/3d37569)) -* update changelog ([7b34e77](https://github.com/micromatch/picomatch/commit/7b34e77)) -* update travis ([777f038](https://github.com/micromatch/picomatch/commit/777f038)) -* Use eslint-disable-next-line instead of eslint-disable ([4e7c1fd](https://github.com/micromatch/picomatch/commit/4e7c1fd)) - -## 2.0.7 (2019-05-14) - -* 2.0.7 ([9eb9a71](https://github.com/micromatch/picomatch/commit/9eb9a71)) -* supports lookbehinds ([1f63f7e](https://github.com/micromatch/picomatch/commit/1f63f7e)) -* update .verb.md file with typo change ([2741279](https://github.com/micromatch/picomatch/commit/2741279)) -* fix: typo in README ([0753e44](https://github.com/micromatch/picomatch/commit/0753e44)) - -## 2.0.4 (2019-04-10) - -### Fixed - -- Readme link [fixed](https://github.com/micromatch/picomatch/pull/13/commits/a96ab3aa2b11b6861c23289964613d85563b05df) by @danez. -- `options.capture` now works as expected when fastpaths are enabled. See https://github.com/micromatch/picomatch/pull/12/commits/26aefd71f1cfaf95c37f1c1fcab68a693b037304. Thanks to @DrPizza. - -## 2.0.0 (2019-04-10) - -### Added - -- Adds support for `options.onIgnore`. See the readme for details -- Adds support for `options.onResult`. See the readme for details - -### Breaking changes - -- The unixify option was renamed to `windows` -- caching and all related options and methods have been removed - -## 1.0.0 (2018-11-05) - -- adds `.onMatch` option -- improvements to `.scan` method -- numerous improvements and optimizations for matching and parsing -- better windows path handling - -## 0.1.0 - 2017-04-13 - -First release. - - -[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog diff --git a/node_modules/picomatch/LICENSE b/node_modules/picomatch/LICENSE deleted file mode 100644 index 3608dca..0000000 --- a/node_modules/picomatch/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017-present, Jon Schlinkert. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/picomatch/README.md b/node_modules/picomatch/README.md deleted file mode 100644 index b0526e2..0000000 --- a/node_modules/picomatch/README.md +++ /dev/null @@ -1,708 +0,0 @@ -

Picomatch

- -

- -version - - -test status - - -coverage status - - -downloads - -

- -
-
- -

-Blazing fast and accurate glob matcher written in JavaScript.
-No dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions. -

- -
-
- -## Why picomatch? - -* **Lightweight** - No dependencies -* **Minimal** - Tiny API surface. Main export is a function that takes a glob pattern and returns a matcher function. -* **Fast** - Loads in about 2ms (that's several times faster than a [single frame of a HD movie](http://www.endmemo.com/sconvert/framespersecondframespermillisecond.php) at 60fps) -* **Performant** - Use the returned matcher function to speed up repeat matching (like when watching files) -* **Accurate matching** - Using wildcards (`*` and `?`), globstars (`**`) for nested directories, [advanced globbing](#advanced-globbing) with extglobs, braces, and POSIX brackets, and support for escaping special characters with `\` or quotes. -* **Well tested** - Thousands of unit tests - -See the [library comparison](#library-comparisons) to other libraries. - -
-
- -## Table of Contents - -
Click to expand - -- [Install](#install) -- [Usage](#usage) -- [API](#api) - * [picomatch](#picomatch) - * [.test](#test) - * [.matchBase](#matchbase) - * [.isMatch](#ismatch) - * [.parse](#parse) - * [.scan](#scan) - * [.compileRe](#compilere) - * [.makeRe](#makere) - * [.toRegex](#toregex) -- [Options](#options) - * [Picomatch options](#picomatch-options) - * [Scan Options](#scan-options) - * [Options Examples](#options-examples) -- [Globbing features](#globbing-features) - * [Basic globbing](#basic-globbing) - * [Advanced globbing](#advanced-globbing) - * [Braces](#braces) - * [Matching special characters as literals](#matching-special-characters-as-literals) -- [Library Comparisons](#library-comparisons) -- [Benchmarks](#benchmarks) -- [Philosophies](#philosophies) -- [About](#about) - * [Author](#author) - * [License](#license) - -_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_ - -
- -
-
- -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -npm install --save picomatch -``` - -
- -## Usage - -The main export is a function that takes a glob pattern and an options object and returns a function for matching strings. - -```js -const pm = require('picomatch'); -const isMatch = pm('*.js'); - -console.log(isMatch('abcd')); //=> false -console.log(isMatch('a.js')); //=> true -console.log(isMatch('a.md')); //=> false -console.log(isMatch('a/b.js')); //=> false -``` - -
- -## API - -### [picomatch](lib/picomatch.js#L32) - -Creates a matcher function from one or more glob patterns. The returned function takes a string to match as its first argument, and returns true if the string is a match. The returned matcher function also takes a boolean as the second argument that, when true, returns an object with additional information. - -**Params** - -* `globs` **{String|Array}**: One or more glob patterns. -* `options` **{Object=}** -* `returns` **{Function=}**: Returns a matcher function. - -**Example** - -```js -const picomatch = require('picomatch'); -// picomatch(glob[, options]); - -const isMatch = picomatch('*.!(*a)'); -console.log(isMatch('a.a')); //=> false -console.log(isMatch('a.b')); //=> true -``` - -### [.test](lib/picomatch.js#L117) - -Test `input` with the given `regex`. This is used by the main `picomatch()` function to test the input string. - -**Params** - -* `input` **{String}**: String to test. -* `regex` **{RegExp}** -* `returns` **{Object}**: Returns an object with matching info. - -**Example** - -```js -const picomatch = require('picomatch'); -// picomatch.test(input, regex[, options]); - -console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); -// { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } -``` - -### [.matchBase](lib/picomatch.js#L161) - -Match the basename of a filepath. - -**Params** - -* `input` **{String}**: String to test. -* `glob` **{RegExp|String}**: Glob pattern or regex created by [.makeRe](#makeRe). -* `returns` **{Boolean}** - -**Example** - -```js -const picomatch = require('picomatch'); -// picomatch.matchBase(input, glob[, options]); -console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true -``` - -### [.isMatch](lib/picomatch.js#L183) - -Returns true if **any** of the given glob `patterns` match the specified `string`. - -**Params** - -* **{String|Array}**: str The string to test. -* **{String|Array}**: patterns One or more glob patterns to use for matching. -* **{Object}**: See available [options](#options). -* `returns` **{Boolean}**: Returns true if any patterns match `str` - -**Example** - -```js -const picomatch = require('picomatch'); -// picomatch.isMatch(string, patterns[, options]); - -console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true -console.log(picomatch.isMatch('a.a', 'b.*')); //=> false -``` - -### [.parse](lib/picomatch.js#L199) - -Parse a glob pattern to create the source string for a regular expression. - -**Params** - -* `pattern` **{String}** -* `options` **{Object}** -* `returns` **{Object}**: Returns an object with useful properties and output to be used as a regex source string. - -**Example** - -```js -const picomatch = require('picomatch'); -const result = picomatch.parse(pattern[, options]); -``` - -### [.scan](lib/picomatch.js#L231) - -Scan a glob pattern to separate the pattern into segments. - -**Params** - -* `input` **{String}**: Glob pattern to scan. -* `options` **{Object}** -* `returns` **{Object}**: Returns an object with - -**Example** - -```js -const picomatch = require('picomatch'); -// picomatch.scan(input[, options]); - -const result = picomatch.scan('!./foo/*.js'); -console.log(result); -{ prefix: '!./', - input: '!./foo/*.js', - start: 3, - base: 'foo', - glob: '*.js', - isBrace: false, - isBracket: false, - isGlob: true, - isExtglob: false, - isGlobstar: false, - negated: true } -``` - -### [.compileRe](lib/picomatch.js#L245) - -Compile a regular expression from the `state` object returned by the -[parse()](#parse) method. - -**Params** - -* `state` **{Object}** -* `options` **{Object}** -* `returnOutput` **{Boolean}**: Intended for implementors, this argument allows you to return the raw output from the parser. -* `returnState` **{Boolean}**: Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. -* `returns` **{RegExp}** - -### [.makeRe](lib/picomatch.js#L286) - -Create a regular expression from a parsed glob pattern. - -**Params** - -* `state` **{String}**: The object returned from the `.parse` method. -* `options` **{Object}** -* `returnOutput` **{Boolean}**: Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. -* `returnState` **{Boolean}**: Implementors may use this argument to return the state from the parsed glob with the returned regular expression. -* `returns` **{RegExp}**: Returns a regex created from the given pattern. - -**Example** - -```js -const picomatch = require('picomatch'); -const state = picomatch.parse('*.js'); -// picomatch.compileRe(state[, options]); - -console.log(picomatch.compileRe(state)); -//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ -``` - -### [.toRegex](lib/picomatch.js#L321) - -Create a regular expression from the given regex source string. - -**Params** - -* `source` **{String}**: Regular expression source string. -* `options` **{Object}** -* `returns` **{RegExp}** - -**Example** - -```js -const picomatch = require('picomatch'); -// picomatch.toRegex(source[, options]); - -const { output } = picomatch.parse('*.js'); -console.log(picomatch.toRegex(output)); -//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ -``` - -
- -## Options - -### Picomatch options - -The following options may be used with the main `picomatch()` function or any of the methods on the picomatch API. - -| **Option** | **Type** | **Default value** | **Description** | -| --- | --- | --- | --- | -| `basename` | `boolean` | `false` | If set, then patterns without slashes will be matched against the basename of the path if it contains slashes. For example, `a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. | -| `bash` | `boolean` | `false` | Follow bash matching rules more strictly - disallows backslashes as escape characters, and treats single stars as globstars (`**`). | -| `capture` | `boolean` | `undefined` | Return regex matches in supporting methods. | -| `contains` | `boolean` | `undefined` | Allows glob to match any part of the given string(s). | -| `cwd` | `string` | `process.cwd()` | Current working directory. Used by `picomatch.split()` | -| `debug` | `boolean` | `undefined` | Debug regular expressions when an error is thrown. | -| `dot` | `boolean` | `false` | Enable dotfile matching. By default, dotfiles are ignored unless a `.` is explicitly defined in the pattern, or `options.dot` is true | -| `expandRange` | `function` | `undefined` | Custom function for expanding ranges in brace patterns, such as `{a..z}`. The function receives the range values as two arguments, and it must return a string to be used in the generated regex. It's recommended that returned strings be wrapped in parentheses. | -| `failglob` | `boolean` | `false` | Throws an error if no matches are found. Based on the bash option of the same name. | -| `fastpaths` | `boolean` | `true` | To speed up processing, full parsing is skipped for a handful common glob patterns. Disable this behavior by setting this option to `false`. | -| `flags` | `string` | `undefined` | Regex flags to use in the generated regex. If defined, the `nocase` option will be overridden. | -| [format](#optionsformat) | `function` | `undefined` | Custom function for formatting the returned string. This is useful for removing leading slashes, converting Windows paths to Posix paths, etc. | -| `ignore` | `array\|string` | `undefined` | One or more glob patterns for excluding strings that should not be matched from the result. | -| `keepQuotes` | `boolean` | `false` | Retain quotes in the generated regex, since quotes may also be used as an alternative to backslashes. | -| `literalBrackets` | `boolean` | `undefined` | When `true`, brackets in the glob pattern will be escaped so that only literal brackets will be matched. | -| `matchBase` | `boolean` | `false` | Alias for `basename` | -| `maxLength` | `boolean` | `65536` | Limit the max length of the input string. An error is thrown if the input string is longer than this value. | -| `nobrace` | `boolean` | `false` | Disable brace matching, so that `{a,b}` and `{1..3}` would be treated as literal characters. | -| `nobracket` | `boolean` | `undefined` | Disable matching with regex brackets. | -| `nocase` | `boolean` | `false` | Make matching case-insensitive. Equivalent to the regex `i` flag. Note that this option is overridden by the `flags` option. | -| `nodupes` | `boolean` | `true` | Deprecated, use `nounique` instead. This option will be removed in a future major release. By default duplicates are removed. Disable uniquification by setting this option to false. | -| `noext` | `boolean` | `false` | Alias for `noextglob` | -| `noextglob` | `boolean` | `false` | Disable support for matching with extglobs (like `+(a\|b)`) | -| `noglobstar` | `boolean` | `false` | Disable support for matching nested directories with globstars (`**`) | -| `nonegate` | `boolean` | `false` | Disable support for negating with leading `!` | -| `noquantifiers` | `boolean` | `false` | Disable support for regex quantifiers (like `a{1,2}`) and treat them as brace patterns to be expanded. | -| [onIgnore](#optionsonIgnore) | `function` | `undefined` | Function to be called on ignored items. | -| [onMatch](#optionsonMatch) | `function` | `undefined` | Function to be called on matched items. | -| [onResult](#optionsonResult) | `function` | `undefined` | Function to be called on all items, regardless of whether or not they are matched or ignored. | -| `posix` | `boolean` | `false` | Support POSIX character classes ("posix brackets"). | -| `posixSlashes` | `boolean` | `undefined` | Convert all slashes in file paths to forward slashes. This does not convert slashes in the glob pattern itself | -| `prepend` | `boolean` | `undefined` | String to prepend to the generated regex used for matching. | -| `regex` | `boolean` | `false` | Use regular expression rules for `+` (instead of matching literal `+`), and for stars that follow closing parentheses or brackets (as in `)*` and `]*`). | -| `strictBrackets` | `boolean` | `undefined` | Throw an error if brackets, braces, or parens are imbalanced. | -| `strictSlashes` | `boolean` | `undefined` | When true, picomatch won't match trailing slashes with single stars. | -| `unescape` | `boolean` | `undefined` | Remove backslashes preceding escaped characters in the glob pattern. By default, backslashes are retained. | -| `unixify` | `boolean` | `undefined` | Alias for `posixSlashes`, for backwards compatibility. | - -picomatch has automatic detection for regex positive and negative lookbehinds. If the pattern contains a negative lookbehind, you must be using Node.js >= 8.10 or else picomatch will throw an error. - -### Scan Options - -In addition to the main [picomatch options](#picomatch-options), the following options may also be used with the [.scan](#scan) method. - -| **Option** | **Type** | **Default value** | **Description** | -| --- | --- | --- | --- | -| `tokens` | `boolean` | `false` | When `true`, the returned object will include an array of tokens (objects), representing each path "segment" in the scanned glob pattern | -| `parts` | `boolean` | `false` | When `true`, the returned object will include an array of strings representing each path "segment" in the scanned glob pattern. This is automatically enabled when `options.tokens` is true | - -**Example** - -```js -const picomatch = require('picomatch'); -const result = picomatch.scan('!./foo/*.js', { tokens: true }); -console.log(result); -// { -// prefix: '!./', -// input: '!./foo/*.js', -// start: 3, -// base: 'foo', -// glob: '*.js', -// isBrace: false, -// isBracket: false, -// isGlob: true, -// isExtglob: false, -// isGlobstar: false, -// negated: true, -// maxDepth: 2, -// tokens: [ -// { value: '!./', depth: 0, isGlob: false, negated: true, isPrefix: true }, -// { value: 'foo', depth: 1, isGlob: false }, -// { value: '*.js', depth: 1, isGlob: true } -// ], -// slashes: [ 2, 6 ], -// parts: [ 'foo', '*.js' ] -// } -``` - -
- -### Options Examples - -#### options.expandRange - -**Type**: `function` - -**Default**: `undefined` - -Custom function for expanding ranges in brace patterns. The [fill-range](https://github.com/jonschlinkert/fill-range) library is ideal for this purpose, or you can use custom code to do whatever you need. - -**Example** - -The following example shows how to create a glob that matches a folder - -```js -const fill = require('fill-range'); -const regex = pm.makeRe('foo/{01..25}/bar', { - expandRange(a, b) { - return `(${fill(a, b, { toRegex: true })})`; - } -}); - -console.log(regex); -//=> /^(?:foo\/((?:0[1-9]|1[0-9]|2[0-5]))\/bar)$/ - -console.log(regex.test('foo/00/bar')) // false -console.log(regex.test('foo/01/bar')) // true -console.log(regex.test('foo/10/bar')) // true -console.log(regex.test('foo/22/bar')) // true -console.log(regex.test('foo/25/bar')) // true -console.log(regex.test('foo/26/bar')) // false -``` - -#### options.format - -**Type**: `function` - -**Default**: `undefined` - -Custom function for formatting strings before they're matched. - -**Example** - -```js -// strip leading './' from strings -const format = str => str.replace(/^\.\//, ''); -const isMatch = picomatch('foo/*.js', { format }); -console.log(isMatch('./foo/bar.js')); //=> true -``` - -#### options.onMatch - -```js -const onMatch = ({ glob, regex, input, output }) => { - console.log({ glob, regex, input, output }); -}; - -const isMatch = picomatch('*', { onMatch }); -isMatch('foo'); -isMatch('bar'); -isMatch('baz'); -``` - -#### options.onIgnore - -```js -const onIgnore = ({ glob, regex, input, output }) => { - console.log({ glob, regex, input, output }); -}; - -const isMatch = picomatch('*', { onIgnore, ignore: 'f*' }); -isMatch('foo'); -isMatch('bar'); -isMatch('baz'); -``` - -#### options.onResult - -```js -const onResult = ({ glob, regex, input, output }) => { - console.log({ glob, regex, input, output }); -}; - -const isMatch = picomatch('*', { onResult, ignore: 'f*' }); -isMatch('foo'); -isMatch('bar'); -isMatch('baz'); -``` - -
-
- -## Globbing features - -* [Basic globbing](#basic-globbing) (Wildcard matching) -* [Advanced globbing](#advanced-globbing) (extglobs, posix brackets, brace matching) - -### Basic globbing - -| **Character** | **Description** | -| --- | --- | -| `*` | Matches any character zero or more times, excluding path separators. Does _not match_ path separators or hidden files or directories ("dotfiles"), unless explicitly enabled by setting the `dot` option to `true`. | -| `**` | Matches any character zero or more times, including path separators. Note that `**` will only match path separators (`/`, and `\\` on Windows) when they are the only characters in a path segment. Thus, `foo**/bar` is equivalent to `foo*/bar`, and `foo/a**b/bar` is equivalent to `foo/a*b/bar`, and _more than two_ consecutive stars in a glob path segment are regarded as _a single star_. Thus, `foo/***/bar` is equivalent to `foo/*/bar`. | -| `?` | Matches any character excluding path separators one time. Does _not match_ path separators or leading dots. | -| `[abc]` | Matches any characters inside the brackets. For example, `[abc]` would match the characters `a`, `b` or `c`, and nothing else. | - -#### Matching behavior vs. Bash - -Picomatch's matching features and expected results in unit tests are based on Bash's unit tests and the Bash 4.3 specification, with the following exceptions: - -* Bash will match `foo/bar/baz` with `*`. Picomatch only matches nested directories with `**`. -* Bash greedily matches with negated extglobs. For example, Bash 4.3 says that `!(foo)*` should match `foo` and `foobar`, since the trailing `*` bracktracks to match the preceding pattern. This is very memory-inefficient, and IMHO, also incorrect. Picomatch would return `false` for both `foo` and `foobar`. - -
- -### Advanced globbing - -* [extglobs](#extglobs) -* [POSIX brackets](#posix-brackets) -* [Braces](#brace-expansion) - -#### Extglobs - -| **Pattern** | **Description** | -| --- | --- | -| `@(pattern)` | Match _only one_ consecutive occurrence of `pattern` | -| `*(pattern)` | Match _zero or more_ consecutive occurrences of `pattern` | -| `+(pattern)` | Match _one or more_ consecutive occurrences of `pattern` | -| `?(pattern)` | Match _zero or **one**_ consecutive occurrences of `pattern` | -| `!(pattern)` | Match _anything but_ `pattern` | - -**Examples** - -```js -const pm = require('picomatch'); - -// *(pattern) matches ZERO or more of "pattern" -console.log(pm.isMatch('a', 'a*(z)')); // true -console.log(pm.isMatch('az', 'a*(z)')); // true -console.log(pm.isMatch('azzz', 'a*(z)')); // true - -// +(pattern) matches ONE or more of "pattern" -console.log(pm.isMatch('a', 'a*(z)')); // true -console.log(pm.isMatch('az', 'a*(z)')); // true -console.log(pm.isMatch('azzz', 'a*(z)')); // true - -// supports multiple extglobs -console.log(pm.isMatch('foo.bar', '!(foo).!(bar)')); // false - -// supports nested extglobs -console.log(pm.isMatch('foo.bar', '!(!(foo)).!(!(bar))')); // true -``` - -#### POSIX brackets - -POSIX classes are disabled by default. Enable this feature by setting the `posix` option to true. - -**Enable POSIX bracket support** - -```js -console.log(pm.makeRe('[[:word:]]+', { posix: true })); -//=> /^(?:(?=.)[A-Za-z0-9_]+\/?)$/ -``` - -**Supported POSIX classes** - -The following named POSIX bracket expressions are supported: - -* `[:alnum:]` - Alphanumeric characters, equ `[a-zA-Z0-9]` -* `[:alpha:]` - Alphabetical characters, equivalent to `[a-zA-Z]`. -* `[:ascii:]` - ASCII characters, equivalent to `[\\x00-\\x7F]`. -* `[:blank:]` - Space and tab characters, equivalent to `[ \\t]`. -* `[:cntrl:]` - Control characters, equivalent to `[\\x00-\\x1F\\x7F]`. -* `[:digit:]` - Numerical digits, equivalent to `[0-9]`. -* `[:graph:]` - Graph characters, equivalent to `[\\x21-\\x7E]`. -* `[:lower:]` - Lowercase letters, equivalent to `[a-z]`. -* `[:print:]` - Print characters, equivalent to `[\\x20-\\x7E ]`. -* `[:punct:]` - Punctuation and symbols, equivalent to `[\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~]`. -* `[:space:]` - Extended space characters, equivalent to `[ \\t\\r\\n\\v\\f]`. -* `[:upper:]` - Uppercase letters, equivalent to `[A-Z]`. -* `[:word:]` - Word characters (letters, numbers and underscores), equivalent to `[A-Za-z0-9_]`. -* `[:xdigit:]` - Hexadecimal digits, equivalent to `[A-Fa-f0-9]`. - -See the [Bash Reference Manual](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html) for more information. - -### Braces - -Picomatch does not do brace expansion. For [brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html) and advanced matching with braces, use [micromatch](https://github.com/micromatch/micromatch) instead. Picomatch has very basic support for braces. - -### Matching special characters as literals - -If you wish to match the following special characters in a filepath, and you want to use these characters in your glob pattern, they must be escaped with backslashes or quotes: - -**Special Characters** - -Some characters that are used for matching in regular expressions are also regarded as valid file path characters on some platforms. - -To match any of the following characters as literals: `$^*+?()[] - -Examples: - -```js -console.log(pm.makeRe('foo/bar \\(1\\)')); -console.log(pm.makeRe('foo/bar \\(1\\)')); -``` - -
-
- -## Library Comparisons - -The following table shows which features are supported by [minimatch](https://github.com/isaacs/minimatch), [micromatch](https://github.com/micromatch/micromatch), [picomatch](https://github.com/micromatch/picomatch), [nanomatch](https://github.com/micromatch/nanomatch), [extglob](https://github.com/micromatch/extglob), [braces](https://github.com/micromatch/braces), and [expand-brackets](https://github.com/micromatch/expand-brackets). - -| **Feature** | `minimatch` | `micromatch` | `picomatch` | `nanomatch` | `extglob` | `braces` | `expand-brackets` | -| --- | --- | --- | --- | --- | --- | --- | --- | -| Wildcard matching (`*?+`) | ✔ | ✔ | ✔ | ✔ | - | - | - | -| Advancing globbing | ✔ | ✔ | ✔ | - | - | - | - | -| Brace _matching_ | ✔ | ✔ | ✔ | - | - | ✔ | - | -| Brace _expansion_ | ✔ | ✔ | - | - | - | ✔ | - | -| Extglobs | partial | ✔ | ✔ | - | ✔ | - | - | -| Posix brackets | - | ✔ | ✔ | - | - | - | ✔ | -| Regular expression syntax | - | ✔ | ✔ | ✔ | ✔ | - | ✔ | -| File system operations | - | - | - | - | - | - | - | - -
-
- -## Benchmarks - -Performance comparison of picomatch and minimatch. - -``` -# .makeRe star - picomatch x 1,993,050 ops/sec ±0.51% (91 runs sampled) - minimatch x 627,206 ops/sec ±1.96% (87 runs sampled)) - -# .makeRe star; dot=true - picomatch x 1,436,640 ops/sec ±0.62% (91 runs sampled) - minimatch x 525,876 ops/sec ±0.60% (88 runs sampled) - -# .makeRe globstar - picomatch x 1,592,742 ops/sec ±0.42% (90 runs sampled) - minimatch x 962,043 ops/sec ±1.76% (91 runs sampled)d) - -# .makeRe globstars - picomatch x 1,615,199 ops/sec ±0.35% (94 runs sampled) - minimatch x 477,179 ops/sec ±1.33% (91 runs sampled) - -# .makeRe with leading star - picomatch x 1,220,856 ops/sec ±0.40% (92 runs sampled) - minimatch x 453,564 ops/sec ±1.43% (94 runs sampled) - -# .makeRe - basic braces - picomatch x 392,067 ops/sec ±0.70% (90 runs sampled) - minimatch x 99,532 ops/sec ±2.03% (87 runs sampled)) -``` - -
-
- -## Philosophies - -The goal of this library is to be blazing fast, without compromising on accuracy. - -**Accuracy** - -The number one of goal of this library is accuracy. However, it's not unusual for different glob implementations to have different rules for matching behavior, even with simple wildcard matching. It gets increasingly more complicated when combinations of different features are combined, like when extglobs are combined with globstars, braces, slashes, and so on: `!(**/{a,b,*/c})`. - -Thus, given that there is no canonical glob specification to use as a single source of truth when differences of opinion arise regarding behavior, sometimes we have to implement our best judgement and rely on feedback from users to make improvements. - -**Performance** - -Although this library performs well in benchmarks, and in most cases it's faster than other popular libraries we benchmarked against, we will always choose accuracy over performance. It's not helpful to anyone if our library is faster at returning the wrong answer. - -
-
- -## About - -
-Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. - -
- -
-Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -npm install && npm test -``` - -
- -
-Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
- -### Author - -**Jon Schlinkert** - -* [GitHub Profile](https://github.com/jonschlinkert) -* [Twitter Profile](https://twitter.com/jonschlinkert) -* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) - -### License - -Copyright © 2017-present, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). diff --git a/node_modules/picomatch/index.js b/node_modules/picomatch/index.js deleted file mode 100644 index d2f2bc5..0000000 --- a/node_modules/picomatch/index.js +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -module.exports = require('./lib/picomatch'); diff --git a/node_modules/picomatch/lib/constants.js b/node_modules/picomatch/lib/constants.js deleted file mode 100644 index a62ef38..0000000 --- a/node_modules/picomatch/lib/constants.js +++ /dev/null @@ -1,179 +0,0 @@ -'use strict'; - -const path = require('path'); -const WIN_SLASH = '\\\\/'; -const WIN_NO_SLASH = `[^${WIN_SLASH}]`; - -/** - * Posix glob regex - */ - -const DOT_LITERAL = '\\.'; -const PLUS_LITERAL = '\\+'; -const QMARK_LITERAL = '\\?'; -const SLASH_LITERAL = '\\/'; -const ONE_CHAR = '(?=.)'; -const QMARK = '[^/]'; -const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; -const START_ANCHOR = `(?:^|${SLASH_LITERAL})`; -const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; -const NO_DOT = `(?!${DOT_LITERAL})`; -const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; -const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; -const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; -const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; -const STAR = `${QMARK}*?`; - -const POSIX_CHARS = { - DOT_LITERAL, - PLUS_LITERAL, - QMARK_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - QMARK, - END_ANCHOR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK_NO_DOT, - STAR, - START_ANCHOR -}; - -/** - * Windows glob regex - */ - -const WINDOWS_CHARS = { - ...POSIX_CHARS, - - SLASH_LITERAL: `[${WIN_SLASH}]`, - QMARK: WIN_NO_SLASH, - STAR: `${WIN_NO_SLASH}*?`, - DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, - NO_DOT: `(?!${DOT_LITERAL})`, - NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, - NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - QMARK_NO_DOT: `[^.${WIN_SLASH}]`, - START_ANCHOR: `(?:^|[${WIN_SLASH}])`, - END_ANCHOR: `(?:[${WIN_SLASH}]|$)` -}; - -/** - * POSIX Bracket Regex - */ - -const POSIX_REGEX_SOURCE = { - alnum: 'a-zA-Z0-9', - alpha: 'a-zA-Z', - ascii: '\\x00-\\x7F', - blank: ' \\t', - cntrl: '\\x00-\\x1F\\x7F', - digit: '0-9', - graph: '\\x21-\\x7E', - lower: 'a-z', - print: '\\x20-\\x7E ', - punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', - space: ' \\t\\r\\n\\v\\f', - upper: 'A-Z', - word: 'A-Za-z0-9_', - xdigit: 'A-Fa-f0-9' -}; - -module.exports = { - MAX_LENGTH: 1024 * 64, - POSIX_REGEX_SOURCE, - - // regular expressions - REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, - REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, - REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, - REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, - REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, - REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, - - // Replace globs with equivalent patterns to reduce parsing time. - REPLACEMENTS: { - '***': '*', - '**/**': '**', - '**/**/**': '**' - }, - - // Digits - CHAR_0: 48, /* 0 */ - CHAR_9: 57, /* 9 */ - - // Alphabet chars. - CHAR_UPPERCASE_A: 65, /* A */ - CHAR_LOWERCASE_A: 97, /* a */ - CHAR_UPPERCASE_Z: 90, /* Z */ - CHAR_LOWERCASE_Z: 122, /* z */ - - CHAR_LEFT_PARENTHESES: 40, /* ( */ - CHAR_RIGHT_PARENTHESES: 41, /* ) */ - - CHAR_ASTERISK: 42, /* * */ - - // Non-alphabetic chars. - CHAR_AMPERSAND: 38, /* & */ - CHAR_AT: 64, /* @ */ - CHAR_BACKWARD_SLASH: 92, /* \ */ - CHAR_CARRIAGE_RETURN: 13, /* \r */ - CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */ - CHAR_COLON: 58, /* : */ - CHAR_COMMA: 44, /* , */ - CHAR_DOT: 46, /* . */ - CHAR_DOUBLE_QUOTE: 34, /* " */ - CHAR_EQUAL: 61, /* = */ - CHAR_EXCLAMATION_MARK: 33, /* ! */ - CHAR_FORM_FEED: 12, /* \f */ - CHAR_FORWARD_SLASH: 47, /* / */ - CHAR_GRAVE_ACCENT: 96, /* ` */ - CHAR_HASH: 35, /* # */ - CHAR_HYPHEN_MINUS: 45, /* - */ - CHAR_LEFT_ANGLE_BRACKET: 60, /* < */ - CHAR_LEFT_CURLY_BRACE: 123, /* { */ - CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */ - CHAR_LINE_FEED: 10, /* \n */ - CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */ - CHAR_PERCENT: 37, /* % */ - CHAR_PLUS: 43, /* + */ - CHAR_QUESTION_MARK: 63, /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */ - CHAR_RIGHT_CURLY_BRACE: 125, /* } */ - CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */ - CHAR_SEMICOLON: 59, /* ; */ - CHAR_SINGLE_QUOTE: 39, /* ' */ - CHAR_SPACE: 32, /* */ - CHAR_TAB: 9, /* \t */ - CHAR_UNDERSCORE: 95, /* _ */ - CHAR_VERTICAL_LINE: 124, /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ - - SEP: path.sep, - - /** - * Create EXTGLOB_CHARS - */ - - extglobChars(chars) { - return { - '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` }, - '?': { type: 'qmark', open: '(?:', close: ')?' }, - '+': { type: 'plus', open: '(?:', close: ')+' }, - '*': { type: 'star', open: '(?:', close: ')*' }, - '@': { type: 'at', open: '(?:', close: ')' } - }; - }, - - /** - * Create GLOB_CHARS - */ - - globChars(win32) { - return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; - } -}; diff --git a/node_modules/picomatch/lib/parse.js b/node_modules/picomatch/lib/parse.js deleted file mode 100644 index 58269d0..0000000 --- a/node_modules/picomatch/lib/parse.js +++ /dev/null @@ -1,1091 +0,0 @@ -'use strict'; - -const constants = require('./constants'); -const utils = require('./utils'); - -/** - * Constants - */ - -const { - MAX_LENGTH, - POSIX_REGEX_SOURCE, - REGEX_NON_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_BACKREF, - REPLACEMENTS -} = constants; - -/** - * Helpers - */ - -const expandRange = (args, options) => { - if (typeof options.expandRange === 'function') { - return options.expandRange(...args, options); - } - - args.sort(); - const value = `[${args.join('-')}]`; - - try { - /* eslint-disable-next-line no-new */ - new RegExp(value); - } catch (ex) { - return args.map(v => utils.escapeRegex(v)).join('..'); - } - - return value; -}; - -/** - * Create the message for a syntax error - */ - -const syntaxError = (type, char) => { - return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; -}; - -/** - * Parse the given input string. - * @param {String} input - * @param {Object} options - * @return {Object} - */ - -const parse = (input, options) => { - if (typeof input !== 'string') { - throw new TypeError('Expected a string'); - } - - input = REPLACEMENTS[input] || input; - - const opts = { ...options }; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - - let len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - - const bos = { type: 'bos', value: '', output: opts.prepend || '' }; - const tokens = [bos]; - - const capture = opts.capture ? '' : '?:'; - const win32 = utils.isWindows(options); - - // create constants based on platform, for windows or posix - const PLATFORM_CHARS = constants.globChars(win32); - const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); - - const { - DOT_LITERAL, - PLUS_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK, - QMARK_NO_DOT, - STAR, - START_ANCHOR - } = PLATFORM_CHARS; - - const globstar = opts => { - return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - - const nodot = opts.dot ? '' : NO_DOT; - const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; - let star = opts.bash === true ? globstar(opts) : STAR; - - if (opts.capture) { - star = `(${star})`; - } - - // minimatch options support - if (typeof opts.noext === 'boolean') { - opts.noextglob = opts.noext; - } - - const state = { - input, - index: -1, - start: 0, - dot: opts.dot === true, - consumed: '', - output: '', - prefix: '', - backtrack: false, - negated: false, - brackets: 0, - braces: 0, - parens: 0, - quotes: 0, - globstar: false, - tokens - }; - - input = utils.removePrefix(input, state); - len = input.length; - - const extglobs = []; - const braces = []; - const stack = []; - let prev = bos; - let value; - - /** - * Tokenizing helpers - */ - - const eos = () => state.index === len - 1; - const peek = state.peek = (n = 1) => input[state.index + n]; - const advance = state.advance = () => input[++state.index] || ''; - const remaining = () => input.slice(state.index + 1); - const consume = (value = '', num = 0) => { - state.consumed += value; - state.index += num; - }; - - const append = token => { - state.output += token.output != null ? token.output : token.value; - consume(token.value); - }; - - const negate = () => { - let count = 1; - - while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) { - advance(); - state.start++; - count++; - } - - if (count % 2 === 0) { - return false; - } - - state.negated = true; - state.start++; - return true; - }; - - const increment = type => { - state[type]++; - stack.push(type); - }; - - const decrement = type => { - state[type]--; - stack.pop(); - }; - - /** - * Push tokens onto the tokens array. This helper speeds up - * tokenizing by 1) helping us avoid backtracking as much as possible, - * and 2) helping us avoid creating extra tokens when consecutive - * characters are plain text. This improves performance and simplifies - * lookbehinds. - */ - - const push = tok => { - if (prev.type === 'globstar') { - const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace'); - const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren')); - - if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) { - state.output = state.output.slice(0, -prev.output.length); - prev.type = 'star'; - prev.value = '*'; - prev.output = star; - state.output += prev.output; - } - } - - if (extglobs.length && tok.type !== 'paren') { - extglobs[extglobs.length - 1].inner += tok.value; - } - - if (tok.value || tok.output) append(tok); - if (prev && prev.type === 'text' && tok.type === 'text') { - prev.value += tok.value; - prev.output = (prev.output || '') + tok.value; - return; - } - - tok.prev = prev; - tokens.push(tok); - prev = tok; - }; - - const extglobOpen = (type, value) => { - const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' }; - - token.prev = prev; - token.parens = state.parens; - token.output = state.output; - const output = (opts.capture ? '(' : '') + token.open; - - increment('parens'); - push({ type, value, output: state.output ? '' : ONE_CHAR }); - push({ type: 'paren', extglob: true, value: advance(), output }); - extglobs.push(token); - }; - - const extglobClose = token => { - let output = token.close + (opts.capture ? ')' : ''); - let rest; - - if (token.type === 'negate') { - let extglobStar = star; - - if (token.inner && token.inner.length > 1 && token.inner.includes('/')) { - extglobStar = globstar(opts); - } - - if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { - output = token.close = `)$))${extglobStar}`; - } - - if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { - // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis. - // In this case, we need to parse the string and use it in the output of the original pattern. - // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`. - // - // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`. - const expression = parse(rest, { ...options, fastpaths: false }).output; - - output = token.close = `)${expression})${extglobStar})`; - } - - if (token.prev.type === 'bos') { - state.negatedExtglob = true; - } - } - - push({ type: 'paren', extglob: true, value, output }); - decrement('parens'); - }; - - /** - * Fast paths - */ - - if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { - let backslashes = false; - - let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { - if (first === '\\') { - backslashes = true; - return m; - } - - if (first === '?') { - if (esc) { - return esc + first + (rest ? QMARK.repeat(rest.length) : ''); - } - if (index === 0) { - return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ''); - } - return QMARK.repeat(chars.length); - } - - if (first === '.') { - return DOT_LITERAL.repeat(chars.length); - } - - if (first === '*') { - if (esc) { - return esc + first + (rest ? star : ''); - } - return star; - } - return esc ? m : `\\${m}`; - }); - - if (backslashes === true) { - if (opts.unescape === true) { - output = output.replace(/\\/g, ''); - } else { - output = output.replace(/\\+/g, m => { - return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : ''); - }); - } - } - - if (output === input && opts.contains === true) { - state.output = input; - return state; - } - - state.output = utils.wrapOutput(output, state, options); - return state; - } - - /** - * Tokenize input until we reach end-of-string - */ - - while (!eos()) { - value = advance(); - - if (value === '\u0000') { - continue; - } - - /** - * Escaped characters - */ - - if (value === '\\') { - const next = peek(); - - if (next === '/' && opts.bash !== true) { - continue; - } - - if (next === '.' || next === ';') { - continue; - } - - if (!next) { - value += '\\'; - push({ type: 'text', value }); - continue; - } - - // collapse slashes to reduce potential for exploits - const match = /^\\+/.exec(remaining()); - let slashes = 0; - - if (match && match[0].length > 2) { - slashes = match[0].length; - state.index += slashes; - if (slashes % 2 !== 0) { - value += '\\'; - } - } - - if (opts.unescape === true) { - value = advance(); - } else { - value += advance(); - } - - if (state.brackets === 0) { - push({ type: 'text', value }); - continue; - } - } - - /** - * If we're inside a regex character class, continue - * until we reach the closing bracket. - */ - - if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) { - if (opts.posix !== false && value === ':') { - const inner = prev.value.slice(1); - if (inner.includes('[')) { - prev.posix = true; - - if (inner.includes(':')) { - const idx = prev.value.lastIndexOf('['); - const pre = prev.value.slice(0, idx); - const rest = prev.value.slice(idx + 2); - const posix = POSIX_REGEX_SOURCE[rest]; - if (posix) { - prev.value = pre + posix; - state.backtrack = true; - advance(); - - if (!bos.output && tokens.indexOf(prev) === 1) { - bos.output = ONE_CHAR; - } - continue; - } - } - } - } - - if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) { - value = `\\${value}`; - } - - if (value === ']' && (prev.value === '[' || prev.value === '[^')) { - value = `\\${value}`; - } - - if (opts.posix === true && value === '!' && prev.value === '[') { - value = '^'; - } - - prev.value += value; - append({ value }); - continue; - } - - /** - * If we're inside a quoted string, continue - * until we reach the closing double quote. - */ - - if (state.quotes === 1 && value !== '"') { - value = utils.escapeRegex(value); - prev.value += value; - append({ value }); - continue; - } - - /** - * Double quotes - */ - - if (value === '"') { - state.quotes = state.quotes === 1 ? 0 : 1; - if (opts.keepQuotes === true) { - push({ type: 'text', value }); - } - continue; - } - - /** - * Parentheses - */ - - if (value === '(') { - increment('parens'); - push({ type: 'paren', value }); - continue; - } - - if (value === ')') { - if (state.parens === 0 && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('opening', '(')); - } - - const extglob = extglobs[extglobs.length - 1]; - if (extglob && state.parens === extglob.parens + 1) { - extglobClose(extglobs.pop()); - continue; - } - - push({ type: 'paren', value, output: state.parens ? ')' : '\\)' }); - decrement('parens'); - continue; - } - - /** - * Square brackets - */ - - if (value === '[') { - if (opts.nobracket === true || !remaining().includes(']')) { - if (opts.nobracket !== true && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('closing', ']')); - } - - value = `\\${value}`; - } else { - increment('brackets'); - } - - push({ type: 'bracket', value }); - continue; - } - - if (value === ']') { - if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) { - push({ type: 'text', value, output: `\\${value}` }); - continue; - } - - if (state.brackets === 0) { - if (opts.strictBrackets === true) { - throw new SyntaxError(syntaxError('opening', '[')); - } - - push({ type: 'text', value, output: `\\${value}` }); - continue; - } - - decrement('brackets'); - - const prevValue = prev.value.slice(1); - if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) { - value = `/${value}`; - } - - prev.value += value; - append({ value }); - - // when literal brackets are explicitly disabled - // assume we should match with a regex character class - if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { - continue; - } - - const escaped = utils.escapeRegex(prev.value); - state.output = state.output.slice(0, -prev.value.length); - - // when literal brackets are explicitly enabled - // assume we should escape the brackets to match literal characters - if (opts.literalBrackets === true) { - state.output += escaped; - prev.value = escaped; - continue; - } - - // when the user specifies nothing, try to match both - prev.value = `(${capture}${escaped}|${prev.value})`; - state.output += prev.value; - continue; - } - - /** - * Braces - */ - - if (value === '{' && opts.nobrace !== true) { - increment('braces'); - - const open = { - type: 'brace', - value, - output: '(', - outputIndex: state.output.length, - tokensIndex: state.tokens.length - }; - - braces.push(open); - push(open); - continue; - } - - if (value === '}') { - const brace = braces[braces.length - 1]; - - if (opts.nobrace === true || !brace) { - push({ type: 'text', value, output: value }); - continue; - } - - let output = ')'; - - if (brace.dots === true) { - const arr = tokens.slice(); - const range = []; - - for (let i = arr.length - 1; i >= 0; i--) { - tokens.pop(); - if (arr[i].type === 'brace') { - break; - } - if (arr[i].type !== 'dots') { - range.unshift(arr[i].value); - } - } - - output = expandRange(range, opts); - state.backtrack = true; - } - - if (brace.comma !== true && brace.dots !== true) { - const out = state.output.slice(0, brace.outputIndex); - const toks = state.tokens.slice(brace.tokensIndex); - brace.value = brace.output = '\\{'; - value = output = '\\}'; - state.output = out; - for (const t of toks) { - state.output += (t.output || t.value); - } - } - - push({ type: 'brace', value, output }); - decrement('braces'); - braces.pop(); - continue; - } - - /** - * Pipes - */ - - if (value === '|') { - if (extglobs.length > 0) { - extglobs[extglobs.length - 1].conditions++; - } - push({ type: 'text', value }); - continue; - } - - /** - * Commas - */ - - if (value === ',') { - let output = value; - - const brace = braces[braces.length - 1]; - if (brace && stack[stack.length - 1] === 'braces') { - brace.comma = true; - output = '|'; - } - - push({ type: 'comma', value, output }); - continue; - } - - /** - * Slashes - */ - - if (value === '/') { - // if the beginning of the glob is "./", advance the start - // to the current index, and don't add the "./" characters - // to the state. This greatly simplifies lookbehinds when - // checking for BOS characters like "!" and "." (not "./") - if (prev.type === 'dot' && state.index === state.start + 1) { - state.start = state.index + 1; - state.consumed = ''; - state.output = ''; - tokens.pop(); - prev = bos; // reset "prev" to the first token - continue; - } - - push({ type: 'slash', value, output: SLASH_LITERAL }); - continue; - } - - /** - * Dots - */ - - if (value === '.') { - if (state.braces > 0 && prev.type === 'dot') { - if (prev.value === '.') prev.output = DOT_LITERAL; - const brace = braces[braces.length - 1]; - prev.type = 'dots'; - prev.output += value; - prev.value += value; - brace.dots = true; - continue; - } - - if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') { - push({ type: 'text', value, output: DOT_LITERAL }); - continue; - } - - push({ type: 'dot', value, output: DOT_LITERAL }); - continue; - } - - /** - * Question marks - */ - - if (value === '?') { - const isGroup = prev && prev.value === '('; - if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - extglobOpen('qmark', value); - continue; - } - - if (prev && prev.type === 'paren') { - const next = peek(); - let output = value; - - if (next === '<' && !utils.supportsLookbehinds()) { - throw new Error('Node.js v10 or higher is required for regex lookbehinds'); - } - - if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) { - output = `\\${value}`; - } - - push({ type: 'text', value, output }); - continue; - } - - if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) { - push({ type: 'qmark', value, output: QMARK_NO_DOT }); - continue; - } - - push({ type: 'qmark', value, output: QMARK }); - continue; - } - - /** - * Exclamation - */ - - if (value === '!') { - if (opts.noextglob !== true && peek() === '(') { - if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) { - extglobOpen('negate', value); - continue; - } - } - - if (opts.nonegate !== true && state.index === 0) { - negate(); - continue; - } - } - - /** - * Plus - */ - - if (value === '+') { - if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - extglobOpen('plus', value); - continue; - } - - if ((prev && prev.value === '(') || opts.regex === false) { - push({ type: 'plus', value, output: PLUS_LITERAL }); - continue; - } - - if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) { - push({ type: 'plus', value }); - continue; - } - - push({ type: 'plus', value: PLUS_LITERAL }); - continue; - } - - /** - * Plain text - */ - - if (value === '@') { - if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') { - push({ type: 'at', extglob: true, value, output: '' }); - continue; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Plain text - */ - - if (value !== '*') { - if (value === '$' || value === '^') { - value = `\\${value}`; - } - - const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); - if (match) { - value += match[0]; - state.index += match[0].length; - } - - push({ type: 'text', value }); - continue; - } - - /** - * Stars - */ - - if (prev && (prev.type === 'globstar' || prev.star === true)) { - prev.type = 'star'; - prev.star = true; - prev.value += value; - prev.output = star; - state.backtrack = true; - state.globstar = true; - consume(value); - continue; - } - - let rest = remaining(); - if (opts.noextglob !== true && /^\([^?]/.test(rest)) { - extglobOpen('star', value); - continue; - } - - if (prev.type === 'star') { - if (opts.noglobstar === true) { - consume(value); - continue; - } - - const prior = prev.prev; - const before = prior.prev; - const isStart = prior.type === 'slash' || prior.type === 'bos'; - const afterStar = before && (before.type === 'star' || before.type === 'globstar'); - - if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) { - push({ type: 'star', value, output: '' }); - continue; - } - - const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace'); - const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren'); - if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) { - push({ type: 'star', value, output: '' }); - continue; - } - - // strip consecutive `/**/` - while (rest.slice(0, 3) === '/**') { - const after = input[state.index + 4]; - if (after && after !== '/') { - break; - } - rest = rest.slice(3); - consume('/**', 3); - } - - if (prior.type === 'bos' && eos()) { - prev.type = 'globstar'; - prev.value += value; - prev.output = globstar(opts); - state.output = prev.output; - state.globstar = true; - consume(value); - continue; - } - - if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) { - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - - prev.type = 'globstar'; - prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)'); - prev.value += value; - state.globstar = true; - state.output += prior.output + prev.output; - consume(value); - continue; - } - - if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') { - const end = rest[1] !== void 0 ? '|$' : ''; - - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - - prev.type = 'globstar'; - prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; - prev.value += value; - - state.output += prior.output + prev.output; - state.globstar = true; - - consume(value + advance()); - - push({ type: 'slash', value: '/', output: '' }); - continue; - } - - if (prior.type === 'bos' && rest[0] === '/') { - prev.type = 'globstar'; - prev.value += value; - prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; - state.output = prev.output; - state.globstar = true; - consume(value + advance()); - push({ type: 'slash', value: '/', output: '' }); - continue; - } - - // remove single star from output - state.output = state.output.slice(0, -prev.output.length); - - // reset previous token to globstar - prev.type = 'globstar'; - prev.output = globstar(opts); - prev.value += value; - - // reset output with globstar - state.output += prev.output; - state.globstar = true; - consume(value); - continue; - } - - const token = { type: 'star', value, output: star }; - - if (opts.bash === true) { - token.output = '.*?'; - if (prev.type === 'bos' || prev.type === 'slash') { - token.output = nodot + token.output; - } - push(token); - continue; - } - - if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) { - token.output = value; - push(token); - continue; - } - - if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') { - if (prev.type === 'dot') { - state.output += NO_DOT_SLASH; - prev.output += NO_DOT_SLASH; - - } else if (opts.dot === true) { - state.output += NO_DOTS_SLASH; - prev.output += NO_DOTS_SLASH; - - } else { - state.output += nodot; - prev.output += nodot; - } - - if (peek() !== '*') { - state.output += ONE_CHAR; - prev.output += ONE_CHAR; - } - } - - push(token); - } - - while (state.brackets > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']')); - state.output = utils.escapeLast(state.output, '['); - decrement('brackets'); - } - - while (state.parens > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')')); - state.output = utils.escapeLast(state.output, '('); - decrement('parens'); - } - - while (state.braces > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}')); - state.output = utils.escapeLast(state.output, '{'); - decrement('braces'); - } - - if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) { - push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` }); - } - - // rebuild the output if we had to backtrack at any point - if (state.backtrack === true) { - state.output = ''; - - for (const token of state.tokens) { - state.output += token.output != null ? token.output : token.value; - - if (token.suffix) { - state.output += token.suffix; - } - } - } - - return state; -}; - -/** - * Fast paths for creating regular expressions for common glob patterns. - * This can significantly speed up processing and has very little downside - * impact when none of the fast paths match. - */ - -parse.fastpaths = (input, options) => { - const opts = { ...options }; - const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - const len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - - input = REPLACEMENTS[input] || input; - const win32 = utils.isWindows(options); - - // create constants based on platform, for windows or posix - const { - DOT_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOTS_SLASH, - STAR, - START_ANCHOR - } = constants.globChars(win32); - - const nodot = opts.dot ? NO_DOTS : NO_DOT; - const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; - const capture = opts.capture ? '' : '?:'; - const state = { negated: false, prefix: '' }; - let star = opts.bash === true ? '.*?' : STAR; - - if (opts.capture) { - star = `(${star})`; - } - - const globstar = opts => { - if (opts.noglobstar === true) return star; - return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - - const create = str => { - switch (str) { - case '*': - return `${nodot}${ONE_CHAR}${star}`; - - case '.*': - return `${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '*.*': - return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '*/*': - return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; - - case '**': - return nodot + globstar(opts); - - case '**/*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; - - case '**/*.*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - - case '**/.*': - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; - - default: { - const match = /^(.*?)\.(\w+)$/.exec(str); - if (!match) return; - - const source = create(match[1]); - if (!source) return; - - return source + DOT_LITERAL + match[2]; - } - } - }; - - const output = utils.removePrefix(input, state); - let source = create(output); - - if (source && opts.strictSlashes !== true) { - source += `${SLASH_LITERAL}?`; - } - - return source; -}; - -module.exports = parse; diff --git a/node_modules/picomatch/lib/picomatch.js b/node_modules/picomatch/lib/picomatch.js deleted file mode 100644 index 782d809..0000000 --- a/node_modules/picomatch/lib/picomatch.js +++ /dev/null @@ -1,342 +0,0 @@ -'use strict'; - -const path = require('path'); -const scan = require('./scan'); -const parse = require('./parse'); -const utils = require('./utils'); -const constants = require('./constants'); -const isObject = val => val && typeof val === 'object' && !Array.isArray(val); - -/** - * Creates a matcher function from one or more glob patterns. The - * returned function takes a string to match as its first argument, - * and returns true if the string is a match. The returned matcher - * function also takes a boolean as the second argument that, when true, - * returns an object with additional information. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch(glob[, options]); - * - * const isMatch = picomatch('*.!(*a)'); - * console.log(isMatch('a.a')); //=> false - * console.log(isMatch('a.b')); //=> true - * ``` - * @name picomatch - * @param {String|Array} `globs` One or more glob patterns. - * @param {Object=} `options` - * @return {Function=} Returns a matcher function. - * @api public - */ - -const picomatch = (glob, options, returnState = false) => { - if (Array.isArray(glob)) { - const fns = glob.map(input => picomatch(input, options, returnState)); - const arrayMatcher = str => { - for (const isMatch of fns) { - const state = isMatch(str); - if (state) return state; - } - return false; - }; - return arrayMatcher; - } - - const isState = isObject(glob) && glob.tokens && glob.input; - - if (glob === '' || (typeof glob !== 'string' && !isState)) { - throw new TypeError('Expected pattern to be a non-empty string'); - } - - const opts = options || {}; - const posix = utils.isWindows(options); - const regex = isState - ? picomatch.compileRe(glob, options) - : picomatch.makeRe(glob, options, false, true); - - const state = regex.state; - delete regex.state; - - let isIgnored = () => false; - if (opts.ignore) { - const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; - isIgnored = picomatch(opts.ignore, ignoreOpts, returnState); - } - - const matcher = (input, returnObject = false) => { - const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix }); - const result = { glob, state, regex, posix, input, output, match, isMatch }; - - if (typeof opts.onResult === 'function') { - opts.onResult(result); - } - - if (isMatch === false) { - result.isMatch = false; - return returnObject ? result : false; - } - - if (isIgnored(input)) { - if (typeof opts.onIgnore === 'function') { - opts.onIgnore(result); - } - result.isMatch = false; - return returnObject ? result : false; - } - - if (typeof opts.onMatch === 'function') { - opts.onMatch(result); - } - return returnObject ? result : true; - }; - - if (returnState) { - matcher.state = state; - } - - return matcher; -}; - -/** - * Test `input` with the given `regex`. This is used by the main - * `picomatch()` function to test the input string. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.test(input, regex[, options]); - * - * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/)); - * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' } - * ``` - * @param {String} `input` String to test. - * @param {RegExp} `regex` - * @return {Object} Returns an object with matching info. - * @api public - */ - -picomatch.test = (input, regex, options, { glob, posix } = {}) => { - if (typeof input !== 'string') { - throw new TypeError('Expected input to be a string'); - } - - if (input === '') { - return { isMatch: false, output: '' }; - } - - const opts = options || {}; - const format = opts.format || (posix ? utils.toPosixSlashes : null); - let match = input === glob; - let output = (match && format) ? format(input) : input; - - if (match === false) { - output = format ? format(input) : input; - match = output === glob; - } - - if (match === false || opts.capture === true) { - if (opts.matchBase === true || opts.basename === true) { - match = picomatch.matchBase(input, regex, options, posix); - } else { - match = regex.exec(output); - } - } - - return { isMatch: Boolean(match), match, output }; -}; - -/** - * Match the basename of a filepath. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.matchBase(input, glob[, options]); - * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true - * ``` - * @param {String} `input` String to test. - * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe). - * @return {Boolean} - * @api public - */ - -picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { - const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options); - return regex.test(path.basename(input)); -}; - -/** - * Returns true if **any** of the given glob `patterns` match the specified `string`. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.isMatch(string, patterns[, options]); - * - * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true - * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false - * ``` - * @param {String|Array} str The string to test. - * @param {String|Array} patterns One or more glob patterns to use for matching. - * @param {Object} [options] See available [options](#options). - * @return {Boolean} Returns true if any patterns match `str` - * @api public - */ - -picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str); - -/** - * Parse a glob pattern to create the source string for a regular - * expression. - * - * ```js - * const picomatch = require('picomatch'); - * const result = picomatch.parse(pattern[, options]); - * ``` - * @param {String} `pattern` - * @param {Object} `options` - * @return {Object} Returns an object with useful properties and output to be used as a regex source string. - * @api public - */ - -picomatch.parse = (pattern, options) => { - if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options)); - return parse(pattern, { ...options, fastpaths: false }); -}; - -/** - * Scan a glob pattern to separate the pattern into segments. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.scan(input[, options]); - * - * const result = picomatch.scan('!./foo/*.js'); - * console.log(result); - * { prefix: '!./', - * input: '!./foo/*.js', - * start: 3, - * base: 'foo', - * glob: '*.js', - * isBrace: false, - * isBracket: false, - * isGlob: true, - * isExtglob: false, - * isGlobstar: false, - * negated: true } - * ``` - * @param {String} `input` Glob pattern to scan. - * @param {Object} `options` - * @return {Object} Returns an object with - * @api public - */ - -picomatch.scan = (input, options) => scan(input, options); - -/** - * Compile a regular expression from the `state` object returned by the - * [parse()](#parse) method. - * - * @param {Object} `state` - * @param {Object} `options` - * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser. - * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging. - * @return {RegExp} - * @api public - */ - -picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => { - if (returnOutput === true) { - return state.output; - } - - const opts = options || {}; - const prepend = opts.contains ? '' : '^'; - const append = opts.contains ? '' : '$'; - - let source = `${prepend}(?:${state.output})${append}`; - if (state && state.negated === true) { - source = `^(?!${source}).*$`; - } - - const regex = picomatch.toRegex(source, options); - if (returnState === true) { - regex.state = state; - } - - return regex; -}; - -/** - * Create a regular expression from a parsed glob pattern. - * - * ```js - * const picomatch = require('picomatch'); - * const state = picomatch.parse('*.js'); - * // picomatch.compileRe(state[, options]); - * - * console.log(picomatch.compileRe(state)); - * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ - * ``` - * @param {String} `state` The object returned from the `.parse` method. - * @param {Object} `options` - * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result. - * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression. - * @return {RegExp} Returns a regex created from the given pattern. - * @api public - */ - -picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { - if (!input || typeof input !== 'string') { - throw new TypeError('Expected a non-empty string'); - } - - let parsed = { negated: false, fastpaths: true }; - - if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) { - parsed.output = parse.fastpaths(input, options); - } - - if (!parsed.output) { - parsed = parse(input, options); - } - - return picomatch.compileRe(parsed, options, returnOutput, returnState); -}; - -/** - * Create a regular expression from the given regex source string. - * - * ```js - * const picomatch = require('picomatch'); - * // picomatch.toRegex(source[, options]); - * - * const { output } = picomatch.parse('*.js'); - * console.log(picomatch.toRegex(output)); - * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/ - * ``` - * @param {String} `source` Regular expression source string. - * @param {Object} `options` - * @return {RegExp} - * @api public - */ - -picomatch.toRegex = (source, options) => { - try { - const opts = options || {}; - return new RegExp(source, opts.flags || (opts.nocase ? 'i' : '')); - } catch (err) { - if (options && options.debug === true) throw err; - return /$^/; - } -}; - -/** - * Picomatch constants. - * @return {Object} - */ - -picomatch.constants = constants; - -/** - * Expose "picomatch" - */ - -module.exports = picomatch; diff --git a/node_modules/picomatch/lib/scan.js b/node_modules/picomatch/lib/scan.js deleted file mode 100644 index e59cd7a..0000000 --- a/node_modules/picomatch/lib/scan.js +++ /dev/null @@ -1,391 +0,0 @@ -'use strict'; - -const utils = require('./utils'); -const { - CHAR_ASTERISK, /* * */ - CHAR_AT, /* @ */ - CHAR_BACKWARD_SLASH, /* \ */ - CHAR_COMMA, /* , */ - CHAR_DOT, /* . */ - CHAR_EXCLAMATION_MARK, /* ! */ - CHAR_FORWARD_SLASH, /* / */ - CHAR_LEFT_CURLY_BRACE, /* { */ - CHAR_LEFT_PARENTHESES, /* ( */ - CHAR_LEFT_SQUARE_BRACKET, /* [ */ - CHAR_PLUS, /* + */ - CHAR_QUESTION_MARK, /* ? */ - CHAR_RIGHT_CURLY_BRACE, /* } */ - CHAR_RIGHT_PARENTHESES, /* ) */ - CHAR_RIGHT_SQUARE_BRACKET /* ] */ -} = require('./constants'); - -const isPathSeparator = code => { - return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; -}; - -const depth = token => { - if (token.isPrefix !== true) { - token.depth = token.isGlobstar ? Infinity : 1; - } -}; - -/** - * Quickly scans a glob pattern and returns an object with a handful of - * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists), - * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not - * with `!(`) and `negatedExtglob` (true if the path starts with `!(`). - * - * ```js - * const pm = require('picomatch'); - * console.log(pm.scan('foo/bar/*.js')); - * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' } - * ``` - * @param {String} `str` - * @param {Object} `options` - * @return {Object} Returns an object with tokens and regex source string. - * @api public - */ - -const scan = (input, options) => { - const opts = options || {}; - - const length = input.length - 1; - const scanToEnd = opts.parts === true || opts.scanToEnd === true; - const slashes = []; - const tokens = []; - const parts = []; - - let str = input; - let index = -1; - let start = 0; - let lastIndex = 0; - let isBrace = false; - let isBracket = false; - let isGlob = false; - let isExtglob = false; - let isGlobstar = false; - let braceEscaped = false; - let backslashes = false; - let negated = false; - let negatedExtglob = false; - let finished = false; - let braces = 0; - let prev; - let code; - let token = { value: '', depth: 0, isGlob: false }; - - const eos = () => index >= length; - const peek = () => str.charCodeAt(index + 1); - const advance = () => { - prev = code; - return str.charCodeAt(++index); - }; - - while (index < length) { - code = advance(); - let next; - - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - - if (code === CHAR_LEFT_CURLY_BRACE) { - braceEscaped = true; - } - continue; - } - - if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { - braces++; - - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - - if (code === CHAR_LEFT_CURLY_BRACE) { - braces++; - continue; - } - - if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (braceEscaped !== true && code === CHAR_COMMA) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (code === CHAR_RIGHT_CURLY_BRACE) { - braces--; - - if (braces === 0) { - braceEscaped = false; - isBrace = token.isBrace = true; - finished = true; - break; - } - } - } - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (code === CHAR_FORWARD_SLASH) { - slashes.push(index); - tokens.push(token); - token = { value: '', depth: 0, isGlob: false }; - - if (finished === true) continue; - if (prev === CHAR_DOT && index === (start + 1)) { - start += 2; - continue; - } - - lastIndex = index + 1; - continue; - } - - if (opts.noext !== true) { - const isExtglobChar = code === CHAR_PLUS - || code === CHAR_AT - || code === CHAR_ASTERISK - || code === CHAR_QUESTION_MARK - || code === CHAR_EXCLAMATION_MARK; - - if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - isExtglob = token.isExtglob = true; - finished = true; - if (code === CHAR_EXCLAMATION_MARK && index === start) { - negatedExtglob = true; - } - - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - - if (code === CHAR_RIGHT_PARENTHESES) { - isGlob = token.isGlob = true; - finished = true; - break; - } - } - continue; - } - break; - } - } - - if (code === CHAR_ASTERISK) { - if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true; - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - break; - } - - if (code === CHAR_QUESTION_MARK) { - isGlob = token.isGlob = true; - finished = true; - - if (scanToEnd === true) { - continue; - } - break; - } - - if (code === CHAR_LEFT_SQUARE_BRACKET) { - while (eos() !== true && (next = advance())) { - if (next === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - - if (next === CHAR_RIGHT_SQUARE_BRACKET) { - isBracket = token.isBracket = true; - isGlob = token.isGlob = true; - finished = true; - break; - } - } - - if (scanToEnd === true) { - continue; - } - - break; - } - - if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { - negated = token.negated = true; - start++; - continue; - } - - if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_LEFT_PARENTHESES) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - - if (code === CHAR_RIGHT_PARENTHESES) { - finished = true; - break; - } - } - continue; - } - break; - } - - if (isGlob === true) { - finished = true; - - if (scanToEnd === true) { - continue; - } - - break; - } - } - - if (opts.noext === true) { - isExtglob = false; - isGlob = false; - } - - let base = str; - let prefix = ''; - let glob = ''; - - if (start > 0) { - prefix = str.slice(0, start); - str = str.slice(start); - lastIndex -= start; - } - - if (base && isGlob === true && lastIndex > 0) { - base = str.slice(0, lastIndex); - glob = str.slice(lastIndex); - } else if (isGlob === true) { - base = ''; - glob = str; - } else { - base = str; - } - - if (base && base !== '' && base !== '/' && base !== str) { - if (isPathSeparator(base.charCodeAt(base.length - 1))) { - base = base.slice(0, -1); - } - } - - if (opts.unescape === true) { - if (glob) glob = utils.removeBackslashes(glob); - - if (base && backslashes === true) { - base = utils.removeBackslashes(base); - } - } - - const state = { - prefix, - input, - start, - base, - glob, - isBrace, - isBracket, - isGlob, - isExtglob, - isGlobstar, - negated, - negatedExtglob - }; - - if (opts.tokens === true) { - state.maxDepth = 0; - if (!isPathSeparator(code)) { - tokens.push(token); - } - state.tokens = tokens; - } - - if (opts.parts === true || opts.tokens === true) { - let prevIndex; - - for (let idx = 0; idx < slashes.length; idx++) { - const n = prevIndex ? prevIndex + 1 : start; - const i = slashes[idx]; - const value = input.slice(n, i); - if (opts.tokens) { - if (idx === 0 && start !== 0) { - tokens[idx].isPrefix = true; - tokens[idx].value = prefix; - } else { - tokens[idx].value = value; - } - depth(tokens[idx]); - state.maxDepth += tokens[idx].depth; - } - if (idx !== 0 || value !== '') { - parts.push(value); - } - prevIndex = i; - } - - if (prevIndex && prevIndex + 1 < input.length) { - const value = input.slice(prevIndex + 1); - parts.push(value); - - if (opts.tokens) { - tokens[tokens.length - 1].value = value; - depth(tokens[tokens.length - 1]); - state.maxDepth += tokens[tokens.length - 1].depth; - } - } - - state.slashes = slashes; - state.parts = parts; - } - - return state; -}; - -module.exports = scan; diff --git a/node_modules/picomatch/lib/utils.js b/node_modules/picomatch/lib/utils.js deleted file mode 100644 index c3ca766..0000000 --- a/node_modules/picomatch/lib/utils.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict'; - -const path = require('path'); -const win32 = process.platform === 'win32'; -const { - REGEX_BACKSLASH, - REGEX_REMOVE_BACKSLASH, - REGEX_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_GLOBAL -} = require('./constants'); - -exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); -exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str); -exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str); -exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1'); -exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/'); - -exports.removeBackslashes = str => { - return str.replace(REGEX_REMOVE_BACKSLASH, match => { - return match === '\\' ? '' : match; - }); -}; - -exports.supportsLookbehinds = () => { - const segs = process.version.slice(1).split('.').map(Number); - if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) { - return true; - } - return false; -}; - -exports.isWindows = options => { - if (options && typeof options.windows === 'boolean') { - return options.windows; - } - return win32 === true || path.sep === '\\'; -}; - -exports.escapeLast = (input, char, lastIdx) => { - const idx = input.lastIndexOf(char, lastIdx); - if (idx === -1) return input; - if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1); - return `${input.slice(0, idx)}\\${input.slice(idx)}`; -}; - -exports.removePrefix = (input, state = {}) => { - let output = input; - if (output.startsWith('./')) { - output = output.slice(2); - state.prefix = './'; - } - return output; -}; - -exports.wrapOutput = (input, state = {}, options = {}) => { - const prepend = options.contains ? '' : '^'; - const append = options.contains ? '' : '$'; - - let output = `${prepend}(?:${input})${append}`; - if (state.negated === true) { - output = `(?:^(?!${output}).*$)`; - } - return output; -}; diff --git a/node_modules/picomatch/package.json b/node_modules/picomatch/package.json deleted file mode 100644 index 3db22d4..0000000 --- a/node_modules/picomatch/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "picomatch", - "description": "Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.", - "version": "2.3.1", - "homepage": "https://github.com/micromatch/picomatch", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "funding": "https://github.com/sponsors/jonschlinkert", - "repository": "micromatch/picomatch", - "bugs": { - "url": "https://github.com/micromatch/picomatch/issues" - }, - "license": "MIT", - "files": [ - "index.js", - "lib" - ], - "main": "index.js", - "engines": { - "node": ">=8.6" - }, - "scripts": { - "lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .", - "mocha": "mocha --reporter dot", - "test": "npm run lint && npm run mocha", - "test:ci": "npm run test:cover", - "test:cover": "nyc npm run mocha" - }, - "devDependencies": { - "eslint": "^6.8.0", - "fill-range": "^7.0.1", - "gulp-format-md": "^2.0.0", - "mocha": "^6.2.2", - "nyc": "^15.0.0", - "time-require": "github:jonschlinkert/time-require" - }, - "keywords": [ - "glob", - "match", - "picomatch" - ], - "nyc": { - "reporter": [ - "html", - "lcov", - "text-summary" - ] - }, - "verb": { - "toc": { - "render": true, - "method": "preWrite", - "maxdepth": 3 - }, - "layout": "empty", - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - }, - "related": { - "list": [ - "braces", - "micromatch" - ] - }, - "reflinks": [ - "braces", - "expand-brackets", - "extglob", - "fill-range", - "micromatch", - "minimatch", - "nanomatch", - "picomatch" - ] - } -} diff --git a/node_modules/postgres-array/index.d.ts b/node_modules/postgres-array/index.d.ts deleted file mode 100644 index 88665bd..0000000 --- a/node_modules/postgres-array/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ - -export function parse(source: string): string[]; -export function parse(source: string, transform: (value: string) => T): T[]; - diff --git a/node_modules/postgres-array/index.js b/node_modules/postgres-array/index.js deleted file mode 100644 index 18bfd16..0000000 --- a/node_modules/postgres-array/index.js +++ /dev/null @@ -1,97 +0,0 @@ -'use strict' - -exports.parse = function (source, transform) { - return new ArrayParser(source, transform).parse() -} - -class ArrayParser { - constructor (source, transform) { - this.source = source - this.transform = transform || identity - this.position = 0 - this.entries = [] - this.recorded = [] - this.dimension = 0 - } - - isEof () { - return this.position >= this.source.length - } - - nextCharacter () { - var character = this.source[this.position++] - if (character === '\\') { - return { - value: this.source[this.position++], - escaped: true - } - } - return { - value: character, - escaped: false - } - } - - record (character) { - this.recorded.push(character) - } - - newEntry (includeEmpty) { - var entry - if (this.recorded.length > 0 || includeEmpty) { - entry = this.recorded.join('') - if (entry === 'NULL' && !includeEmpty) { - entry = null - } - if (entry !== null) entry = this.transform(entry) - this.entries.push(entry) - this.recorded = [] - } - } - - consumeDimensions () { - if (this.source[0] === '[') { - while (!this.isEof()) { - var char = this.nextCharacter() - if (char.value === '=') break - } - } - } - - parse (nested) { - var character, parser, quote - this.consumeDimensions() - while (!this.isEof()) { - character = this.nextCharacter() - if (character.value === '{' && !quote) { - this.dimension++ - if (this.dimension > 1) { - parser = new ArrayParser(this.source.substr(this.position - 1), this.transform) - this.entries.push(parser.parse(true)) - this.position += parser.position - 2 - } - } else if (character.value === '}' && !quote) { - this.dimension-- - if (!this.dimension) { - this.newEntry() - if (nested) return this.entries - } - } else if (character.value === '"' && !character.escaped) { - if (quote) this.newEntry(true) - quote = !quote - } else if (character.value === ',' && !quote) { - this.newEntry() - } else { - this.record(character.value) - } - } - if (this.dimension !== 0) { - throw new Error('array dimension not balanced') - } - return this.entries - } -} - -function identity (value) { - return value -} diff --git a/node_modules/postgres-array/license b/node_modules/postgres-array/license deleted file mode 100644 index 25c6247..0000000 --- a/node_modules/postgres-array/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Ben Drucker (bendrucker.me) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/postgres-array/package.json b/node_modules/postgres-array/package.json deleted file mode 100644 index d6aa94e..0000000 --- a/node_modules/postgres-array/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "postgres-array", - "main": "index.js", - "version": "2.0.0", - "description": "Parse postgres array columns", - "license": "MIT", - "repository": "bendrucker/postgres-array", - "author": { - "name": "Ben Drucker", - "email": "bvdrucker@gmail.com", - "url": "bendrucker.me" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "standard && tape test.js" - }, - "types": "index.d.ts", - "keywords": [ - "postgres", - "array", - "parser" - ], - "dependencies": {}, - "devDependencies": { - "standard": "^12.0.1", - "tape": "^4.0.0" - }, - "files": [ - "index.js", - "index.d.ts", - "readme.md" - ] -} diff --git a/node_modules/postgres-array/readme.md b/node_modules/postgres-array/readme.md deleted file mode 100644 index b74b369..0000000 --- a/node_modules/postgres-array/readme.md +++ /dev/null @@ -1,43 +0,0 @@ -# postgres-array [![Build Status](https://travis-ci.org/bendrucker/postgres-array.svg?branch=master)](https://travis-ci.org/bendrucker/postgres-array) - -> Parse postgres array columns - - -## Install - -``` -$ npm install --save postgres-array -``` - - -## Usage - -```js -var postgresArray = require('postgres-array') - -postgresArray.parse('{1,2,3}', (value) => parseInt(value, 10)) -//=> [1, 2, 3] -``` - -## API - -#### `parse(input, [transform])` -> `array` - -##### input - -*Required* -Type: `string` - -A Postgres array string. - -##### transform - -Type: `function` -Default: `identity` - -A function that transforms non-null values inserted into the array. - - -## License - -MIT © [Ben Drucker](http://bendrucker.me) diff --git a/node_modules/postgres-bytea/index.js b/node_modules/postgres-bytea/index.js deleted file mode 100644 index b0dc4c7..0000000 --- a/node_modules/postgres-bytea/index.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict' - -var bufferFrom = Buffer.from || Buffer - -module.exports = function parseBytea (input) { - if (/^\\x/.test(input)) { - // new 'hex' style response (pg >9.0) - return bufferFrom(input.substr(2), 'hex') - } - var output = '' - var i = 0 - while (i < input.length) { - if (input[i] !== '\\') { - output += input[i] - ++i - } else { - if (/[0-7]{3}/.test(input.substr(i + 1, 3))) { - output += String.fromCharCode(parseInt(input.substr(i + 1, 3), 8)) - i += 4 - } else { - var backslashes = 1 - while (i + backslashes < input.length && input[i + backslashes] === '\\') { - backslashes++ - } - for (var k = 0; k < Math.floor(backslashes / 2); ++k) { - output += '\\' - } - i += Math.floor(backslashes / 2) * 2 - } - } - } - return bufferFrom(output, 'binary') -} diff --git a/node_modules/postgres-bytea/license b/node_modules/postgres-bytea/license deleted file mode 100644 index 25c6247..0000000 --- a/node_modules/postgres-bytea/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Ben Drucker (bendrucker.me) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/postgres-bytea/package.json b/node_modules/postgres-bytea/package.json deleted file mode 100644 index 344b9a0..0000000 --- a/node_modules/postgres-bytea/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "postgres-bytea", - "main": "index.js", - "version": "1.0.1", - "description": "Postgres bytea parser", - "license": "MIT", - "repository": "bendrucker/postgres-bytea", - "author": { - "name": "Ben Drucker", - "email": "bvdrucker@gmail.com", - "url": "bendrucker.me" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "standard && tape test.js" - }, - "keywords": [ - "bytea", - "postgres", - "binary", - "parser" - ], - "dependencies": {}, - "devDependencies": { - "tape": "^4.0.0", - "standard": "^4.0.0" - }, - "files": [ - "index.js", - "readme.md" - ] -} diff --git a/node_modules/postgres-bytea/readme.md b/node_modules/postgres-bytea/readme.md deleted file mode 100644 index 4939c3b..0000000 --- a/node_modules/postgres-bytea/readme.md +++ /dev/null @@ -1,34 +0,0 @@ -# postgres-bytea [![Build Status](https://travis-ci.org/bendrucker/postgres-bytea.svg?branch=master)](https://travis-ci.org/bendrucker/postgres-bytea) - -> Postgres bytea parser - - -## Install - -``` -$ npm install --save postgres-bytea -``` - - -## Usage - -```js -var bytea = require('postgres-bytea'); -bytea('\\000\\100\\200') -//=> buffer -``` - -## API - -#### `bytea(input)` -> `buffer` - -##### input - -*Required* -Type: `string` - -A Postgres bytea binary string. - -## License - -MIT © [Ben Drucker](http://bendrucker.me) diff --git a/node_modules/postgres-date/index.js b/node_modules/postgres-date/index.js deleted file mode 100644 index 5dc73fb..0000000 --- a/node_modules/postgres-date/index.js +++ /dev/null @@ -1,116 +0,0 @@ -'use strict' - -var DATE_TIME = /(\d{1,})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})(\.\d{1,})?.*?( BC)?$/ -var DATE = /^(\d{1,})-(\d{2})-(\d{2})( BC)?$/ -var TIME_ZONE = /([Z+-])(\d{2})?:?(\d{2})?:?(\d{2})?/ -var INFINITY = /^-?infinity$/ - -module.exports = function parseDate (isoDate) { - if (INFINITY.test(isoDate)) { - // Capitalize to Infinity before passing to Number - return Number(isoDate.replace('i', 'I')) - } - var matches = DATE_TIME.exec(isoDate) - - if (!matches) { - // Force YYYY-MM-DD dates to be parsed as local time - return getDate(isoDate) || null - } - - var isBC = !!matches[8] - var year = parseInt(matches[1], 10) - if (isBC) { - year = bcYearToNegativeYear(year) - } - - var month = parseInt(matches[2], 10) - 1 - var day = matches[3] - var hour = parseInt(matches[4], 10) - var minute = parseInt(matches[5], 10) - var second = parseInt(matches[6], 10) - - var ms = matches[7] - ms = ms ? 1000 * parseFloat(ms) : 0 - - var date - var offset = timeZoneOffset(isoDate) - if (offset != null) { - date = new Date(Date.UTC(year, month, day, hour, minute, second, ms)) - - // Account for years from 0 to 99 being interpreted as 1900-1999 - // by Date.UTC / the multi-argument form of the Date constructor - if (is0To99(year)) { - date.setUTCFullYear(year) - } - - if (offset !== 0) { - date.setTime(date.getTime() - offset) - } - } else { - date = new Date(year, month, day, hour, minute, second, ms) - - if (is0To99(year)) { - date.setFullYear(year) - } - } - - return date -} - -function getDate (isoDate) { - var matches = DATE.exec(isoDate) - if (!matches) { - return - } - - var year = parseInt(matches[1], 10) - var isBC = !!matches[4] - if (isBC) { - year = bcYearToNegativeYear(year) - } - - var month = parseInt(matches[2], 10) - 1 - var day = matches[3] - // YYYY-MM-DD will be parsed as local time - var date = new Date(year, month, day) - - if (is0To99(year)) { - date.setFullYear(year) - } - - return date -} - -// match timezones: -// Z (UTC) -// -05 -// +06:30 -function timeZoneOffset (isoDate) { - if (isoDate.endsWith('+00')) { - return 0 - } - - var zone = TIME_ZONE.exec(isoDate.split(' ')[1]) - if (!zone) return - var type = zone[1] - - if (type === 'Z') { - return 0 - } - var sign = type === '-' ? -1 : 1 - var offset = parseInt(zone[2], 10) * 3600 + - parseInt(zone[3] || 0, 10) * 60 + - parseInt(zone[4] || 0, 10) - - return offset * sign * 1000 -} - -function bcYearToNegativeYear (year) { - // Account for numerical difference between representations of BC years - // See: https://github.com/bendrucker/postgres-date/issues/5 - return -(year - 1) -} - -function is0To99 (num) { - return num >= 0 && num < 100 -} diff --git a/node_modules/postgres-date/license b/node_modules/postgres-date/license deleted file mode 100644 index 25c6247..0000000 --- a/node_modules/postgres-date/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Ben Drucker (bendrucker.me) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/postgres-date/package.json b/node_modules/postgres-date/package.json deleted file mode 100644 index 6fddec7..0000000 --- a/node_modules/postgres-date/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "postgres-date", - "main": "index.js", - "version": "1.0.7", - "description": "Postgres date column parser", - "license": "MIT", - "repository": "bendrucker/postgres-date", - "author": { - "name": "Ben Drucker", - "email": "bvdrucker@gmail.com", - "url": "bendrucker.me" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "standard && tape test.js" - }, - "keywords": [ - "postgres", - "date", - "parser" - ], - "dependencies": {}, - "devDependencies": { - "standard": "^14.0.0", - "tape": "^5.0.0" - }, - "files": [ - "index.js", - "readme.md" - ] -} diff --git a/node_modules/postgres-date/readme.md b/node_modules/postgres-date/readme.md deleted file mode 100644 index 095431a..0000000 --- a/node_modules/postgres-date/readme.md +++ /dev/null @@ -1,49 +0,0 @@ -# postgres-date [![Build Status](https://travis-ci.org/bendrucker/postgres-date.svg?branch=master)](https://travis-ci.org/bendrucker/postgres-date) [![Greenkeeper badge](https://badges.greenkeeper.io/bendrucker/postgres-date.svg)](https://greenkeeper.io/) - -> Postgres date output parser - -This package parses [date/time outputs](https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-DATETIME-OUTPUT) from Postgres into Javascript `Date` objects. Its goal is to match Postgres behavior and preserve data accuracy. - -If you find a case where a valid Postgres output results in incorrect parsing (including loss of precision), please [create a pull request](https://github.com/bendrucker/postgres-date/compare) and provide a failing test. - -**Supported Postgres Versions:** `>= 9.6` - -All prior versions of Postgres are likely compatible but not officially supported. - -## Install - -``` -$ npm install --save postgres-date -``` - - -## Usage - -```js -var parse = require('postgres-date') -parse('2011-01-23 22:15:51Z') -// => 2011-01-23T22:15:51.000Z -``` - -## API - -#### `parse(isoDate)` -> `date` - -##### isoDate - -*Required* -Type: `string` - -A date string from Postgres. - -## Releases - -The following semantic versioning increments will be used for changes: - -* **Major**: Removal of support for Node.js versions or Postgres versions (not expected) -* **Minor**: Unused, since Postgres returns dates in standard ISO 8601 format -* **Patch**: Any fix for parsing behavior - -## License - -MIT © [Ben Drucker](http://bendrucker.me) diff --git a/node_modules/postgres-interval/index.d.ts b/node_modules/postgres-interval/index.d.ts deleted file mode 100644 index f82b4c3..0000000 --- a/node_modules/postgres-interval/index.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -declare namespace PostgresInterval { - export interface IPostgresInterval { - years?: number; - months?: number; - days?: number; - hours?: number; - minutes?: number; - seconds?: number; - milliseconds?: number; - - toPostgres(): string; - - toISO(): string; - toISOString(): string; - } -} - -declare function PostgresInterval(raw: string): PostgresInterval.IPostgresInterval; - -export = PostgresInterval; diff --git a/node_modules/postgres-interval/index.js b/node_modules/postgres-interval/index.js deleted file mode 100644 index 8ecca80..0000000 --- a/node_modules/postgres-interval/index.js +++ /dev/null @@ -1,125 +0,0 @@ -'use strict' - -var extend = require('xtend/mutable') - -module.exports = PostgresInterval - -function PostgresInterval (raw) { - if (!(this instanceof PostgresInterval)) { - return new PostgresInterval(raw) - } - extend(this, parse(raw)) -} -var properties = ['seconds', 'minutes', 'hours', 'days', 'months', 'years'] -PostgresInterval.prototype.toPostgres = function () { - var filtered = properties.filter(this.hasOwnProperty, this) - - // In addition to `properties`, we need to account for fractions of seconds. - if (this.milliseconds && filtered.indexOf('seconds') < 0) { - filtered.push('seconds') - } - - if (filtered.length === 0) return '0' - return filtered - .map(function (property) { - var value = this[property] || 0 - - // Account for fractional part of seconds, - // remove trailing zeroes. - if (property === 'seconds' && this.milliseconds) { - value = (value + this.milliseconds / 1000).toFixed(6).replace(/\.?0+$/, '') - } - - return value + ' ' + property - }, this) - .join(' ') -} - -var propertiesISOEquivalent = { - years: 'Y', - months: 'M', - days: 'D', - hours: 'H', - minutes: 'M', - seconds: 'S' -} -var dateProperties = ['years', 'months', 'days'] -var timeProperties = ['hours', 'minutes', 'seconds'] -// according to ISO 8601 -PostgresInterval.prototype.toISOString = PostgresInterval.prototype.toISO = function () { - var datePart = dateProperties - .map(buildProperty, this) - .join('') - - var timePart = timeProperties - .map(buildProperty, this) - .join('') - - return 'P' + datePart + 'T' + timePart - - function buildProperty (property) { - var value = this[property] || 0 - - // Account for fractional part of seconds, - // remove trailing zeroes. - if (property === 'seconds' && this.milliseconds) { - value = (value + this.milliseconds / 1000).toFixed(6).replace(/0+$/, '') - } - - return value + propertiesISOEquivalent[property] - } -} - -var NUMBER = '([+-]?\\d+)' -var YEAR = NUMBER + '\\s+years?' -var MONTH = NUMBER + '\\s+mons?' -var DAY = NUMBER + '\\s+days?' -var TIME = '([+-])?([\\d]*):(\\d\\d):(\\d\\d)\\.?(\\d{1,6})?' -var INTERVAL = new RegExp([YEAR, MONTH, DAY, TIME].map(function (regexString) { - return '(' + regexString + ')?' -}) - .join('\\s*')) - -// Positions of values in regex match -var positions = { - years: 2, - months: 4, - days: 6, - hours: 9, - minutes: 10, - seconds: 11, - milliseconds: 12 -} -// We can use negative time -var negatives = ['hours', 'minutes', 'seconds', 'milliseconds'] - -function parseMilliseconds (fraction) { - // add omitted zeroes - var microseconds = fraction + '000000'.slice(fraction.length) - return parseInt(microseconds, 10) / 1000 -} - -function parse (interval) { - if (!interval) return {} - var matches = INTERVAL.exec(interval) - var isNegative = matches[8] === '-' - return Object.keys(positions) - .reduce(function (parsed, property) { - var position = positions[property] - var value = matches[position] - // no empty string - if (!value) return parsed - // milliseconds are actually microseconds (up to 6 digits) - // with omitted trailing zeroes. - value = property === 'milliseconds' - ? parseMilliseconds(value) - : parseInt(value, 10) - // no zeros - if (!value) return parsed - if (isNegative && ~negatives.indexOf(property)) { - value *= -1 - } - parsed[property] = value - return parsed - }, {}) -} diff --git a/node_modules/postgres-interval/license b/node_modules/postgres-interval/license deleted file mode 100644 index 25c6247..0000000 --- a/node_modules/postgres-interval/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Ben Drucker (bendrucker.me) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/postgres-interval/package.json b/node_modules/postgres-interval/package.json deleted file mode 100644 index 95520a0..0000000 --- a/node_modules/postgres-interval/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "postgres-interval", - "main": "index.js", - "version": "1.2.0", - "description": "Parse Postgres interval columns", - "license": "MIT", - "repository": "bendrucker/postgres-interval", - "author": { - "name": "Ben Drucker", - "email": "bvdrucker@gmail.com", - "url": "bendrucker.me" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "standard && tape test.js" - }, - "keywords": [ - "postgres", - "interval", - "parser" - ], - "dependencies": { - "xtend": "^4.0.0" - }, - "devDependencies": { - "tape": "^4.0.0", - "standard": "^12.0.1" - }, - "files": [ - "index.js", - "index.d.ts", - "readme.md" - ] -} diff --git a/node_modules/postgres-interval/readme.md b/node_modules/postgres-interval/readme.md deleted file mode 100644 index 53cda4a..0000000 --- a/node_modules/postgres-interval/readme.md +++ /dev/null @@ -1,48 +0,0 @@ -# postgres-interval [![Build Status](https://travis-ci.org/bendrucker/postgres-interval.svg?branch=master)](https://travis-ci.org/bendrucker/postgres-interval) [![Greenkeeper badge](https://badges.greenkeeper.io/bendrucker/postgres-interval.svg)](https://greenkeeper.io/) - -> Parse Postgres interval columns - - -## Install - -``` -$ npm install --save postgres-interval -``` - - -## Usage - -```js -var parse = require('postgres-interval') -var interval = parse('01:02:03') -//=> {hours: 1, minutes: 2, seconds: 3} -interval.toPostgres() -// 3 seconds 2 minutes 1 hours -interval.toISO() -// P0Y0M0DT1H2M3S -``` - -## API - -#### `parse(pgInterval)` -> `interval` - -##### pgInterval - -*Required* -Type: `string` - -A Postgres interval string. - -#### `interval.toPostgres()` -> `string` - -Returns an interval string. This allows the interval object to be passed into prepared statements. - -#### `interval.toISOString()` -> `string` - -Returns an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Durations) compliant string. - -Also available as `interval.toISO()` for backwards compatibility. - -## License - -MIT © [Ben Drucker](http://bendrucker.me) diff --git a/node_modules/proxy-addr/HISTORY.md b/node_modules/proxy-addr/HISTORY.md deleted file mode 100644 index 8480242..0000000 --- a/node_modules/proxy-addr/HISTORY.md +++ /dev/null @@ -1,161 +0,0 @@ -2.0.7 / 2021-05-31 -================== - - * deps: forwarded@0.2.0 - - Use `req.socket` over deprecated `req.connection` - -2.0.6 / 2020-02-24 -================== - - * deps: ipaddr.js@1.9.1 - -2.0.5 / 2019-04-16 -================== - - * deps: ipaddr.js@1.9.0 - -2.0.4 / 2018-07-26 -================== - - * deps: ipaddr.js@1.8.0 - -2.0.3 / 2018-02-19 -================== - - * deps: ipaddr.js@1.6.0 - -2.0.2 / 2017-09-24 -================== - - * deps: forwarded@~0.1.2 - - perf: improve header parsing - - perf: reduce overhead when no `X-Forwarded-For` header - -2.0.1 / 2017-09-10 -================== - - * deps: forwarded@~0.1.1 - - Fix trimming leading / trailing OWS - - perf: hoist regular expression - * deps: ipaddr.js@1.5.2 - -2.0.0 / 2017-08-08 -================== - - * Drop support for Node.js below 0.10 - -1.1.5 / 2017-07-25 -================== - - * Fix array argument being altered - * deps: ipaddr.js@1.4.0 - -1.1.4 / 2017-03-24 -================== - - * deps: ipaddr.js@1.3.0 - -1.1.3 / 2017-01-14 -================== - - * deps: ipaddr.js@1.2.0 - -1.1.2 / 2016-05-29 -================== - - * deps: ipaddr.js@1.1.1 - - Fix IPv6-mapped IPv4 validation edge cases - -1.1.1 / 2016-05-03 -================== - - * Fix regression matching mixed versions against multiple subnets - -1.1.0 / 2016-05-01 -================== - - * Fix accepting various invalid netmasks - - IPv4 netmasks must be contingous - - IPv6 addresses cannot be used as a netmask - * deps: ipaddr.js@1.1.0 - -1.0.10 / 2015-12-09 -=================== - - * deps: ipaddr.js@1.0.5 - - Fix regression in `isValid` with non-string arguments - -1.0.9 / 2015-12-01 -================== - - * deps: ipaddr.js@1.0.4 - - Fix accepting some invalid IPv6 addresses - - Reject CIDRs with negative or overlong masks - * perf: enable strict mode - -1.0.8 / 2015-05-10 -================== - - * deps: ipaddr.js@1.0.1 - -1.0.7 / 2015-03-16 -================== - - * deps: ipaddr.js@0.1.9 - - Fix OOM on certain inputs to `isValid` - -1.0.6 / 2015-02-01 -================== - - * deps: ipaddr.js@0.1.8 - -1.0.5 / 2015-01-08 -================== - - * deps: ipaddr.js@0.1.6 - -1.0.4 / 2014-11-23 -================== - - * deps: ipaddr.js@0.1.5 - - Fix edge cases with `isValid` - -1.0.3 / 2014-09-21 -================== - - * Use `forwarded` npm module - -1.0.2 / 2014-09-18 -================== - - * Fix a global leak when multiple subnets are trusted - * Support Node.js 0.6 - * deps: ipaddr.js@0.1.3 - -1.0.1 / 2014-06-03 -================== - - * Fix links in npm package - -1.0.0 / 2014-05-08 -================== - - * Add `trust` argument to determine proxy trust on - * Accepts custom function - * Accepts IPv4/IPv6 address(es) - * Accepts subnets - * Accepts pre-defined names - * Add optional `trust` argument to `proxyaddr.all` to - stop at first untrusted - * Add `proxyaddr.compile` to pre-compile `trust` function - to make subsequent calls faster - -0.0.1 / 2014-05-04 -================== - - * Fix bad npm publish - -0.0.0 / 2014-05-04 -================== - - * Initial release diff --git a/node_modules/proxy-addr/LICENSE b/node_modules/proxy-addr/LICENSE deleted file mode 100644 index cab251c..0000000 --- a/node_modules/proxy-addr/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2014-2016 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/proxy-addr/README.md b/node_modules/proxy-addr/README.md deleted file mode 100644 index 69c0b63..0000000 --- a/node_modules/proxy-addr/README.md +++ /dev/null @@ -1,139 +0,0 @@ -# proxy-addr - -[![NPM Version][npm-version-image]][npm-url] -[![NPM Downloads][npm-downloads-image]][npm-url] -[![Node.js Version][node-image]][node-url] -[![Build Status][ci-image]][ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Determine address of proxied request - -## Install - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install proxy-addr -``` - -## API - -```js -var proxyaddr = require('proxy-addr') -``` - -### proxyaddr(req, trust) - -Return the address of the request, using the given `trust` parameter. - -The `trust` argument is a function that returns `true` if you trust -the address, `false` if you don't. The closest untrusted address is -returned. - -```js -proxyaddr(req, function (addr) { return addr === '127.0.0.1' }) -proxyaddr(req, function (addr, i) { return i < 1 }) -``` - -The `trust` arugment may also be a single IP address string or an -array of trusted addresses, as plain IP addresses, CIDR-formatted -strings, or IP/netmask strings. - -```js -proxyaddr(req, '127.0.0.1') -proxyaddr(req, ['127.0.0.0/8', '10.0.0.0/8']) -proxyaddr(req, ['127.0.0.0/255.0.0.0', '192.168.0.0/255.255.0.0']) -``` - -This module also supports IPv6. Your IPv6 addresses will be normalized -automatically (i.e. `fe80::00ed:1` equals `fe80:0:0:0:0:0:ed:1`). - -```js -proxyaddr(req, '::1') -proxyaddr(req, ['::1/128', 'fe80::/10']) -``` - -This module will automatically work with IPv4-mapped IPv6 addresses -as well to support node.js in IPv6-only mode. This means that you do -not have to specify both `::ffff:a00:1` and `10.0.0.1`. - -As a convenience, this module also takes certain pre-defined names -in addition to IP addresses, which expand into IP addresses: - -```js -proxyaddr(req, 'loopback') -proxyaddr(req, ['loopback', 'fc00:ac:1ab5:fff::1/64']) -``` - - * `loopback`: IPv4 and IPv6 loopback addresses (like `::1` and - `127.0.0.1`). - * `linklocal`: IPv4 and IPv6 link-local addresses (like - `fe80::1:1:1:1` and `169.254.0.1`). - * `uniquelocal`: IPv4 private addresses and IPv6 unique-local - addresses (like `fc00:ac:1ab5:fff::1` and `192.168.0.1`). - -When `trust` is specified as a function, it will be called for each -address to determine if it is a trusted address. The function is -given two arguments: `addr` and `i`, where `addr` is a string of -the address to check and `i` is a number that represents the distance -from the socket address. - -### proxyaddr.all(req, [trust]) - -Return all the addresses of the request, optionally stopping at the -first untrusted. This array is ordered from closest to furthest -(i.e. `arr[0] === req.connection.remoteAddress`). - -```js -proxyaddr.all(req) -``` - -The optional `trust` argument takes the same arguments as `trust` -does in `proxyaddr(req, trust)`. - -```js -proxyaddr.all(req, 'loopback') -``` - -### proxyaddr.compile(val) - -Compiles argument `val` into a `trust` function. This function takes -the same arguments as `trust` does in `proxyaddr(req, trust)` and -returns a function suitable for `proxyaddr(req, trust)`. - -```js -var trust = proxyaddr.compile('loopback') -var addr = proxyaddr(req, trust) -``` - -This function is meant to be optimized for use against every request. -It is recommend to compile a trust function up-front for the trusted -configuration and pass that to `proxyaddr(req, trust)` for each request. - -## Testing - -```sh -$ npm test -``` - -## Benchmarks - -```sh -$ npm run-script bench -``` - -## License - -[MIT](LICENSE) - -[ci-image]: https://badgen.net/github/checks/jshttp/proxy-addr/master?label=ci -[ci-url]: https://github.com/jshttp/proxy-addr/actions?query=workflow%3Aci -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/proxy-addr/master -[coveralls-url]: https://coveralls.io/r/jshttp/proxy-addr?branch=master -[node-image]: https://badgen.net/npm/node/proxy-addr -[node-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/proxy-addr -[npm-url]: https://npmjs.org/package/proxy-addr -[npm-version-image]: https://badgen.net/npm/v/proxy-addr diff --git a/node_modules/proxy-addr/index.js b/node_modules/proxy-addr/index.js deleted file mode 100644 index a909b05..0000000 --- a/node_modules/proxy-addr/index.js +++ /dev/null @@ -1,327 +0,0 @@ -/*! - * proxy-addr - * Copyright(c) 2014-2016 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module exports. - * @public - */ - -module.exports = proxyaddr -module.exports.all = alladdrs -module.exports.compile = compile - -/** - * Module dependencies. - * @private - */ - -var forwarded = require('forwarded') -var ipaddr = require('ipaddr.js') - -/** - * Variables. - * @private - */ - -var DIGIT_REGEXP = /^[0-9]+$/ -var isip = ipaddr.isValid -var parseip = ipaddr.parse - -/** - * Pre-defined IP ranges. - * @private - */ - -var IP_RANGES = { - linklocal: ['169.254.0.0/16', 'fe80::/10'], - loopback: ['127.0.0.1/8', '::1/128'], - uniquelocal: ['10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16', 'fc00::/7'] -} - -/** - * Get all addresses in the request, optionally stopping - * at the first untrusted. - * - * @param {Object} request - * @param {Function|Array|String} [trust] - * @public - */ - -function alladdrs (req, trust) { - // get addresses - var addrs = forwarded(req) - - if (!trust) { - // Return all addresses - return addrs - } - - if (typeof trust !== 'function') { - trust = compile(trust) - } - - for (var i = 0; i < addrs.length - 1; i++) { - if (trust(addrs[i], i)) continue - - addrs.length = i + 1 - } - - return addrs -} - -/** - * Compile argument into trust function. - * - * @param {Array|String} val - * @private - */ - -function compile (val) { - if (!val) { - throw new TypeError('argument is required') - } - - var trust - - if (typeof val === 'string') { - trust = [val] - } else if (Array.isArray(val)) { - trust = val.slice() - } else { - throw new TypeError('unsupported trust argument') - } - - for (var i = 0; i < trust.length; i++) { - val = trust[i] - - if (!Object.prototype.hasOwnProperty.call(IP_RANGES, val)) { - continue - } - - // Splice in pre-defined range - val = IP_RANGES[val] - trust.splice.apply(trust, [i, 1].concat(val)) - i += val.length - 1 - } - - return compileTrust(compileRangeSubnets(trust)) -} - -/** - * Compile `arr` elements into range subnets. - * - * @param {Array} arr - * @private - */ - -function compileRangeSubnets (arr) { - var rangeSubnets = new Array(arr.length) - - for (var i = 0; i < arr.length; i++) { - rangeSubnets[i] = parseipNotation(arr[i]) - } - - return rangeSubnets -} - -/** - * Compile range subnet array into trust function. - * - * @param {Array} rangeSubnets - * @private - */ - -function compileTrust (rangeSubnets) { - // Return optimized function based on length - var len = rangeSubnets.length - return len === 0 - ? trustNone - : len === 1 - ? trustSingle(rangeSubnets[0]) - : trustMulti(rangeSubnets) -} - -/** - * Parse IP notation string into range subnet. - * - * @param {String} note - * @private - */ - -function parseipNotation (note) { - var pos = note.lastIndexOf('/') - var str = pos !== -1 - ? note.substring(0, pos) - : note - - if (!isip(str)) { - throw new TypeError('invalid IP address: ' + str) - } - - var ip = parseip(str) - - if (pos === -1 && ip.kind() === 'ipv6' && ip.isIPv4MappedAddress()) { - // Store as IPv4 - ip = ip.toIPv4Address() - } - - var max = ip.kind() === 'ipv6' - ? 128 - : 32 - - var range = pos !== -1 - ? note.substring(pos + 1, note.length) - : null - - if (range === null) { - range = max - } else if (DIGIT_REGEXP.test(range)) { - range = parseInt(range, 10) - } else if (ip.kind() === 'ipv4' && isip(range)) { - range = parseNetmask(range) - } else { - range = null - } - - if (range <= 0 || range > max) { - throw new TypeError('invalid range on address: ' + note) - } - - return [ip, range] -} - -/** - * Parse netmask string into CIDR range. - * - * @param {String} netmask - * @private - */ - -function parseNetmask (netmask) { - var ip = parseip(netmask) - var kind = ip.kind() - - return kind === 'ipv4' - ? ip.prefixLengthFromSubnetMask() - : null -} - -/** - * Determine address of proxied request. - * - * @param {Object} request - * @param {Function|Array|String} trust - * @public - */ - -function proxyaddr (req, trust) { - if (!req) { - throw new TypeError('req argument is required') - } - - if (!trust) { - throw new TypeError('trust argument is required') - } - - var addrs = alladdrs(req, trust) - var addr = addrs[addrs.length - 1] - - return addr -} - -/** - * Static trust function to trust nothing. - * - * @private - */ - -function trustNone () { - return false -} - -/** - * Compile trust function for multiple subnets. - * - * @param {Array} subnets - * @private - */ - -function trustMulti (subnets) { - return function trust (addr) { - if (!isip(addr)) return false - - var ip = parseip(addr) - var ipconv - var kind = ip.kind() - - for (var i = 0; i < subnets.length; i++) { - var subnet = subnets[i] - var subnetip = subnet[0] - var subnetkind = subnetip.kind() - var subnetrange = subnet[1] - var trusted = ip - - if (kind !== subnetkind) { - if (subnetkind === 'ipv4' && !ip.isIPv4MappedAddress()) { - // Incompatible IP addresses - continue - } - - if (!ipconv) { - // Convert IP to match subnet IP kind - ipconv = subnetkind === 'ipv4' - ? ip.toIPv4Address() - : ip.toIPv4MappedAddress() - } - - trusted = ipconv - } - - if (trusted.match(subnetip, subnetrange)) { - return true - } - } - - return false - } -} - -/** - * Compile trust function for single subnet. - * - * @param {Object} subnet - * @private - */ - -function trustSingle (subnet) { - var subnetip = subnet[0] - var subnetkind = subnetip.kind() - var subnetisipv4 = subnetkind === 'ipv4' - var subnetrange = subnet[1] - - return function trust (addr) { - if (!isip(addr)) return false - - var ip = parseip(addr) - var kind = ip.kind() - - if (kind !== subnetkind) { - if (subnetisipv4 && !ip.isIPv4MappedAddress()) { - // Incompatible IP addresses - return false - } - - // Convert IP to match subnet IP kind - ip = subnetisipv4 - ? ip.toIPv4Address() - : ip.toIPv4MappedAddress() - } - - return ip.match(subnetip, subnetrange) - } -} diff --git a/node_modules/proxy-addr/package.json b/node_modules/proxy-addr/package.json deleted file mode 100644 index 24ba8f7..0000000 --- a/node_modules/proxy-addr/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "proxy-addr", - "description": "Determine address of proxied request", - "version": "2.0.7", - "author": "Douglas Christopher Wilson ", - "license": "MIT", - "keywords": [ - "ip", - "proxy", - "x-forwarded-for" - ], - "repository": "jshttp/proxy-addr", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "devDependencies": { - "benchmark": "2.1.4", - "beautify-benchmark": "0.2.4", - "deep-equal": "1.0.1", - "eslint": "7.26.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.23.4", - "eslint-plugin-markdown": "2.2.0", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "4.3.1", - "eslint-plugin-standard": "4.1.0", - "mocha": "8.4.0", - "nyc": "15.1.0" - }, - "files": [ - "LICENSE", - "HISTORY.md", - "README.md", - "index.js" - ], - "engines": { - "node": ">= 0.10" - }, - "scripts": { - "bench": "node benchmark/index.js", - "lint": "eslint .", - "test": "mocha --reporter spec --bail --check-leaks test/", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test" - } -} diff --git a/node_modules/pstree.remy/.travis.yml b/node_modules/pstree.remy/.travis.yml deleted file mode 100644 index 5bf093e..0000000 --- a/node_modules/pstree.remy/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -cache: - directories: - - ~/.npm -notifications: - email: false -node_js: - - '8' diff --git a/node_modules/pstree.remy/LICENSE b/node_modules/pstree.remy/LICENSE deleted file mode 100644 index e83bea6..0000000 --- a/node_modules/pstree.remy/LICENSE +++ /dev/null @@ -1,7 +0,0 @@ -The MIT License (MIT) -Copyright © 2019 Remy Sharp, https://remysharp.com -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/pstree.remy/README.md b/node_modules/pstree.remy/README.md deleted file mode 100644 index 5f44c62..0000000 --- a/node_modules/pstree.remy/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# pstree.remy - -> Cross platform ps-tree (including unix flavours without ps) - -## Installation - -```shel -npm install pstree.remy -``` - -## Usage - -```js -const psTree = psTree require('pstree.remy'); - -psTree(PID, (err, pids) => { - if (err) { - console.error(err); - } - console.log(pids) -}); - -console.log(psTree.hasPS - ? "This platform has the ps shell command" - : "This platform does not have the ps shell command"); -``` diff --git a/node_modules/pstree.remy/lib/index.js b/node_modules/pstree.remy/lib/index.js deleted file mode 100644 index 743e997..0000000 --- a/node_modules/pstree.remy/lib/index.js +++ /dev/null @@ -1,37 +0,0 @@ -const exec = require('child_process').exec; -const tree = require('./tree'); -const utils = require('./utils'); -var hasPS = true; - -// discover if the OS has `ps`, and therefore can use psTree -exec('ps', (error) => { - module.exports.hasPS = hasPS = !error; -}); - -module.exports = function main(pid, callback) { - if (typeof pid === 'number') { - pid = pid.toString(); - } - - if (hasPS && !process.env.NO_PS) { - return tree(pid, callback); - } - - utils - .getStat() - .then(utils.tree) - .then((tree) => utils.pidsForTree(tree, pid)) - .then((res) => - callback( - null, - res.map((p) => p.PID) - ) - ) - .catch((error) => callback(error)); -}; - -if (!module.parent) { - module.exports(process.argv[2], (e, pids) => console.log(pids)); -} - -module.exports.hasPS = hasPS; diff --git a/node_modules/pstree.remy/lib/tree.js b/node_modules/pstree.remy/lib/tree.js deleted file mode 100644 index bac7cce..0000000 --- a/node_modules/pstree.remy/lib/tree.js +++ /dev/null @@ -1,37 +0,0 @@ -const spawn = require('child_process').spawn; - -module.exports = function (rootPid, callback) { - const pidsOfInterest = new Set([parseInt(rootPid, 10)]); - var output = ''; - - // *nix - const ps = spawn('ps', ['-A', '-o', 'ppid,pid']); - ps.stdout.on('data', (data) => { - output += data.toString('ascii'); - }); - - ps.on('close', () => { - try { - const res = output - .split('\n') - .slice(1) - .map((_) => _.trim()) - .reduce((acc, line) => { - const pids = line.split(/\s+/); - const ppid = parseInt(pids[0], 10); - - if (pidsOfInterest.has(ppid)) { - const pid = parseInt(pids[1], 10); - acc.push(pid); - pidsOfInterest.add(pid); - } - - return acc; - }, []); - - callback(null, res); - } catch (e) { - callback(e, null); - } - }); -}; diff --git a/node_modules/pstree.remy/lib/utils.js b/node_modules/pstree.remy/lib/utils.js deleted file mode 100644 index 8fa5719..0000000 --- a/node_modules/pstree.remy/lib/utils.js +++ /dev/null @@ -1,53 +0,0 @@ -const spawn = require('child_process').spawn; - -module.exports = { tree, pidsForTree, getStat }; - -function getStat() { - return new Promise((resolve) => { - const command = `ls /proc | grep -E '^[0-9]+$' | xargs -I{} cat /proc/{}/stat`; - const spawned = spawn('sh', ['-c', command], { - stdio: ['pipe', 'pipe', 'pipe'], - }); - - var res = ''; - spawned.stdout.on('data', (data) => (res += data)); - spawned.on('close', () => resolve(res)); - }); -} - -function template(s) { - var stat = null; - // 'pid', 'comm', 'state', 'ppid', 'pgrp' - // %d (%s) %c %d %d - s.replace( - /(\d+) \((.*?)\)\s(.+?)\s(\d+)\s/g, - (all, PID, COMMAND, STAT, PPID) => { - stat = { PID, COMMAND, PPID, STAT }; - } - ); - - return stat; -} - -function tree(stats) { - const processes = stats.split('\n').map(template).filter(Boolean); - - return processes; -} - -function pidsForTree(tree, pid) { - if (typeof pid === 'number') { - pid = pid.toString(); - } - const parents = [pid]; - const pids = []; - - tree.forEach((proc) => { - if (parents.indexOf(proc.PPID) !== -1) { - parents.push(proc.PID); - pids.push(proc); - } - }); - - return pids; -} diff --git a/node_modules/pstree.remy/package.json b/node_modules/pstree.remy/package.json deleted file mode 100644 index 35c7068..0000000 --- a/node_modules/pstree.remy/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "pstree.remy", - "version": "1.1.8", - "main": "lib/index.js", - "prettier": { - "trailingComma": "es5", - "semi": true, - "singleQuote": true - }, - "scripts": { - "test": "tap tests/*.test.js", - "_prepublish": "npm test" - }, - "keywords": [ - "ps", - "pstree", - "ps tree" - ], - "author": "Remy Sharp", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/remy/pstree.git" - }, - "devDependencies": { - "tap": "^11.0.0" - }, - "directories": { - "test": "tests" - }, - "dependencies": {}, - "description": "Collects the full tree of processes from /proc" -} diff --git a/node_modules/pstree.remy/tests/fixtures/index.js b/node_modules/pstree.remy/tests/fixtures/index.js deleted file mode 100644 index 4cdbcb1..0000000 --- a/node_modules/pstree.remy/tests/fixtures/index.js +++ /dev/null @@ -1,13 +0,0 @@ -const spawn = require('child_process').spawn; -function run() { - spawn( - 'sh', - ['-c', 'node -e "setInterval(() => console.log(`running`), 200)"'], - { - stdio: 'pipe', - } - ); -} - -var runCallCount = process.argv[2] || 1; -for (var i = 0; i < runCallCount; i++) run(); diff --git a/node_modules/pstree.remy/tests/fixtures/out1 b/node_modules/pstree.remy/tests/fixtures/out1 deleted file mode 100644 index abfe581..0000000 --- a/node_modules/pstree.remy/tests/fixtures/out1 +++ /dev/null @@ -1,10 +0,0 @@ -1 (npm) S 0 1 1 34816 1 4210944 11112 0 0 0 45 8 0 0 20 0 10 0 330296 1089871872 11809 18446744073709551615 4194304 29343848 140726436642896 0 0 0 0 4096 2072112895 0 0 0 17 0 0 0 0 0 0 31441000 31537208 37314560 140726436650815 140726436650847 140726436650847 140726436650986 0 -15 (sh) S 1 1 1 34816 1 4210688 115 0 0 0 0 0 0 0 20 0 1 0 330372 4399104 187 18446744073709551615 94374393548800 94374393655428 140722913272992 0 0 0 0 0 65538 0 0 0 17 0 0 0 0 0 0 94374395756424 94374395761184 94374404673536 140722913278928 140722913278959 140722913278959 140722913284080 0 -16 (node) S 15 1 1 34816 1 4210688 6930 103 0 0 32 2 0 0 20 0 10 0 330373 1068478464 8412 18446744073709551615 4194304 29343848 140727228046064 0 0 0 0 4096 134300162 0 0 0 17 1 0 0 1 0 0 31441000 31537208 52584448 140727228050313 140727228050383 140727228050383 140727228055530 0 -27 (sh) S 16 1 1 34816 1 4210688 111 0 0 0 0 0 0 0 20 0 1 0 330410 4399104 193 18446744073709551615 94848235986944 94848236093572 140727019991184 0 0 0 0 0 65538 0 0 0 17 1 0 0 0 0 0 94848238194568 94848238199328 94848261660672 140727019998122 140727019998165 140727019998165 140727020003312 0 -28 (node) S 27 1 1 34816 1 4210688 3576 268 0 0 12 2 0 0 20 0 10 0 330411 930213888 6760 18446744073709551615 4194304 29343848 140726559664992 0 0 0 0 4096 134300162 0 0 0 17 1 0 0 0 0 0 31441000 31537208 32591872 140726559669117 140726559669199 140726559669199 140726559674346 0 -39 (node) S 28 1 1 34816 1 4210688 47517 0 0 0 151 9 0 0 20 0 6 0 330427 985739264 31859 18446744073709551615 4194304 29343848 140737324503920 0 0 0 0 4096 134234626 0 0 0 17 0 0 0 0 0 0 31441000 31537208 51585024 140737324510060 140737324510159 140737324510159 140737324515306 0 -45 (bash) S 0 45 45 34817 50 4210944 752 256 0 0 2 0 0 0 20 0 1 0 331039 18628608 789 18446744073709551615 4194304 5242124 140724425887696 0 0 0 65536 3670020 1266777851 0 0 0 17 1 0 0 0 0 0 7341384 7388228 30310400 140724425891678 140724425891683 140724425891683 140724425891822 0 -cat: /proc/50/stat: No such file or directory -cat: /proc/51/stat: No such file or directory -52 (xargs) S 45 50 45 34817 50 4210688 179 661 0 0 0 0 0 0 20 0 1 0 331544 4608000 346 18446744073709551615 94587588550656 94587588614028 140735223856048 0 0 0 0 0 2560 0 0 0 17 1 0 0 0 0 0 94587590711464 94587590713504 94587603169280 140735223861006 140735223861035 140735223861035 140735223861225 0 diff --git a/node_modules/pstree.remy/tests/fixtures/out2 b/node_modules/pstree.remy/tests/fixtures/out2 deleted file mode 100644 index 3b31137..0000000 --- a/node_modules/pstree.remy/tests/fixtures/out2 +++ /dev/null @@ -1,29 +0,0 @@ -cat: /proc/4087/stat: No such file or directory -cat: /proc/4088/stat: No such file or directory -1 (init) S 0 1 1 0 -1 4210944 9227 55994 29 319 7 5 68 16 20 0 1 0 1286281 33660928 855 18446744073709551615 1 1 0 0 0 0 0 4096 536962595 0 0 0 17 4 0 0 3 0 0 0 0 0 0 0 0 0 0 -1032 (ntpd) S 1 1032 1032 0 -1 4211008 178 0 1 0 0 0 0 0 20 0 1 0 1287033 25743360 1058 18446744073709551615 1 1 0 0 0 0 0 4096 27207 0 0 0 17 4 0 0 0 0 0 0 0 0 0 0 0 0 0 -126 (irqbalance) S 1 126 126 0 -1 1077952832 1217 0 0 0 1 6 0 0 20 0 1 0 1286749 20189184 647 18446744073709551615 1 1 0 0 0 0 0 0 3 0 0 0 17 4 0 0 0 0 0 0 0 0 0 0 0 0 0 -181 (mysqld) S 1 181 181 0 -1 4210944 6399 0 46 0 8 6 0 0 20 0 22 0 1286761 748453888 14476 18446744073709551615 1 1 0 0 0 0 552967 4096 26345 0 0 0 17 4 0 0 10 0 0 0 0 0 0 0 0 0 0 -194 (memcached) S 1 187 187 0 -1 4210944 252 0 4 0 0 0 0 0 20 0 6 0 1286766 333221888 648 18446744073709551615 1 1 0 0 0 0 0 4096 2 0 0 0 17 4 0 0 0 0 0 0 0 0 0 0 0 0 0 -243 (dbus-daemon) S 1 243 243 0 -1 4211008 67 0 0 0 0 0 0 0 20 0 1 0 1286779 40087552 598 18446744073709551615 1 1 0 0 0 0 0 0 16385 0 0 0 17 4 0 0 0 0 0 0 0 0 0 0 0 0 0 -254 (rsyslogd) S 1 254 254 0 -1 4211008 107 0 0 0 2 2 0 0 20 0 3 0 1286782 186601472 696 18446744073709551615 1 1 0 0 0 0 0 16781830 1133601 0 0 0 17 5 0 0 0 0 0 0 0 0 0 0 0 0 0 -265 (systemd-logind) S 1 265 265 0 -1 4210944 276 0 2 0 0 0 0 0 20 0 1 0 1286786 35880960 720 18446744073709551615 1 1 0 0 0 0 0 0 0 0 0 0 17 4 0 0 0 0 0 0 0 0 0 0 0 0 0 -333 (postgres) S 1 303 303 0 -1 4210688 3169 3466 15 18 0 1 1 1 20 0 1 0 1286817 156073984 5002 18446744073709551615 1 1 0 0 0 0 0 19935232 84487 0 0 0 17 5 0 0 1 0 0 0 0 0 0 0 0 0 0 -359 (postgres) S 333 359 359 0 -1 4210752 90 0 0 0 0 0 0 0 20 0 1 0 1286822 156073984 827 18446744073709551615 1 1 0 0 0 0 0 16805888 2567 0 0 0 17 4 0 0 0 0 0 0 0 0 0 0 0 0 0 -360 (postgres) S 333 360 360 0 -1 4210752 119 0 0 0 0 0 0 0 20 0 1 0 1286822 156073984 827 18446744073709551615 1 1 0 0 0 0 0 16791554 16901 0 0 0 17 4 0 0 0 0 0 0 0 0 0 0 0 0 0 -361 (postgres) S 333 361 361 0 -1 4210752 87 0 0 0 0 0 0 0 20 0 1 0 1286822 156073984 827 18446744073709551615 1 1 0 0 0 0 0 16791552 16903 0 0 0 17 4 0 0 0 0 0 0 0 0 0 0 0 0 0 -362 (postgres) S 333 362 362 0 -1 4210752 292 0 3 0 0 0 0 0 20 0 1 0 1286822 156930048 1373 18446744073709551615 1 1 0 0 0 0 0 19927040 27271 0 0 0 17 5 0 0 0 0 0 0 0 0 0 0 0 0 0 -363 (postgres) S 333 363 363 0 -1 4210752 82 0 0 0 0 0 0 0 20 0 1 0 1286822 115924992 887 18446744073709551615 1 1 0 0 0 0 0 16808450 5 0 0 0 17 5 0 0 0 0 0 0 0 0 0 0 0 0 0 -4050 (npm) S 50 50 50 34817 50 4210688 5109 0 0 0 36 3 0 0 20 0 10 0 1292968 738025472 10051 18446744073709551615 4194304 33165900 140723623956256 0 0 0 0 4096 134300162 0 0 0 17 4 0 0 0 0 0 35263056 35370992 48369664 140723623964237 140723623964294 140723623964294 140723623968712 0 -4060 (sh) S 4050 50 50 34817 50 4210688 121 0 0 0 0 0 0 0 20 0 1 0 1293007 4579328 174 18446744073709551615 94347643936768 94347644049516 140735136055088 0 0 0 0 0 65538 1 0 0 17 5 0 0 0 0 0 94347646148008 94347646153216 94347660038144 140735136063095 140735136063129 140735136063129 140735136071664 0 -4061 (node) S 4060 50 50 34817 50 4210688 6501 0 0 0 42 2 0 0 20 0 6 0 1293008 705769472 10211 18446744073709551615 4194304 33165900 140730532686288 0 0 0 0 4096 2072111671 0 0 0 17 5 0 0 0 0 0 35263056 35370992 45867008 140730532695579 140730532695657 140730532695657 140730532704200 0 -4067 (node) S 4061 50 50 34817 50 4210688 6746 221 0 0 38 3 0 0 20 0 10 0 1293051 738910208 10527 18446744073709551615 4194304 33165900 140724824971632 0 0 0 0 4096 2072111671 0 0 0 17 4 0 0 0 0 0 35263056 35370992 68595712 140724824980995 140724824981063 140724824981063 140724824989640 0 -4079 (sh) S 4067 50 50 34817 50 4210688 118 0 0 0 0 0 0 0 20 0 1 0 1293092 4579328 194 18446744073709551615 94573702131712 94573702244460 140724712357120 0 0 0 0 0 65538 1 0 0 17 4 0 0 0 0 0 94573704342952 94573704348160 94573718511616 140724712361487 140724712361583 140724712361583 140724712370160 0 -4080 (node) S 4079 50 50 34817 50 4210688 2428 0 0 0 8 1 0 0 20 0 6 0 1293093 693059584 7251 18446744073709551615 4194304 33165900 140726023392816 0 0 0 0 4096 134234626 0 0 0 17 5 0 0 0 0 0 35263056 35370992 55226368 140726023396847 140726023396935 140726023396935 140726023405512 0 -4086 (sh) S 4067 50 50 34817 50 4210688 131 244 0 0 0 0 0 0 20 0 1 0 1293143 4579328 200 18446744073709551615 94347550273536 94347550386284 140737219399136 0 0 0 0 0 65538 1 0 0 17 5 0 0 0 0 0 94347552484776 94347552489984 94347554299904 140737219403308 140737219403375 140737219403375 140737219411952 0 -4089 (xargs) S 4086 50 50 34817 50 4210688 333 1924 0 0 0 0 0 0 20 0 1 0 1293143 17600512 477 18446744073709551615 4194304 4232732 140721633759248 0 0 0 0 0 0 1 0 0 17 5 0 0 0 0 0 6331920 6332980 32182272 140721633762891 140721633762920 140721633762920 140721633771497 0 -50 (bash) S 0 50 50 34817 50 4210944 43914 1032463 9 705 44 21 4213 818 20 0 1 0 1286336 42266624 3599 18446744073709551615 4194304 5173404 140732749083280 0 0 0 65536 4 1132560123 1 0 0 17 4 0 0 410 0 0 7273968 7310504 21196800 140732749086490 140732749086517 140732749086517 140732749086702 0 -79 (acpid) S 1 79 79 0 -1 4210752 46 0 0 0 0 0 0 0 20 0 1 0 1286717 4493312 407 18446744073709551615 1 1 0 0 0 0 0 4096 16391 0 0 0 17 5 0 0 0 0 0 0 0 0 0 0 0 0 0 -83 (sshd) S 1 83 83 0 -1 4210944 354 0 27 0 0 0 0 0 20 0 1 0 1286718 62873600 1290 18446744073709551615 1 1 0 0 0 0 0 4096 81925 0 0 0 17 4 0 0 30 0 0 0 0 0 0 0 0 0 0 -94 (cron) S 1 94 94 0 -1 1077952576 103 449 0 1 0 0 0 0 20 0 1 0 1286743 24240128 559 18446744073709551615 1 1 0 0 0 0 0 0 65537 0 0 0 17 4 0 0 0 0 0 0 0 0 0 0 0 0 0 -95 (atd) S 1 95 95 0 -1 1077952576 28 0 0 0 0 0 0 0 20 0 1 0 1286743 19615744 41 18446744073709551615 1 1 0 0 0 0 0 0 81923 0 0 0 17 4 0 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/node_modules/pstree.remy/tests/index.test.js b/node_modules/pstree.remy/tests/index.test.js deleted file mode 100644 index 50096b9..0000000 --- a/node_modules/pstree.remy/tests/index.test.js +++ /dev/null @@ -1,51 +0,0 @@ -const tap = require('tap'); -const test = tap.test; -const readFile = require('fs').readFileSync; -const spawn = require('child_process').spawn; -const pstree = require('../'); -const { tree, pidsForTree, getStat } = require('../lib/utils'); - -if (process.platform !== 'darwin') { - test('reads from /proc', async (t) => { - const ps = await getStat(); - t.ok(ps.split('\n').length > 1); - }); -} - -test('tree for live env', async (t) => { - const pid = 4079; - const fixture = readFile(__dirname + '/fixtures/out2', 'utf8'); - const ps = await tree(fixture); - t.deepEqual( - pidsForTree(ps, pid).map((_) => _.PID), - ['4080'] - ); -}); - -function testTree(t, runCallCount) { - const sub = spawn('node', [`${__dirname}/fixtures/index.js`, runCallCount], { - stdio: 'pipe', - }); - setTimeout(() => { - const pid = sub.pid; - - pstree(pid, (error, pids) => { - pids.concat([pid]).forEach((p) => { - spawn('kill', ['-s', 'SIGTERM', p]); - }); - - // the fixture launches `sh` which launches node which is why we - // are looking for two processes. - // Important: IDKW but MacOS seems to skip the `sh` process. no idea. - t.equal(pids.length, runCallCount * 2); - t.end(); - }); - }, 1000); -} - -test('can read full process tree', (t) => { - testTree(t, 1); -}); -test('can read full process tree with multiple processes', (t) => { - testTree(t, 2); -}); diff --git a/node_modules/qs/.editorconfig b/node_modules/qs/.editorconfig deleted file mode 100644 index dd5a8d8..0000000 --- a/node_modules/qs/.editorconfig +++ /dev/null @@ -1,46 +0,0 @@ -root = true - -[*] -indent_style = space -indent_size = 4 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -max_line_length = 180 -quote_type = single - -[test/*] -max_line_length = off - -[LICENSE.md] -indent_size = off - -[*.md] -max_line_length = off - -[*.json] -max_line_length = off - -[Makefile] -max_line_length = off - -[CHANGELOG.md] -indent_style = space -indent_size = 2 - -[LICENSE] -indent_size = 2 -max_line_length = off - -[coverage/**/*] -indent_size = off -indent_style = off -indent = off -max_line_length = off - -[.nycrc] -indent_style = tab - -[tea.yaml] -indent_size = 2 diff --git a/node_modules/qs/.github/FUNDING.yml b/node_modules/qs/.github/FUNDING.yml deleted file mode 100644 index 0355f4f..0000000 --- a/node_modules/qs/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/qs -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/qs/.github/SECURITY.md b/node_modules/qs/.github/SECURITY.md deleted file mode 100644 index b499cb6..0000000 --- a/node_modules/qs/.github/SECURITY.md +++ /dev/null @@ -1,11 +0,0 @@ -# Security - -Please file a private vulnerability report via GitHub, email [@ljharb](https://github.com/ljharb), or see https://tidelift.com/security if you have a potential security vulnerability to report. - -## Incident Response Plan - -Please see our [Incident Response Plan](https://github.com/ljharb/.github/blob/main/INCIDENT_RESPONSE_PLAN.md). - -## Threat Model - -Please see [THREAT_MODEL.md](./THREAT_MODEL.md). diff --git a/node_modules/qs/.github/THREAT_MODEL.md b/node_modules/qs/.github/THREAT_MODEL.md deleted file mode 100644 index 7e6fef1..0000000 --- a/node_modules/qs/.github/THREAT_MODEL.md +++ /dev/null @@ -1,78 +0,0 @@ -## Threat Model for qs (querystring parsing library) - -### 1. Library Overview - -- **Library Name:** qs -- **Brief Description:** A JavaScript library for parsing and stringifying URL query strings, supporting nested objects and arrays. It is widely used in Node.js and web applications for processing query parameters[2][6][8]. -- **Key Public APIs/Functions:** `qs.parse()`, `qs.stringify()` - -### 2. Define Scope - -This threat model focuses on the core parsing and stringifying functionality, specifically the handling of nested objects and arrays, option validation, and cycle management in stringification. - -### 3. Conceptual System Diagram - -``` -Caller Application → qs.parse(input, options) → Parsing Engine → Output Object - │ - └→ Options Handling - -Caller Application → qs.stringify(obj, options) → Stringifying Engine → Output String - │ - └→ Options Handling - └→ Cycle Tracking -``` - -**Trust Boundaries:** -- **Input string (parse):** May come from untrusted sources (e.g., user input, network requests) -- **Input object (stringify):** May contain cycles, which can lead to infinite loops during stringification -- **Options:** Provided by the caller -- **Cycle Tracking:** Used only during stringification to detect and handle circular references - -### 4. Identify Assets - -- **Integrity of parsed output:** Prevent malicious manipulation of the output object structure, especially ensuring builtins/globals are not modified as a result of parse[3][4][8]. -- **Confidentiality of processed data:** Avoid leaking sensitive information through errors or output. -- **Availability/performance for host application:** Prevent crashes or resource exhaustion in the consuming application. -- **Security of host application:** Prevent the library from being a vector for attacks (e.g., prototype pollution, DoS). -- **Reputation of library:** Maintain trust by avoiding supply chain attacks and vulnerabilities[1]. - -### 5. Identify Threats - -| Component / API / Interaction | S | T | R | I | D | E | -|---------------------------------------|----|----|----|----|----|----| -| Public API Call (`parse`) | – | ✓ | – | ✓ | ✓ | ✓ | -| Public API Call (`stringify`) | – | ✓ | – | ✓ | ✓ | – | -| Options Handling | ✓ | ✓ | – | ✓ | – | ✓ | -| Dependency Interaction | – | – | – | – | ✓ | – | - -**Key Threats:** -- **Tampering:** Malicious input can, if not prevented, alter parsed output (e.g., prototype pollution via `__proto__`, modification of builtins/globals)[3][4][8]. -- **Information Disclosure:** Error messages may expose internal details or sensitive data. -- **Denial of Service:** Large or malformed input can exhaust memory or CPU. -- **Elevation of Privilege:** Prototype pollution can lead to unintended privilege escalation in the host application[3][4][8]. - -### 6. Mitigation/Countermeasures - -| Threat Identified | Proposed Mitigation | -|---------------------------------------------------|---------------------| -| Tampering (malicious input, prototype pollution) | Strict input validation; keep `allowPrototypes: false` by default; use `plainObjects` for output; ensure builtins/globals are never modified by parse[4][8]. | -| Information Disclosure (error messages) | Generic error messages without stack traces or internal paths. | -| Denial of Service (memory/CPU exhaustion) | Enforce `arrayLimit` and `parameterLimit` with safe defaults; enable `throwOnLimitExceeded`; limit nesting depth[7]. | -| Elevation of Privilege (prototype pollution) | Keep `allowPrototypes: false`; validate options against allowlist; use `plainObjects` to avoid prototype pollution[4][8]. | - -### 7. Risk Ranking - -- **High:** Denial of Service via array parsing or malformed input (historical vulnerability) -- **Medium:** Prototype pollution via options or input (if `allowPrototypes` enabled) -- **Low:** Information disclosure in errors - -### 8. Next Steps & Review - -1. **Audit option validation logic.** -2. **Add depth limiting to nested parsing and stringification.** -3. **Implement fuzz testing for parser and stringifier edge cases.** -4. **Regularly review dependencies for vulnerabilities.** -5. **Keep documentation and threat model up to date.** -6. **Ensure builtins/globals are never modified as a result of parse.** -7. **Support round-trip consistency between parse and stringify as a non-security goal, with the right options[5][9].** diff --git a/node_modules/qs/.nycrc b/node_modules/qs/.nycrc deleted file mode 100644 index 1d57cab..0000000 --- a/node_modules/qs/.nycrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, - "exclude": [ - "coverage", - "dist" - ] -} diff --git a/node_modules/qs/CHANGELOG.md b/node_modules/qs/CHANGELOG.md deleted file mode 100644 index 0d304ea..0000000 --- a/node_modules/qs/CHANGELOG.md +++ /dev/null @@ -1,644 +0,0 @@ -## **6.14.2** -- [Fix] `parse`: mark overflow objects for indexed notation exceeding `arrayLimit` (#546) -- [Fix] `arrayLimit` means max count, not max index, in `combine`/`merge`/`parseArrayValue` -- [Fix] `parse`: throw on `arrayLimit` exceeded with indexed notation when `throwOnLimitExceeded` is true (#529) -- [Fix] `parse`: enforce `arrayLimit` on `comma`-parsed values -- [Fix] `parse`: fix error message to reflect arrayLimit as max index; remove extraneous comments (#545) -- [Robustness] avoid `.push`, use `void` -- [readme] document that `addQueryPrefix` does not add `?` to empty output (#418) -- [readme] clarify `parseArrays` and `arrayLimit` documentation (#543) -- [readme] replace runkit CI badge with shields.io check-runs badge -- [meta] fix changelog typo (`arrayLength` → `arrayLimit`) -- [actions] fix rebase workflow permissions - -## **6.14.1** -- [Fix] ensure `arrayLimit` applies to `[]` notation as well -- [Fix] `parse`: when a custom decoder returns `null` for a key, ignore that key -- [Refactor] `parse`: extract key segment splitting helper -- [meta] add threat model -- [actions] add workflow permissions -- [Tests] `stringify`: increase coverage -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `npmignore`, `es-value-fixtures`, `for-each`, `object-inspect` - -## **6.14.0** -- [New] `parse`: add `throwOnParameterLimitExceeded` option (#517) -- [Refactor] `parse`: use `utils.combine` more -- [patch] `parse`: add explicit `throwOnLimitExceeded` default -- [actions] use shared action; re-add finishers -- [meta] Fix changelog formatting bug -- [Deps] update `side-channel` -- [Dev Deps] update `es-value-fixtures`, `has-bigints`, `has-proto`, `has-symbols` -- [Tests] increase coverage - -## **6.13.1** -- [Fix] `stringify`: avoid a crash when a `filter` key is `null` -- [Fix] `utils.merge`: functions should not be stringified into keys -- [Fix] `parse`: avoid a crash with interpretNumericEntities: true, comma: true, and iso charset -- [Fix] `stringify`: ensure a non-string `filter` does not crash -- [Refactor] use `__proto__` syntax instead of `Object.create` for null objects -- [Refactor] misc cleanup -- [Tests] `utils.merge`: add some coverage -- [Tests] fix a test case -- [actions] split out node 10-20, and 20+ -- [Dev Deps] update `es-value-fixtures`, `mock-property`, `object-inspect`, `tape` - -## **6.13.0** -- [New] `parse`: add `strictDepth` option (#511) -- [Tests] use `npm audit` instead of `aud` - -## **6.12.3** -- [Fix] `parse`: properly account for `strictNullHandling` when `allowEmptyArrays` -- [meta] fix changelog indentation - -## **6.12.2** -- [Fix] `parse`: parse encoded square brackets (#506) -- [readme] add CII best practices badge - -## **6.12.1** -- [Fix] `parse`: Disable `decodeDotInKeys` by default to restore previous behavior (#501) -- [Performance] `utils`: Optimize performance under large data volumes, reduce memory usage, and speed up processing (#502) -- [Refactor] `utils`: use `+=` -- [Tests] increase coverage - -## **6.12.0** - -- [New] `parse`/`stringify`: add `decodeDotInKeys`/`encodeDotKeys` options (#488) -- [New] `parse`: add `duplicates` option -- [New] `parse`/`stringify`: add `allowEmptyArrays` option to allow [] in object values (#487) -- [Refactor] `parse`/`stringify`: move allowDots config logic to its own variable -- [Refactor] `stringify`: move option-handling code into `normalizeStringifyOptions` -- [readme] update readme, add logos (#484) -- [readme] `stringify`: clarify default `arrayFormat` behavior -- [readme] fix line wrapping -- [readme] remove dead badges -- [Deps] update `side-channel` -- [meta] make the dist build 50% smaller -- [meta] add `sideEffects` flag -- [meta] run build in prepack, not prepublish -- [Tests] `parse`: remove useless tests; add coverage -- [Tests] `stringify`: increase coverage -- [Tests] use `mock-property` -- [Tests] `stringify`: improve coverage -- [Dev Deps] update `@ljharb/eslint-config `, `aud`, `has-override-mistake`, `has-property-descriptors`, `mock-property`, `npmignore`, `object-inspect`, `tape` -- [Dev Deps] pin `glob`, since v10.3.8+ requires a broken `jackspeak` -- [Dev Deps] pin `jackspeak` since 2.1.2+ depends on npm aliases, which kill the install process in npm < 6 - -## **6.11.2** -- [Fix] `parse`: Fix parsing when the global Object prototype is frozen (#473) -- [Tests] add passing test cases with empty keys (#473) - -## **6.11.1** -- [Fix] `stringify`: encode comma values more consistently (#463) -- [readme] add usage of `filter` option for injecting custom serialization, i.e. of custom types (#447) -- [meta] remove extraneous code backticks (#457) -- [meta] fix changelog markdown -- [actions] update checkout action -- [actions] restrict action permissions -- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` - -## **6.11.0** -- [New] [Fix] `stringify`: revert 0e903c0; add `commaRoundTrip` option (#442) -- [readme] fix version badge - -## **6.10.5** -- [Fix] `stringify`: with `arrayFormat: comma`, properly include an explicit `[]` on a single-item array (#434) - -## **6.10.4** -- [Fix] `stringify`: with `arrayFormat: comma`, include an explicit `[]` on a single-item array (#441) -- [meta] use `npmignore` to autogenerate an npmignore file -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-symbol`, `object-inspect`, `tape` - -## **6.10.3** -- [Fix] `parse`: ignore `__proto__` keys (#428) -- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) -- [actions] reuse common workflows -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `tape` - -## **6.10.2** -- [Fix] `stringify`: actually fix cyclic references (#426) -- [Fix] `stringify`: avoid encoding arrayformat comma when `encodeValuesOnly = true` (#424) -- [readme] remove travis badge; add github actions/codecov badges; update URLs -- [Docs] add note and links for coercing primitive values (#408) -- [actions] update codecov uploader -- [actions] update workflows -- [Tests] clean up stringify tests slightly -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `safe-publish-latest`, `tape` - -## **6.10.1** -- [Fix] `stringify`: avoid exception on repeated object values (#402) - -## **6.10.0** -- [New] `stringify`: throw on cycles, instead of an infinite loop (#395, #394, #393) -- [New] `parse`: add `allowSparse` option for collapsing arrays with missing indices (#312) -- [meta] fix README.md (#399) -- [meta] only run `npm run dist` in publish, not install -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-symbols`, `tape` -- [Tests] fix tests on node v0.6 -- [Tests] use `ljharb/actions/node/install` instead of `ljharb/actions/node/run` -- [Tests] Revert "[meta] ignore eclint transitive audit warning" - -## **6.9.7** -- [Fix] `parse`: ignore `__proto__` keys (#428) -- [Fix] `stringify`: avoid encoding arrayformat comma when `encodeValuesOnly = true` (#424) -- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) -- [readme] remove travis badge; add github actions/codecov badges; update URLs -- [Docs] add note and links for coercing primitive values (#408) -- [Tests] clean up stringify tests slightly -- [meta] fix README.md (#399) -- Revert "[meta] ignore eclint transitive audit warning" -- [actions] backport actions from main -- [Dev Deps] backport updates from main - -## **6.9.6** -- [Fix] restore `dist` dir; mistakenly removed in d4f6c32 - -## **6.9.5** -- [Fix] `stringify`: do not encode parens for RFC1738 -- [Fix] `stringify`: fix arrayFormat comma with empty array/objects (#350) -- [Refactor] `format`: remove `util.assign` call -- [meta] add "Allow Edits" workflow; update rebase workflow -- [actions] switch Automatic Rebase workflow to `pull_request_target` event -- [Tests] `stringify`: add tests for #378 -- [Tests] migrate tests to Github Actions -- [Tests] run `nyc` on all tests; use `tape` runner -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `mkdirp`, `object-inspect`, `tape`; add `aud` - -## **6.9.4** -- [Fix] `stringify`: when `arrayFormat` is `comma`, respect `serializeDate` (#364) -- [Refactor] `stringify`: reduce branching (part of #350) -- [Refactor] move `maybeMap` to `utils` -- [Dev Deps] update `browserify`, `tape` - -## **6.9.3** -- [Fix] proper comma parsing of URL-encoded commas (#361) -- [Fix] parses comma delimited array while having percent-encoded comma treated as normal text (#336) - -## **6.9.2** -- [Fix] `parse`: Fix parsing array from object with `comma` true (#359) -- [Fix] `parse`: throw a TypeError instead of an Error for bad charset (#349) -- [meta] ignore eclint transitive audit warning -- [meta] fix indentation in package.json -- [meta] add tidelift marketing copy -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `has-symbols`, `tape`, `mkdirp`, `iconv-lite` -- [actions] add automatic rebasing / merge commit blocking - -## **6.9.1** -- [Fix] `parse`: with comma true, handle field that holds an array of arrays (#335) -- [Fix] `parse`: with comma true, do not split non-string values (#334) -- [meta] add `funding` field -- [Dev Deps] update `eslint`, `@ljharb/eslint-config` -- [Tests] use shared travis-ci config - -## **6.9.0** -- [New] `parse`/`stringify`: Pass extra key/value argument to `decoder` (#333) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `evalmd` -- [Tests] `parse`: add passing `arrayFormat` tests -- [Tests] add `posttest` using `npx aud` to run `npm audit` without a lockfile -- [Tests] up to `node` `v12.10`, `v11.15`, `v10.16`, `v8.16` -- [Tests] `Buffer.from` in node v5.0-v5.9 and v4.0-v4.4 requires a TypedArray - -## **6.8.3** -- [Fix] `parse`: ignore `__proto__` keys (#428) -- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) -- [Fix] `stringify`: avoid encoding arrayformat comma when `encodeValuesOnly = true` (#424) -- [readme] remove travis badge; add github actions/codecov badges; update URLs -- [Tests] clean up stringify tests slightly -- [Docs] add note and links for coercing primitive values (#408) -- [meta] fix README.md (#399) -- [actions] backport actions from main -- [Dev Deps] backport updates from main -- [Refactor] `stringify`: reduce branching -- [meta] do not publish workflow files - -## **6.8.2** -- [Fix] proper comma parsing of URL-encoded commas (#361) -- [Fix] parses comma delimited array while having percent-encoded comma treated as normal text (#336) - -## **6.8.1** -- [Fix] `parse`: Fix parsing array from object with `comma` true (#359) -- [Fix] `parse`: throw a TypeError instead of an Error for bad charset (#349) -- [Fix] `parse`: with comma true, handle field that holds an array of arrays (#335) -- [fix] `parse`: with comma true, do not split non-string values (#334) -- [meta] add tidelift marketing copy -- [meta] add `funding` field -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`, `safe-publish-latest`, `evalmd`, `has-symbols`, `iconv-lite`, `mkdirp`, `object-inspect` -- [Tests] `parse`: add passing `arrayFormat` tests -- [Tests] use shared travis-ci configs -- [Tests] `Buffer.from` in node v5.0-v5.9 and v4.0-v4.4 requires a TypedArray -- [actions] add automatic rebasing / merge commit blocking - -## **6.8.0** -- [New] add `depth=false` to preserve the original key; [Fix] `depth=0` should preserve the original key (#326) -- [New] [Fix] stringify symbols and bigints -- [Fix] ensure node 0.12 can stringify Symbols -- [Fix] fix for an impossible situation: when the formatter is called with a non-string value -- [Refactor] `formats`: tiny bit of cleanup. -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `safe-publish-latest`, `iconv-lite`, `tape` -- [Tests] add tests for `depth=0` and `depth=false` behavior, both current and intuitive/intended (#326) -- [Tests] use `eclint` instead of `editorconfig-tools` -- [docs] readme: add security note -- [meta] add github sponsorship -- [meta] add FUNDING.yml -- [meta] Clean up license text so it’s properly detected as BSD-3-Clause - -## **6.7.3** -- [Fix] `parse`: ignore `__proto__` keys (#428) -- [Fix] `stringify`: avoid encoding arrayformat comma when `encodeValuesOnly = true` (#424) -- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) -- [readme] remove travis badge; add github actions/codecov badges; update URLs -- [Docs] add note and links for coercing primitive values (#408) -- [meta] fix README.md (#399) -- [meta] do not publish workflow files -- [actions] backport actions from main -- [Dev Deps] backport updates from main -- [Tests] use `nyc` for coverage -- [Tests] clean up stringify tests slightly - -## **6.7.2** -- [Fix] proper comma parsing of URL-encoded commas (#361) -- [Fix] parses comma delimited array while having percent-encoded comma treated as normal text (#336) - -## **6.7.1** -- [Fix] `parse`: Fix parsing array from object with `comma` true (#359) -- [Fix] `parse`: with comma true, handle field that holds an array of arrays (#335) -- [fix] `parse`: with comma true, do not split non-string values (#334) -- [Fix] `parse`: throw a TypeError instead of an Error for bad charset (#349) -- [Fix] fix for an impossible situation: when the formatter is called with a non-string value -- [Refactor] `formats`: tiny bit of cleanup. -- readme: add security note -- [meta] add tidelift marketing copy -- [meta] add `funding` field -- [meta] add FUNDING.yml -- [meta] Clean up license text so it’s properly detected as BSD-3-Clause -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`, `safe-publish-latest`, `evalmd`, `iconv-lite`, `mkdirp`, `object-inspect`, `browserify` -- [Tests] `parse`: add passing `arrayFormat` tests -- [Tests] use shared travis-ci configs -- [Tests] `Buffer.from` in node v5.0-v5.9 and v4.0-v4.4 requires a TypedArray -- [Tests] add tests for `depth=0` and `depth=false` behavior, both current and intuitive/intended -- [Tests] use `eclint` instead of `editorconfig-tools` -- [actions] add automatic rebasing / merge commit blocking - -## **6.7.0** -- [New] `stringify`/`parse`: add `comma` as an `arrayFormat` option (#276, #219) -- [Fix] correctly parse nested arrays (#212) -- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source, also with an array source -- [Robustness] `stringify`: cache `Object.prototype.hasOwnProperty` -- [Refactor] `utils`: `isBuffer`: small tweak; add tests -- [Refactor] use cached `Array.isArray` -- [Refactor] `parse`/`stringify`: make a function to normalize the options -- [Refactor] `utils`: reduce observable [[Get]]s -- [Refactor] `stringify`/`utils`: cache `Array.isArray` -- [Tests] always use `String(x)` over `x.toString()` -- [Tests] fix Buffer tests to work in node < 4.5 and node < 5.10 -- [Tests] temporarily allow coverage to fail - -## **6.6.1** -- [Fix] `parse`: ignore `__proto__` keys (#428) -- [Fix] fix for an impossible situation: when the formatter is called with a non-string value -- [Fix] `utils.merge`: avoid a crash with a null target and an array source -- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source -- [Fix] correctly parse nested arrays -- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) -- [Robustness] `stringify`: cache `Object.prototype.hasOwnProperty` -- [Refactor] `formats`: tiny bit of cleanup. -- [Refactor] `utils`: `isBuffer`: small tweak; add tests -- [Refactor]: `stringify`/`utils`: cache `Array.isArray` -- [Refactor] `utils`: reduce observable [[Get]]s -- [Refactor] use cached `Array.isArray` -- [Refactor] `parse`/`stringify`: make a function to normalize the options -- [readme] remove travis badge; add github actions/codecov badges; update URLs -- [Docs] Clarify the need for "arrayLimit" option -- [meta] fix README.md (#399) -- [meta] do not publish workflow files -- [meta] Clean up license text so it’s properly detected as BSD-3-Clause -- [meta] add FUNDING.yml -- [meta] Fixes typo in CHANGELOG.md -- [actions] backport actions from main -- [Tests] fix Buffer tests to work in node < 4.5 and node < 5.10 -- [Tests] always use `String(x)` over `x.toString()` -- [Dev Deps] backport from main - -## **6.6.0** -- [New] Add support for iso-8859-1, utf8 "sentinel" and numeric entities (#268) -- [New] move two-value combine to a `utils` function (#189) -- [Fix] `stringify`: fix a crash with `strictNullHandling` and a custom `filter`/`serializeDate` (#279) -- [Fix] when `parseArrays` is false, properly handle keys ending in `[]` (#260) -- [Fix] `stringify`: do not crash in an obscure combo of `interpretNumericEntities`, a bad custom `decoder`, & `iso-8859-1` -- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided -- [refactor] `stringify`: Avoid arr = arr.concat(...), push to the existing instance (#269) -- [Refactor] `parse`: only need to reassign the var once -- [Refactor] `parse`/`stringify`: clean up `charset` options checking; fix defaults -- [Refactor] add missing defaults -- [Refactor] `parse`: one less `concat` call -- [Refactor] `utils`: `compactQueue`: make it explicitly side-effecting -- [Dev Deps] update `browserify`, `eslint`, `@ljharb/eslint-config`, `iconv-lite`, `safe-publish-latest`, `tape` -- [Tests] up to `node` `v10.10`, `v9.11`, `v8.12`, `v6.14`, `v4.9`; pin included builds to LTS - -## **6.5.3** -- [Fix] `parse`: ignore `__proto__` keys (#428) -- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source -- [Fix] correctly parse nested arrays -- [Fix] `stringify`: fix a crash with `strictNullHandling` and a custom `filter`/`serializeDate` (#279) -- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided -- [Fix] when `parseArrays` is false, properly handle keys ending in `[]` -- [Fix] fix for an impossible situation: when the formatter is called with a non-string value -- [Fix] `utils.merge`: avoid a crash with a null target and an array source -- [Refactor] `utils`: reduce observable [[Get]]s -- [Refactor] use cached `Array.isArray` -- [Refactor] `stringify`: Avoid arr = arr.concat(...), push to the existing instance (#269) -- [Refactor] `parse`: only need to reassign the var once -- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) -- [readme] remove travis badge; add github actions/codecov badges; update URLs -- [Docs] Clean up license text so it’s properly detected as BSD-3-Clause -- [Docs] Clarify the need for "arrayLimit" option -- [meta] fix README.md (#399) -- [meta] add FUNDING.yml -- [actions] backport actions from main -- [Tests] always use `String(x)` over `x.toString()` -- [Tests] remove nonexistent tape option -- [Dev Deps] backport from main - -## **6.5.2** -- [Fix] use `safer-buffer` instead of `Buffer` constructor -- [Refactor] utils: `module.exports` one thing, instead of mutating `exports` (#230) -- [Dev Deps] update `browserify`, `eslint`, `iconv-lite`, `safer-buffer`, `tape`, `browserify` - -## **6.5.1** -- [Fix] Fix parsing & compacting very deep objects (#224) -- [Refactor] name utils functions -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` -- [Tests] up to `node` `v8.4`; use `nvm install-latest-npm` so newer npm doesn’t break older node -- [Tests] Use precise dist for Node.js 0.6 runtime (#225) -- [Tests] make 0.6 required, now that it’s passing -- [Tests] on `node` `v8.2`; fix npm on node 0.6 - -## **6.5.0** -- [New] add `utils.assign` -- [New] pass default encoder/decoder to custom encoder/decoder functions (#206) -- [New] `parse`/`stringify`: add `ignoreQueryPrefix`/`addQueryPrefix` options, respectively (#213) -- [Fix] Handle stringifying empty objects with addQueryPrefix (#217) -- [Fix] do not mutate `options` argument (#207) -- [Refactor] `parse`: cache index to reuse in else statement (#182) -- [Docs] add various badges to readme (#208) -- [Dev Deps] update `eslint`, `browserify`, `iconv-lite`, `tape` -- [Tests] up to `node` `v8.1`, `v7.10`, `v6.11`; npm v4.6 breaks on node < v1; npm v5+ breaks on node < v4 -- [Tests] add `editorconfig-tools` - -## **6.4.1** -- [Fix] `parse`: ignore `__proto__` keys (#428) -- [Fix] fix for an impossible situation: when the formatter is called with a non-string value -- [Fix] use `safer-buffer` instead of `Buffer` constructor -- [Fix] `utils.merge`: avoid a crash with a null target and an array source -- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source -- [Fix] `stringify`: fix a crash with `strictNullHandling` and a custom `filter`/`serializeDate` (#279) -- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided -- [Fix] when `parseArrays` is false, properly handle keys ending in `[]` -- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) -- [Refactor] use cached `Array.isArray` -- [Refactor] `stringify`: Avoid arr = arr.concat(...), push to the existing instance (#269) -- [readme] remove travis badge; add github actions/codecov badges; update URLs -- [Docs] Clarify the need for "arrayLimit" option -- [meta] fix README.md (#399) -- [meta] Clean up license text so it’s properly detected as BSD-3-Clause -- [meta] add FUNDING.yml -- [actions] backport actions from main -- [Tests] remove nonexistent tape option -- [Dev Deps] backport from main - -## **6.4.0** -- [New] `qs.stringify`: add `encodeValuesOnly` option -- [Fix] follow `allowPrototypes` option during merge (#201, #201) -- [Fix] support keys starting with brackets (#202, #200) -- [Fix] chmod a-x -- [Dev Deps] update `eslint` -- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds -- [eslint] reduce warnings - -## **6.3.3** -- [Fix] `parse`: ignore `__proto__` keys (#428) -- [Fix] fix for an impossible situation: when the formatter is called with a non-string value -- [Fix] `utils.merge`: avoid a crash with a null target and an array source -- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source -- [Fix] `stringify`: fix a crash with `strictNullHandling` and a custom `filter`/`serializeDate` (#279) -- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided -- [Fix] when `parseArrays` is false, properly handle keys ending in `[]` -- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) -- [Refactor] use cached `Array.isArray` -- [Refactor] `stringify`: Avoid arr = arr.concat(...), push to the existing instance (#269) -- [Docs] Clarify the need for "arrayLimit" option -- [meta] fix README.md (#399) -- [meta] Clean up license text so it’s properly detected as BSD-3-Clause -- [meta] add FUNDING.yml -- [actions] backport actions from main -- [Tests] use `safer-buffer` instead of `Buffer` constructor -- [Tests] remove nonexistent tape option -- [Dev Deps] backport from main - -## **6.3.2** -- [Fix] follow `allowPrototypes` option during merge (#201, #200) -- [Dev Deps] update `eslint` -- [Fix] chmod a-x -- [Fix] support keys starting with brackets (#202, #200) -- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds - -## **6.3.1** -- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties (thanks, @snyk!) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `iconv-lite`, `qs-iconv`, `tape` -- [Tests] on all node minors; improve test matrix -- [Docs] document stringify option `allowDots` (#195) -- [Docs] add empty object and array values example (#195) -- [Docs] Fix minor inconsistency/typo (#192) -- [Docs] document stringify option `sort` (#191) -- [Refactor] `stringify`: throw faster with an invalid encoder -- [Refactor] remove unnecessary escapes (#184) -- Remove contributing.md, since `qs` is no longer part of `hapi` (#183) - -## **6.3.0** -- [New] Add support for RFC 1738 (#174, #173) -- [New] `stringify`: Add `serializeDate` option to customize Date serialization (#159) -- [Fix] ensure `utils.merge` handles merging two arrays -- [Refactor] only constructors should be capitalized -- [Refactor] capitalized var names are for constructors only -- [Refactor] avoid using a sparse array -- [Robustness] `formats`: cache `String#replace` -- [Dev Deps] update `browserify`, `eslint`, `@ljharb/eslint-config`; add `safe-publish-latest` -- [Tests] up to `node` `v6.8`, `v4.6`; improve test matrix -- [Tests] flesh out arrayLimit/arrayFormat tests (#107) -- [Tests] skip Object.create tests when null objects are not available -- [Tests] Turn on eslint for test files (#175) - -## **6.2.4** -- [Fix] `parse`: ignore `__proto__` keys (#428) -- [Fix] `utils.merge`: avoid a crash with a null target and an array source -- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source -- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided -- [Fix] when `parseArrays` is false, properly handle keys ending in `[]` -- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) -- [Refactor] use cached `Array.isArray` -- [Docs] Clarify the need for "arrayLimit" option -- [meta] fix README.md (#399) -- [meta] Clean up license text so it’s properly detected as BSD-3-Clause -- [meta] add FUNDING.yml -- [actions] backport actions from main -- [Tests] use `safer-buffer` instead of `Buffer` constructor -- [Tests] remove nonexistent tape option -- [Dev Deps] backport from main - -## **6.2.3** -- [Fix] follow `allowPrototypes` option during merge (#201, #200) -- [Fix] chmod a-x -- [Fix] support keys starting with brackets (#202, #200) -- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds - -## **6.2.2** -- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties - -## **6.2.1** -- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values -- [Refactor] Be explicit and use `Object.prototype.hasOwnProperty.call` -- [Tests] remove `parallelshell` since it does not reliably report failures -- [Tests] up to `node` `v6.3`, `v5.12` -- [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config`, `qs-iconv` - -## [**6.2.0**](https://github.com/ljharb/qs/issues?milestone=36&state=closed) -- [New] pass Buffers to the encoder/decoder directly (#161) -- [New] add "encoder" and "decoder" options, for custom param encoding/decoding (#160) -- [Fix] fix compacting of nested sparse arrays (#150) - -## **6.1.2** -- [Fix] follow `allowPrototypes` option during merge (#201, #200) -- [Fix] chmod a-x -- [Fix] support keys starting with brackets (#202, #200) -- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds - -## **6.1.1** -- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties - -## [**6.1.0**](https://github.com/ljharb/qs/issues?milestone=35&state=closed) -- [New] allowDots option for `stringify` (#151) -- [Fix] "sort" option should work at a depth of 3 or more (#151) -- [Fix] Restore `dist` directory; will be removed in v7 (#148) - -## **6.0.4** -- [Fix] follow `allowPrototypes` option during merge (#201, #200) -- [Fix] chmod a-x -- [Fix] support keys starting with brackets (#202, #200) -- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds - -## **6.0.3** -- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties -- [Fix] Restore `dist` directory; will be removed in v7 (#148) - -## [**6.0.2**](https://github.com/ljharb/qs/issues?milestone=33&state=closed) -- Revert ES6 requirement and restore support for node down to v0.8. - -## [**6.0.1**](https://github.com/ljharb/qs/issues?milestone=32&state=closed) -- [**#127**](https://github.com/ljharb/qs/pull/127) Fix engines definition in package.json - -## [**6.0.0**](https://github.com/ljharb/qs/issues?milestone=31&state=closed) -- [**#124**](https://github.com/ljharb/qs/issues/124) Use ES6 and drop support for node < v4 - -## **5.2.1** -- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values - -## [**5.2.0**](https://github.com/ljharb/qs/issues?milestone=30&state=closed) -- [**#64**](https://github.com/ljharb/qs/issues/64) Add option to sort object keys in the query string - -## [**5.1.0**](https://github.com/ljharb/qs/issues?milestone=29&state=closed) -- [**#117**](https://github.com/ljharb/qs/issues/117) make URI encoding stringified results optional -- [**#106**](https://github.com/ljharb/qs/issues/106) Add flag `skipNulls` to optionally skip null values in stringify - -## [**5.0.0**](https://github.com/ljharb/qs/issues?milestone=28&state=closed) -- [**#114**](https://github.com/ljharb/qs/issues/114) default allowDots to false -- [**#100**](https://github.com/ljharb/qs/issues/100) include dist to npm - -## [**4.0.0**](https://github.com/ljharb/qs/issues?milestone=26&state=closed) -- [**#98**](https://github.com/ljharb/qs/issues/98) make returning plain objects and allowing prototype overwriting properties optional - -## [**3.1.0**](https://github.com/ljharb/qs/issues?milestone=24&state=closed) -- [**#89**](https://github.com/ljharb/qs/issues/89) Add option to disable "Transform dot notation to bracket notation" - -## [**3.0.0**](https://github.com/ljharb/qs/issues?milestone=23&state=closed) -- [**#80**](https://github.com/ljharb/qs/issues/80) qs.parse silently drops properties -- [**#77**](https://github.com/ljharb/qs/issues/77) Perf boost -- [**#60**](https://github.com/ljharb/qs/issues/60) Add explicit option to disable array parsing -- [**#74**](https://github.com/ljharb/qs/issues/74) Bad parse when turning array into object -- [**#81**](https://github.com/ljharb/qs/issues/81) Add a `filter` option -- [**#68**](https://github.com/ljharb/qs/issues/68) Fixed issue with recursion and passing strings into objects. -- [**#66**](https://github.com/ljharb/qs/issues/66) Add mixed array and object dot notation support Closes: #47 -- [**#76**](https://github.com/ljharb/qs/issues/76) RFC 3986 -- [**#85**](https://github.com/ljharb/qs/issues/85) No equal sign -- [**#84**](https://github.com/ljharb/qs/issues/84) update license attribute - -## [**2.4.1**](https://github.com/ljharb/qs/issues?milestone=20&state=closed) -- [**#73**](https://github.com/ljharb/qs/issues/73) Property 'hasOwnProperty' of object # is not a function - -## [**2.4.0**](https://github.com/ljharb/qs/issues?milestone=19&state=closed) -- [**#70**](https://github.com/ljharb/qs/issues/70) Add arrayFormat option - -## [**2.3.3**](https://github.com/ljharb/qs/issues?milestone=18&state=closed) -- [**#59**](https://github.com/ljharb/qs/issues/59) make sure array indexes are >= 0, closes #57 -- [**#58**](https://github.com/ljharb/qs/issues/58) make qs usable for browser loader - -## [**2.3.2**](https://github.com/ljharb/qs/issues?milestone=17&state=closed) -- [**#55**](https://github.com/ljharb/qs/issues/55) allow merging a string into an object - -## [**2.3.1**](https://github.com/ljharb/qs/issues?milestone=16&state=closed) -- [**#52**](https://github.com/ljharb/qs/issues/52) Return "undefined" and "false" instead of throwing "TypeError". - -## [**2.3.0**](https://github.com/ljharb/qs/issues?milestone=15&state=closed) -- [**#50**](https://github.com/ljharb/qs/issues/50) add option to omit array indices, closes #46 - -## [**2.2.5**](https://github.com/ljharb/qs/issues?milestone=14&state=closed) -- [**#39**](https://github.com/ljharb/qs/issues/39) Is there an alternative to Buffer.isBuffer? -- [**#49**](https://github.com/ljharb/qs/issues/49) refactor utils.merge, fixes #45 -- [**#41**](https://github.com/ljharb/qs/issues/41) avoid browserifying Buffer, for #39 - -## [**2.2.4**](https://github.com/ljharb/qs/issues?milestone=13&state=closed) -- [**#38**](https://github.com/ljharb/qs/issues/38) how to handle object keys beginning with a number - -## [**2.2.3**](https://github.com/ljharb/qs/issues?milestone=12&state=closed) -- [**#37**](https://github.com/ljharb/qs/issues/37) parser discards first empty value in array -- [**#36**](https://github.com/ljharb/qs/issues/36) Update to lab 4.x - -## [**2.2.2**](https://github.com/ljharb/qs/issues?milestone=11&state=closed) -- [**#33**](https://github.com/ljharb/qs/issues/33) Error when plain object in a value -- [**#34**](https://github.com/ljharb/qs/issues/34) use Object.prototype.hasOwnProperty.call instead of obj.hasOwnProperty -- [**#24**](https://github.com/ljharb/qs/issues/24) Changelog? Semver? - -## [**2.2.1**](https://github.com/ljharb/qs/issues?milestone=10&state=closed) -- [**#32**](https://github.com/ljharb/qs/issues/32) account for circular references properly, closes #31 -- [**#31**](https://github.com/ljharb/qs/issues/31) qs.parse stackoverflow on circular objects - -## [**2.2.0**](https://github.com/ljharb/qs/issues?milestone=9&state=closed) -- [**#26**](https://github.com/ljharb/qs/issues/26) Don't use Buffer global if it's not present -- [**#30**](https://github.com/ljharb/qs/issues/30) Bug when merging non-object values into arrays -- [**#29**](https://github.com/ljharb/qs/issues/29) Don't call Utils.clone at the top of Utils.merge -- [**#23**](https://github.com/ljharb/qs/issues/23) Ability to not limit parameters? - -## [**2.1.0**](https://github.com/ljharb/qs/issues?milestone=8&state=closed) -- [**#22**](https://github.com/ljharb/qs/issues/22) Enable using a RegExp as delimiter - -## [**2.0.0**](https://github.com/ljharb/qs/issues?milestone=7&state=closed) -- [**#18**](https://github.com/ljharb/qs/issues/18) Why is there arrayLimit? -- [**#20**](https://github.com/ljharb/qs/issues/20) Configurable parametersLimit -- [**#21**](https://github.com/ljharb/qs/issues/21) make all limits optional, for #18, for #20 - -## [**1.2.2**](https://github.com/ljharb/qs/issues?milestone=6&state=closed) -- [**#19**](https://github.com/ljharb/qs/issues/19) Don't overwrite null values - -## [**1.2.1**](https://github.com/ljharb/qs/issues?milestone=5&state=closed) -- [**#16**](https://github.com/ljharb/qs/issues/16) ignore non-string delimiters -- [**#15**](https://github.com/ljharb/qs/issues/15) Close code block - -## [**1.2.0**](https://github.com/ljharb/qs/issues?milestone=4&state=closed) -- [**#12**](https://github.com/ljharb/qs/issues/12) Add optional delim argument -- [**#13**](https://github.com/ljharb/qs/issues/13) fix #11: flattened keys in array are now correctly parsed - -## [**1.1.0**](https://github.com/ljharb/qs/issues?milestone=3&state=closed) -- [**#7**](https://github.com/ljharb/qs/issues/7) Empty values of a POST array disappear after being submitted -- [**#9**](https://github.com/ljharb/qs/issues/9) Should not omit equals signs (=) when value is null -- [**#6**](https://github.com/ljharb/qs/issues/6) Minor grammar fix in README - -## [**1.0.2**](https://github.com/ljharb/qs/issues?milestone=2&state=closed) -- [**#5**](https://github.com/ljharb/qs/issues/5) array holes incorrectly copied into object on large index diff --git a/node_modules/qs/LICENSE.md b/node_modules/qs/LICENSE.md deleted file mode 100644 index fecf6b6..0000000 --- a/node_modules/qs/LICENSE.md +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2014, Nathan LaFreniere and other [contributors](https://github.com/ljharb/qs/graphs/contributors) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/qs/README.md b/node_modules/qs/README.md deleted file mode 100644 index 5c37739..0000000 --- a/node_modules/qs/README.md +++ /dev/null @@ -1,740 +0,0 @@ -

- qs -

- -# qs [![Version Badge][npm-version-svg]][package-url] - -[![github actions][actions-image]][actions-url] -[![coverage][codecov-image]][codecov-url] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] -[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/9058/badge)](https://bestpractices.coreinfrastructure.org/projects/9058) - -[![npm badge][npm-badge-png]][package-url] - -A querystring parsing and stringifying library with some added security. - -Lead Maintainer: [Jordan Harband](https://github.com/ljharb) - -The **qs** module was originally created and maintained by [TJ Holowaychuk](https://github.com/visionmedia/node-querystring). - -## Usage - -```javascript -var qs = require('qs'); -var assert = require('assert'); - -var obj = qs.parse('a=c'); -assert.deepEqual(obj, { a: 'c' }); - -var str = qs.stringify(obj); -assert.equal(str, 'a=c'); -``` - -### Parsing Objects - -[](#preventEval) -```javascript -qs.parse(string, [options]); -``` - -**qs** allows you to create nested objects within your query strings, by surrounding the name of sub-keys with square brackets `[]`. -For example, the string `'foo[bar]=baz'` converts to: - -```javascript -assert.deepEqual(qs.parse('foo[bar]=baz'), { - foo: { - bar: 'baz' - } -}); -``` - -When using the `plainObjects` option the parsed value is returned as a null object, created via `{ __proto__: null }` and as such you should be aware that prototype methods will not exist on it and a user may set those names to whatever value they like: - -```javascript -var nullObject = qs.parse('a[hasOwnProperty]=b', { plainObjects: true }); -assert.deepEqual(nullObject, { a: { hasOwnProperty: 'b' } }); -``` - -By default parameters that would overwrite properties on the object prototype are ignored, if you wish to keep the data from those fields either use `plainObjects` as mentioned above, or set `allowPrototypes` to `true` which will allow user input to overwrite those properties. -*WARNING* It is generally a bad idea to enable this option as it can cause problems when attempting to use the properties that have been overwritten. -Always be careful with this option. - -```javascript -var protoObject = qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }); -assert.deepEqual(protoObject, { a: { hasOwnProperty: 'b' } }); -``` - -URI encoded strings work too: - -```javascript -assert.deepEqual(qs.parse('a%5Bb%5D=c'), { - a: { b: 'c' } -}); -``` - -You can also nest your objects, like `'foo[bar][baz]=foobarbaz'`: - -```javascript -assert.deepEqual(qs.parse('foo[bar][baz]=foobarbaz'), { - foo: { - bar: { - baz: 'foobarbaz' - } - } -}); -``` - -By default, when nesting objects **qs** will only parse up to 5 children deep. -This means if you attempt to parse a string like `'a[b][c][d][e][f][g][h][i]=j'` your resulting object will be: - -```javascript -var expected = { - a: { - b: { - c: { - d: { - e: { - f: { - '[g][h][i]': 'j' - } - } - } - } - } - } -}; -var string = 'a[b][c][d][e][f][g][h][i]=j'; -assert.deepEqual(qs.parse(string), expected); -``` - -This depth can be overridden by passing a `depth` option to `qs.parse(string, [options])`: - -```javascript -var deep = qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 }); -assert.deepEqual(deep, { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } }); -``` - -You can configure **qs** to throw an error when parsing nested input beyond this depth using the `strictDepth` option (defaulted to false): - -```javascript -try { - qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1, strictDepth: true }); -} catch (err) { - assert(err instanceof RangeError); - assert.strictEqual(err.message, 'Input depth exceeded depth option of 1 and strictDepth is true'); -} -``` - -The depth limit helps mitigate abuse when **qs** is used to parse user input, and it is recommended to keep it a reasonably small number. The strictDepth option adds a layer of protection by throwing an error when the limit is exceeded, allowing you to catch and handle such cases. - -For similar reasons, by default **qs** will only parse up to 1000 parameters. This can be overridden by passing a `parameterLimit` option: - -```javascript -var limited = qs.parse('a=b&c=d', { parameterLimit: 1 }); -assert.deepEqual(limited, { a: 'b' }); -``` - -If you want an error to be thrown whenever the a limit is exceeded (eg, `parameterLimit`, `arrayLimit`), set the `throwOnLimitExceeded` option to `true`. This option will generate a descriptive error if the query string exceeds a configured limit. -```javascript -try { - qs.parse('a=1&b=2&c=3&d=4', { parameterLimit: 3, throwOnLimitExceeded: true }); -} catch (err) { - assert(err instanceof Error); - assert.strictEqual(err.message, 'Parameter limit exceeded. Only 3 parameters allowed.'); -} -``` - -When `throwOnLimitExceeded` is set to `false` (default), **qs** will parse up to the specified `parameterLimit` and ignore the rest without throwing an error. - -To bypass the leading question mark, use `ignoreQueryPrefix`: - -```javascript -var prefixed = qs.parse('?a=b&c=d', { ignoreQueryPrefix: true }); -assert.deepEqual(prefixed, { a: 'b', c: 'd' }); -``` - -An optional delimiter can also be passed: - -```javascript -var delimited = qs.parse('a=b;c=d', { delimiter: ';' }); -assert.deepEqual(delimited, { a: 'b', c: 'd' }); -``` - -Delimiters can be a regular expression too: - -```javascript -var regexed = qs.parse('a=b;c=d,e=f', { delimiter: /[;,]/ }); -assert.deepEqual(regexed, { a: 'b', c: 'd', e: 'f' }); -``` - -Option `allowDots` can be used to enable dot notation: - -```javascript -var withDots = qs.parse('a.b=c', { allowDots: true }); -assert.deepEqual(withDots, { a: { b: 'c' } }); -``` - -Option `decodeDotInKeys` can be used to decode dots in keys -Note: it implies `allowDots`, so `parse` will error if you set `decodeDotInKeys` to `true`, and `allowDots` to `false`. - -```javascript -var withDots = qs.parse('name%252Eobj.first=John&name%252Eobj.last=Doe', { decodeDotInKeys: true }); -assert.deepEqual(withDots, { 'name.obj': { first: 'John', last: 'Doe' }}); -``` - -Option `allowEmptyArrays` can be used to allowing empty array values in object -```javascript -var withEmptyArrays = qs.parse('foo[]&bar=baz', { allowEmptyArrays: true }); -assert.deepEqual(withEmptyArrays, { foo: [], bar: 'baz' }); -``` - -Option `duplicates` can be used to change the behavior when duplicate keys are encountered -```javascript -assert.deepEqual(qs.parse('foo=bar&foo=baz'), { foo: ['bar', 'baz'] }); -assert.deepEqual(qs.parse('foo=bar&foo=baz', { duplicates: 'combine' }), { foo: ['bar', 'baz'] }); -assert.deepEqual(qs.parse('foo=bar&foo=baz', { duplicates: 'first' }), { foo: 'bar' }); -assert.deepEqual(qs.parse('foo=bar&foo=baz', { duplicates: 'last' }), { foo: 'baz' }); -``` - -If you have to deal with legacy browsers or services, there's also support for decoding percent-encoded octets as iso-8859-1: - -```javascript -var oldCharset = qs.parse('a=%A7', { charset: 'iso-8859-1' }); -assert.deepEqual(oldCharset, { a: '§' }); -``` - -Some services add an initial `utf8=✓` value to forms so that old Internet Explorer versions are more likely to submit the form as utf-8. -Additionally, the server can check the value against wrong encodings of the checkmark character and detect that a query string or `application/x-www-form-urlencoded` body was *not* sent as utf-8, eg. if the form had an `accept-charset` parameter or the containing page had a different character set. - -**qs** supports this mechanism via the `charsetSentinel` option. -If specified, the `utf8` parameter will be omitted from the returned object. -It will be used to switch to `iso-8859-1`/`utf-8` mode depending on how the checkmark is encoded. - -**Important**: When you specify both the `charset` option and the `charsetSentinel` option, the `charset` will be overridden when the request contains a `utf8` parameter from which the actual charset can be deduced. -In that sense the `charset` will behave as the default charset rather than the authoritative charset. - -```javascript -var detectedAsUtf8 = qs.parse('utf8=%E2%9C%93&a=%C3%B8', { - charset: 'iso-8859-1', - charsetSentinel: true -}); -assert.deepEqual(detectedAsUtf8, { a: 'ø' }); - -// Browsers encode the checkmark as ✓ when submitting as iso-8859-1: -var detectedAsIso8859_1 = qs.parse('utf8=%26%2310003%3B&a=%F8', { - charset: 'utf-8', - charsetSentinel: true -}); -assert.deepEqual(detectedAsIso8859_1, { a: 'ø' }); -``` - -If you want to decode the `&#...;` syntax to the actual character, you can specify the `interpretNumericEntities` option as well: - -```javascript -var detectedAsIso8859_1 = qs.parse('a=%26%239786%3B', { - charset: 'iso-8859-1', - interpretNumericEntities: true -}); -assert.deepEqual(detectedAsIso8859_1, { a: '☺' }); -``` - -It also works when the charset has been detected in `charsetSentinel` mode. - -### Parsing Arrays - -**qs** can also parse arrays using a similar `[]` notation: - -```javascript -var withArray = qs.parse('a[]=b&a[]=c'); -assert.deepEqual(withArray, { a: ['b', 'c'] }); -``` - -You may specify an index as well: - -```javascript -var withIndexes = qs.parse('a[1]=c&a[0]=b'); -assert.deepEqual(withIndexes, { a: ['b', 'c'] }); -``` - -Note that the only difference between an index in an array and a key in an object is that the value between the brackets must be a number to create an array. -When creating arrays with specific indices, **qs** will compact a sparse array to only the existing values preserving their order: - -```javascript -var noSparse = qs.parse('a[1]=b&a[15]=c'); -assert.deepEqual(noSparse, { a: ['b', 'c'] }); -``` - -You may also use `allowSparse` option to parse sparse arrays: - -```javascript -var sparseArray = qs.parse('a[1]=2&a[3]=5', { allowSparse: true }); -assert.deepEqual(sparseArray, { a: [, '2', , '5'] }); -``` - -Note that an empty string is also a value, and will be preserved: - -```javascript -var withEmptyString = qs.parse('a[]=&a[]=b'); -assert.deepEqual(withEmptyString, { a: ['', 'b'] }); - -var withIndexedEmptyString = qs.parse('a[0]=b&a[1]=&a[2]=c'); -assert.deepEqual(withIndexedEmptyString, { a: ['b', '', 'c'] }); -``` - -**qs** will also limit arrays to a maximum of `20` elements. -Any array members with an index of `20` or greater will instead be converted to an object with the index as the key. -This is needed to handle cases when someone sent, for example, `a[999999999]` and it will take significant time to iterate over this huge array. - -```javascript -var withMaxIndex = qs.parse('a[100]=b'); -assert.deepEqual(withMaxIndex, { a: { '100': 'b' } }); -``` - -This limit can be overridden by passing an `arrayLimit` option: - -```javascript -var withArrayLimit = qs.parse('a[1]=b', { arrayLimit: 0 }); -assert.deepEqual(withArrayLimit, { a: { '1': 'b' } }); -``` - -If you want to throw an error whenever the array limit is exceeded, set the `throwOnLimitExceeded` option to `true`. This option will generate a descriptive error if the query string exceeds a configured limit. -```javascript -try { - qs.parse('a[1]=b', { arrayLimit: 0, throwOnLimitExceeded: true }); -} catch (err) { - assert(err instanceof Error); - assert.strictEqual(err.message, 'Array limit exceeded. Only 0 elements allowed in an array.'); -} -``` - -When `throwOnLimitExceeded` is set to `false` (default), **qs** will parse up to the specified `arrayLimit` and if the limit is exceeded, the array will instead be converted to an object with the index as the key - -To prevent array syntax (`a[]`, `a[0]`) from being parsed as arrays, set `parseArrays` to `false`. -Note that duplicate keys (e.g. `a=b&a=c`) may still produce arrays when `duplicates` is `'combine'` (the default). - -```javascript -var noParsingArrays = qs.parse('a[]=b', { parseArrays: false }); -assert.deepEqual(noParsingArrays, { a: { '0': 'b' } }); -``` - -If you mix notations, **qs** will merge the two items into an object: - -```javascript -var mixedNotation = qs.parse('a[0]=b&a[b]=c'); -assert.deepEqual(mixedNotation, { a: { '0': 'b', b: 'c' } }); -``` - -You can also create arrays of objects: - -```javascript -var arraysOfObjects = qs.parse('a[][b]=c'); -assert.deepEqual(arraysOfObjects, { a: [{ b: 'c' }] }); -``` - -Some people use comma to join array, **qs** can parse it: -```javascript -var arraysOfObjects = qs.parse('a=b,c', { comma: true }) -assert.deepEqual(arraysOfObjects, { a: ['b', 'c'] }) -``` -(_this cannot convert nested objects, such as `a={b:1},{c:d}`_) - -### Parsing primitive/scalar values (numbers, booleans, null, etc) - -By default, all values are parsed as strings. -This behavior will not change and is explained in [issue #91](https://github.com/ljharb/qs/issues/91). - -```javascript -var primitiveValues = qs.parse('a=15&b=true&c=null'); -assert.deepEqual(primitiveValues, { a: '15', b: 'true', c: 'null' }); -``` - -If you wish to auto-convert values which look like numbers, booleans, and other values into their primitive counterparts, you can use the [query-types Express JS middleware](https://github.com/xpepermint/query-types) which will auto-convert all request query parameters. - -### Stringifying - -[](#preventEval) -```javascript -qs.stringify(object, [options]); -``` - -When stringifying, **qs** by default URI encodes output. Objects are stringified as you would expect: - -```javascript -assert.equal(qs.stringify({ a: 'b' }), 'a=b'); -assert.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); -``` - -This encoding can be disabled by setting the `encode` option to `false`: - -```javascript -var unencoded = qs.stringify({ a: { b: 'c' } }, { encode: false }); -assert.equal(unencoded, 'a[b]=c'); -``` - -Encoding can be disabled for keys by setting the `encodeValuesOnly` option to `true`: -```javascript -var encodedValues = qs.stringify( - { a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] }, - { encodeValuesOnly: true } -); -assert.equal(encodedValues,'a=b&c[0]=d&c[1]=e%3Df&f[0][0]=g&f[1][0]=h'); -``` - -This encoding can also be replaced by a custom encoding method set as `encoder` option: - -```javascript -var encoded = qs.stringify({ a: { b: 'c' } }, { encoder: function (str) { - // Passed in values `a`, `b`, `c` - return // Return encoded string -}}) -``` - -_(Note: the `encoder` option does not apply if `encode` is `false`)_ - -Analogue to the `encoder` there is a `decoder` option for `parse` to override decoding of properties and values: - -```javascript -var decoded = qs.parse('x=z', { decoder: function (str) { - // Passed in values `x`, `z` - return // Return decoded string -}}) -``` - -You can encode keys and values using different logic by using the type argument provided to the encoder: - -```javascript -var encoded = qs.stringify({ a: { b: 'c' } }, { encoder: function (str, defaultEncoder, charset, type) { - if (type === 'key') { - return // Encoded key - } else if (type === 'value') { - return // Encoded value - } -}}) -``` - -The type argument is also provided to the decoder: - -```javascript -var decoded = qs.parse('x=z', { decoder: function (str, defaultDecoder, charset, type) { - if (type === 'key') { - return // Decoded key - } else if (type === 'value') { - return // Decoded value - } -}}) -``` - -Examples beyond this point will be shown as though the output is not URI encoded for clarity. -Please note that the return values in these cases *will* be URI encoded during real usage. - -When arrays are stringified, they follow the `arrayFormat` option, which defaults to `indices`: - -```javascript -qs.stringify({ a: ['b', 'c', 'd'] }); -// 'a[0]=b&a[1]=c&a[2]=d' -``` - -You may override this by setting the `indices` option to `false`, or to be more explicit, the `arrayFormat` option to `repeat`: - -```javascript -qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }); -// 'a=b&a=c&a=d' -``` - -You may use the `arrayFormat` option to specify the format of the output array: - -```javascript -qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }) -// 'a[0]=b&a[1]=c' -qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }) -// 'a[]=b&a[]=c' -qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }) -// 'a=b&a=c' -qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'comma' }) -// 'a=b,c' -``` - -Note: when using `arrayFormat` set to `'comma'`, you can also pass the `commaRoundTrip` option set to `true` or `false`, to append `[]` on single-item arrays, so that they can round trip through a parse. - -When objects are stringified, by default they use bracket notation: - -```javascript -qs.stringify({ a: { b: { c: 'd', e: 'f' } } }); -// 'a[b][c]=d&a[b][e]=f' -``` - -You may override this to use dot notation by setting the `allowDots` option to `true`: - -```javascript -qs.stringify({ a: { b: { c: 'd', e: 'f' } } }, { allowDots: true }); -// 'a.b.c=d&a.b.e=f' -``` - -You may encode the dot notation in the keys of object with option `encodeDotInKeys` by setting it to `true`: -Note: it implies `allowDots`, so `stringify` will error if you set `decodeDotInKeys` to `true`, and `allowDots` to `false`. -Caveat: when `encodeValuesOnly` is `true` as well as `encodeDotInKeys`, only dots in keys and nothing else will be encoded. -```javascript -qs.stringify({ "name.obj": { "first": "John", "last": "Doe" } }, { allowDots: true, encodeDotInKeys: true }) -// 'name%252Eobj.first=John&name%252Eobj.last=Doe' -``` - -You may allow empty array values by setting the `allowEmptyArrays` option to `true`: -```javascript -qs.stringify({ foo: [], bar: 'baz' }, { allowEmptyArrays: true }); -// 'foo[]&bar=baz' -``` - -Empty strings and null values will omit the value, but the equals sign (=) remains in place: - -```javascript -assert.equal(qs.stringify({ a: '' }), 'a='); -``` - -Key with no values (such as an empty object or array) will return nothing: - -```javascript -assert.equal(qs.stringify({ a: [] }), ''); -assert.equal(qs.stringify({ a: {} }), ''); -assert.equal(qs.stringify({ a: [{}] }), ''); -assert.equal(qs.stringify({ a: { b: []} }), ''); -assert.equal(qs.stringify({ a: { b: {}} }), ''); -``` - -Properties that are set to `undefined` will be omitted entirely: - -```javascript -assert.equal(qs.stringify({ a: null, b: undefined }), 'a='); -``` - -The query string may optionally be prepended with a question mark: - -```javascript -assert.equal(qs.stringify({ a: 'b', c: 'd' }, { addQueryPrefix: true }), '?a=b&c=d'); -``` - -Note that when the output is an empty string, the prefix will not be added: - -```javascript -assert.equal(qs.stringify({}, { addQueryPrefix: true }), ''); -``` - -The delimiter may be overridden with stringify as well: - -```javascript -assert.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d'); -``` - -If you only want to override the serialization of `Date` objects, you can provide a `serializeDate` option: - -```javascript -var date = new Date(7); -assert.equal(qs.stringify({ a: date }), 'a=1970-01-01T00:00:00.007Z'.replace(/:/g, '%3A')); -assert.equal( - qs.stringify({ a: date }, { serializeDate: function (d) { return d.getTime(); } }), - 'a=7' -); -``` - -You may use the `sort` option to affect the order of parameter keys: - -```javascript -function alphabeticalSort(a, b) { - return a.localeCompare(b); -} -assert.equal(qs.stringify({ a: 'c', z: 'y', b : 'f' }, { sort: alphabeticalSort }), 'a=c&b=f&z=y'); -``` - -Finally, you can use the `filter` option to restrict which keys will be included in the stringified output. -If you pass a function, it will be called for each key to obtain the replacement value. -Otherwise, if you pass an array, it will be used to select properties and array indices for stringification: - -```javascript -function filterFunc(prefix, value) { - if (prefix == 'b') { - // Return an `undefined` value to omit a property. - return; - } - if (prefix == 'e[f]') { - return value.getTime(); - } - if (prefix == 'e[g][0]') { - return value * 2; - } - return value; -} -qs.stringify({ a: 'b', c: 'd', e: { f: new Date(123), g: [2] } }, { filter: filterFunc }); -// 'a=b&c=d&e[f]=123&e[g][0]=4' -qs.stringify({ a: 'b', c: 'd', e: 'f' }, { filter: ['a', 'e'] }); -// 'a=b&e=f' -qs.stringify({ a: ['b', 'c', 'd'], e: 'f' }, { filter: ['a', 0, 2] }); -// 'a[0]=b&a[2]=d' -``` - -You could also use `filter` to inject custom serialization for user defined types. -Consider you're working with some api that expects query strings of the format for ranges: - -``` -https://domain.com/endpoint?range=30...70 -``` - -For which you model as: - -```javascript -class Range { - constructor(from, to) { - this.from = from; - this.to = to; - } -} -``` - -You could _inject_ a custom serializer to handle values of this type: - -```javascript -qs.stringify( - { - range: new Range(30, 70), - }, - { - filter: (prefix, value) => { - if (value instanceof Range) { - return `${value.from}...${value.to}`; - } - // serialize the usual way - return value; - }, - } -); -// range=30...70 -``` - -### Handling of `null` values - -By default, `null` values are treated like empty strings: - -```javascript -var withNull = qs.stringify({ a: null, b: '' }); -assert.equal(withNull, 'a=&b='); -``` - -Parsing does not distinguish between parameters with and without equal signs. -Both are converted to empty strings. - -```javascript -var equalsInsensitive = qs.parse('a&b='); -assert.deepEqual(equalsInsensitive, { a: '', b: '' }); -``` - -To distinguish between `null` values and empty strings use the `strictNullHandling` flag. In the result string the `null` -values have no `=` sign: - -```javascript -var strictNull = qs.stringify({ a: null, b: '' }, { strictNullHandling: true }); -assert.equal(strictNull, 'a&b='); -``` - -To parse values without `=` back to `null` use the `strictNullHandling` flag: - -```javascript -var parsedStrictNull = qs.parse('a&b=', { strictNullHandling: true }); -assert.deepEqual(parsedStrictNull, { a: null, b: '' }); -``` - -To completely skip rendering keys with `null` values, use the `skipNulls` flag: - -```javascript -var nullsSkipped = qs.stringify({ a: 'b', c: null}, { skipNulls: true }); -assert.equal(nullsSkipped, 'a=b'); -``` - -If you're communicating with legacy systems, you can switch to `iso-8859-1` using the `charset` option: - -```javascript -var iso = qs.stringify({ æ: 'æ' }, { charset: 'iso-8859-1' }); -assert.equal(iso, '%E6=%E6'); -``` - -Characters that don't exist in `iso-8859-1` will be converted to numeric entities, similar to what browsers do: - -```javascript -var numeric = qs.stringify({ a: '☺' }, { charset: 'iso-8859-1' }); -assert.equal(numeric, 'a=%26%239786%3B'); -``` - -You can use the `charsetSentinel` option to announce the character by including an `utf8=✓` parameter with the proper encoding if the checkmark, similar to what Ruby on Rails and others do when submitting forms. - -```javascript -var sentinel = qs.stringify({ a: '☺' }, { charsetSentinel: true }); -assert.equal(sentinel, 'utf8=%E2%9C%93&a=%E2%98%BA'); - -var isoSentinel = qs.stringify({ a: 'æ' }, { charsetSentinel: true, charset: 'iso-8859-1' }); -assert.equal(isoSentinel, 'utf8=%26%2310003%3B&a=%E6'); -``` - -### Dealing with special character sets - -By default the encoding and decoding of characters is done in `utf-8`, and `iso-8859-1` support is also built in via the `charset` parameter. - -If you wish to encode querystrings to a different character set (i.e. -[Shift JIS](https://en.wikipedia.org/wiki/Shift_JIS)) you can use the -[`qs-iconv`](https://github.com/martinheidegger/qs-iconv) library: - -```javascript -var encoder = require('qs-iconv/encoder')('shift_jis'); -var shiftJISEncoded = qs.stringify({ a: 'こんにちは!' }, { encoder: encoder }); -assert.equal(shiftJISEncoded, 'a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I'); -``` - -This also works for decoding of query strings: - -```javascript -var decoder = require('qs-iconv/decoder')('shift_jis'); -var obj = qs.parse('a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I', { decoder: decoder }); -assert.deepEqual(obj, { a: 'こんにちは!' }); -``` - -### RFC 3986 and RFC 1738 space encoding - -RFC3986 used as default option and encodes ' ' to *%20* which is backward compatible. -In the same time, output can be stringified as per RFC1738 with ' ' equal to '+'. - -``` -assert.equal(qs.stringify({ a: 'b c' }), 'a=b%20c'); -assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC3986' }), 'a=b%20c'); -assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC1738' }), 'a=b+c'); -``` - -## Security - -Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. - -## qs for enterprise - -Available as part of the Tidelift Subscription - -The maintainers of qs and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. -Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. -[Learn more.](https://tidelift.com/subscription/pkg/npm-qs?utm_source=npm-qs&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - -[package-url]: https://npmjs.org/package/qs -[npm-version-svg]: https://versionbadg.es/ljharb/qs.svg -[deps-svg]: https://david-dm.org/ljharb/qs.svg -[deps-url]: https://david-dm.org/ljharb/qs -[dev-deps-svg]: https://david-dm.org/ljharb/qs/dev-status.svg -[dev-deps-url]: https://david-dm.org/ljharb/qs#info=devDependencies -[npm-badge-png]: https://nodei.co/npm/qs.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/qs.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/qs.svg -[downloads-url]: https://npm-stat.com/charts.html?package=qs -[codecov-image]: https://codecov.io/gh/ljharb/qs/branch/main/graphs/badge.svg -[codecov-url]: https://app.codecov.io/gh/ljharb/qs/ -[actions-image]: https://img.shields.io/github/check-runs/ljharb/qs/main -[actions-url]: https://github.com/ljharb/qs/actions - -## Acknowledgements - -qs logo by [NUMI](https://github.com/numi-hq/open-design): - -[NUMI Logo](https://numi.tech/?ref=qs) diff --git a/node_modules/qs/dist/qs.js b/node_modules/qs/dist/qs.js deleted file mode 100644 index d5eb519..0000000 --- a/node_modules/qs/dist/qs.js +++ /dev/null @@ -1,141 +0,0 @@ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Qs = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},isoSentinel="utf8=%26%2310003%3B",charsetSentinel="utf8=%E2%9C%93",parseValues=function parseQueryStringValues(e,t){var r={__proto__:null},i=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=t.parameterLimit===1/0?void 0:t.parameterLimit,o=i.split(t.delimiter,t.throwOnLimitExceeded?a+1:a);if(t.throwOnLimitExceeded&&o.length>a)throw new RangeError("Parameter limit exceeded. Only "+a+" parameter"+(1===a?"":"s")+" allowed.");var l,n=-1,s=t.charset;if(t.charsetSentinel)for(l=0;l-1&&(p=isArray(p)?[p]:p),t.comma&&isArray(p)&&p.length>t.arrayLimit){if(t.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");p=utils.combine([],p,t.arrayLimit,t.plainObjects)}if(null!==d){var f=has.call(r,d);f&&"combine"===t.duplicates?r[d]=utils.combine(r[d],p,t.arrayLimit,t.plainObjects):f&&"last"!==t.duplicates||(r[d]=p)}}return r},parseObject=function(e,t,r,i){var a=0;if(e.length>0&&"[]"===e[e.length-1]){var o=e.slice(0,-1).join("");a=Array.isArray(t)&&t[o]?t[o].length:0}for(var l=i?t:parseArrayValue(t,r,a),n=e.length-1;n>=0;--n){var s,d=e[n];if("[]"===d&&r.parseArrays)s=utils.isOverflow(l)?l:r.allowEmptyArrays&&(""===l||r.strictNullHandling&&null===l)?[]:utils.combine([],l,r.arrayLimit,r.plainObjects);else{s=r.plainObjects?{__proto__:null}:{};var p="["===d.charAt(0)&&"]"===d.charAt(d.length-1)?d.slice(1,-1):d,c=r.decodeDotInKeys?p.replace(/%2E/g,"."):p,u=parseInt(c,10),y=!isNaN(u)&&d!==c&&String(u)===c&&u>=0&&r.parseArrays;if(r.parseArrays||""!==c)if(y&&u0?g.join(",")||null:void 0}];else if(isArray(f))S=f;else{var N=Object.keys(g);S=u?N.sort(u):N}var T=l?String(r).replace(/\./g,"%2E"):String(r),O=o&&isArray(g)&&1===g.length?T+"[]":T;if(a&&isArray(g)&&0===g.length)return O+"[]";for(var k=0;k0?c+y:""}; - -},{"1":1,"46":46,"5":5}],5:[function(require,module,exports){ -"use strict";var formats=require(1),getSideChannel=require(46),has=Object.prototype.hasOwnProperty,isArray=Array.isArray,overflowChannel=getSideChannel(),markOverflow=function markOverflow(e,r){return overflowChannel.set(e,r),e},isOverflow=function isOverflow(e){return overflowChannel.has(e)},getMaxIndex=function getMaxIndex(e){return overflowChannel.get(e)},setMaxIndex=function setMaxIndex(e,r){overflowChannel.set(e,r)},hexTable=function(){for(var e=[],r=0;r<256;++r)e[e.length]="%"+((r<16?"0":"")+r.toString(16)).toUpperCase();return e}(),compactQueue=function compactQueue(e){for(;e.length>1;){var r=e.pop(),t=r.obj[r.prop];if(isArray(t)){for(var n=[],o=0;ot.arrayLimit)return markOverflow(arrayToObject(e.concat(r),t),n);e[n]=r}else{if(!e||"object"!=typeof e)return[e,r];if(isOverflow(e)){var o=getMaxIndex(e)+1;e[o]=r,setMaxIndex(e,o)}else(t&&(t.plainObjects||t.allowPrototypes)||!has.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||"object"!=typeof e){if(isOverflow(r)){for(var a=Object.keys(r),i=t&&t.plainObjects?{__proto__:null,0:e}:{0:e},c=0;ct.arrayLimit?markOverflow(arrayToObject(l,t),l.length-1):l}var f=e;return isArray(e)&&!isArray(r)&&(f=arrayToObject(e,t)),isArray(e)&&isArray(r)?(r.forEach(function(r,n){if(has.call(e,n)){var o=e[n];o&&"object"==typeof o&&r&&"object"==typeof r?e[n]=merge(o,r,t):e[e.length]=r}else e[n]=r}),e):Object.keys(r).reduce(function(e,n){var o=r[n];if(has.call(e,n)?e[n]=merge(e[n],o,t):e[n]=o,isOverflow(r)&&!isOverflow(e)&&markOverflow(e,getMaxIndex(r)),isOverflow(e)){var a=parseInt(n,10);String(a)===n&&a>=0&&a>getMaxIndex(e)&&setMaxIndex(e,a)}return e},f)},assign=function assignSingleSource(e,r){return Object.keys(r).reduce(function(e,t){return e[t]=r[t],e},e)},decode=function(e,r,t){var n=e.replace(/\+/g," ");if("iso-8859-1"===t)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},limit=1024,encode=function encode(e,r,t,n,o){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===t)return escape(a).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var i="",c=0;c=limit?a.slice(c,c+limit):a,f=[],s=0;s=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===formats.RFC1738&&(40===u||41===u)?f[f.length]=l.charAt(s):u<128?f[f.length]=hexTable[u]:u<2048?f[f.length]=hexTable[192|u>>6]+hexTable[128|63&u]:u<55296||u>=57344?f[f.length]=hexTable[224|u>>12]+hexTable[128|u>>6&63]+hexTable[128|63&u]:(s+=1,u=65536+((1023&u)<<10|1023&l.charCodeAt(s)),f[f.length]=hexTable[240|u>>18]+hexTable[128|u>>12&63]+hexTable[128|u>>6&63]+hexTable[128|63&u])}i+=f.join("")}return i},compact=function compact(e){for(var r=[{obj:{o:e},prop:"o"}],t=[],n=0;nt?markOverflow(arrayToObject(a,{plainObjects:n}),a.length-1):a},maybeMap=function maybeMap(e,r){if(isArray(e)){for(var t=[],n=0;n-1?callBindBasic([t]):t}; - -},{"10":10,"25":25}],25:[function(require,module,exports){ -"use strict";var undefined,$Object=require(22),$Error=require(16),$EvalError=require(15),$RangeError=require(17),$ReferenceError=require(18),$SyntaxError=require(19),$TypeError=require(20),$URIError=require(21),abs=require(34),floor=require(35),max=require(37),min=require(38),pow=require(39),round=require(40),sign=require(41),$Function=Function,getEvalledConstructor=function(r){try{return $Function('"use strict"; return ('+r+").constructor;")()}catch(r){}},$gOPD=require(30),$defineProperty=require(14),throwTypeError=function(){throw new $TypeError},ThrowTypeError=$gOPD?function(){try{return throwTypeError}catch(r){try{return $gOPD(arguments,"callee").get}catch(r){return throwTypeError}}}():throwTypeError,hasSymbols=require(31)(),getProto=require(28),$ObjectGPO=require(26),$ReflectGPO=require(27),$apply=require(8),$call=require(9),needsEval={},TypedArray="undefined"!=typeof Uint8Array&&getProto?getProto(Uint8Array):undefined,INTRINSICS={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?undefined:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?undefined:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols&&getProto?getProto([][Symbol.iterator]()):undefined,"%AsyncFromSyncIteratorPrototype%":undefined,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":"undefined"==typeof Atomics?undefined:Atomics,"%BigInt%":"undefined"==typeof BigInt?undefined:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?undefined:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?undefined:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?undefined:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":$Error,"%eval%":eval,"%EvalError%":$EvalError,"%Float16Array%":"undefined"==typeof Float16Array?undefined:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?undefined:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?undefined:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?undefined:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":"undefined"==typeof Int8Array?undefined:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?undefined:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?undefined:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols&&getProto?getProto(getProto([][Symbol.iterator]())):undefined,"%JSON%":"object"==typeof JSON?JSON:undefined,"%Map%":"undefined"==typeof Map?undefined:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&hasSymbols&&getProto?getProto((new Map)[Symbol.iterator]()):undefined,"%Math%":Math,"%Number%":Number,"%Object%":$Object,"%Object.getOwnPropertyDescriptor%":$gOPD,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?undefined:Promise,"%Proxy%":"undefined"==typeof Proxy?undefined:Proxy,"%RangeError%":$RangeError,"%ReferenceError%":$ReferenceError,"%Reflect%":"undefined"==typeof Reflect?undefined:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?undefined:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&hasSymbols&&getProto?getProto((new Set)[Symbol.iterator]()):undefined,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?undefined:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols&&getProto?getProto(""[Symbol.iterator]()):undefined,"%Symbol%":hasSymbols?Symbol:undefined,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError,"%Uint8Array%":"undefined"==typeof Uint8Array?undefined:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?undefined:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?undefined:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?undefined:Uint32Array,"%URIError%":$URIError,"%WeakMap%":"undefined"==typeof WeakMap?undefined:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?undefined:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?undefined:WeakSet,"%Function.prototype.call%":$call,"%Function.prototype.apply%":$apply,"%Object.defineProperty%":$defineProperty,"%Object.getPrototypeOf%":$ObjectGPO,"%Math.abs%":abs,"%Math.floor%":floor,"%Math.max%":max,"%Math.min%":min,"%Math.pow%":pow,"%Math.round%":round,"%Math.sign%":sign,"%Reflect.getPrototypeOf%":$ReflectGPO};if(getProto)try{null.error}catch(r){var errorProto=getProto(getProto(r));INTRINSICS["%Error.prototype%"]=errorProto}var doEval=function doEval(r){var e;if("%AsyncFunction%"===r)e=getEvalledConstructor("async function () {}");else if("%GeneratorFunction%"===r)e=getEvalledConstructor("function* () {}");else if("%AsyncGeneratorFunction%"===r)e=getEvalledConstructor("async function* () {}");else if("%AsyncGenerator%"===r){var t=doEval("%AsyncGeneratorFunction%");t&&(e=t.prototype)}else if("%AsyncIteratorPrototype%"===r){var o=doEval("%AsyncGenerator%");o&&getProto&&(e=getProto(o.prototype))}return INTRINSICS[r]=e,e},LEGACY_ALIASES={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bind=require(24),hasOwn=require(33),$concat=bind.call($call,Array.prototype.concat),$spliceApply=bind.call($apply,Array.prototype.splice),$replace=bind.call($call,String.prototype.replace),$strSlice=bind.call($call,String.prototype.slice),$exec=bind.call($call,RegExp.prototype.exec),rePropName=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=function stringToPath(r){var e=$strSlice(r,0,1),t=$strSlice(r,-1);if("%"===e&&"%"!==t)throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");if("%"===t&&"%"!==e)throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");var o=[];return $replace(r,rePropName,function(r,e,t,n){o[o.length]=t?$replace(n,reEscapeChar,"$1"):e||r}),o},getBaseIntrinsic=function getBaseIntrinsic(r,e){var t,o=r;if(hasOwn(LEGACY_ALIASES,o)&&(o="%"+(t=LEGACY_ALIASES[o])[0]+"%"),hasOwn(INTRINSICS,o)){var n=INTRINSICS[o];if(n===needsEval&&(n=doEval(o)),void 0===n&&!e)throw new $TypeError("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:t,name:o,value:n}}throw new $SyntaxError("intrinsic "+r+" does not exist!")};module.exports=function GetIntrinsic(r,e){if("string"!=typeof r||0===r.length)throw new $TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new $TypeError('"allowMissing" argument must be a boolean');if(null===$exec(/^%?[^%]*%?$/,r))throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var t=stringToPath(r),o=t.length>0?t[0]:"",n=getBaseIntrinsic("%"+o+"%",e),a=n.name,i=n.value,y=!1,p=n.alias;p&&(o=p[0],$spliceApply(t,$concat([0,1],p)));for(var d=1,s=!0;d=t.length){var c=$gOPD(i,f);i=(s=!!c)&&"get"in c&&!("originalValue"in c.get)?c.get:i[f]}else s=hasOwn(i,f),i=i[f];s&&!y&&(INTRINSICS[a]=i)}}return i}; - -},{"14":14,"15":15,"16":16,"17":17,"18":18,"19":19,"20":20,"21":21,"22":22,"24":24,"26":26,"27":27,"28":28,"30":30,"31":31,"33":33,"34":34,"35":35,"37":37,"38":38,"39":39,"40":40,"41":41,"8":8,"9":9}],13:[function(require,module,exports){ -"use strict";var hasProtoAccessor,callBind=require(10),gOPD=require(30);try{hasProtoAccessor=[].__proto__===Array.prototype}catch(t){if(!t||"object"!=typeof t||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var desc=!!hasProtoAccessor&&gOPD&&gOPD(Object.prototype,"__proto__"),$Object=Object,$getPrototypeOf=$Object.getPrototypeOf;module.exports=desc&&"function"==typeof desc.get?callBind([desc.get]):"function"==typeof $getPrototypeOf&&function getDunder(t){return $getPrototypeOf(null==t?t:$Object(t))}; - -},{"10":10,"30":30}],30:[function(require,module,exports){ -"use strict";var $gOPD=require(29);if($gOPD)try{$gOPD([],"length")}catch(g){$gOPD=null}module.exports=$gOPD; - -},{"29":29}],14:[function(require,module,exports){ -"use strict";var $defineProperty=Object.defineProperty||!1;if($defineProperty)try{$defineProperty({},"a",{value:1})}catch(e){$defineProperty=!1}module.exports=$defineProperty; - -},{}],15:[function(require,module,exports){ -"use strict";module.exports=EvalError; - -},{}],16:[function(require,module,exports){ -"use strict";module.exports=Error; - -},{}],17:[function(require,module,exports){ -"use strict";module.exports=RangeError; - -},{}],18:[function(require,module,exports){ -"use strict";module.exports=ReferenceError; - -},{}],19:[function(require,module,exports){ -"use strict";module.exports=SyntaxError; - -},{}],21:[function(require,module,exports){ -"use strict";module.exports=URIError; - -},{}],22:[function(require,module,exports){ -"use strict";module.exports=Object; - -},{}],23:[function(require,module,exports){ -"use strict";var ERROR_MESSAGE="Function.prototype.bind called on incompatible ",toStr=Object.prototype.toString,max=Math.max,funcType="[object Function]",concatty=function concatty(t,n){for(var r=[],o=0;o-1e3&&t<1e3||$test.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-$floor(-t):$floor(t);if(n!==t){var o=String(n),i=$slice.call(e,o.length+1);return $replace.call(o,r,"$&_")+"."+$replace.call($replace.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $replace.call(e,r,"$&_")}var utilInspect=require(6),inspectCustom=utilInspect.custom,inspectSymbol=isSymbol(inspectCustom)?inspectCustom:null,quotes={__proto__:null,double:'"',single:"'"},quoteREs={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function wrapQuotes(t,e,r){var n=r.quoteStyle||e,o=quotes[n];return o+t+o}function quote(t){return $replace.call(String(t),/"/g,""")}function canTrustToString(t){return!toStringTag||!("object"==typeof t&&(toStringTag in t||void 0!==t[toStringTag]))}function isArray(t){return"[object Array]"===toStr(t)&&canTrustToString(t)}function isDate(t){return"[object Date]"===toStr(t)&&canTrustToString(t)}function isRegExp(t){return"[object RegExp]"===toStr(t)&&canTrustToString(t)}function isError(t){return"[object Error]"===toStr(t)&&canTrustToString(t)}function isString(t){return"[object String]"===toStr(t)&&canTrustToString(t)}function isNumber(t){return"[object Number]"===toStr(t)&&canTrustToString(t)}function isBoolean(t){return"[object Boolean]"===toStr(t)&&canTrustToString(t)}function isSymbol(t){if(hasShammedSymbols)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!symToString)return!1;try{return symToString.call(t),!0}catch(t){}return!1}function isBigInt(t){if(!t||"object"!=typeof t||!bigIntValueOf)return!1;try{return bigIntValueOf.call(t),!0}catch(t){}return!1}module.exports=function inspect_(t,e,r,n){var o=e||{};if(has(o,"quoteStyle")&&!has(quotes,o.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has(o,"maxStringLength")&&("number"==typeof o.maxStringLength?o.maxStringLength<0&&o.maxStringLength!==1/0:null!==o.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=!has(o,"customInspect")||o.customInspect;if("boolean"!=typeof i&&"symbol"!==i)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has(o,"indent")&&null!==o.indent&&"\t"!==o.indent&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has(o,"numericSeparator")&&"boolean"!=typeof o.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=o.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return inspectString(t,o);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var c=String(t);return a?addNumericSeparator(t,c):c}if("bigint"==typeof t){var l=String(t)+"n";return a?addNumericSeparator(t,l):l}var u=void 0===o.depth?5:o.depth;if(void 0===r&&(r=0),r>=u&&u>0&&"object"==typeof t)return isArray(t)?"[Array]":"[Object]";var p=getIndent(o,r);if(void 0===n)n=[];else if(indexOf(n,t)>=0)return"[Circular]";function inspect(t,e,i){if(e&&(n=$arrSlice.call(n)).push(e),i){var a={depth:o.depth};return has(o,"quoteStyle")&&(a.quoteStyle=o.quoteStyle),inspect_(t,a,r+1,n)}return inspect_(t,o,r+1,n)}if("function"==typeof t&&!isRegExp(t)){var s=nameOf(t),f=arrObjKeys(t,inspect);return"[Function"+(s?": "+s:" (anonymous)")+"]"+(f.length>0?" { "+$join.call(f,", ")+" }":"")}if(isSymbol(t)){var y=hasShammedSymbols?$replace.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):symToString.call(t);return"object"!=typeof t||hasShammedSymbols?y:markBoxed(y)}if(isElement(t)){for(var S="<"+$toLowerCase.call(String(t.nodeName)),g=t.attributes||[],m=0;m"}if(isArray(t)){if(0===t.length)return"[]";var b=arrObjKeys(t,inspect);return p&&!singleLineValues(b)?"["+indentedJoin(b,p)+"]":"[ "+$join.call(b,", ")+" ]"}if(isError(t)){var h=arrObjKeys(t,inspect);return"cause"in Error.prototype||!("cause"in t)||isEnumerable.call(t,"cause")?0===h.length?"["+String(t)+"]":"{ ["+String(t)+"] "+$join.call(h,", ")+" }":"{ ["+String(t)+"] "+$join.call($concat.call("[cause]: "+inspect(t.cause),h),", ")+" }"}if("object"==typeof t&&i){if(inspectSymbol&&"function"==typeof t[inspectSymbol]&&utilInspect)return utilInspect(t,{depth:u-r});if("symbol"!==i&&"function"==typeof t.inspect)return t.inspect()}if(isMap(t)){var d=[];return mapForEach&&mapForEach.call(t,function(e,r){d.push(inspect(r,t,!0)+" => "+inspect(e,t))}),collectionOf("Map",mapSize.call(t),d,p)}if(isSet(t)){var O=[];return setForEach&&setForEach.call(t,function(e){O.push(inspect(e,t))}),collectionOf("Set",setSize.call(t),O,p)}if(isWeakMap(t))return weakCollectionOf("WeakMap");if(isWeakSet(t))return weakCollectionOf("WeakSet");if(isWeakRef(t))return weakCollectionOf("WeakRef");if(isNumber(t))return markBoxed(inspect(Number(t)));if(isBigInt(t))return markBoxed(inspect(bigIntValueOf.call(t)));if(isBoolean(t))return markBoxed(booleanValueOf.call(t));if(isString(t))return markBoxed(inspect(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||"undefined"!=typeof global&&t===global)return"{ [object globalThis] }";if(!isDate(t)&&!isRegExp(t)){var j=arrObjKeys(t,inspect),w=gPO?gPO(t)===Object.prototype:t instanceof Object||t.constructor===Object,$=t instanceof Object?"":"null prototype",v=!w&&toStringTag&&Object(t)===t&&toStringTag in t?$slice.call(toStr(t),8,-1):$?"Object":"",k=(w||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(v||$?"["+$join.call($concat.call([],v||[],$||[]),": ")+"] ":"");return 0===j.length?k+"{}":p?k+"{"+indentedJoin(j,p)+"}":k+"{ "+$join.call(j,", ")+" }"}return String(t)};var hasOwn=Object.prototype.hasOwnProperty||function(t){return t in this};function has(t,e){return hasOwn.call(t,e)}function toStr(t){return objectToString.call(t)}function nameOf(t){if(t.name)return t.name;var e=$match.call(functionToString.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function indexOf(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return inspectString($slice.call(t,0,e.maxStringLength),e)+n}var o=quoteREs[e.quoteStyle||"single"];return o.lastIndex=0,wrapQuotes($replace.call($replace.call(t,o,"\\$1"),/[\x00-\x1f]/g,lowbyte),"single",e)}function lowbyte(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+$toUpperCase.call(e.toString(16))}function markBoxed(t){return"Object("+t+")"}function weakCollectionOf(t){return t+" { ? }"}function collectionOf(t,e,r,n){return t+" ("+e+") {"+(n?indentedJoin(r,n):$join.call(r,", "))+"}"}function singleLineValues(t){for(var e=0;e=0)return!1;return!0}function getIndent(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=$join.call(Array(t.indent+1)," ")}return{base:r,prev:$join.call(Array(e+1),r)}}function indentedJoin(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+$join.call(t,","+r)+"\n"+e.prev}function arrObjKeys(t,e){var r=isArray(t),n=[];if(r){n.length=t.length;for(var o=0;o -1) { - return val.split(','); - } - - if (options.throwOnLimitExceeded && currentArrayLength >= options.arrayLimit) { - throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.'); - } - - return val; -}; - -// This is what browsers will submit when the ✓ character occurs in an -// application/x-www-form-urlencoded body and the encoding of the page containing -// the form is iso-8859-1, or when the submitted form has an accept-charset -// attribute of iso-8859-1. Presumably also with other charsets that do not contain -// the ✓ character, such as us-ascii. -var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓') - -// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded. -var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓') - -var parseValues = function parseQueryStringValues(str, options) { - var obj = { __proto__: null }; - - var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; - cleanStr = cleanStr.replace(/%5B/gi, '[').replace(/%5D/gi, ']'); - - var limit = options.parameterLimit === Infinity ? void undefined : options.parameterLimit; - var parts = cleanStr.split( - options.delimiter, - options.throwOnLimitExceeded ? limit + 1 : limit - ); - - if (options.throwOnLimitExceeded && parts.length > limit) { - throw new RangeError('Parameter limit exceeded. Only ' + limit + ' parameter' + (limit === 1 ? '' : 's') + ' allowed.'); - } - - var skipIndex = -1; // Keep track of where the utf8 sentinel was found - var i; - - var charset = options.charset; - if (options.charsetSentinel) { - for (i = 0; i < parts.length; ++i) { - if (parts[i].indexOf('utf8=') === 0) { - if (parts[i] === charsetSentinel) { - charset = 'utf-8'; - } else if (parts[i] === isoSentinel) { - charset = 'iso-8859-1'; - } - skipIndex = i; - i = parts.length; // The eslint settings do not allow break; - } - } - } - - for (i = 0; i < parts.length; ++i) { - if (i === skipIndex) { - continue; - } - var part = parts[i]; - - var bracketEqualsPos = part.indexOf(']='); - var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; - - var key; - var val; - if (pos === -1) { - key = options.decoder(part, defaults.decoder, charset, 'key'); - val = options.strictNullHandling ? null : ''; - } else { - key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key'); - - if (key !== null) { - val = utils.maybeMap( - parseArrayValue( - part.slice(pos + 1), - options, - isArray(obj[key]) ? obj[key].length : 0 - ), - function (encodedVal) { - return options.decoder(encodedVal, defaults.decoder, charset, 'value'); - } - ); - } - } - - if (val && options.interpretNumericEntities && charset === 'iso-8859-1') { - val = interpretNumericEntities(String(val)); - } - - if (part.indexOf('[]=') > -1) { - val = isArray(val) ? [val] : val; - } - - if (options.comma && isArray(val) && val.length > options.arrayLimit) { - if (options.throwOnLimitExceeded) { - throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.'); - } - val = utils.combine([], val, options.arrayLimit, options.plainObjects); - } - - if (key !== null) { - var existing = has.call(obj, key); - if (existing && options.duplicates === 'combine') { - obj[key] = utils.combine( - obj[key], - val, - options.arrayLimit, - options.plainObjects - ); - } else if (!existing || options.duplicates === 'last') { - obj[key] = val; - } - } - } - - return obj; -}; - -var parseObject = function (chain, val, options, valuesParsed) { - var currentArrayLength = 0; - if (chain.length > 0 && chain[chain.length - 1] === '[]') { - var parentKey = chain.slice(0, -1).join(''); - currentArrayLength = Array.isArray(val) && val[parentKey] ? val[parentKey].length : 0; - } - - var leaf = valuesParsed ? val : parseArrayValue(val, options, currentArrayLength); - - for (var i = chain.length - 1; i >= 0; --i) { - var obj; - var root = chain[i]; - - if (root === '[]' && options.parseArrays) { - if (utils.isOverflow(leaf)) { - // leaf is already an overflow object, preserve it - obj = leaf; - } else { - obj = options.allowEmptyArrays && (leaf === '' || (options.strictNullHandling && leaf === null)) - ? [] - : utils.combine( - [], - leaf, - options.arrayLimit, - options.plainObjects - ); - } - } else { - obj = options.plainObjects ? { __proto__: null } : {}; - var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; - var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot; - var index = parseInt(decodedRoot, 10); - var isValidArrayIndex = !isNaN(index) - && root !== decodedRoot - && String(index) === decodedRoot - && index >= 0 - && options.parseArrays; - if (!options.parseArrays && decodedRoot === '') { - obj = { 0: leaf }; - } else if (isValidArrayIndex && index < options.arrayLimit) { - obj = []; - obj[index] = leaf; - } else if (isValidArrayIndex && options.throwOnLimitExceeded) { - throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.'); - } else if (isValidArrayIndex) { - obj[index] = leaf; - utils.markOverflow(obj, index); - } else if (decodedRoot !== '__proto__') { - obj[decodedRoot] = leaf; - } - } - - leaf = obj; - } - - return leaf; -}; - -var splitKeyIntoSegments = function splitKeyIntoSegments(givenKey, options) { - var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; - - if (options.depth <= 0) { - if (!options.plainObjects && has.call(Object.prototype, key)) { - if (!options.allowPrototypes) { - return; - } - } - - return [key]; - } - - var brackets = /(\[[^[\]]*])/; - var child = /(\[[^[\]]*])/g; - - var segment = brackets.exec(key); - var parent = segment ? key.slice(0, segment.index) : key; - - var keys = []; - - if (parent) { - if (!options.plainObjects && has.call(Object.prototype, parent)) { - if (!options.allowPrototypes) { - return; - } - } - - keys[keys.length] = parent; - } - - var i = 0; - while ((segment = child.exec(key)) !== null && i < options.depth) { - i += 1; - - var segmentContent = segment[1].slice(1, -1); - if (!options.plainObjects && has.call(Object.prototype, segmentContent)) { - if (!options.allowPrototypes) { - return; - } - } - - keys[keys.length] = segment[1]; - } - - if (segment) { - if (options.strictDepth === true) { - throw new RangeError('Input depth exceeded depth option of ' + options.depth + ' and strictDepth is true'); - } - - keys[keys.length] = '[' + key.slice(segment.index) + ']'; - } - - return keys; -}; - -var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) { - if (!givenKey) { - return; - } - - var keys = splitKeyIntoSegments(givenKey, options); - - if (!keys) { - return; - } - - return parseObject(keys, val, options, valuesParsed); -}; - -var normalizeParseOptions = function normalizeParseOptions(opts) { - if (!opts) { - return defaults; - } - - if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') { - throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided'); - } - - if (typeof opts.decodeDotInKeys !== 'undefined' && typeof opts.decodeDotInKeys !== 'boolean') { - throw new TypeError('`decodeDotInKeys` option can only be `true` or `false`, when provided'); - } - - if (opts.decoder !== null && typeof opts.decoder !== 'undefined' && typeof opts.decoder !== 'function') { - throw new TypeError('Decoder has to be a function.'); - } - - if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { - throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); - } - - if (typeof opts.throwOnLimitExceeded !== 'undefined' && typeof opts.throwOnLimitExceeded !== 'boolean') { - throw new TypeError('`throwOnLimitExceeded` option must be a boolean'); - } - - var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset; - - var duplicates = typeof opts.duplicates === 'undefined' ? defaults.duplicates : opts.duplicates; - - if (duplicates !== 'combine' && duplicates !== 'first' && duplicates !== 'last') { - throw new TypeError('The duplicates option must be either combine, first, or last'); - } - - var allowDots = typeof opts.allowDots === 'undefined' ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots; - - return { - allowDots: allowDots, - allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays, - allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes, - allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse, - arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit, - charset: charset, - charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, - comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma, - decodeDotInKeys: typeof opts.decodeDotInKeys === 'boolean' ? opts.decodeDotInKeys : defaults.decodeDotInKeys, - decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder, - delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter, - // eslint-disable-next-line no-implicit-coercion, no-extra-parens - depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth, - duplicates: duplicates, - ignoreQueryPrefix: opts.ignoreQueryPrefix === true, - interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities, - parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit, - parseArrays: opts.parseArrays !== false, - plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects, - strictDepth: typeof opts.strictDepth === 'boolean' ? !!opts.strictDepth : defaults.strictDepth, - strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling, - throwOnLimitExceeded: typeof opts.throwOnLimitExceeded === 'boolean' ? opts.throwOnLimitExceeded : false - }; -}; - -module.exports = function (str, opts) { - var options = normalizeParseOptions(opts); - - if (str === '' || str === null || typeof str === 'undefined') { - return options.plainObjects ? { __proto__: null } : {}; - } - - var tempObj = typeof str === 'string' ? parseValues(str, options) : str; - var obj = options.plainObjects ? { __proto__: null } : {}; - - // Iterate over the keys and setup the new object - - var keys = Object.keys(tempObj); - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string'); - obj = utils.merge(obj, newObj, options); - } - - if (options.allowSparse === true) { - return obj; - } - - return utils.compact(obj); -}; diff --git a/node_modules/qs/lib/stringify.js b/node_modules/qs/lib/stringify.js deleted file mode 100644 index 2666eaf..0000000 --- a/node_modules/qs/lib/stringify.js +++ /dev/null @@ -1,356 +0,0 @@ -'use strict'; - -var getSideChannel = require('side-channel'); -var utils = require('./utils'); -var formats = require('./formats'); -var has = Object.prototype.hasOwnProperty; - -var arrayPrefixGenerators = { - brackets: function brackets(prefix) { - return prefix + '[]'; - }, - comma: 'comma', - indices: function indices(prefix, key) { - return prefix + '[' + key + ']'; - }, - repeat: function repeat(prefix) { - return prefix; - } -}; - -var isArray = Array.isArray; -var push = Array.prototype.push; -var pushToArray = function (arr, valueOrArray) { - push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]); -}; - -var toISO = Date.prototype.toISOString; - -var defaultFormat = formats['default']; -var defaults = { - addQueryPrefix: false, - allowDots: false, - allowEmptyArrays: false, - arrayFormat: 'indices', - charset: 'utf-8', - charsetSentinel: false, - commaRoundTrip: false, - delimiter: '&', - encode: true, - encodeDotInKeys: false, - encoder: utils.encode, - encodeValuesOnly: false, - filter: void undefined, - format: defaultFormat, - formatter: formats.formatters[defaultFormat], - // deprecated - indices: false, - serializeDate: function serializeDate(date) { - return toISO.call(date); - }, - skipNulls: false, - strictNullHandling: false -}; - -var isNonNullishPrimitive = function isNonNullishPrimitive(v) { - return typeof v === 'string' - || typeof v === 'number' - || typeof v === 'boolean' - || typeof v === 'symbol' - || typeof v === 'bigint'; -}; - -var sentinel = {}; - -var stringify = function stringify( - object, - prefix, - generateArrayPrefix, - commaRoundTrip, - allowEmptyArrays, - strictNullHandling, - skipNulls, - encodeDotInKeys, - encoder, - filter, - sort, - allowDots, - serializeDate, - format, - formatter, - encodeValuesOnly, - charset, - sideChannel -) { - var obj = object; - - var tmpSc = sideChannel; - var step = 0; - var findFlag = false; - while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) { - // Where object last appeared in the ref tree - var pos = tmpSc.get(object); - step += 1; - if (typeof pos !== 'undefined') { - if (pos === step) { - throw new RangeError('Cyclic object value'); - } else { - findFlag = true; // Break while - } - } - if (typeof tmpSc.get(sentinel) === 'undefined') { - step = 0; - } - } - - if (typeof filter === 'function') { - obj = filter(prefix, obj); - } else if (obj instanceof Date) { - obj = serializeDate(obj); - } else if (generateArrayPrefix === 'comma' && isArray(obj)) { - obj = utils.maybeMap(obj, function (value) { - if (value instanceof Date) { - return serializeDate(value); - } - return value; - }); - } - - if (obj === null) { - if (strictNullHandling) { - return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix; - } - - obj = ''; - } - - if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { - if (encoder) { - var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format); - return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))]; - } - return [formatter(prefix) + '=' + formatter(String(obj))]; - } - - var values = []; - - if (typeof obj === 'undefined') { - return values; - } - - var objKeys; - if (generateArrayPrefix === 'comma' && isArray(obj)) { - // we need to join elements in - if (encodeValuesOnly && encoder) { - obj = utils.maybeMap(obj, encoder); - } - objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }]; - } else if (isArray(filter)) { - objKeys = filter; - } else { - var keys = Object.keys(obj); - objKeys = sort ? keys.sort(sort) : keys; - } - - var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\./g, '%2E') : String(prefix); - - var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + '[]' : encodedPrefix; - - if (allowEmptyArrays && isArray(obj) && obj.length === 0) { - return adjustedPrefix + '[]'; - } - - for (var j = 0; j < objKeys.length; ++j) { - var key = objKeys[j]; - var value = typeof key === 'object' && key && typeof key.value !== 'undefined' - ? key.value - : obj[key]; - - if (skipNulls && value === null) { - continue; - } - - var encodedKey = allowDots && encodeDotInKeys ? String(key).replace(/\./g, '%2E') : String(key); - var keyPrefix = isArray(obj) - ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix - : adjustedPrefix + (allowDots ? '.' + encodedKey : '[' + encodedKey + ']'); - - sideChannel.set(object, step); - var valueSideChannel = getSideChannel(); - valueSideChannel.set(sentinel, sideChannel); - pushToArray(values, stringify( - value, - keyPrefix, - generateArrayPrefix, - commaRoundTrip, - allowEmptyArrays, - strictNullHandling, - skipNulls, - encodeDotInKeys, - generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder, - filter, - sort, - allowDots, - serializeDate, - format, - formatter, - encodeValuesOnly, - charset, - valueSideChannel - )); - } - - return values; -}; - -var normalizeStringifyOptions = function normalizeStringifyOptions(opts) { - if (!opts) { - return defaults; - } - - if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') { - throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided'); - } - - if (typeof opts.encodeDotInKeys !== 'undefined' && typeof opts.encodeDotInKeys !== 'boolean') { - throw new TypeError('`encodeDotInKeys` option can only be `true` or `false`, when provided'); - } - - if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') { - throw new TypeError('Encoder has to be a function.'); - } - - var charset = opts.charset || defaults.charset; - if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { - throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); - } - - var format = formats['default']; - if (typeof opts.format !== 'undefined') { - if (!has.call(formats.formatters, opts.format)) { - throw new TypeError('Unknown format option provided.'); - } - format = opts.format; - } - var formatter = formats.formatters[format]; - - var filter = defaults.filter; - if (typeof opts.filter === 'function' || isArray(opts.filter)) { - filter = opts.filter; - } - - var arrayFormat; - if (opts.arrayFormat in arrayPrefixGenerators) { - arrayFormat = opts.arrayFormat; - } else if ('indices' in opts) { - arrayFormat = opts.indices ? 'indices' : 'repeat'; - } else { - arrayFormat = defaults.arrayFormat; - } - - if ('commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') { - throw new TypeError('`commaRoundTrip` must be a boolean, or absent'); - } - - var allowDots = typeof opts.allowDots === 'undefined' ? opts.encodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots; - - return { - addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix, - allowDots: allowDots, - allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays, - arrayFormat: arrayFormat, - charset: charset, - charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, - commaRoundTrip: !!opts.commaRoundTrip, - delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter, - encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode, - encodeDotInKeys: typeof opts.encodeDotInKeys === 'boolean' ? opts.encodeDotInKeys : defaults.encodeDotInKeys, - encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder, - encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly, - filter: filter, - format: format, - formatter: formatter, - serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate, - skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls, - sort: typeof opts.sort === 'function' ? opts.sort : null, - strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling - }; -}; - -module.exports = function (object, opts) { - var obj = object; - var options = normalizeStringifyOptions(opts); - - var objKeys; - var filter; - - if (typeof options.filter === 'function') { - filter = options.filter; - obj = filter('', obj); - } else if (isArray(options.filter)) { - filter = options.filter; - objKeys = filter; - } - - var keys = []; - - if (typeof obj !== 'object' || obj === null) { - return ''; - } - - var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat]; - var commaRoundTrip = generateArrayPrefix === 'comma' && options.commaRoundTrip; - - if (!objKeys) { - objKeys = Object.keys(obj); - } - - if (options.sort) { - objKeys.sort(options.sort); - } - - var sideChannel = getSideChannel(); - for (var i = 0; i < objKeys.length; ++i) { - var key = objKeys[i]; - var value = obj[key]; - - if (options.skipNulls && value === null) { - continue; - } - pushToArray(keys, stringify( - value, - key, - generateArrayPrefix, - commaRoundTrip, - options.allowEmptyArrays, - options.strictNullHandling, - options.skipNulls, - options.encodeDotInKeys, - options.encode ? options.encoder : null, - options.filter, - options.sort, - options.allowDots, - options.serializeDate, - options.format, - options.formatter, - options.encodeValuesOnly, - options.charset, - sideChannel - )); - } - - var joined = keys.join(options.delimiter); - var prefix = options.addQueryPrefix === true ? '?' : ''; - - if (options.charsetSentinel) { - if (options.charset === 'iso-8859-1') { - // encodeURIComponent('✓'), the "numeric entity" representation of a checkmark - prefix += 'utf8=%26%2310003%3B&'; - } else { - // encodeURIComponent('✓') - prefix += 'utf8=%E2%9C%93&'; - } - } - - return joined.length > 0 ? prefix + joined : ''; -}; diff --git a/node_modules/qs/lib/utils.js b/node_modules/qs/lib/utils.js deleted file mode 100644 index 8e10e39..0000000 --- a/node_modules/qs/lib/utils.js +++ /dev/null @@ -1,340 +0,0 @@ -'use strict'; - -var formats = require('./formats'); -var getSideChannel = require('side-channel'); - -var has = Object.prototype.hasOwnProperty; -var isArray = Array.isArray; - -// Track objects created from arrayLimit overflow using side-channel -// Stores the current max numeric index for O(1) lookup -var overflowChannel = getSideChannel(); - -var markOverflow = function markOverflow(obj, maxIndex) { - overflowChannel.set(obj, maxIndex); - return obj; -}; - -var isOverflow = function isOverflow(obj) { - return overflowChannel.has(obj); -}; - -var getMaxIndex = function getMaxIndex(obj) { - return overflowChannel.get(obj); -}; - -var setMaxIndex = function setMaxIndex(obj, maxIndex) { - overflowChannel.set(obj, maxIndex); -}; - -var hexTable = (function () { - var array = []; - for (var i = 0; i < 256; ++i) { - array[array.length] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase(); - } - - return array; -}()); - -var compactQueue = function compactQueue(queue) { - while (queue.length > 1) { - var item = queue.pop(); - var obj = item.obj[item.prop]; - - if (isArray(obj)) { - var compacted = []; - - for (var j = 0; j < obj.length; ++j) { - if (typeof obj[j] !== 'undefined') { - compacted[compacted.length] = obj[j]; - } - } - - item.obj[item.prop] = compacted; - } - } -}; - -var arrayToObject = function arrayToObject(source, options) { - var obj = options && options.plainObjects ? { __proto__: null } : {}; - for (var i = 0; i < source.length; ++i) { - if (typeof source[i] !== 'undefined') { - obj[i] = source[i]; - } - } - - return obj; -}; - -var merge = function merge(target, source, options) { - /* eslint no-param-reassign: 0 */ - if (!source) { - return target; - } - - if (typeof source !== 'object' && typeof source !== 'function') { - if (isArray(target)) { - var nextIndex = target.length; - if (options && typeof options.arrayLimit === 'number' && nextIndex > options.arrayLimit) { - return markOverflow(arrayToObject(target.concat(source), options), nextIndex); - } - target[nextIndex] = source; - } else if (target && typeof target === 'object') { - if (isOverflow(target)) { - // Add at next numeric index for overflow objects - var newIndex = getMaxIndex(target) + 1; - target[newIndex] = source; - setMaxIndex(target, newIndex); - } else if ( - (options && (options.plainObjects || options.allowPrototypes)) - || !has.call(Object.prototype, source) - ) { - target[source] = true; - } - } else { - return [target, source]; - } - - return target; - } - - if (!target || typeof target !== 'object') { - if (isOverflow(source)) { - // Create new object with target at 0, source values shifted by 1 - var sourceKeys = Object.keys(source); - var result = options && options.plainObjects - ? { __proto__: null, 0: target } - : { 0: target }; - for (var m = 0; m < sourceKeys.length; m++) { - var oldKey = parseInt(sourceKeys[m], 10); - result[oldKey + 1] = source[sourceKeys[m]]; - } - return markOverflow(result, getMaxIndex(source) + 1); - } - var combined = [target].concat(source); - if (options && typeof options.arrayLimit === 'number' && combined.length > options.arrayLimit) { - return markOverflow(arrayToObject(combined, options), combined.length - 1); - } - return combined; - } - - var mergeTarget = target; - if (isArray(target) && !isArray(source)) { - mergeTarget = arrayToObject(target, options); - } - - if (isArray(target) && isArray(source)) { - source.forEach(function (item, i) { - if (has.call(target, i)) { - var targetItem = target[i]; - if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') { - target[i] = merge(targetItem, item, options); - } else { - target[target.length] = item; - } - } else { - target[i] = item; - } - }); - return target; - } - - return Object.keys(source).reduce(function (acc, key) { - var value = source[key]; - - if (has.call(acc, key)) { - acc[key] = merge(acc[key], value, options); - } else { - acc[key] = value; - } - - if (isOverflow(source) && !isOverflow(acc)) { - markOverflow(acc, getMaxIndex(source)); - } - if (isOverflow(acc)) { - var keyNum = parseInt(key, 10); - if (String(keyNum) === key && keyNum >= 0 && keyNum > getMaxIndex(acc)) { - setMaxIndex(acc, keyNum); - } - } - - return acc; - }, mergeTarget); -}; - -var assign = function assignSingleSource(target, source) { - return Object.keys(source).reduce(function (acc, key) { - acc[key] = source[key]; - return acc; - }, target); -}; - -var decode = function (str, defaultDecoder, charset) { - var strWithoutPlus = str.replace(/\+/g, ' '); - if (charset === 'iso-8859-1') { - // unescape never throws, no try...catch needed: - return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); - } - // utf-8 - try { - return decodeURIComponent(strWithoutPlus); - } catch (e) { - return strWithoutPlus; - } -}; - -var limit = 1024; - -/* eslint operator-linebreak: [2, "before"] */ - -var encode = function encode(str, defaultEncoder, charset, kind, format) { - // This code was originally written by Brian White (mscdex) for the io.js core querystring library. - // It has been adapted here for stricter adherence to RFC 3986 - if (str.length === 0) { - return str; - } - - var string = str; - if (typeof str === 'symbol') { - string = Symbol.prototype.toString.call(str); - } else if (typeof str !== 'string') { - string = String(str); - } - - if (charset === 'iso-8859-1') { - return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) { - return '%26%23' + parseInt($0.slice(2), 16) + '%3B'; - }); - } - - var out = ''; - for (var j = 0; j < string.length; j += limit) { - var segment = string.length >= limit ? string.slice(j, j + limit) : string; - var arr = []; - - for (var i = 0; i < segment.length; ++i) { - var c = segment.charCodeAt(i); - if ( - c === 0x2D // - - || c === 0x2E // . - || c === 0x5F // _ - || c === 0x7E // ~ - || (c >= 0x30 && c <= 0x39) // 0-9 - || (c >= 0x41 && c <= 0x5A) // a-z - || (c >= 0x61 && c <= 0x7A) // A-Z - || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( ) - ) { - arr[arr.length] = segment.charAt(i); - continue; - } - - if (c < 0x80) { - arr[arr.length] = hexTable[c]; - continue; - } - - if (c < 0x800) { - arr[arr.length] = hexTable[0xC0 | (c >> 6)] - + hexTable[0x80 | (c & 0x3F)]; - continue; - } - - if (c < 0xD800 || c >= 0xE000) { - arr[arr.length] = hexTable[0xE0 | (c >> 12)] - + hexTable[0x80 | ((c >> 6) & 0x3F)] - + hexTable[0x80 | (c & 0x3F)]; - continue; - } - - i += 1; - c = 0x10000 + (((c & 0x3FF) << 10) | (segment.charCodeAt(i) & 0x3FF)); - - arr[arr.length] = hexTable[0xF0 | (c >> 18)] - + hexTable[0x80 | ((c >> 12) & 0x3F)] - + hexTable[0x80 | ((c >> 6) & 0x3F)] - + hexTable[0x80 | (c & 0x3F)]; - } - - out += arr.join(''); - } - - return out; -}; - -var compact = function compact(value) { - var queue = [{ obj: { o: value }, prop: 'o' }]; - var refs = []; - - for (var i = 0; i < queue.length; ++i) { - var item = queue[i]; - var obj = item.obj[item.prop]; - - var keys = Object.keys(obj); - for (var j = 0; j < keys.length; ++j) { - var key = keys[j]; - var val = obj[key]; - if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { - queue[queue.length] = { obj: obj, prop: key }; - refs[refs.length] = val; - } - } - } - - compactQueue(queue); - - return value; -}; - -var isRegExp = function isRegExp(obj) { - return Object.prototype.toString.call(obj) === '[object RegExp]'; -}; - -var isBuffer = function isBuffer(obj) { - if (!obj || typeof obj !== 'object') { - return false; - } - - return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); -}; - -var combine = function combine(a, b, arrayLimit, plainObjects) { - // If 'a' is already an overflow object, add to it - if (isOverflow(a)) { - var newIndex = getMaxIndex(a) + 1; - a[newIndex] = b; - setMaxIndex(a, newIndex); - return a; - } - - var result = [].concat(a, b); - if (result.length > arrayLimit) { - return markOverflow(arrayToObject(result, { plainObjects: plainObjects }), result.length - 1); - } - return result; -}; - -var maybeMap = function maybeMap(val, fn) { - if (isArray(val)) { - var mapped = []; - for (var i = 0; i < val.length; i += 1) { - mapped[mapped.length] = fn(val[i]); - } - return mapped; - } - return fn(val); -}; - -module.exports = { - arrayToObject: arrayToObject, - assign: assign, - combine: combine, - compact: compact, - decode: decode, - encode: encode, - isBuffer: isBuffer, - isOverflow: isOverflow, - isRegExp: isRegExp, - markOverflow: markOverflow, - maybeMap: maybeMap, - merge: merge -}; diff --git a/node_modules/qs/package.json b/node_modules/qs/package.json deleted file mode 100644 index cb5cfbe..0000000 --- a/node_modules/qs/package.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "name": "qs", - "description": "A querystring parser that supports nesting and arrays, with a depth limit", - "homepage": "https://github.com/ljharb/qs", - "version": "6.14.2", - "repository": { - "type": "git", - "url": "https://github.com/ljharb/qs.git" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "main": "lib/index.js", - "sideEffects": false, - "contributors": [ - { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - } - ], - "keywords": [ - "querystring", - "qs", - "query", - "url", - "parse", - "stringify" - ], - "engines": { - "node": ">=0.6" - }, - "dependencies": { - "side-channel": "^1.1.0" - }, - "devDependencies": { - "@browserify/envify": "^6.0.0", - "@browserify/uglifyify": "^6.0.0", - "@ljharb/eslint-config": "^22.1.3", - "browserify": "^16.5.2", - "bundle-collapser": "^1.4.0", - "common-shakeify": "~1.0.0", - "eclint": "^2.8.1", - "es-value-fixtures": "^1.7.1", - "eslint": "^9.39.2", - "evalmd": "^0.0.19", - "for-each": "^0.3.5", - "glob": "=10.3.7", - "has-bigints": "^1.1.0", - "has-override-mistake": "^1.0.1", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.2.0", - "has-symbols": "^1.1.0", - "iconv-lite": "^0.5.1", - "in-publish": "^2.0.1", - "jackspeak": "=2.1.1", - "jiti": "^0.0.0", - "mkdirp": "^0.5.5", - "mock-property": "^1.1.0", - "module-deps": "^6.2.3", - "npmignore": "^0.3.5", - "nyc": "^10.3.2", - "object-inspect": "^1.13.4", - "qs-iconv": "^1.0.4", - "safe-publish-latest": "^2.0.0", - "safer-buffer": "^2.1.2", - "tape": "^5.9.0", - "unassertify": "^3.0.1" - }, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated && npm run dist", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "pretest": "npm run --silent readme && npm run --silent lint", - "test": "npm run tests-only", - "tests-only": "nyc tape 'test/**/*.js'", - "posttest": "npx npm@'>=10.2' audit --production", - "readme": "evalmd README.md", - "postlint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)", - "lint": "eslint .", - "dist": "mkdirp dist && browserify --standalone Qs -g unassertify -g @browserify/envify -g [@browserify/uglifyify --mangle.keep_fnames --compress.keep_fnames --format.indent_level=1 --compress.arrows=false --compress.passes=4 --compress.typeofs=false] -p common-shakeify -p bundle-collapser/plugin lib/index.js > dist/qs.js" - }, - "license": "BSD-3-Clause", - "publishConfig": { - "ignore": [ - "!dist/*", - "bower.json", - "component.json", - ".github/workflows", - "logos", - "tea.yaml" - ] - } -} diff --git a/node_modules/qs/test/empty-keys-cases.js b/node_modules/qs/test/empty-keys-cases.js deleted file mode 100644 index 2b1190e..0000000 --- a/node_modules/qs/test/empty-keys-cases.js +++ /dev/null @@ -1,267 +0,0 @@ -'use strict'; - -module.exports = { - emptyTestCases: [ - { - input: '&', - withEmptyKeys: {}, - stringifyOutput: { - brackets: '', - indices: '', - repeat: '' - }, - noEmptyKeys: {} - }, - { - input: '&&', - withEmptyKeys: {}, - stringifyOutput: { - brackets: '', - indices: '', - repeat: '' - }, - noEmptyKeys: {} - }, - { - input: '&=', - withEmptyKeys: { '': '' }, - stringifyOutput: { - brackets: '=', - indices: '=', - repeat: '=' - }, - noEmptyKeys: {} - }, - { - input: '&=&', - withEmptyKeys: { '': '' }, - stringifyOutput: { - brackets: '=', - indices: '=', - repeat: '=' - }, - noEmptyKeys: {} - }, - { - input: '&=&=', - withEmptyKeys: { '': ['', ''] }, - stringifyOutput: { - brackets: '[]=&[]=', - indices: '[0]=&[1]=', - repeat: '=&=' - }, - noEmptyKeys: {} - }, - { - input: '&=&=&', - withEmptyKeys: { '': ['', ''] }, - stringifyOutput: { - brackets: '[]=&[]=', - indices: '[0]=&[1]=', - repeat: '=&=' - }, - noEmptyKeys: {} - }, - { - input: '=', - withEmptyKeys: { '': '' }, - noEmptyKeys: {}, - stringifyOutput: { - brackets: '=', - indices: '=', - repeat: '=' - } - }, - { - input: '=&', - withEmptyKeys: { '': '' }, - stringifyOutput: { - brackets: '=', - indices: '=', - repeat: '=' - }, - noEmptyKeys: {} - }, - { - input: '=&&&', - withEmptyKeys: { '': '' }, - stringifyOutput: { - brackets: '=', - indices: '=', - repeat: '=' - }, - noEmptyKeys: {} - }, - { - input: '=&=&=&', - withEmptyKeys: { '': ['', '', ''] }, - stringifyOutput: { - brackets: '[]=&[]=&[]=', - indices: '[0]=&[1]=&[2]=', - repeat: '=&=&=' - }, - noEmptyKeys: {} - }, - { - input: '=&a[]=b&a[1]=c', - withEmptyKeys: { '': '', a: ['b', 'c'] }, - stringifyOutput: { - brackets: '=&a[]=b&a[]=c', - indices: '=&a[0]=b&a[1]=c', - repeat: '=&a=b&a=c' - }, - noEmptyKeys: { a: ['b', 'c'] } - }, - { - input: '=a', - withEmptyKeys: { '': 'a' }, - noEmptyKeys: {}, - stringifyOutput: { - brackets: '=a', - indices: '=a', - repeat: '=a' - } - }, - { - input: 'a==a', - withEmptyKeys: { a: '=a' }, - noEmptyKeys: { a: '=a' }, - stringifyOutput: { - brackets: 'a==a', - indices: 'a==a', - repeat: 'a==a' - } - }, - { - input: '=&a[]=b', - withEmptyKeys: { '': '', a: ['b'] }, - stringifyOutput: { - brackets: '=&a[]=b', - indices: '=&a[0]=b', - repeat: '=&a=b' - }, - noEmptyKeys: { a: ['b'] } - }, - { - input: '=&a[]=b&a[]=c&a[2]=d', - withEmptyKeys: { '': '', a: ['b', 'c', 'd'] }, - stringifyOutput: { - brackets: '=&a[]=b&a[]=c&a[]=d', - indices: '=&a[0]=b&a[1]=c&a[2]=d', - repeat: '=&a=b&a=c&a=d' - }, - noEmptyKeys: { a: ['b', 'c', 'd'] } - }, - { - input: '=a&=b', - withEmptyKeys: { '': ['a', 'b'] }, - stringifyOutput: { - brackets: '[]=a&[]=b', - indices: '[0]=a&[1]=b', - repeat: '=a&=b' - }, - noEmptyKeys: {} - }, - { - input: '=a&foo=b', - withEmptyKeys: { '': 'a', foo: 'b' }, - noEmptyKeys: { foo: 'b' }, - stringifyOutput: { - brackets: '=a&foo=b', - indices: '=a&foo=b', - repeat: '=a&foo=b' - } - }, - { - input: 'a[]=b&a=c&=', - withEmptyKeys: { '': '', a: ['b', 'c'] }, - stringifyOutput: { - brackets: '=&a[]=b&a[]=c', - indices: '=&a[0]=b&a[1]=c', - repeat: '=&a=b&a=c' - }, - noEmptyKeys: { a: ['b', 'c'] } - }, - { - input: 'a[]=b&a=c&=', - withEmptyKeys: { '': '', a: ['b', 'c'] }, - stringifyOutput: { - brackets: '=&a[]=b&a[]=c', - indices: '=&a[0]=b&a[1]=c', - repeat: '=&a=b&a=c' - }, - noEmptyKeys: { a: ['b', 'c'] } - }, - { - input: 'a[0]=b&a=c&=', - withEmptyKeys: { '': '', a: ['b', 'c'] }, - stringifyOutput: { - brackets: '=&a[]=b&a[]=c', - indices: '=&a[0]=b&a[1]=c', - repeat: '=&a=b&a=c' - }, - noEmptyKeys: { a: ['b', 'c'] } - }, - { - input: 'a=b&a[]=c&=', - withEmptyKeys: { '': '', a: ['b', 'c'] }, - stringifyOutput: { - brackets: '=&a[]=b&a[]=c', - indices: '=&a[0]=b&a[1]=c', - repeat: '=&a=b&a=c' - }, - noEmptyKeys: { a: ['b', 'c'] } - }, - { - input: 'a=b&a[0]=c&=', - withEmptyKeys: { '': '', a: ['b', 'c'] }, - stringifyOutput: { - brackets: '=&a[]=b&a[]=c', - indices: '=&a[0]=b&a[1]=c', - repeat: '=&a=b&a=c' - }, - noEmptyKeys: { a: ['b', 'c'] } - }, - { - input: '[]=a&[]=b& []=1', - withEmptyKeys: { '': ['a', 'b'], ' ': ['1'] }, - stringifyOutput: { - brackets: '[]=a&[]=b& []=1', - indices: '[0]=a&[1]=b& [0]=1', - repeat: '=a&=b& =1' - }, - noEmptyKeys: { 0: 'a', 1: 'b', ' ': ['1'] } - }, - { - input: '[0]=a&[1]=b&a[0]=1&a[1]=2', - withEmptyKeys: { '': ['a', 'b'], a: ['1', '2'] }, - noEmptyKeys: { 0: 'a', 1: 'b', a: ['1', '2'] }, - stringifyOutput: { - brackets: '[]=a&[]=b&a[]=1&a[]=2', - indices: '[0]=a&[1]=b&a[0]=1&a[1]=2', - repeat: '=a&=b&a=1&a=2' - } - }, - { - input: '[deep]=a&[deep]=2', - withEmptyKeys: { '': { deep: ['a', '2'] } - }, - stringifyOutput: { - brackets: '[deep][]=a&[deep][]=2', - indices: '[deep][0]=a&[deep][1]=2', - repeat: '[deep]=a&[deep]=2' - }, - noEmptyKeys: { deep: ['a', '2'] } - }, - { - input: '%5B0%5D=a&%5B1%5D=b', - withEmptyKeys: { '': ['a', 'b'] }, - stringifyOutput: { - brackets: '[]=a&[]=b', - indices: '[0]=a&[1]=b', - repeat: '=a&=b' - }, - noEmptyKeys: { 0: 'a', 1: 'b' } - } - ] -}; diff --git a/node_modules/qs/test/parse.js b/node_modules/qs/test/parse.js deleted file mode 100644 index 6234fef..0000000 --- a/node_modules/qs/test/parse.js +++ /dev/null @@ -1,1512 +0,0 @@ -'use strict'; - -var test = require('tape'); -var hasPropertyDescriptors = require('has-property-descriptors')(); -var iconv = require('iconv-lite'); -var mockProperty = require('mock-property'); -var hasOverrideMistake = require('has-override-mistake')(); -var SaferBuffer = require('safer-buffer').Buffer; -var v = require('es-value-fixtures'); -var inspect = require('object-inspect'); -var emptyTestCases = require('./empty-keys-cases').emptyTestCases; -var hasProto = require('has-proto')(); - -var qs = require('../'); -var utils = require('../lib/utils'); - -test('parse()', function (t) { - t.test('parses a simple string', function (st) { - st.deepEqual(qs.parse('0=foo'), { 0: 'foo' }); - st.deepEqual(qs.parse('foo=c++'), { foo: 'c ' }); - st.deepEqual(qs.parse('a[>=]=23'), { a: { '>=': '23' } }); - st.deepEqual(qs.parse('a[<=>]==23'), { a: { '<=>': '=23' } }); - st.deepEqual(qs.parse('a[==]=23'), { a: { '==': '23' } }); - st.deepEqual(qs.parse('foo', { strictNullHandling: true }), { foo: null }); - st.deepEqual(qs.parse('foo'), { foo: '' }); - st.deepEqual(qs.parse('foo='), { foo: '' }); - st.deepEqual(qs.parse('foo=bar'), { foo: 'bar' }); - st.deepEqual(qs.parse(' foo = bar = baz '), { ' foo ': ' bar = baz ' }); - st.deepEqual(qs.parse('foo=bar=baz'), { foo: 'bar=baz' }); - st.deepEqual(qs.parse('foo=bar&bar=baz'), { foo: 'bar', bar: 'baz' }); - st.deepEqual(qs.parse('foo2=bar2&baz2='), { foo2: 'bar2', baz2: '' }); - st.deepEqual(qs.parse('foo=bar&baz', { strictNullHandling: true }), { foo: 'bar', baz: null }); - st.deepEqual(qs.parse('foo=bar&baz'), { foo: 'bar', baz: '' }); - st.deepEqual(qs.parse('cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World'), { - cht: 'p3', - chd: 't:60,40', - chs: '250x100', - chl: 'Hello|World' - }); - st.end(); - }); - - t.test('comma: false', function (st) { - st.deepEqual(qs.parse('a[]=b&a[]=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[0]=b&a[1]=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a=b,c'), { a: 'b,c' }); - st.deepEqual(qs.parse('a=b&a=c'), { a: ['b', 'c'] }); - st.end(); - }); - - t.test('comma: true', function (st) { - st.deepEqual(qs.parse('a[]=b&a[]=c', { comma: true }), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[0]=b&a[1]=c', { comma: true }), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a=b,c', { comma: true }), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a=b&a=c', { comma: true }), { a: ['b', 'c'] }); - st.end(); - }); - - t.test('allows enabling dot notation', function (st) { - st.deepEqual(qs.parse('a.b=c'), { 'a.b': 'c' }); - st.deepEqual(qs.parse('a.b=c', { allowDots: true }), { a: { b: 'c' } }); - - st.end(); - }); - - t.test('decode dot keys correctly', function (st) { - st.deepEqual( - qs.parse('name%252Eobj.first=John&name%252Eobj.last=Doe', { allowDots: false, decodeDotInKeys: false }), - { 'name%2Eobj.first': 'John', 'name%2Eobj.last': 'Doe' }, - 'with allowDots false and decodeDotInKeys false' - ); - st.deepEqual( - qs.parse('name.obj.first=John&name.obj.last=Doe', { allowDots: true, decodeDotInKeys: false }), - { name: { obj: { first: 'John', last: 'Doe' } } }, - 'with allowDots false and decodeDotInKeys false' - ); - st.deepEqual( - qs.parse('name%252Eobj.first=John&name%252Eobj.last=Doe', { allowDots: true, decodeDotInKeys: false }), - { 'name%2Eobj': { first: 'John', last: 'Doe' } }, - 'with allowDots true and decodeDotInKeys false' - ); - st.deepEqual( - qs.parse('name%252Eobj.first=John&name%252Eobj.last=Doe', { allowDots: true, decodeDotInKeys: true }), - { 'name.obj': { first: 'John', last: 'Doe' } }, - 'with allowDots true and decodeDotInKeys true' - ); - - st.deepEqual( - qs.parse( - 'name%252Eobj%252Esubobject.first%252Egodly%252Ename=John&name%252Eobj%252Esubobject.last=Doe', - { allowDots: false, decodeDotInKeys: false } - ), - { 'name%2Eobj%2Esubobject.first%2Egodly%2Ename': 'John', 'name%2Eobj%2Esubobject.last': 'Doe' }, - 'with allowDots false and decodeDotInKeys false' - ); - st.deepEqual( - qs.parse( - 'name.obj.subobject.first.godly.name=John&name.obj.subobject.last=Doe', - { allowDots: true, decodeDotInKeys: false } - ), - { name: { obj: { subobject: { first: { godly: { name: 'John' } }, last: 'Doe' } } } }, - 'with allowDots true and decodeDotInKeys false' - ); - st.deepEqual( - qs.parse( - 'name%252Eobj%252Esubobject.first%252Egodly%252Ename=John&name%252Eobj%252Esubobject.last=Doe', - { allowDots: true, decodeDotInKeys: true } - ), - { 'name.obj.subobject': { 'first.godly.name': 'John', last: 'Doe' } }, - 'with allowDots true and decodeDotInKeys true' - ); - st.deepEqual( - qs.parse('name%252Eobj.first=John&name%252Eobj.last=Doe'), - { 'name%2Eobj.first': 'John', 'name%2Eobj.last': 'Doe' }, - 'with allowDots and decodeDotInKeys undefined' - ); - - st.end(); - }); - - t.test('decodes dot in key of object, and allow enabling dot notation when decodeDotInKeys is set to true and allowDots is undefined', function (st) { - st.deepEqual( - qs.parse( - 'name%252Eobj%252Esubobject.first%252Egodly%252Ename=John&name%252Eobj%252Esubobject.last=Doe', - { decodeDotInKeys: true } - ), - { 'name.obj.subobject': { 'first.godly.name': 'John', last: 'Doe' } }, - 'with allowDots undefined and decodeDotInKeys true' - ); - - st.end(); - }); - - t.test('throws when decodeDotInKeys is not of type boolean', function (st) { - st['throws']( - function () { qs.parse('foo[]&bar=baz', { decodeDotInKeys: 'foobar' }); }, - TypeError - ); - - st['throws']( - function () { qs.parse('foo[]&bar=baz', { decodeDotInKeys: 0 }); }, - TypeError - ); - st['throws']( - function () { qs.parse('foo[]&bar=baz', { decodeDotInKeys: NaN }); }, - TypeError - ); - - st['throws']( - function () { qs.parse('foo[]&bar=baz', { decodeDotInKeys: null }); }, - TypeError - ); - - st.end(); - }); - - t.test('allows empty arrays in obj values', function (st) { - st.deepEqual(qs.parse('foo[]&bar=baz', { allowEmptyArrays: true }), { foo: [], bar: 'baz' }); - st.deepEqual(qs.parse('foo[]&bar=baz', { allowEmptyArrays: false }), { foo: [''], bar: 'baz' }); - - st.end(); - }); - - t.test('throws when allowEmptyArrays is not of type boolean', function (st) { - st['throws']( - function () { qs.parse('foo[]&bar=baz', { allowEmptyArrays: 'foobar' }); }, - TypeError - ); - - st['throws']( - function () { qs.parse('foo[]&bar=baz', { allowEmptyArrays: 0 }); }, - TypeError - ); - st['throws']( - function () { qs.parse('foo[]&bar=baz', { allowEmptyArrays: NaN }); }, - TypeError - ); - - st['throws']( - function () { qs.parse('foo[]&bar=baz', { allowEmptyArrays: null }); }, - TypeError - ); - - st.end(); - }); - - t.test('allowEmptyArrays + strictNullHandling', function (st) { - st.deepEqual( - qs.parse('testEmptyArray[]', { strictNullHandling: true, allowEmptyArrays: true }), - { testEmptyArray: [] } - ); - - st.end(); - }); - - t.deepEqual(qs.parse('a[b]=c'), { a: { b: 'c' } }, 'parses a single nested string'); - t.deepEqual(qs.parse('a[b][c]=d'), { a: { b: { c: 'd' } } }, 'parses a double nested string'); - t.deepEqual( - qs.parse('a[b][c][d][e][f][g][h]=i'), - { a: { b: { c: { d: { e: { f: { '[g][h]': 'i' } } } } } } }, - 'defaults to a depth of 5' - ); - - t.test('only parses one level when depth = 1', function (st) { - st.deepEqual(qs.parse('a[b][c]=d', { depth: 1 }), { a: { b: { '[c]': 'd' } } }); - st.deepEqual(qs.parse('a[b][c][d]=e', { depth: 1 }), { a: { b: { '[c][d]': 'e' } } }); - st.end(); - }); - - t.test('uses original key when depth = 0', function (st) { - st.deepEqual(qs.parse('a[0]=b&a[1]=c', { depth: 0 }), { 'a[0]': 'b', 'a[1]': 'c' }); - st.deepEqual(qs.parse('a[0][0]=b&a[0][1]=c&a[1]=d&e=2', { depth: 0 }), { 'a[0][0]': 'b', 'a[0][1]': 'c', 'a[1]': 'd', e: '2' }); - st.end(); - }); - - t.test('uses original key when depth = false', function (st) { - st.deepEqual(qs.parse('a[0]=b&a[1]=c', { depth: false }), { 'a[0]': 'b', 'a[1]': 'c' }); - st.deepEqual(qs.parse('a[0][0]=b&a[0][1]=c&a[1]=d&e=2', { depth: false }), { 'a[0][0]': 'b', 'a[0][1]': 'c', 'a[1]': 'd', e: '2' }); - st.end(); - }); - - t.deepEqual(qs.parse('a=b&a=c'), { a: ['b', 'c'] }, 'parses a simple array'); - - t.test('parses an explicit array', function (st) { - st.deepEqual(qs.parse('a[]=b'), { a: ['b'] }); - st.deepEqual(qs.parse('a[]=b&a[]=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[]=b&a[]=c&a[]=d'), { a: ['b', 'c', 'd'] }); - st.end(); - }); - - t.test('parses a mix of simple and explicit arrays', function (st) { - st.deepEqual(qs.parse('a=b&a[]=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[]=b&a=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[0]=b&a=c'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a=b&a[0]=c'), { a: ['b', 'c'] }); - - st.deepEqual(qs.parse('a[1]=b&a=c', { arrayLimit: 20 }), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[]=b&a=c', { arrayLimit: 0 }), { a: { 0: 'b', 1: 'c' } }); - st.deepEqual(qs.parse('a[]=b&a=c'), { a: ['b', 'c'] }); - - st.deepEqual(qs.parse('a=b&a[1]=c', { arrayLimit: 20 }), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a=b&a[]=c', { arrayLimit: 0 }), { a: { 0: 'b', 1: 'c' } }); - st.deepEqual(qs.parse('a=b&a[]=c'), { a: ['b', 'c'] }); - - st.end(); - }); - - t.test('parses a nested array', function (st) { - st.deepEqual(qs.parse('a[b][]=c&a[b][]=d'), { a: { b: ['c', 'd'] } }); - st.deepEqual(qs.parse('a[>=]=25'), { a: { '>=': '25' } }); - st.end(); - }); - - t.test('allows to specify array indices', function (st) { - st.deepEqual(qs.parse('a[1]=c&a[0]=b&a[2]=d'), { a: ['b', 'c', 'd'] }); - st.deepEqual(qs.parse('a[1]=c&a[0]=b'), { a: ['b', 'c'] }); - st.deepEqual(qs.parse('a[1]=c', { arrayLimit: 20 }), { a: ['c'] }); - st.deepEqual(qs.parse('a[1]=c', { arrayLimit: 0 }), { a: { 1: 'c' } }); - st.deepEqual(qs.parse('a[1]=c'), { a: ['c'] }); - st.end(); - }); - - t.test('limits specific array indices to arrayLimit', function (st) { - st.deepEqual(qs.parse('a[19]=a', { arrayLimit: 20 }), { a: ['a'] }); - st.deepEqual(qs.parse('a[20]=a', { arrayLimit: 20 }), { a: { 20: 'a' } }); - - st.deepEqual(qs.parse('a[19]=a'), { a: ['a'] }); - st.deepEqual(qs.parse('a[20]=a'), { a: { 20: 'a' } }); - st.end(); - }); - - t.deepEqual(qs.parse('a[12b]=c'), { a: { '12b': 'c' } }, 'supports keys that begin with a number'); - - t.test('supports encoded = signs', function (st) { - st.deepEqual(qs.parse('he%3Dllo=th%3Dere'), { 'he=llo': 'th=ere' }); - st.end(); - }); - - t.test('is ok with url encoded strings', function (st) { - st.deepEqual(qs.parse('a[b%20c]=d'), { a: { 'b c': 'd' } }); - st.deepEqual(qs.parse('a[b]=c%20d'), { a: { b: 'c d' } }); - st.end(); - }); - - t.test('allows brackets in the value', function (st) { - st.deepEqual(qs.parse('pets=["tobi"]'), { pets: '["tobi"]' }); - st.deepEqual(qs.parse('operators=[">=", "<="]'), { operators: '[">=", "<="]' }); - st.end(); - }); - - t.test('allows empty values', function (st) { - st.deepEqual(qs.parse(''), {}); - st.deepEqual(qs.parse(null), {}); - st.deepEqual(qs.parse(undefined), {}); - st.end(); - }); - - t.test('transforms arrays to objects', function (st) { - st.deepEqual(qs.parse('foo[0]=bar&foo[bad]=baz'), { foo: { 0: 'bar', bad: 'baz' } }); - st.deepEqual(qs.parse('foo[bad]=baz&foo[0]=bar'), { foo: { bad: 'baz', 0: 'bar' } }); - st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar'), { foo: { bad: 'baz', 0: 'bar' } }); - st.deepEqual(qs.parse('foo[]=bar&foo[bad]=baz'), { foo: { 0: 'bar', bad: 'baz' } }); - st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar&foo[]=foo'), { foo: { bad: 'baz', 0: 'bar', 1: 'foo' } }); - st.deepEqual(qs.parse('foo[0][a]=a&foo[0][b]=b&foo[1][a]=aa&foo[1][b]=bb'), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] }); - - st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: false }), { a: { 0: 'b', t: 'u' } }); - st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: true }), { a: { 0: 'b', t: 'u', hasOwnProperty: 'c' } }); - st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: false }), { a: { 0: 'b', x: 'y' } }); - st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: true }), { a: { 0: 'b', hasOwnProperty: 'c', x: 'y' } }); - st.end(); - }); - - t.test('transforms arrays to objects (dot notation)', function (st) { - st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: 'baz' } }); - st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad.boo=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: { boo: 'baz' } } }); - st.deepEqual(qs.parse('foo[0][0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [[{ baz: 'bar' }]], fool: { bad: 'baz' } }); - st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15'], bar: '2' }] }); - st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].baz[1]=16&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15', '16'], bar: '2' }] }); - st.deepEqual(qs.parse('foo.bad=baz&foo[0]=bar', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar' } }); - st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar' } }); - st.deepEqual(qs.parse('foo[]=bar&foo.bad=baz', { allowDots: true }), { foo: { 0: 'bar', bad: 'baz' } }); - st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar&foo[]=foo', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar', 1: 'foo' } }); - st.deepEqual(qs.parse('foo[0].a=a&foo[0].b=b&foo[1].a=aa&foo[1].b=bb', { allowDots: true }), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] }); - st.end(); - }); - - t.test('correctly prunes undefined values when converting an array to an object', function (st) { - st.deepEqual(qs.parse('a[2]=b&a[99999999]=c'), { a: { 2: 'b', 99999999: 'c' } }); - st.end(); - }); - - t.test('supports malformed uri characters', function (st) { - st.deepEqual(qs.parse('{%:%}', { strictNullHandling: true }), { '{%:%}': null }); - st.deepEqual(qs.parse('{%:%}='), { '{%:%}': '' }); - st.deepEqual(qs.parse('foo=%:%}'), { foo: '%:%}' }); - st.end(); - }); - - t.test('doesn\'t produce empty keys', function (st) { - st.deepEqual(qs.parse('_r=1&'), { _r: '1' }); - st.end(); - }); - - t.test('cannot access Object prototype', function (st) { - qs.parse('constructor[prototype][bad]=bad'); - qs.parse('bad[constructor][prototype][bad]=bad'); - st.equal(typeof Object.prototype.bad, 'undefined'); - st.end(); - }); - - t.test('parses arrays of objects', function (st) { - st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] }); - st.deepEqual(qs.parse('a[0][b]=c'), { a: [{ b: 'c' }] }); - st.end(); - }); - - t.test('allows for empty strings in arrays', function (st) { - st.deepEqual(qs.parse('a[]=b&a[]=&a[]=c'), { a: ['b', '', 'c'] }); - - st.deepEqual( - qs.parse('a[0]=b&a[1]&a[2]=c&a[19]=', { strictNullHandling: true, arrayLimit: 20 }), - { a: ['b', null, 'c', ''] }, - 'with arrayLimit 20 + array indices: null then empty string works' - ); - st.deepEqual( - qs.parse('a[]=b&a[]&a[]=c&a[]=', { strictNullHandling: true, arrayLimit: 0 }), - { a: { 0: 'b', 1: null, 2: 'c', 3: '' } }, - 'with arrayLimit 0 + array brackets: null then empty string works' - ); - - st.deepEqual( - qs.parse('a[0]=b&a[1]=&a[2]=c&a[19]', { strictNullHandling: true, arrayLimit: 20 }), - { a: ['b', '', 'c', null] }, - 'with arrayLimit 20 + array indices: empty string then null works' - ); - st.deepEqual( - qs.parse('a[]=b&a[]=&a[]=c&a[]', { strictNullHandling: true, arrayLimit: 0 }), - { a: { 0: 'b', 1: '', 2: 'c', 3: null } }, - 'with arrayLimit 0 + array brackets: empty string then null works' - ); - - st.deepEqual( - qs.parse('a[]=&a[]=b&a[]=c'), - { a: ['', 'b', 'c'] }, - 'array brackets: empty strings work' - ); - st.end(); - }); - - t.test('compacts sparse arrays', function (st) { - st.deepEqual(qs.parse('a[10]=1&a[2]=2', { arrayLimit: 20 }), { a: ['2', '1'] }); - st.deepEqual(qs.parse('a[1][b][2][c]=1', { arrayLimit: 20 }), { a: [{ b: [{ c: '1' }] }] }); - st.deepEqual(qs.parse('a[1][2][3][c]=1', { arrayLimit: 20 }), { a: [[[{ c: '1' }]]] }); - st.deepEqual(qs.parse('a[1][2][3][c][1]=1', { arrayLimit: 20 }), { a: [[[{ c: ['1'] }]]] }); - st.end(); - }); - - t.test('parses sparse arrays', function (st) { - /* eslint no-sparse-arrays: 0 */ - st.deepEqual(qs.parse('a[4]=1&a[1]=2', { allowSparse: true }), { a: [, '2', , , '1'] }); - st.deepEqual(qs.parse('a[1][b][2][c]=1', { allowSparse: true }), { a: [, { b: [, , { c: '1' }] }] }); - st.deepEqual(qs.parse('a[1][2][3][c]=1', { allowSparse: true }), { a: [, [, , [, , , { c: '1' }]]] }); - st.deepEqual(qs.parse('a[1][2][3][c][1]=1', { allowSparse: true }), { a: [, [, , [, , , { c: [, '1'] }]]] }); - st.end(); - }); - - t.test('parses semi-parsed strings', function (st) { - st.deepEqual(qs.parse({ 'a[b]': 'c' }), { a: { b: 'c' } }); - st.deepEqual(qs.parse({ 'a[b]': 'c', 'a[d]': 'e' }), { a: { b: 'c', d: 'e' } }); - st.end(); - }); - - t.test('parses buffers correctly', function (st) { - var b = SaferBuffer.from('test'); - st.deepEqual(qs.parse({ a: b }), { a: b }); - st.end(); - }); - - t.test('parses jquery-param strings', function (st) { - // readable = 'filter[0][]=int1&filter[0][]==&filter[0][]=77&filter[]=and&filter[2][]=int2&filter[2][]==&filter[2][]=8' - var encoded = 'filter%5B0%5D%5B%5D=int1&filter%5B0%5D%5B%5D=%3D&filter%5B0%5D%5B%5D=77&filter%5B%5D=and&filter%5B2%5D%5B%5D=int2&filter%5B2%5D%5B%5D=%3D&filter%5B2%5D%5B%5D=8'; - var expected = { filter: [['int1', '=', '77'], 'and', ['int2', '=', '8']] }; - st.deepEqual(qs.parse(encoded), expected); - st.end(); - }); - - t.test('continues parsing when no parent is found', function (st) { - st.deepEqual(qs.parse('[]=&a=b'), { 0: '', a: 'b' }); - st.deepEqual(qs.parse('[]&a=b', { strictNullHandling: true }), { 0: null, a: 'b' }); - st.deepEqual(qs.parse('[foo]=bar'), { foo: 'bar' }); - st.end(); - }); - - t.test('does not error when parsing a very long array', function (st) { - var str = 'a[]=a'; - while (Buffer.byteLength(str) < 128 * 1024) { - str = str + '&' + str; - } - - st.doesNotThrow(function () { - qs.parse(str); - }); - - st.end(); - }); - - t.test('does not throw when a native prototype has an enumerable property', function (st) { - st.intercept(Object.prototype, 'crash', { value: '' }); - st.intercept(Array.prototype, 'crash', { value: '' }); - - st.doesNotThrow(qs.parse.bind(null, 'a=b')); - st.deepEqual(qs.parse('a=b'), { a: 'b' }); - st.doesNotThrow(qs.parse.bind(null, 'a[][b]=c')); - st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] }); - - st.end(); - }); - - t.test('parses a string with an alternative string delimiter', function (st) { - st.deepEqual(qs.parse('a=b;c=d', { delimiter: ';' }), { a: 'b', c: 'd' }); - st.end(); - }); - - t.test('parses a string with an alternative RegExp delimiter', function (st) { - st.deepEqual(qs.parse('a=b; c=d', { delimiter: /[;,] */ }), { a: 'b', c: 'd' }); - st.end(); - }); - - t.test('does not use non-splittable objects as delimiters', function (st) { - st.deepEqual(qs.parse('a=b&c=d', { delimiter: true }), { a: 'b', c: 'd' }); - st.end(); - }); - - t.test('allows overriding parameter limit', function (st) { - st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: 1 }), { a: 'b' }); - st.end(); - }); - - t.test('allows setting the parameter limit to Infinity', function (st) { - st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: Infinity }), { a: 'b', c: 'd' }); - st.end(); - }); - - t.test('allows overriding array limit', function (st) { - st.deepEqual(qs.parse('a[0]=b', { arrayLimit: -1 }), { a: { 0: 'b' } }); - st.deepEqual(qs.parse('a[0]=b', { arrayLimit: 0 }), { a: { 0: 'b' } }); - - st.deepEqual(qs.parse('a[-1]=b', { arrayLimit: -1 }), { a: { '-1': 'b' } }); - st.deepEqual(qs.parse('a[-1]=b', { arrayLimit: 0 }), { a: { '-1': 'b' } }); - - st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayLimit: -1 }), { a: { 0: 'b', 1: 'c' } }); - st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 }), { a: { 0: 'b', 1: 'c' } }); - - st.end(); - }); - - t.test('allows disabling array parsing', function (st) { - var indices = qs.parse('a[0]=b&a[1]=c', { parseArrays: false }); - st.deepEqual(indices, { a: { 0: 'b', 1: 'c' } }); - st.equal(Array.isArray(indices.a), false, 'parseArrays:false, indices case is not an array'); - - var emptyBrackets = qs.parse('a[]=b', { parseArrays: false }); - st.deepEqual(emptyBrackets, { a: { 0: 'b' } }); - st.equal(Array.isArray(emptyBrackets.a), false, 'parseArrays:false, empty brackets case is not an array'); - - st.end(); - }); - - t.test('allows for query string prefix', function (st) { - st.deepEqual(qs.parse('?foo=bar', { ignoreQueryPrefix: true }), { foo: 'bar' }); - st.deepEqual(qs.parse('foo=bar', { ignoreQueryPrefix: true }), { foo: 'bar' }); - st.deepEqual(qs.parse('?foo=bar', { ignoreQueryPrefix: false }), { '?foo': 'bar' }); - - st.end(); - }); - - t.test('parses an object', function (st) { - var input = { - 'user[name]': { 'pop[bob]': 3 }, - 'user[email]': null - }; - - var expected = { - user: { - name: { 'pop[bob]': 3 }, - email: null - } - }; - - var result = qs.parse(input); - - st.deepEqual(result, expected); - st.end(); - }); - - t.test('parses string with comma as array divider', function (st) { - st.deepEqual(qs.parse('foo=bar,tee', { comma: true }), { foo: ['bar', 'tee'] }); - st.deepEqual(qs.parse('foo[bar]=coffee,tee', { comma: true }), { foo: { bar: ['coffee', 'tee'] } }); - st.deepEqual(qs.parse('foo=', { comma: true }), { foo: '' }); - st.deepEqual(qs.parse('foo', { comma: true }), { foo: '' }); - st.deepEqual(qs.parse('foo', { comma: true, strictNullHandling: true }), { foo: null }); - - // test cases inversed from from stringify tests - st.deepEqual(qs.parse('a[0]=c'), { a: ['c'] }); - st.deepEqual(qs.parse('a[]=c'), { a: ['c'] }); - st.deepEqual(qs.parse('a[]=c', { comma: true }), { a: ['c'] }); - - st.deepEqual(qs.parse('a[0]=c&a[1]=d'), { a: ['c', 'd'] }); - st.deepEqual(qs.parse('a[]=c&a[]=d'), { a: ['c', 'd'] }); - st.deepEqual(qs.parse('a=c,d', { comma: true }), { a: ['c', 'd'] }); - - st.end(); - }); - - t.test('parses values with comma as array divider', function (st) { - st.deepEqual(qs.parse({ foo: 'bar,tee' }, { comma: false }), { foo: 'bar,tee' }); - st.deepEqual(qs.parse({ foo: 'bar,tee' }, { comma: true }), { foo: ['bar', 'tee'] }); - st.end(); - }); - - t.test('use number decoder, parses string that has one number with comma option enabled', function (st) { - var decoder = function (str, defaultDecoder, charset, type) { - if (!isNaN(Number(str))) { - return parseFloat(str); - } - return defaultDecoder(str, defaultDecoder, charset, type); - }; - - st.deepEqual(qs.parse('foo=1', { comma: true, decoder: decoder }), { foo: 1 }); - st.deepEqual(qs.parse('foo=0', { comma: true, decoder: decoder }), { foo: 0 }); - - st.end(); - }); - - t.test('parses brackets holds array of arrays when having two parts of strings with comma as array divider', function (st) { - st.deepEqual(qs.parse('foo[]=1,2,3&foo[]=4,5,6', { comma: true }), { foo: [['1', '2', '3'], ['4', '5', '6']] }); - st.deepEqual(qs.parse('foo[]=1,2,3&foo[]=', { comma: true }), { foo: [['1', '2', '3'], ''] }); - st.deepEqual(qs.parse('foo[]=1,2,3&foo[]=,', { comma: true }), { foo: [['1', '2', '3'], ['', '']] }); - st.deepEqual(qs.parse('foo[]=1,2,3&foo[]=a', { comma: true }), { foo: [['1', '2', '3'], 'a'] }); - - st.end(); - }); - - t.test('parses url-encoded brackets holds array of arrays when having two parts of strings with comma as array divider', function (st) { - st.deepEqual(qs.parse('foo%5B%5D=1,2,3&foo%5B%5D=4,5,6', { comma: true }), { foo: [['1', '2', '3'], ['4', '5', '6']] }); - st.deepEqual(qs.parse('foo%5B%5D=1,2,3&foo%5B%5D=', { comma: true }), { foo: [['1', '2', '3'], ''] }); - st.deepEqual(qs.parse('foo%5B%5D=1,2,3&foo%5B%5D=,', { comma: true }), { foo: [['1', '2', '3'], ['', '']] }); - st.deepEqual(qs.parse('foo%5B%5D=1,2,3&foo%5B%5D=a', { comma: true }), { foo: [['1', '2', '3'], 'a'] }); - - st.end(); - }); - - t.test('parses comma delimited array while having percent-encoded comma treated as normal text', function (st) { - st.deepEqual(qs.parse('foo=a%2Cb', { comma: true }), { foo: 'a,b' }); - st.deepEqual(qs.parse('foo=a%2C%20b,d', { comma: true }), { foo: ['a, b', 'd'] }); - st.deepEqual(qs.parse('foo=a%2C%20b,c%2C%20d', { comma: true }), { foo: ['a, b', 'c, d'] }); - - st.end(); - }); - - t.test('parses an object in dot notation', function (st) { - var input = { - 'user.name': { 'pop[bob]': 3 }, - 'user.email.': null - }; - - var expected = { - user: { - name: { 'pop[bob]': 3 }, - email: null - } - }; - - var result = qs.parse(input, { allowDots: true }); - - st.deepEqual(result, expected); - st.end(); - }); - - t.test('parses an object and not child values', function (st) { - var input = { - 'user[name]': { 'pop[bob]': { test: 3 } }, - 'user[email]': null - }; - - var expected = { - user: { - name: { 'pop[bob]': { test: 3 } }, - email: null - } - }; - - var result = qs.parse(input); - - st.deepEqual(result, expected); - st.end(); - }); - - t.test('does not blow up when Buffer global is missing', function (st) { - var restore = mockProperty(global, 'Buffer', { 'delete': true }); - - var result = qs.parse('a=b&c=d'); - - restore(); - - st.deepEqual(result, { a: 'b', c: 'd' }); - st.end(); - }); - - t.test('does not crash when parsing circular references', function (st) { - var a = {}; - a.b = a; - - var parsed; - - st.doesNotThrow(function () { - parsed = qs.parse({ 'foo[bar]': 'baz', 'foo[baz]': a }); - }); - - st.equal('foo' in parsed, true, 'parsed has "foo" property'); - st.equal('bar' in parsed.foo, true); - st.equal('baz' in parsed.foo, true); - st.equal(parsed.foo.bar, 'baz'); - st.deepEqual(parsed.foo.baz, a); - st.end(); - }); - - t.test('does not crash when parsing deep objects', function (st) { - var parsed; - var str = 'foo'; - - for (var i = 0; i < 5000; i++) { - str += '[p]'; - } - - str += '=bar'; - - st.doesNotThrow(function () { - parsed = qs.parse(str, { depth: 5000 }); - }); - - st.equal('foo' in parsed, true, 'parsed has "foo" property'); - - var depth = 0; - var ref = parsed.foo; - while ((ref = ref.p)) { - depth += 1; - } - - st.equal(depth, 5000, 'parsed is 5000 properties deep'); - - st.end(); - }); - - t.test('parses null objects correctly', { skip: !hasProto }, function (st) { - var a = { __proto__: null, b: 'c' }; - - st.deepEqual(qs.parse(a), { b: 'c' }); - var result = qs.parse({ a: a }); - st.equal('a' in result, true, 'result has "a" property'); - st.deepEqual(result.a, a); - st.end(); - }); - - t.test('parses dates correctly', function (st) { - var now = new Date(); - st.deepEqual(qs.parse({ a: now }), { a: now }); - st.end(); - }); - - t.test('parses regular expressions correctly', function (st) { - var re = /^test$/; - st.deepEqual(qs.parse({ a: re }), { a: re }); - st.end(); - }); - - t.test('does not allow overwriting prototype properties', function (st) { - st.deepEqual(qs.parse('a[hasOwnProperty]=b', { allowPrototypes: false }), {}); - st.deepEqual(qs.parse('hasOwnProperty=b', { allowPrototypes: false }), {}); - - st.deepEqual( - qs.parse('toString', { allowPrototypes: false }), - {}, - 'bare "toString" results in {}' - ); - - st.end(); - }); - - t.test('can allow overwriting prototype properties', function (st) { - st.deepEqual(qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }), { a: { hasOwnProperty: 'b' } }); - st.deepEqual(qs.parse('hasOwnProperty=b', { allowPrototypes: true }), { hasOwnProperty: 'b' }); - - st.deepEqual( - qs.parse('toString', { allowPrototypes: true }), - { toString: '' }, - 'bare "toString" results in { toString: "" }' - ); - - st.end(); - }); - - t.test('does not crash when the global Object prototype is frozen', { skip: !hasPropertyDescriptors || !hasOverrideMistake }, function (st) { - // We can't actually freeze the global Object prototype as that will interfere with other tests, and once an object is frozen, it - // can't be unfrozen. Instead, we add a new non-writable property to simulate this. - st.teardown(mockProperty(Object.prototype, 'frozenProp', { value: 'foo', nonWritable: true, nonEnumerable: true })); - - st['throws']( - function () { - var obj = {}; - obj.frozenProp = 'bar'; - }, - // node < 6 has a different error message - /^TypeError: Cannot assign to read only property 'frozenProp' of (?:object '#'|#)/, - 'regular assignment of an inherited non-writable property throws' - ); - - var parsed; - st.doesNotThrow( - function () { - parsed = qs.parse('frozenProp', { allowPrototypes: false }); - }, - 'parsing a nonwritable Object.prototype property does not throw' - ); - - st.deepEqual(parsed, {}, 'bare "frozenProp" results in {}'); - - st.end(); - }); - - t.test('params starting with a closing bracket', function (st) { - st.deepEqual(qs.parse(']=toString'), { ']': 'toString' }); - st.deepEqual(qs.parse(']]=toString'), { ']]': 'toString' }); - st.deepEqual(qs.parse(']hello]=toString'), { ']hello]': 'toString' }); - st.end(); - }); - - t.test('params starting with a starting bracket', function (st) { - st.deepEqual(qs.parse('[=toString'), { '[': 'toString' }); - st.deepEqual(qs.parse('[[=toString'), { '[[': 'toString' }); - st.deepEqual(qs.parse('[hello[=toString'), { '[hello[': 'toString' }); - st.end(); - }); - - t.test('add keys to objects', function (st) { - st.deepEqual( - qs.parse('a[b]=c&a=d'), - { a: { b: 'c', d: true } }, - 'can add keys to objects' - ); - - st.deepEqual( - qs.parse('a[b]=c&a=toString'), - { a: { b: 'c' } }, - 'can not overwrite prototype' - ); - - st.deepEqual( - qs.parse('a[b]=c&a=toString', { allowPrototypes: true }), - { a: { b: 'c', toString: true } }, - 'can overwrite prototype with allowPrototypes true' - ); - - st.deepEqual( - qs.parse('a[b]=c&a=toString', { plainObjects: true }), - { __proto__: null, a: { __proto__: null, b: 'c', toString: true } }, - 'can overwrite prototype with plainObjects true' - ); - - st.end(); - }); - - t.test('dunder proto is ignored', function (st) { - var payload = 'categories[__proto__]=login&categories[__proto__]&categories[length]=42'; - var result = qs.parse(payload, { allowPrototypes: true }); - - st.deepEqual( - result, - { - categories: { - length: '42' - } - }, - 'silent [[Prototype]] payload' - ); - - var plainResult = qs.parse(payload, { allowPrototypes: true, plainObjects: true }); - - st.deepEqual( - plainResult, - { - __proto__: null, - categories: { - __proto__: null, - length: '42' - } - }, - 'silent [[Prototype]] payload: plain objects' - ); - - var query = qs.parse('categories[__proto__]=cats&categories[__proto__]=dogs&categories[some][json]=toInject', { allowPrototypes: true }); - - st.notOk(Array.isArray(query.categories), 'is not an array'); - st.notOk(query.categories instanceof Array, 'is not instanceof an array'); - st.deepEqual(query.categories, { some: { json: 'toInject' } }); - st.equal(JSON.stringify(query.categories), '{"some":{"json":"toInject"}}', 'stringifies as a non-array'); - - st.deepEqual( - qs.parse('foo[__proto__][hidden]=value&foo[bar]=stuffs', { allowPrototypes: true }), - { - foo: { - bar: 'stuffs' - } - }, - 'hidden values' - ); - - st.deepEqual( - qs.parse('foo[__proto__][hidden]=value&foo[bar]=stuffs', { allowPrototypes: true, plainObjects: true }), - { - __proto__: null, - foo: { - __proto__: null, - bar: 'stuffs' - } - }, - 'hidden values: plain objects' - ); - - st.end(); - }); - - t.test('can return null objects', { skip: !hasProto }, function (st) { - var expected = { - __proto__: null, - a: { - __proto__: null, - b: 'c', - hasOwnProperty: 'd' - } - }; - st.deepEqual(qs.parse('a[b]=c&a[hasOwnProperty]=d', { plainObjects: true }), expected); - st.deepEqual(qs.parse(null, { plainObjects: true }), { __proto__: null }); - var expectedArray = { - __proto__: null, - a: { - __proto__: null, - 0: 'b', - c: 'd' - } - }; - st.deepEqual(qs.parse('a[]=b&a[c]=d', { plainObjects: true }), expectedArray); - st.end(); - }); - - t.test('can parse with custom encoding', function (st) { - st.deepEqual(qs.parse('%8c%a7=%91%e5%8d%e3%95%7b', { - decoder: function (str) { - var reg = /%([0-9A-F]{2})/ig; - var result = []; - var parts = reg.exec(str); - while (parts) { - result.push(parseInt(parts[1], 16)); - parts = reg.exec(str); - } - return String(iconv.decode(SaferBuffer.from(result), 'shift_jis')); - } - }), { 県: '大阪府' }); - st.end(); - }); - - t.test('receives the default decoder as a second argument', function (st) { - st.plan(1); - qs.parse('a', { - decoder: function (str, defaultDecoder) { - st.equal(defaultDecoder, utils.decode); - } - }); - st.end(); - }); - - t.test('throws error with wrong decoder', function (st) { - st['throws'](function () { - qs.parse({}, { decoder: 'string' }); - }, new TypeError('Decoder has to be a function.')); - st.end(); - }); - - t.test('does not mutate the options argument', function (st) { - var options = {}; - qs.parse('a[b]=true', options); - st.deepEqual(options, {}); - st.end(); - }); - - t.test('throws if an invalid charset is specified', function (st) { - st['throws'](function () { - qs.parse('a=b', { charset: 'foobar' }); - }, new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined')); - st.end(); - }); - - t.test('parses an iso-8859-1 string if asked to', function (st) { - st.deepEqual(qs.parse('%A2=%BD', { charset: 'iso-8859-1' }), { '¢': '½' }); - st.end(); - }); - - var urlEncodedCheckmarkInUtf8 = '%E2%9C%93'; - var urlEncodedOSlashInUtf8 = '%C3%B8'; - var urlEncodedNumCheckmark = '%26%2310003%3B'; - var urlEncodedNumSmiley = '%26%239786%3B'; - - t.test('prefers an utf-8 charset specified by the utf8 sentinel to a default charset of iso-8859-1', function (st) { - st.deepEqual(qs.parse('utf8=' + urlEncodedCheckmarkInUtf8 + '&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true, charset: 'iso-8859-1' }), { ø: 'ø' }); - st.end(); - }); - - t.test('prefers an iso-8859-1 charset specified by the utf8 sentinel to a default charset of utf-8', function (st) { - st.deepEqual(qs.parse('utf8=' + urlEncodedNumCheckmark + '&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true, charset: 'utf-8' }), { 'ø': 'ø' }); - st.end(); - }); - - t.test('does not require the utf8 sentinel to be defined before the parameters whose decoding it affects', function (st) { - st.deepEqual(qs.parse('a=' + urlEncodedOSlashInUtf8 + '&utf8=' + urlEncodedNumCheckmark, { charsetSentinel: true, charset: 'utf-8' }), { a: 'ø' }); - st.end(); - }); - - t.test('ignores an utf8 sentinel with an unknown value', function (st) { - st.deepEqual(qs.parse('utf8=foo&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true, charset: 'utf-8' }), { ø: 'ø' }); - st.end(); - }); - - t.test('uses the utf8 sentinel to switch to utf-8 when no default charset is given', function (st) { - st.deepEqual(qs.parse('utf8=' + urlEncodedCheckmarkInUtf8 + '&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true }), { ø: 'ø' }); - st.end(); - }); - - t.test('uses the utf8 sentinel to switch to iso-8859-1 when no default charset is given', function (st) { - st.deepEqual(qs.parse('utf8=' + urlEncodedNumCheckmark + '&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true }), { 'ø': 'ø' }); - st.end(); - }); - - t.test('interprets numeric entities in iso-8859-1 when `interpretNumericEntities`', function (st) { - st.deepEqual(qs.parse('foo=' + urlEncodedNumSmiley, { charset: 'iso-8859-1', interpretNumericEntities: true }), { foo: '☺' }); - st.end(); - }); - - t.test('handles a custom decoder returning `null`, in the `iso-8859-1` charset, when `interpretNumericEntities`', function (st) { - st.deepEqual(qs.parse('foo=&bar=' + urlEncodedNumSmiley, { - charset: 'iso-8859-1', - decoder: function (str, defaultDecoder, charset) { - return str ? defaultDecoder(str, defaultDecoder, charset) : null; - }, - interpretNumericEntities: true - }), { foo: null, bar: '☺' }); - st.end(); - }); - - t.test('handles a custom decoder returning `null`, with a string key of `null`', function (st) { - st.deepEqual( - qs.parse('null=1&ToNull=2', { - decoder: function (str, defaultDecoder, charset) { - return str === 'ToNull' ? null : defaultDecoder(str, defaultDecoder, charset); - } - }), - { 'null': '1' }, - '"null" key is not overridden by `null` decoder result' - ); - - st.end(); - }); - - t.test('does not interpret numeric entities in iso-8859-1 when `interpretNumericEntities` is absent', function (st) { - st.deepEqual(qs.parse('foo=' + urlEncodedNumSmiley, { charset: 'iso-8859-1' }), { foo: '☺' }); - st.end(); - }); - - t.test('does not interpret numeric entities when the charset is utf-8, even when `interpretNumericEntities`', function (st) { - st.deepEqual(qs.parse('foo=' + urlEncodedNumSmiley, { charset: 'utf-8', interpretNumericEntities: true }), { foo: '☺' }); - st.end(); - }); - - t.test('interpretNumericEntities with comma:true and iso charset does not crash', function (st) { - st.deepEqual( - qs.parse('b&a[]=1,' + urlEncodedNumSmiley, { comma: true, charset: 'iso-8859-1', interpretNumericEntities: true }), - { b: '', a: ['1,☺'] } - ); - - st.end(); - }); - - t.test('does not interpret %uXXXX syntax in iso-8859-1 mode', function (st) { - st.deepEqual(qs.parse('%u263A=%u263A', { charset: 'iso-8859-1' }), { '%u263A': '%u263A' }); - st.end(); - }); - - t.test('allows for decoding keys and values differently', function (st) { - var decoder = function (str, defaultDecoder, charset, type) { - if (type === 'key') { - return defaultDecoder(str, defaultDecoder, charset, type).toLowerCase(); - } - if (type === 'value') { - return defaultDecoder(str, defaultDecoder, charset, type).toUpperCase(); - } - throw 'this should never happen! type: ' + type; - }; - - st.deepEqual(qs.parse('KeY=vAlUe', { decoder: decoder }), { key: 'VALUE' }); - st.end(); - }); - - t.test('parameter limit tests', function (st) { - st.test('does not throw error when within parameter limit', function (sst) { - var result = qs.parse('a=1&b=2&c=3', { parameterLimit: 5, throwOnLimitExceeded: true }); - sst.deepEqual(result, { a: '1', b: '2', c: '3' }, 'parses without errors'); - sst.end(); - }); - - st.test('throws error when throwOnLimitExceeded is present but not boolean', function (sst) { - sst['throws']( - function () { - qs.parse('a=1&b=2&c=3&d=4&e=5&f=6', { parameterLimit: 3, throwOnLimitExceeded: 'true' }); - }, - new TypeError('`throwOnLimitExceeded` option must be a boolean'), - 'throws error when throwOnLimitExceeded is present and not boolean' - ); - sst.end(); - }); - - st.test('throws error when parameter limit exceeded', function (sst) { - sst['throws']( - function () { - qs.parse('a=1&b=2&c=3&d=4&e=5&f=6', { parameterLimit: 3, throwOnLimitExceeded: true }); - }, - new RangeError('Parameter limit exceeded. Only 3 parameters allowed.'), - 'throws error when parameter limit is exceeded' - ); - sst.end(); - }); - - st.test('silently truncates when throwOnLimitExceeded is not given', function (sst) { - var result = qs.parse('a=1&b=2&c=3&d=4&e=5', { parameterLimit: 3 }); - sst.deepEqual(result, { a: '1', b: '2', c: '3' }, 'parses and truncates silently'); - sst.end(); - }); - - st.test('silently truncates when parameter limit exceeded without error', function (sst) { - var result = qs.parse('a=1&b=2&c=3&d=4&e=5', { parameterLimit: 3, throwOnLimitExceeded: false }); - sst.deepEqual(result, { a: '1', b: '2', c: '3' }, 'parses and truncates silently'); - sst.end(); - }); - - st.test('allows unlimited parameters when parameterLimit set to Infinity', function (sst) { - var result = qs.parse('a=1&b=2&c=3&d=4&e=5&f=6', { parameterLimit: Infinity }); - sst.deepEqual(result, { a: '1', b: '2', c: '3', d: '4', e: '5', f: '6' }, 'parses all parameters without truncation'); - sst.end(); - }); - - st.end(); - }); - - t.test('array limit tests', function (st) { - st.test('does not throw error when array is within limit', function (sst) { - var result = qs.parse('a[]=1&a[]=2&a[]=3', { arrayLimit: 5, throwOnLimitExceeded: true }); - sst.deepEqual(result, { a: ['1', '2', '3'] }, 'parses array without errors'); - sst.end(); - }); - - st.test('throws error when throwOnLimitExceeded is present but not boolean for array limit', function (sst) { - sst['throws']( - function () { - qs.parse('a[]=1&a[]=2&a[]=3&a[]=4', { arrayLimit: 3, throwOnLimitExceeded: 'true' }); - }, - new TypeError('`throwOnLimitExceeded` option must be a boolean'), - 'throws error when throwOnLimitExceeded is present and not boolean for array limit' - ); - sst.end(); - }); - - st.test('throws error when array limit exceeded', function (sst) { - // 4 elements exceeds limit of 3 - sst['throws']( - function () { - qs.parse('a[]=1&a[]=2&a[]=3&a[]=4', { arrayLimit: 3, throwOnLimitExceeded: true }); - }, - new RangeError('Array limit exceeded. Only 3 elements allowed in an array.'), - 'throws error when array limit is exceeded' - ); - sst.end(); - }); - - st.test('does not throw when at limit', function (sst) { - // 3 elements = limit of 3, should not throw - var result = qs.parse('a[]=1&a[]=2&a[]=3', { arrayLimit: 3, throwOnLimitExceeded: true }); - sst.ok(Array.isArray(result.a), 'result is an array'); - sst.deepEqual(result.a, ['1', '2', '3'], 'all values present'); - sst.end(); - }); - - st.test('converts array to object if length is greater than limit', function (sst) { - var result = qs.parse('a[1]=1&a[2]=2&a[3]=3&a[4]=4&a[5]=5&a[6]=6', { arrayLimit: 5 }); - - sst.deepEqual(result, { a: { 1: '1', 2: '2', 3: '3', 4: '4', 5: '5', 6: '6' } }, 'parses into object if array length is greater than limit'); - sst.end(); - }); - - st.test('throws error when indexed notation exceeds arrayLimit with throwOnLimitExceeded', function (sst) { - sst['throws']( - function () { - qs.parse('a[1001]=b', { arrayLimit: 1000, throwOnLimitExceeded: true }); - }, - new RangeError('Array limit exceeded. Only 1000 elements allowed in an array.'), - 'throws error for a single index exceeding arrayLimit' - ); - - sst['throws']( - function () { - qs.parse('a[0]=1&a[1]=2&a[2]=3&a[10]=4', { arrayLimit: 6, throwOnLimitExceeded: true, allowSparse: true }); - }, - new RangeError('Array limit exceeded. Only 6 elements allowed in an array.'), - 'throws error when a sparse index exceeds arrayLimit' - ); - - sst.end(); - }); - - st.test('does not throw for indexed notation within arrayLimit with throwOnLimitExceeded', function (sst) { - var result = qs.parse('a[4]=b', { arrayLimit: 5, throwOnLimitExceeded: true, allowSparse: true }); - sst.ok(Array.isArray(result.a), 'result is an array'); - sst.equal(result.a.length, 5, 'array has correct length'); - sst.equal(result.a[4], 'b', 'value at index 4 is correct'); - sst.end(); - }); - - st.test('silently converts to object for indexed notation exceeding arrayLimit without throwOnLimitExceeded', function (sst) { - var result = qs.parse('a[1001]=b', { arrayLimit: 1000 }); - sst.deepEqual(result, { a: { 1001: 'b' } }, 'converts to object without throwing'); - sst.end(); - }); - - st.end(); - }); - - t.end(); -}); - -test('parses empty keys', function (t) { - emptyTestCases.forEach(function (testCase) { - t.test('skips empty string key with ' + testCase.input, function (st) { - st.deepEqual(qs.parse(testCase.input), testCase.noEmptyKeys); - - st.end(); - }); - }); -}); - -test('`duplicates` option', function (t) { - v.nonStrings.concat('not a valid option').forEach(function (invalidOption) { - if (typeof invalidOption !== 'undefined') { - t['throws']( - function () { qs.parse('', { duplicates: invalidOption }); }, - TypeError, - 'throws on invalid option: ' + inspect(invalidOption) - ); - } - }); - - t.deepEqual( - qs.parse('foo=bar&foo=baz'), - { foo: ['bar', 'baz'] }, - 'duplicates: default, combine' - ); - - t.deepEqual( - qs.parse('foo=bar&foo=baz', { duplicates: 'combine' }), - { foo: ['bar', 'baz'] }, - 'duplicates: combine' - ); - - t.deepEqual( - qs.parse('foo=bar&foo=baz', { duplicates: 'first' }), - { foo: 'bar' }, - 'duplicates: first' - ); - - t.deepEqual( - qs.parse('foo=bar&foo=baz', { duplicates: 'last' }), - { foo: 'baz' }, - 'duplicates: last' - ); - - t.end(); -}); - -test('qs strictDepth option - throw cases', function (t) { - t.test('throws an exception when depth exceeds the limit with strictDepth: true', function (st) { - st['throws']( - function () { - qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1, strictDepth: true }); - }, - RangeError, - 'throws RangeError' - ); - st.end(); - }); - - t.test('throws an exception for multiple nested arrays with strictDepth: true', function (st) { - st['throws']( - function () { - qs.parse('a[0][1][2][3][4]=b', { depth: 3, strictDepth: true }); - }, - RangeError, - 'throws RangeError' - ); - st.end(); - }); - - t.test('throws an exception for nested objects and arrays with strictDepth: true', function (st) { - st['throws']( - function () { - qs.parse('a[b][c][0][d][e]=f', { depth: 3, strictDepth: true }); - }, - RangeError, - 'throws RangeError' - ); - st.end(); - }); - - t.test('throws an exception for different types of values with strictDepth: true', function (st) { - st['throws']( - function () { - qs.parse('a[b][c][d][e]=true&a[b][c][d][f]=42', { depth: 3, strictDepth: true }); - }, - RangeError, - 'throws RangeError' - ); - st.end(); - }); - -}); - -test('qs strictDepth option - non-throw cases', function (t) { - t.test('when depth is 0 and strictDepth true, do not throw', function (st) { - st.doesNotThrow( - function () { - qs.parse('a[b][c][d][e]=true&a[b][c][d][f]=42', { depth: 0, strictDepth: true }); - }, - RangeError, - 'does not throw RangeError' - ); - st.end(); - }); - - t.test('parses successfully when depth is within the limit with strictDepth: true', function (st) { - st.doesNotThrow( - function () { - var result = qs.parse('a[b]=c', { depth: 1, strictDepth: true }); - st.deepEqual(result, { a: { b: 'c' } }, 'parses correctly'); - } - ); - st.end(); - }); - - t.test('does not throw an exception when depth exceeds the limit with strictDepth: false', function (st) { - st.doesNotThrow( - function () { - var result = qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 }); - st.deepEqual(result, { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } }, 'parses with depth limit'); - } - ); - st.end(); - }); - - t.test('parses successfully when depth is within the limit with strictDepth: false', function (st) { - st.doesNotThrow( - function () { - var result = qs.parse('a[b]=c', { depth: 1 }); - st.deepEqual(result, { a: { b: 'c' } }, 'parses correctly'); - } - ); - st.end(); - }); - - t.test('does not throw when depth is exactly at the limit with strictDepth: true', function (st) { - st.doesNotThrow( - function () { - var result = qs.parse('a[b][c]=d', { depth: 2, strictDepth: true }); - st.deepEqual(result, { a: { b: { c: 'd' } } }, 'parses correctly'); - } - ); - st.end(); - }); -}); - -test('DOS', function (t) { - var arr = []; - for (var i = 0; i < 105; i++) { - arr[arr.length] = 'x'; - } - var attack = 'a[]=' + arr.join('&a[]='); - var result = qs.parse(attack, { arrayLimit: 100 }); - - t.notOk(Array.isArray(result.a), 'arrayLimit is respected: result is an object, not an array'); - t.equal(Object.keys(result.a).length, 105, 'all values are preserved'); - - t.end(); -}); - -test('arrayLimit boundary conditions', function (t) { - // arrayLimit is the max number of elements allowed in an array - t.test('exactly at the limit stays as array', function (st) { - // 3 elements = limit of 3 - var result = qs.parse('a[]=1&a[]=2&a[]=3', { arrayLimit: 3 }); - st.ok(Array.isArray(result.a), 'result is an array when count equals limit'); - st.deepEqual(result.a, ['1', '2', '3'], 'all values present'); - st.end(); - }); - - t.test('one over the limit converts to object', function (st) { - // 4 elements exceeds limit of 3 - var result = qs.parse('a[]=1&a[]=2&a[]=3&a[]=4', { arrayLimit: 3 }); - st.notOk(Array.isArray(result.a), 'result is not an array when over limit'); - st.deepEqual(result.a, { 0: '1', 1: '2', 2: '3', 3: '4' }, 'all values preserved as object'); - st.end(); - }); - - t.test('arrayLimit 1 with one value', function (st) { - // 1 element = limit of 1 - var result = qs.parse('a[]=1', { arrayLimit: 1 }); - st.ok(Array.isArray(result.a), 'result is an array when count equals limit'); - st.deepEqual(result.a, ['1'], 'value preserved as array'); - st.end(); - }); - - t.test('arrayLimit 1 with two values converts to object', function (st) { - // 2 elements exceeds limit of 1 - var result = qs.parse('a[]=1&a[]=2', { arrayLimit: 1 }); - st.notOk(Array.isArray(result.a), 'result is not an array'); - st.deepEqual(result.a, { 0: '1', 1: '2' }, 'all values preserved as object'); - st.end(); - }); - - t.end(); -}); - -test('comma + arrayLimit', function (t) { - t.test('comma-separated values within arrayLimit stay as array', function (st) { - var result = qs.parse('a=1,2,3', { comma: true, arrayLimit: 5 }); - st.ok(Array.isArray(result.a), 'result is an array'); - st.deepEqual(result.a, ['1', '2', '3'], 'all values present'); - st.end(); - }); - - t.test('comma-separated values exceeding arrayLimit convert to object', function (st) { - var result = qs.parse('a=1,2,3,4', { comma: true, arrayLimit: 3 }); - st.notOk(Array.isArray(result.a), 'result is not an array when over limit'); - st.deepEqual(result.a, { 0: '1', 1: '2', 2: '3', 3: '4' }, 'all values preserved as object'); - st.end(); - }); - - t.test('comma-separated values exceeding arrayLimit with throwOnLimitExceeded throws', function (st) { - st['throws']( - function () { - qs.parse('a=1,2,3,4', { comma: true, arrayLimit: 3, throwOnLimitExceeded: true }); - }, - new RangeError('Array limit exceeded. Only 3 elements allowed in an array.'), - 'throws error when comma-split exceeds array limit' - ); - st.end(); - }); - - t.test('comma-separated values at exactly arrayLimit stay as array', function (st) { - var result = qs.parse('a=1,2,3', { comma: true, arrayLimit: 3 }); - st.ok(Array.isArray(result.a), 'result is an array when exactly at limit'); - st.deepEqual(result.a, ['1', '2', '3'], 'all values present'); - st.end(); - }); - - t.end(); -}); - -test('mixed array and object notation', function (t) { - t.test('array brackets with object key - under limit', function (st) { - st.deepEqual( - qs.parse('a[]=b&a[c]=d'), - { a: { 0: 'b', c: 'd' } }, - 'mixing [] and [key] converts to object' - ); - st.end(); - }); - - t.test('array index with object key - under limit', function (st) { - st.deepEqual( - qs.parse('a[0]=b&a[c]=d'), - { a: { 0: 'b', c: 'd' } }, - 'mixing [0] and [key] produces object' - ); - st.end(); - }); - - t.test('plain value with array brackets - under limit', function (st) { - st.deepEqual( - qs.parse('a=b&a[]=c', { arrayLimit: 20 }), - { a: ['b', 'c'] }, - 'plain value combined with [] stays as array under limit' - ); - st.end(); - }); - - t.test('array brackets with plain value - under limit', function (st) { - st.deepEqual( - qs.parse('a[]=b&a=c', { arrayLimit: 20 }), - { a: ['b', 'c'] }, - '[] combined with plain value stays as array under limit' - ); - st.end(); - }); - - t.test('plain value with array index - under limit', function (st) { - st.deepEqual( - qs.parse('a=b&a[0]=c', { arrayLimit: 20 }), - { a: ['b', 'c'] }, - 'plain value combined with [0] stays as array under limit' - ); - st.end(); - }); - - t.test('multiple plain values with duplicates combine', function (st) { - st.deepEqual( - qs.parse('a=b&a=c&a=d', { arrayLimit: 20 }), - { a: ['b', 'c', 'd'] }, - 'duplicate plain keys combine into array' - ); - st.end(); - }); - - t.test('multiple plain values exceeding limit', function (st) { - // 3 elements (indices 0-2), max index 2 > limit 1 - st.deepEqual( - qs.parse('a=b&a=c&a=d', { arrayLimit: 1 }), - { a: { 0: 'b', 1: 'c', 2: 'd' } }, - 'duplicate plain keys convert to object when exceeding limit' - ); - st.end(); - }); - - t.test('mixed notation produces consistent results when arrayLimit is exceeded', function (st) { - var expected = { a: { 0: 'b', 1: 'c', 2: 'd' } }; - - st.deepEqual( - qs.parse('a[]=b&a[1]=c&a=d', { arrayLimit: -1 }), - expected, - 'arrayLimit -1' - ); - - st.deepEqual( - qs.parse('a[]=b&a[1]=c&a=d', { arrayLimit: 0 }), - expected, - 'arrayLimit 0' - ); - - st.deepEqual( - qs.parse('a[]=b&a[1]=c&a=d', { arrayLimit: 1 }), - expected, - 'arrayLimit 1' - ); - - st.end(); - }); - - t.end(); -}); diff --git a/node_modules/qs/test/stringify.js b/node_modules/qs/test/stringify.js deleted file mode 100644 index 4d77694..0000000 --- a/node_modules/qs/test/stringify.js +++ /dev/null @@ -1,1310 +0,0 @@ -'use strict'; - -var test = require('tape'); -var qs = require('../'); -var utils = require('../lib/utils'); -var iconv = require('iconv-lite'); -var SaferBuffer = require('safer-buffer').Buffer; -var hasSymbols = require('has-symbols'); -var mockProperty = require('mock-property'); -var emptyTestCases = require('./empty-keys-cases').emptyTestCases; -var hasProto = require('has-proto')(); -var hasBigInt = require('has-bigints')(); - -test('stringify()', function (t) { - t.test('stringifies a querystring object', function (st) { - st.equal(qs.stringify({ a: 'b' }), 'a=b'); - st.equal(qs.stringify({ a: 1 }), 'a=1'); - st.equal(qs.stringify({ a: 1, b: 2 }), 'a=1&b=2'); - st.equal(qs.stringify({ a: 'A_Z' }), 'a=A_Z'); - st.equal(qs.stringify({ a: '€' }), 'a=%E2%82%AC'); - st.equal(qs.stringify({ a: '' }), 'a=%EE%80%80'); - st.equal(qs.stringify({ a: 'א' }), 'a=%D7%90'); - st.equal(qs.stringify({ a: '𐐷' }), 'a=%F0%90%90%B7'); - st.end(); - }); - - t.test('stringifies falsy values', function (st) { - st.equal(qs.stringify(undefined), ''); - st.equal(qs.stringify(null), ''); - st.equal(qs.stringify(null, { strictNullHandling: true }), ''); - st.equal(qs.stringify(false), ''); - st.equal(qs.stringify(0), ''); - st.end(); - }); - - t.test('stringifies symbols', { skip: !hasSymbols() }, function (st) { - st.equal(qs.stringify(Symbol.iterator), ''); - st.equal(qs.stringify([Symbol.iterator]), '0=Symbol%28Symbol.iterator%29'); - st.equal(qs.stringify({ a: Symbol.iterator }), 'a=Symbol%28Symbol.iterator%29'); - st.equal( - qs.stringify({ a: [Symbol.iterator] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), - 'a[]=Symbol%28Symbol.iterator%29' - ); - st.end(); - }); - - t.test('stringifies bigints', { skip: !hasBigInt }, function (st) { - var three = BigInt(3); - var encodeWithN = function (value, defaultEncoder, charset) { - var result = defaultEncoder(value, defaultEncoder, charset); - return typeof value === 'bigint' ? result + 'n' : result; - }; - st.equal(qs.stringify(three), ''); - st.equal(qs.stringify([three]), '0=3'); - st.equal(qs.stringify([three], { encoder: encodeWithN }), '0=3n'); - st.equal(qs.stringify({ a: three }), 'a=3'); - st.equal(qs.stringify({ a: three }, { encoder: encodeWithN }), 'a=3n'); - st.equal( - qs.stringify({ a: [three] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), - 'a[]=3' - ); - st.equal( - qs.stringify({ a: [three] }, { encodeValuesOnly: true, encoder: encodeWithN, arrayFormat: 'brackets' }), - 'a[]=3n' - ); - st.end(); - }); - - t.test('encodes dot in key of object when encodeDotInKeys and allowDots is provided', function (st) { - st.equal( - qs.stringify( - { 'name.obj': { first: 'John', last: 'Doe' } }, - { allowDots: false, encodeDotInKeys: false } - ), - 'name.obj%5Bfirst%5D=John&name.obj%5Blast%5D=Doe', - 'with allowDots false and encodeDotInKeys false' - ); - st.equal( - qs.stringify( - { 'name.obj': { first: 'John', last: 'Doe' } }, - { allowDots: true, encodeDotInKeys: false } - ), - 'name.obj.first=John&name.obj.last=Doe', - 'with allowDots true and encodeDotInKeys false' - ); - st.equal( - qs.stringify( - { 'name.obj': { first: 'John', last: 'Doe' } }, - { allowDots: false, encodeDotInKeys: true } - ), - 'name%252Eobj%5Bfirst%5D=John&name%252Eobj%5Blast%5D=Doe', - 'with allowDots false and encodeDotInKeys true' - ); - st.equal( - qs.stringify( - { 'name.obj': { first: 'John', last: 'Doe' } }, - { allowDots: true, encodeDotInKeys: true } - ), - 'name%252Eobj.first=John&name%252Eobj.last=Doe', - 'with allowDots true and encodeDotInKeys true' - ); - - st.equal( - qs.stringify( - { 'name.obj.subobject': { 'first.godly.name': 'John', last: 'Doe' } }, - { allowDots: false, encodeDotInKeys: false } - ), - 'name.obj.subobject%5Bfirst.godly.name%5D=John&name.obj.subobject%5Blast%5D=Doe', - 'with allowDots false and encodeDotInKeys false' - ); - st.equal( - qs.stringify( - { 'name.obj.subobject': { 'first.godly.name': 'John', last: 'Doe' } }, - { allowDots: true, encodeDotInKeys: false } - ), - 'name.obj.subobject.first.godly.name=John&name.obj.subobject.last=Doe', - 'with allowDots false and encodeDotInKeys false' - ); - st.equal( - qs.stringify( - { 'name.obj.subobject': { 'first.godly.name': 'John', last: 'Doe' } }, - { allowDots: false, encodeDotInKeys: true } - ), - 'name%252Eobj%252Esubobject%5Bfirst.godly.name%5D=John&name%252Eobj%252Esubobject%5Blast%5D=Doe', - 'with allowDots false and encodeDotInKeys true' - ); - st.equal( - qs.stringify( - { 'name.obj.subobject': { 'first.godly.name': 'John', last: 'Doe' } }, - { allowDots: true, encodeDotInKeys: true } - ), - 'name%252Eobj%252Esubobject.first%252Egodly%252Ename=John&name%252Eobj%252Esubobject.last=Doe', - 'with allowDots true and encodeDotInKeys true' - ); - - st.end(); - }); - - t.test('should encode dot in key of object, and automatically set allowDots to `true` when encodeDotInKeys is true and allowDots in undefined', function (st) { - st.equal( - qs.stringify( - { 'name.obj.subobject': { 'first.godly.name': 'John', last: 'Doe' } }, - { encodeDotInKeys: true } - ), - 'name%252Eobj%252Esubobject.first%252Egodly%252Ename=John&name%252Eobj%252Esubobject.last=Doe', - 'with allowDots undefined and encodeDotInKeys true' - ); - st.end(); - }); - - t.test('should encode dot in key of object when encodeDotInKeys and allowDots is provided, and nothing else when encodeValuesOnly is provided', function (st) { - st.equal( - qs.stringify({ 'name.obj': { first: 'John', last: 'Doe' } }, { - encodeDotInKeys: true, allowDots: true, encodeValuesOnly: true - }), - 'name%2Eobj.first=John&name%2Eobj.last=Doe' - ); - - st.equal( - qs.stringify({ 'name.obj.subobject': { 'first.godly.name': 'John', last: 'Doe' } }, { allowDots: true, encodeDotInKeys: true, encodeValuesOnly: true }), - 'name%2Eobj%2Esubobject.first%2Egodly%2Ename=John&name%2Eobj%2Esubobject.last=Doe' - ); - - st.end(); - }); - - t.test('throws when `commaRoundTrip` is not a boolean', function (st) { - st['throws']( - function () { qs.stringify({}, { commaRoundTrip: 'not a boolean' }); }, - TypeError, - 'throws when `commaRoundTrip` is not a boolean' - ); - - st.end(); - }); - - t.test('throws when `encodeDotInKeys` is not a boolean', function (st) { - st['throws']( - function () { qs.stringify({ a: [], b: 'zz' }, { encodeDotInKeys: 'foobar' }); }, - TypeError - ); - - st['throws']( - function () { qs.stringify({ a: [], b: 'zz' }, { encodeDotInKeys: 0 }); }, - TypeError - ); - - st['throws']( - function () { qs.stringify({ a: [], b: 'zz' }, { encodeDotInKeys: NaN }); }, - TypeError - ); - - st['throws']( - function () { qs.stringify({ a: [], b: 'zz' }, { encodeDotInKeys: null }); }, - TypeError - ); - - st.end(); - }); - - t.test('adds query prefix', function (st) { - st.equal(qs.stringify({ a: 'b' }, { addQueryPrefix: true }), '?a=b'); - st.end(); - }); - - t.test('with query prefix, outputs blank string given an empty object', function (st) { - st.equal(qs.stringify({}, { addQueryPrefix: true }), ''); - st.end(); - }); - - t.test('stringifies nested falsy values', function (st) { - st.equal(qs.stringify({ a: { b: { c: null } } }), 'a%5Bb%5D%5Bc%5D='); - st.equal(qs.stringify({ a: { b: { c: null } } }, { strictNullHandling: true }), 'a%5Bb%5D%5Bc%5D'); - st.equal(qs.stringify({ a: { b: { c: false } } }), 'a%5Bb%5D%5Bc%5D=false'); - st.end(); - }); - - t.test('stringifies a nested object', function (st) { - st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); - st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }), 'a%5Bb%5D%5Bc%5D%5Bd%5D=e'); - st.end(); - }); - - t.test('`allowDots` option: stringifies a nested object with dots notation', function (st) { - st.equal(qs.stringify({ a: { b: 'c' } }, { allowDots: true }), 'a.b=c'); - st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }, { allowDots: true }), 'a.b.c.d=e'); - st.end(); - }); - - t.test('stringifies an array value', function (st) { - st.equal( - qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'indices' }), - 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d', - 'indices => indices' - ); - st.equal( - qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'brackets' }), - 'a%5B%5D=b&a%5B%5D=c&a%5B%5D=d', - 'brackets => brackets' - ); - st.equal( - qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'comma' }), - 'a=b%2Cc%2Cd', - 'comma => comma' - ); - st.equal( - qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'comma', commaRoundTrip: true }), - 'a=b%2Cc%2Cd', - 'comma round trip => comma' - ); - st.equal( - qs.stringify({ a: ['b', 'c', 'd'] }), - 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d', - 'default => indices' - ); - st.end(); - }); - - t.test('`skipNulls` option', function (st) { - st.equal( - qs.stringify({ a: 'b', c: null }, { skipNulls: true }), - 'a=b', - 'omits nulls when asked' - ); - - st.equal( - qs.stringify({ a: { b: 'c', d: null } }, { skipNulls: true }), - 'a%5Bb%5D=c', - 'omits nested nulls when asked' - ); - - st.end(); - }); - - t.test('omits array indices when asked', function (st) { - st.equal(qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }), 'a=b&a=c&a=d'); - - st.end(); - }); - - t.test('omits object key/value pair when value is empty array', function (st) { - st.equal(qs.stringify({ a: [], b: 'zz' }), 'b=zz'); - - st.end(); - }); - - t.test('should not omit object key/value pair when value is empty array and when asked', function (st) { - st.equal(qs.stringify({ a: [], b: 'zz' }), 'b=zz'); - st.equal(qs.stringify({ a: [], b: 'zz' }, { allowEmptyArrays: false }), 'b=zz'); - st.equal(qs.stringify({ a: [], b: 'zz' }, { allowEmptyArrays: true }), 'a[]&b=zz'); - - st.end(); - }); - - t.test('should throw when allowEmptyArrays is not of type boolean', function (st) { - st['throws']( - function () { qs.stringify({ a: [], b: 'zz' }, { allowEmptyArrays: 'foobar' }); }, - TypeError - ); - - st['throws']( - function () { qs.stringify({ a: [], b: 'zz' }, { allowEmptyArrays: 0 }); }, - TypeError - ); - - st['throws']( - function () { qs.stringify({ a: [], b: 'zz' }, { allowEmptyArrays: NaN }); }, - TypeError - ); - - st['throws']( - function () { qs.stringify({ a: [], b: 'zz' }, { allowEmptyArrays: null }); }, - TypeError - ); - - st.end(); - }); - - t.test('allowEmptyArrays + strictNullHandling', function (st) { - st.equal( - qs.stringify( - { testEmptyArray: [] }, - { strictNullHandling: true, allowEmptyArrays: true } - ), - 'testEmptyArray[]' - ); - - st.end(); - }); - - t.test('stringifies an array value with one item vs multiple items', function (st) { - st.test('non-array item', function (s2t) { - s2t.equal(qs.stringify({ a: 'c' }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a=c'); - s2t.equal(qs.stringify({ a: 'c' }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a=c'); - s2t.equal(qs.stringify({ a: 'c' }, { encodeValuesOnly: true, arrayFormat: 'comma' }), 'a=c'); - s2t.equal(qs.stringify({ a: 'c' }, { encodeValuesOnly: true }), 'a=c'); - - s2t.end(); - }); - - st.test('array with a single item', function (s2t) { - s2t.equal(qs.stringify({ a: ['c'] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[0]=c'); - s2t.equal(qs.stringify({ a: ['c'] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[]=c'); - s2t.equal(qs.stringify({ a: ['c'] }, { encodeValuesOnly: true, arrayFormat: 'comma' }), 'a=c'); - s2t.equal(qs.stringify({ a: ['c'] }, { encodeValuesOnly: true, arrayFormat: 'comma', commaRoundTrip: true }), 'a[]=c'); // so it parses back as an array - s2t.equal(qs.stringify({ a: ['c'] }, { encodeValuesOnly: true }), 'a[0]=c'); - - s2t.end(); - }); - - st.test('array with multiple items', function (s2t) { - s2t.equal(qs.stringify({ a: ['c', 'd'] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[0]=c&a[1]=d'); - s2t.equal(qs.stringify({ a: ['c', 'd'] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[]=c&a[]=d'); - s2t.equal(qs.stringify({ a: ['c', 'd'] }, { encodeValuesOnly: true, arrayFormat: 'comma' }), 'a=c,d'); - s2t.equal(qs.stringify({ a: ['c', 'd'] }, { encodeValuesOnly: true, arrayFormat: 'comma', commaRoundTrip: true }), 'a=c,d'); - s2t.equal(qs.stringify({ a: ['c', 'd'] }, { encodeValuesOnly: true }), 'a[0]=c&a[1]=d'); - - s2t.end(); - }); - - st.test('array with multiple items with a comma inside', function (s2t) { - s2t.equal(qs.stringify({ a: ['c,d', 'e'] }, { encodeValuesOnly: true, arrayFormat: 'comma' }), 'a=c%2Cd,e'); - s2t.equal(qs.stringify({ a: ['c,d', 'e'] }, { arrayFormat: 'comma' }), 'a=c%2Cd%2Ce'); - - s2t.equal(qs.stringify({ a: ['c,d', 'e'] }, { encodeValuesOnly: true, arrayFormat: 'comma', commaRoundTrip: true }), 'a=c%2Cd,e'); - s2t.equal(qs.stringify({ a: ['c,d', 'e'] }, { arrayFormat: 'comma', commaRoundTrip: true }), 'a=c%2Cd%2Ce'); - - s2t.end(); - }); - - st.end(); - }); - - t.test('stringifies a nested array value', function (st) { - st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[b][0]=c&a[b][1]=d'); - st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[b][]=c&a[b][]=d'); - st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { encodeValuesOnly: true, arrayFormat: 'comma' }), 'a[b]=c,d'); - st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { encodeValuesOnly: true }), 'a[b][0]=c&a[b][1]=d'); - st.end(); - }); - - t.test('stringifies comma and empty array values', function (st) { - st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: false, arrayFormat: 'indices' }), 'a[0]=,&a[1]=&a[2]=c,d%'); - st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: false, arrayFormat: 'brackets' }), 'a[]=,&a[]=&a[]=c,d%'); - st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: false, arrayFormat: 'comma' }), 'a=,,,c,d%'); - st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: false, arrayFormat: 'repeat' }), 'a=,&a=&a=c,d%'); - - st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: true, encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[0]=%2C&a[1]=&a[2]=c%2Cd%25'); - st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: true, encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[]=%2C&a[]=&a[]=c%2Cd%25'); - st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: true, encodeValuesOnly: true, arrayFormat: 'comma' }), 'a=%2C,,c%2Cd%25'); - st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: true, encodeValuesOnly: true, arrayFormat: 'repeat' }), 'a=%2C&a=&a=c%2Cd%25'); - - st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: true, encodeValuesOnly: false, arrayFormat: 'indices' }), 'a%5B0%5D=%2C&a%5B1%5D=&a%5B2%5D=c%2Cd%25'); - st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: true, encodeValuesOnly: false, arrayFormat: 'brackets' }), 'a%5B%5D=%2C&a%5B%5D=&a%5B%5D=c%2Cd%25'); - st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: true, encodeValuesOnly: false, arrayFormat: 'comma' }), 'a=%2C%2C%2Cc%2Cd%25'); - st.equal(qs.stringify({ a: [',', '', 'c,d%'] }, { encode: true, encodeValuesOnly: false, arrayFormat: 'repeat' }), 'a=%2C&a=&a=c%2Cd%25'); - - st.end(); - }); - - t.test('stringifies comma and empty non-array values', function (st) { - st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: false, arrayFormat: 'indices' }), 'a=,&b=&c=c,d%'); - st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: false, arrayFormat: 'brackets' }), 'a=,&b=&c=c,d%'); - st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: false, arrayFormat: 'comma' }), 'a=,&b=&c=c,d%'); - st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: false, arrayFormat: 'repeat' }), 'a=,&b=&c=c,d%'); - - st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: true, encodeValuesOnly: true, arrayFormat: 'indices' }), 'a=%2C&b=&c=c%2Cd%25'); - st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: true, encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a=%2C&b=&c=c%2Cd%25'); - st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: true, encodeValuesOnly: true, arrayFormat: 'comma' }), 'a=%2C&b=&c=c%2Cd%25'); - st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: true, encodeValuesOnly: true, arrayFormat: 'repeat' }), 'a=%2C&b=&c=c%2Cd%25'); - - st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: true, encodeValuesOnly: false, arrayFormat: 'indices' }), 'a=%2C&b=&c=c%2Cd%25'); - st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: true, encodeValuesOnly: false, arrayFormat: 'brackets' }), 'a=%2C&b=&c=c%2Cd%25'); - st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: true, encodeValuesOnly: false, arrayFormat: 'comma' }), 'a=%2C&b=&c=c%2Cd%25'); - st.equal(qs.stringify({ a: ',', b: '', c: 'c,d%' }, { encode: true, encodeValuesOnly: false, arrayFormat: 'repeat' }), 'a=%2C&b=&c=c%2Cd%25'); - - st.end(); - }); - - t.test('stringifies a nested array value with dots notation', function (st) { - st.equal( - qs.stringify( - { a: { b: ['c', 'd'] } }, - { allowDots: true, encodeValuesOnly: true, arrayFormat: 'indices' } - ), - 'a.b[0]=c&a.b[1]=d', - 'indices: stringifies with dots + indices' - ); - st.equal( - qs.stringify( - { a: { b: ['c', 'd'] } }, - { allowDots: true, encodeValuesOnly: true, arrayFormat: 'brackets' } - ), - 'a.b[]=c&a.b[]=d', - 'brackets: stringifies with dots + brackets' - ); - st.equal( - qs.stringify( - { a: { b: ['c', 'd'] } }, - { allowDots: true, encodeValuesOnly: true, arrayFormat: 'comma' } - ), - 'a.b=c,d', - 'comma: stringifies with dots + comma' - ); - st.equal( - qs.stringify( - { a: { b: ['c', 'd'] } }, - { allowDots: true, encodeValuesOnly: true } - ), - 'a.b[0]=c&a.b[1]=d', - 'default: stringifies with dots + indices' - ); - st.end(); - }); - - t.test('stringifies an object inside an array', function (st) { - st.equal( - qs.stringify({ a: [{ b: 'c' }] }, { arrayFormat: 'indices', encodeValuesOnly: true }), - 'a[0][b]=c', - 'indices => indices' - ); - st.equal( - qs.stringify({ a: [{ b: 'c' }] }, { arrayFormat: 'repeat', encodeValuesOnly: true }), - 'a[b]=c', - 'repeat => repeat' - ); - st.equal( - qs.stringify({ a: [{ b: 'c' }] }, { arrayFormat: 'brackets', encodeValuesOnly: true }), - 'a[][b]=c', - 'brackets => brackets' - ); - st.equal( - qs.stringify({ a: [{ b: 'c' }] }, { encodeValuesOnly: true }), - 'a[0][b]=c', - 'default => indices' - ); - - st.equal( - qs.stringify({ a: [{ b: { c: [1] } }] }, { arrayFormat: 'indices', encodeValuesOnly: true }), - 'a[0][b][c][0]=1', - 'indices => indices' - ); - st.equal( - qs.stringify({ a: [{ b: { c: [1] } }] }, { arrayFormat: 'repeat', encodeValuesOnly: true }), - 'a[b][c]=1', - 'repeat => repeat' - ); - st.equal( - qs.stringify({ a: [{ b: { c: [1] } }] }, { arrayFormat: 'brackets', encodeValuesOnly: true }), - 'a[][b][c][]=1', - 'brackets => brackets' - ); - st.equal( - qs.stringify({ a: [{ b: { c: [1] } }] }, { encodeValuesOnly: true }), - 'a[0][b][c][0]=1', - 'default => indices' - ); - - st.end(); - }); - - t.test('stringifies an array with mixed objects and primitives', function (st) { - st.equal( - qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), - 'a[0][b]=1&a[1]=2&a[2]=3', - 'indices => indices' - ); - st.equal( - qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), - 'a[][b]=1&a[]=2&a[]=3', - 'brackets => brackets' - ); - st.equal( - qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encodeValuesOnly: true, arrayFormat: 'comma' }), - '???', - 'brackets => brackets', - { skip: 'TODO: figure out what this should do' } - ); - st.equal( - qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encodeValuesOnly: true }), - 'a[0][b]=1&a[1]=2&a[2]=3', - 'default => indices' - ); - - st.end(); - }); - - t.test('stringifies an object inside an array with dots notation', function (st) { - st.equal( - qs.stringify( - { a: [{ b: 'c' }] }, - { allowDots: true, encode: false, arrayFormat: 'indices' } - ), - 'a[0].b=c', - 'indices => indices' - ); - st.equal( - qs.stringify( - { a: [{ b: 'c' }] }, - { allowDots: true, encode: false, arrayFormat: 'brackets' } - ), - 'a[].b=c', - 'brackets => brackets' - ); - st.equal( - qs.stringify( - { a: [{ b: 'c' }] }, - { allowDots: true, encode: false } - ), - 'a[0].b=c', - 'default => indices' - ); - - st.equal( - qs.stringify( - { a: [{ b: { c: [1] } }] }, - { allowDots: true, encode: false, arrayFormat: 'indices' } - ), - 'a[0].b.c[0]=1', - 'indices => indices' - ); - st.equal( - qs.stringify( - { a: [{ b: { c: [1] } }] }, - { allowDots: true, encode: false, arrayFormat: 'brackets' } - ), - 'a[].b.c[]=1', - 'brackets => brackets' - ); - st.equal( - qs.stringify( - { a: [{ b: { c: [1] } }] }, - { allowDots: true, encode: false } - ), - 'a[0].b.c[0]=1', - 'default => indices' - ); - - st.end(); - }); - - t.test('does not omit object keys when indices = false', function (st) { - st.equal(qs.stringify({ a: [{ b: 'c' }] }, { indices: false }), 'a%5Bb%5D=c'); - st.end(); - }); - - t.test('uses indices notation for arrays when indices=true', function (st) { - st.equal(qs.stringify({ a: ['b', 'c'] }, { indices: true }), 'a%5B0%5D=b&a%5B1%5D=c'); - st.end(); - }); - - t.test('uses indices notation for arrays when no arrayFormat is specified', function (st) { - st.equal(qs.stringify({ a: ['b', 'c'] }), 'a%5B0%5D=b&a%5B1%5D=c'); - st.end(); - }); - - t.test('uses indices notation for arrays when arrayFormat=indices', function (st) { - st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }), 'a%5B0%5D=b&a%5B1%5D=c'); - st.end(); - }); - - t.test('uses repeat notation for arrays when arrayFormat=repeat', function (st) { - st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }), 'a=b&a=c'); - st.end(); - }); - - t.test('uses brackets notation for arrays when arrayFormat=brackets', function (st) { - st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }), 'a%5B%5D=b&a%5B%5D=c'); - st.end(); - }); - - t.test('stringifies a complicated object', function (st) { - st.equal(qs.stringify({ a: { b: 'c', d: 'e' } }), 'a%5Bb%5D=c&a%5Bd%5D=e'); - st.end(); - }); - - t.test('stringifies an empty value', function (st) { - st.equal(qs.stringify({ a: '' }), 'a='); - st.equal(qs.stringify({ a: null }, { strictNullHandling: true }), 'a'); - - st.equal(qs.stringify({ a: '', b: '' }), 'a=&b='); - st.equal(qs.stringify({ a: null, b: '' }, { strictNullHandling: true }), 'a&b='); - - st.equal(qs.stringify({ a: { b: '' } }), 'a%5Bb%5D='); - st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: true }), 'a%5Bb%5D'); - st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: false }), 'a%5Bb%5D='); - - st.end(); - }); - - t.test('stringifies an empty array in different arrayFormat', function (st) { - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false }), 'b[0]=&c=c'); - // arrayFormat default - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'indices' }), 'b[0]=&c=c'); - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'brackets' }), 'b[]=&c=c'); - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'repeat' }), 'b=&c=c'); - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma' }), 'b=&c=c'); - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma', commaRoundTrip: true }), 'b[]=&c=c'); - // with strictNullHandling - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'indices', strictNullHandling: true }), 'b[0]&c=c'); - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'brackets', strictNullHandling: true }), 'b[]&c=c'); - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'repeat', strictNullHandling: true }), 'b&c=c'); - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma', strictNullHandling: true }), 'b&c=c'); - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma', strictNullHandling: true, commaRoundTrip: true }), 'b[]&c=c'); - // with skipNulls - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'indices', skipNulls: true }), 'c=c'); - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'brackets', skipNulls: true }), 'c=c'); - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'repeat', skipNulls: true }), 'c=c'); - st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma', skipNulls: true }), 'c=c'); - - st.end(); - }); - - t.test('stringifies a null object', { skip: !hasProto }, function (st) { - st.equal(qs.stringify({ __proto__: null, a: 'b' }), 'a=b'); - st.end(); - }); - - t.test('returns an empty string for invalid input', function (st) { - st.equal(qs.stringify(undefined), ''); - st.equal(qs.stringify(false), ''); - st.equal(qs.stringify(null), ''); - st.equal(qs.stringify(''), ''); - st.end(); - }); - - t.test('stringifies an object with a null object as a child', { skip: !hasProto }, function (st) { - st.equal(qs.stringify({ a: { __proto__: null, b: 'c' } }), 'a%5Bb%5D=c'); - st.end(); - }); - - t.test('drops keys with a value of undefined', function (st) { - st.equal(qs.stringify({ a: undefined }), ''); - - st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: true }), 'a%5Bc%5D'); - st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: false }), 'a%5Bc%5D='); - st.equal(qs.stringify({ a: { b: undefined, c: '' } }), 'a%5Bc%5D='); - st.end(); - }); - - t.test('url encodes values', function (st) { - st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c'); - st.end(); - }); - - t.test('stringifies a date', function (st) { - var now = new Date(); - var str = 'a=' + encodeURIComponent(now.toISOString()); - st.equal(qs.stringify({ a: now }), str); - st.end(); - }); - - t.test('stringifies the weird object from qs', function (st) { - st.equal(qs.stringify({ 'my weird field': '~q1!2"\'w$5&7/z8)?' }), 'my%20weird%20field=~q1%212%22%27w%245%267%2Fz8%29%3F'); - st.end(); - }); - - t.test('skips properties that are part of the object prototype', function (st) { - st.intercept(Object.prototype, 'crash', { value: 'test' }); - - st.equal(qs.stringify({ a: 'b' }), 'a=b'); - st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); - - st.end(); - }); - - t.test('stringifies boolean values', function (st) { - st.equal(qs.stringify({ a: true }), 'a=true'); - st.equal(qs.stringify({ a: { b: true } }), 'a%5Bb%5D=true'); - st.equal(qs.stringify({ b: false }), 'b=false'); - st.equal(qs.stringify({ b: { c: false } }), 'b%5Bc%5D=false'); - st.end(); - }); - - t.test('stringifies buffer values', function (st) { - st.equal(qs.stringify({ a: SaferBuffer.from('test') }), 'a=test'); - st.equal(qs.stringify({ a: { b: SaferBuffer.from('test') } }), 'a%5Bb%5D=test'); - st.end(); - }); - - t.test('stringifies an object using an alternative delimiter', function (st) { - st.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d'); - st.end(); - }); - - t.test('does not blow up when Buffer global is missing', function (st) { - var restore = mockProperty(global, 'Buffer', { 'delete': true }); - - var result = qs.stringify({ a: 'b', c: 'd' }); - - restore(); - - st.equal(result, 'a=b&c=d'); - st.end(); - }); - - t.test('does not crash when parsing circular references', function (st) { - var a = {}; - a.b = a; - - st['throws']( - function () { qs.stringify({ 'foo[bar]': 'baz', 'foo[baz]': a }); }, - /RangeError: Cyclic object value/, - 'cyclic values throw' - ); - - var circular = { - a: 'value' - }; - circular.a = circular; - st['throws']( - function () { qs.stringify(circular); }, - /RangeError: Cyclic object value/, - 'cyclic values throw' - ); - - var arr = ['a']; - st.doesNotThrow( - function () { qs.stringify({ x: arr, y: arr }); }, - 'non-cyclic values do not throw' - ); - - st.end(); - }); - - t.test('non-circular duplicated references can still work', function (st) { - var hourOfDay = { - 'function': 'hour_of_day' - }; - - var p1 = { - 'function': 'gte', - arguments: [hourOfDay, 0] - }; - var p2 = { - 'function': 'lte', - arguments: [hourOfDay, 23] - }; - - st.equal( - qs.stringify({ filters: { $and: [p1, p2] } }, { encodeValuesOnly: true, arrayFormat: 'indices' }), - 'filters[$and][0][function]=gte&filters[$and][0][arguments][0][function]=hour_of_day&filters[$and][0][arguments][1]=0&filters[$and][1][function]=lte&filters[$and][1][arguments][0][function]=hour_of_day&filters[$and][1][arguments][1]=23' - ); - st.equal( - qs.stringify({ filters: { $and: [p1, p2] } }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), - 'filters[$and][][function]=gte&filters[$and][][arguments][][function]=hour_of_day&filters[$and][][arguments][]=0&filters[$and][][function]=lte&filters[$and][][arguments][][function]=hour_of_day&filters[$and][][arguments][]=23' - ); - st.equal( - qs.stringify({ filters: { $and: [p1, p2] } }, { encodeValuesOnly: true, arrayFormat: 'repeat' }), - 'filters[$and][function]=gte&filters[$and][arguments][function]=hour_of_day&filters[$and][arguments]=0&filters[$and][function]=lte&filters[$and][arguments][function]=hour_of_day&filters[$and][arguments]=23' - ); - - st.end(); - }); - - t.test('selects properties when filter=array', function (st) { - st.equal(qs.stringify({ a: 'b' }, { filter: ['a'] }), 'a=b'); - st.equal(qs.stringify({ a: 1 }, { filter: [] }), ''); - - st.equal( - qs.stringify( - { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, - { filter: ['a', 'b', 0, 2], arrayFormat: 'indices' } - ), - 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3', - 'indices => indices' - ); - st.equal( - qs.stringify( - { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, - { filter: ['a', 'b', 0, 2], arrayFormat: 'brackets' } - ), - 'a%5Bb%5D%5B%5D=1&a%5Bb%5D%5B%5D=3', - 'brackets => brackets' - ); - st.equal( - qs.stringify( - { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, - { filter: ['a', 'b', 0, 2] } - ), - 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3', - 'default => indices' - ); - - st.end(); - }); - - t.test('supports custom representations when filter=function', function (st) { - var calls = 0; - var obj = { a: 'b', c: 'd', e: { f: new Date(1257894000000) } }; - var filterFunc = function (prefix, value) { - calls += 1; - if (calls === 1) { - st.equal(prefix, '', 'prefix is empty'); - st.equal(value, obj); - } else if (prefix === 'c') { - return void 0; - } else if (value instanceof Date) { - st.equal(prefix, 'e[f]'); - return value.getTime(); - } - return value; - }; - - st.equal(qs.stringify(obj, { filter: filterFunc }), 'a=b&e%5Bf%5D=1257894000000'); - st.equal(calls, 5); - st.end(); - }); - - t.test('can disable uri encoding', function (st) { - st.equal(qs.stringify({ a: 'b' }, { encode: false }), 'a=b'); - st.equal(qs.stringify({ a: { b: 'c' } }, { encode: false }), 'a[b]=c'); - st.equal(qs.stringify({ a: 'b', c: null }, { strictNullHandling: true, encode: false }), 'a=b&c'); - st.end(); - }); - - t.test('can sort the keys', function (st) { - var sort = function (a, b) { - return a.localeCompare(b); - }; - st.equal(qs.stringify({ a: 'c', z: 'y', b: 'f' }, { sort: sort }), 'a=c&b=f&z=y'); - st.equal(qs.stringify({ a: 'c', z: { j: 'a', i: 'b' }, b: 'f' }, { sort: sort }), 'a=c&b=f&z%5Bi%5D=b&z%5Bj%5D=a'); - st.end(); - }); - - t.test('can sort the keys at depth 3 or more too', function (st) { - var sort = function (a, b) { - return a.localeCompare(b); - }; - st.equal( - qs.stringify( - { a: 'a', z: { zj: { zjb: 'zjb', zja: 'zja' }, zi: { zib: 'zib', zia: 'zia' } }, b: 'b' }, - { sort: sort, encode: false } - ), - 'a=a&b=b&z[zi][zia]=zia&z[zi][zib]=zib&z[zj][zja]=zja&z[zj][zjb]=zjb' - ); - st.equal( - qs.stringify( - { a: 'a', z: { zj: { zjb: 'zjb', zja: 'zja' }, zi: { zib: 'zib', zia: 'zia' } }, b: 'b' }, - { sort: null, encode: false } - ), - 'a=a&z[zj][zjb]=zjb&z[zj][zja]=zja&z[zi][zib]=zib&z[zi][zia]=zia&b=b' - ); - st.end(); - }); - - t.test('can stringify with custom encoding', function (st) { - st.equal(qs.stringify({ 県: '大阪府', '': '' }, { - encoder: function (str) { - if (str.length === 0) { - return ''; - } - var buf = iconv.encode(str, 'shiftjis'); - var result = []; - for (var i = 0; i < buf.length; ++i) { - result.push(buf.readUInt8(i).toString(16)); - } - return '%' + result.join('%'); - } - }), '%8c%a7=%91%e5%8d%e3%95%7b&='); - st.end(); - }); - - t.test('receives the default encoder as a second argument', function (st) { - st.plan(8); - - qs.stringify({ a: 1, b: new Date(), c: true, d: [1] }, { - encoder: function (str) { - st.match(typeof str, /^(?:string|number|boolean)$/); - return ''; - } - }); - - st.end(); - }); - - t.test('receives the default encoder as a second argument', function (st) { - st.plan(2); - - qs.stringify({ a: 1 }, { - encoder: function (str, defaultEncoder) { - st.equal(defaultEncoder, utils.encode); - } - }); - - st.end(); - }); - - t.test('throws error with wrong encoder', function (st) { - st['throws'](function () { - qs.stringify({}, { encoder: 'string' }); - }, new TypeError('Encoder has to be a function.')); - st.end(); - }); - - t.test('can use custom encoder for a buffer object', { skip: typeof Buffer === 'undefined' }, function (st) { - st.equal(qs.stringify({ a: SaferBuffer.from([1]) }, { - encoder: function (buffer) { - if (typeof buffer === 'string') { - return buffer; - } - return String.fromCharCode(buffer.readUInt8(0) + 97); - } - }), 'a=b'); - - st.equal(qs.stringify({ a: SaferBuffer.from('a b') }, { - encoder: function (buffer) { - return buffer; - } - }), 'a=a b'); - st.end(); - }); - - t.test('serializeDate option', function (st) { - var date = new Date(); - st.equal( - qs.stringify({ a: date }), - 'a=' + date.toISOString().replace(/:/g, '%3A'), - 'default is toISOString' - ); - - var mutatedDate = new Date(); - mutatedDate.toISOString = function () { - throw new SyntaxError(); - }; - st['throws'](function () { - mutatedDate.toISOString(); - }, SyntaxError); - st.equal( - qs.stringify({ a: mutatedDate }), - 'a=' + Date.prototype.toISOString.call(mutatedDate).replace(/:/g, '%3A'), - 'toISOString works even when method is not locally present' - ); - - var specificDate = new Date(6); - st.equal( - qs.stringify( - { a: specificDate }, - { serializeDate: function (d) { return d.getTime() * 7; } } - ), - 'a=42', - 'custom serializeDate function called' - ); - - st.equal( - qs.stringify( - { a: [date] }, - { - serializeDate: function (d) { return d.getTime(); }, - arrayFormat: 'comma' - } - ), - 'a=' + date.getTime(), - 'works with arrayFormat comma' - ); - st.equal( - qs.stringify( - { a: [date] }, - { - serializeDate: function (d) { return d.getTime(); }, - arrayFormat: 'comma', - commaRoundTrip: true - } - ), - 'a%5B%5D=' + date.getTime(), - 'works with arrayFormat comma' - ); - - st.end(); - }); - - t.test('RFC 1738 serialization', function (st) { - st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC1738 }), 'a=b+c'); - st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC1738 }), 'a+b=c+d'); - st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }, { format: qs.formats.RFC1738 }), 'a+b=a+b'); - - st.equal(qs.stringify({ 'foo(ref)': 'bar' }, { format: qs.formats.RFC1738 }), 'foo(ref)=bar'); - - st.end(); - }); - - t.test('RFC 3986 spaces serialization', function (st) { - st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC3986 }), 'a=b%20c'); - st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC3986 }), 'a%20b=c%20d'); - st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }, { format: qs.formats.RFC3986 }), 'a%20b=a%20b'); - - st.end(); - }); - - t.test('Backward compatibility to RFC 3986', function (st) { - st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c'); - st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }), 'a%20b=a%20b'); - - st.end(); - }); - - t.test('Edge cases and unknown formats', function (st) { - ['UFO1234', false, 1234, null, {}, []].forEach(function (format) { - st['throws']( - function () { - qs.stringify({ a: 'b c' }, { format: format }); - }, - new TypeError('Unknown format option provided.') - ); - }); - st.end(); - }); - - t.test('encodeValuesOnly', function (st) { - st.equal( - qs.stringify( - { a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] }, - { encodeValuesOnly: true, arrayFormat: 'indices' } - ), - 'a=b&c[0]=d&c[1]=e%3Df&f[0][0]=g&f[1][0]=h', - 'encodeValuesOnly + indices' - ); - st.equal( - qs.stringify( - { a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] }, - { encodeValuesOnly: true, arrayFormat: 'brackets' } - ), - 'a=b&c[]=d&c[]=e%3Df&f[][]=g&f[][]=h', - 'encodeValuesOnly + brackets' - ); - st.equal( - qs.stringify( - { a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] }, - { encodeValuesOnly: true, arrayFormat: 'repeat' } - ), - 'a=b&c=d&c=e%3Df&f=g&f=h', - 'encodeValuesOnly + repeat' - ); - - st.equal( - qs.stringify( - { a: 'b', c: ['d', 'e'], f: [['g'], ['h']] }, - { arrayFormat: 'indices' } - ), - 'a=b&c%5B0%5D=d&c%5B1%5D=e&f%5B0%5D%5B0%5D=g&f%5B1%5D%5B0%5D=h', - 'no encodeValuesOnly + indices' - ); - st.equal( - qs.stringify( - { a: 'b', c: ['d', 'e'], f: [['g'], ['h']] }, - { arrayFormat: 'brackets' } - ), - 'a=b&c%5B%5D=d&c%5B%5D=e&f%5B%5D%5B%5D=g&f%5B%5D%5B%5D=h', - 'no encodeValuesOnly + brackets' - ); - st.equal( - qs.stringify( - { a: 'b', c: ['d', 'e'], f: [['g'], ['h']] }, - { arrayFormat: 'repeat' } - ), - 'a=b&c=d&c=e&f=g&f=h', - 'no encodeValuesOnly + repeat' - ); - - st.end(); - }); - - t.test('encodeValuesOnly - strictNullHandling', function (st) { - st.equal( - qs.stringify( - { a: { b: null } }, - { encodeValuesOnly: true, strictNullHandling: true } - ), - 'a[b]' - ); - st.end(); - }); - - t.test('throws if an invalid charset is specified', function (st) { - st['throws'](function () { - qs.stringify({ a: 'b' }, { charset: 'foobar' }); - }, new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined')); - st.end(); - }); - - t.test('respects a charset of iso-8859-1', function (st) { - st.equal(qs.stringify({ æ: 'æ' }, { charset: 'iso-8859-1' }), '%E6=%E6'); - st.end(); - }); - - t.test('encodes unrepresentable chars as numeric entities in iso-8859-1 mode', function (st) { - st.equal(qs.stringify({ a: '☺' }, { charset: 'iso-8859-1' }), 'a=%26%239786%3B'); - st.end(); - }); - - t.test('respects an explicit charset of utf-8 (the default)', function (st) { - st.equal(qs.stringify({ a: 'æ' }, { charset: 'utf-8' }), 'a=%C3%A6'); - st.end(); - }); - - t.test('`charsetSentinel` option', function (st) { - st.equal( - qs.stringify({ a: 'æ' }, { charsetSentinel: true, charset: 'utf-8' }), - 'utf8=%E2%9C%93&a=%C3%A6', - 'adds the right sentinel when instructed to and the charset is utf-8' - ); - - st.equal( - qs.stringify({ a: 'æ' }, { charsetSentinel: true, charset: 'iso-8859-1' }), - 'utf8=%26%2310003%3B&a=%E6', - 'adds the right sentinel when instructed to and the charset is iso-8859-1' - ); - - st.end(); - }); - - t.test('does not mutate the options argument', function (st) { - var options = {}; - qs.stringify({}, options); - st.deepEqual(options, {}); - st.end(); - }); - - t.test('strictNullHandling works with custom filter', function (st) { - var filter = function (prefix, value) { - return value; - }; - - var options = { strictNullHandling: true, filter: filter }; - st.equal(qs.stringify({ key: null }, options), 'key'); - st.end(); - }); - - t.test('strictNullHandling works with null serializeDate', function (st) { - var serializeDate = function () { - return null; - }; - var options = { strictNullHandling: true, serializeDate: serializeDate }; - var date = new Date(); - st.equal(qs.stringify({ key: date }, options), 'key'); - st.end(); - }); - - t.test('allows for encoding keys and values differently', function (st) { - var encoder = function (str, defaultEncoder, charset, type) { - if (type === 'key') { - return defaultEncoder(str, defaultEncoder, charset, type).toLowerCase(); - } - if (type === 'value') { - return defaultEncoder(str, defaultEncoder, charset, type).toUpperCase(); - } - throw 'this should never happen! type: ' + type; - }; - - st.deepEqual(qs.stringify({ KeY: 'vAlUe' }, { encoder: encoder }), 'key=VALUE'); - st.end(); - }); - - t.test('objects inside arrays', function (st) { - var obj = { a: { b: { c: 'd', e: 'f' } } }; - var withArray = { a: { b: [{ c: 'd', e: 'f' }] } }; - - st.equal(qs.stringify(obj, { encode: false }), 'a[b][c]=d&a[b][e]=f', 'no array, no arrayFormat'); - st.equal(qs.stringify(obj, { encode: false, arrayFormat: 'brackets' }), 'a[b][c]=d&a[b][e]=f', 'no array, bracket'); - st.equal(qs.stringify(obj, { encode: false, arrayFormat: 'indices' }), 'a[b][c]=d&a[b][e]=f', 'no array, indices'); - st.equal(qs.stringify(obj, { encode: false, arrayFormat: 'repeat' }), 'a[b][c]=d&a[b][e]=f', 'no array, repeat'); - st.equal(qs.stringify(obj, { encode: false, arrayFormat: 'comma' }), 'a[b][c]=d&a[b][e]=f', 'no array, comma'); - - st.equal(qs.stringify(withArray, { encode: false }), 'a[b][0][c]=d&a[b][0][e]=f', 'array, no arrayFormat'); - st.equal(qs.stringify(withArray, { encode: false, arrayFormat: 'brackets' }), 'a[b][][c]=d&a[b][][e]=f', 'array, bracket'); - st.equal(qs.stringify(withArray, { encode: false, arrayFormat: 'indices' }), 'a[b][0][c]=d&a[b][0][e]=f', 'array, indices'); - st.equal(qs.stringify(withArray, { encode: false, arrayFormat: 'repeat' }), 'a[b][c]=d&a[b][e]=f', 'array, repeat'); - st.equal( - qs.stringify(withArray, { encode: false, arrayFormat: 'comma' }), - '???', - 'array, comma', - { skip: 'TODO: figure out what this should do' } - ); - - st.end(); - }); - - t.test('stringifies sparse arrays', function (st) { - /* eslint no-sparse-arrays: 0 */ - st.equal(qs.stringify({ a: [, '2', , , '1'] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[1]=2&a[4]=1'); - st.equal(qs.stringify({ a: [, '2', , , '1'] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[]=2&a[]=1'); - st.equal(qs.stringify({ a: [, '2', , , '1'] }, { encodeValuesOnly: true, arrayFormat: 'repeat' }), 'a=2&a=1'); - - st.equal(qs.stringify({ a: [, { b: [, , { c: '1' }] }] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[1][b][2][c]=1'); - st.equal(qs.stringify({ a: [, { b: [, , { c: '1' }] }] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[][b][][c]=1'); - st.equal(qs.stringify({ a: [, { b: [, , { c: '1' }] }] }, { encodeValuesOnly: true, arrayFormat: 'repeat' }), 'a[b][c]=1'); - - st.equal(qs.stringify({ a: [, [, , [, , , { c: '1' }]]] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[1][2][3][c]=1'); - st.equal(qs.stringify({ a: [, [, , [, , , { c: '1' }]]] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[][][][c]=1'); - st.equal(qs.stringify({ a: [, [, , [, , , { c: '1' }]]] }, { encodeValuesOnly: true, arrayFormat: 'repeat' }), 'a[c]=1'); - - st.equal(qs.stringify({ a: [, [, , [, , , { c: [, '1'] }]]] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[1][2][3][c][1]=1'); - st.equal(qs.stringify({ a: [, [, , [, , , { c: [, '1'] }]]] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[][][][c][]=1'); - st.equal(qs.stringify({ a: [, [, , [, , , { c: [, '1'] }]]] }, { encodeValuesOnly: true, arrayFormat: 'repeat' }), 'a[c]=1'); - - st.end(); - }); - - t.test('encodes a very long string', function (st) { - var chars = []; - var expected = []; - for (var i = 0; i < 5e3; i++) { - chars.push(' ' + i); - - expected.push('%20' + i); - } - - var obj = { - foo: chars.join('') - }; - - st.equal( - qs.stringify(obj, { arrayFormat: 'brackets', charset: 'utf-8' }), - 'foo=' + expected.join('') - ); - - st.end(); - }); - - t.end(); -}); - -test('stringifies empty keys', function (t) { - emptyTestCases.forEach(function (testCase) { - t.test('stringifies an object with empty string key with ' + testCase.input, function (st) { - st.deepEqual( - qs.stringify(testCase.withEmptyKeys, { encode: false, arrayFormat: 'indices' }), - testCase.stringifyOutput.indices, - 'test case: ' + testCase.input + ', indices' - ); - st.deepEqual( - qs.stringify(testCase.withEmptyKeys, { encode: false, arrayFormat: 'brackets' }), - testCase.stringifyOutput.brackets, - 'test case: ' + testCase.input + ', brackets' - ); - st.deepEqual( - qs.stringify(testCase.withEmptyKeys, { encode: false, arrayFormat: 'repeat' }), - testCase.stringifyOutput.repeat, - 'test case: ' + testCase.input + ', repeat' - ); - - st.end(); - }); - }); - - t.test('edge case with object/arrays', function (st) { - st.deepEqual(qs.stringify({ '': { '': [2, 3] } }, { encode: false }), '[][0]=2&[][1]=3'); - st.deepEqual(qs.stringify({ '': { '': [2, 3], a: 2 } }, { encode: false }), '[][0]=2&[][1]=3&[a]=2'); - st.deepEqual(qs.stringify({ '': { '': [2, 3] } }, { encode: false, arrayFormat: 'indices' }), '[][0]=2&[][1]=3'); - st.deepEqual(qs.stringify({ '': { '': [2, 3], a: 2 } }, { encode: false, arrayFormat: 'indices' }), '[][0]=2&[][1]=3&[a]=2'); - - st.end(); - }); - - t.test('stringifies non-string keys', function (st) { - var S = Object('abc'); - S.toString = function () { - return 'd'; - }; - var actual = qs.stringify({ a: 'b', 'false': {}, 1e+22: 'c', d: 'e' }, { - filter: ['a', false, null, 10000000000000000000000, S], - allowDots: true, - encodeDotInKeys: true - }); - - st.equal(actual, 'a=b&1e%2B22=c&d=e', 'stringifies correctly'); - - st.end(); - }); -}); diff --git a/node_modules/qs/test/utils.js b/node_modules/qs/test/utils.js deleted file mode 100644 index 65baea7..0000000 --- a/node_modules/qs/test/utils.js +++ /dev/null @@ -1,397 +0,0 @@ -'use strict'; - -var test = require('tape'); -var inspect = require('object-inspect'); -var SaferBuffer = require('safer-buffer').Buffer; -var forEach = require('for-each'); -var v = require('es-value-fixtures'); - -var utils = require('../lib/utils'); - -test('merge()', function (t) { - t.deepEqual(utils.merge(null, true), [null, true], 'merges true into null'); - - t.deepEqual(utils.merge(null, [42]), [null, 42], 'merges null into an array'); - - t.deepEqual(utils.merge({ a: 'b' }, { a: 'c' }), { a: ['b', 'c'] }, 'merges two objects with the same key'); - - var oneMerged = utils.merge({ foo: 'bar' }, { foo: { first: '123' } }); - t.deepEqual(oneMerged, { foo: ['bar', { first: '123' }] }, 'merges a standalone and an object into an array'); - - var twoMerged = utils.merge({ foo: ['bar', { first: '123' }] }, { foo: { second: '456' } }); - t.deepEqual(twoMerged, { foo: { 0: 'bar', 1: { first: '123' }, second: '456' } }, 'merges a standalone and two objects into an array'); - - var sandwiched = utils.merge({ foo: ['bar', { first: '123', second: '456' }] }, { foo: 'baz' }); - t.deepEqual(sandwiched, { foo: ['bar', { first: '123', second: '456' }, 'baz'] }, 'merges an object sandwiched by two standalones into an array'); - - var nestedArrays = utils.merge({ foo: ['baz'] }, { foo: ['bar', 'xyzzy'] }); - t.deepEqual(nestedArrays, { foo: ['baz', 'bar', 'xyzzy'] }); - - var noOptionsNonObjectSource = utils.merge({ foo: 'baz' }, 'bar'); - t.deepEqual(noOptionsNonObjectSource, { foo: 'baz', bar: true }); - - var func = function f() {}; - t.deepEqual( - utils.merge(func, { foo: 'bar' }), - [func, { foo: 'bar' }], - 'functions can not be merged into' - ); - - func.bar = 'baz'; - t.deepEqual( - utils.merge({ foo: 'bar' }, func), - { foo: 'bar', bar: 'baz' }, - 'functions can be merge sources' - ); - - t.test( - 'avoids invoking array setters unnecessarily', - { skip: typeof Object.defineProperty !== 'function' }, - function (st) { - var setCount = 0; - var getCount = 0; - var observed = []; - Object.defineProperty(observed, 0, { - get: function () { - getCount += 1; - return { bar: 'baz' }; - }, - set: function () { setCount += 1; } - }); - utils.merge(observed, [null]); - st.equal(setCount, 0); - st.equal(getCount, 1); - observed[0] = observed[0]; // eslint-disable-line no-self-assign - st.equal(setCount, 1); - st.equal(getCount, 2); - st.end(); - } - ); - - t.test('with overflow objects (from arrayLimit)', function (st) { - // arrayLimit is max index, so with limit 0, max index 0 is allowed (1 element) - // To create overflow, need 2+ elements with limit 0, or 3+ with limit 1, etc. - st.test('merges primitive into overflow object at next index', function (s2t) { - // Create an overflow object via combine: 3 elements (indices 0-2) with limit 0 - var overflow = utils.combine(['a', 'b'], 'c', 0, false); - s2t.ok(utils.isOverflow(overflow), 'overflow object is marked'); - var merged = utils.merge(overflow, 'd'); - s2t.deepEqual(merged, { 0: 'a', 1: 'b', 2: 'c', 3: 'd' }, 'adds primitive at next numeric index'); - s2t.end(); - }); - - st.test('merges primitive into regular object with numeric keys normally', function (s2t) { - var obj = { 0: 'a', 1: 'b' }; - s2t.notOk(utils.isOverflow(obj), 'plain object is not marked as overflow'); - var merged = utils.merge(obj, 'c'); - s2t.deepEqual(merged, { 0: 'a', 1: 'b', c: true }, 'adds primitive as key (not at next index)'); - s2t.end(); - }); - - st.test('merges primitive into object with non-numeric keys normally', function (s2t) { - var obj = { foo: 'bar' }; - var merged = utils.merge(obj, 'baz'); - s2t.deepEqual(merged, { foo: 'bar', baz: true }, 'adds primitive as key with value true'); - s2t.end(); - }); - - st.test('merges overflow object into primitive', function (s2t) { - // Create an overflow object via combine: 2 elements (indices 0-1) with limit 0 - var overflow = utils.combine(['a'], 'b', 0, false); - s2t.ok(utils.isOverflow(overflow), 'overflow object is marked'); - var merged = utils.merge('c', overflow); - s2t.ok(utils.isOverflow(merged), 'result is also marked as overflow'); - s2t.deepEqual(merged, { 0: 'c', 1: 'a', 2: 'b' }, 'creates object with primitive at 0, source values shifted'); - s2t.end(); - }); - - st.test('merges overflow object with multiple values into primitive', function (s2t) { - // Create an overflow object via combine: 3 elements (indices 0-2) with limit 0 - var overflow = utils.combine(['b', 'c'], 'd', 0, false); - s2t.ok(utils.isOverflow(overflow), 'overflow object is marked'); - var merged = utils.merge('a', overflow); - s2t.deepEqual(merged, { 0: 'a', 1: 'b', 2: 'c', 3: 'd' }, 'shifts all source indices by 1'); - s2t.end(); - }); - - st.test('merges regular object into primitive as array', function (s2t) { - var obj = { foo: 'bar' }; - var merged = utils.merge('a', obj); - s2t.deepEqual(merged, ['a', { foo: 'bar' }], 'creates array with primitive and object'); - s2t.end(); - }); - - st.end(); - }); - - t.end(); -}); - -test('assign()', function (t) { - var target = { a: 1, b: 2 }; - var source = { b: 3, c: 4 }; - var result = utils.assign(target, source); - - t.equal(result, target, 'returns the target'); - t.deepEqual(target, { a: 1, b: 3, c: 4 }, 'target and source are merged'); - t.deepEqual(source, { b: 3, c: 4 }, 'source is untouched'); - - t.end(); -}); - -test('combine()', function (t) { - t.test('both arrays', function (st) { - var a = [1]; - var b = [2]; - var combined = utils.combine(a, b); - - st.deepEqual(a, [1], 'a is not mutated'); - st.deepEqual(b, [2], 'b is not mutated'); - st.notEqual(a, combined, 'a !== combined'); - st.notEqual(b, combined, 'b !== combined'); - st.deepEqual(combined, [1, 2], 'combined is a + b'); - - st.end(); - }); - - t.test('one array, one non-array', function (st) { - var aN = 1; - var a = [aN]; - var bN = 2; - var b = [bN]; - - var combinedAnB = utils.combine(aN, b); - st.deepEqual(b, [bN], 'b is not mutated'); - st.notEqual(aN, combinedAnB, 'aN + b !== aN'); - st.notEqual(a, combinedAnB, 'aN + b !== a'); - st.notEqual(bN, combinedAnB, 'aN + b !== bN'); - st.notEqual(b, combinedAnB, 'aN + b !== b'); - st.deepEqual([1, 2], combinedAnB, 'first argument is array-wrapped when not an array'); - - var combinedABn = utils.combine(a, bN); - st.deepEqual(a, [aN], 'a is not mutated'); - st.notEqual(aN, combinedABn, 'a + bN !== aN'); - st.notEqual(a, combinedABn, 'a + bN !== a'); - st.notEqual(bN, combinedABn, 'a + bN !== bN'); - st.notEqual(b, combinedABn, 'a + bN !== b'); - st.deepEqual([1, 2], combinedABn, 'second argument is array-wrapped when not an array'); - - st.end(); - }); - - t.test('neither is an array', function (st) { - var combined = utils.combine(1, 2); - st.notEqual(1, combined, '1 + 2 !== 1'); - st.notEqual(2, combined, '1 + 2 !== 2'); - st.deepEqual([1, 2], combined, 'both arguments are array-wrapped when not an array'); - - st.end(); - }); - - t.test('with arrayLimit', function (st) { - st.test('under the limit', function (s2t) { - var combined = utils.combine(['a', 'b'], 'c', 10, false); - s2t.deepEqual(combined, ['a', 'b', 'c'], 'returns array when under limit'); - s2t.ok(Array.isArray(combined), 'result is an array'); - s2t.end(); - }); - - st.test('exactly at the limit stays as array', function (s2t) { - var combined = utils.combine(['a', 'b'], 'c', 3, false); - s2t.deepEqual(combined, ['a', 'b', 'c'], 'stays as array when count equals limit'); - s2t.ok(Array.isArray(combined), 'result is an array'); - s2t.end(); - }); - - st.test('over the limit', function (s2t) { - var combined = utils.combine(['a', 'b', 'c'], 'd', 3, false); - s2t.deepEqual(combined, { 0: 'a', 1: 'b', 2: 'c', 3: 'd' }, 'converts to object when over limit'); - s2t.notOk(Array.isArray(combined), 'result is not an array'); - s2t.end(); - }); - - st.test('with arrayLimit 1', function (s2t) { - var combined = utils.combine([], 'a', 1, false); - s2t.deepEqual(combined, ['a'], 'stays as array when count equals limit'); - s2t.ok(Array.isArray(combined), 'result is an array'); - s2t.end(); - }); - - st.test('with arrayLimit 0 converts single element to object', function (s2t) { - var combined = utils.combine([], 'a', 0, false); - s2t.deepEqual(combined, { 0: 'a' }, 'converts to object when count exceeds limit'); - s2t.notOk(Array.isArray(combined), 'result is not an array'); - s2t.end(); - }); - - st.test('with arrayLimit 0 and two elements converts to object', function (s2t) { - var combined = utils.combine(['a'], 'b', 0, false); - s2t.deepEqual(combined, { 0: 'a', 1: 'b' }, 'converts to object when count exceeds limit'); - s2t.notOk(Array.isArray(combined), 'result is not an array'); - s2t.end(); - }); - - st.test('with plainObjects option', function (s2t) { - var combined = utils.combine(['a', 'b'], 'c', 1, true); - var expected = { __proto__: null, 0: 'a', 1: 'b', 2: 'c' }; - s2t.deepEqual(combined, expected, 'converts to object with null prototype'); - s2t.equal(Object.getPrototypeOf(combined), null, 'result has null prototype when plainObjects is true'); - s2t.end(); - }); - - st.end(); - }); - - t.test('with existing overflow object', function (st) { - st.test('adds to existing overflow object at next index', function (s2t) { - // Create overflow object first via combine: 3 elements (indices 0-2) with limit 0 - var overflow = utils.combine(['a', 'b'], 'c', 0, false); - s2t.ok(utils.isOverflow(overflow), 'initial object is marked as overflow'); - - var combined = utils.combine(overflow, 'd', 10, false); - s2t.equal(combined, overflow, 'returns the same object (mutated)'); - s2t.deepEqual(combined, { 0: 'a', 1: 'b', 2: 'c', 3: 'd' }, 'adds value at next numeric index'); - s2t.end(); - }); - - st.test('does not treat plain object with numeric keys as overflow', function (s2t) { - var plainObj = { 0: 'a', 1: 'b' }; - s2t.notOk(utils.isOverflow(plainObj), 'plain object is not marked as overflow'); - - // combine treats this as a regular value, not an overflow object to append to - var combined = utils.combine(plainObj, 'c', 10, false); - s2t.deepEqual(combined, [{ 0: 'a', 1: 'b' }, 'c'], 'concatenates as regular values'); - s2t.end(); - }); - - st.end(); - }); - - t.end(); -}); - -test('decode', function (t) { - t.equal( - utils.decode('a+b'), - 'a b', - 'decodes + to space' - ); - - t.equal( - utils.decode('name%2Eobj'), - 'name.obj', - 'decodes a string' - ); - t.equal( - utils.decode('name%2Eobj%2Efoo', null, 'iso-8859-1'), - 'name.obj.foo', - 'decodes a string in iso-8859-1' - ); - - t.end(); -}); - -test('encode', function (t) { - forEach(v.nullPrimitives, function (nullish) { - t['throws']( - function () { utils.encode(nullish); }, - TypeError, - inspect(nullish) + ' is not a string' - ); - }); - - t.equal(utils.encode(''), '', 'empty string returns itself'); - t.deepEqual(utils.encode([]), [], 'empty array returns itself'); - t.deepEqual(utils.encode({ length: 0 }), { length: 0 }, 'empty arraylike returns itself'); - - t.test('symbols', { skip: !v.hasSymbols }, function (st) { - st.equal(utils.encode(Symbol('x')), 'Symbol%28x%29', 'symbol is encoded'); - - st.end(); - }); - - t.equal( - utils.encode('(abc)'), - '%28abc%29', - 'encodes parentheses' - ); - t.equal( - utils.encode({ toString: function () { return '(abc)'; } }), - '%28abc%29', - 'toStrings and encodes parentheses' - ); - - t.equal( - utils.encode('abc 123 💩', null, 'iso-8859-1'), - 'abc%20123%20%26%2355357%3B%26%2356489%3B', - 'encodes in iso-8859-1' - ); - - var longString = ''; - var expectedString = ''; - for (var i = 0; i < 1500; i++) { - longString += ' '; - expectedString += '%20'; - } - - t.equal( - utils.encode(longString), - expectedString, - 'encodes a long string' - ); - - t.equal( - utils.encode('\x28\x29'), - '%28%29', - 'encodes parens normally' - ); - t.equal( - utils.encode('\x28\x29', null, null, null, 'RFC1738'), - '()', - 'does not encode parens in RFC1738' - ); - - // todo RFC1738 format - - t.equal( - utils.encode('Āက豈'), - '%C4%80%E1%80%80%EF%A4%80', - 'encodes multibyte chars' - ); - - t.equal( - utils.encode('\uD83D \uDCA9'), - '%F0%9F%90%A0%F0%BA%90%80', - 'encodes lone surrogates' - ); - - t.end(); -}); - -test('isBuffer()', function (t) { - forEach([null, undefined, true, false, '', 'abc', 42, 0, NaN, {}, [], function () {}, /a/g], function (x) { - t.equal(utils.isBuffer(x), false, inspect(x) + ' is not a buffer'); - }); - - var fakeBuffer = { constructor: Buffer }; - t.equal(utils.isBuffer(fakeBuffer), false, 'fake buffer is not a buffer'); - - var saferBuffer = SaferBuffer.from('abc'); - t.equal(utils.isBuffer(saferBuffer), true, 'SaferBuffer instance is a buffer'); - - var buffer = Buffer.from && Buffer.alloc ? Buffer.from('abc') : new Buffer('abc'); - t.equal(utils.isBuffer(buffer), true, 'real Buffer instance is a buffer'); - t.end(); -}); - -test('isRegExp()', function (t) { - t.equal(utils.isRegExp(/a/g), true, 'RegExp is a RegExp'); - t.equal(utils.isRegExp(new RegExp('a', 'g')), true, 'new RegExp is a RegExp'); - t.equal(utils.isRegExp(new Date()), false, 'Date is not a RegExp'); - - forEach(v.primitives, function (primitive) { - t.equal(utils.isRegExp(primitive), false, inspect(primitive) + ' is not a RegExp'); - }); - - t.end(); -}); diff --git a/node_modules/range-parser/HISTORY.md b/node_modules/range-parser/HISTORY.md deleted file mode 100644 index 70a973d..0000000 --- a/node_modules/range-parser/HISTORY.md +++ /dev/null @@ -1,56 +0,0 @@ -1.2.1 / 2019-05-10 -================== - - * Improve error when `str` is not a string - -1.2.0 / 2016-06-01 -================== - - * Add `combine` option to combine overlapping ranges - -1.1.0 / 2016-05-13 -================== - - * Fix incorrectly returning -1 when there is at least one valid range - * perf: remove internal function - -1.0.3 / 2015-10-29 -================== - - * perf: enable strict mode - -1.0.2 / 2014-09-08 -================== - - * Support Node.js 0.6 - -1.0.1 / 2014-09-07 -================== - - * Move repository to jshttp - -1.0.0 / 2013-12-11 -================== - - * Add repository to package.json - * Add MIT license - -0.0.4 / 2012-06-17 -================== - - * Change ret -1 for unsatisfiable and -2 when invalid - -0.0.3 / 2012-06-17 -================== - - * Fix last-byte-pos default to len - 1 - -0.0.2 / 2012-06-14 -================== - - * Add `.type` - -0.0.1 / 2012-06-11 -================== - - * Initial release diff --git a/node_modules/range-parser/LICENSE b/node_modules/range-parser/LICENSE deleted file mode 100644 index 3599954..0000000 --- a/node_modules/range-parser/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2012-2014 TJ Holowaychuk -Copyright (c) 2015-2016 Douglas Christopher Wilson - -```js -var parseRange = require('range-parser') -``` - -### parseRange(size, header, options) - -Parse the given `header` string where `size` is the maximum size of the resource. -An array of ranges will be returned or negative numbers indicating an error parsing. - - * `-2` signals a malformed header string - * `-1` signals an unsatisfiable range - - - -```js -// parse header from request -var range = parseRange(size, req.headers.range) - -// the type of the range -if (range.type === 'bytes') { - // the ranges - range.forEach(function (r) { - // do something with r.start and r.end - }) -} -``` - -#### Options - -These properties are accepted in the options object. - -##### combine - -Specifies if overlapping & adjacent ranges should be combined, defaults to `false`. -When `true`, ranges will be combined and returned as if they were specified that -way in the header. - - - -```js -parseRange(100, 'bytes=50-55,0-10,5-10,56-60', { combine: true }) -// => [ -// { start: 0, end: 10 }, -// { start: 50, end: 60 } -// ] -``` - -## License - -[MIT](LICENSE) - -[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/range-parser/master -[coveralls-url]: https://coveralls.io/r/jshttp/range-parser?branch=master -[node-image]: https://badgen.net/npm/node/range-parser -[node-url]: https://nodejs.org/en/download -[npm-downloads-image]: https://badgen.net/npm/dm/range-parser -[npm-url]: https://npmjs.org/package/range-parser -[npm-version-image]: https://badgen.net/npm/v/range-parser -[travis-image]: https://badgen.net/travis/jshttp/range-parser/master -[travis-url]: https://travis-ci.org/jshttp/range-parser diff --git a/node_modules/range-parser/index.js b/node_modules/range-parser/index.js deleted file mode 100644 index b7dc5c0..0000000 --- a/node_modules/range-parser/index.js +++ /dev/null @@ -1,162 +0,0 @@ -/*! - * range-parser - * Copyright(c) 2012-2014 TJ Holowaychuk - * Copyright(c) 2015-2016 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module exports. - * @public - */ - -module.exports = rangeParser - -/** - * Parse "Range" header `str` relative to the given file `size`. - * - * @param {Number} size - * @param {String} str - * @param {Object} [options] - * @return {Array} - * @public - */ - -function rangeParser (size, str, options) { - if (typeof str !== 'string') { - throw new TypeError('argument str must be a string') - } - - var index = str.indexOf('=') - - if (index === -1) { - return -2 - } - - // split the range string - var arr = str.slice(index + 1).split(',') - var ranges = [] - - // add ranges type - ranges.type = str.slice(0, index) - - // parse all ranges - for (var i = 0; i < arr.length; i++) { - var range = arr[i].split('-') - var start = parseInt(range[0], 10) - var end = parseInt(range[1], 10) - - // -nnn - if (isNaN(start)) { - start = size - end - end = size - 1 - // nnn- - } else if (isNaN(end)) { - end = size - 1 - } - - // limit last-byte-pos to current length - if (end > size - 1) { - end = size - 1 - } - - // invalid or unsatisifiable - if (isNaN(start) || isNaN(end) || start > end || start < 0) { - continue - } - - // add range - ranges.push({ - start: start, - end: end - }) - } - - if (ranges.length < 1) { - // unsatisifiable - return -1 - } - - return options && options.combine - ? combineRanges(ranges) - : ranges -} - -/** - * Combine overlapping & adjacent ranges. - * @private - */ - -function combineRanges (ranges) { - var ordered = ranges.map(mapWithIndex).sort(sortByRangeStart) - - for (var j = 0, i = 1; i < ordered.length; i++) { - var range = ordered[i] - var current = ordered[j] - - if (range.start > current.end + 1) { - // next range - ordered[++j] = range - } else if (range.end > current.end) { - // extend range - current.end = range.end - current.index = Math.min(current.index, range.index) - } - } - - // trim ordered array - ordered.length = j + 1 - - // generate combined range - var combined = ordered.sort(sortByRangeIndex).map(mapWithoutIndex) - - // copy ranges type - combined.type = ranges.type - - return combined -} - -/** - * Map function to add index value to ranges. - * @private - */ - -function mapWithIndex (range, index) { - return { - start: range.start, - end: range.end, - index: index - } -} - -/** - * Map function to remove index value from ranges. - * @private - */ - -function mapWithoutIndex (range) { - return { - start: range.start, - end: range.end - } -} - -/** - * Sort function to sort ranges by index. - * @private - */ - -function sortByRangeIndex (a, b) { - return a.index - b.index -} - -/** - * Sort function to sort ranges by start position. - * @private - */ - -function sortByRangeStart (a, b) { - return a.start - b.start -} diff --git a/node_modules/range-parser/package.json b/node_modules/range-parser/package.json deleted file mode 100644 index abea6d8..0000000 --- a/node_modules/range-parser/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "range-parser", - "author": "TJ Holowaychuk (http://tjholowaychuk.com)", - "description": "Range header field string parser", - "version": "1.2.1", - "contributors": [ - "Douglas Christopher Wilson ", - "James Wyatt Cready ", - "Jonathan Ong (http://jongleberry.com)" - ], - "license": "MIT", - "keywords": [ - "range", - "parser", - "http" - ], - "repository": "jshttp/range-parser", - "devDependencies": { - "deep-equal": "1.0.1", - "eslint": "5.16.0", - "eslint-config-standard": "12.0.0", - "eslint-plugin-markdown": "1.0.0", - "eslint-plugin-import": "2.17.2", - "eslint-plugin-node": "8.0.1", - "eslint-plugin-promise": "4.1.1", - "eslint-plugin-standard": "4.0.0", - "mocha": "6.1.4", - "nyc": "14.1.1" - }, - "files": [ - "HISTORY.md", - "LICENSE", - "index.js" - ], - "engines": { - "node": ">= 0.6" - }, - "scripts": { - "lint": "eslint --plugin markdown --ext js,md .", - "test": "mocha --reporter spec", - "test-cov": "nyc --reporter=html --reporter=text npm test", - "test-travis": "nyc --reporter=text npm test" - } -} diff --git a/node_modules/raw-body/LICENSE b/node_modules/raw-body/LICENSE deleted file mode 100644 index 1029a7a..0000000 --- a/node_modules/raw-body/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013-2014 Jonathan Ong -Copyright (c) 2014-2022 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/raw-body/README.md b/node_modules/raw-body/README.md deleted file mode 100644 index d9b36d6..0000000 --- a/node_modules/raw-body/README.md +++ /dev/null @@ -1,223 +0,0 @@ -# raw-body - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build status][github-actions-ci-image]][github-actions-ci-url] -[![Test coverage][coveralls-image]][coveralls-url] - -Gets the entire buffer of a stream either as a `Buffer` or a string. -Validates the stream's length against an expected length and maximum limit. -Ideal for parsing request bodies. - -## Install - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```sh -$ npm install raw-body -``` - -### TypeScript - -This module includes a [TypeScript](https://www.typescriptlang.org/) -declaration file to enable auto complete in compatible editors and type -information for TypeScript projects. This module depends on the Node.js -types, so install `@types/node`: - -```sh -$ npm install @types/node -``` - -## API - -```js -var getRawBody = require('raw-body') -``` - -### getRawBody(stream, [options], [callback]) - -**Returns a promise if no callback specified and global `Promise` exists.** - -Options: - -- `length` - The length of the stream. - If the contents of the stream do not add up to this length, - an `400` error code is returned. -- `limit` - The byte limit of the body. - This is the number of bytes or any string format supported by - [bytes](https://www.npmjs.com/package/bytes), - for example `1000`, `'500kb'` or `'3mb'`. - If the body ends up being larger than this limit, - a `413` error code is returned. -- `encoding` - The encoding to use to decode the body into a string. - By default, a `Buffer` instance will be returned when no encoding is specified. - Most likely, you want `utf-8`, so setting `encoding` to `true` will decode as `utf-8`. - You can use any type of encoding supported by [iconv-lite](https://www.npmjs.org/package/iconv-lite#readme). - -You can also pass a string in place of options to just specify the encoding. - -If an error occurs, the stream will be paused, everything unpiped, -and you are responsible for correctly disposing the stream. -For HTTP requests, you may need to finish consuming the stream if -you want to keep the socket open for future requests. For streams -that use file descriptors, you should `stream.destroy()` or -`stream.close()` to prevent leaks. - -## Errors - -This module creates errors depending on the error condition during reading. -The error may be an error from the underlying Node.js implementation, but is -otherwise an error created by this module, which has the following attributes: - - * `limit` - the limit in bytes - * `length` and `expected` - the expected length of the stream - * `received` - the received bytes - * `encoding` - the invalid encoding - * `status` and `statusCode` - the corresponding status code for the error - * `type` - the error type - -### Types - -The errors from this module have a `type` property which allows for the programmatic -determination of the type of error returned. - -#### encoding.unsupported - -This error will occur when the `encoding` option is specified, but the value does -not map to an encoding supported by the [iconv-lite](https://www.npmjs.org/package/iconv-lite#readme) -module. - -#### entity.too.large - -This error will occur when the `limit` option is specified, but the stream has -an entity that is larger. - -#### request.aborted - -This error will occur when the request stream is aborted by the client before -reading the body has finished. - -#### request.size.invalid - -This error will occur when the `length` option is specified, but the stream has -emitted more bytes. - -#### stream.encoding.set - -This error will occur when the given stream has an encoding set on it, making it -a decoded stream. The stream should not have an encoding set and is expected to -emit `Buffer` objects. - -#### stream.not.readable - -This error will occur when the given stream is not readable. - -## Examples - -### Simple Express example - -```js -var contentType = require('content-type') -var express = require('express') -var getRawBody = require('raw-body') - -var app = express() - -app.use(function (req, res, next) { - getRawBody(req, { - length: req.headers['content-length'], - limit: '1mb', - encoding: contentType.parse(req).parameters.charset - }, function (err, string) { - if (err) return next(err) - req.text = string - next() - }) -}) - -// now access req.text -``` - -### Simple Koa example - -```js -var contentType = require('content-type') -var getRawBody = require('raw-body') -var koa = require('koa') - -var app = koa() - -app.use(function * (next) { - this.text = yield getRawBody(this.req, { - length: this.req.headers['content-length'], - limit: '1mb', - encoding: contentType.parse(this.req).parameters.charset - }) - yield next -}) - -// now access this.text -``` - -### Using as a promise - -To use this library as a promise, simply omit the `callback` and a promise is -returned, provided that a global `Promise` is defined. - -```js -var getRawBody = require('raw-body') -var http = require('http') - -var server = http.createServer(function (req, res) { - getRawBody(req) - .then(function (buf) { - res.statusCode = 200 - res.end(buf.length + ' bytes submitted') - }) - .catch(function (err) { - res.statusCode = 500 - res.end(err.message) - }) -}) - -server.listen(3000) -``` - -### Using with TypeScript - -```ts -import * as getRawBody from 'raw-body'; -import * as http from 'http'; - -const server = http.createServer((req, res) => { - getRawBody(req) - .then((buf) => { - res.statusCode = 200; - res.end(buf.length + ' bytes submitted'); - }) - .catch((err) => { - res.statusCode = err.statusCode; - res.end(err.message); - }); -}); - -server.listen(3000); -``` - -## License - -[MIT](LICENSE) - -[npm-image]: https://img.shields.io/npm/v/raw-body.svg -[npm-url]: https://npmjs.org/package/raw-body -[node-version-image]: https://img.shields.io/node/v/raw-body.svg -[node-version-url]: https://nodejs.org/en/download/ -[coveralls-image]: https://img.shields.io/coveralls/stream-utils/raw-body/master.svg -[coveralls-url]: https://coveralls.io/r/stream-utils/raw-body?branch=master -[downloads-image]: https://img.shields.io/npm/dm/raw-body.svg -[downloads-url]: https://npmjs.org/package/raw-body -[github-actions-ci-image]: https://img.shields.io/github/actions/workflow/status/stream-utils/raw-body/ci.yml?branch=master&label=ci -[github-actions-ci-url]: https://github.com/jshttp/stream-utils/raw-body?query=workflow%3Aci diff --git a/node_modules/raw-body/index.d.ts b/node_modules/raw-body/index.d.ts deleted file mode 100644 index dcbbebd..0000000 --- a/node_modules/raw-body/index.d.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { Readable } from 'stream'; - -declare namespace getRawBody { - export type Encoding = string | true; - - export interface Options { - /** - * The expected length of the stream. - */ - length?: number | string | null; - /** - * The byte limit of the body. This is the number of bytes or any string - * format supported by `bytes`, for example `1000`, `'500kb'` or `'3mb'`. - */ - limit?: number | string | null; - /** - * The encoding to use to decode the body into a string. By default, a - * `Buffer` instance will be returned when no encoding is specified. Most - * likely, you want `utf-8`, so setting encoding to `true` will decode as - * `utf-8`. You can use any type of encoding supported by `iconv-lite`. - */ - encoding?: Encoding | null; - } - - export interface RawBodyError extends Error { - /** - * The limit in bytes. - */ - limit?: number; - /** - * The expected length of the stream. - */ - length?: number; - expected?: number; - /** - * The received bytes. - */ - received?: number; - /** - * The encoding. - */ - encoding?: string; - /** - * The corresponding status code for the error. - */ - status: number; - statusCode: number; - /** - * The error type. - */ - type: string; - } -} - -/** - * Gets the entire buffer of a stream either as a `Buffer` or a string. - * Validates the stream's length against an expected length and maximum - * limit. Ideal for parsing request bodies. - */ -declare function getRawBody( - stream: Readable, - callback: (err: getRawBody.RawBodyError, body: Buffer) => void -): void; - -declare function getRawBody( - stream: Readable, - options: (getRawBody.Options & { encoding: getRawBody.Encoding }) | getRawBody.Encoding, - callback: (err: getRawBody.RawBodyError, body: string) => void -): void; - -declare function getRawBody( - stream: Readable, - options: getRawBody.Options, - callback: (err: getRawBody.RawBodyError, body: Buffer) => void -): void; - -declare function getRawBody( - stream: Readable, - options: (getRawBody.Options & { encoding: getRawBody.Encoding }) | getRawBody.Encoding -): Promise; - -declare function getRawBody( - stream: Readable, - options?: getRawBody.Options -): Promise; - -export = getRawBody; diff --git a/node_modules/raw-body/index.js b/node_modules/raw-body/index.js deleted file mode 100644 index 9cdcd12..0000000 --- a/node_modules/raw-body/index.js +++ /dev/null @@ -1,336 +0,0 @@ -/*! - * raw-body - * Copyright(c) 2013-2014 Jonathan Ong - * Copyright(c) 2014-2022 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -var asyncHooks = tryRequireAsyncHooks() -var bytes = require('bytes') -var createError = require('http-errors') -var iconv = require('iconv-lite') -var unpipe = require('unpipe') - -/** - * Module exports. - * @public - */ - -module.exports = getRawBody - -/** - * Module variables. - * @private - */ - -var ICONV_ENCODING_MESSAGE_REGEXP = /^Encoding not recognized: / - -/** - * Get the decoder for a given encoding. - * - * @param {string} encoding - * @private - */ - -function getDecoder (encoding) { - if (!encoding) return null - - try { - return iconv.getDecoder(encoding) - } catch (e) { - // error getting decoder - if (!ICONV_ENCODING_MESSAGE_REGEXP.test(e.message)) throw e - - // the encoding was not found - throw createError(415, 'specified encoding unsupported', { - encoding: encoding, - type: 'encoding.unsupported' - }) - } -} - -/** - * Get the raw body of a stream (typically HTTP). - * - * @param {object} stream - * @param {object|string|function} [options] - * @param {function} [callback] - * @public - */ - -function getRawBody (stream, options, callback) { - var done = callback - var opts = options || {} - - // light validation - if (stream === undefined) { - throw new TypeError('argument stream is required') - } else if (typeof stream !== 'object' || stream === null || typeof stream.on !== 'function') { - throw new TypeError('argument stream must be a stream') - } - - if (options === true || typeof options === 'string') { - // short cut for encoding - opts = { - encoding: options - } - } - - if (typeof options === 'function') { - done = options - opts = {} - } - - // validate callback is a function, if provided - if (done !== undefined && typeof done !== 'function') { - throw new TypeError('argument callback must be a function') - } - - // require the callback without promises - if (!done && !global.Promise) { - throw new TypeError('argument callback is required') - } - - // get encoding - var encoding = opts.encoding !== true - ? opts.encoding - : 'utf-8' - - // convert the limit to an integer - var limit = bytes.parse(opts.limit) - - // convert the expected length to an integer - var length = opts.length != null && !isNaN(opts.length) - ? parseInt(opts.length, 10) - : null - - if (done) { - // classic callback style - return readStream(stream, encoding, length, limit, wrap(done)) - } - - return new Promise(function executor (resolve, reject) { - readStream(stream, encoding, length, limit, function onRead (err, buf) { - if (err) return reject(err) - resolve(buf) - }) - }) -} - -/** - * Halt a stream. - * - * @param {Object} stream - * @private - */ - -function halt (stream) { - // unpipe everything from the stream - unpipe(stream) - - // pause stream - if (typeof stream.pause === 'function') { - stream.pause() - } -} - -/** - * Read the data from the stream. - * - * @param {object} stream - * @param {string} encoding - * @param {number} length - * @param {number} limit - * @param {function} callback - * @public - */ - -function readStream (stream, encoding, length, limit, callback) { - var complete = false - var sync = true - - // check the length and limit options. - // note: we intentionally leave the stream paused, - // so users should handle the stream themselves. - if (limit !== null && length !== null && length > limit) { - return done(createError(413, 'request entity too large', { - expected: length, - length: length, - limit: limit, - type: 'entity.too.large' - })) - } - - // streams1: assert request encoding is buffer. - // streams2+: assert the stream encoding is buffer. - // stream._decoder: streams1 - // state.encoding: streams2 - // state.decoder: streams2, specifically < 0.10.6 - var state = stream._readableState - if (stream._decoder || (state && (state.encoding || state.decoder))) { - // developer error - return done(createError(500, 'stream encoding should not be set', { - type: 'stream.encoding.set' - })) - } - - if (typeof stream.readable !== 'undefined' && !stream.readable) { - return done(createError(500, 'stream is not readable', { - type: 'stream.not.readable' - })) - } - - var received = 0 - var decoder - - try { - decoder = getDecoder(encoding) - } catch (err) { - return done(err) - } - - var buffer = decoder - ? '' - : [] - - // attach listeners - stream.on('aborted', onAborted) - stream.on('close', cleanup) - stream.on('data', onData) - stream.on('end', onEnd) - stream.on('error', onEnd) - - // mark sync section complete - sync = false - - function done () { - var args = new Array(arguments.length) - - // copy arguments - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - - // mark complete - complete = true - - if (sync) { - process.nextTick(invokeCallback) - } else { - invokeCallback() - } - - function invokeCallback () { - cleanup() - - if (args[0]) { - // halt the stream on error - halt(stream) - } - - callback.apply(null, args) - } - } - - function onAborted () { - if (complete) return - - done(createError(400, 'request aborted', { - code: 'ECONNABORTED', - expected: length, - length: length, - received: received, - type: 'request.aborted' - })) - } - - function onData (chunk) { - if (complete) return - - received += chunk.length - - if (limit !== null && received > limit) { - done(createError(413, 'request entity too large', { - limit: limit, - received: received, - type: 'entity.too.large' - })) - } else if (decoder) { - buffer += decoder.write(chunk) - } else { - buffer.push(chunk) - } - } - - function onEnd (err) { - if (complete) return - if (err) return done(err) - - if (length !== null && received !== length) { - done(createError(400, 'request size did not match content length', { - expected: length, - length: length, - received: received, - type: 'request.size.invalid' - })) - } else { - var string = decoder - ? buffer + (decoder.end() || '') - : Buffer.concat(buffer) - done(null, string) - } - } - - function cleanup () { - buffer = null - - stream.removeListener('aborted', onAborted) - stream.removeListener('data', onData) - stream.removeListener('end', onEnd) - stream.removeListener('error', onEnd) - stream.removeListener('close', cleanup) - } -} - -/** - * Try to require async_hooks - * @private - */ - -function tryRequireAsyncHooks () { - try { - return require('async_hooks') - } catch (e) { - return {} - } -} - -/** - * Wrap function with async resource, if possible. - * AsyncResource.bind static method backported. - * @private - */ - -function wrap (fn) { - var res - - // create anonymous resource - if (asyncHooks.AsyncResource) { - res = new asyncHooks.AsyncResource(fn.name || 'bound-anonymous-fn') - } - - // incompatible node.js - if (!res || !res.runInAsyncScope) { - return fn - } - - // return bound function - return res.runInAsyncScope.bind(res, fn, null) -} diff --git a/node_modules/raw-body/package.json b/node_modules/raw-body/package.json deleted file mode 100644 index d8120af..0000000 --- a/node_modules/raw-body/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "raw-body", - "description": "Get and validate the raw body of a readable stream.", - "version": "2.5.3", - "author": "Jonathan Ong (http://jongleberry.com)", - "contributors": [ - "Douglas Christopher Wilson ", - "Raynos " - ], - "license": "MIT", - "repository": "stream-utils/raw-body", - "dependencies": { - "bytes": "~3.1.2", - "http-errors": "~2.0.1", - "iconv-lite": "~0.4.24", - "unpipe": "~1.0.0" - }, - "devDependencies": { - "bluebird": "3.7.2", - "eslint": "8.34.0", - "eslint-config-standard": "15.0.1", - "eslint-plugin-import": "2.27.5", - "eslint-plugin-markdown": "3.0.0", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "6.1.1", - "eslint-plugin-standard": "4.1.0", - "mocha": "10.2.0", - "nyc": "15.1.0", - "readable-stream": "2.3.7", - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.8" - }, - "files": [ - "LICENSE", - "README.md", - "index.d.ts", - "index.js" - ], - "scripts": { - "lint": "eslint .", - "test": "mocha --trace-deprecation --reporter spec --bail --check-leaks test/", - "test-ci": "nyc --reporter=lcovonly --reporter=text npm test", - "test-cov": "nyc --reporter=html --reporter=text npm test" - } -} diff --git a/node_modules/readable-stream/CONTRIBUTING.md b/node_modules/readable-stream/CONTRIBUTING.md deleted file mode 100644 index f478d58..0000000 --- a/node_modules/readable-stream/CONTRIBUTING.md +++ /dev/null @@ -1,38 +0,0 @@ -# Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -* (a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -* (b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -* (c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -* (d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. - -## Moderation Policy - -The [Node.js Moderation Policy] applies to this WG. - -## Code of Conduct - -The [Node.js Code of Conduct][] applies to this WG. - -[Node.js Code of Conduct]: -https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md -[Node.js Moderation Policy]: -https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/node_modules/readable-stream/GOVERNANCE.md b/node_modules/readable-stream/GOVERNANCE.md deleted file mode 100644 index 16ffb93..0000000 --- a/node_modules/readable-stream/GOVERNANCE.md +++ /dev/null @@ -1,136 +0,0 @@ -### Streams Working Group - -The Node.js Streams is jointly governed by a Working Group -(WG) -that is responsible for high-level guidance of the project. - -The WG has final authority over this project including: - -* Technical direction -* Project governance and process (including this policy) -* Contribution policy -* GitHub repository hosting -* Conduct guidelines -* Maintaining the list of additional Collaborators - -For the current list of WG members, see the project -[README.md](./README.md#current-project-team-members). - -### Collaborators - -The readable-stream GitHub repository is -maintained by the WG and additional Collaborators who are added by the -WG on an ongoing basis. - -Individuals making significant and valuable contributions are made -Collaborators and given commit-access to the project. These -individuals are identified by the WG and their addition as -Collaborators is discussed during the WG meeting. - -_Note:_ If you make a significant contribution and are not considered -for commit-access log an issue or contact a WG member directly and it -will be brought up in the next WG meeting. - -Modifications of the contents of the readable-stream repository are -made on -a collaborative basis. Anybody with a GitHub account may propose a -modification via pull request and it will be considered by the project -Collaborators. All pull requests must be reviewed and accepted by a -Collaborator with sufficient expertise who is able to take full -responsibility for the change. In the case of pull requests proposed -by an existing Collaborator, an additional Collaborator is required -for sign-off. Consensus should be sought if additional Collaborators -participate and there is disagreement around a particular -modification. See _Consensus Seeking Process_ below for further detail -on the consensus model used for governance. - -Collaborators may opt to elevate significant or controversial -modifications, or modifications that have not found consensus to the -WG for discussion by assigning the ***WG-agenda*** tag to a pull -request or issue. The WG should serve as the final arbiter where -required. - -For the current list of Collaborators, see the project -[README.md](./README.md#members). - -### WG Membership - -WG seats are not time-limited. There is no fixed size of the WG. -However, the expected target is between 6 and 12, to ensure adequate -coverage of important areas of expertise, balanced with the ability to -make decisions efficiently. - -There is no specific set of requirements or qualifications for WG -membership beyond these rules. - -The WG may add additional members to the WG by unanimous consensus. - -A WG member may be removed from the WG by voluntary resignation, or by -unanimous consensus of all other WG members. - -Changes to WG membership should be posted in the agenda, and may be -suggested as any other agenda item (see "WG Meetings" below). - -If an addition or removal is proposed during a meeting, and the full -WG is not in attendance to participate, then the addition or removal -is added to the agenda for the subsequent meeting. This is to ensure -that all members are given the opportunity to participate in all -membership decisions. If a WG member is unable to attend a meeting -where a planned membership decision is being made, then their consent -is assumed. - -No more than 1/3 of the WG members may be affiliated with the same -employer. If removal or resignation of a WG member, or a change of -employment by a WG member, creates a situation where more than 1/3 of -the WG membership shares an employer, then the situation must be -immediately remedied by the resignation or removal of one or more WG -members affiliated with the over-represented employer(s). - -### WG Meetings - -The WG meets occasionally on a Google Hangout On Air. A designated moderator -approved by the WG runs the meeting. Each meeting should be -published to YouTube. - -Items are added to the WG agenda that are considered contentious or -are modifications of governance, contribution policy, WG membership, -or release process. - -The intention of the agenda is not to approve or review all patches; -that should happen continuously on GitHub and be handled by the larger -group of Collaborators. - -Any community member or contributor can ask that something be added to -the next meeting's agenda by logging a GitHub Issue. Any Collaborator, -WG member or the moderator can add the item to the agenda by adding -the ***WG-agenda*** tag to the issue. - -Prior to each WG meeting the moderator will share the Agenda with -members of the WG. WG members can add any items they like to the -agenda at the beginning of each meeting. The moderator and the WG -cannot veto or remove items. - -The WG may invite persons or representatives from certain projects to -participate in a non-voting capacity. - -The moderator is responsible for summarizing the discussion of each -agenda item and sends it as a pull request after the meeting. - -### Consensus Seeking Process - -The WG follows a -[Consensus -Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) -decision-making model. - -When an agenda item has appeared to reach a consensus the moderator -will ask "Does anyone object?" as a final call for dissent from the -consensus. - -If an agenda item cannot reach a consensus a WG member can call for -either a closing vote or a vote to table the issue to the next -meeting. The call for a vote must be seconded by a majority of the WG -or else the discussion will continue. Simple majority wins. - -Note that changes to WG membership require a majority consensus. See -"WG Membership" above. diff --git a/node_modules/readable-stream/LICENSE b/node_modules/readable-stream/LICENSE deleted file mode 100644 index 2873b3b..0000000 --- a/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Node.js is licensed for use as follows: - -""" -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" - -This license applies to parts of Node.js originating from the -https://github.com/joyent/node repository: - -""" -Copyright Joyent, Inc. and other Node contributors. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -""" diff --git a/node_modules/readable-stream/README.md b/node_modules/readable-stream/README.md deleted file mode 100644 index 19117c1..0000000 --- a/node_modules/readable-stream/README.md +++ /dev/null @@ -1,106 +0,0 @@ -# readable-stream - -***Node.js core streams for userland*** [![Build Status](https://travis-ci.com/nodejs/readable-stream.svg?branch=master)](https://travis-ci.com/nodejs/readable-stream) - - -[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) -[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) - - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/readabe-stream.svg)](https://saucelabs.com/u/readabe-stream) - -```bash -npm install --save readable-stream -``` - -This package is a mirror of the streams implementations in Node.js. - -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.18.1/docs/api/stream.html). - -If you want to guarantee a stable streams base, regardless of what version of -Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). - -As of version 2.0.0 **readable-stream** uses semantic versioning. - -## Version 3.x.x - -v3.x.x of `readable-stream` is a cut from Node 10. This version supports Node 6, 8, and 10, as well as evergreen browsers, IE 11 and latest Safari. The breaking changes introduced by v3 are composed by the combined breaking changes in [Node v9](https://nodejs.org/en/blog/release/v9.0.0/) and [Node v10](https://nodejs.org/en/blog/release/v10.0.0/), as follows: - -1. Error codes: https://github.com/nodejs/node/pull/13310, - https://github.com/nodejs/node/pull/13291, - https://github.com/nodejs/node/pull/16589, - https://github.com/nodejs/node/pull/15042, - https://github.com/nodejs/node/pull/15665, - https://github.com/nodejs/readable-stream/pull/344 -2. 'readable' have precedence over flowing - https://github.com/nodejs/node/pull/18994 -3. make virtual methods errors consistent - https://github.com/nodejs/node/pull/18813 -4. updated streams error handling - https://github.com/nodejs/node/pull/18438 -5. writable.end should return this. - https://github.com/nodejs/node/pull/18780 -6. readable continues to read when push('') - https://github.com/nodejs/node/pull/18211 -7. add custom inspect to BufferList - https://github.com/nodejs/node/pull/17907 -8. always defer 'readable' with nextTick - https://github.com/nodejs/node/pull/17979 - -## Version 2.x.x -v2.x.x of `readable-stream` is a cut of the stream module from Node 8 (there have been no semver-major changes from Node 4 to 8). This version supports all Node.js versions from 0.8, as well as evergreen browsers and IE 10 & 11. - -### Big Thanks - -Cross-browser Testing Platform and Open Source <3 Provided by [Sauce Labs][sauce] - -# Usage - -You can swap your `require('stream')` with `require('readable-stream')` -without any changes, if you are just using one of the main classes and -functions. - -```js -const { - Readable, - Writable, - Transform, - Duplex, - pipeline, - finished -} = require('readable-stream') -```` - -Note that `require('stream')` will return `Stream`, while -`require('readable-stream')` will return `Readable`. We discourage using -whatever is exported directly, but rather use one of the properties as -shown in the example above. - -# Streams Working Group - -`readable-stream` is maintained by the Streams Working Group, which -oversees the development and maintenance of the Streams API within -Node.js. The responsibilities of the Streams Working Group include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this - project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance - notice of changes. - - -## Team Members - -* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> - - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 -* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> -* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> - - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E -* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com> -* **Yoshua Wyuts** ([@yoshuawuyts](https://github.com/yoshuawuyts)) <yoshuawuyts@gmail.com> - -[sauce]: https://saucelabs.com diff --git a/node_modules/readable-stream/errors-browser.js b/node_modules/readable-stream/errors-browser.js deleted file mode 100644 index fb8e73e..0000000 --- a/node_modules/readable-stream/errors-browser.js +++ /dev/null @@ -1,127 +0,0 @@ -'use strict'; - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } - -var codes = {}; - -function createErrorType(code, message, Base) { - if (!Base) { - Base = Error; - } - - function getMessage(arg1, arg2, arg3) { - if (typeof message === 'string') { - return message; - } else { - return message(arg1, arg2, arg3); - } - } - - var NodeError = - /*#__PURE__*/ - function (_Base) { - _inheritsLoose(NodeError, _Base); - - function NodeError(arg1, arg2, arg3) { - return _Base.call(this, getMessage(arg1, arg2, arg3)) || this; - } - - return NodeError; - }(Base); - - NodeError.prototype.name = Base.name; - NodeError.prototype.code = code; - codes[code] = NodeError; -} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js - - -function oneOf(expected, thing) { - if (Array.isArray(expected)) { - var len = expected.length; - expected = expected.map(function (i) { - return String(i); - }); - - if (len > 2) { - return "one of ".concat(thing, " ").concat(expected.slice(0, len - 1).join(', '), ", or ") + expected[len - 1]; - } else if (len === 2) { - return "one of ".concat(thing, " ").concat(expected[0], " or ").concat(expected[1]); - } else { - return "of ".concat(thing, " ").concat(expected[0]); - } - } else { - return "of ".concat(thing, " ").concat(String(expected)); - } -} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith - - -function startsWith(str, search, pos) { - return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; -} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith - - -function endsWith(str, search, this_len) { - if (this_len === undefined || this_len > str.length) { - this_len = str.length; - } - - return str.substring(this_len - search.length, this_len) === search; -} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes - - -function includes(str, search, start) { - if (typeof start !== 'number') { - start = 0; - } - - if (start + search.length > str.length) { - return false; - } else { - return str.indexOf(search, start) !== -1; - } -} - -createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) { - return 'The value "' + value + '" is invalid for option "' + name + '"'; -}, TypeError); -createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) { - // determiner: 'must be' or 'must not be' - var determiner; - - if (typeof expected === 'string' && startsWith(expected, 'not ')) { - determiner = 'must not be'; - expected = expected.replace(/^not /, ''); - } else { - determiner = 'must be'; - } - - var msg; - - if (endsWith(name, ' argument')) { - // For cases like 'first argument' - msg = "The ".concat(name, " ").concat(determiner, " ").concat(oneOf(expected, 'type')); - } else { - var type = includes(name, '.') ? 'property' : 'argument'; - msg = "The \"".concat(name, "\" ").concat(type, " ").concat(determiner, " ").concat(oneOf(expected, 'type')); - } - - msg += ". Received type ".concat(typeof actual); - return msg; -}, TypeError); -createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF'); -createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) { - return 'The ' + name + ' method is not implemented'; -}); -createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close'); -createErrorType('ERR_STREAM_DESTROYED', function (name) { - return 'Cannot call ' + name + ' after a stream was destroyed'; -}); -createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times'); -createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable'); -createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end'); -createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError); -createErrorType('ERR_UNKNOWN_ENCODING', function (arg) { - return 'Unknown encoding: ' + arg; -}, TypeError); -createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event'); -module.exports.codes = codes; diff --git a/node_modules/readable-stream/errors.js b/node_modules/readable-stream/errors.js deleted file mode 100644 index 8471526..0000000 --- a/node_modules/readable-stream/errors.js +++ /dev/null @@ -1,116 +0,0 @@ -'use strict'; - -const codes = {}; - -function createErrorType(code, message, Base) { - if (!Base) { - Base = Error - } - - function getMessage (arg1, arg2, arg3) { - if (typeof message === 'string') { - return message - } else { - return message(arg1, arg2, arg3) - } - } - - class NodeError extends Base { - constructor (arg1, arg2, arg3) { - super(getMessage(arg1, arg2, arg3)); - } - } - - NodeError.prototype.name = Base.name; - NodeError.prototype.code = code; - - codes[code] = NodeError; -} - -// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js -function oneOf(expected, thing) { - if (Array.isArray(expected)) { - const len = expected.length; - expected = expected.map((i) => String(i)); - if (len > 2) { - return `one of ${thing} ${expected.slice(0, len - 1).join(', ')}, or ` + - expected[len - 1]; - } else if (len === 2) { - return `one of ${thing} ${expected[0]} or ${expected[1]}`; - } else { - return `of ${thing} ${expected[0]}`; - } - } else { - return `of ${thing} ${String(expected)}`; - } -} - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith -function startsWith(str, search, pos) { - return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; -} - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith -function endsWith(str, search, this_len) { - if (this_len === undefined || this_len > str.length) { - this_len = str.length; - } - return str.substring(this_len - search.length, this_len) === search; -} - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes -function includes(str, search, start) { - if (typeof start !== 'number') { - start = 0; - } - - if (start + search.length > str.length) { - return false; - } else { - return str.indexOf(search, start) !== -1; - } -} - -createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) { - return 'The value "' + value + '" is invalid for option "' + name + '"' -}, TypeError); -createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) { - // determiner: 'must be' or 'must not be' - let determiner; - if (typeof expected === 'string' && startsWith(expected, 'not ')) { - determiner = 'must not be'; - expected = expected.replace(/^not /, ''); - } else { - determiner = 'must be'; - } - - let msg; - if (endsWith(name, ' argument')) { - // For cases like 'first argument' - msg = `The ${name} ${determiner} ${oneOf(expected, 'type')}`; - } else { - const type = includes(name, '.') ? 'property' : 'argument'; - msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, 'type')}`; - } - - msg += `. Received type ${typeof actual}`; - return msg; -}, TypeError); -createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF'); -createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) { - return 'The ' + name + ' method is not implemented' -}); -createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close'); -createErrorType('ERR_STREAM_DESTROYED', function (name) { - return 'Cannot call ' + name + ' after a stream was destroyed'; -}); -createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times'); -createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable'); -createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end'); -createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError); -createErrorType('ERR_UNKNOWN_ENCODING', function (arg) { - return 'Unknown encoding: ' + arg -}, TypeError); -createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event'); - -module.exports.codes = codes; diff --git a/node_modules/readable-stream/experimentalWarning.js b/node_modules/readable-stream/experimentalWarning.js deleted file mode 100644 index 78e8414..0000000 --- a/node_modules/readable-stream/experimentalWarning.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict' - -var experimentalWarnings = new Set(); - -function emitExperimentalWarning(feature) { - if (experimentalWarnings.has(feature)) return; - var msg = feature + ' is an experimental feature. This feature could ' + - 'change at any time'; - experimentalWarnings.add(feature); - process.emitWarning(msg, 'ExperimentalWarning'); -} - -function noop() {} - -module.exports.emitExperimentalWarning = process.emitWarning - ? emitExperimentalWarning - : noop; diff --git a/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index 19abfa6..0000000 --- a/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -'use strict'; - -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) keys.push(key); - return keys; -}; -/**/ - -module.exports = Duplex; -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); -require('inherits')(Duplex, Readable); -{ - // Allow the keys array to be GC'ed. - var keys = objectKeys(Writable.prototype); - for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; - } -} -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - Readable.call(this, options); - Writable.call(this, options); - this.allowHalfOpen = true; - if (options) { - if (options.readable === false) this.readable = false; - if (options.writable === false) this.writable = false; - if (options.allowHalfOpen === false) { - this.allowHalfOpen = false; - this.once('end', onend); - } - } -} -Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.highWaterMark; - } -}); -Object.defineProperty(Duplex.prototype, 'writableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState && this._writableState.getBuffer(); - } -}); -Object.defineProperty(Duplex.prototype, 'writableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.length; - } -}); - -// the no-half-open enforcer -function onend() { - // If the writable side ended, then we're ok. - if (this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - process.nextTick(onEndNT, this); -} -function onEndNT(self) { - self.end(); -} -Object.defineProperty(Duplex.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._readableState === undefined || this._writableState === undefined) { - return false; - } - return this._readableState.destroyed && this._writableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (this._readableState === undefined || this._writableState === undefined) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - this._writableState.destroyed = value; - } -}); \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 24a6bdd..0000000 --- a/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -'use strict'; - -module.exports = PassThrough; -var Transform = require('./_stream_transform'); -require('inherits')(PassThrough, Transform); -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - Transform.call(this, options); -} -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index df1f608..0000000 --- a/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,1027 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -'use strict'; - -module.exports = Readable; - -/**/ -var Duplex; -/**/ - -Readable.ReadableState = ReadableState; - -/**/ -var EE = require('events').EventEmitter; -var EElistenerCount = function EElistenerCount(emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -/**/ -var Stream = require('./internal/streams/stream'); -/**/ - -var Buffer = require('buffer').Buffer; -var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/**/ -var debugUtil = require('util'); -var debug; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function debug() {}; -} -/**/ - -var BufferList = require('./internal/streams/buffer_list'); -var destroyImpl = require('./internal/streams/destroy'); -var _require = require('./internal/streams/state'), - getHighWaterMark = _require.getHighWaterMark; -var _require$codes = require('../errors').codes, - ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, - ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF, - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; - -// Lazy loaded to improve the startup performance. -var StringDecoder; -var createReadableStreamAsyncIterator; -var from; -require('inherits')(Readable, Stream); -var errorOrDestroy = destroyImpl.errorOrDestroy; -var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; -function prependListener(emitter, event, fn) { - // Sadly this is not cacheable as some libraries bundle their own - // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); - - // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -} -function ReadableState(options, stream, isDuplex) { - Duplex = Duplex || require('./_stream_duplex'); - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); - - // A linked list is used to store data chunks instead of an array because the - // linked list can remove elements from the beginning faster than - // array.shift() - this.buffer = new BufferList(); - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the event 'readable'/'data' is emitted - // immediately, or on a later tick. We set this to true at first, because - // any actions that shouldn't happen until "later" should generally also - // not happen before the first read call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - this.paused = true; - - // Should close be emitted on destroy. Defaults to true. - this.emitClose = options.emitClose !== false; - - // Should .destroy() be called after 'end' (and potentially 'finish') - this.autoDestroy = !!options.autoDestroy; - - // has it been destroyed - this.destroyed = false; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} -function Readable(options) { - Duplex = Duplex || require('./_stream_duplex'); - if (!(this instanceof Readable)) return new Readable(options); - - // Checking for a Stream.Duplex instance is faster here instead of inside - // the ReadableState constructor, at least with V8 6.5 - var isDuplex = this instanceof Duplex; - this._readableState = new ReadableState(options, this, isDuplex); - - // legacy - this.readable = true; - if (options) { - if (typeof options.read === 'function') this._read = options.read; - if (typeof options.destroy === 'function') this._destroy = options.destroy; - } - Stream.call(this); -} -Object.defineProperty(Readable.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._readableState === undefined) { - return false; - } - return this._readableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._readableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - } -}); -Readable.prototype.destroy = destroyImpl.destroy; -Readable.prototype._undestroy = destroyImpl.undestroy; -Readable.prototype._destroy = function (err, cb) { - cb(err); -}; - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - var skipChunkCheck; - if (!state.objectMode) { - if (typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = Buffer.from(chunk, encoding); - encoding = ''; - } - skipChunkCheck = true; - } - } else { - skipChunkCheck = true; - } - return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - return readableAddChunk(this, chunk, null, true, false); -}; -function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { - debug('readableAddChunk', chunk); - var state = stream._readableState; - if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else { - var er; - if (!skipChunkCheck) er = chunkInvalid(state, chunk); - if (er) { - errorOrDestroy(stream, er); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { - chunk = _uint8ArrayToBuffer(chunk); - } - if (addToFront) { - if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true); - } else if (state.ended) { - errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF()); - } else if (state.destroyed) { - return false; - } else { - state.reading = false; - if (state.decoder && !encoding) { - chunk = state.decoder.write(chunk); - if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); - } else { - addChunk(stream, state, chunk, false); - } - } - } else if (!addToFront) { - state.reading = false; - maybeReadMore(stream, state); - } - } - - // We can push more data if we are below the highWaterMark. - // Also, if we have no data yet, we can stand some more bytes. - // This is to work around cases where hwm=0, such as the repl. - return !state.ended && (state.length < state.highWaterMark || state.length === 0); -} -function addChunk(stream, state, chunk, addToFront) { - if (state.flowing && state.length === 0 && !state.sync) { - state.awaitDrain = 0; - stream.emit('data', chunk); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - if (state.needReadable) emitReadable(stream); - } - maybeReadMore(stream, state); -} -function chunkInvalid(state, chunk) { - var er; - if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk); - } - return er; -} -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; - var decoder = new StringDecoder(enc); - this._readableState.decoder = decoder; - // If setEncoding(null), decoder.encoding equals utf8 - this._readableState.encoding = this._readableState.decoder.encoding; - - // Iterate over current buffer to convert already stored Buffers: - var p = this._readableState.buffer.head; - var content = ''; - while (p !== null) { - content += decoder.write(p.data); - p = p.next; - } - this._readableState.buffer.clear(); - if (content !== '') this._readableState.buffer.push(content); - this._readableState.length = content.length; - return this; -}; - -// Don't raise the hwm > 1GB -var MAX_HWM = 0x40000000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE. - n = MAX_HWM; - } else { - // Get the next highest power of 2 to prevent increasing hwm excessively in - // tiny amounts - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} - -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function howMuchToRead(n, state) { - if (n <= 0 || state.length === 0 && state.ended) return 0; - if (state.objectMode) return 1; - if (n !== n) { - // Only flow one buffer at a time - if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; - } - // If we're asking for more than the current hwm, then raise the hwm. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - if (n <= state.length) return n; - // Don't have enough - if (!state.ended) { - state.needReadable = true; - return 0; - } - return state.length; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - n = parseInt(n, 10); - var state = this._readableState; - var nOrig = n; - if (n !== 0) state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } else if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (!state.reading) n = howMuchToRead(nOrig, state); - } - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - if (ret === null) { - state.needReadable = state.length <= state.highWaterMark; - n = 0; - } else { - state.length -= n; - state.awaitDrain = 0; - } - if (state.length === 0) { - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (!state.ended) state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended) endReadable(this); - } - if (ret !== null) this.emit('data', ret); - return ret; -}; -function onEofChunk(stream, state) { - debug('onEofChunk'); - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - if (state.sync) { - // if we are sync, wait until next tick to emit the data. - // Otherwise we risk emitting data in the flow() - // the readable code triggers during a read() call - emitReadable(stream); - } else { - // emit 'readable' now to make sure it gets picked up. - state.needReadable = false; - if (!state.emittedReadable) { - state.emittedReadable = true; - emitReadable_(stream); - } - } -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - debug('emitReadable', state.needReadable, state.emittedReadable); - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - process.nextTick(emitReadable_, stream); - } -} -function emitReadable_(stream) { - var state = stream._readableState; - debug('emitReadable_', state.destroyed, state.length, state.ended); - if (!state.destroyed && (state.length || state.ended)) { - stream.emit('readable'); - state.emittedReadable = false; - } - - // The stream needs another readable event if - // 1. It is not flowing, as the flow mechanism will take - // care of it. - // 2. It is not ended. - // 3. It is below the highWaterMark, so we can schedule - // another readable later. - state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark; - flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(maybeReadMore_, stream, state); - } -} -function maybeReadMore_(stream, state) { - // Attempt to read more data if we should. - // - // The conditions for reading more data are (one of): - // - Not enough data buffered (state.length < state.highWaterMark). The loop - // is responsible for filling the buffer with enough data if such data - // is available. If highWaterMark is 0 and we are not in the flowing mode - // we should _not_ attempt to buffer any extra data. We'll get more data - // when the stream consumer calls read() instead. - // - No data in the buffer, and the stream is in flowing mode. In this mode - // the loop below is responsible for ensuring read() is called. Failing to - // call read here would abort the flow and there's no other mechanism for - // continuing the flow if the stream consumer has just subscribed to the - // 'data' event. - // - // In addition to the above conditions to keep reading data, the following - // conditions prevent the data from being read: - // - The stream has ended (state.ended). - // - There is already a pending 'read' operation (state.reading). This is a - // case where the the stream has called the implementation defined _read() - // method, but they are processing the call asynchronously and have _not_ - // called push() with new data. In this case we skip performing more - // read()s. The execution ends in this method again after the _read() ends - // up calling push() with more data. - while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) { - var len = state.length; - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()')); -}; -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - var endFn = doEnd ? onend : unpipe; - if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn); - dest.on('unpipe', onunpipe); - function onunpipe(readable, unpipeInfo) { - debug('onunpipe'); - if (readable === src) { - if (unpipeInfo && unpipeInfo.hasUnpiped === false) { - unpipeInfo.hasUnpiped = true; - cleanup(); - } - } - } - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', unpipe); - src.removeListener('data', ondata); - cleanedUp = true; - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - var ret = dest.write(chunk); - debug('dest.write', ret); - if (ret === false) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', state.awaitDrain); - state.awaitDrain++; - } - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er); - } - - // Make sure our error handler is attached before userland ones. - prependListener(dest, 'error', onerror); - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - return dest; -}; -function pipeOnDrain(src) { - return function pipeOnDrainFunctionResult() { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - var unpipeInfo = { - hasUnpiped: false - }; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - if (!dest) dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this, unpipeInfo); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - for (var i = 0; i < len; i++) dests[i].emit('unpipe', this, { - hasUnpiped: false - }); - return this; - } - - // try to find the right one. - var index = indexOf(state.pipes, dest); - if (index === -1) return this; - state.pipes.splice(index, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - dest.emit('unpipe', this, unpipeInfo); - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - var state = this._readableState; - if (ev === 'data') { - // update readableListening so that resume() may be a no-op - // a few lines down. This is needed to support once('readable'). - state.readableListening = this.listenerCount('readable') > 0; - - // Try start flowing on next tick if stream isn't explicitly paused - if (state.flowing !== false) this.resume(); - } else if (ev === 'readable') { - if (!state.endEmitted && !state.readableListening) { - state.readableListening = state.needReadable = true; - state.flowing = false; - state.emittedReadable = false; - debug('on readable', state.length, state.reading); - if (state.length) { - emitReadable(this); - } else if (!state.reading) { - process.nextTick(nReadingNextTick, this); - } - } - } - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; -Readable.prototype.removeListener = function (ev, fn) { - var res = Stream.prototype.removeListener.call(this, ev, fn); - if (ev === 'readable') { - // We need to check if there is someone still listening to - // readable and reset the state. However this needs to happen - // after readable has been emitted but before I/O (nextTick) to - // support once('readable', fn) cycles. This means that calling - // resume within the same tick will have no - // effect. - process.nextTick(updateReadableListening, this); - } - return res; -}; -Readable.prototype.removeAllListeners = function (ev) { - var res = Stream.prototype.removeAllListeners.apply(this, arguments); - if (ev === 'readable' || ev === undefined) { - // We need to check if there is someone still listening to - // readable and reset the state. However this needs to happen - // after readable has been emitted but before I/O (nextTick) to - // support once('readable', fn) cycles. This means that calling - // resume within the same tick will have no - // effect. - process.nextTick(updateReadableListening, this); - } - return res; -}; -function updateReadableListening(self) { - var state = self._readableState; - state.readableListening = self.listenerCount('readable') > 0; - if (state.resumeScheduled && !state.paused) { - // flowing needs to be set to true now, otherwise - // the upcoming resume will not flow. - state.flowing = true; - - // crude way to check if we should resume - } else if (self.listenerCount('data') > 0) { - self.resume(); - } -} -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - // we flow only if there is no one listening - // for readable, but we still have to call - // resume() - state.flowing = !state.readableListening; - resume(this, state); - } - state.paused = false; - return this; -}; -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - process.nextTick(resume_, stream, state); - } -} -function resume_(stream, state) { - debug('resume', state.reading); - if (!state.reading) { - stream.read(0); - } - state.resumeScheduled = false; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (this._readableState.flowing !== false) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - this._readableState.paused = true; - return this; -}; -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - while (state.flowing && stream.read() !== null); -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var _this = this; - var state = this._readableState; - var paused = false; - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) _this.push(chunk); - } - _this.push(null); - }); - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - var ret = _this.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function methodWrap(method) { - return function methodWrapReturnFunction() { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } - - // proxy certain important events. - for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); - } - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - this._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - return this; -}; -if (typeof Symbol === 'function') { - Readable.prototype[Symbol.asyncIterator] = function () { - if (createReadableStreamAsyncIterator === undefined) { - createReadableStreamAsyncIterator = require('./internal/streams/async_iterator'); - } - return createReadableStreamAsyncIterator(this); - }; -} -Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.highWaterMark; - } -}); -Object.defineProperty(Readable.prototype, 'readableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState && this._readableState.buffer; - } -}); -Object.defineProperty(Readable.prototype, 'readableFlowing', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.flowing; - }, - set: function set(state) { - if (this._readableState) { - this._readableState.flowing = state; - } - } -}); - -// exposed for testing purposes only. -Readable._fromList = fromList; -Object.defineProperty(Readable.prototype, 'readableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.length; - } -}); - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromList(n, state) { - // nothing buffered - if (state.length === 0) return null; - var ret; - if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { - // read it all, truncate the list - if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length); - state.buffer.clear(); - } else { - // read part of list - ret = state.buffer.consume(n, state.decoder); - } - return ret; -} -function endReadable(stream) { - var state = stream._readableState; - debug('endReadable', state.endEmitted); - if (!state.endEmitted) { - state.ended = true; - process.nextTick(endReadableNT, state, stream); - } -} -function endReadableNT(state, stream) { - debug('endReadableNT', state.endEmitted, state.length); - - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - if (state.autoDestroy) { - // In case of duplex streams we need a way to detect - // if the writable side is ready for autoDestroy as well - var wState = stream._writableState; - if (!wState || wState.autoDestroy && wState.finished) { - stream.destroy(); - } - } - } -} -if (typeof Symbol === 'function') { - Readable.from = function (iterable, opts) { - if (from === undefined) { - from = require('./internal/streams/from'); - } - return from(Readable, iterable, opts); - }; -} -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index 1ccb715..0000000 --- a/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -'use strict'; - -module.exports = Transform; -var _require$codes = require('../errors').codes, - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, - ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING, - ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0; -var Duplex = require('./_stream_duplex'); -require('inherits')(Transform, Duplex); -function afterTransform(er, data) { - var ts = this._transformState; - ts.transforming = false; - var cb = ts.writecb; - if (cb === null) { - return this.emit('error', new ERR_MULTIPLE_CALLBACK()); - } - ts.writechunk = null; - ts.writecb = null; - if (data != null) - // single equals check for both `null` and `undefined` - this.push(data); - cb(er); - var rs = this._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - this._read(rs.highWaterMark); - } -} -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - Duplex.call(this, options); - this._transformState = { - afterTransform: afterTransform.bind(this), - needTransform: false, - transforming: false, - writecb: null, - writechunk: null, - writeencoding: null - }; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - if (typeof options.flush === 'function') this._flush = options.flush; - } - - // When the writable side finishes, then flush out anything remaining. - this.on('prefinish', prefinish); -} -function prefinish() { - var _this = this; - if (typeof this._flush === 'function' && !this._readableState.destroyed) { - this._flush(function (er, data) { - done(_this, er, data); - }); - } else { - done(this, null, null); - } -} -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()')); -}; -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - if (ts.writechunk !== null && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; -Transform.prototype._destroy = function (err, cb) { - Duplex.prototype._destroy.call(this, err, function (err2) { - cb(err2); - }); -}; -function done(stream, er, data) { - if (er) return stream.emit('error', er); - if (data != null) - // single equals check for both `null` and `undefined` - stream.push(data); - - // TODO(BridgeAR): Write a test for these two error cases - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0(); - if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING(); - return stream.push(null); -} \ No newline at end of file diff --git a/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index 292415e..0000000 --- a/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,641 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - -'use strict'; - -module.exports = Writable; - -/* */ -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - this.next = null; - this.entry = null; - this.finish = function () { - onCorkedFinish(_this, state); - }; -} -/* */ - -/**/ -var Duplex; -/**/ - -Writable.WritableState = WritableState; - -/**/ -var internalUtil = { - deprecate: require('util-deprecate') -}; -/**/ - -/**/ -var Stream = require('./internal/streams/stream'); -/**/ - -var Buffer = require('buffer').Buffer; -var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} -var destroyImpl = require('./internal/streams/destroy'); -var _require = require('./internal/streams/state'), - getHighWaterMark = _require.getHighWaterMark; -var _require$codes = require('../errors').codes, - ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, - ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE, - ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED, - ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES, - ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END, - ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING; -var errorOrDestroy = destroyImpl.errorOrDestroy; -require('inherits')(Writable, Stream); -function nop() {} -function WritableState(options, stream, isDuplex) { - Duplex = Duplex || require('./_stream_duplex'); - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream, - // e.g. options.readableObjectMode vs. options.writableObjectMode, etc. - if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); - - // if _final has been called - this.finalCalled = false; - - // drain event flag. - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // has it been destroyed - this.destroyed = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; - - // Should close be emitted on destroy. Defaults to true. - this.emitClose = options.emitClose !== false; - - // Should .destroy() be called after 'finish' (and potentially 'end') - this.autoDestroy = !!options.autoDestroy; - - // count buffered requests - this.bufferedRequestCount = 0; - - // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - this.corkedRequestsFree = new CorkedRequest(this); -} -WritableState.prototype.getBuffer = function getBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function writableStateBufferGetter() { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') - }); - } catch (_) {} -})(); - -// Test _writableState for inheritance to account for Duplex streams, -// whose prototype chain only points to Readable. -var realHasInstance; -if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { - realHasInstance = Function.prototype[Symbol.hasInstance]; - Object.defineProperty(Writable, Symbol.hasInstance, { - value: function value(object) { - if (realHasInstance.call(this, object)) return true; - if (this !== Writable) return false; - return object && object._writableState instanceof WritableState; - } - }); -} else { - realHasInstance = function realHasInstance(object) { - return object instanceof this; - }; -} -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); - - // Writable ctor is applied to Duplexes, too. - // `realHasInstance` is necessary because using plain `instanceof` - // would return false, as no `_writableState` property is attached. - - // Trying to use the custom `instanceof` for Writable here will also break the - // Node.js LazyTransform implementation, which has a non-trivial getter for - // `_writableState` that would lead to infinite recursion. - - // Checking for a Stream.Duplex instance is faster here instead of inside - // the WritableState constructor, at least with V8 6.5 - var isDuplex = this instanceof Duplex; - if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options); - this._writableState = new WritableState(options, this, isDuplex); - - // legacy. - this.writable = true; - if (options) { - if (typeof options.write === 'function') this._write = options.write; - if (typeof options.writev === 'function') this._writev = options.writev; - if (typeof options.destroy === 'function') this._destroy = options.destroy; - if (typeof options.final === 'function') this._final = options.final; - } - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE()); -}; -function writeAfterEnd(stream, cb) { - var er = new ERR_STREAM_WRITE_AFTER_END(); - // TODO: defer error events consistently everywhere, not just the cb - errorOrDestroy(stream, er); - process.nextTick(cb, er); -} - -// Checks that a user-supplied chunk is valid, especially for the particular -// mode the stream is in. Currently this means that `null` is never accepted -// and undefined/non-string values are only allowed in object mode. -function validChunk(stream, state, chunk, cb) { - var er; - if (chunk === null) { - er = new ERR_STREAM_NULL_VALUES(); - } else if (typeof chunk !== 'string' && !state.objectMode) { - er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk); - } - if (er) { - errorOrDestroy(stream, er); - process.nextTick(cb, er); - return false; - } - return true; -} -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - var isBuf = !state.objectMode && _isUint8Array(chunk); - if (isBuf && !Buffer.isBuffer(chunk)) { - chunk = _uint8ArrayToBuffer(chunk); - } - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - if (typeof cb !== 'function') cb = nop; - if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); - } - return ret; -}; -Writable.prototype.cork = function () { - this._writableState.corked++; -}; -Writable.prototype.uncork = function () { - var state = this._writableState; - if (state.corked) { - state.corked--; - if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; -Object.defineProperty(Writable.prototype, 'writableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState && this._writableState.getBuffer(); - } -}); -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding); - } - return chunk; -} -Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.highWaterMark; - } -}); - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { - if (!isBuf) { - var newChunk = decodeChunk(state, chunk, encoding); - if (chunk !== newChunk) { - isBuf = true; - encoding = 'buffer'; - chunk = newChunk; - } - } - var len = state.objectMode ? 1 : chunk.length; - state.length += len; - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = { - chunk: chunk, - encoding: encoding, - isBuf: isBuf, - callback: cb, - next: null - }; - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - return ret; -} -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - if (sync) { - // defer the callback if we are being called synchronously - // to avoid piling up things on the stack - process.nextTick(cb, er); - // this can emit finish, and it will always happen - // after error - process.nextTick(finishMaybe, stream, state); - stream._writableState.errorEmitted = true; - errorOrDestroy(stream, er); - } else { - // the caller expect this to happen before if - // it is async - cb(er); - stream._writableState.errorEmitted = true; - errorOrDestroy(stream, er); - // this can emit finish, but finish must - // always follow error - finishMaybe(stream, state); - } -} -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK(); - onwriteStateUpdate(state); - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state) || stream.destroyed; - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - if (sync) { - process.nextTick(afterWrite, stream, state, finished, cb); - } else { - afterWrite(stream, state, finished, cb); - } - } -} -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - var count = 0; - var allBuffers = true; - while (entry) { - buffer[count] = entry; - if (!entry.isBuf) allBuffers = false; - entry = entry.next; - count += 1; - } - buffer.allBuffers = allBuffers; - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - - // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - state.bufferedRequestCount = 0; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - state.bufferedRequestCount--; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - if (entry === null) state.lastBufferedRequest = null; - } - state.bufferedRequest = entry; - state.bufferProcessing = false; -} -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()')); -}; -Writable.prototype._writev = null; -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending) endWritable(this, state, cb); - return this; -}; -Object.defineProperty(Writable.prototype, 'writableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.length; - } -}); -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} -function callFinal(stream, state) { - stream._final(function (err) { - state.pendingcb--; - if (err) { - errorOrDestroy(stream, err); - } - state.prefinished = true; - stream.emit('prefinish'); - finishMaybe(stream, state); - }); -} -function prefinish(stream, state) { - if (!state.prefinished && !state.finalCalled) { - if (typeof stream._final === 'function' && !state.destroyed) { - state.pendingcb++; - state.finalCalled = true; - process.nextTick(callFinal, stream, state); - } else { - state.prefinished = true; - stream.emit('prefinish'); - } - } -} -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - prefinish(stream, state); - if (state.pendingcb === 0) { - state.finished = true; - stream.emit('finish'); - if (state.autoDestroy) { - // In case of duplex streams we need a way to detect - // if the readable side is ready for autoDestroy as well - var rState = stream._readableState; - if (!rState || rState.autoDestroy && rState.endEmitted) { - stream.destroy(); - } - } - } - } - return need; -} -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) process.nextTick(cb);else stream.once('finish', cb); - } - state.ended = true; - stream.writable = false; -} -function onCorkedFinish(corkReq, state, err) { - var entry = corkReq.entry; - corkReq.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - - // reuse the free corkReq. - state.corkedRequestsFree.next = corkReq; -} -Object.defineProperty(Writable.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._writableState === undefined) { - return false; - } - return this._writableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._writableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._writableState.destroyed = value; - } -}); -Writable.prototype.destroy = destroyImpl.destroy; -Writable.prototype._undestroy = destroyImpl.undestroy; -Writable.prototype._destroy = function (err, cb) { - cb(err); -}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/async_iterator.js b/node_modules/readable-stream/lib/internal/streams/async_iterator.js deleted file mode 100644 index 742c5a4..0000000 --- a/node_modules/readable-stream/lib/internal/streams/async_iterator.js +++ /dev/null @@ -1,180 +0,0 @@ -'use strict'; - -var _Object$setPrototypeO; -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -var finished = require('./end-of-stream'); -var kLastResolve = Symbol('lastResolve'); -var kLastReject = Symbol('lastReject'); -var kError = Symbol('error'); -var kEnded = Symbol('ended'); -var kLastPromise = Symbol('lastPromise'); -var kHandlePromise = Symbol('handlePromise'); -var kStream = Symbol('stream'); -function createIterResult(value, done) { - return { - value: value, - done: done - }; -} -function readAndResolve(iter) { - var resolve = iter[kLastResolve]; - if (resolve !== null) { - var data = iter[kStream].read(); - // we defer if data is null - // we can be expecting either 'end' or - // 'error' - if (data !== null) { - iter[kLastPromise] = null; - iter[kLastResolve] = null; - iter[kLastReject] = null; - resolve(createIterResult(data, false)); - } - } -} -function onReadable(iter) { - // we wait for the next tick, because it might - // emit an error with process.nextTick - process.nextTick(readAndResolve, iter); -} -function wrapForNext(lastPromise, iter) { - return function (resolve, reject) { - lastPromise.then(function () { - if (iter[kEnded]) { - resolve(createIterResult(undefined, true)); - return; - } - iter[kHandlePromise](resolve, reject); - }, reject); - }; -} -var AsyncIteratorPrototype = Object.getPrototypeOf(function () {}); -var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = { - get stream() { - return this[kStream]; - }, - next: function next() { - var _this = this; - // if we have detected an error in the meanwhile - // reject straight away - var error = this[kError]; - if (error !== null) { - return Promise.reject(error); - } - if (this[kEnded]) { - return Promise.resolve(createIterResult(undefined, true)); - } - if (this[kStream].destroyed) { - // We need to defer via nextTick because if .destroy(err) is - // called, the error will be emitted via nextTick, and - // we cannot guarantee that there is no error lingering around - // waiting to be emitted. - return new Promise(function (resolve, reject) { - process.nextTick(function () { - if (_this[kError]) { - reject(_this[kError]); - } else { - resolve(createIterResult(undefined, true)); - } - }); - }); - } - - // if we have multiple next() calls - // we will wait for the previous Promise to finish - // this logic is optimized to support for await loops, - // where next() is only called once at a time - var lastPromise = this[kLastPromise]; - var promise; - if (lastPromise) { - promise = new Promise(wrapForNext(lastPromise, this)); - } else { - // fast path needed to support multiple this.push() - // without triggering the next() queue - var data = this[kStream].read(); - if (data !== null) { - return Promise.resolve(createIterResult(data, false)); - } - promise = new Promise(this[kHandlePromise]); - } - this[kLastPromise] = promise; - return promise; - } -}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () { - return this; -}), _defineProperty(_Object$setPrototypeO, "return", function _return() { - var _this2 = this; - // destroy(err, cb) is a private API - // we can guarantee we have that here, because we control the - // Readable class this is attached to - return new Promise(function (resolve, reject) { - _this2[kStream].destroy(null, function (err) { - if (err) { - reject(err); - return; - } - resolve(createIterResult(undefined, true)); - }); - }); -}), _Object$setPrototypeO), AsyncIteratorPrototype); -var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) { - var _Object$create; - var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, { - value: stream, - writable: true - }), _defineProperty(_Object$create, kLastResolve, { - value: null, - writable: true - }), _defineProperty(_Object$create, kLastReject, { - value: null, - writable: true - }), _defineProperty(_Object$create, kError, { - value: null, - writable: true - }), _defineProperty(_Object$create, kEnded, { - value: stream._readableState.endEmitted, - writable: true - }), _defineProperty(_Object$create, kHandlePromise, { - value: function value(resolve, reject) { - var data = iterator[kStream].read(); - if (data) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - resolve(createIterResult(data, false)); - } else { - iterator[kLastResolve] = resolve; - iterator[kLastReject] = reject; - } - }, - writable: true - }), _Object$create)); - iterator[kLastPromise] = null; - finished(stream, function (err) { - if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') { - var reject = iterator[kLastReject]; - // reject if we are waiting for data in the Promise - // returned by next() and store the error - if (reject !== null) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - reject(err); - } - iterator[kError] = err; - return; - } - var resolve = iterator[kLastResolve]; - if (resolve !== null) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - resolve(createIterResult(undefined, true)); - } - iterator[kEnded] = true; - }); - stream.on('readable', onReadable.bind(null, iterator)); - return iterator; -}; -module.exports = createReadableStreamAsyncIterator; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/buffer_list.js b/node_modules/readable-stream/lib/internal/streams/buffer_list.js deleted file mode 100644 index 69bda49..0000000 --- a/node_modules/readable-stream/lib/internal/streams/buffer_list.js +++ /dev/null @@ -1,183 +0,0 @@ -'use strict'; - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -var _require = require('buffer'), - Buffer = _require.Buffer; -var _require2 = require('util'), - inspect = _require2.inspect; -var custom = inspect && inspect.custom || 'inspect'; -function copyBuffer(src, target, offset) { - Buffer.prototype.copy.call(src, target, offset); -} -module.exports = /*#__PURE__*/function () { - function BufferList() { - _classCallCheck(this, BufferList); - this.head = null; - this.tail = null; - this.length = 0; - } - _createClass(BufferList, [{ - key: "push", - value: function push(v) { - var entry = { - data: v, - next: null - }; - if (this.length > 0) this.tail.next = entry;else this.head = entry; - this.tail = entry; - ++this.length; - } - }, { - key: "unshift", - value: function unshift(v) { - var entry = { - data: v, - next: this.head - }; - if (this.length === 0) this.tail = entry; - this.head = entry; - ++this.length; - } - }, { - key: "shift", - value: function shift() { - if (this.length === 0) return; - var ret = this.head.data; - if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; - --this.length; - return ret; - } - }, { - key: "clear", - value: function clear() { - this.head = this.tail = null; - this.length = 0; - } - }, { - key: "join", - value: function join(s) { - if (this.length === 0) return ''; - var p = this.head; - var ret = '' + p.data; - while (p = p.next) ret += s + p.data; - return ret; - } - }, { - key: "concat", - value: function concat(n) { - if (this.length === 0) return Buffer.alloc(0); - var ret = Buffer.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; - while (p) { - copyBuffer(p.data, ret, i); - i += p.data.length; - p = p.next; - } - return ret; - } - - // Consumes a specified amount of bytes or characters from the buffered data. - }, { - key: "consume", - value: function consume(n, hasStrings) { - var ret; - if (n < this.head.data.length) { - // `slice` is the same for buffers and strings. - ret = this.head.data.slice(0, n); - this.head.data = this.head.data.slice(n); - } else if (n === this.head.data.length) { - // First chunk is a perfect match. - ret = this.shift(); - } else { - // Result spans more than one buffer. - ret = hasStrings ? this._getString(n) : this._getBuffer(n); - } - return ret; - } - }, { - key: "first", - value: function first() { - return this.head.data; - } - - // Consumes a specified amount of characters from the buffered data. - }, { - key: "_getString", - value: function _getString(n) { - var p = this.head; - var c = 1; - var ret = p.data; - n -= ret.length; - while (p = p.next) { - var str = p.data; - var nb = n > str.length ? str.length : n; - if (nb === str.length) ret += str;else ret += str.slice(0, n); - n -= nb; - if (n === 0) { - if (nb === str.length) { - ++c; - if (p.next) this.head = p.next;else this.head = this.tail = null; - } else { - this.head = p; - p.data = str.slice(nb); - } - break; - } - ++c; - } - this.length -= c; - return ret; - } - - // Consumes a specified amount of bytes from the buffered data. - }, { - key: "_getBuffer", - value: function _getBuffer(n) { - var ret = Buffer.allocUnsafe(n); - var p = this.head; - var c = 1; - p.data.copy(ret); - n -= p.data.length; - while (p = p.next) { - var buf = p.data; - var nb = n > buf.length ? buf.length : n; - buf.copy(ret, ret.length - n, 0, nb); - n -= nb; - if (n === 0) { - if (nb === buf.length) { - ++c; - if (p.next) this.head = p.next;else this.head = this.tail = null; - } else { - this.head = p; - p.data = buf.slice(nb); - } - break; - } - ++c; - } - this.length -= c; - return ret; - } - - // Make sure the linked list only shows the minimal necessary information. - }, { - key: custom, - value: function value(_, options) { - return inspect(this, _objectSpread(_objectSpread({}, options), {}, { - // Only inspect one level. - depth: 0, - // It should not recurse. - customInspect: false - })); - } - }]); - return BufferList; -}(); \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/destroy.js b/node_modules/readable-stream/lib/internal/streams/destroy.js deleted file mode 100644 index 31a17c4..0000000 --- a/node_modules/readable-stream/lib/internal/streams/destroy.js +++ /dev/null @@ -1,96 +0,0 @@ -'use strict'; - -// undocumented cb() API, needed for core, not for public API -function destroy(err, cb) { - var _this = this; - var readableDestroyed = this._readableState && this._readableState.destroyed; - var writableDestroyed = this._writableState && this._writableState.destroyed; - if (readableDestroyed || writableDestroyed) { - if (cb) { - cb(err); - } else if (err) { - if (!this._writableState) { - process.nextTick(emitErrorNT, this, err); - } else if (!this._writableState.errorEmitted) { - this._writableState.errorEmitted = true; - process.nextTick(emitErrorNT, this, err); - } - } - return this; - } - - // we set destroyed to true before firing error callbacks in order - // to make it re-entrance safe in case destroy() is called within callbacks - - if (this._readableState) { - this._readableState.destroyed = true; - } - - // if this is a duplex stream mark the writable part as destroyed as well - if (this._writableState) { - this._writableState.destroyed = true; - } - this._destroy(err || null, function (err) { - if (!cb && err) { - if (!_this._writableState) { - process.nextTick(emitErrorAndCloseNT, _this, err); - } else if (!_this._writableState.errorEmitted) { - _this._writableState.errorEmitted = true; - process.nextTick(emitErrorAndCloseNT, _this, err); - } else { - process.nextTick(emitCloseNT, _this); - } - } else if (cb) { - process.nextTick(emitCloseNT, _this); - cb(err); - } else { - process.nextTick(emitCloseNT, _this); - } - }); - return this; -} -function emitErrorAndCloseNT(self, err) { - emitErrorNT(self, err); - emitCloseNT(self); -} -function emitCloseNT(self) { - if (self._writableState && !self._writableState.emitClose) return; - if (self._readableState && !self._readableState.emitClose) return; - self.emit('close'); -} -function undestroy() { - if (this._readableState) { - this._readableState.destroyed = false; - this._readableState.reading = false; - this._readableState.ended = false; - this._readableState.endEmitted = false; - } - if (this._writableState) { - this._writableState.destroyed = false; - this._writableState.ended = false; - this._writableState.ending = false; - this._writableState.finalCalled = false; - this._writableState.prefinished = false; - this._writableState.finished = false; - this._writableState.errorEmitted = false; - } -} -function emitErrorNT(self, err) { - self.emit('error', err); -} -function errorOrDestroy(stream, err) { - // We have tests that rely on errors being emitted - // in the same tick, so changing this is semver major. - // For now when you opt-in to autoDestroy we allow - // the error to be emitted nextTick. In a future - // semver major update we should change the default to this. - - var rState = stream._readableState; - var wState = stream._writableState; - if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err); -} -module.exports = { - destroy: destroy, - undestroy: undestroy, - errorOrDestroy: errorOrDestroy -}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/end-of-stream.js b/node_modules/readable-stream/lib/internal/streams/end-of-stream.js deleted file mode 100644 index 59c671b..0000000 --- a/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +++ /dev/null @@ -1,86 +0,0 @@ -// Ported from https://github.com/mafintosh/end-of-stream with -// permission from the author, Mathias Buus (@mafintosh). - -'use strict'; - -var ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE; -function once(callback) { - var called = false; - return function () { - if (called) return; - called = true; - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - callback.apply(this, args); - }; -} -function noop() {} -function isRequest(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -} -function eos(stream, opts, callback) { - if (typeof opts === 'function') return eos(stream, null, opts); - if (!opts) opts = {}; - callback = once(callback || noop); - var readable = opts.readable || opts.readable !== false && stream.readable; - var writable = opts.writable || opts.writable !== false && stream.writable; - var onlegacyfinish = function onlegacyfinish() { - if (!stream.writable) onfinish(); - }; - var writableEnded = stream._writableState && stream._writableState.finished; - var onfinish = function onfinish() { - writable = false; - writableEnded = true; - if (!readable) callback.call(stream); - }; - var readableEnded = stream._readableState && stream._readableState.endEmitted; - var onend = function onend() { - readable = false; - readableEnded = true; - if (!writable) callback.call(stream); - }; - var onerror = function onerror(err) { - callback.call(stream, err); - }; - var onclose = function onclose() { - var err; - if (readable && !readableEnded) { - if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); - return callback.call(stream, err); - } - if (writable && !writableEnded) { - if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); - return callback.call(stream, err); - } - }; - var onrequest = function onrequest() { - stream.req.on('finish', onfinish); - }; - if (isRequest(stream)) { - stream.on('complete', onfinish); - stream.on('abort', onclose); - if (stream.req) onrequest();else stream.on('request', onrequest); - } else if (writable && !stream._writableState) { - // legacy streams - stream.on('end', onlegacyfinish); - stream.on('close', onlegacyfinish); - } - stream.on('end', onend); - stream.on('finish', onfinish); - if (opts.error !== false) stream.on('error', onerror); - stream.on('close', onclose); - return function () { - stream.removeListener('complete', onfinish); - stream.removeListener('abort', onclose); - stream.removeListener('request', onrequest); - if (stream.req) stream.req.removeListener('finish', onfinish); - stream.removeListener('end', onlegacyfinish); - stream.removeListener('close', onlegacyfinish); - stream.removeListener('finish', onfinish); - stream.removeListener('end', onend); - stream.removeListener('error', onerror); - stream.removeListener('close', onclose); - }; -} -module.exports = eos; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/from-browser.js b/node_modules/readable-stream/lib/internal/streams/from-browser.js deleted file mode 100644 index a4ce56f..0000000 --- a/node_modules/readable-stream/lib/internal/streams/from-browser.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function () { - throw new Error('Readable.from is not available in the browser') -}; diff --git a/node_modules/readable-stream/lib/internal/streams/from.js b/node_modules/readable-stream/lib/internal/streams/from.js deleted file mode 100644 index 0a34ee9..0000000 --- a/node_modules/readable-stream/lib/internal/streams/from.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -var ERR_INVALID_ARG_TYPE = require('../../../errors').codes.ERR_INVALID_ARG_TYPE; -function from(Readable, iterable, opts) { - var iterator; - if (iterable && typeof iterable.next === 'function') { - iterator = iterable; - } else if (iterable && iterable[Symbol.asyncIterator]) iterator = iterable[Symbol.asyncIterator]();else if (iterable && iterable[Symbol.iterator]) iterator = iterable[Symbol.iterator]();else throw new ERR_INVALID_ARG_TYPE('iterable', ['Iterable'], iterable); - var readable = new Readable(_objectSpread({ - objectMode: true - }, opts)); - // Reading boolean to protect against _read - // being called before last iteration completion. - var reading = false; - readable._read = function () { - if (!reading) { - reading = true; - next(); - } - }; - function next() { - return _next2.apply(this, arguments); - } - function _next2() { - _next2 = _asyncToGenerator(function* () { - try { - var _yield$iterator$next = yield iterator.next(), - value = _yield$iterator$next.value, - done = _yield$iterator$next.done; - if (done) { - readable.push(null); - } else if (readable.push(yield value)) { - next(); - } else { - reading = false; - } - } catch (err) { - readable.destroy(err); - } - }); - return _next2.apply(this, arguments); - } - return readable; -} -module.exports = from; diff --git a/node_modules/readable-stream/lib/internal/streams/pipeline.js b/node_modules/readable-stream/lib/internal/streams/pipeline.js deleted file mode 100644 index e6f3924..0000000 --- a/node_modules/readable-stream/lib/internal/streams/pipeline.js +++ /dev/null @@ -1,86 +0,0 @@ -// Ported from https://github.com/mafintosh/pump with -// permission from the author, Mathias Buus (@mafintosh). - -'use strict'; - -var eos; -function once(callback) { - var called = false; - return function () { - if (called) return; - called = true; - callback.apply(void 0, arguments); - }; -} -var _require$codes = require('../../../errors').codes, - ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS, - ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; -function noop(err) { - // Rethrow the error if it exists to avoid swallowing it - if (err) throw err; -} -function isRequest(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -} -function destroyer(stream, reading, writing, callback) { - callback = once(callback); - var closed = false; - stream.on('close', function () { - closed = true; - }); - if (eos === undefined) eos = require('./end-of-stream'); - eos(stream, { - readable: reading, - writable: writing - }, function (err) { - if (err) return callback(err); - closed = true; - callback(); - }); - var destroyed = false; - return function (err) { - if (closed) return; - if (destroyed) return; - destroyed = true; - - // request.destroy just do .end - .abort is what we want - if (isRequest(stream)) return stream.abort(); - if (typeof stream.destroy === 'function') return stream.destroy(); - callback(err || new ERR_STREAM_DESTROYED('pipe')); - }; -} -function call(fn) { - fn(); -} -function pipe(from, to) { - return from.pipe(to); -} -function popCallback(streams) { - if (!streams.length) return noop; - if (typeof streams[streams.length - 1] !== 'function') return noop; - return streams.pop(); -} -function pipeline() { - for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) { - streams[_key] = arguments[_key]; - } - var callback = popCallback(streams); - if (Array.isArray(streams[0])) streams = streams[0]; - if (streams.length < 2) { - throw new ERR_MISSING_ARGS('streams'); - } - var error; - var destroys = streams.map(function (stream, i) { - var reading = i < streams.length - 1; - var writing = i > 0; - return destroyer(stream, reading, writing, function (err) { - if (!error) error = err; - if (err) destroys.forEach(call); - if (reading) return; - destroys.forEach(call); - callback(error); - }); - }); - return streams.reduce(pipe); -} -module.exports = pipeline; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/state.js b/node_modules/readable-stream/lib/internal/streams/state.js deleted file mode 100644 index 3fbf892..0000000 --- a/node_modules/readable-stream/lib/internal/streams/state.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -var ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE; -function highWaterMarkFrom(options, isDuplex, duplexKey) { - return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null; -} -function getHighWaterMark(state, options, duplexKey, isDuplex) { - var hwm = highWaterMarkFrom(options, isDuplex, duplexKey); - if (hwm != null) { - if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) { - var name = isDuplex ? duplexKey : 'highWaterMark'; - throw new ERR_INVALID_OPT_VALUE(name, hwm); - } - return Math.floor(hwm); - } - - // Default value - return state.objectMode ? 16 : 16 * 1024; -} -module.exports = { - getHighWaterMark: getHighWaterMark -}; \ No newline at end of file diff --git a/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/node_modules/readable-stream/lib/internal/streams/stream-browser.js deleted file mode 100644 index 9332a3f..0000000 --- a/node_modules/readable-stream/lib/internal/streams/stream-browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('events').EventEmitter; diff --git a/node_modules/readable-stream/lib/internal/streams/stream.js b/node_modules/readable-stream/lib/internal/streams/stream.js deleted file mode 100644 index ce2ad5b..0000000 --- a/node_modules/readable-stream/lib/internal/streams/stream.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('stream'); diff --git a/node_modules/readable-stream/package.json b/node_modules/readable-stream/package.json deleted file mode 100644 index ade59e7..0000000 --- a/node_modules/readable-stream/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "readable-stream", - "version": "3.6.2", - "description": "Streams3, a user-land copy of the stream library from Node.js", - "main": "readable.js", - "engines": { - "node": ">= 6" - }, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "devDependencies": { - "@babel/cli": "^7.2.0", - "@babel/core": "^7.2.0", - "@babel/polyfill": "^7.0.0", - "@babel/preset-env": "^7.2.0", - "airtap": "0.0.9", - "assert": "^1.4.0", - "bl": "^2.0.0", - "deep-strict-equal": "^0.2.0", - "events.once": "^2.0.2", - "glob": "^7.1.2", - "gunzip-maybe": "^1.4.1", - "hyperquest": "^2.1.3", - "lolex": "^2.6.0", - "nyc": "^11.0.0", - "pump": "^3.0.0", - "rimraf": "^2.6.2", - "tap": "^12.0.0", - "tape": "^4.9.0", - "tar-fs": "^1.16.2", - "util-promisify": "^2.1.0" - }, - "scripts": { - "test": "tap -J --no-esm test/parallel/*.js test/ours/*.js", - "ci": "TAP=1 tap --no-esm test/parallel/*.js test/ours/*.js | tee test.tap", - "test-browsers": "airtap --sauce-connect --loopback airtap.local -- test/browser.js", - "test-browser-local": "airtap --open --local -- test/browser.js", - "cover": "nyc npm test", - "report": "nyc report --reporter=lcov", - "update-browser-errors": "babel -o errors-browser.js errors.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/nodejs/readable-stream" - }, - "keywords": [ - "readable", - "stream", - "pipe" - ], - "browser": { - "util": false, - "worker_threads": false, - "./errors": "./errors-browser.js", - "./readable.js": "./readable-browser.js", - "./lib/internal/streams/from.js": "./lib/internal/streams/from-browser.js", - "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" - }, - "nyc": { - "include": [ - "lib/**.js" - ] - }, - "license": "MIT" -} diff --git a/node_modules/readable-stream/readable-browser.js b/node_modules/readable-stream/readable-browser.js deleted file mode 100644 index adbf60d..0000000 --- a/node_modules/readable-stream/readable-browser.js +++ /dev/null @@ -1,9 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Stream = exports; -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); -exports.finished = require('./lib/internal/streams/end-of-stream.js'); -exports.pipeline = require('./lib/internal/streams/pipeline.js'); diff --git a/node_modules/readable-stream/readable.js b/node_modules/readable-stream/readable.js deleted file mode 100644 index 9e0ca12..0000000 --- a/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,16 +0,0 @@ -var Stream = require('stream'); -if (process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream.Readable; - Object.assign(module.exports, Stream); - module.exports.Stream = Stream; -} else { - exports = module.exports = require('./lib/_stream_readable.js'); - exports.Stream = Stream || exports; - exports.Readable = exports; - exports.Writable = require('./lib/_stream_writable.js'); - exports.Duplex = require('./lib/_stream_duplex.js'); - exports.Transform = require('./lib/_stream_transform.js'); - exports.PassThrough = require('./lib/_stream_passthrough.js'); - exports.finished = require('./lib/internal/streams/end-of-stream.js'); - exports.pipeline = require('./lib/internal/streams/pipeline.js'); -} diff --git a/node_modules/readdirp/LICENSE b/node_modules/readdirp/LICENSE deleted file mode 100644 index 037cbb4..0000000 --- a/node_modules/readdirp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/readdirp/README.md b/node_modules/readdirp/README.md deleted file mode 100644 index 465593c..0000000 --- a/node_modules/readdirp/README.md +++ /dev/null @@ -1,122 +0,0 @@ -# readdirp [![Weekly downloads](https://img.shields.io/npm/dw/readdirp.svg)](https://github.com/paulmillr/readdirp) - -Recursive version of [fs.readdir](https://nodejs.org/api/fs.html#fs_fs_readdir_path_options_callback). Exposes a **stream API** and a **promise API**. - - -```sh -npm install readdirp -``` - -```javascript -const readdirp = require('readdirp'); - -// Use streams to achieve small RAM & CPU footprint. -// 1) Streams example with for-await. -for await (const entry of readdirp('.')) { - const {path} = entry; - console.log(`${JSON.stringify({path})}`); -} - -// 2) Streams example, non for-await. -// Print out all JS files along with their size within the current folder & subfolders. -readdirp('.', {fileFilter: '*.js', alwaysStat: true}) - .on('data', (entry) => { - const {path, stats: {size}} = entry; - console.log(`${JSON.stringify({path, size})}`); - }) - // Optionally call stream.destroy() in `warn()` in order to abort and cause 'close' to be emitted - .on('warn', error => console.error('non-fatal error', error)) - .on('error', error => console.error('fatal error', error)) - .on('end', () => console.log('done')); - -// 3) Promise example. More RAM and CPU than streams / for-await. -const files = await readdirp.promise('.'); -console.log(files.map(file => file.path)); - -// Other options. -readdirp('test', { - fileFilter: '*.js', - directoryFilter: ['!.git', '!*modules'] - // directoryFilter: (di) => di.basename.length === 9 - type: 'files_directories', - depth: 1 -}); -``` - -For more examples, check out `examples` directory. - -## API - -`const stream = readdirp(root[, options])` — **Stream API** - -- Reads given root recursively and returns a `stream` of [entry infos](#entryinfo) -- Optionally can be used like `for await (const entry of stream)` with node.js 10+ (`asyncIterator`). -- `on('data', (entry) => {})` [entry info](#entryinfo) for every file / dir. -- `on('warn', (error) => {})` non-fatal `Error` that prevents a file / dir from being processed. Example: inaccessible to the user. -- `on('error', (error) => {})` fatal `Error` which also ends the stream. Example: illegal options where passed. -- `on('end')` — we are done. Called when all entries were found and no more will be emitted. -- `on('close')` — stream is destroyed via `stream.destroy()`. - Could be useful if you want to manually abort even on a non fatal error. - At that point the stream is no longer `readable` and no more entries, warning or errors are emitted -- To learn more about streams, consult the very detailed [nodejs streams documentation](https://nodejs.org/api/stream.html) - or the [stream-handbook](https://github.com/substack/stream-handbook) - -`const entries = await readdirp.promise(root[, options])` — **Promise API**. Returns a list of [entry infos](#entryinfo). - -First argument is awalys `root`, path in which to start reading and recursing into subdirectories. - -### options - -- `fileFilter: ["*.js"]`: filter to include or exclude files. A `Function`, Glob string or Array of glob strings. - - **Function**: a function that takes an entry info as a parameter and returns true to include or false to exclude the entry - - **Glob string**: a string (e.g., `*.js`) which is matched using [picomatch](https://github.com/micromatch/picomatch), so go there for more - information. Globstars (`**`) are not supported since specifying a recursive pattern for an already recursive function doesn't make sense. Negated globs (as explained in the minimatch documentation) are allowed, e.g., `!*.txt` matches everything but text files. - - **Array of glob strings**: either need to be all inclusive or all exclusive (negated) patterns otherwise an error is thrown. - `['*.json', '*.js']` includes all JavaScript and Json files. - `['!.git', '!node_modules']` includes all directories except the '.git' and 'node_modules'. - - Directories that do not pass a filter will not be recursed into. -- `directoryFilter: ['!.git']`: filter to include/exclude directories found and to recurse into. Directories that do not pass a filter will not be recursed into. -- `depth: 5`: depth at which to stop recursing even if more subdirectories are found -- `type: 'files'`: determines if data events on the stream should be emitted for `'files'` (default), `'directories'`, `'files_directories'`, or `'all'`. Setting to `'all'` will also include entries for other types of file descriptors like character devices, unix sockets and named pipes. -- `alwaysStat: false`: always return `stats` property for every file. Default is `false`, readdirp will return `Dirent` entries. Setting it to `true` can double readdir execution time - use it only when you need file `size`, `mtime` etc. Cannot be enabled on node <10.10.0. -- `lstat: false`: include symlink entries in the stream along with files. When `true`, `fs.lstat` would be used instead of `fs.stat` - -### `EntryInfo` - -Has the following properties: - -- `path: 'assets/javascripts/react.js'`: path to the file/directory (relative to given root) -- `fullPath: '/Users/dev/projects/app/assets/javascripts/react.js'`: full path to the file/directory found -- `basename: 'react.js'`: name of the file/directory -- `dirent: fs.Dirent`: built-in [dir entry object](https://nodejs.org/api/fs.html#fs_class_fs_dirent) - only with `alwaysStat: false` -- `stats: fs.Stats`: built in [stat object](https://nodejs.org/api/fs.html#fs_class_fs_stats) - only with `alwaysStat: true` - -## Changelog - -- 3.5 (Oct 13, 2020) disallows recursive directory-based symlinks. - Before, it could have entered infinite loop. -- 3.4 (Mar 19, 2020) adds support for directory-based symlinks. -- 3.3 (Dec 6, 2019) stabilizes RAM consumption and enables perf management with `highWaterMark` option. Fixes race conditions related to `for-await` looping. -- 3.2 (Oct 14, 2019) improves performance by 250% and makes streams implementation more idiomatic. -- 3.1 (Jul 7, 2019) brings `bigint` support to `stat` output on Windows. This is backwards-incompatible for some cases. Be careful. It you use it incorrectly, you'll see "TypeError: Cannot mix BigInt and other types, use explicit conversions". -- 3.0 brings huge performance improvements and stream backpressure support. -- Upgrading 2.x to 3.x: - - Signature changed from `readdirp(options)` to `readdirp(root, options)` - - Replaced callback API with promise API. - - Renamed `entryType` option to `type` - - Renamed `entryType: 'both'` to `'files_directories'` - - `EntryInfo` - - Renamed `stat` to `stats` - - Emitted only when `alwaysStat: true` - - `dirent` is emitted instead of `stats` by default with `alwaysStat: false` - - Renamed `name` to `basename` - - Removed `parentDir` and `fullParentDir` properties -- Supported node.js versions: - - 3.x: node 8+ - - 2.x: node 0.6+ - -## License - -Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller () - -MIT License, see [LICENSE](LICENSE) file. diff --git a/node_modules/readdirp/index.d.ts b/node_modules/readdirp/index.d.ts deleted file mode 100644 index cbbd76c..0000000 --- a/node_modules/readdirp/index.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -// TypeScript Version: 3.2 - -/// - -import * as fs from 'fs'; -import { Readable } from 'stream'; - -declare namespace readdir { - interface EntryInfo { - path: string; - fullPath: string; - basename: string; - stats?: fs.Stats; - dirent?: fs.Dirent; - } - - interface ReaddirpOptions { - root?: string; - fileFilter?: string | string[] | ((entry: EntryInfo) => boolean); - directoryFilter?: string | string[] | ((entry: EntryInfo) => boolean); - type?: 'files' | 'directories' | 'files_directories' | 'all'; - lstat?: boolean; - depth?: number; - alwaysStat?: boolean; - } - - interface ReaddirpStream extends Readable, AsyncIterable { - read(): EntryInfo; - [Symbol.asyncIterator](): AsyncIterableIterator; - } - - function promise( - root: string, - options?: ReaddirpOptions - ): Promise; -} - -declare function readdir( - root: string, - options?: readdir.ReaddirpOptions -): readdir.ReaddirpStream; - -export = readdir; diff --git a/node_modules/readdirp/index.js b/node_modules/readdirp/index.js deleted file mode 100644 index cf739b2..0000000 --- a/node_modules/readdirp/index.js +++ /dev/null @@ -1,287 +0,0 @@ -'use strict'; - -const fs = require('fs'); -const { Readable } = require('stream'); -const sysPath = require('path'); -const { promisify } = require('util'); -const picomatch = require('picomatch'); - -const readdir = promisify(fs.readdir); -const stat = promisify(fs.stat); -const lstat = promisify(fs.lstat); -const realpath = promisify(fs.realpath); - -/** - * @typedef {Object} EntryInfo - * @property {String} path - * @property {String} fullPath - * @property {fs.Stats=} stats - * @property {fs.Dirent=} dirent - * @property {String} basename - */ - -const BANG = '!'; -const RECURSIVE_ERROR_CODE = 'READDIRP_RECURSIVE_ERROR'; -const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP', RECURSIVE_ERROR_CODE]); -const FILE_TYPE = 'files'; -const DIR_TYPE = 'directories'; -const FILE_DIR_TYPE = 'files_directories'; -const EVERYTHING_TYPE = 'all'; -const ALL_TYPES = [FILE_TYPE, DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE]; - -const isNormalFlowError = error => NORMAL_FLOW_ERRORS.has(error.code); -const [maj, min] = process.versions.node.split('.').slice(0, 2).map(n => Number.parseInt(n, 10)); -const wantBigintFsStats = process.platform === 'win32' && (maj > 10 || (maj === 10 && min >= 5)); - -const normalizeFilter = filter => { - if (filter === undefined) return; - if (typeof filter === 'function') return filter; - - if (typeof filter === 'string') { - const glob = picomatch(filter.trim()); - return entry => glob(entry.basename); - } - - if (Array.isArray(filter)) { - const positive = []; - const negative = []; - for (const item of filter) { - const trimmed = item.trim(); - if (trimmed.charAt(0) === BANG) { - negative.push(picomatch(trimmed.slice(1))); - } else { - positive.push(picomatch(trimmed)); - } - } - - if (negative.length > 0) { - if (positive.length > 0) { - return entry => - positive.some(f => f(entry.basename)) && !negative.some(f => f(entry.basename)); - } - return entry => !negative.some(f => f(entry.basename)); - } - return entry => positive.some(f => f(entry.basename)); - } -}; - -class ReaddirpStream extends Readable { - static get defaultOptions() { - return { - root: '.', - /* eslint-disable no-unused-vars */ - fileFilter: (path) => true, - directoryFilter: (path) => true, - /* eslint-enable no-unused-vars */ - type: FILE_TYPE, - lstat: false, - depth: 2147483648, - alwaysStat: false - }; - } - - constructor(options = {}) { - super({ - objectMode: true, - autoDestroy: true, - highWaterMark: options.highWaterMark || 4096 - }); - const opts = { ...ReaddirpStream.defaultOptions, ...options }; - const { root, type } = opts; - - this._fileFilter = normalizeFilter(opts.fileFilter); - this._directoryFilter = normalizeFilter(opts.directoryFilter); - - const statMethod = opts.lstat ? lstat : stat; - // Use bigint stats if it's windows and stat() supports options (node 10+). - if (wantBigintFsStats) { - this._stat = path => statMethod(path, { bigint: true }); - } else { - this._stat = statMethod; - } - - this._maxDepth = opts.depth; - this._wantsDir = [DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type); - this._wantsFile = [FILE_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type); - this._wantsEverything = type === EVERYTHING_TYPE; - this._root = sysPath.resolve(root); - this._isDirent = ('Dirent' in fs) && !opts.alwaysStat; - this._statsProp = this._isDirent ? 'dirent' : 'stats'; - this._rdOptions = { encoding: 'utf8', withFileTypes: this._isDirent }; - - // Launch stream with one parent, the root dir. - this.parents = [this._exploreDir(root, 1)]; - this.reading = false; - this.parent = undefined; - } - - async _read(batch) { - if (this.reading) return; - this.reading = true; - - try { - while (!this.destroyed && batch > 0) { - const { path, depth, files = [] } = this.parent || {}; - - if (files.length > 0) { - const slice = files.splice(0, batch).map(dirent => this._formatEntry(dirent, path)); - for (const entry of await Promise.all(slice)) { - if (this.destroyed) return; - - const entryType = await this._getEntryType(entry); - if (entryType === 'directory' && this._directoryFilter(entry)) { - if (depth <= this._maxDepth) { - this.parents.push(this._exploreDir(entry.fullPath, depth + 1)); - } - - if (this._wantsDir) { - this.push(entry); - batch--; - } - } else if ((entryType === 'file' || this._includeAsFile(entry)) && this._fileFilter(entry)) { - if (this._wantsFile) { - this.push(entry); - batch--; - } - } - } - } else { - const parent = this.parents.pop(); - if (!parent) { - this.push(null); - break; - } - this.parent = await parent; - if (this.destroyed) return; - } - } - } catch (error) { - this.destroy(error); - } finally { - this.reading = false; - } - } - - async _exploreDir(path, depth) { - let files; - try { - files = await readdir(path, this._rdOptions); - } catch (error) { - this._onError(error); - } - return { files, depth, path }; - } - - async _formatEntry(dirent, path) { - let entry; - try { - const basename = this._isDirent ? dirent.name : dirent; - const fullPath = sysPath.resolve(sysPath.join(path, basename)); - entry = { path: sysPath.relative(this._root, fullPath), fullPath, basename }; - entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath); - } catch (err) { - this._onError(err); - } - return entry; - } - - _onError(err) { - if (isNormalFlowError(err) && !this.destroyed) { - this.emit('warn', err); - } else { - this.destroy(err); - } - } - - async _getEntryType(entry) { - // entry may be undefined, because a warning or an error were emitted - // and the statsProp is undefined - const stats = entry && entry[this._statsProp]; - if (!stats) { - return; - } - if (stats.isFile()) { - return 'file'; - } - if (stats.isDirectory()) { - return 'directory'; - } - if (stats && stats.isSymbolicLink()) { - const full = entry.fullPath; - try { - const entryRealPath = await realpath(full); - const entryRealPathStats = await lstat(entryRealPath); - if (entryRealPathStats.isFile()) { - return 'file'; - } - if (entryRealPathStats.isDirectory()) { - const len = entryRealPath.length; - if (full.startsWith(entryRealPath) && full.substr(len, 1) === sysPath.sep) { - const recursiveError = new Error( - `Circular symlink detected: "${full}" points to "${entryRealPath}"` - ); - recursiveError.code = RECURSIVE_ERROR_CODE; - return this._onError(recursiveError); - } - return 'directory'; - } - } catch (error) { - this._onError(error); - } - } - } - - _includeAsFile(entry) { - const stats = entry && entry[this._statsProp]; - - return stats && this._wantsEverything && !stats.isDirectory(); - } -} - -/** - * @typedef {Object} ReaddirpArguments - * @property {Function=} fileFilter - * @property {Function=} directoryFilter - * @property {String=} type - * @property {Number=} depth - * @property {String=} root - * @property {Boolean=} lstat - * @property {Boolean=} bigint - */ - -/** - * Main function which ends up calling readdirRec and reads all files and directories in given root recursively. - * @param {String} root Root directory - * @param {ReaddirpArguments=} options Options to specify root (start directory), filters and recursion depth - */ -const readdirp = (root, options = {}) => { - let type = options.entryType || options.type; - if (type === 'both') type = FILE_DIR_TYPE; // backwards-compatibility - if (type) options.type = type; - if (!root) { - throw new Error('readdirp: root argument is required. Usage: readdirp(root, options)'); - } else if (typeof root !== 'string') { - throw new TypeError('readdirp: root argument must be a string. Usage: readdirp(root, options)'); - } else if (type && !ALL_TYPES.includes(type)) { - throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(', ')}`); - } - - options.root = root; - return new ReaddirpStream(options); -}; - -const readdirpPromise = (root, options = {}) => { - return new Promise((resolve, reject) => { - const files = []; - readdirp(root, options) - .on('data', entry => files.push(entry)) - .on('end', () => resolve(files)) - .on('error', error => reject(error)); - }); -}; - -readdirp.promise = readdirpPromise; -readdirp.ReaddirpStream = ReaddirpStream; -readdirp.default = readdirp; - -module.exports = readdirp; diff --git a/node_modules/readdirp/package.json b/node_modules/readdirp/package.json deleted file mode 100644 index dba5388..0000000 --- a/node_modules/readdirp/package.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "name": "readdirp", - "description": "Recursive version of fs.readdir with streaming API.", - "version": "3.6.0", - "homepage": "https://github.com/paulmillr/readdirp", - "repository": { - "type": "git", - "url": "git://github.com/paulmillr/readdirp.git" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/paulmillr/readdirp/issues" - }, - "author": "Thorsten Lorenz (thlorenz.com)", - "contributors": [ - "Thorsten Lorenz (thlorenz.com)", - "Paul Miller (https://paulmillr.com)" - ], - "main": "index.js", - "engines": { - "node": ">=8.10.0" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "recursive", - "fs", - "stream", - "streams", - "readdir", - "filesystem", - "find", - "filter" - ], - "scripts": { - "dtslint": "dtslint", - "nyc": "nyc", - "mocha": "mocha --exit", - "lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .", - "test": "npm run lint && nyc npm run mocha" - }, - "dependencies": { - "picomatch": "^2.2.1" - }, - "devDependencies": { - "@types/node": "^14", - "chai": "^4.2", - "chai-subset": "^1.6", - "dtslint": "^3.3.0", - "eslint": "^7.0.0", - "mocha": "^7.1.1", - "nyc": "^15.0.0", - "rimraf": "^3.0.0", - "typescript": "^4.0.3" - }, - "nyc": { - "reporter": [ - "html", - "text" - ] - }, - "eslintConfig": { - "root": true, - "extends": "eslint:recommended", - "parserOptions": { - "ecmaVersion": 9, - "sourceType": "script" - }, - "env": { - "node": true, - "es6": true - }, - "rules": { - "array-callback-return": "error", - "no-empty": [ - "error", - { - "allowEmptyCatch": true - } - ], - "no-else-return": [ - "error", - { - "allowElseIf": false - } - ], - "no-lonely-if": "error", - "no-var": "error", - "object-shorthand": "error", - "prefer-arrow-callback": [ - "error", - { - "allowNamedFunctions": true - } - ], - "prefer-const": [ - "error", - { - "ignoreReadBeforeAssign": true - } - ], - "prefer-destructuring": [ - "error", - { - "object": true, - "array": false - } - ], - "prefer-spread": "error", - "prefer-template": "error", - "radix": "error", - "semi": "error", - "strict": "error", - "quotes": [ - "error", - "single" - ] - } - } -} diff --git a/node_modules/reflect-metadata/AUTHORS.md b/node_modules/reflect-metadata/AUTHORS.md deleted file mode 100644 index 6ccdf3a..0000000 --- a/node_modules/reflect-metadata/AUTHORS.md +++ /dev/null @@ -1,5 +0,0 @@ -reflect-metadata is authored by: -* Cy Brown -* Oleh Dokuka -* Ron Buckton -* William Buchwalter \ No newline at end of file diff --git a/node_modules/reflect-metadata/CopyrightNotice.txt b/node_modules/reflect-metadata/CopyrightNotice.txt deleted file mode 100644 index 884a031..0000000 --- a/node_modules/reflect-metadata/CopyrightNotice.txt +++ /dev/null @@ -1,15 +0,0 @@ -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. 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 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ - diff --git a/node_modules/reflect-metadata/LICENSE b/node_modules/reflect-metadata/LICENSE deleted file mode 100644 index e7259f8..0000000 --- a/node_modules/reflect-metadata/LICENSE +++ /dev/null @@ -1,55 +0,0 @@ -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/node_modules/reflect-metadata/README.md b/node_modules/reflect-metadata/README.md deleted file mode 100644 index be056dc..0000000 --- a/node_modules/reflect-metadata/README.md +++ /dev/null @@ -1,178 +0,0 @@ -# Metadata Reflection API - -* [Detailed proposal][Metadata-Spec] - -## Installation - -``` -npm install reflect-metadata -``` - -## Background - -* Decorators add the ability to augment a class and its members as the class is defined, through a declarative syntax. -* Traceur attaches annotations to a static property on the class. -* Languages like C# (.NET), and Java support attributes or annotations that add metadata to types, along with a reflective API for reading metadata. - -## Goals - -* A number of use cases (Composition/Dependency Injection, Runtime Type Assertions, Reflection/Mirroring, Testing) want the ability to add additional metadata to a class in a consistent manner. -* A consistent approach is needed for various tools and libraries to be able to reason over metadata. -* Metadata-producing decorators (nee. "Annotations") need to be generally composable with mutating decorators. -* Metadata should be available not only on an object but also through a Proxy, with related traps. -* Defining new metadata-producing decorators should not be arduous or over-complex for a developer. -* Metadata should be consistent with other language and runtime features of ECMAScript. - -## Syntax - -* Declarative definition of metadata: -```JavaScript -class C { - @Reflect.metadata(metadataKey, metadataValue) - method() { - } -} -``` - -* Imperative definition of metadata: -```JavaScript -Reflect.defineMetadata(metadataKey, metadataValue, C.prototype, "method"); -``` - -* Imperative introspection of metadata: -```JavaScript -let obj = new C(); -let metadataValue = Reflect.getMetadata(metadataKey, obj, "method"); -``` - -## Semantics - -* Object has a new \[\[Metadata\]\] internal property that will contain a Map whose keys are property keys (or **undefined**) and whose values are Maps of metadata keys to metadata values. -* Object will have a number of new internal methods for \[\[DefineOwnMetadata\]\], \[\[GetOwnMetadata\]\], \[\[HasOwnMetadata\]\], etc. - * These internal methods can be overridden by a Proxy to support additional traps. - * These internal methods will by default call a set of abstract operations to define and read metadata. -* The Reflect object will expose the MOP operations to allow imperative access to metadata. -* Metadata defined on class declaration *C* is stored in *C*.\[\[Metadata\]\], with **undefined** as the key. -* Metadata defined on static members of class declaration *C* are stored in *C*.\[\[Metadata\]\], with the property key as the key. -* Metadata defined on instance members of class declaration *C* are stored in *C*.prototype.\[\[Metadata\]\], with the property key as the key. - -## API - -```JavaScript -// define metadata on an object or property -Reflect.defineMetadata(metadataKey, metadataValue, target); -Reflect.defineMetadata(metadataKey, metadataValue, target, propertyKey); - -// check for presence of a metadata key on the prototype chain of an object or property -let result = Reflect.hasMetadata(metadataKey, target); -let result = Reflect.hasMetadata(metadataKey, target, propertyKey); - -// check for presence of an own metadata key of an object or property -let result = Reflect.hasOwnMetadata(metadataKey, target); -let result = Reflect.hasOwnMetadata(metadataKey, target, propertyKey); - -// get metadata value of a metadata key on the prototype chain of an object or property -let result = Reflect.getMetadata(metadataKey, target); -let result = Reflect.getMetadata(metadataKey, target, propertyKey); - -// get metadata value of an own metadata key of an object or property -let result = Reflect.getOwnMetadata(metadataKey, target); -let result = Reflect.getOwnMetadata(metadataKey, target, propertyKey); - -// get all metadata keys on the prototype chain of an object or property -let result = Reflect.getMetadataKeys(target); -let result = Reflect.getMetadataKeys(target, propertyKey); - -// get all own metadata keys of an object or property -let result = Reflect.getOwnMetadataKeys(target); -let result = Reflect.getOwnMetadataKeys(target, propertyKey); - -// delete metadata from an object or property -let result = Reflect.deleteMetadata(metadataKey, target); -let result = Reflect.deleteMetadata(metadataKey, target, propertyKey); - -// apply metadata via a decorator to a constructor -@Reflect.metadata(metadataKey, metadataValue) -class C { - // apply metadata via a decorator to a method (property) - @Reflect.metadata(metadataKey, metadataValue) - method() { - } -} -``` - -## Alternatives - -* Use properties rather than a separate API. - * Obvious downside is that this can be a lot of code: -```JavaScript -function ParamTypes(...types) { - return (target, propertyKey) => { - const symParamTypes = Symbol.for("design:paramtypes"); - if (propertyKey === undefined) { - target[symParamTypes] = types; - } - else { - const symProperties = Symbol.for("design:properties"); - let properties, property; - if (Object.prototype.hasOwnProperty.call(target, symProperties)) { - properties = target[symProperties]; - } - else { - properties = target[symProperties] = {}; - } - if (Object.prototype.hasOwnProperty.call(properties, propertyKey)) { - property = properties[propertyKey]; - } - else { - property = properties[propertyKey] = {}; - } - property[symParamTypes] = types; - } - }; -} -``` - -## Notes -* Though it may seem counterintuitive, the methods on Reflect place the parameters for the metadata key and metadata value before the target or property key. This is due to the fact that the property key is the only optional parameter in the argument list. This also makes the methods easier to curry with Function#bind. This also helps reduce the overall footprint and complexity of a metadata-producing decorator that could target both a class or a property: - -```JavaScript -function ParamTypes(...types) { - // as propertyKey is effectively optional, its easier to use here - return (target, propertyKey) => { Reflect.defineMetadata("design:paramtypes", types, target, propertyKey); } - - // vs. having multiple overloads with the target and key in the front: - // - // return (target, propertyKey) => { - // if (propertyKey === undefined) { - // Reflect.defineMetadata(target, "design:paramtypes", types); - // } - // else { - // Reflect.defineMetadata(target, propertyKey, "design:paramtypes", types); - // } - // } - // - // vs. having a different methods for the class or a property: - // - // return (target, propertyKey) => { - // if (propertyKey === undefined) { - // Reflect.defineMetadata(target, "design:paramtypes", types); - // } - // else { - // Reflect.definePropertyMetadata(target, propertyKey, "design:paramtypes", types); - // } - // } -} -``` - -* To enable experimental support for metadata decorators in your TypeScript project, you must add `"experimentalDecorators": true` to your tsconfig.json file. -* To enable experimental support for auto-generated type metadata in your TypeScript project, you must add `"emitDecoratorMetadata": true` to your tsconfig.json file. - * Please note that auto-generated type metadata may have issues with circular or forward references for types. - -## Issues - -* A poorly written mutating decorator for a class constructor could cause metadata to become lost if the prototype chain is not maintained. Though, not maintaining the prototype chain in a mutating decorator for a class constructor would have other negative side effects as well. @rbuckton - * This is mitigated if the mutating decorator returns a class expression that extends from the target, or returns a proxy for the decorator. @rbuckton -* Metadata for a method is attached to the class (or prototype) via the property key. It would not then be available if trying to read metadata on the function of the method (e.g. "tearing-off" the method from the class). @rbuckton - -[Metadata-Spec]: https://rbuckton.github.io/reflect-metadata \ No newline at end of file diff --git a/node_modules/reflect-metadata/Reflect.d.ts b/node_modules/reflect-metadata/Reflect.d.ts deleted file mode 100644 index 418a05f..0000000 --- a/node_modules/reflect-metadata/Reflect.d.ts +++ /dev/null @@ -1,494 +0,0 @@ -/*! ***************************************************************************** -Copyright (C) Microsoft. 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 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ - -// NOTE: This file is obsolete and may be removed in a later release. -// For CommonJS/AMD/UMD/SystemJS declarations please use 'index.d.ts'. -// For standalone browser declarations, please use 'standalone.d.ts'. - -declare module "reflect-metadata" { - // The "reflect-metadata" module has no imports or exports, but can be used by modules to load the polyfill. -} - -declare namespace Reflect { - /** - * Applies a set of decorators to a target object. - * @param decorators An array of decorators. - * @param target The target object. - * @returns The result of applying the provided decorators. - * @remarks Decorators are applied in reverse order of their positions in the array. - * @example - * - * class Example { } - * - * // constructor - * Example = Reflect.decorate(decoratorsArray, Example); - * - */ - function decorate(decorators: ClassDecorator[], target: Function): Function; - /** - * Applies a set of decorators to a property of a target object. - * @param decorators An array of decorators. - * @param target The target object. - * @param targetKey The property key to decorate. - * @param descriptor A property descriptor - * @remarks Decorators are applied in reverse order. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod() { } - * method() { } - * } - * - * // property (on constructor) - * Reflect.decorate(decoratorsArray, Example, "staticProperty"); - * - * // property (on prototype) - * Reflect.decorate(decoratorsArray, Example.prototype, "property"); - * - * // method (on constructor) - * Object.defineProperty(Example, "staticMethod", - * Reflect.decorate(decoratorsArray, Example, "staticMethod", - * Object.getOwnPropertyDescriptor(Example, "staticMethod"))); - * - * // method (on prototype) - * Object.defineProperty(Example.prototype, "method", - * Reflect.decorate(decoratorsArray, Example.prototype, "method", - * Object.getOwnPropertyDescriptor(Example.prototype, "method"))); - * - */ - function decorate(decorators: (PropertyDecorator | MethodDecorator)[], target: Object, targetKey: string | symbol, descriptor?: PropertyDescriptor): PropertyDescriptor; - /** - * A default metadata decorator factory that can be used on a class, class member, or parameter. - * @param metadataKey The key for the metadata entry. - * @param metadataValue The value for the metadata entry. - * @returns A decorator function. - * @remarks - * If `metadataKey` is already defined for the target and target key, the - * metadataValue for that key will be overwritten. - * @example - * - * // constructor - * @Reflect.metadata(key, value) - * class Example { - * } - * - * // property (on constructor, TypeScript only) - * class Example { - * @Reflect.metadata(key, value) - * static staticProperty; - * } - * - * // property (on prototype, TypeScript only) - * class Example { - * @Reflect.metadata(key, value) - * property; - * } - * - * // method (on constructor) - * class Example { - * @Reflect.metadata(key, value) - * static staticMethod() { } - * } - * - * // method (on prototype) - * class Example { - * @Reflect.metadata(key, value) - * method() { } - * } - * - */ - function metadata(metadataKey: any, metadataValue: any): { - (target: Function): void; - (target: Object, targetKey: string | symbol): void; - }; - /** - * Define a unique metadata entry on the target. - * @param metadataKey A key used to store and retrieve metadata. - * @param metadataValue A value that contains attached metadata. - * @param target The target object on which to define metadata. - * @example - * - * class Example { - * } - * - * // constructor - * Reflect.defineMetadata("custom:annotation", options, Example); - * - * // decorator factory as metadata-producing annotation. - * function MyAnnotation(options): ClassDecorator { - * return target => Reflect.defineMetadata("custom:annotation", options, target); - * } - * - */ - function defineMetadata(metadataKey: any, metadataValue: any, target: Object): void; - /** - * Define a unique metadata entry on the target. - * @param metadataKey A key used to store and retrieve metadata. - * @param metadataValue A value that contains attached metadata. - * @param target The target object on which to define metadata. - * @param targetKey The property key for the target. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod(p) { } - * method(p) { } - * } - * - * // property (on constructor) - * Reflect.defineMetadata("custom:annotation", Number, Example, "staticProperty"); - * - * // property (on prototype) - * Reflect.defineMetadata("custom:annotation", Number, Example.prototype, "property"); - * - * // method (on constructor) - * Reflect.defineMetadata("custom:annotation", Number, Example, "staticMethod"); - * - * // method (on prototype) - * Reflect.defineMetadata("custom:annotation", Number, Example.prototype, "method"); - * - * // decorator factory as metadata-producing annotation. - * function MyAnnotation(options): PropertyDecorator { - * return (target, key) => Reflect.defineMetadata("custom:annotation", options, target, key); - * } - * - */ - function defineMetadata(metadataKey: any, metadataValue: any, target: Object, targetKey: string | symbol): void; - /** - * Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`. - * @example - * - * class Example { - * } - * - * // constructor - * result = Reflect.hasMetadata("custom:annotation", Example); - * - */ - function hasMetadata(metadataKey: any, target: Object): boolean; - /** - * Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @param targetKey The property key for the target. - * @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod(p) { } - * method(p) { } - * } - * - * // property (on constructor) - * result = Reflect.hasMetadata("custom:annotation", Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.hasMetadata("custom:annotation", Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.hasMetadata("custom:annotation", Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.hasMetadata("custom:annotation", Example.prototype, "method"); - * - */ - function hasMetadata(metadataKey: any, target: Object, targetKey: string | symbol): boolean; - /** - * Gets a value indicating whether the target object has the provided metadata key defined. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @returns `true` if the metadata key was defined on the target object; otherwise, `false`. - * @example - * - * class Example { - * } - * - * // constructor - * result = Reflect.hasOwnMetadata("custom:annotation", Example); - * - */ - function hasOwnMetadata(metadataKey: any, target: Object): boolean; - /** - * Gets a value indicating whether the target object has the provided metadata key defined. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @param targetKey The property key for the target. - * @returns `true` if the metadata key was defined on the target object; otherwise, `false`. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod(p) { } - * method(p) { } - * } - * - * // property (on constructor) - * result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "method"); - * - */ - function hasOwnMetadata(metadataKey: any, target: Object, targetKey: string | symbol): boolean; - /** - * Gets the metadata value for the provided metadata key on the target object or its prototype chain. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @returns The metadata value for the metadata key if found; otherwise, `undefined`. - * @example - * - * class Example { - * } - * - * // constructor - * result = Reflect.getMetadata("custom:annotation", Example); - * - */ - function getMetadata(metadataKey: any, target: Object): any; - /** - * Gets the metadata value for the provided metadata key on the target object or its prototype chain. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @param targetKey The property key for the target. - * @returns The metadata value for the metadata key if found; otherwise, `undefined`. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod(p) { } - * method(p) { } - * } - * - * // property (on constructor) - * result = Reflect.getMetadata("custom:annotation", Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.getMetadata("custom:annotation", Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.getMetadata("custom:annotation", Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.getMetadata("custom:annotation", Example.prototype, "method"); - * - */ - function getMetadata(metadataKey: any, target: Object, targetKey: string | symbol): any; - /** - * Gets the metadata value for the provided metadata key on the target object. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @returns The metadata value for the metadata key if found; otherwise, `undefined`. - * @example - * - * class Example { - * } - * - * // constructor - * result = Reflect.getOwnMetadata("custom:annotation", Example); - * - */ - function getOwnMetadata(metadataKey: any, target: Object): any; - /** - * Gets the metadata value for the provided metadata key on the target object. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @param targetKey The property key for the target. - * @returns The metadata value for the metadata key if found; otherwise, `undefined`. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod(p) { } - * method(p) { } - * } - * - * // property (on constructor) - * result = Reflect.getOwnMetadata("custom:annotation", Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.getOwnMetadata("custom:annotation", Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "method"); - * - */ - function getOwnMetadata(metadataKey: any, target: Object, targetKey: string | symbol): any; - /** - * Gets the metadata keys defined on the target object or its prototype chain. - * @param target The target object on which the metadata is defined. - * @returns An array of unique metadata keys. - * @example - * - * class Example { - * } - * - * // constructor - * result = Reflect.getMetadataKeys(Example); - * - */ - function getMetadataKeys(target: Object): any[]; - /** - * Gets the metadata keys defined on the target object or its prototype chain. - * @param target The target object on which the metadata is defined. - * @param targetKey The property key for the target. - * @returns An array of unique metadata keys. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod(p) { } - * method(p) { } - * } - * - * // property (on constructor) - * result = Reflect.getMetadataKeys(Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.getMetadataKeys(Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.getMetadataKeys(Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.getMetadataKeys(Example.prototype, "method"); - * - */ - function getMetadataKeys(target: Object, targetKey: string | symbol): any[]; - /** - * Gets the unique metadata keys defined on the target object. - * @param target The target object on which the metadata is defined. - * @returns An array of unique metadata keys. - * @example - * - * class Example { - * } - * - * // constructor - * result = Reflect.getOwnMetadataKeys(Example); - * - */ - function getOwnMetadataKeys(target: Object): any[]; - /** - * Gets the unique metadata keys defined on the target object. - * @param target The target object on which the metadata is defined. - * @param targetKey The property key for the target. - * @returns An array of unique metadata keys. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod(p) { } - * method(p) { } - * } - * - * // property (on constructor) - * result = Reflect.getOwnMetadataKeys(Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.getOwnMetadataKeys(Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.getOwnMetadataKeys(Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.getOwnMetadataKeys(Example.prototype, "method"); - * - */ - function getOwnMetadataKeys(target: Object, targetKey: string | symbol): any[]; - /** - * Deletes the metadata entry from the target object with the provided key. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @returns `true` if the metadata entry was found and deleted; otherwise, false. - * @example - * - * class Example { - * } - * - * // constructor - * result = Reflect.deleteMetadata("custom:annotation", Example); - * - */ - function deleteMetadata(metadataKey: any, target: Object): boolean; - /** - * Deletes the metadata entry from the target object with the provided key. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @param targetKey The property key for the target. - * @returns `true` if the metadata entry was found and deleted; otherwise, false. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod(p) { } - * method(p) { } - * } - * - * // property (on constructor) - * result = Reflect.deleteMetadata("custom:annotation", Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.deleteMetadata("custom:annotation", Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "method"); - * - */ - function deleteMetadata(metadataKey: any, target: Object, targetKey: string | symbol): boolean; -} \ No newline at end of file diff --git a/node_modules/reflect-metadata/Reflect.js b/node_modules/reflect-metadata/Reflect.js deleted file mode 100644 index e1a29c9..0000000 --- a/node_modules/reflect-metadata/Reflect.js +++ /dev/null @@ -1,1131 +0,0 @@ -/*! ***************************************************************************** -Copyright (C) Microsoft. 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 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ -var Reflect; -(function (Reflect) { - // Metadata Proposal - // https://rbuckton.github.io/reflect-metadata/ - (function (factory) { - var root = typeof global === "object" ? global : - typeof self === "object" ? self : - typeof this === "object" ? this : - Function("return this;")(); - var exporter = makeExporter(Reflect); - if (typeof root.Reflect === "undefined") { - root.Reflect = Reflect; - } - else { - exporter = makeExporter(root.Reflect, exporter); - } - factory(exporter); - function makeExporter(target, previous) { - return function (key, value) { - if (typeof target[key] !== "function") { - Object.defineProperty(target, key, { configurable: true, writable: true, value: value }); - } - if (previous) - previous(key, value); - }; - } - })(function (exporter) { - var hasOwn = Object.prototype.hasOwnProperty; - // feature test for Symbol support - var supportsSymbol = typeof Symbol === "function"; - var toPrimitiveSymbol = supportsSymbol && typeof Symbol.toPrimitive !== "undefined" ? Symbol.toPrimitive : "@@toPrimitive"; - var iteratorSymbol = supportsSymbol && typeof Symbol.iterator !== "undefined" ? Symbol.iterator : "@@iterator"; - var supportsCreate = typeof Object.create === "function"; // feature test for Object.create support - var supportsProto = { __proto__: [] } instanceof Array; // feature test for __proto__ support - var downLevel = !supportsCreate && !supportsProto; - var HashMap = { - // create an object in dictionary mode (a.k.a. "slow" mode in v8) - create: supportsCreate - ? function () { return MakeDictionary(Object.create(null)); } - : supportsProto - ? function () { return MakeDictionary({ __proto__: null }); } - : function () { return MakeDictionary({}); }, - has: downLevel - ? function (map, key) { return hasOwn.call(map, key); } - : function (map, key) { return key in map; }, - get: downLevel - ? function (map, key) { return hasOwn.call(map, key) ? map[key] : undefined; } - : function (map, key) { return map[key]; }, - }; - // Load global or shim versions of Map, Set, and WeakMap - var functionPrototype = Object.getPrototypeOf(Function); - var usePolyfill = typeof process === "object" && process["env" + ""] && process["env" + ""]["REFLECT_METADATA_USE_MAP_POLYFILL"] === "true"; - var _Map = !usePolyfill && typeof Map === "function" && typeof Map.prototype.entries === "function" ? Map : CreateMapPolyfill(); - var _Set = !usePolyfill && typeof Set === "function" && typeof Set.prototype.entries === "function" ? Set : CreateSetPolyfill(); - var _WeakMap = !usePolyfill && typeof WeakMap === "function" ? WeakMap : CreateWeakMapPolyfill(); - // [[Metadata]] internal slot - // https://rbuckton.github.io/reflect-metadata/#ordinary-object-internal-methods-and-internal-slots - var Metadata = new _WeakMap(); - /** - * Applies a set of decorators to a property of a target object. - * @param decorators An array of decorators. - * @param target The target object. - * @param propertyKey (Optional) The property key to decorate. - * @param attributes (Optional) The property descriptor for the target key. - * @remarks Decorators are applied in reverse order. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * constructor(p) { } - * static staticMethod(p) { } - * method(p) { } - * } - * - * // constructor - * Example = Reflect.decorate(decoratorsArray, Example); - * - * // property (on constructor) - * Reflect.decorate(decoratorsArray, Example, "staticProperty"); - * - * // property (on prototype) - * Reflect.decorate(decoratorsArray, Example.prototype, "property"); - * - * // method (on constructor) - * Object.defineProperty(Example, "staticMethod", - * Reflect.decorate(decoratorsArray, Example, "staticMethod", - * Object.getOwnPropertyDescriptor(Example, "staticMethod"))); - * - * // method (on prototype) - * Object.defineProperty(Example.prototype, "method", - * Reflect.decorate(decoratorsArray, Example.prototype, "method", - * Object.getOwnPropertyDescriptor(Example.prototype, "method"))); - * - */ - function decorate(decorators, target, propertyKey, attributes) { - if (!IsUndefined(propertyKey)) { - if (!IsArray(decorators)) - throw new TypeError(); - if (!IsObject(target)) - throw new TypeError(); - if (!IsObject(attributes) && !IsUndefined(attributes) && !IsNull(attributes)) - throw new TypeError(); - if (IsNull(attributes)) - attributes = undefined; - propertyKey = ToPropertyKey(propertyKey); - return DecorateProperty(decorators, target, propertyKey, attributes); - } - else { - if (!IsArray(decorators)) - throw new TypeError(); - if (!IsConstructor(target)) - throw new TypeError(); - return DecorateConstructor(decorators, target); - } - } - exporter("decorate", decorate); - // 4.1.2 Reflect.metadata(metadataKey, metadataValue) - // https://rbuckton.github.io/reflect-metadata/#reflect.metadata - /** - * A default metadata decorator factory that can be used on a class, class member, or parameter. - * @param metadataKey The key for the metadata entry. - * @param metadataValue The value for the metadata entry. - * @returns A decorator function. - * @remarks - * If `metadataKey` is already defined for the target and target key, the - * metadataValue for that key will be overwritten. - * @example - * - * // constructor - * @Reflect.metadata(key, value) - * class Example { - * } - * - * // property (on constructor, TypeScript only) - * class Example { - * @Reflect.metadata(key, value) - * static staticProperty; - * } - * - * // property (on prototype, TypeScript only) - * class Example { - * @Reflect.metadata(key, value) - * property; - * } - * - * // method (on constructor) - * class Example { - * @Reflect.metadata(key, value) - * static staticMethod() { } - * } - * - * // method (on prototype) - * class Example { - * @Reflect.metadata(key, value) - * method() { } - * } - * - */ - function metadata(metadataKey, metadataValue) { - function decorator(target, propertyKey) { - if (!IsObject(target)) - throw new TypeError(); - if (!IsUndefined(propertyKey) && !IsPropertyKey(propertyKey)) - throw new TypeError(); - OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey); - } - return decorator; - } - exporter("metadata", metadata); - /** - * Define a unique metadata entry on the target. - * @param metadataKey A key used to store and retrieve metadata. - * @param metadataValue A value that contains attached metadata. - * @param target The target object on which to define metadata. - * @param propertyKey (Optional) The property key for the target. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * constructor(p) { } - * static staticMethod(p) { } - * method(p) { } - * } - * - * // constructor - * Reflect.defineMetadata("custom:annotation", options, Example); - * - * // property (on constructor) - * Reflect.defineMetadata("custom:annotation", options, Example, "staticProperty"); - * - * // property (on prototype) - * Reflect.defineMetadata("custom:annotation", options, Example.prototype, "property"); - * - * // method (on constructor) - * Reflect.defineMetadata("custom:annotation", options, Example, "staticMethod"); - * - * // method (on prototype) - * Reflect.defineMetadata("custom:annotation", options, Example.prototype, "method"); - * - * // decorator factory as metadata-producing annotation. - * function MyAnnotation(options): Decorator { - * return (target, key?) => Reflect.defineMetadata("custom:annotation", options, target, key); - * } - * - */ - function defineMetadata(metadataKey, metadataValue, target, propertyKey) { - if (!IsObject(target)) - throw new TypeError(); - if (!IsUndefined(propertyKey)) - propertyKey = ToPropertyKey(propertyKey); - return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey); - } - exporter("defineMetadata", defineMetadata); - /** - * Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @param propertyKey (Optional) The property key for the target. - * @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * constructor(p) { } - * static staticMethod(p) { } - * method(p) { } - * } - * - * // constructor - * result = Reflect.hasMetadata("custom:annotation", Example); - * - * // property (on constructor) - * result = Reflect.hasMetadata("custom:annotation", Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.hasMetadata("custom:annotation", Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.hasMetadata("custom:annotation", Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.hasMetadata("custom:annotation", Example.prototype, "method"); - * - */ - function hasMetadata(metadataKey, target, propertyKey) { - if (!IsObject(target)) - throw new TypeError(); - if (!IsUndefined(propertyKey)) - propertyKey = ToPropertyKey(propertyKey); - return OrdinaryHasMetadata(metadataKey, target, propertyKey); - } - exporter("hasMetadata", hasMetadata); - /** - * Gets a value indicating whether the target object has the provided metadata key defined. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @param propertyKey (Optional) The property key for the target. - * @returns `true` if the metadata key was defined on the target object; otherwise, `false`. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * constructor(p) { } - * static staticMethod(p) { } - * method(p) { } - * } - * - * // constructor - * result = Reflect.hasOwnMetadata("custom:annotation", Example); - * - * // property (on constructor) - * result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "method"); - * - */ - function hasOwnMetadata(metadataKey, target, propertyKey) { - if (!IsObject(target)) - throw new TypeError(); - if (!IsUndefined(propertyKey)) - propertyKey = ToPropertyKey(propertyKey); - return OrdinaryHasOwnMetadata(metadataKey, target, propertyKey); - } - exporter("hasOwnMetadata", hasOwnMetadata); - /** - * Gets the metadata value for the provided metadata key on the target object or its prototype chain. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @param propertyKey (Optional) The property key for the target. - * @returns The metadata value for the metadata key if found; otherwise, `undefined`. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * constructor(p) { } - * static staticMethod(p) { } - * method(p) { } - * } - * - * // constructor - * result = Reflect.getMetadata("custom:annotation", Example); - * - * // property (on constructor) - * result = Reflect.getMetadata("custom:annotation", Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.getMetadata("custom:annotation", Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.getMetadata("custom:annotation", Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.getMetadata("custom:annotation", Example.prototype, "method"); - * - */ - function getMetadata(metadataKey, target, propertyKey) { - if (!IsObject(target)) - throw new TypeError(); - if (!IsUndefined(propertyKey)) - propertyKey = ToPropertyKey(propertyKey); - return OrdinaryGetMetadata(metadataKey, target, propertyKey); - } - exporter("getMetadata", getMetadata); - /** - * Gets the metadata value for the provided metadata key on the target object. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @param propertyKey (Optional) The property key for the target. - * @returns The metadata value for the metadata key if found; otherwise, `undefined`. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * constructor(p) { } - * static staticMethod(p) { } - * method(p) { } - * } - * - * // constructor - * result = Reflect.getOwnMetadata("custom:annotation", Example); - * - * // property (on constructor) - * result = Reflect.getOwnMetadata("custom:annotation", Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.getOwnMetadata("custom:annotation", Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "method"); - * - */ - function getOwnMetadata(metadataKey, target, propertyKey) { - if (!IsObject(target)) - throw new TypeError(); - if (!IsUndefined(propertyKey)) - propertyKey = ToPropertyKey(propertyKey); - return OrdinaryGetOwnMetadata(metadataKey, target, propertyKey); - } - exporter("getOwnMetadata", getOwnMetadata); - /** - * Gets the metadata keys defined on the target object or its prototype chain. - * @param target The target object on which the metadata is defined. - * @param propertyKey (Optional) The property key for the target. - * @returns An array of unique metadata keys. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * constructor(p) { } - * static staticMethod(p) { } - * method(p) { } - * } - * - * // constructor - * result = Reflect.getMetadataKeys(Example); - * - * // property (on constructor) - * result = Reflect.getMetadataKeys(Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.getMetadataKeys(Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.getMetadataKeys(Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.getMetadataKeys(Example.prototype, "method"); - * - */ - function getMetadataKeys(target, propertyKey) { - if (!IsObject(target)) - throw new TypeError(); - if (!IsUndefined(propertyKey)) - propertyKey = ToPropertyKey(propertyKey); - return OrdinaryMetadataKeys(target, propertyKey); - } - exporter("getMetadataKeys", getMetadataKeys); - /** - * Gets the unique metadata keys defined on the target object. - * @param target The target object on which the metadata is defined. - * @param propertyKey (Optional) The property key for the target. - * @returns An array of unique metadata keys. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * constructor(p) { } - * static staticMethod(p) { } - * method(p) { } - * } - * - * // constructor - * result = Reflect.getOwnMetadataKeys(Example); - * - * // property (on constructor) - * result = Reflect.getOwnMetadataKeys(Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.getOwnMetadataKeys(Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.getOwnMetadataKeys(Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.getOwnMetadataKeys(Example.prototype, "method"); - * - */ - function getOwnMetadataKeys(target, propertyKey) { - if (!IsObject(target)) - throw new TypeError(); - if (!IsUndefined(propertyKey)) - propertyKey = ToPropertyKey(propertyKey); - return OrdinaryOwnMetadataKeys(target, propertyKey); - } - exporter("getOwnMetadataKeys", getOwnMetadataKeys); - /** - * Deletes the metadata entry from the target object with the provided key. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @param propertyKey (Optional) The property key for the target. - * @returns `true` if the metadata entry was found and deleted; otherwise, false. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * constructor(p) { } - * static staticMethod(p) { } - * method(p) { } - * } - * - * // constructor - * result = Reflect.deleteMetadata("custom:annotation", Example); - * - * // property (on constructor) - * result = Reflect.deleteMetadata("custom:annotation", Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.deleteMetadata("custom:annotation", Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "method"); - * - */ - function deleteMetadata(metadataKey, target, propertyKey) { - if (!IsObject(target)) - throw new TypeError(); - if (!IsUndefined(propertyKey)) - propertyKey = ToPropertyKey(propertyKey); - var metadataMap = GetOrCreateMetadataMap(target, propertyKey, /*Create*/ false); - if (IsUndefined(metadataMap)) - return false; - if (!metadataMap.delete(metadataKey)) - return false; - if (metadataMap.size > 0) - return true; - var targetMetadata = Metadata.get(target); - targetMetadata.delete(propertyKey); - if (targetMetadata.size > 0) - return true; - Metadata.delete(target); - return true; - } - exporter("deleteMetadata", deleteMetadata); - function DecorateConstructor(decorators, target) { - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - var decorated = decorator(target); - if (!IsUndefined(decorated) && !IsNull(decorated)) { - if (!IsConstructor(decorated)) - throw new TypeError(); - target = decorated; - } - } - return target; - } - function DecorateProperty(decorators, target, propertyKey, descriptor) { - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - var decorated = decorator(target, propertyKey, descriptor); - if (!IsUndefined(decorated) && !IsNull(decorated)) { - if (!IsObject(decorated)) - throw new TypeError(); - descriptor = decorated; - } - } - return descriptor; - } - function GetOrCreateMetadataMap(O, P, Create) { - var targetMetadata = Metadata.get(O); - if (IsUndefined(targetMetadata)) { - if (!Create) - return undefined; - targetMetadata = new _Map(); - Metadata.set(O, targetMetadata); - } - var metadataMap = targetMetadata.get(P); - if (IsUndefined(metadataMap)) { - if (!Create) - return undefined; - metadataMap = new _Map(); - targetMetadata.set(P, metadataMap); - } - return metadataMap; - } - // 3.1.1.1 OrdinaryHasMetadata(MetadataKey, O, P) - // https://rbuckton.github.io/reflect-metadata/#ordinaryhasmetadata - function OrdinaryHasMetadata(MetadataKey, O, P) { - var hasOwn = OrdinaryHasOwnMetadata(MetadataKey, O, P); - if (hasOwn) - return true; - var parent = OrdinaryGetPrototypeOf(O); - if (!IsNull(parent)) - return OrdinaryHasMetadata(MetadataKey, parent, P); - return false; - } - // 3.1.2.1 OrdinaryHasOwnMetadata(MetadataKey, O, P) - // https://rbuckton.github.io/reflect-metadata/#ordinaryhasownmetadata - function OrdinaryHasOwnMetadata(MetadataKey, O, P) { - var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false); - if (IsUndefined(metadataMap)) - return false; - return ToBoolean(metadataMap.has(MetadataKey)); - } - // 3.1.3.1 OrdinaryGetMetadata(MetadataKey, O, P) - // https://rbuckton.github.io/reflect-metadata/#ordinarygetmetadata - function OrdinaryGetMetadata(MetadataKey, O, P) { - var hasOwn = OrdinaryHasOwnMetadata(MetadataKey, O, P); - if (hasOwn) - return OrdinaryGetOwnMetadata(MetadataKey, O, P); - var parent = OrdinaryGetPrototypeOf(O); - if (!IsNull(parent)) - return OrdinaryGetMetadata(MetadataKey, parent, P); - return undefined; - } - // 3.1.4.1 OrdinaryGetOwnMetadata(MetadataKey, O, P) - // https://rbuckton.github.io/reflect-metadata/#ordinarygetownmetadata - function OrdinaryGetOwnMetadata(MetadataKey, O, P) { - var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false); - if (IsUndefined(metadataMap)) - return undefined; - return metadataMap.get(MetadataKey); - } - // 3.1.5.1 OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) - // https://rbuckton.github.io/reflect-metadata/#ordinarydefineownmetadata - function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) { - var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ true); - metadataMap.set(MetadataKey, MetadataValue); - } - // 3.1.6.1 OrdinaryMetadataKeys(O, P) - // https://rbuckton.github.io/reflect-metadata/#ordinarymetadatakeys - function OrdinaryMetadataKeys(O, P) { - var ownKeys = OrdinaryOwnMetadataKeys(O, P); - var parent = OrdinaryGetPrototypeOf(O); - if (parent === null) - return ownKeys; - var parentKeys = OrdinaryMetadataKeys(parent, P); - if (parentKeys.length <= 0) - return ownKeys; - if (ownKeys.length <= 0) - return parentKeys; - var set = new _Set(); - var keys = []; - for (var _i = 0, ownKeys_1 = ownKeys; _i < ownKeys_1.length; _i++) { - var key = ownKeys_1[_i]; - var hasKey = set.has(key); - if (!hasKey) { - set.add(key); - keys.push(key); - } - } - for (var _a = 0, parentKeys_1 = parentKeys; _a < parentKeys_1.length; _a++) { - var key = parentKeys_1[_a]; - var hasKey = set.has(key); - if (!hasKey) { - set.add(key); - keys.push(key); - } - } - return keys; - } - // 3.1.7.1 OrdinaryOwnMetadataKeys(O, P) - // https://rbuckton.github.io/reflect-metadata/#ordinaryownmetadatakeys - function OrdinaryOwnMetadataKeys(O, P) { - var keys = []; - var metadataMap = GetOrCreateMetadataMap(O, P, /*Create*/ false); - if (IsUndefined(metadataMap)) - return keys; - var keysObj = metadataMap.keys(); - var iterator = GetIterator(keysObj); - var k = 0; - while (true) { - var next = IteratorStep(iterator); - if (!next) { - keys.length = k; - return keys; - } - var nextValue = IteratorValue(next); - try { - keys[k] = nextValue; - } - catch (e) { - try { - IteratorClose(iterator); - } - finally { - throw e; - } - } - k++; - } - } - // 6 ECMAScript Data Typ0es and Values - // https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values - function Type(x) { - if (x === null) - return 1 /* Null */; - switch (typeof x) { - case "undefined": return 0 /* Undefined */; - case "boolean": return 2 /* Boolean */; - case "string": return 3 /* String */; - case "symbol": return 4 /* Symbol */; - case "number": return 5 /* Number */; - case "object": return x === null ? 1 /* Null */ : 6 /* Object */; - default: return 6 /* Object */; - } - } - // 6.1.1 The Undefined Type - // https://tc39.github.io/ecma262/#sec-ecmascript-language-types-undefined-type - function IsUndefined(x) { - return x === undefined; - } - // 6.1.2 The Null Type - // https://tc39.github.io/ecma262/#sec-ecmascript-language-types-null-type - function IsNull(x) { - return x === null; - } - // 6.1.5 The Symbol Type - // https://tc39.github.io/ecma262/#sec-ecmascript-language-types-symbol-type - function IsSymbol(x) { - return typeof x === "symbol"; - } - // 6.1.7 The Object Type - // https://tc39.github.io/ecma262/#sec-object-type - function IsObject(x) { - return typeof x === "object" ? x !== null : typeof x === "function"; - } - // 7.1 Type Conversion - // https://tc39.github.io/ecma262/#sec-type-conversion - // 7.1.1 ToPrimitive(input [, PreferredType]) - // https://tc39.github.io/ecma262/#sec-toprimitive - function ToPrimitive(input, PreferredType) { - switch (Type(input)) { - case 0 /* Undefined */: return input; - case 1 /* Null */: return input; - case 2 /* Boolean */: return input; - case 3 /* String */: return input; - case 4 /* Symbol */: return input; - case 5 /* Number */: return input; - } - var hint = PreferredType === 3 /* String */ ? "string" : PreferredType === 5 /* Number */ ? "number" : "default"; - var exoticToPrim = GetMethod(input, toPrimitiveSymbol); - if (exoticToPrim !== undefined) { - var result = exoticToPrim.call(input, hint); - if (IsObject(result)) - throw new TypeError(); - return result; - } - return OrdinaryToPrimitive(input, hint === "default" ? "number" : hint); - } - // 7.1.1.1 OrdinaryToPrimitive(O, hint) - // https://tc39.github.io/ecma262/#sec-ordinarytoprimitive - function OrdinaryToPrimitive(O, hint) { - if (hint === "string") { - var toString_1 = O.toString; - if (IsCallable(toString_1)) { - var result = toString_1.call(O); - if (!IsObject(result)) - return result; - } - var valueOf = O.valueOf; - if (IsCallable(valueOf)) { - var result = valueOf.call(O); - if (!IsObject(result)) - return result; - } - } - else { - var valueOf = O.valueOf; - if (IsCallable(valueOf)) { - var result = valueOf.call(O); - if (!IsObject(result)) - return result; - } - var toString_2 = O.toString; - if (IsCallable(toString_2)) { - var result = toString_2.call(O); - if (!IsObject(result)) - return result; - } - } - throw new TypeError(); - } - // 7.1.2 ToBoolean(argument) - // https://tc39.github.io/ecma262/2016/#sec-toboolean - function ToBoolean(argument) { - return !!argument; - } - // 7.1.12 ToString(argument) - // https://tc39.github.io/ecma262/#sec-tostring - function ToString(argument) { - return "" + argument; - } - // 7.1.14 ToPropertyKey(argument) - // https://tc39.github.io/ecma262/#sec-topropertykey - function ToPropertyKey(argument) { - var key = ToPrimitive(argument, 3 /* String */); - if (IsSymbol(key)) - return key; - return ToString(key); - } - // 7.2 Testing and Comparison Operations - // https://tc39.github.io/ecma262/#sec-testing-and-comparison-operations - // 7.2.2 IsArray(argument) - // https://tc39.github.io/ecma262/#sec-isarray - function IsArray(argument) { - return Array.isArray - ? Array.isArray(argument) - : argument instanceof Object - ? argument instanceof Array - : Object.prototype.toString.call(argument) === "[object Array]"; - } - // 7.2.3 IsCallable(argument) - // https://tc39.github.io/ecma262/#sec-iscallable - function IsCallable(argument) { - // NOTE: This is an approximation as we cannot check for [[Call]] internal method. - return typeof argument === "function"; - } - // 7.2.4 IsConstructor(argument) - // https://tc39.github.io/ecma262/#sec-isconstructor - function IsConstructor(argument) { - // NOTE: This is an approximation as we cannot check for [[Construct]] internal method. - return typeof argument === "function"; - } - // 7.2.7 IsPropertyKey(argument) - // https://tc39.github.io/ecma262/#sec-ispropertykey - function IsPropertyKey(argument) { - switch (Type(argument)) { - case 3 /* String */: return true; - case 4 /* Symbol */: return true; - default: return false; - } - } - // 7.3 Operations on Objects - // https://tc39.github.io/ecma262/#sec-operations-on-objects - // 7.3.9 GetMethod(V, P) - // https://tc39.github.io/ecma262/#sec-getmethod - function GetMethod(V, P) { - var func = V[P]; - if (func === undefined || func === null) - return undefined; - if (!IsCallable(func)) - throw new TypeError(); - return func; - } - // 7.4 Operations on Iterator Objects - // https://tc39.github.io/ecma262/#sec-operations-on-iterator-objects - function GetIterator(obj) { - var method = GetMethod(obj, iteratorSymbol); - if (!IsCallable(method)) - throw new TypeError(); // from Call - var iterator = method.call(obj); - if (!IsObject(iterator)) - throw new TypeError(); - return iterator; - } - // 7.4.4 IteratorValue(iterResult) - // https://tc39.github.io/ecma262/2016/#sec-iteratorvalue - function IteratorValue(iterResult) { - return iterResult.value; - } - // 7.4.5 IteratorStep(iterator) - // https://tc39.github.io/ecma262/#sec-iteratorstep - function IteratorStep(iterator) { - var result = iterator.next(); - return result.done ? false : result; - } - // 7.4.6 IteratorClose(iterator, completion) - // https://tc39.github.io/ecma262/#sec-iteratorclose - function IteratorClose(iterator) { - var f = iterator["return"]; - if (f) - f.call(iterator); - } - // 9.1 Ordinary Object Internal Methods and Internal Slots - // https://tc39.github.io/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots - // 9.1.1.1 OrdinaryGetPrototypeOf(O) - // https://tc39.github.io/ecma262/#sec-ordinarygetprototypeof - function OrdinaryGetPrototypeOf(O) { - var proto = Object.getPrototypeOf(O); - if (typeof O !== "function" || O === functionPrototype) - return proto; - // TypeScript doesn't set __proto__ in ES5, as it's non-standard. - // Try to determine the superclass constructor. Compatible implementations - // must either set __proto__ on a subclass constructor to the superclass constructor, - // or ensure each class has a valid `constructor` property on its prototype that - // points back to the constructor. - // If this is not the same as Function.[[Prototype]], then this is definately inherited. - // This is the case when in ES6 or when using __proto__ in a compatible browser. - if (proto !== functionPrototype) - return proto; - // If the super prototype is Object.prototype, null, or undefined, then we cannot determine the heritage. - var prototype = O.prototype; - var prototypeProto = prototype && Object.getPrototypeOf(prototype); - if (prototypeProto == null || prototypeProto === Object.prototype) - return proto; - // If the constructor was not a function, then we cannot determine the heritage. - var constructor = prototypeProto.constructor; - if (typeof constructor !== "function") - return proto; - // If we have some kind of self-reference, then we cannot determine the heritage. - if (constructor === O) - return proto; - // we have a pretty good guess at the heritage. - return constructor; - } - // naive Map shim - function CreateMapPolyfill() { - var cacheSentinel = {}; - var arraySentinel = []; - var MapIterator = /** @class */ (function () { - function MapIterator(keys, values, selector) { - this._index = 0; - this._keys = keys; - this._values = values; - this._selector = selector; - } - MapIterator.prototype["@@iterator"] = function () { return this; }; - MapIterator.prototype[iteratorSymbol] = function () { return this; }; - MapIterator.prototype.next = function () { - var index = this._index; - if (index >= 0 && index < this._keys.length) { - var result = this._selector(this._keys[index], this._values[index]); - if (index + 1 >= this._keys.length) { - this._index = -1; - this._keys = arraySentinel; - this._values = arraySentinel; - } - else { - this._index++; - } - return { value: result, done: false }; - } - return { value: undefined, done: true }; - }; - MapIterator.prototype.throw = function (error) { - if (this._index >= 0) { - this._index = -1; - this._keys = arraySentinel; - this._values = arraySentinel; - } - throw error; - }; - MapIterator.prototype.return = function (value) { - if (this._index >= 0) { - this._index = -1; - this._keys = arraySentinel; - this._values = arraySentinel; - } - return { value: value, done: true }; - }; - return MapIterator; - }()); - return /** @class */ (function () { - function Map() { - this._keys = []; - this._values = []; - this._cacheKey = cacheSentinel; - this._cacheIndex = -2; - } - Object.defineProperty(Map.prototype, "size", { - get: function () { return this._keys.length; }, - enumerable: true, - configurable: true - }); - Map.prototype.has = function (key) { return this._find(key, /*insert*/ false) >= 0; }; - Map.prototype.get = function (key) { - var index = this._find(key, /*insert*/ false); - return index >= 0 ? this._values[index] : undefined; - }; - Map.prototype.set = function (key, value) { - var index = this._find(key, /*insert*/ true); - this._values[index] = value; - return this; - }; - Map.prototype.delete = function (key) { - var index = this._find(key, /*insert*/ false); - if (index >= 0) { - var size = this._keys.length; - for (var i = index + 1; i < size; i++) { - this._keys[i - 1] = this._keys[i]; - this._values[i - 1] = this._values[i]; - } - this._keys.length--; - this._values.length--; - if (key === this._cacheKey) { - this._cacheKey = cacheSentinel; - this._cacheIndex = -2; - } - return true; - } - return false; - }; - Map.prototype.clear = function () { - this._keys.length = 0; - this._values.length = 0; - this._cacheKey = cacheSentinel; - this._cacheIndex = -2; - }; - Map.prototype.keys = function () { return new MapIterator(this._keys, this._values, getKey); }; - Map.prototype.values = function () { return new MapIterator(this._keys, this._values, getValue); }; - Map.prototype.entries = function () { return new MapIterator(this._keys, this._values, getEntry); }; - Map.prototype["@@iterator"] = function () { return this.entries(); }; - Map.prototype[iteratorSymbol] = function () { return this.entries(); }; - Map.prototype._find = function (key, insert) { - if (this._cacheKey !== key) { - this._cacheIndex = this._keys.indexOf(this._cacheKey = key); - } - if (this._cacheIndex < 0 && insert) { - this._cacheIndex = this._keys.length; - this._keys.push(key); - this._values.push(undefined); - } - return this._cacheIndex; - }; - return Map; - }()); - function getKey(key, _) { - return key; - } - function getValue(_, value) { - return value; - } - function getEntry(key, value) { - return [key, value]; - } - } - // naive Set shim - function CreateSetPolyfill() { - return /** @class */ (function () { - function Set() { - this._map = new _Map(); - } - Object.defineProperty(Set.prototype, "size", { - get: function () { return this._map.size; }, - enumerable: true, - configurable: true - }); - Set.prototype.has = function (value) { return this._map.has(value); }; - Set.prototype.add = function (value) { return this._map.set(value, value), this; }; - Set.prototype.delete = function (value) { return this._map.delete(value); }; - Set.prototype.clear = function () { this._map.clear(); }; - Set.prototype.keys = function () { return this._map.keys(); }; - Set.prototype.values = function () { return this._map.values(); }; - Set.prototype.entries = function () { return this._map.entries(); }; - Set.prototype["@@iterator"] = function () { return this.keys(); }; - Set.prototype[iteratorSymbol] = function () { return this.keys(); }; - return Set; - }()); - } - // naive WeakMap shim - function CreateWeakMapPolyfill() { - var UUID_SIZE = 16; - var keys = HashMap.create(); - var rootKey = CreateUniqueKey(); - return /** @class */ (function () { - function WeakMap() { - this._key = CreateUniqueKey(); - } - WeakMap.prototype.has = function (target) { - var table = GetOrCreateWeakMapTable(target, /*create*/ false); - return table !== undefined ? HashMap.has(table, this._key) : false; - }; - WeakMap.prototype.get = function (target) { - var table = GetOrCreateWeakMapTable(target, /*create*/ false); - return table !== undefined ? HashMap.get(table, this._key) : undefined; - }; - WeakMap.prototype.set = function (target, value) { - var table = GetOrCreateWeakMapTable(target, /*create*/ true); - table[this._key] = value; - return this; - }; - WeakMap.prototype.delete = function (target) { - var table = GetOrCreateWeakMapTable(target, /*create*/ false); - return table !== undefined ? delete table[this._key] : false; - }; - WeakMap.prototype.clear = function () { - // NOTE: not a real clear, just makes the previous data unreachable - this._key = CreateUniqueKey(); - }; - return WeakMap; - }()); - function CreateUniqueKey() { - var key; - do - key = "@@WeakMap@@" + CreateUUID(); - while (HashMap.has(keys, key)); - keys[key] = true; - return key; - } - function GetOrCreateWeakMapTable(target, create) { - if (!hasOwn.call(target, rootKey)) { - if (!create) - return undefined; - Object.defineProperty(target, rootKey, { value: HashMap.create() }); - } - return target[rootKey]; - } - function FillRandomBytes(buffer, size) { - for (var i = 0; i < size; ++i) - buffer[i] = Math.random() * 0xff | 0; - return buffer; - } - function GenRandomBytes(size) { - if (typeof Uint8Array === "function") { - if (typeof crypto !== "undefined") - return crypto.getRandomValues(new Uint8Array(size)); - if (typeof msCrypto !== "undefined") - return msCrypto.getRandomValues(new Uint8Array(size)); - return FillRandomBytes(new Uint8Array(size), size); - } - return FillRandomBytes(new Array(size), size); - } - function CreateUUID() { - var data = GenRandomBytes(UUID_SIZE); - // mark as random - RFC 4122 § 4.4 - data[6] = data[6] & 0x4f | 0x40; - data[8] = data[8] & 0xbf | 0x80; - var result = ""; - for (var offset = 0; offset < UUID_SIZE; ++offset) { - var byte = data[offset]; - if (offset === 4 || offset === 6 || offset === 8) - result += "-"; - if (byte < 16) - result += "0"; - result += byte.toString(16).toLowerCase(); - } - return result; - } - } - // uses a heuristic used by v8 and chakra to force an object into dictionary mode. - function MakeDictionary(obj) { - obj.__ = undefined; - delete obj.__; - return obj; - } - }); -})(Reflect || (Reflect = {})); diff --git a/node_modules/reflect-metadata/docs/ecmarkup.css b/node_modules/reflect-metadata/docs/ecmarkup.css deleted file mode 100644 index de9bbfb..0000000 --- a/node_modules/reflect-metadata/docs/ecmarkup.css +++ /dev/null @@ -1,945 +0,0 @@ -body { - display: flex; - font-size: 18px; - line-height: 1.5; - font-family: Cambria, Palatino Linotype, Palatino, Liberation Serif, serif; - padding: 0; - margin: 0; - color: #111; -} - -#spec-container { - padding: 0 20px; - flex-grow: 1; - flex-basis: 66%; - box-sizing: border-box; - overflow: hidden; -} - -body.oldtoc { - margin: 0 auto; -} - -a { - text-decoration: none; - color: #206ca7; -} - -a:visited { - color: #206ca7; -} - -a:hover { - text-decoration: underline; - color: #239dee; -} - - -code { - font-weight: bold; - font-family: Consolas, Monaco, monospace; - white-space: pre; -} - -pre code { - font-weight: inherit; -} - -pre code.hljs { - background-color: #fff; - margin: 0; - padding: 0; -} - -ol.toc { - list-style: none; - padding-left: 0; -} - -ol.toc ol.toc { - padding-left: 2ex; - list-style: none; -} - -var { - color: #2aa198; - transition: background-color 0.25s ease; - cursor: pointer; -} - -var.referenced { - background-color: #ffff33; -} - -emu-const { - font-family: sans-serif; -} - -emu-val { - font-weight: bold; -} - -/* depth 1 */ -emu-alg ol, -/* depth 4 */ -emu-alg ol ol ol ol, -emu-alg ol.nested-thrice, -emu-alg ol.nested-twice ol, -emu-alg ol.nested-once ol ol { - list-style-type: decimal; -} - -/* depth 2 */ -emu-alg ol ol, -emu-alg ol.nested-once, -/* depth 5 */ -emu-alg ol ol ol ol ol, -emu-alg ol.nested-four-times, -emu-alg ol.nested-thrice ol, -emu-alg ol.nested-twice ol ol, -emu-alg ol.nested-once ol ol ol { - list-style-type: lower-alpha; -} - -/* depth 3 */ -emu-alg ol ol ol, -emu-alg ol.nested-twice, -emu-alg ol.nested-once ol, -/* depth 6 */ -emu-alg ol ol ol ol ol ol, -emu-alg ol.nested-lots, -emu-alg ol.nested-four-times ol, -emu-alg ol.nested-thrice ol ol, -emu-alg ol.nested-twice ol ol ol, -emu-alg ol.nested-once ol ol ol ol, -/* depth 7+ */ -emu-alg ol.nested-lots ol { - list-style-type: lower-roman; -} - -emu-eqn { - display: block; - margin-left: 4em; -} - -emu-eqn.inline { - display: inline; - margin: 0; -} - -emu-eqn div:first-child { - margin-left: -2em; -} - -emu-note { - margin: 1em 0; - color: #666; - border-left: 5px solid #ccc; - display: flex; - flex-direction: row; -} - -emu-note > span.note { - flex-basis: 100px; - min-width: 100px; - flex-grow: 0; - flex-shrink: 1; - text-transform: uppercase; - padding-left: 5px; -} - -emu-note[type=editor] { - border-left-color: #faa; -} - -emu-note > div.note-contents { - flex-grow: 1; - flex-shrink: 1; -} - -emu-note > div.note-contents > p:first-of-type { - margin-top: 0; -} - -emu-note > div.note-contents > p:last-of-type { - margin-bottom: 0; -} - -emu-table td code { - white-space: normal; -} - -emu-figure { - display: block; -} - -emu-example { - display: block; - margin: 1em 3em; -} - -emu-example figure figcaption { - margin-top: 0.5em; - text-align: left; -} - -emu-figure figure, -emu-example figure, -emu-table figure { - display: flex; - flex-direction: column; - align-items: center; -} - -emu-production { - display: block; -} - -emu-grammar[type="example"] emu-production, -emu-grammar[type="definition"] emu-production { - margin-top: 1em; - margin-bottom: 1em; - margin-left: 5ex; -} - -emu-grammar.inline, emu-production.inline, -emu-grammar.inline emu-production emu-rhs, emu-production.inline emu-rhs, -emu-grammar[collapsed] emu-production emu-rhs, emu-production[collapsed] emu-rhs { - display: inline; - padding-left: 1ex; - margin-left: 0; -} - -emu-grammar[collapsed] emu-production, emu-production[collapsed] { - margin: 0; -} - -emu-constraints { - font-size: .75em; - margin-right: 1ex; -} - -emu-gann { - margin-right: 1ex; -} - -emu-gann emu-t:last-child, -emu-gann emu-gprose:last-child, -emu-gann emu-nt:last-child { - margin-right: 0; -} - -emu-geq { - margin-left: 1ex; - font-weight: bold; -} - -emu-oneof { - font-weight: bold; - margin-left: 1ex; -} - -emu-nt { - display: inline-block; - font-style: italic; - white-space: nowrap; - text-indent: 0; -} - -emu-nt a, emu-nt a:visited { - color: #333; -} - -emu-rhs emu-nt { - margin-right: 1ex; -} - -emu-t { - display: inline-block; - font-family: monospace; - font-weight: bold; - white-space: nowrap; - text-indent: 0; -} - -emu-production emu-t { - margin-right: 1ex; -} - -emu-rhs { - display: block; - padding-left: 75px; - text-indent: -25px; -} - -emu-mods { - font-size: .85em; - vertical-align: sub; - font-style: normal; - font-weight: normal; -} - -emu-params, emu-opt { - margin-right: 1ex; - font-family: monospace; -} - -emu-params, emu-constraints { - color: #2aa198; -} - -emu-opt { - color: #b58900; -} - -emu-gprose { - font-size: 0.9em; - font-family: Helvetica, Arial, sans-serif; -} - -emu-production emu-gprose { - margin-right: 1ex; -} - -h1.shortname { - color: #f60; - font-size: 1.5em; - margin: 0; -} - -h1.version { - color: #f60; - font-size: 1.5em; - margin: 0; -} - -h1.title { - margin-top: 0; - color: #f60; -} - -h1.first { - margin-top: 0; -} - -h1, h2, h3, h4, h5, h6 { - position: relative; -} - -h1 .secnum { - text-decoration: none; - margin-right: 5px; -} - -h1 span.title { - order: 2; -} - - -h1 { font-size: 2.67em; margin-top: 2em; margin-bottom: 0; line-height: 1em;} -h2 { font-size: 2em; } -h3 { font-size: 1.56em; } -h4 { font-size: 1.25em; } -h5 { font-size: 1.11em; } -h6 { font-size: 1em; } - -h1:hover span.utils { - display: block; -} - -span.utils { - font-size: 18px; - line-height: 18px; - display: none; - position: absolute; - top: 100%; - left: 0; - right: 0; - font-weight: normal; -} - -span.utils:before { - content: "⤷"; - display: inline-block; - padding: 0 5px; -} - -span.utils > * { - display: inline-block; - margin-right: 20px; -} - -h1 span.utils span.anchor a, -h2 span.utils span.anchor a, -h3 span.utils span.anchor a, -h4 span.utils span.anchor a, -h5 span.utils span.anchor a, -h6 span.utils span.anchor a { - text-decoration: none; - font-variant: small-caps; -} - -h1 span.utils span.anchor a:hover, -h2 span.utils span.anchor a:hover, -h3 span.utils span.anchor a:hover, -h4 span.utils span.anchor a:hover, -h5 span.utils span.anchor a:hover, -h6 span.utils span.anchor a:hover { - color: #333; -} - -emu-intro h1, emu-clause h1, emu-annex h1 { font-size: 2em; } -emu-intro h2, emu-clause h2, emu-annex h2 { font-size: 1.56em; } -emu-intro h3, emu-clause h3, emu-annex h3 { font-size: 1.25em; } -emu-intro h4, emu-clause h4, emu-annex h4 { font-size: 1.11em; } -emu-intro h5, emu-clause h5, emu-annex h5 { font-size: 1em; } -emu-intro h6, emu-clause h6, emu-annex h6 { font-size: 0.9em; } -emu-intro emu-intro h1, emu-clause emu-clause h1, emu-annex emu-annex h1 { font-size: 1.56em; } -emu-intro emu-intro h2, emu-clause emu-clause h2, emu-annex emu-annex h2 { font-size: 1.25em; } -emu-intro emu-intro h3, emu-clause emu-clause h3, emu-annex emu-annex h3 { font-size: 1.11em; } -emu-intro emu-intro h4, emu-clause emu-clause h4, emu-annex emu-annex h4 { font-size: 1em; } -emu-intro emu-intro h5, emu-clause emu-clause h5, emu-annex emu-annex h5 { font-size: 0.9em; } -emu-intro emu-intro emu-intro h1, emu-clause emu-clause emu-clause h1, emu-annex emu-annex emu-annex h1 { font-size: 1.25em; } -emu-intro emu-intro emu-intro h2, emu-clause emu-clause emu-clause h2, emu-annex emu-annex emu-annex h2 { font-size: 1.11em; } -emu-intro emu-intro emu-intro h3, emu-clause emu-clause emu-clause h3, emu-annex emu-annex emu-annex h3 { font-size: 1em; } -emu-intro emu-intro emu-intro h4, emu-clause emu-clause emu-clause h4, emu-annex emu-annex emu-annex h4 { font-size: 0.9em; } -emu-intro emu-intro emu-intro emu-intro h1, emu-clause emu-clause emu-clause emu-clause h1, emu-annex emu-annex emu-annex emu-annex h1 { font-size: 1.11em; } -emu-intro emu-intro emu-intro emu-intro h2, emu-clause emu-clause emu-clause emu-clause h2, emu-annex emu-annex emu-annex emu-annex h2 { font-size: 1em; } -emu-intro emu-intro emu-intro emu-intro h3, emu-clause emu-clause emu-clause emu-clause h3, emu-annex emu-annex emu-annex emu-annex h3 { font-size: 0.9em; } -emu-intro emu-intro emu-intro emu-intro emu-intro h1, emu-clause emu-clause emu-clause emu-clause emu-clause h1, emu-annex emu-annex emu-annex emu-annex emu-annex h1 { font-size: 1em; } -emu-intro emu-intro emu-intro emu-intro emu-intro h2, emu-clause emu-clause emu-clause emu-clause emu-clause h2, emu-annex emu-annex emu-annex emu-annex emu-annex h2 { font-size: 0.9em; } -emu-intro emu-intro emu-intro emu-intro emu-intro emu-intro h1, emu-clause emu-clause emu-clause emu-clause emu-clause emu-clause h1, emu-annex emu-annex emu-annex emu-annex emu-annex emu-annex h1 { font-size: 0.9em } - -emu-clause, emu-intro, emu-annex { - display: block; -} - -/* Figures and tables */ -figure { display: block; margin: 1em 0 3em 0; } -figure object { display: block; margin: 0 auto; } -figure table.real-table { margin: 0 auto; } -figure figcaption { - display: block; - color: #555555; - font-weight: bold; - text-align: center; -} - -emu-table table { - margin: 0 auto; -} - -emu-table table, table.real-table { - border-collapse: collapse; -} - -emu-table td, emu-table th, table.real-table td, table.real-table th { - border: 1px solid black; - padding: 0.4em; - vertical-align: baseline; -} -emu-table th, emu-table thead td, table.real-table th { - background-color: #eeeeee; -} - -/* Note: the left content edges of table.lightweight-table >tbody >tr >td - and div.display line up. */ -table.lightweight-table { - border-collapse: collapse; - margin: 0 0 0 1.5em; -} -table.lightweight-table td, table.lightweight-table th { - border: none; - padding: 0 0.5em; - vertical-align: baseline; -} - -/* diff styles */ -ins { - background-color: #e0f8e0; - text-decoration: none; - border-bottom: 1px solid #396; -} - -del { - background-color: #fee; -} - -ins.block, del.block, -emu-production > ins, emu-production > del, -emu-grammar > ins, emu-grammar > del { - display: block; -} -emu-rhs > ins, emu-rhs > del { - display: inline; -} - -tr.ins > td > ins { - border-bottom: none; -} - -tr.ins > td { - background-color: #e0f8e0; -} - -tr.del > td { - background-color: #fee; -} - -/* Menu Styles */ -#menu-toggle { - font-size: 2em; - - position: fixed; - top: 0; - left: 0; - width: 1.5em; - height: 1.5em; - z-index: 3; - visibility: hidden; - color: #1567a2; - background-color: #fff; - - line-height: 1.5em; - text-align: center; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none;; - - cursor: pointer; -} - -#menu { - display: flex; - flex-direction: column; - width: 33%; height: 100vh; - max-width: 500px; - box-sizing: border-box; - background-color: #ddd; - overflow: hidden; - transition: opacity 0.1s linear; - padding: 0 5px; - position: fixed; - left: 0; top: 0; - border-right: 2px solid #bbb; - - z-index: 2; -} - -#menu-spacer { - flex-basis: 33%; - max-width: 500px; - flex-grow: 0; - flex-shrink: 0; -} - -#menu a { - color: #1567a2; -} - -#menu.active { - display: flex; - opacity: 1; - z-index: 2; -} - -#menu-pins { - flex-grow: 1; - display: none; -} - -#menu-pins.active { - display: block; -} - -#menu-pins-list { - margin: 0; - padding: 0; - counter-reset: pins-counter; -} - -#menu-pins-list > li:before { - content: counter(pins-counter); - counter-increment: pins-counter; - display: inline-block; - width: 25px; - text-align: center; - border: 1px solid #bbb; - padding: 2px; - margin: 4px; - box-sizing: border-box; - line-height: 1em; - background-color: #ccc; - border-radius: 4px; -} -#menu-toc > ol { - padding: 0; - flex-grow: 1; -} - -#menu-toc > ol li { - padding: 0; -} - -#menu-toc > ol , #menu-toc > ol ol { - list-style-type: none; - margin: 0; - padding: 0; -} - -#menu-toc > ol ol { - padding-left: 0.75em; -} - -#menu-toc li { - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; -} - -#menu-toc .item-toggle { - display: inline-block; - transform: rotate(-45deg) translate(-5px, -5px); - transition: transform 0.1s ease; - text-align: center; - width: 20px; - - color: #aab; - - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none;; - - cursor: pointer; -} - -#menu-toc .item-toggle-none { - display: inline-block; - width: 20px; -} - -#menu-toc li.active > .item-toggle { - transform: rotate(45deg) translate(-5px, -5px); -} - -#menu-toc li > ol { - display: none; -} - -#menu-toc li.active > ol { - display: block; -} - -#menu-toc li.revealed > a { - background-color: #bbb; - font-weight: bold; - /* - background-color: #222; - color: #c6d8e4; - */ -} - -#menu-toc li.revealed-leaf> a { - color: #206ca7; - /* - background-color: #222; - color: #c6d8e4; - */ -} - -#menu-toc li.revealed > .item-toggle { - transform: rotate(45deg) translate(-5px, -5px); -} - -#menu-toc li.revealed > ol { - display: block; -} - -#menu-toc li > a { - padding: 2px 5px; -} - -#menu > * { - margin-bottom: 5px; -} - -.menu-pane-header { - padding: 0 5px; - text-transform: uppercase; - background-color: #aaa; - color: #335; - font-weight: bold; - letter-spacing: 2px; - flex-grow: 0; - flex-shrink: 0; - font-size: 0.8em; -} - -#menu-toc { - display: flex; - flex-direction: column; - width: 100%; - overflow: hidden; - flex-grow: 1; -} - -#menu-toc ol.toc { - overflow-x: hidden; - overflow-y: auto; -} - -#menu-search { - position: relative; - flex-grow: 0; - flex-shrink: 0; - width: 100%; - - display: flex; - flex-direction: column; - - max-height: 300px; -} - -#menu-trace-list { - display: none; -} - -#menu-search-box { - box-sizing: border-box; - display: block; - width: 100%; - margin: 5px 0 0 0; - font-size: 1em; - padding: 2px; - background-color: #bbb; - border: 1px solid #999; -} - -#menu-search-results { - overflow-x: hidden; - overflow-y: auto; -} - -li.menu-search-result-clause:before { - content: 'clause'; - width: 40px; - display: inline-block; - text-align: right; - padding-right: 1ex; - color: #666; - font-size: 75%; -} -li.menu-search-result-op:before { - content: 'op'; - width: 40px; - display: inline-block; - text-align: right; - padding-right: 1ex; - color: #666; - font-size: 75%; -} - -li.menu-search-result-prod:before { - content: 'prod'; - width: 40px; - display: inline-block; - text-align: right; - padding-right: 1ex; - color: #666; - font-size: 75% -} - - -li.menu-search-result-term:before { - content: 'term'; - width: 40px; - display: inline-block; - text-align: right; - padding-right: 1ex; - color: #666; - font-size: 75% -} - -#menu-search-results ul { - padding: 0 5px; - margin: 0; -} - -#menu-search-results li { - white-space: nowrap; - text-overflow: ellipsis; -} - - -#menu-trace-list { - counter-reset: item; - margin: 0 0 0 20px; - padding: 0; -} -#menu-trace-list li { - display: block; - white-space: nowrap; -} - -#menu-trace-list li .secnum:after { - content: " "; -} -#menu-trace-list li:before { - content: counter(item) " "; - background-color: #222; - counter-increment: item; - color: #999; - width: 20px; - height: 20px; - line-height: 20px; - display: inline-block; - text-align: center; - margin: 2px 4px 2px 0; -} - -@media (max-width: 1000px) { - body { - margin: 0; - display: block; - } - - #menu { - display: none; - padding-top: 3em; - width: 450px; - } - - #menu.active { - position: fixed; - height: 100%; - left: 0; - top: 0; - right: 300px; - } - - #menu-toggle { - visibility: visible; - } - - #spec-container { - padding: 0 5px; - } - - #references-pane-spacer { - display: none; - } -} - -@media only screen and (max-width: 800px) { - #menu { - width: 100%; - } - - h1 .secnum:empty { - margin: 0; padding: 0; - } -} - - -/* Toolbox */ -.toolbox { - position: absolute; - background: #ddd; - border: 1px solid #aaa; - display: none; - color: #eee; - padding: 5px; - border-radius: 3px; -} - -.toolbox.active { - display: inline-block; -} - -.toolbox a { - text-decoration: none; - padding: 0 5px; -} - -.toolbox a:hover { - text-decoration: underline; -} - -.toolbox:after, .toolbox:before { - top: 100%; - left: 15px; - border: solid transparent; - content: " "; - height: 0; - width: 0; - position: absolute; - pointer-events: none; -} - -.toolbox:after { - border-color: rgba(0, 0, 0, 0); - border-top-color: #ddd; - border-width: 10px; - margin-left: -10px; -} -.toolbox:before { - border-color: rgba(204, 204, 204, 0); - border-top-color: #aaa; - border-width: 12px; - margin-left: -12px; -} - -#references-pane-container { - position: fixed; - bottom: 0; - left: 0; - right: 0; - height: 250px; - display: none; - background-color: #ddd; - z-index: 1; -} - -#references-pane-table-container { - overflow-x: hidden; - overflow-y: auto; -} - -#references-pane-spacer { - flex-basis: 33%; - max-width: 500px; -} - -#references-pane { - flex-grow: 1; - overflow: hidden; - display: flex; - flex-direction: column; -} - -#references-pane-container.active { - display: flex; -} - -#references-pane-close:after { - content: '✖'; - float: right; - cursor: pointer; -} - -#references-pane table tr td:first-child { - text-align: right; - padding-right: 5px; -} - -@media print { - #menu-toggle { - display: none; - } -} diff --git a/node_modules/reflect-metadata/docs/ecmarkup.js b/node_modules/reflect-metadata/docs/ecmarkup.js deleted file mode 100644 index ef29b3f..0000000 --- a/node_modules/reflect-metadata/docs/ecmarkup.js +++ /dev/null @@ -1,897 +0,0 @@ -"use strict"; - -function Search(menu) { - this.menu = menu; - this.$search = document.getElementById('menu-search'); - this.$searchBox = document.getElementById('menu-search-box'); - this.$searchResults = document.getElementById('menu-search-results'); - - this.loadBiblio(); - - document.addEventListener('keydown', this.documentKeydown.bind(this)); - - this.$searchBox.addEventListener('keydown', debounce(this.searchBoxKeydown.bind(this), { stopPropagation: true })); - this.$searchBox.addEventListener('keyup', debounce(this.searchBoxKeyup.bind(this), { stopPropagation: true })); - - // Perform an initial search if the box is not empty. - if (this.$searchBox.value) { - this.search(this.$searchBox.value); - } -} - -Search.prototype.loadBiblio = function () { - var $biblio = document.getElementById('menu-search-biblio'); - if (!$biblio) { - this.biblio = []; - } else { - this.biblio = JSON.parse($biblio.textContent); - this.biblio.clauses = this.biblio.filter(function (e) { return e.type === 'clause' }); - this.biblio.byId = this.biblio.reduce(function (map, entry) { - map[entry.id] = entry; - return map; - }, {}); - } -} - -Search.prototype.documentKeydown = function (e) { - if (e.keyCode === 191) { - e.preventDefault(); - e.stopPropagation(); - this.triggerSearch(); - } -} - -Search.prototype.searchBoxKeydown = function (e) { - e.stopPropagation(); - e.preventDefault(); - if (e.keyCode === 191 && e.target.value.length === 0) { - e.preventDefault(); - } else if (e.keyCode === 13) { - e.preventDefault(); - this.selectResult(); - } -} - -Search.prototype.searchBoxKeyup = function (e) { - if (e.keyCode === 13 || e.keyCode === 9) { - return; - } - - this.search(e.target.value); -} - - -Search.prototype.triggerSearch = function (e) { - if (this.menu.isVisible()) { - this._closeAfterSearch = false; - } else { - this._closeAfterSearch = true; - this.menu.show(); - } - - this.$searchBox.focus(); - this.$searchBox.select(); -} -// bit 12 - Set if the result starts with searchString -// bits 8-11: 8 - number of chunks multiplied by 2 if cases match, otherwise 1. -// bits 1-7: 127 - length of the entry -// General scheme: prefer case sensitive matches with fewer chunks, and otherwise -// prefer shorter matches. -function relevance(result, searchString) { - var relevance = 0; - - relevance = Math.max(0, 8 - result.match.chunks) << 7; - - if (result.match.caseMatch) { - relevance *= 2; - } - - if (result.match.prefix) { - relevance += 2048 - } - - relevance += Math.max(0, 255 - result.entry.key.length); - - return relevance; -} - -Search.prototype.search = function (searchString) { - if (searchString === '') { - this.displayResults([]); - this.hideSearch(); - return; - } else { - this.showSearch(); - } - - if (searchString.length === 1) { - this.displayResults([]); - return; - } - - var results; - - if (/^[\d\.]*$/.test(searchString)) { - results = this.biblio.clauses.filter(function (clause) { - return clause.number.substring(0, searchString.length) === searchString; - }).map(function (clause) { - return { entry: clause }; - }); - } else { - results = []; - - for (var i = 0; i < this.biblio.length; i++) { - var entry = this.biblio[i]; - if (!entry.key) { - // biblio entries without a key aren't searchable - continue; - } - - var match = fuzzysearch(searchString, entry.key); - if (match) { - results.push({ entry: entry, match: match }); - } - } - - results.forEach(function (result) { - result.relevance = relevance(result, searchString); - }); - - results = results.sort(function (a, b) { return b.relevance - a.relevance }); - - } - - if (results.length > 50) { - results = results.slice(0, 50); - } - - this.displayResults(results); -} -Search.prototype.hideSearch = function () { - this.$search.classList.remove('active'); -} - -Search.prototype.showSearch = function () { - this.$search.classList.add('active'); -} - -Search.prototype.selectResult = function () { - var $first = this.$searchResults.querySelector('li:first-child a'); - - if ($first) { - document.location = $first.getAttribute('href'); - } - - this.$searchBox.value = ''; - this.$searchBox.blur(); - this.displayResults([]); - this.hideSearch(); - - if (this._closeAfterSearch) { - this.menu.hide(); - } -} - -Search.prototype.displayResults = function (results) { - if (results.length > 0) { - this.$searchResults.classList.remove('no-results'); - - var html = '
    '; - - results.forEach(function (result) { - var entry = result.entry; - var id = entry.id; - var cssClass = ''; - var text = ''; - - if (entry.type === 'clause') { - var number = entry.number ? entry.number + ' ' : ''; - text = number + entry.key; - cssClass = 'clause'; - id = entry.id; - } else if (entry.type === 'production') { - text = entry.key; - cssClass = 'prod'; - id = entry.id; - } else if (entry.type === 'op') { - text = entry.key; - cssClass = 'op'; - id = entry.id || entry.refId; - } else if (entry.type === 'term') { - text = entry.key; - cssClass = 'term'; - id = entry.id || entry.refId; - } - - if (text) { - html += ''; - } - }); - - html += '
' - - this.$searchResults.innerHTML = html; - } else { - this.$searchResults.innerHTML = ''; - this.$searchResults.classList.add('no-results'); - } -} - - -function Menu() { - this.$toggle = document.getElementById('menu-toggle'); - this.$menu = document.getElementById('menu'); - this.$toc = document.querySelector('menu-toc > ol'); - this.$pins = document.querySelector('#menu-pins'); - this.$pinList = document.getElementById('menu-pins-list'); - this.$toc = document.querySelector('#menu-toc > ol'); - this.$specContainer = document.getElementById('spec-container'); - this.search = new Search(this); - - this._pinnedIds = {}; - this.loadPinEntries(); - - // toggle menu - this.$toggle.addEventListener('click', this.toggle.bind(this)); - - // keydown events for pinned clauses - document.addEventListener('keydown', this.documentKeydown.bind(this)); - - // toc expansion - var tocItems = this.$menu.querySelectorAll('#menu-toc li'); - for (var i = 0; i < tocItems.length; i++) { - var $item = tocItems[i]; - $item.addEventListener('click', function($item, event) { - $item.classList.toggle('active'); - event.stopPropagation(); - }.bind(null, $item)); - } - - // close toc on toc item selection - var tocLinks = this.$menu.querySelectorAll('#menu-toc li > a'); - for (var i = 0; i < tocLinks.length; i++) { - var $link = tocLinks[i]; - $link.addEventListener('click', function(event) { - this.toggle(); - event.stopPropagation(); - }.bind(this)); - } - - // update active clause on scroll - window.addEventListener('scroll', debounce(this.updateActiveClause.bind(this))); - this.updateActiveClause(); - - // prevent menu scrolling from scrolling the body - this.$toc.addEventListener('wheel', function (e) { - var target = e.currentTarget; - var offTop = e.deltaY < 0 && target.scrollTop === 0; - if (offTop) { - e.preventDefault(); - } - var offBottom = e.deltaY > 0 - && target.offsetHeight + target.scrollTop >= target.scrollHeight; - - if (offBottom) { - e.preventDefault(); - } - }); -} - -Menu.prototype.documentKeydown = function (e) { - e.stopPropagation(); - if (e.keyCode === 80) { - this.togglePinEntry(); - } else if (e.keyCode > 48 && e.keyCode < 58) { - this.selectPin(e.keyCode - 49); - } -} - -Menu.prototype.updateActiveClause = function () { - this.setActiveClause(findActiveClause(this.$specContainer)) -} - -Menu.prototype.setActiveClause = function (clause) { - this.$activeClause = clause; - this.revealInToc(this.$activeClause); -} - -Menu.prototype.revealInToc = function (path) { - var current = this.$toc.querySelectorAll('li.revealed'); - for (var i = 0; i < current.length; i++) { - current[i].classList.remove('revealed'); - current[i].classList.remove('revealed-leaf'); - } - - var current = this.$toc; - var index = 0; - while (index < path.length) { - var children = current.children; - for (var i = 0; i < children.length; i++) { - if ('#' + path[index].id === children[i].children[1].getAttribute('href') ) { - children[i].classList.add('revealed'); - if (index === path.length - 1) { - children[i].classList.add('revealed-leaf'); - var rect = children[i].getBoundingClientRect(); - // this.$toc.getBoundingClientRect().top; - var tocRect = this.$toc.getBoundingClientRect(); - if (rect.top + 10 > tocRect.bottom) { - this.$toc.scrollTop = this.$toc.scrollTop + (rect.top - tocRect.bottom) + (rect.bottom - rect.top); - } else if (rect.top < tocRect.top) { - this.$toc.scrollTop = this.$toc.scrollTop - (tocRect.top - rect.top); - } - } - current = children[i].querySelector('ol'); - index++; - break; - } - } - - } -} - -function findActiveClause(root, path) { - var clauses = new ClauseWalker(root); - var $clause; - var path = path || []; - - while ($clause = clauses.nextNode()) { - var rect = $clause.getBoundingClientRect(); - var $header = $clause.querySelector("h1"); - var marginTop = parseInt(getComputedStyle($header)["margin-top"]); - - if ((rect.top - marginTop) <= 0 && rect.bottom > 0) { - return findActiveClause($clause, path.concat($clause)) || path; - } - } - - return path; -} - -function ClauseWalker(root) { - var previous; - var treeWalker = document.createTreeWalker( - root, - NodeFilter.SHOW_ELEMENT, - { - acceptNode: function (node) { - if (previous === node.parentNode) { - return NodeFilter.FILTER_REJECT; - } else { - previous = node; - } - if (node.nodeName === 'EMU-CLAUSE' || node.nodeName === 'EMU-INTRO' || node.nodeName === 'EMU-ANNEX') { - return NodeFilter.FILTER_ACCEPT; - } else { - return NodeFilter.FILTER_SKIP; - } - } - }, - false - ); - - return treeWalker; -} - -Menu.prototype.toggle = function () { - this.$menu.classList.toggle('active'); -} - -Menu.prototype.show = function () { - this.$menu.classList.add('active'); -} - -Menu.prototype.hide = function () { - this.$menu.classList.remove('active'); -} - -Menu.prototype.isVisible = function() { - return this.$menu.classList.contains('active'); -} - -Menu.prototype.showPins = function () { - this.$pins.classList.add('active'); -} - -Menu.prototype.hidePins = function () { - this.$pins.classList.remove('active'); -} - -Menu.prototype.addPinEntry = function (id) { - var entry = this.search.biblio.byId[id]; - if (!entry) { - // id was deleted after pin (or something) so remove it - delete this._pinnedIds[id]; - this.persistPinEntries(); - return; - } - - if (entry.type === 'clause') { - var prefix; - if (entry.number) { - prefix = entry.number + ' '; - } else { - prefix = ''; - } - this.$pinList.innerHTML += '
  • ' + prefix + entry.titleHTML + '
  • '; - } else { - this.$pinList.innerHTML += '
  • ' + entry.key + '
  • '; - } - - if (Object.keys(this._pinnedIds).length === 0) { - this.showPins(); - } - this._pinnedIds[id] = true; - this.persistPinEntries(); -} - -Menu.prototype.removePinEntry = function (id) { - var item = this.$pinList.querySelector('a[href="#' + id + '"]').parentNode; - this.$pinList.removeChild(item); - delete this._pinnedIds[id]; - if (Object.keys(this._pinnedIds).length === 0) { - this.hidePins(); - } - - this.persistPinEntries(); -} - -Menu.prototype.persistPinEntries = function () { - try { - if (!window.localStorage) return; - } catch (e) { - return; - } - - localStorage.pinEntries = JSON.stringify(Object.keys(this._pinnedIds)); -} - -Menu.prototype.loadPinEntries = function () { - try { - if (!window.localStorage) return; - } catch (e) { - return; - } - - var pinsString = window.localStorage.pinEntries; - if (!pinsString) return; - var pins = JSON.parse(pinsString); - for(var i = 0; i < pins.length; i++) { - this.addPinEntry(pins[i]); - } -} - -Menu.prototype.togglePinEntry = function (id) { - if (!id) { - id = this.$activeClause[this.$activeClause.length - 1].id; - } - - if (this._pinnedIds[id]) { - this.removePinEntry(id); - } else { - this.addPinEntry(id); - } -} - -Menu.prototype.selectPin = function (num) { - document.location = this.$pinList.children[num].children[0].href; -} - -var menu; -function init() { - menu = new Menu(); - var $container = document.getElementById('spec-container'); - $container.addEventListener('mouseover', debounce(function (e) { - Toolbox.activateIfMouseOver(e); - })); - document.addEventListener('keydown', debounce(function (e) { - if (e.code === "Escape" && Toolbox.active) { - Toolbox.deactivate(); - } - })); -} - -document.addEventListener('DOMContentLoaded', init); - -function debounce(fn, opts) { - opts = opts || {}; - var timeout; - return function(e) { - if (opts.stopPropagation) { - e.stopPropagation(); - } - var args = arguments; - if (timeout) { - clearTimeout(timeout); - } - timeout = setTimeout(function() { - timeout = null; - fn.apply(this, args); - }.bind(this), 150); - } -} - -var CLAUSE_NODES = ['EMU-CLAUSE', 'EMU-INTRO', 'EMU-ANNEX']; -function findLocalReferences ($elem) { - var name = $elem.innerHTML; - var references = []; - - var parentClause = $elem.parentNode; - while (parentClause && CLAUSE_NODES.indexOf(parentClause.nodeName) === -1) { - parentClause = parentClause.parentNode; - } - - if(!parentClause) return; - - var vars = parentClause.querySelectorAll('var'); - - for (var i = 0; i < vars.length; i++) { - var $var = vars[i]; - - if ($var.innerHTML === name) { - references.push($var); - } - } - - return references; -} - -function toggleFindLocalReferences($elem) { - var references = findLocalReferences($elem); - if ($elem.classList.contains('referenced')) { - references.forEach(function ($reference) { - $reference.classList.remove('referenced'); - }); - } else { - references.forEach(function ($reference) { - $reference.classList.add('referenced'); - }); - } -} - -function installFindLocalReferences () { - document.addEventListener('click', function (e) { - if (e.target.nodeName === 'VAR') { - toggleFindLocalReferences(e.target); - } - }); -} - -document.addEventListener('DOMContentLoaded', installFindLocalReferences); - - - - -// The following license applies to the fuzzysearch function -// The MIT License (MIT) -// Copyright © 2015 Nicolas Bevacqua -// Copyright © 2016 Brian Terlson -// Permission is hereby granted, free of charge, to any person obtaining a copy of -// this software and associated documentation files (the "Software"), to deal in -// the Software without restriction, including without limitation the rights to -// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -// the Software, and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: - -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -function fuzzysearch (searchString, haystack, caseInsensitive) { - var tlen = haystack.length; - var qlen = searchString.length; - var chunks = 1; - var finding = false; - - if (qlen > tlen) { - return false; - } - - if (qlen === tlen) { - if (searchString === haystack) { - return { caseMatch: true, chunks: 1, prefix: true }; - } else if (searchString.toLowerCase() === haystack.toLowerCase()) { - return { caseMatch: false, chunks: 1, prefix: true }; - } else { - return false; - } - } - - outer: for (var i = 0, j = 0; i < qlen; i++) { - var nch = searchString[i]; - while (j < tlen) { - var targetChar = haystack[j++]; - if (targetChar === nch) { - finding = true; - continue outer; - } - if (finding) { - chunks++; - finding = false; - } - } - - if (caseInsensitive) { return false; } - - return fuzzysearch(searchString.toLowerCase(), haystack.toLowerCase(), true); - } - - return { caseMatch: !caseInsensitive, chunks: chunks, prefix: j <= qlen }; -} - -var Toolbox = { - init: function () { - this.$container = document.createElement('div'); - this.$container.classList.add('toolbox'); - this.$permalink = document.createElement('a'); - this.$permalink.textContent = 'Permalink'; - this.$pinLink = document.createElement('a'); - this.$pinLink.textContent = 'Pin'; - this.$pinLink.setAttribute('href', '#'); - this.$pinLink.addEventListener('click', function (e) { - e.preventDefault(); - e.stopPropagation(); - menu.togglePinEntry(this.entry.id); - }.bind(this)); - - this.$refsLink = document.createElement('a'); - this.$refsLink.setAttribute('href', '#'); - this.$refsLink.addEventListener('click', function (e) { - e.preventDefault(); - e.stopPropagation(); - referencePane.showReferencesFor(this.entry); - }.bind(this)); - this.$container.appendChild(this.$permalink); - this.$container.appendChild(this.$pinLink); - this.$container.appendChild(this.$refsLink); - document.body.appendChild(this.$container); - }, - - activate: function (el, entry, target) { - if (el === this._activeEl) return; - this.active = true; - this.entry = entry; - this.$container.classList.add('active'); - this.top = el.offsetTop - this.$container.offsetHeight - 10; - this.left = el.offsetLeft; - this.$container.setAttribute('style', 'left: ' + this.left + 'px; top: ' + this.top + 'px'); - this.updatePermalink(); - this.updateReferences(); - this._activeEl = el; - if (this.top < document.body.scrollTop && el === target) { - // don't scroll unless it's a small thing (< 200px) - this.$container.scrollIntoView(); - } - }, - - updatePermalink: function () { - this.$permalink.setAttribute('href', '#' + this.entry.id); - }, - - updateReferences: function () { - this.$refsLink.textContent = 'References (' + this.entry.referencingIds.length + ')'; - }, - - activateIfMouseOver: function (e) { - var ref = this.findReferenceUnder(e.target); - if (ref && (!this.active || e.pageY > this._activeEl.offsetTop)) { - var entry = menu.search.biblio.byId[ref.id]; - this.activate(ref.element, entry, e.target); - } else if (this.active && ((e.pageY < this.top) || e.pageY > (this._activeEl.offsetTop + this._activeEl.offsetHeight))) { - this.deactivate(); - } - }, - - findReferenceUnder: function (el) { - while (el) { - var parent = el.parentNode; - if (el.nodeName === 'H1' && parent.nodeName.match(/EMU-CLAUSE|EMU-ANNEX|EMU-INTRO/) && parent.id) { - return { element: el, id: parent.id }; - } else if (el.nodeName.match(/EMU-(?!CLAUSE|XREF|ANNEX|INTRO)|DFN/) && - el.id && el.id[0] !== '_') { - if (el.nodeName === 'EMU-FIGURE' || el.nodeName === 'EMU-TABLE' || el.nodeName === 'EMU-EXAMPLE') { - // return the figcaption element - return { element: el.children[0].children[0], id: el.id }; - } else if (el.nodeName === 'EMU-PRODUCTION') { - // return the LHS non-terminal element - return { element: el.children[0], id: el.id }; - } else { - return { element: el, id: el.id }; - } - } - el = parent; - } - }, - - deactivate: function () { - this.$container.classList.remove('active'); - this._activeEl = null; - this.activeElBounds = null; - this.active = false; - } -} - -var referencePane = { - init: function() { - this.$container = document.createElement('div'); - this.$container.setAttribute('id', 'references-pane-container'); - - var $spacer = document.createElement('div'); - $spacer.setAttribute('id', 'references-pane-spacer'); - - this.$pane = document.createElement('div'); - this.$pane.setAttribute('id', 'references-pane'); - - this.$container.appendChild($spacer); - this.$container.appendChild(this.$pane); - - this.$header = document.createElement('div'); - this.$header.classList.add('menu-pane-header'); - this.$header.textContent = 'References to '; - this.$headerRefId = document.createElement('a'); - this.$header.appendChild(this.$headerRefId); - this.$closeButton = document.createElement('span'); - this.$closeButton.setAttribute('id', 'references-pane-close'); - this.$closeButton.addEventListener('click', function (e) { - this.deactivate(); - }.bind(this)); - this.$header.appendChild(this.$closeButton); - - this.$pane.appendChild(this.$header); - var tableContainer = document.createElement('div'); - tableContainer.setAttribute('id', 'references-pane-table-container'); - - this.$table = document.createElement('table'); - this.$table.setAttribute('id', 'references-pane-table'); - - this.$tableBody = this.$table.createTBody(); - - tableContainer.appendChild(this.$table); - this.$pane.appendChild(tableContainer); - - menu.$specContainer.appendChild(this.$container); - }, - - activate: function () { - this.$container.classList.add('active'); - }, - - deactivate: function () { - this.$container.classList.remove('active'); - }, - - showReferencesFor(entry) { - this.activate(); - var newBody = document.createElement('tbody'); - var previousId; - var previousCell; - var dupCount = 0; - this.$headerRefId.textContent = '#' + entry.id; - this.$headerRefId.setAttribute('href', '#' + entry.id); - entry.referencingIds.map(function (id) { - var target = document.getElementById(id); - var cid = findParentClauseId(target); - var clause = menu.search.biblio.byId[cid]; - return { id: id, clause: clause } - }).sort(function (a, b) { - return sortByClauseNumber(a.clause, b.clause); - }).forEach(function (record, i) { - if (previousId === record.clause.id) { - previousCell.innerHTML += ' (' + (dupCount + 2) + ')'; - dupCount++; - } else { - var row = newBody.insertRow(); - var cell = row.insertCell(); - cell.innerHTML = record.clause.number; - cell = row.insertCell(); - cell.innerHTML = '' + record.clause.titleHTML + ''; - previousCell = cell; - previousId = record.clause.id; - dupCount = 0; - } - }, this); - this.$table.removeChild(this.$tableBody); - this.$tableBody = newBody; - this.$table.appendChild(this.$tableBody); - } -} -function findParentClauseId(node) { - while (node && node.nodeName !== 'EMU-CLAUSE' && node.nodeName !== 'EMU-INTRO' && node.nodeName !== 'EMU-ANNEX') { - node = node.parentNode; - } - if (!node) return null; - return node.getAttribute('id'); -} - -function sortByClauseNumber(c1, c2) { - var c1c = c1.number.split('.'); - var c2c = c2.number.split('.'); - - for (var i = 0; i < c1c.length; i++) { - if (i >= c2c.length) { - return 1; - } - - var c1 = c1c[i]; - var c2 = c2c[i]; - var c1cn = Number(c1); - var c2cn = Number(c2); - - if (Number.isNaN(c1cn) && Number.isNaN(c2cn)) { - if (c1 > c2) { - return 1; - } else if (c1 < c2) { - return -1; - } - } else if (!Number.isNaN(c1cn) && Number.isNaN(c2cn)) { - return -1; - } else if (Number.isNaN(c1cn) && !Number.isNaN(c2cn)) { - return 1; - } else if(c1cn > c2cn) { - return 1; - } else if (c1cn < c2cn) { - return -1; - } - } - - if (c1c.length === c2c.length) { - return 0; - } - return -1; -} - -document.addEventListener('DOMContentLoaded', function () { - Toolbox.init(); - referencePane.init(); -}) -var CLAUSE_NODES = ['EMU-CLAUSE', 'EMU-INTRO', 'EMU-ANNEX']; -function findLocalReferences ($elem) { - var name = $elem.innerHTML; - var references = []; - - var parentClause = $elem.parentNode; - while (parentClause && CLAUSE_NODES.indexOf(parentClause.nodeName) === -1) { - parentClause = parentClause.parentNode; - } - - if(!parentClause) return; - - var vars = parentClause.querySelectorAll('var'); - - for (var i = 0; i < vars.length; i++) { - var $var = vars[i]; - - if ($var.innerHTML === name) { - references.push($var); - } - } - - return references; -} - -function toggleFindLocalReferences($elem) { - var references = findLocalReferences($elem); - if ($elem.classList.contains('referenced')) { - references.forEach(function ($reference) { - $reference.classList.remove('referenced'); - }); - } else { - references.forEach(function ($reference) { - $reference.classList.add('referenced'); - }); - } -} - -function installFindLocalReferences () { - document.addEventListener('click', function (e) { - if (e.target.nodeName === 'VAR') { - toggleFindLocalReferences(e.target); - } - }); -} - -document.addEventListener('DOMContentLoaded', installFindLocalReferences); diff --git a/node_modules/reflect-metadata/docs/index.html b/node_modules/reflect-metadata/docs/index.html deleted file mode 100644 index 78eb316..0000000 --- a/node_modules/reflect-metadata/docs/index.html +++ /dev/null @@ -1,2103 +0,0 @@ - - -Metadata Proposal - ECMAScript - - - - -
    - - -

    Metadata Proposal - ECMAScript

    - Note
    A shim for this API can be found here: https://github.com/rbuckton/ReflectDecorators
    -

    Proposal to add Metadata to ECMAScript.

    -
    - - -

    1 Syntax

    - Note
    This section is non-normative.
    -
    // define metadata on an object or property
    -Reflect.defineMetadata(metadataKey, metadataValue, target);
    -Reflect.defineMetadata(metadataKey, metadataValue, target, propertyKey);
    -
    -// check for presence of a metadata key on the prototype chain of an object or property
    -let result = Reflect.hasMetadata(metadataKey, target);
    -let result = Reflect.hasMetadata(metadataKey, target, propertyKey);
    -
    -// check for presence of an own metadata key of an object or property
    -let result = Reflect.hasOwnMetadata(metadataKey, target);
    -let result = Reflect.hasOwnMetadata(metadataKey, target, propertyKey);
    -
    -// get metadata value of a metadata key on the prototype chain of an object or property
    -let result = Reflect.getMetadata(metadataKey, target);
    -let result = Reflect.getMetadata(metadataKey, target, propertyKey);
    -
    -// get metadata value of an own metadata key of an object or property
    -let result = Reflect.getOwnMetadata(metadataKey, target);
    -let result = Reflect.getOwnMetadata(metadataKey, target, propertyKey);
    -
    -// get all metadata keys on the prototype chain of an object or property
    -let result = Reflect.getMetadataKeys(target);
    -let result = Reflect.getMetadataKeys(target, propertyKey);
    -
    -// get all own metadata keys of an object or property
    -let result = Reflect.getOwnMetadataKeys(target);
    -let result = Reflect.getOwnMetadataKeys(target, propertyKey);
    -
    -// delete metadata from an object or property
    -let result = Reflect.deleteMetadata(metadataKey, target);
    -let result = Reflect.deleteMetadata(metadataKey, target, propertyKey);
    -
    -// apply metadata via a decorator to a constructor
    -@Reflect.metadata(metadataKey, metadataValue)
    -class C {
    -  // apply metadata via a decorator to a method (property)
    -  @Reflect.metadata(metadataKey, metadataValue)
    -  method() {
    -  }
    -}
    -
    -// Design-time type annotations
    -function Type(type) { return Reflect.metadata("design:type", type); }
    -function ParamTypes(...types) { return Reflect.metadata("design:paramtypes", types); }
    -function ReturnType(type) { return Reflect.metadata("design:returntype", type); }
    -
    -// Decorator application
    -@ParamTypes(String, Number)
    -class C {
    -  constructor(text, i) {
    -  }
    -
    -  @Type(String)
    -  get name() { return "text"; }
    -
    -  @Type(Function)
    -  @ParamTypes(Number, Number)
    -  @ReturnType(Number)
    -  add(x, y) {
    -    return x + y;
    -  }
    -}
    -
    -// Metadata introspection
    -let obj = new C("a", 1);
    -let paramTypes = Reflect.getMetadata("design:paramtypes", obj, "add"); // [Number, Number]
    -
    - - -

    2 Abstract Operations

    - -

    2.1 Operations on Objects

    - -

    2.1.1 GetOrCreateMetadataMap ( O, P, Create )

    -

    When the abstract operation GetOrCreateMetadataMap is called with Object O, property key P, and Boolean Create the following steps are taken:

    -
    1. Assert: P is undefined or IsPropertyKey(P) is true.
    2. Let targetMetadata be the value of O's [[Metadata]] internal slot.
    3. If targetMetadata is undefined, then
      1. If Create is false, return undefined.
      2. Set targetMetadata to be a newly created Map object.
      3. Set the [[Metadata]] internal slot of O to targetMetadata.
    4. Let metadataMap be ? Invoke(targetMetadata, "get", P).
    5. If metadataMap is undefined, then
      1. If Create is false, return undefined.
      2. Set metadataMap to be a newly created Map object.
      3. Perform ? Invoke(targetMetadata, "set", P, metadataMap).
    6. Return metadataMap.
    -
    -
    -
    - - -

    3 Ordinary and Exotic Objects Behaviors

    - - -

    3.1 Ordinary Object Internal Methods and Internal Slots

    -

    All ordinary objects have an internal slot called [[Metadata]]. The value of this internal slot is either null or a Map object and is used for storing metadata for an object.

    - -

    3.1.1 [[HasMetadata]] ( MetadataKey, P )

    -

    When the [[HasMetadata]] internal method of O is called with ECMAScript language value MetadataKey and property key P, the following steps are taken:

    -
    1. Return ? OrdinaryHasMetadata(MetadataKey, O, P).
    - -

    3.1.1.1 OrdinaryHasMetadata ( MetadataKey, O, P )

    -

    When the abstract operation OrdinaryHasMetadata is called with ECMAScript language value MetadataKey, Object O, and property key P, the following steps are taken:

    -
    1. Assert: P is undefined or IsPropertyKey(P) is true.
    2. Let hasOwn be ? OrdinaryHasOwnMetadata(MetadataKey, O, P).
    3. If hasOwn is true, return true.
    4. Let parent be ? O.[[GetPrototypeOf]]().
    5. If parent is not null, Return ? parent.[[HasMetadata]](MetadataKey, P).
    6. Return false.
    -
    -
    - - -

    3.1.2 [[HasOwnMetadata]] ( MetadataKey, P )

    -

    When the [[HasOwnMetadata]] internal method of O is called with ECMAScript language value MetadataKey and property key P, the following steps are taken:

    -
    1. Return ? OrdinaryHasOwnMetadata(MetadataKey, O, P).
    - -

    3.1.2.1 OrdinaryHasOwnMetadata ( MetadataKey, O, P )

    -

    When the abstract operation OrdinaryHasOwnMetadata is called with ECMAScript language value MetadataKey, Object O, and property key P, the following steps are taken:

    -
    1. Assert: P is undefined or IsPropertyKey(P) is true.
    2. Let metadataMap be ? GetOrCreateMetadataMap(O, P, false).
    3. If metadataMap is undefined, return false.
    4. Return ? ToBoolean(? Invoke(metadataMap, "has", MetadataKey)).
    -
    -
    - - -

    3.1.3 [[GetMetadata]] ( MetadataKey, P )

    -

    When the [[GetMatadata]] internal method of O is called with ECMAScript language value MetadataKey and property key P, the following steps are taken:

    -
    1. Return ? OrdinaryGetMetadata(MetadataKey, O, P).
    - -

    3.1.3.1 OrdinaryGetMetadata ( MetadataKey, O, P )

    -

    When the abstract operation OrdinaryGetMetadata is called with ECMAScript language value MetadataKey, Object O, and property key P, the following steps are taken:

    -
    1. Assert: P is undefined or IsPropertyKey(P) is true.
    2. Let hasOwn be ? OrdinaryHasOwnMetadata(MetadataKey, O, P).
    3. If hasOwn is true, return ? OrdinaryGetOwnMetadata(MetadataKey, O, P).
    4. Let parent be ? O.[[GetPrototypeOf]]().
    5. If parent is not null, return ? parent.[[GetMetadata]](MetadataKey, P).
    6. Return undefined.
    -
    -
    - - -

    3.1.4 [[GetOwnMetadata]] ( MetadataKey, P, ParamIndex )

    -

    When the [[GetOwnMetadata]] internal method of O is called with ECMAScript language value MetadataKey and property key P, the following steps are taken:

    -
    1. Return ? OrdinaryGetOwnMetadata(MetadataKey, O, P).
    - -

    3.1.4.1 OrdinaryGetOwnMetadata ( MetadataKey, O, P )

    -

    When the abstract operation OrdinaryGetOwnMetadata is called with ECMAScript language value MetadataKey, Object O, and property key P, the following steps are taken:

    -
    1. Assert: P is undefined or IsPropertyKey(P) is true.
    2. Let metadataMap be ? GetOrCreateMetadataMap(O, P, false).
    3. If metadataMap is undefined, return undefined.
    4. Return ? Invoke(metadataMap, "get", MetadataKey).
    -
    -
    - - -

    3.1.5 [[DefineOwnMetadata]] ( MetadataKey, MetadataValue, P )

    -

    When the [[DefineOwnMetadata]] internal method of O is called with ECMAScript language value MetadataKey, ECMAScript language value MetadataValue, and property key P, the following steps are taken:

    -
    1. Return ? OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P)
    - -

    3.1.5.1 OrdinaryDefineOwnMetadata ( MetadataKey, MetadataValue, O, P )

    -

    When the abstract operation OrdinaryDefineOwnProperty is called with ECMAScript language value MetadataKey, ECMAScript language value MetadataValue, Object O, and property key P, the following steps are taken:

    -
    1. Assert: P is undefined or IsPropertyKey(P) is true.
    2. Let metadataMap be ? GetOrCreateMetadataMap(O, P, true).
    3. Return ? Invoke(metadataMap, "set", MetadataKey, MetadataValue).
    -
    -
    - - -

    3.1.6 [[MetadataKeys]] ( P )

    -

    When the [[MetadataKeys]] internal method of O is called with property key P the following steps are taken:

    -
    1. Return ? OrdinaryMetadataKeys(O, P).
    - -

    3.1.6.1 OrdinaryMetadataKeys ( O, P )

    -

    When the abstract operation OrdinaryMetadataKeys is called with Object O and property key P the following steps are taken:

    -
    1. Assert: P is undefined or IsPropertyKey(P) is true.
    2. Let ownKeys be ? OrdinaryOwnMetadataKeys(O, P).
    3. Let parent be ? O.[[GetPrototypeOf]]().
    4. If parent is null, then return ownKeys.
    5. Let parentKeys be ? O.[[OrdinaryMetadataKeys]](P).
    6. Let ownKeysLen = ? Get(ownKeys, "length").
    7. If ownKeysLen is 0, return parentKeys.
    8. Let parentKeysLen = ? Get(parentKeys, "length").
    9. If parentKeysLen is 0, return ownKeys.
    10. Let set be a newly created Set object.
    11. Let keys be ? ArrayCreate(0).
    12. Let k be 0.
    13. For each element key of ownKeys
      1. Let hasKey be ? Invoke(set, "has", key).
      2. If hasKey is false, then
        1. Let Pk be ! ToString(k).
        2. Perform ? Invoke(set, "add", key).
        3. Let defineStatus be CreateDataProperty(keys, Pk, key).
        4. Assert: defineStatus is true.
        5. Increase k by 1.
    14. For each element key of parentKeys
      1. Let hasKey be ? Invoke(set, "has", key).
      2. If hasKey is false, then
        1. Let Pk be ! ToString(k).
        2. Perform ? Invoke(set, "add", key).
        3. Let defineStatus be CreateDataProperty(keys, Pk, key).
        4. Assert: defineStatus is true.
        5. Increase k by 1.
    15. Perform ? Set(keys, "length", k).
    16. return keys.
    -
    -
    - - -

    3.1.7 [[OwnMetadataKeys]] ( P )

    -

    When the [[OwnMetadataKeys]] internal method of O is called with property key P the following steps are taken:

    -
    1. Return OrdinaryOwnMetadataKeys(O, P).
    - -

    3.1.7.1 OrdinaryOwnMetadataKeys ( O, P )

    -

    When the abstract operation OrdinaryOwnMetadataKeys is called with Object O and property key P the following steps are taken:

    -
    1. Assert: P is undefined or IsPropertyKey(P) is true.
    2. Let keys be ? ArrayCreate(0).
    3. Let metadataMap be ? GetOrCreateMetadataMap(O, P, false).
    4. If metadataMap is undefined, return keys.
    5. Let keysObj be ? Invoke(metadataMap, "keys").
    6. Let iterator be ? GetIterator(keysObj).
    7. Let k be 0.
    8. Repeat
      1. Let Pk be ! ToString(k).
      2. Let next be ? IteratorStep(iterator).
      3. If next is false, then
        1. Let setStatus be ? Set(keys, "length", k, true).
        2. Assert: setStatus is true.
        3. Return keys.
      4. Let nextValue be ? IteratorValue(next).
      5. Let defineStatus be CreateDataPropertyOrThrow(keys, Pk, nextValue).
      6. If defineStatus is an abrupt completion, return ? IteratorClose(iterator, defineStatus).
      7. Increase k by 1.
    -
    -
    - - -

    3.1.8 [[DeleteMetadata]]( MetadataKey, P )

    -

    When the [[DeleteMetadata]] internal method of O is called with ECMAScript language value MetadataKey and property key P the following steps are taken:

    -
    1. Assert: P is undefined or IsPropertyKey(P) is true.
    2. Let metadataMap be ? GetOrCreateMetadataMap(O, P, false).
    3. If metadataMap is undefined, return false.
    4. Return ? Invoke(metadataMap, "delete", MetadataKey).
    -
    -
    -
    - - -

    4 Reflection

    - -

    4.1 The Reflect Object

    -

    This section contains amendments to the Reflect object.

    - -

    4.1.1 Metadata Decorator Functions

    -

    A metadata decorator function is an anonymous built-in function that has [[MetadataKey]] and [[MetadataValue]] internal slots.

    -

    When a metadata decorator function F is called with arguments target and key, the following steps are taken:

    -
    1. Assert: F has a [[MetadataKey]] internal slot whose value is an ECMAScript language value, or undefined.
    2. Assert: F has a [[MetadataValue]] internal slot whose value is an ECMAScript language value, or undefined.
    3. If Type(target) is not Object, throw a TypeError exception.
    4. If key is not undefined and IsPropertyKey(key) is false, throw a TypeError exception.
    5. Let metadataKey be the value of F's [[MetadataKey]] internal slot.
    6. Let metadataValue be the value of F's [[MetadataValue]] internal slot.
    7. Perform ? target.[[DefineMetadata]](metadataKey, metadataValue, target, key).
    8. Return undefined.
    -
    - - -

    4.1.2 Reflect.metadata ( metadataKey, metadataValue )

    -

    When the metadata function is called with arguments metadataKey and metadataValue, the following steps are taken:

    -
    1. Let decorator be a new built-in function object as defined in Metadata Decorator Functions.
    2. Set the [[MetadataKey]] internal slot of decorator to metadataKey.
    3. Set the [[MetadataValue]] internal slot of decorator to metadataValue.
    4. Return decorator.
    -
    - - -

    4.1.3 Reflect.defineMetadata ( metadataKey, metadataValue, target [, propertyKey] )

    -

    When the defineMetadata function is called with arguments metadataKey, metadataValue, target, and propertyKey, the following steps are taken:

    -
    1. If Type(target) is not Object, throw a TypeError exception.
    2. Return ? target.[[DefineMetadata]](metadataKey, metadataValue, propertyKey).
    -
    - - -

    4.1.4 Reflect.hasMetadata ( metadataKey, target [, propertyKey] )

    -

    When the hasMetadata function is called with arguments metadataKey, target, and propertyKey, the following steps are taken:

    -
    1. If Type(target) is not Object, throw a TypeError exception.
    2. Return ? target.[[HasMetadata]](metadataKey, propertyKey).
    -
    - - -

    4.1.5 Reflect.hasOwnMetadata ( metadataKey, target [, propertyKey] )

    -

    When the hasOwnMetadata function is called with arguments metadataKey, target, and propertyKey, the following steps are taken:

    -
    1. If Type(target) is not Object, throw a TypeError exception.
    2. Return ? target.[[HasOwn]](metadataKey, propertyKey).
    -
    - - -

    4.1.6 Reflect.getMetadata ( metadataKey, target [, propertyKey] )

    -

    When the getMetadata function is called with arguments metadataKey, target, and propertyKey, the following steps are taken:

    -
    1. If Type(target) is not Object, throw a TypeError exception.
    2. Return ? target.[[GetMetadata]](metadataKey, propertyKey).
    -
    - - -

    4.1.7 Reflect.getOwnMetadata ( metadataKey, target [, propertyKey] )

    -

    When the getOwnMetadata function is called with arguments metadataKey, target, and propertyKey, the following steps are taken:

    -
    1. If Type(target) is not Object, throw a TypeError exception.
    2. Return ? target.[[GetOwnMetadata]](metadataKey, propertyKey).
    -
    - - -

    4.1.8 Reflect.getMetadataKeys ( target [, propertyKey] )

    -

    When the getMetadataKeys function is called with arguments target and propertyKey, the following steps are taken:

    -
    1. If Type(target) is not Object, throw a TypeError exception.
    2. Return ? target.[[GetMetadataKeys]](propertyKey).
    -
    - - -

    4.1.9 Reflect.getOwnMetadataKeys ( target [, propertyKey] )

    -

    When the getOwnMetadataKeys function is called with arguments target and propertyKey, the following steps are taken:

    -
    1. If Type(target) is not Object, throw a TypeError exception.
    2. Return ? target.[[GetOwnMetadataKeys]](propertyKey).
    -
    - - -

    4.1.10 Reflect.deleteMetadata ( metadataKey, target [, propertyKey] )

    -

    When the deleteMetadata function is called with arguments metadataKey, target, and propertyKey, the following steps are taken:

    -
    1. If Type(target) is not Object, throw a TypeError exception.
    2. Return ? target.[[DeleteMetadata]](metadataKey, propertyKey).
    -
    -
    -
    -
    \ No newline at end of file diff --git a/node_modules/reflect-metadata/docs/spec.biblio.json b/node_modules/reflect-metadata/docs/spec.biblio.json deleted file mode 100644 index 15e7682..0000000 --- a/node_modules/reflect-metadata/docs/spec.biblio.json +++ /dev/null @@ -1 +0,0 @@ -{"https://rbuckton.github.io/reflect-metadata":[{"type":"clause","id":"introduction","aoid":null,"title":"Metadata Proposal - ECMAScript","titleHTML":"Metadata Proposal - ECMAScript","number":"","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"Metadata Proposal - ECMAScript"},{"type":"clause","id":"syntax","aoid":null,"title":"Syntax","titleHTML":"Syntax","number":"1","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"Syntax"},{"type":"op","aoid":"GetOrCreateMetadataMap","refId":"getorcreatemetadatamap","location":"","referencingIds":[],"key":"GetOrCreateMetadataMap"},{"type":"clause","id":"getorcreatemetadatamap","aoid":"GetOrCreateMetadataMap","title":"GetOrCreateMetadataMap ( O, P, Create )","titleHTML":"GetOrCreateMetadataMap ( O, P, Create )","number":"2.1.1","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":["_ref_8","_ref_17","_ref_22","_ref_42","_ref_52"],"key":"GetOrCreateMetadataMap ( O, P, Create )"},{"type":"clause","id":"operations-on-objects","aoid":null,"title":"Operations on Objects","titleHTML":"Operations on Objects","number":"2.1","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"Operations on Objects"},{"type":"clause","id":"abstract-operations","aoid":null,"title":"Abstract Operations","titleHTML":"Abstract Operations","number":"2","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"Abstract Operations"},{"type":"op","aoid":"OrdinaryHasMetadata","refId":"ordinaryhasmetadata","location":"","referencingIds":[],"key":"OrdinaryHasMetadata"},{"type":"clause","id":"ordinaryhasmetadata","aoid":"OrdinaryHasMetadata","title":"OrdinaryHasMetadata ( MetadataKey, O, P )","titleHTML":"OrdinaryHasMetadata ( MetadataKey, O, P )","number":"3.1.1.1","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":["_ref_3"],"key":"OrdinaryHasMetadata ( MetadataKey, O, P )"},{"type":"clause","id":"ordinary-object-internal-methods-and-internal-slots-hasmetadata","aoid":null,"title":"[[HasMetadata]] ( MetadataKey, P )","titleHTML":"[[HasMetadata]] ( MetadataKey, P )","number":"3.1.1","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"[[HasMetadata]] ( MetadataKey, P )"},{"type":"op","aoid":"OrdinaryHasOwnMetadata","refId":"ordinaryhasownmetadata","location":"","referencingIds":[],"key":"OrdinaryHasOwnMetadata"},{"type":"clause","id":"ordinaryhasownmetadata","aoid":"OrdinaryHasOwnMetadata","title":"OrdinaryHasOwnMetadata ( MetadataKey, O, P )","titleHTML":"OrdinaryHasOwnMetadata ( MetadataKey, O, P )","number":"3.1.2.1","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":["_ref_5","_ref_6","_ref_13"],"key":"OrdinaryHasOwnMetadata ( MetadataKey, O, P )"},{"type":"clause","id":"ordinary-object-internal-methods-and-internal-slots-hasownmetadata","aoid":null,"title":"[[HasOwnMetadata]] ( MetadataKey, P )","titleHTML":"[[HasOwnMetadata]] ( MetadataKey, P )","number":"3.1.2","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"[[HasOwnMetadata]] ( MetadataKey, P )"},{"type":"op","aoid":"OrdinaryGetMetadata","refId":"ordinarygetmetadata","location":"","referencingIds":[],"key":"OrdinaryGetMetadata"},{"type":"clause","id":"ordinarygetmetadata","aoid":"OrdinaryGetMetadata","title":"OrdinaryGetMetadata ( MetadataKey, O, P )","titleHTML":"OrdinaryGetMetadata ( MetadataKey, O, P )","number":"3.1.3.1","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":["_ref_11"],"key":"OrdinaryGetMetadata ( MetadataKey, O, P )"},{"type":"clause","id":"ordinary-object-internal-methods-and-internal-slots-getmetadata","aoid":null,"title":"[[GetMetadata]] ( MetadataKey, P )","titleHTML":"[[GetMetadata]] ( MetadataKey, P )","number":"3.1.3","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"[[GetMetadata]] ( MetadataKey, P )"},{"type":"op","aoid":"OrdinaryGetOwnMetadata","refId":"ordinarygetownmetadata","location":"","referencingIds":[],"key":"OrdinaryGetOwnMetadata"},{"type":"clause","id":"ordinarygetownmetadata","aoid":"OrdinaryGetOwnMetadata","title":"OrdinaryGetOwnMetadata ( MetadataKey, O, P )","titleHTML":"OrdinaryGetOwnMetadata ( MetadataKey, O, P )","number":"3.1.4.1","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":["_ref_14","_ref_15"],"key":"OrdinaryGetOwnMetadata ( MetadataKey, O, P )"},{"type":"clause","id":"ordinary-object-internal-methods-and-internal-slots-getownmetadata","aoid":null,"title":"[[GetOwnMetadata]] ( MetadataKey, P, ParamIndex )","titleHTML":"[[GetOwnMetadata]] ( MetadataKey, P, ParamIndex )","number":"3.1.4","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"[[GetOwnMetadata]] ( MetadataKey, P, ParamIndex )"},{"type":"op","aoid":"OrdinaryDefineOwnMetadata","refId":"ordinarydefineownmetadata","location":"","referencingIds":[],"key":"OrdinaryDefineOwnMetadata"},{"type":"clause","id":"ordinarydefineownmetadata","aoid":"OrdinaryDefineOwnMetadata","title":"OrdinaryDefineOwnMetadata ( MetadataKey, MetadataValue, O, P )","titleHTML":"OrdinaryDefineOwnMetadata ( MetadataKey, MetadataValue, O, P )","number":"3.1.5.1","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":["_ref_19"],"key":"OrdinaryDefineOwnMetadata ( MetadataKey, MetadataValue, O, P )"},{"type":"clause","id":"ordinary-object-internal-methods-and-internal-slots-defineownmetadata","aoid":null,"title":"[[DefineOwnMetadata]] ( MetadataKey, MetadataValue, P )","titleHTML":"[[DefineOwnMetadata]] ( MetadataKey, MetadataValue, P )","number":"3.1.5","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"[[DefineOwnMetadata]] ( MetadataKey, MetadataValue, P )"},{"type":"op","aoid":"OrdinaryMetadataKeys","refId":"ordinarymetadatakeys","location":"","referencingIds":[],"key":"OrdinaryMetadataKeys"},{"type":"clause","id":"ordinarymetadatakeys","aoid":"OrdinaryMetadataKeys","title":"OrdinaryMetadataKeys ( O, P )","titleHTML":"OrdinaryMetadataKeys ( O, P )","number":"3.1.6.1","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":["_ref_24"],"key":"OrdinaryMetadataKeys ( O, P )"},{"type":"clause","id":"ordinary-object-internal-methods-and-internal-slots-metadatakeys","aoid":null,"title":"[[MetadataKeys]] ( P )","titleHTML":"[[MetadataKeys]] ( P )","number":"3.1.6","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"[[MetadataKeys]] ( P )"},{"type":"op","aoid":"OrdinaryOwnMetadataKeys","refId":"ordinaryownmetadatakeys","location":"","referencingIds":[],"key":"OrdinaryOwnMetadataKeys"},{"type":"clause","id":"ordinaryownmetadatakeys","aoid":"OrdinaryOwnMetadataKeys","title":"OrdinaryOwnMetadataKeys ( O, P )","titleHTML":"OrdinaryOwnMetadataKeys ( O, P )","number":"3.1.7.1","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":["_ref_26","_ref_39"],"key":"OrdinaryOwnMetadataKeys ( O, P )"},{"type":"clause","id":"ordinary-object-internal-methods-and-internal-slots-ownmetadatakeys","aoid":null,"title":"[[OwnMetadataKeys]] ( P )","titleHTML":"[[OwnMetadataKeys]] ( P )","number":"3.1.7","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"[[OwnMetadataKeys]] ( P )"},{"type":"clause","id":"ordinary-object-internal-methods-and-internal-slots-deletemetadata","aoid":null,"title":"[[DeleteMetadata]]( MetadataKey, P )","titleHTML":"[[DeleteMetadata]]( MetadataKey, P )","number":"3.1.8","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"[[DeleteMetadata]]( MetadataKey, P )"},{"type":"clause","id":"ordinary-object-internal-methods-and-internal-slots","aoid":null,"title":"Ordinary Object Internal Methods and Internal Slots","titleHTML":"Ordinary Object Internal Methods and Internal Slots","number":"3.1","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"Ordinary Object Internal Methods and Internal Slots"},{"type":"clause","id":"ordinary-and-exotic-objects-behaviors","aoid":null,"title":"Ordinary and Exotic Objects Behaviors","titleHTML":"Ordinary and Exotic Objects Behaviors","number":"3","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"Ordinary and Exotic Objects Behaviors"},{"type":"clause","id":"reflect-metadatadecoratorfunctions","aoid":null,"title":"Metadata Decorator Functions","titleHTML":"Metadata Decorator Functions","number":"4.1.1","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"Metadata Decorator Functions"},{"type":"clause","id":"reflect.metadata","aoid":null,"title":"Reflect.metadata ( metadataKey, metadataValue )","titleHTML":"Reflect.metadata ( metadataKey, metadataValue )","number":"4.1.2","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"Reflect.metadata ( metadataKey, metadataValue )"},{"type":"clause","id":"reflect.definemetadata","aoid":null,"title":"Reflect.defineMetadata ( metadataKey, metadataValue, target [, propertyKey] )","titleHTML":"Reflect.defineMetadata ( metadataKey, metadataValue, target [, propertyKey] )","number":"4.1.3","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"Reflect.defineMetadata ( metadataKey, metadataValue, target [, propertyKey] )"},{"type":"clause","id":"reflect.hasmetadata","aoid":null,"title":"Reflect.hasMetadata ( metadataKey, target [, propertyKey] )","titleHTML":"Reflect.hasMetadata ( metadataKey, target [, propertyKey] )","number":"4.1.4","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"Reflect.hasMetadata ( metadataKey, target [, propertyKey] )"},{"type":"clause","id":"reflect.hasownmetadata","aoid":null,"title":"Reflect.hasOwnMetadata ( metadataKey, target [, propertyKey] )","titleHTML":"Reflect.hasOwnMetadata ( metadataKey, target [, propertyKey] )","number":"4.1.5","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"Reflect.hasOwnMetadata ( metadataKey, target [, propertyKey] )"},{"type":"clause","id":"reflect.getmetadata","aoid":null,"title":"Reflect.getMetadata ( metadataKey, target [, propertyKey] )","titleHTML":"Reflect.getMetadata ( metadataKey, target [, propertyKey] )","number":"4.1.6","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"Reflect.getMetadata ( metadataKey, target [, propertyKey] )"},{"type":"clause","id":"reflect.getownmetadata","aoid":null,"title":"Reflect.getOwnMetadata ( metadataKey, target [, propertyKey] )","titleHTML":"Reflect.getOwnMetadata ( metadataKey, target [, propertyKey] )","number":"4.1.7","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"Reflect.getOwnMetadata ( metadataKey, target [, propertyKey] )"},{"type":"clause","id":"reflect.getmetadatakeys","aoid":null,"title":"Reflect.getMetadataKeys ( target [, propertyKey] )","titleHTML":"Reflect.getMetadataKeys ( target [, propertyKey] )","number":"4.1.8","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"Reflect.getMetadataKeys ( target [, propertyKey] )"},{"type":"clause","id":"reflect.getownmetadatakeys","aoid":null,"title":"Reflect.getOwnMetadataKeys ( target [, propertyKey] )","titleHTML":"Reflect.getOwnMetadataKeys ( target [, propertyKey] )","number":"4.1.9","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"Reflect.getOwnMetadataKeys ( target [, propertyKey] )"},{"type":"clause","id":"reflect.deletemetadata","aoid":null,"title":"Reflect.deleteMetadata ( metadataKey, target [, propertyKey] )","titleHTML":"Reflect.deleteMetadata ( metadataKey, target [, propertyKey] )","number":"4.1.10","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"Reflect.deleteMetadata ( metadataKey, target [, propertyKey] )"},{"type":"clause","id":"reflect","aoid":null,"title":"The Reflect Object","titleHTML":"The Reflect Object","number":"4.1","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"The Reflect Object"},{"type":"clause","id":"reflection","aoid":null,"title":"Reflection","titleHTML":"Reflection","number":"4","namespace":"https://rbuckton.github.io/reflect-metadata","location":"","referencingIds":[],"key":"Reflection"}]} \ No newline at end of file diff --git a/node_modules/reflect-metadata/index.d.ts b/node_modules/reflect-metadata/index.d.ts deleted file mode 100644 index 128a86f..0000000 --- a/node_modules/reflect-metadata/index.d.ts +++ /dev/null @@ -1,491 +0,0 @@ -/*! ***************************************************************************** -Copyright (C) Microsoft. 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 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ - -// The "reflect-metadata" module has no imports or exports, but can be imported by modules to load the polyfill. -export { }; - -declare global { - namespace Reflect { - /** - * Applies a set of decorators to a target object. - * @param decorators An array of decorators. - * @param target The target object. - * @returns The result of applying the provided decorators. - * @remarks Decorators are applied in reverse order of their positions in the array. - * @example - * - * class Example { } - * - * // constructor - * Example = Reflect.decorate(decoratorsArray, Example); - * - */ - function decorate(decorators: ClassDecorator[], target: Function): Function; - /** - * Applies a set of decorators to a property of a target object. - * @param decorators An array of decorators. - * @param target The target object. - * @param propertyKey The property key to decorate. - * @param attributes A property descriptor. - * @remarks Decorators are applied in reverse order. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod() { } - * method() { } - * } - * - * // property (on constructor) - * Reflect.decorate(decoratorsArray, Example, "staticProperty"); - * - * // property (on prototype) - * Reflect.decorate(decoratorsArray, Example.prototype, "property"); - * - * // method (on constructor) - * Object.defineProperty(Example, "staticMethod", - * Reflect.decorate(decoratorsArray, Example, "staticMethod", - * Object.getOwnPropertyDescriptor(Example, "staticMethod"))); - * - * // method (on prototype) - * Object.defineProperty(Example.prototype, "method", - * Reflect.decorate(decoratorsArray, Example.prototype, "method", - * Object.getOwnPropertyDescriptor(Example.prototype, "method"))); - * - */ - function decorate(decorators: (PropertyDecorator | MethodDecorator)[], target: Object, propertyKey: string | symbol, attributes?: PropertyDescriptor): PropertyDescriptor; - /** - * A default metadata decorator factory that can be used on a class, class member, or parameter. - * @param metadataKey The key for the metadata entry. - * @param metadataValue The value for the metadata entry. - * @returns A decorator function. - * @remarks - * If `metadataKey` is already defined for the target and target key, the - * metadataValue for that key will be overwritten. - * @example - * - * // constructor - * @Reflect.metadata(key, value) - * class Example { - * } - * - * // property (on constructor, TypeScript only) - * class Example { - * @Reflect.metadata(key, value) - * static staticProperty; - * } - * - * // property (on prototype, TypeScript only) - * class Example { - * @Reflect.metadata(key, value) - * property; - * } - * - * // method (on constructor) - * class Example { - * @Reflect.metadata(key, value) - * static staticMethod() { } - * } - * - * // method (on prototype) - * class Example { - * @Reflect.metadata(key, value) - * method() { } - * } - * - */ - function metadata(metadataKey: any, metadataValue: any): { - (target: Function): void; - (target: Object, propertyKey: string | symbol): void; - }; - /** - * Define a unique metadata entry on the target. - * @param metadataKey A key used to store and retrieve metadata. - * @param metadataValue A value that contains attached metadata. - * @param target The target object on which to define metadata. - * @example - * - * class Example { - * } - * - * // constructor - * Reflect.defineMetadata("custom:annotation", options, Example); - * - * // decorator factory as metadata-producing annotation. - * function MyAnnotation(options): ClassDecorator { - * return target => Reflect.defineMetadata("custom:annotation", options, target); - * } - * - */ - function defineMetadata(metadataKey: any, metadataValue: any, target: Object): void; - /** - * Define a unique metadata entry on the target. - * @param metadataKey A key used to store and retrieve metadata. - * @param metadataValue A value that contains attached metadata. - * @param target The target object on which to define metadata. - * @param propertyKey The property key for the target. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod(p) { } - * method(p) { } - * } - * - * // property (on constructor) - * Reflect.defineMetadata("custom:annotation", Number, Example, "staticProperty"); - * - * // property (on prototype) - * Reflect.defineMetadata("custom:annotation", Number, Example.prototype, "property"); - * - * // method (on constructor) - * Reflect.defineMetadata("custom:annotation", Number, Example, "staticMethod"); - * - * // method (on prototype) - * Reflect.defineMetadata("custom:annotation", Number, Example.prototype, "method"); - * - * // decorator factory as metadata-producing annotation. - * function MyAnnotation(options): PropertyDecorator { - * return (target, key) => Reflect.defineMetadata("custom:annotation", options, target, key); - * } - * - */ - function defineMetadata(metadataKey: any, metadataValue: any, target: Object, propertyKey: string | symbol): void; - /** - * Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`. - * @example - * - * class Example { - * } - * - * // constructor - * result = Reflect.hasMetadata("custom:annotation", Example); - * - */ - function hasMetadata(metadataKey: any, target: Object): boolean; - /** - * Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @param propertyKey The property key for the target. - * @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod(p) { } - * method(p) { } - * } - * - * // property (on constructor) - * result = Reflect.hasMetadata("custom:annotation", Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.hasMetadata("custom:annotation", Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.hasMetadata("custom:annotation", Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.hasMetadata("custom:annotation", Example.prototype, "method"); - * - */ - function hasMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): boolean; - /** - * Gets a value indicating whether the target object has the provided metadata key defined. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @returns `true` if the metadata key was defined on the target object; otherwise, `false`. - * @example - * - * class Example { - * } - * - * // constructor - * result = Reflect.hasOwnMetadata("custom:annotation", Example); - * - */ - function hasOwnMetadata(metadataKey: any, target: Object): boolean; - /** - * Gets a value indicating whether the target object has the provided metadata key defined. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @param propertyKey The property key for the target. - * @returns `true` if the metadata key was defined on the target object; otherwise, `false`. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod(p) { } - * method(p) { } - * } - * - * // property (on constructor) - * result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "method"); - * - */ - function hasOwnMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): boolean; - /** - * Gets the metadata value for the provided metadata key on the target object or its prototype chain. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @returns The metadata value for the metadata key if found; otherwise, `undefined`. - * @example - * - * class Example { - * } - * - * // constructor - * result = Reflect.getMetadata("custom:annotation", Example); - * - */ - function getMetadata(metadataKey: any, target: Object): any; - /** - * Gets the metadata value for the provided metadata key on the target object or its prototype chain. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @param propertyKey The property key for the target. - * @returns The metadata value for the metadata key if found; otherwise, `undefined`. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod(p) { } - * method(p) { } - * } - * - * // property (on constructor) - * result = Reflect.getMetadata("custom:annotation", Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.getMetadata("custom:annotation", Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.getMetadata("custom:annotation", Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.getMetadata("custom:annotation", Example.prototype, "method"); - * - */ - function getMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): any; - /** - * Gets the metadata value for the provided metadata key on the target object. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @returns The metadata value for the metadata key if found; otherwise, `undefined`. - * @example - * - * class Example { - * } - * - * // constructor - * result = Reflect.getOwnMetadata("custom:annotation", Example); - * - */ - function getOwnMetadata(metadataKey: any, target: Object): any; - /** - * Gets the metadata value for the provided metadata key on the target object. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @param propertyKey The property key for the target. - * @returns The metadata value for the metadata key if found; otherwise, `undefined`. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod(p) { } - * method(p) { } - * } - * - * // property (on constructor) - * result = Reflect.getOwnMetadata("custom:annotation", Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.getOwnMetadata("custom:annotation", Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "method"); - * - */ - function getOwnMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): any; - /** - * Gets the metadata keys defined on the target object or its prototype chain. - * @param target The target object on which the metadata is defined. - * @returns An array of unique metadata keys. - * @example - * - * class Example { - * } - * - * // constructor - * result = Reflect.getMetadataKeys(Example); - * - */ - function getMetadataKeys(target: Object): any[]; - /** - * Gets the metadata keys defined on the target object or its prototype chain. - * @param target The target object on which the metadata is defined. - * @param propertyKey The property key for the target. - * @returns An array of unique metadata keys. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod(p) { } - * method(p) { } - * } - * - * // property (on constructor) - * result = Reflect.getMetadataKeys(Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.getMetadataKeys(Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.getMetadataKeys(Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.getMetadataKeys(Example.prototype, "method"); - * - */ - function getMetadataKeys(target: Object, propertyKey: string | symbol): any[]; - /** - * Gets the unique metadata keys defined on the target object. - * @param target The target object on which the metadata is defined. - * @returns An array of unique metadata keys. - * @example - * - * class Example { - * } - * - * // constructor - * result = Reflect.getOwnMetadataKeys(Example); - * - */ - function getOwnMetadataKeys(target: Object): any[]; - /** - * Gets the unique metadata keys defined on the target object. - * @param target The target object on which the metadata is defined. - * @param propertyKey The property key for the target. - * @returns An array of unique metadata keys. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod(p) { } - * method(p) { } - * } - * - * // property (on constructor) - * result = Reflect.getOwnMetadataKeys(Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.getOwnMetadataKeys(Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.getOwnMetadataKeys(Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.getOwnMetadataKeys(Example.prototype, "method"); - * - */ - function getOwnMetadataKeys(target: Object, propertyKey: string | symbol): any[]; - /** - * Deletes the metadata entry from the target object with the provided key. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @returns `true` if the metadata entry was found and deleted; otherwise, false. - * @example - * - * class Example { - * } - * - * // constructor - * result = Reflect.deleteMetadata("custom:annotation", Example); - * - */ - function deleteMetadata(metadataKey: any, target: Object): boolean; - /** - * Deletes the metadata entry from the target object with the provided key. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @param propertyKey The property key for the target. - * @returns `true` if the metadata entry was found and deleted; otherwise, false. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod(p) { } - * method(p) { } - * } - * - * // property (on constructor) - * result = Reflect.deleteMetadata("custom:annotation", Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.deleteMetadata("custom:annotation", Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "method"); - * - */ - function deleteMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): boolean; - } -} \ No newline at end of file diff --git a/node_modules/reflect-metadata/package.json b/node_modules/reflect-metadata/package.json deleted file mode 100644 index a620727..0000000 --- a/node_modules/reflect-metadata/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "reflect-metadata", - "version": "0.1.14", - "description": "Polyfill for Metadata Reflection API", - "main": "Reflect.js", - "types": "index.d.ts", - "typescript": { - "definition": "Reflect.d.ts" - }, - "scripts": { - "prepublishOnly": "gulp prepublish", - "build": "gulp build", - "test": "gulp test", - "start": "gulp start" - }, - "repository": { - "type": "git", - "url": "https://github.com/rbuckton/reflect-metadata.git" - }, - "keywords": [ - "decorator", - "metadata", - "javascript", - "reflect" - ], - "author": { - "name": "Ron Buckton", - "email": "ron.buckton@microsoft.com", - "url": "http://github.com/rbuckton" - }, - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/rbuckton/reflect-metadata/issues" - }, - "homepage": "http://rbuckton.github.io/reflect-metadata", - "dependencies": {}, - "devDependencies": { - "@types/chai": "^3.4.34", - "@types/mocha": "^2.2.34", - "@types/node": "^6.0.52", - "chai": "^3.5.0", - "del": "^2.2.2", - "ecmarkup": "^3.9.3", - "gulp": "^3.9.1", - "gulp-emu": "^1.1.0", - "gulp-live-server": "0.0.30", - "gulp-mocha": "^3.0.1", - "gulp-rename": "^1.2.2", - "gulp-sequence": "^0.4.6", - "gulp-tsb": "^2.0.3", - "mocha": "^3.2.0", - "typescript": "^2.1.4" - } -} diff --git a/node_modules/reflect-metadata/reflect-metadata.d.ts b/node_modules/reflect-metadata/reflect-metadata.d.ts deleted file mode 100644 index d2e838e..0000000 --- a/node_modules/reflect-metadata/reflect-metadata.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/*! ***************************************************************************** -Copyright (C) Microsoft. 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 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ - -// NOTE: This file is obsolete and may be removed in a later release. -// For CommonJS/AMD/UMD/SystemJS declarations please use 'index.d.ts'. -// For standalone browser declarations, please use 'standalone.d.ts'. - -/// \ No newline at end of file diff --git a/node_modules/reflect-metadata/standalone.d.ts b/node_modules/reflect-metadata/standalone.d.ts deleted file mode 100644 index d0ca3b0..0000000 --- a/node_modules/reflect-metadata/standalone.d.ts +++ /dev/null @@ -1,485 +0,0 @@ -/*! ***************************************************************************** -Copyright (C) Microsoft. 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 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ -declare namespace Reflect { - /** - * Applies a set of decorators to a target object. - * @param decorators An array of decorators. - * @param target The target object. - * @returns The result of applying the provided decorators. - * @remarks Decorators are applied in reverse order of their positions in the array. - * @example - * - * class Example { } - * - * // constructor - * Example = Reflect.decorate(decoratorsArray, Example); - * - */ - function decorate(decorators: ClassDecorator[], target: Function): Function; - /** - * Applies a set of decorators to a property of a target object. - * @param decorators An array of decorators. - * @param target The target object. - * @param propertyKey The property key to decorate. - * @param attributes A property descriptor. - * @remarks Decorators are applied in reverse order. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod() { } - * method() { } - * } - * - * // property (on constructor) - * Reflect.decorate(decoratorsArray, Example, "staticProperty"); - * - * // property (on prototype) - * Reflect.decorate(decoratorsArray, Example.prototype, "property"); - * - * // method (on constructor) - * Object.defineProperty(Example, "staticMethod", - * Reflect.decorate(decoratorsArray, Example, "staticMethod", - * Object.getOwnPropertyDescriptor(Example, "staticMethod"))); - * - * // method (on prototype) - * Object.defineProperty(Example.prototype, "method", - * Reflect.decorate(decoratorsArray, Example.prototype, "method", - * Object.getOwnPropertyDescriptor(Example.prototype, "method"))); - * - */ - function decorate(decorators: (PropertyDecorator | MethodDecorator)[], target: Object, propertyKey: string | symbol, attributes?: PropertyDescriptor): PropertyDescriptor; - /** - * A default metadata decorator factory that can be used on a class, class member, or parameter. - * @param metadataKey The key for the metadata entry. - * @param metadataValue The value for the metadata entry. - * @returns A decorator function. - * @remarks - * If `metadataKey` is already defined for the target and target key, the - * metadataValue for that key will be overwritten. - * @example - * - * // constructor - * @Reflect.metadata(key, value) - * class Example { - * } - * - * // property (on constructor, TypeScript only) - * class Example { - * @Reflect.metadata(key, value) - * static staticProperty; - * } - * - * // property (on prototype, TypeScript only) - * class Example { - * @Reflect.metadata(key, value) - * property; - * } - * - * // method (on constructor) - * class Example { - * @Reflect.metadata(key, value) - * static staticMethod() { } - * } - * - * // method (on prototype) - * class Example { - * @Reflect.metadata(key, value) - * method() { } - * } - * - */ - function metadata(metadataKey: any, metadataValue: any): { - (target: Function): void; - (target: Object, propertyKey: string | symbol): void; - }; - /** - * Define a unique metadata entry on the target. - * @param metadataKey A key used to store and retrieve metadata. - * @param metadataValue A value that contains attached metadata. - * @param target The target object on which to define metadata. - * @example - * - * class Example { - * } - * - * // constructor - * Reflect.defineMetadata("custom:annotation", options, Example); - * - * // decorator factory as metadata-producing annotation. - * function MyAnnotation(options): ClassDecorator { - * return target => Reflect.defineMetadata("custom:annotation", options, target); - * } - * - */ - function defineMetadata(metadataKey: any, metadataValue: any, target: Object): void; - /** - * Define a unique metadata entry on the target. - * @param metadataKey A key used to store and retrieve metadata. - * @param metadataValue A value that contains attached metadata. - * @param target The target object on which to define metadata. - * @param propertyKey The property key for the target. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod(p) { } - * method(p) { } - * } - * - * // property (on constructor) - * Reflect.defineMetadata("custom:annotation", Number, Example, "staticProperty"); - * - * // property (on prototype) - * Reflect.defineMetadata("custom:annotation", Number, Example.prototype, "property"); - * - * // method (on constructor) - * Reflect.defineMetadata("custom:annotation", Number, Example, "staticMethod"); - * - * // method (on prototype) - * Reflect.defineMetadata("custom:annotation", Number, Example.prototype, "method"); - * - * // decorator factory as metadata-producing annotation. - * function MyAnnotation(options): PropertyDecorator { - * return (target, key) => Reflect.defineMetadata("custom:annotation", options, target, key); - * } - * - */ - function defineMetadata(metadataKey: any, metadataValue: any, target: Object, propertyKey: string | symbol): void; - /** - * Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`. - * @example - * - * class Example { - * } - * - * // constructor - * result = Reflect.hasMetadata("custom:annotation", Example); - * - */ - function hasMetadata(metadataKey: any, target: Object): boolean; - /** - * Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @param propertyKey The property key for the target. - * @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod(p) { } - * method(p) { } - * } - * - * // property (on constructor) - * result = Reflect.hasMetadata("custom:annotation", Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.hasMetadata("custom:annotation", Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.hasMetadata("custom:annotation", Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.hasMetadata("custom:annotation", Example.prototype, "method"); - * - */ - function hasMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): boolean; - /** - * Gets a value indicating whether the target object has the provided metadata key defined. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @returns `true` if the metadata key was defined on the target object; otherwise, `false`. - * @example - * - * class Example { - * } - * - * // constructor - * result = Reflect.hasOwnMetadata("custom:annotation", Example); - * - */ - function hasOwnMetadata(metadataKey: any, target: Object): boolean; - /** - * Gets a value indicating whether the target object has the provided metadata key defined. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @param propertyKey The property key for the target. - * @returns `true` if the metadata key was defined on the target object; otherwise, `false`. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod(p) { } - * method(p) { } - * } - * - * // property (on constructor) - * result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.hasOwnMetadata("custom:annotation", Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.hasOwnMetadata("custom:annotation", Example.prototype, "method"); - * - */ - function hasOwnMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): boolean; - /** - * Gets the metadata value for the provided metadata key on the target object or its prototype chain. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @returns The metadata value for the metadata key if found; otherwise, `undefined`. - * @example - * - * class Example { - * } - * - * // constructor - * result = Reflect.getMetadata("custom:annotation", Example); - * - */ - function getMetadata(metadataKey: any, target: Object): any; - /** - * Gets the metadata value for the provided metadata key on the target object or its prototype chain. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @param propertyKey The property key for the target. - * @returns The metadata value for the metadata key if found; otherwise, `undefined`. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod(p) { } - * method(p) { } - * } - * - * // property (on constructor) - * result = Reflect.getMetadata("custom:annotation", Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.getMetadata("custom:annotation", Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.getMetadata("custom:annotation", Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.getMetadata("custom:annotation", Example.prototype, "method"); - * - */ - function getMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): any; - /** - * Gets the metadata value for the provided metadata key on the target object. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @returns The metadata value for the metadata key if found; otherwise, `undefined`. - * @example - * - * class Example { - * } - * - * // constructor - * result = Reflect.getOwnMetadata("custom:annotation", Example); - * - */ - function getOwnMetadata(metadataKey: any, target: Object): any; - /** - * Gets the metadata value for the provided metadata key on the target object. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @param propertyKey The property key for the target. - * @returns The metadata value for the metadata key if found; otherwise, `undefined`. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod(p) { } - * method(p) { } - * } - * - * // property (on constructor) - * result = Reflect.getOwnMetadata("custom:annotation", Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.getOwnMetadata("custom:annotation", Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.getOwnMetadata("custom:annotation", Example.prototype, "method"); - * - */ - function getOwnMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): any; - /** - * Gets the metadata keys defined on the target object or its prototype chain. - * @param target The target object on which the metadata is defined. - * @returns An array of unique metadata keys. - * @example - * - * class Example { - * } - * - * // constructor - * result = Reflect.getMetadataKeys(Example); - * - */ - function getMetadataKeys(target: Object): any[]; - /** - * Gets the metadata keys defined on the target object or its prototype chain. - * @param target The target object on which the metadata is defined. - * @param propertyKey The property key for the target. - * @returns An array of unique metadata keys. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod(p) { } - * method(p) { } - * } - * - * // property (on constructor) - * result = Reflect.getMetadataKeys(Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.getMetadataKeys(Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.getMetadataKeys(Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.getMetadataKeys(Example.prototype, "method"); - * - */ - function getMetadataKeys(target: Object, propertyKey: string | symbol): any[]; - /** - * Gets the unique metadata keys defined on the target object. - * @param target The target object on which the metadata is defined. - * @returns An array of unique metadata keys. - * @example - * - * class Example { - * } - * - * // constructor - * result = Reflect.getOwnMetadataKeys(Example); - * - */ - function getOwnMetadataKeys(target: Object): any[]; - /** - * Gets the unique metadata keys defined on the target object. - * @param target The target object on which the metadata is defined. - * @param propertyKey The property key for the target. - * @returns An array of unique metadata keys. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod(p) { } - * method(p) { } - * } - * - * // property (on constructor) - * result = Reflect.getOwnMetadataKeys(Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.getOwnMetadataKeys(Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.getOwnMetadataKeys(Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.getOwnMetadataKeys(Example.prototype, "method"); - * - */ - function getOwnMetadataKeys(target: Object, propertyKey: string | symbol): any[]; - /** - * Deletes the metadata entry from the target object with the provided key. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @returns `true` if the metadata entry was found and deleted; otherwise, false. - * @example - * - * class Example { - * } - * - * // constructor - * result = Reflect.deleteMetadata("custom:annotation", Example); - * - */ - function deleteMetadata(metadataKey: any, target: Object): boolean; - /** - * Deletes the metadata entry from the target object with the provided key. - * @param metadataKey A key used to store and retrieve metadata. - * @param target The target object on which the metadata is defined. - * @param propertyKey The property key for the target. - * @returns `true` if the metadata entry was found and deleted; otherwise, false. - * @example - * - * class Example { - * // property declarations are not part of ES6, though they are valid in TypeScript: - * // static staticProperty; - * // property; - * - * static staticMethod(p) { } - * method(p) { } - * } - * - * // property (on constructor) - * result = Reflect.deleteMetadata("custom:annotation", Example, "staticProperty"); - * - * // property (on prototype) - * result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "property"); - * - * // method (on constructor) - * result = Reflect.deleteMetadata("custom:annotation", Example, "staticMethod"); - * - * // method (on prototype) - * result = Reflect.deleteMetadata("custom:annotation", Example.prototype, "method"); - * - */ - function deleteMetadata(metadataKey: any, target: Object, propertyKey: string | symbol): boolean; -} \ No newline at end of file diff --git a/node_modules/reflect-metadata/typings.d.ts b/node_modules/reflect-metadata/typings.d.ts deleted file mode 100644 index 179e244..0000000 --- a/node_modules/reflect-metadata/typings.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/*! ***************************************************************************** -Copyright (C) Microsoft. 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 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ - -// NOTE: This file is obsolete and may be removed in a later release. -// For CommonJS/AMD/UMD/SystemJS declarations please use 'index.d.ts'. -// For standalone browser declarations, please use 'standalone.d.ts'. - -import "./reflect-metadata"; \ No newline at end of file diff --git a/node_modules/router/HISTORY.md b/node_modules/router/HISTORY.md deleted file mode 100644 index b292257..0000000 --- a/node_modules/router/HISTORY.md +++ /dev/null @@ -1,228 +0,0 @@ -2.2.0 / 2025-03-26 -================== - -* Remove `setImmediate` support check -* Restore `debug` dependency - -2.1.0 / 2025-02-10 -================== - -* Updated `engines` field to Node@18 or higher -* Remove `Object.setPrototypeOf` polyfill -* Use `Array.flat` instead of `array-flatten` package -* Replace `methods` dependency with standard library -* deps: parseurl@^1.3.3 -* deps: is-promise@^4.0.0 -* Replace `utils-merge` dependency with `Object.assign` -* deps: Remove unused dep `after` - -2.0.0 / 2024-09-09 -================== - -* Drop support for node <18 -* deps: path-to-regexp@^8.0.0 - - Drop support for partial capture group `router.route('/user(s?)/:user/:op')` but still have optional non-capture `/user{s}/:user/:op` - - `:name?` becomes `{:name}` - - `:name*` becomes `*name`. - - The splat change also changes splat from strings to an array of strings - - Optional splats become `{*name}` - - `:name+` becomes `*name` and thus equivalent to `*name` so I dropped those tests - - Strings as regular expressions are fully removed, need to be converted to native regular expressions - -2.0.0-beta.2 / 2024-03-20 -========================= - -This incorporates all changes after 1.3.5 up to 1.3.8. - - * Add support for returned, rejected Promises to `router.param` - -2.0.0-beta.1 / 2020-03-29 -========================= - -This incorporates all changes after 1.3.3 up to 1.3.5. - - * Internalize private `router.process_params` method - * Remove `debug` dependency - * deps: array-flatten@3.0.0 - * deps: parseurl@~1.3.3 - * deps: path-to-regexp@3.2.0 - - Add new `?`, `*`, and `+` parameter modifiers. - - Matching group expressions are only RegExp syntax. - `(*)` is no longer valid and must be written as `(.*)`, for example. - - Named matching groups no longer available by position in `req.params`. - `/:foo(.*)` only captures as `req.params.foo` and not available as - `req.params[0]`. - - Regular expressions can only be used in a matching group. - `/\\d+` is no longer valid and must be written as `/(\\d+)`. - - Matching groups are now literal regular expressions. - `:foo` named captures can no longer be included inside a capture group. - - Special `*` path segment behavior removed. - `/foo/*/bar` will match a literal `*` as the middle segment. - * deps: setprototypeof@1.2.0 - -2.0.0-alpha.1 / 2018-07-27 -========================== - - * Add basic support for returned, rejected Promises - - Rejected Promises from middleware functions `next(error)` - * Drop support for Node.js below 0.10 - * deps: debug@3.1.0 - - Add `DEBUG_HIDE_DATE` environment variable - - Change timer to per-namespace instead of global - - Change non-TTY date format - - Remove `DEBUG_FD` environment variable support - - Support 256 namespace colors - -1.3.8 / 2023-02-24 -================== - - * Fix routing requests without method - -1.3.7 / 2022-04-28 -================== - - * Fix hanging on large stack of sync routes - -1.3.6 / 2021-11-15 -================== - - * Fix handling very large stacks of sync middleware - * deps: safe-buffer@5.2.1 - -1.3.5 / 2020-03-24 -================== - - * Fix incorrect middleware execution with unanchored `RegExp`s - * perf: use plain object for internal method map - -1.3.4 / 2020-01-24 -================== - - * deps: array-flatten@3.0.0 - * deps: parseurl@~1.3.3 - * deps: setprototypeof@1.2.0 - -1.3.3 / 2018-07-06 -================== - - * Fix JSDoc for `Router` constructor - -1.3.2 / 2017-09-24 -================== - - * deps: debug@2.6.9 - * deps: parseurl@~1.3.2 - - perf: reduce overhead for full URLs - - perf: unroll the "fast-path" `RegExp` - * deps: setprototypeof@1.1.0 - * deps: utils-merge@1.0.1 - -1.3.1 / 2017-05-19 -================== - - * deps: debug@2.6.8 - - Fix `DEBUG_MAX_ARRAY_LENGTH` - - deps: ms@2.0.0 - -1.3.0 / 2017-02-25 -================== - - * Add `next("router")` to exit from router - * Fix case where `router.use` skipped requests routes did not - * Use `%o` in path debug to tell types apart - * deps: setprototypeof@1.0.3 - * perf: add fast match path for `*` route - -1.2.0 / 2017-02-17 -================== - - * Skip routing when `req.url` is not set - * deps: debug@2.6.1 - - Allow colors in workers - - Deprecated `DEBUG_FD` environment variable set to `3` or higher - - Fix error when running under React Native - - Use same color for same namespace - - deps: ms@0.7.2 - -1.1.5 / 2017-01-28 -================== - - * deps: array-flatten@2.1.1 - * deps: setprototypeof@1.0.2 - - Fix using fallback even when native method exists - -1.1.4 / 2016-01-21 -================== - - * deps: array-flatten@2.0.0 - * deps: methods@~1.1.2 - - perf: enable strict mode - * deps: parseurl@~1.3.1 - - perf: enable strict mode - -1.1.3 / 2015-08-02 -================== - - * Fix infinite loop condition using `mergeParams: true` - * Fix inner numeric indices incorrectly altering parent `req.params` - * deps: array-flatten@1.1.1 - - perf: enable strict mode - * deps: path-to-regexp@0.1.7 - - Fix regression with escaped round brackets and matching groups - -1.1.2 / 2015-07-06 -================== - - * Fix hiding platform issues with `decodeURIComponent` - - Only `URIError`s are a 400 - * Fix using `*` before params in routes - * Fix using capture groups before params in routes - * deps: path-to-regexp@0.1.6 - * perf: enable strict mode - * perf: remove argument reassignments in routing - * perf: skip attempting to decode zero length string - * perf: use plain for loops - -1.1.1 / 2015-05-25 -================== - - * Fix issue where `next('route')` in `router.param` would incorrectly skip values - * deps: array-flatten@1.1.0 - * deps: debug@~2.2.0 - - deps: ms@0.7.1 - -1.1.0 / 2015-04-22 -================== - - * Use `setprototypeof` instead of `__proto__` - * deps: debug@~2.1.3 - - Fix high intensity foreground color for bold - - deps: ms@0.7.0 - -1.0.0 / 2015-01-13 -================== - - * Fix crash from error within `OPTIONS` response handler - * deps: array-flatten@1.0.2 - - Remove redundant code path - -1.0.0-beta.3 / 2015-01-11 -========================= - - * Fix duplicate methods appearing in OPTIONS responses - * Fix OPTIONS responses to include the HEAD method properly - * Remove support for leading colon in `router.param(name, fn)` - * Use `array-flatten` for flattening arrays - * deps: debug@~2.1.1 - * deps: methods@~1.1.1 - -1.0.0-beta.2 / 2014-11-19 -========================= - - * Match routes iteratively to prevent stack overflows - -1.0.0-beta.1 / 2014-11-16 -========================= - - * Initial release ported from Express 4.x - - Altered to work without Express diff --git a/node_modules/router/LICENSE b/node_modules/router/LICENSE deleted file mode 100644 index 237e1b6..0000000 --- a/node_modules/router/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -(The MIT License) - -Copyright (c) 2013 Roman Shtylman -Copyright (c) 2014-2022 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/router/README.md b/node_modules/router/README.md deleted file mode 100644 index 218fd57..0000000 --- a/node_modules/router/README.md +++ /dev/null @@ -1,416 +0,0 @@ -# router - -[![NPM Version][npm-image]][npm-url] -[![NPM Downloads][downloads-image]][downloads-url] -[![Node.js Version][node-version-image]][node-version-url] -[![Build Status][ci-image]][ci-url] -[![Test Coverage][coveralls-image]][coveralls-url] - -Simple middleware-style router - -## Installation - -This is a [Node.js](https://nodejs.org/en/) module available through the -[npm registry](https://www.npmjs.com/). Installation is done using the -[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): - -```bash -$ npm install router -``` - -## API - -```js -var finalhandler = require('finalhandler') -var http = require('http') -var Router = require('router') - -var router = Router() -router.get('/', function (req, res) { - res.setHeader('Content-Type', 'text/plain; charset=utf-8') - res.end('Hello World!') -}) - -var server = http.createServer(function (req, res) { - router(req, res, finalhandler(req, res)) -}) - -server.listen(3000) -``` - -This module is currently an extracted version from the Express project, -but with the main change being it can be used with a plain `http.createServer` -object or other web frameworks by removing Express-specific API calls. - -## Router(options) - -Options - -- `strict` - When `false` trailing slashes are optional (default: `false`) -- `caseSensitive` - When `true` the routing will be case sensitive. (default: `false`) -- `mergeParams` - When `true` any `req.params` passed to the router will be - merged into the router's `req.params`. (default: `false`) ([example](#example-using-mergeparams)) - -Returns a function with the signature `router(req, res, callback)` where -`callback([err])` must be provided to handle errors and fall-through from -not handling requests. - -### router.use([path], ...middleware) - -Use the given [middleware function](#middleware) for all http methods on the -given `path`, defaulting to the root path. - -`router` does not automatically see `use` as a handler. As such, it will not -consider it one for handling `OPTIONS` requests. - -* Note: If a `path` is specified, that `path` is stripped from the start of - `req.url`. - - - -```js -router.use(function (req, res, next) { - // do your things - - // continue to the next middleware - // the request will stall if this is not called - next() - - // note: you should NOT call `next` if you have begun writing to the response -}) -``` - -[Middleware](#middleware) can themselves use `next('router')` at any time to -exit the current router instance completely, invoking the top-level callback. - -### router\[method](path, ...[middleware], handler) - -The [http methods](https://github.com/jshttp/methods/blob/master/index.js) provide -the routing functionality in `router`. - -Method middleware and handlers follow usual [middleware](#middleware) behavior, -except they will only be called when the method and path match the request. - - - -```js -// handle a `GET` request -router.get('/', function (req, res) { - res.setHeader('Content-Type', 'text/plain; charset=utf-8') - res.end('Hello World!') -}) -``` - -[Middleware](#middleware) given before the handler have one additional trick, -they may invoke `next('route')`. Calling `next('route')` bypasses the remaining -middleware and the handler mounted for this route, passing the request to the -next route suitable for handling this request. - -Route handlers and middleware can themselves use `next('router')` at any time -to exit the current router instance completely, invoking the top-level callback. - -### router.param(name, param_middleware) - -Maps the specified path parameter `name` to a specialized param-capturing middleware. - -This function positions the middleware in the same stack as `.use`. - -The function can optionally return a `Promise` object. If a `Promise` object -is returned from the function, the router will attach an `onRejected` callback -using `.then`. If the promise is rejected, `next` will be called with the -rejected value, or an error if the value is falsy. - -Parameter mapping is used to provide pre-conditions to routes -which use normalized placeholders. For example a _:user_id_ parameter -could automatically load a user's information from the database without -any additional code: - - - -```js -router.param('user_id', function (req, res, next, id) { - User.find(id, function (err, user) { - if (err) { - return next(err) - } else if (!user) { - return next(new Error('failed to load user')) - } - req.user = user - - // continue processing the request - next() - }) -}) -``` - -### router.route(path) - -Creates an instance of a single `Route` for the given `path`. -(See `Router.Route` below) - -Routes can be used to handle http `methods` with their own, optional middleware. - -Using `router.route(path)` is a recommended approach to avoiding duplicate -route naming and thus typo errors. - - - -```js -var api = router.route('/api/') -``` - -## Router.Route(path) - -Represents a single route as an instance that can be used to handle http -`methods` with it's own, optional middleware. - -### route\[method](handler) - -These are functions which you can directly call on a route to register a new -`handler` for the `method` on the route. - - - -```js -// handle a `GET` request -var status = router.route('/status') - -status.get(function (req, res) { - res.setHeader('Content-Type', 'text/plain; charset=utf-8') - res.end('All Systems Green!') -}) -``` - -### route.all(handler) - -Adds a handler for all HTTP methods to this route. - -The handler can behave like middleware and call `next` to continue processing -rather than responding. - - - -```js -router.route('/') - .all(function (req, res, next) { - next() - }) - .all(checkSomething) - .get(function (req, res) { - res.setHeader('Content-Type', 'text/plain; charset=utf-8') - res.end('Hello World!') - }) -``` - -## Middleware - -Middleware (and method handlers) are functions that follow specific function -parameters and have defined behavior when used with `router`. The most common -format is with three parameters - "req", "res" and "next". - -- `req` - This is a [HTTP incoming message](https://nodejs.org/api/http.html#http_http_incomingmessage) instance. -- `res` - This is a [HTTP server response](https://nodejs.org/api/http.html#http_class_http_serverresponse) instance. -- `next` - Calling this function that tells `router` to proceed to the next matching middleware or method handler. It accepts an error as the first argument. - -The function can optionally return a `Promise` object. If a `Promise` object -is returned from the function, the router will attach an `onRejected` callback -using `.then`. If the promise is rejected, `next` will be called with the -rejected value, or an error if the value is falsy. - -Middleware and method handlers can also be defined with four arguments. When -the function has four parameters defined, the first argument is an error and -subsequent arguments remain, becoming - "err", "req", "res", "next". These -functions are "error handling middleware", and can be used for handling -errors that occurred in previous handlers (E.g. from calling `next(err)`). -This is most used when you want to define arbitrary rendering of errors. - - - -```js -router.get('/error_route', function (req, res, next) { - return next(new Error('Bad Request')) -}) - -router.use(function (err, req, res, next) { - res.end(err.message) //= > "Bad Request" -}) -``` - -Error handling middleware will **only** be invoked when an error was given. As -long as the error is in the pipeline, normal middleware and handlers will be -bypassed - only error handling middleware will be invoked with an error. - -## Examples - -```js -// import our modules -var http = require('http') -var Router = require('router') -var finalhandler = require('finalhandler') -var compression = require('compression') -var bodyParser = require('body-parser') - -// store our message to display -var message = 'Hello World!' - -// initialize the router & server and add a final callback. -var router = Router() -var server = http.createServer(function onRequest (req, res) { - router(req, res, finalhandler(req, res)) -}) - -// use some middleware and compress all outgoing responses -router.use(compression()) - -// handle `GET` requests to `/message` -router.get('/message', function (req, res) { - res.statusCode = 200 - res.setHeader('Content-Type', 'text/plain; charset=utf-8') - res.end(message + '\n') -}) - -// create and mount a new router for our API -var api = Router() -router.use('/api/', api) - -// add a body parsing middleware to our API -api.use(bodyParser.json()) - -// handle `PATCH` requests to `/api/set-message` -api.patch('/set-message', function (req, res) { - if (req.body.value) { - message = req.body.value - - res.statusCode = 200 - res.setHeader('Content-Type', 'text/plain; charset=utf-8') - res.end(message + '\n') - } else { - res.statusCode = 400 - res.setHeader('Content-Type', 'text/plain; charset=utf-8') - res.end('Invalid API Syntax\n') - } -}) - -// make our http server listen to connections -server.listen(8080) -``` - -You can get the message by running this command in your terminal, - or navigating to `127.0.0.1:8080` in a web browser. -```bash -curl http://127.0.0.1:8080 -``` - -You can set the message by sending it a `PATCH` request via this command: -```bash -curl http://127.0.0.1:8080/api/set-message -X PATCH -H "Content-Type: application/json" -d '{"value":"Cats!"}' -``` - -### Example using mergeParams - -```js -var http = require('http') -var Router = require('router') -var finalhandler = require('finalhandler') - -// this example is about the mergeParams option -var opts = { mergeParams: true } - -// make a router with out special options -var router = Router(opts) -var server = http.createServer(function onRequest (req, res) { - // set something to be passed into the router - req.params = { type: 'kitten' } - - router(req, res, finalhandler(req, res)) -}) - -router.get('/', function (req, res) { - res.statusCode = 200 - res.setHeader('Content-Type', 'text/plain; charset=utf-8') - - // with respond with the the params that were passed in - res.end(req.params.type + '\n') -}) - -// make another router with our options -var handler = Router(opts) - -// mount our new router to a route that accepts a param -router.use('/:path', handler) - -handler.get('/', function (req, res) { - res.statusCode = 200 - res.setHeader('Content-Type', 'text/plain; charset=utf-8') - - // will respond with the param of the router's parent route - res.end(req.params.path + '\n') -}) - -// make our http server listen to connections -server.listen(8080) -``` - -Now you can get the type, or what path you are requesting: -```bash -curl http://127.0.0.1:8080 -> kitten -curl http://127.0.0.1:8080/such_path -> such_path -``` - -### Example of advanced `.route()` usage - -This example shows how to implement routes where there is a custom -handler to execute when the path matched, but no methods matched. -Without any special handling, this would be treated as just a -generic non-match by `router` (which typically results in a 404), -but with a custom handler, a `405 Method Not Allowed` can be sent. - -```js -var http = require('http') -var finalhandler = require('finalhandler') -var Router = require('router') - -// create the router and server -var router = new Router() -var server = http.createServer(function onRequest (req, res) { - router(req, res, finalhandler(req, res)) -}) - -// register a route and add all methods -router.route('/pet/:id') - .get(function (req, res) { - // this is GET /pet/:id - res.setHeader('Content-Type', 'application/json') - res.end(JSON.stringify({ name: 'tobi' })) - }) - .delete(function (req, res) { - // this is DELETE /pet/:id - res.end() - }) - .all(function (req, res) { - // this is called for all other methods not - // defined above for /pet/:id - res.statusCode = 405 - res.end() - }) - -// make our http server listen to connections -server.listen(8080) -``` - -## License - -[MIT](LICENSE) - -[ci-image]: https://badgen.net/github/checks/pillarjs/router/master?label=ci -[ci-url]: https://github.com/pillarjs/router/actions/workflows/ci.yml -[npm-image]: https://img.shields.io/npm/v/router.svg -[npm-url]: https://npmjs.org/package/router -[node-version-image]: https://img.shields.io/node/v/router.svg -[node-version-url]: http://nodejs.org/download/ -[coveralls-image]: https://img.shields.io/coveralls/pillarjs/router/master.svg -[coveralls-url]: https://coveralls.io/r/pillarjs/router?branch=master -[downloads-image]: https://img.shields.io/npm/dm/router.svg -[downloads-url]: https://npmjs.org/package/router diff --git a/node_modules/router/index.js b/node_modules/router/index.js deleted file mode 100644 index 4358aeb..0000000 --- a/node_modules/router/index.js +++ /dev/null @@ -1,748 +0,0 @@ -/*! - * router - * Copyright(c) 2013 Roman Shtylman - * Copyright(c) 2014-2022 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -const isPromise = require('is-promise') -const Layer = require('./lib/layer') -const { METHODS } = require('node:http') -const parseUrl = require('parseurl') -const Route = require('./lib/route') -const debug = require('debug')('router') -const deprecate = require('depd')('router') - -/** - * Module variables. - * @private - */ - -const slice = Array.prototype.slice -const flatten = Array.prototype.flat -const methods = METHODS.map((method) => method.toLowerCase()) - -/** - * Expose `Router`. - */ - -module.exports = Router - -/** - * Expose `Route`. - */ - -module.exports.Route = Route - -/** - * Initialize a new `Router` with the given `options`. - * - * @param {object} [options] - * @return {Router} which is a callable function - * @public - */ - -function Router (options) { - if (!(this instanceof Router)) { - return new Router(options) - } - - const opts = options || {} - - function router (req, res, next) { - router.handle(req, res, next) - } - - // inherit from the correct prototype - Object.setPrototypeOf(router, this) - - router.caseSensitive = opts.caseSensitive - router.mergeParams = opts.mergeParams - router.params = {} - router.strict = opts.strict - router.stack = [] - - return router -} - -/** - * Router prototype inherits from a Function. - */ - -/* istanbul ignore next */ -Router.prototype = function () {} - -/** - * Map the given param placeholder `name`(s) to the given callback. - * - * Parameter mapping is used to provide pre-conditions to routes - * which use normalized placeholders. For example a _:user_id_ parameter - * could automatically load a user's information from the database without - * any additional code. - * - * The callback uses the same signature as middleware, the only difference - * being that the value of the placeholder is passed, in this case the _id_ - * of the user. Once the `next()` function is invoked, just like middleware - * it will continue on to execute the route, or subsequent parameter functions. - * - * Just like in middleware, you must either respond to the request or call next - * to avoid stalling the request. - * - * router.param('user_id', function(req, res, next, id){ - * User.find(id, function(err, user){ - * if (err) { - * return next(err) - * } else if (!user) { - * return next(new Error('failed to load user')) - * } - * req.user = user - * next() - * }) - * }) - * - * @param {string} name - * @param {function} fn - * @public - */ - -Router.prototype.param = function param (name, fn) { - if (!name) { - throw new TypeError('argument name is required') - } - - if (typeof name !== 'string') { - throw new TypeError('argument name must be a string') - } - - if (!fn) { - throw new TypeError('argument fn is required') - } - - if (typeof fn !== 'function') { - throw new TypeError('argument fn must be a function') - } - - let params = this.params[name] - - if (!params) { - params = this.params[name] = [] - } - - params.push(fn) - - return this -} - -/** - * Dispatch a req, res into the router. - * - * @private - */ - -Router.prototype.handle = function handle (req, res, callback) { - if (!callback) { - throw new TypeError('argument callback is required') - } - - debug('dispatching %s %s', req.method, req.url) - - let idx = 0 - let methods - const protohost = getProtohost(req.url) || '' - let removed = '' - const self = this - let slashAdded = false - let sync = 0 - const paramcalled = {} - - // middleware and routes - const stack = this.stack - - // manage inter-router variables - const parentParams = req.params - const parentUrl = req.baseUrl || '' - let done = restore(callback, req, 'baseUrl', 'next', 'params') - - // setup next layer - req.next = next - - // for options requests, respond with a default if nothing else responds - if (req.method === 'OPTIONS') { - methods = [] - done = wrap(done, generateOptionsResponder(res, methods)) - } - - // setup basic req values - req.baseUrl = parentUrl - req.originalUrl = req.originalUrl || req.url - - next() - - function next (err) { - let layerError = err === 'route' - ? null - : err - - // remove added slash - if (slashAdded) { - req.url = req.url.slice(1) - slashAdded = false - } - - // restore altered req.url - if (removed.length !== 0) { - req.baseUrl = parentUrl - req.url = protohost + removed + req.url.slice(protohost.length) - removed = '' - } - - // signal to exit router - if (layerError === 'router') { - setImmediate(done, null) - return - } - - // no more matching layers - if (idx >= stack.length) { - setImmediate(done, layerError) - return - } - - // max sync stack - if (++sync > 100) { - return setImmediate(next, err) - } - - // get pathname of request - const path = getPathname(req) - - if (path == null) { - return done(layerError) - } - - // find next matching layer - let layer - let match - let route - - while (match !== true && idx < stack.length) { - layer = stack[idx++] - match = matchLayer(layer, path) - route = layer.route - - if (typeof match !== 'boolean') { - // hold on to layerError - layerError = layerError || match - } - - if (match !== true) { - continue - } - - if (!route) { - // process non-route handlers normally - continue - } - - if (layerError) { - // routes do not match with a pending error - match = false - continue - } - - const method = req.method - const hasMethod = route._handlesMethod(method) - - // build up automatic options response - if (!hasMethod && method === 'OPTIONS' && methods) { - methods.push.apply(methods, route._methods()) - } - - // don't even bother matching route - if (!hasMethod && method !== 'HEAD') { - match = false - } - } - - // no match - if (match !== true) { - return done(layerError) - } - - // store route for dispatch on change - if (route) { - req.route = route - } - - // Capture one-time layer values - req.params = self.mergeParams - ? mergeParams(layer.params, parentParams) - : layer.params - const layerPath = layer.path - - // this should be done for the layer - processParams(self.params, layer, paramcalled, req, res, function (err) { - if (err) { - next(layerError || err) - } else if (route) { - layer.handleRequest(req, res, next) - } else { - trimPrefix(layer, layerError, layerPath, path) - } - - sync = 0 - }) - } - - function trimPrefix (layer, layerError, layerPath, path) { - if (layerPath.length !== 0) { - // Validate path is a prefix match - if (layerPath !== path.substring(0, layerPath.length)) { - next(layerError) - return - } - - // Validate path breaks on a path separator - const c = path[layerPath.length] - if (c && c !== '/') { - next(layerError) - return - } - - // Trim off the part of the url that matches the route - // middleware (.use stuff) needs to have the path stripped - debug('trim prefix (%s) from url %s', layerPath, req.url) - removed = layerPath - req.url = protohost + req.url.slice(protohost.length + removed.length) - - // Ensure leading slash - if (!protohost && req.url[0] !== '/') { - req.url = '/' + req.url - slashAdded = true - } - - // Setup base URL (no trailing slash) - req.baseUrl = parentUrl + (removed[removed.length - 1] === '/' - ? removed.substring(0, removed.length - 1) - : removed) - } - - debug('%s %s : %s', layer.name, layerPath, req.originalUrl) - - if (layerError) { - layer.handleError(layerError, req, res, next) - } else { - layer.handleRequest(req, res, next) - } - } -} - -/** - * Use the given middleware function, with optional path, defaulting to "/". - * - * Use (like `.all`) will run for any http METHOD, but it will not add - * handlers for those methods so OPTIONS requests will not consider `.use` - * functions even if they could respond. - * - * The other difference is that _route_ path is stripped and not visible - * to the handler function. The main effect of this feature is that mounted - * handlers can operate without any code changes regardless of the "prefix" - * pathname. - * - * @public - */ - -Router.prototype.use = function use (handler) { - let offset = 0 - let path = '/' - - // default path to '/' - // disambiguate router.use([handler]) - if (typeof handler !== 'function') { - let arg = handler - - while (Array.isArray(arg) && arg.length !== 0) { - arg = arg[0] - } - - // first arg is the path - if (typeof arg !== 'function') { - offset = 1 - path = handler - } - } - - const callbacks = flatten.call(slice.call(arguments, offset), Infinity) - - if (callbacks.length === 0) { - throw new TypeError('argument handler is required') - } - - for (let i = 0; i < callbacks.length; i++) { - const fn = callbacks[i] - - if (typeof fn !== 'function') { - throw new TypeError('argument handler must be a function') - } - - // add the middleware - debug('use %o %s', path, fn.name || '') - - const layer = new Layer(path, { - sensitive: this.caseSensitive, - strict: false, - end: false - }, fn) - - layer.route = undefined - - this.stack.push(layer) - } - - return this -} - -/** - * Create a new Route for the given path. - * - * Each route contains a separate middleware stack and VERB handlers. - * - * See the Route api documentation for details on adding handlers - * and middleware to routes. - * - * @param {string} path - * @return {Route} - * @public - */ - -Router.prototype.route = function route (path) { - const route = new Route(path) - - const layer = new Layer(path, { - sensitive: this.caseSensitive, - strict: this.strict, - end: true - }, handle) - - function handle (req, res, next) { - route.dispatch(req, res, next) - } - - layer.route = route - - this.stack.push(layer) - return route -} - -// create Router#VERB functions -methods.concat('all').forEach(function (method) { - Router.prototype[method] = function (path) { - const route = this.route(path) - route[method].apply(route, slice.call(arguments, 1)) - return this - } -}) - -/** - * Generate a callback that will make an OPTIONS response. - * - * @param {OutgoingMessage} res - * @param {array} methods - * @private - */ - -function generateOptionsResponder (res, methods) { - return function onDone (fn, err) { - if (err || methods.length === 0) { - return fn(err) - } - - trySendOptionsResponse(res, methods, fn) - } -} - -/** - * Get pathname of request. - * - * @param {IncomingMessage} req - * @private - */ - -function getPathname (req) { - try { - return parseUrl(req).pathname - } catch (err) { - return undefined - } -} - -/** - * Get get protocol + host for a URL. - * - * @param {string} url - * @private - */ - -function getProtohost (url) { - if (typeof url !== 'string' || url.length === 0 || url[0] === '/') { - return undefined - } - - const searchIndex = url.indexOf('?') - const pathLength = searchIndex !== -1 - ? searchIndex - : url.length - const fqdnIndex = url.substring(0, pathLength).indexOf('://') - - return fqdnIndex !== -1 - ? url.substring(0, url.indexOf('/', 3 + fqdnIndex)) - : undefined -} - -/** - * Match path to a layer. - * - * @param {Layer} layer - * @param {string} path - * @private - */ - -function matchLayer (layer, path) { - try { - return layer.match(path) - } catch (err) { - return err - } -} - -/** - * Merge params with parent params - * - * @private - */ - -function mergeParams (params, parent) { - if (typeof parent !== 'object' || !parent) { - return params - } - - // make copy of parent for base - const obj = Object.assign({}, parent) - - // simple non-numeric merging - if (!(0 in params) || !(0 in parent)) { - return Object.assign(obj, params) - } - - let i = 0 - let o = 0 - - // determine numeric gap in params - while (i in params) { - i++ - } - - // determine numeric gap in parent - while (o in parent) { - o++ - } - - // offset numeric indices in params before merge - for (i--; i >= 0; i--) { - params[i + o] = params[i] - - // create holes for the merge when necessary - if (i < o) { - delete params[i] - } - } - - return Object.assign(obj, params) -} - -/** - * Process any parameters for the layer. - * - * @private - */ - -function processParams (params, layer, called, req, res, done) { - // captured parameters from the layer, keys and values - const keys = layer.keys - - // fast track - if (!keys || keys.length === 0) { - return done() - } - - let i = 0 - let paramIndex = 0 - let key - let paramVal - let paramCallbacks - let paramCalled - - // process params in order - // param callbacks can be async - function param (err) { - if (err) { - return done(err) - } - - if (i >= keys.length) { - return done() - } - - paramIndex = 0 - key = keys[i++] - paramVal = req.params[key] - paramCallbacks = params[key] - paramCalled = called[key] - - if (paramVal === undefined || !paramCallbacks) { - return param() - } - - // param previously called with same value or error occurred - if (paramCalled && (paramCalled.match === paramVal || - (paramCalled.error && paramCalled.error !== 'route'))) { - // restore value - req.params[key] = paramCalled.value - - // next param - return param(paramCalled.error) - } - - called[key] = paramCalled = { - error: null, - match: paramVal, - value: paramVal - } - - paramCallback() - } - - // single param callbacks - function paramCallback (err) { - const fn = paramCallbacks[paramIndex++] - - // store updated value - paramCalled.value = req.params[key] - - if (err) { - // store error - paramCalled.error = err - param(err) - return - } - - if (!fn) return param() - - try { - const ret = fn(req, res, paramCallback, paramVal, key) - if (isPromise(ret)) { - if (!(ret instanceof Promise)) { - deprecate('parameters that are Promise-like are deprecated, use a native Promise instead') - } - - ret.then(null, function (error) { - paramCallback(error || new Error('Rejected promise')) - }) - } - } catch (e) { - paramCallback(e) - } - } - - param() -} - -/** - * Restore obj props after function - * - * @private - */ - -function restore (fn, obj) { - const props = new Array(arguments.length - 2) - const vals = new Array(arguments.length - 2) - - for (let i = 0; i < props.length; i++) { - props[i] = arguments[i + 2] - vals[i] = obj[props[i]] - } - - return function () { - // restore vals - for (let i = 0; i < props.length; i++) { - obj[props[i]] = vals[i] - } - - return fn.apply(this, arguments) - } -} - -/** - * Send an OPTIONS response. - * - * @private - */ - -function sendOptionsResponse (res, methods) { - const options = Object.create(null) - - // build unique method map - for (let i = 0; i < methods.length; i++) { - options[methods[i]] = true - } - - // construct the allow list - const allow = Object.keys(options).sort().join(', ') - - // send response - res.setHeader('Allow', allow) - res.setHeader('Content-Length', Buffer.byteLength(allow)) - res.setHeader('Content-Type', 'text/plain') - res.setHeader('X-Content-Type-Options', 'nosniff') - res.end(allow) -} - -/** - * Try to send an OPTIONS response. - * - * @private - */ - -function trySendOptionsResponse (res, methods, next) { - try { - sendOptionsResponse(res, methods) - } catch (err) { - next(err) - } -} - -/** - * Wrap a function - * - * @private - */ - -function wrap (old, fn) { - return function proxy () { - const args = new Array(arguments.length + 1) - - args[0] = old - for (let i = 0, len = arguments.length; i < len; i++) { - args[i + 1] = arguments[i] - } - - fn.apply(this, args) - } -} diff --git a/node_modules/router/lib/layer.js b/node_modules/router/lib/layer.js deleted file mode 100644 index 6a4408f..0000000 --- a/node_modules/router/lib/layer.js +++ /dev/null @@ -1,247 +0,0 @@ -/*! - * router - * Copyright(c) 2013 Roman Shtylman - * Copyright(c) 2014-2022 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -const isPromise = require('is-promise') -const pathRegexp = require('path-to-regexp') -const debug = require('debug')('router:layer') -const deprecate = require('depd')('router') - -/** - * Module variables. - * @private - */ - -const TRAILING_SLASH_REGEXP = /\/+$/ -const MATCHING_GROUP_REGEXP = /\((?:\?<(.*?)>)?(?!\?)/g - -/** - * Expose `Layer`. - */ - -module.exports = Layer - -function Layer (path, options, fn) { - if (!(this instanceof Layer)) { - return new Layer(path, options, fn) - } - - debug('new %o', path) - const opts = options || {} - - this.handle = fn - this.keys = [] - this.name = fn.name || '' - this.params = undefined - this.path = undefined - this.slash = path === '/' && opts.end === false - - function matcher (_path) { - if (_path instanceof RegExp) { - const keys = [] - let name = 0 - let m - // eslint-disable-next-line no-cond-assign - while (m = MATCHING_GROUP_REGEXP.exec(_path.source)) { - keys.push({ - name: m[1] || name++, - offset: m.index - }) - } - - return function regexpMatcher (p) { - const match = _path.exec(p) - if (!match) { - return false - } - - const params = {} - for (let i = 1; i < match.length; i++) { - const key = keys[i - 1] - const prop = key.name - const val = decodeParam(match[i]) - - if (val !== undefined) { - params[prop] = val - } - } - - return { - params, - path: match[0] - } - } - } - - return pathRegexp.match((opts.strict ? _path : loosen(_path)), { - sensitive: opts.sensitive, - end: opts.end, - trailing: !opts.strict, - decode: decodeParam - }) - } - this.matchers = Array.isArray(path) ? path.map(matcher) : [matcher(path)] -} - -/** - * Handle the error for the layer. - * - * @param {Error} error - * @param {Request} req - * @param {Response} res - * @param {function} next - * @api private - */ - -Layer.prototype.handleError = function handleError (error, req, res, next) { - const fn = this.handle - - if (fn.length !== 4) { - // not a standard error handler - return next(error) - } - - try { - // invoke function - const ret = fn(error, req, res, next) - - // wait for returned promise - if (isPromise(ret)) { - if (!(ret instanceof Promise)) { - deprecate('handlers that are Promise-like are deprecated, use a native Promise instead') - } - - ret.then(null, function (error) { - next(error || new Error('Rejected promise')) - }) - } - } catch (err) { - next(err) - } -} - -/** - * Handle the request for the layer. - * - * @param {Request} req - * @param {Response} res - * @param {function} next - * @api private - */ - -Layer.prototype.handleRequest = function handleRequest (req, res, next) { - const fn = this.handle - - if (fn.length > 3) { - // not a standard request handler - return next() - } - - try { - // invoke function - const ret = fn(req, res, next) - - // wait for returned promise - if (isPromise(ret)) { - if (!(ret instanceof Promise)) { - deprecate('handlers that are Promise-like are deprecated, use a native Promise instead') - } - - ret.then(null, function (error) { - next(error || new Error('Rejected promise')) - }) - } - } catch (err) { - next(err) - } -} - -/** - * Check if this route matches `path`, if so - * populate `.params`. - * - * @param {String} path - * @return {Boolean} - * @api private - */ - -Layer.prototype.match = function match (path) { - let match - - if (path != null) { - // fast path non-ending match for / (any path matches) - if (this.slash) { - this.params = {} - this.path = '' - return true - } - - let i = 0 - while (!match && i < this.matchers.length) { - // match the path - match = this.matchers[i](path) - i++ - } - } - - if (!match) { - this.params = undefined - this.path = undefined - return false - } - - // store values - this.params = match.params - this.path = match.path - this.keys = Object.keys(match.params) - - return true -} - -/** - * Decode param value. - * - * @param {string} val - * @return {string} - * @private - */ - -function decodeParam (val) { - if (typeof val !== 'string' || val.length === 0) { - return val - } - - try { - return decodeURIComponent(val) - } catch (err) { - if (err instanceof URIError) { - err.message = 'Failed to decode param \'' + val + '\'' - err.status = 400 - } - - throw err - } -} - -/** - * Loosens the given path for path-to-regexp matching. - */ -function loosen (path) { - if (path instanceof RegExp || path === '/') { - return path - } - - return Array.isArray(path) - ? path.map(function (p) { return loosen(p) }) - : String(path).replace(TRAILING_SLASH_REGEXP, '') -} diff --git a/node_modules/router/lib/route.js b/node_modules/router/lib/route.js deleted file mode 100644 index 1887d78..0000000 --- a/node_modules/router/lib/route.js +++ /dev/null @@ -1,242 +0,0 @@ -/*! - * router - * Copyright(c) 2013 Roman Shtylman - * Copyright(c) 2014-2022 Douglas Christopher Wilson - * MIT Licensed - */ - -'use strict' - -/** - * Module dependencies. - * @private - */ - -const debug = require('debug')('router:route') -const Layer = require('./layer') -const { METHODS } = require('node:http') - -/** - * Module variables. - * @private - */ - -const slice = Array.prototype.slice -const flatten = Array.prototype.flat -const methods = METHODS.map((method) => method.toLowerCase()) - -/** - * Expose `Route`. - */ - -module.exports = Route - -/** - * Initialize `Route` with the given `path`, - * - * @param {String} path - * @api private - */ - -function Route (path) { - debug('new %o', path) - this.path = path - this.stack = [] - - // route handlers for various http methods - this.methods = Object.create(null) -} - -/** - * @private - */ - -Route.prototype._handlesMethod = function _handlesMethod (method) { - if (this.methods._all) { - return true - } - - // normalize name - let name = typeof method === 'string' - ? method.toLowerCase() - : method - - if (name === 'head' && !this.methods.head) { - name = 'get' - } - - return Boolean(this.methods[name]) -} - -/** - * @return {array} supported HTTP methods - * @private - */ - -Route.prototype._methods = function _methods () { - const methods = Object.keys(this.methods) - - // append automatic head - if (this.methods.get && !this.methods.head) { - methods.push('head') - } - - for (let i = 0; i < methods.length; i++) { - // make upper case - methods[i] = methods[i].toUpperCase() - } - - return methods -} - -/** - * dispatch req, res into this route - * - * @private - */ - -Route.prototype.dispatch = function dispatch (req, res, done) { - let idx = 0 - const stack = this.stack - let sync = 0 - - if (stack.length === 0) { - return done() - } - - let method = typeof req.method === 'string' - ? req.method.toLowerCase() - : req.method - - if (method === 'head' && !this.methods.head) { - method = 'get' - } - - req.route = this - - next() - - function next (err) { - // signal to exit route - if (err && err === 'route') { - return done() - } - - // signal to exit router - if (err && err === 'router') { - return done(err) - } - - // no more matching layers - if (idx >= stack.length) { - return done(err) - } - - // max sync stack - if (++sync > 100) { - return setImmediate(next, err) - } - - let layer - let match - - // find next matching layer - while (match !== true && idx < stack.length) { - layer = stack[idx++] - match = !layer.method || layer.method === method - } - - // no match - if (match !== true) { - return done(err) - } - - if (err) { - layer.handleError(err, req, res, next) - } else { - layer.handleRequest(req, res, next) - } - - sync = 0 - } -} - -/** - * Add a handler for all HTTP verbs to this route. - * - * Behaves just like middleware and can respond or call `next` - * to continue processing. - * - * You can use multiple `.all` call to add multiple handlers. - * - * function check_something(req, res, next){ - * next() - * } - * - * function validate_user(req, res, next){ - * next() - * } - * - * route - * .all(validate_user) - * .all(check_something) - * .get(function(req, res, next){ - * res.send('hello world') - * }) - * - * @param {array|function} handler - * @return {Route} for chaining - * @api public - */ - -Route.prototype.all = function all (handler) { - const callbacks = flatten.call(slice.call(arguments), Infinity) - - if (callbacks.length === 0) { - throw new TypeError('argument handler is required') - } - - for (let i = 0; i < callbacks.length; i++) { - const fn = callbacks[i] - - if (typeof fn !== 'function') { - throw new TypeError('argument handler must be a function') - } - - const layer = Layer('/', {}, fn) - layer.method = undefined - - this.methods._all = true - this.stack.push(layer) - } - - return this -} - -methods.forEach(function (method) { - Route.prototype[method] = function (handler) { - const callbacks = flatten.call(slice.call(arguments), Infinity) - - if (callbacks.length === 0) { - throw new TypeError('argument handler is required') - } - - for (let i = 0; i < callbacks.length; i++) { - const fn = callbacks[i] - - if (typeof fn !== 'function') { - throw new TypeError('argument handler must be a function') - } - - debug('%s %s', method, this.path) - - const layer = Layer('/', {}, fn) - layer.method = method - - this.methods[method] = true - this.stack.push(layer) - } - - return this - } -}) diff --git a/node_modules/router/node_modules/debug/LICENSE b/node_modules/router/node_modules/debug/LICENSE deleted file mode 100644 index 1a9820e..0000000 --- a/node_modules/router/node_modules/debug/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -(The MIT License) - -Copyright (c) 2014-2017 TJ Holowaychuk -Copyright (c) 2018-2021 Josh Junon - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/router/node_modules/debug/README.md b/node_modules/router/node_modules/debug/README.md deleted file mode 100644 index 9ebdfbf..0000000 --- a/node_modules/router/node_modules/debug/README.md +++ /dev/null @@ -1,481 +0,0 @@ -# debug -[![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) -[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) - - - -A tiny JavaScript debugging utility modelled after Node.js core's debugging -technique. Works in Node.js and web browsers. - -## Installation - -```bash -$ npm install debug -``` - -## Usage - -`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. - -Example [_app.js_](./examples/node/app.js): - -```js -var debug = require('debug')('http') - , http = require('http') - , name = 'My App'; - -// fake app - -debug('booting %o', name); - -http.createServer(function(req, res){ - debug(req.method + ' ' + req.url); - res.end('hello\n'); -}).listen(3000, function(){ - debug('listening'); -}); - -// fake worker of some kind - -require('./worker'); -``` - -Example [_worker.js_](./examples/node/worker.js): - -```js -var a = require('debug')('worker:a') - , b = require('debug')('worker:b'); - -function work() { - a('doing lots of uninteresting work'); - setTimeout(work, Math.random() * 1000); -} - -work(); - -function workb() { - b('doing some work'); - setTimeout(workb, Math.random() * 2000); -} - -workb(); -``` - -The `DEBUG` environment variable is then used to enable these based on space or -comma-delimited names. - -Here are some examples: - -screen shot 2017-08-08 at 12 53 04 pm -screen shot 2017-08-08 at 12 53 38 pm -screen shot 2017-08-08 at 12 53 25 pm - -#### Windows command prompt notes - -##### CMD - -On Windows the environment variable is set using the `set` command. - -```cmd -set DEBUG=*,-not_this -``` - -Example: - -```cmd -set DEBUG=* & node app.js -``` - -##### PowerShell (VS Code default) - -PowerShell uses different syntax to set environment variables. - -```cmd -$env:DEBUG = "*,-not_this" -``` - -Example: - -```cmd -$env:DEBUG='app';node app.js -``` - -Then, run the program to be debugged as usual. - -npm script example: -```js - "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", -``` - -## Namespace Colors - -Every debug instance has a color generated for it based on its namespace name. -This helps when visually parsing the debug output to identify which debug instance -a debug line belongs to. - -#### Node.js - -In Node.js, colors are enabled when stderr is a TTY. You also _should_ install -the [`supports-color`](https://npmjs.org/supports-color) module alongside debug, -otherwise debug will only use a small handful of basic colors. - - - -#### Web Browser - -Colors are also enabled on "Web Inspectors" that understand the `%c` formatting -option. These are WebKit web inspectors, Firefox ([since version -31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) -and the Firebug plugin for Firefox (any version). - - - - -## Millisecond diff - -When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - - - -When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below: - - - - -## Conventions - -If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output. - -## Wildcards - -The `*` character may be used as a wildcard. Suppose for example your library has -debuggers named "connect:bodyParser", "connect:compress", "connect:session", -instead of listing all three with -`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do -`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. - -You can also exclude specific debuggers by prefixing them with a "-" character. -For example, `DEBUG=*,-connect:*` would include all debuggers except those -starting with "connect:". - -## Environment Variables - -When running through Node.js, you can set a few environment variables that will -change the behavior of the debug logging: - -| Name | Purpose | -|-----------|-------------------------------------------------| -| `DEBUG` | Enables/disables specific debugging namespaces. | -| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). | -| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | -| `DEBUG_DEPTH` | Object inspection depth. | -| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | - - -__Note:__ The environment variables beginning with `DEBUG_` end up being -converted into an Options object that gets used with `%o`/`%O` formatters. -See the Node.js documentation for -[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) -for the complete list. - -## Formatters - -Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. -Below are the officially supported formatters: - -| Formatter | Representation | -|-----------|----------------| -| `%O` | Pretty-print an Object on multiple lines. | -| `%o` | Pretty-print an Object all on a single line. | -| `%s` | String. | -| `%d` | Number (both integer and float). | -| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | -| `%%` | Single percent sign ('%'). This does not consume an argument. | - - -### Custom formatters - -You can add custom formatters by extending the `debug.formatters` object. -For example, if you wanted to add support for rendering a Buffer as hex with -`%h`, you could do something like: - -```js -const createDebug = require('debug') -createDebug.formatters.h = (v) => { - return v.toString('hex') -} - -// …elsewhere -const debug = createDebug('foo') -debug('this is hex: %h', new Buffer('hello world')) -// foo this is hex: 68656c6c6f20776f726c6421 +0ms -``` - - -## Browser Support - -You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), -or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), -if you don't want to build it yourself. - -Debug's enable state is currently persisted by `localStorage`. -Consider the situation shown below where you have `worker:a` and `worker:b`, -and wish to debug both. You can enable this using `localStorage.debug`: - -```js -localStorage.debug = 'worker:*' -``` - -And then refresh the page. - -```js -a = debug('worker:a'); -b = debug('worker:b'); - -setInterval(function(){ - a('doing some work'); -}, 1000); - -setInterval(function(){ - b('doing some work'); -}, 1200); -``` - -In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_. - - - -## Output streams - - By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: - -Example [_stdout.js_](./examples/node/stdout.js): - -```js -var debug = require('debug'); -var error = debug('app:error'); - -// by default stderr is used -error('goes to stderr!'); - -var log = debug('app:log'); -// set this namespace to log via console.log -log.log = console.log.bind(console); // don't forget to bind to console! -log('goes to stdout'); -error('still goes to stderr!'); - -// set all output to go via console.info -// overrides all per-namespace log settings -debug.log = console.info.bind(console); -error('now goes to stdout via console.info'); -log('still goes to stdout, but via console.info now'); -``` - -## Extend -You can simply extend debugger -```js -const log = require('debug')('auth'); - -//creates new debug instance with extended namespace -const logSign = log.extend('sign'); -const logLogin = log.extend('login'); - -log('hello'); // auth hello -logSign('hello'); //auth:sign hello -logLogin('hello'); //auth:login hello -``` - -## Set dynamically - -You can also enable debug dynamically by calling the `enable()` method : - -```js -let debug = require('debug'); - -console.log(1, debug.enabled('test')); - -debug.enable('test'); -console.log(2, debug.enabled('test')); - -debug.disable(); -console.log(3, debug.enabled('test')); - -``` - -print : -``` -1 false -2 true -3 false -``` - -Usage : -`enable(namespaces)` -`namespaces` can include modes separated by a colon and wildcards. - -Note that calling `enable()` completely overrides previously set DEBUG variable : - -``` -$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))' -=> false -``` - -`disable()` - -Will disable all namespaces. The functions returns the namespaces currently -enabled (and skipped). This can be useful if you want to disable debugging -temporarily without knowing what was enabled to begin with. - -For example: - -```js -let debug = require('debug'); -debug.enable('foo:*,-foo:bar'); -let namespaces = debug.disable(); -debug.enable(namespaces); -``` - -Note: There is no guarantee that the string will be identical to the initial -enable string, but semantically they will be identical. - -## Checking whether a debug target is enabled - -After you've created a debug instance, you can determine whether or not it is -enabled by checking the `enabled` property: - -```javascript -const debug = require('debug')('http'); - -if (debug.enabled) { - // do stuff... -} -``` - -You can also manually toggle this property to force the debug instance to be -enabled or disabled. - -## Usage in child processes - -Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process. -For example: - -```javascript -worker = fork(WORKER_WRAP_PATH, [workerPath], { - stdio: [ - /* stdin: */ 0, - /* stdout: */ 'pipe', - /* stderr: */ 'pipe', - 'ipc', - ], - env: Object.assign({}, process.env, { - DEBUG_COLORS: 1 // without this settings, colors won't be shown - }), -}); - -worker.stderr.pipe(process.stderr, { end: false }); -``` - - -## Authors - - - TJ Holowaychuk - - Nathan Rajlich - - Andrew Rhyne - - Josh Junon - -## Backers - -Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Sponsors - -Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## License - -(The MIT License) - -Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> -Copyright (c) 2018-2021 Josh Junon - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/router/node_modules/debug/package.json b/node_modules/router/node_modules/debug/package.json deleted file mode 100644 index ee8abb5..0000000 --- a/node_modules/router/node_modules/debug/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "debug", - "version": "4.4.3", - "repository": { - "type": "git", - "url": "git://github.com/debug-js/debug.git" - }, - "description": "Lightweight debugging utility for Node.js and the browser", - "keywords": [ - "debug", - "log", - "debugger" - ], - "files": [ - "src", - "LICENSE", - "README.md" - ], - "author": "Josh Junon (https://github.com/qix-)", - "contributors": [ - "TJ Holowaychuk ", - "Nathan Rajlich (http://n8.io)", - "Andrew Rhyne " - ], - "license": "MIT", - "scripts": { - "lint": "xo", - "test": "npm run test:node && npm run test:browser && npm run lint", - "test:node": "mocha test.js test.node.js", - "test:browser": "karma start --single-run", - "test:coverage": "cat ./coverage/lcov.info | coveralls" - }, - "dependencies": { - "ms": "^2.1.3" - }, - "devDependencies": { - "brfs": "^2.0.1", - "browserify": "^16.2.3", - "coveralls": "^3.0.2", - "karma": "^3.1.4", - "karma-browserify": "^6.0.0", - "karma-chrome-launcher": "^2.2.0", - "karma-mocha": "^1.3.0", - "mocha": "^5.2.0", - "mocha-lcov-reporter": "^1.2.0", - "sinon": "^14.0.0", - "xo": "^0.23.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - }, - "main": "./src/index.js", - "browser": "./src/browser.js", - "engines": { - "node": ">=6.0" - }, - "xo": { - "rules": { - "import/extensions": "off" - } - } -} diff --git a/node_modules/router/node_modules/debug/src/browser.js b/node_modules/router/node_modules/debug/src/browser.js deleted file mode 100644 index 5993451..0000000 --- a/node_modules/router/node_modules/debug/src/browser.js +++ /dev/null @@ -1,272 +0,0 @@ -/* eslint-env browser */ - -/** - * This is the web browser implementation of `debug()`. - */ - -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = localstorage(); -exports.destroy = (() => { - let warned = false; - - return () => { - if (!warned) { - warned = true; - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - }; -})(); - -/** - * Colors. - */ - -exports.colors = [ - '#0000CC', - '#0000FF', - '#0033CC', - '#0033FF', - '#0066CC', - '#0066FF', - '#0099CC', - '#0099FF', - '#00CC00', - '#00CC33', - '#00CC66', - '#00CC99', - '#00CCCC', - '#00CCFF', - '#3300CC', - '#3300FF', - '#3333CC', - '#3333FF', - '#3366CC', - '#3366FF', - '#3399CC', - '#3399FF', - '#33CC00', - '#33CC33', - '#33CC66', - '#33CC99', - '#33CCCC', - '#33CCFF', - '#6600CC', - '#6600FF', - '#6633CC', - '#6633FF', - '#66CC00', - '#66CC33', - '#9900CC', - '#9900FF', - '#9933CC', - '#9933FF', - '#99CC00', - '#99CC33', - '#CC0000', - '#CC0033', - '#CC0066', - '#CC0099', - '#CC00CC', - '#CC00FF', - '#CC3300', - '#CC3333', - '#CC3366', - '#CC3399', - '#CC33CC', - '#CC33FF', - '#CC6600', - '#CC6633', - '#CC9900', - '#CC9933', - '#CCCC00', - '#CCCC33', - '#FF0000', - '#FF0033', - '#FF0066', - '#FF0099', - '#FF00CC', - '#FF00FF', - '#FF3300', - '#FF3333', - '#FF3366', - '#FF3399', - '#FF33CC', - '#FF33FF', - '#FF6600', - '#FF6633', - '#FF9900', - '#FF9933', - '#FFCC00', - '#FFCC33' -]; - -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - -// eslint-disable-next-line complexity -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } - - // Internet Explorer and Edge do not support colors. - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - - let m; - - // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - // eslint-disable-next-line no-return-assign - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // Is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) || - // Double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); -} - -/** - * Colorize log arguments if enabled. - * - * @api public - */ - -function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + - this.namespace + - (this.useColors ? ' %c' : ' ') + - args[0] + - (this.useColors ? '%c ' : ' ') + - '+' + module.exports.humanize(this.diff); - - if (!this.useColors) { - return; - } - - const c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); - - // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, match => { - if (match === '%%') { - return; - } - index++; - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); -} - -/** - * Invokes `console.debug()` when available. - * No-op when `console.debug` is not a "function". - * If `console.debug` is not available, falls back - * to `console.log`. - * - * @api public - */ -exports.log = console.debug || console.log || (() => {}); - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ -function load() { - let r; - try { - r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } - - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; -} - -/** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - -function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} - -module.exports = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - -formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } -}; diff --git a/node_modules/router/node_modules/debug/src/common.js b/node_modules/router/node_modules/debug/src/common.js deleted file mode 100644 index 141cb57..0000000 --- a/node_modules/router/node_modules/debug/src/common.js +++ /dev/null @@ -1,292 +0,0 @@ - -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - */ - -function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = require('ms'); - createDebug.destroy = destroy; - - Object.keys(env).forEach(key => { - createDebug[key] = env[key]; - }); - - /** - * The currently active debug mode names, and names to skip. - */ - - createDebug.names = []; - createDebug.skips = []; - - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - createDebug.formatters = {}; - - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - function selectColor(namespace) { - let hash = 0; - - for (let i = 0; i < namespace.length; i++) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; - - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; - - function debug(...args) { - // Disabled? - if (!debug.enabled) { - return; - } - - const self = debug; - - // Set `diff` timestamp - const curr = Number(new Date()); - const ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - args[0] = createDebug.coerce(args[0]); - - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } - - // Apply any `formatters` transformations - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return '%'; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === 'function') { - const val = args[index]; - match = formatter.call(self, val); - - // Now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // Apply env-specific formatting (colors, etc.) - createDebug.formatArgs.call(self, args); - - const logFn = self.log || createDebug.log; - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.useColors = createDebug.useColors(); - debug.color = createDebug.selectColor(namespace); - debug.extend = extend; - debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. - - Object.defineProperty(debug, 'enabled', { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } - - return enabledCache; - }, - set: v => { - enableOverride = v; - } - }); - - // Env-specific initialization logic for debug instances - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } - - return debug; - } - - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; - - createDebug.names = []; - createDebug.skips = []; - - const split = (typeof namespaces === 'string' ? namespaces : '') - .trim() - .replace(/\s+/g, ',') - .split(',') - .filter(Boolean); - - for (const ns of split) { - if (ns[0] === '-') { - createDebug.skips.push(ns.slice(1)); - } else { - createDebug.names.push(ns); - } - } - } - - /** - * Checks if the given string matches a namespace template, honoring - * asterisks as wildcards. - * - * @param {String} search - * @param {String} template - * @return {Boolean} - */ - function matchesTemplate(search, template) { - let searchIndex = 0; - let templateIndex = 0; - let starIndex = -1; - let matchIndex = 0; - - while (searchIndex < search.length) { - if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) { - // Match character or proceed with wildcard - if (template[templateIndex] === '*') { - starIndex = templateIndex; - matchIndex = searchIndex; - templateIndex++; // Skip the '*' - } else { - searchIndex++; - templateIndex++; - } - } else if (starIndex !== -1) { // eslint-disable-line no-negated-condition - // Backtrack to the last '*' and try to match more characters - templateIndex = starIndex + 1; - matchIndex++; - searchIndex = matchIndex; - } else { - return false; // No match - } - } - - // Handle trailing '*' in template - while (templateIndex < template.length && template[templateIndex] === '*') { - templateIndex++; - } - - return templateIndex === template.length; - } - - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - function disable() { - const namespaces = [ - ...createDebug.names, - ...createDebug.skips.map(namespace => '-' + namespace) - ].join(','); - createDebug.enable(''); - return namespaces; - } - - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - function enabled(name) { - for (const skip of createDebug.skips) { - if (matchesTemplate(name, skip)) { - return false; - } - } - - for (const ns of createDebug.names) { - if (matchesTemplate(name, ns)) { - return true; - } - } - - return false; - } - - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } - - /** - * XXX DO NOT USE. This is a temporary stub function. - * XXX It WILL be removed in the next major release. - */ - function destroy() { - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - - createDebug.enable(createDebug.load()); - - return createDebug; -} - -module.exports = setup; diff --git a/node_modules/router/node_modules/debug/src/index.js b/node_modules/router/node_modules/debug/src/index.js deleted file mode 100644 index bf4c57f..0000000 --- a/node_modules/router/node_modules/debug/src/index.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Detect Electron renderer / nwjs process, which is node, but we should - * treat as a browser. - */ - -if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { - module.exports = require('./browser.js'); -} else { - module.exports = require('./node.js'); -} diff --git a/node_modules/router/node_modules/debug/src/node.js b/node_modules/router/node_modules/debug/src/node.js deleted file mode 100644 index 715560a..0000000 --- a/node_modules/router/node_modules/debug/src/node.js +++ /dev/null @@ -1,263 +0,0 @@ -/** - * Module dependencies. - */ - -const tty = require('tty'); -const util = require('util'); - -/** - * This is the Node.js implementation of `debug()`. - */ - -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.destroy = util.deprecate( - () => {}, - 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' -); - -/** - * Colors. - */ - -exports.colors = [6, 2, 3, 4, 5, 1]; - -try { - // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) - // eslint-disable-next-line import/no-extraneous-dependencies - const supportsColor = require('supports-color'); - - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } -} catch (error) { - // Swallow - we only care if `supports-color` is available; it doesn't have to be. -} - -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ - -exports.inspectOpts = Object.keys(process.env).filter(key => { - return /^debug_/i.test(key); -}).reduce((obj, key) => { - // Camel-case - const prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); - - // Coerce string value into JS value - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === 'null') { - val = null; - } else { - val = Number(val); - } - - obj[prop] = val; - return obj; -}, {}); - -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ - -function useColors() { - return 'colors' in exports.inspectOpts ? - Boolean(exports.inspectOpts.colors) : - tty.isatty(process.stderr.fd); -} - -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ - -function formatArgs(args) { - const {namespace: name, useColors} = this; - - if (useColors) { - const c = this.color; - const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); - const prefix = ` ${colorCode};1m${name} \u001B[0m`; - - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } -} - -function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } - return new Date().toISOString() + ' '; -} - -/** - * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr. - */ - -function log(...args) { - return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n'); -} - -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } -} - -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - -function load() { - return process.env.DEBUG; -} - -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ - -function init(debug) { - debug.inspectOpts = {}; - - const keys = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} - -module.exports = require('./common')(exports); - -const {formatters} = module.exports; - -/** - * Map %o to `util.inspect()`, all on a single line. - */ - -formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n') - .map(str => str.trim()) - .join(' '); -}; - -/** - * Map %O to `util.inspect()`, allowing multiple lines if needed. - */ - -formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; diff --git a/node_modules/router/package.json b/node_modules/router/package.json deleted file mode 100644 index 123eca2..0000000 --- a/node_modules/router/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "router", - "description": "Simple middleware-style router", - "version": "2.2.0", - "author": "Douglas Christopher Wilson ", - "contributors": [ - "Blake Embrey " - ], - "license": "MIT", - "repository": "pillarjs/router", - "dependencies": { - "debug": "^4.4.0", - "depd": "^2.0.0", - "is-promise": "^4.0.0", - "parseurl": "^1.3.3", - "path-to-regexp": "^8.0.0" - }, - "devDependencies": { - "finalhandler": "^2.1.0", - "mocha": "10.2.0", - "nyc": "15.1.0", - "run-series": "^1.1.9", - "standard": "^17.1.0", - "supertest": "6.3.3" - }, - "files": [ - "lib/", - "LICENSE", - "HISTORY.md", - "README.md", - "index.js" - ], - "engines": { - "node": ">= 18" - }, - "scripts": { - "lint": "standard", - "test": "mocha --reporter spec --bail --check-leaks test/", - "test:debug": "mocha --reporter spec --bail --check-leaks test/ --inspect --inspect-brk", - "test-ci": "nyc --reporter=lcov --reporter=text npm test", - "test-cov": "nyc --reporter=text npm test", - "version": "node scripts/version-history.js && git add HISTORY.md" - } -} diff --git a/node_modules/rxjs/CHANGELOG.md b/node_modules/rxjs/CHANGELOG.md deleted file mode 100644 index 0b681e2..0000000 --- a/node_modules/rxjs/CHANGELOG.md +++ /dev/null @@ -1,2750 +0,0 @@ -## [7.8.2](https://github.com/reactivex/rxjs/compare/7.8.1...7.8.2) (2025-02-22) - -### Bug Fixes - -- **animationFrameScheduler:** some tasks are never flushed and sometimes it breaks completely ([#7444](https://github.com/reactivex/rxjs/issues/7444)) ([8bbfa4e](https://github.com/reactivex/rxjs/commit/8bbfa4efd15f6572316d5b2b05b2f49ded69a3ca)) -- **mergeWith:** works correctly with an Array ([#7281](https://github.com/reactivex/rxjs/issues/7281)) ([27855c6](https://github.com/reactivex/rxjs/commit/27855c635ca74107352ae3336944433a328c0b41)) -- **subscriber:** strict type signature for next method ([#7172](https://github.com/reactivex/rxjs/issues/7172)) ([0e2ef5e](https://github.com/reactivex/rxjs/commit/0e2ef5e1142699b028bc3624aae9b24c3e3aaccf)) - -## [7.8.1](https://github.com/reactivex/rxjs/compare/7.8.0...7.8.1) (2023-04-26) - -### Bug Fixes - -- **asapScheduler:** No longer stops after scheduling twice during flush ([#7198](https://github.com/reactivex/rxjs/issues/7198)) ([1b52405](https://github.com/reactivex/rxjs/commit/1b524057b4db157814bfd04ad7d10c999afdccfa)), closes [ReactiveX#7196](https://github.com/ReactiveX/issues/7196) -- **throttle:** properly handle default ThrottleConfig values ([#7176](https://github.com/reactivex/rxjs/issues/7176)) ([ceb821c](https://github.com/reactivex/rxjs/commit/ceb821cfd81ca29b0d764b86a03f1e9f1eaa0999)) - -# [7.8.0](https://github.com/reactivex/rxjs/compare/7.7.0...7.8.0) (2022-12-15) - -### Features - -- **buffer:** `closingNotifier` now supports any `ObservableInput` ([#7073](https://github.com/reactivex/rxjs/issues/7073)) ([61b877a](https://github.com/reactivex/rxjs/commit/61b877a50c2557196a45e12622305c5a84fc3f0a)) -- **delayWhen:** `delayWhen`'s `delayDurationSelector` now supports any `ObservableInput` ([#7049](https://github.com/reactivex/rxjs/issues/7049)) ([dfd95db](https://github.com/reactivex/rxjs/commit/dfd95db952a6772d35d11bdd1974f2c4b4d68b25)) -- **sequenceEqual:** `compareTo` now supports any `ObservableInput` ([#7102](https://github.com/reactivex/rxjs/issues/7102)) ([d501961](https://github.com/reactivex/rxjs/commit/d50196187710c7a0cad50703b2071fc3f2cabd3c)) -- **share:** `ShareConfig` factory properties now supports any `ObservableInput` ([#7093](https://github.com/reactivex/rxjs/issues/7093)) ([cc3995a](https://github.com/reactivex/rxjs/commit/cc3995a6f6baf9456ec11f749fe89bf61b9e2d62)) -- **skipUntil:** `notifier` now supports any `ObservableInput` ([#7091](https://github.com/reactivex/rxjs/issues/7091)) ([60d6c40](https://github.com/reactivex/rxjs/commit/60d6c40fb484903286feca2bbfa9fcb2cde720e2)) -- **window:** `windowBoundaries` now supports any `ObservableInput` ([#7088](https://github.com/reactivex/rxjs/issues/7088)) ([8c4347c](https://github.com/reactivex/rxjs/commit/8c4347c48f2432d7399c911d329fa74e0d6c6e8d)) - -# [7.7.0](https://github.com/reactivex/rxjs/compare/7.6.0...7.7.0) (2022-12-15) - -### Features - -- **distinct:** `flush` argument now supports any `ObservableInput` ([#7081](https://github.com/reactivex/rxjs/issues/7081)) ([74c9ebd](https://github.com/reactivex/rxjs/commit/74c9ebd818113f9f25f1fb2b9fee4a0eac121ae0)) -- **repeatWhen:** `notifier` supports `ObservableInput` ([#7103](https://github.com/reactivex/rxjs/issues/7103)) ([8f1b976](https://github.com/reactivex/rxjs/commit/8f1b976125c55a5e884317c2b463fd019662e6af)) -- **retryWhen:** `notifier` now supports any `ObservableInput` ([#7105](https://github.com/reactivex/rxjs/issues/7105)) ([794f806](https://github.com/reactivex/rxjs/commit/794f8064cf8fe754e9dfebeee0ffef0ac1562252)) -- **sample:** `notifier` now supports any `ObservableInput` ([#7104](https://github.com/reactivex/rxjs/issues/7104)) ([b18c2eb](https://github.com/reactivex/rxjs/commit/b18c2eb2bc8dc1a717c927f998028316eec83937)) - -# [7.6.0](https://github.com/reactivex/rxjs/compare/7.5.7...7.6.0) (2022-12-03) - -### Bug Fixes - -- **schedulers:** no longer cause TypeScript build failures when Node types aren't included ([c1a07b7](https://github.com/reactivex/rxjs/commit/c1a07b71ac050ab36b371ff7f18dc9a924fffc9f)) -- **types:** Improved subscribe and tap type overloads ([#6718](https://github.com/reactivex/rxjs/issues/6718)) ([af1a9f4](https://github.com/reactivex/rxjs/commit/af1a9f446a860883abaa36ace21345dc923e7e53)), closes [#6717](https://github.com/reactivex/rxjs/issues/6717) - -### Features - -- **onErrorResumeNextWith:** renamed `onErrorResumeNext` and exported from the top level. (`onErrorResumeNext` operator is stil available, but deprecated) ([#6755](https://github.com/reactivex/rxjs/issues/6755)) ([51e3b2c](https://github.com/reactivex/rxjs/commit/51e3b2c8ec28b5d30bca4c63ad69ce6942c2cdcc)) - -## [7.5.7](https://github.com/reactivex/rxjs/compare/7.5.6...7.5.7) (2022-09-25) - -### Bug Fixes - -- **schedulers:** improve performance of animationFrameScheduler and asapScheduler ([#7059](https://github.com/reactivex/rxjs/issues/7059)) ([c93aa60](https://github.com/reactivex/rxjs/commit/c93aa60e9f073297d959fa1fff9323e48872d47e)), closes [#7017](https://github.com/reactivex/rxjs/issues/7017), related to [#7018](https://github.com/reactivex/rxjs/issues/7018) and [#6674](https://github.com/reactivex/rxjs/issues/6674) - -### Performance Improvements - -- **animationFrames:** uses fewer Subscription instances ([#7060](https://github.com/reactivex/rxjs/issues/7060)) ([2d57b38](https://github.com/reactivex/rxjs/commit/2d57b38ec9f7ada838ee130ab75cd795b156c182)), closes [#7018](https://github.com/reactivex/rxjs/issues/7018) - -## [7.5.6](https://github.com/reactivex/rxjs/compare/7.5.5...7.5.6) (2022-07-11) - -### Bug Fixes - -- **share:** No longer results in a bad-state observable in an edge case where a synchronous source was shared and refCounted, and the result is subscribed to twice in a row synchronously. ([#7005](https://github.com/reactivex/rxjs/issues/7005)) ([5d4c1d9](https://github.com/reactivex/rxjs/commit/5d4c1d9a37b1347217223adb0d9e166fd85f67a9)) -- **share & connect:** `share` and `connect` no longer bundle scheduling code by default ([#6873](https://github.com/reactivex/rxjs/issues/6873)) ([9948dc2](https://github.com/reactivex/rxjs/commit/9948dc2f5577eaa4013de234f3552508918518c7)), closes [#6872](https://github.com/reactivex/rxjs/issues/6872) -- **exhaustAll:** Result will now complete properly when flattening all synchronous observables. ([#6911](https://github.com/reactivex/rxjs/issues/6911)) ([3c1c6b8](https://github.com/reactivex/rxjs/commit/3c1c6b8303028eebc7af31cfc5e5bad42a5b2da4)), closes [#6910](https://github.com/reactivex/rxjs/issues/6910) -- **TypeScript:** Now compatible with TypeScript 4.6 type checks ([#6895](https://github.com/reactivex/rxjs/issues/6895)) ([fce9aa1](https://github.com/reactivex/rxjs/commit/fce9aa12931796892673581761bba1f7ceafabff)) - -## [7.5.5](https://github.com/reactivex/rxjs/compare/7.5.4...7.5.5) (2022-03-08) - -### Bug Fixes - -- **package:** add types to exports ([#6802](https://github.com/reactivex/rxjs/issues/6802)) ([3750f75](https://github.com/reactivex/rxjs/commit/3750f75104bb82d870c53c0605c942e41245d79c)) -- **package:** add `require` export condition ([#6821](https://github.com/reactivex/rxjs/issues/6821)) ([c8955e4](https://github.com/reactivex/rxjs/commit/c8955e4c6a972135030fdfddc18a7a48337ae9c7)) -- **timeout:** no longer will timeout when receiving the first value synchronously ([#6865](https://github.com/reactivex/rxjs/issues/6865)) ([2330c96](https://github.com/reactivex/rxjs/commit/2330c9660b20f2e0cda0c4eeb36bb582b4a85186)), closes [#6862](https://github.com/reactivex/rxjs/issues/6862) - -### Performance Improvements - -- Don't clone observers unless you have to ([#6842](https://github.com/reactivex/rxjs/issues/6842)) ([3289d20](https://github.com/reactivex/rxjs/commit/3289d20ddc3a84d2aede8e3ab9962a8ef5d43c83)) - -## [7.5.4](https://github.com/reactivex/rxjs/compare/7.5.3...7.5.4) (2022-02-09) - -### Performance Improvements - -- removed code that would `bind` functions passed with observers to `subscribe`. ([#6815](https://github.com/reactivex/rxjs/issues/6815)) ([fb375a0](https://github.com/reactivex/rxjs/commit/fb375a0c5befd6852cd63d3c310448e42fa9580e)), closes [#6783](https://github.com/reactivex/rxjs/issues/6783) - -## [7.5.3](https://github.com/reactivex/rxjs/compare/7.5.2...7.5.3) (2022-02-08) - -### Bug Fixes - -- **subscribe:** allow interop with Monio and other libraries that patch function bind ([0ab91eb](https://github.com/reactivex/rxjs/commit/0ab91eb4c1da914efbf03a2732629914cd3398dc)), closes [#6783](https://github.com/reactivex/rxjs/issues/6783) - -## [7.5.2](https://github.com/reactivex/rxjs/compare/7.5.1...7.5.2) (2022-01-11) - -### Bug Fixes - -- operators that ignore input values now use `unknown` rather than `any`, which should resolve issues with eslint no-unsafe-argument ([#6738](https://github.com/reactivex/rxjs/issues/6738)) ([67cb317](https://github.com/reactivex/rxjs/commit/67cb317a7a6b9fdbd3d2e8fdbc2ac9ac7e57179c)), closes [#6536](https://github.com/reactivex/rxjs/issues/6536) -- **ajax:** crossDomain flag deprecated and properly reported to consumers ([#6710](https://github.com/reactivex/rxjs/issues/6710)) ([7fd0575](https://github.com/reactivex/rxjs/commit/7fd05756c595dddb288b732b00a90fcfb2a9080a)), closes [#6663](https://github.com/reactivex/rxjs/issues/6663) - -## [7.5.1](https://github.com/reactivex/rxjs/compare/7.5.0...7.5.1) (2021-12-28) - -### Bug Fixes - -- export supporting interfaces from top-level `rxjs` site. ([#6733](https://github.com/reactivex/rxjs/issues/6733)) ([299a1e1](https://github.com/reactivex/rxjs/commit/299a1e16f725edfc2e333c430e3a7dfc75dd94e7)) - -# [7.5.0](https://github.com/reactivex/rxjs/compare/7.4.0...7.5.0) (2021-12-27) - -### Bug Fixes - -- **takeWhile:** Now returns proper types when passed a `Boolean` constructor. ([#6633](https://github.com/reactivex/rxjs/issues/6633)) ([081ca2b](https://github.com/reactivex/rxjs/commit/081ca2ba7290aa3084c1477a6d4bcc573bf478f6)) -- **forEach:** properly unsubs after error in next handler ([#6677](https://github.com/reactivex/rxjs/issues/6677)) ([b9ab67d](https://github.com/reactivex/rxjs/commit/b9ab67d21ca9d227fcd1123bf80ab87ca9296af9)), closes [#6676](https://github.com/reactivex/rxjs/issues/6676) -- **WebSocketSubject:** handle slow WebSocket close ([#6708](https://github.com/reactivex/rxjs/issues/6708)) ([8cb201c](https://github.com/reactivex/rxjs/commit/8cb201cd42dd751b4185b94fe2d36c6bfda02fe2)), closes [#4650](https://github.com/reactivex/rxjs/issues/4650) [#3935](https://github.com/reactivex/rxjs/issues/3935) -- RxJS now supports tslib 2.x, rather than just 2.1.x ([#6692](https://github.com/reactivex/rxjs/issues/6692)) ([0b2495f](https://github.com/reactivex/rxjs/commit/0b2495f72e76627fdd19dd7a670dd74847d6449c)), closes [#6689](https://github.com/reactivex/rxjs/issues/6689) -- schedulers will no longer error while rescheduling and unsubscribing during flushes ([e35f589](https://github.com/reactivex/rxjs/commit/e35f589e2ca10ab2d2d69f7e9fe60727edc4c53d)), closes [#6672](https://github.com/reactivex/rxjs/issues/6672) - -### Features - -- **repeat:** now has configurable delay ([#6640](https://github.com/reactivex/rxjs/issues/6640)) ([6b7a534](https://github.com/reactivex/rxjs/commit/6b7a534f579f95f97f47eff74bdea9991ee85712)) - -# [7.4.0](https://github.com/reactivex/rxjs/compare/7.3.1...7.4.0) (2021-10-06) - -### Features - -- Add es2015 entries to the exports declaration to support Angular ([#6614](https://github.com/reactivex/rxjs/issues/6614)) ([268777b](https://github.com/reactivex/rxjs/commit/268777bc3a4fd0cf76882683b51809771741ddc3)), closes [/github.com/ReactiveX/rxjs/pull/6613#discussion_r716958551](https://github.com//github.com/ReactiveX/rxjs/pull/6613/issues/discussion_r716958551) - -## [7.3.1](https://github.com/reactivex/rxjs/compare/7.3.0...7.3.1) (2021-10-01) - -### Bug Fixes - -- **Schedulers:** Throwing a falsy error in a scheduled function no longer results in strange error objects. ([#6594](https://github.com/reactivex/rxjs/issues/6594)) ([c70fcc0](https://github.com/reactivex/rxjs/commit/c70fcc02b4b737709aba559bf36b030a47902ee4)) -- scheduling with Rx-provided schedulers will no longer leak action references ([#6562](https://github.com/reactivex/rxjs/issues/6562)) ([ff5a748](https://github.com/reactivex/rxjs/commit/ff5a748b31ee73a6517e2f4220c920c73fbdd1fc)), closes [#6561](https://github.com/reactivex/rxjs/issues/6561) -- **forkJoin:** now finalizes sources before emitting ([#6546](https://github.com/reactivex/rxjs/issues/6546)) ([c52ff2e](https://github.com/reactivex/rxjs/commit/c52ff2e3aae19cd0877adb63182c03b79427de96)), closes [#4914](https://github.com/reactivex/rxjs/issues/4914) -- **observeOn:** release action references on teardown ([321d205](https://github.com/reactivex/rxjs/commit/321d2052696a7c366786c1ef3be7ad2a98a55f62)) -- **types:** update schedule signature overload ([c61e57c](https://github.com/reactivex/rxjs/commit/c61e57c9c64a1525d034aea641f1b846737e1eee)) - -# [7.3.0](https://github.com/reactivex/rxjs/compare/7.2.0...7.3.0) (2021-07-28) - -### Bug Fixes - -- Expose `Connectable`, the return type of `connectable` ([#6531](https://github.com/reactivex/rxjs/issues/6531)) ([69f5bfa](https://github.com/reactivex/rxjs/commit/69f5bfae0eb2880a3d5cfb34db3a182182b325de)), closes [#6529](https://github.com/reactivex/rxjs/issues/6529) -- **AsyncSubject:** properly emits values during reentrant subscriptions ([#6522](https://github.com/reactivex/rxjs/issues/6522)) ([dd8bdf3](https://github.com/reactivex/rxjs/commit/dd8bdf3b18b596155b66029ef16ebabf989360c5)), closes [#6520](https://github.com/reactivex/rxjs/issues/6520) - -### Features - -- **retry:** Now supports configurable delay as a named argument ([#6421](https://github.com/reactivex/rxjs/issues/6421)) ([5f69795](https://github.com/reactivex/rxjs/commit/5f69795f4be035499cf223bf9a3d7352c4975291)) -- **tap:** Now supports subscribe, unsubscribe, and finalize handlers ([#6527](https://github.com/reactivex/rxjs/issues/6527)) ([eb26cbc](https://github.com/reactivex/rxjs/commit/eb26cbc4488c9953cdde565b598b1dbdeeeee9ea)) - -# [7.2.0](https://github.com/reactivex/rxjs/compare/7.1.0...7.2.0) (2021-07-05) - -### Bug Fixes - -- **debounceTime:** unschedule dangling task on unsubscribe before complete ([#6464](https://github.com/reactivex/rxjs/issues/6464)) ([7ab0a4c](https://github.com/reactivex/rxjs/commit/7ab0a4c649b1b54e763a726c4ffdc183b0b45b23)) -- **fromEvent:** Types now properly infer when resultSelector is provided ([#6447](https://github.com/reactivex/rxjs/issues/6447)) ([39b9d81](https://github.com/reactivex/rxjs/commit/39b9d818ef6ea033dc8e53800e3a220d56c76b4a)) - -### Features - -- Operators are all exported at the top level, from "rxjs". From here on out, we encourage top-level imports with RxJS. Importing from `rxjs/operators` will be deprecated soon. ([#6488](https://github.com/reactivex/rxjs/issues/6488)) ([512adc2](https://github.com/reactivex/rxjs/commit/512adc25f350660113275d8277d16b7f3eec1d49)), closes [#6242](https://github.com/reactivex/rxjs/issues/6242) - -# [7.1.0](https://github.com/reactivex/rxjs/compare/7.0.1...7.1.0) (2021-05-21) - -### Bug Fixes - -- returned operator functions from multicast operators `share`, `publish`, `publishReplay` are now referentially transparent. Meaning if you take the result of calling `publishReplay(3)` and pass it to more than one observable's `pipe` method, it will behave the same in each case, rather than having a cumulative effect, which was a regression introduced sometime in version 6. If you required this broken behavior, there is a workaround posted [here](https://github.com/ReactiveX/rxjs/pull/6410#issuecomment-846087374) ([#6410](https://github.com/reactivex/rxjs/issues/6410)) ([e2f2e51](https://github.com/reactivex/rxjs/commit/e2f2e516514bdeb76229e69c639f10f21bccafad)), closes [/github.com/ReactiveX/rxjs/pull/6410#issuecomment-846087374](https://github.com//github.com/ReactiveX/rxjs/pull/6410/issues/issuecomment-846087374) [#5411](https://github.com/reactivex/rxjs/issues/5411) - -### Features - -- All subjects now have an `observed` property. This will allow users to check whether a subject has current subscribers without us allowing access to the `observers` array, which is going to be made private in future versions. ([#6405](https://github.com/reactivex/rxjs/issues/6405)) ([f47425d](https://github.com/reactivex/rxjs/commit/f47425d349475231c0f3542bb6ecef16a63e933a)) -- **groupBy:** Support named arguments, support ObservableInputs for duration selector ([#5679](https://github.com/reactivex/rxjs/issues/5679)) ([7a99397](https://github.com/reactivex/rxjs/commit/7a9939773802c4f7948c6d868a8f75facdea9f37)) -- **share:** use another observable to control resets ([#6169](https://github.com/reactivex/rxjs/issues/6169)) ([12c3716](https://github.com/reactivex/rxjs/commit/12c3716cecbf01f353c980488bf18845177b37b6)) - -## [7.0.1](https://github.com/reactivex/rxjs/compare/7.0.0...7.0.1) (2021-05-12) - -### Bug Fixes - -- **bindCallback:** resulting function now recreated underlying Subject and is reusable once again. ([#6369](https://github.com/reactivex/rxjs/issues/6369)) ([abf2bc1](https://github.com/reactivex/rxjs/commit/abf2bc13e38406717127159c8c373b910223b562)) -- **retry:** properly handles retry counts smaller than `1`. ([#6359](https://github.com/reactivex/rxjs/issues/6359)) ([e797bd7](https://github.com/reactivex/rxjs/commit/e797bd70b1368e189df00d697504304a3a5ef1a8)) -- **share:** properly closes synchronous "firehose" sources. ([#6370](https://github.com/reactivex/rxjs/issues/6370)) ([2271a91](https://github.com/reactivex/rxjs/commit/2271a9180131a0becdbf789c1429ef741ace4b2f)) -- Observable teardowns now properly called if `useDeprecatedSynchronousErrorHandling` is `true`. ([#6365](https://github.com/reactivex/rxjs/issues/6365)) ([e19e104](https://github.com/reactivex/rxjs/commit/e19e104d011233d83bc10c37f1ee0b3ac6e15612)), closes [#6364](https://github.com/reactivex/rxjs/issues/6364) -- **Subscription:** properly release parent subscriptions when unsubscribed. ([#6352](https://github.com/reactivex/rxjs/issues/6352)) ([88331d2](https://github.com/reactivex/rxjs/commit/88331d2ecdcf0f81a0712b315ed810d4da7d4b97)), closes [#6351](https://github.com/reactivex/rxjs/issues/6351) [#6351](https://github.com/reactivex/rxjs/issues/6351) -- **node**: do not reference DOM-related imports to assist in node usage. ([#6305](https://github.com/reactivex/rxjs/issues/6305)) ([b24818e](https://github.com/reactivex/rxjs/commit/b24818e96775045c7485932bf33349471e8f1363)), closes [#6297](https://github.com/reactivex/rxjs/issues/6297) - -# [7.0.0](https://github.com/reactivex/rxjs/compare/7.0.0-rc.3...7.0.0) (2021-04-29) - -### Bug Fixes - -- VS code will now properly auto-import operators, et al ([#6276](https://github.com/reactivex/rxjs/issues/6276)) ([f43c728](https://github.com/reactivex/rxjs/commit/f43c72815f9ebe5ee3a8ed11513be0f541c9517d)), closes [#6067](https://github.com/reactivex/rxjs/issues/6067) -- **AjaxResponse:** add stricter `type` (`AjaxResponseType`) ([#6279](https://github.com/reactivex/rxjs/issues/6279)) ([839e192](https://github.com/reactivex/rxjs/commit/839e192b7d826d833d7ce941be97c3735bd19c0a)) - -# [7.0.0-rc.3](https://github.com/reactivex/rxjs/compare/7.0.0-rc.2...7.0.0-rc.3) (2021-04-28) - -### Bug Fixes - -- finalize behaves well with useDeprecatedSynchronousErrorHandling ([#6251](https://github.com/reactivex/rxjs/issues/6251)) ([e4bed2a](https://github.com/reactivex/rxjs/commit/e4bed2a2bad994f05a39246707d4f203412cebbd)), closes [#6250](https://github.com/reactivex/rxjs/issues/6250) -- resolve run-time errors when using deprecated sync error handling ([#6272](https://github.com/reactivex/rxjs/issues/6272)) ([35daaf7](https://github.com/reactivex/rxjs/commit/35daaf77d3a9a909a7ec22c362c97ac42a597f79)), closes [#6271](https://github.com/reactivex/rxjs/issues/6271) -- resolve issue that made users unable to assert `instanceof AjaxError`. ([#6275](https://github.com/reactivex/rxjs/issues/6275)) ([a7c2d29](https://github.com/reactivex/rxjs/commit/a7c2d297ad6b2f405ac312b38f6360e9a645d890)) - -### Features - -- add config object to connectable ([#6267](https://github.com/reactivex/rxjs/issues/6267)) ([4d98b40](https://github.com/reactivex/rxjs/commit/4d98b40f969d5f55381f9a178ef3c18e6850cf47)) - -### BREAKING CHANGES - -- Our very new creation function, `connectable`, now takes a configuration object instead of just the `Subject` instance. This was necessary to make sure it covered all use cases for what we were trying to replace in the deprecated multicasting operators. Apologies for the late-in-the-game change, but we know it's not widely used yet (it's new in v7), and we want to get it right. - -# [7.0.0-rc.2](https://github.com/reactivex/rxjs/compare/7.0.0-rc.1...7.0.0-rc.2) (2021-04-20) - -### Bug Fixes - -- **webSocket:** return the correct type for `WebSocketSubject` `multiplex` method([#6232](https://github.com/reactivex/rxjs/issues/6232)) ([33383b8](https://github.com/reactivex/rxjs/commit/33383b884d895fa77866362b8b00fd2e2c3597e6)) - -### Reverts - -- Revert "chore: Add typesVersions to package.json (#6229)" (#6241) ([304f3a7](https://github.com/reactivex/rxjs/commit/304f3a73e67871f9b37f39675e503174d3dcc23a)), closes [#6229](https://github.com/reactivex/rxjs/issues/6229) [#6241](https://github.com/reactivex/rxjs/issues/6241) - -# [7.0.0-rc.1](https://github.com/reactivex/rxjs/compare/7.0.0-rc.0...7.0.0-rc.1) (2021-04-19) - -### Bug Fixes - -- **TypeScript:** Add typesVersions definition to package.json in order to help VS Code find automatic imports. ([#6067](https://github.com/reactivex/rxjs/issues/6067)) ([659a623](https://github.com/reactivex/rxjs/commit/659a623c94bd6b210e9beb6bb6061be540b05538)) - -# [7.0.0-rc.0](https://github.com/reactivex/rxjs/compare/7.0.0-beta.15...7.0.0-rc.0) (2021-04-19) - -### Bug Fixes - -- **symbol:** revert unique symbol in [#5874](https://github.com/reactivex/rxjs/issues/5874) ([#6224](https://github.com/reactivex/rxjs/issues/6224)) ([3c49429](https://github.com/reactivex/rxjs/commit/3c49429fadc31ebaddd143d4412907edc50e32be)), closes [#5919](https://github.com/reactivex/rxjs/issues/5919) [#6178](https://github.com/reactivex/rxjs/issues/6178) [#6175](https://github.com/reactivex/rxjs/issues/6175) -- forkJoin/combineLatest return Observable if passed any ([#6227](https://github.com/reactivex/rxjs/issues/6227)) ([ce0a2fa](https://github.com/reactivex/rxjs/commit/ce0a2fa975e7c08de2bbf893010f2c25c090b1ca)), closes [#6226](https://github.com/reactivex/rxjs/issues/6226) -- **fromEvent:** match targets properly; fix result selector type ([#6208](https://github.com/reactivex/rxjs/issues/6208)) ([8412c73](https://github.com/reactivex/rxjs/commit/8412c739bb47cc45ec3f38327115301b4fcc0118)) -- **merge:** single array is not an array of sources ([#6211](https://github.com/reactivex/rxjs/issues/6211)) ([4e900dc](https://github.com/reactivex/rxjs/commit/4e900dc745b5fbd7659b104c49fb0fce4ae84707)) -- **pipe:** Ensure that `unknown` is inferred for 9+ arguments. ([#6212](https://github.com/reactivex/rxjs/issues/6212)) ([6fa819b](https://github.com/reactivex/rxjs/commit/6fa819beb91ba99dadd6262d6c13f7ddfd9470c5)) - -### Features - -- add (optional) defaultValue configuration to firstValueFrom and lastValueFrom ([#6204](https://github.com/reactivex/rxjs/issues/6204)) ([df51b04](https://github.com/reactivex/rxjs/commit/df51b04d7ec68a72b3a4b0d69c3bb29264c72611)) - -# [7.0.0-beta.15](https://github.com/reactivex/rxjs/compare/7.0.0-beta.14...7.0.0-beta.15) (2021-03-31) - -### Bug Fixes - -- **esm:** duplicate directory in export path ([#6194](https://github.com/reactivex/rxjs/issues/6194)) ([aa41462](https://github.com/reactivex/rxjs/commit/aa4146288ec6542754f41ffd260fa4d6936a4d22)) - -# [7.0.0-beta.14](https://github.com/reactivex/rxjs/compare/7.0.0-beta.13...7.0.0-beta.14) (2021-03-30) - -### Bug Fixes - -- **share:** No longer throws errors for reentrant observables ([#6151](https://github.com/reactivex/rxjs/issues/6151)) ([fc728cd](https://github.com/reactivex/rxjs/commit/fc728cdf2f395620cca347602e66f3d173c057b5)), closes [#6144](https://github.com/reactivex/rxjs/issues/6144) - -### Features - -- **ajax:** Now allows configuration of query string parameters, via a `params` option in the request configuration ([#6174](https://github.com/reactivex/rxjs/issues/6174)) ([980f4d4](https://github.com/reactivex/rxjs/commit/980f4d4bb6a3bc1513a4335ed124f4d11b93d251)) -- **esm:** Added exports within package.json to enable scoped package loading. ([#6192](https://github.com/reactivex/rxjs/issues/6192)) ([33a9f06](https://github.com/reactivex/rxjs/commit/33a9f06f2c59c8aef3bb583bdb7d61d08ab597a0)), closes [sveltejs/kit#612](https://github.com/sveltejs/kit/issues/612) [nodejs/node#27408](https://github.com/nodejs/node/issues/27408) -- **ReadableStreams:** RxJS now supports conversions for ReadableStreams e.g. `from(readableStream)`. ([#6163](https://github.com/reactivex/rxjs/issues/6163)) ([19d6502](https://github.com/reactivex/rxjs/commit/19d650223cf0e1964e893baca19f264154422a7d)) - -# [7.0.0-beta.13](https://github.com/reactivex/rxjs/compare/7.0.0-beta.12...7.0.0-beta.13) (2021-03-15) - -### Bug Fixes - -- **fromEvent:** throw if passed invalid target ([#6136](https://github.com/reactivex/rxjs/issues/6136)) ([317ba0c](https://github.com/reactivex/rxjs/commit/317ba0c9254e447385414e2c57e1d81760f88aa6)), closes [#5823](https://github.com/reactivex/rxjs/issues/5823) -- remove misused type parameter from static pipe ([#6119](https://github.com/reactivex/rxjs/issues/6119)) ([8dc7d17](https://github.com/reactivex/rxjs/commit/8dc7d1793b4067d9eedc42b28d49ace8296672f5)), closes [#5557](https://github.com/reactivex/rxjs/issues/5557) -- **Subscriber:** don't leak destination ([#6116](https://github.com/reactivex/rxjs/issues/6116)) ([5bba36c](https://github.com/reactivex/rxjs/commit/5bba36c6dde5b1b4b7e434104e716b233e5f402c)) -- **combineLatest:** POJO signature should match only ObservableInput values ([#6103](https://github.com/reactivex/rxjs/issues/6103)) ([d633494](https://github.com/reactivex/rxjs/commit/d633494dcdcabecda2c64ee84b8b6ceeaa2cb3d8)) -- **forkJoin:** POJO signature should match only ObservableInput values ([#6095](https://github.com/reactivex/rxjs/issues/6095)) ([566427e](https://github.com/reactivex/rxjs/commit/566427e88e597589f21b8cfb057dd13d5c61e0f2)) -- predicates that return `any` will now behave property with findIndex ([#6097](https://github.com/reactivex/rxjs/issues/6097)) ([c6f73d6](https://github.com/reactivex/rxjs/commit/c6f73d687e6b2142da4cab2a66047cc6dd123bf9)) -- remove misused type parameter from isObservable ([#6083](https://github.com/reactivex/rxjs/issues/6083)) ([f16b634](https://github.com/reactivex/rxjs/commit/f16b6341eef85009fc16de13623dc860d8d87778)) -- unhandled errors in observers correctly scheduled ([#6118](https://github.com/reactivex/rxjs/issues/6118)) ([c02ceb7](https://github.com/reactivex/rxjs/commit/c02ceb75e3de12fedbe270d5d323f508171f9cfd)) -- **defaultIfEmpty:** Allow `undefined` as an argument, require an argument ([4983760](https://github.com/reactivex/rxjs/commit/4983760b9179da27ddfcbf419ac5975cff9447c9)), closes [#6064](https://github.com/reactivex/rxjs/issues/6064) -- **elementAt:** Allow `defaultValue` of `undefined`. ([5bc1b3e](https://github.com/reactivex/rxjs/commit/5bc1b3e22deceb5ea5f1882c0f92f061c1c4792d)) -- **first:** Allow `defaultValue` of `undefined`. ([62a6bbe](https://github.com/reactivex/rxjs/commit/62a6bbe1c3c51468c57e4e8f754c1c09da2db51b)) -- **last:** Allow `defaultValue` of `undefined`. ([ef3e721](https://github.com/reactivex/rxjs/commit/ef3e721f440132cf199f662b6a987349a0a70418)) - -### Features - -- rename and alias `combineLatest` as `combineLatestAll` for consistency ([#6079](https://github.com/reactivex/rxjs/issues/6079)) ([42cee80](https://github.com/reactivex/rxjs/commit/42cee8045594779e8802b370c7244e6bbeeccaa3)), closes [#4590](https://github.com/reactivex/rxjs/issues/4590) - -### BREAKING CHANGES - -- **defaultIfEmpty:** `defaultIfEmpty` requires a value be passed. Will no longer convert `undefined` to `null` for no good reason. - -# [7.0.0-beta.12](https://github.com/reactivex/rxjs/compare/7.0.0-beta.11...7.0.0-beta.12) (2021-02-27) - -5bc8e3361 Fix/6052 ajax responseType should default to "json" (#6056) - -### Bug Fixes - -- **ajax**: `responseType` is now properly defaulted to `"json"` again. ([#6056](https://github.com/reactivex/rxjs/issues/6056)) ([5bc8e3361](https://github.com/reactivex/rxjs/commit/5bc8e3361)) -- Corner case resolved where an error thrown in a completion handler might delay teardown if it happened to be after a completing operator like `take`. ([#6062](https://github.com/reactivex/rxjs/issues/6062)) ([a2b9563](https://github.com/reactivex/rxjs/commit/a2b95631be882d2cf0fd87f43804d1ed699591d7)) -- **AsyncGenerator support**: consumed async generators are now properly finalized. ([#6062](https://github.com/reactivex/rxjs/issues/6062)) ([a2b9563](https://github.com/reactivex/rxjs/commit/a2b95631be882d2cf0fd87f43804d1ed699591d7)), closes [#5998](https://github.com/reactivex/rxjs/issues/5998) -- **throttle:** no longer emits more than necessary in sync/sync trailing case ([#6059](https://github.com/reactivex/rxjs/issues/6059)) ([9da638a](https://github.com/reactivex/rxjs/commit/9da638a70d5abb862439ab4ee6a55368228811b0)), closes [#6058](https://github.com/reactivex/rxjs/issues/6058) - -# [7.0.0-beta.11](https://github.com/reactivex/rxjs/compare/7.0.0-beta.10...7.0.0-beta.11) (2021-02-24) - -### Bug Fixes - -- **ajax:** now errors on forced abort ([#6041](https://github.com/reactivex/rxjs/issues/6041)) ([d950921](https://github.com/reactivex/rxjs/commit/d95092143c1860eef054d27f2a1e50cb98b0ef58)), closes [#4251](https://github.com/reactivex/rxjs/issues/4251) -- **buffer:** closingNotifier completion does not complete resulting observable ([358ae84](https://github.com/reactivex/rxjs/commit/358ae84cb9d59170216e7e0845c192eb3e1dcb51)) -- **buffer:** Remaining buffer will correctly be emitted on source close. ([0c667d5](https://github.com/reactivex/rxjs/commit/0c667d596d4a14002ffe9d4db319ed7cd7442ada)), closes [#3990](https://github.com/reactivex/rxjs/issues/3990) [#6035](https://github.com/reactivex/rxjs/issues/6035) -- **debounceTime:** improves performance on quick succession of emits ([#6049](https://github.com/reactivex/rxjs/issues/6049)) ([9b70861](https://github.com/reactivex/rxjs/commit/9b708613cb7687647dc43c5e15b821e17ccc23ef)) -- **distinctUntilChanged:** Ensure reentrant code is compared properly ([#6014](https://github.com/reactivex/rxjs/issues/6014)) ([0ebcf17](https://github.com/reactivex/rxjs/commit/0ebcf1751a5359072b137ff197789570be4d7ead)) -- **share:** Ensure proper memory clean up ([1aa400a](https://github.com/reactivex/rxjs/commit/1aa400a5214325bc843a74602022a7912da20166)) -- **window:** final window stays open until source complete ([e8b05ef](https://github.com/reactivex/rxjs/commit/e8b05ef090d33af5b883e8020b8b7a3c4c8fa30e)) -- **concat/merge:** operators will finalize inners before moving to the next ([#6010](https://github.com/reactivex/rxjs/issues/6010)) ([5249a23](https://github.com/reactivex/rxjs/commit/5249a23b38bdda4639e9d669afd62a624172f89c)), closes [#3338](https://github.com/reactivex/rxjs/issues/3338) -- predicates that return `any` will now behave property in TS ([#5987](https://github.com/reactivex/rxjs/issues/5987)) ([f5ae97d](https://github.com/reactivex/rxjs/commit/f5ae97d49a35b9f99ac59f79dd244a6d8d6c8a7b)), closes [#5986](https://github.com/reactivex/rxjs/issues/5986) -- `publish` variants returning `ConnectableObservable` not properly utilizing lift ([#6003](https://github.com/reactivex/rxjs/issues/6003)) ([9acb950](https://github.com/reactivex/rxjs/commit/9acb950aec9efda95eb7492bfc47a33b71ef2e55)) -- Resolve issues with deprecated synchronous error handling and chained operators ([#5980](https://github.com/reactivex/rxjs/issues/5980)) ([0ad2802](https://github.com/reactivex/rxjs/commit/0ad2802a5aa9cd19875dc05c1cfb33f0b2f2c153)), closes [#5979](https://github.com/reactivex/rxjs/issues/5979) -- `useDeprecatedSynchronousErrorThrowing` honored for flattened sync sources ([#5984](https://github.com/reactivex/rxjs/issues/5984)) ([abd95ce](https://github.com/reactivex/rxjs/commit/abd95ce1aa81a64de81c074a72570a8f0949cd0d)), closes [#5983](https://github.com/reactivex/rxjs/issues/5983) - -### Features - -- **ajax:** Add option for streaming progress ([#6001](https://github.com/reactivex/rxjs/issues/6001)) ([873e52d](https://github.com/reactivex/rxjs/commit/873e52d0d67b0f8470e6290c6fbc35c571464aaf)) -- **exhaustAll:** renamed `exhaust` to `exhaustAll` ([#5639](https://github.com/reactivex/rxjs/issues/5639)) ([701c7d4](https://github.com/reactivex/rxjs/commit/701c7d48cf1c3e60941692010254d6a27fc70980)) - -### BREAKING CHANGES - -- **window:** The `windowBoundaries` observable no longer completes the result. It was only ever meant to notify of the window boundary. To get the same behavior as the old behavior, you would need to add an `endWith` and a `skipLast(1)` like so: `source$.pipe(window(notifier$.pipe(endWith(true))), skipLast(1))`. -- **buffer:** Final buffered values will now always be emitted. To get the same behavior as the previous release, you can use `endWith` and `skipLast(1)`, like so: `source$.pipe(buffer(notifier$.pipe(endWith(true))), skipLast(1))` -- **buffer:** `closingNotifier` completion no longer completes the result of `buffer`. If that is truly a desired behavior, then you should use `takeUntil`. Something like: `source$.pipe(buffer(notifier$), takeUntil(notifier$.pipe(ignoreElements(), endWith(true))))`, where `notifier$` is multicast, although there are many ways to compose this behavior. - -# [7.0.0-beta.10](https://github.com/reactivex/rxjs/compare/7.0.0-beta.9...7.0.0-beta.10) (2021-01-18) - -### Bug Fixes - -- **combineLatest:** Ensure `EMPTY` is returned if no observables are passed. ([#5963](https://github.com/reactivex/rxjs/issues/5963)) ([157c7e8](https://github.com/reactivex/rxjs/commit/157c7e8068befdfb26a9ba6ca770d38a66966ab5)), closes [#5962](https://github.com/reactivex/rxjs/issues/5962) -- **fromEvent:** fixed HasEventTargetAddRemove to support EventTarget types ([#5945](https://github.com/reactivex/rxjs/issues/5945)) ([5f022d7](https://github.com/reactivex/rxjs/commit/5f022d784570684632e6fd5ae247fc259ee34c4b)) - -### Features - -- **connect:** Adds new `connect` operator. ([9d53af0](https://github.com/reactivex/rxjs/commit/9d53af04103dbbb3bae40a4c511e2eebf117be09)) -- **connectable:** Adds `connectable` creation method ([f968a79](https://github.com/reactivex/rxjs/commit/f968a791c1b48f3100e925d700e8a0ecd69cc7e5)) -- **share:** Make `share` completely configurable. Also adds `SubjectLike`. ([2d600c7](https://github.com/reactivex/rxjs/commit/2d600c75c1065d862a2089dc1cd26007996b1c9d)) -- **TestScheduler:** add `expectObservable(a$).toEqual(b$)`. ([3372c72](https://github.com/reactivex/rxjs/commit/3372c72ed77a96e29a613a620e85f93bcf447920)) - -### Performance Improvements - -- ensure same hidden class for OperatorSubscriber ([#5878](https://github.com/reactivex/rxjs/issues/5878)) ([246b449](https://github.com/reactivex/rxjs/commit/246b44902acde3a80e659f362969e6e2f8b19ef2)) - -### BREAKING CHANGES - -- **share:** The TypeScript type `Subscribable` now only supports what is a valid return for `[Symbol.observable]()`. -- **share:** The TypeScript type `Observer` no longer incorrectly has an optional `closed` property. - -# [7.0.0-beta.9](https://github.com/reactivex/rxjs/compare/7.0.0-beta.8...7.0.0-beta.9) (2020-12-07) - -### Bug Fixes - -- **audit:** don't signal on complete ([54cb428](https://github.com/reactivex/rxjs/commit/54cb42823ceec4db469f6155de67993b67ec85be)) -- **bufferToggle:** don't signal on complete ([65686ff](https://github.com/reactivex/rxjs/commit/65686ffd23f2d5a5145f2b7c33ea739e9bb808cd)) -- **bufferWhen:** don't signal on complete ([a2ba364](https://github.com/reactivex/rxjs/commit/a2ba364ede3c69c7703795a744f57122b49eac40)) -- **debounce:** don't signal on complete ([c919c68](https://github.com/reactivex/rxjs/commit/c919c684ad63724f0b55ccc4561f847773d945c8)) -- **delayWhen:** no longer emits if duration selector is empty ([#5769](https://github.com/reactivex/rxjs/issues/5769)) ([0872341](https://github.com/reactivex/rxjs/commit/087234146760ab2c67a04f9f0b5494a93affadb7)), closes [#3665](https://github.com/reactivex/rxjs/issues/3665) -- **forkJoin:** ensure readonly array argument `forkJoin([a$, b$, c$] as const)` result is correct ([6baec53](https://github.com/reactivex/rxjs/commit/6baec536015253ac96827f2136ede17a324c634e)) -- **iif:** No longer allow accidental undefined arguments ([#5829](https://github.com/reactivex/rxjs/issues/5829)) ([23b98b4](https://github.com/reactivex/rxjs/commit/23b98b4e61c3284c81c07a8d810e8c3ec99ddfec)) -- **sample:** don't signal on complete ([95e0b70](https://github.com/reactivex/rxjs/commit/95e0b703caaf288657c7d722b9823458280be88b)) -- **Symbol.observable:** properly defined as a `unique symbol`. ([#5874](https://github.com/reactivex/rxjs/issues/5874)) ([374138e](https://github.com/reactivex/rxjs/commit/374138e09eb7ceb6f8da556c6c11dea1ba8cdbee)), closes [#5861](https://github.com/reactivex/rxjs/issues/5861) [#4415](https://github.com/reactivex/rxjs/issues/4415) -- **throttle:** don't signal on complete ([4af0227](https://github.com/reactivex/rxjs/commit/4af022753d6dd4e94bcfcf0cc6082bb2312a3f02)) -- **windowToggle:** don't signal on complete ([9cb56c4](https://github.com/reactivex/rxjs/commit/9cb56c45de289ef5b062f33971996bdb8414cf99)), closes [#5838](https://github.com/reactivex/rxjs/issues/5838) -- use empty object type in combineLatest/forkJoin sigs ([#5832](https://github.com/reactivex/rxjs/issues/5832)) ([22aaaa2](https://github.com/reactivex/rxjs/commit/22aaaa2f03dc721f850d9836243773c5310e85e8)) -- **withLatestFrom:** allow synchronous source ([#5828](https://github.com/reactivex/rxjs/issues/5828)) ([adbe65e](https://github.com/reactivex/rxjs/commit/adbe65e659bbf17f6ab20a9b30fcca0e4d76af9a)) - -### Features - -- stopped notification handler ([#5750](https://github.com/reactivex/rxjs/issues/5750)) ([cfa267b](https://github.com/reactivex/rxjs/commit/cfa267bc0916ede09c8b14aedcdb69a791055fb6)) -- support emoji in marble diagrams ([#5907](https://github.com/reactivex/rxjs/issues/5907)) ([1b4608c](https://github.com/reactivex/rxjs/commit/1b4608cea3a9db96d7a629ad5de0e100145c180e)) -- **filter:** improve type inference for filter(Boolean) ([#5831](https://github.com/reactivex/rxjs/issues/5831)) ([d2658fa](https://github.com/reactivex/rxjs/commit/d2658fa32d7a86ac1e0796c452df258fc5470f67)) - -### BREAKING CHANGES - -- **windowToggle:** the observable returned by the windowToggle operator's - closing selector must emit a next notification to close the window. - Complete notifications no longer close the window. -- **bufferToggle:** the observable returned by the bufferToggle operator's - closing selector must emit a next notification to close the buffer. - Complete notifications no longer close the buffer. -- **bufferWhen:** the observable returned by the bufferWhen operator's - closing selector must emit a next notification to close the buffer. - Complete notifications no longer close the buffer. -- **debounce:** the observable returned by the debounce operator's - duration selector must emit a next notification to end the duration. - Complete notifications no longer end the duration. -- **throttle:** the observable returned by the throttle operator's - duration selector must emit a next notification to end the duration. - Complete notifications no longer end the duration. -- **sample:** the sample operator's notifier observable must emit a next notification to effect a sample. Complete notifications no longer effect a sample. -- **audit:** the observable returned by the audit operator's duration selector must emit a next notification to end the duration. Complete notifications no longer end the duration. -- **Symbol.observable:** `rxjs@7` is only compatible with `@types/node@14.14.3` or higher and `symbol-observable@3.0.0` and higher. Older versions of `@types/node` incorrectly defined `Symbol.observable` and will be in conflict with `rxjs` and `symbol-observable@3.0.0`. -- **delayWhen:** `delayWhen` will no longer emit if the duration selector simply completes without a value. Notifiers must notify with a value, not a completion. -- **iif:** `iif` will no longer allow result arguments that are `undefined`. This was a bad call pattern that was likely an error in most cases. If for some reason you are relying on this behavior, simply substitute `EMPTY` in place of the `undefined` argument. This ensures that the behavior was intentional and desired, rather than the result of an accidental `undefined` argument. - -# [7.0.0-beta.8](https://github.com/reactivex/rxjs/compare/7.0.0-beta.7...7.0.0-beta.8) (2020-10-15) - -### Bug Fixes - -- **audit, auditTime:** audit and auditTime emit last value after source completes ([#5799](https://github.com/reactivex/rxjs/issues/5799)) ([643bc85](https://github.com/reactivex/rxjs/commit/643bc85ab17a15a5d96f8bef8f08c3987d16eb40)), closes [#5730](https://github.com/reactivex/rxjs/issues/5730) -- No longer allow invalid "Subscribable" type as valid observable source in `from` and others. ([258dddd](https://github.com/reactivex/rxjs/commit/258dddd8a392456e7d0b5ed9a7e294044f7c2518)), closes [#4532](https://github.com/reactivex/rxjs/issues/4532) -- **bindNodeCallback:** ensure underlying function is not called twice during subscription ([#5780](https://github.com/reactivex/rxjs/issues/5780)) ([74aa4b2](https://github.com/reactivex/rxjs/commit/74aa4b2ea6685f475329a8b8ecbcebed9adae547)) -- **delay:** Now properly handles Date and negative numbers ([#5719](https://github.com/reactivex/rxjs/issues/5719)) ([868c02b](https://github.com/reactivex/rxjs/commit/868c02b47bb6f4ec4cd1d68b5b474731c470f27e)), closes [#5232](https://github.com/reactivex/rxjs/issues/5232) -- **delayWhen:** only deprecates when subscriptionDelay presents ([#5797](https://github.com/reactivex/rxjs/issues/5797)) ([43d1731](https://github.com/reactivex/rxjs/commit/43d17311a521234375146029aa5c4709cb221344)) -- **every:** index properly increments in predicate ([5686f83](https://github.com/reactivex/rxjs/commit/5686f838fdc3da710d3f1eed1a6381791e3cc644)) -- **firstValueFrom:** now unsubscribes from source after first value is received ([#5813](https://github.com/reactivex/rxjs/issues/5813)) ([a321516](https://github.com/reactivex/rxjs/commit/a321516908aa036fb658395a372668a986af2504)), closes [#5811](https://github.com/reactivex/rxjs/issues/5811) -- **from:** objects that are thennable that happen to have a subscribe method will no longer error. ([789d6e3](https://github.com/reactivex/rxjs/commit/789d6e3d851d57ab3b4488381f702120fd079737)) -- **fromEvent:** now properly types JQuery event targets ([b5aa15a](https://github.com/reactivex/rxjs/commit/b5aa15a7f58377310438aa5957e1516749d36219)) -- **mergeScan:** no longer emits state again upon completion. ([#5805](https://github.com/reactivex/rxjs/issues/5805)) ([68c2894](https://github.com/reactivex/rxjs/commit/68c28943b4d2c51068fecbc359a68ca6982307bf)), closes [#5372](https://github.com/reactivex/rxjs/issues/5372) -- **throttle:** now supports synchronous duration selectors ([55e953e](https://github.com/reactivex/rxjs/commit/55e953e1f7b915e6c9072bf14a2febd5b8431393)), closes [#5658](https://github.com/reactivex/rxjs/issues/5658) -- **throttle:** trailing values will now emit after source completes ([d5fd69c](https://github.com/reactivex/rxjs/commit/d5fd69c123d2232335563eea95c69c07576d079d)) -- **timeout:** allows synchronous observable as a source ([84c5c0b](https://github.com/reactivex/rxjs/commit/84c5c0b9d9e0d1791ac2f066c26e462e822d73e1)), closes [#5746](https://github.com/reactivex/rxjs/issues/5746) -- **zip:** zip now accepts an array of arguments like its counterparts ([3123b67](https://github.com/reactivex/rxjs/commit/3123b670cca9b77919845333952ef70275ed6e90)) - -### Code Refactoring - -- **count:** Base off of `reduce`. ([98a6d09](https://github.com/reactivex/rxjs/commit/98a6d0991df2a28366ab8f34098109a67257c235)) -- **pairs:** Based off of `from` and `Object.entries` ([#5775](https://github.com/reactivex/rxjs/issues/5775)) ([d39f830](https://github.com/reactivex/rxjs/commit/d39f8309c33917cb7070c7432fcd382395e4211e)) - -### Features - -- **ajax:** now supports passing custom XSRF cookies in a custom header ([#5702](https://github.com/reactivex/rxjs/issues/5702)) ([1a2c2e4](https://github.com/reactivex/rxjs/commit/1a2c2e49482a460778ea92c7f6a92e58cc3e87bb)), closes [#4003](https://github.com/reactivex/rxjs/issues/4003) -- **switchScan:** add switchScan() operator ([#4442](https://github.com/reactivex/rxjs/issues/4442)) ([73fa910](https://github.com/reactivex/rxjs/commit/73fa910cb62eccbccc4b4249f9b2606095704328)), closes [#2931](https://github.com/reactivex/rxjs/issues/2931) - -### BREAKING CHANGES - -- **mergeScan:** `mergeScan` will no longer emit its inner state again upon completion. -- **pairs:** `pairs` will no longer function in IE without a polyfill for `Object.entries`. `pairs` itself is also deprecated in favor of users just using `from(Object.entries(obj))`. -- **zip:** Zipping a single array will now have a different result. This is an extreme corner-case, because it is very unlikely that anyone would want to zip an array with nothing at all. The workaround would be to wrap the array in another array `zip([[1,2,3]])`. But again, that's pretty weird. -- **count:** No longer passes `source` observable as a third argument to the predicate. That feature was rarely used, and of limited value. The workaround is to simply close over the source inside of the function if you need to access it in there. - -# [7.0.0-beta.7](https://github.com/reactivex/rxjs/compare/7.0.0-beta.5...7.0.0-beta.7) (2020-09-23) - -### Bug Fixes - -- **multicast:** and other publish variants will handle errors thrown in a selector appropriately ([bde8eda](https://github.com/reactivex/rxjs/commit/bde8eda09310463b05c5ec7d8a1dd1bafe9dba6f)) - -### Code Refactoring - -- **tap:** reduce the size of the implementation ([1222d5a](https://github.com/reactivex/rxjs/commit/1222d5a68faa9d3f3c9ad8f8d5db1440971502bd)) -- **Subscriber:** Massively untangle Subscriber and SafeSubscriber ([07902ca](https://github.com/reactivex/rxjs/commit/07902ca99ee828521ce238826f10b55e25fbf554)) - -### BREAKING CHANGES - -- **Subscriber:** `new Subscriber` no longer takes 0-3 arguments. To create a `Subscriber` with 0-3 arguments, use `Subscriber.create`. However, please note that there is little to no reason that you should be creating `Subscriber` references directly, and `Subscriber.create` and `new Subscriber` are both deprecated. - -# [7.0.0-beta.6](https://github.com/reactivex/rxjs/compare/7.0.0-beta.5...7.0.0-beta.6) (2020-09-23) - -### Bug Fixes - -- **AsyncSubject:** fixed reentrancy issue in complete ([9e00f11](https://github.com/reactivex/rxjs/commit/9e00f11e992d223edf1013d0a44c7cad41b72470)), closes [/github.com/ReactiveX/rxjs/pull/5729/files/30d429cf1b791db15c04a61f6a683e189b53fb3e#r492314703](https://github.com//github.com/ReactiveX/rxjs/pull/5729/files/30d429cf1b791db15c04a61f6a683e189b53fb3e/issues/r492314703) -- **delay:** proper handling of absolute time (`Date`) passed as an argument ([8ae89b1](https://github.com/reactivex/rxjs/commit/8ae89b19a095541eb3dfe6e6d9f26367486c435e)) -- **fromEvent:** properly teardown for ArrayLike targets ([066de74](https://github.com/reactivex/rxjs/commit/066de7408810864891b9fd16e05c6c8b4ca88087)) -- **ReplaySubject:** no longer buffers additional values after it's already stopped ([#5696](https://github.com/reactivex/rxjs/issues/5696)) ([a08232b](https://github.com/reactivex/rxjs/commit/a08232be6dcab74e94cfbb17cc5138050bcd6ddb)) -- **scan:** proper indexes when seed is not supplied ([f93fb9c](https://github.com/reactivex/rxjs/commit/f93fb9c1fb7434c97e1d156370756159c5f2b077)), closes [#4348](https://github.com/reactivex/rxjs/issues/4348) [#3879](https://github.com/reactivex/rxjs/issues/3879) -- **windowTime:** Passing no creation interval will now properly open new window when old one closes ([cbd0ac0](https://github.com/reactivex/rxjs/commit/cbd0ac0478730ec10172b57210e7d269d1ce62a2)) - -### Code Refactoring - -- **Massive Size Reduction:** reduced the size of all operator implementations as well as other utilities and types ([#5729](https://github.com/reactivex/rxjs/issues/5729)) ([4d3fc23](https://github.com/reactivex/rxjs/commit/fc41e13a1b9a05fc242c1369b4f597c931bd28b5)) - -### Features - -- **onUnhandledError:** configuration point added for unhandled errors ([#5681](https://github.com/reactivex/rxjs/issues/5681)) ([3485dd5](https://github.com/reactivex/rxjs/commit/3485dd5149b731e1103d2d070e3892735cbacef1)) -- **skipLast:** counts zero or less will mirror the source ([02e113b](https://github.com/reactivex/rxjs/commit/02e113b3345a9efe8f7c29f8b9c1c0d088aaf726)) - -### BREAKING CHANGES - -- **skipLast:** `skipLast` will no longer error when passed a negative number, rather it will simply return the source, as though `0` was passed. -- **map:** `thisArg` will now default to `undefined`. The previous default of `MapSubscriber` never made any sense. This will only affect code that calls map with a `function` and references `this` like so: `source.pipe(map(function () { console.log(this); }))`. There wasn't anything useful about doing this, so the breakage is expected to be very minimal. If anything we're no longer leaking an implementation detail. -- **onUnhandledError:** Errors that occur during setup of an observable subscription after the subscription has emitted an error or completed will now throw in their own call stack. Before it would call `console.warn`. This is potentially breaking in edge cases for node applications, which may be configured to terminate for unhandled exceptions. In the unlikely event this affects you, you can configure the behavior to `console.warn` in the new configuration setting like so: `import { config } from 'rxjs'; config.onUnhandledError = (err) => console.warn(err);` - -# [7.0.0-beta.5](https://github.com/reactivex/rxjs/compare/7.0.0-beta.4...7.0.0-beta.5) (2020-09-03) - -### Bug Fixes - -- **ajax:** Allow XHR to perform body serialization and set content-type where possible ([d8657ed](https://github.com/reactivex/rxjs/commit/d8657ede8d9620ac2a7d61557e1f1d0e89b0b52a)), closes [#2837](https://github.com/reactivex/rxjs/issues/2837) -- **ajax:** Do not mutate headers passed as arguments ([0d66ba4](https://github.com/reactivex/rxjs/commit/0d66ba458f07fba51cfc73440d01ef453c24cda7)), closes [#2801](https://github.com/reactivex/rxjs/issues/2801) -- **bindCallback:** now emits errors that happen after callback ([2bddd31](https://github.com/reactivex/rxjs/commit/2bddd317fad962ad375de4a04dd528b02479ec5b)) -- **bindNodeCallback:** now emits errors that happen after callback ([edc28cf](https://github.com/reactivex/rxjs/commit/edc28cfd13ba3d7fadc24ea3c20ec8ca5a19064d)) -- **buffer:** Ensure notifier is subscribed after source ([#5654](https://github.com/reactivex/rxjs/issues/5654)) ([c088b0e](https://github.com/reactivex/rxjs/commit/c088b0eca904ab835b23df629d472003d6a82561)), closes [#2195](https://github.com/reactivex/rxjs/issues/2195) [#1754](https://github.com/reactivex/rxjs/issues/1754) -- **catchError:** ensure proper handling of async return for synchronous source error handling ([#5627](https://github.com/reactivex/rxjs/issues/5627)) ([1b29d4b](https://github.com/reactivex/rxjs/commit/1b29d4b6d42e3d6b649f9f2c4bb718f343233d83)), closes [#5115](https://github.com/reactivex/rxjs/issues/5115) -- **catchError:** inner synchronous observables will properly terminate ([#5655](https://github.com/reactivex/rxjs/issues/5655)) ([d3fd2fb](https://github.com/reactivex/rxjs/commit/d3fd2fb2bd619b79d0c4afebc3c10299afbca262)) -- **errors:** Custom RxJS errors now all have a call stack ([#5686](https://github.com/reactivex/rxjs/issues/5686)) ([9bb046c](https://github.com/reactivex/rxjs/commit/9bb046c744cc1f9438a805849b655946e5793936)), closes [#4250](https://github.com/reactivex/rxjs/issues/4250) -- **onErrorResumeNext:** observables always finalized before moving to next source ([#5650](https://github.com/reactivex/rxjs/issues/5650)) ([ff68ad2](https://github.com/reactivex/rxjs/commit/ff68ad2caa3d275a23416984fab5570d3fed9458)) -- **package.json:** change homepage setting to official docs site. ([#5669](https://github.com/reactivex/rxjs/issues/5669)) ([e57c402](https://github.com/reactivex/rxjs/commit/e57c402b29288f61fe886b00e51817730bcb320b)) -- **repeat:** Ensure teardown happens between repeated synchronous obs… ([#5620](https://github.com/reactivex/rxjs/issues/5620)) ([0ca8a65](https://github.com/reactivex/rxjs/commit/0ca8a65b73aea93172366ca67207b53e3e3e77a8)) -- **repeatWhen:** Ensure teardown happens between repeat subscriptions ([#5625](https://github.com/reactivex/rxjs/issues/5625)) ([98356f4](https://github.com/reactivex/rxjs/commit/98356f4ebefdba1f5a14edbd96de1592694a01a8)) -- **retry:** Ensure teardown happens before resubscription with synchronous observables ([6f90597](https://github.com/reactivex/rxjs/commit/6f90597e51e038dabd8397b9f066ab4e3d344a5b)), closes [#5620](https://github.com/reactivex/rxjs/issues/5620) -- **retryWhen:** Ensure subscription tears down between retries ([#5623](https://github.com/reactivex/rxjs/issues/5623)) ([6752af7](https://github.com/reactivex/rxjs/commit/6752af7c1839baf3cd7ed9d024499de61a2477e9)) -- **throttleTime:** ensure the spacing between throttles is always at least the throttled amount ([#5687](https://github.com/reactivex/rxjs/issues/5687)) ([ea84fc4](https://github.com/reactivex/rxjs/commit/ea84fc4dce84e32598701f79d9449be00a05352c)), closes [#3712](https://github.com/reactivex/rxjs/issues/3712) [#4864](https://github.com/reactivex/rxjs/issues/4864) [#2727](https://github.com/reactivex/rxjs/issues/2727) [#4727](https://github.com/reactivex/rxjs/issues/4727) [#4429](https://github.com/reactivex/rxjs/issues/4429) -- **zip:** zip operators and functions are now able to zip all iterable sources ([#5688](https://github.com/reactivex/rxjs/issues/5688)) ([02c3a1b](https://github.com/reactivex/rxjs/commit/02c3a1b70c0e96b784a3c5c214c0f89c5ebdd696)), closes [#4304](https://github.com/reactivex/rxjs/issues/4304) -- `switchMap` and `exhaustMap` behave correctly with re-entrant code. ([c289688](https://github.com/reactivex/rxjs/commit/c289688f5e1f33ec21306b4d2f5539dd19f963f2)) -- **webSocket:** close websocket connection attempt on unsubscribe ([e1a671c](https://github.com/reactivex/rxjs/commit/e1a671cbd7f5a6ce547ed9ee6ce98c22264500f4)), closes [#4446](https://github.com/reactivex/rxjs/issues/4446) - -### Code Refactoring - -- **ajax:** Use simple Observable ([17b9add](https://github.com/reactivex/rxjs/commit/17b9add03a90aec6e708a87c0fc387745f0b9df6)) -- **Subscriber:** remove \_unsubscribeAndRecycle ([d879c3f](https://github.com/reactivex/rxjs/commit/d879c3f3ae4b1de5660d1613bb8b300e7194d581)) -- **VirtualTimeScheduler:** remove sortActions from public API ([#5657](https://github.com/reactivex/rxjs/issues/5657)) ([a468f88](https://github.com/reactivex/rxjs/commit/a468f881c8c02195b089889486d1a94fab2771e0)) - -### Features - -- **combineLatest:** add N-args signature for observable inputs ([#5488](https://github.com/reactivex/rxjs/issues/5488)) ([fcc47e7](https://github.com/reactivex/rxjs/commit/fcc47e75a4c811199c5071144172f4d06ffc7c70)) -- **Subscription:** `add` no longer returns unnecessary Subscription reference ([#5656](https://github.com/reactivex/rxjs/issues/5656)) ([4de604e](https://github.com/reactivex/rxjs/commit/4de604ea66261f597af11918aec53cd94590b30f)) -- **Subscription:** `remove` will now remove any teardown by reference ([#5659](https://github.com/reactivex/rxjs/issues/5659)) ([1531152](https://github.com/reactivex/rxjs/commit/15311529fa1b880ed469b6c253cd0be7ff2f98a1)) -- **throwError:** now accepts a factory to create the error ([#5647](https://github.com/reactivex/rxjs/issues/5647)) ([dad270a](https://github.com/reactivex/rxjs/commit/dad270afcf496de74b4392024191715d7dbef4f5)), closes [#5617](https://github.com/reactivex/rxjs/issues/5617) -- **useDeprecatedNextContext:** Puts deprecated next context behavior behind a flag ([dfdef5d](https://github.com/reactivex/rxjs/commit/dfdef5dcaf52363be59359786aef8bc733197b43)) -- support schedulers within run ([#5619](https://github.com/reactivex/rxjs/issues/5619)) ([c63de0d](https://github.com/reactivex/rxjs/commit/c63de0d380a923987aab587720473fad1d205d71)) - -### Performance Improvements - -- **SafeSubscriber:** avoid using `Object.create` ([40a9e77](https://github.com/reactivex/rxjs/commit/40a9e77fe3d75df9161ad0093f54750b70f57245)) - -### BREAKING CHANGES - -- **ajax:** - - `ajax` body serialization will now use default XHR behavior in all cases. If the body is a `Blob`, `ArrayBuffer`, any array buffer view (like a byte sequence, e.g. `Uint8Array`, etc), `FormData`, `URLSearchParams`, `string`, or `ReadableStream`, default handling is use. If the `body` is otherwise `typeof` `"object"`, then it will be converted to JSON via `JSON.stringify`, and the `Content-Type` header will be set to `application/json;charset=utf-8`. All other types will emit an error. - - The `Content-Type` header passed to `ajax` configuration no longer has any effect on the serialization behavior of the AJAX request. - - For TypeScript users, `AjaxRequest` is no longer the type that should be explicitly used to create an `ajax`. It is now `AjaxConfig`, although the two types are compatible, only `AjaxConfig` has `progressSubscriber` and `createXHR`. - -* **zip:** `zip` operators will no longer iterate provided iterables "as needed", instead the iterables will be treated as push-streams just like they would be everywhere else in RxJS. This means that passing an endless iterable will result in the thread locking up, as it will endlessly try to read from that iterable. This puts us in-line with all other Rx implementations. To work around this, it is probably best to use `map` or some combination of `map` and `zip`. For example, `zip(source$, iterator)` could be `source$.pipe(map(value => [value, iterator.next().value]))`. - -* **Subscription:** `add` no longer returns an unnecessary Subscription reference. This was done to prevent confusion caused by a legacy behavior. You can now add and remove functions and Subscriptions as teardowns to and from a `Subscription` using `add` and `remove` directly. Before this, `remove` only accepted subscriptions. - -* **RxJS Error types** Tests that are written with naive expectations against errors may fail now that errors have a proper `stack` property. In some testing frameworks, a deep equality check on two error instances will check the values in `stack`, which could be different. - -* **Undocumented Behaviors/APIs Removed**: - - - `unsubscribe` no longer available via the `this` context of observer functions. To reenable, set `config.useDeprecatedNextContext = true` on the rxjs `config` found at `import { config } from 'rxjs';`. Note that enabling this will result in a performance penalty for all consumer subscriptions. - - Leaked implementation detail `_unsubscribeAndRecycle` of `Subscriber` has been removed. Just use new `Subscription` objects - - Removed an undocumented behavior where passing a negative count argument to `retry` would result in an observable that repeats forever. - - An undocumented behavior where passing a negative count argument to `repeat` would result in an observable that repeats forever. - - The static `sortActions` method on `VirtualTimeScheduler` is no longer publicly exposed by our TS types. - -* **throwError:** In an extreme corner case for usage, `throwError` is no longer able to emit a function as an error directly. If you need to push a function as an error, you will have to use the factory function to return the function like so: `throwError(() => functionToEmit)`, in other words `throwError(() => () => console.log('called later'))`. - -# [7.0.0-beta.4](https://github.com/reactivex/rxjs/compare/7.0.0-beta.1...7.0.0-beta.4) (2020-08-02) - -### Bug Fixes - -- **ajax:** Partial observers passed to `progressSubscriber` will no longer error ([25d279f](https://github.com/reactivex/rxjs/commit/25d279f0b45d07f39bfb87b19bc7e2279df8b542)) -- **ajax:** Unparsable responses will no longer prevent full AjaxError from being thrown ([605ee55](https://github.com/reactivex/rxjs/commit/605ee550e5efc266b5dc5d3a9756c7c3b3968a61)) -- **animationFrames:** emit the timestamp from the rAF's callback ([#5438](https://github.com/reactivex/rxjs/issues/5438)) ([c980ae6](https://github.com/reactivex/rxjs/commit/c980ae65ee1b585e8ed66a366eb534ac3e50c205)) -- Ensure unsubscriptions/teardowns on internal subscribers are idempotent ([#5465](https://github.com/reactivex/rxjs/issues/5465)) ([3e39749](https://github.com/reactivex/rxjs/commit/3e39749a58ca663c17f5f0354b0f27532fb6d319)), closes [#5464](https://github.com/reactivex/rxjs/issues/5464) -- **timeout:** defer error creation until timeout occurs ([#5497](https://github.com/reactivex/rxjs/issues/5497)) ([3be9840](https://github.com/reactivex/rxjs/commit/3be98404fafd5a8de758deb4e0d103a7b60aa31e)), closes [#5491](https://github.com/reactivex/rxjs/issues/5491) - -### Code Refactoring - -- **ajax:** Drop support for IE10 and lower ([0eaadd6](https://github.com/reactivex/rxjs/commit/0eaadd60c716050f5e3701d513a028a9cd49085a)) -- **Observable:** Update property and method types ([#5572](https://github.com/reactivex/rxjs/issues/5572)) ([144b626](https://github.com/reactivex/rxjs/commit/144b626c3905640b4adeb2b97e722912eff1b264)) - -### Features - -- **combineLatest:** support for observable dictionaries ([#5022](https://github.com/reactivex/rxjs/issues/5022)) ([#5363](https://github.com/reactivex/rxjs/issues/5363)) ([f5278aa](https://github.com/reactivex/rxjs/commit/f5278aa89ea164caf5cf10e77d7bd00eff26fc0f)) -- **TestScheduler:** add an animate "run mode" helper ([#5607](https://github.com/reactivex/rxjs/issues/5607)) ([edd6731](https://github.com/reactivex/rxjs/commit/edd67313814bfc32e8a5129d8049e4d4678cd35d)) -- **timeout:** One timeout to rule them all ([def1d34](https://github.com/reactivex/rxjs/commit/def1d346b43008bc413a3ac985e1611bbbf62003)) - -### BREAKING CHANGES - -- **ajax:** In an extreme corner-case... If an error occurs, the responseType is `"json"`, we're in IE, and the `responseType` is not valid JSON, the `ajax` observable will no longer emit a syntax error, rather it will emit a full `AjaxError` with more details. -- **ajax:** Ajax implementation drops support for IE10 and lower. This puts us in-line with other implementations and helps clean up code in this area -- **Observable:** `lift` no longer exposed. It was _NEVER_ documented that end users of the library should be creating operators using `lift`. Lift has a [variety of issues](https://github.com/ReactiveX/rxjs/issues/5431) and was always an internal implementation detail of rxjs that might have been used by a few power users in the early days when it had the most value. The value of `lift`, originally, was that subclassed `Observable`s would compose through all operators that implemented lift. The reality is that feature is not widely known, used, or supported, and it was never documented as it was very experimental when it was first added. Until the end of v7, `lift` will remain on Observable. Standard JavaScript users will notice no difference. However, TypeScript users might see complaints about `lift` not being a member of observable. To workaround this issue there are two things you can do: 1. Rewrite your operators as [outlined in the documentation](https://rxjs.dev/guide/operators), such that they return `new Observable`. or 2. cast your observable as `any` and access `lift` that way. Method 1 is recommended if you do not want things to break when we move to version 8. - -# [7.0.0-beta.3](https://github.com/reactivex/rxjs/compare/7.0.0-beta.1...7.0.0-beta.3) (2020-07-30) - -### Bug Fixes - -- **perf:** Ensure unsubscriptions/teardowns on internal subscribers are idempotent ([#5465](https://github.com/reactivex/rxjs/issues/5465)) ([3e39749](https://github.com/reactivex/rxjs/commit/3e39749a58ca663c17f5f0354b0f27532fb6d319)), closes [#5464](https://github.com/reactivex/rxjs/issues/5464) -- **timeout:** defer error creation until timeout occurs ([#5497](https://github.com/reactivex/rxjs/issues/5497)) ([3be9840](https://github.com/reactivex/rxjs/commit/3be98404fafd5a8de758deb4e0d103a7b60aa31e)), closes [#5491](https://github.com/reactivex/rxjs/issues/5491) - -### Code Refactoring - -- **perf:** Reduce memory pressure by no longer retaining outer values across the majority of operators. ([#5610](https://github.com/reactivex/rxjs/pull/5610)) ([bff1827](https://github.com/ReactiveX/rxjs/commit/bff18272dca23938a5f5b57cec6eb8d8be5bfddf)) -- **Observable:** Update property and method types ([#5572](https://github.com/reactivex/rxjs/issues/5572)) ([144b626](https://github.com/reactivex/rxjs/commit/144b626c3905640b4adeb2b97e722912eff1b264)) - -### Features - -- **combineLatest:** support for observable dictionaries ([#5022](https://github.com/reactivex/rxjs/issues/5022)) ([#5363](https://github.com/reactivex/rxjs/issues/5363)) ([f5278aa](https://github.com/reactivex/rxjs/commit/f5278aa89ea164caf5cf10e77d7bd00eff26fc0f)) - -### BREAKING CHANGES - -- **Observable:** `lift` no longer exposed. It was _never_ documented that end users of the library should be creating operators using `lift`. Lift has a [variety of issues](https://github.com/ReactiveX/rxjs/issues/5431) and was always an internal implementation detail of rxjs that might have been used by a few power users in the early days when it had the most value. The value of `lift`, originally, was that subclassed `Observable`s would compose through all operators that implemented lift. The reality is that feature is not widely known, used, or supported, and it was never documented as it was very experimental when it was first added. Until the end of v7, `lift` will remain on Observable. Standard JavaScript users will notice no difference. However, TypeScript users might see complaints about `lift` not being a member of observable. To workaround this issue there are two things you can do: 1. Rewrite your operators as [outlined in the documentation](https://rxjs.dev/guide/operators), such that they return `new Observable`. or 2. cast your observable as `any` and access `lift` that way. It is recommended that operators be implemented in terms of functions that return `(source: Observable) => new Observable(...)`, per the documentation/guide. - -# [7.0.0-beta.2](https://github.com/reactivex/rxjs/compare/7.0.0-beta.1...7.0.0-beta.2) (2020-07-03) - -### Bug Fixes - -- **dependencies:** Move accidental dependency on `typedoc` to dev-dependencies. ([#5566](https://github.com/reactivex/rxjs/issues/5566)) ([45702bf](https://github.com/ReactiveX/rxjs/commit/45702bf6cd1b4a150f47b2a1d273f1ee31ca2482)) - -# [7.0.0-beta.1](https://github.com/reactivex/rxjs/compare/7.0.0-beta.0...7.0.0-beta.1) (2020-07-02) - -### Bug Fixes - -- **pluck:** operator breaks with null/undefined inputs. ([#5524](https://github.com/reactivex/rxjs/issues/5524)) ([c5f6550](https://github.com/reactivex/rxjs/commit/c5f65508505cf1f90560e6be76425e09c455bec3)) -- **shareReplay:** no longer misses synchronous values from source ([92452cc](https://github.com/reactivex/rxjs/commit/92452cc20021141aa0f047c7e5af569a413143e5)) -- **interop:** chain interop/safe subscriber unsubscriptions correctly ([#5472](https://github.com/reactivex/rxjs/issues/5472)) ([98ad0eb](https://github.com/reactivex/rxjs/commit/98ad0eba6bc079851b44951f3963e8aae0abf861)), closes [#5469](https://github.com/reactivex/rxjs/issues/5469) [#5311](https://github.com/reactivex/rxjs/issues/5311) [#2675](https://github.com/reactivex/rxjs/issues/2675) -- **finalize:** chain subscriptions for interop with finalize ([#5239](https://github.com/reactivex/rxjs/issues/5239)) ([04ba662](https://github.com/reactivex/rxjs/commit/04ba6621fe9e09238e1796217d04107e52dd36d5)), closes [#5237](https://github.com/reactivex/rxjs/issues/5237) [#5237](https://github.com/reactivex/rxjs/issues/5237) -- **animationFrameScheduler:** don't execute rescheduled animation frame and asap actions in flush ([#5399](https://github.com/reactivex/rxjs/issues/5399)) ([33c9c8c](https://github.com/reactivex/rxjs/commit/33c9c8cf7e247d4ad4d7318bfd02e8e5bedb0f40)), closes [#4972](https://github.com/reactivex/rxjs/issues/4972) [#5397](https://github.com/reactivex/rxjs/issues/5397) -- **iterables:** errors thrown from iterables now properly propagated ([#5444](https://github.com/reactivex/rxjs/issues/5444)) ([75d4c2f](https://github.com/reactivex/rxjs/commit/75d4c2f33d2e2121b2a316849044ad17ab28dbaf)) -- **finalize:** callback will be called after the source observable is torn down. ([0d7b7c1](https://github.com/reactivex/rxjs/commit/0d7b7c14e34eed43fb2ad1386281800fa3ae8aec)), closes [#5357](https://github.com/reactivex/rxjs/issues/5357) -- **Notification:** typing improvements ([#5478](https://github.com/reactivex/rxjs/issues/5478)) ([96868ac](https://github.com/reactivex/rxjs/commit/96868ac754c0147a9aa61182185f27224eb7f11a)) -- **TestScheduler:** support empty subscription marbles ([#5502](https://github.com/reactivex/rxjs/issues/5502)) ([e65696e](https://github.com/reactivex/rxjs/commit/e65696e2f7f7338659a873f6653026b33b9011a9)), closes [#5499](https://github.com/reactivex/rxjs/issues/5499) -- **expand:** now works properly with asynchronous schedulers ([294b27e](https://github.com/reactivex/rxjs/commit/294b27eb6a96e8edee3af35e6aaaef50628376e4)) -- **subscribeOn:** allow Infinity as valid delay ([#5500](https://github.com/reactivex/rxjs/issues/5500)) ([cd7d649](https://github.com/reactivex/rxjs/commit/cd7d64901e82fd7fb5e8407f1f30828906fac420)) -- **Subject:** resolve issue where Subject constructor errantly allowed an argument ([#5476](https://github.com/reactivex/rxjs/issues/5476)) ([e1d35dc](https://github.com/reactivex/rxjs/commit/e1d35dc258edea0237ef49a31f7b34c058755969)) -- **Subject:** no default generic ([e678e81](https://github.com/reactivex/rxjs/commit/e678e81ba80f5bcc27b0e956295ce2fc8dfe4576)) -- **defer:** No longer allows `() => undefined` to observableFactory (#5449) ([1ae937a](https://github.com/reactivex/rxjs/commit/1ae937a8e594aef96b93313bb3c68ea910e6f528)), closes [#5449](https://github.com/reactivex/rxjs/issues/5449) -- **single:** Corrected behavior for `single(() => false)` on empty observables. (#5325) ([27931bc](https://github.com/reactivex/rxjs/commit/27931bcfd2aa864e277d3e72128c57e807b28bb0)), closes [#5325](https://github.com/reactivex/rxjs/issues/5325) -- **take/takeLast**: Properly assert number types at runtime (#5326) ([5efc474](https://github.com/reactivex/rxjs/commit/5efc474161c9196dbdf4803a9cc444a547067549)), closes [#5326](https://github.com/reactivex/rxjs/issues/5326) - -### Features - -- **Observable:** Remove async iteration ([#5492](https://github.com/reactivex/rxjs/issues/5492)) ([8f43e71](https://github.com/reactivex/rxjs/commit/8f43e71f5692119e57a7acc5817c146d0b288e8c)) -- **groupBy:** Add typeguards support for groupBy ([#5441](https://github.com/reactivex/rxjs/issues/5441)) ([da382da](https://github.com/reactivex/rxjs/commit/da382da4cdcc6e7ab1ffc6a499f4f7f5ea7de130)) -- **raceWith:** add raceWith, the renamed `race` operator ([#5303](https://github.com/reactivex/rxjs/issues/5303)) ([ca7f370](https://github.com/reactivex/rxjs/commit/ca7f370d8379f22526cfb17d40deff53e1358742)) -- **fetch:** add selector ([#5306](https://github.com/reactivex/rxjs/issues/5306)) ([99b5af1](https://github.com/reactivex/rxjs/commit/99b5af1af5d169d55d454ff8e27d88105cee4b6f)), closes [#4744](https://github.com/reactivex/rxjs/issues/4744) -- **TimestampProvider:** Reduced scheduler footprint for default usage of shareReplay, timeInterval, and timestamp ([#4973](https://github.com/reactivex/rxjs/issues/4973)) ([b2e67e3](https://github.com/reactivex/rxjs/commit/b2e67e3139f0be1fb000ba42bb42c5ba60cc803a)) - -### BREAKING CHANGES - -- `Notification.createNext(undefined)` will no longer return the exact same reference every time. -- Type signatures tightened up around `Notification` and `dematerialize`, may uncover issues with invalid types passed to those operators. -- Experimental support for `for await` as been removed. Use https://github.com/benlesh/rxjs-for-await instead. -- `defer` no longer allows factories to return `void` or `undefined`. All factories passed to defer must return a proper `ObservableInput`, such as `Observable`, `Promise`, et al. To get the same behavior as you may have relied on previously, `return EMPTY` or `return of()` from the factory. -- `single` operator will now throw for scenarios where values coming in are either not present, or do not match the provided predicate. Error types have thrown have also been updated, please check documentation for changes. -- `take` and will now throw runtime error for arguments that are negative or NaN, this includes non-TS calls like `take()`. - -- `takeLast` now has runtime assertions that throw `TypeError`s for invalid arguments. Calling takeLast without arguments or with an argument that is `NaN` will throw a `TypeError` -- `ReplaySubject` no longer schedules emissions when a scheduler is provided. If you need that behavior, - please compose in `observeOn` using `pipe`, for example: `new ReplaySubject(2, 3000).pipe(observeOn(asap))` - -- `timestamp` operator accepts a `TimestampProvider`, which is any object with a `now` method - that returns a number. This means pulling in less code for the use of the `timestamp` operator. This may cause - issues with `TestScheduler` run mode. (Issue here: https://github.com/ReactiveX/rxjs/issues/5553) - -# [7.0.0-beta.0](https://github.com/reactivex/rxjs/compare/7.0.0-alpha.1...7.0.0-beta.0) (2020-04-03) - -### Bug Fixes - -- **mergeMapTo:** remove redundant/unused generic ([#5299](https://github.com/reactivex/rxjs/issues/5299)) ([d67b7da](https://github.com/reactivex/rxjs/commit/d67b7dafbacb3aac8f4dd7f215fe2d2c602f0d36)) -- **ajax:** AjaxTimeoutErrorImpl extends AjaxError ([#5226](https://github.com/reactivex/rxjs/issues/5226)) ([a8da8dc](https://github.com/reactivex/rxjs/commit/a8da8dcc899342d3bb6d2d913247d9e734095287)) -- **delay:** emit complete notification as soon as possible ([63b8797](https://github.com/reactivex/rxjs/commit/63b8797fbeed09eb675ea64b0b83607cef1367a9)), closes [#4249](https://github.com/reactivex/rxjs/issues/4249) -- **endWith:** will properly type N arguments ([#5246](https://github.com/reactivex/rxjs/issues/5246)) ([81ee1f7](https://github.com/reactivex/rxjs/commit/81ee1f72408854f4017615fe7949edf5dd50533b)) -- **fetch:** don't leak event listeners added to passed-in signals ([#5305](https://github.com/reactivex/rxjs/issues/5305)) ([d4d6c47](https://github.com/reactivex/rxjs/commit/d4d6c47d8abccc8cbe17e46192fc1eaa42d2d023)) -- **TestScheduler:** Subclassing TestScheduler needs RunHelpers ([#5138](https://github.com/reactivex/rxjs/issues/5138)) ([927d5d9](https://github.com/reactivex/rxjs/commit/927d5d90ab5f12a79cd50f7290b4f8df1e83ecfc)) -- **pipe:** Special handling for 0-arg case. ([#4936](https://github.com/reactivex/rxjs/issues/4936)) ([290fa51](https://github.com/reactivex/rxjs/commit/290fa51c44881f25f2fe4cf9885028396c7fd74c)) -- **pluck:** fix pluck's catch-all signature for better type safety ([#5192](https://github.com/reactivex/rxjs/issues/5192)) ([e0c5b7c](https://github.com/reactivex/rxjs/commit/e0c5b7c790bb9d99fa8bee26c805b5e70c1e456b)) -- **pluck:** param type now accepts number and symbol ([9697b69](https://github.com/reactivex/rxjs/commit/9697b695c23c3dcb614e6a70be63a94ffcd86ed9)) -- **startWith:** accepts N arguments and returns correct type ([#5247](https://github.com/reactivex/rxjs/issues/5247)) ([150ed8b](https://github.com/reactivex/rxjs/commit/150ed8b75909b0e0bb9dc8928287ebdc47e19c51)) -- **combineLatestWith:** and zipWith infer types from n-arguments ([#5257](https://github.com/reactivex/rxjs/issues/5257)) ([3e282a5](https://github.com/reactivex/rxjs/commit/3e282a58b1baf7aa03b17142f858bca09a542adf)) -- **race:** support N args in static race and ensure observable returned ([#5286](https://github.com/reactivex/rxjs/issues/5286)) ([6d901cb](https://github.com/reactivex/rxjs/commit/6d901cbb0c0f2aa3fc5a02ef895cc9e9a7a09243)) -- **toPromise:** correct toPromise return type ([#5072](https://github.com/reactivex/rxjs/issues/5072)) ([b1c3573](https://github.com/reactivex/rxjs/commit/b1c35738204b5b1a5d325a16e70cdbf25b523976)) -- **fromFetch:** don't reassign closed-over parameter in fromFetch ([#5234](https://github.com/reactivex/rxjs/issues/5234)) ([37d2d99](https://github.com/reactivex/rxjs/commit/37d2d99762264ef5faabc0ce4f56d7aab51806dc)), closes [#5233](https://github.com/reactivex/rxjs/issues/5233) [#5233](https://github.com/reactivex/rxjs/issues/5233) - -### Features - -- add `lastValueFrom` and `firstValueFrom` methods ([#5295](https://github.com/reactivex/rxjs/issues/5295)) ([e69b765](https://github.com/reactivex/rxjs/commit/e69b76584d6872b3c55aa1bdf39c8984e9d9b00e)) -- RxJS now supports first-class interop with AsyncIterables ([4fa9d01](https://github.com/reactivex/rxjs/commit/4fa9d016a83049d014d77b89c56301e42db16b4d)) -- **combineLatestWith:** adds `combineLatestWith` - renamed legacy `combineLatest` operator ([#5251](https://github.com/reactivex/rxjs/issues/5251)) ([6d7b146](https://github.com/reactivex/rxjs/commit/6d7b1469110b405405549c9b6c311d2621738353)) -- **retry:** add config to reset error count on successful emission ([#5280](https://github.com/reactivex/rxjs/issues/5280)) ([ab6e9fc](https://github.com/reactivex/rxjs/commit/ab6e9fc32c19c1f14f8f59459db75312e75b9351)) -- **zipWith:** add `zipWith` which is just a rename of legacy `zip` operator ([#5249](https://github.com/reactivex/rxjs/issues/5249)) ([86b6a27](https://github.com/reactivex/rxjs/commit/86b6a272fd48c4712adba78963e05bb759ecf4f9)) - -### BREAKING CHANGES - -- **startWith:** `startWith` will return incorrect types when called with more than 7 arguments and a scheduler. Passing scheduler to startWith is deprecated -- **toPromise:** toPromise return type now returns `T | undefined` in TypeScript, which is correct, but may break builds. - -# [7.0.0-alpha.1](https://github.com/reactivex/rxjs/compare/7.0.0-alpha.0...7.0.0-alpha.1) (2019-12-27) - -### Bug Fixes - -- chain subscriptions from observables that belong to other instances of RxJS (e.g. in node_modules) ([#5059](https://github.com/reactivex/rxjs/issues/5059)) ([d7f7078](https://github.com/reactivex/rxjs/commit/d7f7078)) -- clear subscription on `shareReplay` completion ([#5044](https://github.com/reactivex/rxjs/issues/5044)) ([35e600f](https://github.com/reactivex/rxjs/commit/35e600f)), closes [#5034](https://github.com/reactivex/rxjs/issues/5034) -- **closure:** Annotate next() for ReplaySubject ([#5088](https://github.com/reactivex/rxjs/issues/5088)) ([8687fbd](https://github.com/reactivex/rxjs/commit/8687fbd)) -- **closure:** static prop frameTimeFactor being collapsed when compiled with closure. ([39872c9](https://github.com/reactivex/rxjs/commit/39872c9)) -- **docs:** remove repetitive op3() in example ([#5043](https://github.com/reactivex/rxjs/issues/5043)) ([e17df33](https://github.com/reactivex/rxjs/commit/e17df33)) -- **filter:** Fix overload order for filter to support inferring the generic type ([#5024](https://github.com/reactivex/rxjs/issues/5024)) ([8255365](https://github.com/reactivex/rxjs/commit/8255365)) -- **fromFetch:** passing already aborted signal to init aborts fetch ([0e4849a](https://github.com/reactivex/rxjs/commit/0e4849a)) - -### Features - -- **concatWith:** adds concatWith ([#4988](https://github.com/reactivex/rxjs/issues/4988)) ([dc89736](https://github.com/reactivex/rxjs/commit/dc89736)) - -# [7.0.0-alpha.0](https://github.com/reactivex/rxjs/compare/6.5.2...7.0.0-alpha.0) (2019-09-18) - -### Bug Fixes - -- missing package.json in rxjs/fetch ([#5001](https://github.com/reactivex/rxjs/issues/5001)) ([f4bee07](https://github.com/reactivex/rxjs/commit/f4bee07)) -- **filter:** Resolve TS build failures for certain situations where Boolean is the predicate ([77c7dfd](https://github.com/reactivex/rxjs/commit/77c7dfd)) -- **pluck:** key union type strictness ([#4585](https://github.com/reactivex/rxjs/issues/4585)) ([bd5ec2d](https://github.com/reactivex/rxjs/commit/bd5ec2d)) -- **race:** ignore latter sources after first complete or error ([#4809](https://github.com/reactivex/rxjs/issues/4809)) ([f31c3df](https://github.com/reactivex/rxjs/commit/f31c3df)), closes [#4808](https://github.com/reactivex/rxjs/issues/4808) -- **scan/reduce:** Typings correct for mixed seed/value types ([#4858](https://github.com/reactivex/rxjs/issues/4858)) ([b89ebe5](https://github.com/reactivex/rxjs/commit/b89ebe5)) -- **scheduled:** import from relative paths ([#4832](https://github.com/reactivex/rxjs/issues/4832)) ([1d37a87](https://github.com/reactivex/rxjs/commit/1d37a87)) -- **TS:** Error impls now properly type `this` ([#4978](https://github.com/reactivex/rxjs/issues/4978)) ([7606dc7](https://github.com/reactivex/rxjs/commit/7606dc7)) -- **TS:** fix type inference for defaultIfEmpty. ([#4833](https://github.com/reactivex/rxjs/issues/4833)) ([9b5ce2f](https://github.com/reactivex/rxjs/commit/9b5ce2f)) -- **types:** add Boolean signature to filter ([#4961](https://github.com/reactivex/rxjs/issues/4961)) ([259853e](https://github.com/reactivex/rxjs/commit/259853e)), closes [#4959](https://github.com/reactivex/rxjs/issues/4959) [/github.com/ReactiveX/rxjs/issues/4959#issuecomment-520629091](https://github.com//github.com/ReactiveX/rxjs/issues/4959/issues/issuecomment-520629091) - -### Features - -- **animationFrames:** Adds an observable of animationFrames ([#5021](https://github.com/reactivex/rxjs/issues/5021)) ([6a4cd68](https://github.com/reactivex/rxjs/commit/6a4cd68)) -- **concat:** can infer N types ([6c0cbc4](https://github.com/reactivex/rxjs/commit/6c0cbc4)) -- **of:** Update of typings ([e8adbb5](https://github.com/reactivex/rxjs/commit/e8adbb5)) -- **rxjs-compat:** removed for v7 ([#4839](https://github.com/reactivex/rxjs/issues/4839)) ([79b1b95](https://github.com/reactivex/rxjs/commit/79b1b95)) -- **TestScheduler:** expose `frameTimeFactor` property ([#4977](https://github.com/reactivex/rxjs/issues/4977)) ([8c32ed0](https://github.com/reactivex/rxjs/commit/8c32ed0)) -- **TS:** Update to TypeScript 3.5.3 ([741a136](https://github.com/reactivex/rxjs/commit/741a136)) - -### BREAKING CHANGES - -- **concat:** Generic signature changed. Recommend not explicitly passing generics, just let inference do its job. If you must, cast with `as`. -- **of:** Generic signature changed, do not specify generics, allow them to be inferred or use `as` -- **of:** Use with more than 9 arguments, where the last argument is a `SchedulerLike` may result in the wrong type which includes the `SchedulerLike`, even though the run time implementation does not support that. Developers should be using `scheduled` instead -- **TS:** RxJS requires TS 3.5 -- **rxjs-compat:** `rxjs/Rx` is no longer a valid import site. -- **rxjs-compat:** `rxjs-compat` is not published for v7 (yet) -- **race:** `race()` will no longer subscribe to subsequent observables if a provided source synchronously errors or completes. This means side effects that might have occurred during subscription in those rare cases will no longer occur. - -## [6.5.3](https://github.com/reactivex/rxjs/compare/6.5.2...6.5.3) (2019-09-03) - -### Bug Fixes - -- **general:** Refactor modules so they don't show side effects in some tools ([#4769](https://github.com/reactivex/rxjs/issues/4769)) ([9829c5e0](https://github.com/reactivex/rxjs/commit/9829c5e0)) -- **defer:** restrict allowed factory types ([#4835](https://github.com/reactivex/rxjs/issues/4835)) ([40a22096](https://github.com/reactivex/rxjs/commit/40a22096)) - -## [6.5.2](https://github.com/reactivex/rxjs/compare/6.5.0...6.5.2) (2019-05-10) - -### Bug Fixes - -- **endWith:** wrap args - they are not observables - in of before concatenating ([#4735](https://github.com/reactivex/rxjs/issues/4735)) ([986be2f](https://github.com/reactivex/rxjs/commit/986be2f)) -- **forkJoin:** test for object literal ([#4741](https://github.com/reactivex/rxjs/issues/4741)) ([c11e1b3](https://github.com/reactivex/rxjs/commit/c11e1b3)), closes [#4737](https://github.com/reactivex/rxjs/issues/4737) [#4737](https://github.com/reactivex/rxjs/issues/4737) -- **Notification:** replace const enum ([#4556](https://github.com/reactivex/rxjs/issues/4556)) ([e460eec](https://github.com/reactivex/rxjs/commit/e460eec)), closes [#4538](https://github.com/reactivex/rxjs/issues/4538) -- **of:** remove deprecation comment to prevent false positive warning ([#4724](https://github.com/reactivex/rxjs/issues/4724)) ([da69c16](https://github.com/reactivex/rxjs/commit/da69c16)) -- **pairwise:** make it recursion-proof ([#4743](https://github.com/reactivex/rxjs/issues/4743)) ([21ab261](https://github.com/reactivex/rxjs/commit/21ab261)) -- **scan:** fixed declarations to properly support different return types ([#4598](https://github.com/reactivex/rxjs/issues/4598)) ([126d2b6](https://github.com/reactivex/rxjs/commit/126d2b6)) -- **Subscription:** Return Empty when teardown === null ([#4575](https://github.com/reactivex/rxjs/issues/4575)) ([ffc4e68](https://github.com/reactivex/rxjs/commit/ffc4e68)) -- **throttleTime:** emit single value with trailing enabled ([#4564](https://github.com/reactivex/rxjs/issues/4564)) ([fd690a6](https://github.com/reactivex/rxjs/commit/fd690a6)), closes [#2859](https://github.com/reactivex/rxjs/issues/2859) [#4491](https://github.com/reactivex/rxjs/issues/4491) -- **umd:** export fetch namespace ([#4738](https://github.com/reactivex/rxjs/issues/4738)) ([7926122](https://github.com/reactivex/rxjs/commit/7926122)) -- **fromFetch:** don't abort if fetch resolves ([#4742](https://github.com/reactivex/rxjs/issues/4742) ([ed8d771](https://github.com/reactivex/rxjs/commit/ed8d771)) - -## [6.5.1](https://github.com/reactivex/rxjs/compare/6.5.0...6.5.1) (2019-04-23) - -### Bug Fixes - -- **Notification:** replace const enum ([#4556](https://github.com/reactivex/rxjs/issues/4556)) ([e460eec](https://github.com/reactivex/rxjs/commit/e460eec)), closes [#4538](https://github.com/reactivex/rxjs/issues/4538) -- **throttleTime:** emit single value with trailing enabled ([#4564](https://github.com/reactivex/rxjs/issues/4564)) ([fd690a6](https://github.com/reactivex/rxjs/commit/fd690a6)), closes [#2859](https://github.com/reactivex/rxjs/issues/2859) [#4491](https://github.com/reactivex/rxjs/issues/4491) - -# [6.5.0](https://github.com/reactivex/rxjs/compare/6.4.0...6.5.0) (2019-04-23) - -### Bug Fixes - -- **docs-app:** remove stopWordFilter from lunr pipeline ([#4536](https://github.com/reactivex/rxjs/issues/4536)) ([9eaebd4](https://github.com/reactivex/rxjs/commit/9eaebd4)) -- **dtslint:** disable tests that break in TS@next ([#4705](https://github.com/reactivex/rxjs/issues/4705)) ([ecc73d2](https://github.com/reactivex/rxjs/commit/ecc73d2)) -- **index:** export NotificationKind ([#4514](https://github.com/reactivex/rxjs/issues/4514)) ([7125355](https://github.com/reactivex/rxjs/commit/7125355)), closes [#4513](https://github.com/reactivex/rxjs/issues/4513) -- **race:** better typings ([#4643](https://github.com/reactivex/rxjs/issues/4643)) ([fb9bc48](https://github.com/reactivex/rxjs/commit/fb9bc48)), closes [#4390](https://github.com/reactivex/rxjs/issues/4390) [#4642](https://github.com/reactivex/rxjs/issues/4642) -- **throwIfEmpty:** ensure result is retry-able ([c4f44b9](https://github.com/reactivex/rxjs/commit/c4f44b9)) -- **types:** Fixed signature for onErrorResumeNext ([#4603](https://github.com/reactivex/rxjs/issues/4603)) ([4dd0be0](https://github.com/reactivex/rxjs/commit/4dd0be0)) - -### Features - -- **combineLatest:** deprecated rest argument and scheduler signatures ([#4641](https://github.com/reactivex/rxjs/issues/4641)) ([6661c79](https://github.com/reactivex/rxjs/commit/6661c79)), closes [#4640](https://github.com/reactivex/rxjs/issues/4640) -- **fromFetch:** We now export a `fromFetch` static observable creation method from `rxjs/fetch`. Mirrors native `fetch` only it's lazy and cancellable via `Observable` interface. ([#4702](https://github.com/reactivex/rxjs/issues/4702)) ([5a1ef86](https://github.com/reactivex/rxjs/commit/5a1ef86)) -- **forkJoin:** accepts a dictionary of sources ([#4640](https://github.com/reactivex/rxjs/issues/4640)) ([b5a2ac9](https://github.com/reactivex/rxjs/commit/b5a2ac9)) -- **partition:** new `partition` observable creation function. Old `partition` operator is deprecated ([#4419](https://github.com/reactivex/rxjs/issues/4419)) ([#4685](https://github.com/reactivex/rxjs/issues/4685)) ([d5d6980](https://github.com/reactivex/rxjs/commit/d5d6980)) -- **scheduled:** Add `scheduled` creation function to use to create scheduled observable of values. Deprecate scheduled versions of `from`, `range`, et al. ([#4595](https://github.com/reactivex/rxjs/issues/4595)) ([f57e1fc](https://github.com/reactivex/rxjs/commit/f57e1fc)) - -### Performance Improvements - -- **Subscription:** improve parent management ([#4526](https://github.com/reactivex/rxjs/issues/4526)) ([06f1a25](https://github.com/reactivex/rxjs/commit/06f1a25)) - -# [6.4.0](https://github.com/reactivex/rxjs/compare/6.3.3...6.4.0) (2019-01-30) - -### Bug Fixes - -- **ajax:** Fix case-insensitive headers in HTTP request ([#4453](https://github.com/reactivex/rxjs/issues/4453)) ([673bf47](https://github.com/reactivex/rxjs/commit/673bf47)) -- **bundle:** closure to not rewrite polyfills for minification ([#4487](https://github.com/reactivex/rxjs/issues/4487)) ([a1fedb9](https://github.com/reactivex/rxjs/commit/a1fedb9)) -- **bundle:** don't export `operators` twice ([#4310](https://github.com/reactivex/rxjs/issues/4310)) ([2399f6e](https://github.com/reactivex/rxjs/commit/2399f6e)) -- **combineLatest:** improve typings for combineLatest ([#4470](https://github.com/reactivex/rxjs/issues/4470)) ([40c3d9f](https://github.com/reactivex/rxjs/commit/40c3d9f)) -- **compat:** remove internal from import locations ([#4498](https://github.com/reactivex/rxjs/issues/4498)) ([a6c0017](https://github.com/reactivex/rxjs/commit/a6c0017)), closes [#4070](https://github.com/reactivex/rxjs/issues/4070) -- **endWith:** ability to endWith different types ([#4183](https://github.com/reactivex/rxjs/issues/4183)) ([#4185](https://github.com/reactivex/rxjs/issues/4185)) ([83533d1](https://github.com/reactivex/rxjs/commit/83533d1)) -- **fromEventPattern:** improve typings for fromEventPattern ([#4496](https://github.com/reactivex/rxjs/issues/4496)) ([037f53d](https://github.com/reactivex/rxjs/commit/037f53d)) -- **Observable:** Fix Observable.subscribe to add operator TeardownLogic to returned Subscription. ([#4434](https://github.com/reactivex/rxjs/issues/4434)) ([f28955f](https://github.com/reactivex/rxjs/commit/f28955f)) -- **subscribe:** Deprecate null starting parameter signatures for subscribe ([#4202](https://github.com/reactivex/rxjs/issues/4202)) ([c85ddf6](https://github.com/reactivex/rxjs/commit/c85ddf6)) -- **combineLatest:** support passing union types ([ffda319](https://github.com/reactivex/rxjs/commit/ffda319)) -- **from:** support passing union types ([eb1d596](https://github.com/reactivex/rxjs/commit/eb1d596)) -- **withLatestFrom:** support passing union types ([1e19a24](https://github.com/reactivex/rxjs/commit/1e19a24)) -- **zip:** support passing union types ([0d87f52](https://github.com/reactivex/rxjs/commit/0d87f52)) -- **multicast:** support returning union types from projection ([e9e9041](https://github.com/reactivex/rxjs/commit/e9e9041)) -- **exhaustMap:** support returning union types from projection ([ff1f5dc](https://github.com/reactivex/rxjs/commit/ff1f5dc)) -- **merge:** support union type inference for merge operators ([c2ac39c](https://github.com/reactivex/rxjs/commit/c2ac39c)) -- **catchError:** support union type returns ([8350622](https://github.com/reactivex/rxjs/commit/8350622)) -- **switchMap:** support union type returns ([32d35fd](https://github.com/reactivex/rxjs/commit/32d35fd)) -- **defer:** support union types passed ([5aea50e](https://github.com/reactivex/rxjs/commit/5aea50e)) -- **race:** Update typings to support proper return types ([#4465](https://github.com/reactivex/rxjs/issues/4465)) ([0042846](https://github.com/reactivex/rxjs/commit/0042846)) -- **VirtualTimeScheduler:** rework flush so it won't lose actions ([#4433](https://github.com/reactivex/rxjs/issues/4433)) ([d068bc9](https://github.com/reactivex/rxjs/commit/d068bc9)) -- **WebSocketSubject:** fix subject failing to close socket ([#4446](https://github.com/reactivex/rxjs/issues/4446)) ([dcfa52b](https://github.com/reactivex/rxjs/commit/dcfa52b)) - -### Features - -- **shareReplay:** Add configuration object for named arguments, and add argument to support unsubscribing from source observable by `refCount` when all resulting subscriptions have unsubscribed. The default behavior is to leave the source subscription running. -- **mergeScan:** Add index to the accumulator function ([#4458](https://github.com/reactivex/rxjs/issues/4458)) ([f5e143d](https://github.com/reactivex/rxjs/commit/f5e143d)), closes [#4441](https://github.com/reactivex/rxjs/issues/4441) -- **range:** accept one argument ([#4360](https://github.com/reactivex/rxjs/issues/4360)) ([a388578](https://github.com/reactivex/rxjs/commit/a388578)) -- **takeWhile:** add an `inclusive` option to the operator which causes to emit final value ([#4115](https://github.com/reactivex/rxjs/issues/4115)) ([6e7f407](https://github.com/reactivex/rxjs/commit/6e7f407)) - -### Performance Improvements - -- **internal:** optimize Subscription#add() for the common case ([#4489](https://github.com/reactivex/rxjs/issues/4489)) ([bdd201c](https://github.com/reactivex/rxjs/commit/bdd201c)) -- **internal:** use strict equality for isObject() ([#4493](https://github.com/reactivex/rxjs/issues/4493)) ([fc84a00](https://github.com/reactivex/rxjs/commit/fc84a00)) -- **Subscription:** use `instanceof` to avoid megamorphic LoadIC ([#4499](https://github.com/reactivex/rxjs/issues/4499)) ([065b4e3](https://github.com/reactivex/rxjs/commit/065b4e3)) - - - -## [6.3.3](https://github.com/reactivex/rxjs/compare/6.3.2...6.3.3) (2018-09-25) - -### Bug Fixes - -- **pipe:** align static pipe to Observable pipe rest parameters overl… ([#4112](https://github.com/reactivex/rxjs/issues/4112)) ([8c607e9](https://github.com/reactivex/rxjs/commit/8c607e9)), closes [#4109](https://github.com/reactivex/rxjs/issues/4109) [#4109](https://github.com/reactivex/rxjs/issues/4109) -- **RxJS:** each instance of RxJS now has a unique Subscriber symbol ([0972c56](https://github.com/reactivex/rxjs/commit/0972c56)) -- **subscribe:** report errors that occur in subscribe after the initial error ([#4089](https://github.com/reactivex/rxjs/issues/4089)) ([9b4b2bc](https://github.com/reactivex/rxjs/commit/9b4b2bc)), closes [#3803](https://github.com/reactivex/rxjs/issues/3803) -- **Subscriber:** Can no longer subscribe to itself in a circular manner ([#4106](https://github.com/reactivex/rxjs/issues/4106)) ([e623ec6](https://github.com/reactivex/rxjs/commit/e623ec6)), closes [#4095](https://github.com/reactivex/rxjs/issues/4095) -- **Subscriber:** use only local Subscriber instances ([50ee0a7](https://github.com/reactivex/rxjs/commit/50ee0a7)) -- **TypeScript:** ensure RxJS builds with TS@next as well ([f03e790](https://github.com/reactivex/rxjs/commit/f03e790)) - - - -## [6.3.2](https://github.com/reactivex/rxjs/compare/6.3.1...6.3.2) (2018-09-04) - -### Bug Fixes - -- **node:** will no longer error mixing RxJS 6.3 and 6.2 ([#4078](https://github.com/reactivex/rxjs/issues/4078)) ([69d9ccf](https://github.com/reactivex/rxjs/commit/69d9ccf)), closes [#4077](https://github.com/reactivex/rxjs/issues/4077) - - - -## [6.3.1](https://github.com/reactivex/rxjs/compare/6.3.0...6.3.1) (2018-08-31) - -### Bug Fixes - -- **mergeMap:** fix nested mergeMaps ([#4072](https://github.com/reactivex/rxjs/issues/4072)) ([0ab701b](https://github.com/reactivex/rxjs/commit/0ab701b)), closes [#4071](https://github.com/reactivex/rxjs/issues/4071) - - - -# [6.3.0](https://github.com/reactivex/rxjs/compare/6.2.2...6.3.0) (2018-08-30) - -### Bug Fixes - -- **find:** unsubscribe from source when found ([#3968](https://github.com/reactivex/rxjs/issues/3968)) ([fd01f7b](https://github.com/reactivex/rxjs/commit/fd01f7b)) -- convert [@internal](https://github.com/internal) comment to JSDoc ([#3932](https://github.com/reactivex/rxjs/issues/3932)) ([f8a9d6e](https://github.com/reactivex/rxjs/commit/f8a9d6e)) -- **AjaxObservable:** notify with error if fails to parse json response ([#3139](https://github.com/reactivex/rxjs/issues/3139)) ([d8231e2](https://github.com/reactivex/rxjs/commit/d8231e2)), closes [#3138](https://github.com/reactivex/rxjs/issues/3138) -- **catchError:** stop listening to a synchronous inner-observable when unsubscribed ([456ef33](https://github.com/reactivex/rxjs/commit/456ef33)) -- **distinctUntilKeyChanged:** improved key typing with keyof T ([#3988](https://github.com/reactivex/rxjs/issues/3988)) ([4ec4ff1](https://github.com/reactivex/rxjs/commit/4ec4ff1)) -- **exhaustMap:** stop listening to a synchronous inner-observable when unsubscribed ([ee1a339](https://github.com/reactivex/rxjs/commit/ee1a339)) -- **find:** add undefined to return type ([#3970](https://github.com/reactivex/rxjs/issues/3970)) ([5a6c90f](https://github.com/reactivex/rxjs/commit/5a6c90f)), closes [#3969](https://github.com/reactivex/rxjs/issues/3969) -- **IE10:** Remove dependency on Object.setPrototypeOf ([#3967](https://github.com/reactivex/rxjs/issues/3967)) ([5c52a73](https://github.com/reactivex/rxjs/commit/5c52a73)), closes [#3966](https://github.com/reactivex/rxjs/issues/3966) -- **mergeAll:** add source subscription to composite before actually subscribing ([#2479](https://github.com/reactivex/rxjs/issues/2479)) ([40852ff](https://github.com/reactivex/rxjs/commit/40852ff)), closes [#2476](https://github.com/reactivex/rxjs/issues/2476) -- **mergeScan:** stop listening to a synchronous inner-observable when unsubscribed ([c4002f3](https://github.com/reactivex/rxjs/commit/c4002f3)) -- **Observable:** forEach will no longer next values after an error ([b4bad1f](https://github.com/reactivex/rxjs/commit/b4bad1f)) -- **Observable:** use more granular Observable exports in compat mode ([#3974](https://github.com/reactivex/rxjs/issues/3974)) ([3f75564](https://github.com/reactivex/rxjs/commit/3f75564)) -- **onErrorResumeNext:** stop listening to a synchronous inner-observable when unsubscribed ([1d14277](https://github.com/reactivex/rxjs/commit/1d14277)) -- **pipe:** replace rest parameters overload ([#3945](https://github.com/reactivex/rxjs/issues/3945)) ([872b0ec](https://github.com/reactivex/rxjs/commit/872b0ec)), closes [#3841](https://github.com/reactivex/rxjs/issues/3841) -- **skipUntil:** stop listening to a synchronous notifier after its first nexted value ([1c257db](https://github.com/reactivex/rxjs/commit/1c257db)) -- **startWith:** allow empty type signature and passing a different type ([b7866a0](https://github.com/reactivex/rxjs/commit/b7866a0)) -- **subscribable:** make subscribe() signature match Observable ([#4050](https://github.com/reactivex/rxjs/issues/4050)) ([865d8d7](https://github.com/reactivex/rxjs/commit/865d8d7)), closes [#3891](https://github.com/reactivex/rxjs/issues/3891) -- **subscriber:** unsubscribe parents on error/complete ([ad8131b](https://github.com/reactivex/rxjs/commit/ad8131b)) -- **switchMap:** stop listening to a synchronous inner-observable when unsubscribed ([260d52a](https://github.com/reactivex/rxjs/commit/260d52a)) -- **takeUntil:** takeUntil should subscribe to the source if notifier sync completes without emitting ([#4039](https://github.com/reactivex/rxjs/issues/4039)) ([21fd0b4](https://github.com/reactivex/rxjs/commit/21fd0b4)), closes [#3504](https://github.com/reactivex/rxjs/issues/3504) -- **testscheduler:** type arguments to Observable creation functions ([#3928](https://github.com/reactivex/rxjs/issues/3928)) ([0e30ef1](https://github.com/reactivex/rxjs/commit/0e30ef1)) - -### Features - -- **delayWhen:** add index to the selector function ([#2473](https://github.com/reactivex/rxjs/issues/2473)) ([0979d31](https://github.com/reactivex/rxjs/commit/0979d31)) -- **forEach:** deprecating passing promise constructor ([5178ab9](https://github.com/reactivex/rxjs/commit/5178ab9)) -- **TestScheduler:** Add subscription schedule to expectObservable ([#3997](https://github.com/reactivex/rxjs/issues/3997)) ([0d20255](https://github.com/reactivex/rxjs/commit/0d20255)) - - - -## [6.2.2](https://github.com/reactivex/rxjs/compare/6.2.1...6.2.2) (2018-07-13) - -### Bug Fixes - -- **first:** improved type guards for TypeScript ([3e12f7a](https://github.com/reactivex/rxjs/commit/3e12f7a)) -- **last:** improved type guards for TypeScript ([3e12f7a](https://github.com/reactivex/rxjs/commit/3e12f7a)) - - - -## [6.2.1](https://github.com/reactivex/rxjs/compare/6.2.0...6.2.1) (2018-06-12) - -### Bug Fixes - -- **ci:** do not trigger postbuild script on PR ([f82c085](https://github.com/reactivex/rxjs/commit/f82c085)) -- **delayWhen:** Emit source value if duration selector completes synchronously ([#3664](https://github.com/reactivex/rxjs/issues/3664)) ([2c43af7](https://github.com/reactivex/rxjs/commit/2c43af7)), closes [#3663](https://github.com/reactivex/rxjs/issues/3663) -- **docs:** fix broken github links ([#3802](https://github.com/reactivex/rxjs/issues/3802)) ([9f9bf9b](https://github.com/reactivex/rxjs/commit/9f9bf9b)) -- **docs:** fix code examples ([#3784](https://github.com/reactivex/rxjs/issues/3784)) ([a95441b](https://github.com/reactivex/rxjs/commit/a95441b)) -- **from:** Objects implementing Symbol.observable take precedence over other types ([80ceea0](https://github.com/reactivex/rxjs/commit/80ceea0)) -- **fromEvent:** Support React Native and node-compatible event sources. ([#3821](https://github.com/reactivex/rxjs/issues/3821)) ([1969f18](https://github.com/reactivex/rxjs/commit/1969f18)) -- **Observable.prototype.pipe:** TS typings now more correct for >8 parameters ([#3789](https://github.com/reactivex/rxjs/issues/3789)) ([ad010ea](https://github.com/reactivex/rxjs/commit/ad010ea)) -- **subscribe:** ignore syncError when deprecated ([#3749](https://github.com/reactivex/rxjs/issues/3749)) ([f94560c](https://github.com/reactivex/rxjs/commit/f94560c)) -- **Symbol.observable:** make observable declaration readonly ([#3697](https://github.com/reactivex/rxjs/issues/3697)) ([#3773](https://github.com/reactivex/rxjs/issues/3773)) ([e1c203f](https://github.com/reactivex/rxjs/commit/e1c203f)) -- **TypeScript:** resolved typings issue for TS 3.0 ([bf2cdeb](https://github.com/reactivex/rxjs/commit/bf2cdeb)) -- **typings:** allow bufferCreationInterval null for bufferTime ([#3734](https://github.com/reactivex/rxjs/issues/3734)) ([0bda9cd](https://github.com/reactivex/rxjs/commit/0bda9cd)), closes [#3728](https://github.com/reactivex/rxjs/issues/3728) - -### Performance Improvements - -- remove comments from js-files ([#3760](https://github.com/reactivex/rxjs/issues/3760)) ([bb2c334](https://github.com/reactivex/rxjs/commit/bb2c334)) - - - -# [6.2.0](https://github.com/ReactiveX/RxJS/compare/6.1.0...6.2.0) (2018-05-22) - -### Bug Fixes - -- **ajax:** Handle timeouts as errors ([#3653](https://github.com/ReactiveX/RxJS/issues/3653)) ([e4128ea](https://github.com/ReactiveX/RxJS/commit/e4128ea)) -- **ajax:** RxJS v6 TimeoutError is missing name property ([576d943](https://github.com/ReactiveX/RxJS/commit/576d943)) -- **isObservable:** Fix throwing error when testing isObservable(null) ([#3688](https://github.com/ReactiveX/RxJS/issues/3688)) ([c9acc61](https://github.com/ReactiveX/RxJS/commit/c9acc61)) -- **range:** Range should be same for every subscriber ([#3707](https://github.com/ReactiveX/RxJS/issues/3707)) ([9642133](https://github.com/ReactiveX/RxJS/commit/9642133)) -- **skipUntil:** fix skipUntil when innerSubscription is null ([#3686](https://github.com/ReactiveX/RxJS/issues/3686)) ([4226432](https://github.com/ReactiveX/RxJS/commit/4226432)) -- **TestScheduler:** restore run changes upon error ([27cb9b6](https://github.com/ReactiveX/RxJS/commit/27cb9b6)) -- **TimeoutError:** Add name to TimeoutError ([44042d0](https://github.com/ReactiveX/RxJS/commit/44042d0)) -- **WebSocketSubject:** Check to see if WebSocket exists in global scope ([#3694](https://github.com/ReactiveX/RxJS/issues/3694)) ([2db0788](https://github.com/ReactiveX/RxJS/commit/2db0788)) - -### Features - -- **endWith:** add new operator endWith ([#3679](https://github.com/ReactiveX/RxJS/issues/3679)) ([537fe7d](https://github.com/ReactiveX/RxJS/commit/537fe7d)) - - - -# [6.1.0](https://github.com/ReactiveX/RxJS/compare/6.0.0...6.1.0) (2018-05-03) - -### Bug Fixes - -- **audit:** will not crash if duration is synchronous ([#3608](https://github.com/ReactiveX/RxJS/issues/3608)) ([76b7e27](https://github.com/ReactiveX/RxJS/commit/76b7e27)), closes [#2743](https://github.com/ReactiveX/RxJS/issues/2743) -- **delay:** fix memory leak ([#3605](https://github.com/ReactiveX/RxJS/issues/3605)) ([96f05b0](https://github.com/ReactiveX/RxJS/commit/96f05b0)) - -### Features - -- **isObservable:** a new method for checking to see if an object is an RxJS Observable ([edb33e5](https://github.com/ReactiveX/RxJS/commit/edb33e5)) - - - -# [6.0.0](https://github.com/ReactiveX/RxJS/compare/6.0.0-uncanny-rc.7...v6.0.0) (2018-04-24) - -### Bug Fixes - -- **websocket:** no longer throws errors in operators applied to it ([#3577](https://github.com/ReactiveX/RxJS/issues/3577)) ([cb38ddf](https://github.com/ReactiveX/RxJS/commit/cb38ddf)) - -### Code Refactoring - -- **webSocket:** rename back to webSocket ala 5.0 ([#3590](https://github.com/ReactiveX/RxJS/issues/3590)) ([d5658fe](https://github.com/ReactiveX/RxJS/commit/d5658fe)) - -### Features - -- **testing:** Add testScheduler.run() helper ([2d5b3b2](https://github.com/ReactiveX/RxJS/commit/2d5b3b2)) -- **testing:** testScheduler.run() supports time progression syntax ([9322b7d](https://github.com/ReactiveX/RxJS/commit/9322b7d)) - -### BREAKING CHANGES - -- **webSocket:** UNBREAKING websocket to be named `webSocket` again, just like it was in 5.0. Now you should import from `rxjs/webSocket` - - - -# [6.0.0-uncanny-rc.7](https://github.com/ReactiveX/RxJS/compare/6.0.0-ucandoit-rc.6...v6.0.0-uncanny-rc.7) (2018-04-13) - -### Bug Fixes - -- **interop:** functions with `[Symbol.observable]` on them will now be accepted in operators like `mergeMap`, `from`, etc ([#3562](https://github.com/ReactiveX/RxJS/issues/3562)) ([c9570df](https://github.com/ReactiveX/RxJS/commit/c9570df)) -- **migrations:** change the version the migration applies to ([#3564](https://github.com/ReactiveX/RxJS/issues/3564)) ([9217a03](https://github.com/ReactiveX/RxJS/commit/9217a03)) -- **rxjs:** no longer requires `dom` lib ([#3566](https://github.com/ReactiveX/RxJS/issues/3566)) ([8b33ee2](https://github.com/ReactiveX/RxJS/commit/8b33ee2)) -- **throttleTime:** emit throttled values when complete if trailing=true ([#3559](https://github.com/ReactiveX/RxJS/issues/3559)) ([3e846f2](https://github.com/ReactiveX/RxJS/commit/3e846f2)), closes [#3351](https://github.com/ReactiveX/RxJS/issues/3351) -- **websocket:** export WebSocketSubject, WebSocketSubjectConfig from rxjs/websocket ([#3557](https://github.com/ReactiveX/RxJS/issues/3557)) ([c365405](https://github.com/ReactiveX/RxJS/commit/c365405)) - - - -# [6.0.0-ucandoit-rc.6](https://github.com/ReactiveX/RxJS/compare/6.0.0-uber-rc.5...v6.0.0-ucandoit-rc.6) (2018-04-13) - -### Bug Fixes - -- **migrations:** make sure collection.json is present ([63e10a8](https://github.com/ReactiveX/RxJS/commit/63e10a8)) - - - -# [6.0.0-uber-rc.5](https://github.com/ReactiveX/RxJS/compare/6.0.0-turbo-rc.4...6.0.0-uber-rc.5) (2018-04-13) - -### Bug Fixes - -- **migrations:** deploy compiled JS rather than just the TS files. ([9aed72f](https://github.com/ReactiveX/RxJS/commit/9aed72f)) - - - -# [6.0.0-turbo-rc.4](https://github.com/ReactiveX/RxJS/compare/6.0.0-terrific-rc.3...6.0.0-turbo-rc.4) (2018-04-12) - -### Bug Fixes - -- **groupBy:** reexporting the GroupedObservable type ([#3556](https://github.com/ReactiveX/RxJS/issues/3556)) ([12d4933](https://github.com/ReactiveX/RxJS/commit/12d4933)), closes [#3551](https://github.com/ReactiveX/RxJS/issues/3551) -- **migrations:** build now properly copies migration into package ([#3555](https://github.com/ReactiveX/RxJS/issues/3555)) ([329a145](https://github.com/ReactiveX/RxJS/commit/329a145)) - - - -# [6.0.0-terrific-rc.3](https://github.com/ReactiveX/RxJS/compare/6.0.0-tenacious-rc.2...v6.0.0-terrific-rc.3) (2018-04-11) - -### Features - -- **schematics:** add migration schematics for schematics users ([20a2f07](https://github.com/ReactiveX/RxJS/commit/20a2f07)) - - - -# [6.0.0-tenacious-rc.2](https://github.com/ReactiveX/RxJS/compare/6.0.0-tactical-rc.1...v6.0.0-tenacious-rc.2) (2018-04-11) - -### Bug Fixes - -- **compat:** fix first & last operators so undefined arguments won't create empty values ([#3542](https://github.com/ReactiveX/RxJS/issues/3542)) ([a327db2](https://github.com/ReactiveX/RxJS/commit/a327db2)) -- **node/TS:** eliminate incompatible types to protected properties ([#3544](https://github.com/ReactiveX/RxJS/issues/3544)) ([21dd3bd](https://github.com/ReactiveX/RxJS/commit/21dd3bd)) - -### BREAKING CHANGES - -- **NodeJS** Dropping support for non-LTS versions of Node. - - - -# [6.0.0-tactical-rc.1](https://github.com/ReactiveX/RxJS/compare/6.0.0-rc.0...6.0.0-tactical-rc.1) (2018-04-07) - -Why "tactical"? Because I _TOTALLY MEANT_ to ruin the release names by publishing an amazingly funny April Fool's joke about smooshMap. So this was "tactical". Super tactical. So very tactical. - -### Bug Fixes - -- **closure-compiler:** adds nocollapse to static members ([#3519](https://github.com/ReactiveX/RxJS/issues/3519)) ([8758a5d](https://github.com/ReactiveX/RxJS/commit/8758a5d)) -- **closure-compiler:** remove internal flag from \_isScalar ([#3520](https://github.com/ReactiveX/RxJS/issues/3520)) ([b3a657d](https://github.com/ReactiveX/RxJS/commit/b3a657d)) -- **closure-compiler:** remove top level throws ([#3518](https://github.com/ReactiveX/RxJS/issues/3518)) ([b069473](https://github.com/ReactiveX/RxJS/commit/b069473)) -- **closure-compiler:** removes bad \[@params](https://github.com/params) comments that caused issues ([#3521](https://github.com/ReactiveX/RxJS/issues/3521)) ([09c874c](https://github.com/ReactiveX/RxJS/commit/09c874c)) -- **compat:** deprecate Observable.if/throw ([#3527](https://github.com/ReactiveX/RxJS/issues/3527)) ([3116275](https://github.com/ReactiveX/RxJS/commit/3116275)) -- **compat:** export TeardownLogic ([#3532](https://github.com/ReactiveX/RxJS/issues/3532)) ([0c76e64](https://github.com/ReactiveX/RxJS/commit/0c76e64)), closes [#3531](https://github.com/ReactiveX/RxJS/issues/3531) -- **compat:** remove observable/scalar deep import as it wasn't previously available ([4566001](https://github.com/ReactiveX/RxJS/commit/4566001)) -- **Scheduler:** export but deprecate ([#3522](https://github.com/ReactiveX/RxJS/issues/3522)) ([a3e1fb8](https://github.com/ReactiveX/RxJS/commit/a3e1fb8)) -- **skipUntil:** properly manages notifier subscription ([889f84a](https://github.com/ReactiveX/RxJS/commit/889f84a)), closes [#1886](https://github.com/ReactiveX/RxJS/issues/1886) -- fix type mismatch in NodeStyleEventEmitter ([#3530](https://github.com/ReactiveX/RxJS/issues/3530)) ([3f51ddd](https://github.com/ReactiveX/RxJS/commit/3f51ddd)) -- **sourcemaps:** fix mappings for source maps so they will work ([#3523](https://github.com/ReactiveX/RxJS/issues/3523)) ([32e7f75](https://github.com/ReactiveX/RxJS/commit/32e7f75)), closes [#3479](https://github.com/ReactiveX/RxJS/issues/3479) - -### Features - -- **compat:** add Observable extension classes with static create() ([ecd7f68](https://github.com/ReactiveX/RxJS/commit/ecd7f68)) -- **compat:** add rxjs/interfaces exports ([ba5c266](https://github.com/ReactiveX/RxJS/commit/ba5c266)) - - - -# [6.0.0-rc.0](https://github.com/ReactiveX/RxJS/compare/6.0.0-beta.4...6.0.0-rc.0) (2018-03-31) - -### Bug Fixes - -- **ajax:** properly encode body with form data that includes URLs ([#3502](https://github.com/ReactiveX/RxJS/issues/3502)) ([4455d21](https://github.com/ReactiveX/RxJS/commit/4455d21)), closes [#2399](https://github.com/ReactiveX/RxJS/issues/2399) -- **bindNodeCallback:** better type inference ([932bb7a](https://github.com/ReactiveX/RxJS/commit/932bb7a)) -- **elementAt:** now allows falsy defaultValues ([13706e7](https://github.com/ReactiveX/RxJS/commit/13706e7)) -- **lint_perf:** fix lint issues with newer perf tests ([1013754](https://github.com/ReactiveX/RxJS/commit/1013754)) -- **throttle:** now properly trailing throttles for individual values ([#3505](https://github.com/ReactiveX/RxJS/issues/3505)) ([3db18d1](https://github.com/ReactiveX/RxJS/commit/3db18d1)), closes [#2864](https://github.com/ReactiveX/RxJS/issues/2864) - -### Features - -- **takeUntil:** no longer subscribes to source if notifier synchronously emits ([#3504](https://github.com/ReactiveX/RxJS/issues/3504)) ([7b8a3e3](https://github.com/ReactiveX/RxJS/commit/7b8a3e3)), closes [#2189](https://github.com/ReactiveX/RxJS/issues/2189) - -### Performance Improvements - -- **pluck,bufferTime,asObservable:** add performance tests for pluck(), bufferTime() and asObservable() operators ([#2491](https://github.com/ReactiveX/RxJS/issues/2491)) ([24506b3](https://github.com/ReactiveX/RxJS/commit/24506b3)) -- **ReplaySubject:** slightly improved performance ([#2677](https://github.com/ReactiveX/RxJS/issues/2677)) ([9fea36d](https://github.com/ReactiveX/RxJS/commit/9fea36d)) - -### BREAKING CHANGES - -- **throttle:** This changes the behavior of throttle, in particular - throttling with both leading and trailing behaviors set to true, to more - closely match the throttling behavior of lodash and other libraries. - Throttling now starts immediately after any emission from the - observable, and values will not be double emitted for both leading and - trailing values - - - -# [6.0.0-beta.4](https://github.com/ReactiveX/RxJS/compare/6.0.0-beta.3...v6.0.0-beta.4) (2018-03-29) - -### Bug Fixes - -- **bindCallback:** add better type overloads ([#3480](https://github.com/ReactiveX/RxJS/issues/3480)) ([037cf34](https://github.com/ReactiveX/RxJS/commit/037cf34)) -- **compat:** add IScheduler to compat/Scheduler ([0a67df6](https://github.com/ReactiveX/RxJS/commit/0a67df6)) - -### Features - -- **compat:** add all utilities to internal-compatibility ([a9ecfe7](https://github.com/ReactiveX/RxJS/commit/a9ecfe7)) -- **websocket:** Add serializer/deserializer config settings ([#3489](https://github.com/ReactiveX/RxJS/issues/3489)) ([8d44124](https://github.com/ReactiveX/RxJS/commit/8d44124)) - -### BREAKING CHANGES - -- **websocket:** WebSocketSubject will now JSON serialize all messages sent over it by default, to return to the old behavior, pass a config setting of `serializer: x => x` like so: `websocket({ url, serializer: x => x })` - - - -# [6.0.0-beta.3](https://github.com/ReactiveX/RxJS/compare/6.0.0-beta.1...6.0.0-beta.3) (2018-03-27) - -### Bug Fixes - -- **build:** update build-optimizer and point to correct sources ([6717a01](https://github.com/ReactiveX/RxJS/commit/6717a01)) -- **node:** Subscriber no longer trampled if from another copy of rxjs ([371b658](https://github.com/ReactiveX/RxJS/commit/371b658)) -- **Observable:** empty ctor returns valid Observable ([#3464](https://github.com/ReactiveX/RxJS/issues/3464)) ([58b8ebc](https://github.com/ReactiveX/RxJS/commit/58b8ebc)) -- **subscribeOn:** add subscribeOn back to the distribution ([d6556f2](https://github.com/ReactiveX/RxJS/commit/d6556f2)) - - - -# [6.0.0-beta.2](https://github.com/ReactiveX/RxJS/compare/6.0.0-beta.1...6.0.0-beta.2) (2018-03-24) - -### Bug Fixes - -- **build:** update build-optimizer and point to correct sources ([6717a01](https://github.com/ReactiveX/RxJS/commit/6717a01)) -- **Observable:** empty ctor returns valid Observable ([#3464](https://github.com/ReactiveX/RxJS/issues/3464)) ([58b8ebc](https://github.com/ReactiveX/RxJS/commit/58b8ebc)) -- **subscribeOn:** add subscribeOn back to the distribution ([d6556f2](https://github.com/ReactiveX/RxJS/commit/d6556f2)) - - - -# [6.0.0-beta.1](https://github.com/ReactiveX/RxJS/compare/6.0.0-beta.0...v6.0.0-beta.1) (2018-03-21) - -### Bug Fixes - -- remove duplicate Subscribable interface declaration ([#3450](https://github.com/ReactiveX/RxJS/issues/3450)) ([ac78d89](https://github.com/ReactiveX/RxJS/commit/ac78d89)) -- **compat:** add package.json for internal-compatibility package ([#3455](https://github.com/ReactiveX/RxJS/issues/3455)) ([3b306ed](https://github.com/ReactiveX/RxJS/commit/3b306ed)) -- **config.useDeprecatedSynchronousErrorThrowing:** reentrant error throwing no longer trapped ([#3449](https://github.com/ReactiveX/RxJS/issues/3449)) ([0892a2d](https://github.com/ReactiveX/RxJS/commit/0892a2d)), closes [#3161](https://github.com/ReactiveX/RxJS/issues/3161) - -### Features - -- **compat:** add interfaces export ([d8f8122](https://github.com/ReactiveX/RxJS/commit/d8f8122)) -- **compat:** add rxjs/observable/dom/\* APIs to compatibility package ([d9a618f](https://github.com/ReactiveX/RxJS/commit/d9a618f)) - - - -# [6.0.0-beta.0](https://github.com/ReactiveX/RxJS/compare/6.0.0-alpha.3...6.0.0-beta.0) (2018-03-16) - -### Bug Fixes - -- **AjaxObservable:** 1xx,2xx,3xx requests shouldn't error, only 4xx,5xx ([#3438](https://github.com/ReactiveX/RxJS/issues/3438)) ([2128932](https://github.com/ReactiveX/RxJS/commit/2128932)) -- **compat:** adjustments to get rxjs-compat to build correctly ([dea6964](https://github.com/ReactiveX/RxJS/commit/dea6964)) -- **config:** expose configuration via rxjs exports ([#3441](https://github.com/ReactiveX/RxJS/issues/3441)) ([4287424](https://github.com/ReactiveX/RxJS/commit/4287424)) -- **config:** make sure that Promise config is undefined initially ([#3440](https://github.com/ReactiveX/RxJS/issues/3440)) ([469afe8](https://github.com/ReactiveX/RxJS/commit/469afe8)) -- **ESM:** Add [operators|ajax|websocket|testing]/package.json for ESM support, fixes [#3227](https://github.com/ReactiveX/RxJS/issues/3227) ([#3356](https://github.com/ReactiveX/RxJS/issues/3356)) ([725dcb4](https://github.com/ReactiveX/RxJS/commit/725dcb4)) -- **forkJoin:** fix forkJoin typings for forkJoin(Observable[]) ([#3436](https://github.com/ReactiveX/RxJS/issues/3436)) ([17c7f8f](https://github.com/ReactiveX/RxJS/commit/17c7f8f)) -- **fromEvent:** Defines toString to fix Closure compilations ([#3417](https://github.com/ReactiveX/RxJS/issues/3417)) ([1558b43](https://github.com/ReactiveX/RxJS/commit/1558b43)) -- **fromEvent:** pass options in unsubscribe ([f1872b0](https://github.com/ReactiveX/RxJS/commit/f1872b0)), closes [#3349](https://github.com/ReactiveX/RxJS/issues/3349) -- **publishReplay:** type inference improved ([#3437](https://github.com/ReactiveX/RxJS/issues/3437)) ([dd7c9f1](https://github.com/ReactiveX/RxJS/commit/dd7c9f1)), closes [#3260](https://github.com/ReactiveX/RxJS/issues/3260) -- **rxjs:** add exports for symbols/interfaces that were missing ([#3380](https://github.com/ReactiveX/RxJS/issues/3380)) ([1622ee0](https://github.com/ReactiveX/RxJS/commit/1622ee0)) -- **rxjs:** make sure esm imports from index.js by default, not Rx.js ([#3316](https://github.com/ReactiveX/RxJS/issues/3316)) ([c2b00f4](https://github.com/ReactiveX/RxJS/commit/c2b00f4)), closes [#3315](https://github.com/ReactiveX/RxJS/issues/3315) -- **rxjs:** once again exports custom error types ([#3371](https://github.com/ReactiveX/RxJS/issues/3371)) ([4465a9f](https://github.com/ReactiveX/RxJS/commit/4465a9f)) -- **rxjs:** remove types.ts importing from itself. ([#3383](https://github.com/ReactiveX/RxJS/issues/3383)) ([8fd50ad](https://github.com/ReactiveX/RxJS/commit/8fd50ad)) -- **spec:** get tests running using compatibility package ([916e968](https://github.com/ReactiveX/RxJS/commit/916e968)) -- correct internal module paths to be systemjs compatible ([#3412](https://github.com/ReactiveX/RxJS/issues/3412)) ([35abc9d](https://github.com/ReactiveX/RxJS/commit/35abc9d)) -- **Symbol.iterator:** correctly handle case where Symbol constructor itself is not defined ([#3394](https://github.com/ReactiveX/RxJS/issues/3394)) ([6725be1](https://github.com/ReactiveX/RxJS/commit/6725be1)) -- **typings:** fixed some cases where multicast and publish would not return a ConnectableObservable ([#3320](https://github.com/ReactiveX/RxJS/issues/3320)) ([ddffecc](https://github.com/ReactiveX/RxJS/commit/ddffecc)) -- reexport Symbol.observable typings patch ([4c4d7b0](https://github.com/ReactiveX/RxJS/commit/4c4d7b0)) -- remove the root operators.ts because it overshadows operators/package.json ([184b6d4](https://github.com/ReactiveX/RxJS/commit/184b6d4)) - -### Code Refactoring - -- **Observable.if:** remove ts hacks from Observable ([f46f261](https://github.com/ReactiveX/RxJS/commit/f46f261)) -- **Rx.ts:** move Rx.ts to internal ([#3400](https://github.com/ReactiveX/RxJS/issues/3400)) ([7ad2119](https://github.com/ReactiveX/RxJS/commit/7ad2119)) - -### Features - -- **ajax:** default to opting into CORS ([#3442](https://github.com/ReactiveX/RxJS/issues/3442)) ([aa3bf57](https://github.com/ReactiveX/RxJS/commit/aa3bf57)), closes [#3273](https://github.com/ReactiveX/RxJS/issues/3273) -- **bindCallback:** remove result selector ([2535641](https://github.com/ReactiveX/RxJS/commit/2535641)) -- **bindNodeCallback:** remove resultSelector ([26e6e5c](https://github.com/ReactiveX/RxJS/commit/26e6e5c)) -- **compat:** add compatability package definition ([40aca82](https://github.com/ReactiveX/RxJS/commit/40aca82)) -- **compat:** add concat operator to compatibility layer ([6e84e78](https://github.com/ReactiveX/RxJS/commit/6e84e78)) -- **compat:** add legacy reexport compat layer for 'rxjs/Observable' and other top-level symbols ([70e562b](https://github.com/ReactiveX/RxJS/commit/70e562b)) -- **compat:** add Rx.ts to rxjs-compat ([df25de1](https://github.com/ReactiveX/RxJS/commit/df25de1)) -- **compat:** compatibility mode for combineLatest ([fd86df5](https://github.com/ReactiveX/RxJS/commit/fd86df5)) -- **compat:** compatibility mode for merge operator ([ffce980](https://github.com/ReactiveX/RxJS/commit/ffce980)) -- **compat:** compatibility mode for zip operator ([9f131d0](https://github.com/ReactiveX/RxJS/commit/9f131d0)) -- **compat:** make Rx.ts for compatability layer work as the default for rxjs-compat ([d43a4c2](https://github.com/ReactiveX/RxJS/commit/d43a4c2)) -- **compat:** set up correct imports & get build working for rxjs-comapt ([1a0dc97](https://github.com/ReactiveX/RxJS/commit/1a0dc97)) -- **deprecated-error-handling-warning:** add console warning when code sets the flag to bad mode ([49be56a](https://github.com/ReactiveX/RxJS/commit/49be56a)) -- **error-handling:** add deprecated sync error handling behind a flag ([583cd1d](https://github.com/ReactiveX/RxJS/commit/583cd1d)) -- **exhaustMap:** simplify interface ([42589d0](https://github.com/ReactiveX/RxJS/commit/42589d0)) -- **first:** simplify interface ([a011338](https://github.com/ReactiveX/RxJS/commit/a011338)) -- **forkJoin:** simplify interface ([4d2338b](https://github.com/ReactiveX/RxJS/commit/4d2338b)) -- **fromEvent:** remove resultSelector ([197f449](https://github.com/ReactiveX/RxJS/commit/197f449)) -- **fromEvent:** will now emit an array when event emits multiple arguments ([51b37fd](https://github.com/ReactiveX/RxJS/commit/51b37fd)) -- **fromEventPattern:** removed resultSelector ([6b34f9f](https://github.com/ReactiveX/RxJS/commit/6b34f9f)) -- **last:** simplify interface ([3240419](https://github.com/ReactiveX/RxJS/commit/3240419)) -- **mergeMap|concatMap|concatMapTo:** simplified the signatures ([d293245](https://github.com/ReactiveX/RxJS/commit/d293245)) -- **mergeMapTo:** simplify interface ([582c7be](https://github.com/ReactiveX/RxJS/commit/582c7be)) -- **never:** no longer export `never` function ([#3386](https://github.com/ReactiveX/RxJS/issues/3386)) ([53debc8](https://github.com/ReactiveX/RxJS/commit/53debc8)) -- **switchMap|switchMapTo:** simplify interface ([959fb6a](https://github.com/ReactiveX/RxJS/commit/959fb6a)) -- **Symbol.iterator:** no longer polyfilled ([#3389](https://github.com/ReactiveX/RxJS/issues/3389)) ([6319f3c](https://github.com/ReactiveX/RxJS/commit/6319f3c)) -- **Symbol.observable:** is no longer polyfilled ([#3387](https://github.com/ReactiveX/RxJS/issues/3387)) ([4a5aaaf](https://github.com/ReactiveX/RxJS/commit/4a5aaaf)) -- **throwIfEmpty:** adds throwIfEmpty operator ([#3368](https://github.com/ReactiveX/RxJS/issues/3368)) ([9b21458](https://github.com/ReactiveX/RxJS/commit/9b21458)) -- **typings:** updated typings for combineAll, mergeAll, concatAll, switch, exhaust, zipAll ([#3321](https://github.com/ReactiveX/RxJS/issues/3321)) ([f7e4c02](https://github.com/ReactiveX/RxJS/commit/f7e4c02)) -- **umd:** UMD now mirrors export schema for ESM and CJS ([#3426](https://github.com/ReactiveX/RxJS/issues/3426)) ([556c904](https://github.com/ReactiveX/RxJS/commit/556c904)) - -### BREAKING CHANGES - -- **ajax:** will no longer execute a CORS request by default, you must opt-in with the `crossDomain` flag in the config. -- **mergeMap|concatMap|concatMapTo:** mergeMap, concatMap and concatMapTo no longer support a result selector, if you need to use a result selector, use the following pattern: `source.mergeMap(x => of(x + x).pipe(map(y => y + x))` (the pattern would be the same for `concatMap`). -- **never:** no longer exported. Use the `NEVER` constant instead. -- **bindCallback:** removes result selector, use `map` instead: `bindCallback(fn1, fn2)()` becomes `bindCallback(fn1)().pipe(map(fn2))` -- **Rx.ts:** importing from `rxjs/Rx` is no longer available. Upcoming backwards compat solution will allow that -- **Symbol.iterator:** We are no longer polyfilling `Symbol.iterator`. That would be done by a proper polyfilling library -- **Observable.if:** TypeScript users using `Observable.if` will have to cast `Observable` as any to get to `if`. It is a better idea to just use `iif` directly via `import { iif } from 'rxjs';` -- **bindNodeCallback:** resultSelector removed, use `map` instead: `bindNodeCallback(fn1, fn2)()` becomes `bindNodeCallback(fn1)().pipe(map(fn2))` -- **Symbol.observable:** RxJS will no longer be polyfilling Symbol.observable. That should be done by an actual polyfill library. This is to prevent duplication of code, and also to prevent having modules with side-effects in rxjs. -- **fromEvent:** result selector removed, use `map` instead: `fromEvent(target, 'click', fn)` becomes `fromEvent(target, 'click').pipe(map(fn))` -- **last:** no longer accepts `resultSelector` argument. To get this same functionality, use `map`. -- **first:** no longer supports `resultSelector` argument. The same functionality can be achieved by simply mapping either before or after `first` depending on your use case. -- **exhaustMap:** `resultSelector` no longer supported, to get this functionality use: `source.pipe(exhaustMap(x => of(x + x).pipe(map(y => x + y))))` -- **switchMap|switchMapTo:** `switchMap` and `switchMapTo` no longer take `resultSelector` arguments, to get the same functionality use `switchMap` and `map` in combination: `source.pipe(switchMap(x => of(x + x).pipe(y => x + y)))`. -- **mergeMapTo:** `mergeMapTo` no longer accepts a resultSelector, to get this functionality, you'll want to use `mergeMap` and `map` together: `source.pipe(mergeMap(() => inner).pipe(map(y => x + y)))` -- **fromEventPattern:** no longer supports a result selector, use `map` instead: `fromEventPattern(fn1, fn2, fn3)` becomes `fromEventPattern(fn1, fn2).pipe(map(fn3))` - - - -# [6.0.0-alpha.4](https://github.com/ReactiveX/RxJS/compare/6.0.0-alpha.3...v6.0.0-alpha.4) (2018-03-13) - -### Bug Fixes - -- **ESM:** Add [operators|ajax|websocket|testing]/package.json for ESM support, fixes [#3227](https://github.com/ReactiveX/RxJS/issues/3227) ([#3356](https://github.com/ReactiveX/RxJS/issues/3356)) ([725dcb4](https://github.com/ReactiveX/RxJS/commit/725dcb4)) -- **fromEvent:** Defines toString to fix Closure compilations ([#3417](https://github.com/ReactiveX/RxJS/issues/3417)) ([1558b43](https://github.com/ReactiveX/RxJS/commit/1558b43)) -- **fromEvent:** pass options in unsubscribe ([f1872b0](https://github.com/ReactiveX/RxJS/commit/f1872b0)), closes [#3349](https://github.com/ReactiveX/RxJS/issues/3349) -- **rxjs:** add exports for symbols/interfaces that were missing ([#3380](https://github.com/ReactiveX/RxJS/issues/3380)) ([1622ee0](https://github.com/ReactiveX/RxJS/commit/1622ee0)) -- **rxjs:** make sure esm imports from index.js by default, not Rx.js ([#3316](https://github.com/ReactiveX/RxJS/issues/3316)) ([c2b00f4](https://github.com/ReactiveX/RxJS/commit/c2b00f4)), closes [#3315](https://github.com/ReactiveX/RxJS/issues/3315) -- **rxjs:** once again exports custom error types ([#3371](https://github.com/ReactiveX/RxJS/issues/3371)) ([4465a9f](https://github.com/ReactiveX/RxJS/commit/4465a9f)) -- **rxjs:** remove types.ts importing from itself. ([#3383](https://github.com/ReactiveX/RxJS/issues/3383)) ([8fd50ad](https://github.com/ReactiveX/RxJS/commit/8fd50ad)) -- correct internal module paths to be systemjs compatible ([#3412](https://github.com/ReactiveX/RxJS/issues/3412)) ([35abc9d](https://github.com/ReactiveX/RxJS/commit/35abc9d)) -- **Symbol.iterator:** correctly handle case where Symbol constructor itself is not defined ([#3394](https://github.com/ReactiveX/RxJS/issues/3394)) ([6725be1](https://github.com/ReactiveX/RxJS/commit/6725be1)) -- **typings:** fixed some cases where multicast and publish would not return a ConnectableObservable ([#3320](https://github.com/ReactiveX/RxJS/issues/3320)) ([ddffecc](https://github.com/ReactiveX/RxJS/commit/ddffecc)) -- reexport Symbol.observable typings patch ([4c4d7b0](https://github.com/ReactiveX/RxJS/commit/4c4d7b0)) -- remove the root operators.ts because it overshadows operators/package.json ([184b6d4](https://github.com/ReactiveX/RxJS/commit/184b6d4)) - -### Code Refactoring - -- **Observable.if:** remove ts hacks from Observable ([f46f261](https://github.com/ReactiveX/RxJS/commit/f46f261)) -- **Rx.ts:** move Rx.ts to internal ([#3400](https://github.com/ReactiveX/RxJS/issues/3400)) ([7ad2119](https://github.com/ReactiveX/RxJS/commit/7ad2119)) - -### Features - -- **bindCallback:** remove result selector ([2535641](https://github.com/ReactiveX/RxJS/commit/2535641)) -- **bindNodeCallback:** remove resultSelector ([26e6e5c](https://github.com/ReactiveX/RxJS/commit/26e6e5c)) -- **exhaustMap:** simplify interface ([42589d0](https://github.com/ReactiveX/RxJS/commit/42589d0)) -- **first:** simplify interface ([a011338](https://github.com/ReactiveX/RxJS/commit/a011338)) -- **forkJoin:** simplify interface ([4d2338b](https://github.com/ReactiveX/RxJS/commit/4d2338b)) -- **fromEvent:** remove resultSelector ([197f449](https://github.com/ReactiveX/RxJS/commit/197f449)) -- **fromEvent:** will now emit an array when event emits multiple arguments ([51b37fd](https://github.com/ReactiveX/RxJS/commit/51b37fd)) -- **fromEventPattern:** removed resultSelector ([6b34f9f](https://github.com/ReactiveX/RxJS/commit/6b34f9f)) -- **last:** simplify interface ([3240419](https://github.com/ReactiveX/RxJS/commit/3240419)) -- **mergeMap|concatMap|concatMapTo:** simplified the signatures ([d293245](https://github.com/ReactiveX/RxJS/commit/d293245)) -- **mergeMapTo:** simplify interface ([582c7be](https://github.com/ReactiveX/RxJS/commit/582c7be)) -- **never:** no longer export `never` function ([#3386](https://github.com/ReactiveX/RxJS/issues/3386)) ([53debc8](https://github.com/ReactiveX/RxJS/commit/53debc8)) -- **switchMap|switchMapTo:** simplify interface ([959fb6a](https://github.com/ReactiveX/RxJS/commit/959fb6a)) -- **Symbol.iterator:** no longer polyfilled ([#3389](https://github.com/ReactiveX/RxJS/issues/3389)) ([6319f3c](https://github.com/ReactiveX/RxJS/commit/6319f3c)) -- **Symbol.observable:** is no longer polyfilled ([#3387](https://github.com/ReactiveX/RxJS/issues/3387)) ([4a5aaaf](https://github.com/ReactiveX/RxJS/commit/4a5aaaf)) -- **throwIfEmpty:** adds throwIfEmpty operator ([#3368](https://github.com/ReactiveX/RxJS/issues/3368)) ([9b21458](https://github.com/ReactiveX/RxJS/commit/9b21458)) -- **typings:** updated typings for combineAll, mergeAll, concatAll, switch, exhaust, zipAll ([#3321](https://github.com/ReactiveX/RxJS/issues/3321)) ([f7e4c02](https://github.com/ReactiveX/RxJS/commit/f7e4c02)) -- **umd:** UMD now mirrors export schema for ESM and CJS ([#3426](https://github.com/ReactiveX/RxJS/issues/3426)) ([556c904](https://github.com/ReactiveX/RxJS/commit/556c904)) - -### BREAKING CHANGES - -- **Symbol.observable:** RxJS will no longer be polyfilling Symbol.observable. That should be done by an actual polyfill library. This is to prevent duplication of code, and also to prevent having modules with side-effects in rxjs. -- **mergeMap|concatMap|concatMapTo:** mergeMap, concatMap and concatMapTo no longer support a result selector, if you need to use a result selector, use the following pattern: `source.mergeMap(x => of(x + x).pipe(map(y => y + x))` (the pattern would be the same for `concatMap`). -- **bindCallback:** removes result selector, use `map` instead: `bindCallback(fn1, fn2)()` becomes `bindCallback(fn1)().pipe(map(fn2))` -- **Rx.ts:** importing from `rxjs/Rx` is no longer available. Upcoming backwards compat solution will allow that -- **Symbol.iterator:** We are no longer polyfilling `Symbol.iterator`. That would be done by a proper polyfilling library -- **Observable.if:** TypeScript users using `Observable.if` will have to cast `Observable` as any to get to `if`. It is a better idea to just use `iif` directly via `import { iif } from 'rxjs';` -- **bindNodeCallback:** resultSelector removed, use `map` instead: `bindNodeCallback(fn1, fn2)()` becomes `bindNodeCallback(fn1)().pipe(map(fn2))` -- **never:** no longer exported. Use the `NEVER` constant instead. -- **fromEvent:** result selector removed, use `map` instead: `fromEvent(target, 'click', fn)` becomes `fromEvent(target, 'click').pipe(map(fn))` -- **last:** no longer accepts `resultSelector` argument. To get this same functionality, use `map`. -- **first:** no longer supports `resultSelector` argument. The same functionality can be achieved by simply mapping either before or after `first` depending on your use case. -- **exhaustMap:** `resultSelector` no longer supported, to get this functionality use: `source.pipe(exhaustMap(x => of(x + x).pipe(map(y => x + y))))` -- **switchMap|switchMapTo:** `switchMap` and `switchMapTo` no longer take `resultSelector` arguments, to get the same functionality use `switchMap` and `map` in combination: `source.pipe(switchMap(x => of(x + x).pipe(y => x + y)))`. -- **mergeMapTo:** `mergeMapTo` no longer accepts a resultSelector, to get this functionality, you'll want to use `mergeMap` and `map` together: `source.pipe(mergeMap(() => inner).pipe(map(y => x + y)))` -- **fromEventPattern:** no longer supports a result selector, use `map` instead: `fromEventPattern(fn1, fn2, fn3)` becomes `fromEventPattern(fn1, fn2).pipe(map(fn3))` - - - -# [6.0.0-alpha.3](https://github.com/ReactiveX/RxJS/compare/6.0.0-alpha.2...v6.0.0-alpha.3) (2018-02-06) - -### Bug Fixes - -- **animationFrame.spec:** spec description fix ([#3140](https://github.com/ReactiveX/RxJS/issues/3140)) ([ab6c325](https://github.com/ReactiveX/RxJS/commit/ab6c325)) -- **debounce:** support scalar selectors ([#3236](https://github.com/ReactiveX/RxJS/issues/3236)) ([1548393](https://github.com/ReactiveX/RxJS/commit/1548393)), closes [#3232](https://github.com/ReactiveX/RxJS/issues/3232) -- **forkJoin:** catch and forward selector errors ([#3261](https://github.com/ReactiveX/RxJS/issues/3261)) ([e57bbb7](https://github.com/ReactiveX/RxJS/commit/e57bbb7)), closes [#3216](https://github.com/ReactiveX/RxJS/issues/3216) -- **Observable:** expose pipe rest parameter overload ([#3292](https://github.com/ReactiveX/RxJS/issues/3292)) ([7ff5bc3](https://github.com/ReactiveX/RxJS/commit/7ff5bc3)) -- **onErrorResumeNext:** no longer holds onto subscriptions too long ([abbbdad](https://github.com/ReactiveX/RxJS/commit/abbbdad)), closes [#3178](https://github.com/ReactiveX/RxJS/issues/3178) -- **scheduler:** prevent unwanted clearInterval ([#3226](https://github.com/ReactiveX/RxJS/issues/3226)) ([d7cfb42](https://github.com/ReactiveX/RxJS/commit/d7cfb42)), closes [#3042](https://github.com/ReactiveX/RxJS/issues/3042) -- **timer:** multiple subscriptions to timer(Date) behaves correctly ([aafa7ff](https://github.com/ReactiveX/RxJS/commit/aafa7ff)), closes [#3252](https://github.com/ReactiveX/RxJS/issues/3252) -- **typings:** correct compilation warnings from missing types in tests ([3aad6bc](https://github.com/ReactiveX/RxJS/commit/3aad6bc)) -- **typings:** relax debounce selector type ([c419ab4](https://github.com/ReactiveX/RxJS/commit/c419ab4)), closes [#3164](https://github.com/ReactiveX/RxJS/issues/3164) -- **typings:** relax throttle selector type ([#3205](https://github.com/ReactiveX/RxJS/issues/3205)) ([e83fda7](https://github.com/ReactiveX/RxJS/commit/e83fda7)), closes [#3204](https://github.com/ReactiveX/RxJS/issues/3204) -- **typings:** the return type of factory of defer should be ObservableInput ([#3211](https://github.com/ReactiveX/RxJS/issues/3211)) ([dc41a5e](https://github.com/ReactiveX/RxJS/commit/dc41a5e)) - -### Features - -- **empty:** empty() returns the same instance ([5c7c749](https://github.com/ReactiveX/RxJS/commit/5c7c749)) -- **EMPTY:** observable constant EMPTY now exported ([08fb074](https://github.com/ReactiveX/RxJS/commit/08fb074)) -- **never:** always return the same instance ([#3249](https://github.com/ReactiveX/RxJS/issues/3249)) ([d57fa52](https://github.com/ReactiveX/RxJS/commit/d57fa52)) -- **rxjs:** move rxjs/create into rxjs ([#3299](https://github.com/ReactiveX/RxJS/issues/3299)) ([6711fe2](https://github.com/ReactiveX/RxJS/commit/6711fe2)) -- **throwError:** functional version of throwError ([639236e](https://github.com/ReactiveX/RxJS/commit/639236e)) - -### BREAKING CHANGES - -- **rxjs:** `rxjs/create` items are now exported from `rxjs` -- **throwError:** Observable.throw no longer available in TypeScript without a cast -- **empty:** `empty()` without a scheduler will return the same - instance every time. -- **empty:** In TypeScript, `empty()` no longer accepts a generic - argument, as it returns `Observable` -- **never:** `never()` always returns the same instance -- **never:** TypeScript typing for `never()` is now `Observable` and the function no longer requires a generic type. - - - -# [6.0.0-alpha.2](https://github.com/ReactiveX/RxJS/compare/6.0.0-alpha.1...6.0.0-alpha.2) (2018-01-14) - -### Bug Fixes - -- **build:** properly outputs subdirectories like `rxjs/operators` ([34fe560](https://github.com/ReactiveX/RxJS/commit/34fe560)) - - - -# [6.0.0-alpha.1](https://github.com/ReactiveX/RxJS/compare/5.5.3...v6.0.0-alpha.1) (2018-01-12) - -### Bug Fixes - -- Revert "fix(scheduler): prevent unwanted clearInterval ([#3044](https://github.com/ReactiveX/RxJS/issues/3044))" ([ad5c7c6](https://github.com/ReactiveX/RxJS/commit/ad5c7c6)) -- Revert "fix(scheduler): prevent unwanted clearInterval ([#3044](https://github.com/ReactiveX/RxJS/issues/3044))" ([64f9285](https://github.com/ReactiveX/RxJS/commit/64f9285)) -- **debounceTime:** synchronous reentrancy of debounceTime no longer swallows the second value ([#3218](https://github.com/ReactiveX/RxJS/issues/3218)) ([598e9ce](https://github.com/ReactiveX/RxJS/commit/598e9ce)), closes [#2748](https://github.com/ReactiveX/RxJS/issues/2748) -- **dependency:** move symbol-observable into devdependency ([4400628](https://github.com/ReactiveX/RxJS/commit/4400628)) -- **IteratorObservable:** get new iterator for each subscription ([#2497](https://github.com/ReactiveX/RxJS/issues/2497)) ([1bd0a58](https://github.com/ReactiveX/RxJS/commit/1bd0a58)), closes [#2496](https://github.com/ReactiveX/RxJS/issues/2496) -- **Observable.toArray:** Fix toArray with multiple subscriptions. ([#3134](https://github.com/ReactiveX/RxJS/issues/3134)) ([3390926](https://github.com/ReactiveX/RxJS/commit/3390926)) -- **SystemJS:** avoid node module resolution of pipeable operators ([#3025](https://github.com/ReactiveX/RxJS/issues/3025)) ([0f3cf71](https://github.com/ReactiveX/RxJS/commit/0f3cf71)), closes [#2971](https://github.com/ReactiveX/RxJS/issues/2971) [#2996](https://github.com/ReactiveX/RxJS/issues/2996) [#3011](https://github.com/ReactiveX/RxJS/issues/3011) -- **tap:** make next optional ([#3073](https://github.com/ReactiveX/RxJS/issues/3073)) ([e659f0c](https://github.com/ReactiveX/RxJS/commit/e659f0c)), closes [#2534](https://github.com/ReactiveX/RxJS/issues/2534) -- **TSC:** Fixing TSC errors. Fixes [#3020](https://github.com/ReactiveX/RxJS/issues/3020) ([01d1575](https://github.com/ReactiveX/RxJS/commit/01d1575)) -- **typings:** the return type of project of mergeScan should be ObservableInput ([23fe17d](https://github.com/ReactiveX/RxJS/commit/23fe17d)) - -### Chores - -- **TypeScript:** Bump up typescript to latest ([#3009](https://github.com/ReactiveX/RxJS/issues/3009)) ([2f395da](https://github.com/ReactiveX/RxJS/commit/2f395da)) - -### Code Refactoring - -- **asap:** Remove setImmediate polyfill ([5eb6af7](https://github.com/ReactiveX/RxJS/commit/5eb6af7)) -- **distinct:** Remove Set polyfill ([68ee499](https://github.com/ReactiveX/RxJS/commit/68ee499)) -- **groupBy:** Remove Map polyfill ([74b5b1a](https://github.com/ReactiveX/RxJS/commit/74b5b1a)) - -### Features - -- **Observable:** unhandled errors are now reported to HostReportErrors ([#3062](https://github.com/ReactiveX/RxJS/issues/3062)) ([cd9626a](https://github.com/ReactiveX/RxJS/commit/cd9626a)) -- **reorganize:** move ./interfaces.ts to internal/types.ts ([cfbfaac](https://github.com/ReactiveX/RxJS/commit/cfbfaac)) -- **reorganize:** internal utils hidden ([70058cd](https://github.com/ReactiveX/RxJS/commit/70058cd)) -- **reorganize:** add `rxjs/create` exports ([c9963bd](https://github.com/ReactiveX/RxJS/commit/c9963bd)) -- **reorganize:** ajax observable creator now exported from `rxjs/ajax` ([e971c93](https://github.com/ReactiveX/RxJS/commit/e971c93)) -- **reorganize:** all patch operators moved to `internal` directory ([7342401](https://github.com/ReactiveX/RxJS/commit/7342401)) -- **reorganize:** export `noop` and `identity` from `rxjs` ([810c4d0](https://github.com/ReactiveX/RxJS/commit/810c4d0)) -- **reorganize:** export `Notification` from `rxjs` ([8809b48](https://github.com/ReactiveX/RxJS/commit/8809b48)) -- **reorganize:** export schedulers from `rxjs` ([abd3b61](https://github.com/ReactiveX/RxJS/commit/abd3b61)) -- **reorganize:** export Subject, ReplaySubject, BehaviorSubject from rxjs ([bd683ca](https://github.com/ReactiveX/RxJS/commit/bd683ca)) -- **reorganize:** export the `pipe` utility function from `rxjs` ([4574310](https://github.com/ReactiveX/RxJS/commit/4574310)) -- **reorganize:** hid testing implementation details ([b981666](https://github.com/ReactiveX/RxJS/commit/b981666)) -- **reorganize:** move observable implementations under internal directory ([2d5c3f8](https://github.com/ReactiveX/RxJS/commit/2d5c3f8)) -- **reorganize:** move operator impls under internal directory ([207976f](https://github.com/ReactiveX/RxJS/commit/207976f)) -- **reorganize:** move top-level impls under internal directory ([c3bb705](https://github.com/ReactiveX/RxJS/commit/c3bb705)) -- **reorganize:** moved symbols to be internal ([80783ab](https://github.com/ReactiveX/RxJS/commit/80783ab)) -- **reorganize:** operators all exported from `rxjs/operators` ([b1f8bfe](https://github.com/ReactiveX/RxJS/commit/b1f8bfe)) -- **reorganize:** websocket subject creator now exported from `rxjs/websocket` ([5ac62c0](https://github.com/ReactiveX/RxJS/commit/5ac62c0)) - -### BREAKING CHANGES - -- **webSocket:** `webSocket` creator function now exported from `rxjs/websocket` as `websocket`. -- **IteratorObservable:** IteratorObservable no longer share iterator between - subscription -- **utils:** Many internal use utilities like `isArray` are now hidden under `rxjs/internal`, they are implementation details and should not be used. -- **testing observables:** `HotObservable` and `ColdObservable`, and other testing support types are no longer exported directly. -- **creation functions:** All create functions such as `of`, `from`, `combineLatest` and `fromEvent` should now be imported from `rxjs/create`. -- **types and interfaces:** Can no longer explicitly import types from `rxjs/interfaces`, import them from `rxjs` instead -- **symbols:** Symbols are no longer exported directly from modules such as `rxjs/symbol/observable` please use `Symbol.observable` and `Symbol.iterator` (polyfills may be required) -- **deep imports:** Can no longer deep import top-level types such as `rxjs/Observable`, `rxjs/Subject`, `rxjs/ReplaySubject`, et al. All imports should be done directly from `rxjs`, for example: `import \{ Observable, Subject \} from 'rxjs';` -- **schedulers:** Scheduler instances have changed names to be suffixed with `Scheduler`, (e.g. `asap` -> `asapScheduler`) -- **operators:** Pipeable operators must now be imported from `rxjs` - like so: `import { map, filter, switchMap } from 'rxjs/operators';`. No deep imports. -- **ajax:** Ajax observable should be imported from `rxjs/ajax`. -- **Observable:** You should no longer deep import custom Observable - implementations such as `ArrayObservable` or `ForkJoinObservable`. -- **\_throw:** `_throw` is now exported as `throwError` -- **if:** `if` is now exported as `iif` -- **operators:** Deep imports to `rxjs/operator/*` will no longer work. Again, pipe operators are still where they were. -- **error handling:** Unhandled errors are no longer caught and rethrown, rather they are caught and scheduled to be thrown, which causes them to be reported to window.onerror or process.on('error'), depending on the environment. Consequently, teardown after a synchronous, unhandled, error will no longer occur, as the teardown would not exist, and producer interference cannot occur -- **distinct:** Using `distinct` requires a `Set` implementation and must be polyfilled in older runtimes -- **asap:** Old runtimes must polyfill Promise in order to use ASAP scheduling. -- **groupBy:** Older runtimes will require Map to be polyfilled to use - `groupBy` -- **TypeScript:** IE10 and lower will need to polyfill `Object.setPrototypeOf` -- **operators removed:** Operator versions of static observable creators such as - `merge`, `concat`, `zip`, `onErrorResumeNext`, and `race` have been - removed. Please use the static versions of those operations. e.g. - `a.pipe(concat(b, c))` becomes `concat(a, b, c)`. - - - -## [5.5.6](https://github.com/ReactiveX/RxJS/compare/5.5.5...v5.5.6) (2017-12-21) - -### Bug Fixes - -- **Observable:** rethrow errors when syncErrorThrowable and inherit it from destination. Fixes [#2813](https://github.com/ReactiveX/RxJS/issues/2813) ([541b49d](https://github.com/ReactiveX/RxJS/commit/541b49d)) - - - -## [5.5.5](https://github.com/ReactiveX/RxJS/compare/5.5.4...v5.5.5) (2017-12-06) - -### Support Added - -- **Bazel:** Add files to support users that want Bazel builds with RxJS ([12dac3b](https://github.com/ReactiveX/rxjs/commit/12dac3b)) - - - -## [5.5.4](https://github.com/ReactiveX/RxJS/compare/5.5.3...v5.5.4) (2017-12-05) - -### Bug Fixes - -- **scheduler:** resolve regression on angular router with zones ([#3158](https://github.com/ReactiveX/RxJS/issues/3158)) ([520b06a](https://github.com/ReactiveX/RxJS/commit/520b06a)) -- **publish:** re-publish after having built with proper version of TypeScript. ([f0ff5bc](https://github.com/ReactiveX/RxJS/commit/f0ff5bc), closes[#3155](https://github.com/ReactiveX/rxjs/issues/3155)) - - - -## [5.5.3](https://github.com/ReactiveX/RxJS/compare/5.5.2...v5.5.3) (2017-12-01) - -### Bug Fixes - -- **concatStatic:** missing exports for mergeStatic and concatStatic ([#2999](https://github.com/ReactiveX/RxJS/issues/2999)) ([cae5f9b](https://github.com/ReactiveX/RxJS/commit/cae5f9b)) -- **scheduler:** prevent unwanted clearInterval ([#3044](https://github.com/ReactiveX/RxJS/issues/3044)) ([7d722d4](https://github.com/ReactiveX/RxJS/commit/7d722d4)), closes [#3042](https://github.com/ReactiveX/RxJS/issues/3042) -- **SystemJS:** avoid node module resolution of pipeable operators ([#3025](https://github.com/ReactiveX/RxJS/issues/3025)) ([d77e3d7](https://github.com/ReactiveX/RxJS/commit/d77e3d7)), closes [#2971](https://github.com/ReactiveX/RxJS/issues/2971) [#2996](https://github.com/ReactiveX/RxJS/issues/2996) [#3011](https://github.com/ReactiveX/RxJS/issues/3011) -- **typings:** fix subscribe overloads ([#3053](https://github.com/ReactiveX/RxJS/issues/3053)) ([1a9fd42](https://github.com/ReactiveX/RxJS/commit/1a9fd42)), closes [#3052](https://github.com/ReactiveX/RxJS/issues/3052) - - - -## [5.5.2](https://github.com/ReactiveX/RxJS/compare/5.5.1...v5.5.2) (2017-10-25) - -### Bug Fixes - -- **package:** fixed import failures in Webpack ([#2987](https://github.com/ReactiveX/RxJS/issues/2987)) ([e16202d](https://github.com/ReactiveX/RxJS/commit/e16202d)) -- **typings:** improved type inference for arguments to publishReplay ([#2992](https://github.com/ReactiveX/RxJS/issues/2992)) ([0753ff7](https://github.com/ReactiveX/RxJS/commit/0753ff7)), closes [#2991](https://github.com/ReactiveX/RxJS/issues/2991) -- **typings:** ensure TS types for `zip` and `combineLatest` are properly inferred. ([b8e6cf8](https://github.com/ReactiveX/RxJS/commit/b8e6cf8)) -- **typings:** publish variants will properly return ConnectableObservable([#2983](https://github.com/ReactiveX/RxJS/issues/2983)) ([d563bfa](https://github.com/ReactiveX/RxJS/commit/d563bfa)) - - - -## [5.5.1](https://github.com/ReactiveX/RxJS/compare/5.5.0...v5.5.1) (2017-10-24) - -### Bug Fixes - -- **build:** Remove `module` and `es2015` keys to avoid resolution conflicts ([5073139](https:/github.com/ReactiveX/RxJS/commit/5073139)) -- **ajaxobservable:** fix operator import path ([d9b62ed](https://github.com/ReactiveX/RxJS/commit/d9b62ed)) - - - -# [5.5.0](https://github.com/ReactiveX/RxJS/compare/5.5.0-beta.7...v5.5.0) (2017-10-18) - -### Bug Fixes - -- **build:** CJS sourceMaps now inlined into sourcesContent ([39b4af5](https://github.com/ReactiveX/RxJS/commit/39b4af5)), closes [#2934](https://github.com/ReactiveX/RxJS/issues/2934) - -### Features - -- **publishReplay:** add selector function to publishReplay ([#2885](https://github.com/ReactiveX/RxJS/issues/2885)) ([e0efd13](https://github.com/ReactiveX/RxJS/commit/e0efd13)) - - - -# [5.5.0-beta.7](https://github.com/ReactiveX/RxJS/compare/5.5.0-beta.5...5.5.0-beta.7) (2017-10-13) - -(Due to a publish snafu, there is no 5.5.0-beta.6) (womp womp 👎) - -### Bug Fixes - -- **build:** sourceMaps updated to support CJS properly again ([75f7f11](https://github.com/ReactiveX/RxJS/commit/75f7f11)), closes [#2934](https://github.com/ReactiveX/RxJS/issues/2934) -- **flatMap:** reexport flatMap as alias of mergeMap ([#2920](https://github.com/ReactiveX/RxJS/issues/2920)) ([9922c02](https://github.com/ReactiveX/RxJS/commit/9922c02)) -- **publish:** correct the name and republish to sync packages ([464b115](https://github.com/ReactiveX/RxJS/commit/464b115)) -- **shareReplay:** no longer exporting function unnecessarily ([#2928](https://github.com/ReactiveX/RxJS/issues/2928)) ([e159578](https://github.com/ReactiveX/RxJS/commit/e159578)) -- **shareReplay:** properly uses `lift` ([#2924](https://github.com/ReactiveX/RxJS/issues/2924)) ([3d9cf87](https://github.com/ReactiveX/RxJS/commit/3d9cf87)), closes [#2921](https://github.com/ReactiveX/RxJS/issues/2921) -- **toPromise:** include toPromise in build output ([#2923](https://github.com/ReactiveX/RxJS/issues/2923)) ([f55bfa5](https://github.com/ReactiveX/RxJS/commit/f55bfa5)), closes [#2922](https://github.com/ReactiveX/RxJS/issues/2922) - - - -# [5.5.0-beta.5](https://github.com/ReactiveX/RxJS/compare/5.5.0-beta.4...v5.5.0-beta.5) (2017-10-06) - -### Bug Fixes - -- **toPromise:** remove lettable version of toPromise ([031edca](https://github.com/ReactiveX/RxJS/commit/031edca)), closes [#2868](https://github.com/ReactiveX/RxJS/issues/2868) - -### Features - -- **toPromise:** now exists as a permanent method on Observable ([2e49a5c](https://github.com/ReactiveX/RxJS/commit/2e49a5c)) - - - -# [5.5.0-beta.4](https://github.com/ReactiveX/RxJS/compare/5.5.0-beta.3...v5.5.0-beta.4) (2017-10-06) - -### Bug Fixes - -- **publish:** fix selector typings ([#2891](https://github.com/ReactiveX/RxJS/issues/2891)) ([9ee234d](https://github.com/ReactiveX/RxJS/commit/9ee234d)), closes [#2889](https://github.com/ReactiveX/RxJS/issues/2889) -- **shareReplay:** properly retains history on subscribe ([#2910](https://github.com/ReactiveX/RxJS/issues/2910)) ([accbcd0](https://github.com/ReactiveX/RxJS/commit/accbcd0)), closes [#2908](https://github.com/ReactiveX/RxJS/issues/2908) -- **subscribeOn:** remove subscribeOn from reexport to support treesha… ([#2899](https://github.com/ReactiveX/RxJS/issues/2899)) ([fb51a02](https://github.com/ReactiveX/RxJS/commit/fb51a02)) - - - -# [5.5.0-beta.3](https://github.com/ReactiveX/RxJS/compare/5.5.0-beta.2...v5.5.0-beta.3) (2017-10-03) - -### Bug Fixes - -- **build:** revert to 5.4.x build output for CJS & add configurable support for ESM ([#2878](https://github.com/ReactiveX/RxJS/issues/2878)) ([167456a](https://github.com/ReactiveX/RxJS/commit/167456a)) -- **concatAll:** use higher-order lettable version of concatAll ([60c96ab](https://github.com/ReactiveX/RxJS/commit/60c96ab)) -- **mergeAll:** use higher-order lettable version of mergeAll ([f0b703b](https://github.com/ReactiveX/RxJS/commit/f0b703b)) - - - -# [5.5.0-beta.2](https://github.com/ReactiveX/RxJS/compare/5.5.0-beta.1...v5.5.0-beta.2) (2017-09-27) - -### Bug Fixes - -- **build:** make CJS references to import X from '../operators' work correctly with SystemJS ([#2874](https://github.com/ReactiveX/RxJS/issues/2874)) ([3dd4cc4](https://github.com/ReactiveX/RxJS/commit/3dd4cc4)) - - - -# [5.5.0-beta.1](https://github.com/ReactiveX/RxJS/compare/5.5.0-beta.0...v5.5.0-beta.1) (2017-09-27) - -### Bug Fixes - -- **package:** published from a Linux machine to prevent a strange issue where - the Observable directory was not showing up when installed on some Linux - environments. -- **build:** fix source maps by adding back sources and fixing path ([#2872](https://github.com/ReactiveX/RxJS/issues/2872)) ([daaf424](https://github.com/ReactiveX/RxJS/commit/daaf424)) -- **package:** remove src directory and fix typings location ([#2866](https://github.com/ReactiveX/RxJS/issues/2866)) ([c57eea7](https://github.com/ReactiveX/RxJS/commit/c57eea7)) - -### Features - -- **global:** export lettables as Rx.operators ([#2862](https://github.com/ReactiveX/RxJS/issues/2862)) ([ba2f586](https://github.com/ReactiveX/RxJS/commit/ba2f586)), closes [#2861](https://github.com/ReactiveX/RxJS/issues/2861) - - - -# [5.5.0-beta.0](https://github.com/ReactiveX/RxJS/compare/5.4.3...5.5.0-beta.0) (2017-09-22) - -**Important! Checkout the explanation of the new [lettable operators features here](doc/lettable-operators.md)** - -### Bug Fixes - -- **package:** correct errors generated during rollup for UMD generation ([#2839](https://github.com/ReactiveX/RxJS/issues/2839)) ([124cc93](https://github.com/ReactiveX/RxJS/commit/124cc93)) -- **partition:** update TypeScript signature to match docs and filter operator ([#2819](https://github.com/ReactiveX/RxJS/issues/2819)) ([755df9b](https://github.com/ReactiveX/RxJS/commit/755df9b)) -- **subscribeToResult:** throw error in subscriber with inner observable ([d7bffa9](https://github.com/ReactiveX/RxJS/commit/d7bffa9)), closes [#2618](https://github.com/ReactiveX/RxJS/issues/2618) - -### Features - -- **ajax:** Include the response on instances of AjaxError ([3f6553c](https://github.com/ReactiveX/RxJS/commit/3f6553c)) -- **audit:** add higher-order lettable version of audit ([e2daefe](https://github.com/ReactiveX/RxJS/commit/e2daefe)) -- **auditTime:** add higher-order lettable version of auditTime ([9e963aa](https://github.com/ReactiveX/RxJS/commit/9e963aa)) -- **buffer:** add higher-order lettable version of buffer ([d8ca9de](https://github.com/ReactiveX/RxJS/commit/d8ca9de)) -- **bufferCount:** add higher-order lettable version of bufferCount ([0ae2ed5](https://github.com/ReactiveX/RxJS/commit/0ae2ed5)) -- **bufferTime:** add higher-order lettable version of bufferTime operator ([0377ca6](https://github.com/ReactiveX/RxJS/commit/0377ca6)) -- **bufferToggle:** add higher-order lettable version of bufferToggle ([ea1c3ee](https://github.com/ReactiveX/RxJS/commit/ea1c3ee)) -- **bufferWhen:** add higher-order lettable version of bufferWhen ([ec3eceb](https://github.com/ReactiveX/RxJS/commit/ec3eceb)) -- **catchError:** add higher-order lettable version of `catch` ([408a2af](https://github.com/ReactiveX/RxJS/commit/408a2af)) -- **combineAll:** add higher-order lettable version of combineAll ([97704b3](https://github.com/ReactiveX/RxJS/commit/97704b3)) -- **combineLatest:** add higher-order lettable version of combineLatest ([b7154f2](https://github.com/ReactiveX/RxJS/commit/b7154f2)) -- **concatMap:** add higher-order lettable version of concatMap ([c4125ff](https://github.com/ReactiveX/RxJS/commit/c4125ff)) -- **concatMapTo:** add higher-order lettable version of concatMapTo ([0a6672e](https://github.com/ReactiveX/RxJS/commit/0a6672e)) -- **count:** add higher-order lettable version of count ([caf713e](https://github.com/ReactiveX/RxJS/commit/caf713e)) -- **debounce:** add higher-order lettable version of debounce ([cb8ce46](https://github.com/ReactiveX/RxJS/commit/cb8ce46)) -- **debounceTime:** add higher-order lettable version of debounceTime ([df0d439](https://github.com/ReactiveX/RxJS/commit/df0d439)) -- **delay:** add higher-order lettable version of delay ([7efb803](https://github.com/ReactiveX/RxJS/commit/7efb803)) -- **delayWhen:** add higher-order lettable version of delayWhen ([cb91c3f](https://github.com/ReactiveX/RxJS/commit/cb91c3f)) -- **dematerialize:** add higher-order lettable version of dematerialize ([b5948f9](https://github.com/ReactiveX/RxJS/commit/b5948f9)) -- **distinct:** add higher-order lettable version of distinct ([0429a69](https://github.com/ReactiveX/RxJS/commit/0429a69)) -- **distinctUntilChanged:** add higher-order lettable version of distinctUntilChanged ([b2725e7](https://github.com/ReactiveX/RxJS/commit/b2725e7)) -- **distinctUntilKeyChanged:** add higher-order lettable version of distinctUntilKeyChanged ([9db141c](https://github.com/ReactiveX/RxJS/commit/9db141c)) -- **elementAt:** add higher-order lettable version of elementAt ([b8e956b](https://github.com/ReactiveX/RxJS/commit/b8e956b)) -- **every:** add higher-order lettable version of every ([13f3503](https://github.com/ReactiveX/RxJS/commit/13f3503)) -- **exhaust:** add higher-order lettable version of exhaust ([b145dca](https://github.com/ReactiveX/RxJS/commit/b145dca)) -- **exhaustMap:** add higher-order lettable exhaustMap ([b134e0c](https://github.com/ReactiveX/RxJS/commit/b134e0c)) -- **expand:** add higher-order lettable expand ([6ec8a19](https://github.com/ReactiveX/RxJS/commit/6ec8a19)) -- **filter:** add higher-order lettable version of filter ([2848556](https://github.com/ReactiveX/RxJS/commit/2848556)) -- **finalize:** add higher-order lettable version of finally, called finalize ([cfeae9f](https://github.com/ReactiveX/RxJS/commit/cfeae9f)) -- **find:** add higher-order lettable version of find ([ff6d5af](https://github.com/ReactiveX/RxJS/commit/ff6d5af)) -- **findIndex:** add higher-order lettable findIndex ([40e680e](https://github.com/ReactiveX/RxJS/commit/40e680e)) -- **first:** add higher-order lettable first ([33eac1e](https://github.com/ReactiveX/RxJS/commit/33eac1e)) -- **groupBy:** add higher-order lettable groupBy ([5281229](https://github.com/ReactiveX/RxJS/commit/5281229)) -- **ignoreElements:** add higher-order lettable version of ignoreElements ([68286d4](https://github.com/ReactiveX/RxJS/commit/68286d4)) -- **isEmpty:** add higher-order lettable version of isEmpty ([aad1833](https://github.com/ReactiveX/RxJS/commit/aad1833)) -- **last:** add higher-order lettable version of last ([bf33b97](https://github.com/ReactiveX/RxJS/commit/bf33b97)) -- **lettables:** add higher-order lettable versions of concat, concatAll, mergeAll ([d7e8be7](https://github.com/ReactiveX/RxJS/commit/d7e8be7)) -- **map:** add higher-order lettable map operator ([ce40b2d](https://github.com/ReactiveX/RxJS/commit/ce40b2d)) -- **mapTo:** add higher-order lettable version of mapTo ([e97530f](https://github.com/ReactiveX/RxJS/commit/e97530f)) -- **materialize:** add higher-order lettable materialize operator ([ce42477](https://github.com/ReactiveX/RxJS/commit/ce42477)) -- **merge:** add higher-order lettable version of merge ([#2809](https://github.com/ReactiveX/RxJS/issues/2809)) ([3136403](https://github.com/ReactiveX/RxJS/commit/3136403)) -- **mergeMap:** add higher-order lettable version of mergeMap ([417efde](https://github.com/ReactiveX/RxJS/commit/417efde)) -- **mergeMapTo:** add higher-order lettable version of mergeMapTo ([653b47a](https://github.com/ReactiveX/RxJS/commit/653b47a)) -- **mergeScan:** add higher-order lettable version of mergeScan ([fde7205](https://github.com/ReactiveX/RxJS/commit/fde7205)) -- **multicast:** add higher-order lettable variant of multicast ([fb6014d](https://github.com/ReactiveX/RxJS/commit/fb6014d)) -- **observeOn:** add higher-order lettable version of observeOn ([feb0f5a](https://github.com/ReactiveX/RxJS/commit/feb0f5a)) -- **onErrorResumeNext:** add higher-order lettable version of onErrorResumeNext ([badec6a](https://github.com/ReactiveX/RxJS/commit/badec6a)) -- **operators:** higher-order lettables of reduce, min, max and defaultIfEmpty added ([9974fc2](https://github.com/ReactiveX/RxJS/commit/9974fc2)) -- **package:** rxjs distribution now supports main, module and es2015 keys in package.json ([988e1af](https://github.com/ReactiveX/RxJS/commit/988e1af)) -- **pairwise:** add higher-order lettable version of pairwise ([bb21a44](https://github.com/ReactiveX/RxJS/commit/bb21a44)) -- **partition:** add higher-order lettable version of partition ([595e588](https://github.com/ReactiveX/RxJS/commit/595e588)) -- **pipe:** add pipe method ot Observable ([9f6312d](https://github.com/ReactiveX/RxJS/commit/9f6312d)) -- **pipe:** add pipe utility function([42f9daf](https://github.com/ReactiveX/RxJS/commit/42f9daf)) -- **pluck:** add higher-order lettable version of pluck ([8ab0914](https://github.com/ReactiveX/RxJS/commit/8ab0914)) -- **publish:** add higher-order lettable variant of publish ([4ccf794](https://github.com/ReactiveX/RxJS/commit/4ccf794)) -- **publishBehavior:** add higher-order lettable version of publishBehavior ([e911aef](https://github.com/ReactiveX/RxJS/commit/e911aef)) -- **publishLast:** add higher-order lettable version of publishLast ([684728c](https://github.com/ReactiveX/RxJS/commit/684728c)) -- **publishReplay:** add higher-order lettable version of publishReplay ([2958917](https://github.com/ReactiveX/RxJS/commit/2958917)) -- **race:** add higher-order lettable version of race ([e646851](https://github.com/ReactiveX/RxJS/commit/e646851)) -- **refCount:** add higher-order lettable version of refCount ([21fba63](https://github.com/ReactiveX/RxJS/commit/21fba63)) -- **repeat:** add higher-order lettable version of repeat ([8473fe5](https://github.com/ReactiveX/RxJS/commit/8473fe5)) -- **repeatWhen:** add higher-order lettable version of repeatWhen ([1d1cecd](https://github.com/ReactiveX/RxJS/commit/1d1cecd)) -- **retry:** add higher-order lettable version of retry ([28e9b13](https://github.com/ReactiveX/RxJS/commit/28e9b13)) -- **retryWhen:** add higher-order lettable version of retryWhen ([1290e3c](https://github.com/ReactiveX/RxJS/commit/1290e3c)) -- **sample:** add higher-order lettable version of sample ([8c73e6e](https://github.com/ReactiveX/RxJS/commit/8c73e6e)) -- **sampleTime:** add higher-order lettable version of sampleTime ([ba6a9ce](https://github.com/ReactiveX/RxJS/commit/ba6a9ce)) -- **scan:** add higher-order lettable version of scan ([2cc5d75](https://github.com/ReactiveX/RxJS/commit/2cc5d75)) -- **sequenceEqual:** add higher-order lettable version of sequenceEqual ([7cd3165](https://github.com/ReactiveX/RxJS/commit/7cd3165)) -- **share:** add higher-order lettable version of share ([f10c42e](https://github.com/ReactiveX/RxJS/commit/f10c42e)) -- **shareReplay:** add higher-order lettable version of shareReplay ([e8be197](https://github.com/ReactiveX/RxJS/commit/e8be197)) -- **single:** add higher-order lettable version of single ([3bc050a](https://github.com/ReactiveX/RxJS/commit/3bc050a)) -- **skip:** add higher-order lettable version of skip ([baed383](https://github.com/ReactiveX/RxJS/commit/baed383)) -- **skipLast:** add higher-order lettable version of skipLast ([6e1ff3c](https://github.com/ReactiveX/RxJS/commit/6e1ff3c)) -- **skipUntil:** add higher-order lettable version of skipUntil ([6cc2cd6](https://github.com/ReactiveX/RxJS/commit/6cc2cd6)) -- **skipWhile:** add higher-order lettable version of skipWhile ([76d8ffa](https://github.com/ReactiveX/RxJS/commit/76d8ffa)) -- **subscribeOn:** add higher-order lettable version of subscribeOn ([866af37](https://github.com/ReactiveX/RxJS/commit/866af37)) -- **switchAll:** add higher-order lettable version of switch ([2f12572](https://github.com/ReactiveX/RxJS/commit/2f12572)) -- **switchMap:** add higher-order lettable version of switchMap ([b6e5b56](https://github.com/ReactiveX/RxJS/commit/b6e5b56)) -- **switchMapTo:** add higher-order lettable version of switchMapTo ([2640184](https://github.com/ReactiveX/RxJS/commit/2640184)) -- **take:** add higher-order lettable version of take ([089a5a6](https://github.com/ReactiveX/RxJS/commit/089a5a6)) -- **takeLast:** add higher-order lettable version of takeLast ([cd7e7dd](https://github.com/ReactiveX/RxJS/commit/cd7e7dd)) -- **takeUntil:** add higher-order lettable version of takeUntil ([bb2ddaa](https://github.com/ReactiveX/RxJS/commit/bb2ddaa)) -- **takeWhile:** add higher-order lettable version of takeWhile ([f86c862](https://github.com/ReactiveX/RxJS/commit/f86c862)) -- **tap:** add higher-order lettable version of do ([f85c60e](https://github.com/ReactiveX/RxJS/commit/f85c60e)) -- **throttle:** add higher-order lettable version of throttle ([e4dd1fd](https://github.com/ReactiveX/RxJS/commit/e4dd1fd)) -- **throttleTime:** add higher-order lettable version of throttleTime ([34a592d](https://github.com/ReactiveX/RxJS/commit/34a592d)) -- **timeInterval:** add higher-order lettable version of timeInterval ([fcad034](https://github.com/ReactiveX/RxJS/commit/fcad034)) -- **timeout:** add higher-order lettable version of timeout ([2546750](https://github.com/ReactiveX/RxJS/commit/2546750)) -- **timeoutWith:** add higher-order lettable version of timeoutWith ([bd7f5ed](https://github.com/ReactiveX/RxJS/commit/bd7f5ed)) -- **timestamp:** add higher-order lettable version of timestamp ([a780bf2](https://github.com/ReactiveX/RxJS/commit/a780bf2)) -- **toArray:** add higher-order lettable version of toArray ([82480cf](https://github.com/ReactiveX/RxJS/commit/82480cf)) -- **toArray:** add higher-order lettable version of toArray ([a03a50c](https://github.com/ReactiveX/RxJS/commit/a03a50c)) -- **toPromise:** add higher-order lettable version of toPromise ([1627da2](https://github.com/ReactiveX/RxJS/commit/1627da2)) -- **window:** add higher-order lettable version of window ([9f6373e](https://github.com/ReactiveX/RxJS/commit/9f6373e)) -- **windowCount:** add higher-order lettable version of windowCount ([2a9e54c](https://github.com/ReactiveX/RxJS/commit/2a9e54c)) -- **windowTime:** add higher-order lettable version of windowTime ([29ffa1b](https://github.com/ReactiveX/RxJS/commit/29ffa1b)) -- **windowToggle:** add higher-order lettable version of windowToggle ([81ec389](https://github.com/ReactiveX/RxJS/commit/81ec389)) -- **windowWhen:** add higher-order lettable version of windowWhen ([0b73208](https://github.com/ReactiveX/RxJS/commit/0b73208)) -- **withLatestFrom:** add higher-order lettable version of withLatestFrom ([509c97c](https://github.com/ReactiveX/RxJS/commit/509c97c)) -- **zip:** add higher-order lettable version of zip ([8a9b9b2](https://github.com/ReactiveX/RxJS/commit/8a9b9b2)) -- **zipAll:** add higher-order lettable version of zipAll ([f6bd51f](https://github.com/ReactiveX/RxJS/commit/f6bd51f)) - - - -## [5.4.3](https://github.com/ReactiveX/RxJS/compare/5.4.2...v5.4.3) (2017-08-10) - -### Bug Fixes - -- **compilation:** compiles under typescript 2.4.2 ([#2780](https://github.com/ReactiveX/RxJS/issues/2780)) ([d2a32f9](https://github.com/ReactiveX/RxJS/commit/d2a32f9)) -- **exports:** add exports for missing static operators: generate, ([08c4196](https://github.com/ReactiveX/RxJS/commit/08c4196)) - - - -## [5.4.2](https://github.com/ReactiveX/RxJS/compare/5.4.1...v5.4.2) (2017-07-05) - -### Bug Fixes - -- **Notification:** Don't reference `this` from static methods. ([9f8e375](https://github.com/ReactiveX/RxJS/commit/9f8e375)) -- **Subject:** lift signature is now appropriate for stricter TypeScript 2.4 checks ([#2722](https://github.com/ReactiveX/RxJS/issues/2722)) ([9804de7](https://github.com/ReactiveX/RxJS/commit/9804de7)) - - - -## [5.4.1](https://github.com/ReactiveX/RxJS/compare/5.4.0...v5.4.1) (2017-06-14) - -### Bug Fixes - -- **ajax:** Only set timeout & responseType if request is asynchronous ([#2486](https://github.com/ReactiveX/RxJS/issues/2486)) ([380fbcf](https://github.com/ReactiveX/RxJS/commit/380fbcf)) -- **audit:** will now properly mirror source if durations are Observable.empty() ([#2595](https://github.com/ReactiveX/RxJS/issues/2595)) ([6ded82e](https://github.com/ReactiveX/RxJS/commit/6ded82e)) -- **elementAt:** will now properly unsubscribe when it completes or errors ([#2501](https://github.com/ReactiveX/RxJS/issues/2501)) ([a400cab](https://github.com/ReactiveX/RxJS/commit/a400cab)) -- **ErrorObservable:** will now propagate errors properly when used in a `catch` after `fromPromise`. ([#2552](https://github.com/ReactiveX/RxJS/issues/2552)) ([cf88a20](https://github.com/ReactiveX/RxJS/commit/cf88a20)) -- **groupBy:** group duration notifiers will now properly unsubscribe and clean up ([#2662](https://github.com/ReactiveX/RxJS/issues/2662)) ([ab92083](https://github.com/ReactiveX/RxJS/commit/ab92083)), closes [#2660](https://github.com/ReactiveX/RxJS/issues/2660) [#2661](https://github.com/ReactiveX/RxJS/issues/2661) -- **Observable:** errors thrown in observer/handlers without an operator applied will no longer be swallowed ([#2626](https://github.com/ReactiveX/RxJS/issues/2626)) ([c250afc](https://github.com/ReactiveX/RxJS/commit/c250afc)), closes [#2565](https://github.com/ReactiveX/RxJS/issues/2565) -- **reduce:** type definitions overloads for TypeScript are now in proper order ([#2523](https://github.com/ReactiveX/RxJS/issues/2523)) ([ccc0647](https://github.com/ReactiveX/RxJS/commit/ccc0647)) -- **Schedulers:** Fix issue where canceling an asap or animationFrame action early could throw ([#2638](https://github.com/ReactiveX/RxJS/issues/2638)) ([fc39043](https://github.com/ReactiveX/RxJS/commit/fc39043)) - - - -# [5.4.0](https://github.com/ReactiveX/RxJS/) (2017-05-09) - -### Features - -- **shareReplay:** adds `shareReplay` variant of `publishReplay` ([#2443](https://github.com/ReactiveX/RxJS/issues/2443)) ([5a2266a](https://github.com/ReactiveX/RxJS/commit/5a2266a)) -- **skipLast:** add skipLast operator ([#2316](https://github.com/ReactiveX/RxJS/issues/2316)) ([4ffbbe5](https://github.com/ReactiveX/RxJS/commit/4ffbbe5)), closes [#1404](https://github.com/ReactiveX/RxJS/issues/1404) -- **TypeScript:** fromPromise accepts PromiseLike object ([#2505](https://github.com/ReactiveX/RxJS/issues/2505)) ([ade1fd5](https://github.com/ReactiveX/RxJS/commit/ade1fd5)) - - - -## [5.3.3](https://github.com/ReactiveX/RxJS/compare/5.3.1...5.3.3) (2017-05-09) - -### Bug Fixes - -- **delayWhen:** correctly handle synchronous duration observable ([#2589](https://github.com/ReactiveX/RxJS/issues/2589)) ([695f280](https://github.com/ReactiveX/RxJS/commit/695f280)), closes [#2587](https://github.com/ReactiveX/RxJS/issues/2587) -- **race:** allow TypeScript support for array of observables other than rest param ([#2548](https://github.com/ReactiveX/RxJS/issues/2548)) ([ace553c](https://github.com/ReactiveX/RxJS/commit/ace553c)) -- **Subscriber:** do not call complete with undefined value param ([#2559](https://github.com/ReactiveX/RxJS/issues/2559)) ([3d63de2](https://github.com/ReactiveX/RxJS/commit/3d63de2)) - -**(NOTE: 5.3.2 was a broken release and was removed)** - - - -## [5.3.1](https://github.com/ReactiveX/RxJS/compare/5.3.0...v5.3.1) (2017-05-02) - -### Bug Fixes - -- **AsyncAction:** rescheduling an action with the same delay before it has executed will now schedule appropriately. ([#2580](https://github.com/ReactiveX/RxJS/issues/2580)) ([281760e](https://github.com/ReactiveX/RxJS/commit/281760e)) -- **closure:** make root.ts work with closure ([#2546](https://github.com/ReactiveX/RxJS/issues/2546)) ([0ecf55d](https://github.com/ReactiveX/RxJS/commit/0ecf55d)) -- **tests:** add missing babel-polyfill to package.json ([b277ce9](https://github.com/ReactiveX/RxJS/commit/b277ce9)), closes [#2261](https://github.com/ReactiveX/RxJS/issues/2261) -- **withLatestFrom:** change from hot to cold observable in marble test ([0c65446](https://github.com/ReactiveX/RxJS/commit/0c65446)), closes [#2526](https://github.com/ReactiveX/RxJS/issues/2526) - - - -# [5.3.0](https://github.com/ReactiveX/RxJS/compare/5.2.0...v5.3.0) (2017-04-03) - -### Bug Fixes - -- **catch:** return type is now the union of input types ([#2478](https://github.com/ReactiveX/RxJS/issues/2478)) ([840def0](https://github.com/ReactiveX/RxJS/commit/840def0)) -- **forEach:** fix a temporal dead zone issue in forEach. ([#2474](https://github.com/ReactiveX/RxJS/issues/2474)) ([e9e9801](https://github.com/ReactiveX/RxJS/commit/e9e9801)) -- **multicast:** Ensure ConnectableObservables returned by multicast are state-isolated. ([aaa9e6b](https://github.com/ReactiveX/RxJS/commit/aaa9e6b)) -- **reduce:** proper TypeScript signature overload ordering ([#2382](https://github.com/ReactiveX/RxJS/issues/2382)) ([f6a4951](https://github.com/ReactiveX/RxJS/commit/f6a4951)), closes [#2338](https://github.com/ReactiveX/RxJS/issues/2338) -- **SafeSubscriber:** SafeSubscriber shouldn't mutate incoming Observers. ([a1778e0](https://github.com/ReactiveX/RxJS/commit/a1778e0)) -- **timeout:** Cancels scheduled timeout, if no longer needed ([3e9d529](https://github.com/ReactiveX/RxJS/commit/3e9d529)), closes [#2134](https://github.com/ReactiveX/RxJS/issues/2134) [#2244](https://github.com/ReactiveX/RxJS/issues/2244) [#2355](https://github.com/ReactiveX/RxJS/issues/2355) [#2347](https://github.com/ReactiveX/RxJS/issues/2347) [#2353](https://github.com/ReactiveX/RxJS/issues/2353) [#2254](https://github.com/ReactiveX/RxJS/issues/2254) [#2372](https://github.com/ReactiveX/RxJS/issues/2372) [#1301](https://github.com/ReactiveX/RxJS/issues/1301) -- **zipAll:** complete when the source is empty ([712fece](https://github.com/ReactiveX/RxJS/commit/712fece)) - -### Features - -- **delayWhen:** add index to the selector function ([5d6291e](https://github.com/ReactiveX/RxJS/commit/5d6291e)) -- **symbol exports:** symbols now also exported without `$$` prefix to work with Babel UMD exporting ([#2435](https://github.com/ReactiveX/RxJS/issues/2435)) ([747bef6](https://github.com/ReactiveX/RxJS/commit/747bef6)), closes [#2415](https://github.com/ReactiveX/RxJS/issues/2415) - -### Performance Improvements - -- **bufferCount:** optimize bufferCount operator ([#2359](https://github.com/ReactiveX/RxJS/issues/2359)) ([28d0883](https://github.com/ReactiveX/RxJS/commit/28d0883)) - -### April Fools - -- **smooth:** `smooth()` was never really a thing. Sorry, folks. :D - - - -# [5.2.0](https://github.com/ReactiveX/RxJS/compare/5.1.1...v5.2.0) (2017-02-21) - -### Bug Fixes - -- **ajax:** will set `withCredentials` after `open` on XHR for IE10 ([#2332](https://github.com/ReactiveX/RxJS/issues/2332)) ([0ab1d3b](https://github.com/ReactiveX/RxJS/commit/0ab1d3b)) -- **bindCallback:** emit undefined when callback is without arguments ([915a2a8](https://github.com/ReactiveX/RxJS/commit/915a2a8)) -- **bindNodeCallback:** emit undefined when callback has no success arguments ([8b81fc6](https://github.com/ReactiveX/RxJS/commit/8b81fc6)), closes [#2254](https://github.com/ReactiveX/RxJS/issues/2254) -- **bindNodeCallback:** errors thrown in callback will be scheduled if a scheduler is provided ([#2344](https://github.com/ReactiveX/RxJS/issues/2344)) ([82ec4f1](https://github.com/ReactiveX/RxJS/commit/82ec4f1)) -- **concat:** will now return Observable when given a single object implementing Symbol.observable ([#2387](https://github.com/ReactiveX/RxJS/issues/2387)) ([f5d035a](https://github.com/ReactiveX/RxJS/commit/f5d035a)) -- **ErrorObservable:** remove type constraint to error value ([2f951cd](https://github.com/ReactiveX/RxJS/commit/2f951cd)), closes [#2395](https://github.com/ReactiveX/RxJS/issues/2395) -- **forkJoin:** add type signature for single observable with selector ([7983b91](https://github.com/ReactiveX/RxJS/commit/7983b91)), closes [#2347](https://github.com/ReactiveX/RxJS/issues/2347) -- **merge:** return Observable when called with single lowerCaseO ([85752eb](https://github.com/ReactiveX/RxJS/commit/85752eb)) -- **mergeAll:** introduce variant support for mergeMap ([656f2b3](https://github.com/ReactiveX/RxJS/commit/656f2b3)), closes [#2372](https://github.com/ReactiveX/RxJS/issues/2372) -- **single:** predicate function receives indices starting at 0 ([#2396](https://github.com/ReactiveX/RxJS/issues/2396)) ([c81882f](https://github.com/ReactiveX/RxJS/commit/c81882f)) -- **subscribeToResult:** accept array-like as result ([14685ba](https://github.com/ReactiveX/RxJS/commit/14685ba)) - -### Features - -- **webSocket:** Add binaryType to config object ([86acbd1](https://github.com/ReactiveX/RxJS/commit/86acbd1)), closes [#2353](https://github.com/ReactiveX/RxJS/issues/2353) -- **windowTime:** maxWindowSize parameter in windowTime operator ([381be3f](https://github.com/ReactiveX/RxJS/commit/381be3f)), closes [#1301](https://github.com/ReactiveX/RxJS/issues/1301) - - - -## [5.1.1](https://github.com/ReactiveX/RxJS/compare/5.1.0...v5.1.1) (2017-02-13) - -### Bug Fixes - -- **bindCallback:** input function context can now be properly set via output function ([#2319](https://github.com/ReactiveX/RxJS/issues/2319)) ([cb91c76](https://github.com/ReactiveX/RxJS/commit/cb91c76)) -- **bindNodeCallback:** input function context can now be properly set via output function ([#2320](https://github.com/ReactiveX/RxJS/issues/2320)) ([3ec315d](https://github.com/ReactiveX/RxJS/commit/3ec315d)) -- **Subscription:** fold ChildSubscription logic into Subscriber to prevent operators from leaking ChildSubscriptions. ([#2360](https://github.com/ReactiveX/RxJS/issues/2360)) ([22e4c17](https://github.com/ReactiveX/RxJS/commit/22e4c17)), closes [#2244](https://github.com/ReactiveX/RxJS/issues/2244) [#2355](https://github.com/ReactiveX/RxJS/issues/2355) - - - -# [5.1.0](https://github.com/ReactiveX/RxJS/compare/5.0.3...v5.1.0) (2017-02-01) - -### Bug Fixes - -- **catch:** update the catch operator to dispose inner subscriptions if the catch subscription is di ([#2271](https://github.com/ReactiveX/RxJS/issues/2271)) ([8a1e089](https://github.com/ReactiveX/RxJS/commit/8a1e089)) -- **combineLatest:** Don't mutate array of observables passed to ([#2276](https://github.com/ReactiveX/RxJS/issues/2276)) ([9b73c46](https://github.com/ReactiveX/RxJS/commit/9b73c46)) -- **ISubscription:** update type definition of ISubscription::closed ([#2249](https://github.com/ReactiveX/RxJS/issues/2249)) ([0c304a2](https://github.com/ReactiveX/RxJS/commit/0c304a2)) -- **Observable:** Ensure the generic type of the Observer passed to Observable's initializer function is the same. ([51a0bc1](https://github.com/ReactiveX/RxJS/commit/51a0bc1)), closes [#2166](https://github.com/ReactiveX/RxJS/issues/2166) -- **Observable:** errors thrown during subscription are now properly sent down error channel ([#2313](https://github.com/ReactiveX/RxJS/issues/2313)) ([d4a9aac](https://github.com/ReactiveX/RxJS/commit/d4a9aac)), closes [#1833](https://github.com/ReactiveX/RxJS/issues/1833) -- **reduce:** index will properly start at 1 if no seed is provided, to match native Array reduce behavior ([30a4ca4](https://github.com/ReactiveX/RxJS/commit/30a4ca4)), closes [#2290](https://github.com/ReactiveX/RxJS/issues/2290) -- **repeatWhen:** resulting observable will wait for the source to complete, even if a hot notifier completes first. ([#2209](https://github.com/ReactiveX/RxJS/issues/2209)) ([c65a098](https://github.com/ReactiveX/RxJS/commit/c65a098)), closes [#2054](https://github.com/ReactiveX/RxJS/issues/2054) -- **Subject:** ensure subject properly throws ObjectUnsubscribedError when unsubscribed then resubscribed to ([#2318](https://github.com/ReactiveX/RxJS/issues/2318)) ([41489eb](https://github.com/ReactiveX/RxJS/commit/41489eb)) -- **TestScheduler:** helper methods return proper types, `HotObservable` and `ColdObservable` instead of Observable ([#2305](https://github.com/ReactiveX/RxJS/issues/2305)) ([758aae9](https://github.com/ReactiveX/RxJS/commit/758aae9)) -- **windowTime:** ensure windows created when only a timespan is passed are closed and cleaned up properly. ([#2278](https://github.com/ReactiveX/RxJS/issues/2278)) ([d4533c4](https://github.com/ReactiveX/RxJS/commit/d4533c4)) - -### Features - -- **fromEventPattern:** support optional removeHandler ([86960c2](https://github.com/ReactiveX/RxJS/commit/86960c2)) -- **fromEventPattern:** support pass signal from addHandler to removeHandler ([01d0622](https://github.com/ReactiveX/RxJS/commit/01d0622)) - - - -## [5.0.3](https://github.com/ReactiveX/RxJS/compare/5.0.2...v5.0.3) (2017-01-05) - -### Bug Fixes - -- **observeOn:** seal memory leak involving old notifications ([9664a38](https://github.com/ReactiveX/RxJS/commit/9664a38)), closes [#2244](https://github.com/ReactiveX/RxJS/issues/2244) -- **Subscription:** `add` will return Subscription that `remove`s itself when unsubscribed ([375d4a5](https://github.com/ReactiveX/RxJS/commit/375d4a5)) -- **TypeScript:** interfaces that accepted `Scheduler` now accept `IScheduler` interface ([a0d28a8](https://github.com/ReactiveX/RxJS/commit/a0d28a8)) - - - -## [5.0.2](https://github.com/ReactiveX/RxJS/compare/5.0.1...v5.0.2) (2016-12-23) - -### Bug Fixes - -- **ajax:** upload progress is now set correctly ([#2200](https://github.com/ReactiveX/RxJS/issues/2200)) ([1a83041](https://github.com/ReactiveX/RxJS/commit/1a83041)) -- **groupBy:** Fix groupBy to dispose of outer subscription. ([#2201](https://github.com/ReactiveX/RxJS/issues/2201)) ([2269618](https://github.com/ReactiveX/RxJS/commit/2269618)) - - - -## [5.0.1](https://github.com/ReactiveX/RxJS/compare/5.0.0...v5.0.1) (2016-12-13) - -### Bug Fixes - -- **TypeScript:** pin to TypeScript 2.0.x, fix errors with Error subclassing ([300504c](https://github.com/ReactiveX/RxJS/commit/300504c)) - - - -# [5.0.0](https://github.com/ReactiveX/RxJS/compare/5.0.0-rc.5...v5.0.0) (2016-12-13) - -### Bug Fixes - -- **race:** unsubscribe raced observables with immediate scheduler ([#2158](https://github.com/ReactiveX/RxJS/issues/2158)) ([7dd533b](https://github.com/ReactiveX/RxJS/commit/7dd533b)) -- **SubscribeOnObservable:** Add the source subscription to the action disposable so the source will ([64e3815](https://github.com/ReactiveX/RxJS/commit/64e3815)) - - - -# [5.0.0-rc.5](https://github.com/ReactiveX/RxJS/compare/5.0.0-rc.4...v5.0.0-rc.5) (2016-12-07) - -### Bug Fixes - -- **AjaxObservable:** catch XHR send failures to observer ([#2159](https://github.com/ReactiveX/RxJS/issues/2159)) ([128fb9c](https://github.com/ReactiveX/RxJS/commit/128fb9c)) -- **distinctKey:** Removed accidental leftover reference of `distinctKey` ([9fd8096](https://github.com/ReactiveX/RxJS/commit/9fd8096)), closes [#2161](https://github.com/ReactiveX/RxJS/issues/2161) -- **errors:** Better error message when you return non-observable things, ([#2152](https://github.com/ReactiveX/RxJS/issues/2152)) ([86a909c](https://github.com/ReactiveX/RxJS/commit/86a909c)), closes [#215](https://github.com/ReactiveX/RxJS/issues/215) -- **event:** uses `Object.prototype.toString.call` on objects ([#2143](https://github.com/ReactiveX/RxJS/issues/2143)) ([e036e79](https://github.com/ReactiveX/RxJS/commit/e036e79)) -- **typings:** type guard support for `last`, `first`, `find` and `filter`. ([5f2e849](https://github.com/ReactiveX/RxJS/commit/5f2e849)) - -### Features - -- **timeout:** remove `errorToSend` argument, always throw TimeoutError ([#2172](https://github.com/ReactiveX/RxJS/issues/2172)) ([98ea3d2](https://github.com/ReactiveX/RxJS/commit/98ea3d2)) - -### BREAKING CHANGES - -- timeout: `timeout` no longer accepts the `errorToSend` argument - -related #2141 - - - -# [5.0.0-rc.4](https://github.com/ReactiveX/RxJS/compare/5.0.0-rc.3...v5.0.0-rc.4) (2016-11-19) - -### Bug Fixes - -- **partition:** handles `thisArg` as expected ([#2138](https://github.com/ReactiveX/RxJS/issues/2138)) ([6cf7296](https://github.com/ReactiveX/RxJS/commit/6cf7296)) -- **timeout:** throw traceable TimeoutError ([#2132](https://github.com/ReactiveX/RxJS/issues/2132)) ([9ebc46b](https://github.com/ReactiveX/RxJS/commit/9ebc46b)) - - - -# [5.0.0-rc.3](https://github.com/ReactiveX/RxJS/compare/5.0.0-rc.2...v5.0.0-rc.3) (2016-11-15) - -### Bug Fixes - -- **typings:** You no longer have to install the type definition for chai ([#2112](https://github.com/ReactiveX/rxjs/issues/2112)) - -### Features - -- **filter:** support type guards without casting ([68b7922](https://github.com/ReactiveX/RxJS/commit/68b7922)) -- **find:** support type guards without casting ([9058bf6](https://github.com/ReactiveX/RxJS/commit/9058bf6)) -- **first:** support type guards without casting ([3aa1988](https://github.com/ReactiveX/RxJS/commit/3aa1988)) -- **last:** support type guards without casting ([07ecd5e](https://github.com/ReactiveX/RxJS/commit/07ecd5e)) - - - -# [5.0.0-rc.2](https://github.com/ReactiveX/RxJS/compare/5.0.0-rc.1...v5.0.0-rc.2) (2016-11-05) - -### Bug Fixes - -- **AjaxObservable:** remove needless type param R from AjaxObservable.getJSON() ([#2069](https://github.com/ReactiveX/RxJS/issues/2069)) ([0c3d4a4](https://github.com/ReactiveX/RxJS/commit/0c3d4a4)) -- **bufferCount:** will behave as expected when `startBufferEvery` is less than `bufferSize` ([#2076](https://github.com/ReactiveX/RxJS/issues/2076)) ([d13dbb4](https://github.com/ReactiveX/RxJS/commit/d13dbb4)), closes [#2062](https://github.com/ReactiveX/RxJS/issues/2062) -- **build_docs:** fix doc building ([#1974](https://github.com/ReactiveX/RxJS/issues/1974)) ([1bbbe8b](https://github.com/ReactiveX/RxJS/commit/1bbbe8b)) -- **ErrorObservable:** Add generic error type for ErrorObservable. ([#2071](https://github.com/ReactiveX/RxJS/issues/2071)) ([9df86ba](https://github.com/ReactiveX/RxJS/commit/9df86ba)) -- **first:** will now only emit one value in recursive cases ([#2100](https://github.com/ReactiveX/RxJS/issues/2100)) ([a047e7a](https://github.com/ReactiveX/RxJS/commit/a047e7a)), closes [#2098](https://github.com/ReactiveX/RxJS/issues/2098) -- **fromEvent:** Throw if event target is invalid ([#2107](https://github.com/ReactiveX/RxJS/issues/2107)) ([147ce3e](https://github.com/ReactiveX/RxJS/commit/147ce3e)) -- **IteratorObservable:** clarify the return type of IteratorObservable.create() ([#2070](https://github.com/ReactiveX/RxJS/issues/2070)) ([4f0f865](https://github.com/ReactiveX/RxJS/commit/4f0f865)) -- **IteratorObservable:** Observables `from` generators will now finalize when subscription ends ([22d286a](https://github.com/ReactiveX/RxJS/commit/22d286a)), closes [#1938](https://github.com/ReactiveX/RxJS/issues/1938) -- **multicast:** fix a bug that caused multicast to omit messages after termination ([#2021](https://github.com/ReactiveX/RxJS/issues/2021)) ([44fbc14](https://github.com/ReactiveX/RxJS/commit/44fbc14)) -- **Notification:** `materialize` output will now match Rx4 ([#2106](https://github.com/ReactiveX/RxJS/issues/2106)) ([c83bab9](https://github.com/ReactiveX/RxJS/commit/c83bab9)), closes [#2105](https://github.com/ReactiveX/RxJS/issues/2105) -- **Object.assign:** stop polyfilling Object assign ([#2080](https://github.com/ReactiveX/RxJS/issues/2080)) ([b5f8ab3](https://github.com/ReactiveX/RxJS/commit/b5f8ab3)) -- **Observable/Ajax:** mount properties to origin readystatechange fn ([#2025](https://github.com/ReactiveX/RxJS/issues/2025)) ([76a9abb](https://github.com/ReactiveX/RxJS/commit/76a9abb)) -- **operator/do:** fix typings ([9a40297](https://github.com/ReactiveX/RxJS/commit/9a40297)) -- **reduce/scan:** both scan/reduce operators now accepts `undefined` itself as a valid seed ([#2050](https://github.com/ReactiveX/RxJS/issues/2050)) ([fee7585](https://github.com/ReactiveX/RxJS/commit/fee7585)), closes [#2047](https://github.com/ReactiveX/RxJS/issues/2047) -- **ReplaySubject:** observer now subscribed prior to running subscription function ([#2046](https://github.com/ReactiveX/RxJS/issues/2046)) ([fea08e9](https://github.com/ReactiveX/RxJS/commit/fea08e9)), closes [#2044](https://github.com/ReactiveX/RxJS/issues/2044) -- **sample:** source is now subscribed to before the notifier ([ffe99e8](https://github.com/ReactiveX/RxJS/commit/ffe99e8)), closes [#2075](https://github.com/ReactiveX/RxJS/issues/2075) -- **Symbol.iterator:** will not polyfill Symbol iterator unless Symbol exists ([#2082](https://github.com/ReactiveX/RxJS/issues/2082)) ([1138c99](https://github.com/ReactiveX/RxJS/commit/1138c99)) -- **typings:** fixed Subject.lift to have the same shape as Observable.lift ([b07f597](https://github.com/ReactiveX/RxJS/commit/b07f597)) -- **WebSocketSubject.prototype.multiplex:** no longer nulls out socket after first unsubscribe ([#2039](https://github.com/ReactiveX/RxJS/issues/2039)) ([a5e9cfe](https://github.com/ReactiveX/RxJS/commit/a5e9cfe)), closes [#2037](https://github.com/ReactiveX/RxJS/issues/2037) - -### Features - -- **distinct:** remove `distinctKey`, `distinct` signature change and perf improvements ([#2049](https://github.com/ReactiveX/RxJS/issues/2049)) ([89612b2](https://github.com/ReactiveX/RxJS/commit/89612b2)), closes [#2009](https://github.com/ReactiveX/RxJS/issues/2009) -- **groupBy:** Adds subjectSelector argument to groupBy ([#2023](https://github.com/ReactiveX/RxJS/issues/2023)) ([f94ceb9](https://github.com/ReactiveX/RxJS/commit/f94ceb9)) -- **typescript:** remove dependency to 3rd party es2015 definition ([#2027](https://github.com/ReactiveX/RxJS/issues/2027)) ([4c31974](https://github.com/ReactiveX/RxJS/commit/4c31974)), closes [#2016](https://github.com/ReactiveX/RxJS/issues/2016) - -### BREAKING CHANGES - -- Notification: `Notification.prototype.exception` is now `Notification.prototype.error` to match Rx4 semantics -- Symbol.iterator: RxJS will no longer polyfill `Symbol.iterator` if `Symbol` does not exist. This may break code that inadvertently relies on this behavior -- Object.assign: RxJS will no longer polyfill `Object.assign`. It does - not require `Object.assign` to function, however, your code may be - inadvertently relying on this polyfill. -- AjaxObservable: Observable.ajax.getJSON() now only supports a single type parameter, - `getJSON(url: string, headers?: Object): Observable`. - The extra type parameter it accepted previously was superfluous. -- distinct: `distinctKey` has been removed. Use `distinct` -- distinct: `distinct` operator has changed, first argument is an - optional `keySelector`. The custom `compare` function is no longer - supported. - - - -# [5.0.0-rc.1](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.12...v5.0.0-rc.1) (2016-10-11) - -### Bug Fixes - -- **AjaxObservable:** Fix for [#1921](https://github.com/ReactiveX/RxJS/issues/1921) exposed AjaxObservable unsubscription error calling xhr.abort(). ([4d23f87](https://github.com/ReactiveX/RxJS/commit/4d23f87)) -- **AnonymousSubject:** is now exposed on Rx namespace ([0a6f049](https://github.com/ReactiveX/RxJS/commit/0a6f049)), closes [#2002](https://github.com/ReactiveX/RxJS/issues/2002) -- **bufferTime:** no errors with take after bufferTime with maxBufferSize ([ecec640](https://github.com/ReactiveX/RxJS/commit/ecec640)), closes [#1944](https://github.com/ReactiveX/RxJS/issues/1944) -- **docs:** Fix esdoc for Observable.merge spread argument ([b794e9b](https://github.com/ReactiveX/RxJS/commit/b794e9b)) -- **Observer:** fix Observable#subscribe() signature to suggest correct usable ([459d2a2](https://github.com/ReactiveX/RxJS/commit/459d2a2)) -- **operator:** Fix take to complete when the source is re-entrant. ([86615cb](https://github.com/ReactiveX/RxJS/commit/86615cb)) -- **root:** find global context (window/self/global) in a more safe way ([a098132](https://github.com/ReactiveX/RxJS/commit/a098132)), closes [#1930](https://github.com/ReactiveX/RxJS/issues/1930) -- **schedulers:** Queue, Asap, and AnimationFrame Schedulers should be Async if delay > 0 ([d5c682c](https://github.com/ReactiveX/RxJS/commit/d5c682c)) -- **util/toSubscriber:** Supplies the Subscriber constructor with emptyObserver as destination if no ([8e7e4e3](https://github.com/ReactiveX/RxJS/commit/8e7e4e3)) -- **WebSocketSubject:** ensure all internal state properly reset when socket is nulled out ([62d242e](https://github.com/ReactiveX/RxJS/commit/62d242e)), closes [#1863](https://github.com/ReactiveX/RxJS/issues/1863) - -### Features - -- **cache:** remove `cache` operator ([1b23ace](https://github.com/ReactiveX/RxJS/commit/1b23ace)) -- **ES2015:** stop publishing `rxjs-es`, ES2015 output no longer included in `@reactivex/rxjs` package under `/dist/es6` ([6be9968](https://github.com/ReactiveX/RxJS/commit/6be9968)), closes [#1671](https://github.com/ReactiveX/RxJS/issues/1671) -- **filter:** Observable.filter() can take type guard as the predicate function ([d62fbf0](https://github.com/ReactiveX/RxJS/commit/d62fbf0)) -- **find:** Observable.find() can take type guard as the predicate function ([b952718](https://github.com/ReactiveX/RxJS/commit/b952718)) -- **first:** Observable.first() can take type guard as the predicate function ([f99ca49](https://github.com/ReactiveX/RxJS/commit/f99ca49)) -- **last:** Observable.last() can take type guard as the predicate function ([76a8a57](https://github.com/ReactiveX/RxJS/commit/76a8a57)) -- **operators:** Use lift in the operators that don't currently use lift. ([68af9ef](https://github.com/ReactiveX/RxJS/commit/68af9ef)) -- **TypeScript:** update TypeScript to v2.0 ([3478b0b](https://github.com/ReactiveX/RxJS/commit/3478b0b)) - -### BREAKING CHANGES - -- **cache:** The .cache() operator has been removed, pending further discussion ([1b23ace](https://github.com/ReactiveX/RxJS/commit/1b23ace)) -- ES2015: `rxjs-es` is no longer being published -- ES2015: `@reactivex/rxjs` no longer has `/dist/es6` output - -related #2016 -related #1992 - -- package.json: TypeScript definitions are now for TS 2.0 and higher - -Even if we use getter for class, they are marked with `readonly` properties -in d.ts. - -- operators: Removes MulticastObservable subclass in favor of a MulticastOperator. - - - -# [5.0.0-beta.12](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.11...v5.0.0-beta.12) (2016-09-09) - -### Bug Fixes - -- **ajaxObservable:** remove implicit dependency to map operator patch ([1744ae9](https://github.com/ReactiveX/RxJS/commit/1744ae9)), closes [#1874](https://github.com/ReactiveX/RxJS/issues/1874) -- **AjaxObservable:** return null value from JSON.Parse (#1904) ([6ba374e](https://github.com/ReactiveX/RxJS/commit/6ba374e)) -- **catch:** removed unneeded overload for catch ([dd0e586](https://github.com/ReactiveX/RxJS/commit/dd0e586)) -- **max:** do not return comparer values ([f454e93](https://github.com/ReactiveX/RxJS/commit/f454e93)), closes [#1892](https://github.com/ReactiveX/RxJS/issues/1892) -- **min:** do not return comparer values ([222fd17](https://github.com/ReactiveX/RxJS/commit/222fd17)), closes [#1892](https://github.com/ReactiveX/RxJS/issues/1892) -- **operators:** export reserved name operators on prototype ([34c39dd](https://github.com/ReactiveX/RxJS/commit/34c39dd)), closes [#1924](https://github.com/ReactiveX/RxJS/issues/1924) -- **VirtualTimeScheduler:** remove default maxFrame limit ([1de86f1](https://github.com/ReactiveX/RxJS/commit/1de86f1)), closes [#1889](https://github.com/ReactiveX/RxJS/issues/1889) -- **WebSocketSubject:** pass constructor errors onto observable ([49c7d67](https://github.com/ReactiveX/RxJS/commit/49c7d67)) - -### Features - -- **operator:** Add repeatWhen operator ([c288d88](https://github.com/ReactiveX/RxJS/commit/c288d88)) -- **sequenceEqual:** adds sequenceEqual operator ([3c30293](https://github.com/ReactiveX/RxJS/commit/3c30293)), closes [#1882](https://github.com/ReactiveX/RxJS/issues/1882) - - - -# [5.0.0-beta.11](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.10...v5.0.0-beta.11) (2016-08-09) - -### Bug Fixes - -- **ajaxObservable:** only set default Content-Type header when no body is sent (#1830) ([5a895e8](https://github.com/ReactiveX/RxJS/commit/5a895e8)) -- **AjaxObservable:** drop resultSelector support in ajax method ([7a77437](https://github.com/ReactiveX/RxJS/commit/7a77437)), closes [#1783](https://github.com/ReactiveX/RxJS/issues/1783) -- **AsyncSubject:** do not allow change value after complete ([801f282](https://github.com/ReactiveX/RxJS/commit/801f282)), closes [#1800](https://github.com/ReactiveX/RxJS/issues/1800) -- **BoundNodeCallbackObservable:** cast to `any` to access to private field in `source` ([54f342f](https://github.com/ReactiveX/RxJS/commit/54f342f)) -- **catch:** accept selector returns ObservableInput ([e55c62d](https://github.com/ReactiveX/RxJS/commit/e55c62d)), closes [#1857](https://github.com/ReactiveX/RxJS/issues/1857) -- **combineLatest:** emit unique array instances with the default projection ([2e30fd1](https://github.com/ReactiveX/RxJS/commit/2e30fd1)) -- **Observable.from:** standardise arguments (remove map/context) ([aa30af2](https://github.com/ReactiveX/RxJS/commit/aa30af2)) -- **schedulers:** fix asap and animationFrame schedulers to execute across async boundaries. (#182 ([548ec2a](https://github.com/ReactiveX/RxJS/commit/548ec2a)), closes [(#1820](https://github.com/(/issues/1820) [#1814](https://github.com/ReactiveX/RxJS/issues/1814) -- **subscribeToResult:** update subscription to iterables ([5d6339a](https://github.com/ReactiveX/RxJS/commit/5d6339a)) -- **WebSocketSubject:** prevent early close (#1831) ([848a527](https://github.com/ReactiveX/RxJS/commit/848a527)), closes [(#1831](https://github.com/(/issues/1831) - -### Features - -- **fromEvent:** Pass through event listener options (#1845) ([8f0dc01](https://github.com/ReactiveX/RxJS/commit/8f0dc01)) -- **PairsObservable:** add PairsObservable creation method ([26bafff](https://github.com/ReactiveX/RxJS/commit/26bafff)), closes [#1804](https://github.com/ReactiveX/RxJS/issues/1804) - -### BREAKING CHANGES - -- Observable.from: - Observable.from no longer supports the optional map function and associated context argument. - This change has been reflected in the related constructors and their properties have been standardised. -- AjaxObservable: ajax.\*() method no longer support resultSelector, encourage to use `map` instead - - - -# [5.0.0-beta.10](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.9...v5.0.0-beta.10) (2016-07-06) - -### Bug Fixes - -- **AjaxObservable:** ignore content-type for formdata (#1746) ([43d05e7](https://github.com/ReactiveX/RxJS/commit/43d05e7)) -- **AjaxObservable:** support withCredentials for CORS request ([8084572](https://github.com/ReactiveX/RxJS/commit/8084572)), closes [#1732](https://github.com/ReactiveX/RxJS/issues/1732) [#1711](https://github.com/ReactiveX/RxJS/issues/1711) -- **babel:** fix an issue where babel could not compile `Scheduler.async` (#1807) ([12c5c74](https://github.com/ReactiveX/RxJS/commit/12c5c74)), closes [(#1807](https://github.com/(/issues/1807) [#1806](https://github.com/ReactiveX/RxJS/issues/1806) -- **bufferTime:** handle closing context when synchronously unsubscribed ([4ce4433](https://github.com/ReactiveX/RxJS/commit/4ce4433)), closes [#1763](https://github.com/ReactiveX/RxJS/issues/1763) -- **multicast:** Fixes multicast with selector to create a new source connection per subscriber. ([c3ac852](https://github.com/ReactiveX/RxJS/commit/c3ac852)), closes [(#1774](https://github.com/(/issues/1774) -- **Subject:** allow optional next value in type definition ([3e0c6d9](https://github.com/ReactiveX/RxJS/commit/3e0c6d9)), closes [#1728](https://github.com/ReactiveX/RxJS/issues/1728) -- **WebSocketSubject:** respect WebSocketCtor, support source/destination arguments in constructor. (#179 ([cd8cdd0](https://github.com/ReactiveX/RxJS/commit/cd8cdd0)), closes [#1745](https://github.com/ReactiveX/RxJS/issues/1745) [#1784](https://github.com/ReactiveX/RxJS/issues/1784) - - - -# [5.0.0-beta.9](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.8...v5.0.0-beta.9) (2016-06-14) - -### Bug Fixes - -- **cache:** get correct caching behavior (#1765) ([cb0b806](https://github.com/ReactiveX/RxJS/commit/cb0b806)), closes [#1628](https://github.com/ReactiveX/RxJS/issues/1628) -- **ConnectableObservable:** fix ConnectableObservable connection handling issue ([41ce80c](https://github.com/ReactiveX/RxJS/commit/41ce80c)) -- **typings:** make HotObservable.\_subscribe protected ([1c3d6ea](https://github.com/ReactiveX/RxJS/commit/1c3d6ea)) -- **WebSocketSubject:** WebSocketSubject will now chain operators properly (#1752) ([bf54db4](https://github.com/ReactiveX/RxJS/commit/bf54db4)), closes [#1745](https://github.com/ReactiveX/RxJS/issues/1745) -- **window:** don't track internal window subjects as subscriptions. ([f3357b9](https://github.com/ReactiveX/RxJS/commit/f3357b9)) - -### Performance Improvements - -- **fromEventPattern:** ~3x improvement in speed ([3dc1c00](https://github.com/ReactiveX/RxJS/commit/3dc1c00)) - - - -# [5.0.0-beta.8](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.7...v5.0.0-beta.8) (2016-05-22) - -### Bug Fixes - -- **AnonymousSubject:** allow anonymous observers as destination ([0e2c28b](https://github.com/ReactiveX/RxJS/commit/0e2c28b)) -- **combineLatest:** rxjs/observable/combineLatest is now properly exported ([21fab73](https://github.com/ReactiveX/RxJS/commit/21fab73)), closes [#1722](https://github.com/ReactiveX/RxJS/issues/1722) -- **ConnectableObservable:** fix race conditions in ConnectableObservable and refCount. ([d1412bc](https://github.com/ReactiveX/RxJS/commit/d1412bc)) -- **Rx:** remove kitchenSink and DOM, let Rx export all ([f5090b4](https://github.com/ReactiveX/RxJS/commit/f5090b4)), closes [#1650](https://github.com/ReactiveX/RxJS/issues/1650) -- **ScalarObservable:** set \_isScalar to false when initialized with a scheduler ([5037b3a](https://github.com/ReactiveX/RxJS/commit/5037b3a)) -- **Subject:** correct Subject behaviors to be more like Rx4 ([ba9ef2b](https://github.com/ReactiveX/RxJS/commit/ba9ef2b)) -- **subscriptions:** fixes bug that tracked subscriber subscriptions twice. ([29ff794](https://github.com/ReactiveX/RxJS/commit/29ff794)) - -### Features - -- **bufferTime:** add `maxBufferSize` optional argument ([cf45540](https://github.com/ReactiveX/RxJS/commit/cf45540)), closes [#1295](https://github.com/ReactiveX/RxJS/issues/1295) -- **multicast:** subjectfactory allows selectors ([32fa3a4](https://github.com/ReactiveX/RxJS/commit/32fa3a4)) -- **onErrorResumeNext:** add onErrorResumeNext operator ([51e022b](https://github.com/ReactiveX/RxJS/commit/51e022b)), closes [#1665](https://github.com/ReactiveX/RxJS/issues/1665) -- **publish:** support optional selectors ([0e5991d](https://github.com/ReactiveX/RxJS/commit/0e5991d)), closes [#1629](https://github.com/ReactiveX/RxJS/issues/1629) - -### Performance Improvements - -- **combineLatest:** avoid splice and indexOf ([33599cd](https://github.com/ReactiveX/RxJS/commit/33599cd)) - -### BREAKING CHANGES - -- Subject: Subjects no longer duck-type as Subscriptions -- Subject: Subjects will no longer throw when re-subscribed to if they are not unsubscribed -- Subject: Subjects no longer automatically unsubscribe when completed or errored - BREAKING CHANGE: Minor scheduling changes to groupBy to ensure proper emission ordering -- Rx: `Rx.kitchenSink` and `Rx.DOM` are removed, `Rx` - export everything. - - - -# [5.0.0-beta.7](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.6...v5.0.0-beta.7) (2016-04-27) - -### Bug Fixes - -- **race:** handle observables completes immediately ([abac3d1](https://github.com/ReactiveX/RxJS/commit/abac3d1)), closes [#1615](https://github.com/ReactiveX/RxJS/issues/1615) -- **scan:** accumulator passes current index ([a3ec896](https://github.com/ReactiveX/RxJS/commit/a3ec896)), closes [#1614](https://github.com/ReactiveX/RxJS/issues/1614) - -### Features - -- **Observable.generate:** add generate static creation method ([c03434c](https://github.com/ReactiveX/RxJS/commit/c03434c)) - - - -# [5.0.0-beta.6](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.5...v5.0.0-beta.6) (2016-04-12) - -### Bug Fixes - -- **AjaxObservable:** support json responseType on IE ([bba13d8](https://github.com/ReactiveX/RxJS/commit/bba13d8)), closes [#1381](https://github.com/ReactiveX/RxJS/issues/1381) -- **bufferToggle:** accepts closing selector returns promise ([b1c575c](https://github.com/ReactiveX/RxJS/commit/b1c575c)) -- **bufferToggle:** accepts promise as openings ([3d22c7a](https://github.com/ReactiveX/RxJS/commit/3d22c7a)) -- **bufferToggle:** handle closingSelector completes immediately ([02239fb](https://github.com/ReactiveX/RxJS/commit/02239fb)) -- **typings:** explicitly export typings for arguments to functions that destructure configuration objects ([ef305af](https://github.com/ReactiveX/RxJS/commit/ef305af)) - -### Features - -- **UnsubscriptionError:** add messages from inner errors to output message ([dd01279](https://github.com/ReactiveX/RxJS/commit/dd01279)), closes [#1590](https://github.com/ReactiveX/RxJS/issues/1590) - -### Performance Improvements - -- **DeferSubscriber:** split up 'tryDefer()' into a method to call a factory function. ([566f46b](https://github.com/ReactiveX/RxJS/commit/566f46b)) - - - -# [5.0.0-beta.5](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.4...v5.0.0-beta.5) (2016-04-05) - -### Bug Fixes - -- **take:** make 'take' unsubscribe when it reaches the total ([9858aa3](https://github.com/ReactiveX/RxJS/commit/9858aa3)) - -### BREAKING CHANGES - -- Operator: `Operator.prototype.call` has been refactored to include both the destination Subscriber, and the source Observable - the Operator is now responsible for describing it's own subscription process. ([26423f4](https://github.com/ReactiveX/rxjs/pull/1570/commits/26423f4)) - - - -# [5.0.0-beta.4](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.3...v5.0.0-beta.4) (2016-03-29) - -### Bug Fixes - -- **AjaxObservable:** enhance compatibility ([0ac7e1e](https://github.com/ReactiveX/RxJS/commit/0ac7e1e)) -- **Observable.if:** accept promise as source ([147166e](https://github.com/ReactiveX/RxJS/commit/147166e)) -- **mergeMap:** allow concurrent to be set as the second argument for mergeMap and mergeMapTo ([c003468](https://github.com/ReactiveX/RxJS/commit/c003468)) -- **observable:** ensure the subscriber chain is complete before calling this.\_subscribe ([1631224](https://github.com/ReactiveX/RxJS/commit/1631224)) -- **Symbol:** fixed issue where \$\$observable is not defined ([e66b2d8](https://github.com/ReactiveX/RxJS/commit/e66b2d8)) -- **Observable.using:** accepts factory returns promise ([f8d7d1b](https://github.com/ReactiveX/RxJS/commit/f8d7d1b)) -- **windowToggle:** handle closingSelector completes immediately ([c755587](https://github.com/ReactiveX/RxJS/commit/c755587)), closes [#1487](https://github.com/ReactiveX/RxJS/issues/1487) - -### Features - -- **ajax:** add FormData support in AjaxObservable and add percent encoding for parameters ([1f6119c](https://github.com/ReactiveX/RxJS/commit/1f6119c)) -- **Subscription:** `add()` now returns a Subscription reference ([a3f4552](https://github.com/ReactiveX/RxJS/commit/a3f4552)) -- **timestamp:** add timestamp operator ([80b1646](https://github.com/ReactiveX/RxJS/commit/80b1646)), closes [#1515](https://github.com/ReactiveX/RxJS/issues/1515) - -### Performance Improvements - -- **forkJoin:** improve forkJoin perf slightly by removing unnecessary context tracking ([280b985](https://github.com/ReactiveX/RxJS/commit/280b985)) - -### BREAKING CHANGES - -- Observable: `Observable.fromArray` was removed since it's deprecated on RxJS 4. You should use `Observable.from` instead. - - - -# [5.0.0-beta.3](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.2...v5.0.0-beta.3) (2016-03-21) - -### Bug Fixes - -- **AjaxObservable:** update type definition for AjaxObservable ([3f5c269](https://github.com/ReactiveX/RxJS/commit/3f5c269)), closes [#1382](https://github.com/ReactiveX/RxJS/issues/1382) -- **deferObservable:** accepts factory returns promise ([0cb44e1](https://github.com/ReactiveX/RxJS/commit/0cb44e1)) -- **do:** fix do operator to invoke observer message handlers in the right context. ([67a2f25](https://github.com/ReactiveX/RxJS/commit/67a2f25)) -- **exhaustMap:** remove innersubscription when it completes ([7ca0859](https://github.com/ReactiveX/RxJS/commit/7ca0859)) -- **forEach:** ensure that teardown logic is called when nextHandler throws ([c50f528](https://github.com/ReactiveX/RxJS/commit/c50f528)), closes [#1411](https://github.com/ReactiveX/RxJS/issues/1411) -- **forkJoin:** accepts observables emitting null or undefined ([6279d6b](https://github.com/ReactiveX/RxJS/commit/6279d6b)), closes [#1362](https://github.com/ReactiveX/RxJS/issues/1362) -- **forkJoin:** dispose the inner subscriptions when the outer subscription is disposed ([c7bf30c](https://github.com/ReactiveX/RxJS/commit/c7bf30c)) -- **FutureAction:** add support for periodic scheduling with setInterval instead of setTimeout ([c4f5408](https://github.com/ReactiveX/RxJS/commit/c4f5408)) -- **Observable:** introduce Subscribable interface that will be used instead of Observable in input ([2256e7b](https://github.com/ReactiveX/RxJS/commit/2256e7b)) -- **Observable.prototype.forEach:** removed thisArg to match es-observable spec ([d5f1bcd](https://github.com/ReactiveX/RxJS/commit/d5f1bcd)) -- **package.json:** install typings only after packages are installed ([a48d796](https://github.com/ReactiveX/RxJS/commit/a48d796)) -- **Schedulers:** ensure schedulers can be reused after error in execution ([202b79a](https://github.com/ReactiveX/RxJS/commit/202b79a)) -- **takeLast:** fix takeLast behavior to emit correct order ([73eb658](https://github.com/ReactiveX/RxJS/commit/73eb658)), closes [#1407](https://github.com/ReactiveX/RxJS/issues/1407) -- **typings:** set map function parameter for Observable.from as optional ([efa4dc3](https://github.com/ReactiveX/RxJS/commit/efa4dc3)) - -### Features - -- **AsyncScheduler:** add AsyncScheduler implementation ([4486c1f](https://github.com/ReactiveX/RxJS/commit/4486c1f)) -- **if:** add static Observable.if creation operator. ([f7ff7ec](https://github.com/ReactiveX/RxJS/commit/f7ff7ec)) -- **let:** adds the let operator to Rx.KitchenSink ([dca6504](https://github.com/ReactiveX/RxJS/commit/dca6504)) -- **using:** add static Observable.using creation operator. ([6c76593](https://github.com/ReactiveX/RxJS/commit/6c76593)) - -### BREAKING CHANGES - -- Observable.prototype.forEach: thisArg removed to match es-observable spec - - - -# [5.0.0-beta.2](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.1...v5.0.0-beta.2) (2016-02-10) - -### Bug Fixes - -- **ajax:** fixes error in Chrome accessing responseText when responseType isn't text. ([f3e2f73](https://github.com/ReactiveX/RxJS/commit/f3e2f73)) -- **benchpress:** fix issues with benchmarks ([16894bb](https://github.com/ReactiveX/RxJS/commit/16894bb)) -- **every:** remove eager predicate calls ([74c2c44](https://github.com/ReactiveX/RxJS/commit/74c2c44)) -- **forkJoin:** fix forkJoin to complete if sources Array is empty. ([412b13b](https://github.com/ReactiveX/RxJS/commit/412b13b)) -- **groupBy:** does not emit on unsubscribed group ([6d08705](https://github.com/ReactiveX/RxJS/commit/6d08705)) -- **groupBy:** fix groupBy to use lift(), supports composability ([815cfae](https://github.com/ReactiveX/RxJS/commit/815cfae)), closes [#1085](https://github.com/ReactiveX/RxJS/issues/1085) -- **merge/concat:** passed scalar observables will now complete properly ([c01b92f](https://github.com/ReactiveX/RxJS/commit/c01b92f)), closes [#1150](https://github.com/ReactiveX/RxJS/issues/1150) -- **MergeMapSubscriber:** clarify type definitions for MergeMapSubscriber's members ([4ee5f02](https://github.com/ReactiveX/RxJS/commit/4ee5f02)) -- **Observable.forEach:** errors thrown in nextHandler reject returned promise ([c5ead88](https://github.com/ReactiveX/RxJS/commit/c5ead88)), closes [#1184](https://github.com/ReactiveX/RxJS/issues/1184) -- **Observer:** fix typing to allow observation via partial observables with PartialObservable and lift ([603c9eb](https://github.com/ReactiveX/RxJS/commit/603c9eb)) -- **windowTime:** does not emit on unsubscribed window ([595f4ef](https://github.com/ReactiveX/RxJS/commit/595f4ef)) - -### Features - -- **cache:** add cache operator ([4308a04](https://github.com/ReactiveX/RxJS/commit/4308a04)) -- **delayWhen:** add delayWhen operator ([17122f9](https://github.com/ReactiveX/RxJS/commit/17122f9)) -- **distinct:** add distinct operator ([94a034d](https://github.com/ReactiveX/RxJS/commit/94a034d)) -- **distinctKey:** add distinctKey operator ([fe4d57f](https://github.com/ReactiveX/RxJS/commit/fe4d57f)) -- **from:** allow Observable.from to handle array-like objects ([7245005](https://github.com/ReactiveX/RxJS/commit/7245005)) -- **MapPolyfill:** implement clear interface ([e3fbd05](https://github.com/ReactiveX/RxJS/commit/e3fbd05)) -- **operator:** adds inspect and inspectTime operators ([54f957b](https://github.com/ReactiveX/RxJS/commit/54f957b)) -- **OuterSubscriber:** notifyNext passes innersubscriber when next emits ([1df8928](https://github.com/ReactiveX/RxJS/commit/1df8928)), closes [#1250](https://github.com/ReactiveX/RxJS/issues/1250) -- **Subject:** implement asObservable ([aca3dd0](https://github.com/ReactiveX/RxJS/commit/aca3dd0)), closes [#1108](https://github.com/ReactiveX/RxJS/issues/1108) -- **takeLast:** adds takeLast operator. ([3583cd3](https://github.com/ReactiveX/RxJS/commit/3583cd3)) - -### Performance Improvements - -- **catch:** remove tryCatch/errorObject for custom tryCatching, 1.3M -> 1.5M ops/sec ([35caf74](https://github.com/ReactiveX/RxJS/commit/35caf74)) -- **combineLatest:** remove tryCatch/errorObject, 156k -> 221k ops/sec ([1c7d639](https://github.com/ReactiveX/RxJS/commit/1c7d639)) -- **count:** remove tryCatch/errorObject for custom tryCatching, 1.84M -> 1.97M ops/sec ([869718d](https://github.com/ReactiveX/RxJS/commit/869718d)) -- **debounce:** remove tryCatch/errorObject for custom tryCatching ([90bf3f1](https://github.com/ReactiveX/RxJS/commit/90bf3f1)) -- **distinct:** increase perf from 60% of Rx4 to 1000% Rx4 ([d026c41](https://github.com/ReactiveX/RxJS/commit/d026c41)) -- **do:** remove tryCatch/errorObject use, 104k -> 263k ops/sec improvement ([ccba39d](https://github.com/ReactiveX/RxJS/commit/ccba39d)) -- **every:** remove tryCatch/errorObject (~1.8x improvement) ([14afeb6](https://github.com/ReactiveX/RxJS/commit/14afeb6)) -- **exhaustMap:** remove tryCatch/errorObject (~10% improvement) ([a55f459](https://github.com/ReactiveX/RxJS/commit/a55f459)) -- **filter:** remove tryCatch/errorObject for 2x perf improvement ([086c4bf](https://github.com/ReactiveX/RxJS/commit/086c4bf)) -- **find:** remove tryCatch/errorObject (~2x improvement) ([aa35b2a](https://github.com/ReactiveX/RxJS/commit/aa35b2a)) -- **first:** remove tryCatch/errorObject for custom tryCatching, 970k ops -> 1.27M ops/sec ([d8c835a](https://github.com/ReactiveX/RxJS/commit/d8c835a)) -- **groupBy:** remove tryCatch/errorObject for custom tryCatching, 38% faster. ([40c43f7](https://github.com/ReactiveX/RxJS/commit/40c43f7)) -- **last:** remove tryCatch/errorObject for custom tryCatching, 960k -> 1.38M ops/sec ([243ace3](https://github.com/ReactiveX/RxJS/commit/243ace3)) -- **map:** 2x increase from removing tryCatch/errorObject ([231f729](https://github.com/ReactiveX/RxJS/commit/231f729)) -- **mergeMap:** extra 1x factor gains from custom tryCatch member function ([c4ce2fb](https://github.com/ReactiveX/RxJS/commit/c4ce2fb)) -- **mergeMapTo:** remove tryCatch/errorObject (~2x improvement) ([42bcced](https://github.com/ReactiveX/RxJS/commit/42bcced)) -- **reduce:** remove tryCatch/errorObject, optimize calls, 2-3x perf improvement ([6186d46](https://github.com/ReactiveX/RxJS/commit/6186d46)) -- **scan:** remove tryCatch/errorObject for custom tryCatcher 1.75x improvement ([338135d](https://github.com/ReactiveX/RxJS/commit/338135d)) -- **single:** remove tryCatch/errorObject (~2.5x improvement) ([2515cfb](https://github.com/ReactiveX/RxJS/commit/2515cfb)) -- **skipWhile:** remove tryCatch/errorObject (~1.6x improvement) ([cf002db](https://github.com/ReactiveX/RxJS/commit/cf002db)) -- **Subscriber:** double performance adding tryOrUnsub to Subscriber ([4e75466](https://github.com/ReactiveX/RxJS/commit/4e75466)) -- **switchMap:** remove tryCatch/errorObject ~20% improvement ([ec0199f](https://github.com/ReactiveX/RxJS/commit/ec0199f)) -- **switchMapTo:** remove tryCatch/errorObject (~2x improvement) ([c8cf72a](https://github.com/ReactiveX/RxJS/commit/c8cf72a)) -- **takeWhile:** remove tryCatch/errorObject (~6x improvement) ([ef6c3c3](https://github.com/ReactiveX/RxJS/commit/ef6c3c3)) -- **withLatestFrom:** remove tryCatch/errorObject, 92k -> 107k (16% improvement) ([e4ccb44](https://github.com/ReactiveX/RxJS/commit/e4ccb44)) -- **zip:** extra 1x-2x factor gains from custom tryCatch member function ([a1b0e52](https://github.com/ReactiveX/RxJS/commit/a1b0e52)) - -### BREAKING CHANGES - -- Subject: Subject.create arguments have been swapped to match Rx 4 signature. `Subject.create(observable, observer)` is now `Subject.create(observer, observable)` -- Observable patching: Patch files for static observable methods such as `of` and `from` can now be found in `rxjs/add/observable/of`, `rxjs/add/observable/from`, etc. -- Observable modules: Observable modules for subclassed Observables like `PromiseObservable`, `ArrayObservable` are now in appropriately named files like `rxjs/observable/PromiseObservable` and `rxjs/observable/ArrayObservable` - as opposed to `rxjs/observable/fromPromise` and `rxjs/observable/fromArray`, since they're not patching, they simply house the Observable implementations. - - - -# [5.0.0-beta.1](https://github.com/ReactiveX/RxJS/compare/5.0.0-beta.0...v5.0.0-beta.1) (2016-01-13) - -### Bug Fixes - -- **ajax:** ensure post sending values ([7aae0a3](https://github.com/ReactiveX/RxJS/commit/7aae0a3)) -- **ajax:** ensure that headers are set properly ([1100bdd](https://github.com/ReactiveX/RxJS/commit/1100bdd)) -- **ajax:** ensure XHR props are set after open ([4a6a579](https://github.com/ReactiveX/RxJS/commit/4a6a579)) -- **ajax:** ensure XHR send is being called ([c569e3e](https://github.com/ReactiveX/RxJS/commit/c569e3e)) -- **ajax:** remove unnecessary onAbort handling ([ed8240e](https://github.com/ReactiveX/RxJS/commit/ed8240e)) -- **ajax:** response properly based off responseType ([b2a27a2](https://github.com/ReactiveX/RxJS/commit/b2a27a2)) -- **ajax:** should no longer succeed on 300 status ([4d4fa32](https://github.com/ReactiveX/RxJS/commit/4d4fa32)) -- **animationFrame:** req/cancel animationFrame has to be called within the context of root. ([30a11ee](https://github.com/ReactiveX/RxJS/commit/30a11ee)) -- **debounceTime:** align value emit behavior as same as RxJS4 ([5ee11e0](https://github.com/ReactiveX/RxJS/commit/5ee11e0)), closes [#1081](https://github.com/ReactiveX/RxJS/issues/1081) -- **distinctUntilChanged:** implement optional keySelector ([f6a897c](https://github.com/ReactiveX/RxJS/commit/f6a897c)) -- **fromEvent:** added spread operator for emitters that pass multiple arguments ([3f8eabb](https://github.com/ReactiveX/RxJS/commit/3f8eabb)) -- **fromObservable:** expand compatibility for iterating string source ([8f7924f](https://github.com/ReactiveX/RxJS/commit/8f7924f)), closes [#1147](https://github.com/ReactiveX/RxJS/issues/1147) -- **Immediate:** update setImmediate compatibility on IE ([39e6c0e](https://github.com/ReactiveX/RxJS/commit/39e6c0e)), closes [#1163](https://github.com/ReactiveX/RxJS/issues/1163) -- **inspect:** remove inspect and inspectTime operators ([17341a4](https://github.com/ReactiveX/RxJS/commit/17341a4)) -- **Readme:** update link to bundle on npmcdn ([44a8ca7](https://github.com/ReactiveX/RxJS/commit/44a8ca7)) -- **ReplaySubject:** Fix case-sensitive import. ([de31f32](https://github.com/ReactiveX/RxJS/commit/de31f32)) -- **ScalarObservable:** fix issue where scalar map fired twice ([c18c42e](https://github.com/ReactiveX/RxJS/commit/c18c42e)), closes [#1142](https://github.com/ReactiveX/RxJS/issues/1142) [#1140](https://github.com/ReactiveX/RxJS/issues/1140) -- **scheduling:** Fixes bugs in scheduled actions. ([e050f01](https://github.com/ReactiveX/RxJS/commit/e050f01)) -- **Subscriber:** errors in nextHandler no longer propagate to errorHandler ([f42eed2](https://github.com/ReactiveX/RxJS/commit/f42eed2)), closes [#1135](https://github.com/ReactiveX/RxJS/issues/1135) -- **WebSocketSubject:** ensure error codes passed to WebSocket close method ([3b1655e](https://github.com/ReactiveX/RxJS/commit/3b1655e)) -- **WebSocketSubject:** ensure WebSocketSubject can be resubscribed ([861a0c1](https://github.com/ReactiveX/RxJS/commit/861a0c1)) -- **WebSocketSubject:** resultSelector and protocols specifications work properly ([580f69a](https://github.com/ReactiveX/RxJS/commit/580f69a)) - -### Features - -- **ajax:** add resultSelector and improve perf ([6df755f](https://github.com/ReactiveX/RxJS/commit/6df755f)) -- **ajax:** adds ajax methods from rx-dom. ([2ca4236](https://github.com/ReactiveX/RxJS/commit/2ca4236)) -- **bindNodeCallback:** add Observable.bindNodeCallback ([497bb0d](https://github.com/ReactiveX/RxJS/commit/497bb0d)), closes [#736](https://github.com/ReactiveX/RxJS/issues/736) -- **Observable:** add let to allow fluent style query building ([5a2014c](https://github.com/ReactiveX/RxJS/commit/5a2014c)) -- **Observable:** add pairwise operator ([1432e59](https://github.com/ReactiveX/RxJS/commit/1432e59)) -- **Operator:** Expose the Operator interface to library consumers ([29aa3af](https://github.com/ReactiveX/RxJS/commit/29aa3af)) -- **pluck:** add pluck operator ([8026906](https://github.com/ReactiveX/RxJS/commit/8026906)), closes [#1134](https://github.com/ReactiveX/RxJS/issues/1134) -- **race:** add race operator ([ee3b593](https://github.com/ReactiveX/RxJS/commit/ee3b593)) -- **scheduler:** adds animationFrame scheduler. ([e637b78](https://github.com/ReactiveX/RxJS/commit/e637b78)) -- **WebSocketSubject:** add basic WebSocketSubject implementation ([58cd806](https://github.com/ReactiveX/RxJS/commit/58cd806)) -- **WebSocketSubject.multiplex:** add multiplex operator to WebSocketSubject ([904d617](https://github.com/ReactiveX/RxJS/commit/904d617)) - -### BREAKING CHANGES - -- inspect: `inspect` and `inspectTime` were removed. Use `withLatestFrom` instead. -- Subscriber/Observable: errors thrown in nextHandlers by consumer code will no longer propagate to the errorHandler. - - - -# [5.0.0-beta.0](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.14...v5.0.0-beta.0) (2015-12-15) - -### Bug Fixes - -- **micro-perf:** rename immediate to queue scheduler ([fe56b28](https://github.com/ReactiveX/RxJS/commit/fe56b28)), closes [#1040](https://github.com/ReactiveX/RxJS/issues/1040) -- **micro-perf:** use the current scheduler on current-thread tests ([3dff5eb](https://github.com/ReactiveX/RxJS/commit/3dff5eb)) -- **operators:** emit declarations for patch modules ([676f82d](https://github.com/ReactiveX/RxJS/commit/676f82d)) -- **test:** make explicit unsubscription for observable ([7f67b09](https://github.com/ReactiveX/RxJS/commit/7f67b09)) -- **test:** make explicit unsubscription for observable ([65e65e2](https://github.com/ReactiveX/RxJS/commit/65e65e2)) -- **window:** fix window() to dispose window Subjects ([5168f73](https://github.com/ReactiveX/RxJS/commit/5168f73)) -- **windowCount:** fix windowCount to dispose window Subjects ([f29ee29](https://github.com/ReactiveX/RxJS/commit/f29ee29)) -- **windowTime:** fix windowTime to dispose window Subjects ([b73e260](https://github.com/ReactiveX/RxJS/commit/b73e260)) -- **windowToggle:** fix windowToggle to dispose window Subjects ([15ff3f7](https://github.com/ReactiveX/RxJS/commit/15ff3f7)) -- **windowWhen:** fix windowWhen to dispose window Subjects ([91c1941](https://github.com/ReactiveX/RxJS/commit/91c1941)) - -### Features - -- **inspect:** added inspect operator ([f9944ae](https://github.com/ReactiveX/RxJS/commit/f9944ae)) -- **inspectTime:** add inspectTime operator ([6835dcd](https://github.com/ReactiveX/RxJS/commit/6835dcd)) -- **sample:** readd `sample` operator ([e93bffc](https://github.com/ReactiveX/RxJS/commit/e93bffc)) -- **sampleTime:** reimplement `sampleTime` with RxJS 4 behavior ([6b77e69](https://github.com/ReactiveX/RxJS/commit/6b77e69)) -- **TestScheduler:** add createTime() parser to return number ([cb8cf6b](https://github.com/ReactiveX/RxJS/commit/cb8cf6b)) - -### BREAKING CHANGES - -- sampleTime: `sampleTime` now has the same behavior `sample(number, scheduler)` did in RxJS 4 -- sample: `sample` behavior returned to RxJS 4 behavior -- inspectTime: `sampleTime` is now `inspectTime` -- inspect: RxJS 5 `sample` behavior is now `inspect` -- extended operators: All extended operators are now under the same operator directory as all others. This means that - `import "rxjs/add/operator/extended/min"` is now `import "rxjs/add/operator/min"` - - - -# [5.0.0-alpha.14](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.13...v5.0.0-alpha.14) (2015-12-09) - -### Bug Fixes - -- **every:** handle thisArg for scalar and array observables ([eae4b00](https://github.com/ReactiveX/RxJS/commit/eae4b00)) -- **SymbolShim:** ensure for function even if Symbol already exists ([e942776](https://github.com/ReactiveX/RxJS/commit/e942776)), closes [#999](https://github.com/ReactiveX/RxJS/issues/999) -- **SymbolShim:** Symbol polyfill is a function ([1f57157](https://github.com/ReactiveX/RxJS/commit/1f57157)), closes [#988](https://github.com/ReactiveX/RxJS/issues/988) -- **timeoutWith:** fix to avoid unnecessary inner subscription ([6e63752](https://github.com/ReactiveX/RxJS/commit/6e63752)) - -### Features - -- **count:** remove thisArg ([878a1fd](https://github.com/ReactiveX/RxJS/commit/878a1fd)) -- **distinctUntilChanged:** remove thisArg ([bfc52d6](https://github.com/ReactiveX/RxJS/commit/bfc52d6)) -- **exhaust:** rename switchFirst operators to exhaust ([9b565c9](https://github.com/ReactiveX/RxJS/commit/9b565c9)), closes [#915](https://github.com/ReactiveX/RxJS/issues/915) -- **finally:** remove thisArg ([d4b02fc](https://github.com/ReactiveX/RxJS/commit/d4b02fc)) -- **forEach:** add thisArg ([14ffce6](https://github.com/ReactiveX/RxJS/commit/14ffce6)), closes [#878](https://github.com/ReactiveX/RxJS/issues/878) -- **single:** remove thisArg ([43af805](https://github.com/ReactiveX/RxJS/commit/43af805)) - -### BREAKING CHANGES - -- exhaust: switchFirst is now exhaust -- exhaust: switchFirstMap is now exhaustMap -- forEach: Observable.prototype.forEach argument order changed to accommodate thisArg. Optional PromiseCtor argument moved to third arg from second - - - -# [5.0.0-alpha.13](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.12...v5.0.0-alpha.13) (2015-12-08) - -### Bug Fixes - -- **Observable:** fix circular dependency issue. ([b7672f4](https://github.com/ReactiveX/RxJS/commit/b7672f4)) -- **bufferToggle:** fix unsubscriptions of closing Observable ([439b641](https://github.com/ReactiveX/RxJS/commit/439b641)) -- **expand:** accept scheduler parameter ([79e9084](https://github.com/ReactiveX/RxJS/commit/79e9084)), closes [#841](https://github.com/ReactiveX/RxJS/issues/841) -- **publish:** make script generate correct package names ([10563d3](https://github.com/ReactiveX/RxJS/commit/10563d3)) -- **repeat:** preserve Subscriber chain in repeat() ([d9a7328](https://github.com/ReactiveX/RxJS/commit/d9a7328)) -- **retry:** preserve Subscriber chain in retry() ([b429dac](https://github.com/ReactiveX/RxJS/commit/b429dac)) -- **retryWhen:** preserve Subscriber chain in retryWhen() ([c9cb958](https://github.com/ReactiveX/RxJS/commit/c9cb958)) - -### Features - -- **AsapScheduler:** rename NextTickScheduler to AsapScheduler ([3255fb3](https://github.com/ReactiveX/RxJS/commit/3255fb3)), closes [#838](https://github.com/ReactiveX/RxJS/issues/838) -- **BehaviorSubject:** add getValue method to access value ([33b387b](https://github.com/ReactiveX/RxJS/commit/33b387b)), closes [#758](https://github.com/ReactiveX/RxJS/issues/758) -- **BehaviorSubject:** now throws when getValue is called after unsubscription ([1ddf116](https://github.com/ReactiveX/RxJS/commit/1ddf116)) -- **ObjectUnsubscribedError:** add ObjectUnsubscribed error class ([39836af](https://github.com/ReactiveX/RxJS/commit/39836af)) -- **Observable:** subscribe accepts objects with rxSubscriber symbol ([b7672f4](https://github.com/ReactiveX/RxJS/commit/b7672f4)) -- **QueueScheduler:** rename ImmediateScheduler to QueueScheduler ([66eb537](https://github.com/ReactiveX/RxJS/commit/66eb537)) -- **Rx.Symbol.rxSubscriber:** add rxSubscriber symbol ([d4f1670](https://github.com/ReactiveX/RxJS/commit/d4f1670)) -- **Subject:** add rxSubscriber symbol ([d2e4257](https://github.com/ReactiveX/RxJS/commit/d2e4257)) -- **Subscriber:** add rxSubscriber symbol ([7bda360](https://github.com/ReactiveX/RxJS/commit/7bda360)) -- **switchFirstMap:** rename switchMapFirst to switchFirstMap ([eddd4dc](https://github.com/ReactiveX/RxJS/commit/eddd4dc)) - -### BREAKING CHANGES - -- AsapScheduler: `Rx.Scheduler.nextTick` (Rx 4's "default" scheduler) is now `Rx.Scheduler.asap` -- QueueScheduler: `Rx.Scheduler.immediate` (Rx 4's "currentThread" scheduler) is now `Rx.Scheduler.queue` - related #838 -- switchFirstMap: `switchMapFirst` is now `switchFirstMap` - - - -# [5.0.0-alpha.12](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.10...v5.0.0-alpha.12) (2015-12-04) - -### Bug Fixes - -- **AsyncSubject:** emit value when it's subscribed after complete ([ed0eaf6](https://github.com/ReactiveX/RxJS/commit/ed0eaf6)) -- **bindCallback:** only call function once even while scheduled ([8637d47](https://github.com/ReactiveX/RxJS/commit/8637d47)), closes [#881](https://github.com/ReactiveX/RxJS/issues/881) -- **bufferToggle:** fix disposal of subscriptions when errors occur ([a20325c](https://github.com/ReactiveX/RxJS/commit/a20325c)) -- **catch:** fix catch to dispose old subscriptions ([280f7ed](https://github.com/ReactiveX/RxJS/commit/280f7ed)), closes [#763](https://github.com/ReactiveX/RxJS/issues/763) -- **catch:** fix catch() to preserve Subscriber chain ([e1447ac](https://github.com/ReactiveX/RxJS/commit/e1447ac)) -- **concat:** accept scheduler parameter ([8859702](https://github.com/ReactiveX/RxJS/commit/8859702)) -- **ConnectableObservable:** fix ConnectableObservable connectability and refCounting ([aef9578](https://github.com/ReactiveX/RxJS/commit/aef9578)), closes [#678](https://github.com/ReactiveX/RxJS/issues/678) -- **debounce:** Fix debounce to unsubscribe duration Observables ([dea7847](https://github.com/ReactiveX/RxJS/commit/dea7847)) -- **expand:** fix expand's concurrency behavior ([01f86e5](https://github.com/ReactiveX/RxJS/commit/01f86e5)) -- **expand:** terminate recursive call when destination completes ([3b8cf94](https://github.com/ReactiveX/RxJS/commit/3b8cf94)) -- **Observable:** Subjects no longer wrapped in Subscriber ([5cb0f2b](https://github.com/ReactiveX/RxJS/commit/5cb0f2b)), closes [#825](https://github.com/ReactiveX/RxJS/issues/825) [#748](https://github.com/ReactiveX/RxJS/issues/748) -- **Observer:** anonymous observers now allow missing handlers ([a11c763](https://github.com/ReactiveX/RxJS/commit/a11c763)), closes [#723](https://github.com/ReactiveX/RxJS/issues/723) -- **operators:** Remove shareReplay and shareBehavior ([536a6a6](https://github.com/ReactiveX/RxJS/commit/536a6a6)), closes [#710](https://github.com/ReactiveX/RxJS/issues/710) -- **publish:** copy readme and license, remove scripts ([439a2f3](https://github.com/ReactiveX/RxJS/commit/439a2f3)), closes [#845](https://github.com/ReactiveX/RxJS/issues/845) -- **throttleTime:** fix and rename throttleTime operator ([3b0c1f3](https://github.com/ReactiveX/RxJS/commit/3b0c1f3)) -- **TimerObservable:** accepts absolute date for dueTime ([e284fb8](https://github.com/ReactiveX/RxJS/commit/e284fb8)), closes [#648](https://github.com/ReactiveX/RxJS/issues/648) - -### Features - -- **AsyncSubject:** add AsyncSubject ([34c05fe](https://github.com/ReactiveX/RxJS/commit/34c05fe)) -- **bindCallback:** remove thisArg ([feea9a1](https://github.com/ReactiveX/RxJS/commit/feea9a1)) -- **bindCallback:** rename fromCallback to bindCallback ([305d66d](https://github.com/ReactiveX/RxJS/commit/305d66d)), closes [#876](https://github.com/ReactiveX/RxJS/issues/876) -- **callback:** Add Observable.fromCallback ([9f751e7](https://github.com/ReactiveX/RxJS/commit/9f751e7)) -- **combineLatest:** accept array of observable as parameter ([2edd92c](https://github.com/ReactiveX/RxJS/commit/2edd92c)), closes [#594](https://github.com/ReactiveX/RxJS/issues/594) -- **forkJoin:** accept array of observable as parameter ([d45f672](https://github.com/ReactiveX/RxJS/commit/d45f672)) -- **mergeScan:** support concurrency parameter for mergeScan ([fe0eb37](https://github.com/ReactiveX/RxJS/commit/fe0eb37)), closes [#868](https://github.com/ReactiveX/RxJS/issues/868) -- **usage:** add auto-patching operators ([1ab3508](https://github.com/ReactiveX/RxJS/commit/1ab3508)), closes [#860](https://github.com/ReactiveX/RxJS/issues/860) -- **skipWhile:** add skipWhile operator ([a2244e0](https://github.com/ReactiveX/RxJS/commit/a2244e0)) -- **switchFirst:** add switchFirst and switchMapFirst ([71e3dd1](https://github.com/ReactiveX/RxJS/commit/71e3dd1)) -- **publishLast:** add publishLast operator ([9bef228](https://github.com/ReactiveX/RxJS/commit/9bef228)), closes [#883](https://github.com/ReactiveX/RxJS/issues/883) -- **takeWhile:** add takeWhile operator ([48e53ea](https://github.com/ReactiveX/RxJS/commit/48e53ea)), closes [#695](https://github.com/ReactiveX/RxJS/issues/695) -- **takeWhile:** remove thisArg ([b5219a4](https://github.com/ReactiveX/RxJS/commit/b5219a4)) -- **throttle:** add throttle operator with durationSelector ([c3bf3e7](https://github.com/ReactiveX/RxJS/commit/c3bf3e7)), closes [#496](https://github.com/ReactiveX/RxJS/issues/496) - -### Performance Improvements - -- **ReplaySubject:** fix memory leak of growing buffer ([0a73b4d](https://github.com/ReactiveX/RxJS/commit/0a73b4d)), closes [#578](https://github.com/ReactiveX/RxJS/issues/578) - - - -# [5.0.0-alpha.11](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.10...v5.0.0-alpha.11) (2015-12-01) - -### Bug Fixes - -- **catch:** fix catch to dispose old subscriptions ([280f7ed](https://github.com/ReactiveX/RxJS/commit/280f7ed)), closes [#763](https://github.com/ReactiveX/RxJS/issues/763) -- **concat:** accept scheduler parameter ([8859702](https://github.com/ReactiveX/RxJS/commit/8859702)) -- **ConnectableObservable:** fix ConnectableObservable connectability and refCounting ([aef9578](https://github.com/ReactiveX/RxJS/commit/aef9578)), closes [#678](https://github.com/ReactiveX/RxJS/issues/678) -- **debounce:** Fix debounce to unsubscribe duration Observables ([dea7847](https://github.com/ReactiveX/RxJS/commit/dea7847)) -- **expand:** fix expand's concurrency behavior ([01f86e5](https://github.com/ReactiveX/RxJS/commit/01f86e5)) -- **expand:** terminate recursive call when destination completes ([3b8cf94](https://github.com/ReactiveX/RxJS/commit/3b8cf94)) -- **Observer:** anonymous observers now allow missing handlers ([a11c763](https://github.com/ReactiveX/RxJS/commit/a11c763)), closes [#723](https://github.com/ReactiveX/RxJS/issues/723) -- **operators:** Remove shareReplay and shareBehavior ([536a6a6](https://github.com/ReactiveX/RxJS/commit/536a6a6)), closes [#710](https://github.com/ReactiveX/RxJS/issues/710) -- **test:** make explicit unsubscription for observable ([505f5b7](https://github.com/ReactiveX/RxJS/commit/505f5b7)) -- **throttleTime:** fix and rename throttleTime operator ([3b0c1f3](https://github.com/ReactiveX/RxJS/commit/3b0c1f3)) -- **TimerObservable:** accepts absolute date for dueTime ([e284fb8](https://github.com/ReactiveX/RxJS/commit/e284fb8)), closes [#648](https://github.com/ReactiveX/RxJS/issues/648) - -### Features - -- **callback:** Add Observable.fromCallback ([9f751e7](https://github.com/ReactiveX/RxJS/commit/9f751e7)) -- **combineLatest:** accept array of observable as parameter ([2edd92c](https://github.com/ReactiveX/RxJS/commit/2edd92c)), closes [#594](https://github.com/ReactiveX/RxJS/issues/594) -- **forkJoin:** accept array of observable as parameter ([d45f672](https://github.com/ReactiveX/RxJS/commit/d45f672)) -- **operator:** add skipWhile operator ([a2244e0](https://github.com/ReactiveX/RxJS/commit/a2244e0)) -- **operator:** add switchFirst and switchMapFirst ([71e3dd1](https://github.com/ReactiveX/RxJS/commit/71e3dd1)) -- **takeWhile:** add takeWhile operator ([48e53ea](https://github.com/ReactiveX/RxJS/commit/48e53ea)), closes [#695](https://github.com/ReactiveX/RxJS/issues/695) -- **throttle:** add throttle operator with durationSelector ([c3bf3e7](https://github.com/ReactiveX/RxJS/commit/c3bf3e7)), closes [#496](https://github.com/ReactiveX/RxJS/issues/496) - -### Performance Improvements - -- **ReplaySubject:** fix memory leak of growing buffer ([0a73b4d](https://github.com/ReactiveX/RxJS/commit/0a73b4d)), closes [#578](https://github.com/ReactiveX/RxJS/issues/578) - - - -# [5.0.0-alpha.10](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.9...v5.0.0-alpha.10) (2015-11-10) - -### Bug Fixes - -- **Immediate:** set immediate should no longer throw in Chrome ([a3de7d9](https://github.com/ReactiveX/RxJS/commit/a3de7d9)), closes [#690](https://github.com/ReactiveX/RxJS/issues/690) - - - -# [5.0.0-alpha.9](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.8...v5.0.0-alpha.9) (2015-11-10) - -### Bug Fixes - -- **util:** incorrect Symbol.iterator for es6-shim ([15bf32c](https://github.com/ReactiveX/RxJS/commit/15bf32c)) - -### Features - -- **forkJoin:** accept promise, resultselector as parameter of forkJoin ([190f349](https://github.com/ReactiveX/RxJS/commit/190f349)), closes [#507](https://github.com/ReactiveX/RxJS/issues/507) - - - -# [5.0.0-alpha.8](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.7...v5.0.0-alpha.8) (2015-11-06) - -### Bug Fixes - -- **concat:** handle a given scheduler correctly ([8745216](https://github.com/ReactiveX/RxJS/commit/8745216)) -- **package.json:** loosen the engines/npm semver range to prevent false warnings ([df791c6](https://github.com/ReactiveX/RxJS/commit/df791c6)) -- **skipUntil:** unsubscribe source when it completes ([8a4162b](https://github.com/ReactiveX/RxJS/commit/8a4162b)), closes [#577](https://github.com/ReactiveX/RxJS/issues/577) -- **take:** deal with total <= 0 and add tests ([c5cc06f](https://github.com/ReactiveX/RxJS/commit/c5cc06f)) -- **windowWhen:** fix windowWhen with regard to unsubscriptions ([8174947](https://github.com/ReactiveX/RxJS/commit/8174947)) - -### Features - -- **mergeScan:** add new mergeScan operator. ([0ebb5bd](https://github.com/ReactiveX/RxJS/commit/0ebb5bd)) -- **multicast:** support both Subject and subjectFactory arguments ([f779027](https://github.com/ReactiveX/RxJS/commit/f779027)) - -### BREAKING CHANGES - -- **publish:** reverted to RxJS 4 behavior -- **publishBehavior:** reverted to RxJS 4 behavior -- **publishReplay:** reverted to RxJS 4 behavior -- **shareBehavior:** removed -- **shareReplay:** removed - - - -# [5.0.0-alpha.7](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.6...v5.0.0-alpha.7) (2015-10-27) - -### Bug Fixes - -- **NextTickAction:** fix unsubscription behavior ([3d8264c](https://github.com/ReactiveX/RxJS/commit/3d8264c)), closes [#582](https://github.com/ReactiveX/RxJS/issues/582) -- **buffer:** cleanup notifier subscription when unsubscribed ([1b30aa9](https://github.com/ReactiveX/RxJS/commit/1b30aa9)) -- **delay:** accepts absolute time delay ([b109100](https://github.com/ReactiveX/RxJS/commit/b109100)) -- **mergeMapTo:** mergeMapTo result should complete ([6f9859e](https://github.com/ReactiveX/RxJS/commit/6f9859e)) -- **operator:** update type definitions for union types ([9d90c75](https://github.com/ReactiveX/RxJS/commit/9d90c75)), closes [#581](https://github.com/ReactiveX/RxJS/issues/581) -- **repeat:** fix inner subscription semantics for repeat ([f67a596](https://github.com/ReactiveX/RxJS/commit/f67a596)), closes [#554](https://github.com/ReactiveX/RxJS/issues/554) -- **switchMapTo:** reimplement switchMapTo to pass tests ([d4789cd](https://github.com/ReactiveX/RxJS/commit/d4789cd)) -- **takeUntil:** unsubscribe notifier when it completes ([9415196](https://github.com/ReactiveX/RxJS/commit/9415196)) - -### Features - -- **operator:** add max operator ([7fda036](https://github.com/ReactiveX/RxJS/commit/7fda036)) -- **operator:** add min operator ([79cb6cf](https://github.com/ReactiveX/RxJS/commit/79cb6cf)) -- **shareBehavior:** add shareBehavior and its tests ([97ff1ec](https://github.com/ReactiveX/RxJS/commit/97ff1ec)) - - - -# [5.0.0-alpha.6](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.5...v5.0.0-alpha.6) (2015-10-17) - -### Bug Fixes - -- **retryWhen:** fix internal unsubscriptions ([5aff5e8](https://github.com/ReactiveX/RxJS/commit/5aff5e8)) -- **scan:** scan now behaves like RxJS 4 scan ([27f9c09](https://github.com/ReactiveX/RxJS/commit/27f9c09)) - - - -# [5.0.0-alpha.5](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.4...v5.0.0-alpha.5) (2015-10-16) - -### Bug Fixes - -- **bufferToggle:** fix bugs in order to pass tests ([949fa31](https://github.com/ReactiveX/RxJS/commit/949fa31)) -- **mergeAll:** fix mergeAll micro performance tests to use mapTo instead of map. ([616e86e](https://github.com/ReactiveX/RxJS/commit/616e86e)) -- **package:** correct typings path ([a501b06](https://github.com/ReactiveX/RxJS/commit/a501b06)) -- **repeat:** add additional resubscription behavior ([4f9f33b](https://github.com/ReactiveX/RxJS/commit/4f9f33b)), closes [#516](https://github.com/ReactiveX/RxJS/issues/516) -- **retry:** fix internal unsubscriptions for retry ([cc92f45](https://github.com/ReactiveX/RxJS/commit/cc92f45)), closes [#546](https://github.com/ReactiveX/RxJS/issues/546) -- **windowToggle:** fix window closing and unsubscription semantics ([0cb21e6](https://github.com/ReactiveX/RxJS/commit/0cb21e6)) - - - -# [5.0.0-alpha.4](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.3...5.0.0-alpha.4) (2015-10-15) - -### Bug Fixes - -- **Subject:** fix missing unsubscribe call ([9dd27d6](https://github.com/ReactiveX/RxJS/commit/9dd27d6)) -- **Subscriber:** avoid implicit any ([08faaa9](https://github.com/ReactiveX/RxJS/commit/08faaa9)) -- **bufferWhen:** onComplete of closings determine buffers ([5d28a38](https://github.com/ReactiveX/RxJS/commit/5d28a38)) -- **fromEvent:** make selector argument optional in fromEvent static method ([71d90b4](https://github.com/ReactiveX/RxJS/commit/71d90b4)) -- **skipUntil:** update skipUntil behavior with error, completion ([6f0d98f](https://github.com/ReactiveX/RxJS/commit/6f0d98f)), closes [#518](https://github.com/ReactiveX/RxJS/issues/518) -- **windowCount:** fix windowCount window opening times ([908ae56](https://github.com/ReactiveX/RxJS/commit/908ae56)), closes [#273](https://github.com/ReactiveX/RxJS/issues/273) - -### Features - -- **operator:** add debounce operator ([a1e652f](https://github.com/ReactiveX/RxJS/commit/a1e652f)), closes [#493](https://github.com/ReactiveX/RxJS/issues/493) -- **operator:** add debounceTime operator ([dd2ba40](https://github.com/ReactiveX/RxJS/commit/dd2ba40)) - -### Performance Improvements - -- **ScalarObservable:** add fast-path for mapping scalar observables ([7b0d3dc](https://github.com/ReactiveX/RxJS/commit/7b0d3dc)) -- **count:** fast-path for counting over scalars ([c35a120](https://github.com/ReactiveX/RxJS/commit/c35a120)) -- **filter:** add fast-path for filtering scalar observables ([e2e8954](https://github.com/ReactiveX/RxJS/commit/e2e8954)) -- **reduce:** add fast-path for reducing over scalar observables ([4c65136](https://github.com/ReactiveX/RxJS/commit/4c65136)) -- **scan:** fast-path for scanning scalars ([0201b92](https://github.com/ReactiveX/RxJS/commit/0201b92)) -- **skip:** fast-path for skip over scalar observable ([9b49936](https://github.com/ReactiveX/RxJS/commit/9b49936)) -- **take:** add fast-path for take over scalars ([33053b1](https://github.com/ReactiveX/RxJS/commit/33053b1)) - - - -# [5.0.0-alpha.3](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.2...5.0.0-alpha.3) (2015-10-13) - -### Bug Fixes - -- **Observable:** fix type signature of some static operators ([e5364de](https://github.com/ReactiveX/RxJS/commit/e5364de)) -- **Subject.create:** ensure operator property not required for Observable subscription ([2259de2](https://github.com/ReactiveX/RxJS/commit/2259de2)), closes [#483](https://github.com/ReactiveX/RxJS/issues/483) -- **TestScheduler:** stop sorting actual results ([51db0b8](https://github.com/ReactiveX/RxJS/commit/51db0b8)), closes [#422](https://github.com/ReactiveX/RxJS/issues/422) -- **benchpress:** update benchpress dependencies and config ([8513eaa](https://github.com/ReactiveX/RxJS/commit/8513eaa)), closes [#348](https://github.com/ReactiveX/RxJS/issues/348) -- **buffer:** change behavior of buffer to more closely match RxJS 4 ([b66592d](https://github.com/ReactiveX/RxJS/commit/b66592d)) -- **combineLatest:** fix type signature ([a3e6deb](https://github.com/ReactiveX/RxJS/commit/a3e6deb)) -- **defer:** fix type signature ([11327b9](https://github.com/ReactiveX/RxJS/commit/11327b9)) -- **empty:** fix type signature ([893cb7e](https://github.com/ReactiveX/RxJS/commit/893cb7e)) -- **fromPromise:** fix type signature ([17415fa](https://github.com/ReactiveX/RxJS/commit/17415fa)) -- **groupBy:** durationSelector cannot keep source alive ([57e4207](https://github.com/ReactiveX/RxJS/commit/57e4207)) -- **groupBy:** fix bugs related to group resets ([23a7574](https://github.com/ReactiveX/RxJS/commit/23a7574)) -- **groupBy:** fix bugs with groupBy ([86992c6](https://github.com/ReactiveX/RxJS/commit/86992c6)) -- **interval:** fix signature type ([9c238c0](https://github.com/ReactiveX/RxJS/commit/9c238c0)) -- **operator:** startWith operator accepts scheduler, multiple values ([d1d339a](https://github.com/ReactiveX/RxJS/commit/d1d339a)) -- **operators:** reorder signature of resultSelectors ([fc1724d](https://github.com/ReactiveX/RxJS/commit/fc1724d)) -- **range:** fix type signature ([9237d0b](https://github.com/ReactiveX/RxJS/commit/9237d0b)) -- **timeout:** fix absolute timeout behavior ([8ec06cf](https://github.com/ReactiveX/RxJS/commit/8ec06cf)) -- **timeout:** update behavior of timeout, timeoutWith ([16bd691](https://github.com/ReactiveX/RxJS/commit/16bd691)) -- **timer:** fix type signature ([fffb96c](https://github.com/ReactiveX/RxJS/commit/fffb96c)) -- **window:** handle closingNotifier errors/completes ([42beff1](https://github.com/ReactiveX/RxJS/commit/42beff1)) - -### Features - -- **TestScheduler:** support unsubscription marbles ([ffb0bb9](https://github.com/ReactiveX/RxJS/commit/ffb0bb9)) -- **count:** add predicate support in count() ([42d1add](https://github.com/ReactiveX/RxJS/commit/42d1add)), closes [#425](https://github.com/ReactiveX/RxJS/issues/425) -- **dematerialize:** add dematerialize operator ([0a8b074](https://github.com/ReactiveX/RxJS/commit/0a8b074)), closes [#475](https://github.com/ReactiveX/RxJS/issues/475) -- **do:** do will now handle an observer as an argument ([c1a4994](https://github.com/ReactiveX/RxJS/commit/c1a4994)), closes [#476](https://github.com/ReactiveX/RxJS/issues/476) -- **first:** add resultSelector ([3c20fcc](https://github.com/ReactiveX/RxJS/commit/3c20fcc)), closes [#417](https://github.com/ReactiveX/RxJS/issues/417) -- **last:** add resultSelector argument ([5a4896c](https://github.com/ReactiveX/RxJS/commit/5a4896c)), closes [#418](https://github.com/ReactiveX/RxJS/issues/418) -- **operator:** add every operator ([d11f32e](https://github.com/ReactiveX/RxJS/commit/d11f32e)) -- **operator:** add timeInterval operator ([6cc0615](https://github.com/ReactiveX/RxJS/commit/6cc0615)) -- **share:** add the share operator ([c36f2be](https://github.com/ReactiveX/RxJS/commit/c36f2be)), closes [#439](https://github.com/ReactiveX/RxJS/issues/439) -- **shareReplay:** add the shareReplay() operator ([65c84ea](https://github.com/ReactiveX/RxJS/commit/65c84ea)) - -### Performance Improvements - -- **ReplaySubject:** remove unnecessary computation ([488ac2e](https://github.com/ReactiveX/RxJS/commit/488ac2e)) - -### BREAKING CHANGES - -- **operators with resultSelectors** (mergeMap, concatMap, switchMap, etc): - The function signature of resultSelectors used to be (innerValue, - outerValue, innerIndex, outerIndex) but this commits changes it to - be (outerValue, innerValue, outerIndex, innerIndex), to match - signatures in RxJS 4. - - - -# [5.0.0-alpha.2](https://github.com/ReactiveX/RxJS/compare/5.0.0-alpha.1...5.0.0-alpha.2) (2015-09-30) - -### Bug Fixes - -- **concat:** let observable concat instead of merge ([c17e832](https://github.com/ReactiveX/RxJS/commit/c17e832)) - -### Features - -- **operator:** add find, findIndex operator ([7c6cc9d](https://github.com/ReactiveX/RxJS/commit/7c6cc9d)) -- **operator:** add first operator ([274c233](https://github.com/ReactiveX/RxJS/commit/274c233)) -- **operator:** add ignoreElements operator ([fe1a952](https://github.com/ReactiveX/RxJS/commit/fe1a952)) -- **zip:** zip now supports never-ending iterables ([a5684ba](https://github.com/ReactiveX/RxJS/commit/a5684ba)), closes [#397](https://github.com/ReactiveX/RxJS/issues/397) - - - -# [5.0.0-alpha.1](https://github.com/ReactiveX/RxJS/compare/0.0.0-prealpha.3...5.0.0-alpha.1) (2015-09-23) - -### Bug Fixes - -- **Promises:** escape promise error trap ([c69088a](https://github.com/ReactiveX/RxJS/commit/c69088a)) -- **TestScheduler:** ensure TestScheduler subscribes to expectations before hot subjects ([b9b2ba5](https://github.com/ReactiveX/RxJS/commit/b9b2ba5)) -- **TestScheduler:** properly schedule actions added dynamically ([069ede4](https://github.com/ReactiveX/RxJS/commit/069ede4)) -- **buffer:** do not emit empty buffer when completes ([252fccb](https://github.com/ReactiveX/RxJS/commit/252fccb)) -- **bufferTime:** inner intervals will now clean up properly ([4ef41b0](https://github.com/ReactiveX/RxJS/commit/4ef41b0)) -- **expand:** Fix expand to stay open until the source Observable completes. ([20ef785](https://github.com/ReactiveX/RxJS/commit/20ef785)) -- **expand:** fix expand operator to match Rx3 ([67f9623](https://github.com/ReactiveX/RxJS/commit/67f9623)) -- **last:** emit value matches with predicate instead of result of predicate ([0f635ee](https://github.com/ReactiveX/RxJS/commit/0f635ee)) -- **merge:** fix issues with async in merge ([7a15304](https://github.com/ReactiveX/RxJS/commit/7a15304)) -- **mergeAll:** merge all will properly handle async observables ([43b63cc](https://github.com/ReactiveX/RxJS/commit/43b63cc)) -- **package:** specify supported npm version ([f72e622](https://github.com/ReactiveX/RxJS/commit/f72e622)) -- **switchAll:** switch all will properly handle async observables ([c2e2d29](https://github.com/ReactiveX/RxJS/commit/c2e2d29)) -- **switchAll/switchLatest:** inner subscriptions should now properly unsub ([38a45f8](https://github.com/ReactiveX/RxJS/commit/38a45f8)), closes [#302](https://github.com/ReactiveX/RxJS/issues/302) - -### Features - -- **combineLatest:** supports promises, iterables, lowercase-o observables and Observables ([ce76e4e](https://github.com/ReactiveX/RxJS/commit/ce76e4e)) -- **config:** add global configuration of Promise capability ([e7eb5d7](https://github.com/ReactiveX/RxJS/commit/e7eb5d7)), closes [#115](https://github.com/ReactiveX/RxJS/issues/115) -- **expand:** now handles promises, iterables and lowercase-o observables ([c5239e9](https://github.com/ReactiveX/RxJS/commit/c5239e9)) -- **mergeAll:** now supports promises, iterables and lowercase-o observables ([4c16aa6](https://github.com/ReactiveX/RxJS/commit/4c16aa6)) -- **operator:** add elementAt operator ([cd562c4](https://github.com/ReactiveX/RxJS/commit/cd562c4)) -- **operator:** add isEmpty operator ([80f72c5](https://github.com/ReactiveX/RxJS/commit/80f72c5)) -- **operator:** add last operator ([d841b11](https://github.com/ReactiveX/RxJS/commit/d841b11)), closes [#304](https://github.com/ReactiveX/RxJS/issues/304) [#306](https://github.com/ReactiveX/RxJS/issues/306) -- **operator:** add single operator ([49484a2](https://github.com/ReactiveX/RxJS/commit/49484a2)) -- **switch:** add promise, iterable and array support ([24fdd34](https://github.com/ReactiveX/RxJS/commit/24fdd34)) -- **withLatestFrom:** default array output, handle other types ([cb393dc](https://github.com/ReactiveX/RxJS/commit/cb393dc)) -- **zip:** supports promises, iterables and lowercase-o observables ([d332a0e](https://github.com/ReactiveX/RxJS/commit/d332a0e)) - - - -# [0.0.0-prealpha.3](https://github.com/ReactiveX/RxJS/compare/0.0.0-prealpha.2...0.0.0-prealpha.3) (2015-09-11) - -### Bug Fixes - -- **root:** use self as the root object when available ([0428a85](https://github.com/ReactiveX/RxJS/commit/0428a85)) - - - -# [0.0.0-prealpha.2](https://github.com/ReactiveX/RxJS/compare/0.0.0-prealpha.1...0.0.0-prealpha.2) (2015-09-11) - -### Bug Fixes - -- **bufferCount:** set default value for skip argument, do not emit empty buffer at the end ([2c1a9dc](https://github.com/ReactiveX/RxJS/commit/2c1a9dc)) -- **windowCount:** set default value for skip argument, do not emit empty buffer at the end ([a513dbb](https://github.com/ReactiveX/RxJS/commit/a513dbb)) - -### Features - -- **Observable:** add static create method ([e0d27ba](https://github.com/ReactiveX/RxJS/commit/e0d27ba)), closes [#255](https://github.com/ReactiveX/RxJS/issues/255) -- **TestScheduler:** add TestScheduler ([b23daf1](https://github.com/ReactiveX/RxJS/commit/b23daf1)), closes [#270](https://github.com/ReactiveX/RxJS/issues/270) -- **VirtualTimeScheduler:** add VirtualTimeScheduler ([96f9386](https://github.com/ReactiveX/RxJS/commit/96f9386)), closes [#269](https://github.com/ReactiveX/RxJS/issues/269) -- **operator:** add sample and sampleTime ([9e62789](https://github.com/ReactiveX/RxJS/commit/9e62789)), closes [#178](https://github.com/ReactiveX/RxJS/issues/178) - - - -# [0.0.0-prealpha.1](https://github.com/ReactiveX/RxJS/compare/0441dea...0.0.0-prealpha.1) (2015-09-02) - -### Bug Fixes - -- **combineLatest:** check for limits higher than total observable count ([81e5dfb](https://github.com/ReactiveX/RxJS/commit/81e5dfb)) -- **rx:** add hack to export global until better global build exists ([1a543b0](https://github.com/ReactiveX/RxJS/commit/1a543b0)) -- **subscription-ref:** add setter for isDisposed ([6fe5427](https://github.com/ReactiveX/RxJS/commit/6fe5427)) -- **take:** complete on limit reached ([801a711](https://github.com/ReactiveX/RxJS/commit/801a711)) - -### Features - -- **benchpress:** add benchpress config and flatmap spec ([0441dea](https://github.com/ReactiveX/RxJS/commit/0441dea)) -- **catch:** add catch operator, related to #141, closes #130 ([94b4c01](https://github.com/ReactiveX/RxJS/commit/94b4c01)), closes [#130](https://github.com/ReactiveX/RxJS/issues/130) -- **from:** let from handle any "observablesque" ([526d4c3](https://github.com/ReactiveX/RxJS/commit/526d4c3)), closes [#156](https://github.com/ReactiveX/RxJS/issues/156) [#236](https://github.com/ReactiveX/RxJS/issues/236) -- **index:** add index module which requires commonjs build ([379d2d1](https://github.com/ReactiveX/RxJS/commit/379d2d1)), closes [#117](https://github.com/ReactiveX/RxJS/issues/117) -- **observable:** add Observable.all (forkJoin) ([44a4ee1](https://github.com/ReactiveX/RxJS/commit/44a4ee1)) -- **operator:** Add count operator. ([30dd894](https://github.com/ReactiveX/RxJS/commit/30dd894)) -- **operator:** Add distinctUntilChanged and distinctUntilKeyChanged ([f9ba4da](https://github.com/ReactiveX/RxJS/commit/f9ba4da)) -- **operator:** Add do operator. ([7d9b52b](https://github.com/ReactiveX/RxJS/commit/7d9b52b)) -- **operator:** Add expand operator. ([47b178b](https://github.com/ReactiveX/RxJS/commit/47b178b)) -- **operator:** Add minimal delay operator. ([7851885](https://github.com/ReactiveX/RxJS/commit/7851885)) -- **operator:** add buffer operators: buffer, bufferWhen, bufferTime, bufferCount, and bufferTog ([9f8347f](https://github.com/ReactiveX/RxJS/commit/9f8347f)), closes [#207](https://github.com/ReactiveX/RxJS/issues/207) -- **operator:** add debounce ([f03adaf](https://github.com/ReactiveX/RxJS/commit/f03adaf)), closes [#193](https://github.com/ReactiveX/RxJS/issues/193) -- **operator:** add defaultIfEmpty ([c80688b](https://github.com/ReactiveX/RxJS/commit/c80688b)) -- **operator:** add finally ([526e4c9](https://github.com/ReactiveX/RxJS/commit/526e4c9)) -- **operator:** add fromEventPattern creator function ([1095d4c](https://github.com/ReactiveX/RxJS/commit/1095d4c)) -- **operator:** add groupBy ([1e13aea](https://github.com/ReactiveX/RxJS/commit/1e13aea)), closes [#165](https://github.com/ReactiveX/RxJS/issues/165) -- **operator:** add materialize. closes #132 ([6d9f6ae](https://github.com/ReactiveX/RxJS/commit/6d9f6ae)), closes [#132](https://github.com/ReactiveX/RxJS/issues/132) -- **operator:** add publishBehavior operator and spec ([249ab8d](https://github.com/ReactiveX/RxJS/commit/249ab8d)) -- **operator:** add publishReplay operator and spec ([a0c47d6](https://github.com/ReactiveX/RxJS/commit/a0c47d6)) -- **operator:** add retry ([4451db5](https://github.com/ReactiveX/RxJS/commit/4451db5)) -- **operator:** add retryWhen operator. closes #129 ([65eb50e](https://github.com/ReactiveX/RxJS/commit/65eb50e)), closes [#129](https://github.com/ReactiveX/RxJS/issues/129) -- **operator:** add skipUntil ([ef2620e](https://github.com/ReactiveX/RxJS/commit/ef2620e)), closes [#180](https://github.com/ReactiveX/RxJS/issues/180) -- **operator:** add throttle ([1d735b9](https://github.com/ReactiveX/RxJS/commit/1d735b9)), closes [#191](https://github.com/ReactiveX/RxJS/issues/191) -- **operator:** add timeout and timeoutWith ([bb440ad](https://github.com/ReactiveX/RxJS/commit/bb440ad)), closes [#244](https://github.com/ReactiveX/RxJS/issues/244) -- **operator:** add toPromise operator. closes #159 ([361a53b](https://github.com/ReactiveX/RxJS/commit/361a53b)), closes [#159](https://github.com/ReactiveX/RxJS/issues/159) -- **operator:** add window operators: window, windowWhen, windowTime, windowCount, windowToggle ([9f5d510](https://github.com/ReactiveX/RxJS/commit/9f5d510)), closes [#195](https://github.com/ReactiveX/RxJS/issues/195) -- **operator:** add withLatestFrom ([322218a](https://github.com/ReactiveX/RxJS/commit/322218a)), closes [#209](https://github.com/ReactiveX/RxJS/issues/209) -- **operator:** implement startWith(). ([1f36d99](https://github.com/ReactiveX/RxJS/commit/1f36d99)) diff --git a/node_modules/rxjs/CODE_OF_CONDUCT.md b/node_modules/rxjs/CODE_OF_CONDUCT.md deleted file mode 100644 index dec600c..0000000 --- a/node_modules/rxjs/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,73 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, gender identity and expression, level of experience, -education, socio-economic status, nationality, personal appearance, race, -religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting Ben Lesh (ben@benlesh.com), Tracy Lee (tracy@thisdot.co) or OJ Kwon (kwon.ohjoong@gmail.com). All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html - -[homepage]: https://www.contributor-covenant.org diff --git a/node_modules/rxjs/LICENSE.txt b/node_modules/rxjs/LICENSE.txt deleted file mode 100644 index 031ce38..0000000 --- a/node_modules/rxjs/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors - - 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. - diff --git a/node_modules/rxjs/README.md b/node_modules/rxjs/README.md deleted file mode 100644 index 910eef7..0000000 --- a/node_modules/rxjs/README.md +++ /dev/null @@ -1,107 +0,0 @@ -# RxJS Logo RxJS: Reactive Extensions For JavaScript - -![CI](https://github.com/reactivex/rxjs/workflows/CI/badge.svg) -[![npm version](https://badge.fury.io/js/rxjs.svg)](http://badge.fury.io/js/rxjs) -[![Join the chat at https://gitter.im/Reactive-Extensions/RxJS](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Reactive-Extensions/RxJS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) - -# The Roadmap from RxJS 7 to 8 - -Curious what's next for RxJS? Follow along with [Issue 6367](https://github.com/ReactiveX/rxjs/issues/6367). - -# RxJS 7 - -### FOR 6.X PLEASE GO TO [THE 6.x BRANCH](https://github.com/ReactiveX/rxjs/tree/6.x) - -Reactive Extensions Library for JavaScript. This is a rewrite of [Reactive-Extensions/RxJS](https://github.com/Reactive-Extensions/RxJS) and is the latest production-ready version of RxJS. This rewrite is meant to have better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface. - -[Apache 2.0 License](LICENSE.txt) - -- [Code of Conduct](CODE_OF_CONDUCT.md) -- [Contribution Guidelines](CONTRIBUTING.md) -- [Maintainer Guidelines](docs_app/content/maintainer-guidelines.md) -- [API Documentation](https://rxjs.dev/) - -## Versions In This Repository - -- [master](https://github.com/ReactiveX/rxjs/commits/master) - This is all of the current work, which is against v7 of RxJS right now -- [6.x](https://github.com/ReactiveX/rxjs/tree/6.x) - This is the branch for version 6.X - -Most PRs should be made to **master**. - -## Important - -By contributing or commenting on issues in this repository, whether you've read them or not, you're agreeing to the [Contributor Code of Conduct](CODE_OF_CONDUCT.md). Much like traffic laws, ignorance doesn't grant you immunity. - -## Installation and Usage - -### ES6 via npm - -```shell -npm install rxjs -``` - -It's recommended to pull in the Observable creation methods you need directly from `'rxjs'` as shown below with `range`. -If you're using RxJS version 7.2 or above, you can pull in any operator you need from the same spot, `'rxjs'`. - -```ts -import { range, filter, map } from 'rxjs'; - -range(1, 200) - .pipe( - filter(x => x % 2 === 1), - map(x => x + x) - ) - .subscribe(x => console.log(x)); -``` - -If you're using RxJS version below 7.2, you can pull in any operator you need from one spot, under `'rxjs/operators'`. - -```ts -import { range } from 'rxjs'; -import { filter, map } from 'rxjs/operators'; - -range(1, 200) - .pipe( - filter(x => x % 2 === 1), - map(x => x + x) - ) - .subscribe(x => console.log(x)); -``` - -### CDN - -For CDN, you can use [unpkg](https://unpkg.com/): - -[https://unpkg.com/rxjs@^7/dist/bundles/rxjs.umd.min.js](https://unpkg.com/rxjs@%5E7/dist/bundles/rxjs.umd.min.js) - -The global namespace for rxjs is `rxjs`: - -```js -const { range } = rxjs; -const { filter, map } = rxjs.operators; - -range(1, 200) - .pipe( - filter(x => x % 2 === 1), - map(x => x + x) - ) - .subscribe(x => console.log(x)); -``` - -## Goals - -- Smaller overall bundles sizes -- Provide better performance than preceding versions of RxJS -- To model/follow the [Observable Spec Proposal](https://github.com/zenparsing/es-observable) to the observable -- Provide more modular file structure in a variety of formats -- Provide more debuggable call stacks than preceding versions of RxJS - -## Building/Testing - -- `npm run compile` build everything -- `npm test` run tests -- `npm run dtslint` run dtslint tests - -## Adding documentation - -We appreciate all contributions to the documentation of any type. All of the information needed to get the docs app up and running locally as well as how to contribute can be found in the [documentation directory](./docs_app). diff --git a/node_modules/rxjs/ajax/package.json b/node_modules/rxjs/ajax/package.json deleted file mode 100644 index 9f0a79a..0000000 --- a/node_modules/rxjs/ajax/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "rxjs/ajax", - "types": "../dist/types/ajax/index.d.ts", - "main": "../dist/cjs/ajax/index.js", - "module": "../dist/esm5/ajax/index.js", - "es2015": "../dist/esm/ajax/index.js", - "sideEffects": false -} diff --git a/node_modules/rxjs/dist/bundles/rxjs.umd.js b/node_modules/rxjs/dist/bundles/rxjs.umd.js deleted file mode 100644 index b31f4f1..0000000 --- a/node_modules/rxjs/dist/bundles/rxjs.umd.js +++ /dev/null @@ -1,6849 +0,0 @@ -/** - @license - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors - - 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. - - - **/ -/** - @license - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright (c) 2015-2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors - - 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. - - - **/ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define('rxjs', ['exports'], factory) : - (factory((global.rxjs = {}))); -}(this, (function (exports) { 'use strict'; - - /*! ***************************************************************************** - Copyright (c) Microsoft Corporation. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */ - /* global Reflect, Promise */ - - var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - - function __extends(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - } - - var __assign = function() { - __assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); - }; - - function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; - } - - function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - } - - function __generator(thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } - } - - function __values(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - } - - function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; - } - - function __spreadArray(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); - } - - function __await(v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - } - - function __asyncGenerator(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } - } - - function __asyncValues(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } - } - - function isFunction(value) { - return typeof value === 'function'; - } - - function createErrorClass(createImpl) { - var _super = function (instance) { - Error.call(instance); - instance.stack = new Error().stack; - }; - var ctorFunc = createImpl(_super); - ctorFunc.prototype = Object.create(Error.prototype); - ctorFunc.prototype.constructor = ctorFunc; - return ctorFunc; - } - - var UnsubscriptionError = createErrorClass(function (_super) { - return function UnsubscriptionErrorImpl(errors) { - _super(this); - this.message = errors - ? errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ') - : ''; - this.name = 'UnsubscriptionError'; - this.errors = errors; - }; - }); - - function arrRemove(arr, item) { - if (arr) { - var index = arr.indexOf(item); - 0 <= index && arr.splice(index, 1); - } - } - - var Subscription = (function () { - function Subscription(initialTeardown) { - this.initialTeardown = initialTeardown; - this.closed = false; - this._parentage = null; - this._finalizers = null; - } - Subscription.prototype.unsubscribe = function () { - var e_1, _a, e_2, _b; - var errors; - if (!this.closed) { - this.closed = true; - var _parentage = this._parentage; - if (_parentage) { - this._parentage = null; - if (Array.isArray(_parentage)) { - try { - for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) { - var parent_1 = _parentage_1_1.value; - parent_1.remove(this); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1); - } - finally { if (e_1) throw e_1.error; } - } - } - else { - _parentage.remove(this); - } - } - var initialFinalizer = this.initialTeardown; - if (isFunction(initialFinalizer)) { - try { - initialFinalizer(); - } - catch (e) { - errors = e instanceof UnsubscriptionError ? e.errors : [e]; - } - } - var _finalizers = this._finalizers; - if (_finalizers) { - this._finalizers = null; - try { - for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) { - var finalizer = _finalizers_1_1.value; - try { - execFinalizer(finalizer); - } - catch (err) { - errors = errors !== null && errors !== void 0 ? errors : []; - if (err instanceof UnsubscriptionError) { - errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors)); - } - else { - errors.push(err); - } - } - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1); - } - finally { if (e_2) throw e_2.error; } - } - } - if (errors) { - throw new UnsubscriptionError(errors); - } - } - }; - Subscription.prototype.add = function (teardown) { - var _a; - if (teardown && teardown !== this) { - if (this.closed) { - execFinalizer(teardown); - } - else { - if (teardown instanceof Subscription) { - if (teardown.closed || teardown._hasParent(this)) { - return; - } - teardown._addParent(this); - } - (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown); - } - } - }; - Subscription.prototype._hasParent = function (parent) { - var _parentage = this._parentage; - return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent)); - }; - Subscription.prototype._addParent = function (parent) { - var _parentage = this._parentage; - this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent; - }; - Subscription.prototype._removeParent = function (parent) { - var _parentage = this._parentage; - if (_parentage === parent) { - this._parentage = null; - } - else if (Array.isArray(_parentage)) { - arrRemove(_parentage, parent); - } - }; - Subscription.prototype.remove = function (teardown) { - var _finalizers = this._finalizers; - _finalizers && arrRemove(_finalizers, teardown); - if (teardown instanceof Subscription) { - teardown._removeParent(this); - } - }; - Subscription.EMPTY = (function () { - var empty = new Subscription(); - empty.closed = true; - return empty; - })(); - return Subscription; - }()); - var EMPTY_SUBSCRIPTION = Subscription.EMPTY; - function isSubscription(value) { - return (value instanceof Subscription || - (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe))); - } - function execFinalizer(finalizer) { - if (isFunction(finalizer)) { - finalizer(); - } - else { - finalizer.unsubscribe(); - } - } - - var config = { - onUnhandledError: null, - onStoppedNotification: null, - Promise: undefined, - useDeprecatedSynchronousErrorHandling: false, - useDeprecatedNextContext: false, - }; - - var timeoutProvider = { - setTimeout: function (handler, timeout) { - var args = []; - for (var _i = 2; _i < arguments.length; _i++) { - args[_i - 2] = arguments[_i]; - } - var delegate = timeoutProvider.delegate; - if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) { - return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args))); - } - return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args))); - }, - clearTimeout: function (handle) { - var delegate = timeoutProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle); - }, - delegate: undefined, - }; - - function reportUnhandledError(err) { - timeoutProvider.setTimeout(function () { - var onUnhandledError = config.onUnhandledError; - if (onUnhandledError) { - onUnhandledError(err); - } - else { - throw err; - } - }); - } - - function noop() { } - - var COMPLETE_NOTIFICATION = (function () { return createNotification('C', undefined, undefined); })(); - function errorNotification(error) { - return createNotification('E', undefined, error); - } - function nextNotification(value) { - return createNotification('N', value, undefined); - } - function createNotification(kind, value, error) { - return { - kind: kind, - value: value, - error: error, - }; - } - - var context = null; - function errorContext(cb) { - if (config.useDeprecatedSynchronousErrorHandling) { - var isRoot = !context; - if (isRoot) { - context = { errorThrown: false, error: null }; - } - cb(); - if (isRoot) { - var _a = context, errorThrown = _a.errorThrown, error = _a.error; - context = null; - if (errorThrown) { - throw error; - } - } - } - else { - cb(); - } - } - function captureError(err) { - if (config.useDeprecatedSynchronousErrorHandling && context) { - context.errorThrown = true; - context.error = err; - } - } - - var Subscriber = (function (_super) { - __extends(Subscriber, _super); - function Subscriber(destination) { - var _this = _super.call(this) || this; - _this.isStopped = false; - if (destination) { - _this.destination = destination; - if (isSubscription(destination)) { - destination.add(_this); - } - } - else { - _this.destination = EMPTY_OBSERVER; - } - return _this; - } - Subscriber.create = function (next, error, complete) { - return new SafeSubscriber(next, error, complete); - }; - Subscriber.prototype.next = function (value) { - if (this.isStopped) { - handleStoppedNotification(nextNotification(value), this); - } - else { - this._next(value); - } - }; - Subscriber.prototype.error = function (err) { - if (this.isStopped) { - handleStoppedNotification(errorNotification(err), this); - } - else { - this.isStopped = true; - this._error(err); - } - }; - Subscriber.prototype.complete = function () { - if (this.isStopped) { - handleStoppedNotification(COMPLETE_NOTIFICATION, this); - } - else { - this.isStopped = true; - this._complete(); - } - }; - Subscriber.prototype.unsubscribe = function () { - if (!this.closed) { - this.isStopped = true; - _super.prototype.unsubscribe.call(this); - this.destination = null; - } - }; - Subscriber.prototype._next = function (value) { - this.destination.next(value); - }; - Subscriber.prototype._error = function (err) { - try { - this.destination.error(err); - } - finally { - this.unsubscribe(); - } - }; - Subscriber.prototype._complete = function () { - try { - this.destination.complete(); - } - finally { - this.unsubscribe(); - } - }; - return Subscriber; - }(Subscription)); - var _bind = Function.prototype.bind; - function bind(fn, thisArg) { - return _bind.call(fn, thisArg); - } - var ConsumerObserver = (function () { - function ConsumerObserver(partialObserver) { - this.partialObserver = partialObserver; - } - ConsumerObserver.prototype.next = function (value) { - var partialObserver = this.partialObserver; - if (partialObserver.next) { - try { - partialObserver.next(value); - } - catch (error) { - handleUnhandledError(error); - } - } - }; - ConsumerObserver.prototype.error = function (err) { - var partialObserver = this.partialObserver; - if (partialObserver.error) { - try { - partialObserver.error(err); - } - catch (error) { - handleUnhandledError(error); - } - } - else { - handleUnhandledError(err); - } - }; - ConsumerObserver.prototype.complete = function () { - var partialObserver = this.partialObserver; - if (partialObserver.complete) { - try { - partialObserver.complete(); - } - catch (error) { - handleUnhandledError(error); - } - } - }; - return ConsumerObserver; - }()); - var SafeSubscriber = (function (_super) { - __extends(SafeSubscriber, _super); - function SafeSubscriber(observerOrNext, error, complete) { - var _this = _super.call(this) || this; - var partialObserver; - if (isFunction(observerOrNext) || !observerOrNext) { - partialObserver = { - next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined), - error: error !== null && error !== void 0 ? error : undefined, - complete: complete !== null && complete !== void 0 ? complete : undefined, - }; - } - else { - var context_1; - if (_this && config.useDeprecatedNextContext) { - context_1 = Object.create(observerOrNext); - context_1.unsubscribe = function () { return _this.unsubscribe(); }; - partialObserver = { - next: observerOrNext.next && bind(observerOrNext.next, context_1), - error: observerOrNext.error && bind(observerOrNext.error, context_1), - complete: observerOrNext.complete && bind(observerOrNext.complete, context_1), - }; - } - else { - partialObserver = observerOrNext; - } - } - _this.destination = new ConsumerObserver(partialObserver); - return _this; - } - return SafeSubscriber; - }(Subscriber)); - function handleUnhandledError(error) { - if (config.useDeprecatedSynchronousErrorHandling) { - captureError(error); - } - else { - reportUnhandledError(error); - } - } - function defaultErrorHandler(err) { - throw err; - } - function handleStoppedNotification(notification, subscriber) { - var onStoppedNotification = config.onStoppedNotification; - onStoppedNotification && timeoutProvider.setTimeout(function () { return onStoppedNotification(notification, subscriber); }); - } - var EMPTY_OBSERVER = { - closed: true, - next: noop, - error: defaultErrorHandler, - complete: noop, - }; - - var observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })(); - - function identity(x) { - return x; - } - - function pipe() { - var fns = []; - for (var _i = 0; _i < arguments.length; _i++) { - fns[_i] = arguments[_i]; - } - return pipeFromArray(fns); - } - function pipeFromArray(fns) { - if (fns.length === 0) { - return identity; - } - if (fns.length === 1) { - return fns[0]; - } - return function piped(input) { - return fns.reduce(function (prev, fn) { return fn(prev); }, input); - }; - } - - var Observable = (function () { - function Observable(subscribe) { - if (subscribe) { - this._subscribe = subscribe; - } - } - Observable.prototype.lift = function (operator) { - var observable$$1 = new Observable(); - observable$$1.source = this; - observable$$1.operator = operator; - return observable$$1; - }; - Observable.prototype.subscribe = function (observerOrNext, error, complete) { - var _this = this; - var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete); - errorContext(function () { - var _a = _this, operator = _a.operator, source = _a.source; - subscriber.add(operator - ? - operator.call(subscriber, source) - : source - ? - _this._subscribe(subscriber) - : - _this._trySubscribe(subscriber)); - }); - return subscriber; - }; - Observable.prototype._trySubscribe = function (sink) { - try { - return this._subscribe(sink); - } - catch (err) { - sink.error(err); - } - }; - Observable.prototype.forEach = function (next, promiseCtor) { - var _this = this; - promiseCtor = getPromiseCtor(promiseCtor); - return new promiseCtor(function (resolve, reject) { - var subscriber = new SafeSubscriber({ - next: function (value) { - try { - next(value); - } - catch (err) { - reject(err); - subscriber.unsubscribe(); - } - }, - error: reject, - complete: resolve, - }); - _this.subscribe(subscriber); - }); - }; - Observable.prototype._subscribe = function (subscriber) { - var _a; - return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber); - }; - Observable.prototype[observable] = function () { - return this; - }; - Observable.prototype.pipe = function () { - var operations = []; - for (var _i = 0; _i < arguments.length; _i++) { - operations[_i] = arguments[_i]; - } - return pipeFromArray(operations)(this); - }; - Observable.prototype.toPromise = function (promiseCtor) { - var _this = this; - promiseCtor = getPromiseCtor(promiseCtor); - return new promiseCtor(function (resolve, reject) { - var value; - _this.subscribe(function (x) { return (value = x); }, function (err) { return reject(err); }, function () { return resolve(value); }); - }); - }; - Observable.create = function (subscribe) { - return new Observable(subscribe); - }; - return Observable; - }()); - function getPromiseCtor(promiseCtor) { - var _a; - return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise; - } - function isObserver(value) { - return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete); - } - function isSubscriber(value) { - return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value)); - } - - function hasLift(source) { - return isFunction(source === null || source === void 0 ? void 0 : source.lift); - } - function operate(init) { - return function (source) { - if (hasLift(source)) { - return source.lift(function (liftedSource) { - try { - return init(liftedSource, this); - } - catch (err) { - this.error(err); - } - }); - } - throw new TypeError('Unable to lift unknown Observable type'); - }; - } - - function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) { - return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize); - } - var OperatorSubscriber = (function (_super) { - __extends(OperatorSubscriber, _super); - function OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) { - var _this = _super.call(this, destination) || this; - _this.onFinalize = onFinalize; - _this.shouldUnsubscribe = shouldUnsubscribe; - _this._next = onNext - ? function (value) { - try { - onNext(value); - } - catch (err) { - destination.error(err); - } - } - : _super.prototype._next; - _this._error = onError - ? function (err) { - try { - onError(err); - } - catch (err) { - destination.error(err); - } - finally { - this.unsubscribe(); - } - } - : _super.prototype._error; - _this._complete = onComplete - ? function () { - try { - onComplete(); - } - catch (err) { - destination.error(err); - } - finally { - this.unsubscribe(); - } - } - : _super.prototype._complete; - return _this; - } - OperatorSubscriber.prototype.unsubscribe = function () { - var _a; - if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) { - var closed_1 = this.closed; - _super.prototype.unsubscribe.call(this); - !closed_1 && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this)); - } - }; - return OperatorSubscriber; - }(Subscriber)); - - function refCount() { - return operate(function (source, subscriber) { - var connection = null; - source._refCount++; - var refCounter = createOperatorSubscriber(subscriber, undefined, undefined, undefined, function () { - if (!source || source._refCount <= 0 || 0 < --source._refCount) { - connection = null; - return; - } - var sharedConnection = source._connection; - var conn = connection; - connection = null; - if (sharedConnection && (!conn || sharedConnection === conn)) { - sharedConnection.unsubscribe(); - } - subscriber.unsubscribe(); - }); - source.subscribe(refCounter); - if (!refCounter.closed) { - connection = source.connect(); - } - }); - } - - var ConnectableObservable = (function (_super) { - __extends(ConnectableObservable, _super); - function ConnectableObservable(source, subjectFactory) { - var _this = _super.call(this) || this; - _this.source = source; - _this.subjectFactory = subjectFactory; - _this._subject = null; - _this._refCount = 0; - _this._connection = null; - if (hasLift(source)) { - _this.lift = source.lift; - } - return _this; - } - ConnectableObservable.prototype._subscribe = function (subscriber) { - return this.getSubject().subscribe(subscriber); - }; - ConnectableObservable.prototype.getSubject = function () { - var subject = this._subject; - if (!subject || subject.isStopped) { - this._subject = this.subjectFactory(); - } - return this._subject; - }; - ConnectableObservable.prototype._teardown = function () { - this._refCount = 0; - var _connection = this._connection; - this._subject = this._connection = null; - _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe(); - }; - ConnectableObservable.prototype.connect = function () { - var _this = this; - var connection = this._connection; - if (!connection) { - connection = this._connection = new Subscription(); - var subject_1 = this.getSubject(); - connection.add(this.source.subscribe(createOperatorSubscriber(subject_1, undefined, function () { - _this._teardown(); - subject_1.complete(); - }, function (err) { - _this._teardown(); - subject_1.error(err); - }, function () { return _this._teardown(); }))); - if (connection.closed) { - this._connection = null; - connection = Subscription.EMPTY; - } - } - return connection; - }; - ConnectableObservable.prototype.refCount = function () { - return refCount()(this); - }; - return ConnectableObservable; - }(Observable)); - - var performanceTimestampProvider = { - now: function () { - return (performanceTimestampProvider.delegate || performance).now(); - }, - delegate: undefined, - }; - - var animationFrameProvider = { - schedule: function (callback) { - var request = requestAnimationFrame; - var cancel = cancelAnimationFrame; - var delegate = animationFrameProvider.delegate; - if (delegate) { - request = delegate.requestAnimationFrame; - cancel = delegate.cancelAnimationFrame; - } - var handle = request(function (timestamp) { - cancel = undefined; - callback(timestamp); - }); - return new Subscription(function () { return cancel === null || cancel === void 0 ? void 0 : cancel(handle); }); - }, - requestAnimationFrame: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var delegate = animationFrameProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame).apply(void 0, __spreadArray([], __read(args))); - }, - cancelAnimationFrame: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var delegate = animationFrameProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame).apply(void 0, __spreadArray([], __read(args))); - }, - delegate: undefined, - }; - - function animationFrames(timestampProvider) { - return timestampProvider ? animationFramesFactory(timestampProvider) : DEFAULT_ANIMATION_FRAMES; - } - function animationFramesFactory(timestampProvider) { - return new Observable(function (subscriber) { - var provider = timestampProvider || performanceTimestampProvider; - var start = provider.now(); - var id = 0; - var run = function () { - if (!subscriber.closed) { - id = animationFrameProvider.requestAnimationFrame(function (timestamp) { - id = 0; - var now = provider.now(); - subscriber.next({ - timestamp: timestampProvider ? now : timestamp, - elapsed: now - start, - }); - run(); - }); - } - }; - run(); - return function () { - if (id) { - animationFrameProvider.cancelAnimationFrame(id); - } - }; - }); - } - var DEFAULT_ANIMATION_FRAMES = animationFramesFactory(); - - var ObjectUnsubscribedError = createErrorClass(function (_super) { - return function ObjectUnsubscribedErrorImpl() { - _super(this); - this.name = 'ObjectUnsubscribedError'; - this.message = 'object unsubscribed'; - }; - }); - - var Subject = (function (_super) { - __extends(Subject, _super); - function Subject() { - var _this = _super.call(this) || this; - _this.closed = false; - _this.currentObservers = null; - _this.observers = []; - _this.isStopped = false; - _this.hasError = false; - _this.thrownError = null; - return _this; - } - Subject.prototype.lift = function (operator) { - var subject = new AnonymousSubject(this, this); - subject.operator = operator; - return subject; - }; - Subject.prototype._throwIfClosed = function () { - if (this.closed) { - throw new ObjectUnsubscribedError(); - } - }; - Subject.prototype.next = function (value) { - var _this = this; - errorContext(function () { - var e_1, _a; - _this._throwIfClosed(); - if (!_this.isStopped) { - if (!_this.currentObservers) { - _this.currentObservers = Array.from(_this.observers); - } - try { - for (var _b = __values(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) { - var observer = _c.value; - observer.next(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } - } - } - }); - }; - Subject.prototype.error = function (err) { - var _this = this; - errorContext(function () { - _this._throwIfClosed(); - if (!_this.isStopped) { - _this.hasError = _this.isStopped = true; - _this.thrownError = err; - var observers = _this.observers; - while (observers.length) { - observers.shift().error(err); - } - } - }); - }; - Subject.prototype.complete = function () { - var _this = this; - errorContext(function () { - _this._throwIfClosed(); - if (!_this.isStopped) { - _this.isStopped = true; - var observers = _this.observers; - while (observers.length) { - observers.shift().complete(); - } - } - }); - }; - Subject.prototype.unsubscribe = function () { - this.isStopped = this.closed = true; - this.observers = this.currentObservers = null; - }; - Object.defineProperty(Subject.prototype, "observed", { - get: function () { - var _a; - return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0; - }, - enumerable: false, - configurable: true - }); - Subject.prototype._trySubscribe = function (subscriber) { - this._throwIfClosed(); - return _super.prototype._trySubscribe.call(this, subscriber); - }; - Subject.prototype._subscribe = function (subscriber) { - this._throwIfClosed(); - this._checkFinalizedStatuses(subscriber); - return this._innerSubscribe(subscriber); - }; - Subject.prototype._innerSubscribe = function (subscriber) { - var _this = this; - var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers; - if (hasError || isStopped) { - return EMPTY_SUBSCRIPTION; - } - this.currentObservers = null; - observers.push(subscriber); - return new Subscription(function () { - _this.currentObservers = null; - arrRemove(observers, subscriber); - }); - }; - Subject.prototype._checkFinalizedStatuses = function (subscriber) { - var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped; - if (hasError) { - subscriber.error(thrownError); - } - else if (isStopped) { - subscriber.complete(); - } - }; - Subject.prototype.asObservable = function () { - var observable = new Observable(); - observable.source = this; - return observable; - }; - Subject.create = function (destination, source) { - return new AnonymousSubject(destination, source); - }; - return Subject; - }(Observable)); - var AnonymousSubject = (function (_super) { - __extends(AnonymousSubject, _super); - function AnonymousSubject(destination, source) { - var _this = _super.call(this) || this; - _this.destination = destination; - _this.source = source; - return _this; - } - AnonymousSubject.prototype.next = function (value) { - var _a, _b; - (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value); - }; - AnonymousSubject.prototype.error = function (err) { - var _a, _b; - (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err); - }; - AnonymousSubject.prototype.complete = function () { - var _a, _b; - (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a); - }; - AnonymousSubject.prototype._subscribe = function (subscriber) { - var _a, _b; - return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION; - }; - return AnonymousSubject; - }(Subject)); - - var BehaviorSubject = (function (_super) { - __extends(BehaviorSubject, _super); - function BehaviorSubject(_value) { - var _this = _super.call(this) || this; - _this._value = _value; - return _this; - } - Object.defineProperty(BehaviorSubject.prototype, "value", { - get: function () { - return this.getValue(); - }, - enumerable: false, - configurable: true - }); - BehaviorSubject.prototype._subscribe = function (subscriber) { - var subscription = _super.prototype._subscribe.call(this, subscriber); - !subscription.closed && subscriber.next(this._value); - return subscription; - }; - BehaviorSubject.prototype.getValue = function () { - var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, _value = _a._value; - if (hasError) { - throw thrownError; - } - this._throwIfClosed(); - return _value; - }; - BehaviorSubject.prototype.next = function (value) { - _super.prototype.next.call(this, (this._value = value)); - }; - return BehaviorSubject; - }(Subject)); - - var dateTimestampProvider = { - now: function () { - return (dateTimestampProvider.delegate || Date).now(); - }, - delegate: undefined, - }; - - var ReplaySubject = (function (_super) { - __extends(ReplaySubject, _super); - function ReplaySubject(_bufferSize, _windowTime, _timestampProvider) { - if (_bufferSize === void 0) { _bufferSize = Infinity; } - if (_windowTime === void 0) { _windowTime = Infinity; } - if (_timestampProvider === void 0) { _timestampProvider = dateTimestampProvider; } - var _this = _super.call(this) || this; - _this._bufferSize = _bufferSize; - _this._windowTime = _windowTime; - _this._timestampProvider = _timestampProvider; - _this._buffer = []; - _this._infiniteTimeWindow = true; - _this._infiniteTimeWindow = _windowTime === Infinity; - _this._bufferSize = Math.max(1, _bufferSize); - _this._windowTime = Math.max(1, _windowTime); - return _this; - } - ReplaySubject.prototype.next = function (value) { - var _a = this, isStopped = _a.isStopped, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow, _timestampProvider = _a._timestampProvider, _windowTime = _a._windowTime; - if (!isStopped) { - _buffer.push(value); - !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime); - } - this._trimBuffer(); - _super.prototype.next.call(this, value); - }; - ReplaySubject.prototype._subscribe = function (subscriber) { - this._throwIfClosed(); - this._trimBuffer(); - var subscription = this._innerSubscribe(subscriber); - var _a = this, _infiniteTimeWindow = _a._infiniteTimeWindow, _buffer = _a._buffer; - var copy = _buffer.slice(); - for (var i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) { - subscriber.next(copy[i]); - } - this._checkFinalizedStatuses(subscriber); - return subscription; - }; - ReplaySubject.prototype._trimBuffer = function () { - var _a = this, _bufferSize = _a._bufferSize, _timestampProvider = _a._timestampProvider, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow; - var adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize; - _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize); - if (!_infiniteTimeWindow) { - var now = _timestampProvider.now(); - var last = 0; - for (var i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) { - last = i; - } - last && _buffer.splice(0, last + 1); - } - }; - return ReplaySubject; - }(Subject)); - - var AsyncSubject = (function (_super) { - __extends(AsyncSubject, _super); - function AsyncSubject() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._value = null; - _this._hasValue = false; - _this._isComplete = false; - return _this; - } - AsyncSubject.prototype._checkFinalizedStatuses = function (subscriber) { - var _a = this, hasError = _a.hasError, _hasValue = _a._hasValue, _value = _a._value, thrownError = _a.thrownError, isStopped = _a.isStopped, _isComplete = _a._isComplete; - if (hasError) { - subscriber.error(thrownError); - } - else if (isStopped || _isComplete) { - _hasValue && subscriber.next(_value); - subscriber.complete(); - } - }; - AsyncSubject.prototype.next = function (value) { - if (!this.isStopped) { - this._value = value; - this._hasValue = true; - } - }; - AsyncSubject.prototype.complete = function () { - var _a = this, _hasValue = _a._hasValue, _value = _a._value, _isComplete = _a._isComplete; - if (!_isComplete) { - this._isComplete = true; - _hasValue && _super.prototype.next.call(this, _value); - _super.prototype.complete.call(this); - } - }; - return AsyncSubject; - }(Subject)); - - var Action = (function (_super) { - __extends(Action, _super); - function Action(scheduler, work) { - return _super.call(this) || this; - } - Action.prototype.schedule = function (state, delay) { - if (delay === void 0) { delay = 0; } - return this; - }; - return Action; - }(Subscription)); - - var intervalProvider = { - setInterval: function (handler, timeout) { - var args = []; - for (var _i = 2; _i < arguments.length; _i++) { - args[_i - 2] = arguments[_i]; - } - var delegate = intervalProvider.delegate; - if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) { - return delegate.setInterval.apply(delegate, __spreadArray([handler, timeout], __read(args))); - } - return setInterval.apply(void 0, __spreadArray([handler, timeout], __read(args))); - }, - clearInterval: function (handle) { - var delegate = intervalProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle); - }, - delegate: undefined, - }; - - var AsyncAction = (function (_super) { - __extends(AsyncAction, _super); - function AsyncAction(scheduler, work) { - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - _this.pending = false; - return _this; - } - AsyncAction.prototype.schedule = function (state, delay) { - var _a; - if (delay === void 0) { delay = 0; } - if (this.closed) { - return this; - } - this.state = state; - var id = this.id; - var scheduler = this.scheduler; - if (id != null) { - this.id = this.recycleAsyncId(scheduler, id, delay); - } - this.pending = true; - this.delay = delay; - this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay); - return this; - }; - AsyncAction.prototype.requestAsyncId = function (scheduler, _id, delay) { - if (delay === void 0) { delay = 0; } - return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay); - }; - AsyncAction.prototype.recycleAsyncId = function (_scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - if (delay != null && this.delay === delay && this.pending === false) { - return id; - } - if (id != null) { - intervalProvider.clearInterval(id); - } - return undefined; - }; - AsyncAction.prototype.execute = function (state, delay) { - if (this.closed) { - return new Error('executing a cancelled action'); - } - this.pending = false; - var error = this._execute(state, delay); - if (error) { - return error; - } - else if (this.pending === false && this.id != null) { - this.id = this.recycleAsyncId(this.scheduler, this.id, null); - } - }; - AsyncAction.prototype._execute = function (state, _delay) { - var errored = false; - var errorValue; - try { - this.work(state); - } - catch (e) { - errored = true; - errorValue = e ? e : new Error('Scheduled action threw falsy error'); - } - if (errored) { - this.unsubscribe(); - return errorValue; - } - }; - AsyncAction.prototype.unsubscribe = function () { - if (!this.closed) { - var _a = this, id = _a.id, scheduler = _a.scheduler; - var actions = scheduler.actions; - this.work = this.state = this.scheduler = null; - this.pending = false; - arrRemove(actions, this); - if (id != null) { - this.id = this.recycleAsyncId(scheduler, id, null); - } - this.delay = null; - _super.prototype.unsubscribe.call(this); - } - }; - return AsyncAction; - }(Action)); - - var nextHandle = 1; - var resolved; - var activeHandles = {}; - function findAndClearHandle(handle) { - if (handle in activeHandles) { - delete activeHandles[handle]; - return true; - } - return false; - } - var Immediate = { - setImmediate: function (cb) { - var handle = nextHandle++; - activeHandles[handle] = true; - if (!resolved) { - resolved = Promise.resolve(); - } - resolved.then(function () { return findAndClearHandle(handle) && cb(); }); - return handle; - }, - clearImmediate: function (handle) { - findAndClearHandle(handle); - }, - }; - - var setImmediate = Immediate.setImmediate, clearImmediate = Immediate.clearImmediate; - var immediateProvider = { - setImmediate: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var delegate = immediateProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate).apply(void 0, __spreadArray([], __read(args))); - }, - clearImmediate: function (handle) { - var delegate = immediateProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate)(handle); - }, - delegate: undefined, - }; - - var AsapAction = (function (_super) { - __extends(AsapAction, _super); - function AsapAction(scheduler, work) { - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - return _this; - } - AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - if (delay !== null && delay > 0) { - return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); - } - scheduler.actions.push(this); - return scheduler._scheduled || (scheduler._scheduled = immediateProvider.setImmediate(scheduler.flush.bind(scheduler, undefined))); - }; - AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) { - var _a; - if (delay === void 0) { delay = 0; } - if (delay != null ? delay > 0 : this.delay > 0) { - return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); - } - var actions = scheduler.actions; - if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { - immediateProvider.clearImmediate(id); - if (scheduler._scheduled === id) { - scheduler._scheduled = undefined; - } - } - return undefined; - }; - return AsapAction; - }(AsyncAction)); - - var Scheduler = (function () { - function Scheduler(schedulerActionCtor, now) { - if (now === void 0) { now = Scheduler.now; } - this.schedulerActionCtor = schedulerActionCtor; - this.now = now; - } - Scheduler.prototype.schedule = function (work, delay, state) { - if (delay === void 0) { delay = 0; } - return new this.schedulerActionCtor(this, work).schedule(state, delay); - }; - Scheduler.now = dateTimestampProvider.now; - return Scheduler; - }()); - - var AsyncScheduler = (function (_super) { - __extends(AsyncScheduler, _super); - function AsyncScheduler(SchedulerAction, now) { - if (now === void 0) { now = Scheduler.now; } - var _this = _super.call(this, SchedulerAction, now) || this; - _this.actions = []; - _this._active = false; - return _this; - } - AsyncScheduler.prototype.flush = function (action) { - var actions = this.actions; - if (this._active) { - actions.push(action); - return; - } - var error; - this._active = true; - do { - if ((error = action.execute(action.state, action.delay))) { - break; - } - } while ((action = actions.shift())); - this._active = false; - if (error) { - while ((action = actions.shift())) { - action.unsubscribe(); - } - throw error; - } - }; - return AsyncScheduler; - }(Scheduler)); - - var AsapScheduler = (function (_super) { - __extends(AsapScheduler, _super); - function AsapScheduler() { - return _super !== null && _super.apply(this, arguments) || this; - } - AsapScheduler.prototype.flush = function (action) { - this._active = true; - var flushId = this._scheduled; - this._scheduled = undefined; - var actions = this.actions; - var error; - action = action || actions.shift(); - do { - if ((error = action.execute(action.state, action.delay))) { - break; - } - } while ((action = actions[0]) && action.id === flushId && actions.shift()); - this._active = false; - if (error) { - while ((action = actions[0]) && action.id === flushId && actions.shift()) { - action.unsubscribe(); - } - throw error; - } - }; - return AsapScheduler; - }(AsyncScheduler)); - - var asapScheduler = new AsapScheduler(AsapAction); - var asap = asapScheduler; - - var asyncScheduler = new AsyncScheduler(AsyncAction); - var async = asyncScheduler; - - var QueueAction = (function (_super) { - __extends(QueueAction, _super); - function QueueAction(scheduler, work) { - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - return _this; - } - QueueAction.prototype.schedule = function (state, delay) { - if (delay === void 0) { delay = 0; } - if (delay > 0) { - return _super.prototype.schedule.call(this, state, delay); - } - this.delay = delay; - this.state = state; - this.scheduler.flush(this); - return this; - }; - QueueAction.prototype.execute = function (state, delay) { - return delay > 0 || this.closed ? _super.prototype.execute.call(this, state, delay) : this._execute(state, delay); - }; - QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) { - return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); - } - scheduler.flush(this); - return 0; - }; - return QueueAction; - }(AsyncAction)); - - var QueueScheduler = (function (_super) { - __extends(QueueScheduler, _super); - function QueueScheduler() { - return _super !== null && _super.apply(this, arguments) || this; - } - return QueueScheduler; - }(AsyncScheduler)); - - var queueScheduler = new QueueScheduler(QueueAction); - var queue = queueScheduler; - - var AnimationFrameAction = (function (_super) { - __extends(AnimationFrameAction, _super); - function AnimationFrameAction(scheduler, work) { - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - return _this; - } - AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - if (delay !== null && delay > 0) { - return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); - } - scheduler.actions.push(this); - return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(function () { return scheduler.flush(undefined); })); - }; - AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) { - var _a; - if (delay === void 0) { delay = 0; } - if (delay != null ? delay > 0 : this.delay > 0) { - return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); - } - var actions = scheduler.actions; - if (id != null && id === scheduler._scheduled && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { - animationFrameProvider.cancelAnimationFrame(id); - scheduler._scheduled = undefined; - } - return undefined; - }; - return AnimationFrameAction; - }(AsyncAction)); - - var AnimationFrameScheduler = (function (_super) { - __extends(AnimationFrameScheduler, _super); - function AnimationFrameScheduler() { - return _super !== null && _super.apply(this, arguments) || this; - } - AnimationFrameScheduler.prototype.flush = function (action) { - this._active = true; - var flushId; - if (action) { - flushId = action.id; - } - else { - flushId = this._scheduled; - this._scheduled = undefined; - } - var actions = this.actions; - var error; - action = action || actions.shift(); - do { - if ((error = action.execute(action.state, action.delay))) { - break; - } - } while ((action = actions[0]) && action.id === flushId && actions.shift()); - this._active = false; - if (error) { - while ((action = actions[0]) && action.id === flushId && actions.shift()) { - action.unsubscribe(); - } - throw error; - } - }; - return AnimationFrameScheduler; - }(AsyncScheduler)); - - var animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction); - var animationFrame = animationFrameScheduler; - - var VirtualTimeScheduler = (function (_super) { - __extends(VirtualTimeScheduler, _super); - function VirtualTimeScheduler(schedulerActionCtor, maxFrames) { - if (schedulerActionCtor === void 0) { schedulerActionCtor = VirtualAction; } - if (maxFrames === void 0) { maxFrames = Infinity; } - var _this = _super.call(this, schedulerActionCtor, function () { return _this.frame; }) || this; - _this.maxFrames = maxFrames; - _this.frame = 0; - _this.index = -1; - return _this; - } - VirtualTimeScheduler.prototype.flush = function () { - var _a = this, actions = _a.actions, maxFrames = _a.maxFrames; - var error; - var action; - while ((action = actions[0]) && action.delay <= maxFrames) { - actions.shift(); - this.frame = action.delay; - if ((error = action.execute(action.state, action.delay))) { - break; - } - } - if (error) { - while ((action = actions.shift())) { - action.unsubscribe(); - } - throw error; - } - }; - VirtualTimeScheduler.frameTimeFactor = 10; - return VirtualTimeScheduler; - }(AsyncScheduler)); - var VirtualAction = (function (_super) { - __extends(VirtualAction, _super); - function VirtualAction(scheduler, work, index) { - if (index === void 0) { index = (scheduler.index += 1); } - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - _this.index = index; - _this.active = true; - _this.index = scheduler.index = index; - return _this; - } - VirtualAction.prototype.schedule = function (state, delay) { - if (delay === void 0) { delay = 0; } - if (Number.isFinite(delay)) { - if (!this.id) { - return _super.prototype.schedule.call(this, state, delay); - } - this.active = false; - var action = new VirtualAction(this.scheduler, this.work); - this.add(action); - return action.schedule(state, delay); - } - else { - return Subscription.EMPTY; - } - }; - VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - this.delay = scheduler.frame + delay; - var actions = scheduler.actions; - actions.push(this); - actions.sort(VirtualAction.sortActions); - return 1; - }; - VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - return undefined; - }; - VirtualAction.prototype._execute = function (state, delay) { - if (this.active === true) { - return _super.prototype._execute.call(this, state, delay); - } - }; - VirtualAction.sortActions = function (a, b) { - if (a.delay === b.delay) { - if (a.index === b.index) { - return 0; - } - else if (a.index > b.index) { - return 1; - } - else { - return -1; - } - } - else if (a.delay > b.delay) { - return 1; - } - else { - return -1; - } - }; - return VirtualAction; - }(AsyncAction)); - - var EMPTY = new Observable(function (subscriber) { return subscriber.complete(); }); - function empty(scheduler) { - return scheduler ? emptyScheduled(scheduler) : EMPTY; - } - function emptyScheduled(scheduler) { - return new Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); }); - } - - function isScheduler(value) { - return value && isFunction(value.schedule); - } - - function last(arr) { - return arr[arr.length - 1]; - } - function popResultSelector(args) { - return isFunction(last(args)) ? args.pop() : undefined; - } - function popScheduler(args) { - return isScheduler(last(args)) ? args.pop() : undefined; - } - function popNumber(args, defaultValue) { - return typeof last(args) === 'number' ? args.pop() : defaultValue; - } - - var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; }); - - function isPromise(value) { - return isFunction(value === null || value === void 0 ? void 0 : value.then); - } - - function isInteropObservable(input) { - return isFunction(input[observable]); - } - - function isAsyncIterable(obj) { - return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]); - } - - function createInvalidObservableTypeError(input) { - return new TypeError("You provided " + (input !== null && typeof input === 'object' ? 'an invalid object' : "'" + input + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable."); - } - - function getSymbolIterator() { - if (typeof Symbol !== 'function' || !Symbol.iterator) { - return '@@iterator'; - } - return Symbol.iterator; - } - var iterator = getSymbolIterator(); - - function isIterable(input) { - return isFunction(input === null || input === void 0 ? void 0 : input[iterator]); - } - - function readableStreamLikeToAsyncGenerator(readableStream) { - return __asyncGenerator(this, arguments, function readableStreamLikeToAsyncGenerator_1() { - var reader, _a, value, done; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - reader = readableStream.getReader(); - _b.label = 1; - case 1: - _b.trys.push([1, , 9, 10]); - _b.label = 2; - case 2: - return [4, __await(reader.read())]; - case 3: - _a = _b.sent(), value = _a.value, done = _a.done; - if (!done) return [3, 5]; - return [4, __await(void 0)]; - case 4: return [2, _b.sent()]; - case 5: return [4, __await(value)]; - case 6: return [4, _b.sent()]; - case 7: - _b.sent(); - return [3, 2]; - case 8: return [3, 10]; - case 9: - reader.releaseLock(); - return [7]; - case 10: return [2]; - } - }); - }); - } - function isReadableStreamLike(obj) { - return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader); - } - - function innerFrom(input) { - if (input instanceof Observable) { - return input; - } - if (input != null) { - if (isInteropObservable(input)) { - return fromInteropObservable(input); - } - if (isArrayLike(input)) { - return fromArrayLike(input); - } - if (isPromise(input)) { - return fromPromise(input); - } - if (isAsyncIterable(input)) { - return fromAsyncIterable(input); - } - if (isIterable(input)) { - return fromIterable(input); - } - if (isReadableStreamLike(input)) { - return fromReadableStreamLike(input); - } - } - throw createInvalidObservableTypeError(input); - } - function fromInteropObservable(obj) { - return new Observable(function (subscriber) { - var obs = obj[observable](); - if (isFunction(obs.subscribe)) { - return obs.subscribe(subscriber); - } - throw new TypeError('Provided object does not correctly implement Symbol.observable'); - }); - } - function fromArrayLike(array) { - return new Observable(function (subscriber) { - for (var i = 0; i < array.length && !subscriber.closed; i++) { - subscriber.next(array[i]); - } - subscriber.complete(); - }); - } - function fromPromise(promise) { - return new Observable(function (subscriber) { - promise - .then(function (value) { - if (!subscriber.closed) { - subscriber.next(value); - subscriber.complete(); - } - }, function (err) { return subscriber.error(err); }) - .then(null, reportUnhandledError); - }); - } - function fromIterable(iterable) { - return new Observable(function (subscriber) { - var e_1, _a; - try { - for (var iterable_1 = __values(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) { - var value = iterable_1_1.value; - subscriber.next(value); - if (subscriber.closed) { - return; - } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return)) _a.call(iterable_1); - } - finally { if (e_1) throw e_1.error; } - } - subscriber.complete(); - }); - } - function fromAsyncIterable(asyncIterable) { - return new Observable(function (subscriber) { - process(asyncIterable, subscriber).catch(function (err) { return subscriber.error(err); }); - }); - } - function fromReadableStreamLike(readableStream) { - return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream)); - } - function process(asyncIterable, subscriber) { - var asyncIterable_1, asyncIterable_1_1; - var e_2, _a; - return __awaiter(this, void 0, void 0, function () { - var value, e_2_1; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - _b.trys.push([0, 5, 6, 11]); - asyncIterable_1 = __asyncValues(asyncIterable); - _b.label = 1; - case 1: return [4, asyncIterable_1.next()]; - case 2: - if (!(asyncIterable_1_1 = _b.sent(), !asyncIterable_1_1.done)) return [3, 4]; - value = asyncIterable_1_1.value; - subscriber.next(value); - if (subscriber.closed) { - return [2]; - } - _b.label = 3; - case 3: return [3, 1]; - case 4: return [3, 11]; - case 5: - e_2_1 = _b.sent(); - e_2 = { error: e_2_1 }; - return [3, 11]; - case 6: - _b.trys.push([6, , 9, 10]); - if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return))) return [3, 8]; - return [4, _a.call(asyncIterable_1)]; - case 7: - _b.sent(); - _b.label = 8; - case 8: return [3, 10]; - case 9: - if (e_2) throw e_2.error; - return [7]; - case 10: return [7]; - case 11: - subscriber.complete(); - return [2]; - } - }); - }); - } - - function executeSchedule(parentSubscription, scheduler, work, delay, repeat) { - if (delay === void 0) { delay = 0; } - if (repeat === void 0) { repeat = false; } - var scheduleSubscription = scheduler.schedule(function () { - work(); - if (repeat) { - parentSubscription.add(this.schedule(null, delay)); - } - else { - this.unsubscribe(); - } - }, delay); - parentSubscription.add(scheduleSubscription); - if (!repeat) { - return scheduleSubscription; - } - } - - function observeOn(scheduler, delay) { - if (delay === void 0) { delay = 0; } - return operate(function (source, subscriber) { - source.subscribe(createOperatorSubscriber(subscriber, function (value) { return executeSchedule(subscriber, scheduler, function () { return subscriber.next(value); }, delay); }, function () { return executeSchedule(subscriber, scheduler, function () { return subscriber.complete(); }, delay); }, function (err) { return executeSchedule(subscriber, scheduler, function () { return subscriber.error(err); }, delay); })); - }); - } - - function subscribeOn(scheduler, delay) { - if (delay === void 0) { delay = 0; } - return operate(function (source, subscriber) { - subscriber.add(scheduler.schedule(function () { return source.subscribe(subscriber); }, delay)); - }); - } - - function scheduleObservable(input, scheduler) { - return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); - } - - function schedulePromise(input, scheduler) { - return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); - } - - function scheduleArray(input, scheduler) { - return new Observable(function (subscriber) { - var i = 0; - return scheduler.schedule(function () { - if (i === input.length) { - subscriber.complete(); - } - else { - subscriber.next(input[i++]); - if (!subscriber.closed) { - this.schedule(); - } - } - }); - }); - } - - function scheduleIterable(input, scheduler) { - return new Observable(function (subscriber) { - var iterator$$1; - executeSchedule(subscriber, scheduler, function () { - iterator$$1 = input[iterator](); - executeSchedule(subscriber, scheduler, function () { - var _a; - var value; - var done; - try { - (_a = iterator$$1.next(), value = _a.value, done = _a.done); - } - catch (err) { - subscriber.error(err); - return; - } - if (done) { - subscriber.complete(); - } - else { - subscriber.next(value); - } - }, 0, true); - }); - return function () { return isFunction(iterator$$1 === null || iterator$$1 === void 0 ? void 0 : iterator$$1.return) && iterator$$1.return(); }; - }); - } - - function scheduleAsyncIterable(input, scheduler) { - if (!input) { - throw new Error('Iterable cannot be null'); - } - return new Observable(function (subscriber) { - executeSchedule(subscriber, scheduler, function () { - var iterator = input[Symbol.asyncIterator](); - executeSchedule(subscriber, scheduler, function () { - iterator.next().then(function (result) { - if (result.done) { - subscriber.complete(); - } - else { - subscriber.next(result.value); - } - }); - }, 0, true); - }); - }); - } - - function scheduleReadableStreamLike(input, scheduler) { - return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler); - } - - function scheduled(input, scheduler) { - if (input != null) { - if (isInteropObservable(input)) { - return scheduleObservable(input, scheduler); - } - if (isArrayLike(input)) { - return scheduleArray(input, scheduler); - } - if (isPromise(input)) { - return schedulePromise(input, scheduler); - } - if (isAsyncIterable(input)) { - return scheduleAsyncIterable(input, scheduler); - } - if (isIterable(input)) { - return scheduleIterable(input, scheduler); - } - if (isReadableStreamLike(input)) { - return scheduleReadableStreamLike(input, scheduler); - } - } - throw createInvalidObservableTypeError(input); - } - - function from(input, scheduler) { - return scheduler ? scheduled(input, scheduler) : innerFrom(input); - } - - function of() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = popScheduler(args); - return from(args, scheduler); - } - - function throwError(errorOrErrorFactory, scheduler) { - var errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : function () { return errorOrErrorFactory; }; - var init = function (subscriber) { return subscriber.error(errorFactory()); }; - return new Observable(scheduler ? function (subscriber) { return scheduler.schedule(init, 0, subscriber); } : init); - } - - (function (NotificationKind) { - NotificationKind["NEXT"] = "N"; - NotificationKind["ERROR"] = "E"; - NotificationKind["COMPLETE"] = "C"; - })(exports.NotificationKind || (exports.NotificationKind = {})); - var Notification = (function () { - function Notification(kind, value, error) { - this.kind = kind; - this.value = value; - this.error = error; - this.hasValue = kind === 'N'; - } - Notification.prototype.observe = function (observer) { - return observeNotification(this, observer); - }; - Notification.prototype.do = function (nextHandler, errorHandler, completeHandler) { - var _a = this, kind = _a.kind, value = _a.value, error = _a.error; - return kind === 'N' ? nextHandler === null || nextHandler === void 0 ? void 0 : nextHandler(value) : kind === 'E' ? errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler(error) : completeHandler === null || completeHandler === void 0 ? void 0 : completeHandler(); - }; - Notification.prototype.accept = function (nextOrObserver, error, complete) { - var _a; - return isFunction((_a = nextOrObserver) === null || _a === void 0 ? void 0 : _a.next) - ? this.observe(nextOrObserver) - : this.do(nextOrObserver, error, complete); - }; - Notification.prototype.toObservable = function () { - var _a = this, kind = _a.kind, value = _a.value, error = _a.error; - var result = kind === 'N' - ? - of(value) - : - kind === 'E' - ? - throwError(function () { return error; }) - : - kind === 'C' - ? - EMPTY - : - 0; - if (!result) { - throw new TypeError("Unexpected notification kind " + kind); - } - return result; - }; - Notification.createNext = function (value) { - return new Notification('N', value); - }; - Notification.createError = function (err) { - return new Notification('E', undefined, err); - }; - Notification.createComplete = function () { - return Notification.completeNotification; - }; - Notification.completeNotification = new Notification('C'); - return Notification; - }()); - function observeNotification(notification, observer) { - var _a, _b, _c; - var _d = notification, kind = _d.kind, value = _d.value, error = _d.error; - if (typeof kind !== 'string') { - throw new TypeError('Invalid notification, missing "kind"'); - } - kind === 'N' ? (_a = observer.next) === null || _a === void 0 ? void 0 : _a.call(observer, value) : kind === 'E' ? (_b = observer.error) === null || _b === void 0 ? void 0 : _b.call(observer, error) : (_c = observer.complete) === null || _c === void 0 ? void 0 : _c.call(observer); - } - - function isObservable(obj) { - return !!obj && (obj instanceof Observable || (isFunction(obj.lift) && isFunction(obj.subscribe))); - } - - var EmptyError = createErrorClass(function (_super) { - return function EmptyErrorImpl() { - _super(this); - this.name = 'EmptyError'; - this.message = 'no elements in sequence'; - }; - }); - - function lastValueFrom(source, config) { - var hasConfig = typeof config === 'object'; - return new Promise(function (resolve, reject) { - var _hasValue = false; - var _value; - source.subscribe({ - next: function (value) { - _value = value; - _hasValue = true; - }, - error: reject, - complete: function () { - if (_hasValue) { - resolve(_value); - } - else if (hasConfig) { - resolve(config.defaultValue); - } - else { - reject(new EmptyError()); - } - }, - }); - }); - } - - function firstValueFrom(source, config) { - var hasConfig = typeof config === 'object'; - return new Promise(function (resolve, reject) { - var subscriber = new SafeSubscriber({ - next: function (value) { - resolve(value); - subscriber.unsubscribe(); - }, - error: reject, - complete: function () { - if (hasConfig) { - resolve(config.defaultValue); - } - else { - reject(new EmptyError()); - } - }, - }); - source.subscribe(subscriber); - }); - } - - var ArgumentOutOfRangeError = createErrorClass(function (_super) { - return function ArgumentOutOfRangeErrorImpl() { - _super(this); - this.name = 'ArgumentOutOfRangeError'; - this.message = 'argument out of range'; - }; - }); - - var NotFoundError = createErrorClass(function (_super) { - return function NotFoundErrorImpl(message) { - _super(this); - this.name = 'NotFoundError'; - this.message = message; - }; - }); - - var SequenceError = createErrorClass(function (_super) { - return function SequenceErrorImpl(message) { - _super(this); - this.name = 'SequenceError'; - this.message = message; - }; - }); - - function isValidDate(value) { - return value instanceof Date && !isNaN(value); - } - - var TimeoutError = createErrorClass(function (_super) { - return function TimeoutErrorImpl(info) { - if (info === void 0) { info = null; } - _super(this); - this.message = 'Timeout has occurred'; - this.name = 'TimeoutError'; - this.info = info; - }; - }); - function timeout(config, schedulerArg) { - var _a = (isValidDate(config) ? { first: config } : typeof config === 'number' ? { each: config } : config), first = _a.first, each = _a.each, _b = _a.with, _with = _b === void 0 ? timeoutErrorFactory : _b, _c = _a.scheduler, scheduler = _c === void 0 ? schedulerArg !== null && schedulerArg !== void 0 ? schedulerArg : asyncScheduler : _c, _d = _a.meta, meta = _d === void 0 ? null : _d; - if (first == null && each == null) { - throw new TypeError('No timeout provided.'); - } - return operate(function (source, subscriber) { - var originalSourceSubscription; - var timerSubscription; - var lastValue = null; - var seen = 0; - var startTimer = function (delay) { - timerSubscription = executeSchedule(subscriber, scheduler, function () { - try { - originalSourceSubscription.unsubscribe(); - innerFrom(_with({ - meta: meta, - lastValue: lastValue, - seen: seen, - })).subscribe(subscriber); - } - catch (err) { - subscriber.error(err); - } - }, delay); - }; - originalSourceSubscription = source.subscribe(createOperatorSubscriber(subscriber, function (value) { - timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); - seen++; - subscriber.next((lastValue = value)); - each > 0 && startTimer(each); - }, undefined, undefined, function () { - if (!(timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.closed)) { - timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); - } - lastValue = null; - })); - !seen && startTimer(first != null ? (typeof first === 'number' ? first : +first - scheduler.now()) : each); - }); - } - function timeoutErrorFactory(info) { - throw new TimeoutError(info); - } - - function map(project, thisArg) { - return operate(function (source, subscriber) { - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - subscriber.next(project.call(thisArg, value, index++)); - })); - }); - } - - var isArray = Array.isArray; - function callOrApply(fn, args) { - return isArray(args) ? fn.apply(void 0, __spreadArray([], __read(args))) : fn(args); - } - function mapOneOrManyArgs(fn) { - return map(function (args) { return callOrApply(fn, args); }); - } - - function bindCallbackInternals(isNodeStyle, callbackFunc, resultSelector, scheduler) { - if (resultSelector) { - if (isScheduler(resultSelector)) { - scheduler = resultSelector; - } - else { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return bindCallbackInternals(isNodeStyle, callbackFunc, scheduler) - .apply(this, args) - .pipe(mapOneOrManyArgs(resultSelector)); - }; - } - } - if (scheduler) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return bindCallbackInternals(isNodeStyle, callbackFunc) - .apply(this, args) - .pipe(subscribeOn(scheduler), observeOn(scheduler)); - }; - } - return function () { - var _this = this; - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var subject = new AsyncSubject(); - var uninitialized = true; - return new Observable(function (subscriber) { - var subs = subject.subscribe(subscriber); - if (uninitialized) { - uninitialized = false; - var isAsync_1 = false; - var isComplete_1 = false; - callbackFunc.apply(_this, __spreadArray(__spreadArray([], __read(args)), [ - function () { - var results = []; - for (var _i = 0; _i < arguments.length; _i++) { - results[_i] = arguments[_i]; - } - if (isNodeStyle) { - var err = results.shift(); - if (err != null) { - subject.error(err); - return; - } - } - subject.next(1 < results.length ? results : results[0]); - isComplete_1 = true; - if (isAsync_1) { - subject.complete(); - } - }, - ])); - if (isComplete_1) { - subject.complete(); - } - isAsync_1 = true; - } - return subs; - }); - }; - } - - function bindCallback(callbackFunc, resultSelector, scheduler) { - return bindCallbackInternals(false, callbackFunc, resultSelector, scheduler); - } - - function bindNodeCallback(callbackFunc, resultSelector, scheduler) { - return bindCallbackInternals(true, callbackFunc, resultSelector, scheduler); - } - - var isArray$1 = Array.isArray; - var getPrototypeOf = Object.getPrototypeOf, objectProto = Object.prototype, getKeys = Object.keys; - function argsArgArrayOrObject(args) { - if (args.length === 1) { - var first_1 = args[0]; - if (isArray$1(first_1)) { - return { args: first_1, keys: null }; - } - if (isPOJO(first_1)) { - var keys = getKeys(first_1); - return { - args: keys.map(function (key) { return first_1[key]; }), - keys: keys, - }; - } - } - return { args: args, keys: null }; - } - function isPOJO(obj) { - return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto; - } - - function createObject(keys, values) { - return keys.reduce(function (result, key, i) { return ((result[key] = values[i]), result); }, {}); - } - - function combineLatest() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = popScheduler(args); - var resultSelector = popResultSelector(args); - var _a = argsArgArrayOrObject(args), observables = _a.args, keys = _a.keys; - if (observables.length === 0) { - return from([], scheduler); - } - var result = new Observable(combineLatestInit(observables, scheduler, keys - ? - function (values) { return createObject(keys, values); } - : - identity)); - return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result; - } - function combineLatestInit(observables, scheduler, valueTransform) { - if (valueTransform === void 0) { valueTransform = identity; } - return function (subscriber) { - maybeSchedule(scheduler, function () { - var length = observables.length; - var values = new Array(length); - var active = length; - var remainingFirstValues = length; - var _loop_1 = function (i) { - maybeSchedule(scheduler, function () { - var source = from(observables[i], scheduler); - var hasFirstValue = false; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - values[i] = value; - if (!hasFirstValue) { - hasFirstValue = true; - remainingFirstValues--; - } - if (!remainingFirstValues) { - subscriber.next(valueTransform(values.slice())); - } - }, function () { - if (!--active) { - subscriber.complete(); - } - })); - }, subscriber); - }; - for (var i = 0; i < length; i++) { - _loop_1(i); - } - }, subscriber); - }; - } - function maybeSchedule(scheduler, execute, subscription) { - if (scheduler) { - executeSchedule(subscription, scheduler, execute); - } - else { - execute(); - } - } - - function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) { - var buffer = []; - var active = 0; - var index = 0; - var isComplete = false; - var checkComplete = function () { - if (isComplete && !buffer.length && !active) { - subscriber.complete(); - } - }; - var outerNext = function (value) { return (active < concurrent ? doInnerSub(value) : buffer.push(value)); }; - var doInnerSub = function (value) { - expand && subscriber.next(value); - active++; - var innerComplete = false; - innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, function (innerValue) { - onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue); - if (expand) { - outerNext(innerValue); - } - else { - subscriber.next(innerValue); - } - }, function () { - innerComplete = true; - }, undefined, function () { - if (innerComplete) { - try { - active--; - var _loop_1 = function () { - var bufferedValue = buffer.shift(); - if (innerSubScheduler) { - executeSchedule(subscriber, innerSubScheduler, function () { return doInnerSub(bufferedValue); }); - } - else { - doInnerSub(bufferedValue); - } - }; - while (buffer.length && active < concurrent) { - _loop_1(); - } - checkComplete(); - } - catch (err) { - subscriber.error(err); - } - } - })); - }; - source.subscribe(createOperatorSubscriber(subscriber, outerNext, function () { - isComplete = true; - checkComplete(); - })); - return function () { - additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer(); - }; - } - - function mergeMap(project, resultSelector, concurrent) { - if (concurrent === void 0) { concurrent = Infinity; } - if (isFunction(resultSelector)) { - return mergeMap(function (a, i) { return map(function (b, ii) { return resultSelector(a, b, i, ii); })(innerFrom(project(a, i))); }, concurrent); - } - else if (typeof resultSelector === 'number') { - concurrent = resultSelector; - } - return operate(function (source, subscriber) { return mergeInternals(source, subscriber, project, concurrent); }); - } - - function mergeAll(concurrent) { - if (concurrent === void 0) { concurrent = Infinity; } - return mergeMap(identity, concurrent); - } - - function concatAll() { - return mergeAll(1); - } - - function concat() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return concatAll()(from(args, popScheduler(args))); - } - - function defer(observableFactory) { - return new Observable(function (subscriber) { - innerFrom(observableFactory()).subscribe(subscriber); - }); - } - - var DEFAULT_CONFIG = { - connector: function () { return new Subject(); }, - resetOnDisconnect: true, - }; - function connectable(source, config) { - if (config === void 0) { config = DEFAULT_CONFIG; } - var connection = null; - var connector = config.connector, _a = config.resetOnDisconnect, resetOnDisconnect = _a === void 0 ? true : _a; - var subject = connector(); - var result = new Observable(function (subscriber) { - return subject.subscribe(subscriber); - }); - result.connect = function () { - if (!connection || connection.closed) { - connection = defer(function () { return source; }).subscribe(subject); - if (resetOnDisconnect) { - connection.add(function () { return (subject = connector()); }); - } - } - return connection; - }; - return result; - } - - function forkJoin() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var resultSelector = popResultSelector(args); - var _a = argsArgArrayOrObject(args), sources = _a.args, keys = _a.keys; - var result = new Observable(function (subscriber) { - var length = sources.length; - if (!length) { - subscriber.complete(); - return; - } - var values = new Array(length); - var remainingCompletions = length; - var remainingEmissions = length; - var _loop_1 = function (sourceIndex) { - var hasValue = false; - innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, function (value) { - if (!hasValue) { - hasValue = true; - remainingEmissions--; - } - values[sourceIndex] = value; - }, function () { return remainingCompletions--; }, undefined, function () { - if (!remainingCompletions || !hasValue) { - if (!remainingEmissions) { - subscriber.next(keys ? createObject(keys, values) : values); - } - subscriber.complete(); - } - })); - }; - for (var sourceIndex = 0; sourceIndex < length; sourceIndex++) { - _loop_1(sourceIndex); - } - }); - return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result; - } - - var nodeEventEmitterMethods = ['addListener', 'removeListener']; - var eventTargetMethods = ['addEventListener', 'removeEventListener']; - var jqueryMethods = ['on', 'off']; - function fromEvent(target, eventName, options, resultSelector) { - if (isFunction(options)) { - resultSelector = options; - options = undefined; - } - if (resultSelector) { - return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector)); - } - var _a = __read(isEventTarget(target) - ? eventTargetMethods.map(function (methodName) { return function (handler) { return target[methodName](eventName, handler, options); }; }) - : - isNodeStyleEventEmitter(target) - ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) - : isJQueryStyleEventEmitter(target) - ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) - : [], 2), add = _a[0], remove = _a[1]; - if (!add) { - if (isArrayLike(target)) { - return mergeMap(function (subTarget) { return fromEvent(subTarget, eventName, options); })(innerFrom(target)); - } - } - if (!add) { - throw new TypeError('Invalid event target'); - } - return new Observable(function (subscriber) { - var handler = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return subscriber.next(1 < args.length ? args : args[0]); - }; - add(handler); - return function () { return remove(handler); }; - }); - } - function toCommonHandlerRegistry(target, eventName) { - return function (methodName) { return function (handler) { return target[methodName](eventName, handler); }; }; - } - function isNodeStyleEventEmitter(target) { - return isFunction(target.addListener) && isFunction(target.removeListener); - } - function isJQueryStyleEventEmitter(target) { - return isFunction(target.on) && isFunction(target.off); - } - function isEventTarget(target) { - return isFunction(target.addEventListener) && isFunction(target.removeEventListener); - } - - function fromEventPattern(addHandler, removeHandler, resultSelector) { - if (resultSelector) { - return fromEventPattern(addHandler, removeHandler).pipe(mapOneOrManyArgs(resultSelector)); - } - return new Observable(function (subscriber) { - var handler = function () { - var e = []; - for (var _i = 0; _i < arguments.length; _i++) { - e[_i] = arguments[_i]; - } - return subscriber.next(e.length === 1 ? e[0] : e); - }; - var retValue = addHandler(handler); - return isFunction(removeHandler) ? function () { return removeHandler(handler, retValue); } : undefined; - }); - } - - function generate(initialStateOrOptions, condition, iterate, resultSelectorOrScheduler, scheduler) { - var _a, _b; - var resultSelector; - var initialState; - if (arguments.length === 1) { - (_a = initialStateOrOptions, initialState = _a.initialState, condition = _a.condition, iterate = _a.iterate, _b = _a.resultSelector, resultSelector = _b === void 0 ? identity : _b, scheduler = _a.scheduler); - } - else { - initialState = initialStateOrOptions; - if (!resultSelectorOrScheduler || isScheduler(resultSelectorOrScheduler)) { - resultSelector = identity; - scheduler = resultSelectorOrScheduler; - } - else { - resultSelector = resultSelectorOrScheduler; - } - } - function gen() { - var state; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - state = initialState; - _a.label = 1; - case 1: - if (!(!condition || condition(state))) return [3, 4]; - return [4, resultSelector(state)]; - case 2: - _a.sent(); - _a.label = 3; - case 3: - state = iterate(state); - return [3, 1]; - case 4: return [2]; - } - }); - } - return defer((scheduler - ? - function () { return scheduleIterable(gen(), scheduler); } - : - gen)); - } - - function iif(condition, trueResult, falseResult) { - return defer(function () { return (condition() ? trueResult : falseResult); }); - } - - function timer(dueTime, intervalOrScheduler, scheduler) { - if (dueTime === void 0) { dueTime = 0; } - if (scheduler === void 0) { scheduler = async; } - var intervalDuration = -1; - if (intervalOrScheduler != null) { - if (isScheduler(intervalOrScheduler)) { - scheduler = intervalOrScheduler; - } - else { - intervalDuration = intervalOrScheduler; - } - } - return new Observable(function (subscriber) { - var due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime; - if (due < 0) { - due = 0; - } - var n = 0; - return scheduler.schedule(function () { - if (!subscriber.closed) { - subscriber.next(n++); - if (0 <= intervalDuration) { - this.schedule(undefined, intervalDuration); - } - else { - subscriber.complete(); - } - } - }, due); - }); - } - - function interval(period, scheduler) { - if (period === void 0) { period = 0; } - if (scheduler === void 0) { scheduler = asyncScheduler; } - if (period < 0) { - period = 0; - } - return timer(period, period, scheduler); - } - - function merge() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = popScheduler(args); - var concurrent = popNumber(args, Infinity); - var sources = args; - return !sources.length - ? - EMPTY - : sources.length === 1 - ? - innerFrom(sources[0]) - : - mergeAll(concurrent)(from(sources, scheduler)); - } - - var NEVER = new Observable(noop); - function never() { - return NEVER; - } - - var isArray$2 = Array.isArray; - function argsOrArgArray(args) { - return args.length === 1 && isArray$2(args[0]) ? args[0] : args; - } - - function onErrorResumeNext() { - var sources = []; - for (var _i = 0; _i < arguments.length; _i++) { - sources[_i] = arguments[_i]; - } - var nextSources = argsOrArgArray(sources); - return new Observable(function (subscriber) { - var sourceIndex = 0; - var subscribeNext = function () { - if (sourceIndex < nextSources.length) { - var nextSource = void 0; - try { - nextSource = innerFrom(nextSources[sourceIndex++]); - } - catch (err) { - subscribeNext(); - return; - } - var innerSubscriber = new OperatorSubscriber(subscriber, undefined, noop, noop); - nextSource.subscribe(innerSubscriber); - innerSubscriber.add(subscribeNext); - } - else { - subscriber.complete(); - } - }; - subscribeNext(); - }); - } - - function pairs(obj, scheduler) { - return from(Object.entries(obj), scheduler); - } - - function not(pred, thisArg) { - return function (value, index) { return !pred.call(thisArg, value, index); }; - } - - function filter(predicate, thisArg) { - return operate(function (source, subscriber) { - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { return predicate.call(thisArg, value, index++) && subscriber.next(value); })); - }); - } - - function partition(source, predicate, thisArg) { - return [filter(predicate, thisArg)(innerFrom(source)), filter(not(predicate, thisArg))(innerFrom(source))]; - } - - function race() { - var sources = []; - for (var _i = 0; _i < arguments.length; _i++) { - sources[_i] = arguments[_i]; - } - sources = argsOrArgArray(sources); - return sources.length === 1 ? innerFrom(sources[0]) : new Observable(raceInit(sources)); - } - function raceInit(sources) { - return function (subscriber) { - var subscriptions = []; - var _loop_1 = function (i) { - subscriptions.push(innerFrom(sources[i]).subscribe(createOperatorSubscriber(subscriber, function (value) { - if (subscriptions) { - for (var s = 0; s < subscriptions.length; s++) { - s !== i && subscriptions[s].unsubscribe(); - } - subscriptions = null; - } - subscriber.next(value); - }))); - }; - for (var i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) { - _loop_1(i); - } - }; - } - - function range(start, count, scheduler) { - if (count == null) { - count = start; - start = 0; - } - if (count <= 0) { - return EMPTY; - } - var end = count + start; - return new Observable(scheduler - ? - function (subscriber) { - var n = start; - return scheduler.schedule(function () { - if (n < end) { - subscriber.next(n++); - this.schedule(); - } - else { - subscriber.complete(); - } - }); - } - : - function (subscriber) { - var n = start; - while (n < end && !subscriber.closed) { - subscriber.next(n++); - } - subscriber.complete(); - }); - } - - function using(resourceFactory, observableFactory) { - return new Observable(function (subscriber) { - var resource = resourceFactory(); - var result = observableFactory(resource); - var source = result ? innerFrom(result) : EMPTY; - source.subscribe(subscriber); - return function () { - if (resource) { - resource.unsubscribe(); - } - }; - }); - } - - function zip() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var resultSelector = popResultSelector(args); - var sources = argsOrArgArray(args); - return sources.length - ? new Observable(function (subscriber) { - var buffers = sources.map(function () { return []; }); - var completed = sources.map(function () { return false; }); - subscriber.add(function () { - buffers = completed = null; - }); - var _loop_1 = function (sourceIndex) { - innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, function (value) { - buffers[sourceIndex].push(value); - if (buffers.every(function (buffer) { return buffer.length; })) { - var result = buffers.map(function (buffer) { return buffer.shift(); }); - subscriber.next(resultSelector ? resultSelector.apply(void 0, __spreadArray([], __read(result))) : result); - if (buffers.some(function (buffer, i) { return !buffer.length && completed[i]; })) { - subscriber.complete(); - } - } - }, function () { - completed[sourceIndex] = true; - !buffers[sourceIndex].length && subscriber.complete(); - })); - }; - for (var sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) { - _loop_1(sourceIndex); - } - return function () { - buffers = completed = null; - }; - }) - : EMPTY; - } - - function audit(durationSelector) { - return operate(function (source, subscriber) { - var hasValue = false; - var lastValue = null; - var durationSubscriber = null; - var isComplete = false; - var endDuration = function () { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); - durationSubscriber = null; - if (hasValue) { - hasValue = false; - var value = lastValue; - lastValue = null; - subscriber.next(value); - } - isComplete && subscriber.complete(); - }; - var cleanupDuration = function () { - durationSubscriber = null; - isComplete && subscriber.complete(); - }; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - hasValue = true; - lastValue = value; - if (!durationSubscriber) { - innerFrom(durationSelector(value)).subscribe((durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration))); - } - }, function () { - isComplete = true; - (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete(); - })); - }); - } - - function auditTime(duration, scheduler) { - if (scheduler === void 0) { scheduler = asyncScheduler; } - return audit(function () { return timer(duration, scheduler); }); - } - - function buffer(closingNotifier) { - return operate(function (source, subscriber) { - var currentBuffer = []; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { return currentBuffer.push(value); }, function () { - subscriber.next(currentBuffer); - subscriber.complete(); - })); - innerFrom(closingNotifier).subscribe(createOperatorSubscriber(subscriber, function () { - var b = currentBuffer; - currentBuffer = []; - subscriber.next(b); - }, noop)); - return function () { - currentBuffer = null; - }; - }); - } - - function bufferCount(bufferSize, startBufferEvery) { - if (startBufferEvery === void 0) { startBufferEvery = null; } - startBufferEvery = startBufferEvery !== null && startBufferEvery !== void 0 ? startBufferEvery : bufferSize; - return operate(function (source, subscriber) { - var buffers = []; - var count = 0; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var e_1, _a, e_2, _b; - var toEmit = null; - if (count++ % startBufferEvery === 0) { - buffers.push([]); - } - try { - for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { - var buffer = buffers_1_1.value; - buffer.push(value); - if (bufferSize <= buffer.length) { - toEmit = toEmit !== null && toEmit !== void 0 ? toEmit : []; - toEmit.push(buffer); - } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1); - } - finally { if (e_1) throw e_1.error; } - } - if (toEmit) { - try { - for (var toEmit_1 = __values(toEmit), toEmit_1_1 = toEmit_1.next(); !toEmit_1_1.done; toEmit_1_1 = toEmit_1.next()) { - var buffer = toEmit_1_1.value; - arrRemove(buffers, buffer); - subscriber.next(buffer); - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (toEmit_1_1 && !toEmit_1_1.done && (_b = toEmit_1.return)) _b.call(toEmit_1); - } - finally { if (e_2) throw e_2.error; } - } - } - }, function () { - var e_3, _a; - try { - for (var buffers_2 = __values(buffers), buffers_2_1 = buffers_2.next(); !buffers_2_1.done; buffers_2_1 = buffers_2.next()) { - var buffer = buffers_2_1.value; - subscriber.next(buffer); - } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (buffers_2_1 && !buffers_2_1.done && (_a = buffers_2.return)) _a.call(buffers_2); - } - finally { if (e_3) throw e_3.error; } - } - subscriber.complete(); - }, undefined, function () { - buffers = null; - })); - }); - } - - function bufferTime(bufferTimeSpan) { - var _a, _b; - var otherArgs = []; - for (var _i = 1; _i < arguments.length; _i++) { - otherArgs[_i - 1] = arguments[_i]; - } - var scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler; - var bufferCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; - var maxBufferSize = otherArgs[1] || Infinity; - return operate(function (source, subscriber) { - var bufferRecords = []; - var restartOnEmit = false; - var emit = function (record) { - var buffer = record.buffer, subs = record.subs; - subs.unsubscribe(); - arrRemove(bufferRecords, record); - subscriber.next(buffer); - restartOnEmit && startBuffer(); - }; - var startBuffer = function () { - if (bufferRecords) { - var subs = new Subscription(); - subscriber.add(subs); - var buffer = []; - var record_1 = { - buffer: buffer, - subs: subs, - }; - bufferRecords.push(record_1); - executeSchedule(subs, scheduler, function () { return emit(record_1); }, bufferTimeSpan); - } - }; - if (bufferCreationInterval !== null && bufferCreationInterval >= 0) { - executeSchedule(subscriber, scheduler, startBuffer, bufferCreationInterval, true); - } - else { - restartOnEmit = true; - } - startBuffer(); - var bufferTimeSubscriber = createOperatorSubscriber(subscriber, function (value) { - var e_1, _a; - var recordsCopy = bufferRecords.slice(); - try { - for (var recordsCopy_1 = __values(recordsCopy), recordsCopy_1_1 = recordsCopy_1.next(); !recordsCopy_1_1.done; recordsCopy_1_1 = recordsCopy_1.next()) { - var record = recordsCopy_1_1.value; - var buffer = record.buffer; - buffer.push(value); - maxBufferSize <= buffer.length && emit(record); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (recordsCopy_1_1 && !recordsCopy_1_1.done && (_a = recordsCopy_1.return)) _a.call(recordsCopy_1); - } - finally { if (e_1) throw e_1.error; } - } - }, function () { - while (bufferRecords === null || bufferRecords === void 0 ? void 0 : bufferRecords.length) { - subscriber.next(bufferRecords.shift().buffer); - } - bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 ? void 0 : bufferTimeSubscriber.unsubscribe(); - subscriber.complete(); - subscriber.unsubscribe(); - }, undefined, function () { return (bufferRecords = null); }); - source.subscribe(bufferTimeSubscriber); - }); - } - - function bufferToggle(openings, closingSelector) { - return operate(function (source, subscriber) { - var buffers = []; - innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, function (openValue) { - var buffer = []; - buffers.push(buffer); - var closingSubscription = new Subscription(); - var emitBuffer = function () { - arrRemove(buffers, buffer); - subscriber.next(buffer); - closingSubscription.unsubscribe(); - }; - closingSubscription.add(innerFrom(closingSelector(openValue)).subscribe(createOperatorSubscriber(subscriber, emitBuffer, noop))); - }, noop)); - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var e_1, _a; - try { - for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { - var buffer = buffers_1_1.value; - buffer.push(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1); - } - finally { if (e_1) throw e_1.error; } - } - }, function () { - while (buffers.length > 0) { - subscriber.next(buffers.shift()); - } - subscriber.complete(); - })); - }); - } - - function bufferWhen(closingSelector) { - return operate(function (source, subscriber) { - var buffer = null; - var closingSubscriber = null; - var openBuffer = function () { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); - var b = buffer; - buffer = []; - b && subscriber.next(b); - innerFrom(closingSelector()).subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openBuffer, noop))); - }; - openBuffer(); - source.subscribe(createOperatorSubscriber(subscriber, function (value) { return buffer === null || buffer === void 0 ? void 0 : buffer.push(value); }, function () { - buffer && subscriber.next(buffer); - subscriber.complete(); - }, undefined, function () { return (buffer = closingSubscriber = null); })); - }); - } - - function catchError(selector) { - return operate(function (source, subscriber) { - var innerSub = null; - var syncUnsub = false; - var handledResult; - innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, function (err) { - handledResult = innerFrom(selector(err, catchError(selector)(source))); - if (innerSub) { - innerSub.unsubscribe(); - innerSub = null; - handledResult.subscribe(subscriber); - } - else { - syncUnsub = true; - } - })); - if (syncUnsub) { - innerSub.unsubscribe(); - innerSub = null; - handledResult.subscribe(subscriber); - } - }); - } - - function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) { - return function (source, subscriber) { - var hasState = hasSeed; - var state = seed; - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var i = index++; - state = hasState - ? - accumulator(state, value, i) - : - ((hasState = true), value); - emitOnNext && subscriber.next(state); - }, emitBeforeComplete && - (function () { - hasState && subscriber.next(state); - subscriber.complete(); - }))); - }; - } - - function reduce(accumulator, seed) { - return operate(scanInternals(accumulator, seed, arguments.length >= 2, false, true)); - } - - var arrReducer = function (arr, value) { return (arr.push(value), arr); }; - function toArray() { - return operate(function (source, subscriber) { - reduce(arrReducer, [])(source).subscribe(subscriber); - }); - } - - function joinAllInternals(joinFn, project) { - return pipe(toArray(), mergeMap(function (sources) { return joinFn(sources); }), project ? mapOneOrManyArgs(project) : identity); - } - - function combineLatestAll(project) { - return joinAllInternals(combineLatest, project); - } - - var combineAll = combineLatestAll; - - function combineLatest$1() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var resultSelector = popResultSelector(args); - return resultSelector - ? pipe(combineLatest$1.apply(void 0, __spreadArray([], __read(args))), mapOneOrManyArgs(resultSelector)) - : operate(function (source, subscriber) { - combineLatestInit(__spreadArray([source], __read(argsOrArgArray(args))))(subscriber); - }); - } - - function combineLatestWith() { - var otherSources = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherSources[_i] = arguments[_i]; - } - return combineLatest$1.apply(void 0, __spreadArray([], __read(otherSources))); - } - - function concatMap(project, resultSelector) { - return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1); - } - - function concatMapTo(innerObservable, resultSelector) { - return isFunction(resultSelector) ? concatMap(function () { return innerObservable; }, resultSelector) : concatMap(function () { return innerObservable; }); - } - - function concat$1() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = popScheduler(args); - return operate(function (source, subscriber) { - concatAll()(from(__spreadArray([source], __read(args)), scheduler)).subscribe(subscriber); - }); - } - - function concatWith() { - var otherSources = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherSources[_i] = arguments[_i]; - } - return concat$1.apply(void 0, __spreadArray([], __read(otherSources))); - } - - function fromSubscribable(subscribable) { - return new Observable(function (subscriber) { return subscribable.subscribe(subscriber); }); - } - - var DEFAULT_CONFIG$1 = { - connector: function () { return new Subject(); }, - }; - function connect(selector, config) { - if (config === void 0) { config = DEFAULT_CONFIG$1; } - var connector = config.connector; - return operate(function (source, subscriber) { - var subject = connector(); - innerFrom(selector(fromSubscribable(subject))).subscribe(subscriber); - subscriber.add(source.subscribe(subject)); - }); - } - - function count(predicate) { - return reduce(function (total, value, i) { return (!predicate || predicate(value, i) ? total + 1 : total); }, 0); - } - - function debounce(durationSelector) { - return operate(function (source, subscriber) { - var hasValue = false; - var lastValue = null; - var durationSubscriber = null; - var emit = function () { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); - durationSubscriber = null; - if (hasValue) { - hasValue = false; - var value = lastValue; - lastValue = null; - subscriber.next(value); - } - }; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); - hasValue = true; - lastValue = value; - durationSubscriber = createOperatorSubscriber(subscriber, emit, noop); - innerFrom(durationSelector(value)).subscribe(durationSubscriber); - }, function () { - emit(); - subscriber.complete(); - }, undefined, function () { - lastValue = durationSubscriber = null; - })); - }); - } - - function debounceTime(dueTime, scheduler) { - if (scheduler === void 0) { scheduler = asyncScheduler; } - return operate(function (source, subscriber) { - var activeTask = null; - var lastValue = null; - var lastTime = null; - var emit = function () { - if (activeTask) { - activeTask.unsubscribe(); - activeTask = null; - var value = lastValue; - lastValue = null; - subscriber.next(value); - } - }; - function emitWhenIdle() { - var targetTime = lastTime + dueTime; - var now = scheduler.now(); - if (now < targetTime) { - activeTask = this.schedule(undefined, targetTime - now); - subscriber.add(activeTask); - return; - } - emit(); - } - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - lastValue = value; - lastTime = scheduler.now(); - if (!activeTask) { - activeTask = scheduler.schedule(emitWhenIdle, dueTime); - subscriber.add(activeTask); - } - }, function () { - emit(); - subscriber.complete(); - }, undefined, function () { - lastValue = activeTask = null; - })); - }); - } - - function defaultIfEmpty(defaultValue) { - return operate(function (source, subscriber) { - var hasValue = false; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - hasValue = true; - subscriber.next(value); - }, function () { - if (!hasValue) { - subscriber.next(defaultValue); - } - subscriber.complete(); - })); - }); - } - - function take(count) { - return count <= 0 - ? - function () { return EMPTY; } - : operate(function (source, subscriber) { - var seen = 0; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - if (++seen <= count) { - subscriber.next(value); - if (count <= seen) { - subscriber.complete(); - } - } - })); - }); - } - - function ignoreElements() { - return operate(function (source, subscriber) { - source.subscribe(createOperatorSubscriber(subscriber, noop)); - }); - } - - function mapTo(value) { - return map(function () { return value; }); - } - - function delayWhen(delayDurationSelector, subscriptionDelay) { - if (subscriptionDelay) { - return function (source) { - return concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector))); - }; - } - return mergeMap(function (value, index) { return innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)); }); - } - - function delay(due, scheduler) { - if (scheduler === void 0) { scheduler = asyncScheduler; } - var duration = timer(due, scheduler); - return delayWhen(function () { return duration; }); - } - - function dematerialize() { - return operate(function (source, subscriber) { - source.subscribe(createOperatorSubscriber(subscriber, function (notification) { return observeNotification(notification, subscriber); })); - }); - } - - function distinct(keySelector, flushes) { - return operate(function (source, subscriber) { - var distinctKeys = new Set(); - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var key = keySelector ? keySelector(value) : value; - if (!distinctKeys.has(key)) { - distinctKeys.add(key); - subscriber.next(value); - } - })); - flushes && innerFrom(flushes).subscribe(createOperatorSubscriber(subscriber, function () { return distinctKeys.clear(); }, noop)); - }); - } - - function distinctUntilChanged(comparator, keySelector) { - if (keySelector === void 0) { keySelector = identity; } - comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare; - return operate(function (source, subscriber) { - var previousKey; - var first = true; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var currentKey = keySelector(value); - if (first || !comparator(previousKey, currentKey)) { - first = false; - previousKey = currentKey; - subscriber.next(value); - } - })); - }); - } - function defaultCompare(a, b) { - return a === b; - } - - function distinctUntilKeyChanged(key, compare) { - return distinctUntilChanged(function (x, y) { return (compare ? compare(x[key], y[key]) : x[key] === y[key]); }); - } - - function throwIfEmpty(errorFactory) { - if (errorFactory === void 0) { errorFactory = defaultErrorFactory; } - return operate(function (source, subscriber) { - var hasValue = false; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - hasValue = true; - subscriber.next(value); - }, function () { return (hasValue ? subscriber.complete() : subscriber.error(errorFactory())); })); - }); - } - function defaultErrorFactory() { - return new EmptyError(); - } - - function elementAt(index, defaultValue) { - if (index < 0) { - throw new ArgumentOutOfRangeError(); - } - var hasDefaultValue = arguments.length >= 2; - return function (source) { - return source.pipe(filter(function (v, i) { return i === index; }), take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new ArgumentOutOfRangeError(); })); - }; - } - - function endWith() { - var values = []; - for (var _i = 0; _i < arguments.length; _i++) { - values[_i] = arguments[_i]; - } - return function (source) { return concat(source, of.apply(void 0, __spreadArray([], __read(values)))); }; - } - - function every(predicate, thisArg) { - return operate(function (source, subscriber) { - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - if (!predicate.call(thisArg, value, index++, source)) { - subscriber.next(false); - subscriber.complete(); - } - }, function () { - subscriber.next(true); - subscriber.complete(); - })); - }); - } - - function exhaustMap(project, resultSelector) { - if (resultSelector) { - return function (source) { - return source.pipe(exhaustMap(function (a, i) { return innerFrom(project(a, i)).pipe(map(function (b, ii) { return resultSelector(a, b, i, ii); })); })); - }; - } - return operate(function (source, subscriber) { - var index = 0; - var innerSub = null; - var isComplete = false; - source.subscribe(createOperatorSubscriber(subscriber, function (outerValue) { - if (!innerSub) { - innerSub = createOperatorSubscriber(subscriber, undefined, function () { - innerSub = null; - isComplete && subscriber.complete(); - }); - innerFrom(project(outerValue, index++)).subscribe(innerSub); - } - }, function () { - isComplete = true; - !innerSub && subscriber.complete(); - })); - }); - } - - function exhaustAll() { - return exhaustMap(identity); - } - - var exhaust = exhaustAll; - - function expand(project, concurrent, scheduler) { - if (concurrent === void 0) { concurrent = Infinity; } - concurrent = (concurrent || 0) < 1 ? Infinity : concurrent; - return operate(function (source, subscriber) { - return mergeInternals(source, subscriber, project, concurrent, undefined, true, scheduler); - }); - } - - function finalize(callback) { - return operate(function (source, subscriber) { - try { - source.subscribe(subscriber); - } - finally { - subscriber.add(callback); - } - }); - } - - function find(predicate, thisArg) { - return operate(createFind(predicate, thisArg, 'value')); - } - function createFind(predicate, thisArg, emit) { - var findIndex = emit === 'index'; - return function (source, subscriber) { - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var i = index++; - if (predicate.call(thisArg, value, i, source)) { - subscriber.next(findIndex ? i : value); - subscriber.complete(); - } - }, function () { - subscriber.next(findIndex ? -1 : undefined); - subscriber.complete(); - })); - }; - } - - function findIndex(predicate, thisArg) { - return operate(createFind(predicate, thisArg, 'index')); - } - - function first(predicate, defaultValue) { - var hasDefaultValue = arguments.length >= 2; - return function (source) { - return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError(); })); - }; - } - - function groupBy(keySelector, elementOrOptions, duration, connector) { - return operate(function (source, subscriber) { - var element; - if (!elementOrOptions || typeof elementOrOptions === 'function') { - element = elementOrOptions; - } - else { - (duration = elementOrOptions.duration, element = elementOrOptions.element, connector = elementOrOptions.connector); - } - var groups = new Map(); - var notify = function (cb) { - groups.forEach(cb); - cb(subscriber); - }; - var handleError = function (err) { return notify(function (consumer) { return consumer.error(err); }); }; - var activeGroups = 0; - var teardownAttempted = false; - var groupBySourceSubscriber = new OperatorSubscriber(subscriber, function (value) { - try { - var key_1 = keySelector(value); - var group_1 = groups.get(key_1); - if (!group_1) { - groups.set(key_1, (group_1 = connector ? connector() : new Subject())); - var grouped = createGroupedObservable(key_1, group_1); - subscriber.next(grouped); - if (duration) { - var durationSubscriber_1 = createOperatorSubscriber(group_1, function () { - group_1.complete(); - durationSubscriber_1 === null || durationSubscriber_1 === void 0 ? void 0 : durationSubscriber_1.unsubscribe(); - }, undefined, undefined, function () { return groups.delete(key_1); }); - groupBySourceSubscriber.add(innerFrom(duration(grouped)).subscribe(durationSubscriber_1)); - } - } - group_1.next(element ? element(value) : value); - } - catch (err) { - handleError(err); - } - }, function () { return notify(function (consumer) { return consumer.complete(); }); }, handleError, function () { return groups.clear(); }, function () { - teardownAttempted = true; - return activeGroups === 0; - }); - source.subscribe(groupBySourceSubscriber); - function createGroupedObservable(key, groupSubject) { - var result = new Observable(function (groupSubscriber) { - activeGroups++; - var innerSub = groupSubject.subscribe(groupSubscriber); - return function () { - innerSub.unsubscribe(); - --activeGroups === 0 && teardownAttempted && groupBySourceSubscriber.unsubscribe(); - }; - }); - result.key = key; - return result; - } - }); - } - - function isEmpty() { - return operate(function (source, subscriber) { - source.subscribe(createOperatorSubscriber(subscriber, function () { - subscriber.next(false); - subscriber.complete(); - }, function () { - subscriber.next(true); - subscriber.complete(); - })); - }); - } - - function takeLast(count) { - return count <= 0 - ? function () { return EMPTY; } - : operate(function (source, subscriber) { - var buffer = []; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - buffer.push(value); - count < buffer.length && buffer.shift(); - }, function () { - var e_1, _a; - try { - for (var buffer_1 = __values(buffer), buffer_1_1 = buffer_1.next(); !buffer_1_1.done; buffer_1_1 = buffer_1.next()) { - var value = buffer_1_1.value; - subscriber.next(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (buffer_1_1 && !buffer_1_1.done && (_a = buffer_1.return)) _a.call(buffer_1); - } - finally { if (e_1) throw e_1.error; } - } - subscriber.complete(); - }, undefined, function () { - buffer = null; - })); - }); - } - - function last$1(predicate, defaultValue) { - var hasDefaultValue = arguments.length >= 2; - return function (source) { - return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity, takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError(); })); - }; - } - - function materialize() { - return operate(function (source, subscriber) { - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - subscriber.next(Notification.createNext(value)); - }, function () { - subscriber.next(Notification.createComplete()); - subscriber.complete(); - }, function (err) { - subscriber.next(Notification.createError(err)); - subscriber.complete(); - })); - }); - } - - function max(comparer) { - return reduce(isFunction(comparer) ? function (x, y) { return (comparer(x, y) > 0 ? x : y); } : function (x, y) { return (x > y ? x : y); }); - } - - var flatMap = mergeMap; - - function mergeMapTo(innerObservable, resultSelector, concurrent) { - if (concurrent === void 0) { concurrent = Infinity; } - if (isFunction(resultSelector)) { - return mergeMap(function () { return innerObservable; }, resultSelector, concurrent); - } - if (typeof resultSelector === 'number') { - concurrent = resultSelector; - } - return mergeMap(function () { return innerObservable; }, concurrent); - } - - function mergeScan(accumulator, seed, concurrent) { - if (concurrent === void 0) { concurrent = Infinity; } - return operate(function (source, subscriber) { - var state = seed; - return mergeInternals(source, subscriber, function (value, index) { return accumulator(state, value, index); }, concurrent, function (value) { - state = value; - }, false, undefined, function () { return (state = null); }); - }); - } - - function merge$1() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = popScheduler(args); - var concurrent = popNumber(args, Infinity); - return operate(function (source, subscriber) { - mergeAll(concurrent)(from(__spreadArray([source], __read(args)), scheduler)).subscribe(subscriber); - }); - } - - function mergeWith() { - var otherSources = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherSources[_i] = arguments[_i]; - } - return merge$1.apply(void 0, __spreadArray([], __read(otherSources))); - } - - function min(comparer) { - return reduce(isFunction(comparer) ? function (x, y) { return (comparer(x, y) < 0 ? x : y); } : function (x, y) { return (x < y ? x : y); }); - } - - function multicast(subjectOrSubjectFactory, selector) { - var subjectFactory = isFunction(subjectOrSubjectFactory) ? subjectOrSubjectFactory : function () { return subjectOrSubjectFactory; }; - if (isFunction(selector)) { - return connect(selector, { - connector: subjectFactory, - }); - } - return function (source) { return new ConnectableObservable(source, subjectFactory); }; - } - - function onErrorResumeNextWith() { - var sources = []; - for (var _i = 0; _i < arguments.length; _i++) { - sources[_i] = arguments[_i]; - } - var nextSources = argsOrArgArray(sources); - return function (source) { return onErrorResumeNext.apply(void 0, __spreadArray([source], __read(nextSources))); }; - } - var onErrorResumeNext$1 = onErrorResumeNextWith; - - function pairwise() { - return operate(function (source, subscriber) { - var prev; - var hasPrev = false; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var p = prev; - prev = value; - hasPrev && subscriber.next([p, value]); - hasPrev = true; - })); - }); - } - - function pluck() { - var properties = []; - for (var _i = 0; _i < arguments.length; _i++) { - properties[_i] = arguments[_i]; - } - var length = properties.length; - if (length === 0) { - throw new Error('list of properties cannot be empty.'); - } - return map(function (x) { - var currentProp = x; - for (var i = 0; i < length; i++) { - var p = currentProp === null || currentProp === void 0 ? void 0 : currentProp[properties[i]]; - if (typeof p !== 'undefined') { - currentProp = p; - } - else { - return undefined; - } - } - return currentProp; - }); - } - - function publish(selector) { - return selector ? function (source) { return connect(selector)(source); } : function (source) { return multicast(new Subject())(source); }; - } - - function publishBehavior(initialValue) { - return function (source) { - var subject = new BehaviorSubject(initialValue); - return new ConnectableObservable(source, function () { return subject; }); - }; - } - - function publishLast() { - return function (source) { - var subject = new AsyncSubject(); - return new ConnectableObservable(source, function () { return subject; }); - }; - } - - function publishReplay(bufferSize, windowTime, selectorOrScheduler, timestampProvider) { - if (selectorOrScheduler && !isFunction(selectorOrScheduler)) { - timestampProvider = selectorOrScheduler; - } - var selector = isFunction(selectorOrScheduler) ? selectorOrScheduler : undefined; - return function (source) { return multicast(new ReplaySubject(bufferSize, windowTime, timestampProvider), selector)(source); }; - } - - function raceWith() { - var otherSources = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherSources[_i] = arguments[_i]; - } - return !otherSources.length - ? identity - : operate(function (source, subscriber) { - raceInit(__spreadArray([source], __read(otherSources)))(subscriber); - }); - } - - function repeat(countOrConfig) { - var _a; - var count = Infinity; - var delay; - if (countOrConfig != null) { - if (typeof countOrConfig === 'object') { - (_a = countOrConfig.count, count = _a === void 0 ? Infinity : _a, delay = countOrConfig.delay); - } - else { - count = countOrConfig; - } - } - return count <= 0 - ? function () { return EMPTY; } - : operate(function (source, subscriber) { - var soFar = 0; - var sourceSub; - var resubscribe = function () { - sourceSub === null || sourceSub === void 0 ? void 0 : sourceSub.unsubscribe(); - sourceSub = null; - if (delay != null) { - var notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(soFar)); - var notifierSubscriber_1 = createOperatorSubscriber(subscriber, function () { - notifierSubscriber_1.unsubscribe(); - subscribeToSource(); - }); - notifier.subscribe(notifierSubscriber_1); - } - else { - subscribeToSource(); - } - }; - var subscribeToSource = function () { - var syncUnsub = false; - sourceSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, function () { - if (++soFar < count) { - if (sourceSub) { - resubscribe(); - } - else { - syncUnsub = true; - } - } - else { - subscriber.complete(); - } - })); - if (syncUnsub) { - resubscribe(); - } - }; - subscribeToSource(); - }); - } - - function repeatWhen(notifier) { - return operate(function (source, subscriber) { - var innerSub; - var syncResub = false; - var completions$; - var isNotifierComplete = false; - var isMainComplete = false; - var checkComplete = function () { return isMainComplete && isNotifierComplete && (subscriber.complete(), true); }; - var getCompletionSubject = function () { - if (!completions$) { - completions$ = new Subject(); - innerFrom(notifier(completions$)).subscribe(createOperatorSubscriber(subscriber, function () { - if (innerSub) { - subscribeForRepeatWhen(); - } - else { - syncResub = true; - } - }, function () { - isNotifierComplete = true; - checkComplete(); - })); - } - return completions$; - }; - var subscribeForRepeatWhen = function () { - isMainComplete = false; - innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, function () { - isMainComplete = true; - !checkComplete() && getCompletionSubject().next(); - })); - if (syncResub) { - innerSub.unsubscribe(); - innerSub = null; - syncResub = false; - subscribeForRepeatWhen(); - } - }; - subscribeForRepeatWhen(); - }); - } - - function retry(configOrCount) { - if (configOrCount === void 0) { configOrCount = Infinity; } - var config; - if (configOrCount && typeof configOrCount === 'object') { - config = configOrCount; - } - else { - config = { - count: configOrCount, - }; - } - var _a = config.count, count = _a === void 0 ? Infinity : _a, delay = config.delay, _b = config.resetOnSuccess, resetOnSuccess = _b === void 0 ? false : _b; - return count <= 0 - ? identity - : operate(function (source, subscriber) { - var soFar = 0; - var innerSub; - var subscribeForRetry = function () { - var syncUnsub = false; - innerSub = source.subscribe(createOperatorSubscriber(subscriber, function (value) { - if (resetOnSuccess) { - soFar = 0; - } - subscriber.next(value); - }, undefined, function (err) { - if (soFar++ < count) { - var resub_1 = function () { - if (innerSub) { - innerSub.unsubscribe(); - innerSub = null; - subscribeForRetry(); - } - else { - syncUnsub = true; - } - }; - if (delay != null) { - var notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(err, soFar)); - var notifierSubscriber_1 = createOperatorSubscriber(subscriber, function () { - notifierSubscriber_1.unsubscribe(); - resub_1(); - }, function () { - subscriber.complete(); - }); - notifier.subscribe(notifierSubscriber_1); - } - else { - resub_1(); - } - } - else { - subscriber.error(err); - } - })); - if (syncUnsub) { - innerSub.unsubscribe(); - innerSub = null; - subscribeForRetry(); - } - }; - subscribeForRetry(); - }); - } - - function retryWhen(notifier) { - return operate(function (source, subscriber) { - var innerSub; - var syncResub = false; - var errors$; - var subscribeForRetryWhen = function () { - innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, function (err) { - if (!errors$) { - errors$ = new Subject(); - innerFrom(notifier(errors$)).subscribe(createOperatorSubscriber(subscriber, function () { - return innerSub ? subscribeForRetryWhen() : (syncResub = true); - })); - } - if (errors$) { - errors$.next(err); - } - })); - if (syncResub) { - innerSub.unsubscribe(); - innerSub = null; - syncResub = false; - subscribeForRetryWhen(); - } - }; - subscribeForRetryWhen(); - }); - } - - function sample(notifier) { - return operate(function (source, subscriber) { - var hasValue = false; - var lastValue = null; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - hasValue = true; - lastValue = value; - })); - innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, function () { - if (hasValue) { - hasValue = false; - var value = lastValue; - lastValue = null; - subscriber.next(value); - } - }, noop)); - }); - } - - function sampleTime(period, scheduler) { - if (scheduler === void 0) { scheduler = asyncScheduler; } - return sample(interval(period, scheduler)); - } - - function scan(accumulator, seed) { - return operate(scanInternals(accumulator, seed, arguments.length >= 2, true)); - } - - function sequenceEqual(compareTo, comparator) { - if (comparator === void 0) { comparator = function (a, b) { return a === b; }; } - return operate(function (source, subscriber) { - var aState = createState(); - var bState = createState(); - var emit = function (isEqual) { - subscriber.next(isEqual); - subscriber.complete(); - }; - var createSubscriber = function (selfState, otherState) { - var sequenceEqualSubscriber = createOperatorSubscriber(subscriber, function (a) { - var buffer = otherState.buffer, complete = otherState.complete; - if (buffer.length === 0) { - complete ? emit(false) : selfState.buffer.push(a); - } - else { - !comparator(a, buffer.shift()) && emit(false); - } - }, function () { - selfState.complete = true; - var complete = otherState.complete, buffer = otherState.buffer; - complete && emit(buffer.length === 0); - sequenceEqualSubscriber === null || sequenceEqualSubscriber === void 0 ? void 0 : sequenceEqualSubscriber.unsubscribe(); - }); - return sequenceEqualSubscriber; - }; - source.subscribe(createSubscriber(aState, bState)); - innerFrom(compareTo).subscribe(createSubscriber(bState, aState)); - }); - } - function createState() { - return { - buffer: [], - complete: false, - }; - } - - function share(options) { - if (options === void 0) { options = {}; } - var _a = options.connector, connector = _a === void 0 ? function () { return new Subject(); } : _a, _b = options.resetOnError, resetOnError = _b === void 0 ? true : _b, _c = options.resetOnComplete, resetOnComplete = _c === void 0 ? true : _c, _d = options.resetOnRefCountZero, resetOnRefCountZero = _d === void 0 ? true : _d; - return function (wrapperSource) { - var connection; - var resetConnection; - var subject; - var refCount = 0; - var hasCompleted = false; - var hasErrored = false; - var cancelReset = function () { - resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe(); - resetConnection = undefined; - }; - var reset = function () { - cancelReset(); - connection = subject = undefined; - hasCompleted = hasErrored = false; - }; - var resetAndUnsubscribe = function () { - var conn = connection; - reset(); - conn === null || conn === void 0 ? void 0 : conn.unsubscribe(); - }; - return operate(function (source, subscriber) { - refCount++; - if (!hasErrored && !hasCompleted) { - cancelReset(); - } - var dest = (subject = subject !== null && subject !== void 0 ? subject : connector()); - subscriber.add(function () { - refCount--; - if (refCount === 0 && !hasErrored && !hasCompleted) { - resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero); - } - }); - dest.subscribe(subscriber); - if (!connection && - refCount > 0) { - connection = new SafeSubscriber({ - next: function (value) { return dest.next(value); }, - error: function (err) { - hasErrored = true; - cancelReset(); - resetConnection = handleReset(reset, resetOnError, err); - dest.error(err); - }, - complete: function () { - hasCompleted = true; - cancelReset(); - resetConnection = handleReset(reset, resetOnComplete); - dest.complete(); - }, - }); - innerFrom(source).subscribe(connection); - } - })(wrapperSource); - }; - } - function handleReset(reset, on) { - var args = []; - for (var _i = 2; _i < arguments.length; _i++) { - args[_i - 2] = arguments[_i]; - } - if (on === true) { - reset(); - return; - } - if (on === false) { - return; - } - var onSubscriber = new SafeSubscriber({ - next: function () { - onSubscriber.unsubscribe(); - reset(); - }, - }); - return innerFrom(on.apply(void 0, __spreadArray([], __read(args)))).subscribe(onSubscriber); - } - - function shareReplay(configOrBufferSize, windowTime, scheduler) { - var _a, _b, _c; - var bufferSize; - var refCount = false; - if (configOrBufferSize && typeof configOrBufferSize === 'object') { - (_a = configOrBufferSize.bufferSize, bufferSize = _a === void 0 ? Infinity : _a, _b = configOrBufferSize.windowTime, windowTime = _b === void 0 ? Infinity : _b, _c = configOrBufferSize.refCount, refCount = _c === void 0 ? false : _c, scheduler = configOrBufferSize.scheduler); - } - else { - bufferSize = (configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity); - } - return share({ - connector: function () { return new ReplaySubject(bufferSize, windowTime, scheduler); }, - resetOnError: true, - resetOnComplete: false, - resetOnRefCountZero: refCount, - }); - } - - function single(predicate) { - return operate(function (source, subscriber) { - var hasValue = false; - var singleValue; - var seenValue = false; - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - seenValue = true; - if (!predicate || predicate(value, index++, source)) { - hasValue && subscriber.error(new SequenceError('Too many matching values')); - hasValue = true; - singleValue = value; - } - }, function () { - if (hasValue) { - subscriber.next(singleValue); - subscriber.complete(); - } - else { - subscriber.error(seenValue ? new NotFoundError('No matching values') : new EmptyError()); - } - })); - }); - } - - function skip(count) { - return filter(function (_, index) { return count <= index; }); - } - - function skipLast(skipCount) { - return skipCount <= 0 - ? - identity - : operate(function (source, subscriber) { - var ring = new Array(skipCount); - var seen = 0; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var valueIndex = seen++; - if (valueIndex < skipCount) { - ring[valueIndex] = value; - } - else { - var index = valueIndex % skipCount; - var oldValue = ring[index]; - ring[index] = value; - subscriber.next(oldValue); - } - })); - return function () { - ring = null; - }; - }); - } - - function skipUntil(notifier) { - return operate(function (source, subscriber) { - var taking = false; - var skipSubscriber = createOperatorSubscriber(subscriber, function () { - skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe(); - taking = true; - }, noop); - innerFrom(notifier).subscribe(skipSubscriber); - source.subscribe(createOperatorSubscriber(subscriber, function (value) { return taking && subscriber.next(value); })); - }); - } - - function skipWhile(predicate) { - return operate(function (source, subscriber) { - var taking = false; - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { return (taking || (taking = !predicate(value, index++))) && subscriber.next(value); })); - }); - } - - function startWith() { - var values = []; - for (var _i = 0; _i < arguments.length; _i++) { - values[_i] = arguments[_i]; - } - var scheduler = popScheduler(values); - return operate(function (source, subscriber) { - (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber); - }); - } - - function switchMap(project, resultSelector) { - return operate(function (source, subscriber) { - var innerSubscriber = null; - var index = 0; - var isComplete = false; - var checkComplete = function () { return isComplete && !innerSubscriber && subscriber.complete(); }; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe(); - var innerIndex = 0; - var outerIndex = index++; - innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = createOperatorSubscriber(subscriber, function (innerValue) { return subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue); }, function () { - innerSubscriber = null; - checkComplete(); - }))); - }, function () { - isComplete = true; - checkComplete(); - })); - }); - } - - function switchAll() { - return switchMap(identity); - } - - function switchMapTo(innerObservable, resultSelector) { - return isFunction(resultSelector) ? switchMap(function () { return innerObservable; }, resultSelector) : switchMap(function () { return innerObservable; }); - } - - function switchScan(accumulator, seed) { - return operate(function (source, subscriber) { - var state = seed; - switchMap(function (value, index) { return accumulator(state, value, index); }, function (_, innerValue) { return ((state = innerValue), innerValue); })(source).subscribe(subscriber); - return function () { - state = null; - }; - }); - } - - function takeUntil(notifier) { - return operate(function (source, subscriber) { - innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, function () { return subscriber.complete(); }, noop)); - !subscriber.closed && source.subscribe(subscriber); - }); - } - - function takeWhile(predicate, inclusive) { - if (inclusive === void 0) { inclusive = false; } - return operate(function (source, subscriber) { - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var result = predicate(value, index++); - (result || inclusive) && subscriber.next(value); - !result && subscriber.complete(); - })); - }); - } - - function tap(observerOrNext, error, complete) { - var tapObserver = isFunction(observerOrNext) || error || complete - ? - { next: observerOrNext, error: error, complete: complete } - : observerOrNext; - return tapObserver - ? operate(function (source, subscriber) { - var _a; - (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - var isUnsub = true; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var _a; - (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value); - subscriber.next(value); - }, function () { - var _a; - isUnsub = false; - (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - subscriber.complete(); - }, function (err) { - var _a; - isUnsub = false; - (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err); - subscriber.error(err); - }, function () { - var _a, _b; - if (isUnsub) { - (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - } - (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver); - })); - }) - : - identity; - } - - function throttle(durationSelector, config) { - return operate(function (source, subscriber) { - var _a = config !== null && config !== void 0 ? config : {}, _b = _a.leading, leading = _b === void 0 ? true : _b, _c = _a.trailing, trailing = _c === void 0 ? false : _c; - var hasValue = false; - var sendValue = null; - var throttled = null; - var isComplete = false; - var endThrottling = function () { - throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe(); - throttled = null; - if (trailing) { - send(); - isComplete && subscriber.complete(); - } - }; - var cleanupThrottling = function () { - throttled = null; - isComplete && subscriber.complete(); - }; - var startThrottle = function (value) { - return (throttled = innerFrom(durationSelector(value)).subscribe(createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling))); - }; - var send = function () { - if (hasValue) { - hasValue = false; - var value = sendValue; - sendValue = null; - subscriber.next(value); - !isComplete && startThrottle(value); - } - }; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - hasValue = true; - sendValue = value; - !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value)); - }, function () { - isComplete = true; - !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete(); - })); - }); - } - - function throttleTime(duration, scheduler, config) { - if (scheduler === void 0) { scheduler = asyncScheduler; } - var duration$ = timer(duration, scheduler); - return throttle(function () { return duration$; }, config); - } - - function timeInterval(scheduler) { - if (scheduler === void 0) { scheduler = asyncScheduler; } - return operate(function (source, subscriber) { - var last = scheduler.now(); - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var now = scheduler.now(); - var interval = now - last; - last = now; - subscriber.next(new TimeInterval(value, interval)); - })); - }); - } - var TimeInterval = (function () { - function TimeInterval(value, interval) { - this.value = value; - this.interval = interval; - } - return TimeInterval; - }()); - - function timeoutWith(due, withObservable, scheduler) { - var first; - var each; - var _with; - scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : async; - if (isValidDate(due)) { - first = due; - } - else if (typeof due === 'number') { - each = due; - } - if (withObservable) { - _with = function () { return withObservable; }; - } - else { - throw new TypeError('No observable provided to switch to'); - } - if (first == null && each == null) { - throw new TypeError('No timeout provided.'); - } - return timeout({ - first: first, - each: each, - scheduler: scheduler, - with: _with, - }); - } - - function timestamp(timestampProvider) { - if (timestampProvider === void 0) { timestampProvider = dateTimestampProvider; } - return map(function (value) { return ({ value: value, timestamp: timestampProvider.now() }); }); - } - - function window(windowBoundaries) { - return operate(function (source, subscriber) { - var windowSubject = new Subject(); - subscriber.next(windowSubject.asObservable()); - var errorHandler = function (err) { - windowSubject.error(err); - subscriber.error(err); - }; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { return windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.next(value); }, function () { - windowSubject.complete(); - subscriber.complete(); - }, errorHandler)); - innerFrom(windowBoundaries).subscribe(createOperatorSubscriber(subscriber, function () { - windowSubject.complete(); - subscriber.next((windowSubject = new Subject())); - }, noop, errorHandler)); - return function () { - windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.unsubscribe(); - windowSubject = null; - }; - }); - } - - function windowCount(windowSize, startWindowEvery) { - if (startWindowEvery === void 0) { startWindowEvery = 0; } - var startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize; - return operate(function (source, subscriber) { - var windows = [new Subject()]; - var count = 0; - subscriber.next(windows[0].asObservable()); - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var e_1, _a; - try { - for (var windows_1 = __values(windows), windows_1_1 = windows_1.next(); !windows_1_1.done; windows_1_1 = windows_1.next()) { - var window_1 = windows_1_1.value; - window_1.next(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (windows_1_1 && !windows_1_1.done && (_a = windows_1.return)) _a.call(windows_1); - } - finally { if (e_1) throw e_1.error; } - } - var c = count - windowSize + 1; - if (c >= 0 && c % startEvery === 0) { - windows.shift().complete(); - } - if (++count % startEvery === 0) { - var window_2 = new Subject(); - windows.push(window_2); - subscriber.next(window_2.asObservable()); - } - }, function () { - while (windows.length > 0) { - windows.shift().complete(); - } - subscriber.complete(); - }, function (err) { - while (windows.length > 0) { - windows.shift().error(err); - } - subscriber.error(err); - }, function () { - windows = null; - })); - }); - } - - function windowTime(windowTimeSpan) { - var _a, _b; - var otherArgs = []; - for (var _i = 1; _i < arguments.length; _i++) { - otherArgs[_i - 1] = arguments[_i]; - } - var scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler; - var windowCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; - var maxWindowSize = otherArgs[1] || Infinity; - return operate(function (source, subscriber) { - var windowRecords = []; - var restartOnClose = false; - var closeWindow = function (record) { - var window = record.window, subs = record.subs; - window.complete(); - subs.unsubscribe(); - arrRemove(windowRecords, record); - restartOnClose && startWindow(); - }; - var startWindow = function () { - if (windowRecords) { - var subs = new Subscription(); - subscriber.add(subs); - var window_1 = new Subject(); - var record_1 = { - window: window_1, - subs: subs, - seen: 0, - }; - windowRecords.push(record_1); - subscriber.next(window_1.asObservable()); - executeSchedule(subs, scheduler, function () { return closeWindow(record_1); }, windowTimeSpan); - } - }; - if (windowCreationInterval !== null && windowCreationInterval >= 0) { - executeSchedule(subscriber, scheduler, startWindow, windowCreationInterval, true); - } - else { - restartOnClose = true; - } - startWindow(); - var loop = function (cb) { return windowRecords.slice().forEach(cb); }; - var terminate = function (cb) { - loop(function (_a) { - var window = _a.window; - return cb(window); - }); - cb(subscriber); - subscriber.unsubscribe(); - }; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - loop(function (record) { - record.window.next(value); - maxWindowSize <= ++record.seen && closeWindow(record); - }); - }, function () { return terminate(function (consumer) { return consumer.complete(); }); }, function (err) { return terminate(function (consumer) { return consumer.error(err); }); })); - return function () { - windowRecords = null; - }; - }); - } - - function windowToggle(openings, closingSelector) { - return operate(function (source, subscriber) { - var windows = []; - var handleError = function (err) { - while (0 < windows.length) { - windows.shift().error(err); - } - subscriber.error(err); - }; - innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, function (openValue) { - var window = new Subject(); - windows.push(window); - var closingSubscription = new Subscription(); - var closeWindow = function () { - arrRemove(windows, window); - window.complete(); - closingSubscription.unsubscribe(); - }; - var closingNotifier; - try { - closingNotifier = innerFrom(closingSelector(openValue)); - } - catch (err) { - handleError(err); - return; - } - subscriber.next(window.asObservable()); - closingSubscription.add(closingNotifier.subscribe(createOperatorSubscriber(subscriber, closeWindow, noop, handleError))); - }, noop)); - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var e_1, _a; - var windowsCopy = windows.slice(); - try { - for (var windowsCopy_1 = __values(windowsCopy), windowsCopy_1_1 = windowsCopy_1.next(); !windowsCopy_1_1.done; windowsCopy_1_1 = windowsCopy_1.next()) { - var window_1 = windowsCopy_1_1.value; - window_1.next(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (windowsCopy_1_1 && !windowsCopy_1_1.done && (_a = windowsCopy_1.return)) _a.call(windowsCopy_1); - } - finally { if (e_1) throw e_1.error; } - } - }, function () { - while (0 < windows.length) { - windows.shift().complete(); - } - subscriber.complete(); - }, handleError, function () { - while (0 < windows.length) { - windows.shift().unsubscribe(); - } - })); - }); - } - - function windowWhen(closingSelector) { - return operate(function (source, subscriber) { - var window; - var closingSubscriber; - var handleError = function (err) { - window.error(err); - subscriber.error(err); - }; - var openWindow = function () { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); - window === null || window === void 0 ? void 0 : window.complete(); - window = new Subject(); - subscriber.next(window.asObservable()); - var closingNotifier; - try { - closingNotifier = innerFrom(closingSelector()); - } - catch (err) { - handleError(err); - return; - } - closingNotifier.subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openWindow, openWindow, handleError))); - }; - openWindow(); - source.subscribe(createOperatorSubscriber(subscriber, function (value) { return window.next(value); }, function () { - window.complete(); - subscriber.complete(); - }, handleError, function () { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); - window = null; - })); - }); - } - - function withLatestFrom() { - var inputs = []; - for (var _i = 0; _i < arguments.length; _i++) { - inputs[_i] = arguments[_i]; - } - var project = popResultSelector(inputs); - return operate(function (source, subscriber) { - var len = inputs.length; - var otherValues = new Array(len); - var hasValue = inputs.map(function () { return false; }); - var ready = false; - var _loop_1 = function (i) { - innerFrom(inputs[i]).subscribe(createOperatorSubscriber(subscriber, function (value) { - otherValues[i] = value; - if (!ready && !hasValue[i]) { - hasValue[i] = true; - (ready = hasValue.every(identity)) && (hasValue = null); - } - }, noop)); - }; - for (var i = 0; i < len; i++) { - _loop_1(i); - } - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - if (ready) { - var values = __spreadArray([value], __read(otherValues)); - subscriber.next(project ? project.apply(void 0, __spreadArray([], __read(values))) : values); - } - })); - }); - } - - function zipAll(project) { - return joinAllInternals(zip, project); - } - - function zip$1() { - var sources = []; - for (var _i = 0; _i < arguments.length; _i++) { - sources[_i] = arguments[_i]; - } - return operate(function (source, subscriber) { - zip.apply(void 0, __spreadArray([source], __read(sources))).subscribe(subscriber); - }); - } - - function zipWith() { - var otherInputs = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherInputs[_i] = arguments[_i]; - } - return zip$1.apply(void 0, __spreadArray([], __read(otherInputs))); - } - - function partition$1(predicate, thisArg) { - return function (source) { - return [filter(predicate, thisArg)(source), filter(not(predicate, thisArg))(source)]; - }; - } - - function race$1() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return raceWith.apply(void 0, __spreadArray([], __read(argsOrArgArray(args)))); - } - - - - var _operators = /*#__PURE__*/Object.freeze({ - audit: audit, - auditTime: auditTime, - buffer: buffer, - bufferCount: bufferCount, - bufferTime: bufferTime, - bufferToggle: bufferToggle, - bufferWhen: bufferWhen, - catchError: catchError, - combineAll: combineAll, - combineLatestAll: combineLatestAll, - combineLatest: combineLatest$1, - combineLatestWith: combineLatestWith, - concat: concat$1, - concatAll: concatAll, - concatMap: concatMap, - concatMapTo: concatMapTo, - concatWith: concatWith, - connect: connect, - count: count, - debounce: debounce, - debounceTime: debounceTime, - defaultIfEmpty: defaultIfEmpty, - delay: delay, - delayWhen: delayWhen, - dematerialize: dematerialize, - distinct: distinct, - distinctUntilChanged: distinctUntilChanged, - distinctUntilKeyChanged: distinctUntilKeyChanged, - elementAt: elementAt, - endWith: endWith, - every: every, - exhaust: exhaust, - exhaustAll: exhaustAll, - exhaustMap: exhaustMap, - expand: expand, - filter: filter, - finalize: finalize, - find: find, - findIndex: findIndex, - first: first, - groupBy: groupBy, - ignoreElements: ignoreElements, - isEmpty: isEmpty, - last: last$1, - map: map, - mapTo: mapTo, - materialize: materialize, - max: max, - merge: merge$1, - mergeAll: mergeAll, - flatMap: flatMap, - mergeMap: mergeMap, - mergeMapTo: mergeMapTo, - mergeScan: mergeScan, - mergeWith: mergeWith, - min: min, - multicast: multicast, - observeOn: observeOn, - onErrorResumeNext: onErrorResumeNext$1, - pairwise: pairwise, - partition: partition$1, - pluck: pluck, - publish: publish, - publishBehavior: publishBehavior, - publishLast: publishLast, - publishReplay: publishReplay, - race: race$1, - raceWith: raceWith, - reduce: reduce, - repeat: repeat, - repeatWhen: repeatWhen, - retry: retry, - retryWhen: retryWhen, - refCount: refCount, - sample: sample, - sampleTime: sampleTime, - scan: scan, - sequenceEqual: sequenceEqual, - share: share, - shareReplay: shareReplay, - single: single, - skip: skip, - skipLast: skipLast, - skipUntil: skipUntil, - skipWhile: skipWhile, - startWith: startWith, - subscribeOn: subscribeOn, - switchAll: switchAll, - switchMap: switchMap, - switchMapTo: switchMapTo, - switchScan: switchScan, - take: take, - takeLast: takeLast, - takeUntil: takeUntil, - takeWhile: takeWhile, - tap: tap, - throttle: throttle, - throttleTime: throttleTime, - throwIfEmpty: throwIfEmpty, - timeInterval: timeInterval, - timeout: timeout, - timeoutWith: timeoutWith, - timestamp: timestamp, - toArray: toArray, - window: window, - windowCount: windowCount, - windowTime: windowTime, - windowToggle: windowToggle, - windowWhen: windowWhen, - withLatestFrom: withLatestFrom, - zip: zip$1, - zipAll: zipAll, - zipWith: zipWith - }); - - var SubscriptionLog = (function () { - function SubscriptionLog(subscribedFrame, unsubscribedFrame) { - if (unsubscribedFrame === void 0) { unsubscribedFrame = Infinity; } - this.subscribedFrame = subscribedFrame; - this.unsubscribedFrame = unsubscribedFrame; - } - return SubscriptionLog; - }()); - - var SubscriptionLoggable = (function () { - function SubscriptionLoggable() { - this.subscriptions = []; - } - SubscriptionLoggable.prototype.logSubscribedFrame = function () { - this.subscriptions.push(new SubscriptionLog(this.scheduler.now())); - return this.subscriptions.length - 1; - }; - SubscriptionLoggable.prototype.logUnsubscribedFrame = function (index) { - var subscriptionLogs = this.subscriptions; - var oldSubscriptionLog = subscriptionLogs[index]; - subscriptionLogs[index] = new SubscriptionLog(oldSubscriptionLog.subscribedFrame, this.scheduler.now()); - }; - return SubscriptionLoggable; - }()); - - function applyMixins(derivedCtor, baseCtors) { - for (var i = 0, len = baseCtors.length; i < len; i++) { - var baseCtor = baseCtors[i]; - var propertyKeys = Object.getOwnPropertyNames(baseCtor.prototype); - for (var j = 0, len2 = propertyKeys.length; j < len2; j++) { - var name_1 = propertyKeys[j]; - derivedCtor.prototype[name_1] = baseCtor.prototype[name_1]; - } - } - } - - var ColdObservable = (function (_super) { - __extends(ColdObservable, _super); - function ColdObservable(messages, scheduler) { - var _this = _super.call(this, function (subscriber) { - var observable = this; - var index = observable.logSubscribedFrame(); - var subscription = new Subscription(); - subscription.add(new Subscription(function () { - observable.logUnsubscribedFrame(index); - })); - observable.scheduleMessages(subscriber); - return subscription; - }) || this; - _this.messages = messages; - _this.subscriptions = []; - _this.scheduler = scheduler; - return _this; - } - ColdObservable.prototype.scheduleMessages = function (subscriber) { - var messagesLength = this.messages.length; - for (var i = 0; i < messagesLength; i++) { - var message = this.messages[i]; - subscriber.add(this.scheduler.schedule(function (state) { - var _a = state, notification = _a.message.notification, destination = _a.subscriber; - observeNotification(notification, destination); - }, message.frame, { message: message, subscriber: subscriber })); - } - }; - return ColdObservable; - }(Observable)); - applyMixins(ColdObservable, [SubscriptionLoggable]); - - var HotObservable = (function (_super) { - __extends(HotObservable, _super); - function HotObservable(messages, scheduler) { - var _this = _super.call(this) || this; - _this.messages = messages; - _this.subscriptions = []; - _this.scheduler = scheduler; - return _this; - } - HotObservable.prototype._subscribe = function (subscriber) { - var subject = this; - var index = subject.logSubscribedFrame(); - var subscription = new Subscription(); - subscription.add(new Subscription(function () { - subject.logUnsubscribedFrame(index); - })); - subscription.add(_super.prototype._subscribe.call(this, subscriber)); - return subscription; - }; - HotObservable.prototype.setup = function () { - var subject = this; - var messagesLength = subject.messages.length; - var _loop_1 = function (i) { - (function () { - var _a = subject.messages[i], notification = _a.notification, frame = _a.frame; - subject.scheduler.schedule(function () { - observeNotification(notification, subject); - }, frame); - })(); - }; - for (var i = 0; i < messagesLength; i++) { - _loop_1(i); - } - }; - return HotObservable; - }(Subject)); - applyMixins(HotObservable, [SubscriptionLoggable]); - - var defaultMaxFrame = 750; - var TestScheduler = (function (_super) { - __extends(TestScheduler, _super); - function TestScheduler(assertDeepEqual) { - var _this = _super.call(this, VirtualAction, defaultMaxFrame) || this; - _this.assertDeepEqual = assertDeepEqual; - _this.hotObservables = []; - _this.coldObservables = []; - _this.flushTests = []; - _this.runMode = false; - return _this; - } - TestScheduler.prototype.createTime = function (marbles) { - var indexOf = this.runMode ? marbles.trim().indexOf('|') : marbles.indexOf('|'); - if (indexOf === -1) { - throw new Error('marble diagram for time should have a completion marker "|"'); - } - return indexOf * TestScheduler.frameTimeFactor; - }; - TestScheduler.prototype.createColdObservable = function (marbles, values, error) { - if (marbles.indexOf('^') !== -1) { - throw new Error('cold observable cannot have subscription offset "^"'); - } - if (marbles.indexOf('!') !== -1) { - throw new Error('cold observable cannot have unsubscription marker "!"'); - } - var messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); - var cold = new ColdObservable(messages, this); - this.coldObservables.push(cold); - return cold; - }; - TestScheduler.prototype.createHotObservable = function (marbles, values, error) { - if (marbles.indexOf('!') !== -1) { - throw new Error('hot observable cannot have unsubscription marker "!"'); - } - var messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); - var subject = new HotObservable(messages, this); - this.hotObservables.push(subject); - return subject; - }; - TestScheduler.prototype.materializeInnerObservable = function (observable, outerFrame) { - var _this = this; - var messages = []; - observable.subscribe({ - next: function (value) { - messages.push({ frame: _this.frame - outerFrame, notification: nextNotification(value) }); - }, - error: function (error) { - messages.push({ frame: _this.frame - outerFrame, notification: errorNotification(error) }); - }, - complete: function () { - messages.push({ frame: _this.frame - outerFrame, notification: COMPLETE_NOTIFICATION }); - }, - }); - return messages; - }; - TestScheduler.prototype.expectObservable = function (observable, subscriptionMarbles) { - var _this = this; - if (subscriptionMarbles === void 0) { subscriptionMarbles = null; } - var actual = []; - var flushTest = { actual: actual, ready: false }; - var subscriptionParsed = TestScheduler.parseMarblesAsSubscriptions(subscriptionMarbles, this.runMode); - var subscriptionFrame = subscriptionParsed.subscribedFrame === Infinity ? 0 : subscriptionParsed.subscribedFrame; - var unsubscriptionFrame = subscriptionParsed.unsubscribedFrame; - var subscription; - this.schedule(function () { - subscription = observable.subscribe({ - next: function (x) { - var value = x instanceof Observable ? _this.materializeInnerObservable(x, _this.frame) : x; - actual.push({ frame: _this.frame, notification: nextNotification(value) }); - }, - error: function (error) { - actual.push({ frame: _this.frame, notification: errorNotification(error) }); - }, - complete: function () { - actual.push({ frame: _this.frame, notification: COMPLETE_NOTIFICATION }); - }, - }); - }, subscriptionFrame); - if (unsubscriptionFrame !== Infinity) { - this.schedule(function () { return subscription.unsubscribe(); }, unsubscriptionFrame); - } - this.flushTests.push(flushTest); - var runMode = this.runMode; - return { - toBe: function (marbles, values, errorValue) { - flushTest.ready = true; - flushTest.expected = TestScheduler.parseMarbles(marbles, values, errorValue, true, runMode); - }, - toEqual: function (other) { - flushTest.ready = true; - flushTest.expected = []; - _this.schedule(function () { - subscription = other.subscribe({ - next: function (x) { - var value = x instanceof Observable ? _this.materializeInnerObservable(x, _this.frame) : x; - flushTest.expected.push({ frame: _this.frame, notification: nextNotification(value) }); - }, - error: function (error) { - flushTest.expected.push({ frame: _this.frame, notification: errorNotification(error) }); - }, - complete: function () { - flushTest.expected.push({ frame: _this.frame, notification: COMPLETE_NOTIFICATION }); - }, - }); - }, subscriptionFrame); - }, - }; - }; - TestScheduler.prototype.expectSubscriptions = function (actualSubscriptionLogs) { - var flushTest = { actual: actualSubscriptionLogs, ready: false }; - this.flushTests.push(flushTest); - var runMode = this.runMode; - return { - toBe: function (marblesOrMarblesArray) { - var marblesArray = typeof marblesOrMarblesArray === 'string' ? [marblesOrMarblesArray] : marblesOrMarblesArray; - flushTest.ready = true; - flushTest.expected = marblesArray - .map(function (marbles) { return TestScheduler.parseMarblesAsSubscriptions(marbles, runMode); }) - .filter(function (marbles) { return marbles.subscribedFrame !== Infinity; }); - }, - }; - }; - TestScheduler.prototype.flush = function () { - var _this = this; - var hotObservables = this.hotObservables; - while (hotObservables.length > 0) { - hotObservables.shift().setup(); - } - _super.prototype.flush.call(this); - this.flushTests = this.flushTests.filter(function (test) { - if (test.ready) { - _this.assertDeepEqual(test.actual, test.expected); - return false; - } - return true; - }); - }; - TestScheduler.parseMarblesAsSubscriptions = function (marbles, runMode) { - var _this = this; - if (runMode === void 0) { runMode = false; } - if (typeof marbles !== 'string') { - return new SubscriptionLog(Infinity); - } - var characters = __spreadArray([], __read(marbles)); - var len = characters.length; - var groupStart = -1; - var subscriptionFrame = Infinity; - var unsubscriptionFrame = Infinity; - var frame = 0; - var _loop_1 = function (i) { - var nextFrame = frame; - var advanceFrameBy = function (count) { - nextFrame += count * _this.frameTimeFactor; - }; - var c = characters[i]; - switch (c) { - case ' ': - if (!runMode) { - advanceFrameBy(1); - } - break; - case '-': - advanceFrameBy(1); - break; - case '(': - groupStart = frame; - advanceFrameBy(1); - break; - case ')': - groupStart = -1; - advanceFrameBy(1); - break; - case '^': - if (subscriptionFrame !== Infinity) { - throw new Error("found a second subscription point '^' in a " + 'subscription marble diagram. There can only be one.'); - } - subscriptionFrame = groupStart > -1 ? groupStart : frame; - advanceFrameBy(1); - break; - case '!': - if (unsubscriptionFrame !== Infinity) { - throw new Error("found a second unsubscription point '!' in a " + 'subscription marble diagram. There can only be one.'); - } - unsubscriptionFrame = groupStart > -1 ? groupStart : frame; - break; - default: - if (runMode && c.match(/^[0-9]$/)) { - if (i === 0 || characters[i - 1] === ' ') { - var buffer = characters.slice(i).join(''); - var match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); - if (match) { - i += match[0].length - 1; - var duration = parseFloat(match[1]); - var unit = match[2]; - var durationInMs = void 0; - switch (unit) { - case 'ms': - durationInMs = duration; - break; - case 's': - durationInMs = duration * 1000; - break; - case 'm': - durationInMs = duration * 1000 * 60; - break; - default: - break; - } - advanceFrameBy(durationInMs / this_1.frameTimeFactor); - break; - } - } - } - throw new Error("there can only be '^' and '!' markers in a " + "subscription marble diagram. Found instead '" + c + "'."); - } - frame = nextFrame; - out_i_1 = i; - }; - var this_1 = this, out_i_1; - for (var i = 0; i < len; i++) { - _loop_1(i); - i = out_i_1; - } - if (unsubscriptionFrame < 0) { - return new SubscriptionLog(subscriptionFrame); - } - else { - return new SubscriptionLog(subscriptionFrame, unsubscriptionFrame); - } - }; - TestScheduler.parseMarbles = function (marbles, values, errorValue, materializeInnerObservables, runMode) { - var _this = this; - if (materializeInnerObservables === void 0) { materializeInnerObservables = false; } - if (runMode === void 0) { runMode = false; } - if (marbles.indexOf('!') !== -1) { - throw new Error('conventional marble diagrams cannot have the ' + 'unsubscription marker "!"'); - } - var characters = __spreadArray([], __read(marbles)); - var len = characters.length; - var testMessages = []; - var subIndex = runMode ? marbles.replace(/^[ ]+/, '').indexOf('^') : marbles.indexOf('^'); - var frame = subIndex === -1 ? 0 : subIndex * -this.frameTimeFactor; - var getValue = typeof values !== 'object' - ? function (x) { return x; } - : function (x) { - if (materializeInnerObservables && values[x] instanceof ColdObservable) { - return values[x].messages; - } - return values[x]; - }; - var groupStart = -1; - var _loop_2 = function (i) { - var nextFrame = frame; - var advanceFrameBy = function (count) { - nextFrame += count * _this.frameTimeFactor; - }; - var notification = void 0; - var c = characters[i]; - switch (c) { - case ' ': - if (!runMode) { - advanceFrameBy(1); - } - break; - case '-': - advanceFrameBy(1); - break; - case '(': - groupStart = frame; - advanceFrameBy(1); - break; - case ')': - groupStart = -1; - advanceFrameBy(1); - break; - case '|': - notification = COMPLETE_NOTIFICATION; - advanceFrameBy(1); - break; - case '^': - advanceFrameBy(1); - break; - case '#': - notification = errorNotification(errorValue || 'error'); - advanceFrameBy(1); - break; - default: - if (runMode && c.match(/^[0-9]$/)) { - if (i === 0 || characters[i - 1] === ' ') { - var buffer = characters.slice(i).join(''); - var match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); - if (match) { - i += match[0].length - 1; - var duration = parseFloat(match[1]); - var unit = match[2]; - var durationInMs = void 0; - switch (unit) { - case 'ms': - durationInMs = duration; - break; - case 's': - durationInMs = duration * 1000; - break; - case 'm': - durationInMs = duration * 1000 * 60; - break; - default: - break; - } - advanceFrameBy(durationInMs / this_2.frameTimeFactor); - break; - } - } - } - notification = nextNotification(getValue(c)); - advanceFrameBy(1); - break; - } - if (notification) { - testMessages.push({ frame: groupStart > -1 ? groupStart : frame, notification: notification }); - } - frame = nextFrame; - out_i_2 = i; - }; - var this_2 = this, out_i_2; - for (var i = 0; i < len; i++) { - _loop_2(i); - i = out_i_2; - } - return testMessages; - }; - TestScheduler.prototype.createAnimator = function () { - var _this = this; - if (!this.runMode) { - throw new Error('animate() must only be used in run mode'); - } - var lastHandle = 0; - var map; - var delegate = { - requestAnimationFrame: function (callback) { - if (!map) { - throw new Error('animate() was not called within run()'); - } - var handle = ++lastHandle; - map.set(handle, callback); - return handle; - }, - cancelAnimationFrame: function (handle) { - if (!map) { - throw new Error('animate() was not called within run()'); - } - map.delete(handle); - }, - }; - var animate = function (marbles) { - var e_1, _a; - if (map) { - throw new Error('animate() must not be called more than once within run()'); - } - if (/[|#]/.test(marbles)) { - throw new Error('animate() must not complete or error'); - } - map = new Map(); - var messages = TestScheduler.parseMarbles(marbles, undefined, undefined, undefined, true); - try { - for (var messages_1 = __values(messages), messages_1_1 = messages_1.next(); !messages_1_1.done; messages_1_1 = messages_1.next()) { - var message = messages_1_1.value; - _this.schedule(function () { - var e_2, _a; - var now = _this.now(); - var callbacks = Array.from(map.values()); - map.clear(); - try { - for (var callbacks_1 = (e_2 = void 0, __values(callbacks)), callbacks_1_1 = callbacks_1.next(); !callbacks_1_1.done; callbacks_1_1 = callbacks_1.next()) { - var callback = callbacks_1_1.value; - callback(now); - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (callbacks_1_1 && !callbacks_1_1.done && (_a = callbacks_1.return)) _a.call(callbacks_1); - } - finally { if (e_2) throw e_2.error; } - } - }, message.frame); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (messages_1_1 && !messages_1_1.done && (_a = messages_1.return)) _a.call(messages_1); - } - finally { if (e_1) throw e_1.error; } - } - }; - return { animate: animate, delegate: delegate }; - }; - TestScheduler.prototype.createDelegates = function () { - var _this = this; - var lastHandle = 0; - var scheduleLookup = new Map(); - var run = function () { - var now = _this.now(); - var scheduledRecords = Array.from(scheduleLookup.values()); - var scheduledRecordsDue = scheduledRecords.filter(function (_a) { - var due = _a.due; - return due <= now; - }); - var dueImmediates = scheduledRecordsDue.filter(function (_a) { - var type = _a.type; - return type === 'immediate'; - }); - if (dueImmediates.length > 0) { - var _a = dueImmediates[0], handle = _a.handle, handler = _a.handler; - scheduleLookup.delete(handle); - handler(); - return; - } - var dueIntervals = scheduledRecordsDue.filter(function (_a) { - var type = _a.type; - return type === 'interval'; - }); - if (dueIntervals.length > 0) { - var firstDueInterval = dueIntervals[0]; - var duration = firstDueInterval.duration, handler = firstDueInterval.handler; - firstDueInterval.due = now + duration; - firstDueInterval.subscription = _this.schedule(run, duration); - handler(); - return; - } - var dueTimeouts = scheduledRecordsDue.filter(function (_a) { - var type = _a.type; - return type === 'timeout'; - }); - if (dueTimeouts.length > 0) { - var _b = dueTimeouts[0], handle = _b.handle, handler = _b.handler; - scheduleLookup.delete(handle); - handler(); - return; - } - throw new Error('Expected a due immediate or interval'); - }; - var immediate = { - setImmediate: function (handler) { - var handle = ++lastHandle; - scheduleLookup.set(handle, { - due: _this.now(), - duration: 0, - handle: handle, - handler: handler, - subscription: _this.schedule(run, 0), - type: 'immediate', - }); - return handle; - }, - clearImmediate: function (handle) { - var value = scheduleLookup.get(handle); - if (value) { - value.subscription.unsubscribe(); - scheduleLookup.delete(handle); - } - }, - }; - var interval = { - setInterval: function (handler, duration) { - if (duration === void 0) { duration = 0; } - var handle = ++lastHandle; - scheduleLookup.set(handle, { - due: _this.now() + duration, - duration: duration, - handle: handle, - handler: handler, - subscription: _this.schedule(run, duration), - type: 'interval', - }); - return handle; - }, - clearInterval: function (handle) { - var value = scheduleLookup.get(handle); - if (value) { - value.subscription.unsubscribe(); - scheduleLookup.delete(handle); - } - }, - }; - var timeout = { - setTimeout: function (handler, duration) { - if (duration === void 0) { duration = 0; } - var handle = ++lastHandle; - scheduleLookup.set(handle, { - due: _this.now() + duration, - duration: duration, - handle: handle, - handler: handler, - subscription: _this.schedule(run, duration), - type: 'timeout', - }); - return handle; - }, - clearTimeout: function (handle) { - var value = scheduleLookup.get(handle); - if (value) { - value.subscription.unsubscribe(); - scheduleLookup.delete(handle); - } - }, - }; - return { immediate: immediate, interval: interval, timeout: timeout }; - }; - TestScheduler.prototype.run = function (callback) { - var prevFrameTimeFactor = TestScheduler.frameTimeFactor; - var prevMaxFrames = this.maxFrames; - TestScheduler.frameTimeFactor = 1; - this.maxFrames = Infinity; - this.runMode = true; - var animator = this.createAnimator(); - var delegates = this.createDelegates(); - animationFrameProvider.delegate = animator.delegate; - dateTimestampProvider.delegate = this; - immediateProvider.delegate = delegates.immediate; - intervalProvider.delegate = delegates.interval; - timeoutProvider.delegate = delegates.timeout; - performanceTimestampProvider.delegate = this; - var helpers = { - cold: this.createColdObservable.bind(this), - hot: this.createHotObservable.bind(this), - flush: this.flush.bind(this), - time: this.createTime.bind(this), - expectObservable: this.expectObservable.bind(this), - expectSubscriptions: this.expectSubscriptions.bind(this), - animate: animator.animate, - }; - try { - var ret = callback(helpers); - this.flush(); - return ret; - } - finally { - TestScheduler.frameTimeFactor = prevFrameTimeFactor; - this.maxFrames = prevMaxFrames; - this.runMode = false; - animationFrameProvider.delegate = undefined; - dateTimestampProvider.delegate = undefined; - immediateProvider.delegate = undefined; - intervalProvider.delegate = undefined; - timeoutProvider.delegate = undefined; - performanceTimestampProvider.delegate = undefined; - } - }; - TestScheduler.frameTimeFactor = 10; - return TestScheduler; - }(VirtualTimeScheduler)); - - - - var _testing = /*#__PURE__*/Object.freeze({ - TestScheduler: TestScheduler - }); - - function getXHRResponse(xhr) { - switch (xhr.responseType) { - case 'json': { - if ('response' in xhr) { - return xhr.response; - } - else { - var ieXHR = xhr; - return JSON.parse(ieXHR.responseText); - } - } - case 'document': - return xhr.responseXML; - case 'text': - default: { - if ('response' in xhr) { - return xhr.response; - } - else { - var ieXHR = xhr; - return ieXHR.responseText; - } - } - } - } - - var AjaxResponse = (function () { - function AjaxResponse(originalEvent, xhr, request, type) { - if (type === void 0) { type = 'download_load'; } - this.originalEvent = originalEvent; - this.xhr = xhr; - this.request = request; - this.type = type; - var status = xhr.status, responseType = xhr.responseType; - this.status = status !== null && status !== void 0 ? status : 0; - this.responseType = responseType !== null && responseType !== void 0 ? responseType : ''; - var allHeaders = xhr.getAllResponseHeaders(); - this.responseHeaders = allHeaders - ? - allHeaders.split('\n').reduce(function (headers, line) { - var index = line.indexOf(': '); - headers[line.slice(0, index)] = line.slice(index + 2); - return headers; - }, {}) - : {}; - this.response = getXHRResponse(xhr); - var loaded = originalEvent.loaded, total = originalEvent.total; - this.loaded = loaded; - this.total = total; - } - return AjaxResponse; - }()); - - var AjaxError = createErrorClass(function (_super) { - return function AjaxErrorImpl(message, xhr, request) { - this.message = message; - this.name = 'AjaxError'; - this.xhr = xhr; - this.request = request; - this.status = xhr.status; - this.responseType = xhr.responseType; - var response; - try { - response = getXHRResponse(xhr); - } - catch (err) { - response = xhr.responseText; - } - this.response = response; - }; - }); - var AjaxTimeoutError = (function () { - function AjaxTimeoutErrorImpl(xhr, request) { - AjaxError.call(this, 'ajax timeout', xhr, request); - this.name = 'AjaxTimeoutError'; - return this; - } - AjaxTimeoutErrorImpl.prototype = Object.create(AjaxError.prototype); - return AjaxTimeoutErrorImpl; - })(); - - function ajaxGet(url, headers) { - return ajax({ method: 'GET', url: url, headers: headers }); - } - function ajaxPost(url, body, headers) { - return ajax({ method: 'POST', url: url, body: body, headers: headers }); - } - function ajaxDelete(url, headers) { - return ajax({ method: 'DELETE', url: url, headers: headers }); - } - function ajaxPut(url, body, headers) { - return ajax({ method: 'PUT', url: url, body: body, headers: headers }); - } - function ajaxPatch(url, body, headers) { - return ajax({ method: 'PATCH', url: url, body: body, headers: headers }); - } - var mapResponse = map(function (x) { return x.response; }); - function ajaxGetJSON(url, headers) { - return mapResponse(ajax({ - method: 'GET', - url: url, - headers: headers, - })); - } - var ajax = (function () { - var create = function (urlOrConfig) { - var config = typeof urlOrConfig === 'string' - ? { - url: urlOrConfig, - } - : urlOrConfig; - return fromAjax(config); - }; - create.get = ajaxGet; - create.post = ajaxPost; - create.delete = ajaxDelete; - create.put = ajaxPut; - create.patch = ajaxPatch; - create.getJSON = ajaxGetJSON; - return create; - })(); - var UPLOAD = 'upload'; - var DOWNLOAD = 'download'; - var LOADSTART = 'loadstart'; - var PROGRESS = 'progress'; - var LOAD = 'load'; - function fromAjax(init) { - return new Observable(function (destination) { - var _a, _b; - var config = __assign({ async: true, crossDomain: false, withCredentials: false, method: 'GET', timeout: 0, responseType: 'json' }, init); - var queryParams = config.queryParams, configuredBody = config.body, configuredHeaders = config.headers; - var url = config.url; - if (!url) { - throw new TypeError('url is required'); - } - if (queryParams) { - var searchParams_1; - if (url.includes('?')) { - var parts = url.split('?'); - if (2 < parts.length) { - throw new TypeError('invalid url'); - } - searchParams_1 = new URLSearchParams(parts[1]); - new URLSearchParams(queryParams).forEach(function (value, key) { return searchParams_1.set(key, value); }); - url = parts[0] + '?' + searchParams_1; - } - else { - searchParams_1 = new URLSearchParams(queryParams); - url = url + '?' + searchParams_1; - } - } - var headers = {}; - if (configuredHeaders) { - for (var key in configuredHeaders) { - if (configuredHeaders.hasOwnProperty(key)) { - headers[key.toLowerCase()] = configuredHeaders[key]; - } - } - } - var crossDomain = config.crossDomain; - if (!crossDomain && !('x-requested-with' in headers)) { - headers['x-requested-with'] = 'XMLHttpRequest'; - } - var withCredentials = config.withCredentials, xsrfCookieName = config.xsrfCookieName, xsrfHeaderName = config.xsrfHeaderName; - if ((withCredentials || !crossDomain) && xsrfCookieName && xsrfHeaderName) { - var xsrfCookie = (_b = (_a = document === null || document === void 0 ? void 0 : document.cookie.match(new RegExp("(^|;\\s*)(" + xsrfCookieName + ")=([^;]*)"))) === null || _a === void 0 ? void 0 : _a.pop()) !== null && _b !== void 0 ? _b : ''; - if (xsrfCookie) { - headers[xsrfHeaderName] = xsrfCookie; - } - } - var body = extractContentTypeAndMaybeSerializeBody(configuredBody, headers); - var _request = __assign(__assign({}, config), { url: url, - headers: headers, - body: body }); - var xhr; - xhr = init.createXHR ? init.createXHR() : new XMLHttpRequest(); - { - var progressSubscriber_1 = init.progressSubscriber, _c = init.includeDownloadProgress, includeDownloadProgress = _c === void 0 ? false : _c, _d = init.includeUploadProgress, includeUploadProgress = _d === void 0 ? false : _d; - var addErrorEvent = function (type, errorFactory) { - xhr.addEventListener(type, function () { - var _a; - var error = errorFactory(); - (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, error); - destination.error(error); - }); - }; - addErrorEvent('timeout', function () { return new AjaxTimeoutError(xhr, _request); }); - addErrorEvent('abort', function () { return new AjaxError('aborted', xhr, _request); }); - var createResponse_1 = function (direction, event) { - return new AjaxResponse(event, xhr, _request, direction + "_" + event.type); - }; - var addProgressEvent_1 = function (target, type, direction) { - target.addEventListener(type, function (event) { - destination.next(createResponse_1(direction, event)); - }); - }; - if (includeUploadProgress) { - [LOADSTART, PROGRESS, LOAD].forEach(function (type) { return addProgressEvent_1(xhr.upload, type, UPLOAD); }); - } - if (progressSubscriber_1) { - [LOADSTART, PROGRESS].forEach(function (type) { return xhr.upload.addEventListener(type, function (e) { var _a; return (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.next) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, e); }); }); - } - if (includeDownloadProgress) { - [LOADSTART, PROGRESS].forEach(function (type) { return addProgressEvent_1(xhr, type, DOWNLOAD); }); - } - var emitError_1 = function (status) { - var msg = 'ajax error' + (status ? ' ' + status : ''); - destination.error(new AjaxError(msg, xhr, _request)); - }; - xhr.addEventListener('error', function (e) { - var _a; - (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, e); - emitError_1(); - }); - xhr.addEventListener(LOAD, function (event) { - var _a, _b; - var status = xhr.status; - if (status < 400) { - (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.complete) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1); - var response = void 0; - try { - response = createResponse_1(DOWNLOAD, event); - } - catch (err) { - destination.error(err); - return; - } - destination.next(response); - destination.complete(); - } - else { - (_b = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _b === void 0 ? void 0 : _b.call(progressSubscriber_1, event); - emitError_1(status); - } - }); - } - var user = _request.user, method = _request.method, async = _request.async; - if (user) { - xhr.open(method, url, async, user, _request.password); - } - else { - xhr.open(method, url, async); - } - if (async) { - xhr.timeout = _request.timeout; - xhr.responseType = _request.responseType; - } - if ('withCredentials' in xhr) { - xhr.withCredentials = _request.withCredentials; - } - for (var key in headers) { - if (headers.hasOwnProperty(key)) { - xhr.setRequestHeader(key, headers[key]); - } - } - if (body) { - xhr.send(body); - } - else { - xhr.send(); - } - return function () { - if (xhr && xhr.readyState !== 4) { - xhr.abort(); - } - }; - }); - } - function extractContentTypeAndMaybeSerializeBody(body, headers) { - var _a; - if (!body || - typeof body === 'string' || - isFormData(body) || - isURLSearchParams(body) || - isArrayBuffer(body) || - isFile(body) || - isBlob(body) || - isReadableStream(body)) { - return body; - } - if (isArrayBufferView(body)) { - return body.buffer; - } - if (typeof body === 'object') { - headers['content-type'] = (_a = headers['content-type']) !== null && _a !== void 0 ? _a : 'application/json;charset=utf-8'; - return JSON.stringify(body); - } - throw new TypeError('Unknown body type'); - } - var _toString = Object.prototype.toString; - function toStringCheck(obj, name) { - return _toString.call(obj) === "[object " + name + "]"; - } - function isArrayBuffer(body) { - return toStringCheck(body, 'ArrayBuffer'); - } - function isFile(body) { - return toStringCheck(body, 'File'); - } - function isBlob(body) { - return toStringCheck(body, 'Blob'); - } - function isArrayBufferView(body) { - return typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView(body); - } - function isFormData(body) { - return typeof FormData !== 'undefined' && body instanceof FormData; - } - function isURLSearchParams(body) { - return typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams; - } - function isReadableStream(body) { - return typeof ReadableStream !== 'undefined' && body instanceof ReadableStream; - } - - - - var _ajax = /*#__PURE__*/Object.freeze({ - ajax: ajax, - AjaxError: AjaxError, - AjaxTimeoutError: AjaxTimeoutError, - AjaxResponse: AjaxResponse - }); - - var DEFAULT_WEBSOCKET_CONFIG = { - url: '', - deserializer: function (e) { return JSON.parse(e.data); }, - serializer: function (value) { return JSON.stringify(value); }, - }; - var WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }'; - var WebSocketSubject = (function (_super) { - __extends(WebSocketSubject, _super); - function WebSocketSubject(urlConfigOrSource, destination) { - var _this = _super.call(this) || this; - _this._socket = null; - if (urlConfigOrSource instanceof Observable) { - _this.destination = destination; - _this.source = urlConfigOrSource; - } - else { - var config = (_this._config = __assign({}, DEFAULT_WEBSOCKET_CONFIG)); - _this._output = new Subject(); - if (typeof urlConfigOrSource === 'string') { - config.url = urlConfigOrSource; - } - else { - for (var key in urlConfigOrSource) { - if (urlConfigOrSource.hasOwnProperty(key)) { - config[key] = urlConfigOrSource[key]; - } - } - } - if (!config.WebSocketCtor && WebSocket) { - config.WebSocketCtor = WebSocket; - } - else if (!config.WebSocketCtor) { - throw new Error('no WebSocket constructor can be found'); - } - _this.destination = new ReplaySubject(); - } - return _this; - } - WebSocketSubject.prototype.lift = function (operator) { - var sock = new WebSocketSubject(this._config, this.destination); - sock.operator = operator; - sock.source = this; - return sock; - }; - WebSocketSubject.prototype._resetState = function () { - this._socket = null; - if (!this.source) { - this.destination = new ReplaySubject(); - } - this._output = new Subject(); - }; - WebSocketSubject.prototype.multiplex = function (subMsg, unsubMsg, messageFilter) { - var self = this; - return new Observable(function (observer) { - try { - self.next(subMsg()); - } - catch (err) { - observer.error(err); - } - var subscription = self.subscribe({ - next: function (x) { - try { - if (messageFilter(x)) { - observer.next(x); - } - } - catch (err) { - observer.error(err); - } - }, - error: function (err) { return observer.error(err); }, - complete: function () { return observer.complete(); }, - }); - return function () { - try { - self.next(unsubMsg()); - } - catch (err) { - observer.error(err); - } - subscription.unsubscribe(); - }; - }); - }; - WebSocketSubject.prototype._connectSocket = function () { - var _this = this; - var _a = this._config, WebSocketCtor = _a.WebSocketCtor, protocol = _a.protocol, url = _a.url, binaryType = _a.binaryType; - var observer = this._output; - var socket = null; - try { - socket = protocol ? new WebSocketCtor(url, protocol) : new WebSocketCtor(url); - this._socket = socket; - if (binaryType) { - this._socket.binaryType = binaryType; - } - } - catch (e) { - observer.error(e); - return; - } - var subscription = new Subscription(function () { - _this._socket = null; - if (socket && socket.readyState === 1) { - socket.close(); - } - }); - socket.onopen = function (evt) { - var _socket = _this._socket; - if (!_socket) { - socket.close(); - _this._resetState(); - return; - } - var openObserver = _this._config.openObserver; - if (openObserver) { - openObserver.next(evt); - } - var queue = _this.destination; - _this.destination = Subscriber.create(function (x) { - if (socket.readyState === 1) { - try { - var serializer = _this._config.serializer; - socket.send(serializer(x)); - } - catch (e) { - _this.destination.error(e); - } - } - }, function (err) { - var closingObserver = _this._config.closingObserver; - if (closingObserver) { - closingObserver.next(undefined); - } - if (err && err.code) { - socket.close(err.code, err.reason); - } - else { - observer.error(new TypeError(WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT)); - } - _this._resetState(); - }, function () { - var closingObserver = _this._config.closingObserver; - if (closingObserver) { - closingObserver.next(undefined); - } - socket.close(); - _this._resetState(); - }); - if (queue && queue instanceof ReplaySubject) { - subscription.add(queue.subscribe(_this.destination)); - } - }; - socket.onerror = function (e) { - _this._resetState(); - observer.error(e); - }; - socket.onclose = function (e) { - if (socket === _this._socket) { - _this._resetState(); - } - var closeObserver = _this._config.closeObserver; - if (closeObserver) { - closeObserver.next(e); - } - if (e.wasClean) { - observer.complete(); - } - else { - observer.error(e); - } - }; - socket.onmessage = function (e) { - try { - var deserializer = _this._config.deserializer; - observer.next(deserializer(e)); - } - catch (err) { - observer.error(err); - } - }; - }; - WebSocketSubject.prototype._subscribe = function (subscriber) { - var _this = this; - var source = this.source; - if (source) { - return source.subscribe(subscriber); - } - if (!this._socket) { - this._connectSocket(); - } - this._output.subscribe(subscriber); - subscriber.add(function () { - var _socket = _this._socket; - if (_this._output.observers.length === 0) { - if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) { - _socket.close(); - } - _this._resetState(); - } - }); - return subscriber; - }; - WebSocketSubject.prototype.unsubscribe = function () { - var _socket = this._socket; - if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) { - _socket.close(); - } - this._resetState(); - _super.prototype.unsubscribe.call(this); - }; - return WebSocketSubject; - }(AnonymousSubject)); - - function webSocket(urlConfigOrSource) { - return new WebSocketSubject(urlConfigOrSource); - } - - - - var _webSocket = /*#__PURE__*/Object.freeze({ - webSocket: webSocket, - WebSocketSubject: WebSocketSubject - }); - - function fromFetch(input, initWithSelector) { - if (initWithSelector === void 0) { initWithSelector = {}; } - var selector = initWithSelector.selector, init = __rest(initWithSelector, ["selector"]); - return new Observable(function (subscriber) { - var controller = new AbortController(); - var signal = controller.signal; - var abortable = true; - var outerSignal = init.signal; - if (outerSignal) { - if (outerSignal.aborted) { - controller.abort(); - } - else { - var outerSignalHandler_1 = function () { - if (!signal.aborted) { - controller.abort(); - } - }; - outerSignal.addEventListener('abort', outerSignalHandler_1); - subscriber.add(function () { return outerSignal.removeEventListener('abort', outerSignalHandler_1); }); - } - } - var perSubscriberInit = __assign(__assign({}, init), { signal: signal }); - var handleError = function (err) { - abortable = false; - subscriber.error(err); - }; - fetch(input, perSubscriberInit) - .then(function (response) { - if (selector) { - innerFrom(selector(response)).subscribe(createOperatorSubscriber(subscriber, undefined, function () { - abortable = false; - subscriber.complete(); - }, handleError)); - } - else { - abortable = false; - subscriber.next(response); - subscriber.complete(); - } - }) - .catch(handleError); - return function () { - if (abortable) { - controller.abort(); - } - }; - }); - } - - - - var _fetch = /*#__PURE__*/Object.freeze({ - fromFetch: fromFetch - }); - - var operators = _operators; - var testing = _testing; - var ajax$1 = _ajax; - var webSocket$1 = _webSocket; - var fetch$1 = _fetch; - - exports.operators = operators; - exports.testing = testing; - exports.ajax = ajax$1; - exports.webSocket = webSocket$1; - exports.fetch = fetch$1; - exports.Observable = Observable; - exports.ConnectableObservable = ConnectableObservable; - exports.observable = observable; - exports.animationFrames = animationFrames; - exports.Subject = Subject; - exports.BehaviorSubject = BehaviorSubject; - exports.ReplaySubject = ReplaySubject; - exports.AsyncSubject = AsyncSubject; - exports.asap = asap; - exports.asapScheduler = asapScheduler; - exports.async = async; - exports.asyncScheduler = asyncScheduler; - exports.queue = queue; - exports.queueScheduler = queueScheduler; - exports.animationFrame = animationFrame; - exports.animationFrameScheduler = animationFrameScheduler; - exports.VirtualTimeScheduler = VirtualTimeScheduler; - exports.VirtualAction = VirtualAction; - exports.Scheduler = Scheduler; - exports.Subscription = Subscription; - exports.Subscriber = Subscriber; - exports.Notification = Notification; - exports.pipe = pipe; - exports.noop = noop; - exports.identity = identity; - exports.isObservable = isObservable; - exports.lastValueFrom = lastValueFrom; - exports.firstValueFrom = firstValueFrom; - exports.ArgumentOutOfRangeError = ArgumentOutOfRangeError; - exports.EmptyError = EmptyError; - exports.NotFoundError = NotFoundError; - exports.ObjectUnsubscribedError = ObjectUnsubscribedError; - exports.SequenceError = SequenceError; - exports.TimeoutError = TimeoutError; - exports.UnsubscriptionError = UnsubscriptionError; - exports.bindCallback = bindCallback; - exports.bindNodeCallback = bindNodeCallback; - exports.combineLatest = combineLatest; - exports.concat = concat; - exports.connectable = connectable; - exports.defer = defer; - exports.empty = empty; - exports.forkJoin = forkJoin; - exports.from = from; - exports.fromEvent = fromEvent; - exports.fromEventPattern = fromEventPattern; - exports.generate = generate; - exports.iif = iif; - exports.interval = interval; - exports.merge = merge; - exports.never = never; - exports.of = of; - exports.onErrorResumeNext = onErrorResumeNext; - exports.pairs = pairs; - exports.partition = partition; - exports.race = race; - exports.range = range; - exports.throwError = throwError; - exports.timer = timer; - exports.using = using; - exports.zip = zip; - exports.scheduled = scheduled; - exports.EMPTY = EMPTY; - exports.NEVER = NEVER; - exports.config = config; - exports.audit = audit; - exports.auditTime = auditTime; - exports.buffer = buffer; - exports.bufferCount = bufferCount; - exports.bufferTime = bufferTime; - exports.bufferToggle = bufferToggle; - exports.bufferWhen = bufferWhen; - exports.catchError = catchError; - exports.combineAll = combineAll; - exports.combineLatestAll = combineLatestAll; - exports.combineLatestWith = combineLatestWith; - exports.concatAll = concatAll; - exports.concatMap = concatMap; - exports.concatMapTo = concatMapTo; - exports.concatWith = concatWith; - exports.connect = connect; - exports.count = count; - exports.debounce = debounce; - exports.debounceTime = debounceTime; - exports.defaultIfEmpty = defaultIfEmpty; - exports.delay = delay; - exports.delayWhen = delayWhen; - exports.dematerialize = dematerialize; - exports.distinct = distinct; - exports.distinctUntilChanged = distinctUntilChanged; - exports.distinctUntilKeyChanged = distinctUntilKeyChanged; - exports.elementAt = elementAt; - exports.endWith = endWith; - exports.every = every; - exports.exhaust = exhaust; - exports.exhaustAll = exhaustAll; - exports.exhaustMap = exhaustMap; - exports.expand = expand; - exports.filter = filter; - exports.finalize = finalize; - exports.find = find; - exports.findIndex = findIndex; - exports.first = first; - exports.groupBy = groupBy; - exports.ignoreElements = ignoreElements; - exports.isEmpty = isEmpty; - exports.last = last$1; - exports.map = map; - exports.mapTo = mapTo; - exports.materialize = materialize; - exports.max = max; - exports.mergeAll = mergeAll; - exports.flatMap = flatMap; - exports.mergeMap = mergeMap; - exports.mergeMapTo = mergeMapTo; - exports.mergeScan = mergeScan; - exports.mergeWith = mergeWith; - exports.min = min; - exports.multicast = multicast; - exports.observeOn = observeOn; - exports.onErrorResumeNextWith = onErrorResumeNextWith; - exports.pairwise = pairwise; - exports.pluck = pluck; - exports.publish = publish; - exports.publishBehavior = publishBehavior; - exports.publishLast = publishLast; - exports.publishReplay = publishReplay; - exports.raceWith = raceWith; - exports.reduce = reduce; - exports.repeat = repeat; - exports.repeatWhen = repeatWhen; - exports.retry = retry; - exports.retryWhen = retryWhen; - exports.refCount = refCount; - exports.sample = sample; - exports.sampleTime = sampleTime; - exports.scan = scan; - exports.sequenceEqual = sequenceEqual; - exports.share = share; - exports.shareReplay = shareReplay; - exports.single = single; - exports.skip = skip; - exports.skipLast = skipLast; - exports.skipUntil = skipUntil; - exports.skipWhile = skipWhile; - exports.startWith = startWith; - exports.subscribeOn = subscribeOn; - exports.switchAll = switchAll; - exports.switchMap = switchMap; - exports.switchMapTo = switchMapTo; - exports.switchScan = switchScan; - exports.take = take; - exports.takeLast = takeLast; - exports.takeUntil = takeUntil; - exports.takeWhile = takeWhile; - exports.tap = tap; - exports.throttle = throttle; - exports.throttleTime = throttleTime; - exports.throwIfEmpty = throwIfEmpty; - exports.timeInterval = timeInterval; - exports.timeout = timeout; - exports.timeoutWith = timeoutWith; - exports.timestamp = timestamp; - exports.toArray = toArray; - exports.window = window; - exports.windowCount = windowCount; - exports.windowTime = windowTime; - exports.windowToggle = windowToggle; - exports.windowWhen = windowWhen; - exports.withLatestFrom = withLatestFrom; - exports.zipAll = zipAll; - exports.zipWith = zipWith; - - Object.defineProperty(exports, '__esModule', { value: true }); - -}))); - -//# sourceMappingURL=rxjs.umd.js.map - diff --git a/node_modules/rxjs/dist/bundles/rxjs.umd.js.map b/node_modules/rxjs/dist/bundles/rxjs.umd.js.map deleted file mode 100644 index 7cd0d2a..0000000 --- a/node_modules/rxjs/dist/bundles/rxjs.umd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"umd.js","sources":["../cjs/tslib/tslib.es6.js","../cjs/dist/esm5_for_rollup/internal/util/isFunction.js","../cjs/dist/esm5_for_rollup/internal/util/createErrorClass.js","../cjs/dist/esm5_for_rollup/internal/util/UnsubscriptionError.js","../cjs/dist/esm5_for_rollup/internal/util/arrRemove.js","../cjs/dist/esm5_for_rollup/internal/Subscription.js","../cjs/dist/esm5_for_rollup/internal/config.js","../cjs/dist/esm5_for_rollup/internal/scheduler/timeoutProvider.js","../cjs/dist/esm5_for_rollup/internal/util/reportUnhandledError.js","../cjs/dist/esm5_for_rollup/internal/util/noop.js","../cjs/dist/esm5_for_rollup/internal/NotificationFactories.js","../cjs/dist/esm5_for_rollup/internal/util/errorContext.js","../cjs/dist/esm5_for_rollup/internal/Subscriber.js","../cjs/dist/esm5_for_rollup/internal/symbol/observable.js","../cjs/dist/esm5_for_rollup/internal/util/identity.js","../cjs/dist/esm5_for_rollup/internal/util/pipe.js","../cjs/dist/esm5_for_rollup/internal/Observable.js","../cjs/dist/esm5_for_rollup/internal/util/lift.js","../cjs/dist/esm5_for_rollup/internal/operators/OperatorSubscriber.js","../cjs/dist/esm5_for_rollup/internal/operators/refCount.js","../cjs/dist/esm5_for_rollup/internal/observable/ConnectableObservable.js","../cjs/dist/esm5_for_rollup/internal/scheduler/performanceTimestampProvider.js","../cjs/dist/esm5_for_rollup/internal/scheduler/animationFrameProvider.js","../cjs/dist/esm5_for_rollup/internal/observable/dom/animationFrames.js","../cjs/dist/esm5_for_rollup/internal/util/ObjectUnsubscribedError.js","../cjs/dist/esm5_for_rollup/internal/Subject.js","../cjs/dist/esm5_for_rollup/internal/BehaviorSubject.js","../cjs/dist/esm5_for_rollup/internal/scheduler/dateTimestampProvider.js","../cjs/dist/esm5_for_rollup/internal/ReplaySubject.js","../cjs/dist/esm5_for_rollup/internal/AsyncSubject.js","../cjs/dist/esm5_for_rollup/internal/scheduler/Action.js","../cjs/dist/esm5_for_rollup/internal/scheduler/intervalProvider.js","../cjs/dist/esm5_for_rollup/internal/scheduler/AsyncAction.js","../cjs/dist/esm5_for_rollup/internal/util/Immediate.js","../cjs/dist/esm5_for_rollup/internal/scheduler/immediateProvider.js","../cjs/dist/esm5_for_rollup/internal/scheduler/AsapAction.js","../cjs/dist/esm5_for_rollup/internal/Scheduler.js","../cjs/dist/esm5_for_rollup/internal/scheduler/AsyncScheduler.js","../cjs/dist/esm5_for_rollup/internal/scheduler/AsapScheduler.js","../cjs/dist/esm5_for_rollup/internal/scheduler/asap.js","../cjs/dist/esm5_for_rollup/internal/scheduler/async.js","../cjs/dist/esm5_for_rollup/internal/scheduler/QueueAction.js","../cjs/dist/esm5_for_rollup/internal/scheduler/QueueScheduler.js","../cjs/dist/esm5_for_rollup/internal/scheduler/queue.js","../cjs/dist/esm5_for_rollup/internal/scheduler/AnimationFrameAction.js","../cjs/dist/esm5_for_rollup/internal/scheduler/AnimationFrameScheduler.js","../cjs/dist/esm5_for_rollup/internal/scheduler/animationFrame.js","../cjs/dist/esm5_for_rollup/internal/scheduler/VirtualTimeScheduler.js","../cjs/dist/esm5_for_rollup/internal/observable/empty.js","../cjs/dist/esm5_for_rollup/internal/util/isScheduler.js","../cjs/dist/esm5_for_rollup/internal/util/args.js","../cjs/dist/esm5_for_rollup/internal/util/isArrayLike.js","../cjs/dist/esm5_for_rollup/internal/util/isPromise.js","../cjs/dist/esm5_for_rollup/internal/util/isInteropObservable.js","../cjs/dist/esm5_for_rollup/internal/util/isAsyncIterable.js","../cjs/dist/esm5_for_rollup/internal/util/throwUnobservableError.js","../cjs/dist/esm5_for_rollup/internal/symbol/iterator.js","../cjs/dist/esm5_for_rollup/internal/util/isIterable.js","../cjs/dist/esm5_for_rollup/internal/util/isReadableStreamLike.js","../cjs/dist/esm5_for_rollup/internal/observable/innerFrom.js","../cjs/dist/esm5_for_rollup/internal/util/executeSchedule.js","../cjs/dist/esm5_for_rollup/internal/operators/observeOn.js","../cjs/dist/esm5_for_rollup/internal/operators/subscribeOn.js","../cjs/dist/esm5_for_rollup/internal/scheduled/scheduleObservable.js","../cjs/dist/esm5_for_rollup/internal/scheduled/schedulePromise.js","../cjs/dist/esm5_for_rollup/internal/scheduled/scheduleArray.js","../cjs/dist/esm5_for_rollup/internal/scheduled/scheduleIterable.js","../cjs/dist/esm5_for_rollup/internal/scheduled/scheduleAsyncIterable.js","../cjs/dist/esm5_for_rollup/internal/scheduled/scheduleReadableStreamLike.js","../cjs/dist/esm5_for_rollup/internal/scheduled/scheduled.js","../cjs/dist/esm5_for_rollup/internal/observable/from.js","../cjs/dist/esm5_for_rollup/internal/observable/of.js","../cjs/dist/esm5_for_rollup/internal/observable/throwError.js","../cjs/dist/esm5_for_rollup/internal/Notification.js","../cjs/dist/esm5_for_rollup/internal/util/isObservable.js","../cjs/dist/esm5_for_rollup/internal/util/EmptyError.js","../cjs/dist/esm5_for_rollup/internal/lastValueFrom.js","../cjs/dist/esm5_for_rollup/internal/firstValueFrom.js","../cjs/dist/esm5_for_rollup/internal/util/ArgumentOutOfRangeError.js","../cjs/dist/esm5_for_rollup/internal/util/NotFoundError.js","../cjs/dist/esm5_for_rollup/internal/util/SequenceError.js","../cjs/dist/esm5_for_rollup/internal/util/isDate.js","../cjs/dist/esm5_for_rollup/internal/operators/timeout.js","../cjs/dist/esm5_for_rollup/internal/operators/map.js","../cjs/dist/esm5_for_rollup/internal/util/mapOneOrManyArgs.js","../cjs/dist/esm5_for_rollup/internal/observable/bindCallbackInternals.js","../cjs/dist/esm5_for_rollup/internal/observable/bindCallback.js","../cjs/dist/esm5_for_rollup/internal/observable/bindNodeCallback.js","../cjs/dist/esm5_for_rollup/internal/util/argsArgArrayOrObject.js","../cjs/dist/esm5_for_rollup/internal/util/createObject.js","../cjs/dist/esm5_for_rollup/internal/observable/combineLatest.js","../cjs/dist/esm5_for_rollup/internal/operators/mergeInternals.js","../cjs/dist/esm5_for_rollup/internal/operators/mergeMap.js","../cjs/dist/esm5_for_rollup/internal/operators/mergeAll.js","../cjs/dist/esm5_for_rollup/internal/operators/concatAll.js","../cjs/dist/esm5_for_rollup/internal/observable/concat.js","../cjs/dist/esm5_for_rollup/internal/observable/defer.js","../cjs/dist/esm5_for_rollup/internal/observable/connectable.js","../cjs/dist/esm5_for_rollup/internal/observable/forkJoin.js","../cjs/dist/esm5_for_rollup/internal/observable/fromEvent.js","../cjs/dist/esm5_for_rollup/internal/observable/fromEventPattern.js","../cjs/dist/esm5_for_rollup/internal/observable/generate.js","../cjs/dist/esm5_for_rollup/internal/observable/iif.js","../cjs/dist/esm5_for_rollup/internal/observable/timer.js","../cjs/dist/esm5_for_rollup/internal/observable/interval.js","../cjs/dist/esm5_for_rollup/internal/observable/merge.js","../cjs/dist/esm5_for_rollup/internal/observable/never.js","../cjs/dist/esm5_for_rollup/internal/util/argsOrArgArray.js","../cjs/dist/esm5_for_rollup/internal/observable/onErrorResumeNext.js","../cjs/dist/esm5_for_rollup/internal/observable/pairs.js","../cjs/dist/esm5_for_rollup/internal/util/not.js","../cjs/dist/esm5_for_rollup/internal/operators/filter.js","../cjs/dist/esm5_for_rollup/internal/observable/partition.js","../cjs/dist/esm5_for_rollup/internal/observable/race.js","../cjs/dist/esm5_for_rollup/internal/observable/range.js","../cjs/dist/esm5_for_rollup/internal/observable/using.js","../cjs/dist/esm5_for_rollup/internal/observable/zip.js","../cjs/dist/esm5_for_rollup/internal/operators/audit.js","../cjs/dist/esm5_for_rollup/internal/operators/auditTime.js","../cjs/dist/esm5_for_rollup/internal/operators/buffer.js","../cjs/dist/esm5_for_rollup/internal/operators/bufferCount.js","../cjs/dist/esm5_for_rollup/internal/operators/bufferTime.js","../cjs/dist/esm5_for_rollup/internal/operators/bufferToggle.js","../cjs/dist/esm5_for_rollup/internal/operators/bufferWhen.js","../cjs/dist/esm5_for_rollup/internal/operators/catchError.js","../cjs/dist/esm5_for_rollup/internal/operators/scanInternals.js","../cjs/dist/esm5_for_rollup/internal/operators/reduce.js","../cjs/dist/esm5_for_rollup/internal/operators/toArray.js","../cjs/dist/esm5_for_rollup/internal/operators/joinAllInternals.js","../cjs/dist/esm5_for_rollup/internal/operators/combineLatestAll.js","../cjs/dist/esm5_for_rollup/internal/operators/combineAll.js","../cjs/dist/esm5_for_rollup/internal/operators/combineLatest.js","../cjs/dist/esm5_for_rollup/internal/operators/combineLatestWith.js","../cjs/dist/esm5_for_rollup/internal/operators/concatMap.js","../cjs/dist/esm5_for_rollup/internal/operators/concatMapTo.js","../cjs/dist/esm5_for_rollup/internal/operators/concat.js","../cjs/dist/esm5_for_rollup/internal/operators/concatWith.js","../cjs/dist/esm5_for_rollup/internal/observable/fromSubscribable.js","../cjs/dist/esm5_for_rollup/internal/operators/connect.js","../cjs/dist/esm5_for_rollup/internal/operators/count.js","../cjs/dist/esm5_for_rollup/internal/operators/debounce.js","../cjs/dist/esm5_for_rollup/internal/operators/debounceTime.js","../cjs/dist/esm5_for_rollup/internal/operators/defaultIfEmpty.js","../cjs/dist/esm5_for_rollup/internal/operators/take.js","../cjs/dist/esm5_for_rollup/internal/operators/ignoreElements.js","../cjs/dist/esm5_for_rollup/internal/operators/mapTo.js","../cjs/dist/esm5_for_rollup/internal/operators/delayWhen.js","../cjs/dist/esm5_for_rollup/internal/operators/delay.js","../cjs/dist/esm5_for_rollup/internal/operators/dematerialize.js","../cjs/dist/esm5_for_rollup/internal/operators/distinct.js","../cjs/dist/esm5_for_rollup/internal/operators/distinctUntilChanged.js","../cjs/dist/esm5_for_rollup/internal/operators/distinctUntilKeyChanged.js","../cjs/dist/esm5_for_rollup/internal/operators/throwIfEmpty.js","../cjs/dist/esm5_for_rollup/internal/operators/elementAt.js","../cjs/dist/esm5_for_rollup/internal/operators/endWith.js","../cjs/dist/esm5_for_rollup/internal/operators/every.js","../cjs/dist/esm5_for_rollup/internal/operators/exhaustMap.js","../cjs/dist/esm5_for_rollup/internal/operators/exhaustAll.js","../cjs/dist/esm5_for_rollup/internal/operators/exhaust.js","../cjs/dist/esm5_for_rollup/internal/operators/expand.js","../cjs/dist/esm5_for_rollup/internal/operators/finalize.js","../cjs/dist/esm5_for_rollup/internal/operators/find.js","../cjs/dist/esm5_for_rollup/internal/operators/findIndex.js","../cjs/dist/esm5_for_rollup/internal/operators/first.js","../cjs/dist/esm5_for_rollup/internal/operators/groupBy.js","../cjs/dist/esm5_for_rollup/internal/operators/isEmpty.js","../cjs/dist/esm5_for_rollup/internal/operators/takeLast.js","../cjs/dist/esm5_for_rollup/internal/operators/last.js","../cjs/dist/esm5_for_rollup/internal/operators/materialize.js","../cjs/dist/esm5_for_rollup/internal/operators/max.js","../cjs/dist/esm5_for_rollup/internal/operators/flatMap.js","../cjs/dist/esm5_for_rollup/internal/operators/mergeMapTo.js","../cjs/dist/esm5_for_rollup/internal/operators/mergeScan.js","../cjs/dist/esm5_for_rollup/internal/operators/merge.js","../cjs/dist/esm5_for_rollup/internal/operators/mergeWith.js","../cjs/dist/esm5_for_rollup/internal/operators/min.js","../cjs/dist/esm5_for_rollup/internal/operators/multicast.js","../cjs/dist/esm5_for_rollup/internal/operators/onErrorResumeNextWith.js","../cjs/dist/esm5_for_rollup/internal/operators/pairwise.js","../cjs/dist/esm5_for_rollup/internal/operators/pluck.js","../cjs/dist/esm5_for_rollup/internal/operators/publish.js","../cjs/dist/esm5_for_rollup/internal/operators/publishBehavior.js","../cjs/dist/esm5_for_rollup/internal/operators/publishLast.js","../cjs/dist/esm5_for_rollup/internal/operators/publishReplay.js","../cjs/dist/esm5_for_rollup/internal/operators/raceWith.js","../cjs/dist/esm5_for_rollup/internal/operators/repeat.js","../cjs/dist/esm5_for_rollup/internal/operators/repeatWhen.js","../cjs/dist/esm5_for_rollup/internal/operators/retry.js","../cjs/dist/esm5_for_rollup/internal/operators/retryWhen.js","../cjs/dist/esm5_for_rollup/internal/operators/sample.js","../cjs/dist/esm5_for_rollup/internal/operators/sampleTime.js","../cjs/dist/esm5_for_rollup/internal/operators/scan.js","../cjs/dist/esm5_for_rollup/internal/operators/sequenceEqual.js","../cjs/dist/esm5_for_rollup/internal/operators/share.js","../cjs/dist/esm5_for_rollup/internal/operators/shareReplay.js","../cjs/dist/esm5_for_rollup/internal/operators/single.js","../cjs/dist/esm5_for_rollup/internal/operators/skip.js","../cjs/dist/esm5_for_rollup/internal/operators/skipLast.js","../cjs/dist/esm5_for_rollup/internal/operators/skipUntil.js","../cjs/dist/esm5_for_rollup/internal/operators/skipWhile.js","../cjs/dist/esm5_for_rollup/internal/operators/startWith.js","../cjs/dist/esm5_for_rollup/internal/operators/switchMap.js","../cjs/dist/esm5_for_rollup/internal/operators/switchAll.js","../cjs/dist/esm5_for_rollup/internal/operators/switchMapTo.js","../cjs/dist/esm5_for_rollup/internal/operators/switchScan.js","../cjs/dist/esm5_for_rollup/internal/operators/takeUntil.js","../cjs/dist/esm5_for_rollup/internal/operators/takeWhile.js","../cjs/dist/esm5_for_rollup/internal/operators/tap.js","../cjs/dist/esm5_for_rollup/internal/operators/throttle.js","../cjs/dist/esm5_for_rollup/internal/operators/throttleTime.js","../cjs/dist/esm5_for_rollup/internal/operators/timeInterval.js","../cjs/dist/esm5_for_rollup/internal/operators/timeoutWith.js","../cjs/dist/esm5_for_rollup/internal/operators/timestamp.js","../cjs/dist/esm5_for_rollup/internal/operators/window.js","../cjs/dist/esm5_for_rollup/internal/operators/windowCount.js","../cjs/dist/esm5_for_rollup/internal/operators/windowTime.js","../cjs/dist/esm5_for_rollup/internal/operators/windowToggle.js","../cjs/dist/esm5_for_rollup/internal/operators/windowWhen.js","../cjs/dist/esm5_for_rollup/internal/operators/withLatestFrom.js","../cjs/dist/esm5_for_rollup/internal/operators/zipAll.js","../cjs/dist/esm5_for_rollup/internal/operators/zip.js","../cjs/dist/esm5_for_rollup/internal/operators/zipWith.js","../cjs/dist/esm5_for_rollup/internal/operators/partition.js","../cjs/dist/esm5_for_rollup/internal/operators/race.js","../cjs/dist/esm5_for_rollup/internal/testing/SubscriptionLog.js","../cjs/dist/esm5_for_rollup/internal/testing/SubscriptionLoggable.js","../cjs/dist/esm5_for_rollup/internal/util/applyMixins.js","../cjs/dist/esm5_for_rollup/internal/testing/ColdObservable.js","../cjs/dist/esm5_for_rollup/internal/testing/HotObservable.js","../cjs/dist/esm5_for_rollup/internal/testing/TestScheduler.js","../cjs/dist/esm5_for_rollup/internal/ajax/getXHRResponse.js","../cjs/dist/esm5_for_rollup/internal/ajax/AjaxResponse.js","../cjs/dist/esm5_for_rollup/internal/ajax/errors.js","../cjs/dist/esm5_for_rollup/internal/ajax/ajax.js","../cjs/dist/esm5_for_rollup/internal/observable/dom/WebSocketSubject.js","../cjs/dist/esm5_for_rollup/internal/observable/dom/webSocket.js","../cjs/dist/esm5_for_rollup/internal/observable/dom/fetch.js","../cjs/dist/esm5_for_rollup/internal/umd.js"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","export function isFunction(value) {\n return typeof value === 'function';\n}\n//# sourceMappingURL=isFunction.js.map","export function createErrorClass(createImpl) {\n var _super = function (instance) {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n var ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n//# sourceMappingURL=createErrorClass.js.map","import { createErrorClass } from './createErrorClass';\nexport var UnsubscriptionError = createErrorClass(function (_super) {\n return function UnsubscriptionErrorImpl(errors) {\n _super(this);\n this.message = errors\n ? errors.length + \" errors occurred during unsubscription:\\n\" + errors.map(function (err, i) { return i + 1 + \") \" + err.toString(); }).join('\\n ')\n : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n };\n});\n//# sourceMappingURL=UnsubscriptionError.js.map","export function arrRemove(arr, item) {\n if (arr) {\n var index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n//# sourceMappingURL=arrRemove.js.map","import { __read, __spreadArray, __values } from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { arrRemove } from './util/arrRemove';\nvar Subscription = (function () {\n function Subscription(initialTeardown) {\n this.initialTeardown = initialTeardown;\n this.closed = false;\n this._parentage = null;\n this._finalizers = null;\n }\n Subscription.prototype.unsubscribe = function () {\n var e_1, _a, e_2, _b;\n var errors;\n if (!this.closed) {\n this.closed = true;\n var _parentage = this._parentage;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n try {\n for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {\n var parent_1 = _parentage_1_1.value;\n parent_1.remove(this);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n else {\n _parentage.remove(this);\n }\n }\n var initialFinalizer = this.initialTeardown;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n }\n catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n var _finalizers = this._finalizers;\n if (_finalizers) {\n this._finalizers = null;\n try {\n for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) {\n var finalizer = _finalizers_1_1.value;\n try {\n execFinalizer(finalizer);\n }\n catch (err) {\n errors = errors !== null && errors !== void 0 ? errors : [];\n if (err instanceof UnsubscriptionError) {\n errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors));\n }\n else {\n errors.push(err);\n }\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n };\n Subscription.prototype.add = function (teardown) {\n var _a;\n if (teardown && teardown !== this) {\n if (this.closed) {\n execFinalizer(teardown);\n }\n else {\n if (teardown instanceof Subscription) {\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);\n }\n }\n };\n Subscription.prototype._hasParent = function (parent) {\n var _parentage = this._parentage;\n return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n };\n Subscription.prototype._addParent = function (parent) {\n var _parentage = this._parentage;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n };\n Subscription.prototype._removeParent = function (parent) {\n var _parentage = this._parentage;\n if (_parentage === parent) {\n this._parentage = null;\n }\n else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n };\n Subscription.prototype.remove = function (teardown) {\n var _finalizers = this._finalizers;\n _finalizers && arrRemove(_finalizers, teardown);\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n };\n Subscription.EMPTY = (function () {\n var empty = new Subscription();\n empty.closed = true;\n return empty;\n })();\n return Subscription;\n}());\nexport { Subscription };\nexport var EMPTY_SUBSCRIPTION = Subscription.EMPTY;\nexport function isSubscription(value) {\n return (value instanceof Subscription ||\n (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));\n}\nfunction execFinalizer(finalizer) {\n if (isFunction(finalizer)) {\n finalizer();\n }\n else {\n finalizer.unsubscribe();\n }\n}\n//# sourceMappingURL=Subscription.js.map","export var config = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false,\n};\n//# sourceMappingURL=config.js.map","import { __read, __spreadArray } from \"tslib\";\nexport var timeoutProvider = {\n setTimeout: function (handler, timeout) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n var delegate = timeoutProvider.delegate;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {\n return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args)));\n }\n return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args)));\n },\n clearTimeout: function (handle) {\n var delegate = timeoutProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);\n },\n delegate: undefined,\n};\n//# sourceMappingURL=timeoutProvider.js.map","import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\nexport function reportUnhandledError(err) {\n timeoutProvider.setTimeout(function () {\n var onUnhandledError = config.onUnhandledError;\n if (onUnhandledError) {\n onUnhandledError(err);\n }\n else {\n throw err;\n }\n });\n}\n//# sourceMappingURL=reportUnhandledError.js.map","export function noop() { }\n//# sourceMappingURL=noop.js.map","export var COMPLETE_NOTIFICATION = (function () { return createNotification('C', undefined, undefined); })();\nexport function errorNotification(error) {\n return createNotification('E', undefined, error);\n}\nexport function nextNotification(value) {\n return createNotification('N', value, undefined);\n}\nexport function createNotification(kind, value, error) {\n return {\n kind: kind,\n value: value,\n error: error,\n };\n}\n//# sourceMappingURL=NotificationFactories.js.map","import { config } from '../config';\nvar context = null;\nexport function errorContext(cb) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n var isRoot = !context;\n if (isRoot) {\n context = { errorThrown: false, error: null };\n }\n cb();\n if (isRoot) {\n var _a = context, errorThrown = _a.errorThrown, error = _a.error;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n }\n else {\n cb();\n }\n}\nexport function captureError(err) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n//# sourceMappingURL=errorContext.js.map","import { __extends } from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\nvar Subscriber = (function (_super) {\n __extends(Subscriber, _super);\n function Subscriber(destination) {\n var _this = _super.call(this) || this;\n _this.isStopped = false;\n if (destination) {\n _this.destination = destination;\n if (isSubscription(destination)) {\n destination.add(_this);\n }\n }\n else {\n _this.destination = EMPTY_OBSERVER;\n }\n return _this;\n }\n Subscriber.create = function (next, error, complete) {\n return new SafeSubscriber(next, error, complete);\n };\n Subscriber.prototype.next = function (value) {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n }\n else {\n this._next(value);\n }\n };\n Subscriber.prototype.error = function (err) {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n }\n else {\n this.isStopped = true;\n this._error(err);\n }\n };\n Subscriber.prototype.complete = function () {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n }\n else {\n this.isStopped = true;\n this._complete();\n }\n };\n Subscriber.prototype.unsubscribe = function () {\n if (!this.closed) {\n this.isStopped = true;\n _super.prototype.unsubscribe.call(this);\n this.destination = null;\n }\n };\n Subscriber.prototype._next = function (value) {\n this.destination.next(value);\n };\n Subscriber.prototype._error = function (err) {\n try {\n this.destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n };\n Subscriber.prototype._complete = function () {\n try {\n this.destination.complete();\n }\n finally {\n this.unsubscribe();\n }\n };\n return Subscriber;\n}(Subscription));\nexport { Subscriber };\nvar _bind = Function.prototype.bind;\nfunction bind(fn, thisArg) {\n return _bind.call(fn, thisArg);\n}\nvar ConsumerObserver = (function () {\n function ConsumerObserver(partialObserver) {\n this.partialObserver = partialObserver;\n }\n ConsumerObserver.prototype.next = function (value) {\n var partialObserver = this.partialObserver;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n };\n ConsumerObserver.prototype.error = function (err) {\n var partialObserver = this.partialObserver;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n else {\n handleUnhandledError(err);\n }\n };\n ConsumerObserver.prototype.complete = function () {\n var partialObserver = this.partialObserver;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n };\n return ConsumerObserver;\n}());\nvar SafeSubscriber = (function (_super) {\n __extends(SafeSubscriber, _super);\n function SafeSubscriber(observerOrNext, error, complete) {\n var _this = _super.call(this) || this;\n var partialObserver;\n if (isFunction(observerOrNext) || !observerOrNext) {\n partialObserver = {\n next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined),\n error: error !== null && error !== void 0 ? error : undefined,\n complete: complete !== null && complete !== void 0 ? complete : undefined,\n };\n }\n else {\n var context_1;\n if (_this && config.useDeprecatedNextContext) {\n context_1 = Object.create(observerOrNext);\n context_1.unsubscribe = function () { return _this.unsubscribe(); };\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context_1),\n error: observerOrNext.error && bind(observerOrNext.error, context_1),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context_1),\n };\n }\n else {\n partialObserver = observerOrNext;\n }\n }\n _this.destination = new ConsumerObserver(partialObserver);\n return _this;\n }\n return SafeSubscriber;\n}(Subscriber));\nexport { SafeSubscriber };\nfunction handleUnhandledError(error) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n }\n else {\n reportUnhandledError(error);\n }\n}\nfunction defaultErrorHandler(err) {\n throw err;\n}\nfunction handleStoppedNotification(notification, subscriber) {\n var onStoppedNotification = config.onStoppedNotification;\n onStoppedNotification && timeoutProvider.setTimeout(function () { return onStoppedNotification(notification, subscriber); });\n}\nexport var EMPTY_OBSERVER = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop,\n};\n//# sourceMappingURL=Subscriber.js.map","export var observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })();\n//# sourceMappingURL=observable.js.map","export function identity(x) {\n return x;\n}\n//# sourceMappingURL=identity.js.map","import { identity } from './identity';\nexport function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i] = arguments[_i];\n }\n return pipeFromArray(fns);\n}\nexport function pipeFromArray(fns) {\n if (fns.length === 0) {\n return identity;\n }\n if (fns.length === 1) {\n return fns[0];\n }\n return function piped(input) {\n return fns.reduce(function (prev, fn) { return fn(prev); }, input);\n };\n}\n//# sourceMappingURL=pipe.js.map","import { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription } from './Subscription';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\nvar Observable = (function () {\n function Observable(subscribe) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n Observable.prototype.lift = function (operator) {\n var observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n };\n Observable.prototype.subscribe = function (observerOrNext, error, complete) {\n var _this = this;\n var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n errorContext(function () {\n var _a = _this, operator = _a.operator, source = _a.source;\n subscriber.add(operator\n ?\n operator.call(subscriber, source)\n : source\n ?\n _this._subscribe(subscriber)\n :\n _this._trySubscribe(subscriber));\n });\n return subscriber;\n };\n Observable.prototype._trySubscribe = function (sink) {\n try {\n return this._subscribe(sink);\n }\n catch (err) {\n sink.error(err);\n }\n };\n Observable.prototype.forEach = function (next, promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var subscriber = new SafeSubscriber({\n next: function (value) {\n try {\n next(value);\n }\n catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve,\n });\n _this.subscribe(subscriber);\n });\n };\n Observable.prototype._subscribe = function (subscriber) {\n var _a;\n return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);\n };\n Observable.prototype[Symbol_observable] = function () {\n return this;\n };\n Observable.prototype.pipe = function () {\n var operations = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n operations[_i] = arguments[_i];\n }\n return pipeFromArray(operations)(this);\n };\n Observable.prototype.toPromise = function (promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var value;\n _this.subscribe(function (x) { return (value = x); }, function (err) { return reject(err); }, function () { return resolve(value); });\n });\n };\n Observable.create = function (subscribe) {\n return new Observable(subscribe);\n };\n return Observable;\n}());\nexport { Observable };\nfunction getPromiseCtor(promiseCtor) {\n var _a;\n return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;\n}\nfunction isObserver(value) {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\nfunction isSubscriber(value) {\n return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n//# sourceMappingURL=Observable.js.map","import { isFunction } from './isFunction';\nexport function hasLift(source) {\n return isFunction(source === null || source === void 0 ? void 0 : source.lift);\n}\nexport function operate(init) {\n return function (source) {\n if (hasLift(source)) {\n return source.lift(function (liftedSource) {\n try {\n return init(liftedSource, this);\n }\n catch (err) {\n this.error(err);\n }\n });\n }\n throw new TypeError('Unable to lift unknown Observable type');\n };\n}\n//# sourceMappingURL=lift.js.map","import { __extends } from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) {\n return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);\n}\nvar OperatorSubscriber = (function (_super) {\n __extends(OperatorSubscriber, _super);\n function OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {\n var _this = _super.call(this, destination) || this;\n _this.onFinalize = onFinalize;\n _this.shouldUnsubscribe = shouldUnsubscribe;\n _this._next = onNext\n ? function (value) {\n try {\n onNext(value);\n }\n catch (err) {\n destination.error(err);\n }\n }\n : _super.prototype._next;\n _this._error = onError\n ? function (err) {\n try {\n onError(err);\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : _super.prototype._error;\n _this._complete = onComplete\n ? function () {\n try {\n onComplete();\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : _super.prototype._complete;\n return _this;\n }\n OperatorSubscriber.prototype.unsubscribe = function () {\n var _a;\n if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {\n var closed_1 = this.closed;\n _super.prototype.unsubscribe.call(this);\n !closed_1 && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));\n }\n };\n return OperatorSubscriber;\n}(Subscriber));\nexport { OperatorSubscriber };\n//# sourceMappingURL=OperatorSubscriber.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function refCount() {\n return operate(function (source, subscriber) {\n var connection = null;\n source._refCount++;\n var refCounter = createOperatorSubscriber(subscriber, undefined, undefined, undefined, function () {\n if (!source || source._refCount <= 0 || 0 < --source._refCount) {\n connection = null;\n return;\n }\n var sharedConnection = source._connection;\n var conn = connection;\n connection = null;\n if (sharedConnection && (!conn || sharedConnection === conn)) {\n sharedConnection.unsubscribe();\n }\n subscriber.unsubscribe();\n });\n source.subscribe(refCounter);\n if (!refCounter.closed) {\n connection = source.connect();\n }\n });\n}\n//# sourceMappingURL=refCount.js.map","import { __extends } from \"tslib\";\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { refCount as higherOrderRefCount } from '../operators/refCount';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { hasLift } from '../util/lift';\nvar ConnectableObservable = (function (_super) {\n __extends(ConnectableObservable, _super);\n function ConnectableObservable(source, subjectFactory) {\n var _this = _super.call(this) || this;\n _this.source = source;\n _this.subjectFactory = subjectFactory;\n _this._subject = null;\n _this._refCount = 0;\n _this._connection = null;\n if (hasLift(source)) {\n _this.lift = source.lift;\n }\n return _this;\n }\n ConnectableObservable.prototype._subscribe = function (subscriber) {\n return this.getSubject().subscribe(subscriber);\n };\n ConnectableObservable.prototype.getSubject = function () {\n var subject = this._subject;\n if (!subject || subject.isStopped) {\n this._subject = this.subjectFactory();\n }\n return this._subject;\n };\n ConnectableObservable.prototype._teardown = function () {\n this._refCount = 0;\n var _connection = this._connection;\n this._subject = this._connection = null;\n _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe();\n };\n ConnectableObservable.prototype.connect = function () {\n var _this = this;\n var connection = this._connection;\n if (!connection) {\n connection = this._connection = new Subscription();\n var subject_1 = this.getSubject();\n connection.add(this.source.subscribe(createOperatorSubscriber(subject_1, undefined, function () {\n _this._teardown();\n subject_1.complete();\n }, function (err) {\n _this._teardown();\n subject_1.error(err);\n }, function () { return _this._teardown(); })));\n if (connection.closed) {\n this._connection = null;\n connection = Subscription.EMPTY;\n }\n }\n return connection;\n };\n ConnectableObservable.prototype.refCount = function () {\n return higherOrderRefCount()(this);\n };\n return ConnectableObservable;\n}(Observable));\nexport { ConnectableObservable };\n//# sourceMappingURL=ConnectableObservable.js.map","export var performanceTimestampProvider = {\n now: function () {\n return (performanceTimestampProvider.delegate || performance).now();\n },\n delegate: undefined,\n};\n//# sourceMappingURL=performanceTimestampProvider.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { Subscription } from '../Subscription';\nexport var animationFrameProvider = {\n schedule: function (callback) {\n var request = requestAnimationFrame;\n var cancel = cancelAnimationFrame;\n var delegate = animationFrameProvider.delegate;\n if (delegate) {\n request = delegate.requestAnimationFrame;\n cancel = delegate.cancelAnimationFrame;\n }\n var handle = request(function (timestamp) {\n cancel = undefined;\n callback(timestamp);\n });\n return new Subscription(function () { return cancel === null || cancel === void 0 ? void 0 : cancel(handle); });\n },\n requestAnimationFrame: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var delegate = animationFrameProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame).apply(void 0, __spreadArray([], __read(args)));\n },\n cancelAnimationFrame: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var delegate = animationFrameProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame).apply(void 0, __spreadArray([], __read(args)));\n },\n delegate: undefined,\n};\n//# sourceMappingURL=animationFrameProvider.js.map","import { Observable } from '../../Observable';\nimport { performanceTimestampProvider } from '../../scheduler/performanceTimestampProvider';\nimport { animationFrameProvider } from '../../scheduler/animationFrameProvider';\nexport function animationFrames(timestampProvider) {\n return timestampProvider ? animationFramesFactory(timestampProvider) : DEFAULT_ANIMATION_FRAMES;\n}\nfunction animationFramesFactory(timestampProvider) {\n return new Observable(function (subscriber) {\n var provider = timestampProvider || performanceTimestampProvider;\n var start = provider.now();\n var id = 0;\n var run = function () {\n if (!subscriber.closed) {\n id = animationFrameProvider.requestAnimationFrame(function (timestamp) {\n id = 0;\n var now = provider.now();\n subscriber.next({\n timestamp: timestampProvider ? now : timestamp,\n elapsed: now - start,\n });\n run();\n });\n }\n };\n run();\n return function () {\n if (id) {\n animationFrameProvider.cancelAnimationFrame(id);\n }\n };\n });\n}\nvar DEFAULT_ANIMATION_FRAMES = animationFramesFactory();\n//# sourceMappingURL=animationFrames.js.map","import { createErrorClass } from './createErrorClass';\nexport var ObjectUnsubscribedError = createErrorClass(function (_super) {\n return function ObjectUnsubscribedErrorImpl() {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n };\n});\n//# sourceMappingURL=ObjectUnsubscribedError.js.map","import { __extends, __values } from \"tslib\";\nimport { Observable } from './Observable';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\nvar Subject = (function (_super) {\n __extends(Subject, _super);\n function Subject() {\n var _this = _super.call(this) || this;\n _this.closed = false;\n _this.currentObservers = null;\n _this.observers = [];\n _this.isStopped = false;\n _this.hasError = false;\n _this.thrownError = null;\n return _this;\n }\n Subject.prototype.lift = function (operator) {\n var subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n };\n Subject.prototype._throwIfClosed = function () {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n };\n Subject.prototype.next = function (value) {\n var _this = this;\n errorContext(function () {\n var e_1, _a;\n _this._throwIfClosed();\n if (!_this.isStopped) {\n if (!_this.currentObservers) {\n _this.currentObservers = Array.from(_this.observers);\n }\n try {\n for (var _b = __values(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) {\n var observer = _c.value;\n observer.next(value);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n });\n };\n Subject.prototype.error = function (err) {\n var _this = this;\n errorContext(function () {\n _this._throwIfClosed();\n if (!_this.isStopped) {\n _this.hasError = _this.isStopped = true;\n _this.thrownError = err;\n var observers = _this.observers;\n while (observers.length) {\n observers.shift().error(err);\n }\n }\n });\n };\n Subject.prototype.complete = function () {\n var _this = this;\n errorContext(function () {\n _this._throwIfClosed();\n if (!_this.isStopped) {\n _this.isStopped = true;\n var observers = _this.observers;\n while (observers.length) {\n observers.shift().complete();\n }\n }\n });\n };\n Subject.prototype.unsubscribe = function () {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null;\n };\n Object.defineProperty(Subject.prototype, \"observed\", {\n get: function () {\n var _a;\n return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;\n },\n enumerable: false,\n configurable: true\n });\n Subject.prototype._trySubscribe = function (subscriber) {\n this._throwIfClosed();\n return _super.prototype._trySubscribe.call(this, subscriber);\n };\n Subject.prototype._subscribe = function (subscriber) {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n };\n Subject.prototype._innerSubscribe = function (subscriber) {\n var _this = this;\n var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(function () {\n _this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n };\n Subject.prototype._checkFinalizedStatuses = function (subscriber) {\n var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped;\n if (hasError) {\n subscriber.error(thrownError);\n }\n else if (isStopped) {\n subscriber.complete();\n }\n };\n Subject.prototype.asObservable = function () {\n var observable = new Observable();\n observable.source = this;\n return observable;\n };\n Subject.create = function (destination, source) {\n return new AnonymousSubject(destination, source);\n };\n return Subject;\n}(Observable));\nexport { Subject };\nvar AnonymousSubject = (function (_super) {\n __extends(AnonymousSubject, _super);\n function AnonymousSubject(destination, source) {\n var _this = _super.call(this) || this;\n _this.destination = destination;\n _this.source = source;\n return _this;\n }\n AnonymousSubject.prototype.next = function (value) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n };\n AnonymousSubject.prototype.error = function (err) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n };\n AnonymousSubject.prototype.complete = function () {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);\n };\n AnonymousSubject.prototype._subscribe = function (subscriber) {\n var _a, _b;\n return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;\n };\n return AnonymousSubject;\n}(Subject));\nexport { AnonymousSubject };\n//# sourceMappingURL=Subject.js.map","import { __extends } from \"tslib\";\nimport { Subject } from './Subject';\nvar BehaviorSubject = (function (_super) {\n __extends(BehaviorSubject, _super);\n function BehaviorSubject(_value) {\n var _this = _super.call(this) || this;\n _this._value = _value;\n return _this;\n }\n Object.defineProperty(BehaviorSubject.prototype, \"value\", {\n get: function () {\n return this.getValue();\n },\n enumerable: false,\n configurable: true\n });\n BehaviorSubject.prototype._subscribe = function (subscriber) {\n var subscription = _super.prototype._subscribe.call(this, subscriber);\n !subscription.closed && subscriber.next(this._value);\n return subscription;\n };\n BehaviorSubject.prototype.getValue = function () {\n var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, _value = _a._value;\n if (hasError) {\n throw thrownError;\n }\n this._throwIfClosed();\n return _value;\n };\n BehaviorSubject.prototype.next = function (value) {\n _super.prototype.next.call(this, (this._value = value));\n };\n return BehaviorSubject;\n}(Subject));\nexport { BehaviorSubject };\n//# sourceMappingURL=BehaviorSubject.js.map","export var dateTimestampProvider = {\n now: function () {\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined,\n};\n//# sourceMappingURL=dateTimestampProvider.js.map","import { __extends } from \"tslib\";\nimport { Subject } from './Subject';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nvar ReplaySubject = (function (_super) {\n __extends(ReplaySubject, _super);\n function ReplaySubject(_bufferSize, _windowTime, _timestampProvider) {\n if (_bufferSize === void 0) { _bufferSize = Infinity; }\n if (_windowTime === void 0) { _windowTime = Infinity; }\n if (_timestampProvider === void 0) { _timestampProvider = dateTimestampProvider; }\n var _this = _super.call(this) || this;\n _this._bufferSize = _bufferSize;\n _this._windowTime = _windowTime;\n _this._timestampProvider = _timestampProvider;\n _this._buffer = [];\n _this._infiniteTimeWindow = true;\n _this._infiniteTimeWindow = _windowTime === Infinity;\n _this._bufferSize = Math.max(1, _bufferSize);\n _this._windowTime = Math.max(1, _windowTime);\n return _this;\n }\n ReplaySubject.prototype.next = function (value) {\n var _a = this, isStopped = _a.isStopped, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow, _timestampProvider = _a._timestampProvider, _windowTime = _a._windowTime;\n if (!isStopped) {\n _buffer.push(value);\n !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);\n }\n this._trimBuffer();\n _super.prototype.next.call(this, value);\n };\n ReplaySubject.prototype._subscribe = function (subscriber) {\n this._throwIfClosed();\n this._trimBuffer();\n var subscription = this._innerSubscribe(subscriber);\n var _a = this, _infiniteTimeWindow = _a._infiniteTimeWindow, _buffer = _a._buffer;\n var copy = _buffer.slice();\n for (var i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {\n subscriber.next(copy[i]);\n }\n this._checkFinalizedStatuses(subscriber);\n return subscription;\n };\n ReplaySubject.prototype._trimBuffer = function () {\n var _a = this, _bufferSize = _a._bufferSize, _timestampProvider = _a._timestampProvider, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow;\n var adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;\n _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);\n if (!_infiniteTimeWindow) {\n var now = _timestampProvider.now();\n var last = 0;\n for (var i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) {\n last = i;\n }\n last && _buffer.splice(0, last + 1);\n }\n };\n return ReplaySubject;\n}(Subject));\nexport { ReplaySubject };\n//# sourceMappingURL=ReplaySubject.js.map","import { __extends } from \"tslib\";\nimport { Subject } from './Subject';\nvar AsyncSubject = (function (_super) {\n __extends(AsyncSubject, _super);\n function AsyncSubject() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._value = null;\n _this._hasValue = false;\n _this._isComplete = false;\n return _this;\n }\n AsyncSubject.prototype._checkFinalizedStatuses = function (subscriber) {\n var _a = this, hasError = _a.hasError, _hasValue = _a._hasValue, _value = _a._value, thrownError = _a.thrownError, isStopped = _a.isStopped, _isComplete = _a._isComplete;\n if (hasError) {\n subscriber.error(thrownError);\n }\n else if (isStopped || _isComplete) {\n _hasValue && subscriber.next(_value);\n subscriber.complete();\n }\n };\n AsyncSubject.prototype.next = function (value) {\n if (!this.isStopped) {\n this._value = value;\n this._hasValue = true;\n }\n };\n AsyncSubject.prototype.complete = function () {\n var _a = this, _hasValue = _a._hasValue, _value = _a._value, _isComplete = _a._isComplete;\n if (!_isComplete) {\n this._isComplete = true;\n _hasValue && _super.prototype.next.call(this, _value);\n _super.prototype.complete.call(this);\n }\n };\n return AsyncSubject;\n}(Subject));\nexport { AsyncSubject };\n//# sourceMappingURL=AsyncSubject.js.map","import { __extends } from \"tslib\";\nimport { Subscription } from '../Subscription';\nvar Action = (function (_super) {\n __extends(Action, _super);\n function Action(scheduler, work) {\n return _super.call(this) || this;\n }\n Action.prototype.schedule = function (state, delay) {\n if (delay === void 0) { delay = 0; }\n return this;\n };\n return Action;\n}(Subscription));\nexport { Action };\n//# sourceMappingURL=Action.js.map","import { __read, __spreadArray } from \"tslib\";\nexport var intervalProvider = {\n setInterval: function (handler, timeout) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n var delegate = intervalProvider.delegate;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) {\n return delegate.setInterval.apply(delegate, __spreadArray([handler, timeout], __read(args)));\n }\n return setInterval.apply(void 0, __spreadArray([handler, timeout], __read(args)));\n },\n clearInterval: function (handle) {\n var delegate = intervalProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle);\n },\n delegate: undefined,\n};\n//# sourceMappingURL=intervalProvider.js.map","import { __extends } from \"tslib\";\nimport { Action } from './Action';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\nvar AsyncAction = (function (_super) {\n __extends(AsyncAction, _super);\n function AsyncAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n _this.pending = false;\n return _this;\n }\n AsyncAction.prototype.schedule = function (state, delay) {\n var _a;\n if (delay === void 0) { delay = 0; }\n if (this.closed) {\n return this;\n }\n this.state = state;\n var id = this.id;\n var scheduler = this.scheduler;\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n this.pending = true;\n this.delay = delay;\n this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay);\n return this;\n };\n AsyncAction.prototype.requestAsyncId = function (scheduler, _id, delay) {\n if (delay === void 0) { delay = 0; }\n return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);\n };\n AsyncAction.prototype.recycleAsyncId = function (_scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n if (delay != null && this.delay === delay && this.pending === false) {\n return id;\n }\n if (id != null) {\n intervalProvider.clearInterval(id);\n }\n return undefined;\n };\n AsyncAction.prototype.execute = function (state, delay) {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n this.pending = false;\n var error = this._execute(state, delay);\n if (error) {\n return error;\n }\n else if (this.pending === false && this.id != null) {\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n };\n AsyncAction.prototype._execute = function (state, _delay) {\n var errored = false;\n var errorValue;\n try {\n this.work(state);\n }\n catch (e) {\n errored = true;\n errorValue = e ? e : new Error('Scheduled action threw falsy error');\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n };\n AsyncAction.prototype.unsubscribe = function () {\n if (!this.closed) {\n var _a = this, id = _a.id, scheduler = _a.scheduler;\n var actions = scheduler.actions;\n this.work = this.state = this.scheduler = null;\n this.pending = false;\n arrRemove(actions, this);\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n this.delay = null;\n _super.prototype.unsubscribe.call(this);\n }\n };\n return AsyncAction;\n}(Action));\nexport { AsyncAction };\n//# sourceMappingURL=AsyncAction.js.map","var nextHandle = 1;\nvar resolved;\nvar activeHandles = {};\nfunction findAndClearHandle(handle) {\n if (handle in activeHandles) {\n delete activeHandles[handle];\n return true;\n }\n return false;\n}\nexport var Immediate = {\n setImmediate: function (cb) {\n var handle = nextHandle++;\n activeHandles[handle] = true;\n if (!resolved) {\n resolved = Promise.resolve();\n }\n resolved.then(function () { return findAndClearHandle(handle) && cb(); });\n return handle;\n },\n clearImmediate: function (handle) {\n findAndClearHandle(handle);\n },\n};\nexport var TestTools = {\n pending: function () {\n return Object.keys(activeHandles).length;\n }\n};\n//# sourceMappingURL=Immediate.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { Immediate } from '../util/Immediate';\nvar setImmediate = Immediate.setImmediate, clearImmediate = Immediate.clearImmediate;\nexport var immediateProvider = {\n setImmediate: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var delegate = immediateProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate).apply(void 0, __spreadArray([], __read(args)));\n },\n clearImmediate: function (handle) {\n var delegate = immediateProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate)(handle);\n },\n delegate: undefined,\n};\n//# sourceMappingURL=immediateProvider.js.map","import { __extends } from \"tslib\";\nimport { AsyncAction } from './AsyncAction';\nimport { immediateProvider } from './immediateProvider';\nvar AsapAction = (function (_super) {\n __extends(AsapAction, _super);\n function AsapAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n return _this;\n }\n AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n if (delay !== null && delay > 0) {\n return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n }\n scheduler.actions.push(this);\n return scheduler._scheduled || (scheduler._scheduled = immediateProvider.setImmediate(scheduler.flush.bind(scheduler, undefined)));\n };\n AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n var _a;\n if (delay === void 0) { delay = 0; }\n if (delay != null ? delay > 0 : this.delay > 0) {\n return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);\n }\n var actions = scheduler.actions;\n if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) {\n immediateProvider.clearImmediate(id);\n if (scheduler._scheduled === id) {\n scheduler._scheduled = undefined;\n }\n }\n return undefined;\n };\n return AsapAction;\n}(AsyncAction));\nexport { AsapAction };\n//# sourceMappingURL=AsapAction.js.map","import { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nvar Scheduler = (function () {\n function Scheduler(schedulerActionCtor, now) {\n if (now === void 0) { now = Scheduler.now; }\n this.schedulerActionCtor = schedulerActionCtor;\n this.now = now;\n }\n Scheduler.prototype.schedule = function (work, delay, state) {\n if (delay === void 0) { delay = 0; }\n return new this.schedulerActionCtor(this, work).schedule(state, delay);\n };\n Scheduler.now = dateTimestampProvider.now;\n return Scheduler;\n}());\nexport { Scheduler };\n//# sourceMappingURL=Scheduler.js.map","import { __extends } from \"tslib\";\nimport { Scheduler } from '../Scheduler';\nvar AsyncScheduler = (function (_super) {\n __extends(AsyncScheduler, _super);\n function AsyncScheduler(SchedulerAction, now) {\n if (now === void 0) { now = Scheduler.now; }\n var _this = _super.call(this, SchedulerAction, now) || this;\n _this.actions = [];\n _this._active = false;\n return _this;\n }\n AsyncScheduler.prototype.flush = function (action) {\n var actions = this.actions;\n if (this._active) {\n actions.push(action);\n return;\n }\n var error;\n this._active = true;\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions.shift()));\n this._active = false;\n if (error) {\n while ((action = actions.shift())) {\n action.unsubscribe();\n }\n throw error;\n }\n };\n return AsyncScheduler;\n}(Scheduler));\nexport { AsyncScheduler };\n//# sourceMappingURL=AsyncScheduler.js.map","import { __extends } from \"tslib\";\nimport { AsyncScheduler } from './AsyncScheduler';\nvar AsapScheduler = (function (_super) {\n __extends(AsapScheduler, _super);\n function AsapScheduler() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AsapScheduler.prototype.flush = function (action) {\n this._active = true;\n var flushId = this._scheduled;\n this._scheduled = undefined;\n var actions = this.actions;\n var error;\n action = action || actions.shift();\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions[0]) && action.id === flushId && actions.shift());\n this._active = false;\n if (error) {\n while ((action = actions[0]) && action.id === flushId && actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n };\n return AsapScheduler;\n}(AsyncScheduler));\nexport { AsapScheduler };\n//# sourceMappingURL=AsapScheduler.js.map","import { AsapAction } from './AsapAction';\nimport { AsapScheduler } from './AsapScheduler';\nexport var asapScheduler = new AsapScheduler(AsapAction);\nexport var asap = asapScheduler;\n//# sourceMappingURL=asap.js.map","import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport var asyncScheduler = new AsyncScheduler(AsyncAction);\nexport var async = asyncScheduler;\n//# sourceMappingURL=async.js.map","import { __extends } from \"tslib\";\nimport { AsyncAction } from './AsyncAction';\nvar QueueAction = (function (_super) {\n __extends(QueueAction, _super);\n function QueueAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n return _this;\n }\n QueueAction.prototype.schedule = function (state, delay) {\n if (delay === void 0) { delay = 0; }\n if (delay > 0) {\n return _super.prototype.schedule.call(this, state, delay);\n }\n this.delay = delay;\n this.state = state;\n this.scheduler.flush(this);\n return this;\n };\n QueueAction.prototype.execute = function (state, delay) {\n return delay > 0 || this.closed ? _super.prototype.execute.call(this, state, delay) : this._execute(state, delay);\n };\n QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) {\n return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n }\n scheduler.flush(this);\n return 0;\n };\n return QueueAction;\n}(AsyncAction));\nexport { QueueAction };\n//# sourceMappingURL=QueueAction.js.map","import { __extends } from \"tslib\";\nimport { AsyncScheduler } from './AsyncScheduler';\nvar QueueScheduler = (function (_super) {\n __extends(QueueScheduler, _super);\n function QueueScheduler() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return QueueScheduler;\n}(AsyncScheduler));\nexport { QueueScheduler };\n//# sourceMappingURL=QueueScheduler.js.map","import { QueueAction } from './QueueAction';\nimport { QueueScheduler } from './QueueScheduler';\nexport var queueScheduler = new QueueScheduler(QueueAction);\nexport var queue = queueScheduler;\n//# sourceMappingURL=queue.js.map","import { __extends } from \"tslib\";\nimport { AsyncAction } from './AsyncAction';\nimport { animationFrameProvider } from './animationFrameProvider';\nvar AnimationFrameAction = (function (_super) {\n __extends(AnimationFrameAction, _super);\n function AnimationFrameAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n return _this;\n }\n AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n if (delay !== null && delay > 0) {\n return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n }\n scheduler.actions.push(this);\n return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(function () { return scheduler.flush(undefined); }));\n };\n AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n var _a;\n if (delay === void 0) { delay = 0; }\n if (delay != null ? delay > 0 : this.delay > 0) {\n return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);\n }\n var actions = scheduler.actions;\n if (id != null && id === scheduler._scheduled && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) {\n animationFrameProvider.cancelAnimationFrame(id);\n scheduler._scheduled = undefined;\n }\n return undefined;\n };\n return AnimationFrameAction;\n}(AsyncAction));\nexport { AnimationFrameAction };\n//# sourceMappingURL=AnimationFrameAction.js.map","import { __extends } from \"tslib\";\nimport { AsyncScheduler } from './AsyncScheduler';\nvar AnimationFrameScheduler = (function (_super) {\n __extends(AnimationFrameScheduler, _super);\n function AnimationFrameScheduler() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AnimationFrameScheduler.prototype.flush = function (action) {\n this._active = true;\n var flushId;\n if (action) {\n flushId = action.id;\n }\n else {\n flushId = this._scheduled;\n this._scheduled = undefined;\n }\n var actions = this.actions;\n var error;\n action = action || actions.shift();\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions[0]) && action.id === flushId && actions.shift());\n this._active = false;\n if (error) {\n while ((action = actions[0]) && action.id === flushId && actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n };\n return AnimationFrameScheduler;\n}(AsyncScheduler));\nexport { AnimationFrameScheduler };\n//# sourceMappingURL=AnimationFrameScheduler.js.map","import { AnimationFrameAction } from './AnimationFrameAction';\nimport { AnimationFrameScheduler } from './AnimationFrameScheduler';\nexport var animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction);\nexport var animationFrame = animationFrameScheduler;\n//# sourceMappingURL=animationFrame.js.map","import { __extends } from \"tslib\";\nimport { AsyncAction } from './AsyncAction';\nimport { Subscription } from '../Subscription';\nimport { AsyncScheduler } from './AsyncScheduler';\nvar VirtualTimeScheduler = (function (_super) {\n __extends(VirtualTimeScheduler, _super);\n function VirtualTimeScheduler(schedulerActionCtor, maxFrames) {\n if (schedulerActionCtor === void 0) { schedulerActionCtor = VirtualAction; }\n if (maxFrames === void 0) { maxFrames = Infinity; }\n var _this = _super.call(this, schedulerActionCtor, function () { return _this.frame; }) || this;\n _this.maxFrames = maxFrames;\n _this.frame = 0;\n _this.index = -1;\n return _this;\n }\n VirtualTimeScheduler.prototype.flush = function () {\n var _a = this, actions = _a.actions, maxFrames = _a.maxFrames;\n var error;\n var action;\n while ((action = actions[0]) && action.delay <= maxFrames) {\n actions.shift();\n this.frame = action.delay;\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n }\n if (error) {\n while ((action = actions.shift())) {\n action.unsubscribe();\n }\n throw error;\n }\n };\n VirtualTimeScheduler.frameTimeFactor = 10;\n return VirtualTimeScheduler;\n}(AsyncScheduler));\nexport { VirtualTimeScheduler };\nvar VirtualAction = (function (_super) {\n __extends(VirtualAction, _super);\n function VirtualAction(scheduler, work, index) {\n if (index === void 0) { index = (scheduler.index += 1); }\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n _this.index = index;\n _this.active = true;\n _this.index = scheduler.index = index;\n return _this;\n }\n VirtualAction.prototype.schedule = function (state, delay) {\n if (delay === void 0) { delay = 0; }\n if (Number.isFinite(delay)) {\n if (!this.id) {\n return _super.prototype.schedule.call(this, state, delay);\n }\n this.active = false;\n var action = new VirtualAction(this.scheduler, this.work);\n this.add(action);\n return action.schedule(state, delay);\n }\n else {\n return Subscription.EMPTY;\n }\n };\n VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n this.delay = scheduler.frame + delay;\n var actions = scheduler.actions;\n actions.push(this);\n actions.sort(VirtualAction.sortActions);\n return 1;\n };\n VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n return undefined;\n };\n VirtualAction.prototype._execute = function (state, delay) {\n if (this.active === true) {\n return _super.prototype._execute.call(this, state, delay);\n }\n };\n VirtualAction.sortActions = function (a, b) {\n if (a.delay === b.delay) {\n if (a.index === b.index) {\n return 0;\n }\n else if (a.index > b.index) {\n return 1;\n }\n else {\n return -1;\n }\n }\n else if (a.delay > b.delay) {\n return 1;\n }\n else {\n return -1;\n }\n };\n return VirtualAction;\n}(AsyncAction));\nexport { VirtualAction };\n//# sourceMappingURL=VirtualTimeScheduler.js.map","import { Observable } from '../Observable';\nexport var EMPTY = new Observable(function (subscriber) { return subscriber.complete(); });\nexport function empty(scheduler) {\n return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\nfunction emptyScheduled(scheduler) {\n return new Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });\n}\n//# sourceMappingURL=empty.js.map","import { isFunction } from './isFunction';\nexport function isScheduler(value) {\n return value && isFunction(value.schedule);\n}\n//# sourceMappingURL=isScheduler.js.map","import { isFunction } from './isFunction';\nimport { isScheduler } from './isScheduler';\nfunction last(arr) {\n return arr[arr.length - 1];\n}\nexport function popResultSelector(args) {\n return isFunction(last(args)) ? args.pop() : undefined;\n}\nexport function popScheduler(args) {\n return isScheduler(last(args)) ? args.pop() : undefined;\n}\nexport function popNumber(args, defaultValue) {\n return typeof last(args) === 'number' ? args.pop() : defaultValue;\n}\n//# sourceMappingURL=args.js.map","export var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; });\n//# sourceMappingURL=isArrayLike.js.map","import { isFunction } from \"./isFunction\";\nexport function isPromise(value) {\n return isFunction(value === null || value === void 0 ? void 0 : value.then);\n}\n//# sourceMappingURL=isPromise.js.map","import { observable as Symbol_observable } from '../symbol/observable';\nimport { isFunction } from './isFunction';\nexport function isInteropObservable(input) {\n return isFunction(input[Symbol_observable]);\n}\n//# sourceMappingURL=isInteropObservable.js.map","import { isFunction } from './isFunction';\nexport function isAsyncIterable(obj) {\n return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);\n}\n//# sourceMappingURL=isAsyncIterable.js.map","export function createInvalidObservableTypeError(input) {\n return new TypeError(\"You provided \" + (input !== null && typeof input === 'object' ? 'an invalid object' : \"'\" + input + \"'\") + \" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.\");\n}\n//# sourceMappingURL=throwUnobservableError.js.map","export function getSymbolIterator() {\n if (typeof Symbol !== 'function' || !Symbol.iterator) {\n return '@@iterator';\n }\n return Symbol.iterator;\n}\nexport var iterator = getSymbolIterator();\n//# sourceMappingURL=iterator.js.map","import { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from './isFunction';\nexport function isIterable(input) {\n return isFunction(input === null || input === void 0 ? void 0 : input[Symbol_iterator]);\n}\n//# sourceMappingURL=isIterable.js.map","import { __asyncGenerator, __await, __generator } from \"tslib\";\nimport { isFunction } from './isFunction';\nexport function readableStreamLikeToAsyncGenerator(readableStream) {\n return __asyncGenerator(this, arguments, function readableStreamLikeToAsyncGenerator_1() {\n var reader, _a, value, done;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n reader = readableStream.getReader();\n _b.label = 1;\n case 1:\n _b.trys.push([1, , 9, 10]);\n _b.label = 2;\n case 2:\n if (!true) return [3, 8];\n return [4, __await(reader.read())];\n case 3:\n _a = _b.sent(), value = _a.value, done = _a.done;\n if (!done) return [3, 5];\n return [4, __await(void 0)];\n case 4: return [2, _b.sent()];\n case 5: return [4, __await(value)];\n case 6: return [4, _b.sent()];\n case 7:\n _b.sent();\n return [3, 2];\n case 8: return [3, 10];\n case 9:\n reader.releaseLock();\n return [7];\n case 10: return [2];\n }\n });\n });\n}\nexport function isReadableStreamLike(obj) {\n return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader);\n}\n//# sourceMappingURL=isReadableStreamLike.js.map","import { __asyncValues, __awaiter, __generator, __values } from \"tslib\";\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isPromise } from '../util/isPromise';\nimport { Observable } from '../Observable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isIterable } from '../util/isIterable';\nimport { isReadableStreamLike, readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nimport { isFunction } from '../util/isFunction';\nimport { reportUnhandledError } from '../util/reportUnhandledError';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function innerFrom(input) {\n if (input instanceof Observable) {\n return input;\n }\n if (input != null) {\n if (isInteropObservable(input)) {\n return fromInteropObservable(input);\n }\n if (isArrayLike(input)) {\n return fromArrayLike(input);\n }\n if (isPromise(input)) {\n return fromPromise(input);\n }\n if (isAsyncIterable(input)) {\n return fromAsyncIterable(input);\n }\n if (isIterable(input)) {\n return fromIterable(input);\n }\n if (isReadableStreamLike(input)) {\n return fromReadableStreamLike(input);\n }\n }\n throw createInvalidObservableTypeError(input);\n}\nexport function fromInteropObservable(obj) {\n return new Observable(function (subscriber) {\n var obs = obj[Symbol_observable]();\n if (isFunction(obs.subscribe)) {\n return obs.subscribe(subscriber);\n }\n throw new TypeError('Provided object does not correctly implement Symbol.observable');\n });\n}\nexport function fromArrayLike(array) {\n return new Observable(function (subscriber) {\n for (var i = 0; i < array.length && !subscriber.closed; i++) {\n subscriber.next(array[i]);\n }\n subscriber.complete();\n });\n}\nexport function fromPromise(promise) {\n return new Observable(function (subscriber) {\n promise\n .then(function (value) {\n if (!subscriber.closed) {\n subscriber.next(value);\n subscriber.complete();\n }\n }, function (err) { return subscriber.error(err); })\n .then(null, reportUnhandledError);\n });\n}\nexport function fromIterable(iterable) {\n return new Observable(function (subscriber) {\n var e_1, _a;\n try {\n for (var iterable_1 = __values(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) {\n var value = iterable_1_1.value;\n subscriber.next(value);\n if (subscriber.closed) {\n return;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return)) _a.call(iterable_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n subscriber.complete();\n });\n}\nexport function fromAsyncIterable(asyncIterable) {\n return new Observable(function (subscriber) {\n process(asyncIterable, subscriber).catch(function (err) { return subscriber.error(err); });\n });\n}\nexport function fromReadableStreamLike(readableStream) {\n return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));\n}\nfunction process(asyncIterable, subscriber) {\n var asyncIterable_1, asyncIterable_1_1;\n var e_2, _a;\n return __awaiter(this, void 0, void 0, function () {\n var value, e_2_1;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _b.trys.push([0, 5, 6, 11]);\n asyncIterable_1 = __asyncValues(asyncIterable);\n _b.label = 1;\n case 1: return [4, asyncIterable_1.next()];\n case 2:\n if (!(asyncIterable_1_1 = _b.sent(), !asyncIterable_1_1.done)) return [3, 4];\n value = asyncIterable_1_1.value;\n subscriber.next(value);\n if (subscriber.closed) {\n return [2];\n }\n _b.label = 3;\n case 3: return [3, 1];\n case 4: return [3, 11];\n case 5:\n e_2_1 = _b.sent();\n e_2 = { error: e_2_1 };\n return [3, 11];\n case 6:\n _b.trys.push([6, , 9, 10]);\n if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return))) return [3, 8];\n return [4, _a.call(asyncIterable_1)];\n case 7:\n _b.sent();\n _b.label = 8;\n case 8: return [3, 10];\n case 9:\n if (e_2) throw e_2.error;\n return [7];\n case 10: return [7];\n case 11:\n subscriber.complete();\n return [2];\n }\n });\n });\n}\n//# sourceMappingURL=innerFrom.js.map","export function executeSchedule(parentSubscription, scheduler, work, delay, repeat) {\n if (delay === void 0) { delay = 0; }\n if (repeat === void 0) { repeat = false; }\n var scheduleSubscription = scheduler.schedule(function () {\n work();\n if (repeat) {\n parentSubscription.add(this.schedule(null, delay));\n }\n else {\n this.unsubscribe();\n }\n }, delay);\n parentSubscription.add(scheduleSubscription);\n if (!repeat) {\n return scheduleSubscription;\n }\n}\n//# sourceMappingURL=executeSchedule.js.map","import { executeSchedule } from '../util/executeSchedule';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function observeOn(scheduler, delay) {\n if (delay === void 0) { delay = 0; }\n return operate(function (source, subscriber) {\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return executeSchedule(subscriber, scheduler, function () { return subscriber.next(value); }, delay); }, function () { return executeSchedule(subscriber, scheduler, function () { return subscriber.complete(); }, delay); }, function (err) { return executeSchedule(subscriber, scheduler, function () { return subscriber.error(err); }, delay); }));\n });\n}\n//# sourceMappingURL=observeOn.js.map","import { operate } from '../util/lift';\nexport function subscribeOn(scheduler, delay) {\n if (delay === void 0) { delay = 0; }\n return operate(function (source, subscriber) {\n subscriber.add(scheduler.schedule(function () { return source.subscribe(subscriber); }, delay));\n });\n}\n//# sourceMappingURL=subscribeOn.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function scheduleObservable(input, scheduler) {\n return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n//# sourceMappingURL=scheduleObservable.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function schedulePromise(input, scheduler) {\n return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n//# sourceMappingURL=schedulePromise.js.map","import { Observable } from '../Observable';\nexport function scheduleArray(input, scheduler) {\n return new Observable(function (subscriber) {\n var i = 0;\n return scheduler.schedule(function () {\n if (i === input.length) {\n subscriber.complete();\n }\n else {\n subscriber.next(input[i++]);\n if (!subscriber.closed) {\n this.schedule();\n }\n }\n });\n });\n}\n//# sourceMappingURL=scheduleArray.js.map","import { Observable } from '../Observable';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from '../util/isFunction';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleIterable(input, scheduler) {\n return new Observable(function (subscriber) {\n var iterator;\n executeSchedule(subscriber, scheduler, function () {\n iterator = input[Symbol_iterator]();\n executeSchedule(subscriber, scheduler, function () {\n var _a;\n var value;\n var done;\n try {\n (_a = iterator.next(), value = _a.value, done = _a.done);\n }\n catch (err) {\n subscriber.error(err);\n return;\n }\n if (done) {\n subscriber.complete();\n }\n else {\n subscriber.next(value);\n }\n }, 0, true);\n });\n return function () { return isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return(); };\n });\n}\n//# sourceMappingURL=scheduleIterable.js.map","import { Observable } from '../Observable';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleAsyncIterable(input, scheduler) {\n if (!input) {\n throw new Error('Iterable cannot be null');\n }\n return new Observable(function (subscriber) {\n executeSchedule(subscriber, scheduler, function () {\n var iterator = input[Symbol.asyncIterator]();\n executeSchedule(subscriber, scheduler, function () {\n iterator.next().then(function (result) {\n if (result.done) {\n subscriber.complete();\n }\n else {\n subscriber.next(result.value);\n }\n });\n }, 0, true);\n });\n });\n}\n//# sourceMappingURL=scheduleAsyncIterable.js.map","import { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nexport function scheduleReadableStreamLike(input, scheduler) {\n return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler);\n}\n//# sourceMappingURL=scheduleReadableStreamLike.js.map","import { scheduleObservable } from './scheduleObservable';\nimport { schedulePromise } from './schedulePromise';\nimport { scheduleArray } from './scheduleArray';\nimport { scheduleIterable } from './scheduleIterable';\nimport { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isPromise } from '../util/isPromise';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isIterable } from '../util/isIterable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isReadableStreamLike } from '../util/isReadableStreamLike';\nimport { scheduleReadableStreamLike } from './scheduleReadableStreamLike';\nexport function scheduled(input, scheduler) {\n if (input != null) {\n if (isInteropObservable(input)) {\n return scheduleObservable(input, scheduler);\n }\n if (isArrayLike(input)) {\n return scheduleArray(input, scheduler);\n }\n if (isPromise(input)) {\n return schedulePromise(input, scheduler);\n }\n if (isAsyncIterable(input)) {\n return scheduleAsyncIterable(input, scheduler);\n }\n if (isIterable(input)) {\n return scheduleIterable(input, scheduler);\n }\n if (isReadableStreamLike(input)) {\n return scheduleReadableStreamLike(input, scheduler);\n }\n }\n throw createInvalidObservableTypeError(input);\n}\n//# sourceMappingURL=scheduled.js.map","import { scheduled } from '../scheduled/scheduled';\nimport { innerFrom } from './innerFrom';\nexport function from(input, scheduler) {\n return scheduler ? scheduled(input, scheduler) : innerFrom(input);\n}\n//# sourceMappingURL=from.js.map","import { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function of() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = popScheduler(args);\n return from(args, scheduler);\n}\n//# sourceMappingURL=of.js.map","import { Observable } from '../Observable';\nimport { isFunction } from '../util/isFunction';\nexport function throwError(errorOrErrorFactory, scheduler) {\n var errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : function () { return errorOrErrorFactory; };\n var init = function (subscriber) { return subscriber.error(errorFactory()); };\n return new Observable(scheduler ? function (subscriber) { return scheduler.schedule(init, 0, subscriber); } : init);\n}\n//# sourceMappingURL=throwError.js.map","import { EMPTY } from './observable/empty';\nimport { of } from './observable/of';\nimport { throwError } from './observable/throwError';\nimport { isFunction } from './util/isFunction';\nexport var NotificationKind;\n(function (NotificationKind) {\n NotificationKind[\"NEXT\"] = \"N\";\n NotificationKind[\"ERROR\"] = \"E\";\n NotificationKind[\"COMPLETE\"] = \"C\";\n})(NotificationKind || (NotificationKind = {}));\nvar Notification = (function () {\n function Notification(kind, value, error) {\n this.kind = kind;\n this.value = value;\n this.error = error;\n this.hasValue = kind === 'N';\n }\n Notification.prototype.observe = function (observer) {\n return observeNotification(this, observer);\n };\n Notification.prototype.do = function (nextHandler, errorHandler, completeHandler) {\n var _a = this, kind = _a.kind, value = _a.value, error = _a.error;\n return kind === 'N' ? nextHandler === null || nextHandler === void 0 ? void 0 : nextHandler(value) : kind === 'E' ? errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler(error) : completeHandler === null || completeHandler === void 0 ? void 0 : completeHandler();\n };\n Notification.prototype.accept = function (nextOrObserver, error, complete) {\n var _a;\n return isFunction((_a = nextOrObserver) === null || _a === void 0 ? void 0 : _a.next)\n ? this.observe(nextOrObserver)\n : this.do(nextOrObserver, error, complete);\n };\n Notification.prototype.toObservable = function () {\n var _a = this, kind = _a.kind, value = _a.value, error = _a.error;\n var result = kind === 'N'\n ?\n of(value)\n :\n kind === 'E'\n ?\n throwError(function () { return error; })\n :\n kind === 'C'\n ?\n EMPTY\n :\n 0;\n if (!result) {\n throw new TypeError(\"Unexpected notification kind \" + kind);\n }\n return result;\n };\n Notification.createNext = function (value) {\n return new Notification('N', value);\n };\n Notification.createError = function (err) {\n return new Notification('E', undefined, err);\n };\n Notification.createComplete = function () {\n return Notification.completeNotification;\n };\n Notification.completeNotification = new Notification('C');\n return Notification;\n}());\nexport { Notification };\nexport function observeNotification(notification, observer) {\n var _a, _b, _c;\n var _d = notification, kind = _d.kind, value = _d.value, error = _d.error;\n if (typeof kind !== 'string') {\n throw new TypeError('Invalid notification, missing \"kind\"');\n }\n kind === 'N' ? (_a = observer.next) === null || _a === void 0 ? void 0 : _a.call(observer, value) : kind === 'E' ? (_b = observer.error) === null || _b === void 0 ? void 0 : _b.call(observer, error) : (_c = observer.complete) === null || _c === void 0 ? void 0 : _c.call(observer);\n}\n//# sourceMappingURL=Notification.js.map","import { Observable } from '../Observable';\nimport { isFunction } from './isFunction';\nexport function isObservable(obj) {\n return !!obj && (obj instanceof Observable || (isFunction(obj.lift) && isFunction(obj.subscribe)));\n}\n//# sourceMappingURL=isObservable.js.map","import { createErrorClass } from './createErrorClass';\nexport var EmptyError = createErrorClass(function (_super) {\n return function EmptyErrorImpl() {\n _super(this);\n this.name = 'EmptyError';\n this.message = 'no elements in sequence';\n };\n});\n//# sourceMappingURL=EmptyError.js.map","import { EmptyError } from './util/EmptyError';\nexport function lastValueFrom(source, config) {\n var hasConfig = typeof config === 'object';\n return new Promise(function (resolve, reject) {\n var _hasValue = false;\n var _value;\n source.subscribe({\n next: function (value) {\n _value = value;\n _hasValue = true;\n },\n error: reject,\n complete: function () {\n if (_hasValue) {\n resolve(_value);\n }\n else if (hasConfig) {\n resolve(config.defaultValue);\n }\n else {\n reject(new EmptyError());\n }\n },\n });\n });\n}\n//# sourceMappingURL=lastValueFrom.js.map","import { EmptyError } from './util/EmptyError';\nimport { SafeSubscriber } from './Subscriber';\nexport function firstValueFrom(source, config) {\n var hasConfig = typeof config === 'object';\n return new Promise(function (resolve, reject) {\n var subscriber = new SafeSubscriber({\n next: function (value) {\n resolve(value);\n subscriber.unsubscribe();\n },\n error: reject,\n complete: function () {\n if (hasConfig) {\n resolve(config.defaultValue);\n }\n else {\n reject(new EmptyError());\n }\n },\n });\n source.subscribe(subscriber);\n });\n}\n//# sourceMappingURL=firstValueFrom.js.map","import { createErrorClass } from './createErrorClass';\nexport var ArgumentOutOfRangeError = createErrorClass(function (_super) {\n return function ArgumentOutOfRangeErrorImpl() {\n _super(this);\n this.name = 'ArgumentOutOfRangeError';\n this.message = 'argument out of range';\n };\n});\n//# sourceMappingURL=ArgumentOutOfRangeError.js.map","import { createErrorClass } from './createErrorClass';\nexport var NotFoundError = createErrorClass(function (_super) {\n return function NotFoundErrorImpl(message) {\n _super(this);\n this.name = 'NotFoundError';\n this.message = message;\n };\n});\n//# sourceMappingURL=NotFoundError.js.map","import { createErrorClass } from './createErrorClass';\nexport var SequenceError = createErrorClass(function (_super) {\n return function SequenceErrorImpl(message) {\n _super(this);\n this.name = 'SequenceError';\n this.message = message;\n };\n});\n//# sourceMappingURL=SequenceError.js.map","export function isValidDate(value) {\n return value instanceof Date && !isNaN(value);\n}\n//# sourceMappingURL=isDate.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { isValidDate } from '../util/isDate';\nimport { operate } from '../util/lift';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createErrorClass } from '../util/createErrorClass';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { executeSchedule } from '../util/executeSchedule';\nexport var TimeoutError = createErrorClass(function (_super) {\n return function TimeoutErrorImpl(info) {\n if (info === void 0) { info = null; }\n _super(this);\n this.message = 'Timeout has occurred';\n this.name = 'TimeoutError';\n this.info = info;\n };\n});\nexport function timeout(config, schedulerArg) {\n var _a = (isValidDate(config) ? { first: config } : typeof config === 'number' ? { each: config } : config), first = _a.first, each = _a.each, _b = _a.with, _with = _b === void 0 ? timeoutErrorFactory : _b, _c = _a.scheduler, scheduler = _c === void 0 ? schedulerArg !== null && schedulerArg !== void 0 ? schedulerArg : asyncScheduler : _c, _d = _a.meta, meta = _d === void 0 ? null : _d;\n if (first == null && each == null) {\n throw new TypeError('No timeout provided.');\n }\n return operate(function (source, subscriber) {\n var originalSourceSubscription;\n var timerSubscription;\n var lastValue = null;\n var seen = 0;\n var startTimer = function (delay) {\n timerSubscription = executeSchedule(subscriber, scheduler, function () {\n try {\n originalSourceSubscription.unsubscribe();\n innerFrom(_with({\n meta: meta,\n lastValue: lastValue,\n seen: seen,\n })).subscribe(subscriber);\n }\n catch (err) {\n subscriber.error(err);\n }\n }, delay);\n };\n originalSourceSubscription = source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe();\n seen++;\n subscriber.next((lastValue = value));\n each > 0 && startTimer(each);\n }, undefined, undefined, function () {\n if (!(timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.closed)) {\n timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe();\n }\n lastValue = null;\n }));\n !seen && startTimer(first != null ? (typeof first === 'number' ? first : +first - scheduler.now()) : each);\n });\n}\nfunction timeoutErrorFactory(info) {\n throw new TimeoutError(info);\n}\n//# sourceMappingURL=timeout.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function map(project, thisArg) {\n return operate(function (source, subscriber) {\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n subscriber.next(project.call(thisArg, value, index++));\n }));\n });\n}\n//# sourceMappingURL=map.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { map } from \"../operators/map\";\nvar isArray = Array.isArray;\nfunction callOrApply(fn, args) {\n return isArray(args) ? fn.apply(void 0, __spreadArray([], __read(args))) : fn(args);\n}\nexport function mapOneOrManyArgs(fn) {\n return map(function (args) { return callOrApply(fn, args); });\n}\n//# sourceMappingURL=mapOneOrManyArgs.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { isScheduler } from '../util/isScheduler';\nimport { Observable } from '../Observable';\nimport { subscribeOn } from '../operators/subscribeOn';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { observeOn } from '../operators/observeOn';\nimport { AsyncSubject } from '../AsyncSubject';\nexport function bindCallbackInternals(isNodeStyle, callbackFunc, resultSelector, scheduler) {\n if (resultSelector) {\n if (isScheduler(resultSelector)) {\n scheduler = resultSelector;\n }\n else {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return bindCallbackInternals(isNodeStyle, callbackFunc, scheduler)\n .apply(this, args)\n .pipe(mapOneOrManyArgs(resultSelector));\n };\n }\n }\n if (scheduler) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return bindCallbackInternals(isNodeStyle, callbackFunc)\n .apply(this, args)\n .pipe(subscribeOn(scheduler), observeOn(scheduler));\n };\n }\n return function () {\n var _this = this;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var subject = new AsyncSubject();\n var uninitialized = true;\n return new Observable(function (subscriber) {\n var subs = subject.subscribe(subscriber);\n if (uninitialized) {\n uninitialized = false;\n var isAsync_1 = false;\n var isComplete_1 = false;\n callbackFunc.apply(_this, __spreadArray(__spreadArray([], __read(args)), [\n function () {\n var results = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n results[_i] = arguments[_i];\n }\n if (isNodeStyle) {\n var err = results.shift();\n if (err != null) {\n subject.error(err);\n return;\n }\n }\n subject.next(1 < results.length ? results : results[0]);\n isComplete_1 = true;\n if (isAsync_1) {\n subject.complete();\n }\n },\n ]));\n if (isComplete_1) {\n subject.complete();\n }\n isAsync_1 = true;\n }\n return subs;\n });\n };\n}\n//# sourceMappingURL=bindCallbackInternals.js.map","import { bindCallbackInternals } from './bindCallbackInternals';\nexport function bindCallback(callbackFunc, resultSelector, scheduler) {\n return bindCallbackInternals(false, callbackFunc, resultSelector, scheduler);\n}\n//# sourceMappingURL=bindCallback.js.map","import { bindCallbackInternals } from './bindCallbackInternals';\nexport function bindNodeCallback(callbackFunc, resultSelector, scheduler) {\n return bindCallbackInternals(true, callbackFunc, resultSelector, scheduler);\n}\n//# sourceMappingURL=bindNodeCallback.js.map","var isArray = Array.isArray;\nvar getPrototypeOf = Object.getPrototypeOf, objectProto = Object.prototype, getKeys = Object.keys;\nexport function argsArgArrayOrObject(args) {\n if (args.length === 1) {\n var first_1 = args[0];\n if (isArray(first_1)) {\n return { args: first_1, keys: null };\n }\n if (isPOJO(first_1)) {\n var keys = getKeys(first_1);\n return {\n args: keys.map(function (key) { return first_1[key]; }),\n keys: keys,\n };\n }\n }\n return { args: args, keys: null };\n}\nfunction isPOJO(obj) {\n return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto;\n}\n//# sourceMappingURL=argsArgArrayOrObject.js.map","export function createObject(keys, values) {\n return keys.reduce(function (result, key, i) { return ((result[key] = values[i]), result); }, {});\n}\n//# sourceMappingURL=createObject.js.map","import { Observable } from '../Observable';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { from } from './from';\nimport { identity } from '../util/identity';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { popResultSelector, popScheduler } from '../util/args';\nimport { createObject } from '../util/createObject';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function combineLatest() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = popScheduler(args);\n var resultSelector = popResultSelector(args);\n var _a = argsArgArrayOrObject(args), observables = _a.args, keys = _a.keys;\n if (observables.length === 0) {\n return from([], scheduler);\n }\n var result = new Observable(combineLatestInit(observables, scheduler, keys\n ?\n function (values) { return createObject(keys, values); }\n :\n identity));\n return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\nexport function combineLatestInit(observables, scheduler, valueTransform) {\n if (valueTransform === void 0) { valueTransform = identity; }\n return function (subscriber) {\n maybeSchedule(scheduler, function () {\n var length = observables.length;\n var values = new Array(length);\n var active = length;\n var remainingFirstValues = length;\n var _loop_1 = function (i) {\n maybeSchedule(scheduler, function () {\n var source = from(observables[i], scheduler);\n var hasFirstValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n values[i] = value;\n if (!hasFirstValue) {\n hasFirstValue = true;\n remainingFirstValues--;\n }\n if (!remainingFirstValues) {\n subscriber.next(valueTransform(values.slice()));\n }\n }, function () {\n if (!--active) {\n subscriber.complete();\n }\n }));\n }, subscriber);\n };\n for (var i = 0; i < length; i++) {\n _loop_1(i);\n }\n }, subscriber);\n };\n}\nfunction maybeSchedule(scheduler, execute, subscription) {\n if (scheduler) {\n executeSchedule(subscription, scheduler, execute);\n }\n else {\n execute();\n }\n}\n//# sourceMappingURL=combineLatest.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { executeSchedule } from '../util/executeSchedule';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {\n var buffer = [];\n var active = 0;\n var index = 0;\n var isComplete = false;\n var checkComplete = function () {\n if (isComplete && !buffer.length && !active) {\n subscriber.complete();\n }\n };\n var outerNext = function (value) { return (active < concurrent ? doInnerSub(value) : buffer.push(value)); };\n var doInnerSub = function (value) {\n expand && subscriber.next(value);\n active++;\n var innerComplete = false;\n innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, function (innerValue) {\n onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);\n if (expand) {\n outerNext(innerValue);\n }\n else {\n subscriber.next(innerValue);\n }\n }, function () {\n innerComplete = true;\n }, undefined, function () {\n if (innerComplete) {\n try {\n active--;\n var _loop_1 = function () {\n var bufferedValue = buffer.shift();\n if (innerSubScheduler) {\n executeSchedule(subscriber, innerSubScheduler, function () { return doInnerSub(bufferedValue); });\n }\n else {\n doInnerSub(bufferedValue);\n }\n };\n while (buffer.length && active < concurrent) {\n _loop_1();\n }\n checkComplete();\n }\n catch (err) {\n subscriber.error(err);\n }\n }\n }));\n };\n source.subscribe(createOperatorSubscriber(subscriber, outerNext, function () {\n isComplete = true;\n checkComplete();\n }));\n return function () {\n additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();\n };\n}\n//# sourceMappingURL=mergeInternals.js.map","import { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nimport { isFunction } from '../util/isFunction';\nexport function mergeMap(project, resultSelector, concurrent) {\n if (concurrent === void 0) { concurrent = Infinity; }\n if (isFunction(resultSelector)) {\n return mergeMap(function (a, i) { return map(function (b, ii) { return resultSelector(a, b, i, ii); })(innerFrom(project(a, i))); }, concurrent);\n }\n else if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return operate(function (source, subscriber) { return mergeInternals(source, subscriber, project, concurrent); });\n}\n//# sourceMappingURL=mergeMap.js.map","import { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nexport function mergeAll(concurrent) {\n if (concurrent === void 0) { concurrent = Infinity; }\n return mergeMap(identity, concurrent);\n}\n//# sourceMappingURL=mergeAll.js.map","import { mergeAll } from './mergeAll';\nexport function concatAll() {\n return mergeAll(1);\n}\n//# sourceMappingURL=concatAll.js.map","import { concatAll } from '../operators/concatAll';\nimport { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function concat() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return concatAll()(from(args, popScheduler(args)));\n}\n//# sourceMappingURL=concat.js.map","import { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nexport function defer(observableFactory) {\n return new Observable(function (subscriber) {\n innerFrom(observableFactory()).subscribe(subscriber);\n });\n}\n//# sourceMappingURL=defer.js.map","import { Subject } from '../Subject';\nimport { Observable } from '../Observable';\nimport { defer } from './defer';\nvar DEFAULT_CONFIG = {\n connector: function () { return new Subject(); },\n resetOnDisconnect: true,\n};\nexport function connectable(source, config) {\n if (config === void 0) { config = DEFAULT_CONFIG; }\n var connection = null;\n var connector = config.connector, _a = config.resetOnDisconnect, resetOnDisconnect = _a === void 0 ? true : _a;\n var subject = connector();\n var result = new Observable(function (subscriber) {\n return subject.subscribe(subscriber);\n });\n result.connect = function () {\n if (!connection || connection.closed) {\n connection = defer(function () { return source; }).subscribe(subject);\n if (resetOnDisconnect) {\n connection.add(function () { return (subject = connector()); });\n }\n }\n return connection;\n };\n return result;\n}\n//# sourceMappingURL=connectable.js.map","import { Observable } from '../Observable';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { innerFrom } from './innerFrom';\nimport { popResultSelector } from '../util/args';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { createObject } from '../util/createObject';\nexport function forkJoin() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var resultSelector = popResultSelector(args);\n var _a = argsArgArrayOrObject(args), sources = _a.args, keys = _a.keys;\n var result = new Observable(function (subscriber) {\n var length = sources.length;\n if (!length) {\n subscriber.complete();\n return;\n }\n var values = new Array(length);\n var remainingCompletions = length;\n var remainingEmissions = length;\n var _loop_1 = function (sourceIndex) {\n var hasValue = false;\n innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, function (value) {\n if (!hasValue) {\n hasValue = true;\n remainingEmissions--;\n }\n values[sourceIndex] = value;\n }, function () { return remainingCompletions--; }, undefined, function () {\n if (!remainingCompletions || !hasValue) {\n if (!remainingEmissions) {\n subscriber.next(keys ? createObject(keys, values) : values);\n }\n subscriber.complete();\n }\n }));\n };\n for (var sourceIndex = 0; sourceIndex < length; sourceIndex++) {\n _loop_1(sourceIndex);\n }\n });\n return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\n//# sourceMappingURL=forkJoin.js.map","import { __read } from \"tslib\";\nimport { innerFrom } from '../observable/innerFrom';\nimport { Observable } from '../Observable';\nimport { mergeMap } from '../operators/mergeMap';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isFunction } from '../util/isFunction';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nvar nodeEventEmitterMethods = ['addListener', 'removeListener'];\nvar eventTargetMethods = ['addEventListener', 'removeEventListener'];\nvar jqueryMethods = ['on', 'off'];\nexport function fromEvent(target, eventName, options, resultSelector) {\n if (isFunction(options)) {\n resultSelector = options;\n options = undefined;\n }\n if (resultSelector) {\n return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector));\n }\n var _a = __read(isEventTarget(target)\n ? eventTargetMethods.map(function (methodName) { return function (handler) { return target[methodName](eventName, handler, options); }; })\n :\n isNodeStyleEventEmitter(target)\n ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName))\n : isJQueryStyleEventEmitter(target)\n ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName))\n : [], 2), add = _a[0], remove = _a[1];\n if (!add) {\n if (isArrayLike(target)) {\n return mergeMap(function (subTarget) { return fromEvent(subTarget, eventName, options); })(innerFrom(target));\n }\n }\n if (!add) {\n throw new TypeError('Invalid event target');\n }\n return new Observable(function (subscriber) {\n var handler = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return subscriber.next(1 < args.length ? args : args[0]);\n };\n add(handler);\n return function () { return remove(handler); };\n });\n}\nfunction toCommonHandlerRegistry(target, eventName) {\n return function (methodName) { return function (handler) { return target[methodName](eventName, handler); }; };\n}\nfunction isNodeStyleEventEmitter(target) {\n return isFunction(target.addListener) && isFunction(target.removeListener);\n}\nfunction isJQueryStyleEventEmitter(target) {\n return isFunction(target.on) && isFunction(target.off);\n}\nfunction isEventTarget(target) {\n return isFunction(target.addEventListener) && isFunction(target.removeEventListener);\n}\n//# sourceMappingURL=fromEvent.js.map","import { Observable } from '../Observable';\nimport { isFunction } from '../util/isFunction';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nexport function fromEventPattern(addHandler, removeHandler, resultSelector) {\n if (resultSelector) {\n return fromEventPattern(addHandler, removeHandler).pipe(mapOneOrManyArgs(resultSelector));\n }\n return new Observable(function (subscriber) {\n var handler = function () {\n var e = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n e[_i] = arguments[_i];\n }\n return subscriber.next(e.length === 1 ? e[0] : e);\n };\n var retValue = addHandler(handler);\n return isFunction(removeHandler) ? function () { return removeHandler(handler, retValue); } : undefined;\n });\n}\n//# sourceMappingURL=fromEventPattern.js.map","import { __generator } from \"tslib\";\nimport { identity } from '../util/identity';\nimport { isScheduler } from '../util/isScheduler';\nimport { defer } from './defer';\nimport { scheduleIterable } from '../scheduled/scheduleIterable';\nexport function generate(initialStateOrOptions, condition, iterate, resultSelectorOrScheduler, scheduler) {\n var _a, _b;\n var resultSelector;\n var initialState;\n if (arguments.length === 1) {\n (_a = initialStateOrOptions, initialState = _a.initialState, condition = _a.condition, iterate = _a.iterate, _b = _a.resultSelector, resultSelector = _b === void 0 ? identity : _b, scheduler = _a.scheduler);\n }\n else {\n initialState = initialStateOrOptions;\n if (!resultSelectorOrScheduler || isScheduler(resultSelectorOrScheduler)) {\n resultSelector = identity;\n scheduler = resultSelectorOrScheduler;\n }\n else {\n resultSelector = resultSelectorOrScheduler;\n }\n }\n function gen() {\n var state;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n state = initialState;\n _a.label = 1;\n case 1:\n if (!(!condition || condition(state))) return [3, 4];\n return [4, resultSelector(state)];\n case 2:\n _a.sent();\n _a.label = 3;\n case 3:\n state = iterate(state);\n return [3, 1];\n case 4: return [2];\n }\n });\n }\n return defer((scheduler\n ?\n function () { return scheduleIterable(gen(), scheduler); }\n :\n gen));\n}\n//# sourceMappingURL=generate.js.map","import { defer } from './defer';\nexport function iif(condition, trueResult, falseResult) {\n return defer(function () { return (condition() ? trueResult : falseResult); });\n}\n//# sourceMappingURL=iif.js.map","import { Observable } from '../Observable';\nimport { async as asyncScheduler } from '../scheduler/async';\nimport { isScheduler } from '../util/isScheduler';\nimport { isValidDate } from '../util/isDate';\nexport function timer(dueTime, intervalOrScheduler, scheduler) {\n if (dueTime === void 0) { dueTime = 0; }\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n var intervalDuration = -1;\n if (intervalOrScheduler != null) {\n if (isScheduler(intervalOrScheduler)) {\n scheduler = intervalOrScheduler;\n }\n else {\n intervalDuration = intervalOrScheduler;\n }\n }\n return new Observable(function (subscriber) {\n var due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime;\n if (due < 0) {\n due = 0;\n }\n var n = 0;\n return scheduler.schedule(function () {\n if (!subscriber.closed) {\n subscriber.next(n++);\n if (0 <= intervalDuration) {\n this.schedule(undefined, intervalDuration);\n }\n else {\n subscriber.complete();\n }\n }\n }, due);\n });\n}\n//# sourceMappingURL=timer.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { timer } from './timer';\nexport function interval(period, scheduler) {\n if (period === void 0) { period = 0; }\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n if (period < 0) {\n period = 0;\n }\n return timer(period, period, scheduler);\n}\n//# sourceMappingURL=interval.js.map","import { mergeAll } from '../operators/mergeAll';\nimport { innerFrom } from './innerFrom';\nimport { EMPTY } from './empty';\nimport { popNumber, popScheduler } from '../util/args';\nimport { from } from './from';\nexport function merge() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = popScheduler(args);\n var concurrent = popNumber(args, Infinity);\n var sources = args;\n return !sources.length\n ?\n EMPTY\n : sources.length === 1\n ?\n innerFrom(sources[0])\n :\n mergeAll(concurrent)(from(sources, scheduler));\n}\n//# sourceMappingURL=merge.js.map","import { Observable } from '../Observable';\nimport { noop } from '../util/noop';\nexport var NEVER = new Observable(noop);\nexport function never() {\n return NEVER;\n}\n//# sourceMappingURL=never.js.map","var isArray = Array.isArray;\nexport function argsOrArgArray(args) {\n return args.length === 1 && isArray(args[0]) ? args[0] : args;\n}\n//# sourceMappingURL=argsOrArgArray.js.map","import { Observable } from '../Observable';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { OperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { noop } from '../util/noop';\nimport { innerFrom } from './innerFrom';\nexport function onErrorResumeNext() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n var nextSources = argsOrArgArray(sources);\n return new Observable(function (subscriber) {\n var sourceIndex = 0;\n var subscribeNext = function () {\n if (sourceIndex < nextSources.length) {\n var nextSource = void 0;\n try {\n nextSource = innerFrom(nextSources[sourceIndex++]);\n }\n catch (err) {\n subscribeNext();\n return;\n }\n var innerSubscriber = new OperatorSubscriber(subscriber, undefined, noop, noop);\n nextSource.subscribe(innerSubscriber);\n innerSubscriber.add(subscribeNext);\n }\n else {\n subscriber.complete();\n }\n };\n subscribeNext();\n });\n}\n//# sourceMappingURL=onErrorResumeNext.js.map","import { from } from './from';\nexport function pairs(obj, scheduler) {\n return from(Object.entries(obj), scheduler);\n}\n//# sourceMappingURL=pairs.js.map","export function not(pred, thisArg) {\n return function (value, index) { return !pred.call(thisArg, value, index); };\n}\n//# sourceMappingURL=not.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function filter(predicate, thisArg) {\n return operate(function (source, subscriber) {\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return predicate.call(thisArg, value, index++) && subscriber.next(value); }));\n });\n}\n//# sourceMappingURL=filter.js.map","import { not } from '../util/not';\nimport { filter } from '../operators/filter';\nimport { innerFrom } from './innerFrom';\nexport function partition(source, predicate, thisArg) {\n return [filter(predicate, thisArg)(innerFrom(source)), filter(not(predicate, thisArg))(innerFrom(source))];\n}\n//# sourceMappingURL=partition.js.map","import { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nexport function race() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n sources = argsOrArgArray(sources);\n return sources.length === 1 ? innerFrom(sources[0]) : new Observable(raceInit(sources));\n}\nexport function raceInit(sources) {\n return function (subscriber) {\n var subscriptions = [];\n var _loop_1 = function (i) {\n subscriptions.push(innerFrom(sources[i]).subscribe(createOperatorSubscriber(subscriber, function (value) {\n if (subscriptions) {\n for (var s = 0; s < subscriptions.length; s++) {\n s !== i && subscriptions[s].unsubscribe();\n }\n subscriptions = null;\n }\n subscriber.next(value);\n })));\n };\n for (var i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) {\n _loop_1(i);\n }\n };\n}\n//# sourceMappingURL=race.js.map","import { Observable } from '../Observable';\nimport { EMPTY } from './empty';\nexport function range(start, count, scheduler) {\n if (count == null) {\n count = start;\n start = 0;\n }\n if (count <= 0) {\n return EMPTY;\n }\n var end = count + start;\n return new Observable(scheduler\n ?\n function (subscriber) {\n var n = start;\n return scheduler.schedule(function () {\n if (n < end) {\n subscriber.next(n++);\n this.schedule();\n }\n else {\n subscriber.complete();\n }\n });\n }\n :\n function (subscriber) {\n var n = start;\n while (n < end && !subscriber.closed) {\n subscriber.next(n++);\n }\n subscriber.complete();\n });\n}\n//# sourceMappingURL=range.js.map","import { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nimport { EMPTY } from './empty';\nexport function using(resourceFactory, observableFactory) {\n return new Observable(function (subscriber) {\n var resource = resourceFactory();\n var result = observableFactory(resource);\n var source = result ? innerFrom(result) : EMPTY;\n source.subscribe(subscriber);\n return function () {\n if (resource) {\n resource.unsubscribe();\n }\n };\n });\n}\n//# sourceMappingURL=using.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { EMPTY } from './empty';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { popResultSelector } from '../util/args';\nexport function zip() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var resultSelector = popResultSelector(args);\n var sources = argsOrArgArray(args);\n return sources.length\n ? new Observable(function (subscriber) {\n var buffers = sources.map(function () { return []; });\n var completed = sources.map(function () { return false; });\n subscriber.add(function () {\n buffers = completed = null;\n });\n var _loop_1 = function (sourceIndex) {\n innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, function (value) {\n buffers[sourceIndex].push(value);\n if (buffers.every(function (buffer) { return buffer.length; })) {\n var result = buffers.map(function (buffer) { return buffer.shift(); });\n subscriber.next(resultSelector ? resultSelector.apply(void 0, __spreadArray([], __read(result))) : result);\n if (buffers.some(function (buffer, i) { return !buffer.length && completed[i]; })) {\n subscriber.complete();\n }\n }\n }, function () {\n completed[sourceIndex] = true;\n !buffers[sourceIndex].length && subscriber.complete();\n }));\n };\n for (var sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) {\n _loop_1(sourceIndex);\n }\n return function () {\n buffers = completed = null;\n };\n })\n : EMPTY;\n}\n//# sourceMappingURL=zip.js.map","import { operate } from '../util/lift';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function audit(durationSelector) {\n return operate(function (source, subscriber) {\n var hasValue = false;\n var lastValue = null;\n var durationSubscriber = null;\n var isComplete = false;\n var endDuration = function () {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n durationSubscriber = null;\n if (hasValue) {\n hasValue = false;\n var value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n isComplete && subscriber.complete();\n };\n var cleanupDuration = function () {\n durationSubscriber = null;\n isComplete && subscriber.complete();\n };\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n hasValue = true;\n lastValue = value;\n if (!durationSubscriber) {\n innerFrom(durationSelector(value)).subscribe((durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration)));\n }\n }, function () {\n isComplete = true;\n (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=audit.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { audit } from './audit';\nimport { timer } from '../observable/timer';\nexport function auditTime(duration, scheduler) {\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n return audit(function () { return timer(duration, scheduler); });\n}\n//# sourceMappingURL=auditTime.js.map","import { operate } from '../util/lift';\nimport { noop } from '../util/noop';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function buffer(closingNotifier) {\n return operate(function (source, subscriber) {\n var currentBuffer = [];\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return currentBuffer.push(value); }, function () {\n subscriber.next(currentBuffer);\n subscriber.complete();\n }));\n innerFrom(closingNotifier).subscribe(createOperatorSubscriber(subscriber, function () {\n var b = currentBuffer;\n currentBuffer = [];\n subscriber.next(b);\n }, noop));\n return function () {\n currentBuffer = null;\n };\n });\n}\n//# sourceMappingURL=buffer.js.map","import { __values } from \"tslib\";\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { arrRemove } from '../util/arrRemove';\nexport function bufferCount(bufferSize, startBufferEvery) {\n if (startBufferEvery === void 0) { startBufferEvery = null; }\n startBufferEvery = startBufferEvery !== null && startBufferEvery !== void 0 ? startBufferEvery : bufferSize;\n return operate(function (source, subscriber) {\n var buffers = [];\n var count = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var e_1, _a, e_2, _b;\n var toEmit = null;\n if (count++ % startBufferEvery === 0) {\n buffers.push([]);\n }\n try {\n for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) {\n var buffer = buffers_1_1.value;\n buffer.push(value);\n if (bufferSize <= buffer.length) {\n toEmit = toEmit !== null && toEmit !== void 0 ? toEmit : [];\n toEmit.push(buffer);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n if (toEmit) {\n try {\n for (var toEmit_1 = __values(toEmit), toEmit_1_1 = toEmit_1.next(); !toEmit_1_1.done; toEmit_1_1 = toEmit_1.next()) {\n var buffer = toEmit_1_1.value;\n arrRemove(buffers, buffer);\n subscriber.next(buffer);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (toEmit_1_1 && !toEmit_1_1.done && (_b = toEmit_1.return)) _b.call(toEmit_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n }, function () {\n var e_3, _a;\n try {\n for (var buffers_2 = __values(buffers), buffers_2_1 = buffers_2.next(); !buffers_2_1.done; buffers_2_1 = buffers_2.next()) {\n var buffer = buffers_2_1.value;\n subscriber.next(buffer);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (buffers_2_1 && !buffers_2_1.done && (_a = buffers_2.return)) _a.call(buffers_2);\n }\n finally { if (e_3) throw e_3.error; }\n }\n subscriber.complete();\n }, undefined, function () {\n buffers = null;\n }));\n });\n}\n//# sourceMappingURL=bufferCount.js.map","import { __values } from \"tslib\";\nimport { Subscription } from '../Subscription';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { arrRemove } from '../util/arrRemove';\nimport { asyncScheduler } from '../scheduler/async';\nimport { popScheduler } from '../util/args';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function bufferTime(bufferTimeSpan) {\n var _a, _b;\n var otherArgs = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n otherArgs[_i - 1] = arguments[_i];\n }\n var scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler;\n var bufferCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null;\n var maxBufferSize = otherArgs[1] || Infinity;\n return operate(function (source, subscriber) {\n var bufferRecords = [];\n var restartOnEmit = false;\n var emit = function (record) {\n var buffer = record.buffer, subs = record.subs;\n subs.unsubscribe();\n arrRemove(bufferRecords, record);\n subscriber.next(buffer);\n restartOnEmit && startBuffer();\n };\n var startBuffer = function () {\n if (bufferRecords) {\n var subs = new Subscription();\n subscriber.add(subs);\n var buffer = [];\n var record_1 = {\n buffer: buffer,\n subs: subs,\n };\n bufferRecords.push(record_1);\n executeSchedule(subs, scheduler, function () { return emit(record_1); }, bufferTimeSpan);\n }\n };\n if (bufferCreationInterval !== null && bufferCreationInterval >= 0) {\n executeSchedule(subscriber, scheduler, startBuffer, bufferCreationInterval, true);\n }\n else {\n restartOnEmit = true;\n }\n startBuffer();\n var bufferTimeSubscriber = createOperatorSubscriber(subscriber, function (value) {\n var e_1, _a;\n var recordsCopy = bufferRecords.slice();\n try {\n for (var recordsCopy_1 = __values(recordsCopy), recordsCopy_1_1 = recordsCopy_1.next(); !recordsCopy_1_1.done; recordsCopy_1_1 = recordsCopy_1.next()) {\n var record = recordsCopy_1_1.value;\n var buffer = record.buffer;\n buffer.push(value);\n maxBufferSize <= buffer.length && emit(record);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (recordsCopy_1_1 && !recordsCopy_1_1.done && (_a = recordsCopy_1.return)) _a.call(recordsCopy_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }, function () {\n while (bufferRecords === null || bufferRecords === void 0 ? void 0 : bufferRecords.length) {\n subscriber.next(bufferRecords.shift().buffer);\n }\n bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 ? void 0 : bufferTimeSubscriber.unsubscribe();\n subscriber.complete();\n subscriber.unsubscribe();\n }, undefined, function () { return (bufferRecords = null); });\n source.subscribe(bufferTimeSubscriber);\n });\n}\n//# sourceMappingURL=bufferTime.js.map","import { __values } from \"tslib\";\nimport { Subscription } from '../Subscription';\nimport { operate } from '../util/lift';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nimport { arrRemove } from '../util/arrRemove';\nexport function bufferToggle(openings, closingSelector) {\n return operate(function (source, subscriber) {\n var buffers = [];\n innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, function (openValue) {\n var buffer = [];\n buffers.push(buffer);\n var closingSubscription = new Subscription();\n var emitBuffer = function () {\n arrRemove(buffers, buffer);\n subscriber.next(buffer);\n closingSubscription.unsubscribe();\n };\n closingSubscription.add(innerFrom(closingSelector(openValue)).subscribe(createOperatorSubscriber(subscriber, emitBuffer, noop)));\n }, noop));\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var e_1, _a;\n try {\n for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) {\n var buffer = buffers_1_1.value;\n buffer.push(value);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }, function () {\n while (buffers.length > 0) {\n subscriber.next(buffers.shift());\n }\n subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=bufferToggle.js.map","import { operate } from '../util/lift';\nimport { noop } from '../util/noop';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function bufferWhen(closingSelector) {\n return operate(function (source, subscriber) {\n var buffer = null;\n var closingSubscriber = null;\n var openBuffer = function () {\n closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe();\n var b = buffer;\n buffer = [];\n b && subscriber.next(b);\n innerFrom(closingSelector()).subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openBuffer, noop)));\n };\n openBuffer();\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return buffer === null || buffer === void 0 ? void 0 : buffer.push(value); }, function () {\n buffer && subscriber.next(buffer);\n subscriber.complete();\n }, undefined, function () { return (buffer = closingSubscriber = null); }));\n });\n}\n//# sourceMappingURL=bufferWhen.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { operate } from '../util/lift';\nexport function catchError(selector) {\n return operate(function (source, subscriber) {\n var innerSub = null;\n var syncUnsub = false;\n var handledResult;\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, function (err) {\n handledResult = innerFrom(selector(err, catchError(selector)(source)));\n if (innerSub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n else {\n syncUnsub = true;\n }\n }));\n if (syncUnsub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n });\n}\n//# sourceMappingURL=catchError.js.map","import { createOperatorSubscriber } from './OperatorSubscriber';\nexport function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) {\n return function (source, subscriber) {\n var hasState = hasSeed;\n var state = seed;\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var i = index++;\n state = hasState\n ?\n accumulator(state, value, i)\n :\n ((hasState = true), value);\n emitOnNext && subscriber.next(state);\n }, emitBeforeComplete &&\n (function () {\n hasState && subscriber.next(state);\n subscriber.complete();\n })));\n };\n}\n//# sourceMappingURL=scanInternals.js.map","import { scanInternals } from './scanInternals';\nimport { operate } from '../util/lift';\nexport function reduce(accumulator, seed) {\n return operate(scanInternals(accumulator, seed, arguments.length >= 2, false, true));\n}\n//# sourceMappingURL=reduce.js.map","import { reduce } from './reduce';\nimport { operate } from '../util/lift';\nvar arrReducer = function (arr, value) { return (arr.push(value), arr); };\nexport function toArray() {\n return operate(function (source, subscriber) {\n reduce(arrReducer, [])(source).subscribe(subscriber);\n });\n}\n//# sourceMappingURL=toArray.js.map","import { identity } from '../util/identity';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { pipe } from '../util/pipe';\nimport { mergeMap } from './mergeMap';\nimport { toArray } from './toArray';\nexport function joinAllInternals(joinFn, project) {\n return pipe(toArray(), mergeMap(function (sources) { return joinFn(sources); }), project ? mapOneOrManyArgs(project) : identity);\n}\n//# sourceMappingURL=joinAllInternals.js.map","import { combineLatest } from '../observable/combineLatest';\nimport { joinAllInternals } from './joinAllInternals';\nexport function combineLatestAll(project) {\n return joinAllInternals(combineLatest, project);\n}\n//# sourceMappingURL=combineLatestAll.js.map","import { combineLatestAll } from './combineLatestAll';\nexport var combineAll = combineLatestAll;\n//# sourceMappingURL=combineAll.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { combineLatestInit } from '../observable/combineLatest';\nimport { operate } from '../util/lift';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { pipe } from '../util/pipe';\nimport { popResultSelector } from '../util/args';\nexport function combineLatest() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var resultSelector = popResultSelector(args);\n return resultSelector\n ? pipe(combineLatest.apply(void 0, __spreadArray([], __read(args))), mapOneOrManyArgs(resultSelector))\n : operate(function (source, subscriber) {\n combineLatestInit(__spreadArray([source], __read(argsOrArgArray(args))))(subscriber);\n });\n}\n//# sourceMappingURL=combineLatest.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { combineLatest } from './combineLatest';\nexport function combineLatestWith() {\n var otherSources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n otherSources[_i] = arguments[_i];\n }\n return combineLatest.apply(void 0, __spreadArray([], __read(otherSources)));\n}\n//# sourceMappingURL=combineLatestWith.js.map","import { mergeMap } from './mergeMap';\nimport { isFunction } from '../util/isFunction';\nexport function concatMap(project, resultSelector) {\n return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1);\n}\n//# sourceMappingURL=concatMap.js.map","import { concatMap } from './concatMap';\nimport { isFunction } from '../util/isFunction';\nexport function concatMapTo(innerObservable, resultSelector) {\n return isFunction(resultSelector) ? concatMap(function () { return innerObservable; }, resultSelector) : concatMap(function () { return innerObservable; });\n}\n//# sourceMappingURL=concatMapTo.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { operate } from '../util/lift';\nimport { concatAll } from './concatAll';\nimport { popScheduler } from '../util/args';\nimport { from } from '../observable/from';\nexport function concat() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = popScheduler(args);\n return operate(function (source, subscriber) {\n concatAll()(from(__spreadArray([source], __read(args)), scheduler)).subscribe(subscriber);\n });\n}\n//# sourceMappingURL=concat.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { concat } from './concat';\nexport function concatWith() {\n var otherSources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n otherSources[_i] = arguments[_i];\n }\n return concat.apply(void 0, __spreadArray([], __read(otherSources)));\n}\n//# sourceMappingURL=concatWith.js.map","import { Observable } from '../Observable';\nexport function fromSubscribable(subscribable) {\n return new Observable(function (subscriber) { return subscribable.subscribe(subscriber); });\n}\n//# sourceMappingURL=fromSubscribable.js.map","import { Subject } from '../Subject';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { fromSubscribable } from '../observable/fromSubscribable';\nvar DEFAULT_CONFIG = {\n connector: function () { return new Subject(); },\n};\nexport function connect(selector, config) {\n if (config === void 0) { config = DEFAULT_CONFIG; }\n var connector = config.connector;\n return operate(function (source, subscriber) {\n var subject = connector();\n innerFrom(selector(fromSubscribable(subject))).subscribe(subscriber);\n subscriber.add(source.subscribe(subject));\n });\n}\n//# sourceMappingURL=connect.js.map","import { reduce } from './reduce';\nexport function count(predicate) {\n return reduce(function (total, value, i) { return (!predicate || predicate(value, i) ? total + 1 : total); }, 0);\n}\n//# sourceMappingURL=count.js.map","import { operate } from '../util/lift';\nimport { noop } from '../util/noop';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function debounce(durationSelector) {\n return operate(function (source, subscriber) {\n var hasValue = false;\n var lastValue = null;\n var durationSubscriber = null;\n var emit = function () {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n durationSubscriber = null;\n if (hasValue) {\n hasValue = false;\n var value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n };\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n hasValue = true;\n lastValue = value;\n durationSubscriber = createOperatorSubscriber(subscriber, emit, noop);\n innerFrom(durationSelector(value)).subscribe(durationSubscriber);\n }, function () {\n emit();\n subscriber.complete();\n }, undefined, function () {\n lastValue = durationSubscriber = null;\n }));\n });\n}\n//# sourceMappingURL=debounce.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function debounceTime(dueTime, scheduler) {\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n return operate(function (source, subscriber) {\n var activeTask = null;\n var lastValue = null;\n var lastTime = null;\n var emit = function () {\n if (activeTask) {\n activeTask.unsubscribe();\n activeTask = null;\n var value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n };\n function emitWhenIdle() {\n var targetTime = lastTime + dueTime;\n var now = scheduler.now();\n if (now < targetTime) {\n activeTask = this.schedule(undefined, targetTime - now);\n subscriber.add(activeTask);\n return;\n }\n emit();\n }\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n lastValue = value;\n lastTime = scheduler.now();\n if (!activeTask) {\n activeTask = scheduler.schedule(emitWhenIdle, dueTime);\n subscriber.add(activeTask);\n }\n }, function () {\n emit();\n subscriber.complete();\n }, undefined, function () {\n lastValue = activeTask = null;\n }));\n });\n}\n//# sourceMappingURL=debounceTime.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function defaultIfEmpty(defaultValue) {\n return operate(function (source, subscriber) {\n var hasValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n hasValue = true;\n subscriber.next(value);\n }, function () {\n if (!hasValue) {\n subscriber.next(defaultValue);\n }\n subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=defaultIfEmpty.js.map","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function take(count) {\n return count <= 0\n ?\n function () { return EMPTY; }\n : operate(function (source, subscriber) {\n var seen = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n if (++seen <= count) {\n subscriber.next(value);\n if (count <= seen) {\n subscriber.complete();\n }\n }\n }));\n });\n}\n//# sourceMappingURL=take.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nexport function ignoreElements() {\n return operate(function (source, subscriber) {\n source.subscribe(createOperatorSubscriber(subscriber, noop));\n });\n}\n//# sourceMappingURL=ignoreElements.js.map","import { map } from './map';\nexport function mapTo(value) {\n return map(function () { return value; });\n}\n//# sourceMappingURL=mapTo.js.map","import { concat } from '../observable/concat';\nimport { take } from './take';\nimport { ignoreElements } from './ignoreElements';\nimport { mapTo } from './mapTo';\nimport { mergeMap } from './mergeMap';\nimport { innerFrom } from '../observable/innerFrom';\nexport function delayWhen(delayDurationSelector, subscriptionDelay) {\n if (subscriptionDelay) {\n return function (source) {\n return concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector)));\n };\n }\n return mergeMap(function (value, index) { return innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)); });\n}\n//# sourceMappingURL=delayWhen.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { delayWhen } from './delayWhen';\nimport { timer } from '../observable/timer';\nexport function delay(due, scheduler) {\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n var duration = timer(due, scheduler);\n return delayWhen(function () { return duration; });\n}\n//# sourceMappingURL=delay.js.map","import { observeNotification } from '../Notification';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function dematerialize() {\n return operate(function (source, subscriber) {\n source.subscribe(createOperatorSubscriber(subscriber, function (notification) { return observeNotification(notification, subscriber); }));\n });\n}\n//# sourceMappingURL=dematerialize.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nimport { innerFrom } from '../observable/innerFrom';\nexport function distinct(keySelector, flushes) {\n return operate(function (source, subscriber) {\n var distinctKeys = new Set();\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var key = keySelector ? keySelector(value) : value;\n if (!distinctKeys.has(key)) {\n distinctKeys.add(key);\n subscriber.next(value);\n }\n }));\n flushes && innerFrom(flushes).subscribe(createOperatorSubscriber(subscriber, function () { return distinctKeys.clear(); }, noop));\n });\n}\n//# sourceMappingURL=distinct.js.map","import { identity } from '../util/identity';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function distinctUntilChanged(comparator, keySelector) {\n if (keySelector === void 0) { keySelector = identity; }\n comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare;\n return operate(function (source, subscriber) {\n var previousKey;\n var first = true;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var currentKey = keySelector(value);\n if (first || !comparator(previousKey, currentKey)) {\n first = false;\n previousKey = currentKey;\n subscriber.next(value);\n }\n }));\n });\n}\nfunction defaultCompare(a, b) {\n return a === b;\n}\n//# sourceMappingURL=distinctUntilChanged.js.map","import { distinctUntilChanged } from './distinctUntilChanged';\nexport function distinctUntilKeyChanged(key, compare) {\n return distinctUntilChanged(function (x, y) { return (compare ? compare(x[key], y[key]) : x[key] === y[key]); });\n}\n//# sourceMappingURL=distinctUntilKeyChanged.js.map","import { EmptyError } from '../util/EmptyError';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function throwIfEmpty(errorFactory) {\n if (errorFactory === void 0) { errorFactory = defaultErrorFactory; }\n return operate(function (source, subscriber) {\n var hasValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n hasValue = true;\n subscriber.next(value);\n }, function () { return (hasValue ? subscriber.complete() : subscriber.error(errorFactory())); }));\n });\n}\nfunction defaultErrorFactory() {\n return new EmptyError();\n}\n//# sourceMappingURL=throwIfEmpty.js.map","import { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { filter } from './filter';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { take } from './take';\nexport function elementAt(index, defaultValue) {\n if (index < 0) {\n throw new ArgumentOutOfRangeError();\n }\n var hasDefaultValue = arguments.length >= 2;\n return function (source) {\n return source.pipe(filter(function (v, i) { return i === index; }), take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new ArgumentOutOfRangeError(); }));\n };\n}\n//# sourceMappingURL=elementAt.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { concat } from '../observable/concat';\nimport { of } from '../observable/of';\nexport function endWith() {\n var values = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n values[_i] = arguments[_i];\n }\n return function (source) { return concat(source, of.apply(void 0, __spreadArray([], __read(values)))); };\n}\n//# sourceMappingURL=endWith.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function every(predicate, thisArg) {\n return operate(function (source, subscriber) {\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n if (!predicate.call(thisArg, value, index++, source)) {\n subscriber.next(false);\n subscriber.complete();\n }\n }, function () {\n subscriber.next(true);\n subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=every.js.map","import { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function exhaustMap(project, resultSelector) {\n if (resultSelector) {\n return function (source) {\n return source.pipe(exhaustMap(function (a, i) { return innerFrom(project(a, i)).pipe(map(function (b, ii) { return resultSelector(a, b, i, ii); })); }));\n };\n }\n return operate(function (source, subscriber) {\n var index = 0;\n var innerSub = null;\n var isComplete = false;\n source.subscribe(createOperatorSubscriber(subscriber, function (outerValue) {\n if (!innerSub) {\n innerSub = createOperatorSubscriber(subscriber, undefined, function () {\n innerSub = null;\n isComplete && subscriber.complete();\n });\n innerFrom(project(outerValue, index++)).subscribe(innerSub);\n }\n }, function () {\n isComplete = true;\n !innerSub && subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=exhaustMap.js.map","import { exhaustMap } from './exhaustMap';\nimport { identity } from '../util/identity';\nexport function exhaustAll() {\n return exhaustMap(identity);\n}\n//# sourceMappingURL=exhaustAll.js.map","import { exhaustAll } from './exhaustAll';\nexport var exhaust = exhaustAll;\n//# sourceMappingURL=exhaust.js.map","import { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nexport function expand(project, concurrent, scheduler) {\n if (concurrent === void 0) { concurrent = Infinity; }\n concurrent = (concurrent || 0) < 1 ? Infinity : concurrent;\n return operate(function (source, subscriber) {\n return mergeInternals(source, subscriber, project, concurrent, undefined, true, scheduler);\n });\n}\n//# sourceMappingURL=expand.js.map","import { operate } from '../util/lift';\nexport function finalize(callback) {\n return operate(function (source, subscriber) {\n try {\n source.subscribe(subscriber);\n }\n finally {\n subscriber.add(callback);\n }\n });\n}\n//# sourceMappingURL=finalize.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function find(predicate, thisArg) {\n return operate(createFind(predicate, thisArg, 'value'));\n}\nexport function createFind(predicate, thisArg, emit) {\n var findIndex = emit === 'index';\n return function (source, subscriber) {\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var i = index++;\n if (predicate.call(thisArg, value, i, source)) {\n subscriber.next(findIndex ? i : value);\n subscriber.complete();\n }\n }, function () {\n subscriber.next(findIndex ? -1 : undefined);\n subscriber.complete();\n }));\n };\n}\n//# sourceMappingURL=find.js.map","import { operate } from '../util/lift';\nimport { createFind } from './find';\nexport function findIndex(predicate, thisArg) {\n return operate(createFind(predicate, thisArg, 'index'));\n}\n//# sourceMappingURL=findIndex.js.map","import { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { take } from './take';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { identity } from '../util/identity';\nexport function first(predicate, defaultValue) {\n var hasDefaultValue = arguments.length >= 2;\n return function (source) {\n return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError(); }));\n };\n}\n//# sourceMappingURL=first.js.map","import { Observable } from '../Observable';\nimport { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber, OperatorSubscriber } from './OperatorSubscriber';\nexport function groupBy(keySelector, elementOrOptions, duration, connector) {\n return operate(function (source, subscriber) {\n var element;\n if (!elementOrOptions || typeof elementOrOptions === 'function') {\n element = elementOrOptions;\n }\n else {\n (duration = elementOrOptions.duration, element = elementOrOptions.element, connector = elementOrOptions.connector);\n }\n var groups = new Map();\n var notify = function (cb) {\n groups.forEach(cb);\n cb(subscriber);\n };\n var handleError = function (err) { return notify(function (consumer) { return consumer.error(err); }); };\n var activeGroups = 0;\n var teardownAttempted = false;\n var groupBySourceSubscriber = new OperatorSubscriber(subscriber, function (value) {\n try {\n var key_1 = keySelector(value);\n var group_1 = groups.get(key_1);\n if (!group_1) {\n groups.set(key_1, (group_1 = connector ? connector() : new Subject()));\n var grouped = createGroupedObservable(key_1, group_1);\n subscriber.next(grouped);\n if (duration) {\n var durationSubscriber_1 = createOperatorSubscriber(group_1, function () {\n group_1.complete();\n durationSubscriber_1 === null || durationSubscriber_1 === void 0 ? void 0 : durationSubscriber_1.unsubscribe();\n }, undefined, undefined, function () { return groups.delete(key_1); });\n groupBySourceSubscriber.add(innerFrom(duration(grouped)).subscribe(durationSubscriber_1));\n }\n }\n group_1.next(element ? element(value) : value);\n }\n catch (err) {\n handleError(err);\n }\n }, function () { return notify(function (consumer) { return consumer.complete(); }); }, handleError, function () { return groups.clear(); }, function () {\n teardownAttempted = true;\n return activeGroups === 0;\n });\n source.subscribe(groupBySourceSubscriber);\n function createGroupedObservable(key, groupSubject) {\n var result = new Observable(function (groupSubscriber) {\n activeGroups++;\n var innerSub = groupSubject.subscribe(groupSubscriber);\n return function () {\n innerSub.unsubscribe();\n --activeGroups === 0 && teardownAttempted && groupBySourceSubscriber.unsubscribe();\n };\n });\n result.key = key;\n return result;\n }\n });\n}\n//# sourceMappingURL=groupBy.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function isEmpty() {\n return operate(function (source, subscriber) {\n source.subscribe(createOperatorSubscriber(subscriber, function () {\n subscriber.next(false);\n subscriber.complete();\n }, function () {\n subscriber.next(true);\n subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=isEmpty.js.map","import { __values } from \"tslib\";\nimport { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function takeLast(count) {\n return count <= 0\n ? function () { return EMPTY; }\n : operate(function (source, subscriber) {\n var buffer = [];\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n buffer.push(value);\n count < buffer.length && buffer.shift();\n }, function () {\n var e_1, _a;\n try {\n for (var buffer_1 = __values(buffer), buffer_1_1 = buffer_1.next(); !buffer_1_1.done; buffer_1_1 = buffer_1.next()) {\n var value = buffer_1_1.value;\n subscriber.next(value);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (buffer_1_1 && !buffer_1_1.done && (_a = buffer_1.return)) _a.call(buffer_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n subscriber.complete();\n }, undefined, function () {\n buffer = null;\n }));\n });\n}\n//# sourceMappingURL=takeLast.js.map","import { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { takeLast } from './takeLast';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { identity } from '../util/identity';\nexport function last(predicate, defaultValue) {\n var hasDefaultValue = arguments.length >= 2;\n return function (source) {\n return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity, takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError(); }));\n };\n}\n//# sourceMappingURL=last.js.map","import { Notification } from '../Notification';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function materialize() {\n return operate(function (source, subscriber) {\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n subscriber.next(Notification.createNext(value));\n }, function () {\n subscriber.next(Notification.createComplete());\n subscriber.complete();\n }, function (err) {\n subscriber.next(Notification.createError(err));\n subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=materialize.js.map","import { reduce } from './reduce';\nimport { isFunction } from '../util/isFunction';\nexport function max(comparer) {\n return reduce(isFunction(comparer) ? function (x, y) { return (comparer(x, y) > 0 ? x : y); } : function (x, y) { return (x > y ? x : y); });\n}\n//# sourceMappingURL=max.js.map","import { mergeMap } from './mergeMap';\nexport var flatMap = mergeMap;\n//# sourceMappingURL=flatMap.js.map","import { mergeMap } from './mergeMap';\nimport { isFunction } from '../util/isFunction';\nexport function mergeMapTo(innerObservable, resultSelector, concurrent) {\n if (concurrent === void 0) { concurrent = Infinity; }\n if (isFunction(resultSelector)) {\n return mergeMap(function () { return innerObservable; }, resultSelector, concurrent);\n }\n if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return mergeMap(function () { return innerObservable; }, concurrent);\n}\n//# sourceMappingURL=mergeMapTo.js.map","import { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nexport function mergeScan(accumulator, seed, concurrent) {\n if (concurrent === void 0) { concurrent = Infinity; }\n return operate(function (source, subscriber) {\n var state = seed;\n return mergeInternals(source, subscriber, function (value, index) { return accumulator(state, value, index); }, concurrent, function (value) {\n state = value;\n }, false, undefined, function () { return (state = null); });\n });\n}\n//# sourceMappingURL=mergeScan.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { operate } from '../util/lift';\nimport { mergeAll } from './mergeAll';\nimport { popNumber, popScheduler } from '../util/args';\nimport { from } from '../observable/from';\nexport function merge() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = popScheduler(args);\n var concurrent = popNumber(args, Infinity);\n return operate(function (source, subscriber) {\n mergeAll(concurrent)(from(__spreadArray([source], __read(args)), scheduler)).subscribe(subscriber);\n });\n}\n//# sourceMappingURL=merge.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { merge } from './merge';\nexport function mergeWith() {\n var otherSources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n otherSources[_i] = arguments[_i];\n }\n return merge.apply(void 0, __spreadArray([], __read(otherSources)));\n}\n//# sourceMappingURL=mergeWith.js.map","import { reduce } from './reduce';\nimport { isFunction } from '../util/isFunction';\nexport function min(comparer) {\n return reduce(isFunction(comparer) ? function (x, y) { return (comparer(x, y) < 0 ? x : y); } : function (x, y) { return (x < y ? x : y); });\n}\n//# sourceMappingURL=min.js.map","import { ConnectableObservable } from '../observable/ConnectableObservable';\nimport { isFunction } from '../util/isFunction';\nimport { connect } from './connect';\nexport function multicast(subjectOrSubjectFactory, selector) {\n var subjectFactory = isFunction(subjectOrSubjectFactory) ? subjectOrSubjectFactory : function () { return subjectOrSubjectFactory; };\n if (isFunction(selector)) {\n return connect(selector, {\n connector: subjectFactory,\n });\n }\n return function (source) { return new ConnectableObservable(source, subjectFactory); };\n}\n//# sourceMappingURL=multicast.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { onErrorResumeNext as oERNCreate } from '../observable/onErrorResumeNext';\nexport function onErrorResumeNextWith() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n var nextSources = argsOrArgArray(sources);\n return function (source) { return oERNCreate.apply(void 0, __spreadArray([source], __read(nextSources))); };\n}\nexport var onErrorResumeNext = onErrorResumeNextWith;\n//# sourceMappingURL=onErrorResumeNextWith.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function pairwise() {\n return operate(function (source, subscriber) {\n var prev;\n var hasPrev = false;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var p = prev;\n prev = value;\n hasPrev && subscriber.next([p, value]);\n hasPrev = true;\n }));\n });\n}\n//# sourceMappingURL=pairwise.js.map","import { map } from './map';\nexport function pluck() {\n var properties = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n properties[_i] = arguments[_i];\n }\n var length = properties.length;\n if (length === 0) {\n throw new Error('list of properties cannot be empty.');\n }\n return map(function (x) {\n var currentProp = x;\n for (var i = 0; i < length; i++) {\n var p = currentProp === null || currentProp === void 0 ? void 0 : currentProp[properties[i]];\n if (typeof p !== 'undefined') {\n currentProp = p;\n }\n else {\n return undefined;\n }\n }\n return currentProp;\n });\n}\n//# sourceMappingURL=pluck.js.map","import { Subject } from '../Subject';\nimport { multicast } from './multicast';\nimport { connect } from './connect';\nexport function publish(selector) {\n return selector ? function (source) { return connect(selector)(source); } : function (source) { return multicast(new Subject())(source); };\n}\n//# sourceMappingURL=publish.js.map","import { BehaviorSubject } from '../BehaviorSubject';\nimport { ConnectableObservable } from '../observable/ConnectableObservable';\nexport function publishBehavior(initialValue) {\n return function (source) {\n var subject = new BehaviorSubject(initialValue);\n return new ConnectableObservable(source, function () { return subject; });\n };\n}\n//# sourceMappingURL=publishBehavior.js.map","import { AsyncSubject } from '../AsyncSubject';\nimport { ConnectableObservable } from '../observable/ConnectableObservable';\nexport function publishLast() {\n return function (source) {\n var subject = new AsyncSubject();\n return new ConnectableObservable(source, function () { return subject; });\n };\n}\n//# sourceMappingURL=publishLast.js.map","import { ReplaySubject } from '../ReplaySubject';\nimport { multicast } from './multicast';\nimport { isFunction } from '../util/isFunction';\nexport function publishReplay(bufferSize, windowTime, selectorOrScheduler, timestampProvider) {\n if (selectorOrScheduler && !isFunction(selectorOrScheduler)) {\n timestampProvider = selectorOrScheduler;\n }\n var selector = isFunction(selectorOrScheduler) ? selectorOrScheduler : undefined;\n return function (source) { return multicast(new ReplaySubject(bufferSize, windowTime, timestampProvider), selector)(source); };\n}\n//# sourceMappingURL=publishReplay.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { raceInit } from '../observable/race';\nimport { operate } from '../util/lift';\nimport { identity } from '../util/identity';\nexport function raceWith() {\n var otherSources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n otherSources[_i] = arguments[_i];\n }\n return !otherSources.length\n ? identity\n : operate(function (source, subscriber) {\n raceInit(__spreadArray([source], __read(otherSources)))(subscriber);\n });\n}\n//# sourceMappingURL=raceWith.js.map","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { timer } from '../observable/timer';\nexport function repeat(countOrConfig) {\n var _a;\n var count = Infinity;\n var delay;\n if (countOrConfig != null) {\n if (typeof countOrConfig === 'object') {\n (_a = countOrConfig.count, count = _a === void 0 ? Infinity : _a, delay = countOrConfig.delay);\n }\n else {\n count = countOrConfig;\n }\n }\n return count <= 0\n ? function () { return EMPTY; }\n : operate(function (source, subscriber) {\n var soFar = 0;\n var sourceSub;\n var resubscribe = function () {\n sourceSub === null || sourceSub === void 0 ? void 0 : sourceSub.unsubscribe();\n sourceSub = null;\n if (delay != null) {\n var notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(soFar));\n var notifierSubscriber_1 = createOperatorSubscriber(subscriber, function () {\n notifierSubscriber_1.unsubscribe();\n subscribeToSource();\n });\n notifier.subscribe(notifierSubscriber_1);\n }\n else {\n subscribeToSource();\n }\n };\n var subscribeToSource = function () {\n var syncUnsub = false;\n sourceSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, function () {\n if (++soFar < count) {\n if (sourceSub) {\n resubscribe();\n }\n else {\n syncUnsub = true;\n }\n }\n else {\n subscriber.complete();\n }\n }));\n if (syncUnsub) {\n resubscribe();\n }\n };\n subscribeToSource();\n });\n}\n//# sourceMappingURL=repeat.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function repeatWhen(notifier) {\n return operate(function (source, subscriber) {\n var innerSub;\n var syncResub = false;\n var completions$;\n var isNotifierComplete = false;\n var isMainComplete = false;\n var checkComplete = function () { return isMainComplete && isNotifierComplete && (subscriber.complete(), true); };\n var getCompletionSubject = function () {\n if (!completions$) {\n completions$ = new Subject();\n innerFrom(notifier(completions$)).subscribe(createOperatorSubscriber(subscriber, function () {\n if (innerSub) {\n subscribeForRepeatWhen();\n }\n else {\n syncResub = true;\n }\n }, function () {\n isNotifierComplete = true;\n checkComplete();\n }));\n }\n return completions$;\n };\n var subscribeForRepeatWhen = function () {\n isMainComplete = false;\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, function () {\n isMainComplete = true;\n !checkComplete() && getCompletionSubject().next();\n }));\n if (syncResub) {\n innerSub.unsubscribe();\n innerSub = null;\n syncResub = false;\n subscribeForRepeatWhen();\n }\n };\n subscribeForRepeatWhen();\n });\n}\n//# sourceMappingURL=repeatWhen.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { identity } from '../util/identity';\nimport { timer } from '../observable/timer';\nimport { innerFrom } from '../observable/innerFrom';\nexport function retry(configOrCount) {\n if (configOrCount === void 0) { configOrCount = Infinity; }\n var config;\n if (configOrCount && typeof configOrCount === 'object') {\n config = configOrCount;\n }\n else {\n config = {\n count: configOrCount,\n };\n }\n var _a = config.count, count = _a === void 0 ? Infinity : _a, delay = config.delay, _b = config.resetOnSuccess, resetOnSuccess = _b === void 0 ? false : _b;\n return count <= 0\n ? identity\n : operate(function (source, subscriber) {\n var soFar = 0;\n var innerSub;\n var subscribeForRetry = function () {\n var syncUnsub = false;\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n if (resetOnSuccess) {\n soFar = 0;\n }\n subscriber.next(value);\n }, undefined, function (err) {\n if (soFar++ < count) {\n var resub_1 = function () {\n if (innerSub) {\n innerSub.unsubscribe();\n innerSub = null;\n subscribeForRetry();\n }\n else {\n syncUnsub = true;\n }\n };\n if (delay != null) {\n var notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(err, soFar));\n var notifierSubscriber_1 = createOperatorSubscriber(subscriber, function () {\n notifierSubscriber_1.unsubscribe();\n resub_1();\n }, function () {\n subscriber.complete();\n });\n notifier.subscribe(notifierSubscriber_1);\n }\n else {\n resub_1();\n }\n }\n else {\n subscriber.error(err);\n }\n }));\n if (syncUnsub) {\n innerSub.unsubscribe();\n innerSub = null;\n subscribeForRetry();\n }\n };\n subscribeForRetry();\n });\n}\n//# sourceMappingURL=retry.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function retryWhen(notifier) {\n return operate(function (source, subscriber) {\n var innerSub;\n var syncResub = false;\n var errors$;\n var subscribeForRetryWhen = function () {\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, function (err) {\n if (!errors$) {\n errors$ = new Subject();\n innerFrom(notifier(errors$)).subscribe(createOperatorSubscriber(subscriber, function () {\n return innerSub ? subscribeForRetryWhen() : (syncResub = true);\n }));\n }\n if (errors$) {\n errors$.next(err);\n }\n }));\n if (syncResub) {\n innerSub.unsubscribe();\n innerSub = null;\n syncResub = false;\n subscribeForRetryWhen();\n }\n };\n subscribeForRetryWhen();\n });\n}\n//# sourceMappingURL=retryWhen.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { noop } from '../util/noop';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function sample(notifier) {\n return operate(function (source, subscriber) {\n var hasValue = false;\n var lastValue = null;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n hasValue = true;\n lastValue = value;\n }));\n innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, function () {\n if (hasValue) {\n hasValue = false;\n var value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n }, noop));\n });\n}\n//# sourceMappingURL=sample.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { sample } from './sample';\nimport { interval } from '../observable/interval';\nexport function sampleTime(period, scheduler) {\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n return sample(interval(period, scheduler));\n}\n//# sourceMappingURL=sampleTime.js.map","import { operate } from '../util/lift';\nimport { scanInternals } from './scanInternals';\nexport function scan(accumulator, seed) {\n return operate(scanInternals(accumulator, seed, arguments.length >= 2, true));\n}\n//# sourceMappingURL=scan.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function sequenceEqual(compareTo, comparator) {\n if (comparator === void 0) { comparator = function (a, b) { return a === b; }; }\n return operate(function (source, subscriber) {\n var aState = createState();\n var bState = createState();\n var emit = function (isEqual) {\n subscriber.next(isEqual);\n subscriber.complete();\n };\n var createSubscriber = function (selfState, otherState) {\n var sequenceEqualSubscriber = createOperatorSubscriber(subscriber, function (a) {\n var buffer = otherState.buffer, complete = otherState.complete;\n if (buffer.length === 0) {\n complete ? emit(false) : selfState.buffer.push(a);\n }\n else {\n !comparator(a, buffer.shift()) && emit(false);\n }\n }, function () {\n selfState.complete = true;\n var complete = otherState.complete, buffer = otherState.buffer;\n complete && emit(buffer.length === 0);\n sequenceEqualSubscriber === null || sequenceEqualSubscriber === void 0 ? void 0 : sequenceEqualSubscriber.unsubscribe();\n });\n return sequenceEqualSubscriber;\n };\n source.subscribe(createSubscriber(aState, bState));\n innerFrom(compareTo).subscribe(createSubscriber(bState, aState));\n });\n}\nfunction createState() {\n return {\n buffer: [],\n complete: false,\n };\n}\n//# sourceMappingURL=sequenceEqual.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { SafeSubscriber } from '../Subscriber';\nimport { operate } from '../util/lift';\nexport function share(options) {\n if (options === void 0) { options = {}; }\n var _a = options.connector, connector = _a === void 0 ? function () { return new Subject(); } : _a, _b = options.resetOnError, resetOnError = _b === void 0 ? true : _b, _c = options.resetOnComplete, resetOnComplete = _c === void 0 ? true : _c, _d = options.resetOnRefCountZero, resetOnRefCountZero = _d === void 0 ? true : _d;\n return function (wrapperSource) {\n var connection;\n var resetConnection;\n var subject;\n var refCount = 0;\n var hasCompleted = false;\n var hasErrored = false;\n var cancelReset = function () {\n resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe();\n resetConnection = undefined;\n };\n var reset = function () {\n cancelReset();\n connection = subject = undefined;\n hasCompleted = hasErrored = false;\n };\n var resetAndUnsubscribe = function () {\n var conn = connection;\n reset();\n conn === null || conn === void 0 ? void 0 : conn.unsubscribe();\n };\n return operate(function (source, subscriber) {\n refCount++;\n if (!hasErrored && !hasCompleted) {\n cancelReset();\n }\n var dest = (subject = subject !== null && subject !== void 0 ? subject : connector());\n subscriber.add(function () {\n refCount--;\n if (refCount === 0 && !hasErrored && !hasCompleted) {\n resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero);\n }\n });\n dest.subscribe(subscriber);\n if (!connection &&\n refCount > 0) {\n connection = new SafeSubscriber({\n next: function (value) { return dest.next(value); },\n error: function (err) {\n hasErrored = true;\n cancelReset();\n resetConnection = handleReset(reset, resetOnError, err);\n dest.error(err);\n },\n complete: function () {\n hasCompleted = true;\n cancelReset();\n resetConnection = handleReset(reset, resetOnComplete);\n dest.complete();\n },\n });\n innerFrom(source).subscribe(connection);\n }\n })(wrapperSource);\n };\n}\nfunction handleReset(reset, on) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n if (on === true) {\n reset();\n return;\n }\n if (on === false) {\n return;\n }\n var onSubscriber = new SafeSubscriber({\n next: function () {\n onSubscriber.unsubscribe();\n reset();\n },\n });\n return innerFrom(on.apply(void 0, __spreadArray([], __read(args)))).subscribe(onSubscriber);\n}\n//# sourceMappingURL=share.js.map","import { ReplaySubject } from '../ReplaySubject';\nimport { share } from './share';\nexport function shareReplay(configOrBufferSize, windowTime, scheduler) {\n var _a, _b, _c;\n var bufferSize;\n var refCount = false;\n if (configOrBufferSize && typeof configOrBufferSize === 'object') {\n (_a = configOrBufferSize.bufferSize, bufferSize = _a === void 0 ? Infinity : _a, _b = configOrBufferSize.windowTime, windowTime = _b === void 0 ? Infinity : _b, _c = configOrBufferSize.refCount, refCount = _c === void 0 ? false : _c, scheduler = configOrBufferSize.scheduler);\n }\n else {\n bufferSize = (configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity);\n }\n return share({\n connector: function () { return new ReplaySubject(bufferSize, windowTime, scheduler); },\n resetOnError: true,\n resetOnComplete: false,\n resetOnRefCountZero: refCount,\n });\n}\n//# sourceMappingURL=shareReplay.js.map","import { EmptyError } from '../util/EmptyError';\nimport { SequenceError } from '../util/SequenceError';\nimport { NotFoundError } from '../util/NotFoundError';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function single(predicate) {\n return operate(function (source, subscriber) {\n var hasValue = false;\n var singleValue;\n var seenValue = false;\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n seenValue = true;\n if (!predicate || predicate(value, index++, source)) {\n hasValue && subscriber.error(new SequenceError('Too many matching values'));\n hasValue = true;\n singleValue = value;\n }\n }, function () {\n if (hasValue) {\n subscriber.next(singleValue);\n subscriber.complete();\n }\n else {\n subscriber.error(seenValue ? new NotFoundError('No matching values') : new EmptyError());\n }\n }));\n });\n}\n//# sourceMappingURL=single.js.map","import { filter } from './filter';\nexport function skip(count) {\n return filter(function (_, index) { return count <= index; });\n}\n//# sourceMappingURL=skip.js.map","import { identity } from '../util/identity';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function skipLast(skipCount) {\n return skipCount <= 0\n ?\n identity\n : operate(function (source, subscriber) {\n var ring = new Array(skipCount);\n var seen = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var valueIndex = seen++;\n if (valueIndex < skipCount) {\n ring[valueIndex] = value;\n }\n else {\n var index = valueIndex % skipCount;\n var oldValue = ring[index];\n ring[index] = value;\n subscriber.next(oldValue);\n }\n }));\n return function () {\n ring = null;\n };\n });\n}\n//# sourceMappingURL=skipLast.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { noop } from '../util/noop';\nexport function skipUntil(notifier) {\n return operate(function (source, subscriber) {\n var taking = false;\n var skipSubscriber = createOperatorSubscriber(subscriber, function () {\n skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe();\n taking = true;\n }, noop);\n innerFrom(notifier).subscribe(skipSubscriber);\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return taking && subscriber.next(value); }));\n });\n}\n//# sourceMappingURL=skipUntil.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function skipWhile(predicate) {\n return operate(function (source, subscriber) {\n var taking = false;\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return (taking || (taking = !predicate(value, index++))) && subscriber.next(value); }));\n });\n}\n//# sourceMappingURL=skipWhile.js.map","import { concat } from '../observable/concat';\nimport { popScheduler } from '../util/args';\nimport { operate } from '../util/lift';\nexport function startWith() {\n var values = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n values[_i] = arguments[_i];\n }\n var scheduler = popScheduler(values);\n return operate(function (source, subscriber) {\n (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber);\n });\n}\n//# sourceMappingURL=startWith.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function switchMap(project, resultSelector) {\n return operate(function (source, subscriber) {\n var innerSubscriber = null;\n var index = 0;\n var isComplete = false;\n var checkComplete = function () { return isComplete && !innerSubscriber && subscriber.complete(); };\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe();\n var innerIndex = 0;\n var outerIndex = index++;\n innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = createOperatorSubscriber(subscriber, function (innerValue) { return subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue); }, function () {\n innerSubscriber = null;\n checkComplete();\n })));\n }, function () {\n isComplete = true;\n checkComplete();\n }));\n });\n}\n//# sourceMappingURL=switchMap.js.map","import { switchMap } from './switchMap';\nimport { identity } from '../util/identity';\nexport function switchAll() {\n return switchMap(identity);\n}\n//# sourceMappingURL=switchAll.js.map","import { switchMap } from './switchMap';\nimport { isFunction } from '../util/isFunction';\nexport function switchMapTo(innerObservable, resultSelector) {\n return isFunction(resultSelector) ? switchMap(function () { return innerObservable; }, resultSelector) : switchMap(function () { return innerObservable; });\n}\n//# sourceMappingURL=switchMapTo.js.map","import { switchMap } from './switchMap';\nimport { operate } from '../util/lift';\nexport function switchScan(accumulator, seed) {\n return operate(function (source, subscriber) {\n var state = seed;\n switchMap(function (value, index) { return accumulator(state, value, index); }, function (_, innerValue) { return ((state = innerValue), innerValue); })(source).subscribe(subscriber);\n return function () {\n state = null;\n };\n });\n}\n//# sourceMappingURL=switchScan.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { noop } from '../util/noop';\nexport function takeUntil(notifier) {\n return operate(function (source, subscriber) {\n innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, function () { return subscriber.complete(); }, noop));\n !subscriber.closed && source.subscribe(subscriber);\n });\n}\n//# sourceMappingURL=takeUntil.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function takeWhile(predicate, inclusive) {\n if (inclusive === void 0) { inclusive = false; }\n return operate(function (source, subscriber) {\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var result = predicate(value, index++);\n (result || inclusive) && subscriber.next(value);\n !result && subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=takeWhile.js.map","import { isFunction } from '../util/isFunction';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { identity } from '../util/identity';\nexport function tap(observerOrNext, error, complete) {\n var tapObserver = isFunction(observerOrNext) || error || complete\n ?\n { next: observerOrNext, error: error, complete: complete }\n : observerOrNext;\n return tapObserver\n ? operate(function (source, subscriber) {\n var _a;\n (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n var isUnsub = true;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var _a;\n (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value);\n subscriber.next(value);\n }, function () {\n var _a;\n isUnsub = false;\n (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n subscriber.complete();\n }, function (err) {\n var _a;\n isUnsub = false;\n (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err);\n subscriber.error(err);\n }, function () {\n var _a, _b;\n if (isUnsub) {\n (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n }\n (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver);\n }));\n })\n :\n identity;\n}\n//# sourceMappingURL=tap.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function throttle(durationSelector, config) {\n return operate(function (source, subscriber) {\n var _a = config !== null && config !== void 0 ? config : {}, _b = _a.leading, leading = _b === void 0 ? true : _b, _c = _a.trailing, trailing = _c === void 0 ? false : _c;\n var hasValue = false;\n var sendValue = null;\n var throttled = null;\n var isComplete = false;\n var endThrottling = function () {\n throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe();\n throttled = null;\n if (trailing) {\n send();\n isComplete && subscriber.complete();\n }\n };\n var cleanupThrottling = function () {\n throttled = null;\n isComplete && subscriber.complete();\n };\n var startThrottle = function (value) {\n return (throttled = innerFrom(durationSelector(value)).subscribe(createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling)));\n };\n var send = function () {\n if (hasValue) {\n hasValue = false;\n var value = sendValue;\n sendValue = null;\n subscriber.next(value);\n !isComplete && startThrottle(value);\n }\n };\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n hasValue = true;\n sendValue = value;\n !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value));\n }, function () {\n isComplete = true;\n !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=throttle.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { throttle } from './throttle';\nimport { timer } from '../observable/timer';\nexport function throttleTime(duration, scheduler, config) {\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n var duration$ = timer(duration, scheduler);\n return throttle(function () { return duration$; }, config);\n}\n//# sourceMappingURL=throttleTime.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function timeInterval(scheduler) {\n if (scheduler === void 0) { scheduler = asyncScheduler; }\n return operate(function (source, subscriber) {\n var last = scheduler.now();\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var now = scheduler.now();\n var interval = now - last;\n last = now;\n subscriber.next(new TimeInterval(value, interval));\n }));\n });\n}\nvar TimeInterval = (function () {\n function TimeInterval(value, interval) {\n this.value = value;\n this.interval = interval;\n }\n return TimeInterval;\n}());\nexport { TimeInterval };\n//# sourceMappingURL=timeInterval.js.map","import { async } from '../scheduler/async';\nimport { isValidDate } from '../util/isDate';\nimport { timeout } from './timeout';\nexport function timeoutWith(due, withObservable, scheduler) {\n var first;\n var each;\n var _with;\n scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : async;\n if (isValidDate(due)) {\n first = due;\n }\n else if (typeof due === 'number') {\n each = due;\n }\n if (withObservable) {\n _with = function () { return withObservable; };\n }\n else {\n throw new TypeError('No observable provided to switch to');\n }\n if (first == null && each == null) {\n throw new TypeError('No timeout provided.');\n }\n return timeout({\n first: first,\n each: each,\n scheduler: scheduler,\n with: _with,\n });\n}\n//# sourceMappingURL=timeoutWith.js.map","import { dateTimestampProvider } from '../scheduler/dateTimestampProvider';\nimport { map } from './map';\nexport function timestamp(timestampProvider) {\n if (timestampProvider === void 0) { timestampProvider = dateTimestampProvider; }\n return map(function (value) { return ({ value: value, timestamp: timestampProvider.now() }); });\n}\n//# sourceMappingURL=timestamp.js.map","import { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nimport { innerFrom } from '../observable/innerFrom';\nexport function window(windowBoundaries) {\n return operate(function (source, subscriber) {\n var windowSubject = new Subject();\n subscriber.next(windowSubject.asObservable());\n var errorHandler = function (err) {\n windowSubject.error(err);\n subscriber.error(err);\n };\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.next(value); }, function () {\n windowSubject.complete();\n subscriber.complete();\n }, errorHandler));\n innerFrom(windowBoundaries).subscribe(createOperatorSubscriber(subscriber, function () {\n windowSubject.complete();\n subscriber.next((windowSubject = new Subject()));\n }, noop, errorHandler));\n return function () {\n windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.unsubscribe();\n windowSubject = null;\n };\n });\n}\n//# sourceMappingURL=window.js.map","import { __values } from \"tslib\";\nimport { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function windowCount(windowSize, startWindowEvery) {\n if (startWindowEvery === void 0) { startWindowEvery = 0; }\n var startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize;\n return operate(function (source, subscriber) {\n var windows = [new Subject()];\n var starts = [];\n var count = 0;\n subscriber.next(windows[0].asObservable());\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var e_1, _a;\n try {\n for (var windows_1 = __values(windows), windows_1_1 = windows_1.next(); !windows_1_1.done; windows_1_1 = windows_1.next()) {\n var window_1 = windows_1_1.value;\n window_1.next(value);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (windows_1_1 && !windows_1_1.done && (_a = windows_1.return)) _a.call(windows_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n var c = count - windowSize + 1;\n if (c >= 0 && c % startEvery === 0) {\n windows.shift().complete();\n }\n if (++count % startEvery === 0) {\n var window_2 = new Subject();\n windows.push(window_2);\n subscriber.next(window_2.asObservable());\n }\n }, function () {\n while (windows.length > 0) {\n windows.shift().complete();\n }\n subscriber.complete();\n }, function (err) {\n while (windows.length > 0) {\n windows.shift().error(err);\n }\n subscriber.error(err);\n }, function () {\n starts = null;\n windows = null;\n }));\n });\n}\n//# sourceMappingURL=windowCount.js.map","import { Subject } from '../Subject';\nimport { asyncScheduler } from '../scheduler/async';\nimport { Subscription } from '../Subscription';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { arrRemove } from '../util/arrRemove';\nimport { popScheduler } from '../util/args';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function windowTime(windowTimeSpan) {\n var _a, _b;\n var otherArgs = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n otherArgs[_i - 1] = arguments[_i];\n }\n var scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler;\n var windowCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null;\n var maxWindowSize = otherArgs[1] || Infinity;\n return operate(function (source, subscriber) {\n var windowRecords = [];\n var restartOnClose = false;\n var closeWindow = function (record) {\n var window = record.window, subs = record.subs;\n window.complete();\n subs.unsubscribe();\n arrRemove(windowRecords, record);\n restartOnClose && startWindow();\n };\n var startWindow = function () {\n if (windowRecords) {\n var subs = new Subscription();\n subscriber.add(subs);\n var window_1 = new Subject();\n var record_1 = {\n window: window_1,\n subs: subs,\n seen: 0,\n };\n windowRecords.push(record_1);\n subscriber.next(window_1.asObservable());\n executeSchedule(subs, scheduler, function () { return closeWindow(record_1); }, windowTimeSpan);\n }\n };\n if (windowCreationInterval !== null && windowCreationInterval >= 0) {\n executeSchedule(subscriber, scheduler, startWindow, windowCreationInterval, true);\n }\n else {\n restartOnClose = true;\n }\n startWindow();\n var loop = function (cb) { return windowRecords.slice().forEach(cb); };\n var terminate = function (cb) {\n loop(function (_a) {\n var window = _a.window;\n return cb(window);\n });\n cb(subscriber);\n subscriber.unsubscribe();\n };\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n loop(function (record) {\n record.window.next(value);\n maxWindowSize <= ++record.seen && closeWindow(record);\n });\n }, function () { return terminate(function (consumer) { return consumer.complete(); }); }, function (err) { return terminate(function (consumer) { return consumer.error(err); }); }));\n return function () {\n windowRecords = null;\n };\n });\n}\n//# sourceMappingURL=windowTime.js.map","import { __values } from \"tslib\";\nimport { Subject } from '../Subject';\nimport { Subscription } from '../Subscription';\nimport { operate } from '../util/lift';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nimport { arrRemove } from '../util/arrRemove';\nexport function windowToggle(openings, closingSelector) {\n return operate(function (source, subscriber) {\n var windows = [];\n var handleError = function (err) {\n while (0 < windows.length) {\n windows.shift().error(err);\n }\n subscriber.error(err);\n };\n innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, function (openValue) {\n var window = new Subject();\n windows.push(window);\n var closingSubscription = new Subscription();\n var closeWindow = function () {\n arrRemove(windows, window);\n window.complete();\n closingSubscription.unsubscribe();\n };\n var closingNotifier;\n try {\n closingNotifier = innerFrom(closingSelector(openValue));\n }\n catch (err) {\n handleError(err);\n return;\n }\n subscriber.next(window.asObservable());\n closingSubscription.add(closingNotifier.subscribe(createOperatorSubscriber(subscriber, closeWindow, noop, handleError)));\n }, noop));\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n var e_1, _a;\n var windowsCopy = windows.slice();\n try {\n for (var windowsCopy_1 = __values(windowsCopy), windowsCopy_1_1 = windowsCopy_1.next(); !windowsCopy_1_1.done; windowsCopy_1_1 = windowsCopy_1.next()) {\n var window_1 = windowsCopy_1_1.value;\n window_1.next(value);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (windowsCopy_1_1 && !windowsCopy_1_1.done && (_a = windowsCopy_1.return)) _a.call(windowsCopy_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }, function () {\n while (0 < windows.length) {\n windows.shift().complete();\n }\n subscriber.complete();\n }, handleError, function () {\n while (0 < windows.length) {\n windows.shift().unsubscribe();\n }\n }));\n });\n}\n//# sourceMappingURL=windowToggle.js.map","import { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function windowWhen(closingSelector) {\n return operate(function (source, subscriber) {\n var window;\n var closingSubscriber;\n var handleError = function (err) {\n window.error(err);\n subscriber.error(err);\n };\n var openWindow = function () {\n closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe();\n window === null || window === void 0 ? void 0 : window.complete();\n window = new Subject();\n subscriber.next(window.asObservable());\n var closingNotifier;\n try {\n closingNotifier = innerFrom(closingSelector());\n }\n catch (err) {\n handleError(err);\n return;\n }\n closingNotifier.subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openWindow, openWindow, handleError)));\n };\n openWindow();\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return window.next(value); }, function () {\n window.complete();\n subscriber.complete();\n }, handleError, function () {\n closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe();\n window = null;\n }));\n });\n}\n//# sourceMappingURL=windowWhen.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { identity } from '../util/identity';\nimport { noop } from '../util/noop';\nimport { popResultSelector } from '../util/args';\nexport function withLatestFrom() {\n var inputs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n inputs[_i] = arguments[_i];\n }\n var project = popResultSelector(inputs);\n return operate(function (source, subscriber) {\n var len = inputs.length;\n var otherValues = new Array(len);\n var hasValue = inputs.map(function () { return false; });\n var ready = false;\n var _loop_1 = function (i) {\n innerFrom(inputs[i]).subscribe(createOperatorSubscriber(subscriber, function (value) {\n otherValues[i] = value;\n if (!ready && !hasValue[i]) {\n hasValue[i] = true;\n (ready = hasValue.every(identity)) && (hasValue = null);\n }\n }, noop));\n };\n for (var i = 0; i < len; i++) {\n _loop_1(i);\n }\n source.subscribe(createOperatorSubscriber(subscriber, function (value) {\n if (ready) {\n var values = __spreadArray([value], __read(otherValues));\n subscriber.next(project ? project.apply(void 0, __spreadArray([], __read(values))) : values);\n }\n }));\n });\n}\n//# sourceMappingURL=withLatestFrom.js.map","import { zip } from '../observable/zip';\nimport { joinAllInternals } from './joinAllInternals';\nexport function zipAll(project) {\n return joinAllInternals(zip, project);\n}\n//# sourceMappingURL=zipAll.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { zip as zipStatic } from '../observable/zip';\nimport { operate } from '../util/lift';\nexport function zip() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n return operate(function (source, subscriber) {\n zipStatic.apply(void 0, __spreadArray([source], __read(sources))).subscribe(subscriber);\n });\n}\n//# sourceMappingURL=zip.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { zip } from './zip';\nexport function zipWith() {\n var otherInputs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n otherInputs[_i] = arguments[_i];\n }\n return zip.apply(void 0, __spreadArray([], __read(otherInputs)));\n}\n//# sourceMappingURL=zipWith.js.map","import { not } from '../util/not';\nimport { filter } from './filter';\nexport function partition(predicate, thisArg) {\n return function (source) {\n return [filter(predicate, thisArg)(source), filter(not(predicate, thisArg))(source)];\n };\n}\n//# sourceMappingURL=partition.js.map","import { __read, __spreadArray } from \"tslib\";\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { raceWith } from './raceWith';\nexport function race() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return raceWith.apply(void 0, __spreadArray([], __read(argsOrArgArray(args))));\n}\n//# sourceMappingURL=race.js.map","var SubscriptionLog = (function () {\n function SubscriptionLog(subscribedFrame, unsubscribedFrame) {\n if (unsubscribedFrame === void 0) { unsubscribedFrame = Infinity; }\n this.subscribedFrame = subscribedFrame;\n this.unsubscribedFrame = unsubscribedFrame;\n }\n return SubscriptionLog;\n}());\nexport { SubscriptionLog };\n//# sourceMappingURL=SubscriptionLog.js.map","import { SubscriptionLog } from './SubscriptionLog';\nvar SubscriptionLoggable = (function () {\n function SubscriptionLoggable() {\n this.subscriptions = [];\n }\n SubscriptionLoggable.prototype.logSubscribedFrame = function () {\n this.subscriptions.push(new SubscriptionLog(this.scheduler.now()));\n return this.subscriptions.length - 1;\n };\n SubscriptionLoggable.prototype.logUnsubscribedFrame = function (index) {\n var subscriptionLogs = this.subscriptions;\n var oldSubscriptionLog = subscriptionLogs[index];\n subscriptionLogs[index] = new SubscriptionLog(oldSubscriptionLog.subscribedFrame, this.scheduler.now());\n };\n return SubscriptionLoggable;\n}());\nexport { SubscriptionLoggable };\n//# sourceMappingURL=SubscriptionLoggable.js.map","export function applyMixins(derivedCtor, baseCtors) {\n for (var i = 0, len = baseCtors.length; i < len; i++) {\n var baseCtor = baseCtors[i];\n var propertyKeys = Object.getOwnPropertyNames(baseCtor.prototype);\n for (var j = 0, len2 = propertyKeys.length; j < len2; j++) {\n var name_1 = propertyKeys[j];\n derivedCtor.prototype[name_1] = baseCtor.prototype[name_1];\n }\n }\n}\n//# sourceMappingURL=applyMixins.js.map","import { __extends } from \"tslib\";\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { SubscriptionLoggable } from './SubscriptionLoggable';\nimport { applyMixins } from '../util/applyMixins';\nimport { observeNotification } from '../Notification';\nvar ColdObservable = (function (_super) {\n __extends(ColdObservable, _super);\n function ColdObservable(messages, scheduler) {\n var _this = _super.call(this, function (subscriber) {\n var observable = this;\n var index = observable.logSubscribedFrame();\n var subscription = new Subscription();\n subscription.add(new Subscription(function () {\n observable.logUnsubscribedFrame(index);\n }));\n observable.scheduleMessages(subscriber);\n return subscription;\n }) || this;\n _this.messages = messages;\n _this.subscriptions = [];\n _this.scheduler = scheduler;\n return _this;\n }\n ColdObservable.prototype.scheduleMessages = function (subscriber) {\n var messagesLength = this.messages.length;\n for (var i = 0; i < messagesLength; i++) {\n var message = this.messages[i];\n subscriber.add(this.scheduler.schedule(function (state) {\n var _a = state, notification = _a.message.notification, destination = _a.subscriber;\n observeNotification(notification, destination);\n }, message.frame, { message: message, subscriber: subscriber }));\n }\n };\n return ColdObservable;\n}(Observable));\nexport { ColdObservable };\napplyMixins(ColdObservable, [SubscriptionLoggable]);\n//# sourceMappingURL=ColdObservable.js.map","import { __extends } from \"tslib\";\nimport { Subject } from '../Subject';\nimport { Subscription } from '../Subscription';\nimport { SubscriptionLoggable } from './SubscriptionLoggable';\nimport { applyMixins } from '../util/applyMixins';\nimport { observeNotification } from '../Notification';\nvar HotObservable = (function (_super) {\n __extends(HotObservable, _super);\n function HotObservable(messages, scheduler) {\n var _this = _super.call(this) || this;\n _this.messages = messages;\n _this.subscriptions = [];\n _this.scheduler = scheduler;\n return _this;\n }\n HotObservable.prototype._subscribe = function (subscriber) {\n var subject = this;\n var index = subject.logSubscribedFrame();\n var subscription = new Subscription();\n subscription.add(new Subscription(function () {\n subject.logUnsubscribedFrame(index);\n }));\n subscription.add(_super.prototype._subscribe.call(this, subscriber));\n return subscription;\n };\n HotObservable.prototype.setup = function () {\n var subject = this;\n var messagesLength = subject.messages.length;\n var _loop_1 = function (i) {\n (function () {\n var _a = subject.messages[i], notification = _a.notification, frame = _a.frame;\n subject.scheduler.schedule(function () {\n observeNotification(notification, subject);\n }, frame);\n })();\n };\n for (var i = 0; i < messagesLength; i++) {\n _loop_1(i);\n }\n };\n return HotObservable;\n}(Subject));\nexport { HotObservable };\napplyMixins(HotObservable, [SubscriptionLoggable]);\n//# sourceMappingURL=HotObservable.js.map","import { __extends, __read, __spreadArray, __values } from \"tslib\";\nimport { Observable } from '../Observable';\nimport { ColdObservable } from './ColdObservable';\nimport { HotObservable } from './HotObservable';\nimport { SubscriptionLog } from './SubscriptionLog';\nimport { VirtualTimeScheduler, VirtualAction } from '../scheduler/VirtualTimeScheduler';\nimport { COMPLETE_NOTIFICATION, errorNotification, nextNotification } from '../NotificationFactories';\nimport { dateTimestampProvider } from '../scheduler/dateTimestampProvider';\nimport { performanceTimestampProvider } from '../scheduler/performanceTimestampProvider';\nimport { animationFrameProvider } from '../scheduler/animationFrameProvider';\nimport { immediateProvider } from '../scheduler/immediateProvider';\nimport { intervalProvider } from '../scheduler/intervalProvider';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\nvar defaultMaxFrame = 750;\nvar TestScheduler = (function (_super) {\n __extends(TestScheduler, _super);\n function TestScheduler(assertDeepEqual) {\n var _this = _super.call(this, VirtualAction, defaultMaxFrame) || this;\n _this.assertDeepEqual = assertDeepEqual;\n _this.hotObservables = [];\n _this.coldObservables = [];\n _this.flushTests = [];\n _this.runMode = false;\n return _this;\n }\n TestScheduler.prototype.createTime = function (marbles) {\n var indexOf = this.runMode ? marbles.trim().indexOf('|') : marbles.indexOf('|');\n if (indexOf === -1) {\n throw new Error('marble diagram for time should have a completion marker \"|\"');\n }\n return indexOf * TestScheduler.frameTimeFactor;\n };\n TestScheduler.prototype.createColdObservable = function (marbles, values, error) {\n if (marbles.indexOf('^') !== -1) {\n throw new Error('cold observable cannot have subscription offset \"^\"');\n }\n if (marbles.indexOf('!') !== -1) {\n throw new Error('cold observable cannot have unsubscription marker \"!\"');\n }\n var messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode);\n var cold = new ColdObservable(messages, this);\n this.coldObservables.push(cold);\n return cold;\n };\n TestScheduler.prototype.createHotObservable = function (marbles, values, error) {\n if (marbles.indexOf('!') !== -1) {\n throw new Error('hot observable cannot have unsubscription marker \"!\"');\n }\n var messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode);\n var subject = new HotObservable(messages, this);\n this.hotObservables.push(subject);\n return subject;\n };\n TestScheduler.prototype.materializeInnerObservable = function (observable, outerFrame) {\n var _this = this;\n var messages = [];\n observable.subscribe({\n next: function (value) {\n messages.push({ frame: _this.frame - outerFrame, notification: nextNotification(value) });\n },\n error: function (error) {\n messages.push({ frame: _this.frame - outerFrame, notification: errorNotification(error) });\n },\n complete: function () {\n messages.push({ frame: _this.frame - outerFrame, notification: COMPLETE_NOTIFICATION });\n },\n });\n return messages;\n };\n TestScheduler.prototype.expectObservable = function (observable, subscriptionMarbles) {\n var _this = this;\n if (subscriptionMarbles === void 0) { subscriptionMarbles = null; }\n var actual = [];\n var flushTest = { actual: actual, ready: false };\n var subscriptionParsed = TestScheduler.parseMarblesAsSubscriptions(subscriptionMarbles, this.runMode);\n var subscriptionFrame = subscriptionParsed.subscribedFrame === Infinity ? 0 : subscriptionParsed.subscribedFrame;\n var unsubscriptionFrame = subscriptionParsed.unsubscribedFrame;\n var subscription;\n this.schedule(function () {\n subscription = observable.subscribe({\n next: function (x) {\n var value = x instanceof Observable ? _this.materializeInnerObservable(x, _this.frame) : x;\n actual.push({ frame: _this.frame, notification: nextNotification(value) });\n },\n error: function (error) {\n actual.push({ frame: _this.frame, notification: errorNotification(error) });\n },\n complete: function () {\n actual.push({ frame: _this.frame, notification: COMPLETE_NOTIFICATION });\n },\n });\n }, subscriptionFrame);\n if (unsubscriptionFrame !== Infinity) {\n this.schedule(function () { return subscription.unsubscribe(); }, unsubscriptionFrame);\n }\n this.flushTests.push(flushTest);\n var runMode = this.runMode;\n return {\n toBe: function (marbles, values, errorValue) {\n flushTest.ready = true;\n flushTest.expected = TestScheduler.parseMarbles(marbles, values, errorValue, true, runMode);\n },\n toEqual: function (other) {\n flushTest.ready = true;\n flushTest.expected = [];\n _this.schedule(function () {\n subscription = other.subscribe({\n next: function (x) {\n var value = x instanceof Observable ? _this.materializeInnerObservable(x, _this.frame) : x;\n flushTest.expected.push({ frame: _this.frame, notification: nextNotification(value) });\n },\n error: function (error) {\n flushTest.expected.push({ frame: _this.frame, notification: errorNotification(error) });\n },\n complete: function () {\n flushTest.expected.push({ frame: _this.frame, notification: COMPLETE_NOTIFICATION });\n },\n });\n }, subscriptionFrame);\n },\n };\n };\n TestScheduler.prototype.expectSubscriptions = function (actualSubscriptionLogs) {\n var flushTest = { actual: actualSubscriptionLogs, ready: false };\n this.flushTests.push(flushTest);\n var runMode = this.runMode;\n return {\n toBe: function (marblesOrMarblesArray) {\n var marblesArray = typeof marblesOrMarblesArray === 'string' ? [marblesOrMarblesArray] : marblesOrMarblesArray;\n flushTest.ready = true;\n flushTest.expected = marblesArray\n .map(function (marbles) { return TestScheduler.parseMarblesAsSubscriptions(marbles, runMode); })\n .filter(function (marbles) { return marbles.subscribedFrame !== Infinity; });\n },\n };\n };\n TestScheduler.prototype.flush = function () {\n var _this = this;\n var hotObservables = this.hotObservables;\n while (hotObservables.length > 0) {\n hotObservables.shift().setup();\n }\n _super.prototype.flush.call(this);\n this.flushTests = this.flushTests.filter(function (test) {\n if (test.ready) {\n _this.assertDeepEqual(test.actual, test.expected);\n return false;\n }\n return true;\n });\n };\n TestScheduler.parseMarblesAsSubscriptions = function (marbles, runMode) {\n var _this = this;\n if (runMode === void 0) { runMode = false; }\n if (typeof marbles !== 'string') {\n return new SubscriptionLog(Infinity);\n }\n var characters = __spreadArray([], __read(marbles));\n var len = characters.length;\n var groupStart = -1;\n var subscriptionFrame = Infinity;\n var unsubscriptionFrame = Infinity;\n var frame = 0;\n var _loop_1 = function (i) {\n var nextFrame = frame;\n var advanceFrameBy = function (count) {\n nextFrame += count * _this.frameTimeFactor;\n };\n var c = characters[i];\n switch (c) {\n case ' ':\n if (!runMode) {\n advanceFrameBy(1);\n }\n break;\n case '-':\n advanceFrameBy(1);\n break;\n case '(':\n groupStart = frame;\n advanceFrameBy(1);\n break;\n case ')':\n groupStart = -1;\n advanceFrameBy(1);\n break;\n case '^':\n if (subscriptionFrame !== Infinity) {\n throw new Error(\"found a second subscription point '^' in a \" + 'subscription marble diagram. There can only be one.');\n }\n subscriptionFrame = groupStart > -1 ? groupStart : frame;\n advanceFrameBy(1);\n break;\n case '!':\n if (unsubscriptionFrame !== Infinity) {\n throw new Error(\"found a second unsubscription point '!' in a \" + 'subscription marble diagram. There can only be one.');\n }\n unsubscriptionFrame = groupStart > -1 ? groupStart : frame;\n break;\n default:\n if (runMode && c.match(/^[0-9]$/)) {\n if (i === 0 || characters[i - 1] === ' ') {\n var buffer = characters.slice(i).join('');\n var match = buffer.match(/^([0-9]+(?:\\.[0-9]+)?)(ms|s|m) /);\n if (match) {\n i += match[0].length - 1;\n var duration = parseFloat(match[1]);\n var unit = match[2];\n var durationInMs = void 0;\n switch (unit) {\n case 'ms':\n durationInMs = duration;\n break;\n case 's':\n durationInMs = duration * 1000;\n break;\n case 'm':\n durationInMs = duration * 1000 * 60;\n break;\n default:\n break;\n }\n advanceFrameBy(durationInMs / this_1.frameTimeFactor);\n break;\n }\n }\n }\n throw new Error(\"there can only be '^' and '!' markers in a \" + \"subscription marble diagram. Found instead '\" + c + \"'.\");\n }\n frame = nextFrame;\n out_i_1 = i;\n };\n var this_1 = this, out_i_1;\n for (var i = 0; i < len; i++) {\n _loop_1(i);\n i = out_i_1;\n }\n if (unsubscriptionFrame < 0) {\n return new SubscriptionLog(subscriptionFrame);\n }\n else {\n return new SubscriptionLog(subscriptionFrame, unsubscriptionFrame);\n }\n };\n TestScheduler.parseMarbles = function (marbles, values, errorValue, materializeInnerObservables, runMode) {\n var _this = this;\n if (materializeInnerObservables === void 0) { materializeInnerObservables = false; }\n if (runMode === void 0) { runMode = false; }\n if (marbles.indexOf('!') !== -1) {\n throw new Error('conventional marble diagrams cannot have the ' + 'unsubscription marker \"!\"');\n }\n var characters = __spreadArray([], __read(marbles));\n var len = characters.length;\n var testMessages = [];\n var subIndex = runMode ? marbles.replace(/^[ ]+/, '').indexOf('^') : marbles.indexOf('^');\n var frame = subIndex === -1 ? 0 : subIndex * -this.frameTimeFactor;\n var getValue = typeof values !== 'object'\n ? function (x) { return x; }\n : function (x) {\n if (materializeInnerObservables && values[x] instanceof ColdObservable) {\n return values[x].messages;\n }\n return values[x];\n };\n var groupStart = -1;\n var _loop_2 = function (i) {\n var nextFrame = frame;\n var advanceFrameBy = function (count) {\n nextFrame += count * _this.frameTimeFactor;\n };\n var notification = void 0;\n var c = characters[i];\n switch (c) {\n case ' ':\n if (!runMode) {\n advanceFrameBy(1);\n }\n break;\n case '-':\n advanceFrameBy(1);\n break;\n case '(':\n groupStart = frame;\n advanceFrameBy(1);\n break;\n case ')':\n groupStart = -1;\n advanceFrameBy(1);\n break;\n case '|':\n notification = COMPLETE_NOTIFICATION;\n advanceFrameBy(1);\n break;\n case '^':\n advanceFrameBy(1);\n break;\n case '#':\n notification = errorNotification(errorValue || 'error');\n advanceFrameBy(1);\n break;\n default:\n if (runMode && c.match(/^[0-9]$/)) {\n if (i === 0 || characters[i - 1] === ' ') {\n var buffer = characters.slice(i).join('');\n var match = buffer.match(/^([0-9]+(?:\\.[0-9]+)?)(ms|s|m) /);\n if (match) {\n i += match[0].length - 1;\n var duration = parseFloat(match[1]);\n var unit = match[2];\n var durationInMs = void 0;\n switch (unit) {\n case 'ms':\n durationInMs = duration;\n break;\n case 's':\n durationInMs = duration * 1000;\n break;\n case 'm':\n durationInMs = duration * 1000 * 60;\n break;\n default:\n break;\n }\n advanceFrameBy(durationInMs / this_2.frameTimeFactor);\n break;\n }\n }\n }\n notification = nextNotification(getValue(c));\n advanceFrameBy(1);\n break;\n }\n if (notification) {\n testMessages.push({ frame: groupStart > -1 ? groupStart : frame, notification: notification });\n }\n frame = nextFrame;\n out_i_2 = i;\n };\n var this_2 = this, out_i_2;\n for (var i = 0; i < len; i++) {\n _loop_2(i);\n i = out_i_2;\n }\n return testMessages;\n };\n TestScheduler.prototype.createAnimator = function () {\n var _this = this;\n if (!this.runMode) {\n throw new Error('animate() must only be used in run mode');\n }\n var lastHandle = 0;\n var map;\n var delegate = {\n requestAnimationFrame: function (callback) {\n if (!map) {\n throw new Error('animate() was not called within run()');\n }\n var handle = ++lastHandle;\n map.set(handle, callback);\n return handle;\n },\n cancelAnimationFrame: function (handle) {\n if (!map) {\n throw new Error('animate() was not called within run()');\n }\n map.delete(handle);\n },\n };\n var animate = function (marbles) {\n var e_1, _a;\n if (map) {\n throw new Error('animate() must not be called more than once within run()');\n }\n if (/[|#]/.test(marbles)) {\n throw new Error('animate() must not complete or error');\n }\n map = new Map();\n var messages = TestScheduler.parseMarbles(marbles, undefined, undefined, undefined, true);\n try {\n for (var messages_1 = __values(messages), messages_1_1 = messages_1.next(); !messages_1_1.done; messages_1_1 = messages_1.next()) {\n var message = messages_1_1.value;\n _this.schedule(function () {\n var e_2, _a;\n var now = _this.now();\n var callbacks = Array.from(map.values());\n map.clear();\n try {\n for (var callbacks_1 = (e_2 = void 0, __values(callbacks)), callbacks_1_1 = callbacks_1.next(); !callbacks_1_1.done; callbacks_1_1 = callbacks_1.next()) {\n var callback = callbacks_1_1.value;\n callback(now);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (callbacks_1_1 && !callbacks_1_1.done && (_a = callbacks_1.return)) _a.call(callbacks_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }, message.frame);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (messages_1_1 && !messages_1_1.done && (_a = messages_1.return)) _a.call(messages_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n };\n return { animate: animate, delegate: delegate };\n };\n TestScheduler.prototype.createDelegates = function () {\n var _this = this;\n var lastHandle = 0;\n var scheduleLookup = new Map();\n var run = function () {\n var now = _this.now();\n var scheduledRecords = Array.from(scheduleLookup.values());\n var scheduledRecordsDue = scheduledRecords.filter(function (_a) {\n var due = _a.due;\n return due <= now;\n });\n var dueImmediates = scheduledRecordsDue.filter(function (_a) {\n var type = _a.type;\n return type === 'immediate';\n });\n if (dueImmediates.length > 0) {\n var _a = dueImmediates[0], handle = _a.handle, handler = _a.handler;\n scheduleLookup.delete(handle);\n handler();\n return;\n }\n var dueIntervals = scheduledRecordsDue.filter(function (_a) {\n var type = _a.type;\n return type === 'interval';\n });\n if (dueIntervals.length > 0) {\n var firstDueInterval = dueIntervals[0];\n var duration = firstDueInterval.duration, handler = firstDueInterval.handler;\n firstDueInterval.due = now + duration;\n firstDueInterval.subscription = _this.schedule(run, duration);\n handler();\n return;\n }\n var dueTimeouts = scheduledRecordsDue.filter(function (_a) {\n var type = _a.type;\n return type === 'timeout';\n });\n if (dueTimeouts.length > 0) {\n var _b = dueTimeouts[0], handle = _b.handle, handler = _b.handler;\n scheduleLookup.delete(handle);\n handler();\n return;\n }\n throw new Error('Expected a due immediate or interval');\n };\n var immediate = {\n setImmediate: function (handler) {\n var handle = ++lastHandle;\n scheduleLookup.set(handle, {\n due: _this.now(),\n duration: 0,\n handle: handle,\n handler: handler,\n subscription: _this.schedule(run, 0),\n type: 'immediate',\n });\n return handle;\n },\n clearImmediate: function (handle) {\n var value = scheduleLookup.get(handle);\n if (value) {\n value.subscription.unsubscribe();\n scheduleLookup.delete(handle);\n }\n },\n };\n var interval = {\n setInterval: function (handler, duration) {\n if (duration === void 0) { duration = 0; }\n var handle = ++lastHandle;\n scheduleLookup.set(handle, {\n due: _this.now() + duration,\n duration: duration,\n handle: handle,\n handler: handler,\n subscription: _this.schedule(run, duration),\n type: 'interval',\n });\n return handle;\n },\n clearInterval: function (handle) {\n var value = scheduleLookup.get(handle);\n if (value) {\n value.subscription.unsubscribe();\n scheduleLookup.delete(handle);\n }\n },\n };\n var timeout = {\n setTimeout: function (handler, duration) {\n if (duration === void 0) { duration = 0; }\n var handle = ++lastHandle;\n scheduleLookup.set(handle, {\n due: _this.now() + duration,\n duration: duration,\n handle: handle,\n handler: handler,\n subscription: _this.schedule(run, duration),\n type: 'timeout',\n });\n return handle;\n },\n clearTimeout: function (handle) {\n var value = scheduleLookup.get(handle);\n if (value) {\n value.subscription.unsubscribe();\n scheduleLookup.delete(handle);\n }\n },\n };\n return { immediate: immediate, interval: interval, timeout: timeout };\n };\n TestScheduler.prototype.run = function (callback) {\n var prevFrameTimeFactor = TestScheduler.frameTimeFactor;\n var prevMaxFrames = this.maxFrames;\n TestScheduler.frameTimeFactor = 1;\n this.maxFrames = Infinity;\n this.runMode = true;\n var animator = this.createAnimator();\n var delegates = this.createDelegates();\n animationFrameProvider.delegate = animator.delegate;\n dateTimestampProvider.delegate = this;\n immediateProvider.delegate = delegates.immediate;\n intervalProvider.delegate = delegates.interval;\n timeoutProvider.delegate = delegates.timeout;\n performanceTimestampProvider.delegate = this;\n var helpers = {\n cold: this.createColdObservable.bind(this),\n hot: this.createHotObservable.bind(this),\n flush: this.flush.bind(this),\n time: this.createTime.bind(this),\n expectObservable: this.expectObservable.bind(this),\n expectSubscriptions: this.expectSubscriptions.bind(this),\n animate: animator.animate,\n };\n try {\n var ret = callback(helpers);\n this.flush();\n return ret;\n }\n finally {\n TestScheduler.frameTimeFactor = prevFrameTimeFactor;\n this.maxFrames = prevMaxFrames;\n this.runMode = false;\n animationFrameProvider.delegate = undefined;\n dateTimestampProvider.delegate = undefined;\n immediateProvider.delegate = undefined;\n intervalProvider.delegate = undefined;\n timeoutProvider.delegate = undefined;\n performanceTimestampProvider.delegate = undefined;\n }\n };\n TestScheduler.frameTimeFactor = 10;\n return TestScheduler;\n}(VirtualTimeScheduler));\nexport { TestScheduler };\n//# sourceMappingURL=TestScheduler.js.map","export function getXHRResponse(xhr) {\n switch (xhr.responseType) {\n case 'json': {\n if ('response' in xhr) {\n return xhr.response;\n }\n else {\n var ieXHR = xhr;\n return JSON.parse(ieXHR.responseText);\n }\n }\n case 'document':\n return xhr.responseXML;\n case 'text':\n default: {\n if ('response' in xhr) {\n return xhr.response;\n }\n else {\n var ieXHR = xhr;\n return ieXHR.responseText;\n }\n }\n }\n}\n//# sourceMappingURL=getXHRResponse.js.map","import { getXHRResponse } from './getXHRResponse';\nvar AjaxResponse = (function () {\n function AjaxResponse(originalEvent, xhr, request, type) {\n if (type === void 0) { type = 'download_load'; }\n this.originalEvent = originalEvent;\n this.xhr = xhr;\n this.request = request;\n this.type = type;\n var status = xhr.status, responseType = xhr.responseType;\n this.status = status !== null && status !== void 0 ? status : 0;\n this.responseType = responseType !== null && responseType !== void 0 ? responseType : '';\n var allHeaders = xhr.getAllResponseHeaders();\n this.responseHeaders = allHeaders\n ?\n allHeaders.split('\\n').reduce(function (headers, line) {\n var index = line.indexOf(': ');\n headers[line.slice(0, index)] = line.slice(index + 2);\n return headers;\n }, {})\n : {};\n this.response = getXHRResponse(xhr);\n var loaded = originalEvent.loaded, total = originalEvent.total;\n this.loaded = loaded;\n this.total = total;\n }\n return AjaxResponse;\n}());\nexport { AjaxResponse };\n//# sourceMappingURL=AjaxResponse.js.map","import { getXHRResponse } from './getXHRResponse';\nimport { createErrorClass } from '../util/createErrorClass';\nexport var AjaxError = createErrorClass(function (_super) {\n return function AjaxErrorImpl(message, xhr, request) {\n this.message = message;\n this.name = 'AjaxError';\n this.xhr = xhr;\n this.request = request;\n this.status = xhr.status;\n this.responseType = xhr.responseType;\n var response;\n try {\n response = getXHRResponse(xhr);\n }\n catch (err) {\n response = xhr.responseText;\n }\n this.response = response;\n };\n});\nexport var AjaxTimeoutError = (function () {\n function AjaxTimeoutErrorImpl(xhr, request) {\n AjaxError.call(this, 'ajax timeout', xhr, request);\n this.name = 'AjaxTimeoutError';\n return this;\n }\n AjaxTimeoutErrorImpl.prototype = Object.create(AjaxError.prototype);\n return AjaxTimeoutErrorImpl;\n})();\n//# sourceMappingURL=errors.js.map","import { __assign } from \"tslib\";\nimport { map } from '../operators/map';\nimport { Observable } from '../Observable';\nimport { AjaxResponse } from './AjaxResponse';\nimport { AjaxTimeoutError, AjaxError } from './errors';\nfunction ajaxGet(url, headers) {\n return ajax({ method: 'GET', url: url, headers: headers });\n}\nfunction ajaxPost(url, body, headers) {\n return ajax({ method: 'POST', url: url, body: body, headers: headers });\n}\nfunction ajaxDelete(url, headers) {\n return ajax({ method: 'DELETE', url: url, headers: headers });\n}\nfunction ajaxPut(url, body, headers) {\n return ajax({ method: 'PUT', url: url, body: body, headers: headers });\n}\nfunction ajaxPatch(url, body, headers) {\n return ajax({ method: 'PATCH', url: url, body: body, headers: headers });\n}\nvar mapResponse = map(function (x) { return x.response; });\nfunction ajaxGetJSON(url, headers) {\n return mapResponse(ajax({\n method: 'GET',\n url: url,\n headers: headers,\n }));\n}\nexport var ajax = (function () {\n var create = function (urlOrConfig) {\n var config = typeof urlOrConfig === 'string'\n ? {\n url: urlOrConfig,\n }\n : urlOrConfig;\n return fromAjax(config);\n };\n create.get = ajaxGet;\n create.post = ajaxPost;\n create.delete = ajaxDelete;\n create.put = ajaxPut;\n create.patch = ajaxPatch;\n create.getJSON = ajaxGetJSON;\n return create;\n})();\nvar UPLOAD = 'upload';\nvar DOWNLOAD = 'download';\nvar LOADSTART = 'loadstart';\nvar PROGRESS = 'progress';\nvar LOAD = 'load';\nexport function fromAjax(init) {\n return new Observable(function (destination) {\n var _a, _b;\n var config = __assign({ async: true, crossDomain: false, withCredentials: false, method: 'GET', timeout: 0, responseType: 'json' }, init);\n var queryParams = config.queryParams, configuredBody = config.body, configuredHeaders = config.headers;\n var url = config.url;\n if (!url) {\n throw new TypeError('url is required');\n }\n if (queryParams) {\n var searchParams_1;\n if (url.includes('?')) {\n var parts = url.split('?');\n if (2 < parts.length) {\n throw new TypeError('invalid url');\n }\n searchParams_1 = new URLSearchParams(parts[1]);\n new URLSearchParams(queryParams).forEach(function (value, key) { return searchParams_1.set(key, value); });\n url = parts[0] + '?' + searchParams_1;\n }\n else {\n searchParams_1 = new URLSearchParams(queryParams);\n url = url + '?' + searchParams_1;\n }\n }\n var headers = {};\n if (configuredHeaders) {\n for (var key in configuredHeaders) {\n if (configuredHeaders.hasOwnProperty(key)) {\n headers[key.toLowerCase()] = configuredHeaders[key];\n }\n }\n }\n var crossDomain = config.crossDomain;\n if (!crossDomain && !('x-requested-with' in headers)) {\n headers['x-requested-with'] = 'XMLHttpRequest';\n }\n var withCredentials = config.withCredentials, xsrfCookieName = config.xsrfCookieName, xsrfHeaderName = config.xsrfHeaderName;\n if ((withCredentials || !crossDomain) && xsrfCookieName && xsrfHeaderName) {\n var xsrfCookie = (_b = (_a = document === null || document === void 0 ? void 0 : document.cookie.match(new RegExp(\"(^|;\\\\s*)(\" + xsrfCookieName + \")=([^;]*)\"))) === null || _a === void 0 ? void 0 : _a.pop()) !== null && _b !== void 0 ? _b : '';\n if (xsrfCookie) {\n headers[xsrfHeaderName] = xsrfCookie;\n }\n }\n var body = extractContentTypeAndMaybeSerializeBody(configuredBody, headers);\n var _request = __assign(__assign({}, config), { url: url,\n headers: headers,\n body: body });\n var xhr;\n xhr = init.createXHR ? init.createXHR() : new XMLHttpRequest();\n {\n var progressSubscriber_1 = init.progressSubscriber, _c = init.includeDownloadProgress, includeDownloadProgress = _c === void 0 ? false : _c, _d = init.includeUploadProgress, includeUploadProgress = _d === void 0 ? false : _d;\n var addErrorEvent = function (type, errorFactory) {\n xhr.addEventListener(type, function () {\n var _a;\n var error = errorFactory();\n (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, error);\n destination.error(error);\n });\n };\n addErrorEvent('timeout', function () { return new AjaxTimeoutError(xhr, _request); });\n addErrorEvent('abort', function () { return new AjaxError('aborted', xhr, _request); });\n var createResponse_1 = function (direction, event) {\n return new AjaxResponse(event, xhr, _request, direction + \"_\" + event.type);\n };\n var addProgressEvent_1 = function (target, type, direction) {\n target.addEventListener(type, function (event) {\n destination.next(createResponse_1(direction, event));\n });\n };\n if (includeUploadProgress) {\n [LOADSTART, PROGRESS, LOAD].forEach(function (type) { return addProgressEvent_1(xhr.upload, type, UPLOAD); });\n }\n if (progressSubscriber_1) {\n [LOADSTART, PROGRESS].forEach(function (type) { return xhr.upload.addEventListener(type, function (e) { var _a; return (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.next) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, e); }); });\n }\n if (includeDownloadProgress) {\n [LOADSTART, PROGRESS].forEach(function (type) { return addProgressEvent_1(xhr, type, DOWNLOAD); });\n }\n var emitError_1 = function (status) {\n var msg = 'ajax error' + (status ? ' ' + status : '');\n destination.error(new AjaxError(msg, xhr, _request));\n };\n xhr.addEventListener('error', function (e) {\n var _a;\n (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, e);\n emitError_1();\n });\n xhr.addEventListener(LOAD, function (event) {\n var _a, _b;\n var status = xhr.status;\n if (status < 400) {\n (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.complete) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1);\n var response = void 0;\n try {\n response = createResponse_1(DOWNLOAD, event);\n }\n catch (err) {\n destination.error(err);\n return;\n }\n destination.next(response);\n destination.complete();\n }\n else {\n (_b = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _b === void 0 ? void 0 : _b.call(progressSubscriber_1, event);\n emitError_1(status);\n }\n });\n }\n var user = _request.user, method = _request.method, async = _request.async;\n if (user) {\n xhr.open(method, url, async, user, _request.password);\n }\n else {\n xhr.open(method, url, async);\n }\n if (async) {\n xhr.timeout = _request.timeout;\n xhr.responseType = _request.responseType;\n }\n if ('withCredentials' in xhr) {\n xhr.withCredentials = _request.withCredentials;\n }\n for (var key in headers) {\n if (headers.hasOwnProperty(key)) {\n xhr.setRequestHeader(key, headers[key]);\n }\n }\n if (body) {\n xhr.send(body);\n }\n else {\n xhr.send();\n }\n return function () {\n if (xhr && xhr.readyState !== 4) {\n xhr.abort();\n }\n };\n });\n}\nfunction extractContentTypeAndMaybeSerializeBody(body, headers) {\n var _a;\n if (!body ||\n typeof body === 'string' ||\n isFormData(body) ||\n isURLSearchParams(body) ||\n isArrayBuffer(body) ||\n isFile(body) ||\n isBlob(body) ||\n isReadableStream(body)) {\n return body;\n }\n if (isArrayBufferView(body)) {\n return body.buffer;\n }\n if (typeof body === 'object') {\n headers['content-type'] = (_a = headers['content-type']) !== null && _a !== void 0 ? _a : 'application/json;charset=utf-8';\n return JSON.stringify(body);\n }\n throw new TypeError('Unknown body type');\n}\nvar _toString = Object.prototype.toString;\nfunction toStringCheck(obj, name) {\n return _toString.call(obj) === \"[object \" + name + \"]\";\n}\nfunction isArrayBuffer(body) {\n return toStringCheck(body, 'ArrayBuffer');\n}\nfunction isFile(body) {\n return toStringCheck(body, 'File');\n}\nfunction isBlob(body) {\n return toStringCheck(body, 'Blob');\n}\nfunction isArrayBufferView(body) {\n return typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView(body);\n}\nfunction isFormData(body) {\n return typeof FormData !== 'undefined' && body instanceof FormData;\n}\nfunction isURLSearchParams(body) {\n return typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams;\n}\nfunction isReadableStream(body) {\n return typeof ReadableStream !== 'undefined' && body instanceof ReadableStream;\n}\n//# sourceMappingURL=ajax.js.map","import { __assign, __extends } from \"tslib\";\nimport { Subject, AnonymousSubject } from '../../Subject';\nimport { Subscriber } from '../../Subscriber';\nimport { Observable } from '../../Observable';\nimport { Subscription } from '../../Subscription';\nimport { ReplaySubject } from '../../ReplaySubject';\nvar DEFAULT_WEBSOCKET_CONFIG = {\n url: '',\n deserializer: function (e) { return JSON.parse(e.data); },\n serializer: function (value) { return JSON.stringify(value); },\n};\nvar WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }';\nvar WebSocketSubject = (function (_super) {\n __extends(WebSocketSubject, _super);\n function WebSocketSubject(urlConfigOrSource, destination) {\n var _this = _super.call(this) || this;\n _this._socket = null;\n if (urlConfigOrSource instanceof Observable) {\n _this.destination = destination;\n _this.source = urlConfigOrSource;\n }\n else {\n var config = (_this._config = __assign({}, DEFAULT_WEBSOCKET_CONFIG));\n _this._output = new Subject();\n if (typeof urlConfigOrSource === 'string') {\n config.url = urlConfigOrSource;\n }\n else {\n for (var key in urlConfigOrSource) {\n if (urlConfigOrSource.hasOwnProperty(key)) {\n config[key] = urlConfigOrSource[key];\n }\n }\n }\n if (!config.WebSocketCtor && WebSocket) {\n config.WebSocketCtor = WebSocket;\n }\n else if (!config.WebSocketCtor) {\n throw new Error('no WebSocket constructor can be found');\n }\n _this.destination = new ReplaySubject();\n }\n return _this;\n }\n WebSocketSubject.prototype.lift = function (operator) {\n var sock = new WebSocketSubject(this._config, this.destination);\n sock.operator = operator;\n sock.source = this;\n return sock;\n };\n WebSocketSubject.prototype._resetState = function () {\n this._socket = null;\n if (!this.source) {\n this.destination = new ReplaySubject();\n }\n this._output = new Subject();\n };\n WebSocketSubject.prototype.multiplex = function (subMsg, unsubMsg, messageFilter) {\n var self = this;\n return new Observable(function (observer) {\n try {\n self.next(subMsg());\n }\n catch (err) {\n observer.error(err);\n }\n var subscription = self.subscribe({\n next: function (x) {\n try {\n if (messageFilter(x)) {\n observer.next(x);\n }\n }\n catch (err) {\n observer.error(err);\n }\n },\n error: function (err) { return observer.error(err); },\n complete: function () { return observer.complete(); },\n });\n return function () {\n try {\n self.next(unsubMsg());\n }\n catch (err) {\n observer.error(err);\n }\n subscription.unsubscribe();\n };\n });\n };\n WebSocketSubject.prototype._connectSocket = function () {\n var _this = this;\n var _a = this._config, WebSocketCtor = _a.WebSocketCtor, protocol = _a.protocol, url = _a.url, binaryType = _a.binaryType;\n var observer = this._output;\n var socket = null;\n try {\n socket = protocol ? new WebSocketCtor(url, protocol) : new WebSocketCtor(url);\n this._socket = socket;\n if (binaryType) {\n this._socket.binaryType = binaryType;\n }\n }\n catch (e) {\n observer.error(e);\n return;\n }\n var subscription = new Subscription(function () {\n _this._socket = null;\n if (socket && socket.readyState === 1) {\n socket.close();\n }\n });\n socket.onopen = function (evt) {\n var _socket = _this._socket;\n if (!_socket) {\n socket.close();\n _this._resetState();\n return;\n }\n var openObserver = _this._config.openObserver;\n if (openObserver) {\n openObserver.next(evt);\n }\n var queue = _this.destination;\n _this.destination = Subscriber.create(function (x) {\n if (socket.readyState === 1) {\n try {\n var serializer = _this._config.serializer;\n socket.send(serializer(x));\n }\n catch (e) {\n _this.destination.error(e);\n }\n }\n }, function (err) {\n var closingObserver = _this._config.closingObserver;\n if (closingObserver) {\n closingObserver.next(undefined);\n }\n if (err && err.code) {\n socket.close(err.code, err.reason);\n }\n else {\n observer.error(new TypeError(WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT));\n }\n _this._resetState();\n }, function () {\n var closingObserver = _this._config.closingObserver;\n if (closingObserver) {\n closingObserver.next(undefined);\n }\n socket.close();\n _this._resetState();\n });\n if (queue && queue instanceof ReplaySubject) {\n subscription.add(queue.subscribe(_this.destination));\n }\n };\n socket.onerror = function (e) {\n _this._resetState();\n observer.error(e);\n };\n socket.onclose = function (e) {\n if (socket === _this._socket) {\n _this._resetState();\n }\n var closeObserver = _this._config.closeObserver;\n if (closeObserver) {\n closeObserver.next(e);\n }\n if (e.wasClean) {\n observer.complete();\n }\n else {\n observer.error(e);\n }\n };\n socket.onmessage = function (e) {\n try {\n var deserializer = _this._config.deserializer;\n observer.next(deserializer(e));\n }\n catch (err) {\n observer.error(err);\n }\n };\n };\n WebSocketSubject.prototype._subscribe = function (subscriber) {\n var _this = this;\n var source = this.source;\n if (source) {\n return source.subscribe(subscriber);\n }\n if (!this._socket) {\n this._connectSocket();\n }\n this._output.subscribe(subscriber);\n subscriber.add(function () {\n var _socket = _this._socket;\n if (_this._output.observers.length === 0) {\n if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) {\n _socket.close();\n }\n _this._resetState();\n }\n });\n return subscriber;\n };\n WebSocketSubject.prototype.unsubscribe = function () {\n var _socket = this._socket;\n if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) {\n _socket.close();\n }\n this._resetState();\n _super.prototype.unsubscribe.call(this);\n };\n return WebSocketSubject;\n}(AnonymousSubject));\nexport { WebSocketSubject };\n//# sourceMappingURL=WebSocketSubject.js.map","import { WebSocketSubject } from './WebSocketSubject';\nexport function webSocket(urlConfigOrSource) {\n return new WebSocketSubject(urlConfigOrSource);\n}\n//# sourceMappingURL=webSocket.js.map","import { __assign, __rest } from \"tslib\";\nimport { createOperatorSubscriber } from '../../operators/OperatorSubscriber';\nimport { Observable } from '../../Observable';\nimport { innerFrom } from '../../observable/innerFrom';\nexport function fromFetch(input, initWithSelector) {\n if (initWithSelector === void 0) { initWithSelector = {}; }\n var selector = initWithSelector.selector, init = __rest(initWithSelector, [\"selector\"]);\n return new Observable(function (subscriber) {\n var controller = new AbortController();\n var signal = controller.signal;\n var abortable = true;\n var outerSignal = init.signal;\n if (outerSignal) {\n if (outerSignal.aborted) {\n controller.abort();\n }\n else {\n var outerSignalHandler_1 = function () {\n if (!signal.aborted) {\n controller.abort();\n }\n };\n outerSignal.addEventListener('abort', outerSignalHandler_1);\n subscriber.add(function () { return outerSignal.removeEventListener('abort', outerSignalHandler_1); });\n }\n }\n var perSubscriberInit = __assign(__assign({}, init), { signal: signal });\n var handleError = function (err) {\n abortable = false;\n subscriber.error(err);\n };\n fetch(input, perSubscriberInit)\n .then(function (response) {\n if (selector) {\n innerFrom(selector(response)).subscribe(createOperatorSubscriber(subscriber, undefined, function () {\n abortable = false;\n subscriber.complete();\n }, handleError));\n }\n else {\n abortable = false;\n subscriber.next(response);\n subscriber.complete();\n }\n })\n .catch(handleError);\n return function () {\n if (abortable) {\n controller.abort();\n }\n };\n });\n}\n//# sourceMappingURL=fetch.js.map","export * from '../index';\nimport * as _operators from '../operators/index';\nexport var operators = _operators;\nimport * as _testing from '../testing/index';\nexport var testing = _testing;\nimport * as _ajax from '../ajax/index';\nexport var ajax = _ajax;\nimport * as _webSocket from '../webSocket/index';\nexport var webSocket = _webSocket;\nimport * as _fetch from '../fetch/index';\nexport var fetch = _fetch;\n//# sourceMappingURL=umd.js.map"],"names":["observable","Symbol_observable","higherOrderRefCount","Symbol_iterator","iterator","NotificationKind","isArray","asyncScheduler","combineLatest","concat","DEFAULT_CONFIG","last","merge","oERNCreate","onErrorResumeNext","zip","zipStatic","partition","race","ajax","webSocket","fetch"],"mappings":";;;;;;IAAA;IACA;;IAEA;IACA;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;IACnC,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc;IACzC,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;IACpF,QAAQ,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC1G,IAAI,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC;;AAEF,IAAO,SAAS,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE;IAChC,IAAI,IAAI,OAAO,CAAC,KAAK,UAAU,IAAI,CAAC,KAAK,IAAI;IAC7C,QAAQ,MAAM,IAAI,SAAS,CAAC,sBAAsB,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,+BAA+B,CAAC,CAAC;IAClG,IAAI,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACxB,IAAI,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,EAAE;IAC3C,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,KAAK,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IACzF,CAAC;;AAED,IAAO,IAAI,QAAQ,GAAG,WAAW;IACjC,IAAI,QAAQ,GAAG,MAAM,CAAC,MAAM,IAAI,SAAS,QAAQ,CAAC,CAAC,EAAE;IACrD,QAAQ,KAAK,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;IAC7D,YAAY,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;IAC7B,YAAY,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACzF,SAAS;IACT,QAAQ,OAAO,CAAC,CAAC;IACjB,MAAK;IACL,IAAI,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAC3C,EAAC;;AAED,IAAO,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE;IAC7B,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;IACf,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;IACvF,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACpB,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,OAAO,MAAM,CAAC,qBAAqB,KAAK,UAAU;IACvE,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IAChF,YAAY,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1F,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAClC,SAAS;IACT,IAAI,OAAO,CAAC,CAAC;IACb,CAAC;AACD,AAeA;AACA,IAAO,SAAS,SAAS,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;IAC7D,IAAI,SAAS,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,KAAK,YAAY,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;IAChH,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,EAAE,UAAU,OAAO,EAAE,MAAM,EAAE;IAC/D,QAAQ,SAAS,SAAS,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;IACnG,QAAQ,SAAS,QAAQ,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;IACtG,QAAQ,SAAS,IAAI,CAAC,MAAM,EAAE,EAAE,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,EAAE;IACtH,QAAQ,IAAI,CAAC,CAAC,SAAS,GAAG,SAAS,CAAC,KAAK,CAAC,OAAO,EAAE,UAAU,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;IAC9E,KAAK,CAAC,CAAC;IACP,CAAC;;AAED,IAAO,SAAS,WAAW,CAAC,OAAO,EAAE,IAAI,EAAE;IAC3C,IAAI,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IACrH,IAAI,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,OAAO,MAAM,KAAK,UAAU,KAAK,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,WAAW,EAAE,OAAO,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAC7J,IAAI,SAAS,IAAI,CAAC,CAAC,EAAE,EAAE,OAAO,UAAU,CAAC,EAAE,EAAE,OAAO,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE;IACtE,IAAI,SAAS,IAAI,CAAC,EAAE,EAAE;IACtB,QAAQ,IAAI,CAAC,EAAE,MAAM,IAAI,SAAS,CAAC,iCAAiC,CAAC,CAAC;IACtE,QAAQ,OAAO,CAAC,EAAE,IAAI;IACtB,YAAY,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IACzK,YAAY,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;IACpD,YAAY,QAAQ,EAAE,CAAC,CAAC,CAAC;IACzB,gBAAgB,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,MAAM;IAC9C,gBAAgB,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IACxE,gBAAgB,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;IACjE,gBAAgB,KAAK,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,SAAS;IACjE,gBAAgB;IAChB,oBAAoB,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE;IAChI,oBAAoB,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE;IAC1G,oBAAoB,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACzF,oBAAoB,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE;IACvF,oBAAoB,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;IAC1C,oBAAoB,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,SAAS;IAC3C,aAAa;IACb,YAAY,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IACvC,SAAS,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE;IAClE,QAAQ,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACzF,KAAK;IACL,CAAC;AACD,AAYA;AACA,IAAO,SAAS,QAAQ,CAAC,CAAC,EAAE;IAC5B,IAAI,IAAI,CAAC,GAAG,OAAO,MAAM,KAAK,UAAU,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IAClF,IAAI,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC5B,IAAI,IAAI,CAAC,IAAI,OAAO,CAAC,CAAC,MAAM,KAAK,QAAQ,EAAE,OAAO;IAClD,QAAQ,IAAI,EAAE,YAAY;IAC1B,YAAY,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC;IAC/C,YAAY,OAAO,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;IACpD,SAAS;IACT,KAAK,CAAC;IACN,IAAI,MAAM,IAAI,SAAS,CAAC,CAAC,GAAG,yBAAyB,GAAG,iCAAiC,CAAC,CAAC;IAC3F,CAAC;;AAED,IAAO,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE;IAC7B,IAAI,IAAI,CAAC,GAAG,OAAO,MAAM,KAAK,UAAU,IAAI,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC/D,IAAI,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IACrB,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;IACrC,IAAI,IAAI;IACR,QAAQ,OAAO,CAAC,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACnF,KAAK;IACL,IAAI,OAAO,KAAK,EAAE,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;IAC3C,YAAY;IACZ,QAAQ,IAAI;IACZ,YAAY,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC7D,SAAS;IACT,gBAAgB,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,EAAE;IACzC,KAAK;IACL,IAAI,OAAO,EAAE,CAAC;IACd,CAAC;AACD,AAgBA;AACA,IAAO,SAAS,aAAa,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;IAC9C,IAAI,IAAI,IAAI,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;IACzF,QAAQ,IAAI,EAAE,IAAI,EAAE,CAAC,IAAI,IAAI,CAAC,EAAE;IAChC,YAAY,IAAI,CAAC,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACjE,YAAY,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAC5B,SAAS;IACT,KAAK;IACL,IAAI,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,IAAI,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7D,CAAC;;AAED,IAAO,SAAS,OAAO,CAAC,CAAC,EAAE;IAC3B,IAAI,OAAO,IAAI,YAAY,OAAO,IAAI,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,IAAI,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;IACzE,CAAC;;AAED,IAAO,SAAS,gBAAgB,CAAC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE;IACjE,IAAI,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,IAAI,SAAS,CAAC,sCAAsC,CAAC,CAAC;IAC3F,IAAI,IAAI,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,OAAO,EAAE,UAAU,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC;IAClE,IAAI,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,YAAY,EAAE,OAAO,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAC1H,IAAI,SAAS,IAAI,CAAC,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,EAAE,EAAE,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE;IAC9I,IAAI,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE;IACtF,IAAI,SAAS,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,YAAY,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;IAC5H,IAAI,SAAS,OAAO,CAAC,KAAK,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,EAAE;IACtD,IAAI,SAAS,MAAM,CAAC,KAAK,EAAE,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,EAAE;IACtD,IAAI,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;IACtF,CAAC;AACD,AAMA;AACA,IAAO,SAAS,aAAa,CAAC,CAAC,EAAE;IACjC,IAAI,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,IAAI,SAAS,CAAC,sCAAsC,CAAC,CAAC;IAC3F,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;IACvC,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,QAAQ,KAAK,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,YAAY,EAAE,OAAO,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACrN,IAAI,SAAS,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,EAAE,EAAE,OAAO,IAAI,OAAO,CAAC,UAAU,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE;IACpK,IAAI,SAAS,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,EAAE;IAChI,CAAC;;IC1MM,SAAS,UAAU,CAAC,KAAK,EAAE;IAClC,IAAI,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;IACvC,CAAC;;ICFM,SAAS,gBAAgB,CAAC,UAAU,EAAE;IAC7C,IAAI,IAAI,MAAM,GAAG,UAAU,QAAQ,EAAE;IACrC,QAAQ,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC7B,QAAQ,QAAQ,CAAC,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC,KAAK,CAAC;IAC3C,KAAK,CAAC;IACN,IAAI,IAAI,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IACtC,IAAI,QAAQ,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACxD,IAAI,QAAQ,CAAC,SAAS,CAAC,WAAW,GAAG,QAAQ,CAAC;IAC9C,IAAI,OAAO,QAAQ,CAAC;IACpB,CAAC;;ACRS,QAAC,mBAAmB,GAAG,gBAAgB,CAAC,UAAU,MAAM,EAAE;IACpE,IAAI,OAAO,SAAS,uBAAuB,CAAC,MAAM,EAAE;IACpD,QAAQ,MAAM,CAAC,IAAI,CAAC,CAAC;IACrB,QAAQ,IAAI,CAAC,OAAO,GAAG,MAAM;IAC7B,cAAc,MAAM,CAAC,MAAM,GAAG,2CAA2C,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,GAAG,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;IAChK,cAAc,EAAE,CAAC;IACjB,QAAQ,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IAC1C,QAAQ,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IAC7B,KAAK,CAAC;IACN,CAAC,CAAC;;ICVK,SAAS,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE;IACrC,IAAI,IAAI,GAAG,EAAE;IACb,QAAQ,IAAI,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,QAAQ,CAAC,IAAI,KAAK,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAC3C,KAAK;IACL,CAAC;;ACDE,QAAC,YAAY,IAAI,YAAY;IAChC,IAAI,SAAS,YAAY,CAAC,eAAe,EAAE;IAC3C,QAAQ,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IAC/C,QAAQ,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IAC5B,QAAQ,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IAC/B,QAAQ,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IAChC,KAAK;IACL,IAAI,YAAY,CAAC,SAAS,CAAC,WAAW,GAAG,YAAY;IACrD,QAAQ,IAAI,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC;IAC7B,QAAQ,IAAI,MAAM,CAAC;IACnB,QAAQ,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;IAC1B,YAAY,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IAC/B,YAAY,IAAI,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;IAC7C,YAAY,IAAI,UAAU,EAAE;IAC5B,gBAAgB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IACvC,gBAAgB,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;IAC/C,oBAAoB,IAAI;IACxB,wBAAwB,KAAK,IAAI,YAAY,GAAG,QAAQ,CAAC,UAAU,CAAC,EAAE,cAAc,GAAG,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,EAAE,cAAc,GAAG,YAAY,CAAC,IAAI,EAAE,EAAE;IACxK,4BAA4B,IAAI,QAAQ,GAAG,cAAc,CAAC,KAAK,CAAC;IAChE,4BAA4B,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAClD,yBAAyB;IACzB,qBAAqB;IACrB,oBAAoB,OAAO,KAAK,EAAE,EAAE,GAAG,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;IAC7D,4BAA4B;IAC5B,wBAAwB,IAAI;IAC5B,4BAA4B,IAAI,cAAc,IAAI,CAAC,cAAc,CAAC,IAAI,KAAK,EAAE,GAAG,YAAY,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC5H,yBAAyB;IACzB,gCAAgC,EAAE,IAAI,GAAG,EAAE,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE;IAC7D,qBAAqB;IACrB,iBAAiB;IACjB,qBAAqB;IACrB,oBAAoB,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC5C,iBAAiB;IACjB,aAAa;IACb,YAAY,IAAI,gBAAgB,GAAG,IAAI,CAAC,eAAe,CAAC;IACxD,YAAY,IAAI,UAAU,CAAC,gBAAgB,CAAC,EAAE;IAC9C,gBAAgB,IAAI;IACpB,oBAAoB,gBAAgB,EAAE,CAAC;IACvC,iBAAiB;IACjB,gBAAgB,OAAO,CAAC,EAAE;IAC1B,oBAAoB,MAAM,GAAG,CAAC,YAAY,mBAAmB,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;IAC/E,iBAAiB;IACjB,aAAa;IACb,YAAY,IAAI,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;IAC/C,YAAY,IAAI,WAAW,EAAE;IAC7B,gBAAgB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IACxC,gBAAgB,IAAI;IACpB,oBAAoB,KAAK,IAAI,aAAa,GAAG,QAAQ,CAAC,WAAW,CAAC,EAAE,eAAe,GAAG,aAAa,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,eAAe,GAAG,aAAa,CAAC,IAAI,EAAE,EAAE;IAC3K,wBAAwB,IAAI,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC;IAC9D,wBAAwB,IAAI;IAC5B,4BAA4B,aAAa,CAAC,SAAS,CAAC,CAAC;IACrD,yBAAyB;IACzB,wBAAwB,OAAO,GAAG,EAAE;IACpC,4BAA4B,MAAM,GAAG,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,KAAK,CAAC,GAAG,MAAM,GAAG,EAAE,CAAC;IACxF,4BAA4B,IAAI,GAAG,YAAY,mBAAmB,EAAE;IACpE,gCAAgC,MAAM,GAAG,aAAa,CAAC,aAAa,CAAC,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IAC9G,6BAA6B;IAC7B,iCAAiC;IACjC,gCAAgC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACjD,6BAA6B;IAC7B,yBAAyB;IACzB,qBAAqB;IACrB,iBAAiB;IACjB,gBAAgB,OAAO,KAAK,EAAE,EAAE,GAAG,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;IACzD,wBAAwB;IACxB,oBAAoB,IAAI;IACxB,wBAAwB,IAAI,eAAe,IAAI,CAAC,eAAe,CAAC,IAAI,KAAK,EAAE,GAAG,aAAa,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC5H,qBAAqB;IACrB,4BAA4B,EAAE,IAAI,GAAG,EAAE,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE;IACzD,iBAAiB;IACjB,aAAa;IACb,YAAY,IAAI,MAAM,EAAE;IACxB,gBAAgB,MAAM,IAAI,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACtD,aAAa;IACb,SAAS;IACT,KAAK,CAAC;IACN,IAAI,YAAY,CAAC,SAAS,CAAC,GAAG,GAAG,UAAU,QAAQ,EAAE;IACrD,QAAQ,IAAI,EAAE,CAAC;IACf,QAAQ,IAAI,QAAQ,IAAI,QAAQ,KAAK,IAAI,EAAE;IAC3C,YAAY,IAAI,IAAI,CAAC,MAAM,EAAE;IAC7B,gBAAgB,aAAa,CAAC,QAAQ,CAAC,CAAC;IACxC,aAAa;IACb,iBAAiB;IACjB,gBAAgB,IAAI,QAAQ,YAAY,YAAY,EAAE;IACtD,oBAAoB,IAAI,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;IACtE,wBAAwB,OAAO;IAC/B,qBAAqB;IACrB,oBAAoB,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAC9C,iBAAiB;IACjB,gBAAgB,CAAC,IAAI,CAAC,WAAW,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,WAAW,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAChH,aAAa;IACb,SAAS;IACT,KAAK,CAAC;IACN,IAAI,YAAY,CAAC,SAAS,CAAC,UAAU,GAAG,UAAU,MAAM,EAAE;IAC1D,QAAQ,IAAI,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;IACzC,QAAQ,OAAO,UAAU,KAAK,MAAM,KAAK,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IACnG,KAAK,CAAC;IACN,IAAI,YAAY,CAAC,SAAS,CAAC,UAAU,GAAG,UAAU,MAAM,EAAE;IAC1D,QAAQ,IAAI,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;IACzC,QAAQ,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,UAAU,IAAI,UAAU,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC;IACzI,KAAK,CAAC;IACN,IAAI,YAAY,CAAC,SAAS,CAAC,aAAa,GAAG,UAAU,MAAM,EAAE;IAC7D,QAAQ,IAAI,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;IACzC,QAAQ,IAAI,UAAU,KAAK,MAAM,EAAE;IACnC,YAAY,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IACnC,SAAS;IACT,aAAa,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;IAC5C,YAAY,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IAC1C,SAAS;IACT,KAAK,CAAC;IACN,IAAI,YAAY,CAAC,SAAS,CAAC,MAAM,GAAG,UAAU,QAAQ,EAAE;IACxD,QAAQ,IAAI,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;IAC3C,QAAQ,WAAW,IAAI,SAAS,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IACxD,QAAQ,IAAI,QAAQ,YAAY,YAAY,EAAE;IAC9C,YAAY,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IACzC,SAAS;IACT,KAAK,CAAC;IACN,IAAI,YAAY,CAAC,KAAK,GAAG,CAAC,YAAY;IACtC,QAAQ,IAAI,KAAK,GAAG,IAAI,YAAY,EAAE,CAAC;IACvC,QAAQ,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,OAAO,KAAK,CAAC;IACrB,KAAK,GAAG,CAAC;IACT,IAAI,OAAO,YAAY,CAAC;IACxB,CAAC,EAAE,CAAC,CAAC;AACL,IACO,IAAI,kBAAkB,GAAG,YAAY,CAAC,KAAK,CAAC;AACnD,IAAO,SAAS,cAAc,CAAC,KAAK,EAAE;IACtC,IAAI,QAAQ,KAAK,YAAY,YAAY;IACzC,SAAS,KAAK,IAAI,QAAQ,IAAI,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,EAAE;IAC5H,CAAC;IACD,SAAS,aAAa,CAAC,SAAS,EAAE;IAClC,IAAI,IAAI,UAAU,CAAC,SAAS,CAAC,EAAE;IAC/B,QAAQ,SAAS,EAAE,CAAC;IACpB,KAAK;IACL,SAAS;IACT,QAAQ,SAAS,CAAC,WAAW,EAAE,CAAC;IAChC,KAAK;IACL,CAAC;;AC7IS,QAAC,MAAM,GAAG;IACpB,IAAI,gBAAgB,EAAE,IAAI;IAC1B,IAAI,qBAAqB,EAAE,IAAI;IAC/B,IAAI,OAAO,EAAE,SAAS;IACtB,IAAI,qCAAqC,EAAE,KAAK;IAChD,IAAI,wBAAwB,EAAE,KAAK;IACnC,CAAC;;ICLM,IAAI,eAAe,GAAG;IAC7B,IAAI,UAAU,EAAE,UAAU,OAAO,EAAE,OAAO,EAAE;IAC5C,QAAQ,IAAI,IAAI,GAAG,EAAE,CAAC;IACtB,QAAQ,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IACtD,YAAY,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACzC,SAAS;IACT,QAAQ,IAAI,QAAQ,GAAG,eAAe,CAAC,QAAQ,CAAC;IAChD,QAAQ,IAAI,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,QAAQ,CAAC,UAAU,EAAE;IACrF,YAAY,OAAO,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACxG,SAAS;IACT,QAAQ,OAAO,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACzF,KAAK;IACL,IAAI,YAAY,EAAE,UAAU,MAAM,EAAE;IACpC,QAAQ,IAAI,QAAQ,GAAG,eAAe,CAAC,QAAQ,CAAC;IAChD,QAAQ,OAAO,CAAC,CAAC,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,QAAQ,CAAC,YAAY,KAAK,YAAY,EAAE,MAAM,CAAC,CAAC;IACrH,KAAK;IACL,IAAI,QAAQ,EAAE,SAAS;IACvB,CAAC,CAAC;;IChBK,SAAS,oBAAoB,CAAC,GAAG,EAAE;IAC1C,IAAI,eAAe,CAAC,UAAU,CAAC,YAAY;IAC3C,QAAQ,IAAI,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;IACvD,QAAQ,IAAI,gBAAgB,EAAE;IAC9B,YAAY,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAClC,SAAS;IACT,aAAa;IACb,YAAY,MAAM,GAAG,CAAC;IACtB,SAAS;IACT,KAAK,CAAC,CAAC;IACP,CAAC;;ICZM,SAAS,IAAI,GAAG,GAAG;;ICAnB,IAAI,qBAAqB,GAAG,CAAC,YAAY,EAAE,OAAO,kBAAkB,CAAC,GAAG,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC;AAC7G,IAAO,SAAS,iBAAiB,CAAC,KAAK,EAAE;IACzC,IAAI,OAAO,kBAAkB,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IACrD,CAAC;AACD,IAAO,SAAS,gBAAgB,CAAC,KAAK,EAAE;IACxC,IAAI,OAAO,kBAAkB,CAAC,GAAG,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IACrD,CAAC;AACD,IAAO,SAAS,kBAAkB,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;IACvD,IAAI,OAAO;IACX,QAAQ,IAAI,EAAE,IAAI;IAClB,QAAQ,KAAK,EAAE,KAAK;IACpB,QAAQ,KAAK,EAAE,KAAK;IACpB,KAAK,CAAC;IACN,CAAC;;ICZD,IAAI,OAAO,GAAG,IAAI,CAAC;AACnB,IAAO,SAAS,YAAY,CAAC,EAAE,EAAE;IACjC,IAAI,IAAI,MAAM,CAAC,qCAAqC,EAAE;IACtD,QAAQ,IAAI,MAAM,GAAG,CAAC,OAAO,CAAC;IAC9B,QAAQ,IAAI,MAAM,EAAE;IACpB,YAAY,OAAO,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAC1D,SAAS;IACT,QAAQ,EAAE,EAAE,CAAC;IACb,QAAQ,IAAI,MAAM,EAAE;IACpB,YAAY,IAAI,EAAE,GAAG,OAAO,EAAE,WAAW,GAAG,EAAE,CAAC,WAAW,EAAE,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC;IAC7E,YAAY,OAAO,GAAG,IAAI,CAAC;IAC3B,YAAY,IAAI,WAAW,EAAE;IAC7B,gBAAgB,MAAM,KAAK,CAAC;IAC5B,aAAa;IACb,SAAS;IACT,KAAK;IACL,SAAS;IACT,QAAQ,EAAE,EAAE,CAAC;IACb,KAAK;IACL,CAAC;AACD,IAAO,SAAS,YAAY,CAAC,GAAG,EAAE;IAClC,IAAI,IAAI,MAAM,CAAC,qCAAqC,IAAI,OAAO,EAAE;IACjE,QAAQ,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IACnC,QAAQ,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC;IAC5B,KAAK;IACL,CAAC;;ACjBE,QAAC,UAAU,IAAI,UAAU,MAAM,EAAE;IACpC,IAAI,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IAClC,IAAI,SAAS,UAAU,CAAC,WAAW,EAAE;IACrC,QAAQ,IAAI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;IAC9C,QAAQ,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC;IAChC,QAAQ,IAAI,WAAW,EAAE;IACzB,YAAY,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC;IAC5C,YAAY,IAAI,cAAc,CAAC,WAAW,CAAC,EAAE;IAC7C,gBAAgB,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACvC,aAAa;IACb,SAAS;IACT,aAAa;IACb,YAAY,KAAK,CAAC,WAAW,GAAG,cAAc,CAAC;IAC/C,SAAS;IACT,QAAQ,OAAO,KAAK,CAAC;IACrB,KAAK;IACL,IAAI,UAAU,CAAC,MAAM,GAAG,UAAU,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE;IACzD,QAAQ,OAAO,IAAI,cAAc,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IACzD,KAAK,CAAC;IACN,IAAI,UAAU,CAAC,SAAS,CAAC,IAAI,GAAG,UAAU,KAAK,EAAE;IACjD,QAAQ,IAAI,IAAI,CAAC,SAAS,EAAE;IAC5B,YAAY,yBAAyB,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC;IACrE,SAAS;IACT,aAAa;IACb,YAAY,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC9B,SAAS;IACT,KAAK,CAAC;IACN,IAAI,UAAU,CAAC,SAAS,CAAC,KAAK,GAAG,UAAU,GAAG,EAAE;IAChD,QAAQ,IAAI,IAAI,CAAC,SAAS,EAAE;IAC5B,YAAY,yBAAyB,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;IACpE,SAAS;IACT,aAAa;IACb,YAAY,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IAClC,YAAY,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC7B,SAAS;IACT,KAAK,CAAC;IACN,IAAI,UAAU,CAAC,SAAS,CAAC,QAAQ,GAAG,YAAY;IAChD,QAAQ,IAAI,IAAI,CAAC,SAAS,EAAE;IAC5B,YAAY,yBAAyB,CAAC,qBAAqB,EAAE,IAAI,CAAC,CAAC;IACnE,SAAS;IACT,aAAa;IACb,YAAY,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IAClC,YAAY,IAAI,CAAC,SAAS,EAAE,CAAC;IAC7B,SAAS;IACT,KAAK,CAAC;IACN,IAAI,UAAU,CAAC,SAAS,CAAC,WAAW,GAAG,YAAY;IACnD,QAAQ,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;IAC1B,YAAY,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IAClC,YAAY,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpD,YAAY,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IACpC,SAAS;IACT,KAAK,CAAC;IACN,IAAI,UAAU,CAAC,SAAS,CAAC,KAAK,GAAG,UAAU,KAAK,EAAE;IAClD,QAAQ,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrC,KAAK,CAAC;IACN,IAAI,UAAU,CAAC,SAAS,CAAC,MAAM,GAAG,UAAU,GAAG,EAAE;IACjD,QAAQ,IAAI;IACZ,YAAY,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACxC,SAAS;IACT,gBAAgB;IAChB,YAAY,IAAI,CAAC,WAAW,EAAE,CAAC;IAC/B,SAAS;IACT,KAAK,CAAC;IACN,IAAI,UAAU,CAAC,SAAS,CAAC,SAAS,GAAG,YAAY;IACjD,QAAQ,IAAI;IACZ,YAAY,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;IACxC,SAAS;IACT,gBAAgB;IAChB,YAAY,IAAI,CAAC,WAAW,EAAE,CAAC;IAC/B,SAAS;IACT,KAAK,CAAC;IACN,IAAI,OAAO,UAAU,CAAC;IACtB,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;AACjB,IACA,IAAI,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC;IACpC,SAAS,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE;IAC3B,IAAI,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IACnC,CAAC;IACD,IAAI,gBAAgB,IAAI,YAAY;IACpC,IAAI,SAAS,gBAAgB,CAAC,eAAe,EAAE;IAC/C,QAAQ,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IAC/C,KAAK;IACL,IAAI,gBAAgB,CAAC,SAAS,CAAC,IAAI,GAAG,UAAU,KAAK,EAAE;IACvD,QAAQ,IAAI,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC;IACnD,QAAQ,IAAI,eAAe,CAAC,IAAI,EAAE;IAClC,YAAY,IAAI;IAChB,gBAAgB,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC5C,aAAa;IACb,YAAY,OAAO,KAAK,EAAE;IAC1B,gBAAgB,oBAAoB,CAAC,KAAK,CAAC,CAAC;IAC5C,aAAa;IACb,SAAS;IACT,KAAK,CAAC;IACN,IAAI,gBAAgB,CAAC,SAAS,CAAC,KAAK,GAAG,UAAU,GAAG,EAAE;IACtD,QAAQ,IAAI,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC;IACnD,QAAQ,IAAI,eAAe,CAAC,KAAK,EAAE;IACnC,YAAY,IAAI;IAChB,gBAAgB,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3C,aAAa;IACb,YAAY,OAAO,KAAK,EAAE;IAC1B,gBAAgB,oBAAoB,CAAC,KAAK,CAAC,CAAC;IAC5C,aAAa;IACb,SAAS;IACT,aAAa;IACb,YAAY,oBAAoB,CAAC,GAAG,CAAC,CAAC;IACtC,SAAS;IACT,KAAK,CAAC;IACN,IAAI,gBAAgB,CAAC,SAAS,CAAC,QAAQ,GAAG,YAAY;IACtD,QAAQ,IAAI,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC;IACnD,QAAQ,IAAI,eAAe,CAAC,QAAQ,EAAE;IACtC,YAAY,IAAI;IAChB,gBAAgB,eAAe,CAAC,QAAQ,EAAE,CAAC;IAC3C,aAAa;IACb,YAAY,OAAO,KAAK,EAAE;IAC1B,gBAAgB,oBAAoB,CAAC,KAAK,CAAC,CAAC;IAC5C,aAAa;IACb,SAAS;IACT,KAAK,CAAC;IACN,IAAI,OAAO,gBAAgB,CAAC;IAC5B,CAAC,EAAE,CAAC,CAAC;IACL,IAAI,cAAc,IAAI,UAAU,MAAM,EAAE;IACxC,IAAI,SAAS,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;IACtC,IAAI,SAAS,cAAc,CAAC,cAAc,EAAE,KAAK,EAAE,QAAQ,EAAE;IAC7D,QAAQ,IAAI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;IAC9C,QAAQ,IAAI,eAAe,CAAC;IAC5B,QAAQ,IAAI,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,cAAc,EAAE;IAC3D,YAAY,eAAe,GAAG;IAC9B,gBAAgB,IAAI,GAAG,cAAc,KAAK,IAAI,IAAI,cAAc,KAAK,KAAK,CAAC,GAAG,cAAc,GAAG,SAAS,CAAC;IACzG,gBAAgB,KAAK,EAAE,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC,GAAG,KAAK,GAAG,SAAS;IAC7E,gBAAgB,QAAQ,EAAE,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,KAAK,CAAC,GAAG,QAAQ,GAAG,SAAS;IACzF,aAAa,CAAC;IACd,SAAS;IACT,aAAa;IACb,YAAY,IAAI,SAAS,CAAC;IAC1B,YAAY,IAAI,KAAK,IAAI,MAAM,CAAC,wBAAwB,EAAE;IAC1D,gBAAgB,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IAC1D,gBAAgB,SAAS,CAAC,WAAW,GAAG,YAAY,EAAE,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;IACpF,gBAAgB,eAAe,GAAG;IAClC,oBAAoB,IAAI,EAAE,cAAc,CAAC,IAAI,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC;IACrF,oBAAoB,KAAK,EAAE,cAAc,CAAC,KAAK,IAAI,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,SAAS,CAAC;IACxF,oBAAoB,QAAQ,EAAE,cAAc,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,SAAS,CAAC;IACjG,iBAAiB,CAAC;IAClB,aAAa;IACb,iBAAiB;IACjB,gBAAgB,eAAe,GAAG,cAAc,CAAC;IACjD,aAAa;IACb,SAAS;IACT,QAAQ,KAAK,CAAC,WAAW,GAAG,IAAI,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAClE,QAAQ,OAAO,KAAK,CAAC;IACrB,KAAK;IACL,IAAI,OAAO,cAAc,CAAC;IAC1B,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;AACf,IACA,SAAS,oBAAoB,CAAC,KAAK,EAAE;IACrC,IAAI,IAAI,MAAM,CAAC,qCAAqC,EAAE;IACtD,QAAQ,YAAY,CAAC,KAAK,CAAC,CAAC;IAC5B,KAAK;IACL,SAAS;IACT,QAAQ,oBAAoB,CAAC,KAAK,CAAC,CAAC;IACpC,KAAK;IACL,CAAC;IACD,SAAS,mBAAmB,CAAC,GAAG,EAAE;IAClC,IAAI,MAAM,GAAG,CAAC;IACd,CAAC;IACD,SAAS,yBAAyB,CAAC,YAAY,EAAE,UAAU,EAAE;IAC7D,IAAI,IAAI,qBAAqB,GAAG,MAAM,CAAC,qBAAqB,CAAC;IAC7D,IAAI,qBAAqB,IAAI,eAAe,CAAC,UAAU,CAAC,YAAY,EAAE,OAAO,qBAAqB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC;IACjI,CAAC;AACD,IAAO,IAAI,cAAc,GAAG;IAC5B,IAAI,MAAM,EAAE,IAAI;IAChB,IAAI,IAAI,EAAE,IAAI;IACd,IAAI,KAAK,EAAE,mBAAmB;IAC9B,IAAI,QAAQ,EAAE,IAAI;IAClB,CAAC,CAAC;;ACtLQ,QAAC,UAAU,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,OAAO,MAAM,KAAK,UAAU,IAAI,MAAM,CAAC,UAAU,KAAK,cAAc,CAAC,EAAE,GAAG;;ICAlH,SAAS,QAAQ,CAAC,CAAC,EAAE;IAC5B,IAAI,OAAO,CAAC,CAAC;IACb,CAAC;;ICDM,SAAS,IAAI,GAAG;IACvB,IAAI,IAAI,GAAG,GAAG,EAAE,CAAC;IACjB,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IAChC,KAAK;IACL,IAAI,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;AACD,IAAO,SAAS,aAAa,CAAC,GAAG,EAAE;IACnC,IAAI,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;IAC1B,QAAQ,OAAO,QAAQ,CAAC;IACxB,KAAK;IACL,IAAI,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;IAC1B,QAAQ,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;IACtB,KAAK;IACL,IAAI,OAAO,SAAS,KAAK,CAAC,KAAK,EAAE;IACjC,QAAQ,OAAO,GAAG,CAAC,MAAM,CAAC,UAAU,IAAI,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IAC3E,KAAK,CAAC;IACN,CAAC;;ACXE,QAAC,UAAU,IAAI,YAAY;IAC9B,IAAI,SAAS,UAAU,CAAC,SAAS,EAAE;IACnC,QAAQ,IAAI,SAAS,EAAE;IACvB,YAAY,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IACxC,SAAS;IACT,KAAK;IACL,IAAI,UAAU,CAAC,SAAS,CAAC,IAAI,GAAG,UAAU,QAAQ,EAAE;IACpD,QAAQ,IAAIA,aAAU,GAAG,IAAI,UAAU,EAAE,CAAC;IAC1C,QAAQA,aAAU,CAAC,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQA,aAAU,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACvC,QAAQ,OAAOA,aAAU,CAAC;IAC1B,KAAK,CAAC;IACN,IAAI,UAAU,CAAC,SAAS,CAAC,SAAS,GAAG,UAAU,cAAc,EAAE,KAAK,EAAE,QAAQ,EAAE;IAChF,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;IACzB,QAAQ,IAAI,UAAU,GAAG,YAAY,CAAC,cAAc,CAAC,GAAG,cAAc,GAAG,IAAI,cAAc,CAAC,cAAc,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC7H,QAAQ,YAAY,CAAC,YAAY;IACjC,YAAY,IAAI,EAAE,GAAG,KAAK,EAAE,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,EAAE,CAAC,MAAM,CAAC;IACvE,YAAY,UAAU,CAAC,GAAG,CAAC,QAAQ;IACnC;IACA,oBAAoB,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC;IACrD,kBAAkB,MAAM;IACxB;IACA,wBAAwB,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC;IACpD;IACA,wBAAwB,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC;IACzD,SAAS,CAAC,CAAC;IACX,QAAQ,OAAO,UAAU,CAAC;IAC1B,KAAK,CAAC;IACN,IAAI,UAAU,CAAC,SAAS,CAAC,aAAa,GAAG,UAAU,IAAI,EAAE;IACzD,QAAQ,IAAI;IACZ,YAAY,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACzC,SAAS;IACT,QAAQ,OAAO,GAAG,EAAE;IACpB,YAAY,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC5B,SAAS;IACT,KAAK,CAAC;IACN,IAAI,UAAU,CAAC,SAAS,CAAC,OAAO,GAAG,UAAU,IAAI,EAAE,WAAW,EAAE;IAChE,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;IACzB,QAAQ,WAAW,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;IAClD,QAAQ,OAAO,IAAI,WAAW,CAAC,UAAU,OAAO,EAAE,MAAM,EAAE;IAC1D,YAAY,IAAI,UAAU,GAAG,IAAI,cAAc,CAAC;IAChD,gBAAgB,IAAI,EAAE,UAAU,KAAK,EAAE;IACvC,oBAAoB,IAAI;IACxB,wBAAwB,IAAI,CAAC,KAAK,CAAC,CAAC;IACpC,qBAAqB;IACrB,oBAAoB,OAAO,GAAG,EAAE;IAChC,wBAAwB,MAAM,CAAC,GAAG,CAAC,CAAC;IACpC,wBAAwB,UAAU,CAAC,WAAW,EAAE,CAAC;IACjD,qBAAqB;IACrB,iBAAiB;IACjB,gBAAgB,KAAK,EAAE,MAAM;IAC7B,gBAAgB,QAAQ,EAAE,OAAO;IACjC,aAAa,CAAC,CAAC;IACf,YAAY,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACxC,SAAS,CAAC,CAAC;IACX,KAAK,CAAC;IACN,IAAI,UAAU,CAAC,SAAS,CAAC,UAAU,GAAG,UAAU,UAAU,EAAE;IAC5D,QAAQ,IAAI,EAAE,CAAC;IACf,QAAQ,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC,MAAM,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAChG,KAAK,CAAC;IACN,IAAI,UAAU,CAAC,SAAS,CAACC,UAAiB,CAAC,GAAG,YAAY;IAC1D,QAAQ,OAAO,IAAI,CAAC;IACpB,KAAK,CAAC;IACN,IAAI,UAAU,CAAC,SAAS,CAAC,IAAI,GAAG,YAAY;IAC5C,QAAQ,IAAI,UAAU,GAAG,EAAE,CAAC;IAC5B,QAAQ,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IACtD,YAAY,UAAU,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IAC3C,SAAS;IACT,QAAQ,OAAO,aAAa,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC;IAC/C,KAAK,CAAC;IACN,IAAI,UAAU,CAAC,SAAS,CAAC,SAAS,GAAG,UAAU,WAAW,EAAE;IAC5D,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;IACzB,QAAQ,WAAW,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;IAClD,QAAQ,OAAO,IAAI,WAAW,CAAC,UAAU,OAAO,EAAE,MAAM,EAAE;IAC1D,YAAY,IAAI,KAAK,CAAC;IACtB,YAAY,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,EAAE,QAAQ,KAAK,GAAG,CAAC,EAAE,EAAE,EAAE,UAAU,GAAG,EAAE,EAAE,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,YAAY,EAAE,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;IAClJ,SAAS,CAAC,CAAC;IACX,KAAK,CAAC;IACN,IAAI,UAAU,CAAC,MAAM,GAAG,UAAU,SAAS,EAAE;IAC7C,QAAQ,OAAO,IAAI,UAAU,CAAC,SAAS,CAAC,CAAC;IACzC,KAAK,CAAC;IACN,IAAI,OAAO,UAAU,CAAC;IACtB,CAAC,EAAE,CAAC,CAAC;AACL,IACA,SAAS,cAAc,CAAC,WAAW,EAAE;IACrC,IAAI,IAAI,EAAE,CAAC;IACX,IAAI,OAAO,CAAC,EAAE,GAAG,WAAW,KAAK,IAAI,IAAI,WAAW,KAAK,KAAK,CAAC,GAAG,WAAW,GAAG,MAAM,CAAC,OAAO,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,EAAE,GAAG,OAAO,CAAC;IACzI,CAAC;IACD,SAAS,UAAU,CAAC,KAAK,EAAE;IAC3B,IAAI,OAAO,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACpG,CAAC;IACD,SAAS,YAAY,CAAC,KAAK,EAAE;IAC7B,IAAI,OAAO,CAAC,KAAK,IAAI,KAAK,YAAY,UAAU,MAAM,UAAU,CAAC,KAAK,CAAC,IAAI,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;IAClG,CAAC;;ICnGM,SAAS,OAAO,CAAC,MAAM,EAAE;IAChC,IAAI,OAAO,UAAU,CAAC,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IACnF,CAAC;AACD,IAAO,SAAS,OAAO,CAAC,IAAI,EAAE;IAC9B,IAAI,OAAO,UAAU,MAAM,EAAE;IAC7B,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE;IAC7B,YAAY,OAAO,MAAM,CAAC,IAAI,CAAC,UAAU,YAAY,EAAE;IACvD,gBAAgB,IAAI;IACpB,oBAAoB,OAAO,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IACpD,iBAAiB;IACjB,gBAAgB,OAAO,GAAG,EAAE;IAC5B,oBAAoB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACpC,iBAAiB;IACjB,aAAa,CAAC,CAAC;IACf,SAAS;IACT,QAAQ,MAAM,IAAI,SAAS,CAAC,wCAAwC,CAAC,CAAC;IACtE,KAAK,CAAC;IACN,CAAC;;IChBM,SAAS,wBAAwB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE;IAC/F,IAAI,OAAO,IAAI,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;IACxF,CAAC;IACD,IAAI,kBAAkB,IAAI,UAAU,MAAM,EAAE;IAC5C,IAAI,SAAS,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;IAC1C,IAAI,SAAS,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE;IACzG,QAAQ,IAAI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,IAAI,IAAI,CAAC;IAC3D,QAAQ,KAAK,CAAC,UAAU,GAAG,UAAU,CAAC;IACtC,QAAQ,KAAK,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IACpD,QAAQ,KAAK,CAAC,KAAK,GAAG,MAAM;IAC5B,cAAc,UAAU,KAAK,EAAE;IAC/B,gBAAgB,IAAI;IACpB,oBAAoB,MAAM,CAAC,KAAK,CAAC,CAAC;IAClC,iBAAiB;IACjB,gBAAgB,OAAO,GAAG,EAAE;IAC5B,oBAAoB,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3C,iBAAiB;IACjB,aAAa;IACb,cAAc,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC;IACrC,QAAQ,KAAK,CAAC,MAAM,GAAG,OAAO;IAC9B,cAAc,UAAU,GAAG,EAAE;IAC7B,gBAAgB,IAAI;IACpB,oBAAoB,OAAO,CAAC,GAAG,CAAC,CAAC;IACjC,iBAAiB;IACjB,gBAAgB,OAAO,GAAG,EAAE;IAC5B,oBAAoB,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3C,iBAAiB;IACjB,wBAAwB;IACxB,oBAAoB,IAAI,CAAC,WAAW,EAAE,CAAC;IACvC,iBAAiB;IACjB,aAAa;IACb,cAAc,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;IACtC,QAAQ,KAAK,CAAC,SAAS,GAAG,UAAU;IACpC,cAAc,YAAY;IAC1B,gBAAgB,IAAI;IACpB,oBAAoB,UAAU,EAAE,CAAC;IACjC,iBAAiB;IACjB,gBAAgB,OAAO,GAAG,EAAE;IAC5B,oBAAoB,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3C,iBAAiB;IACjB,wBAAwB;IACxB,oBAAoB,IAAI,CAAC,WAAW,EAAE,CAAC;IACvC,iBAAiB;IACjB,aAAa;IACb,cAAc,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC;IACzC,QAAQ,OAAO,KAAK,CAAC;IACrB,KAAK;IACL,IAAI,kBAAkB,CAAC,SAAS,CAAC,WAAW,GAAG,YAAY;IAC3D,QAAQ,IAAI,EAAE,CAAC;IACf,QAAQ,IAAI,CAAC,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,iBAAiB,EAAE,EAAE;IACjE,YAAY,IAAI,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC;IACvC,YAAY,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpD,YAAY,CAAC,QAAQ,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,UAAU,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACrG,SAAS;IACT,KAAK,CAAC;IACN,IAAI,OAAO,kBAAkB,CAAC;IAC9B,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;;ICxDR,SAAS,QAAQ,GAAG;IAC3B,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,UAAU,GAAG,IAAI,CAAC;IAC9B,QAAQ,MAAM,CAAC,SAAS,EAAE,CAAC;IAC3B,QAAQ,IAAI,UAAU,GAAG,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY;IAC3G,YAAY,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,SAAS,EAAE;IAC5E,gBAAgB,UAAU,GAAG,IAAI,CAAC;IAClC,gBAAgB,OAAO;IACvB,aAAa;IACb,YAAY,IAAI,gBAAgB,GAAG,MAAM,CAAC,WAAW,CAAC;IACtD,YAAY,IAAI,IAAI,GAAG,UAAU,CAAC;IAClC,YAAY,UAAU,GAAG,IAAI,CAAC;IAC9B,YAAY,IAAI,gBAAgB,KAAK,CAAC,IAAI,IAAI,gBAAgB,KAAK,IAAI,CAAC,EAAE;IAC1E,gBAAgB,gBAAgB,CAAC,WAAW,EAAE,CAAC;IAC/C,aAAa;IACb,YAAY,UAAU,CAAC,WAAW,EAAE,CAAC;IACrC,SAAS,CAAC,CAAC;IACX,QAAQ,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACrC,QAAQ,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;IAChC,YAAY,UAAU,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;IAC1C,SAAS;IACT,KAAK,CAAC,CAAC;IACP,CAAC;;AClBE,QAAC,qBAAqB,IAAI,UAAU,MAAM,EAAE;IAC/C,IAAI,SAAS,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;IAC7C,IAAI,SAAS,qBAAqB,CAAC,MAAM,EAAE,cAAc,EAAE;IAC3D,QAAQ,IAAI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;IAC9C,QAAQ,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;IAC9B,QAAQ,KAAK,CAAC,cAAc,GAAG,cAAc,CAAC;IAC9C,QAAQ,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;IAC9B,QAAQ,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC;IAC5B,QAAQ,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC;IACjC,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE;IAC7B,YAAY,KAAK,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;IACrC,SAAS;IACT,QAAQ,OAAO,KAAK,CAAC;IACrB,KAAK;IACL,IAAI,qBAAqB,CAAC,SAAS,CAAC,UAAU,GAAG,UAAU,UAAU,EAAE;IACvE,QAAQ,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACvD,KAAK,CAAC;IACN,IAAI,qBAAqB,CAAC,SAAS,CAAC,UAAU,GAAG,YAAY;IAC7D,QAAQ,IAAI,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC;IACpC,QAAQ,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,SAAS,EAAE;IAC3C,YAAY,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;IAClD,SAAS;IACT,QAAQ,OAAO,IAAI,CAAC,QAAQ,CAAC;IAC7B,KAAK,CAAC;IACN,IAAI,qBAAqB,CAAC,SAAS,CAAC,SAAS,GAAG,YAAY;IAC5D,QAAQ,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;IAC3B,QAAQ,IAAI,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;IAC3C,QAAQ,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IAChD,QAAQ,WAAW,KAAK,IAAI,IAAI,WAAW,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,WAAW,CAAC,WAAW,EAAE,CAAC;IAC5F,KAAK,CAAC;IACN,IAAI,qBAAqB,CAAC,SAAS,CAAC,OAAO,GAAG,YAAY;IAC1D,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;IACzB,QAAQ,IAAI,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;IAC1C,QAAQ,IAAI,CAAC,UAAU,EAAE;IACzB,YAAY,UAAU,GAAG,IAAI,CAAC,WAAW,GAAG,IAAI,YAAY,EAAE,CAAC;IAC/D,YAAY,IAAI,SAAS,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;IAC9C,YAAY,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,SAAS,EAAE,SAAS,EAAE,YAAY;IAC5G,gBAAgB,KAAK,CAAC,SAAS,EAAE,CAAC;IAClC,gBAAgB,SAAS,CAAC,QAAQ,EAAE,CAAC;IACrC,aAAa,EAAE,UAAU,GAAG,EAAE;IAC9B,gBAAgB,KAAK,CAAC,SAAS,EAAE,CAAC;IAClC,gBAAgB,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACrC,aAAa,EAAE,YAAY,EAAE,OAAO,KAAK,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC5D,YAAY,IAAI,UAAU,CAAC,MAAM,EAAE;IACnC,gBAAgB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IACxC,gBAAgB,UAAU,GAAG,YAAY,CAAC,KAAK,CAAC;IAChD,aAAa;IACb,SAAS;IACT,QAAQ,OAAO,UAAU,CAAC;IAC1B,KAAK,CAAC;IACN,IAAI,qBAAqB,CAAC,SAAS,CAAC,QAAQ,GAAG,YAAY;IAC3D,QAAQ,OAAOC,QAAmB,EAAE,CAAC,IAAI,CAAC,CAAC;IAC3C,KAAK,CAAC;IACN,IAAI,OAAO,qBAAqB,CAAC;IACjC,CAAC,CAAC,UAAU,CAAC,CAAC;;IC5DP,IAAI,4BAA4B,GAAG;IAC1C,IAAI,GAAG,EAAE,YAAY;IACrB,QAAQ,OAAO,CAAC,4BAA4B,CAAC,QAAQ,IAAI,WAAW,EAAE,GAAG,EAAE,CAAC;IAC5E,KAAK;IACL,IAAI,QAAQ,EAAE,SAAS;IACvB,CAAC,CAAC;;ICHK,IAAI,sBAAsB,GAAG;IACpC,IAAI,QAAQ,EAAE,UAAU,QAAQ,EAAE;IAClC,QAAQ,IAAI,OAAO,GAAG,qBAAqB,CAAC;IAC5C,QAAQ,IAAI,MAAM,GAAG,oBAAoB,CAAC;IAC1C,QAAQ,IAAI,QAAQ,GAAG,sBAAsB,CAAC,QAAQ,CAAC;IACvD,QAAQ,IAAI,QAAQ,EAAE;IACtB,YAAY,OAAO,GAAG,QAAQ,CAAC,qBAAqB,CAAC;IACrD,YAAY,MAAM,GAAG,QAAQ,CAAC,oBAAoB,CAAC;IACnD,SAAS;IACT,QAAQ,IAAI,MAAM,GAAG,OAAO,CAAC,UAAU,SAAS,EAAE;IAClD,YAAY,MAAM,GAAG,SAAS,CAAC;IAC/B,YAAY,QAAQ,CAAC,SAAS,CAAC,CAAC;IAChC,SAAS,CAAC,CAAC;IACX,QAAQ,OAAO,IAAI,YAAY,CAAC,YAAY,EAAE,OAAO,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;IACxH,KAAK;IACL,IAAI,qBAAqB,EAAE,YAAY;IACvC,QAAQ,IAAI,IAAI,GAAG,EAAE,CAAC;IACtB,QAAQ,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IACtD,YAAY,IAAI,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACrC,SAAS;IACT,QAAQ,IAAI,QAAQ,GAAG,sBAAsB,CAAC,QAAQ,CAAC;IACvD,QAAQ,OAAO,CAAC,CAAC,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,QAAQ,CAAC,qBAAqB,KAAK,qBAAqB,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC9K,KAAK;IACL,IAAI,oBAAoB,EAAE,YAAY;IACtC,QAAQ,IAAI,IAAI,GAAG,EAAE,CAAC;IACtB,QAAQ,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IACtD,YAAY,IAAI,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACrC,SAAS;IACT,QAAQ,IAAI,QAAQ,GAAG,sBAAsB,CAAC,QAAQ,CAAC;IACvD,QAAQ,OAAO,CAAC,CAAC,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,QAAQ,CAAC,oBAAoB,KAAK,oBAAoB,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC5K,KAAK;IACL,IAAI,QAAQ,EAAE,SAAS;IACvB,CAAC,CAAC;;IC/BK,SAAS,eAAe,CAAC,iBAAiB,EAAE;IACnD,IAAI,OAAO,iBAAiB,GAAG,sBAAsB,CAAC,iBAAiB,CAAC,GAAG,wBAAwB,CAAC;IACpG,CAAC;IACD,SAAS,sBAAsB,CAAC,iBAAiB,EAAE;IACnD,IAAI,OAAO,IAAI,UAAU,CAAC,UAAU,UAAU,EAAE;IAChD,QAAQ,IAAI,QAAQ,GAAG,iBAAiB,IAAI,4BAA4B,CAAC;IACzE,QAAQ,IAAI,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC;IACnC,QAAQ,IAAI,EAAE,GAAG,CAAC,CAAC;IACnB,QAAQ,IAAI,GAAG,GAAG,YAAY;IAC9B,YAAY,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;IACpC,gBAAgB,EAAE,GAAG,sBAAsB,CAAC,qBAAqB,CAAC,UAAU,SAAS,EAAE;IACvF,oBAAoB,EAAE,GAAG,CAAC,CAAC;IAC3B,oBAAoB,IAAI,GAAG,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC;IAC7C,oBAAoB,UAAU,CAAC,IAAI,CAAC;IACpC,wBAAwB,SAAS,EAAE,iBAAiB,GAAG,GAAG,GAAG,SAAS;IACtE,wBAAwB,OAAO,EAAE,GAAG,GAAG,KAAK;IAC5C,qBAAqB,CAAC,CAAC;IACvB,oBAAoB,GAAG,EAAE,CAAC;IAC1B,iBAAiB,CAAC,CAAC;IACnB,aAAa;IACb,SAAS,CAAC;IACV,QAAQ,GAAG,EAAE,CAAC;IACd,QAAQ,OAAO,YAAY;IAC3B,YAAY,IAAI,EAAE,EAAE;IACpB,gBAAgB,sBAAsB,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAC;IAChE,aAAa;IACb,SAAS,CAAC;IACV,KAAK,CAAC,CAAC;IACP,CAAC;IACD,IAAI,wBAAwB,GAAG,sBAAsB,EAAE,CAAC;;AC/B9C,QAAC,uBAAuB,GAAG,gBAAgB,CAAC,UAAU,MAAM,EAAE;IACxE,IAAI,OAAO,SAAS,2BAA2B,GAAG;IAClD,QAAQ,MAAM,CAAC,IAAI,CAAC,CAAC;IACrB,QAAQ,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;IAC9C,QAAQ,IAAI,CAAC,OAAO,GAAG,qBAAqB,CAAC;IAC7C,KAAK,CAAC;IACN,CAAC,CAAC;;ACDC,QAAC,OAAO,IAAI,UAAU,MAAM,EAAE;IACjC,IAAI,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC/B,IAAI,SAAS,OAAO,GAAG;IACvB,QAAQ,IAAI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;IAC9C,QAAQ,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC;IAC7B,QAAQ,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC;IACtC,QAAQ,KAAK,CAAC,SAAS,GAAG,EAAE,CAAC;IAC7B,QAAQ,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC;IAChC,QAAQ,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC;IAC/B,QAAQ,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC;IACjC,QAAQ,OAAO,KAAK,CAAC;IACrB,KAAK;IACL,IAAI,OAAO,CAAC,SAAS,CAAC,IAAI,GAAG,UAAU,QAAQ,EAAE;IACjD,QAAQ,IAAI,OAAO,GAAG,IAAI,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACvD,QAAQ,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACpC,QAAQ,OAAO,OAAO,CAAC;IACvB,KAAK,CAAC;IACN,IAAI,OAAO,CAAC,SAAS,CAAC,cAAc,GAAG,YAAY;IACnD,QAAQ,IAAI,IAAI,CAAC,MAAM,EAAE;IACzB,YAAY,MAAM,IAAI,uBAAuB,EAAE,CAAC;IAChD,SAAS;IACT,KAAK,CAAC;IACN,IAAI,OAAO,CAAC,SAAS,CAAC,IAAI,GAAG,UAAU,KAAK,EAAE;IAC9C,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;IACzB,QAAQ,YAAY,CAAC,YAAY;IACjC,YAAY,IAAI,GAAG,EAAE,EAAE,CAAC;IACxB,YAAY,KAAK,CAAC,cAAc,EAAE,CAAC;IACnC,YAAY,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE;IAClC,gBAAgB,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE;IAC7C,oBAAoB,KAAK,CAAC,gBAAgB,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACzE,iBAAiB;IACjB,gBAAgB,IAAI;IACpB,oBAAoB,KAAK,IAAI,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE;IAC9G,wBAAwB,IAAI,QAAQ,GAAG,EAAE,CAAC,KAAK,CAAC;IAChD,wBAAwB,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC7C,qBAAqB;IACrB,iBAAiB;IACjB,gBAAgB,OAAO,KAAK,EAAE,EAAE,GAAG,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;IACzD,wBAAwB;IACxB,oBAAoB,IAAI;IACxB,wBAAwB,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC5E,qBAAqB;IACrB,4BAA4B,EAAE,IAAI,GAAG,EAAE,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE;IACzD,iBAAiB;IACjB,aAAa;IACb,SAAS,CAAC,CAAC;IACX,KAAK,CAAC;IACN,IAAI,OAAO,CAAC,SAAS,CAAC,KAAK,GAAG,UAAU,GAAG,EAAE;IAC7C,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;IACzB,QAAQ,YAAY,CAAC,YAAY;IACjC,YAAY,KAAK,CAAC,cAAc,EAAE,CAAC;IACnC,YAAY,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE;IAClC,gBAAgB,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IACxD,gBAAgB,KAAK,CAAC,WAAW,GAAG,GAAG,CAAC;IACxC,gBAAgB,IAAI,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;IAChD,gBAAgB,OAAO,SAAS,CAAC,MAAM,EAAE;IACzC,oBAAoB,SAAS,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACjD,iBAAiB;IACjB,aAAa;IACb,SAAS,CAAC,CAAC;IACX,KAAK,CAAC;IACN,IAAI,OAAO,CAAC,SAAS,CAAC,QAAQ,GAAG,YAAY;IAC7C,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;IACzB,QAAQ,YAAY,CAAC,YAAY;IACjC,YAAY,KAAK,CAAC,cAAc,EAAE,CAAC;IACnC,YAAY,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE;IAClC,gBAAgB,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IACvC,gBAAgB,IAAI,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;IAChD,gBAAgB,OAAO,SAAS,CAAC,MAAM,EAAE;IACzC,oBAAoB,SAAS,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC;IACjD,iBAAiB;IACjB,aAAa;IACb,SAAS,CAAC,CAAC;IACX,KAAK,CAAC;IACN,IAAI,OAAO,CAAC,SAAS,CAAC,WAAW,GAAG,YAAY;IAChD,QAAQ,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IAC5C,QAAQ,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;IACtD,KAAK,CAAC;IACN,IAAI,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,EAAE;IACzD,QAAQ,GAAG,EAAE,YAAY;IACzB,YAAY,IAAI,EAAE,CAAC;IACnB,YAAY,OAAO,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,MAAM,IAAI,CAAC,CAAC;IAC9F,SAAS;IACT,QAAQ,UAAU,EAAE,KAAK;IACzB,QAAQ,YAAY,EAAE,IAAI;IAC1B,KAAK,CAAC,CAAC;IACP,IAAI,OAAO,CAAC,SAAS,CAAC,aAAa,GAAG,UAAU,UAAU,EAAE;IAC5D,QAAQ,IAAI,CAAC,cAAc,EAAE,CAAC;IAC9B,QAAQ,OAAO,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACrE,KAAK,CAAC;IACN,IAAI,OAAO,CAAC,SAAS,CAAC,UAAU,GAAG,UAAU,UAAU,EAAE;IACzD,QAAQ,IAAI,CAAC,cAAc,EAAE,CAAC;IAC9B,QAAQ,IAAI,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC;IACjD,QAAQ,OAAO,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;IAChD,KAAK,CAAC;IACN,IAAI,OAAO,CAAC,SAAS,CAAC,eAAe,GAAG,UAAU,UAAU,EAAE;IAC9D,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;IACzB,QAAQ,IAAI,EAAE,GAAG,IAAI,EAAE,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,SAAS,GAAG,EAAE,CAAC,SAAS,EAAE,SAAS,GAAG,EAAE,CAAC,SAAS,CAAC;IAClG,QAAQ,IAAI,QAAQ,IAAI,SAAS,EAAE;IACnC,YAAY,OAAO,kBAAkB,CAAC;IACtC,SAAS;IACT,QAAQ,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;IACrC,QAAQ,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACnC,QAAQ,OAAO,IAAI,YAAY,CAAC,YAAY;IAC5C,YAAY,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAC1C,YAAY,SAAS,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAC7C,SAAS,CAAC,CAAC;IACX,KAAK,CAAC;IACN,IAAI,OAAO,CAAC,SAAS,CAAC,uBAAuB,GAAG,UAAU,UAAU,EAAE;IACtE,QAAQ,IAAI,EAAE,GAAG,IAAI,EAAE,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,WAAW,GAAG,EAAE,CAAC,WAAW,EAAE,SAAS,GAAG,EAAE,CAAC,SAAS,CAAC;IACtG,QAAQ,IAAI,QAAQ,EAAE;IACtB,YAAY,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAC1C,SAAS;IACT,aAAa,IAAI,SAAS,EAAE;IAC5B,YAAY,UAAU,CAAC,QAAQ,EAAE,CAAC;IAClC,SAAS;IACT,KAAK,CAAC;IACN,IAAI,OAAO,CAAC,SAAS,CAAC,YAAY,GAAG,YAAY;IACjD,QAAQ,IAAI,UAAU,GAAG,IAAI,UAAU,EAAE,CAAC;IAC1C,QAAQ,UAAU,CAAC,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,OAAO,UAAU,CAAC;IAC1B,KAAK,CAAC;IACN,IAAI,OAAO,CAAC,MAAM,GAAG,UAAU,WAAW,EAAE,MAAM,EAAE;IACpD,QAAQ,OAAO,IAAI,gBAAgB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACzD,KAAK,CAAC;IACN,IAAI,OAAO,OAAO,CAAC;IACnB,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;AACf,IACA,IAAI,gBAAgB,IAAI,UAAU,MAAM,EAAE;IAC1C,IAAI,SAAS,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;IACxC,IAAI,SAAS,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE;IACnD,QAAQ,IAAI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;IAC9C,QAAQ,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC;IACxC,QAAQ,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;IAC9B,QAAQ,OAAO,KAAK,CAAC;IACrB,KAAK;IACL,IAAI,gBAAgB,CAAC,SAAS,CAAC,IAAI,GAAG,UAAU,KAAK,EAAE;IACvD,QAAQ,IAAI,EAAE,EAAE,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,WAAW,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IAC5I,KAAK,CAAC;IACN,IAAI,gBAAgB,CAAC,SAAS,CAAC,KAAK,GAAG,UAAU,GAAG,EAAE;IACtD,QAAQ,IAAI,EAAE,EAAE,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,WAAW,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;IAC3I,KAAK,CAAC;IACN,IAAI,gBAAgB,CAAC,SAAS,CAAC,QAAQ,GAAG,YAAY;IACtD,QAAQ,IAAI,EAAE,EAAE,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,WAAW,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,QAAQ,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACzI,KAAK,CAAC;IACN,IAAI,gBAAgB,CAAC,SAAS,CAAC,UAAU,GAAG,UAAU,UAAU,EAAE;IAClE,QAAQ,IAAI,EAAE,EAAE,EAAE,CAAC;IACnB,QAAQ,OAAO,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,MAAM,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,EAAE,GAAG,kBAAkB,CAAC;IAC3J,KAAK,CAAC;IACN,IAAI,OAAO,gBAAgB,CAAC;IAC5B,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;;AC7JT,QAAC,eAAe,IAAI,UAAU,MAAM,EAAE;IACzC,IAAI,SAAS,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IACvC,IAAI,SAAS,eAAe,CAAC,MAAM,EAAE;IACrC,QAAQ,IAAI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;IAC9C,QAAQ,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;IAC9B,QAAQ,OAAO,KAAK,CAAC;IACrB,KAAK;IACL,IAAI,MAAM,CAAC,cAAc,CAAC,eAAe,CAAC,SAAS,EAAE,OAAO,EAAE;IAC9D,QAAQ,GAAG,EAAE,YAAY;IACzB,YAAY,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;IACnC,SAAS;IACT,QAAQ,UAAU,EAAE,KAAK;IACzB,QAAQ,YAAY,EAAE,IAAI;IAC1B,KAAK,CAAC,CAAC;IACP,IAAI,eAAe,CAAC,SAAS,CAAC,UAAU,GAAG,UAAU,UAAU,EAAE;IACjE,QAAQ,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAC9E,QAAQ,CAAC,YAAY,CAAC,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC7D,QAAQ,OAAO,YAAY,CAAC;IAC5B,KAAK,CAAC;IACN,IAAI,eAAe,CAAC,SAAS,CAAC,QAAQ,GAAG,YAAY;IACrD,QAAQ,IAAI,EAAE,GAAG,IAAI,EAAE,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,WAAW,GAAG,EAAE,CAAC,WAAW,EAAE,MAAM,GAAG,EAAE,CAAC,MAAM,CAAC;IAChG,QAAQ,IAAI,QAAQ,EAAE;IACtB,YAAY,MAAM,WAAW,CAAC;IAC9B,SAAS;IACT,QAAQ,IAAI,CAAC,cAAc,EAAE,CAAC;IAC9B,QAAQ,OAAO,MAAM,CAAC;IACtB,KAAK,CAAC;IACN,IAAI,eAAe,CAAC,SAAS,CAAC,IAAI,GAAG,UAAU,KAAK,EAAE;IACtD,QAAQ,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,GAAG,KAAK,EAAE,CAAC;IAChE,KAAK,CAAC;IACN,IAAI,OAAO,eAAe,CAAC;IAC3B,CAAC,CAAC,OAAO,CAAC,CAAC;;ICjCJ,IAAI,qBAAqB,GAAG;IACnC,IAAI,GAAG,EAAE,YAAY;IACrB,QAAQ,OAAO,CAAC,qBAAqB,CAAC,QAAQ,IAAI,IAAI,EAAE,GAAG,EAAE,CAAC;IAC9D,KAAK;IACL,IAAI,QAAQ,EAAE,SAAS;IACvB,CAAC,CAAC;;ACFC,QAAC,aAAa,IAAI,UAAU,MAAM,EAAE;IACvC,IAAI,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IACrC,IAAI,SAAS,aAAa,CAAC,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE;IACzE,QAAQ,IAAI,WAAW,KAAK,KAAK,CAAC,EAAE,EAAE,WAAW,GAAG,QAAQ,CAAC,EAAE;IAC/D,QAAQ,IAAI,WAAW,KAAK,KAAK,CAAC,EAAE,EAAE,WAAW,GAAG,QAAQ,CAAC,EAAE;IAC/D,QAAQ,IAAI,kBAAkB,KAAK,KAAK,CAAC,EAAE,EAAE,kBAAkB,GAAG,qBAAqB,CAAC,EAAE;IAC1F,QAAQ,IAAI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;IAC9C,QAAQ,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC;IACxC,QAAQ,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC;IACxC,QAAQ,KAAK,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IACtD,QAAQ,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC;IAC3B,QAAQ,KAAK,CAAC,mBAAmB,GAAG,IAAI,CAAC;IACzC,QAAQ,KAAK,CAAC,mBAAmB,GAAG,WAAW,KAAK,QAAQ,CAAC;IAC7D,QAAQ,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;IACrD,QAAQ,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;IACrD,QAAQ,OAAO,KAAK,CAAC;IACrB,KAAK;IACL,IAAI,aAAa,CAAC,SAAS,CAAC,IAAI,GAAG,UAAU,KAAK,EAAE;IACpD,QAAQ,IAAI,EAAE,GAAG,IAAI,EAAE,SAAS,GAAG,EAAE,CAAC,SAAS,EAAE,OAAO,GAAG,EAAE,CAAC,OAAO,EAAE,mBAAmB,GAAG,EAAE,CAAC,mBAAmB,EAAE,kBAAkB,GAAG,EAAE,CAAC,kBAAkB,EAAE,WAAW,GAAG,EAAE,CAAC,WAAW,CAAC;IAC9L,QAAQ,IAAI,CAAC,SAAS,EAAE;IACxB,YAAY,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAChC,YAAY,CAAC,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,GAAG,WAAW,CAAC,CAAC;IACzF,SAAS;IACT,QAAQ,IAAI,CAAC,WAAW,EAAE,CAAC;IAC3B,QAAQ,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAChD,KAAK,CAAC;IACN,IAAI,aAAa,CAAC,SAAS,CAAC,UAAU,GAAG,UAAU,UAAU,EAAE;IAC/D,QAAQ,IAAI,CAAC,cAAc,EAAE,CAAC;IAC9B,QAAQ,IAAI,CAAC,WAAW,EAAE,CAAC;IAC3B,QAAQ,IAAI,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;IAC5D,QAAQ,IAAI,EAAE,GAAG,IAAI,EAAE,mBAAmB,GAAG,EAAE,CAAC,mBAAmB,EAAE,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC;IAC1F,QAAQ,IAAI,IAAI,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IACnC,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,IAAI,mBAAmB,GAAG,CAAC,GAAG,CAAC,EAAE;IACjG,YAAY,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACrC,SAAS;IACT,QAAQ,IAAI,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC;IACjD,QAAQ,OAAO,YAAY,CAAC;IAC5B,KAAK,CAAC;IACN,IAAI,aAAa,CAAC,SAAS,CAAC,WAAW,GAAG,YAAY;IACtD,QAAQ,IAAI,EAAE,GAAG,IAAI,EAAE,WAAW,GAAG,EAAE,CAAC,WAAW,EAAE,kBAAkB,GAAG,EAAE,CAAC,kBAAkB,EAAE,OAAO,GAAG,EAAE,CAAC,OAAO,EAAE,mBAAmB,GAAG,EAAE,CAAC,mBAAmB,CAAC;IACpK,QAAQ,IAAI,kBAAkB,GAAG,CAAC,mBAAmB,GAAG,CAAC,GAAG,CAAC,IAAI,WAAW,CAAC;IAC7E,QAAQ,WAAW,GAAG,QAAQ,IAAI,kBAAkB,GAAG,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,GAAG,kBAAkB,CAAC,CAAC;IAChI,QAAQ,IAAI,CAAC,mBAAmB,EAAE;IAClC,YAAY,IAAI,GAAG,GAAG,kBAAkB,CAAC,GAAG,EAAE,CAAC;IAC/C,YAAY,IAAI,IAAI,GAAG,CAAC,CAAC;IACzB,YAAY,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE;IAC7E,gBAAgB,IAAI,GAAG,CAAC,CAAC;IACzB,aAAa;IACb,YAAY,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC;IAChD,SAAS;IACT,KAAK,CAAC;IACN,IAAI,OAAO,aAAa,CAAC;IACzB,CAAC,CAAC,OAAO,CAAC,CAAC;;ACrDR,QAAC,YAAY,IAAI,UAAU,MAAM,EAAE;IACtC,IAAI,SAAS,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IACpC,IAAI,SAAS,YAAY,GAAG;IAC5B,QAAQ,IAAI,KAAK,GAAG,MAAM,KAAK,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,IAAI,CAAC;IAC7E,QAAQ,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC;IAChC,QAAQ,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC;IAClC,QAAQ,OAAO,KAAK,CAAC;IACrB,KAAK;IACL,IAAI,YAAY,CAAC,SAAS,CAAC,uBAAuB,GAAG,UAAU,UAAU,EAAE;IAC3E,QAAQ,IAAI,EAAE,GAAG,IAAI,EAAE,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,SAAS,GAAG,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,EAAE,CAAC,MAAM,EAAE,WAAW,GAAG,EAAE,CAAC,WAAW,EAAE,SAAS,GAAG,EAAE,CAAC,SAAS,EAAE,WAAW,GAAG,EAAE,CAAC,WAAW,CAAC;IAClL,QAAQ,IAAI,QAAQ,EAAE;IACtB,YAAY,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAC1C,SAAS;IACT,aAAa,IAAI,SAAS,IAAI,WAAW,EAAE;IAC3C,YAAY,SAAS,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACjD,YAAY,UAAU,CAAC,QAAQ,EAAE,CAAC;IAClC,SAAS;IACT,KAAK,CAAC;IACN,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,GAAG,UAAU,KAAK,EAAE;IACnD,QAAQ,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;IAC7B,YAAY,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IAChC,YAAY,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IAClC,SAAS;IACT,KAAK,CAAC;IACN,IAAI,YAAY,CAAC,SAAS,CAAC,QAAQ,GAAG,YAAY;IAClD,QAAQ,IAAI,EAAE,GAAG,IAAI,EAAE,SAAS,GAAG,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,EAAE,CAAC,MAAM,EAAE,WAAW,GAAG,EAAE,CAAC,WAAW,CAAC;IAClG,QAAQ,IAAI,CAAC,WAAW,EAAE;IAC1B,YAAY,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IACpC,YAAY,SAAS,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAClE,YAAY,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,SAAS;IACT,KAAK,CAAC;IACN,IAAI,OAAO,YAAY,CAAC;IACxB,CAAC,CAAC,OAAO,CAAC,CAAC;;IClCX,IAAI,MAAM,IAAI,UAAU,MAAM,EAAE;IAChC,IAAI,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,IAAI,SAAS,MAAM,CAAC,SAAS,EAAE,IAAI,EAAE;IACrC,QAAQ,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;IACzC,KAAK;IACL,IAAI,MAAM,CAAC,SAAS,CAAC,QAAQ,GAAG,UAAU,KAAK,EAAE,KAAK,EAAE;IACxD,QAAQ,IAAI,KAAK,KAAK,KAAK,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE;IAC5C,QAAQ,OAAO,IAAI,CAAC;IACpB,KAAK,CAAC;IACN,IAAI,OAAO,MAAM,CAAC;IAClB,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;;ICXV,IAAI,gBAAgB,GAAG;IAC9B,IAAI,WAAW,EAAE,UAAU,OAAO,EAAE,OAAO,EAAE;IAC7C,QAAQ,IAAI,IAAI,GAAG,EAAE,CAAC;IACtB,QAAQ,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IACtD,YAAY,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACzC,SAAS;IACT,QAAQ,IAAI,QAAQ,GAAG,gBAAgB,CAAC,QAAQ,CAAC;IACjD,QAAQ,IAAI,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,QAAQ,CAAC,WAAW,EAAE;IACtF,YAAY,OAAO,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACzG,SAAS;IACT,QAAQ,OAAO,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC1F,KAAK;IACL,IAAI,aAAa,EAAE,UAAU,MAAM,EAAE;IACrC,QAAQ,IAAI,QAAQ,GAAG,gBAAgB,CAAC,QAAQ,CAAC;IACjD,QAAQ,OAAO,CAAC,CAAC,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,QAAQ,CAAC,aAAa,KAAK,aAAa,EAAE,MAAM,CAAC,CAAC;IACvH,KAAK;IACL,IAAI,QAAQ,EAAE,SAAS;IACvB,CAAC,CAAC;;ICdF,IAAI,WAAW,IAAI,UAAU,MAAM,EAAE;IACrC,IAAI,SAAS,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACnC,IAAI,SAAS,WAAW,CAAC,SAAS,EAAE,IAAI,EAAE;IAC1C,QAAQ,IAAI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC;IAC/D,QAAQ,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;IACpC,QAAQ,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;IAC1B,QAAQ,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC;IAC9B,QAAQ,OAAO,KAAK,CAAC;IACrB,KAAK;IACL,IAAI,WAAW,CAAC,SAAS,CAAC,QAAQ,GAAG,UAAU,KAAK,EAAE,KAAK,EAAE;IAC7D,QAAQ,IAAI,EAAE,CAAC;IACf,QAAQ,IAAI,KAAK,KAAK,KAAK,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE;IAC5C,QAAQ,IAAI,IAAI,CAAC,MAAM,EAAE;IACzB,YAAY,OAAO,IAAI,CAAC;IACxB,SAAS;IACT,QAAQ,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IAC3B,QAAQ,IAAI,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;IACzB,QAAQ,IAAI,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;IACvC,QAAQ,IAAI,EAAE,IAAI,IAAI,EAAE;IACxB,YAAY,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;IAChE,SAAS;IACT,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IAC5B,QAAQ,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IAC3B,QAAQ,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IACjH,QAAQ,OAAO,IAAI,CAAC;IACpB,KAAK,CAAC;IACN,IAAI,WAAW,CAAC,SAAS,CAAC,cAAc,GAAG,UAAU,SAAS,EAAE,GAAG,EAAE,KAAK,EAAE;IAC5E,QAAQ,IAAI,KAAK,KAAK,KAAK,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE;IAC5C,QAAQ,OAAO,gBAAgB,CAAC,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;IAC1F,KAAK,CAAC;IACN,IAAI,WAAW,CAAC,SAAS,CAAC,cAAc,GAAG,UAAU,UAAU,EAAE,EAAE,EAAE,KAAK,EAAE;IAC5E,QAAQ,IAAI,KAAK,KAAK,KAAK,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE;IAC5C,QAAQ,IAAI,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK,EAAE;IAC7E,YAAY,OAAO,EAAE,CAAC;IACtB,SAAS;IACT,QAAQ,IAAI,EAAE,IAAI,IAAI,EAAE;IACxB,YAAY,gBAAgB,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;IAC/C,SAAS;IACT,QAAQ,OAAO,SAAS,CAAC;IACzB,KAAK,CAAC;IACN,IAAI,WAAW,CAAC,SAAS,CAAC,OAAO,GAAG,UAAU,KAAK,EAAE,KAAK,EAAE;IAC5D,QAAQ,IAAI,IAAI,CAAC,MAAM,EAAE;IACzB,YAAY,OAAO,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IAC7D,SAAS;IACT,QAAQ,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IAC7B,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAChD,QAAQ,IAAI,KAAK,EAAE;IACnB,YAAY,OAAO,KAAK,CAAC;IACzB,SAAS;IACT,aAAa,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK,IAAI,IAAI,CAAC,EAAE,IAAI,IAAI,EAAE;IAC5D,YAAY,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IACzE,SAAS;IACT,KAAK,CAAC;IACN,IAAI,WAAW,CAAC,SAAS,CAAC,QAAQ,GAAG,UAAU,KAAK,EAAE,MAAM,EAAE;IAC9D,QAAQ,IAAI,OAAO,GAAG,KAAK,CAAC;IAC5B,QAAQ,IAAI,UAAU,CAAC;IACvB,QAAQ,IAAI;IACZ,YAAY,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC7B,SAAS;IACT,QAAQ,OAAO,CAAC,EAAE;IAClB,YAAY,OAAO,GAAG,IAAI,CAAC;IAC3B,YAAY,UAAU,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;IACjF,SAAS;IACT,QAAQ,IAAI,OAAO,EAAE;IACrB,YAAY,IAAI,CAAC,WAAW,EAAE,CAAC;IAC/B,YAAY,OAAO,UAAU,CAAC;IAC9B,SAAS;IACT,KAAK,CAAC;IACN,IAAI,WAAW,CAAC,SAAS,CAAC,WAAW,GAAG,YAAY;IACpD,QAAQ,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;IAC1B,YAAY,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,SAAS,GAAG,EAAE,CAAC,SAAS,CAAC;IAChE,YAAY,IAAI,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;IAC5C,YAAY,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IAC3D,YAAY,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACjC,YAAY,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACrC,YAAY,IAAI,EAAE,IAAI,IAAI,EAAE;IAC5B,gBAAgB,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;IACnE,aAAa;IACb,YAAY,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IAC9B,YAAY,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpD,SAAS;IACT,KAAK,CAAC;IACN,IAAI,OAAO,WAAW,CAAC;IACvB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;;ICvFX,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,IAAI,QAAQ,CAAC;IACb,IAAI,aAAa,GAAG,EAAE,CAAC;IACvB,SAAS,kBAAkB,CAAC,MAAM,EAAE;IACpC,IAAI,IAAI,MAAM,IAAI,aAAa,EAAE;IACjC,QAAQ,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;IACrC,QAAQ,OAAO,IAAI,CAAC;IACpB,KAAK;IACL,IAAI,OAAO,KAAK,CAAC;IACjB,CAAC;AACD,IAAO,IAAI,SAAS,GAAG;IACvB,IAAI,YAAY,EAAE,UAAU,EAAE,EAAE;IAChC,QAAQ,IAAI,MAAM,GAAG,UAAU,EAAE,CAAC;IAClC,QAAQ,aAAa,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IACrC,QAAQ,IAAI,CAAC,QAAQ,EAAE;IACvB,YAAY,QAAQ,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IACzC,SAAS;IACT,QAAQ,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,kBAAkB,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;IAClF,QAAQ,OAAO,MAAM,CAAC;IACtB,KAAK;IACL,IAAI,cAAc,EAAE,UAAU,MAAM,EAAE;IACtC,QAAQ,kBAAkB,CAAC,MAAM,CAAC,CAAC;IACnC,KAAK;IACL,CAAC,CAAC;;ICrBF,IAAI,YAAY,GAAG,SAAS,CAAC,YAAY,EAAE,cAAc,GAAG,SAAS,CAAC,cAAc,CAAC;AACrF,IAAO,IAAI,iBAAiB,GAAG;IAC/B,IAAI,YAAY,EAAE,YAAY;IAC9B,QAAQ,IAAI,IAAI,GAAG,EAAE,CAAC;IACtB,QAAQ,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IACtD,YAAY,IAAI,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACrC,SAAS;IACT,QAAQ,IAAI,QAAQ,GAAG,iBAAiB,CAAC,QAAQ,CAAC;IAClD,QAAQ,OAAO,CAAC,CAAC,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,QAAQ,CAAC,YAAY,KAAK,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC5J,KAAK;IACL,IAAI,cAAc,EAAE,UAAU,MAAM,EAAE;IACtC,QAAQ,IAAI,QAAQ,GAAG,iBAAiB,CAAC,QAAQ,CAAC;IAClD,QAAQ,OAAO,CAAC,CAAC,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,QAAQ,CAAC,cAAc,KAAK,cAAc,EAAE,MAAM,CAAC,CAAC;IACzH,KAAK;IACL,IAAI,QAAQ,EAAE,SAAS;IACvB,CAAC,CAAC;;ICdF,IAAI,UAAU,IAAI,UAAU,MAAM,EAAE;IACpC,IAAI,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IAClC,IAAI,SAAS,UAAU,CAAC,SAAS,EAAE,IAAI,EAAE;IACzC,QAAQ,IAAI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC;IAC/D,QAAQ,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;IACpC,QAAQ,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;IAC1B,QAAQ,OAAO,KAAK,CAAC;IACrB,KAAK;IACL,IAAI,UAAU,CAAC,SAAS,CAAC,cAAc,GAAG,UAAU,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE;IAC1E,QAAQ,IAAI,KAAK,KAAK,KAAK,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE;IAC5C,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,GAAG,CAAC,EAAE;IACzC,YAAY,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;IACpF,SAAS;IACT,QAAQ,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrC,QAAQ,OAAO,SAAS,CAAC,UAAU,KAAK,SAAS,CAAC,UAAU,GAAG,iBAAiB,CAAC,YAAY,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IAC3I,KAAK,CAAC;IACN,IAAI,UAAU,CAAC,SAAS,CAAC,cAAc,GAAG,UAAU,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE;IAC1E,QAAQ,IAAI,EAAE,CAAC;IACf,QAAQ,IAAI,KAAK,KAAK,KAAK,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE;IAC5C,QAAQ,IAAI,KAAK,IAAI,IAAI,GAAG,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE;IACxD,YAAY,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;IACpF,SAAS;IACT,QAAQ,IAAI,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;IACxC,QAAQ,IAAI,EAAE,IAAI,IAAI,IAAI,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE;IAClH,YAAY,iBAAiB,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;IACjD,YAAY,IAAI,SAAS,CAAC,UAAU,KAAK,EAAE,EAAE;IAC7C,gBAAgB,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC;IACjD,aAAa;IACb,SAAS;IACT,QAAQ,OAAO,SAAS,CAAC;IACzB,KAAK,CAAC;IACN,IAAI,OAAO,UAAU,CAAC;IACtB,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;;AClCb,QAAC,SAAS,IAAI,YAAY;IAC7B,IAAI,SAAS,SAAS,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACjD,QAAQ,IAAI,GAAG,KAAK,KAAK,CAAC,EAAE,EAAE,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,EAAE;IACpD,QAAQ,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;IACvD,QAAQ,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACvB,KAAK;IACL,IAAI,SAAS,CAAC,SAAS,CAAC,QAAQ,GAAG,UAAU,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;IACjE,QAAQ,IAAI,KAAK,KAAK,KAAK,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE;IAC5C,QAAQ,OAAO,IAAI,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC/E,KAAK,CAAC;IACN,IAAI,SAAS,CAAC,GAAG,GAAG,qBAAqB,CAAC,GAAG,CAAC;IAC9C,IAAI,OAAO,SAAS,CAAC;IACrB,CAAC,EAAE,CAAC;;ICXJ,IAAI,cAAc,IAAI,UAAU,MAAM,EAAE;IACxC,IAAI,SAAS,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;IACtC,IAAI,SAAS,cAAc,CAAC,eAAe,EAAE,GAAG,EAAE;IAClD,QAAQ,IAAI,GAAG,KAAK,KAAK,CAAC,EAAE,EAAE,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,EAAE;IACpD,QAAQ,IAAI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,eAAe,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC;IACpE,QAAQ,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC;IAC3B,QAAQ,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC;IAC9B,QAAQ,OAAO,KAAK,CAAC;IACrB,KAAK;IACL,IAAI,cAAc,CAAC,SAAS,CAAC,KAAK,GAAG,UAAU,MAAM,EAAE;IACvD,QAAQ,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IACnC,QAAQ,IAAI,IAAI,CAAC,OAAO,EAAE;IAC1B,YAAY,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACjC,YAAY,OAAO;IACnB,SAAS;IACT,QAAQ,IAAI,KAAK,CAAC;IAClB,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IAC5B,QAAQ,GAAG;IACX,YAAY,KAAK,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG;IACtE,gBAAgB,MAAM;IACtB,aAAa;IACb,SAAS,SAAS,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,GAAG;IAC7C,QAAQ,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IAC7B,QAAQ,IAAI,KAAK,EAAE;IACnB,YAAY,QAAQ,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,GAAG;IAC/C,gBAAgB,MAAM,CAAC,WAAW,EAAE,CAAC;IACrC,aAAa;IACb,YAAY,MAAM,KAAK,CAAC;IACxB,SAAS;IACT,KAAK,CAAC;IACN,IAAI,OAAO,cAAc,CAAC;IAC1B,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;;IC/Bd,IAAI,aAAa,IAAI,UAAU,MAAM,EAAE;IACvC,IAAI,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IACrC,IAAI,SAAS,aAAa,GAAG;IAC7B,QAAQ,OAAO,MAAM,KAAK,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,IAAI,CAAC;IACxE,KAAK;IACL,IAAI,aAAa,CAAC,SAAS,CAAC,KAAK,GAAG,UAAU,MAAM,EAAE;IACtD,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IAC5B,QAAQ,IAAI,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC;IACtC,QAAQ,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IACpC,QAAQ,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IACnC,QAAQ,IAAI,KAAK,CAAC;IAClB,QAAQ,MAAM,GAAG,MAAM,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;IAC3C,QAAQ,GAAG;IACX,YAAY,KAAK,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG;IACtE,gBAAgB,MAAM;IACtB,aAAa;IACb,SAAS,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;IACpF,QAAQ,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IAC7B,QAAQ,IAAI,KAAK,EAAE;IACnB,YAAY,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;IACtF,gBAAgB,MAAM,CAAC,WAAW,EAAE,CAAC;IACrC,aAAa;IACb,YAAY,MAAM,KAAK,CAAC;IACxB,SAAS;IACT,KAAK,CAAC;IACN,IAAI,OAAO,aAAa,CAAC;IACzB,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC;;AC1BT,QAAC,aAAa,GAAG,IAAI,aAAa,CAAC,UAAU,CAAC,CAAC;AACzD,AAAU,QAAC,IAAI,GAAG,aAAa;;ACDrB,QAAC,cAAc,GAAG,IAAI,cAAc,CAAC,WAAW,CAAC,CAAC;AAC5D,AAAU,QAAC,KAAK,GAAG,cAAc;;ICDjC,IAAI,WAAW,IAAI,UAAU,MAAM,EAAE;IACrC,IAAI,SAAS,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACnC,IAAI,SAAS,WAAW,CAAC,SAAS,EAAE,IAAI,EAAE;IAC1C,QAAQ,IAAI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC;IAC/D,QAAQ,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;IACpC,QAAQ,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;IAC1B,QAAQ,OAAO,KAAK,CAAC;IACrB,KAAK;IACL,IAAI,WAAW,CAAC,SAAS,CAAC,QAAQ,GAAG,UAAU,KAAK,EAAE,KAAK,EAAE;IAC7D,QAAQ,IAAI,KAAK,KAAK,KAAK,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE;IAC5C,QAAQ,IAAI,KAAK,GAAG,CAAC,EAAE;IACvB,YAAY,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IACtE,SAAS;IACT,QAAQ,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IAC3B,QAAQ,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IAC3B,QAAQ,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACnC,QAAQ,OAAO,IAAI,CAAC;IACpB,KAAK,CAAC;IACN,IAAI,WAAW,CAAC,SAAS,CAAC,OAAO,GAAG,UAAU,KAAK,EAAE,KAAK,EAAE;IAC5D,QAAQ,OAAO,KAAK,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC1H,KAAK,CAAC;IACN,IAAI,WAAW,CAAC,SAAS,CAAC,cAAc,GAAG,UAAU,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE;IAC3E,QAAQ,IAAI,KAAK,KAAK,KAAK,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE;IAC5C,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,KAAK,GAAG,CAAC,MAAM,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE;IAC/E,YAAY,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;IACpF,SAAS;IACT,QAAQ,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,OAAO,CAAC,CAAC;IACjB,KAAK,CAAC;IACN,IAAI,OAAO,WAAW,CAAC;IACvB,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;;IC9BhB,IAAI,cAAc,IAAI,UAAU,MAAM,EAAE;IACxC,IAAI,SAAS,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;IACtC,IAAI,SAAS,cAAc,GAAG;IAC9B,QAAQ,OAAO,MAAM,KAAK,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,IAAI,CAAC;IACxE,KAAK;IACL,IAAI,OAAO,cAAc,CAAC;IAC1B,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC;;ACNT,QAAC,cAAc,GAAG,IAAI,cAAc,CAAC,WAAW,CAAC,CAAC;AAC5D,AAAU,QAAC,KAAK,GAAG,cAAc;;ICAjC,IAAI,oBAAoB,IAAI,UAAU,MAAM,EAAE;IAC9C,IAAI,SAAS,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC;IAC5C,IAAI,SAAS,oBAAoB,CAAC,SAAS,EAAE,IAAI,EAAE;IACnD,QAAQ,IAAI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC;IAC/D,QAAQ,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;IACpC,QAAQ,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;IAC1B,QAAQ,OAAO,KAAK,CAAC;IACrB,KAAK;IACL,IAAI,oBAAoB,CAAC,SAAS,CAAC,cAAc,GAAG,UAAU,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE;IACpF,QAAQ,IAAI,KAAK,KAAK,KAAK,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE;IAC5C,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,GAAG,CAAC,EAAE;IACzC,YAAY,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;IACpF,SAAS;IACT,QAAQ,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrC,QAAQ,OAAO,SAAS,CAAC,UAAU,KAAK,SAAS,CAAC,UAAU,GAAG,sBAAsB,CAAC,qBAAqB,CAAC,YAAY,EAAE,OAAO,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACjK,KAAK,CAAC;IACN,IAAI,oBAAoB,CAAC,SAAS,CAAC,cAAc,GAAG,UAAU,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE;IACpF,QAAQ,IAAI,EAAE,CAAC;IACf,QAAQ,IAAI,KAAK,KAAK,KAAK,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE;IAC5C,QAAQ,IAAI,KAAK,IAAI,IAAI,GAAG,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE;IACxD,YAAY,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;IACpF,SAAS;IACT,QAAQ,IAAI,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;IACxC,QAAQ,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,KAAK,SAAS,CAAC,UAAU,IAAI,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE;IACjJ,YAAY,sBAAsB,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAC;IAC5D,YAAY,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC;IAC7C,SAAS;IACT,QAAQ,OAAO,SAAS,CAAC;IACzB,KAAK,CAAC;IACN,IAAI,OAAO,oBAAoB,CAAC;IAChC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;;IC/BhB,IAAI,uBAAuB,IAAI,UAAU,MAAM,EAAE;IACjD,IAAI,SAAS,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAC;IAC/C,IAAI,SAAS,uBAAuB,GAAG;IACvC,QAAQ,OAAO,MAAM,KAAK,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,IAAI,CAAC;IACxE,KAAK;IACL,IAAI,uBAAuB,CAAC,SAAS,CAAC,KAAK,GAAG,UAAU,MAAM,EAAE;IAChE,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IAC5B,QAAQ,IAAI,OAAO,CAAC;IACpB,QAAQ,IAAI,MAAM,EAAE;IACpB,YAAY,OAAO,GAAG,MAAM,CAAC,EAAE,CAAC;IAChC,SAAS;IACT,aAAa;IACb,YAAY,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC;IACtC,YAAY,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IACxC,SAAS;IACT,QAAQ,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IACnC,QAAQ,IAAI,KAAK,CAAC;IAClB,QAAQ,MAAM,GAAG,MAAM,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;IAC3C,QAAQ,GAAG;IACX,YAAY,KAAK,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG;IACtE,gBAAgB,MAAM;IACtB,aAAa;IACb,SAAS,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;IACpF,QAAQ,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IAC7B,QAAQ,IAAI,KAAK,EAAE;IACnB,YAAY,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;IACtF,gBAAgB,MAAM,CAAC,WAAW,EAAE,CAAC;IACrC,aAAa;IACb,YAAY,MAAM,KAAK,CAAC;IACxB,SAAS;IACT,KAAK,CAAC;IACN,IAAI,OAAO,uBAAuB,CAAC;IACnC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC;;AChCT,QAAC,uBAAuB,GAAG,IAAI,uBAAuB,CAAC,oBAAoB,CAAC,CAAC;AACvF,AAAU,QAAC,cAAc,GAAG,uBAAuB;;ACChD,QAAC,oBAAoB,IAAI,UAAU,MAAM,EAAE;IAC9C,IAAI,SAAS,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC;IAC5C,IAAI,SAAS,oBAAoB,CAAC,mBAAmB,EAAE,SAAS,EAAE;IAClE,QAAQ,IAAI,mBAAmB,KAAK,KAAK,CAAC,EAAE,EAAE,mBAAmB,GAAG,aAAa,CAAC,EAAE;IACpF,QAAQ,IAAI,SAAS,KAAK,KAAK,CAAC,EAAE,EAAE,SAAS,GAAG,QAAQ,CAAC,EAAE;IAC3D,QAAQ,IAAI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,mBAAmB,EAAE,YAAY,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC;IACxG,QAAQ,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;IACpC,QAAQ,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC;IACxB,QAAQ,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;IACzB,QAAQ,OAAO,KAAK,CAAC;IACrB,KAAK;IACL,IAAI,oBAAoB,CAAC,SAAS,CAAC,KAAK,GAAG,YAAY;IACvD,QAAQ,IAAI,EAAE,GAAG,IAAI,EAAE,OAAO,GAAG,EAAE,CAAC,OAAO,EAAE,SAAS,GAAG,EAAE,CAAC,SAAS,CAAC;IACtE,QAAQ,IAAI,KAAK,CAAC;IAClB,QAAQ,IAAI,MAAM,CAAC;IACnB,QAAQ,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,KAAK,IAAI,SAAS,EAAE;IACnE,YAAY,OAAO,CAAC,KAAK,EAAE,CAAC;IAC5B,YAAY,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;IACtC,YAAY,KAAK,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG;IACtE,gBAAgB,MAAM;IACtB,aAAa;IACb,SAAS;IACT,QAAQ,IAAI,KAAK,EAAE;IACnB,YAAY,QAAQ,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,GAAG;IAC/C,gBAAgB,MAAM,CAAC,WAAW,EAAE,CAAC;IACrC,aAAa;IACb,YAAY,MAAM,KAAK,CAAC;IACxB,SAAS;IACT,KAAK,CAAC;IACN,IAAI,oBAAoB,CAAC,eAAe,GAAG,EAAE,CAAC;IAC9C,IAAI,OAAO,oBAAoB,CAAC;IAChC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC;AACnB,AACG,QAAC,aAAa,IAAI,UAAU,MAAM,EAAE;IACvC,IAAI,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IACrC,IAAI,SAAS,aAAa,CAAC,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE;IACnD,QAAQ,IAAI,KAAK,KAAK,KAAK,CAAC,EAAE,EAAE,KAAK,IAAI,SAAS,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE;IACjE,QAAQ,IAAI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC;IAC/D,QAAQ,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;IACpC,QAAQ,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;IAC1B,QAAQ,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;IAC5B,QAAQ,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,KAAK,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC;IAC9C,QAAQ,OAAO,KAAK,CAAC;IACrB,KAAK;IACL,IAAI,aAAa,CAAC,SAAS,CAAC,QAAQ,GAAG,UAAU,KAAK,EAAE,KAAK,EAAE;IAC/D,QAAQ,IAAI,KAAK,KAAK,KAAK,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE;IAC5C,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;IACpC,YAAY,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;IAC1B,gBAAgB,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAC1E,aAAa;IACb,YAAY,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IAChC,YAAY,IAAI,MAAM,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACtE,YAAY,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC7B,YAAY,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACjD,SAAS;IACT,aAAa;IACb,YAAY,OAAO,YAAY,CAAC,KAAK,CAAC;IACtC,SAAS;IACT,KAAK,CAAC;IACN,IAAI,aAAa,CAAC,SAAS,CAAC,cAAc,GAAG,UAAU,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE;IAC7E,QAAQ,IAAI,KAAK,KAAK,KAAK,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE;IAC5C,QAAQ,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC;IAC7C,QAAQ,IAAI,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;IACxC,QAAQ,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3B,QAAQ,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IAChD,QAAQ,OAAO,CAAC,CAAC;IACjB,KAAK,CAAC;IACN,IAAI,aAAa,CAAC,SAAS,CAAC,cAAc,GAAG,UAAU,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE;IAC7E,QAAQ,IAAI,KAAK,KAAK,KAAK,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE;IAC5C,QAAQ,OAAO,SAAS,CAAC;IACzB,KAAK,CAAC;IACN,IAAI,aAAa,CAAC,SAAS,CAAC,QAAQ,GAAG,UAAU,KAAK,EAAE,KAAK,EAAE;IAC/D,QAAQ,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,EAAE;IAClC,YAAY,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IACtE,SAAS;IACT,KAAK,CAAC;IACN,IAAI,aAAa,CAAC,WAAW,GAAG,UAAU,CAAC,EAAE,CAAC,EAAE;IAChD,QAAQ,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,EAAE;IACjC,YAAY,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,EAAE;IACrC,gBAAgB,OAAO,CAAC,CAAC;IACzB,aAAa;IACb,iBAAiB,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,EAAE;IACxC,gBAAgB,OAAO,CAAC,CAAC;IACzB,aAAa;IACb,iBAAiB;IACjB,gBAAgB,OAAO,CAAC,CAAC,CAAC;IAC1B,aAAa;IACb,SAAS;IACT,aAAa,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,EAAE;IACpC,YAAY,OAAO,CAAC,CAAC;IACrB,SAAS;IACT,aAAa;IACb,YAAY,OAAO,CAAC,CAAC,CAAC;IACtB,SAAS;IACT,KAAK,CAAC;IACN,IAAI,OAAO,aAAa,CAAC;IACzB,CAAC,CAAC,WAAW,CAAC,CAAC;;ACpGL,QAAC,KAAK,GAAG,IAAI,UAAU,CAAC,UAAU,UAAU,EAAE,EAAE,OAAO,UAAU,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC;AAC3F,IAAO,SAAS,KAAK,CAAC,SAAS,EAAE;IACjC,IAAI,OAAO,SAAS,GAAG,cAAc,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC;IACzD,CAAC;IACD,SAAS,cAAc,CAAC,SAAS,EAAE;IACnC,IAAI,OAAO,IAAI,UAAU,CAAC,UAAU,UAAU,EAAE,EAAE,OAAO,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,OAAO,UAAU,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IAC/H,CAAC;;ICNM,SAAS,WAAW,CAAC,KAAK,EAAE;IACnC,IAAI,OAAO,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC/C,CAAC;;ICDD,SAAS,IAAI,CAAC,GAAG,EAAE;IACnB,IAAI,OAAO,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC/B,CAAC;AACD,IAAO,SAAS,iBAAiB,CAAC,IAAI,EAAE;IACxC,IAAI,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;IAC3D,CAAC;AACD,IAAO,SAAS,YAAY,CAAC,IAAI,EAAE;IACnC,IAAI,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;IAC5D,CAAC;AACD,IAAO,SAAS,SAAS,CAAC,IAAI,EAAE,YAAY,EAAE;IAC9C,IAAI,OAAO,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,YAAY,CAAC;IACtE,CAAC;;ICbM,IAAI,WAAW,IAAI,UAAU,CAAC,EAAE,EAAE,OAAO,CAAC,IAAI,OAAO,CAAC,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,CAAC,KAAK,UAAU,CAAC,EAAE,CAAC,CAAC;;ICC1G,SAAS,SAAS,CAAC,KAAK,EAAE;IACjC,IAAI,OAAO,UAAU,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;IAChF,CAAC;;ICDM,SAAS,mBAAmB,CAAC,KAAK,EAAE;IAC3C,IAAI,OAAO,UAAU,CAAC,KAAK,CAACD,UAAiB,CAAC,CAAC,CAAC;IAChD,CAAC;;ICHM,SAAS,eAAe,CAAC,GAAG,EAAE;IACrC,IAAI,OAAO,MAAM,CAAC,aAAa,IAAI,UAAU,CAAC,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;IACnH,CAAC;;ICHM,SAAS,gCAAgC,CAAC,KAAK,EAAE;IACxD,IAAI,OAAO,IAAI,SAAS,CAAC,eAAe,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,GAAG,mBAAmB,GAAG,GAAG,GAAG,KAAK,GAAG,GAAG,CAAC,GAAG,0HAA0H,CAAC,CAAC;IACjQ,CAAC;;ICFM,SAAS,iBAAiB,GAAG;IACpC,IAAI,IAAI,OAAO,MAAM,KAAK,UAAU,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;IAC1D,QAAQ,OAAO,YAAY,CAAC;IAC5B,KAAK;IACL,IAAI,OAAO,MAAM,CAAC,QAAQ,CAAC;IAC3B,CAAC;AACD,IAAO,IAAI,QAAQ,GAAG,iBAAiB,EAAE,CAAC;;ICJnC,SAAS,UAAU,CAAC,KAAK,EAAE;IAClC,IAAI,OAAO,UAAU,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK,CAACE,QAAe,CAAC,CAAC,CAAC;IAC5F,CAAC;;ICFM,SAAS,kCAAkC,CAAC,cAAc,EAAE;IACnE,IAAI,OAAO,gBAAgB,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,oCAAoC,GAAG;IAC7F,QAAQ,IAAI,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC;IACpC,QAAQ,OAAO,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE;IAC/C,YAAY,QAAQ,EAAE,CAAC,KAAK;IAC5B,gBAAgB,KAAK,CAAC;IACtB,oBAAoB,MAAM,GAAG,cAAc,CAAC,SAAS,EAAE,CAAC;IACxD,oBAAoB,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC;IACjC,gBAAgB,KAAK,CAAC;IACtB,oBAAoB,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAC/C,oBAAoB,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC;IACjC,gBAAgB,KAAK,CAAC;AACtB,IACA,oBAAoB,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACvD,gBAAgB,KAAK,CAAC;IACtB,oBAAoB,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,KAAK,GAAG,EAAE,CAAC,KAAK,EAAE,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC;IACrE,oBAAoB,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7C,oBAAoB,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAChD,gBAAgB,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;IAC9C,gBAAgB,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IACnD,gBAAgB,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;IAC9C,gBAAgB,KAAK,CAAC;IACtB,oBAAoB,EAAE,CAAC,IAAI,EAAE,CAAC;IAC9B,oBAAoB,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAClC,gBAAgB,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACvC,gBAAgB,KAAK,CAAC;IACtB,oBAAoB,MAAM,CAAC,WAAW,EAAE,CAAC;IACzC,oBAAoB,OAAO,CAAC,CAAC,CAAC,CAAC;IAC/B,gBAAgB,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACpC,aAAa;IACb,SAAS,CAAC,CAAC;IACX,KAAK,CAAC,CAAC;IACP,CAAC;AACD,IAAO,SAAS,oBAAoB,CAAC,GAAG,EAAE;IAC1C,IAAI,OAAO,UAAU,CAAC,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC;IAC/E,CAAC;;ICzBM,SAAS,SAAS,CAAC,KAAK,EAAE;IACjC,IAAI,IAAI,KAAK,YAAY,UAAU,EAAE;IACrC,QAAQ,OAAO,KAAK,CAAC;IACrB,KAAK;IACL,IAAI,IAAI,KAAK,IAAI,IAAI,EAAE;IACvB,QAAQ,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE;IACxC,YAAY,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;IAChD,SAAS;IACT,QAAQ,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE;IAChC,YAAY,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC;IACxC,SAAS;IACT,QAAQ,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;IAC9B,YAAY,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;IACtC,SAAS;IACT,QAAQ,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE;IACpC,YAAY,OAAO,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAC5C,SAAS;IACT,QAAQ,IAAI,UAAU,CAAC,KAAK,CAAC,EAAE;IAC/B,YAAY,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;IACvC,SAAS;IACT,QAAQ,IAAI,oBAAoB,CAAC,KAAK,CAAC,EAAE;IACzC,YAAY,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC;IACjD,SAAS;IACT,KAAK;IACL,IAAI,MAAM,gCAAgC,CAAC,KAAK,CAAC,CAAC;IAClD,CAAC;AACD,IAAO,SAAS,qBAAqB,CAAC,GAAG,EAAE;IAC3C,IAAI,OAAO,IAAI,UAAU,CAAC,UAAU,UAAU,EAAE;IAChD,QAAQ,IAAI,GAAG,GAAG,GAAG,CAACF,UAAiB,CAAC,EAAE,CAAC;IAC3C,QAAQ,IAAI,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;IACvC,YAAY,OAAO,GAAG,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC7C,SAAS;IACT,QAAQ,MAAM,IAAI,SAAS,CAAC,gEAAgE,CAAC,CAAC;IAC9F,KAAK,CAAC,CAAC;IACP,CAAC;AACD,IAAO,SAAS,aAAa,CAAC,KAAK,EAAE;IACrC,IAAI,OAAO,IAAI,UAAU,CAAC,UAAU,UAAU,EAAE;IAChD,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACrE,YAAY,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACtC,SAAS;IACT,QAAQ,UAAU,CAAC,QAAQ,EAAE,CAAC;IAC9B,KAAK,CAAC,CAAC;IACP,CAAC;AACD,IAAO,SAAS,WAAW,CAAC,OAAO,EAAE;IACrC,IAAI,OAAO,IAAI,UAAU,CAAC,UAAU,UAAU,EAAE;IAChD,QAAQ,OAAO;IACf,aAAa,IAAI,CAAC,UAAU,KAAK,EAAE;IACnC,YAAY,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;IACpC,gBAAgB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,gBAAgB,UAAU,CAAC,QAAQ,EAAE,CAAC;IACtC,aAAa;IACb,SAAS,EAAE,UAAU,GAAG,EAAE,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;IAC5D,aAAa,IAAI,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC;IAC9C,KAAK,CAAC,CAAC;IACP,CAAC;AACD,IAAO,SAAS,YAAY,CAAC,QAAQ,EAAE;IACvC,IAAI,OAAO,IAAI,UAAU,CAAC,UAAU,UAAU,EAAE;IAChD,QAAQ,IAAI,GAAG,EAAE,EAAE,CAAC;IACpB,QAAQ,IAAI;IACZ,YAAY,KAAK,IAAI,UAAU,GAAG,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,YAAY,GAAG,UAAU,CAAC,IAAI,EAAE,EAAE;IAC9I,gBAAgB,IAAI,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC;IAC/C,gBAAgB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,gBAAgB,IAAI,UAAU,CAAC,MAAM,EAAE;IACvC,oBAAoB,OAAO;IAC3B,iBAAiB;IACjB,aAAa;IACb,SAAS;IACT,QAAQ,OAAO,KAAK,EAAE,EAAE,GAAG,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;IACjD,gBAAgB;IAChB,YAAY,IAAI;IAChB,gBAAgB,IAAI,YAAY,IAAI,CAAC,YAAY,CAAC,IAAI,KAAK,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACxG,aAAa;IACb,oBAAoB,EAAE,IAAI,GAAG,EAAE,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE;IACjD,SAAS;IACT,QAAQ,UAAU,CAAC,QAAQ,EAAE,CAAC;IAC9B,KAAK,CAAC,CAAC;IACP,CAAC;AACD,IAAO,SAAS,iBAAiB,CAAC,aAAa,EAAE;IACjD,IAAI,OAAO,IAAI,UAAU,CAAC,UAAU,UAAU,EAAE;IAChD,QAAQ,OAAO,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC,KAAK,CAAC,UAAU,GAAG,EAAE,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;IACnG,KAAK,CAAC,CAAC;IACP,CAAC;AACD,IAAO,SAAS,sBAAsB,CAAC,cAAc,EAAE;IACvD,IAAI,OAAO,iBAAiB,CAAC,kCAAkC,CAAC,cAAc,CAAC,CAAC,CAAC;IACjF,CAAC;IACD,SAAS,OAAO,CAAC,aAAa,EAAE,UAAU,EAAE;IAC5C,IAAI,IAAI,eAAe,EAAE,iBAAiB,CAAC;IAC3C,IAAI,IAAI,GAAG,EAAE,EAAE,CAAC;IAChB,IAAI,OAAO,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,KAAK,CAAC,EAAE,YAAY;IACvD,QAAQ,IAAI,KAAK,EAAE,KAAK,CAAC;IACzB,QAAQ,OAAO,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE;IAC/C,YAAY,QAAQ,EAAE,CAAC,KAAK;IAC5B,gBAAgB,KAAK,CAAC;IACtB,oBAAoB,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAChD,oBAAoB,eAAe,GAAG,aAAa,CAAC,aAAa,CAAC,CAAC;IACnE,oBAAoB,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC;IACjC,gBAAgB,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,eAAe,CAAC,IAAI,EAAE,CAAC,CAAC;IAC3D,gBAAgB,KAAK,CAAC;IACtB,oBAAoB,IAAI,EAAE,iBAAiB,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACjG,oBAAoB,KAAK,GAAG,iBAAiB,CAAC,KAAK,CAAC;IACpD,oBAAoB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3C,oBAAoB,IAAI,UAAU,CAAC,MAAM,EAAE;IAC3C,wBAAwB,OAAO,CAAC,CAAC,CAAC,CAAC;IACnC,qBAAqB;IACrB,oBAAoB,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC;IACjC,gBAAgB,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACtC,gBAAgB,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACvC,gBAAgB,KAAK,CAAC;IACtB,oBAAoB,KAAK,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC;IACtC,oBAAoB,GAAG,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;IAC3C,oBAAoB,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACnC,gBAAgB,KAAK,CAAC;IACtB,oBAAoB,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAC/C,oBAAoB,IAAI,EAAE,iBAAiB,IAAI,CAAC,iBAAiB,CAAC,IAAI,KAAK,EAAE,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACxH,oBAAoB,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IACzD,gBAAgB,KAAK,CAAC;IACtB,oBAAoB,EAAE,CAAC,IAAI,EAAE,CAAC;IAC9B,oBAAoB,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC;IACjC,gBAAgB,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACvC,gBAAgB,KAAK,CAAC;IACtB,oBAAoB,IAAI,GAAG,EAAE,MAAM,GAAG,CAAC,KAAK,CAAC;IAC7C,oBAAoB,OAAO,CAAC,CAAC,CAAC,CAAC;IAC/B,gBAAgB,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACpC,gBAAgB,KAAK,EAAE;IACvB,oBAAoB,UAAU,CAAC,QAAQ,EAAE,CAAC;IAC1C,oBAAoB,OAAO,CAAC,CAAC,CAAC,CAAC;IAC/B,aAAa;IACb,SAAS,CAAC,CAAC;IACX,KAAK,CAAC,CAAC;IACP,CAAC;;IC7IM,SAAS,eAAe,CAAC,kBAAkB,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE;IACpF,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE;IACxC,IAAI,IAAI,MAAM,KAAK,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,KAAK,CAAC,EAAE;IAC9C,IAAI,IAAI,oBAAoB,GAAG,SAAS,CAAC,QAAQ,CAAC,YAAY;IAC9D,QAAQ,IAAI,EAAE,CAAC;IACf,QAAQ,IAAI,MAAM,EAAE;IACpB,YAAY,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;IAC/D,SAAS;IACT,aAAa;IACb,YAAY,IAAI,CAAC,WAAW,EAAE,CAAC;IAC/B,SAAS;IACT,KAAK,EAAE,KAAK,CAAC,CAAC;IACd,IAAI,kBAAkB,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IACjD,IAAI,IAAI,CAAC,MAAM,EAAE;IACjB,QAAQ,OAAO,oBAAoB,CAAC;IACpC,KAAK;IACL,CAAC;;ICbM,SAAS,SAAS,CAAC,SAAS,EAAE,KAAK,EAAE;IAC5C,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE;IACxC,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE,EAAE,OAAO,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,EAAE,EAAE,YAAY,EAAE,OAAO,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,UAAU,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,EAAE,EAAE,UAAU,GAAG,EAAE,EAAE,OAAO,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC1a,KAAK,CAAC,CAAC;IACP,CAAC;;ICPM,SAAS,WAAW,CAAC,SAAS,EAAE,KAAK,EAAE;IAC9C,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC,EAAE,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE;IACxC,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,OAAO,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;IACxG,KAAK,CAAC,CAAC;IACP,CAAC;;ICHM,SAAS,kBAAkB,CAAC,KAAK,EAAE,SAAS,EAAE;IACrD,IAAI,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;IAC/E,CAAC;;ICFM,SAAS,eAAe,CAAC,KAAK,EAAE,SAAS,EAAE;IAClD,IAAI,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;IAC/E,CAAC;;ICJM,SAAS,aAAa,CAAC,KAAK,EAAE,SAAS,EAAE;IAChD,IAAI,OAAO,IAAI,UAAU,CAAC,UAAU,UAAU,EAAE;IAChD,QAAQ,IAAI,CAAC,GAAG,CAAC,CAAC;IAClB,QAAQ,OAAO,SAAS,CAAC,QAAQ,CAAC,YAAY;IAC9C,YAAY,IAAI,CAAC,KAAK,KAAK,CAAC,MAAM,EAAE;IACpC,gBAAgB,UAAU,CAAC,QAAQ,EAAE,CAAC;IACtC,aAAa;IACb,iBAAiB;IACjB,gBAAgB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5C,gBAAgB,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;IACxC,oBAAoB,IAAI,CAAC,QAAQ,EAAE,CAAC;IACpC,iBAAiB;IACjB,aAAa;IACb,SAAS,CAAC,CAAC;IACX,KAAK,CAAC,CAAC;IACP,CAAC;;ICZM,SAAS,gBAAgB,CAAC,KAAK,EAAE,SAAS,EAAE;IACnD,IAAI,OAAO,IAAI,UAAU,CAAC,UAAU,UAAU,EAAE;IAChD,QAAQ,IAAIG,WAAQ,CAAC;IACrB,QAAQ,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,YAAY;IAC3D,YAAYA,WAAQ,GAAG,KAAK,CAACD,QAAe,CAAC,EAAE,CAAC;IAChD,YAAY,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,YAAY;IAC/D,gBAAgB,IAAI,EAAE,CAAC;IACvB,gBAAgB,IAAI,KAAK,CAAC;IAC1B,gBAAgB,IAAI,IAAI,CAAC;IACzB,gBAAgB,IAAI;IACpB,oBAAoB,CAAC,EAAE,GAAGC,WAAQ,CAAC,IAAI,EAAE,EAAE,KAAK,GAAG,EAAE,CAAC,KAAK,EAAE,IAAI,GAAG,EAAE,CAAC,IAAI,EAAE;IAC7E,iBAAiB;IACjB,gBAAgB,OAAO,GAAG,EAAE;IAC5B,oBAAoB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC1C,oBAAoB,OAAO;IAC3B,iBAAiB;IACjB,gBAAgB,IAAI,IAAI,EAAE;IAC1B,oBAAoB,UAAU,CAAC,QAAQ,EAAE,CAAC;IAC1C,iBAAiB;IACjB,qBAAqB;IACrB,oBAAoB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3C,iBAAiB;IACjB,aAAa,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;IACxB,SAAS,CAAC,CAAC;IACX,QAAQ,OAAO,YAAY,EAAE,OAAO,UAAU,CAACA,WAAQ,KAAK,IAAI,IAAIA,WAAQ,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAGA,WAAQ,CAAC,MAAM,CAAC,IAAIA,WAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC;IAC5I,KAAK,CAAC,CAAC;IACP,CAAC;;IC5BM,SAAS,qBAAqB,CAAC,KAAK,EAAE,SAAS,EAAE;IACxD,IAAI,IAAI,CAAC,KAAK,EAAE;IAChB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnD,KAAK;IACL,IAAI,OAAO,IAAI,UAAU,CAAC,UAAU,UAAU,EAAE;IAChD,QAAQ,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,YAAY;IAC3D,YAAY,IAAI,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;IACzD,YAAY,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,YAAY;IAC/D,gBAAgB,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,UAAU,MAAM,EAAE;IACvD,oBAAoB,IAAI,MAAM,CAAC,IAAI,EAAE;IACrC,wBAAwB,UAAU,CAAC,QAAQ,EAAE,CAAC;IAC9C,qBAAqB;IACrB,yBAAyB;IACzB,wBAAwB,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACtD,qBAAqB;IACrB,iBAAiB,CAAC,CAAC;IACnB,aAAa,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;IACxB,SAAS,CAAC,CAAC;IACX,KAAK,CAAC,CAAC;IACP,CAAC;;ICnBM,SAAS,0BAA0B,CAAC,KAAK,EAAE,SAAS,EAAE;IAC7D,IAAI,OAAO,qBAAqB,CAAC,kCAAkC,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,CAAC;IACvF,CAAC;;ICSM,SAAS,SAAS,CAAC,KAAK,EAAE,SAAS,EAAE;IAC5C,IAAI,IAAI,KAAK,IAAI,IAAI,EAAE;IACvB,QAAQ,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE;IACxC,YAAY,OAAO,kBAAkB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IACxD,SAAS;IACT,QAAQ,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE;IAChC,YAAY,OAAO,aAAa,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IACnD,SAAS;IACT,QAAQ,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;IAC9B,YAAY,OAAO,eAAe,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IACrD,SAAS;IACT,QAAQ,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE;IACpC,YAAY,OAAO,qBAAqB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAC3D,SAAS;IACT,QAAQ,IAAI,UAAU,CAAC,KAAK,CAAC,EAAE;IAC/B,YAAY,OAAO,gBAAgB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IACtD,SAAS;IACT,QAAQ,IAAI,oBAAoB,CAAC,KAAK,CAAC,EAAE;IACzC,YAAY,OAAO,0BAA0B,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAChE,SAAS;IACT,KAAK;IACL,IAAI,MAAM,gCAAgC,CAAC,KAAK,CAAC,CAAC;IAClD,CAAC;;ICjCM,SAAS,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE;IACvC,IAAI,OAAO,SAAS,GAAG,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IACtE,CAAC;;ICFM,SAAS,EAAE,GAAG;IACrB,IAAI,IAAI,IAAI,GAAG,EAAE,CAAC;IAClB,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,IAAI,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACjC,KAAK;IACL,IAAI,IAAI,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACvC,IAAI,OAAO,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACjC,CAAC;;ICPM,SAAS,UAAU,CAAC,mBAAmB,EAAE,SAAS,EAAE;IAC3D,IAAI,IAAI,YAAY,GAAG,UAAU,CAAC,mBAAmB,CAAC,GAAG,mBAAmB,GAAG,YAAY,EAAE,OAAO,mBAAmB,CAAC,EAAE,CAAC;IAC3H,IAAI,IAAI,IAAI,GAAG,UAAU,UAAU,EAAE,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC;IAClF,IAAI,OAAO,IAAI,UAAU,CAAC,SAAS,GAAG,UAAU,UAAU,EAAE,EAAE,OAAO,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,EAAE,UAAU,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC;IACxH,CAAC;;ICDD,CAAC,UAAU,gBAAgB,EAAE;IAC7B,IAAI,gBAAgB,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;IACnC,IAAI,gBAAgB,CAAC,OAAO,CAAC,GAAG,GAAG,CAAC;IACpC,IAAI,gBAAgB,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC;IACvC,CAAC,EAAEC,wBAAgB,KAAKA,wBAAgB,GAAG,EAAE,CAAC,CAAC,CAAC;AAChD,AAAG,QAAC,YAAY,IAAI,YAAY;IAChC,IAAI,SAAS,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;IAC9C,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACzB,QAAQ,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IAC3B,QAAQ,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IAC3B,QAAQ,IAAI,CAAC,QAAQ,GAAG,IAAI,KAAK,GAAG,CAAC;IACrC,KAAK;IACL,IAAI,YAAY,CAAC,SAAS,CAAC,OAAO,GAAG,UAAU,QAAQ,EAAE;IACzD,QAAQ,OAAO,mBAAmB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACnD,KAAK,CAAC;IACN,IAAI,YAAY,CAAC,SAAS,CAAC,EAAE,GAAG,UAAU,WAAW,EAAE,YAAY,EAAE,eAAe,EAAE;IACtF,QAAQ,IAAI,EAAE,GAAG,IAAI,EAAE,IAAI,GAAG,EAAE,CAAC,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC;IAC1E,QAAQ,OAAO,IAAI,KAAK,GAAG,GAAG,WAAW,KAAK,IAAI,IAAI,WAAW,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,IAAI,KAAK,GAAG,GAAG,YAAY,KAAK,IAAI,IAAI,YAAY,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,eAAe,KAAK,IAAI,IAAI,eAAe,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,eAAe,EAAE,CAAC;IAClS,KAAK,CAAC;IACN,IAAI,YAAY,CAAC,SAAS,CAAC,MAAM,GAAG,UAAU,cAAc,EAAE,KAAK,EAAE,QAAQ,EAAE;IAC/E,QAAQ,IAAI,EAAE,CAAC;IACf,QAAQ,OAAO,UAAU,CAAC,CAAC,EAAE,GAAG,cAAc,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC;IAC7F,cAAc,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC;IAC1C,cAAc,IAAI,CAAC,EAAE,CAAC,cAAc,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IACvD,KAAK,CAAC;IACN,IAAI,YAAY,CAAC,SAAS,CAAC,YAAY,GAAG,YAAY;IACtD,QAAQ,IAAI,EAAE,GAAG,IAAI,EAAE,IAAI,GAAG,EAAE,CAAC,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC;IAC1E,QAAQ,IAAI,MAAM,GAAG,IAAI,KAAK,GAAG;IACjC;IACA,gBAAgB,EAAE,CAAC,KAAK,CAAC;IACzB;IACA,gBAAgB,IAAI,KAAK,GAAG;IAC5B;IACA,wBAAwB,UAAU,CAAC,YAAY,EAAE,OAAO,KAAK,CAAC,EAAE,CAAC;IACjE;IACA,wBAAwB,IAAI,KAAK,GAAG;IACpC;IACA,gCAAgC,KAAK;IACrC;IACA,gCAAgC,CAAC,CAAC;IAClC,QAAQ,IAAI,CAAC,MAAM,EAAE;IACrB,YAAY,MAAM,IAAI,SAAS,CAAC,+BAA+B,GAAG,IAAI,CAAC,CAAC;IACxE,SAAS;IACT,QAAQ,OAAO,MAAM,CAAC;IACtB,KAAK,CAAC;IACN,IAAI,YAAY,CAAC,UAAU,GAAG,UAAU,KAAK,EAAE;IAC/C,QAAQ,OAAO,IAAI,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC5C,KAAK,CAAC;IACN,IAAI,YAAY,CAAC,WAAW,GAAG,UAAU,GAAG,EAAE;IAC9C,QAAQ,OAAO,IAAI,YAAY,CAAC,GAAG,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;IACrD,KAAK,CAAC;IACN,IAAI,YAAY,CAAC,cAAc,GAAG,YAAY;IAC9C,QAAQ,OAAO,YAAY,CAAC,oBAAoB,CAAC;IACjD,KAAK,CAAC;IACN,IAAI,YAAY,CAAC,oBAAoB,GAAG,IAAI,YAAY,CAAC,GAAG,CAAC,CAAC;IAC9D,IAAI,OAAO,YAAY,CAAC;IACxB,CAAC,EAAE,CAAC,CAAC;AACL,IACO,SAAS,mBAAmB,CAAC,YAAY,EAAE,QAAQ,EAAE;IAC5D,IAAI,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;IACnB,IAAI,IAAI,EAAE,GAAG,YAAY,EAAE,IAAI,GAAG,EAAE,CAAC,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC;IAC9E,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;IAClC,QAAQ,MAAM,IAAI,SAAS,CAAC,sCAAsC,CAAC,CAAC;IACpE,KAAK;IACL,IAAI,IAAI,KAAK,GAAG,GAAG,CAAC,EAAE,GAAG,QAAQ,CAAC,IAAI,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,GAAG,IAAI,KAAK,GAAG,GAAG,CAAC,EAAE,GAAG,QAAQ,CAAC,KAAK,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,QAAQ,CAAC,QAAQ,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC7R,CAAC;;ICpEM,SAAS,YAAY,CAAC,GAAG,EAAE;IAClC,IAAI,OAAO,CAAC,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU,KAAK,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACvG,CAAC;;ACHS,QAAC,UAAU,GAAG,gBAAgB,CAAC,UAAU,MAAM,EAAE;IAC3D,IAAI,OAAO,SAAS,cAAc,GAAG;IACrC,QAAQ,MAAM,CAAC,IAAI,CAAC,CAAC;IACrB,QAAQ,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IACjC,QAAQ,IAAI,CAAC,OAAO,GAAG,yBAAyB,CAAC;IACjD,KAAK,CAAC;IACN,CAAC,CAAC;;ICNK,SAAS,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE;IAC9C,IAAI,IAAI,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC;IAC/C,IAAI,OAAO,IAAI,OAAO,CAAC,UAAU,OAAO,EAAE,MAAM,EAAE;IAClD,QAAQ,IAAI,SAAS,GAAG,KAAK,CAAC;IAC9B,QAAQ,IAAI,MAAM,CAAC;IACnB,QAAQ,MAAM,CAAC,SAAS,CAAC;IACzB,YAAY,IAAI,EAAE,UAAU,KAAK,EAAE;IACnC,gBAAgB,MAAM,GAAG,KAAK,CAAC;IAC/B,gBAAgB,SAAS,GAAG,IAAI,CAAC;IACjC,aAAa;IACb,YAAY,KAAK,EAAE,MAAM;IACzB,YAAY,QAAQ,EAAE,YAAY;IAClC,gBAAgB,IAAI,SAAS,EAAE;IAC/B,oBAAoB,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,iBAAiB;IACjB,qBAAqB,IAAI,SAAS,EAAE;IACpC,oBAAoB,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IACjD,iBAAiB;IACjB,qBAAqB;IACrB,oBAAoB,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC,CAAC;IAC7C,iBAAiB;IACjB,aAAa;IACb,SAAS,CAAC,CAAC;IACX,KAAK,CAAC,CAAC;IACP,CAAC;;ICvBM,SAAS,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE;IAC/C,IAAI,IAAI,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC;IAC/C,IAAI,OAAO,IAAI,OAAO,CAAC,UAAU,OAAO,EAAE,MAAM,EAAE;IAClD,QAAQ,IAAI,UAAU,GAAG,IAAI,cAAc,CAAC;IAC5C,YAAY,IAAI,EAAE,UAAU,KAAK,EAAE;IACnC,gBAAgB,OAAO,CAAC,KAAK,CAAC,CAAC;IAC/B,gBAAgB,UAAU,CAAC,WAAW,EAAE,CAAC;IACzC,aAAa;IACb,YAAY,KAAK,EAAE,MAAM;IACzB,YAAY,QAAQ,EAAE,YAAY;IAClC,gBAAgB,IAAI,SAAS,EAAE;IAC/B,oBAAoB,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IACjD,iBAAiB;IACjB,qBAAqB;IACrB,oBAAoB,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC,CAAC;IAC7C,iBAAiB;IACjB,aAAa;IACb,SAAS,CAAC,CAAC;IACX,QAAQ,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACrC,KAAK,CAAC,CAAC;IACP,CAAC;;ACrBS,QAAC,uBAAuB,GAAG,gBAAgB,CAAC,UAAU,MAAM,EAAE;IACxE,IAAI,OAAO,SAAS,2BAA2B,GAAG;IAClD,QAAQ,MAAM,CAAC,IAAI,CAAC,CAAC;IACrB,QAAQ,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;IAC9C,QAAQ,IAAI,CAAC,OAAO,GAAG,uBAAuB,CAAC;IAC/C,KAAK,CAAC;IACN,CAAC,CAAC;;ACNQ,QAAC,aAAa,GAAG,gBAAgB,CAAC,UAAU,MAAM,EAAE;IAC9D,IAAI,OAAO,SAAS,iBAAiB,CAAC,OAAO,EAAE;IAC/C,QAAQ,MAAM,CAAC,IAAI,CAAC,CAAC;IACrB,QAAQ,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IACpC,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC/B,KAAK,CAAC;IACN,CAAC,CAAC;;ACNQ,QAAC,aAAa,GAAG,gBAAgB,CAAC,UAAU,MAAM,EAAE;IAC9D,IAAI,OAAO,SAAS,iBAAiB,CAAC,OAAO,EAAE;IAC/C,QAAQ,MAAM,CAAC,IAAI,CAAC,CAAC;IACrB,QAAQ,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IACpC,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC/B,KAAK,CAAC;IACN,CAAC,CAAC;;ICPK,SAAS,WAAW,CAAC,KAAK,EAAE;IACnC,IAAI,OAAO,KAAK,YAAY,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAClD,CAAC;;ACKS,QAAC,YAAY,GAAG,gBAAgB,CAAC,UAAU,MAAM,EAAE;IAC7D,IAAI,OAAO,SAAS,gBAAgB,CAAC,IAAI,EAAE;IAC3C,QAAQ,IAAI,IAAI,KAAK,KAAK,CAAC,EAAE,EAAE,IAAI,GAAG,IAAI,CAAC,EAAE;IAC7C,QAAQ,MAAM,CAAC,IAAI,CAAC,CAAC;IACrB,QAAQ,IAAI,CAAC,OAAO,GAAG,sBAAsB,CAAC;IAC9C,QAAQ,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IACnC,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACzB,KAAK,CAAC;IACN,CAAC,CAAC,CAAC;AACH,IAAO,SAAS,OAAO,CAAC,MAAM,EAAE,YAAY,EAAE;IAC9C,IAAI,IAAI,EAAE,IAAI,WAAW,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,MAAM,KAAK,QAAQ,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,KAAK,GAAG,EAAE,CAAC,KAAK,EAAE,IAAI,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,KAAK,GAAG,EAAE,KAAK,KAAK,CAAC,GAAG,mBAAmB,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,SAAS,GAAG,EAAE,KAAK,KAAK,CAAC,GAAG,YAAY,KAAK,IAAI,IAAI,YAAY,KAAK,KAAK,CAAC,GAAG,YAAY,GAAG,cAAc,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,EAAE,KAAK,KAAK,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;IACxY,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE;IACvC,QAAQ,MAAM,IAAI,SAAS,CAAC,sBAAsB,CAAC,CAAC;IACpD,KAAK;IACL,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,0BAA0B,CAAC;IACvC,QAAQ,IAAI,iBAAiB,CAAC;IAC9B,QAAQ,IAAI,SAAS,GAAG,IAAI,CAAC;IAC7B,QAAQ,IAAI,IAAI,GAAG,CAAC,CAAC;IACrB,QAAQ,IAAI,UAAU,GAAG,UAAU,KAAK,EAAE;IAC1C,YAAY,iBAAiB,GAAG,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,YAAY;IACnF,gBAAgB,IAAI;IACpB,oBAAoB,0BAA0B,CAAC,WAAW,EAAE,CAAC;IAC7D,oBAAoB,SAAS,CAAC,KAAK,CAAC;IACpC,wBAAwB,IAAI,EAAE,IAAI;IAClC,wBAAwB,SAAS,EAAE,SAAS;IAC5C,wBAAwB,IAAI,EAAE,IAAI;IAClC,qBAAqB,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC9C,iBAAiB;IACjB,gBAAgB,OAAO,GAAG,EAAE;IAC5B,oBAAoB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC1C,iBAAiB;IACjB,aAAa,EAAE,KAAK,CAAC,CAAC;IACtB,SAAS,CAAC;IACV,QAAQ,0BAA0B,GAAG,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC5G,YAAY,iBAAiB,KAAK,IAAI,IAAI,iBAAiB,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,iBAAiB,CAAC,WAAW,EAAE,CAAC;IAClH,YAAY,IAAI,EAAE,CAAC;IACnB,YAAY,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,KAAK,EAAE,CAAC;IACjD,YAAY,IAAI,GAAG,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;IACzC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY;IAC7C,YAAY,IAAI,EAAE,iBAAiB,KAAK,IAAI,IAAI,iBAAiB,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,iBAAiB,CAAC,MAAM,CAAC,EAAE;IACnH,gBAAgB,iBAAiB,KAAK,IAAI,IAAI,iBAAiB,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,iBAAiB,CAAC,WAAW,EAAE,CAAC;IACtH,aAAa;IACb,YAAY,SAAS,GAAG,IAAI,CAAC;IAC7B,SAAS,CAAC,CAAC,CAAC;IACZ,QAAQ,CAAC,IAAI,IAAI,UAAU,CAAC,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,GAAG,CAAC,KAAK,GAAG,SAAS,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,CAAC;IACnH,KAAK,CAAC,CAAC;IACP,CAAC;IACD,SAAS,mBAAmB,CAAC,IAAI,EAAE;IACnC,IAAI,MAAM,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;;ICvDM,SAAS,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE;IACtC,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC;IACtB,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC/E,YAAY,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IACnE,SAAS,CAAC,CAAC,CAAC;IACZ,KAAK,CAAC,CAAC;IACP,CAAC;;ICPD,IAAI,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;IAC5B,SAAS,WAAW,CAAC,EAAE,EAAE,IAAI,EAAE;IAC/B,IAAI,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IACxF,CAAC;AACD,IAAO,SAAS,gBAAgB,CAAC,EAAE,EAAE;IACrC,IAAI,OAAO,GAAG,CAAC,UAAU,IAAI,EAAE,EAAE,OAAO,WAAW,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;IAClE,CAAC;;ICDM,SAAS,qBAAqB,CAAC,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE;IAC5F,IAAI,IAAI,cAAc,EAAE;IACxB,QAAQ,IAAI,WAAW,CAAC,cAAc,CAAC,EAAE;IACzC,YAAY,SAAS,GAAG,cAAc,CAAC;IACvC,SAAS;IACT,aAAa;IACb,YAAY,OAAO,YAAY;IAC/B,gBAAgB,IAAI,IAAI,GAAG,EAAE,CAAC;IAC9B,gBAAgB,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAC9D,oBAAoB,IAAI,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IAC7C,iBAAiB;IACjB,gBAAgB,OAAO,qBAAqB,CAAC,WAAW,EAAE,YAAY,EAAE,SAAS,CAAC;IAClF,qBAAqB,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC;IACtC,qBAAqB,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC;IAC5D,aAAa,CAAC;IACd,SAAS;IACT,KAAK;IACL,IAAI,IAAI,SAAS,EAAE;IACnB,QAAQ,OAAO,YAAY;IAC3B,YAAY,IAAI,IAAI,GAAG,EAAE,CAAC;IAC1B,YAAY,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAC1D,gBAAgB,IAAI,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACzC,aAAa;IACb,YAAY,OAAO,qBAAqB,CAAC,WAAW,EAAE,YAAY,CAAC;IACnE,iBAAiB,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC;IAClC,iBAAiB,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;IACpE,SAAS,CAAC;IACV,KAAK;IACL,IAAI,OAAO,YAAY;IACvB,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;IACzB,QAAQ,IAAI,IAAI,GAAG,EAAE,CAAC;IACtB,QAAQ,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IACtD,YAAY,IAAI,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACrC,SAAS;IACT,QAAQ,IAAI,OAAO,GAAG,IAAI,YAAY,EAAE,CAAC;IACzC,QAAQ,IAAI,aAAa,GAAG,IAAI,CAAC;IACjC,QAAQ,OAAO,IAAI,UAAU,CAAC,UAAU,UAAU,EAAE;IACpD,YAAY,IAAI,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACrD,YAAY,IAAI,aAAa,EAAE;IAC/B,gBAAgB,aAAa,GAAG,KAAK,CAAC;IACtC,gBAAgB,IAAI,SAAS,GAAG,KAAK,CAAC;IACtC,gBAAgB,IAAI,YAAY,GAAG,KAAK,CAAC;IACzC,gBAAgB,YAAY,CAAC,KAAK,CAAC,KAAK,EAAE,aAAa,CAAC,aAAa,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE;IACzF,oBAAoB,YAAY;IAChC,wBAAwB,IAAI,OAAO,GAAG,EAAE,CAAC;IACzC,wBAAwB,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IACtE,4BAA4B,OAAO,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACxD,yBAAyB;IACzB,wBAAwB,IAAI,WAAW,EAAE;IACzC,4BAA4B,IAAI,GAAG,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IACtD,4BAA4B,IAAI,GAAG,IAAI,IAAI,EAAE;IAC7C,gCAAgC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnD,gCAAgC,OAAO;IACvC,6BAA6B;IAC7B,yBAAyB;IACzB,wBAAwB,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAChF,wBAAwB,YAAY,GAAG,IAAI,CAAC;IAC5C,wBAAwB,IAAI,SAAS,EAAE;IACvC,4BAA4B,OAAO,CAAC,QAAQ,EAAE,CAAC;IAC/C,yBAAyB;IACzB,qBAAqB;IACrB,iBAAiB,CAAC,CAAC,CAAC;IACpB,gBAAgB,IAAI,YAAY,EAAE;IAClC,oBAAoB,OAAO,CAAC,QAAQ,EAAE,CAAC;IACvC,iBAAiB;IACjB,gBAAgB,SAAS,GAAG,IAAI,CAAC;IACjC,aAAa;IACb,YAAY,OAAO,IAAI,CAAC;IACxB,SAAS,CAAC,CAAC;IACX,KAAK,CAAC;IACN,CAAC;;IC5EM,SAAS,YAAY,CAAC,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE;IACtE,IAAI,OAAO,qBAAqB,CAAC,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;IACjF,CAAC;;ICFM,SAAS,gBAAgB,CAAC,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE;IAC1E,IAAI,OAAO,qBAAqB,CAAC,IAAI,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;IAChF,CAAC;;ICHD,IAAIC,SAAO,GAAG,KAAK,CAAC,OAAO,CAAC;IAC5B,IAAI,cAAc,GAAG,MAAM,CAAC,cAAc,EAAE,WAAW,GAAG,MAAM,CAAC,SAAS,EAAE,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC;AAClG,IAAO,SAAS,oBAAoB,CAAC,IAAI,EAAE;IAC3C,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;IAC3B,QAAQ,IAAI,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAC9B,QAAQ,IAAIA,SAAO,CAAC,OAAO,CAAC,EAAE;IAC9B,YAAY,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACjD,SAAS;IACT,QAAQ,IAAI,MAAM,CAAC,OAAO,CAAC,EAAE;IAC7B,YAAY,IAAI,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACxC,YAAY,OAAO;IACnB,gBAAgB,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,UAAU,GAAG,EAAE,EAAE,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;IACvE,gBAAgB,IAAI,EAAE,IAAI;IAC1B,aAAa,CAAC;IACd,SAAS;IACT,KAAK;IACL,IAAI,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACtC,CAAC;IACD,SAAS,MAAM,CAAC,GAAG,EAAE;IACrB,IAAI,OAAO,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,cAAc,CAAC,GAAG,CAAC,KAAK,WAAW,CAAC;IACjF,CAAC;;ICpBM,SAAS,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE;IAC3C,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACtG,CAAC;;ICOM,SAAS,aAAa,GAAG;IAChC,IAAI,IAAI,IAAI,GAAG,EAAE,CAAC;IAClB,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,IAAI,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACjC,KAAK;IACL,IAAI,IAAI,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACvC,IAAI,IAAI,cAAc,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACjD,IAAI,IAAI,EAAE,GAAG,oBAAoB,CAAC,IAAI,CAAC,EAAE,WAAW,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC;IAC/E,IAAI,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;IAClC,QAAQ,OAAO,IAAI,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;IACnC,KAAK;IACL,IAAI,IAAI,MAAM,GAAG,IAAI,UAAU,CAAC,iBAAiB,CAAC,WAAW,EAAE,SAAS,EAAE,IAAI;IAC9E;IACA,YAAY,UAAU,MAAM,EAAE,EAAE,OAAO,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE;IACpE;IACA,YAAY,QAAQ,CAAC,CAAC,CAAC;IACvB,IAAI,OAAO,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,GAAG,MAAM,CAAC;IACnF,CAAC;AACD,IAAO,SAAS,iBAAiB,CAAC,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE;IAC1E,IAAI,IAAI,cAAc,KAAK,KAAK,CAAC,EAAE,EAAE,cAAc,GAAG,QAAQ,CAAC,EAAE;IACjE,IAAI,OAAO,UAAU,UAAU,EAAE;IACjC,QAAQ,aAAa,CAAC,SAAS,EAAE,YAAY;IAC7C,YAAY,IAAI,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC;IAC5C,YAAY,IAAI,MAAM,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3C,YAAY,IAAI,MAAM,GAAG,MAAM,CAAC;IAChC,YAAY,IAAI,oBAAoB,GAAG,MAAM,CAAC;IAC9C,YAAY,IAAI,OAAO,GAAG,UAAU,CAAC,EAAE;IACvC,gBAAgB,aAAa,CAAC,SAAS,EAAE,YAAY;IACrD,oBAAoB,IAAI,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;IACjE,oBAAoB,IAAI,aAAa,GAAG,KAAK,CAAC;IAC9C,oBAAoB,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC3F,wBAAwB,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IAC1C,wBAAwB,IAAI,CAAC,aAAa,EAAE;IAC5C,4BAA4B,aAAa,GAAG,IAAI,CAAC;IACjD,4BAA4B,oBAAoB,EAAE,CAAC;IACnD,yBAAyB;IACzB,wBAAwB,IAAI,CAAC,oBAAoB,EAAE;IACnD,4BAA4B,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAC5E,yBAAyB;IACzB,qBAAqB,EAAE,YAAY;IACnC,wBAAwB,IAAI,CAAC,EAAE,MAAM,EAAE;IACvC,4BAA4B,UAAU,CAAC,QAAQ,EAAE,CAAC;IAClD,yBAAyB;IACzB,qBAAqB,CAAC,CAAC,CAAC;IACxB,iBAAiB,EAAE,UAAU,CAAC,CAAC;IAC/B,aAAa,CAAC;IACd,YAAY,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;IAC7C,gBAAgB,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,aAAa;IACb,SAAS,EAAE,UAAU,CAAC,CAAC;IACvB,KAAK,CAAC;IACN,CAAC;IACD,SAAS,aAAa,CAAC,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE;IACzD,IAAI,IAAI,SAAS,EAAE;IACnB,QAAQ,eAAe,CAAC,YAAY,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAC1D,KAAK;IACL,SAAS;IACT,QAAQ,OAAO,EAAE,CAAC;IAClB,KAAK;IACL,CAAC;;ICjEM,SAAS,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,iBAAiB,EAAE,mBAAmB,EAAE;IACtI,IAAI,IAAI,MAAM,GAAG,EAAE,CAAC;IACpB,IAAI,IAAI,MAAM,GAAG,CAAC,CAAC;IACnB,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC;IAClB,IAAI,IAAI,UAAU,GAAG,KAAK,CAAC;IAC3B,IAAI,IAAI,aAAa,GAAG,YAAY;IACpC,QAAQ,IAAI,UAAU,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE;IACrD,YAAY,UAAU,CAAC,QAAQ,EAAE,CAAC;IAClC,SAAS;IACT,KAAK,CAAC;IACN,IAAI,IAAI,SAAS,GAAG,UAAU,KAAK,EAAE,EAAE,QAAQ,MAAM,GAAG,UAAU,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC;IAChH,IAAI,IAAI,UAAU,GAAG,UAAU,KAAK,EAAE;IACtC,QAAQ,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACzC,QAAQ,MAAM,EAAE,CAAC;IACjB,QAAQ,IAAI,aAAa,GAAG,KAAK,CAAC;IAClC,QAAQ,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,UAAU,EAAE;IAChH,YAAY,YAAY,KAAK,IAAI,IAAI,YAAY,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;IACjG,YAAY,IAAI,MAAM,EAAE;IACxB,gBAAgB,SAAS,CAAC,UAAU,CAAC,CAAC;IACtC,aAAa;IACb,iBAAiB;IACjB,gBAAgB,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC5C,aAAa;IACb,SAAS,EAAE,YAAY;IACvB,YAAY,aAAa,GAAG,IAAI,CAAC;IACjC,SAAS,EAAE,SAAS,EAAE,YAAY;IAClC,YAAY,IAAI,aAAa,EAAE;IAC/B,gBAAgB,IAAI;IACpB,oBAAoB,MAAM,EAAE,CAAC;IAC7B,oBAAoB,IAAI,OAAO,GAAG,YAAY;IAC9C,wBAAwB,IAAI,aAAa,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC;IAC3D,wBAAwB,IAAI,iBAAiB,EAAE;IAC/C,4BAA4B,eAAe,CAAC,UAAU,EAAE,iBAAiB,EAAE,YAAY,EAAE,OAAO,UAAU,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC;IAC9H,yBAAyB;IACzB,6BAA6B;IAC7B,4BAA4B,UAAU,CAAC,aAAa,CAAC,CAAC;IACtD,yBAAyB;IACzB,qBAAqB,CAAC;IACtB,oBAAoB,OAAO,MAAM,CAAC,MAAM,IAAI,MAAM,GAAG,UAAU,EAAE;IACjE,wBAAwB,OAAO,EAAE,CAAC;IAClC,qBAAqB;IACrB,oBAAoB,aAAa,EAAE,CAAC;IACpC,iBAAiB;IACjB,gBAAgB,OAAO,GAAG,EAAE;IAC5B,oBAAoB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC1C,iBAAiB;IACjB,aAAa;IACb,SAAS,CAAC,CAAC,CAAC;IACZ,KAAK,CAAC;IACN,IAAI,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,YAAY;IACjF,QAAQ,UAAU,GAAG,IAAI,CAAC;IAC1B,QAAQ,aAAa,EAAE,CAAC;IACxB,KAAK,CAAC,CAAC,CAAC;IACR,IAAI,OAAO,YAAY;IACvB,QAAQ,mBAAmB,KAAK,IAAI,IAAI,mBAAmB,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,mBAAmB,EAAE,CAAC;IACxG,KAAK,CAAC;IACN,CAAC;;ICtDM,SAAS,QAAQ,CAAC,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE;IAC9D,IAAI,IAAI,UAAU,KAAK,KAAK,CAAC,EAAE,EAAE,UAAU,GAAG,QAAQ,CAAC,EAAE;IACzD,IAAI,IAAI,UAAU,CAAC,cAAc,CAAC,EAAE;IACpC,QAAQ,OAAO,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,GAAG,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,EAAE,OAAO,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;IACzJ,KAAK;IACL,SAAS,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE;IACjD,QAAQ,UAAU,GAAG,cAAc,CAAC;IACpC,KAAK;IACL,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE,EAAE,OAAO,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC;IACtH,CAAC;;ICZM,SAAS,QAAQ,CAAC,UAAU,EAAE;IACrC,IAAI,IAAI,UAAU,KAAK,KAAK,CAAC,EAAE,EAAE,UAAU,GAAG,QAAQ,CAAC,EAAE;IACzD,IAAI,OAAO,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC1C,CAAC;;ICJM,SAAS,SAAS,GAAG;IAC5B,IAAI,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC;IACvB,CAAC;;ICAM,SAAS,MAAM,GAAG;IACzB,IAAI,IAAI,IAAI,GAAG,EAAE,CAAC;IAClB,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,IAAI,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACjC,KAAK;IACL,IAAI,OAAO,SAAS,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACvD,CAAC;;ICPM,SAAS,KAAK,CAAC,iBAAiB,EAAE;IACzC,IAAI,OAAO,IAAI,UAAU,CAAC,UAAU,UAAU,EAAE;IAChD,QAAQ,SAAS,CAAC,iBAAiB,EAAE,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC7D,KAAK,CAAC,CAAC;IACP,CAAC;;ICHD,IAAI,cAAc,GAAG;IACrB,IAAI,SAAS,EAAE,YAAY,EAAE,OAAO,IAAI,OAAO,EAAE,CAAC,EAAE;IACpD,IAAI,iBAAiB,EAAE,IAAI;IAC3B,CAAC,CAAC;AACF,IAAO,SAAS,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE;IAC5C,IAAI,IAAI,MAAM,KAAK,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,cAAc,CAAC,EAAE;IACvD,IAAI,IAAI,UAAU,GAAG,IAAI,CAAC;IAC1B,IAAI,IAAI,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,GAAG,MAAM,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,EAAE,KAAK,KAAK,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;IACnH,IAAI,IAAI,OAAO,GAAG,SAAS,EAAE,CAAC;IAC9B,IAAI,IAAI,MAAM,GAAG,IAAI,UAAU,CAAC,UAAU,UAAU,EAAE;IACtD,QAAQ,OAAO,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC7C,KAAK,CAAC,CAAC;IACP,IAAI,MAAM,CAAC,OAAO,GAAG,YAAY;IACjC,QAAQ,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,EAAE;IAC9C,YAAY,UAAU,GAAG,KAAK,CAAC,YAAY,EAAE,OAAO,MAAM,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAClF,YAAY,IAAI,iBAAiB,EAAE;IACnC,gBAAgB,UAAU,CAAC,GAAG,CAAC,YAAY,EAAE,QAAQ,OAAO,GAAG,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC;IAChF,aAAa;IACb,SAAS;IACT,QAAQ,OAAO,UAAU,CAAC;IAC1B,KAAK,CAAC;IACN,IAAI,OAAO,MAAM,CAAC;IAClB,CAAC;;IClBM,SAAS,QAAQ,GAAG;IAC3B,IAAI,IAAI,IAAI,GAAG,EAAE,CAAC;IAClB,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,IAAI,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACjC,KAAK;IACL,IAAI,IAAI,cAAc,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACjD,IAAI,IAAI,EAAE,GAAG,oBAAoB,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC;IAC3E,IAAI,IAAI,MAAM,GAAG,IAAI,UAAU,CAAC,UAAU,UAAU,EAAE;IACtD,QAAQ,IAAI,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IACpC,QAAQ,IAAI,CAAC,MAAM,EAAE;IACrB,YAAY,UAAU,CAAC,QAAQ,EAAE,CAAC;IAClC,YAAY,OAAO;IACnB,SAAS;IACT,QAAQ,IAAI,MAAM,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;IACvC,QAAQ,IAAI,oBAAoB,GAAG,MAAM,CAAC;IAC1C,QAAQ,IAAI,kBAAkB,GAAG,MAAM,CAAC;IACxC,QAAQ,IAAI,OAAO,GAAG,UAAU,WAAW,EAAE;IAC7C,YAAY,IAAI,QAAQ,GAAG,KAAK,CAAC;IACjC,YAAY,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC5G,gBAAgB,IAAI,CAAC,QAAQ,EAAE;IAC/B,oBAAoB,QAAQ,GAAG,IAAI,CAAC;IACpC,oBAAoB,kBAAkB,EAAE,CAAC;IACzC,iBAAiB;IACjB,gBAAgB,MAAM,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;IAC5C,aAAa,EAAE,YAAY,EAAE,OAAO,oBAAoB,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,YAAY;IACtF,gBAAgB,IAAI,CAAC,oBAAoB,IAAI,CAAC,QAAQ,EAAE;IACxD,oBAAoB,IAAI,CAAC,kBAAkB,EAAE;IAC7C,wBAAwB,UAAU,CAAC,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC;IACpF,qBAAqB;IACrB,oBAAoB,UAAU,CAAC,QAAQ,EAAE,CAAC;IAC1C,iBAAiB;IACjB,aAAa,CAAC,CAAC,CAAC;IAChB,SAAS,CAAC;IACV,QAAQ,KAAK,IAAI,WAAW,GAAG,CAAC,EAAE,WAAW,GAAG,MAAM,EAAE,WAAW,EAAE,EAAE;IACvE,YAAY,OAAO,CAAC,WAAW,CAAC,CAAC;IACjC,SAAS;IACT,KAAK,CAAC,CAAC;IACP,IAAI,OAAO,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,GAAG,MAAM,CAAC;IACnF,CAAC;;ICtCD,IAAI,uBAAuB,GAAG,CAAC,aAAa,EAAE,gBAAgB,CAAC,CAAC;IAChE,IAAI,kBAAkB,GAAG,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,CAAC;IACrE,IAAI,aAAa,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AAClC,IAAO,SAAS,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,cAAc,EAAE;IACtE,IAAI,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE;IAC7B,QAAQ,cAAc,GAAG,OAAO,CAAC;IACjC,QAAQ,OAAO,GAAG,SAAS,CAAC;IAC5B,KAAK;IACL,IAAI,IAAI,cAAc,EAAE;IACxB,QAAQ,OAAO,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC;IAC5F,KAAK;IACL,IAAI,IAAI,EAAE,GAAG,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC;IACzC,UAAU,kBAAkB,CAAC,GAAG,CAAC,UAAU,UAAU,EAAE,EAAE,OAAO,UAAU,OAAO,EAAE,EAAE,OAAO,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IAClJ;IACA,YAAY,uBAAuB,CAAC,MAAM,CAAC;IAC3C,kBAAkB,uBAAuB,CAAC,GAAG,CAAC,uBAAuB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACzF,kBAAkB,yBAAyB,CAAC,MAAM,CAAC;IACnD,sBAAsB,aAAa,CAAC,GAAG,CAAC,uBAAuB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACnF,sBAAsB,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;IAC1D,IAAI,IAAI,CAAC,GAAG,EAAE;IACd,QAAQ,IAAI,WAAW,CAAC,MAAM,CAAC,EAAE;IACjC,YAAY,OAAO,QAAQ,CAAC,UAAU,SAAS,EAAE,EAAE,OAAO,SAAS,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1H,SAAS;IACT,KAAK;IACL,IAAI,IAAI,CAAC,GAAG,EAAE;IACd,QAAQ,MAAM,IAAI,SAAS,CAAC,sBAAsB,CAAC,CAAC;IACpD,KAAK;IACL,IAAI,OAAO,IAAI,UAAU,CAAC,UAAU,UAAU,EAAE;IAChD,QAAQ,IAAI,OAAO,GAAG,YAAY;IAClC,YAAY,IAAI,IAAI,GAAG,EAAE,CAAC;IAC1B,YAAY,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAC1D,gBAAgB,IAAI,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACzC,aAAa;IACb,YAAY,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACrE,SAAS,CAAC;IACV,QAAQ,GAAG,CAAC,OAAO,CAAC,CAAC;IACrB,QAAQ,OAAO,YAAY,EAAE,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;IACvD,KAAK,CAAC,CAAC;IACP,CAAC;IACD,SAAS,uBAAuB,CAAC,MAAM,EAAE,SAAS,EAAE;IACpD,IAAI,OAAO,UAAU,UAAU,EAAE,EAAE,OAAO,UAAU,OAAO,EAAE,EAAE,OAAO,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IACnH,CAAC;IACD,SAAS,uBAAuB,CAAC,MAAM,EAAE;IACzC,IAAI,OAAO,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;IAC/E,CAAC;IACD,SAAS,yBAAyB,CAAC,MAAM,EAAE;IAC3C,IAAI,OAAO,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC3D,CAAC;IACD,SAAS,aAAa,CAAC,MAAM,EAAE;IAC/B,IAAI,OAAO,UAAU,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;IACzF,CAAC;;ICtDM,SAAS,gBAAgB,CAAC,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE;IAC5E,IAAI,IAAI,cAAc,EAAE;IACxB,QAAQ,OAAO,gBAAgB,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC;IAClG,KAAK;IACL,IAAI,OAAO,IAAI,UAAU,CAAC,UAAU,UAAU,EAAE;IAChD,QAAQ,IAAI,OAAO,GAAG,YAAY;IAClC,YAAY,IAAI,CAAC,GAAG,EAAE,CAAC;IACvB,YAAY,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAC1D,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACtC,aAAa;IACb,YAAY,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9D,SAAS,CAAC;IACV,QAAQ,IAAI,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IAC3C,QAAQ,OAAO,UAAU,CAAC,aAAa,CAAC,GAAG,YAAY,EAAE,OAAO,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,EAAE,GAAG,SAAS,CAAC;IAChH,KAAK,CAAC,CAAC;IACP,CAAC;;ICbM,SAAS,QAAQ,CAAC,qBAAqB,EAAE,SAAS,EAAE,OAAO,EAAE,yBAAyB,EAAE,SAAS,EAAE;IAC1G,IAAI,IAAI,EAAE,EAAE,EAAE,CAAC;IACf,IAAI,IAAI,cAAc,CAAC;IACvB,IAAI,IAAI,YAAY,CAAC;IACrB,IAAI,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;IAChC,QAAQ,CAAC,EAAE,GAAG,qBAAqB,EAAE,YAAY,GAAG,EAAE,CAAC,YAAY,EAAE,SAAS,GAAG,EAAE,CAAC,SAAS,EAAE,OAAO,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,GAAG,EAAE,CAAC,cAAc,EAAE,cAAc,GAAG,EAAE,KAAK,KAAK,CAAC,GAAG,QAAQ,GAAG,EAAE,EAAE,SAAS,GAAG,EAAE,CAAC,SAAS,EAAE;IACvN,KAAK;IACL,SAAS;IACT,QAAQ,YAAY,GAAG,qBAAqB,CAAC;IAC7C,QAAQ,IAAI,CAAC,yBAAyB,IAAI,WAAW,CAAC,yBAAyB,CAAC,EAAE;IAClF,YAAY,cAAc,GAAG,QAAQ,CAAC;IACtC,YAAY,SAAS,GAAG,yBAAyB,CAAC;IAClD,SAAS;IACT,aAAa;IACb,YAAY,cAAc,GAAG,yBAAyB,CAAC;IACvD,SAAS;IACT,KAAK;IACL,IAAI,SAAS,GAAG,GAAG;IACnB,QAAQ,IAAI,KAAK,CAAC;IAClB,QAAQ,OAAO,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE;IAC/C,YAAY,QAAQ,EAAE,CAAC,KAAK;IAC5B,gBAAgB,KAAK,CAAC;IACtB,oBAAoB,KAAK,GAAG,YAAY,CAAC;IACzC,oBAAoB,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC;IACjC,gBAAgB,KAAK,CAAC;IACtB,oBAAoB,IAAI,EAAE,CAAC,SAAS,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACzE,oBAAoB,OAAO,CAAC,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;IACtD,gBAAgB,KAAK,CAAC;IACtB,oBAAoB,EAAE,CAAC,IAAI,EAAE,CAAC;IAC9B,oBAAoB,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC;IACjC,gBAAgB,KAAK,CAAC;IACtB,oBAAoB,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAC3C,oBAAoB,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAClC,gBAAgB,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACnC,aAAa;IACb,SAAS,CAAC,CAAC;IACX,KAAK;IACL,IAAI,OAAO,KAAK,EAAE,SAAS;IAC3B;IACA,YAAY,YAAY,EAAE,OAAO,gBAAgB,CAAC,GAAG,EAAE,EAAE,SAAS,CAAC,CAAC,EAAE;IACtE;IACA,YAAY,GAAG,EAAE,CAAC;IAClB,CAAC;;IC9CM,SAAS,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE;IACxD,IAAI,OAAO,KAAK,CAAC,YAAY,EAAE,QAAQ,SAAS,EAAE,GAAG,UAAU,GAAG,WAAW,EAAE,EAAE,CAAC,CAAC;IACnF,CAAC;;ICCM,SAAS,KAAK,CAAC,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE;IAC/D,IAAI,IAAI,OAAO,KAAK,KAAK,CAAC,EAAE,EAAE,OAAO,GAAG,CAAC,CAAC,EAAE;IAC5C,IAAI,IAAI,SAAS,KAAK,KAAK,CAAC,EAAE,EAAE,SAAS,GAAGC,KAAc,CAAC,EAAE;IAC7D,IAAI,IAAI,gBAAgB,GAAG,CAAC,CAAC,CAAC;IAC9B,IAAI,IAAI,mBAAmB,IAAI,IAAI,EAAE;IACrC,QAAQ,IAAI,WAAW,CAAC,mBAAmB,CAAC,EAAE;IAC9C,YAAY,SAAS,GAAG,mBAAmB,CAAC;IAC5C,SAAS;IACT,aAAa;IACb,YAAY,gBAAgB,GAAG,mBAAmB,CAAC;IACnD,SAAS;IACT,KAAK;IACL,IAAI,OAAO,IAAI,UAAU,CAAC,UAAU,UAAU,EAAE;IAChD,QAAQ,IAAI,GAAG,GAAG,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,GAAG,SAAS,CAAC,GAAG,EAAE,GAAG,OAAO,CAAC;IAC9E,QAAQ,IAAI,GAAG,GAAG,CAAC,EAAE;IACrB,YAAY,GAAG,GAAG,CAAC,CAAC;IACpB,SAAS;IACT,QAAQ,IAAI,CAAC,GAAG,CAAC,CAAC;IAClB,QAAQ,OAAO,SAAS,CAAC,QAAQ,CAAC,YAAY;IAC9C,YAAY,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;IACpC,gBAAgB,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;IACrC,gBAAgB,IAAI,CAAC,IAAI,gBAAgB,EAAE;IAC3C,oBAAoB,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;IAC/D,iBAAiB;IACjB,qBAAqB;IACrB,oBAAoB,UAAU,CAAC,QAAQ,EAAE,CAAC;IAC1C,iBAAiB;IACjB,aAAa;IACb,SAAS,EAAE,GAAG,CAAC,CAAC;IAChB,KAAK,CAAC,CAAC;IACP,CAAC;;IChCM,SAAS,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE;IAC5C,IAAI,IAAI,MAAM,KAAK,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE;IAC1C,IAAI,IAAI,SAAS,KAAK,KAAK,CAAC,EAAE,EAAE,SAAS,GAAG,cAAc,CAAC,EAAE;IAC7D,IAAI,IAAI,MAAM,GAAG,CAAC,EAAE;IACpB,QAAQ,MAAM,GAAG,CAAC,CAAC;IACnB,KAAK;IACL,IAAI,OAAO,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IAC5C,CAAC;;ICJM,SAAS,KAAK,GAAG;IACxB,IAAI,IAAI,IAAI,GAAG,EAAE,CAAC;IAClB,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,IAAI,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACjC,KAAK;IACL,IAAI,IAAI,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACvC,IAAI,IAAI,UAAU,GAAG,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC/C,IAAI,IAAI,OAAO,GAAG,IAAI,CAAC;IACvB,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM;IAC1B;IACA,YAAY,KAAK;IACjB,UAAU,OAAO,CAAC,MAAM,KAAK,CAAC;IAC9B;IACA,gBAAgB,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACrC;IACA,gBAAgB,QAAQ,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;IAC/D,CAAC;;ACnBS,QAAC,KAAK,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;AACxC,IAAO,SAAS,KAAK,GAAG;IACxB,IAAI,OAAO,KAAK,CAAC;IACjB,CAAC;;ICLD,IAAID,SAAO,GAAG,KAAK,CAAC,OAAO,CAAC;AAC5B,IAAO,SAAS,cAAc,CAAC,IAAI,EAAE;IACrC,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,IAAIA,SAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAClE,CAAC;;ICEM,SAAS,iBAAiB,GAAG;IACpC,IAAI,IAAI,OAAO,GAAG,EAAE,CAAC;IACrB,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,OAAO,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACpC,KAAK;IACL,IAAI,IAAI,WAAW,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IAC9C,IAAI,OAAO,IAAI,UAAU,CAAC,UAAU,UAAU,EAAE;IAChD,QAAQ,IAAI,WAAW,GAAG,CAAC,CAAC;IAC5B,QAAQ,IAAI,aAAa,GAAG,YAAY;IACxC,YAAY,IAAI,WAAW,GAAG,WAAW,CAAC,MAAM,EAAE;IAClD,gBAAgB,IAAI,UAAU,GAAG,KAAK,CAAC,CAAC;IACxC,gBAAgB,IAAI;IACpB,oBAAoB,UAAU,GAAG,SAAS,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IACvE,iBAAiB;IACjB,gBAAgB,OAAO,GAAG,EAAE;IAC5B,oBAAoB,aAAa,EAAE,CAAC;IACpC,oBAAoB,OAAO;IAC3B,iBAAiB;IACjB,gBAAgB,IAAI,eAAe,GAAG,IAAI,kBAAkB,CAAC,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAChG,gBAAgB,UAAU,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IACtD,gBAAgB,eAAe,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IACnD,aAAa;IACb,iBAAiB;IACjB,gBAAgB,UAAU,CAAC,QAAQ,EAAE,CAAC;IACtC,aAAa;IACb,SAAS,CAAC;IACV,QAAQ,aAAa,EAAE,CAAC;IACxB,KAAK,CAAC,CAAC;IACP,CAAC;;IChCM,SAAS,KAAK,CAAC,GAAG,EAAE,SAAS,EAAE;IACtC,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC,CAAC;IAChD,CAAC;;ICHM,SAAS,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE;IACnC,IAAI,OAAO,UAAU,KAAK,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC;IACjF,CAAC;;ICAM,SAAS,MAAM,CAAC,SAAS,EAAE,OAAO,EAAE;IAC3C,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC;IACtB,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE,EAAE,OAAO,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/J,KAAK,CAAC,CAAC;IACP,CAAC;;ICJM,SAAS,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE;IACtD,IAAI,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC/G,CAAC;;ICDM,SAAS,IAAI,GAAG;IACvB,IAAI,IAAI,OAAO,GAAG,EAAE,CAAC;IACrB,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,OAAO,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACpC,KAAK;IACL,IAAI,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IACtC,IAAI,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5F,CAAC;AACD,IAAO,SAAS,QAAQ,CAAC,OAAO,EAAE;IAClC,IAAI,OAAO,UAAU,UAAU,EAAE;IACjC,QAAQ,IAAI,aAAa,GAAG,EAAE,CAAC;IAC/B,QAAQ,IAAI,OAAO,GAAG,UAAU,CAAC,EAAE;IACnC,YAAY,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IACrH,gBAAgB,IAAI,aAAa,EAAE;IACnC,oBAAoB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACnE,wBAAwB,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAClE,qBAAqB;IACrB,oBAAoB,aAAa,GAAG,IAAI,CAAC;IACzC,iBAAiB;IACjB,gBAAgB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,aAAa,CAAC,CAAC,CAAC,CAAC;IACjB,SAAS,CAAC;IACV,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,aAAa,IAAI,CAAC,UAAU,CAAC,MAAM,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;IACxF,YAAY,OAAO,CAAC,CAAC,CAAC,CAAC;IACvB,SAAS;IACT,KAAK,CAAC;IACN,CAAC;;IC5BM,SAAS,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE;IAC/C,IAAI,IAAI,KAAK,IAAI,IAAI,EAAE;IACvB,QAAQ,KAAK,GAAG,KAAK,CAAC;IACtB,QAAQ,KAAK,GAAG,CAAC,CAAC;IAClB,KAAK;IACL,IAAI,IAAI,KAAK,IAAI,CAAC,EAAE;IACpB,QAAQ,OAAO,KAAK,CAAC;IACrB,KAAK;IACL,IAAI,IAAI,GAAG,GAAG,KAAK,GAAG,KAAK,CAAC;IAC5B,IAAI,OAAO,IAAI,UAAU,CAAC,SAAS;IACnC;IACA,YAAY,UAAU,UAAU,EAAE;IAClC,gBAAgB,IAAI,CAAC,GAAG,KAAK,CAAC;IAC9B,gBAAgB,OAAO,SAAS,CAAC,QAAQ,CAAC,YAAY;IACtD,oBAAoB,IAAI,CAAC,GAAG,GAAG,EAAE;IACjC,wBAAwB,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;IAC7C,wBAAwB,IAAI,CAAC,QAAQ,EAAE,CAAC;IACxC,qBAAqB;IACrB,yBAAyB;IACzB,wBAAwB,UAAU,CAAC,QAAQ,EAAE,CAAC;IAC9C,qBAAqB;IACrB,iBAAiB,CAAC,CAAC;IACnB,aAAa;IACb;IACA,YAAY,UAAU,UAAU,EAAE;IAClC,gBAAgB,IAAI,CAAC,GAAG,KAAK,CAAC;IAC9B,gBAAgB,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;IACtD,oBAAoB,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;IACzC,iBAAiB;IACjB,gBAAgB,UAAU,CAAC,QAAQ,EAAE,CAAC;IACtC,aAAa,CAAC,CAAC;IACf,CAAC;;IC9BM,SAAS,KAAK,CAAC,eAAe,EAAE,iBAAiB,EAAE;IAC1D,IAAI,OAAO,IAAI,UAAU,CAAC,UAAU,UAAU,EAAE;IAChD,QAAQ,IAAI,QAAQ,GAAG,eAAe,EAAE,CAAC;IACzC,QAAQ,IAAI,MAAM,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACjD,QAAQ,IAAI,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC;IACxD,QAAQ,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACrC,QAAQ,OAAO,YAAY;IAC3B,YAAY,IAAI,QAAQ,EAAE;IAC1B,gBAAgB,QAAQ,CAAC,WAAW,EAAE,CAAC;IACvC,aAAa;IACb,SAAS,CAAC;IACV,KAAK,CAAC,CAAC;IACP,CAAC;;ICRM,SAAS,GAAG,GAAG;IACtB,IAAI,IAAI,IAAI,GAAG,EAAE,CAAC;IAClB,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,IAAI,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACjC,KAAK;IACL,IAAI,IAAI,cAAc,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACjD,IAAI,IAAI,OAAO,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IACvC,IAAI,OAAO,OAAO,CAAC,MAAM;IACzB,UAAU,IAAI,UAAU,CAAC,UAAU,UAAU,EAAE;IAC/C,YAAY,IAAI,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;IAClE,YAAY,IAAI,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,KAAK,CAAC,EAAE,CAAC,CAAC;IACvE,YAAY,UAAU,CAAC,GAAG,CAAC,YAAY;IACvC,gBAAgB,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC;IAC3C,aAAa,CAAC,CAAC;IACf,YAAY,IAAI,OAAO,GAAG,UAAU,WAAW,EAAE;IACjD,gBAAgB,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAChH,oBAAoB,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrD,oBAAoB,IAAI,OAAO,CAAC,KAAK,CAAC,UAAU,MAAM,EAAE,EAAE,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE;IACpF,wBAAwB,IAAI,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,MAAM,EAAE,EAAE,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IAC/F,wBAAwB,UAAU,CAAC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;IACnI,wBAAwB,IAAI,OAAO,CAAC,IAAI,CAAC,UAAU,MAAM,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE;IAC3G,4BAA4B,UAAU,CAAC,QAAQ,EAAE,CAAC;IAClD,yBAAyB;IACzB,qBAAqB;IACrB,iBAAiB,EAAE,YAAY;IAC/B,oBAAoB,SAAS,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;IAClD,oBAAoB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,MAAM,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;IAC1E,iBAAiB,CAAC,CAAC,CAAC;IACpB,aAAa,CAAC;IACd,YAAY,KAAK,IAAI,WAAW,GAAG,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,IAAI,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE;IACzG,gBAAgB,OAAO,CAAC,WAAW,CAAC,CAAC;IACrC,aAAa;IACb,YAAY,OAAO,YAAY;IAC/B,gBAAgB,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC;IAC3C,aAAa,CAAC;IACd,SAAS,CAAC;IACV,UAAU,KAAK,CAAC;IAChB,CAAC;;ICzCM,SAAS,KAAK,CAAC,gBAAgB,EAAE;IACxC,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,QAAQ,GAAG,KAAK,CAAC;IAC7B,QAAQ,IAAI,SAAS,GAAG,IAAI,CAAC;IAC7B,QAAQ,IAAI,kBAAkB,GAAG,IAAI,CAAC;IACtC,QAAQ,IAAI,UAAU,GAAG,KAAK,CAAC;IAC/B,QAAQ,IAAI,WAAW,GAAG,YAAY;IACtC,YAAY,kBAAkB,KAAK,IAAI,IAAI,kBAAkB,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,kBAAkB,CAAC,WAAW,EAAE,CAAC;IACrH,YAAY,kBAAkB,GAAG,IAAI,CAAC;IACtC,YAAY,IAAI,QAAQ,EAAE;IAC1B,gBAAgB,QAAQ,GAAG,KAAK,CAAC;IACjC,gBAAgB,IAAI,KAAK,GAAG,SAAS,CAAC;IACtC,gBAAgB,SAAS,GAAG,IAAI,CAAC;IACjC,gBAAgB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,aAAa;IACb,YAAY,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;IAChD,SAAS,CAAC;IACV,QAAQ,IAAI,eAAe,GAAG,YAAY;IAC1C,YAAY,kBAAkB,GAAG,IAAI,CAAC;IACtC,YAAY,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;IAChD,SAAS,CAAC;IACV,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC/E,YAAY,QAAQ,GAAG,IAAI,CAAC;IAC5B,YAAY,SAAS,GAAG,KAAK,CAAC;IAC9B,YAAY,IAAI,CAAC,kBAAkB,EAAE;IACrC,gBAAgB,SAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,EAAE,kBAAkB,GAAG,wBAAwB,CAAC,UAAU,EAAE,WAAW,EAAE,eAAe,CAAC,EAAE,CAAC;IACxJ,aAAa;IACb,SAAS,EAAE,YAAY;IACvB,YAAY,UAAU,GAAG,IAAI,CAAC;IAC9B,YAAY,CAAC,CAAC,QAAQ,IAAI,CAAC,kBAAkB,IAAI,kBAAkB,CAAC,MAAM,KAAK,UAAU,CAAC,QAAQ,EAAE,CAAC;IACrG,SAAS,CAAC,CAAC,CAAC;IACZ,KAAK,CAAC,CAAC;IACP,CAAC;;IChCM,SAAS,SAAS,CAAC,QAAQ,EAAE,SAAS,EAAE;IAC/C,IAAI,IAAI,SAAS,KAAK,KAAK,CAAC,EAAE,EAAE,SAAS,GAAG,cAAc,CAAC,EAAE;IAC7D,IAAI,OAAO,KAAK,CAAC,YAAY,EAAE,OAAO,KAAK,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;IACrE,CAAC;;ICFM,SAAS,MAAM,CAAC,eAAe,EAAE;IACxC,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,aAAa,GAAG,EAAE,CAAC;IAC/B,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE,EAAE,OAAO,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,YAAY;IAClI,YAAY,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC3C,YAAY,UAAU,CAAC,QAAQ,EAAE,CAAC;IAClC,SAAS,CAAC,CAAC,CAAC;IACZ,QAAQ,SAAS,CAAC,eAAe,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,YAAY;IAC9F,YAAY,IAAI,CAAC,GAAG,aAAa,CAAC;IAClC,YAAY,aAAa,GAAG,EAAE,CAAC;IAC/B,YAAY,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC/B,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;IAClB,QAAQ,OAAO,YAAY;IAC3B,YAAY,aAAa,GAAG,IAAI,CAAC;IACjC,SAAS,CAAC;IACV,KAAK,CAAC,CAAC;IACP,CAAC;;IChBM,SAAS,WAAW,CAAC,UAAU,EAAE,gBAAgB,EAAE;IAC1D,IAAI,IAAI,gBAAgB,KAAK,KAAK,CAAC,EAAE,EAAE,gBAAgB,GAAG,IAAI,CAAC,EAAE;IACjE,IAAI,gBAAgB,GAAG,gBAAgB,KAAK,IAAI,IAAI,gBAAgB,KAAK,KAAK,CAAC,GAAG,gBAAgB,GAAG,UAAU,CAAC;IAChH,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,OAAO,GAAG,EAAE,CAAC;IACzB,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC;IACtB,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC/E,YAAY,IAAI,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC;IACjC,YAAY,IAAI,MAAM,GAAG,IAAI,CAAC;IAC9B,YAAY,IAAI,KAAK,EAAE,GAAG,gBAAgB,KAAK,CAAC,EAAE;IAClD,gBAAgB,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjC,aAAa;IACb,YAAY,IAAI;IAChB,gBAAgB,KAAK,IAAI,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,WAAW,GAAG,SAAS,CAAC,IAAI,EAAE,EAAE;IAC3I,oBAAoB,IAAI,MAAM,GAAG,WAAW,CAAC,KAAK,CAAC;IACnD,oBAAoB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,oBAAoB,IAAI,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE;IACrD,wBAAwB,MAAM,GAAG,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,KAAK,CAAC,GAAG,MAAM,GAAG,EAAE,CAAC;IACpF,wBAAwB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5C,qBAAqB;IACrB,iBAAiB;IACjB,aAAa;IACb,YAAY,OAAO,KAAK,EAAE,EAAE,GAAG,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;IACrD,oBAAoB;IACpB,gBAAgB,IAAI;IACpB,oBAAoB,IAAI,WAAW,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,EAAE,GAAG,SAAS,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACxG,iBAAiB;IACjB,wBAAwB,EAAE,IAAI,GAAG,EAAE,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE;IACrD,aAAa;IACb,YAAY,IAAI,MAAM,EAAE;IACxB,gBAAgB,IAAI;IACpB,oBAAoB,KAAK,IAAI,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,QAAQ,CAAC,IAAI,EAAE,EAAE;IACxI,wBAAwB,IAAI,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC;IACtD,wBAAwB,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACnD,wBAAwB,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChD,qBAAqB;IACrB,iBAAiB;IACjB,gBAAgB,OAAO,KAAK,EAAE,EAAE,GAAG,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;IACzD,wBAAwB;IACxB,oBAAoB,IAAI;IACxB,wBAAwB,IAAI,UAAU,IAAI,CAAC,UAAU,CAAC,IAAI,KAAK,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACxG,qBAAqB;IACrB,4BAA4B,EAAE,IAAI,GAAG,EAAE,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE;IACzD,iBAAiB;IACjB,aAAa;IACb,SAAS,EAAE,YAAY;IACvB,YAAY,IAAI,GAAG,EAAE,EAAE,CAAC;IACxB,YAAY,IAAI;IAChB,gBAAgB,KAAK,IAAI,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,WAAW,GAAG,SAAS,CAAC,IAAI,EAAE,EAAE;IAC3I,oBAAoB,IAAI,MAAM,GAAG,WAAW,CAAC,KAAK,CAAC;IACnD,oBAAoB,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5C,iBAAiB;IACjB,aAAa;IACb,YAAY,OAAO,KAAK,EAAE,EAAE,GAAG,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;IACrD,oBAAoB;IACpB,gBAAgB,IAAI;IACpB,oBAAoB,IAAI,WAAW,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,EAAE,GAAG,SAAS,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACxG,iBAAiB;IACjB,wBAAwB,EAAE,IAAI,GAAG,EAAE,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE;IACrD,aAAa;IACb,YAAY,UAAU,CAAC,QAAQ,EAAE,CAAC;IAClC,SAAS,EAAE,SAAS,EAAE,YAAY;IAClC,YAAY,OAAO,GAAG,IAAI,CAAC;IAC3B,SAAS,CAAC,CAAC,CAAC;IACZ,KAAK,CAAC,CAAC;IACP,CAAC;;IC7DM,SAAS,UAAU,CAAC,cAAc,EAAE;IAC3C,IAAI,IAAI,EAAE,EAAE,EAAE,CAAC;IACf,IAAI,IAAI,SAAS,GAAG,EAAE,CAAC;IACvB,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,SAAS,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IAC1C,KAAK;IACL,IAAI,IAAI,SAAS,GAAG,CAAC,EAAE,GAAG,YAAY,CAAC,SAAS,CAAC,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,EAAE,GAAG,cAAc,CAAC;IACnG,IAAI,IAAI,sBAAsB,GAAG,CAAC,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;IAC3F,IAAI,IAAI,aAAa,GAAG,SAAS,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC;IACjD,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,aAAa,GAAG,EAAE,CAAC;IAC/B,QAAQ,IAAI,aAAa,GAAG,KAAK,CAAC;IAClC,QAAQ,IAAI,IAAI,GAAG,UAAU,MAAM,EAAE;IACrC,YAAY,IAAI,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;IAC3D,YAAY,IAAI,CAAC,WAAW,EAAE,CAAC;IAC/B,YAAY,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IAC7C,YAAY,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpC,YAAY,aAAa,IAAI,WAAW,EAAE,CAAC;IAC3C,SAAS,CAAC;IACV,QAAQ,IAAI,WAAW,GAAG,YAAY;IACtC,YAAY,IAAI,aAAa,EAAE;IAC/B,gBAAgB,IAAI,IAAI,GAAG,IAAI,YAAY,EAAE,CAAC;IAC9C,gBAAgB,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACrC,gBAAgB,IAAI,MAAM,GAAG,EAAE,CAAC;IAChC,gBAAgB,IAAI,QAAQ,GAAG;IAC/B,oBAAoB,MAAM,EAAE,MAAM;IAClC,oBAAoB,IAAI,EAAE,IAAI;IAC9B,iBAAiB,CAAC;IAClB,gBAAgB,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC7C,gBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC;IACzG,aAAa;IACb,SAAS,CAAC;IACV,QAAQ,IAAI,sBAAsB,KAAK,IAAI,IAAI,sBAAsB,IAAI,CAAC,EAAE;IAC5E,YAAY,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,sBAAsB,EAAE,IAAI,CAAC,CAAC;IAC9F,SAAS;IACT,aAAa;IACb,YAAY,aAAa,GAAG,IAAI,CAAC;IACjC,SAAS;IACT,QAAQ,WAAW,EAAE,CAAC;IACtB,QAAQ,IAAI,oBAAoB,GAAG,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IACzF,YAAY,IAAI,GAAG,EAAE,EAAE,CAAC;IACxB,YAAY,IAAI,WAAW,GAAG,aAAa,CAAC,KAAK,EAAE,CAAC;IACpD,YAAY,IAAI;IAChB,gBAAgB,KAAK,IAAI,aAAa,GAAG,QAAQ,CAAC,WAAW,CAAC,EAAE,eAAe,GAAG,aAAa,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,eAAe,GAAG,aAAa,CAAC,IAAI,EAAE,EAAE;IACvK,oBAAoB,IAAI,MAAM,GAAG,eAAe,CAAC,KAAK,CAAC;IACvD,oBAAoB,IAAI,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC/C,oBAAoB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,oBAAoB,aAAa,IAAI,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC;IACnE,iBAAiB;IACjB,aAAa;IACb,YAAY,OAAO,KAAK,EAAE,EAAE,GAAG,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;IACrD,oBAAoB;IACpB,gBAAgB,IAAI;IACpB,oBAAoB,IAAI,eAAe,IAAI,CAAC,eAAe,CAAC,IAAI,KAAK,EAAE,GAAG,aAAa,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACxH,iBAAiB;IACjB,wBAAwB,EAAE,IAAI,GAAG,EAAE,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE;IACrD,aAAa;IACb,SAAS,EAAE,YAAY;IACvB,YAAY,OAAO,aAAa,KAAK,IAAI,IAAI,aAAa,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE;IACvG,gBAAgB,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,CAAC;IAC9D,aAAa;IACb,YAAY,oBAAoB,KAAK,IAAI,IAAI,oBAAoB,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,oBAAoB,CAAC,WAAW,EAAE,CAAC;IAC3H,YAAY,UAAU,CAAC,QAAQ,EAAE,CAAC;IAClC,YAAY,UAAU,CAAC,WAAW,EAAE,CAAC;IACrC,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,aAAa,GAAG,IAAI,EAAE,EAAE,CAAC,CAAC;IACtE,QAAQ,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;IAC/C,KAAK,CAAC,CAAC;IACP,CAAC;;ICpEM,SAAS,YAAY,CAAC,QAAQ,EAAE,eAAe,EAAE;IACxD,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,OAAO,GAAG,EAAE,CAAC;IACzB,QAAQ,SAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,SAAS,EAAE;IAChG,YAAY,IAAI,MAAM,GAAG,EAAE,CAAC;IAC5B,YAAY,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACjC,YAAY,IAAI,mBAAmB,GAAG,IAAI,YAAY,EAAE,CAAC;IACzD,YAAY,IAAI,UAAU,GAAG,YAAY;IACzC,gBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC3C,gBAAgB,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACxC,gBAAgB,mBAAmB,CAAC,WAAW,EAAE,CAAC;IAClD,aAAa,CAAC;IACd,YAAY,mBAAmB,CAAC,GAAG,CAAC,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAC7I,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;IAClB,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC/E,YAAY,IAAI,GAAG,EAAE,EAAE,CAAC;IACxB,YAAY,IAAI;IAChB,gBAAgB,KAAK,IAAI,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,WAAW,GAAG,SAAS,CAAC,IAAI,EAAE,EAAE;IAC3I,oBAAoB,IAAI,MAAM,GAAG,WAAW,CAAC,KAAK,CAAC;IACnD,oBAAoB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,iBAAiB;IACjB,aAAa;IACb,YAAY,OAAO,KAAK,EAAE,EAAE,GAAG,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;IACrD,oBAAoB;IACpB,gBAAgB,IAAI;IACpB,oBAAoB,IAAI,WAAW,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,EAAE,GAAG,SAAS,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACxG,iBAAiB;IACjB,wBAAwB,EAAE,IAAI,GAAG,EAAE,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE;IACrD,aAAa;IACb,SAAS,EAAE,YAAY;IACvB,YAAY,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;IACvC,gBAAgB,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;IACjD,aAAa;IACb,YAAY,UAAU,CAAC,QAAQ,EAAE,CAAC;IAClC,SAAS,CAAC,CAAC,CAAC;IACZ,KAAK,CAAC,CAAC;IACP,CAAC;;ICvCM,SAAS,UAAU,CAAC,eAAe,EAAE;IAC5C,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,IAAI,iBAAiB,GAAG,IAAI,CAAC;IACrC,QAAQ,IAAI,UAAU,GAAG,YAAY;IACrC,YAAY,iBAAiB,KAAK,IAAI,IAAI,iBAAiB,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,iBAAiB,CAAC,WAAW,EAAE,CAAC;IAClH,YAAY,IAAI,CAAC,GAAG,MAAM,CAAC;IAC3B,YAAY,MAAM,GAAG,EAAE,CAAC;IACxB,YAAY,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpC,YAAY,SAAS,CAAC,eAAe,EAAE,CAAC,CAAC,SAAS,EAAE,iBAAiB,GAAG,wBAAwB,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE,CAAC;IACjI,SAAS,CAAC;IACV,QAAQ,UAAU,EAAE,CAAC;IACrB,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE,EAAE,OAAO,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,YAAY;IAC3K,YAAY,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC9C,YAAY,UAAU,CAAC,QAAQ,EAAE,CAAC;IAClC,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,MAAM,GAAG,iBAAiB,GAAG,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;IACpF,KAAK,CAAC,CAAC;IACP,CAAC;;IClBM,SAAS,UAAU,CAAC,QAAQ,EAAE;IACrC,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,QAAQ,GAAG,IAAI,CAAC;IAC5B,QAAQ,IAAI,SAAS,GAAG,KAAK,CAAC;IAC9B,QAAQ,IAAI,aAAa,CAAC;IAC1B,QAAQ,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,GAAG,EAAE;IAC9G,YAAY,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACnF,YAAY,IAAI,QAAQ,EAAE;IAC1B,gBAAgB,QAAQ,CAAC,WAAW,EAAE,CAAC;IACvC,gBAAgB,QAAQ,GAAG,IAAI,CAAC;IAChC,gBAAgB,aAAa,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACpD,aAAa;IACb,iBAAiB;IACjB,gBAAgB,SAAS,GAAG,IAAI,CAAC;IACjC,aAAa;IACb,SAAS,CAAC,CAAC,CAAC;IACZ,QAAQ,IAAI,SAAS,EAAE;IACvB,YAAY,QAAQ,CAAC,WAAW,EAAE,CAAC;IACnC,YAAY,QAAQ,GAAG,IAAI,CAAC;IAC5B,YAAY,aAAa,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAChD,SAAS;IACT,KAAK,CAAC,CAAC;IACP,CAAC;;ICxBM,SAAS,aAAa,CAAC,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE;IAC1F,IAAI,OAAO,UAAU,MAAM,EAAE,UAAU,EAAE;IACzC,QAAQ,IAAI,QAAQ,GAAG,OAAO,CAAC;IAC/B,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;IACzB,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC;IACtB,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC/E,YAAY,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC;IAC5B,YAAY,KAAK,GAAG,QAAQ;IAC5B;IACA,oBAAoB,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IAChD;IACA,qBAAqB,CAAC,QAAQ,GAAG,IAAI,GAAG,KAAK,CAAC,CAAC;IAC/C,YAAY,UAAU,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjD,SAAS,EAAE,kBAAkB;IAC7B,aAAa,YAAY;IACzB,gBAAgB,QAAQ,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnD,gBAAgB,UAAU,CAAC,QAAQ,EAAE,CAAC;IACtC,aAAa,CAAC,CAAC,CAAC,CAAC;IACjB,KAAK,CAAC;IACN,CAAC;;IClBM,SAAS,MAAM,CAAC,WAAW,EAAE,IAAI,EAAE;IAC1C,IAAI,OAAO,OAAO,CAAC,aAAa,CAAC,WAAW,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;IACzF,CAAC;;ICFD,IAAI,UAAU,GAAG,UAAU,GAAG,EAAE,KAAK,EAAE,EAAE,QAAQ,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC;AAC1E,IAAO,SAAS,OAAO,GAAG;IAC1B,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC7D,KAAK,CAAC,CAAC;IACP,CAAC;;ICFM,SAAS,gBAAgB,CAAC,MAAM,EAAE,OAAO,EAAE;IAClD,IAAI,OAAO,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,CAAC;IACrI,CAAC;;ICLM,SAAS,gBAAgB,CAAC,OAAO,EAAE;IAC1C,IAAI,OAAO,gBAAgB,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;;ACHS,QAAC,UAAU,GAAG,gBAAgB;;ICMjC,SAASE,eAAa,GAAG;IAChC,IAAI,IAAI,IAAI,GAAG,EAAE,CAAC;IAClB,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,IAAI,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACjC,KAAK;IACL,IAAI,IAAI,cAAc,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACjD,IAAI,OAAO,cAAc;IACzB,UAAU,IAAI,CAACA,eAAa,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;IAC9G,UAAU,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IAChD,YAAY,iBAAiB,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IACjG,SAAS,CAAC,CAAC;IACX,CAAC;;IChBM,SAAS,iBAAiB,GAAG;IACpC,IAAI,IAAI,YAAY,GAAG,EAAE,CAAC;IAC1B,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,YAAY,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACzC,KAAK;IACL,IAAI,OAAOA,eAAa,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,EAAE,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAChF,CAAC;;ICNM,SAAS,SAAS,CAAC,OAAO,EAAE,cAAc,EAAE;IACnD,IAAI,OAAO,UAAU,CAAC,cAAc,CAAC,GAAG,QAAQ,CAAC,OAAO,EAAE,cAAc,EAAE,CAAC,CAAC,GAAG,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IACpG,CAAC;;ICFM,SAAS,WAAW,CAAC,eAAe,EAAE,cAAc,EAAE;IAC7D,IAAI,OAAO,UAAU,CAAC,cAAc,CAAC,GAAG,SAAS,CAAC,YAAY,EAAE,OAAO,eAAe,CAAC,EAAE,EAAE,cAAc,CAAC,GAAG,SAAS,CAAC,YAAY,EAAE,OAAO,eAAe,CAAC,EAAE,CAAC,CAAC;IAChK,CAAC;;ICCM,SAASC,QAAM,GAAG;IACzB,IAAI,IAAI,IAAI,GAAG,EAAE,CAAC;IAClB,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,IAAI,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACjC,KAAK;IACL,IAAI,IAAI,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACvC,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,SAAS,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAClG,KAAK,CAAC,CAAC;IACP,CAAC;;ICZM,SAAS,UAAU,GAAG;IAC7B,IAAI,IAAI,YAAY,GAAG,EAAE,CAAC;IAC1B,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,YAAY,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACzC,KAAK;IACL,IAAI,OAAOA,QAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,EAAE,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IACzE,CAAC;;ICPM,SAAS,gBAAgB,CAAC,YAAY,EAAE;IAC/C,IAAI,OAAO,IAAI,UAAU,CAAC,UAAU,UAAU,EAAE,EAAE,OAAO,YAAY,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC;IAChG,CAAC;;ICCD,IAAIC,gBAAc,GAAG;IACrB,IAAI,SAAS,EAAE,YAAY,EAAE,OAAO,IAAI,OAAO,EAAE,CAAC,EAAE;IACpD,CAAC,CAAC;AACF,IAAO,SAAS,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE;IAC1C,IAAI,IAAI,MAAM,KAAK,KAAK,CAAC,EAAE,EAAE,MAAM,GAAGA,gBAAc,CAAC,EAAE;IACvD,IAAI,IAAI,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IACrC,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,OAAO,GAAG,SAAS,EAAE,CAAC;IAClC,QAAQ,SAAS,CAAC,QAAQ,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC7E,QAAQ,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;IAClD,KAAK,CAAC,CAAC;IACP,CAAC;;ICdM,SAAS,KAAK,CAAC,SAAS,EAAE;IACjC,IAAI,OAAO,MAAM,CAAC,UAAU,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,QAAQ,CAAC,SAAS,IAAI,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IACrH,CAAC;;ICCM,SAAS,QAAQ,CAAC,gBAAgB,EAAE;IAC3C,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,QAAQ,GAAG,KAAK,CAAC;IAC7B,QAAQ,IAAI,SAAS,GAAG,IAAI,CAAC;IAC7B,QAAQ,IAAI,kBAAkB,GAAG,IAAI,CAAC;IACtC,QAAQ,IAAI,IAAI,GAAG,YAAY;IAC/B,YAAY,kBAAkB,KAAK,IAAI,IAAI,kBAAkB,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,kBAAkB,CAAC,WAAW,EAAE,CAAC;IACrH,YAAY,kBAAkB,GAAG,IAAI,CAAC;IACtC,YAAY,IAAI,QAAQ,EAAE;IAC1B,gBAAgB,QAAQ,GAAG,KAAK,CAAC;IACjC,gBAAgB,IAAI,KAAK,GAAG,SAAS,CAAC;IACtC,gBAAgB,SAAS,GAAG,IAAI,CAAC;IACjC,gBAAgB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,aAAa;IACb,SAAS,CAAC;IACV,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC/E,YAAY,kBAAkB,KAAK,IAAI,IAAI,kBAAkB,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,kBAAkB,CAAC,WAAW,EAAE,CAAC;IACrH,YAAY,QAAQ,GAAG,IAAI,CAAC;IAC5B,YAAY,SAAS,GAAG,KAAK,CAAC;IAC9B,YAAY,kBAAkB,GAAG,wBAAwB,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAClF,YAAY,SAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;IAC7E,SAAS,EAAE,YAAY;IACvB,YAAY,IAAI,EAAE,CAAC;IACnB,YAAY,UAAU,CAAC,QAAQ,EAAE,CAAC;IAClC,SAAS,EAAE,SAAS,EAAE,YAAY;IAClC,YAAY,SAAS,GAAG,kBAAkB,GAAG,IAAI,CAAC;IAClD,SAAS,CAAC,CAAC,CAAC;IACZ,KAAK,CAAC,CAAC;IACP,CAAC;;IC7BM,SAAS,YAAY,CAAC,OAAO,EAAE,SAAS,EAAE;IACjD,IAAI,IAAI,SAAS,KAAK,KAAK,CAAC,EAAE,EAAE,SAAS,GAAG,cAAc,CAAC,EAAE;IAC7D,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,UAAU,GAAG,IAAI,CAAC;IAC9B,QAAQ,IAAI,SAAS,GAAG,IAAI,CAAC;IAC7B,QAAQ,IAAI,QAAQ,GAAG,IAAI,CAAC;IAC5B,QAAQ,IAAI,IAAI,GAAG,YAAY;IAC/B,YAAY,IAAI,UAAU,EAAE;IAC5B,gBAAgB,UAAU,CAAC,WAAW,EAAE,CAAC;IACzC,gBAAgB,UAAU,GAAG,IAAI,CAAC;IAClC,gBAAgB,IAAI,KAAK,GAAG,SAAS,CAAC;IACtC,gBAAgB,SAAS,GAAG,IAAI,CAAC;IACjC,gBAAgB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,aAAa;IACb,SAAS,CAAC;IACV,QAAQ,SAAS,YAAY,GAAG;IAChC,YAAY,IAAI,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC;IAChD,YAAY,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;IACtC,YAAY,IAAI,GAAG,GAAG,UAAU,EAAE;IAClC,gBAAgB,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,UAAU,GAAG,GAAG,CAAC,CAAC;IACxE,gBAAgB,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC3C,gBAAgB,OAAO;IACvB,aAAa;IACb,YAAY,IAAI,EAAE,CAAC;IACnB,SAAS;IACT,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC/E,YAAY,SAAS,GAAG,KAAK,CAAC;IAC9B,YAAY,QAAQ,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;IACvC,YAAY,IAAI,CAAC,UAAU,EAAE;IAC7B,gBAAgB,UAAU,GAAG,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACvE,gBAAgB,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC3C,aAAa;IACb,SAAS,EAAE,YAAY;IACvB,YAAY,IAAI,EAAE,CAAC;IACnB,YAAY,UAAU,CAAC,QAAQ,EAAE,CAAC;IAClC,SAAS,EAAE,SAAS,EAAE,YAAY;IAClC,YAAY,SAAS,GAAG,UAAU,GAAG,IAAI,CAAC;IAC1C,SAAS,CAAC,CAAC,CAAC;IACZ,KAAK,CAAC,CAAC;IACP,CAAC;;ICxCM,SAAS,cAAc,CAAC,YAAY,EAAE;IAC7C,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,QAAQ,GAAG,KAAK,CAAC;IAC7B,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC/E,YAAY,QAAQ,GAAG,IAAI,CAAC;IAC5B,YAAY,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnC,SAAS,EAAE,YAAY;IACvB,YAAY,IAAI,CAAC,QAAQ,EAAE;IAC3B,gBAAgB,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC9C,aAAa;IACb,YAAY,UAAU,CAAC,QAAQ,EAAE,CAAC;IAClC,SAAS,CAAC,CAAC,CAAC;IACZ,KAAK,CAAC,CAAC;IACP,CAAC;;ICZM,SAAS,IAAI,CAAC,KAAK,EAAE;IAC5B,IAAI,OAAO,KAAK,IAAI,CAAC;IACrB;IACA,YAAY,YAAY,EAAE,OAAO,KAAK,CAAC,EAAE;IACzC,UAAU,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IAChD,YAAY,IAAI,IAAI,GAAG,CAAC,CAAC;IACzB,YAAY,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IACnF,gBAAgB,IAAI,EAAE,IAAI,IAAI,KAAK,EAAE;IACrC,oBAAoB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3C,oBAAoB,IAAI,KAAK,IAAI,IAAI,EAAE;IACvC,wBAAwB,UAAU,CAAC,QAAQ,EAAE,CAAC;IAC9C,qBAAqB;IACrB,iBAAiB;IACjB,aAAa,CAAC,CAAC,CAAC;IAChB,SAAS,CAAC,CAAC;IACX,CAAC;;ICfM,SAAS,cAAc,GAAG;IACjC,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC;IACrE,KAAK,CAAC,CAAC;IACP,CAAC;;ICNM,SAAS,KAAK,CAAC,KAAK,EAAE;IAC7B,IAAI,OAAO,GAAG,CAAC,YAAY,EAAE,OAAO,KAAK,CAAC,EAAE,CAAC,CAAC;IAC9C,CAAC;;ICGM,SAAS,SAAS,CAAC,qBAAqB,EAAE,iBAAiB,EAAE;IACpE,IAAI,IAAI,iBAAiB,EAAE;IAC3B,QAAQ,OAAO,UAAU,MAAM,EAAE;IACjC,YAAY,OAAO,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;IAC5H,SAAS,CAAC;IACV,KAAK;IACL,IAAI,OAAO,QAAQ,CAAC,UAAU,KAAK,EAAE,KAAK,EAAE,EAAE,OAAO,SAAS,CAAC,qBAAqB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACpI,CAAC;;ICVM,SAAS,KAAK,CAAC,GAAG,EAAE,SAAS,EAAE;IACtC,IAAI,IAAI,SAAS,KAAK,KAAK,CAAC,EAAE,EAAE,SAAS,GAAG,cAAc,CAAC,EAAE;IAC7D,IAAI,IAAI,QAAQ,GAAG,KAAK,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IACzC,IAAI,OAAO,SAAS,CAAC,YAAY,EAAE,OAAO,QAAQ,CAAC,EAAE,CAAC,CAAC;IACvD,CAAC;;ICJM,SAAS,aAAa,GAAG;IAChC,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,YAAY,EAAE,EAAE,OAAO,mBAAmB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAClJ,KAAK,CAAC,CAAC;IACP,CAAC;;ICHM,SAAS,QAAQ,CAAC,WAAW,EAAE,OAAO,EAAE;IAC/C,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,YAAY,GAAG,IAAI,GAAG,EAAE,CAAC;IACrC,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC/E,YAAY,IAAI,GAAG,GAAG,WAAW,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;IAC/D,YAAY,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;IACxC,gBAAgB,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACtC,gBAAgB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,aAAa;IACb,SAAS,CAAC,CAAC,CAAC;IACZ,QAAQ,OAAO,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,YAAY,EAAE,OAAO,YAAY,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;IAC1I,KAAK,CAAC,CAAC;IACP,CAAC;;ICbM,SAAS,oBAAoB,CAAC,UAAU,EAAE,WAAW,EAAE;IAC9D,IAAI,IAAI,WAAW,KAAK,KAAK,CAAC,EAAE,EAAE,WAAW,GAAG,QAAQ,CAAC,EAAE;IAC3D,IAAI,UAAU,GAAG,UAAU,KAAK,IAAI,IAAI,UAAU,KAAK,KAAK,CAAC,GAAG,UAAU,GAAG,cAAc,CAAC;IAC5F,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,WAAW,CAAC;IACxB,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;IACzB,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC/E,YAAY,IAAI,UAAU,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;IAChD,YAAY,IAAI,KAAK,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE;IAC/D,gBAAgB,KAAK,GAAG,KAAK,CAAC;IAC9B,gBAAgB,WAAW,GAAG,UAAU,CAAC;IACzC,gBAAgB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,aAAa;IACb,SAAS,CAAC,CAAC,CAAC;IACZ,KAAK,CAAC,CAAC;IACP,CAAC;IACD,SAAS,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE;IAC9B,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;;ICpBM,SAAS,uBAAuB,CAAC,GAAG,EAAE,OAAO,EAAE;IACtD,IAAI,OAAO,oBAAoB,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,QAAQ,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;IACrH,CAAC;;ICAM,SAAS,YAAY,CAAC,YAAY,EAAE;IAC3C,IAAI,IAAI,YAAY,KAAK,KAAK,CAAC,EAAE,EAAE,YAAY,GAAG,mBAAmB,CAAC,EAAE;IACxE,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,QAAQ,GAAG,KAAK,CAAC;IAC7B,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC/E,YAAY,QAAQ,GAAG,IAAI,CAAC;IAC5B,YAAY,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnC,SAAS,EAAE,YAAY,EAAE,QAAQ,QAAQ,GAAG,UAAU,CAAC,QAAQ,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAC3G,KAAK,CAAC,CAAC;IACP,CAAC;IACD,SAAS,mBAAmB,GAAG;IAC/B,IAAI,OAAO,IAAI,UAAU,EAAE,CAAC;IAC5B,CAAC;;ICVM,SAAS,SAAS,CAAC,KAAK,EAAE,YAAY,EAAE;IAC/C,IAAI,IAAI,KAAK,GAAG,CAAC,EAAE;IACnB,QAAQ,MAAM,IAAI,uBAAuB,EAAE,CAAC;IAC5C,KAAK;IACL,IAAI,IAAI,eAAe,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;IAChD,IAAI,OAAO,UAAU,MAAM,EAAE;IAC7B,QAAQ,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,KAAK,KAAK,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,eAAe,GAAG,cAAc,CAAC,YAAY,CAAC,GAAG,YAAY,CAAC,YAAY,EAAE,OAAO,IAAI,uBAAuB,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3M,KAAK,CAAC;IACN,CAAC;;ICVM,SAAS,OAAO,GAAG;IAC1B,IAAI,IAAI,MAAM,GAAG,EAAE,CAAC;IACpB,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,MAAM,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACnC,KAAK;IACL,IAAI,OAAO,UAAU,MAAM,EAAE,EAAE,OAAO,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7G,CAAC;;ICPM,SAAS,KAAK,CAAC,SAAS,EAAE,OAAO,EAAE;IAC1C,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC;IACtB,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC/E,YAAY,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,EAAE;IAClE,gBAAgB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,gBAAgB,UAAU,CAAC,QAAQ,EAAE,CAAC;IACtC,aAAa;IACb,SAAS,EAAE,YAAY;IACvB,YAAY,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClC,YAAY,UAAU,CAAC,QAAQ,EAAE,CAAC;IAClC,SAAS,CAAC,CAAC,CAAC;IACZ,KAAK,CAAC,CAAC;IACP,CAAC;;ICXM,SAAS,UAAU,CAAC,OAAO,EAAE,cAAc,EAAE;IACpD,IAAI,IAAI,cAAc,EAAE;IACxB,QAAQ,OAAO,UAAU,MAAM,EAAE;IACjC,YAAY,OAAO,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,EAAE,OAAO,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACrK,SAAS,CAAC;IACV,KAAK;IACL,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC;IACtB,QAAQ,IAAI,QAAQ,GAAG,IAAI,CAAC;IAC5B,QAAQ,IAAI,UAAU,GAAG,KAAK,CAAC;IAC/B,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,UAAU,EAAE;IACpF,YAAY,IAAI,CAAC,QAAQ,EAAE;IAC3B,gBAAgB,QAAQ,GAAG,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,YAAY;IACvF,oBAAoB,QAAQ,GAAG,IAAI,CAAC;IACpC,oBAAoB,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;IACxD,iBAAiB,CAAC,CAAC;IACnB,gBAAgB,SAAS,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC5E,aAAa;IACb,SAAS,EAAE,YAAY;IACvB,YAAY,UAAU,GAAG,IAAI,CAAC;IAC9B,YAAY,CAAC,QAAQ,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;IAC/C,SAAS,CAAC,CAAC,CAAC;IACZ,KAAK,CAAC,CAAC;IACP,CAAC;;ICzBM,SAAS,UAAU,GAAG;IAC7B,IAAI,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;;ACHS,QAAC,OAAO,GAAG,UAAU;;ICCxB,SAAS,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE;IACvD,IAAI,IAAI,UAAU,KAAK,KAAK,CAAC,EAAE,EAAE,UAAU,GAAG,QAAQ,CAAC,EAAE;IACzD,IAAI,UAAU,GAAG,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,GAAG,QAAQ,GAAG,UAAU,CAAC;IAC/D,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,OAAO,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;IACnG,KAAK,CAAC,CAAC;IACP,CAAC;;ICPM,SAAS,QAAQ,CAAC,QAAQ,EAAE;IACnC,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI;IACZ,YAAY,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACzC,SAAS;IACT,gBAAgB;IAChB,YAAY,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACrC,SAAS;IACT,KAAK,CAAC,CAAC;IACP,CAAC;;ICRM,SAAS,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE;IACzC,IAAI,OAAO,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAC5D,CAAC;AACD,IAAO,SAAS,UAAU,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE;IACrD,IAAI,IAAI,SAAS,GAAG,IAAI,KAAK,OAAO,CAAC;IACrC,IAAI,OAAO,UAAU,MAAM,EAAE,UAAU,EAAE;IACzC,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC;IACtB,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC/E,YAAY,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC;IAC5B,YAAY,IAAI,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE;IAC3D,gBAAgB,UAAU,CAAC,IAAI,CAAC,SAAS,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC;IACvD,gBAAgB,UAAU,CAAC,QAAQ,EAAE,CAAC;IACtC,aAAa;IACb,SAAS,EAAE,YAAY;IACvB,YAAY,UAAU,CAAC,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IACxD,YAAY,UAAU,CAAC,QAAQ,EAAE,CAAC;IAClC,SAAS,CAAC,CAAC,CAAC;IACZ,KAAK,CAAC;IACN,CAAC;;IClBM,SAAS,SAAS,CAAC,SAAS,EAAE,OAAO,EAAE;IAC9C,IAAI,OAAO,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAC5D,CAAC;;ICEM,SAAS,KAAK,CAAC,SAAS,EAAE,YAAY,EAAE;IAC/C,IAAI,IAAI,eAAe,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;IAChD,IAAI,OAAO,UAAU,MAAM,EAAE;IAC7B,QAAQ,OAAO,MAAM,CAAC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,eAAe,GAAG,cAAc,CAAC,YAAY,CAAC,GAAG,YAAY,CAAC,YAAY,EAAE,OAAO,IAAI,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACjO,KAAK,CAAC;IACN,CAAC;;ICNM,SAAS,OAAO,CAAC,WAAW,EAAE,gBAAgB,EAAE,QAAQ,EAAE,SAAS,EAAE;IAC5E,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,OAAO,CAAC;IACpB,QAAQ,IAAI,CAAC,gBAAgB,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE;IACzE,YAAY,OAAO,GAAG,gBAAgB,CAAC;IACvC,SAAS;IACT,aAAa;IACb,YAAY,CAAC,QAAQ,GAAG,gBAAgB,CAAC,QAAQ,EAAE,OAAO,GAAG,gBAAgB,CAAC,OAAO,EAAE,SAAS,GAAG,gBAAgB,CAAC,SAAS,EAAE;IAC/H,SAAS;IACT,QAAQ,IAAI,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;IAC/B,QAAQ,IAAI,MAAM,GAAG,UAAU,EAAE,EAAE;IACnC,YAAY,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC/B,YAAY,EAAE,CAAC,UAAU,CAAC,CAAC;IAC3B,SAAS,CAAC;IACV,QAAQ,IAAI,WAAW,GAAG,UAAU,GAAG,EAAE,EAAE,OAAO,MAAM,CAAC,UAAU,QAAQ,EAAE,EAAE,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;IACjH,QAAQ,IAAI,YAAY,GAAG,CAAC,CAAC;IAC7B,QAAQ,IAAI,iBAAiB,GAAG,KAAK,CAAC;IACtC,QAAQ,IAAI,uBAAuB,GAAG,IAAI,kBAAkB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC1F,YAAY,IAAI;IAChB,gBAAgB,IAAI,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;IAC/C,gBAAgB,IAAI,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAChD,gBAAgB,IAAI,CAAC,OAAO,EAAE;IAC9B,oBAAoB,MAAM,CAAC,GAAG,CAAC,KAAK,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,EAAE,GAAG,IAAI,OAAO,EAAE,EAAE,CAAC;IAC3F,oBAAoB,IAAI,OAAO,GAAG,uBAAuB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC1E,oBAAoB,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC7C,oBAAoB,IAAI,QAAQ,EAAE;IAClC,wBAAwB,IAAI,oBAAoB,GAAG,wBAAwB,CAAC,OAAO,EAAE,YAAY;IACjG,4BAA4B,OAAO,CAAC,QAAQ,EAAE,CAAC;IAC/C,4BAA4B,oBAAoB,KAAK,IAAI,IAAI,oBAAoB,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,oBAAoB,CAAC,WAAW,EAAE,CAAC;IAC3I,yBAAyB,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;IAC/F,wBAAwB,uBAAuB,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAClH,qBAAqB;IACrB,iBAAiB;IACjB,gBAAgB,OAAO,CAAC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC;IAC/D,aAAa;IACb,YAAY,OAAO,GAAG,EAAE;IACxB,gBAAgB,WAAW,CAAC,GAAG,CAAC,CAAC;IACjC,aAAa;IACb,SAAS,EAAE,YAAY,EAAE,OAAO,MAAM,CAAC,UAAU,QAAQ,EAAE,EAAE,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,YAAY;IACjK,YAAY,iBAAiB,GAAG,IAAI,CAAC;IACrC,YAAY,OAAO,YAAY,KAAK,CAAC,CAAC;IACtC,SAAS,CAAC,CAAC;IACX,QAAQ,MAAM,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAC;IAClD,QAAQ,SAAS,uBAAuB,CAAC,GAAG,EAAE,YAAY,EAAE;IAC5D,YAAY,IAAI,MAAM,GAAG,IAAI,UAAU,CAAC,UAAU,eAAe,EAAE;IACnE,gBAAgB,YAAY,EAAE,CAAC;IAC/B,gBAAgB,IAAI,QAAQ,GAAG,YAAY,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IACvE,gBAAgB,OAAO,YAAY;IACnC,oBAAoB,QAAQ,CAAC,WAAW,EAAE,CAAC;IAC3C,oBAAoB,EAAE,YAAY,KAAK,CAAC,IAAI,iBAAiB,IAAI,uBAAuB,CAAC,WAAW,EAAE,CAAC;IACvG,iBAAiB,CAAC;IAClB,aAAa,CAAC,CAAC;IACf,YAAY,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;IAC7B,YAAY,OAAO,MAAM,CAAC;IAC1B,SAAS;IACT,KAAK,CAAC,CAAC;IACP,CAAC;;IC3DM,SAAS,OAAO,GAAG;IAC1B,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,YAAY;IAC1E,YAAY,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnC,YAAY,UAAU,CAAC,QAAQ,EAAE,CAAC;IAClC,SAAS,EAAE,YAAY;IACvB,YAAY,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClC,YAAY,UAAU,CAAC,QAAQ,EAAE,CAAC;IAClC,SAAS,CAAC,CAAC,CAAC;IACZ,KAAK,CAAC,CAAC;IACP,CAAC;;ICRM,SAAS,QAAQ,CAAC,KAAK,EAAE;IAChC,IAAI,OAAO,KAAK,IAAI,CAAC;IACrB,UAAU,YAAY,EAAE,OAAO,KAAK,CAAC,EAAE;IACvC,UAAU,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IAChD,YAAY,IAAI,MAAM,GAAG,EAAE,CAAC;IAC5B,YAAY,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IACnF,gBAAgB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnC,gBAAgB,KAAK,GAAG,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;IACxD,aAAa,EAAE,YAAY;IAC3B,gBAAgB,IAAI,GAAG,EAAE,EAAE,CAAC;IAC5B,gBAAgB,IAAI;IACpB,oBAAoB,KAAK,IAAI,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,QAAQ,CAAC,IAAI,EAAE,EAAE;IACxI,wBAAwB,IAAI,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;IACrD,wBAAwB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/C,qBAAqB;IACrB,iBAAiB;IACjB,gBAAgB,OAAO,KAAK,EAAE,EAAE,GAAG,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;IACzD,wBAAwB;IACxB,oBAAoB,IAAI;IACxB,wBAAwB,IAAI,UAAU,IAAI,CAAC,UAAU,CAAC,IAAI,KAAK,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACxG,qBAAqB;IACrB,4BAA4B,EAAE,IAAI,GAAG,EAAE,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE;IACzD,iBAAiB;IACjB,gBAAgB,UAAU,CAAC,QAAQ,EAAE,CAAC;IACtC,aAAa,EAAE,SAAS,EAAE,YAAY;IACtC,gBAAgB,MAAM,GAAG,IAAI,CAAC;IAC9B,aAAa,CAAC,CAAC,CAAC;IAChB,SAAS,CAAC,CAAC;IACX,CAAC;;IC1BM,SAASC,MAAI,CAAC,SAAS,EAAE,YAAY,EAAE;IAC9C,IAAI,IAAI,eAAe,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;IAChD,IAAI,OAAO,UAAU,MAAM,EAAE;IAC7B,QAAQ,OAAO,MAAM,CAAC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,eAAe,GAAG,cAAc,CAAC,YAAY,CAAC,GAAG,YAAY,CAAC,YAAY,EAAE,OAAO,IAAI,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACrO,KAAK,CAAC;IACN,CAAC;;ICRM,SAAS,WAAW,GAAG;IAC9B,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC/E,YAAY,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5D,SAAS,EAAE,YAAY;IACvB,YAAY,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC,CAAC;IAC3D,YAAY,UAAU,CAAC,QAAQ,EAAE,CAAC;IAClC,SAAS,EAAE,UAAU,GAAG,EAAE;IAC1B,YAAY,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3D,YAAY,UAAU,CAAC,QAAQ,EAAE,CAAC;IAClC,SAAS,CAAC,CAAC,CAAC;IACZ,KAAK,CAAC,CAAC;IACP,CAAC;;ICbM,SAAS,GAAG,CAAC,QAAQ,EAAE;IAC9B,IAAI,OAAO,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,QAAQ,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;IACjJ,CAAC;;ACHS,QAAC,OAAO,GAAG,QAAQ;;ICCtB,SAAS,UAAU,CAAC,eAAe,EAAE,cAAc,EAAE,UAAU,EAAE;IACxE,IAAI,IAAI,UAAU,KAAK,KAAK,CAAC,EAAE,EAAE,UAAU,GAAG,QAAQ,CAAC,EAAE;IACzD,IAAI,IAAI,UAAU,CAAC,cAAc,CAAC,EAAE;IACpC,QAAQ,OAAO,QAAQ,CAAC,YAAY,EAAE,OAAO,eAAe,CAAC,EAAE,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC;IAC7F,KAAK;IACL,IAAI,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE;IAC5C,QAAQ,UAAU,GAAG,cAAc,CAAC;IACpC,KAAK;IACL,IAAI,OAAO,QAAQ,CAAC,YAAY,EAAE,OAAO,eAAe,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;IACzE,CAAC;;ICTM,SAAS,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE;IACzD,IAAI,IAAI,UAAU,KAAK,KAAK,CAAC,EAAE,EAAE,UAAU,GAAG,QAAQ,CAAC,EAAE;IACzD,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;IACzB,QAAQ,OAAO,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,KAAK,EAAE,KAAK,EAAE,EAAE,OAAO,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE,EAAE,UAAU,EAAE,UAAU,KAAK,EAAE;IACrJ,YAAY,KAAK,GAAG,KAAK,CAAC;IAC1B,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,KAAK,GAAG,IAAI,EAAE,EAAE,CAAC,CAAC;IACrE,KAAK,CAAC,CAAC;IACP,CAAC;;ICLM,SAASC,OAAK,GAAG;IACxB,IAAI,IAAI,IAAI,GAAG,EAAE,CAAC;IAClB,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,IAAI,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACjC,KAAK;IACL,IAAI,IAAI,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACvC,IAAI,IAAI,UAAU,GAAG,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC/C,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,QAAQ,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC3G,KAAK,CAAC,CAAC;IACP,CAAC;;ICbM,SAAS,SAAS,GAAG;IAC5B,IAAI,IAAI,YAAY,GAAG,EAAE,CAAC;IAC1B,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,YAAY,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACzC,KAAK;IACL,IAAI,OAAOA,OAAK,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,EAAE,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IACxE,CAAC;;ICNM,SAAS,GAAG,CAAC,QAAQ,EAAE;IAC9B,IAAI,OAAO,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,QAAQ,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;IACjJ,CAAC;;ICDM,SAAS,SAAS,CAAC,uBAAuB,EAAE,QAAQ,EAAE;IAC7D,IAAI,IAAI,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC,GAAG,uBAAuB,GAAG,YAAY,EAAE,OAAO,uBAAuB,CAAC,EAAE,CAAC;IACzI,IAAI,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE;IAC9B,QAAQ,OAAO,OAAO,CAAC,QAAQ,EAAE;IACjC,YAAY,SAAS,EAAE,cAAc;IACrC,SAAS,CAAC,CAAC;IACX,KAAK;IACL,IAAI,OAAO,UAAU,MAAM,EAAE,EAAE,OAAO,IAAI,qBAAqB,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC;IAC3F,CAAC;;ICRM,SAAS,qBAAqB,GAAG;IACxC,IAAI,IAAI,OAAO,GAAG,EAAE,CAAC;IACrB,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,OAAO,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACpC,KAAK;IACL,IAAI,IAAI,WAAW,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IAC9C,IAAI,OAAO,UAAU,MAAM,EAAE,EAAE,OAAOC,iBAAU,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAChH,CAAC;AACD,IAAO,IAAIC,mBAAiB,GAAG,qBAAqB,CAAC;;ICT9C,SAAS,QAAQ,GAAG;IAC3B,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,IAAI,CAAC;IACjB,QAAQ,IAAI,OAAO,GAAG,KAAK,CAAC;IAC5B,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC/E,YAAY,IAAI,CAAC,GAAG,IAAI,CAAC;IACzB,YAAY,IAAI,GAAG,KAAK,CAAC;IACzB,YAAY,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IACnD,YAAY,OAAO,GAAG,IAAI,CAAC;IAC3B,SAAS,CAAC,CAAC,CAAC;IACZ,KAAK,CAAC,CAAC;IACP,CAAC;;ICZM,SAAS,KAAK,GAAG;IACxB,IAAI,IAAI,UAAU,GAAG,EAAE,CAAC;IACxB,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,UAAU,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACvC,KAAK;IACL,IAAI,IAAI,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IACnC,IAAI,IAAI,MAAM,KAAK,CAAC,EAAE;IACtB,QAAQ,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;IAC/D,KAAK;IACL,IAAI,OAAO,GAAG,CAAC,UAAU,CAAC,EAAE;IAC5B,QAAQ,IAAI,WAAW,GAAG,CAAC,CAAC;IAC5B,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;IACzC,YAAY,IAAI,CAAC,GAAG,WAAW,KAAK,IAAI,IAAI,WAAW,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IACzG,YAAY,IAAI,OAAO,CAAC,KAAK,WAAW,EAAE;IAC1C,gBAAgB,WAAW,GAAG,CAAC,CAAC;IAChC,aAAa;IACb,iBAAiB;IACjB,gBAAgB,OAAO,SAAS,CAAC;IACjC,aAAa;IACb,SAAS;IACT,QAAQ,OAAO,WAAW,CAAC;IAC3B,KAAK,CAAC,CAAC;IACP,CAAC;;ICpBM,SAAS,OAAO,CAAC,QAAQ,EAAE;IAClC,IAAI,OAAO,QAAQ,GAAG,UAAU,MAAM,EAAE,EAAE,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,UAAU,MAAM,EAAE,EAAE,OAAO,SAAS,CAAC,IAAI,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;IAC/I,CAAC;;ICHM,SAAS,eAAe,CAAC,YAAY,EAAE;IAC9C,IAAI,OAAO,UAAU,MAAM,EAAE;IAC7B,QAAQ,IAAI,OAAO,GAAG,IAAI,eAAe,CAAC,YAAY,CAAC,CAAC;IACxD,QAAQ,OAAO,IAAI,qBAAqB,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,OAAO,CAAC,EAAE,CAAC,CAAC;IAClF,KAAK,CAAC;IACN,CAAC;;ICLM,SAAS,WAAW,GAAG;IAC9B,IAAI,OAAO,UAAU,MAAM,EAAE;IAC7B,QAAQ,IAAI,OAAO,GAAG,IAAI,YAAY,EAAE,CAAC;IACzC,QAAQ,OAAO,IAAI,qBAAqB,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,OAAO,CAAC,EAAE,CAAC,CAAC;IAClF,KAAK,CAAC;IACN,CAAC;;ICJM,SAAS,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,mBAAmB,EAAE,iBAAiB,EAAE;IAC9F,IAAI,IAAI,mBAAmB,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE;IACjE,QAAQ,iBAAiB,GAAG,mBAAmB,CAAC;IAChD,KAAK;IACL,IAAI,IAAI,QAAQ,GAAG,UAAU,CAAC,mBAAmB,CAAC,GAAG,mBAAmB,GAAG,SAAS,CAAC;IACrF,IAAI,OAAO,UAAU,MAAM,EAAE,EAAE,OAAO,SAAS,CAAC,IAAI,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,iBAAiB,CAAC,EAAE,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;IACnI,CAAC;;ICLM,SAAS,QAAQ,GAAG;IAC3B,IAAI,IAAI,YAAY,GAAG,EAAE,CAAC;IAC1B,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,YAAY,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACzC,KAAK;IACL,IAAI,OAAO,CAAC,YAAY,CAAC,MAAM;IAC/B,UAAU,QAAQ;IAClB,UAAU,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IAChD,YAAY,QAAQ,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IAChF,SAAS,CAAC,CAAC;IACX,CAAC;;ICTM,SAAS,MAAM,CAAC,aAAa,EAAE;IACtC,IAAI,IAAI,EAAE,CAAC;IACX,IAAI,IAAI,KAAK,GAAG,QAAQ,CAAC;IACzB,IAAI,IAAI,KAAK,CAAC;IACd,IAAI,IAAI,aAAa,IAAI,IAAI,EAAE;IAC/B,QAAQ,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE;IAC/C,YAAY,CAAC,EAAE,GAAG,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,EAAE,KAAK,KAAK,CAAC,GAAG,QAAQ,GAAG,EAAE,EAAE,KAAK,GAAG,aAAa,CAAC,KAAK,EAAE;IAC3G,SAAS;IACT,aAAa;IACb,YAAY,KAAK,GAAG,aAAa,CAAC;IAClC,SAAS;IACT,KAAK;IACL,IAAI,OAAO,KAAK,IAAI,CAAC;IACrB,UAAU,YAAY,EAAE,OAAO,KAAK,CAAC,EAAE;IACvC,UAAU,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IAChD,YAAY,IAAI,KAAK,GAAG,CAAC,CAAC;IAC1B,YAAY,IAAI,SAAS,CAAC;IAC1B,YAAY,IAAI,WAAW,GAAG,YAAY;IAC1C,gBAAgB,SAAS,KAAK,IAAI,IAAI,SAAS,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC;IAC9F,gBAAgB,SAAS,GAAG,IAAI,CAAC;IACjC,gBAAgB,IAAI,KAAK,IAAI,IAAI,EAAE;IACnC,oBAAoB,IAAI,QAAQ,GAAG,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IACtG,oBAAoB,IAAI,oBAAoB,GAAG,wBAAwB,CAAC,UAAU,EAAE,YAAY;IAChG,wBAAwB,oBAAoB,CAAC,WAAW,EAAE,CAAC;IAC3D,wBAAwB,iBAAiB,EAAE,CAAC;IAC5C,qBAAqB,CAAC,CAAC;IACvB,oBAAoB,QAAQ,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;IAC7D,iBAAiB;IACjB,qBAAqB;IACrB,oBAAoB,iBAAiB,EAAE,CAAC;IACxC,iBAAiB;IACjB,aAAa,CAAC;IACd,YAAY,IAAI,iBAAiB,GAAG,YAAY;IAChD,gBAAgB,IAAI,SAAS,GAAG,KAAK,CAAC;IACtC,gBAAgB,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,YAAY;IACzG,oBAAoB,IAAI,EAAE,KAAK,GAAG,KAAK,EAAE;IACzC,wBAAwB,IAAI,SAAS,EAAE;IACvC,4BAA4B,WAAW,EAAE,CAAC;IAC1C,yBAAyB;IACzB,6BAA6B;IAC7B,4BAA4B,SAAS,GAAG,IAAI,CAAC;IAC7C,yBAAyB;IACzB,qBAAqB;IACrB,yBAAyB;IACzB,wBAAwB,UAAU,CAAC,QAAQ,EAAE,CAAC;IAC9C,qBAAqB;IACrB,iBAAiB,CAAC,CAAC,CAAC;IACpB,gBAAgB,IAAI,SAAS,EAAE;IAC/B,oBAAoB,WAAW,EAAE,CAAC;IAClC,iBAAiB;IACjB,aAAa,CAAC;IACd,YAAY,iBAAiB,EAAE,CAAC;IAChC,SAAS,CAAC,CAAC;IACX,CAAC;;ICtDM,SAAS,UAAU,CAAC,QAAQ,EAAE;IACrC,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,QAAQ,CAAC;IACrB,QAAQ,IAAI,SAAS,GAAG,KAAK,CAAC;IAC9B,QAAQ,IAAI,YAAY,CAAC;IACzB,QAAQ,IAAI,kBAAkB,GAAG,KAAK,CAAC;IACvC,QAAQ,IAAI,cAAc,GAAG,KAAK,CAAC;IACnC,QAAQ,IAAI,aAAa,GAAG,YAAY,EAAE,OAAO,cAAc,IAAI,kBAAkB,KAAK,UAAU,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC;IAC1H,QAAQ,IAAI,oBAAoB,GAAG,YAAY;IAC/C,YAAY,IAAI,CAAC,YAAY,EAAE;IAC/B,gBAAgB,YAAY,GAAG,IAAI,OAAO,EAAE,CAAC;IAC7C,gBAAgB,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,YAAY;IAC7G,oBAAoB,IAAI,QAAQ,EAAE;IAClC,wBAAwB,sBAAsB,EAAE,CAAC;IACjD,qBAAqB;IACrB,yBAAyB;IACzB,wBAAwB,SAAS,GAAG,IAAI,CAAC;IACzC,qBAAqB;IACrB,iBAAiB,EAAE,YAAY;IAC/B,oBAAoB,kBAAkB,GAAG,IAAI,CAAC;IAC9C,oBAAoB,aAAa,EAAE,CAAC;IACpC,iBAAiB,CAAC,CAAC,CAAC;IACpB,aAAa;IACb,YAAY,OAAO,YAAY,CAAC;IAChC,SAAS,CAAC;IACV,QAAQ,IAAI,sBAAsB,GAAG,YAAY;IACjD,YAAY,cAAc,GAAG,KAAK,CAAC;IACnC,YAAY,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,YAAY;IACpG,gBAAgB,cAAc,GAAG,IAAI,CAAC;IACtC,gBAAgB,CAAC,aAAa,EAAE,IAAI,oBAAoB,EAAE,CAAC,IAAI,EAAE,CAAC;IAClE,aAAa,CAAC,CAAC,CAAC;IAChB,YAAY,IAAI,SAAS,EAAE;IAC3B,gBAAgB,QAAQ,CAAC,WAAW,EAAE,CAAC;IACvC,gBAAgB,QAAQ,GAAG,IAAI,CAAC;IAChC,gBAAgB,SAAS,GAAG,KAAK,CAAC;IAClC,gBAAgB,sBAAsB,EAAE,CAAC;IACzC,aAAa;IACb,SAAS,CAAC;IACV,QAAQ,sBAAsB,EAAE,CAAC;IACjC,KAAK,CAAC,CAAC;IACP,CAAC;;ICvCM,SAAS,KAAK,CAAC,aAAa,EAAE;IACrC,IAAI,IAAI,aAAa,KAAK,KAAK,CAAC,EAAE,EAAE,aAAa,GAAG,QAAQ,CAAC,EAAE;IAC/D,IAAI,IAAI,MAAM,CAAC;IACf,IAAI,IAAI,aAAa,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE;IAC5D,QAAQ,MAAM,GAAG,aAAa,CAAC;IAC/B,KAAK;IACL,SAAS;IACT,QAAQ,MAAM,GAAG;IACjB,YAAY,KAAK,EAAE,aAAa;IAChC,SAAS,CAAC;IACV,KAAK;IACL,IAAI,IAAI,EAAE,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,EAAE,KAAK,KAAK,CAAC,GAAG,QAAQ,GAAG,EAAE,EAAE,KAAK,GAAG,MAAM,CAAC,KAAK,EAAE,EAAE,GAAG,MAAM,CAAC,cAAc,EAAE,cAAc,GAAG,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE,CAAC;IAChK,IAAI,OAAO,KAAK,IAAI,CAAC;IACrB,UAAU,QAAQ;IAClB,UAAU,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IAChD,YAAY,IAAI,KAAK,GAAG,CAAC,CAAC;IAC1B,YAAY,IAAI,QAAQ,CAAC;IACzB,YAAY,IAAI,iBAAiB,GAAG,YAAY;IAChD,gBAAgB,IAAI,SAAS,GAAG,KAAK,CAAC;IACtC,gBAAgB,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAClG,oBAAoB,IAAI,cAAc,EAAE;IACxC,wBAAwB,KAAK,GAAG,CAAC,CAAC;IAClC,qBAAqB;IACrB,oBAAoB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3C,iBAAiB,EAAE,SAAS,EAAE,UAAU,GAAG,EAAE;IAC7C,oBAAoB,IAAI,KAAK,EAAE,GAAG,KAAK,EAAE;IACzC,wBAAwB,IAAI,OAAO,GAAG,YAAY;IAClD,4BAA4B,IAAI,QAAQ,EAAE;IAC1C,gCAAgC,QAAQ,CAAC,WAAW,EAAE,CAAC;IACvD,gCAAgC,QAAQ,GAAG,IAAI,CAAC;IAChD,gCAAgC,iBAAiB,EAAE,CAAC;IACpD,6BAA6B;IAC7B,iCAAiC;IACjC,gCAAgC,SAAS,GAAG,IAAI,CAAC;IACjD,6BAA6B;IAC7B,yBAAyB,CAAC;IAC1B,wBAAwB,IAAI,KAAK,IAAI,IAAI,EAAE;IAC3C,4BAA4B,IAAI,QAAQ,GAAG,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;IACnH,4BAA4B,IAAI,oBAAoB,GAAG,wBAAwB,CAAC,UAAU,EAAE,YAAY;IACxG,gCAAgC,oBAAoB,CAAC,WAAW,EAAE,CAAC;IACnE,gCAAgC,OAAO,EAAE,CAAC;IAC1C,6BAA6B,EAAE,YAAY;IAC3C,gCAAgC,UAAU,CAAC,QAAQ,EAAE,CAAC;IACtD,6BAA6B,CAAC,CAAC;IAC/B,4BAA4B,QAAQ,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;IACrE,yBAAyB;IACzB,6BAA6B;IAC7B,4BAA4B,OAAO,EAAE,CAAC;IACtC,yBAAyB;IACzB,qBAAqB;IACrB,yBAAyB;IACzB,wBAAwB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9C,qBAAqB;IACrB,iBAAiB,CAAC,CAAC,CAAC;IACpB,gBAAgB,IAAI,SAAS,EAAE;IAC/B,oBAAoB,QAAQ,CAAC,WAAW,EAAE,CAAC;IAC3C,oBAAoB,QAAQ,GAAG,IAAI,CAAC;IACpC,oBAAoB,iBAAiB,EAAE,CAAC;IACxC,iBAAiB;IACjB,aAAa,CAAC;IACd,YAAY,iBAAiB,EAAE,CAAC;IAChC,SAAS,CAAC,CAAC;IACX,CAAC;;IC/DM,SAAS,SAAS,CAAC,QAAQ,EAAE;IACpC,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,QAAQ,CAAC;IACrB,QAAQ,IAAI,SAAS,GAAG,KAAK,CAAC;IAC9B,QAAQ,IAAI,OAAO,CAAC;IACpB,QAAQ,IAAI,qBAAqB,GAAG,YAAY;IAChD,YAAY,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,GAAG,EAAE;IAClH,gBAAgB,IAAI,CAAC,OAAO,EAAE;IAC9B,oBAAoB,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAC5C,oBAAoB,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,YAAY;IAC5G,wBAAwB,OAAO,QAAQ,GAAG,qBAAqB,EAAE,IAAI,SAAS,GAAG,IAAI,CAAC,CAAC;IACvF,qBAAqB,CAAC,CAAC,CAAC;IACxB,iBAAiB;IACjB,gBAAgB,IAAI,OAAO,EAAE;IAC7B,oBAAoB,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACtC,iBAAiB;IACjB,aAAa,CAAC,CAAC,CAAC;IAChB,YAAY,IAAI,SAAS,EAAE;IAC3B,gBAAgB,QAAQ,CAAC,WAAW,EAAE,CAAC;IACvC,gBAAgB,QAAQ,GAAG,IAAI,CAAC;IAChC,gBAAgB,SAAS,GAAG,KAAK,CAAC;IAClC,gBAAgB,qBAAqB,EAAE,CAAC;IACxC,aAAa;IACb,SAAS,CAAC;IACV,QAAQ,qBAAqB,EAAE,CAAC;IAChC,KAAK,CAAC,CAAC;IACP,CAAC;;IC1BM,SAAS,MAAM,CAAC,QAAQ,EAAE;IACjC,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,QAAQ,GAAG,KAAK,CAAC;IAC7B,QAAQ,IAAI,SAAS,GAAG,IAAI,CAAC;IAC7B,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC/E,YAAY,QAAQ,GAAG,IAAI,CAAC;IAC5B,YAAY,SAAS,GAAG,KAAK,CAAC;IAC9B,SAAS,CAAC,CAAC,CAAC;IACZ,QAAQ,SAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,YAAY;IACvF,YAAY,IAAI,QAAQ,EAAE;IAC1B,gBAAgB,QAAQ,GAAG,KAAK,CAAC;IACjC,gBAAgB,IAAI,KAAK,GAAG,SAAS,CAAC;IACtC,gBAAgB,SAAS,GAAG,IAAI,CAAC;IACjC,gBAAgB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,aAAa;IACb,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;IAClB,KAAK,CAAC,CAAC;IACP,CAAC;;IClBM,SAAS,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE;IAC9C,IAAI,IAAI,SAAS,KAAK,KAAK,CAAC,EAAE,EAAE,SAAS,GAAG,cAAc,CAAC,EAAE;IAC7D,IAAI,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;IAC/C,CAAC;;ICJM,SAAS,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE;IACxC,IAAI,OAAO,OAAO,CAAC,aAAa,CAAC,WAAW,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;IAClF,CAAC;;ICDM,SAAS,aAAa,CAAC,SAAS,EAAE,UAAU,EAAE;IACrD,IAAI,IAAI,UAAU,KAAK,KAAK,CAAC,EAAE,EAAE,UAAU,GAAG,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE;IACpF,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,MAAM,GAAG,WAAW,EAAE,CAAC;IACnC,QAAQ,IAAI,MAAM,GAAG,WAAW,EAAE,CAAC;IACnC,QAAQ,IAAI,IAAI,GAAG,UAAU,OAAO,EAAE;IACtC,YAAY,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrC,YAAY,UAAU,CAAC,QAAQ,EAAE,CAAC;IAClC,SAAS,CAAC;IACV,QAAQ,IAAI,gBAAgB,GAAG,UAAU,SAAS,EAAE,UAAU,EAAE;IAChE,YAAY,IAAI,uBAAuB,GAAG,wBAAwB,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE;IAC5F,gBAAgB,IAAI,MAAM,GAAG,UAAU,CAAC,MAAM,EAAE,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC;IAC/E,gBAAgB,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;IACzC,oBAAoB,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACtE,iBAAiB;IACjB,qBAAqB;IACrB,oBAAoB,CAAC,UAAU,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;IAClE,iBAAiB;IACjB,aAAa,EAAE,YAAY;IAC3B,gBAAgB,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC;IAC1C,gBAAgB,IAAI,QAAQ,GAAG,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/E,gBAAgB,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;IACtD,gBAAgB,uBAAuB,KAAK,IAAI,IAAI,uBAAuB,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,uBAAuB,CAAC,WAAW,EAAE,CAAC;IACxI,aAAa,CAAC,CAAC;IACf,YAAY,OAAO,uBAAuB,CAAC;IAC3C,SAAS,CAAC;IACV,QAAQ,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC3D,QAAQ,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACzE,KAAK,CAAC,CAAC;IACP,CAAC;IACD,SAAS,WAAW,GAAG;IACvB,IAAI,OAAO;IACX,QAAQ,MAAM,EAAE,EAAE;IAClB,QAAQ,QAAQ,EAAE,KAAK;IACvB,KAAK,CAAC;IACN,CAAC;;ICjCM,SAAS,KAAK,CAAC,OAAO,EAAE;IAC/B,IAAI,IAAI,OAAO,KAAK,KAAK,CAAC,EAAE,EAAE,OAAO,GAAG,EAAE,CAAC,EAAE;IAC7C,IAAI,IAAI,EAAE,GAAG,OAAO,CAAC,SAAS,EAAE,SAAS,GAAG,EAAE,KAAK,KAAK,CAAC,GAAG,YAAY,EAAE,OAAO,IAAI,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,YAAY,EAAE,YAAY,GAAG,EAAE,KAAK,KAAK,CAAC,GAAG,IAAI,GAAG,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,eAAe,GAAG,EAAE,KAAK,KAAK,CAAC,GAAG,IAAI,GAAG,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,mBAAmB,EAAE,mBAAmB,GAAG,EAAE,KAAK,KAAK,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;IAC1U,IAAI,OAAO,UAAU,aAAa,EAAE;IACpC,QAAQ,IAAI,UAAU,CAAC;IACvB,QAAQ,IAAI,eAAe,CAAC;IAC5B,QAAQ,IAAI,OAAO,CAAC;IACpB,QAAQ,IAAI,QAAQ,GAAG,CAAC,CAAC;IACzB,QAAQ,IAAI,YAAY,GAAG,KAAK,CAAC;IACjC,QAAQ,IAAI,UAAU,GAAG,KAAK,CAAC;IAC/B,QAAQ,IAAI,WAAW,GAAG,YAAY;IACtC,YAAY,eAAe,KAAK,IAAI,IAAI,eAAe,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,eAAe,CAAC,WAAW,EAAE,CAAC;IAC5G,YAAY,eAAe,GAAG,SAAS,CAAC;IACxC,SAAS,CAAC;IACV,QAAQ,IAAI,KAAK,GAAG,YAAY;IAChC,YAAY,WAAW,EAAE,CAAC;IAC1B,YAAY,UAAU,GAAG,OAAO,GAAG,SAAS,CAAC;IAC7C,YAAY,YAAY,GAAG,UAAU,GAAG,KAAK,CAAC;IAC9C,SAAS,CAAC;IACV,QAAQ,IAAI,mBAAmB,GAAG,YAAY;IAC9C,YAAY,IAAI,IAAI,GAAG,UAAU,CAAC;IAClC,YAAY,KAAK,EAAE,CAAC;IACpB,YAAY,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAC3E,SAAS,CAAC;IACV,QAAQ,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACrD,YAAY,QAAQ,EAAE,CAAC;IACvB,YAAY,IAAI,CAAC,UAAU,IAAI,CAAC,YAAY,EAAE;IAC9C,gBAAgB,WAAW,EAAE,CAAC;IAC9B,aAAa;IACb,YAAY,IAAI,IAAI,IAAI,OAAO,GAAG,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,CAAC,GAAG,OAAO,GAAG,SAAS,EAAE,CAAC,CAAC;IAClG,YAAY,UAAU,CAAC,GAAG,CAAC,YAAY;IACvC,gBAAgB,QAAQ,EAAE,CAAC;IAC3B,gBAAgB,IAAI,QAAQ,KAAK,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,YAAY,EAAE;IACpE,oBAAoB,eAAe,GAAG,WAAW,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,CAAC;IAC5F,iBAAiB;IACjB,aAAa,CAAC,CAAC;IACf,YAAY,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACvC,YAAY,IAAI,CAAC,UAAU;IAC3B,gBAAgB,QAAQ,GAAG,CAAC,EAAE;IAC9B,gBAAgB,UAAU,GAAG,IAAI,cAAc,CAAC;IAChD,oBAAoB,IAAI,EAAE,UAAU,KAAK,EAAE,EAAE,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE;IACvE,oBAAoB,KAAK,EAAE,UAAU,GAAG,EAAE;IAC1C,wBAAwB,UAAU,GAAG,IAAI,CAAC;IAC1C,wBAAwB,WAAW,EAAE,CAAC;IACtC,wBAAwB,eAAe,GAAG,WAAW,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,CAAC,CAAC;IAChF,wBAAwB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACxC,qBAAqB;IACrB,oBAAoB,QAAQ,EAAE,YAAY;IAC1C,wBAAwB,YAAY,GAAG,IAAI,CAAC;IAC5C,wBAAwB,WAAW,EAAE,CAAC;IACtC,wBAAwB,eAAe,GAAG,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;IAC9E,wBAAwB,IAAI,CAAC,QAAQ,EAAE,CAAC;IACxC,qBAAqB;IACrB,iBAAiB,CAAC,CAAC;IACnB,gBAAgB,SAAS,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACxD,aAAa;IACb,SAAS,CAAC,CAAC,aAAa,CAAC,CAAC;IAC1B,KAAK,CAAC;IACN,CAAC;IACD,SAAS,WAAW,CAAC,KAAK,EAAE,EAAE,EAAE;IAChC,IAAI,IAAI,IAAI,GAAG,EAAE,CAAC;IAClB,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACrC,KAAK;IACL,IAAI,IAAI,EAAE,KAAK,IAAI,EAAE;IACrB,QAAQ,KAAK,EAAE,CAAC;IAChB,QAAQ,OAAO;IACf,KAAK;IACL,IAAI,IAAI,EAAE,KAAK,KAAK,EAAE;IACtB,QAAQ,OAAO;IACf,KAAK;IACL,IAAI,IAAI,YAAY,GAAG,IAAI,cAAc,CAAC;IAC1C,QAAQ,IAAI,EAAE,YAAY;IAC1B,YAAY,YAAY,CAAC,WAAW,EAAE,CAAC;IACvC,YAAY,KAAK,EAAE,CAAC;IACpB,SAAS;IACT,KAAK,CAAC,CAAC;IACP,IAAI,OAAO,SAAS,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;IAChG,CAAC;;ICjFM,SAAS,WAAW,CAAC,kBAAkB,EAAE,UAAU,EAAE,SAAS,EAAE;IACvE,IAAI,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;IACnB,IAAI,IAAI,UAAU,CAAC;IACnB,IAAI,IAAI,QAAQ,GAAG,KAAK,CAAC;IACzB,IAAI,IAAI,kBAAkB,IAAI,OAAO,kBAAkB,KAAK,QAAQ,EAAE;IACtE,QAAQ,CAAC,EAAE,GAAG,kBAAkB,CAAC,UAAU,EAAE,UAAU,GAAG,EAAE,KAAK,KAAK,CAAC,GAAG,QAAQ,GAAG,EAAE,EAAE,EAAE,GAAG,kBAAkB,CAAC,UAAU,EAAE,UAAU,GAAG,EAAE,KAAK,KAAK,CAAC,GAAG,QAAQ,GAAG,EAAE,EAAE,EAAE,GAAG,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE,EAAE,SAAS,GAAG,kBAAkB,CAAC,SAAS,EAAE;IAC5R,KAAK;IACL,SAAS;IACT,QAAQ,UAAU,IAAI,kBAAkB,KAAK,IAAI,IAAI,kBAAkB,KAAK,KAAK,CAAC,GAAG,kBAAkB,GAAG,QAAQ,CAAC,CAAC;IACpH,KAAK;IACL,IAAI,OAAO,KAAK,CAAC;IACjB,QAAQ,SAAS,EAAE,YAAY,EAAE,OAAO,IAAI,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,EAAE;IAC/F,QAAQ,YAAY,EAAE,IAAI;IAC1B,QAAQ,eAAe,EAAE,KAAK;IAC9B,QAAQ,mBAAmB,EAAE,QAAQ;IACrC,KAAK,CAAC,CAAC;IACP,CAAC;;ICbM,SAAS,MAAM,CAAC,SAAS,EAAE;IAClC,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,QAAQ,GAAG,KAAK,CAAC;IAC7B,QAAQ,IAAI,WAAW,CAAC;IACxB,QAAQ,IAAI,SAAS,GAAG,KAAK,CAAC;IAC9B,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC;IACtB,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC/E,YAAY,SAAS,GAAG,IAAI,CAAC;IAC7B,YAAY,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,EAAE;IACjE,gBAAgB,QAAQ,IAAI,UAAU,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,0BAA0B,CAAC,CAAC,CAAC;IAC5F,gBAAgB,QAAQ,GAAG,IAAI,CAAC;IAChC,gBAAgB,WAAW,GAAG,KAAK,CAAC;IACpC,aAAa;IACb,SAAS,EAAE,YAAY;IACvB,YAAY,IAAI,QAAQ,EAAE;IAC1B,gBAAgB,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC7C,gBAAgB,UAAU,CAAC,QAAQ,EAAE,CAAC;IACtC,aAAa;IACb,iBAAiB;IACjB,gBAAgB,UAAU,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,aAAa,CAAC,oBAAoB,CAAC,GAAG,IAAI,UAAU,EAAE,CAAC,CAAC;IACzG,aAAa;IACb,SAAS,CAAC,CAAC,CAAC;IACZ,KAAK,CAAC,CAAC;IACP,CAAC;;IC3BM,SAAS,IAAI,CAAC,KAAK,EAAE;IAC5B,IAAI,OAAO,MAAM,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,KAAK,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC;IAClE,CAAC;;ICAM,SAAS,QAAQ,CAAC,SAAS,EAAE;IACpC,IAAI,OAAO,SAAS,IAAI,CAAC;IACzB;IACA,YAAY,QAAQ;IACpB,UAAU,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IAChD,YAAY,IAAI,IAAI,GAAG,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC;IAC5C,YAAY,IAAI,IAAI,GAAG,CAAC,CAAC;IACzB,YAAY,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IACnF,gBAAgB,IAAI,UAAU,GAAG,IAAI,EAAE,CAAC;IACxC,gBAAgB,IAAI,UAAU,GAAG,SAAS,EAAE;IAC5C,oBAAoB,IAAI,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC;IAC7C,iBAAiB;IACjB,qBAAqB;IACrB,oBAAoB,IAAI,KAAK,GAAG,UAAU,GAAG,SAAS,CAAC;IACvD,oBAAoB,IAAI,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/C,oBAAoB,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;IACxC,oBAAoB,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC9C,iBAAiB;IACjB,aAAa,CAAC,CAAC,CAAC;IAChB,YAAY,OAAO,YAAY;IAC/B,gBAAgB,IAAI,GAAG,IAAI,CAAC;IAC5B,aAAa,CAAC;IACd,SAAS,CAAC,CAAC;IACX,CAAC;;ICtBM,SAAS,SAAS,CAAC,QAAQ,EAAE;IACpC,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,MAAM,GAAG,KAAK,CAAC;IAC3B,QAAQ,IAAI,cAAc,GAAG,wBAAwB,CAAC,UAAU,EAAE,YAAY;IAC9E,YAAY,cAAc,KAAK,IAAI,IAAI,cAAc,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,cAAc,CAAC,WAAW,EAAE,CAAC;IACzG,YAAY,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,IAAI,CAAC,CAAC;IACjB,QAAQ,SAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IACtD,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE,EAAE,OAAO,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9H,KAAK,CAAC,CAAC;IACP,CAAC;;ICZM,SAAS,SAAS,CAAC,SAAS,EAAE;IACrC,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,MAAM,GAAG,KAAK,CAAC;IAC3B,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC;IACtB,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE,EAAE,OAAO,CAAC,MAAM,KAAK,MAAM,GAAG,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACzK,KAAK,CAAC,CAAC;IACP,CAAC;;ICLM,SAAS,SAAS,GAAG;IAC5B,IAAI,IAAI,MAAM,GAAG,EAAE,CAAC;IACpB,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,MAAM,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACnC,KAAK;IACL,IAAI,IAAI,SAAS,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IACzC,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IACvG,KAAK,CAAC,CAAC;IACP,CAAC;;ICTM,SAAS,SAAS,CAAC,OAAO,EAAE,cAAc,EAAE;IACnD,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,eAAe,GAAG,IAAI,CAAC;IACnC,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC;IACtB,QAAQ,IAAI,UAAU,GAAG,KAAK,CAAC;IAC/B,QAAQ,IAAI,aAAa,GAAG,YAAY,EAAE,OAAO,UAAU,IAAI,CAAC,eAAe,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC;IAC5G,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC/E,YAAY,eAAe,KAAK,IAAI,IAAI,eAAe,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,eAAe,CAAC,WAAW,EAAE,CAAC;IAC5G,YAAY,IAAI,UAAU,GAAG,CAAC,CAAC;IAC/B,YAAY,IAAI,UAAU,GAAG,KAAK,EAAE,CAAC;IACrC,YAAY,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,SAAS,EAAE,eAAe,GAAG,wBAAwB,CAAC,UAAU,EAAE,UAAU,UAAU,EAAE,EAAE,OAAO,UAAU,CAAC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,EAAE,EAAE,YAAY;IAC9Q,gBAAgB,eAAe,GAAG,IAAI,CAAC;IACvC,gBAAgB,aAAa,EAAE,CAAC;IAChC,aAAa,CAAC,EAAE,CAAC;IACjB,SAAS,EAAE,YAAY;IACvB,YAAY,UAAU,GAAG,IAAI,CAAC;IAC9B,YAAY,aAAa,EAAE,CAAC;IAC5B,SAAS,CAAC,CAAC,CAAC;IACZ,KAAK,CAAC,CAAC;IACP,CAAC;;ICpBM,SAAS,SAAS,GAAG;IAC5B,IAAI,OAAO,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC;;ICFM,SAAS,WAAW,CAAC,eAAe,EAAE,cAAc,EAAE;IAC7D,IAAI,OAAO,UAAU,CAAC,cAAc,CAAC,GAAG,SAAS,CAAC,YAAY,EAAE,OAAO,eAAe,CAAC,EAAE,EAAE,cAAc,CAAC,GAAG,SAAS,CAAC,YAAY,EAAE,OAAO,eAAe,CAAC,EAAE,CAAC,CAAC;IAChK,CAAC;;ICFM,SAAS,UAAU,CAAC,WAAW,EAAE,IAAI,EAAE;IAC9C,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;IACzB,QAAQ,SAAS,CAAC,UAAU,KAAK,EAAE,KAAK,EAAE,EAAE,OAAO,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE,EAAE,UAAU,CAAC,EAAE,UAAU,EAAE,EAAE,QAAQ,CAAC,KAAK,GAAG,UAAU,GAAG,UAAU,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC/L,QAAQ,OAAO,YAAY;IAC3B,YAAY,KAAK,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC;IACV,KAAK,CAAC,CAAC;IACP,CAAC;;ICNM,SAAS,SAAS,CAAC,QAAQ,EAAE;IACpC,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,SAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,YAAY,EAAE,OAAO,UAAU,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;IACjI,QAAQ,CAAC,UAAU,CAAC,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC3D,KAAK,CAAC,CAAC;IACP,CAAC;;ICPM,SAAS,SAAS,CAAC,SAAS,EAAE,SAAS,EAAE;IAChD,IAAI,IAAI,SAAS,KAAK,KAAK,CAAC,EAAE,EAAE,SAAS,GAAG,KAAK,CAAC,EAAE;IACpD,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC;IACtB,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC/E,YAAY,IAAI,MAAM,GAAG,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IACnD,YAAY,CAAC,MAAM,IAAI,SAAS,KAAK,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC5D,YAAY,CAAC,MAAM,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;IAC7C,SAAS,CAAC,CAAC,CAAC;IACZ,KAAK,CAAC,CAAC;IACP,CAAC;;ICRM,SAAS,GAAG,CAAC,cAAc,EAAE,KAAK,EAAE,QAAQ,EAAE;IACrD,IAAI,IAAI,WAAW,GAAG,UAAU,CAAC,cAAc,CAAC,IAAI,KAAK,IAAI,QAAQ;IACrE;IACA,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE;IACtE,UAAU,cAAc,CAAC;IACzB,IAAI,OAAO,WAAW;IACtB,UAAU,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IAChD,YAAY,IAAI,EAAE,CAAC;IACnB,YAAY,CAAC,EAAE,GAAG,WAAW,CAAC,SAAS,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACnG,YAAY,IAAI,OAAO,GAAG,IAAI,CAAC;IAC/B,YAAY,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IACnF,gBAAgB,IAAI,EAAE,CAAC;IACvB,gBAAgB,CAAC,EAAE,GAAG,WAAW,CAAC,IAAI,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IACzG,gBAAgB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,aAAa,EAAE,YAAY;IAC3B,gBAAgB,IAAI,EAAE,CAAC;IACvB,gBAAgB,OAAO,GAAG,KAAK,CAAC;IAChC,gBAAgB,CAAC,EAAE,GAAG,WAAW,CAAC,QAAQ,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACtG,gBAAgB,UAAU,CAAC,QAAQ,EAAE,CAAC;IACtC,aAAa,EAAE,UAAU,GAAG,EAAE;IAC9B,gBAAgB,IAAI,EAAE,CAAC;IACvB,gBAAgB,OAAO,GAAG,KAAK,CAAC;IAChC,gBAAgB,CAAC,EAAE,GAAG,WAAW,CAAC,KAAK,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;IACxG,gBAAgB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACtC,aAAa,EAAE,YAAY;IAC3B,gBAAgB,IAAI,EAAE,EAAE,EAAE,CAAC;IAC3B,gBAAgB,IAAI,OAAO,EAAE;IAC7B,oBAAoB,CAAC,EAAE,GAAG,WAAW,CAAC,WAAW,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC7G,iBAAiB;IACjB,gBAAgB,CAAC,EAAE,GAAG,WAAW,CAAC,QAAQ,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACtG,aAAa,CAAC,CAAC,CAAC;IAChB,SAAS,CAAC;IACV;IACA,YAAY,QAAQ,CAAC;IACrB,CAAC;;ICnCM,SAAS,QAAQ,CAAC,gBAAgB,EAAE,MAAM,EAAE;IACnD,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,EAAE,GAAG,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,KAAK,CAAC,GAAG,MAAM,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,EAAE,KAAK,KAAK,CAAC,GAAG,IAAI,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,QAAQ,GAAG,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE,CAAC;IACnL,QAAQ,IAAI,QAAQ,GAAG,KAAK,CAAC;IAC7B,QAAQ,IAAI,SAAS,GAAG,IAAI,CAAC;IAC7B,QAAQ,IAAI,SAAS,GAAG,IAAI,CAAC;IAC7B,QAAQ,IAAI,UAAU,GAAG,KAAK,CAAC;IAC/B,QAAQ,IAAI,aAAa,GAAG,YAAY;IACxC,YAAY,SAAS,KAAK,IAAI,IAAI,SAAS,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC;IAC1F,YAAY,SAAS,GAAG,IAAI,CAAC;IAC7B,YAAY,IAAI,QAAQ,EAAE;IAC1B,gBAAgB,IAAI,EAAE,CAAC;IACvB,gBAAgB,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;IACpD,aAAa;IACb,SAAS,CAAC;IACV,QAAQ,IAAI,iBAAiB,GAAG,YAAY;IAC5C,YAAY,SAAS,GAAG,IAAI,CAAC;IAC7B,YAAY,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;IAChD,SAAS,CAAC;IACV,QAAQ,IAAI,aAAa,GAAG,UAAU,KAAK,EAAE;IAC7C,YAAY,QAAQ,SAAS,GAAG,SAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,aAAa,EAAE,iBAAiB,CAAC,CAAC,EAAE;IACtJ,SAAS,CAAC;IACV,QAAQ,IAAI,IAAI,GAAG,YAAY;IAC/B,YAAY,IAAI,QAAQ,EAAE;IAC1B,gBAAgB,QAAQ,GAAG,KAAK,CAAC;IACjC,gBAAgB,IAAI,KAAK,GAAG,SAAS,CAAC;IACtC,gBAAgB,SAAS,GAAG,IAAI,CAAC;IACjC,gBAAgB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvC,gBAAgB,CAAC,UAAU,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC;IACpD,aAAa;IACb,SAAS,CAAC;IACV,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC/E,YAAY,QAAQ,GAAG,IAAI,CAAC;IAC5B,YAAY,SAAS,GAAG,KAAK,CAAC;IAC9B,YAAY,EAAE,SAAS,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,OAAO,GAAG,IAAI,EAAE,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;IAC3F,SAAS,EAAE,YAAY;IACvB,YAAY,UAAU,GAAG,IAAI,CAAC;IAC9B,YAAY,EAAE,QAAQ,IAAI,QAAQ,IAAI,SAAS,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;IAC/F,SAAS,CAAC,CAAC,CAAC;IACZ,KAAK,CAAC,CAAC;IACP,CAAC;;ICxCM,SAAS,YAAY,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE;IAC1D,IAAI,IAAI,SAAS,KAAK,KAAK,CAAC,EAAE,EAAE,SAAS,GAAG,cAAc,CAAC,EAAE;IAC7D,IAAI,IAAI,SAAS,GAAG,KAAK,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC/C,IAAI,OAAO,QAAQ,CAAC,YAAY,EAAE,OAAO,SAAS,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IAC/D,CAAC;;ICJM,SAAS,YAAY,CAAC,SAAS,EAAE;IACxC,IAAI,IAAI,SAAS,KAAK,KAAK,CAAC,EAAE,EAAE,SAAS,GAAG,cAAc,CAAC,EAAE;IAC7D,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,IAAI,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;IACnC,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC/E,YAAY,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;IACtC,YAAY,IAAI,QAAQ,GAAG,GAAG,GAAG,IAAI,CAAC;IACtC,YAAY,IAAI,GAAG,GAAG,CAAC;IACvB,YAAY,UAAU,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC/D,SAAS,CAAC,CAAC,CAAC;IACZ,KAAK,CAAC,CAAC;IACP,CAAC;IACD,IAAI,YAAY,IAAI,YAAY;IAChC,IAAI,SAAS,YAAY,CAAC,KAAK,EAAE,QAAQ,EAAE;IAC3C,QAAQ,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IAC3B,QAAQ,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACjC,KAAK;IACL,IAAI,OAAO,YAAY,CAAC;IACxB,CAAC,EAAE,CAAC,CAAC;;IClBE,SAAS,WAAW,CAAC,GAAG,EAAE,cAAc,EAAE,SAAS,EAAE;IAC5D,IAAI,IAAI,KAAK,CAAC;IACd,IAAI,IAAI,IAAI,CAAC;IACb,IAAI,IAAI,KAAK,CAAC;IACd,IAAI,SAAS,GAAG,SAAS,KAAK,IAAI,IAAI,SAAS,KAAK,KAAK,CAAC,GAAG,SAAS,GAAG,KAAK,CAAC;IAC/E,IAAI,IAAI,WAAW,CAAC,GAAG,CAAC,EAAE;IAC1B,QAAQ,KAAK,GAAG,GAAG,CAAC;IACpB,KAAK;IACL,SAAS,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;IACtC,QAAQ,IAAI,GAAG,GAAG,CAAC;IACnB,KAAK;IACL,IAAI,IAAI,cAAc,EAAE;IACxB,QAAQ,KAAK,GAAG,YAAY,EAAE,OAAO,cAAc,CAAC,EAAE,CAAC;IACvD,KAAK;IACL,SAAS;IACT,QAAQ,MAAM,IAAI,SAAS,CAAC,qCAAqC,CAAC,CAAC;IACnE,KAAK;IACL,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE;IACvC,QAAQ,MAAM,IAAI,SAAS,CAAC,sBAAsB,CAAC,CAAC;IACpD,KAAK;IACL,IAAI,OAAO,OAAO,CAAC;IACnB,QAAQ,KAAK,EAAE,KAAK;IACpB,QAAQ,IAAI,EAAE,IAAI;IAClB,QAAQ,SAAS,EAAE,SAAS;IAC5B,QAAQ,IAAI,EAAE,KAAK;IACnB,KAAK,CAAC,CAAC;IACP,CAAC;;IC3BM,SAAS,SAAS,CAAC,iBAAiB,EAAE;IAC7C,IAAI,IAAI,iBAAiB,KAAK,KAAK,CAAC,EAAE,EAAE,iBAAiB,GAAG,qBAAqB,CAAC,EAAE;IACpF,IAAI,OAAO,GAAG,CAAC,UAAU,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,iBAAiB,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACpG,CAAC;;ICAM,SAAS,MAAM,CAAC,gBAAgB,EAAE;IACzC,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,aAAa,GAAG,IAAI,OAAO,EAAE,CAAC;IAC1C,QAAQ,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC,CAAC;IACtD,QAAQ,IAAI,YAAY,GAAG,UAAU,GAAG,EAAE;IAC1C,YAAY,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACrC,YAAY,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClC,SAAS,CAAC;IACV,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE,EAAE,OAAO,aAAa,KAAK,IAAI,IAAI,aAAa,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,YAAY;IAChM,YAAY,aAAa,CAAC,QAAQ,EAAE,CAAC;IACrC,YAAY,UAAU,CAAC,QAAQ,EAAE,CAAC;IAClC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC;IAC1B,QAAQ,SAAS,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,YAAY;IAC/F,YAAY,aAAa,CAAC,QAAQ,EAAE,CAAC;IACrC,YAAY,UAAU,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,OAAO,EAAE,EAAE,CAAC;IAC7D,SAAS,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC;IAChC,QAAQ,OAAO,YAAY;IAC3B,YAAY,aAAa,KAAK,IAAI,IAAI,aAAa,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC,WAAW,EAAE,CAAC;IACtG,YAAY,aAAa,GAAG,IAAI,CAAC;IACjC,SAAS,CAAC;IACV,KAAK,CAAC,CAAC;IACP,CAAC;;ICtBM,SAAS,WAAW,CAAC,UAAU,EAAE,gBAAgB,EAAE;IAC1D,IAAI,IAAI,gBAAgB,KAAK,KAAK,CAAC,EAAE,EAAE,gBAAgB,GAAG,CAAC,CAAC,EAAE;IAC9D,IAAI,IAAI,UAAU,GAAG,gBAAgB,GAAG,CAAC,GAAG,gBAAgB,GAAG,UAAU,CAAC;IAC1E,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,OAAO,GAAG,CAAC,IAAI,OAAO,EAAE,CAAC,CAAC;AACtC,IACA,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC;IACtB,QAAQ,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC;IACnD,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC/E,YAAY,IAAI,GAAG,EAAE,EAAE,CAAC;IACxB,YAAY,IAAI;IAChB,gBAAgB,KAAK,IAAI,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,WAAW,GAAG,SAAS,CAAC,IAAI,EAAE,EAAE;IAC3I,oBAAoB,IAAI,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC;IACrD,oBAAoB,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACzC,iBAAiB;IACjB,aAAa;IACb,YAAY,OAAO,KAAK,EAAE,EAAE,GAAG,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;IACrD,oBAAoB;IACpB,gBAAgB,IAAI;IACpB,oBAAoB,IAAI,WAAW,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,EAAE,GAAG,SAAS,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACxG,iBAAiB;IACjB,wBAAwB,EAAE,IAAI,GAAG,EAAE,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE;IACrD,aAAa;IACb,YAAY,IAAI,CAAC,GAAG,KAAK,GAAG,UAAU,GAAG,CAAC,CAAC;IAC3C,YAAY,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,UAAU,KAAK,CAAC,EAAE;IAChD,gBAAgB,OAAO,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC;IAC3C,aAAa;IACb,YAAY,IAAI,EAAE,KAAK,GAAG,UAAU,KAAK,CAAC,EAAE;IAC5C,gBAAgB,IAAI,QAAQ,GAAG,IAAI,OAAO,EAAE,CAAC;IAC7C,gBAAgB,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvC,gBAAgB,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC;IACzD,aAAa;IACb,SAAS,EAAE,YAAY;IACvB,YAAY,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;IACvC,gBAAgB,OAAO,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC;IAC3C,aAAa;IACb,YAAY,UAAU,CAAC,QAAQ,EAAE,CAAC;IAClC,SAAS,EAAE,UAAU,GAAG,EAAE;IAC1B,YAAY,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;IACvC,gBAAgB,OAAO,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3C,aAAa;IACb,YAAY,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClC,SAAS,EAAE,YAAY;AACvB,IACA,YAAY,OAAO,GAAG,IAAI,CAAC;IAC3B,SAAS,CAAC,CAAC,CAAC;IACZ,KAAK,CAAC,CAAC;IACP,CAAC;;IC3CM,SAAS,UAAU,CAAC,cAAc,EAAE;IAC3C,IAAI,IAAI,EAAE,EAAE,EAAE,CAAC;IACf,IAAI,IAAI,SAAS,GAAG,EAAE,CAAC;IACvB,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,SAAS,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IAC1C,KAAK;IACL,IAAI,IAAI,SAAS,GAAG,CAAC,EAAE,GAAG,YAAY,CAAC,SAAS,CAAC,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,EAAE,GAAG,cAAc,CAAC;IACnG,IAAI,IAAI,sBAAsB,GAAG,CAAC,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;IAC3F,IAAI,IAAI,aAAa,GAAG,SAAS,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC;IACjD,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,aAAa,GAAG,EAAE,CAAC;IAC/B,QAAQ,IAAI,cAAc,GAAG,KAAK,CAAC;IACnC,QAAQ,IAAI,WAAW,GAAG,UAAU,MAAM,EAAE;IAC5C,YAAY,IAAI,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;IAC3D,YAAY,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC9B,YAAY,IAAI,CAAC,WAAW,EAAE,CAAC;IAC/B,YAAY,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IAC7C,YAAY,cAAc,IAAI,WAAW,EAAE,CAAC;IAC5C,SAAS,CAAC;IACV,QAAQ,IAAI,WAAW,GAAG,YAAY;IACtC,YAAY,IAAI,aAAa,EAAE;IAC/B,gBAAgB,IAAI,IAAI,GAAG,IAAI,YAAY,EAAE,CAAC;IAC9C,gBAAgB,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACrC,gBAAgB,IAAI,QAAQ,GAAG,IAAI,OAAO,EAAE,CAAC;IAC7C,gBAAgB,IAAI,QAAQ,GAAG;IAC/B,oBAAoB,MAAM,EAAE,QAAQ;IACpC,oBAAoB,IAAI,EAAE,IAAI;IAC9B,oBAAoB,IAAI,EAAE,CAAC;IAC3B,iBAAiB,CAAC;IAClB,gBAAgB,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC7C,gBAAgB,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC;IACzD,gBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,WAAW,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC;IAChH,aAAa;IACb,SAAS,CAAC;IACV,QAAQ,IAAI,sBAAsB,KAAK,IAAI,IAAI,sBAAsB,IAAI,CAAC,EAAE;IAC5E,YAAY,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,sBAAsB,EAAE,IAAI,CAAC,CAAC;IAC9F,SAAS;IACT,aAAa;IACb,YAAY,cAAc,GAAG,IAAI,CAAC;IAClC,SAAS;IACT,QAAQ,WAAW,EAAE,CAAC;IACtB,QAAQ,IAAI,IAAI,GAAG,UAAU,EAAE,EAAE,EAAE,OAAO,aAAa,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;IAC/E,QAAQ,IAAI,SAAS,GAAG,UAAU,EAAE,EAAE;IACtC,YAAY,IAAI,CAAC,UAAU,EAAE,EAAE;IAC/B,gBAAgB,IAAI,MAAM,GAAG,EAAE,CAAC,MAAM,CAAC;IACvC,gBAAgB,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;IAClC,aAAa,CAAC,CAAC;IACf,YAAY,EAAE,CAAC,UAAU,CAAC,CAAC;IAC3B,YAAY,UAAU,CAAC,WAAW,EAAE,CAAC;IACrC,SAAS,CAAC;IACV,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC/E,YAAY,IAAI,CAAC,UAAU,MAAM,EAAE;IACnC,gBAAgB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1C,gBAAgB,aAAa,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;IACtE,aAAa,CAAC,CAAC;IACf,SAAS,EAAE,YAAY,EAAE,OAAO,SAAS,CAAC,UAAU,QAAQ,EAAE,EAAE,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,UAAU,GAAG,EAAE,EAAE,OAAO,SAAS,CAAC,UAAU,QAAQ,EAAE,EAAE,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/L,QAAQ,OAAO,YAAY;IAC3B,YAAY,aAAa,GAAG,IAAI,CAAC;IACjC,SAAS,CAAC;IACV,KAAK,CAAC,CAAC;IACP,CAAC;;IC5DM,SAAS,YAAY,CAAC,QAAQ,EAAE,eAAe,EAAE;IACxD,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,OAAO,GAAG,EAAE,CAAC;IACzB,QAAQ,IAAI,WAAW,GAAG,UAAU,GAAG,EAAE;IACzC,YAAY,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE;IACvC,gBAAgB,OAAO,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3C,aAAa;IACb,YAAY,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClC,SAAS,CAAC;IACV,QAAQ,SAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,SAAS,EAAE;IAChG,YAAY,IAAI,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;IACvC,YAAY,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACjC,YAAY,IAAI,mBAAmB,GAAG,IAAI,YAAY,EAAE,CAAC;IACzD,YAAY,IAAI,WAAW,GAAG,YAAY;IAC1C,gBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC3C,gBAAgB,MAAM,CAAC,QAAQ,EAAE,CAAC;IAClC,gBAAgB,mBAAmB,CAAC,WAAW,EAAE,CAAC;IAClD,aAAa,CAAC;IACd,YAAY,IAAI,eAAe,CAAC;IAChC,YAAY,IAAI;IAChB,gBAAgB,eAAe,GAAG,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC;IACxE,aAAa;IACb,YAAY,OAAO,GAAG,EAAE;IACxB,gBAAgB,WAAW,CAAC,GAAG,CAAC,CAAC;IACjC,gBAAgB,OAAO;IACvB,aAAa;IACb,YAAY,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IACnD,YAAY,mBAAmB,CAAC,GAAG,CAAC,eAAe,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IACrI,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;IAClB,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC/E,YAAY,IAAI,GAAG,EAAE,EAAE,CAAC;IACxB,YAAY,IAAI,WAAW,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAC9C,YAAY,IAAI;IAChB,gBAAgB,KAAK,IAAI,aAAa,GAAG,QAAQ,CAAC,WAAW,CAAC,EAAE,eAAe,GAAG,aAAa,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,eAAe,GAAG,aAAa,CAAC,IAAI,EAAE,EAAE;IACvK,oBAAoB,IAAI,QAAQ,GAAG,eAAe,CAAC,KAAK,CAAC;IACzD,oBAAoB,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACzC,iBAAiB;IACjB,aAAa;IACb,YAAY,OAAO,KAAK,EAAE,EAAE,GAAG,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;IACrD,oBAAoB;IACpB,gBAAgB,IAAI;IACpB,oBAAoB,IAAI,eAAe,IAAI,CAAC,eAAe,CAAC,IAAI,KAAK,EAAE,GAAG,aAAa,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACxH,iBAAiB;IACjB,wBAAwB,EAAE,IAAI,GAAG,EAAE,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE;IACrD,aAAa;IACb,SAAS,EAAE,YAAY;IACvB,YAAY,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE;IACvC,gBAAgB,OAAO,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC;IAC3C,aAAa;IACb,YAAY,UAAU,CAAC,QAAQ,EAAE,CAAC;IAClC,SAAS,EAAE,WAAW,EAAE,YAAY;IACpC,YAAY,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE;IACvC,gBAAgB,OAAO,CAAC,KAAK,EAAE,CAAC,WAAW,EAAE,CAAC;IAC9C,aAAa;IACb,SAAS,CAAC,CAAC,CAAC;IACZ,KAAK,CAAC,CAAC;IACP,CAAC;;IC5DM,SAAS,UAAU,CAAC,eAAe,EAAE;IAC5C,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,MAAM,CAAC;IACnB,QAAQ,IAAI,iBAAiB,CAAC;IAC9B,QAAQ,IAAI,WAAW,GAAG,UAAU,GAAG,EAAE;IACzC,YAAY,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9B,YAAY,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClC,SAAS,CAAC;IACV,QAAQ,IAAI,UAAU,GAAG,YAAY;IACrC,YAAY,iBAAiB,KAAK,IAAI,IAAI,iBAAiB,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,iBAAiB,CAAC,WAAW,EAAE,CAAC;IAClH,YAAY,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC9E,YAAY,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;IACnC,YAAY,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IACnD,YAAY,IAAI,eAAe,CAAC;IAChC,YAAY,IAAI;IAChB,gBAAgB,eAAe,GAAG,SAAS,CAAC,eAAe,EAAE,CAAC,CAAC;IAC/D,aAAa;IACb,YAAY,OAAO,GAAG,EAAE;IACxB,gBAAgB,WAAW,CAAC,GAAG,CAAC,CAAC;IACjC,gBAAgB,OAAO;IACvB,aAAa;IACb,YAAY,eAAe,CAAC,SAAS,EAAE,iBAAiB,GAAG,wBAAwB,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,CAAC,EAAE,CAAC;IACvI,SAAS,CAAC;IACV,QAAQ,UAAU,EAAE,CAAC;IACrB,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE,EAAE,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,YAAY;IAC3H,YAAY,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC9B,YAAY,UAAU,CAAC,QAAQ,EAAE,CAAC;IAClC,SAAS,EAAE,WAAW,EAAE,YAAY;IACpC,YAAY,iBAAiB,KAAK,IAAI,IAAI,iBAAiB,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,iBAAiB,CAAC,WAAW,EAAE,CAAC;IAClH,YAAY,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,CAAC,CAAC;IACZ,KAAK,CAAC,CAAC;IACP,CAAC;;IC7BM,SAAS,cAAc,GAAG;IACjC,IAAI,IAAI,MAAM,GAAG,EAAE,CAAC;IACpB,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,MAAM,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACnC,KAAK;IACL,IAAI,IAAI,OAAO,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAC5C,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQ,IAAI,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;IAChC,QAAQ,IAAI,WAAW,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;IACzC,QAAQ,IAAI,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,KAAK,CAAC,EAAE,CAAC,CAAC;IACjE,QAAQ,IAAI,KAAK,GAAG,KAAK,CAAC;IAC1B,QAAQ,IAAI,OAAO,GAAG,UAAU,CAAC,EAAE;IACnC,YAAY,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IACjG,gBAAgB,WAAW,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IACvC,gBAAgB,IAAI,CAAC,KAAK,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;IAC5C,oBAAoB,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IACvC,oBAAoB,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC;IAC5E,iBAAiB;IACjB,aAAa,EAAE,IAAI,CAAC,CAAC,CAAC;IACtB,SAAS,CAAC;IACV,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;IACtC,YAAY,OAAO,CAAC,CAAC,CAAC,CAAC;IACvB,SAAS;IACT,QAAQ,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE;IAC/E,YAAY,IAAI,KAAK,EAAE;IACvB,gBAAgB,IAAI,MAAM,GAAG,aAAa,CAAC,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;IACzE,gBAAgB,UAAU,CAAC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;IAC7G,aAAa;IACb,SAAS,CAAC,CAAC,CAAC;IACZ,KAAK,CAAC,CAAC;IACP,CAAC;;ICnCM,SAAS,MAAM,CAAC,OAAO,EAAE;IAChC,IAAI,OAAO,gBAAgB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;;ICDM,SAASC,KAAG,GAAG;IACtB,IAAI,IAAI,OAAO,GAAG,EAAE,CAAC;IACrB,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,OAAO,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACpC,KAAK;IACL,IAAI,OAAO,OAAO,CAAC,UAAU,MAAM,EAAE,UAAU,EAAE;IACjD,QAAQC,GAAS,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAChG,KAAK,CAAC,CAAC;IACP,CAAC;;ICTM,SAAS,OAAO,GAAG;IAC1B,IAAI,IAAI,WAAW,GAAG,EAAE,CAAC;IACzB,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,WAAW,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACxC,KAAK;IACL,IAAI,OAAOD,KAAG,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,EAAE,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IACrE,CAAC;;ICNM,SAASE,WAAS,CAAC,SAAS,EAAE,OAAO,EAAE;IAC9C,IAAI,OAAO,UAAU,MAAM,EAAE;IAC7B,QAAQ,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7F,KAAK,CAAC;IACN,CAAC;;ICHM,SAASC,MAAI,GAAG;IACvB,IAAI,IAAI,IAAI,GAAG,EAAE,CAAC;IAClB,IAAI,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE;IAClD,QAAQ,IAAI,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IACjC,KAAK;IACL,IAAI,OAAO,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,EAAE,EAAE,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACnF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ICTD,IAAI,eAAe,IAAI,YAAY;IACnC,IAAI,SAAS,eAAe,CAAC,eAAe,EAAE,iBAAiB,EAAE;IACjE,QAAQ,IAAI,iBAAiB,KAAK,KAAK,CAAC,EAAE,EAAE,iBAAiB,GAAG,QAAQ,CAAC,EAAE;IAC3E,QAAQ,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IAC/C,QAAQ,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IACnD,KAAK;IACL,IAAI,OAAO,eAAe,CAAC;IAC3B,CAAC,EAAE,CAAC,CAAC;;ICNL,IAAI,oBAAoB,IAAI,YAAY;IACxC,IAAI,SAAS,oBAAoB,GAAG;IACpC,QAAQ,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;IAChC,KAAK;IACL,IAAI,oBAAoB,CAAC,SAAS,CAAC,kBAAkB,GAAG,YAAY;IACpE,QAAQ,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IAC3E,QAAQ,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;IAC7C,KAAK,CAAC;IACN,IAAI,oBAAoB,CAAC,SAAS,CAAC,oBAAoB,GAAG,UAAU,KAAK,EAAE;IAC3E,QAAQ,IAAI,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC;IAClD,QAAQ,IAAI,kBAAkB,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACzD,QAAQ,gBAAgB,CAAC,KAAK,CAAC,GAAG,IAAI,eAAe,CAAC,kBAAkB,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC;IAChH,KAAK,CAAC;IACN,IAAI,OAAO,oBAAoB,CAAC;IAChC,CAAC,EAAE,CAAC,CAAC;;ICfE,SAAS,WAAW,CAAC,WAAW,EAAE,SAAS,EAAE;IACpD,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;IAC1D,QAAQ,IAAI,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;IACpC,QAAQ,IAAI,YAAY,GAAG,MAAM,CAAC,mBAAmB,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC1E,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;IACnE,YAAY,IAAI,MAAM,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;IACzC,YAAY,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IACvE,SAAS;IACT,KAAK;IACL,CAAC;;ICHD,IAAI,cAAc,IAAI,UAAU,MAAM,EAAE;IACxC,IAAI,SAAS,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;IACtC,IAAI,SAAS,cAAc,CAAC,QAAQ,EAAE,SAAS,EAAE;IACjD,QAAQ,IAAI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,UAAU,EAAE;IAC5D,YAAY,IAAI,UAAU,GAAG,IAAI,CAAC;IAClC,YAAY,IAAI,KAAK,GAAG,UAAU,CAAC,kBAAkB,EAAE,CAAC;IACxD,YAAY,IAAI,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;IAClD,YAAY,YAAY,CAAC,GAAG,CAAC,IAAI,YAAY,CAAC,YAAY;IAC1D,gBAAgB,UAAU,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;IACvD,aAAa,CAAC,CAAC,CAAC;IAChB,YAAY,UAAU,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACpD,YAAY,OAAO,YAAY,CAAC;IAChC,SAAS,CAAC,IAAI,IAAI,CAAC;IACnB,QAAQ,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAClC,QAAQ,KAAK,CAAC,aAAa,GAAG,EAAE,CAAC;IACjC,QAAQ,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;IACpC,QAAQ,OAAO,KAAK,CAAC;IACrB,KAAK;IACL,IAAI,cAAc,CAAC,SAAS,CAAC,gBAAgB,GAAG,UAAU,UAAU,EAAE;IACtE,QAAQ,IAAI,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;IAClD,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,EAAE,CAAC,EAAE,EAAE;IACjD,YAAY,IAAI,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC3C,YAAY,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAU,KAAK,EAAE;IACpE,gBAAgB,IAAI,EAAE,GAAG,KAAK,EAAE,YAAY,GAAG,EAAE,CAAC,OAAO,CAAC,YAAY,EAAE,WAAW,GAAG,EAAE,CAAC,UAAU,CAAC;IACpG,gBAAgB,mBAAmB,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;IAC/D,aAAa,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;IAC7E,SAAS;IACT,KAAK,CAAC;IACN,IAAI,OAAO,cAAc,CAAC;IAC1B,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;AACf,IACA,WAAW,CAAC,cAAc,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC;;IC/BpD,IAAI,aAAa,IAAI,UAAU,MAAM,EAAE;IACvC,IAAI,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IACrC,IAAI,SAAS,aAAa,CAAC,QAAQ,EAAE,SAAS,EAAE;IAChD,QAAQ,IAAI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;IAC9C,QAAQ,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAClC,QAAQ,KAAK,CAAC,aAAa,GAAG,EAAE,CAAC;IACjC,QAAQ,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;IACpC,QAAQ,OAAO,KAAK,CAAC;IACrB,KAAK;IACL,IAAI,aAAa,CAAC,SAAS,CAAC,UAAU,GAAG,UAAU,UAAU,EAAE;IAC/D,QAAQ,IAAI,OAAO,GAAG,IAAI,CAAC;IAC3B,QAAQ,IAAI,KAAK,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;IACjD,QAAQ,IAAI,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;IAC9C,QAAQ,YAAY,CAAC,GAAG,CAAC,IAAI,YAAY,CAAC,YAAY;IACtD,YAAY,OAAO,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;IAChD,SAAS,CAAC,CAAC,CAAC;IACZ,QAAQ,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC;IAC7E,QAAQ,OAAO,YAAY,CAAC;IAC5B,KAAK,CAAC;IACN,IAAI,aAAa,CAAC,SAAS,CAAC,KAAK,GAAG,YAAY;IAChD,QAAQ,IAAI,OAAO,GAAG,IAAI,CAAC;IAC3B,QAAQ,IAAI,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;IACrD,QAAQ,IAAI,OAAO,GAAG,UAAU,CAAC,EAAE;IACnC,YAAY,CAAC,YAAY;IACzB,gBAAgB,IAAI,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,YAAY,GAAG,EAAE,CAAC,YAAY,EAAE,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC;IAC/F,gBAAgB,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,YAAY;IACvD,oBAAoB,mBAAmB,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IAC/D,iBAAiB,EAAE,KAAK,CAAC,CAAC;IAC1B,aAAa,GAAG,CAAC;IACjB,SAAS,CAAC;IACV,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,EAAE,CAAC,EAAE,EAAE;IACjD,YAAY,OAAO,CAAC,CAAC,CAAC,CAAC;IACvB,SAAS;IACT,KAAK,CAAC;IACN,IAAI,OAAO,aAAa,CAAC;IACzB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;AACZ,IACA,WAAW,CAAC,aAAa,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC;;IC9BnD,IAAI,eAAe,GAAG,GAAG,CAAC;IAC1B,IAAI,aAAa,IAAI,UAAU,MAAM,EAAE;IACvC,IAAI,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IACrC,IAAI,SAAS,aAAa,CAAC,eAAe,EAAE;IAC5C,QAAQ,IAAI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,EAAE,eAAe,CAAC,IAAI,IAAI,CAAC;IAC9E,QAAQ,KAAK,CAAC,eAAe,GAAG,eAAe,CAAC;IAChD,QAAQ,KAAK,CAAC,cAAc,GAAG,EAAE,CAAC;IAClC,QAAQ,KAAK,CAAC,eAAe,GAAG,EAAE,CAAC;IACnC,QAAQ,KAAK,CAAC,UAAU,GAAG,EAAE,CAAC;IAC9B,QAAQ,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC;IAC9B,QAAQ,OAAO,KAAK,CAAC;IACrB,KAAK;IACL,IAAI,aAAa,CAAC,SAAS,CAAC,UAAU,GAAG,UAAU,OAAO,EAAE;IAC5D,QAAQ,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACxF,QAAQ,IAAI,OAAO,KAAK,CAAC,CAAC,EAAE;IAC5B,YAAY,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;IAC3F,SAAS;IACT,QAAQ,OAAO,OAAO,GAAG,aAAa,CAAC,eAAe,CAAC;IACvD,KAAK,CAAC;IACN,IAAI,aAAa,CAAC,SAAS,CAAC,oBAAoB,GAAG,UAAU,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE;IACrF,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;IACzC,YAAY,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACnF,SAAS;IACT,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;IACzC,YAAY,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;IACrF,SAAS;IACT,QAAQ,IAAI,QAAQ,GAAG,aAAa,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACnG,QAAQ,IAAI,IAAI,GAAG,IAAI,cAAc,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACtD,QAAQ,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxC,QAAQ,OAAO,IAAI,CAAC;IACpB,KAAK,CAAC;IACN,IAAI,aAAa,CAAC,SAAS,CAAC,mBAAmB,GAAG,UAAU,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE;IACpF,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;IACzC,YAAY,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IACpF,SAAS;IACT,QAAQ,IAAI,QAAQ,GAAG,aAAa,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACnG,QAAQ,IAAI,OAAO,GAAG,IAAI,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACxD,QAAQ,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC1C,QAAQ,OAAO,OAAO,CAAC;IACvB,KAAK,CAAC;IACN,IAAI,aAAa,CAAC,SAAS,CAAC,0BAA0B,GAAG,UAAU,UAAU,EAAE,UAAU,EAAE;IAC3F,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;IACzB,QAAQ,IAAI,QAAQ,GAAG,EAAE,CAAC;IAC1B,QAAQ,UAAU,CAAC,SAAS,CAAC;IAC7B,YAAY,IAAI,EAAE,UAAU,KAAK,EAAE;IACnC,gBAAgB,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,UAAU,EAAE,YAAY,EAAE,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC1G,aAAa;IACb,YAAY,KAAK,EAAE,UAAU,KAAK,EAAE;IACpC,gBAAgB,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,UAAU,EAAE,YAAY,EAAE,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC3G,aAAa;IACb,YAAY,QAAQ,EAAE,YAAY;IAClC,gBAAgB,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,UAAU,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC,CAAC;IACxG,aAAa;IACb,SAAS,CAAC,CAAC;IACX,QAAQ,OAAO,QAAQ,CAAC;IACxB,KAAK,CAAC;IACN,IAAI,aAAa,CAAC,SAAS,CAAC,gBAAgB,GAAG,UAAU,UAAU,EAAE,mBAAmB,EAAE;IAC1F,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;IACzB,QAAQ,IAAI,mBAAmB,KAAK,KAAK,CAAC,EAAE,EAAE,mBAAmB,GAAG,IAAI,CAAC,EAAE;IAC3E,QAAQ,IAAI,MAAM,GAAG,EAAE,CAAC;IACxB,QAAQ,IAAI,SAAS,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;IACzD,QAAQ,IAAI,kBAAkB,GAAG,aAAa,CAAC,2BAA2B,CAAC,mBAAmB,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9G,QAAQ,IAAI,iBAAiB,GAAG,kBAAkB,CAAC,eAAe,KAAK,QAAQ,GAAG,CAAC,GAAG,kBAAkB,CAAC,eAAe,CAAC;IACzH,QAAQ,IAAI,mBAAmB,GAAG,kBAAkB,CAAC,iBAAiB,CAAC;IACvE,QAAQ,IAAI,YAAY,CAAC;IACzB,QAAQ,IAAI,CAAC,QAAQ,CAAC,YAAY;IAClC,YAAY,YAAY,GAAG,UAAU,CAAC,SAAS,CAAC;IAChD,gBAAgB,IAAI,EAAE,UAAU,CAAC,EAAE;IACnC,oBAAoB,IAAI,KAAK,GAAG,CAAC,YAAY,UAAU,GAAG,KAAK,CAAC,0BAA0B,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC/G,oBAAoB,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,YAAY,EAAE,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC/F,iBAAiB;IACjB,gBAAgB,KAAK,EAAE,UAAU,KAAK,EAAE;IACxC,oBAAoB,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,YAAY,EAAE,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAChG,iBAAiB;IACjB,gBAAgB,QAAQ,EAAE,YAAY;IACtC,oBAAoB,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC,CAAC;IAC7F,iBAAiB;IACjB,aAAa,CAAC,CAAC;IACf,SAAS,EAAE,iBAAiB,CAAC,CAAC;IAC9B,QAAQ,IAAI,mBAAmB,KAAK,QAAQ,EAAE;IAC9C,YAAY,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,OAAO,YAAY,CAAC,WAAW,EAAE,CAAC,EAAE,EAAE,mBAAmB,CAAC,CAAC;IACnG,SAAS;IACT,QAAQ,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACxC,QAAQ,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IACnC,QAAQ,OAAO;IACf,YAAY,IAAI,EAAE,UAAU,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE;IACzD,gBAAgB,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC;IACvC,gBAAgB,SAAS,CAAC,QAAQ,GAAG,aAAa,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAC5G,aAAa;IACb,YAAY,OAAO,EAAE,UAAU,KAAK,EAAE;IACtC,gBAAgB,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC;IACvC,gBAAgB,SAAS,CAAC,QAAQ,GAAG,EAAE,CAAC;IACxC,gBAAgB,KAAK,CAAC,QAAQ,CAAC,YAAY;IAC3C,oBAAoB,YAAY,GAAG,KAAK,CAAC,SAAS,CAAC;IACnD,wBAAwB,IAAI,EAAE,UAAU,CAAC,EAAE;IAC3C,4BAA4B,IAAI,KAAK,GAAG,CAAC,YAAY,UAAU,GAAG,KAAK,CAAC,0BAA0B,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACvH,4BAA4B,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,YAAY,EAAE,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACnH,yBAAyB;IACzB,wBAAwB,KAAK,EAAE,UAAU,KAAK,EAAE;IAChD,4BAA4B,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,YAAY,EAAE,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACpH,yBAAyB;IACzB,wBAAwB,QAAQ,EAAE,YAAY;IAC9C,4BAA4B,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC,CAAC;IACjH,yBAAyB;IACzB,qBAAqB,CAAC,CAAC;IACvB,iBAAiB,EAAE,iBAAiB,CAAC,CAAC;IACtC,aAAa;IACb,SAAS,CAAC;IACV,KAAK,CAAC;IACN,IAAI,aAAa,CAAC,SAAS,CAAC,mBAAmB,GAAG,UAAU,sBAAsB,EAAE;IACpF,QAAQ,IAAI,SAAS,GAAG,EAAE,MAAM,EAAE,sBAAsB,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;IACzE,QAAQ,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACxC,QAAQ,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IACnC,QAAQ,OAAO;IACf,YAAY,IAAI,EAAE,UAAU,qBAAqB,EAAE;IACnD,gBAAgB,IAAI,YAAY,GAAG,OAAO,qBAAqB,KAAK,QAAQ,GAAG,CAAC,qBAAqB,CAAC,GAAG,qBAAqB,CAAC;IAC/H,gBAAgB,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC;IACvC,gBAAgB,SAAS,CAAC,QAAQ,GAAG,YAAY;IACjD,qBAAqB,GAAG,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,aAAa,CAAC,2BAA2B,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;IACpH,qBAAqB,MAAM,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,OAAO,CAAC,eAAe,KAAK,QAAQ,CAAC,EAAE,CAAC,CAAC;IACjG,aAAa;IACb,SAAS,CAAC;IACV,KAAK,CAAC;IACN,IAAI,aAAa,CAAC,SAAS,CAAC,KAAK,GAAG,YAAY;IAChD,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;IACzB,QAAQ,IAAI,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC;IACjD,QAAQ,OAAO,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE;IAC1C,YAAY,cAAc,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,CAAC;IAC3C,SAAS;IACT,QAAQ,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1C,QAAQ,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,IAAI,EAAE;IACjE,YAAY,IAAI,IAAI,CAAC,KAAK,EAAE;IAC5B,gBAAgB,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAClE,gBAAgB,OAAO,KAAK,CAAC;IAC7B,aAAa;IACb,YAAY,OAAO,IAAI,CAAC;IACxB,SAAS,CAAC,CAAC;IACX,KAAK,CAAC;IACN,IAAI,aAAa,CAAC,2BAA2B,GAAG,UAAU,OAAO,EAAE,OAAO,EAAE;IAC5E,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;IACzB,QAAQ,IAAI,OAAO,KAAK,KAAK,CAAC,EAAE,EAAE,OAAO,GAAG,KAAK,CAAC,EAAE;IACpD,QAAQ,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;IACzC,YAAY,OAAO,IAAI,eAAe,CAAC,QAAQ,CAAC,CAAC;IACjD,SAAS;IACT,QAAQ,IAAI,UAAU,GAAG,aAAa,CAAC,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5D,QAAQ,IAAI,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC;IACpC,QAAQ,IAAI,UAAU,GAAG,CAAC,CAAC,CAAC;IAC5B,QAAQ,IAAI,iBAAiB,GAAG,QAAQ,CAAC;IACzC,QAAQ,IAAI,mBAAmB,GAAG,QAAQ,CAAC;IAC3C,QAAQ,IAAI,KAAK,GAAG,CAAC,CAAC;IACtB,QAAQ,IAAI,OAAO,GAAG,UAAU,CAAC,EAAE;IACnC,YAAY,IAAI,SAAS,GAAG,KAAK,CAAC;IAClC,YAAY,IAAI,cAAc,GAAG,UAAU,KAAK,EAAE;IAClD,gBAAgB,SAAS,IAAI,KAAK,GAAG,KAAK,CAAC,eAAe,CAAC;IAC3D,aAAa,CAAC;IACd,YAAY,IAAI,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;IAClC,YAAY,QAAQ,CAAC;IACrB,gBAAgB,KAAK,GAAG;IACxB,oBAAoB,IAAI,CAAC,OAAO,EAAE;IAClC,wBAAwB,cAAc,CAAC,CAAC,CAAC,CAAC;IAC1C,qBAAqB;IACrB,oBAAoB,MAAM;IAC1B,gBAAgB,KAAK,GAAG;IACxB,oBAAoB,cAAc,CAAC,CAAC,CAAC,CAAC;IACtC,oBAAoB,MAAM;IAC1B,gBAAgB,KAAK,GAAG;IACxB,oBAAoB,UAAU,GAAG,KAAK,CAAC;IACvC,oBAAoB,cAAc,CAAC,CAAC,CAAC,CAAC;IACtC,oBAAoB,MAAM;IAC1B,gBAAgB,KAAK,GAAG;IACxB,oBAAoB,UAAU,GAAG,CAAC,CAAC,CAAC;IACpC,oBAAoB,cAAc,CAAC,CAAC,CAAC,CAAC;IACtC,oBAAoB,MAAM;IAC1B,gBAAgB,KAAK,GAAG;IACxB,oBAAoB,IAAI,iBAAiB,KAAK,QAAQ,EAAE;IACxD,wBAAwB,MAAM,IAAI,KAAK,CAAC,6CAA6C,GAAG,qDAAqD,CAAC,CAAC;IAC/I,qBAAqB;IACrB,oBAAoB,iBAAiB,GAAG,UAAU,GAAG,CAAC,CAAC,GAAG,UAAU,GAAG,KAAK,CAAC;IAC7E,oBAAoB,cAAc,CAAC,CAAC,CAAC,CAAC;IACtC,oBAAoB,MAAM;IAC1B,gBAAgB,KAAK,GAAG;IACxB,oBAAoB,IAAI,mBAAmB,KAAK,QAAQ,EAAE;IAC1D,wBAAwB,MAAM,IAAI,KAAK,CAAC,+CAA+C,GAAG,qDAAqD,CAAC,CAAC;IACjJ,qBAAqB;IACrB,oBAAoB,mBAAmB,GAAG,UAAU,GAAG,CAAC,CAAC,GAAG,UAAU,GAAG,KAAK,CAAC;IAC/E,oBAAoB,MAAM;IAC1B,gBAAgB;IAChB,oBAAoB,IAAI,OAAO,IAAI,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE;IACvD,wBAAwB,IAAI,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE;IAClE,4BAA4B,IAAI,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACtE,4BAA4B,IAAI,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACxF,4BAA4B,IAAI,KAAK,EAAE;IACvC,gCAAgC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;IACzD,gCAAgC,IAAI,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACpE,gCAAgC,IAAI,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACpD,gCAAgC,IAAI,YAAY,GAAG,KAAK,CAAC,CAAC;IAC1D,gCAAgC,QAAQ,IAAI;IAC5C,oCAAoC,KAAK,IAAI;IAC7C,wCAAwC,YAAY,GAAG,QAAQ,CAAC;IAChE,wCAAwC,MAAM;IAC9C,oCAAoC,KAAK,GAAG;IAC5C,wCAAwC,YAAY,GAAG,QAAQ,GAAG,IAAI,CAAC;IACvE,wCAAwC,MAAM;IAC9C,oCAAoC,KAAK,GAAG;IAC5C,wCAAwC,YAAY,GAAG,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAC;IAC5E,wCAAwC,MAAM;IAC9C,oCAAoC;IACpC,wCAAwC,MAAM;IAC9C,iCAAiC;IACjC,gCAAgC,cAAc,CAAC,YAAY,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;IACtF,gCAAgC,MAAM;IACtC,6BAA6B;IAC7B,yBAAyB;IACzB,qBAAqB;IACrB,oBAAoB,MAAM,IAAI,KAAK,CAAC,6CAA6C,GAAG,8CAA8C,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;IAC/I,aAAa;IACb,YAAY,KAAK,GAAG,SAAS,CAAC;IAC9B,YAAY,OAAO,GAAG,CAAC,CAAC;IACxB,SAAS,CAAC;IACV,QAAQ,IAAI,MAAM,GAAG,IAAI,EAAE,OAAO,CAAC;IACnC,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;IACtC,YAAY,OAAO,CAAC,CAAC,CAAC,CAAC;IACvB,YAAY,CAAC,GAAG,OAAO,CAAC;IACxB,SAAS;IACT,QAAQ,IAAI,mBAAmB,GAAG,CAAC,EAAE;IACrC,YAAY,OAAO,IAAI,eAAe,CAAC,iBAAiB,CAAC,CAAC;IAC1D,SAAS;IACT,aAAa;IACb,YAAY,OAAO,IAAI,eAAe,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAC;IAC/E,SAAS;IACT,KAAK,CAAC;IACN,IAAI,aAAa,CAAC,YAAY,GAAG,UAAU,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,2BAA2B,EAAE,OAAO,EAAE;IAC9G,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;IACzB,QAAQ,IAAI,2BAA2B,KAAK,KAAK,CAAC,EAAE,EAAE,2BAA2B,GAAG,KAAK,CAAC,EAAE;IAC5F,QAAQ,IAAI,OAAO,KAAK,KAAK,CAAC,EAAE,EAAE,OAAO,GAAG,KAAK,CAAC,EAAE;IACpD,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;IACzC,YAAY,MAAM,IAAI,KAAK,CAAC,+CAA+C,GAAG,2BAA2B,CAAC,CAAC;IAC3G,SAAS;IACT,QAAQ,IAAI,UAAU,GAAG,aAAa,CAAC,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5D,QAAQ,IAAI,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC;IACpC,QAAQ,IAAI,YAAY,GAAG,EAAE,CAAC;IAC9B,QAAQ,IAAI,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAClG,QAAQ,IAAI,KAAK,GAAG,QAAQ,KAAK,CAAC,CAAC,GAAG,CAAC,GAAG,QAAQ,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC;IAC3E,QAAQ,IAAI,QAAQ,GAAG,OAAO,MAAM,KAAK,QAAQ;IACjD,cAAc,UAAU,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,EAAE;IACxC,cAAc,UAAU,CAAC,EAAE;IAC3B,gBAAgB,IAAI,2BAA2B,IAAI,MAAM,CAAC,CAAC,CAAC,YAAY,cAAc,EAAE;IACxF,oBAAoB,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC9C,iBAAiB;IACjB,gBAAgB,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;IACjC,aAAa,CAAC;IACd,QAAQ,IAAI,UAAU,GAAG,CAAC,CAAC,CAAC;IAC5B,QAAQ,IAAI,OAAO,GAAG,UAAU,CAAC,EAAE;IACnC,YAAY,IAAI,SAAS,GAAG,KAAK,CAAC;IAClC,YAAY,IAAI,cAAc,GAAG,UAAU,KAAK,EAAE;IAClD,gBAAgB,SAAS,IAAI,KAAK,GAAG,KAAK,CAAC,eAAe,CAAC;IAC3D,aAAa,CAAC;IACd,YAAY,IAAI,YAAY,GAAG,KAAK,CAAC,CAAC;IACtC,YAAY,IAAI,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;IAClC,YAAY,QAAQ,CAAC;IACrB,gBAAgB,KAAK,GAAG;IACxB,oBAAoB,IAAI,CAAC,OAAO,EAAE;IAClC,wBAAwB,cAAc,CAAC,CAAC,CAAC,CAAC;IAC1C,qBAAqB;IACrB,oBAAoB,MAAM;IAC1B,gBAAgB,KAAK,GAAG;IACxB,oBAAoB,cAAc,CAAC,CAAC,CAAC,CAAC;IACtC,oBAAoB,MAAM;IAC1B,gBAAgB,KAAK,GAAG;IACxB,oBAAoB,UAAU,GAAG,KAAK,CAAC;IACvC,oBAAoB,cAAc,CAAC,CAAC,CAAC,CAAC;IACtC,oBAAoB,MAAM;IAC1B,gBAAgB,KAAK,GAAG;IACxB,oBAAoB,UAAU,GAAG,CAAC,CAAC,CAAC;IACpC,oBAAoB,cAAc,CAAC,CAAC,CAAC,CAAC;IACtC,oBAAoB,MAAM;IAC1B,gBAAgB,KAAK,GAAG;IACxB,oBAAoB,YAAY,GAAG,qBAAqB,CAAC;IACzD,oBAAoB,cAAc,CAAC,CAAC,CAAC,CAAC;IACtC,oBAAoB,MAAM;IAC1B,gBAAgB,KAAK,GAAG;IACxB,oBAAoB,cAAc,CAAC,CAAC,CAAC,CAAC;IACtC,oBAAoB,MAAM;IAC1B,gBAAgB,KAAK,GAAG;IACxB,oBAAoB,YAAY,GAAG,iBAAiB,CAAC,UAAU,IAAI,OAAO,CAAC,CAAC;IAC5E,oBAAoB,cAAc,CAAC,CAAC,CAAC,CAAC;IACtC,oBAAoB,MAAM;IAC1B,gBAAgB;IAChB,oBAAoB,IAAI,OAAO,IAAI,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE;IACvD,wBAAwB,IAAI,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE;IAClE,4BAA4B,IAAI,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACtE,4BAA4B,IAAI,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACxF,4BAA4B,IAAI,KAAK,EAAE;IACvC,gCAAgC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;IACzD,gCAAgC,IAAI,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACpE,gCAAgC,IAAI,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACpD,gCAAgC,IAAI,YAAY,GAAG,KAAK,CAAC,CAAC;IAC1D,gCAAgC,QAAQ,IAAI;IAC5C,oCAAoC,KAAK,IAAI;IAC7C,wCAAwC,YAAY,GAAG,QAAQ,CAAC;IAChE,wCAAwC,MAAM;IAC9C,oCAAoC,KAAK,GAAG;IAC5C,wCAAwC,YAAY,GAAG,QAAQ,GAAG,IAAI,CAAC;IACvE,wCAAwC,MAAM;IAC9C,oCAAoC,KAAK,GAAG;IAC5C,wCAAwC,YAAY,GAAG,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAC;IAC5E,wCAAwC,MAAM;IAC9C,oCAAoC;IACpC,wCAAwC,MAAM;IAC9C,iCAAiC;IACjC,gCAAgC,cAAc,CAAC,YAAY,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;IACtF,gCAAgC,MAAM;IACtC,6BAA6B;IAC7B,yBAAyB;IACzB,qBAAqB;IACrB,oBAAoB,YAAY,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IACjE,oBAAoB,cAAc,CAAC,CAAC,CAAC,CAAC;IACtC,oBAAoB,MAAM;IAC1B,aAAa;IACb,YAAY,IAAI,YAAY,EAAE;IAC9B,gBAAgB,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,UAAU,GAAG,CAAC,CAAC,GAAG,UAAU,GAAG,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC,CAAC;IAC/G,aAAa;IACb,YAAY,KAAK,GAAG,SAAS,CAAC;IAC9B,YAAY,OAAO,GAAG,CAAC,CAAC;IACxB,SAAS,CAAC;IACV,QAAQ,IAAI,MAAM,GAAG,IAAI,EAAE,OAAO,CAAC;IACnC,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;IACtC,YAAY,OAAO,CAAC,CAAC,CAAC,CAAC;IACvB,YAAY,CAAC,GAAG,OAAO,CAAC;IACxB,SAAS;IACT,QAAQ,OAAO,YAAY,CAAC;IAC5B,KAAK,CAAC;IACN,IAAI,aAAa,CAAC,SAAS,CAAC,cAAc,GAAG,YAAY;IACzD,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;IACzB,QAAQ,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;IAC3B,YAAY,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IACvE,SAAS;IACT,QAAQ,IAAI,UAAU,GAAG,CAAC,CAAC;IAC3B,QAAQ,IAAI,GAAG,CAAC;IAChB,QAAQ,IAAI,QAAQ,GAAG;IACvB,YAAY,qBAAqB,EAAE,UAAU,QAAQ,EAAE;IACvD,gBAAgB,IAAI,CAAC,GAAG,EAAE;IAC1B,oBAAoB,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAC7E,iBAAiB;IACjB,gBAAgB,IAAI,MAAM,GAAG,EAAE,UAAU,CAAC;IAC1C,gBAAgB,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC1C,gBAAgB,OAAO,MAAM,CAAC;IAC9B,aAAa;IACb,YAAY,oBAAoB,EAAE,UAAU,MAAM,EAAE;IACpD,gBAAgB,IAAI,CAAC,GAAG,EAAE;IAC1B,oBAAoB,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAC7E,iBAAiB;IACjB,gBAAgB,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACnC,aAAa;IACb,SAAS,CAAC;IACV,QAAQ,IAAI,OAAO,GAAG,UAAU,OAAO,EAAE;IACzC,YAAY,IAAI,GAAG,EAAE,EAAE,CAAC;IACxB,YAAY,IAAI,GAAG,EAAE;IACrB,gBAAgB,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAC5F,aAAa;IACb,YAAY,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;IACtC,gBAAgB,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IACxE,aAAa;IACb,YAAY,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC;IAC5B,YAAY,IAAI,QAAQ,GAAG,aAAa,CAAC,YAAY,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;IACtG,YAAY,IAAI;IAChB,gBAAgB,KAAK,IAAI,UAAU,GAAG,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,YAAY,GAAG,UAAU,CAAC,IAAI,EAAE,EAAE;IAClJ,oBAAoB,IAAI,OAAO,GAAG,YAAY,CAAC,KAAK,CAAC;IACrD,oBAAoB,KAAK,CAAC,QAAQ,CAAC,YAAY;IAC/C,wBAAwB,IAAI,GAAG,EAAE,EAAE,CAAC;IACpC,wBAAwB,IAAI,GAAG,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC;IAC9C,wBAAwB,IAAI,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;IACjE,wBAAwB,GAAG,CAAC,KAAK,EAAE,CAAC;IACpC,wBAAwB,IAAI;IAC5B,4BAA4B,KAAK,IAAI,WAAW,IAAI,GAAG,GAAG,KAAK,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,aAAa,GAAG,WAAW,CAAC,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,aAAa,GAAG,WAAW,CAAC,IAAI,EAAE,EAAE;IACrL,gCAAgC,IAAI,QAAQ,GAAG,aAAa,CAAC,KAAK,CAAC;IACnE,gCAAgC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC9C,6BAA6B;IAC7B,yBAAyB;IACzB,wBAAwB,OAAO,KAAK,EAAE,EAAE,GAAG,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;IACjE,gCAAgC;IAChC,4BAA4B,IAAI;IAChC,gCAAgC,IAAI,aAAa,IAAI,CAAC,aAAa,CAAC,IAAI,KAAK,EAAE,GAAG,WAAW,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC5H,6BAA6B;IAC7B,oCAAoC,EAAE,IAAI,GAAG,EAAE,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE;IACjE,yBAAyB;IACzB,qBAAqB,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACtC,iBAAiB;IACjB,aAAa;IACb,YAAY,OAAO,KAAK,EAAE,EAAE,GAAG,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;IACrD,oBAAoB;IACpB,gBAAgB,IAAI;IACpB,oBAAoB,IAAI,YAAY,IAAI,CAAC,YAAY,CAAC,IAAI,KAAK,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC5G,iBAAiB;IACjB,wBAAwB,EAAE,IAAI,GAAG,EAAE,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE;IACrD,aAAa;IACb,SAAS,CAAC;IACV,QAAQ,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;IACxD,KAAK,CAAC;IACN,IAAI,aAAa,CAAC,SAAS,CAAC,eAAe,GAAG,YAAY;IAC1D,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;IACzB,QAAQ,IAAI,UAAU,GAAG,CAAC,CAAC;IAC3B,QAAQ,IAAI,cAAc,GAAG,IAAI,GAAG,EAAE,CAAC;IACvC,QAAQ,IAAI,GAAG,GAAG,YAAY;IAC9B,YAAY,IAAI,GAAG,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC;IAClC,YAAY,IAAI,gBAAgB,GAAG,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC;IACvE,YAAY,IAAI,mBAAmB,GAAG,gBAAgB,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE;IAC5E,gBAAgB,IAAI,GAAG,GAAG,EAAE,CAAC,GAAG,CAAC;IACjC,gBAAgB,OAAO,GAAG,IAAI,GAAG,CAAC;IAClC,aAAa,CAAC,CAAC;IACf,YAAY,IAAI,aAAa,GAAG,mBAAmB,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE;IACzE,gBAAgB,IAAI,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC;IACnC,gBAAgB,OAAO,IAAI,KAAK,WAAW,CAAC;IAC5C,aAAa,CAAC,CAAC;IACf,YAAY,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE;IAC1C,gBAAgB,IAAI,EAAE,GAAG,aAAa,CAAC,CAAC,CAAC,EAAE,MAAM,GAAG,EAAE,CAAC,MAAM,EAAE,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC;IACpF,gBAAgB,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC9C,gBAAgB,OAAO,EAAE,CAAC;IAC1B,gBAAgB,OAAO;IACvB,aAAa;IACb,YAAY,IAAI,YAAY,GAAG,mBAAmB,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE;IACxE,gBAAgB,IAAI,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC;IACnC,gBAAgB,OAAO,IAAI,KAAK,UAAU,CAAC;IAC3C,aAAa,CAAC,CAAC;IACf,YAAY,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE;IACzC,gBAAgB,IAAI,gBAAgB,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;IACvD,gBAAgB,IAAI,QAAQ,GAAG,gBAAgB,CAAC,QAAQ,EAAE,OAAO,GAAG,gBAAgB,CAAC,OAAO,CAAC;IAC7F,gBAAgB,gBAAgB,CAAC,GAAG,GAAG,GAAG,GAAG,QAAQ,CAAC;IACtD,gBAAgB,gBAAgB,CAAC,YAAY,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAC9E,gBAAgB,OAAO,EAAE,CAAC;IAC1B,gBAAgB,OAAO;IACvB,aAAa;IACb,YAAY,IAAI,WAAW,GAAG,mBAAmB,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE;IACvE,gBAAgB,IAAI,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC;IACnC,gBAAgB,OAAO,IAAI,KAAK,SAAS,CAAC;IAC1C,aAAa,CAAC,CAAC;IACf,YAAY,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;IACxC,gBAAgB,IAAI,EAAE,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,MAAM,GAAG,EAAE,CAAC,MAAM,EAAE,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC;IAClF,gBAAgB,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC9C,gBAAgB,OAAO,EAAE,CAAC;IAC1B,gBAAgB,OAAO;IACvB,aAAa;IACb,YAAY,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IACpE,SAAS,CAAC;IACV,QAAQ,IAAI,SAAS,GAAG;IACxB,YAAY,YAAY,EAAE,UAAU,OAAO,EAAE;IAC7C,gBAAgB,IAAI,MAAM,GAAG,EAAE,UAAU,CAAC;IAC1C,gBAAgB,cAAc,CAAC,GAAG,CAAC,MAAM,EAAE;IAC3C,oBAAoB,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE;IACpC,oBAAoB,QAAQ,EAAE,CAAC;IAC/B,oBAAoB,MAAM,EAAE,MAAM;IAClC,oBAAoB,OAAO,EAAE,OAAO;IACpC,oBAAoB,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;IACxD,oBAAoB,IAAI,EAAE,WAAW;IACrC,iBAAiB,CAAC,CAAC;IACnB,gBAAgB,OAAO,MAAM,CAAC;IAC9B,aAAa;IACb,YAAY,cAAc,EAAE,UAAU,MAAM,EAAE;IAC9C,gBAAgB,IAAI,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACvD,gBAAgB,IAAI,KAAK,EAAE;IAC3B,oBAAoB,KAAK,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;IACrD,oBAAoB,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAClD,iBAAiB;IACjB,aAAa;IACb,SAAS,CAAC;IACV,QAAQ,IAAI,QAAQ,GAAG;IACvB,YAAY,WAAW,EAAE,UAAU,OAAO,EAAE,QAAQ,EAAE;IACtD,gBAAgB,IAAI,QAAQ,KAAK,KAAK,CAAC,EAAE,EAAE,QAAQ,GAAG,CAAC,CAAC,EAAE;IAC1D,gBAAgB,IAAI,MAAM,GAAG,EAAE,UAAU,CAAC;IAC1C,gBAAgB,cAAc,CAAC,GAAG,CAAC,MAAM,EAAE;IAC3C,oBAAoB,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,GAAG,QAAQ;IAC/C,oBAAoB,QAAQ,EAAE,QAAQ;IACtC,oBAAoB,MAAM,EAAE,MAAM;IAClC,oBAAoB,OAAO,EAAE,OAAO;IACpC,oBAAoB,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;IAC/D,oBAAoB,IAAI,EAAE,UAAU;IACpC,iBAAiB,CAAC,CAAC;IACnB,gBAAgB,OAAO,MAAM,CAAC;IAC9B,aAAa;IACb,YAAY,aAAa,EAAE,UAAU,MAAM,EAAE;IAC7C,gBAAgB,IAAI,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACvD,gBAAgB,IAAI,KAAK,EAAE;IAC3B,oBAAoB,KAAK,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;IACrD,oBAAoB,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAClD,iBAAiB;IACjB,aAAa;IACb,SAAS,CAAC;IACV,QAAQ,IAAI,OAAO,GAAG;IACtB,YAAY,UAAU,EAAE,UAAU,OAAO,EAAE,QAAQ,EAAE;IACrD,gBAAgB,IAAI,QAAQ,KAAK,KAAK,CAAC,EAAE,EAAE,QAAQ,GAAG,CAAC,CAAC,EAAE;IAC1D,gBAAgB,IAAI,MAAM,GAAG,EAAE,UAAU,CAAC;IAC1C,gBAAgB,cAAc,CAAC,GAAG,CAAC,MAAM,EAAE;IAC3C,oBAAoB,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,GAAG,QAAQ;IAC/C,oBAAoB,QAAQ,EAAE,QAAQ;IACtC,oBAAoB,MAAM,EAAE,MAAM;IAClC,oBAAoB,OAAO,EAAE,OAAO;IACpC,oBAAoB,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;IAC/D,oBAAoB,IAAI,EAAE,SAAS;IACnC,iBAAiB,CAAC,CAAC;IACnB,gBAAgB,OAAO,MAAM,CAAC;IAC9B,aAAa;IACb,YAAY,YAAY,EAAE,UAAU,MAAM,EAAE;IAC5C,gBAAgB,IAAI,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACvD,gBAAgB,IAAI,KAAK,EAAE;IAC3B,oBAAoB,KAAK,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;IACrD,oBAAoB,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAClD,iBAAiB;IACjB,aAAa;IACb,SAAS,CAAC;IACV,QAAQ,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;IAC9E,KAAK,CAAC;IACN,IAAI,aAAa,CAAC,SAAS,CAAC,GAAG,GAAG,UAAU,QAAQ,EAAE;IACtD,QAAQ,IAAI,mBAAmB,GAAG,aAAa,CAAC,eAAe,CAAC;IAChE,QAAQ,IAAI,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC;IAC3C,QAAQ,aAAa,CAAC,eAAe,GAAG,CAAC,CAAC;IAC1C,QAAQ,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAClC,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IAC5B,QAAQ,IAAI,QAAQ,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;IAC7C,QAAQ,IAAI,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;IAC/C,QAAQ,sBAAsB,CAAC,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;IAC5D,QAAQ,qBAAqB,CAAC,QAAQ,GAAG,IAAI,CAAC;IAC9C,QAAQ,iBAAiB,CAAC,QAAQ,GAAG,SAAS,CAAC,SAAS,CAAC;IACzD,QAAQ,gBAAgB,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;IACvD,QAAQ,eAAe,CAAC,QAAQ,GAAG,SAAS,CAAC,OAAO,CAAC;IACrD,QAAQ,4BAA4B,CAAC,QAAQ,GAAG,IAAI,CAAC;IACrD,QAAQ,IAAI,OAAO,GAAG;IACtB,YAAY,IAAI,EAAE,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC;IACtD,YAAY,GAAG,EAAE,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC;IACpD,YAAY,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;IACxC,YAAY,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;IAC5C,YAAY,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC;IAC9D,YAAY,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC;IACpE,YAAY,OAAO,EAAE,QAAQ,CAAC,OAAO;IACrC,SAAS,CAAC;IACV,QAAQ,IAAI;IACZ,YAAY,IAAI,GAAG,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;IACxC,YAAY,IAAI,CAAC,KAAK,EAAE,CAAC;IACzB,YAAY,OAAO,GAAG,CAAC;IACvB,SAAS;IACT,gBAAgB;IAChB,YAAY,aAAa,CAAC,eAAe,GAAG,mBAAmB,CAAC;IAChE,YAAY,IAAI,CAAC,SAAS,GAAG,aAAa,CAAC;IAC3C,YAAY,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACjC,YAAY,sBAAsB,CAAC,QAAQ,GAAG,SAAS,CAAC;IACxD,YAAY,qBAAqB,CAAC,QAAQ,GAAG,SAAS,CAAC;IACvD,YAAY,iBAAiB,CAAC,QAAQ,GAAG,SAAS,CAAC;IACnD,YAAY,gBAAgB,CAAC,QAAQ,GAAG,SAAS,CAAC;IAClD,YAAY,eAAe,CAAC,QAAQ,GAAG,SAAS,CAAC;IACjD,YAAY,4BAA4B,CAAC,QAAQ,GAAG,SAAS,CAAC;IAC9D,SAAS;IACT,KAAK,CAAC;IACN,IAAI,aAAa,CAAC,eAAe,GAAG,EAAE,CAAC;IACvC,IAAI,OAAO,aAAa,CAAC;IACzB,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC;;;;;;;;ICtjBlB,SAAS,cAAc,CAAC,GAAG,EAAE;IACpC,IAAI,QAAQ,GAAG,CAAC,YAAY;IAC5B,QAAQ,KAAK,MAAM,EAAE;IACrB,YAAY,IAAI,UAAU,IAAI,GAAG,EAAE;IACnC,gBAAgB,OAAO,GAAG,CAAC,QAAQ,CAAC;IACpC,aAAa;IACb,iBAAiB;IACjB,gBAAgB,IAAI,KAAK,GAAG,GAAG,CAAC;IAChC,gBAAgB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IACtD,aAAa;IACb,SAAS;IACT,QAAQ,KAAK,UAAU;IACvB,YAAY,OAAO,GAAG,CAAC,WAAW,CAAC;IACnC,QAAQ,KAAK,MAAM,CAAC;IACpB,QAAQ,SAAS;IACjB,YAAY,IAAI,UAAU,IAAI,GAAG,EAAE;IACnC,gBAAgB,OAAO,GAAG,CAAC,QAAQ,CAAC;IACpC,aAAa;IACb,iBAAiB;IACjB,gBAAgB,IAAI,KAAK,GAAG,GAAG,CAAC;IAChC,gBAAgB,OAAO,KAAK,CAAC,YAAY,CAAC;IAC1C,aAAa;IACb,SAAS;IACT,KAAK;IACL,CAAC;;ICvBD,IAAI,YAAY,IAAI,YAAY;IAChC,IAAI,SAAS,YAAY,CAAC,aAAa,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE;IAC7D,QAAQ,IAAI,IAAI,KAAK,KAAK,CAAC,EAAE,EAAE,IAAI,GAAG,eAAe,CAAC,EAAE;IACxD,QAAQ,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IAC3C,QAAQ,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACvB,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC/B,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACzB,QAAQ,IAAI,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;IACjE,QAAQ,IAAI,CAAC,MAAM,GAAG,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,KAAK,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC;IACxE,QAAQ,IAAI,CAAC,YAAY,GAAG,YAAY,KAAK,IAAI,IAAI,YAAY,KAAK,KAAK,CAAC,GAAG,YAAY,GAAG,EAAE,CAAC;IACjG,QAAQ,IAAI,UAAU,GAAG,GAAG,CAAC,qBAAqB,EAAE,CAAC;IACrD,QAAQ,IAAI,CAAC,eAAe,GAAG,UAAU;IACzC;IACA,gBAAgB,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,UAAU,OAAO,EAAE,IAAI,EAAE;IACvE,oBAAoB,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,oBAAoB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;IAC1E,oBAAoB,OAAO,OAAO,CAAC;IACnC,iBAAiB,EAAE,EAAE,CAAC;IACtB,cAAc,EAAE,CAAC;IACjB,QAAQ,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;IAC5C,QAAQ,IAAI,MAAM,GAAG,aAAa,CAAC,MAAM,EAAE,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC;IACvE,QAAQ,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IAC3B,KAAK;IACL,IAAI,OAAO,YAAY,CAAC;IACxB,CAAC,EAAE,CAAC,CAAC;;ICxBE,IAAI,SAAS,GAAG,gBAAgB,CAAC,UAAU,MAAM,EAAE;IAC1D,IAAI,OAAO,SAAS,aAAa,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE;IACzD,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC/B,QAAQ,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;IAChC,QAAQ,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACvB,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC/B,QAAQ,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;IACjC,QAAQ,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;IAC7C,QAAQ,IAAI,QAAQ,CAAC;IACrB,QAAQ,IAAI;IACZ,YAAY,QAAQ,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;IAC3C,SAAS;IACT,QAAQ,OAAO,GAAG,EAAE;IACpB,YAAY,QAAQ,GAAG,GAAG,CAAC,YAAY,CAAC;IACxC,SAAS;IACT,QAAQ,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACjC,KAAK,CAAC;IACN,CAAC,CAAC,CAAC;AACH,IAAO,IAAI,gBAAgB,GAAG,CAAC,YAAY;IAC3C,IAAI,SAAS,oBAAoB,CAAC,GAAG,EAAE,OAAO,EAAE;IAChD,QAAQ,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IAC3D,QAAQ,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACvC,QAAQ,OAAO,IAAI,CAAC;IACpB,KAAK;IACL,IAAI,oBAAoB,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IACxE,IAAI,OAAO,oBAAoB,CAAC;IAChC,CAAC,GAAG,CAAC;;ICvBL,SAAS,OAAO,CAAC,GAAG,EAAE,OAAO,EAAE;IAC/B,IAAI,OAAO,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IACD,SAAS,QAAQ,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE;IACtC,IAAI,OAAO,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IACD,SAAS,UAAU,CAAC,GAAG,EAAE,OAAO,EAAE;IAClC,IAAI,OAAO,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;IACD,SAAS,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE;IACrC,IAAI,OAAO,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;IACD,SAAS,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE;IACvC,IAAI,OAAO,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IACD,IAAI,WAAW,GAAG,GAAG,CAAC,UAAU,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC3D,SAAS,WAAW,CAAC,GAAG,EAAE,OAAO,EAAE;IACnC,IAAI,OAAO,WAAW,CAAC,IAAI,CAAC;IAC5B,QAAQ,MAAM,EAAE,KAAK;IACrB,QAAQ,GAAG,EAAE,GAAG;IAChB,QAAQ,OAAO,EAAE,OAAO;IACxB,KAAK,CAAC,CAAC,CAAC;IACR,CAAC;AACD,IAAO,IAAI,IAAI,GAAG,CAAC,YAAY;IAC/B,IAAI,IAAI,MAAM,GAAG,UAAU,WAAW,EAAE;IACxC,QAAQ,IAAI,MAAM,GAAG,OAAO,WAAW,KAAK,QAAQ;IACpD,cAAc;IACd,gBAAgB,GAAG,EAAE,WAAW;IAChC,aAAa;IACb,cAAc,WAAW,CAAC;IAC1B,QAAQ,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC;IAChC,KAAK,CAAC;IACN,IAAI,MAAM,CAAC,GAAG,GAAG,OAAO,CAAC;IACzB,IAAI,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IAC3B,IAAI,MAAM,CAAC,MAAM,GAAG,UAAU,CAAC;IAC/B,IAAI,MAAM,CAAC,GAAG,GAAG,OAAO,CAAC;IACzB,IAAI,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC;IAC7B,IAAI,MAAM,CAAC,OAAO,GAAG,WAAW,CAAC;IACjC,IAAI,OAAO,MAAM,CAAC;IAClB,CAAC,GAAG,CAAC;IACL,IAAI,MAAM,GAAG,QAAQ,CAAC;IACtB,IAAI,QAAQ,GAAG,UAAU,CAAC;IAC1B,IAAI,SAAS,GAAG,WAAW,CAAC;IAC5B,IAAI,QAAQ,GAAG,UAAU,CAAC;IAC1B,IAAI,IAAI,GAAG,MAAM,CAAC;AAClB,IAAO,SAAS,QAAQ,CAAC,IAAI,EAAE;IAC/B,IAAI,OAAO,IAAI,UAAU,CAAC,UAAU,WAAW,EAAE;IACjD,QAAQ,IAAI,EAAE,EAAE,EAAE,CAAC;IACnB,QAAQ,IAAI,MAAM,GAAG,QAAQ,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,CAAC;IAClJ,QAAQ,IAAI,WAAW,GAAG,MAAM,CAAC,WAAW,EAAE,cAAc,GAAG,MAAM,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAAC,OAAO,CAAC;IAC/G,QAAQ,IAAI,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC;IAC7B,QAAQ,IAAI,CAAC,GAAG,EAAE;IAClB,YAAY,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAC;IACnD,SAAS;IACT,QAAQ,IAAI,WAAW,EAAE;IACzB,YAAY,IAAI,cAAc,CAAC;IAC/B,YAAY,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;IACnC,gBAAgB,IAAI,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3C,gBAAgB,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE;IACtC,oBAAoB,MAAM,IAAI,SAAS,CAAC,aAAa,CAAC,CAAC;IACvD,iBAAiB;IACjB,gBAAgB,cAAc,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/D,gBAAgB,IAAI,eAAe,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,UAAU,KAAK,EAAE,GAAG,EAAE,EAAE,OAAO,cAAc,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;IAC3H,gBAAgB,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,cAAc,CAAC;IACtD,aAAa;IACb,iBAAiB;IACjB,gBAAgB,cAAc,GAAG,IAAI,eAAe,CAAC,WAAW,CAAC,CAAC;IAClE,gBAAgB,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,cAAc,CAAC;IACjD,aAAa;IACb,SAAS;IACT,QAAQ,IAAI,OAAO,GAAG,EAAE,CAAC;IACzB,QAAQ,IAAI,iBAAiB,EAAE;IAC/B,YAAY,KAAK,IAAI,GAAG,IAAI,iBAAiB,EAAE;IAC/C,gBAAgB,IAAI,iBAAiB,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;IAC3D,oBAAoB,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;IACxE,iBAAiB;IACjB,aAAa;IACb,SAAS;IACT,QAAQ,IAAI,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IAC7C,QAAQ,IAAI,CAAC,WAAW,IAAI,EAAE,kBAAkB,IAAI,OAAO,CAAC,EAAE;IAC9D,YAAY,OAAO,CAAC,kBAAkB,CAAC,GAAG,gBAAgB,CAAC;IAC3D,SAAS;IACT,QAAQ,IAAI,eAAe,GAAG,MAAM,CAAC,eAAe,EAAE,cAAc,GAAG,MAAM,CAAC,cAAc,EAAE,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;IACrI,QAAQ,IAAI,CAAC,eAAe,IAAI,CAAC,WAAW,KAAK,cAAc,IAAI,cAAc,EAAE;IACnF,YAAY,IAAI,UAAU,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,YAAY,GAAG,cAAc,GAAG,WAAW,CAAC,CAAC,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC;IAChQ,YAAY,IAAI,UAAU,EAAE;IAC5B,gBAAgB,OAAO,CAAC,cAAc,CAAC,GAAG,UAAU,CAAC;IACrD,aAAa;IACb,SAAS;IACT,QAAQ,IAAI,IAAI,GAAG,uCAAuC,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;IACpF,QAAQ,IAAI,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG;IAChE,YAAY,OAAO,EAAE,OAAO;IAC5B,YAAY,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IAC1B,QAAQ,IAAI,GAAG,CAAC;IAChB,QAAQ,GAAG,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE,GAAG,IAAI,cAAc,EAAE,CAAC;IACvE,QAAQ;IACR,YAAY,IAAI,oBAAoB,GAAG,IAAI,CAAC,kBAAkB,EAAE,EAAE,GAAG,IAAI,CAAC,uBAAuB,EAAE,uBAAuB,GAAG,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,qBAAqB,EAAE,qBAAqB,GAAG,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE,CAAC;IAC7O,YAAY,IAAI,aAAa,GAAG,UAAU,IAAI,EAAE,YAAY,EAAE;IAC9D,gBAAgB,GAAG,CAAC,gBAAgB,CAAC,IAAI,EAAE,YAAY;IACvD,oBAAoB,IAAI,EAAE,CAAC;IAC3B,oBAAoB,IAAI,KAAK,GAAG,YAAY,EAAE,CAAC;IAC/C,oBAAoB,CAAC,EAAE,GAAG,oBAAoB,KAAK,IAAI,IAAI,oBAAoB,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,oBAAoB,CAAC,KAAK,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;IAC5M,oBAAoB,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC7C,iBAAiB,CAAC,CAAC;IACnB,aAAa,CAAC;IACd,YAAY,aAAa,CAAC,SAAS,EAAE,YAAY,EAAE,OAAO,IAAI,gBAAgB,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;IAClG,YAAY,aAAa,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,IAAI,SAAS,CAAC,SAAS,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;IACpG,YAAY,IAAI,gBAAgB,GAAG,UAAU,SAAS,EAAE,KAAK,EAAE;IAC/D,gBAAgB,OAAO,IAAI,YAAY,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,SAAS,GAAG,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;IAC5F,aAAa,CAAC;IACd,YAAY,IAAI,kBAAkB,GAAG,UAAU,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE;IACxE,gBAAgB,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,UAAU,KAAK,EAAE;IAC/D,oBAAoB,WAAW,CAAC,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;IACzE,iBAAiB,CAAC,CAAC;IACnB,aAAa,CAAC;IACd,YAAY,IAAI,qBAAqB,EAAE;IACvC,gBAAgB,CAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,UAAU,IAAI,EAAE,EAAE,OAAO,kBAAkB,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;IAC9H,aAAa;IACb,YAAY,IAAI,oBAAoB,EAAE;IACtC,gBAAgB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,UAAU,IAAI,EAAE,EAAE,OAAO,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG,oBAAoB,KAAK,IAAI,IAAI,oBAAoB,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,oBAAoB,CAAC,IAAI,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IAClU,aAAa;IACb,YAAY,IAAI,uBAAuB,EAAE;IACzC,gBAAgB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,UAAU,IAAI,EAAE,EAAE,OAAO,kBAAkB,CAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;IACnH,aAAa;IACb,YAAY,IAAI,WAAW,GAAG,UAAU,MAAM,EAAE;IAChD,gBAAgB,IAAI,GAAG,GAAG,YAAY,IAAI,MAAM,GAAG,GAAG,GAAG,MAAM,GAAG,EAAE,CAAC,CAAC;IACtE,gBAAgB,WAAW,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;IACrE,aAAa,CAAC;IACd,YAAY,GAAG,CAAC,gBAAgB,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE;IACvD,gBAAgB,IAAI,EAAE,CAAC;IACvB,gBAAgB,CAAC,EAAE,GAAG,oBAAoB,KAAK,IAAI,IAAI,oBAAoB,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,oBAAoB,CAAC,KAAK,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC,CAAC;IACpM,gBAAgB,WAAW,EAAE,CAAC;IAC9B,aAAa,CAAC,CAAC;IACf,YAAY,GAAG,CAAC,gBAAgB,CAAC,IAAI,EAAE,UAAU,KAAK,EAAE;IACxD,gBAAgB,IAAI,EAAE,EAAE,EAAE,CAAC;IAC3B,gBAAgB,IAAI,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;IACxC,gBAAgB,IAAI,MAAM,GAAG,GAAG,EAAE;IAClC,oBAAoB,CAAC,EAAE,GAAG,oBAAoB,KAAK,IAAI,IAAI,oBAAoB,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,oBAAoB,CAAC,QAAQ,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;IACxM,oBAAoB,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC;IAC1C,oBAAoB,IAAI;IACxB,wBAAwB,QAAQ,GAAG,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IACrE,qBAAqB;IACrB,oBAAoB,OAAO,GAAG,EAAE;IAChC,wBAAwB,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC/C,wBAAwB,OAAO;IAC/B,qBAAqB;IACrB,oBAAoB,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC/C,oBAAoB,WAAW,CAAC,QAAQ,EAAE,CAAC;IAC3C,iBAAiB;IACjB,qBAAqB;IACrB,oBAAoB,CAAC,EAAE,GAAG,oBAAoB,KAAK,IAAI,IAAI,oBAAoB,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,oBAAoB,CAAC,KAAK,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;IAC5M,oBAAoB,WAAW,CAAC,MAAM,CAAC,CAAC;IACxC,iBAAiB;IACjB,aAAa,CAAC,CAAC;IACf,SAAS;IACT,QAAQ,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;IACnF,QAAQ,IAAI,IAAI,EAAE;IAClB,YAAY,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAClE,SAAS;IACT,aAAa;IACb,YAAY,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;IACzC,SAAS;IACT,QAAQ,IAAI,KAAK,EAAE;IACnB,YAAY,GAAG,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;IAC3C,YAAY,GAAG,CAAC,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC;IACrD,SAAS;IACT,QAAQ,IAAI,iBAAiB,IAAI,GAAG,EAAE;IACtC,YAAY,GAAG,CAAC,eAAe,GAAG,QAAQ,CAAC,eAAe,CAAC;IAC3D,SAAS;IACT,QAAQ,KAAK,IAAI,GAAG,IAAI,OAAO,EAAE;IACjC,YAAY,IAAI,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;IAC7C,gBAAgB,GAAG,CAAC,gBAAgB,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;IACxD,aAAa;IACb,SAAS;IACT,QAAQ,IAAI,IAAI,EAAE;IAClB,YAAY,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3B,SAAS;IACT,aAAa;IACb,YAAY,GAAG,CAAC,IAAI,EAAE,CAAC;IACvB,SAAS;IACT,QAAQ,OAAO,YAAY;IAC3B,YAAY,IAAI,GAAG,IAAI,GAAG,CAAC,UAAU,KAAK,CAAC,EAAE;IAC7C,gBAAgB,GAAG,CAAC,KAAK,EAAE,CAAC;IAC5B,aAAa;IACb,SAAS,CAAC;IACV,KAAK,CAAC,CAAC;IACP,CAAC;IACD,SAAS,uCAAuC,CAAC,IAAI,EAAE,OAAO,EAAE;IAChE,IAAI,IAAI,EAAE,CAAC;IACX,IAAI,IAAI,CAAC,IAAI;IACb,QAAQ,OAAO,IAAI,KAAK,QAAQ;IAChC,QAAQ,UAAU,CAAC,IAAI,CAAC;IACxB,QAAQ,iBAAiB,CAAC,IAAI,CAAC;IAC/B,QAAQ,aAAa,CAAC,IAAI,CAAC;IAC3B,QAAQ,MAAM,CAAC,IAAI,CAAC;IACpB,QAAQ,MAAM,CAAC,IAAI,CAAC;IACpB,QAAQ,gBAAgB,CAAC,IAAI,CAAC,EAAE;IAChC,QAAQ,OAAO,IAAI,CAAC;IACpB,KAAK;IACL,IAAI,IAAI,iBAAiB,CAAC,IAAI,CAAC,EAAE;IACjC,QAAQ,OAAO,IAAI,CAAC,MAAM,CAAC;IAC3B,KAAK;IACL,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;IAClC,QAAQ,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,EAAE,GAAG,gCAAgC,CAAC;IACnI,QAAQ,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACpC,KAAK;IACL,IAAI,MAAM,IAAI,SAAS,CAAC,mBAAmB,CAAC,CAAC;IAC7C,CAAC;IACD,IAAI,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;IAC1C,SAAS,aAAa,CAAC,GAAG,EAAE,IAAI,EAAE;IAClC,IAAI,OAAO,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,UAAU,GAAG,IAAI,GAAG,GAAG,CAAC;IAC3D,CAAC;IACD,SAAS,aAAa,CAAC,IAAI,EAAE;IAC7B,IAAI,OAAO,aAAa,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;IAC9C,CAAC;IACD,SAAS,MAAM,CAAC,IAAI,EAAE;IACtB,IAAI,OAAO,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACvC,CAAC;IACD,SAAS,MAAM,CAAC,IAAI,EAAE;IACtB,IAAI,OAAO,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACvC,CAAC;IACD,SAAS,iBAAiB,CAAC,IAAI,EAAE;IACjC,IAAI,OAAO,OAAO,WAAW,KAAK,WAAW,IAAI,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC1E,CAAC;IACD,SAAS,UAAU,CAAC,IAAI,EAAE;IAC1B,IAAI,OAAO,OAAO,QAAQ,KAAK,WAAW,IAAI,IAAI,YAAY,QAAQ,CAAC;IACvE,CAAC;IACD,SAAS,iBAAiB,CAAC,IAAI,EAAE;IACjC,IAAI,OAAO,OAAO,eAAe,KAAK,WAAW,IAAI,IAAI,YAAY,eAAe,CAAC;IACrF,CAAC;IACD,SAAS,gBAAgB,CAAC,IAAI,EAAE;IAChC,IAAI,OAAO,OAAO,cAAc,KAAK,WAAW,IAAI,IAAI,YAAY,cAAc,CAAC;IACnF,CAAC;;;;;;;;;;;ICvOD,IAAI,wBAAwB,GAAG;IAC/B,IAAI,GAAG,EAAE,EAAE;IACX,IAAI,YAAY,EAAE,UAAU,CAAC,EAAE,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE;IAC7D,IAAI,UAAU,EAAE,UAAU,KAAK,EAAE,EAAE,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE;IAClE,CAAC,CAAC;IACF,IAAI,qCAAqC,GAAG,mIAAmI,CAAC;IAChL,IAAI,gBAAgB,IAAI,UAAU,MAAM,EAAE;IAC1C,IAAI,SAAS,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;IACxC,IAAI,SAAS,gBAAgB,CAAC,iBAAiB,EAAE,WAAW,EAAE;IAC9D,QAAQ,IAAI,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;IAC9C,QAAQ,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;IAC7B,QAAQ,IAAI,iBAAiB,YAAY,UAAU,EAAE;IACrD,YAAY,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC;IAC5C,YAAY,KAAK,CAAC,MAAM,GAAG,iBAAiB,CAAC;IAC7C,SAAS;IACT,aAAa;IACb,YAAY,IAAI,MAAM,IAAI,KAAK,CAAC,OAAO,GAAG,QAAQ,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;IAClF,YAAY,KAAK,CAAC,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAC1C,YAAY,IAAI,OAAO,iBAAiB,KAAK,QAAQ,EAAE;IACvD,gBAAgB,MAAM,CAAC,GAAG,GAAG,iBAAiB,CAAC;IAC/C,aAAa;IACb,iBAAiB;IACjB,gBAAgB,KAAK,IAAI,GAAG,IAAI,iBAAiB,EAAE;IACnD,oBAAoB,IAAI,iBAAiB,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;IAC/D,wBAAwB,MAAM,CAAC,GAAG,CAAC,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAC7D,qBAAqB;IACrB,iBAAiB;IACjB,aAAa;IACb,YAAY,IAAI,CAAC,MAAM,CAAC,aAAa,IAAI,SAAS,EAAE;IACpD,gBAAgB,MAAM,CAAC,aAAa,GAAG,SAAS,CAAC;IACjD,aAAa;IACb,iBAAiB,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE;IAC5C,gBAAgB,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;IACzE,aAAa;IACb,YAAY,KAAK,CAAC,WAAW,GAAG,IAAI,aAAa,EAAE,CAAC;IACpD,SAAS;IACT,QAAQ,OAAO,KAAK,CAAC;IACrB,KAAK;IACL,IAAI,gBAAgB,CAAC,SAAS,CAAC,IAAI,GAAG,UAAU,QAAQ,EAAE;IAC1D,QAAQ,IAAI,IAAI,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IACxE,QAAQ,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IACjC,QAAQ,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,OAAO,IAAI,CAAC;IACpB,KAAK,CAAC;IACN,IAAI,gBAAgB,CAAC,SAAS,CAAC,WAAW,GAAG,YAAY;IACzD,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IAC5B,QAAQ,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;IAC1B,YAAY,IAAI,CAAC,WAAW,GAAG,IAAI,aAAa,EAAE,CAAC;IACnD,SAAS;IACT,QAAQ,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IACrC,KAAK,CAAC;IACN,IAAI,gBAAgB,CAAC,SAAS,CAAC,SAAS,GAAG,UAAU,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE;IACtF,QAAQ,IAAI,IAAI,GAAG,IAAI,CAAC;IACxB,QAAQ,OAAO,IAAI,UAAU,CAAC,UAAU,QAAQ,EAAE;IAClD,YAAY,IAAI;IAChB,gBAAgB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IACpC,aAAa;IACb,YAAY,OAAO,GAAG,EAAE;IACxB,gBAAgB,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACpC,aAAa;IACb,YAAY,IAAI,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC;IAC9C,gBAAgB,IAAI,EAAE,UAAU,CAAC,EAAE;IACnC,oBAAoB,IAAI;IACxB,wBAAwB,IAAI,aAAa,CAAC,CAAC,CAAC,EAAE;IAC9C,4BAA4B,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC7C,yBAAyB;IACzB,qBAAqB;IACrB,oBAAoB,OAAO,GAAG,EAAE;IAChC,wBAAwB,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC5C,qBAAqB;IACrB,iBAAiB;IACjB,gBAAgB,KAAK,EAAE,UAAU,GAAG,EAAE,EAAE,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE;IACrE,gBAAgB,QAAQ,EAAE,YAAY,EAAE,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC,EAAE;IACrE,aAAa,CAAC,CAAC;IACf,YAAY,OAAO,YAAY;IAC/B,gBAAgB,IAAI;IACpB,oBAAoB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC1C,iBAAiB;IACjB,gBAAgB,OAAO,GAAG,EAAE;IAC5B,oBAAoB,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACxC,iBAAiB;IACjB,gBAAgB,YAAY,CAAC,WAAW,EAAE,CAAC;IAC3C,aAAa,CAAC;IACd,SAAS,CAAC,CAAC;IACX,KAAK,CAAC;IACN,IAAI,gBAAgB,CAAC,SAAS,CAAC,cAAc,GAAG,YAAY;IAC5D,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;IACzB,QAAQ,IAAI,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,aAAa,GAAG,EAAE,CAAC,aAAa,EAAE,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,GAAG,GAAG,EAAE,CAAC,GAAG,EAAE,UAAU,GAAG,EAAE,CAAC,UAAU,CAAC;IAClI,QAAQ,IAAI,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC;IACpC,QAAQ,IAAI,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,IAAI;IACZ,YAAY,MAAM,GAAG,QAAQ,GAAG,IAAI,aAAa,CAAC,GAAG,EAAE,QAAQ,CAAC,GAAG,IAAI,aAAa,CAAC,GAAG,CAAC,CAAC;IAC1F,YAAY,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAClC,YAAY,IAAI,UAAU,EAAE;IAC5B,gBAAgB,IAAI,CAAC,OAAO,CAAC,UAAU,GAAG,UAAU,CAAC;IACrD,aAAa;IACb,SAAS;IACT,QAAQ,OAAO,CAAC,EAAE;IAClB,YAAY,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC9B,YAAY,OAAO;IACnB,SAAS;IACT,QAAQ,IAAI,YAAY,GAAG,IAAI,YAAY,CAAC,YAAY;IACxD,YAAY,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;IACjC,YAAY,IAAI,MAAM,IAAI,MAAM,CAAC,UAAU,KAAK,CAAC,EAAE;IACnD,gBAAgB,MAAM,CAAC,KAAK,EAAE,CAAC;IAC/B,aAAa;IACb,SAAS,CAAC,CAAC;IACX,QAAQ,MAAM,CAAC,MAAM,GAAG,UAAU,GAAG,EAAE;IACvC,YAAY,IAAI,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;IACxC,YAAY,IAAI,CAAC,OAAO,EAAE;IAC1B,gBAAgB,MAAM,CAAC,KAAK,EAAE,CAAC;IAC/B,gBAAgB,KAAK,CAAC,WAAW,EAAE,CAAC;IACpC,gBAAgB,OAAO;IACvB,aAAa;IACb,YAAY,IAAI,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;IAC1D,YAAY,IAAI,YAAY,EAAE;IAC9B,gBAAgB,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvC,aAAa;IACb,YAAY,IAAI,KAAK,GAAG,KAAK,CAAC,WAAW,CAAC;IAC1C,YAAY,KAAK,CAAC,WAAW,GAAG,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE;IAC/D,gBAAgB,IAAI,MAAM,CAAC,UAAU,KAAK,CAAC,EAAE;IAC7C,oBAAoB,IAAI;IACxB,wBAAwB,IAAI,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC;IAClE,wBAAwB,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IACnD,qBAAqB;IACrB,oBAAoB,OAAO,CAAC,EAAE;IAC9B,wBAAwB,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnD,qBAAqB;IACrB,iBAAiB;IACjB,aAAa,EAAE,UAAU,GAAG,EAAE;IAC9B,gBAAgB,IAAI,eAAe,GAAG,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC;IACpE,gBAAgB,IAAI,eAAe,EAAE;IACrC,oBAAoB,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACpD,iBAAiB;IACjB,gBAAgB,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE;IACrC,oBAAoB,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACvD,iBAAiB;IACjB,qBAAqB;IACrB,oBAAoB,QAAQ,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,qCAAqC,CAAC,CAAC,CAAC;IACzF,iBAAiB;IACjB,gBAAgB,KAAK,CAAC,WAAW,EAAE,CAAC;IACpC,aAAa,EAAE,YAAY;IAC3B,gBAAgB,IAAI,eAAe,GAAG,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC;IACpE,gBAAgB,IAAI,eAAe,EAAE;IACrC,oBAAoB,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACpD,iBAAiB;IACjB,gBAAgB,MAAM,CAAC,KAAK,EAAE,CAAC;IAC/B,gBAAgB,KAAK,CAAC,WAAW,EAAE,CAAC;IACpC,aAAa,CAAC,CAAC;IACf,YAAY,IAAI,KAAK,IAAI,KAAK,YAAY,aAAa,EAAE;IACzD,gBAAgB,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;IACrE,aAAa;IACb,SAAS,CAAC;IACV,QAAQ,MAAM,CAAC,OAAO,GAAG,UAAU,CAAC,EAAE;IACtC,YAAY,KAAK,CAAC,WAAW,EAAE,CAAC;IAChC,YAAY,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC9B,SAAS,CAAC;IACV,QAAQ,MAAM,CAAC,OAAO,GAAG,UAAU,CAAC,EAAE;IACtC,YAAY,IAAI,MAAM,KAAK,KAAK,CAAC,OAAO,EAAE;IAC1C,gBAAgB,KAAK,CAAC,WAAW,EAAE,CAAC;IACpC,aAAa;IACb,YAAY,IAAI,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC;IAC5D,YAAY,IAAI,aAAa,EAAE;IAC/B,gBAAgB,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACtC,aAAa;IACb,YAAY,IAAI,CAAC,CAAC,QAAQ,EAAE;IAC5B,gBAAgB,QAAQ,CAAC,QAAQ,EAAE,CAAC;IACpC,aAAa;IACb,iBAAiB;IACjB,gBAAgB,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAClC,aAAa;IACb,SAAS,CAAC;IACV,QAAQ,MAAM,CAAC,SAAS,GAAG,UAAU,CAAC,EAAE;IACxC,YAAY,IAAI;IAChB,gBAAgB,IAAI,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;IAC9D,gBAAgB,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/C,aAAa;IACb,YAAY,OAAO,GAAG,EAAE;IACxB,gBAAgB,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACpC,aAAa;IACb,SAAS,CAAC;IACV,KAAK,CAAC;IACN,IAAI,gBAAgB,CAAC,SAAS,CAAC,UAAU,GAAG,UAAU,UAAU,EAAE;IAClE,QAAQ,IAAI,KAAK,GAAG,IAAI,CAAC;IACzB,QAAQ,IAAI,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IACjC,QAAQ,IAAI,MAAM,EAAE;IACpB,YAAY,OAAO,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAChD,SAAS;IACT,QAAQ,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;IAC3B,YAAY,IAAI,CAAC,cAAc,EAAE,CAAC;IAClC,SAAS;IACT,QAAQ,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC3C,QAAQ,UAAU,CAAC,GAAG,CAAC,YAAY;IACnC,YAAY,IAAI,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;IACxC,YAAY,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;IACtD,gBAAgB,IAAI,OAAO,KAAK,OAAO,CAAC,UAAU,KAAK,CAAC,IAAI,OAAO,CAAC,UAAU,KAAK,CAAC,CAAC,EAAE;IACvF,oBAAoB,OAAO,CAAC,KAAK,EAAE,CAAC;IACpC,iBAAiB;IACjB,gBAAgB,KAAK,CAAC,WAAW,EAAE,CAAC;IACpC,aAAa;IACb,SAAS,CAAC,CAAC;IACX,QAAQ,OAAO,UAAU,CAAC;IAC1B,KAAK,CAAC;IACN,IAAI,gBAAgB,CAAC,SAAS,CAAC,WAAW,GAAG,YAAY;IACzD,QAAQ,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IACnC,QAAQ,IAAI,OAAO,KAAK,OAAO,CAAC,UAAU,KAAK,CAAC,IAAI,OAAO,CAAC,UAAU,KAAK,CAAC,CAAC,EAAE;IAC/E,YAAY,OAAO,CAAC,KAAK,EAAE,CAAC;IAC5B,SAAS;IACT,QAAQ,IAAI,CAAC,WAAW,EAAE,CAAC;IAC3B,QAAQ,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChD,KAAK,CAAC;IACN,IAAI,OAAO,gBAAgB,CAAC;IAC5B,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;;ICzNd,SAAS,SAAS,CAAC,iBAAiB,EAAE;IAC7C,IAAI,OAAO,IAAI,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;IACnD,CAAC;;;;;;;;;ICCM,SAAS,SAAS,CAAC,KAAK,EAAE,gBAAgB,EAAE;IACnD,IAAI,IAAI,gBAAgB,KAAK,KAAK,CAAC,EAAE,EAAE,gBAAgB,GAAG,EAAE,CAAC,EAAE;IAC/D,IAAI,IAAI,QAAQ,GAAG,gBAAgB,CAAC,QAAQ,EAAE,IAAI,GAAG,MAAM,CAAC,gBAAgB,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAC5F,IAAI,OAAO,IAAI,UAAU,CAAC,UAAU,UAAU,EAAE;IAChD,QAAQ,IAAI,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;IAC/C,QAAQ,IAAI,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IACvC,QAAQ,IAAI,SAAS,GAAG,IAAI,CAAC;IAC7B,QAAQ,IAAI,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC;IACtC,QAAQ,IAAI,WAAW,EAAE;IACzB,YAAY,IAAI,WAAW,CAAC,OAAO,EAAE;IACrC,gBAAgB,UAAU,CAAC,KAAK,EAAE,CAAC;IACnC,aAAa;IACb,iBAAiB;IACjB,gBAAgB,IAAI,oBAAoB,GAAG,YAAY;IACvD,oBAAoB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;IACzC,wBAAwB,UAAU,CAAC,KAAK,EAAE,CAAC;IAC3C,qBAAqB;IACrB,iBAAiB,CAAC;IAClB,gBAAgB,WAAW,CAAC,gBAAgB,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC;IAC5E,gBAAgB,UAAU,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,WAAW,CAAC,mBAAmB,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC;IACvH,aAAa;IACb,SAAS;IACT,QAAQ,IAAI,iBAAiB,GAAG,QAAQ,CAAC,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACjF,QAAQ,IAAI,WAAW,GAAG,UAAU,GAAG,EAAE;IACzC,YAAY,SAAS,GAAG,KAAK,CAAC;IAC9B,YAAY,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClC,SAAS,CAAC;IACV,QAAQ,KAAK,CAAC,KAAK,EAAE,iBAAiB,CAAC;IACvC,aAAa,IAAI,CAAC,UAAU,QAAQ,EAAE;IACtC,YAAY,IAAI,QAAQ,EAAE;IAC1B,gBAAgB,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,YAAY;IACpH,oBAAoB,SAAS,GAAG,KAAK,CAAC;IACtC,oBAAoB,UAAU,CAAC,QAAQ,EAAE,CAAC;IAC1C,iBAAiB,EAAE,WAAW,CAAC,CAAC,CAAC;IACjC,aAAa;IACb,iBAAiB;IACjB,gBAAgB,SAAS,GAAG,KAAK,CAAC;IAClC,gBAAgB,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC1C,gBAAgB,UAAU,CAAC,QAAQ,EAAE,CAAC;IACtC,aAAa;IACb,SAAS,CAAC;IACV,aAAa,KAAK,CAAC,WAAW,CAAC,CAAC;IAChC,QAAQ,OAAO,YAAY;IAC3B,YAAY,IAAI,SAAS,EAAE;IAC3B,gBAAgB,UAAU,CAAC,KAAK,EAAE,CAAC;IACnC,aAAa;IACb,SAAS,CAAC;IACV,KAAK,CAAC,CAAC;IACP,CAAC;;;;;;;;AClDS,QAAC,SAAS,GAAG,UAAU,CAAC;AAClC,AACU,QAAC,OAAO,GAAG,QAAQ,CAAC;AAC9B,AACU,QAACC,MAAI,GAAG,KAAK,CAAC;AACxB,AACU,QAACC,WAAS,GAAG,UAAU,CAAC;AAClC,AACU,QAACC,OAAK,GAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} diff --git a/node_modules/rxjs/dist/bundles/rxjs.umd.min.js b/node_modules/rxjs/dist/bundles/rxjs.umd.min.js deleted file mode 100644 index e68d7eb..0000000 --- a/node_modules/rxjs/dist/bundles/rxjs.umd.min.js +++ /dev/null @@ -1,195 +0,0 @@ -/** - @license - Apache License 2.0 https://github.com/ReactiveX/RxJS/blob/master/LICENSE.txt - **/ -/** - @license - Apache License 2.0 https://github.com/ReactiveX/RxJS/blob/master/LICENSE.txt - **/ -/* - ***************************************************************************** - Copyright (c) Microsoft Corporation. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. -*****************************************************************************/ -(function(g,y){"object"===typeof exports&&"undefined"!==typeof module?y(exports):"function"===typeof define&&define.amd?define("rxjs",["exports"],y):y(g.rxjs={})})(this,function(g){function y(b,a){function c(){this.constructor=b}if("function"!==typeof a&&null!==a)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");Ta(b,a);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)}function Zd(b,a){var c={},d;for(d in b)Object.prototype.hasOwnProperty.call(b, -d)&&0>a.indexOf(d)&&(c[d]=b[d]);if(null!=b&&"function"===typeof Object.getOwnPropertySymbols){var e=0;for(d=Object.getOwnPropertySymbols(b);ea.indexOf(d[e])&&Object.prototype.propertyIsEnumerable.call(b,d[e])&&(c[d[e]]=b[d[e]])}return c}function $d(b,a,c,d){function e(a){return a instanceof c?a:new c(function(b){b(a)})}return new (c||(c=Promise))(function(c,h){function f(a){try{z(d.next(a))}catch(v){h(v)}}function k(a){try{z(d["throw"](a))}catch(v){h(v)}}function z(a){a.done?c(a.value): -e(a.value).then(f,k)}z((d=d.apply(b,a||[])).next())})}function Ua(b,a){function c(a){return function(b){return d([a,b])}}function d(c){if(f)throw new TypeError("Generator is already executing.");for(;e;)try{if(f=1,h&&(l=c[0]&2?h["return"]:c[0]?h["throw"]||((l=h["return"])&&l.call(h),0):h.next)&&!(l=l.call(h,c[1])).done)return l;if(h=0,l)c=[c[0]&2,l.value];switch(c[0]){case 0:case 1:l=c;break;case 4:return e.label++,{value:c[1],done:!1};case 5:e.label++;h=c[1];c=[0];continue;case 7:c=e.ops.pop();e.trys.pop(); -continue;default:if(!(l=e.trys,l=0l[0]&&c[1]=b.length&&(b=void 0);return{value:b&&b[d++],done:!b}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.");}function w(b,a){var c="function"===typeof Symbol&&b[Symbol.iterator];if(!c)return b;b= -c.call(b);var d,e=[],f;try{for(;(void 0===a||0=b._refCount||0<--b._refCount)c=null;else{var d=b._connection,f=c;c=null;!d||f&&d!==f||d.unsubscribe();a.unsubscribe()}});b.subscribe(d);d.closed||(c=b.connect())})}function Mb(b){return new r(function(a){var c=b||Da,d=c.now(),e=0,f=function(){a.closed||(e=N.requestAnimationFrame(function(h){e=0;var l=c.now();a.next({timestamp:b?l:h,elapsed:l-d});f()}))};f();return function(){e&&N.cancelAnimationFrame(e)}})}function Nb(b){return b in -$a?(delete $a[b],!0):!1}function de(b){return new r(function(a){return b.schedule(function(){return a.complete()})})}function Ea(b){return b&&t(b.schedule)}function oa(b){return t(b[b.length-1])?b.pop():void 0}function O(b){return Ea(b[b.length-1])?b.pop():void 0}function Ob(b){return Symbol.asyncIterator&&t(null===b||void 0===b?void 0:b[Symbol.asyncIterator])}function Pb(b){return new TypeError("You provided "+(null!==b&&"object"===typeof b?"an invalid object":"'"+b+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")} -function Qb(b){return t(null===b||void 0===b?void 0:b[ab])}function Rb(b){return ae(this,arguments,function(){var a,c,d,e;return Ua(this,function(f){switch(f.label){case 0:a=b.getReader(),f.label=1;case 1:f.trys.push([1,,9,10]),f.label=2;case 2:return[4,ba(a.read())];case 3:return c=f.sent(),d=c.value,(e=c.done)?[4,ba(void 0)]:[3,5];case 4:return[2,f.sent()];case 5:return[4,ba(d)];case 6:return[4,f.sent()];case 7:return f.sent(),[3,2];case 8:return[3,10];case 9:return a.releaseLock(),[7];case 10:return[2]}})})} -function q(b){if(b instanceof r)return b;if(null!=b){if(t(b[pa]))return ee(b);if(bb(b))return fe(b);if(t(null===b||void 0===b?void 0:b.then))return ge(b);if(Ob(b))return Sb(b);if(Qb(b))return he(b);if(t(null===b||void 0===b?void 0:b.getReader))return Sb(Rb(b))}throw Pb(b);}function ee(b){return new r(function(a){var c=b[pa]();if(t(c.subscribe))return c.subscribe(a);throw new TypeError("Provided object does not correctly implement Symbol.observable");})}function fe(b){return new r(function(a){for(var c= -0;ce&&(e=0);var h=0;return c.schedule(function(){a.closed||(a.next(h++),0<=d?this.schedule(void 0,d):a.complete())},e)})}function ec(b,a){void 0===b&&(b=0);void 0===a&&(a=I);0>b&&(b=0);return Y(b,b,a)}function ea(b){return 1===b.length&&we(b[0])?b[0]:b}function fc(){for(var b=[],a=0;a=b?function(){return L}:n(function(a,c){var d=0;a.subscribe(m(c,function(a){++d<=b&&(c.next(a),b<=d&&c.complete())}))})} -function ob(){return n(function(b,a){b.subscribe(m(a,C))})}function pb(b){return Q(function(){return b})}function Ma(b,a){return a?function(c){return ta(a.pipe(ga(1),ob()),c.pipe(Ma(b)))}:H(function(a,d){return q(b(a,d)).pipe(ga(1),pb(a))})}function xc(b,a){void 0===a&&(a=I);var c=Y(b,a);return Ma(function(){return c})}function yc(){return n(function(b,a){b.subscribe(m(a,function(c){return Fa(c,a)}))})}function zc(b,a){return n(function(c,d){var e=new Set;c.subscribe(m(d,function(a){var c=b?b(a): -a;e.has(c)||(e.add(c),d.next(a))}));a&&q(a).subscribe(m(d,function(){return e.clear()},C))})}function qb(b,a){void 0===a&&(a=E);b=null!==b&&void 0!==b?b:De;return n(function(c,d){var e,f=!0;c.subscribe(m(d,function(c){var h=a(c);if(f||!b(e,h))f=!1,e=h,d.next(c)}))})}function De(b,a){return b===a}function Ac(b,a){return qb(function(c,d){return a?a(c[b],d[b]):c[b]===d[b]})}function va(b){void 0===b&&(b=Ee);return n(function(a,c){var d=!1;a.subscribe(m(c,function(a){d=!0;c.next(a)},function(){return d? -c.complete():c.error(b())}))})}function Ee(){return new Z}function Bc(b,a){if(0>b)throw new rb;var c=2<=arguments.length;return function(d){return d.pipe(K(function(a,c){return c===b}),ga(1),c?ua(a):va(function(){return new rb}))}}function Cc(){for(var b=[],a=0;a(a||0)?Infinity:a;return n(function(d,e){return gb(d,e,b,a,void 0,!0,c)})}function Fc(b){return n(function(a, -c){try{a.subscribe(c)}finally{c.add(b)}})}function Gc(b,a){return n(Hc(b,a,"value"))}function Hc(b,a,c){var d="index"===c;return function(c,f){var e=0;c.subscribe(m(f,function(h){var l=e++;b.call(a,h,l,c)&&(f.next(d?l:h),f.complete())},function(){f.next(d?-1:void 0);f.complete()}))}}function Ic(b,a){return n(Hc(b,a,"index"))}function Jc(b,a){var c=2<=arguments.length;return function(d){return d.pipe(b?K(function(a,c){return b(a,c,d)}):E,ga(1),c?ua(a):va(function(){return new Z}))}}function Kc(b,a, -c,d){return n(function(e,f){function h(a,c){var b=new r(function(a){v++;var b=c.subscribe(a);return function(){b.unsubscribe();0===--v&&n&&Va.unsubscribe()}});b.key=a;return b}var l;a&&"function"!==typeof a?(c=a.duration,l=a.element,d=a.connector):l=a;var k=new Map,g=function(a){k.forEach(a);a(f)},p=function(a){return g(function(c){return c.error(a)})},v=0,n=!1,Va=new Ya(f,function(a){try{var e=b(a),g=k.get(e);if(!g){k.set(e,g=d?d():new A);var z=h(e,g);f.next(z);if(c){var v=m(g,function(){g.complete(); -null===v||void 0===v?void 0:v.unsubscribe()},void 0,void 0,function(){return k.delete(e)});Va.add(q(c(z)).subscribe(v))}}g.next(l?l(a):a)}catch(xe){p(xe)}},function(){return g(function(a){return a.complete()})},p,function(){return k.clear()},function(){n=!0;return 0===v});e.subscribe(Va)})}function Lc(){return n(function(b,a){b.subscribe(m(a,function(){a.next(!1);a.complete()},function(){a.next(!0);a.complete()}))})}function sb(b){return 0>=b?function(){return L}:n(function(a,c){var d=[];a.subscribe(m(c, -function(a){d.push(a);bc?a:c})}function Pc(b,a,c){void 0===c&&(c=Infinity);if(t(a))return H(function(){return b},a,c);"number"===typeof a&&(c=a);return H(function(){return b},c)}function Qc(b,a,c){void 0===c&&(c=Infinity);return n(function(d,e){var f=a;return gb(d,e,function(a,c){return b(f,a,c)},c,function(a){f=a},!1,void 0, -function(){return f=null})})}function Rc(){for(var b=[],a=0;ab(a,c)?a:c}:function(a,c){return a=c?function(){return L}:n(function(a,b){var e=0,f,k=function(){null===f||void 0===f?void 0:f.unsubscribe();f=null;if(null!=d){var a="number"===typeof d?Y(d):q(d(e)),c=m(b,function(){c.unsubscribe();g()});a.subscribe(c)}else g()},g=function(){var d=!1;f=a.subscribe(m(b,void 0,function(){++e=c?E:n(function(a,b){var f=0,h,g=function(){var l= -!1;h=a.subscribe(m(b,function(a){e&&(f=0);b.next(a)},void 0,function(a){if(f++=b?E:n(function(a,c){var d=Array(b),e=0;a.subscribe(m(c,function(a){var f= -e++;if(fe){null===(b=null===r||void 0===r?void 0:r.complete)||void 0===b?void 0:b.call(r);b=void 0;try{b=new yb(c,u,q,Od+"_"+c.type)}catch(ye){a.error(ye);return}a.next(b);a.complete()}else null===(d=null===r||void 0===r?void 0:r.error)||void 0===d?void 0:d.call(r,c),x(e)});e=q.user;d=q.method;h=q.async;e?u.open(d,k,h,e,q.password):u.open(d,k,h);h&&(u.timeout=q.timeout,u.responseType= -q.responseType);"withCredentials"in u&&(u.withCredentials=q.withCredentials);for(p in f)f.hasOwnProperty(p)&&u.setRequestHeader(p,f[p]);c?u.send(c):u.send();return function(){u&&4!==u.readyState&&u.abort()}})}function Oe(b,a){var c;if(!b||"string"===typeof b||"undefined"!==typeof FormData&&b instanceof FormData||"undefined"!==typeof URLSearchParams&&b instanceof URLSearchParams||Bb(b,"ArrayBuffer")||Bb(b,"File")||Bb(b,"Blob")||"undefined"!==typeof ReadableStream&&b instanceof ReadableStream)return b; -if("undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView(b))return b.buffer;if("object"===typeof b)return a["content-type"]=null!==(c=a["content-type"])&&void 0!==c?c:"application/json;charset\x3dutf-8",JSON.stringify(b);throw new TypeError("Unknown body type");}function Bb(b,a){return Qe.call(b)==="[object "+a+"]"}var Ta=function(b,a){Ta=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)Object.prototype.hasOwnProperty.call(b,c)&&(a[c]= -b[c])};return Ta(b,a)},T=function(){T=Object.assign||function(b){for(var a,c=1,d=arguments.length;ca&&hb.index?1:-1:a.delay>b.delay?1:-1};return a}(ya),L=new r(function(b){return b.complete()}),bb=function(b){return b&&"number"===typeof b.length&&"function"!==typeof b},ab;ab="function"===typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";(function(b){b.NEXT= -"N";b.ERROR="E";b.COMPLETE="C"})(g.NotificationKind||(g.NotificationKind={}));var Pa=function(){function b(a,b,d){this.kind=a;this.value=b;this.error=d;this.hasValue="N"===a}b.prototype.observe=function(a){return Fa(this,a)};b.prototype.do=function(a,b,d){var c=this.kind,f=this.value,h=this.error;return"N"===c?null===a||void 0===a?void 0:a(f):"E"===c?null===b||void 0===b?void 0:b(h):null===d||void 0===d?void 0:d()};b.prototype.accept=function(a,b,d){return t(null===a||void 0===a?void 0:a.next)?this.observe(a): -this.do(a,b,d)};b.prototype.toObservable=function(){var a=this.kind,b=this.value,d=this.error,b="N"===a?cb(b):"E"===a?Wb(function(){return d}):"C"===a?L:0;if(!b)throw new TypeError("Unexpected notification kind "+a);return b};b.createNext=function(a){return new b("N",a)};b.createError=function(a){return new b("E",void 0,a)};b.createComplete=function(){return b.completeNotification};b.completeNotification=new b("C");return b}(),Z=R(function(b){return function(){b(this);this.name="EmptyError";this.message= -"no elements in sequence"}}),rb=R(function(b){return function(){b(this);this.name="ArgumentOutOfRangeError";this.message="argument out of range"}}),ld=R(function(b){return function(a){b(this);this.name="NotFoundError";this.message=a}}),kd=R(function(b){return function(a){b(this);this.name="SequenceError";this.message=a}}),Xb=R(function(b){return function(a){void 0===a&&(a=null);b(this);this.message="Timeout has occurred";this.name="TimeoutError";this.info=a}}),le=Array.isArray,me=Array.isArray,ne= -Object.getPrototypeOf,oe=Object.prototype,pe=Object.keys,$e={connector:function(){return new A},resetOnDisconnect:!0},te=["addListener","removeListener"],re=["addEventListener","removeEventListener"],ve=["on","off"],Vd=new r(C),we=Array.isArray,Ae=function(b,a){return b.push(a),b},Ce={connector:function(){return new A}},Fe=function(){return function(b,a){this.value=b;this.interval=a}}(),af=Object.freeze({audit:kb,auditTime:ic,buffer:jc,bufferCount:kc,bufferTime:lc,bufferToggle:mc,bufferWhen:nc,catchError:lb, -combineAll:Ja,combineLatestAll:Ja,combineLatest:nb,combineLatestWith:qc,concat:sc,concatAll:Ha,concatMap:Ka,concatMapTo:rc,concatWith:tc,connect:La,count:uc,debounce:vc,debounceTime:wc,defaultIfEmpty:ua,delay:xc,delayWhen:Ma,dematerialize:yc,distinct:zc,distinctUntilChanged:qb,distinctUntilKeyChanged:Ac,elementAt:Bc,endWith:Cc,every:Dc,exhaust:Oa,exhaustAll:Oa,exhaustMap:Na,expand:Ec,filter:K,finalize:Fc,find:Gc,findIndex:Ic,first:Jc,groupBy:Kc,ignoreElements:ob,isEmpty:Lc,last:Mc,map:Q,mapTo:pb, -materialize:Nc,max:Oc,merge:Rc,mergeAll:sa,flatMap:H,mergeMap:H,mergeMapTo:Pc,mergeScan:Qc,mergeWith:Sc,min:Tc,multicast:Qa,observeOn:qa,onErrorResumeNext:Uc,pairwise:Vc,partition:function(b,a){return function(c){return[K(b,a)(c),K(gc(b,a))(c)]}},pluck:Wc,publish:Xc,publishBehavior:Yc,publishLast:$c,publishReplay:ad,race:function(){for(var b=[],a=0;ak?new Aa(l):new Aa(l,k)};a.parseMarbles=function(a,b,e,f,g){var c=this;void 0===f&&(f=!1);void 0===g&&(g=!1);if(-1!==a.indexOf("!"))throw Error('conventional marble diagrams cannot have the unsubscription marker "!"'); -var d=x([],w(a)),h=d.length,p=[];a=g?a.replace(/^[ ]+/,"").indexOf("^"):a.indexOf("^");var m=-1===a?0:a*-this.frameTimeFactor,n="object"!==typeof b?function(a){return a}:function(a){return f&&b[a]instanceof Hb?b[a].messages:b[a]},q=-1;a=function(a){var b=m,f=function(a){b+=a*c.frameTimeFactor},h=void 0,k=d[a];switch(k){case " ":g||f(1);break;case "-":f(1);break;case "(":q=m;f(1);break;case ")":q=-1;f(1);break;case "|":h=xa;f(1);break;case "^":f(1);break;case "#":h=J("E",void 0,e||"error");f(1);break; -default:if(g&&k.match(/^[0-9]$/)&&(0===a||" "===d[a-1])){var l=d.slice(a).join("").match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /);if(l){a+=l[0].length-1;var k=parseFloat(l[1]),v=void 0;switch(l[2]){case "ms":v=k;break;case "s":v=1E3*k;break;case "m":v=6E4*k}f(v/r.frameTimeFactor);break}}h=J("N",n(k),void 0);f(1)}h&&p.push({frame:-1=a)return L;var d=a+b;return new r(c?function(a){var e=b;return c.schedule(function(){e= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AnonymousSubject = exports.Subject = void 0; -var Observable_1 = require("./Observable"); -var Subscription_1 = require("./Subscription"); -var ObjectUnsubscribedError_1 = require("./util/ObjectUnsubscribedError"); -var arrRemove_1 = require("./util/arrRemove"); -var errorContext_1 = require("./util/errorContext"); -var Subject = (function (_super) { - __extends(Subject, _super); - function Subject() { - var _this = _super.call(this) || this; - _this.closed = false; - _this.currentObservers = null; - _this.observers = []; - _this.isStopped = false; - _this.hasError = false; - _this.thrownError = null; - return _this; - } - Subject.prototype.lift = function (operator) { - var subject = new AnonymousSubject(this, this); - subject.operator = operator; - return subject; - }; - Subject.prototype._throwIfClosed = function () { - if (this.closed) { - throw new ObjectUnsubscribedError_1.ObjectUnsubscribedError(); - } - }; - Subject.prototype.next = function (value) { - var _this = this; - errorContext_1.errorContext(function () { - var e_1, _a; - _this._throwIfClosed(); - if (!_this.isStopped) { - if (!_this.currentObservers) { - _this.currentObservers = Array.from(_this.observers); - } - try { - for (var _b = __values(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) { - var observer = _c.value; - observer.next(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } - } - } - }); - }; - Subject.prototype.error = function (err) { - var _this = this; - errorContext_1.errorContext(function () { - _this._throwIfClosed(); - if (!_this.isStopped) { - _this.hasError = _this.isStopped = true; - _this.thrownError = err; - var observers = _this.observers; - while (observers.length) { - observers.shift().error(err); - } - } - }); - }; - Subject.prototype.complete = function () { - var _this = this; - errorContext_1.errorContext(function () { - _this._throwIfClosed(); - if (!_this.isStopped) { - _this.isStopped = true; - var observers = _this.observers; - while (observers.length) { - observers.shift().complete(); - } - } - }); - }; - Subject.prototype.unsubscribe = function () { - this.isStopped = this.closed = true; - this.observers = this.currentObservers = null; - }; - Object.defineProperty(Subject.prototype, "observed", { - get: function () { - var _a; - return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0; - }, - enumerable: false, - configurable: true - }); - Subject.prototype._trySubscribe = function (subscriber) { - this._throwIfClosed(); - return _super.prototype._trySubscribe.call(this, subscriber); - }; - Subject.prototype._subscribe = function (subscriber) { - this._throwIfClosed(); - this._checkFinalizedStatuses(subscriber); - return this._innerSubscribe(subscriber); - }; - Subject.prototype._innerSubscribe = function (subscriber) { - var _this = this; - var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers; - if (hasError || isStopped) { - return Subscription_1.EMPTY_SUBSCRIPTION; - } - this.currentObservers = null; - observers.push(subscriber); - return new Subscription_1.Subscription(function () { - _this.currentObservers = null; - arrRemove_1.arrRemove(observers, subscriber); - }); - }; - Subject.prototype._checkFinalizedStatuses = function (subscriber) { - var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped; - if (hasError) { - subscriber.error(thrownError); - } - else if (isStopped) { - subscriber.complete(); - } - }; - Subject.prototype.asObservable = function () { - var observable = new Observable_1.Observable(); - observable.source = this; - return observable; - }; - Subject.create = function (destination, source) { - return new AnonymousSubject(destination, source); - }; - return Subject; -}(Observable_1.Observable)); -exports.Subject = Subject; -var AnonymousSubject = (function (_super) { - __extends(AnonymousSubject, _super); - function AnonymousSubject(destination, source) { - var _this = _super.call(this) || this; - _this.destination = destination; - _this.source = source; - return _this; - } - AnonymousSubject.prototype.next = function (value) { - var _a, _b; - (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value); - }; - AnonymousSubject.prototype.error = function (err) { - var _a, _b; - (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err); - }; - AnonymousSubject.prototype.complete = function () { - var _a, _b; - (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a); - }; - AnonymousSubject.prototype._subscribe = function (subscriber) { - var _a, _b; - return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : Subscription_1.EMPTY_SUBSCRIPTION; - }; - return AnonymousSubject; -}(Subject)); -exports.AnonymousSubject = AnonymousSubject; -//# sourceMappingURL=Subject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/Subject.js.map b/node_modules/rxjs/dist/cjs/internal/Subject.js.map deleted file mode 100644 index 3afb1a3..0000000 --- a/node_modules/rxjs/dist/cjs/internal/Subject.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Subject.js","sourceRoot":"","sources":["../../../src/internal/Subject.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAE1C,+CAAkE;AAElE,0EAAyE;AACzE,8CAA6C;AAC7C,oDAAmD;AASnD;IAAgC,2BAAa;IAuB3C;QAAA,YAEE,iBAAO,SACR;QAzBD,YAAM,GAAG,KAAK,CAAC;QAEP,sBAAgB,GAAyB,IAAI,CAAC;QAGtD,eAAS,GAAkB,EAAE,CAAC;QAE9B,eAAS,GAAG,KAAK,CAAC;QAElB,cAAQ,GAAG,KAAK,CAAC;QAEjB,iBAAW,GAAQ,IAAI,CAAC;;IAcxB,CAAC;IAGD,sBAAI,GAAJ,UAAQ,QAAwB;QAC9B,IAAM,OAAO,GAAG,IAAI,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACjD,OAAO,CAAC,QAAQ,GAAG,QAAe,CAAC;QACnC,OAAO,OAAc,CAAC;IACxB,CAAC;IAGS,gCAAc,GAAxB;QACE,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,MAAM,IAAI,iDAAuB,EAAE,CAAC;SACrC;IACH,CAAC;IAED,sBAAI,GAAJ,UAAK,KAAQ;QAAb,iBAYC;QAXC,2BAAY,CAAC;;YACX,KAAI,CAAC,cAAc,EAAE,CAAC;YACtB,IAAI,CAAC,KAAI,CAAC,SAAS,EAAE;gBACnB,IAAI,CAAC,KAAI,CAAC,gBAAgB,EAAE;oBAC1B,KAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC,IAAI,CAAC,KAAI,CAAC,SAAS,CAAC,CAAC;iBACpD;;oBACD,KAAuB,IAAA,KAAA,SAAA,KAAI,CAAC,gBAAgB,CAAA,gBAAA,4BAAE;wBAAzC,IAAM,QAAQ,WAAA;wBACjB,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;qBACtB;;;;;;;;;aACF;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,uBAAK,GAAL,UAAM,GAAQ;QAAd,iBAYC;QAXC,2BAAY,CAAC;YACX,KAAI,CAAC,cAAc,EAAE,CAAC;YACtB,IAAI,CAAC,KAAI,CAAC,SAAS,EAAE;gBACnB,KAAI,CAAC,QAAQ,GAAG,KAAI,CAAC,SAAS,GAAG,IAAI,CAAC;gBACtC,KAAI,CAAC,WAAW,GAAG,GAAG,CAAC;gBACf,IAAA,SAAS,GAAK,KAAI,UAAT,CAAU;gBAC3B,OAAO,SAAS,CAAC,MAAM,EAAE;oBACvB,SAAS,CAAC,KAAK,EAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBAC/B;aACF;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,0BAAQ,GAAR;QAAA,iBAWC;QAVC,2BAAY,CAAC;YACX,KAAI,CAAC,cAAc,EAAE,CAAC;YACtB,IAAI,CAAC,KAAI,CAAC,SAAS,EAAE;gBACnB,KAAI,CAAC,SAAS,GAAG,IAAI,CAAC;gBACd,IAAA,SAAS,GAAK,KAAI,UAAT,CAAU;gBAC3B,OAAO,SAAS,CAAC,MAAM,EAAE;oBACvB,SAAS,CAAC,KAAK,EAAG,CAAC,QAAQ,EAAE,CAAC;iBAC/B;aACF;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,6BAAW,GAAX;QACE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACpC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,gBAAgB,GAAG,IAAK,CAAC;IACjD,CAAC;IAED,sBAAI,6BAAQ;aAAZ;;YACE,OAAO,CAAA,MAAA,IAAI,CAAC,SAAS,0CAAE,MAAM,IAAG,CAAC,CAAC;QACpC,CAAC;;;OAAA;IAGS,+BAAa,GAAvB,UAAwB,UAAyB;QAC/C,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,OAAO,iBAAM,aAAa,YAAC,UAAU,CAAC,CAAC;IACzC,CAAC;IAGS,4BAAU,GAApB,UAAqB,UAAyB;QAC5C,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,IAAI,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC;QACzC,OAAO,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;IAC1C,CAAC;IAGS,iCAAe,GAAzB,UAA0B,UAA2B;QAArD,iBAWC;QAVO,IAAA,KAAqC,IAAI,EAAvC,QAAQ,cAAA,EAAE,SAAS,eAAA,EAAE,SAAS,eAAS,CAAC;QAChD,IAAI,QAAQ,IAAI,SAAS,EAAE;YACzB,OAAO,iCAAkB,CAAC;SAC3B;QACD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;QAC7B,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC3B,OAAO,IAAI,2BAAY,CAAC;YACtB,KAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;YAC7B,qBAAS,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;IACL,CAAC;IAGS,yCAAuB,GAAjC,UAAkC,UAA2B;QACrD,IAAA,KAAuC,IAAI,EAAzC,QAAQ,cAAA,EAAE,WAAW,iBAAA,EAAE,SAAS,eAAS,CAAC;QAClD,IAAI,QAAQ,EAAE;YACZ,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;SAC/B;aAAM,IAAI,SAAS,EAAE;YACpB,UAAU,CAAC,QAAQ,EAAE,CAAC;SACvB;IACH,CAAC;IAQD,8BAAY,GAAZ;QACE,IAAM,UAAU,GAAQ,IAAI,uBAAU,EAAK,CAAC;QAC5C,UAAU,CAAC,MAAM,GAAG,IAAI,CAAC;QACzB,OAAO,UAAU,CAAC;IACpB,CAAC;IAxHM,cAAM,GAA4B,UAAI,WAAwB,EAAE,MAAqB;QAC1F,OAAO,IAAI,gBAAgB,CAAI,WAAW,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC,CAAC;IAuHJ,cAAC;CAAA,AA5ID,CAAgC,uBAAU,GA4IzC;AA5IY,0BAAO;AA8IpB;IAAyC,oCAAU;IACjD,0BAES,WAAyB,EAChC,MAAsB;QAHxB,YAKE,iBAAO,SAER;QALQ,iBAAW,GAAX,WAAW,CAAc;QAIhC,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;;IACvB,CAAC;IAED,+BAAI,GAAJ,UAAK,KAAQ;;QACX,MAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,IAAI,mDAAG,KAAK,CAAC,CAAC;IAClC,CAAC;IAED,gCAAK,GAAL,UAAM,GAAQ;;QACZ,MAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,KAAK,mDAAG,GAAG,CAAC,CAAC;IACjC,CAAC;IAED,mCAAQ,GAAR;;QACE,MAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,QAAQ,kDAAI,CAAC;IACjC,CAAC;IAGS,qCAAU,GAApB,UAAqB,UAAyB;;QAC5C,OAAO,MAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,SAAS,CAAC,UAAU,CAAC,mCAAI,iCAAkB,CAAC;IAClE,CAAC;IACH,uBAAC;AAAD,CAAC,AA1BD,CAAyC,OAAO,GA0B/C;AA1BY,4CAAgB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/Subscriber.js b/node_modules/rxjs/dist/cjs/internal/Subscriber.js deleted file mode 100644 index 743e9c8..0000000 --- a/node_modules/rxjs/dist/cjs/internal/Subscriber.js +++ /dev/null @@ -1,201 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.EMPTY_OBSERVER = exports.SafeSubscriber = exports.Subscriber = void 0; -var isFunction_1 = require("./util/isFunction"); -var Subscription_1 = require("./Subscription"); -var config_1 = require("./config"); -var reportUnhandledError_1 = require("./util/reportUnhandledError"); -var noop_1 = require("./util/noop"); -var NotificationFactories_1 = require("./NotificationFactories"); -var timeoutProvider_1 = require("./scheduler/timeoutProvider"); -var errorContext_1 = require("./util/errorContext"); -var Subscriber = (function (_super) { - __extends(Subscriber, _super); - function Subscriber(destination) { - var _this = _super.call(this) || this; - _this.isStopped = false; - if (destination) { - _this.destination = destination; - if (Subscription_1.isSubscription(destination)) { - destination.add(_this); - } - } - else { - _this.destination = exports.EMPTY_OBSERVER; - } - return _this; - } - Subscriber.create = function (next, error, complete) { - return new SafeSubscriber(next, error, complete); - }; - Subscriber.prototype.next = function (value) { - if (this.isStopped) { - handleStoppedNotification(NotificationFactories_1.nextNotification(value), this); - } - else { - this._next(value); - } - }; - Subscriber.prototype.error = function (err) { - if (this.isStopped) { - handleStoppedNotification(NotificationFactories_1.errorNotification(err), this); - } - else { - this.isStopped = true; - this._error(err); - } - }; - Subscriber.prototype.complete = function () { - if (this.isStopped) { - handleStoppedNotification(NotificationFactories_1.COMPLETE_NOTIFICATION, this); - } - else { - this.isStopped = true; - this._complete(); - } - }; - Subscriber.prototype.unsubscribe = function () { - if (!this.closed) { - this.isStopped = true; - _super.prototype.unsubscribe.call(this); - this.destination = null; - } - }; - Subscriber.prototype._next = function (value) { - this.destination.next(value); - }; - Subscriber.prototype._error = function (err) { - try { - this.destination.error(err); - } - finally { - this.unsubscribe(); - } - }; - Subscriber.prototype._complete = function () { - try { - this.destination.complete(); - } - finally { - this.unsubscribe(); - } - }; - return Subscriber; -}(Subscription_1.Subscription)); -exports.Subscriber = Subscriber; -var _bind = Function.prototype.bind; -function bind(fn, thisArg) { - return _bind.call(fn, thisArg); -} -var ConsumerObserver = (function () { - function ConsumerObserver(partialObserver) { - this.partialObserver = partialObserver; - } - ConsumerObserver.prototype.next = function (value) { - var partialObserver = this.partialObserver; - if (partialObserver.next) { - try { - partialObserver.next(value); - } - catch (error) { - handleUnhandledError(error); - } - } - }; - ConsumerObserver.prototype.error = function (err) { - var partialObserver = this.partialObserver; - if (partialObserver.error) { - try { - partialObserver.error(err); - } - catch (error) { - handleUnhandledError(error); - } - } - else { - handleUnhandledError(err); - } - }; - ConsumerObserver.prototype.complete = function () { - var partialObserver = this.partialObserver; - if (partialObserver.complete) { - try { - partialObserver.complete(); - } - catch (error) { - handleUnhandledError(error); - } - } - }; - return ConsumerObserver; -}()); -var SafeSubscriber = (function (_super) { - __extends(SafeSubscriber, _super); - function SafeSubscriber(observerOrNext, error, complete) { - var _this = _super.call(this) || this; - var partialObserver; - if (isFunction_1.isFunction(observerOrNext) || !observerOrNext) { - partialObserver = { - next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined), - error: error !== null && error !== void 0 ? error : undefined, - complete: complete !== null && complete !== void 0 ? complete : undefined, - }; - } - else { - var context_1; - if (_this && config_1.config.useDeprecatedNextContext) { - context_1 = Object.create(observerOrNext); - context_1.unsubscribe = function () { return _this.unsubscribe(); }; - partialObserver = { - next: observerOrNext.next && bind(observerOrNext.next, context_1), - error: observerOrNext.error && bind(observerOrNext.error, context_1), - complete: observerOrNext.complete && bind(observerOrNext.complete, context_1), - }; - } - else { - partialObserver = observerOrNext; - } - } - _this.destination = new ConsumerObserver(partialObserver); - return _this; - } - return SafeSubscriber; -}(Subscriber)); -exports.SafeSubscriber = SafeSubscriber; -function handleUnhandledError(error) { - if (config_1.config.useDeprecatedSynchronousErrorHandling) { - errorContext_1.captureError(error); - } - else { - reportUnhandledError_1.reportUnhandledError(error); - } -} -function defaultErrorHandler(err) { - throw err; -} -function handleStoppedNotification(notification, subscriber) { - var onStoppedNotification = config_1.config.onStoppedNotification; - onStoppedNotification && timeoutProvider_1.timeoutProvider.setTimeout(function () { return onStoppedNotification(notification, subscriber); }); -} -exports.EMPTY_OBSERVER = { - closed: true, - next: noop_1.noop, - error: defaultErrorHandler, - complete: noop_1.noop, -}; -//# sourceMappingURL=Subscriber.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/Subscriber.js.map b/node_modules/rxjs/dist/cjs/internal/Subscriber.js.map deleted file mode 100644 index 5fe7469..0000000 --- a/node_modules/rxjs/dist/cjs/internal/Subscriber.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Subscriber.js","sourceRoot":"","sources":["../../../src/internal/Subscriber.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,gDAA+C;AAE/C,+CAA8D;AAC9D,mCAAkC;AAClC,oEAAmE;AACnE,oCAAmC;AACnC,iEAAqG;AACrG,+DAA8D;AAC9D,oDAAmD;AAUnD;IAAmC,8BAAY;IA4B7C,oBAAY,WAA6C;QAAzD,YACE,iBAAO,SAWR;QApBS,eAAS,GAAY,KAAK,CAAC;QAUnC,IAAI,WAAW,EAAE;YACf,KAAI,CAAC,WAAW,GAAG,WAAW,CAAC;YAG/B,IAAI,6BAAc,CAAC,WAAW,CAAC,EAAE;gBAC/B,WAAW,CAAC,GAAG,CAAC,KAAI,CAAC,CAAC;aACvB;SACF;aAAM;YACL,KAAI,CAAC,WAAW,GAAG,sBAAc,CAAC;SACnC;;IACH,CAAC;IAzBM,iBAAM,GAAb,UAAiB,IAAsB,EAAE,KAAyB,EAAE,QAAqB;QACvF,OAAO,IAAI,cAAc,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IACnD,CAAC;IA+BD,yBAAI,GAAJ,UAAK,KAAQ;QACX,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,yBAAyB,CAAC,wCAAgB,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC;SAC1D;aAAM;YACL,IAAI,CAAC,KAAK,CAAC,KAAM,CAAC,CAAC;SACpB;IACH,CAAC;IAQD,0BAAK,GAAL,UAAM,GAAS;QACb,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,yBAAyB,CAAC,yCAAiB,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;SACzD;aAAM;YACL,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;SAClB;IACH,CAAC;IAOD,6BAAQ,GAAR;QACE,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,yBAAyB,CAAC,6CAAqB,EAAE,IAAI,CAAC,CAAC;SACxD;aAAM;YACL,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,IAAI,CAAC,SAAS,EAAE,CAAC;SAClB;IACH,CAAC;IAED,gCAAW,GAAX;QACE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,iBAAM,WAAW,WAAE,CAAC;YACpB,IAAI,CAAC,WAAW,GAAG,IAAK,CAAC;SAC1B;IACH,CAAC;IAES,0BAAK,GAAf,UAAgB,KAAQ;QACtB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAES,2BAAM,GAAhB,UAAiB,GAAQ;QACvB,IAAI;YACF,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SAC7B;gBAAS;YACR,IAAI,CAAC,WAAW,EAAE,CAAC;SACpB;IACH,CAAC;IAES,8BAAS,GAAnB;QACE,IAAI;YACF,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;SAC7B;gBAAS;YACR,IAAI,CAAC,WAAW,EAAE,CAAC;SACpB;IACH,CAAC;IACH,iBAAC;AAAD,CAAC,AAhHD,CAAmC,2BAAY,GAgH9C;AAhHY,gCAAU;AAuHvB,IAAM,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC;AAEtC,SAAS,IAAI,CAAqC,EAAM,EAAE,OAAY;IACpE,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;AACjC,CAAC;AAMD;IACE,0BAAoB,eAAqC;QAArC,oBAAe,GAAf,eAAe,CAAsB;IAAG,CAAC;IAE7D,+BAAI,GAAJ,UAAK,KAAQ;QACH,IAAA,eAAe,GAAK,IAAI,gBAAT,CAAU;QACjC,IAAI,eAAe,CAAC,IAAI,EAAE;YACxB,IAAI;gBACF,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aAC7B;YAAC,OAAO,KAAK,EAAE;gBACd,oBAAoB,CAAC,KAAK,CAAC,CAAC;aAC7B;SACF;IACH,CAAC;IAED,gCAAK,GAAL,UAAM,GAAQ;QACJ,IAAA,eAAe,GAAK,IAAI,gBAAT,CAAU;QACjC,IAAI,eAAe,CAAC,KAAK,EAAE;YACzB,IAAI;gBACF,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aAC5B;YAAC,OAAO,KAAK,EAAE;gBACd,oBAAoB,CAAC,KAAK,CAAC,CAAC;aAC7B;SACF;aAAM;YACL,oBAAoB,CAAC,GAAG,CAAC,CAAC;SAC3B;IACH,CAAC;IAED,mCAAQ,GAAR;QACU,IAAA,eAAe,GAAK,IAAI,gBAAT,CAAU;QACjC,IAAI,eAAe,CAAC,QAAQ,EAAE;YAC5B,IAAI;gBACF,eAAe,CAAC,QAAQ,EAAE,CAAC;aAC5B;YAAC,OAAO,KAAK,EAAE;gBACd,oBAAoB,CAAC,KAAK,CAAC,CAAC;aAC7B;SACF;IACH,CAAC;IACH,uBAAC;AAAD,CAAC,AArCD,IAqCC;AAED;IAAuC,kCAAa;IAClD,wBACE,cAAmE,EACnE,KAAkC,EAClC,QAA8B;QAHhC,YAKE,iBAAO,SAkCR;QAhCC,IAAI,eAAqC,CAAC;QAC1C,IAAI,uBAAU,CAAC,cAAc,CAAC,IAAI,CAAC,cAAc,EAAE;YAGjD,eAAe,GAAG;gBAChB,IAAI,EAAE,CAAC,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,SAAS,CAAqC;gBACvE,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,SAAS;gBACzB,QAAQ,EAAE,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,SAAS;aAChC,CAAC;SACH;aAAM;YAEL,IAAI,SAAY,CAAC;YACjB,IAAI,KAAI,IAAI,eAAM,CAAC,wBAAwB,EAAE;gBAI3C,SAAO,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;gBACxC,SAAO,CAAC,WAAW,GAAG,cAAM,OAAA,KAAI,CAAC,WAAW,EAAE,EAAlB,CAAkB,CAAC;gBAC/C,eAAe,GAAG;oBAChB,IAAI,EAAE,cAAc,CAAC,IAAI,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,SAAO,CAAC;oBAC/D,KAAK,EAAE,cAAc,CAAC,KAAK,IAAI,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,SAAO,CAAC;oBAClE,QAAQ,EAAE,cAAc,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,SAAO,CAAC;iBAC5E,CAAC;aACH;iBAAM;gBAEL,eAAe,GAAG,cAAc,CAAC;aAClC;SACF;QAID,KAAI,CAAC,WAAW,GAAG,IAAI,gBAAgB,CAAC,eAAe,CAAC,CAAC;;IAC3D,CAAC;IACH,qBAAC;AAAD,CAAC,AAzCD,CAAuC,UAAU,GAyChD;AAzCY,wCAAc;AA2C3B,SAAS,oBAAoB,CAAC,KAAU;IACtC,IAAI,eAAM,CAAC,qCAAqC,EAAE;QAChD,2BAAY,CAAC,KAAK,CAAC,CAAC;KACrB;SAAM;QAGL,2CAAoB,CAAC,KAAK,CAAC,CAAC;KAC7B;AACH,CAAC;AAQD,SAAS,mBAAmB,CAAC,GAAQ;IACnC,MAAM,GAAG,CAAC;AACZ,CAAC;AAOD,SAAS,yBAAyB,CAAC,YAAyC,EAAE,UAA2B;IAC/F,IAAA,qBAAqB,GAAK,eAAM,sBAAX,CAAY;IACzC,qBAAqB,IAAI,iCAAe,CAAC,UAAU,CAAC,cAAM,OAAA,qBAAqB,CAAC,YAAY,EAAE,UAAU,CAAC,EAA/C,CAA+C,CAAC,CAAC;AAC7G,CAAC;AAOY,QAAA,cAAc,GAA+C;IACxE,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,WAAI;IACV,KAAK,EAAE,mBAAmB;IAC1B,QAAQ,EAAE,WAAI;CACf,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/Subscription.js b/node_modules/rxjs/dist/cjs/internal/Subscription.js deleted file mode 100644 index 9ee9ac0..0000000 --- a/node_modules/rxjs/dist/cjs/internal/Subscription.js +++ /dev/null @@ -1,178 +0,0 @@ -"use strict"; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isSubscription = exports.EMPTY_SUBSCRIPTION = exports.Subscription = void 0; -var isFunction_1 = require("./util/isFunction"); -var UnsubscriptionError_1 = require("./util/UnsubscriptionError"); -var arrRemove_1 = require("./util/arrRemove"); -var Subscription = (function () { - function Subscription(initialTeardown) { - this.initialTeardown = initialTeardown; - this.closed = false; - this._parentage = null; - this._finalizers = null; - } - Subscription.prototype.unsubscribe = function () { - var e_1, _a, e_2, _b; - var errors; - if (!this.closed) { - this.closed = true; - var _parentage = this._parentage; - if (_parentage) { - this._parentage = null; - if (Array.isArray(_parentage)) { - try { - for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) { - var parent_1 = _parentage_1_1.value; - parent_1.remove(this); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1); - } - finally { if (e_1) throw e_1.error; } - } - } - else { - _parentage.remove(this); - } - } - var initialFinalizer = this.initialTeardown; - if (isFunction_1.isFunction(initialFinalizer)) { - try { - initialFinalizer(); - } - catch (e) { - errors = e instanceof UnsubscriptionError_1.UnsubscriptionError ? e.errors : [e]; - } - } - var _finalizers = this._finalizers; - if (_finalizers) { - this._finalizers = null; - try { - for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) { - var finalizer = _finalizers_1_1.value; - try { - execFinalizer(finalizer); - } - catch (err) { - errors = errors !== null && errors !== void 0 ? errors : []; - if (err instanceof UnsubscriptionError_1.UnsubscriptionError) { - errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors)); - } - else { - errors.push(err); - } - } - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1); - } - finally { if (e_2) throw e_2.error; } - } - } - if (errors) { - throw new UnsubscriptionError_1.UnsubscriptionError(errors); - } - } - }; - Subscription.prototype.add = function (teardown) { - var _a; - if (teardown && teardown !== this) { - if (this.closed) { - execFinalizer(teardown); - } - else { - if (teardown instanceof Subscription) { - if (teardown.closed || teardown._hasParent(this)) { - return; - } - teardown._addParent(this); - } - (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown); - } - } - }; - Subscription.prototype._hasParent = function (parent) { - var _parentage = this._parentage; - return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent)); - }; - Subscription.prototype._addParent = function (parent) { - var _parentage = this._parentage; - this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent; - }; - Subscription.prototype._removeParent = function (parent) { - var _parentage = this._parentage; - if (_parentage === parent) { - this._parentage = null; - } - else if (Array.isArray(_parentage)) { - arrRemove_1.arrRemove(_parentage, parent); - } - }; - Subscription.prototype.remove = function (teardown) { - var _finalizers = this._finalizers; - _finalizers && arrRemove_1.arrRemove(_finalizers, teardown); - if (teardown instanceof Subscription) { - teardown._removeParent(this); - } - }; - Subscription.EMPTY = (function () { - var empty = new Subscription(); - empty.closed = true; - return empty; - })(); - return Subscription; -}()); -exports.Subscription = Subscription; -exports.EMPTY_SUBSCRIPTION = Subscription.EMPTY; -function isSubscription(value) { - return (value instanceof Subscription || - (value && 'closed' in value && isFunction_1.isFunction(value.remove) && isFunction_1.isFunction(value.add) && isFunction_1.isFunction(value.unsubscribe))); -} -exports.isSubscription = isSubscription; -function execFinalizer(finalizer) { - if (isFunction_1.isFunction(finalizer)) { - finalizer(); - } - else { - finalizer.unsubscribe(); - } -} -//# sourceMappingURL=Subscription.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/Subscription.js.map b/node_modules/rxjs/dist/cjs/internal/Subscription.js.map deleted file mode 100644 index 54041d4..0000000 --- a/node_modules/rxjs/dist/cjs/internal/Subscription.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Subscription.js","sourceRoot":"","sources":["../../../src/internal/Subscription.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA+C;AAC/C,kEAAiE;AAEjE,8CAA6C;AAY7C;IAwBE,sBAAoB,eAA4B;QAA5B,oBAAe,GAAf,eAAe,CAAa;QAdzC,WAAM,GAAG,KAAK,CAAC;QAEd,eAAU,GAAyC,IAAI,CAAC;QAMxD,gBAAW,GAA0C,IAAI,CAAC;IAMf,CAAC;IAOpD,kCAAW,GAAX;;QACE,IAAI,MAAyB,CAAC;QAE9B,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;YAGX,IAAA,UAAU,GAAK,IAAI,WAAT,CAAU;YAC5B,IAAI,UAAU,EAAE;gBACd,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;gBACvB,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;;wBAC7B,KAAqB,IAAA,eAAA,SAAA,UAAU,CAAA,sCAAA,8DAAE;4BAA5B,IAAM,QAAM,uBAAA;4BACf,QAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;yBACrB;;;;;;;;;iBACF;qBAAM;oBACL,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;iBACzB;aACF;YAEO,IAAiB,gBAAgB,GAAK,IAAI,gBAAT,CAAU;YACnD,IAAI,uBAAU,CAAC,gBAAgB,CAAC,EAAE;gBAChC,IAAI;oBACF,gBAAgB,EAAE,CAAC;iBACpB;gBAAC,OAAO,CAAC,EAAE;oBACV,MAAM,GAAG,CAAC,YAAY,yCAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;iBAC5D;aACF;YAEO,IAAA,WAAW,GAAK,IAAI,YAAT,CAAU;YAC7B,IAAI,WAAW,EAAE;gBACf,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;;oBACxB,KAAwB,IAAA,gBAAA,SAAA,WAAW,CAAA,wCAAA,iEAAE;wBAAhC,IAAM,SAAS,wBAAA;wBAClB,IAAI;4BACF,aAAa,CAAC,SAAS,CAAC,CAAC;yBAC1B;wBAAC,OAAO,GAAG,EAAE;4BACZ,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAC;4BACtB,IAAI,GAAG,YAAY,yCAAmB,EAAE;gCACtC,MAAM,0CAAO,MAAM,WAAK,GAAG,CAAC,MAAM,EAAC,CAAC;6BACrC;iCAAM;gCACL,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;6BAClB;yBACF;qBACF;;;;;;;;;aACF;YAED,IAAI,MAAM,EAAE;gBACV,MAAM,IAAI,yCAAmB,CAAC,MAAM,CAAC,CAAC;aACvC;SACF;IACH,CAAC;IAoBD,0BAAG,GAAH,UAAI,QAAuB;;QAGzB,IAAI,QAAQ,IAAI,QAAQ,KAAK,IAAI,EAAE;YACjC,IAAI,IAAI,CAAC,MAAM,EAAE;gBAGf,aAAa,CAAC,QAAQ,CAAC,CAAC;aACzB;iBAAM;gBACL,IAAI,QAAQ,YAAY,YAAY,EAAE;oBAGpC,IAAI,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;wBAChD,OAAO;qBACR;oBACD,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;iBAC3B;gBACD,CAAC,IAAI,CAAC,WAAW,GAAG,MAAA,IAAI,CAAC,WAAW,mCAAI,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC5D;SACF;IACH,CAAC;IAOO,iCAAU,GAAlB,UAAmB,MAAoB;QAC7B,IAAA,UAAU,GAAK,IAAI,WAAT,CAAU;QAC5B,OAAO,UAAU,KAAK,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7F,CAAC;IASO,iCAAU,GAAlB,UAAmB,MAAoB;QAC7B,IAAA,UAAU,GAAK,IAAI,WAAT,CAAU;QAC5B,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACnI,CAAC;IAMO,oCAAa,GAArB,UAAsB,MAAoB;QAChC,IAAA,UAAU,GAAK,IAAI,WAAT,CAAU;QAC5B,IAAI,UAAU,KAAK,MAAM,EAAE;YACzB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;SACxB;aAAM,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;YACpC,qBAAS,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;SAC/B;IACH,CAAC;IAgBD,6BAAM,GAAN,UAAO,QAAsC;QACnC,IAAA,WAAW,GAAK,IAAI,YAAT,CAAU;QAC7B,WAAW,IAAI,qBAAS,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QAEhD,IAAI,QAAQ,YAAY,YAAY,EAAE;YACpC,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;SAC9B;IACH,CAAC;IAjLa,kBAAK,GAAG,CAAC;QACrB,IAAM,KAAK,GAAG,IAAI,YAAY,EAAE,CAAC;QACjC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;QACpB,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,EAAE,CAAC;IA8KP,mBAAC;CAAA,AAnLD,IAmLC;AAnLY,oCAAY;AAqLZ,QAAA,kBAAkB,GAAG,YAAY,CAAC,KAAK,CAAC;AAErD,SAAgB,cAAc,CAAC,KAAU;IACvC,OAAO,CACL,KAAK,YAAY,YAAY;QAC7B,CAAC,KAAK,IAAI,QAAQ,IAAI,KAAK,IAAI,uBAAU,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,uBAAU,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,uBAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CACnH,CAAC;AACJ,CAAC;AALD,wCAKC;AAED,SAAS,aAAa,CAAC,SAAwC;IAC7D,IAAI,uBAAU,CAAC,SAAS,CAAC,EAAE;QACzB,SAAS,EAAE,CAAC;KACb;SAAM;QACL,SAAS,CAAC,WAAW,EAAE,CAAC;KACzB;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/ajax/AjaxResponse.js b/node_modules/rxjs/dist/cjs/internal/ajax/AjaxResponse.js deleted file mode 100644 index 7a2c3f7..0000000 --- a/node_modules/rxjs/dist/cjs/internal/ajax/AjaxResponse.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AjaxResponse = void 0; -var getXHRResponse_1 = require("./getXHRResponse"); -var AjaxResponse = (function () { - function AjaxResponse(originalEvent, xhr, request, type) { - if (type === void 0) { type = 'download_load'; } - this.originalEvent = originalEvent; - this.xhr = xhr; - this.request = request; - this.type = type; - var status = xhr.status, responseType = xhr.responseType; - this.status = status !== null && status !== void 0 ? status : 0; - this.responseType = responseType !== null && responseType !== void 0 ? responseType : ''; - var allHeaders = xhr.getAllResponseHeaders(); - this.responseHeaders = allHeaders - ? - allHeaders.split('\n').reduce(function (headers, line) { - var index = line.indexOf(': '); - headers[line.slice(0, index)] = line.slice(index + 2); - return headers; - }, {}) - : {}; - this.response = getXHRResponse_1.getXHRResponse(xhr); - var loaded = originalEvent.loaded, total = originalEvent.total; - this.loaded = loaded; - this.total = total; - } - return AjaxResponse; -}()); -exports.AjaxResponse = AjaxResponse; -//# sourceMappingURL=AjaxResponse.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/ajax/AjaxResponse.js.map b/node_modules/rxjs/dist/cjs/internal/ajax/AjaxResponse.js.map deleted file mode 100644 index 52cadde..0000000 --- a/node_modules/rxjs/dist/cjs/internal/ajax/AjaxResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AjaxResponse.js","sourceRoot":"","sources":["../../../../src/internal/ajax/AjaxResponse.ts"],"names":[],"mappings":";;;AACA,mDAAkD;AAgBlD;IA+CE,sBAIkB,aAA4B,EAM5B,GAAmB,EAInB,OAAoB,EAcpB,IAAwC;QAAxC,qBAAA,EAAA,sBAAwC;QAxBxC,kBAAa,GAAb,aAAa,CAAe;QAM5B,QAAG,GAAH,GAAG,CAAgB;QAInB,YAAO,GAAP,OAAO,CAAa;QAcpB,SAAI,GAAJ,IAAI,CAAoC;QAEhD,IAAA,MAAM,GAAmB,GAAG,OAAtB,EAAE,YAAY,GAAK,GAAG,aAAR,CAAS;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,CAAC,CAAC;QAC1B,IAAI,CAAC,YAAY,GAAG,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,EAAE,CAAC;QASvC,IAAM,UAAU,GAAG,GAAG,CAAC,qBAAqB,EAAE,CAAC;QAC/C,IAAI,CAAC,eAAe,GAAG,UAAU;YAC/B,CAAC;gBACC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,UAAC,OAA+B,EAAE,IAAI;oBAIlE,IAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;oBACjC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;oBACtD,OAAO,OAAO,CAAC;gBACjB,CAAC,EAAE,EAAE,CAAC;YACR,CAAC,CAAC,EAAE,CAAC;QAEP,IAAI,CAAC,QAAQ,GAAG,+BAAc,CAAC,GAAG,CAAC,CAAC;QAC5B,IAAA,MAAM,GAAY,aAAa,OAAzB,EAAE,KAAK,GAAK,aAAa,MAAlB,CAAmB;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IACH,mBAAC;AAAD,CAAC,AA1GD,IA0GC;AA1GY,oCAAY"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/ajax/ajax.js b/node_modules/rxjs/dist/cjs/internal/ajax/ajax.js deleted file mode 100644 index 9c46066..0000000 --- a/node_modules/rxjs/dist/cjs/internal/ajax/ajax.js +++ /dev/null @@ -1,253 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.fromAjax = exports.ajax = void 0; -var map_1 = require("../operators/map"); -var Observable_1 = require("../Observable"); -var AjaxResponse_1 = require("./AjaxResponse"); -var errors_1 = require("./errors"); -function ajaxGet(url, headers) { - return exports.ajax({ method: 'GET', url: url, headers: headers }); -} -function ajaxPost(url, body, headers) { - return exports.ajax({ method: 'POST', url: url, body: body, headers: headers }); -} -function ajaxDelete(url, headers) { - return exports.ajax({ method: 'DELETE', url: url, headers: headers }); -} -function ajaxPut(url, body, headers) { - return exports.ajax({ method: 'PUT', url: url, body: body, headers: headers }); -} -function ajaxPatch(url, body, headers) { - return exports.ajax({ method: 'PATCH', url: url, body: body, headers: headers }); -} -var mapResponse = map_1.map(function (x) { return x.response; }); -function ajaxGetJSON(url, headers) { - return mapResponse(exports.ajax({ - method: 'GET', - url: url, - headers: headers, - })); -} -exports.ajax = (function () { - var create = function (urlOrConfig) { - var config = typeof urlOrConfig === 'string' - ? { - url: urlOrConfig, - } - : urlOrConfig; - return fromAjax(config); - }; - create.get = ajaxGet; - create.post = ajaxPost; - create.delete = ajaxDelete; - create.put = ajaxPut; - create.patch = ajaxPatch; - create.getJSON = ajaxGetJSON; - return create; -})(); -var UPLOAD = 'upload'; -var DOWNLOAD = 'download'; -var LOADSTART = 'loadstart'; -var PROGRESS = 'progress'; -var LOAD = 'load'; -function fromAjax(init) { - return new Observable_1.Observable(function (destination) { - var _a, _b; - var config = __assign({ async: true, crossDomain: false, withCredentials: false, method: 'GET', timeout: 0, responseType: 'json' }, init); - var queryParams = config.queryParams, configuredBody = config.body, configuredHeaders = config.headers; - var url = config.url; - if (!url) { - throw new TypeError('url is required'); - } - if (queryParams) { - var searchParams_1; - if (url.includes('?')) { - var parts = url.split('?'); - if (2 < parts.length) { - throw new TypeError('invalid url'); - } - searchParams_1 = new URLSearchParams(parts[1]); - new URLSearchParams(queryParams).forEach(function (value, key) { return searchParams_1.set(key, value); }); - url = parts[0] + '?' + searchParams_1; - } - else { - searchParams_1 = new URLSearchParams(queryParams); - url = url + '?' + searchParams_1; - } - } - var headers = {}; - if (configuredHeaders) { - for (var key in configuredHeaders) { - if (configuredHeaders.hasOwnProperty(key)) { - headers[key.toLowerCase()] = configuredHeaders[key]; - } - } - } - var crossDomain = config.crossDomain; - if (!crossDomain && !('x-requested-with' in headers)) { - headers['x-requested-with'] = 'XMLHttpRequest'; - } - var withCredentials = config.withCredentials, xsrfCookieName = config.xsrfCookieName, xsrfHeaderName = config.xsrfHeaderName; - if ((withCredentials || !crossDomain) && xsrfCookieName && xsrfHeaderName) { - var xsrfCookie = (_b = (_a = document === null || document === void 0 ? void 0 : document.cookie.match(new RegExp("(^|;\\s*)(" + xsrfCookieName + ")=([^;]*)"))) === null || _a === void 0 ? void 0 : _a.pop()) !== null && _b !== void 0 ? _b : ''; - if (xsrfCookie) { - headers[xsrfHeaderName] = xsrfCookie; - } - } - var body = extractContentTypeAndMaybeSerializeBody(configuredBody, headers); - var _request = __assign(__assign({}, config), { url: url, - headers: headers, - body: body }); - var xhr; - xhr = init.createXHR ? init.createXHR() : new XMLHttpRequest(); - { - var progressSubscriber_1 = init.progressSubscriber, _c = init.includeDownloadProgress, includeDownloadProgress = _c === void 0 ? false : _c, _d = init.includeUploadProgress, includeUploadProgress = _d === void 0 ? false : _d; - var addErrorEvent = function (type, errorFactory) { - xhr.addEventListener(type, function () { - var _a; - var error = errorFactory(); - (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, error); - destination.error(error); - }); - }; - addErrorEvent('timeout', function () { return new errors_1.AjaxTimeoutError(xhr, _request); }); - addErrorEvent('abort', function () { return new errors_1.AjaxError('aborted', xhr, _request); }); - var createResponse_1 = function (direction, event) { - return new AjaxResponse_1.AjaxResponse(event, xhr, _request, direction + "_" + event.type); - }; - var addProgressEvent_1 = function (target, type, direction) { - target.addEventListener(type, function (event) { - destination.next(createResponse_1(direction, event)); - }); - }; - if (includeUploadProgress) { - [LOADSTART, PROGRESS, LOAD].forEach(function (type) { return addProgressEvent_1(xhr.upload, type, UPLOAD); }); - } - if (progressSubscriber_1) { - [LOADSTART, PROGRESS].forEach(function (type) { return xhr.upload.addEventListener(type, function (e) { var _a; return (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.next) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, e); }); }); - } - if (includeDownloadProgress) { - [LOADSTART, PROGRESS].forEach(function (type) { return addProgressEvent_1(xhr, type, DOWNLOAD); }); - } - var emitError_1 = function (status) { - var msg = 'ajax error' + (status ? ' ' + status : ''); - destination.error(new errors_1.AjaxError(msg, xhr, _request)); - }; - xhr.addEventListener('error', function (e) { - var _a; - (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, e); - emitError_1(); - }); - xhr.addEventListener(LOAD, function (event) { - var _a, _b; - var status = xhr.status; - if (status < 400) { - (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.complete) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1); - var response = void 0; - try { - response = createResponse_1(DOWNLOAD, event); - } - catch (err) { - destination.error(err); - return; - } - destination.next(response); - destination.complete(); - } - else { - (_b = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _b === void 0 ? void 0 : _b.call(progressSubscriber_1, event); - emitError_1(status); - } - }); - } - var user = _request.user, method = _request.method, async = _request.async; - if (user) { - xhr.open(method, url, async, user, _request.password); - } - else { - xhr.open(method, url, async); - } - if (async) { - xhr.timeout = _request.timeout; - xhr.responseType = _request.responseType; - } - if ('withCredentials' in xhr) { - xhr.withCredentials = _request.withCredentials; - } - for (var key in headers) { - if (headers.hasOwnProperty(key)) { - xhr.setRequestHeader(key, headers[key]); - } - } - if (body) { - xhr.send(body); - } - else { - xhr.send(); - } - return function () { - if (xhr && xhr.readyState !== 4) { - xhr.abort(); - } - }; - }); -} -exports.fromAjax = fromAjax; -function extractContentTypeAndMaybeSerializeBody(body, headers) { - var _a; - if (!body || - typeof body === 'string' || - isFormData(body) || - isURLSearchParams(body) || - isArrayBuffer(body) || - isFile(body) || - isBlob(body) || - isReadableStream(body)) { - return body; - } - if (isArrayBufferView(body)) { - return body.buffer; - } - if (typeof body === 'object') { - headers['content-type'] = (_a = headers['content-type']) !== null && _a !== void 0 ? _a : 'application/json;charset=utf-8'; - return JSON.stringify(body); - } - throw new TypeError('Unknown body type'); -} -var _toString = Object.prototype.toString; -function toStringCheck(obj, name) { - return _toString.call(obj) === "[object " + name + "]"; -} -function isArrayBuffer(body) { - return toStringCheck(body, 'ArrayBuffer'); -} -function isFile(body) { - return toStringCheck(body, 'File'); -} -function isBlob(body) { - return toStringCheck(body, 'Blob'); -} -function isArrayBufferView(body) { - return typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView(body); -} -function isFormData(body) { - return typeof FormData !== 'undefined' && body instanceof FormData; -} -function isURLSearchParams(body) { - return typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams; -} -function isReadableStream(body) { - return typeof ReadableStream !== 'undefined' && body instanceof ReadableStream; -} -//# sourceMappingURL=ajax.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/ajax/ajax.js.map b/node_modules/rxjs/dist/cjs/internal/ajax/ajax.js.map deleted file mode 100644 index 9fa597d..0000000 --- a/node_modules/rxjs/dist/cjs/internal/ajax/ajax.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ajax.js","sourceRoot":"","sources":["../../../../src/internal/ajax/ajax.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,wCAAuC;AACvC,4CAA2C;AAE3C,+CAA8C;AAC9C,mCAAuD;AAqIvD,SAAS,OAAO,CAAI,GAAW,EAAE,OAAgC;IAC/D,OAAO,YAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAA,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,QAAQ,CAAI,GAAW,EAAE,IAAU,EAAE,OAAgC;IAC5E,OAAO,YAAI,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,KAAA,EAAE,IAAI,MAAA,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC;AACtD,CAAC;AAED,SAAS,UAAU,CAAI,GAAW,EAAE,OAAgC;IAClE,OAAO,YAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAA,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,OAAO,CAAI,GAAW,EAAE,IAAU,EAAE,OAAgC;IAC3E,OAAO,YAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAA,EAAE,IAAI,MAAA,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC;AACrD,CAAC;AAED,SAAS,SAAS,CAAI,GAAW,EAAE,IAAU,EAAE,OAAgC;IAC7E,OAAO,YAAI,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAA,EAAE,IAAI,MAAA,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC;AACvD,CAAC;AAED,IAAM,WAAW,GAAG,SAAG,CAAC,UAAC,CAAoB,IAAK,OAAA,CAAC,CAAC,QAAQ,EAAV,CAAU,CAAC,CAAC;AAE9D,SAAS,WAAW,CAAI,GAAW,EAAE,OAAgC;IACnE,OAAO,WAAW,CAChB,YAAI,CAAI;QACN,MAAM,EAAE,KAAK;QACb,GAAG,KAAA;QACH,OAAO,SAAA;KACR,CAAC,CACH,CAAC;AACJ,CAAC;AAoGY,QAAA,IAAI,GAAuB,CAAC;IACvC,IAAM,MAAM,GAAG,UAAI,WAAgC;QACjD,IAAM,MAAM,GACV,OAAO,WAAW,KAAK,QAAQ;YAC7B,CAAC,CAAC;gBACE,GAAG,EAAE,WAAW;aACjB;YACH,CAAC,CAAC,WAAW,CAAC;QAClB,OAAO,QAAQ,CAAI,MAAM,CAAC,CAAC;IAC7B,CAAC,CAAC;IAEF,MAAM,CAAC,GAAG,GAAG,OAAO,CAAC;IACrB,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvB,MAAM,CAAC,MAAM,GAAG,UAAU,CAAC;IAC3B,MAAM,CAAC,GAAG,GAAG,OAAO,CAAC;IACrB,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC;IACzB,MAAM,CAAC,OAAO,GAAG,WAAW,CAAC;IAE7B,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC,EAAE,CAAC;AAEL,IAAM,MAAM,GAAG,QAAQ,CAAC;AACxB,IAAM,QAAQ,GAAG,UAAU,CAAC;AAC5B,IAAM,SAAS,GAAG,WAAW,CAAC;AAC9B,IAAM,QAAQ,GAAG,UAAU,CAAC;AAC5B,IAAM,IAAI,GAAG,MAAM,CAAC;AAEpB,SAAgB,QAAQ,CAAI,IAAgB;IAC1C,OAAO,IAAI,uBAAU,CAAC,UAAC,WAAW;;QAChC,IAAM,MAAM,cAEV,KAAK,EAAE,IAAI,EACX,WAAW,EAAE,KAAK,EAClB,eAAe,EAAE,KAAK,EACtB,MAAM,EAAE,KAAK,EACb,OAAO,EAAE,CAAC,EACV,YAAY,EAAE,MAAoC,IAE/C,IAAI,CACR,CAAC;QAEM,IAAA,WAAW,GAAuD,MAAM,YAA7D,EAAQ,cAAc,GAAiC,MAAM,KAAvC,EAAW,iBAAiB,GAAK,MAAM,QAAX,CAAY;QAEjF,IAAI,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC;QACrB,IAAI,CAAC,GAAG,EAAE;YACR,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAC;SACxC;QAED,IAAI,WAAW,EAAE;YACf,IAAI,cAA6B,CAAC;YAClC,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBAIrB,IAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBAC7B,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE;oBACpB,MAAM,IAAI,SAAS,CAAC,aAAa,CAAC,CAAC;iBACpC;gBAED,cAAY,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBAG7C,IAAI,eAAe,CAAC,WAAkB,CAAC,CAAC,OAAO,CAAC,UAAC,KAAK,EAAE,GAAG,IAAK,OAAA,cAAY,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,EAA5B,CAA4B,CAAC,CAAC;gBAI9F,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,cAAY,CAAC;aACrC;iBAAM;gBAKL,cAAY,GAAG,IAAI,eAAe,CAAC,WAAkB,CAAC,CAAC;gBACvD,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,cAAY,CAAC;aAChC;SACF;QAKD,IAAM,OAAO,GAAwB,EAAE,CAAC;QACxC,IAAI,iBAAiB,EAAE;YACrB,KAAK,IAAM,GAAG,IAAI,iBAAiB,EAAE;gBACnC,IAAI,iBAAiB,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;oBACzC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;iBACrD;aACF;SACF;QAED,IAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QASvC,IAAI,CAAC,WAAW,IAAI,CAAC,CAAC,kBAAkB,IAAI,OAAO,CAAC,EAAE;YACpD,OAAO,CAAC,kBAAkB,CAAC,GAAG,gBAAgB,CAAC;SAChD;QAIO,IAAA,eAAe,GAAqC,MAAM,gBAA3C,EAAE,cAAc,GAAqB,MAAM,eAA3B,EAAE,cAAc,GAAK,MAAM,eAAX,CAAY;QACnE,IAAI,CAAC,eAAe,IAAI,CAAC,WAAW,CAAC,IAAI,cAAc,IAAI,cAAc,EAAE;YACzE,IAAM,UAAU,GAAG,MAAA,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,eAAa,cAAc,cAAW,CAAC,CAAC,0CAAE,GAAG,EAAE,mCAAI,EAAE,CAAC;YAC3G,IAAI,UAAU,EAAE;gBACd,OAAO,CAAC,cAAc,CAAC,GAAG,UAAU,CAAC;aACtC;SACF;QAID,IAAM,IAAI,GAAG,uCAAuC,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;QAG9E,IAAM,QAAQ,yBACT,MAAM,KAGT,GAAG,KAAA;YACH,OAAO,SAAA;YACP,IAAI,MAAA,GACL,CAAC;QAEF,IAAI,GAAmB,CAAC;QAGxB,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,IAAI,cAAc,EAAE,CAAC;QAE/D;YAQU,IAAA,oBAAkB,GAAqE,IAAI,mBAAzE,EAAE,KAAmE,IAAI,wBAAxC,EAA/B,uBAAuB,mBAAG,KAAK,KAAA,EAAE,KAAkC,IAAI,sBAAT,EAA7B,qBAAqB,mBAAG,KAAK,KAAA,CAAU;YAQpG,IAAM,aAAa,GAAG,UAAC,IAAY,EAAE,YAAuB;gBAC1D,GAAG,CAAC,gBAAgB,CAAC,IAAI,EAAE;;oBACzB,IAAM,KAAK,GAAG,YAAY,EAAE,CAAC;oBAC7B,MAAA,oBAAkB,aAAlB,oBAAkB,uBAAlB,oBAAkB,CAAE,KAAK,+CAAzB,oBAAkB,EAAU,KAAK,CAAC,CAAC;oBACnC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBAC3B,CAAC,CAAC,CAAC;YACL,CAAC,CAAC;YAGF,aAAa,CAAC,SAAS,EAAE,cAAM,OAAA,IAAI,yBAAgB,CAAC,GAAG,EAAE,QAAQ,CAAC,EAAnC,CAAmC,CAAC,CAAC;YAIpE,aAAa,CAAC,OAAO,EAAE,cAAM,OAAA,IAAI,kBAAS,CAAC,SAAS,EAAE,GAAG,EAAE,QAAQ,CAAC,EAAvC,CAAuC,CAAC,CAAC;YAStE,IAAM,gBAAc,GAAG,UAAC,SAAwB,EAAE,KAAoB;gBACpE,OAAA,IAAI,2BAAY,CAAI,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAK,SAAS,SAAI,KAAK,CAAC,IAAoC,CAAC;YAArG,CAAqG,CAAC;YAYxG,IAAM,kBAAgB,GAAG,UAAC,MAAW,EAAE,IAAY,EAAE,SAAwB;gBAC3E,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,UAAC,KAAoB;oBACjD,WAAW,CAAC,IAAI,CAAC,gBAAc,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;gBACrD,CAAC,CAAC,CAAC;YACL,CAAC,CAAC;YAEF,IAAI,qBAAqB,EAAE;gBACzB,CAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,UAAC,IAAI,IAAK,OAAA,kBAAgB,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,EAA1C,CAA0C,CAAC,CAAC;aAC3F;YAED,IAAI,oBAAkB,EAAE;gBACtB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,UAAC,IAAI,IAAK,OAAA,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,UAAC,CAAM,YAAK,OAAA,MAAA,oBAAkB,aAAlB,oBAAkB,uBAAlB,oBAAkB,CAAE,IAAI,+CAAxB,oBAAkB,EAAS,CAAC,CAAC,CAAA,EAAA,CAAC,EAA5E,CAA4E,CAAC,CAAC;aACvH;YAED,IAAI,uBAAuB,EAAE;gBAC3B,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,UAAC,IAAI,IAAK,OAAA,kBAAgB,CAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,CAAC,EAArC,CAAqC,CAAC,CAAC;aAChF;YAED,IAAM,WAAS,GAAG,UAAC,MAAe;gBAChC,IAAM,GAAG,GAAG,YAAY,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;gBACxD,WAAW,CAAC,KAAK,CAAC,IAAI,kBAAS,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;YACvD,CAAC,CAAC;YAEF,GAAG,CAAC,gBAAgB,CAAC,OAAO,EAAE,UAAC,CAAC;;gBAC9B,MAAA,oBAAkB,aAAlB,oBAAkB,uBAAlB,oBAAkB,CAAE,KAAK,+CAAzB,oBAAkB,EAAU,CAAC,CAAC,CAAC;gBAC/B,WAAS,EAAE,CAAC;YACd,CAAC,CAAC,CAAC;YAEH,GAAG,CAAC,gBAAgB,CAAC,IAAI,EAAE,UAAC,KAAK;;gBACvB,IAAA,MAAM,GAAK,GAAG,OAAR,CAAS;gBAEvB,IAAI,MAAM,GAAG,GAAG,EAAE;oBAChB,MAAA,oBAAkB,aAAlB,oBAAkB,uBAAlB,oBAAkB,CAAE,QAAQ,+CAA5B,oBAAkB,CAAc,CAAC;oBAEjC,IAAI,QAAQ,SAAiB,CAAC;oBAC9B,IAAI;wBAIF,QAAQ,GAAG,gBAAc,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;qBAC5C;oBAAC,OAAO,GAAG,EAAE;wBACZ,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;wBACvB,OAAO;qBACR;oBAED,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;oBAC3B,WAAW,CAAC,QAAQ,EAAE,CAAC;iBACxB;qBAAM;oBACL,MAAA,oBAAkB,aAAlB,oBAAkB,uBAAlB,oBAAkB,CAAE,KAAK,+CAAzB,oBAAkB,EAAU,KAAK,CAAC,CAAC;oBACnC,WAAS,CAAC,MAAM,CAAC,CAAC;iBACnB;YACH,CAAC,CAAC,CAAC;SACJ;QAEO,IAAA,IAAI,GAAoB,QAAQ,KAA5B,EAAE,MAAM,GAAY,QAAQ,OAApB,EAAE,KAAK,GAAK,QAAQ,MAAb,CAAc;QAEzC,IAAI,IAAI,EAAE;YACR,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;SACvD;aAAM;YACL,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;SAC9B;QAGD,IAAI,KAAK,EAAE;YACT,GAAG,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;YAC/B,GAAG,CAAC,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC;SAC1C;QAED,IAAI,iBAAiB,IAAI,GAAG,EAAE;YAC5B,GAAG,CAAC,eAAe,GAAG,QAAQ,CAAC,eAAe,CAAC;SAChD;QAGD,KAAK,IAAM,GAAG,IAAI,OAAO,EAAE;YACzB,IAAI,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;gBAC/B,GAAG,CAAC,gBAAgB,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;aACzC;SACF;QAGD,IAAI,IAAI,EAAE;YACR,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAChB;aAAM;YACL,GAAG,CAAC,IAAI,EAAE,CAAC;SACZ;QAED,OAAO;YACL,IAAI,GAAG,IAAI,GAAG,CAAC,UAAU,KAAK,CAAC,EAAe;gBAC5C,GAAG,CAAC,KAAK,EAAE,CAAC;aACb;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAvPD,4BAuPC;AAWD,SAAS,uCAAuC,CAAC,IAAS,EAAE,OAA+B;;IACzF,IACE,CAAC,IAAI;QACL,OAAO,IAAI,KAAK,QAAQ;QACxB,UAAU,CAAC,IAAI,CAAC;QAChB,iBAAiB,CAAC,IAAI,CAAC;QACvB,aAAa,CAAC,IAAI,CAAC;QACnB,MAAM,CAAC,IAAI,CAAC;QACZ,MAAM,CAAC,IAAI,CAAC;QACZ,gBAAgB,CAAC,IAAI,CAAC,EACtB;QAGA,OAAO,IAAI,CAAC;KACb;IAED,IAAI,iBAAiB,CAAC,IAAI,CAAC,EAAE;QAG3B,OAAO,IAAI,CAAC,MAAM,CAAC;KACpB;IAED,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAM5B,OAAO,CAAC,cAAc,CAAC,GAAG,MAAA,OAAO,CAAC,cAAc,CAAC,mCAAI,gCAAgC,CAAC;QACtF,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;KAC7B;IAID,MAAM,IAAI,SAAS,CAAC,mBAAmB,CAAC,CAAC;AAC3C,CAAC;AAED,IAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;AAE5C,SAAS,aAAa,CAAC,GAAQ,EAAE,IAAY;IAC3C,OAAO,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,aAAW,IAAI,MAAG,CAAC;AACpD,CAAC;AAED,SAAS,aAAa,CAAC,IAAS;IAC9B,OAAO,aAAa,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,MAAM,CAAC,IAAS;IACvB,OAAO,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,MAAM,CAAC,IAAS;IACvB,OAAO,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAS;IAClC,OAAO,OAAO,WAAW,KAAK,WAAW,IAAI,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACxE,CAAC;AAED,SAAS,UAAU,CAAC,IAAS;IAC3B,OAAO,OAAO,QAAQ,KAAK,WAAW,IAAI,IAAI,YAAY,QAAQ,CAAC;AACrE,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAS;IAClC,OAAO,OAAO,eAAe,KAAK,WAAW,IAAI,IAAI,YAAY,eAAe,CAAC;AACnF,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAS;IACjC,OAAO,OAAO,cAAc,KAAK,WAAW,IAAI,IAAI,YAAY,cAAc,CAAC;AACjF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/ajax/errors.js b/node_modules/rxjs/dist/cjs/internal/ajax/errors.js deleted file mode 100644 index 495956c..0000000 --- a/node_modules/rxjs/dist/cjs/internal/ajax/errors.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AjaxTimeoutError = exports.AjaxError = void 0; -var getXHRResponse_1 = require("./getXHRResponse"); -var createErrorClass_1 = require("../util/createErrorClass"); -exports.AjaxError = createErrorClass_1.createErrorClass(function (_super) { - return function AjaxErrorImpl(message, xhr, request) { - this.message = message; - this.name = 'AjaxError'; - this.xhr = xhr; - this.request = request; - this.status = xhr.status; - this.responseType = xhr.responseType; - var response; - try { - response = getXHRResponse_1.getXHRResponse(xhr); - } - catch (err) { - response = xhr.responseText; - } - this.response = response; - }; -}); -exports.AjaxTimeoutError = (function () { - function AjaxTimeoutErrorImpl(xhr, request) { - exports.AjaxError.call(this, 'ajax timeout', xhr, request); - this.name = 'AjaxTimeoutError'; - return this; - } - AjaxTimeoutErrorImpl.prototype = Object.create(exports.AjaxError.prototype); - return AjaxTimeoutErrorImpl; -})(); -//# sourceMappingURL=errors.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/ajax/errors.js.map b/node_modules/rxjs/dist/cjs/internal/ajax/errors.js.map deleted file mode 100644 index 9829a2c..0000000 --- a/node_modules/rxjs/dist/cjs/internal/ajax/errors.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../src/internal/ajax/errors.ts"],"names":[],"mappings":";;;AACA,mDAAkD;AAClD,6DAA4D;AAmD/C,QAAA,SAAS,GAAkB,mCAAgB,CACtD,UAAC,MAAM;IACL,OAAA,SAAS,aAAa,CAAY,OAAe,EAAE,GAAmB,EAAE,OAAoB;QAC1F,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QACxB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;QACrC,IAAI,QAAa,CAAC;QAClB,IAAI;YAGF,QAAQ,GAAG,+BAAc,CAAC,GAAG,CAAC,CAAC;SAChC;QAAC,OAAO,GAAG,EAAE;YACZ,QAAQ,GAAG,GAAG,CAAC,YAAY,CAAC;SAC7B;QACD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;AAhBD,CAgBC,CACJ,CAAC;AAqBW,QAAA,gBAAgB,GAAyB,CAAC;IACrD,SAAS,oBAAoB,CAAY,GAAmB,EAAE,OAAoB;QAChF,iBAAS,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;QACnD,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,oBAAoB,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,iBAAS,CAAC,SAAS,CAAC,CAAC;IACpE,OAAO,oBAAoB,CAAC;AAC9B,CAAC,CAAC,EAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/ajax/getXHRResponse.js b/node_modules/rxjs/dist/cjs/internal/ajax/getXHRResponse.js deleted file mode 100644 index e2f8a51..0000000 --- a/node_modules/rxjs/dist/cjs/internal/ajax/getXHRResponse.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getXHRResponse = void 0; -function getXHRResponse(xhr) { - switch (xhr.responseType) { - case 'json': { - if ('response' in xhr) { - return xhr.response; - } - else { - var ieXHR = xhr; - return JSON.parse(ieXHR.responseText); - } - } - case 'document': - return xhr.responseXML; - case 'text': - default: { - if ('response' in xhr) { - return xhr.response; - } - else { - var ieXHR = xhr; - return ieXHR.responseText; - } - } - } -} -exports.getXHRResponse = getXHRResponse; -//# sourceMappingURL=getXHRResponse.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/ajax/getXHRResponse.js.map b/node_modules/rxjs/dist/cjs/internal/ajax/getXHRResponse.js.map deleted file mode 100644 index 142b909..0000000 --- a/node_modules/rxjs/dist/cjs/internal/ajax/getXHRResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getXHRResponse.js","sourceRoot":"","sources":["../../../../src/internal/ajax/getXHRResponse.ts"],"names":[],"mappings":";;;AAYA,SAAgB,cAAc,CAAC,GAAmB;IAChD,QAAQ,GAAG,CAAC,YAAY,EAAE;QACxB,KAAK,MAAM,CAAC,CAAC;YACX,IAAI,UAAU,IAAI,GAAG,EAAE;gBACrB,OAAO,GAAG,CAAC,QAAQ,CAAC;aACrB;iBAAM;gBAEL,IAAM,KAAK,GAAQ,GAAG,CAAC;gBACvB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;aACvC;SACF;QACD,KAAK,UAAU;YACb,OAAO,GAAG,CAAC,WAAW,CAAC;QACzB,KAAK,MAAM,CAAC;QACZ,OAAO,CAAC,CAAC;YACP,IAAI,UAAU,IAAI,GAAG,EAAE;gBACrB,OAAO,GAAG,CAAC,QAAQ,CAAC;aACrB;iBAAM;gBAEL,IAAM,KAAK,GAAQ,GAAG,CAAC;gBACvB,OAAO,KAAK,CAAC,YAAY,CAAC;aAC3B;SACF;KACF;AACH,CAAC;AAxBD,wCAwBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/ajax/types.js b/node_modules/rxjs/dist/cjs/internal/ajax/types.js deleted file mode 100644 index 11e638d..0000000 --- a/node_modules/rxjs/dist/cjs/internal/ajax/types.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/ajax/types.js.map b/node_modules/rxjs/dist/cjs/internal/ajax/types.js.map deleted file mode 100644 index f08bdb1..0000000 --- a/node_modules/rxjs/dist/cjs/internal/ajax/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/internal/ajax/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/config.js b/node_modules/rxjs/dist/cjs/internal/config.js deleted file mode 100644 index 0e96e70..0000000 --- a/node_modules/rxjs/dist/cjs/internal/config.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.config = void 0; -exports.config = { - onUnhandledError: null, - onStoppedNotification: null, - Promise: undefined, - useDeprecatedSynchronousErrorHandling: false, - useDeprecatedNextContext: false, -}; -//# sourceMappingURL=config.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/config.js.map b/node_modules/rxjs/dist/cjs/internal/config.js.map deleted file mode 100644 index 4b498b5..0000000 --- a/node_modules/rxjs/dist/cjs/internal/config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/internal/config.ts"],"names":[],"mappings":";;;AAOa,QAAA,MAAM,GAAiB;IAClC,gBAAgB,EAAE,IAAI;IACtB,qBAAqB,EAAE,IAAI;IAC3B,OAAO,EAAE,SAAS;IAClB,qCAAqC,EAAE,KAAK;IAC5C,wBAAwB,EAAE,KAAK;CAChC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/firstValueFrom.js b/node_modules/rxjs/dist/cjs/internal/firstValueFrom.js deleted file mode 100644 index 43444ec..0000000 --- a/node_modules/rxjs/dist/cjs/internal/firstValueFrom.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.firstValueFrom = void 0; -var EmptyError_1 = require("./util/EmptyError"); -var Subscriber_1 = require("./Subscriber"); -function firstValueFrom(source, config) { - var hasConfig = typeof config === 'object'; - return new Promise(function (resolve, reject) { - var subscriber = new Subscriber_1.SafeSubscriber({ - next: function (value) { - resolve(value); - subscriber.unsubscribe(); - }, - error: reject, - complete: function () { - if (hasConfig) { - resolve(config.defaultValue); - } - else { - reject(new EmptyError_1.EmptyError()); - } - }, - }); - source.subscribe(subscriber); - }); -} -exports.firstValueFrom = firstValueFrom; -//# sourceMappingURL=firstValueFrom.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/firstValueFrom.js.map b/node_modules/rxjs/dist/cjs/internal/firstValueFrom.js.map deleted file mode 100644 index 91603f7..0000000 --- a/node_modules/rxjs/dist/cjs/internal/firstValueFrom.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"firstValueFrom.js","sourceRoot":"","sources":["../../../src/internal/firstValueFrom.ts"],"names":[],"mappings":";;;AACA,gDAA+C;AAC/C,2CAA8C;AAqD9C,SAAgB,cAAc,CAAO,MAAqB,EAAE,MAAgC;IAC1F,IAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC;IAC7C,OAAO,IAAI,OAAO,CAAQ,UAAC,OAAO,EAAE,MAAM;QACxC,IAAM,UAAU,GAAG,IAAI,2BAAc,CAAI;YACvC,IAAI,EAAE,UAAC,KAAK;gBACV,OAAO,CAAC,KAAK,CAAC,CAAC;gBACf,UAAU,CAAC,WAAW,EAAE,CAAC;YAC3B,CAAC;YACD,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE;gBACR,IAAI,SAAS,EAAE;oBACb,OAAO,CAAC,MAAO,CAAC,YAAY,CAAC,CAAC;iBAC/B;qBAAM;oBACL,MAAM,CAAC,IAAI,uBAAU,EAAE,CAAC,CAAC;iBAC1B;YACH,CAAC;SACF,CAAC,CAAC;QACH,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AACL,CAAC;AAnBD,wCAmBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/lastValueFrom.js b/node_modules/rxjs/dist/cjs/internal/lastValueFrom.js deleted file mode 100644 index c29d0b3..0000000 --- a/node_modules/rxjs/dist/cjs/internal/lastValueFrom.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.lastValueFrom = void 0; -var EmptyError_1 = require("./util/EmptyError"); -function lastValueFrom(source, config) { - var hasConfig = typeof config === 'object'; - return new Promise(function (resolve, reject) { - var _hasValue = false; - var _value; - source.subscribe({ - next: function (value) { - _value = value; - _hasValue = true; - }, - error: reject, - complete: function () { - if (_hasValue) { - resolve(_value); - } - else if (hasConfig) { - resolve(config.defaultValue); - } - else { - reject(new EmptyError_1.EmptyError()); - } - }, - }); - }); -} -exports.lastValueFrom = lastValueFrom; -//# sourceMappingURL=lastValueFrom.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/lastValueFrom.js.map b/node_modules/rxjs/dist/cjs/internal/lastValueFrom.js.map deleted file mode 100644 index 7478518..0000000 --- a/node_modules/rxjs/dist/cjs/internal/lastValueFrom.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"lastValueFrom.js","sourceRoot":"","sources":["../../../src/internal/lastValueFrom.ts"],"names":[],"mappings":";;;AACA,gDAA+C;AAoD/C,SAAgB,aAAa,CAAO,MAAqB,EAAE,MAA+B;IACxF,IAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC;IAC7C,OAAO,IAAI,OAAO,CAAQ,UAAC,OAAO,EAAE,MAAM;QACxC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,MAAS,CAAC;QACd,MAAM,CAAC,SAAS,CAAC;YACf,IAAI,EAAE,UAAC,KAAK;gBACV,MAAM,GAAG,KAAK,CAAC;gBACf,SAAS,GAAG,IAAI,CAAC;YACnB,CAAC;YACD,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE;gBACR,IAAI,SAAS,EAAE;oBACb,OAAO,CAAC,MAAM,CAAC,CAAC;iBACjB;qBAAM,IAAI,SAAS,EAAE;oBACpB,OAAO,CAAC,MAAO,CAAC,YAAY,CAAC,CAAC;iBAC/B;qBAAM;oBACL,MAAM,CAAC,IAAI,uBAAU,EAAE,CAAC,CAAC;iBAC1B;YACH,CAAC;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAtBD,sCAsBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js b/node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js deleted file mode 100644 index 4683016..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js +++ /dev/null @@ -1,80 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ConnectableObservable = void 0; -var Observable_1 = require("../Observable"); -var Subscription_1 = require("../Subscription"); -var refCount_1 = require("../operators/refCount"); -var OperatorSubscriber_1 = require("../operators/OperatorSubscriber"); -var lift_1 = require("../util/lift"); -var ConnectableObservable = (function (_super) { - __extends(ConnectableObservable, _super); - function ConnectableObservable(source, subjectFactory) { - var _this = _super.call(this) || this; - _this.source = source; - _this.subjectFactory = subjectFactory; - _this._subject = null; - _this._refCount = 0; - _this._connection = null; - if (lift_1.hasLift(source)) { - _this.lift = source.lift; - } - return _this; - } - ConnectableObservable.prototype._subscribe = function (subscriber) { - return this.getSubject().subscribe(subscriber); - }; - ConnectableObservable.prototype.getSubject = function () { - var subject = this._subject; - if (!subject || subject.isStopped) { - this._subject = this.subjectFactory(); - } - return this._subject; - }; - ConnectableObservable.prototype._teardown = function () { - this._refCount = 0; - var _connection = this._connection; - this._subject = this._connection = null; - _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe(); - }; - ConnectableObservable.prototype.connect = function () { - var _this = this; - var connection = this._connection; - if (!connection) { - connection = this._connection = new Subscription_1.Subscription(); - var subject_1 = this.getSubject(); - connection.add(this.source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subject_1, undefined, function () { - _this._teardown(); - subject_1.complete(); - }, function (err) { - _this._teardown(); - subject_1.error(err); - }, function () { return _this._teardown(); }))); - if (connection.closed) { - this._connection = null; - connection = Subscription_1.Subscription.EMPTY; - } - } - return connection; - }; - ConnectableObservable.prototype.refCount = function () { - return refCount_1.refCount()(this); - }; - return ConnectableObservable; -}(Observable_1.Observable)); -exports.ConnectableObservable = ConnectableObservable; -//# sourceMappingURL=ConnectableObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js.map b/node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js.map deleted file mode 100644 index 9c85c45..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/ConnectableObservable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConnectableObservable.js","sourceRoot":"","sources":["../../../../src/internal/observable/ConnectableObservable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,4CAA2C;AAE3C,gDAA+C;AAC/C,kDAAwE;AACxE,sEAA2E;AAC3E,qCAAuC;AASvC;IAA8C,yCAAa;IAgBzD,+BAAmB,MAAqB,EAAY,cAAgC;QAApF,YACE,iBAAO,SAOR;QARkB,YAAM,GAAN,MAAM,CAAe;QAAY,oBAAc,GAAd,cAAc,CAAkB;QAf1E,cAAQ,GAAsB,IAAI,CAAC;QACnC,eAAS,GAAW,CAAC,CAAC;QACtB,iBAAW,GAAwB,IAAI,CAAC;QAkBhD,IAAI,cAAO,CAAC,MAAM,CAAC,EAAE;YACnB,KAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;SACzB;;IACH,CAAC;IAGS,0CAAU,GAApB,UAAqB,UAAyB;QAC5C,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACjD,CAAC;IAES,0CAAU,GAApB;QACE,IAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,SAAS,EAAE;YACjC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;SACvC;QACD,OAAO,IAAI,CAAC,QAAS,CAAC;IACxB,CAAC;IAES,yCAAS,GAAnB;QACE,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACX,IAAA,WAAW,GAAK,IAAI,YAAT,CAAU;QAC7B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,WAAW,EAAE,CAAC;IAC7B,CAAC;IAMD,uCAAO,GAAP;QAAA,iBA6BC;QA5BC,IAAI,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;QAClC,IAAI,CAAC,UAAU,EAAE;YACf,UAAU,GAAG,IAAI,CAAC,WAAW,GAAG,IAAI,2BAAY,EAAE,CAAC;YACnD,IAAM,SAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;YAClC,UAAU,CAAC,GAAG,CACZ,IAAI,CAAC,MAAM,CAAC,SAAS,CACnB,6CAAwB,CACtB,SAAc,EACd,SAAS,EACT;gBACE,KAAI,CAAC,SAAS,EAAE,CAAC;gBACjB,SAAO,CAAC,QAAQ,EAAE,CAAC;YACrB,CAAC,EACD,UAAC,GAAG;gBACF,KAAI,CAAC,SAAS,EAAE,CAAC;gBACjB,SAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACrB,CAAC,EACD,cAAM,OAAA,KAAI,CAAC,SAAS,EAAE,EAAhB,CAAgB,CACvB,CACF,CACF,CAAC;YAEF,IAAI,UAAU,CAAC,MAAM,EAAE;gBACrB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;gBACxB,UAAU,GAAG,2BAAY,CAAC,KAAK,CAAC;aACjC;SACF;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;IAMD,wCAAQ,GAAR;QACE,OAAO,mBAAmB,EAAE,CAAC,IAAI,CAAkB,CAAC;IACtD,CAAC;IACH,4BAAC;AAAD,CAAC,AAxFD,CAA8C,uBAAU,GAwFvD;AAxFY,sDAAqB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/bindCallback.js b/node_modules/rxjs/dist/cjs/internal/observable/bindCallback.js deleted file mode 100644 index c5aaa4f..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/bindCallback.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.bindCallback = void 0; -var bindCallbackInternals_1 = require("./bindCallbackInternals"); -function bindCallback(callbackFunc, resultSelector, scheduler) { - return bindCallbackInternals_1.bindCallbackInternals(false, callbackFunc, resultSelector, scheduler); -} -exports.bindCallback = bindCallback; -//# sourceMappingURL=bindCallback.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/bindCallback.js.map b/node_modules/rxjs/dist/cjs/internal/observable/bindCallback.js.map deleted file mode 100644 index e152dbd..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/bindCallback.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bindCallback.js","sourceRoot":"","sources":["../../../../src/internal/observable/bindCallback.ts"],"names":[],"mappings":";;;AAGA,iEAAgE;AA2IhE,SAAgB,YAAY,CAC1B,YAAkE,EAClE,cAA0D,EAC1D,SAAyB;IAEzB,OAAO,6CAAqB,CAAC,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;AAC/E,CAAC;AAND,oCAMC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/bindCallbackInternals.js b/node_modules/rxjs/dist/cjs/internal/observable/bindCallbackInternals.js deleted file mode 100644 index 94360db..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/bindCallbackInternals.js +++ /dev/null @@ -1,103 +0,0 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.bindCallbackInternals = void 0; -var isScheduler_1 = require("../util/isScheduler"); -var Observable_1 = require("../Observable"); -var subscribeOn_1 = require("../operators/subscribeOn"); -var mapOneOrManyArgs_1 = require("../util/mapOneOrManyArgs"); -var observeOn_1 = require("../operators/observeOn"); -var AsyncSubject_1 = require("../AsyncSubject"); -function bindCallbackInternals(isNodeStyle, callbackFunc, resultSelector, scheduler) { - if (resultSelector) { - if (isScheduler_1.isScheduler(resultSelector)) { - scheduler = resultSelector; - } - else { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return bindCallbackInternals(isNodeStyle, callbackFunc, scheduler) - .apply(this, args) - .pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)); - }; - } - } - if (scheduler) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return bindCallbackInternals(isNodeStyle, callbackFunc) - .apply(this, args) - .pipe(subscribeOn_1.subscribeOn(scheduler), observeOn_1.observeOn(scheduler)); - }; - } - return function () { - var _this = this; - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var subject = new AsyncSubject_1.AsyncSubject(); - var uninitialized = true; - return new Observable_1.Observable(function (subscriber) { - var subs = subject.subscribe(subscriber); - if (uninitialized) { - uninitialized = false; - var isAsync_1 = false; - var isComplete_1 = false; - callbackFunc.apply(_this, __spreadArray(__spreadArray([], __read(args)), [ - function () { - var results = []; - for (var _i = 0; _i < arguments.length; _i++) { - results[_i] = arguments[_i]; - } - if (isNodeStyle) { - var err = results.shift(); - if (err != null) { - subject.error(err); - return; - } - } - subject.next(1 < results.length ? results : results[0]); - isComplete_1 = true; - if (isAsync_1) { - subject.complete(); - } - }, - ])); - if (isComplete_1) { - subject.complete(); - } - isAsync_1 = true; - } - return subs; - }); - }; -} -exports.bindCallbackInternals = bindCallbackInternals; -//# sourceMappingURL=bindCallbackInternals.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/bindCallbackInternals.js.map b/node_modules/rxjs/dist/cjs/internal/observable/bindCallbackInternals.js.map deleted file mode 100644 index a28c457..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/bindCallbackInternals.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bindCallbackInternals.js","sourceRoot":"","sources":["../../../../src/internal/observable/bindCallbackInternals.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,mDAAkD;AAClD,4CAA2C;AAC3C,wDAAuD;AACvD,6DAA4D;AAC5D,oDAAmD;AACnD,gDAA+C;AAE/C,SAAgB,qBAAqB,CACnC,WAAoB,EACpB,YAAiB,EACjB,cAAoB,EACpB,SAAyB;IAEzB,IAAI,cAAc,EAAE;QAClB,IAAI,yBAAW,CAAC,cAAc,CAAC,EAAE;YAC/B,SAAS,GAAG,cAAc,CAAC;SAC5B;aAAM;YAEL,OAAO;gBAAqB,cAAc;qBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;oBAAd,yBAAc;;gBACxC,OAAQ,qBAAqB,CAAC,WAAW,EAAE,YAAY,EAAE,SAAS,CAAS;qBACxE,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC;qBACjB,IAAI,CAAC,mCAAgB,CAAC,cAAqB,CAAC,CAAC,CAAC;YACnD,CAAC,CAAC;SACH;KACF;IAID,IAAI,SAAS,EAAE;QACb,OAAO;YAAqB,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;YACxC,OAAQ,qBAAqB,CAAC,WAAW,EAAE,YAAY,CAAS;iBAC7D,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC;iBACjB,IAAI,CAAC,yBAAW,CAAC,SAAU,CAAC,EAAE,qBAAS,CAAC,SAAU,CAAC,CAAC,CAAC;QAC1D,CAAC,CAAC;KACH;IAED,OAAO;QAAA,iBAgFN;QAhF2B,cAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,yBAAc;;QAGxC,IAAM,OAAO,GAAG,IAAI,2BAAY,EAAO,CAAC;QAGxC,IAAI,aAAa,GAAG,IAAI,CAAC;QACzB,OAAO,IAAI,uBAAU,CAAC,UAAC,UAAU;YAE/B,IAAM,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;YAE3C,IAAI,aAAa,EAAE;gBACjB,aAAa,GAAG,KAAK,CAAC;gBAMtB,IAAI,SAAO,GAAG,KAAK,CAAC;gBAGpB,IAAI,YAAU,GAAG,KAAK,CAAC;gBAKvB,YAAY,CAAC,KAAK,CAEhB,KAAI,yCAGC,IAAI;oBAEP;wBAAC,iBAAiB;6BAAjB,UAAiB,EAAjB,qBAAiB,EAAjB,IAAiB;4BAAjB,4BAAiB;;wBAChB,IAAI,WAAW,EAAE;4BAIf,IAAM,GAAG,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;4BAC5B,IAAI,GAAG,IAAI,IAAI,EAAE;gCACf,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gCAGnB,OAAO;6BACR;yBACF;wBAKD,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;wBAGxD,YAAU,GAAG,IAAI,CAAC;wBAMlB,IAAI,SAAO,EAAE;4BACX,OAAO,CAAC,QAAQ,EAAE,CAAC;yBACpB;oBACH,CAAC;mBAEJ,CAAC;gBAIF,IAAI,YAAU,EAAE;oBACd,OAAO,CAAC,QAAQ,EAAE,CAAC;iBACpB;gBAID,SAAO,GAAG,IAAI,CAAC;aAChB;YAGD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AA9GD,sDA8GC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/bindNodeCallback.js b/node_modules/rxjs/dist/cjs/internal/observable/bindNodeCallback.js deleted file mode 100644 index 1b9da39..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/bindNodeCallback.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.bindNodeCallback = void 0; -var bindCallbackInternals_1 = require("./bindCallbackInternals"); -function bindNodeCallback(callbackFunc, resultSelector, scheduler) { - return bindCallbackInternals_1.bindCallbackInternals(true, callbackFunc, resultSelector, scheduler); -} -exports.bindNodeCallback = bindNodeCallback; -//# sourceMappingURL=bindNodeCallback.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/bindNodeCallback.js.map b/node_modules/rxjs/dist/cjs/internal/observable/bindNodeCallback.js.map deleted file mode 100644 index e93d49a..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/bindNodeCallback.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bindNodeCallback.js","sourceRoot":"","sources":["../../../../src/internal/observable/bindNodeCallback.ts"],"names":[],"mappings":";;;AAGA,iEAAgE;AAyHhE,SAAgB,gBAAgB,CAC9B,YAA4E,EAC5E,cAA0D,EAC1D,SAAyB;IAEzB,OAAO,6CAAqB,CAAC,IAAI,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;AAC9E,CAAC;AAND,4CAMC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js b/node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js deleted file mode 100644 index b89f3c5..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js +++ /dev/null @@ -1,75 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.combineLatestInit = exports.combineLatest = void 0; -var Observable_1 = require("../Observable"); -var argsArgArrayOrObject_1 = require("../util/argsArgArrayOrObject"); -var from_1 = require("./from"); -var identity_1 = require("../util/identity"); -var mapOneOrManyArgs_1 = require("../util/mapOneOrManyArgs"); -var args_1 = require("../util/args"); -var createObject_1 = require("../util/createObject"); -var OperatorSubscriber_1 = require("../operators/OperatorSubscriber"); -var executeSchedule_1 = require("../util/executeSchedule"); -function combineLatest() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = args_1.popScheduler(args); - var resultSelector = args_1.popResultSelector(args); - var _a = argsArgArrayOrObject_1.argsArgArrayOrObject(args), observables = _a.args, keys = _a.keys; - if (observables.length === 0) { - return from_1.from([], scheduler); - } - var result = new Observable_1.Observable(combineLatestInit(observables, scheduler, keys - ? - function (values) { return createObject_1.createObject(keys, values); } - : - identity_1.identity)); - return resultSelector ? result.pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) : result; -} -exports.combineLatest = combineLatest; -function combineLatestInit(observables, scheduler, valueTransform) { - if (valueTransform === void 0) { valueTransform = identity_1.identity; } - return function (subscriber) { - maybeSchedule(scheduler, function () { - var length = observables.length; - var values = new Array(length); - var active = length; - var remainingFirstValues = length; - var _loop_1 = function (i) { - maybeSchedule(scheduler, function () { - var source = from_1.from(observables[i], scheduler); - var hasFirstValue = false; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - values[i] = value; - if (!hasFirstValue) { - hasFirstValue = true; - remainingFirstValues--; - } - if (!remainingFirstValues) { - subscriber.next(valueTransform(values.slice())); - } - }, function () { - if (!--active) { - subscriber.complete(); - } - })); - }, subscriber); - }; - for (var i = 0; i < length; i++) { - _loop_1(i); - } - }, subscriber); - }; -} -exports.combineLatestInit = combineLatestInit; -function maybeSchedule(scheduler, execute, subscription) { - if (scheduler) { - executeSchedule_1.executeSchedule(subscription, scheduler, execute); - } - else { - execute(); - } -} -//# sourceMappingURL=combineLatest.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js.map b/node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js.map deleted file mode 100644 index 1c0b3c0..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/combineLatest.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"combineLatest.js","sourceRoot":"","sources":["../../../../src/internal/observable/combineLatest.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAE3C,qEAAoE;AAEpE,+BAA8B;AAC9B,6CAA4C;AAE5C,6DAA4D;AAC5D,qCAA+D;AAC/D,qDAAoD;AACpD,sEAA2E;AAE3E,2DAA0D;AAwL1D,SAAgB,aAAa;IAAoC,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,yBAAc;;IAC7E,IAAM,SAAS,GAAG,mBAAY,CAAC,IAAI,CAAC,CAAC;IACrC,IAAM,cAAc,GAAG,wBAAiB,CAAC,IAAI,CAAC,CAAC;IAEzC,IAAA,KAA8B,2CAAoB,CAAC,IAAI,CAAC,EAAhD,WAAW,UAAA,EAAE,IAAI,UAA+B,CAAC;IAE/D,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;QAI5B,OAAO,WAAI,CAAC,EAAE,EAAE,SAAgB,CAAC,CAAC;KACnC;IAED,IAAM,MAAM,GAAG,IAAI,uBAAU,CAC3B,iBAAiB,CACf,WAAoD,EACpD,SAAS,EACT,IAAI;QACF,CAAC;YACC,UAAC,MAAM,IAAK,OAAA,2BAAY,CAAC,IAAI,EAAE,MAAM,CAAC,EAA1B,CAA0B;QACxC,CAAC;YACC,mBAAQ,CACb,CACF,CAAC;IAEF,OAAO,cAAc,CAAC,CAAC,CAAE,MAAM,CAAC,IAAI,CAAC,mCAAgB,CAAC,cAAc,CAAC,CAAmB,CAAC,CAAC,CAAC,MAAM,CAAC;AACpG,CAAC;AA1BD,sCA0BC;AAED,SAAgB,iBAAiB,CAC/B,WAAmC,EACnC,SAAyB,EACzB,cAAiD;IAAjD,+BAAA,EAAA,iBAAyC,mBAAQ;IAEjD,OAAO,UAAC,UAA2B;QAGjC,aAAa,CACX,SAAS,EACT;YACU,IAAA,MAAM,GAAK,WAAW,OAAhB,CAAiB;YAE/B,IAAM,MAAM,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;YAGjC,IAAI,MAAM,GAAG,MAAM,CAAC;YAIpB,IAAI,oBAAoB,GAAG,MAAM,CAAC;oCAGzB,CAAC;gBACR,aAAa,CACX,SAAS,EACT;oBACE,IAAM,MAAM,GAAG,WAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,SAAgB,CAAC,CAAC;oBACtD,IAAI,aAAa,GAAG,KAAK,CAAC;oBAC1B,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;wBAEJ,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;wBAClB,IAAI,CAAC,aAAa,EAAE;4BAElB,aAAa,GAAG,IAAI,CAAC;4BACrB,oBAAoB,EAAE,CAAC;yBACxB;wBACD,IAAI,CAAC,oBAAoB,EAAE;4BAGzB,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;yBACjD;oBACH,CAAC,EACD;wBACE,IAAI,CAAC,EAAE,MAAM,EAAE;4BAGb,UAAU,CAAC,QAAQ,EAAE,CAAC;yBACvB;oBACH,CAAC,CACF,CACF,CAAC;gBACJ,CAAC,EACD,UAAU,CACX,CAAC;;YAlCJ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE;wBAAtB,CAAC;aAmCT;QACH,CAAC,EACD,UAAU,CACX,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AA/DD,8CA+DC;AAMD,SAAS,aAAa,CAAC,SAAoC,EAAE,OAAmB,EAAE,YAA0B;IAC1G,IAAI,SAAS,EAAE;QACb,iCAAe,CAAC,YAAY,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;KACnD;SAAM;QACL,OAAO,EAAE,CAAC;KACX;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/concat.js b/node_modules/rxjs/dist/cjs/internal/observable/concat.js deleted file mode 100644 index 120d5fb..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/concat.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.concat = void 0; -var concatAll_1 = require("../operators/concatAll"); -var args_1 = require("../util/args"); -var from_1 = require("./from"); -function concat() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return concatAll_1.concatAll()(from_1.from(args, args_1.popScheduler(args))); -} -exports.concat = concat; -//# sourceMappingURL=concat.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/concat.js.map b/node_modules/rxjs/dist/cjs/internal/observable/concat.js.map deleted file mode 100644 index ec59ae3..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/concat.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concat.js","sourceRoot":"","sources":["../../../../src/internal/observable/concat.ts"],"names":[],"mappings":";;;AAEA,oDAAmD;AACnD,qCAA4C;AAC5C,+BAA8B;AA4G9B,SAAgB,MAAM;IAAC,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,yBAAc;;IACnC,OAAO,qBAAS,EAAE,CAAC,WAAI,CAAC,IAAI,EAAE,mBAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACrD,CAAC;AAFD,wBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/connectable.js b/node_modules/rxjs/dist/cjs/internal/observable/connectable.js deleted file mode 100644 index 5952e6a..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/connectable.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.connectable = void 0; -var Subject_1 = require("../Subject"); -var Observable_1 = require("../Observable"); -var defer_1 = require("./defer"); -var DEFAULT_CONFIG = { - connector: function () { return new Subject_1.Subject(); }, - resetOnDisconnect: true, -}; -function connectable(source, config) { - if (config === void 0) { config = DEFAULT_CONFIG; } - var connection = null; - var connector = config.connector, _a = config.resetOnDisconnect, resetOnDisconnect = _a === void 0 ? true : _a; - var subject = connector(); - var result = new Observable_1.Observable(function (subscriber) { - return subject.subscribe(subscriber); - }); - result.connect = function () { - if (!connection || connection.closed) { - connection = defer_1.defer(function () { return source; }).subscribe(subject); - if (resetOnDisconnect) { - connection.add(function () { return (subject = connector()); }); - } - } - return connection; - }; - return result; -} -exports.connectable = connectable; -//# sourceMappingURL=connectable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/connectable.js.map b/node_modules/rxjs/dist/cjs/internal/observable/connectable.js.map deleted file mode 100644 index f319d9f..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/connectable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"connectable.js","sourceRoot":"","sources":["../../../../src/internal/observable/connectable.ts"],"names":[],"mappings":";;;AACA,sCAAqC;AAErC,4CAA2C;AAC3C,iCAAgC;AAsBhC,IAAM,cAAc,GAA+B;IACjD,SAAS,EAAE,cAAM,OAAA,IAAI,iBAAO,EAAW,EAAtB,CAAsB;IACvC,iBAAiB,EAAE,IAAI;CACxB,CAAC;AAUF,SAAgB,WAAW,CAAI,MAA0B,EAAE,MAA6C;IAA7C,uBAAA,EAAA,uBAA6C;IAEtG,IAAI,UAAU,GAAwB,IAAI,CAAC;IACnC,IAAA,SAAS,GAA+B,MAAM,UAArC,EAAE,KAA6B,MAAM,kBAAX,EAAxB,iBAAiB,mBAAG,IAAI,KAAA,CAAY;IACvD,IAAI,OAAO,GAAG,SAAS,EAAE,CAAC;IAE1B,IAAM,MAAM,GAAQ,IAAI,uBAAU,CAAI,UAAC,UAAU;QAC/C,OAAO,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;IAKH,MAAM,CAAC,OAAO,GAAG;QACf,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,EAAE;YACpC,UAAU,GAAG,aAAK,CAAC,cAAM,OAAA,MAAM,EAAN,CAAM,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;YACpD,IAAI,iBAAiB,EAAE;gBACrB,UAAU,CAAC,GAAG,CAAC,cAAM,OAAA,CAAC,OAAO,GAAG,SAAS,EAAE,CAAC,EAAvB,CAAuB,CAAC,CAAC;aAC/C;SACF;QACD,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC;AAxBD,kCAwBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/defer.js b/node_modules/rxjs/dist/cjs/internal/observable/defer.js deleted file mode 100644 index 56f9ddb..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/defer.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.defer = void 0; -var Observable_1 = require("../Observable"); -var innerFrom_1 = require("./innerFrom"); -function defer(observableFactory) { - return new Observable_1.Observable(function (subscriber) { - innerFrom_1.innerFrom(observableFactory()).subscribe(subscriber); - }); -} -exports.defer = defer; -//# sourceMappingURL=defer.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/defer.js.map b/node_modules/rxjs/dist/cjs/internal/observable/defer.js.map deleted file mode 100644 index 85955ce..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/defer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defer.js","sourceRoot":"","sources":["../../../../src/internal/observable/defer.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAE3C,yCAAwC;AAiDxC,SAAgB,KAAK,CAAiC,iBAA0B;IAC9E,OAAO,IAAI,uBAAU,CAAqB,UAAC,UAAU;QACnD,qBAAS,CAAC,iBAAiB,EAAE,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,sBAIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/dom/WebSocketSubject.js b/node_modules/rxjs/dist/cjs/internal/observable/dom/WebSocketSubject.js deleted file mode 100644 index cead103..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/dom/WebSocketSubject.js +++ /dev/null @@ -1,249 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.WebSocketSubject = void 0; -var Subject_1 = require("../../Subject"); -var Subscriber_1 = require("../../Subscriber"); -var Observable_1 = require("../../Observable"); -var Subscription_1 = require("../../Subscription"); -var ReplaySubject_1 = require("../../ReplaySubject"); -var DEFAULT_WEBSOCKET_CONFIG = { - url: '', - deserializer: function (e) { return JSON.parse(e.data); }, - serializer: function (value) { return JSON.stringify(value); }, -}; -var WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }'; -var WebSocketSubject = (function (_super) { - __extends(WebSocketSubject, _super); - function WebSocketSubject(urlConfigOrSource, destination) { - var _this = _super.call(this) || this; - _this._socket = null; - if (urlConfigOrSource instanceof Observable_1.Observable) { - _this.destination = destination; - _this.source = urlConfigOrSource; - } - else { - var config = (_this._config = __assign({}, DEFAULT_WEBSOCKET_CONFIG)); - _this._output = new Subject_1.Subject(); - if (typeof urlConfigOrSource === 'string') { - config.url = urlConfigOrSource; - } - else { - for (var key in urlConfigOrSource) { - if (urlConfigOrSource.hasOwnProperty(key)) { - config[key] = urlConfigOrSource[key]; - } - } - } - if (!config.WebSocketCtor && WebSocket) { - config.WebSocketCtor = WebSocket; - } - else if (!config.WebSocketCtor) { - throw new Error('no WebSocket constructor can be found'); - } - _this.destination = new ReplaySubject_1.ReplaySubject(); - } - return _this; - } - WebSocketSubject.prototype.lift = function (operator) { - var sock = new WebSocketSubject(this._config, this.destination); - sock.operator = operator; - sock.source = this; - return sock; - }; - WebSocketSubject.prototype._resetState = function () { - this._socket = null; - if (!this.source) { - this.destination = new ReplaySubject_1.ReplaySubject(); - } - this._output = new Subject_1.Subject(); - }; - WebSocketSubject.prototype.multiplex = function (subMsg, unsubMsg, messageFilter) { - var self = this; - return new Observable_1.Observable(function (observer) { - try { - self.next(subMsg()); - } - catch (err) { - observer.error(err); - } - var subscription = self.subscribe({ - next: function (x) { - try { - if (messageFilter(x)) { - observer.next(x); - } - } - catch (err) { - observer.error(err); - } - }, - error: function (err) { return observer.error(err); }, - complete: function () { return observer.complete(); }, - }); - return function () { - try { - self.next(unsubMsg()); - } - catch (err) { - observer.error(err); - } - subscription.unsubscribe(); - }; - }); - }; - WebSocketSubject.prototype._connectSocket = function () { - var _this = this; - var _a = this._config, WebSocketCtor = _a.WebSocketCtor, protocol = _a.protocol, url = _a.url, binaryType = _a.binaryType; - var observer = this._output; - var socket = null; - try { - socket = protocol ? new WebSocketCtor(url, protocol) : new WebSocketCtor(url); - this._socket = socket; - if (binaryType) { - this._socket.binaryType = binaryType; - } - } - catch (e) { - observer.error(e); - return; - } - var subscription = new Subscription_1.Subscription(function () { - _this._socket = null; - if (socket && socket.readyState === 1) { - socket.close(); - } - }); - socket.onopen = function (evt) { - var _socket = _this._socket; - if (!_socket) { - socket.close(); - _this._resetState(); - return; - } - var openObserver = _this._config.openObserver; - if (openObserver) { - openObserver.next(evt); - } - var queue = _this.destination; - _this.destination = Subscriber_1.Subscriber.create(function (x) { - if (socket.readyState === 1) { - try { - var serializer = _this._config.serializer; - socket.send(serializer(x)); - } - catch (e) { - _this.destination.error(e); - } - } - }, function (err) { - var closingObserver = _this._config.closingObserver; - if (closingObserver) { - closingObserver.next(undefined); - } - if (err && err.code) { - socket.close(err.code, err.reason); - } - else { - observer.error(new TypeError(WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT)); - } - _this._resetState(); - }, function () { - var closingObserver = _this._config.closingObserver; - if (closingObserver) { - closingObserver.next(undefined); - } - socket.close(); - _this._resetState(); - }); - if (queue && queue instanceof ReplaySubject_1.ReplaySubject) { - subscription.add(queue.subscribe(_this.destination)); - } - }; - socket.onerror = function (e) { - _this._resetState(); - observer.error(e); - }; - socket.onclose = function (e) { - if (socket === _this._socket) { - _this._resetState(); - } - var closeObserver = _this._config.closeObserver; - if (closeObserver) { - closeObserver.next(e); - } - if (e.wasClean) { - observer.complete(); - } - else { - observer.error(e); - } - }; - socket.onmessage = function (e) { - try { - var deserializer = _this._config.deserializer; - observer.next(deserializer(e)); - } - catch (err) { - observer.error(err); - } - }; - }; - WebSocketSubject.prototype._subscribe = function (subscriber) { - var _this = this; - var source = this.source; - if (source) { - return source.subscribe(subscriber); - } - if (!this._socket) { - this._connectSocket(); - } - this._output.subscribe(subscriber); - subscriber.add(function () { - var _socket = _this._socket; - if (_this._output.observers.length === 0) { - if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) { - _socket.close(); - } - _this._resetState(); - } - }); - return subscriber; - }; - WebSocketSubject.prototype.unsubscribe = function () { - var _socket = this._socket; - if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) { - _socket.close(); - } - this._resetState(); - _super.prototype.unsubscribe.call(this); - }; - return WebSocketSubject; -}(Subject_1.AnonymousSubject)); -exports.WebSocketSubject = WebSocketSubject; -//# sourceMappingURL=WebSocketSubject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/dom/WebSocketSubject.js.map b/node_modules/rxjs/dist/cjs/internal/observable/dom/WebSocketSubject.js.map deleted file mode 100644 index ec11b0b..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/dom/WebSocketSubject.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"WebSocketSubject.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/WebSocketSubject.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA0D;AAC1D,+CAA8C;AAC9C,+CAA8C;AAC9C,mDAAkD;AAElD,qDAAoD;AA4IpD,IAAM,wBAAwB,GAAgC;IAC5D,GAAG,EAAE,EAAE;IACP,YAAY,EAAE,UAAC,CAAe,IAAK,OAAA,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,EAAlB,CAAkB;IACrD,UAAU,EAAE,UAAC,KAAU,IAAK,OAAA,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAArB,CAAqB;CAClD,CAAC;AAEF,IAAM,qCAAqC,GACzC,mIAAmI,CAAC;AAItI;IAAyC,oCAAmB;IAU1D,0BAAY,iBAAqE,EAAE,WAAyB;QAA5G,YACE,iBAAO,SAwBR;QA3BO,aAAO,GAAqB,IAAI,CAAC;QAIvC,IAAI,iBAAiB,YAAY,uBAAU,EAAE;YAC3C,KAAI,CAAC,WAAW,GAAG,WAAW,CAAC;YAC/B,KAAI,CAAC,MAAM,GAAG,iBAAkC,CAAC;SAClD;aAAM;YACL,IAAM,MAAM,GAAG,CAAC,KAAI,CAAC,OAAO,gBAAQ,wBAAwB,CAAE,CAAC,CAAC;YAChE,KAAI,CAAC,OAAO,GAAG,IAAI,iBAAO,EAAK,CAAC;YAChC,IAAI,OAAO,iBAAiB,KAAK,QAAQ,EAAE;gBACzC,MAAM,CAAC,GAAG,GAAG,iBAAiB,CAAC;aAChC;iBAAM;gBACL,KAAK,IAAM,GAAG,IAAI,iBAAiB,EAAE;oBACnC,IAAI,iBAAiB,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;wBACxC,MAAc,CAAC,GAAG,CAAC,GAAI,iBAAyB,CAAC,GAAG,CAAC,CAAC;qBACxD;iBACF;aACF;YAED,IAAI,CAAC,MAAM,CAAC,aAAa,IAAI,SAAS,EAAE;gBACtC,MAAM,CAAC,aAAa,GAAG,SAAS,CAAC;aAClC;iBAAM,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE;gBAChC,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;aAC1D;YACD,KAAI,CAAC,WAAW,GAAG,IAAI,6BAAa,EAAE,CAAC;SACxC;;IACH,CAAC;IAGD,+BAAI,GAAJ,UAAQ,QAAwB;QAC9B,IAAM,IAAI,GAAG,IAAI,gBAAgB,CAAI,IAAI,CAAC,OAAsC,EAAE,IAAI,CAAC,WAAkB,CAAC,CAAC;QAC3G,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,sCAAW,GAAnB;QACE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,IAAI,CAAC,WAAW,GAAG,IAAI,6BAAa,EAAE,CAAC;SACxC;QACD,IAAI,CAAC,OAAO,GAAG,IAAI,iBAAO,EAAK,CAAC;IAClC,CAAC;IAoBD,oCAAS,GAAT,UAAU,MAAiB,EAAE,QAAmB,EAAE,aAAoC;QACpF,IAAM,IAAI,GAAG,IAAI,CAAC;QAClB,OAAO,IAAI,uBAAU,CAAC,UAAC,QAAqB;YAC1C,IAAI;gBACF,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;aACrB;YAAC,OAAO,GAAG,EAAE;gBACZ,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aACrB;YAED,IAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC;gBAClC,IAAI,EAAE,UAAC,CAAC;oBACN,IAAI;wBACF,IAAI,aAAa,CAAC,CAAC,CAAC,EAAE;4BACpB,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;yBAClB;qBACF;oBAAC,OAAO,GAAG,EAAE;wBACZ,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;qBACrB;gBACH,CAAC;gBACD,KAAK,EAAE,UAAC,GAAG,IAAK,OAAA,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,EAAnB,CAAmB;gBACnC,QAAQ,EAAE,cAAM,OAAA,QAAQ,CAAC,QAAQ,EAAE,EAAnB,CAAmB;aACpC,CAAC,CAAC;YAEH,OAAO;gBACL,IAAI;oBACF,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;iBACvB;gBAAC,OAAO,GAAG,EAAE;oBACZ,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACrB;gBACD,YAAY,CAAC,WAAW,EAAE,CAAC;YAC7B,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,yCAAc,GAAtB;QAAA,iBAuGC;QAtGO,IAAA,KAA+C,IAAI,CAAC,OAAO,EAAzD,aAAa,mBAAA,EAAE,QAAQ,cAAA,EAAE,GAAG,SAAA,EAAE,UAAU,gBAAiB,CAAC;QAClE,IAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC;QAE9B,IAAI,MAAM,GAAqB,IAAI,CAAC;QACpC,IAAI;YACF,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,aAAc,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,aAAc,CAAC,GAAG,CAAC,CAAC;YAChF,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;YACtB,IAAI,UAAU,EAAE;gBACd,IAAI,CAAC,OAAO,CAAC,UAAU,GAAG,UAAU,CAAC;aACtC;SACF;QAAC,OAAO,CAAC,EAAE;YACV,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAClB,OAAO;SACR;QAED,IAAM,YAAY,GAAG,IAAI,2BAAY,CAAC;YACpC,KAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YACpB,IAAI,MAAM,IAAI,MAAM,CAAC,UAAU,KAAK,CAAC,EAAE;gBACrC,MAAM,CAAC,KAAK,EAAE,CAAC;aAChB;QACH,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,GAAG,UAAC,GAAU;YACjB,IAAA,OAAO,GAAK,KAAI,QAAT,CAAU;YACzB,IAAI,CAAC,OAAO,EAAE;gBACZ,MAAO,CAAC,KAAK,EAAE,CAAC;gBAChB,KAAI,CAAC,WAAW,EAAE,CAAC;gBACnB,OAAO;aACR;YACO,IAAA,YAAY,GAAK,KAAI,CAAC,OAAO,aAAjB,CAAkB;YACtC,IAAI,YAAY,EAAE;gBAChB,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aACxB;YAED,IAAM,KAAK,GAAG,KAAI,CAAC,WAAW,CAAC;YAE/B,KAAI,CAAC,WAAW,GAAG,uBAAU,CAAC,MAAM,CAClC,UAAC,CAAC;gBACA,IAAI,MAAO,CAAC,UAAU,KAAK,CAAC,EAAE;oBAC5B,IAAI;wBACM,IAAA,UAAU,GAAK,KAAI,CAAC,OAAO,WAAjB,CAAkB;wBACpC,MAAO,CAAC,IAAI,CAAC,UAAW,CAAC,CAAE,CAAC,CAAC,CAAC;qBAC/B;oBAAC,OAAO,CAAC,EAAE;wBACV,KAAI,CAAC,WAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;qBAC5B;iBACF;YACH,CAAC,EACD,UAAC,GAAG;gBACM,IAAA,eAAe,GAAK,KAAI,CAAC,OAAO,gBAAjB,CAAkB;gBACzC,IAAI,eAAe,EAAE;oBACnB,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;iBACjC;gBACD,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE;oBACnB,MAAO,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;iBACrC;qBAAM;oBACL,QAAQ,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,qCAAqC,CAAC,CAAC,CAAC;iBACtE;gBACD,KAAI,CAAC,WAAW,EAAE,CAAC;YACrB,CAAC,EACD;gBACU,IAAA,eAAe,GAAK,KAAI,CAAC,OAAO,gBAAjB,CAAkB;gBACzC,IAAI,eAAe,EAAE;oBACnB,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;iBACjC;gBACD,MAAO,CAAC,KAAK,EAAE,CAAC;gBAChB,KAAI,CAAC,WAAW,EAAE,CAAC;YACrB,CAAC,CACiB,CAAC;YAErB,IAAI,KAAK,IAAI,KAAK,YAAY,6BAAa,EAAE;gBAC3C,YAAY,CAAC,GAAG,CAAE,KAA0B,CAAC,SAAS,CAAC,KAAI,CAAC,WAAW,CAAC,CAAC,CAAC;aAC3E;QACH,CAAC,CAAC;QAEF,MAAM,CAAC,OAAO,GAAG,UAAC,CAAQ;YACxB,KAAI,CAAC,WAAW,EAAE,CAAC;YACnB,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC,CAAC;QAEF,MAAM,CAAC,OAAO,GAAG,UAAC,CAAa;YAC7B,IAAI,MAAM,KAAK,KAAI,CAAC,OAAO,EAAE;gBAC3B,KAAI,CAAC,WAAW,EAAE,CAAC;aACpB;YACO,IAAA,aAAa,GAAK,KAAI,CAAC,OAAO,cAAjB,CAAkB;YACvC,IAAI,aAAa,EAAE;gBACjB,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aACvB;YACD,IAAI,CAAC,CAAC,QAAQ,EAAE;gBACd,QAAQ,CAAC,QAAQ,EAAE,CAAC;aACrB;iBAAM;gBACL,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;aACnB;QACH,CAAC,CAAC;QAEF,MAAM,CAAC,SAAS,GAAG,UAAC,CAAe;YACjC,IAAI;gBACM,IAAA,YAAY,GAAK,KAAI,CAAC,OAAO,aAAjB,CAAkB;gBACtC,QAAQ,CAAC,IAAI,CAAC,YAAa,CAAC,CAAC,CAAC,CAAC,CAAC;aACjC;YAAC,OAAO,GAAG,EAAE;gBACZ,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aACrB;QACH,CAAC,CAAC;IACJ,CAAC;IAGS,qCAAU,GAApB,UAAqB,UAAyB;QAA9C,iBAmBC;QAlBS,IAAA,MAAM,GAAK,IAAI,OAAT,CAAU;QACxB,IAAI,MAAM,EAAE;YACV,OAAO,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;SACrC;QACD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACjB,IAAI,CAAC,cAAc,EAAE,CAAC;SACvB;QACD,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QACnC,UAAU,CAAC,GAAG,CAAC;YACL,IAAA,OAAO,GAAK,KAAI,QAAT,CAAU;YACzB,IAAI,KAAI,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;gBACvC,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,KAAK,CAAC,IAAI,OAAO,CAAC,UAAU,KAAK,CAAC,CAAC,EAAE;oBACrE,OAAO,CAAC,KAAK,EAAE,CAAC;iBACjB;gBACD,KAAI,CAAC,WAAW,EAAE,CAAC;aACpB;QACH,CAAC,CAAC,CAAC;QACH,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,sCAAW,GAAX;QACU,IAAA,OAAO,GAAK,IAAI,QAAT,CAAU;QACzB,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,KAAK,CAAC,IAAI,OAAO,CAAC,UAAU,KAAK,CAAC,CAAC,EAAE;YACrE,OAAO,CAAC,KAAK,EAAE,CAAC;SACjB;QACD,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,iBAAM,WAAW,WAAE,CAAC;IACtB,CAAC;IACH,uBAAC;AAAD,CAAC,AAhPD,CAAyC,0BAAgB,GAgPxD;AAhPY,4CAAgB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/dom/animationFrames.js b/node_modules/rxjs/dist/cjs/internal/observable/dom/animationFrames.js deleted file mode 100644 index aeb24d1..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/dom/animationFrames.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.animationFrames = void 0; -var Observable_1 = require("../../Observable"); -var performanceTimestampProvider_1 = require("../../scheduler/performanceTimestampProvider"); -var animationFrameProvider_1 = require("../../scheduler/animationFrameProvider"); -function animationFrames(timestampProvider) { - return timestampProvider ? animationFramesFactory(timestampProvider) : DEFAULT_ANIMATION_FRAMES; -} -exports.animationFrames = animationFrames; -function animationFramesFactory(timestampProvider) { - return new Observable_1.Observable(function (subscriber) { - var provider = timestampProvider || performanceTimestampProvider_1.performanceTimestampProvider; - var start = provider.now(); - var id = 0; - var run = function () { - if (!subscriber.closed) { - id = animationFrameProvider_1.animationFrameProvider.requestAnimationFrame(function (timestamp) { - id = 0; - var now = provider.now(); - subscriber.next({ - timestamp: timestampProvider ? now : timestamp, - elapsed: now - start, - }); - run(); - }); - } - }; - run(); - return function () { - if (id) { - animationFrameProvider_1.animationFrameProvider.cancelAnimationFrame(id); - } - }; - }); -} -var DEFAULT_ANIMATION_FRAMES = animationFramesFactory(); -//# sourceMappingURL=animationFrames.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/dom/animationFrames.js.map b/node_modules/rxjs/dist/cjs/internal/observable/dom/animationFrames.js.map deleted file mode 100644 index 3291a02..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/dom/animationFrames.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"animationFrames.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/animationFrames.ts"],"names":[],"mappings":";;;AAAA,+CAA8C;AAE9C,6FAA4F;AAC5F,iFAAgF;AAuEhF,SAAgB,eAAe,CAAC,iBAAqC;IACnE,OAAO,iBAAiB,CAAC,CAAC,CAAC,sBAAsB,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,wBAAwB,CAAC;AAClG,CAAC;AAFD,0CAEC;AAMD,SAAS,sBAAsB,CAAC,iBAAqC;IACnE,OAAO,IAAI,uBAAU,CAAyC,UAAC,UAAU;QAIvE,IAAM,QAAQ,GAAG,iBAAiB,IAAI,2DAA4B,CAAC;QAMnE,IAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC;QAE7B,IAAI,EAAE,GAAG,CAAC,CAAC;QACX,IAAM,GAAG,GAAG;YACV,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;gBACtB,EAAE,GAAG,+CAAsB,CAAC,qBAAqB,CAAC,UAAC,SAAuC;oBACxF,EAAE,GAAG,CAAC,CAAC;oBAQP,IAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC;oBAC3B,UAAU,CAAC,IAAI,CAAC;wBACd,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS;wBAC9C,OAAO,EAAE,GAAG,GAAG,KAAK;qBACrB,CAAC,CAAC;oBACH,GAAG,EAAE,CAAC;gBACR,CAAC,CAAC,CAAC;aACJ;QACH,CAAC,CAAC;QAEF,GAAG,EAAE,CAAC;QAEN,OAAO;YACL,IAAI,EAAE,EAAE;gBACN,+CAAsB,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAC;aACjD;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAMD,IAAM,wBAAwB,GAAG,sBAAsB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/dom/fetch.js b/node_modules/rxjs/dist/cjs/internal/observable/dom/fetch.js deleted file mode 100644 index 0bb09ef..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/dom/fetch.js +++ /dev/null @@ -1,79 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.fromFetch = void 0; -var OperatorSubscriber_1 = require("../../operators/OperatorSubscriber"); -var Observable_1 = require("../../Observable"); -var innerFrom_1 = require("../../observable/innerFrom"); -function fromFetch(input, initWithSelector) { - if (initWithSelector === void 0) { initWithSelector = {}; } - var selector = initWithSelector.selector, init = __rest(initWithSelector, ["selector"]); - return new Observable_1.Observable(function (subscriber) { - var controller = new AbortController(); - var signal = controller.signal; - var abortable = true; - var outerSignal = init.signal; - if (outerSignal) { - if (outerSignal.aborted) { - controller.abort(); - } - else { - var outerSignalHandler_1 = function () { - if (!signal.aborted) { - controller.abort(); - } - }; - outerSignal.addEventListener('abort', outerSignalHandler_1); - subscriber.add(function () { return outerSignal.removeEventListener('abort', outerSignalHandler_1); }); - } - } - var perSubscriberInit = __assign(__assign({}, init), { signal: signal }); - var handleError = function (err) { - abortable = false; - subscriber.error(err); - }; - fetch(input, perSubscriberInit) - .then(function (response) { - if (selector) { - innerFrom_1.innerFrom(selector(response)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, function () { - abortable = false; - subscriber.complete(); - }, handleError)); - } - else { - abortable = false; - subscriber.next(response); - subscriber.complete(); - } - }) - .catch(handleError); - return function () { - if (abortable) { - controller.abort(); - } - }; - }); -} -exports.fromFetch = fromFetch; -//# sourceMappingURL=fetch.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/dom/fetch.js.map b/node_modules/rxjs/dist/cjs/internal/observable/dom/fetch.js.map deleted file mode 100644 index a770094..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/dom/fetch.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/fetch.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yEAA8E;AAC9E,+CAA8C;AAC9C,wDAAuD;AA4FvD,SAAgB,SAAS,CACvB,KAAuB,EACvB,gBAEM;IAFN,iCAAA,EAAA,qBAEM;IAEE,IAAA,QAAQ,GAAc,gBAAgB,SAA9B,EAAK,IAAI,UAAK,gBAAgB,EAAxC,YAAqB,CAAF,CAAsB;IAC/C,OAAO,IAAI,uBAAU,CAAe,UAAC,UAAU;QAK7C,IAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;QACjC,IAAA,MAAM,GAAK,UAAU,OAAf,CAAgB;QAK9B,IAAI,SAAS,GAAG,IAAI,CAAC;QAKb,IAAQ,WAAW,GAAK,IAAI,OAAT,CAAU;QACrC,IAAI,WAAW,EAAE;YACf,IAAI,WAAW,CAAC,OAAO,EAAE;gBACvB,UAAU,CAAC,KAAK,EAAE,CAAC;aACpB;iBAAM;gBAGL,IAAM,oBAAkB,GAAG;oBACzB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;wBACnB,UAAU,CAAC,KAAK,EAAE,CAAC;qBACpB;gBACH,CAAC,CAAC;gBACF,WAAW,CAAC,gBAAgB,CAAC,OAAO,EAAE,oBAAkB,CAAC,CAAC;gBAC1D,UAAU,CAAC,GAAG,CAAC,cAAM,OAAA,WAAW,CAAC,mBAAmB,CAAC,OAAO,EAAE,oBAAkB,CAAC,EAA5D,CAA4D,CAAC,CAAC;aACpF;SACF;QAOD,IAAM,iBAAiB,yBAAqB,IAAI,KAAE,MAAM,QAAA,GAAE,CAAC;QAE3D,IAAM,WAAW,GAAG,UAAC,GAAQ;YAC3B,SAAS,GAAG,KAAK,CAAC;YAClB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,CAAC;QAEF,KAAK,CAAC,KAAK,EAAE,iBAAiB,CAAC;aAC5B,IAAI,CAAC,UAAC,QAAQ;YACb,IAAI,QAAQ,EAAE;gBAIZ,qBAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CACrC,6CAAwB,CACtB,UAAU,EAEV,SAAS,EAET;oBACE,SAAS,GAAG,KAAK,CAAC;oBAClB,UAAU,CAAC,QAAQ,EAAE,CAAC;gBACxB,CAAC,EACD,WAAW,CACZ,CACF,CAAC;aACH;iBAAM;gBACL,SAAS,GAAG,KAAK,CAAC;gBAClB,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAC1B,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,CAAC;aACD,KAAK,CAAC,WAAW,CAAC,CAAC;QAEtB,OAAO;YACL,IAAI,SAAS,EAAE;gBACb,UAAU,CAAC,KAAK,EAAE,CAAC;aACpB;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AArFD,8BAqFC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/dom/webSocket.js b/node_modules/rxjs/dist/cjs/internal/observable/dom/webSocket.js deleted file mode 100644 index 449b942..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/dom/webSocket.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.webSocket = void 0; -var WebSocketSubject_1 = require("./WebSocketSubject"); -function webSocket(urlConfigOrSource) { - return new WebSocketSubject_1.WebSocketSubject(urlConfigOrSource); -} -exports.webSocket = webSocket; -//# sourceMappingURL=webSocket.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/dom/webSocket.js.map b/node_modules/rxjs/dist/cjs/internal/observable/dom/webSocket.js.map deleted file mode 100644 index 2cb3f6b..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/dom/webSocket.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"webSocket.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/webSocket.ts"],"names":[],"mappings":";;;AAAA,uDAA8E;AA8J9E,SAAgB,SAAS,CAAI,iBAAqD;IAChF,OAAO,IAAI,mCAAgB,CAAI,iBAAiB,CAAC,CAAC;AACpD,CAAC;AAFD,8BAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/empty.js b/node_modules/rxjs/dist/cjs/internal/observable/empty.js deleted file mode 100644 index adce289..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/empty.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.empty = exports.EMPTY = void 0; -var Observable_1 = require("../Observable"); -exports.EMPTY = new Observable_1.Observable(function (subscriber) { return subscriber.complete(); }); -function empty(scheduler) { - return scheduler ? emptyScheduled(scheduler) : exports.EMPTY; -} -exports.empty = empty; -function emptyScheduled(scheduler) { - return new Observable_1.Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); }); -} -//# sourceMappingURL=empty.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/empty.js.map b/node_modules/rxjs/dist/cjs/internal/observable/empty.js.map deleted file mode 100644 index bbe6332..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/empty.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"empty.js","sourceRoot":"","sources":["../../../../src/internal/observable/empty.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAiE9B,QAAA,KAAK,GAAG,IAAI,uBAAU,CAAQ,UAAC,UAAU,IAAK,OAAA,UAAU,CAAC,QAAQ,EAAE,EAArB,CAAqB,CAAC,CAAC;AAOlF,SAAgB,KAAK,CAAC,SAAyB;IAC7C,OAAO,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,aAAK,CAAC;AACvD,CAAC;AAFD,sBAEC;AAED,SAAS,cAAc,CAAC,SAAwB;IAC9C,OAAO,IAAI,uBAAU,CAAQ,UAAC,UAAU,IAAK,OAAA,SAAS,CAAC,QAAQ,CAAC,cAAM,OAAA,UAAU,CAAC,QAAQ,EAAE,EAArB,CAAqB,CAAC,EAA/C,CAA+C,CAAC,CAAC;AAChG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js b/node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js deleted file mode 100644 index 3983354..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.forkJoin = void 0; -var Observable_1 = require("../Observable"); -var argsArgArrayOrObject_1 = require("../util/argsArgArrayOrObject"); -var innerFrom_1 = require("./innerFrom"); -var args_1 = require("../util/args"); -var OperatorSubscriber_1 = require("../operators/OperatorSubscriber"); -var mapOneOrManyArgs_1 = require("../util/mapOneOrManyArgs"); -var createObject_1 = require("../util/createObject"); -function forkJoin() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var resultSelector = args_1.popResultSelector(args); - var _a = argsArgArrayOrObject_1.argsArgArrayOrObject(args), sources = _a.args, keys = _a.keys; - var result = new Observable_1.Observable(function (subscriber) { - var length = sources.length; - if (!length) { - subscriber.complete(); - return; - } - var values = new Array(length); - var remainingCompletions = length; - var remainingEmissions = length; - var _loop_1 = function (sourceIndex) { - var hasValue = false; - innerFrom_1.innerFrom(sources[sourceIndex]).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - if (!hasValue) { - hasValue = true; - remainingEmissions--; - } - values[sourceIndex] = value; - }, function () { return remainingCompletions--; }, undefined, function () { - if (!remainingCompletions || !hasValue) { - if (!remainingEmissions) { - subscriber.next(keys ? createObject_1.createObject(keys, values) : values); - } - subscriber.complete(); - } - })); - }; - for (var sourceIndex = 0; sourceIndex < length; sourceIndex++) { - _loop_1(sourceIndex); - } - }); - return resultSelector ? result.pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) : result; -} -exports.forkJoin = forkJoin; -//# sourceMappingURL=forkJoin.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js.map b/node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js.map deleted file mode 100644 index d7db651..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/forkJoin.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"forkJoin.js","sourceRoot":"","sources":["../../../../src/internal/observable/forkJoin.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAE3C,qEAAoE;AACpE,yCAAwC;AACxC,qCAAiD;AACjD,sEAA2E;AAC3E,6DAA4D;AAC5D,qDAAoD;AAyIpD,SAAgB,QAAQ;IAAC,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,yBAAc;;IACrC,IAAM,cAAc,GAAG,wBAAiB,CAAC,IAAI,CAAC,CAAC;IACzC,IAAA,KAA0B,2CAAoB,CAAC,IAAI,CAAC,EAA5C,OAAO,UAAA,EAAE,IAAI,UAA+B,CAAC;IAC3D,IAAM,MAAM,GAAG,IAAI,uBAAU,CAAC,UAAC,UAAU;QAC/B,IAAA,MAAM,GAAK,OAAO,OAAZ,CAAa;QAC3B,IAAI,CAAC,MAAM,EAAE;YACX,UAAU,CAAC,QAAQ,EAAE,CAAC;YACtB,OAAO;SACR;QACD,IAAM,MAAM,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;QACjC,IAAI,oBAAoB,GAAG,MAAM,CAAC;QAClC,IAAI,kBAAkB,GAAG,MAAM,CAAC;gCACvB,WAAW;YAClB,IAAI,QAAQ,GAAG,KAAK,CAAC;YACrB,qBAAS,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CACvC,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;gBACJ,IAAI,CAAC,QAAQ,EAAE;oBACb,QAAQ,GAAG,IAAI,CAAC;oBAChB,kBAAkB,EAAE,CAAC;iBACtB;gBACD,MAAM,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;YAC9B,CAAC,EACD,cAAM,OAAA,oBAAoB,EAAE,EAAtB,CAAsB,EAC5B,SAAS,EACT;gBACE,IAAI,CAAC,oBAAoB,IAAI,CAAC,QAAQ,EAAE;oBACtC,IAAI,CAAC,kBAAkB,EAAE;wBACvB,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,2BAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;qBAC7D;oBACD,UAAU,CAAC,QAAQ,EAAE,CAAC;iBACvB;YACH,CAAC,CACF,CACF,CAAC;;QAvBJ,KAAK,IAAI,WAAW,GAAG,CAAC,EAAE,WAAW,GAAG,MAAM,EAAE,WAAW,EAAE;oBAApD,WAAW;SAwBnB;IACH,CAAC,CAAC,CAAC;IACH,OAAO,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,mCAAgB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AACjF,CAAC;AAvCD,4BAuCC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/from.js b/node_modules/rxjs/dist/cjs/internal/observable/from.js deleted file mode 100644 index 60e711c..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/from.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.from = void 0; -var scheduled_1 = require("../scheduled/scheduled"); -var innerFrom_1 = require("./innerFrom"); -function from(input, scheduler) { - return scheduler ? scheduled_1.scheduled(input, scheduler) : innerFrom_1.innerFrom(input); -} -exports.from = from; -//# sourceMappingURL=from.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/from.js.map b/node_modules/rxjs/dist/cjs/internal/observable/from.js.map deleted file mode 100644 index 2a9bc11..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/from.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"from.js","sourceRoot":"","sources":["../../../../src/internal/observable/from.ts"],"names":[],"mappings":";;;AAEA,oDAAmD;AACnD,yCAAwC;AAkGxC,SAAgB,IAAI,CAAI,KAAyB,EAAE,SAAyB;IAC1E,OAAO,SAAS,CAAC,CAAC,CAAC,qBAAS,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,qBAAS,CAAC,KAAK,CAAC,CAAC;AACpE,CAAC;AAFD,oBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/fromEvent.js b/node_modules/rxjs/dist/cjs/internal/observable/fromEvent.js deleted file mode 100644 index f43351a..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/fromEvent.js +++ /dev/null @@ -1,78 +0,0 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.fromEvent = void 0; -var innerFrom_1 = require("../observable/innerFrom"); -var Observable_1 = require("../Observable"); -var mergeMap_1 = require("../operators/mergeMap"); -var isArrayLike_1 = require("../util/isArrayLike"); -var isFunction_1 = require("../util/isFunction"); -var mapOneOrManyArgs_1 = require("../util/mapOneOrManyArgs"); -var nodeEventEmitterMethods = ['addListener', 'removeListener']; -var eventTargetMethods = ['addEventListener', 'removeEventListener']; -var jqueryMethods = ['on', 'off']; -function fromEvent(target, eventName, options, resultSelector) { - if (isFunction_1.isFunction(options)) { - resultSelector = options; - options = undefined; - } - if (resultSelector) { - return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)); - } - var _a = __read(isEventTarget(target) - ? eventTargetMethods.map(function (methodName) { return function (handler) { return target[methodName](eventName, handler, options); }; }) - : - isNodeStyleEventEmitter(target) - ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) - : isJQueryStyleEventEmitter(target) - ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) - : [], 2), add = _a[0], remove = _a[1]; - if (!add) { - if (isArrayLike_1.isArrayLike(target)) { - return mergeMap_1.mergeMap(function (subTarget) { return fromEvent(subTarget, eventName, options); })(innerFrom_1.innerFrom(target)); - } - } - if (!add) { - throw new TypeError('Invalid event target'); - } - return new Observable_1.Observable(function (subscriber) { - var handler = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return subscriber.next(1 < args.length ? args : args[0]); - }; - add(handler); - return function () { return remove(handler); }; - }); -} -exports.fromEvent = fromEvent; -function toCommonHandlerRegistry(target, eventName) { - return function (methodName) { return function (handler) { return target[methodName](eventName, handler); }; }; -} -function isNodeStyleEventEmitter(target) { - return isFunction_1.isFunction(target.addListener) && isFunction_1.isFunction(target.removeListener); -} -function isJQueryStyleEventEmitter(target) { - return isFunction_1.isFunction(target.on) && isFunction_1.isFunction(target.off); -} -function isEventTarget(target) { - return isFunction_1.isFunction(target.addEventListener) && isFunction_1.isFunction(target.removeEventListener); -} -//# sourceMappingURL=fromEvent.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/fromEvent.js.map b/node_modules/rxjs/dist/cjs/internal/observable/fromEvent.js.map deleted file mode 100644 index c1fe605..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/fromEvent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fromEvent.js","sourceRoot":"","sources":["../../../../src/internal/observable/fromEvent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,qDAAoD;AACpD,4CAA2C;AAC3C,kDAAiD;AACjD,mDAAkD;AAClD,iDAAgD;AAChD,6DAA4D;AAG5D,IAAM,uBAAuB,GAAG,CAAC,aAAa,EAAE,gBAAgB,CAAU,CAAC;AAC3E,IAAM,kBAAkB,GAAG,CAAC,kBAAkB,EAAE,qBAAqB,CAAU,CAAC;AAChF,IAAM,aAAa,GAAG,CAAC,IAAI,EAAE,KAAK,CAAU,CAAC;AAqO7C,SAAgB,SAAS,CACvB,MAAW,EACX,SAAiB,EACjB,OAAwD,EACxD,cAAsC;IAEtC,IAAI,uBAAU,CAAC,OAAO,CAAC,EAAE;QACvB,cAAc,GAAG,OAAO,CAAC;QACzB,OAAO,GAAG,SAAS,CAAC;KACrB;IACD,IAAI,cAAc,EAAE;QAClB,OAAO,SAAS,CAAI,MAAM,EAAE,SAAS,EAAE,OAA+B,CAAC,CAAC,IAAI,CAAC,mCAAgB,CAAC,cAAc,CAAC,CAAC,CAAC;KAChH;IASK,IAAA,KAAA,OAEJ,aAAa,CAAC,MAAM,CAAC;QACnB,CAAC,CAAC,kBAAkB,CAAC,GAAG,CAAC,UAAC,UAAU,IAAK,OAAA,UAAC,OAAY,IAAK,OAAA,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,OAA+B,CAAC,EAAvE,CAAuE,EAAzF,CAAyF,CAAC;QACnI,CAAC;YACD,uBAAuB,CAAC,MAAM,CAAC;gBAC/B,CAAC,CAAC,uBAAuB,CAAC,GAAG,CAAC,uBAAuB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;gBACzE,CAAC,CAAC,yBAAyB,CAAC,MAAM,CAAC;oBACnC,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,uBAAuB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;oBAC/D,CAAC,CAAC,EAAE,IAAA,EATD,GAAG,QAAA,EAAE,MAAM,QASV,CAAC;IAOT,IAAI,CAAC,GAAG,EAAE;QACR,IAAI,yBAAW,CAAC,MAAM,CAAC,EAAE;YACvB,OAAO,mBAAQ,CAAC,UAAC,SAAc,IAAK,OAAA,SAAS,CAAC,SAAS,EAAE,SAAS,EAAE,OAA+B,CAAC,EAAhE,CAAgE,CAAC,CACnG,qBAAS,CAAC,MAAM,CAAC,CACD,CAAC;SACpB;KACF;IAID,IAAI,CAAC,GAAG,EAAE;QACR,MAAM,IAAI,SAAS,CAAC,sBAAsB,CAAC,CAAC;KAC7C;IAED,OAAO,IAAI,uBAAU,CAAI,UAAC,UAAU;QAIlC,IAAM,OAAO,GAAG;YAAC,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;YAAK,OAAA,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAAjD,CAAiD,CAAC;QAEtF,GAAG,CAAC,OAAO,CAAC,CAAC;QAEb,OAAO,cAAM,OAAA,MAAO,CAAC,OAAO,CAAC,EAAhB,CAAgB,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC;AA7DD,8BA6DC;AASD,SAAS,uBAAuB,CAAC,MAAW,EAAE,SAAiB;IAC7D,OAAO,UAAC,UAAkB,IAAK,OAAA,UAAC,OAAY,IAAK,OAAA,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,EAAtC,CAAsC,EAAxD,CAAwD,CAAC;AAC1F,CAAC;AAOD,SAAS,uBAAuB,CAAC,MAAW;IAC1C,OAAO,uBAAU,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,uBAAU,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;AAC7E,CAAC;AAOD,SAAS,yBAAyB,CAAC,MAAW;IAC5C,OAAO,uBAAU,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,uBAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AACzD,CAAC;AAOD,SAAS,aAAa,CAAC,MAAW;IAChC,OAAO,uBAAU,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,uBAAU,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;AACvF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/fromEventPattern.js b/node_modules/rxjs/dist/cjs/internal/observable/fromEventPattern.js deleted file mode 100644 index f319156..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/fromEventPattern.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.fromEventPattern = void 0; -var Observable_1 = require("../Observable"); -var isFunction_1 = require("../util/isFunction"); -var mapOneOrManyArgs_1 = require("../util/mapOneOrManyArgs"); -function fromEventPattern(addHandler, removeHandler, resultSelector) { - if (resultSelector) { - return fromEventPattern(addHandler, removeHandler).pipe(mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)); - } - return new Observable_1.Observable(function (subscriber) { - var handler = function () { - var e = []; - for (var _i = 0; _i < arguments.length; _i++) { - e[_i] = arguments[_i]; - } - return subscriber.next(e.length === 1 ? e[0] : e); - }; - var retValue = addHandler(handler); - return isFunction_1.isFunction(removeHandler) ? function () { return removeHandler(handler, retValue); } : undefined; - }); -} -exports.fromEventPattern = fromEventPattern; -//# sourceMappingURL=fromEventPattern.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/fromEventPattern.js.map b/node_modules/rxjs/dist/cjs/internal/observable/fromEventPattern.js.map deleted file mode 100644 index b6a3103..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/fromEventPattern.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fromEventPattern.js","sourceRoot":"","sources":["../../../../src/internal/observable/fromEventPattern.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAC3C,iDAAgD;AAEhD,6DAA4D;AAsI5D,SAAgB,gBAAgB,CAC9B,UAA8C,EAC9C,aAAiE,EACjE,cAAsC;IAEtC,IAAI,cAAc,EAAE;QAClB,OAAO,gBAAgB,CAAI,UAAU,EAAE,aAAa,CAAC,CAAC,IAAI,CAAC,mCAAgB,CAAC,cAAc,CAAC,CAAC,CAAC;KAC9F;IAED,OAAO,IAAI,uBAAU,CAAU,UAAC,UAAU;QACxC,IAAM,OAAO,GAAG;YAAC,WAAS;iBAAT,UAAS,EAAT,qBAAS,EAAT,IAAS;gBAAT,sBAAS;;YAAK,OAAA,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAA1C,CAA0C,CAAC;QAC1E,IAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;QACrC,OAAO,uBAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,cAAM,OAAA,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAhC,CAAgC,CAAC,CAAC,CAAC,SAAS,CAAC;IACxF,CAAC,CAAC,CAAC;AACL,CAAC;AAdD,4CAcC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/fromSubscribable.js b/node_modules/rxjs/dist/cjs/internal/observable/fromSubscribable.js deleted file mode 100644 index ee2fdb6..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/fromSubscribable.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.fromSubscribable = void 0; -var Observable_1 = require("../Observable"); -function fromSubscribable(subscribable) { - return new Observable_1.Observable(function (subscriber) { return subscribable.subscribe(subscriber); }); -} -exports.fromSubscribable = fromSubscribable; -//# sourceMappingURL=fromSubscribable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/fromSubscribable.js.map b/node_modules/rxjs/dist/cjs/internal/observable/fromSubscribable.js.map deleted file mode 100644 index d217d0b..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/fromSubscribable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fromSubscribable.js","sourceRoot":"","sources":["../../../../src/internal/observable/fromSubscribable.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAc3C,SAAgB,gBAAgB,CAAI,YAA6B;IAC/D,OAAO,IAAI,uBAAU,CAAC,UAAC,UAAyB,IAAK,OAAA,YAAY,CAAC,SAAS,CAAC,UAAU,CAAC,EAAlC,CAAkC,CAAC,CAAC;AAC3F,CAAC;AAFD,4CAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/generate.js b/node_modules/rxjs/dist/cjs/internal/observable/generate.js deleted file mode 100644 index 250bb37..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/generate.js +++ /dev/null @@ -1,79 +0,0 @@ -"use strict"; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.generate = void 0; -var identity_1 = require("../util/identity"); -var isScheduler_1 = require("../util/isScheduler"); -var defer_1 = require("./defer"); -var scheduleIterable_1 = require("../scheduled/scheduleIterable"); -function generate(initialStateOrOptions, condition, iterate, resultSelectorOrScheduler, scheduler) { - var _a, _b; - var resultSelector; - var initialState; - if (arguments.length === 1) { - (_a = initialStateOrOptions, initialState = _a.initialState, condition = _a.condition, iterate = _a.iterate, _b = _a.resultSelector, resultSelector = _b === void 0 ? identity_1.identity : _b, scheduler = _a.scheduler); - } - else { - initialState = initialStateOrOptions; - if (!resultSelectorOrScheduler || isScheduler_1.isScheduler(resultSelectorOrScheduler)) { - resultSelector = identity_1.identity; - scheduler = resultSelectorOrScheduler; - } - else { - resultSelector = resultSelectorOrScheduler; - } - } - function gen() { - var state; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - state = initialState; - _a.label = 1; - case 1: - if (!(!condition || condition(state))) return [3, 4]; - return [4, resultSelector(state)]; - case 2: - _a.sent(); - _a.label = 3; - case 3: - state = iterate(state); - return [3, 1]; - case 4: return [2]; - } - }); - } - return defer_1.defer((scheduler - ? - function () { return scheduleIterable_1.scheduleIterable(gen(), scheduler); } - : - gen)); -} -exports.generate = generate; -//# sourceMappingURL=generate.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/generate.js.map b/node_modules/rxjs/dist/cjs/internal/observable/generate.js.map deleted file mode 100644 index 98b2200..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/generate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../../src/internal/observable/generate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAA4C;AAE5C,mDAAkD;AAClD,iCAAgC;AAChC,kEAAiE;AA0UjE,SAAgB,QAAQ,CACtB,qBAAgD,EAChD,SAA4B,EAC5B,OAAwB,EACxB,yBAA4D,EAC5D,SAAyB;;IAEzB,IAAI,cAAgC,CAAC;IACrC,IAAI,YAAe,CAAC;IAIpB,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;QAG1B,CAAC,KAMG,qBAA8C,EALhD,YAAY,kBAAA,EACZ,SAAS,eAAA,EACT,OAAO,aAAA,EACP,sBAA6C,EAA7C,cAAc,mBAAG,mBAA4B,KAAA,EAC7C,SAAS,eAAA,CACwC,CAAC;KACrD;SAAM;QAGL,YAAY,GAAG,qBAA0B,CAAC;QAC1C,IAAI,CAAC,yBAAyB,IAAI,yBAAW,CAAC,yBAAyB,CAAC,EAAE;YACxE,cAAc,GAAG,mBAA4B,CAAC;YAC9C,SAAS,GAAG,yBAA0C,CAAC;SACxD;aAAM;YACL,cAAc,GAAG,yBAA6C,CAAC;SAChE;KACF;IAGD,SAAU,GAAG;;;;;oBACF,KAAK,GAAG,YAAY;;;yBAAE,CAAA,CAAC,SAAS,IAAI,SAAS,CAAC,KAAK,CAAC,CAAA;oBAC3D,WAAM,cAAc,CAAC,KAAK,CAAC,EAAA;;oBAA3B,SAA2B,CAAC;;;oBADiC,KAAK,GAAG,OAAQ,CAAC,KAAK,CAAC,CAAA;;;;;KAGvF;IAGD,OAAO,aAAK,CACV,CAAC,SAAS;QACR,CAAC;YAEC,cAAM,OAAA,mCAAgB,CAAC,GAAG,EAAE,EAAE,SAAU,CAAC,EAAnC,CAAmC;QAC3C,CAAC;YAEC,GAAG,CAA6B,CACrC,CAAC;AACJ,CAAC;AAnDD,4BAmDC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/iif.js b/node_modules/rxjs/dist/cjs/internal/observable/iif.js deleted file mode 100644 index 63a69c1..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/iif.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.iif = void 0; -var defer_1 = require("./defer"); -function iif(condition, trueResult, falseResult) { - return defer_1.defer(function () { return (condition() ? trueResult : falseResult); }); -} -exports.iif = iif; -//# sourceMappingURL=iif.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/iif.js.map b/node_modules/rxjs/dist/cjs/internal/observable/iif.js.map deleted file mode 100644 index f31f89b..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/iif.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"iif.js","sourceRoot":"","sources":["../../../../src/internal/observable/iif.ts"],"names":[],"mappings":";;;AACA,iCAAgC;AAiFhC,SAAgB,GAAG,CAAO,SAAwB,EAAE,UAA8B,EAAE,WAA+B;IACjH,OAAO,aAAK,CAAC,cAAM,OAAA,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,EAAxC,CAAwC,CAAC,CAAC;AAC/D,CAAC;AAFD,kBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/innerFrom.js b/node_modules/rxjs/dist/cjs/internal/observable/innerFrom.js deleted file mode 100644 index f25d71b..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/innerFrom.js +++ /dev/null @@ -1,206 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __asyncValues = (this && this.__asyncValues) || function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } -}; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.fromReadableStreamLike = exports.fromAsyncIterable = exports.fromIterable = exports.fromPromise = exports.fromArrayLike = exports.fromInteropObservable = exports.innerFrom = void 0; -var isArrayLike_1 = require("../util/isArrayLike"); -var isPromise_1 = require("../util/isPromise"); -var Observable_1 = require("../Observable"); -var isInteropObservable_1 = require("../util/isInteropObservable"); -var isAsyncIterable_1 = require("../util/isAsyncIterable"); -var throwUnobservableError_1 = require("../util/throwUnobservableError"); -var isIterable_1 = require("../util/isIterable"); -var isReadableStreamLike_1 = require("../util/isReadableStreamLike"); -var isFunction_1 = require("../util/isFunction"); -var reportUnhandledError_1 = require("../util/reportUnhandledError"); -var observable_1 = require("../symbol/observable"); -function innerFrom(input) { - if (input instanceof Observable_1.Observable) { - return input; - } - if (input != null) { - if (isInteropObservable_1.isInteropObservable(input)) { - return fromInteropObservable(input); - } - if (isArrayLike_1.isArrayLike(input)) { - return fromArrayLike(input); - } - if (isPromise_1.isPromise(input)) { - return fromPromise(input); - } - if (isAsyncIterable_1.isAsyncIterable(input)) { - return fromAsyncIterable(input); - } - if (isIterable_1.isIterable(input)) { - return fromIterable(input); - } - if (isReadableStreamLike_1.isReadableStreamLike(input)) { - return fromReadableStreamLike(input); - } - } - throw throwUnobservableError_1.createInvalidObservableTypeError(input); -} -exports.innerFrom = innerFrom; -function fromInteropObservable(obj) { - return new Observable_1.Observable(function (subscriber) { - var obs = obj[observable_1.observable](); - if (isFunction_1.isFunction(obs.subscribe)) { - return obs.subscribe(subscriber); - } - throw new TypeError('Provided object does not correctly implement Symbol.observable'); - }); -} -exports.fromInteropObservable = fromInteropObservable; -function fromArrayLike(array) { - return new Observable_1.Observable(function (subscriber) { - for (var i = 0; i < array.length && !subscriber.closed; i++) { - subscriber.next(array[i]); - } - subscriber.complete(); - }); -} -exports.fromArrayLike = fromArrayLike; -function fromPromise(promise) { - return new Observable_1.Observable(function (subscriber) { - promise - .then(function (value) { - if (!subscriber.closed) { - subscriber.next(value); - subscriber.complete(); - } - }, function (err) { return subscriber.error(err); }) - .then(null, reportUnhandledError_1.reportUnhandledError); - }); -} -exports.fromPromise = fromPromise; -function fromIterable(iterable) { - return new Observable_1.Observable(function (subscriber) { - var e_1, _a; - try { - for (var iterable_1 = __values(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) { - var value = iterable_1_1.value; - subscriber.next(value); - if (subscriber.closed) { - return; - } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return)) _a.call(iterable_1); - } - finally { if (e_1) throw e_1.error; } - } - subscriber.complete(); - }); -} -exports.fromIterable = fromIterable; -function fromAsyncIterable(asyncIterable) { - return new Observable_1.Observable(function (subscriber) { - process(asyncIterable, subscriber).catch(function (err) { return subscriber.error(err); }); - }); -} -exports.fromAsyncIterable = fromAsyncIterable; -function fromReadableStreamLike(readableStream) { - return fromAsyncIterable(isReadableStreamLike_1.readableStreamLikeToAsyncGenerator(readableStream)); -} -exports.fromReadableStreamLike = fromReadableStreamLike; -function process(asyncIterable, subscriber) { - var asyncIterable_1, asyncIterable_1_1; - var e_2, _a; - return __awaiter(this, void 0, void 0, function () { - var value, e_2_1; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - _b.trys.push([0, 5, 6, 11]); - asyncIterable_1 = __asyncValues(asyncIterable); - _b.label = 1; - case 1: return [4, asyncIterable_1.next()]; - case 2: - if (!(asyncIterable_1_1 = _b.sent(), !asyncIterable_1_1.done)) return [3, 4]; - value = asyncIterable_1_1.value; - subscriber.next(value); - if (subscriber.closed) { - return [2]; - } - _b.label = 3; - case 3: return [3, 1]; - case 4: return [3, 11]; - case 5: - e_2_1 = _b.sent(); - e_2 = { error: e_2_1 }; - return [3, 11]; - case 6: - _b.trys.push([6, , 9, 10]); - if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return))) return [3, 8]; - return [4, _a.call(asyncIterable_1)]; - case 7: - _b.sent(); - _b.label = 8; - case 8: return [3, 10]; - case 9: - if (e_2) throw e_2.error; - return [7]; - case 10: return [7]; - case 11: - subscriber.complete(); - return [2]; - } - }); - }); -} -//# sourceMappingURL=innerFrom.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/innerFrom.js.map b/node_modules/rxjs/dist/cjs/internal/observable/innerFrom.js.map deleted file mode 100644 index 95c4db3..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/innerFrom.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"innerFrom.js","sourceRoot":"","sources":["../../../../src/internal/observable/innerFrom.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAkD;AAClD,+CAA8C;AAC9C,4CAA2C;AAE3C,mEAAkE;AAClE,2DAA0D;AAC1D,yEAAkF;AAClF,iDAAgD;AAChD,qEAAwG;AAExG,iDAAgD;AAChD,qEAAoE;AACpE,mDAAuE;AAGvE,SAAgB,SAAS,CAAI,KAAyB;IACpD,IAAI,KAAK,YAAY,uBAAU,EAAE;QAC/B,OAAO,KAAK,CAAC;KACd;IACD,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,IAAI,yCAAmB,CAAC,KAAK,CAAC,EAAE;YAC9B,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;SACrC;QACD,IAAI,yBAAW,CAAC,KAAK,CAAC,EAAE;YACtB,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC;SAC7B;QACD,IAAI,qBAAS,CAAC,KAAK,CAAC,EAAE;YACpB,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;SAC3B;QACD,IAAI,iCAAe,CAAC,KAAK,CAAC,EAAE;YAC1B,OAAO,iBAAiB,CAAC,KAAK,CAAC,CAAC;SACjC;QACD,IAAI,uBAAU,CAAC,KAAK,CAAC,EAAE;YACrB,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;SAC5B;QACD,IAAI,2CAAoB,CAAC,KAAK,CAAC,EAAE;YAC/B,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC;SACtC;KACF;IAED,MAAM,yDAAgC,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC;AA1BD,8BA0BC;AAMD,SAAgB,qBAAqB,CAAI,GAAQ;IAC/C,OAAO,IAAI,uBAAU,CAAC,UAAC,UAAyB;QAC9C,IAAM,GAAG,GAAG,GAAG,CAAC,uBAAiB,CAAC,EAAE,CAAC;QACrC,IAAI,uBAAU,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;YAC7B,OAAO,GAAG,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;SAClC;QAED,MAAM,IAAI,SAAS,CAAC,gEAAgE,CAAC,CAAC;IACxF,CAAC,CAAC,CAAC;AACL,CAAC;AATD,sDASC;AASD,SAAgB,aAAa,CAAI,KAAmB;IAClD,OAAO,IAAI,uBAAU,CAAC,UAAC,UAAyB;QAU9C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC3D,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;SAC3B;QACD,UAAU,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC;AAhBD,sCAgBC;AAED,SAAgB,WAAW,CAAI,OAAuB;IACpD,OAAO,IAAI,uBAAU,CAAC,UAAC,UAAyB;QAC9C,OAAO;aACJ,IAAI,CACH,UAAC,KAAK;YACJ,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;gBACtB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,EACD,UAAC,GAAQ,IAAK,OAAA,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAArB,CAAqB,CACpC;aACA,IAAI,CAAC,IAAI,EAAE,2CAAoB,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC;AAdD,kCAcC;AAED,SAAgB,YAAY,CAAI,QAAqB;IACnD,OAAO,IAAI,uBAAU,CAAC,UAAC,UAAyB;;;YAC9C,KAAoB,IAAA,aAAA,SAAA,QAAQ,CAAA,kCAAA,wDAAE;gBAAzB,IAAM,KAAK,qBAAA;gBACd,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,IAAI,UAAU,CAAC,MAAM,EAAE;oBACrB,OAAO;iBACR;aACF;;;;;;;;;QACD,UAAU,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC;AAVD,oCAUC;AAED,SAAgB,iBAAiB,CAAI,aAA+B;IAClE,OAAO,IAAI,uBAAU,CAAC,UAAC,UAAyB;QAC9C,OAAO,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC,KAAK,CAAC,UAAC,GAAG,IAAK,OAAA,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAArB,CAAqB,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,8CAIC;AAED,SAAgB,sBAAsB,CAAI,cAAqC;IAC7E,OAAO,iBAAiB,CAAC,yDAAkC,CAAC,cAAc,CAAC,CAAC,CAAC;AAC/E,CAAC;AAFD,wDAEC;AAED,SAAe,OAAO,CAAI,aAA+B,EAAE,UAAyB;;;;;;;;;oBACxD,kBAAA,cAAA,aAAa,CAAA;;;;;oBAAtB,KAAK,0BAAA,CAAA;oBACpB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAGvB,IAAI,UAAU,CAAC,MAAM,EAAE;wBACrB,WAAO;qBACR;;;;;;;;;;;;;;;;;;;;;oBAEH,UAAU,CAAC,QAAQ,EAAE,CAAC;;;;;CACvB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/interval.js b/node_modules/rxjs/dist/cjs/internal/observable/interval.js deleted file mode 100644 index e0cbf28..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/interval.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.interval = void 0; -var async_1 = require("../scheduler/async"); -var timer_1 = require("./timer"); -function interval(period, scheduler) { - if (period === void 0) { period = 0; } - if (scheduler === void 0) { scheduler = async_1.asyncScheduler; } - if (period < 0) { - period = 0; - } - return timer_1.timer(period, period, scheduler); -} -exports.interval = interval; -//# sourceMappingURL=interval.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/interval.js.map b/node_modules/rxjs/dist/cjs/internal/observable/interval.js.map deleted file mode 100644 index 056a721..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/interval.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"interval.js","sourceRoot":"","sources":["../../../../src/internal/observable/interval.ts"],"names":[],"mappings":";;;AACA,4CAAoD;AAEpD,iCAAgC;AA8ChC,SAAgB,QAAQ,CAAC,MAAU,EAAE,SAAyC;IAArD,uBAAA,EAAA,UAAU;IAAE,0BAAA,EAAA,YAA2B,sBAAc;IAC5E,IAAI,MAAM,GAAG,CAAC,EAAE;QAEd,MAAM,GAAG,CAAC,CAAC;KACZ;IAED,OAAO,aAAK,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;AAC1C,CAAC;AAPD,4BAOC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/merge.js b/node_modules/rxjs/dist/cjs/internal/observable/merge.js deleted file mode 100644 index 079fe0f..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/merge.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.merge = void 0; -var mergeAll_1 = require("../operators/mergeAll"); -var innerFrom_1 = require("./innerFrom"); -var empty_1 = require("./empty"); -var args_1 = require("../util/args"); -var from_1 = require("./from"); -function merge() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = args_1.popScheduler(args); - var concurrent = args_1.popNumber(args, Infinity); - var sources = args; - return !sources.length - ? - empty_1.EMPTY - : sources.length === 1 - ? - innerFrom_1.innerFrom(sources[0]) - : - mergeAll_1.mergeAll(concurrent)(from_1.from(sources, scheduler)); -} -exports.merge = merge; -//# sourceMappingURL=merge.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/merge.js.map b/node_modules/rxjs/dist/cjs/internal/observable/merge.js.map deleted file mode 100644 index 490163f..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/merge.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../../../src/internal/observable/merge.ts"],"names":[],"mappings":";;;AAEA,kDAAiD;AACjD,yCAAwC;AACxC,iCAAgC;AAChC,qCAAuD;AACvD,+BAA8B;AAiF9B,SAAgB,KAAK;IAAC,cAA8D;SAA9D,UAA8D,EAA9D,qBAA8D,EAA9D,IAA8D;QAA9D,yBAA8D;;IAClF,IAAM,SAAS,GAAG,mBAAY,CAAC,IAAI,CAAC,CAAC;IACrC,IAAM,UAAU,GAAG,gBAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC7C,IAAM,OAAO,GAAG,IAAkC,CAAC;IACnD,OAAO,CAAC,OAAO,CAAC,MAAM;QACpB,CAAC;YACC,aAAK;QACP,CAAC,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC;YACtB,CAAC;gBACC,qBAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YACvB,CAAC;gBACC,mBAAQ,CAAC,UAAU,CAAC,CAAC,WAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;AACrD,CAAC;AAZD,sBAYC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/never.js b/node_modules/rxjs/dist/cjs/internal/observable/never.js deleted file mode 100644 index 2cd23cc..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/never.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.never = exports.NEVER = void 0; -var Observable_1 = require("../Observable"); -var noop_1 = require("../util/noop"); -exports.NEVER = new Observable_1.Observable(noop_1.noop); -function never() { - return exports.NEVER; -} -exports.never = never; -//# sourceMappingURL=never.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/never.js.map b/node_modules/rxjs/dist/cjs/internal/observable/never.js.map deleted file mode 100644 index 3e2f405..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/never.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"never.js","sourceRoot":"","sources":["../../../../src/internal/observable/never.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAC3C,qCAAoC;AAmCvB,QAAA,KAAK,GAAG,IAAI,uBAAU,CAAQ,WAAI,CAAC,CAAC;AAKjD,SAAgB,KAAK;IACnB,OAAO,aAAK,CAAC;AACf,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/of.js b/node_modules/rxjs/dist/cjs/internal/observable/of.js deleted file mode 100644 index 8d21e88..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/of.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.of = void 0; -var args_1 = require("../util/args"); -var from_1 = require("./from"); -function of() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = args_1.popScheduler(args); - return from_1.from(args, scheduler); -} -exports.of = of; -//# sourceMappingURL=of.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/of.js.map b/node_modules/rxjs/dist/cjs/internal/observable/of.js.map deleted file mode 100644 index de3c52c..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/of.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"of.js","sourceRoot":"","sources":["../../../../src/internal/observable/of.ts"],"names":[],"mappings":";;;AAEA,qCAA4C;AAC5C,+BAA8B;AA4E9B,SAAgB,EAAE;IAAI,cAAiC;SAAjC,UAAiC,EAAjC,qBAAiC,EAAjC,IAAiC;QAAjC,yBAAiC;;IACrD,IAAM,SAAS,GAAG,mBAAY,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO,WAAI,CAAC,IAAW,EAAE,SAAS,CAAC,CAAC;AACtC,CAAC;AAHD,gBAGC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/onErrorResumeNext.js b/node_modules/rxjs/dist/cjs/internal/observable/onErrorResumeNext.js deleted file mode 100644 index 8b31e6c..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/onErrorResumeNext.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.onErrorResumeNext = void 0; -var Observable_1 = require("../Observable"); -var argsOrArgArray_1 = require("../util/argsOrArgArray"); -var OperatorSubscriber_1 = require("../operators/OperatorSubscriber"); -var noop_1 = require("../util/noop"); -var innerFrom_1 = require("./innerFrom"); -function onErrorResumeNext() { - var sources = []; - for (var _i = 0; _i < arguments.length; _i++) { - sources[_i] = arguments[_i]; - } - var nextSources = argsOrArgArray_1.argsOrArgArray(sources); - return new Observable_1.Observable(function (subscriber) { - var sourceIndex = 0; - var subscribeNext = function () { - if (sourceIndex < nextSources.length) { - var nextSource = void 0; - try { - nextSource = innerFrom_1.innerFrom(nextSources[sourceIndex++]); - } - catch (err) { - subscribeNext(); - return; - } - var innerSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, undefined, noop_1.noop, noop_1.noop); - nextSource.subscribe(innerSubscriber); - innerSubscriber.add(subscribeNext); - } - else { - subscriber.complete(); - } - }; - subscribeNext(); - }); -} -exports.onErrorResumeNext = onErrorResumeNext; -//# sourceMappingURL=onErrorResumeNext.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/onErrorResumeNext.js.map b/node_modules/rxjs/dist/cjs/internal/observable/onErrorResumeNext.js.map deleted file mode 100644 index 6b62528..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/onErrorResumeNext.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"onErrorResumeNext.js","sourceRoot":"","sources":["../../../../src/internal/observable/onErrorResumeNext.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAE3C,yDAAwD;AACxD,sEAAqE;AACrE,qCAAoC;AACpC,yCAAwC;AAmExC,SAAgB,iBAAiB;IAC/B,iBAAyE;SAAzE,UAAyE,EAAzE,qBAAyE,EAAzE,IAAyE;QAAzE,4BAAyE;;IAEzE,IAAM,WAAW,GAA4B,+BAAc,CAAC,OAAO,CAAQ,CAAC;IAE5E,OAAO,IAAI,uBAAU,CAAC,UAAC,UAAU;QAC/B,IAAI,WAAW,GAAG,CAAC,CAAC;QACpB,IAAM,aAAa,GAAG;YACpB,IAAI,WAAW,GAAG,WAAW,CAAC,MAAM,EAAE;gBACpC,IAAI,UAAU,SAAuB,CAAC;gBACtC,IAAI;oBACF,UAAU,GAAG,qBAAS,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;iBACpD;gBAAC,OAAO,GAAG,EAAE;oBACZ,aAAa,EAAE,CAAC;oBAChB,OAAO;iBACR;gBACD,IAAM,eAAe,GAAG,IAAI,uCAAkB,CAAC,UAAU,EAAE,SAAS,EAAE,WAAI,EAAE,WAAI,CAAC,CAAC;gBAClF,UAAU,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;gBACtC,eAAe,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;aACpC;iBAAM;gBACL,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,CAAC;QACF,aAAa,EAAE,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC;AAzBD,8CAyBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/pairs.js b/node_modules/rxjs/dist/cjs/internal/observable/pairs.js deleted file mode 100644 index 480efe3..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/pairs.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.pairs = void 0; -var from_1 = require("./from"); -function pairs(obj, scheduler) { - return from_1.from(Object.entries(obj), scheduler); -} -exports.pairs = pairs; -//# sourceMappingURL=pairs.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/pairs.js.map b/node_modules/rxjs/dist/cjs/internal/observable/pairs.js.map deleted file mode 100644 index b0f4c9f..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/pairs.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pairs.js","sourceRoot":"","sources":["../../../../src/internal/observable/pairs.ts"],"names":[],"mappings":";;;AAEA,+BAA8B;AA2E9B,SAAgB,KAAK,CAAC,GAAQ,EAAE,SAAyB;IACvD,OAAO,WAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,SAAgB,CAAC,CAAC;AACrD,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/partition.js b/node_modules/rxjs/dist/cjs/internal/observable/partition.js deleted file mode 100644 index 8dccf53..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/partition.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.partition = void 0; -var not_1 = require("../util/not"); -var filter_1 = require("../operators/filter"); -var innerFrom_1 = require("./innerFrom"); -function partition(source, predicate, thisArg) { - return [filter_1.filter(predicate, thisArg)(innerFrom_1.innerFrom(source)), filter_1.filter(not_1.not(predicate, thisArg))(innerFrom_1.innerFrom(source))]; -} -exports.partition = partition; -//# sourceMappingURL=partition.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/partition.js.map b/node_modules/rxjs/dist/cjs/internal/observable/partition.js.map deleted file mode 100644 index 697448d..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/partition.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"partition.js","sourceRoot":"","sources":["../../../../src/internal/observable/partition.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAClC,8CAA6C;AAG7C,yCAAwC;AA0ExC,SAAgB,SAAS,CACvB,MAA0B,EAC1B,SAA0D,EAC1D,OAAa;IAEb,OAAO,CAAC,eAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,qBAAS,CAAC,MAAM,CAAC,CAAC,EAAE,eAAM,CAAC,SAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,qBAAS,CAAC,MAAM,CAAC,CAAC,CAGxG,CAAC;AACJ,CAAC;AATD,8BASC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/race.js b/node_modules/rxjs/dist/cjs/internal/observable/race.js deleted file mode 100644 index 843f577..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/race.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.raceInit = exports.race = void 0; -var Observable_1 = require("../Observable"); -var innerFrom_1 = require("./innerFrom"); -var argsOrArgArray_1 = require("../util/argsOrArgArray"); -var OperatorSubscriber_1 = require("../operators/OperatorSubscriber"); -function race() { - var sources = []; - for (var _i = 0; _i < arguments.length; _i++) { - sources[_i] = arguments[_i]; - } - sources = argsOrArgArray_1.argsOrArgArray(sources); - return sources.length === 1 ? innerFrom_1.innerFrom(sources[0]) : new Observable_1.Observable(raceInit(sources)); -} -exports.race = race; -function raceInit(sources) { - return function (subscriber) { - var subscriptions = []; - var _loop_1 = function (i) { - subscriptions.push(innerFrom_1.innerFrom(sources[i]).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - if (subscriptions) { - for (var s = 0; s < subscriptions.length; s++) { - s !== i && subscriptions[s].unsubscribe(); - } - subscriptions = null; - } - subscriber.next(value); - }))); - }; - for (var i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) { - _loop_1(i); - } - }; -} -exports.raceInit = raceInit; -//# sourceMappingURL=race.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/race.js.map b/node_modules/rxjs/dist/cjs/internal/observable/race.js.map deleted file mode 100644 index abbb3bb..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/race.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"race.js","sourceRoot":"","sources":["../../../../src/internal/observable/race.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAC3C,yCAAwC;AAGxC,yDAAwD;AACxD,sEAA2E;AA6C3E,SAAgB,IAAI;IAAI,iBAAyD;SAAzD,UAAyD,EAAzD,qBAAyD,EAAzD,IAAyD;QAAzD,4BAAyD;;IAC/E,OAAO,GAAG,+BAAc,CAAC,OAAO,CAAC,CAAC;IAElC,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,qBAAS,CAAC,OAAO,CAAC,CAAC,CAAuB,CAAC,CAAC,CAAC,CAAC,IAAI,uBAAU,CAAI,QAAQ,CAAC,OAA+B,CAAC,CAAC,CAAC;AAC3I,CAAC;AAJD,oBAIC;AAOD,SAAgB,QAAQ,CAAI,OAA6B;IACvD,OAAO,UAAC,UAAyB;QAC/B,IAAI,aAAa,GAAmB,EAAE,CAAC;gCAM9B,CAAC;YACR,aAAa,CAAC,IAAI,CAChB,qBAAS,CAAC,OAAO,CAAC,CAAC,CAAuB,CAAC,CAAC,SAAS,CACnD,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;gBACzC,IAAI,aAAa,EAAE;oBAGjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;wBAC7C,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;qBAC3C;oBACD,aAAa,GAAG,IAAK,CAAC;iBACvB;gBACD,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACzB,CAAC,CAAC,CACH,CACF,CAAC;;QAfJ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,aAAa,IAAI,CAAC,UAAU,CAAC,MAAM,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE;oBAArE,CAAC;SAgBT;IACH,CAAC,CAAC;AACJ,CAAC;AA1BD,4BA0BC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/range.js b/node_modules/rxjs/dist/cjs/internal/observable/range.js deleted file mode 100644 index be91661..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/range.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.range = void 0; -var Observable_1 = require("../Observable"); -var empty_1 = require("./empty"); -function range(start, count, scheduler) { - if (count == null) { - count = start; - start = 0; - } - if (count <= 0) { - return empty_1.EMPTY; - } - var end = count + start; - return new Observable_1.Observable(scheduler - ? - function (subscriber) { - var n = start; - return scheduler.schedule(function () { - if (n < end) { - subscriber.next(n++); - this.schedule(); - } - else { - subscriber.complete(); - } - }); - } - : - function (subscriber) { - var n = start; - while (n < end && !subscriber.closed) { - subscriber.next(n++); - } - subscriber.complete(); - }); -} -exports.range = range; -//# sourceMappingURL=range.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/range.js.map b/node_modules/rxjs/dist/cjs/internal/observable/range.js.map deleted file mode 100644 index f65cc99..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/range.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"range.js","sourceRoot":"","sources":["../../../../src/internal/observable/range.ts"],"names":[],"mappings":";;;AACA,4CAA2C;AAC3C,iCAAgC;AAoDhC,SAAgB,KAAK,CAAC,KAAa,EAAE,KAAc,EAAE,SAAyB;IAC5E,IAAI,KAAK,IAAI,IAAI,EAAE;QAEjB,KAAK,GAAG,KAAK,CAAC;QACd,KAAK,GAAG,CAAC,CAAC;KACX;IAED,IAAI,KAAK,IAAI,CAAC,EAAE;QAEd,OAAO,aAAK,CAAC;KACd;IAGD,IAAM,GAAG,GAAG,KAAK,GAAG,KAAK,CAAC;IAE1B,OAAO,IAAI,uBAAU,CACnB,SAAS;QACP,CAAC;YACC,UAAC,UAAU;gBACT,IAAI,CAAC,GAAG,KAAK,CAAC;gBACd,OAAO,SAAS,CAAC,QAAQ,CAAC;oBACxB,IAAI,CAAC,GAAG,GAAG,EAAE;wBACX,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;wBACrB,IAAI,CAAC,QAAQ,EAAE,CAAC;qBACjB;yBAAM;wBACL,UAAU,CAAC,QAAQ,EAAE,CAAC;qBACvB;gBACH,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;YACC,UAAC,UAAU;gBACT,IAAI,CAAC,GAAG,KAAK,CAAC;gBACd,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;oBACpC,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;iBACtB;gBACD,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC,CACN,CAAC;AACJ,CAAC;AAtCD,sBAsCC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/throwError.js b/node_modules/rxjs/dist/cjs/internal/observable/throwError.js deleted file mode 100644 index 2ecdc50..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/throwError.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.throwError = void 0; -var Observable_1 = require("../Observable"); -var isFunction_1 = require("../util/isFunction"); -function throwError(errorOrErrorFactory, scheduler) { - var errorFactory = isFunction_1.isFunction(errorOrErrorFactory) ? errorOrErrorFactory : function () { return errorOrErrorFactory; }; - var init = function (subscriber) { return subscriber.error(errorFactory()); }; - return new Observable_1.Observable(scheduler ? function (subscriber) { return scheduler.schedule(init, 0, subscriber); } : init); -} -exports.throwError = throwError; -//# sourceMappingURL=throwError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/throwError.js.map b/node_modules/rxjs/dist/cjs/internal/observable/throwError.js.map deleted file mode 100644 index b8dfe65..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/throwError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"throwError.js","sourceRoot":"","sources":["../../../../src/internal/observable/throwError.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAG3C,iDAAgD;AAqHhD,SAAgB,UAAU,CAAC,mBAAwB,EAAE,SAAyB;IAC5E,IAAM,YAAY,GAAG,uBAAU,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,cAAM,OAAA,mBAAmB,EAAnB,CAAmB,CAAC;IACvG,IAAM,IAAI,GAAG,UAAC,UAA6B,IAAK,OAAA,UAAU,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,EAAhC,CAAgC,CAAC;IACjF,OAAO,IAAI,uBAAU,CAAC,SAAS,CAAC,CAAC,CAAC,UAAC,UAAU,IAAK,OAAA,SAAS,CAAC,QAAQ,CAAC,IAAW,EAAE,CAAC,EAAE,UAAU,CAAC,EAA9C,CAA8C,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAC3G,CAAC;AAJD,gCAIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/timer.js b/node_modules/rxjs/dist/cjs/internal/observable/timer.js deleted file mode 100644 index e9b40b3..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/timer.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.timer = void 0; -var Observable_1 = require("../Observable"); -var async_1 = require("../scheduler/async"); -var isScheduler_1 = require("../util/isScheduler"); -var isDate_1 = require("../util/isDate"); -function timer(dueTime, intervalOrScheduler, scheduler) { - if (dueTime === void 0) { dueTime = 0; } - if (scheduler === void 0) { scheduler = async_1.async; } - var intervalDuration = -1; - if (intervalOrScheduler != null) { - if (isScheduler_1.isScheduler(intervalOrScheduler)) { - scheduler = intervalOrScheduler; - } - else { - intervalDuration = intervalOrScheduler; - } - } - return new Observable_1.Observable(function (subscriber) { - var due = isDate_1.isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime; - if (due < 0) { - due = 0; - } - var n = 0; - return scheduler.schedule(function () { - if (!subscriber.closed) { - subscriber.next(n++); - if (0 <= intervalDuration) { - this.schedule(undefined, intervalDuration); - } - else { - subscriber.complete(); - } - } - }, due); - }); -} -exports.timer = timer; -//# sourceMappingURL=timer.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/timer.js.map b/node_modules/rxjs/dist/cjs/internal/observable/timer.js.map deleted file mode 100644 index c800b1d..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/timer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timer.js","sourceRoot":"","sources":["../../../../src/internal/observable/timer.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAE3C,4CAA6D;AAC7D,mDAAkD;AAClD,yCAA6C;AAgI7C,SAAgB,KAAK,CACnB,OAA0B,EAC1B,mBAA4C,EAC5C,SAAyC;IAFzC,wBAAA,EAAA,WAA0B;IAE1B,0BAAA,EAAA,YAA2B,aAAc;IAIzC,IAAI,gBAAgB,GAAG,CAAC,CAAC,CAAC;IAE1B,IAAI,mBAAmB,IAAI,IAAI,EAAE;QAI/B,IAAI,yBAAW,CAAC,mBAAmB,CAAC,EAAE;YACpC,SAAS,GAAG,mBAAmB,CAAC;SACjC;aAAM;YAGL,gBAAgB,GAAG,mBAAmB,CAAC;SACxC;KACF;IAED,OAAO,IAAI,uBAAU,CAAC,UAAC,UAAU;QAI/B,IAAI,GAAG,GAAG,oBAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,SAAU,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;QAEvE,IAAI,GAAG,GAAG,CAAC,EAAE;YAEX,GAAG,GAAG,CAAC,CAAC;SACT;QAGD,IAAI,CAAC,GAAG,CAAC,CAAC;QAGV,OAAO,SAAS,CAAC,QAAQ,CAAC;YACxB,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;gBAEtB,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;gBAErB,IAAI,CAAC,IAAI,gBAAgB,EAAE;oBAGzB,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;iBAC5C;qBAAM;oBAEL,UAAU,CAAC,QAAQ,EAAE,CAAC;iBACvB;aACF;QACH,CAAC,EAAE,GAAG,CAAC,CAAC;IACV,CAAC,CAAC,CAAC;AACL,CAAC;AArDD,sBAqDC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/using.js b/node_modules/rxjs/dist/cjs/internal/observable/using.js deleted file mode 100644 index e4abd20..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/using.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.using = void 0; -var Observable_1 = require("../Observable"); -var innerFrom_1 = require("./innerFrom"); -var empty_1 = require("./empty"); -function using(resourceFactory, observableFactory) { - return new Observable_1.Observable(function (subscriber) { - var resource = resourceFactory(); - var result = observableFactory(resource); - var source = result ? innerFrom_1.innerFrom(result) : empty_1.EMPTY; - source.subscribe(subscriber); - return function () { - if (resource) { - resource.unsubscribe(); - } - }; - }); -} -exports.using = using; -//# sourceMappingURL=using.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/using.js.map b/node_modules/rxjs/dist/cjs/internal/observable/using.js.map deleted file mode 100644 index cc47cbd..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/using.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"using.js","sourceRoot":"","sources":["../../../../src/internal/observable/using.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAE3C,yCAAwC;AACxC,iCAAgC;AA4BhC,SAAgB,KAAK,CACnB,eAA4C,EAC5C,iBAAgE;IAEhE,OAAO,IAAI,uBAAU,CAAqB,UAAC,UAAU;QACnD,IAAM,QAAQ,GAAG,eAAe,EAAE,CAAC;QACnC,IAAM,MAAM,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,qBAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,aAAK,CAAC;QAClD,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC7B,OAAO;YAGL,IAAI,QAAQ,EAAE;gBACZ,QAAQ,CAAC,WAAW,EAAE,CAAC;aACxB;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAjBD,sBAiBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/zip.js b/node_modules/rxjs/dist/cjs/internal/observable/zip.js deleted file mode 100644 index 9fca1cb..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/zip.js +++ /dev/null @@ -1,70 +0,0 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.zip = void 0; -var Observable_1 = require("../Observable"); -var innerFrom_1 = require("./innerFrom"); -var argsOrArgArray_1 = require("../util/argsOrArgArray"); -var empty_1 = require("./empty"); -var OperatorSubscriber_1 = require("../operators/OperatorSubscriber"); -var args_1 = require("../util/args"); -function zip() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var resultSelector = args_1.popResultSelector(args); - var sources = argsOrArgArray_1.argsOrArgArray(args); - return sources.length - ? new Observable_1.Observable(function (subscriber) { - var buffers = sources.map(function () { return []; }); - var completed = sources.map(function () { return false; }); - subscriber.add(function () { - buffers = completed = null; - }); - var _loop_1 = function (sourceIndex) { - innerFrom_1.innerFrom(sources[sourceIndex]).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - buffers[sourceIndex].push(value); - if (buffers.every(function (buffer) { return buffer.length; })) { - var result = buffers.map(function (buffer) { return buffer.shift(); }); - subscriber.next(resultSelector ? resultSelector.apply(void 0, __spreadArray([], __read(result))) : result); - if (buffers.some(function (buffer, i) { return !buffer.length && completed[i]; })) { - subscriber.complete(); - } - } - }, function () { - completed[sourceIndex] = true; - !buffers[sourceIndex].length && subscriber.complete(); - })); - }; - for (var sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) { - _loop_1(sourceIndex); - } - return function () { - buffers = completed = null; - }; - }) - : empty_1.EMPTY; -} -exports.zip = zip; -//# sourceMappingURL=zip.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/observable/zip.js.map b/node_modules/rxjs/dist/cjs/internal/observable/zip.js.map deleted file mode 100644 index d74f2db..0000000 --- a/node_modules/rxjs/dist/cjs/internal/observable/zip.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"zip.js","sourceRoot":"","sources":["../../../../src/internal/observable/zip.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA2C;AAE3C,yCAAwC;AACxC,yDAAwD;AACxD,iCAAgC;AAChC,sEAA2E;AAC3E,qCAAiD;AA8CjD,SAAgB,GAAG;IAAC,cAAkB;SAAlB,UAAkB,EAAlB,qBAAkB,EAAlB,IAAkB;QAAlB,yBAAkB;;IACpC,IAAM,cAAc,GAAG,wBAAiB,CAAC,IAAI,CAAC,CAAC;IAE/C,IAAM,OAAO,GAAG,+BAAc,CAAC,IAAI,CAA0B,CAAC;IAE9D,OAAO,OAAO,CAAC,MAAM;QACnB,CAAC,CAAC,IAAI,uBAAU,CAAY,UAAC,UAAU;YAGnC,IAAI,OAAO,GAAgB,OAAO,CAAC,GAAG,CAAC,cAAM,OAAA,EAAE,EAAF,CAAE,CAAC,CAAC;YAKjD,IAAI,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,cAAM,OAAA,KAAK,EAAL,CAAK,CAAC,CAAC;YAGzC,UAAU,CAAC,GAAG,CAAC;gBACb,OAAO,GAAG,SAAS,GAAG,IAAK,CAAC;YAC9B,CAAC,CAAC,CAAC;oCAKM,WAAW;gBAClB,qBAAS,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CACvC,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;oBACJ,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAIjC,IAAI,OAAO,CAAC,KAAK,CAAC,UAAC,MAAM,IAAK,OAAA,MAAM,CAAC,MAAM,EAAb,CAAa,CAAC,EAAE;wBAC5C,IAAM,MAAM,GAAQ,OAAO,CAAC,GAAG,CAAC,UAAC,MAAM,IAAK,OAAA,MAAM,CAAC,KAAK,EAAG,EAAf,CAAe,CAAC,CAAC;wBAE7D,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,wCAAI,MAAM,IAAE,CAAC,CAAC,MAAM,CAAC,CAAC;wBAIrE,IAAI,OAAO,CAAC,IAAI,CAAC,UAAC,MAAM,EAAE,CAAC,IAAK,OAAA,CAAC,MAAM,CAAC,MAAM,IAAI,SAAS,CAAC,CAAC,CAAC,EAA9B,CAA8B,CAAC,EAAE;4BAC/D,UAAU,CAAC,QAAQ,EAAE,CAAC;yBACvB;qBACF;gBACH,CAAC,EACD;oBAGE,SAAS,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;oBAI9B,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,MAAM,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;gBACxD,CAAC,CACF,CACF,CAAC;;YA/BJ,KAAK,IAAI,WAAW,GAAG,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,IAAI,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE;wBAAlF,WAAW;aAgCnB;YAGD,OAAO;gBACL,OAAO,GAAG,SAAS,GAAG,IAAK,CAAC;YAC9B,CAAC,CAAC;QACJ,CAAC,CAAC;QACJ,CAAC,CAAC,aAAK,CAAC;AACZ,CAAC;AAhED,kBAgEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js b/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js deleted file mode 100644 index dff340e..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js +++ /dev/null @@ -1,79 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OperatorSubscriber = exports.createOperatorSubscriber = void 0; -var Subscriber_1 = require("../Subscriber"); -function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) { - return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize); -} -exports.createOperatorSubscriber = createOperatorSubscriber; -var OperatorSubscriber = (function (_super) { - __extends(OperatorSubscriber, _super); - function OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) { - var _this = _super.call(this, destination) || this; - _this.onFinalize = onFinalize; - _this.shouldUnsubscribe = shouldUnsubscribe; - _this._next = onNext - ? function (value) { - try { - onNext(value); - } - catch (err) { - destination.error(err); - } - } - : _super.prototype._next; - _this._error = onError - ? function (err) { - try { - onError(err); - } - catch (err) { - destination.error(err); - } - finally { - this.unsubscribe(); - } - } - : _super.prototype._error; - _this._complete = onComplete - ? function () { - try { - onComplete(); - } - catch (err) { - destination.error(err); - } - finally { - this.unsubscribe(); - } - } - : _super.prototype._complete; - return _this; - } - OperatorSubscriber.prototype.unsubscribe = function () { - var _a; - if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) { - var closed_1 = this.closed; - _super.prototype.unsubscribe.call(this); - !closed_1 && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this)); - } - }; - return OperatorSubscriber; -}(Subscriber_1.Subscriber)); -exports.OperatorSubscriber = OperatorSubscriber; -//# sourceMappingURL=OperatorSubscriber.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js.map b/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js.map deleted file mode 100644 index 3a5b4f3..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OperatorSubscriber.js","sourceRoot":"","sources":["../../../../src/internal/operators/OperatorSubscriber.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,4CAA2C;AAc3C,SAAgB,wBAAwB,CACtC,WAA4B,EAC5B,MAA2B,EAC3B,UAAuB,EACvB,OAA4B,EAC5B,UAAuB;IAEvB,OAAO,IAAI,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AACtF,CAAC;AARD,4DAQC;AAMD;IAA2C,sCAAa;IAiBtD,4BACE,WAA4B,EAC5B,MAA2B,EAC3B,UAAuB,EACvB,OAA4B,EACpB,UAAuB,EACvB,iBAAiC;QAN3C,YAoBE,kBAAM,WAAW,CAAC,SAoCnB;QAnDS,gBAAU,GAAV,UAAU,CAAa;QACvB,uBAAiB,GAAjB,iBAAiB,CAAgB;QAezC,KAAI,CAAC,KAAK,GAAG,MAAM;YACjB,CAAC,CAAC,UAAuC,KAAQ;gBAC7C,IAAI;oBACF,MAAM,CAAC,KAAK,CAAC,CAAC;iBACf;gBAAC,OAAO,GAAG,EAAE;oBACZ,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACxB;YACH,CAAC;YACH,CAAC,CAAC,iBAAM,KAAK,CAAC;QAChB,KAAI,CAAC,MAAM,GAAG,OAAO;YACnB,CAAC,CAAC,UAAuC,GAAQ;gBAC7C,IAAI;oBACF,OAAO,CAAC,GAAG,CAAC,CAAC;iBACd;gBAAC,OAAO,GAAG,EAAE;oBAEZ,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACxB;wBAAS;oBAER,IAAI,CAAC,WAAW,EAAE,CAAC;iBACpB;YACH,CAAC;YACH,CAAC,CAAC,iBAAM,MAAM,CAAC;QACjB,KAAI,CAAC,SAAS,GAAG,UAAU;YACzB,CAAC,CAAC;gBACE,IAAI;oBACF,UAAU,EAAE,CAAC;iBACd;gBAAC,OAAO,GAAG,EAAE;oBAEZ,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACxB;wBAAS;oBAER,IAAI,CAAC,WAAW,EAAE,CAAC;iBACpB;YACH,CAAC;YACH,CAAC,CAAC,iBAAM,SAAS,CAAC;;IACtB,CAAC;IAED,wCAAW,GAAX;;QACE,IAAI,CAAC,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,iBAAiB,EAAE,EAAE;YAC/C,IAAA,QAAM,GAAK,IAAI,OAAT,CAAU;YACxB,iBAAM,WAAW,WAAE,CAAC;YAEpB,CAAC,QAAM,KAAI,MAAA,IAAI,CAAC,UAAU,+CAAf,IAAI,CAAe,CAAA,CAAC;SAChC;IACH,CAAC;IACH,yBAAC;AAAD,CAAC,AAnFD,CAA2C,uBAAU,GAmFpD;AAnFY,gDAAkB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/audit.js b/node_modules/rxjs/dist/cjs/internal/operators/audit.js deleted file mode 100644 index 26c7cca..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/audit.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.audit = void 0; -var lift_1 = require("../util/lift"); -var innerFrom_1 = require("../observable/innerFrom"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function audit(durationSelector) { - return lift_1.operate(function (source, subscriber) { - var hasValue = false; - var lastValue = null; - var durationSubscriber = null; - var isComplete = false; - var endDuration = function () { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); - durationSubscriber = null; - if (hasValue) { - hasValue = false; - var value = lastValue; - lastValue = null; - subscriber.next(value); - } - isComplete && subscriber.complete(); - }; - var cleanupDuration = function () { - durationSubscriber = null; - isComplete && subscriber.complete(); - }; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - hasValue = true; - lastValue = value; - if (!durationSubscriber) { - innerFrom_1.innerFrom(durationSelector(value)).subscribe((durationSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, endDuration, cleanupDuration))); - } - }, function () { - isComplete = true; - (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete(); - })); - }); -} -exports.audit = audit; -//# sourceMappingURL=audit.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/audit.js.map b/node_modules/rxjs/dist/cjs/internal/operators/audit.js.map deleted file mode 100644 index 2eed307..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/audit.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../../../src/internal/operators/audit.ts"],"names":[],"mappings":";;;AAGA,qCAAuC;AACvC,qDAAoD;AACpD,2DAAgE;AA+ChE,SAAgB,KAAK,CAAI,gBAAoD;IAC3E,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,SAAS,GAAa,IAAI,CAAC;QAC/B,IAAI,kBAAkB,GAA2B,IAAI,CAAC;QACtD,IAAI,UAAU,GAAG,KAAK,CAAC;QAEvB,IAAM,WAAW,GAAG;YAClB,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,WAAW,EAAE,CAAC;YAClC,kBAAkB,GAAG,IAAI,CAAC;YAC1B,IAAI,QAAQ,EAAE;gBACZ,QAAQ,GAAG,KAAK,CAAC;gBACjB,IAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;YACD,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACtC,CAAC,CAAC;QAEF,IAAM,eAAe,GAAG;YACtB,kBAAkB,GAAG,IAAI,CAAC;YAC1B,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACtC,CAAC,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,QAAQ,GAAG,IAAI,CAAC;YAChB,SAAS,GAAG,KAAK,CAAC;YAClB,IAAI,CAAC,kBAAkB,EAAE;gBACvB,qBAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAC1C,CAAC,kBAAkB,GAAG,6CAAwB,CAAC,UAAU,EAAE,WAAW,EAAE,eAAe,CAAC,CAAC,CAC1F,CAAC;aACH;QACH,CAAC,EACD;YACE,UAAU,GAAG,IAAI,CAAC;YAClB,CAAC,CAAC,QAAQ,IAAI,CAAC,kBAAkB,IAAI,kBAAkB,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QAC3F,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA3CD,sBA2CC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/auditTime.js b/node_modules/rxjs/dist/cjs/internal/operators/auditTime.js deleted file mode 100644 index e934c87..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/auditTime.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.auditTime = void 0; -var async_1 = require("../scheduler/async"); -var audit_1 = require("./audit"); -var timer_1 = require("../observable/timer"); -function auditTime(duration, scheduler) { - if (scheduler === void 0) { scheduler = async_1.asyncScheduler; } - return audit_1.audit(function () { return timer_1.timer(duration, scheduler); }); -} -exports.auditTime = auditTime; -//# sourceMappingURL=auditTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/auditTime.js.map b/node_modules/rxjs/dist/cjs/internal/operators/auditTime.js.map deleted file mode 100644 index 4199bf6..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/auditTime.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"auditTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/auditTime.ts"],"names":[],"mappings":";;;AAAA,4CAAoD;AACpD,iCAAgC;AAChC,6CAA4C;AAkD5C,SAAgB,SAAS,CAAI,QAAgB,EAAE,SAAyC;IAAzC,0BAAA,EAAA,YAA2B,sBAAc;IACtF,OAAO,aAAK,CAAC,cAAM,OAAA,aAAK,CAAC,QAAQ,EAAE,SAAS,CAAC,EAA1B,CAA0B,CAAC,CAAC;AACjD,CAAC;AAFD,8BAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/buffer.js b/node_modules/rxjs/dist/cjs/internal/operators/buffer.js deleted file mode 100644 index 6352f92..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/buffer.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.buffer = void 0; -var lift_1 = require("../util/lift"); -var noop_1 = require("../util/noop"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var innerFrom_1 = require("../observable/innerFrom"); -function buffer(closingNotifier) { - return lift_1.operate(function (source, subscriber) { - var currentBuffer = []; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return currentBuffer.push(value); }, function () { - subscriber.next(currentBuffer); - subscriber.complete(); - })); - innerFrom_1.innerFrom(closingNotifier).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { - var b = currentBuffer; - currentBuffer = []; - subscriber.next(b); - }, noop_1.noop)); - return function () { - currentBuffer = null; - }; - }); -} -exports.buffer = buffer; -//# sourceMappingURL=buffer.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/buffer.js.map b/node_modules/rxjs/dist/cjs/internal/operators/buffer.js.map deleted file mode 100644 index 2e8efdc..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/buffer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"buffer.js","sourceRoot":"","sources":["../../../../src/internal/operators/buffer.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,qCAAoC;AACpC,2DAAgE;AAChE,qDAAoD;AAwCpD,SAAgB,MAAM,CAAI,eAAqC;IAC7D,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,aAAa,GAAQ,EAAE,CAAC;QAG5B,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK,IAAK,OAAA,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,EAAzB,CAAyB,EACpC;YACE,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YAC/B,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;QAGF,qBAAS,CAAC,eAAe,CAAC,CAAC,SAAS,CAClC,6CAAwB,CACtB,UAAU,EACV;YAEE,IAAM,CAAC,GAAG,aAAa,CAAC;YACxB,aAAa,GAAG,EAAE,CAAC;YACnB,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACrB,CAAC,EACD,WAAI,CACL,CACF,CAAC;QAEF,OAAO;YAEL,aAAa,GAAG,IAAK,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AApCD,wBAoCC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js b/node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js deleted file mode 100644 index 25ff121..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js +++ /dev/null @@ -1,85 +0,0 @@ -"use strict"; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.bufferCount = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var arrRemove_1 = require("../util/arrRemove"); -function bufferCount(bufferSize, startBufferEvery) { - if (startBufferEvery === void 0) { startBufferEvery = null; } - startBufferEvery = startBufferEvery !== null && startBufferEvery !== void 0 ? startBufferEvery : bufferSize; - return lift_1.operate(function (source, subscriber) { - var buffers = []; - var count = 0; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - var e_1, _a, e_2, _b; - var toEmit = null; - if (count++ % startBufferEvery === 0) { - buffers.push([]); - } - try { - for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { - var buffer = buffers_1_1.value; - buffer.push(value); - if (bufferSize <= buffer.length) { - toEmit = toEmit !== null && toEmit !== void 0 ? toEmit : []; - toEmit.push(buffer); - } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1); - } - finally { if (e_1) throw e_1.error; } - } - if (toEmit) { - try { - for (var toEmit_1 = __values(toEmit), toEmit_1_1 = toEmit_1.next(); !toEmit_1_1.done; toEmit_1_1 = toEmit_1.next()) { - var buffer = toEmit_1_1.value; - arrRemove_1.arrRemove(buffers, buffer); - subscriber.next(buffer); - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (toEmit_1_1 && !toEmit_1_1.done && (_b = toEmit_1.return)) _b.call(toEmit_1); - } - finally { if (e_2) throw e_2.error; } - } - } - }, function () { - var e_3, _a; - try { - for (var buffers_2 = __values(buffers), buffers_2_1 = buffers_2.next(); !buffers_2_1.done; buffers_2_1 = buffers_2.next()) { - var buffer = buffers_2_1.value; - subscriber.next(buffer); - } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (buffers_2_1 && !buffers_2_1.done && (_a = buffers_2.return)) _a.call(buffers_2); - } - finally { if (e_3) throw e_3.error; } - } - subscriber.complete(); - }, undefined, function () { - buffers = null; - })); - }); -} -exports.bufferCount = bufferCount; -//# sourceMappingURL=bufferCount.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js.map b/node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js.map deleted file mode 100644 index 466b102..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/bufferCount.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bufferCount.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferCount.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,qCAAuC;AACvC,2DAAgE;AAChE,+CAA8C;AAqD9C,SAAgB,WAAW,CAAI,UAAkB,EAAE,gBAAsC;IAAtC,iCAAA,EAAA,uBAAsC;IAGvF,gBAAgB,GAAG,gBAAgB,aAAhB,gBAAgB,cAAhB,gBAAgB,GAAI,UAAU,CAAC;IAElD,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,OAAO,GAAU,EAAE,CAAC;QACxB,IAAI,KAAK,GAAG,CAAC,CAAC;QAEd,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;;YACJ,IAAI,MAAM,GAAiB,IAAI,CAAC;YAKhC,IAAI,KAAK,EAAE,GAAG,gBAAiB,KAAK,CAAC,EAAE;gBACrC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;aAClB;;gBAGD,KAAqB,IAAA,YAAA,SAAA,OAAO,CAAA,gCAAA,qDAAE;oBAAzB,IAAM,MAAM,oBAAA;oBACf,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAMnB,IAAI,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE;wBAC/B,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAC;wBACtB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;qBACrB;iBACF;;;;;;;;;YAED,IAAI,MAAM,EAAE;;oBAIV,KAAqB,IAAA,WAAA,SAAA,MAAM,CAAA,8BAAA,kDAAE;wBAAxB,IAAM,MAAM,mBAAA;wBACf,qBAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;wBAC3B,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;qBACzB;;;;;;;;;aACF;QACH,CAAC,EACD;;;gBAGE,KAAqB,IAAA,YAAA,SAAA,OAAO,CAAA,gCAAA,qDAAE;oBAAzB,IAAM,MAAM,oBAAA;oBACf,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;iBACzB;;;;;;;;;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EAED,SAAS,EACT;YAEE,OAAO,GAAG,IAAK,CAAC;QAClB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA/DD,kCA+DC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js b/node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js deleted file mode 100644 index 5712d64..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js +++ /dev/null @@ -1,91 +0,0 @@ -"use strict"; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.bufferTime = void 0; -var Subscription_1 = require("../Subscription"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var arrRemove_1 = require("../util/arrRemove"); -var async_1 = require("../scheduler/async"); -var args_1 = require("../util/args"); -var executeSchedule_1 = require("../util/executeSchedule"); -function bufferTime(bufferTimeSpan) { - var _a, _b; - var otherArgs = []; - for (var _i = 1; _i < arguments.length; _i++) { - otherArgs[_i - 1] = arguments[_i]; - } - var scheduler = (_a = args_1.popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : async_1.asyncScheduler; - var bufferCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; - var maxBufferSize = otherArgs[1] || Infinity; - return lift_1.operate(function (source, subscriber) { - var bufferRecords = []; - var restartOnEmit = false; - var emit = function (record) { - var buffer = record.buffer, subs = record.subs; - subs.unsubscribe(); - arrRemove_1.arrRemove(bufferRecords, record); - subscriber.next(buffer); - restartOnEmit && startBuffer(); - }; - var startBuffer = function () { - if (bufferRecords) { - var subs = new Subscription_1.Subscription(); - subscriber.add(subs); - var buffer = []; - var record_1 = { - buffer: buffer, - subs: subs, - }; - bufferRecords.push(record_1); - executeSchedule_1.executeSchedule(subs, scheduler, function () { return emit(record_1); }, bufferTimeSpan); - } - }; - if (bufferCreationInterval !== null && bufferCreationInterval >= 0) { - executeSchedule_1.executeSchedule(subscriber, scheduler, startBuffer, bufferCreationInterval, true); - } - else { - restartOnEmit = true; - } - startBuffer(); - var bufferTimeSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - var e_1, _a; - var recordsCopy = bufferRecords.slice(); - try { - for (var recordsCopy_1 = __values(recordsCopy), recordsCopy_1_1 = recordsCopy_1.next(); !recordsCopy_1_1.done; recordsCopy_1_1 = recordsCopy_1.next()) { - var record = recordsCopy_1_1.value; - var buffer = record.buffer; - buffer.push(value); - maxBufferSize <= buffer.length && emit(record); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (recordsCopy_1_1 && !recordsCopy_1_1.done && (_a = recordsCopy_1.return)) _a.call(recordsCopy_1); - } - finally { if (e_1) throw e_1.error; } - } - }, function () { - while (bufferRecords === null || bufferRecords === void 0 ? void 0 : bufferRecords.length) { - subscriber.next(bufferRecords.shift().buffer); - } - bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 ? void 0 : bufferTimeSubscriber.unsubscribe(); - subscriber.complete(); - subscriber.unsubscribe(); - }, undefined, function () { return (bufferRecords = null); }); - source.subscribe(bufferTimeSubscriber); - }); -} -exports.bufferTime = bufferTime; -//# sourceMappingURL=bufferTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js.map b/node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js.map deleted file mode 100644 index 0118e9f..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/bufferTime.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bufferTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferTime.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gDAA+C;AAE/C,qCAAuC;AACvC,2DAAgE;AAChE,+CAA8C;AAC9C,4CAAoD;AACpD,qCAA4C;AAC5C,2DAA0D;AAmE1D,SAAgB,UAAU,CAAI,cAAsB;;IAAE,mBAAmB;SAAnB,UAAmB,EAAnB,qBAAmB,EAAnB,IAAmB;QAAnB,kCAAmB;;IACvE,IAAM,SAAS,GAAG,MAAA,mBAAY,CAAC,SAAS,CAAC,mCAAI,sBAAc,CAAC;IAC5D,IAAM,sBAAsB,GAAG,MAAC,SAAS,CAAC,CAAC,CAAY,mCAAI,IAAI,CAAC;IAChE,IAAM,aAAa,GAAI,SAAS,CAAC,CAAC,CAAY,IAAI,QAAQ,CAAC;IAE3D,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,aAAa,GAAiD,EAAE,CAAC;QAGrE,IAAI,aAAa,GAAG,KAAK,CAAC;QAQ1B,IAAM,IAAI,GAAG,UAAC,MAA2C;YAC/C,IAAA,MAAM,GAAW,MAAM,OAAjB,EAAE,IAAI,GAAK,MAAM,KAAX,CAAY;YAChC,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,qBAAS,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;YACjC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACxB,aAAa,IAAI,WAAW,EAAE,CAAC;QACjC,CAAC,CAAC;QAOF,IAAM,WAAW,GAAG;YAClB,IAAI,aAAa,EAAE;gBACjB,IAAM,IAAI,GAAG,IAAI,2BAAY,EAAE,CAAC;gBAChC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBACrB,IAAM,MAAM,GAAQ,EAAE,CAAC;gBACvB,IAAM,QAAM,GAAG;oBACb,MAAM,QAAA;oBACN,IAAI,MAAA;iBACL,CAAC;gBACF,aAAa,CAAC,IAAI,CAAC,QAAM,CAAC,CAAC;gBAC3B,iCAAe,CAAC,IAAI,EAAE,SAAS,EAAE,cAAM,OAAA,IAAI,CAAC,QAAM,CAAC,EAAZ,CAAY,EAAE,cAAc,CAAC,CAAC;aACtE;QACH,CAAC,CAAC;QAEF,IAAI,sBAAsB,KAAK,IAAI,IAAI,sBAAsB,IAAI,CAAC,EAAE;YAIlE,iCAAe,CAAC,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,sBAAsB,EAAE,IAAI,CAAC,CAAC;SACnF;aAAM;YACL,aAAa,GAAG,IAAI,CAAC;SACtB;QAED,WAAW,EAAE,CAAC;QAEd,IAAM,oBAAoB,GAAG,6CAAwB,CACnD,UAAU,EACV,UAAC,KAAQ;;YAKP,IAAM,WAAW,GAAG,aAAc,CAAC,KAAK,EAAE,CAAC;;gBAC3C,KAAqB,IAAA,gBAAA,SAAA,WAAW,CAAA,wCAAA,iEAAE;oBAA7B,IAAM,MAAM,wBAAA;oBAEP,IAAA,MAAM,GAAK,MAAM,OAAX,CAAY;oBAC1B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAEnB,aAAa,IAAI,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC;iBAChD;;;;;;;;;QACH,CAAC,EACD;YAGE,OAAO,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,MAAM,EAAE;gBAC5B,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,EAAG,CAAC,MAAM,CAAC,CAAC;aAChD;YACD,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,WAAW,EAAE,CAAC;YACpC,UAAU,CAAC,QAAQ,EAAE,CAAC;YACtB,UAAU,CAAC,WAAW,EAAE,CAAC;QAC3B,CAAC,EAED,SAAS,EAET,cAAM,OAAA,CAAC,aAAa,GAAG,IAAI,CAAC,EAAtB,CAAsB,CAC7B,CAAC;QAEF,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC;AA1FD,gCA0FC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js b/node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js deleted file mode 100644 index e6ac092..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js +++ /dev/null @@ -1,59 +0,0 @@ -"use strict"; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.bufferToggle = void 0; -var Subscription_1 = require("../Subscription"); -var lift_1 = require("../util/lift"); -var innerFrom_1 = require("../observable/innerFrom"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var noop_1 = require("../util/noop"); -var arrRemove_1 = require("../util/arrRemove"); -function bufferToggle(openings, closingSelector) { - return lift_1.operate(function (source, subscriber) { - var buffers = []; - innerFrom_1.innerFrom(openings).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (openValue) { - var buffer = []; - buffers.push(buffer); - var closingSubscription = new Subscription_1.Subscription(); - var emitBuffer = function () { - arrRemove_1.arrRemove(buffers, buffer); - subscriber.next(buffer); - closingSubscription.unsubscribe(); - }; - closingSubscription.add(innerFrom_1.innerFrom(closingSelector(openValue)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, emitBuffer, noop_1.noop))); - }, noop_1.noop)); - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - var e_1, _a; - try { - for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { - var buffer = buffers_1_1.value; - buffer.push(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1); - } - finally { if (e_1) throw e_1.error; } - } - }, function () { - while (buffers.length > 0) { - subscriber.next(buffers.shift()); - } - subscriber.complete(); - })); - }); -} -exports.bufferToggle = bufferToggle; -//# sourceMappingURL=bufferToggle.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js.map b/node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js.map deleted file mode 100644 index b39e1f3..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/bufferToggle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bufferToggle.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferToggle.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gDAA+C;AAE/C,qCAAuC;AACvC,qDAAoD;AACpD,2DAAgE;AAChE,qCAAoC;AACpC,+CAA8C;AA6C9C,SAAgB,YAAY,CAC1B,QAA4B,EAC5B,eAAmD;IAEnD,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAM,OAAO,GAAU,EAAE,CAAC;QAG1B,qBAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAC3B,6CAAwB,CACtB,UAAU,EACV,UAAC,SAAS;YACR,IAAM,MAAM,GAAQ,EAAE,CAAC;YACvB,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAGrB,IAAM,mBAAmB,GAAG,IAAI,2BAAY,EAAE,CAAC;YAE/C,IAAM,UAAU,GAAG;gBACjB,qBAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;gBAC3B,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBACxB,mBAAmB,CAAC,WAAW,EAAE,CAAC;YACpC,CAAC,CAAC;YAGF,mBAAmB,CAAC,GAAG,CAAC,qBAAS,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,6CAAwB,CAAC,UAAU,EAAE,UAAU,EAAE,WAAI,CAAC,CAAC,CAAC,CAAC;QACnI,CAAC,EACD,WAAI,CACL,CACF,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;;;gBAEJ,KAAqB,IAAA,YAAA,SAAA,OAAO,CAAA,gCAAA,qDAAE;oBAAzB,IAAM,MAAM,oBAAA;oBACf,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBACpB;;;;;;;;;QACH,CAAC,EACD;YAEE,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzB,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAG,CAAC,CAAC;aACnC;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAlDD,oCAkDC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js b/node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js deleted file mode 100644 index a32e3e6..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.bufferWhen = void 0; -var lift_1 = require("../util/lift"); -var noop_1 = require("../util/noop"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var innerFrom_1 = require("../observable/innerFrom"); -function bufferWhen(closingSelector) { - return lift_1.operate(function (source, subscriber) { - var buffer = null; - var closingSubscriber = null; - var openBuffer = function () { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); - var b = buffer; - buffer = []; - b && subscriber.next(b); - innerFrom_1.innerFrom(closingSelector()).subscribe((closingSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, openBuffer, noop_1.noop))); - }; - openBuffer(); - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return buffer === null || buffer === void 0 ? void 0 : buffer.push(value); }, function () { - buffer && subscriber.next(buffer); - subscriber.complete(); - }, undefined, function () { return (buffer = closingSubscriber = null); })); - }); -} -exports.bufferWhen = bufferWhen; -//# sourceMappingURL=bufferWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js.map b/node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js.map deleted file mode 100644 index 9245ef6..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/bufferWhen.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bufferWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferWhen.ts"],"names":[],"mappings":";;;AAEA,qCAAuC;AACvC,qCAAoC;AACpC,2DAAgE;AAChE,qDAAoD;AAwCpD,SAAgB,UAAU,CAAI,eAA2C;IACvE,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,MAAM,GAAe,IAAI,CAAC;QAI9B,IAAI,iBAAiB,GAAyB,IAAI,CAAC;QAMnD,IAAM,UAAU,GAAG;YAGjB,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,WAAW,EAAE,CAAC;YAEjC,IAAM,CAAC,GAAG,MAAM,CAAC;YACjB,MAAM,GAAG,EAAE,CAAC;YACZ,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAGxB,qBAAS,CAAC,eAAe,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,iBAAiB,GAAG,6CAAwB,CAAC,UAAU,EAAE,UAAU,EAAE,WAAI,CAAC,CAAC,CAAC,CAAC;QACvH,CAAC,CAAC;QAGF,UAAU,EAAE,CAAC;QAGb,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EAEV,UAAC,KAAK,IAAK,OAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAC,KAAK,CAAC,EAAnB,CAAmB,EAG9B;YACE,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAClC,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EAED,SAAS,EAET,cAAM,OAAA,CAAC,MAAM,GAAG,iBAAiB,GAAG,IAAK,CAAC,EAApC,CAAoC,CAC3C,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAhDD,gCAgDC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/catchError.js b/node_modules/rxjs/dist/cjs/internal/operators/catchError.js deleted file mode 100644 index ecff0f1..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/catchError.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.catchError = void 0; -var innerFrom_1 = require("../observable/innerFrom"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var lift_1 = require("../util/lift"); -function catchError(selector) { - return lift_1.operate(function (source, subscriber) { - var innerSub = null; - var syncUnsub = false; - var handledResult; - innerSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, undefined, function (err) { - handledResult = innerFrom_1.innerFrom(selector(err, catchError(selector)(source))); - if (innerSub) { - innerSub.unsubscribe(); - innerSub = null; - handledResult.subscribe(subscriber); - } - else { - syncUnsub = true; - } - })); - if (syncUnsub) { - innerSub.unsubscribe(); - innerSub = null; - handledResult.subscribe(subscriber); - } - }); -} -exports.catchError = catchError; -//# sourceMappingURL=catchError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/catchError.js.map b/node_modules/rxjs/dist/cjs/internal/operators/catchError.js.map deleted file mode 100644 index 10a0137..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/catchError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"catchError.js","sourceRoot":"","sources":["../../../../src/internal/operators/catchError.ts"],"names":[],"mappings":";;;AAIA,qDAAoD;AACpD,2DAAgE;AAChE,qCAAuC;AAkGvC,SAAgB,UAAU,CACxB,QAAgD;IAEhD,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAwB,IAAI,CAAC;QACzC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,aAA6C,CAAC;QAElD,QAAQ,GAAG,MAAM,CAAC,SAAS,CACzB,6CAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,UAAC,GAAG;YAC7D,aAAa,GAAG,qBAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACvE,IAAI,QAAQ,EAAE;gBACZ,QAAQ,CAAC,WAAW,EAAE,CAAC;gBACvB,QAAQ,GAAG,IAAI,CAAC;gBAChB,aAAa,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;aACrC;iBAAM;gBAGL,SAAS,GAAG,IAAI,CAAC;aAClB;QACH,CAAC,CAAC,CACH,CAAC;QAEF,IAAI,SAAS,EAAE;YAMb,QAAQ,CAAC,WAAW,EAAE,CAAC;YACvB,QAAQ,GAAG,IAAI,CAAC;YAChB,aAAc,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;SACtC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAlCD,gCAkCC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/combineAll.js b/node_modules/rxjs/dist/cjs/internal/operators/combineAll.js deleted file mode 100644 index 4a0d77c..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/combineAll.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.combineAll = void 0; -var combineLatestAll_1 = require("./combineLatestAll"); -exports.combineAll = combineLatestAll_1.combineLatestAll; -//# sourceMappingURL=combineAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/combineAll.js.map b/node_modules/rxjs/dist/cjs/internal/operators/combineAll.js.map deleted file mode 100644 index 717ef22..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/combineAll.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"combineAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineAll.ts"],"names":[],"mappings":";;;AAAA,uDAAsD;AAKzC,QAAA,UAAU,GAAG,mCAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/combineLatest.js b/node_modules/rxjs/dist/cjs/internal/operators/combineLatest.js deleted file mode 100644 index 515d6f5..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/combineLatest.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.combineLatest = void 0; -var combineLatest_1 = require("../observable/combineLatest"); -var lift_1 = require("../util/lift"); -var argsOrArgArray_1 = require("../util/argsOrArgArray"); -var mapOneOrManyArgs_1 = require("../util/mapOneOrManyArgs"); -var pipe_1 = require("../util/pipe"); -var args_1 = require("../util/args"); -function combineLatest() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var resultSelector = args_1.popResultSelector(args); - return resultSelector - ? pipe_1.pipe(combineLatest.apply(void 0, __spreadArray([], __read(args))), mapOneOrManyArgs_1.mapOneOrManyArgs(resultSelector)) - : lift_1.operate(function (source, subscriber) { - combineLatest_1.combineLatestInit(__spreadArray([source], __read(argsOrArgArray_1.argsOrArgArray(args))))(subscriber); - }); -} -exports.combineLatest = combineLatest; -//# sourceMappingURL=combineLatest.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/combineLatest.js.map b/node_modules/rxjs/dist/cjs/internal/operators/combineLatest.js.map deleted file mode 100644 index 7ab194c..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/combineLatest.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"combineLatest.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAAgE;AAEhE,qCAAuC;AACvC,yDAAwD;AACxD,6DAA4D;AAC5D,qCAAoC;AACpC,qCAAiD;AAoBjD,SAAgB,aAAa;IAAO,cAA6D;SAA7D,UAA6D,EAA7D,qBAA6D,EAA7D,IAA6D;QAA7D,yBAA6D;;IAC/F,IAAM,cAAc,GAAG,wBAAiB,CAAC,IAAI,CAAC,CAAC;IAC/C,OAAO,cAAc;QACnB,CAAC,CAAC,WAAI,CAAC,aAAa,wCAAK,IAAoC,KAAG,mCAAgB,CAAC,cAAc,CAAC,CAAC;QACjG,CAAC,CAAC,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YACzB,iCAAiB,gBAAE,MAAM,UAAK,+BAAc,CAAC,IAAI,CAAC,GAAE,CAAC,UAAU,CAAC,CAAC;QACnE,CAAC,CAAC,CAAC;AACT,CAAC;AAPD,sCAOC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/combineLatestAll.js b/node_modules/rxjs/dist/cjs/internal/operators/combineLatestAll.js deleted file mode 100644 index 11bcc07..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/combineLatestAll.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.combineLatestAll = void 0; -var combineLatest_1 = require("../observable/combineLatest"); -var joinAllInternals_1 = require("./joinAllInternals"); -function combineLatestAll(project) { - return joinAllInternals_1.joinAllInternals(combineLatest_1.combineLatest, project); -} -exports.combineLatestAll = combineLatestAll; -//# sourceMappingURL=combineLatestAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/combineLatestAll.js.map b/node_modules/rxjs/dist/cjs/internal/operators/combineLatestAll.js.map deleted file mode 100644 index e7b51b4..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/combineLatestAll.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"combineLatestAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatestAll.ts"],"names":[],"mappings":";;;AAAA,6DAA4D;AAE5D,uDAAsD;AA6CtD,SAAgB,gBAAgB,CAAI,OAAsC;IACxE,OAAO,mCAAgB,CAAC,6BAAa,EAAE,OAAO,CAAC,CAAC;AAClD,CAAC;AAFD,4CAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/combineLatestWith.js b/node_modules/rxjs/dist/cjs/internal/operators/combineLatestWith.js deleted file mode 100644 index 8f5c34a..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/combineLatestWith.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.combineLatestWith = void 0; -var combineLatest_1 = require("./combineLatest"); -function combineLatestWith() { - var otherSources = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherSources[_i] = arguments[_i]; - } - return combineLatest_1.combineLatest.apply(void 0, __spreadArray([], __read(otherSources))); -} -exports.combineLatestWith = combineLatestWith; -//# sourceMappingURL=combineLatestWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/combineLatestWith.js.map b/node_modules/rxjs/dist/cjs/internal/operators/combineLatestWith.js.map deleted file mode 100644 index 885fec0..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/combineLatestWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"combineLatestWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatestWith.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,iDAAgD;AA0ChD,SAAgB,iBAAiB;IAC/B,sBAA6C;SAA7C,UAA6C,EAA7C,qBAA6C,EAA7C,IAA6C;QAA7C,iCAA6C;;IAE7C,OAAO,6BAAa,wCAAI,YAAY,IAAE;AACxC,CAAC;AAJD,8CAIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/concat.js b/node_modules/rxjs/dist/cjs/internal/operators/concat.js deleted file mode 100644 index 97c8462..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/concat.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.concat = void 0; -var lift_1 = require("../util/lift"); -var concatAll_1 = require("./concatAll"); -var args_1 = require("../util/args"); -var from_1 = require("../observable/from"); -function concat() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = args_1.popScheduler(args); - return lift_1.operate(function (source, subscriber) { - concatAll_1.concatAll()(from_1.from(__spreadArray([source], __read(args)), scheduler)).subscribe(subscriber); - }); -} -exports.concat = concat; -//# sourceMappingURL=concat.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/concat.js.map b/node_modules/rxjs/dist/cjs/internal/operators/concat.js.map deleted file mode 100644 index dad6b26..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/concat.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concat.js","sourceRoot":"","sources":["../../../../src/internal/operators/concat.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,qCAAuC;AACvC,yCAAwC;AACxC,qCAA4C;AAC5C,2CAA0C;AAY1C,SAAgB,MAAM;IAAO,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,yBAAc;;IACzC,IAAM,SAAS,GAAG,mBAAY,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,qBAAS,EAAE,CAAC,WAAI,gBAAE,MAAM,UAAK,IAAI,IAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;AACL,CAAC;AALD,wBAKC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/concatAll.js b/node_modules/rxjs/dist/cjs/internal/operators/concatAll.js deleted file mode 100644 index fd6c66c..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/concatAll.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.concatAll = void 0; -var mergeAll_1 = require("./mergeAll"); -function concatAll() { - return mergeAll_1.mergeAll(1); -} -exports.concatAll = concatAll; -//# sourceMappingURL=concatAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/concatAll.js.map b/node_modules/rxjs/dist/cjs/internal/operators/concatAll.js.map deleted file mode 100644 index b20b300..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/concatAll.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concatAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatAll.ts"],"names":[],"mappings":";;;AAAA,uCAAsC;AA2DtC,SAAgB,SAAS;IACvB,OAAO,mBAAQ,CAAC,CAAC,CAAC,CAAC;AACrB,CAAC;AAFD,8BAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/concatMap.js b/node_modules/rxjs/dist/cjs/internal/operators/concatMap.js deleted file mode 100644 index 456fbae..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/concatMap.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.concatMap = void 0; -var mergeMap_1 = require("./mergeMap"); -var isFunction_1 = require("../util/isFunction"); -function concatMap(project, resultSelector) { - return isFunction_1.isFunction(resultSelector) ? mergeMap_1.mergeMap(project, resultSelector, 1) : mergeMap_1.mergeMap(project, 1); -} -exports.concatMap = concatMap; -//# sourceMappingURL=concatMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/concatMap.js.map b/node_modules/rxjs/dist/cjs/internal/operators/concatMap.js.map deleted file mode 100644 index 5aaba2e..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/concatMap.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concatMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatMap.ts"],"names":[],"mappings":";;;AAAA,uCAAsC;AAEtC,iDAAgD;AA2EhD,SAAgB,SAAS,CACvB,OAAuC,EACvC,cAA6G;IAE7G,OAAO,uBAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,mBAAQ,CAAC,OAAO,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,mBAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AAClG,CAAC;AALD,8BAKC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/concatMapTo.js b/node_modules/rxjs/dist/cjs/internal/operators/concatMapTo.js deleted file mode 100644 index 2e69bc7..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/concatMapTo.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.concatMapTo = void 0; -var concatMap_1 = require("./concatMap"); -var isFunction_1 = require("../util/isFunction"); -function concatMapTo(innerObservable, resultSelector) { - return isFunction_1.isFunction(resultSelector) ? concatMap_1.concatMap(function () { return innerObservable; }, resultSelector) : concatMap_1.concatMap(function () { return innerObservable; }); -} -exports.concatMapTo = concatMapTo; -//# sourceMappingURL=concatMapTo.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/concatMapTo.js.map b/node_modules/rxjs/dist/cjs/internal/operators/concatMapTo.js.map deleted file mode 100644 index 96fd1a5..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/concatMapTo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concatMapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatMapTo.ts"],"names":[],"mappings":";;;AAAA,yCAAwC;AAExC,iDAAgD;AAuEhD,SAAgB,WAAW,CACzB,eAAkB,EAClB,cAA6G;IAE7G,OAAO,uBAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,qBAAS,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,qBAAS,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,CAAC,CAAC;AAC1H,CAAC;AALD,kCAKC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/concatWith.js b/node_modules/rxjs/dist/cjs/internal/operators/concatWith.js deleted file mode 100644 index a4c2935..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/concatWith.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.concatWith = void 0; -var concat_1 = require("./concat"); -function concatWith() { - var otherSources = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherSources[_i] = arguments[_i]; - } - return concat_1.concat.apply(void 0, __spreadArray([], __read(otherSources))); -} -exports.concatWith = concatWith; -//# sourceMappingURL=concatWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/concatWith.js.map b/node_modules/rxjs/dist/cjs/internal/operators/concatWith.js.map deleted file mode 100644 index 6ab2a5e..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/concatWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concatWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatWith.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,mCAAkC;AA0ClC,SAAgB,UAAU;IACxB,sBAA6C;SAA7C,UAA6C,EAA7C,qBAA6C,EAA7C,IAA6C;QAA7C,iCAA6C;;IAE7C,OAAO,eAAM,wCAAI,YAAY,IAAE;AACjC,CAAC;AAJD,gCAIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/connect.js b/node_modules/rxjs/dist/cjs/internal/operators/connect.js deleted file mode 100644 index 3595728..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/connect.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.connect = void 0; -var Subject_1 = require("../Subject"); -var innerFrom_1 = require("../observable/innerFrom"); -var lift_1 = require("../util/lift"); -var fromSubscribable_1 = require("../observable/fromSubscribable"); -var DEFAULT_CONFIG = { - connector: function () { return new Subject_1.Subject(); }, -}; -function connect(selector, config) { - if (config === void 0) { config = DEFAULT_CONFIG; } - var connector = config.connector; - return lift_1.operate(function (source, subscriber) { - var subject = connector(); - innerFrom_1.innerFrom(selector(fromSubscribable_1.fromSubscribable(subject))).subscribe(subscriber); - subscriber.add(source.subscribe(subject)); - }); -} -exports.connect = connect; -//# sourceMappingURL=connect.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/connect.js.map b/node_modules/rxjs/dist/cjs/internal/operators/connect.js.map deleted file mode 100644 index 1674c4c..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/connect.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"connect.js","sourceRoot":"","sources":["../../../../src/internal/operators/connect.ts"],"names":[],"mappings":";;;AAEA,sCAAqC;AACrC,qDAAoD;AACpD,qCAAuC;AACvC,mEAAkE;AAgBlE,IAAM,cAAc,GAA2B;IAC7C,SAAS,EAAE,cAAM,OAAA,IAAI,iBAAO,EAAW,EAAtB,CAAsB;CACxC,CAAC;AA2EF,SAAgB,OAAO,CACrB,QAAsC,EACtC,MAAyC;IAAzC,uBAAA,EAAA,uBAAyC;IAEjC,IAAA,SAAS,GAAK,MAAM,UAAX,CAAY;IAC7B,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAM,OAAO,GAAG,SAAS,EAAE,CAAC;QAC5B,qBAAS,CAAC,QAAQ,CAAC,mCAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QACrE,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC;AAVD,0BAUC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/count.js b/node_modules/rxjs/dist/cjs/internal/operators/count.js deleted file mode 100644 index 9ba151e..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/count.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.count = void 0; -var reduce_1 = require("./reduce"); -function count(predicate) { - return reduce_1.reduce(function (total, value, i) { return (!predicate || predicate(value, i) ? total + 1 : total); }, 0); -} -exports.count = count; -//# sourceMappingURL=count.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/count.js.map b/node_modules/rxjs/dist/cjs/internal/operators/count.js.map deleted file mode 100644 index 6a38e90..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/count.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"count.js","sourceRoot":"","sources":["../../../../src/internal/operators/count.ts"],"names":[],"mappings":";;;AACA,mCAAkC;AAyDlC,SAAgB,KAAK,CAAI,SAAgD;IACvE,OAAO,eAAM,CAAC,UAAC,KAAK,EAAE,KAAK,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,SAAS,IAAI,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAvD,CAAuD,EAAE,CAAC,CAAC,CAAC;AACjG,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/debounce.js b/node_modules/rxjs/dist/cjs/internal/operators/debounce.js deleted file mode 100644 index bfc6aed..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/debounce.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.debounce = void 0; -var lift_1 = require("../util/lift"); -var noop_1 = require("../util/noop"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var innerFrom_1 = require("../observable/innerFrom"); -function debounce(durationSelector) { - return lift_1.operate(function (source, subscriber) { - var hasValue = false; - var lastValue = null; - var durationSubscriber = null; - var emit = function () { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); - durationSubscriber = null; - if (hasValue) { - hasValue = false; - var value = lastValue; - lastValue = null; - subscriber.next(value); - } - }; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); - hasValue = true; - lastValue = value; - durationSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, emit, noop_1.noop); - innerFrom_1.innerFrom(durationSelector(value)).subscribe(durationSubscriber); - }, function () { - emit(); - subscriber.complete(); - }, undefined, function () { - lastValue = durationSubscriber = null; - })); - }); -} -exports.debounce = debounce; -//# sourceMappingURL=debounce.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/debounce.js.map b/node_modules/rxjs/dist/cjs/internal/operators/debounce.js.map deleted file mode 100644 index db85e16..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/debounce.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"debounce.js","sourceRoot":"","sources":["../../../../src/internal/operators/debounce.ts"],"names":[],"mappings":";;;AAEA,qCAAuC;AACvC,qCAAoC;AACpC,2DAAgE;AAChE,qDAAoD;AA4DpD,SAAgB,QAAQ,CAAI,gBAAoD;IAC9E,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,SAAS,GAAa,IAAI,CAAC;QAE/B,IAAI,kBAAkB,GAA2B,IAAI,CAAC;QAEtD,IAAM,IAAI,GAAG;YAIX,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,WAAW,EAAE,CAAC;YAClC,kBAAkB,GAAG,IAAI,CAAC;YAC1B,IAAI,QAAQ,EAAE;gBAEZ,QAAQ,GAAG,KAAK,CAAC;gBACjB,IAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAQ;YAIP,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,WAAW,EAAE,CAAC;YAClC,QAAQ,GAAG,IAAI,CAAC;YAChB,SAAS,GAAG,KAAK,CAAC;YAGlB,kBAAkB,GAAG,6CAAwB,CAAC,UAAU,EAAE,IAAI,EAAE,WAAI,CAAC,CAAC;YAEtE,qBAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;QACnE,CAAC,EACD;YAGE,IAAI,EAAE,CAAC;YACP,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EAED,SAAS,EACT;YAEE,SAAS,GAAG,kBAAkB,GAAG,IAAI,CAAC;QACxC,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AArDD,4BAqDC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js b/node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js deleted file mode 100644 index 8362c93..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.debounceTime = void 0; -var async_1 = require("../scheduler/async"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function debounceTime(dueTime, scheduler) { - if (scheduler === void 0) { scheduler = async_1.asyncScheduler; } - return lift_1.operate(function (source, subscriber) { - var activeTask = null; - var lastValue = null; - var lastTime = null; - var emit = function () { - if (activeTask) { - activeTask.unsubscribe(); - activeTask = null; - var value = lastValue; - lastValue = null; - subscriber.next(value); - } - }; - function emitWhenIdle() { - var targetTime = lastTime + dueTime; - var now = scheduler.now(); - if (now < targetTime) { - activeTask = this.schedule(undefined, targetTime - now); - subscriber.add(activeTask); - return; - } - emit(); - } - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - lastValue = value; - lastTime = scheduler.now(); - if (!activeTask) { - activeTask = scheduler.schedule(emitWhenIdle, dueTime); - subscriber.add(activeTask); - } - }, function () { - emit(); - subscriber.complete(); - }, undefined, function () { - lastValue = activeTask = null; - })); - }); -} -exports.debounceTime = debounceTime; -//# sourceMappingURL=debounceTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js.map b/node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js.map deleted file mode 100644 index 8a9e7f0..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/debounceTime.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"debounceTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/debounceTime.ts"],"names":[],"mappings":";;;AAAA,4CAAoD;AAGpD,qCAAuC;AACvC,2DAAgE;AA0DhE,SAAgB,YAAY,CAAI,OAAe,EAAE,SAAyC;IAAzC,0BAAA,EAAA,YAA2B,sBAAc;IACxF,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,UAAU,GAAwB,IAAI,CAAC;QAC3C,IAAI,SAAS,GAAa,IAAI,CAAC;QAC/B,IAAI,QAAQ,GAAkB,IAAI,CAAC;QAEnC,IAAM,IAAI,GAAG;YACX,IAAI,UAAU,EAAE;gBAEd,UAAU,CAAC,WAAW,EAAE,CAAC;gBACzB,UAAU,GAAG,IAAI,CAAC;gBAClB,IAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,CAAC;QACF,SAAS,YAAY;YAInB,IAAM,UAAU,GAAG,QAAS,GAAG,OAAO,CAAC;YACvC,IAAM,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;YAC5B,IAAI,GAAG,GAAG,UAAU,EAAE;gBAEpB,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,UAAU,GAAG,GAAG,CAAC,CAAC;gBACxD,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;gBAC3B,OAAO;aACR;YAED,IAAI,EAAE,CAAC;QACT,CAAC;QAED,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAQ;YACP,SAAS,GAAG,KAAK,CAAC;YAClB,QAAQ,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;YAG3B,IAAI,CAAC,UAAU,EAAE;gBACf,UAAU,GAAG,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;gBACvD,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;aAC5B;QACH,CAAC,EACD;YAGE,IAAI,EAAE,CAAC;YACP,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EAED,SAAS,EACT;YAEE,SAAS,GAAG,UAAU,GAAG,IAAI,CAAC;QAChC,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA5DD,oCA4DC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js b/node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js deleted file mode 100644 index f554cea..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.defaultIfEmpty = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function defaultIfEmpty(defaultValue) { - return lift_1.operate(function (source, subscriber) { - var hasValue = false; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - hasValue = true; - subscriber.next(value); - }, function () { - if (!hasValue) { - subscriber.next(defaultValue); - } - subscriber.complete(); - })); - }); -} -exports.defaultIfEmpty = defaultIfEmpty; -//# sourceMappingURL=defaultIfEmpty.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js.map b/node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js.map deleted file mode 100644 index 61ae27d..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/defaultIfEmpty.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defaultIfEmpty.js","sourceRoot":"","sources":["../../../../src/internal/operators/defaultIfEmpty.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,2DAAgE;AAqChE,SAAgB,cAAc,CAAO,YAAe;IAClD,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,QAAQ,GAAG,IAAI,CAAC;YAChB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC,EACD;YACE,IAAI,CAAC,QAAQ,EAAE;gBACb,UAAU,CAAC,IAAI,CAAC,YAAa,CAAC,CAAC;aAChC;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAnBD,wCAmBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/delay.js b/node_modules/rxjs/dist/cjs/internal/operators/delay.js deleted file mode 100644 index 47097f7..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/delay.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.delay = void 0; -var async_1 = require("../scheduler/async"); -var delayWhen_1 = require("./delayWhen"); -var timer_1 = require("../observable/timer"); -function delay(due, scheduler) { - if (scheduler === void 0) { scheduler = async_1.asyncScheduler; } - var duration = timer_1.timer(due, scheduler); - return delayWhen_1.delayWhen(function () { return duration; }); -} -exports.delay = delay; -//# sourceMappingURL=delay.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/delay.js.map b/node_modules/rxjs/dist/cjs/internal/operators/delay.js.map deleted file mode 100644 index 0e026cc..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/delay.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"delay.js","sourceRoot":"","sources":["../../../../src/internal/operators/delay.ts"],"names":[],"mappings":";;;AAAA,4CAAoD;AAEpD,yCAAwC;AACxC,6CAA4C;AA0D5C,SAAgB,KAAK,CAAI,GAAkB,EAAE,SAAyC;IAAzC,0BAAA,EAAA,YAA2B,sBAAc;IACpF,IAAM,QAAQ,GAAG,aAAK,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IACvC,OAAO,qBAAS,CAAC,cAAM,OAAA,QAAQ,EAAR,CAAQ,CAAC,CAAC;AACnC,CAAC;AAHD,sBAGC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/delayWhen.js b/node_modules/rxjs/dist/cjs/internal/operators/delayWhen.js deleted file mode 100644 index 265b0fb..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/delayWhen.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.delayWhen = void 0; -var concat_1 = require("../observable/concat"); -var take_1 = require("./take"); -var ignoreElements_1 = require("./ignoreElements"); -var mapTo_1 = require("./mapTo"); -var mergeMap_1 = require("./mergeMap"); -var innerFrom_1 = require("../observable/innerFrom"); -function delayWhen(delayDurationSelector, subscriptionDelay) { - if (subscriptionDelay) { - return function (source) { - return concat_1.concat(subscriptionDelay.pipe(take_1.take(1), ignoreElements_1.ignoreElements()), source.pipe(delayWhen(delayDurationSelector))); - }; - } - return mergeMap_1.mergeMap(function (value, index) { return innerFrom_1.innerFrom(delayDurationSelector(value, index)).pipe(take_1.take(1), mapTo_1.mapTo(value)); }); -} -exports.delayWhen = delayWhen; -//# sourceMappingURL=delayWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/delayWhen.js.map b/node_modules/rxjs/dist/cjs/internal/operators/delayWhen.js.map deleted file mode 100644 index 1c7ac15..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/delayWhen.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"delayWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/delayWhen.ts"],"names":[],"mappings":";;;AAEA,+CAA8C;AAC9C,+BAA8B;AAC9B,mDAAkD;AAClD,iCAAgC;AAChC,uCAAsC;AACtC,qDAAoD;AAoFpD,SAAgB,SAAS,CACvB,qBAAwE,EACxE,iBAAmC;IAEnC,IAAI,iBAAiB,EAAE;QAErB,OAAO,UAAC,MAAqB;YAC3B,OAAA,eAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,WAAI,CAAC,CAAC,CAAC,EAAE,+BAAc,EAAE,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC,CAAC;QAAxG,CAAwG,CAAC;KAC5G;IAED,OAAO,mBAAQ,CAAC,UAAC,KAAK,EAAE,KAAK,IAAK,OAAA,qBAAS,CAAC,qBAAqB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,WAAI,CAAC,CAAC,CAAC,EAAE,aAAK,CAAC,KAAK,CAAC,CAAC,EAA1E,CAA0E,CAAC,CAAC;AAChH,CAAC;AAXD,8BAWC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js b/node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js deleted file mode 100644 index 511b755..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.dematerialize = void 0; -var Notification_1 = require("../Notification"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function dematerialize() { - return lift_1.operate(function (source, subscriber) { - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (notification) { return Notification_1.observeNotification(notification, subscriber); })); - }); -} -exports.dematerialize = dematerialize; -//# sourceMappingURL=dematerialize.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js.map b/node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js.map deleted file mode 100644 index e4f37c2..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/dematerialize.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dematerialize.js","sourceRoot":"","sources":["../../../../src/internal/operators/dematerialize.ts"],"names":[],"mappings":";;;AAAA,gDAAsD;AAEtD,qCAAuC;AACvC,2DAAgE;AAkDhE,SAAgB,aAAa;IAC3B,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,MAAM,CAAC,SAAS,CAAC,6CAAwB,CAAC,UAAU,EAAE,UAAC,YAAY,IAAK,OAAA,kCAAmB,CAAC,YAAY,EAAE,UAAU,CAAC,EAA7C,CAA6C,CAAC,CAAC,CAAC;IAC1H,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,sCAIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/distinct.js b/node_modules/rxjs/dist/cjs/internal/operators/distinct.js deleted file mode 100644 index fc733c1..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/distinct.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.distinct = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var noop_1 = require("../util/noop"); -var innerFrom_1 = require("../observable/innerFrom"); -function distinct(keySelector, flushes) { - return lift_1.operate(function (source, subscriber) { - var distinctKeys = new Set(); - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - var key = keySelector ? keySelector(value) : value; - if (!distinctKeys.has(key)) { - distinctKeys.add(key); - subscriber.next(value); - } - })); - flushes && innerFrom_1.innerFrom(flushes).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { return distinctKeys.clear(); }, noop_1.noop)); - }); -} -exports.distinct = distinct; -//# sourceMappingURL=distinct.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/distinct.js.map b/node_modules/rxjs/dist/cjs/internal/operators/distinct.js.map deleted file mode 100644 index 36026a8..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/distinct.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"distinct.js","sourceRoot":"","sources":["../../../../src/internal/operators/distinct.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,2DAAgE;AAChE,qCAAoC;AACpC,qDAAoD;AA2DpD,SAAgB,QAAQ,CAAO,WAA6B,EAAE,OAA8B;IAC1F,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAM,YAAY,GAAG,IAAI,GAAG,EAAE,CAAC;QAC/B,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,IAAM,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;YACrD,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;gBAC1B,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBACtB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,CAAC,CACH,CAAC;QAEF,OAAO,IAAI,qBAAS,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,6CAAwB,CAAC,UAAU,EAAE,cAAM,OAAA,YAAY,CAAC,KAAK,EAAE,EAApB,CAAoB,EAAE,WAAI,CAAC,CAAC,CAAC;IAClH,CAAC,CAAC,CAAC;AACL,CAAC;AAfD,4BAeC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js b/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js deleted file mode 100644 index f5555d9..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.distinctUntilChanged = void 0; -var identity_1 = require("../util/identity"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function distinctUntilChanged(comparator, keySelector) { - if (keySelector === void 0) { keySelector = identity_1.identity; } - comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare; - return lift_1.operate(function (source, subscriber) { - var previousKey; - var first = true; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - var currentKey = keySelector(value); - if (first || !comparator(previousKey, currentKey)) { - first = false; - previousKey = currentKey; - subscriber.next(value); - } - })); - }); -} -exports.distinctUntilChanged = distinctUntilChanged; -function defaultCompare(a, b) { - return a === b; -} -//# sourceMappingURL=distinctUntilChanged.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js.map b/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js.map deleted file mode 100644 index abd11b3..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilChanged.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"distinctUntilChanged.js","sourceRoot":"","sources":["../../../../src/internal/operators/distinctUntilChanged.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAC5C,qCAAuC;AACvC,2DAAgE;AAuIhE,SAAgB,oBAAoB,CAClC,UAAiD,EACjD,WAA0D;IAA1D,4BAAA,EAAA,cAA+B,mBAA2B;IAK1D,UAAU,GAAG,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,cAAc,CAAC;IAE1C,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAGhC,IAAI,WAAc,CAAC;QAEnB,IAAI,KAAK,GAAG,IAAI,CAAC;QAEjB,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YAEzC,IAAM,UAAU,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;YAKtC,IAAI,KAAK,IAAI,CAAC,UAAW,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE;gBAMlD,KAAK,GAAG,KAAK,CAAC;gBACd,WAAW,GAAG,UAAU,CAAC;gBAGzB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAvCD,oDAuCC;AAED,SAAS,cAAc,CAAC,CAAM,EAAE,CAAM;IACpC,OAAO,CAAC,KAAK,CAAC,CAAC;AACjB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilKeyChanged.js b/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilKeyChanged.js deleted file mode 100644 index 9f9a384..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilKeyChanged.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.distinctUntilKeyChanged = void 0; -var distinctUntilChanged_1 = require("./distinctUntilChanged"); -function distinctUntilKeyChanged(key, compare) { - return distinctUntilChanged_1.distinctUntilChanged(function (x, y) { return (compare ? compare(x[key], y[key]) : x[key] === y[key]); }); -} -exports.distinctUntilKeyChanged = distinctUntilKeyChanged; -//# sourceMappingURL=distinctUntilKeyChanged.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilKeyChanged.js.map b/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilKeyChanged.js.map deleted file mode 100644 index 1618f80..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/distinctUntilKeyChanged.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"distinctUntilKeyChanged.js","sourceRoot":"","sources":["../../../../src/internal/operators/distinctUntilKeyChanged.ts"],"names":[],"mappings":";;;AAAA,+DAA8D;AAqE9D,SAAgB,uBAAuB,CACrC,GAAM,EACN,OAAuC;IAEvC,OAAO,2CAAoB,CAAC,UAAC,CAAI,EAAE,CAAI,IAAK,OAAA,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,EAAvD,CAAuD,CAAC,CAAC;AACvG,CAAC;AALD,0DAKC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/elementAt.js b/node_modules/rxjs/dist/cjs/internal/operators/elementAt.js deleted file mode 100644 index f057736..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/elementAt.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.elementAt = void 0; -var ArgumentOutOfRangeError_1 = require("../util/ArgumentOutOfRangeError"); -var filter_1 = require("./filter"); -var throwIfEmpty_1 = require("./throwIfEmpty"); -var defaultIfEmpty_1 = require("./defaultIfEmpty"); -var take_1 = require("./take"); -function elementAt(index, defaultValue) { - if (index < 0) { - throw new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError(); - } - var hasDefaultValue = arguments.length >= 2; - return function (source) { - return source.pipe(filter_1.filter(function (v, i) { return i === index; }), take_1.take(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function () { return new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError(); })); - }; -} -exports.elementAt = elementAt; -//# sourceMappingURL=elementAt.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/elementAt.js.map b/node_modules/rxjs/dist/cjs/internal/operators/elementAt.js.map deleted file mode 100644 index 246c83f..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/elementAt.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"elementAt.js","sourceRoot":"","sources":["../../../../src/internal/operators/elementAt.ts"],"names":[],"mappings":";;;AAAA,2EAA0E;AAG1E,mCAAkC;AAClC,+CAA8C;AAC9C,mDAAkD;AAClD,+BAA8B;AAkD9B,SAAgB,SAAS,CAAW,KAAa,EAAE,YAAgB;IACjE,IAAI,KAAK,GAAG,CAAC,EAAE;QACb,MAAM,IAAI,iDAAuB,EAAE,CAAC;KACrC;IACD,IAAM,eAAe,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;IAC9C,OAAO,UAAC,MAAqB;QAC3B,OAAA,MAAM,CAAC,IAAI,CACT,eAAM,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,KAAK,KAAK,EAAX,CAAW,CAAC,EAC7B,WAAI,CAAC,CAAC,CAAC,EACP,eAAe,CAAC,CAAC,CAAC,+BAAc,CAAC,YAAa,CAAC,CAAC,CAAC,CAAC,2BAAY,CAAC,cAAM,OAAA,IAAI,iDAAuB,EAAE,EAA7B,CAA6B,CAAC,CACpG;IAJD,CAIC,CAAC;AACN,CAAC;AAXD,8BAWC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/endWith.js b/node_modules/rxjs/dist/cjs/internal/operators/endWith.js deleted file mode 100644 index fab323d..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/endWith.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.endWith = void 0; -var concat_1 = require("../observable/concat"); -var of_1 = require("../observable/of"); -function endWith() { - var values = []; - for (var _i = 0; _i < arguments.length; _i++) { - values[_i] = arguments[_i]; - } - return function (source) { return concat_1.concat(source, of_1.of.apply(void 0, __spreadArray([], __read(values)))); }; -} -exports.endWith = endWith; -//# sourceMappingURL=endWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/endWith.js.map b/node_modules/rxjs/dist/cjs/internal/operators/endWith.js.map deleted file mode 100644 index 05aa744..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/endWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"endWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/endWith.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAEA,+CAA8C;AAC9C,uCAAsC;AA8DtC,SAAgB,OAAO;IAAI,gBAAmC;SAAnC,UAAmC,EAAnC,qBAAmC,EAAnC,IAAmC;QAAnC,2BAAmC;;IAC5D,OAAO,UAAC,MAAqB,IAAK,OAAA,eAAM,CAAC,MAAM,EAAE,OAAE,wCAAI,MAAM,IAAmB,EAA9C,CAA8C,CAAC;AACnF,CAAC;AAFD,0BAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/every.js b/node_modules/rxjs/dist/cjs/internal/operators/every.js deleted file mode 100644 index 47e4014..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/every.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.every = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function every(predicate, thisArg) { - return lift_1.operate(function (source, subscriber) { - var index = 0; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - if (!predicate.call(thisArg, value, index++, source)) { - subscriber.next(false); - subscriber.complete(); - } - }, function () { - subscriber.next(true); - subscriber.complete(); - })); - }); -} -exports.every = every; -//# sourceMappingURL=every.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/every.js.map b/node_modules/rxjs/dist/cjs/internal/operators/every.js.map deleted file mode 100644 index 295cf17..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/every.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"every.js","sourceRoot":"","sources":["../../../../src/internal/operators/every.ts"],"names":[],"mappings":";;;AAEA,qCAAuC;AACvC,2DAAgE;AAwChE,SAAgB,KAAK,CACnB,SAAsE,EACtE,OAAa;IAEb,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,EAAE;gBACpD,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,EACD;YACE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAtBD,sBAsBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/exhaust.js b/node_modules/rxjs/dist/cjs/internal/operators/exhaust.js deleted file mode 100644 index 3a70412..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/exhaust.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.exhaust = void 0; -var exhaustAll_1 = require("./exhaustAll"); -exports.exhaust = exhaustAll_1.exhaustAll; -//# sourceMappingURL=exhaust.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/exhaust.js.map b/node_modules/rxjs/dist/cjs/internal/operators/exhaust.js.map deleted file mode 100644 index 0ae482d..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/exhaust.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exhaust.js","sourceRoot":"","sources":["../../../../src/internal/operators/exhaust.ts"],"names":[],"mappings":";;;AAAA,2CAA0C;AAK7B,QAAA,OAAO,GAAG,uBAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js b/node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js deleted file mode 100644 index 2e8955e..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.exhaustAll = void 0; -var exhaustMap_1 = require("./exhaustMap"); -var identity_1 = require("../util/identity"); -function exhaustAll() { - return exhaustMap_1.exhaustMap(identity_1.identity); -} -exports.exhaustAll = exhaustAll; -//# sourceMappingURL=exhaustAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js.map b/node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js.map deleted file mode 100644 index 1172eba..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/exhaustAll.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exhaustAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/exhaustAll.ts"],"names":[],"mappings":";;;AACA,2CAA0C;AAC1C,6CAA4C;AA8C5C,SAAgB,UAAU;IACxB,OAAO,uBAAU,CAAC,mBAAQ,CAAC,CAAC;AAC9B,CAAC;AAFD,gCAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js b/node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js deleted file mode 100644 index 1e1bafa..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.exhaustMap = void 0; -var map_1 = require("./map"); -var innerFrom_1 = require("../observable/innerFrom"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function exhaustMap(project, resultSelector) { - if (resultSelector) { - return function (source) { - return source.pipe(exhaustMap(function (a, i) { return innerFrom_1.innerFrom(project(a, i)).pipe(map_1.map(function (b, ii) { return resultSelector(a, b, i, ii); })); })); - }; - } - return lift_1.operate(function (source, subscriber) { - var index = 0; - var innerSub = null; - var isComplete = false; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (outerValue) { - if (!innerSub) { - innerSub = OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, function () { - innerSub = null; - isComplete && subscriber.complete(); - }); - innerFrom_1.innerFrom(project(outerValue, index++)).subscribe(innerSub); - } - }, function () { - isComplete = true; - !innerSub && subscriber.complete(); - })); - }); -} -exports.exhaustMap = exhaustMap; -//# sourceMappingURL=exhaustMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js.map b/node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js.map deleted file mode 100644 index 5992558..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/exhaustMap.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exhaustMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/exhaustMap.ts"],"names":[],"mappings":";;;AAGA,6BAA4B;AAC5B,qDAAoD;AACpD,qCAAuC;AACvC,2DAAgE;AA6DhE,SAAgB,UAAU,CACxB,OAAuC,EACvC,cAA6G;IAE7G,IAAI,cAAc,EAAE;QAElB,OAAO,UAAC,MAAqB;YAC3B,OAAA,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,qBAAS,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAG,CAAC,UAAC,CAAM,EAAE,EAAO,IAAK,OAAA,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAA3B,CAA2B,CAAC,CAAC,EAApF,CAAoF,CAAC,CAAC;QAAvH,CAAuH,CAAC;KAC3H;IACD,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,IAAI,QAAQ,GAAyB,IAAI,CAAC;QAC1C,IAAI,UAAU,GAAG,KAAK,CAAC;QACvB,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,UAAU;YACT,IAAI,CAAC,QAAQ,EAAE;gBACb,QAAQ,GAAG,6CAAwB,CAAC,UAAU,EAAE,SAAS,EAAE;oBACzD,QAAQ,GAAG,IAAI,CAAC;oBAChB,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;gBACtC,CAAC,CAAC,CAAC;gBACH,qBAAS,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;aAC7D;QACH,CAAC,EACD;YACE,UAAU,GAAG,IAAI,CAAC;YAClB,CAAC,QAAQ,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACrC,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAhCD,gCAgCC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/expand.js b/node_modules/rxjs/dist/cjs/internal/operators/expand.js deleted file mode 100644 index 74934ea..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/expand.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.expand = void 0; -var lift_1 = require("../util/lift"); -var mergeInternals_1 = require("./mergeInternals"); -function expand(project, concurrent, scheduler) { - if (concurrent === void 0) { concurrent = Infinity; } - concurrent = (concurrent || 0) < 1 ? Infinity : concurrent; - return lift_1.operate(function (source, subscriber) { - return mergeInternals_1.mergeInternals(source, subscriber, project, concurrent, undefined, true, scheduler); - }); -} -exports.expand = expand; -//# sourceMappingURL=expand.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/expand.js.map b/node_modules/rxjs/dist/cjs/internal/operators/expand.js.map deleted file mode 100644 index 0a453d8..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/expand.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"expand.js","sourceRoot":"","sources":["../../../../src/internal/operators/expand.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,mDAAkD;AAsElD,SAAgB,MAAM,CACpB,OAAuC,EACvC,UAAqB,EACrB,SAAyB;IADzB,2BAAA,EAAA,qBAAqB;IAGrB,UAAU,GAAG,CAAC,UAAU,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC;IAC3D,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,OAAA,+BAAc,CAEZ,MAAM,EACN,UAAU,EACV,OAAO,EACP,UAAU,EAGV,SAAS,EAGT,IAAI,EACJ,SAAS,CACV;IAbD,CAaC,CACF,CAAC;AACJ,CAAC;AAtBD,wBAsBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/filter.js b/node_modules/rxjs/dist/cjs/internal/operators/filter.js deleted file mode 100644 index ef8ae08..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/filter.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.filter = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function filter(predicate, thisArg) { - return lift_1.operate(function (source, subscriber) { - var index = 0; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return predicate.call(thisArg, value, index++) && subscriber.next(value); })); - }); -} -exports.filter = filter; -//# sourceMappingURL=filter.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/filter.js.map b/node_modules/rxjs/dist/cjs/internal/operators/filter.js.map deleted file mode 100644 index 418bd24..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/filter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"filter.js","sourceRoot":"","sources":["../../../../src/internal/operators/filter.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,2DAAgE;AA0DhE,SAAgB,MAAM,CAAI,SAA+C,EAAE,OAAa;IACtF,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,KAAK,GAAG,CAAC,CAAC;QAId,MAAM,CAAC,SAAS,CAId,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK,IAAK,OAAA,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAjE,CAAiE,CAAC,CACnH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAdD,wBAcC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/finalize.js b/node_modules/rxjs/dist/cjs/internal/operators/finalize.js deleted file mode 100644 index 3bee9b7..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/finalize.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.finalize = void 0; -var lift_1 = require("../util/lift"); -function finalize(callback) { - return lift_1.operate(function (source, subscriber) { - try { - source.subscribe(subscriber); - } - finally { - subscriber.add(callback); - } - }); -} -exports.finalize = finalize; -//# sourceMappingURL=finalize.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/finalize.js.map b/node_modules/rxjs/dist/cjs/internal/operators/finalize.js.map deleted file mode 100644 index ff7cc0a..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/finalize.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"finalize.js","sourceRoot":"","sources":["../../../../src/internal/operators/finalize.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AA+DvC,SAAgB,QAAQ,CAAI,QAAoB;IAC9C,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAGhC,IAAI;YACF,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;SAC9B;gBAAS;YACR,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;SAC1B;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAVD,4BAUC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/find.js b/node_modules/rxjs/dist/cjs/internal/operators/find.js deleted file mode 100644 index 46a4389..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/find.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createFind = exports.find = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function find(predicate, thisArg) { - return lift_1.operate(createFind(predicate, thisArg, 'value')); -} -exports.find = find; -function createFind(predicate, thisArg, emit) { - var findIndex = emit === 'index'; - return function (source, subscriber) { - var index = 0; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - var i = index++; - if (predicate.call(thisArg, value, i, source)) { - subscriber.next(findIndex ? i : value); - subscriber.complete(); - } - }, function () { - subscriber.next(findIndex ? -1 : undefined); - subscriber.complete(); - })); - }; -} -exports.createFind = createFind; -//# sourceMappingURL=find.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/find.js.map b/node_modules/rxjs/dist/cjs/internal/operators/find.js.map deleted file mode 100644 index 01cf36f..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/find.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"find.js","sourceRoot":"","sources":["../../../../src/internal/operators/find.ts"],"names":[],"mappings":";;;AAGA,qCAAuC;AACvC,2DAAgE;AA2DhE,SAAgB,IAAI,CAClB,SAAsE,EACtE,OAAa;IAEb,OAAO,cAAO,CAAC,UAAU,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAC1D,CAAC;AALD,oBAKC;AAED,SAAgB,UAAU,CACxB,SAAsE,EACtE,OAAY,EACZ,IAAuB;IAEvB,IAAM,SAAS,GAAG,IAAI,KAAK,OAAO,CAAC;IACnC,OAAO,UAAC,MAAqB,EAAE,UAA2B;QACxD,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,IAAM,CAAC,GAAG,KAAK,EAAE,CAAC;YAClB,IAAI,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE;gBAC7C,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;gBACvC,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,EACD;YACE,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;YAC5C,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAzBD,gCAyBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/findIndex.js b/node_modules/rxjs/dist/cjs/internal/operators/findIndex.js deleted file mode 100644 index 7422995..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/findIndex.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.findIndex = void 0; -var lift_1 = require("../util/lift"); -var find_1 = require("./find"); -function findIndex(predicate, thisArg) { - return lift_1.operate(find_1.createFind(predicate, thisArg, 'index')); -} -exports.findIndex = findIndex; -//# sourceMappingURL=findIndex.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/findIndex.js.map b/node_modules/rxjs/dist/cjs/internal/operators/findIndex.js.map deleted file mode 100644 index 2c5e2f0..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/findIndex.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"findIndex.js","sourceRoot":"","sources":["../../../../src/internal/operators/findIndex.ts"],"names":[],"mappings":";;;AAEA,qCAAuC;AACvC,+BAAoC;AAsDpC,SAAgB,SAAS,CACvB,SAAsE,EACtE,OAAa;IAEb,OAAO,cAAO,CAAC,iBAAU,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAC1D,CAAC;AALD,8BAKC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/first.js b/node_modules/rxjs/dist/cjs/internal/operators/first.js deleted file mode 100644 index 607da9f..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/first.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.first = void 0; -var EmptyError_1 = require("../util/EmptyError"); -var filter_1 = require("./filter"); -var take_1 = require("./take"); -var defaultIfEmpty_1 = require("./defaultIfEmpty"); -var throwIfEmpty_1 = require("./throwIfEmpty"); -var identity_1 = require("../util/identity"); -function first(predicate, defaultValue) { - var hasDefaultValue = arguments.length >= 2; - return function (source) { - return source.pipe(predicate ? filter_1.filter(function (v, i) { return predicate(v, i, source); }) : identity_1.identity, take_1.take(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function () { return new EmptyError_1.EmptyError(); })); - }; -} -exports.first = first; -//# sourceMappingURL=first.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/first.js.map b/node_modules/rxjs/dist/cjs/internal/operators/first.js.map deleted file mode 100644 index 2a96fe2..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/first.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"first.js","sourceRoot":"","sources":["../../../../src/internal/operators/first.ts"],"names":[],"mappings":";;;AACA,iDAAgD;AAEhD,mCAAkC;AAClC,+BAA8B;AAC9B,mDAAkD;AAClD,+CAA8C;AAC9C,6CAA4C;AA0E5C,SAAgB,KAAK,CACnB,SAAgF,EAChF,YAAgB;IAEhB,IAAM,eAAe,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;IAC9C,OAAO,UAAC,MAAqB;QAC3B,OAAA,MAAM,CAAC,IAAI,CACT,SAAS,CAAC,CAAC,CAAC,eAAM,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,EAAvB,CAAuB,CAAC,CAAC,CAAC,CAAC,mBAAQ,EAChE,WAAI,CAAC,CAAC,CAAC,EACP,eAAe,CAAC,CAAC,CAAC,+BAAc,CAAC,YAAa,CAAC,CAAC,CAAC,CAAC,2BAAY,CAAC,cAAM,OAAA,IAAI,uBAAU,EAAE,EAAhB,CAAgB,CAAC,CACvF;IAJD,CAIC,CAAC;AACN,CAAC;AAXD,sBAWC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/flatMap.js b/node_modules/rxjs/dist/cjs/internal/operators/flatMap.js deleted file mode 100644 index a7f0e81..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/flatMap.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.flatMap = void 0; -var mergeMap_1 = require("./mergeMap"); -exports.flatMap = mergeMap_1.mergeMap; -//# sourceMappingURL=flatMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/flatMap.js.map b/node_modules/rxjs/dist/cjs/internal/operators/flatMap.js.map deleted file mode 100644 index 2105491..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/flatMap.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"flatMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/flatMap.ts"],"names":[],"mappings":";;;AAAA,uCAAsC;AAKzB,QAAA,OAAO,GAAG,mBAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/groupBy.js b/node_modules/rxjs/dist/cjs/internal/operators/groupBy.js deleted file mode 100644 index 18a5bd5..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/groupBy.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.groupBy = void 0; -var Observable_1 = require("../Observable"); -var innerFrom_1 = require("../observable/innerFrom"); -var Subject_1 = require("../Subject"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function groupBy(keySelector, elementOrOptions, duration, connector) { - return lift_1.operate(function (source, subscriber) { - var element; - if (!elementOrOptions || typeof elementOrOptions === 'function') { - element = elementOrOptions; - } - else { - (duration = elementOrOptions.duration, element = elementOrOptions.element, connector = elementOrOptions.connector); - } - var groups = new Map(); - var notify = function (cb) { - groups.forEach(cb); - cb(subscriber); - }; - var handleError = function (err) { return notify(function (consumer) { return consumer.error(err); }); }; - var activeGroups = 0; - var teardownAttempted = false; - var groupBySourceSubscriber = new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) { - try { - var key_1 = keySelector(value); - var group_1 = groups.get(key_1); - if (!group_1) { - groups.set(key_1, (group_1 = connector ? connector() : new Subject_1.Subject())); - var grouped = createGroupedObservable(key_1, group_1); - subscriber.next(grouped); - if (duration) { - var durationSubscriber_1 = OperatorSubscriber_1.createOperatorSubscriber(group_1, function () { - group_1.complete(); - durationSubscriber_1 === null || durationSubscriber_1 === void 0 ? void 0 : durationSubscriber_1.unsubscribe(); - }, undefined, undefined, function () { return groups.delete(key_1); }); - groupBySourceSubscriber.add(innerFrom_1.innerFrom(duration(grouped)).subscribe(durationSubscriber_1)); - } - } - group_1.next(element ? element(value) : value); - } - catch (err) { - handleError(err); - } - }, function () { return notify(function (consumer) { return consumer.complete(); }); }, handleError, function () { return groups.clear(); }, function () { - teardownAttempted = true; - return activeGroups === 0; - }); - source.subscribe(groupBySourceSubscriber); - function createGroupedObservable(key, groupSubject) { - var result = new Observable_1.Observable(function (groupSubscriber) { - activeGroups++; - var innerSub = groupSubject.subscribe(groupSubscriber); - return function () { - innerSub.unsubscribe(); - --activeGroups === 0 && teardownAttempted && groupBySourceSubscriber.unsubscribe(); - }; - }); - result.key = key; - return result; - } - }); -} -exports.groupBy = groupBy; -//# sourceMappingURL=groupBy.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/groupBy.js.map b/node_modules/rxjs/dist/cjs/internal/operators/groupBy.js.map deleted file mode 100644 index eb92bd8..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/groupBy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"groupBy.js","sourceRoot":"","sources":["../../../../src/internal/operators/groupBy.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAC3C,qDAAoD;AACpD,sCAAqC;AAErC,qCAAuC;AACvC,2DAAoF;AAuIpF,SAAgB,OAAO,CACrB,WAA4B,EAC5B,gBAAgH,EAChH,QAAyE,EACzE,SAAkC;IAElC,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,OAAqC,CAAC;QAC1C,IAAI,CAAC,gBAAgB,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE;YAC/D,OAAO,GAAG,gBAAyC,CAAC;SACrD;aAAM;YACL,CAAG,QAAQ,GAAyB,gBAAgB,SAAzC,EAAE,OAAO,GAAgB,gBAAgB,QAAhC,EAAE,SAAS,GAAK,gBAAgB,UAArB,CAAsB,CAAC;SACvD;QAGD,IAAM,MAAM,GAAG,IAAI,GAAG,EAAuB,CAAC;QAG9C,IAAM,MAAM,GAAG,UAAC,EAAkC;YAChD,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YACnB,EAAE,CAAC,UAAU,CAAC,CAAC;QACjB,CAAC,CAAC;QAIF,IAAM,WAAW,GAAG,UAAC,GAAQ,IAAK,OAAA,MAAM,CAAC,UAAC,QAAQ,IAAK,OAAA,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,EAAnB,CAAmB,CAAC,EAAzC,CAAyC,CAAC;QAG5E,IAAI,YAAY,GAAG,CAAC,CAAC;QAGrB,IAAI,iBAAiB,GAAG,KAAK,CAAC;QAS9B,IAAM,uBAAuB,GAAG,IAAI,uCAAkB,CACpD,UAAU,EACV,UAAC,KAAQ;YAIP,IAAI;gBACF,IAAM,KAAG,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;gBAE/B,IAAI,OAAK,GAAG,MAAM,CAAC,GAAG,CAAC,KAAG,CAAC,CAAC;gBAC5B,IAAI,CAAC,OAAK,EAAE;oBAEV,MAAM,CAAC,GAAG,CAAC,KAAG,EAAE,CAAC,OAAK,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,IAAI,iBAAO,EAAO,CAAC,CAAC,CAAC;oBAKxE,IAAM,OAAO,GAAG,uBAAuB,CAAC,KAAG,EAAE,OAAK,CAAC,CAAC;oBACpD,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBAEzB,IAAI,QAAQ,EAAE;wBACZ,IAAM,oBAAkB,GAAG,6CAAwB,CAMjD,OAAY,EACZ;4BAGE,OAAM,CAAC,QAAQ,EAAE,CAAC;4BAClB,oBAAkB,aAAlB,oBAAkB,uBAAlB,oBAAkB,CAAE,WAAW,EAAE,CAAC;wBACpC,CAAC,EAED,SAAS,EAGT,SAAS,EAET,cAAM,OAAA,MAAM,CAAC,MAAM,CAAC,KAAG,CAAC,EAAlB,CAAkB,CACzB,CAAC;wBAGF,uBAAuB,CAAC,GAAG,CAAC,qBAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,oBAAkB,CAAC,CAAC,CAAC;qBACzF;iBACF;gBAGD,OAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;aAC9C;YAAC,OAAO,GAAG,EAAE;gBACZ,WAAW,CAAC,GAAG,CAAC,CAAC;aAClB;QACH,CAAC,EAED,cAAM,OAAA,MAAM,CAAC,UAAC,QAAQ,IAAK,OAAA,QAAQ,CAAC,QAAQ,EAAE,EAAnB,CAAmB,CAAC,EAAzC,CAAyC,EAE/C,WAAW,EAKX,cAAM,OAAA,MAAM,CAAC,KAAK,EAAE,EAAd,CAAc,EACpB;YACE,iBAAiB,GAAG,IAAI,CAAC;YAIzB,OAAO,YAAY,KAAK,CAAC,CAAC;QAC5B,CAAC,CACF,CAAC;QAGF,MAAM,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAC;QAO1C,SAAS,uBAAuB,CAAC,GAAM,EAAE,YAA8B;YACrE,IAAM,MAAM,GAAQ,IAAI,uBAAU,CAAI,UAAC,eAAe;gBACpD,YAAY,EAAE,CAAC;gBACf,IAAM,QAAQ,GAAG,YAAY,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;gBACzD,OAAO;oBACL,QAAQ,CAAC,WAAW,EAAE,CAAC;oBAIvB,EAAE,YAAY,KAAK,CAAC,IAAI,iBAAiB,IAAI,uBAAuB,CAAC,WAAW,EAAE,CAAC;gBACrF,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC;YACH,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;YACjB,OAAO,MAAM,CAAC;QAChB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAxID,0BAwIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js b/node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js deleted file mode 100644 index d33ce63..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ignoreElements = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var noop_1 = require("../util/noop"); -function ignoreElements() { - return lift_1.operate(function (source, subscriber) { - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, noop_1.noop)); - }); -} -exports.ignoreElements = ignoreElements; -//# sourceMappingURL=ignoreElements.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js.map b/node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js.map deleted file mode 100644 index d07aa4a..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/ignoreElements.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ignoreElements.js","sourceRoot":"","sources":["../../../../src/internal/operators/ignoreElements.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,2DAAgE;AAChE,qCAAoC;AAqCpC,SAAgB,cAAc;IAC5B,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,MAAM,CAAC,SAAS,CAAC,6CAAwB,CAAC,UAAU,EAAE,WAAI,CAAC,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,wCAIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js b/node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js deleted file mode 100644 index 1b74a24..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isEmpty = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function isEmpty() { - return lift_1.operate(function (source, subscriber) { - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { - subscriber.next(false); - subscriber.complete(); - }, function () { - subscriber.next(true); - subscriber.complete(); - })); - }); -} -exports.isEmpty = isEmpty; -//# sourceMappingURL=isEmpty.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js.map b/node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js.map deleted file mode 100644 index ad98783..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/isEmpty.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isEmpty.js","sourceRoot":"","sources":["../../../../src/internal/operators/isEmpty.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,2DAAgE;AA+DhE,SAAgB,OAAO;IACrB,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV;YACE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACvB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD;YACE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAhBD,0BAgBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/joinAllInternals.js b/node_modules/rxjs/dist/cjs/internal/operators/joinAllInternals.js deleted file mode 100644 index 9eae80f..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/joinAllInternals.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.joinAllInternals = void 0; -var identity_1 = require("../util/identity"); -var mapOneOrManyArgs_1 = require("../util/mapOneOrManyArgs"); -var pipe_1 = require("../util/pipe"); -var mergeMap_1 = require("./mergeMap"); -var toArray_1 = require("./toArray"); -function joinAllInternals(joinFn, project) { - return pipe_1.pipe(toArray_1.toArray(), mergeMap_1.mergeMap(function (sources) { return joinFn(sources); }), project ? mapOneOrManyArgs_1.mapOneOrManyArgs(project) : identity_1.identity); -} -exports.joinAllInternals = joinAllInternals; -//# sourceMappingURL=joinAllInternals.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/joinAllInternals.js.map b/node_modules/rxjs/dist/cjs/internal/operators/joinAllInternals.js.map deleted file mode 100644 index 3c3601a..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/joinAllInternals.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"joinAllInternals.js","sourceRoot":"","sources":["../../../../src/internal/operators/joinAllInternals.ts"],"names":[],"mappings":";;;AAEA,6CAA4C;AAC5C,6DAA4D;AAC5D,qCAAoC;AACpC,uCAAsC;AACtC,qCAAoC;AAYpC,SAAgB,gBAAgB,CAAO,MAAwD,EAAE,OAA+B;IAC9H,OAAO,WAAI,CAGT,iBAAO,EAAgE,EAEvE,mBAAQ,CAAC,UAAC,OAAO,IAAK,OAAA,MAAM,CAAC,OAAO,CAAC,EAAf,CAAe,CAAC,EAEtC,OAAO,CAAC,CAAC,CAAC,mCAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAE,mBAAgB,CACxD,CAAC;AACJ,CAAC;AAVD,4CAUC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/last.js b/node_modules/rxjs/dist/cjs/internal/operators/last.js deleted file mode 100644 index 99a43b2..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/last.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.last = void 0; -var EmptyError_1 = require("../util/EmptyError"); -var filter_1 = require("./filter"); -var takeLast_1 = require("./takeLast"); -var throwIfEmpty_1 = require("./throwIfEmpty"); -var defaultIfEmpty_1 = require("./defaultIfEmpty"); -var identity_1 = require("../util/identity"); -function last(predicate, defaultValue) { - var hasDefaultValue = arguments.length >= 2; - return function (source) { - return source.pipe(predicate ? filter_1.filter(function (v, i) { return predicate(v, i, source); }) : identity_1.identity, takeLast_1.takeLast(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function () { return new EmptyError_1.EmptyError(); })); - }; -} -exports.last = last; -//# sourceMappingURL=last.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/last.js.map b/node_modules/rxjs/dist/cjs/internal/operators/last.js.map deleted file mode 100644 index 458c513..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/last.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"last.js","sourceRoot":"","sources":["../../../../src/internal/operators/last.ts"],"names":[],"mappings":";;;AACA,iDAAgD;AAEhD,mCAAkC;AAClC,uCAAsC;AACtC,+CAA8C;AAC9C,mDAAkD;AAClD,6CAA4C;AAwE5C,SAAgB,IAAI,CAClB,SAAgF,EAChF,YAAgB;IAEhB,IAAM,eAAe,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;IAC9C,OAAO,UAAC,MAAqB;QAC3B,OAAA,MAAM,CAAC,IAAI,CACT,SAAS,CAAC,CAAC,CAAC,eAAM,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,EAAvB,CAAuB,CAAC,CAAC,CAAC,CAAC,mBAAQ,EAChE,mBAAQ,CAAC,CAAC,CAAC,EACX,eAAe,CAAC,CAAC,CAAC,+BAAc,CAAC,YAAa,CAAC,CAAC,CAAC,CAAC,2BAAY,CAAC,cAAM,OAAA,IAAI,uBAAU,EAAE,EAAhB,CAAgB,CAAC,CACvF;IAJD,CAIC,CAAC;AACN,CAAC;AAXD,oBAWC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/map.js b/node_modules/rxjs/dist/cjs/internal/operators/map.js deleted file mode 100644 index 67a9909..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/map.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.map = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function map(project, thisArg) { - return lift_1.operate(function (source, subscriber) { - var index = 0; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - subscriber.next(project.call(thisArg, value, index++)); - })); - }); -} -exports.map = map; -//# sourceMappingURL=map.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/map.js.map b/node_modules/rxjs/dist/cjs/internal/operators/map.js.map deleted file mode 100644 index 10ca1a3..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/map.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"map.js","sourceRoot":"","sources":["../../../../src/internal/operators/map.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,2DAAgE;AA4ChE,SAAgB,GAAG,CAAO,OAAuC,EAAE,OAAa;IAC9E,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,KAAK,GAAG,CAAC,CAAC;QAGd,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAQ;YAG5C,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QACzD,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAdD,kBAcC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mapTo.js b/node_modules/rxjs/dist/cjs/internal/operators/mapTo.js deleted file mode 100644 index 6f59967..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/mapTo.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.mapTo = void 0; -var map_1 = require("./map"); -function mapTo(value) { - return map_1.map(function () { return value; }); -} -exports.mapTo = mapTo; -//# sourceMappingURL=mapTo.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mapTo.js.map b/node_modules/rxjs/dist/cjs/internal/operators/mapTo.js.map deleted file mode 100644 index c3e2ee8..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/mapTo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/mapTo.ts"],"names":[],"mappings":";;;AACA,6BAA4B;AA4C5B,SAAgB,KAAK,CAAI,KAAQ;IAC/B,OAAO,SAAG,CAAC,cAAM,OAAA,KAAK,EAAL,CAAK,CAAC,CAAC;AAC1B,CAAC;AAFD,sBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/materialize.js b/node_modules/rxjs/dist/cjs/internal/operators/materialize.js deleted file mode 100644 index 0ec3155..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/materialize.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.materialize = void 0; -var Notification_1 = require("../Notification"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function materialize() { - return lift_1.operate(function (source, subscriber) { - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - subscriber.next(Notification_1.Notification.createNext(value)); - }, function () { - subscriber.next(Notification_1.Notification.createComplete()); - subscriber.complete(); - }, function (err) { - subscriber.next(Notification_1.Notification.createError(err)); - subscriber.complete(); - })); - }); -} -exports.materialize = materialize; -//# sourceMappingURL=materialize.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/materialize.js.map b/node_modules/rxjs/dist/cjs/internal/operators/materialize.js.map deleted file mode 100644 index 7332bf8..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/materialize.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"materialize.js","sourceRoot":"","sources":["../../../../src/internal/operators/materialize.ts"],"names":[],"mappings":";;;AAAA,gDAA+C;AAE/C,qCAAuC;AACvC,2DAAgE;AAkDhE,SAAgB,WAAW;IACzB,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,UAAU,CAAC,IAAI,CAAC,2BAAY,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;QAClD,CAAC,EACD;YACE,UAAU,CAAC,IAAI,CAAC,2BAAY,CAAC,cAAc,EAAE,CAAC,CAAC;YAC/C,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,UAAC,GAAG;YACF,UAAU,CAAC,IAAI,CAAC,2BAAY,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;YAC/C,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAnBD,kCAmBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/max.js b/node_modules/rxjs/dist/cjs/internal/operators/max.js deleted file mode 100644 index 29ba768..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/max.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.max = void 0; -var reduce_1 = require("./reduce"); -var isFunction_1 = require("../util/isFunction"); -function max(comparer) { - return reduce_1.reduce(isFunction_1.isFunction(comparer) ? function (x, y) { return (comparer(x, y) > 0 ? x : y); } : function (x, y) { return (x > y ? x : y); }); -} -exports.max = max; -//# sourceMappingURL=max.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/max.js.map b/node_modules/rxjs/dist/cjs/internal/operators/max.js.map deleted file mode 100644 index 87bb1da..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/max.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"max.js","sourceRoot":"","sources":["../../../../src/internal/operators/max.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAElC,iDAAgD;AAiDhD,SAAgB,GAAG,CAAI,QAAiC;IACtD,OAAO,eAAM,CAAC,uBAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAA5B,CAA4B,CAAC,CAAC,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAf,CAAe,CAAC,CAAC;AAC3G,CAAC;AAFD,kBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/merge.js b/node_modules/rxjs/dist/cjs/internal/operators/merge.js deleted file mode 100644 index fe4702b..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/merge.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.merge = void 0; -var lift_1 = require("../util/lift"); -var mergeAll_1 = require("./mergeAll"); -var args_1 = require("../util/args"); -var from_1 = require("../observable/from"); -function merge() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = args_1.popScheduler(args); - var concurrent = args_1.popNumber(args, Infinity); - return lift_1.operate(function (source, subscriber) { - mergeAll_1.mergeAll(concurrent)(from_1.from(__spreadArray([source], __read(args)), scheduler)).subscribe(subscriber); - }); -} -exports.merge = merge; -//# sourceMappingURL=merge.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/merge.js.map b/node_modules/rxjs/dist/cjs/internal/operators/merge.js.map deleted file mode 100644 index fd483b2..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/merge.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../../../src/internal/operators/merge.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,qCAAuC;AACvC,uCAAsC;AACtC,qCAAuD;AACvD,2CAA0C;AAiB1C,SAAgB,KAAK;IAAI,cAAkB;SAAlB,UAAkB,EAAlB,qBAAkB,EAAlB,IAAkB;QAAlB,yBAAkB;;IACzC,IAAM,SAAS,GAAG,mBAAY,CAAC,IAAI,CAAC,CAAC;IACrC,IAAM,UAAU,GAAG,gBAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAE7C,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,mBAAQ,CAAC,UAAU,CAAC,CAAC,WAAI,gBAAE,MAAM,UAAM,IAA6B,IAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC3G,CAAC,CAAC,CAAC;AACL,CAAC;AAPD,sBAOC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mergeAll.js b/node_modules/rxjs/dist/cjs/internal/operators/mergeAll.js deleted file mode 100644 index e51138b..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/mergeAll.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.mergeAll = void 0; -var mergeMap_1 = require("./mergeMap"); -var identity_1 = require("../util/identity"); -function mergeAll(concurrent) { - if (concurrent === void 0) { concurrent = Infinity; } - return mergeMap_1.mergeMap(identity_1.identity, concurrent); -} -exports.mergeAll = mergeAll; -//# sourceMappingURL=mergeAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mergeAll.js.map b/node_modules/rxjs/dist/cjs/internal/operators/mergeAll.js.map deleted file mode 100644 index 5ad1660..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/mergeAll.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mergeAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeAll.ts"],"names":[],"mappings":";;;AAAA,uCAAsC;AACtC,6CAA4C;AA8D5C,SAAgB,QAAQ,CAAiC,UAA6B;IAA7B,2BAAA,EAAA,qBAA6B;IACpF,OAAO,mBAAQ,CAAC,mBAAQ,EAAE,UAAU,CAAC,CAAC;AACxC,CAAC;AAFD,4BAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js b/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js deleted file mode 100644 index 17a8a02..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js +++ /dev/null @@ -1,65 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.mergeInternals = void 0; -var innerFrom_1 = require("../observable/innerFrom"); -var executeSchedule_1 = require("../util/executeSchedule"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) { - var buffer = []; - var active = 0; - var index = 0; - var isComplete = false; - var checkComplete = function () { - if (isComplete && !buffer.length && !active) { - subscriber.complete(); - } - }; - var outerNext = function (value) { return (active < concurrent ? doInnerSub(value) : buffer.push(value)); }; - var doInnerSub = function (value) { - expand && subscriber.next(value); - active++; - var innerComplete = false; - innerFrom_1.innerFrom(project(value, index++)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (innerValue) { - onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue); - if (expand) { - outerNext(innerValue); - } - else { - subscriber.next(innerValue); - } - }, function () { - innerComplete = true; - }, undefined, function () { - if (innerComplete) { - try { - active--; - var _loop_1 = function () { - var bufferedValue = buffer.shift(); - if (innerSubScheduler) { - executeSchedule_1.executeSchedule(subscriber, innerSubScheduler, function () { return doInnerSub(bufferedValue); }); - } - else { - doInnerSub(bufferedValue); - } - }; - while (buffer.length && active < concurrent) { - _loop_1(); - } - checkComplete(); - } - catch (err) { - subscriber.error(err); - } - } - })); - }; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, outerNext, function () { - isComplete = true; - checkComplete(); - })); - return function () { - additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer(); - }; -} -exports.mergeInternals = mergeInternals; -//# sourceMappingURL=mergeInternals.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js.map b/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js.map deleted file mode 100644 index aa4e2ac..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mergeInternals.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeInternals.ts"],"names":[],"mappings":";;;AACA,qDAAoD;AAGpD,2DAA0D;AAC1D,2DAAgE;AAehE,SAAgB,cAAc,CAC5B,MAAqB,EACrB,UAAyB,EACzB,OAAwD,EACxD,UAAkB,EAClB,YAAsC,EACtC,MAAgB,EAChB,iBAAiC,EACjC,mBAAgC;IAGhC,IAAM,MAAM,GAAQ,EAAE,CAAC;IAEvB,IAAI,MAAM,GAAG,CAAC,CAAC;IAEf,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,IAAI,UAAU,GAAG,KAAK,CAAC;IAKvB,IAAM,aAAa,GAAG;QAIpB,IAAI,UAAU,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE;YAC3C,UAAU,CAAC,QAAQ,EAAE,CAAC;SACvB;IACH,CAAC,CAAC;IAGF,IAAM,SAAS,GAAG,UAAC,KAAQ,IAAK,OAAA,CAAC,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAA9D,CAA8D,CAAC;IAE/F,IAAM,UAAU,GAAG,UAAC,KAAQ;QAI1B,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,KAAY,CAAC,CAAC;QAIxC,MAAM,EAAE,CAAC;QAKT,IAAI,aAAa,GAAG,KAAK,CAAC;QAG1B,qBAAS,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAC1C,6CAAwB,CACtB,UAAU,EACV,UAAC,UAAU;YAGT,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAG,UAAU,CAAC,CAAC;YAE3B,IAAI,MAAM,EAAE;gBAGV,SAAS,CAAC,UAAiB,CAAC,CAAC;aAC9B;iBAAM;gBAEL,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;aAC7B;QACH,CAAC,EACD;YAGE,aAAa,GAAG,IAAI,CAAC;QACvB,CAAC,EAED,SAAS,EACT;YAIE,IAAI,aAAa,EAAE;gBAKjB,IAAI;oBAIF,MAAM,EAAE,CAAC;;wBAMP,IAAM,aAAa,GAAG,MAAM,CAAC,KAAK,EAAG,CAAC;wBAItC,IAAI,iBAAiB,EAAE;4BACrB,iCAAe,CAAC,UAAU,EAAE,iBAAiB,EAAE,cAAM,OAAA,UAAU,CAAC,aAAa,CAAC,EAAzB,CAAyB,CAAC,CAAC;yBACjF;6BAAM;4BACL,UAAU,CAAC,aAAa,CAAC,CAAC;yBAC3B;;oBATH,OAAO,MAAM,CAAC,MAAM,IAAI,MAAM,GAAG,UAAU;;qBAU1C;oBAED,aAAa,EAAE,CAAC;iBACjB;gBAAC,OAAO,GAAG,EAAE;oBACZ,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACvB;aACF;QACH,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC;IAGF,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,SAAS,EAAE;QAE9C,UAAU,GAAG,IAAI,CAAC;QAClB,aAAa,EAAE,CAAC;IAClB,CAAC,CAAC,CACH,CAAC;IAIF,OAAO;QACL,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,EAAI,CAAC;IAC1B,CAAC,CAAC;AACJ,CAAC;AAhID,wCAgIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mergeMap.js b/node_modules/rxjs/dist/cjs/internal/operators/mergeMap.js deleted file mode 100644 index c20cca6..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/mergeMap.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.mergeMap = void 0; -var map_1 = require("./map"); -var innerFrom_1 = require("../observable/innerFrom"); -var lift_1 = require("../util/lift"); -var mergeInternals_1 = require("./mergeInternals"); -var isFunction_1 = require("../util/isFunction"); -function mergeMap(project, resultSelector, concurrent) { - if (concurrent === void 0) { concurrent = Infinity; } - if (isFunction_1.isFunction(resultSelector)) { - return mergeMap(function (a, i) { return map_1.map(function (b, ii) { return resultSelector(a, b, i, ii); })(innerFrom_1.innerFrom(project(a, i))); }, concurrent); - } - else if (typeof resultSelector === 'number') { - concurrent = resultSelector; - } - return lift_1.operate(function (source, subscriber) { return mergeInternals_1.mergeInternals(source, subscriber, project, concurrent); }); -} -exports.mergeMap = mergeMap; -//# sourceMappingURL=mergeMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mergeMap.js.map b/node_modules/rxjs/dist/cjs/internal/operators/mergeMap.js.map deleted file mode 100644 index 1bf1316..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/mergeMap.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mergeMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeMap.ts"],"names":[],"mappings":";;;AACA,6BAA4B;AAC5B,qDAAoD;AACpD,qCAAuC;AACvC,mDAAkD;AAClD,iDAAgD;AA2EhD,SAAgB,QAAQ,CACtB,OAAuC,EACvC,cAAwH,EACxH,UAA6B;IAA7B,2BAAA,EAAA,qBAA6B;IAE7B,IAAI,uBAAU,CAAC,cAAc,CAAC,EAAE;QAE9B,OAAO,QAAQ,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,SAAG,CAAC,UAAC,CAAM,EAAE,EAAU,IAAK,OAAA,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAA3B,CAA2B,CAAC,CAAC,qBAAS,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAlF,CAAkF,EAAE,UAAU,CAAC,CAAC;KAC3H;SAAM,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE;QAC7C,UAAU,GAAG,cAAc,CAAC;KAC7B;IAED,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU,IAAK,OAAA,+BAAc,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,EAAvD,CAAuD,CAAC,CAAC;AAClG,CAAC;AAbD,4BAaC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mergeMapTo.js b/node_modules/rxjs/dist/cjs/internal/operators/mergeMapTo.js deleted file mode 100644 index 0ea80a5..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/mergeMapTo.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.mergeMapTo = void 0; -var mergeMap_1 = require("./mergeMap"); -var isFunction_1 = require("../util/isFunction"); -function mergeMapTo(innerObservable, resultSelector, concurrent) { - if (concurrent === void 0) { concurrent = Infinity; } - if (isFunction_1.isFunction(resultSelector)) { - return mergeMap_1.mergeMap(function () { return innerObservable; }, resultSelector, concurrent); - } - if (typeof resultSelector === 'number') { - concurrent = resultSelector; - } - return mergeMap_1.mergeMap(function () { return innerObservable; }, concurrent); -} -exports.mergeMapTo = mergeMapTo; -//# sourceMappingURL=mergeMapTo.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mergeMapTo.js.map b/node_modules/rxjs/dist/cjs/internal/operators/mergeMapTo.js.map deleted file mode 100644 index 4c12c29..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/mergeMapTo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mergeMapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeMapTo.ts"],"names":[],"mappings":";;;AACA,uCAAsC;AACtC,iDAAgD;AA2DhD,SAAgB,UAAU,CACxB,eAAkB,EAClB,cAAwH,EACxH,UAA6B;IAA7B,2BAAA,EAAA,qBAA6B;IAE7B,IAAI,uBAAU,CAAC,cAAc,CAAC,EAAE;QAC9B,OAAO,mBAAQ,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC;KACpE;IACD,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE;QACtC,UAAU,GAAG,cAAc,CAAC;KAC7B;IACD,OAAO,mBAAQ,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,EAAE,UAAU,CAAC,CAAC;AACrD,CAAC;AAZD,gCAYC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js b/node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js deleted file mode 100644 index 1fde167..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.mergeScan = void 0; -var lift_1 = require("../util/lift"); -var mergeInternals_1 = require("./mergeInternals"); -function mergeScan(accumulator, seed, concurrent) { - if (concurrent === void 0) { concurrent = Infinity; } - return lift_1.operate(function (source, subscriber) { - var state = seed; - return mergeInternals_1.mergeInternals(source, subscriber, function (value, index) { return accumulator(state, value, index); }, concurrent, function (value) { - state = value; - }, false, undefined, function () { return (state = null); }); - }); -} -exports.mergeScan = mergeScan; -//# sourceMappingURL=mergeScan.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js.map b/node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js.map deleted file mode 100644 index d7a1de2..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/mergeScan.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mergeScan.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeScan.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,mDAAkD;AAmElD,SAAgB,SAAS,CACvB,WAAoE,EACpE,IAAO,EACP,UAAqB;IAArB,2BAAA,EAAA,qBAAqB;IAErB,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,KAAK,GAAG,IAAI,CAAC;QAEjB,OAAO,+BAAc,CACnB,MAAM,EACN,UAAU,EACV,UAAC,KAAK,EAAE,KAAK,IAAK,OAAA,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAhC,CAAgC,EAClD,UAAU,EACV,UAAC,KAAK;YACJ,KAAK,GAAG,KAAK,CAAC;QAChB,CAAC,EACD,KAAK,EACL,SAAS,EACT,cAAM,OAAA,CAAC,KAAK,GAAG,IAAK,CAAC,EAAf,CAAe,CACtB,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAtBD,8BAsBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mergeWith.js b/node_modules/rxjs/dist/cjs/internal/operators/mergeWith.js deleted file mode 100644 index 0af9e43..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/mergeWith.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.mergeWith = void 0; -var merge_1 = require("./merge"); -function mergeWith() { - var otherSources = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherSources[_i] = arguments[_i]; - } - return merge_1.merge.apply(void 0, __spreadArray([], __read(otherSources))); -} -exports.mergeWith = mergeWith; -//# sourceMappingURL=mergeWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/mergeWith.js.map b/node_modules/rxjs/dist/cjs/internal/operators/mergeWith.js.map deleted file mode 100644 index 6729011..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/mergeWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mergeWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeWith.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,iCAAgC;AA2ChC,SAAgB,SAAS;IACvB,sBAA6C;SAA7C,UAA6C,EAA7C,qBAA6C,EAA7C,IAA6C;QAA7C,iCAA6C;;IAE7C,OAAO,aAAK,wCAAI,YAAY,IAAE;AAChC,CAAC;AAJD,8BAIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/min.js b/node_modules/rxjs/dist/cjs/internal/operators/min.js deleted file mode 100644 index 312ccc0..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/min.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.min = void 0; -var reduce_1 = require("./reduce"); -var isFunction_1 = require("../util/isFunction"); -function min(comparer) { - return reduce_1.reduce(isFunction_1.isFunction(comparer) ? function (x, y) { return (comparer(x, y) < 0 ? x : y); } : function (x, y) { return (x < y ? x : y); }); -} -exports.min = min; -//# sourceMappingURL=min.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/min.js.map b/node_modules/rxjs/dist/cjs/internal/operators/min.js.map deleted file mode 100644 index f26de2a..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"min.js","sourceRoot":"","sources":["../../../../src/internal/operators/min.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAElC,iDAAgD;AAiDhD,SAAgB,GAAG,CAAI,QAAiC;IACtD,OAAO,eAAM,CAAC,uBAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAA5B,CAA4B,CAAC,CAAC,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAf,CAAe,CAAC,CAAC;AAC3G,CAAC;AAFD,kBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/multicast.js b/node_modules/rxjs/dist/cjs/internal/operators/multicast.js deleted file mode 100644 index 7abaf0e..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/multicast.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.multicast = void 0; -var ConnectableObservable_1 = require("../observable/ConnectableObservable"); -var isFunction_1 = require("../util/isFunction"); -var connect_1 = require("./connect"); -function multicast(subjectOrSubjectFactory, selector) { - var subjectFactory = isFunction_1.isFunction(subjectOrSubjectFactory) ? subjectOrSubjectFactory : function () { return subjectOrSubjectFactory; }; - if (isFunction_1.isFunction(selector)) { - return connect_1.connect(selector, { - connector: subjectFactory, - }); - } - return function (source) { return new ConnectableObservable_1.ConnectableObservable(source, subjectFactory); }; -} -exports.multicast = multicast; -//# sourceMappingURL=multicast.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/multicast.js.map b/node_modules/rxjs/dist/cjs/internal/operators/multicast.js.map deleted file mode 100644 index e85a9ad..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/multicast.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"multicast.js","sourceRoot":"","sources":["../../../../src/internal/operators/multicast.ts"],"names":[],"mappings":";;;AAEA,6EAA4E;AAE5E,iDAAgD;AAChD,qCAAoC;AA4EpC,SAAgB,SAAS,CACvB,uBAAwD,EACxD,QAAmD;IAEnD,IAAM,cAAc,GAAG,uBAAU,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,cAAM,OAAA,uBAAuB,EAAvB,CAAuB,CAAC;IAErH,IAAI,uBAAU,CAAC,QAAQ,CAAC,EAAE;QAIxB,OAAO,iBAAO,CAAC,QAAQ,EAAE;YACvB,SAAS,EAAE,cAAc;SAC1B,CAAC,CAAC;KACJ;IAED,OAAO,UAAC,MAAqB,IAAK,OAAA,IAAI,6CAAqB,CAAM,MAAM,EAAE,cAAc,CAAC,EAAtD,CAAsD,CAAC;AAC3F,CAAC;AAhBD,8BAgBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/observeOn.js b/node_modules/rxjs/dist/cjs/internal/operators/observeOn.js deleted file mode 100644 index 617e0af..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/observeOn.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.observeOn = void 0; -var executeSchedule_1 = require("../util/executeSchedule"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function observeOn(scheduler, delay) { - if (delay === void 0) { delay = 0; } - return lift_1.operate(function (source, subscriber) { - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return executeSchedule_1.executeSchedule(subscriber, scheduler, function () { return subscriber.next(value); }, delay); }, function () { return executeSchedule_1.executeSchedule(subscriber, scheduler, function () { return subscriber.complete(); }, delay); }, function (err) { return executeSchedule_1.executeSchedule(subscriber, scheduler, function () { return subscriber.error(err); }, delay); })); - }); -} -exports.observeOn = observeOn; -//# sourceMappingURL=observeOn.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/observeOn.js.map b/node_modules/rxjs/dist/cjs/internal/operators/observeOn.js.map deleted file mode 100644 index 3a7c9d1..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/observeOn.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"observeOn.js","sourceRoot":"","sources":["../../../../src/internal/operators/observeOn.ts"],"names":[],"mappings":";;;AAEA,2DAA0D;AAC1D,qCAAuC;AACvC,2DAAgE;AAsDhE,SAAgB,SAAS,CAAI,SAAwB,EAAE,KAAS;IAAT,sBAAA,EAAA,SAAS;IAC9D,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK,IAAK,OAAA,iCAAe,CAAC,UAAU,EAAE,SAAS,EAAE,cAAM,OAAA,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAtB,CAAsB,EAAE,KAAK,CAAC,EAA3E,CAA2E,EACtF,cAAM,OAAA,iCAAe,CAAC,UAAU,EAAE,SAAS,EAAE,cAAM,OAAA,UAAU,CAAC,QAAQ,EAAE,EAArB,CAAqB,EAAE,KAAK,CAAC,EAA1E,CAA0E,EAChF,UAAC,GAAG,IAAK,OAAA,iCAAe,CAAC,UAAU,EAAE,SAAS,EAAE,cAAM,OAAA,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAArB,CAAqB,EAAE,KAAK,CAAC,EAA1E,CAA0E,CACpF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAXD,8BAWC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNextWith.js b/node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNextWith.js deleted file mode 100644 index 0af7cda..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNextWith.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.onErrorResumeNext = exports.onErrorResumeNextWith = void 0; -var argsOrArgArray_1 = require("../util/argsOrArgArray"); -var onErrorResumeNext_1 = require("../observable/onErrorResumeNext"); -function onErrorResumeNextWith() { - var sources = []; - for (var _i = 0; _i < arguments.length; _i++) { - sources[_i] = arguments[_i]; - } - var nextSources = argsOrArgArray_1.argsOrArgArray(sources); - return function (source) { return onErrorResumeNext_1.onErrorResumeNext.apply(void 0, __spreadArray([source], __read(nextSources))); }; -} -exports.onErrorResumeNextWith = onErrorResumeNextWith; -exports.onErrorResumeNext = onErrorResumeNextWith; -//# sourceMappingURL=onErrorResumeNextWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNextWith.js.map b/node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNextWith.js.map deleted file mode 100644 index 8aad7e4..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/onErrorResumeNextWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"onErrorResumeNextWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/onErrorResumeNextWith.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,yDAAwD;AACxD,qEAAkF;AAiFlF,SAAgB,qBAAqB;IACnC,iBAAyE;SAAzE,UAAyE,EAAzE,qBAAyE,EAAzE,IAAyE;QAAzE,4BAAyE;;IAMzE,IAAM,WAAW,GAAG,+BAAc,CAAC,OAAO,CAAuC,CAAC;IAElF,OAAO,UAAC,MAAM,IAAK,OAAA,qCAAU,8BAAC,MAAM,UAAK,WAAW,KAAjC,CAAkC,CAAC;AACxD,CAAC;AAVD,sDAUC;AAKY,QAAA,iBAAiB,GAAG,qBAAqB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/pairwise.js b/node_modules/rxjs/dist/cjs/internal/operators/pairwise.js deleted file mode 100644 index dec77fd..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/pairwise.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.pairwise = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function pairwise() { - return lift_1.operate(function (source, subscriber) { - var prev; - var hasPrev = false; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - var p = prev; - prev = value; - hasPrev && subscriber.next([p, value]); - hasPrev = true; - })); - }); -} -exports.pairwise = pairwise; -//# sourceMappingURL=pairwise.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/pairwise.js.map b/node_modules/rxjs/dist/cjs/internal/operators/pairwise.js.map deleted file mode 100644 index a418242..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/pairwise.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pairwise.js","sourceRoot":"","sources":["../../../../src/internal/operators/pairwise.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,2DAAgE;AA6ChE,SAAgB,QAAQ;IACtB,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,IAAO,CAAC;QACZ,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,IAAM,CAAC,GAAG,IAAI,CAAC;YACf,IAAI,GAAG,KAAK,CAAC;YACb,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;YACvC,OAAO,GAAG,IAAI,CAAC;QACjB,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAbD,4BAaC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/partition.js b/node_modules/rxjs/dist/cjs/internal/operators/partition.js deleted file mode 100644 index fbfee81..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/partition.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.partition = void 0; -var not_1 = require("../util/not"); -var filter_1 = require("./filter"); -function partition(predicate, thisArg) { - return function (source) { - return [filter_1.filter(predicate, thisArg)(source), filter_1.filter(not_1.not(predicate, thisArg))(source)]; - }; -} -exports.partition = partition; -//# sourceMappingURL=partition.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/partition.js.map b/node_modules/rxjs/dist/cjs/internal/operators/partition.js.map deleted file mode 100644 index b0cb8dd..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/partition.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"partition.js","sourceRoot":"","sources":["../../../../src/internal/operators/partition.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAClC,mCAAkC;AAsDlC,SAAgB,SAAS,CACvB,SAA+C,EAC/C,OAAa;IAEb,OAAO,UAAC,MAAqB;QAC3B,OAAA,CAAC,eAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,EAAE,eAAM,CAAC,SAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAmC;IAA/G,CAA+G,CAAC;AACpH,CAAC;AAND,8BAMC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/pluck.js b/node_modules/rxjs/dist/cjs/internal/operators/pluck.js deleted file mode 100644 index a3170c5..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/pluck.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.pluck = void 0; -var map_1 = require("./map"); -function pluck() { - var properties = []; - for (var _i = 0; _i < arguments.length; _i++) { - properties[_i] = arguments[_i]; - } - var length = properties.length; - if (length === 0) { - throw new Error('list of properties cannot be empty.'); - } - return map_1.map(function (x) { - var currentProp = x; - for (var i = 0; i < length; i++) { - var p = currentProp === null || currentProp === void 0 ? void 0 : currentProp[properties[i]]; - if (typeof p !== 'undefined') { - currentProp = p; - } - else { - return undefined; - } - } - return currentProp; - }); -} -exports.pluck = pluck; -//# sourceMappingURL=pluck.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/pluck.js.map b/node_modules/rxjs/dist/cjs/internal/operators/pluck.js.map deleted file mode 100644 index e7b3149..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/pluck.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pluck.js","sourceRoot":"","sources":["../../../../src/internal/operators/pluck.ts"],"names":[],"mappings":";;;AAAA,6BAA4B;AAwF5B,SAAgB,KAAK;IAAO,oBAA8C;SAA9C,UAA8C,EAA9C,qBAA8C,EAA9C,IAA8C;QAA9C,+BAA8C;;IACxE,IAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IACjC,IAAI,MAAM,KAAK,CAAC,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;KACxD;IACD,OAAO,SAAG,CAAC,UAAC,CAAC;QACX,IAAI,WAAW,GAAQ,CAAC,CAAC;QACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;YAC/B,IAAM,CAAC,GAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAG,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACvC,IAAI,OAAO,CAAC,KAAK,WAAW,EAAE;gBAC5B,WAAW,GAAG,CAAC,CAAC;aACjB;iBAAM;gBACL,OAAO,SAAS,CAAC;aAClB;SACF;QACD,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC,CAAC;AACL,CAAC;AAjBD,sBAiBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/publish.js b/node_modules/rxjs/dist/cjs/internal/operators/publish.js deleted file mode 100644 index 1fec3b4..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/publish.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.publish = void 0; -var Subject_1 = require("../Subject"); -var multicast_1 = require("./multicast"); -var connect_1 = require("./connect"); -function publish(selector) { - return selector ? function (source) { return connect_1.connect(selector)(source); } : function (source) { return multicast_1.multicast(new Subject_1.Subject())(source); }; -} -exports.publish = publish; -//# sourceMappingURL=publish.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/publish.js.map b/node_modules/rxjs/dist/cjs/internal/operators/publish.js.map deleted file mode 100644 index 9b1b245..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/publish.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../../src/internal/operators/publish.ts"],"names":[],"mappings":";;;AACA,sCAAqC;AACrC,yCAAwC;AAGxC,qCAAoC;AAqFpC,SAAgB,OAAO,CAAO,QAAiC;IAC7D,OAAO,QAAQ,CAAC,CAAC,CAAC,UAAC,MAAM,IAAK,OAAA,iBAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAzB,CAAyB,CAAC,CAAC,CAAC,UAAC,MAAM,IAAK,OAAA,qBAAS,CAAC,IAAI,iBAAO,EAAK,CAAC,CAAC,MAAM,CAAC,EAAnC,CAAmC,CAAC;AAC5G,CAAC;AAFD,0BAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/publishBehavior.js b/node_modules/rxjs/dist/cjs/internal/operators/publishBehavior.js deleted file mode 100644 index 3887094..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/publishBehavior.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.publishBehavior = void 0; -var BehaviorSubject_1 = require("../BehaviorSubject"); -var ConnectableObservable_1 = require("../observable/ConnectableObservable"); -function publishBehavior(initialValue) { - return function (source) { - var subject = new BehaviorSubject_1.BehaviorSubject(initialValue); - return new ConnectableObservable_1.ConnectableObservable(source, function () { return subject; }); - }; -} -exports.publishBehavior = publishBehavior; -//# sourceMappingURL=publishBehavior.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/publishBehavior.js.map b/node_modules/rxjs/dist/cjs/internal/operators/publishBehavior.js.map deleted file mode 100644 index ed76b7c..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/publishBehavior.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"publishBehavior.js","sourceRoot":"","sources":["../../../../src/internal/operators/publishBehavior.ts"],"names":[],"mappings":";;;AACA,sDAAqD;AACrD,6EAA4E;AAiB5E,SAAgB,eAAe,CAAI,YAAe;IAEhD,OAAO,UAAC,MAAM;QACZ,IAAM,OAAO,GAAG,IAAI,iCAAe,CAAI,YAAY,CAAC,CAAC;QACrD,OAAO,IAAI,6CAAqB,CAAC,MAAM,EAAE,cAAM,OAAA,OAAO,EAAP,CAAO,CAAC,CAAC;IAC1D,CAAC,CAAC;AACJ,CAAC;AAND,0CAMC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/publishLast.js b/node_modules/rxjs/dist/cjs/internal/operators/publishLast.js deleted file mode 100644 index fb94783..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/publishLast.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.publishLast = void 0; -var AsyncSubject_1 = require("../AsyncSubject"); -var ConnectableObservable_1 = require("../observable/ConnectableObservable"); -function publishLast() { - return function (source) { - var subject = new AsyncSubject_1.AsyncSubject(); - return new ConnectableObservable_1.ConnectableObservable(source, function () { return subject; }); - }; -} -exports.publishLast = publishLast; -//# sourceMappingURL=publishLast.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/publishLast.js.map b/node_modules/rxjs/dist/cjs/internal/operators/publishLast.js.map deleted file mode 100644 index e84e10d..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/publishLast.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"publishLast.js","sourceRoot":"","sources":["../../../../src/internal/operators/publishLast.ts"],"names":[],"mappings":";;;AACA,gDAA+C;AAC/C,6EAA4E;AAmE5E,SAAgB,WAAW;IAEzB,OAAO,UAAC,MAAM;QACZ,IAAM,OAAO,GAAG,IAAI,2BAAY,EAAK,CAAC;QACtC,OAAO,IAAI,6CAAqB,CAAC,MAAM,EAAE,cAAM,OAAA,OAAO,EAAP,CAAO,CAAC,CAAC;IAC1D,CAAC,CAAC;AACJ,CAAC;AAND,kCAMC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/publishReplay.js b/node_modules/rxjs/dist/cjs/internal/operators/publishReplay.js deleted file mode 100644 index 15061cb..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/publishReplay.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.publishReplay = void 0; -var ReplaySubject_1 = require("../ReplaySubject"); -var multicast_1 = require("./multicast"); -var isFunction_1 = require("../util/isFunction"); -function publishReplay(bufferSize, windowTime, selectorOrScheduler, timestampProvider) { - if (selectorOrScheduler && !isFunction_1.isFunction(selectorOrScheduler)) { - timestampProvider = selectorOrScheduler; - } - var selector = isFunction_1.isFunction(selectorOrScheduler) ? selectorOrScheduler : undefined; - return function (source) { return multicast_1.multicast(new ReplaySubject_1.ReplaySubject(bufferSize, windowTime, timestampProvider), selector)(source); }; -} -exports.publishReplay = publishReplay; -//# sourceMappingURL=publishReplay.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/publishReplay.js.map b/node_modules/rxjs/dist/cjs/internal/operators/publishReplay.js.map deleted file mode 100644 index ae0e0ae..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/publishReplay.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"publishReplay.js","sourceRoot":"","sources":["../../../../src/internal/operators/publishReplay.ts"],"names":[],"mappings":";;;AACA,kDAAiD;AACjD,yCAAwC;AAExC,iDAAgD;AA8EhD,SAAgB,aAAa,CAC3B,UAAmB,EACnB,UAAmB,EACnB,mBAAgE,EAChE,iBAAqC;IAErC,IAAI,mBAAmB,IAAI,CAAC,uBAAU,CAAC,mBAAmB,CAAC,EAAE;QAC3D,iBAAiB,GAAG,mBAAmB,CAAC;KACzC;IACD,IAAM,QAAQ,GAAG,uBAAU,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS,CAAC;IAGnF,OAAO,UAAC,MAAqB,IAAK,OAAA,qBAAS,CAAC,IAAI,6BAAa,CAAI,UAAU,EAAE,UAAU,EAAE,iBAAiB,CAAC,EAAE,QAAS,CAAC,CAAC,MAAM,CAAC,EAA7F,CAA6F,CAAC;AAClI,CAAC;AAbD,sCAaC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/race.js b/node_modules/rxjs/dist/cjs/internal/operators/race.js deleted file mode 100644 index cf4df95..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/race.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.race = void 0; -var argsOrArgArray_1 = require("../util/argsOrArgArray"); -var raceWith_1 = require("./raceWith"); -function race() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return raceWith_1.raceWith.apply(void 0, __spreadArray([], __read(argsOrArgArray_1.argsOrArgArray(args)))); -} -exports.race = race; -//# sourceMappingURL=race.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/race.js.map b/node_modules/rxjs/dist/cjs/internal/operators/race.js.map deleted file mode 100644 index 8d06db0..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/race.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"race.js","sourceRoot":"","sources":["../../../../src/internal/operators/race.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,yDAAwD;AACxD,uCAAsC;AAetC,SAAgB,IAAI;IAAI,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,yBAAc;;IACpC,OAAO,mBAAQ,wCAAI,+BAAc,CAAC,IAAI,CAAC,IAAE;AAC3C,CAAC;AAFD,oBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/raceWith.js b/node_modules/rxjs/dist/cjs/internal/operators/raceWith.js deleted file mode 100644 index a29805d..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/raceWith.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.raceWith = void 0; -var race_1 = require("../observable/race"); -var lift_1 = require("../util/lift"); -var identity_1 = require("../util/identity"); -function raceWith() { - var otherSources = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherSources[_i] = arguments[_i]; - } - return !otherSources.length - ? identity_1.identity - : lift_1.operate(function (source, subscriber) { - race_1.raceInit(__spreadArray([source], __read(otherSources)))(subscriber); - }); -} -exports.raceWith = raceWith; -//# sourceMappingURL=raceWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/raceWith.js.map b/node_modules/rxjs/dist/cjs/internal/operators/raceWith.js.map deleted file mode 100644 index 1bacc7d..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/raceWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"raceWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/raceWith.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,2CAA8C;AAC9C,qCAAuC;AACvC,6CAA4C;AA4B5C,SAAgB,QAAQ;IACtB,sBAA6C;SAA7C,UAA6C,EAA7C,qBAA6C,EAA7C,IAA6C;QAA7C,iCAA6C;;IAE7C,OAAO,CAAC,YAAY,CAAC,MAAM;QACzB,CAAC,CAAC,mBAAQ;QACV,CAAC,CAAC,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YACzB,eAAQ,gBAAiB,MAAM,UAAK,YAAY,GAAE,CAAC,UAAU,CAAC,CAAC;QACjE,CAAC,CAAC,CAAC;AACT,CAAC;AARD,4BAQC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/reduce.js b/node_modules/rxjs/dist/cjs/internal/operators/reduce.js deleted file mode 100644 index 147a264..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/reduce.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.reduce = void 0; -var scanInternals_1 = require("./scanInternals"); -var lift_1 = require("../util/lift"); -function reduce(accumulator, seed) { - return lift_1.operate(scanInternals_1.scanInternals(accumulator, seed, arguments.length >= 2, false, true)); -} -exports.reduce = reduce; -//# sourceMappingURL=reduce.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/reduce.js.map b/node_modules/rxjs/dist/cjs/internal/operators/reduce.js.map deleted file mode 100644 index 8756a44..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/reduce.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"reduce.js","sourceRoot":"","sources":["../../../../src/internal/operators/reduce.ts"],"names":[],"mappings":";;;AAAA,iDAAgD;AAEhD,qCAAuC;AAwDvC,SAAgB,MAAM,CAAO,WAAuD,EAAE,IAAU;IAC9F,OAAO,cAAO,CAAC,6BAAa,CAAC,WAAW,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;AACvF,CAAC;AAFD,wBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/refCount.js b/node_modules/rxjs/dist/cjs/internal/operators/refCount.js deleted file mode 100644 index 1c86a48..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/refCount.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.refCount = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function refCount() { - return lift_1.operate(function (source, subscriber) { - var connection = null; - source._refCount++; - var refCounter = OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, undefined, undefined, function () { - if (!source || source._refCount <= 0 || 0 < --source._refCount) { - connection = null; - return; - } - var sharedConnection = source._connection; - var conn = connection; - connection = null; - if (sharedConnection && (!conn || sharedConnection === conn)) { - sharedConnection.unsubscribe(); - } - subscriber.unsubscribe(); - }); - source.subscribe(refCounter); - if (!refCounter.closed) { - connection = source.connect(); - } - }); -} -exports.refCount = refCount; -//# sourceMappingURL=refCount.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/refCount.js.map b/node_modules/rxjs/dist/cjs/internal/operators/refCount.js.map deleted file mode 100644 index fa771cc..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/refCount.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"refCount.js","sourceRoot":"","sources":["../../../../src/internal/operators/refCount.ts"],"names":[],"mappings":";;;AAGA,qCAAuC;AACvC,2DAAgE;AA4DhE,SAAgB,QAAQ;IACtB,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,UAAU,GAAwB,IAAI,CAAC;QAE1C,MAAc,CAAC,SAAS,EAAE,CAAC;QAE5B,IAAM,UAAU,GAAG,6CAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE;YACvF,IAAI,CAAC,MAAM,IAAK,MAAc,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,EAAG,MAAc,CAAC,SAAS,EAAE;gBAChF,UAAU,GAAG,IAAI,CAAC;gBAClB,OAAO;aACR;YA2BD,IAAM,gBAAgB,GAAI,MAAc,CAAC,WAAW,CAAC;YACrD,IAAM,IAAI,GAAG,UAAU,CAAC;YACxB,UAAU,GAAG,IAAI,CAAC;YAElB,IAAI,gBAAgB,IAAI,CAAC,CAAC,IAAI,IAAI,gBAAgB,KAAK,IAAI,CAAC,EAAE;gBAC5D,gBAAgB,CAAC,WAAW,EAAE,CAAC;aAChC;YAED,UAAU,CAAC,WAAW,EAAE,CAAC;QAC3B,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAE7B,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;YACtB,UAAU,GAAI,MAAmC,CAAC,OAAO,EAAE,CAAC;SAC7D;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAtDD,4BAsDC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/repeat.js b/node_modules/rxjs/dist/cjs/internal/operators/repeat.js deleted file mode 100644 index 80e9bf3..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/repeat.js +++ /dev/null @@ -1,64 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.repeat = void 0; -var empty_1 = require("../observable/empty"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var innerFrom_1 = require("../observable/innerFrom"); -var timer_1 = require("../observable/timer"); -function repeat(countOrConfig) { - var _a; - var count = Infinity; - var delay; - if (countOrConfig != null) { - if (typeof countOrConfig === 'object') { - (_a = countOrConfig.count, count = _a === void 0 ? Infinity : _a, delay = countOrConfig.delay); - } - else { - count = countOrConfig; - } - } - return count <= 0 - ? function () { return empty_1.EMPTY; } - : lift_1.operate(function (source, subscriber) { - var soFar = 0; - var sourceSub; - var resubscribe = function () { - sourceSub === null || sourceSub === void 0 ? void 0 : sourceSub.unsubscribe(); - sourceSub = null; - if (delay != null) { - var notifier = typeof delay === 'number' ? timer_1.timer(delay) : innerFrom_1.innerFrom(delay(soFar)); - var notifierSubscriber_1 = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { - notifierSubscriber_1.unsubscribe(); - subscribeToSource(); - }); - notifier.subscribe(notifierSubscriber_1); - } - else { - subscribeToSource(); - } - }; - var subscribeToSource = function () { - var syncUnsub = false; - sourceSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, function () { - if (++soFar < count) { - if (sourceSub) { - resubscribe(); - } - else { - syncUnsub = true; - } - } - else { - subscriber.complete(); - } - })); - if (syncUnsub) { - resubscribe(); - } - }; - subscribeToSource(); - }); -} -exports.repeat = repeat; -//# sourceMappingURL=repeat.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/repeat.js.map b/node_modules/rxjs/dist/cjs/internal/operators/repeat.js.map deleted file mode 100644 index 2a29002..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/repeat.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"repeat.js","sourceRoot":"","sources":["../../../../src/internal/operators/repeat.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAC5C,qCAAuC;AAEvC,2DAAgE;AAChE,qDAAoD;AACpD,6CAA4C;AA6G5C,SAAgB,MAAM,CAAI,aAAqC;;IAC7D,IAAI,KAAK,GAAG,QAAQ,CAAC;IACrB,IAAI,KAA4B,CAAC;IAEjC,IAAI,aAAa,IAAI,IAAI,EAAE;QACzB,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE;YACrC,CAAG,KAA4B,aAAa,MAAzB,EAAhB,KAAK,mBAAG,QAAQ,KAAA,EAAE,KAAK,GAAK,aAAa,MAAlB,CAAmB,CAAC;SAC/C;aAAM;YACL,KAAK,GAAG,aAAa,CAAC;SACvB;KACF;IAED,OAAO,KAAK,IAAI,CAAC;QACf,CAAC,CAAC,cAAM,OAAA,aAAK,EAAL,CAAK;QACb,CAAC,CAAC,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YACzB,IAAI,KAAK,GAAG,CAAC,CAAC;YACd,IAAI,SAA8B,CAAC;YAEnC,IAAM,WAAW,GAAG;gBAClB,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,WAAW,EAAE,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,IAAI,KAAK,IAAI,IAAI,EAAE;oBACjB,IAAM,QAAQ,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,aAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,qBAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;oBACpF,IAAM,oBAAkB,GAAG,6CAAwB,CAAC,UAAU,EAAE;wBAC9D,oBAAkB,CAAC,WAAW,EAAE,CAAC;wBACjC,iBAAiB,EAAE,CAAC;oBACtB,CAAC,CAAC,CAAC;oBACH,QAAQ,CAAC,SAAS,CAAC,oBAAkB,CAAC,CAAC;iBACxC;qBAAM;oBACL,iBAAiB,EAAE,CAAC;iBACrB;YACH,CAAC,CAAC;YAEF,IAAM,iBAAiB,GAAG;gBACxB,IAAI,SAAS,GAAG,KAAK,CAAC;gBACtB,SAAS,GAAG,MAAM,CAAC,SAAS,CAC1B,6CAAwB,CAAC,UAAU,EAAE,SAAS,EAAE;oBAC9C,IAAI,EAAE,KAAK,GAAG,KAAK,EAAE;wBACnB,IAAI,SAAS,EAAE;4BACb,WAAW,EAAE,CAAC;yBACf;6BAAM;4BACL,SAAS,GAAG,IAAI,CAAC;yBAClB;qBACF;yBAAM;wBACL,UAAU,CAAC,QAAQ,EAAE,CAAC;qBACvB;gBACH,CAAC,CAAC,CACH,CAAC;gBAEF,IAAI,SAAS,EAAE;oBACb,WAAW,EAAE,CAAC;iBACf;YACH,CAAC,CAAC;YAEF,iBAAiB,EAAE,CAAC;QACtB,CAAC,CAAC,CAAC;AACT,CAAC;AAxDD,wBAwDC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js b/node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js deleted file mode 100644 index e3ca262..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js +++ /dev/null @@ -1,50 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.repeatWhen = void 0; -var innerFrom_1 = require("../observable/innerFrom"); -var Subject_1 = require("../Subject"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function repeatWhen(notifier) { - return lift_1.operate(function (source, subscriber) { - var innerSub; - var syncResub = false; - var completions$; - var isNotifierComplete = false; - var isMainComplete = false; - var checkComplete = function () { return isMainComplete && isNotifierComplete && (subscriber.complete(), true); }; - var getCompletionSubject = function () { - if (!completions$) { - completions$ = new Subject_1.Subject(); - innerFrom_1.innerFrom(notifier(completions$)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { - if (innerSub) { - subscribeForRepeatWhen(); - } - else { - syncResub = true; - } - }, function () { - isNotifierComplete = true; - checkComplete(); - })); - } - return completions$; - }; - var subscribeForRepeatWhen = function () { - isMainComplete = false; - innerSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, function () { - isMainComplete = true; - !checkComplete() && getCompletionSubject().next(); - })); - if (syncResub) { - innerSub.unsubscribe(); - innerSub = null; - syncResub = false; - subscribeForRepeatWhen(); - } - }; - subscribeForRepeatWhen(); - }); -} -exports.repeatWhen = repeatWhen; -//# sourceMappingURL=repeatWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js.map b/node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js.map deleted file mode 100644 index 8202430..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/repeatWhen.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"repeatWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/repeatWhen.ts"],"names":[],"mappings":";;;AACA,qDAAoD;AACpD,sCAAqC;AAIrC,qCAAuC;AACvC,2DAAgE;AAoChE,SAAgB,UAAU,CAAI,QAAmE;IAC/F,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAA6B,CAAC;QAClC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,YAA2B,CAAC;QAChC,IAAI,kBAAkB,GAAG,KAAK,CAAC;QAC/B,IAAI,cAAc,GAAG,KAAK,CAAC;QAK3B,IAAM,aAAa,GAAG,cAAM,OAAA,cAAc,IAAI,kBAAkB,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,EAArE,CAAqE,CAAC;QAKlG,IAAM,oBAAoB,GAAG;YAC3B,IAAI,CAAC,YAAY,EAAE;gBACjB,YAAY,GAAG,IAAI,iBAAO,EAAE,CAAC;gBAI7B,qBAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CACzC,6CAAwB,CACtB,UAAU,EACV;oBACE,IAAI,QAAQ,EAAE;wBACZ,sBAAsB,EAAE,CAAC;qBAC1B;yBAAM;wBAKL,SAAS,GAAG,IAAI,CAAC;qBAClB;gBACH,CAAC,EACD;oBACE,kBAAkB,GAAG,IAAI,CAAC;oBAC1B,aAAa,EAAE,CAAC;gBAClB,CAAC,CACF,CACF,CAAC;aACH;YACD,OAAO,YAAY,CAAC;QACtB,CAAC,CAAC;QAEF,IAAM,sBAAsB,GAAG;YAC7B,cAAc,GAAG,KAAK,CAAC;YAEvB,QAAQ,GAAG,MAAM,CAAC,SAAS,CACzB,6CAAwB,CAAC,UAAU,EAAE,SAAS,EAAE;gBAC9C,cAAc,GAAG,IAAI,CAAC;gBAMtB,CAAC,aAAa,EAAE,IAAI,oBAAoB,EAAE,CAAC,IAAI,EAAE,CAAC;YACpD,CAAC,CAAC,CACH,CAAC;YAEF,IAAI,SAAS,EAAE;gBAKb,QAAQ,CAAC,WAAW,EAAE,CAAC;gBAIvB,QAAQ,GAAG,IAAI,CAAC;gBAEhB,SAAS,GAAG,KAAK,CAAC;gBAElB,sBAAsB,EAAE,CAAC;aAC1B;QACH,CAAC,CAAC;QAGF,sBAAsB,EAAE,CAAC;IAC3B,CAAC,CAAC,CAAC;AACL,CAAC;AAjFD,gCAiFC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/retry.js b/node_modules/rxjs/dist/cjs/internal/operators/retry.js deleted file mode 100644 index f850078..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/retry.js +++ /dev/null @@ -1,73 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.retry = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var identity_1 = require("../util/identity"); -var timer_1 = require("../observable/timer"); -var innerFrom_1 = require("../observable/innerFrom"); -function retry(configOrCount) { - if (configOrCount === void 0) { configOrCount = Infinity; } - var config; - if (configOrCount && typeof configOrCount === 'object') { - config = configOrCount; - } - else { - config = { - count: configOrCount, - }; - } - var _a = config.count, count = _a === void 0 ? Infinity : _a, delay = config.delay, _b = config.resetOnSuccess, resetOnSuccess = _b === void 0 ? false : _b; - return count <= 0 - ? identity_1.identity - : lift_1.operate(function (source, subscriber) { - var soFar = 0; - var innerSub; - var subscribeForRetry = function () { - var syncUnsub = false; - innerSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - if (resetOnSuccess) { - soFar = 0; - } - subscriber.next(value); - }, undefined, function (err) { - if (soFar++ < count) { - var resub_1 = function () { - if (innerSub) { - innerSub.unsubscribe(); - innerSub = null; - subscribeForRetry(); - } - else { - syncUnsub = true; - } - }; - if (delay != null) { - var notifier = typeof delay === 'number' ? timer_1.timer(delay) : innerFrom_1.innerFrom(delay(err, soFar)); - var notifierSubscriber_1 = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { - notifierSubscriber_1.unsubscribe(); - resub_1(); - }, function () { - subscriber.complete(); - }); - notifier.subscribe(notifierSubscriber_1); - } - else { - resub_1(); - } - } - else { - subscriber.error(err); - } - })); - if (syncUnsub) { - innerSub.unsubscribe(); - innerSub = null; - subscribeForRetry(); - } - }; - subscribeForRetry(); - }); -} -exports.retry = retry; -//# sourceMappingURL=retry.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/retry.js.map b/node_modules/rxjs/dist/cjs/internal/operators/retry.js.map deleted file mode 100644 index d8ffa83..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/retry.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"retry.js","sourceRoot":"","sources":["../../../../src/internal/operators/retry.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AAEvC,2DAAgE;AAChE,6CAA4C;AAC5C,6CAA4C;AAC5C,qDAAoD;AA6EpD,SAAgB,KAAK,CAAI,aAA8C;IAA9C,8BAAA,EAAA,wBAA8C;IACrE,IAAI,MAAmB,CAAC;IACxB,IAAI,aAAa,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE;QACtD,MAAM,GAAG,aAAa,CAAC;KACxB;SAAM;QACL,MAAM,GAAG;YACP,KAAK,EAAE,aAAuB;SAC/B,CAAC;KACH;IACO,IAAA,KAAoE,MAAM,MAA1D,EAAhB,KAAK,mBAAG,QAAQ,KAAA,EAAE,KAAK,GAA6C,MAAM,MAAnD,EAAE,KAA2C,MAAM,eAAX,EAAtB,cAAc,mBAAG,KAAK,KAAA,CAAY;IAEnF,OAAO,KAAK,IAAI,CAAC;QACf,CAAC,CAAC,mBAAQ;QACV,CAAC,CAAC,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YACzB,IAAI,KAAK,GAAG,CAAC,CAAC;YACd,IAAI,QAA6B,CAAC;YAClC,IAAM,iBAAiB,GAAG;gBACxB,IAAI,SAAS,GAAG,KAAK,CAAC;gBACtB,QAAQ,GAAG,MAAM,CAAC,SAAS,CACzB,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;oBAEJ,IAAI,cAAc,EAAE;wBAClB,KAAK,GAAG,CAAC,CAAC;qBACX;oBACD,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACzB,CAAC,EAED,SAAS,EACT,UAAC,GAAG;oBACF,IAAI,KAAK,EAAE,GAAG,KAAK,EAAE;wBAEnB,IAAM,OAAK,GAAG;4BACZ,IAAI,QAAQ,EAAE;gCACZ,QAAQ,CAAC,WAAW,EAAE,CAAC;gCACvB,QAAQ,GAAG,IAAI,CAAC;gCAChB,iBAAiB,EAAE,CAAC;6BACrB;iCAAM;gCACL,SAAS,GAAG,IAAI,CAAC;6BAClB;wBACH,CAAC,CAAC;wBAEF,IAAI,KAAK,IAAI,IAAI,EAAE;4BAIjB,IAAM,QAAQ,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,aAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,qBAAS,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;4BACzF,IAAM,oBAAkB,GAAG,6CAAwB,CACjD,UAAU,EACV;gCAIE,oBAAkB,CAAC,WAAW,EAAE,CAAC;gCACjC,OAAK,EAAE,CAAC;4BACV,CAAC,EACD;gCAGE,UAAU,CAAC,QAAQ,EAAE,CAAC;4BACxB,CAAC,CACF,CAAC;4BACF,QAAQ,CAAC,SAAS,CAAC,oBAAkB,CAAC,CAAC;yBACxC;6BAAM;4BAEL,OAAK,EAAE,CAAC;yBACT;qBACF;yBAAM;wBAGL,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;qBACvB;gBACH,CAAC,CACF,CACF,CAAC;gBACF,IAAI,SAAS,EAAE;oBACb,QAAQ,CAAC,WAAW,EAAE,CAAC;oBACvB,QAAQ,GAAG,IAAI,CAAC;oBAChB,iBAAiB,EAAE,CAAC;iBACrB;YACH,CAAC,CAAC;YACF,iBAAiB,EAAE,CAAC;QACtB,CAAC,CAAC,CAAC;AACT,CAAC;AApFD,sBAoFC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js b/node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js deleted file mode 100644 index d2c5095..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.retryWhen = void 0; -var innerFrom_1 = require("../observable/innerFrom"); -var Subject_1 = require("../Subject"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function retryWhen(notifier) { - return lift_1.operate(function (source, subscriber) { - var innerSub; - var syncResub = false; - var errors$; - var subscribeForRetryWhen = function () { - innerSub = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, undefined, undefined, function (err) { - if (!errors$) { - errors$ = new Subject_1.Subject(); - innerFrom_1.innerFrom(notifier(errors$)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { - return innerSub ? subscribeForRetryWhen() : (syncResub = true); - })); - } - if (errors$) { - errors$.next(err); - } - })); - if (syncResub) { - innerSub.unsubscribe(); - innerSub = null; - syncResub = false; - subscribeForRetryWhen(); - } - }; - subscribeForRetryWhen(); - }); -} -exports.retryWhen = retryWhen; -//# sourceMappingURL=retryWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js.map b/node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js.map deleted file mode 100644 index e93a7f2..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/retryWhen.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"retryWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/retryWhen.ts"],"names":[],"mappings":";;;AACA,qDAAoD;AACpD,sCAAqC;AAIrC,qCAAuC;AACvC,2DAAgE;AA2DhE,SAAgB,SAAS,CAAI,QAA2D;IACtF,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAA6B,CAAC;QAClC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,OAAqB,CAAC;QAE1B,IAAM,qBAAqB,GAAG;YAC5B,QAAQ,GAAG,MAAM,CAAC,SAAS,CACzB,6CAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,UAAC,GAAG;gBAC7D,IAAI,CAAC,OAAO,EAAE;oBACZ,OAAO,GAAG,IAAI,iBAAO,EAAE,CAAC;oBACxB,qBAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CACpC,6CAAwB,CAAC,UAAU,EAAE;wBAMnC,OAAA,QAAQ,CAAC,CAAC,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;oBAAvD,CAAuD,CACxD,CACF,CAAC;iBACH;gBACD,IAAI,OAAO,EAAE;oBAEX,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;iBACnB;YACH,CAAC,CAAC,CACH,CAAC;YAEF,IAAI,SAAS,EAAE;gBAKb,QAAQ,CAAC,WAAW,EAAE,CAAC;gBACvB,QAAQ,GAAG,IAAI,CAAC;gBAEhB,SAAS,GAAG,KAAK,CAAC;gBAElB,qBAAqB,EAAE,CAAC;aACzB;QACH,CAAC,CAAC;QAGF,qBAAqB,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC;AA9CD,8BA8CC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/sample.js b/node_modules/rxjs/dist/cjs/internal/operators/sample.js deleted file mode 100644 index 59b6f71..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/sample.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.sample = void 0; -var innerFrom_1 = require("../observable/innerFrom"); -var lift_1 = require("../util/lift"); -var noop_1 = require("../util/noop"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function sample(notifier) { - return lift_1.operate(function (source, subscriber) { - var hasValue = false; - var lastValue = null; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - hasValue = true; - lastValue = value; - })); - innerFrom_1.innerFrom(notifier).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { - if (hasValue) { - hasValue = false; - var value = lastValue; - lastValue = null; - subscriber.next(value); - } - }, noop_1.noop)); - }); -} -exports.sample = sample; -//# sourceMappingURL=sample.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/sample.js.map b/node_modules/rxjs/dist/cjs/internal/operators/sample.js.map deleted file mode 100644 index 12d83a6..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/sample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sample.js","sourceRoot":"","sources":["../../../../src/internal/operators/sample.ts"],"names":[],"mappings":";;;AAAA,qDAAoD;AAEpD,qCAAuC;AACvC,qCAAoC;AACpC,2DAAgE;AA0ChE,SAAgB,MAAM,CAAI,QAA8B;IACtD,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,SAAS,GAAa,IAAI,CAAC;QAC/B,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,QAAQ,GAAG,IAAI,CAAC;YAChB,SAAS,GAAG,KAAK,CAAC;QACpB,CAAC,CAAC,CACH,CAAC;QACF,qBAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAC3B,6CAAwB,CACtB,UAAU,EACV;YACE,IAAI,QAAQ,EAAE;gBACZ,QAAQ,GAAG,KAAK,CAAC;gBACjB,IAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,EACD,WAAI,CACL,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAzBD,wBAyBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/sampleTime.js b/node_modules/rxjs/dist/cjs/internal/operators/sampleTime.js deleted file mode 100644 index d01f392..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/sampleTime.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.sampleTime = void 0; -var async_1 = require("../scheduler/async"); -var sample_1 = require("./sample"); -var interval_1 = require("../observable/interval"); -function sampleTime(period, scheduler) { - if (scheduler === void 0) { scheduler = async_1.asyncScheduler; } - return sample_1.sample(interval_1.interval(period, scheduler)); -} -exports.sampleTime = sampleTime; -//# sourceMappingURL=sampleTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/sampleTime.js.map b/node_modules/rxjs/dist/cjs/internal/operators/sampleTime.js.map deleted file mode 100644 index 4d47967..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/sampleTime.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sampleTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/sampleTime.ts"],"names":[],"mappings":";;;AAAA,4CAAoD;AAEpD,mCAAkC;AAClC,mDAAkD;AA6ClD,SAAgB,UAAU,CAAI,MAAc,EAAE,SAAyC;IAAzC,0BAAA,EAAA,YAA2B,sBAAc;IACrF,OAAO,eAAM,CAAC,mBAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;AAC7C,CAAC;AAFD,gCAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/scan.js b/node_modules/rxjs/dist/cjs/internal/operators/scan.js deleted file mode 100644 index eb8d1b3..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/scan.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.scan = void 0; -var lift_1 = require("../util/lift"); -var scanInternals_1 = require("./scanInternals"); -function scan(accumulator, seed) { - return lift_1.operate(scanInternals_1.scanInternals(accumulator, seed, arguments.length >= 2, true)); -} -exports.scan = scan; -//# sourceMappingURL=scan.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/scan.js.map b/node_modules/rxjs/dist/cjs/internal/operators/scan.js.map deleted file mode 100644 index f78aef4..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/scan.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scan.js","sourceRoot":"","sources":["../../../../src/internal/operators/scan.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,iDAAgD;AAqFhD,SAAgB,IAAI,CAAU,WAA2D,EAAE,IAAQ;IAMjG,OAAO,cAAO,CAAC,6BAAa,CAAC,WAAW,EAAE,IAAS,EAAE,SAAS,CAAC,MAAM,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AACrF,CAAC;AAPD,oBAOC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js b/node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js deleted file mode 100644 index 36fd8b2..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.scanInternals = void 0; -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) { - return function (source, subscriber) { - var hasState = hasSeed; - var state = seed; - var index = 0; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - var i = index++; - state = hasState - ? - accumulator(state, value, i) - : - ((hasState = true), value); - emitOnNext && subscriber.next(state); - }, emitBeforeComplete && - (function () { - hasState && subscriber.next(state); - subscriber.complete(); - }))); - }; -} -exports.scanInternals = scanInternals; -//# sourceMappingURL=scanInternals.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js.map b/node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js.map deleted file mode 100644 index d3bfecd..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/scanInternals.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scanInternals.js","sourceRoot":"","sources":["../../../../src/internal/operators/scanInternals.ts"],"names":[],"mappings":";;;AAEA,2DAAgE;AAWhE,SAAgB,aAAa,CAC3B,WAA2D,EAC3D,IAAO,EACP,OAAgB,EAChB,UAAmB,EACnB,kBAAqC;IAErC,OAAO,UAAC,MAAqB,EAAE,UAA2B;QAIxD,IAAI,QAAQ,GAAG,OAAO,CAAC;QAIvB,IAAI,KAAK,GAAQ,IAAI,CAAC;QAEtB,IAAI,KAAK,GAAG,CAAC,CAAC;QAGd,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YAEJ,IAAM,CAAC,GAAG,KAAK,EAAE,CAAC;YAElB,KAAK,GAAG,QAAQ;gBACd,CAAC;oBACC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;gBAC9B,CAAC;oBAGC,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;YAG/B,UAAU,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC,EAGD,kBAAkB;YAChB,CAAC;gBACC,QAAQ,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACnC,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC,CAAC,CACL,CACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAhDD,sCAgDC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js b/node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js deleted file mode 100644 index 9416b3a..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.sequenceEqual = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var innerFrom_1 = require("../observable/innerFrom"); -function sequenceEqual(compareTo, comparator) { - if (comparator === void 0) { comparator = function (a, b) { return a === b; }; } - return lift_1.operate(function (source, subscriber) { - var aState = createState(); - var bState = createState(); - var emit = function (isEqual) { - subscriber.next(isEqual); - subscriber.complete(); - }; - var createSubscriber = function (selfState, otherState) { - var sequenceEqualSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (a) { - var buffer = otherState.buffer, complete = otherState.complete; - if (buffer.length === 0) { - complete ? emit(false) : selfState.buffer.push(a); - } - else { - !comparator(a, buffer.shift()) && emit(false); - } - }, function () { - selfState.complete = true; - var complete = otherState.complete, buffer = otherState.buffer; - complete && emit(buffer.length === 0); - sequenceEqualSubscriber === null || sequenceEqualSubscriber === void 0 ? void 0 : sequenceEqualSubscriber.unsubscribe(); - }); - return sequenceEqualSubscriber; - }; - source.subscribe(createSubscriber(aState, bState)); - innerFrom_1.innerFrom(compareTo).subscribe(createSubscriber(bState, aState)); - }); -} -exports.sequenceEqual = sequenceEqual; -function createState() { - return { - buffer: [], - complete: false, - }; -} -//# sourceMappingURL=sequenceEqual.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js.map b/node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js.map deleted file mode 100644 index 19faf27..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/sequenceEqual.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sequenceEqual.js","sourceRoot":"","sources":["../../../../src/internal/operators/sequenceEqual.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,2DAAgE;AAChE,qDAAoD;AA2DpD,SAAgB,aAAa,CAC3B,SAA6B,EAC7B,UAAuD;IAAvD,2BAAA,EAAA,uBAAuC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,KAAK,CAAC,EAAP,CAAO;IAEvD,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAM,MAAM,GAAG,WAAW,EAAK,CAAC;QAEhC,IAAM,MAAM,GAAG,WAAW,EAAK,CAAC;QAGhC,IAAM,IAAI,GAAG,UAAC,OAAgB;YAC5B,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACzB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CAAC;QAOF,IAAM,gBAAgB,GAAG,UAAC,SAA2B,EAAE,UAA4B;YACjF,IAAM,uBAAuB,GAAG,6CAAwB,CACtD,UAAU,EACV,UAAC,CAAI;gBACK,IAAA,MAAM,GAAe,UAAU,OAAzB,EAAE,QAAQ,GAAK,UAAU,SAAf,CAAgB;gBACxC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;oBAOvB,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;iBACnD;qBAAM;oBAIL,CAAC,UAAU,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,EAAG,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;iBAChD;YACH,CAAC,EACD;gBAEE,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC;gBAClB,IAAA,QAAQ,GAAa,UAAU,SAAvB,EAAE,MAAM,GAAK,UAAU,OAAf,CAAgB;gBAKxC,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;gBAEtC,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,WAAW,EAAE,CAAC;YACzC,CAAC,CACF,CAAC;YAEF,OAAO,uBAAuB,CAAC;QACjC,CAAC,CAAC;QAGF,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;QACnD,qBAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;AACL,CAAC;AA9DD,sCA8DC;AAgBD,SAAS,WAAW;IAClB,OAAO;QACL,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,KAAK;KAChB,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/share.js b/node_modules/rxjs/dist/cjs/internal/operators/share.js deleted file mode 100644 index 71d7fda..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/share.js +++ /dev/null @@ -1,109 +0,0 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.share = void 0; -var innerFrom_1 = require("../observable/innerFrom"); -var Subject_1 = require("../Subject"); -var Subscriber_1 = require("../Subscriber"); -var lift_1 = require("../util/lift"); -function share(options) { - if (options === void 0) { options = {}; } - var _a = options.connector, connector = _a === void 0 ? function () { return new Subject_1.Subject(); } : _a, _b = options.resetOnError, resetOnError = _b === void 0 ? true : _b, _c = options.resetOnComplete, resetOnComplete = _c === void 0 ? true : _c, _d = options.resetOnRefCountZero, resetOnRefCountZero = _d === void 0 ? true : _d; - return function (wrapperSource) { - var connection; - var resetConnection; - var subject; - var refCount = 0; - var hasCompleted = false; - var hasErrored = false; - var cancelReset = function () { - resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe(); - resetConnection = undefined; - }; - var reset = function () { - cancelReset(); - connection = subject = undefined; - hasCompleted = hasErrored = false; - }; - var resetAndUnsubscribe = function () { - var conn = connection; - reset(); - conn === null || conn === void 0 ? void 0 : conn.unsubscribe(); - }; - return lift_1.operate(function (source, subscriber) { - refCount++; - if (!hasErrored && !hasCompleted) { - cancelReset(); - } - var dest = (subject = subject !== null && subject !== void 0 ? subject : connector()); - subscriber.add(function () { - refCount--; - if (refCount === 0 && !hasErrored && !hasCompleted) { - resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero); - } - }); - dest.subscribe(subscriber); - if (!connection && - refCount > 0) { - connection = new Subscriber_1.SafeSubscriber({ - next: function (value) { return dest.next(value); }, - error: function (err) { - hasErrored = true; - cancelReset(); - resetConnection = handleReset(reset, resetOnError, err); - dest.error(err); - }, - complete: function () { - hasCompleted = true; - cancelReset(); - resetConnection = handleReset(reset, resetOnComplete); - dest.complete(); - }, - }); - innerFrom_1.innerFrom(source).subscribe(connection); - } - })(wrapperSource); - }; -} -exports.share = share; -function handleReset(reset, on) { - var args = []; - for (var _i = 2; _i < arguments.length; _i++) { - args[_i - 2] = arguments[_i]; - } - if (on === true) { - reset(); - return; - } - if (on === false) { - return; - } - var onSubscriber = new Subscriber_1.SafeSubscriber({ - next: function () { - onSubscriber.unsubscribe(); - reset(); - }, - }); - return innerFrom_1.innerFrom(on.apply(void 0, __spreadArray([], __read(args)))).subscribe(onSubscriber); -} -//# sourceMappingURL=share.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/share.js.map b/node_modules/rxjs/dist/cjs/internal/operators/share.js.map deleted file mode 100644 index 768a9b0..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/share.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"share.js","sourceRoot":"","sources":["../../../../src/internal/operators/share.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAoD;AACpD,sCAAqC;AACrC,4CAA+C;AAG/C,qCAAuC;AAwIvC,SAAgB,KAAK,CAAI,OAA4B;IAA5B,wBAAA,EAAA,YAA4B;IAC3C,IAAA,KAAgH,OAAO,UAArF,EAAlC,SAAS,mBAAG,cAAM,OAAA,IAAI,iBAAO,EAAK,EAAhB,CAAgB,KAAA,EAAE,KAA4E,OAAO,aAAhE,EAAnB,YAAY,mBAAG,IAAI,KAAA,EAAE,KAAuD,OAAO,gBAAxC,EAAtB,eAAe,mBAAG,IAAI,KAAA,EAAE,KAA+B,OAAO,oBAAZ,EAA1B,mBAAmB,mBAAG,IAAI,KAAA,CAAa;IAUhI,OAAO,UAAC,aAAa;QACnB,IAAI,UAAyC,CAAC;QAC9C,IAAI,eAAyC,CAAC;QAC9C,IAAI,OAAmC,CAAC;QACxC,IAAI,QAAQ,GAAG,CAAC,CAAC;QACjB,IAAI,YAAY,GAAG,KAAK,CAAC;QACzB,IAAI,UAAU,GAAG,KAAK,CAAC;QAEvB,IAAM,WAAW,GAAG;YAClB,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,WAAW,EAAE,CAAC;YAC/B,eAAe,GAAG,SAAS,CAAC;QAC9B,CAAC,CAAC;QAGF,IAAM,KAAK,GAAG;YACZ,WAAW,EAAE,CAAC;YACd,UAAU,GAAG,OAAO,GAAG,SAAS,CAAC;YACjC,YAAY,GAAG,UAAU,GAAG,KAAK,CAAC;QACpC,CAAC,CAAC;QACF,IAAM,mBAAmB,GAAG;YAG1B,IAAM,IAAI,GAAG,UAAU,CAAC;YACxB,KAAK,EAAE,CAAC;YACR,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,EAAE,CAAC;QACtB,CAAC,CAAC;QAEF,OAAO,cAAO,CAAO,UAAC,MAAM,EAAE,UAAU;YACtC,QAAQ,EAAE,CAAC;YACX,IAAI,CAAC,UAAU,IAAI,CAAC,YAAY,EAAE;gBAChC,WAAW,EAAE,CAAC;aACf;YAMD,IAAM,IAAI,GAAG,CAAC,OAAO,GAAG,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,SAAS,EAAE,CAAC,CAAC;YAOhD,UAAU,CAAC,GAAG,CAAC;gBACb,QAAQ,EAAE,CAAC;gBAKX,IAAI,QAAQ,KAAK,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,YAAY,EAAE;oBAClD,eAAe,GAAG,WAAW,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,CAAC;iBACzE;YACH,CAAC,CAAC,CAAC;YAIH,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;YAE3B,IACE,CAAC,UAAU;gBAIX,QAAQ,GAAG,CAAC,EACZ;gBAMA,UAAU,GAAG,IAAI,2BAAc,CAAC;oBAC9B,IAAI,EAAE,UAAC,KAAK,IAAK,OAAA,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAhB,CAAgB;oBACjC,KAAK,EAAE,UAAC,GAAG;wBACT,UAAU,GAAG,IAAI,CAAC;wBAClB,WAAW,EAAE,CAAC;wBACd,eAAe,GAAG,WAAW,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,CAAC,CAAC;wBACxD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBAClB,CAAC;oBACD,QAAQ,EAAE;wBACR,YAAY,GAAG,IAAI,CAAC;wBACpB,WAAW,EAAE,CAAC;wBACd,eAAe,GAAG,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;wBACtD,IAAI,CAAC,QAAQ,EAAE,CAAC;oBAClB,CAAC;iBACF,CAAC,CAAC;gBACH,qBAAS,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;aACzC;QACH,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AArGD,sBAqGC;AAED,SAAS,WAAW,CAClB,KAAiB,EACjB,EAAoD;IACpD,cAAU;SAAV,UAAU,EAAV,qBAAU,EAAV,IAAU;QAAV,6BAAU;;IAEV,IAAI,EAAE,KAAK,IAAI,EAAE;QACf,KAAK,EAAE,CAAC;QACR,OAAO;KACR;IAED,IAAI,EAAE,KAAK,KAAK,EAAE;QAChB,OAAO;KACR;IAED,IAAM,YAAY,GAAG,IAAI,2BAAc,CAAC;QACtC,IAAI,EAAE;YACJ,YAAY,CAAC,WAAW,EAAE,CAAC;YAC3B,KAAK,EAAE,CAAC;QACV,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,qBAAS,CAAC,EAAE,wCAAI,IAAI,IAAE,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;AACxD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/shareReplay.js b/node_modules/rxjs/dist/cjs/internal/operators/shareReplay.js deleted file mode 100644 index 7fa74a2..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/shareReplay.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.shareReplay = void 0; -var ReplaySubject_1 = require("../ReplaySubject"); -var share_1 = require("./share"); -function shareReplay(configOrBufferSize, windowTime, scheduler) { - var _a, _b, _c; - var bufferSize; - var refCount = false; - if (configOrBufferSize && typeof configOrBufferSize === 'object') { - (_a = configOrBufferSize.bufferSize, bufferSize = _a === void 0 ? Infinity : _a, _b = configOrBufferSize.windowTime, windowTime = _b === void 0 ? Infinity : _b, _c = configOrBufferSize.refCount, refCount = _c === void 0 ? false : _c, scheduler = configOrBufferSize.scheduler); - } - else { - bufferSize = (configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity); - } - return share_1.share({ - connector: function () { return new ReplaySubject_1.ReplaySubject(bufferSize, windowTime, scheduler); }, - resetOnError: true, - resetOnComplete: false, - resetOnRefCountZero: refCount, - }); -} -exports.shareReplay = shareReplay; -//# sourceMappingURL=shareReplay.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/shareReplay.js.map b/node_modules/rxjs/dist/cjs/internal/operators/shareReplay.js.map deleted file mode 100644 index e94278f..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/shareReplay.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"shareReplay.js","sourceRoot":"","sources":["../../../../src/internal/operators/shareReplay.ts"],"names":[],"mappings":";;;AAAA,kDAAiD;AAEjD,iCAAgC;AAwJhC,SAAgB,WAAW,CACzB,kBAA+C,EAC/C,UAAmB,EACnB,SAAyB;;IAEzB,IAAI,UAAkB,CAAC;IACvB,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,IAAI,kBAAkB,IAAI,OAAO,kBAAkB,KAAK,QAAQ,EAAE;QAChE,CAAG,KAA8E,kBAAkB,WAA3E,EAArB,UAAU,mBAAG,QAAQ,KAAA,EAAE,KAAuD,kBAAkB,WAApD,EAArB,UAAU,mBAAG,QAAQ,KAAA,EAAE,KAAgC,kBAAkB,SAAlC,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAAE,SAAS,GAAK,kBAAkB,UAAvB,CAAwB,CAAC;KACtG;SAAM;QACL,UAAU,GAAG,CAAC,kBAAkB,aAAlB,kBAAkB,cAAlB,kBAAkB,GAAI,QAAQ,CAAW,CAAC;KACzD;IACD,OAAO,aAAK,CAAI;QACd,SAAS,EAAE,cAAM,OAAA,IAAI,6BAAa,CAAC,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC,EAApD,CAAoD;QACrE,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,KAAK;QACtB,mBAAmB,EAAE,QAAQ;KAC9B,CAAC,CAAC;AACL,CAAC;AAlBD,kCAkBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/single.js b/node_modules/rxjs/dist/cjs/internal/operators/single.js deleted file mode 100644 index f56f2c0..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/single.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.single = void 0; -var EmptyError_1 = require("../util/EmptyError"); -var SequenceError_1 = require("../util/SequenceError"); -var NotFoundError_1 = require("../util/NotFoundError"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function single(predicate) { - return lift_1.operate(function (source, subscriber) { - var hasValue = false; - var singleValue; - var seenValue = false; - var index = 0; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - seenValue = true; - if (!predicate || predicate(value, index++, source)) { - hasValue && subscriber.error(new SequenceError_1.SequenceError('Too many matching values')); - hasValue = true; - singleValue = value; - } - }, function () { - if (hasValue) { - subscriber.next(singleValue); - subscriber.complete(); - } - else { - subscriber.error(seenValue ? new NotFoundError_1.NotFoundError('No matching values') : new EmptyError_1.EmptyError()); - } - })); - }); -} -exports.single = single; -//# sourceMappingURL=single.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/single.js.map b/node_modules/rxjs/dist/cjs/internal/operators/single.js.map deleted file mode 100644 index 7321f47..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/single.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"single.js","sourceRoot":"","sources":["../../../../src/internal/operators/single.ts"],"names":[],"mappings":";;;AACA,iDAAgD;AAGhD,uDAAsD;AACtD,uDAAsD;AACtD,qCAAuC;AACvC,2DAAgE;AAqFhE,SAAgB,MAAM,CAAI,SAAuE;IAC/F,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,WAAc,CAAC;QACnB,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,SAAS,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,EAAE;gBACnD,QAAQ,IAAI,UAAU,CAAC,KAAK,CAAC,IAAI,6BAAa,CAAC,0BAA0B,CAAC,CAAC,CAAC;gBAC5E,QAAQ,GAAG,IAAI,CAAC;gBAChB,WAAW,GAAG,KAAK,CAAC;aACrB;QACH,CAAC,EACD;YACE,IAAI,QAAQ,EAAE;gBACZ,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBAC7B,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;iBAAM;gBACL,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,6BAAa,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,IAAI,uBAAU,EAAE,CAAC,CAAC;aAC1F;QACH,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA5BD,wBA4BC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/skip.js b/node_modules/rxjs/dist/cjs/internal/operators/skip.js deleted file mode 100644 index 0f0af1d..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/skip.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.skip = void 0; -var filter_1 = require("./filter"); -function skip(count) { - return filter_1.filter(function (_, index) { return count <= index; }); -} -exports.skip = skip; -//# sourceMappingURL=skip.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/skip.js.map b/node_modules/rxjs/dist/cjs/internal/operators/skip.js.map deleted file mode 100644 index 14739a8..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/skip.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"skip.js","sourceRoot":"","sources":["../../../../src/internal/operators/skip.ts"],"names":[],"mappings":";;;AACA,mCAAkC;AAmClC,SAAgB,IAAI,CAAI,KAAa;IACnC,OAAO,eAAM,CAAC,UAAC,CAAC,EAAE,KAAK,IAAK,OAAA,KAAK,IAAI,KAAK,EAAd,CAAc,CAAC,CAAC;AAC9C,CAAC;AAFD,oBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/skipLast.js b/node_modules/rxjs/dist/cjs/internal/operators/skipLast.js deleted file mode 100644 index 66e789d..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/skipLast.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.skipLast = void 0; -var identity_1 = require("../util/identity"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function skipLast(skipCount) { - return skipCount <= 0 - ? - identity_1.identity - : lift_1.operate(function (source, subscriber) { - var ring = new Array(skipCount); - var seen = 0; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - var valueIndex = seen++; - if (valueIndex < skipCount) { - ring[valueIndex] = value; - } - else { - var index = valueIndex % skipCount; - var oldValue = ring[index]; - ring[index] = value; - subscriber.next(oldValue); - } - })); - return function () { - ring = null; - }; - }); -} -exports.skipLast = skipLast; -//# sourceMappingURL=skipLast.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/skipLast.js.map b/node_modules/rxjs/dist/cjs/internal/operators/skipLast.js.map deleted file mode 100644 index 696e8e6..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/skipLast.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"skipLast.js","sourceRoot":"","sources":["../../../../src/internal/operators/skipLast.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAC5C,qCAAuC;AACvC,2DAAgE;AA4ChE,SAAgB,QAAQ,CAAI,SAAiB;IAC3C,OAAO,SAAS,IAAI,CAAC;QACnB,CAAC;YACC,mBAAQ;QACV,CAAC,CAAC,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YAIzB,IAAI,IAAI,GAAQ,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC;YAGrC,IAAI,IAAI,GAAG,CAAC,CAAC;YACb,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;gBAKzC,IAAM,UAAU,GAAG,IAAI,EAAE,CAAC;gBAC1B,IAAI,UAAU,GAAG,SAAS,EAAE;oBAI1B,IAAI,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC;iBAC1B;qBAAM;oBAIL,IAAM,KAAK,GAAG,UAAU,GAAG,SAAS,CAAC;oBAGrC,IAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;oBAC7B,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;oBAKpB,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;iBAC3B;YACH,CAAC,CAAC,CACH,CAAC;YAEF,OAAO;gBAEL,IAAI,GAAG,IAAK,CAAC;YACf,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;AACT,CAAC;AA/CD,4BA+CC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js b/node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js deleted file mode 100644 index f5d424e..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.skipUntil = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var innerFrom_1 = require("../observable/innerFrom"); -var noop_1 = require("../util/noop"); -function skipUntil(notifier) { - return lift_1.operate(function (source, subscriber) { - var taking = false; - var skipSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { - skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe(); - taking = true; - }, noop_1.noop); - innerFrom_1.innerFrom(notifier).subscribe(skipSubscriber); - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return taking && subscriber.next(value); })); - }); -} -exports.skipUntil = skipUntil; -//# sourceMappingURL=skipUntil.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js.map b/node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js.map deleted file mode 100644 index 39d8ab9..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/skipUntil.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"skipUntil.js","sourceRoot":"","sources":["../../../../src/internal/operators/skipUntil.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,2DAAgE;AAChE,qDAAoD;AACpD,qCAAoC;AA+CpC,SAAgB,SAAS,CAAI,QAA8B;IACzD,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,MAAM,GAAG,KAAK,CAAC;QAEnB,IAAM,cAAc,GAAG,6CAAwB,CAC7C,UAAU,EACV;YACE,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,WAAW,EAAE,CAAC;YAC9B,MAAM,GAAG,IAAI,CAAC;QAChB,CAAC,EACD,WAAI,CACL,CAAC;QAEF,qBAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;QAE9C,MAAM,CAAC,SAAS,CAAC,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK,IAAK,OAAA,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAhC,CAAgC,CAAC,CAAC,CAAC;IACtG,CAAC,CAAC,CAAC;AACL,CAAC;AAjBD,8BAiBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js b/node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js deleted file mode 100644 index 31c2c5f..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.skipWhile = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function skipWhile(predicate) { - return lift_1.operate(function (source, subscriber) { - var taking = false; - var index = 0; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return (taking || (taking = !predicate(value, index++))) && subscriber.next(value); })); - }); -} -exports.skipWhile = skipWhile; -//# sourceMappingURL=skipWhile.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js.map b/node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js.map deleted file mode 100644 index dbe7d19..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/skipWhile.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"skipWhile.js","sourceRoot":"","sources":["../../../../src/internal/operators/skipWhile.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,2DAAgE;AAiDhE,SAAgB,SAAS,CAAI,SAA+C;IAC1E,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,MAAM,GAAG,KAAK,CAAC;QACnB,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK,IAAK,OAAA,CAAC,MAAM,IAAI,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAA3E,CAA2E,CAAC,CAC7H,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AARD,8BAQC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/startWith.js b/node_modules/rxjs/dist/cjs/internal/operators/startWith.js deleted file mode 100644 index 3142a98..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/startWith.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.startWith = void 0; -var concat_1 = require("../observable/concat"); -var args_1 = require("../util/args"); -var lift_1 = require("../util/lift"); -function startWith() { - var values = []; - for (var _i = 0; _i < arguments.length; _i++) { - values[_i] = arguments[_i]; - } - var scheduler = args_1.popScheduler(values); - return lift_1.operate(function (source, subscriber) { - (scheduler ? concat_1.concat(values, source, scheduler) : concat_1.concat(values, source)).subscribe(subscriber); - }); -} -exports.startWith = startWith; -//# sourceMappingURL=startWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/startWith.js.map b/node_modules/rxjs/dist/cjs/internal/operators/startWith.js.map deleted file mode 100644 index 9f28c9d..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/startWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"startWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/startWith.ts"],"names":[],"mappings":";;;AAAA,+CAA8C;AAE9C,qCAA4C;AAC5C,qCAAuC;AAuDvC,SAAgB,SAAS;IAAO,gBAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,2BAAc;;IAC5C,IAAM,SAAS,GAAG,mBAAY,CAAC,MAAM,CAAC,CAAC;IACvC,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAIhC,CAAC,SAAS,CAAC,CAAC,CAAC,eAAM,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,eAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACjG,CAAC,CAAC,CAAC;AACL,CAAC;AARD,8BAQC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/subscribeOn.js b/node_modules/rxjs/dist/cjs/internal/operators/subscribeOn.js deleted file mode 100644 index 2cd97ab..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/subscribeOn.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.subscribeOn = void 0; -var lift_1 = require("../util/lift"); -function subscribeOn(scheduler, delay) { - if (delay === void 0) { delay = 0; } - return lift_1.operate(function (source, subscriber) { - subscriber.add(scheduler.schedule(function () { return source.subscribe(subscriber); }, delay)); - }); -} -exports.subscribeOn = subscribeOn; -//# sourceMappingURL=subscribeOn.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/subscribeOn.js.map b/node_modules/rxjs/dist/cjs/internal/operators/subscribeOn.js.map deleted file mode 100644 index 9ba9a68..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/subscribeOn.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"subscribeOn.js","sourceRoot":"","sources":["../../../../src/internal/operators/subscribeOn.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AA6DvC,SAAgB,WAAW,CAAI,SAAwB,EAAE,KAAiB;IAAjB,sBAAA,EAAA,SAAiB;IACxE,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,cAAM,OAAA,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,EAA5B,CAA4B,EAAE,KAAK,CAAC,CAAC,CAAC;IAChF,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,kCAIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/switchAll.js b/node_modules/rxjs/dist/cjs/internal/operators/switchAll.js deleted file mode 100644 index 0beb281..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/switchAll.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.switchAll = void 0; -var switchMap_1 = require("./switchMap"); -var identity_1 = require("../util/identity"); -function switchAll() { - return switchMap_1.switchMap(identity_1.identity); -} -exports.switchAll = switchAll; -//# sourceMappingURL=switchAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/switchAll.js.map b/node_modules/rxjs/dist/cjs/internal/operators/switchAll.js.map deleted file mode 100644 index 8b16a7a..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/switchAll.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"switchAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchAll.ts"],"names":[],"mappings":";;;AACA,yCAAwC;AACxC,6CAA4C;AA4D5C,SAAgB,SAAS;IACvB,OAAO,qBAAS,CAAC,mBAAQ,CAAC,CAAC;AAC7B,CAAC;AAFD,8BAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js b/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js deleted file mode 100644 index 0abf43d..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.switchMap = void 0; -var innerFrom_1 = require("../observable/innerFrom"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function switchMap(project, resultSelector) { - return lift_1.operate(function (source, subscriber) { - var innerSubscriber = null; - var index = 0; - var isComplete = false; - var checkComplete = function () { return isComplete && !innerSubscriber && subscriber.complete(); }; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe(); - var innerIndex = 0; - var outerIndex = index++; - innerFrom_1.innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (innerValue) { return subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue); }, function () { - innerSubscriber = null; - checkComplete(); - }))); - }, function () { - isComplete = true; - checkComplete(); - })); - }); -} -exports.switchMap = switchMap; -//# sourceMappingURL=switchMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js.map b/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js.map deleted file mode 100644 index a2d6dd5..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"switchMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchMap.ts"],"names":[],"mappings":";;;AAEA,qDAAoD;AACpD,qCAAuC;AACvC,2DAAgE;AAgFhE,SAAgB,SAAS,CACvB,OAAuC,EACvC,cAA6G;IAE7G,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,eAAe,GAA0C,IAAI,CAAC;QAClE,IAAI,KAAK,GAAG,CAAC,CAAC;QAEd,IAAI,UAAU,GAAG,KAAK,CAAC;QAIvB,IAAM,aAAa,GAAG,cAAM,OAAA,UAAU,IAAI,CAAC,eAAe,IAAI,UAAU,CAAC,QAAQ,EAAE,EAAvD,CAAuD,CAAC;QAEpF,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YAEJ,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,WAAW,EAAE,CAAC;YAC/B,IAAI,UAAU,GAAG,CAAC,CAAC;YACnB,IAAM,UAAU,GAAG,KAAK,EAAE,CAAC;YAE3B,qBAAS,CAAC,OAAO,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,SAAS,CAC7C,CAAC,eAAe,GAAG,6CAAwB,CACzC,UAAU,EAIV,UAAC,UAAU,IAAK,OAAA,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,EAA1G,CAA0G,EAC1H;gBAIE,eAAe,GAAG,IAAK,CAAC;gBACxB,aAAa,EAAE,CAAC;YAClB,CAAC,CACF,CAAC,CACH,CAAC;QACJ,CAAC,EACD;YACE,UAAU,GAAG,IAAI,CAAC;YAClB,aAAa,EAAE,CAAC;QAClB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA/CD,8BA+CC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/switchMapTo.js b/node_modules/rxjs/dist/cjs/internal/operators/switchMapTo.js deleted file mode 100644 index 626fcc1..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/switchMapTo.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.switchMapTo = void 0; -var switchMap_1 = require("./switchMap"); -var isFunction_1 = require("../util/isFunction"); -function switchMapTo(innerObservable, resultSelector) { - return isFunction_1.isFunction(resultSelector) ? switchMap_1.switchMap(function () { return innerObservable; }, resultSelector) : switchMap_1.switchMap(function () { return innerObservable; }); -} -exports.switchMapTo = switchMapTo; -//# sourceMappingURL=switchMapTo.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/switchMapTo.js.map b/node_modules/rxjs/dist/cjs/internal/operators/switchMapTo.js.map deleted file mode 100644 index fa903ae..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/switchMapTo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"switchMapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchMapTo.ts"],"names":[],"mappings":";;;AAAA,yCAAwC;AAExC,iDAAgD;AAwDhD,SAAgB,WAAW,CACzB,eAAkB,EAClB,cAA6G;IAE7G,OAAO,uBAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,qBAAS,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,qBAAS,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,CAAC,CAAC;AAC1H,CAAC;AALD,kCAKC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/switchScan.js b/node_modules/rxjs/dist/cjs/internal/operators/switchScan.js deleted file mode 100644 index 357c00b..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/switchScan.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.switchScan = void 0; -var switchMap_1 = require("./switchMap"); -var lift_1 = require("../util/lift"); -function switchScan(accumulator, seed) { - return lift_1.operate(function (source, subscriber) { - var state = seed; - switchMap_1.switchMap(function (value, index) { return accumulator(state, value, index); }, function (_, innerValue) { return ((state = innerValue), innerValue); })(source).subscribe(subscriber); - return function () { - state = null; - }; - }); -} -exports.switchScan = switchScan; -//# sourceMappingURL=switchScan.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/switchScan.js.map b/node_modules/rxjs/dist/cjs/internal/operators/switchScan.js.map deleted file mode 100644 index 5bc192b..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/switchScan.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"switchScan.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchScan.ts"],"names":[],"mappings":";;;AACA,yCAAwC;AACxC,qCAAuC;AAqBvC,SAAgB,UAAU,CACxB,WAAmD,EACnD,IAAO;IAEP,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAGhC,IAAI,KAAK,GAAG,IAAI,CAAC;QAKjB,qBAAS,CAGP,UAAC,KAAQ,EAAE,KAAK,IAAK,OAAA,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAhC,CAAgC,EAGrD,UAAC,CAAC,EAAE,UAAU,IAAK,OAAA,CAAC,CAAC,KAAK,GAAG,UAAU,CAAC,EAAE,UAAU,CAAC,EAAlC,CAAkC,CACtD,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAEhC,OAAO;YAEL,KAAK,GAAG,IAAK,CAAC;QAChB,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA1BD,gCA0BC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/take.js b/node_modules/rxjs/dist/cjs/internal/operators/take.js deleted file mode 100644 index c2c9868..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/take.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.take = void 0; -var empty_1 = require("../observable/empty"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function take(count) { - return count <= 0 - ? - function () { return empty_1.EMPTY; } - : lift_1.operate(function (source, subscriber) { - var seen = 0; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - if (++seen <= count) { - subscriber.next(value); - if (count <= seen) { - subscriber.complete(); - } - } - })); - }); -} -exports.take = take; -//# sourceMappingURL=take.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/take.js.map b/node_modules/rxjs/dist/cjs/internal/operators/take.js.map deleted file mode 100644 index 5a9c032..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/take.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"take.js","sourceRoot":"","sources":["../../../../src/internal/operators/take.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAC5C,qCAAuC;AACvC,2DAAgE;AA4ChE,SAAgB,IAAI,CAAI,KAAa;IACnC,OAAO,KAAK,IAAI,CAAC;QACf,CAAC;YACC,cAAM,OAAA,aAAK,EAAL,CAAK;QACb,CAAC,CAAC,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YACzB,IAAI,IAAI,GAAG,CAAC,CAAC;YACb,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;gBAIzC,IAAI,EAAE,IAAI,IAAI,KAAK,EAAE;oBACnB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAIvB,IAAI,KAAK,IAAI,IAAI,EAAE;wBACjB,UAAU,CAAC,QAAQ,EAAE,CAAC;qBACvB;iBACF;YACH,CAAC,CAAC,CACH,CAAC;QACJ,CAAC,CAAC,CAAC;AACT,CAAC;AAvBD,oBAuBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/takeLast.js b/node_modules/rxjs/dist/cjs/internal/operators/takeLast.js deleted file mode 100644 index 7b8d9d9..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/takeLast.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.takeLast = void 0; -var empty_1 = require("../observable/empty"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function takeLast(count) { - return count <= 0 - ? function () { return empty_1.EMPTY; } - : lift_1.operate(function (source, subscriber) { - var buffer = []; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - buffer.push(value); - count < buffer.length && buffer.shift(); - }, function () { - var e_1, _a; - try { - for (var buffer_1 = __values(buffer), buffer_1_1 = buffer_1.next(); !buffer_1_1.done; buffer_1_1 = buffer_1.next()) { - var value = buffer_1_1.value; - subscriber.next(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (buffer_1_1 && !buffer_1_1.done && (_a = buffer_1.return)) _a.call(buffer_1); - } - finally { if (e_1) throw e_1.error; } - } - subscriber.complete(); - }, undefined, function () { - buffer = null; - })); - }); -} -exports.takeLast = takeLast; -//# sourceMappingURL=takeLast.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/takeLast.js.map b/node_modules/rxjs/dist/cjs/internal/operators/takeLast.js.map deleted file mode 100644 index d55f5ac..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/takeLast.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"takeLast.js","sourceRoot":"","sources":["../../../../src/internal/operators/takeLast.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,6CAA4C;AAE5C,qCAAuC;AACvC,2DAAgE;AAyChE,SAAgB,QAAQ,CAAI,KAAa;IACvC,OAAO,KAAK,IAAI,CAAC;QACf,CAAC,CAAC,cAAM,OAAA,aAAK,EAAL,CAAK;QACb,CAAC,CAAC,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YAKzB,IAAI,MAAM,GAAQ,EAAE,CAAC;YACrB,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;gBAEJ,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAGnB,KAAK,GAAG,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;YAC1C,CAAC,EACD;;;oBAGE,KAAoB,IAAA,WAAA,SAAA,MAAM,CAAA,8BAAA,kDAAE;wBAAvB,IAAM,KAAK,mBAAA;wBACd,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;qBACxB;;;;;;;;;gBACD,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC,EAED,SAAS,EACT;gBAEE,MAAM,GAAG,IAAK,CAAC;YACjB,CAAC,CACF,CACF,CAAC;QACJ,CAAC,CAAC,CAAC;AACT,CAAC;AApCD,4BAoCC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js b/node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js deleted file mode 100644 index 0297e8e..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.takeUntil = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var innerFrom_1 = require("../observable/innerFrom"); -var noop_1 = require("../util/noop"); -function takeUntil(notifier) { - return lift_1.operate(function (source, subscriber) { - innerFrom_1.innerFrom(notifier).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { return subscriber.complete(); }, noop_1.noop)); - !subscriber.closed && source.subscribe(subscriber); - }); -} -exports.takeUntil = takeUntil; -//# sourceMappingURL=takeUntil.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js.map b/node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js.map deleted file mode 100644 index fc154ab..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/takeUntil.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"takeUntil.js","sourceRoot":"","sources":["../../../../src/internal/operators/takeUntil.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,2DAAgE;AAChE,qDAAoD;AACpD,qCAAoC;AAwCpC,SAAgB,SAAS,CAAI,QAA8B;IACzD,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,qBAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,6CAAwB,CAAC,UAAU,EAAE,cAAM,OAAA,UAAU,CAAC,QAAQ,EAAE,EAArB,CAAqB,EAAE,WAAI,CAAC,CAAC,CAAC;QACvG,CAAC,UAAU,CAAC,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;AACL,CAAC;AALD,8BAKC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js b/node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js deleted file mode 100644 index 10953cc..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.takeWhile = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function takeWhile(predicate, inclusive) { - if (inclusive === void 0) { inclusive = false; } - return lift_1.operate(function (source, subscriber) { - var index = 0; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - var result = predicate(value, index++); - (result || inclusive) && subscriber.next(value); - !result && subscriber.complete(); - })); - }); -} -exports.takeWhile = takeWhile; -//# sourceMappingURL=takeWhile.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js.map b/node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js.map deleted file mode 100644 index eba122e..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/takeWhile.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"takeWhile.js","sourceRoot":"","sources":["../../../../src/internal/operators/takeWhile.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,2DAAgE;AAoDhE,SAAgB,SAAS,CAAI,SAA+C,EAAE,SAAiB;IAAjB,0BAAA,EAAA,iBAAiB;IAC7F,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,IAAM,MAAM,GAAG,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;YACzC,CAAC,MAAM,IAAI,SAAS,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAChD,CAAC,MAAM,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACnC,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAXD,8BAWC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/tap.js b/node_modules/rxjs/dist/cjs/internal/operators/tap.js deleted file mode 100644 index 585c5c2..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/tap.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.tap = void 0; -var isFunction_1 = require("../util/isFunction"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var identity_1 = require("../util/identity"); -function tap(observerOrNext, error, complete) { - var tapObserver = isFunction_1.isFunction(observerOrNext) || error || complete - ? - { next: observerOrNext, error: error, complete: complete } - : observerOrNext; - return tapObserver - ? lift_1.operate(function (source, subscriber) { - var _a; - (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - var isUnsub = true; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - var _a; - (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value); - subscriber.next(value); - }, function () { - var _a; - isUnsub = false; - (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - subscriber.complete(); - }, function (err) { - var _a; - isUnsub = false; - (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err); - subscriber.error(err); - }, function () { - var _a, _b; - if (isUnsub) { - (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - } - (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver); - })); - }) - : - identity_1.identity; -} -exports.tap = tap; -//# sourceMappingURL=tap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/tap.js.map b/node_modules/rxjs/dist/cjs/internal/operators/tap.js.map deleted file mode 100644 index b9611e8..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/tap.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tap.js","sourceRoot":"","sources":["../../../../src/internal/operators/tap.ts"],"names":[],"mappings":";;;AACA,iDAAgD;AAChD,qCAAuC;AACvC,2DAAgE;AAChE,6CAA4C;AAkK5C,SAAgB,GAAG,CACjB,cAAsE,EACtE,KAAiC,EACjC,QAA8B;IAK9B,IAAM,WAAW,GACf,uBAAU,CAAC,cAAc,CAAC,IAAI,KAAK,IAAI,QAAQ;QAC7C,CAAC;YACE,EAAE,IAAI,EAAE,cAAyE,EAAE,KAAK,OAAA,EAAE,QAAQ,UAAA,EAA8B;QACnI,CAAC,CAAC,cAAc,CAAC;IAErB,OAAO,WAAW;QAChB,CAAC,CAAC,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;;YACzB,MAAA,WAAW,CAAC,SAAS,+CAArB,WAAW,CAAc,CAAC;YAC1B,IAAI,OAAO,GAAG,IAAI,CAAC;YACnB,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;;gBACJ,MAAA,WAAW,CAAC,IAAI,+CAAhB,WAAW,EAAQ,KAAK,CAAC,CAAC;gBAC1B,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACzB,CAAC,EACD;;gBACE,OAAO,GAAG,KAAK,CAAC;gBAChB,MAAA,WAAW,CAAC,QAAQ,+CAApB,WAAW,CAAa,CAAC;gBACzB,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC,EACD,UAAC,GAAG;;gBACF,OAAO,GAAG,KAAK,CAAC;gBAChB,MAAA,WAAW,CAAC,KAAK,+CAAjB,WAAW,EAAS,GAAG,CAAC,CAAC;gBACzB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACxB,CAAC,EACD;;gBACE,IAAI,OAAO,EAAE;oBACX,MAAA,WAAW,CAAC,WAAW,+CAAvB,WAAW,CAAgB,CAAC;iBAC7B;gBACD,MAAA,WAAW,CAAC,QAAQ,+CAApB,WAAW,CAAa,CAAC;YAC3B,CAAC,CACF,CACF,CAAC;QACJ,CAAC,CAAC;QACJ,CAAC;YAGC,mBAAQ,CAAC;AACf,CAAC;AAhDD,kBAgDC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/throttle.js b/node_modules/rxjs/dist/cjs/internal/operators/throttle.js deleted file mode 100644 index 474be8c..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/throttle.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.throttle = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var innerFrom_1 = require("../observable/innerFrom"); -function throttle(durationSelector, config) { - return lift_1.operate(function (source, subscriber) { - var _a = config !== null && config !== void 0 ? config : {}, _b = _a.leading, leading = _b === void 0 ? true : _b, _c = _a.trailing, trailing = _c === void 0 ? false : _c; - var hasValue = false; - var sendValue = null; - var throttled = null; - var isComplete = false; - var endThrottling = function () { - throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe(); - throttled = null; - if (trailing) { - send(); - isComplete && subscriber.complete(); - } - }; - var cleanupThrottling = function () { - throttled = null; - isComplete && subscriber.complete(); - }; - var startThrottle = function (value) { - return (throttled = innerFrom_1.innerFrom(durationSelector(value)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling))); - }; - var send = function () { - if (hasValue) { - hasValue = false; - var value = sendValue; - sendValue = null; - subscriber.next(value); - !isComplete && startThrottle(value); - } - }; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - hasValue = true; - sendValue = value; - !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value)); - }, function () { - isComplete = true; - !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete(); - })); - }); -} -exports.throttle = throttle; -//# sourceMappingURL=throttle.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/throttle.js.map b/node_modules/rxjs/dist/cjs/internal/operators/throttle.js.map deleted file mode 100644 index 22b6834..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/throttle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"throttle.js","sourceRoot":"","sources":["../../../../src/internal/operators/throttle.ts"],"names":[],"mappings":";;;AAGA,qCAAuC;AACvC,2DAAgE;AAChE,qDAAoD;AA8EpD,SAAgB,QAAQ,CAAI,gBAAoD,EAAE,MAAuB;IACvG,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAC1B,IAAA,KAAuC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,EAAjD,eAAc,EAAd,OAAO,mBAAG,IAAI,KAAA,EAAE,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAiB,CAAC;QAC1D,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,SAAS,GAAa,IAAI,CAAC;QAC/B,IAAI,SAAS,GAAwB,IAAI,CAAC;QAC1C,IAAI,UAAU,GAAG,KAAK,CAAC;QAEvB,IAAM,aAAa,GAAG;YACpB,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,WAAW,EAAE,CAAC;YACzB,SAAS,GAAG,IAAI,CAAC;YACjB,IAAI,QAAQ,EAAE;gBACZ,IAAI,EAAE,CAAC;gBACP,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;aACrC;QACH,CAAC,CAAC;QAEF,IAAM,iBAAiB,GAAG;YACxB,SAAS,GAAG,IAAI,CAAC;YACjB,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACtC,CAAC,CAAC;QAEF,IAAM,aAAa,GAAG,UAAC,KAAQ;YAC7B,OAAA,CAAC,SAAS,GAAG,qBAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,6CAAwB,CAAC,UAAU,EAAE,aAAa,EAAE,iBAAiB,CAAC,CAAC,CAAC;QAAlI,CAAkI,CAAC;QAErI,IAAM,IAAI,GAAG;YACX,IAAI,QAAQ,EAAE;gBAIZ,QAAQ,GAAG,KAAK,CAAC;gBACjB,IAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBAEjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,CAAC,UAAU,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC;aACrC;QACH,CAAC,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EAMV,UAAC,KAAK;YACJ,QAAQ,GAAG,IAAI,CAAC;YAChB,SAAS,GAAG,KAAK,CAAC;YAClB,CAAC,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;QACjF,CAAC,EACD;YACE,UAAU,GAAG,IAAI,CAAC;YAClB,CAAC,CAAC,QAAQ,IAAI,QAAQ,IAAI,SAAS,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACrF,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA3DD,4BA2DC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/throttleTime.js b/node_modules/rxjs/dist/cjs/internal/operators/throttleTime.js deleted file mode 100644 index e91124d..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/throttleTime.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.throttleTime = void 0; -var async_1 = require("../scheduler/async"); -var throttle_1 = require("./throttle"); -var timer_1 = require("../observable/timer"); -function throttleTime(duration, scheduler, config) { - if (scheduler === void 0) { scheduler = async_1.asyncScheduler; } - var duration$ = timer_1.timer(duration, scheduler); - return throttle_1.throttle(function () { return duration$; }, config); -} -exports.throttleTime = throttleTime; -//# sourceMappingURL=throttleTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/throttleTime.js.map b/node_modules/rxjs/dist/cjs/internal/operators/throttleTime.js.map deleted file mode 100644 index 1b7737d..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/throttleTime.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"throttleTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/throttleTime.ts"],"names":[],"mappings":";;;AAAA,4CAAoD;AACpD,uCAAsD;AAEtD,6CAA4C;AAmD5C,SAAgB,YAAY,CAC1B,QAAgB,EAChB,SAAyC,EACzC,MAAuB;IADvB,0BAAA,EAAA,YAA2B,sBAAc;IAGzC,IAAM,SAAS,GAAG,aAAK,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC7C,OAAO,mBAAQ,CAAC,cAAM,OAAA,SAAS,EAAT,CAAS,EAAE,MAAM,CAAC,CAAC;AAC3C,CAAC;AAPD,oCAOC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js b/node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js deleted file mode 100644 index fe26c0b..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.throwIfEmpty = void 0; -var EmptyError_1 = require("../util/EmptyError"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function throwIfEmpty(errorFactory) { - if (errorFactory === void 0) { errorFactory = defaultErrorFactory; } - return lift_1.operate(function (source, subscriber) { - var hasValue = false; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - hasValue = true; - subscriber.next(value); - }, function () { return (hasValue ? subscriber.complete() : subscriber.error(errorFactory())); })); - }); -} -exports.throwIfEmpty = throwIfEmpty; -function defaultErrorFactory() { - return new EmptyError_1.EmptyError(); -} -//# sourceMappingURL=throwIfEmpty.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js.map b/node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js.map deleted file mode 100644 index 577e656..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/throwIfEmpty.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"throwIfEmpty.js","sourceRoot":"","sources":["../../../../src/internal/operators/throwIfEmpty.ts"],"names":[],"mappings":";;;AAAA,iDAAgD;AAEhD,qCAAuC;AACvC,2DAAgE;AAsChE,SAAgB,YAAY,CAAI,YAA6C;IAA7C,6BAAA,EAAA,kCAA6C;IAC3E,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,QAAQ,GAAG,IAAI,CAAC;YAChB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC,EACD,cAAM,OAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,EAArE,CAAqE,CAC5E,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAdD,oCAcC;AAED,SAAS,mBAAmB;IAC1B,OAAO,IAAI,uBAAU,EAAE,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js b/node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js deleted file mode 100644 index 0a32d91..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TimeInterval = exports.timeInterval = void 0; -var async_1 = require("../scheduler/async"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function timeInterval(scheduler) { - if (scheduler === void 0) { scheduler = async_1.asyncScheduler; } - return lift_1.operate(function (source, subscriber) { - var last = scheduler.now(); - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - var now = scheduler.now(); - var interval = now - last; - last = now; - subscriber.next(new TimeInterval(value, interval)); - })); - }); -} -exports.timeInterval = timeInterval; -var TimeInterval = (function () { - function TimeInterval(value, interval) { - this.value = value; - this.interval = interval; - } - return TimeInterval; -}()); -exports.TimeInterval = TimeInterval; -//# sourceMappingURL=timeInterval.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js.map b/node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js.map deleted file mode 100644 index c8e43cb..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/timeInterval.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timeInterval.js","sourceRoot":"","sources":["../../../../src/internal/operators/timeInterval.ts"],"names":[],"mappings":";;;AAAA,4CAAoD;AAEpD,qCAAuC;AACvC,2DAAgE;AAyChE,SAAgB,YAAY,CAAI,SAAyC;IAAzC,0BAAA,EAAA,YAA2B,sBAAc;IACvE,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,IAAI,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;QAC3B,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,IAAM,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;YAC5B,IAAM,QAAQ,GAAG,GAAG,GAAG,IAAI,CAAC;YAC5B,IAAI,GAAG,GAAG,CAAC;YACX,UAAU,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;QACrD,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAZD,oCAYC;AAKD;IAIE,sBAAmB,KAAQ,EAAS,QAAgB;QAAjC,UAAK,GAAL,KAAK,CAAG;QAAS,aAAQ,GAAR,QAAQ,CAAQ;IAAG,CAAC;IAC1D,mBAAC;AAAD,CAAC,AALD,IAKC;AALY,oCAAY"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/timeout.js b/node_modules/rxjs/dist/cjs/internal/operators/timeout.js deleted file mode 100644 index eeb0e6b..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/timeout.js +++ /dev/null @@ -1,63 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.timeout = exports.TimeoutError = void 0; -var async_1 = require("../scheduler/async"); -var isDate_1 = require("../util/isDate"); -var lift_1 = require("../util/lift"); -var innerFrom_1 = require("../observable/innerFrom"); -var createErrorClass_1 = require("../util/createErrorClass"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var executeSchedule_1 = require("../util/executeSchedule"); -exports.TimeoutError = createErrorClass_1.createErrorClass(function (_super) { - return function TimeoutErrorImpl(info) { - if (info === void 0) { info = null; } - _super(this); - this.message = 'Timeout has occurred'; - this.name = 'TimeoutError'; - this.info = info; - }; -}); -function timeout(config, schedulerArg) { - var _a = (isDate_1.isValidDate(config) ? { first: config } : typeof config === 'number' ? { each: config } : config), first = _a.first, each = _a.each, _b = _a.with, _with = _b === void 0 ? timeoutErrorFactory : _b, _c = _a.scheduler, scheduler = _c === void 0 ? schedulerArg !== null && schedulerArg !== void 0 ? schedulerArg : async_1.asyncScheduler : _c, _d = _a.meta, meta = _d === void 0 ? null : _d; - if (first == null && each == null) { - throw new TypeError('No timeout provided.'); - } - return lift_1.operate(function (source, subscriber) { - var originalSourceSubscription; - var timerSubscription; - var lastValue = null; - var seen = 0; - var startTimer = function (delay) { - timerSubscription = executeSchedule_1.executeSchedule(subscriber, scheduler, function () { - try { - originalSourceSubscription.unsubscribe(); - innerFrom_1.innerFrom(_with({ - meta: meta, - lastValue: lastValue, - seen: seen, - })).subscribe(subscriber); - } - catch (err) { - subscriber.error(err); - } - }, delay); - }; - originalSourceSubscription = source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); - seen++; - subscriber.next((lastValue = value)); - each > 0 && startTimer(each); - }, undefined, undefined, function () { - if (!(timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.closed)) { - timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); - } - lastValue = null; - })); - !seen && startTimer(first != null ? (typeof first === 'number' ? first : +first - scheduler.now()) : each); - }); -} -exports.timeout = timeout; -function timeoutErrorFactory(info) { - throw new exports.TimeoutError(info); -} -//# sourceMappingURL=timeout.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/timeout.js.map b/node_modules/rxjs/dist/cjs/internal/operators/timeout.js.map deleted file mode 100644 index 4a8c350..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/timeout.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timeout.js","sourceRoot":"","sources":["../../../../src/internal/operators/timeout.ts"],"names":[],"mappings":";;;AAAA,4CAAoD;AAEpD,yCAA6C;AAE7C,qCAAuC;AAEvC,qDAAoD;AACpD,6DAA4D;AAC5D,2DAAgE;AAChE,2DAA0D;AA4E7C,QAAA,YAAY,GAAqB,mCAAgB,CAC5D,UAAC,MAAM;IACL,OAAA,SAAS,gBAAgB,CAAY,IAAoC;QAApC,qBAAA,EAAA,WAAoC;QACvE,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,OAAO,GAAG,sBAAsB,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;AALD,CAKC,CACJ,CAAC;AA6MF,SAAgB,OAAO,CACrB,MAA8C,EAC9C,YAA4B;IAStB,IAAA,KAMF,CAAC,oBAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,CAA2B,EAL9H,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,YAAiC,EAA3B,KAAK,mBAAG,mBAAmB,KAAA,EACjC,iBAA0C,EAA1C,SAAS,mBAAG,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,sBAAc,KAAA,EAC1C,YAAY,EAAZ,IAAI,mBAAG,IAAK,KACkH,CAAC;IAEjI,IAAI,KAAK,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE;QAEjC,MAAM,IAAI,SAAS,CAAC,sBAAsB,CAAC,CAAC;KAC7C;IAED,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAMhC,IAAI,0BAAwC,CAAC;QAG7C,IAAI,iBAA+B,CAAC;QAGpC,IAAI,SAAS,GAAa,IAAI,CAAC;QAG/B,IAAI,IAAI,GAAG,CAAC,CAAC;QACb,IAAM,UAAU,GAAG,UAAC,KAAa;YAC/B,iBAAiB,GAAG,iCAAe,CACjC,UAAU,EACV,SAAS,EACT;gBACE,IAAI;oBACF,0BAA0B,CAAC,WAAW,EAAE,CAAC;oBACzC,qBAAS,CACP,KAAM,CAAC;wBACL,IAAI,MAAA;wBACJ,SAAS,WAAA;wBACT,IAAI,MAAA;qBACL,CAAC,CACH,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;iBACzB;gBAAC,OAAO,GAAG,EAAE;oBACZ,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACvB;YACH,CAAC,EACD,KAAK,CACN,CAAC;QACJ,CAAC,CAAC;QAEF,0BAA0B,GAAG,MAAM,CAAC,SAAS,CAC3C,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAQ;YAEP,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,WAAW,EAAE,CAAC;YACjC,IAAI,EAAE,CAAC;YAEP,UAAU,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC;YAErC,IAAK,GAAG,CAAC,IAAI,UAAU,CAAC,IAAK,CAAC,CAAC;QACjC,CAAC,EACD,SAAS,EACT,SAAS,EACT;YACE,IAAI,CAAC,CAAA,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,MAAM,CAAA,EAAE;gBAC9B,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,WAAW,EAAE,CAAC;aAClC;YAGD,SAAS,GAAG,IAAI,CAAC;QACnB,CAAC,CACF,CACF,CAAC;QAQF,CAAC,IAAI,IAAI,UAAU,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,SAAU,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,IAAK,CAAC,CAAC;IAC/G,CAAC,CAAC,CAAC;AACL,CAAC;AA/FD,0BA+FC;AAOD,SAAS,mBAAmB,CAAC,IAAsB;IACjD,MAAM,IAAI,oBAAY,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/timeoutWith.js b/node_modules/rxjs/dist/cjs/internal/operators/timeoutWith.js deleted file mode 100644 index 5811d86..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/timeoutWith.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.timeoutWith = void 0; -var async_1 = require("../scheduler/async"); -var isDate_1 = require("../util/isDate"); -var timeout_1 = require("./timeout"); -function timeoutWith(due, withObservable, scheduler) { - var first; - var each; - var _with; - scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : async_1.async; - if (isDate_1.isValidDate(due)) { - first = due; - } - else if (typeof due === 'number') { - each = due; - } - if (withObservable) { - _with = function () { return withObservable; }; - } - else { - throw new TypeError('No observable provided to switch to'); - } - if (first == null && each == null) { - throw new TypeError('No timeout provided.'); - } - return timeout_1.timeout({ - first: first, - each: each, - scheduler: scheduler, - with: _with, - }); -} -exports.timeoutWith = timeoutWith; -//# sourceMappingURL=timeoutWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/timeoutWith.js.map b/node_modules/rxjs/dist/cjs/internal/operators/timeoutWith.js.map deleted file mode 100644 index b524d77..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/timeoutWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timeoutWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/timeoutWith.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAC3C,yCAA6C;AAE7C,qCAAoC;AA+EpC,SAAgB,WAAW,CACzB,GAAkB,EAClB,cAAkC,EAClC,SAAyB;IAEzB,IAAI,KAAgC,CAAC;IACrC,IAAI,IAAwB,CAAC;IAC7B,IAAI,KAA+B,CAAC;IACpC,SAAS,GAAG,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,aAAK,CAAC;IAE/B,IAAI,oBAAW,CAAC,GAAG,CAAC,EAAE;QACpB,KAAK,GAAG,GAAG,CAAC;KACb;SAAM,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QAClC,IAAI,GAAG,GAAG,CAAC;KACZ;IAED,IAAI,cAAc,EAAE;QAClB,KAAK,GAAG,cAAM,OAAA,cAAc,EAAd,CAAc,CAAC;KAC9B;SAAM;QACL,MAAM,IAAI,SAAS,CAAC,qCAAqC,CAAC,CAAC;KAC5D;IAED,IAAI,KAAK,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE;QAEjC,MAAM,IAAI,SAAS,CAAC,sBAAsB,CAAC,CAAC;KAC7C;IAED,OAAO,iBAAO,CAAwB;QACpC,KAAK,OAAA;QACL,IAAI,MAAA;QACJ,SAAS,WAAA;QACT,IAAI,EAAE,KAAK;KACZ,CAAC,CAAC;AACL,CAAC;AAjCD,kCAiCC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/timestamp.js b/node_modules/rxjs/dist/cjs/internal/operators/timestamp.js deleted file mode 100644 index 274b888..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/timestamp.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.timestamp = void 0; -var dateTimestampProvider_1 = require("../scheduler/dateTimestampProvider"); -var map_1 = require("./map"); -function timestamp(timestampProvider) { - if (timestampProvider === void 0) { timestampProvider = dateTimestampProvider_1.dateTimestampProvider; } - return map_1.map(function (value) { return ({ value: value, timestamp: timestampProvider.now() }); }); -} -exports.timestamp = timestamp; -//# sourceMappingURL=timestamp.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/timestamp.js.map b/node_modules/rxjs/dist/cjs/internal/operators/timestamp.js.map deleted file mode 100644 index d3f74a7..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/timestamp.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timestamp.js","sourceRoot":"","sources":["../../../../src/internal/operators/timestamp.ts"],"names":[],"mappings":";;;AACA,4EAA2E;AAC3E,6BAA4B;AAkC5B,SAAgB,SAAS,CAAI,iBAA4D;IAA5D,kCAAA,EAAA,oBAAuC,6CAAqB;IACvF,OAAO,SAAG,CAAC,UAAC,KAAQ,IAAK,OAAA,CAAC,EAAE,KAAK,OAAA,EAAE,SAAS,EAAE,iBAAiB,CAAC,GAAG,EAAE,EAAE,CAAC,EAA/C,CAA+C,CAAC,CAAC;AAC5E,CAAC;AAFD,8BAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/toArray.js b/node_modules/rxjs/dist/cjs/internal/operators/toArray.js deleted file mode 100644 index 51ef796..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/toArray.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.toArray = void 0; -var reduce_1 = require("./reduce"); -var lift_1 = require("../util/lift"); -var arrReducer = function (arr, value) { return (arr.push(value), arr); }; -function toArray() { - return lift_1.operate(function (source, subscriber) { - reduce_1.reduce(arrReducer, [])(source).subscribe(subscriber); - }); -} -exports.toArray = toArray; -//# sourceMappingURL=toArray.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/toArray.js.map b/node_modules/rxjs/dist/cjs/internal/operators/toArray.js.map deleted file mode 100644 index 761a761..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/toArray.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"toArray.js","sourceRoot":"","sources":["../../../../src/internal/operators/toArray.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAElC,qCAAuC;AAEvC,IAAM,UAAU,GAAG,UAAC,GAAU,EAAE,KAAU,IAAK,OAAA,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,EAAtB,CAAsB,CAAC;AAgCtE,SAAgB,OAAO;IAIrB,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,eAAM,CAAC,UAAU,EAAE,EAAS,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACL,CAAC;AAPD,0BAOC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/window.js b/node_modules/rxjs/dist/cjs/internal/operators/window.js deleted file mode 100644 index a2bc14b..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/window.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.window = void 0; -var Subject_1 = require("../Subject"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var noop_1 = require("../util/noop"); -var innerFrom_1 = require("../observable/innerFrom"); -function window(windowBoundaries) { - return lift_1.operate(function (source, subscriber) { - var windowSubject = new Subject_1.Subject(); - subscriber.next(windowSubject.asObservable()); - var errorHandler = function (err) { - windowSubject.error(err); - subscriber.error(err); - }; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.next(value); }, function () { - windowSubject.complete(); - subscriber.complete(); - }, errorHandler)); - innerFrom_1.innerFrom(windowBoundaries).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function () { - windowSubject.complete(); - subscriber.next((windowSubject = new Subject_1.Subject())); - }, noop_1.noop, errorHandler)); - return function () { - windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.unsubscribe(); - windowSubject = null; - }; - }); -} -exports.window = window; -//# sourceMappingURL=window.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/window.js.map b/node_modules/rxjs/dist/cjs/internal/operators/window.js.map deleted file mode 100644 index 244fe91..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/window.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"window.js","sourceRoot":"","sources":["../../../../src/internal/operators/window.ts"],"names":[],"mappings":";;;AAEA,sCAAqC;AACrC,qCAAuC;AACvC,2DAAgE;AAChE,qCAAoC;AACpC,qDAAoD;AA8CpD,SAAgB,MAAM,CAAI,gBAAsC;IAC9D,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,aAAa,GAAe,IAAI,iBAAO,EAAK,CAAC;QAEjD,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC,CAAC;QAE9C,IAAM,YAAY,GAAG,UAAC,GAAQ;YAC5B,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACzB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,CAAC;QAGF,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK,IAAK,OAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,IAAI,CAAC,KAAK,CAAC,EAA1B,CAA0B,EACrC;YACE,aAAa,CAAC,QAAQ,EAAE,CAAC;YACzB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,YAAY,CACb,CACF,CAAC;QAGF,qBAAS,CAAC,gBAAgB,CAAC,CAAC,SAAS,CACnC,6CAAwB,CACtB,UAAU,EACV;YACE,aAAa,CAAC,QAAQ,EAAE,CAAC;YACzB,UAAU,CAAC,IAAI,CAAC,CAAC,aAAa,GAAG,IAAI,iBAAO,EAAE,CAAC,CAAC,CAAC;QACnD,CAAC,EACD,WAAI,EACJ,YAAY,CACb,CACF,CAAC;QAEF,OAAO;YAIL,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,WAAW,EAAE,CAAC;YAC7B,aAAa,GAAG,IAAK,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA7CD,wBA6CC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/windowCount.js b/node_modules/rxjs/dist/cjs/internal/operators/windowCount.js deleted file mode 100644 index 2de7fb1..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/windowCount.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.windowCount = void 0; -var Subject_1 = require("../Subject"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -function windowCount(windowSize, startWindowEvery) { - if (startWindowEvery === void 0) { startWindowEvery = 0; } - var startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize; - return lift_1.operate(function (source, subscriber) { - var windows = [new Subject_1.Subject()]; - var starts = []; - var count = 0; - subscriber.next(windows[0].asObservable()); - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - var e_1, _a; - try { - for (var windows_1 = __values(windows), windows_1_1 = windows_1.next(); !windows_1_1.done; windows_1_1 = windows_1.next()) { - var window_1 = windows_1_1.value; - window_1.next(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (windows_1_1 && !windows_1_1.done && (_a = windows_1.return)) _a.call(windows_1); - } - finally { if (e_1) throw e_1.error; } - } - var c = count - windowSize + 1; - if (c >= 0 && c % startEvery === 0) { - windows.shift().complete(); - } - if (++count % startEvery === 0) { - var window_2 = new Subject_1.Subject(); - windows.push(window_2); - subscriber.next(window_2.asObservable()); - } - }, function () { - while (windows.length > 0) { - windows.shift().complete(); - } - subscriber.complete(); - }, function (err) { - while (windows.length > 0) { - windows.shift().error(err); - } - subscriber.error(err); - }, function () { - starts = null; - windows = null; - })); - }); -} -exports.windowCount = windowCount; -//# sourceMappingURL=windowCount.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/windowCount.js.map b/node_modules/rxjs/dist/cjs/internal/operators/windowCount.js.map deleted file mode 100644 index 1393ab6..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/windowCount.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"windowCount.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowCount.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,sCAAqC;AAErC,qCAAuC;AACvC,2DAAgE;AA+DhE,SAAgB,WAAW,CAAI,UAAkB,EAAE,gBAA4B;IAA5B,iCAAA,EAAA,oBAA4B;IAC7E,IAAM,UAAU,GAAG,gBAAgB,GAAG,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,UAAU,CAAC;IAExE,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,OAAO,GAAG,CAAC,IAAI,iBAAO,EAAK,CAAC,CAAC;QACjC,IAAI,MAAM,GAAa,EAAE,CAAC;QAC1B,IAAI,KAAK,GAAG,CAAC,CAAC;QAGd,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC;QAE3C,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAQ;;;gBAIP,KAAqB,IAAA,YAAA,SAAA,OAAO,CAAA,gCAAA,qDAAE;oBAAzB,IAAM,QAAM,oBAAA;oBACf,QAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBACpB;;;;;;;;;YAMD,IAAM,CAAC,GAAG,KAAK,GAAG,UAAU,GAAG,CAAC,CAAC;YACjC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,UAAU,KAAK,CAAC,EAAE;gBAClC,OAAO,CAAC,KAAK,EAAG,CAAC,QAAQ,EAAE,CAAC;aAC7B;YAOD,IAAI,EAAE,KAAK,GAAG,UAAU,KAAK,CAAC,EAAE;gBAC9B,IAAM,QAAM,GAAG,IAAI,iBAAO,EAAK,CAAC;gBAChC,OAAO,CAAC,IAAI,CAAC,QAAM,CAAC,CAAC;gBACrB,UAAU,CAAC,IAAI,CAAC,QAAM,CAAC,YAAY,EAAE,CAAC,CAAC;aACxC;QACH,CAAC,EACD;YACE,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,QAAQ,EAAE,CAAC;aAC7B;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,UAAC,GAAG;YACF,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aAC7B;YACD,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,EACD;YACE,MAAM,GAAG,IAAK,CAAC;YACf,OAAO,GAAG,IAAK,CAAC;QAClB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA7DD,kCA6DC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/windowTime.js b/node_modules/rxjs/dist/cjs/internal/operators/windowTime.js deleted file mode 100644 index ba43677..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/windowTime.js +++ /dev/null @@ -1,74 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.windowTime = void 0; -var Subject_1 = require("../Subject"); -var async_1 = require("../scheduler/async"); -var Subscription_1 = require("../Subscription"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var arrRemove_1 = require("../util/arrRemove"); -var args_1 = require("../util/args"); -var executeSchedule_1 = require("../util/executeSchedule"); -function windowTime(windowTimeSpan) { - var _a, _b; - var otherArgs = []; - for (var _i = 1; _i < arguments.length; _i++) { - otherArgs[_i - 1] = arguments[_i]; - } - var scheduler = (_a = args_1.popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : async_1.asyncScheduler; - var windowCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; - var maxWindowSize = otherArgs[1] || Infinity; - return lift_1.operate(function (source, subscriber) { - var windowRecords = []; - var restartOnClose = false; - var closeWindow = function (record) { - var window = record.window, subs = record.subs; - window.complete(); - subs.unsubscribe(); - arrRemove_1.arrRemove(windowRecords, record); - restartOnClose && startWindow(); - }; - var startWindow = function () { - if (windowRecords) { - var subs = new Subscription_1.Subscription(); - subscriber.add(subs); - var window_1 = new Subject_1.Subject(); - var record_1 = { - window: window_1, - subs: subs, - seen: 0, - }; - windowRecords.push(record_1); - subscriber.next(window_1.asObservable()); - executeSchedule_1.executeSchedule(subs, scheduler, function () { return closeWindow(record_1); }, windowTimeSpan); - } - }; - if (windowCreationInterval !== null && windowCreationInterval >= 0) { - executeSchedule_1.executeSchedule(subscriber, scheduler, startWindow, windowCreationInterval, true); - } - else { - restartOnClose = true; - } - startWindow(); - var loop = function (cb) { return windowRecords.slice().forEach(cb); }; - var terminate = function (cb) { - loop(function (_a) { - var window = _a.window; - return cb(window); - }); - cb(subscriber); - subscriber.unsubscribe(); - }; - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - loop(function (record) { - record.window.next(value); - maxWindowSize <= ++record.seen && closeWindow(record); - }); - }, function () { return terminate(function (consumer) { return consumer.complete(); }); }, function (err) { return terminate(function (consumer) { return consumer.error(err); }); })); - return function () { - windowRecords = null; - }; - }); -} -exports.windowTime = windowTime; -//# sourceMappingURL=windowTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/windowTime.js.map b/node_modules/rxjs/dist/cjs/internal/operators/windowTime.js.map deleted file mode 100644 index e4d51f9..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/windowTime.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"windowTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowTime.ts"],"names":[],"mappings":";;;AAAA,sCAAqC;AACrC,4CAAoD;AAEpD,gDAA+C;AAE/C,qCAAuC;AACvC,2DAAgE;AAChE,+CAA8C;AAC9C,qCAA4C;AAC5C,2DAA0D;AAgG1D,SAAgB,UAAU,CAAI,cAAsB;;IAAE,mBAAmB;SAAnB,UAAmB,EAAnB,qBAAmB,EAAnB,IAAmB;QAAnB,kCAAmB;;IACvE,IAAM,SAAS,GAAG,MAAA,mBAAY,CAAC,SAAS,CAAC,mCAAI,sBAAc,CAAC;IAC5D,IAAM,sBAAsB,GAAG,MAAC,SAAS,CAAC,CAAC,CAAY,mCAAI,IAAI,CAAC;IAChE,IAAM,aAAa,GAAI,SAAS,CAAC,CAAC,CAAY,IAAI,QAAQ,CAAC;IAE3D,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,aAAa,GAA6B,EAAE,CAAC;QAGjD,IAAI,cAAc,GAAG,KAAK,CAAC;QAE3B,IAAM,WAAW,GAAG,UAAC,MAAkD;YAC7D,IAAA,MAAM,GAAW,MAAM,OAAjB,EAAE,IAAI,GAAK,MAAM,KAAX,CAAY;YAChC,MAAM,CAAC,QAAQ,EAAE,CAAC;YAClB,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,qBAAS,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;YACjC,cAAc,IAAI,WAAW,EAAE,CAAC;QAClC,CAAC,CAAC;QAMF,IAAM,WAAW,GAAG;YAClB,IAAI,aAAa,EAAE;gBACjB,IAAM,IAAI,GAAG,IAAI,2BAAY,EAAE,CAAC;gBAChC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBACrB,IAAM,QAAM,GAAG,IAAI,iBAAO,EAAK,CAAC;gBAChC,IAAM,QAAM,GAAG;oBACb,MAAM,UAAA;oBACN,IAAI,MAAA;oBACJ,IAAI,EAAE,CAAC;iBACR,CAAC;gBACF,aAAa,CAAC,IAAI,CAAC,QAAM,CAAC,CAAC;gBAC3B,UAAU,CAAC,IAAI,CAAC,QAAM,CAAC,YAAY,EAAE,CAAC,CAAC;gBACvC,iCAAe,CAAC,IAAI,EAAE,SAAS,EAAE,cAAM,OAAA,WAAW,CAAC,QAAM,CAAC,EAAnB,CAAmB,EAAE,cAAc,CAAC,CAAC;aAC7E;QACH,CAAC,CAAC;QAEF,IAAI,sBAAsB,KAAK,IAAI,IAAI,sBAAsB,IAAI,CAAC,EAAE;YAIlE,iCAAe,CAAC,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,sBAAsB,EAAE,IAAI,CAAC,CAAC;SACnF;aAAM;YACL,cAAc,GAAG,IAAI,CAAC;SACvB;QAED,WAAW,EAAE,CAAC;QAQd,IAAM,IAAI,GAAG,UAAC,EAAqC,IAAK,OAAA,aAAc,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,EAAlC,CAAkC,CAAC;QAM3F,IAAM,SAAS,GAAG,UAAC,EAAqC;YACtD,IAAI,CAAC,UAAC,EAAU;oBAAR,MAAM,YAAA;gBAAO,OAAA,EAAE,CAAC,MAAM,CAAC;YAAV,CAAU,CAAC,CAAC;YACjC,EAAE,CAAC,UAAU,CAAC,CAAC;YACf,UAAU,CAAC,WAAW,EAAE,CAAC;QAC3B,CAAC,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAQ;YAEP,IAAI,CAAC,UAAC,MAAM;gBACV,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAE1B,aAAa,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;YACxD,CAAC,CAAC,CAAC;QACL,CAAC,EAED,cAAM,OAAA,SAAS,CAAC,UAAC,QAAQ,IAAK,OAAA,QAAQ,CAAC,QAAQ,EAAE,EAAnB,CAAmB,CAAC,EAA5C,CAA4C,EAElD,UAAC,GAAG,IAAK,OAAA,SAAS,CAAC,UAAC,QAAQ,IAAK,OAAA,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,EAAnB,CAAmB,CAAC,EAA5C,CAA4C,CACtD,CACF,CAAC;QAKF,OAAO;YAEL,aAAa,GAAG,IAAK,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA/FD,gCA+FC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js b/node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js deleted file mode 100644 index 10d4d74..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js +++ /dev/null @@ -1,80 +0,0 @@ -"use strict"; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.windowToggle = void 0; -var Subject_1 = require("../Subject"); -var Subscription_1 = require("../Subscription"); -var lift_1 = require("../util/lift"); -var innerFrom_1 = require("../observable/innerFrom"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var noop_1 = require("../util/noop"); -var arrRemove_1 = require("../util/arrRemove"); -function windowToggle(openings, closingSelector) { - return lift_1.operate(function (source, subscriber) { - var windows = []; - var handleError = function (err) { - while (0 < windows.length) { - windows.shift().error(err); - } - subscriber.error(err); - }; - innerFrom_1.innerFrom(openings).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (openValue) { - var window = new Subject_1.Subject(); - windows.push(window); - var closingSubscription = new Subscription_1.Subscription(); - var closeWindow = function () { - arrRemove_1.arrRemove(windows, window); - window.complete(); - closingSubscription.unsubscribe(); - }; - var closingNotifier; - try { - closingNotifier = innerFrom_1.innerFrom(closingSelector(openValue)); - } - catch (err) { - handleError(err); - return; - } - subscriber.next(window.asObservable()); - closingSubscription.add(closingNotifier.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, closeWindow, noop_1.noop, handleError))); - }, noop_1.noop)); - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - var e_1, _a; - var windowsCopy = windows.slice(); - try { - for (var windowsCopy_1 = __values(windowsCopy), windowsCopy_1_1 = windowsCopy_1.next(); !windowsCopy_1_1.done; windowsCopy_1_1 = windowsCopy_1.next()) { - var window_1 = windowsCopy_1_1.value; - window_1.next(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (windowsCopy_1_1 && !windowsCopy_1_1.done && (_a = windowsCopy_1.return)) _a.call(windowsCopy_1); - } - finally { if (e_1) throw e_1.error; } - } - }, function () { - while (0 < windows.length) { - windows.shift().complete(); - } - subscriber.complete(); - }, handleError, function () { - while (0 < windows.length) { - windows.shift().unsubscribe(); - } - })); - }); -} -exports.windowToggle = windowToggle; -//# sourceMappingURL=windowToggle.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js.map b/node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js.map deleted file mode 100644 index d233f69..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/windowToggle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"windowToggle.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowToggle.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,sCAAqC;AACrC,gDAA+C;AAE/C,qCAAuC;AACvC,qDAAoD;AACpD,2DAAgE;AAChE,qCAAoC;AACpC,+CAA8C;AA+C9C,SAAgB,YAAY,CAC1B,QAA4B,EAC5B,eAAuD;IAEvD,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAM,OAAO,GAAiB,EAAE,CAAC;QAEjC,IAAM,WAAW,GAAG,UAAC,GAAQ;YAC3B,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aAC7B;YACD,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,CAAC;QAEF,qBAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAC3B,6CAAwB,CACtB,UAAU,EACV,UAAC,SAAS;YACR,IAAM,MAAM,GAAG,IAAI,iBAAO,EAAK,CAAC;YAChC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACrB,IAAM,mBAAmB,GAAG,IAAI,2BAAY,EAAE,CAAC;YAC/C,IAAM,WAAW,GAAG;gBAClB,qBAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;gBAC3B,MAAM,CAAC,QAAQ,EAAE,CAAC;gBAClB,mBAAmB,CAAC,WAAW,EAAE,CAAC;YACpC,CAAC,CAAC;YAEF,IAAI,eAAgC,CAAC;YACrC,IAAI;gBACF,eAAe,GAAG,qBAAS,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC;aACzD;YAAC,OAAO,GAAG,EAAE;gBACZ,WAAW,CAAC,GAAG,CAAC,CAAC;gBACjB,OAAO;aACR;YAED,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;YAEvC,mBAAmB,CAAC,GAAG,CAAC,eAAe,CAAC,SAAS,CAAC,6CAAwB,CAAC,UAAU,EAAE,WAAW,EAAE,WAAI,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;QAC3H,CAAC,EACD,WAAI,CACL,CACF,CAAC;QAGF,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAQ;;YAGP,IAAM,WAAW,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;;gBACpC,KAAqB,IAAA,gBAAA,SAAA,WAAW,CAAA,wCAAA,iEAAE;oBAA7B,IAAM,QAAM,wBAAA;oBACf,QAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBACpB;;;;;;;;;QACH,CAAC,EACD;YAEE,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,QAAQ,EAAE,CAAC;aAC7B;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,WAAW,EACX;YAME,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,WAAW,EAAE,CAAC;aAChC;QACH,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA5ED,oCA4EC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js b/node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js deleted file mode 100644 index 8c7ded1..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.windowWhen = void 0; -var Subject_1 = require("../Subject"); -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var innerFrom_1 = require("../observable/innerFrom"); -function windowWhen(closingSelector) { - return lift_1.operate(function (source, subscriber) { - var window; - var closingSubscriber; - var handleError = function (err) { - window.error(err); - subscriber.error(err); - }; - var openWindow = function () { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); - window === null || window === void 0 ? void 0 : window.complete(); - window = new Subject_1.Subject(); - subscriber.next(window.asObservable()); - var closingNotifier; - try { - closingNotifier = innerFrom_1.innerFrom(closingSelector()); - } - catch (err) { - handleError(err); - return; - } - closingNotifier.subscribe((closingSubscriber = OperatorSubscriber_1.createOperatorSubscriber(subscriber, openWindow, openWindow, handleError))); - }; - openWindow(); - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return window.next(value); }, function () { - window.complete(); - subscriber.complete(); - }, handleError, function () { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); - window = null; - })); - }); -} -exports.windowWhen = windowWhen; -//# sourceMappingURL=windowWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js.map b/node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js.map deleted file mode 100644 index d3b228f..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/windowWhen.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"windowWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowWhen.ts"],"names":[],"mappings":";;;AAEA,sCAAqC;AAErC,qCAAuC;AACvC,2DAAgE;AAChE,qDAAoD;AA+CpD,SAAgB,UAAU,CAAI,eAA2C;IACvE,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,MAAyB,CAAC;QAC9B,IAAI,iBAA8C,CAAC;QAMnD,IAAM,WAAW,GAAG,UAAC,GAAQ;YAC3B,MAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACnB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,CAAC;QAQF,IAAM,UAAU,GAAG;YAGjB,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,WAAW,EAAE,CAAC;YAGjC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,EAAE,CAAC;YAGnB,MAAM,GAAG,IAAI,iBAAO,EAAK,CAAC;YAC1B,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;YAGvC,IAAI,eAAgC,CAAC;YACrC,IAAI;gBACF,eAAe,GAAG,qBAAS,CAAC,eAAe,EAAE,CAAC,CAAC;aAChD;YAAC,OAAO,GAAG,EAAE;gBACZ,WAAW,CAAC,GAAG,CAAC,CAAC;gBACjB,OAAO;aACR;YAMD,eAAe,CAAC,SAAS,CAAC,CAAC,iBAAiB,GAAG,6CAAwB,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;QAC7H,CAAC,CAAC;QAGF,UAAU,EAAE,CAAC;QAGb,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK,IAAK,OAAA,MAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAnB,CAAmB,EAC9B;YAEE,MAAO,CAAC,QAAQ,EAAE,CAAC;YACnB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,WAAW,EACX;YAGE,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,WAAW,EAAE,CAAC;YACjC,MAAM,GAAG,IAAK,CAAC;QACjB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAvED,gCAuEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js b/node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js deleted file mode 100644 index 8ccfcd9..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js +++ /dev/null @@ -1,63 +0,0 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.withLatestFrom = void 0; -var lift_1 = require("../util/lift"); -var OperatorSubscriber_1 = require("./OperatorSubscriber"); -var innerFrom_1 = require("../observable/innerFrom"); -var identity_1 = require("../util/identity"); -var noop_1 = require("../util/noop"); -var args_1 = require("../util/args"); -function withLatestFrom() { - var inputs = []; - for (var _i = 0; _i < arguments.length; _i++) { - inputs[_i] = arguments[_i]; - } - var project = args_1.popResultSelector(inputs); - return lift_1.operate(function (source, subscriber) { - var len = inputs.length; - var otherValues = new Array(len); - var hasValue = inputs.map(function () { return false; }); - var ready = false; - var _loop_1 = function (i) { - innerFrom_1.innerFrom(inputs[i]).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - otherValues[i] = value; - if (!ready && !hasValue[i]) { - hasValue[i] = true; - (ready = hasValue.every(identity_1.identity)) && (hasValue = null); - } - }, noop_1.noop)); - }; - for (var i = 0; i < len; i++) { - _loop_1(i); - } - source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { - if (ready) { - var values = __spreadArray([value], __read(otherValues)); - subscriber.next(project ? project.apply(void 0, __spreadArray([], __read(values))) : values); - } - })); - }); -} -exports.withLatestFrom = withLatestFrom; -//# sourceMappingURL=withLatestFrom.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js.map b/node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js.map deleted file mode 100644 index 5700554..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/withLatestFrom.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"withLatestFrom.js","sourceRoot":"","sources":["../../../../src/internal/operators/withLatestFrom.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,qCAAuC;AACvC,2DAAgE;AAChE,qDAAoD;AACpD,6CAA4C;AAC5C,qCAAoC;AACpC,qCAAiD;AAoDjD,SAAgB,cAAc;IAAO,gBAAgB;SAAhB,UAAgB,EAAhB,qBAAgB,EAAhB,IAAgB;QAAhB,2BAAgB;;IACnD,IAAM,OAAO,GAAG,wBAAiB,CAAC,MAAM,CAAwC,CAAC;IAEjF,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;QAC1B,IAAM,WAAW,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;QAInC,IAAI,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,cAAM,OAAA,KAAK,EAAL,CAAK,CAAC,CAAC;QAGvC,IAAI,KAAK,GAAG,KAAK,CAAC;gCAMT,CAAC;YACR,qBAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAC5B,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;gBACJ,WAAW,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;gBACvB,IAAI,CAAC,KAAK,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;oBAE1B,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;oBAKnB,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,mBAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAK,CAAC,CAAC;iBAC1D;YACH,CAAC,EAGD,WAAI,CACL,CACF,CAAC;;QApBJ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE;oBAAnB,CAAC;SAqBT;QAGD,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,IAAI,KAAK,EAAE;gBAET,IAAM,MAAM,kBAAI,KAAK,UAAK,WAAW,EAAC,CAAC;gBACvC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,wCAAI,MAAM,IAAE,CAAC,CAAC,MAAM,CAAC,CAAC;aACxD;QACH,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AApDD,wCAoDC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/zip.js b/node_modules/rxjs/dist/cjs/internal/operators/zip.js deleted file mode 100644 index 8074fad..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/zip.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.zip = void 0; -var zip_1 = require("../observable/zip"); -var lift_1 = require("../util/lift"); -function zip() { - var sources = []; - for (var _i = 0; _i < arguments.length; _i++) { - sources[_i] = arguments[_i]; - } - return lift_1.operate(function (source, subscriber) { - zip_1.zip.apply(void 0, __spreadArray([source], __read(sources))).subscribe(subscriber); - }); -} -exports.zip = zip; -//# sourceMappingURL=zip.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/zip.js.map b/node_modules/rxjs/dist/cjs/internal/operators/zip.js.map deleted file mode 100644 index 41755c6..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/zip.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"zip.js","sourceRoot":"","sources":["../../../../src/internal/operators/zip.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAqD;AAErD,qCAAuC;AAmBvC,SAAgB,GAAG;IAAO,iBAAwE;SAAxE,UAAwE,EAAxE,qBAAwE,EAAxE,IAAwE;QAAxE,4BAAwE;;IAChG,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,SAAS,8BAAC,MAA8B,UAAM,OAAuC,IAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IAC/G,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,kBAIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/zipAll.js b/node_modules/rxjs/dist/cjs/internal/operators/zipAll.js deleted file mode 100644 index 45c3937..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/zipAll.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.zipAll = void 0; -var zip_1 = require("../observable/zip"); -var joinAllInternals_1 = require("./joinAllInternals"); -function zipAll(project) { - return joinAllInternals_1.joinAllInternals(zip_1.zip, project); -} -exports.zipAll = zipAll; -//# sourceMappingURL=zipAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/zipAll.js.map b/node_modules/rxjs/dist/cjs/internal/operators/zipAll.js.map deleted file mode 100644 index a2058de..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/zipAll.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"zipAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/zipAll.ts"],"names":[],"mappings":";;;AACA,yCAAwC;AACxC,uDAAsD;AAetD,SAAgB,MAAM,CAAO,OAA+B;IAC1D,OAAO,mCAAgB,CAAC,SAAG,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC;AAFD,wBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/zipWith.js b/node_modules/rxjs/dist/cjs/internal/operators/zipWith.js deleted file mode 100644 index 9dc4448..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/zipWith.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.zipWith = void 0; -var zip_1 = require("./zip"); -function zipWith() { - var otherInputs = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherInputs[_i] = arguments[_i]; - } - return zip_1.zip.apply(void 0, __spreadArray([], __read(otherInputs))); -} -exports.zipWith = zipWith; -//# sourceMappingURL=zipWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/operators/zipWith.js.map b/node_modules/rxjs/dist/cjs/internal/operators/zipWith.js.map deleted file mode 100644 index f0e7a6d..0000000 --- a/node_modules/rxjs/dist/cjs/internal/operators/zipWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"zipWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/zipWith.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,6BAA4B;AAyB5B,SAAgB,OAAO;IAAkC,qBAA4C;SAA5C,UAA4C,EAA5C,qBAA4C,EAA5C,IAA4C;QAA5C,gCAA4C;;IACnG,OAAO,SAAG,wCAAI,WAAW,IAAE;AAC7B,CAAC;AAFD,0BAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js deleted file mode 100644 index 9af85a7..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.scheduleArray = void 0; -var Observable_1 = require("../Observable"); -function scheduleArray(input, scheduler) { - return new Observable_1.Observable(function (subscriber) { - var i = 0; - return scheduler.schedule(function () { - if (i === input.length) { - subscriber.complete(); - } - else { - subscriber.next(input[i++]); - if (!subscriber.closed) { - this.schedule(); - } - } - }); - }); -} -exports.scheduleArray = scheduleArray; -//# sourceMappingURL=scheduleArray.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js.map b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js.map deleted file mode 100644 index b42b310..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleArray.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scheduleArray.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleArray.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAG3C,SAAgB,aAAa,CAAI,KAAmB,EAAE,SAAwB;IAC5E,OAAO,IAAI,uBAAU,CAAI,UAAC,UAAU;QAElC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEV,OAAO,SAAS,CAAC,QAAQ,CAAC;YACxB,IAAI,CAAC,KAAK,KAAK,CAAC,MAAM,EAAE;gBAGtB,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;iBAAM;gBAGL,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBAI5B,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;oBACtB,IAAI,CAAC,QAAQ,EAAE,CAAC;iBACjB;aACF;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAvBD,sCAuBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleAsyncIterable.js b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleAsyncIterable.js deleted file mode 100644 index 4729896..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleAsyncIterable.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.scheduleAsyncIterable = void 0; -var Observable_1 = require("../Observable"); -var executeSchedule_1 = require("../util/executeSchedule"); -function scheduleAsyncIterable(input, scheduler) { - if (!input) { - throw new Error('Iterable cannot be null'); - } - return new Observable_1.Observable(function (subscriber) { - executeSchedule_1.executeSchedule(subscriber, scheduler, function () { - var iterator = input[Symbol.asyncIterator](); - executeSchedule_1.executeSchedule(subscriber, scheduler, function () { - iterator.next().then(function (result) { - if (result.done) { - subscriber.complete(); - } - else { - subscriber.next(result.value); - } - }); - }, 0, true); - }); - }); -} -exports.scheduleAsyncIterable = scheduleAsyncIterable; -//# sourceMappingURL=scheduleAsyncIterable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleAsyncIterable.js.map b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleAsyncIterable.js.map deleted file mode 100644 index 1dcd219..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleAsyncIterable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scheduleAsyncIterable.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleAsyncIterable.ts"],"names":[],"mappings":";;;AACA,4CAA2C;AAC3C,2DAA0D;AAE1D,SAAgB,qBAAqB,CAAI,KAAuB,EAAE,SAAwB;IACxF,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;KAC5C;IACD,OAAO,IAAI,uBAAU,CAAI,UAAC,UAAU;QAClC,iCAAe,CAAC,UAAU,EAAE,SAAS,EAAE;YACrC,IAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;YAC/C,iCAAe,CACb,UAAU,EACV,SAAS,EACT;gBACE,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,UAAC,MAAM;oBAC1B,IAAI,MAAM,CAAC,IAAI,EAAE;wBAGf,UAAU,CAAC,QAAQ,EAAE,CAAC;qBACvB;yBAAM;wBACL,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;qBAC/B;gBACH,CAAC,CAAC,CAAC;YACL,CAAC,EACD,CAAC,EACD,IAAI,CACL,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AA1BD,sDA0BC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js deleted file mode 100644 index 0444efe..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.scheduleIterable = void 0; -var Observable_1 = require("../Observable"); -var iterator_1 = require("../symbol/iterator"); -var isFunction_1 = require("../util/isFunction"); -var executeSchedule_1 = require("../util/executeSchedule"); -function scheduleIterable(input, scheduler) { - return new Observable_1.Observable(function (subscriber) { - var iterator; - executeSchedule_1.executeSchedule(subscriber, scheduler, function () { - iterator = input[iterator_1.iterator](); - executeSchedule_1.executeSchedule(subscriber, scheduler, function () { - var _a; - var value; - var done; - try { - (_a = iterator.next(), value = _a.value, done = _a.done); - } - catch (err) { - subscriber.error(err); - return; - } - if (done) { - subscriber.complete(); - } - else { - subscriber.next(value); - } - }, 0, true); - }); - return function () { return isFunction_1.isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return(); }; - }); -} -exports.scheduleIterable = scheduleIterable; -//# sourceMappingURL=scheduleIterable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js.map b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js.map deleted file mode 100644 index ead78f7..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scheduleIterable.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleIterable.ts"],"names":[],"mappings":";;;AAAA,4CAA2C;AAE3C,+CAAiE;AACjE,iDAAgD;AAChD,2DAA0D;AAO1D,SAAgB,gBAAgB,CAAI,KAAkB,EAAE,SAAwB;IAC9E,OAAO,IAAI,uBAAU,CAAI,UAAC,UAAU;QAClC,IAAI,QAAwB,CAAC;QAK7B,iCAAe,CAAC,UAAU,EAAE,SAAS,EAAE;YAErC,QAAQ,GAAI,KAAa,CAAC,mBAAe,CAAC,EAAE,CAAC;YAE7C,iCAAe,CACb,UAAU,EACV,SAAS,EACT;;gBACE,IAAI,KAAQ,CAAC;gBACb,IAAI,IAAyB,CAAC;gBAC9B,IAAI;oBAEF,CAAC,KAAkB,QAAQ,CAAC,IAAI,EAAE,EAA/B,KAAK,WAAA,EAAE,IAAI,UAAA,CAAqB,CAAC;iBACrC;gBAAC,OAAO,GAAG,EAAE;oBAEZ,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBACtB,OAAO;iBACR;gBAED,IAAI,IAAI,EAAE;oBAKR,UAAU,CAAC,QAAQ,EAAE,CAAC;iBACvB;qBAAM;oBAEL,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBACxB;YACH,CAAC,EACD,CAAC,EACD,IAAI,CACL,CAAC;QACJ,CAAC,CAAC,CAAC;QAMH,OAAO,cAAM,OAAA,uBAAU,CAAC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAC,IAAI,QAAQ,CAAC,MAAM,EAAE,EAAjD,CAAiD,CAAC;IACjE,CAAC,CAAC,CAAC;AACL,CAAC;AAhDD,4CAgDC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleObservable.js b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleObservable.js deleted file mode 100644 index 90ee012..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleObservable.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.scheduleObservable = void 0; -var innerFrom_1 = require("../observable/innerFrom"); -var observeOn_1 = require("../operators/observeOn"); -var subscribeOn_1 = require("../operators/subscribeOn"); -function scheduleObservable(input, scheduler) { - return innerFrom_1.innerFrom(input).pipe(subscribeOn_1.subscribeOn(scheduler), observeOn_1.observeOn(scheduler)); -} -exports.scheduleObservable = scheduleObservable; -//# sourceMappingURL=scheduleObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleObservable.js.map b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleObservable.js.map deleted file mode 100644 index 3cfdc17..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleObservable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scheduleObservable.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleObservable.ts"],"names":[],"mappings":";;;AAAA,qDAAoD;AACpD,oDAAmD;AACnD,wDAAuD;AAGvD,SAAgB,kBAAkB,CAAI,KAA2B,EAAE,SAAwB;IACzF,OAAO,qBAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,yBAAW,CAAC,SAAS,CAAC,EAAE,qBAAS,CAAC,SAAS,CAAC,CAAC,CAAC;AAC7E,CAAC;AAFD,gDAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/schedulePromise.js b/node_modules/rxjs/dist/cjs/internal/scheduled/schedulePromise.js deleted file mode 100644 index 37629d4..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduled/schedulePromise.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.schedulePromise = void 0; -var innerFrom_1 = require("../observable/innerFrom"); -var observeOn_1 = require("../operators/observeOn"); -var subscribeOn_1 = require("../operators/subscribeOn"); -function schedulePromise(input, scheduler) { - return innerFrom_1.innerFrom(input).pipe(subscribeOn_1.subscribeOn(scheduler), observeOn_1.observeOn(scheduler)); -} -exports.schedulePromise = schedulePromise; -//# sourceMappingURL=schedulePromise.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/schedulePromise.js.map b/node_modules/rxjs/dist/cjs/internal/scheduled/schedulePromise.js.map deleted file mode 100644 index f6d7bcf..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduled/schedulePromise.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"schedulePromise.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/schedulePromise.ts"],"names":[],"mappings":";;;AAAA,qDAAoD;AACpD,oDAAmD;AACnD,wDAAuD;AAGvD,SAAgB,eAAe,CAAI,KAAqB,EAAE,SAAwB;IAChF,OAAO,qBAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,yBAAW,CAAC,SAAS,CAAC,EAAE,qBAAS,CAAC,SAAS,CAAC,CAAC,CAAC;AAC7E,CAAC;AAFD,0CAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleReadableStreamLike.js b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleReadableStreamLike.js deleted file mode 100644 index 067ca61..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleReadableStreamLike.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.scheduleReadableStreamLike = void 0; -var scheduleAsyncIterable_1 = require("./scheduleAsyncIterable"); -var isReadableStreamLike_1 = require("../util/isReadableStreamLike"); -function scheduleReadableStreamLike(input, scheduler) { - return scheduleAsyncIterable_1.scheduleAsyncIterable(isReadableStreamLike_1.readableStreamLikeToAsyncGenerator(input), scheduler); -} -exports.scheduleReadableStreamLike = scheduleReadableStreamLike; -//# sourceMappingURL=scheduleReadableStreamLike.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleReadableStreamLike.js.map b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleReadableStreamLike.js.map deleted file mode 100644 index 00be810..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleReadableStreamLike.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scheduleReadableStreamLike.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleReadableStreamLike.ts"],"names":[],"mappings":";;;AAEA,iEAAgE;AAChE,qEAAkF;AAElF,SAAgB,0BAA0B,CAAI,KAA4B,EAAE,SAAwB;IAClG,OAAO,6CAAqB,CAAC,yDAAkC,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,CAAC;AACrF,CAAC;AAFD,gEAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js deleted file mode 100644 index 8b2564b..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.scheduled = void 0; -var scheduleObservable_1 = require("./scheduleObservable"); -var schedulePromise_1 = require("./schedulePromise"); -var scheduleArray_1 = require("./scheduleArray"); -var scheduleIterable_1 = require("./scheduleIterable"); -var scheduleAsyncIterable_1 = require("./scheduleAsyncIterable"); -var isInteropObservable_1 = require("../util/isInteropObservable"); -var isPromise_1 = require("../util/isPromise"); -var isArrayLike_1 = require("../util/isArrayLike"); -var isIterable_1 = require("../util/isIterable"); -var isAsyncIterable_1 = require("../util/isAsyncIterable"); -var throwUnobservableError_1 = require("../util/throwUnobservableError"); -var isReadableStreamLike_1 = require("../util/isReadableStreamLike"); -var scheduleReadableStreamLike_1 = require("./scheduleReadableStreamLike"); -function scheduled(input, scheduler) { - if (input != null) { - if (isInteropObservable_1.isInteropObservable(input)) { - return scheduleObservable_1.scheduleObservable(input, scheduler); - } - if (isArrayLike_1.isArrayLike(input)) { - return scheduleArray_1.scheduleArray(input, scheduler); - } - if (isPromise_1.isPromise(input)) { - return schedulePromise_1.schedulePromise(input, scheduler); - } - if (isAsyncIterable_1.isAsyncIterable(input)) { - return scheduleAsyncIterable_1.scheduleAsyncIterable(input, scheduler); - } - if (isIterable_1.isIterable(input)) { - return scheduleIterable_1.scheduleIterable(input, scheduler); - } - if (isReadableStreamLike_1.isReadableStreamLike(input)) { - return scheduleReadableStreamLike_1.scheduleReadableStreamLike(input, scheduler); - } - } - throw throwUnobservableError_1.createInvalidObservableTypeError(input); -} -exports.scheduled = scheduled; -//# sourceMappingURL=scheduled.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js.map b/node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js.map deleted file mode 100644 index bffb909..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduled/scheduled.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scheduled.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduled.ts"],"names":[],"mappings":";;;AAAA,2DAA0D;AAC1D,qDAAoD;AACpD,iDAAgD;AAChD,uDAAsD;AACtD,iEAAgE;AAChE,mEAAkE;AAClE,+CAA8C;AAC9C,mDAAkD;AAClD,iDAAgD;AAGhD,2DAA0D;AAC1D,yEAAkF;AAClF,qEAAoE;AACpE,2EAA0E;AAa1E,SAAgB,SAAS,CAAI,KAAyB,EAAE,SAAwB;IAC9E,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,IAAI,yCAAmB,CAAC,KAAK,CAAC,EAAE;YAC9B,OAAO,uCAAkB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SAC7C;QACD,IAAI,yBAAW,CAAC,KAAK,CAAC,EAAE;YACtB,OAAO,6BAAa,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SACxC;QACD,IAAI,qBAAS,CAAC,KAAK,CAAC,EAAE;YACpB,OAAO,iCAAe,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SAC1C;QACD,IAAI,iCAAe,CAAC,KAAK,CAAC,EAAE;YAC1B,OAAO,6CAAqB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SAChD;QACD,IAAI,uBAAU,CAAC,KAAK,CAAC,EAAE;YACrB,OAAO,mCAAgB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SAC3C;QACD,IAAI,2CAAoB,CAAC,KAAK,CAAC,EAAE;YAC/B,OAAO,uDAA0B,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SACrD;KACF;IACD,MAAM,yDAAgC,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC;AAtBD,8BAsBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/Action.js b/node_modules/rxjs/dist/cjs/internal/scheduler/Action.js deleted file mode 100644 index bc1216e..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/Action.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Action = void 0; -var Subscription_1 = require("../Subscription"); -var Action = (function (_super) { - __extends(Action, _super); - function Action(scheduler, work) { - return _super.call(this) || this; - } - Action.prototype.schedule = function (state, delay) { - if (delay === void 0) { delay = 0; } - return this; - }; - return Action; -}(Subscription_1.Subscription)); -exports.Action = Action; -//# sourceMappingURL=Action.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/Action.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/Action.js.map deleted file mode 100644 index 52f59ff..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/Action.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Action.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/Action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,gDAA+C;AAe/C;IAA+B,0BAAY;IACzC,gBAAY,SAAoB,EAAE,IAAmD;eACnF,iBAAO;IACT,CAAC;IAWM,yBAAQ,GAAf,UAAgB,KAAS,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAC1C,OAAO,IAAI,CAAC;IACd,CAAC;IACH,aAAC;AAAD,CAAC,AAjBD,CAA+B,2BAAY,GAiB1C;AAjBY,wBAAM"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameAction.js b/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameAction.js deleted file mode 100644 index 3c00e51..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameAction.js +++ /dev/null @@ -1,53 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AnimationFrameAction = void 0; -var AsyncAction_1 = require("./AsyncAction"); -var animationFrameProvider_1 = require("./animationFrameProvider"); -var AnimationFrameAction = (function (_super) { - __extends(AnimationFrameAction, _super); - function AnimationFrameAction(scheduler, work) { - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - return _this; - } - AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - if (delay !== null && delay > 0) { - return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); - } - scheduler.actions.push(this); - return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider_1.animationFrameProvider.requestAnimationFrame(function () { return scheduler.flush(undefined); })); - }; - AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) { - var _a; - if (delay === void 0) { delay = 0; } - if (delay != null ? delay > 0 : this.delay > 0) { - return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); - } - var actions = scheduler.actions; - if (id != null && id === scheduler._scheduled && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { - animationFrameProvider_1.animationFrameProvider.cancelAnimationFrame(id); - scheduler._scheduled = undefined; - } - return undefined; - }; - return AnimationFrameAction; -}(AsyncAction_1.AsyncAction)); -exports.AnimationFrameAction = AnimationFrameAction; -//# sourceMappingURL=AnimationFrameAction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameAction.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameAction.js.map deleted file mode 100644 index d708991..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameAction.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AnimationFrameAction.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AnimationFrameAction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6CAA4C;AAG5C,mEAAkE;AAGlE;IAA6C,wCAAc;IACzD,8BAAsB,SAAkC,EAAY,IAAmD;QAAvH,YACE,kBAAM,SAAS,EAAE,IAAI,CAAC,SACvB;QAFqB,eAAS,GAAT,SAAS,CAAyB;QAAY,UAAI,GAAJ,IAAI,CAA+C;;IAEvH,CAAC;IAES,6CAAc,GAAxB,UAAyB,SAAkC,EAAE,EAAgB,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAE9F,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,GAAG,CAAC,EAAE;YAC/B,OAAO,iBAAM,cAAc,YAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAED,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAI7B,OAAO,SAAS,CAAC,UAAU,IAAI,CAAC,SAAS,CAAC,UAAU,GAAG,+CAAsB,CAAC,qBAAqB,CAAC,cAAM,OAAA,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,EAA1B,CAA0B,CAAC,CAAC,CAAC;IACzI,CAAC;IAES,6CAAc,GAAxB,UAAyB,SAAkC,EAAE,EAAgB,EAAE,KAAiB;;QAAjB,sBAAA,EAAA,SAAiB;QAI9F,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE;YAC9C,OAAO,iBAAM,cAAc,YAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAIO,IAAA,OAAO,GAAK,SAAS,QAAd,CAAe;QAC9B,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,KAAK,SAAS,CAAC,UAAU,IAAI,CAAA,MAAA,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,0CAAE,EAAE,MAAK,EAAE,EAAE;YACvF,+CAAsB,CAAC,oBAAoB,CAAC,EAAY,CAAC,CAAC;YAC1D,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC;SAClC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IACH,2BAAC;AAAD,CAAC,AApCD,CAA6C,yBAAW,GAoCvD;AApCY,oDAAoB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameScheduler.js b/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameScheduler.js deleted file mode 100644 index 135334a..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameScheduler.js +++ /dev/null @@ -1,54 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AnimationFrameScheduler = void 0; -var AsyncScheduler_1 = require("./AsyncScheduler"); -var AnimationFrameScheduler = (function (_super) { - __extends(AnimationFrameScheduler, _super); - function AnimationFrameScheduler() { - return _super !== null && _super.apply(this, arguments) || this; - } - AnimationFrameScheduler.prototype.flush = function (action) { - this._active = true; - var flushId; - if (action) { - flushId = action.id; - } - else { - flushId = this._scheduled; - this._scheduled = undefined; - } - var actions = this.actions; - var error; - action = action || actions.shift(); - do { - if ((error = action.execute(action.state, action.delay))) { - break; - } - } while ((action = actions[0]) && action.id === flushId && actions.shift()); - this._active = false; - if (error) { - while ((action = actions[0]) && action.id === flushId && actions.shift()) { - action.unsubscribe(); - } - throw error; - } - }; - return AnimationFrameScheduler; -}(AsyncScheduler_1.AsyncScheduler)); -exports.AnimationFrameScheduler = AnimationFrameScheduler; -//# sourceMappingURL=AnimationFrameScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameScheduler.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameScheduler.js.map deleted file mode 100644 index 1283ddc..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/AnimationFrameScheduler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AnimationFrameScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AnimationFrameScheduler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,mDAAkD;AAElD;IAA6C,2CAAc;IAA3D;;IAuCA,CAAC;IAtCQ,uCAAK,GAAZ,UAAa,MAAyB;QACpC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAUpB,IAAI,OAAO,CAAC;QACZ,IAAI,MAAM,EAAE;YACV,OAAO,GAAG,MAAM,CAAC,EAAE,CAAC;SACrB;aAAM;YACL,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC;YAC1B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;SAC7B;QAEO,IAAA,OAAO,GAAK,IAAI,QAAT,CAAU;QACzB,IAAI,KAAU,CAAC;QACf,MAAM,GAAG,MAAM,IAAI,OAAO,CAAC,KAAK,EAAG,CAAC;QAEpC,GAAG;YACD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;gBACxD,MAAM;aACP;SACF,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;QAE5E,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QAErB,IAAI,KAAK,EAAE;YACT,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;gBACxE,MAAM,CAAC,WAAW,EAAE,CAAC;aACtB;YACD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;IACH,8BAAC;AAAD,CAAC,AAvCD,CAA6C,+BAAc,GAuC1D;AAvCY,0DAAuB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/AsapAction.js b/node_modules/rxjs/dist/cjs/internal/scheduler/AsapAction.js deleted file mode 100644 index 5056bcd..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/AsapAction.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AsapAction = void 0; -var AsyncAction_1 = require("./AsyncAction"); -var immediateProvider_1 = require("./immediateProvider"); -var AsapAction = (function (_super) { - __extends(AsapAction, _super); - function AsapAction(scheduler, work) { - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - return _this; - } - AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - if (delay !== null && delay > 0) { - return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); - } - scheduler.actions.push(this); - return scheduler._scheduled || (scheduler._scheduled = immediateProvider_1.immediateProvider.setImmediate(scheduler.flush.bind(scheduler, undefined))); - }; - AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) { - var _a; - if (delay === void 0) { delay = 0; } - if (delay != null ? delay > 0 : this.delay > 0) { - return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); - } - var actions = scheduler.actions; - if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { - immediateProvider_1.immediateProvider.clearImmediate(id); - if (scheduler._scheduled === id) { - scheduler._scheduled = undefined; - } - } - return undefined; - }; - return AsapAction; -}(AsyncAction_1.AsyncAction)); -exports.AsapAction = AsapAction; -//# sourceMappingURL=AsapAction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/AsapAction.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/AsapAction.js.map deleted file mode 100644 index 4971d28..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/AsapAction.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AsapAction.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsapAction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6CAA4C;AAG5C,yDAAwD;AAGxD;IAAmC,8BAAc;IAC/C,oBAAsB,SAAwB,EAAY,IAAmD;QAA7G,YACE,kBAAM,SAAS,EAAE,IAAI,CAAC,SACvB;QAFqB,eAAS,GAAT,SAAS,CAAe;QAAY,UAAI,GAAJ,IAAI,CAA+C;;IAE7G,CAAC;IAES,mCAAc,GAAxB,UAAyB,SAAwB,EAAE,EAAgB,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAEpF,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,GAAG,CAAC,EAAE;YAC/B,OAAO,iBAAM,cAAc,YAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAED,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAI7B,OAAO,SAAS,CAAC,UAAU,IAAI,CAAC,SAAS,CAAC,UAAU,GAAG,qCAAiB,CAAC,YAAY,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IACrI,CAAC;IAES,mCAAc,GAAxB,UAAyB,SAAwB,EAAE,EAAgB,EAAE,KAAiB;;QAAjB,sBAAA,EAAA,SAAiB;QAIpF,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE;YAC9C,OAAO,iBAAM,cAAc,YAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAIO,IAAA,OAAO,GAAK,SAAS,QAAd,CAAe;QAC9B,IAAI,EAAE,IAAI,IAAI,IAAI,CAAA,MAAA,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,0CAAE,EAAE,MAAK,EAAE,EAAE;YACxD,qCAAiB,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;YACrC,IAAI,SAAS,CAAC,UAAU,KAAK,EAAE,EAAE;gBAC/B,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC;aAClC;SACF;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IACH,iBAAC;AAAD,CAAC,AAtCD,CAAmC,yBAAW,GAsC7C;AAtCY,gCAAU"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/AsapScheduler.js b/node_modules/rxjs/dist/cjs/internal/scheduler/AsapScheduler.js deleted file mode 100644 index 6a4ddeb..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/AsapScheduler.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AsapScheduler = void 0; -var AsyncScheduler_1 = require("./AsyncScheduler"); -var AsapScheduler = (function (_super) { - __extends(AsapScheduler, _super); - function AsapScheduler() { - return _super !== null && _super.apply(this, arguments) || this; - } - AsapScheduler.prototype.flush = function (action) { - this._active = true; - var flushId = this._scheduled; - this._scheduled = undefined; - var actions = this.actions; - var error; - action = action || actions.shift(); - do { - if ((error = action.execute(action.state, action.delay))) { - break; - } - } while ((action = actions[0]) && action.id === flushId && actions.shift()); - this._active = false; - if (error) { - while ((action = actions[0]) && action.id === flushId && actions.shift()) { - action.unsubscribe(); - } - throw error; - } - }; - return AsapScheduler; -}(AsyncScheduler_1.AsyncScheduler)); -exports.AsapScheduler = AsapScheduler; -//# sourceMappingURL=AsapScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/AsapScheduler.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/AsapScheduler.js.map deleted file mode 100644 index 1684c40..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/AsapScheduler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AsapScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsapScheduler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,mDAAkD;AAElD;IAAmC,iCAAc;IAAjD;;IAkCA,CAAC;IAjCQ,6BAAK,GAAZ,UAAa,MAAyB;QACpC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAUpB,IAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC;QAChC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAEpB,IAAA,OAAO,GAAK,IAAI,QAAT,CAAU;QACzB,IAAI,KAAU,CAAC;QACf,MAAM,GAAG,MAAM,IAAI,OAAO,CAAC,KAAK,EAAG,CAAC;QAEpC,GAAG;YACD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;gBACxD,MAAM;aACP;SACF,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;QAE5E,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QAErB,IAAI,KAAK,EAAE;YACT,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;gBACxE,MAAM,CAAC,WAAW,EAAE,CAAC;aACtB;YACD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AAlCD,CAAmC,+BAAc,GAkChD;AAlCY,sCAAa"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js b/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js deleted file mode 100644 index 7b6c496..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js +++ /dev/null @@ -1,107 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AsyncAction = void 0; -var Action_1 = require("./Action"); -var intervalProvider_1 = require("./intervalProvider"); -var arrRemove_1 = require("../util/arrRemove"); -var AsyncAction = (function (_super) { - __extends(AsyncAction, _super); - function AsyncAction(scheduler, work) { - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - _this.pending = false; - return _this; - } - AsyncAction.prototype.schedule = function (state, delay) { - var _a; - if (delay === void 0) { delay = 0; } - if (this.closed) { - return this; - } - this.state = state; - var id = this.id; - var scheduler = this.scheduler; - if (id != null) { - this.id = this.recycleAsyncId(scheduler, id, delay); - } - this.pending = true; - this.delay = delay; - this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay); - return this; - }; - AsyncAction.prototype.requestAsyncId = function (scheduler, _id, delay) { - if (delay === void 0) { delay = 0; } - return intervalProvider_1.intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay); - }; - AsyncAction.prototype.recycleAsyncId = function (_scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - if (delay != null && this.delay === delay && this.pending === false) { - return id; - } - if (id != null) { - intervalProvider_1.intervalProvider.clearInterval(id); - } - return undefined; - }; - AsyncAction.prototype.execute = function (state, delay) { - if (this.closed) { - return new Error('executing a cancelled action'); - } - this.pending = false; - var error = this._execute(state, delay); - if (error) { - return error; - } - else if (this.pending === false && this.id != null) { - this.id = this.recycleAsyncId(this.scheduler, this.id, null); - } - }; - AsyncAction.prototype._execute = function (state, _delay) { - var errored = false; - var errorValue; - try { - this.work(state); - } - catch (e) { - errored = true; - errorValue = e ? e : new Error('Scheduled action threw falsy error'); - } - if (errored) { - this.unsubscribe(); - return errorValue; - } - }; - AsyncAction.prototype.unsubscribe = function () { - if (!this.closed) { - var _a = this, id = _a.id, scheduler = _a.scheduler; - var actions = scheduler.actions; - this.work = this.state = this.scheduler = null; - this.pending = false; - arrRemove_1.arrRemove(actions, this); - if (id != null) { - this.id = this.recycleAsyncId(scheduler, id, null); - } - this.delay = null; - _super.prototype.unsubscribe.call(this); - } - }; - return AsyncAction; -}(Action_1.Action)); -exports.AsyncAction = AsyncAction; -//# sourceMappingURL=AsyncAction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js.map deleted file mode 100644 index 361a064..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncAction.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AsyncAction.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsyncAction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,mCAAkC;AAIlC,uDAAsD;AACtD,+CAA8C;AAG9C;IAAoC,+BAAS;IAO3C,qBAAsB,SAAyB,EAAY,IAAmD;QAA9G,YACE,kBAAM,SAAS,EAAE,IAAI,CAAC,SACvB;QAFqB,eAAS,GAAT,SAAS,CAAgB;QAAY,UAAI,GAAJ,IAAI,CAA+C;QAFpG,aAAO,GAAY,KAAK,CAAC;;IAInC,CAAC;IAEM,8BAAQ,GAAf,UAAgB,KAAS,EAAE,KAAiB;;QAAjB,sBAAA,EAAA,SAAiB;QAC1C,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,OAAO,IAAI,CAAC;SACb;QAGD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,IAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QACnB,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAuBjC,IAAI,EAAE,IAAI,IAAI,EAAE;YACd,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACrD;QAID,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAEpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,IAAI,CAAC,EAAE,GAAG,MAAA,IAAI,CAAC,EAAE,mCAAI,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QAEpE,OAAO,IAAI,CAAC;IACd,CAAC;IAES,oCAAc,GAAxB,UAAyB,SAAyB,EAAE,GAAiB,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QACtF,OAAO,mCAAgB,CAAC,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;IACpF,CAAC;IAES,oCAAc,GAAxB,UAAyB,UAA0B,EAAE,EAAgB,EAAE,KAAwB;QAAxB,sBAAA,EAAA,SAAwB;QAE7F,IAAI,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK,EAAE;YACnE,OAAO,EAAE,CAAC;SACX;QAGD,IAAI,EAAE,IAAI,IAAI,EAAE;YACd,mCAAgB,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;SACpC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAKM,6BAAO,GAAd,UAAe,KAAQ,EAAE,KAAa;QACpC,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,OAAO,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;SAClD;QAED,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAC1C,IAAI,KAAK,EAAE;YACT,OAAO,KAAK,CAAC;SACd;aAAM,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK,IAAI,IAAI,CAAC,EAAE,IAAI,IAAI,EAAE;YAcpD,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;SAC9D;IACH,CAAC;IAES,8BAAQ,GAAlB,UAAmB,KAAQ,EAAE,MAAc;QACzC,IAAI,OAAO,GAAY,KAAK,CAAC;QAC7B,IAAI,UAAe,CAAC;QACpB,IAAI;YACF,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAClB;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,GAAG,IAAI,CAAC;YAIf,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;SACtE;QACD,IAAI,OAAO,EAAE;YACX,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,OAAO,UAAU,CAAC;SACnB;IACH,CAAC;IAED,iCAAW,GAAX;QACE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YACV,IAAA,KAAoB,IAAI,EAAtB,EAAE,QAAA,EAAE,SAAS,eAAS,CAAC;YACvB,IAAA,OAAO,GAAK,SAAS,QAAd,CAAe;YAE9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,GAAG,IAAK,CAAC;YAChD,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;YAErB,qBAAS,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YACzB,IAAI,EAAE,IAAI,IAAI,EAAE;gBACd,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;aACpD;YAED,IAAI,CAAC,KAAK,GAAG,IAAK,CAAC;YACnB,iBAAM,WAAW,WAAE,CAAC;SACrB;IACH,CAAC;IACH,kBAAC;AAAD,CAAC,AA7ID,CAAoC,eAAM,GA6IzC;AA7IY,kCAAW"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js b/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js deleted file mode 100644 index 9a9c167..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js +++ /dev/null @@ -1,53 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AsyncScheduler = void 0; -var Scheduler_1 = require("../Scheduler"); -var AsyncScheduler = (function (_super) { - __extends(AsyncScheduler, _super); - function AsyncScheduler(SchedulerAction, now) { - if (now === void 0) { now = Scheduler_1.Scheduler.now; } - var _this = _super.call(this, SchedulerAction, now) || this; - _this.actions = []; - _this._active = false; - return _this; - } - AsyncScheduler.prototype.flush = function (action) { - var actions = this.actions; - if (this._active) { - actions.push(action); - return; - } - var error; - this._active = true; - do { - if ((error = action.execute(action.state, action.delay))) { - break; - } - } while ((action = actions.shift())); - this._active = false; - if (error) { - while ((action = actions.shift())) { - action.unsubscribe(); - } - throw error; - } - }; - return AsyncScheduler; -}(Scheduler_1.Scheduler)); -exports.AsyncScheduler = AsyncScheduler; -//# sourceMappingURL=AsyncScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js.map deleted file mode 100644 index 5291485..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/AsyncScheduler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AsyncScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsyncScheduler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,0CAAyC;AAKzC;IAAoC,kCAAS;IAgB3C,wBAAY,eAA8B,EAAE,GAAiC;QAAjC,oBAAA,EAAA,MAAoB,qBAAS,CAAC,GAAG;QAA7E,YACE,kBAAM,eAAe,EAAE,GAAG,CAAC,SAC5B;QAjBM,aAAO,GAA4B,EAAE,CAAC;QAMtC,aAAO,GAAY,KAAK,CAAC;;IAWhC,CAAC;IAEM,8BAAK,GAAZ,UAAa,MAAwB;QAC3B,IAAA,OAAO,GAAK,IAAI,QAAT,CAAU;QAEzB,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACrB,OAAO;SACR;QAED,IAAI,KAAU,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAEpB,GAAG;YACD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;gBACxD,MAAM;aACP;SACF,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,EAAG,CAAC,EAAE;QAEtC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QAErB,IAAI,KAAK,EAAE;YACT,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,EAAG,CAAC,EAAE;gBAClC,MAAM,CAAC,WAAW,EAAE,CAAC;aACtB;YACD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;IACH,qBAAC;AAAD,CAAC,AA9CD,CAAoC,qBAAS,GA8C5C;AA9CY,wCAAc"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/QueueAction.js b/node_modules/rxjs/dist/cjs/internal/scheduler/QueueAction.js deleted file mode 100644 index 4e370a9..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/QueueAction.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.QueueAction = void 0; -var AsyncAction_1 = require("./AsyncAction"); -var QueueAction = (function (_super) { - __extends(QueueAction, _super); - function QueueAction(scheduler, work) { - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - return _this; - } - QueueAction.prototype.schedule = function (state, delay) { - if (delay === void 0) { delay = 0; } - if (delay > 0) { - return _super.prototype.schedule.call(this, state, delay); - } - this.delay = delay; - this.state = state; - this.scheduler.flush(this); - return this; - }; - QueueAction.prototype.execute = function (state, delay) { - return delay > 0 || this.closed ? _super.prototype.execute.call(this, state, delay) : this._execute(state, delay); - }; - QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) { - return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); - } - scheduler.flush(this); - return 0; - }; - return QueueAction; -}(AsyncAction_1.AsyncAction)); -exports.QueueAction = QueueAction; -//# sourceMappingURL=QueueAction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/QueueAction.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/QueueAction.js.map deleted file mode 100644 index 746c7ee..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/QueueAction.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"QueueAction.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/QueueAction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6CAA4C;AAM5C;IAAoC,+BAAc;IAChD,qBAAsB,SAAyB,EAAY,IAAmD;QAA9G,YACE,kBAAM,SAAS,EAAE,IAAI,CAAC,SACvB;QAFqB,eAAS,GAAT,SAAS,CAAgB;QAAY,UAAI,GAAJ,IAAI,CAA+C;;IAE9G,CAAC;IAEM,8BAAQ,GAAf,UAAgB,KAAS,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAC1C,IAAI,KAAK,GAAG,CAAC,EAAE;YACb,OAAO,iBAAM,QAAQ,YAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SACrC;QACD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,6BAAO,GAAd,UAAe,KAAQ,EAAE,KAAa;QACpC,OAAO,KAAK,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAM,OAAO,YAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC9F,CAAC;IAES,oCAAc,GAAxB,UAAyB,SAAyB,EAAE,EAAgB,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAKrF,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE;YACrE,OAAO,iBAAM,cAAc,YAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAGD,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAMtB,OAAO,CAAC,CAAC;IACX,CAAC;IACH,kBAAC;AAAD,CAAC,AArCD,CAAoC,yBAAW,GAqC9C;AArCY,kCAAW"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/QueueScheduler.js b/node_modules/rxjs/dist/cjs/internal/scheduler/QueueScheduler.js deleted file mode 100644 index a38f3f8..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/QueueScheduler.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.QueueScheduler = void 0; -var AsyncScheduler_1 = require("./AsyncScheduler"); -var QueueScheduler = (function (_super) { - __extends(QueueScheduler, _super); - function QueueScheduler() { - return _super !== null && _super.apply(this, arguments) || this; - } - return QueueScheduler; -}(AsyncScheduler_1.AsyncScheduler)); -exports.QueueScheduler = QueueScheduler; -//# sourceMappingURL=QueueScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/QueueScheduler.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/QueueScheduler.js.map deleted file mode 100644 index fb2cba3..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/QueueScheduler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"QueueScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/QueueScheduler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,mDAAkD;AAElD;IAAoC,kCAAc;IAAlD;;IACA,CAAC;IAAD,qBAAC;AAAD,CAAC,AADD,CAAoC,+BAAc,GACjD;AADY,wCAAc"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/VirtualTimeScheduler.js b/node_modules/rxjs/dist/cjs/internal/scheduler/VirtualTimeScheduler.js deleted file mode 100644 index a0a7cf5..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/VirtualTimeScheduler.js +++ /dev/null @@ -1,121 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.VirtualAction = exports.VirtualTimeScheduler = void 0; -var AsyncAction_1 = require("./AsyncAction"); -var Subscription_1 = require("../Subscription"); -var AsyncScheduler_1 = require("./AsyncScheduler"); -var VirtualTimeScheduler = (function (_super) { - __extends(VirtualTimeScheduler, _super); - function VirtualTimeScheduler(schedulerActionCtor, maxFrames) { - if (schedulerActionCtor === void 0) { schedulerActionCtor = VirtualAction; } - if (maxFrames === void 0) { maxFrames = Infinity; } - var _this = _super.call(this, schedulerActionCtor, function () { return _this.frame; }) || this; - _this.maxFrames = maxFrames; - _this.frame = 0; - _this.index = -1; - return _this; - } - VirtualTimeScheduler.prototype.flush = function () { - var _a = this, actions = _a.actions, maxFrames = _a.maxFrames; - var error; - var action; - while ((action = actions[0]) && action.delay <= maxFrames) { - actions.shift(); - this.frame = action.delay; - if ((error = action.execute(action.state, action.delay))) { - break; - } - } - if (error) { - while ((action = actions.shift())) { - action.unsubscribe(); - } - throw error; - } - }; - VirtualTimeScheduler.frameTimeFactor = 10; - return VirtualTimeScheduler; -}(AsyncScheduler_1.AsyncScheduler)); -exports.VirtualTimeScheduler = VirtualTimeScheduler; -var VirtualAction = (function (_super) { - __extends(VirtualAction, _super); - function VirtualAction(scheduler, work, index) { - if (index === void 0) { index = (scheduler.index += 1); } - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - _this.index = index; - _this.active = true; - _this.index = scheduler.index = index; - return _this; - } - VirtualAction.prototype.schedule = function (state, delay) { - if (delay === void 0) { delay = 0; } - if (Number.isFinite(delay)) { - if (!this.id) { - return _super.prototype.schedule.call(this, state, delay); - } - this.active = false; - var action = new VirtualAction(this.scheduler, this.work); - this.add(action); - return action.schedule(state, delay); - } - else { - return Subscription_1.Subscription.EMPTY; - } - }; - VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - this.delay = scheduler.frame + delay; - var actions = scheduler.actions; - actions.push(this); - actions.sort(VirtualAction.sortActions); - return 1; - }; - VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - return undefined; - }; - VirtualAction.prototype._execute = function (state, delay) { - if (this.active === true) { - return _super.prototype._execute.call(this, state, delay); - } - }; - VirtualAction.sortActions = function (a, b) { - if (a.delay === b.delay) { - if (a.index === b.index) { - return 0; - } - else if (a.index > b.index) { - return 1; - } - else { - return -1; - } - } - else if (a.delay > b.delay) { - return 1; - } - else { - return -1; - } - }; - return VirtualAction; -}(AsyncAction_1.AsyncAction)); -exports.VirtualAction = VirtualAction; -//# sourceMappingURL=VirtualTimeScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/VirtualTimeScheduler.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/VirtualTimeScheduler.js.map deleted file mode 100644 index c8b26cf..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/VirtualTimeScheduler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"VirtualTimeScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/VirtualTimeScheduler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6CAA4C;AAC5C,gDAA+C;AAC/C,mDAAkD;AAIlD;IAA0C,wCAAc;IAyBtD,8BAAY,mBAA8D,EAAS,SAA4B;QAAnG,oCAAA,EAAA,sBAA0C,aAAoB;QAAS,0BAAA,EAAA,oBAA4B;QAA/G,YACE,kBAAM,mBAAmB,EAAE,cAAM,OAAA,KAAI,CAAC,KAAK,EAAV,CAAU,CAAC,SAC7C;QAFkF,eAAS,GAAT,SAAS,CAAmB;QAfxG,WAAK,GAAW,CAAC,CAAC;QAMlB,WAAK,GAAW,CAAC,CAAC,CAAC;;IAW1B,CAAC;IAMM,oCAAK,GAAZ;QACQ,IAAA,KAAyB,IAAI,EAA3B,OAAO,aAAA,EAAE,SAAS,eAAS,CAAC;QACpC,IAAI,KAAU,CAAC;QACf,IAAI,MAAoC,CAAC;QAEzC,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,KAAK,IAAI,SAAS,EAAE;YACzD,OAAO,CAAC,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;YAE1B,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;gBACxD,MAAM;aACP;SACF;QAED,IAAI,KAAK,EAAE;YACT,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,EAAE;gBACjC,MAAM,CAAC,WAAW,EAAE,CAAC;aACtB;YACD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;IAnDM,oCAAe,GAAG,EAAE,CAAC;IAoD9B,2BAAC;CAAA,AAtDD,CAA0C,+BAAc,GAsDvD;AAtDY,oDAAoB;AAwDjC;IAAsC,iCAAc;IAGlD,uBACY,SAA+B,EAC/B,IAAmD,EACnD,KAAsC;QAAtC,sBAAA,EAAA,SAAiB,SAAS,CAAC,KAAK,IAAI,CAAC,CAAC;QAHlD,YAKE,kBAAM,SAAS,EAAE,IAAI,CAAC,SAEvB;QANW,eAAS,GAAT,SAAS,CAAsB;QAC/B,UAAI,GAAJ,IAAI,CAA+C;QACnD,WAAK,GAAL,KAAK,CAAiC;QALxC,YAAM,GAAY,IAAI,CAAC;QAQ/B,KAAI,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC;;IACvC,CAAC;IAEM,gCAAQ,GAAf,UAAgB,KAAS,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAC1C,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;YAC1B,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;gBACZ,OAAO,iBAAM,QAAQ,YAAC,KAAK,EAAE,KAAK,CAAC,CAAC;aACrC;YACD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YAKpB,IAAM,MAAM,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YAC5D,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACjB,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SACtC;aAAM;YAGL,OAAO,2BAAY,CAAC,KAAK,CAAC;SAC3B;IACH,CAAC;IAES,sCAAc,GAAxB,UAAyB,SAA+B,EAAE,EAAQ,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QACnF,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC;QAC7B,IAAA,OAAO,GAAK,SAAS,QAAd,CAAe;QAC9B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClB,OAAmC,CAAC,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;QACrE,OAAO,CAAC,CAAC;IACX,CAAC;IAES,sCAAc,GAAxB,UAAyB,SAA+B,EAAE,EAAQ,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QACnF,OAAO,SAAS,CAAC;IACnB,CAAC;IAES,gCAAQ,GAAlB,UAAmB,KAAQ,EAAE,KAAa;QACxC,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,EAAE;YACxB,OAAO,iBAAM,QAAQ,YAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SACrC;IACH,CAAC;IAEc,yBAAW,GAA1B,UAA8B,CAAmB,EAAE,CAAmB;QACpE,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,EAAE;YACvB,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,EAAE;gBACvB,OAAO,CAAC,CAAC;aACV;iBAAM,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,EAAE;gBAC5B,OAAO,CAAC,CAAC;aACV;iBAAM;gBACL,OAAO,CAAC,CAAC,CAAC;aACX;SACF;aAAM,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,EAAE;YAC5B,OAAO,CAAC,CAAC;SACV;aAAM;YACL,OAAO,CAAC,CAAC,CAAC;SACX;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AAjED,CAAsC,yBAAW,GAiEhD;AAjEY,sCAAa"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrame.js b/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrame.js deleted file mode 100644 index b82c164..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrame.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.animationFrame = exports.animationFrameScheduler = void 0; -var AnimationFrameAction_1 = require("./AnimationFrameAction"); -var AnimationFrameScheduler_1 = require("./AnimationFrameScheduler"); -exports.animationFrameScheduler = new AnimationFrameScheduler_1.AnimationFrameScheduler(AnimationFrameAction_1.AnimationFrameAction); -exports.animationFrame = exports.animationFrameScheduler; -//# sourceMappingURL=animationFrame.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrame.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrame.js.map deleted file mode 100644 index 775c374..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrame.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"animationFrame.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/animationFrame.ts"],"names":[],"mappings":";;;AAAA,+DAA8D;AAC9D,qEAAoE;AAkCvD,QAAA,uBAAuB,GAAG,IAAI,iDAAuB,CAAC,2CAAoB,CAAC,CAAC;AAK5E,QAAA,cAAc,GAAG,+BAAuB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrameProvider.js b/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrameProvider.js deleted file mode 100644 index f2405de..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrameProvider.js +++ /dev/null @@ -1,59 +0,0 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.animationFrameProvider = void 0; -var Subscription_1 = require("../Subscription"); -exports.animationFrameProvider = { - schedule: function (callback) { - var request = requestAnimationFrame; - var cancel = cancelAnimationFrame; - var delegate = exports.animationFrameProvider.delegate; - if (delegate) { - request = delegate.requestAnimationFrame; - cancel = delegate.cancelAnimationFrame; - } - var handle = request(function (timestamp) { - cancel = undefined; - callback(timestamp); - }); - return new Subscription_1.Subscription(function () { return cancel === null || cancel === void 0 ? void 0 : cancel(handle); }); - }, - requestAnimationFrame: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var delegate = exports.animationFrameProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame).apply(void 0, __spreadArray([], __read(args))); - }, - cancelAnimationFrame: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var delegate = exports.animationFrameProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame).apply(void 0, __spreadArray([], __read(args))); - }, - delegate: undefined, -}; -//# sourceMappingURL=animationFrameProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrameProvider.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrameProvider.js.map deleted file mode 100644 index f7288d4..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/animationFrameProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"animationFrameProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/animationFrameProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA+C;AAclC,QAAA,sBAAsB,GAA2B;IAG5D,QAAQ,EAAR,UAAS,QAAQ;QACf,IAAI,OAAO,GAAG,qBAAqB,CAAC;QACpC,IAAI,MAAM,GAA4C,oBAAoB,CAAC;QACnE,IAAA,QAAQ,GAAK,8BAAsB,SAA3B,CAA4B;QAC5C,IAAI,QAAQ,EAAE;YACZ,OAAO,GAAG,QAAQ,CAAC,qBAAqB,CAAC;YACzC,MAAM,GAAG,QAAQ,CAAC,oBAAoB,CAAC;SACxC;QACD,IAAM,MAAM,GAAG,OAAO,CAAC,UAAC,SAAS;YAI/B,MAAM,GAAG,SAAS,CAAC;YACnB,QAAQ,CAAC,SAAS,CAAC,CAAC;QACtB,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,2BAAY,CAAC,cAAM,OAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,MAAM,CAAC,EAAhB,CAAgB,CAAC,CAAC;IAClD,CAAC;IACD,qBAAqB;QAAC,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QACnB,IAAA,QAAQ,GAAK,8BAAsB,SAA3B,CAA4B;QAC5C,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,qBAAqB,KAAI,qBAAqB,CAAC,wCAAI,IAAI,IAAE;IAC7E,CAAC;IACD,oBAAoB;QAAC,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QAClB,IAAA,QAAQ,GAAK,8BAAsB,SAA3B,CAA4B;QAC5C,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,oBAAoB,KAAI,oBAAoB,CAAC,wCAAI,IAAI,IAAE;IAC3E,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/asap.js b/node_modules/rxjs/dist/cjs/internal/scheduler/asap.js deleted file mode 100644 index 4a56552..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/asap.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.asap = exports.asapScheduler = void 0; -var AsapAction_1 = require("./AsapAction"); -var AsapScheduler_1 = require("./AsapScheduler"); -exports.asapScheduler = new AsapScheduler_1.AsapScheduler(AsapAction_1.AsapAction); -exports.asap = exports.asapScheduler; -//# sourceMappingURL=asap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/asap.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/asap.js.map deleted file mode 100644 index 2014dc3..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/asap.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"asap.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/asap.ts"],"names":[],"mappings":";;;AAAA,2CAA0C;AAC1C,iDAAgD;AAqCnC,QAAA,aAAa,GAAG,IAAI,6BAAa,CAAC,uBAAU,CAAC,CAAC;AAK9C,QAAA,IAAI,GAAG,qBAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/async.js b/node_modules/rxjs/dist/cjs/internal/scheduler/async.js deleted file mode 100644 index b856880..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/async.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.async = exports.asyncScheduler = void 0; -var AsyncAction_1 = require("./AsyncAction"); -var AsyncScheduler_1 = require("./AsyncScheduler"); -exports.asyncScheduler = new AsyncScheduler_1.AsyncScheduler(AsyncAction_1.AsyncAction); -exports.async = exports.asyncScheduler; -//# sourceMappingURL=async.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/async.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/async.js.map deleted file mode 100644 index d0e7845..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/async.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"async.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/async.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAC5C,mDAAkD;AAiDrC,QAAA,cAAc,GAAG,IAAI,+BAAc,CAAC,yBAAW,CAAC,CAAC;AAKjD,QAAA,KAAK,GAAG,sBAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/dateTimestampProvider.js b/node_modules/rxjs/dist/cjs/internal/scheduler/dateTimestampProvider.js deleted file mode 100644 index ff0d65c..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/dateTimestampProvider.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.dateTimestampProvider = void 0; -exports.dateTimestampProvider = { - now: function () { - return (exports.dateTimestampProvider.delegate || Date).now(); - }, - delegate: undefined, -}; -//# sourceMappingURL=dateTimestampProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/dateTimestampProvider.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/dateTimestampProvider.js.map deleted file mode 100644 index 8c17b6e..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/dateTimestampProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dateTimestampProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/dateTimestampProvider.ts"],"names":[],"mappings":";;;AAMa,QAAA,qBAAqB,GAA0B;IAC1D,GAAG;QAGD,OAAO,CAAC,6BAAqB,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC;IACxD,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/immediateProvider.js b/node_modules/rxjs/dist/cjs/internal/scheduler/immediateProvider.js deleted file mode 100644 index 8aec321..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/immediateProvider.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.immediateProvider = void 0; -var Immediate_1 = require("../util/Immediate"); -var setImmediate = Immediate_1.Immediate.setImmediate, clearImmediate = Immediate_1.Immediate.clearImmediate; -exports.immediateProvider = { - setImmediate: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var delegate = exports.immediateProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate).apply(void 0, __spreadArray([], __read(args))); - }, - clearImmediate: function (handle) { - var delegate = exports.immediateProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate)(handle); - }, - delegate: undefined, -}; -//# sourceMappingURL=immediateProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/immediateProvider.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/immediateProvider.js.map deleted file mode 100644 index 0f1f16a..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/immediateProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"immediateProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/immediateProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA8C;AAEtC,IAAA,YAAY,GAAqB,qBAAS,aAA9B,EAAE,cAAc,GAAK,qBAAS,eAAd,CAAe;AAgBtC,QAAA,iBAAiB,GAAsB;IAGlD,YAAY;QAAC,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QACV,IAAA,QAAQ,GAAK,yBAAiB,SAAtB,CAAuB;QACvC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,YAAY,KAAI,YAAY,CAAC,wCAAI,IAAI,IAAE;IAC3D,CAAC;IACD,cAAc,EAAd,UAAe,MAAM;QACX,IAAA,QAAQ,GAAK,yBAAiB,SAAtB,CAAuB;QACvC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,cAAc,KAAI,cAAc,CAAC,CAAC,MAAa,CAAC,CAAC;IACrE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/intervalProvider.js b/node_modules/rxjs/dist/cjs/internal/scheduler/intervalProvider.js deleted file mode 100644 index e12dcaa..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/intervalProvider.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.intervalProvider = void 0; -exports.intervalProvider = { - setInterval: function (handler, timeout) { - var args = []; - for (var _i = 2; _i < arguments.length; _i++) { - args[_i - 2] = arguments[_i]; - } - var delegate = exports.intervalProvider.delegate; - if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) { - return delegate.setInterval.apply(delegate, __spreadArray([handler, timeout], __read(args))); - } - return setInterval.apply(void 0, __spreadArray([handler, timeout], __read(args))); - }, - clearInterval: function (handle) { - var delegate = exports.intervalProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle); - }, - delegate: undefined, -}; -//# sourceMappingURL=intervalProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/intervalProvider.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/intervalProvider.js.map deleted file mode 100644 index b8fe755..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/intervalProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"intervalProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/intervalProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAea,QAAA,gBAAgB,GAAqB;IAGhD,WAAW,EAAX,UAAY,OAAmB,EAAE,OAAgB;QAAE,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,6BAAO;;QAChD,IAAA,QAAQ,GAAK,wBAAgB,SAArB,CAAsB;QACtC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE;YACzB,OAAO,QAAQ,CAAC,WAAW,OAApB,QAAQ,iBAAa,OAAO,EAAE,OAAO,UAAK,IAAI,IAAE;SACxD;QACD,OAAO,WAAW,8BAAC,OAAO,EAAE,OAAO,UAAK,IAAI,IAAE;IAChD,CAAC;IACD,aAAa,EAAb,UAAc,MAAM;QACV,IAAA,QAAQ,GAAK,wBAAgB,SAArB,CAAsB;QACtC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,aAAa,KAAI,aAAa,CAAC,CAAC,MAAa,CAAC,CAAC;IACnE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/performanceTimestampProvider.js b/node_modules/rxjs/dist/cjs/internal/scheduler/performanceTimestampProvider.js deleted file mode 100644 index f28dd47..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/performanceTimestampProvider.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.performanceTimestampProvider = void 0; -exports.performanceTimestampProvider = { - now: function () { - return (exports.performanceTimestampProvider.delegate || performance).now(); - }, - delegate: undefined, -}; -//# sourceMappingURL=performanceTimestampProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/performanceTimestampProvider.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/performanceTimestampProvider.js.map deleted file mode 100644 index 774bfbd..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/performanceTimestampProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"performanceTimestampProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/performanceTimestampProvider.ts"],"names":[],"mappings":";;;AAMa,QAAA,4BAA4B,GAAiC;IACxE,GAAG;QAGD,OAAO,CAAC,oCAA4B,CAAC,QAAQ,IAAI,WAAW,CAAC,CAAC,GAAG,EAAE,CAAC;IACtE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/queue.js b/node_modules/rxjs/dist/cjs/internal/scheduler/queue.js deleted file mode 100644 index db9e485..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/queue.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.queue = exports.queueScheduler = void 0; -var QueueAction_1 = require("./QueueAction"); -var QueueScheduler_1 = require("./QueueScheduler"); -exports.queueScheduler = new QueueScheduler_1.QueueScheduler(QueueAction_1.QueueAction); -exports.queue = exports.queueScheduler; -//# sourceMappingURL=queue.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/queue.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/queue.js.map deleted file mode 100644 index 64600be..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/queue.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"queue.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/queue.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAC5C,mDAAkD;AAiErC,QAAA,cAAc,GAAG,IAAI,+BAAc,CAAC,yBAAW,CAAC,CAAC;AAKjD,QAAA,KAAK,GAAG,sBAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/timeoutProvider.js b/node_modules/rxjs/dist/cjs/internal/scheduler/timeoutProvider.js deleted file mode 100644 index 893c458..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/timeoutProvider.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.timeoutProvider = void 0; -exports.timeoutProvider = { - setTimeout: function (handler, timeout) { - var args = []; - for (var _i = 2; _i < arguments.length; _i++) { - args[_i - 2] = arguments[_i]; - } - var delegate = exports.timeoutProvider.delegate; - if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) { - return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args))); - } - return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args))); - }, - clearTimeout: function (handle) { - var delegate = exports.timeoutProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle); - }, - delegate: undefined, -}; -//# sourceMappingURL=timeoutProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/timeoutProvider.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/timeoutProvider.js.map deleted file mode 100644 index efc21bc..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/timeoutProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timeoutProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/timeoutProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAea,QAAA,eAAe,GAAoB;IAG9C,UAAU,EAAV,UAAW,OAAmB,EAAE,OAAgB;QAAE,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,6BAAO;;QAC/C,IAAA,QAAQ,GAAK,uBAAe,SAApB,CAAqB;QACrC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,UAAU,EAAE;YACxB,OAAO,QAAQ,CAAC,UAAU,OAAnB,QAAQ,iBAAY,OAAO,EAAE,OAAO,UAAK,IAAI,IAAE;SACvD;QACD,OAAO,UAAU,8BAAC,OAAO,EAAE,OAAO,UAAK,IAAI,IAAE;IAC/C,CAAC;IACD,YAAY,EAAZ,UAAa,MAAM;QACT,IAAA,QAAQ,GAAK,uBAAe,SAApB,CAAqB;QACrC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,YAAY,KAAI,YAAY,CAAC,CAAC,MAAa,CAAC,CAAC;IACjE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/timerHandle.js b/node_modules/rxjs/dist/cjs/internal/scheduler/timerHandle.js deleted file mode 100644 index 6480e89..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/timerHandle.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=timerHandle.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/scheduler/timerHandle.js.map b/node_modules/rxjs/dist/cjs/internal/scheduler/timerHandle.js.map deleted file mode 100644 index 8efd320..0000000 --- a/node_modules/rxjs/dist/cjs/internal/scheduler/timerHandle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timerHandle.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/timerHandle.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/symbol/iterator.js b/node_modules/rxjs/dist/cjs/internal/symbol/iterator.js deleted file mode 100644 index 61058fc..0000000 --- a/node_modules/rxjs/dist/cjs/internal/symbol/iterator.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.iterator = exports.getSymbolIterator = void 0; -function getSymbolIterator() { - if (typeof Symbol !== 'function' || !Symbol.iterator) { - return '@@iterator'; - } - return Symbol.iterator; -} -exports.getSymbolIterator = getSymbolIterator; -exports.iterator = getSymbolIterator(); -//# sourceMappingURL=iterator.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/symbol/iterator.js.map b/node_modules/rxjs/dist/cjs/internal/symbol/iterator.js.map deleted file mode 100644 index 7f39958..0000000 --- a/node_modules/rxjs/dist/cjs/internal/symbol/iterator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"iterator.js","sourceRoot":"","sources":["../../../../src/internal/symbol/iterator.ts"],"names":[],"mappings":";;;AAAA,SAAgB,iBAAiB;IAC/B,IAAI,OAAO,MAAM,KAAK,UAAU,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;QACpD,OAAO,YAAmB,CAAC;KAC5B;IAED,OAAO,MAAM,CAAC,QAAQ,CAAC;AACzB,CAAC;AAND,8CAMC;AAEY,QAAA,QAAQ,GAAG,iBAAiB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/symbol/observable.js b/node_modules/rxjs/dist/cjs/internal/symbol/observable.js deleted file mode 100644 index f80dd59..0000000 --- a/node_modules/rxjs/dist/cjs/internal/symbol/observable.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.observable = void 0; -exports.observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })(); -//# sourceMappingURL=observable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/symbol/observable.js.map b/node_modules/rxjs/dist/cjs/internal/symbol/observable.js.map deleted file mode 100644 index 7bf62fe..0000000 --- a/node_modules/rxjs/dist/cjs/internal/symbol/observable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"observable.js","sourceRoot":"","sources":["../../../../src/internal/symbol/observable.ts"],"names":[],"mappings":";;;AAMa,QAAA,UAAU,GAAoB,CAAC,cAAM,OAAA,CAAC,OAAO,MAAM,KAAK,UAAU,IAAI,MAAM,CAAC,UAAU,CAAC,IAAI,cAAc,EAArE,CAAqE,CAAC,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/testing/ColdObservable.js b/node_modules/rxjs/dist/cjs/internal/testing/ColdObservable.js deleted file mode 100644 index a9b1816..0000000 --- a/node_modules/rxjs/dist/cjs/internal/testing/ColdObservable.js +++ /dev/null @@ -1,56 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ColdObservable = void 0; -var Observable_1 = require("../Observable"); -var Subscription_1 = require("../Subscription"); -var SubscriptionLoggable_1 = require("./SubscriptionLoggable"); -var applyMixins_1 = require("../util/applyMixins"); -var Notification_1 = require("../Notification"); -var ColdObservable = (function (_super) { - __extends(ColdObservable, _super); - function ColdObservable(messages, scheduler) { - var _this = _super.call(this, function (subscriber) { - var observable = this; - var index = observable.logSubscribedFrame(); - var subscription = new Subscription_1.Subscription(); - subscription.add(new Subscription_1.Subscription(function () { - observable.logUnsubscribedFrame(index); - })); - observable.scheduleMessages(subscriber); - return subscription; - }) || this; - _this.messages = messages; - _this.subscriptions = []; - _this.scheduler = scheduler; - return _this; - } - ColdObservable.prototype.scheduleMessages = function (subscriber) { - var messagesLength = this.messages.length; - for (var i = 0; i < messagesLength; i++) { - var message = this.messages[i]; - subscriber.add(this.scheduler.schedule(function (state) { - var _a = state, notification = _a.message.notification, destination = _a.subscriber; - Notification_1.observeNotification(notification, destination); - }, message.frame, { message: message, subscriber: subscriber })); - } - }; - return ColdObservable; -}(Observable_1.Observable)); -exports.ColdObservable = ColdObservable; -applyMixins_1.applyMixins(ColdObservable, [SubscriptionLoggable_1.SubscriptionLoggable]); -//# sourceMappingURL=ColdObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/testing/ColdObservable.js.map b/node_modules/rxjs/dist/cjs/internal/testing/ColdObservable.js.map deleted file mode 100644 index 875114d..0000000 --- a/node_modules/rxjs/dist/cjs/internal/testing/ColdObservable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ColdObservable.js","sourceRoot":"","sources":["../../../../src/internal/testing/ColdObservable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,4CAA2C;AAC3C,gDAA+C;AAI/C,+DAA8D;AAC9D,mDAAkD;AAElD,gDAAsD;AAEtD;IAAuC,kCAAa;IAQlD,wBAAmB,QAAuB,EAAE,SAAoB;QAAhE,YACE,kBAAM,UAA+B,UAA2B;YAC9D,IAAM,UAAU,GAAsB,IAAW,CAAC;YAClD,IAAM,KAAK,GAAG,UAAU,CAAC,kBAAkB,EAAE,CAAC;YAC9C,IAAM,YAAY,GAAG,IAAI,2BAAY,EAAE,CAAC;YACxC,YAAY,CAAC,GAAG,CACd,IAAI,2BAAY,CAAC;gBACf,UAAU,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;YACzC,CAAC,CAAC,CACH,CAAC;YACF,UAAU,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;YACxC,OAAO,YAAY,CAAC;QACtB,CAAC,CAAC,SAEH;QAdkB,cAAQ,GAAR,QAAQ,CAAe;QAPnC,mBAAa,GAAsB,EAAE,CAAC;QAoB3C,KAAI,CAAC,SAAS,GAAG,SAAS,CAAC;;IAC7B,CAAC;IAED,yCAAgB,GAAhB,UAAiB,UAA2B;QAC1C,IAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;QAC5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,EAAE,CAAC,EAAE,EAAE;YACvC,IAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YACjC,UAAU,CAAC,GAAG,CACZ,IAAI,CAAC,SAAS,CAAC,QAAQ,CACrB,UAAC,KAAK;gBACE,IAAA,KAAyD,KAAM,EAAlD,YAAY,0BAAA,EAAgB,WAAW,gBAAW,CAAC;gBACtE,kCAAmB,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;YACjD,CAAC,EACD,OAAO,CAAC,KAAK,EACb,EAAE,OAAO,SAAA,EAAE,UAAU,YAAA,EAAE,CACxB,CACF,CAAC;SACH;IACH,CAAC;IACH,qBAAC;AAAD,CAAC,AAxCD,CAAuC,uBAAU,GAwChD;AAxCY,wCAAc;AAyC3B,yBAAW,CAAC,cAAc,EAAE,CAAC,2CAAoB,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/testing/HotObservable.js b/node_modules/rxjs/dist/cjs/internal/testing/HotObservable.js deleted file mode 100644 index a01c570..0000000 --- a/node_modules/rxjs/dist/cjs/internal/testing/HotObservable.js +++ /dev/null @@ -1,62 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.HotObservable = void 0; -var Subject_1 = require("../Subject"); -var Subscription_1 = require("../Subscription"); -var SubscriptionLoggable_1 = require("./SubscriptionLoggable"); -var applyMixins_1 = require("../util/applyMixins"); -var Notification_1 = require("../Notification"); -var HotObservable = (function (_super) { - __extends(HotObservable, _super); - function HotObservable(messages, scheduler) { - var _this = _super.call(this) || this; - _this.messages = messages; - _this.subscriptions = []; - _this.scheduler = scheduler; - return _this; - } - HotObservable.prototype._subscribe = function (subscriber) { - var subject = this; - var index = subject.logSubscribedFrame(); - var subscription = new Subscription_1.Subscription(); - subscription.add(new Subscription_1.Subscription(function () { - subject.logUnsubscribedFrame(index); - })); - subscription.add(_super.prototype._subscribe.call(this, subscriber)); - return subscription; - }; - HotObservable.prototype.setup = function () { - var subject = this; - var messagesLength = subject.messages.length; - var _loop_1 = function (i) { - (function () { - var _a = subject.messages[i], notification = _a.notification, frame = _a.frame; - subject.scheduler.schedule(function () { - Notification_1.observeNotification(notification, subject); - }, frame); - })(); - }; - for (var i = 0; i < messagesLength; i++) { - _loop_1(i); - } - }; - return HotObservable; -}(Subject_1.Subject)); -exports.HotObservable = HotObservable; -applyMixins_1.applyMixins(HotObservable, [SubscriptionLoggable_1.SubscriptionLoggable]); -//# sourceMappingURL=HotObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/testing/HotObservable.js.map b/node_modules/rxjs/dist/cjs/internal/testing/HotObservable.js.map deleted file mode 100644 index 449a094..0000000 --- a/node_modules/rxjs/dist/cjs/internal/testing/HotObservable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"HotObservable.js","sourceRoot":"","sources":["../../../../src/internal/testing/HotObservable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,sCAAqC;AAErC,gDAA+C;AAI/C,+DAA8D;AAC9D,mDAAkD;AAClD,gDAAsD;AAEtD;IAAsC,iCAAU;IAQ9C,uBAAmB,QAAuB,EAAE,SAAoB;QAAhE,YACE,iBAAO,SAER;QAHkB,cAAQ,GAAR,QAAQ,CAAe;QAPnC,mBAAa,GAAsB,EAAE,CAAC;QAS3C,KAAI,CAAC,SAAS,GAAG,SAAS,CAAC;;IAC7B,CAAC;IAGS,kCAAU,GAApB,UAAqB,UAA2B;QAC9C,IAAM,OAAO,GAAqB,IAAI,CAAC;QACvC,IAAM,KAAK,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;QAC3C,IAAM,YAAY,GAAG,IAAI,2BAAY,EAAE,CAAC;QACxC,YAAY,CAAC,GAAG,CACd,IAAI,2BAAY,CAAC;YACf,OAAO,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;QACtC,CAAC,CAAC,CACH,CAAC;QACF,YAAY,CAAC,GAAG,CAAC,iBAAM,UAAU,YAAC,UAAU,CAAC,CAAC,CAAC;QAC/C,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,6BAAK,GAAL;QACE,IAAM,OAAO,GAAG,IAAI,CAAC;QACrB,IAAM,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;gCAEtC,CAAC;YACR,CAAC;gBACO,IAAA,KAA0B,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAA3C,YAAY,kBAAA,EAAE,KAAK,WAAwB,CAAC;gBAEpD,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC;oBACzB,kCAAmB,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;gBAC7C,CAAC,EAAE,KAAK,CAAC,CAAC;YACZ,CAAC,CAAC,EAAE,CAAC;;QAPP,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,EAAE,CAAC,EAAE;oBAA9B,CAAC;SAQT;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AAzCD,CAAsC,iBAAO,GAyC5C;AAzCY,sCAAa;AA0C1B,yBAAW,CAAC,aAAa,EAAE,CAAC,2CAAoB,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/testing/SubscriptionLog.js b/node_modules/rxjs/dist/cjs/internal/testing/SubscriptionLog.js deleted file mode 100644 index 24120b0..0000000 --- a/node_modules/rxjs/dist/cjs/internal/testing/SubscriptionLog.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SubscriptionLog = void 0; -var SubscriptionLog = (function () { - function SubscriptionLog(subscribedFrame, unsubscribedFrame) { - if (unsubscribedFrame === void 0) { unsubscribedFrame = Infinity; } - this.subscribedFrame = subscribedFrame; - this.unsubscribedFrame = unsubscribedFrame; - } - return SubscriptionLog; -}()); -exports.SubscriptionLog = SubscriptionLog; -//# sourceMappingURL=SubscriptionLog.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/testing/SubscriptionLog.js.map b/node_modules/rxjs/dist/cjs/internal/testing/SubscriptionLog.js.map deleted file mode 100644 index 5356258..0000000 --- a/node_modules/rxjs/dist/cjs/internal/testing/SubscriptionLog.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SubscriptionLog.js","sourceRoot":"","sources":["../../../../src/internal/testing/SubscriptionLog.ts"],"names":[],"mappings":";;;AAAA;IACE,yBAAmB,eAAuB,EACvB,iBAAoC;QAApC,kCAAA,EAAA,4BAAoC;QADpC,oBAAe,GAAf,eAAe,CAAQ;QACvB,sBAAiB,GAAjB,iBAAiB,CAAmB;IACvD,CAAC;IACH,sBAAC;AAAD,CAAC,AAJD,IAIC;AAJY,0CAAe"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/testing/SubscriptionLoggable.js b/node_modules/rxjs/dist/cjs/internal/testing/SubscriptionLoggable.js deleted file mode 100644 index a457305..0000000 --- a/node_modules/rxjs/dist/cjs/internal/testing/SubscriptionLoggable.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SubscriptionLoggable = void 0; -var SubscriptionLog_1 = require("./SubscriptionLog"); -var SubscriptionLoggable = (function () { - function SubscriptionLoggable() { - this.subscriptions = []; - } - SubscriptionLoggable.prototype.logSubscribedFrame = function () { - this.subscriptions.push(new SubscriptionLog_1.SubscriptionLog(this.scheduler.now())); - return this.subscriptions.length - 1; - }; - SubscriptionLoggable.prototype.logUnsubscribedFrame = function (index) { - var subscriptionLogs = this.subscriptions; - var oldSubscriptionLog = subscriptionLogs[index]; - subscriptionLogs[index] = new SubscriptionLog_1.SubscriptionLog(oldSubscriptionLog.subscribedFrame, this.scheduler.now()); - }; - return SubscriptionLoggable; -}()); -exports.SubscriptionLoggable = SubscriptionLoggable; -//# sourceMappingURL=SubscriptionLoggable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/testing/SubscriptionLoggable.js.map b/node_modules/rxjs/dist/cjs/internal/testing/SubscriptionLoggable.js.map deleted file mode 100644 index debaa6d..0000000 --- a/node_modules/rxjs/dist/cjs/internal/testing/SubscriptionLoggable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SubscriptionLoggable.js","sourceRoot":"","sources":["../../../../src/internal/testing/SubscriptionLoggable.ts"],"names":[],"mappings":";;;AACA,qDAAoD;AAEpD;IAAA;QACS,kBAAa,GAAsB,EAAE,CAAC;IAiB/C,CAAC;IAbC,iDAAkB,GAAlB;QACE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,iCAAe,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACnE,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;IACvC,CAAC;IAED,mDAAoB,GAApB,UAAqB,KAAa;QAChC,IAAM,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC;QAC5C,IAAM,kBAAkB,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;QACnD,gBAAgB,CAAC,KAAK,CAAC,GAAG,IAAI,iCAAe,CAC3C,kBAAkB,CAAC,eAAe,EAClC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CACrB,CAAC;IACJ,CAAC;IACH,2BAAC;AAAD,CAAC,AAlBD,IAkBC;AAlBY,oDAAoB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/testing/TestMessage.js b/node_modules/rxjs/dist/cjs/internal/testing/TestMessage.js deleted file mode 100644 index 7bb158d..0000000 --- a/node_modules/rxjs/dist/cjs/internal/testing/TestMessage.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=TestMessage.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/testing/TestMessage.js.map b/node_modules/rxjs/dist/cjs/internal/testing/TestMessage.js.map deleted file mode 100644 index f91e8da..0000000 --- a/node_modules/rxjs/dist/cjs/internal/testing/TestMessage.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TestMessage.js","sourceRoot":"","sources":["../../../../src/internal/testing/TestMessage.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/testing/TestScheduler.js b/node_modules/rxjs/dist/cjs/internal/testing/TestScheduler.js deleted file mode 100644 index a7a4924..0000000 --- a/node_modules/rxjs/dist/cjs/internal/testing/TestScheduler.js +++ /dev/null @@ -1,618 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TestScheduler = void 0; -var Observable_1 = require("../Observable"); -var ColdObservable_1 = require("./ColdObservable"); -var HotObservable_1 = require("./HotObservable"); -var SubscriptionLog_1 = require("./SubscriptionLog"); -var VirtualTimeScheduler_1 = require("../scheduler/VirtualTimeScheduler"); -var NotificationFactories_1 = require("../NotificationFactories"); -var dateTimestampProvider_1 = require("../scheduler/dateTimestampProvider"); -var performanceTimestampProvider_1 = require("../scheduler/performanceTimestampProvider"); -var animationFrameProvider_1 = require("../scheduler/animationFrameProvider"); -var immediateProvider_1 = require("../scheduler/immediateProvider"); -var intervalProvider_1 = require("../scheduler/intervalProvider"); -var timeoutProvider_1 = require("../scheduler/timeoutProvider"); -var defaultMaxFrame = 750; -var TestScheduler = (function (_super) { - __extends(TestScheduler, _super); - function TestScheduler(assertDeepEqual) { - var _this = _super.call(this, VirtualTimeScheduler_1.VirtualAction, defaultMaxFrame) || this; - _this.assertDeepEqual = assertDeepEqual; - _this.hotObservables = []; - _this.coldObservables = []; - _this.flushTests = []; - _this.runMode = false; - return _this; - } - TestScheduler.prototype.createTime = function (marbles) { - var indexOf = this.runMode ? marbles.trim().indexOf('|') : marbles.indexOf('|'); - if (indexOf === -1) { - throw new Error('marble diagram for time should have a completion marker "|"'); - } - return indexOf * TestScheduler.frameTimeFactor; - }; - TestScheduler.prototype.createColdObservable = function (marbles, values, error) { - if (marbles.indexOf('^') !== -1) { - throw new Error('cold observable cannot have subscription offset "^"'); - } - if (marbles.indexOf('!') !== -1) { - throw new Error('cold observable cannot have unsubscription marker "!"'); - } - var messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); - var cold = new ColdObservable_1.ColdObservable(messages, this); - this.coldObservables.push(cold); - return cold; - }; - TestScheduler.prototype.createHotObservable = function (marbles, values, error) { - if (marbles.indexOf('!') !== -1) { - throw new Error('hot observable cannot have unsubscription marker "!"'); - } - var messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); - var subject = new HotObservable_1.HotObservable(messages, this); - this.hotObservables.push(subject); - return subject; - }; - TestScheduler.prototype.materializeInnerObservable = function (observable, outerFrame) { - var _this = this; - var messages = []; - observable.subscribe({ - next: function (value) { - messages.push({ frame: _this.frame - outerFrame, notification: NotificationFactories_1.nextNotification(value) }); - }, - error: function (error) { - messages.push({ frame: _this.frame - outerFrame, notification: NotificationFactories_1.errorNotification(error) }); - }, - complete: function () { - messages.push({ frame: _this.frame - outerFrame, notification: NotificationFactories_1.COMPLETE_NOTIFICATION }); - }, - }); - return messages; - }; - TestScheduler.prototype.expectObservable = function (observable, subscriptionMarbles) { - var _this = this; - if (subscriptionMarbles === void 0) { subscriptionMarbles = null; } - var actual = []; - var flushTest = { actual: actual, ready: false }; - var subscriptionParsed = TestScheduler.parseMarblesAsSubscriptions(subscriptionMarbles, this.runMode); - var subscriptionFrame = subscriptionParsed.subscribedFrame === Infinity ? 0 : subscriptionParsed.subscribedFrame; - var unsubscriptionFrame = subscriptionParsed.unsubscribedFrame; - var subscription; - this.schedule(function () { - subscription = observable.subscribe({ - next: function (x) { - var value = x instanceof Observable_1.Observable ? _this.materializeInnerObservable(x, _this.frame) : x; - actual.push({ frame: _this.frame, notification: NotificationFactories_1.nextNotification(value) }); - }, - error: function (error) { - actual.push({ frame: _this.frame, notification: NotificationFactories_1.errorNotification(error) }); - }, - complete: function () { - actual.push({ frame: _this.frame, notification: NotificationFactories_1.COMPLETE_NOTIFICATION }); - }, - }); - }, subscriptionFrame); - if (unsubscriptionFrame !== Infinity) { - this.schedule(function () { return subscription.unsubscribe(); }, unsubscriptionFrame); - } - this.flushTests.push(flushTest); - var runMode = this.runMode; - return { - toBe: function (marbles, values, errorValue) { - flushTest.ready = true; - flushTest.expected = TestScheduler.parseMarbles(marbles, values, errorValue, true, runMode); - }, - toEqual: function (other) { - flushTest.ready = true; - flushTest.expected = []; - _this.schedule(function () { - subscription = other.subscribe({ - next: function (x) { - var value = x instanceof Observable_1.Observable ? _this.materializeInnerObservable(x, _this.frame) : x; - flushTest.expected.push({ frame: _this.frame, notification: NotificationFactories_1.nextNotification(value) }); - }, - error: function (error) { - flushTest.expected.push({ frame: _this.frame, notification: NotificationFactories_1.errorNotification(error) }); - }, - complete: function () { - flushTest.expected.push({ frame: _this.frame, notification: NotificationFactories_1.COMPLETE_NOTIFICATION }); - }, - }); - }, subscriptionFrame); - }, - }; - }; - TestScheduler.prototype.expectSubscriptions = function (actualSubscriptionLogs) { - var flushTest = { actual: actualSubscriptionLogs, ready: false }; - this.flushTests.push(flushTest); - var runMode = this.runMode; - return { - toBe: function (marblesOrMarblesArray) { - var marblesArray = typeof marblesOrMarblesArray === 'string' ? [marblesOrMarblesArray] : marblesOrMarblesArray; - flushTest.ready = true; - flushTest.expected = marblesArray - .map(function (marbles) { return TestScheduler.parseMarblesAsSubscriptions(marbles, runMode); }) - .filter(function (marbles) { return marbles.subscribedFrame !== Infinity; }); - }, - }; - }; - TestScheduler.prototype.flush = function () { - var _this = this; - var hotObservables = this.hotObservables; - while (hotObservables.length > 0) { - hotObservables.shift().setup(); - } - _super.prototype.flush.call(this); - this.flushTests = this.flushTests.filter(function (test) { - if (test.ready) { - _this.assertDeepEqual(test.actual, test.expected); - return false; - } - return true; - }); - }; - TestScheduler.parseMarblesAsSubscriptions = function (marbles, runMode) { - var _this = this; - if (runMode === void 0) { runMode = false; } - if (typeof marbles !== 'string') { - return new SubscriptionLog_1.SubscriptionLog(Infinity); - } - var characters = __spreadArray([], __read(marbles)); - var len = characters.length; - var groupStart = -1; - var subscriptionFrame = Infinity; - var unsubscriptionFrame = Infinity; - var frame = 0; - var _loop_1 = function (i) { - var nextFrame = frame; - var advanceFrameBy = function (count) { - nextFrame += count * _this.frameTimeFactor; - }; - var c = characters[i]; - switch (c) { - case ' ': - if (!runMode) { - advanceFrameBy(1); - } - break; - case '-': - advanceFrameBy(1); - break; - case '(': - groupStart = frame; - advanceFrameBy(1); - break; - case ')': - groupStart = -1; - advanceFrameBy(1); - break; - case '^': - if (subscriptionFrame !== Infinity) { - throw new Error("found a second subscription point '^' in a " + 'subscription marble diagram. There can only be one.'); - } - subscriptionFrame = groupStart > -1 ? groupStart : frame; - advanceFrameBy(1); - break; - case '!': - if (unsubscriptionFrame !== Infinity) { - throw new Error("found a second unsubscription point '!' in a " + 'subscription marble diagram. There can only be one.'); - } - unsubscriptionFrame = groupStart > -1 ? groupStart : frame; - break; - default: - if (runMode && c.match(/^[0-9]$/)) { - if (i === 0 || characters[i - 1] === ' ') { - var buffer = characters.slice(i).join(''); - var match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); - if (match) { - i += match[0].length - 1; - var duration = parseFloat(match[1]); - var unit = match[2]; - var durationInMs = void 0; - switch (unit) { - case 'ms': - durationInMs = duration; - break; - case 's': - durationInMs = duration * 1000; - break; - case 'm': - durationInMs = duration * 1000 * 60; - break; - default: - break; - } - advanceFrameBy(durationInMs / this_1.frameTimeFactor); - break; - } - } - } - throw new Error("there can only be '^' and '!' markers in a " + "subscription marble diagram. Found instead '" + c + "'."); - } - frame = nextFrame; - out_i_1 = i; - }; - var this_1 = this, out_i_1; - for (var i = 0; i < len; i++) { - _loop_1(i); - i = out_i_1; - } - if (unsubscriptionFrame < 0) { - return new SubscriptionLog_1.SubscriptionLog(subscriptionFrame); - } - else { - return new SubscriptionLog_1.SubscriptionLog(subscriptionFrame, unsubscriptionFrame); - } - }; - TestScheduler.parseMarbles = function (marbles, values, errorValue, materializeInnerObservables, runMode) { - var _this = this; - if (materializeInnerObservables === void 0) { materializeInnerObservables = false; } - if (runMode === void 0) { runMode = false; } - if (marbles.indexOf('!') !== -1) { - throw new Error('conventional marble diagrams cannot have the ' + 'unsubscription marker "!"'); - } - var characters = __spreadArray([], __read(marbles)); - var len = characters.length; - var testMessages = []; - var subIndex = runMode ? marbles.replace(/^[ ]+/, '').indexOf('^') : marbles.indexOf('^'); - var frame = subIndex === -1 ? 0 : subIndex * -this.frameTimeFactor; - var getValue = typeof values !== 'object' - ? function (x) { return x; } - : function (x) { - if (materializeInnerObservables && values[x] instanceof ColdObservable_1.ColdObservable) { - return values[x].messages; - } - return values[x]; - }; - var groupStart = -1; - var _loop_2 = function (i) { - var nextFrame = frame; - var advanceFrameBy = function (count) { - nextFrame += count * _this.frameTimeFactor; - }; - var notification = void 0; - var c = characters[i]; - switch (c) { - case ' ': - if (!runMode) { - advanceFrameBy(1); - } - break; - case '-': - advanceFrameBy(1); - break; - case '(': - groupStart = frame; - advanceFrameBy(1); - break; - case ')': - groupStart = -1; - advanceFrameBy(1); - break; - case '|': - notification = NotificationFactories_1.COMPLETE_NOTIFICATION; - advanceFrameBy(1); - break; - case '^': - advanceFrameBy(1); - break; - case '#': - notification = NotificationFactories_1.errorNotification(errorValue || 'error'); - advanceFrameBy(1); - break; - default: - if (runMode && c.match(/^[0-9]$/)) { - if (i === 0 || characters[i - 1] === ' ') { - var buffer = characters.slice(i).join(''); - var match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); - if (match) { - i += match[0].length - 1; - var duration = parseFloat(match[1]); - var unit = match[2]; - var durationInMs = void 0; - switch (unit) { - case 'ms': - durationInMs = duration; - break; - case 's': - durationInMs = duration * 1000; - break; - case 'm': - durationInMs = duration * 1000 * 60; - break; - default: - break; - } - advanceFrameBy(durationInMs / this_2.frameTimeFactor); - break; - } - } - } - notification = NotificationFactories_1.nextNotification(getValue(c)); - advanceFrameBy(1); - break; - } - if (notification) { - testMessages.push({ frame: groupStart > -1 ? groupStart : frame, notification: notification }); - } - frame = nextFrame; - out_i_2 = i; - }; - var this_2 = this, out_i_2; - for (var i = 0; i < len; i++) { - _loop_2(i); - i = out_i_2; - } - return testMessages; - }; - TestScheduler.prototype.createAnimator = function () { - var _this = this; - if (!this.runMode) { - throw new Error('animate() must only be used in run mode'); - } - var lastHandle = 0; - var map; - var delegate = { - requestAnimationFrame: function (callback) { - if (!map) { - throw new Error('animate() was not called within run()'); - } - var handle = ++lastHandle; - map.set(handle, callback); - return handle; - }, - cancelAnimationFrame: function (handle) { - if (!map) { - throw new Error('animate() was not called within run()'); - } - map.delete(handle); - }, - }; - var animate = function (marbles) { - var e_1, _a; - if (map) { - throw new Error('animate() must not be called more than once within run()'); - } - if (/[|#]/.test(marbles)) { - throw new Error('animate() must not complete or error'); - } - map = new Map(); - var messages = TestScheduler.parseMarbles(marbles, undefined, undefined, undefined, true); - try { - for (var messages_1 = __values(messages), messages_1_1 = messages_1.next(); !messages_1_1.done; messages_1_1 = messages_1.next()) { - var message = messages_1_1.value; - _this.schedule(function () { - var e_2, _a; - var now = _this.now(); - var callbacks = Array.from(map.values()); - map.clear(); - try { - for (var callbacks_1 = (e_2 = void 0, __values(callbacks)), callbacks_1_1 = callbacks_1.next(); !callbacks_1_1.done; callbacks_1_1 = callbacks_1.next()) { - var callback = callbacks_1_1.value; - callback(now); - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (callbacks_1_1 && !callbacks_1_1.done && (_a = callbacks_1.return)) _a.call(callbacks_1); - } - finally { if (e_2) throw e_2.error; } - } - }, message.frame); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (messages_1_1 && !messages_1_1.done && (_a = messages_1.return)) _a.call(messages_1); - } - finally { if (e_1) throw e_1.error; } - } - }; - return { animate: animate, delegate: delegate }; - }; - TestScheduler.prototype.createDelegates = function () { - var _this = this; - var lastHandle = 0; - var scheduleLookup = new Map(); - var run = function () { - var now = _this.now(); - var scheduledRecords = Array.from(scheduleLookup.values()); - var scheduledRecordsDue = scheduledRecords.filter(function (_a) { - var due = _a.due; - return due <= now; - }); - var dueImmediates = scheduledRecordsDue.filter(function (_a) { - var type = _a.type; - return type === 'immediate'; - }); - if (dueImmediates.length > 0) { - var _a = dueImmediates[0], handle = _a.handle, handler = _a.handler; - scheduleLookup.delete(handle); - handler(); - return; - } - var dueIntervals = scheduledRecordsDue.filter(function (_a) { - var type = _a.type; - return type === 'interval'; - }); - if (dueIntervals.length > 0) { - var firstDueInterval = dueIntervals[0]; - var duration = firstDueInterval.duration, handler = firstDueInterval.handler; - firstDueInterval.due = now + duration; - firstDueInterval.subscription = _this.schedule(run, duration); - handler(); - return; - } - var dueTimeouts = scheduledRecordsDue.filter(function (_a) { - var type = _a.type; - return type === 'timeout'; - }); - if (dueTimeouts.length > 0) { - var _b = dueTimeouts[0], handle = _b.handle, handler = _b.handler; - scheduleLookup.delete(handle); - handler(); - return; - } - throw new Error('Expected a due immediate or interval'); - }; - var immediate = { - setImmediate: function (handler) { - var handle = ++lastHandle; - scheduleLookup.set(handle, { - due: _this.now(), - duration: 0, - handle: handle, - handler: handler, - subscription: _this.schedule(run, 0), - type: 'immediate', - }); - return handle; - }, - clearImmediate: function (handle) { - var value = scheduleLookup.get(handle); - if (value) { - value.subscription.unsubscribe(); - scheduleLookup.delete(handle); - } - }, - }; - var interval = { - setInterval: function (handler, duration) { - if (duration === void 0) { duration = 0; } - var handle = ++lastHandle; - scheduleLookup.set(handle, { - due: _this.now() + duration, - duration: duration, - handle: handle, - handler: handler, - subscription: _this.schedule(run, duration), - type: 'interval', - }); - return handle; - }, - clearInterval: function (handle) { - var value = scheduleLookup.get(handle); - if (value) { - value.subscription.unsubscribe(); - scheduleLookup.delete(handle); - } - }, - }; - var timeout = { - setTimeout: function (handler, duration) { - if (duration === void 0) { duration = 0; } - var handle = ++lastHandle; - scheduleLookup.set(handle, { - due: _this.now() + duration, - duration: duration, - handle: handle, - handler: handler, - subscription: _this.schedule(run, duration), - type: 'timeout', - }); - return handle; - }, - clearTimeout: function (handle) { - var value = scheduleLookup.get(handle); - if (value) { - value.subscription.unsubscribe(); - scheduleLookup.delete(handle); - } - }, - }; - return { immediate: immediate, interval: interval, timeout: timeout }; - }; - TestScheduler.prototype.run = function (callback) { - var prevFrameTimeFactor = TestScheduler.frameTimeFactor; - var prevMaxFrames = this.maxFrames; - TestScheduler.frameTimeFactor = 1; - this.maxFrames = Infinity; - this.runMode = true; - var animator = this.createAnimator(); - var delegates = this.createDelegates(); - animationFrameProvider_1.animationFrameProvider.delegate = animator.delegate; - dateTimestampProvider_1.dateTimestampProvider.delegate = this; - immediateProvider_1.immediateProvider.delegate = delegates.immediate; - intervalProvider_1.intervalProvider.delegate = delegates.interval; - timeoutProvider_1.timeoutProvider.delegate = delegates.timeout; - performanceTimestampProvider_1.performanceTimestampProvider.delegate = this; - var helpers = { - cold: this.createColdObservable.bind(this), - hot: this.createHotObservable.bind(this), - flush: this.flush.bind(this), - time: this.createTime.bind(this), - expectObservable: this.expectObservable.bind(this), - expectSubscriptions: this.expectSubscriptions.bind(this), - animate: animator.animate, - }; - try { - var ret = callback(helpers); - this.flush(); - return ret; - } - finally { - TestScheduler.frameTimeFactor = prevFrameTimeFactor; - this.maxFrames = prevMaxFrames; - this.runMode = false; - animationFrameProvider_1.animationFrameProvider.delegate = undefined; - dateTimestampProvider_1.dateTimestampProvider.delegate = undefined; - immediateProvider_1.immediateProvider.delegate = undefined; - intervalProvider_1.intervalProvider.delegate = undefined; - timeoutProvider_1.timeoutProvider.delegate = undefined; - performanceTimestampProvider_1.performanceTimestampProvider.delegate = undefined; - } - }; - TestScheduler.frameTimeFactor = 10; - return TestScheduler; -}(VirtualTimeScheduler_1.VirtualTimeScheduler)); -exports.TestScheduler = TestScheduler; -//# sourceMappingURL=TestScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/testing/TestScheduler.js.map b/node_modules/rxjs/dist/cjs/internal/testing/TestScheduler.js.map deleted file mode 100644 index 7a582a7..0000000 --- a/node_modules/rxjs/dist/cjs/internal/testing/TestScheduler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TestScheduler.js","sourceRoot":"","sources":["../../../../src/internal/testing/TestScheduler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA2C;AAC3C,mDAAkD;AAClD,iDAAgD;AAEhD,qDAAoD;AAEpD,0EAAwF;AAExF,kEAAsG;AACtG,4EAA2E;AAC3E,0FAAyF;AACzF,8EAA6E;AAE7E,oEAAmE;AACnE,kEAAiE;AACjE,gEAA+D;AAE/D,IAAM,eAAe,GAAW,GAAG,CAAC;AAqBpC;IAAmC,iCAAoB;IAiCrD,uBAAmB,eAA+D;QAAlF,YACE,kBAAM,oCAAa,EAAE,eAAe,CAAC,SACtC;QAFkB,qBAAe,GAAf,eAAe,CAAgD;QAtBlE,oBAAc,GAAyB,EAAE,CAAC;QAK1C,qBAAe,GAA0B,EAAE,CAAC;QAKpD,gBAAU,GAAoB,EAAE,CAAC;QAMjC,aAAO,GAAG,KAAK,CAAC;;IAQxB,CAAC;IAED,kCAAU,GAAV,UAAW,OAAe;QACxB,IAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAClF,IAAI,OAAO,KAAK,CAAC,CAAC,EAAE;YAClB,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;SAChF;QACD,OAAO,OAAO,GAAG,aAAa,CAAC,eAAe,CAAC;IACjD,CAAC;IAOD,4CAAoB,GAApB,UAAiC,OAAe,EAAE,MAAgC,EAAE,KAAW;QAC7F,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;YAC/B,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;SACxE;QACD,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;YAC/B,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;SAC1E;QACD,IAAM,QAAQ,GAAG,aAAa,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7F,IAAM,IAAI,GAAG,IAAI,+BAAc,CAAI,QAAQ,EAAE,IAAI,CAAC,CAAC;QACnD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;IAOD,2CAAmB,GAAnB,UAAgC,OAAe,EAAE,MAAgC,EAAE,KAAW;QAC5F,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;YAC/B,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;SACzE;QACD,IAAM,QAAQ,GAAG,aAAa,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7F,IAAM,OAAO,GAAG,IAAI,6BAAa,CAAI,QAAQ,EAAE,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClC,OAAO,OAAO,CAAC;IACjB,CAAC;IAEO,kDAA0B,GAAlC,UAAmC,UAA2B,EAAE,UAAkB;QAAlF,iBAcC;QAbC,IAAM,QAAQ,GAAkB,EAAE,CAAC;QACnC,UAAU,CAAC,SAAS,CAAC;YACnB,IAAI,EAAE,UAAC,KAAK;gBACV,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAI,CAAC,KAAK,GAAG,UAAU,EAAE,YAAY,EAAE,wCAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC3F,CAAC;YACD,KAAK,EAAE,UAAC,KAAK;gBACX,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAI,CAAC,KAAK,GAAG,UAAU,EAAE,YAAY,EAAE,yCAAiB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC5F,CAAC;YACD,QAAQ,EAAE;gBACR,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAI,CAAC,KAAK,GAAG,UAAU,EAAE,YAAY,EAAE,6CAAqB,EAAE,CAAC,CAAC;YACzF,CAAC;SACF,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,wCAAgB,GAAhB,UAAoB,UAAyB,EAAE,mBAAyC;QAAxF,iBAwDC;QAxD8C,oCAAA,EAAA,0BAAyC;QACtF,IAAM,MAAM,GAAkB,EAAE,CAAC;QACjC,IAAM,SAAS,GAAkB,EAAE,MAAM,QAAA,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QAC1D,IAAM,kBAAkB,GAAG,aAAa,CAAC,2BAA2B,CAAC,mBAAmB,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACxG,IAAM,iBAAiB,GAAG,kBAAkB,CAAC,eAAe,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,eAAe,CAAC;QACnH,IAAM,mBAAmB,GAAG,kBAAkB,CAAC,iBAAiB,CAAC;QACjE,IAAI,YAA0B,CAAC;QAE/B,IAAI,CAAC,QAAQ,CAAC;YACZ,YAAY,GAAG,UAAU,CAAC,SAAS,CAAC;gBAClC,IAAI,EAAE,UAAC,CAAC;oBAEN,IAAM,KAAK,GAAG,CAAC,YAAY,uBAAU,CAAC,CAAC,CAAC,KAAI,CAAC,0BAA0B,CAAC,CAAC,EAAE,KAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC3F,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAI,CAAC,KAAK,EAAE,YAAY,EAAE,wCAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBAC5E,CAAC;gBACD,KAAK,EAAE,UAAC,KAAK;oBACX,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAI,CAAC,KAAK,EAAE,YAAY,EAAE,yCAAiB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBAC7E,CAAC;gBACD,QAAQ,EAAE;oBACR,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAI,CAAC,KAAK,EAAE,YAAY,EAAE,6CAAqB,EAAE,CAAC,CAAC;gBAC1E,CAAC;aACF,CAAC,CAAC;QACL,CAAC,EAAE,iBAAiB,CAAC,CAAC;QAEtB,IAAI,mBAAmB,KAAK,QAAQ,EAAE;YACpC,IAAI,CAAC,QAAQ,CAAC,cAAM,OAAA,YAAY,CAAC,WAAW,EAAE,EAA1B,CAA0B,EAAE,mBAAmB,CAAC,CAAC;SACtE;QAED,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACxB,IAAA,OAAO,GAAK,IAAI,QAAT,CAAU;QAEzB,OAAO;YACL,IAAI,EAAJ,UAAK,OAAe,EAAE,MAAY,EAAE,UAAgB;gBAClD,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC;gBACvB,SAAS,CAAC,QAAQ,GAAG,aAAa,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;YAC9F,CAAC;YACD,OAAO,EAAE,UAAC,KAAoB;gBAC5B,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC;gBACvB,SAAS,CAAC,QAAQ,GAAG,EAAE,CAAC;gBACxB,KAAI,CAAC,QAAQ,CAAC;oBACZ,YAAY,GAAG,KAAK,CAAC,SAAS,CAAC;wBAC7B,IAAI,EAAE,UAAC,CAAC;4BAEN,IAAM,KAAK,GAAG,CAAC,YAAY,uBAAU,CAAC,CAAC,CAAC,KAAI,CAAC,0BAA0B,CAAC,CAAC,EAAE,KAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;4BAC3F,SAAS,CAAC,QAAS,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAI,CAAC,KAAK,EAAE,YAAY,EAAE,wCAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;wBACzF,CAAC;wBACD,KAAK,EAAE,UAAC,KAAK;4BACX,SAAS,CAAC,QAAS,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAI,CAAC,KAAK,EAAE,YAAY,EAAE,yCAAiB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;wBAC1F,CAAC;wBACD,QAAQ,EAAE;4BACR,SAAS,CAAC,QAAS,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAI,CAAC,KAAK,EAAE,YAAY,EAAE,6CAAqB,EAAE,CAAC,CAAC;wBACvF,CAAC;qBACF,CAAC,CAAC;gBACL,CAAC,EAAE,iBAAiB,CAAC,CAAC;YACxB,CAAC;SACF,CAAC;IACJ,CAAC;IAED,2CAAmB,GAAnB,UAAoB,sBAAyC;QAC3D,IAAM,SAAS,GAAkB,EAAE,MAAM,EAAE,sBAAsB,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QAClF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACxB,IAAA,OAAO,GAAK,IAAI,QAAT,CAAU;QACzB,OAAO;YACL,IAAI,EAAJ,UAAK,qBAAwC;gBAC3C,IAAM,YAAY,GAAa,OAAO,qBAAqB,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,qBAAqB,CAAC;gBAC3H,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC;gBACvB,SAAS,CAAC,QAAQ,GAAG,YAAY;qBAC9B,GAAG,CAAC,UAAC,OAAO,IAAK,OAAA,aAAa,CAAC,2BAA2B,CAAC,OAAO,EAAE,OAAO,CAAC,EAA3D,CAA2D,CAAC;qBAC7E,MAAM,CAAC,UAAC,OAAO,IAAK,OAAA,OAAO,CAAC,eAAe,KAAK,QAAQ,EAApC,CAAoC,CAAC,CAAC;YAC/D,CAAC;SACF,CAAC;IACJ,CAAC;IAED,6BAAK,GAAL;QAAA,iBAeC;QAdC,IAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC;QAC3C,OAAO,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE;YAChC,cAAc,CAAC,KAAK,EAAG,CAAC,KAAK,EAAE,CAAC;SACjC;QAED,iBAAM,KAAK,WAAE,CAAC;QAEd,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,UAAC,IAAI;YAC5C,IAAI,IAAI,CAAC,KAAK,EAAE;gBACd,KAAI,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACjD,OAAO,KAAK,CAAC;aACd;YACD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC;IAEM,yCAA2B,GAAlC,UAAmC,OAAsB,EAAE,OAAe;QAA1E,iBA+FC;QA/F0D,wBAAA,EAAA,eAAe;QACxE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;YAC/B,OAAO,IAAI,iCAAe,CAAC,QAAQ,CAAC,CAAC;SACtC;QAGD,IAAM,UAAU,4BAAO,OAAO,EAAC,CAAC;QAChC,IAAM,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC;QAC9B,IAAI,UAAU,GAAG,CAAC,CAAC,CAAC;QACpB,IAAI,iBAAiB,GAAG,QAAQ,CAAC;QACjC,IAAI,mBAAmB,GAAG,QAAQ,CAAC;QACnC,IAAI,KAAK,GAAG,CAAC,CAAC;gCAEL,CAAC;YACR,IAAI,SAAS,GAAG,KAAK,CAAC;YACtB,IAAM,cAAc,GAAG,UAAC,KAAa;gBACnC,SAAS,IAAI,KAAK,GAAG,KAAI,CAAC,eAAe,CAAC;YAC5C,CAAC,CAAC;YACF,IAAM,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;YACxB,QAAQ,CAAC,EAAE;gBACT,KAAK,GAAG;oBAEN,IAAI,CAAC,OAAO,EAAE;wBACZ,cAAc,CAAC,CAAC,CAAC,CAAC;qBACnB;oBACD,MAAM;gBACR,KAAK,GAAG;oBACN,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,UAAU,GAAG,KAAK,CAAC;oBACnB,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,UAAU,GAAG,CAAC,CAAC,CAAC;oBAChB,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,IAAI,iBAAiB,KAAK,QAAQ,EAAE;wBAClC,MAAM,IAAI,KAAK,CAAC,6CAA6C,GAAG,qDAAqD,CAAC,CAAC;qBACxH;oBACD,iBAAiB,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC;oBACzD,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,IAAI,mBAAmB,KAAK,QAAQ,EAAE;wBACpC,MAAM,IAAI,KAAK,CAAC,+CAA+C,GAAG,qDAAqD,CAAC,CAAC;qBAC1H;oBACD,mBAAmB,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC;oBAC3D,MAAM;gBACR;oBAEE,IAAI,OAAO,IAAI,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE;wBAGjC,IAAI,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE;4BACxC,IAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;4BAC5C,IAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;4BAC9D,IAAI,KAAK,EAAE;gCACT,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;gCACzB,IAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gCACtC,IAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;gCACtB,IAAI,YAAY,SAAQ,CAAC;gCAEzB,QAAQ,IAAI,EAAE;oCACZ,KAAK,IAAI;wCACP,YAAY,GAAG,QAAQ,CAAC;wCACxB,MAAM;oCACR,KAAK,GAAG;wCACN,YAAY,GAAG,QAAQ,GAAG,IAAI,CAAC;wCAC/B,MAAM;oCACR,KAAK,GAAG;wCACN,YAAY,GAAG,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAC;wCACpC,MAAM;oCACR;wCACE,MAAM;iCACT;gCAED,cAAc,CAAC,YAAa,GAAG,OAAK,eAAe,CAAC,CAAC;gCACrD,MAAM;6BACP;yBACF;qBACF;oBAED,MAAM,IAAI,KAAK,CAAC,6CAA6C,GAAG,8CAA8C,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;aAC9H;YAED,KAAK,GAAG,SAAS,CAAC;sBA1EX,CAAC;;;QAAV,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE;oBAAnB,CAAC;YAAD,CAAC;SA2ET;QAED,IAAI,mBAAmB,GAAG,CAAC,EAAE;YAC3B,OAAO,IAAI,iCAAe,CAAC,iBAAiB,CAAC,CAAC;SAC/C;aAAM;YACL,OAAO,IAAI,iCAAe,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAC;SACpE;IACH,CAAC;IAEM,0BAAY,GAAnB,UACE,OAAe,EACf,MAAY,EACZ,UAAgB,EAChB,2BAA4C,EAC5C,OAAe;QALjB,iBAgHC;QA5GC,4CAAA,EAAA,mCAA4C;QAC5C,wBAAA,EAAA,eAAe;QAEf,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;YAC/B,MAAM,IAAI,KAAK,CAAC,+CAA+C,GAAG,2BAA2B,CAAC,CAAC;SAChG;QAGD,IAAM,UAAU,4BAAO,OAAO,EAAC,CAAC;QAChC,IAAM,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC;QAC9B,IAAM,YAAY,GAAkB,EAAE,CAAC;QACvC,IAAM,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC5F,IAAI,KAAK,GAAG,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC;QACnE,IAAM,QAAQ,GACZ,OAAO,MAAM,KAAK,QAAQ;YACxB,CAAC,CAAC,UAAC,CAAM,IAAK,OAAA,CAAC,EAAD,CAAC;YACf,CAAC,CAAC,UAAC,CAAM;gBAEL,IAAI,2BAA2B,IAAI,MAAM,CAAC,CAAC,CAAC,YAAY,+BAAc,EAAE;oBACtE,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;iBAC3B;gBACD,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;YACnB,CAAC,CAAC;QACR,IAAI,UAAU,GAAG,CAAC,CAAC,CAAC;gCAEX,CAAC;YACR,IAAI,SAAS,GAAG,KAAK,CAAC;YACtB,IAAM,cAAc,GAAG,UAAC,KAAa;gBACnC,SAAS,IAAI,KAAK,GAAG,KAAI,CAAC,eAAe,CAAC;YAC5C,CAAC,CAAC;YAEF,IAAI,YAAY,SAAyC,CAAC;YAC1D,IAAM,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;YACxB,QAAQ,CAAC,EAAE;gBACT,KAAK,GAAG;oBAEN,IAAI,CAAC,OAAO,EAAE;wBACZ,cAAc,CAAC,CAAC,CAAC,CAAC;qBACnB;oBACD,MAAM;gBACR,KAAK,GAAG;oBACN,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,UAAU,GAAG,KAAK,CAAC;oBACnB,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,UAAU,GAAG,CAAC,CAAC,CAAC;oBAChB,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,YAAY,GAAG,6CAAqB,CAAC;oBACrC,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,YAAY,GAAG,yCAAiB,CAAC,UAAU,IAAI,OAAO,CAAC,CAAC;oBACxD,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR;oBAEE,IAAI,OAAO,IAAI,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE;wBAGjC,IAAI,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE;4BACxC,IAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;4BAC5C,IAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;4BAC9D,IAAI,KAAK,EAAE;gCACT,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;gCACzB,IAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gCACtC,IAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;gCACtB,IAAI,YAAY,SAAQ,CAAC;gCAEzB,QAAQ,IAAI,EAAE;oCACZ,KAAK,IAAI;wCACP,YAAY,GAAG,QAAQ,CAAC;wCACxB,MAAM;oCACR,KAAK,GAAG;wCACN,YAAY,GAAG,QAAQ,GAAG,IAAI,CAAC;wCAC/B,MAAM;oCACR,KAAK,GAAG;wCACN,YAAY,GAAG,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAC;wCACpC,MAAM;oCACR;wCACE,MAAM;iCACT;gCAED,cAAc,CAAC,YAAa,GAAG,OAAK,eAAe,CAAC,CAAC;gCACrD,MAAM;6BACP;yBACF;qBACF;oBAED,YAAY,GAAG,wCAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC7C,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;aACT;YAED,IAAI,YAAY,EAAE;gBAChB,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,EAAE,YAAY,cAAA,EAAE,CAAC,CAAC;aAClF;YAED,KAAK,GAAG,SAAS,CAAC;sBAhFX,CAAC;;;QAAV,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE;oBAAnB,CAAC;YAAD,CAAC;SAiFT;QACD,OAAO,YAAY,CAAC;IACtB,CAAC;IAEO,sCAAc,GAAtB;QAAA,iBA6DC;QA5DC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACjB,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;SAC5D;QAWD,IAAI,UAAU,GAAG,CAAC,CAAC;QACnB,IAAI,GAAkD,CAAC;QAEvD,IAAM,QAAQ,GAAG;YACf,qBAAqB,EAArB,UAAsB,QAA8B;gBAClD,IAAI,CAAC,GAAG,EAAE;oBACR,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;iBAC1D;gBACD,IAAM,MAAM,GAAG,EAAE,UAAU,CAAC;gBAC5B,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;gBAC1B,OAAO,MAAM,CAAC;YAChB,CAAC;YACD,oBAAoB,EAApB,UAAqB,MAAc;gBACjC,IAAI,CAAC,GAAG,EAAE;oBACR,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;iBAC1D;gBACD,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACrB,CAAC;SACF,CAAC;QAEF,IAAM,OAAO,GAAG,UAAC,OAAe;;YAC9B,IAAI,GAAG,EAAE;gBACP,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;aAC7E;YACD,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;gBACxB,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;aACzD;YACD,GAAG,GAAG,IAAI,GAAG,EAAgC,CAAC;YAC9C,IAAM,QAAQ,GAAG,aAAa,CAAC,YAAY,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;;gBAC5F,KAAsB,IAAA,aAAA,SAAA,QAAQ,CAAA,kCAAA,wDAAE;oBAA3B,IAAM,OAAO,qBAAA;oBAChB,KAAI,CAAC,QAAQ,CAAC;;wBACZ,IAAM,GAAG,GAAG,KAAI,CAAC,GAAG,EAAE,CAAC;wBAMvB,IAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,GAAI,CAAC,MAAM,EAAE,CAAC,CAAC;wBAC5C,GAAI,CAAC,KAAK,EAAE,CAAC;;4BACb,KAAuB,IAAA,6BAAA,SAAA,SAAS,CAAA,CAAA,oCAAA,2DAAE;gCAA7B,IAAM,QAAQ,sBAAA;gCACjB,QAAQ,CAAC,GAAG,CAAC,CAAC;6BACf;;;;;;;;;oBACH,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;iBACnB;;;;;;;;;QACH,CAAC,CAAC;QAEF,OAAO,EAAE,OAAO,SAAA,EAAE,QAAQ,UAAA,EAAE,CAAC;IAC/B,CAAC;IAEO,uCAAe,GAAvB;QAAA,iBA4IC;QAhIC,IAAI,UAAU,GAAG,CAAC,CAAC;QACnB,IAAM,cAAc,GAAG,IAAI,GAAG,EAU3B,CAAC;QAEJ,IAAM,GAAG,GAAG;YAIV,IAAM,GAAG,GAAG,KAAI,CAAC,GAAG,EAAE,CAAC;YACvB,IAAM,gBAAgB,GAAG,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC;YAC7D,IAAM,mBAAmB,GAAG,gBAAgB,CAAC,MAAM,CAAC,UAAC,EAAO;oBAAL,GAAG,SAAA;gBAAO,OAAA,GAAG,IAAI,GAAG;YAAV,CAAU,CAAC,CAAC;YAC7E,IAAM,aAAa,GAAG,mBAAmB,CAAC,MAAM,CAAC,UAAC,EAAQ;oBAAN,IAAI,UAAA;gBAAO,OAAA,IAAI,KAAK,WAAW;YAApB,CAAoB,CAAC,CAAC;YACrF,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE;gBACtB,IAAA,KAAsB,aAAa,CAAC,CAAC,CAAC,EAApC,MAAM,YAAA,EAAE,OAAO,aAAqB,CAAC;gBAC7C,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBAC9B,OAAO,EAAE,CAAC;gBACV,OAAO;aACR;YACD,IAAM,YAAY,GAAG,mBAAmB,CAAC,MAAM,CAAC,UAAC,EAAQ;oBAAN,IAAI,UAAA;gBAAO,OAAA,IAAI,KAAK,UAAU;YAAnB,CAAmB,CAAC,CAAC;YACnF,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC3B,IAAM,gBAAgB,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;gBACjC,IAAA,QAAQ,GAAc,gBAAgB,SAA9B,EAAE,OAAO,GAAK,gBAAgB,QAArB,CAAsB;gBAC/C,gBAAgB,CAAC,GAAG,GAAG,GAAG,GAAG,QAAQ,CAAC;gBAItC,gBAAgB,CAAC,YAAY,GAAG,KAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;gBAC7D,OAAO,EAAE,CAAC;gBACV,OAAO;aACR;YACD,IAAM,WAAW,GAAG,mBAAmB,CAAC,MAAM,CAAC,UAAC,EAAQ;oBAAN,IAAI,UAAA;gBAAO,OAAA,IAAI,KAAK,SAAS;YAAlB,CAAkB,CAAC,CAAC;YACjF,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;gBACpB,IAAA,KAAsB,WAAW,CAAC,CAAC,CAAC,EAAlC,MAAM,YAAA,EAAE,OAAO,aAAmB,CAAC;gBAC3C,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBAC9B,OAAO,EAAE,CAAC;gBACV,OAAO;aACR;YACD,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;QAC1D,CAAC,CAAC;QAcF,IAAM,SAAS,GAAG;YAChB,YAAY,EAAE,UAAC,OAAmB;gBAChC,IAAM,MAAM,GAAG,EAAE,UAAU,CAAC;gBAC5B,cAAc,CAAC,GAAG,CAAC,MAAM,EAAE;oBACzB,GAAG,EAAE,KAAI,CAAC,GAAG,EAAE;oBACf,QAAQ,EAAE,CAAC;oBACX,MAAM,QAAA;oBACN,OAAO,SAAA;oBACP,YAAY,EAAE,KAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;oBACnC,IAAI,EAAE,WAAW;iBAClB,CAAC,CAAC;gBACH,OAAO,MAAM,CAAC;YAChB,CAAC;YACD,cAAc,EAAE,UAAC,MAAmB;gBAClC,IAAM,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;gBACzC,IAAI,KAAK,EAAE;oBACT,KAAK,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;oBACjC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;iBAC/B;YACH,CAAC;SACF,CAAC;QAEF,IAAM,QAAQ,GAAG;YACf,WAAW,EAAE,UAAC,OAAmB,EAAE,QAAY;gBAAZ,yBAAA,EAAA,YAAY;gBAC7C,IAAM,MAAM,GAAG,EAAE,UAAU,CAAC;gBAC5B,cAAc,CAAC,GAAG,CAAC,MAAM,EAAE;oBACzB,GAAG,EAAE,KAAI,CAAC,GAAG,EAAE,GAAG,QAAQ;oBAC1B,QAAQ,UAAA;oBACR,MAAM,QAAA;oBACN,OAAO,SAAA;oBACP,YAAY,EAAE,KAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;oBAC1C,IAAI,EAAE,UAAU;iBACjB,CAAC,CAAC;gBACH,OAAO,MAAM,CAAC;YAChB,CAAC;YACD,aAAa,EAAE,UAAC,MAAmB;gBACjC,IAAM,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;gBACzC,IAAI,KAAK,EAAE;oBACT,KAAK,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;oBACjC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;iBAC/B;YACH,CAAC;SACF,CAAC;QAEF,IAAM,OAAO,GAAG;YACd,UAAU,EAAE,UAAC,OAAmB,EAAE,QAAY;gBAAZ,yBAAA,EAAA,YAAY;gBAC5C,IAAM,MAAM,GAAG,EAAE,UAAU,CAAC;gBAC5B,cAAc,CAAC,GAAG,CAAC,MAAM,EAAE;oBACzB,GAAG,EAAE,KAAI,CAAC,GAAG,EAAE,GAAG,QAAQ;oBAC1B,QAAQ,UAAA;oBACR,MAAM,QAAA;oBACN,OAAO,SAAA;oBACP,YAAY,EAAE,KAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;oBAC1C,IAAI,EAAE,SAAS;iBAChB,CAAC,CAAC;gBACH,OAAO,MAAM,CAAC;YAChB,CAAC;YACD,YAAY,EAAE,UAAC,MAAmB;gBAChC,IAAM,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;gBACzC,IAAI,KAAK,EAAE;oBACT,KAAK,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;oBACjC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;iBAC/B;YACH,CAAC;SACF,CAAC;QAEF,OAAO,EAAE,SAAS,WAAA,EAAE,QAAQ,UAAA,EAAE,OAAO,SAAA,EAAE,CAAC;IAC1C,CAAC;IAUD,2BAAG,GAAH,UAAO,QAAoC;QACzC,IAAM,mBAAmB,GAAG,aAAa,CAAC,eAAe,CAAC;QAC1D,IAAM,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC;QAErC,aAAa,CAAC,eAAe,GAAG,CAAC,CAAC;QAClC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAEpB,IAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QACvC,IAAM,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QAEzC,+CAAsB,CAAC,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;QACpD,6CAAqB,CAAC,QAAQ,GAAG,IAAI,CAAC;QACtC,qCAAiB,CAAC,QAAQ,GAAG,SAAS,CAAC,SAAS,CAAC;QACjD,mCAAgB,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;QAC/C,iCAAe,CAAC,QAAQ,GAAG,SAAS,CAAC,OAAO,CAAC;QAC7C,2DAA4B,CAAC,QAAQ,GAAG,IAAI,CAAC;QAE7C,IAAM,OAAO,GAAe;YAC1B,IAAI,EAAE,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC;YAC1C,GAAG,EAAE,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC;YACxC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;YAC5B,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;YAChC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC;YAClD,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC;YACxD,OAAO,EAAE,QAAQ,CAAC,OAAO;SAC1B,CAAC;QACF,IAAI;YACF,IAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;YAC9B,IAAI,CAAC,KAAK,EAAE,CAAC;YACb,OAAO,GAAG,CAAC;SACZ;gBAAS;YACR,aAAa,CAAC,eAAe,GAAG,mBAAmB,CAAC;YACpD,IAAI,CAAC,SAAS,GAAG,aAAa,CAAC;YAC/B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;YACrB,+CAAsB,CAAC,QAAQ,GAAG,SAAS,CAAC;YAC5C,6CAAqB,CAAC,QAAQ,GAAG,SAAS,CAAC;YAC3C,qCAAiB,CAAC,QAAQ,GAAG,SAAS,CAAC;YACvC,mCAAgB,CAAC,QAAQ,GAAG,SAAS,CAAC;YACtC,iCAAe,CAAC,QAAQ,GAAG,SAAS,CAAC;YACrC,2DAA4B,CAAC,QAAQ,GAAG,SAAS,CAAC;SACnD;IACH,CAAC;IApoBM,6BAAe,GAAG,EAAE,CAAC;IAqoB9B,oBAAC;CAAA,AA3oBD,CAAmC,2CAAoB,GA2oBtD;AA3oBY,sCAAa"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/types.js b/node_modules/rxjs/dist/cjs/internal/types.js deleted file mode 100644 index 11e638d..0000000 --- a/node_modules/rxjs/dist/cjs/internal/types.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/types.js.map b/node_modules/rxjs/dist/cjs/internal/types.js.map deleted file mode 100644 index 493d291..0000000 --- a/node_modules/rxjs/dist/cjs/internal/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/internal/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/ArgumentOutOfRangeError.js b/node_modules/rxjs/dist/cjs/internal/util/ArgumentOutOfRangeError.js deleted file mode 100644 index 8a661e6..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/ArgumentOutOfRangeError.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ArgumentOutOfRangeError = void 0; -var createErrorClass_1 = require("./createErrorClass"); -exports.ArgumentOutOfRangeError = createErrorClass_1.createErrorClass(function (_super) { - return function ArgumentOutOfRangeErrorImpl() { - _super(this); - this.name = 'ArgumentOutOfRangeError'; - this.message = 'argument out of range'; - }; -}); -//# sourceMappingURL=ArgumentOutOfRangeError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/ArgumentOutOfRangeError.js.map b/node_modules/rxjs/dist/cjs/internal/util/ArgumentOutOfRangeError.js.map deleted file mode 100644 index faf66b7..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/ArgumentOutOfRangeError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ArgumentOutOfRangeError.js","sourceRoot":"","sources":["../../../../src/internal/util/ArgumentOutOfRangeError.ts"],"names":[],"mappings":";;;AAAA,uDAAsD;AAoBzC,QAAA,uBAAuB,GAAgC,mCAAgB,CAClF,UAAC,MAAM;IACL,OAAA,SAAS,2BAA2B;QAClC,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,uBAAuB,CAAC;IACzC,CAAC;AAJD,CAIC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/EmptyError.js b/node_modules/rxjs/dist/cjs/internal/util/EmptyError.js deleted file mode 100644 index 16d2808..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/EmptyError.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.EmptyError = void 0; -var createErrorClass_1 = require("./createErrorClass"); -exports.EmptyError = createErrorClass_1.createErrorClass(function (_super) { - return function EmptyErrorImpl() { - _super(this); - this.name = 'EmptyError'; - this.message = 'no elements in sequence'; - }; -}); -//# sourceMappingURL=EmptyError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/EmptyError.js.map b/node_modules/rxjs/dist/cjs/internal/util/EmptyError.js.map deleted file mode 100644 index 6e9658b..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/EmptyError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"EmptyError.js","sourceRoot":"","sources":["../../../../src/internal/util/EmptyError.ts"],"names":[],"mappings":";;;AAAA,uDAAsD;AAsBzC,QAAA,UAAU,GAAmB,mCAAgB,CACxD,UAAC,MAAM;IACL,OAAA,SAAS,cAAc;QACrB,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;QACzB,IAAI,CAAC,OAAO,GAAG,yBAAyB,CAAC;IAC3C,CAAC;AAJD,CAIC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/Immediate.js b/node_modules/rxjs/dist/cjs/internal/util/Immediate.js deleted file mode 100644 index 34dd82a..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/Immediate.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TestTools = exports.Immediate = void 0; -var nextHandle = 1; -var resolved; -var activeHandles = {}; -function findAndClearHandle(handle) { - if (handle in activeHandles) { - delete activeHandles[handle]; - return true; - } - return false; -} -exports.Immediate = { - setImmediate: function (cb) { - var handle = nextHandle++; - activeHandles[handle] = true; - if (!resolved) { - resolved = Promise.resolve(); - } - resolved.then(function () { return findAndClearHandle(handle) && cb(); }); - return handle; - }, - clearImmediate: function (handle) { - findAndClearHandle(handle); - }, -}; -exports.TestTools = { - pending: function () { - return Object.keys(activeHandles).length; - } -}; -//# sourceMappingURL=Immediate.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/Immediate.js.map b/node_modules/rxjs/dist/cjs/internal/util/Immediate.js.map deleted file mode 100644 index 60a8566..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/Immediate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Immediate.js","sourceRoot":"","sources":["../../../../src/internal/util/Immediate.ts"],"names":[],"mappings":";;;AAAA,IAAI,UAAU,GAAG,CAAC,CAAC;AAEnB,IAAI,QAAsB,CAAC;AAC3B,IAAM,aAAa,GAA2B,EAAE,CAAC;AAOjD,SAAS,kBAAkB,CAAC,MAAc;IACxC,IAAI,MAAM,IAAI,aAAa,EAAE;QAC3B,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAKY,QAAA,SAAS,GAAG;IACvB,YAAY,EAAZ,UAAa,EAAc;QACzB,IAAM,MAAM,GAAG,UAAU,EAAE,CAAC;QAC5B,aAAa,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;QAC7B,IAAI,CAAC,QAAQ,EAAE;YACb,QAAQ,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;SAC9B;QACD,QAAQ,CAAC,IAAI,CAAC,cAAM,OAAA,kBAAkB,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,EAAlC,CAAkC,CAAC,CAAC;QACxD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,cAAc,EAAd,UAAe,MAAc;QAC3B,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;CACF,CAAC;AAKW,QAAA,SAAS,GAAG;IACvB,OAAO;QACL,OAAO,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC;IAC3C,CAAC;CACF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/NotFoundError.js b/node_modules/rxjs/dist/cjs/internal/util/NotFoundError.js deleted file mode 100644 index 0c9c88b..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/NotFoundError.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NotFoundError = void 0; -var createErrorClass_1 = require("./createErrorClass"); -exports.NotFoundError = createErrorClass_1.createErrorClass(function (_super) { - return function NotFoundErrorImpl(message) { - _super(this); - this.name = 'NotFoundError'; - this.message = message; - }; -}); -//# sourceMappingURL=NotFoundError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/NotFoundError.js.map b/node_modules/rxjs/dist/cjs/internal/util/NotFoundError.js.map deleted file mode 100644 index 066ee29..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/NotFoundError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NotFoundError.js","sourceRoot":"","sources":["../../../../src/internal/util/NotFoundError.ts"],"names":[],"mappings":";;;AAAA,uDAAsD;AAkBzC,QAAA,aAAa,GAAsB,mCAAgB,CAC9D,UAAC,MAAM;IACL,OAAA,SAAS,iBAAiB,CAAY,OAAe;QACnD,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;AAJD,CAIC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/ObjectUnsubscribedError.js b/node_modules/rxjs/dist/cjs/internal/util/ObjectUnsubscribedError.js deleted file mode 100644 index b4a9686..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/ObjectUnsubscribedError.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ObjectUnsubscribedError = void 0; -var createErrorClass_1 = require("./createErrorClass"); -exports.ObjectUnsubscribedError = createErrorClass_1.createErrorClass(function (_super) { - return function ObjectUnsubscribedErrorImpl() { - _super(this); - this.name = 'ObjectUnsubscribedError'; - this.message = 'object unsubscribed'; - }; -}); -//# sourceMappingURL=ObjectUnsubscribedError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/ObjectUnsubscribedError.js.map b/node_modules/rxjs/dist/cjs/internal/util/ObjectUnsubscribedError.js.map deleted file mode 100644 index a24c2ce..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/ObjectUnsubscribedError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ObjectUnsubscribedError.js","sourceRoot":"","sources":["../../../../src/internal/util/ObjectUnsubscribedError.ts"],"names":[],"mappings":";;;AAAA,uDAAsD;AAqBzC,QAAA,uBAAuB,GAAgC,mCAAgB,CAClF,UAAC,MAAM;IACL,OAAA,SAAS,2BAA2B;QAClC,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,qBAAqB,CAAC;IACvC,CAAC;AAJD,CAIC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/SequenceError.js b/node_modules/rxjs/dist/cjs/internal/util/SequenceError.js deleted file mode 100644 index 1875ff5..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/SequenceError.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SequenceError = void 0; -var createErrorClass_1 = require("./createErrorClass"); -exports.SequenceError = createErrorClass_1.createErrorClass(function (_super) { - return function SequenceErrorImpl(message) { - _super(this); - this.name = 'SequenceError'; - this.message = message; - }; -}); -//# sourceMappingURL=SequenceError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/SequenceError.js.map b/node_modules/rxjs/dist/cjs/internal/util/SequenceError.js.map deleted file mode 100644 index 2872d2a..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/SequenceError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SequenceError.js","sourceRoot":"","sources":["../../../../src/internal/util/SequenceError.ts"],"names":[],"mappings":";;;AAAA,uDAAsD;AAkBzC,QAAA,aAAa,GAAsB,mCAAgB,CAC9D,UAAC,MAAM;IACL,OAAA,SAAS,iBAAiB,CAAY,OAAe;QACnD,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;AAJD,CAIC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js b/node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js deleted file mode 100644 index 4ce4275..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UnsubscriptionError = void 0; -var createErrorClass_1 = require("./createErrorClass"); -exports.UnsubscriptionError = createErrorClass_1.createErrorClass(function (_super) { - return function UnsubscriptionErrorImpl(errors) { - _super(this); - this.message = errors - ? errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ') - : ''; - this.name = 'UnsubscriptionError'; - this.errors = errors; - }; -}); -//# sourceMappingURL=UnsubscriptionError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js.map b/node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js.map deleted file mode 100644 index ce49bb6..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/UnsubscriptionError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UnsubscriptionError.js","sourceRoot":"","sources":["../../../../src/internal/util/UnsubscriptionError.ts"],"names":[],"mappings":";;;AAAA,uDAAsD;AAkBzC,QAAA,mBAAmB,GAA4B,mCAAgB,CAC1E,UAAC,MAAM;IACL,OAAA,SAAS,uBAAuB,CAAY,MAA0B;QACpE,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,OAAO,GAAG,MAAM;YACnB,CAAC,CAAI,MAAM,CAAC,MAAM,iDACxB,MAAM,CAAC,GAAG,CAAC,UAAC,GAAG,EAAE,CAAC,IAAK,OAAG,CAAC,GAAG,CAAC,UAAK,GAAG,CAAC,QAAQ,EAAI,EAA7B,CAA6B,CAAC,CAAC,IAAI,CAAC,MAAM,CAAG;YAC9D,CAAC,CAAC,EAAE,CAAC;QACP,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;AARD,CAQC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/applyMixins.js b/node_modules/rxjs/dist/cjs/internal/util/applyMixins.js deleted file mode 100644 index 80c7044..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/applyMixins.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.applyMixins = void 0; -function applyMixins(derivedCtor, baseCtors) { - for (var i = 0, len = baseCtors.length; i < len; i++) { - var baseCtor = baseCtors[i]; - var propertyKeys = Object.getOwnPropertyNames(baseCtor.prototype); - for (var j = 0, len2 = propertyKeys.length; j < len2; j++) { - var name_1 = propertyKeys[j]; - derivedCtor.prototype[name_1] = baseCtor.prototype[name_1]; - } - } -} -exports.applyMixins = applyMixins; -//# sourceMappingURL=applyMixins.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/applyMixins.js.map b/node_modules/rxjs/dist/cjs/internal/util/applyMixins.js.map deleted file mode 100644 index 642813d..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/applyMixins.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"applyMixins.js","sourceRoot":"","sources":["../../../../src/internal/util/applyMixins.ts"],"names":[],"mappings":";;;AAAA,SAAgB,WAAW,CAAC,WAAgB,EAAE,SAAgB;IAC5D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;QACpD,IAAM,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAM,YAAY,GAAG,MAAM,CAAC,mBAAmB,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACpE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;YACzD,IAAM,MAAI,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;YAC7B,WAAW,CAAC,SAAS,CAAC,MAAI,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,MAAI,CAAC,CAAC;SACxD;KACF;AACH,CAAC;AATD,kCASC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/args.js b/node_modules/rxjs/dist/cjs/internal/util/args.js deleted file mode 100644 index e0b3548..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/args.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.popNumber = exports.popScheduler = exports.popResultSelector = void 0; -var isFunction_1 = require("./isFunction"); -var isScheduler_1 = require("./isScheduler"); -function last(arr) { - return arr[arr.length - 1]; -} -function popResultSelector(args) { - return isFunction_1.isFunction(last(args)) ? args.pop() : undefined; -} -exports.popResultSelector = popResultSelector; -function popScheduler(args) { - return isScheduler_1.isScheduler(last(args)) ? args.pop() : undefined; -} -exports.popScheduler = popScheduler; -function popNumber(args, defaultValue) { - return typeof last(args) === 'number' ? args.pop() : defaultValue; -} -exports.popNumber = popNumber; -//# sourceMappingURL=args.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/args.js.map b/node_modules/rxjs/dist/cjs/internal/util/args.js.map deleted file mode 100644 index 78419e6..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/args.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"args.js","sourceRoot":"","sources":["../../../../src/internal/util/args.ts"],"names":[],"mappings":";;;AACA,2CAA0C;AAC1C,6CAA4C;AAE5C,SAAS,IAAI,CAAI,GAAQ;IACvB,OAAO,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC7B,CAAC;AAED,SAAgB,iBAAiB,CAAC,IAAW;IAC3C,OAAO,uBAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AACzD,CAAC;AAFD,8CAEC;AAED,SAAgB,YAAY,CAAC,IAAW;IACtC,OAAO,yBAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1D,CAAC;AAFD,oCAEC;AAED,SAAgB,SAAS,CAAC,IAAW,EAAE,YAAoB;IACzD,OAAO,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAG,CAAC,CAAC,CAAC,YAAY,CAAC;AACrE,CAAC;AAFD,8BAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/argsArgArrayOrObject.js b/node_modules/rxjs/dist/cjs/internal/util/argsArgArrayOrObject.js deleted file mode 100644 index f82fa97..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/argsArgArrayOrObject.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.argsArgArrayOrObject = void 0; -var isArray = Array.isArray; -var getPrototypeOf = Object.getPrototypeOf, objectProto = Object.prototype, getKeys = Object.keys; -function argsArgArrayOrObject(args) { - if (args.length === 1) { - var first_1 = args[0]; - if (isArray(first_1)) { - return { args: first_1, keys: null }; - } - if (isPOJO(first_1)) { - var keys = getKeys(first_1); - return { - args: keys.map(function (key) { return first_1[key]; }), - keys: keys, - }; - } - } - return { args: args, keys: null }; -} -exports.argsArgArrayOrObject = argsArgArrayOrObject; -function isPOJO(obj) { - return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto; -} -//# sourceMappingURL=argsArgArrayOrObject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/argsArgArrayOrObject.js.map b/node_modules/rxjs/dist/cjs/internal/util/argsArgArrayOrObject.js.map deleted file mode 100644 index 377529d..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/argsArgArrayOrObject.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"argsArgArrayOrObject.js","sourceRoot":"","sources":["../../../../src/internal/util/argsArgArrayOrObject.ts"],"names":[],"mappings":";;;AAAQ,IAAA,OAAO,GAAK,KAAK,QAAV,CAAW;AAClB,IAAA,cAAc,GAA4C,MAAM,eAAlD,EAAa,WAAW,GAAoB,MAAM,UAA1B,EAAQ,OAAO,GAAK,MAAM,KAAX,CAAY;AAQzE,SAAgB,oBAAoB,CAAiC,IAAuB;IAC1F,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACrB,IAAM,OAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,OAAO,CAAC,OAAK,CAAC,EAAE;YAClB,OAAO,EAAE,IAAI,EAAE,OAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;SACpC;QACD,IAAI,MAAM,CAAC,OAAK,CAAC,EAAE;YACjB,IAAM,IAAI,GAAG,OAAO,CAAC,OAAK,CAAC,CAAC;YAC5B,OAAO;gBACL,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,UAAC,GAAG,IAAK,OAAA,OAAK,CAAC,GAAG,CAAC,EAAV,CAAU,CAAC;gBACnC,IAAI,MAAA;aACL,CAAC;SACH;KACF;IAED,OAAO,EAAE,IAAI,EAAE,IAAW,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAC3C,CAAC;AAhBD,oDAgBC;AAED,SAAS,MAAM,CAAC,GAAQ;IACtB,OAAO,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,cAAc,CAAC,GAAG,CAAC,KAAK,WAAW,CAAC;AAC/E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/argsOrArgArray.js b/node_modules/rxjs/dist/cjs/internal/util/argsOrArgArray.js deleted file mode 100644 index 8048185..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/argsOrArgArray.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.argsOrArgArray = void 0; -var isArray = Array.isArray; -function argsOrArgArray(args) { - return args.length === 1 && isArray(args[0]) ? args[0] : args; -} -exports.argsOrArgArray = argsOrArgArray; -//# sourceMappingURL=argsOrArgArray.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/argsOrArgArray.js.map b/node_modules/rxjs/dist/cjs/internal/util/argsOrArgArray.js.map deleted file mode 100644 index c4fb829..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/argsOrArgArray.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"argsOrArgArray.js","sourceRoot":"","sources":["../../../../src/internal/util/argsOrArgArray.ts"],"names":[],"mappings":";;;AAAQ,IAAA,OAAO,GAAK,KAAK,QAAV,CAAW;AAM1B,SAAgB,cAAc,CAAI,IAAiB;IACjD,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,IAAY,CAAC;AACzE,CAAC;AAFD,wCAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/arrRemove.js b/node_modules/rxjs/dist/cjs/internal/util/arrRemove.js deleted file mode 100644 index 38eb259..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/arrRemove.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.arrRemove = void 0; -function arrRemove(arr, item) { - if (arr) { - var index = arr.indexOf(item); - 0 <= index && arr.splice(index, 1); - } -} -exports.arrRemove = arrRemove; -//# sourceMappingURL=arrRemove.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/arrRemove.js.map b/node_modules/rxjs/dist/cjs/internal/util/arrRemove.js.map deleted file mode 100644 index a6fab5f..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/arrRemove.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"arrRemove.js","sourceRoot":"","sources":["../../../../src/internal/util/arrRemove.ts"],"names":[],"mappings":";;;AAKA,SAAgB,SAAS,CAAI,GAA2B,EAAE,IAAO;IAC/D,IAAI,GAAG,EAAE;QACP,IAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC,IAAI,KAAK,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;KACpC;AACH,CAAC;AALD,8BAKC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js b/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js deleted file mode 100644 index 98a6e52..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createErrorClass = void 0; -function createErrorClass(createImpl) { - var _super = function (instance) { - Error.call(instance); - instance.stack = new Error().stack; - }; - var ctorFunc = createImpl(_super); - ctorFunc.prototype = Object.create(Error.prototype); - ctorFunc.prototype.constructor = ctorFunc; - return ctorFunc; -} -exports.createErrorClass = createErrorClass; -//# sourceMappingURL=createErrorClass.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js.map b/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js.map deleted file mode 100644 index 0086064..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/createErrorClass.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"createErrorClass.js","sourceRoot":"","sources":["../../../../src/internal/util/createErrorClass.ts"],"names":[],"mappings":";;;AASA,SAAgB,gBAAgB,CAAI,UAAgC;IAClE,IAAM,MAAM,GAAG,UAAC,QAAa;QAC3B,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrB,QAAQ,CAAC,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC,KAAK,CAAC;IACrC,CAAC,CAAC;IAEF,IAAM,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IACpC,QAAQ,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACpD,QAAQ,CAAC,SAAS,CAAC,WAAW,GAAG,QAAQ,CAAC;IAC1C,OAAO,QAAQ,CAAC;AAClB,CAAC;AAVD,4CAUC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/createObject.js b/node_modules/rxjs/dist/cjs/internal/util/createObject.js deleted file mode 100644 index 2b6df93..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/createObject.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createObject = void 0; -function createObject(keys, values) { - return keys.reduce(function (result, key, i) { return ((result[key] = values[i]), result); }, {}); -} -exports.createObject = createObject; -//# sourceMappingURL=createObject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/createObject.js.map b/node_modules/rxjs/dist/cjs/internal/util/createObject.js.map deleted file mode 100644 index e5c5df6..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/createObject.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"createObject.js","sourceRoot":"","sources":["../../../../src/internal/util/createObject.ts"],"names":[],"mappings":";;;AAAA,SAAgB,YAAY,CAAC,IAAc,EAAE,MAAa;IACxD,OAAO,IAAI,CAAC,MAAM,CAAC,UAAC,MAAM,EAAE,GAAG,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAnC,CAAmC,EAAE,EAAS,CAAC,CAAC;AACzF,CAAC;AAFD,oCAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/errorContext.js b/node_modules/rxjs/dist/cjs/internal/util/errorContext.js deleted file mode 100644 index 7918da1..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/errorContext.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.captureError = exports.errorContext = void 0; -var config_1 = require("../config"); -var context = null; -function errorContext(cb) { - if (config_1.config.useDeprecatedSynchronousErrorHandling) { - var isRoot = !context; - if (isRoot) { - context = { errorThrown: false, error: null }; - } - cb(); - if (isRoot) { - var _a = context, errorThrown = _a.errorThrown, error = _a.error; - context = null; - if (errorThrown) { - throw error; - } - } - } - else { - cb(); - } -} -exports.errorContext = errorContext; -function captureError(err) { - if (config_1.config.useDeprecatedSynchronousErrorHandling && context) { - context.errorThrown = true; - context.error = err; - } -} -exports.captureError = captureError; -//# sourceMappingURL=errorContext.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/errorContext.js.map b/node_modules/rxjs/dist/cjs/internal/util/errorContext.js.map deleted file mode 100644 index 6b98e6f..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/errorContext.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"errorContext.js","sourceRoot":"","sources":["../../../../src/internal/util/errorContext.ts"],"names":[],"mappings":";;;AAAA,oCAAmC;AAEnC,IAAI,OAAO,GAAgD,IAAI,CAAC;AAShE,SAAgB,YAAY,CAAC,EAAc;IACzC,IAAI,eAAM,CAAC,qCAAqC,EAAE;QAChD,IAAM,MAAM,GAAG,CAAC,OAAO,CAAC;QACxB,IAAI,MAAM,EAAE;YACV,OAAO,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;SAC/C;QACD,EAAE,EAAE,CAAC;QACL,IAAI,MAAM,EAAE;YACJ,IAAA,KAAyB,OAAQ,EAA/B,WAAW,iBAAA,EAAE,KAAK,WAAa,CAAC;YACxC,OAAO,GAAG,IAAI,CAAC;YACf,IAAI,WAAW,EAAE;gBACf,MAAM,KAAK,CAAC;aACb;SACF;KACF;SAAM;QAGL,EAAE,EAAE,CAAC;KACN;AACH,CAAC;AAnBD,oCAmBC;AAMD,SAAgB,YAAY,CAAC,GAAQ;IACnC,IAAI,eAAM,CAAC,qCAAqC,IAAI,OAAO,EAAE;QAC3D,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;QAC3B,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC;KACrB;AACH,CAAC;AALD,oCAKC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/executeSchedule.js b/node_modules/rxjs/dist/cjs/internal/util/executeSchedule.js deleted file mode 100644 index 8eda971..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/executeSchedule.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.executeSchedule = void 0; -function executeSchedule(parentSubscription, scheduler, work, delay, repeat) { - if (delay === void 0) { delay = 0; } - if (repeat === void 0) { repeat = false; } - var scheduleSubscription = scheduler.schedule(function () { - work(); - if (repeat) { - parentSubscription.add(this.schedule(null, delay)); - } - else { - this.unsubscribe(); - } - }, delay); - parentSubscription.add(scheduleSubscription); - if (!repeat) { - return scheduleSubscription; - } -} -exports.executeSchedule = executeSchedule; -//# sourceMappingURL=executeSchedule.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/executeSchedule.js.map b/node_modules/rxjs/dist/cjs/internal/util/executeSchedule.js.map deleted file mode 100644 index 8cf548d..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/executeSchedule.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"executeSchedule.js","sourceRoot":"","sources":["../../../../src/internal/util/executeSchedule.ts"],"names":[],"mappings":";;;AAkBA,SAAgB,eAAe,CAC7B,kBAAgC,EAChC,SAAwB,EACxB,IAAgB,EAChB,KAAS,EACT,MAAc;IADd,sBAAA,EAAA,SAAS;IACT,uBAAA,EAAA,cAAc;IAEd,IAAM,oBAAoB,GAAG,SAAS,CAAC,QAAQ,CAAC;QAC9C,IAAI,EAAE,CAAC;QACP,IAAI,MAAM,EAAE;YACV,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;SACpD;aAAM;YACL,IAAI,CAAC,WAAW,EAAE,CAAC;SACpB;IACH,CAAC,EAAE,KAAK,CAAC,CAAC;IAEV,kBAAkB,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAE7C,IAAI,CAAC,MAAM,EAAE;QAKX,OAAO,oBAAoB,CAAC;KAC7B;AACH,CAAC;AAzBD,0CAyBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/identity.js b/node_modules/rxjs/dist/cjs/internal/util/identity.js deleted file mode 100644 index da61150..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/identity.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.identity = void 0; -function identity(x) { - return x; -} -exports.identity = identity; -//# sourceMappingURL=identity.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/identity.js.map b/node_modules/rxjs/dist/cjs/internal/util/identity.js.map deleted file mode 100644 index a1e3fd4..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/identity.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../../../src/internal/util/identity.ts"],"names":[],"mappings":";;;AA0CA,SAAgB,QAAQ,CAAI,CAAI;IAC9B,OAAO,CAAC,CAAC;AACX,CAAC;AAFD,4BAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isArrayLike.js b/node_modules/rxjs/dist/cjs/internal/util/isArrayLike.js deleted file mode 100644 index 682c617..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/isArrayLike.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isArrayLike = void 0; -exports.isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; }); -//# sourceMappingURL=isArrayLike.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isArrayLike.js.map b/node_modules/rxjs/dist/cjs/internal/util/isArrayLike.js.map deleted file mode 100644 index 3237b48..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/isArrayLike.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isArrayLike.js","sourceRoot":"","sources":["../../../../src/internal/util/isArrayLike.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG,CAAC,UAAI,CAAM,IAAwB,OAAA,CAAC,IAAI,OAAO,CAAC,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,CAAC,KAAK,UAAU,EAA5D,CAA4D,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isAsyncIterable.js b/node_modules/rxjs/dist/cjs/internal/util/isAsyncIterable.js deleted file mode 100644 index 0369064..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/isAsyncIterable.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isAsyncIterable = void 0; -var isFunction_1 = require("./isFunction"); -function isAsyncIterable(obj) { - return Symbol.asyncIterator && isFunction_1.isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]); -} -exports.isAsyncIterable = isAsyncIterable; -//# sourceMappingURL=isAsyncIterable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isAsyncIterable.js.map b/node_modules/rxjs/dist/cjs/internal/util/isAsyncIterable.js.map deleted file mode 100644 index fdb9371..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/isAsyncIterable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isAsyncIterable.js","sourceRoot":"","sources":["../../../../src/internal/util/isAsyncIterable.ts"],"names":[],"mappings":";;;AAAA,2CAA0C;AAE1C,SAAgB,eAAe,CAAI,GAAQ;IACzC,OAAO,MAAM,CAAC,aAAa,IAAI,uBAAU,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;AACzE,CAAC;AAFD,0CAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isDate.js b/node_modules/rxjs/dist/cjs/internal/util/isDate.js deleted file mode 100644 index bce0113..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/isDate.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isValidDate = void 0; -function isValidDate(value) { - return value instanceof Date && !isNaN(value); -} -exports.isValidDate = isValidDate; -//# sourceMappingURL=isDate.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isDate.js.map b/node_modules/rxjs/dist/cjs/internal/util/isDate.js.map deleted file mode 100644 index 41223d8..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/isDate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isDate.js","sourceRoot":"","sources":["../../../../src/internal/util/isDate.ts"],"names":[],"mappings":";;;AAOA,SAAgB,WAAW,CAAC,KAAU;IACpC,OAAO,KAAK,YAAY,IAAI,IAAI,CAAC,KAAK,CAAC,KAAY,CAAC,CAAC;AACvD,CAAC;AAFD,kCAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isFunction.js b/node_modules/rxjs/dist/cjs/internal/util/isFunction.js deleted file mode 100644 index e04791f..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/isFunction.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isFunction = void 0; -function isFunction(value) { - return typeof value === 'function'; -} -exports.isFunction = isFunction; -//# sourceMappingURL=isFunction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isFunction.js.map b/node_modules/rxjs/dist/cjs/internal/util/isFunction.js.map deleted file mode 100644 index be3106e..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/isFunction.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isFunction.js","sourceRoot":"","sources":["../../../../src/internal/util/isFunction.ts"],"names":[],"mappings":";;;AAIA,SAAgB,UAAU,CAAC,KAAU;IACnC,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACrC,CAAC;AAFD,gCAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isInteropObservable.js b/node_modules/rxjs/dist/cjs/internal/util/isInteropObservable.js deleted file mode 100644 index 63db48e..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/isInteropObservable.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isInteropObservable = void 0; -var observable_1 = require("../symbol/observable"); -var isFunction_1 = require("./isFunction"); -function isInteropObservable(input) { - return isFunction_1.isFunction(input[observable_1.observable]); -} -exports.isInteropObservable = isInteropObservable; -//# sourceMappingURL=isInteropObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isInteropObservable.js.map b/node_modules/rxjs/dist/cjs/internal/util/isInteropObservable.js.map deleted file mode 100644 index 37e5edb..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/isInteropObservable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isInteropObservable.js","sourceRoot":"","sources":["../../../../src/internal/util/isInteropObservable.ts"],"names":[],"mappings":";;;AACA,mDAAuE;AACvE,2CAA0C;AAG1C,SAAgB,mBAAmB,CAAC,KAAU;IAC5C,OAAO,uBAAU,CAAC,KAAK,CAAC,uBAAiB,CAAC,CAAC,CAAC;AAC9C,CAAC;AAFD,kDAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isIterable.js b/node_modules/rxjs/dist/cjs/internal/util/isIterable.js deleted file mode 100644 index dc62d9a..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/isIterable.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isIterable = void 0; -var iterator_1 = require("../symbol/iterator"); -var isFunction_1 = require("./isFunction"); -function isIterable(input) { - return isFunction_1.isFunction(input === null || input === void 0 ? void 0 : input[iterator_1.iterator]); -} -exports.isIterable = isIterable; -//# sourceMappingURL=isIterable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isIterable.js.map b/node_modules/rxjs/dist/cjs/internal/util/isIterable.js.map deleted file mode 100644 index 1c10e94..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/isIterable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isIterable.js","sourceRoot":"","sources":["../../../../src/internal/util/isIterable.ts"],"names":[],"mappings":";;;AAAA,+CAAiE;AACjE,2CAA0C;AAG1C,SAAgB,UAAU,CAAC,KAAU;IACnC,OAAO,uBAAU,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAG,mBAAe,CAAC,CAAC,CAAC;AAC9C,CAAC;AAFD,gCAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isObservable.js b/node_modules/rxjs/dist/cjs/internal/util/isObservable.js deleted file mode 100644 index 280ece5..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/isObservable.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isObservable = void 0; -var Observable_1 = require("../Observable"); -var isFunction_1 = require("./isFunction"); -function isObservable(obj) { - return !!obj && (obj instanceof Observable_1.Observable || (isFunction_1.isFunction(obj.lift) && isFunction_1.isFunction(obj.subscribe))); -} -exports.isObservable = isObservable; -//# sourceMappingURL=isObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isObservable.js.map b/node_modules/rxjs/dist/cjs/internal/util/isObservable.js.map deleted file mode 100644 index 37f51f8..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/isObservable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isObservable.js","sourceRoot":"","sources":["../../../../src/internal/util/isObservable.ts"],"names":[],"mappings":";;;AACA,4CAA2C;AAC3C,2CAA0C;AAM1C,SAAgB,YAAY,CAAC,GAAQ;IAGnC,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,YAAY,uBAAU,IAAI,CAAC,uBAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,uBAAU,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AACrG,CAAC;AAJD,oCAIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isPromise.js b/node_modules/rxjs/dist/cjs/internal/util/isPromise.js deleted file mode 100644 index fae4d1e..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/isPromise.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isPromise = void 0; -var isFunction_1 = require("./isFunction"); -function isPromise(value) { - return isFunction_1.isFunction(value === null || value === void 0 ? void 0 : value.then); -} -exports.isPromise = isPromise; -//# sourceMappingURL=isPromise.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isPromise.js.map b/node_modules/rxjs/dist/cjs/internal/util/isPromise.js.map deleted file mode 100644 index 00767ab..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/isPromise.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isPromise.js","sourceRoot":"","sources":["../../../../src/internal/util/isPromise.ts"],"names":[],"mappings":";;;AAAA,2CAA0C;AAM1C,SAAgB,SAAS,CAAC,KAAU;IAClC,OAAO,uBAAU,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAC,CAAC;AACjC,CAAC;AAFD,8BAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js b/node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js deleted file mode 100644 index 3b016e1..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js +++ /dev/null @@ -1,82 +0,0 @@ -"use strict"; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } -var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isReadableStreamLike = exports.readableStreamLikeToAsyncGenerator = void 0; -var isFunction_1 = require("./isFunction"); -function readableStreamLikeToAsyncGenerator(readableStream) { - return __asyncGenerator(this, arguments, function readableStreamLikeToAsyncGenerator_1() { - var reader, _a, value, done; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - reader = readableStream.getReader(); - _b.label = 1; - case 1: - _b.trys.push([1, , 9, 10]); - _b.label = 2; - case 2: - if (!true) return [3, 8]; - return [4, __await(reader.read())]; - case 3: - _a = _b.sent(), value = _a.value, done = _a.done; - if (!done) return [3, 5]; - return [4, __await(void 0)]; - case 4: return [2, _b.sent()]; - case 5: return [4, __await(value)]; - case 6: return [4, _b.sent()]; - case 7: - _b.sent(); - return [3, 2]; - case 8: return [3, 10]; - case 9: - reader.releaseLock(); - return [7]; - case 10: return [2]; - } - }); - }); -} -exports.readableStreamLikeToAsyncGenerator = readableStreamLikeToAsyncGenerator; -function isReadableStreamLike(obj) { - return isFunction_1.isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader); -} -exports.isReadableStreamLike = isReadableStreamLike; -//# sourceMappingURL=isReadableStreamLike.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js.map b/node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js.map deleted file mode 100644 index 7b6a7ae..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isReadableStreamLike.js","sourceRoot":"","sources":["../../../../src/internal/util/isReadableStreamLike.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2CAA0C;AAE1C,SAAuB,kCAAkC,CAAI,cAAqC;;;;;;oBAC1F,MAAM,GAAG,cAAc,CAAC,SAAS,EAAE,CAAC;;;;;;yBAEjC,IAAI;oBACe,mBAAM,MAAM,CAAC,IAAI,EAAE,GAAA;;oBAArC,KAAkB,SAAmB,EAAnC,KAAK,WAAA,EAAE,IAAI,UAAA;yBACf,IAAI,EAAJ,cAAI;;wBACN,sBAAO;2CAEH,KAAM;wBAAZ,sBAAY;;oBAAZ,SAAY,CAAC;;;;oBAGf,MAAM,CAAC,WAAW,EAAE,CAAC;;;;;;CAExB;AAbD,gFAaC;AAED,SAAgB,oBAAoB,CAAI,GAAQ;IAG9C,OAAO,uBAAU,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,SAAS,CAAC,CAAC;AACpC,CAAC;AAJD,oDAIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isScheduler.js b/node_modules/rxjs/dist/cjs/internal/util/isScheduler.js deleted file mode 100644 index 89ea7d5..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/isScheduler.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.isScheduler = void 0; -var isFunction_1 = require("./isFunction"); -function isScheduler(value) { - return value && isFunction_1.isFunction(value.schedule); -} -exports.isScheduler = isScheduler; -//# sourceMappingURL=isScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/isScheduler.js.map b/node_modules/rxjs/dist/cjs/internal/util/isScheduler.js.map deleted file mode 100644 index 1f72d18..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/isScheduler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isScheduler.js","sourceRoot":"","sources":["../../../../src/internal/util/isScheduler.ts"],"names":[],"mappings":";;;AACA,2CAA0C;AAE1C,SAAgB,WAAW,CAAC,KAAU;IACpC,OAAO,KAAK,IAAI,uBAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC7C,CAAC;AAFD,kCAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/lift.js b/node_modules/rxjs/dist/cjs/internal/util/lift.js deleted file mode 100644 index fd489c9..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/lift.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.operate = exports.hasLift = void 0; -var isFunction_1 = require("./isFunction"); -function hasLift(source) { - return isFunction_1.isFunction(source === null || source === void 0 ? void 0 : source.lift); -} -exports.hasLift = hasLift; -function operate(init) { - return function (source) { - if (hasLift(source)) { - return source.lift(function (liftedSource) { - try { - return init(liftedSource, this); - } - catch (err) { - this.error(err); - } - }); - } - throw new TypeError('Unable to lift unknown Observable type'); - }; -} -exports.operate = operate; -//# sourceMappingURL=lift.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/lift.js.map b/node_modules/rxjs/dist/cjs/internal/util/lift.js.map deleted file mode 100644 index 481fe66..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/lift.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"lift.js","sourceRoot":"","sources":["../../../../src/internal/util/lift.ts"],"names":[],"mappings":";;;AAGA,2CAA0C;AAK1C,SAAgB,OAAO,CAAC,MAAW;IACjC,OAAO,uBAAU,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAC,CAAC;AAClC,CAAC;AAFD,0BAEC;AAMD,SAAgB,OAAO,CACrB,IAAqF;IAErF,OAAO,UAAC,MAAqB;QAC3B,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE;YACnB,OAAO,MAAM,CAAC,IAAI,CAAC,UAA+B,YAA2B;gBAC3E,IAAI;oBACF,OAAO,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;iBACjC;gBAAC,OAAO,GAAG,EAAE;oBACZ,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACjB;YACH,CAAC,CAAC,CAAC;SACJ;QACD,MAAM,IAAI,SAAS,CAAC,wCAAwC,CAAC,CAAC;IAChE,CAAC,CAAC;AACJ,CAAC;AAfD,0BAeC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/mapOneOrManyArgs.js b/node_modules/rxjs/dist/cjs/internal/util/mapOneOrManyArgs.js deleted file mode 100644 index 8cc61aa..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/mapOneOrManyArgs.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from) { - for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) - to[j] = from[i]; - return to; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.mapOneOrManyArgs = void 0; -var map_1 = require("../operators/map"); -var isArray = Array.isArray; -function callOrApply(fn, args) { - return isArray(args) ? fn.apply(void 0, __spreadArray([], __read(args))) : fn(args); -} -function mapOneOrManyArgs(fn) { - return map_1.map(function (args) { return callOrApply(fn, args); }); -} -exports.mapOneOrManyArgs = mapOneOrManyArgs; -//# sourceMappingURL=mapOneOrManyArgs.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/mapOneOrManyArgs.js.map b/node_modules/rxjs/dist/cjs/internal/util/mapOneOrManyArgs.js.map deleted file mode 100644 index af09230..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/mapOneOrManyArgs.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mapOneOrManyArgs.js","sourceRoot":"","sources":["../../../../src/internal/util/mapOneOrManyArgs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,wCAAuC;AAE/B,IAAA,OAAO,GAAK,KAAK,QAAV,CAAW;AAE1B,SAAS,WAAW,CAAO,EAA2B,EAAE,IAAW;IAC/D,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,wCAAI,IAAI,IAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;AAClD,CAAC;AAMD,SAAgB,gBAAgB,CAAO,EAA2B;IAC9D,OAAO,SAAG,CAAC,UAAA,IAAI,IAAI,OAAA,WAAW,CAAC,EAAE,EAAE,IAAI,CAAC,EAArB,CAAqB,CAAC,CAAA;AAC7C,CAAC;AAFD,4CAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/noop.js b/node_modules/rxjs/dist/cjs/internal/util/noop.js deleted file mode 100644 index d62ac36..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/noop.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.noop = void 0; -function noop() { } -exports.noop = noop; -//# sourceMappingURL=noop.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/noop.js.map b/node_modules/rxjs/dist/cjs/internal/util/noop.js.map deleted file mode 100644 index 484103e..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/noop.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"noop.js","sourceRoot":"","sources":["../../../../src/internal/util/noop.ts"],"names":[],"mappings":";;;AACA,SAAgB,IAAI,KAAK,CAAC;AAA1B,oBAA0B"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/not.js b/node_modules/rxjs/dist/cjs/internal/util/not.js deleted file mode 100644 index a02b0ba..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/not.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.not = void 0; -function not(pred, thisArg) { - return function (value, index) { return !pred.call(thisArg, value, index); }; -} -exports.not = not; -//# sourceMappingURL=not.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/not.js.map b/node_modules/rxjs/dist/cjs/internal/util/not.js.map deleted file mode 100644 index 5cdca90..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/not.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"not.js","sourceRoot":"","sources":["../../../../src/internal/util/not.ts"],"names":[],"mappings":";;;AAAA,SAAgB,GAAG,CAAI,IAA0C,EAAE,OAAY;IAC7E,OAAO,UAAC,KAAQ,EAAE,KAAa,IAAK,OAAA,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,EAAjC,CAAiC,CAAC;AACxE,CAAC;AAFD,kBAEC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/pipe.js b/node_modules/rxjs/dist/cjs/internal/util/pipe.js deleted file mode 100644 index b89617e..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/pipe.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.pipeFromArray = exports.pipe = void 0; -var identity_1 = require("./identity"); -function pipe() { - var fns = []; - for (var _i = 0; _i < arguments.length; _i++) { - fns[_i] = arguments[_i]; - } - return pipeFromArray(fns); -} -exports.pipe = pipe; -function pipeFromArray(fns) { - if (fns.length === 0) { - return identity_1.identity; - } - if (fns.length === 1) { - return fns[0]; - } - return function piped(input) { - return fns.reduce(function (prev, fn) { return fn(prev); }, input); - }; -} -exports.pipeFromArray = pipeFromArray; -//# sourceMappingURL=pipe.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/pipe.js.map b/node_modules/rxjs/dist/cjs/internal/util/pipe.js.map deleted file mode 100644 index 75ba2d5..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/pipe.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pipe.js","sourceRoot":"","sources":["../../../../src/internal/util/pipe.ts"],"names":[],"mappings":";;;AAAA,uCAAsC;AA6EtC,SAAgB,IAAI;IAAC,aAAsC;SAAtC,UAAsC,EAAtC,qBAAsC,EAAtC,IAAsC;QAAtC,wBAAsC;;IACzD,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC;AAC5B,CAAC;AAFD,oBAEC;AAGD,SAAgB,aAAa,CAAO,GAA+B;IACjE,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;QACpB,OAAO,mBAAmC,CAAC;KAC5C;IAED,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;QACpB,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;KACf;IAED,OAAO,SAAS,KAAK,CAAC,KAAQ;QAC5B,OAAO,GAAG,CAAC,MAAM,CAAC,UAAC,IAAS,EAAE,EAAuB,IAAK,OAAA,EAAE,CAAC,IAAI,CAAC,EAAR,CAAQ,EAAE,KAAY,CAAC,CAAC;IACpF,CAAC,CAAC;AACJ,CAAC;AAZD,sCAYC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js b/node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js deleted file mode 100644 index b380ca1..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.reportUnhandledError = void 0; -var config_1 = require("../config"); -var timeoutProvider_1 = require("../scheduler/timeoutProvider"); -function reportUnhandledError(err) { - timeoutProvider_1.timeoutProvider.setTimeout(function () { - var onUnhandledError = config_1.config.onUnhandledError; - if (onUnhandledError) { - onUnhandledError(err); - } - else { - throw err; - } - }); -} -exports.reportUnhandledError = reportUnhandledError; -//# sourceMappingURL=reportUnhandledError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js.map b/node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js.map deleted file mode 100644 index 59ad080..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"reportUnhandledError.js","sourceRoot":"","sources":["../../../../src/internal/util/reportUnhandledError.ts"],"names":[],"mappings":";;;AAAA,oCAAmC;AACnC,gEAA+D;AAW/D,SAAgB,oBAAoB,CAAC,GAAQ;IAC3C,iCAAe,CAAC,UAAU,CAAC;QACjB,IAAA,gBAAgB,GAAK,eAAM,iBAAX,CAAY;QACpC,IAAI,gBAAgB,EAAE;YAEpB,gBAAgB,CAAC,GAAG,CAAC,CAAC;SACvB;aAAM;YAEL,MAAM,GAAG,CAAC;SACX;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAXD,oDAWC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/subscribeToArray.js b/node_modules/rxjs/dist/cjs/internal/util/subscribeToArray.js deleted file mode 100644 index 6755f9a..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/subscribeToArray.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.subscribeToArray = void 0; -var subscribeToArray = function (array) { return function (subscriber) { - for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) { - subscriber.next(array[i]); - } - subscriber.complete(); -}; }; -exports.subscribeToArray = subscribeToArray; -//# sourceMappingURL=subscribeToArray.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/subscribeToArray.js.map b/node_modules/rxjs/dist/cjs/internal/util/subscribeToArray.js.map deleted file mode 100644 index 6f3e01d..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/subscribeToArray.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"subscribeToArray.js","sourceRoot":"","sources":["../../../../src/internal/util/subscribeToArray.ts"],"names":[],"mappings":";;;AAMO,IAAM,gBAAgB,GAAG,UAAI,KAAmB,IAAK,OAAA,UAAC,UAAyB;IACpF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KAC3B;IACD,UAAU,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC,EAL2D,CAK3D,CAAC;AALW,QAAA,gBAAgB,oBAK3B"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js b/node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js deleted file mode 100644 index 82abb2a..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createInvalidObservableTypeError = void 0; -function createInvalidObservableTypeError(input) { - return new TypeError("You provided " + (input !== null && typeof input === 'object' ? 'an invalid object' : "'" + input + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable."); -} -exports.createInvalidObservableTypeError = createInvalidObservableTypeError; -//# sourceMappingURL=throwUnobservableError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js.map b/node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js.map deleted file mode 100644 index aa8e572..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"throwUnobservableError.js","sourceRoot":"","sources":["../../../../src/internal/util/throwUnobservableError.ts"],"names":[],"mappings":";;;AAIA,SAAgB,gCAAgC,CAAC,KAAU;IAEzD,OAAO,IAAI,SAAS,CAClB,mBACE,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,MAAI,KAAK,MAAG,8HACwC,CAC3H,CAAC;AACJ,CAAC;AAPD,4EAOC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/workarounds.js b/node_modules/rxjs/dist/cjs/internal/util/workarounds.js deleted file mode 100644 index d82fbda..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/workarounds.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=workarounds.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/internal/util/workarounds.js.map b/node_modules/rxjs/dist/cjs/internal/util/workarounds.js.map deleted file mode 100644 index 75e7271..0000000 --- a/node_modules/rxjs/dist/cjs/internal/util/workarounds.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workarounds.js","sourceRoot":"","sources":["../../../../src/internal/util/workarounds.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/operators/index.js b/node_modules/rxjs/dist/cjs/operators/index.js deleted file mode 100644 index b0ea54e..0000000 --- a/node_modules/rxjs/dist/cjs/operators/index.js +++ /dev/null @@ -1,232 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.mergeAll = exports.merge = exports.max = exports.materialize = exports.mapTo = exports.map = exports.last = exports.isEmpty = exports.ignoreElements = exports.groupBy = exports.first = exports.findIndex = exports.find = exports.finalize = exports.filter = exports.expand = exports.exhaustMap = exports.exhaustAll = exports.exhaust = exports.every = exports.endWith = exports.elementAt = exports.distinctUntilKeyChanged = exports.distinctUntilChanged = exports.distinct = exports.dematerialize = exports.delayWhen = exports.delay = exports.defaultIfEmpty = exports.debounceTime = exports.debounce = exports.count = exports.connect = exports.concatWith = exports.concatMapTo = exports.concatMap = exports.concatAll = exports.concat = exports.combineLatestWith = exports.combineLatest = exports.combineLatestAll = exports.combineAll = exports.catchError = exports.bufferWhen = exports.bufferToggle = exports.bufferTime = exports.bufferCount = exports.buffer = exports.auditTime = exports.audit = void 0; -exports.timeInterval = exports.throwIfEmpty = exports.throttleTime = exports.throttle = exports.tap = exports.takeWhile = exports.takeUntil = exports.takeLast = exports.take = exports.switchScan = exports.switchMapTo = exports.switchMap = exports.switchAll = exports.subscribeOn = exports.startWith = exports.skipWhile = exports.skipUntil = exports.skipLast = exports.skip = exports.single = exports.shareReplay = exports.share = exports.sequenceEqual = exports.scan = exports.sampleTime = exports.sample = exports.refCount = exports.retryWhen = exports.retry = exports.repeatWhen = exports.repeat = exports.reduce = exports.raceWith = exports.race = exports.publishReplay = exports.publishLast = exports.publishBehavior = exports.publish = exports.pluck = exports.partition = exports.pairwise = exports.onErrorResumeNext = exports.observeOn = exports.multicast = exports.min = exports.mergeWith = exports.mergeScan = exports.mergeMapTo = exports.mergeMap = exports.flatMap = void 0; -exports.zipWith = exports.zipAll = exports.zip = exports.withLatestFrom = exports.windowWhen = exports.windowToggle = exports.windowTime = exports.windowCount = exports.window = exports.toArray = exports.timestamp = exports.timeoutWith = exports.timeout = void 0; -var audit_1 = require("../internal/operators/audit"); -Object.defineProperty(exports, "audit", { enumerable: true, get: function () { return audit_1.audit; } }); -var auditTime_1 = require("../internal/operators/auditTime"); -Object.defineProperty(exports, "auditTime", { enumerable: true, get: function () { return auditTime_1.auditTime; } }); -var buffer_1 = require("../internal/operators/buffer"); -Object.defineProperty(exports, "buffer", { enumerable: true, get: function () { return buffer_1.buffer; } }); -var bufferCount_1 = require("../internal/operators/bufferCount"); -Object.defineProperty(exports, "bufferCount", { enumerable: true, get: function () { return bufferCount_1.bufferCount; } }); -var bufferTime_1 = require("../internal/operators/bufferTime"); -Object.defineProperty(exports, "bufferTime", { enumerable: true, get: function () { return bufferTime_1.bufferTime; } }); -var bufferToggle_1 = require("../internal/operators/bufferToggle"); -Object.defineProperty(exports, "bufferToggle", { enumerable: true, get: function () { return bufferToggle_1.bufferToggle; } }); -var bufferWhen_1 = require("../internal/operators/bufferWhen"); -Object.defineProperty(exports, "bufferWhen", { enumerable: true, get: function () { return bufferWhen_1.bufferWhen; } }); -var catchError_1 = require("../internal/operators/catchError"); -Object.defineProperty(exports, "catchError", { enumerable: true, get: function () { return catchError_1.catchError; } }); -var combineAll_1 = require("../internal/operators/combineAll"); -Object.defineProperty(exports, "combineAll", { enumerable: true, get: function () { return combineAll_1.combineAll; } }); -var combineLatestAll_1 = require("../internal/operators/combineLatestAll"); -Object.defineProperty(exports, "combineLatestAll", { enumerable: true, get: function () { return combineLatestAll_1.combineLatestAll; } }); -var combineLatest_1 = require("../internal/operators/combineLatest"); -Object.defineProperty(exports, "combineLatest", { enumerable: true, get: function () { return combineLatest_1.combineLatest; } }); -var combineLatestWith_1 = require("../internal/operators/combineLatestWith"); -Object.defineProperty(exports, "combineLatestWith", { enumerable: true, get: function () { return combineLatestWith_1.combineLatestWith; } }); -var concat_1 = require("../internal/operators/concat"); -Object.defineProperty(exports, "concat", { enumerable: true, get: function () { return concat_1.concat; } }); -var concatAll_1 = require("../internal/operators/concatAll"); -Object.defineProperty(exports, "concatAll", { enumerable: true, get: function () { return concatAll_1.concatAll; } }); -var concatMap_1 = require("../internal/operators/concatMap"); -Object.defineProperty(exports, "concatMap", { enumerable: true, get: function () { return concatMap_1.concatMap; } }); -var concatMapTo_1 = require("../internal/operators/concatMapTo"); -Object.defineProperty(exports, "concatMapTo", { enumerable: true, get: function () { return concatMapTo_1.concatMapTo; } }); -var concatWith_1 = require("../internal/operators/concatWith"); -Object.defineProperty(exports, "concatWith", { enumerable: true, get: function () { return concatWith_1.concatWith; } }); -var connect_1 = require("../internal/operators/connect"); -Object.defineProperty(exports, "connect", { enumerable: true, get: function () { return connect_1.connect; } }); -var count_1 = require("../internal/operators/count"); -Object.defineProperty(exports, "count", { enumerable: true, get: function () { return count_1.count; } }); -var debounce_1 = require("../internal/operators/debounce"); -Object.defineProperty(exports, "debounce", { enumerable: true, get: function () { return debounce_1.debounce; } }); -var debounceTime_1 = require("../internal/operators/debounceTime"); -Object.defineProperty(exports, "debounceTime", { enumerable: true, get: function () { return debounceTime_1.debounceTime; } }); -var defaultIfEmpty_1 = require("../internal/operators/defaultIfEmpty"); -Object.defineProperty(exports, "defaultIfEmpty", { enumerable: true, get: function () { return defaultIfEmpty_1.defaultIfEmpty; } }); -var delay_1 = require("../internal/operators/delay"); -Object.defineProperty(exports, "delay", { enumerable: true, get: function () { return delay_1.delay; } }); -var delayWhen_1 = require("../internal/operators/delayWhen"); -Object.defineProperty(exports, "delayWhen", { enumerable: true, get: function () { return delayWhen_1.delayWhen; } }); -var dematerialize_1 = require("../internal/operators/dematerialize"); -Object.defineProperty(exports, "dematerialize", { enumerable: true, get: function () { return dematerialize_1.dematerialize; } }); -var distinct_1 = require("../internal/operators/distinct"); -Object.defineProperty(exports, "distinct", { enumerable: true, get: function () { return distinct_1.distinct; } }); -var distinctUntilChanged_1 = require("../internal/operators/distinctUntilChanged"); -Object.defineProperty(exports, "distinctUntilChanged", { enumerable: true, get: function () { return distinctUntilChanged_1.distinctUntilChanged; } }); -var distinctUntilKeyChanged_1 = require("../internal/operators/distinctUntilKeyChanged"); -Object.defineProperty(exports, "distinctUntilKeyChanged", { enumerable: true, get: function () { return distinctUntilKeyChanged_1.distinctUntilKeyChanged; } }); -var elementAt_1 = require("../internal/operators/elementAt"); -Object.defineProperty(exports, "elementAt", { enumerable: true, get: function () { return elementAt_1.elementAt; } }); -var endWith_1 = require("../internal/operators/endWith"); -Object.defineProperty(exports, "endWith", { enumerable: true, get: function () { return endWith_1.endWith; } }); -var every_1 = require("../internal/operators/every"); -Object.defineProperty(exports, "every", { enumerable: true, get: function () { return every_1.every; } }); -var exhaust_1 = require("../internal/operators/exhaust"); -Object.defineProperty(exports, "exhaust", { enumerable: true, get: function () { return exhaust_1.exhaust; } }); -var exhaustAll_1 = require("../internal/operators/exhaustAll"); -Object.defineProperty(exports, "exhaustAll", { enumerable: true, get: function () { return exhaustAll_1.exhaustAll; } }); -var exhaustMap_1 = require("../internal/operators/exhaustMap"); -Object.defineProperty(exports, "exhaustMap", { enumerable: true, get: function () { return exhaustMap_1.exhaustMap; } }); -var expand_1 = require("../internal/operators/expand"); -Object.defineProperty(exports, "expand", { enumerable: true, get: function () { return expand_1.expand; } }); -var filter_1 = require("../internal/operators/filter"); -Object.defineProperty(exports, "filter", { enumerable: true, get: function () { return filter_1.filter; } }); -var finalize_1 = require("../internal/operators/finalize"); -Object.defineProperty(exports, "finalize", { enumerable: true, get: function () { return finalize_1.finalize; } }); -var find_1 = require("../internal/operators/find"); -Object.defineProperty(exports, "find", { enumerable: true, get: function () { return find_1.find; } }); -var findIndex_1 = require("../internal/operators/findIndex"); -Object.defineProperty(exports, "findIndex", { enumerable: true, get: function () { return findIndex_1.findIndex; } }); -var first_1 = require("../internal/operators/first"); -Object.defineProperty(exports, "first", { enumerable: true, get: function () { return first_1.first; } }); -var groupBy_1 = require("../internal/operators/groupBy"); -Object.defineProperty(exports, "groupBy", { enumerable: true, get: function () { return groupBy_1.groupBy; } }); -var ignoreElements_1 = require("../internal/operators/ignoreElements"); -Object.defineProperty(exports, "ignoreElements", { enumerable: true, get: function () { return ignoreElements_1.ignoreElements; } }); -var isEmpty_1 = require("../internal/operators/isEmpty"); -Object.defineProperty(exports, "isEmpty", { enumerable: true, get: function () { return isEmpty_1.isEmpty; } }); -var last_1 = require("../internal/operators/last"); -Object.defineProperty(exports, "last", { enumerable: true, get: function () { return last_1.last; } }); -var map_1 = require("../internal/operators/map"); -Object.defineProperty(exports, "map", { enumerable: true, get: function () { return map_1.map; } }); -var mapTo_1 = require("../internal/operators/mapTo"); -Object.defineProperty(exports, "mapTo", { enumerable: true, get: function () { return mapTo_1.mapTo; } }); -var materialize_1 = require("../internal/operators/materialize"); -Object.defineProperty(exports, "materialize", { enumerable: true, get: function () { return materialize_1.materialize; } }); -var max_1 = require("../internal/operators/max"); -Object.defineProperty(exports, "max", { enumerable: true, get: function () { return max_1.max; } }); -var merge_1 = require("../internal/operators/merge"); -Object.defineProperty(exports, "merge", { enumerable: true, get: function () { return merge_1.merge; } }); -var mergeAll_1 = require("../internal/operators/mergeAll"); -Object.defineProperty(exports, "mergeAll", { enumerable: true, get: function () { return mergeAll_1.mergeAll; } }); -var flatMap_1 = require("../internal/operators/flatMap"); -Object.defineProperty(exports, "flatMap", { enumerable: true, get: function () { return flatMap_1.flatMap; } }); -var mergeMap_1 = require("../internal/operators/mergeMap"); -Object.defineProperty(exports, "mergeMap", { enumerable: true, get: function () { return mergeMap_1.mergeMap; } }); -var mergeMapTo_1 = require("../internal/operators/mergeMapTo"); -Object.defineProperty(exports, "mergeMapTo", { enumerable: true, get: function () { return mergeMapTo_1.mergeMapTo; } }); -var mergeScan_1 = require("../internal/operators/mergeScan"); -Object.defineProperty(exports, "mergeScan", { enumerable: true, get: function () { return mergeScan_1.mergeScan; } }); -var mergeWith_1 = require("../internal/operators/mergeWith"); -Object.defineProperty(exports, "mergeWith", { enumerable: true, get: function () { return mergeWith_1.mergeWith; } }); -var min_1 = require("../internal/operators/min"); -Object.defineProperty(exports, "min", { enumerable: true, get: function () { return min_1.min; } }); -var multicast_1 = require("../internal/operators/multicast"); -Object.defineProperty(exports, "multicast", { enumerable: true, get: function () { return multicast_1.multicast; } }); -var observeOn_1 = require("../internal/operators/observeOn"); -Object.defineProperty(exports, "observeOn", { enumerable: true, get: function () { return observeOn_1.observeOn; } }); -var onErrorResumeNextWith_1 = require("../internal/operators/onErrorResumeNextWith"); -Object.defineProperty(exports, "onErrorResumeNext", { enumerable: true, get: function () { return onErrorResumeNextWith_1.onErrorResumeNext; } }); -var pairwise_1 = require("../internal/operators/pairwise"); -Object.defineProperty(exports, "pairwise", { enumerable: true, get: function () { return pairwise_1.pairwise; } }); -var partition_1 = require("../internal/operators/partition"); -Object.defineProperty(exports, "partition", { enumerable: true, get: function () { return partition_1.partition; } }); -var pluck_1 = require("../internal/operators/pluck"); -Object.defineProperty(exports, "pluck", { enumerable: true, get: function () { return pluck_1.pluck; } }); -var publish_1 = require("../internal/operators/publish"); -Object.defineProperty(exports, "publish", { enumerable: true, get: function () { return publish_1.publish; } }); -var publishBehavior_1 = require("../internal/operators/publishBehavior"); -Object.defineProperty(exports, "publishBehavior", { enumerable: true, get: function () { return publishBehavior_1.publishBehavior; } }); -var publishLast_1 = require("../internal/operators/publishLast"); -Object.defineProperty(exports, "publishLast", { enumerable: true, get: function () { return publishLast_1.publishLast; } }); -var publishReplay_1 = require("../internal/operators/publishReplay"); -Object.defineProperty(exports, "publishReplay", { enumerable: true, get: function () { return publishReplay_1.publishReplay; } }); -var race_1 = require("../internal/operators/race"); -Object.defineProperty(exports, "race", { enumerable: true, get: function () { return race_1.race; } }); -var raceWith_1 = require("../internal/operators/raceWith"); -Object.defineProperty(exports, "raceWith", { enumerable: true, get: function () { return raceWith_1.raceWith; } }); -var reduce_1 = require("../internal/operators/reduce"); -Object.defineProperty(exports, "reduce", { enumerable: true, get: function () { return reduce_1.reduce; } }); -var repeat_1 = require("../internal/operators/repeat"); -Object.defineProperty(exports, "repeat", { enumerable: true, get: function () { return repeat_1.repeat; } }); -var repeatWhen_1 = require("../internal/operators/repeatWhen"); -Object.defineProperty(exports, "repeatWhen", { enumerable: true, get: function () { return repeatWhen_1.repeatWhen; } }); -var retry_1 = require("../internal/operators/retry"); -Object.defineProperty(exports, "retry", { enumerable: true, get: function () { return retry_1.retry; } }); -var retryWhen_1 = require("../internal/operators/retryWhen"); -Object.defineProperty(exports, "retryWhen", { enumerable: true, get: function () { return retryWhen_1.retryWhen; } }); -var refCount_1 = require("../internal/operators/refCount"); -Object.defineProperty(exports, "refCount", { enumerable: true, get: function () { return refCount_1.refCount; } }); -var sample_1 = require("../internal/operators/sample"); -Object.defineProperty(exports, "sample", { enumerable: true, get: function () { return sample_1.sample; } }); -var sampleTime_1 = require("../internal/operators/sampleTime"); -Object.defineProperty(exports, "sampleTime", { enumerable: true, get: function () { return sampleTime_1.sampleTime; } }); -var scan_1 = require("../internal/operators/scan"); -Object.defineProperty(exports, "scan", { enumerable: true, get: function () { return scan_1.scan; } }); -var sequenceEqual_1 = require("../internal/operators/sequenceEqual"); -Object.defineProperty(exports, "sequenceEqual", { enumerable: true, get: function () { return sequenceEqual_1.sequenceEqual; } }); -var share_1 = require("../internal/operators/share"); -Object.defineProperty(exports, "share", { enumerable: true, get: function () { return share_1.share; } }); -var shareReplay_1 = require("../internal/operators/shareReplay"); -Object.defineProperty(exports, "shareReplay", { enumerable: true, get: function () { return shareReplay_1.shareReplay; } }); -var single_1 = require("../internal/operators/single"); -Object.defineProperty(exports, "single", { enumerable: true, get: function () { return single_1.single; } }); -var skip_1 = require("../internal/operators/skip"); -Object.defineProperty(exports, "skip", { enumerable: true, get: function () { return skip_1.skip; } }); -var skipLast_1 = require("../internal/operators/skipLast"); -Object.defineProperty(exports, "skipLast", { enumerable: true, get: function () { return skipLast_1.skipLast; } }); -var skipUntil_1 = require("../internal/operators/skipUntil"); -Object.defineProperty(exports, "skipUntil", { enumerable: true, get: function () { return skipUntil_1.skipUntil; } }); -var skipWhile_1 = require("../internal/operators/skipWhile"); -Object.defineProperty(exports, "skipWhile", { enumerable: true, get: function () { return skipWhile_1.skipWhile; } }); -var startWith_1 = require("../internal/operators/startWith"); -Object.defineProperty(exports, "startWith", { enumerable: true, get: function () { return startWith_1.startWith; } }); -var subscribeOn_1 = require("../internal/operators/subscribeOn"); -Object.defineProperty(exports, "subscribeOn", { enumerable: true, get: function () { return subscribeOn_1.subscribeOn; } }); -var switchAll_1 = require("../internal/operators/switchAll"); -Object.defineProperty(exports, "switchAll", { enumerable: true, get: function () { return switchAll_1.switchAll; } }); -var switchMap_1 = require("../internal/operators/switchMap"); -Object.defineProperty(exports, "switchMap", { enumerable: true, get: function () { return switchMap_1.switchMap; } }); -var switchMapTo_1 = require("../internal/operators/switchMapTo"); -Object.defineProperty(exports, "switchMapTo", { enumerable: true, get: function () { return switchMapTo_1.switchMapTo; } }); -var switchScan_1 = require("../internal/operators/switchScan"); -Object.defineProperty(exports, "switchScan", { enumerable: true, get: function () { return switchScan_1.switchScan; } }); -var take_1 = require("../internal/operators/take"); -Object.defineProperty(exports, "take", { enumerable: true, get: function () { return take_1.take; } }); -var takeLast_1 = require("../internal/operators/takeLast"); -Object.defineProperty(exports, "takeLast", { enumerable: true, get: function () { return takeLast_1.takeLast; } }); -var takeUntil_1 = require("../internal/operators/takeUntil"); -Object.defineProperty(exports, "takeUntil", { enumerable: true, get: function () { return takeUntil_1.takeUntil; } }); -var takeWhile_1 = require("../internal/operators/takeWhile"); -Object.defineProperty(exports, "takeWhile", { enumerable: true, get: function () { return takeWhile_1.takeWhile; } }); -var tap_1 = require("../internal/operators/tap"); -Object.defineProperty(exports, "tap", { enumerable: true, get: function () { return tap_1.tap; } }); -var throttle_1 = require("../internal/operators/throttle"); -Object.defineProperty(exports, "throttle", { enumerable: true, get: function () { return throttle_1.throttle; } }); -var throttleTime_1 = require("../internal/operators/throttleTime"); -Object.defineProperty(exports, "throttleTime", { enumerable: true, get: function () { return throttleTime_1.throttleTime; } }); -var throwIfEmpty_1 = require("../internal/operators/throwIfEmpty"); -Object.defineProperty(exports, "throwIfEmpty", { enumerable: true, get: function () { return throwIfEmpty_1.throwIfEmpty; } }); -var timeInterval_1 = require("../internal/operators/timeInterval"); -Object.defineProperty(exports, "timeInterval", { enumerable: true, get: function () { return timeInterval_1.timeInterval; } }); -var timeout_1 = require("../internal/operators/timeout"); -Object.defineProperty(exports, "timeout", { enumerable: true, get: function () { return timeout_1.timeout; } }); -var timeoutWith_1 = require("../internal/operators/timeoutWith"); -Object.defineProperty(exports, "timeoutWith", { enumerable: true, get: function () { return timeoutWith_1.timeoutWith; } }); -var timestamp_1 = require("../internal/operators/timestamp"); -Object.defineProperty(exports, "timestamp", { enumerable: true, get: function () { return timestamp_1.timestamp; } }); -var toArray_1 = require("../internal/operators/toArray"); -Object.defineProperty(exports, "toArray", { enumerable: true, get: function () { return toArray_1.toArray; } }); -var window_1 = require("../internal/operators/window"); -Object.defineProperty(exports, "window", { enumerable: true, get: function () { return window_1.window; } }); -var windowCount_1 = require("../internal/operators/windowCount"); -Object.defineProperty(exports, "windowCount", { enumerable: true, get: function () { return windowCount_1.windowCount; } }); -var windowTime_1 = require("../internal/operators/windowTime"); -Object.defineProperty(exports, "windowTime", { enumerable: true, get: function () { return windowTime_1.windowTime; } }); -var windowToggle_1 = require("../internal/operators/windowToggle"); -Object.defineProperty(exports, "windowToggle", { enumerable: true, get: function () { return windowToggle_1.windowToggle; } }); -var windowWhen_1 = require("../internal/operators/windowWhen"); -Object.defineProperty(exports, "windowWhen", { enumerable: true, get: function () { return windowWhen_1.windowWhen; } }); -var withLatestFrom_1 = require("../internal/operators/withLatestFrom"); -Object.defineProperty(exports, "withLatestFrom", { enumerable: true, get: function () { return withLatestFrom_1.withLatestFrom; } }); -var zip_1 = require("../internal/operators/zip"); -Object.defineProperty(exports, "zip", { enumerable: true, get: function () { return zip_1.zip; } }); -var zipAll_1 = require("../internal/operators/zipAll"); -Object.defineProperty(exports, "zipAll", { enumerable: true, get: function () { return zipAll_1.zipAll; } }); -var zipWith_1 = require("../internal/operators/zipWith"); -Object.defineProperty(exports, "zipWith", { enumerable: true, get: function () { return zipWith_1.zipWith; } }); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/operators/index.js.map b/node_modules/rxjs/dist/cjs/operators/index.js.map deleted file mode 100644 index 8217be7..0000000 --- a/node_modules/rxjs/dist/cjs/operators/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/operators/index.ts"],"names":[],"mappings":";;;;;AACA,qDAAoD;AAA3C,8FAAA,KAAK,OAAA;AACd,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,uDAAsD;AAA7C,gGAAA,MAAM,OAAA;AACf,iEAAgE;AAAvD,0GAAA,WAAW,OAAA;AACpB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,mEAAkE;AAAzD,4GAAA,YAAY,OAAA;AACrB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,2EAA0E;AAAjE,oHAAA,gBAAgB,OAAA;AACzB,qEAAoE;AAA3D,8GAAA,aAAa,OAAA;AACtB,6EAA4E;AAAnE,sHAAA,iBAAiB,OAAA;AAC1B,uDAAsD;AAA7C,gGAAA,MAAM,OAAA;AACf,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,iEAAgE;AAAvD,0GAAA,WAAW,OAAA;AACpB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,yDAAuE;AAA9D,kGAAA,OAAO,OAAA;AAChB,qDAAoD;AAA3C,8FAAA,KAAK,OAAA;AACd,2DAA0D;AAAjD,oGAAA,QAAQ,OAAA;AACjB,mEAAkE;AAAzD,4GAAA,YAAY,OAAA;AACrB,uEAAsE;AAA7D,gHAAA,cAAc,OAAA;AACvB,qDAAoD;AAA3C,8FAAA,KAAK,OAAA;AACd,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,qEAAoE;AAA3D,8GAAA,aAAa,OAAA;AACtB,2DAA0D;AAAjD,oGAAA,QAAQ,OAAA;AACjB,mFAAkF;AAAzE,4HAAA,oBAAoB,OAAA;AAC7B,yFAAwF;AAA/E,kIAAA,uBAAuB,OAAA;AAChC,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,yDAAwD;AAA/C,kGAAA,OAAO,OAAA;AAChB,qDAAoD;AAA3C,8FAAA,KAAK,OAAA;AACd,yDAAwD;AAA/C,kGAAA,OAAO,OAAA;AAChB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,uDAAsD;AAA7C,gGAAA,MAAM,OAAA;AACf,uDAAsD;AAA7C,gGAAA,MAAM,OAAA;AACf,2DAA0D;AAAjD,oGAAA,QAAQ,OAAA;AACjB,mDAAkD;AAAzC,4FAAA,IAAI,OAAA;AACb,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,qDAAoD;AAA3C,8FAAA,KAAK,OAAA;AACd,yDAAwG;AAA/F,kGAAA,OAAO,OAAA;AAChB,uEAAsE;AAA7D,gHAAA,cAAc,OAAA;AACvB,yDAAwD;AAA/C,kGAAA,OAAO,OAAA;AAChB,mDAAkD;AAAzC,4FAAA,IAAI,OAAA;AACb,iDAAgD;AAAvC,0FAAA,GAAG,OAAA;AACZ,qDAAoD;AAA3C,8FAAA,KAAK,OAAA;AACd,iEAAgE;AAAvD,0GAAA,WAAW,OAAA;AACpB,iDAAgD;AAAvC,0FAAA,GAAG,OAAA;AACZ,qDAAoD;AAA3C,8FAAA,KAAK,OAAA;AACd,2DAA0D;AAAjD,oGAAA,QAAQ,OAAA;AACjB,yDAAwD;AAA/C,kGAAA,OAAO,OAAA;AAChB,2DAA0D;AAAjD,oGAAA,QAAQ,OAAA;AACjB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,iDAAgD;AAAvC,0FAAA,GAAG,OAAA;AACZ,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,qFAAgF;AAAvE,0HAAA,iBAAiB,OAAA;AAC1B,2DAA0D;AAAjD,oGAAA,QAAQ,OAAA;AACjB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,qDAAoD;AAA3C,8FAAA,KAAK,OAAA;AACd,yDAAwD;AAA/C,kGAAA,OAAO,OAAA;AAChB,yEAAwE;AAA/D,kHAAA,eAAe,OAAA;AACxB,iEAAgE;AAAvD,0GAAA,WAAW,OAAA;AACpB,qEAAoE;AAA3D,8GAAA,aAAa,OAAA;AACtB,mDAAkD;AAAzC,4FAAA,IAAI,OAAA;AACb,2DAA0D;AAAjD,oGAAA,QAAQ,OAAA;AACjB,uDAAsD;AAA7C,gGAAA,MAAM,OAAA;AACf,uDAAoE;AAA3D,gGAAA,MAAM,OAAA;AACf,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,qDAAiE;AAAxD,8FAAA,KAAK,OAAA;AACd,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,2DAA0D;AAAjD,oGAAA,QAAQ,OAAA;AACjB,uDAAsD;AAA7C,gGAAA,MAAM,OAAA;AACf,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,mDAAkD;AAAzC,4FAAA,IAAI,OAAA;AACb,qEAAoE;AAA3D,8GAAA,aAAa,OAAA;AACtB,qDAAiE;AAAxD,8FAAA,KAAK,OAAA;AACd,iEAAmF;AAA1E,0GAAA,WAAW,OAAA;AACpB,uDAAsD;AAA7C,gGAAA,MAAM,OAAA;AACf,mDAAkD;AAAzC,4FAAA,IAAI,OAAA;AACb,2DAA0D;AAAjD,oGAAA,QAAQ,OAAA;AACjB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,iEAAgE;AAAvD,0GAAA,WAAW,OAAA;AACpB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,iEAAgE;AAAvD,0GAAA,WAAW,OAAA;AACpB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,mDAAkD;AAAzC,4FAAA,IAAI,OAAA;AACb,2DAA0D;AAAjD,oGAAA,QAAQ,OAAA;AACjB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,iDAA6D;AAApD,0FAAA,GAAG,OAAA;AACZ,2DAA0E;AAAjE,oGAAA,QAAQ,OAAA;AACjB,mEAAkE;AAAzD,4GAAA,YAAY,OAAA;AACrB,mEAAkE;AAAzD,4GAAA,YAAY,OAAA;AACrB,mEAAkE;AAAzD,4GAAA,YAAY,OAAA;AACrB,yDAAoF;AAA3E,kGAAA,OAAO,OAAA;AAChB,iEAAgE;AAAvD,0GAAA,WAAW,OAAA;AACpB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,yDAAwD;AAA/C,kGAAA,OAAO,OAAA;AAChB,uDAAsD;AAA7C,gGAAA,MAAM,OAAA;AACf,iEAAgE;AAAvD,0GAAA,WAAW,OAAA;AACpB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,mEAAkE;AAAzD,4GAAA,YAAY,OAAA;AACrB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,uEAAsE;AAA7D,gHAAA,cAAc,OAAA;AACvB,iDAAgD;AAAvC,0FAAA,GAAG,OAAA;AACZ,uDAAsD;AAA7C,gGAAA,MAAM,OAAA;AACf,yDAAwD;AAA/C,kGAAA,OAAO,OAAA"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/testing/index.js b/node_modules/rxjs/dist/cjs/testing/index.js deleted file mode 100644 index b57ab23..0000000 --- a/node_modules/rxjs/dist/cjs/testing/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TestScheduler = void 0; -var TestScheduler_1 = require("../internal/testing/TestScheduler"); -Object.defineProperty(exports, "TestScheduler", { enumerable: true, get: function () { return TestScheduler_1.TestScheduler; } }); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/testing/index.js.map b/node_modules/rxjs/dist/cjs/testing/index.js.map deleted file mode 100644 index 290bebf..0000000 --- a/node_modules/rxjs/dist/cjs/testing/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/testing/index.ts"],"names":[],"mappings":";;;AAAA,mEAA8E;AAArE,8GAAA,aAAa,OAAA"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/webSocket/index.js b/node_modules/rxjs/dist/cjs/webSocket/index.js deleted file mode 100644 index b183bf2..0000000 --- a/node_modules/rxjs/dist/cjs/webSocket/index.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.WebSocketSubject = exports.webSocket = void 0; -var webSocket_1 = require("../internal/observable/dom/webSocket"); -Object.defineProperty(exports, "webSocket", { enumerable: true, get: function () { return webSocket_1.webSocket; } }); -var WebSocketSubject_1 = require("../internal/observable/dom/WebSocketSubject"); -Object.defineProperty(exports, "WebSocketSubject", { enumerable: true, get: function () { return WebSocketSubject_1.WebSocketSubject; } }); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/cjs/webSocket/index.js.map b/node_modules/rxjs/dist/cjs/webSocket/index.js.map deleted file mode 100644 index bfcfc5b..0000000 --- a/node_modules/rxjs/dist/cjs/webSocket/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/webSocket/index.ts"],"names":[],"mappings":";;;AAAA,kEAA8E;AAArE,sGAAA,SAAS,OAAa;AAC/B,gFAAuG;AAA9F,oHAAA,gBAAgB,OAAA"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/ajax/index.js b/node_modules/rxjs/dist/esm/ajax/index.js deleted file mode 100644 index e387b2b..0000000 --- a/node_modules/rxjs/dist/esm/ajax/index.js +++ /dev/null @@ -1,4 +0,0 @@ -export { ajax } from '../internal/ajax/ajax'; -export { AjaxError, AjaxTimeoutError } from '../internal/ajax/errors'; -export { AjaxResponse } from '../internal/ajax/AjaxResponse'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/ajax/index.js.map b/node_modules/rxjs/dist/esm/ajax/index.js.map deleted file mode 100644 index d45ff17..0000000 --- a/node_modules/rxjs/dist/esm/ajax/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ajax/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/fetch/index.js b/node_modules/rxjs/dist/esm/fetch/index.js deleted file mode 100644 index e851987..0000000 --- a/node_modules/rxjs/dist/esm/fetch/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export { fromFetch } from '../internal/observable/dom/fetch'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/fetch/index.js.map b/node_modules/rxjs/dist/esm/fetch/index.js.map deleted file mode 100644 index 75fe99b..0000000 --- a/node_modules/rxjs/dist/esm/fetch/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/fetch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/index.js b/node_modules/rxjs/dist/esm/index.js deleted file mode 100644 index cda695d..0000000 --- a/node_modules/rxjs/dist/esm/index.js +++ /dev/null @@ -1,169 +0,0 @@ -export { Observable } from './internal/Observable'; -export { ConnectableObservable } from './internal/observable/ConnectableObservable'; -export { observable } from './internal/symbol/observable'; -export { animationFrames } from './internal/observable/dom/animationFrames'; -export { Subject } from './internal/Subject'; -export { BehaviorSubject } from './internal/BehaviorSubject'; -export { ReplaySubject } from './internal/ReplaySubject'; -export { AsyncSubject } from './internal/AsyncSubject'; -export { asap, asapScheduler } from './internal/scheduler/asap'; -export { async, asyncScheduler } from './internal/scheduler/async'; -export { queue, queueScheduler } from './internal/scheduler/queue'; -export { animationFrame, animationFrameScheduler } from './internal/scheduler/animationFrame'; -export { VirtualTimeScheduler, VirtualAction } from './internal/scheduler/VirtualTimeScheduler'; -export { Scheduler } from './internal/Scheduler'; -export { Subscription } from './internal/Subscription'; -export { Subscriber } from './internal/Subscriber'; -export { Notification, NotificationKind } from './internal/Notification'; -export { pipe } from './internal/util/pipe'; -export { noop } from './internal/util/noop'; -export { identity } from './internal/util/identity'; -export { isObservable } from './internal/util/isObservable'; -export { lastValueFrom } from './internal/lastValueFrom'; -export { firstValueFrom } from './internal/firstValueFrom'; -export { ArgumentOutOfRangeError } from './internal/util/ArgumentOutOfRangeError'; -export { EmptyError } from './internal/util/EmptyError'; -export { NotFoundError } from './internal/util/NotFoundError'; -export { ObjectUnsubscribedError } from './internal/util/ObjectUnsubscribedError'; -export { SequenceError } from './internal/util/SequenceError'; -export { TimeoutError } from './internal/operators/timeout'; -export { UnsubscriptionError } from './internal/util/UnsubscriptionError'; -export { bindCallback } from './internal/observable/bindCallback'; -export { bindNodeCallback } from './internal/observable/bindNodeCallback'; -export { combineLatest } from './internal/observable/combineLatest'; -export { concat } from './internal/observable/concat'; -export { connectable } from './internal/observable/connectable'; -export { defer } from './internal/observable/defer'; -export { empty } from './internal/observable/empty'; -export { forkJoin } from './internal/observable/forkJoin'; -export { from } from './internal/observable/from'; -export { fromEvent } from './internal/observable/fromEvent'; -export { fromEventPattern } from './internal/observable/fromEventPattern'; -export { generate } from './internal/observable/generate'; -export { iif } from './internal/observable/iif'; -export { interval } from './internal/observable/interval'; -export { merge } from './internal/observable/merge'; -export { never } from './internal/observable/never'; -export { of } from './internal/observable/of'; -export { onErrorResumeNext } from './internal/observable/onErrorResumeNext'; -export { pairs } from './internal/observable/pairs'; -export { partition } from './internal/observable/partition'; -export { race } from './internal/observable/race'; -export { range } from './internal/observable/range'; -export { throwError } from './internal/observable/throwError'; -export { timer } from './internal/observable/timer'; -export { using } from './internal/observable/using'; -export { zip } from './internal/observable/zip'; -export { scheduled } from './internal/scheduled/scheduled'; -export { EMPTY } from './internal/observable/empty'; -export { NEVER } from './internal/observable/never'; -export * from './internal/types'; -export { config } from './internal/config'; -export { audit } from './internal/operators/audit'; -export { auditTime } from './internal/operators/auditTime'; -export { buffer } from './internal/operators/buffer'; -export { bufferCount } from './internal/operators/bufferCount'; -export { bufferTime } from './internal/operators/bufferTime'; -export { bufferToggle } from './internal/operators/bufferToggle'; -export { bufferWhen } from './internal/operators/bufferWhen'; -export { catchError } from './internal/operators/catchError'; -export { combineAll } from './internal/operators/combineAll'; -export { combineLatestAll } from './internal/operators/combineLatestAll'; -export { combineLatestWith } from './internal/operators/combineLatestWith'; -export { concatAll } from './internal/operators/concatAll'; -export { concatMap } from './internal/operators/concatMap'; -export { concatMapTo } from './internal/operators/concatMapTo'; -export { concatWith } from './internal/operators/concatWith'; -export { connect } from './internal/operators/connect'; -export { count } from './internal/operators/count'; -export { debounce } from './internal/operators/debounce'; -export { debounceTime } from './internal/operators/debounceTime'; -export { defaultIfEmpty } from './internal/operators/defaultIfEmpty'; -export { delay } from './internal/operators/delay'; -export { delayWhen } from './internal/operators/delayWhen'; -export { dematerialize } from './internal/operators/dematerialize'; -export { distinct } from './internal/operators/distinct'; -export { distinctUntilChanged } from './internal/operators/distinctUntilChanged'; -export { distinctUntilKeyChanged } from './internal/operators/distinctUntilKeyChanged'; -export { elementAt } from './internal/operators/elementAt'; -export { endWith } from './internal/operators/endWith'; -export { every } from './internal/operators/every'; -export { exhaust } from './internal/operators/exhaust'; -export { exhaustAll } from './internal/operators/exhaustAll'; -export { exhaustMap } from './internal/operators/exhaustMap'; -export { expand } from './internal/operators/expand'; -export { filter } from './internal/operators/filter'; -export { finalize } from './internal/operators/finalize'; -export { find } from './internal/operators/find'; -export { findIndex } from './internal/operators/findIndex'; -export { first } from './internal/operators/first'; -export { groupBy } from './internal/operators/groupBy'; -export { ignoreElements } from './internal/operators/ignoreElements'; -export { isEmpty } from './internal/operators/isEmpty'; -export { last } from './internal/operators/last'; -export { map } from './internal/operators/map'; -export { mapTo } from './internal/operators/mapTo'; -export { materialize } from './internal/operators/materialize'; -export { max } from './internal/operators/max'; -export { mergeAll } from './internal/operators/mergeAll'; -export { flatMap } from './internal/operators/flatMap'; -export { mergeMap } from './internal/operators/mergeMap'; -export { mergeMapTo } from './internal/operators/mergeMapTo'; -export { mergeScan } from './internal/operators/mergeScan'; -export { mergeWith } from './internal/operators/mergeWith'; -export { min } from './internal/operators/min'; -export { multicast } from './internal/operators/multicast'; -export { observeOn } from './internal/operators/observeOn'; -export { onErrorResumeNextWith } from './internal/operators/onErrorResumeNextWith'; -export { pairwise } from './internal/operators/pairwise'; -export { pluck } from './internal/operators/pluck'; -export { publish } from './internal/operators/publish'; -export { publishBehavior } from './internal/operators/publishBehavior'; -export { publishLast } from './internal/operators/publishLast'; -export { publishReplay } from './internal/operators/publishReplay'; -export { raceWith } from './internal/operators/raceWith'; -export { reduce } from './internal/operators/reduce'; -export { repeat } from './internal/operators/repeat'; -export { repeatWhen } from './internal/operators/repeatWhen'; -export { retry } from './internal/operators/retry'; -export { retryWhen } from './internal/operators/retryWhen'; -export { refCount } from './internal/operators/refCount'; -export { sample } from './internal/operators/sample'; -export { sampleTime } from './internal/operators/sampleTime'; -export { scan } from './internal/operators/scan'; -export { sequenceEqual } from './internal/operators/sequenceEqual'; -export { share } from './internal/operators/share'; -export { shareReplay } from './internal/operators/shareReplay'; -export { single } from './internal/operators/single'; -export { skip } from './internal/operators/skip'; -export { skipLast } from './internal/operators/skipLast'; -export { skipUntil } from './internal/operators/skipUntil'; -export { skipWhile } from './internal/operators/skipWhile'; -export { startWith } from './internal/operators/startWith'; -export { subscribeOn } from './internal/operators/subscribeOn'; -export { switchAll } from './internal/operators/switchAll'; -export { switchMap } from './internal/operators/switchMap'; -export { switchMapTo } from './internal/operators/switchMapTo'; -export { switchScan } from './internal/operators/switchScan'; -export { take } from './internal/operators/take'; -export { takeLast } from './internal/operators/takeLast'; -export { takeUntil } from './internal/operators/takeUntil'; -export { takeWhile } from './internal/operators/takeWhile'; -export { tap } from './internal/operators/tap'; -export { throttle } from './internal/operators/throttle'; -export { throttleTime } from './internal/operators/throttleTime'; -export { throwIfEmpty } from './internal/operators/throwIfEmpty'; -export { timeInterval } from './internal/operators/timeInterval'; -export { timeout } from './internal/operators/timeout'; -export { timeoutWith } from './internal/operators/timeoutWith'; -export { timestamp } from './internal/operators/timestamp'; -export { toArray } from './internal/operators/toArray'; -export { window } from './internal/operators/window'; -export { windowCount } from './internal/operators/windowCount'; -export { windowTime } from './internal/operators/windowTime'; -export { windowToggle } from './internal/operators/windowToggle'; -export { windowWhen } from './internal/operators/windowWhen'; -export { withLatestFrom } from './internal/operators/withLatestFrom'; -export { zipAll } from './internal/operators/zipAll'; -export { zipWith } from './internal/operators/zipWith'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/index.js.map b/node_modules/rxjs/dist/esm/index.js.map deleted file mode 100644 index c8082be..0000000 --- a/node_modules/rxjs/dist/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAGpF,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAG5E,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAChG,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGnD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGzE,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAG1E,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAG3D,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAGpD,cAAc,kBAAkB,CAAC;AAGjC,OAAO,EAAE,MAAM,EAAgB,MAAM,mBAAmB,CAAC;AAGzD,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAiB,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,OAAO,EAAkD,MAAM,8BAA8B,CAAC;AACvG,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,MAAM,EAAgB,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAe,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,KAAK,EAAe,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAqB,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAe,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAkB,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,OAAO,EAA8B,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/AnyCatcher.js b/node_modules/rxjs/dist/esm/internal/AnyCatcher.js deleted file mode 100644 index 4bc63fd..0000000 --- a/node_modules/rxjs/dist/esm/internal/AnyCatcher.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=AnyCatcher.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/AnyCatcher.js.map b/node_modules/rxjs/dist/esm/internal/AnyCatcher.js.map deleted file mode 100644 index 83e9e18..0000000 --- a/node_modules/rxjs/dist/esm/internal/AnyCatcher.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AnyCatcher.js","sourceRoot":"","sources":["../../../src/internal/AnyCatcher.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/AsyncSubject.js b/node_modules/rxjs/dist/esm/internal/AsyncSubject.js deleted file mode 100644 index b7a71a2..0000000 --- a/node_modules/rxjs/dist/esm/internal/AsyncSubject.js +++ /dev/null @@ -1,34 +0,0 @@ -import { Subject } from './Subject'; -export class AsyncSubject extends Subject { - constructor() { - super(...arguments); - this._value = null; - this._hasValue = false; - this._isComplete = false; - } - _checkFinalizedStatuses(subscriber) { - const { hasError, _hasValue, _value, thrownError, isStopped, _isComplete } = this; - if (hasError) { - subscriber.error(thrownError); - } - else if (isStopped || _isComplete) { - _hasValue && subscriber.next(_value); - subscriber.complete(); - } - } - next(value) { - if (!this.isStopped) { - this._value = value; - this._hasValue = true; - } - } - complete() { - const { _hasValue, _value, _isComplete } = this; - if (!_isComplete) { - this._isComplete = true; - _hasValue && super.next(_value); - super.complete(); - } - } -} -//# sourceMappingURL=AsyncSubject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/AsyncSubject.js.map b/node_modules/rxjs/dist/esm/internal/AsyncSubject.js.map deleted file mode 100644 index cc38641..0000000 --- a/node_modules/rxjs/dist/esm/internal/AsyncSubject.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AsyncSubject.js","sourceRoot":"","sources":["../../../src/internal/AsyncSubject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC,MAAM,OAAO,YAAgB,SAAQ,OAAU;IAA/C;;QACU,WAAM,GAAa,IAAI,CAAC;QACxB,cAAS,GAAG,KAAK,CAAC;QAClB,gBAAW,GAAG,KAAK,CAAC;IA4B9B,CAAC;IAzBW,uBAAuB,CAAC,UAAyB;QACzD,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;QAClF,IAAI,QAAQ,EAAE;YACZ,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;SAC/B;aAAM,IAAI,SAAS,IAAI,WAAW,EAAE;YACnC,SAAS,IAAI,UAAU,CAAC,IAAI,CAAC,MAAO,CAAC,CAAC;YACtC,UAAU,CAAC,QAAQ,EAAE,CAAC;SACvB;IACH,CAAC;IAED,IAAI,CAAC,KAAQ;QACX,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACnB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;SACvB;IACH,CAAC;IAED,QAAQ;QACN,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;QAChD,IAAI,CAAC,WAAW,EAAE;YAChB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;YACxB,SAAS,IAAI,KAAK,CAAC,IAAI,CAAC,MAAO,CAAC,CAAC;YACjC,KAAK,CAAC,QAAQ,EAAE,CAAC;SAClB;IACH,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/BehaviorSubject.js b/node_modules/rxjs/dist/esm/internal/BehaviorSubject.js deleted file mode 100644 index b9d4f6c..0000000 --- a/node_modules/rxjs/dist/esm/internal/BehaviorSubject.js +++ /dev/null @@ -1,27 +0,0 @@ -import { Subject } from './Subject'; -export class BehaviorSubject extends Subject { - constructor(_value) { - super(); - this._value = _value; - } - get value() { - return this.getValue(); - } - _subscribe(subscriber) { - const subscription = super._subscribe(subscriber); - !subscription.closed && subscriber.next(this._value); - return subscription; - } - getValue() { - const { hasError, thrownError, _value } = this; - if (hasError) { - throw thrownError; - } - this._throwIfClosed(); - return _value; - } - next(value) { - super.next((this._value = value)); - } -} -//# sourceMappingURL=BehaviorSubject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/BehaviorSubject.js.map b/node_modules/rxjs/dist/esm/internal/BehaviorSubject.js.map deleted file mode 100644 index 0404811..0000000 --- a/node_modules/rxjs/dist/esm/internal/BehaviorSubject.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BehaviorSubject.js","sourceRoot":"","sources":["../../../src/internal/BehaviorSubject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,MAAM,OAAO,eAAmB,SAAQ,OAAU;IAChD,YAAoB,MAAS;QAC3B,KAAK,EAAE,CAAC;QADU,WAAM,GAAN,MAAM,CAAG;IAE7B,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;IACzB,CAAC;IAGS,UAAU,CAAC,UAAyB;QAC5C,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QAClD,CAAC,YAAY,CAAC,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACrD,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,QAAQ;QACN,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QAC/C,IAAI,QAAQ,EAAE;YACZ,MAAM,WAAW,CAAC;SACnB;QACD,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,IAAI,CAAC,KAAQ;QACX,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC;IACpC,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Notification.js b/node_modules/rxjs/dist/esm/internal/Notification.js deleted file mode 100644 index 2ea4395..0000000 --- a/node_modules/rxjs/dist/esm/internal/Notification.js +++ /dev/null @@ -1,70 +0,0 @@ -import { EMPTY } from './observable/empty'; -import { of } from './observable/of'; -import { throwError } from './observable/throwError'; -import { isFunction } from './util/isFunction'; -export var NotificationKind; -(function (NotificationKind) { - NotificationKind["NEXT"] = "N"; - NotificationKind["ERROR"] = "E"; - NotificationKind["COMPLETE"] = "C"; -})(NotificationKind || (NotificationKind = {})); -export class Notification { - constructor(kind, value, error) { - this.kind = kind; - this.value = value; - this.error = error; - this.hasValue = kind === 'N'; - } - observe(observer) { - return observeNotification(this, observer); - } - do(nextHandler, errorHandler, completeHandler) { - const { kind, value, error } = this; - return kind === 'N' ? nextHandler === null || nextHandler === void 0 ? void 0 : nextHandler(value) : kind === 'E' ? errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler(error) : completeHandler === null || completeHandler === void 0 ? void 0 : completeHandler(); - } - accept(nextOrObserver, error, complete) { - var _a; - return isFunction((_a = nextOrObserver) === null || _a === void 0 ? void 0 : _a.next) - ? this.observe(nextOrObserver) - : this.do(nextOrObserver, error, complete); - } - toObservable() { - const { kind, value, error } = this; - const result = kind === 'N' - ? - of(value) - : - kind === 'E' - ? - throwError(() => error) - : - kind === 'C' - ? - EMPTY - : - 0; - if (!result) { - throw new TypeError(`Unexpected notification kind ${kind}`); - } - return result; - } - static createNext(value) { - return new Notification('N', value); - } - static createError(err) { - return new Notification('E', undefined, err); - } - static createComplete() { - return Notification.completeNotification; - } -} -Notification.completeNotification = new Notification('C'); -export function observeNotification(notification, observer) { - var _a, _b, _c; - const { kind, value, error } = notification; - if (typeof kind !== 'string') { - throw new TypeError('Invalid notification, missing "kind"'); - } - kind === 'N' ? (_a = observer.next) === null || _a === void 0 ? void 0 : _a.call(observer, value) : kind === 'E' ? (_b = observer.error) === null || _b === void 0 ? void 0 : _b.call(observer, error) : (_c = observer.complete) === null || _c === void 0 ? void 0 : _c.call(observer); -} -//# sourceMappingURL=Notification.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Notification.js.map b/node_modules/rxjs/dist/esm/internal/Notification.js.map deleted file mode 100644 index 6e540cc..0000000 --- a/node_modules/rxjs/dist/esm/internal/Notification.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Notification.js","sourceRoot":"","sources":["../../../src/internal/Notification.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAO/C,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,8BAAU,CAAA;IACV,+BAAW,CAAA;IACX,kCAAc,CAAA;AAChB,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B;AAkBD,MAAM,OAAO,YAAY;IA6BvB,YAA4B,IAAqB,EAAkB,KAAS,EAAkB,KAAW;QAA7E,SAAI,GAAJ,IAAI,CAAiB;QAAkB,UAAK,GAAL,KAAK,CAAI;QAAkB,UAAK,GAAL,KAAK,CAAM;QACvG,IAAI,CAAC,QAAQ,GAAG,IAAI,KAAK,GAAG,CAAC;IAC/B,CAAC;IAQD,OAAO,CAAC,QAA4B;QAClC,OAAO,mBAAmB,CAAC,IAAiC,EAAE,QAAQ,CAAC,CAAC;IAC1E,CAAC;IA4BD,EAAE,CAAC,WAA+B,EAAE,YAAiC,EAAE,eAA4B;QACjG,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;QACpC,OAAO,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAG,KAAM,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAG,KAAK,CAAC,CAAC,CAAC,CAAC,eAAe,aAAf,eAAe,uBAAf,eAAe,EAAI,CAAC;IAC3G,CAAC;IAqCD,MAAM,CAAC,cAAyD,EAAE,KAA0B,EAAE,QAAqB;;QACjH,OAAO,UAAU,CAAC,MAAC,cAAsB,0CAAE,IAAI,CAAC;YAC9C,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,cAAoC,CAAC;YACpD,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,cAAoC,EAAE,KAAY,EAAE,QAAe,CAAC,CAAC;IACnF,CAAC;IASD,YAAY;QACV,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;QAEpC,MAAM,MAAM,GACV,IAAI,KAAK,GAAG;YACV,CAAC;gBACC,EAAE,CAAC,KAAM,CAAC;YACZ,CAAC;gBACD,IAAI,KAAK,GAAG;oBACZ,CAAC;wBACC,UAAU,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC;oBACzB,CAAC;wBACD,IAAI,KAAK,GAAG;4BACZ,CAAC;gCACC,KAAK;4BACP,CAAC;gCACC,CAAC,CAAC;QACR,IAAI,CAAC,MAAM,EAAE;YAIX,MAAM,IAAI,SAAS,CAAC,gCAAgC,IAAI,EAAE,CAAC,CAAC;SAC7D;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAaD,MAAM,CAAC,UAAU,CAAI,KAAQ;QAC3B,OAAO,IAAI,YAAY,CAAC,GAAG,EAAE,KAAK,CAA0C,CAAC;IAC/E,CAAC;IAYD,MAAM,CAAC,WAAW,CAAC,GAAS;QAC1B,OAAO,IAAI,YAAY,CAAC,GAAG,EAAE,SAAS,EAAE,GAAG,CAA4C,CAAC;IAC1F,CAAC;IAUD,MAAM,CAAC,cAAc;QACnB,OAAO,YAAY,CAAC,oBAAoB,CAAC;IAC3C,CAAC;;AAvCc,iCAAoB,GAAG,IAAI,YAAY,CAAC,GAAG,CAA+C,CAAC;AAiD5G,MAAM,UAAU,mBAAmB,CAAI,YAAuC,EAAE,QAA4B;;IAC1G,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,YAAmB,CAAC;IACnD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC5B,MAAM,IAAI,SAAS,CAAC,sCAAsC,CAAC,CAAC;KAC7D;IACD,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,MAAA,QAAQ,CAAC,IAAI,+CAAb,QAAQ,EAAQ,KAAM,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,MAAA,QAAQ,CAAC,KAAK,+CAAd,QAAQ,EAAS,KAAK,CAAC,CAAC,CAAC,CAAC,MAAA,QAAQ,CAAC,QAAQ,+CAAjB,QAAQ,CAAa,CAAC;AAC1G,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/NotificationFactories.js b/node_modules/rxjs/dist/esm/internal/NotificationFactories.js deleted file mode 100644 index 536f265..0000000 --- a/node_modules/rxjs/dist/esm/internal/NotificationFactories.js +++ /dev/null @@ -1,15 +0,0 @@ -export const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined))(); -export function errorNotification(error) { - return createNotification('E', undefined, error); -} -export function nextNotification(value) { - return createNotification('N', value, undefined); -} -export function createNotification(kind, value, error) { - return { - kind, - value, - error, - }; -} -//# sourceMappingURL=NotificationFactories.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/NotificationFactories.js.map b/node_modules/rxjs/dist/esm/internal/NotificationFactories.js.map deleted file mode 100644 index 12f4c42..0000000 --- a/node_modules/rxjs/dist/esm/internal/NotificationFactories.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NotificationFactories.js","sourceRoot":"","sources":["../../../src/internal/NotificationFactories.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,GAAG,EAAE,SAAS,EAAE,SAAS,CAAyB,CAAC,EAAE,CAAC;AAOrH,MAAM,UAAU,iBAAiB,CAAC,KAAU;IAC1C,OAAO,kBAAkB,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,CAAQ,CAAC;AAC1D,CAAC;AAOD,MAAM,UAAU,gBAAgB,CAAI,KAAQ;IAC1C,OAAO,kBAAkB,CAAC,GAAG,EAAE,KAAK,EAAE,SAAS,CAAwB,CAAC;AAC1E,CAAC;AAQD,MAAM,UAAU,kBAAkB,CAAC,IAAqB,EAAE,KAAU,EAAE,KAAU;IAC9E,OAAO;QACL,IAAI;QACJ,KAAK;QACL,KAAK;KACN,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Observable.js b/node_modules/rxjs/dist/esm/internal/Observable.js deleted file mode 100644 index a0370b2..0000000 --- a/node_modules/rxjs/dist/esm/internal/Observable.js +++ /dev/null @@ -1,93 +0,0 @@ -import { SafeSubscriber, Subscriber } from './Subscriber'; -import { isSubscription } from './Subscription'; -import { observable as Symbol_observable } from './symbol/observable'; -import { pipeFromArray } from './util/pipe'; -import { config } from './config'; -import { isFunction } from './util/isFunction'; -import { errorContext } from './util/errorContext'; -export class Observable { - constructor(subscribe) { - if (subscribe) { - this._subscribe = subscribe; - } - } - lift(operator) { - const observable = new Observable(); - observable.source = this; - observable.operator = operator; - return observable; - } - subscribe(observerOrNext, error, complete) { - const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete); - errorContext(() => { - const { operator, source } = this; - subscriber.add(operator - ? - operator.call(subscriber, source) - : source - ? - this._subscribe(subscriber) - : - this._trySubscribe(subscriber)); - }); - return subscriber; - } - _trySubscribe(sink) { - try { - return this._subscribe(sink); - } - catch (err) { - sink.error(err); - } - } - forEach(next, promiseCtor) { - promiseCtor = getPromiseCtor(promiseCtor); - return new promiseCtor((resolve, reject) => { - const subscriber = new SafeSubscriber({ - next: (value) => { - try { - next(value); - } - catch (err) { - reject(err); - subscriber.unsubscribe(); - } - }, - error: reject, - complete: resolve, - }); - this.subscribe(subscriber); - }); - } - _subscribe(subscriber) { - var _a; - return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber); - } - [Symbol_observable]() { - return this; - } - pipe(...operations) { - return pipeFromArray(operations)(this); - } - toPromise(promiseCtor) { - promiseCtor = getPromiseCtor(promiseCtor); - return new promiseCtor((resolve, reject) => { - let value; - this.subscribe((x) => (value = x), (err) => reject(err), () => resolve(value)); - }); - } -} -Observable.create = (subscribe) => { - return new Observable(subscribe); -}; -function getPromiseCtor(promiseCtor) { - var _a; - return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise; -} -function isObserver(value) { - return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete); -} -function isSubscriber(value) { - return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value)); -} -//# sourceMappingURL=Observable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Observable.js.map b/node_modules/rxjs/dist/esm/internal/Observable.js.map deleted file mode 100644 index 5526b64..0000000 --- a/node_modules/rxjs/dist/esm/internal/Observable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Observable.js","sourceRoot":"","sources":["../../../src/internal/Observable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAgB,MAAM,gBAAgB,CAAC;AAE9D,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAMnD,MAAM,OAAO,UAAU;IAiBrB,YAAY,SAA6E;QACvF,IAAI,SAAS,EAAE;YACb,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;SAC7B;IACH,CAAC;IAwBD,IAAI,CAAI,QAAyB;QAC/B,MAAM,UAAU,GAAG,IAAI,UAAU,EAAK,CAAC;QACvC,UAAU,CAAC,MAAM,GAAG,IAAI,CAAC;QACzB,UAAU,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC/B,OAAO,UAAU,CAAC;IACpB,CAAC;IA2ID,SAAS,CACP,cAAmE,EACnE,KAAqC,EACrC,QAA8B;QAE9B,MAAM,UAAU,GAAG,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,cAAc,CAAC,cAAc,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;QAEvH,YAAY,CAAC,GAAG,EAAE;YAChB,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;YAClC,UAAU,CAAC,GAAG,CACZ,QAAQ;gBACN,CAAC;oBAEC,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC;gBACnC,CAAC,CAAC,MAAM;oBACR,CAAC;wBAGC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;oBAC7B,CAAC;wBAEC,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CACnC,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,OAAO,UAAU,CAAC;IACpB,CAAC;IAGS,aAAa,CAAC,IAAmB;QACzC,IAAI;YACF,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;SAC9B;QAAC,OAAO,GAAG,EAAE;YAIZ,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SACjB;IACH,CAAC;IA6DD,OAAO,CAAC,IAAwB,EAAE,WAAoC;QACpE,WAAW,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;QAE1C,OAAO,IAAI,WAAW,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC/C,MAAM,UAAU,GAAG,IAAI,cAAc,CAAI;gBACvC,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE;oBACd,IAAI;wBACF,IAAI,CAAC,KAAK,CAAC,CAAC;qBACb;oBAAC,OAAO,GAAG,EAAE;wBACZ,MAAM,CAAC,GAAG,CAAC,CAAC;wBACZ,UAAU,CAAC,WAAW,EAAE,CAAC;qBAC1B;gBACH,CAAC;gBACD,KAAK,EAAE,MAAM;gBACb,QAAQ,EAAE,OAAO;aAClB,CAAC,CAAC;YACH,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC7B,CAAC,CAAkB,CAAC;IACtB,CAAC;IAGS,UAAU,CAAC,UAA2B;;QAC9C,OAAO,MAAA,IAAI,CAAC,MAAM,0CAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IAC5C,CAAC;IAMD,CAAC,iBAAiB,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IA4FD,IAAI,CAAC,GAAG,UAAwC;QAC9C,OAAO,aAAa,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IA4BD,SAAS,CAAC,WAAoC;QAC5C,WAAW,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;QAE1C,OAAO,IAAI,WAAW,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACzC,IAAI,KAAoB,CAAC;YACzB,IAAI,CAAC,SAAS,CACZ,CAAC,CAAI,EAAE,EAAE,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,EACrB,CAAC,GAAQ,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,EACzB,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CACrB,CAAC;QACJ,CAAC,CAA2B,CAAC;IAC/B,CAAC;;AAraM,iBAAM,GAA4B,CAAI,SAAwD,EAAE,EAAE;IACvG,OAAO,IAAI,UAAU,CAAI,SAAS,CAAC,CAAC;AACtC,CAAC,CAAC;AA6aJ,SAAS,cAAc,CAAC,WAA+C;;IACrE,OAAO,MAAA,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,MAAM,CAAC,OAAO,mCAAI,OAAO,CAAC;AAClD,CAAC;AAED,SAAS,UAAU,CAAI,KAAU;IAC/B,OAAO,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAClG,CAAC;AAED,SAAS,YAAY,CAAI,KAAU;IACjC,OAAO,CAAC,KAAK,IAAI,KAAK,YAAY,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;AAChG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Operator.js b/node_modules/rxjs/dist/esm/internal/Operator.js deleted file mode 100644 index b9b664f..0000000 --- a/node_modules/rxjs/dist/esm/internal/Operator.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=Operator.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Operator.js.map b/node_modules/rxjs/dist/esm/internal/Operator.js.map deleted file mode 100644 index 7401e0c..0000000 --- a/node_modules/rxjs/dist/esm/internal/Operator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Operator.js","sourceRoot":"","sources":["../../../src/internal/Operator.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/ReplaySubject.js b/node_modules/rxjs/dist/esm/internal/ReplaySubject.js deleted file mode 100644 index 630f426..0000000 --- a/node_modules/rxjs/dist/esm/internal/ReplaySubject.js +++ /dev/null @@ -1,50 +0,0 @@ -import { Subject } from './Subject'; -import { dateTimestampProvider } from './scheduler/dateTimestampProvider'; -export class ReplaySubject extends Subject { - constructor(_bufferSize = Infinity, _windowTime = Infinity, _timestampProvider = dateTimestampProvider) { - super(); - this._bufferSize = _bufferSize; - this._windowTime = _windowTime; - this._timestampProvider = _timestampProvider; - this._buffer = []; - this._infiniteTimeWindow = true; - this._infiniteTimeWindow = _windowTime === Infinity; - this._bufferSize = Math.max(1, _bufferSize); - this._windowTime = Math.max(1, _windowTime); - } - next(value) { - const { isStopped, _buffer, _infiniteTimeWindow, _timestampProvider, _windowTime } = this; - if (!isStopped) { - _buffer.push(value); - !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime); - } - this._trimBuffer(); - super.next(value); - } - _subscribe(subscriber) { - this._throwIfClosed(); - this._trimBuffer(); - const subscription = this._innerSubscribe(subscriber); - const { _infiniteTimeWindow, _buffer } = this; - const copy = _buffer.slice(); - for (let i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) { - subscriber.next(copy[i]); - } - this._checkFinalizedStatuses(subscriber); - return subscription; - } - _trimBuffer() { - const { _bufferSize, _timestampProvider, _buffer, _infiniteTimeWindow } = this; - const adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize; - _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize); - if (!_infiniteTimeWindow) { - const now = _timestampProvider.now(); - let last = 0; - for (let i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) { - last = i; - } - last && _buffer.splice(0, last + 1); - } - } -} -//# sourceMappingURL=ReplaySubject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/ReplaySubject.js.map b/node_modules/rxjs/dist/esm/internal/ReplaySubject.js.map deleted file mode 100644 index d8004b8..0000000 --- a/node_modules/rxjs/dist/esm/internal/ReplaySubject.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ReplaySubject.js","sourceRoot":"","sources":["../../../src/internal/ReplaySubject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAgC1E,MAAM,OAAO,aAAiB,SAAQ,OAAU;IAU9C,YACU,cAAc,QAAQ,EACtB,cAAc,QAAQ,EACtB,qBAAwC,qBAAqB;QAErE,KAAK,EAAE,CAAC;QAJA,gBAAW,GAAX,WAAW,CAAW;QACtB,gBAAW,GAAX,WAAW,CAAW;QACtB,uBAAkB,GAAlB,kBAAkB,CAA2C;QAZ/D,YAAO,GAAmB,EAAE,CAAC;QAC7B,wBAAmB,GAAG,IAAI,CAAC;QAcjC,IAAI,CAAC,mBAAmB,GAAG,WAAW,KAAK,QAAQ,CAAC;QACpD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;QAC5C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;IAC9C,CAAC;IAED,IAAI,CAAC,KAAQ;QACX,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;QAC1F,IAAI,CAAC,SAAS,EAAE;YACd,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACpB,CAAC,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,GAAG,WAAW,CAAC,CAAC;SAC9E;QACD,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;IAGS,UAAU,CAAC,UAAyB;QAC5C,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,IAAI,CAAC,WAAW,EAAE,CAAC;QAEnB,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QAEtD,MAAM,EAAE,mBAAmB,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;QAG9C,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;QAC7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,IAAI,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;YACvF,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAM,CAAC,CAAC;SAC/B;QAED,IAAI,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC;QAEzC,OAAO,YAAY,CAAC;IACtB,CAAC;IAEO,WAAW;QACjB,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,OAAO,EAAE,mBAAmB,EAAE,GAAG,IAAI,CAAC;QAK/E,MAAM,kBAAkB,GAAG,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC;QACvE,WAAW,GAAG,QAAQ,IAAI,kBAAkB,GAAG,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,GAAG,kBAAkB,CAAC,CAAC;QAIxH,IAAI,CAAC,mBAAmB,EAAE;YACxB,MAAM,GAAG,GAAG,kBAAkB,CAAC,GAAG,EAAE,CAAC;YACrC,IAAI,IAAI,GAAG,CAAC,CAAC;YAGb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,IAAK,OAAO,CAAC,CAAC,CAAY,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE;gBAC3E,IAAI,GAAG,CAAC,CAAC;aACV;YACD,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC;SACrC;IACH,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Scheduler.js b/node_modules/rxjs/dist/esm/internal/Scheduler.js deleted file mode 100644 index f803a78..0000000 --- a/node_modules/rxjs/dist/esm/internal/Scheduler.js +++ /dev/null @@ -1,12 +0,0 @@ -import { dateTimestampProvider } from './scheduler/dateTimestampProvider'; -export class Scheduler { - constructor(schedulerActionCtor, now = Scheduler.now) { - this.schedulerActionCtor = schedulerActionCtor; - this.now = now; - } - schedule(work, delay = 0, state) { - return new this.schedulerActionCtor(this, work).schedule(state, delay); - } -} -Scheduler.now = dateTimestampProvider.now; -//# sourceMappingURL=Scheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Scheduler.js.map b/node_modules/rxjs/dist/esm/internal/Scheduler.js.map deleted file mode 100644 index d28de5c..0000000 --- a/node_modules/rxjs/dist/esm/internal/Scheduler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Scheduler.js","sourceRoot":"","sources":["../../../src/internal/Scheduler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAoB1E,MAAM,OAAO,SAAS;IAGpB,YAAoB,mBAAkC,EAAE,MAAoB,SAAS,CAAC,GAAG;QAArE,wBAAmB,GAAnB,mBAAmB,CAAe;QACpD,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IA4BM,QAAQ,CAAI,IAAmD,EAAE,QAAgB,CAAC,EAAE,KAAS;QAClG,OAAO,IAAI,IAAI,CAAC,mBAAmB,CAAI,IAAI,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC5E,CAAC;;AAlCa,aAAG,GAAiB,qBAAqB,CAAC,GAAG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Subject.js b/node_modules/rxjs/dist/esm/internal/Subject.js deleted file mode 100644 index 4295f07..0000000 --- a/node_modules/rxjs/dist/esm/internal/Subject.js +++ /dev/null @@ -1,134 +0,0 @@ -import { Observable } from './Observable'; -import { Subscription, EMPTY_SUBSCRIPTION } from './Subscription'; -import { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError'; -import { arrRemove } from './util/arrRemove'; -import { errorContext } from './util/errorContext'; -export class Subject extends Observable { - constructor() { - super(); - this.closed = false; - this.currentObservers = null; - this.observers = []; - this.isStopped = false; - this.hasError = false; - this.thrownError = null; - } - lift(operator) { - const subject = new AnonymousSubject(this, this); - subject.operator = operator; - return subject; - } - _throwIfClosed() { - if (this.closed) { - throw new ObjectUnsubscribedError(); - } - } - next(value) { - errorContext(() => { - this._throwIfClosed(); - if (!this.isStopped) { - if (!this.currentObservers) { - this.currentObservers = Array.from(this.observers); - } - for (const observer of this.currentObservers) { - observer.next(value); - } - } - }); - } - error(err) { - errorContext(() => { - this._throwIfClosed(); - if (!this.isStopped) { - this.hasError = this.isStopped = true; - this.thrownError = err; - const { observers } = this; - while (observers.length) { - observers.shift().error(err); - } - } - }); - } - complete() { - errorContext(() => { - this._throwIfClosed(); - if (!this.isStopped) { - this.isStopped = true; - const { observers } = this; - while (observers.length) { - observers.shift().complete(); - } - } - }); - } - unsubscribe() { - this.isStopped = this.closed = true; - this.observers = this.currentObservers = null; - } - get observed() { - var _a; - return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0; - } - _trySubscribe(subscriber) { - this._throwIfClosed(); - return super._trySubscribe(subscriber); - } - _subscribe(subscriber) { - this._throwIfClosed(); - this._checkFinalizedStatuses(subscriber); - return this._innerSubscribe(subscriber); - } - _innerSubscribe(subscriber) { - const { hasError, isStopped, observers } = this; - if (hasError || isStopped) { - return EMPTY_SUBSCRIPTION; - } - this.currentObservers = null; - observers.push(subscriber); - return new Subscription(() => { - this.currentObservers = null; - arrRemove(observers, subscriber); - }); - } - _checkFinalizedStatuses(subscriber) { - const { hasError, thrownError, isStopped } = this; - if (hasError) { - subscriber.error(thrownError); - } - else if (isStopped) { - subscriber.complete(); - } - } - asObservable() { - const observable = new Observable(); - observable.source = this; - return observable; - } -} -Subject.create = (destination, source) => { - return new AnonymousSubject(destination, source); -}; -export class AnonymousSubject extends Subject { - constructor(destination, source) { - super(); - this.destination = destination; - this.source = source; - } - next(value) { - var _a, _b; - (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value); - } - error(err) { - var _a, _b; - (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err); - } - complete() { - var _a, _b; - (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a); - } - _subscribe(subscriber) { - var _a, _b; - return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION; - } -} -//# sourceMappingURL=Subject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Subject.js.map b/node_modules/rxjs/dist/esm/internal/Subject.js.map deleted file mode 100644 index 3ff79b2..0000000 --- a/node_modules/rxjs/dist/esm/internal/Subject.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Subject.js","sourceRoot":"","sources":["../../../src/internal/Subject.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAElE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AASnD,MAAM,OAAO,OAAW,SAAQ,UAAa;IAuB3C;QAEE,KAAK,EAAE,CAAC;QAxBV,WAAM,GAAG,KAAK,CAAC;QAEP,qBAAgB,GAAyB,IAAI,CAAC;QAGtD,cAAS,GAAkB,EAAE,CAAC;QAE9B,cAAS,GAAG,KAAK,CAAC;QAElB,aAAQ,GAAG,KAAK,CAAC;QAEjB,gBAAW,GAAQ,IAAI,CAAC;IAcxB,CAAC;IAGD,IAAI,CAAI,QAAwB;QAC9B,MAAM,OAAO,GAAG,IAAI,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACjD,OAAO,CAAC,QAAQ,GAAG,QAAe,CAAC;QACnC,OAAO,OAAc,CAAC;IACxB,CAAC;IAGS,cAAc;QACtB,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,MAAM,IAAI,uBAAuB,EAAE,CAAC;SACrC;IACH,CAAC;IAED,IAAI,CAAC,KAAQ;QACX,YAAY,CAAC,GAAG,EAAE;YAChB,IAAI,CAAC,cAAc,EAAE,CAAC;YACtB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;gBACnB,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE;oBAC1B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;iBACpD;gBACD,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,gBAAgB,EAAE;oBAC5C,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBACtB;aACF;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,GAAQ;QACZ,YAAY,CAAC,GAAG,EAAE;YAChB,IAAI,CAAC,cAAc,EAAE,CAAC;YACtB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;gBACnB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;gBACtC,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC;gBACvB,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;gBAC3B,OAAO,SAAS,CAAC,MAAM,EAAE;oBACvB,SAAS,CAAC,KAAK,EAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBAC/B;aACF;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,QAAQ;QACN,YAAY,CAAC,GAAG,EAAE;YAChB,IAAI,CAAC,cAAc,EAAE,CAAC;YACtB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;gBACnB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;gBACtB,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;gBAC3B,OAAO,SAAS,CAAC,MAAM,EAAE;oBACvB,SAAS,CAAC,KAAK,EAAG,CAAC,QAAQ,EAAE,CAAC;iBAC/B;aACF;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,WAAW;QACT,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACpC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,gBAAgB,GAAG,IAAK,CAAC;IACjD,CAAC;IAED,IAAI,QAAQ;;QACV,OAAO,CAAA,MAAA,IAAI,CAAC,SAAS,0CAAE,MAAM,IAAG,CAAC,CAAC;IACpC,CAAC;IAGS,aAAa,CAAC,UAAyB;QAC/C,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,OAAO,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IACzC,CAAC;IAGS,UAAU,CAAC,UAAyB;QAC5C,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,IAAI,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC;QACzC,OAAO,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;IAC1C,CAAC;IAGS,eAAe,CAAC,UAA2B;QACnD,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;QAChD,IAAI,QAAQ,IAAI,SAAS,EAAE;YACzB,OAAO,kBAAkB,CAAC;SAC3B;QACD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;QAC7B,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC3B,OAAO,IAAI,YAAY,CAAC,GAAG,EAAE;YAC3B,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;YAC7B,SAAS,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;IACL,CAAC;IAGS,uBAAuB,CAAC,UAA2B;QAC3D,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;QAClD,IAAI,QAAQ,EAAE;YACZ,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;SAC/B;aAAM,IAAI,SAAS,EAAE;YACpB,UAAU,CAAC,QAAQ,EAAE,CAAC;SACvB;IACH,CAAC;IAQD,YAAY;QACV,MAAM,UAAU,GAAQ,IAAI,UAAU,EAAK,CAAC;QAC5C,UAAU,CAAC,MAAM,GAAG,IAAI,CAAC;QACzB,OAAO,UAAU,CAAC;IACpB,CAAC;;AAxHM,cAAM,GAA4B,CAAI,WAAwB,EAAE,MAAqB,EAAuB,EAAE;IACnH,OAAO,IAAI,gBAAgB,CAAI,WAAW,EAAE,MAAM,CAAC,CAAC;AACtD,CAAC,CAAC;AAyHJ,MAAM,OAAO,gBAAoB,SAAQ,OAAU;IACjD,YAES,WAAyB,EAChC,MAAsB;QAEtB,KAAK,EAAE,CAAC;QAHD,gBAAW,GAAX,WAAW,CAAc;QAIhC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,IAAI,CAAC,KAAQ;;QACX,MAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,IAAI,mDAAG,KAAK,CAAC,CAAC;IAClC,CAAC;IAED,KAAK,CAAC,GAAQ;;QACZ,MAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,KAAK,mDAAG,GAAG,CAAC,CAAC;IACjC,CAAC;IAED,QAAQ;;QACN,MAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,QAAQ,kDAAI,CAAC;IACjC,CAAC;IAGS,UAAU,CAAC,UAAyB;;QAC5C,OAAO,MAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,SAAS,CAAC,UAAU,CAAC,mCAAI,kBAAkB,CAAC;IAClE,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Subscriber.js b/node_modules/rxjs/dist/esm/internal/Subscriber.js deleted file mode 100644 index 550efe4..0000000 --- a/node_modules/rxjs/dist/esm/internal/Subscriber.js +++ /dev/null @@ -1,174 +0,0 @@ -import { isFunction } from './util/isFunction'; -import { isSubscription, Subscription } from './Subscription'; -import { config } from './config'; -import { reportUnhandledError } from './util/reportUnhandledError'; -import { noop } from './util/noop'; -import { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories'; -import { timeoutProvider } from './scheduler/timeoutProvider'; -import { captureError } from './util/errorContext'; -export class Subscriber extends Subscription { - constructor(destination) { - super(); - this.isStopped = false; - if (destination) { - this.destination = destination; - if (isSubscription(destination)) { - destination.add(this); - } - } - else { - this.destination = EMPTY_OBSERVER; - } - } - static create(next, error, complete) { - return new SafeSubscriber(next, error, complete); - } - next(value) { - if (this.isStopped) { - handleStoppedNotification(nextNotification(value), this); - } - else { - this._next(value); - } - } - error(err) { - if (this.isStopped) { - handleStoppedNotification(errorNotification(err), this); - } - else { - this.isStopped = true; - this._error(err); - } - } - complete() { - if (this.isStopped) { - handleStoppedNotification(COMPLETE_NOTIFICATION, this); - } - else { - this.isStopped = true; - this._complete(); - } - } - unsubscribe() { - if (!this.closed) { - this.isStopped = true; - super.unsubscribe(); - this.destination = null; - } - } - _next(value) { - this.destination.next(value); - } - _error(err) { - try { - this.destination.error(err); - } - finally { - this.unsubscribe(); - } - } - _complete() { - try { - this.destination.complete(); - } - finally { - this.unsubscribe(); - } - } -} -const _bind = Function.prototype.bind; -function bind(fn, thisArg) { - return _bind.call(fn, thisArg); -} -class ConsumerObserver { - constructor(partialObserver) { - this.partialObserver = partialObserver; - } - next(value) { - const { partialObserver } = this; - if (partialObserver.next) { - try { - partialObserver.next(value); - } - catch (error) { - handleUnhandledError(error); - } - } - } - error(err) { - const { partialObserver } = this; - if (partialObserver.error) { - try { - partialObserver.error(err); - } - catch (error) { - handleUnhandledError(error); - } - } - else { - handleUnhandledError(err); - } - } - complete() { - const { partialObserver } = this; - if (partialObserver.complete) { - try { - partialObserver.complete(); - } - catch (error) { - handleUnhandledError(error); - } - } - } -} -export class SafeSubscriber extends Subscriber { - constructor(observerOrNext, error, complete) { - super(); - let partialObserver; - if (isFunction(observerOrNext) || !observerOrNext) { - partialObserver = { - next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined), - error: error !== null && error !== void 0 ? error : undefined, - complete: complete !== null && complete !== void 0 ? complete : undefined, - }; - } - else { - let context; - if (this && config.useDeprecatedNextContext) { - context = Object.create(observerOrNext); - context.unsubscribe = () => this.unsubscribe(); - partialObserver = { - next: observerOrNext.next && bind(observerOrNext.next, context), - error: observerOrNext.error && bind(observerOrNext.error, context), - complete: observerOrNext.complete && bind(observerOrNext.complete, context), - }; - } - else { - partialObserver = observerOrNext; - } - } - this.destination = new ConsumerObserver(partialObserver); - } -} -function handleUnhandledError(error) { - if (config.useDeprecatedSynchronousErrorHandling) { - captureError(error); - } - else { - reportUnhandledError(error); - } -} -function defaultErrorHandler(err) { - throw err; -} -function handleStoppedNotification(notification, subscriber) { - const { onStoppedNotification } = config; - onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber)); -} -export const EMPTY_OBSERVER = { - closed: true, - next: noop, - error: defaultErrorHandler, - complete: noop, -}; -//# sourceMappingURL=Subscriber.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Subscriber.js.map b/node_modules/rxjs/dist/esm/internal/Subscriber.js.map deleted file mode 100644 index 74b183d..0000000 --- a/node_modules/rxjs/dist/esm/internal/Subscriber.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Subscriber.js","sourceRoot":"","sources":["../../../src/internal/Subscriber.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrG,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAUnD,MAAM,OAAO,UAAc,SAAQ,YAAY;IA4B7C,YAAY,WAA6C;QACvD,KAAK,EAAE,CAAC;QATA,cAAS,GAAY,KAAK,CAAC;QAUnC,IAAI,WAAW,EAAE;YACf,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;YAG/B,IAAI,cAAc,CAAC,WAAW,CAAC,EAAE;gBAC/B,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;aACvB;SACF;aAAM;YACL,IAAI,CAAC,WAAW,GAAG,cAAc,CAAC;SACnC;IACH,CAAC;IAzBD,MAAM,CAAC,MAAM,CAAI,IAAsB,EAAE,KAAyB,EAAE,QAAqB;QACvF,OAAO,IAAI,cAAc,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IACnD,CAAC;IA+BD,IAAI,CAAC,KAAQ;QACX,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,yBAAyB,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC;SAC1D;aAAM;YACL,IAAI,CAAC,KAAK,CAAC,KAAM,CAAC,CAAC;SACpB;IACH,CAAC;IAQD,KAAK,CAAC,GAAS;QACb,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,yBAAyB,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;SACzD;aAAM;YACL,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;SAClB;IACH,CAAC;IAOD,QAAQ;QACN,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,yBAAyB,CAAC,qBAAqB,EAAE,IAAI,CAAC,CAAC;SACxD;aAAM;YACL,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,IAAI,CAAC,SAAS,EAAE,CAAC;SAClB;IACH,CAAC;IAED,WAAW;QACT,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,KAAK,CAAC,WAAW,EAAE,CAAC;YACpB,IAAI,CAAC,WAAW,GAAG,IAAK,CAAC;SAC1B;IACH,CAAC;IAES,KAAK,CAAC,KAAQ;QACtB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAES,MAAM,CAAC,GAAQ;QACvB,IAAI;YACF,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SAC7B;gBAAS;YACR,IAAI,CAAC,WAAW,EAAE,CAAC;SACpB;IACH,CAAC;IAES,SAAS;QACjB,IAAI;YACF,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;SAC7B;gBAAS;YACR,IAAI,CAAC,WAAW,EAAE,CAAC;SACpB;IACH,CAAC;CACF;AAOD,MAAM,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC;AAEtC,SAAS,IAAI,CAAqC,EAAM,EAAE,OAAY;IACpE,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;AACjC,CAAC;AAMD,MAAM,gBAAgB;IACpB,YAAoB,eAAqC;QAArC,oBAAe,GAAf,eAAe,CAAsB;IAAG,CAAC;IAE7D,IAAI,CAAC,KAAQ;QACX,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC;QACjC,IAAI,eAAe,CAAC,IAAI,EAAE;YACxB,IAAI;gBACF,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aAC7B;YAAC,OAAO,KAAK,EAAE;gBACd,oBAAoB,CAAC,KAAK,CAAC,CAAC;aAC7B;SACF;IACH,CAAC;IAED,KAAK,CAAC,GAAQ;QACZ,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC;QACjC,IAAI,eAAe,CAAC,KAAK,EAAE;YACzB,IAAI;gBACF,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aAC5B;YAAC,OAAO,KAAK,EAAE;gBACd,oBAAoB,CAAC,KAAK,CAAC,CAAC;aAC7B;SACF;aAAM;YACL,oBAAoB,CAAC,GAAG,CAAC,CAAC;SAC3B;IACH,CAAC;IAED,QAAQ;QACN,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC;QACjC,IAAI,eAAe,CAAC,QAAQ,EAAE;YAC5B,IAAI;gBACF,eAAe,CAAC,QAAQ,EAAE,CAAC;aAC5B;YAAC,OAAO,KAAK,EAAE;gBACd,oBAAoB,CAAC,KAAK,CAAC,CAAC;aAC7B;SACF;IACH,CAAC;CACF;AAED,MAAM,OAAO,cAAkB,SAAQ,UAAa;IAClD,YACE,cAAmE,EACnE,KAAkC,EAClC,QAA8B;QAE9B,KAAK,EAAE,CAAC;QAER,IAAI,eAAqC,CAAC;QAC1C,IAAI,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,cAAc,EAAE;YAGjD,eAAe,GAAG;gBAChB,IAAI,EAAE,CAAC,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,SAAS,CAAqC;gBACvE,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,SAAS;gBACzB,QAAQ,EAAE,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,SAAS;aAChC,CAAC;SACH;aAAM;YAEL,IAAI,OAAY,CAAC;YACjB,IAAI,IAAI,IAAI,MAAM,CAAC,wBAAwB,EAAE;gBAI3C,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;gBACxC,OAAO,CAAC,WAAW,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;gBAC/C,eAAe,GAAG;oBAChB,IAAI,EAAE,cAAc,CAAC,IAAI,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC;oBAC/D,KAAK,EAAE,cAAc,CAAC,KAAK,IAAI,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC;oBAClE,QAAQ,EAAE,cAAc,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,OAAO,CAAC;iBAC5E,CAAC;aACH;iBAAM;gBAEL,eAAe,GAAG,cAAc,CAAC;aAClC;SACF;QAID,IAAI,CAAC,WAAW,GAAG,IAAI,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAC3D,CAAC;CACF;AAED,SAAS,oBAAoB,CAAC,KAAU;IACtC,IAAI,MAAM,CAAC,qCAAqC,EAAE;QAChD,YAAY,CAAC,KAAK,CAAC,CAAC;KACrB;SAAM;QAGL,oBAAoB,CAAC,KAAK,CAAC,CAAC;KAC7B;AACH,CAAC;AAQD,SAAS,mBAAmB,CAAC,GAAQ;IACnC,MAAM,GAAG,CAAC;AACZ,CAAC;AAOD,SAAS,yBAAyB,CAAC,YAAyC,EAAE,UAA2B;IACvG,MAAM,EAAE,qBAAqB,EAAE,GAAG,MAAM,CAAC;IACzC,qBAAqB,IAAI,eAAe,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC;AAC7G,CAAC;AAOD,MAAM,CAAC,MAAM,cAAc,GAA+C;IACxE,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,mBAAmB;IAC1B,QAAQ,EAAE,IAAI;CACf,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Subscription.js b/node_modules/rxjs/dist/esm/internal/Subscription.js deleted file mode 100644 index 69835fb..0000000 --- a/node_modules/rxjs/dist/esm/internal/Subscription.js +++ /dev/null @@ -1,119 +0,0 @@ -import { isFunction } from './util/isFunction'; -import { UnsubscriptionError } from './util/UnsubscriptionError'; -import { arrRemove } from './util/arrRemove'; -export class Subscription { - constructor(initialTeardown) { - this.initialTeardown = initialTeardown; - this.closed = false; - this._parentage = null; - this._finalizers = null; - } - unsubscribe() { - let errors; - if (!this.closed) { - this.closed = true; - const { _parentage } = this; - if (_parentage) { - this._parentage = null; - if (Array.isArray(_parentage)) { - for (const parent of _parentage) { - parent.remove(this); - } - } - else { - _parentage.remove(this); - } - } - const { initialTeardown: initialFinalizer } = this; - if (isFunction(initialFinalizer)) { - try { - initialFinalizer(); - } - catch (e) { - errors = e instanceof UnsubscriptionError ? e.errors : [e]; - } - } - const { _finalizers } = this; - if (_finalizers) { - this._finalizers = null; - for (const finalizer of _finalizers) { - try { - execFinalizer(finalizer); - } - catch (err) { - errors = errors !== null && errors !== void 0 ? errors : []; - if (err instanceof UnsubscriptionError) { - errors = [...errors, ...err.errors]; - } - else { - errors.push(err); - } - } - } - } - if (errors) { - throw new UnsubscriptionError(errors); - } - } - } - add(teardown) { - var _a; - if (teardown && teardown !== this) { - if (this.closed) { - execFinalizer(teardown); - } - else { - if (teardown instanceof Subscription) { - if (teardown.closed || teardown._hasParent(this)) { - return; - } - teardown._addParent(this); - } - (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown); - } - } - } - _hasParent(parent) { - const { _parentage } = this; - return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent)); - } - _addParent(parent) { - const { _parentage } = this; - this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent; - } - _removeParent(parent) { - const { _parentage } = this; - if (_parentage === parent) { - this._parentage = null; - } - else if (Array.isArray(_parentage)) { - arrRemove(_parentage, parent); - } - } - remove(teardown) { - const { _finalizers } = this; - _finalizers && arrRemove(_finalizers, teardown); - if (teardown instanceof Subscription) { - teardown._removeParent(this); - } - } -} -Subscription.EMPTY = (() => { - const empty = new Subscription(); - empty.closed = true; - return empty; -})(); -export const EMPTY_SUBSCRIPTION = Subscription.EMPTY; -export function isSubscription(value) { - return (value instanceof Subscription || - (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe))); -} -function execFinalizer(finalizer) { - if (isFunction(finalizer)) { - finalizer(); - } - else { - finalizer.unsubscribe(); - } -} -//# sourceMappingURL=Subscription.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/Subscription.js.map b/node_modules/rxjs/dist/esm/internal/Subscription.js.map deleted file mode 100644 index 0becf7f..0000000 --- a/node_modules/rxjs/dist/esm/internal/Subscription.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Subscription.js","sourceRoot":"","sources":["../../../src/internal/Subscription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAY7C,MAAM,OAAO,YAAY;IAwBvB,YAAoB,eAA4B;QAA5B,oBAAe,GAAf,eAAe,CAAa;QAdzC,WAAM,GAAG,KAAK,CAAC;QAEd,eAAU,GAAyC,IAAI,CAAC;QAMxD,gBAAW,GAA0C,IAAI,CAAC;IAMf,CAAC;IAOpD,WAAW;QACT,IAAI,MAAyB,CAAC;QAE9B,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;YAGnB,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;YAC5B,IAAI,UAAU,EAAE;gBACd,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;gBACvB,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;oBAC7B,KAAK,MAAM,MAAM,IAAI,UAAU,EAAE;wBAC/B,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;qBACrB;iBACF;qBAAM;oBACL,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;iBACzB;aACF;YAED,MAAM,EAAE,eAAe,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAC;YACnD,IAAI,UAAU,CAAC,gBAAgB,CAAC,EAAE;gBAChC,IAAI;oBACF,gBAAgB,EAAE,CAAC;iBACpB;gBAAC,OAAO,CAAC,EAAE;oBACV,MAAM,GAAG,CAAC,YAAY,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;iBAC5D;aACF;YAED,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;YAC7B,IAAI,WAAW,EAAE;gBACf,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;gBACxB,KAAK,MAAM,SAAS,IAAI,WAAW,EAAE;oBACnC,IAAI;wBACF,aAAa,CAAC,SAAS,CAAC,CAAC;qBAC1B;oBAAC,OAAO,GAAG,EAAE;wBACZ,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAC;wBACtB,IAAI,GAAG,YAAY,mBAAmB,EAAE;4BACtC,MAAM,GAAG,CAAC,GAAG,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;yBACrC;6BAAM;4BACL,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;yBAClB;qBACF;iBACF;aACF;YAED,IAAI,MAAM,EAAE;gBACV,MAAM,IAAI,mBAAmB,CAAC,MAAM,CAAC,CAAC;aACvC;SACF;IACH,CAAC;IAoBD,GAAG,CAAC,QAAuB;;QAGzB,IAAI,QAAQ,IAAI,QAAQ,KAAK,IAAI,EAAE;YACjC,IAAI,IAAI,CAAC,MAAM,EAAE;gBAGf,aAAa,CAAC,QAAQ,CAAC,CAAC;aACzB;iBAAM;gBACL,IAAI,QAAQ,YAAY,YAAY,EAAE;oBAGpC,IAAI,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;wBAChD,OAAO;qBACR;oBACD,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;iBAC3B;gBACD,CAAC,IAAI,CAAC,WAAW,GAAG,MAAA,IAAI,CAAC,WAAW,mCAAI,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC5D;SACF;IACH,CAAC;IAOO,UAAU,CAAC,MAAoB;QACrC,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAC5B,OAAO,UAAU,KAAK,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7F,CAAC;IASO,UAAU,CAAC,MAAoB;QACrC,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACnI,CAAC;IAMO,aAAa,CAAC,MAAoB;QACxC,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAC5B,IAAI,UAAU,KAAK,MAAM,EAAE;YACzB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;SACxB;aAAM,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;YACpC,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;SAC/B;IACH,CAAC;IAgBD,MAAM,CAAC,QAAsC;QAC3C,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;QAC7B,WAAW,IAAI,SAAS,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QAEhD,IAAI,QAAQ,YAAY,YAAY,EAAE;YACpC,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;SAC9B;IACH,CAAC;;AAjLa,kBAAK,GAAG,CAAC,GAAG,EAAE;IAC1B,MAAM,KAAK,GAAG,IAAI,YAAY,EAAE,CAAC;IACjC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;IACpB,OAAO,KAAK,CAAC;AACf,CAAC,CAAC,EAAE,CAAC;AAgLP,MAAM,CAAC,MAAM,kBAAkB,GAAG,YAAY,CAAC,KAAK,CAAC;AAErD,MAAM,UAAU,cAAc,CAAC,KAAU;IACvC,OAAO,CACL,KAAK,YAAY,YAAY;QAC7B,CAAC,KAAK,IAAI,QAAQ,IAAI,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CACnH,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,SAAwC;IAC7D,IAAI,UAAU,CAAC,SAAS,CAAC,EAAE;QACzB,SAAS,EAAE,CAAC;KACb;SAAM;QACL,SAAS,CAAC,WAAW,EAAE,CAAC;KACzB;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/ajax/AjaxResponse.js b/node_modules/rxjs/dist/esm/internal/ajax/AjaxResponse.js deleted file mode 100644 index 1292724..0000000 --- a/node_modules/rxjs/dist/esm/internal/ajax/AjaxResponse.js +++ /dev/null @@ -1,26 +0,0 @@ -import { getXHRResponse } from './getXHRResponse'; -export class AjaxResponse { - constructor(originalEvent, xhr, request, type = 'download_load') { - this.originalEvent = originalEvent; - this.xhr = xhr; - this.request = request; - this.type = type; - const { status, responseType } = xhr; - this.status = status !== null && status !== void 0 ? status : 0; - this.responseType = responseType !== null && responseType !== void 0 ? responseType : ''; - const allHeaders = xhr.getAllResponseHeaders(); - this.responseHeaders = allHeaders - ? - allHeaders.split('\n').reduce((headers, line) => { - const index = line.indexOf(': '); - headers[line.slice(0, index)] = line.slice(index + 2); - return headers; - }, {}) - : {}; - this.response = getXHRResponse(xhr); - const { loaded, total } = originalEvent; - this.loaded = loaded; - this.total = total; - } -} -//# sourceMappingURL=AjaxResponse.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/ajax/AjaxResponse.js.map b/node_modules/rxjs/dist/esm/internal/ajax/AjaxResponse.js.map deleted file mode 100644 index 6784324..0000000 --- a/node_modules/rxjs/dist/esm/internal/ajax/AjaxResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AjaxResponse.js","sourceRoot":"","sources":["../../../../src/internal/ajax/AjaxResponse.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAgBlD,MAAM,OAAO,YAAY;IA+CvB,YAIkB,aAA4B,EAM5B,GAAmB,EAInB,OAAoB,EAcpB,OAAyB,eAAe;QAxBxC,kBAAa,GAAb,aAAa,CAAe;QAM5B,QAAG,GAAH,GAAG,CAAgB;QAInB,YAAO,GAAP,OAAO,CAAa;QAcpB,SAAI,GAAJ,IAAI,CAAoC;QAExD,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,GAAG,CAAC;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,CAAC,CAAC;QAC1B,IAAI,CAAC,YAAY,GAAG,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,EAAE,CAAC;QASvC,MAAM,UAAU,GAAG,GAAG,CAAC,qBAAqB,EAAE,CAAC;QAC/C,IAAI,CAAC,eAAe,GAAG,UAAU;YAC/B,CAAC;gBACC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,OAA+B,EAAE,IAAI,EAAE,EAAE;oBAItE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;oBACjC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;oBACtD,OAAO,OAAO,CAAC;gBACjB,CAAC,EAAE,EAAE,CAAC;YACR,CAAC,CAAC,EAAE,CAAC;QAEP,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;QACpC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,aAAa,CAAC;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/ajax/ajax.js b/node_modules/rxjs/dist/esm/internal/ajax/ajax.js deleted file mode 100644 index b5df317..0000000 --- a/node_modules/rxjs/dist/esm/internal/ajax/ajax.js +++ /dev/null @@ -1,236 +0,0 @@ -import { map } from '../operators/map'; -import { Observable } from '../Observable'; -import { AjaxResponse } from './AjaxResponse'; -import { AjaxTimeoutError, AjaxError } from './errors'; -function ajaxGet(url, headers) { - return ajax({ method: 'GET', url, headers }); -} -function ajaxPost(url, body, headers) { - return ajax({ method: 'POST', url, body, headers }); -} -function ajaxDelete(url, headers) { - return ajax({ method: 'DELETE', url, headers }); -} -function ajaxPut(url, body, headers) { - return ajax({ method: 'PUT', url, body, headers }); -} -function ajaxPatch(url, body, headers) { - return ajax({ method: 'PATCH', url, body, headers }); -} -const mapResponse = map((x) => x.response); -function ajaxGetJSON(url, headers) { - return mapResponse(ajax({ - method: 'GET', - url, - headers, - })); -} -export const ajax = (() => { - const create = (urlOrConfig) => { - const config = typeof urlOrConfig === 'string' - ? { - url: urlOrConfig, - } - : urlOrConfig; - return fromAjax(config); - }; - create.get = ajaxGet; - create.post = ajaxPost; - create.delete = ajaxDelete; - create.put = ajaxPut; - create.patch = ajaxPatch; - create.getJSON = ajaxGetJSON; - return create; -})(); -const UPLOAD = 'upload'; -const DOWNLOAD = 'download'; -const LOADSTART = 'loadstart'; -const PROGRESS = 'progress'; -const LOAD = 'load'; -export function fromAjax(init) { - return new Observable((destination) => { - var _a, _b; - const config = Object.assign({ async: true, crossDomain: false, withCredentials: false, method: 'GET', timeout: 0, responseType: 'json' }, init); - const { queryParams, body: configuredBody, headers: configuredHeaders } = config; - let url = config.url; - if (!url) { - throw new TypeError('url is required'); - } - if (queryParams) { - let searchParams; - if (url.includes('?')) { - const parts = url.split('?'); - if (2 < parts.length) { - throw new TypeError('invalid url'); - } - searchParams = new URLSearchParams(parts[1]); - new URLSearchParams(queryParams).forEach((value, key) => searchParams.set(key, value)); - url = parts[0] + '?' + searchParams; - } - else { - searchParams = new URLSearchParams(queryParams); - url = url + '?' + searchParams; - } - } - const headers = {}; - if (configuredHeaders) { - for (const key in configuredHeaders) { - if (configuredHeaders.hasOwnProperty(key)) { - headers[key.toLowerCase()] = configuredHeaders[key]; - } - } - } - const crossDomain = config.crossDomain; - if (!crossDomain && !('x-requested-with' in headers)) { - headers['x-requested-with'] = 'XMLHttpRequest'; - } - const { withCredentials, xsrfCookieName, xsrfHeaderName } = config; - if ((withCredentials || !crossDomain) && xsrfCookieName && xsrfHeaderName) { - const xsrfCookie = (_b = (_a = document === null || document === void 0 ? void 0 : document.cookie.match(new RegExp(`(^|;\\s*)(${xsrfCookieName})=([^;]*)`))) === null || _a === void 0 ? void 0 : _a.pop()) !== null && _b !== void 0 ? _b : ''; - if (xsrfCookie) { - headers[xsrfHeaderName] = xsrfCookie; - } - } - const body = extractContentTypeAndMaybeSerializeBody(configuredBody, headers); - const _request = Object.assign(Object.assign({}, config), { url, - headers, - body }); - let xhr; - xhr = init.createXHR ? init.createXHR() : new XMLHttpRequest(); - { - const { progressSubscriber, includeDownloadProgress = false, includeUploadProgress = false } = init; - const addErrorEvent = (type, errorFactory) => { - xhr.addEventListener(type, () => { - var _a; - const error = errorFactory(); - (_a = progressSubscriber === null || progressSubscriber === void 0 ? void 0 : progressSubscriber.error) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber, error); - destination.error(error); - }); - }; - addErrorEvent('timeout', () => new AjaxTimeoutError(xhr, _request)); - addErrorEvent('abort', () => new AjaxError('aborted', xhr, _request)); - const createResponse = (direction, event) => new AjaxResponse(event, xhr, _request, `${direction}_${event.type}`); - const addProgressEvent = (target, type, direction) => { - target.addEventListener(type, (event) => { - destination.next(createResponse(direction, event)); - }); - }; - if (includeUploadProgress) { - [LOADSTART, PROGRESS, LOAD].forEach((type) => addProgressEvent(xhr.upload, type, UPLOAD)); - } - if (progressSubscriber) { - [LOADSTART, PROGRESS].forEach((type) => xhr.upload.addEventListener(type, (e) => { var _a; return (_a = progressSubscriber === null || progressSubscriber === void 0 ? void 0 : progressSubscriber.next) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber, e); })); - } - if (includeDownloadProgress) { - [LOADSTART, PROGRESS].forEach((type) => addProgressEvent(xhr, type, DOWNLOAD)); - } - const emitError = (status) => { - const msg = 'ajax error' + (status ? ' ' + status : ''); - destination.error(new AjaxError(msg, xhr, _request)); - }; - xhr.addEventListener('error', (e) => { - var _a; - (_a = progressSubscriber === null || progressSubscriber === void 0 ? void 0 : progressSubscriber.error) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber, e); - emitError(); - }); - xhr.addEventListener(LOAD, (event) => { - var _a, _b; - const { status } = xhr; - if (status < 400) { - (_a = progressSubscriber === null || progressSubscriber === void 0 ? void 0 : progressSubscriber.complete) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber); - let response; - try { - response = createResponse(DOWNLOAD, event); - } - catch (err) { - destination.error(err); - return; - } - destination.next(response); - destination.complete(); - } - else { - (_b = progressSubscriber === null || progressSubscriber === void 0 ? void 0 : progressSubscriber.error) === null || _b === void 0 ? void 0 : _b.call(progressSubscriber, event); - emitError(status); - } - }); - } - const { user, method, async } = _request; - if (user) { - xhr.open(method, url, async, user, _request.password); - } - else { - xhr.open(method, url, async); - } - if (async) { - xhr.timeout = _request.timeout; - xhr.responseType = _request.responseType; - } - if ('withCredentials' in xhr) { - xhr.withCredentials = _request.withCredentials; - } - for (const key in headers) { - if (headers.hasOwnProperty(key)) { - xhr.setRequestHeader(key, headers[key]); - } - } - if (body) { - xhr.send(body); - } - else { - xhr.send(); - } - return () => { - if (xhr && xhr.readyState !== 4) { - xhr.abort(); - } - }; - }); -} -function extractContentTypeAndMaybeSerializeBody(body, headers) { - var _a; - if (!body || - typeof body === 'string' || - isFormData(body) || - isURLSearchParams(body) || - isArrayBuffer(body) || - isFile(body) || - isBlob(body) || - isReadableStream(body)) { - return body; - } - if (isArrayBufferView(body)) { - return body.buffer; - } - if (typeof body === 'object') { - headers['content-type'] = (_a = headers['content-type']) !== null && _a !== void 0 ? _a : 'application/json;charset=utf-8'; - return JSON.stringify(body); - } - throw new TypeError('Unknown body type'); -} -const _toString = Object.prototype.toString; -function toStringCheck(obj, name) { - return _toString.call(obj) === `[object ${name}]`; -} -function isArrayBuffer(body) { - return toStringCheck(body, 'ArrayBuffer'); -} -function isFile(body) { - return toStringCheck(body, 'File'); -} -function isBlob(body) { - return toStringCheck(body, 'Blob'); -} -function isArrayBufferView(body) { - return typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView(body); -} -function isFormData(body) { - return typeof FormData !== 'undefined' && body instanceof FormData; -} -function isURLSearchParams(body) { - return typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams; -} -function isReadableStream(body) { - return typeof ReadableStream !== 'undefined' && body instanceof ReadableStream; -} -//# sourceMappingURL=ajax.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/ajax/ajax.js.map b/node_modules/rxjs/dist/esm/internal/ajax/ajax.js.map deleted file mode 100644 index b4f8c35..0000000 --- a/node_modules/rxjs/dist/esm/internal/ajax/ajax.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ajax.js","sourceRoot":"","sources":["../../../../src/internal/ajax/ajax.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAqIvD,SAAS,OAAO,CAAI,GAAW,EAAE,OAAgC;IAC/D,OAAO,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,QAAQ,CAAI,GAAW,EAAE,IAAU,EAAE,OAAgC;IAC5E,OAAO,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;AACtD,CAAC;AAED,SAAS,UAAU,CAAI,GAAW,EAAE,OAAgC;IAClE,OAAO,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,OAAO,CAAI,GAAW,EAAE,IAAU,EAAE,OAAgC;IAC3E,OAAO,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;AACrD,CAAC;AAED,SAAS,SAAS,CAAI,GAAW,EAAE,IAAU,EAAE,OAAgC;IAC7E,OAAO,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,WAAW,GAAG,GAAG,CAAC,CAAC,CAAoB,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AAE9D,SAAS,WAAW,CAAI,GAAW,EAAE,OAAgC;IACnE,OAAO,WAAW,CAChB,IAAI,CAAI;QACN,MAAM,EAAE,KAAK;QACb,GAAG;QACH,OAAO;KACR,CAAC,CACH,CAAC;AACJ,CAAC;AAoGD,MAAM,CAAC,MAAM,IAAI,GAAuB,CAAC,GAAG,EAAE;IAC5C,MAAM,MAAM,GAAG,CAAI,WAAgC,EAAE,EAAE;QACrD,MAAM,MAAM,GACV,OAAO,WAAW,KAAK,QAAQ;YAC7B,CAAC,CAAC;gBACE,GAAG,EAAE,WAAW;aACjB;YACH,CAAC,CAAC,WAAW,CAAC;QAClB,OAAO,QAAQ,CAAI,MAAM,CAAC,CAAC;IAC7B,CAAC,CAAC;IAEF,MAAM,CAAC,GAAG,GAAG,OAAO,CAAC;IACrB,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvB,MAAM,CAAC,MAAM,GAAG,UAAU,CAAC;IAC3B,MAAM,CAAC,GAAG,GAAG,OAAO,CAAC;IACrB,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC;IACzB,MAAM,CAAC,OAAO,GAAG,WAAW,CAAC;IAE7B,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC,EAAE,CAAC;AAEL,MAAM,MAAM,GAAG,QAAQ,CAAC;AACxB,MAAM,QAAQ,GAAG,UAAU,CAAC;AAC5B,MAAM,SAAS,GAAG,WAAW,CAAC;AAC9B,MAAM,QAAQ,GAAG,UAAU,CAAC;AAC5B,MAAM,IAAI,GAAG,MAAM,CAAC;AAEpB,MAAM,UAAU,QAAQ,CAAI,IAAgB;IAC1C,OAAO,IAAI,UAAU,CAAC,CAAC,WAAW,EAAE,EAAE;;QACpC,MAAM,MAAM,mBAEV,KAAK,EAAE,IAAI,EACX,WAAW,EAAE,KAAK,EAClB,eAAe,EAAE,KAAK,EACtB,MAAM,EAAE,KAAK,EACb,OAAO,EAAE,CAAC,EACV,YAAY,EAAE,MAAoC,IAE/C,IAAI,CACR,CAAC;QAEF,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,iBAAiB,EAAE,GAAG,MAAM,CAAC;QAEjF,IAAI,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC;QACrB,IAAI,CAAC,GAAG,EAAE;YACR,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAC;SACxC;QAED,IAAI,WAAW,EAAE;YACf,IAAI,YAA6B,CAAC;YAClC,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBAIrB,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBAC7B,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE;oBACpB,MAAM,IAAI,SAAS,CAAC,aAAa,CAAC,CAAC;iBACpC;gBAED,YAAY,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBAG7C,IAAI,eAAe,CAAC,WAAkB,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;gBAI9F,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,YAAY,CAAC;aACrC;iBAAM;gBAKL,YAAY,GAAG,IAAI,eAAe,CAAC,WAAkB,CAAC,CAAC;gBACvD,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,YAAY,CAAC;aAChC;SACF;QAKD,MAAM,OAAO,GAAwB,EAAE,CAAC;QACxC,IAAI,iBAAiB,EAAE;YACrB,KAAK,MAAM,GAAG,IAAI,iBAAiB,EAAE;gBACnC,IAAI,iBAAiB,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;oBACzC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;iBACrD;aACF;SACF;QAED,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QASvC,IAAI,CAAC,WAAW,IAAI,CAAC,CAAC,kBAAkB,IAAI,OAAO,CAAC,EAAE;YACpD,OAAO,CAAC,kBAAkB,CAAC,GAAG,gBAAgB,CAAC;SAChD;QAID,MAAM,EAAE,eAAe,EAAE,cAAc,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC;QACnE,IAAI,CAAC,eAAe,IAAI,CAAC,WAAW,CAAC,IAAI,cAAc,IAAI,cAAc,EAAE;YACzE,MAAM,UAAU,GAAG,MAAA,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,aAAa,cAAc,WAAW,CAAC,CAAC,0CAAE,GAAG,EAAE,mCAAI,EAAE,CAAC;YAC3G,IAAI,UAAU,EAAE;gBACd,OAAO,CAAC,cAAc,CAAC,GAAG,UAAU,CAAC;aACtC;SACF;QAID,MAAM,IAAI,GAAG,uCAAuC,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;QAG9E,MAAM,QAAQ,mCACT,MAAM,KAGT,GAAG;YACH,OAAO;YACP,IAAI,GACL,CAAC;QAEF,IAAI,GAAmB,CAAC;QAGxB,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,IAAI,cAAc,EAAE,CAAC;QAE/D;YAQE,MAAM,EAAE,kBAAkB,EAAE,uBAAuB,GAAG,KAAK,EAAE,qBAAqB,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC;YAQpG,MAAM,aAAa,GAAG,CAAC,IAAY,EAAE,YAAuB,EAAE,EAAE;gBAC9D,GAAG,CAAC,gBAAgB,CAAC,IAAI,EAAE,GAAG,EAAE;;oBAC9B,MAAM,KAAK,GAAG,YAAY,EAAE,CAAC;oBAC7B,MAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,KAAK,+CAAzB,kBAAkB,EAAU,KAAK,CAAC,CAAC;oBACnC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBAC3B,CAAC,CAAC,CAAC;YACL,CAAC,CAAC;YAGF,aAAa,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,gBAAgB,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;YAIpE,aAAa,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,SAAS,CAAC,SAAS,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;YAStE,MAAM,cAAc,GAAG,CAAC,SAAwB,EAAE,KAAoB,EAAE,EAAE,CACxE,IAAI,YAAY,CAAI,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,SAAS,IAAI,KAAK,CAAC,IAAyB,EAAW,CAAC,CAAC;YAYxG,MAAM,gBAAgB,GAAG,CAAC,MAAW,EAAE,IAAY,EAAE,SAAwB,EAAE,EAAE;gBAC/E,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC,KAAoB,EAAE,EAAE;oBACrD,WAAW,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;gBACrD,CAAC,CAAC,CAAC;YACL,CAAC,CAAC;YAEF,IAAI,qBAAqB,EAAE;gBACzB,CAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,gBAAgB,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;aAC3F;YAED,IAAI,kBAAkB,EAAE;gBACtB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAM,EAAE,EAAE,WAAC,OAAA,MAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,IAAI,+CAAxB,kBAAkB,EAAS,CAAC,CAAC,CAAA,EAAA,CAAC,CAAC,CAAC;aACvH;YAED,IAAI,uBAAuB,EAAE;gBAC3B,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,gBAAgB,CAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;aAChF;YAED,MAAM,SAAS,GAAG,CAAC,MAAe,EAAE,EAAE;gBACpC,MAAM,GAAG,GAAG,YAAY,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;gBACxD,WAAW,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;YACvD,CAAC,CAAC;YAEF,GAAG,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;;gBAClC,MAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,KAAK,+CAAzB,kBAAkB,EAAU,CAAC,CAAC,CAAC;gBAC/B,SAAS,EAAE,CAAC;YACd,CAAC,CAAC,CAAC;YAEH,GAAG,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE;;gBACnC,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC;gBAEvB,IAAI,MAAM,GAAG,GAAG,EAAE;oBAChB,MAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,QAAQ,+CAA5B,kBAAkB,CAAc,CAAC;oBAEjC,IAAI,QAAyB,CAAC;oBAC9B,IAAI;wBAIF,QAAQ,GAAG,cAAc,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;qBAC5C;oBAAC,OAAO,GAAG,EAAE;wBACZ,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;wBACvB,OAAO;qBACR;oBAED,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;oBAC3B,WAAW,CAAC,QAAQ,EAAE,CAAC;iBACxB;qBAAM;oBACL,MAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,KAAK,+CAAzB,kBAAkB,EAAU,KAAK,CAAC,CAAC;oBACnC,SAAS,CAAC,MAAM,CAAC,CAAC;iBACnB;YACH,CAAC,CAAC,CAAC;SACJ;QAED,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC;QAEzC,IAAI,IAAI,EAAE;YACR,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;SACvD;aAAM;YACL,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;SAC9B;QAGD,IAAI,KAAK,EAAE;YACT,GAAG,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;YAC/B,GAAG,CAAC,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC;SAC1C;QAED,IAAI,iBAAiB,IAAI,GAAG,EAAE;YAC5B,GAAG,CAAC,eAAe,GAAG,QAAQ,CAAC,eAAe,CAAC;SAChD;QAGD,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE;YACzB,IAAI,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;gBAC/B,GAAG,CAAC,gBAAgB,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;aACzC;SACF;QAGD,IAAI,IAAI,EAAE;YACR,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAChB;aAAM;YACL,GAAG,CAAC,IAAI,EAAE,CAAC;SACZ;QAED,OAAO,GAAG,EAAE;YACV,IAAI,GAAG,IAAI,GAAG,CAAC,UAAU,KAAK,CAAC,EAAe;gBAC5C,GAAG,CAAC,KAAK,EAAE,CAAC;aACb;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAWD,SAAS,uCAAuC,CAAC,IAAS,EAAE,OAA+B;;IACzF,IACE,CAAC,IAAI;QACL,OAAO,IAAI,KAAK,QAAQ;QACxB,UAAU,CAAC,IAAI,CAAC;QAChB,iBAAiB,CAAC,IAAI,CAAC;QACvB,aAAa,CAAC,IAAI,CAAC;QACnB,MAAM,CAAC,IAAI,CAAC;QACZ,MAAM,CAAC,IAAI,CAAC;QACZ,gBAAgB,CAAC,IAAI,CAAC,EACtB;QAGA,OAAO,IAAI,CAAC;KACb;IAED,IAAI,iBAAiB,CAAC,IAAI,CAAC,EAAE;QAG3B,OAAO,IAAI,CAAC,MAAM,CAAC;KACpB;IAED,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAM5B,OAAO,CAAC,cAAc,CAAC,GAAG,MAAA,OAAO,CAAC,cAAc,CAAC,mCAAI,gCAAgC,CAAC;QACtF,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;KAC7B;IAID,MAAM,IAAI,SAAS,CAAC,mBAAmB,CAAC,CAAC;AAC3C,CAAC;AAED,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;AAE5C,SAAS,aAAa,CAAC,GAAQ,EAAE,IAAY;IAC3C,OAAO,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,WAAW,IAAI,GAAG,CAAC;AACpD,CAAC;AAED,SAAS,aAAa,CAAC,IAAS;IAC9B,OAAO,aAAa,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,MAAM,CAAC,IAAS;IACvB,OAAO,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,MAAM,CAAC,IAAS;IACvB,OAAO,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAS;IAClC,OAAO,OAAO,WAAW,KAAK,WAAW,IAAI,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACxE,CAAC;AAED,SAAS,UAAU,CAAC,IAAS;IAC3B,OAAO,OAAO,QAAQ,KAAK,WAAW,IAAI,IAAI,YAAY,QAAQ,CAAC;AACrE,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAS;IAClC,OAAO,OAAO,eAAe,KAAK,WAAW,IAAI,IAAI,YAAY,eAAe,CAAC;AACnF,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAS;IACjC,OAAO,OAAO,cAAc,KAAK,WAAW,IAAI,IAAI,YAAY,cAAc,CAAC;AACjF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/ajax/errors.js b/node_modules/rxjs/dist/esm/internal/ajax/errors.js deleted file mode 100644 index 6b5c43d..0000000 --- a/node_modules/rxjs/dist/esm/internal/ajax/errors.js +++ /dev/null @@ -1,28 +0,0 @@ -import { getXHRResponse } from './getXHRResponse'; -import { createErrorClass } from '../util/createErrorClass'; -export const AjaxError = createErrorClass((_super) => function AjaxErrorImpl(message, xhr, request) { - this.message = message; - this.name = 'AjaxError'; - this.xhr = xhr; - this.request = request; - this.status = xhr.status; - this.responseType = xhr.responseType; - let response; - try { - response = getXHRResponse(xhr); - } - catch (err) { - response = xhr.responseText; - } - this.response = response; -}); -export const AjaxTimeoutError = (() => { - function AjaxTimeoutErrorImpl(xhr, request) { - AjaxError.call(this, 'ajax timeout', xhr, request); - this.name = 'AjaxTimeoutError'; - return this; - } - AjaxTimeoutErrorImpl.prototype = Object.create(AjaxError.prototype); - return AjaxTimeoutErrorImpl; -})(); -//# sourceMappingURL=errors.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/ajax/errors.js.map b/node_modules/rxjs/dist/esm/internal/ajax/errors.js.map deleted file mode 100644 index a33f37c..0000000 --- a/node_modules/rxjs/dist/esm/internal/ajax/errors.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../src/internal/ajax/errors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAmD5D,MAAM,CAAC,MAAM,SAAS,GAAkB,gBAAgB,CACtD,CAAC,MAAM,EAAE,EAAE,CACT,SAAS,aAAa,CAAY,OAAe,EAAE,GAAmB,EAAE,OAAoB;IAC1F,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACvB,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;IACxB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACvB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;IACzB,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;IACrC,IAAI,QAAa,CAAC;IAClB,IAAI;QAGF,QAAQ,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;KAChC;IAAC,OAAO,GAAG,EAAE;QACZ,QAAQ,GAAG,GAAG,CAAC,YAAY,CAAC;KAC7B;IACD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC3B,CAAC,CACJ,CAAC;AAqBF,MAAM,CAAC,MAAM,gBAAgB,GAAyB,CAAC,GAAG,EAAE;IAC1D,SAAS,oBAAoB,CAAY,GAAmB,EAAE,OAAoB;QAChF,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;QACnD,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,oBAAoB,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IACpE,OAAO,oBAAoB,CAAC;AAC9B,CAAC,CAAC,EAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/ajax/getXHRResponse.js b/node_modules/rxjs/dist/esm/internal/ajax/getXHRResponse.js deleted file mode 100644 index 9f947fd..0000000 --- a/node_modules/rxjs/dist/esm/internal/ajax/getXHRResponse.js +++ /dev/null @@ -1,26 +0,0 @@ -export function getXHRResponse(xhr) { - switch (xhr.responseType) { - case 'json': { - if ('response' in xhr) { - return xhr.response; - } - else { - const ieXHR = xhr; - return JSON.parse(ieXHR.responseText); - } - } - case 'document': - return xhr.responseXML; - case 'text': - default: { - if ('response' in xhr) { - return xhr.response; - } - else { - const ieXHR = xhr; - return ieXHR.responseText; - } - } - } -} -//# sourceMappingURL=getXHRResponse.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/ajax/getXHRResponse.js.map b/node_modules/rxjs/dist/esm/internal/ajax/getXHRResponse.js.map deleted file mode 100644 index f9fdf68..0000000 --- a/node_modules/rxjs/dist/esm/internal/ajax/getXHRResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getXHRResponse.js","sourceRoot":"","sources":["../../../../src/internal/ajax/getXHRResponse.ts"],"names":[],"mappings":"AAYA,MAAM,UAAU,cAAc,CAAC,GAAmB;IAChD,QAAQ,GAAG,CAAC,YAAY,EAAE;QACxB,KAAK,MAAM,CAAC,CAAC;YACX,IAAI,UAAU,IAAI,GAAG,EAAE;gBACrB,OAAO,GAAG,CAAC,QAAQ,CAAC;aACrB;iBAAM;gBAEL,MAAM,KAAK,GAAQ,GAAG,CAAC;gBACvB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;aACvC;SACF;QACD,KAAK,UAAU;YACb,OAAO,GAAG,CAAC,WAAW,CAAC;QACzB,KAAK,MAAM,CAAC;QACZ,OAAO,CAAC,CAAC;YACP,IAAI,UAAU,IAAI,GAAG,EAAE;gBACrB,OAAO,GAAG,CAAC,QAAQ,CAAC;aACrB;iBAAM;gBAEL,MAAM,KAAK,GAAQ,GAAG,CAAC;gBACvB,OAAO,KAAK,CAAC,YAAY,CAAC;aAC3B;SACF;KACF;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/ajax/types.js b/node_modules/rxjs/dist/esm/internal/ajax/types.js deleted file mode 100644 index 718fd38..0000000 --- a/node_modules/rxjs/dist/esm/internal/ajax/types.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/ajax/types.js.map b/node_modules/rxjs/dist/esm/internal/ajax/types.js.map deleted file mode 100644 index f08bdb1..0000000 --- a/node_modules/rxjs/dist/esm/internal/ajax/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/internal/ajax/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/config.js b/node_modules/rxjs/dist/esm/internal/config.js deleted file mode 100644 index 07906c2..0000000 --- a/node_modules/rxjs/dist/esm/internal/config.js +++ /dev/null @@ -1,8 +0,0 @@ -export const config = { - onUnhandledError: null, - onStoppedNotification: null, - Promise: undefined, - useDeprecatedSynchronousErrorHandling: false, - useDeprecatedNextContext: false, -}; -//# sourceMappingURL=config.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/config.js.map b/node_modules/rxjs/dist/esm/internal/config.js.map deleted file mode 100644 index fd7b0e1..0000000 --- a/node_modules/rxjs/dist/esm/internal/config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/internal/config.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,MAAM,GAAiB;IAClC,gBAAgB,EAAE,IAAI;IACtB,qBAAqB,EAAE,IAAI;IAC3B,OAAO,EAAE,SAAS;IAClB,qCAAqC,EAAE,KAAK;IAC5C,wBAAwB,EAAE,KAAK;CAChC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/firstValueFrom.js b/node_modules/rxjs/dist/esm/internal/firstValueFrom.js deleted file mode 100644 index 26c8b9f..0000000 --- a/node_modules/rxjs/dist/esm/internal/firstValueFrom.js +++ /dev/null @@ -1,24 +0,0 @@ -import { EmptyError } from './util/EmptyError'; -import { SafeSubscriber } from './Subscriber'; -export function firstValueFrom(source, config) { - const hasConfig = typeof config === 'object'; - return new Promise((resolve, reject) => { - const subscriber = new SafeSubscriber({ - next: (value) => { - resolve(value); - subscriber.unsubscribe(); - }, - error: reject, - complete: () => { - if (hasConfig) { - resolve(config.defaultValue); - } - else { - reject(new EmptyError()); - } - }, - }); - source.subscribe(subscriber); - }); -} -//# sourceMappingURL=firstValueFrom.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/firstValueFrom.js.map b/node_modules/rxjs/dist/esm/internal/firstValueFrom.js.map deleted file mode 100644 index 4e16bc7..0000000 --- a/node_modules/rxjs/dist/esm/internal/firstValueFrom.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"firstValueFrom.js","sourceRoot":"","sources":["../../../src/internal/firstValueFrom.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAqD9C,MAAM,UAAU,cAAc,CAAO,MAAqB,EAAE,MAAgC;IAC1F,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC;IAC7C,OAAO,IAAI,OAAO,CAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC5C,MAAM,UAAU,GAAG,IAAI,cAAc,CAAI;YACvC,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE;gBACd,OAAO,CAAC,KAAK,CAAC,CAAC;gBACf,UAAU,CAAC,WAAW,EAAE,CAAC;YAC3B,CAAC;YACD,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE,GAAG,EAAE;gBACb,IAAI,SAAS,EAAE;oBACb,OAAO,CAAC,MAAO,CAAC,YAAY,CAAC,CAAC;iBAC/B;qBAAM;oBACL,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC,CAAC;iBAC1B;YACH,CAAC;SACF,CAAC,CAAC;QACH,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/lastValueFrom.js b/node_modules/rxjs/dist/esm/internal/lastValueFrom.js deleted file mode 100644 index 90b7bc3..0000000 --- a/node_modules/rxjs/dist/esm/internal/lastValueFrom.js +++ /dev/null @@ -1,27 +0,0 @@ -import { EmptyError } from './util/EmptyError'; -export function lastValueFrom(source, config) { - const hasConfig = typeof config === 'object'; - return new Promise((resolve, reject) => { - let _hasValue = false; - let _value; - source.subscribe({ - next: (value) => { - _value = value; - _hasValue = true; - }, - error: reject, - complete: () => { - if (_hasValue) { - resolve(_value); - } - else if (hasConfig) { - resolve(config.defaultValue); - } - else { - reject(new EmptyError()); - } - }, - }); - }); -} -//# sourceMappingURL=lastValueFrom.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/lastValueFrom.js.map b/node_modules/rxjs/dist/esm/internal/lastValueFrom.js.map deleted file mode 100644 index f9e72ac..0000000 --- a/node_modules/rxjs/dist/esm/internal/lastValueFrom.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"lastValueFrom.js","sourceRoot":"","sources":["../../../src/internal/lastValueFrom.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAoD/C,MAAM,UAAU,aAAa,CAAO,MAAqB,EAAE,MAA+B;IACxF,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC;IAC7C,OAAO,IAAI,OAAO,CAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC5C,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,MAAS,CAAC;QACd,MAAM,CAAC,SAAS,CAAC;YACf,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE;gBACd,MAAM,GAAG,KAAK,CAAC;gBACf,SAAS,GAAG,IAAI,CAAC;YACnB,CAAC;YACD,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE,GAAG,EAAE;gBACb,IAAI,SAAS,EAAE;oBACb,OAAO,CAAC,MAAM,CAAC,CAAC;iBACjB;qBAAM,IAAI,SAAS,EAAE;oBACpB,OAAO,CAAC,MAAO,CAAC,YAAY,CAAC,CAAC;iBAC/B;qBAAM;oBACL,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC,CAAC;iBAC1B;YACH,CAAC;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/ConnectableObservable.js b/node_modules/rxjs/dist/esm/internal/observable/ConnectableObservable.js deleted file mode 100644 index 0d7c10e..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/ConnectableObservable.js +++ /dev/null @@ -1,57 +0,0 @@ -import { Observable } from '../Observable'; -import { Subscription } from '../Subscription'; -import { refCount as higherOrderRefCount } from '../operators/refCount'; -import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; -import { hasLift } from '../util/lift'; -export class ConnectableObservable extends Observable { - constructor(source, subjectFactory) { - super(); - this.source = source; - this.subjectFactory = subjectFactory; - this._subject = null; - this._refCount = 0; - this._connection = null; - if (hasLift(source)) { - this.lift = source.lift; - } - } - _subscribe(subscriber) { - return this.getSubject().subscribe(subscriber); - } - getSubject() { - const subject = this._subject; - if (!subject || subject.isStopped) { - this._subject = this.subjectFactory(); - } - return this._subject; - } - _teardown() { - this._refCount = 0; - const { _connection } = this; - this._subject = this._connection = null; - _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe(); - } - connect() { - let connection = this._connection; - if (!connection) { - connection = this._connection = new Subscription(); - const subject = this.getSubject(); - connection.add(this.source.subscribe(createOperatorSubscriber(subject, undefined, () => { - this._teardown(); - subject.complete(); - }, (err) => { - this._teardown(); - subject.error(err); - }, () => this._teardown()))); - if (connection.closed) { - this._connection = null; - connection = Subscription.EMPTY; - } - } - return connection; - } - refCount() { - return higherOrderRefCount()(this); - } -} -//# sourceMappingURL=ConnectableObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/ConnectableObservable.js.map b/node_modules/rxjs/dist/esm/internal/observable/ConnectableObservable.js.map deleted file mode 100644 index 74fe4e9..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/ConnectableObservable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConnectableObservable.js","sourceRoot":"","sources":["../../../../src/internal/observable/ConnectableObservable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AASvC,MAAM,OAAO,qBAAyB,SAAQ,UAAa;IAgBzD,YAAmB,MAAqB,EAAY,cAAgC;QAClF,KAAK,EAAE,CAAC;QADS,WAAM,GAAN,MAAM,CAAe;QAAY,mBAAc,GAAd,cAAc,CAAkB;QAf1E,aAAQ,GAAsB,IAAI,CAAC;QACnC,cAAS,GAAW,CAAC,CAAC;QACtB,gBAAW,GAAwB,IAAI,CAAC;QAkBhD,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE;YACnB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;SACzB;IACH,CAAC;IAGS,UAAU,CAAC,UAAyB;QAC5C,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACjD,CAAC;IAES,UAAU;QAClB,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,SAAS,EAAE;YACjC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;SACvC;QACD,OAAO,IAAI,CAAC,QAAS,CAAC;IACxB,CAAC;IAES,SAAS;QACjB,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACnB,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,WAAW,EAAE,CAAC;IAC7B,CAAC;IAMD,OAAO;QACL,IAAI,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;QAClC,IAAI,CAAC,UAAU,EAAE;YACf,UAAU,GAAG,IAAI,CAAC,WAAW,GAAG,IAAI,YAAY,EAAE,CAAC;YACnD,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;YAClC,UAAU,CAAC,GAAG,CACZ,IAAI,CAAC,MAAM,CAAC,SAAS,CACnB,wBAAwB,CACtB,OAAc,EACd,SAAS,EACT,GAAG,EAAE;gBACH,IAAI,CAAC,SAAS,EAAE,CAAC;gBACjB,OAAO,CAAC,QAAQ,EAAE,CAAC;YACrB,CAAC,EACD,CAAC,GAAG,EAAE,EAAE;gBACN,IAAI,CAAC,SAAS,EAAE,CAAC;gBACjB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACrB,CAAC,EACD,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,CACvB,CACF,CACF,CAAC;YAEF,IAAI,UAAU,CAAC,MAAM,EAAE;gBACrB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;gBACxB,UAAU,GAAG,YAAY,CAAC,KAAK,CAAC;aACjC;SACF;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;IAMD,QAAQ;QACN,OAAO,mBAAmB,EAAE,CAAC,IAAI,CAAkB,CAAC;IACtD,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/bindCallback.js b/node_modules/rxjs/dist/esm/internal/observable/bindCallback.js deleted file mode 100644 index 0f730ac..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/bindCallback.js +++ /dev/null @@ -1,5 +0,0 @@ -import { bindCallbackInternals } from './bindCallbackInternals'; -export function bindCallback(callbackFunc, resultSelector, scheduler) { - return bindCallbackInternals(false, callbackFunc, resultSelector, scheduler); -} -//# sourceMappingURL=bindCallback.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/bindCallback.js.map b/node_modules/rxjs/dist/esm/internal/observable/bindCallback.js.map deleted file mode 100644 index 084ab86..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/bindCallback.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bindCallback.js","sourceRoot":"","sources":["../../../../src/internal/observable/bindCallback.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AA2IhE,MAAM,UAAU,YAAY,CAC1B,YAAkE,EAClE,cAA0D,EAC1D,SAAyB;IAEzB,OAAO,qBAAqB,CAAC,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;AAC/E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/bindCallbackInternals.js b/node_modules/rxjs/dist/esm/internal/observable/bindCallbackInternals.js deleted file mode 100644 index 79015c5..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/bindCallbackInternals.js +++ /dev/null @@ -1,62 +0,0 @@ -import { isScheduler } from '../util/isScheduler'; -import { Observable } from '../Observable'; -import { subscribeOn } from '../operators/subscribeOn'; -import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; -import { observeOn } from '../operators/observeOn'; -import { AsyncSubject } from '../AsyncSubject'; -export function bindCallbackInternals(isNodeStyle, callbackFunc, resultSelector, scheduler) { - if (resultSelector) { - if (isScheduler(resultSelector)) { - scheduler = resultSelector; - } - else { - return function (...args) { - return bindCallbackInternals(isNodeStyle, callbackFunc, scheduler) - .apply(this, args) - .pipe(mapOneOrManyArgs(resultSelector)); - }; - } - } - if (scheduler) { - return function (...args) { - return bindCallbackInternals(isNodeStyle, callbackFunc) - .apply(this, args) - .pipe(subscribeOn(scheduler), observeOn(scheduler)); - }; - } - return function (...args) { - const subject = new AsyncSubject(); - let uninitialized = true; - return new Observable((subscriber) => { - const subs = subject.subscribe(subscriber); - if (uninitialized) { - uninitialized = false; - let isAsync = false; - let isComplete = false; - callbackFunc.apply(this, [ - ...args, - (...results) => { - if (isNodeStyle) { - const err = results.shift(); - if (err != null) { - subject.error(err); - return; - } - } - subject.next(1 < results.length ? results : results[0]); - isComplete = true; - if (isAsync) { - subject.complete(); - } - }, - ]); - if (isComplete) { - subject.complete(); - } - isAsync = true; - } - return subs; - }); - }; -} -//# sourceMappingURL=bindCallbackInternals.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/bindCallbackInternals.js.map b/node_modules/rxjs/dist/esm/internal/observable/bindCallbackInternals.js.map deleted file mode 100644 index 7f87da0..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/bindCallbackInternals.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bindCallbackInternals.js","sourceRoot":"","sources":["../../../../src/internal/observable/bindCallbackInternals.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,UAAU,qBAAqB,CACnC,WAAoB,EACpB,YAAiB,EACjB,cAAoB,EACpB,SAAyB;IAEzB,IAAI,cAAc,EAAE;QAClB,IAAI,WAAW,CAAC,cAAc,CAAC,EAAE;YAC/B,SAAS,GAAG,cAAc,CAAC;SAC5B;aAAM;YAEL,OAAO,UAAqB,GAAG,IAAW;gBACxC,OAAQ,qBAAqB,CAAC,WAAW,EAAE,YAAY,EAAE,SAAS,CAAS;qBACxE,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC;qBACjB,IAAI,CAAC,gBAAgB,CAAC,cAAqB,CAAC,CAAC,CAAC;YACnD,CAAC,CAAC;SACH;KACF;IAID,IAAI,SAAS,EAAE;QACb,OAAO,UAAqB,GAAG,IAAW;YACxC,OAAQ,qBAAqB,CAAC,WAAW,EAAE,YAAY,CAAS;iBAC7D,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC;iBACjB,IAAI,CAAC,WAAW,CAAC,SAAU,CAAC,EAAE,SAAS,CAAC,SAAU,CAAC,CAAC,CAAC;QAC1D,CAAC,CAAC;KACH;IAED,OAAO,UAAqB,GAAG,IAAW;QAGxC,MAAM,OAAO,GAAG,IAAI,YAAY,EAAO,CAAC;QAGxC,IAAI,aAAa,GAAG,IAAI,CAAC;QACzB,OAAO,IAAI,UAAU,CAAC,CAAC,UAAU,EAAE,EAAE;YAEnC,MAAM,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;YAE3C,IAAI,aAAa,EAAE;gBACjB,aAAa,GAAG,KAAK,CAAC;gBAMtB,IAAI,OAAO,GAAG,KAAK,CAAC;gBAGpB,IAAI,UAAU,GAAG,KAAK,CAAC;gBAKvB,YAAY,CAAC,KAAK,CAEhB,IAAI,EACJ;oBAEE,GAAG,IAAI;oBAEP,CAAC,GAAG,OAAc,EAAE,EAAE;wBACpB,IAAI,WAAW,EAAE;4BAIf,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;4BAC5B,IAAI,GAAG,IAAI,IAAI,EAAE;gCACf,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gCAGnB,OAAO;6BACR;yBACF;wBAKD,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;wBAGxD,UAAU,GAAG,IAAI,CAAC;wBAMlB,IAAI,OAAO,EAAE;4BACX,OAAO,CAAC,QAAQ,EAAE,CAAC;yBACpB;oBACH,CAAC;iBACF,CACF,CAAC;gBAIF,IAAI,UAAU,EAAE;oBACd,OAAO,CAAC,QAAQ,EAAE,CAAC;iBACpB;gBAID,OAAO,GAAG,IAAI,CAAC;aAChB;YAGD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/bindNodeCallback.js b/node_modules/rxjs/dist/esm/internal/observable/bindNodeCallback.js deleted file mode 100644 index e8fbf53..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/bindNodeCallback.js +++ /dev/null @@ -1,5 +0,0 @@ -import { bindCallbackInternals } from './bindCallbackInternals'; -export function bindNodeCallback(callbackFunc, resultSelector, scheduler) { - return bindCallbackInternals(true, callbackFunc, resultSelector, scheduler); -} -//# sourceMappingURL=bindNodeCallback.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/bindNodeCallback.js.map b/node_modules/rxjs/dist/esm/internal/observable/bindNodeCallback.js.map deleted file mode 100644 index a4ff824..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/bindNodeCallback.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bindNodeCallback.js","sourceRoot":"","sources":["../../../../src/internal/observable/bindNodeCallback.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAyHhE,MAAM,UAAU,gBAAgB,CAC9B,YAA4E,EAC5E,cAA0D,EAC1D,SAAyB;IAEzB,OAAO,qBAAqB,CAAC,IAAI,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;AAC9E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/combineLatest.js b/node_modules/rxjs/dist/esm/internal/observable/combineLatest.js deleted file mode 100644 index f5d10fd..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/combineLatest.js +++ /dev/null @@ -1,62 +0,0 @@ -import { Observable } from '../Observable'; -import { argsArgArrayOrObject } from '../util/argsArgArrayOrObject'; -import { from } from './from'; -import { identity } from '../util/identity'; -import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; -import { popResultSelector, popScheduler } from '../util/args'; -import { createObject } from '../util/createObject'; -import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; -import { executeSchedule } from '../util/executeSchedule'; -export function combineLatest(...args) { - const scheduler = popScheduler(args); - const resultSelector = popResultSelector(args); - const { args: observables, keys } = argsArgArrayOrObject(args); - if (observables.length === 0) { - return from([], scheduler); - } - const result = new Observable(combineLatestInit(observables, scheduler, keys - ? - (values) => createObject(keys, values) - : - identity)); - return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result; -} -export function combineLatestInit(observables, scheduler, valueTransform = identity) { - return (subscriber) => { - maybeSchedule(scheduler, () => { - const { length } = observables; - const values = new Array(length); - let active = length; - let remainingFirstValues = length; - for (let i = 0; i < length; i++) { - maybeSchedule(scheduler, () => { - const source = from(observables[i], scheduler); - let hasFirstValue = false; - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - values[i] = value; - if (!hasFirstValue) { - hasFirstValue = true; - remainingFirstValues--; - } - if (!remainingFirstValues) { - subscriber.next(valueTransform(values.slice())); - } - }, () => { - if (!--active) { - subscriber.complete(); - } - })); - }, subscriber); - } - }, subscriber); - }; -} -function maybeSchedule(scheduler, execute, subscription) { - if (scheduler) { - executeSchedule(subscription, scheduler, execute); - } - else { - execute(); - } -} -//# sourceMappingURL=combineLatest.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/combineLatest.js.map b/node_modules/rxjs/dist/esm/internal/observable/combineLatest.js.map deleted file mode 100644 index 621e172..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/combineLatest.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"combineLatest.js","sourceRoot":"","sources":["../../../../src/internal/observable/combineLatest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAwL1D,MAAM,UAAU,aAAa,CAAoC,GAAG,IAAW;IAC7E,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,MAAM,cAAc,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAE/C,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAE/D,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;QAI5B,OAAO,IAAI,CAAC,EAAE,EAAE,SAAgB,CAAC,CAAC;KACnC;IAED,MAAM,MAAM,GAAG,IAAI,UAAU,CAC3B,iBAAiB,CACf,WAAoD,EACpD,SAAS,EACT,IAAI;QACF,CAAC;YACC,CAAC,MAAM,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC;QACxC,CAAC;YACC,QAAQ,CACb,CACF,CAAC;IAEF,OAAO,cAAc,CAAC,CAAC,CAAE,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAmB,CAAC,CAAC,CAAC,MAAM,CAAC;AACpG,CAAC;AAED,MAAM,UAAU,iBAAiB,CAC/B,WAAmC,EACnC,SAAyB,EACzB,iBAAyC,QAAQ;IAEjD,OAAO,CAAC,UAA2B,EAAE,EAAE;QAGrC,aAAa,CACX,SAAS,EACT,GAAG,EAAE;YACH,MAAM,EAAE,MAAM,EAAE,GAAG,WAAW,CAAC;YAE/B,MAAM,MAAM,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;YAGjC,IAAI,MAAM,GAAG,MAAM,CAAC;YAIpB,IAAI,oBAAoB,GAAG,MAAM,CAAC;YAGlC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;gBAC/B,aAAa,CACX,SAAS,EACT,GAAG,EAAE;oBACH,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,SAAgB,CAAC,CAAC;oBACtD,IAAI,aAAa,GAAG,KAAK,CAAC;oBAC1B,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;wBAER,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;wBAClB,IAAI,CAAC,aAAa,EAAE;4BAElB,aAAa,GAAG,IAAI,CAAC;4BACrB,oBAAoB,EAAE,CAAC;yBACxB;wBACD,IAAI,CAAC,oBAAoB,EAAE;4BAGzB,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;yBACjD;oBACH,CAAC,EACD,GAAG,EAAE;wBACH,IAAI,CAAC,EAAE,MAAM,EAAE;4BAGb,UAAU,CAAC,QAAQ,EAAE,CAAC;yBACvB;oBACH,CAAC,CACF,CACF,CAAC;gBACJ,CAAC,EACD,UAAU,CACX,CAAC;aACH;QACH,CAAC,EACD,UAAU,CACX,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAMD,SAAS,aAAa,CAAC,SAAoC,EAAE,OAAmB,EAAE,YAA0B;IAC1G,IAAI,SAAS,EAAE;QACb,eAAe,CAAC,YAAY,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;KACnD;SAAM;QACL,OAAO,EAAE,CAAC;KACX;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/concat.js b/node_modules/rxjs/dist/esm/internal/observable/concat.js deleted file mode 100644 index f2706e0..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/concat.js +++ /dev/null @@ -1,7 +0,0 @@ -import { concatAll } from '../operators/concatAll'; -import { popScheduler } from '../util/args'; -import { from } from './from'; -export function concat(...args) { - return concatAll()(from(args, popScheduler(args))); -} -//# sourceMappingURL=concat.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/concat.js.map b/node_modules/rxjs/dist/esm/internal/observable/concat.js.map deleted file mode 100644 index 40fe68c..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/concat.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concat.js","sourceRoot":"","sources":["../../../../src/internal/observable/concat.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AA4G9B,MAAM,UAAU,MAAM,CAAC,GAAG,IAAW;IACnC,OAAO,SAAS,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACrD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/connectable.js b/node_modules/rxjs/dist/esm/internal/observable/connectable.js deleted file mode 100644 index c4cb530..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/connectable.js +++ /dev/null @@ -1,26 +0,0 @@ -import { Subject } from '../Subject'; -import { Observable } from '../Observable'; -import { defer } from './defer'; -const DEFAULT_CONFIG = { - connector: () => new Subject(), - resetOnDisconnect: true, -}; -export function connectable(source, config = DEFAULT_CONFIG) { - let connection = null; - const { connector, resetOnDisconnect = true } = config; - let subject = connector(); - const result = new Observable((subscriber) => { - return subject.subscribe(subscriber); - }); - result.connect = () => { - if (!connection || connection.closed) { - connection = defer(() => source).subscribe(subject); - if (resetOnDisconnect) { - connection.add(() => (subject = connector())); - } - } - return connection; - }; - return result; -} -//# sourceMappingURL=connectable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/connectable.js.map b/node_modules/rxjs/dist/esm/internal/observable/connectable.js.map deleted file mode 100644 index 0721330..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/connectable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"connectable.js","sourceRoot":"","sources":["../../../../src/internal/observable/connectable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAsBhC,MAAM,cAAc,GAA+B;IACjD,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,OAAO,EAAW;IACvC,iBAAiB,EAAE,IAAI;CACxB,CAAC;AAUF,MAAM,UAAU,WAAW,CAAI,MAA0B,EAAE,SAA+B,cAAc;IAEtG,IAAI,UAAU,GAAwB,IAAI,CAAC;IAC3C,MAAM,EAAE,SAAS,EAAE,iBAAiB,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;IACvD,IAAI,OAAO,GAAG,SAAS,EAAE,CAAC;IAE1B,MAAM,MAAM,GAAQ,IAAI,UAAU,CAAI,CAAC,UAAU,EAAE,EAAE;QACnD,OAAO,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;IAKH,MAAM,CAAC,OAAO,GAAG,GAAG,EAAE;QACpB,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,EAAE;YACpC,UAAU,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;YACpD,IAAI,iBAAiB,EAAE;gBACrB,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,GAAG,SAAS,EAAE,CAAC,CAAC,CAAC;aAC/C;SACF;QACD,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/defer.js b/node_modules/rxjs/dist/esm/internal/observable/defer.js deleted file mode 100644 index 0dd47a3..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/defer.js +++ /dev/null @@ -1,8 +0,0 @@ -import { Observable } from '../Observable'; -import { innerFrom } from './innerFrom'; -export function defer(observableFactory) { - return new Observable((subscriber) => { - innerFrom(observableFactory()).subscribe(subscriber); - }); -} -//# sourceMappingURL=defer.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/defer.js.map b/node_modules/rxjs/dist/esm/internal/observable/defer.js.map deleted file mode 100644 index e51b4a3..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/defer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defer.js","sourceRoot":"","sources":["../../../../src/internal/observable/defer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAiDxC,MAAM,UAAU,KAAK,CAAiC,iBAA0B;IAC9E,OAAO,IAAI,UAAU,CAAqB,CAAC,UAAU,EAAE,EAAE;QACvD,SAAS,CAAC,iBAAiB,EAAE,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/dom/WebSocketSubject.js b/node_modules/rxjs/dist/esm/internal/observable/dom/WebSocketSubject.js deleted file mode 100644 index 7a61722..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/dom/WebSocketSubject.js +++ /dev/null @@ -1,214 +0,0 @@ -import { Subject, AnonymousSubject } from '../../Subject'; -import { Subscriber } from '../../Subscriber'; -import { Observable } from '../../Observable'; -import { Subscription } from '../../Subscription'; -import { ReplaySubject } from '../../ReplaySubject'; -const DEFAULT_WEBSOCKET_CONFIG = { - url: '', - deserializer: (e) => JSON.parse(e.data), - serializer: (value) => JSON.stringify(value), -}; -const WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }'; -export class WebSocketSubject extends AnonymousSubject { - constructor(urlConfigOrSource, destination) { - super(); - this._socket = null; - if (urlConfigOrSource instanceof Observable) { - this.destination = destination; - this.source = urlConfigOrSource; - } - else { - const config = (this._config = Object.assign({}, DEFAULT_WEBSOCKET_CONFIG)); - this._output = new Subject(); - if (typeof urlConfigOrSource === 'string') { - config.url = urlConfigOrSource; - } - else { - for (const key in urlConfigOrSource) { - if (urlConfigOrSource.hasOwnProperty(key)) { - config[key] = urlConfigOrSource[key]; - } - } - } - if (!config.WebSocketCtor && WebSocket) { - config.WebSocketCtor = WebSocket; - } - else if (!config.WebSocketCtor) { - throw new Error('no WebSocket constructor can be found'); - } - this.destination = new ReplaySubject(); - } - } - lift(operator) { - const sock = new WebSocketSubject(this._config, this.destination); - sock.operator = operator; - sock.source = this; - return sock; - } - _resetState() { - this._socket = null; - if (!this.source) { - this.destination = new ReplaySubject(); - } - this._output = new Subject(); - } - multiplex(subMsg, unsubMsg, messageFilter) { - const self = this; - return new Observable((observer) => { - try { - self.next(subMsg()); - } - catch (err) { - observer.error(err); - } - const subscription = self.subscribe({ - next: (x) => { - try { - if (messageFilter(x)) { - observer.next(x); - } - } - catch (err) { - observer.error(err); - } - }, - error: (err) => observer.error(err), - complete: () => observer.complete(), - }); - return () => { - try { - self.next(unsubMsg()); - } - catch (err) { - observer.error(err); - } - subscription.unsubscribe(); - }; - }); - } - _connectSocket() { - const { WebSocketCtor, protocol, url, binaryType } = this._config; - const observer = this._output; - let socket = null; - try { - socket = protocol ? new WebSocketCtor(url, protocol) : new WebSocketCtor(url); - this._socket = socket; - if (binaryType) { - this._socket.binaryType = binaryType; - } - } - catch (e) { - observer.error(e); - return; - } - const subscription = new Subscription(() => { - this._socket = null; - if (socket && socket.readyState === 1) { - socket.close(); - } - }); - socket.onopen = (evt) => { - const { _socket } = this; - if (!_socket) { - socket.close(); - this._resetState(); - return; - } - const { openObserver } = this._config; - if (openObserver) { - openObserver.next(evt); - } - const queue = this.destination; - this.destination = Subscriber.create((x) => { - if (socket.readyState === 1) { - try { - const { serializer } = this._config; - socket.send(serializer(x)); - } - catch (e) { - this.destination.error(e); - } - } - }, (err) => { - const { closingObserver } = this._config; - if (closingObserver) { - closingObserver.next(undefined); - } - if (err && err.code) { - socket.close(err.code, err.reason); - } - else { - observer.error(new TypeError(WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT)); - } - this._resetState(); - }, () => { - const { closingObserver } = this._config; - if (closingObserver) { - closingObserver.next(undefined); - } - socket.close(); - this._resetState(); - }); - if (queue && queue instanceof ReplaySubject) { - subscription.add(queue.subscribe(this.destination)); - } - }; - socket.onerror = (e) => { - this._resetState(); - observer.error(e); - }; - socket.onclose = (e) => { - if (socket === this._socket) { - this._resetState(); - } - const { closeObserver } = this._config; - if (closeObserver) { - closeObserver.next(e); - } - if (e.wasClean) { - observer.complete(); - } - else { - observer.error(e); - } - }; - socket.onmessage = (e) => { - try { - const { deserializer } = this._config; - observer.next(deserializer(e)); - } - catch (err) { - observer.error(err); - } - }; - } - _subscribe(subscriber) { - const { source } = this; - if (source) { - return source.subscribe(subscriber); - } - if (!this._socket) { - this._connectSocket(); - } - this._output.subscribe(subscriber); - subscriber.add(() => { - const { _socket } = this; - if (this._output.observers.length === 0) { - if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) { - _socket.close(); - } - this._resetState(); - } - }); - return subscriber; - } - unsubscribe() { - const { _socket } = this; - if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) { - _socket.close(); - } - this._resetState(); - super.unsubscribe(); - } -} -//# sourceMappingURL=WebSocketSubject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/dom/WebSocketSubject.js.map b/node_modules/rxjs/dist/esm/internal/observable/dom/WebSocketSubject.js.map deleted file mode 100644 index 0a1ef94..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/dom/WebSocketSubject.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"WebSocketSubject.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/WebSocketSubject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AA4IpD,MAAM,wBAAwB,GAAgC;IAC5D,GAAG,EAAE,EAAE;IACP,YAAY,EAAE,CAAC,CAAe,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IACrD,UAAU,EAAE,CAAC,KAAU,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;CAClD,CAAC;AAEF,MAAM,qCAAqC,GACzC,mIAAmI,CAAC;AAItI,MAAM,OAAO,gBAAoB,SAAQ,gBAAmB;IAU1D,YAAY,iBAAqE,EAAE,WAAyB;QAC1G,KAAK,EAAE,CAAC;QAHF,YAAO,GAAqB,IAAI,CAAC;QAIvC,IAAI,iBAAiB,YAAY,UAAU,EAAE;YAC3C,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;YAC/B,IAAI,CAAC,MAAM,GAAG,iBAAkC,CAAC;SAClD;aAAM;YACL,MAAM,MAAM,GAAG,CAAC,IAAI,CAAC,OAAO,qBAAQ,wBAAwB,CAAE,CAAC,CAAC;YAChE,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,EAAK,CAAC;YAChC,IAAI,OAAO,iBAAiB,KAAK,QAAQ,EAAE;gBACzC,MAAM,CAAC,GAAG,GAAG,iBAAiB,CAAC;aAChC;iBAAM;gBACL,KAAK,MAAM,GAAG,IAAI,iBAAiB,EAAE;oBACnC,IAAI,iBAAiB,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;wBACxC,MAAc,CAAC,GAAG,CAAC,GAAI,iBAAyB,CAAC,GAAG,CAAC,CAAC;qBACxD;iBACF;aACF;YAED,IAAI,CAAC,MAAM,CAAC,aAAa,IAAI,SAAS,EAAE;gBACtC,MAAM,CAAC,aAAa,GAAG,SAAS,CAAC;aAClC;iBAAM,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE;gBAChC,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;aAC1D;YACD,IAAI,CAAC,WAAW,GAAG,IAAI,aAAa,EAAE,CAAC;SACxC;IACH,CAAC;IAGD,IAAI,CAAI,QAAwB;QAC9B,MAAM,IAAI,GAAG,IAAI,gBAAgB,CAAI,IAAI,CAAC,OAAsC,EAAE,IAAI,CAAC,WAAkB,CAAC,CAAC;QAC3G,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,WAAW;QACjB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,IAAI,CAAC,WAAW,GAAG,IAAI,aAAa,EAAE,CAAC;SACxC;QACD,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,EAAK,CAAC;IAClC,CAAC;IAoBD,SAAS,CAAC,MAAiB,EAAE,QAAmB,EAAE,aAAoC;QACpF,MAAM,IAAI,GAAG,IAAI,CAAC;QAClB,OAAO,IAAI,UAAU,CAAC,CAAC,QAAqB,EAAE,EAAE;YAC9C,IAAI;gBACF,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;aACrB;YAAC,OAAO,GAAG,EAAE;gBACZ,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aACrB;YAED,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC;gBAClC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE;oBACV,IAAI;wBACF,IAAI,aAAa,CAAC,CAAC,CAAC,EAAE;4BACpB,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;yBAClB;qBACF;oBAAC,OAAO,GAAG,EAAE;wBACZ,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;qBACrB;gBACH,CAAC;gBACD,KAAK,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC;gBACnC,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE;aACpC,CAAC,CAAC;YAEH,OAAO,GAAG,EAAE;gBACV,IAAI;oBACF,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;iBACvB;gBAAC,OAAO,GAAG,EAAE;oBACZ,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACrB;gBACD,YAAY,CAAC,WAAW,EAAE,CAAC;YAC7B,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,cAAc;QACpB,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QAClE,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC;QAE9B,IAAI,MAAM,GAAqB,IAAI,CAAC;QACpC,IAAI;YACF,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,aAAc,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,aAAc,CAAC,GAAG,CAAC,CAAC;YAChF,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;YACtB,IAAI,UAAU,EAAE;gBACd,IAAI,CAAC,OAAO,CAAC,UAAU,GAAG,UAAU,CAAC;aACtC;SACF;QAAC,OAAO,CAAC,EAAE;YACV,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAClB,OAAO;SACR;QAED,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,GAAG,EAAE;YACzC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YACpB,IAAI,MAAM,IAAI,MAAM,CAAC,UAAU,KAAK,CAAC,EAAE;gBACrC,MAAM,CAAC,KAAK,EAAE,CAAC;aAChB;QACH,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,GAAG,CAAC,GAAU,EAAE,EAAE;YAC7B,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;YACzB,IAAI,CAAC,OAAO,EAAE;gBACZ,MAAO,CAAC,KAAK,EAAE,CAAC;gBAChB,IAAI,CAAC,WAAW,EAAE,CAAC;gBACnB,OAAO;aACR;YACD,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;YACtC,IAAI,YAAY,EAAE;gBAChB,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aACxB;YAED,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC;YAE/B,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,MAAM,CAClC,CAAC,CAAC,EAAE,EAAE;gBACJ,IAAI,MAAO,CAAC,UAAU,KAAK,CAAC,EAAE;oBAC5B,IAAI;wBACF,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;wBACpC,MAAO,CAAC,IAAI,CAAC,UAAW,CAAC,CAAE,CAAC,CAAC,CAAC;qBAC/B;oBAAC,OAAO,CAAC,EAAE;wBACV,IAAI,CAAC,WAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;qBAC5B;iBACF;YACH,CAAC,EACD,CAAC,GAAG,EAAE,EAAE;gBACN,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;gBACzC,IAAI,eAAe,EAAE;oBACnB,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;iBACjC;gBACD,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE;oBACnB,MAAO,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;iBACrC;qBAAM;oBACL,QAAQ,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,qCAAqC,CAAC,CAAC,CAAC;iBACtE;gBACD,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,CAAC,EACD,GAAG,EAAE;gBACH,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;gBACzC,IAAI,eAAe,EAAE;oBACnB,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;iBACjC;gBACD,MAAO,CAAC,KAAK,EAAE,CAAC;gBAChB,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,CAAC,CACiB,CAAC;YAErB,IAAI,KAAK,IAAI,KAAK,YAAY,aAAa,EAAE;gBAC3C,YAAY,CAAC,GAAG,CAAE,KAA0B,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;aAC3E;QACH,CAAC,CAAC;QAEF,MAAM,CAAC,OAAO,GAAG,CAAC,CAAQ,EAAE,EAAE;YAC5B,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC,CAAC;QAEF,MAAM,CAAC,OAAO,GAAG,CAAC,CAAa,EAAE,EAAE;YACjC,IAAI,MAAM,KAAK,IAAI,CAAC,OAAO,EAAE;gBAC3B,IAAI,CAAC,WAAW,EAAE,CAAC;aACpB;YACD,MAAM,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;YACvC,IAAI,aAAa,EAAE;gBACjB,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aACvB;YACD,IAAI,CAAC,CAAC,QAAQ,EAAE;gBACd,QAAQ,CAAC,QAAQ,EAAE,CAAC;aACrB;iBAAM;gBACL,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;aACnB;QACH,CAAC,CAAC;QAEF,MAAM,CAAC,SAAS,GAAG,CAAC,CAAe,EAAE,EAAE;YACrC,IAAI;gBACF,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;gBACtC,QAAQ,CAAC,IAAI,CAAC,YAAa,CAAC,CAAC,CAAC,CAAC,CAAC;aACjC;YAAC,OAAO,GAAG,EAAE;gBACZ,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aACrB;QACH,CAAC,CAAC;IACJ,CAAC;IAGS,UAAU,CAAC,UAAyB;QAC5C,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QACxB,IAAI,MAAM,EAAE;YACV,OAAO,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;SACrC;QACD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACjB,IAAI,CAAC,cAAc,EAAE,CAAC;SACvB;QACD,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QACnC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE;YAClB,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;YACzB,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;gBACvC,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,KAAK,CAAC,IAAI,OAAO,CAAC,UAAU,KAAK,CAAC,CAAC,EAAE;oBACrE,OAAO,CAAC,KAAK,EAAE,CAAC;iBACjB;gBACD,IAAI,CAAC,WAAW,EAAE,CAAC;aACpB;QACH,CAAC,CAAC,CAAC;QACH,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,WAAW;QACT,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;QACzB,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,KAAK,CAAC,IAAI,OAAO,CAAC,UAAU,KAAK,CAAC,CAAC,EAAE;YACrE,OAAO,CAAC,KAAK,EAAE,CAAC;SACjB;QACD,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,KAAK,CAAC,WAAW,EAAE,CAAC;IACtB,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/dom/animationFrames.js b/node_modules/rxjs/dist/esm/internal/observable/dom/animationFrames.js deleted file mode 100644 index d29825f..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/dom/animationFrames.js +++ /dev/null @@ -1,34 +0,0 @@ -import { Observable } from '../../Observable'; -import { performanceTimestampProvider } from '../../scheduler/performanceTimestampProvider'; -import { animationFrameProvider } from '../../scheduler/animationFrameProvider'; -export function animationFrames(timestampProvider) { - return timestampProvider ? animationFramesFactory(timestampProvider) : DEFAULT_ANIMATION_FRAMES; -} -function animationFramesFactory(timestampProvider) { - return new Observable((subscriber) => { - const provider = timestampProvider || performanceTimestampProvider; - const start = provider.now(); - let id = 0; - const run = () => { - if (!subscriber.closed) { - id = animationFrameProvider.requestAnimationFrame((timestamp) => { - id = 0; - const now = provider.now(); - subscriber.next({ - timestamp: timestampProvider ? now : timestamp, - elapsed: now - start, - }); - run(); - }); - } - }; - run(); - return () => { - if (id) { - animationFrameProvider.cancelAnimationFrame(id); - } - }; - }); -} -const DEFAULT_ANIMATION_FRAMES = animationFramesFactory(); -//# sourceMappingURL=animationFrames.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/dom/animationFrames.js.map b/node_modules/rxjs/dist/esm/internal/observable/dom/animationFrames.js.map deleted file mode 100644 index 56c16cd..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/dom/animationFrames.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"animationFrames.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/animationFrames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAuEhF,MAAM,UAAU,eAAe,CAAC,iBAAqC;IACnE,OAAO,iBAAiB,CAAC,CAAC,CAAC,sBAAsB,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,wBAAwB,CAAC;AAClG,CAAC;AAMD,SAAS,sBAAsB,CAAC,iBAAqC;IACnE,OAAO,IAAI,UAAU,CAAyC,CAAC,UAAU,EAAE,EAAE;QAI3E,MAAM,QAAQ,GAAG,iBAAiB,IAAI,4BAA4B,CAAC;QAMnE,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC;QAE7B,IAAI,EAAE,GAAG,CAAC,CAAC;QACX,MAAM,GAAG,GAAG,GAAG,EAAE;YACf,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;gBACtB,EAAE,GAAG,sBAAsB,CAAC,qBAAqB,CAAC,CAAC,SAAuC,EAAE,EAAE;oBAC5F,EAAE,GAAG,CAAC,CAAC;oBAQP,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC;oBAC3B,UAAU,CAAC,IAAI,CAAC;wBACd,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS;wBAC9C,OAAO,EAAE,GAAG,GAAG,KAAK;qBACrB,CAAC,CAAC;oBACH,GAAG,EAAE,CAAC;gBACR,CAAC,CAAC,CAAC;aACJ;QACH,CAAC,CAAC;QAEF,GAAG,EAAE,CAAC;QAEN,OAAO,GAAG,EAAE;YACV,IAAI,EAAE,EAAE;gBACN,sBAAsB,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAC;aACjD;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAMD,MAAM,wBAAwB,GAAG,sBAAsB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/dom/fetch.js b/node_modules/rxjs/dist/esm/internal/observable/dom/fetch.js deleted file mode 100644 index 48b0af3..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/dom/fetch.js +++ /dev/null @@ -1,53 +0,0 @@ -import { __rest } from "tslib"; -import { createOperatorSubscriber } from '../../operators/OperatorSubscriber'; -import { Observable } from '../../Observable'; -import { innerFrom } from '../../observable/innerFrom'; -export function fromFetch(input, initWithSelector = {}) { - const { selector } = initWithSelector, init = __rest(initWithSelector, ["selector"]); - return new Observable((subscriber) => { - const controller = new AbortController(); - const { signal } = controller; - let abortable = true; - const { signal: outerSignal } = init; - if (outerSignal) { - if (outerSignal.aborted) { - controller.abort(); - } - else { - const outerSignalHandler = () => { - if (!signal.aborted) { - controller.abort(); - } - }; - outerSignal.addEventListener('abort', outerSignalHandler); - subscriber.add(() => outerSignal.removeEventListener('abort', outerSignalHandler)); - } - } - const perSubscriberInit = Object.assign(Object.assign({}, init), { signal }); - const handleError = (err) => { - abortable = false; - subscriber.error(err); - }; - fetch(input, perSubscriberInit) - .then((response) => { - if (selector) { - innerFrom(selector(response)).subscribe(createOperatorSubscriber(subscriber, undefined, () => { - abortable = false; - subscriber.complete(); - }, handleError)); - } - else { - abortable = false; - subscriber.next(response); - subscriber.complete(); - } - }) - .catch(handleError); - return () => { - if (abortable) { - controller.abort(); - } - }; - }); -} -//# sourceMappingURL=fetch.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/dom/fetch.js.map b/node_modules/rxjs/dist/esm/internal/observable/dom/fetch.js.map deleted file mode 100644 index 1418334..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/dom/fetch.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/fetch.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AA4FvD,MAAM,UAAU,SAAS,CACvB,KAAuB,EACvB,mBAEI,EAAE;IAEN,MAAM,EAAE,QAAQ,KAAc,gBAAgB,EAAzB,IAAI,UAAK,gBAAgB,EAAxC,YAAqB,CAAmB,CAAC;IAC/C,OAAO,IAAI,UAAU,CAAe,CAAC,UAAU,EAAE,EAAE;QAKjD,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;QACzC,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC;QAK9B,IAAI,SAAS,GAAG,IAAI,CAAC;QAKrB,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;QACrC,IAAI,WAAW,EAAE;YACf,IAAI,WAAW,CAAC,OAAO,EAAE;gBACvB,UAAU,CAAC,KAAK,EAAE,CAAC;aACpB;iBAAM;gBAGL,MAAM,kBAAkB,GAAG,GAAG,EAAE;oBAC9B,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;wBACnB,UAAU,CAAC,KAAK,EAAE,CAAC;qBACpB;gBACH,CAAC,CAAC;gBACF,WAAW,CAAC,gBAAgB,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;gBAC1D,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,mBAAmB,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC;aACpF;SACF;QAOD,MAAM,iBAAiB,mCAAqB,IAAI,KAAE,MAAM,GAAE,CAAC;QAE3D,MAAM,WAAW,GAAG,CAAC,GAAQ,EAAE,EAAE;YAC/B,SAAS,GAAG,KAAK,CAAC;YAClB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,CAAC;QAEF,KAAK,CAAC,KAAK,EAAE,iBAAiB,CAAC;aAC5B,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YACjB,IAAI,QAAQ,EAAE;gBAIZ,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CACrC,wBAAwB,CACtB,UAAU,EAEV,SAAS,EAET,GAAG,EAAE;oBACH,SAAS,GAAG,KAAK,CAAC;oBAClB,UAAU,CAAC,QAAQ,EAAE,CAAC;gBACxB,CAAC,EACD,WAAW,CACZ,CACF,CAAC;aACH;iBAAM;gBACL,SAAS,GAAG,KAAK,CAAC;gBAClB,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAC1B,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,CAAC;aACD,KAAK,CAAC,WAAW,CAAC,CAAC;QAEtB,OAAO,GAAG,EAAE;YACV,IAAI,SAAS,EAAE;gBACb,UAAU,CAAC,KAAK,EAAE,CAAC;aACpB;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/dom/webSocket.js b/node_modules/rxjs/dist/esm/internal/observable/dom/webSocket.js deleted file mode 100644 index 73a51ab..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/dom/webSocket.js +++ /dev/null @@ -1,5 +0,0 @@ -import { WebSocketSubject } from './WebSocketSubject'; -export function webSocket(urlConfigOrSource) { - return new WebSocketSubject(urlConfigOrSource); -} -//# sourceMappingURL=webSocket.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/dom/webSocket.js.map b/node_modules/rxjs/dist/esm/internal/observable/dom/webSocket.js.map deleted file mode 100644 index f284743..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/dom/webSocket.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"webSocket.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/webSocket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAA0B,MAAM,oBAAoB,CAAC;AA8J9E,MAAM,UAAU,SAAS,CAAI,iBAAqD;IAChF,OAAO,IAAI,gBAAgB,CAAI,iBAAiB,CAAC,CAAC;AACpD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/empty.js b/node_modules/rxjs/dist/esm/internal/observable/empty.js deleted file mode 100644 index 13be736..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/empty.js +++ /dev/null @@ -1,9 +0,0 @@ -import { Observable } from '../Observable'; -export const EMPTY = new Observable((subscriber) => subscriber.complete()); -export function empty(scheduler) { - return scheduler ? emptyScheduled(scheduler) : EMPTY; -} -function emptyScheduled(scheduler) { - return new Observable((subscriber) => scheduler.schedule(() => subscriber.complete())); -} -//# sourceMappingURL=empty.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/empty.js.map b/node_modules/rxjs/dist/esm/internal/observable/empty.js.map deleted file mode 100644 index 8eb1e1f..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/empty.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"empty.js","sourceRoot":"","sources":["../../../../src/internal/observable/empty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAiE3C,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,UAAU,CAAQ,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;AAOlF,MAAM,UAAU,KAAK,CAAC,SAAyB;IAC7C,OAAO,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AACvD,CAAC;AAED,SAAS,cAAc,CAAC,SAAwB;IAC9C,OAAO,IAAI,UAAU,CAAQ,CAAC,UAAU,EAAE,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;AAChG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/forkJoin.js b/node_modules/rxjs/dist/esm/internal/observable/forkJoin.js deleted file mode 100644 index fe5b095..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/forkJoin.js +++ /dev/null @@ -1,40 +0,0 @@ -import { Observable } from '../Observable'; -import { argsArgArrayOrObject } from '../util/argsArgArrayOrObject'; -import { innerFrom } from './innerFrom'; -import { popResultSelector } from '../util/args'; -import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; -import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; -import { createObject } from '../util/createObject'; -export function forkJoin(...args) { - const resultSelector = popResultSelector(args); - const { args: sources, keys } = argsArgArrayOrObject(args); - const result = new Observable((subscriber) => { - const { length } = sources; - if (!length) { - subscriber.complete(); - return; - } - const values = new Array(length); - let remainingCompletions = length; - let remainingEmissions = length; - for (let sourceIndex = 0; sourceIndex < length; sourceIndex++) { - let hasValue = false; - innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, (value) => { - if (!hasValue) { - hasValue = true; - remainingEmissions--; - } - values[sourceIndex] = value; - }, () => remainingCompletions--, undefined, () => { - if (!remainingCompletions || !hasValue) { - if (!remainingEmissions) { - subscriber.next(keys ? createObject(keys, values) : values); - } - subscriber.complete(); - } - })); - } - }); - return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result; -} -//# sourceMappingURL=forkJoin.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/forkJoin.js.map b/node_modules/rxjs/dist/esm/internal/observable/forkJoin.js.map deleted file mode 100644 index 1658dda..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/forkJoin.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"forkJoin.js","sourceRoot":"","sources":["../../../../src/internal/observable/forkJoin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAyIpD,MAAM,UAAU,QAAQ,CAAC,GAAG,IAAW;IACrC,MAAM,cAAc,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAC3D,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,CAAC,UAAU,EAAE,EAAE;QAC3C,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;QAC3B,IAAI,CAAC,MAAM,EAAE;YACX,UAAU,CAAC,QAAQ,EAAE,CAAC;YACtB,OAAO;SACR;QACD,MAAM,MAAM,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;QACjC,IAAI,oBAAoB,GAAG,MAAM,CAAC;QAClC,IAAI,kBAAkB,GAAG,MAAM,CAAC;QAChC,KAAK,IAAI,WAAW,GAAG,CAAC,EAAE,WAAW,GAAG,MAAM,EAAE,WAAW,EAAE,EAAE;YAC7D,IAAI,QAAQ,GAAG,KAAK,CAAC;YACrB,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CACvC,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;gBACR,IAAI,CAAC,QAAQ,EAAE;oBACb,QAAQ,GAAG,IAAI,CAAC;oBAChB,kBAAkB,EAAE,CAAC;iBACtB;gBACD,MAAM,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;YAC9B,CAAC,EACD,GAAG,EAAE,CAAC,oBAAoB,EAAE,EAC5B,SAAS,EACT,GAAG,EAAE;gBACH,IAAI,CAAC,oBAAoB,IAAI,CAAC,QAAQ,EAAE;oBACtC,IAAI,CAAC,kBAAkB,EAAE;wBACvB,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;qBAC7D;oBACD,UAAU,CAAC,QAAQ,EAAE,CAAC;iBACvB;YACH,CAAC,CACF,CACF,CAAC;SACH;IACH,CAAC,CAAC,CAAC;IACH,OAAO,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AACjF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/from.js b/node_modules/rxjs/dist/esm/internal/observable/from.js deleted file mode 100644 index 2b61be4..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/from.js +++ /dev/null @@ -1,6 +0,0 @@ -import { scheduled } from '../scheduled/scheduled'; -import { innerFrom } from './innerFrom'; -export function from(input, scheduler) { - return scheduler ? scheduled(input, scheduler) : innerFrom(input); -} -//# sourceMappingURL=from.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/from.js.map b/node_modules/rxjs/dist/esm/internal/observable/from.js.map deleted file mode 100644 index baf621f..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/from.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"from.js","sourceRoot":"","sources":["../../../../src/internal/observable/from.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAkGxC,MAAM,UAAU,IAAI,CAAI,KAAyB,EAAE,SAAyB;IAC1E,OAAO,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACpE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/fromEvent.js b/node_modules/rxjs/dist/esm/internal/observable/fromEvent.js deleted file mode 100644 index fbb95c9..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/fromEvent.js +++ /dev/null @@ -1,52 +0,0 @@ -import { innerFrom } from '../observable/innerFrom'; -import { Observable } from '../Observable'; -import { mergeMap } from '../operators/mergeMap'; -import { isArrayLike } from '../util/isArrayLike'; -import { isFunction } from '../util/isFunction'; -import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; -const nodeEventEmitterMethods = ['addListener', 'removeListener']; -const eventTargetMethods = ['addEventListener', 'removeEventListener']; -const jqueryMethods = ['on', 'off']; -export function fromEvent(target, eventName, options, resultSelector) { - if (isFunction(options)) { - resultSelector = options; - options = undefined; - } - if (resultSelector) { - return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector)); - } - const [add, remove] = isEventTarget(target) - ? eventTargetMethods.map((methodName) => (handler) => target[methodName](eventName, handler, options)) - : - isNodeStyleEventEmitter(target) - ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) - : isJQueryStyleEventEmitter(target) - ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) - : []; - if (!add) { - if (isArrayLike(target)) { - return mergeMap((subTarget) => fromEvent(subTarget, eventName, options))(innerFrom(target)); - } - } - if (!add) { - throw new TypeError('Invalid event target'); - } - return new Observable((subscriber) => { - const handler = (...args) => subscriber.next(1 < args.length ? args : args[0]); - add(handler); - return () => remove(handler); - }); -} -function toCommonHandlerRegistry(target, eventName) { - return (methodName) => (handler) => target[methodName](eventName, handler); -} -function isNodeStyleEventEmitter(target) { - return isFunction(target.addListener) && isFunction(target.removeListener); -} -function isJQueryStyleEventEmitter(target) { - return isFunction(target.on) && isFunction(target.off); -} -function isEventTarget(target) { - return isFunction(target.addEventListener) && isFunction(target.removeEventListener); -} -//# sourceMappingURL=fromEvent.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/fromEvent.js.map b/node_modules/rxjs/dist/esm/internal/observable/fromEvent.js.map deleted file mode 100644 index d617720..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/fromEvent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fromEvent.js","sourceRoot":"","sources":["../../../../src/internal/observable/fromEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,MAAM,uBAAuB,GAAG,CAAC,aAAa,EAAE,gBAAgB,CAAU,CAAC;AAC3E,MAAM,kBAAkB,GAAG,CAAC,kBAAkB,EAAE,qBAAqB,CAAU,CAAC;AAChF,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,KAAK,CAAU,CAAC;AAqO7C,MAAM,UAAU,SAAS,CACvB,MAAW,EACX,SAAiB,EACjB,OAAwD,EACxD,cAAsC;IAEtC,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE;QACvB,cAAc,GAAG,OAAO,CAAC;QACzB,OAAO,GAAG,SAAS,CAAC;KACrB;IACD,IAAI,cAAc,EAAE;QAClB,OAAO,SAAS,CAAI,MAAM,EAAE,SAAS,EAAE,OAA+B,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC;KAChH;IASD,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAEjB,aAAa,CAAC,MAAM,CAAC;QACnB,CAAC,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,OAAY,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,OAA+B,CAAC,CAAC;QACnI,CAAC;YACD,uBAAuB,CAAC,MAAM,CAAC;gBAC/B,CAAC,CAAC,uBAAuB,CAAC,GAAG,CAAC,uBAAuB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;gBACzE,CAAC,CAAC,yBAAyB,CAAC,MAAM,CAAC;oBACnC,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,uBAAuB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;oBAC/D,CAAC,CAAC,EAAE,CAAC;IAOT,IAAI,CAAC,GAAG,EAAE;QACR,IAAI,WAAW,CAAC,MAAM,CAAC,EAAE;YACvB,OAAO,QAAQ,CAAC,CAAC,SAAc,EAAE,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,SAAS,EAAE,OAA+B,CAAC,CAAC,CACnG,SAAS,CAAC,MAAM,CAAC,CACD,CAAC;SACpB;KACF;IAID,IAAI,CAAC,GAAG,EAAE;QACR,MAAM,IAAI,SAAS,CAAC,sBAAsB,CAAC,CAAC;KAC7C;IAED,OAAO,IAAI,UAAU,CAAI,CAAC,UAAU,EAAE,EAAE;QAItC,MAAM,OAAO,GAAG,CAAC,GAAG,IAAW,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAEtF,GAAG,CAAC,OAAO,CAAC,CAAC;QAEb,OAAO,GAAG,EAAE,CAAC,MAAO,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC;AASD,SAAS,uBAAuB,CAAC,MAAW,EAAE,SAAiB;IAC7D,OAAO,CAAC,UAAkB,EAAE,EAAE,CAAC,CAAC,OAAY,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AAC1F,CAAC;AAOD,SAAS,uBAAuB,CAAC,MAAW;IAC1C,OAAO,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;AAC7E,CAAC;AAOD,SAAS,yBAAyB,CAAC,MAAW;IAC5C,OAAO,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AACzD,CAAC;AAOD,SAAS,aAAa,CAAC,MAAW;IAChC,OAAO,UAAU,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;AACvF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/fromEventPattern.js b/node_modules/rxjs/dist/esm/internal/observable/fromEventPattern.js deleted file mode 100644 index 6ec311b..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/fromEventPattern.js +++ /dev/null @@ -1,14 +0,0 @@ -import { Observable } from '../Observable'; -import { isFunction } from '../util/isFunction'; -import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; -export function fromEventPattern(addHandler, removeHandler, resultSelector) { - if (resultSelector) { - return fromEventPattern(addHandler, removeHandler).pipe(mapOneOrManyArgs(resultSelector)); - } - return new Observable((subscriber) => { - const handler = (...e) => subscriber.next(e.length === 1 ? e[0] : e); - const retValue = addHandler(handler); - return isFunction(removeHandler) ? () => removeHandler(handler, retValue) : undefined; - }); -} -//# sourceMappingURL=fromEventPattern.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/fromEventPattern.js.map b/node_modules/rxjs/dist/esm/internal/observable/fromEventPattern.js.map deleted file mode 100644 index 4c1e6b2..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/fromEventPattern.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fromEventPattern.js","sourceRoot":"","sources":["../../../../src/internal/observable/fromEventPattern.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAsI5D,MAAM,UAAU,gBAAgB,CAC9B,UAA8C,EAC9C,aAAiE,EACjE,cAAsC;IAEtC,IAAI,cAAc,EAAE;QAClB,OAAO,gBAAgB,CAAI,UAAU,EAAE,aAAa,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC;KAC9F;IAED,OAAO,IAAI,UAAU,CAAU,CAAC,UAAU,EAAE,EAAE;QAC5C,MAAM,OAAO,GAAG,CAAC,GAAG,CAAM,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1E,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;QACrC,OAAO,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACxF,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/fromSubscribable.js b/node_modules/rxjs/dist/esm/internal/observable/fromSubscribable.js deleted file mode 100644 index bfc7c8c..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/fromSubscribable.js +++ /dev/null @@ -1,5 +0,0 @@ -import { Observable } from '../Observable'; -export function fromSubscribable(subscribable) { - return new Observable((subscriber) => subscribable.subscribe(subscriber)); -} -//# sourceMappingURL=fromSubscribable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/fromSubscribable.js.map b/node_modules/rxjs/dist/esm/internal/observable/fromSubscribable.js.map deleted file mode 100644 index 0725366..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/fromSubscribable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fromSubscribable.js","sourceRoot":"","sources":["../../../../src/internal/observable/fromSubscribable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAc3C,MAAM,UAAU,gBAAgB,CAAI,YAA6B;IAC/D,OAAO,IAAI,UAAU,CAAC,CAAC,UAAyB,EAAE,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;AAC3F,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/generate.js b/node_modules/rxjs/dist/esm/internal/observable/generate.js deleted file mode 100644 index 4d709c7..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/generate.js +++ /dev/null @@ -1,38 +0,0 @@ -import { identity } from '../util/identity'; -import { isScheduler } from '../util/isScheduler'; -import { defer } from './defer'; -import { scheduleIterable } from '../scheduled/scheduleIterable'; -export function generate(initialStateOrOptions, condition, iterate, resultSelectorOrScheduler, scheduler) { - let resultSelector; - let initialState; - if (arguments.length === 1) { - ({ - initialState, - condition, - iterate, - resultSelector = identity, - scheduler, - } = initialStateOrOptions); - } - else { - initialState = initialStateOrOptions; - if (!resultSelectorOrScheduler || isScheduler(resultSelectorOrScheduler)) { - resultSelector = identity; - scheduler = resultSelectorOrScheduler; - } - else { - resultSelector = resultSelectorOrScheduler; - } - } - function* gen() { - for (let state = initialState; !condition || condition(state); state = iterate(state)) { - yield resultSelector(state); - } - } - return defer((scheduler - ? - () => scheduleIterable(gen(), scheduler) - : - gen)); -} -//# sourceMappingURL=generate.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/generate.js.map b/node_modules/rxjs/dist/esm/internal/observable/generate.js.map deleted file mode 100644 index e44148d..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/generate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../../src/internal/observable/generate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA0UjE,MAAM,UAAU,QAAQ,CACtB,qBAAgD,EAChD,SAA4B,EAC5B,OAAwB,EACxB,yBAA4D,EAC5D,SAAyB;IAEzB,IAAI,cAAgC,CAAC;IACrC,IAAI,YAAe,CAAC;IAIpB,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;QAG1B,CAAC;YACC,YAAY;YACZ,SAAS;YACT,OAAO;YACP,cAAc,GAAG,QAA4B;YAC7C,SAAS;SACV,GAAG,qBAA8C,CAAC,CAAC;KACrD;SAAM;QAGL,YAAY,GAAG,qBAA0B,CAAC;QAC1C,IAAI,CAAC,yBAAyB,IAAI,WAAW,CAAC,yBAAyB,CAAC,EAAE;YACxE,cAAc,GAAG,QAA4B,CAAC;YAC9C,SAAS,GAAG,yBAA0C,CAAC;SACxD;aAAM;YACL,cAAc,GAAG,yBAA6C,CAAC;SAChE;KACF;IAGD,QAAQ,CAAC,CAAC,GAAG;QACX,KAAK,IAAI,KAAK,GAAG,YAAY,EAAE,CAAC,SAAS,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,OAAQ,CAAC,KAAK,CAAC,EAAE;YACtF,MAAM,cAAc,CAAC,KAAK,CAAC,CAAC;SAC7B;IACH,CAAC;IAGD,OAAO,KAAK,CACV,CAAC,SAAS;QACR,CAAC;YAEC,GAAG,EAAE,CAAC,gBAAgB,CAAC,GAAG,EAAE,EAAE,SAAU,CAAC;QAC3C,CAAC;YAEC,GAAG,CAA6B,CACrC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/iif.js b/node_modules/rxjs/dist/esm/internal/observable/iif.js deleted file mode 100644 index 8a204d6..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/iif.js +++ /dev/null @@ -1,5 +0,0 @@ -import { defer } from './defer'; -export function iif(condition, trueResult, falseResult) { - return defer(() => (condition() ? trueResult : falseResult)); -} -//# sourceMappingURL=iif.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/iif.js.map b/node_modules/rxjs/dist/esm/internal/observable/iif.js.map deleted file mode 100644 index a175051..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/iif.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"iif.js","sourceRoot":"","sources":["../../../../src/internal/observable/iif.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAiFhC,MAAM,UAAU,GAAG,CAAO,SAAwB,EAAE,UAA8B,EAAE,WAA+B;IACjH,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;AAC/D,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/innerFrom.js b/node_modules/rxjs/dist/esm/internal/observable/innerFrom.js deleted file mode 100644 index f315ce5..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/innerFrom.js +++ /dev/null @@ -1,110 +0,0 @@ -import { __asyncValues, __awaiter } from "tslib"; -import { isArrayLike } from '../util/isArrayLike'; -import { isPromise } from '../util/isPromise'; -import { Observable } from '../Observable'; -import { isInteropObservable } from '../util/isInteropObservable'; -import { isAsyncIterable } from '../util/isAsyncIterable'; -import { createInvalidObservableTypeError } from '../util/throwUnobservableError'; -import { isIterable } from '../util/isIterable'; -import { isReadableStreamLike, readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike'; -import { isFunction } from '../util/isFunction'; -import { reportUnhandledError } from '../util/reportUnhandledError'; -import { observable as Symbol_observable } from '../symbol/observable'; -export function innerFrom(input) { - if (input instanceof Observable) { - return input; - } - if (input != null) { - if (isInteropObservable(input)) { - return fromInteropObservable(input); - } - if (isArrayLike(input)) { - return fromArrayLike(input); - } - if (isPromise(input)) { - return fromPromise(input); - } - if (isAsyncIterable(input)) { - return fromAsyncIterable(input); - } - if (isIterable(input)) { - return fromIterable(input); - } - if (isReadableStreamLike(input)) { - return fromReadableStreamLike(input); - } - } - throw createInvalidObservableTypeError(input); -} -export function fromInteropObservable(obj) { - return new Observable((subscriber) => { - const obs = obj[Symbol_observable](); - if (isFunction(obs.subscribe)) { - return obs.subscribe(subscriber); - } - throw new TypeError('Provided object does not correctly implement Symbol.observable'); - }); -} -export function fromArrayLike(array) { - return new Observable((subscriber) => { - for (let i = 0; i < array.length && !subscriber.closed; i++) { - subscriber.next(array[i]); - } - subscriber.complete(); - }); -} -export function fromPromise(promise) { - return new Observable((subscriber) => { - promise - .then((value) => { - if (!subscriber.closed) { - subscriber.next(value); - subscriber.complete(); - } - }, (err) => subscriber.error(err)) - .then(null, reportUnhandledError); - }); -} -export function fromIterable(iterable) { - return new Observable((subscriber) => { - for (const value of iterable) { - subscriber.next(value); - if (subscriber.closed) { - return; - } - } - subscriber.complete(); - }); -} -export function fromAsyncIterable(asyncIterable) { - return new Observable((subscriber) => { - process(asyncIterable, subscriber).catch((err) => subscriber.error(err)); - }); -} -export function fromReadableStreamLike(readableStream) { - return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream)); -} -function process(asyncIterable, subscriber) { - var asyncIterable_1, asyncIterable_1_1; - var e_1, _a; - return __awaiter(this, void 0, void 0, function* () { - try { - for (asyncIterable_1 = __asyncValues(asyncIterable); asyncIterable_1_1 = yield asyncIterable_1.next(), !asyncIterable_1_1.done;) { - const value = asyncIterable_1_1.value; - subscriber.next(value); - if (subscriber.closed) { - return; - } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return)) yield _a.call(asyncIterable_1); - } - finally { if (e_1) throw e_1.error; } - } - subscriber.complete(); - }); -} -//# sourceMappingURL=innerFrom.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/innerFrom.js.map b/node_modules/rxjs/dist/esm/internal/observable/innerFrom.js.map deleted file mode 100644 index 69c1286..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/innerFrom.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"innerFrom.js","sourceRoot":"","sources":["../../../../src/internal/observable/innerFrom.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,kCAAkC,EAAE,MAAM,8BAA8B,CAAC;AAExG,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGvE,MAAM,UAAU,SAAS,CAAI,KAAyB;IACpD,IAAI,KAAK,YAAY,UAAU,EAAE;QAC/B,OAAO,KAAK,CAAC;KACd;IACD,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE;YAC9B,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;SACrC;QACD,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE;YACtB,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC;SAC7B;QACD,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;YACpB,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;SAC3B;QACD,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE;YAC1B,OAAO,iBAAiB,CAAC,KAAK,CAAC,CAAC;SACjC;QACD,IAAI,UAAU,CAAC,KAAK,CAAC,EAAE;YACrB,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;SAC5B;QACD,IAAI,oBAAoB,CAAC,KAAK,CAAC,EAAE;YAC/B,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC;SACtC;KACF;IAED,MAAM,gCAAgC,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC;AAMD,MAAM,UAAU,qBAAqB,CAAI,GAAQ;IAC/C,OAAO,IAAI,UAAU,CAAC,CAAC,UAAyB,EAAE,EAAE;QAClD,MAAM,GAAG,GAAG,GAAG,CAAC,iBAAiB,CAAC,EAAE,CAAC;QACrC,IAAI,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;YAC7B,OAAO,GAAG,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;SAClC;QAED,MAAM,IAAI,SAAS,CAAC,gEAAgE,CAAC,CAAC;IACxF,CAAC,CAAC,CAAC;AACL,CAAC;AASD,MAAM,UAAU,aAAa,CAAI,KAAmB;IAClD,OAAO,IAAI,UAAU,CAAC,CAAC,UAAyB,EAAE,EAAE;QAUlD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC3D,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;SAC3B;QACD,UAAU,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,WAAW,CAAI,OAAuB;IACpD,OAAO,IAAI,UAAU,CAAC,CAAC,UAAyB,EAAE,EAAE;QAClD,OAAO;aACJ,IAAI,CACH,CAAC,KAAK,EAAE,EAAE;YACR,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;gBACtB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,EACD,CAAC,GAAQ,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CACpC;aACA,IAAI,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,YAAY,CAAI,QAAqB;IACnD,OAAO,IAAI,UAAU,CAAC,CAAC,UAAyB,EAAE,EAAE;QAClD,KAAK,MAAM,KAAK,IAAI,QAAQ,EAAE;YAC5B,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACvB,IAAI,UAAU,CAAC,MAAM,EAAE;gBACrB,OAAO;aACR;SACF;QACD,UAAU,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAI,aAA+B;IAClE,OAAO,IAAI,UAAU,CAAC,CAAC,UAAyB,EAAE,EAAE;QAClD,OAAO,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAI,cAAqC;IAC7E,OAAO,iBAAiB,CAAC,kCAAkC,CAAC,cAAc,CAAC,CAAC,CAAC;AAC/E,CAAC;AAED,SAAe,OAAO,CAAI,aAA+B,EAAE,UAAyB;;;;;YAClF,KAA0B,kBAAA,cAAA,aAAa,CAAA;gBAA5B,MAAM,KAAK,0BAAA,CAAA;gBACpB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAGvB,IAAI,UAAU,CAAC,MAAM,EAAE;oBACrB,OAAO;iBACR;aACF;;;;;;;;;QACD,UAAU,CAAC,QAAQ,EAAE,CAAC;;CACvB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/interval.js b/node_modules/rxjs/dist/esm/internal/observable/interval.js deleted file mode 100644 index 6cec82a..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/interval.js +++ /dev/null @@ -1,9 +0,0 @@ -import { asyncScheduler } from '../scheduler/async'; -import { timer } from './timer'; -export function interval(period = 0, scheduler = asyncScheduler) { - if (period < 0) { - period = 0; - } - return timer(period, period, scheduler); -} -//# sourceMappingURL=interval.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/interval.js.map b/node_modules/rxjs/dist/esm/internal/observable/interval.js.map deleted file mode 100644 index 4ada823..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/interval.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"interval.js","sourceRoot":"","sources":["../../../../src/internal/observable/interval.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA8ChC,MAAM,UAAU,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,YAA2B,cAAc;IAC5E,IAAI,MAAM,GAAG,CAAC,EAAE;QAEd,MAAM,GAAG,CAAC,CAAC;KACZ;IAED,OAAO,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;AAC1C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/merge.js b/node_modules/rxjs/dist/esm/internal/observable/merge.js deleted file mode 100644 index 0275354..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/merge.js +++ /dev/null @@ -1,19 +0,0 @@ -import { mergeAll } from '../operators/mergeAll'; -import { innerFrom } from './innerFrom'; -import { EMPTY } from './empty'; -import { popNumber, popScheduler } from '../util/args'; -import { from } from './from'; -export function merge(...args) { - const scheduler = popScheduler(args); - const concurrent = popNumber(args, Infinity); - const sources = args; - return !sources.length - ? - EMPTY - : sources.length === 1 - ? - innerFrom(sources[0]) - : - mergeAll(concurrent)(from(sources, scheduler)); -} -//# sourceMappingURL=merge.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/merge.js.map b/node_modules/rxjs/dist/esm/internal/observable/merge.js.map deleted file mode 100644 index 46581ec..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/merge.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../../../src/internal/observable/merge.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAiF9B,MAAM,UAAU,KAAK,CAAC,GAAG,IAA2D;IAClF,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,MAAM,UAAU,GAAG,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC7C,MAAM,OAAO,GAAG,IAAkC,CAAC;IACnD,OAAO,CAAC,OAAO,CAAC,MAAM;QACpB,CAAC;YACC,KAAK;QACP,CAAC,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC;YACtB,CAAC;gBACC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YACvB,CAAC;gBACC,QAAQ,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;AACrD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/never.js b/node_modules/rxjs/dist/esm/internal/observable/never.js deleted file mode 100644 index ca45f75..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/never.js +++ /dev/null @@ -1,7 +0,0 @@ -import { Observable } from '../Observable'; -import { noop } from '../util/noop'; -export const NEVER = new Observable(noop); -export function never() { - return NEVER; -} -//# sourceMappingURL=never.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/never.js.map b/node_modules/rxjs/dist/esm/internal/observable/never.js.map deleted file mode 100644 index 7c323ad..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/never.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"never.js","sourceRoot":"","sources":["../../../../src/internal/observable/never.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAmCpC,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,UAAU,CAAQ,IAAI,CAAC,CAAC;AAKjD,MAAM,UAAU,KAAK;IACnB,OAAO,KAAK,CAAC;AACf,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/of.js b/node_modules/rxjs/dist/esm/internal/observable/of.js deleted file mode 100644 index 711d706..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/of.js +++ /dev/null @@ -1,7 +0,0 @@ -import { popScheduler } from '../util/args'; -import { from } from './from'; -export function of(...args) { - const scheduler = popScheduler(args); - return from(args, scheduler); -} -//# sourceMappingURL=of.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/of.js.map b/node_modules/rxjs/dist/esm/internal/observable/of.js.map deleted file mode 100644 index 97eb298..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/of.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"of.js","sourceRoot":"","sources":["../../../../src/internal/observable/of.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AA4E9B,MAAM,UAAU,EAAE,CAAI,GAAG,IAA8B;IACrD,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO,IAAI,CAAC,IAAW,EAAE,SAAS,CAAC,CAAC;AACtC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/onErrorResumeNext.js b/node_modules/rxjs/dist/esm/internal/observable/onErrorResumeNext.js deleted file mode 100644 index ef74377..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/onErrorResumeNext.js +++ /dev/null @@ -1,31 +0,0 @@ -import { Observable } from '../Observable'; -import { argsOrArgArray } from '../util/argsOrArgArray'; -import { OperatorSubscriber } from '../operators/OperatorSubscriber'; -import { noop } from '../util/noop'; -import { innerFrom } from './innerFrom'; -export function onErrorResumeNext(...sources) { - const nextSources = argsOrArgArray(sources); - return new Observable((subscriber) => { - let sourceIndex = 0; - const subscribeNext = () => { - if (sourceIndex < nextSources.length) { - let nextSource; - try { - nextSource = innerFrom(nextSources[sourceIndex++]); - } - catch (err) { - subscribeNext(); - return; - } - const innerSubscriber = new OperatorSubscriber(subscriber, undefined, noop, noop); - nextSource.subscribe(innerSubscriber); - innerSubscriber.add(subscribeNext); - } - else { - subscriber.complete(); - } - }; - subscribeNext(); - }); -} -//# sourceMappingURL=onErrorResumeNext.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/onErrorResumeNext.js.map b/node_modules/rxjs/dist/esm/internal/observable/onErrorResumeNext.js.map deleted file mode 100644 index dd28edd..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/onErrorResumeNext.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"onErrorResumeNext.js","sourceRoot":"","sources":["../../../../src/internal/observable/onErrorResumeNext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAmExC,MAAM,UAAU,iBAAiB,CAC/B,GAAG,OAAsE;IAEzE,MAAM,WAAW,GAA4B,cAAc,CAAC,OAAO,CAAQ,CAAC;IAE5E,OAAO,IAAI,UAAU,CAAC,CAAC,UAAU,EAAE,EAAE;QACnC,IAAI,WAAW,GAAG,CAAC,CAAC;QACpB,MAAM,aAAa,GAAG,GAAG,EAAE;YACzB,IAAI,WAAW,GAAG,WAAW,CAAC,MAAM,EAAE;gBACpC,IAAI,UAAiC,CAAC;gBACtC,IAAI;oBACF,UAAU,GAAG,SAAS,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;iBACpD;gBAAC,OAAO,GAAG,EAAE;oBACZ,aAAa,EAAE,CAAC;oBAChB,OAAO;iBACR;gBACD,MAAM,eAAe,GAAG,IAAI,kBAAkB,CAAC,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;gBAClF,UAAU,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;gBACtC,eAAe,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;aACpC;iBAAM;gBACL,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,CAAC;QACF,aAAa,EAAE,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/pairs.js b/node_modules/rxjs/dist/esm/internal/observable/pairs.js deleted file mode 100644 index 77cc110..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/pairs.js +++ /dev/null @@ -1,5 +0,0 @@ -import { from } from './from'; -export function pairs(obj, scheduler) { - return from(Object.entries(obj), scheduler); -} -//# sourceMappingURL=pairs.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/pairs.js.map b/node_modules/rxjs/dist/esm/internal/observable/pairs.js.map deleted file mode 100644 index a5586e2..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/pairs.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pairs.js","sourceRoot":"","sources":["../../../../src/internal/observable/pairs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AA2E9B,MAAM,UAAU,KAAK,CAAC,GAAQ,EAAE,SAAyB;IACvD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,SAAgB,CAAC,CAAC;AACrD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/partition.js b/node_modules/rxjs/dist/esm/internal/observable/partition.js deleted file mode 100644 index a5a7d48..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/partition.js +++ /dev/null @@ -1,7 +0,0 @@ -import { not } from '../util/not'; -import { filter } from '../operators/filter'; -import { innerFrom } from './innerFrom'; -export function partition(source, predicate, thisArg) { - return [filter(predicate, thisArg)(innerFrom(source)), filter(not(predicate, thisArg))(innerFrom(source))]; -} -//# sourceMappingURL=partition.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/partition.js.map b/node_modules/rxjs/dist/esm/internal/observable/partition.js.map deleted file mode 100644 index 7466104..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/partition.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"partition.js","sourceRoot":"","sources":["../../../../src/internal/observable/partition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AA0ExC,MAAM,UAAU,SAAS,CACvB,MAA0B,EAC1B,SAA0D,EAC1D,OAAa;IAEb,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAGxG,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/race.js b/node_modules/rxjs/dist/esm/internal/observable/race.js deleted file mode 100644 index c45a0ee..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/race.js +++ /dev/null @@ -1,25 +0,0 @@ -import { Observable } from '../Observable'; -import { innerFrom } from './innerFrom'; -import { argsOrArgArray } from '../util/argsOrArgArray'; -import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; -export function race(...sources) { - sources = argsOrArgArray(sources); - return sources.length === 1 ? innerFrom(sources[0]) : new Observable(raceInit(sources)); -} -export function raceInit(sources) { - return (subscriber) => { - let subscriptions = []; - for (let i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) { - subscriptions.push(innerFrom(sources[i]).subscribe(createOperatorSubscriber(subscriber, (value) => { - if (subscriptions) { - for (let s = 0; s < subscriptions.length; s++) { - s !== i && subscriptions[s].unsubscribe(); - } - subscriptions = null; - } - subscriber.next(value); - }))); - } - }; -} -//# sourceMappingURL=race.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/race.js.map b/node_modules/rxjs/dist/esm/internal/observable/race.js.map deleted file mode 100644 index 9df27c2..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/race.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"race.js","sourceRoot":"","sources":["../../../../src/internal/observable/race.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AA6C3E,MAAM,UAAU,IAAI,CAAI,GAAG,OAAsD;IAC/E,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IAElC,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAuB,CAAC,CAAC,CAAC,CAAC,IAAI,UAAU,CAAI,QAAQ,CAAC,OAA+B,CAAC,CAAC,CAAC;AAC3I,CAAC;AAOD,MAAM,UAAU,QAAQ,CAAI,OAA6B;IACvD,OAAO,CAAC,UAAyB,EAAE,EAAE;QACnC,IAAI,aAAa,GAAmB,EAAE,CAAC;QAMvC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,aAAa,IAAI,CAAC,UAAU,CAAC,MAAM,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC9E,aAAa,CAAC,IAAI,CAChB,SAAS,CAAC,OAAO,CAAC,CAAC,CAAuB,CAAC,CAAC,SAAS,CACnD,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;gBAC7C,IAAI,aAAa,EAAE;oBAGjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;wBAC7C,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;qBAC3C;oBACD,aAAa,GAAG,IAAK,CAAC;iBACvB;gBACD,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACzB,CAAC,CAAC,CACH,CACF,CAAC;SACH;IACH,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/range.js b/node_modules/rxjs/dist/esm/internal/observable/range.js deleted file mode 100644 index 7ff311b..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/range.js +++ /dev/null @@ -1,35 +0,0 @@ -import { Observable } from '../Observable'; -import { EMPTY } from './empty'; -export function range(start, count, scheduler) { - if (count == null) { - count = start; - start = 0; - } - if (count <= 0) { - return EMPTY; - } - const end = count + start; - return new Observable(scheduler - ? - (subscriber) => { - let n = start; - return scheduler.schedule(function () { - if (n < end) { - subscriber.next(n++); - this.schedule(); - } - else { - subscriber.complete(); - } - }); - } - : - (subscriber) => { - let n = start; - while (n < end && !subscriber.closed) { - subscriber.next(n++); - } - subscriber.complete(); - }); -} -//# sourceMappingURL=range.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/range.js.map b/node_modules/rxjs/dist/esm/internal/observable/range.js.map deleted file mode 100644 index 309e7b1..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/range.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"range.js","sourceRoot":"","sources":["../../../../src/internal/observable/range.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAoDhC,MAAM,UAAU,KAAK,CAAC,KAAa,EAAE,KAAc,EAAE,SAAyB;IAC5E,IAAI,KAAK,IAAI,IAAI,EAAE;QAEjB,KAAK,GAAG,KAAK,CAAC;QACd,KAAK,GAAG,CAAC,CAAC;KACX;IAED,IAAI,KAAK,IAAI,CAAC,EAAE;QAEd,OAAO,KAAK,CAAC;KACd;IAGD,MAAM,GAAG,GAAG,KAAK,GAAG,KAAK,CAAC;IAE1B,OAAO,IAAI,UAAU,CACnB,SAAS;QACP,CAAC;YACC,CAAC,UAAU,EAAE,EAAE;gBACb,IAAI,CAAC,GAAG,KAAK,CAAC;gBACd,OAAO,SAAS,CAAC,QAAQ,CAAC;oBACxB,IAAI,CAAC,GAAG,GAAG,EAAE;wBACX,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;wBACrB,IAAI,CAAC,QAAQ,EAAE,CAAC;qBACjB;yBAAM;wBACL,UAAU,CAAC,QAAQ,EAAE,CAAC;qBACvB;gBACH,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;YACC,CAAC,UAAU,EAAE,EAAE;gBACb,IAAI,CAAC,GAAG,KAAK,CAAC;gBACd,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;oBACpC,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;iBACtB;gBACD,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC,CACN,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/throwError.js b/node_modules/rxjs/dist/esm/internal/observable/throwError.js deleted file mode 100644 index bf39a7e..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/throwError.js +++ /dev/null @@ -1,8 +0,0 @@ -import { Observable } from '../Observable'; -import { isFunction } from '../util/isFunction'; -export function throwError(errorOrErrorFactory, scheduler) { - const errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : () => errorOrErrorFactory; - const init = (subscriber) => subscriber.error(errorFactory()); - return new Observable(scheduler ? (subscriber) => scheduler.schedule(init, 0, subscriber) : init); -} -//# sourceMappingURL=throwError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/throwError.js.map b/node_modules/rxjs/dist/esm/internal/observable/throwError.js.map deleted file mode 100644 index 931a747..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/throwError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"throwError.js","sourceRoot":"","sources":["../../../../src/internal/observable/throwError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAqHhD,MAAM,UAAU,UAAU,CAAC,mBAAwB,EAAE,SAAyB;IAC5E,MAAM,YAAY,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC;IACvG,MAAM,IAAI,GAAG,CAAC,UAA6B,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC;IACjF,OAAO,IAAI,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAW,EAAE,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAC3G,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/timer.js b/node_modules/rxjs/dist/esm/internal/observable/timer.js deleted file mode 100644 index 088a051..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/timer.js +++ /dev/null @@ -1,34 +0,0 @@ -import { Observable } from '../Observable'; -import { async as asyncScheduler } from '../scheduler/async'; -import { isScheduler } from '../util/isScheduler'; -import { isValidDate } from '../util/isDate'; -export function timer(dueTime = 0, intervalOrScheduler, scheduler = asyncScheduler) { - let intervalDuration = -1; - if (intervalOrScheduler != null) { - if (isScheduler(intervalOrScheduler)) { - scheduler = intervalOrScheduler; - } - else { - intervalDuration = intervalOrScheduler; - } - } - return new Observable((subscriber) => { - let due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime; - if (due < 0) { - due = 0; - } - let n = 0; - return scheduler.schedule(function () { - if (!subscriber.closed) { - subscriber.next(n++); - if (0 <= intervalDuration) { - this.schedule(undefined, intervalDuration); - } - else { - subscriber.complete(); - } - } - }, due); - }); -} -//# sourceMappingURL=timer.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/timer.js.map b/node_modules/rxjs/dist/esm/internal/observable/timer.js.map deleted file mode 100644 index ba6ba75..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/timer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timer.js","sourceRoot":"","sources":["../../../../src/internal/observable/timer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAgI7C,MAAM,UAAU,KAAK,CACnB,UAAyB,CAAC,EAC1B,mBAA4C,EAC5C,YAA2B,cAAc;IAIzC,IAAI,gBAAgB,GAAG,CAAC,CAAC,CAAC;IAE1B,IAAI,mBAAmB,IAAI,IAAI,EAAE;QAI/B,IAAI,WAAW,CAAC,mBAAmB,CAAC,EAAE;YACpC,SAAS,GAAG,mBAAmB,CAAC;SACjC;aAAM;YAGL,gBAAgB,GAAG,mBAAmB,CAAC;SACxC;KACF;IAED,OAAO,IAAI,UAAU,CAAC,CAAC,UAAU,EAAE,EAAE;QAInC,IAAI,GAAG,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,SAAU,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;QAEvE,IAAI,GAAG,GAAG,CAAC,EAAE;YAEX,GAAG,GAAG,CAAC,CAAC;SACT;QAGD,IAAI,CAAC,GAAG,CAAC,CAAC;QAGV,OAAO,SAAS,CAAC,QAAQ,CAAC;YACxB,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;gBAEtB,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;gBAErB,IAAI,CAAC,IAAI,gBAAgB,EAAE;oBAGzB,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;iBAC5C;qBAAM;oBAEL,UAAU,CAAC,QAAQ,EAAE,CAAC;iBACvB;aACF;QACH,CAAC,EAAE,GAAG,CAAC,CAAC;IACV,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/using.js b/node_modules/rxjs/dist/esm/internal/observable/using.js deleted file mode 100644 index ce38cd6..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/using.js +++ /dev/null @@ -1,17 +0,0 @@ -import { Observable } from '../Observable'; -import { innerFrom } from './innerFrom'; -import { EMPTY } from './empty'; -export function using(resourceFactory, observableFactory) { - return new Observable((subscriber) => { - const resource = resourceFactory(); - const result = observableFactory(resource); - const source = result ? innerFrom(result) : EMPTY; - source.subscribe(subscriber); - return () => { - if (resource) { - resource.unsubscribe(); - } - }; - }); -} -//# sourceMappingURL=using.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/using.js.map b/node_modules/rxjs/dist/esm/internal/observable/using.js.map deleted file mode 100644 index d74026d..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/using.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"using.js","sourceRoot":"","sources":["../../../../src/internal/observable/using.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA4BhC,MAAM,UAAU,KAAK,CACnB,eAA4C,EAC5C,iBAAgE;IAEhE,OAAO,IAAI,UAAU,CAAqB,CAAC,UAAU,EAAE,EAAE;QACvD,MAAM,QAAQ,GAAG,eAAe,EAAE,CAAC;QACnC,MAAM,MAAM,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;QAC3C,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QAClD,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC7B,OAAO,GAAG,EAAE;YAGV,IAAI,QAAQ,EAAE;gBACZ,QAAQ,CAAC,WAAW,EAAE,CAAC;aACxB;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/zip.js b/node_modules/rxjs/dist/esm/internal/observable/zip.js deleted file mode 100644 index ed4487b..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/zip.js +++ /dev/null @@ -1,38 +0,0 @@ -import { Observable } from '../Observable'; -import { innerFrom } from './innerFrom'; -import { argsOrArgArray } from '../util/argsOrArgArray'; -import { EMPTY } from './empty'; -import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; -import { popResultSelector } from '../util/args'; -export function zip(...args) { - const resultSelector = popResultSelector(args); - const sources = argsOrArgArray(args); - return sources.length - ? new Observable((subscriber) => { - let buffers = sources.map(() => []); - let completed = sources.map(() => false); - subscriber.add(() => { - buffers = completed = null; - }); - for (let sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) { - innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, (value) => { - buffers[sourceIndex].push(value); - if (buffers.every((buffer) => buffer.length)) { - const result = buffers.map((buffer) => buffer.shift()); - subscriber.next(resultSelector ? resultSelector(...result) : result); - if (buffers.some((buffer, i) => !buffer.length && completed[i])) { - subscriber.complete(); - } - } - }, () => { - completed[sourceIndex] = true; - !buffers[sourceIndex].length && subscriber.complete(); - })); - } - return () => { - buffers = completed = null; - }; - }) - : EMPTY; -} -//# sourceMappingURL=zip.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/observable/zip.js.map b/node_modules/rxjs/dist/esm/internal/observable/zip.js.map deleted file mode 100644 index e89f5d9..0000000 --- a/node_modules/rxjs/dist/esm/internal/observable/zip.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"zip.js","sourceRoot":"","sources":["../../../../src/internal/observable/zip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AA8CjD,MAAM,UAAU,GAAG,CAAC,GAAG,IAAe;IACpC,MAAM,cAAc,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAE/C,MAAM,OAAO,GAAG,cAAc,CAAC,IAAI,CAA0B,CAAC;IAE9D,OAAO,OAAO,CAAC,MAAM;QACnB,CAAC,CAAC,IAAI,UAAU,CAAY,CAAC,UAAU,EAAE,EAAE;YAGvC,IAAI,OAAO,GAAgB,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;YAKjD,IAAI,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;YAGzC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE;gBAClB,OAAO,GAAG,SAAS,GAAG,IAAK,CAAC;YAC9B,CAAC,CAAC,CAAC;YAKH,KAAK,IAAI,WAAW,GAAG,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,IAAI,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE;gBAC3F,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CACvC,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;oBACR,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAIjC,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE;wBAC5C,MAAM,MAAM,GAAQ,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAG,CAAC,CAAC;wBAE7D,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;wBAIrE,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE;4BAC/D,UAAU,CAAC,QAAQ,EAAE,CAAC;yBACvB;qBACF;gBACH,CAAC,EACD,GAAG,EAAE;oBAGH,SAAS,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;oBAI9B,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,MAAM,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;gBACxD,CAAC,CACF,CACF,CAAC;aACH;YAGD,OAAO,GAAG,EAAE;gBACV,OAAO,GAAG,SAAS,GAAG,IAAK,CAAC;YAC9B,CAAC,CAAC;QACJ,CAAC,CAAC;QACJ,CAAC,CAAC,KAAK,CAAC;AACZ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js b/node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js deleted file mode 100644 index 317373b..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js +++ /dev/null @@ -1,56 +0,0 @@ -import { Subscriber } from '../Subscriber'; -export function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) { - return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize); -} -export class OperatorSubscriber extends Subscriber { - constructor(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) { - super(destination); - this.onFinalize = onFinalize; - this.shouldUnsubscribe = shouldUnsubscribe; - this._next = onNext - ? function (value) { - try { - onNext(value); - } - catch (err) { - destination.error(err); - } - } - : super._next; - this._error = onError - ? function (err) { - try { - onError(err); - } - catch (err) { - destination.error(err); - } - finally { - this.unsubscribe(); - } - } - : super._error; - this._complete = onComplete - ? function () { - try { - onComplete(); - } - catch (err) { - destination.error(err); - } - finally { - this.unsubscribe(); - } - } - : super._complete; - } - unsubscribe() { - var _a; - if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) { - const { closed } = this; - super.unsubscribe(); - !closed && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this)); - } - } -} -//# sourceMappingURL=OperatorSubscriber.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js.map b/node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js.map deleted file mode 100644 index c679c10..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OperatorSubscriber.js","sourceRoot":"","sources":["../../../../src/internal/operators/OperatorSubscriber.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAc3C,MAAM,UAAU,wBAAwB,CACtC,WAA4B,EAC5B,MAA2B,EAC3B,UAAuB,EACvB,OAA4B,EAC5B,UAAuB;IAEvB,OAAO,IAAI,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AACtF,CAAC;AAMD,MAAM,OAAO,kBAAsB,SAAQ,UAAa;IAiBtD,YACE,WAA4B,EAC5B,MAA2B,EAC3B,UAAuB,EACvB,OAA4B,EACpB,UAAuB,EACvB,iBAAiC;QAczC,KAAK,CAAC,WAAW,CAAC,CAAC;QAfX,eAAU,GAAV,UAAU,CAAa;QACvB,sBAAiB,GAAjB,iBAAiB,CAAgB;QAezC,IAAI,CAAC,KAAK,GAAG,MAAM;YACjB,CAAC,CAAC,UAAuC,KAAQ;gBAC7C,IAAI;oBACF,MAAM,CAAC,KAAK,CAAC,CAAC;iBACf;gBAAC,OAAO,GAAG,EAAE;oBACZ,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACxB;YACH,CAAC;YACH,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC;QAChB,IAAI,CAAC,MAAM,GAAG,OAAO;YACnB,CAAC,CAAC,UAAuC,GAAQ;gBAC7C,IAAI;oBACF,OAAO,CAAC,GAAG,CAAC,CAAC;iBACd;gBAAC,OAAO,GAAG,EAAE;oBAEZ,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACxB;wBAAS;oBAER,IAAI,CAAC,WAAW,EAAE,CAAC;iBACpB;YACH,CAAC;YACH,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC;QACjB,IAAI,CAAC,SAAS,GAAG,UAAU;YACzB,CAAC,CAAC;gBACE,IAAI;oBACF,UAAU,EAAE,CAAC;iBACd;gBAAC,OAAO,GAAG,EAAE;oBAEZ,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACxB;wBAAS;oBAER,IAAI,CAAC,WAAW,EAAE,CAAC;iBACpB;YACH,CAAC;YACH,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC;IACtB,CAAC;IAED,WAAW;;QACT,IAAI,CAAC,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,iBAAiB,EAAE,EAAE;YACvD,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;YACxB,KAAK,CAAC,WAAW,EAAE,CAAC;YAEpB,CAAC,MAAM,KAAI,MAAA,IAAI,CAAC,UAAU,+CAAf,IAAI,CAAe,CAAA,CAAC;SAChC;IACH,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/audit.js b/node_modules/rxjs/dist/esm/internal/operators/audit.js deleted file mode 100644 index 22139a0..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/audit.js +++ /dev/null @@ -1,37 +0,0 @@ -import { operate } from '../util/lift'; -import { innerFrom } from '../observable/innerFrom'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function audit(durationSelector) { - return operate((source, subscriber) => { - let hasValue = false; - let lastValue = null; - let durationSubscriber = null; - let isComplete = false; - const endDuration = () => { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); - durationSubscriber = null; - if (hasValue) { - hasValue = false; - const value = lastValue; - lastValue = null; - subscriber.next(value); - } - isComplete && subscriber.complete(); - }; - const cleanupDuration = () => { - durationSubscriber = null; - isComplete && subscriber.complete(); - }; - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - hasValue = true; - lastValue = value; - if (!durationSubscriber) { - innerFrom(durationSelector(value)).subscribe((durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration))); - } - }, () => { - isComplete = true; - (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete(); - })); - }); -} -//# sourceMappingURL=audit.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/audit.js.map b/node_modules/rxjs/dist/esm/internal/operators/audit.js.map deleted file mode 100644 index eac61f4..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/audit.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../../../src/internal/operators/audit.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA+ChE,MAAM,UAAU,KAAK,CAAI,gBAAoD;IAC3E,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,SAAS,GAAa,IAAI,CAAC;QAC/B,IAAI,kBAAkB,GAA2B,IAAI,CAAC;QACtD,IAAI,UAAU,GAAG,KAAK,CAAC;QAEvB,MAAM,WAAW,GAAG,GAAG,EAAE;YACvB,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,WAAW,EAAE,CAAC;YAClC,kBAAkB,GAAG,IAAI,CAAC;YAC1B,IAAI,QAAQ,EAAE;gBACZ,QAAQ,GAAG,KAAK,CAAC;gBACjB,MAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;YACD,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACtC,CAAC,CAAC;QAEF,MAAM,eAAe,GAAG,GAAG,EAAE;YAC3B,kBAAkB,GAAG,IAAI,CAAC;YAC1B,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACtC,CAAC,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YACR,QAAQ,GAAG,IAAI,CAAC;YAChB,SAAS,GAAG,KAAK,CAAC;YAClB,IAAI,CAAC,kBAAkB,EAAE;gBACvB,SAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAC1C,CAAC,kBAAkB,GAAG,wBAAwB,CAAC,UAAU,EAAE,WAAW,EAAE,eAAe,CAAC,CAAC,CAC1F,CAAC;aACH;QACH,CAAC,EACD,GAAG,EAAE;YACH,UAAU,GAAG,IAAI,CAAC;YAClB,CAAC,CAAC,QAAQ,IAAI,CAAC,kBAAkB,IAAI,kBAAkB,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QAC3F,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/auditTime.js b/node_modules/rxjs/dist/esm/internal/operators/auditTime.js deleted file mode 100644 index 559f365..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/auditTime.js +++ /dev/null @@ -1,7 +0,0 @@ -import { asyncScheduler } from '../scheduler/async'; -import { audit } from './audit'; -import { timer } from '../observable/timer'; -export function auditTime(duration, scheduler = asyncScheduler) { - return audit(() => timer(duration, scheduler)); -} -//# sourceMappingURL=auditTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/auditTime.js.map b/node_modules/rxjs/dist/esm/internal/operators/auditTime.js.map deleted file mode 100644 index 2f1f665..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/auditTime.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"auditTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/auditTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAkD5C,MAAM,UAAU,SAAS,CAAI,QAAgB,EAAE,YAA2B,cAAc;IACtF,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;AACjD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/buffer.js b/node_modules/rxjs/dist/esm/internal/operators/buffer.js deleted file mode 100644 index bdce480..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/buffer.js +++ /dev/null @@ -1,22 +0,0 @@ -import { operate } from '../util/lift'; -import { noop } from '../util/noop'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; -export function buffer(closingNotifier) { - return operate((source, subscriber) => { - let currentBuffer = []; - source.subscribe(createOperatorSubscriber(subscriber, (value) => currentBuffer.push(value), () => { - subscriber.next(currentBuffer); - subscriber.complete(); - })); - innerFrom(closingNotifier).subscribe(createOperatorSubscriber(subscriber, () => { - const b = currentBuffer; - currentBuffer = []; - subscriber.next(b); - }, noop)); - return () => { - currentBuffer = null; - }; - }); -} -//# sourceMappingURL=buffer.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/buffer.js.map b/node_modules/rxjs/dist/esm/internal/operators/buffer.js.map deleted file mode 100644 index 5633ca3..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/buffer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"buffer.js","sourceRoot":"","sources":["../../../../src/internal/operators/buffer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAwCpD,MAAM,UAAU,MAAM,CAAI,eAAqC;IAC7D,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QAEpC,IAAI,aAAa,GAAQ,EAAE,CAAC;QAG5B,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,EACpC,GAAG,EAAE;YACH,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YAC/B,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;QAGF,SAAS,CAAC,eAAe,CAAC,CAAC,SAAS,CAClC,wBAAwB,CACtB,UAAU,EACV,GAAG,EAAE;YAEH,MAAM,CAAC,GAAG,aAAa,CAAC;YACxB,aAAa,GAAG,EAAE,CAAC;YACnB,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACrB,CAAC,EACD,IAAI,CACL,CACF,CAAC;QAEF,OAAO,GAAG,EAAE;YAEV,aAAa,GAAG,IAAK,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/bufferCount.js b/node_modules/rxjs/dist/esm/internal/operators/bufferCount.js deleted file mode 100644 index 2cf2880..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/bufferCount.js +++ /dev/null @@ -1,37 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { arrRemove } from '../util/arrRemove'; -export function bufferCount(bufferSize, startBufferEvery = null) { - startBufferEvery = startBufferEvery !== null && startBufferEvery !== void 0 ? startBufferEvery : bufferSize; - return operate((source, subscriber) => { - let buffers = []; - let count = 0; - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - let toEmit = null; - if (count++ % startBufferEvery === 0) { - buffers.push([]); - } - for (const buffer of buffers) { - buffer.push(value); - if (bufferSize <= buffer.length) { - toEmit = toEmit !== null && toEmit !== void 0 ? toEmit : []; - toEmit.push(buffer); - } - } - if (toEmit) { - for (const buffer of toEmit) { - arrRemove(buffers, buffer); - subscriber.next(buffer); - } - } - }, () => { - for (const buffer of buffers) { - subscriber.next(buffer); - } - subscriber.complete(); - }, undefined, () => { - buffers = null; - })); - }); -} -//# sourceMappingURL=bufferCount.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/bufferCount.js.map b/node_modules/rxjs/dist/esm/internal/operators/bufferCount.js.map deleted file mode 100644 index 713be10..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/bufferCount.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bufferCount.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferCount.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAqD9C,MAAM,UAAU,WAAW,CAAI,UAAkB,EAAE,mBAAkC,IAAI;IAGvF,gBAAgB,GAAG,gBAAgB,aAAhB,gBAAgB,cAAhB,gBAAgB,GAAI,UAAU,CAAC;IAElD,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,OAAO,GAAU,EAAE,CAAC;QACxB,IAAI,KAAK,GAAG,CAAC,CAAC;QAEd,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YACR,IAAI,MAAM,GAAiB,IAAI,CAAC;YAKhC,IAAI,KAAK,EAAE,GAAG,gBAAiB,KAAK,CAAC,EAAE;gBACrC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;aAClB;YAGD,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;gBAC5B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAMnB,IAAI,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE;oBAC/B,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAC;oBACtB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;iBACrB;aACF;YAED,IAAI,MAAM,EAAE;gBAIV,KAAK,MAAM,MAAM,IAAI,MAAM,EAAE;oBAC3B,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;oBAC3B,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;iBACzB;aACF;QACH,CAAC,EACD,GAAG,EAAE;YAGH,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;gBAC5B,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aACzB;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EAED,SAAS,EACT,GAAG,EAAE;YAEH,OAAO,GAAG,IAAK,CAAC;QAClB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/bufferTime.js b/node_modules/rxjs/dist/esm/internal/operators/bufferTime.js deleted file mode 100644 index f5b61b0..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/bufferTime.js +++ /dev/null @@ -1,61 +0,0 @@ -import { Subscription } from '../Subscription'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { arrRemove } from '../util/arrRemove'; -import { asyncScheduler } from '../scheduler/async'; -import { popScheduler } from '../util/args'; -import { executeSchedule } from '../util/executeSchedule'; -export function bufferTime(bufferTimeSpan, ...otherArgs) { - var _a, _b; - const scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler; - const bufferCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; - const maxBufferSize = otherArgs[1] || Infinity; - return operate((source, subscriber) => { - let bufferRecords = []; - let restartOnEmit = false; - const emit = (record) => { - const { buffer, subs } = record; - subs.unsubscribe(); - arrRemove(bufferRecords, record); - subscriber.next(buffer); - restartOnEmit && startBuffer(); - }; - const startBuffer = () => { - if (bufferRecords) { - const subs = new Subscription(); - subscriber.add(subs); - const buffer = []; - const record = { - buffer, - subs, - }; - bufferRecords.push(record); - executeSchedule(subs, scheduler, () => emit(record), bufferTimeSpan); - } - }; - if (bufferCreationInterval !== null && bufferCreationInterval >= 0) { - executeSchedule(subscriber, scheduler, startBuffer, bufferCreationInterval, true); - } - else { - restartOnEmit = true; - } - startBuffer(); - const bufferTimeSubscriber = createOperatorSubscriber(subscriber, (value) => { - const recordsCopy = bufferRecords.slice(); - for (const record of recordsCopy) { - const { buffer } = record; - buffer.push(value); - maxBufferSize <= buffer.length && emit(record); - } - }, () => { - while (bufferRecords === null || bufferRecords === void 0 ? void 0 : bufferRecords.length) { - subscriber.next(bufferRecords.shift().buffer); - } - bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 ? void 0 : bufferTimeSubscriber.unsubscribe(); - subscriber.complete(); - subscriber.unsubscribe(); - }, undefined, () => (bufferRecords = null)); - source.subscribe(bufferTimeSubscriber); - }); -} -//# sourceMappingURL=bufferTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/bufferTime.js.map b/node_modules/rxjs/dist/esm/internal/operators/bufferTime.js.map deleted file mode 100644 index 8363dbe..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/bufferTime.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bufferTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAmE1D,MAAM,UAAU,UAAU,CAAI,cAAsB,EAAE,GAAG,SAAgB;;IACvE,MAAM,SAAS,GAAG,MAAA,YAAY,CAAC,SAAS,CAAC,mCAAI,cAAc,CAAC;IAC5D,MAAM,sBAAsB,GAAG,MAAC,SAAS,CAAC,CAAC,CAAY,mCAAI,IAAI,CAAC;IAChE,MAAM,aAAa,GAAI,SAAS,CAAC,CAAC,CAAY,IAAI,QAAQ,CAAC;IAE3D,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QAEpC,IAAI,aAAa,GAAiD,EAAE,CAAC;QAGrE,IAAI,aAAa,GAAG,KAAK,CAAC;QAQ1B,MAAM,IAAI,GAAG,CAAC,MAA2C,EAAE,EAAE;YAC3D,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;YAChC,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;YACjC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACxB,aAAa,IAAI,WAAW,EAAE,CAAC;QACjC,CAAC,CAAC;QAOF,MAAM,WAAW,GAAG,GAAG,EAAE;YACvB,IAAI,aAAa,EAAE;gBACjB,MAAM,IAAI,GAAG,IAAI,YAAY,EAAE,CAAC;gBAChC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBACrB,MAAM,MAAM,GAAQ,EAAE,CAAC;gBACvB,MAAM,MAAM,GAAG;oBACb,MAAM;oBACN,IAAI;iBACL,CAAC;gBACF,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAC3B,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC,CAAC;aACtE;QACH,CAAC,CAAC;QAEF,IAAI,sBAAsB,KAAK,IAAI,IAAI,sBAAsB,IAAI,CAAC,EAAE;YAIlE,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,sBAAsB,EAAE,IAAI,CAAC,CAAC;SACnF;aAAM;YACL,aAAa,GAAG,IAAI,CAAC;SACtB;QAED,WAAW,EAAE,CAAC;QAEd,MAAM,oBAAoB,GAAG,wBAAwB,CACnD,UAAU,EACV,CAAC,KAAQ,EAAE,EAAE;YAKX,MAAM,WAAW,GAAG,aAAc,CAAC,KAAK,EAAE,CAAC;YAC3C,KAAK,MAAM,MAAM,IAAI,WAAW,EAAE;gBAEhC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;gBAC1B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAEnB,aAAa,IAAI,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC;aAChD;QACH,CAAC,EACD,GAAG,EAAE;YAGH,OAAO,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,MAAM,EAAE;gBAC5B,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,EAAG,CAAC,MAAM,CAAC,CAAC;aAChD;YACD,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,WAAW,EAAE,CAAC;YACpC,UAAU,CAAC,QAAQ,EAAE,CAAC;YACtB,UAAU,CAAC,WAAW,EAAE,CAAC;QAC3B,CAAC,EAED,SAAS,EAET,GAAG,EAAE,CAAC,CAAC,aAAa,GAAG,IAAI,CAAC,CAC7B,CAAC;QAEF,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/bufferToggle.js b/node_modules/rxjs/dist/esm/internal/operators/bufferToggle.js deleted file mode 100644 index dfefe4a..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/bufferToggle.js +++ /dev/null @@ -1,33 +0,0 @@ -import { Subscription } from '../Subscription'; -import { operate } from '../util/lift'; -import { innerFrom } from '../observable/innerFrom'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { noop } from '../util/noop'; -import { arrRemove } from '../util/arrRemove'; -export function bufferToggle(openings, closingSelector) { - return operate((source, subscriber) => { - const buffers = []; - innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, (openValue) => { - const buffer = []; - buffers.push(buffer); - const closingSubscription = new Subscription(); - const emitBuffer = () => { - arrRemove(buffers, buffer); - subscriber.next(buffer); - closingSubscription.unsubscribe(); - }; - closingSubscription.add(innerFrom(closingSelector(openValue)).subscribe(createOperatorSubscriber(subscriber, emitBuffer, noop))); - }, noop)); - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - for (const buffer of buffers) { - buffer.push(value); - } - }, () => { - while (buffers.length > 0) { - subscriber.next(buffers.shift()); - } - subscriber.complete(); - })); - }); -} -//# sourceMappingURL=bufferToggle.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/bufferToggle.js.map b/node_modules/rxjs/dist/esm/internal/operators/bufferToggle.js.map deleted file mode 100644 index b1c0426..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/bufferToggle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bufferToggle.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferToggle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AA6C9C,MAAM,UAAU,YAAY,CAC1B,QAA4B,EAC5B,eAAmD;IAEnD,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,MAAM,OAAO,GAAU,EAAE,CAAC;QAG1B,SAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAC3B,wBAAwB,CACtB,UAAU,EACV,CAAC,SAAS,EAAE,EAAE;YACZ,MAAM,MAAM,GAAQ,EAAE,CAAC;YACvB,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAGrB,MAAM,mBAAmB,GAAG,IAAI,YAAY,EAAE,CAAC;YAE/C,MAAM,UAAU,GAAG,GAAG,EAAE;gBACtB,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;gBAC3B,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBACxB,mBAAmB,CAAC,WAAW,EAAE,CAAC;YACpC,CAAC,CAAC;YAGF,mBAAmB,CAAC,GAAG,CAAC,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QACnI,CAAC,EACD,IAAI,CACL,CACF,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YAER,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;gBAC5B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACpB;QACH,CAAC,EACD,GAAG,EAAE;YAEH,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzB,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAG,CAAC,CAAC;aACnC;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/bufferWhen.js b/node_modules/rxjs/dist/esm/internal/operators/bufferWhen.js deleted file mode 100644 index 8e47b0d..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/bufferWhen.js +++ /dev/null @@ -1,23 +0,0 @@ -import { operate } from '../util/lift'; -import { noop } from '../util/noop'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; -export function bufferWhen(closingSelector) { - return operate((source, subscriber) => { - let buffer = null; - let closingSubscriber = null; - const openBuffer = () => { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); - const b = buffer; - buffer = []; - b && subscriber.next(b); - innerFrom(closingSelector()).subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openBuffer, noop))); - }; - openBuffer(); - source.subscribe(createOperatorSubscriber(subscriber, (value) => buffer === null || buffer === void 0 ? void 0 : buffer.push(value), () => { - buffer && subscriber.next(buffer); - subscriber.complete(); - }, undefined, () => (buffer = closingSubscriber = null))); - }); -} -//# sourceMappingURL=bufferWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/bufferWhen.js.map b/node_modules/rxjs/dist/esm/internal/operators/bufferWhen.js.map deleted file mode 100644 index 5ea39fa..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/bufferWhen.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bufferWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferWhen.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAwCpD,MAAM,UAAU,UAAU,CAAI,eAA2C;IACvE,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QAEpC,IAAI,MAAM,GAAe,IAAI,CAAC;QAI9B,IAAI,iBAAiB,GAAyB,IAAI,CAAC;QAMnD,MAAM,UAAU,GAAG,GAAG,EAAE;YAGtB,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,WAAW,EAAE,CAAC;YAEjC,MAAM,CAAC,GAAG,MAAM,CAAC;YACjB,MAAM,GAAG,EAAE,CAAC;YACZ,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAGxB,SAAS,CAAC,eAAe,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,iBAAiB,GAAG,wBAAwB,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QACvH,CAAC,CAAC;QAGF,UAAU,EAAE,CAAC;QAGb,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EAEV,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAC,KAAK,CAAC,EAG9B,GAAG,EAAE;YACH,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAClC,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EAED,SAAS,EAET,GAAG,EAAE,CAAC,CAAC,MAAM,GAAG,iBAAiB,GAAG,IAAK,CAAC,CAC3C,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/catchError.js b/node_modules/rxjs/dist/esm/internal/operators/catchError.js deleted file mode 100644 index 1dba646..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/catchError.js +++ /dev/null @@ -1,27 +0,0 @@ -import { innerFrom } from '../observable/innerFrom'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { operate } from '../util/lift'; -export function catchError(selector) { - return operate((source, subscriber) => { - let innerSub = null; - let syncUnsub = false; - let handledResult; - innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, (err) => { - handledResult = innerFrom(selector(err, catchError(selector)(source))); - if (innerSub) { - innerSub.unsubscribe(); - innerSub = null; - handledResult.subscribe(subscriber); - } - else { - syncUnsub = true; - } - })); - if (syncUnsub) { - innerSub.unsubscribe(); - innerSub = null; - handledResult.subscribe(subscriber); - } - }); -} -//# sourceMappingURL=catchError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/catchError.js.map b/node_modules/rxjs/dist/esm/internal/operators/catchError.js.map deleted file mode 100644 index 63f0f4a..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/catchError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"catchError.js","sourceRoot":"","sources":["../../../../src/internal/operators/catchError.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAkGvC,MAAM,UAAU,UAAU,CACxB,QAAgD;IAEhD,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,QAAQ,GAAwB,IAAI,CAAC;QACzC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,aAA6C,CAAC;QAElD,QAAQ,GAAG,MAAM,CAAC,SAAS,CACzB,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,GAAG,EAAE,EAAE;YACjE,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACvE,IAAI,QAAQ,EAAE;gBACZ,QAAQ,CAAC,WAAW,EAAE,CAAC;gBACvB,QAAQ,GAAG,IAAI,CAAC;gBAChB,aAAa,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;aACrC;iBAAM;gBAGL,SAAS,GAAG,IAAI,CAAC;aAClB;QACH,CAAC,CAAC,CACH,CAAC;QAEF,IAAI,SAAS,EAAE;YAMb,QAAQ,CAAC,WAAW,EAAE,CAAC;YACvB,QAAQ,GAAG,IAAI,CAAC;YAChB,aAAc,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;SACtC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/combineAll.js b/node_modules/rxjs/dist/esm/internal/operators/combineAll.js deleted file mode 100644 index 65f4bbf..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/combineAll.js +++ /dev/null @@ -1,3 +0,0 @@ -import { combineLatestAll } from './combineLatestAll'; -export const combineAll = combineLatestAll; -//# sourceMappingURL=combineAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/combineAll.js.map b/node_modules/rxjs/dist/esm/internal/operators/combineAll.js.map deleted file mode 100644 index 63debb6..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/combineAll.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"combineAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAKtD,MAAM,CAAC,MAAM,UAAU,GAAG,gBAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/combineLatest.js b/node_modules/rxjs/dist/esm/internal/operators/combineLatest.js deleted file mode 100644 index abed1f5..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/combineLatest.js +++ /dev/null @@ -1,15 +0,0 @@ -import { combineLatestInit } from '../observable/combineLatest'; -import { operate } from '../util/lift'; -import { argsOrArgArray } from '../util/argsOrArgArray'; -import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; -import { pipe } from '../util/pipe'; -import { popResultSelector } from '../util/args'; -export function combineLatest(...args) { - const resultSelector = popResultSelector(args); - return resultSelector - ? pipe(combineLatest(...args), mapOneOrManyArgs(resultSelector)) - : operate((source, subscriber) => { - combineLatestInit([source, ...argsOrArgArray(args)])(subscriber); - }); -} -//# sourceMappingURL=combineLatest.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/combineLatest.js.map b/node_modules/rxjs/dist/esm/internal/operators/combineLatest.js.map deleted file mode 100644 index 0da0c16..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/combineLatest.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"combineLatest.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAoBjD,MAAM,UAAU,aAAa,CAAO,GAAG,IAA0D;IAC/F,MAAM,cAAc,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC/C,OAAO,cAAc;QACnB,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,GAAI,IAAoC,CAAC,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;QACjG,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;YAC7B,iBAAiB,CAAC,CAAC,MAAM,EAAE,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;QACnE,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/combineLatestAll.js b/node_modules/rxjs/dist/esm/internal/operators/combineLatestAll.js deleted file mode 100644 index 3af3909..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/combineLatestAll.js +++ /dev/null @@ -1,6 +0,0 @@ -import { combineLatest } from '../observable/combineLatest'; -import { joinAllInternals } from './joinAllInternals'; -export function combineLatestAll(project) { - return joinAllInternals(combineLatest, project); -} -//# sourceMappingURL=combineLatestAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/combineLatestAll.js.map b/node_modules/rxjs/dist/esm/internal/operators/combineLatestAll.js.map deleted file mode 100644 index 2adf9b8..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/combineLatestAll.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"combineLatestAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatestAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AA6CtD,MAAM,UAAU,gBAAgB,CAAI,OAAsC;IACxE,OAAO,gBAAgB,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;AAClD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/combineLatestWith.js b/node_modules/rxjs/dist/esm/internal/operators/combineLatestWith.js deleted file mode 100644 index 880ec84..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/combineLatestWith.js +++ /dev/null @@ -1,5 +0,0 @@ -import { combineLatest } from './combineLatest'; -export function combineLatestWith(...otherSources) { - return combineLatest(...otherSources); -} -//# sourceMappingURL=combineLatestWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/combineLatestWith.js.map b/node_modules/rxjs/dist/esm/internal/operators/combineLatestWith.js.map deleted file mode 100644 index 93deadd..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/combineLatestWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"combineLatestWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatestWith.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA0ChD,MAAM,UAAU,iBAAiB,CAC/B,GAAG,YAA0C;IAE7C,OAAO,aAAa,CAAC,GAAG,YAAY,CAAC,CAAC;AACxC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/concat.js b/node_modules/rxjs/dist/esm/internal/operators/concat.js deleted file mode 100644 index 7a5502f..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/concat.js +++ /dev/null @@ -1,11 +0,0 @@ -import { operate } from '../util/lift'; -import { concatAll } from './concatAll'; -import { popScheduler } from '../util/args'; -import { from } from '../observable/from'; -export function concat(...args) { - const scheduler = popScheduler(args); - return operate((source, subscriber) => { - concatAll()(from([source, ...args], scheduler)).subscribe(subscriber); - }); -} -//# sourceMappingURL=concat.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/concat.js.map b/node_modules/rxjs/dist/esm/internal/operators/concat.js.map deleted file mode 100644 index f0fc841..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/concat.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concat.js","sourceRoot":"","sources":["../../../../src/internal/operators/concat.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAY1C,MAAM,UAAU,MAAM,CAAO,GAAG,IAAW;IACzC,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,SAAS,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/concatAll.js b/node_modules/rxjs/dist/esm/internal/operators/concatAll.js deleted file mode 100644 index 9ef0022..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/concatAll.js +++ /dev/null @@ -1,5 +0,0 @@ -import { mergeAll } from './mergeAll'; -export function concatAll() { - return mergeAll(1); -} -//# sourceMappingURL=concatAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/concatAll.js.map b/node_modules/rxjs/dist/esm/internal/operators/concatAll.js.map deleted file mode 100644 index 0231f3f..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/concatAll.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concatAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AA2DtC,MAAM,UAAU,SAAS;IACvB,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/concatMap.js b/node_modules/rxjs/dist/esm/internal/operators/concatMap.js deleted file mode 100644 index bdacda3..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/concatMap.js +++ /dev/null @@ -1,6 +0,0 @@ -import { mergeMap } from './mergeMap'; -import { isFunction } from '../util/isFunction'; -export function concatMap(project, resultSelector) { - return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1); -} -//# sourceMappingURL=concatMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/concatMap.js.map b/node_modules/rxjs/dist/esm/internal/operators/concatMap.js.map deleted file mode 100644 index 2d54e93..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/concatMap.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concatMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AA2EhD,MAAM,UAAU,SAAS,CACvB,OAAuC,EACvC,cAA6G;IAE7G,OAAO,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AAClG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/concatMapTo.js b/node_modules/rxjs/dist/esm/internal/operators/concatMapTo.js deleted file mode 100644 index 6aa9800..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/concatMapTo.js +++ /dev/null @@ -1,6 +0,0 @@ -import { concatMap } from './concatMap'; -import { isFunction } from '../util/isFunction'; -export function concatMapTo(innerObservable, resultSelector) { - return isFunction(resultSelector) ? concatMap(() => innerObservable, resultSelector) : concatMap(() => innerObservable); -} -//# sourceMappingURL=concatMapTo.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/concatMapTo.js.map b/node_modules/rxjs/dist/esm/internal/operators/concatMapTo.js.map deleted file mode 100644 index 8bf071c..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/concatMapTo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concatMapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatMapTo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAuEhD,MAAM,UAAU,WAAW,CACzB,eAAkB,EAClB,cAA6G;IAE7G,OAAO,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,CAAC;AAC1H,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/concatWith.js b/node_modules/rxjs/dist/esm/internal/operators/concatWith.js deleted file mode 100644 index e4be83d..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/concatWith.js +++ /dev/null @@ -1,5 +0,0 @@ -import { concat } from './concat'; -export function concatWith(...otherSources) { - return concat(...otherSources); -} -//# sourceMappingURL=concatWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/concatWith.js.map b/node_modules/rxjs/dist/esm/internal/operators/concatWith.js.map deleted file mode 100644 index 818f89f..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/concatWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concatWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatWith.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AA0ClC,MAAM,UAAU,UAAU,CACxB,GAAG,YAA0C;IAE7C,OAAO,MAAM,CAAC,GAAG,YAAY,CAAC,CAAC;AACjC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/connect.js b/node_modules/rxjs/dist/esm/internal/operators/connect.js deleted file mode 100644 index 9d3e6dd..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/connect.js +++ /dev/null @@ -1,16 +0,0 @@ -import { Subject } from '../Subject'; -import { innerFrom } from '../observable/innerFrom'; -import { operate } from '../util/lift'; -import { fromSubscribable } from '../observable/fromSubscribable'; -const DEFAULT_CONFIG = { - connector: () => new Subject(), -}; -export function connect(selector, config = DEFAULT_CONFIG) { - const { connector } = config; - return operate((source, subscriber) => { - const subject = connector(); - innerFrom(selector(fromSubscribable(subject))).subscribe(subscriber); - subscriber.add(source.subscribe(subject)); - }); -} -//# sourceMappingURL=connect.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/connect.js.map b/node_modules/rxjs/dist/esm/internal/operators/connect.js.map deleted file mode 100644 index cb98156..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/connect.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"connect.js","sourceRoot":"","sources":["../../../../src/internal/operators/connect.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAgBlE,MAAM,cAAc,GAA2B;IAC7C,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,OAAO,EAAW;CACxC,CAAC;AA2EF,MAAM,UAAU,OAAO,CACrB,QAAsC,EACtC,SAA2B,cAAc;IAEzC,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;IAC7B,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC;QAC5B,SAAS,CAAC,QAAQ,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QACrE,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/count.js b/node_modules/rxjs/dist/esm/internal/operators/count.js deleted file mode 100644 index e53cbaa..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/count.js +++ /dev/null @@ -1,5 +0,0 @@ -import { reduce } from './reduce'; -export function count(predicate) { - return reduce((total, value, i) => (!predicate || predicate(value, i) ? total + 1 : total), 0); -} -//# sourceMappingURL=count.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/count.js.map b/node_modules/rxjs/dist/esm/internal/operators/count.js.map deleted file mode 100644 index f0a1b08..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/count.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"count.js","sourceRoot":"","sources":["../../../../src/internal/operators/count.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAyDlC,MAAM,UAAU,KAAK,CAAI,SAAgD;IACvE,OAAO,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,IAAI,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;AACjG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/debounce.js b/node_modules/rxjs/dist/esm/internal/operators/debounce.js deleted file mode 100644 index 138602e..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/debounce.js +++ /dev/null @@ -1,34 +0,0 @@ -import { operate } from '../util/lift'; -import { noop } from '../util/noop'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; -export function debounce(durationSelector) { - return operate((source, subscriber) => { - let hasValue = false; - let lastValue = null; - let durationSubscriber = null; - const emit = () => { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); - durationSubscriber = null; - if (hasValue) { - hasValue = false; - const value = lastValue; - lastValue = null; - subscriber.next(value); - } - }; - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); - hasValue = true; - lastValue = value; - durationSubscriber = createOperatorSubscriber(subscriber, emit, noop); - innerFrom(durationSelector(value)).subscribe(durationSubscriber); - }, () => { - emit(); - subscriber.complete(); - }, undefined, () => { - lastValue = durationSubscriber = null; - })); - }); -} -//# sourceMappingURL=debounce.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/debounce.js.map b/node_modules/rxjs/dist/esm/internal/operators/debounce.js.map deleted file mode 100644 index 45b0615..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/debounce.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"debounce.js","sourceRoot":"","sources":["../../../../src/internal/operators/debounce.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA4DpD,MAAM,UAAU,QAAQ,CAAI,gBAAoD;IAC9E,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,SAAS,GAAa,IAAI,CAAC;QAE/B,IAAI,kBAAkB,GAA2B,IAAI,CAAC;QAEtD,MAAM,IAAI,GAAG,GAAG,EAAE;YAIhB,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,WAAW,EAAE,CAAC;YAClC,kBAAkB,GAAG,IAAI,CAAC;YAC1B,IAAI,QAAQ,EAAE;gBAEZ,QAAQ,GAAG,KAAK,CAAC;gBACjB,MAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAQ,EAAE,EAAE;YAIX,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,WAAW,EAAE,CAAC;YAClC,QAAQ,GAAG,IAAI,CAAC;YAChB,SAAS,GAAG,KAAK,CAAC;YAGlB,kBAAkB,GAAG,wBAAwB,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;YAEtE,SAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;QACnE,CAAC,EACD,GAAG,EAAE;YAGH,IAAI,EAAE,CAAC;YACP,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EAED,SAAS,EACT,GAAG,EAAE;YAEH,SAAS,GAAG,kBAAkB,GAAG,IAAI,CAAC;QACxC,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/debounceTime.js b/node_modules/rxjs/dist/esm/internal/operators/debounceTime.js deleted file mode 100644 index 28c058a..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/debounceTime.js +++ /dev/null @@ -1,43 +0,0 @@ -import { asyncScheduler } from '../scheduler/async'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function debounceTime(dueTime, scheduler = asyncScheduler) { - return operate((source, subscriber) => { - let activeTask = null; - let lastValue = null; - let lastTime = null; - const emit = () => { - if (activeTask) { - activeTask.unsubscribe(); - activeTask = null; - const value = lastValue; - lastValue = null; - subscriber.next(value); - } - }; - function emitWhenIdle() { - const targetTime = lastTime + dueTime; - const now = scheduler.now(); - if (now < targetTime) { - activeTask = this.schedule(undefined, targetTime - now); - subscriber.add(activeTask); - return; - } - emit(); - } - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - lastValue = value; - lastTime = scheduler.now(); - if (!activeTask) { - activeTask = scheduler.schedule(emitWhenIdle, dueTime); - subscriber.add(activeTask); - } - }, () => { - emit(); - subscriber.complete(); - }, undefined, () => { - lastValue = activeTask = null; - })); - }); -} -//# sourceMappingURL=debounceTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/debounceTime.js.map b/node_modules/rxjs/dist/esm/internal/operators/debounceTime.js.map deleted file mode 100644 index c901e1c..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/debounceTime.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"debounceTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/debounceTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA0DhE,MAAM,UAAU,YAAY,CAAI,OAAe,EAAE,YAA2B,cAAc;IACxF,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,UAAU,GAAwB,IAAI,CAAC;QAC3C,IAAI,SAAS,GAAa,IAAI,CAAC;QAC/B,IAAI,QAAQ,GAAkB,IAAI,CAAC;QAEnC,MAAM,IAAI,GAAG,GAAG,EAAE;YAChB,IAAI,UAAU,EAAE;gBAEd,UAAU,CAAC,WAAW,EAAE,CAAC;gBACzB,UAAU,GAAG,IAAI,CAAC;gBAClB,MAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,CAAC;QACF,SAAS,YAAY;YAInB,MAAM,UAAU,GAAG,QAAS,GAAG,OAAO,CAAC;YACvC,MAAM,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;YAC5B,IAAI,GAAG,GAAG,UAAU,EAAE;gBAEpB,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,UAAU,GAAG,GAAG,CAAC,CAAC;gBACxD,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;gBAC3B,OAAO;aACR;YAED,IAAI,EAAE,CAAC;QACT,CAAC;QAED,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAQ,EAAE,EAAE;YACX,SAAS,GAAG,KAAK,CAAC;YAClB,QAAQ,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;YAG3B,IAAI,CAAC,UAAU,EAAE;gBACf,UAAU,GAAG,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;gBACvD,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;aAC5B;QACH,CAAC,EACD,GAAG,EAAE;YAGH,IAAI,EAAE,CAAC;YACP,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EAED,SAAS,EACT,GAAG,EAAE;YAEH,SAAS,GAAG,UAAU,GAAG,IAAI,CAAC;QAChC,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js b/node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js deleted file mode 100644 index 651de76..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js +++ /dev/null @@ -1,17 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function defaultIfEmpty(defaultValue) { - return operate((source, subscriber) => { - let hasValue = false; - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - hasValue = true; - subscriber.next(value); - }, () => { - if (!hasValue) { - subscriber.next(defaultValue); - } - subscriber.complete(); - })); - }); -} -//# sourceMappingURL=defaultIfEmpty.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js.map b/node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js.map deleted file mode 100644 index 230a9df..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defaultIfEmpty.js","sourceRoot":"","sources":["../../../../src/internal/operators/defaultIfEmpty.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAqChE,MAAM,UAAU,cAAc,CAAO,YAAe;IAClD,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YACR,QAAQ,GAAG,IAAI,CAAC;YAChB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC,EACD,GAAG,EAAE;YACH,IAAI,CAAC,QAAQ,EAAE;gBACb,UAAU,CAAC,IAAI,CAAC,YAAa,CAAC,CAAC;aAChC;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/delay.js b/node_modules/rxjs/dist/esm/internal/operators/delay.js deleted file mode 100644 index 2ceb484..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/delay.js +++ /dev/null @@ -1,8 +0,0 @@ -import { asyncScheduler } from '../scheduler/async'; -import { delayWhen } from './delayWhen'; -import { timer } from '../observable/timer'; -export function delay(due, scheduler = asyncScheduler) { - const duration = timer(due, scheduler); - return delayWhen(() => duration); -} -//# sourceMappingURL=delay.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/delay.js.map b/node_modules/rxjs/dist/esm/internal/operators/delay.js.map deleted file mode 100644 index 26fdd77..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/delay.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"delay.js","sourceRoot":"","sources":["../../../../src/internal/operators/delay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AA0D5C,MAAM,UAAU,KAAK,CAAI,GAAkB,EAAE,YAA2B,cAAc;IACpF,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IACvC,OAAO,SAAS,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC;AACnC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/delayWhen.js b/node_modules/rxjs/dist/esm/internal/operators/delayWhen.js deleted file mode 100644 index ec40e71..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/delayWhen.js +++ /dev/null @@ -1,13 +0,0 @@ -import { concat } from '../observable/concat'; -import { take } from './take'; -import { ignoreElements } from './ignoreElements'; -import { mapTo } from './mapTo'; -import { mergeMap } from './mergeMap'; -import { innerFrom } from '../observable/innerFrom'; -export function delayWhen(delayDurationSelector, subscriptionDelay) { - if (subscriptionDelay) { - return (source) => concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector))); - } - return mergeMap((value, index) => innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value))); -} -//# sourceMappingURL=delayWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/delayWhen.js.map b/node_modules/rxjs/dist/esm/internal/operators/delayWhen.js.map deleted file mode 100644 index 8ba7fff..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/delayWhen.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"delayWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/delayWhen.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAoFpD,MAAM,UAAU,SAAS,CACvB,qBAAwE,EACxE,iBAAmC;IAEnC,IAAI,iBAAiB,EAAE;QAErB,OAAO,CAAC,MAAqB,EAAE,EAAE,CAC/B,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;KAC5G;IAED,OAAO,QAAQ,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,qBAAqB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAChH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/dematerialize.js b/node_modules/rxjs/dist/esm/internal/operators/dematerialize.js deleted file mode 100644 index 36fd9f6..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/dematerialize.js +++ /dev/null @@ -1,9 +0,0 @@ -import { observeNotification } from '../Notification'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function dematerialize() { - return operate((source, subscriber) => { - source.subscribe(createOperatorSubscriber(subscriber, (notification) => observeNotification(notification, subscriber))); - }); -} -//# sourceMappingURL=dematerialize.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/dematerialize.js.map b/node_modules/rxjs/dist/esm/internal/operators/dematerialize.js.map deleted file mode 100644 index 7e5a2cf..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/dematerialize.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dematerialize.js","sourceRoot":"","sources":["../../../../src/internal/operators/dematerialize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAkDhE,MAAM,UAAU,aAAa;IAC3B,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,CAAC,YAAY,EAAE,EAAE,CAAC,mBAAmB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAC1H,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/distinct.js b/node_modules/rxjs/dist/esm/internal/operators/distinct.js deleted file mode 100644 index 597a805..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/distinct.js +++ /dev/null @@ -1,18 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { noop } from '../util/noop'; -import { innerFrom } from '../observable/innerFrom'; -export function distinct(keySelector, flushes) { - return operate((source, subscriber) => { - const distinctKeys = new Set(); - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - const key = keySelector ? keySelector(value) : value; - if (!distinctKeys.has(key)) { - distinctKeys.add(key); - subscriber.next(value); - } - })); - flushes && innerFrom(flushes).subscribe(createOperatorSubscriber(subscriber, () => distinctKeys.clear(), noop)); - }); -} -//# sourceMappingURL=distinct.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/distinct.js.map b/node_modules/rxjs/dist/esm/internal/operators/distinct.js.map deleted file mode 100644 index 46576eb..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/distinct.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"distinct.js","sourceRoot":"","sources":["../../../../src/internal/operators/distinct.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA2DpD,MAAM,UAAU,QAAQ,CAAO,WAA6B,EAAE,OAA8B;IAC1F,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,MAAM,YAAY,GAAG,IAAI,GAAG,EAAE,CAAC;QAC/B,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;YAC7C,MAAM,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;YACrD,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;gBAC1B,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBACtB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,CAAC,CACH,CAAC;QAEF,OAAO,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;IAClH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js b/node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js deleted file mode 100644 index 7e7d17c..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js +++ /dev/null @@ -1,22 +0,0 @@ -import { identity } from '../util/identity'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function distinctUntilChanged(comparator, keySelector = identity) { - comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare; - return operate((source, subscriber) => { - let previousKey; - let first = true; - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - const currentKey = keySelector(value); - if (first || !comparator(previousKey, currentKey)) { - first = false; - previousKey = currentKey; - subscriber.next(value); - } - })); - }); -} -function defaultCompare(a, b) { - return a === b; -} -//# sourceMappingURL=distinctUntilChanged.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js.map b/node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js.map deleted file mode 100644 index 06dc6cc..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"distinctUntilChanged.js","sourceRoot":"","sources":["../../../../src/internal/operators/distinctUntilChanged.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAuIhE,MAAM,UAAU,oBAAoB,CAClC,UAAiD,EACjD,cAA+B,QAA2B;IAK1D,UAAU,GAAG,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,cAAc,CAAC;IAE1C,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QAGpC,IAAI,WAAc,CAAC;QAEnB,IAAI,KAAK,GAAG,IAAI,CAAC;QAEjB,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;YAE7C,MAAM,UAAU,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;YAKtC,IAAI,KAAK,IAAI,CAAC,UAAW,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE;gBAMlD,KAAK,GAAG,KAAK,CAAC;gBACd,WAAW,GAAG,UAAU,CAAC;gBAGzB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,cAAc,CAAC,CAAM,EAAE,CAAM;IACpC,OAAO,CAAC,KAAK,CAAC,CAAC;AACjB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/distinctUntilKeyChanged.js b/node_modules/rxjs/dist/esm/internal/operators/distinctUntilKeyChanged.js deleted file mode 100644 index 50e843a..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/distinctUntilKeyChanged.js +++ /dev/null @@ -1,5 +0,0 @@ -import { distinctUntilChanged } from './distinctUntilChanged'; -export function distinctUntilKeyChanged(key, compare) { - return distinctUntilChanged((x, y) => (compare ? compare(x[key], y[key]) : x[key] === y[key])); -} -//# sourceMappingURL=distinctUntilKeyChanged.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/distinctUntilKeyChanged.js.map b/node_modules/rxjs/dist/esm/internal/operators/distinctUntilKeyChanged.js.map deleted file mode 100644 index 95b3f3d..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/distinctUntilKeyChanged.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"distinctUntilKeyChanged.js","sourceRoot":"","sources":["../../../../src/internal/operators/distinctUntilKeyChanged.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAqE9D,MAAM,UAAU,uBAAuB,CACrC,GAAM,EACN,OAAuC;IAEvC,OAAO,oBAAoB,CAAC,CAAC,CAAI,EAAE,CAAI,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACvG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/elementAt.js b/node_modules/rxjs/dist/esm/internal/operators/elementAt.js deleted file mode 100644 index 4851bd0..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/elementAt.js +++ /dev/null @@ -1,13 +0,0 @@ -import { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError'; -import { filter } from './filter'; -import { throwIfEmpty } from './throwIfEmpty'; -import { defaultIfEmpty } from './defaultIfEmpty'; -import { take } from './take'; -export function elementAt(index, defaultValue) { - if (index < 0) { - throw new ArgumentOutOfRangeError(); - } - const hasDefaultValue = arguments.length >= 2; - return (source) => source.pipe(filter((v, i) => i === index), take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new ArgumentOutOfRangeError())); -} -//# sourceMappingURL=elementAt.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/elementAt.js.map b/node_modules/rxjs/dist/esm/internal/operators/elementAt.js.map deleted file mode 100644 index 9b7de9b..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/elementAt.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"elementAt.js","sourceRoot":"","sources":["../../../../src/internal/operators/elementAt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAG1E,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAkD9B,MAAM,UAAU,SAAS,CAAW,KAAa,EAAE,YAAgB;IACjE,IAAI,KAAK,GAAG,CAAC,EAAE;QACb,MAAM,IAAI,uBAAuB,EAAE,CAAC;KACrC;IACD,MAAM,eAAe,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;IAC9C,OAAO,CAAC,MAAqB,EAAE,EAAE,CAC/B,MAAM,CAAC,IAAI,CACT,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,EAC7B,IAAI,CAAC,CAAC,CAAC,EACP,eAAe,CAAC,CAAC,CAAC,cAAc,CAAC,YAAa,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,IAAI,uBAAuB,EAAE,CAAC,CACpG,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/endWith.js b/node_modules/rxjs/dist/esm/internal/operators/endWith.js deleted file mode 100644 index b3d3719..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/endWith.js +++ /dev/null @@ -1,6 +0,0 @@ -import { concat } from '../observable/concat'; -import { of } from '../observable/of'; -export function endWith(...values) { - return (source) => concat(source, of(...values)); -} -//# sourceMappingURL=endWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/endWith.js.map b/node_modules/rxjs/dist/esm/internal/operators/endWith.js.map deleted file mode 100644 index a3d371b..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/endWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"endWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/endWith.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AA8DtC,MAAM,UAAU,OAAO,CAAI,GAAG,MAAgC;IAC5D,OAAO,CAAC,MAAqB,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,CAAkB,CAAC;AACnF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/every.js b/node_modules/rxjs/dist/esm/internal/operators/every.js deleted file mode 100644 index 3692a1c..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/every.js +++ /dev/null @@ -1,17 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function every(predicate, thisArg) { - return operate((source, subscriber) => { - let index = 0; - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - if (!predicate.call(thisArg, value, index++, source)) { - subscriber.next(false); - subscriber.complete(); - } - }, () => { - subscriber.next(true); - subscriber.complete(); - })); - }); -} -//# sourceMappingURL=every.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/every.js.map b/node_modules/rxjs/dist/esm/internal/operators/every.js.map deleted file mode 100644 index fc7da5b..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/every.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"every.js","sourceRoot":"","sources":["../../../../src/internal/operators/every.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAwChE,MAAM,UAAU,KAAK,CACnB,SAAsE,EACtE,OAAa;IAEb,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YACR,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,EAAE;gBACpD,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,EACD,GAAG,EAAE;YACH,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/exhaust.js b/node_modules/rxjs/dist/esm/internal/operators/exhaust.js deleted file mode 100644 index 2c5be00..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/exhaust.js +++ /dev/null @@ -1,3 +0,0 @@ -import { exhaustAll } from './exhaustAll'; -export const exhaust = exhaustAll; -//# sourceMappingURL=exhaust.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/exhaust.js.map b/node_modules/rxjs/dist/esm/internal/operators/exhaust.js.map deleted file mode 100644 index e29a1f2..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/exhaust.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exhaust.js","sourceRoot":"","sources":["../../../../src/internal/operators/exhaust.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1C,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/exhaustAll.js b/node_modules/rxjs/dist/esm/internal/operators/exhaustAll.js deleted file mode 100644 index c61b4f8..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/exhaustAll.js +++ /dev/null @@ -1,6 +0,0 @@ -import { exhaustMap } from './exhaustMap'; -import { identity } from '../util/identity'; -export function exhaustAll() { - return exhaustMap(identity); -} -//# sourceMappingURL=exhaustAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/exhaustAll.js.map b/node_modules/rxjs/dist/esm/internal/operators/exhaustAll.js.map deleted file mode 100644 index 9d961b0..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/exhaustAll.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exhaustAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/exhaustAll.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AA8C5C,MAAM,UAAU,UAAU;IACxB,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/exhaustMap.js b/node_modules/rxjs/dist/esm/internal/operators/exhaustMap.js deleted file mode 100644 index b4d99a4..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/exhaustMap.js +++ /dev/null @@ -1,27 +0,0 @@ -import { map } from './map'; -import { innerFrom } from '../observable/innerFrom'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function exhaustMap(project, resultSelector) { - if (resultSelector) { - return (source) => source.pipe(exhaustMap((a, i) => innerFrom(project(a, i)).pipe(map((b, ii) => resultSelector(a, b, i, ii))))); - } - return operate((source, subscriber) => { - let index = 0; - let innerSub = null; - let isComplete = false; - source.subscribe(createOperatorSubscriber(subscriber, (outerValue) => { - if (!innerSub) { - innerSub = createOperatorSubscriber(subscriber, undefined, () => { - innerSub = null; - isComplete && subscriber.complete(); - }); - innerFrom(project(outerValue, index++)).subscribe(innerSub); - } - }, () => { - isComplete = true; - !innerSub && subscriber.complete(); - })); - }); -} -//# sourceMappingURL=exhaustMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/exhaustMap.js.map b/node_modules/rxjs/dist/esm/internal/operators/exhaustMap.js.map deleted file mode 100644 index 90e0e0e..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/exhaustMap.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exhaustMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/exhaustMap.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA6DhE,MAAM,UAAU,UAAU,CACxB,OAAuC,EACvC,cAA6G;IAE7G,IAAI,cAAc,EAAE;QAElB,OAAO,CAAC,MAAqB,EAAE,EAAE,CAC/B,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAO,EAAE,EAAE,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAC3H;IACD,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,IAAI,QAAQ,GAAyB,IAAI,CAAC;QAC1C,IAAI,UAAU,GAAG,KAAK,CAAC;QACvB,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,UAAU,EAAE,EAAE;YACb,IAAI,CAAC,QAAQ,EAAE;gBACb,QAAQ,GAAG,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE;oBAC9D,QAAQ,GAAG,IAAI,CAAC;oBAChB,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;gBACtC,CAAC,CAAC,CAAC;gBACH,SAAS,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;aAC7D;QACH,CAAC,EACD,GAAG,EAAE;YACH,UAAU,GAAG,IAAI,CAAC;YAClB,CAAC,QAAQ,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACrC,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/expand.js b/node_modules/rxjs/dist/esm/internal/operators/expand.js deleted file mode 100644 index c515da0..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/expand.js +++ /dev/null @@ -1,7 +0,0 @@ -import { operate } from '../util/lift'; -import { mergeInternals } from './mergeInternals'; -export function expand(project, concurrent = Infinity, scheduler) { - concurrent = (concurrent || 0) < 1 ? Infinity : concurrent; - return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent, undefined, true, scheduler)); -} -//# sourceMappingURL=expand.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/expand.js.map b/node_modules/rxjs/dist/esm/internal/operators/expand.js.map deleted file mode 100644 index 45d529d..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/expand.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"expand.js","sourceRoot":"","sources":["../../../../src/internal/operators/expand.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAsElD,MAAM,UAAU,MAAM,CACpB,OAAuC,EACvC,UAAU,GAAG,QAAQ,EACrB,SAAyB;IAEzB,UAAU,GAAG,CAAC,UAAU,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC;IAC3D,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE,CACpC,cAAc,CAEZ,MAAM,EACN,UAAU,EACV,OAAO,EACP,UAAU,EAGV,SAAS,EAGT,IAAI,EACJ,SAAS,CACV,CACF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/filter.js b/node_modules/rxjs/dist/esm/internal/operators/filter.js deleted file mode 100644 index d141765..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/filter.js +++ /dev/null @@ -1,9 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function filter(predicate, thisArg) { - return operate((source, subscriber) => { - let index = 0; - source.subscribe(createOperatorSubscriber(subscriber, (value) => predicate.call(thisArg, value, index++) && subscriber.next(value))); - }); -} -//# sourceMappingURL=filter.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/filter.js.map b/node_modules/rxjs/dist/esm/internal/operators/filter.js.map deleted file mode 100644 index e9f3b6c..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/filter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"filter.js","sourceRoot":"","sources":["../../../../src/internal/operators/filter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA0DhE,MAAM,UAAU,MAAM,CAAI,SAA+C,EAAE,OAAa;IACtF,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QAEpC,IAAI,KAAK,GAAG,CAAC,CAAC;QAId,MAAM,CAAC,SAAS,CAId,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CACnH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/finalize.js b/node_modules/rxjs/dist/esm/internal/operators/finalize.js deleted file mode 100644 index a5dd66f..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/finalize.js +++ /dev/null @@ -1,12 +0,0 @@ -import { operate } from '../util/lift'; -export function finalize(callback) { - return operate((source, subscriber) => { - try { - source.subscribe(subscriber); - } - finally { - subscriber.add(callback); - } - }); -} -//# sourceMappingURL=finalize.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/finalize.js.map b/node_modules/rxjs/dist/esm/internal/operators/finalize.js.map deleted file mode 100644 index c1c0959..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/finalize.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"finalize.js","sourceRoot":"","sources":["../../../../src/internal/operators/finalize.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA+DvC,MAAM,UAAU,QAAQ,CAAI,QAAoB;IAC9C,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QAGpC,IAAI;YACF,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;SAC9B;gBAAS;YACR,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;SAC1B;IACH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/find.js b/node_modules/rxjs/dist/esm/internal/operators/find.js deleted file mode 100644 index daf1706..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/find.js +++ /dev/null @@ -1,22 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function find(predicate, thisArg) { - return operate(createFind(predicate, thisArg, 'value')); -} -export function createFind(predicate, thisArg, emit) { - const findIndex = emit === 'index'; - return (source, subscriber) => { - let index = 0; - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - const i = index++; - if (predicate.call(thisArg, value, i, source)) { - subscriber.next(findIndex ? i : value); - subscriber.complete(); - } - }, () => { - subscriber.next(findIndex ? -1 : undefined); - subscriber.complete(); - })); - }; -} -//# sourceMappingURL=find.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/find.js.map b/node_modules/rxjs/dist/esm/internal/operators/find.js.map deleted file mode 100644 index 84fcbb9..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/find.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"find.js","sourceRoot":"","sources":["../../../../src/internal/operators/find.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA2DhE,MAAM,UAAU,IAAI,CAClB,SAAsE,EACtE,OAAa;IAEb,OAAO,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,UAAU,CACxB,SAAsE,EACtE,OAAY,EACZ,IAAuB;IAEvB,MAAM,SAAS,GAAG,IAAI,KAAK,OAAO,CAAC;IACnC,OAAO,CAAC,MAAqB,EAAE,UAA2B,EAAE,EAAE;QAC5D,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YACR,MAAM,CAAC,GAAG,KAAK,EAAE,CAAC;YAClB,IAAI,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE;gBAC7C,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;gBACvC,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,EACD,GAAG,EAAE;YACH,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;YAC5C,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/findIndex.js b/node_modules/rxjs/dist/esm/internal/operators/findIndex.js deleted file mode 100644 index d59c5f8..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/findIndex.js +++ /dev/null @@ -1,6 +0,0 @@ -import { operate } from '../util/lift'; -import { createFind } from './find'; -export function findIndex(predicate, thisArg) { - return operate(createFind(predicate, thisArg, 'index')); -} -//# sourceMappingURL=findIndex.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/findIndex.js.map b/node_modules/rxjs/dist/esm/internal/operators/findIndex.js.map deleted file mode 100644 index 2bbddd0..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/findIndex.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"findIndex.js","sourceRoot":"","sources":["../../../../src/internal/operators/findIndex.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAsDpC,MAAM,UAAU,SAAS,CACvB,SAAsE,EACtE,OAAa;IAEb,OAAO,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAC1D,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/first.js b/node_modules/rxjs/dist/esm/internal/operators/first.js deleted file mode 100644 index 406bba0..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/first.js +++ /dev/null @@ -1,11 +0,0 @@ -import { EmptyError } from '../util/EmptyError'; -import { filter } from './filter'; -import { take } from './take'; -import { defaultIfEmpty } from './defaultIfEmpty'; -import { throwIfEmpty } from './throwIfEmpty'; -import { identity } from '../util/identity'; -export function first(predicate, defaultValue) { - const hasDefaultValue = arguments.length >= 2; - return (source) => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError())); -} -//# sourceMappingURL=first.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/first.js.map b/node_modules/rxjs/dist/esm/internal/operators/first.js.map deleted file mode 100644 index 203054b..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/first.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"first.js","sourceRoot":"","sources":["../../../../src/internal/operators/first.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AA0E5C,MAAM,UAAU,KAAK,CACnB,SAAgF,EAChF,YAAgB;IAEhB,MAAM,eAAe,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;IAC9C,OAAO,CAAC,MAAqB,EAAE,EAAE,CAC/B,MAAM,CAAC,IAAI,CACT,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAChE,IAAI,CAAC,CAAC,CAAC,EACP,eAAe,CAAC,CAAC,CAAC,cAAc,CAAC,YAAa,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,IAAI,UAAU,EAAE,CAAC,CACvF,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/flatMap.js b/node_modules/rxjs/dist/esm/internal/operators/flatMap.js deleted file mode 100644 index 96e084c..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/flatMap.js +++ /dev/null @@ -1,3 +0,0 @@ -import { mergeMap } from './mergeMap'; -export const flatMap = mergeMap; -//# sourceMappingURL=flatMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/flatMap.js.map b/node_modules/rxjs/dist/esm/internal/operators/flatMap.js.map deleted file mode 100644 index 83f9dac..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/flatMap.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"flatMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/flatMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAKtC,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/groupBy.js b/node_modules/rxjs/dist/esm/internal/operators/groupBy.js deleted file mode 100644 index 56f00b6..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/groupBy.js +++ /dev/null @@ -1,63 +0,0 @@ -import { Observable } from '../Observable'; -import { innerFrom } from '../observable/innerFrom'; -import { Subject } from '../Subject'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber, OperatorSubscriber } from './OperatorSubscriber'; -export function groupBy(keySelector, elementOrOptions, duration, connector) { - return operate((source, subscriber) => { - let element; - if (!elementOrOptions || typeof elementOrOptions === 'function') { - element = elementOrOptions; - } - else { - ({ duration, element, connector } = elementOrOptions); - } - const groups = new Map(); - const notify = (cb) => { - groups.forEach(cb); - cb(subscriber); - }; - const handleError = (err) => notify((consumer) => consumer.error(err)); - let activeGroups = 0; - let teardownAttempted = false; - const groupBySourceSubscriber = new OperatorSubscriber(subscriber, (value) => { - try { - const key = keySelector(value); - let group = groups.get(key); - if (!group) { - groups.set(key, (group = connector ? connector() : new Subject())); - const grouped = createGroupedObservable(key, group); - subscriber.next(grouped); - if (duration) { - const durationSubscriber = createOperatorSubscriber(group, () => { - group.complete(); - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); - }, undefined, undefined, () => groups.delete(key)); - groupBySourceSubscriber.add(innerFrom(duration(grouped)).subscribe(durationSubscriber)); - } - } - group.next(element ? element(value) : value); - } - catch (err) { - handleError(err); - } - }, () => notify((consumer) => consumer.complete()), handleError, () => groups.clear(), () => { - teardownAttempted = true; - return activeGroups === 0; - }); - source.subscribe(groupBySourceSubscriber); - function createGroupedObservable(key, groupSubject) { - const result = new Observable((groupSubscriber) => { - activeGroups++; - const innerSub = groupSubject.subscribe(groupSubscriber); - return () => { - innerSub.unsubscribe(); - --activeGroups === 0 && teardownAttempted && groupBySourceSubscriber.unsubscribe(); - }; - }); - result.key = key; - return result; - } - }); -} -//# sourceMappingURL=groupBy.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/groupBy.js.map b/node_modules/rxjs/dist/esm/internal/operators/groupBy.js.map deleted file mode 100644 index c02375f..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/groupBy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"groupBy.js","sourceRoot":"","sources":["../../../../src/internal/operators/groupBy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAuIpF,MAAM,UAAU,OAAO,CACrB,WAA4B,EAC5B,gBAAgH,EAChH,QAAyE,EACzE,SAAkC;IAElC,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,OAAqC,CAAC;QAC1C,IAAI,CAAC,gBAAgB,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE;YAC/D,OAAO,GAAG,gBAAyC,CAAC;SACrD;aAAM;YACL,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,gBAAgB,CAAC,CAAC;SACvD;QAGD,MAAM,MAAM,GAAG,IAAI,GAAG,EAAuB,CAAC;QAG9C,MAAM,MAAM,GAAG,CAAC,EAAkC,EAAE,EAAE;YACpD,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YACnB,EAAE,CAAC,UAAU,CAAC,CAAC;QACjB,CAAC,CAAC;QAIF,MAAM,WAAW,GAAG,CAAC,GAAQ,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;QAG5E,IAAI,YAAY,GAAG,CAAC,CAAC;QAGrB,IAAI,iBAAiB,GAAG,KAAK,CAAC;QAS9B,MAAM,uBAAuB,GAAG,IAAI,kBAAkB,CACpD,UAAU,EACV,CAAC,KAAQ,EAAE,EAAE;YAIX,IAAI;gBACF,MAAM,GAAG,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;gBAE/B,IAAI,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBAC5B,IAAI,CAAC,KAAK,EAAE;oBAEV,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,IAAI,OAAO,EAAO,CAAC,CAAC,CAAC;oBAKxE,MAAM,OAAO,GAAG,uBAAuB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;oBACpD,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBAEzB,IAAI,QAAQ,EAAE;wBACZ,MAAM,kBAAkB,GAAG,wBAAwB,CAMjD,KAAY,EACZ,GAAG,EAAE;4BAGH,KAAM,CAAC,QAAQ,EAAE,CAAC;4BAClB,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,WAAW,EAAE,CAAC;wBACpC,CAAC,EAED,SAAS,EAGT,SAAS,EAET,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CACzB,CAAC;wBAGF,uBAAuB,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC,CAAC;qBACzF;iBACF;gBAGD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;aAC9C;YAAC,OAAO,GAAG,EAAE;gBACZ,WAAW,CAAC,GAAG,CAAC,CAAC;aAClB;QACH,CAAC,EAED,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,EAE/C,WAAW,EAKX,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,EACpB,GAAG,EAAE;YACH,iBAAiB,GAAG,IAAI,CAAC;YAIzB,OAAO,YAAY,KAAK,CAAC,CAAC;QAC5B,CAAC,CACF,CAAC;QAGF,MAAM,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAC;QAO1C,SAAS,uBAAuB,CAAC,GAAM,EAAE,YAA8B;YACrE,MAAM,MAAM,GAAQ,IAAI,UAAU,CAAI,CAAC,eAAe,EAAE,EAAE;gBACxD,YAAY,EAAE,CAAC;gBACf,MAAM,QAAQ,GAAG,YAAY,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;gBACzD,OAAO,GAAG,EAAE;oBACV,QAAQ,CAAC,WAAW,EAAE,CAAC;oBAIvB,EAAE,YAAY,KAAK,CAAC,IAAI,iBAAiB,IAAI,uBAAuB,CAAC,WAAW,EAAE,CAAC;gBACrF,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC;YACH,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;YACjB,OAAO,MAAM,CAAC;QAChB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js b/node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js deleted file mode 100644 index 138ee2b..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js +++ /dev/null @@ -1,9 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { noop } from '../util/noop'; -export function ignoreElements() { - return operate((source, subscriber) => { - source.subscribe(createOperatorSubscriber(subscriber, noop)); - }); -} -//# sourceMappingURL=ignoreElements.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js.map b/node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js.map deleted file mode 100644 index 459e9cf..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ignoreElements.js","sourceRoot":"","sources":["../../../../src/internal/operators/ignoreElements.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAqCpC,MAAM,UAAU,cAAc;IAC5B,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/isEmpty.js b/node_modules/rxjs/dist/esm/internal/operators/isEmpty.js deleted file mode 100644 index 763aec5..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/isEmpty.js +++ /dev/null @@ -1,14 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function isEmpty() { - return operate((source, subscriber) => { - source.subscribe(createOperatorSubscriber(subscriber, () => { - subscriber.next(false); - subscriber.complete(); - }, () => { - subscriber.next(true); - subscriber.complete(); - })); - }); -} -//# sourceMappingURL=isEmpty.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/isEmpty.js.map b/node_modules/rxjs/dist/esm/internal/operators/isEmpty.js.map deleted file mode 100644 index e3584eb..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/isEmpty.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isEmpty.js","sourceRoot":"","sources":["../../../../src/internal/operators/isEmpty.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA+DhE,MAAM,UAAU,OAAO;IACrB,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,GAAG,EAAE;YACH,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACvB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,GAAG,EAAE;YACH,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/joinAllInternals.js b/node_modules/rxjs/dist/esm/internal/operators/joinAllInternals.js deleted file mode 100644 index 398bb58..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/joinAllInternals.js +++ /dev/null @@ -1,9 +0,0 @@ -import { identity } from '../util/identity'; -import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; -import { pipe } from '../util/pipe'; -import { mergeMap } from './mergeMap'; -import { toArray } from './toArray'; -export function joinAllInternals(joinFn, project) { - return pipe(toArray(), mergeMap((sources) => joinFn(sources)), project ? mapOneOrManyArgs(project) : identity); -} -//# sourceMappingURL=joinAllInternals.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/joinAllInternals.js.map b/node_modules/rxjs/dist/esm/internal/operators/joinAllInternals.js.map deleted file mode 100644 index bda561d..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/joinAllInternals.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"joinAllInternals.js","sourceRoot":"","sources":["../../../../src/internal/operators/joinAllInternals.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,MAAM,UAAU,gBAAgB,CAAO,MAAwD,EAAE,OAA+B;IAC9H,OAAO,IAAI,CAGT,OAAO,EAAgE,EAEvE,QAAQ,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,EAEtC,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAE,QAAgB,CACxD,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/last.js b/node_modules/rxjs/dist/esm/internal/operators/last.js deleted file mode 100644 index ff65d75..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/last.js +++ /dev/null @@ -1,11 +0,0 @@ -import { EmptyError } from '../util/EmptyError'; -import { filter } from './filter'; -import { takeLast } from './takeLast'; -import { throwIfEmpty } from './throwIfEmpty'; -import { defaultIfEmpty } from './defaultIfEmpty'; -import { identity } from '../util/identity'; -export function last(predicate, defaultValue) { - const hasDefaultValue = arguments.length >= 2; - return (source) => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError())); -} -//# sourceMappingURL=last.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/last.js.map b/node_modules/rxjs/dist/esm/internal/operators/last.js.map deleted file mode 100644 index 4445b30..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/last.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"last.js","sourceRoot":"","sources":["../../../../src/internal/operators/last.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAwE5C,MAAM,UAAU,IAAI,CAClB,SAAgF,EAChF,YAAgB;IAEhB,MAAM,eAAe,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;IAC9C,OAAO,CAAC,MAAqB,EAAE,EAAE,CAC/B,MAAM,CAAC,IAAI,CACT,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAChE,QAAQ,CAAC,CAAC,CAAC,EACX,eAAe,CAAC,CAAC,CAAC,cAAc,CAAC,YAAa,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,IAAI,UAAU,EAAE,CAAC,CACvF,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/map.js b/node_modules/rxjs/dist/esm/internal/operators/map.js deleted file mode 100644 index f16375a..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/map.js +++ /dev/null @@ -1,11 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function map(project, thisArg) { - return operate((source, subscriber) => { - let index = 0; - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - subscriber.next(project.call(thisArg, value, index++)); - })); - }); -} -//# sourceMappingURL=map.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/map.js.map b/node_modules/rxjs/dist/esm/internal/operators/map.js.map deleted file mode 100644 index 59e44fc..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/map.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"map.js","sourceRoot":"","sources":["../../../../src/internal/operators/map.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA4ChE,MAAM,UAAU,GAAG,CAAO,OAAuC,EAAE,OAAa;IAC9E,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QAEpC,IAAI,KAAK,GAAG,CAAC,CAAC;QAGd,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAQ,EAAE,EAAE;YAGhD,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QACzD,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mapTo.js b/node_modules/rxjs/dist/esm/internal/operators/mapTo.js deleted file mode 100644 index 147161a..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/mapTo.js +++ /dev/null @@ -1,5 +0,0 @@ -import { map } from './map'; -export function mapTo(value) { - return map(() => value); -} -//# sourceMappingURL=mapTo.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mapTo.js.map b/node_modules/rxjs/dist/esm/internal/operators/mapTo.js.map deleted file mode 100644 index 75052d6..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/mapTo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/mapTo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AA4C5B,MAAM,UAAU,KAAK,CAAI,KAAQ;IAC/B,OAAO,GAAG,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/materialize.js b/node_modules/rxjs/dist/esm/internal/operators/materialize.js deleted file mode 100644 index 9fed5d5..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/materialize.js +++ /dev/null @@ -1,17 +0,0 @@ -import { Notification } from '../Notification'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function materialize() { - return operate((source, subscriber) => { - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - subscriber.next(Notification.createNext(value)); - }, () => { - subscriber.next(Notification.createComplete()); - subscriber.complete(); - }, (err) => { - subscriber.next(Notification.createError(err)); - subscriber.complete(); - })); - }); -} -//# sourceMappingURL=materialize.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/materialize.js.map b/node_modules/rxjs/dist/esm/internal/operators/materialize.js.map deleted file mode 100644 index 3f551ab..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/materialize.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"materialize.js","sourceRoot":"","sources":["../../../../src/internal/operators/materialize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAkDhE,MAAM,UAAU,WAAW;IACzB,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YACR,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;QAClD,CAAC,EACD,GAAG,EAAE;YACH,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC,CAAC;YAC/C,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,CAAC,GAAG,EAAE,EAAE;YACN,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;YAC/C,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/max.js b/node_modules/rxjs/dist/esm/internal/operators/max.js deleted file mode 100644 index 73abbb6..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/max.js +++ /dev/null @@ -1,6 +0,0 @@ -import { reduce } from './reduce'; -import { isFunction } from '../util/isFunction'; -export function max(comparer) { - return reduce(isFunction(comparer) ? (x, y) => (comparer(x, y) > 0 ? x : y) : (x, y) => (x > y ? x : y)); -} -//# sourceMappingURL=max.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/max.js.map b/node_modules/rxjs/dist/esm/internal/operators/max.js.map deleted file mode 100644 index 9512143..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/max.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"max.js","sourceRoot":"","sources":["../../../../src/internal/operators/max.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAiDhD,MAAM,UAAU,GAAG,CAAI,QAAiC;IACtD,OAAO,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3G,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/merge.js b/node_modules/rxjs/dist/esm/internal/operators/merge.js deleted file mode 100644 index d0fea26..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/merge.js +++ /dev/null @@ -1,12 +0,0 @@ -import { operate } from '../util/lift'; -import { mergeAll } from './mergeAll'; -import { popNumber, popScheduler } from '../util/args'; -import { from } from '../observable/from'; -export function merge(...args) { - const scheduler = popScheduler(args); - const concurrent = popNumber(args, Infinity); - return operate((source, subscriber) => { - mergeAll(concurrent)(from([source, ...args], scheduler)).subscribe(subscriber); - }); -} -//# sourceMappingURL=merge.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/merge.js.map b/node_modules/rxjs/dist/esm/internal/operators/merge.js.map deleted file mode 100644 index 5378277..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/merge.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../../../src/internal/operators/merge.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAiB1C,MAAM,UAAU,KAAK,CAAI,GAAG,IAAe;IACzC,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,MAAM,UAAU,GAAG,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAE7C,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,QAAQ,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,GAAI,IAA6B,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC3G,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mergeAll.js b/node_modules/rxjs/dist/esm/internal/operators/mergeAll.js deleted file mode 100644 index bd26d7a..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/mergeAll.js +++ /dev/null @@ -1,6 +0,0 @@ -import { mergeMap } from './mergeMap'; -import { identity } from '../util/identity'; -export function mergeAll(concurrent = Infinity) { - return mergeMap(identity, concurrent); -} -//# sourceMappingURL=mergeAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mergeAll.js.map b/node_modules/rxjs/dist/esm/internal/operators/mergeAll.js.map deleted file mode 100644 index 4b41a30..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/mergeAll.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mergeAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AA8D5C,MAAM,UAAU,QAAQ,CAAiC,aAAqB,QAAQ;IACpF,OAAO,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;AACxC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js b/node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js deleted file mode 100644 index f387656..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js +++ /dev/null @@ -1,58 +0,0 @@ -import { innerFrom } from '../observable/innerFrom'; -import { executeSchedule } from '../util/executeSchedule'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) { - const buffer = []; - let active = 0; - let index = 0; - let isComplete = false; - const checkComplete = () => { - if (isComplete && !buffer.length && !active) { - subscriber.complete(); - } - }; - const outerNext = (value) => (active < concurrent ? doInnerSub(value) : buffer.push(value)); - const doInnerSub = (value) => { - expand && subscriber.next(value); - active++; - let innerComplete = false; - innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, (innerValue) => { - onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue); - if (expand) { - outerNext(innerValue); - } - else { - subscriber.next(innerValue); - } - }, () => { - innerComplete = true; - }, undefined, () => { - if (innerComplete) { - try { - active--; - while (buffer.length && active < concurrent) { - const bufferedValue = buffer.shift(); - if (innerSubScheduler) { - executeSchedule(subscriber, innerSubScheduler, () => doInnerSub(bufferedValue)); - } - else { - doInnerSub(bufferedValue); - } - } - checkComplete(); - } - catch (err) { - subscriber.error(err); - } - } - })); - }; - source.subscribe(createOperatorSubscriber(subscriber, outerNext, () => { - isComplete = true; - checkComplete(); - })); - return () => { - additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer(); - }; -} -//# sourceMappingURL=mergeInternals.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js.map b/node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js.map deleted file mode 100644 index 7a7ffe0..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mergeInternals.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeInternals.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAGpD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAehE,MAAM,UAAU,cAAc,CAC5B,MAAqB,EACrB,UAAyB,EACzB,OAAwD,EACxD,UAAkB,EAClB,YAAsC,EACtC,MAAgB,EAChB,iBAAiC,EACjC,mBAAgC;IAGhC,MAAM,MAAM,GAAQ,EAAE,CAAC;IAEvB,IAAI,MAAM,GAAG,CAAC,CAAC;IAEf,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,IAAI,UAAU,GAAG,KAAK,CAAC;IAKvB,MAAM,aAAa,GAAG,GAAG,EAAE;QAIzB,IAAI,UAAU,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE;YAC3C,UAAU,CAAC,QAAQ,EAAE,CAAC;SACvB;IACH,CAAC,CAAC;IAGF,MAAM,SAAS,GAAG,CAAC,KAAQ,EAAE,EAAE,CAAC,CAAC,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAE/F,MAAM,UAAU,GAAG,CAAC,KAAQ,EAAE,EAAE;QAI9B,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,KAAY,CAAC,CAAC;QAIxC,MAAM,EAAE,CAAC;QAKT,IAAI,aAAa,GAAG,KAAK,CAAC;QAG1B,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAC1C,wBAAwB,CACtB,UAAU,EACV,CAAC,UAAU,EAAE,EAAE;YAGb,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAG,UAAU,CAAC,CAAC;YAE3B,IAAI,MAAM,EAAE;gBAGV,SAAS,CAAC,UAAiB,CAAC,CAAC;aAC9B;iBAAM;gBAEL,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;aAC7B;QACH,CAAC,EACD,GAAG,EAAE;YAGH,aAAa,GAAG,IAAI,CAAC;QACvB,CAAC,EAED,SAAS,EACT,GAAG,EAAE;YAIH,IAAI,aAAa,EAAE;gBAKjB,IAAI;oBAIF,MAAM,EAAE,CAAC;oBAKT,OAAO,MAAM,CAAC,MAAM,IAAI,MAAM,GAAG,UAAU,EAAE;wBAC3C,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,EAAG,CAAC;wBAItC,IAAI,iBAAiB,EAAE;4BACrB,eAAe,CAAC,UAAU,EAAE,iBAAiB,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;yBACjF;6BAAM;4BACL,UAAU,CAAC,aAAa,CAAC,CAAC;yBAC3B;qBACF;oBAED,aAAa,EAAE,CAAC;iBACjB;gBAAC,OAAO,GAAG,EAAE;oBACZ,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACvB;aACF;QACH,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC;IAGF,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE;QAEnD,UAAU,GAAG,IAAI,CAAC;QAClB,aAAa,EAAE,CAAC;IAClB,CAAC,CAAC,CACH,CAAC;IAIF,OAAO,GAAG,EAAE;QACV,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,EAAI,CAAC;IAC1B,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mergeMap.js b/node_modules/rxjs/dist/esm/internal/operators/mergeMap.js deleted file mode 100644 index fc2d2fd..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/mergeMap.js +++ /dev/null @@ -1,15 +0,0 @@ -import { map } from './map'; -import { innerFrom } from '../observable/innerFrom'; -import { operate } from '../util/lift'; -import { mergeInternals } from './mergeInternals'; -import { isFunction } from '../util/isFunction'; -export function mergeMap(project, resultSelector, concurrent = Infinity) { - if (isFunction(resultSelector)) { - return mergeMap((a, i) => map((b, ii) => resultSelector(a, b, i, ii))(innerFrom(project(a, i))), concurrent); - } - else if (typeof resultSelector === 'number') { - concurrent = resultSelector; - } - return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent)); -} -//# sourceMappingURL=mergeMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mergeMap.js.map b/node_modules/rxjs/dist/esm/internal/operators/mergeMap.js.map deleted file mode 100644 index 67dba8c..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/mergeMap.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mergeMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeMap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AA2EhD,MAAM,UAAU,QAAQ,CACtB,OAAuC,EACvC,cAAwH,EACxH,aAAqB,QAAQ;IAE7B,IAAI,UAAU,CAAC,cAAc,CAAC,EAAE;QAE9B,OAAO,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAU,EAAE,EAAE,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;KAC3H;SAAM,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE;QAC7C,UAAU,GAAG,cAAc,CAAC;KAC7B;IAED,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE,CAAC,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;AAClG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mergeMapTo.js b/node_modules/rxjs/dist/esm/internal/operators/mergeMapTo.js deleted file mode 100644 index bccbabe..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/mergeMapTo.js +++ /dev/null @@ -1,12 +0,0 @@ -import { mergeMap } from './mergeMap'; -import { isFunction } from '../util/isFunction'; -export function mergeMapTo(innerObservable, resultSelector, concurrent = Infinity) { - if (isFunction(resultSelector)) { - return mergeMap(() => innerObservable, resultSelector, concurrent); - } - if (typeof resultSelector === 'number') { - concurrent = resultSelector; - } - return mergeMap(() => innerObservable, concurrent); -} -//# sourceMappingURL=mergeMapTo.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mergeMapTo.js.map b/node_modules/rxjs/dist/esm/internal/operators/mergeMapTo.js.map deleted file mode 100644 index 024ca43..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/mergeMapTo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mergeMapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeMapTo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AA2DhD,MAAM,UAAU,UAAU,CACxB,eAAkB,EAClB,cAAwH,EACxH,aAAqB,QAAQ;IAE7B,IAAI,UAAU,CAAC,cAAc,CAAC,EAAE;QAC9B,OAAO,QAAQ,CAAC,GAAG,EAAE,CAAC,eAAe,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC;KACpE;IACD,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE;QACtC,UAAU,GAAG,cAAc,CAAC;KAC7B;IACD,OAAO,QAAQ,CAAC,GAAG,EAAE,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;AACrD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mergeScan.js b/node_modules/rxjs/dist/esm/internal/operators/mergeScan.js deleted file mode 100644 index aa27459..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/mergeScan.js +++ /dev/null @@ -1,11 +0,0 @@ -import { operate } from '../util/lift'; -import { mergeInternals } from './mergeInternals'; -export function mergeScan(accumulator, seed, concurrent = Infinity) { - return operate((source, subscriber) => { - let state = seed; - return mergeInternals(source, subscriber, (value, index) => accumulator(state, value, index), concurrent, (value) => { - state = value; - }, false, undefined, () => (state = null)); - }); -} -//# sourceMappingURL=mergeScan.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mergeScan.js.map b/node_modules/rxjs/dist/esm/internal/operators/mergeScan.js.map deleted file mode 100644 index 7b4fb98..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/mergeScan.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mergeScan.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeScan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAmElD,MAAM,UAAU,SAAS,CACvB,WAAoE,EACpE,IAAO,EACP,UAAU,GAAG,QAAQ;IAErB,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QAEpC,IAAI,KAAK,GAAG,IAAI,CAAC;QAEjB,OAAO,cAAc,CACnB,MAAM,EACN,UAAU,EACV,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAClD,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YACR,KAAK,GAAG,KAAK,CAAC;QAChB,CAAC,EACD,KAAK,EACL,SAAS,EACT,GAAG,EAAE,CAAC,CAAC,KAAK,GAAG,IAAK,CAAC,CACtB,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mergeWith.js b/node_modules/rxjs/dist/esm/internal/operators/mergeWith.js deleted file mode 100644 index 166e291..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/mergeWith.js +++ /dev/null @@ -1,5 +0,0 @@ -import { merge } from './merge'; -export function mergeWith(...otherSources) { - return merge(...otherSources); -} -//# sourceMappingURL=mergeWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/mergeWith.js.map b/node_modules/rxjs/dist/esm/internal/operators/mergeWith.js.map deleted file mode 100644 index 6867e8a..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/mergeWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mergeWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeWith.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA2ChC,MAAM,UAAU,SAAS,CACvB,GAAG,YAA0C;IAE7C,OAAO,KAAK,CAAC,GAAG,YAAY,CAAC,CAAC;AAChC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/min.js b/node_modules/rxjs/dist/esm/internal/operators/min.js deleted file mode 100644 index 708a4d2..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/min.js +++ /dev/null @@ -1,6 +0,0 @@ -import { reduce } from './reduce'; -import { isFunction } from '../util/isFunction'; -export function min(comparer) { - return reduce(isFunction(comparer) ? (x, y) => (comparer(x, y) < 0 ? x : y) : (x, y) => (x < y ? x : y)); -} -//# sourceMappingURL=min.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/min.js.map b/node_modules/rxjs/dist/esm/internal/operators/min.js.map deleted file mode 100644 index 0e498a8..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"min.js","sourceRoot":"","sources":["../../../../src/internal/operators/min.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAiDhD,MAAM,UAAU,GAAG,CAAI,QAAiC;IACtD,OAAO,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3G,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/multicast.js b/node_modules/rxjs/dist/esm/internal/operators/multicast.js deleted file mode 100644 index 717ba9c..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/multicast.js +++ /dev/null @@ -1,13 +0,0 @@ -import { ConnectableObservable } from '../observable/ConnectableObservable'; -import { isFunction } from '../util/isFunction'; -import { connect } from './connect'; -export function multicast(subjectOrSubjectFactory, selector) { - const subjectFactory = isFunction(subjectOrSubjectFactory) ? subjectOrSubjectFactory : () => subjectOrSubjectFactory; - if (isFunction(selector)) { - return connect(selector, { - connector: subjectFactory, - }); - } - return (source) => new ConnectableObservable(source, subjectFactory); -} -//# sourceMappingURL=multicast.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/multicast.js.map b/node_modules/rxjs/dist/esm/internal/operators/multicast.js.map deleted file mode 100644 index 24d4b1c..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/multicast.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"multicast.js","sourceRoot":"","sources":["../../../../src/internal/operators/multicast.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4EpC,MAAM,UAAU,SAAS,CACvB,uBAAwD,EACxD,QAAmD;IAEnD,MAAM,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,uBAAuB,CAAC;IAErH,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE;QAIxB,OAAO,OAAO,CAAC,QAAQ,EAAE;YACvB,SAAS,EAAE,cAAc;SAC1B,CAAC,CAAC;KACJ;IAED,OAAO,CAAC,MAAqB,EAAE,EAAE,CAAC,IAAI,qBAAqB,CAAM,MAAM,EAAE,cAAc,CAAC,CAAC;AAC3F,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/observeOn.js b/node_modules/rxjs/dist/esm/internal/operators/observeOn.js deleted file mode 100644 index 884979c..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/observeOn.js +++ /dev/null @@ -1,9 +0,0 @@ -import { executeSchedule } from '../util/executeSchedule'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function observeOn(scheduler, delay = 0) { - return operate((source, subscriber) => { - source.subscribe(createOperatorSubscriber(subscriber, (value) => executeSchedule(subscriber, scheduler, () => subscriber.next(value), delay), () => executeSchedule(subscriber, scheduler, () => subscriber.complete(), delay), (err) => executeSchedule(subscriber, scheduler, () => subscriber.error(err), delay))); - }); -} -//# sourceMappingURL=observeOn.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/observeOn.js.map b/node_modules/rxjs/dist/esm/internal/operators/observeOn.js.map deleted file mode 100644 index 9ea9fa2..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/observeOn.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"observeOn.js","sourceRoot":"","sources":["../../../../src/internal/operators/observeOn.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAsDhE,MAAM,UAAU,SAAS,CAAI,SAAwB,EAAE,KAAK,GAAG,CAAC;IAC9D,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE,CAAC,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,EACtF,GAAG,EAAE,CAAC,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,EAChF,CAAC,GAAG,EAAE,EAAE,CAAC,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,CACpF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/onErrorResumeNextWith.js b/node_modules/rxjs/dist/esm/internal/operators/onErrorResumeNextWith.js deleted file mode 100644 index a3fd144..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/onErrorResumeNextWith.js +++ /dev/null @@ -1,8 +0,0 @@ -import { argsOrArgArray } from '../util/argsOrArgArray'; -import { onErrorResumeNext as oERNCreate } from '../observable/onErrorResumeNext'; -export function onErrorResumeNextWith(...sources) { - const nextSources = argsOrArgArray(sources); - return (source) => oERNCreate(source, ...nextSources); -} -export const onErrorResumeNext = onErrorResumeNextWith; -//# sourceMappingURL=onErrorResumeNextWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/onErrorResumeNextWith.js.map b/node_modules/rxjs/dist/esm/internal/operators/onErrorResumeNextWith.js.map deleted file mode 100644 index 7bbd7bb..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/onErrorResumeNextWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"onErrorResumeNextWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/onErrorResumeNextWith.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,iBAAiB,IAAI,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAiFlF,MAAM,UAAU,qBAAqB,CACnC,GAAG,OAAsE;IAMzE,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,CAAuC,CAAC;IAElF,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,GAAG,WAAW,CAAC,CAAC;AACxD,CAAC;AAKD,MAAM,CAAC,MAAM,iBAAiB,GAAG,qBAAqB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/pairwise.js b/node_modules/rxjs/dist/esm/internal/operators/pairwise.js deleted file mode 100644 index bec8fd8..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/pairwise.js +++ /dev/null @@ -1,15 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function pairwise() { - return operate((source, subscriber) => { - let prev; - let hasPrev = false; - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - const p = prev; - prev = value; - hasPrev && subscriber.next([p, value]); - hasPrev = true; - })); - }); -} -//# sourceMappingURL=pairwise.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/pairwise.js.map b/node_modules/rxjs/dist/esm/internal/operators/pairwise.js.map deleted file mode 100644 index b0d8eb2..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/pairwise.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pairwise.js","sourceRoot":"","sources":["../../../../src/internal/operators/pairwise.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA6ChE,MAAM,UAAU,QAAQ;IACtB,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,IAAO,CAAC;QACZ,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;YAC7C,MAAM,CAAC,GAAG,IAAI,CAAC;YACf,IAAI,GAAG,KAAK,CAAC;YACb,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;YACvC,OAAO,GAAG,IAAI,CAAC;QACjB,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/partition.js b/node_modules/rxjs/dist/esm/internal/operators/partition.js deleted file mode 100644 index 7125a62..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/partition.js +++ /dev/null @@ -1,6 +0,0 @@ -import { not } from '../util/not'; -import { filter } from './filter'; -export function partition(predicate, thisArg) { - return (source) => [filter(predicate, thisArg)(source), filter(not(predicate, thisArg))(source)]; -} -//# sourceMappingURL=partition.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/partition.js.map b/node_modules/rxjs/dist/esm/internal/operators/partition.js.map deleted file mode 100644 index 8bf0b27..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/partition.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"partition.js","sourceRoot":"","sources":["../../../../src/internal/operators/partition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAsDlC,MAAM,UAAU,SAAS,CACvB,SAA+C,EAC/C,OAAa;IAEb,OAAO,CAAC,MAAqB,EAAE,EAAE,CAC/B,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAmC,CAAC;AACpH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/pluck.js b/node_modules/rxjs/dist/esm/internal/operators/pluck.js deleted file mode 100644 index 66a5f27..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/pluck.js +++ /dev/null @@ -1,21 +0,0 @@ -import { map } from './map'; -export function pluck(...properties) { - const length = properties.length; - if (length === 0) { - throw new Error('list of properties cannot be empty.'); - } - return map((x) => { - let currentProp = x; - for (let i = 0; i < length; i++) { - const p = currentProp === null || currentProp === void 0 ? void 0 : currentProp[properties[i]]; - if (typeof p !== 'undefined') { - currentProp = p; - } - else { - return undefined; - } - } - return currentProp; - }); -} -//# sourceMappingURL=pluck.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/pluck.js.map b/node_modules/rxjs/dist/esm/internal/operators/pluck.js.map deleted file mode 100644 index bb44249..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/pluck.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pluck.js","sourceRoot":"","sources":["../../../../src/internal/operators/pluck.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAwF5B,MAAM,UAAU,KAAK,CAAO,GAAG,UAA2C;IACxE,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IACjC,IAAI,MAAM,KAAK,CAAC,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;KACxD;IACD,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACf,IAAI,WAAW,GAAQ,CAAC,CAAC;QACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;YAC/B,MAAM,CAAC,GAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAG,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACvC,IAAI,OAAO,CAAC,KAAK,WAAW,EAAE;gBAC5B,WAAW,GAAG,CAAC,CAAC;aACjB;iBAAM;gBACL,OAAO,SAAS,CAAC;aAClB;SACF;QACD,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/publish.js b/node_modules/rxjs/dist/esm/internal/operators/publish.js deleted file mode 100644 index 0878c0a..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/publish.js +++ /dev/null @@ -1,7 +0,0 @@ -import { Subject } from '../Subject'; -import { multicast } from './multicast'; -import { connect } from './connect'; -export function publish(selector) { - return selector ? (source) => connect(selector)(source) : (source) => multicast(new Subject())(source); -} -//# sourceMappingURL=publish.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/publish.js.map b/node_modules/rxjs/dist/esm/internal/operators/publish.js.map deleted file mode 100644 index ad0d969..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/publish.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../../src/internal/operators/publish.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqFpC,MAAM,UAAU,OAAO,CAAO,QAAiC;IAC7D,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,OAAO,EAAK,CAAC,CAAC,MAAM,CAAC,CAAC;AAC5G,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/publishBehavior.js b/node_modules/rxjs/dist/esm/internal/operators/publishBehavior.js deleted file mode 100644 index ed80476..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/publishBehavior.js +++ /dev/null @@ -1,9 +0,0 @@ -import { BehaviorSubject } from '../BehaviorSubject'; -import { ConnectableObservable } from '../observable/ConnectableObservable'; -export function publishBehavior(initialValue) { - return (source) => { - const subject = new BehaviorSubject(initialValue); - return new ConnectableObservable(source, () => subject); - }; -} -//# sourceMappingURL=publishBehavior.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/publishBehavior.js.map b/node_modules/rxjs/dist/esm/internal/operators/publishBehavior.js.map deleted file mode 100644 index f227f5c..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/publishBehavior.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"publishBehavior.js","sourceRoot":"","sources":["../../../../src/internal/operators/publishBehavior.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAiB5E,MAAM,UAAU,eAAe,CAAI,YAAe;IAEhD,OAAO,CAAC,MAAM,EAAE,EAAE;QAChB,MAAM,OAAO,GAAG,IAAI,eAAe,CAAI,YAAY,CAAC,CAAC;QACrD,OAAO,IAAI,qBAAqB,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC;IAC1D,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/publishLast.js b/node_modules/rxjs/dist/esm/internal/operators/publishLast.js deleted file mode 100644 index c912bb5..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/publishLast.js +++ /dev/null @@ -1,9 +0,0 @@ -import { AsyncSubject } from '../AsyncSubject'; -import { ConnectableObservable } from '../observable/ConnectableObservable'; -export function publishLast() { - return (source) => { - const subject = new AsyncSubject(); - return new ConnectableObservable(source, () => subject); - }; -} -//# sourceMappingURL=publishLast.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/publishLast.js.map b/node_modules/rxjs/dist/esm/internal/operators/publishLast.js.map deleted file mode 100644 index a9c0240..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/publishLast.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"publishLast.js","sourceRoot":"","sources":["../../../../src/internal/operators/publishLast.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAmE5E,MAAM,UAAU,WAAW;IAEzB,OAAO,CAAC,MAAM,EAAE,EAAE;QAChB,MAAM,OAAO,GAAG,IAAI,YAAY,EAAK,CAAC;QACtC,OAAO,IAAI,qBAAqB,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC;IAC1D,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/publishReplay.js b/node_modules/rxjs/dist/esm/internal/operators/publishReplay.js deleted file mode 100644 index c3f9dc1..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/publishReplay.js +++ /dev/null @@ -1,11 +0,0 @@ -import { ReplaySubject } from '../ReplaySubject'; -import { multicast } from './multicast'; -import { isFunction } from '../util/isFunction'; -export function publishReplay(bufferSize, windowTime, selectorOrScheduler, timestampProvider) { - if (selectorOrScheduler && !isFunction(selectorOrScheduler)) { - timestampProvider = selectorOrScheduler; - } - const selector = isFunction(selectorOrScheduler) ? selectorOrScheduler : undefined; - return (source) => multicast(new ReplaySubject(bufferSize, windowTime, timestampProvider), selector)(source); -} -//# sourceMappingURL=publishReplay.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/publishReplay.js.map b/node_modules/rxjs/dist/esm/internal/operators/publishReplay.js.map deleted file mode 100644 index fee688d..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/publishReplay.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"publishReplay.js","sourceRoot":"","sources":["../../../../src/internal/operators/publishReplay.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AA8EhD,MAAM,UAAU,aAAa,CAC3B,UAAmB,EACnB,UAAmB,EACnB,mBAAgE,EAChE,iBAAqC;IAErC,IAAI,mBAAmB,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE;QAC3D,iBAAiB,GAAG,mBAAmB,CAAC;KACzC;IACD,MAAM,QAAQ,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS,CAAC;IAGnF,OAAO,CAAC,MAAqB,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,aAAa,CAAI,UAAU,EAAE,UAAU,EAAE,iBAAiB,CAAC,EAAE,QAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAClI,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/race.js b/node_modules/rxjs/dist/esm/internal/operators/race.js deleted file mode 100644 index 822b399..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/race.js +++ /dev/null @@ -1,6 +0,0 @@ -import { argsOrArgArray } from '../util/argsOrArgArray'; -import { raceWith } from './raceWith'; -export function race(...args) { - return raceWith(...argsOrArgArray(args)); -} -//# sourceMappingURL=race.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/race.js.map b/node_modules/rxjs/dist/esm/internal/operators/race.js.map deleted file mode 100644 index cac5855..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/race.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"race.js","sourceRoot":"","sources":["../../../../src/internal/operators/race.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAetC,MAAM,UAAU,IAAI,CAAI,GAAG,IAAW;IACpC,OAAO,QAAQ,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;AAC3C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/raceWith.js b/node_modules/rxjs/dist/esm/internal/operators/raceWith.js deleted file mode 100644 index ff63ee1..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/raceWith.js +++ /dev/null @@ -1,11 +0,0 @@ -import { raceInit } from '../observable/race'; -import { operate } from '../util/lift'; -import { identity } from '../util/identity'; -export function raceWith(...otherSources) { - return !otherSources.length - ? identity - : operate((source, subscriber) => { - raceInit([source, ...otherSources])(subscriber); - }); -} -//# sourceMappingURL=raceWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/raceWith.js.map b/node_modules/rxjs/dist/esm/internal/operators/raceWith.js.map deleted file mode 100644 index 96b6065..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/raceWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"raceWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/raceWith.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AA4B5C,MAAM,UAAU,QAAQ,CACtB,GAAG,YAA0C;IAE7C,OAAO,CAAC,YAAY,CAAC,MAAM;QACzB,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;YAC7B,QAAQ,CAAgB,CAAC,MAAM,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;QACjE,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/reduce.js b/node_modules/rxjs/dist/esm/internal/operators/reduce.js deleted file mode 100644 index 55be35a..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/reduce.js +++ /dev/null @@ -1,6 +0,0 @@ -import { scanInternals } from './scanInternals'; -import { operate } from '../util/lift'; -export function reduce(accumulator, seed) { - return operate(scanInternals(accumulator, seed, arguments.length >= 2, false, true)); -} -//# sourceMappingURL=reduce.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/reduce.js.map b/node_modules/rxjs/dist/esm/internal/operators/reduce.js.map deleted file mode 100644 index e9ce0ca..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/reduce.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"reduce.js","sourceRoot":"","sources":["../../../../src/internal/operators/reduce.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAwDvC,MAAM,UAAU,MAAM,CAAO,WAAuD,EAAE,IAAU;IAC9F,OAAO,OAAO,CAAC,aAAa,CAAC,WAAW,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;AACvF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/refCount.js b/node_modules/rxjs/dist/esm/internal/operators/refCount.js deleted file mode 100644 index e666637..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/refCount.js +++ /dev/null @@ -1,26 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function refCount() { - return operate((source, subscriber) => { - let connection = null; - source._refCount++; - const refCounter = createOperatorSubscriber(subscriber, undefined, undefined, undefined, () => { - if (!source || source._refCount <= 0 || 0 < --source._refCount) { - connection = null; - return; - } - const sharedConnection = source._connection; - const conn = connection; - connection = null; - if (sharedConnection && (!conn || sharedConnection === conn)) { - sharedConnection.unsubscribe(); - } - subscriber.unsubscribe(); - }); - source.subscribe(refCounter); - if (!refCounter.closed) { - connection = source.connect(); - } - }); -} -//# sourceMappingURL=refCount.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/refCount.js.map b/node_modules/rxjs/dist/esm/internal/operators/refCount.js.map deleted file mode 100644 index b2a2c03..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/refCount.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"refCount.js","sourceRoot":"","sources":["../../../../src/internal/operators/refCount.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA4DhE,MAAM,UAAU,QAAQ;IACtB,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,UAAU,GAAwB,IAAI,CAAC;QAE1C,MAAc,CAAC,SAAS,EAAE,CAAC;QAE5B,MAAM,UAAU,GAAG,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE;YAC5F,IAAI,CAAC,MAAM,IAAK,MAAc,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,EAAG,MAAc,CAAC,SAAS,EAAE;gBAChF,UAAU,GAAG,IAAI,CAAC;gBAClB,OAAO;aACR;YA2BD,MAAM,gBAAgB,GAAI,MAAc,CAAC,WAAW,CAAC;YACrD,MAAM,IAAI,GAAG,UAAU,CAAC;YACxB,UAAU,GAAG,IAAI,CAAC;YAElB,IAAI,gBAAgB,IAAI,CAAC,CAAC,IAAI,IAAI,gBAAgB,KAAK,IAAI,CAAC,EAAE;gBAC5D,gBAAgB,CAAC,WAAW,EAAE,CAAC;aAChC;YAED,UAAU,CAAC,WAAW,EAAE,CAAC;QAC3B,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAE7B,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;YACtB,UAAU,GAAI,MAAmC,CAAC,OAAO,EAAE,CAAC;SAC7D;IACH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/repeat.js b/node_modules/rxjs/dist/esm/internal/operators/repeat.js deleted file mode 100644 index c011f82..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/repeat.js +++ /dev/null @@ -1,59 +0,0 @@ -import { EMPTY } from '../observable/empty'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; -import { timer } from '../observable/timer'; -export function repeat(countOrConfig) { - let count = Infinity; - let delay; - if (countOrConfig != null) { - if (typeof countOrConfig === 'object') { - ({ count = Infinity, delay } = countOrConfig); - } - else { - count = countOrConfig; - } - } - return count <= 0 - ? () => EMPTY - : operate((source, subscriber) => { - let soFar = 0; - let sourceSub; - const resubscribe = () => { - sourceSub === null || sourceSub === void 0 ? void 0 : sourceSub.unsubscribe(); - sourceSub = null; - if (delay != null) { - const notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(soFar)); - const notifierSubscriber = createOperatorSubscriber(subscriber, () => { - notifierSubscriber.unsubscribe(); - subscribeToSource(); - }); - notifier.subscribe(notifierSubscriber); - } - else { - subscribeToSource(); - } - }; - const subscribeToSource = () => { - let syncUnsub = false; - sourceSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, () => { - if (++soFar < count) { - if (sourceSub) { - resubscribe(); - } - else { - syncUnsub = true; - } - } - else { - subscriber.complete(); - } - })); - if (syncUnsub) { - resubscribe(); - } - }; - subscribeToSource(); - }); -} -//# sourceMappingURL=repeat.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/repeat.js.map b/node_modules/rxjs/dist/esm/internal/operators/repeat.js.map deleted file mode 100644 index e87a215..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/repeat.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"repeat.js","sourceRoot":"","sources":["../../../../src/internal/operators/repeat.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AA6G5C,MAAM,UAAU,MAAM,CAAI,aAAqC;IAC7D,IAAI,KAAK,GAAG,QAAQ,CAAC;IACrB,IAAI,KAA4B,CAAC;IAEjC,IAAI,aAAa,IAAI,IAAI,EAAE;QACzB,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE;YACrC,CAAC,EAAE,KAAK,GAAG,QAAQ,EAAE,KAAK,EAAE,GAAG,aAAa,CAAC,CAAC;SAC/C;aAAM;YACL,KAAK,GAAG,aAAa,CAAC;SACvB;KACF;IAED,OAAO,KAAK,IAAI,CAAC;QACf,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK;QACb,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;YAC7B,IAAI,KAAK,GAAG,CAAC,CAAC;YACd,IAAI,SAA8B,CAAC;YAEnC,MAAM,WAAW,GAAG,GAAG,EAAE;gBACvB,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,WAAW,EAAE,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,IAAI,KAAK,IAAI,IAAI,EAAE;oBACjB,MAAM,QAAQ,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;oBACpF,MAAM,kBAAkB,GAAG,wBAAwB,CAAC,UAAU,EAAE,GAAG,EAAE;wBACnE,kBAAkB,CAAC,WAAW,EAAE,CAAC;wBACjC,iBAAiB,EAAE,CAAC;oBACtB,CAAC,CAAC,CAAC;oBACH,QAAQ,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;iBACxC;qBAAM;oBACL,iBAAiB,EAAE,CAAC;iBACrB;YACH,CAAC,CAAC;YAEF,MAAM,iBAAiB,GAAG,GAAG,EAAE;gBAC7B,IAAI,SAAS,GAAG,KAAK,CAAC;gBACtB,SAAS,GAAG,MAAM,CAAC,SAAS,CAC1B,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE;oBACnD,IAAI,EAAE,KAAK,GAAG,KAAK,EAAE;wBACnB,IAAI,SAAS,EAAE;4BACb,WAAW,EAAE,CAAC;yBACf;6BAAM;4BACL,SAAS,GAAG,IAAI,CAAC;yBAClB;qBACF;yBAAM;wBACL,UAAU,CAAC,QAAQ,EAAE,CAAC;qBACvB;gBACH,CAAC,CAAC,CACH,CAAC;gBAEF,IAAI,SAAS,EAAE;oBACb,WAAW,EAAE,CAAC;iBACf;YACH,CAAC,CAAC;YAEF,iBAAiB,EAAE,CAAC;QACtB,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/repeatWhen.js b/node_modules/rxjs/dist/esm/internal/operators/repeatWhen.js deleted file mode 100644 index 82ecdd9..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/repeatWhen.js +++ /dev/null @@ -1,46 +0,0 @@ -import { innerFrom } from '../observable/innerFrom'; -import { Subject } from '../Subject'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function repeatWhen(notifier) { - return operate((source, subscriber) => { - let innerSub; - let syncResub = false; - let completions$; - let isNotifierComplete = false; - let isMainComplete = false; - const checkComplete = () => isMainComplete && isNotifierComplete && (subscriber.complete(), true); - const getCompletionSubject = () => { - if (!completions$) { - completions$ = new Subject(); - innerFrom(notifier(completions$)).subscribe(createOperatorSubscriber(subscriber, () => { - if (innerSub) { - subscribeForRepeatWhen(); - } - else { - syncResub = true; - } - }, () => { - isNotifierComplete = true; - checkComplete(); - })); - } - return completions$; - }; - const subscribeForRepeatWhen = () => { - isMainComplete = false; - innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, () => { - isMainComplete = true; - !checkComplete() && getCompletionSubject().next(); - })); - if (syncResub) { - innerSub.unsubscribe(); - innerSub = null; - syncResub = false; - subscribeForRepeatWhen(); - } - }; - subscribeForRepeatWhen(); - }); -} -//# sourceMappingURL=repeatWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/repeatWhen.js.map b/node_modules/rxjs/dist/esm/internal/operators/repeatWhen.js.map deleted file mode 100644 index 65f5bbf..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/repeatWhen.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"repeatWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/repeatWhen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAIrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAoChE,MAAM,UAAU,UAAU,CAAI,QAAmE;IAC/F,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,QAA6B,CAAC;QAClC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,YAA2B,CAAC;QAChC,IAAI,kBAAkB,GAAG,KAAK,CAAC;QAC/B,IAAI,cAAc,GAAG,KAAK,CAAC;QAK3B,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,cAAc,IAAI,kBAAkB,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,CAAC;QAKlG,MAAM,oBAAoB,GAAG,GAAG,EAAE;YAChC,IAAI,CAAC,YAAY,EAAE;gBACjB,YAAY,GAAG,IAAI,OAAO,EAAE,CAAC;gBAI7B,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CACzC,wBAAwB,CACtB,UAAU,EACV,GAAG,EAAE;oBACH,IAAI,QAAQ,EAAE;wBACZ,sBAAsB,EAAE,CAAC;qBAC1B;yBAAM;wBAKL,SAAS,GAAG,IAAI,CAAC;qBAClB;gBACH,CAAC,EACD,GAAG,EAAE;oBACH,kBAAkB,GAAG,IAAI,CAAC;oBAC1B,aAAa,EAAE,CAAC;gBAClB,CAAC,CACF,CACF,CAAC;aACH;YACD,OAAO,YAAY,CAAC;QACtB,CAAC,CAAC;QAEF,MAAM,sBAAsB,GAAG,GAAG,EAAE;YAClC,cAAc,GAAG,KAAK,CAAC;YAEvB,QAAQ,GAAG,MAAM,CAAC,SAAS,CACzB,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE;gBACnD,cAAc,GAAG,IAAI,CAAC;gBAMtB,CAAC,aAAa,EAAE,IAAI,oBAAoB,EAAE,CAAC,IAAI,EAAE,CAAC;YACpD,CAAC,CAAC,CACH,CAAC;YAEF,IAAI,SAAS,EAAE;gBAKb,QAAQ,CAAC,WAAW,EAAE,CAAC;gBAIvB,QAAQ,GAAG,IAAI,CAAC;gBAEhB,SAAS,GAAG,KAAK,CAAC;gBAElB,sBAAsB,EAAE,CAAC;aAC1B;QACH,CAAC,CAAC;QAGF,sBAAsB,EAAE,CAAC;IAC3B,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/retry.js b/node_modules/rxjs/dist/esm/internal/operators/retry.js deleted file mode 100644 index c961747..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/retry.js +++ /dev/null @@ -1,68 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { identity } from '../util/identity'; -import { timer } from '../observable/timer'; -import { innerFrom } from '../observable/innerFrom'; -export function retry(configOrCount = Infinity) { - let config; - if (configOrCount && typeof configOrCount === 'object') { - config = configOrCount; - } - else { - config = { - count: configOrCount, - }; - } - const { count = Infinity, delay, resetOnSuccess: resetOnSuccess = false } = config; - return count <= 0 - ? identity - : operate((source, subscriber) => { - let soFar = 0; - let innerSub; - const subscribeForRetry = () => { - let syncUnsub = false; - innerSub = source.subscribe(createOperatorSubscriber(subscriber, (value) => { - if (resetOnSuccess) { - soFar = 0; - } - subscriber.next(value); - }, undefined, (err) => { - if (soFar++ < count) { - const resub = () => { - if (innerSub) { - innerSub.unsubscribe(); - innerSub = null; - subscribeForRetry(); - } - else { - syncUnsub = true; - } - }; - if (delay != null) { - const notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(err, soFar)); - const notifierSubscriber = createOperatorSubscriber(subscriber, () => { - notifierSubscriber.unsubscribe(); - resub(); - }, () => { - subscriber.complete(); - }); - notifier.subscribe(notifierSubscriber); - } - else { - resub(); - } - } - else { - subscriber.error(err); - } - })); - if (syncUnsub) { - innerSub.unsubscribe(); - innerSub = null; - subscribeForRetry(); - } - }; - subscribeForRetry(); - }); -} -//# sourceMappingURL=retry.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/retry.js.map b/node_modules/rxjs/dist/esm/internal/operators/retry.js.map deleted file mode 100644 index a38f094..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/retry.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"retry.js","sourceRoot":"","sources":["../../../../src/internal/operators/retry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA6EpD,MAAM,UAAU,KAAK,CAAI,gBAAsC,QAAQ;IACrE,IAAI,MAAmB,CAAC;IACxB,IAAI,aAAa,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE;QACtD,MAAM,GAAG,aAAa,CAAC;KACxB;SAAM;QACL,MAAM,GAAG;YACP,KAAK,EAAE,aAAuB;SAC/B,CAAC;KACH;IACD,MAAM,EAAE,KAAK,GAAG,QAAQ,EAAE,KAAK,EAAE,cAAc,EAAE,cAAc,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;IAEnF,OAAO,KAAK,IAAI,CAAC;QACf,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;YAC7B,IAAI,KAAK,GAAG,CAAC,CAAC;YACd,IAAI,QAA6B,CAAC;YAClC,MAAM,iBAAiB,GAAG,GAAG,EAAE;gBAC7B,IAAI,SAAS,GAAG,KAAK,CAAC;gBACtB,QAAQ,GAAG,MAAM,CAAC,SAAS,CACzB,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;oBAER,IAAI,cAAc,EAAE;wBAClB,KAAK,GAAG,CAAC,CAAC;qBACX;oBACD,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACzB,CAAC,EAED,SAAS,EACT,CAAC,GAAG,EAAE,EAAE;oBACN,IAAI,KAAK,EAAE,GAAG,KAAK,EAAE;wBAEnB,MAAM,KAAK,GAAG,GAAG,EAAE;4BACjB,IAAI,QAAQ,EAAE;gCACZ,QAAQ,CAAC,WAAW,EAAE,CAAC;gCACvB,QAAQ,GAAG,IAAI,CAAC;gCAChB,iBAAiB,EAAE,CAAC;6BACrB;iCAAM;gCACL,SAAS,GAAG,IAAI,CAAC;6BAClB;wBACH,CAAC,CAAC;wBAEF,IAAI,KAAK,IAAI,IAAI,EAAE;4BAIjB,MAAM,QAAQ,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;4BACzF,MAAM,kBAAkB,GAAG,wBAAwB,CACjD,UAAU,EACV,GAAG,EAAE;gCAIH,kBAAkB,CAAC,WAAW,EAAE,CAAC;gCACjC,KAAK,EAAE,CAAC;4BACV,CAAC,EACD,GAAG,EAAE;gCAGH,UAAU,CAAC,QAAQ,EAAE,CAAC;4BACxB,CAAC,CACF,CAAC;4BACF,QAAQ,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;yBACxC;6BAAM;4BAEL,KAAK,EAAE,CAAC;yBACT;qBACF;yBAAM;wBAGL,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;qBACvB;gBACH,CAAC,CACF,CACF,CAAC;gBACF,IAAI,SAAS,EAAE;oBACb,QAAQ,CAAC,WAAW,EAAE,CAAC;oBACvB,QAAQ,GAAG,IAAI,CAAC;oBAChB,iBAAiB,EAAE,CAAC;iBACrB;YACH,CAAC,CAAC;YACF,iBAAiB,EAAE,CAAC;QACtB,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/retryWhen.js b/node_modules/rxjs/dist/esm/internal/operators/retryWhen.js deleted file mode 100644 index cda09f2..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/retryWhen.js +++ /dev/null @@ -1,30 +0,0 @@ -import { innerFrom } from '../observable/innerFrom'; -import { Subject } from '../Subject'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function retryWhen(notifier) { - return operate((source, subscriber) => { - let innerSub; - let syncResub = false; - let errors$; - const subscribeForRetryWhen = () => { - innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, (err) => { - if (!errors$) { - errors$ = new Subject(); - innerFrom(notifier(errors$)).subscribe(createOperatorSubscriber(subscriber, () => innerSub ? subscribeForRetryWhen() : (syncResub = true))); - } - if (errors$) { - errors$.next(err); - } - })); - if (syncResub) { - innerSub.unsubscribe(); - innerSub = null; - syncResub = false; - subscribeForRetryWhen(); - } - }; - subscribeForRetryWhen(); - }); -} -//# sourceMappingURL=retryWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/retryWhen.js.map b/node_modules/rxjs/dist/esm/internal/operators/retryWhen.js.map deleted file mode 100644 index 5a870c0..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/retryWhen.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"retryWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/retryWhen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAIrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA2DhE,MAAM,UAAU,SAAS,CAAI,QAA2D;IACtF,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,QAA6B,CAAC;QAClC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,OAAqB,CAAC;QAE1B,MAAM,qBAAqB,GAAG,GAAG,EAAE;YACjC,QAAQ,GAAG,MAAM,CAAC,SAAS,CACzB,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,GAAG,EAAE,EAAE;gBACjE,IAAI,CAAC,OAAO,EAAE;oBACZ,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;oBACxB,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CACpC,wBAAwB,CAAC,UAAU,EAAE,GAAG,EAAE,CAMxC,QAAQ,CAAC,CAAC,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC,CACxD,CACF,CAAC;iBACH;gBACD,IAAI,OAAO,EAAE;oBAEX,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;iBACnB;YACH,CAAC,CAAC,CACH,CAAC;YAEF,IAAI,SAAS,EAAE;gBAKb,QAAQ,CAAC,WAAW,EAAE,CAAC;gBACvB,QAAQ,GAAG,IAAI,CAAC;gBAEhB,SAAS,GAAG,KAAK,CAAC;gBAElB,qBAAqB,EAAE,CAAC;aACzB;QACH,CAAC,CAAC;QAGF,qBAAqB,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/sample.js b/node_modules/rxjs/dist/esm/internal/operators/sample.js deleted file mode 100644 index 5c36c57..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/sample.js +++ /dev/null @@ -1,23 +0,0 @@ -import { innerFrom } from '../observable/innerFrom'; -import { operate } from '../util/lift'; -import { noop } from '../util/noop'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function sample(notifier) { - return operate((source, subscriber) => { - let hasValue = false; - let lastValue = null; - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - hasValue = true; - lastValue = value; - })); - innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => { - if (hasValue) { - hasValue = false; - const value = lastValue; - lastValue = null; - subscriber.next(value); - } - }, noop)); - }); -} -//# sourceMappingURL=sample.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/sample.js.map b/node_modules/rxjs/dist/esm/internal/operators/sample.js.map deleted file mode 100644 index fb0440c..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/sample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sample.js","sourceRoot":"","sources":["../../../../src/internal/operators/sample.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA0ChE,MAAM,UAAU,MAAM,CAAI,QAA8B;IACtD,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,SAAS,GAAa,IAAI,CAAC;QAC/B,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;YAC7C,QAAQ,GAAG,IAAI,CAAC;YAChB,SAAS,GAAG,KAAK,CAAC;QACpB,CAAC,CAAC,CACH,CAAC;QACF,SAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAC3B,wBAAwB,CACtB,UAAU,EACV,GAAG,EAAE;YACH,IAAI,QAAQ,EAAE;gBACZ,QAAQ,GAAG,KAAK,CAAC;gBACjB,MAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,EACD,IAAI,CACL,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/sampleTime.js b/node_modules/rxjs/dist/esm/internal/operators/sampleTime.js deleted file mode 100644 index b95210b..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/sampleTime.js +++ /dev/null @@ -1,7 +0,0 @@ -import { asyncScheduler } from '../scheduler/async'; -import { sample } from './sample'; -import { interval } from '../observable/interval'; -export function sampleTime(period, scheduler = asyncScheduler) { - return sample(interval(period, scheduler)); -} -//# sourceMappingURL=sampleTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/sampleTime.js.map b/node_modules/rxjs/dist/esm/internal/operators/sampleTime.js.map deleted file mode 100644 index 4842d3b..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/sampleTime.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sampleTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/sampleTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AA6ClD,MAAM,UAAU,UAAU,CAAI,MAAc,EAAE,YAA2B,cAAc;IACrF,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;AAC7C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/scan.js b/node_modules/rxjs/dist/esm/internal/operators/scan.js deleted file mode 100644 index b60b8e0..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/scan.js +++ /dev/null @@ -1,6 +0,0 @@ -import { operate } from '../util/lift'; -import { scanInternals } from './scanInternals'; -export function scan(accumulator, seed) { - return operate(scanInternals(accumulator, seed, arguments.length >= 2, true)); -} -//# sourceMappingURL=scan.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/scan.js.map b/node_modules/rxjs/dist/esm/internal/operators/scan.js.map deleted file mode 100644 index dd32f36..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/scan.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scan.js","sourceRoot":"","sources":["../../../../src/internal/operators/scan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAqFhD,MAAM,UAAU,IAAI,CAAU,WAA2D,EAAE,IAAQ;IAMjG,OAAO,OAAO,CAAC,aAAa,CAAC,WAAW,EAAE,IAAS,EAAE,SAAS,CAAC,MAAM,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AACrF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/scanInternals.js b/node_modules/rxjs/dist/esm/internal/operators/scanInternals.js deleted file mode 100644 index 9074cd1..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/scanInternals.js +++ /dev/null @@ -1,22 +0,0 @@ -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) { - return (source, subscriber) => { - let hasState = hasSeed; - let state = seed; - let index = 0; - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - const i = index++; - state = hasState - ? - accumulator(state, value, i) - : - ((hasState = true), value); - emitOnNext && subscriber.next(state); - }, emitBeforeComplete && - (() => { - hasState && subscriber.next(state); - subscriber.complete(); - }))); - }; -} -//# sourceMappingURL=scanInternals.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/scanInternals.js.map b/node_modules/rxjs/dist/esm/internal/operators/scanInternals.js.map deleted file mode 100644 index 5df4e95..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/scanInternals.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scanInternals.js","sourceRoot":"","sources":["../../../../src/internal/operators/scanInternals.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAWhE,MAAM,UAAU,aAAa,CAC3B,WAA2D,EAC3D,IAAO,EACP,OAAgB,EAChB,UAAmB,EACnB,kBAAqC;IAErC,OAAO,CAAC,MAAqB,EAAE,UAA2B,EAAE,EAAE;QAI5D,IAAI,QAAQ,GAAG,OAAO,CAAC;QAIvB,IAAI,KAAK,GAAQ,IAAI,CAAC;QAEtB,IAAI,KAAK,GAAG,CAAC,CAAC;QAGd,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YAER,MAAM,CAAC,GAAG,KAAK,EAAE,CAAC;YAElB,KAAK,GAAG,QAAQ;gBACd,CAAC;oBACC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;gBAC9B,CAAC;oBAGC,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;YAG/B,UAAU,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC,EAGD,kBAAkB;YAChB,CAAC,GAAG,EAAE;gBACJ,QAAQ,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACnC,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC,CAAC,CACL,CACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/sequenceEqual.js b/node_modules/rxjs/dist/esm/internal/operators/sequenceEqual.js deleted file mode 100644 index 9b9f177..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/sequenceEqual.js +++ /dev/null @@ -1,39 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; -export function sequenceEqual(compareTo, comparator = (a, b) => a === b) { - return operate((source, subscriber) => { - const aState = createState(); - const bState = createState(); - const emit = (isEqual) => { - subscriber.next(isEqual); - subscriber.complete(); - }; - const createSubscriber = (selfState, otherState) => { - const sequenceEqualSubscriber = createOperatorSubscriber(subscriber, (a) => { - const { buffer, complete } = otherState; - if (buffer.length === 0) { - complete ? emit(false) : selfState.buffer.push(a); - } - else { - !comparator(a, buffer.shift()) && emit(false); - } - }, () => { - selfState.complete = true; - const { complete, buffer } = otherState; - complete && emit(buffer.length === 0); - sequenceEqualSubscriber === null || sequenceEqualSubscriber === void 0 ? void 0 : sequenceEqualSubscriber.unsubscribe(); - }); - return sequenceEqualSubscriber; - }; - source.subscribe(createSubscriber(aState, bState)); - innerFrom(compareTo).subscribe(createSubscriber(bState, aState)); - }); -} -function createState() { - return { - buffer: [], - complete: false, - }; -} -//# sourceMappingURL=sequenceEqual.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/sequenceEqual.js.map b/node_modules/rxjs/dist/esm/internal/operators/sequenceEqual.js.map deleted file mode 100644 index 4d5f853..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/sequenceEqual.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sequenceEqual.js","sourceRoot":"","sources":["../../../../src/internal/operators/sequenceEqual.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA2DpD,MAAM,UAAU,aAAa,CAC3B,SAA6B,EAC7B,aAAsC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC;IAEvD,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QAEpC,MAAM,MAAM,GAAG,WAAW,EAAK,CAAC;QAEhC,MAAM,MAAM,GAAG,WAAW,EAAK,CAAC;QAGhC,MAAM,IAAI,GAAG,CAAC,OAAgB,EAAE,EAAE;YAChC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACzB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CAAC;QAOF,MAAM,gBAAgB,GAAG,CAAC,SAA2B,EAAE,UAA4B,EAAE,EAAE;YACrF,MAAM,uBAAuB,GAAG,wBAAwB,CACtD,UAAU,EACV,CAAC,CAAI,EAAE,EAAE;gBACP,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC;gBACxC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;oBAOvB,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;iBACnD;qBAAM;oBAIL,CAAC,UAAU,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,EAAG,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;iBAChD;YACH,CAAC,EACD,GAAG,EAAE;gBAEH,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC;gBAC1B,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC;gBAKxC,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;gBAEtC,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,WAAW,EAAE,CAAC;YACzC,CAAC,CACF,CAAC;YAEF,OAAO,uBAAuB,CAAC;QACjC,CAAC,CAAC;QAGF,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;QACnD,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;AACL,CAAC;AAgBD,SAAS,WAAW;IAClB,OAAO;QACL,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,KAAK;KAChB,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/share.js b/node_modules/rxjs/dist/esm/internal/operators/share.js deleted file mode 100644 index da77830..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/share.js +++ /dev/null @@ -1,79 +0,0 @@ -import { innerFrom } from '../observable/innerFrom'; -import { Subject } from '../Subject'; -import { SafeSubscriber } from '../Subscriber'; -import { operate } from '../util/lift'; -export function share(options = {}) { - const { connector = () => new Subject(), resetOnError = true, resetOnComplete = true, resetOnRefCountZero = true } = options; - return (wrapperSource) => { - let connection; - let resetConnection; - let subject; - let refCount = 0; - let hasCompleted = false; - let hasErrored = false; - const cancelReset = () => { - resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe(); - resetConnection = undefined; - }; - const reset = () => { - cancelReset(); - connection = subject = undefined; - hasCompleted = hasErrored = false; - }; - const resetAndUnsubscribe = () => { - const conn = connection; - reset(); - conn === null || conn === void 0 ? void 0 : conn.unsubscribe(); - }; - return operate((source, subscriber) => { - refCount++; - if (!hasErrored && !hasCompleted) { - cancelReset(); - } - const dest = (subject = subject !== null && subject !== void 0 ? subject : connector()); - subscriber.add(() => { - refCount--; - if (refCount === 0 && !hasErrored && !hasCompleted) { - resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero); - } - }); - dest.subscribe(subscriber); - if (!connection && - refCount > 0) { - connection = new SafeSubscriber({ - next: (value) => dest.next(value), - error: (err) => { - hasErrored = true; - cancelReset(); - resetConnection = handleReset(reset, resetOnError, err); - dest.error(err); - }, - complete: () => { - hasCompleted = true; - cancelReset(); - resetConnection = handleReset(reset, resetOnComplete); - dest.complete(); - }, - }); - innerFrom(source).subscribe(connection); - } - })(wrapperSource); - }; -} -function handleReset(reset, on, ...args) { - if (on === true) { - reset(); - return; - } - if (on === false) { - return; - } - const onSubscriber = new SafeSubscriber({ - next: () => { - onSubscriber.unsubscribe(); - reset(); - }, - }); - return innerFrom(on(...args)).subscribe(onSubscriber); -} -//# sourceMappingURL=share.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/share.js.map b/node_modules/rxjs/dist/esm/internal/operators/share.js.map deleted file mode 100644 index 589eff5..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/share.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"share.js","sourceRoot":"","sources":["../../../../src/internal/operators/share.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAG/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAwIvC,MAAM,UAAU,KAAK,CAAI,UAA0B,EAAE;IACnD,MAAM,EAAE,SAAS,GAAG,GAAG,EAAE,CAAC,IAAI,OAAO,EAAK,EAAE,YAAY,GAAG,IAAI,EAAE,eAAe,GAAG,IAAI,EAAE,mBAAmB,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;IAUhI,OAAO,CAAC,aAAa,EAAE,EAAE;QACvB,IAAI,UAAyC,CAAC;QAC9C,IAAI,eAAyC,CAAC;QAC9C,IAAI,OAAmC,CAAC;QACxC,IAAI,QAAQ,GAAG,CAAC,CAAC;QACjB,IAAI,YAAY,GAAG,KAAK,CAAC;QACzB,IAAI,UAAU,GAAG,KAAK,CAAC;QAEvB,MAAM,WAAW,GAAG,GAAG,EAAE;YACvB,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,WAAW,EAAE,CAAC;YAC/B,eAAe,GAAG,SAAS,CAAC;QAC9B,CAAC,CAAC;QAGF,MAAM,KAAK,GAAG,GAAG,EAAE;YACjB,WAAW,EAAE,CAAC;YACd,UAAU,GAAG,OAAO,GAAG,SAAS,CAAC;YACjC,YAAY,GAAG,UAAU,GAAG,KAAK,CAAC;QACpC,CAAC,CAAC;QACF,MAAM,mBAAmB,GAAG,GAAG,EAAE;YAG/B,MAAM,IAAI,GAAG,UAAU,CAAC;YACxB,KAAK,EAAE,CAAC;YACR,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,EAAE,CAAC;QACtB,CAAC,CAAC;QAEF,OAAO,OAAO,CAAO,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;YAC1C,QAAQ,EAAE,CAAC;YACX,IAAI,CAAC,UAAU,IAAI,CAAC,YAAY,EAAE;gBAChC,WAAW,EAAE,CAAC;aACf;YAMD,MAAM,IAAI,GAAG,CAAC,OAAO,GAAG,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,SAAS,EAAE,CAAC,CAAC;YAOhD,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE;gBAClB,QAAQ,EAAE,CAAC;gBAKX,IAAI,QAAQ,KAAK,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,YAAY,EAAE;oBAClD,eAAe,GAAG,WAAW,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,CAAC;iBACzE;YACH,CAAC,CAAC,CAAC;YAIH,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;YAE3B,IACE,CAAC,UAAU;gBAIX,QAAQ,GAAG,CAAC,EACZ;gBAMA,UAAU,GAAG,IAAI,cAAc,CAAC;oBAC9B,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;oBACjC,KAAK,EAAE,CAAC,GAAG,EAAE,EAAE;wBACb,UAAU,GAAG,IAAI,CAAC;wBAClB,WAAW,EAAE,CAAC;wBACd,eAAe,GAAG,WAAW,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,CAAC,CAAC;wBACxD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBAClB,CAAC;oBACD,QAAQ,EAAE,GAAG,EAAE;wBACb,YAAY,GAAG,IAAI,CAAC;wBACpB,WAAW,EAAE,CAAC;wBACd,eAAe,GAAG,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;wBACtD,IAAI,CAAC,QAAQ,EAAE,CAAC;oBAClB,CAAC;iBACF,CAAC,CAAC;gBACH,SAAS,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;aACzC;QACH,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAClB,KAAiB,EACjB,EAAoD,EACpD,GAAG,IAAO;IAEV,IAAI,EAAE,KAAK,IAAI,EAAE;QACf,KAAK,EAAE,CAAC;QACR,OAAO;KACR;IAED,IAAI,EAAE,KAAK,KAAK,EAAE;QAChB,OAAO;KACR;IAED,MAAM,YAAY,GAAG,IAAI,cAAc,CAAC;QACtC,IAAI,EAAE,GAAG,EAAE;YACT,YAAY,CAAC,WAAW,EAAE,CAAC;YAC3B,KAAK,EAAE,CAAC;QACV,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;AACxD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/shareReplay.js b/node_modules/rxjs/dist/esm/internal/operators/shareReplay.js deleted file mode 100644 index aaf03bd..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/shareReplay.js +++ /dev/null @@ -1,19 +0,0 @@ -import { ReplaySubject } from '../ReplaySubject'; -import { share } from './share'; -export function shareReplay(configOrBufferSize, windowTime, scheduler) { - let bufferSize; - let refCount = false; - if (configOrBufferSize && typeof configOrBufferSize === 'object') { - ({ bufferSize = Infinity, windowTime = Infinity, refCount = false, scheduler } = configOrBufferSize); - } - else { - bufferSize = (configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity); - } - return share({ - connector: () => new ReplaySubject(bufferSize, windowTime, scheduler), - resetOnError: true, - resetOnComplete: false, - resetOnRefCountZero: refCount, - }); -} -//# sourceMappingURL=shareReplay.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/shareReplay.js.map b/node_modules/rxjs/dist/esm/internal/operators/shareReplay.js.map deleted file mode 100644 index 48a09d0..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/shareReplay.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"shareReplay.js","sourceRoot":"","sources":["../../../../src/internal/operators/shareReplay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAwJhC,MAAM,UAAU,WAAW,CACzB,kBAA+C,EAC/C,UAAmB,EACnB,SAAyB;IAEzB,IAAI,UAAkB,CAAC;IACvB,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,IAAI,kBAAkB,IAAI,OAAO,kBAAkB,KAAK,QAAQ,EAAE;QAChE,CAAC,EAAE,UAAU,GAAG,QAAQ,EAAE,UAAU,GAAG,QAAQ,EAAE,QAAQ,GAAG,KAAK,EAAE,SAAS,EAAE,GAAG,kBAAkB,CAAC,CAAC;KACtG;SAAM;QACL,UAAU,GAAG,CAAC,kBAAkB,aAAlB,kBAAkB,cAAlB,kBAAkB,GAAI,QAAQ,CAAW,CAAC;KACzD;IACD,OAAO,KAAK,CAAI;QACd,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC;QACrE,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,KAAK;QACtB,mBAAmB,EAAE,QAAQ;KAC9B,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/single.js b/node_modules/rxjs/dist/esm/internal/operators/single.js deleted file mode 100644 index ccf5ac2..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/single.js +++ /dev/null @@ -1,30 +0,0 @@ -import { EmptyError } from '../util/EmptyError'; -import { SequenceError } from '../util/SequenceError'; -import { NotFoundError } from '../util/NotFoundError'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function single(predicate) { - return operate((source, subscriber) => { - let hasValue = false; - let singleValue; - let seenValue = false; - let index = 0; - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - seenValue = true; - if (!predicate || predicate(value, index++, source)) { - hasValue && subscriber.error(new SequenceError('Too many matching values')); - hasValue = true; - singleValue = value; - } - }, () => { - if (hasValue) { - subscriber.next(singleValue); - subscriber.complete(); - } - else { - subscriber.error(seenValue ? new NotFoundError('No matching values') : new EmptyError()); - } - })); - }); -} -//# sourceMappingURL=single.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/single.js.map b/node_modules/rxjs/dist/esm/internal/operators/single.js.map deleted file mode 100644 index 7d27d56..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/single.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"single.js","sourceRoot":"","sources":["../../../../src/internal/operators/single.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAqFhE,MAAM,UAAU,MAAM,CAAI,SAAuE;IAC/F,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,WAAc,CAAC;QACnB,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YACR,SAAS,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,EAAE;gBACnD,QAAQ,IAAI,UAAU,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,0BAA0B,CAAC,CAAC,CAAC;gBAC5E,QAAQ,GAAG,IAAI,CAAC;gBAChB,WAAW,GAAG,KAAK,CAAC;aACrB;QACH,CAAC,EACD,GAAG,EAAE;YACH,IAAI,QAAQ,EAAE;gBACZ,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBAC7B,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;iBAAM;gBACL,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,aAAa,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,IAAI,UAAU,EAAE,CAAC,CAAC;aAC1F;QACH,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/skip.js b/node_modules/rxjs/dist/esm/internal/operators/skip.js deleted file mode 100644 index 0b3ef26..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/skip.js +++ /dev/null @@ -1,5 +0,0 @@ -import { filter } from './filter'; -export function skip(count) { - return filter((_, index) => count <= index); -} -//# sourceMappingURL=skip.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/skip.js.map b/node_modules/rxjs/dist/esm/internal/operators/skip.js.map deleted file mode 100644 index 37a3d3b..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/skip.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"skip.js","sourceRoot":"","sources":["../../../../src/internal/operators/skip.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAmClC,MAAM,UAAU,IAAI,CAAI,KAAa;IACnC,OAAO,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC;AAC9C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/skipLast.js b/node_modules/rxjs/dist/esm/internal/operators/skipLast.js deleted file mode 100644 index 5e99e1d..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/skipLast.js +++ /dev/null @@ -1,28 +0,0 @@ -import { identity } from '../util/identity'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function skipLast(skipCount) { - return skipCount <= 0 - ? - identity - : operate((source, subscriber) => { - let ring = new Array(skipCount); - let seen = 0; - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - const valueIndex = seen++; - if (valueIndex < skipCount) { - ring[valueIndex] = value; - } - else { - const index = valueIndex % skipCount; - const oldValue = ring[index]; - ring[index] = value; - subscriber.next(oldValue); - } - })); - return () => { - ring = null; - }; - }); -} -//# sourceMappingURL=skipLast.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/skipLast.js.map b/node_modules/rxjs/dist/esm/internal/operators/skipLast.js.map deleted file mode 100644 index 9a4b519..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/skipLast.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"skipLast.js","sourceRoot":"","sources":["../../../../src/internal/operators/skipLast.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA4ChE,MAAM,UAAU,QAAQ,CAAI,SAAiB;IAC3C,OAAO,SAAS,IAAI,CAAC;QACnB,CAAC;YACC,QAAQ;QACV,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;YAI7B,IAAI,IAAI,GAAQ,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC;YAGrC,IAAI,IAAI,GAAG,CAAC,CAAC;YACb,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;gBAK7C,MAAM,UAAU,GAAG,IAAI,EAAE,CAAC;gBAC1B,IAAI,UAAU,GAAG,SAAS,EAAE;oBAI1B,IAAI,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC;iBAC1B;qBAAM;oBAIL,MAAM,KAAK,GAAG,UAAU,GAAG,SAAS,CAAC;oBAGrC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;oBAC7B,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;oBAKpB,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;iBAC3B;YACH,CAAC,CAAC,CACH,CAAC;YAEF,OAAO,GAAG,EAAE;gBAEV,IAAI,GAAG,IAAK,CAAC;YACf,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/skipUntil.js b/node_modules/rxjs/dist/esm/internal/operators/skipUntil.js deleted file mode 100644 index 9de3cf8..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/skipUntil.js +++ /dev/null @@ -1,16 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; -import { noop } from '../util/noop'; -export function skipUntil(notifier) { - return operate((source, subscriber) => { - let taking = false; - const skipSubscriber = createOperatorSubscriber(subscriber, () => { - skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe(); - taking = true; - }, noop); - innerFrom(notifier).subscribe(skipSubscriber); - source.subscribe(createOperatorSubscriber(subscriber, (value) => taking && subscriber.next(value))); - }); -} -//# sourceMappingURL=skipUntil.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/skipUntil.js.map b/node_modules/rxjs/dist/esm/internal/operators/skipUntil.js.map deleted file mode 100644 index 41f7991..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/skipUntil.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"skipUntil.js","sourceRoot":"","sources":["../../../../src/internal/operators/skipUntil.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AA+CpC,MAAM,UAAU,SAAS,CAAI,QAA8B;IACzD,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,MAAM,GAAG,KAAK,CAAC;QAEnB,MAAM,cAAc,GAAG,wBAAwB,CAC7C,UAAU,EACV,GAAG,EAAE;YACH,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,WAAW,EAAE,CAAC;YAC9B,MAAM,GAAG,IAAI,CAAC;QAChB,CAAC,EACD,IAAI,CACL,CAAC;QAEF,SAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;QAE9C,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACtG,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/skipWhile.js b/node_modules/rxjs/dist/esm/internal/operators/skipWhile.js deleted file mode 100644 index 4ce61e2..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/skipWhile.js +++ /dev/null @@ -1,10 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function skipWhile(predicate) { - return operate((source, subscriber) => { - let taking = false; - let index = 0; - source.subscribe(createOperatorSubscriber(subscriber, (value) => (taking || (taking = !predicate(value, index++))) && subscriber.next(value))); - }); -} -//# sourceMappingURL=skipWhile.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/skipWhile.js.map b/node_modules/rxjs/dist/esm/internal/operators/skipWhile.js.map deleted file mode 100644 index 09bae37..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/skipWhile.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"skipWhile.js","sourceRoot":"","sources":["../../../../src/internal/operators/skipWhile.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAiDhE,MAAM,UAAU,SAAS,CAAI,SAA+C;IAC1E,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,MAAM,GAAG,KAAK,CAAC;QACnB,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,MAAM,IAAI,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAC7H,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/startWith.js b/node_modules/rxjs/dist/esm/internal/operators/startWith.js deleted file mode 100644 index 7a3887e..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/startWith.js +++ /dev/null @@ -1,10 +0,0 @@ -import { concat } from '../observable/concat'; -import { popScheduler } from '../util/args'; -import { operate } from '../util/lift'; -export function startWith(...values) { - const scheduler = popScheduler(values); - return operate((source, subscriber) => { - (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber); - }); -} -//# sourceMappingURL=startWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/startWith.js.map b/node_modules/rxjs/dist/esm/internal/operators/startWith.js.map deleted file mode 100644 index 976a00b..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/startWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"startWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/startWith.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAuDvC,MAAM,UAAU,SAAS,CAAO,GAAG,MAAW;IAC5C,MAAM,SAAS,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IACvC,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QAIpC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACjG,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/subscribeOn.js b/node_modules/rxjs/dist/esm/internal/operators/subscribeOn.js deleted file mode 100644 index 35e23c0..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/subscribeOn.js +++ /dev/null @@ -1,7 +0,0 @@ -import { operate } from '../util/lift'; -export function subscribeOn(scheduler, delay = 0) { - return operate((source, subscriber) => { - subscriber.add(scheduler.schedule(() => source.subscribe(subscriber), delay)); - }); -} -//# sourceMappingURL=subscribeOn.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/subscribeOn.js.map b/node_modules/rxjs/dist/esm/internal/operators/subscribeOn.js.map deleted file mode 100644 index 8a70bd5..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/subscribeOn.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"subscribeOn.js","sourceRoot":"","sources":["../../../../src/internal/operators/subscribeOn.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA6DvC,MAAM,UAAU,WAAW,CAAI,SAAwB,EAAE,QAAgB,CAAC;IACxE,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IAChF,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/switchAll.js b/node_modules/rxjs/dist/esm/internal/operators/switchAll.js deleted file mode 100644 index f0db599..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/switchAll.js +++ /dev/null @@ -1,6 +0,0 @@ -import { switchMap } from './switchMap'; -import { identity } from '../util/identity'; -export function switchAll() { - return switchMap(identity); -} -//# sourceMappingURL=switchAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/switchAll.js.map b/node_modules/rxjs/dist/esm/internal/operators/switchAll.js.map deleted file mode 100644 index f4b6438..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/switchAll.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"switchAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchAll.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AA4D5C,MAAM,UAAU,SAAS;IACvB,OAAO,SAAS,CAAC,QAAQ,CAAC,CAAC;AAC7B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/switchMap.js b/node_modules/rxjs/dist/esm/internal/operators/switchMap.js deleted file mode 100644 index 10256d6..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/switchMap.js +++ /dev/null @@ -1,24 +0,0 @@ -import { innerFrom } from '../observable/innerFrom'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function switchMap(project, resultSelector) { - return operate((source, subscriber) => { - let innerSubscriber = null; - let index = 0; - let isComplete = false; - const checkComplete = () => isComplete && !innerSubscriber && subscriber.complete(); - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe(); - let innerIndex = 0; - const outerIndex = index++; - innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = createOperatorSubscriber(subscriber, (innerValue) => subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue), () => { - innerSubscriber = null; - checkComplete(); - }))); - }, () => { - isComplete = true; - checkComplete(); - })); - }); -} -//# sourceMappingURL=switchMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/switchMap.js.map b/node_modules/rxjs/dist/esm/internal/operators/switchMap.js.map deleted file mode 100644 index 11b26b6..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/switchMap.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"switchMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchMap.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAgFhE,MAAM,UAAU,SAAS,CACvB,OAAuC,EACvC,cAA6G;IAE7G,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,eAAe,GAA0C,IAAI,CAAC;QAClE,IAAI,KAAK,GAAG,CAAC,CAAC;QAEd,IAAI,UAAU,GAAG,KAAK,CAAC;QAIvB,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,UAAU,IAAI,CAAC,eAAe,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QAEpF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YAER,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,WAAW,EAAE,CAAC;YAC/B,IAAI,UAAU,GAAG,CAAC,CAAC;YACnB,MAAM,UAAU,GAAG,KAAK,EAAE,CAAC;YAE3B,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,SAAS,CAC7C,CAAC,eAAe,GAAG,wBAAwB,CACzC,UAAU,EAIV,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,EAC1H,GAAG,EAAE;gBAIH,eAAe,GAAG,IAAK,CAAC;gBACxB,aAAa,EAAE,CAAC;YAClB,CAAC,CACF,CAAC,CACH,CAAC;QACJ,CAAC,EACD,GAAG,EAAE;YACH,UAAU,GAAG,IAAI,CAAC;YAClB,aAAa,EAAE,CAAC;QAClB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/switchMapTo.js b/node_modules/rxjs/dist/esm/internal/operators/switchMapTo.js deleted file mode 100644 index 7d1cfb9..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/switchMapTo.js +++ /dev/null @@ -1,6 +0,0 @@ -import { switchMap } from './switchMap'; -import { isFunction } from '../util/isFunction'; -export function switchMapTo(innerObservable, resultSelector) { - return isFunction(resultSelector) ? switchMap(() => innerObservable, resultSelector) : switchMap(() => innerObservable); -} -//# sourceMappingURL=switchMapTo.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/switchMapTo.js.map b/node_modules/rxjs/dist/esm/internal/operators/switchMapTo.js.map deleted file mode 100644 index 3483daa..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/switchMapTo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"switchMapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchMapTo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAwDhD,MAAM,UAAU,WAAW,CACzB,eAAkB,EAClB,cAA6G;IAE7G,OAAO,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,CAAC;AAC1H,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/switchScan.js b/node_modules/rxjs/dist/esm/internal/operators/switchScan.js deleted file mode 100644 index 0013b6d..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/switchScan.js +++ /dev/null @@ -1,12 +0,0 @@ -import { switchMap } from './switchMap'; -import { operate } from '../util/lift'; -export function switchScan(accumulator, seed) { - return operate((source, subscriber) => { - let state = seed; - switchMap((value, index) => accumulator(state, value, index), (_, innerValue) => ((state = innerValue), innerValue))(source).subscribe(subscriber); - return () => { - state = null; - }; - }); -} -//# sourceMappingURL=switchScan.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/switchScan.js.map b/node_modules/rxjs/dist/esm/internal/operators/switchScan.js.map deleted file mode 100644 index bf73288..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/switchScan.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"switchScan.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchScan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAqBvC,MAAM,UAAU,UAAU,CACxB,WAAmD,EACnD,IAAO;IAEP,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QAGpC,IAAI,KAAK,GAAG,IAAI,CAAC;QAKjB,SAAS,CAGP,CAAC,KAAQ,EAAE,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAGrD,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,UAAU,CAAC,EAAE,UAAU,CAAC,CACtD,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAEhC,OAAO,GAAG,EAAE;YAEV,KAAK,GAAG,IAAK,CAAC;QAChB,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/take.js b/node_modules/rxjs/dist/esm/internal/operators/take.js deleted file mode 100644 index 6319139..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/take.js +++ /dev/null @@ -1,20 +0,0 @@ -import { EMPTY } from '../observable/empty'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function take(count) { - return count <= 0 - ? - () => EMPTY - : operate((source, subscriber) => { - let seen = 0; - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - if (++seen <= count) { - subscriber.next(value); - if (count <= seen) { - subscriber.complete(); - } - } - })); - }); -} -//# sourceMappingURL=take.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/take.js.map b/node_modules/rxjs/dist/esm/internal/operators/take.js.map deleted file mode 100644 index d3cc7ac..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/take.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"take.js","sourceRoot":"","sources":["../../../../src/internal/operators/take.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA4ChE,MAAM,UAAU,IAAI,CAAI,KAAa;IACnC,OAAO,KAAK,IAAI,CAAC;QACf,CAAC;YACC,GAAG,EAAE,CAAC,KAAK;QACb,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;YAC7B,IAAI,IAAI,GAAG,CAAC,CAAC;YACb,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;gBAI7C,IAAI,EAAE,IAAI,IAAI,KAAK,EAAE;oBACnB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAIvB,IAAI,KAAK,IAAI,IAAI,EAAE;wBACjB,UAAU,CAAC,QAAQ,EAAE,CAAC;qBACvB;iBACF;YACH,CAAC,CAAC,CACH,CAAC;QACJ,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/takeLast.js b/node_modules/rxjs/dist/esm/internal/operators/takeLast.js deleted file mode 100644 index 089d723..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/takeLast.js +++ /dev/null @@ -1,22 +0,0 @@ -import { EMPTY } from '../observable/empty'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function takeLast(count) { - return count <= 0 - ? () => EMPTY - : operate((source, subscriber) => { - let buffer = []; - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - buffer.push(value); - count < buffer.length && buffer.shift(); - }, () => { - for (const value of buffer) { - subscriber.next(value); - } - subscriber.complete(); - }, undefined, () => { - buffer = null; - })); - }); -} -//# sourceMappingURL=takeLast.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/takeLast.js.map b/node_modules/rxjs/dist/esm/internal/operators/takeLast.js.map deleted file mode 100644 index 33585c2..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/takeLast.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"takeLast.js","sourceRoot":"","sources":["../../../../src/internal/operators/takeLast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAyChE,MAAM,UAAU,QAAQ,CAAI,KAAa;IACvC,OAAO,KAAK,IAAI,CAAC;QACf,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK;QACb,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;YAK7B,IAAI,MAAM,GAAQ,EAAE,CAAC;YACrB,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;gBAER,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAGnB,KAAK,GAAG,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;YAC1C,CAAC,EACD,GAAG,EAAE;gBAGH,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;oBAC1B,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBACxB;gBACD,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC,EAED,SAAS,EACT,GAAG,EAAE;gBAEH,MAAM,GAAG,IAAK,CAAC;YACjB,CAAC,CACF,CACF,CAAC;QACJ,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/takeUntil.js b/node_modules/rxjs/dist/esm/internal/operators/takeUntil.js deleted file mode 100644 index 5913741..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/takeUntil.js +++ /dev/null @@ -1,11 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; -import { noop } from '../util/noop'; -export function takeUntil(notifier) { - return operate((source, subscriber) => { - innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => subscriber.complete(), noop)); - !subscriber.closed && source.subscribe(subscriber); - }); -} -//# sourceMappingURL=takeUntil.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/takeUntil.js.map b/node_modules/rxjs/dist/esm/internal/operators/takeUntil.js.map deleted file mode 100644 index c73560f..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/takeUntil.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"takeUntil.js","sourceRoot":"","sources":["../../../../src/internal/operators/takeUntil.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAwCpC,MAAM,UAAU,SAAS,CAAI,QAA8B;IACzD,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,SAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;QACvG,CAAC,UAAU,CAAC,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/takeWhile.js b/node_modules/rxjs/dist/esm/internal/operators/takeWhile.js deleted file mode 100644 index 1884fda..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/takeWhile.js +++ /dev/null @@ -1,13 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function takeWhile(predicate, inclusive = false) { - return operate((source, subscriber) => { - let index = 0; - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - const result = predicate(value, index++); - (result || inclusive) && subscriber.next(value); - !result && subscriber.complete(); - })); - }); -} -//# sourceMappingURL=takeWhile.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/takeWhile.js.map b/node_modules/rxjs/dist/esm/internal/operators/takeWhile.js.map deleted file mode 100644 index 7b83c9d..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/takeWhile.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"takeWhile.js","sourceRoot":"","sources":["../../../../src/internal/operators/takeWhile.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAoDhE,MAAM,UAAU,SAAS,CAAI,SAA+C,EAAE,SAAS,GAAG,KAAK;IAC7F,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;YAC7C,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;YACzC,CAAC,MAAM,IAAI,SAAS,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAChD,CAAC,MAAM,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACnC,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/tap.js b/node_modules/rxjs/dist/esm/internal/operators/tap.js deleted file mode 100644 index 96d1832..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/tap.js +++ /dev/null @@ -1,40 +0,0 @@ -import { isFunction } from '../util/isFunction'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { identity } from '../util/identity'; -export function tap(observerOrNext, error, complete) { - const tapObserver = isFunction(observerOrNext) || error || complete - ? - { next: observerOrNext, error, complete } - : observerOrNext; - return tapObserver - ? operate((source, subscriber) => { - var _a; - (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - let isUnsub = true; - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - var _a; - (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value); - subscriber.next(value); - }, () => { - var _a; - isUnsub = false; - (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - subscriber.complete(); - }, (err) => { - var _a; - isUnsub = false; - (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err); - subscriber.error(err); - }, () => { - var _a, _b; - if (isUnsub) { - (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - } - (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver); - })); - }) - : - identity; -} -//# sourceMappingURL=tap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/tap.js.map b/node_modules/rxjs/dist/esm/internal/operators/tap.js.map deleted file mode 100644 index 549b69d..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/tap.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tap.js","sourceRoot":"","sources":["../../../../src/internal/operators/tap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAkK5C,MAAM,UAAU,GAAG,CACjB,cAAsE,EACtE,KAAiC,EACjC,QAA8B;IAK9B,MAAM,WAAW,GACf,UAAU,CAAC,cAAc,CAAC,IAAI,KAAK,IAAI,QAAQ;QAC7C,CAAC;YACE,EAAE,IAAI,EAAE,cAAyE,EAAE,KAAK,EAAE,QAAQ,EAA8B;QACnI,CAAC,CAAC,cAAc,CAAC;IAErB,OAAO,WAAW;QAChB,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;;YAC7B,MAAA,WAAW,CAAC,SAAS,+CAArB,WAAW,CAAc,CAAC;YAC1B,IAAI,OAAO,GAAG,IAAI,CAAC;YACnB,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;;gBACR,MAAA,WAAW,CAAC,IAAI,+CAAhB,WAAW,EAAQ,KAAK,CAAC,CAAC;gBAC1B,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACzB,CAAC,EACD,GAAG,EAAE;;gBACH,OAAO,GAAG,KAAK,CAAC;gBAChB,MAAA,WAAW,CAAC,QAAQ,+CAApB,WAAW,CAAa,CAAC;gBACzB,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC,EACD,CAAC,GAAG,EAAE,EAAE;;gBACN,OAAO,GAAG,KAAK,CAAC;gBAChB,MAAA,WAAW,CAAC,KAAK,+CAAjB,WAAW,EAAS,GAAG,CAAC,CAAC;gBACzB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACxB,CAAC,EACD,GAAG,EAAE;;gBACH,IAAI,OAAO,EAAE;oBACX,MAAA,WAAW,CAAC,WAAW,+CAAvB,WAAW,CAAgB,CAAC;iBAC7B;gBACD,MAAA,WAAW,CAAC,QAAQ,+CAApB,WAAW,CAAa,CAAC;YAC3B,CAAC,CACF,CACF,CAAC;QACJ,CAAC,CAAC;QACJ,CAAC;YAGC,QAAQ,CAAC;AACf,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/throttle.js b/node_modules/rxjs/dist/esm/internal/operators/throttle.js deleted file mode 100644 index 704be4b..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/throttle.js +++ /dev/null @@ -1,43 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; -export function throttle(durationSelector, config) { - return operate((source, subscriber) => { - const { leading = true, trailing = false } = config !== null && config !== void 0 ? config : {}; - let hasValue = false; - let sendValue = null; - let throttled = null; - let isComplete = false; - const endThrottling = () => { - throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe(); - throttled = null; - if (trailing) { - send(); - isComplete && subscriber.complete(); - } - }; - const cleanupThrottling = () => { - throttled = null; - isComplete && subscriber.complete(); - }; - const startThrottle = (value) => (throttled = innerFrom(durationSelector(value)).subscribe(createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling))); - const send = () => { - if (hasValue) { - hasValue = false; - const value = sendValue; - sendValue = null; - subscriber.next(value); - !isComplete && startThrottle(value); - } - }; - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - hasValue = true; - sendValue = value; - !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value)); - }, () => { - isComplete = true; - !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete(); - })); - }); -} -//# sourceMappingURL=throttle.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/throttle.js.map b/node_modules/rxjs/dist/esm/internal/operators/throttle.js.map deleted file mode 100644 index e79ba8d..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/throttle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"throttle.js","sourceRoot":"","sources":["../../../../src/internal/operators/throttle.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA8EpD,MAAM,UAAU,QAAQ,CAAI,gBAAoD,EAAE,MAAuB;IACvG,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,MAAM,EAAE,OAAO,GAAG,IAAI,EAAE,QAAQ,GAAG,KAAK,EAAE,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAC;QAC1D,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,SAAS,GAAa,IAAI,CAAC;QAC/B,IAAI,SAAS,GAAwB,IAAI,CAAC;QAC1C,IAAI,UAAU,GAAG,KAAK,CAAC;QAEvB,MAAM,aAAa,GAAG,GAAG,EAAE;YACzB,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,WAAW,EAAE,CAAC;YACzB,SAAS,GAAG,IAAI,CAAC;YACjB,IAAI,QAAQ,EAAE;gBACZ,IAAI,EAAE,CAAC;gBACP,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;aACrC;QACH,CAAC,CAAC;QAEF,MAAM,iBAAiB,GAAG,GAAG,EAAE;YAC7B,SAAS,GAAG,IAAI,CAAC;YACjB,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACtC,CAAC,CAAC;QAEF,MAAM,aAAa,GAAG,CAAC,KAAQ,EAAE,EAAE,CACjC,CAAC,SAAS,GAAG,SAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,aAAa,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;QAErI,MAAM,IAAI,GAAG,GAAG,EAAE;YAChB,IAAI,QAAQ,EAAE;gBAIZ,QAAQ,GAAG,KAAK,CAAC;gBACjB,MAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBAEjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,CAAC,UAAU,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC;aACrC;QACH,CAAC,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EAMV,CAAC,KAAK,EAAE,EAAE;YACR,QAAQ,GAAG,IAAI,CAAC;YAChB,SAAS,GAAG,KAAK,CAAC;YAClB,CAAC,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;QACjF,CAAC,EACD,GAAG,EAAE;YACH,UAAU,GAAG,IAAI,CAAC;YAClB,CAAC,CAAC,QAAQ,IAAI,QAAQ,IAAI,SAAS,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACrF,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/throttleTime.js b/node_modules/rxjs/dist/esm/internal/operators/throttleTime.js deleted file mode 100644 index 4398d50..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/throttleTime.js +++ /dev/null @@ -1,8 +0,0 @@ -import { asyncScheduler } from '../scheduler/async'; -import { throttle } from './throttle'; -import { timer } from '../observable/timer'; -export function throttleTime(duration, scheduler = asyncScheduler, config) { - const duration$ = timer(duration, scheduler); - return throttle(() => duration$, config); -} -//# sourceMappingURL=throttleTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/throttleTime.js.map b/node_modules/rxjs/dist/esm/internal/operators/throttleTime.js.map deleted file mode 100644 index 67c3997..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/throttleTime.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"throttleTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/throttleTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAkB,MAAM,YAAY,CAAC;AAEtD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAmD5C,MAAM,UAAU,YAAY,CAC1B,QAAgB,EAChB,YAA2B,cAAc,EACzC,MAAuB;IAEvB,MAAM,SAAS,GAAG,KAAK,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC7C,OAAO,QAAQ,CAAC,GAAG,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AAC3C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js b/node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js deleted file mode 100644 index ca881bd..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js +++ /dev/null @@ -1,16 +0,0 @@ -import { EmptyError } from '../util/EmptyError'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function throwIfEmpty(errorFactory = defaultErrorFactory) { - return operate((source, subscriber) => { - let hasValue = false; - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - hasValue = true; - subscriber.next(value); - }, () => (hasValue ? subscriber.complete() : subscriber.error(errorFactory())))); - }); -} -function defaultErrorFactory() { - return new EmptyError(); -} -//# sourceMappingURL=throwIfEmpty.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js.map b/node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js.map deleted file mode 100644 index ba28c32..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"throwIfEmpty.js","sourceRoot":"","sources":["../../../../src/internal/operators/throwIfEmpty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAsChE,MAAM,UAAU,YAAY,CAAI,eAA0B,mBAAmB;IAC3E,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YACR,QAAQ,GAAG,IAAI,CAAC;YAChB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC,EACD,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,CAC5E,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,mBAAmB;IAC1B,OAAO,IAAI,UAAU,EAAE,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/timeInterval.js b/node_modules/rxjs/dist/esm/internal/operators/timeInterval.js deleted file mode 100644 index 3f93bf7..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/timeInterval.js +++ /dev/null @@ -1,21 +0,0 @@ -import { asyncScheduler } from '../scheduler/async'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function timeInterval(scheduler = asyncScheduler) { - return operate((source, subscriber) => { - let last = scheduler.now(); - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - const now = scheduler.now(); - const interval = now - last; - last = now; - subscriber.next(new TimeInterval(value, interval)); - })); - }); -} -export class TimeInterval { - constructor(value, interval) { - this.value = value; - this.interval = interval; - } -} -//# sourceMappingURL=timeInterval.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/timeInterval.js.map b/node_modules/rxjs/dist/esm/internal/operators/timeInterval.js.map deleted file mode 100644 index c1e0b60..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/timeInterval.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timeInterval.js","sourceRoot":"","sources":["../../../../src/internal/operators/timeInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAyChE,MAAM,UAAU,YAAY,CAAI,YAA2B,cAAc;IACvE,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,IAAI,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;QAC3B,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;YAC7C,MAAM,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;YAC5B,MAAM,QAAQ,GAAG,GAAG,GAAG,IAAI,CAAC;YAC5B,IAAI,GAAG,GAAG,CAAC;YACX,UAAU,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;QACrD,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAKD,MAAM,OAAO,YAAY;IAIvB,YAAmB,KAAQ,EAAS,QAAgB;QAAjC,UAAK,GAAL,KAAK,CAAG;QAAS,aAAQ,GAAR,QAAQ,CAAQ;IAAG,CAAC;CACzD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/timeout.js b/node_modules/rxjs/dist/esm/internal/operators/timeout.js deleted file mode 100644 index 3544461..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/timeout.js +++ /dev/null @@ -1,56 +0,0 @@ -import { asyncScheduler } from '../scheduler/async'; -import { isValidDate } from '../util/isDate'; -import { operate } from '../util/lift'; -import { innerFrom } from '../observable/innerFrom'; -import { createErrorClass } from '../util/createErrorClass'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { executeSchedule } from '../util/executeSchedule'; -export const TimeoutError = createErrorClass((_super) => function TimeoutErrorImpl(info = null) { - _super(this); - this.message = 'Timeout has occurred'; - this.name = 'TimeoutError'; - this.info = info; -}); -export function timeout(config, schedulerArg) { - const { first, each, with: _with = timeoutErrorFactory, scheduler = schedulerArg !== null && schedulerArg !== void 0 ? schedulerArg : asyncScheduler, meta = null, } = (isValidDate(config) ? { first: config } : typeof config === 'number' ? { each: config } : config); - if (first == null && each == null) { - throw new TypeError('No timeout provided.'); - } - return operate((source, subscriber) => { - let originalSourceSubscription; - let timerSubscription; - let lastValue = null; - let seen = 0; - const startTimer = (delay) => { - timerSubscription = executeSchedule(subscriber, scheduler, () => { - try { - originalSourceSubscription.unsubscribe(); - innerFrom(_with({ - meta, - lastValue, - seen, - })).subscribe(subscriber); - } - catch (err) { - subscriber.error(err); - } - }, delay); - }; - originalSourceSubscription = source.subscribe(createOperatorSubscriber(subscriber, (value) => { - timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); - seen++; - subscriber.next((lastValue = value)); - each > 0 && startTimer(each); - }, undefined, undefined, () => { - if (!(timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.closed)) { - timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); - } - lastValue = null; - })); - !seen && startTimer(first != null ? (typeof first === 'number' ? first : +first - scheduler.now()) : each); - }); -} -function timeoutErrorFactory(info) { - throw new TimeoutError(info); -} -//# sourceMappingURL=timeout.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/timeout.js.map b/node_modules/rxjs/dist/esm/internal/operators/timeout.js.map deleted file mode 100644 index c2a61b8..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/timeout.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timeout.js","sourceRoot":"","sources":["../../../../src/internal/operators/timeout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AA4E1D,MAAM,CAAC,MAAM,YAAY,GAAqB,gBAAgB,CAC5D,CAAC,MAAM,EAAE,EAAE,CACT,SAAS,gBAAgB,CAAY,OAAgC,IAAI;IACvE,MAAM,CAAC,IAAI,CAAC,CAAC;IACb,IAAI,CAAC,OAAO,GAAG,sBAAsB,CAAC;IACtC,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACnB,CAAC,CACJ,CAAC;AA6MF,MAAM,UAAU,OAAO,CACrB,MAA8C,EAC9C,YAA4B;IAS5B,MAAM,EACJ,KAAK,EACL,IAAI,EACJ,IAAI,EAAE,KAAK,GAAG,mBAAmB,EACjC,SAAS,GAAG,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,cAAc,EAC1C,IAAI,GAAG,IAAK,GACb,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,CAA2B,CAAC;IAEjI,IAAI,KAAK,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE;QAEjC,MAAM,IAAI,SAAS,CAAC,sBAAsB,CAAC,CAAC;KAC7C;IAED,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QAMpC,IAAI,0BAAwC,CAAC;QAG7C,IAAI,iBAA+B,CAAC;QAGpC,IAAI,SAAS,GAAa,IAAI,CAAC;QAG/B,IAAI,IAAI,GAAG,CAAC,CAAC;QACb,MAAM,UAAU,GAAG,CAAC,KAAa,EAAE,EAAE;YACnC,iBAAiB,GAAG,eAAe,CACjC,UAAU,EACV,SAAS,EACT,GAAG,EAAE;gBACH,IAAI;oBACF,0BAA0B,CAAC,WAAW,EAAE,CAAC;oBACzC,SAAS,CACP,KAAM,CAAC;wBACL,IAAI;wBACJ,SAAS;wBACT,IAAI;qBACL,CAAC,CACH,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;iBACzB;gBAAC,OAAO,GAAG,EAAE;oBACZ,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACvB;YACH,CAAC,EACD,KAAK,CACN,CAAC;QACJ,CAAC,CAAC;QAEF,0BAA0B,GAAG,MAAM,CAAC,SAAS,CAC3C,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAQ,EAAE,EAAE;YAEX,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,WAAW,EAAE,CAAC;YACjC,IAAI,EAAE,CAAC;YAEP,UAAU,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC;YAErC,IAAK,GAAG,CAAC,IAAI,UAAU,CAAC,IAAK,CAAC,CAAC;QACjC,CAAC,EACD,SAAS,EACT,SAAS,EACT,GAAG,EAAE;YACH,IAAI,CAAC,CAAA,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,MAAM,CAAA,EAAE;gBAC9B,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,WAAW,EAAE,CAAC;aAClC;YAGD,SAAS,GAAG,IAAI,CAAC;QACnB,CAAC,CACF,CACF,CAAC;QAQF,CAAC,IAAI,IAAI,UAAU,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,SAAU,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,IAAK,CAAC,CAAC;IAC/G,CAAC,CAAC,CAAC;AACL,CAAC;AAOD,SAAS,mBAAmB,CAAC,IAAsB;IACjD,MAAM,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/timeoutWith.js b/node_modules/rxjs/dist/esm/internal/operators/timeoutWith.js deleted file mode 100644 index 7016ce1..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/timeoutWith.js +++ /dev/null @@ -1,31 +0,0 @@ -import { async } from '../scheduler/async'; -import { isValidDate } from '../util/isDate'; -import { timeout } from './timeout'; -export function timeoutWith(due, withObservable, scheduler) { - let first; - let each; - let _with; - scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : async; - if (isValidDate(due)) { - first = due; - } - else if (typeof due === 'number') { - each = due; - } - if (withObservable) { - _with = () => withObservable; - } - else { - throw new TypeError('No observable provided to switch to'); - } - if (first == null && each == null) { - throw new TypeError('No timeout provided.'); - } - return timeout({ - first, - each, - scheduler, - with: _with, - }); -} -//# sourceMappingURL=timeoutWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/timeoutWith.js.map b/node_modules/rxjs/dist/esm/internal/operators/timeoutWith.js.map deleted file mode 100644 index 76cfe45..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/timeoutWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timeoutWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/timeoutWith.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+EpC,MAAM,UAAU,WAAW,CACzB,GAAkB,EAClB,cAAkC,EAClC,SAAyB;IAEzB,IAAI,KAAgC,CAAC;IACrC,IAAI,IAAwB,CAAC;IAC7B,IAAI,KAA+B,CAAC;IACpC,SAAS,GAAG,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,KAAK,CAAC;IAE/B,IAAI,WAAW,CAAC,GAAG,CAAC,EAAE;QACpB,KAAK,GAAG,GAAG,CAAC;KACb;SAAM,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QAClC,IAAI,GAAG,GAAG,CAAC;KACZ;IAED,IAAI,cAAc,EAAE;QAClB,KAAK,GAAG,GAAG,EAAE,CAAC,cAAc,CAAC;KAC9B;SAAM;QACL,MAAM,IAAI,SAAS,CAAC,qCAAqC,CAAC,CAAC;KAC5D;IAED,IAAI,KAAK,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE;QAEjC,MAAM,IAAI,SAAS,CAAC,sBAAsB,CAAC,CAAC;KAC7C;IAED,OAAO,OAAO,CAAwB;QACpC,KAAK;QACL,IAAI;QACJ,SAAS;QACT,IAAI,EAAE,KAAK;KACZ,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/timestamp.js b/node_modules/rxjs/dist/esm/internal/operators/timestamp.js deleted file mode 100644 index b96206e..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/timestamp.js +++ /dev/null @@ -1,6 +0,0 @@ -import { dateTimestampProvider } from '../scheduler/dateTimestampProvider'; -import { map } from './map'; -export function timestamp(timestampProvider = dateTimestampProvider) { - return map((value) => ({ value, timestamp: timestampProvider.now() })); -} -//# sourceMappingURL=timestamp.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/timestamp.js.map b/node_modules/rxjs/dist/esm/internal/operators/timestamp.js.map deleted file mode 100644 index 1b623c9..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/timestamp.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timestamp.js","sourceRoot":"","sources":["../../../../src/internal/operators/timestamp.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAkC5B,MAAM,UAAU,SAAS,CAAI,oBAAuC,qBAAqB;IACvF,OAAO,GAAG,CAAC,CAAC,KAAQ,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,iBAAiB,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC;AAC5E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/toArray.js b/node_modules/rxjs/dist/esm/internal/operators/toArray.js deleted file mode 100644 index 01b9a1f..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/toArray.js +++ /dev/null @@ -1,9 +0,0 @@ -import { reduce } from './reduce'; -import { operate } from '../util/lift'; -const arrReducer = (arr, value) => (arr.push(value), arr); -export function toArray() { - return operate((source, subscriber) => { - reduce(arrReducer, [])(source).subscribe(subscriber); - }); -} -//# sourceMappingURL=toArray.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/toArray.js.map b/node_modules/rxjs/dist/esm/internal/operators/toArray.js.map deleted file mode 100644 index 745c865..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/toArray.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"toArray.js","sourceRoot":"","sources":["../../../../src/internal/operators/toArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,UAAU,GAAG,CAAC,GAAU,EAAE,KAAU,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC;AAgCtE,MAAM,UAAU,OAAO;IAIrB,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,MAAM,CAAC,UAAU,EAAE,EAAS,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/window.js b/node_modules/rxjs/dist/esm/internal/operators/window.js deleted file mode 100644 index 0cd28da..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/window.js +++ /dev/null @@ -1,28 +0,0 @@ -import { Subject } from '../Subject'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { noop } from '../util/noop'; -import { innerFrom } from '../observable/innerFrom'; -export function window(windowBoundaries) { - return operate((source, subscriber) => { - let windowSubject = new Subject(); - subscriber.next(windowSubject.asObservable()); - const errorHandler = (err) => { - windowSubject.error(err); - subscriber.error(err); - }; - source.subscribe(createOperatorSubscriber(subscriber, (value) => windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.next(value), () => { - windowSubject.complete(); - subscriber.complete(); - }, errorHandler)); - innerFrom(windowBoundaries).subscribe(createOperatorSubscriber(subscriber, () => { - windowSubject.complete(); - subscriber.next((windowSubject = new Subject())); - }, noop, errorHandler)); - return () => { - windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.unsubscribe(); - windowSubject = null; - }; - }); -} -//# sourceMappingURL=window.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/window.js.map b/node_modules/rxjs/dist/esm/internal/operators/window.js.map deleted file mode 100644 index 0f7885c..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/window.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"window.js","sourceRoot":"","sources":["../../../../src/internal/operators/window.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA8CpD,MAAM,UAAU,MAAM,CAAI,gBAAsC;IAC9D,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,aAAa,GAAe,IAAI,OAAO,EAAK,CAAC;QAEjD,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC,CAAC;QAE9C,MAAM,YAAY,GAAG,CAAC,GAAQ,EAAE,EAAE;YAChC,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACzB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,CAAC;QAGF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,IAAI,CAAC,KAAK,CAAC,EACrC,GAAG,EAAE;YACH,aAAa,CAAC,QAAQ,EAAE,CAAC;YACzB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,YAAY,CACb,CACF,CAAC;QAGF,SAAS,CAAC,gBAAgB,CAAC,CAAC,SAAS,CACnC,wBAAwB,CACtB,UAAU,EACV,GAAG,EAAE;YACH,aAAa,CAAC,QAAQ,EAAE,CAAC;YACzB,UAAU,CAAC,IAAI,CAAC,CAAC,aAAa,GAAG,IAAI,OAAO,EAAE,CAAC,CAAC,CAAC;QACnD,CAAC,EACD,IAAI,EACJ,YAAY,CACb,CACF,CAAC;QAEF,OAAO,GAAG,EAAE;YAIV,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,WAAW,EAAE,CAAC;YAC7B,aAAa,GAAG,IAAK,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/windowCount.js b/node_modules/rxjs/dist/esm/internal/operators/windowCount.js deleted file mode 100644 index 6597452..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/windowCount.js +++ /dev/null @@ -1,40 +0,0 @@ -import { Subject } from '../Subject'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function windowCount(windowSize, startWindowEvery = 0) { - const startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize; - return operate((source, subscriber) => { - let windows = [new Subject()]; - let starts = []; - let count = 0; - subscriber.next(windows[0].asObservable()); - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - for (const window of windows) { - window.next(value); - } - const c = count - windowSize + 1; - if (c >= 0 && c % startEvery === 0) { - windows.shift().complete(); - } - if (++count % startEvery === 0) { - const window = new Subject(); - windows.push(window); - subscriber.next(window.asObservable()); - } - }, () => { - while (windows.length > 0) { - windows.shift().complete(); - } - subscriber.complete(); - }, (err) => { - while (windows.length > 0) { - windows.shift().error(err); - } - subscriber.error(err); - }, () => { - starts = null; - windows = null; - })); - }); -} -//# sourceMappingURL=windowCount.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/windowCount.js.map b/node_modules/rxjs/dist/esm/internal/operators/windowCount.js.map deleted file mode 100644 index dd2e41c..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/windowCount.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"windowCount.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowCount.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA+DhE,MAAM,UAAU,WAAW,CAAI,UAAkB,EAAE,mBAA2B,CAAC;IAC7E,MAAM,UAAU,GAAG,gBAAgB,GAAG,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,UAAU,CAAC;IAExE,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,OAAO,GAAG,CAAC,IAAI,OAAO,EAAK,CAAC,CAAC;QACjC,IAAI,MAAM,GAAa,EAAE,CAAC;QAC1B,IAAI,KAAK,GAAG,CAAC,CAAC;QAGd,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC;QAE3C,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAQ,EAAE,EAAE;YAIX,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;gBAC5B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACpB;YAMD,MAAM,CAAC,GAAG,KAAK,GAAG,UAAU,GAAG,CAAC,CAAC;YACjC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,UAAU,KAAK,CAAC,EAAE;gBAClC,OAAO,CAAC,KAAK,EAAG,CAAC,QAAQ,EAAE,CAAC;aAC7B;YAOD,IAAI,EAAE,KAAK,GAAG,UAAU,KAAK,CAAC,EAAE;gBAC9B,MAAM,MAAM,GAAG,IAAI,OAAO,EAAK,CAAC;gBAChC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBACrB,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;aACxC;QACH,CAAC,EACD,GAAG,EAAE;YACH,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,QAAQ,EAAE,CAAC;aAC7B;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,CAAC,GAAG,EAAE,EAAE;YACN,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aAC7B;YACD,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,EACD,GAAG,EAAE;YACH,MAAM,GAAG,IAAK,CAAC;YACf,OAAO,GAAG,IAAK,CAAC;QAClB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/windowTime.js b/node_modules/rxjs/dist/esm/internal/operators/windowTime.js deleted file mode 100644 index eb37ebb..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/windowTime.js +++ /dev/null @@ -1,63 +0,0 @@ -import { Subject } from '../Subject'; -import { asyncScheduler } from '../scheduler/async'; -import { Subscription } from '../Subscription'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { arrRemove } from '../util/arrRemove'; -import { popScheduler } from '../util/args'; -import { executeSchedule } from '../util/executeSchedule'; -export function windowTime(windowTimeSpan, ...otherArgs) { - var _a, _b; - const scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler; - const windowCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; - const maxWindowSize = otherArgs[1] || Infinity; - return operate((source, subscriber) => { - let windowRecords = []; - let restartOnClose = false; - const closeWindow = (record) => { - const { window, subs } = record; - window.complete(); - subs.unsubscribe(); - arrRemove(windowRecords, record); - restartOnClose && startWindow(); - }; - const startWindow = () => { - if (windowRecords) { - const subs = new Subscription(); - subscriber.add(subs); - const window = new Subject(); - const record = { - window, - subs, - seen: 0, - }; - windowRecords.push(record); - subscriber.next(window.asObservable()); - executeSchedule(subs, scheduler, () => closeWindow(record), windowTimeSpan); - } - }; - if (windowCreationInterval !== null && windowCreationInterval >= 0) { - executeSchedule(subscriber, scheduler, startWindow, windowCreationInterval, true); - } - else { - restartOnClose = true; - } - startWindow(); - const loop = (cb) => windowRecords.slice().forEach(cb); - const terminate = (cb) => { - loop(({ window }) => cb(window)); - cb(subscriber); - subscriber.unsubscribe(); - }; - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - loop((record) => { - record.window.next(value); - maxWindowSize <= ++record.seen && closeWindow(record); - }); - }, () => terminate((consumer) => consumer.complete()), (err) => terminate((consumer) => consumer.error(err)))); - return () => { - windowRecords = null; - }; - }); -} -//# sourceMappingURL=windowTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/windowTime.js.map b/node_modules/rxjs/dist/esm/internal/operators/windowTime.js.map deleted file mode 100644 index f2ef41e..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/windowTime.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"windowTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAgG1D,MAAM,UAAU,UAAU,CAAI,cAAsB,EAAE,GAAG,SAAgB;;IACvE,MAAM,SAAS,GAAG,MAAA,YAAY,CAAC,SAAS,CAAC,mCAAI,cAAc,CAAC;IAC5D,MAAM,sBAAsB,GAAG,MAAC,SAAS,CAAC,CAAC,CAAY,mCAAI,IAAI,CAAC;IAChE,MAAM,aAAa,GAAI,SAAS,CAAC,CAAC,CAAY,IAAI,QAAQ,CAAC;IAE3D,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QAEpC,IAAI,aAAa,GAA6B,EAAE,CAAC;QAGjD,IAAI,cAAc,GAAG,KAAK,CAAC;QAE3B,MAAM,WAAW,GAAG,CAAC,MAAkD,EAAE,EAAE;YACzE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;YAChC,MAAM,CAAC,QAAQ,EAAE,CAAC;YAClB,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;YACjC,cAAc,IAAI,WAAW,EAAE,CAAC;QAClC,CAAC,CAAC;QAMF,MAAM,WAAW,GAAG,GAAG,EAAE;YACvB,IAAI,aAAa,EAAE;gBACjB,MAAM,IAAI,GAAG,IAAI,YAAY,EAAE,CAAC;gBAChC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBACrB,MAAM,MAAM,GAAG,IAAI,OAAO,EAAK,CAAC;gBAChC,MAAM,MAAM,GAAG;oBACb,MAAM;oBACN,IAAI;oBACJ,IAAI,EAAE,CAAC;iBACR,CAAC;gBACF,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAC3B,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;gBACvC,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC,CAAC;aAC7E;QACH,CAAC,CAAC;QAEF,IAAI,sBAAsB,KAAK,IAAI,IAAI,sBAAsB,IAAI,CAAC,EAAE;YAIlE,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,sBAAsB,EAAE,IAAI,CAAC,CAAC;SACnF;aAAM;YACL,cAAc,GAAG,IAAI,CAAC;SACvB;QAED,WAAW,EAAE,CAAC;QAQd,MAAM,IAAI,GAAG,CAAC,EAAqC,EAAE,EAAE,CAAC,aAAc,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAM3F,MAAM,SAAS,GAAG,CAAC,EAAqC,EAAE,EAAE;YAC1D,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;YACjC,EAAE,CAAC,UAAU,CAAC,CAAC;YACf,UAAU,CAAC,WAAW,EAAE,CAAC;QAC3B,CAAC,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAQ,EAAE,EAAE;YAEX,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;gBACd,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAE1B,aAAa,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;YACxD,CAAC,CAAC,CAAC;QACL,CAAC,EAED,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,EAElD,CAAC,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CACtD,CACF,CAAC;QAKF,OAAO,GAAG,EAAE;YAEV,aAAa,GAAG,IAAK,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/windowToggle.js b/node_modules/rxjs/dist/esm/internal/operators/windowToggle.js deleted file mode 100644 index d7c27fb..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/windowToggle.js +++ /dev/null @@ -1,54 +0,0 @@ -import { Subject } from '../Subject'; -import { Subscription } from '../Subscription'; -import { operate } from '../util/lift'; -import { innerFrom } from '../observable/innerFrom'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { noop } from '../util/noop'; -import { arrRemove } from '../util/arrRemove'; -export function windowToggle(openings, closingSelector) { - return operate((source, subscriber) => { - const windows = []; - const handleError = (err) => { - while (0 < windows.length) { - windows.shift().error(err); - } - subscriber.error(err); - }; - innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, (openValue) => { - const window = new Subject(); - windows.push(window); - const closingSubscription = new Subscription(); - const closeWindow = () => { - arrRemove(windows, window); - window.complete(); - closingSubscription.unsubscribe(); - }; - let closingNotifier; - try { - closingNotifier = innerFrom(closingSelector(openValue)); - } - catch (err) { - handleError(err); - return; - } - subscriber.next(window.asObservable()); - closingSubscription.add(closingNotifier.subscribe(createOperatorSubscriber(subscriber, closeWindow, noop, handleError))); - }, noop)); - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - const windowsCopy = windows.slice(); - for (const window of windowsCopy) { - window.next(value); - } - }, () => { - while (0 < windows.length) { - windows.shift().complete(); - } - subscriber.complete(); - }, handleError, () => { - while (0 < windows.length) { - windows.shift().unsubscribe(); - } - })); - }); -} -//# sourceMappingURL=windowToggle.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/windowToggle.js.map b/node_modules/rxjs/dist/esm/internal/operators/windowToggle.js.map deleted file mode 100644 index be87c96..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/windowToggle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"windowToggle.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowToggle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AA+C9C,MAAM,UAAU,YAAY,CAC1B,QAA4B,EAC5B,eAAuD;IAEvD,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,MAAM,OAAO,GAAiB,EAAE,CAAC;QAEjC,MAAM,WAAW,GAAG,CAAC,GAAQ,EAAE,EAAE;YAC/B,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aAC7B;YACD,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,CAAC;QAEF,SAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAC3B,wBAAwB,CACtB,UAAU,EACV,CAAC,SAAS,EAAE,EAAE;YACZ,MAAM,MAAM,GAAG,IAAI,OAAO,EAAK,CAAC;YAChC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACrB,MAAM,mBAAmB,GAAG,IAAI,YAAY,EAAE,CAAC;YAC/C,MAAM,WAAW,GAAG,GAAG,EAAE;gBACvB,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;gBAC3B,MAAM,CAAC,QAAQ,EAAE,CAAC;gBAClB,mBAAmB,CAAC,WAAW,EAAE,CAAC;YACpC,CAAC,CAAC;YAEF,IAAI,eAAgC,CAAC;YACrC,IAAI;gBACF,eAAe,GAAG,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC;aACzD;YAAC,OAAO,GAAG,EAAE;gBACZ,WAAW,CAAC,GAAG,CAAC,CAAC;gBACjB,OAAO;aACR;YAED,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;YAEvC,mBAAmB,CAAC,GAAG,CAAC,eAAe,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;QAC3H,CAAC,EACD,IAAI,CACL,CACF,CAAC;QAGF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAQ,EAAE,EAAE;YAGX,MAAM,WAAW,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;YACpC,KAAK,MAAM,MAAM,IAAI,WAAW,EAAE;gBAChC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACpB;QACH,CAAC,EACD,GAAG,EAAE;YAEH,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,QAAQ,EAAE,CAAC;aAC7B;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,WAAW,EACX,GAAG,EAAE;YAMH,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,WAAW,EAAE,CAAC;aAChC;QACH,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/windowWhen.js b/node_modules/rxjs/dist/esm/internal/operators/windowWhen.js deleted file mode 100644 index 10e4972..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/windowWhen.js +++ /dev/null @@ -1,38 +0,0 @@ -import { Subject } from '../Subject'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; -export function windowWhen(closingSelector) { - return operate((source, subscriber) => { - let window; - let closingSubscriber; - const handleError = (err) => { - window.error(err); - subscriber.error(err); - }; - const openWindow = () => { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); - window === null || window === void 0 ? void 0 : window.complete(); - window = new Subject(); - subscriber.next(window.asObservable()); - let closingNotifier; - try { - closingNotifier = innerFrom(closingSelector()); - } - catch (err) { - handleError(err); - return; - } - closingNotifier.subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openWindow, openWindow, handleError))); - }; - openWindow(); - source.subscribe(createOperatorSubscriber(subscriber, (value) => window.next(value), () => { - window.complete(); - subscriber.complete(); - }, handleError, () => { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); - window = null; - })); - }); -} -//# sourceMappingURL=windowWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/windowWhen.js.map b/node_modules/rxjs/dist/esm/internal/operators/windowWhen.js.map deleted file mode 100644 index d4769c0..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/windowWhen.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"windowWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowWhen.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA+CpD,MAAM,UAAU,UAAU,CAAI,eAA2C;IACvE,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,MAAyB,CAAC;QAC9B,IAAI,iBAA8C,CAAC;QAMnD,MAAM,WAAW,GAAG,CAAC,GAAQ,EAAE,EAAE;YAC/B,MAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACnB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,CAAC;QAQF,MAAM,UAAU,GAAG,GAAG,EAAE;YAGtB,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,WAAW,EAAE,CAAC;YAGjC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,EAAE,CAAC;YAGnB,MAAM,GAAG,IAAI,OAAO,EAAK,CAAC;YAC1B,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;YAGvC,IAAI,eAAgC,CAAC;YACrC,IAAI;gBACF,eAAe,GAAG,SAAS,CAAC,eAAe,EAAE,CAAC,CAAC;aAChD;YAAC,OAAO,GAAG,EAAE;gBACZ,WAAW,CAAC,GAAG,CAAC,CAAC;gBACjB,OAAO;aACR;YAMD,eAAe,CAAC,SAAS,CAAC,CAAC,iBAAiB,GAAG,wBAAwB,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;QAC7H,CAAC,CAAC;QAGF,UAAU,EAAE,CAAC;QAGb,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE,CAAC,MAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAC9B,GAAG,EAAE;YAEH,MAAO,CAAC,QAAQ,EAAE,CAAC;YACnB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,WAAW,EACX,GAAG,EAAE;YAGH,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,WAAW,EAAE,CAAC;YACjC,MAAM,GAAG,IAAK,CAAC;QACjB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/withLatestFrom.js b/node_modules/rxjs/dist/esm/internal/operators/withLatestFrom.js deleted file mode 100644 index 94a4811..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/withLatestFrom.js +++ /dev/null @@ -1,31 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; -import { identity } from '../util/identity'; -import { noop } from '../util/noop'; -import { popResultSelector } from '../util/args'; -export function withLatestFrom(...inputs) { - const project = popResultSelector(inputs); - return operate((source, subscriber) => { - const len = inputs.length; - const otherValues = new Array(len); - let hasValue = inputs.map(() => false); - let ready = false; - for (let i = 0; i < len; i++) { - innerFrom(inputs[i]).subscribe(createOperatorSubscriber(subscriber, (value) => { - otherValues[i] = value; - if (!ready && !hasValue[i]) { - hasValue[i] = true; - (ready = hasValue.every(identity)) && (hasValue = null); - } - }, noop)); - } - source.subscribe(createOperatorSubscriber(subscriber, (value) => { - if (ready) { - const values = [value, ...otherValues]; - subscriber.next(project ? project(...values) : values); - } - })); - }); -} -//# sourceMappingURL=withLatestFrom.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/withLatestFrom.js.map b/node_modules/rxjs/dist/esm/internal/operators/withLatestFrom.js.map deleted file mode 100644 index e92a0ea..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/withLatestFrom.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"withLatestFrom.js","sourceRoot":"","sources":["../../../../src/internal/operators/withLatestFrom.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAoDjD,MAAM,UAAU,cAAc,CAAO,GAAG,MAAa;IACnD,MAAM,OAAO,GAAG,iBAAiB,CAAC,MAAM,CAAwC,CAAC;IAEjF,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;QAC1B,MAAM,WAAW,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;QAInC,IAAI,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;QAGvC,IAAI,KAAK,GAAG,KAAK,CAAC;QAMlB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;YAC5B,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAC5B,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;gBACR,WAAW,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;gBACvB,IAAI,CAAC,KAAK,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;oBAE1B,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;oBAKnB,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAK,CAAC,CAAC;iBAC1D;YACH,CAAC,EAGD,IAAI,CACL,CACF,CAAC;SACH;QAGD,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;YAC7C,IAAI,KAAK,EAAE;gBAET,MAAM,MAAM,GAAG,CAAC,KAAK,EAAE,GAAG,WAAW,CAAC,CAAC;gBACvC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;aACxD;QACH,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/zip.js b/node_modules/rxjs/dist/esm/internal/operators/zip.js deleted file mode 100644 index 39709ed..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/zip.js +++ /dev/null @@ -1,8 +0,0 @@ -import { zip as zipStatic } from '../observable/zip'; -import { operate } from '../util/lift'; -export function zip(...sources) { - return operate((source, subscriber) => { - zipStatic(source, ...sources).subscribe(subscriber); - }); -} -//# sourceMappingURL=zip.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/zip.js.map b/node_modules/rxjs/dist/esm/internal/operators/zip.js.map deleted file mode 100644 index 59aadb9..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/zip.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"zip.js","sourceRoot":"","sources":["../../../../src/internal/operators/zip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,IAAI,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAmBvC,MAAM,UAAU,GAAG,CAAO,GAAG,OAAqE;IAChG,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,SAAS,CAAC,MAA8B,EAAE,GAAI,OAAuC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC/G,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/zipAll.js b/node_modules/rxjs/dist/esm/internal/operators/zipAll.js deleted file mode 100644 index c3faf7e..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/zipAll.js +++ /dev/null @@ -1,6 +0,0 @@ -import { zip } from '../observable/zip'; -import { joinAllInternals } from './joinAllInternals'; -export function zipAll(project) { - return joinAllInternals(zip, project); -} -//# sourceMappingURL=zipAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/zipAll.js.map b/node_modules/rxjs/dist/esm/internal/operators/zipAll.js.map deleted file mode 100644 index 92c858e..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/zipAll.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"zipAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/zipAll.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAetD,MAAM,UAAU,MAAM,CAAO,OAA+B;IAC1D,OAAO,gBAAgB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/zipWith.js b/node_modules/rxjs/dist/esm/internal/operators/zipWith.js deleted file mode 100644 index 102d362..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/zipWith.js +++ /dev/null @@ -1,5 +0,0 @@ -import { zip } from './zip'; -export function zipWith(...otherInputs) { - return zip(...otherInputs); -} -//# sourceMappingURL=zipWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/operators/zipWith.js.map b/node_modules/rxjs/dist/esm/internal/operators/zipWith.js.map deleted file mode 100644 index 2949854..0000000 --- a/node_modules/rxjs/dist/esm/internal/operators/zipWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"zipWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/zipWith.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAyB5B,MAAM,UAAU,OAAO,CAAkC,GAAG,WAAyC;IACnG,OAAO,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC;AAC7B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleArray.js b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleArray.js deleted file mode 100644 index ea7b5cb..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleArray.js +++ /dev/null @@ -1,18 +0,0 @@ -import { Observable } from '../Observable'; -export function scheduleArray(input, scheduler) { - return new Observable((subscriber) => { - let i = 0; - return scheduler.schedule(function () { - if (i === input.length) { - subscriber.complete(); - } - else { - subscriber.next(input[i++]); - if (!subscriber.closed) { - this.schedule(); - } - } - }); - }); -} -//# sourceMappingURL=scheduleArray.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleArray.js.map b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleArray.js.map deleted file mode 100644 index b14139b..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleArray.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scheduleArray.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,MAAM,UAAU,aAAa,CAAI,KAAmB,EAAE,SAAwB;IAC5E,OAAO,IAAI,UAAU,CAAI,CAAC,UAAU,EAAE,EAAE;QAEtC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEV,OAAO,SAAS,CAAC,QAAQ,CAAC;YACxB,IAAI,CAAC,KAAK,KAAK,CAAC,MAAM,EAAE;gBAGtB,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;iBAAM;gBAGL,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBAI5B,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;oBACtB,IAAI,CAAC,QAAQ,EAAE,CAAC;iBACjB;aACF;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleAsyncIterable.js b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleAsyncIterable.js deleted file mode 100644 index 2ab8199..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleAsyncIterable.js +++ /dev/null @@ -1,23 +0,0 @@ -import { Observable } from '../Observable'; -import { executeSchedule } from '../util/executeSchedule'; -export function scheduleAsyncIterable(input, scheduler) { - if (!input) { - throw new Error('Iterable cannot be null'); - } - return new Observable((subscriber) => { - executeSchedule(subscriber, scheduler, () => { - const iterator = input[Symbol.asyncIterator](); - executeSchedule(subscriber, scheduler, () => { - iterator.next().then((result) => { - if (result.done) { - subscriber.complete(); - } - else { - subscriber.next(result.value); - } - }); - }, 0, true); - }); - }); -} -//# sourceMappingURL=scheduleAsyncIterable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleAsyncIterable.js.map b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleAsyncIterable.js.map deleted file mode 100644 index 80005cd..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleAsyncIterable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scheduleAsyncIterable.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleAsyncIterable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,UAAU,qBAAqB,CAAI,KAAuB,EAAE,SAAwB;IACxF,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;KAC5C;IACD,OAAO,IAAI,UAAU,CAAI,CAAC,UAAU,EAAE,EAAE;QACtC,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE;YAC1C,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;YAC/C,eAAe,CACb,UAAU,EACV,SAAS,EACT,GAAG,EAAE;gBACH,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;oBAC9B,IAAI,MAAM,CAAC,IAAI,EAAE;wBAGf,UAAU,CAAC,QAAQ,EAAE,CAAC;qBACvB;yBAAM;wBACL,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;qBAC/B;gBACH,CAAC,CAAC,CAAC;YACL,CAAC,EACD,CAAC,EACD,IAAI,CACL,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleIterable.js b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleIterable.js deleted file mode 100644 index c4f6236..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleIterable.js +++ /dev/null @@ -1,31 +0,0 @@ -import { Observable } from '../Observable'; -import { iterator as Symbol_iterator } from '../symbol/iterator'; -import { isFunction } from '../util/isFunction'; -import { executeSchedule } from '../util/executeSchedule'; -export function scheduleIterable(input, scheduler) { - return new Observable((subscriber) => { - let iterator; - executeSchedule(subscriber, scheduler, () => { - iterator = input[Symbol_iterator](); - executeSchedule(subscriber, scheduler, () => { - let value; - let done; - try { - ({ value, done } = iterator.next()); - } - catch (err) { - subscriber.error(err); - return; - } - if (done) { - subscriber.complete(); - } - else { - subscriber.next(value); - } - }, 0, true); - }); - return () => isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return(); - }); -} -//# sourceMappingURL=scheduleIterable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleIterable.js.map b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleIterable.js.map deleted file mode 100644 index 16ebd84..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleIterable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scheduleIterable.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleIterable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,QAAQ,IAAI,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAO1D,MAAM,UAAU,gBAAgB,CAAI,KAAkB,EAAE,SAAwB;IAC9E,OAAO,IAAI,UAAU,CAAI,CAAC,UAAU,EAAE,EAAE;QACtC,IAAI,QAAwB,CAAC;QAK7B,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE;YAE1C,QAAQ,GAAI,KAAa,CAAC,eAAe,CAAC,EAAE,CAAC;YAE7C,eAAe,CACb,UAAU,EACV,SAAS,EACT,GAAG,EAAE;gBACH,IAAI,KAAQ,CAAC;gBACb,IAAI,IAAyB,CAAC;gBAC9B,IAAI;oBAEF,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;iBACrC;gBAAC,OAAO,GAAG,EAAE;oBAEZ,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBACtB,OAAO;iBACR;gBAED,IAAI,IAAI,EAAE;oBAKR,UAAU,CAAC,QAAQ,EAAE,CAAC;iBACvB;qBAAM;oBAEL,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBACxB;YACH,CAAC,EACD,CAAC,EACD,IAAI,CACL,CAAC;QACJ,CAAC,CAAC,CAAC;QAMH,OAAO,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAC,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;IACjE,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleObservable.js b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleObservable.js deleted file mode 100644 index 979b009..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleObservable.js +++ /dev/null @@ -1,7 +0,0 @@ -import { innerFrom } from '../observable/innerFrom'; -import { observeOn } from '../operators/observeOn'; -import { subscribeOn } from '../operators/subscribeOn'; -export function scheduleObservable(input, scheduler) { - return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); -} -//# sourceMappingURL=scheduleObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleObservable.js.map b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleObservable.js.map deleted file mode 100644 index 2010050..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleObservable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scheduleObservable.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleObservable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,MAAM,UAAU,kBAAkB,CAAI,KAA2B,EAAE,SAAwB;IACzF,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;AAC7E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/schedulePromise.js b/node_modules/rxjs/dist/esm/internal/scheduled/schedulePromise.js deleted file mode 100644 index 287c986..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduled/schedulePromise.js +++ /dev/null @@ -1,7 +0,0 @@ -import { innerFrom } from '../observable/innerFrom'; -import { observeOn } from '../operators/observeOn'; -import { subscribeOn } from '../operators/subscribeOn'; -export function schedulePromise(input, scheduler) { - return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); -} -//# sourceMappingURL=schedulePromise.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/schedulePromise.js.map b/node_modules/rxjs/dist/esm/internal/scheduled/schedulePromise.js.map deleted file mode 100644 index 8da74ad..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduled/schedulePromise.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"schedulePromise.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/schedulePromise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,MAAM,UAAU,eAAe,CAAI,KAAqB,EAAE,SAAwB;IAChF,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;AAC7E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleReadableStreamLike.js b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleReadableStreamLike.js deleted file mode 100644 index 4bfbfc2..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleReadableStreamLike.js +++ /dev/null @@ -1,6 +0,0 @@ -import { scheduleAsyncIterable } from './scheduleAsyncIterable'; -import { readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike'; -export function scheduleReadableStreamLike(input, scheduler) { - return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler); -} -//# sourceMappingURL=scheduleReadableStreamLike.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleReadableStreamLike.js.map b/node_modules/rxjs/dist/esm/internal/scheduled/scheduleReadableStreamLike.js.map deleted file mode 100644 index 6026c90..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduled/scheduleReadableStreamLike.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scheduleReadableStreamLike.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleReadableStreamLike.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,kCAAkC,EAAE,MAAM,8BAA8B,CAAC;AAElF,MAAM,UAAU,0BAA0B,CAAI,KAA4B,EAAE,SAAwB;IAClG,OAAO,qBAAqB,CAAC,kCAAkC,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,CAAC;AACrF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/scheduled.js b/node_modules/rxjs/dist/esm/internal/scheduled/scheduled.js deleted file mode 100644 index 3ed1085..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduled/scheduled.js +++ /dev/null @@ -1,37 +0,0 @@ -import { scheduleObservable } from './scheduleObservable'; -import { schedulePromise } from './schedulePromise'; -import { scheduleArray } from './scheduleArray'; -import { scheduleIterable } from './scheduleIterable'; -import { scheduleAsyncIterable } from './scheduleAsyncIterable'; -import { isInteropObservable } from '../util/isInteropObservable'; -import { isPromise } from '../util/isPromise'; -import { isArrayLike } from '../util/isArrayLike'; -import { isIterable } from '../util/isIterable'; -import { isAsyncIterable } from '../util/isAsyncIterable'; -import { createInvalidObservableTypeError } from '../util/throwUnobservableError'; -import { isReadableStreamLike } from '../util/isReadableStreamLike'; -import { scheduleReadableStreamLike } from './scheduleReadableStreamLike'; -export function scheduled(input, scheduler) { - if (input != null) { - if (isInteropObservable(input)) { - return scheduleObservable(input, scheduler); - } - if (isArrayLike(input)) { - return scheduleArray(input, scheduler); - } - if (isPromise(input)) { - return schedulePromise(input, scheduler); - } - if (isAsyncIterable(input)) { - return scheduleAsyncIterable(input, scheduler); - } - if (isIterable(input)) { - return scheduleIterable(input, scheduler); - } - if (isReadableStreamLike(input)) { - return scheduleReadableStreamLike(input, scheduler); - } - } - throw createInvalidObservableTypeError(input); -} -//# sourceMappingURL=scheduled.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduled/scheduled.js.map b/node_modules/rxjs/dist/esm/internal/scheduled/scheduled.js.map deleted file mode 100644 index 6355931..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduled/scheduled.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scheduled.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAa1E,MAAM,UAAU,SAAS,CAAI,KAAyB,EAAE,SAAwB;IAC9E,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE;YAC9B,OAAO,kBAAkB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SAC7C;QACD,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE;YACtB,OAAO,aAAa,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SACxC;QACD,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;YACpB,OAAO,eAAe,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SAC1C;QACD,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE;YAC1B,OAAO,qBAAqB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SAChD;QACD,IAAI,UAAU,CAAC,KAAK,CAAC,EAAE;YACrB,OAAO,gBAAgB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SAC3C;QACD,IAAI,oBAAoB,CAAC,KAAK,CAAC,EAAE;YAC/B,OAAO,0BAA0B,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SACrD;KACF;IACD,MAAM,gCAAgC,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/Action.js b/node_modules/rxjs/dist/esm/internal/scheduler/Action.js deleted file mode 100644 index 4ded474..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/Action.js +++ /dev/null @@ -1,10 +0,0 @@ -import { Subscription } from '../Subscription'; -export class Action extends Subscription { - constructor(scheduler, work) { - super(); - } - schedule(state, delay = 0) { - return this; - } -} -//# sourceMappingURL=Action.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/Action.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/Action.js.map deleted file mode 100644 index 2dc6420..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/Action.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Action.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/Action.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAe/C,MAAM,OAAO,MAAU,SAAQ,YAAY;IACzC,YAAY,SAAoB,EAAE,IAAmD;QACnF,KAAK,EAAE,CAAC;IACV,CAAC;IAWM,QAAQ,CAAC,KAAS,EAAE,QAAgB,CAAC;QAC1C,OAAO,IAAI,CAAC;IACd,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameAction.js b/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameAction.js deleted file mode 100644 index f896a06..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameAction.js +++ /dev/null @@ -1,29 +0,0 @@ -import { AsyncAction } from './AsyncAction'; -import { animationFrameProvider } from './animationFrameProvider'; -export class AnimationFrameAction extends AsyncAction { - constructor(scheduler, work) { - super(scheduler, work); - this.scheduler = scheduler; - this.work = work; - } - requestAsyncId(scheduler, id, delay = 0) { - if (delay !== null && delay > 0) { - return super.requestAsyncId(scheduler, id, delay); - } - scheduler.actions.push(this); - return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(() => scheduler.flush(undefined))); - } - recycleAsyncId(scheduler, id, delay = 0) { - var _a; - if (delay != null ? delay > 0 : this.delay > 0) { - return super.recycleAsyncId(scheduler, id, delay); - } - const { actions } = scheduler; - if (id != null && id === scheduler._scheduled && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { - animationFrameProvider.cancelAnimationFrame(id); - scheduler._scheduled = undefined; - } - return undefined; - } -} -//# sourceMappingURL=AnimationFrameAction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameAction.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameAction.js.map deleted file mode 100644 index ccff6e6..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameAction.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AnimationFrameAction.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AnimationFrameAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAGlE,MAAM,OAAO,oBAAwB,SAAQ,WAAc;IACzD,YAAsB,SAAkC,EAAY,IAAmD;QACrH,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QADH,cAAS,GAAT,SAAS,CAAyB;QAAY,SAAI,GAAJ,IAAI,CAA+C;IAEvH,CAAC;IAES,cAAc,CAAC,SAAkC,EAAE,EAAgB,EAAE,QAAgB,CAAC;QAE9F,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,GAAG,CAAC,EAAE;YAC/B,OAAO,KAAK,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAED,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAI7B,OAAO,SAAS,CAAC,UAAU,IAAI,CAAC,SAAS,CAAC,UAAU,GAAG,sBAAsB,CAAC,qBAAqB,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACzI,CAAC;IAES,cAAc,CAAC,SAAkC,EAAE,EAAgB,EAAE,QAAgB,CAAC;;QAI9F,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE;YAC9C,OAAO,KAAK,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAID,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,CAAC;QAC9B,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,KAAK,SAAS,CAAC,UAAU,IAAI,CAAA,MAAA,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,0CAAE,EAAE,MAAK,EAAE,EAAE;YACvF,sBAAsB,CAAC,oBAAoB,CAAC,EAAY,CAAC,CAAC;YAC1D,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC;SAClC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameScheduler.js b/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameScheduler.js deleted file mode 100644 index 6807452..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameScheduler.js +++ /dev/null @@ -1,30 +0,0 @@ -import { AsyncScheduler } from './AsyncScheduler'; -export class AnimationFrameScheduler extends AsyncScheduler { - flush(action) { - this._active = true; - let flushId; - if (action) { - flushId = action.id; - } - else { - flushId = this._scheduled; - this._scheduled = undefined; - } - const { actions } = this; - let error; - action = action || actions.shift(); - do { - if ((error = action.execute(action.state, action.delay))) { - break; - } - } while ((action = actions[0]) && action.id === flushId && actions.shift()); - this._active = false; - if (error) { - while ((action = actions[0]) && action.id === flushId && actions.shift()) { - action.unsubscribe(); - } - throw error; - } - } -} -//# sourceMappingURL=AnimationFrameScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameScheduler.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameScheduler.js.map deleted file mode 100644 index 24228c7..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/AnimationFrameScheduler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AnimationFrameScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AnimationFrameScheduler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,OAAO,uBAAwB,SAAQ,cAAc;IAClD,KAAK,CAAC,MAAyB;QACpC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAUpB,IAAI,OAAO,CAAC;QACZ,IAAI,MAAM,EAAE;YACV,OAAO,GAAG,MAAM,CAAC,EAAE,CAAC;SACrB;aAAM;YACL,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC;YAC1B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;SAC7B;QAED,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;QACzB,IAAI,KAAU,CAAC;QACf,MAAM,GAAG,MAAM,IAAI,OAAO,CAAC,KAAK,EAAG,CAAC;QAEpC,GAAG;YACD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;gBACxD,MAAM;aACP;SACF,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;QAE5E,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QAErB,IAAI,KAAK,EAAE;YACT,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;gBACxE,MAAM,CAAC,WAAW,EAAE,CAAC;aACtB;YACD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/AsapAction.js b/node_modules/rxjs/dist/esm/internal/scheduler/AsapAction.js deleted file mode 100644 index 8a2ba77..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/AsapAction.js +++ /dev/null @@ -1,31 +0,0 @@ -import { AsyncAction } from './AsyncAction'; -import { immediateProvider } from './immediateProvider'; -export class AsapAction extends AsyncAction { - constructor(scheduler, work) { - super(scheduler, work); - this.scheduler = scheduler; - this.work = work; - } - requestAsyncId(scheduler, id, delay = 0) { - if (delay !== null && delay > 0) { - return super.requestAsyncId(scheduler, id, delay); - } - scheduler.actions.push(this); - return scheduler._scheduled || (scheduler._scheduled = immediateProvider.setImmediate(scheduler.flush.bind(scheduler, undefined))); - } - recycleAsyncId(scheduler, id, delay = 0) { - var _a; - if (delay != null ? delay > 0 : this.delay > 0) { - return super.recycleAsyncId(scheduler, id, delay); - } - const { actions } = scheduler; - if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { - immediateProvider.clearImmediate(id); - if (scheduler._scheduled === id) { - scheduler._scheduled = undefined; - } - } - return undefined; - } -} -//# sourceMappingURL=AsapAction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/AsapAction.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/AsapAction.js.map deleted file mode 100644 index 9491c08..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/AsapAction.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AsapAction.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsapAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,MAAM,OAAO,UAAc,SAAQ,WAAc;IAC/C,YAAsB,SAAwB,EAAY,IAAmD;QAC3G,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QADH,cAAS,GAAT,SAAS,CAAe;QAAY,SAAI,GAAJ,IAAI,CAA+C;IAE7G,CAAC;IAES,cAAc,CAAC,SAAwB,EAAE,EAAgB,EAAE,QAAgB,CAAC;QAEpF,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,GAAG,CAAC,EAAE;YAC/B,OAAO,KAAK,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAED,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAI7B,OAAO,SAAS,CAAC,UAAU,IAAI,CAAC,SAAS,CAAC,UAAU,GAAG,iBAAiB,CAAC,YAAY,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IACrI,CAAC;IAES,cAAc,CAAC,SAAwB,EAAE,EAAgB,EAAE,QAAgB,CAAC;;QAIpF,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE;YAC9C,OAAO,KAAK,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAID,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,CAAC;QAC9B,IAAI,EAAE,IAAI,IAAI,IAAI,CAAA,MAAA,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,0CAAE,EAAE,MAAK,EAAE,EAAE;YACxD,iBAAiB,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;YACrC,IAAI,SAAS,CAAC,UAAU,KAAK,EAAE,EAAE;gBAC/B,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC;aAClC;SACF;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/AsapScheduler.js b/node_modules/rxjs/dist/esm/internal/scheduler/AsapScheduler.js deleted file mode 100644 index 2aa86c9..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/AsapScheduler.js +++ /dev/null @@ -1,24 +0,0 @@ -import { AsyncScheduler } from './AsyncScheduler'; -export class AsapScheduler extends AsyncScheduler { - flush(action) { - this._active = true; - const flushId = this._scheduled; - this._scheduled = undefined; - const { actions } = this; - let error; - action = action || actions.shift(); - do { - if ((error = action.execute(action.state, action.delay))) { - break; - } - } while ((action = actions[0]) && action.id === flushId && actions.shift()); - this._active = false; - if (error) { - while ((action = actions[0]) && action.id === flushId && actions.shift()) { - action.unsubscribe(); - } - throw error; - } - } -} -//# sourceMappingURL=AsapScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/AsapScheduler.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/AsapScheduler.js.map deleted file mode 100644 index 4d4d92c..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/AsapScheduler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AsapScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsapScheduler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,OAAO,aAAc,SAAQ,cAAc;IACxC,KAAK,CAAC,MAAyB;QACpC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAUpB,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC;QAChC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAE5B,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;QACzB,IAAI,KAAU,CAAC;QACf,MAAM,GAAG,MAAM,IAAI,OAAO,CAAC,KAAK,EAAG,CAAC;QAEpC,GAAG;YACD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;gBACxD,MAAM;aACP;SACF,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;QAE5E,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QAErB,IAAI,KAAK,EAAE;YACT,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;gBACxE,MAAM,CAAC,WAAW,EAAE,CAAC;aACtB;YACD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js b/node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js deleted file mode 100644 index e0774f3..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js +++ /dev/null @@ -1,82 +0,0 @@ -import { Action } from './Action'; -import { intervalProvider } from './intervalProvider'; -import { arrRemove } from '../util/arrRemove'; -export class AsyncAction extends Action { - constructor(scheduler, work) { - super(scheduler, work); - this.scheduler = scheduler; - this.work = work; - this.pending = false; - } - schedule(state, delay = 0) { - var _a; - if (this.closed) { - return this; - } - this.state = state; - const id = this.id; - const scheduler = this.scheduler; - if (id != null) { - this.id = this.recycleAsyncId(scheduler, id, delay); - } - this.pending = true; - this.delay = delay; - this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay); - return this; - } - requestAsyncId(scheduler, _id, delay = 0) { - return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay); - } - recycleAsyncId(_scheduler, id, delay = 0) { - if (delay != null && this.delay === delay && this.pending === false) { - return id; - } - if (id != null) { - intervalProvider.clearInterval(id); - } - return undefined; - } - execute(state, delay) { - if (this.closed) { - return new Error('executing a cancelled action'); - } - this.pending = false; - const error = this._execute(state, delay); - if (error) { - return error; - } - else if (this.pending === false && this.id != null) { - this.id = this.recycleAsyncId(this.scheduler, this.id, null); - } - } - _execute(state, _delay) { - let errored = false; - let errorValue; - try { - this.work(state); - } - catch (e) { - errored = true; - errorValue = e ? e : new Error('Scheduled action threw falsy error'); - } - if (errored) { - this.unsubscribe(); - return errorValue; - } - } - unsubscribe() { - if (!this.closed) { - const { id, scheduler } = this; - const { actions } = scheduler; - this.work = this.state = this.scheduler = null; - this.pending = false; - arrRemove(actions, this); - if (id != null) { - this.id = this.recycleAsyncId(scheduler, id, null); - } - this.delay = null; - super.unsubscribe(); - } - } -} -//# sourceMappingURL=AsyncAction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js.map deleted file mode 100644 index 6b3c9ad..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AsyncAction.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsyncAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,MAAM,OAAO,WAAe,SAAQ,MAAS;IAO3C,YAAsB,SAAyB,EAAY,IAAmD;QAC5G,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QADH,cAAS,GAAT,SAAS,CAAgB;QAAY,SAAI,GAAJ,IAAI,CAA+C;QAFpG,YAAO,GAAY,KAAK,CAAC;IAInC,CAAC;IAEM,QAAQ,CAAC,KAAS,EAAE,QAAgB,CAAC;;QAC1C,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,OAAO,IAAI,CAAC;SACb;QAGD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QACnB,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAuBjC,IAAI,EAAE,IAAI,IAAI,EAAE;YACd,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACrD;QAID,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAEpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,IAAI,CAAC,EAAE,GAAG,MAAA,IAAI,CAAC,EAAE,mCAAI,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QAEpE,OAAO,IAAI,CAAC;IACd,CAAC;IAES,cAAc,CAAC,SAAyB,EAAE,GAAiB,EAAE,QAAgB,CAAC;QACtF,OAAO,gBAAgB,CAAC,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;IACpF,CAAC;IAES,cAAc,CAAC,UAA0B,EAAE,EAAgB,EAAE,QAAuB,CAAC;QAE7F,IAAI,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK,EAAE;YACnE,OAAO,EAAE,CAAC;SACX;QAGD,IAAI,EAAE,IAAI,IAAI,EAAE;YACd,gBAAgB,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;SACpC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAKM,OAAO,CAAC,KAAQ,EAAE,KAAa;QACpC,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,OAAO,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;SAClD;QAED,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAC1C,IAAI,KAAK,EAAE;YACT,OAAO,KAAK,CAAC;SACd;aAAM,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK,IAAI,IAAI,CAAC,EAAE,IAAI,IAAI,EAAE;YAcpD,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;SAC9D;IACH,CAAC;IAES,QAAQ,CAAC,KAAQ,EAAE,MAAc;QACzC,IAAI,OAAO,GAAY,KAAK,CAAC;QAC7B,IAAI,UAAe,CAAC;QACpB,IAAI;YACF,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAClB;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,GAAG,IAAI,CAAC;YAIf,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;SACtE;QACD,IAAI,OAAO,EAAE;YACX,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,OAAO,UAAU,CAAC;SACnB;IACH,CAAC;IAED,WAAW;QACT,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;YAC/B,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,CAAC;YAE9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,GAAG,IAAK,CAAC;YAChD,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;YAErB,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YACzB,IAAI,EAAE,IAAI,IAAI,EAAE;gBACd,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;aACpD;YAED,IAAI,CAAC,KAAK,GAAG,IAAK,CAAC;YACnB,KAAK,CAAC,WAAW,EAAE,CAAC;SACrB;IACH,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js b/node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js deleted file mode 100644 index c57668c..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js +++ /dev/null @@ -1,30 +0,0 @@ -import { Scheduler } from '../Scheduler'; -export class AsyncScheduler extends Scheduler { - constructor(SchedulerAction, now = Scheduler.now) { - super(SchedulerAction, now); - this.actions = []; - this._active = false; - } - flush(action) { - const { actions } = this; - if (this._active) { - actions.push(action); - return; - } - let error; - this._active = true; - do { - if ((error = action.execute(action.state, action.delay))) { - break; - } - } while ((action = actions.shift())); - this._active = false; - if (error) { - while ((action = actions.shift())) { - action.unsubscribe(); - } - throw error; - } - } -} -//# sourceMappingURL=AsyncScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js.map deleted file mode 100644 index a0d0194..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AsyncScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsyncScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAKzC,MAAM,OAAO,cAAe,SAAQ,SAAS;IAgB3C,YAAY,eAA8B,EAAE,MAAoB,SAAS,CAAC,GAAG;QAC3E,KAAK,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC;QAhBvB,YAAO,GAA4B,EAAE,CAAC;QAMtC,YAAO,GAAY,KAAK,CAAC;IAWhC,CAAC;IAEM,KAAK,CAAC,MAAwB;QACnC,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;QAEzB,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACrB,OAAO;SACR;QAED,IAAI,KAAU,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAEpB,GAAG;YACD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;gBACxD,MAAM;aACP;SACF,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,EAAG,CAAC,EAAE;QAEtC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QAErB,IAAI,KAAK,EAAE;YACT,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,EAAG,CAAC,EAAE;gBAClC,MAAM,CAAC,WAAW,EAAE,CAAC;aACtB;YACD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/QueueAction.js b/node_modules/rxjs/dist/esm/internal/scheduler/QueueAction.js deleted file mode 100644 index 002b94a..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/QueueAction.js +++ /dev/null @@ -1,28 +0,0 @@ -import { AsyncAction } from './AsyncAction'; -export class QueueAction extends AsyncAction { - constructor(scheduler, work) { - super(scheduler, work); - this.scheduler = scheduler; - this.work = work; - } - schedule(state, delay = 0) { - if (delay > 0) { - return super.schedule(state, delay); - } - this.delay = delay; - this.state = state; - this.scheduler.flush(this); - return this; - } - execute(state, delay) { - return delay > 0 || this.closed ? super.execute(state, delay) : this._execute(state, delay); - } - requestAsyncId(scheduler, id, delay = 0) { - if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) { - return super.requestAsyncId(scheduler, id, delay); - } - scheduler.flush(this); - return 0; - } -} -//# sourceMappingURL=QueueAction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/QueueAction.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/QueueAction.js.map deleted file mode 100644 index 91db28e..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/QueueAction.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"QueueAction.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/QueueAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAM5C,MAAM,OAAO,WAAe,SAAQ,WAAc;IAChD,YAAsB,SAAyB,EAAY,IAAmD;QAC5G,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QADH,cAAS,GAAT,SAAS,CAAgB;QAAY,SAAI,GAAJ,IAAI,CAA+C;IAE9G,CAAC;IAEM,QAAQ,CAAC,KAAS,EAAE,QAAgB,CAAC;QAC1C,IAAI,KAAK,GAAG,CAAC,EAAE;YACb,OAAO,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SACrC;QACD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,OAAO,CAAC,KAAQ,EAAE,KAAa;QACpC,OAAO,KAAK,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC9F,CAAC;IAES,cAAc,CAAC,SAAyB,EAAE,EAAgB,EAAE,QAAgB,CAAC;QAKrF,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE;YACrE,OAAO,KAAK,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAGD,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAMtB,OAAO,CAAC,CAAC;IACX,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/QueueScheduler.js b/node_modules/rxjs/dist/esm/internal/scheduler/QueueScheduler.js deleted file mode 100644 index cc1fb4d..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/QueueScheduler.js +++ /dev/null @@ -1,4 +0,0 @@ -import { AsyncScheduler } from './AsyncScheduler'; -export class QueueScheduler extends AsyncScheduler { -} -//# sourceMappingURL=QueueScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/QueueScheduler.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/QueueScheduler.js.map deleted file mode 100644 index 3cad8d8..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/QueueScheduler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"QueueScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/QueueScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,OAAO,cAAe,SAAQ,cAAc;CACjD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/VirtualTimeScheduler.js b/node_modules/rxjs/dist/esm/internal/scheduler/VirtualTimeScheduler.js deleted file mode 100644 index 607ced6..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/VirtualTimeScheduler.js +++ /dev/null @@ -1,89 +0,0 @@ -import { AsyncAction } from './AsyncAction'; -import { Subscription } from '../Subscription'; -import { AsyncScheduler } from './AsyncScheduler'; -export class VirtualTimeScheduler extends AsyncScheduler { - constructor(schedulerActionCtor = VirtualAction, maxFrames = Infinity) { - super(schedulerActionCtor, () => this.frame); - this.maxFrames = maxFrames; - this.frame = 0; - this.index = -1; - } - flush() { - const { actions, maxFrames } = this; - let error; - let action; - while ((action = actions[0]) && action.delay <= maxFrames) { - actions.shift(); - this.frame = action.delay; - if ((error = action.execute(action.state, action.delay))) { - break; - } - } - if (error) { - while ((action = actions.shift())) { - action.unsubscribe(); - } - throw error; - } - } -} -VirtualTimeScheduler.frameTimeFactor = 10; -export class VirtualAction extends AsyncAction { - constructor(scheduler, work, index = (scheduler.index += 1)) { - super(scheduler, work); - this.scheduler = scheduler; - this.work = work; - this.index = index; - this.active = true; - this.index = scheduler.index = index; - } - schedule(state, delay = 0) { - if (Number.isFinite(delay)) { - if (!this.id) { - return super.schedule(state, delay); - } - this.active = false; - const action = new VirtualAction(this.scheduler, this.work); - this.add(action); - return action.schedule(state, delay); - } - else { - return Subscription.EMPTY; - } - } - requestAsyncId(scheduler, id, delay = 0) { - this.delay = scheduler.frame + delay; - const { actions } = scheduler; - actions.push(this); - actions.sort(VirtualAction.sortActions); - return 1; - } - recycleAsyncId(scheduler, id, delay = 0) { - return undefined; - } - _execute(state, delay) { - if (this.active === true) { - return super._execute(state, delay); - } - } - static sortActions(a, b) { - if (a.delay === b.delay) { - if (a.index === b.index) { - return 0; - } - else if (a.index > b.index) { - return 1; - } - else { - return -1; - } - } - else if (a.delay > b.delay) { - return 1; - } - else { - return -1; - } - } -} -//# sourceMappingURL=VirtualTimeScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/VirtualTimeScheduler.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/VirtualTimeScheduler.js.map deleted file mode 100644 index 343ca85..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/VirtualTimeScheduler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"VirtualTimeScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/VirtualTimeScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlD,MAAM,OAAO,oBAAqB,SAAQ,cAAc;IAyBtD,YAAY,sBAA0C,aAAoB,EAAS,YAAoB,QAAQ;QAC7G,KAAK,CAAC,mBAAmB,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QADoC,cAAS,GAAT,SAAS,CAAmB;QAfxG,UAAK,GAAW,CAAC,CAAC;QAMlB,UAAK,GAAW,CAAC,CAAC,CAAC;IAW1B,CAAC;IAMM,KAAK;QACV,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;QACpC,IAAI,KAAU,CAAC;QACf,IAAI,MAAoC,CAAC;QAEzC,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,KAAK,IAAI,SAAS,EAAE;YACzD,OAAO,CAAC,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;YAE1B,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;gBACxD,MAAM;aACP;SACF;QAED,IAAI,KAAK,EAAE;YACT,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,EAAE;gBACjC,MAAM,CAAC,WAAW,EAAE,CAAC;aACtB;YACD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;;AAnDM,oCAAe,GAAG,EAAE,CAAC;AAsD9B,MAAM,OAAO,aAAiB,SAAQ,WAAc;IAGlD,YACY,SAA+B,EAC/B,IAAmD,EACnD,QAAgB,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC,CAAC;QAEhD,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QAJb,cAAS,GAAT,SAAS,CAAsB;QAC/B,SAAI,GAAJ,IAAI,CAA+C;QACnD,UAAK,GAAL,KAAK,CAAiC;QALxC,WAAM,GAAY,IAAI,CAAC;QAQ/B,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC;IACvC,CAAC;IAEM,QAAQ,CAAC,KAAS,EAAE,QAAgB,CAAC;QAC1C,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;YAC1B,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;gBACZ,OAAO,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;aACrC;YACD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YAKpB,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YAC5D,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACjB,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SACtC;aAAM;YAGL,OAAO,YAAY,CAAC,KAAK,CAAC;SAC3B;IACH,CAAC;IAES,cAAc,CAAC,SAA+B,EAAE,EAAQ,EAAE,QAAgB,CAAC;QACnF,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC;QACrC,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,CAAC;QAC9B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClB,OAAmC,CAAC,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;QACrE,OAAO,CAAC,CAAC;IACX,CAAC;IAES,cAAc,CAAC,SAA+B,EAAE,EAAQ,EAAE,QAAgB,CAAC;QACnF,OAAO,SAAS,CAAC;IACnB,CAAC;IAES,QAAQ,CAAC,KAAQ,EAAE,KAAa;QACxC,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,EAAE;YACxB,OAAO,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SACrC;IACH,CAAC;IAEO,MAAM,CAAC,WAAW,CAAI,CAAmB,EAAE,CAAmB;QACpE,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,EAAE;YACvB,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,EAAE;gBACvB,OAAO,CAAC,CAAC;aACV;iBAAM,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,EAAE;gBAC5B,OAAO,CAAC,CAAC;aACV;iBAAM;gBACL,OAAO,CAAC,CAAC,CAAC;aACX;SACF;aAAM,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,EAAE;YAC5B,OAAO,CAAC,CAAC;SACV;aAAM;YACL,OAAO,CAAC,CAAC,CAAC;SACX;IACH,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/animationFrame.js b/node_modules/rxjs/dist/esm/internal/scheduler/animationFrame.js deleted file mode 100644 index 6575d95..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/animationFrame.js +++ /dev/null @@ -1,5 +0,0 @@ -import { AnimationFrameAction } from './AnimationFrameAction'; -import { AnimationFrameScheduler } from './AnimationFrameScheduler'; -export const animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction); -export const animationFrame = animationFrameScheduler; -//# sourceMappingURL=animationFrame.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/animationFrame.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/animationFrame.js.map deleted file mode 100644 index 0105171..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/animationFrame.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"animationFrame.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/animationFrame.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAkCpE,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,uBAAuB,CAAC,oBAAoB,CAAC,CAAC;AAKzF,MAAM,CAAC,MAAM,cAAc,GAAG,uBAAuB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/animationFrameProvider.js b/node_modules/rxjs/dist/esm/internal/scheduler/animationFrameProvider.js deleted file mode 100644 index 6bf861b..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/animationFrameProvider.js +++ /dev/null @@ -1,27 +0,0 @@ -import { Subscription } from '../Subscription'; -export const animationFrameProvider = { - schedule(callback) { - let request = requestAnimationFrame; - let cancel = cancelAnimationFrame; - const { delegate } = animationFrameProvider; - if (delegate) { - request = delegate.requestAnimationFrame; - cancel = delegate.cancelAnimationFrame; - } - const handle = request((timestamp) => { - cancel = undefined; - callback(timestamp); - }); - return new Subscription(() => cancel === null || cancel === void 0 ? void 0 : cancel(handle)); - }, - requestAnimationFrame(...args) { - const { delegate } = animationFrameProvider; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame)(...args); - }, - cancelAnimationFrame(...args) { - const { delegate } = animationFrameProvider; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame)(...args); - }, - delegate: undefined, -}; -//# sourceMappingURL=animationFrameProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/animationFrameProvider.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/animationFrameProvider.js.map deleted file mode 100644 index 635cc93..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/animationFrameProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"animationFrameProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/animationFrameProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAc/C,MAAM,CAAC,MAAM,sBAAsB,GAA2B;IAG5D,QAAQ,CAAC,QAAQ;QACf,IAAI,OAAO,GAAG,qBAAqB,CAAC;QACpC,IAAI,MAAM,GAA4C,oBAAoB,CAAC;QAC3E,MAAM,EAAE,QAAQ,EAAE,GAAG,sBAAsB,CAAC;QAC5C,IAAI,QAAQ,EAAE;YACZ,OAAO,GAAG,QAAQ,CAAC,qBAAqB,CAAC;YACzC,MAAM,GAAG,QAAQ,CAAC,oBAAoB,CAAC;SACxC;QACD,MAAM,MAAM,GAAG,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;YAInC,MAAM,GAAG,SAAS,CAAC;YACnB,QAAQ,CAAC,SAAS,CAAC,CAAC;QACtB,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,YAAY,CAAC,GAAG,EAAE,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,MAAM,CAAC,CAAC,CAAC;IAClD,CAAC;IACD,qBAAqB,CAAC,GAAG,IAAI;QAC3B,MAAM,EAAE,QAAQ,EAAE,GAAG,sBAAsB,CAAC;QAC5C,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,qBAAqB,KAAI,qBAAqB,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAC7E,CAAC;IACD,oBAAoB,CAAC,GAAG,IAAI;QAC1B,MAAM,EAAE,QAAQ,EAAE,GAAG,sBAAsB,CAAC;QAC5C,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,oBAAoB,KAAI,oBAAoB,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAC3E,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/asap.js b/node_modules/rxjs/dist/esm/internal/scheduler/asap.js deleted file mode 100644 index 29ae3a8..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/asap.js +++ /dev/null @@ -1,5 +0,0 @@ -import { AsapAction } from './AsapAction'; -import { AsapScheduler } from './AsapScheduler'; -export const asapScheduler = new AsapScheduler(AsapAction); -export const asap = asapScheduler; -//# sourceMappingURL=asap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/asap.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/asap.js.map deleted file mode 100644 index a38738a..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/asap.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"asap.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/asap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAqChD,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,aAAa,CAAC,UAAU,CAAC,CAAC;AAK3D,MAAM,CAAC,MAAM,IAAI,GAAG,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/async.js b/node_modules/rxjs/dist/esm/internal/scheduler/async.js deleted file mode 100644 index 8d0283e..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/async.js +++ /dev/null @@ -1,5 +0,0 @@ -import { AsyncAction } from './AsyncAction'; -import { AsyncScheduler } from './AsyncScheduler'; -export const asyncScheduler = new AsyncScheduler(AsyncAction); -export const async = asyncScheduler; -//# sourceMappingURL=async.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/async.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/async.js.map deleted file mode 100644 index f14b80d..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/async.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"async.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/async.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAiDlD,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,WAAW,CAAC,CAAC;AAK9D,MAAM,CAAC,MAAM,KAAK,GAAG,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js b/node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js deleted file mode 100644 index 085f1cf..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js +++ /dev/null @@ -1,7 +0,0 @@ -export const dateTimestampProvider = { - now() { - return (dateTimestampProvider.delegate || Date).now(); - }, - delegate: undefined, -}; -//# sourceMappingURL=dateTimestampProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js.map deleted file mode 100644 index 7b947fe..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dateTimestampProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/dateTimestampProvider.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,qBAAqB,GAA0B;IAC1D,GAAG;QAGD,OAAO,CAAC,qBAAqB,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC;IACxD,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/immediateProvider.js b/node_modules/rxjs/dist/esm/internal/scheduler/immediateProvider.js deleted file mode 100644 index 1825ab0..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/immediateProvider.js +++ /dev/null @@ -1,14 +0,0 @@ -import { Immediate } from '../util/Immediate'; -const { setImmediate, clearImmediate } = Immediate; -export const immediateProvider = { - setImmediate(...args) { - const { delegate } = immediateProvider; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate)(...args); - }, - clearImmediate(handle) { - const { delegate } = immediateProvider; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate)(handle); - }, - delegate: undefined, -}; -//# sourceMappingURL=immediateProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/immediateProvider.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/immediateProvider.js.map deleted file mode 100644 index 22ad319..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/immediateProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"immediateProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/immediateProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,SAAS,CAAC;AAgBnD,MAAM,CAAC,MAAM,iBAAiB,GAAsB;IAGlD,YAAY,CAAC,GAAG,IAAI;QAClB,MAAM,EAAE,QAAQ,EAAE,GAAG,iBAAiB,CAAC;QACvC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,YAAY,KAAI,YAAY,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAC3D,CAAC;IACD,cAAc,CAAC,MAAM;QACnB,MAAM,EAAE,QAAQ,EAAE,GAAG,iBAAiB,CAAC;QACvC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,cAAc,KAAI,cAAc,CAAC,CAAC,MAAa,CAAC,CAAC;IACrE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js b/node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js deleted file mode 100644 index 3e528f1..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js +++ /dev/null @@ -1,15 +0,0 @@ -export const intervalProvider = { - setInterval(handler, timeout, ...args) { - const { delegate } = intervalProvider; - if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) { - return delegate.setInterval(handler, timeout, ...args); - } - return setInterval(handler, timeout, ...args); - }, - clearInterval(handle) { - const { delegate } = intervalProvider; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle); - }, - delegate: undefined, -}; -//# sourceMappingURL=intervalProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js.map deleted file mode 100644 index 7daf0dc..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"intervalProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/intervalProvider.ts"],"names":[],"mappings":"AAeA,MAAM,CAAC,MAAM,gBAAgB,GAAqB;IAGhD,WAAW,CAAC,OAAmB,EAAE,OAAgB,EAAE,GAAG,IAAI;QACxD,MAAM,EAAE,QAAQ,EAAE,GAAG,gBAAgB,CAAC;QACtC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE;YACzB,OAAO,QAAQ,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;SACxD;QACD,OAAO,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;IAChD,CAAC;IACD,aAAa,CAAC,MAAM;QAClB,MAAM,EAAE,QAAQ,EAAE,GAAG,gBAAgB,CAAC;QACtC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,aAAa,KAAI,aAAa,CAAC,CAAC,MAAa,CAAC,CAAC;IACnE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/performanceTimestampProvider.js b/node_modules/rxjs/dist/esm/internal/scheduler/performanceTimestampProvider.js deleted file mode 100644 index e82dfb7..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/performanceTimestampProvider.js +++ /dev/null @@ -1,7 +0,0 @@ -export const performanceTimestampProvider = { - now() { - return (performanceTimestampProvider.delegate || performance).now(); - }, - delegate: undefined, -}; -//# sourceMappingURL=performanceTimestampProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/performanceTimestampProvider.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/performanceTimestampProvider.js.map deleted file mode 100644 index 79585a7..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/performanceTimestampProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"performanceTimestampProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/performanceTimestampProvider.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,4BAA4B,GAAiC;IACxE,GAAG;QAGD,OAAO,CAAC,4BAA4B,CAAC,QAAQ,IAAI,WAAW,CAAC,CAAC,GAAG,EAAE,CAAC;IACtE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/queue.js b/node_modules/rxjs/dist/esm/internal/scheduler/queue.js deleted file mode 100644 index cb4f218..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/queue.js +++ /dev/null @@ -1,5 +0,0 @@ -import { QueueAction } from './QueueAction'; -import { QueueScheduler } from './QueueScheduler'; -export const queueScheduler = new QueueScheduler(QueueAction); -export const queue = queueScheduler; -//# sourceMappingURL=queue.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/queue.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/queue.js.map deleted file mode 100644 index d4b5e44..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/queue.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"queue.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/queue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAiElD,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,WAAW,CAAC,CAAC;AAK9D,MAAM,CAAC,MAAM,KAAK,GAAG,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js b/node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js deleted file mode 100644 index 56f8bbb..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js +++ /dev/null @@ -1,15 +0,0 @@ -export const timeoutProvider = { - setTimeout(handler, timeout, ...args) { - const { delegate } = timeoutProvider; - if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) { - return delegate.setTimeout(handler, timeout, ...args); - } - return setTimeout(handler, timeout, ...args); - }, - clearTimeout(handle) { - const { delegate } = timeoutProvider; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle); - }, - delegate: undefined, -}; -//# sourceMappingURL=timeoutProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js.map deleted file mode 100644 index dfc06f5..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timeoutProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/timeoutProvider.ts"],"names":[],"mappings":"AAeA,MAAM,CAAC,MAAM,eAAe,GAAoB;IAG9C,UAAU,CAAC,OAAmB,EAAE,OAAgB,EAAE,GAAG,IAAI;QACvD,MAAM,EAAE,QAAQ,EAAE,GAAG,eAAe,CAAC;QACrC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,UAAU,EAAE;YACxB,OAAO,QAAQ,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;SACvD;QACD,OAAO,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;IAC/C,CAAC;IACD,YAAY,CAAC,MAAM;QACjB,MAAM,EAAE,QAAQ,EAAE,GAAG,eAAe,CAAC;QACrC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,YAAY,KAAI,YAAY,CAAC,CAAC,MAAa,CAAC,CAAC;IACjE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/timerHandle.js b/node_modules/rxjs/dist/esm/internal/scheduler/timerHandle.js deleted file mode 100644 index 40cf606..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/timerHandle.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=timerHandle.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/scheduler/timerHandle.js.map b/node_modules/rxjs/dist/esm/internal/scheduler/timerHandle.js.map deleted file mode 100644 index 8efd320..0000000 --- a/node_modules/rxjs/dist/esm/internal/scheduler/timerHandle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timerHandle.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/timerHandle.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/symbol/iterator.js b/node_modules/rxjs/dist/esm/internal/symbol/iterator.js deleted file mode 100644 index 6f2c37d..0000000 --- a/node_modules/rxjs/dist/esm/internal/symbol/iterator.js +++ /dev/null @@ -1,8 +0,0 @@ -export function getSymbolIterator() { - if (typeof Symbol !== 'function' || !Symbol.iterator) { - return '@@iterator'; - } - return Symbol.iterator; -} -export const iterator = getSymbolIterator(); -//# sourceMappingURL=iterator.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/symbol/iterator.js.map b/node_modules/rxjs/dist/esm/internal/symbol/iterator.js.map deleted file mode 100644 index c9fb6e7..0000000 --- a/node_modules/rxjs/dist/esm/internal/symbol/iterator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"iterator.js","sourceRoot":"","sources":["../../../../src/internal/symbol/iterator.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,iBAAiB;IAC/B,IAAI,OAAO,MAAM,KAAK,UAAU,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;QACpD,OAAO,YAAmB,CAAC;KAC5B;IAED,OAAO,MAAM,CAAC,QAAQ,CAAC;AACzB,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,iBAAiB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/symbol/observable.js b/node_modules/rxjs/dist/esm/internal/symbol/observable.js deleted file mode 100644 index bf38e06..0000000 --- a/node_modules/rxjs/dist/esm/internal/symbol/observable.js +++ /dev/null @@ -1,2 +0,0 @@ -export const observable = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')(); -//# sourceMappingURL=observable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/symbol/observable.js.map b/node_modules/rxjs/dist/esm/internal/symbol/observable.js.map deleted file mode 100644 index da070ab..0000000 --- a/node_modules/rxjs/dist/esm/internal/symbol/observable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"observable.js","sourceRoot":"","sources":["../../../../src/internal/symbol/observable.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,UAAU,GAAoB,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,MAAM,KAAK,UAAU,IAAI,MAAM,CAAC,UAAU,CAAC,IAAI,cAAc,CAAC,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/testing/ColdObservable.js b/node_modules/rxjs/dist/esm/internal/testing/ColdObservable.js deleted file mode 100644 index 0733e6e..0000000 --- a/node_modules/rxjs/dist/esm/internal/testing/ColdObservable.js +++ /dev/null @@ -1,34 +0,0 @@ -import { Observable } from '../Observable'; -import { Subscription } from '../Subscription'; -import { SubscriptionLoggable } from './SubscriptionLoggable'; -import { applyMixins } from '../util/applyMixins'; -import { observeNotification } from '../Notification'; -export class ColdObservable extends Observable { - constructor(messages, scheduler) { - super(function (subscriber) { - const observable = this; - const index = observable.logSubscribedFrame(); - const subscription = new Subscription(); - subscription.add(new Subscription(() => { - observable.logUnsubscribedFrame(index); - })); - observable.scheduleMessages(subscriber); - return subscription; - }); - this.messages = messages; - this.subscriptions = []; - this.scheduler = scheduler; - } - scheduleMessages(subscriber) { - const messagesLength = this.messages.length; - for (let i = 0; i < messagesLength; i++) { - const message = this.messages[i]; - subscriber.add(this.scheduler.schedule((state) => { - const { message: { notification }, subscriber: destination } = state; - observeNotification(notification, destination); - }, message.frame, { message, subscriber })); - } - } -} -applyMixins(ColdObservable, [SubscriptionLoggable]); -//# sourceMappingURL=ColdObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/testing/ColdObservable.js.map b/node_modules/rxjs/dist/esm/internal/testing/ColdObservable.js.map deleted file mode 100644 index d573dee..0000000 --- a/node_modules/rxjs/dist/esm/internal/testing/ColdObservable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ColdObservable.js","sourceRoot":"","sources":["../../../../src/internal/testing/ColdObservable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAI/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,OAAO,cAAkB,SAAQ,UAAa;IAQlD,YAAmB,QAAuB,EAAE,SAAoB;QAC9D,KAAK,CAAC,UAA+B,UAA2B;YAC9D,MAAM,UAAU,GAAsB,IAAW,CAAC;YAClD,MAAM,KAAK,GAAG,UAAU,CAAC,kBAAkB,EAAE,CAAC;YAC9C,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;YACxC,YAAY,CAAC,GAAG,CACd,IAAI,YAAY,CAAC,GAAG,EAAE;gBACpB,UAAU,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;YACzC,CAAC,CAAC,CACH,CAAC;YACF,UAAU,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;YACxC,OAAO,YAAY,CAAC;QACtB,CAAC,CAAC,CAAC;QAZc,aAAQ,GAAR,QAAQ,CAAe;QAPnC,kBAAa,GAAsB,EAAE,CAAC;QAoB3C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED,gBAAgB,CAAC,UAA2B;QAC1C,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;QAC5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,EAAE,CAAC,EAAE,EAAE;YACvC,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YACjC,UAAU,CAAC,GAAG,CACZ,IAAI,CAAC,SAAS,CAAC,QAAQ,CACrB,CAAC,KAAK,EAAE,EAAE;gBACR,MAAM,EAAE,OAAO,EAAE,EAAE,YAAY,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,KAAM,CAAC;gBACtE,mBAAmB,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;YACjD,CAAC,EACD,OAAO,CAAC,KAAK,EACb,EAAE,OAAO,EAAE,UAAU,EAAE,CACxB,CACF,CAAC;SACH;IACH,CAAC;CACF;AACD,WAAW,CAAC,cAAc,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/testing/HotObservable.js b/node_modules/rxjs/dist/esm/internal/testing/HotObservable.js deleted file mode 100644 index 403247e..0000000 --- a/node_modules/rxjs/dist/esm/internal/testing/HotObservable.js +++ /dev/null @@ -1,37 +0,0 @@ -import { Subject } from '../Subject'; -import { Subscription } from '../Subscription'; -import { SubscriptionLoggable } from './SubscriptionLoggable'; -import { applyMixins } from '../util/applyMixins'; -import { observeNotification } from '../Notification'; -export class HotObservable extends Subject { - constructor(messages, scheduler) { - super(); - this.messages = messages; - this.subscriptions = []; - this.scheduler = scheduler; - } - _subscribe(subscriber) { - const subject = this; - const index = subject.logSubscribedFrame(); - const subscription = new Subscription(); - subscription.add(new Subscription(() => { - subject.logUnsubscribedFrame(index); - })); - subscription.add(super._subscribe(subscriber)); - return subscription; - } - setup() { - const subject = this; - const messagesLength = subject.messages.length; - for (let i = 0; i < messagesLength; i++) { - (() => { - const { notification, frame } = subject.messages[i]; - subject.scheduler.schedule(() => { - observeNotification(notification, subject); - }, frame); - })(); - } - } -} -applyMixins(HotObservable, [SubscriptionLoggable]); -//# sourceMappingURL=HotObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/testing/HotObservable.js.map b/node_modules/rxjs/dist/esm/internal/testing/HotObservable.js.map deleted file mode 100644 index a549885..0000000 --- a/node_modules/rxjs/dist/esm/internal/testing/HotObservable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"HotObservable.js","sourceRoot":"","sources":["../../../../src/internal/testing/HotObservable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAI/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,OAAO,aAAiB,SAAQ,OAAU;IAQ9C,YAAmB,QAAuB,EAAE,SAAoB;QAC9D,KAAK,EAAE,CAAC;QADS,aAAQ,GAAR,QAAQ,CAAe;QAPnC,kBAAa,GAAsB,EAAE,CAAC;QAS3C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAGS,UAAU,CAAC,UAA2B;QAC9C,MAAM,OAAO,GAAqB,IAAI,CAAC;QACvC,MAAM,KAAK,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;QAC3C,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;QACxC,YAAY,CAAC,GAAG,CACd,IAAI,YAAY,CAAC,GAAG,EAAE;YACpB,OAAO,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;QACtC,CAAC,CAAC,CACH,CAAC;QACF,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;QAC/C,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,KAAK;QACH,MAAM,OAAO,GAAG,IAAI,CAAC;QACrB,MAAM,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;QAE/C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,EAAE,CAAC,EAAE,EAAE;YACvC,CAAC,GAAG,EAAE;gBACJ,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBAEpD,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE;oBAC9B,mBAAmB,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;gBAC7C,CAAC,EAAE,KAAK,CAAC,CAAC;YACZ,CAAC,CAAC,EAAE,CAAC;SACN;IACH,CAAC;CACF;AACD,WAAW,CAAC,aAAa,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/testing/SubscriptionLog.js b/node_modules/rxjs/dist/esm/internal/testing/SubscriptionLog.js deleted file mode 100644 index 56eb690..0000000 --- a/node_modules/rxjs/dist/esm/internal/testing/SubscriptionLog.js +++ /dev/null @@ -1,7 +0,0 @@ -export class SubscriptionLog { - constructor(subscribedFrame, unsubscribedFrame = Infinity) { - this.subscribedFrame = subscribedFrame; - this.unsubscribedFrame = unsubscribedFrame; - } -} -//# sourceMappingURL=SubscriptionLog.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/testing/SubscriptionLog.js.map b/node_modules/rxjs/dist/esm/internal/testing/SubscriptionLog.js.map deleted file mode 100644 index c4d842c..0000000 --- a/node_modules/rxjs/dist/esm/internal/testing/SubscriptionLog.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SubscriptionLog.js","sourceRoot":"","sources":["../../../../src/internal/testing/SubscriptionLog.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,eAAe;IAC1B,YAAmB,eAAuB,EACvB,oBAA4B,QAAQ;QADpC,oBAAe,GAAf,eAAe,CAAQ;QACvB,sBAAiB,GAAjB,iBAAiB,CAAmB;IACvD,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/testing/SubscriptionLoggable.js b/node_modules/rxjs/dist/esm/internal/testing/SubscriptionLoggable.js deleted file mode 100644 index 08a00d7..0000000 --- a/node_modules/rxjs/dist/esm/internal/testing/SubscriptionLoggable.js +++ /dev/null @@ -1,16 +0,0 @@ -import { SubscriptionLog } from './SubscriptionLog'; -export class SubscriptionLoggable { - constructor() { - this.subscriptions = []; - } - logSubscribedFrame() { - this.subscriptions.push(new SubscriptionLog(this.scheduler.now())); - return this.subscriptions.length - 1; - } - logUnsubscribedFrame(index) { - const subscriptionLogs = this.subscriptions; - const oldSubscriptionLog = subscriptionLogs[index]; - subscriptionLogs[index] = new SubscriptionLog(oldSubscriptionLog.subscribedFrame, this.scheduler.now()); - } -} -//# sourceMappingURL=SubscriptionLoggable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/testing/SubscriptionLoggable.js.map b/node_modules/rxjs/dist/esm/internal/testing/SubscriptionLoggable.js.map deleted file mode 100644 index 6dbcb63..0000000 --- a/node_modules/rxjs/dist/esm/internal/testing/SubscriptionLoggable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SubscriptionLoggable.js","sourceRoot":"","sources":["../../../../src/internal/testing/SubscriptionLoggable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,OAAO,oBAAoB;IAAjC;QACS,kBAAa,GAAsB,EAAE,CAAC;IAiB/C,CAAC;IAbC,kBAAkB;QAChB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACnE,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;IACvC,CAAC;IAED,oBAAoB,CAAC,KAAa;QAChC,MAAM,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC;QAC5C,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;QACnD,gBAAgB,CAAC,KAAK,CAAC,GAAG,IAAI,eAAe,CAC3C,kBAAkB,CAAC,eAAe,EAClC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CACrB,CAAC;IACJ,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/testing/TestMessage.js b/node_modules/rxjs/dist/esm/internal/testing/TestMessage.js deleted file mode 100644 index 47c15db..0000000 --- a/node_modules/rxjs/dist/esm/internal/testing/TestMessage.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=TestMessage.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/testing/TestMessage.js.map b/node_modules/rxjs/dist/esm/internal/testing/TestMessage.js.map deleted file mode 100644 index f91e8da..0000000 --- a/node_modules/rxjs/dist/esm/internal/testing/TestMessage.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TestMessage.js","sourceRoot":"","sources":["../../../../src/internal/testing/TestMessage.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/testing/TestScheduler.js b/node_modules/rxjs/dist/esm/internal/testing/TestScheduler.js deleted file mode 100644 index 90419db..0000000 --- a/node_modules/rxjs/dist/esm/internal/testing/TestScheduler.js +++ /dev/null @@ -1,505 +0,0 @@ -import { Observable } from '../Observable'; -import { ColdObservable } from './ColdObservable'; -import { HotObservable } from './HotObservable'; -import { SubscriptionLog } from './SubscriptionLog'; -import { VirtualTimeScheduler, VirtualAction } from '../scheduler/VirtualTimeScheduler'; -import { COMPLETE_NOTIFICATION, errorNotification, nextNotification } from '../NotificationFactories'; -import { dateTimestampProvider } from '../scheduler/dateTimestampProvider'; -import { performanceTimestampProvider } from '../scheduler/performanceTimestampProvider'; -import { animationFrameProvider } from '../scheduler/animationFrameProvider'; -import { immediateProvider } from '../scheduler/immediateProvider'; -import { intervalProvider } from '../scheduler/intervalProvider'; -import { timeoutProvider } from '../scheduler/timeoutProvider'; -const defaultMaxFrame = 750; -export class TestScheduler extends VirtualTimeScheduler { - constructor(assertDeepEqual) { - super(VirtualAction, defaultMaxFrame); - this.assertDeepEqual = assertDeepEqual; - this.hotObservables = []; - this.coldObservables = []; - this.flushTests = []; - this.runMode = false; - } - createTime(marbles) { - const indexOf = this.runMode ? marbles.trim().indexOf('|') : marbles.indexOf('|'); - if (indexOf === -1) { - throw new Error('marble diagram for time should have a completion marker "|"'); - } - return indexOf * TestScheduler.frameTimeFactor; - } - createColdObservable(marbles, values, error) { - if (marbles.indexOf('^') !== -1) { - throw new Error('cold observable cannot have subscription offset "^"'); - } - if (marbles.indexOf('!') !== -1) { - throw new Error('cold observable cannot have unsubscription marker "!"'); - } - const messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); - const cold = new ColdObservable(messages, this); - this.coldObservables.push(cold); - return cold; - } - createHotObservable(marbles, values, error) { - if (marbles.indexOf('!') !== -1) { - throw new Error('hot observable cannot have unsubscription marker "!"'); - } - const messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); - const subject = new HotObservable(messages, this); - this.hotObservables.push(subject); - return subject; - } - materializeInnerObservable(observable, outerFrame) { - const messages = []; - observable.subscribe({ - next: (value) => { - messages.push({ frame: this.frame - outerFrame, notification: nextNotification(value) }); - }, - error: (error) => { - messages.push({ frame: this.frame - outerFrame, notification: errorNotification(error) }); - }, - complete: () => { - messages.push({ frame: this.frame - outerFrame, notification: COMPLETE_NOTIFICATION }); - }, - }); - return messages; - } - expectObservable(observable, subscriptionMarbles = null) { - const actual = []; - const flushTest = { actual, ready: false }; - const subscriptionParsed = TestScheduler.parseMarblesAsSubscriptions(subscriptionMarbles, this.runMode); - const subscriptionFrame = subscriptionParsed.subscribedFrame === Infinity ? 0 : subscriptionParsed.subscribedFrame; - const unsubscriptionFrame = subscriptionParsed.unsubscribedFrame; - let subscription; - this.schedule(() => { - subscription = observable.subscribe({ - next: (x) => { - const value = x instanceof Observable ? this.materializeInnerObservable(x, this.frame) : x; - actual.push({ frame: this.frame, notification: nextNotification(value) }); - }, - error: (error) => { - actual.push({ frame: this.frame, notification: errorNotification(error) }); - }, - complete: () => { - actual.push({ frame: this.frame, notification: COMPLETE_NOTIFICATION }); - }, - }); - }, subscriptionFrame); - if (unsubscriptionFrame !== Infinity) { - this.schedule(() => subscription.unsubscribe(), unsubscriptionFrame); - } - this.flushTests.push(flushTest); - const { runMode } = this; - return { - toBe(marbles, values, errorValue) { - flushTest.ready = true; - flushTest.expected = TestScheduler.parseMarbles(marbles, values, errorValue, true, runMode); - }, - toEqual: (other) => { - flushTest.ready = true; - flushTest.expected = []; - this.schedule(() => { - subscription = other.subscribe({ - next: (x) => { - const value = x instanceof Observable ? this.materializeInnerObservable(x, this.frame) : x; - flushTest.expected.push({ frame: this.frame, notification: nextNotification(value) }); - }, - error: (error) => { - flushTest.expected.push({ frame: this.frame, notification: errorNotification(error) }); - }, - complete: () => { - flushTest.expected.push({ frame: this.frame, notification: COMPLETE_NOTIFICATION }); - }, - }); - }, subscriptionFrame); - }, - }; - } - expectSubscriptions(actualSubscriptionLogs) { - const flushTest = { actual: actualSubscriptionLogs, ready: false }; - this.flushTests.push(flushTest); - const { runMode } = this; - return { - toBe(marblesOrMarblesArray) { - const marblesArray = typeof marblesOrMarblesArray === 'string' ? [marblesOrMarblesArray] : marblesOrMarblesArray; - flushTest.ready = true; - flushTest.expected = marblesArray - .map((marbles) => TestScheduler.parseMarblesAsSubscriptions(marbles, runMode)) - .filter((marbles) => marbles.subscribedFrame !== Infinity); - }, - }; - } - flush() { - const hotObservables = this.hotObservables; - while (hotObservables.length > 0) { - hotObservables.shift().setup(); - } - super.flush(); - this.flushTests = this.flushTests.filter((test) => { - if (test.ready) { - this.assertDeepEqual(test.actual, test.expected); - return false; - } - return true; - }); - } - static parseMarblesAsSubscriptions(marbles, runMode = false) { - if (typeof marbles !== 'string') { - return new SubscriptionLog(Infinity); - } - const characters = [...marbles]; - const len = characters.length; - let groupStart = -1; - let subscriptionFrame = Infinity; - let unsubscriptionFrame = Infinity; - let frame = 0; - for (let i = 0; i < len; i++) { - let nextFrame = frame; - const advanceFrameBy = (count) => { - nextFrame += count * this.frameTimeFactor; - }; - const c = characters[i]; - switch (c) { - case ' ': - if (!runMode) { - advanceFrameBy(1); - } - break; - case '-': - advanceFrameBy(1); - break; - case '(': - groupStart = frame; - advanceFrameBy(1); - break; - case ')': - groupStart = -1; - advanceFrameBy(1); - break; - case '^': - if (subscriptionFrame !== Infinity) { - throw new Error("found a second subscription point '^' in a " + 'subscription marble diagram. There can only be one.'); - } - subscriptionFrame = groupStart > -1 ? groupStart : frame; - advanceFrameBy(1); - break; - case '!': - if (unsubscriptionFrame !== Infinity) { - throw new Error("found a second unsubscription point '!' in a " + 'subscription marble diagram. There can only be one.'); - } - unsubscriptionFrame = groupStart > -1 ? groupStart : frame; - break; - default: - if (runMode && c.match(/^[0-9]$/)) { - if (i === 0 || characters[i - 1] === ' ') { - const buffer = characters.slice(i).join(''); - const match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); - if (match) { - i += match[0].length - 1; - const duration = parseFloat(match[1]); - const unit = match[2]; - let durationInMs; - switch (unit) { - case 'ms': - durationInMs = duration; - break; - case 's': - durationInMs = duration * 1000; - break; - case 'm': - durationInMs = duration * 1000 * 60; - break; - default: - break; - } - advanceFrameBy(durationInMs / this.frameTimeFactor); - break; - } - } - } - throw new Error("there can only be '^' and '!' markers in a " + "subscription marble diagram. Found instead '" + c + "'."); - } - frame = nextFrame; - } - if (unsubscriptionFrame < 0) { - return new SubscriptionLog(subscriptionFrame); - } - else { - return new SubscriptionLog(subscriptionFrame, unsubscriptionFrame); - } - } - static parseMarbles(marbles, values, errorValue, materializeInnerObservables = false, runMode = false) { - if (marbles.indexOf('!') !== -1) { - throw new Error('conventional marble diagrams cannot have the ' + 'unsubscription marker "!"'); - } - const characters = [...marbles]; - const len = characters.length; - const testMessages = []; - const subIndex = runMode ? marbles.replace(/^[ ]+/, '').indexOf('^') : marbles.indexOf('^'); - let frame = subIndex === -1 ? 0 : subIndex * -this.frameTimeFactor; - const getValue = typeof values !== 'object' - ? (x) => x - : (x) => { - if (materializeInnerObservables && values[x] instanceof ColdObservable) { - return values[x].messages; - } - return values[x]; - }; - let groupStart = -1; - for (let i = 0; i < len; i++) { - let nextFrame = frame; - const advanceFrameBy = (count) => { - nextFrame += count * this.frameTimeFactor; - }; - let notification; - const c = characters[i]; - switch (c) { - case ' ': - if (!runMode) { - advanceFrameBy(1); - } - break; - case '-': - advanceFrameBy(1); - break; - case '(': - groupStart = frame; - advanceFrameBy(1); - break; - case ')': - groupStart = -1; - advanceFrameBy(1); - break; - case '|': - notification = COMPLETE_NOTIFICATION; - advanceFrameBy(1); - break; - case '^': - advanceFrameBy(1); - break; - case '#': - notification = errorNotification(errorValue || 'error'); - advanceFrameBy(1); - break; - default: - if (runMode && c.match(/^[0-9]$/)) { - if (i === 0 || characters[i - 1] === ' ') { - const buffer = characters.slice(i).join(''); - const match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); - if (match) { - i += match[0].length - 1; - const duration = parseFloat(match[1]); - const unit = match[2]; - let durationInMs; - switch (unit) { - case 'ms': - durationInMs = duration; - break; - case 's': - durationInMs = duration * 1000; - break; - case 'm': - durationInMs = duration * 1000 * 60; - break; - default: - break; - } - advanceFrameBy(durationInMs / this.frameTimeFactor); - break; - } - } - } - notification = nextNotification(getValue(c)); - advanceFrameBy(1); - break; - } - if (notification) { - testMessages.push({ frame: groupStart > -1 ? groupStart : frame, notification }); - } - frame = nextFrame; - } - return testMessages; - } - createAnimator() { - if (!this.runMode) { - throw new Error('animate() must only be used in run mode'); - } - let lastHandle = 0; - let map; - const delegate = { - requestAnimationFrame(callback) { - if (!map) { - throw new Error('animate() was not called within run()'); - } - const handle = ++lastHandle; - map.set(handle, callback); - return handle; - }, - cancelAnimationFrame(handle) { - if (!map) { - throw new Error('animate() was not called within run()'); - } - map.delete(handle); - }, - }; - const animate = (marbles) => { - if (map) { - throw new Error('animate() must not be called more than once within run()'); - } - if (/[|#]/.test(marbles)) { - throw new Error('animate() must not complete or error'); - } - map = new Map(); - const messages = TestScheduler.parseMarbles(marbles, undefined, undefined, undefined, true); - for (const message of messages) { - this.schedule(() => { - const now = this.now(); - const callbacks = Array.from(map.values()); - map.clear(); - for (const callback of callbacks) { - callback(now); - } - }, message.frame); - } - }; - return { animate, delegate }; - } - createDelegates() { - let lastHandle = 0; - const scheduleLookup = new Map(); - const run = () => { - const now = this.now(); - const scheduledRecords = Array.from(scheduleLookup.values()); - const scheduledRecordsDue = scheduledRecords.filter(({ due }) => due <= now); - const dueImmediates = scheduledRecordsDue.filter(({ type }) => type === 'immediate'); - if (dueImmediates.length > 0) { - const { handle, handler } = dueImmediates[0]; - scheduleLookup.delete(handle); - handler(); - return; - } - const dueIntervals = scheduledRecordsDue.filter(({ type }) => type === 'interval'); - if (dueIntervals.length > 0) { - const firstDueInterval = dueIntervals[0]; - const { duration, handler } = firstDueInterval; - firstDueInterval.due = now + duration; - firstDueInterval.subscription = this.schedule(run, duration); - handler(); - return; - } - const dueTimeouts = scheduledRecordsDue.filter(({ type }) => type === 'timeout'); - if (dueTimeouts.length > 0) { - const { handle, handler } = dueTimeouts[0]; - scheduleLookup.delete(handle); - handler(); - return; - } - throw new Error('Expected a due immediate or interval'); - }; - const immediate = { - setImmediate: (handler) => { - const handle = ++lastHandle; - scheduleLookup.set(handle, { - due: this.now(), - duration: 0, - handle, - handler, - subscription: this.schedule(run, 0), - type: 'immediate', - }); - return handle; - }, - clearImmediate: (handle) => { - const value = scheduleLookup.get(handle); - if (value) { - value.subscription.unsubscribe(); - scheduleLookup.delete(handle); - } - }, - }; - const interval = { - setInterval: (handler, duration = 0) => { - const handle = ++lastHandle; - scheduleLookup.set(handle, { - due: this.now() + duration, - duration, - handle, - handler, - subscription: this.schedule(run, duration), - type: 'interval', - }); - return handle; - }, - clearInterval: (handle) => { - const value = scheduleLookup.get(handle); - if (value) { - value.subscription.unsubscribe(); - scheduleLookup.delete(handle); - } - }, - }; - const timeout = { - setTimeout: (handler, duration = 0) => { - const handle = ++lastHandle; - scheduleLookup.set(handle, { - due: this.now() + duration, - duration, - handle, - handler, - subscription: this.schedule(run, duration), - type: 'timeout', - }); - return handle; - }, - clearTimeout: (handle) => { - const value = scheduleLookup.get(handle); - if (value) { - value.subscription.unsubscribe(); - scheduleLookup.delete(handle); - } - }, - }; - return { immediate, interval, timeout }; - } - run(callback) { - const prevFrameTimeFactor = TestScheduler.frameTimeFactor; - const prevMaxFrames = this.maxFrames; - TestScheduler.frameTimeFactor = 1; - this.maxFrames = Infinity; - this.runMode = true; - const animator = this.createAnimator(); - const delegates = this.createDelegates(); - animationFrameProvider.delegate = animator.delegate; - dateTimestampProvider.delegate = this; - immediateProvider.delegate = delegates.immediate; - intervalProvider.delegate = delegates.interval; - timeoutProvider.delegate = delegates.timeout; - performanceTimestampProvider.delegate = this; - const helpers = { - cold: this.createColdObservable.bind(this), - hot: this.createHotObservable.bind(this), - flush: this.flush.bind(this), - time: this.createTime.bind(this), - expectObservable: this.expectObservable.bind(this), - expectSubscriptions: this.expectSubscriptions.bind(this), - animate: animator.animate, - }; - try { - const ret = callback(helpers); - this.flush(); - return ret; - } - finally { - TestScheduler.frameTimeFactor = prevFrameTimeFactor; - this.maxFrames = prevMaxFrames; - this.runMode = false; - animationFrameProvider.delegate = undefined; - dateTimestampProvider.delegate = undefined; - immediateProvider.delegate = undefined; - intervalProvider.delegate = undefined; - timeoutProvider.delegate = undefined; - performanceTimestampProvider.delegate = undefined; - } - } -} -TestScheduler.frameTimeFactor = 10; -//# sourceMappingURL=TestScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/testing/TestScheduler.js.map b/node_modules/rxjs/dist/esm/internal/testing/TestScheduler.js.map deleted file mode 100644 index f84e5c5..0000000 --- a/node_modules/rxjs/dist/esm/internal/testing/TestScheduler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TestScheduler.js","sourceRoot":"","sources":["../../../../src/internal/testing/TestScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAExF,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACtG,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAE7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,MAAM,eAAe,GAAW,GAAG,CAAC;AAqBpC,MAAM,OAAO,aAAc,SAAQ,oBAAoB;IAiCrD,YAAmB,eAA+D;QAChF,KAAK,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC;QADrB,oBAAe,GAAf,eAAe,CAAgD;QAtBlE,mBAAc,GAAyB,EAAE,CAAC;QAK1C,oBAAe,GAA0B,EAAE,CAAC;QAKpD,eAAU,GAAoB,EAAE,CAAC;QAMjC,YAAO,GAAG,KAAK,CAAC;IAQxB,CAAC;IAED,UAAU,CAAC,OAAe;QACxB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAClF,IAAI,OAAO,KAAK,CAAC,CAAC,EAAE;YAClB,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;SAChF;QACD,OAAO,OAAO,GAAG,aAAa,CAAC,eAAe,CAAC;IACjD,CAAC;IAOD,oBAAoB,CAAa,OAAe,EAAE,MAAgC,EAAE,KAAW;QAC7F,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;YAC/B,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;SACxE;QACD,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;YAC/B,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;SAC1E;QACD,MAAM,QAAQ,GAAG,aAAa,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7F,MAAM,IAAI,GAAG,IAAI,cAAc,CAAI,QAAQ,EAAE,IAAI,CAAC,CAAC;QACnD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;IAOD,mBAAmB,CAAa,OAAe,EAAE,MAAgC,EAAE,KAAW;QAC5F,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;YAC/B,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;SACzE;QACD,MAAM,QAAQ,GAAG,aAAa,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7F,MAAM,OAAO,GAAG,IAAI,aAAa,CAAI,QAAQ,EAAE,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClC,OAAO,OAAO,CAAC;IACjB,CAAC;IAEO,0BAA0B,CAAC,UAA2B,EAAE,UAAkB;QAChF,MAAM,QAAQ,GAAkB,EAAE,CAAC;QACnC,UAAU,CAAC,SAAS,CAAC;YACnB,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE;gBACd,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,GAAG,UAAU,EAAE,YAAY,EAAE,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC3F,CAAC;YACD,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE;gBACf,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,GAAG,UAAU,EAAE,YAAY,EAAE,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC5F,CAAC;YACD,QAAQ,EAAE,GAAG,EAAE;gBACb,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,GAAG,UAAU,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC,CAAC;YACzF,CAAC;SACF,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,gBAAgB,CAAI,UAAyB,EAAE,sBAAqC,IAAI;QACtF,MAAM,MAAM,GAAkB,EAAE,CAAC;QACjC,MAAM,SAAS,GAAkB,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QAC1D,MAAM,kBAAkB,GAAG,aAAa,CAAC,2BAA2B,CAAC,mBAAmB,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACxG,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,eAAe,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,eAAe,CAAC;QACnH,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,iBAAiB,CAAC;QACjE,IAAI,YAA0B,CAAC;QAE/B,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;YACjB,YAAY,GAAG,UAAU,CAAC,SAAS,CAAC;gBAClC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE;oBAEV,MAAM,KAAK,GAAG,CAAC,YAAY,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC3F,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBAC5E,CAAC;gBACD,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE;oBACf,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBAC7E,CAAC;gBACD,QAAQ,EAAE,GAAG,EAAE;oBACb,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC,CAAC;gBAC1E,CAAC;aACF,CAAC,CAAC;QACL,CAAC,EAAE,iBAAiB,CAAC,CAAC;QAEtB,IAAI,mBAAmB,KAAK,QAAQ,EAAE;YACpC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,WAAW,EAAE,EAAE,mBAAmB,CAAC,CAAC;SACtE;QAED,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAChC,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;QAEzB,OAAO;YACL,IAAI,CAAC,OAAe,EAAE,MAAY,EAAE,UAAgB;gBAClD,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC;gBACvB,SAAS,CAAC,QAAQ,GAAG,aAAa,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;YAC9F,CAAC;YACD,OAAO,EAAE,CAAC,KAAoB,EAAE,EAAE;gBAChC,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC;gBACvB,SAAS,CAAC,QAAQ,GAAG,EAAE,CAAC;gBACxB,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;oBACjB,YAAY,GAAG,KAAK,CAAC,SAAS,CAAC;wBAC7B,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE;4BAEV,MAAM,KAAK,GAAG,CAAC,YAAY,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;4BAC3F,SAAS,CAAC,QAAS,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;wBACzF,CAAC;wBACD,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE;4BACf,SAAS,CAAC,QAAS,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;wBAC1F,CAAC;wBACD,QAAQ,EAAE,GAAG,EAAE;4BACb,SAAS,CAAC,QAAS,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC,CAAC;wBACvF,CAAC;qBACF,CAAC,CAAC;gBACL,CAAC,EAAE,iBAAiB,CAAC,CAAC;YACxB,CAAC;SACF,CAAC;IACJ,CAAC;IAED,mBAAmB,CAAC,sBAAyC;QAC3D,MAAM,SAAS,GAAkB,EAAE,MAAM,EAAE,sBAAsB,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QAClF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAChC,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;QACzB,OAAO;YACL,IAAI,CAAC,qBAAwC;gBAC3C,MAAM,YAAY,GAAa,OAAO,qBAAqB,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,qBAAqB,CAAC;gBAC3H,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC;gBACvB,SAAS,CAAC,QAAQ,GAAG,YAAY;qBAC9B,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,aAAa,CAAC,2BAA2B,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;qBAC7E,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,eAAe,KAAK,QAAQ,CAAC,CAAC;YAC/D,CAAC;SACF,CAAC;IACJ,CAAC;IAED,KAAK;QACH,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC;QAC3C,OAAO,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE;YAChC,cAAc,CAAC,KAAK,EAAG,CAAC,KAAK,EAAE,CAAC;SACjC;QAED,KAAK,CAAC,KAAK,EAAE,CAAC;QAEd,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;YAChD,IAAI,IAAI,CAAC,KAAK,EAAE;gBACd,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACjD,OAAO,KAAK,CAAC;aACd;YACD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,2BAA2B,CAAC,OAAsB,EAAE,OAAO,GAAG,KAAK;QACxE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;YAC/B,OAAO,IAAI,eAAe,CAAC,QAAQ,CAAC,CAAC;SACtC;QAGD,MAAM,UAAU,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC;QAChC,MAAM,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC;QAC9B,IAAI,UAAU,GAAG,CAAC,CAAC,CAAC;QACpB,IAAI,iBAAiB,GAAG,QAAQ,CAAC;QACjC,IAAI,mBAAmB,GAAG,QAAQ,CAAC;QACnC,IAAI,KAAK,GAAG,CAAC,CAAC;QAEd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;YAC5B,IAAI,SAAS,GAAG,KAAK,CAAC;YACtB,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,EAAE;gBACvC,SAAS,IAAI,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC;YAC5C,CAAC,CAAC;YACF,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;YACxB,QAAQ,CAAC,EAAE;gBACT,KAAK,GAAG;oBAEN,IAAI,CAAC,OAAO,EAAE;wBACZ,cAAc,CAAC,CAAC,CAAC,CAAC;qBACnB;oBACD,MAAM;gBACR,KAAK,GAAG;oBACN,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,UAAU,GAAG,KAAK,CAAC;oBACnB,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,UAAU,GAAG,CAAC,CAAC,CAAC;oBAChB,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,IAAI,iBAAiB,KAAK,QAAQ,EAAE;wBAClC,MAAM,IAAI,KAAK,CAAC,6CAA6C,GAAG,qDAAqD,CAAC,CAAC;qBACxH;oBACD,iBAAiB,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC;oBACzD,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,IAAI,mBAAmB,KAAK,QAAQ,EAAE;wBACpC,MAAM,IAAI,KAAK,CAAC,+CAA+C,GAAG,qDAAqD,CAAC,CAAC;qBAC1H;oBACD,mBAAmB,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC;oBAC3D,MAAM;gBACR;oBAEE,IAAI,OAAO,IAAI,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE;wBAGjC,IAAI,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE;4BACxC,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;4BAC5C,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;4BAC9D,IAAI,KAAK,EAAE;gCACT,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;gCACzB,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gCACtC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;gCACtB,IAAI,YAAoB,CAAC;gCAEzB,QAAQ,IAAI,EAAE;oCACZ,KAAK,IAAI;wCACP,YAAY,GAAG,QAAQ,CAAC;wCACxB,MAAM;oCACR,KAAK,GAAG;wCACN,YAAY,GAAG,QAAQ,GAAG,IAAI,CAAC;wCAC/B,MAAM;oCACR,KAAK,GAAG;wCACN,YAAY,GAAG,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAC;wCACpC,MAAM;oCACR;wCACE,MAAM;iCACT;gCAED,cAAc,CAAC,YAAa,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC;gCACrD,MAAM;6BACP;yBACF;qBACF;oBAED,MAAM,IAAI,KAAK,CAAC,6CAA6C,GAAG,8CAA8C,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;aAC9H;YAED,KAAK,GAAG,SAAS,CAAC;SACnB;QAED,IAAI,mBAAmB,GAAG,CAAC,EAAE;YAC3B,OAAO,IAAI,eAAe,CAAC,iBAAiB,CAAC,CAAC;SAC/C;aAAM;YACL,OAAO,IAAI,eAAe,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAC;SACpE;IACH,CAAC;IAED,MAAM,CAAC,YAAY,CACjB,OAAe,EACf,MAAY,EACZ,UAAgB,EAChB,8BAAuC,KAAK,EAC5C,OAAO,GAAG,KAAK;QAEf,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;YAC/B,MAAM,IAAI,KAAK,CAAC,+CAA+C,GAAG,2BAA2B,CAAC,CAAC;SAChG;QAGD,MAAM,UAAU,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC;QAChC,MAAM,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC;QAC9B,MAAM,YAAY,GAAkB,EAAE,CAAC;QACvC,MAAM,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC5F,IAAI,KAAK,GAAG,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC;QACnE,MAAM,QAAQ,GACZ,OAAO,MAAM,KAAK,QAAQ;YACxB,CAAC,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC;YACf,CAAC,CAAC,CAAC,CAAM,EAAE,EAAE;gBAET,IAAI,2BAA2B,IAAI,MAAM,CAAC,CAAC,CAAC,YAAY,cAAc,EAAE;oBACtE,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;iBAC3B;gBACD,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;YACnB,CAAC,CAAC;QACR,IAAI,UAAU,GAAG,CAAC,CAAC,CAAC;QAEpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;YAC5B,IAAI,SAAS,GAAG,KAAK,CAAC;YACtB,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,EAAE;gBACvC,SAAS,IAAI,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC;YAC5C,CAAC,CAAC;YAEF,IAAI,YAAqD,CAAC;YAC1D,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;YACxB,QAAQ,CAAC,EAAE;gBACT,KAAK,GAAG;oBAEN,IAAI,CAAC,OAAO,EAAE;wBACZ,cAAc,CAAC,CAAC,CAAC,CAAC;qBACnB;oBACD,MAAM;gBACR,KAAK,GAAG;oBACN,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,UAAU,GAAG,KAAK,CAAC;oBACnB,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,UAAU,GAAG,CAAC,CAAC,CAAC;oBAChB,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,YAAY,GAAG,qBAAqB,CAAC;oBACrC,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,YAAY,GAAG,iBAAiB,CAAC,UAAU,IAAI,OAAO,CAAC,CAAC;oBACxD,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR;oBAEE,IAAI,OAAO,IAAI,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE;wBAGjC,IAAI,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE;4BACxC,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;4BAC5C,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;4BAC9D,IAAI,KAAK,EAAE;gCACT,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;gCACzB,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gCACtC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;gCACtB,IAAI,YAAoB,CAAC;gCAEzB,QAAQ,IAAI,EAAE;oCACZ,KAAK,IAAI;wCACP,YAAY,GAAG,QAAQ,CAAC;wCACxB,MAAM;oCACR,KAAK,GAAG;wCACN,YAAY,GAAG,QAAQ,GAAG,IAAI,CAAC;wCAC/B,MAAM;oCACR,KAAK,GAAG;wCACN,YAAY,GAAG,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAC;wCACpC,MAAM;oCACR;wCACE,MAAM;iCACT;gCAED,cAAc,CAAC,YAAa,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC;gCACrD,MAAM;6BACP;yBACF;qBACF;oBAED,YAAY,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC7C,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;aACT;YAED,IAAI,YAAY,EAAE;gBAChB,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC;aAClF;YAED,KAAK,GAAG,SAAS,CAAC;SACnB;QACD,OAAO,YAAY,CAAC;IACtB,CAAC;IAEO,cAAc;QACpB,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACjB,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;SAC5D;QAWD,IAAI,UAAU,GAAG,CAAC,CAAC;QACnB,IAAI,GAAkD,CAAC;QAEvD,MAAM,QAAQ,GAAG;YACf,qBAAqB,CAAC,QAA8B;gBAClD,IAAI,CAAC,GAAG,EAAE;oBACR,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;iBAC1D;gBACD,MAAM,MAAM,GAAG,EAAE,UAAU,CAAC;gBAC5B,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;gBAC1B,OAAO,MAAM,CAAC;YAChB,CAAC;YACD,oBAAoB,CAAC,MAAc;gBACjC,IAAI,CAAC,GAAG,EAAE;oBACR,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;iBAC1D;gBACD,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACrB,CAAC;SACF,CAAC;QAEF,MAAM,OAAO,GAAG,CAAC,OAAe,EAAE,EAAE;YAClC,IAAI,GAAG,EAAE;gBACP,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;aAC7E;YACD,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;gBACxB,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;aACzD;YACD,GAAG,GAAG,IAAI,GAAG,EAAgC,CAAC;YAC9C,MAAM,QAAQ,GAAG,aAAa,CAAC,YAAY,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;YAC5F,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;gBAC9B,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;oBACjB,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;oBAMvB,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,GAAI,CAAC,MAAM,EAAE,CAAC,CAAC;oBAC5C,GAAI,CAAC,KAAK,EAAE,CAAC;oBACb,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE;wBAChC,QAAQ,CAAC,GAAG,CAAC,CAAC;qBACf;gBACH,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;aACnB;QACH,CAAC,CAAC;QAEF,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;IAC/B,CAAC;IAEO,eAAe;QAYrB,IAAI,UAAU,GAAG,CAAC,CAAC;QACnB,MAAM,cAAc,GAAG,IAAI,GAAG,EAU3B,CAAC;QAEJ,MAAM,GAAG,GAAG,GAAG,EAAE;YAIf,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;YACvB,MAAM,gBAAgB,GAAG,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC;YAC7D,MAAM,mBAAmB,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC;YAC7E,MAAM,aAAa,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC;YACrF,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC5B,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;gBAC7C,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBAC9B,OAAO,EAAE,CAAC;gBACV,OAAO;aACR;YACD,MAAM,YAAY,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC;YACnF,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC3B,MAAM,gBAAgB,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;gBACzC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,gBAAgB,CAAC;gBAC/C,gBAAgB,CAAC,GAAG,GAAG,GAAG,GAAG,QAAQ,CAAC;gBAItC,gBAAgB,CAAC,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;gBAC7D,OAAO,EAAE,CAAC;gBACV,OAAO;aACR;YACD,MAAM,WAAW,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;YACjF,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC1B,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;gBAC3C,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBAC9B,OAAO,EAAE,CAAC;gBACV,OAAO;aACR;YACD,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;QAC1D,CAAC,CAAC;QAcF,MAAM,SAAS,GAAG;YAChB,YAAY,EAAE,CAAC,OAAmB,EAAE,EAAE;gBACpC,MAAM,MAAM,GAAG,EAAE,UAAU,CAAC;gBAC5B,cAAc,CAAC,GAAG,CAAC,MAAM,EAAE;oBACzB,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE;oBACf,QAAQ,EAAE,CAAC;oBACX,MAAM;oBACN,OAAO;oBACP,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;oBACnC,IAAI,EAAE,WAAW;iBAClB,CAAC,CAAC;gBACH,OAAO,MAAM,CAAC;YAChB,CAAC;YACD,cAAc,EAAE,CAAC,MAAmB,EAAE,EAAE;gBACtC,MAAM,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;gBACzC,IAAI,KAAK,EAAE;oBACT,KAAK,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;oBACjC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;iBAC/B;YACH,CAAC;SACF,CAAC;QAEF,MAAM,QAAQ,GAAG;YACf,WAAW,EAAE,CAAC,OAAmB,EAAE,QAAQ,GAAG,CAAC,EAAE,EAAE;gBACjD,MAAM,MAAM,GAAG,EAAE,UAAU,CAAC;gBAC5B,cAAc,CAAC,GAAG,CAAC,MAAM,EAAE;oBACzB,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,QAAQ;oBAC1B,QAAQ;oBACR,MAAM;oBACN,OAAO;oBACP,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;oBAC1C,IAAI,EAAE,UAAU;iBACjB,CAAC,CAAC;gBACH,OAAO,MAAM,CAAC;YAChB,CAAC;YACD,aAAa,EAAE,CAAC,MAAmB,EAAE,EAAE;gBACrC,MAAM,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;gBACzC,IAAI,KAAK,EAAE;oBACT,KAAK,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;oBACjC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;iBAC/B;YACH,CAAC;SACF,CAAC;QAEF,MAAM,OAAO,GAAG;YACd,UAAU,EAAE,CAAC,OAAmB,EAAE,QAAQ,GAAG,CAAC,EAAE,EAAE;gBAChD,MAAM,MAAM,GAAG,EAAE,UAAU,CAAC;gBAC5B,cAAc,CAAC,GAAG,CAAC,MAAM,EAAE;oBACzB,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,QAAQ;oBAC1B,QAAQ;oBACR,MAAM;oBACN,OAAO;oBACP,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;oBAC1C,IAAI,EAAE,SAAS;iBAChB,CAAC,CAAC;gBACH,OAAO,MAAM,CAAC;YAChB,CAAC;YACD,YAAY,EAAE,CAAC,MAAmB,EAAE,EAAE;gBACpC,MAAM,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;gBACzC,IAAI,KAAK,EAAE;oBACT,KAAK,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;oBACjC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;iBAC/B;YACH,CAAC;SACF,CAAC;QAEF,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;IAC1C,CAAC;IAUD,GAAG,CAAI,QAAoC;QACzC,MAAM,mBAAmB,GAAG,aAAa,CAAC,eAAe,CAAC;QAC1D,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC;QAErC,aAAa,CAAC,eAAe,GAAG,CAAC,CAAC;QAClC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAEpB,MAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QACvC,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QAEzC,sBAAsB,CAAC,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;QACpD,qBAAqB,CAAC,QAAQ,GAAG,IAAI,CAAC;QACtC,iBAAiB,CAAC,QAAQ,GAAG,SAAS,CAAC,SAAS,CAAC;QACjD,gBAAgB,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;QAC/C,eAAe,CAAC,QAAQ,GAAG,SAAS,CAAC,OAAO,CAAC;QAC7C,4BAA4B,CAAC,QAAQ,GAAG,IAAI,CAAC;QAE7C,MAAM,OAAO,GAAe;YAC1B,IAAI,EAAE,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC;YAC1C,GAAG,EAAE,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC;YACxC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;YAC5B,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;YAChC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC;YAClD,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC;YACxD,OAAO,EAAE,QAAQ,CAAC,OAAO;SAC1B,CAAC;QACF,IAAI;YACF,MAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;YAC9B,IAAI,CAAC,KAAK,EAAE,CAAC;YACb,OAAO,GAAG,CAAC;SACZ;gBAAS;YACR,aAAa,CAAC,eAAe,GAAG,mBAAmB,CAAC;YACpD,IAAI,CAAC,SAAS,GAAG,aAAa,CAAC;YAC/B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;YACrB,sBAAsB,CAAC,QAAQ,GAAG,SAAS,CAAC;YAC5C,qBAAqB,CAAC,QAAQ,GAAG,SAAS,CAAC;YAC3C,iBAAiB,CAAC,QAAQ,GAAG,SAAS,CAAC;YACvC,gBAAgB,CAAC,QAAQ,GAAG,SAAS,CAAC;YACtC,eAAe,CAAC,QAAQ,GAAG,SAAS,CAAC;YACrC,4BAA4B,CAAC,QAAQ,GAAG,SAAS,CAAC;SACnD;IACH,CAAC;;AApoBM,6BAAe,GAAG,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/types.js b/node_modules/rxjs/dist/esm/internal/types.js deleted file mode 100644 index 718fd38..0000000 --- a/node_modules/rxjs/dist/esm/internal/types.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/types.js.map b/node_modules/rxjs/dist/esm/internal/types.js.map deleted file mode 100644 index 493d291..0000000 --- a/node_modules/rxjs/dist/esm/internal/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/internal/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/umd.js b/node_modules/rxjs/dist/esm/internal/umd.js deleted file mode 100644 index 25c05ff..0000000 --- a/node_modules/rxjs/dist/esm/internal/umd.js +++ /dev/null @@ -1,12 +0,0 @@ -export * from '../index'; -import * as _operators from '../operators/index'; -export const operators = _operators; -import * as _testing from '../testing/index'; -export const testing = _testing; -import * as _ajax from '../ajax/index'; -export const ajax = _ajax; -import * as _webSocket from '../webSocket/index'; -export const webSocket = _webSocket; -import * as _fetch from '../fetch/index'; -export const fetch = _fetch; -//# sourceMappingURL=umd.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/umd.js.map b/node_modules/rxjs/dist/esm/internal/umd.js.map deleted file mode 100644 index a9cfe28..0000000 --- a/node_modules/rxjs/dist/esm/internal/umd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"umd.js","sourceRoot":"","sources":["../../../src/internal/umd.ts"],"names":[],"mappings":"AAKA,cAAc,UAAU,CAAC;AAGzB,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC;AAGpC,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAGhC,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AACvC,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC;AAG1B,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC;AAGpC,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/ArgumentOutOfRangeError.js b/node_modules/rxjs/dist/esm/internal/util/ArgumentOutOfRangeError.js deleted file mode 100644 index da0d113..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/ArgumentOutOfRangeError.js +++ /dev/null @@ -1,7 +0,0 @@ -import { createErrorClass } from './createErrorClass'; -export const ArgumentOutOfRangeError = createErrorClass((_super) => function ArgumentOutOfRangeErrorImpl() { - _super(this); - this.name = 'ArgumentOutOfRangeError'; - this.message = 'argument out of range'; -}); -//# sourceMappingURL=ArgumentOutOfRangeError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/ArgumentOutOfRangeError.js.map b/node_modules/rxjs/dist/esm/internal/util/ArgumentOutOfRangeError.js.map deleted file mode 100644 index a22777e..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/ArgumentOutOfRangeError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ArgumentOutOfRangeError.js","sourceRoot":"","sources":["../../../../src/internal/util/ArgumentOutOfRangeError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAoBtD,MAAM,CAAC,MAAM,uBAAuB,GAAgC,gBAAgB,CAClF,CAAC,MAAM,EAAE,EAAE,CACT,SAAS,2BAA2B;IAClC,MAAM,CAAC,IAAI,CAAC,CAAC;IACb,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;IACtC,IAAI,CAAC,OAAO,GAAG,uBAAuB,CAAC;AACzC,CAAC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/EmptyError.js b/node_modules/rxjs/dist/esm/internal/util/EmptyError.js deleted file mode 100644 index de16998..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/EmptyError.js +++ /dev/null @@ -1,7 +0,0 @@ -import { createErrorClass } from './createErrorClass'; -export const EmptyError = createErrorClass((_super) => function EmptyErrorImpl() { - _super(this); - this.name = 'EmptyError'; - this.message = 'no elements in sequence'; -}); -//# sourceMappingURL=EmptyError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/EmptyError.js.map b/node_modules/rxjs/dist/esm/internal/util/EmptyError.js.map deleted file mode 100644 index 66dc762..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/EmptyError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"EmptyError.js","sourceRoot":"","sources":["../../../../src/internal/util/EmptyError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAsBtD,MAAM,CAAC,MAAM,UAAU,GAAmB,gBAAgB,CACxD,CAAC,MAAM,EAAE,EAAE,CACT,SAAS,cAAc;IACrB,MAAM,CAAC,IAAI,CAAC,CAAC;IACb,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IACzB,IAAI,CAAC,OAAO,GAAG,yBAAyB,CAAC;AAC3C,CAAC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/Immediate.js b/node_modules/rxjs/dist/esm/internal/util/Immediate.js deleted file mode 100644 index 8633e1d..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/Immediate.js +++ /dev/null @@ -1,30 +0,0 @@ -let nextHandle = 1; -let resolved; -const activeHandles = {}; -function findAndClearHandle(handle) { - if (handle in activeHandles) { - delete activeHandles[handle]; - return true; - } - return false; -} -export const Immediate = { - setImmediate(cb) { - const handle = nextHandle++; - activeHandles[handle] = true; - if (!resolved) { - resolved = Promise.resolve(); - } - resolved.then(() => findAndClearHandle(handle) && cb()); - return handle; - }, - clearImmediate(handle) { - findAndClearHandle(handle); - }, -}; -export const TestTools = { - pending() { - return Object.keys(activeHandles).length; - } -}; -//# sourceMappingURL=Immediate.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/Immediate.js.map b/node_modules/rxjs/dist/esm/internal/util/Immediate.js.map deleted file mode 100644 index 9716813..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/Immediate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Immediate.js","sourceRoot":"","sources":["../../../../src/internal/util/Immediate.ts"],"names":[],"mappings":"AAAA,IAAI,UAAU,GAAG,CAAC,CAAC;AAEnB,IAAI,QAAsB,CAAC;AAC3B,MAAM,aAAa,GAA2B,EAAE,CAAC;AAOjD,SAAS,kBAAkB,CAAC,MAAc;IACxC,IAAI,MAAM,IAAI,aAAa,EAAE;QAC3B,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAKD,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,YAAY,CAAC,EAAc;QACzB,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;QAC5B,aAAa,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;QAC7B,IAAI,CAAC,QAAQ,EAAE;YACb,QAAQ,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;SAC9B;QACD,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACxD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,cAAc,CAAC,MAAc;QAC3B,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;CACF,CAAC;AAKF,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,OAAO;QACL,OAAO,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC;IAC3C,CAAC;CACF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/NotFoundError.js b/node_modules/rxjs/dist/esm/internal/util/NotFoundError.js deleted file mode 100644 index f3f523b..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/NotFoundError.js +++ /dev/null @@ -1,7 +0,0 @@ -import { createErrorClass } from './createErrorClass'; -export const NotFoundError = createErrorClass((_super) => function NotFoundErrorImpl(message) { - _super(this); - this.name = 'NotFoundError'; - this.message = message; -}); -//# sourceMappingURL=NotFoundError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/NotFoundError.js.map b/node_modules/rxjs/dist/esm/internal/util/NotFoundError.js.map deleted file mode 100644 index 05840bf..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/NotFoundError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NotFoundError.js","sourceRoot":"","sources":["../../../../src/internal/util/NotFoundError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAkBtD,MAAM,CAAC,MAAM,aAAa,GAAsB,gBAAgB,CAC9D,CAAC,MAAM,EAAE,EAAE,CACT,SAAS,iBAAiB,CAAY,OAAe;IACnD,MAAM,CAAC,IAAI,CAAC,CAAC;IACb,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AACzB,CAAC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js b/node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js deleted file mode 100644 index 4f04e58..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js +++ /dev/null @@ -1,7 +0,0 @@ -import { createErrorClass } from './createErrorClass'; -export const ObjectUnsubscribedError = createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() { - _super(this); - this.name = 'ObjectUnsubscribedError'; - this.message = 'object unsubscribed'; -}); -//# sourceMappingURL=ObjectUnsubscribedError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js.map b/node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js.map deleted file mode 100644 index ac07cee..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ObjectUnsubscribedError.js","sourceRoot":"","sources":["../../../../src/internal/util/ObjectUnsubscribedError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAqBtD,MAAM,CAAC,MAAM,uBAAuB,GAAgC,gBAAgB,CAClF,CAAC,MAAM,EAAE,EAAE,CACT,SAAS,2BAA2B;IAClC,MAAM,CAAC,IAAI,CAAC,CAAC;IACb,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;IACtC,IAAI,CAAC,OAAO,GAAG,qBAAqB,CAAC;AACvC,CAAC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/SequenceError.js b/node_modules/rxjs/dist/esm/internal/util/SequenceError.js deleted file mode 100644 index a1558ff..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/SequenceError.js +++ /dev/null @@ -1,7 +0,0 @@ -import { createErrorClass } from './createErrorClass'; -export const SequenceError = createErrorClass((_super) => function SequenceErrorImpl(message) { - _super(this); - this.name = 'SequenceError'; - this.message = message; -}); -//# sourceMappingURL=SequenceError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/SequenceError.js.map b/node_modules/rxjs/dist/esm/internal/util/SequenceError.js.map deleted file mode 100644 index 36a8c67..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/SequenceError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SequenceError.js","sourceRoot":"","sources":["../../../../src/internal/util/SequenceError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAkBtD,MAAM,CAAC,MAAM,aAAa,GAAsB,gBAAgB,CAC9D,CAAC,MAAM,EAAE,EAAE,CACT,SAAS,iBAAiB,CAAY,OAAe;IACnD,MAAM,CAAC,IAAI,CAAC,CAAC;IACb,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AACzB,CAAC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js b/node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js deleted file mode 100644 index e46ca56..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js +++ /dev/null @@ -1,11 +0,0 @@ -import { createErrorClass } from './createErrorClass'; -export const UnsubscriptionError = createErrorClass((_super) => function UnsubscriptionErrorImpl(errors) { - _super(this); - this.message = errors - ? `${errors.length} errors occurred during unsubscription: -${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\n ')}` - : ''; - this.name = 'UnsubscriptionError'; - this.errors = errors; -}); -//# sourceMappingURL=UnsubscriptionError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js.map b/node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js.map deleted file mode 100644 index bbfad22..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UnsubscriptionError.js","sourceRoot":"","sources":["../../../../src/internal/util/UnsubscriptionError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAkBtD,MAAM,CAAC,MAAM,mBAAmB,GAA4B,gBAAgB,CAC1E,CAAC,MAAM,EAAE,EAAE,CACT,SAAS,uBAAuB,CAAY,MAA0B;IACpE,MAAM,CAAC,IAAI,CAAC,CAAC;IACb,IAAI,CAAC,OAAO,GAAG,MAAM;QACnB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM;EACxB,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;QAC9D,CAAC,CAAC,EAAE,CAAC;IACP,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;AACvB,CAAC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/applyMixins.js b/node_modules/rxjs/dist/esm/internal/util/applyMixins.js deleted file mode 100644 index dfbeb91..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/applyMixins.js +++ /dev/null @@ -1,11 +0,0 @@ -export function applyMixins(derivedCtor, baseCtors) { - for (let i = 0, len = baseCtors.length; i < len; i++) { - const baseCtor = baseCtors[i]; - const propertyKeys = Object.getOwnPropertyNames(baseCtor.prototype); - for (let j = 0, len2 = propertyKeys.length; j < len2; j++) { - const name = propertyKeys[j]; - derivedCtor.prototype[name] = baseCtor.prototype[name]; - } - } -} -//# sourceMappingURL=applyMixins.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/applyMixins.js.map b/node_modules/rxjs/dist/esm/internal/util/applyMixins.js.map deleted file mode 100644 index 99a61fa..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/applyMixins.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"applyMixins.js","sourceRoot":"","sources":["../../../../src/internal/util/applyMixins.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,WAAW,CAAC,WAAgB,EAAE,SAAgB;IAC5D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;QACpD,MAAM,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;QAC9B,MAAM,YAAY,GAAG,MAAM,CAAC,mBAAmB,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACpE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;YACzD,MAAM,IAAI,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;YAC7B,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;SACxD;KACF;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/args.js b/node_modules/rxjs/dist/esm/internal/util/args.js deleted file mode 100644 index ead7fc5..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/args.js +++ /dev/null @@ -1,15 +0,0 @@ -import { isFunction } from './isFunction'; -import { isScheduler } from './isScheduler'; -function last(arr) { - return arr[arr.length - 1]; -} -export function popResultSelector(args) { - return isFunction(last(args)) ? args.pop() : undefined; -} -export function popScheduler(args) { - return isScheduler(last(args)) ? args.pop() : undefined; -} -export function popNumber(args, defaultValue) { - return typeof last(args) === 'number' ? args.pop() : defaultValue; -} -//# sourceMappingURL=args.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/args.js.map b/node_modules/rxjs/dist/esm/internal/util/args.js.map deleted file mode 100644 index 707c54c..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/args.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"args.js","sourceRoot":"","sources":["../../../../src/internal/util/args.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,SAAS,IAAI,CAAI,GAAQ;IACvB,OAAO,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,IAAW;IAC3C,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAW;IACtC,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,IAAW,EAAE,YAAoB;IACzD,OAAO,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAG,CAAC,CAAC,CAAC,YAAY,CAAC;AACrE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/argsArgArrayOrObject.js b/node_modules/rxjs/dist/esm/internal/util/argsArgArrayOrObject.js deleted file mode 100644 index 210cec7..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/argsArgArrayOrObject.js +++ /dev/null @@ -1,22 +0,0 @@ -const { isArray } = Array; -const { getPrototypeOf, prototype: objectProto, keys: getKeys } = Object; -export function argsArgArrayOrObject(args) { - if (args.length === 1) { - const first = args[0]; - if (isArray(first)) { - return { args: first, keys: null }; - } - if (isPOJO(first)) { - const keys = getKeys(first); - return { - args: keys.map((key) => first[key]), - keys, - }; - } - } - return { args: args, keys: null }; -} -function isPOJO(obj) { - return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto; -} -//# sourceMappingURL=argsArgArrayOrObject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/argsArgArrayOrObject.js.map b/node_modules/rxjs/dist/esm/internal/util/argsArgArrayOrObject.js.map deleted file mode 100644 index 76c7949..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/argsArgArrayOrObject.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"argsArgArrayOrObject.js","sourceRoot":"","sources":["../../../../src/internal/util/argsArgArrayOrObject.ts"],"names":[],"mappings":"AAAA,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AAC1B,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;AAQzE,MAAM,UAAU,oBAAoB,CAAiC,IAAuB;IAC1F,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACrB,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE;YAClB,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;SACpC;QACD,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE;YACjB,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;YAC5B,OAAO;gBACL,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACnC,IAAI;aACL,CAAC;SACH;KACF;IAED,OAAO,EAAE,IAAI,EAAE,IAAW,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAC3C,CAAC;AAED,SAAS,MAAM,CAAC,GAAQ;IACtB,OAAO,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,cAAc,CAAC,GAAG,CAAC,KAAK,WAAW,CAAC;AAC/E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/argsOrArgArray.js b/node_modules/rxjs/dist/esm/internal/util/argsOrArgArray.js deleted file mode 100644 index 7f4cccf..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/argsOrArgArray.js +++ /dev/null @@ -1,5 +0,0 @@ -const { isArray } = Array; -export function argsOrArgArray(args) { - return args.length === 1 && isArray(args[0]) ? args[0] : args; -} -//# sourceMappingURL=argsOrArgArray.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/argsOrArgArray.js.map b/node_modules/rxjs/dist/esm/internal/util/argsOrArgArray.js.map deleted file mode 100644 index 25584e9..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/argsOrArgArray.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"argsOrArgArray.js","sourceRoot":"","sources":["../../../../src/internal/util/argsOrArgArray.ts"],"names":[],"mappings":"AAAA,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AAM1B,MAAM,UAAU,cAAc,CAAI,IAAiB;IACjD,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,IAAY,CAAC;AACzE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/arrRemove.js b/node_modules/rxjs/dist/esm/internal/util/arrRemove.js deleted file mode 100644 index c1909a3..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/arrRemove.js +++ /dev/null @@ -1,7 +0,0 @@ -export function arrRemove(arr, item) { - if (arr) { - const index = arr.indexOf(item); - 0 <= index && arr.splice(index, 1); - } -} -//# sourceMappingURL=arrRemove.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/arrRemove.js.map b/node_modules/rxjs/dist/esm/internal/util/arrRemove.js.map deleted file mode 100644 index 0359146..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/arrRemove.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"arrRemove.js","sourceRoot":"","sources":["../../../../src/internal/util/arrRemove.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,SAAS,CAAI,GAA2B,EAAE,IAAO;IAC/D,IAAI,GAAG,EAAE;QACP,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC,IAAI,KAAK,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;KACpC;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/createErrorClass.js b/node_modules/rxjs/dist/esm/internal/util/createErrorClass.js deleted file mode 100644 index 1d2112e..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/createErrorClass.js +++ /dev/null @@ -1,11 +0,0 @@ -export function createErrorClass(createImpl) { - const _super = (instance) => { - Error.call(instance); - instance.stack = new Error().stack; - }; - const ctorFunc = createImpl(_super); - ctorFunc.prototype = Object.create(Error.prototype); - ctorFunc.prototype.constructor = ctorFunc; - return ctorFunc; -} -//# sourceMappingURL=createErrorClass.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/createErrorClass.js.map b/node_modules/rxjs/dist/esm/internal/util/createErrorClass.js.map deleted file mode 100644 index 23869e4..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/createErrorClass.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"createErrorClass.js","sourceRoot":"","sources":["../../../../src/internal/util/createErrorClass.ts"],"names":[],"mappings":"AASA,MAAM,UAAU,gBAAgB,CAAI,UAAgC;IAClE,MAAM,MAAM,GAAG,CAAC,QAAa,EAAE,EAAE;QAC/B,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrB,QAAQ,CAAC,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC,KAAK,CAAC;IACrC,CAAC,CAAC;IAEF,MAAM,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IACpC,QAAQ,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACpD,QAAQ,CAAC,SAAS,CAAC,WAAW,GAAG,QAAQ,CAAC;IAC1C,OAAO,QAAQ,CAAC;AAClB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/createObject.js b/node_modules/rxjs/dist/esm/internal/util/createObject.js deleted file mode 100644 index d61c5d2..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/createObject.js +++ /dev/null @@ -1,4 +0,0 @@ -export function createObject(keys, values) { - return keys.reduce((result, key, i) => ((result[key] = values[i]), result), {}); -} -//# sourceMappingURL=createObject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/createObject.js.map b/node_modules/rxjs/dist/esm/internal/util/createObject.js.map deleted file mode 100644 index a7d24c1..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/createObject.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"createObject.js","sourceRoot":"","sources":["../../../../src/internal/util/createObject.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,YAAY,CAAC,IAAc,EAAE,MAAa;IACxD,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,EAAS,CAAC,CAAC;AACzF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/errorContext.js b/node_modules/rxjs/dist/esm/internal/util/errorContext.js deleted file mode 100644 index e0a92d1..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/errorContext.js +++ /dev/null @@ -1,28 +0,0 @@ -import { config } from '../config'; -let context = null; -export function errorContext(cb) { - if (config.useDeprecatedSynchronousErrorHandling) { - const isRoot = !context; - if (isRoot) { - context = { errorThrown: false, error: null }; - } - cb(); - if (isRoot) { - const { errorThrown, error } = context; - context = null; - if (errorThrown) { - throw error; - } - } - } - else { - cb(); - } -} -export function captureError(err) { - if (config.useDeprecatedSynchronousErrorHandling && context) { - context.errorThrown = true; - context.error = err; - } -} -//# sourceMappingURL=errorContext.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/errorContext.js.map b/node_modules/rxjs/dist/esm/internal/util/errorContext.js.map deleted file mode 100644 index 4eb66de..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/errorContext.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"errorContext.js","sourceRoot":"","sources":["../../../../src/internal/util/errorContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,IAAI,OAAO,GAAgD,IAAI,CAAC;AAShE,MAAM,UAAU,YAAY,CAAC,EAAc;IACzC,IAAI,MAAM,CAAC,qCAAqC,EAAE;QAChD,MAAM,MAAM,GAAG,CAAC,OAAO,CAAC;QACxB,IAAI,MAAM,EAAE;YACV,OAAO,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;SAC/C;QACD,EAAE,EAAE,CAAC;QACL,IAAI,MAAM,EAAE;YACV,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,OAAQ,CAAC;YACxC,OAAO,GAAG,IAAI,CAAC;YACf,IAAI,WAAW,EAAE;gBACf,MAAM,KAAK,CAAC;aACb;SACF;KACF;SAAM;QAGL,EAAE,EAAE,CAAC;KACN;AACH,CAAC;AAMD,MAAM,UAAU,YAAY,CAAC,GAAQ;IACnC,IAAI,MAAM,CAAC,qCAAqC,IAAI,OAAO,EAAE;QAC3D,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;QAC3B,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC;KACrB;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/executeSchedule.js b/node_modules/rxjs/dist/esm/internal/util/executeSchedule.js deleted file mode 100644 index c823fcd..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/executeSchedule.js +++ /dev/null @@ -1,16 +0,0 @@ -export function executeSchedule(parentSubscription, scheduler, work, delay = 0, repeat = false) { - const scheduleSubscription = scheduler.schedule(function () { - work(); - if (repeat) { - parentSubscription.add(this.schedule(null, delay)); - } - else { - this.unsubscribe(); - } - }, delay); - parentSubscription.add(scheduleSubscription); - if (!repeat) { - return scheduleSubscription; - } -} -//# sourceMappingURL=executeSchedule.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/executeSchedule.js.map b/node_modules/rxjs/dist/esm/internal/util/executeSchedule.js.map deleted file mode 100644 index beaccd1..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/executeSchedule.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"executeSchedule.js","sourceRoot":"","sources":["../../../../src/internal/util/executeSchedule.ts"],"names":[],"mappings":"AAkBA,MAAM,UAAU,eAAe,CAC7B,kBAAgC,EAChC,SAAwB,EACxB,IAAgB,EAChB,KAAK,GAAG,CAAC,EACT,MAAM,GAAG,KAAK;IAEd,MAAM,oBAAoB,GAAG,SAAS,CAAC,QAAQ,CAAC;QAC9C,IAAI,EAAE,CAAC;QACP,IAAI,MAAM,EAAE;YACV,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;SACpD;aAAM;YACL,IAAI,CAAC,WAAW,EAAE,CAAC;SACpB;IACH,CAAC,EAAE,KAAK,CAAC,CAAC;IAEV,kBAAkB,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAE7C,IAAI,CAAC,MAAM,EAAE;QAKX,OAAO,oBAAoB,CAAC;KAC7B;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/identity.js b/node_modules/rxjs/dist/esm/internal/util/identity.js deleted file mode 100644 index 1084d77..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/identity.js +++ /dev/null @@ -1,4 +0,0 @@ -export function identity(x) { - return x; -} -//# sourceMappingURL=identity.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/identity.js.map b/node_modules/rxjs/dist/esm/internal/util/identity.js.map deleted file mode 100644 index 28a2f40..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/identity.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../../../src/internal/util/identity.ts"],"names":[],"mappings":"AA0CA,MAAM,UAAU,QAAQ,CAAI,CAAI;IAC9B,OAAO,CAAC,CAAC;AACX,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isArrayLike.js b/node_modules/rxjs/dist/esm/internal/util/isArrayLike.js deleted file mode 100644 index 393c8b8..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/isArrayLike.js +++ /dev/null @@ -1,2 +0,0 @@ -export const isArrayLike = ((x) => x && typeof x.length === 'number' && typeof x !== 'function'); -//# sourceMappingURL=isArrayLike.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isArrayLike.js.map b/node_modules/rxjs/dist/esm/internal/util/isArrayLike.js.map deleted file mode 100644 index 49b464d..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/isArrayLike.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isArrayLike.js","sourceRoot":"","sources":["../../../../src/internal/util/isArrayLike.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAI,CAAM,EAAqB,EAAE,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,CAAC,KAAK,UAAU,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isAsyncIterable.js b/node_modules/rxjs/dist/esm/internal/util/isAsyncIterable.js deleted file mode 100644 index 99da2eb..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/isAsyncIterable.js +++ /dev/null @@ -1,5 +0,0 @@ -import { isFunction } from './isFunction'; -export function isAsyncIterable(obj) { - return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]); -} -//# sourceMappingURL=isAsyncIterable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isAsyncIterable.js.map b/node_modules/rxjs/dist/esm/internal/util/isAsyncIterable.js.map deleted file mode 100644 index 2e736bd..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/isAsyncIterable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isAsyncIterable.js","sourceRoot":"","sources":["../../../../src/internal/util/isAsyncIterable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,UAAU,eAAe,CAAI,GAAQ;IACzC,OAAO,MAAM,CAAC,aAAa,IAAI,UAAU,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;AACzE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isDate.js b/node_modules/rxjs/dist/esm/internal/util/isDate.js deleted file mode 100644 index 74ddf32..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/isDate.js +++ /dev/null @@ -1,4 +0,0 @@ -export function isValidDate(value) { - return value instanceof Date && !isNaN(value); -} -//# sourceMappingURL=isDate.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isDate.js.map b/node_modules/rxjs/dist/esm/internal/util/isDate.js.map deleted file mode 100644 index 9e2ef13..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/isDate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isDate.js","sourceRoot":"","sources":["../../../../src/internal/util/isDate.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,WAAW,CAAC,KAAU;IACpC,OAAO,KAAK,YAAY,IAAI,IAAI,CAAC,KAAK,CAAC,KAAY,CAAC,CAAC;AACvD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isFunction.js b/node_modules/rxjs/dist/esm/internal/util/isFunction.js deleted file mode 100644 index 558eec7..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/isFunction.js +++ /dev/null @@ -1,4 +0,0 @@ -export function isFunction(value) { - return typeof value === 'function'; -} -//# sourceMappingURL=isFunction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isFunction.js.map b/node_modules/rxjs/dist/esm/internal/util/isFunction.js.map deleted file mode 100644 index 452906c..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/isFunction.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isFunction.js","sourceRoot":"","sources":["../../../../src/internal/util/isFunction.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,UAAU,CAAC,KAAU;IACnC,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isInteropObservable.js b/node_modules/rxjs/dist/esm/internal/util/isInteropObservable.js deleted file mode 100644 index da58ece..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/isInteropObservable.js +++ /dev/null @@ -1,6 +0,0 @@ -import { observable as Symbol_observable } from '../symbol/observable'; -import { isFunction } from './isFunction'; -export function isInteropObservable(input) { - return isFunction(input[Symbol_observable]); -} -//# sourceMappingURL=isInteropObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isInteropObservable.js.map b/node_modules/rxjs/dist/esm/internal/util/isInteropObservable.js.map deleted file mode 100644 index f5ddd94..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/isInteropObservable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isInteropObservable.js","sourceRoot":"","sources":["../../../../src/internal/util/isInteropObservable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,MAAM,UAAU,mBAAmB,CAAC,KAAU;IAC5C,OAAO,UAAU,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAC9C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isIterable.js b/node_modules/rxjs/dist/esm/internal/util/isIterable.js deleted file mode 100644 index 20c52a6..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/isIterable.js +++ /dev/null @@ -1,6 +0,0 @@ -import { iterator as Symbol_iterator } from '../symbol/iterator'; -import { isFunction } from './isFunction'; -export function isIterable(input) { - return isFunction(input === null || input === void 0 ? void 0 : input[Symbol_iterator]); -} -//# sourceMappingURL=isIterable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isIterable.js.map b/node_modules/rxjs/dist/esm/internal/util/isIterable.js.map deleted file mode 100644 index 3532931..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/isIterable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isIterable.js","sourceRoot":"","sources":["../../../../src/internal/util/isIterable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,MAAM,UAAU,UAAU,CAAC,KAAU;IACnC,OAAO,UAAU,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAG,eAAe,CAAC,CAAC,CAAC;AAC9C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isObservable.js b/node_modules/rxjs/dist/esm/internal/util/isObservable.js deleted file mode 100644 index cc149c6..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/isObservable.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Observable } from '../Observable'; -import { isFunction } from './isFunction'; -export function isObservable(obj) { - return !!obj && (obj instanceof Observable || (isFunction(obj.lift) && isFunction(obj.subscribe))); -} -//# sourceMappingURL=isObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isObservable.js.map b/node_modules/rxjs/dist/esm/internal/util/isObservable.js.map deleted file mode 100644 index b82f961..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/isObservable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isObservable.js","sourceRoot":"","sources":["../../../../src/internal/util/isObservable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM1C,MAAM,UAAU,YAAY,CAAC,GAAQ;IAGnC,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,YAAY,UAAU,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AACrG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isPromise.js b/node_modules/rxjs/dist/esm/internal/util/isPromise.js deleted file mode 100644 index 5114f67..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/isPromise.js +++ /dev/null @@ -1,5 +0,0 @@ -import { isFunction } from "./isFunction"; -export function isPromise(value) { - return isFunction(value === null || value === void 0 ? void 0 : value.then); -} -//# sourceMappingURL=isPromise.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isPromise.js.map b/node_modules/rxjs/dist/esm/internal/util/isPromise.js.map deleted file mode 100644 index bb81d60..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/isPromise.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isPromise.js","sourceRoot":"","sources":["../../../../src/internal/util/isPromise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM1C,MAAM,UAAU,SAAS,CAAC,KAAU;IAClC,OAAO,UAAU,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAC,CAAC;AACjC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isReadableStreamLike.js b/node_modules/rxjs/dist/esm/internal/util/isReadableStreamLike.js deleted file mode 100644 index bc75c6d..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/isReadableStreamLike.js +++ /dev/null @@ -1,23 +0,0 @@ -import { __asyncGenerator, __await } from "tslib"; -import { isFunction } from './isFunction'; -export function readableStreamLikeToAsyncGenerator(readableStream) { - return __asyncGenerator(this, arguments, function* readableStreamLikeToAsyncGenerator_1() { - const reader = readableStream.getReader(); - try { - while (true) { - const { value, done } = yield __await(reader.read()); - if (done) { - return yield __await(void 0); - } - yield yield __await(value); - } - } - finally { - reader.releaseLock(); - } - }); -} -export function isReadableStreamLike(obj) { - return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader); -} -//# sourceMappingURL=isReadableStreamLike.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isReadableStreamLike.js.map b/node_modules/rxjs/dist/esm/internal/util/isReadableStreamLike.js.map deleted file mode 100644 index 9635f70..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/isReadableStreamLike.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isReadableStreamLike.js","sourceRoot":"","sources":["../../../../src/internal/util/isReadableStreamLike.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,UAAiB,kCAAkC,CAAI,cAAqC;;QAChG,MAAM,MAAM,GAAG,cAAc,CAAC,SAAS,EAAE,CAAC;QAC1C,IAAI;YACF,OAAO,IAAI,EAAE;gBACX,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,cAAM,MAAM,CAAC,IAAI,EAAE,CAAA,CAAC;gBAC5C,IAAI,IAAI,EAAE;oBACR,6BAAO;iBACR;gBACD,oBAAM,KAAM,CAAA,CAAC;aACd;SACF;gBAAS;YACR,MAAM,CAAC,WAAW,EAAE,CAAC;SACtB;IACH,CAAC;CAAA;AAED,MAAM,UAAU,oBAAoB,CAAI,GAAQ;IAG9C,OAAO,UAAU,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,SAAS,CAAC,CAAC;AACpC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isScheduler.js b/node_modules/rxjs/dist/esm/internal/util/isScheduler.js deleted file mode 100644 index 05b4f3f..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/isScheduler.js +++ /dev/null @@ -1,5 +0,0 @@ -import { isFunction } from './isFunction'; -export function isScheduler(value) { - return value && isFunction(value.schedule); -} -//# sourceMappingURL=isScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/isScheduler.js.map b/node_modules/rxjs/dist/esm/internal/util/isScheduler.js.map deleted file mode 100644 index 33c0d90..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/isScheduler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isScheduler.js","sourceRoot":"","sources":["../../../../src/internal/util/isScheduler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,UAAU,WAAW,CAAC,KAAU;IACpC,OAAO,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC7C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/lift.js b/node_modules/rxjs/dist/esm/internal/util/lift.js deleted file mode 100644 index 280b95f..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/lift.js +++ /dev/null @@ -1,20 +0,0 @@ -import { isFunction } from './isFunction'; -export function hasLift(source) { - return isFunction(source === null || source === void 0 ? void 0 : source.lift); -} -export function operate(init) { - return (source) => { - if (hasLift(source)) { - return source.lift(function (liftedSource) { - try { - return init(liftedSource, this); - } - catch (err) { - this.error(err); - } - }); - } - throw new TypeError('Unable to lift unknown Observable type'); - }; -} -//# sourceMappingURL=lift.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/lift.js.map b/node_modules/rxjs/dist/esm/internal/util/lift.js.map deleted file mode 100644 index a4a2869..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/lift.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"lift.js","sourceRoot":"","sources":["../../../../src/internal/util/lift.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1C,MAAM,UAAU,OAAO,CAAC,MAAW;IACjC,OAAO,UAAU,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAC,CAAC;AAClC,CAAC;AAMD,MAAM,UAAU,OAAO,CACrB,IAAqF;IAErF,OAAO,CAAC,MAAqB,EAAE,EAAE;QAC/B,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE;YACnB,OAAO,MAAM,CAAC,IAAI,CAAC,UAA+B,YAA2B;gBAC3E,IAAI;oBACF,OAAO,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;iBACjC;gBAAC,OAAO,GAAG,EAAE;oBACZ,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACjB;YACH,CAAC,CAAC,CAAC;SACJ;QACD,MAAM,IAAI,SAAS,CAAC,wCAAwC,CAAC,CAAC;IAChE,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/mapOneOrManyArgs.js b/node_modules/rxjs/dist/esm/internal/util/mapOneOrManyArgs.js deleted file mode 100644 index faf7dc7..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/mapOneOrManyArgs.js +++ /dev/null @@ -1,9 +0,0 @@ -import { map } from "../operators/map"; -const { isArray } = Array; -function callOrApply(fn, args) { - return isArray(args) ? fn(...args) : fn(args); -} -export function mapOneOrManyArgs(fn) { - return map(args => callOrApply(fn, args)); -} -//# sourceMappingURL=mapOneOrManyArgs.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/mapOneOrManyArgs.js.map b/node_modules/rxjs/dist/esm/internal/util/mapOneOrManyArgs.js.map deleted file mode 100644 index be9763f..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/mapOneOrManyArgs.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mapOneOrManyArgs.js","sourceRoot":"","sources":["../../../../src/internal/util/mapOneOrManyArgs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEvC,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AAE1B,SAAS,WAAW,CAAO,EAA2B,EAAE,IAAW;IAC/D,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;AAClD,CAAC;AAMD,MAAM,UAAU,gBAAgB,CAAO,EAA2B;IAC9D,OAAO,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAA;AAC7C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/noop.js b/node_modules/rxjs/dist/esm/internal/util/noop.js deleted file mode 100644 index 1a78a54..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/noop.js +++ /dev/null @@ -1,2 +0,0 @@ -export function noop() { } -//# sourceMappingURL=noop.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/noop.js.map b/node_modules/rxjs/dist/esm/internal/util/noop.js.map deleted file mode 100644 index 05e521a..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/noop.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"noop.js","sourceRoot":"","sources":["../../../../src/internal/util/noop.ts"],"names":[],"mappings":"AACA,MAAM,UAAU,IAAI,KAAK,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/not.js b/node_modules/rxjs/dist/esm/internal/util/not.js deleted file mode 100644 index a388b0b..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/not.js +++ /dev/null @@ -1,4 +0,0 @@ -export function not(pred, thisArg) { - return (value, index) => !pred.call(thisArg, value, index); -} -//# sourceMappingURL=not.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/not.js.map b/node_modules/rxjs/dist/esm/internal/util/not.js.map deleted file mode 100644 index 7062664..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/not.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"not.js","sourceRoot":"","sources":["../../../../src/internal/util/not.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,GAAG,CAAI,IAA0C,EAAE,OAAY;IAC7E,OAAO,CAAC,KAAQ,EAAE,KAAa,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AACxE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/pipe.js b/node_modules/rxjs/dist/esm/internal/util/pipe.js deleted file mode 100644 index fb1cccf..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/pipe.js +++ /dev/null @@ -1,16 +0,0 @@ -import { identity } from './identity'; -export function pipe(...fns) { - return pipeFromArray(fns); -} -export function pipeFromArray(fns) { - if (fns.length === 0) { - return identity; - } - if (fns.length === 1) { - return fns[0]; - } - return function piped(input) { - return fns.reduce((prev, fn) => fn(prev), input); - }; -} -//# sourceMappingURL=pipe.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/pipe.js.map b/node_modules/rxjs/dist/esm/internal/util/pipe.js.map deleted file mode 100644 index c910717..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/pipe.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pipe.js","sourceRoot":"","sources":["../../../../src/internal/util/pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AA6EtC,MAAM,UAAU,IAAI,CAAC,GAAG,GAAmC;IACzD,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC;AAC5B,CAAC;AAGD,MAAM,UAAU,aAAa,CAAO,GAA+B;IACjE,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;QACpB,OAAO,QAAmC,CAAC;KAC5C;IAED,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;QACpB,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;KACf;IAED,OAAO,SAAS,KAAK,CAAC,KAAQ;QAC5B,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,IAAS,EAAE,EAAuB,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,KAAY,CAAC,CAAC;IACpF,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js b/node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js deleted file mode 100644 index 9ce5f56..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js +++ /dev/null @@ -1,14 +0,0 @@ -import { config } from '../config'; -import { timeoutProvider } from '../scheduler/timeoutProvider'; -export function reportUnhandledError(err) { - timeoutProvider.setTimeout(() => { - const { onUnhandledError } = config; - if (onUnhandledError) { - onUnhandledError(err); - } - else { - throw err; - } - }); -} -//# sourceMappingURL=reportUnhandledError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js.map b/node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js.map deleted file mode 100644 index f76d2eb..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"reportUnhandledError.js","sourceRoot":"","sources":["../../../../src/internal/util/reportUnhandledError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAW/D,MAAM,UAAU,oBAAoB,CAAC,GAAQ;IAC3C,eAAe,CAAC,UAAU,CAAC,GAAG,EAAE;QAC9B,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAAC;QACpC,IAAI,gBAAgB,EAAE;YAEpB,gBAAgB,CAAC,GAAG,CAAC,CAAC;SACvB;aAAM;YAEL,MAAM,GAAG,CAAC;SACX;IACH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/subscribeToArray.js b/node_modules/rxjs/dist/esm/internal/util/subscribeToArray.js deleted file mode 100644 index 2693661..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/subscribeToArray.js +++ /dev/null @@ -1,7 +0,0 @@ -export const subscribeToArray = (array) => (subscriber) => { - for (let i = 0, len = array.length; i < len && !subscriber.closed; i++) { - subscriber.next(array[i]); - } - subscriber.complete(); -}; -//# sourceMappingURL=subscribeToArray.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/subscribeToArray.js.map b/node_modules/rxjs/dist/esm/internal/util/subscribeToArray.js.map deleted file mode 100644 index cb13aea..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/subscribeToArray.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"subscribeToArray.js","sourceRoot":"","sources":["../../../../src/internal/util/subscribeToArray.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAI,KAAmB,EAAE,EAAE,CAAC,CAAC,UAAyB,EAAE,EAAE;IACxF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KAC3B;IACD,UAAU,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/throwUnobservableError.js b/node_modules/rxjs/dist/esm/internal/util/throwUnobservableError.js deleted file mode 100644 index dedd667..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/throwUnobservableError.js +++ /dev/null @@ -1,4 +0,0 @@ -export function createInvalidObservableTypeError(input) { - return new TypeError(`You provided ${input !== null && typeof input === 'object' ? 'an invalid object' : `'${input}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`); -} -//# sourceMappingURL=throwUnobservableError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/throwUnobservableError.js.map b/node_modules/rxjs/dist/esm/internal/util/throwUnobservableError.js.map deleted file mode 100644 index 24684b4..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/throwUnobservableError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"throwUnobservableError.js","sourceRoot":"","sources":["../../../../src/internal/util/throwUnobservableError.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,gCAAgC,CAAC,KAAU;IAEzD,OAAO,IAAI,SAAS,CAClB,gBACE,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,IAAI,KAAK,GAC/E,0HAA0H,CAC3H,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/workarounds.js b/node_modules/rxjs/dist/esm/internal/util/workarounds.js deleted file mode 100644 index 380c6e7..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/workarounds.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=workarounds.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/internal/util/workarounds.js.map b/node_modules/rxjs/dist/esm/internal/util/workarounds.js.map deleted file mode 100644 index 75e7271..0000000 --- a/node_modules/rxjs/dist/esm/internal/util/workarounds.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workarounds.js","sourceRoot":"","sources":["../../../../src/internal/util/workarounds.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/operators/index.js b/node_modules/rxjs/dist/esm/operators/index.js deleted file mode 100644 index 79bbd88..0000000 --- a/node_modules/rxjs/dist/esm/operators/index.js +++ /dev/null @@ -1,114 +0,0 @@ -export { audit } from '../internal/operators/audit'; -export { auditTime } from '../internal/operators/auditTime'; -export { buffer } from '../internal/operators/buffer'; -export { bufferCount } from '../internal/operators/bufferCount'; -export { bufferTime } from '../internal/operators/bufferTime'; -export { bufferToggle } from '../internal/operators/bufferToggle'; -export { bufferWhen } from '../internal/operators/bufferWhen'; -export { catchError } from '../internal/operators/catchError'; -export { combineAll } from '../internal/operators/combineAll'; -export { combineLatestAll } from '../internal/operators/combineLatestAll'; -export { combineLatest } from '../internal/operators/combineLatest'; -export { combineLatestWith } from '../internal/operators/combineLatestWith'; -export { concat } from '../internal/operators/concat'; -export { concatAll } from '../internal/operators/concatAll'; -export { concatMap } from '../internal/operators/concatMap'; -export { concatMapTo } from '../internal/operators/concatMapTo'; -export { concatWith } from '../internal/operators/concatWith'; -export { connect } from '../internal/operators/connect'; -export { count } from '../internal/operators/count'; -export { debounce } from '../internal/operators/debounce'; -export { debounceTime } from '../internal/operators/debounceTime'; -export { defaultIfEmpty } from '../internal/operators/defaultIfEmpty'; -export { delay } from '../internal/operators/delay'; -export { delayWhen } from '../internal/operators/delayWhen'; -export { dematerialize } from '../internal/operators/dematerialize'; -export { distinct } from '../internal/operators/distinct'; -export { distinctUntilChanged } from '../internal/operators/distinctUntilChanged'; -export { distinctUntilKeyChanged } from '../internal/operators/distinctUntilKeyChanged'; -export { elementAt } from '../internal/operators/elementAt'; -export { endWith } from '../internal/operators/endWith'; -export { every } from '../internal/operators/every'; -export { exhaust } from '../internal/operators/exhaust'; -export { exhaustAll } from '../internal/operators/exhaustAll'; -export { exhaustMap } from '../internal/operators/exhaustMap'; -export { expand } from '../internal/operators/expand'; -export { filter } from '../internal/operators/filter'; -export { finalize } from '../internal/operators/finalize'; -export { find } from '../internal/operators/find'; -export { findIndex } from '../internal/operators/findIndex'; -export { first } from '../internal/operators/first'; -export { groupBy } from '../internal/operators/groupBy'; -export { ignoreElements } from '../internal/operators/ignoreElements'; -export { isEmpty } from '../internal/operators/isEmpty'; -export { last } from '../internal/operators/last'; -export { map } from '../internal/operators/map'; -export { mapTo } from '../internal/operators/mapTo'; -export { materialize } from '../internal/operators/materialize'; -export { max } from '../internal/operators/max'; -export { merge } from '../internal/operators/merge'; -export { mergeAll } from '../internal/operators/mergeAll'; -export { flatMap } from '../internal/operators/flatMap'; -export { mergeMap } from '../internal/operators/mergeMap'; -export { mergeMapTo } from '../internal/operators/mergeMapTo'; -export { mergeScan } from '../internal/operators/mergeScan'; -export { mergeWith } from '../internal/operators/mergeWith'; -export { min } from '../internal/operators/min'; -export { multicast } from '../internal/operators/multicast'; -export { observeOn } from '../internal/operators/observeOn'; -export { onErrorResumeNext } from '../internal/operators/onErrorResumeNextWith'; -export { pairwise } from '../internal/operators/pairwise'; -export { partition } from '../internal/operators/partition'; -export { pluck } from '../internal/operators/pluck'; -export { publish } from '../internal/operators/publish'; -export { publishBehavior } from '../internal/operators/publishBehavior'; -export { publishLast } from '../internal/operators/publishLast'; -export { publishReplay } from '../internal/operators/publishReplay'; -export { race } from '../internal/operators/race'; -export { raceWith } from '../internal/operators/raceWith'; -export { reduce } from '../internal/operators/reduce'; -export { repeat } from '../internal/operators/repeat'; -export { repeatWhen } from '../internal/operators/repeatWhen'; -export { retry } from '../internal/operators/retry'; -export { retryWhen } from '../internal/operators/retryWhen'; -export { refCount } from '../internal/operators/refCount'; -export { sample } from '../internal/operators/sample'; -export { sampleTime } from '../internal/operators/sampleTime'; -export { scan } from '../internal/operators/scan'; -export { sequenceEqual } from '../internal/operators/sequenceEqual'; -export { share } from '../internal/operators/share'; -export { shareReplay } from '../internal/operators/shareReplay'; -export { single } from '../internal/operators/single'; -export { skip } from '../internal/operators/skip'; -export { skipLast } from '../internal/operators/skipLast'; -export { skipUntil } from '../internal/operators/skipUntil'; -export { skipWhile } from '../internal/operators/skipWhile'; -export { startWith } from '../internal/operators/startWith'; -export { subscribeOn } from '../internal/operators/subscribeOn'; -export { switchAll } from '../internal/operators/switchAll'; -export { switchMap } from '../internal/operators/switchMap'; -export { switchMapTo } from '../internal/operators/switchMapTo'; -export { switchScan } from '../internal/operators/switchScan'; -export { take } from '../internal/operators/take'; -export { takeLast } from '../internal/operators/takeLast'; -export { takeUntil } from '../internal/operators/takeUntil'; -export { takeWhile } from '../internal/operators/takeWhile'; -export { tap } from '../internal/operators/tap'; -export { throttle } from '../internal/operators/throttle'; -export { throttleTime } from '../internal/operators/throttleTime'; -export { throwIfEmpty } from '../internal/operators/throwIfEmpty'; -export { timeInterval } from '../internal/operators/timeInterval'; -export { timeout } from '../internal/operators/timeout'; -export { timeoutWith } from '../internal/operators/timeoutWith'; -export { timestamp } from '../internal/operators/timestamp'; -export { toArray } from '../internal/operators/toArray'; -export { window } from '../internal/operators/window'; -export { windowCount } from '../internal/operators/windowCount'; -export { windowTime } from '../internal/operators/windowTime'; -export { windowToggle } from '../internal/operators/windowToggle'; -export { windowWhen } from '../internal/operators/windowWhen'; -export { withLatestFrom } from '../internal/operators/withLatestFrom'; -export { zip } from '../internal/operators/zip'; -export { zipAll } from '../internal/operators/zipAll'; -export { zipWith } from '../internal/operators/zipWith'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/operators/index.js.map b/node_modules/rxjs/dist/esm/operators/index.js.map deleted file mode 100644 index 9028717..0000000 --- a/node_modules/rxjs/dist/esm/operators/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/operators/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAiB,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAkD,MAAM,+BAA+B,CAAC;AACxG,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAgB,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAe,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,KAAK,EAAe,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAqB,MAAM,mCAAmC,CAAC;AACnF,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAe,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAkB,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,OAAO,EAA8B,MAAM,+BAA+B,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/testing/index.js b/node_modules/rxjs/dist/esm/testing/index.js deleted file mode 100644 index f0f7b53..0000000 --- a/node_modules/rxjs/dist/esm/testing/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export { TestScheduler } from '../internal/testing/TestScheduler'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/testing/index.js.map b/node_modules/rxjs/dist/esm/testing/index.js.map deleted file mode 100644 index bc7fd0d..0000000 --- a/node_modules/rxjs/dist/esm/testing/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAc,MAAM,mCAAmC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/webSocket/index.js b/node_modules/rxjs/dist/esm/webSocket/index.js deleted file mode 100644 index a4bb4ea..0000000 --- a/node_modules/rxjs/dist/esm/webSocket/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export { webSocket as webSocket } from '../internal/observable/dom/webSocket'; -export { WebSocketSubject } from '../internal/observable/dom/WebSocketSubject'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm/webSocket/index.js.map b/node_modules/rxjs/dist/esm/webSocket/index.js.map deleted file mode 100644 index 0912982..0000000 --- a/node_modules/rxjs/dist/esm/webSocket/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/webSocket/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAA0B,MAAM,6CAA6C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/ajax/index.js b/node_modules/rxjs/dist/esm5/ajax/index.js deleted file mode 100644 index e387b2b..0000000 --- a/node_modules/rxjs/dist/esm5/ajax/index.js +++ /dev/null @@ -1,4 +0,0 @@ -export { ajax } from '../internal/ajax/ajax'; -export { AjaxError, AjaxTimeoutError } from '../internal/ajax/errors'; -export { AjaxResponse } from '../internal/ajax/AjaxResponse'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/ajax/index.js.map b/node_modules/rxjs/dist/esm5/ajax/index.js.map deleted file mode 100644 index d45ff17..0000000 --- a/node_modules/rxjs/dist/esm5/ajax/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ajax/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/fetch/index.js b/node_modules/rxjs/dist/esm5/fetch/index.js deleted file mode 100644 index e851987..0000000 --- a/node_modules/rxjs/dist/esm5/fetch/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export { fromFetch } from '../internal/observable/dom/fetch'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/fetch/index.js.map b/node_modules/rxjs/dist/esm5/fetch/index.js.map deleted file mode 100644 index 75fe99b..0000000 --- a/node_modules/rxjs/dist/esm5/fetch/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/fetch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/index.js b/node_modules/rxjs/dist/esm5/index.js deleted file mode 100644 index cda695d..0000000 --- a/node_modules/rxjs/dist/esm5/index.js +++ /dev/null @@ -1,169 +0,0 @@ -export { Observable } from './internal/Observable'; -export { ConnectableObservable } from './internal/observable/ConnectableObservable'; -export { observable } from './internal/symbol/observable'; -export { animationFrames } from './internal/observable/dom/animationFrames'; -export { Subject } from './internal/Subject'; -export { BehaviorSubject } from './internal/BehaviorSubject'; -export { ReplaySubject } from './internal/ReplaySubject'; -export { AsyncSubject } from './internal/AsyncSubject'; -export { asap, asapScheduler } from './internal/scheduler/asap'; -export { async, asyncScheduler } from './internal/scheduler/async'; -export { queue, queueScheduler } from './internal/scheduler/queue'; -export { animationFrame, animationFrameScheduler } from './internal/scheduler/animationFrame'; -export { VirtualTimeScheduler, VirtualAction } from './internal/scheduler/VirtualTimeScheduler'; -export { Scheduler } from './internal/Scheduler'; -export { Subscription } from './internal/Subscription'; -export { Subscriber } from './internal/Subscriber'; -export { Notification, NotificationKind } from './internal/Notification'; -export { pipe } from './internal/util/pipe'; -export { noop } from './internal/util/noop'; -export { identity } from './internal/util/identity'; -export { isObservable } from './internal/util/isObservable'; -export { lastValueFrom } from './internal/lastValueFrom'; -export { firstValueFrom } from './internal/firstValueFrom'; -export { ArgumentOutOfRangeError } from './internal/util/ArgumentOutOfRangeError'; -export { EmptyError } from './internal/util/EmptyError'; -export { NotFoundError } from './internal/util/NotFoundError'; -export { ObjectUnsubscribedError } from './internal/util/ObjectUnsubscribedError'; -export { SequenceError } from './internal/util/SequenceError'; -export { TimeoutError } from './internal/operators/timeout'; -export { UnsubscriptionError } from './internal/util/UnsubscriptionError'; -export { bindCallback } from './internal/observable/bindCallback'; -export { bindNodeCallback } from './internal/observable/bindNodeCallback'; -export { combineLatest } from './internal/observable/combineLatest'; -export { concat } from './internal/observable/concat'; -export { connectable } from './internal/observable/connectable'; -export { defer } from './internal/observable/defer'; -export { empty } from './internal/observable/empty'; -export { forkJoin } from './internal/observable/forkJoin'; -export { from } from './internal/observable/from'; -export { fromEvent } from './internal/observable/fromEvent'; -export { fromEventPattern } from './internal/observable/fromEventPattern'; -export { generate } from './internal/observable/generate'; -export { iif } from './internal/observable/iif'; -export { interval } from './internal/observable/interval'; -export { merge } from './internal/observable/merge'; -export { never } from './internal/observable/never'; -export { of } from './internal/observable/of'; -export { onErrorResumeNext } from './internal/observable/onErrorResumeNext'; -export { pairs } from './internal/observable/pairs'; -export { partition } from './internal/observable/partition'; -export { race } from './internal/observable/race'; -export { range } from './internal/observable/range'; -export { throwError } from './internal/observable/throwError'; -export { timer } from './internal/observable/timer'; -export { using } from './internal/observable/using'; -export { zip } from './internal/observable/zip'; -export { scheduled } from './internal/scheduled/scheduled'; -export { EMPTY } from './internal/observable/empty'; -export { NEVER } from './internal/observable/never'; -export * from './internal/types'; -export { config } from './internal/config'; -export { audit } from './internal/operators/audit'; -export { auditTime } from './internal/operators/auditTime'; -export { buffer } from './internal/operators/buffer'; -export { bufferCount } from './internal/operators/bufferCount'; -export { bufferTime } from './internal/operators/bufferTime'; -export { bufferToggle } from './internal/operators/bufferToggle'; -export { bufferWhen } from './internal/operators/bufferWhen'; -export { catchError } from './internal/operators/catchError'; -export { combineAll } from './internal/operators/combineAll'; -export { combineLatestAll } from './internal/operators/combineLatestAll'; -export { combineLatestWith } from './internal/operators/combineLatestWith'; -export { concatAll } from './internal/operators/concatAll'; -export { concatMap } from './internal/operators/concatMap'; -export { concatMapTo } from './internal/operators/concatMapTo'; -export { concatWith } from './internal/operators/concatWith'; -export { connect } from './internal/operators/connect'; -export { count } from './internal/operators/count'; -export { debounce } from './internal/operators/debounce'; -export { debounceTime } from './internal/operators/debounceTime'; -export { defaultIfEmpty } from './internal/operators/defaultIfEmpty'; -export { delay } from './internal/operators/delay'; -export { delayWhen } from './internal/operators/delayWhen'; -export { dematerialize } from './internal/operators/dematerialize'; -export { distinct } from './internal/operators/distinct'; -export { distinctUntilChanged } from './internal/operators/distinctUntilChanged'; -export { distinctUntilKeyChanged } from './internal/operators/distinctUntilKeyChanged'; -export { elementAt } from './internal/operators/elementAt'; -export { endWith } from './internal/operators/endWith'; -export { every } from './internal/operators/every'; -export { exhaust } from './internal/operators/exhaust'; -export { exhaustAll } from './internal/operators/exhaustAll'; -export { exhaustMap } from './internal/operators/exhaustMap'; -export { expand } from './internal/operators/expand'; -export { filter } from './internal/operators/filter'; -export { finalize } from './internal/operators/finalize'; -export { find } from './internal/operators/find'; -export { findIndex } from './internal/operators/findIndex'; -export { first } from './internal/operators/first'; -export { groupBy } from './internal/operators/groupBy'; -export { ignoreElements } from './internal/operators/ignoreElements'; -export { isEmpty } from './internal/operators/isEmpty'; -export { last } from './internal/operators/last'; -export { map } from './internal/operators/map'; -export { mapTo } from './internal/operators/mapTo'; -export { materialize } from './internal/operators/materialize'; -export { max } from './internal/operators/max'; -export { mergeAll } from './internal/operators/mergeAll'; -export { flatMap } from './internal/operators/flatMap'; -export { mergeMap } from './internal/operators/mergeMap'; -export { mergeMapTo } from './internal/operators/mergeMapTo'; -export { mergeScan } from './internal/operators/mergeScan'; -export { mergeWith } from './internal/operators/mergeWith'; -export { min } from './internal/operators/min'; -export { multicast } from './internal/operators/multicast'; -export { observeOn } from './internal/operators/observeOn'; -export { onErrorResumeNextWith } from './internal/operators/onErrorResumeNextWith'; -export { pairwise } from './internal/operators/pairwise'; -export { pluck } from './internal/operators/pluck'; -export { publish } from './internal/operators/publish'; -export { publishBehavior } from './internal/operators/publishBehavior'; -export { publishLast } from './internal/operators/publishLast'; -export { publishReplay } from './internal/operators/publishReplay'; -export { raceWith } from './internal/operators/raceWith'; -export { reduce } from './internal/operators/reduce'; -export { repeat } from './internal/operators/repeat'; -export { repeatWhen } from './internal/operators/repeatWhen'; -export { retry } from './internal/operators/retry'; -export { retryWhen } from './internal/operators/retryWhen'; -export { refCount } from './internal/operators/refCount'; -export { sample } from './internal/operators/sample'; -export { sampleTime } from './internal/operators/sampleTime'; -export { scan } from './internal/operators/scan'; -export { sequenceEqual } from './internal/operators/sequenceEqual'; -export { share } from './internal/operators/share'; -export { shareReplay } from './internal/operators/shareReplay'; -export { single } from './internal/operators/single'; -export { skip } from './internal/operators/skip'; -export { skipLast } from './internal/operators/skipLast'; -export { skipUntil } from './internal/operators/skipUntil'; -export { skipWhile } from './internal/operators/skipWhile'; -export { startWith } from './internal/operators/startWith'; -export { subscribeOn } from './internal/operators/subscribeOn'; -export { switchAll } from './internal/operators/switchAll'; -export { switchMap } from './internal/operators/switchMap'; -export { switchMapTo } from './internal/operators/switchMapTo'; -export { switchScan } from './internal/operators/switchScan'; -export { take } from './internal/operators/take'; -export { takeLast } from './internal/operators/takeLast'; -export { takeUntil } from './internal/operators/takeUntil'; -export { takeWhile } from './internal/operators/takeWhile'; -export { tap } from './internal/operators/tap'; -export { throttle } from './internal/operators/throttle'; -export { throttleTime } from './internal/operators/throttleTime'; -export { throwIfEmpty } from './internal/operators/throwIfEmpty'; -export { timeInterval } from './internal/operators/timeInterval'; -export { timeout } from './internal/operators/timeout'; -export { timeoutWith } from './internal/operators/timeoutWith'; -export { timestamp } from './internal/operators/timestamp'; -export { toArray } from './internal/operators/toArray'; -export { window } from './internal/operators/window'; -export { windowCount } from './internal/operators/windowCount'; -export { windowTime } from './internal/operators/windowTime'; -export { windowToggle } from './internal/operators/windowToggle'; -export { windowWhen } from './internal/operators/windowWhen'; -export { withLatestFrom } from './internal/operators/withLatestFrom'; -export { zipAll } from './internal/operators/zipAll'; -export { zipWith } from './internal/operators/zipWith'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/index.js.map b/node_modules/rxjs/dist/esm5/index.js.map deleted file mode 100644 index c8082be..0000000 --- a/node_modules/rxjs/dist/esm5/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAGpF,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAG5E,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAChG,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGnD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGzE,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAG1E,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAG3D,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAGpD,cAAc,kBAAkB,CAAC;AAGjC,OAAO,EAAE,MAAM,EAAgB,MAAM,mBAAmB,CAAC;AAGzD,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAiB,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,OAAO,EAAkD,MAAM,8BAA8B,CAAC;AACvG,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,MAAM,EAAgB,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAe,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,KAAK,EAAe,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAqB,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAe,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAkB,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,OAAO,EAA8B,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/AnyCatcher.js b/node_modules/rxjs/dist/esm5/internal/AnyCatcher.js deleted file mode 100644 index 4bc63fd..0000000 --- a/node_modules/rxjs/dist/esm5/internal/AnyCatcher.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=AnyCatcher.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/AnyCatcher.js.map b/node_modules/rxjs/dist/esm5/internal/AnyCatcher.js.map deleted file mode 100644 index 83e9e18..0000000 --- a/node_modules/rxjs/dist/esm5/internal/AnyCatcher.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AnyCatcher.js","sourceRoot":"","sources":["../../../src/internal/AnyCatcher.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/AsyncSubject.js b/node_modules/rxjs/dist/esm5/internal/AsyncSubject.js deleted file mode 100644 index 0513c21..0000000 --- a/node_modules/rxjs/dist/esm5/internal/AsyncSubject.js +++ /dev/null @@ -1,39 +0,0 @@ -import { __extends } from "tslib"; -import { Subject } from './Subject'; -var AsyncSubject = (function (_super) { - __extends(AsyncSubject, _super); - function AsyncSubject() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._value = null; - _this._hasValue = false; - _this._isComplete = false; - return _this; - } - AsyncSubject.prototype._checkFinalizedStatuses = function (subscriber) { - var _a = this, hasError = _a.hasError, _hasValue = _a._hasValue, _value = _a._value, thrownError = _a.thrownError, isStopped = _a.isStopped, _isComplete = _a._isComplete; - if (hasError) { - subscriber.error(thrownError); - } - else if (isStopped || _isComplete) { - _hasValue && subscriber.next(_value); - subscriber.complete(); - } - }; - AsyncSubject.prototype.next = function (value) { - if (!this.isStopped) { - this._value = value; - this._hasValue = true; - } - }; - AsyncSubject.prototype.complete = function () { - var _a = this, _hasValue = _a._hasValue, _value = _a._value, _isComplete = _a._isComplete; - if (!_isComplete) { - this._isComplete = true; - _hasValue && _super.prototype.next.call(this, _value); - _super.prototype.complete.call(this); - } - }; - return AsyncSubject; -}(Subject)); -export { AsyncSubject }; -//# sourceMappingURL=AsyncSubject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/AsyncSubject.js.map b/node_modules/rxjs/dist/esm5/internal/AsyncSubject.js.map deleted file mode 100644 index f154dae..0000000 --- a/node_modules/rxjs/dist/esm5/internal/AsyncSubject.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AsyncSubject.js","sourceRoot":"","sources":["../../../src/internal/AsyncSubject.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC;IAAqC,gCAAU;IAA/C;QAAA,qEA+BC;QA9BS,YAAM,GAAa,IAAI,CAAC;QACxB,eAAS,GAAG,KAAK,CAAC;QAClB,iBAAW,GAAG,KAAK,CAAC;;IA4B9B,CAAC;IAzBW,8CAAuB,GAAjC,UAAkC,UAAyB;QACnD,IAAA,KAAuE,IAAI,EAAzE,QAAQ,cAAA,EAAE,SAAS,eAAA,EAAE,MAAM,YAAA,EAAE,WAAW,iBAAA,EAAE,SAAS,eAAA,EAAE,WAAW,iBAAS,CAAC;QAClF,IAAI,QAAQ,EAAE;YACZ,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;SAC/B;aAAM,IAAI,SAAS,IAAI,WAAW,EAAE;YACnC,SAAS,IAAI,UAAU,CAAC,IAAI,CAAC,MAAO,CAAC,CAAC;YACtC,UAAU,CAAC,QAAQ,EAAE,CAAC;SACvB;IACH,CAAC;IAED,2BAAI,GAAJ,UAAK,KAAQ;QACX,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACnB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;SACvB;IACH,CAAC;IAED,+BAAQ,GAAR;QACQ,IAAA,KAAqC,IAAI,EAAvC,SAAS,eAAA,EAAE,MAAM,YAAA,EAAE,WAAW,iBAAS,CAAC;QAChD,IAAI,CAAC,WAAW,EAAE;YAChB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;YACxB,SAAS,IAAI,iBAAM,IAAI,YAAC,MAAO,CAAC,CAAC;YACjC,iBAAM,QAAQ,WAAE,CAAC;SAClB;IACH,CAAC;IACH,mBAAC;AAAD,CAAC,AA/BD,CAAqC,OAAO,GA+B3C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js b/node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js deleted file mode 100644 index b74e7e2..0000000 --- a/node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js +++ /dev/null @@ -1,36 +0,0 @@ -import { __extends } from "tslib"; -import { Subject } from './Subject'; -var BehaviorSubject = (function (_super) { - __extends(BehaviorSubject, _super); - function BehaviorSubject(_value) { - var _this = _super.call(this) || this; - _this._value = _value; - return _this; - } - Object.defineProperty(BehaviorSubject.prototype, "value", { - get: function () { - return this.getValue(); - }, - enumerable: false, - configurable: true - }); - BehaviorSubject.prototype._subscribe = function (subscriber) { - var subscription = _super.prototype._subscribe.call(this, subscriber); - !subscription.closed && subscriber.next(this._value); - return subscription; - }; - BehaviorSubject.prototype.getValue = function () { - var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, _value = _a._value; - if (hasError) { - throw thrownError; - } - this._throwIfClosed(); - return _value; - }; - BehaviorSubject.prototype.next = function (value) { - _super.prototype.next.call(this, (this._value = value)); - }; - return BehaviorSubject; -}(Subject)); -export { BehaviorSubject }; -//# sourceMappingURL=BehaviorSubject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js.map b/node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js.map deleted file mode 100644 index dba8a37..0000000 --- a/node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BehaviorSubject.js","sourceRoot":"","sources":["../../../src/internal/BehaviorSubject.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC;IAAwC,mCAAU;IAChD,yBAAoB,MAAS;QAA7B,YACE,iBAAO,SACR;QAFmB,YAAM,GAAN,MAAM,CAAG;;IAE7B,CAAC;IAED,sBAAI,kCAAK;aAAT;YACE,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;QACzB,CAAC;;;OAAA;IAGS,oCAAU,GAApB,UAAqB,UAAyB;QAC5C,IAAM,YAAY,GAAG,iBAAM,UAAU,YAAC,UAAU,CAAC,CAAC;QAClD,CAAC,YAAY,CAAC,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACrD,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,kCAAQ,GAAR;QACQ,IAAA,KAAoC,IAAI,EAAtC,QAAQ,cAAA,EAAE,WAAW,iBAAA,EAAE,MAAM,YAAS,CAAC;QAC/C,IAAI,QAAQ,EAAE;YACZ,MAAM,WAAW,CAAC;SACnB;QACD,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,8BAAI,GAAJ,UAAK,KAAQ;QACX,iBAAM,IAAI,YAAC,CAAC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC;IACpC,CAAC;IACH,sBAAC;AAAD,CAAC,AA5BD,CAAwC,OAAO,GA4B9C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Notification.js b/node_modules/rxjs/dist/esm5/internal/Notification.js deleted file mode 100644 index 8670ae5..0000000 --- a/node_modules/rxjs/dist/esm5/internal/Notification.js +++ /dev/null @@ -1,72 +0,0 @@ -import { EMPTY } from './observable/empty'; -import { of } from './observable/of'; -import { throwError } from './observable/throwError'; -import { isFunction } from './util/isFunction'; -export var NotificationKind; -(function (NotificationKind) { - NotificationKind["NEXT"] = "N"; - NotificationKind["ERROR"] = "E"; - NotificationKind["COMPLETE"] = "C"; -})(NotificationKind || (NotificationKind = {})); -var Notification = (function () { - function Notification(kind, value, error) { - this.kind = kind; - this.value = value; - this.error = error; - this.hasValue = kind === 'N'; - } - Notification.prototype.observe = function (observer) { - return observeNotification(this, observer); - }; - Notification.prototype.do = function (nextHandler, errorHandler, completeHandler) { - var _a = this, kind = _a.kind, value = _a.value, error = _a.error; - return kind === 'N' ? nextHandler === null || nextHandler === void 0 ? void 0 : nextHandler(value) : kind === 'E' ? errorHandler === null || errorHandler === void 0 ? void 0 : errorHandler(error) : completeHandler === null || completeHandler === void 0 ? void 0 : completeHandler(); - }; - Notification.prototype.accept = function (nextOrObserver, error, complete) { - var _a; - return isFunction((_a = nextOrObserver) === null || _a === void 0 ? void 0 : _a.next) - ? this.observe(nextOrObserver) - : this.do(nextOrObserver, error, complete); - }; - Notification.prototype.toObservable = function () { - var _a = this, kind = _a.kind, value = _a.value, error = _a.error; - var result = kind === 'N' - ? - of(value) - : - kind === 'E' - ? - throwError(function () { return error; }) - : - kind === 'C' - ? - EMPTY - : - 0; - if (!result) { - throw new TypeError("Unexpected notification kind " + kind); - } - return result; - }; - Notification.createNext = function (value) { - return new Notification('N', value); - }; - Notification.createError = function (err) { - return new Notification('E', undefined, err); - }; - Notification.createComplete = function () { - return Notification.completeNotification; - }; - Notification.completeNotification = new Notification('C'); - return Notification; -}()); -export { Notification }; -export function observeNotification(notification, observer) { - var _a, _b, _c; - var _d = notification, kind = _d.kind, value = _d.value, error = _d.error; - if (typeof kind !== 'string') { - throw new TypeError('Invalid notification, missing "kind"'); - } - kind === 'N' ? (_a = observer.next) === null || _a === void 0 ? void 0 : _a.call(observer, value) : kind === 'E' ? (_b = observer.error) === null || _b === void 0 ? void 0 : _b.call(observer, error) : (_c = observer.complete) === null || _c === void 0 ? void 0 : _c.call(observer); -} -//# sourceMappingURL=Notification.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Notification.js.map b/node_modules/rxjs/dist/esm5/internal/Notification.js.map deleted file mode 100644 index 4d75722..0000000 --- a/node_modules/rxjs/dist/esm5/internal/Notification.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Notification.js","sourceRoot":"","sources":["../../../src/internal/Notification.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAO/C,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,8BAAU,CAAA;IACV,+BAAW,CAAA;IACX,kCAAc,CAAA;AAChB,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B;AAkBD;IA6BE,sBAA4B,IAAqB,EAAkB,KAAS,EAAkB,KAAW;QAA7E,SAAI,GAAJ,IAAI,CAAiB;QAAkB,UAAK,GAAL,KAAK,CAAI;QAAkB,UAAK,GAAL,KAAK,CAAM;QACvG,IAAI,CAAC,QAAQ,GAAG,IAAI,KAAK,GAAG,CAAC;IAC/B,CAAC;IAQD,8BAAO,GAAP,UAAQ,QAA4B;QAClC,OAAO,mBAAmB,CAAC,IAAiC,EAAE,QAAQ,CAAC,CAAC;IAC1E,CAAC;IA4BD,yBAAE,GAAF,UAAG,WAA+B,EAAE,YAAiC,EAAE,eAA4B;QAC3F,IAAA,KAAyB,IAAI,EAA3B,IAAI,UAAA,EAAE,KAAK,WAAA,EAAE,KAAK,WAAS,CAAC;QACpC,OAAO,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAG,KAAM,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAG,KAAK,CAAC,CAAC,CAAC,CAAC,eAAe,aAAf,eAAe,uBAAf,eAAe,EAAI,CAAC;IAC3G,CAAC;IAqCD,6BAAM,GAAN,UAAO,cAAyD,EAAE,KAA0B,EAAE,QAAqB;;QACjH,OAAO,UAAU,CAAC,MAAC,cAAsB,0CAAE,IAAI,CAAC;YAC9C,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,cAAoC,CAAC;YACpD,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,cAAoC,EAAE,KAAY,EAAE,QAAe,CAAC,CAAC;IACnF,CAAC;IASD,mCAAY,GAAZ;QACQ,IAAA,KAAyB,IAAI,EAA3B,IAAI,UAAA,EAAE,KAAK,WAAA,EAAE,KAAK,WAAS,CAAC;QAEpC,IAAM,MAAM,GACV,IAAI,KAAK,GAAG;YACV,CAAC;gBACC,EAAE,CAAC,KAAM,CAAC;YACZ,CAAC;gBACD,IAAI,KAAK,GAAG;oBACZ,CAAC;wBACC,UAAU,CAAC,cAAM,OAAA,KAAK,EAAL,CAAK,CAAC;oBACzB,CAAC;wBACD,IAAI,KAAK,GAAG;4BACZ,CAAC;gCACC,KAAK;4BACP,CAAC;gCACC,CAAC,CAAC;QACR,IAAI,CAAC,MAAM,EAAE;YAIX,MAAM,IAAI,SAAS,CAAC,kCAAgC,IAAM,CAAC,CAAC;SAC7D;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAaM,uBAAU,GAAjB,UAAqB,KAAQ;QAC3B,OAAO,IAAI,YAAY,CAAC,GAAG,EAAE,KAAK,CAA0C,CAAC;IAC/E,CAAC;IAYM,wBAAW,GAAlB,UAAmB,GAAS;QAC1B,OAAO,IAAI,YAAY,CAAC,GAAG,EAAE,SAAS,EAAE,GAAG,CAA4C,CAAC;IAC1F,CAAC;IAUM,2BAAc,GAArB;QACE,OAAO,YAAY,CAAC,oBAAoB,CAAC;IAC3C,CAAC;IAvCc,iCAAoB,GAAG,IAAI,YAAY,CAAC,GAAG,CAA+C,CAAC;IAwC5G,mBAAC;CAAA,AA5LD,IA4LC;SA5LY,YAAY;AAqMzB,MAAM,UAAU,mBAAmB,CAAI,YAAuC,EAAE,QAA4B;;IACpG,IAAA,KAAyB,YAAmB,EAA1C,IAAI,UAAA,EAAE,KAAK,WAAA,EAAE,KAAK,WAAwB,CAAC;IACnD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC5B,MAAM,IAAI,SAAS,CAAC,sCAAsC,CAAC,CAAC;KAC7D;IACD,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,MAAA,QAAQ,CAAC,IAAI,+CAAb,QAAQ,EAAQ,KAAM,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,MAAA,QAAQ,CAAC,KAAK,+CAAd,QAAQ,EAAS,KAAK,CAAC,CAAC,CAAC,CAAC,MAAA,QAAQ,CAAC,QAAQ,+CAAjB,QAAQ,CAAa,CAAC;AAC1G,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js b/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js deleted file mode 100644 index 6a3de7f..0000000 --- a/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js +++ /dev/null @@ -1,15 +0,0 @@ -export var COMPLETE_NOTIFICATION = (function () { return createNotification('C', undefined, undefined); })(); -export function errorNotification(error) { - return createNotification('E', undefined, error); -} -export function nextNotification(value) { - return createNotification('N', value, undefined); -} -export function createNotification(kind, value, error) { - return { - kind: kind, - value: value, - error: error, - }; -} -//# sourceMappingURL=NotificationFactories.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map b/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map deleted file mode 100644 index 4b7775d..0000000 --- a/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NotificationFactories.js","sourceRoot":"","sources":["../../../src/internal/NotificationFactories.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,IAAM,qBAAqB,GAAG,CAAC,cAAM,OAAA,kBAAkB,CAAC,GAAG,EAAE,SAAS,EAAE,SAAS,CAAyB,EAArE,CAAqE,CAAC,EAAE,CAAC;AAOrH,MAAM,UAAU,iBAAiB,CAAC,KAAU;IAC1C,OAAO,kBAAkB,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,CAAQ,CAAC;AAC1D,CAAC;AAOD,MAAM,UAAU,gBAAgB,CAAI,KAAQ;IAC1C,OAAO,kBAAkB,CAAC,GAAG,EAAE,KAAK,EAAE,SAAS,CAAwB,CAAC;AAC1E,CAAC;AAQD,MAAM,UAAU,kBAAkB,CAAC,IAAqB,EAAE,KAAU,EAAE,KAAU;IAC9E,OAAO;QACL,IAAI,MAAA;QACJ,KAAK,OAAA;QACL,KAAK,OAAA;KACN,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Observable.js b/node_modules/rxjs/dist/esm5/internal/Observable.js deleted file mode 100644 index 28a041f..0000000 --- a/node_modules/rxjs/dist/esm5/internal/Observable.js +++ /dev/null @@ -1,102 +0,0 @@ -import { SafeSubscriber, Subscriber } from './Subscriber'; -import { isSubscription } from './Subscription'; -import { observable as Symbol_observable } from './symbol/observable'; -import { pipeFromArray } from './util/pipe'; -import { config } from './config'; -import { isFunction } from './util/isFunction'; -import { errorContext } from './util/errorContext'; -var Observable = (function () { - function Observable(subscribe) { - if (subscribe) { - this._subscribe = subscribe; - } - } - Observable.prototype.lift = function (operator) { - var observable = new Observable(); - observable.source = this; - observable.operator = operator; - return observable; - }; - Observable.prototype.subscribe = function (observerOrNext, error, complete) { - var _this = this; - var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete); - errorContext(function () { - var _a = _this, operator = _a.operator, source = _a.source; - subscriber.add(operator - ? - operator.call(subscriber, source) - : source - ? - _this._subscribe(subscriber) - : - _this._trySubscribe(subscriber)); - }); - return subscriber; - }; - Observable.prototype._trySubscribe = function (sink) { - try { - return this._subscribe(sink); - } - catch (err) { - sink.error(err); - } - }; - Observable.prototype.forEach = function (next, promiseCtor) { - var _this = this; - promiseCtor = getPromiseCtor(promiseCtor); - return new promiseCtor(function (resolve, reject) { - var subscriber = new SafeSubscriber({ - next: function (value) { - try { - next(value); - } - catch (err) { - reject(err); - subscriber.unsubscribe(); - } - }, - error: reject, - complete: resolve, - }); - _this.subscribe(subscriber); - }); - }; - Observable.prototype._subscribe = function (subscriber) { - var _a; - return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber); - }; - Observable.prototype[Symbol_observable] = function () { - return this; - }; - Observable.prototype.pipe = function () { - var operations = []; - for (var _i = 0; _i < arguments.length; _i++) { - operations[_i] = arguments[_i]; - } - return pipeFromArray(operations)(this); - }; - Observable.prototype.toPromise = function (promiseCtor) { - var _this = this; - promiseCtor = getPromiseCtor(promiseCtor); - return new promiseCtor(function (resolve, reject) { - var value; - _this.subscribe(function (x) { return (value = x); }, function (err) { return reject(err); }, function () { return resolve(value); }); - }); - }; - Observable.create = function (subscribe) { - return new Observable(subscribe); - }; - return Observable; -}()); -export { Observable }; -function getPromiseCtor(promiseCtor) { - var _a; - return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise; -} -function isObserver(value) { - return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete); -} -function isSubscriber(value) { - return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value)); -} -//# sourceMappingURL=Observable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Observable.js.map b/node_modules/rxjs/dist/esm5/internal/Observable.js.map deleted file mode 100644 index 9c41e05..0000000 --- a/node_modules/rxjs/dist/esm5/internal/Observable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Observable.js","sourceRoot":"","sources":["../../../src/internal/Observable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAgB,MAAM,gBAAgB,CAAC;AAE9D,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAMnD;IAiBE,oBAAY,SAA6E;QACvF,IAAI,SAAS,EAAE;YACb,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;SAC7B;IACH,CAAC;IAwBD,yBAAI,GAAJ,UAAQ,QAAyB;QAC/B,IAAM,UAAU,GAAG,IAAI,UAAU,EAAK,CAAC;QACvC,UAAU,CAAC,MAAM,GAAG,IAAI,CAAC;QACzB,UAAU,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC/B,OAAO,UAAU,CAAC;IACpB,CAAC;IA2ID,8BAAS,GAAT,UACE,cAAmE,EACnE,KAAqC,EACrC,QAA8B;QAHhC,iBA0BC;QArBC,IAAM,UAAU,GAAG,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,cAAc,CAAC,cAAc,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;QAEvH,YAAY,CAAC;YACL,IAAA,KAAuB,KAAI,EAAzB,QAAQ,cAAA,EAAE,MAAM,YAAS,CAAC;YAClC,UAAU,CAAC,GAAG,CACZ,QAAQ;gBACN,CAAC;oBAEC,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC;gBACnC,CAAC,CAAC,MAAM;oBACR,CAAC;wBAGC,KAAI,CAAC,UAAU,CAAC,UAAU,CAAC;oBAC7B,CAAC;wBAEC,KAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CACnC,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,OAAO,UAAU,CAAC;IACpB,CAAC;IAGS,kCAAa,GAAvB,UAAwB,IAAmB;QACzC,IAAI;YACF,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;SAC9B;QAAC,OAAO,GAAG,EAAE;YAIZ,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SACjB;IACH,CAAC;IA6DD,4BAAO,GAAP,UAAQ,IAAwB,EAAE,WAAoC;QAAtE,iBAkBC;QAjBC,WAAW,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;QAE1C,OAAO,IAAI,WAAW,CAAO,UAAC,OAAO,EAAE,MAAM;YAC3C,IAAM,UAAU,GAAG,IAAI,cAAc,CAAI;gBACvC,IAAI,EAAE,UAAC,KAAK;oBACV,IAAI;wBACF,IAAI,CAAC,KAAK,CAAC,CAAC;qBACb;oBAAC,OAAO,GAAG,EAAE;wBACZ,MAAM,CAAC,GAAG,CAAC,CAAC;wBACZ,UAAU,CAAC,WAAW,EAAE,CAAC;qBAC1B;gBACH,CAAC;gBACD,KAAK,EAAE,MAAM;gBACb,QAAQ,EAAE,OAAO;aAClB,CAAC,CAAC;YACH,KAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC7B,CAAC,CAAkB,CAAC;IACtB,CAAC;IAGS,+BAAU,GAApB,UAAqB,UAA2B;;QAC9C,OAAO,MAAA,IAAI,CAAC,MAAM,0CAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IAC5C,CAAC;IAMD,qBAAC,iBAAiB,CAAC,GAAnB;QACE,OAAO,IAAI,CAAC;IACd,CAAC;IA4FD,yBAAI,GAAJ;QAAK,oBAA2C;aAA3C,UAA2C,EAA3C,qBAA2C,EAA3C,IAA2C;YAA3C,+BAA2C;;QAC9C,OAAO,aAAa,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IA4BD,8BAAS,GAAT,UAAU,WAAoC;QAA9C,iBAWC;QAVC,WAAW,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;QAE1C,OAAO,IAAI,WAAW,CAAC,UAAC,OAAO,EAAE,MAAM;YACrC,IAAI,KAAoB,CAAC;YACzB,KAAI,CAAC,SAAS,CACZ,UAAC,CAAI,IAAK,OAAA,CAAC,KAAK,GAAG,CAAC,CAAC,EAAX,CAAW,EACrB,UAAC,GAAQ,IAAK,OAAA,MAAM,CAAC,GAAG,CAAC,EAAX,CAAW,EACzB,cAAM,OAAA,OAAO,CAAC,KAAK,CAAC,EAAd,CAAc,CACrB,CAAC;QACJ,CAAC,CAA2B,CAAC;IAC/B,CAAC;IAraM,iBAAM,GAA4B,UAAI,SAAwD;QACnG,OAAO,IAAI,UAAU,CAAI,SAAS,CAAC,CAAC;IACtC,CAAC,CAAC;IAoaJ,iBAAC;CAAA,AArcD,IAqcC;SArcY,UAAU;AA8cvB,SAAS,cAAc,CAAC,WAA+C;;IACrE,OAAO,MAAA,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,MAAM,CAAC,OAAO,mCAAI,OAAO,CAAC;AAClD,CAAC;AAED,SAAS,UAAU,CAAI,KAAU;IAC/B,OAAO,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAClG,CAAC;AAED,SAAS,YAAY,CAAI,KAAU;IACjC,OAAO,CAAC,KAAK,IAAI,KAAK,YAAY,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;AAChG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Operator.js b/node_modules/rxjs/dist/esm5/internal/Operator.js deleted file mode 100644 index b9b664f..0000000 --- a/node_modules/rxjs/dist/esm5/internal/Operator.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=Operator.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Operator.js.map b/node_modules/rxjs/dist/esm5/internal/Operator.js.map deleted file mode 100644 index 7401e0c..0000000 --- a/node_modules/rxjs/dist/esm5/internal/Operator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Operator.js","sourceRoot":"","sources":["../../../src/internal/Operator.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/ReplaySubject.js b/node_modules/rxjs/dist/esm5/internal/ReplaySubject.js deleted file mode 100644 index 0cf238d..0000000 --- a/node_modules/rxjs/dist/esm5/internal/ReplaySubject.js +++ /dev/null @@ -1,58 +0,0 @@ -import { __extends } from "tslib"; -import { Subject } from './Subject'; -import { dateTimestampProvider } from './scheduler/dateTimestampProvider'; -var ReplaySubject = (function (_super) { - __extends(ReplaySubject, _super); - function ReplaySubject(_bufferSize, _windowTime, _timestampProvider) { - if (_bufferSize === void 0) { _bufferSize = Infinity; } - if (_windowTime === void 0) { _windowTime = Infinity; } - if (_timestampProvider === void 0) { _timestampProvider = dateTimestampProvider; } - var _this = _super.call(this) || this; - _this._bufferSize = _bufferSize; - _this._windowTime = _windowTime; - _this._timestampProvider = _timestampProvider; - _this._buffer = []; - _this._infiniteTimeWindow = true; - _this._infiniteTimeWindow = _windowTime === Infinity; - _this._bufferSize = Math.max(1, _bufferSize); - _this._windowTime = Math.max(1, _windowTime); - return _this; - } - ReplaySubject.prototype.next = function (value) { - var _a = this, isStopped = _a.isStopped, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow, _timestampProvider = _a._timestampProvider, _windowTime = _a._windowTime; - if (!isStopped) { - _buffer.push(value); - !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime); - } - this._trimBuffer(); - _super.prototype.next.call(this, value); - }; - ReplaySubject.prototype._subscribe = function (subscriber) { - this._throwIfClosed(); - this._trimBuffer(); - var subscription = this._innerSubscribe(subscriber); - var _a = this, _infiniteTimeWindow = _a._infiniteTimeWindow, _buffer = _a._buffer; - var copy = _buffer.slice(); - for (var i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) { - subscriber.next(copy[i]); - } - this._checkFinalizedStatuses(subscriber); - return subscription; - }; - ReplaySubject.prototype._trimBuffer = function () { - var _a = this, _bufferSize = _a._bufferSize, _timestampProvider = _a._timestampProvider, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow; - var adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize; - _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize); - if (!_infiniteTimeWindow) { - var now = _timestampProvider.now(); - var last = 0; - for (var i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) { - last = i; - } - last && _buffer.splice(0, last + 1); - } - }; - return ReplaySubject; -}(Subject)); -export { ReplaySubject }; -//# sourceMappingURL=ReplaySubject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/ReplaySubject.js.map b/node_modules/rxjs/dist/esm5/internal/ReplaySubject.js.map deleted file mode 100644 index 4d64919..0000000 --- a/node_modules/rxjs/dist/esm5/internal/ReplaySubject.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ReplaySubject.js","sourceRoot":"","sources":["../../../src/internal/ReplaySubject.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAgC1E;IAAsC,iCAAU;IAU9C,uBACU,WAAsB,EACtB,WAAsB,EACtB,kBAA6D;QAF7D,4BAAA,EAAA,sBAAsB;QACtB,4BAAA,EAAA,sBAAsB;QACtB,mCAAA,EAAA,0CAA6D;QAHvE,YAKE,iBAAO,SAIR;QARS,iBAAW,GAAX,WAAW,CAAW;QACtB,iBAAW,GAAX,WAAW,CAAW;QACtB,wBAAkB,GAAlB,kBAAkB,CAA2C;QAZ/D,aAAO,GAAmB,EAAE,CAAC;QAC7B,yBAAmB,GAAG,IAAI,CAAC;QAcjC,KAAI,CAAC,mBAAmB,GAAG,WAAW,KAAK,QAAQ,CAAC;QACpD,KAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;QAC5C,KAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;;IAC9C,CAAC;IAED,4BAAI,GAAJ,UAAK,KAAQ;QACL,IAAA,KAA+E,IAAI,EAAjF,SAAS,eAAA,EAAE,OAAO,aAAA,EAAE,mBAAmB,yBAAA,EAAE,kBAAkB,wBAAA,EAAE,WAAW,iBAAS,CAAC;QAC1F,IAAI,CAAC,SAAS,EAAE;YACd,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACpB,CAAC,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,GAAG,WAAW,CAAC,CAAC;SAC9E;QACD,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,iBAAM,IAAI,YAAC,KAAK,CAAC,CAAC;IACpB,CAAC;IAGS,kCAAU,GAApB,UAAqB,UAAyB;QAC5C,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,IAAI,CAAC,WAAW,EAAE,CAAC;QAEnB,IAAM,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QAEhD,IAAA,KAAmC,IAAI,EAArC,mBAAmB,yBAAA,EAAE,OAAO,aAAS,CAAC;QAG9C,IAAM,IAAI,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;QAC7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,IAAI,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;YACvF,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAM,CAAC,CAAC;SAC/B;QAED,IAAI,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC;QAEzC,OAAO,YAAY,CAAC;IACtB,CAAC;IAEO,mCAAW,GAAnB;QACQ,IAAA,KAAoE,IAAI,EAAtE,WAAW,iBAAA,EAAE,kBAAkB,wBAAA,EAAE,OAAO,aAAA,EAAE,mBAAmB,yBAAS,CAAC;QAK/E,IAAM,kBAAkB,GAAG,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC;QACvE,WAAW,GAAG,QAAQ,IAAI,kBAAkB,GAAG,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,GAAG,kBAAkB,CAAC,CAAC;QAIxH,IAAI,CAAC,mBAAmB,EAAE;YACxB,IAAM,GAAG,GAAG,kBAAkB,CAAC,GAAG,EAAE,CAAC;YACrC,IAAI,IAAI,GAAG,CAAC,CAAC;YAGb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,IAAK,OAAO,CAAC,CAAC,CAAY,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE;gBAC3E,IAAI,GAAG,CAAC,CAAC;aACV;YACD,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC;SACrC;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AAzED,CAAsC,OAAO,GAyE5C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Scheduler.js b/node_modules/rxjs/dist/esm5/internal/Scheduler.js deleted file mode 100644 index 4c7d5ed..0000000 --- a/node_modules/rxjs/dist/esm5/internal/Scheduler.js +++ /dev/null @@ -1,16 +0,0 @@ -import { dateTimestampProvider } from './scheduler/dateTimestampProvider'; -var Scheduler = (function () { - function Scheduler(schedulerActionCtor, now) { - if (now === void 0) { now = Scheduler.now; } - this.schedulerActionCtor = schedulerActionCtor; - this.now = now; - } - Scheduler.prototype.schedule = function (work, delay, state) { - if (delay === void 0) { delay = 0; } - return new this.schedulerActionCtor(this, work).schedule(state, delay); - }; - Scheduler.now = dateTimestampProvider.now; - return Scheduler; -}()); -export { Scheduler }; -//# sourceMappingURL=Scheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Scheduler.js.map b/node_modules/rxjs/dist/esm5/internal/Scheduler.js.map deleted file mode 100644 index cba6a4a..0000000 --- a/node_modules/rxjs/dist/esm5/internal/Scheduler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Scheduler.js","sourceRoot":"","sources":["../../../src/internal/Scheduler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAoB1E;IAGE,mBAAoB,mBAAkC,EAAE,GAAiC;QAAjC,oBAAA,EAAA,MAAoB,SAAS,CAAC,GAAG;QAArE,wBAAmB,GAAnB,mBAAmB,CAAe;QACpD,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IA4BM,4BAAQ,GAAf,UAAmB,IAAmD,EAAE,KAAiB,EAAE,KAAS;QAA5B,sBAAA,EAAA,SAAiB;QACvF,OAAO,IAAI,IAAI,CAAC,mBAAmB,CAAI,IAAI,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC5E,CAAC;IAlCa,aAAG,GAAiB,qBAAqB,CAAC,GAAG,CAAC;IAmC9D,gBAAC;CAAA,AApCD,IAoCC;SApCY,SAAS"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Subject.js b/node_modules/rxjs/dist/esm5/internal/Subject.js deleted file mode 100644 index b29d8f6..0000000 --- a/node_modules/rxjs/dist/esm5/internal/Subject.js +++ /dev/null @@ -1,162 +0,0 @@ -import { __extends, __values } from "tslib"; -import { Observable } from './Observable'; -import { Subscription, EMPTY_SUBSCRIPTION } from './Subscription'; -import { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError'; -import { arrRemove } from './util/arrRemove'; -import { errorContext } from './util/errorContext'; -var Subject = (function (_super) { - __extends(Subject, _super); - function Subject() { - var _this = _super.call(this) || this; - _this.closed = false; - _this.currentObservers = null; - _this.observers = []; - _this.isStopped = false; - _this.hasError = false; - _this.thrownError = null; - return _this; - } - Subject.prototype.lift = function (operator) { - var subject = new AnonymousSubject(this, this); - subject.operator = operator; - return subject; - }; - Subject.prototype._throwIfClosed = function () { - if (this.closed) { - throw new ObjectUnsubscribedError(); - } - }; - Subject.prototype.next = function (value) { - var _this = this; - errorContext(function () { - var e_1, _a; - _this._throwIfClosed(); - if (!_this.isStopped) { - if (!_this.currentObservers) { - _this.currentObservers = Array.from(_this.observers); - } - try { - for (var _b = __values(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) { - var observer = _c.value; - observer.next(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } - } - } - }); - }; - Subject.prototype.error = function (err) { - var _this = this; - errorContext(function () { - _this._throwIfClosed(); - if (!_this.isStopped) { - _this.hasError = _this.isStopped = true; - _this.thrownError = err; - var observers = _this.observers; - while (observers.length) { - observers.shift().error(err); - } - } - }); - }; - Subject.prototype.complete = function () { - var _this = this; - errorContext(function () { - _this._throwIfClosed(); - if (!_this.isStopped) { - _this.isStopped = true; - var observers = _this.observers; - while (observers.length) { - observers.shift().complete(); - } - } - }); - }; - Subject.prototype.unsubscribe = function () { - this.isStopped = this.closed = true; - this.observers = this.currentObservers = null; - }; - Object.defineProperty(Subject.prototype, "observed", { - get: function () { - var _a; - return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0; - }, - enumerable: false, - configurable: true - }); - Subject.prototype._trySubscribe = function (subscriber) { - this._throwIfClosed(); - return _super.prototype._trySubscribe.call(this, subscriber); - }; - Subject.prototype._subscribe = function (subscriber) { - this._throwIfClosed(); - this._checkFinalizedStatuses(subscriber); - return this._innerSubscribe(subscriber); - }; - Subject.prototype._innerSubscribe = function (subscriber) { - var _this = this; - var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers; - if (hasError || isStopped) { - return EMPTY_SUBSCRIPTION; - } - this.currentObservers = null; - observers.push(subscriber); - return new Subscription(function () { - _this.currentObservers = null; - arrRemove(observers, subscriber); - }); - }; - Subject.prototype._checkFinalizedStatuses = function (subscriber) { - var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped; - if (hasError) { - subscriber.error(thrownError); - } - else if (isStopped) { - subscriber.complete(); - } - }; - Subject.prototype.asObservable = function () { - var observable = new Observable(); - observable.source = this; - return observable; - }; - Subject.create = function (destination, source) { - return new AnonymousSubject(destination, source); - }; - return Subject; -}(Observable)); -export { Subject }; -var AnonymousSubject = (function (_super) { - __extends(AnonymousSubject, _super); - function AnonymousSubject(destination, source) { - var _this = _super.call(this) || this; - _this.destination = destination; - _this.source = source; - return _this; - } - AnonymousSubject.prototype.next = function (value) { - var _a, _b; - (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value); - }; - AnonymousSubject.prototype.error = function (err) { - var _a, _b; - (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err); - }; - AnonymousSubject.prototype.complete = function () { - var _a, _b; - (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a); - }; - AnonymousSubject.prototype._subscribe = function (subscriber) { - var _a, _b; - return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION; - }; - return AnonymousSubject; -}(Subject)); -export { AnonymousSubject }; -//# sourceMappingURL=Subject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Subject.js.map b/node_modules/rxjs/dist/esm5/internal/Subject.js.map deleted file mode 100644 index c77465f..0000000 --- a/node_modules/rxjs/dist/esm5/internal/Subject.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Subject.js","sourceRoot":"","sources":["../../../src/internal/Subject.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAElE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AASnD;IAAgC,2BAAa;IAuB3C;QAAA,YAEE,iBAAO,SACR;QAzBD,YAAM,GAAG,KAAK,CAAC;QAEP,sBAAgB,GAAyB,IAAI,CAAC;QAGtD,eAAS,GAAkB,EAAE,CAAC;QAE9B,eAAS,GAAG,KAAK,CAAC;QAElB,cAAQ,GAAG,KAAK,CAAC;QAEjB,iBAAW,GAAQ,IAAI,CAAC;;IAcxB,CAAC;IAGD,sBAAI,GAAJ,UAAQ,QAAwB;QAC9B,IAAM,OAAO,GAAG,IAAI,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACjD,OAAO,CAAC,QAAQ,GAAG,QAAe,CAAC;QACnC,OAAO,OAAc,CAAC;IACxB,CAAC;IAGS,gCAAc,GAAxB;QACE,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,MAAM,IAAI,uBAAuB,EAAE,CAAC;SACrC;IACH,CAAC;IAED,sBAAI,GAAJ,UAAK,KAAQ;QAAb,iBAYC;QAXC,YAAY,CAAC;;YACX,KAAI,CAAC,cAAc,EAAE,CAAC;YACtB,IAAI,CAAC,KAAI,CAAC,SAAS,EAAE;gBACnB,IAAI,CAAC,KAAI,CAAC,gBAAgB,EAAE;oBAC1B,KAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC,IAAI,CAAC,KAAI,CAAC,SAAS,CAAC,CAAC;iBACpD;;oBACD,KAAuB,IAAA,KAAA,SAAA,KAAI,CAAC,gBAAgB,CAAA,gBAAA,4BAAE;wBAAzC,IAAM,QAAQ,WAAA;wBACjB,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;qBACtB;;;;;;;;;aACF;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,uBAAK,GAAL,UAAM,GAAQ;QAAd,iBAYC;QAXC,YAAY,CAAC;YACX,KAAI,CAAC,cAAc,EAAE,CAAC;YACtB,IAAI,CAAC,KAAI,CAAC,SAAS,EAAE;gBACnB,KAAI,CAAC,QAAQ,GAAG,KAAI,CAAC,SAAS,GAAG,IAAI,CAAC;gBACtC,KAAI,CAAC,WAAW,GAAG,GAAG,CAAC;gBACf,IAAA,SAAS,GAAK,KAAI,UAAT,CAAU;gBAC3B,OAAO,SAAS,CAAC,MAAM,EAAE;oBACvB,SAAS,CAAC,KAAK,EAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBAC/B;aACF;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,0BAAQ,GAAR;QAAA,iBAWC;QAVC,YAAY,CAAC;YACX,KAAI,CAAC,cAAc,EAAE,CAAC;YACtB,IAAI,CAAC,KAAI,CAAC,SAAS,EAAE;gBACnB,KAAI,CAAC,SAAS,GAAG,IAAI,CAAC;gBACd,IAAA,SAAS,GAAK,KAAI,UAAT,CAAU;gBAC3B,OAAO,SAAS,CAAC,MAAM,EAAE;oBACvB,SAAS,CAAC,KAAK,EAAG,CAAC,QAAQ,EAAE,CAAC;iBAC/B;aACF;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,6BAAW,GAAX;QACE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACpC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,gBAAgB,GAAG,IAAK,CAAC;IACjD,CAAC;IAED,sBAAI,6BAAQ;aAAZ;;YACE,OAAO,CAAA,MAAA,IAAI,CAAC,SAAS,0CAAE,MAAM,IAAG,CAAC,CAAC;QACpC,CAAC;;;OAAA;IAGS,+BAAa,GAAvB,UAAwB,UAAyB;QAC/C,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,OAAO,iBAAM,aAAa,YAAC,UAAU,CAAC,CAAC;IACzC,CAAC;IAGS,4BAAU,GAApB,UAAqB,UAAyB;QAC5C,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,IAAI,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC;QACzC,OAAO,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;IAC1C,CAAC;IAGS,iCAAe,GAAzB,UAA0B,UAA2B;QAArD,iBAWC;QAVO,IAAA,KAAqC,IAAI,EAAvC,QAAQ,cAAA,EAAE,SAAS,eAAA,EAAE,SAAS,eAAS,CAAC;QAChD,IAAI,QAAQ,IAAI,SAAS,EAAE;YACzB,OAAO,kBAAkB,CAAC;SAC3B;QACD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;QAC7B,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC3B,OAAO,IAAI,YAAY,CAAC;YACtB,KAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;YAC7B,SAAS,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;IACL,CAAC;IAGS,yCAAuB,GAAjC,UAAkC,UAA2B;QACrD,IAAA,KAAuC,IAAI,EAAzC,QAAQ,cAAA,EAAE,WAAW,iBAAA,EAAE,SAAS,eAAS,CAAC;QAClD,IAAI,QAAQ,EAAE;YACZ,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;SAC/B;aAAM,IAAI,SAAS,EAAE;YACpB,UAAU,CAAC,QAAQ,EAAE,CAAC;SACvB;IACH,CAAC;IAQD,8BAAY,GAAZ;QACE,IAAM,UAAU,GAAQ,IAAI,UAAU,EAAK,CAAC;QAC5C,UAAU,CAAC,MAAM,GAAG,IAAI,CAAC;QACzB,OAAO,UAAU,CAAC;IACpB,CAAC;IAxHM,cAAM,GAA4B,UAAI,WAAwB,EAAE,MAAqB;QAC1F,OAAO,IAAI,gBAAgB,CAAI,WAAW,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC,CAAC;IAuHJ,cAAC;CAAA,AA5ID,CAAgC,UAAU,GA4IzC;SA5IY,OAAO;AA8IpB;IAAyC,oCAAU;IACjD,0BAES,WAAyB,EAChC,MAAsB;QAHxB,YAKE,iBAAO,SAER;QALQ,iBAAW,GAAX,WAAW,CAAc;QAIhC,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;;IACvB,CAAC;IAED,+BAAI,GAAJ,UAAK,KAAQ;;QACX,MAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,IAAI,mDAAG,KAAK,CAAC,CAAC;IAClC,CAAC;IAED,gCAAK,GAAL,UAAM,GAAQ;;QACZ,MAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,KAAK,mDAAG,GAAG,CAAC,CAAC;IACjC,CAAC;IAED,mCAAQ,GAAR;;QACE,MAAA,MAAA,IAAI,CAAC,WAAW,0CAAE,QAAQ,kDAAI,CAAC;IACjC,CAAC;IAGS,qCAAU,GAApB,UAAqB,UAAyB;;QAC5C,OAAO,MAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,SAAS,CAAC,UAAU,CAAC,mCAAI,kBAAkB,CAAC;IAClE,CAAC;IACH,uBAAC;AAAD,CAAC,AA1BD,CAAyC,OAAO,GA0B/C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Subscriber.js b/node_modules/rxjs/dist/esm5/internal/Subscriber.js deleted file mode 100644 index c14778e..0000000 --- a/node_modules/rxjs/dist/esm5/internal/Subscriber.js +++ /dev/null @@ -1,184 +0,0 @@ -import { __extends } from "tslib"; -import { isFunction } from './util/isFunction'; -import { isSubscription, Subscription } from './Subscription'; -import { config } from './config'; -import { reportUnhandledError } from './util/reportUnhandledError'; -import { noop } from './util/noop'; -import { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories'; -import { timeoutProvider } from './scheduler/timeoutProvider'; -import { captureError } from './util/errorContext'; -var Subscriber = (function (_super) { - __extends(Subscriber, _super); - function Subscriber(destination) { - var _this = _super.call(this) || this; - _this.isStopped = false; - if (destination) { - _this.destination = destination; - if (isSubscription(destination)) { - destination.add(_this); - } - } - else { - _this.destination = EMPTY_OBSERVER; - } - return _this; - } - Subscriber.create = function (next, error, complete) { - return new SafeSubscriber(next, error, complete); - }; - Subscriber.prototype.next = function (value) { - if (this.isStopped) { - handleStoppedNotification(nextNotification(value), this); - } - else { - this._next(value); - } - }; - Subscriber.prototype.error = function (err) { - if (this.isStopped) { - handleStoppedNotification(errorNotification(err), this); - } - else { - this.isStopped = true; - this._error(err); - } - }; - Subscriber.prototype.complete = function () { - if (this.isStopped) { - handleStoppedNotification(COMPLETE_NOTIFICATION, this); - } - else { - this.isStopped = true; - this._complete(); - } - }; - Subscriber.prototype.unsubscribe = function () { - if (!this.closed) { - this.isStopped = true; - _super.prototype.unsubscribe.call(this); - this.destination = null; - } - }; - Subscriber.prototype._next = function (value) { - this.destination.next(value); - }; - Subscriber.prototype._error = function (err) { - try { - this.destination.error(err); - } - finally { - this.unsubscribe(); - } - }; - Subscriber.prototype._complete = function () { - try { - this.destination.complete(); - } - finally { - this.unsubscribe(); - } - }; - return Subscriber; -}(Subscription)); -export { Subscriber }; -var _bind = Function.prototype.bind; -function bind(fn, thisArg) { - return _bind.call(fn, thisArg); -} -var ConsumerObserver = (function () { - function ConsumerObserver(partialObserver) { - this.partialObserver = partialObserver; - } - ConsumerObserver.prototype.next = function (value) { - var partialObserver = this.partialObserver; - if (partialObserver.next) { - try { - partialObserver.next(value); - } - catch (error) { - handleUnhandledError(error); - } - } - }; - ConsumerObserver.prototype.error = function (err) { - var partialObserver = this.partialObserver; - if (partialObserver.error) { - try { - partialObserver.error(err); - } - catch (error) { - handleUnhandledError(error); - } - } - else { - handleUnhandledError(err); - } - }; - ConsumerObserver.prototype.complete = function () { - var partialObserver = this.partialObserver; - if (partialObserver.complete) { - try { - partialObserver.complete(); - } - catch (error) { - handleUnhandledError(error); - } - } - }; - return ConsumerObserver; -}()); -var SafeSubscriber = (function (_super) { - __extends(SafeSubscriber, _super); - function SafeSubscriber(observerOrNext, error, complete) { - var _this = _super.call(this) || this; - var partialObserver; - if (isFunction(observerOrNext) || !observerOrNext) { - partialObserver = { - next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined), - error: error !== null && error !== void 0 ? error : undefined, - complete: complete !== null && complete !== void 0 ? complete : undefined, - }; - } - else { - var context_1; - if (_this && config.useDeprecatedNextContext) { - context_1 = Object.create(observerOrNext); - context_1.unsubscribe = function () { return _this.unsubscribe(); }; - partialObserver = { - next: observerOrNext.next && bind(observerOrNext.next, context_1), - error: observerOrNext.error && bind(observerOrNext.error, context_1), - complete: observerOrNext.complete && bind(observerOrNext.complete, context_1), - }; - } - else { - partialObserver = observerOrNext; - } - } - _this.destination = new ConsumerObserver(partialObserver); - return _this; - } - return SafeSubscriber; -}(Subscriber)); -export { SafeSubscriber }; -function handleUnhandledError(error) { - if (config.useDeprecatedSynchronousErrorHandling) { - captureError(error); - } - else { - reportUnhandledError(error); - } -} -function defaultErrorHandler(err) { - throw err; -} -function handleStoppedNotification(notification, subscriber) { - var onStoppedNotification = config.onStoppedNotification; - onStoppedNotification && timeoutProvider.setTimeout(function () { return onStoppedNotification(notification, subscriber); }); -} -export var EMPTY_OBSERVER = { - closed: true, - next: noop, - error: defaultErrorHandler, - complete: noop, -}; -//# sourceMappingURL=Subscriber.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map b/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map deleted file mode 100644 index 14e39a2..0000000 --- a/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Subscriber.js","sourceRoot":"","sources":["../../../src/internal/Subscriber.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrG,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAUnD;IAAmC,8BAAY;IA4B7C,oBAAY,WAA6C;QAAzD,YACE,iBAAO,SAWR;QApBS,eAAS,GAAY,KAAK,CAAC;QAUnC,IAAI,WAAW,EAAE;YACf,KAAI,CAAC,WAAW,GAAG,WAAW,CAAC;YAG/B,IAAI,cAAc,CAAC,WAAW,CAAC,EAAE;gBAC/B,WAAW,CAAC,GAAG,CAAC,KAAI,CAAC,CAAC;aACvB;SACF;aAAM;YACL,KAAI,CAAC,WAAW,GAAG,cAAc,CAAC;SACnC;;IACH,CAAC;IAzBM,iBAAM,GAAb,UAAiB,IAAsB,EAAE,KAAyB,EAAE,QAAqB;QACvF,OAAO,IAAI,cAAc,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IACnD,CAAC;IA+BD,yBAAI,GAAJ,UAAK,KAAQ;QACX,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,yBAAyB,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC;SAC1D;aAAM;YACL,IAAI,CAAC,KAAK,CAAC,KAAM,CAAC,CAAC;SACpB;IACH,CAAC;IAQD,0BAAK,GAAL,UAAM,GAAS;QACb,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,yBAAyB,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;SACzD;aAAM;YACL,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;SAClB;IACH,CAAC;IAOD,6BAAQ,GAAR;QACE,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,yBAAyB,CAAC,qBAAqB,EAAE,IAAI,CAAC,CAAC;SACxD;aAAM;YACL,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,IAAI,CAAC,SAAS,EAAE,CAAC;SAClB;IACH,CAAC;IAED,gCAAW,GAAX;QACE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,iBAAM,WAAW,WAAE,CAAC;YACpB,IAAI,CAAC,WAAW,GAAG,IAAK,CAAC;SAC1B;IACH,CAAC;IAES,0BAAK,GAAf,UAAgB,KAAQ;QACtB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAES,2BAAM,GAAhB,UAAiB,GAAQ;QACvB,IAAI;YACF,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SAC7B;gBAAS;YACR,IAAI,CAAC,WAAW,EAAE,CAAC;SACpB;IACH,CAAC;IAES,8BAAS,GAAnB;QACE,IAAI;YACF,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;SAC7B;gBAAS;YACR,IAAI,CAAC,WAAW,EAAE,CAAC;SACpB;IACH,CAAC;IACH,iBAAC;AAAD,CAAC,AAhHD,CAAmC,YAAY,GAgH9C;;AAOD,IAAM,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC;AAEtC,SAAS,IAAI,CAAqC,EAAM,EAAE,OAAY;IACpE,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;AACjC,CAAC;AAMD;IACE,0BAAoB,eAAqC;QAArC,oBAAe,GAAf,eAAe,CAAsB;IAAG,CAAC;IAE7D,+BAAI,GAAJ,UAAK,KAAQ;QACH,IAAA,eAAe,GAAK,IAAI,gBAAT,CAAU;QACjC,IAAI,eAAe,CAAC,IAAI,EAAE;YACxB,IAAI;gBACF,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aAC7B;YAAC,OAAO,KAAK,EAAE;gBACd,oBAAoB,CAAC,KAAK,CAAC,CAAC;aAC7B;SACF;IACH,CAAC;IAED,gCAAK,GAAL,UAAM,GAAQ;QACJ,IAAA,eAAe,GAAK,IAAI,gBAAT,CAAU;QACjC,IAAI,eAAe,CAAC,KAAK,EAAE;YACzB,IAAI;gBACF,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aAC5B;YAAC,OAAO,KAAK,EAAE;gBACd,oBAAoB,CAAC,KAAK,CAAC,CAAC;aAC7B;SACF;aAAM;YACL,oBAAoB,CAAC,GAAG,CAAC,CAAC;SAC3B;IACH,CAAC;IAED,mCAAQ,GAAR;QACU,IAAA,eAAe,GAAK,IAAI,gBAAT,CAAU;QACjC,IAAI,eAAe,CAAC,QAAQ,EAAE;YAC5B,IAAI;gBACF,eAAe,CAAC,QAAQ,EAAE,CAAC;aAC5B;YAAC,OAAO,KAAK,EAAE;gBACd,oBAAoB,CAAC,KAAK,CAAC,CAAC;aAC7B;SACF;IACH,CAAC;IACH,uBAAC;AAAD,CAAC,AArCD,IAqCC;AAED;IAAuC,kCAAa;IAClD,wBACE,cAAmE,EACnE,KAAkC,EAClC,QAA8B;QAHhC,YAKE,iBAAO,SAkCR;QAhCC,IAAI,eAAqC,CAAC;QAC1C,IAAI,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,cAAc,EAAE;YAGjD,eAAe,GAAG;gBAChB,IAAI,EAAE,CAAC,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,SAAS,CAAqC;gBACvE,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,SAAS;gBACzB,QAAQ,EAAE,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,SAAS;aAChC,CAAC;SACH;aAAM;YAEL,IAAI,SAAY,CAAC;YACjB,IAAI,KAAI,IAAI,MAAM,CAAC,wBAAwB,EAAE;gBAI3C,SAAO,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;gBACxC,SAAO,CAAC,WAAW,GAAG,cAAM,OAAA,KAAI,CAAC,WAAW,EAAE,EAAlB,CAAkB,CAAC;gBAC/C,eAAe,GAAG;oBAChB,IAAI,EAAE,cAAc,CAAC,IAAI,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,SAAO,CAAC;oBAC/D,KAAK,EAAE,cAAc,CAAC,KAAK,IAAI,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,SAAO,CAAC;oBAClE,QAAQ,EAAE,cAAc,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,SAAO,CAAC;iBAC5E,CAAC;aACH;iBAAM;gBAEL,eAAe,GAAG,cAAc,CAAC;aAClC;SACF;QAID,KAAI,CAAC,WAAW,GAAG,IAAI,gBAAgB,CAAC,eAAe,CAAC,CAAC;;IAC3D,CAAC;IACH,qBAAC;AAAD,CAAC,AAzCD,CAAuC,UAAU,GAyChD;;AAED,SAAS,oBAAoB,CAAC,KAAU;IACtC,IAAI,MAAM,CAAC,qCAAqC,EAAE;QAChD,YAAY,CAAC,KAAK,CAAC,CAAC;KACrB;SAAM;QAGL,oBAAoB,CAAC,KAAK,CAAC,CAAC;KAC7B;AACH,CAAC;AAQD,SAAS,mBAAmB,CAAC,GAAQ;IACnC,MAAM,GAAG,CAAC;AACZ,CAAC;AAOD,SAAS,yBAAyB,CAAC,YAAyC,EAAE,UAA2B;IAC/F,IAAA,qBAAqB,GAAK,MAAM,sBAAX,CAAY;IACzC,qBAAqB,IAAI,eAAe,CAAC,UAAU,CAAC,cAAM,OAAA,qBAAqB,CAAC,YAAY,EAAE,UAAU,CAAC,EAA/C,CAA+C,CAAC,CAAC;AAC7G,CAAC;AAOD,MAAM,CAAC,IAAM,cAAc,GAA+C;IACxE,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,mBAAmB;IAC1B,QAAQ,EAAE,IAAI;CACf,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Subscription.js b/node_modules/rxjs/dist/esm5/internal/Subscription.js deleted file mode 100644 index 867b4b0..0000000 --- a/node_modules/rxjs/dist/esm5/internal/Subscription.js +++ /dev/null @@ -1,143 +0,0 @@ -import { __read, __spreadArray, __values } from "tslib"; -import { isFunction } from './util/isFunction'; -import { UnsubscriptionError } from './util/UnsubscriptionError'; -import { arrRemove } from './util/arrRemove'; -var Subscription = (function () { - function Subscription(initialTeardown) { - this.initialTeardown = initialTeardown; - this.closed = false; - this._parentage = null; - this._finalizers = null; - } - Subscription.prototype.unsubscribe = function () { - var e_1, _a, e_2, _b; - var errors; - if (!this.closed) { - this.closed = true; - var _parentage = this._parentage; - if (_parentage) { - this._parentage = null; - if (Array.isArray(_parentage)) { - try { - for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) { - var parent_1 = _parentage_1_1.value; - parent_1.remove(this); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1); - } - finally { if (e_1) throw e_1.error; } - } - } - else { - _parentage.remove(this); - } - } - var initialFinalizer = this.initialTeardown; - if (isFunction(initialFinalizer)) { - try { - initialFinalizer(); - } - catch (e) { - errors = e instanceof UnsubscriptionError ? e.errors : [e]; - } - } - var _finalizers = this._finalizers; - if (_finalizers) { - this._finalizers = null; - try { - for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) { - var finalizer = _finalizers_1_1.value; - try { - execFinalizer(finalizer); - } - catch (err) { - errors = errors !== null && errors !== void 0 ? errors : []; - if (err instanceof UnsubscriptionError) { - errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors)); - } - else { - errors.push(err); - } - } - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1); - } - finally { if (e_2) throw e_2.error; } - } - } - if (errors) { - throw new UnsubscriptionError(errors); - } - } - }; - Subscription.prototype.add = function (teardown) { - var _a; - if (teardown && teardown !== this) { - if (this.closed) { - execFinalizer(teardown); - } - else { - if (teardown instanceof Subscription) { - if (teardown.closed || teardown._hasParent(this)) { - return; - } - teardown._addParent(this); - } - (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown); - } - } - }; - Subscription.prototype._hasParent = function (parent) { - var _parentage = this._parentage; - return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent)); - }; - Subscription.prototype._addParent = function (parent) { - var _parentage = this._parentage; - this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent; - }; - Subscription.prototype._removeParent = function (parent) { - var _parentage = this._parentage; - if (_parentage === parent) { - this._parentage = null; - } - else if (Array.isArray(_parentage)) { - arrRemove(_parentage, parent); - } - }; - Subscription.prototype.remove = function (teardown) { - var _finalizers = this._finalizers; - _finalizers && arrRemove(_finalizers, teardown); - if (teardown instanceof Subscription) { - teardown._removeParent(this); - } - }; - Subscription.EMPTY = (function () { - var empty = new Subscription(); - empty.closed = true; - return empty; - })(); - return Subscription; -}()); -export { Subscription }; -export var EMPTY_SUBSCRIPTION = Subscription.EMPTY; -export function isSubscription(value) { - return (value instanceof Subscription || - (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe))); -} -function execFinalizer(finalizer) { - if (isFunction(finalizer)) { - finalizer(); - } - else { - finalizer.unsubscribe(); - } -} -//# sourceMappingURL=Subscription.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/Subscription.js.map b/node_modules/rxjs/dist/esm5/internal/Subscription.js.map deleted file mode 100644 index 966161b..0000000 --- a/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Subscription.js","sourceRoot":"","sources":["../../../src/internal/Subscription.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAY7C;IAwBE,sBAAoB,eAA4B;QAA5B,oBAAe,GAAf,eAAe,CAAa;QAdzC,WAAM,GAAG,KAAK,CAAC;QAEd,eAAU,GAAyC,IAAI,CAAC;QAMxD,gBAAW,GAA0C,IAAI,CAAC;IAMf,CAAC;IAOpD,kCAAW,GAAX;;QACE,IAAI,MAAyB,CAAC;QAE9B,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;YAGX,IAAA,UAAU,GAAK,IAAI,WAAT,CAAU;YAC5B,IAAI,UAAU,EAAE;gBACd,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;gBACvB,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;;wBAC7B,KAAqB,IAAA,eAAA,SAAA,UAAU,CAAA,sCAAA,8DAAE;4BAA5B,IAAM,QAAM,uBAAA;4BACf,QAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;yBACrB;;;;;;;;;iBACF;qBAAM;oBACL,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;iBACzB;aACF;YAEO,IAAiB,gBAAgB,GAAK,IAAI,gBAAT,CAAU;YACnD,IAAI,UAAU,CAAC,gBAAgB,CAAC,EAAE;gBAChC,IAAI;oBACF,gBAAgB,EAAE,CAAC;iBACpB;gBAAC,OAAO,CAAC,EAAE;oBACV,MAAM,GAAG,CAAC,YAAY,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;iBAC5D;aACF;YAEO,IAAA,WAAW,GAAK,IAAI,YAAT,CAAU;YAC7B,IAAI,WAAW,EAAE;gBACf,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;;oBACxB,KAAwB,IAAA,gBAAA,SAAA,WAAW,CAAA,wCAAA,iEAAE;wBAAhC,IAAM,SAAS,wBAAA;wBAClB,IAAI;4BACF,aAAa,CAAC,SAAS,CAAC,CAAC;yBAC1B;wBAAC,OAAO,GAAG,EAAE;4BACZ,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAC;4BACtB,IAAI,GAAG,YAAY,mBAAmB,EAAE;gCACtC,MAAM,0CAAO,MAAM,WAAK,GAAG,CAAC,MAAM,EAAC,CAAC;6BACrC;iCAAM;gCACL,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;6BAClB;yBACF;qBACF;;;;;;;;;aACF;YAED,IAAI,MAAM,EAAE;gBACV,MAAM,IAAI,mBAAmB,CAAC,MAAM,CAAC,CAAC;aACvC;SACF;IACH,CAAC;IAoBD,0BAAG,GAAH,UAAI,QAAuB;;QAGzB,IAAI,QAAQ,IAAI,QAAQ,KAAK,IAAI,EAAE;YACjC,IAAI,IAAI,CAAC,MAAM,EAAE;gBAGf,aAAa,CAAC,QAAQ,CAAC,CAAC;aACzB;iBAAM;gBACL,IAAI,QAAQ,YAAY,YAAY,EAAE;oBAGpC,IAAI,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;wBAChD,OAAO;qBACR;oBACD,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;iBAC3B;gBACD,CAAC,IAAI,CAAC,WAAW,GAAG,MAAA,IAAI,CAAC,WAAW,mCAAI,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC5D;SACF;IACH,CAAC;IAOO,iCAAU,GAAlB,UAAmB,MAAoB;QAC7B,IAAA,UAAU,GAAK,IAAI,WAAT,CAAU;QAC5B,OAAO,UAAU,KAAK,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7F,CAAC;IASO,iCAAU,GAAlB,UAAmB,MAAoB;QAC7B,IAAA,UAAU,GAAK,IAAI,WAAT,CAAU;QAC5B,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACnI,CAAC;IAMO,oCAAa,GAArB,UAAsB,MAAoB;QAChC,IAAA,UAAU,GAAK,IAAI,WAAT,CAAU;QAC5B,IAAI,UAAU,KAAK,MAAM,EAAE;YACzB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;SACxB;aAAM,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;YACpC,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;SAC/B;IACH,CAAC;IAgBD,6BAAM,GAAN,UAAO,QAAsC;QACnC,IAAA,WAAW,GAAK,IAAI,YAAT,CAAU;QAC7B,WAAW,IAAI,SAAS,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;QAEhD,IAAI,QAAQ,YAAY,YAAY,EAAE;YACpC,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;SAC9B;IACH,CAAC;IAjLa,kBAAK,GAAG,CAAC;QACrB,IAAM,KAAK,GAAG,IAAI,YAAY,EAAE,CAAC;QACjC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;QACpB,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,EAAE,CAAC;IA8KP,mBAAC;CAAA,AAnLD,IAmLC;SAnLY,YAAY;AAqLzB,MAAM,CAAC,IAAM,kBAAkB,GAAG,YAAY,CAAC,KAAK,CAAC;AAErD,MAAM,UAAU,cAAc,CAAC,KAAU;IACvC,OAAO,CACL,KAAK,YAAY,YAAY;QAC7B,CAAC,KAAK,IAAI,QAAQ,IAAI,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CACnH,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,SAAwC;IAC7D,IAAI,UAAU,CAAC,SAAS,CAAC,EAAE;QACzB,SAAS,EAAE,CAAC;KACb;SAAM;QACL,SAAS,CAAC,WAAW,EAAE,CAAC;KACzB;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/ajax/AjaxResponse.js b/node_modules/rxjs/dist/esm5/internal/ajax/AjaxResponse.js deleted file mode 100644 index b6c75d1..0000000 --- a/node_modules/rxjs/dist/esm5/internal/ajax/AjaxResponse.js +++ /dev/null @@ -1,29 +0,0 @@ -import { getXHRResponse } from './getXHRResponse'; -var AjaxResponse = (function () { - function AjaxResponse(originalEvent, xhr, request, type) { - if (type === void 0) { type = 'download_load'; } - this.originalEvent = originalEvent; - this.xhr = xhr; - this.request = request; - this.type = type; - var status = xhr.status, responseType = xhr.responseType; - this.status = status !== null && status !== void 0 ? status : 0; - this.responseType = responseType !== null && responseType !== void 0 ? responseType : ''; - var allHeaders = xhr.getAllResponseHeaders(); - this.responseHeaders = allHeaders - ? - allHeaders.split('\n').reduce(function (headers, line) { - var index = line.indexOf(': '); - headers[line.slice(0, index)] = line.slice(index + 2); - return headers; - }, {}) - : {}; - this.response = getXHRResponse(xhr); - var loaded = originalEvent.loaded, total = originalEvent.total; - this.loaded = loaded; - this.total = total; - } - return AjaxResponse; -}()); -export { AjaxResponse }; -//# sourceMappingURL=AjaxResponse.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/ajax/AjaxResponse.js.map b/node_modules/rxjs/dist/esm5/internal/ajax/AjaxResponse.js.map deleted file mode 100644 index 9327396..0000000 --- a/node_modules/rxjs/dist/esm5/internal/ajax/AjaxResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AjaxResponse.js","sourceRoot":"","sources":["../../../../src/internal/ajax/AjaxResponse.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAgBlD;IA+CE,sBAIkB,aAA4B,EAM5B,GAAmB,EAInB,OAAoB,EAcpB,IAAwC;QAAxC,qBAAA,EAAA,sBAAwC;QAxBxC,kBAAa,GAAb,aAAa,CAAe;QAM5B,QAAG,GAAH,GAAG,CAAgB;QAInB,YAAO,GAAP,OAAO,CAAa;QAcpB,SAAI,GAAJ,IAAI,CAAoC;QAEhD,IAAA,MAAM,GAAmB,GAAG,OAAtB,EAAE,YAAY,GAAK,GAAG,aAAR,CAAS;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,CAAC,CAAC;QAC1B,IAAI,CAAC,YAAY,GAAG,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,EAAE,CAAC;QASvC,IAAM,UAAU,GAAG,GAAG,CAAC,qBAAqB,EAAE,CAAC;QAC/C,IAAI,CAAC,eAAe,GAAG,UAAU;YAC/B,CAAC;gBACC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,UAAC,OAA+B,EAAE,IAAI;oBAIlE,IAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;oBACjC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;oBACtD,OAAO,OAAO,CAAC;gBACjB,CAAC,EAAE,EAAE,CAAC;YACR,CAAC,CAAC,EAAE,CAAC;QAEP,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;QAC5B,IAAA,MAAM,GAAY,aAAa,OAAzB,EAAE,KAAK,GAAK,aAAa,MAAlB,CAAmB;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IACH,mBAAC;AAAD,CAAC,AA1GD,IA0GC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/ajax/ajax.js b/node_modules/rxjs/dist/esm5/internal/ajax/ajax.js deleted file mode 100644 index 6b07b85..0000000 --- a/node_modules/rxjs/dist/esm5/internal/ajax/ajax.js +++ /dev/null @@ -1,239 +0,0 @@ -import { __assign } from "tslib"; -import { map } from '../operators/map'; -import { Observable } from '../Observable'; -import { AjaxResponse } from './AjaxResponse'; -import { AjaxTimeoutError, AjaxError } from './errors'; -function ajaxGet(url, headers) { - return ajax({ method: 'GET', url: url, headers: headers }); -} -function ajaxPost(url, body, headers) { - return ajax({ method: 'POST', url: url, body: body, headers: headers }); -} -function ajaxDelete(url, headers) { - return ajax({ method: 'DELETE', url: url, headers: headers }); -} -function ajaxPut(url, body, headers) { - return ajax({ method: 'PUT', url: url, body: body, headers: headers }); -} -function ajaxPatch(url, body, headers) { - return ajax({ method: 'PATCH', url: url, body: body, headers: headers }); -} -var mapResponse = map(function (x) { return x.response; }); -function ajaxGetJSON(url, headers) { - return mapResponse(ajax({ - method: 'GET', - url: url, - headers: headers, - })); -} -export var ajax = (function () { - var create = function (urlOrConfig) { - var config = typeof urlOrConfig === 'string' - ? { - url: urlOrConfig, - } - : urlOrConfig; - return fromAjax(config); - }; - create.get = ajaxGet; - create.post = ajaxPost; - create.delete = ajaxDelete; - create.put = ajaxPut; - create.patch = ajaxPatch; - create.getJSON = ajaxGetJSON; - return create; -})(); -var UPLOAD = 'upload'; -var DOWNLOAD = 'download'; -var LOADSTART = 'loadstart'; -var PROGRESS = 'progress'; -var LOAD = 'load'; -export function fromAjax(init) { - return new Observable(function (destination) { - var _a, _b; - var config = __assign({ async: true, crossDomain: false, withCredentials: false, method: 'GET', timeout: 0, responseType: 'json' }, init); - var queryParams = config.queryParams, configuredBody = config.body, configuredHeaders = config.headers; - var url = config.url; - if (!url) { - throw new TypeError('url is required'); - } - if (queryParams) { - var searchParams_1; - if (url.includes('?')) { - var parts = url.split('?'); - if (2 < parts.length) { - throw new TypeError('invalid url'); - } - searchParams_1 = new URLSearchParams(parts[1]); - new URLSearchParams(queryParams).forEach(function (value, key) { return searchParams_1.set(key, value); }); - url = parts[0] + '?' + searchParams_1; - } - else { - searchParams_1 = new URLSearchParams(queryParams); - url = url + '?' + searchParams_1; - } - } - var headers = {}; - if (configuredHeaders) { - for (var key in configuredHeaders) { - if (configuredHeaders.hasOwnProperty(key)) { - headers[key.toLowerCase()] = configuredHeaders[key]; - } - } - } - var crossDomain = config.crossDomain; - if (!crossDomain && !('x-requested-with' in headers)) { - headers['x-requested-with'] = 'XMLHttpRequest'; - } - var withCredentials = config.withCredentials, xsrfCookieName = config.xsrfCookieName, xsrfHeaderName = config.xsrfHeaderName; - if ((withCredentials || !crossDomain) && xsrfCookieName && xsrfHeaderName) { - var xsrfCookie = (_b = (_a = document === null || document === void 0 ? void 0 : document.cookie.match(new RegExp("(^|;\\s*)(" + xsrfCookieName + ")=([^;]*)"))) === null || _a === void 0 ? void 0 : _a.pop()) !== null && _b !== void 0 ? _b : ''; - if (xsrfCookie) { - headers[xsrfHeaderName] = xsrfCookie; - } - } - var body = extractContentTypeAndMaybeSerializeBody(configuredBody, headers); - var _request = __assign(__assign({}, config), { url: url, - headers: headers, - body: body }); - var xhr; - xhr = init.createXHR ? init.createXHR() : new XMLHttpRequest(); - { - var progressSubscriber_1 = init.progressSubscriber, _c = init.includeDownloadProgress, includeDownloadProgress = _c === void 0 ? false : _c, _d = init.includeUploadProgress, includeUploadProgress = _d === void 0 ? false : _d; - var addErrorEvent = function (type, errorFactory) { - xhr.addEventListener(type, function () { - var _a; - var error = errorFactory(); - (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, error); - destination.error(error); - }); - }; - addErrorEvent('timeout', function () { return new AjaxTimeoutError(xhr, _request); }); - addErrorEvent('abort', function () { return new AjaxError('aborted', xhr, _request); }); - var createResponse_1 = function (direction, event) { - return new AjaxResponse(event, xhr, _request, direction + "_" + event.type); - }; - var addProgressEvent_1 = function (target, type, direction) { - target.addEventListener(type, function (event) { - destination.next(createResponse_1(direction, event)); - }); - }; - if (includeUploadProgress) { - [LOADSTART, PROGRESS, LOAD].forEach(function (type) { return addProgressEvent_1(xhr.upload, type, UPLOAD); }); - } - if (progressSubscriber_1) { - [LOADSTART, PROGRESS].forEach(function (type) { return xhr.upload.addEventListener(type, function (e) { var _a; return (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.next) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, e); }); }); - } - if (includeDownloadProgress) { - [LOADSTART, PROGRESS].forEach(function (type) { return addProgressEvent_1(xhr, type, DOWNLOAD); }); - } - var emitError_1 = function (status) { - var msg = 'ajax error' + (status ? ' ' + status : ''); - destination.error(new AjaxError(msg, xhr, _request)); - }; - xhr.addEventListener('error', function (e) { - var _a; - (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1, e); - emitError_1(); - }); - xhr.addEventListener(LOAD, function (event) { - var _a, _b; - var status = xhr.status; - if (status < 400) { - (_a = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.complete) === null || _a === void 0 ? void 0 : _a.call(progressSubscriber_1); - var response = void 0; - try { - response = createResponse_1(DOWNLOAD, event); - } - catch (err) { - destination.error(err); - return; - } - destination.next(response); - destination.complete(); - } - else { - (_b = progressSubscriber_1 === null || progressSubscriber_1 === void 0 ? void 0 : progressSubscriber_1.error) === null || _b === void 0 ? void 0 : _b.call(progressSubscriber_1, event); - emitError_1(status); - } - }); - } - var user = _request.user, method = _request.method, async = _request.async; - if (user) { - xhr.open(method, url, async, user, _request.password); - } - else { - xhr.open(method, url, async); - } - if (async) { - xhr.timeout = _request.timeout; - xhr.responseType = _request.responseType; - } - if ('withCredentials' in xhr) { - xhr.withCredentials = _request.withCredentials; - } - for (var key in headers) { - if (headers.hasOwnProperty(key)) { - xhr.setRequestHeader(key, headers[key]); - } - } - if (body) { - xhr.send(body); - } - else { - xhr.send(); - } - return function () { - if (xhr && xhr.readyState !== 4) { - xhr.abort(); - } - }; - }); -} -function extractContentTypeAndMaybeSerializeBody(body, headers) { - var _a; - if (!body || - typeof body === 'string' || - isFormData(body) || - isURLSearchParams(body) || - isArrayBuffer(body) || - isFile(body) || - isBlob(body) || - isReadableStream(body)) { - return body; - } - if (isArrayBufferView(body)) { - return body.buffer; - } - if (typeof body === 'object') { - headers['content-type'] = (_a = headers['content-type']) !== null && _a !== void 0 ? _a : 'application/json;charset=utf-8'; - return JSON.stringify(body); - } - throw new TypeError('Unknown body type'); -} -var _toString = Object.prototype.toString; -function toStringCheck(obj, name) { - return _toString.call(obj) === "[object " + name + "]"; -} -function isArrayBuffer(body) { - return toStringCheck(body, 'ArrayBuffer'); -} -function isFile(body) { - return toStringCheck(body, 'File'); -} -function isBlob(body) { - return toStringCheck(body, 'Blob'); -} -function isArrayBufferView(body) { - return typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView(body); -} -function isFormData(body) { - return typeof FormData !== 'undefined' && body instanceof FormData; -} -function isURLSearchParams(body) { - return typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams; -} -function isReadableStream(body) { - return typeof ReadableStream !== 'undefined' && body instanceof ReadableStream; -} -//# sourceMappingURL=ajax.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/ajax/ajax.js.map b/node_modules/rxjs/dist/esm5/internal/ajax/ajax.js.map deleted file mode 100644 index a8fc73e..0000000 --- a/node_modules/rxjs/dist/esm5/internal/ajax/ajax.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ajax.js","sourceRoot":"","sources":["../../../../src/internal/ajax/ajax.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAqIvD,SAAS,OAAO,CAAI,GAAW,EAAE,OAAgC;IAC/D,OAAO,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAA,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,QAAQ,CAAI,GAAW,EAAE,IAAU,EAAE,OAAgC;IAC5E,OAAO,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,KAAA,EAAE,IAAI,MAAA,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC;AACtD,CAAC;AAED,SAAS,UAAU,CAAI,GAAW,EAAE,OAAgC;IAClE,OAAO,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAA,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,OAAO,CAAI,GAAW,EAAE,IAAU,EAAE,OAAgC;IAC3E,OAAO,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAA,EAAE,IAAI,MAAA,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC;AACrD,CAAC;AAED,SAAS,SAAS,CAAI,GAAW,EAAE,IAAU,EAAE,OAAgC;IAC7E,OAAO,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAA,EAAE,IAAI,MAAA,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC;AACvD,CAAC;AAED,IAAM,WAAW,GAAG,GAAG,CAAC,UAAC,CAAoB,IAAK,OAAA,CAAC,CAAC,QAAQ,EAAV,CAAU,CAAC,CAAC;AAE9D,SAAS,WAAW,CAAI,GAAW,EAAE,OAAgC;IACnE,OAAO,WAAW,CAChB,IAAI,CAAI;QACN,MAAM,EAAE,KAAK;QACb,GAAG,KAAA;QACH,OAAO,SAAA;KACR,CAAC,CACH,CAAC;AACJ,CAAC;AAoGD,MAAM,CAAC,IAAM,IAAI,GAAuB,CAAC;IACvC,IAAM,MAAM,GAAG,UAAI,WAAgC;QACjD,IAAM,MAAM,GACV,OAAO,WAAW,KAAK,QAAQ;YAC7B,CAAC,CAAC;gBACE,GAAG,EAAE,WAAW;aACjB;YACH,CAAC,CAAC,WAAW,CAAC;QAClB,OAAO,QAAQ,CAAI,MAAM,CAAC,CAAC;IAC7B,CAAC,CAAC;IAEF,MAAM,CAAC,GAAG,GAAG,OAAO,CAAC;IACrB,MAAM,CAAC,IAAI,GAAG,QAAQ,CAAC;IACvB,MAAM,CAAC,MAAM,GAAG,UAAU,CAAC;IAC3B,MAAM,CAAC,GAAG,GAAG,OAAO,CAAC;IACrB,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC;IACzB,MAAM,CAAC,OAAO,GAAG,WAAW,CAAC;IAE7B,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC,EAAE,CAAC;AAEL,IAAM,MAAM,GAAG,QAAQ,CAAC;AACxB,IAAM,QAAQ,GAAG,UAAU,CAAC;AAC5B,IAAM,SAAS,GAAG,WAAW,CAAC;AAC9B,IAAM,QAAQ,GAAG,UAAU,CAAC;AAC5B,IAAM,IAAI,GAAG,MAAM,CAAC;AAEpB,MAAM,UAAU,QAAQ,CAAI,IAAgB;IAC1C,OAAO,IAAI,UAAU,CAAC,UAAC,WAAW;;QAChC,IAAM,MAAM,cAEV,KAAK,EAAE,IAAI,EACX,WAAW,EAAE,KAAK,EAClB,eAAe,EAAE,KAAK,EACtB,MAAM,EAAE,KAAK,EACb,OAAO,EAAE,CAAC,EACV,YAAY,EAAE,MAAoC,IAE/C,IAAI,CACR,CAAC;QAEM,IAAA,WAAW,GAAuD,MAAM,YAA7D,EAAQ,cAAc,GAAiC,MAAM,KAAvC,EAAW,iBAAiB,GAAK,MAAM,QAAX,CAAY;QAEjF,IAAI,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC;QACrB,IAAI,CAAC,GAAG,EAAE;YACR,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAC;SACxC;QAED,IAAI,WAAW,EAAE;YACf,IAAI,cAA6B,CAAC;YAClC,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBAIrB,IAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBAC7B,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE;oBACpB,MAAM,IAAI,SAAS,CAAC,aAAa,CAAC,CAAC;iBACpC;gBAED,cAAY,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBAG7C,IAAI,eAAe,CAAC,WAAkB,CAAC,CAAC,OAAO,CAAC,UAAC,KAAK,EAAE,GAAG,IAAK,OAAA,cAAY,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,EAA5B,CAA4B,CAAC,CAAC;gBAI9F,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,cAAY,CAAC;aACrC;iBAAM;gBAKL,cAAY,GAAG,IAAI,eAAe,CAAC,WAAkB,CAAC,CAAC;gBACvD,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,cAAY,CAAC;aAChC;SACF;QAKD,IAAM,OAAO,GAAwB,EAAE,CAAC;QACxC,IAAI,iBAAiB,EAAE;YACrB,KAAK,IAAM,GAAG,IAAI,iBAAiB,EAAE;gBACnC,IAAI,iBAAiB,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;oBACzC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;iBACrD;aACF;SACF;QAED,IAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QASvC,IAAI,CAAC,WAAW,IAAI,CAAC,CAAC,kBAAkB,IAAI,OAAO,CAAC,EAAE;YACpD,OAAO,CAAC,kBAAkB,CAAC,GAAG,gBAAgB,CAAC;SAChD;QAIO,IAAA,eAAe,GAAqC,MAAM,gBAA3C,EAAE,cAAc,GAAqB,MAAM,eAA3B,EAAE,cAAc,GAAK,MAAM,eAAX,CAAY;QACnE,IAAI,CAAC,eAAe,IAAI,CAAC,WAAW,CAAC,IAAI,cAAc,IAAI,cAAc,EAAE;YACzE,IAAM,UAAU,GAAG,MAAA,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,eAAa,cAAc,cAAW,CAAC,CAAC,0CAAE,GAAG,EAAE,mCAAI,EAAE,CAAC;YAC3G,IAAI,UAAU,EAAE;gBACd,OAAO,CAAC,cAAc,CAAC,GAAG,UAAU,CAAC;aACtC;SACF;QAID,IAAM,IAAI,GAAG,uCAAuC,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;QAG9E,IAAM,QAAQ,yBACT,MAAM,KAGT,GAAG,KAAA;YACH,OAAO,SAAA;YACP,IAAI,MAAA,GACL,CAAC;QAEF,IAAI,GAAmB,CAAC;QAGxB,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,IAAI,cAAc,EAAE,CAAC;QAE/D;YAQU,IAAA,oBAAkB,GAAqE,IAAI,mBAAzE,EAAE,KAAmE,IAAI,wBAAxC,EAA/B,uBAAuB,mBAAG,KAAK,KAAA,EAAE,KAAkC,IAAI,sBAAT,EAA7B,qBAAqB,mBAAG,KAAK,KAAA,CAAU;YAQpG,IAAM,aAAa,GAAG,UAAC,IAAY,EAAE,YAAuB;gBAC1D,GAAG,CAAC,gBAAgB,CAAC,IAAI,EAAE;;oBACzB,IAAM,KAAK,GAAG,YAAY,EAAE,CAAC;oBAC7B,MAAA,oBAAkB,aAAlB,oBAAkB,uBAAlB,oBAAkB,CAAE,KAAK,+CAAzB,oBAAkB,EAAU,KAAK,CAAC,CAAC;oBACnC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBAC3B,CAAC,CAAC,CAAC;YACL,CAAC,CAAC;YAGF,aAAa,CAAC,SAAS,EAAE,cAAM,OAAA,IAAI,gBAAgB,CAAC,GAAG,EAAE,QAAQ,CAAC,EAAnC,CAAmC,CAAC,CAAC;YAIpE,aAAa,CAAC,OAAO,EAAE,cAAM,OAAA,IAAI,SAAS,CAAC,SAAS,EAAE,GAAG,EAAE,QAAQ,CAAC,EAAvC,CAAuC,CAAC,CAAC;YAStE,IAAM,gBAAc,GAAG,UAAC,SAAwB,EAAE,KAAoB;gBACpE,OAAA,IAAI,YAAY,CAAI,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAK,SAAS,SAAI,KAAK,CAAC,IAAoC,CAAC;YAArG,CAAqG,CAAC;YAYxG,IAAM,kBAAgB,GAAG,UAAC,MAAW,EAAE,IAAY,EAAE,SAAwB;gBAC3E,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,UAAC,KAAoB;oBACjD,WAAW,CAAC,IAAI,CAAC,gBAAc,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;gBACrD,CAAC,CAAC,CAAC;YACL,CAAC,CAAC;YAEF,IAAI,qBAAqB,EAAE;gBACzB,CAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,UAAC,IAAI,IAAK,OAAA,kBAAgB,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,EAA1C,CAA0C,CAAC,CAAC;aAC3F;YAED,IAAI,oBAAkB,EAAE;gBACtB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,UAAC,IAAI,IAAK,OAAA,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,UAAC,CAAM,YAAK,OAAA,MAAA,oBAAkB,aAAlB,oBAAkB,uBAAlB,oBAAkB,CAAE,IAAI,+CAAxB,oBAAkB,EAAS,CAAC,CAAC,CAAA,EAAA,CAAC,EAA5E,CAA4E,CAAC,CAAC;aACvH;YAED,IAAI,uBAAuB,EAAE;gBAC3B,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,UAAC,IAAI,IAAK,OAAA,kBAAgB,CAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,CAAC,EAArC,CAAqC,CAAC,CAAC;aAChF;YAED,IAAM,WAAS,GAAG,UAAC,MAAe;gBAChC,IAAM,GAAG,GAAG,YAAY,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;gBACxD,WAAW,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;YACvD,CAAC,CAAC;YAEF,GAAG,CAAC,gBAAgB,CAAC,OAAO,EAAE,UAAC,CAAC;;gBAC9B,MAAA,oBAAkB,aAAlB,oBAAkB,uBAAlB,oBAAkB,CAAE,KAAK,+CAAzB,oBAAkB,EAAU,CAAC,CAAC,CAAC;gBAC/B,WAAS,EAAE,CAAC;YACd,CAAC,CAAC,CAAC;YAEH,GAAG,CAAC,gBAAgB,CAAC,IAAI,EAAE,UAAC,KAAK;;gBACvB,IAAA,MAAM,GAAK,GAAG,OAAR,CAAS;gBAEvB,IAAI,MAAM,GAAG,GAAG,EAAE;oBAChB,MAAA,oBAAkB,aAAlB,oBAAkB,uBAAlB,oBAAkB,CAAE,QAAQ,+CAA5B,oBAAkB,CAAc,CAAC;oBAEjC,IAAI,QAAQ,SAAiB,CAAC;oBAC9B,IAAI;wBAIF,QAAQ,GAAG,gBAAc,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;qBAC5C;oBAAC,OAAO,GAAG,EAAE;wBACZ,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;wBACvB,OAAO;qBACR;oBAED,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;oBAC3B,WAAW,CAAC,QAAQ,EAAE,CAAC;iBACxB;qBAAM;oBACL,MAAA,oBAAkB,aAAlB,oBAAkB,uBAAlB,oBAAkB,CAAE,KAAK,+CAAzB,oBAAkB,EAAU,KAAK,CAAC,CAAC;oBACnC,WAAS,CAAC,MAAM,CAAC,CAAC;iBACnB;YACH,CAAC,CAAC,CAAC;SACJ;QAEO,IAAA,IAAI,GAAoB,QAAQ,KAA5B,EAAE,MAAM,GAAY,QAAQ,OAApB,EAAE,KAAK,GAAK,QAAQ,MAAb,CAAc;QAEzC,IAAI,IAAI,EAAE;YACR,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;SACvD;aAAM;YACL,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;SAC9B;QAGD,IAAI,KAAK,EAAE;YACT,GAAG,CAAC,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;YAC/B,GAAG,CAAC,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC;SAC1C;QAED,IAAI,iBAAiB,IAAI,GAAG,EAAE;YAC5B,GAAG,CAAC,eAAe,GAAG,QAAQ,CAAC,eAAe,CAAC;SAChD;QAGD,KAAK,IAAM,GAAG,IAAI,OAAO,EAAE;YACzB,IAAI,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;gBAC/B,GAAG,CAAC,gBAAgB,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;aACzC;SACF;QAGD,IAAI,IAAI,EAAE;YACR,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAChB;aAAM;YACL,GAAG,CAAC,IAAI,EAAE,CAAC;SACZ;QAED,OAAO;YACL,IAAI,GAAG,IAAI,GAAG,CAAC,UAAU,KAAK,CAAC,EAAe;gBAC5C,GAAG,CAAC,KAAK,EAAE,CAAC;aACb;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAWD,SAAS,uCAAuC,CAAC,IAAS,EAAE,OAA+B;;IACzF,IACE,CAAC,IAAI;QACL,OAAO,IAAI,KAAK,QAAQ;QACxB,UAAU,CAAC,IAAI,CAAC;QAChB,iBAAiB,CAAC,IAAI,CAAC;QACvB,aAAa,CAAC,IAAI,CAAC;QACnB,MAAM,CAAC,IAAI,CAAC;QACZ,MAAM,CAAC,IAAI,CAAC;QACZ,gBAAgB,CAAC,IAAI,CAAC,EACtB;QAGA,OAAO,IAAI,CAAC;KACb;IAED,IAAI,iBAAiB,CAAC,IAAI,CAAC,EAAE;QAG3B,OAAO,IAAI,CAAC,MAAM,CAAC;KACpB;IAED,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAM5B,OAAO,CAAC,cAAc,CAAC,GAAG,MAAA,OAAO,CAAC,cAAc,CAAC,mCAAI,gCAAgC,CAAC;QACtF,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;KAC7B;IAID,MAAM,IAAI,SAAS,CAAC,mBAAmB,CAAC,CAAC;AAC3C,CAAC;AAED,IAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;AAE5C,SAAS,aAAa,CAAC,GAAQ,EAAE,IAAY;IAC3C,OAAO,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,aAAW,IAAI,MAAG,CAAC;AACpD,CAAC;AAED,SAAS,aAAa,CAAC,IAAS;IAC9B,OAAO,aAAa,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,MAAM,CAAC,IAAS;IACvB,OAAO,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,MAAM,CAAC,IAAS;IACvB,OAAO,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAS;IAClC,OAAO,OAAO,WAAW,KAAK,WAAW,IAAI,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACxE,CAAC;AAED,SAAS,UAAU,CAAC,IAAS;IAC3B,OAAO,OAAO,QAAQ,KAAK,WAAW,IAAI,IAAI,YAAY,QAAQ,CAAC;AACrE,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAS;IAClC,OAAO,OAAO,eAAe,KAAK,WAAW,IAAI,IAAI,YAAY,eAAe,CAAC;AACnF,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAS;IACjC,OAAO,OAAO,cAAc,KAAK,WAAW,IAAI,IAAI,YAAY,cAAc,CAAC;AACjF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/ajax/errors.js b/node_modules/rxjs/dist/esm5/internal/ajax/errors.js deleted file mode 100644 index ce4dd09..0000000 --- a/node_modules/rxjs/dist/esm5/internal/ajax/errors.js +++ /dev/null @@ -1,30 +0,0 @@ -import { getXHRResponse } from './getXHRResponse'; -import { createErrorClass } from '../util/createErrorClass'; -export var AjaxError = createErrorClass(function (_super) { - return function AjaxErrorImpl(message, xhr, request) { - this.message = message; - this.name = 'AjaxError'; - this.xhr = xhr; - this.request = request; - this.status = xhr.status; - this.responseType = xhr.responseType; - var response; - try { - response = getXHRResponse(xhr); - } - catch (err) { - response = xhr.responseText; - } - this.response = response; - }; -}); -export var AjaxTimeoutError = (function () { - function AjaxTimeoutErrorImpl(xhr, request) { - AjaxError.call(this, 'ajax timeout', xhr, request); - this.name = 'AjaxTimeoutError'; - return this; - } - AjaxTimeoutErrorImpl.prototype = Object.create(AjaxError.prototype); - return AjaxTimeoutErrorImpl; -})(); -//# sourceMappingURL=errors.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/ajax/errors.js.map b/node_modules/rxjs/dist/esm5/internal/ajax/errors.js.map deleted file mode 100644 index bb626d5..0000000 --- a/node_modules/rxjs/dist/esm5/internal/ajax/errors.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../src/internal/ajax/errors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAmD5D,MAAM,CAAC,IAAM,SAAS,GAAkB,gBAAgB,CACtD,UAAC,MAAM;IACL,OAAA,SAAS,aAAa,CAAY,OAAe,EAAE,GAAmB,EAAE,OAAoB;QAC1F,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QACxB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;QACrC,IAAI,QAAa,CAAC;QAClB,IAAI;YAGF,QAAQ,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;SAChC;QAAC,OAAO,GAAG,EAAE;YACZ,QAAQ,GAAG,GAAG,CAAC,YAAY,CAAC;SAC7B;QACD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;AAhBD,CAgBC,CACJ,CAAC;AAqBF,MAAM,CAAC,IAAM,gBAAgB,GAAyB,CAAC;IACrD,SAAS,oBAAoB,CAAY,GAAmB,EAAE,OAAoB;QAChF,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;QACnD,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,oBAAoB,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;IACpE,OAAO,oBAAoB,CAAC;AAC9B,CAAC,CAAC,EAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/ajax/getXHRResponse.js b/node_modules/rxjs/dist/esm5/internal/ajax/getXHRResponse.js deleted file mode 100644 index 6d59712..0000000 --- a/node_modules/rxjs/dist/esm5/internal/ajax/getXHRResponse.js +++ /dev/null @@ -1,26 +0,0 @@ -export function getXHRResponse(xhr) { - switch (xhr.responseType) { - case 'json': { - if ('response' in xhr) { - return xhr.response; - } - else { - var ieXHR = xhr; - return JSON.parse(ieXHR.responseText); - } - } - case 'document': - return xhr.responseXML; - case 'text': - default: { - if ('response' in xhr) { - return xhr.response; - } - else { - var ieXHR = xhr; - return ieXHR.responseText; - } - } - } -} -//# sourceMappingURL=getXHRResponse.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/ajax/getXHRResponse.js.map b/node_modules/rxjs/dist/esm5/internal/ajax/getXHRResponse.js.map deleted file mode 100644 index f3bac35..0000000 --- a/node_modules/rxjs/dist/esm5/internal/ajax/getXHRResponse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getXHRResponse.js","sourceRoot":"","sources":["../../../../src/internal/ajax/getXHRResponse.ts"],"names":[],"mappings":"AAYA,MAAM,UAAU,cAAc,CAAC,GAAmB;IAChD,QAAQ,GAAG,CAAC,YAAY,EAAE;QACxB,KAAK,MAAM,CAAC,CAAC;YACX,IAAI,UAAU,IAAI,GAAG,EAAE;gBACrB,OAAO,GAAG,CAAC,QAAQ,CAAC;aACrB;iBAAM;gBAEL,IAAM,KAAK,GAAQ,GAAG,CAAC;gBACvB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;aACvC;SACF;QACD,KAAK,UAAU;YACb,OAAO,GAAG,CAAC,WAAW,CAAC;QACzB,KAAK,MAAM,CAAC;QACZ,OAAO,CAAC,CAAC;YACP,IAAI,UAAU,IAAI,GAAG,EAAE;gBACrB,OAAO,GAAG,CAAC,QAAQ,CAAC;aACrB;iBAAM;gBAEL,IAAM,KAAK,GAAQ,GAAG,CAAC;gBACvB,OAAO,KAAK,CAAC,YAAY,CAAC;aAC3B;SACF;KACF;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/ajax/types.js b/node_modules/rxjs/dist/esm5/internal/ajax/types.js deleted file mode 100644 index 718fd38..0000000 --- a/node_modules/rxjs/dist/esm5/internal/ajax/types.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/ajax/types.js.map b/node_modules/rxjs/dist/esm5/internal/ajax/types.js.map deleted file mode 100644 index f08bdb1..0000000 --- a/node_modules/rxjs/dist/esm5/internal/ajax/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/internal/ajax/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/config.js b/node_modules/rxjs/dist/esm5/internal/config.js deleted file mode 100644 index c993d28..0000000 --- a/node_modules/rxjs/dist/esm5/internal/config.js +++ /dev/null @@ -1,8 +0,0 @@ -export var config = { - onUnhandledError: null, - onStoppedNotification: null, - Promise: undefined, - useDeprecatedSynchronousErrorHandling: false, - useDeprecatedNextContext: false, -}; -//# sourceMappingURL=config.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/config.js.map b/node_modules/rxjs/dist/esm5/internal/config.js.map deleted file mode 100644 index 8c91260..0000000 --- a/node_modules/rxjs/dist/esm5/internal/config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/internal/config.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,IAAM,MAAM,GAAiB;IAClC,gBAAgB,EAAE,IAAI;IACtB,qBAAqB,EAAE,IAAI;IAC3B,OAAO,EAAE,SAAS;IAClB,qCAAqC,EAAE,KAAK;IAC5C,wBAAwB,EAAE,KAAK;CAChC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/firstValueFrom.js b/node_modules/rxjs/dist/esm5/internal/firstValueFrom.js deleted file mode 100644 index 4734676..0000000 --- a/node_modules/rxjs/dist/esm5/internal/firstValueFrom.js +++ /dev/null @@ -1,24 +0,0 @@ -import { EmptyError } from './util/EmptyError'; -import { SafeSubscriber } from './Subscriber'; -export function firstValueFrom(source, config) { - var hasConfig = typeof config === 'object'; - return new Promise(function (resolve, reject) { - var subscriber = new SafeSubscriber({ - next: function (value) { - resolve(value); - subscriber.unsubscribe(); - }, - error: reject, - complete: function () { - if (hasConfig) { - resolve(config.defaultValue); - } - else { - reject(new EmptyError()); - } - }, - }); - source.subscribe(subscriber); - }); -} -//# sourceMappingURL=firstValueFrom.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/firstValueFrom.js.map b/node_modules/rxjs/dist/esm5/internal/firstValueFrom.js.map deleted file mode 100644 index 11ec1e7..0000000 --- a/node_modules/rxjs/dist/esm5/internal/firstValueFrom.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"firstValueFrom.js","sourceRoot":"","sources":["../../../src/internal/firstValueFrom.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAqD9C,MAAM,UAAU,cAAc,CAAO,MAAqB,EAAE,MAAgC;IAC1F,IAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC;IAC7C,OAAO,IAAI,OAAO,CAAQ,UAAC,OAAO,EAAE,MAAM;QACxC,IAAM,UAAU,GAAG,IAAI,cAAc,CAAI;YACvC,IAAI,EAAE,UAAC,KAAK;gBACV,OAAO,CAAC,KAAK,CAAC,CAAC;gBACf,UAAU,CAAC,WAAW,EAAE,CAAC;YAC3B,CAAC;YACD,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE;gBACR,IAAI,SAAS,EAAE;oBACb,OAAO,CAAC,MAAO,CAAC,YAAY,CAAC,CAAC;iBAC/B;qBAAM;oBACL,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC,CAAC;iBAC1B;YACH,CAAC;SACF,CAAC,CAAC;QACH,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/lastValueFrom.js b/node_modules/rxjs/dist/esm5/internal/lastValueFrom.js deleted file mode 100644 index 5d77915..0000000 --- a/node_modules/rxjs/dist/esm5/internal/lastValueFrom.js +++ /dev/null @@ -1,27 +0,0 @@ -import { EmptyError } from './util/EmptyError'; -export function lastValueFrom(source, config) { - var hasConfig = typeof config === 'object'; - return new Promise(function (resolve, reject) { - var _hasValue = false; - var _value; - source.subscribe({ - next: function (value) { - _value = value; - _hasValue = true; - }, - error: reject, - complete: function () { - if (_hasValue) { - resolve(_value); - } - else if (hasConfig) { - resolve(config.defaultValue); - } - else { - reject(new EmptyError()); - } - }, - }); - }); -} -//# sourceMappingURL=lastValueFrom.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/lastValueFrom.js.map b/node_modules/rxjs/dist/esm5/internal/lastValueFrom.js.map deleted file mode 100644 index 2bc02a0..0000000 --- a/node_modules/rxjs/dist/esm5/internal/lastValueFrom.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"lastValueFrom.js","sourceRoot":"","sources":["../../../src/internal/lastValueFrom.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAoD/C,MAAM,UAAU,aAAa,CAAO,MAAqB,EAAE,MAA+B;IACxF,IAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC;IAC7C,OAAO,IAAI,OAAO,CAAQ,UAAC,OAAO,EAAE,MAAM;QACxC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,MAAS,CAAC;QACd,MAAM,CAAC,SAAS,CAAC;YACf,IAAI,EAAE,UAAC,KAAK;gBACV,MAAM,GAAG,KAAK,CAAC;gBACf,SAAS,GAAG,IAAI,CAAC;YACnB,CAAC;YACD,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE;gBACR,IAAI,SAAS,EAAE;oBACb,OAAO,CAAC,MAAM,CAAC,CAAC;iBACjB;qBAAM,IAAI,SAAS,EAAE;oBACpB,OAAO,CAAC,MAAO,CAAC,YAAY,CAAC,CAAC;iBAC/B;qBAAM;oBACL,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC,CAAC;iBAC1B;YACH,CAAC;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/ConnectableObservable.js b/node_modules/rxjs/dist/esm5/internal/observable/ConnectableObservable.js deleted file mode 100644 index e51b47d..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/ConnectableObservable.js +++ /dev/null @@ -1,63 +0,0 @@ -import { __extends } from "tslib"; -import { Observable } from '../Observable'; -import { Subscription } from '../Subscription'; -import { refCount as higherOrderRefCount } from '../operators/refCount'; -import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; -import { hasLift } from '../util/lift'; -var ConnectableObservable = (function (_super) { - __extends(ConnectableObservable, _super); - function ConnectableObservable(source, subjectFactory) { - var _this = _super.call(this) || this; - _this.source = source; - _this.subjectFactory = subjectFactory; - _this._subject = null; - _this._refCount = 0; - _this._connection = null; - if (hasLift(source)) { - _this.lift = source.lift; - } - return _this; - } - ConnectableObservable.prototype._subscribe = function (subscriber) { - return this.getSubject().subscribe(subscriber); - }; - ConnectableObservable.prototype.getSubject = function () { - var subject = this._subject; - if (!subject || subject.isStopped) { - this._subject = this.subjectFactory(); - } - return this._subject; - }; - ConnectableObservable.prototype._teardown = function () { - this._refCount = 0; - var _connection = this._connection; - this._subject = this._connection = null; - _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe(); - }; - ConnectableObservable.prototype.connect = function () { - var _this = this; - var connection = this._connection; - if (!connection) { - connection = this._connection = new Subscription(); - var subject_1 = this.getSubject(); - connection.add(this.source.subscribe(createOperatorSubscriber(subject_1, undefined, function () { - _this._teardown(); - subject_1.complete(); - }, function (err) { - _this._teardown(); - subject_1.error(err); - }, function () { return _this._teardown(); }))); - if (connection.closed) { - this._connection = null; - connection = Subscription.EMPTY; - } - } - return connection; - }; - ConnectableObservable.prototype.refCount = function () { - return higherOrderRefCount()(this); - }; - return ConnectableObservable; -}(Observable)); -export { ConnectableObservable }; -//# sourceMappingURL=ConnectableObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/ConnectableObservable.js.map b/node_modules/rxjs/dist/esm5/internal/observable/ConnectableObservable.js.map deleted file mode 100644 index 54d9446..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/ConnectableObservable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConnectableObservable.js","sourceRoot":"","sources":["../../../../src/internal/observable/ConnectableObservable.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,QAAQ,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AASvC;IAA8C,yCAAa;IAgBzD,+BAAmB,MAAqB,EAAY,cAAgC;QAApF,YACE,iBAAO,SAOR;QARkB,YAAM,GAAN,MAAM,CAAe;QAAY,oBAAc,GAAd,cAAc,CAAkB;QAf1E,cAAQ,GAAsB,IAAI,CAAC;QACnC,eAAS,GAAW,CAAC,CAAC;QACtB,iBAAW,GAAwB,IAAI,CAAC;QAkBhD,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE;YACnB,KAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;SACzB;;IACH,CAAC;IAGS,0CAAU,GAApB,UAAqB,UAAyB;QAC5C,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACjD,CAAC;IAES,0CAAU,GAApB;QACE,IAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,SAAS,EAAE;YACjC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;SACvC;QACD,OAAO,IAAI,CAAC,QAAS,CAAC;IACxB,CAAC;IAES,yCAAS,GAAnB;QACE,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACX,IAAA,WAAW,GAAK,IAAI,YAAT,CAAU;QAC7B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxC,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,WAAW,EAAE,CAAC;IAC7B,CAAC;IAMD,uCAAO,GAAP;QAAA,iBA6BC;QA5BC,IAAI,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;QAClC,IAAI,CAAC,UAAU,EAAE;YACf,UAAU,GAAG,IAAI,CAAC,WAAW,GAAG,IAAI,YAAY,EAAE,CAAC;YACnD,IAAM,SAAO,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;YAClC,UAAU,CAAC,GAAG,CACZ,IAAI,CAAC,MAAM,CAAC,SAAS,CACnB,wBAAwB,CACtB,SAAc,EACd,SAAS,EACT;gBACE,KAAI,CAAC,SAAS,EAAE,CAAC;gBACjB,SAAO,CAAC,QAAQ,EAAE,CAAC;YACrB,CAAC,EACD,UAAC,GAAG;gBACF,KAAI,CAAC,SAAS,EAAE,CAAC;gBACjB,SAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACrB,CAAC,EACD,cAAM,OAAA,KAAI,CAAC,SAAS,EAAE,EAAhB,CAAgB,CACvB,CACF,CACF,CAAC;YAEF,IAAI,UAAU,CAAC,MAAM,EAAE;gBACrB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;gBACxB,UAAU,GAAG,YAAY,CAAC,KAAK,CAAC;aACjC;SACF;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;IAMD,wCAAQ,GAAR;QACE,OAAO,mBAAmB,EAAE,CAAC,IAAI,CAAkB,CAAC;IACtD,CAAC;IACH,4BAAC;AAAD,CAAC,AAxFD,CAA8C,UAAU,GAwFvD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/bindCallback.js b/node_modules/rxjs/dist/esm5/internal/observable/bindCallback.js deleted file mode 100644 index 0f730ac..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/bindCallback.js +++ /dev/null @@ -1,5 +0,0 @@ -import { bindCallbackInternals } from './bindCallbackInternals'; -export function bindCallback(callbackFunc, resultSelector, scheduler) { - return bindCallbackInternals(false, callbackFunc, resultSelector, scheduler); -} -//# sourceMappingURL=bindCallback.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/bindCallback.js.map b/node_modules/rxjs/dist/esm5/internal/observable/bindCallback.js.map deleted file mode 100644 index 084ab86..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/bindCallback.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bindCallback.js","sourceRoot":"","sources":["../../../../src/internal/observable/bindCallback.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AA2IhE,MAAM,UAAU,YAAY,CAC1B,YAAkE,EAClE,cAA0D,EAC1D,SAAyB;IAEzB,OAAO,qBAAqB,CAAC,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;AAC/E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/bindCallbackInternals.js b/node_modules/rxjs/dist/esm5/internal/observable/bindCallbackInternals.js deleted file mode 100644 index 659f5f3..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/bindCallbackInternals.js +++ /dev/null @@ -1,79 +0,0 @@ -import { __read, __spreadArray } from "tslib"; -import { isScheduler } from '../util/isScheduler'; -import { Observable } from '../Observable'; -import { subscribeOn } from '../operators/subscribeOn'; -import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; -import { observeOn } from '../operators/observeOn'; -import { AsyncSubject } from '../AsyncSubject'; -export function bindCallbackInternals(isNodeStyle, callbackFunc, resultSelector, scheduler) { - if (resultSelector) { - if (isScheduler(resultSelector)) { - scheduler = resultSelector; - } - else { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return bindCallbackInternals(isNodeStyle, callbackFunc, scheduler) - .apply(this, args) - .pipe(mapOneOrManyArgs(resultSelector)); - }; - } - } - if (scheduler) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return bindCallbackInternals(isNodeStyle, callbackFunc) - .apply(this, args) - .pipe(subscribeOn(scheduler), observeOn(scheduler)); - }; - } - return function () { - var _this = this; - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var subject = new AsyncSubject(); - var uninitialized = true; - return new Observable(function (subscriber) { - var subs = subject.subscribe(subscriber); - if (uninitialized) { - uninitialized = false; - var isAsync_1 = false; - var isComplete_1 = false; - callbackFunc.apply(_this, __spreadArray(__spreadArray([], __read(args)), [ - function () { - var results = []; - for (var _i = 0; _i < arguments.length; _i++) { - results[_i] = arguments[_i]; - } - if (isNodeStyle) { - var err = results.shift(); - if (err != null) { - subject.error(err); - return; - } - } - subject.next(1 < results.length ? results : results[0]); - isComplete_1 = true; - if (isAsync_1) { - subject.complete(); - } - }, - ])); - if (isComplete_1) { - subject.complete(); - } - isAsync_1 = true; - } - return subs; - }); - }; -} -//# sourceMappingURL=bindCallbackInternals.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/bindCallbackInternals.js.map b/node_modules/rxjs/dist/esm5/internal/observable/bindCallbackInternals.js.map deleted file mode 100644 index cc1fc69..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/bindCallbackInternals.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bindCallbackInternals.js","sourceRoot":"","sources":["../../../../src/internal/observable/bindCallbackInternals.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,UAAU,qBAAqB,CACnC,WAAoB,EACpB,YAAiB,EACjB,cAAoB,EACpB,SAAyB;IAEzB,IAAI,cAAc,EAAE;QAClB,IAAI,WAAW,CAAC,cAAc,CAAC,EAAE;YAC/B,SAAS,GAAG,cAAc,CAAC;SAC5B;aAAM;YAEL,OAAO;gBAAqB,cAAc;qBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;oBAAd,yBAAc;;gBACxC,OAAQ,qBAAqB,CAAC,WAAW,EAAE,YAAY,EAAE,SAAS,CAAS;qBACxE,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC;qBACjB,IAAI,CAAC,gBAAgB,CAAC,cAAqB,CAAC,CAAC,CAAC;YACnD,CAAC,CAAC;SACH;KACF;IAID,IAAI,SAAS,EAAE;QACb,OAAO;YAAqB,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;YACxC,OAAQ,qBAAqB,CAAC,WAAW,EAAE,YAAY,CAAS;iBAC7D,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC;iBACjB,IAAI,CAAC,WAAW,CAAC,SAAU,CAAC,EAAE,SAAS,CAAC,SAAU,CAAC,CAAC,CAAC;QAC1D,CAAC,CAAC;KACH;IAED,OAAO;QAAA,iBAgFN;QAhF2B,cAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,yBAAc;;QAGxC,IAAM,OAAO,GAAG,IAAI,YAAY,EAAO,CAAC;QAGxC,IAAI,aAAa,GAAG,IAAI,CAAC;QACzB,OAAO,IAAI,UAAU,CAAC,UAAC,UAAU;YAE/B,IAAM,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;YAE3C,IAAI,aAAa,EAAE;gBACjB,aAAa,GAAG,KAAK,CAAC;gBAMtB,IAAI,SAAO,GAAG,KAAK,CAAC;gBAGpB,IAAI,YAAU,GAAG,KAAK,CAAC;gBAKvB,YAAY,CAAC,KAAK,CAEhB,KAAI,yCAGC,IAAI;oBAEP;wBAAC,iBAAiB;6BAAjB,UAAiB,EAAjB,qBAAiB,EAAjB,IAAiB;4BAAjB,4BAAiB;;wBAChB,IAAI,WAAW,EAAE;4BAIf,IAAM,GAAG,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;4BAC5B,IAAI,GAAG,IAAI,IAAI,EAAE;gCACf,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gCAGnB,OAAO;6BACR;yBACF;wBAKD,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;wBAGxD,YAAU,GAAG,IAAI,CAAC;wBAMlB,IAAI,SAAO,EAAE;4BACX,OAAO,CAAC,QAAQ,EAAE,CAAC;yBACpB;oBACH,CAAC;mBAEJ,CAAC;gBAIF,IAAI,YAAU,EAAE;oBACd,OAAO,CAAC,QAAQ,EAAE,CAAC;iBACpB;gBAID,SAAO,GAAG,IAAI,CAAC;aAChB;YAGD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/bindNodeCallback.js b/node_modules/rxjs/dist/esm5/internal/observable/bindNodeCallback.js deleted file mode 100644 index e8fbf53..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/bindNodeCallback.js +++ /dev/null @@ -1,5 +0,0 @@ -import { bindCallbackInternals } from './bindCallbackInternals'; -export function bindNodeCallback(callbackFunc, resultSelector, scheduler) { - return bindCallbackInternals(true, callbackFunc, resultSelector, scheduler); -} -//# sourceMappingURL=bindNodeCallback.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/bindNodeCallback.js.map b/node_modules/rxjs/dist/esm5/internal/observable/bindNodeCallback.js.map deleted file mode 100644 index a4ff824..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/bindNodeCallback.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bindNodeCallback.js","sourceRoot":"","sources":["../../../../src/internal/observable/bindNodeCallback.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAyHhE,MAAM,UAAU,gBAAgB,CAC9B,YAA4E,EAC5E,cAA0D,EAC1D,SAAyB;IAEzB,OAAO,qBAAqB,CAAC,IAAI,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;AAC9E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js b/node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js deleted file mode 100644 index 35a4ec8..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js +++ /dev/null @@ -1,70 +0,0 @@ -import { Observable } from '../Observable'; -import { argsArgArrayOrObject } from '../util/argsArgArrayOrObject'; -import { from } from './from'; -import { identity } from '../util/identity'; -import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; -import { popResultSelector, popScheduler } from '../util/args'; -import { createObject } from '../util/createObject'; -import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; -import { executeSchedule } from '../util/executeSchedule'; -export function combineLatest() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = popScheduler(args); - var resultSelector = popResultSelector(args); - var _a = argsArgArrayOrObject(args), observables = _a.args, keys = _a.keys; - if (observables.length === 0) { - return from([], scheduler); - } - var result = new Observable(combineLatestInit(observables, scheduler, keys - ? - function (values) { return createObject(keys, values); } - : - identity)); - return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result; -} -export function combineLatestInit(observables, scheduler, valueTransform) { - if (valueTransform === void 0) { valueTransform = identity; } - return function (subscriber) { - maybeSchedule(scheduler, function () { - var length = observables.length; - var values = new Array(length); - var active = length; - var remainingFirstValues = length; - var _loop_1 = function (i) { - maybeSchedule(scheduler, function () { - var source = from(observables[i], scheduler); - var hasFirstValue = false; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - values[i] = value; - if (!hasFirstValue) { - hasFirstValue = true; - remainingFirstValues--; - } - if (!remainingFirstValues) { - subscriber.next(valueTransform(values.slice())); - } - }, function () { - if (!--active) { - subscriber.complete(); - } - })); - }, subscriber); - }; - for (var i = 0; i < length; i++) { - _loop_1(i); - } - }, subscriber); - }; -} -function maybeSchedule(scheduler, execute, subscription) { - if (scheduler) { - executeSchedule(subscription, scheduler, execute); - } - else { - execute(); - } -} -//# sourceMappingURL=combineLatest.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js.map b/node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js.map deleted file mode 100644 index 820af7f..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"combineLatest.js","sourceRoot":"","sources":["../../../../src/internal/observable/combineLatest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAwL1D,MAAM,UAAU,aAAa;IAAoC,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,yBAAc;;IAC7E,IAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,IAAM,cAAc,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAEzC,IAAA,KAA8B,oBAAoB,CAAC,IAAI,CAAC,EAAhD,WAAW,UAAA,EAAE,IAAI,UAA+B,CAAC;IAE/D,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;QAI5B,OAAO,IAAI,CAAC,EAAE,EAAE,SAAgB,CAAC,CAAC;KACnC;IAED,IAAM,MAAM,GAAG,IAAI,UAAU,CAC3B,iBAAiB,CACf,WAAoD,EACpD,SAAS,EACT,IAAI;QACF,CAAC;YACC,UAAC,MAAM,IAAK,OAAA,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,EAA1B,CAA0B;QACxC,CAAC;YACC,QAAQ,CACb,CACF,CAAC;IAEF,OAAO,cAAc,CAAC,CAAC,CAAE,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAmB,CAAC,CAAC,CAAC,MAAM,CAAC;AACpG,CAAC;AAED,MAAM,UAAU,iBAAiB,CAC/B,WAAmC,EACnC,SAAyB,EACzB,cAAiD;IAAjD,+BAAA,EAAA,yBAAiD;IAEjD,OAAO,UAAC,UAA2B;QAGjC,aAAa,CACX,SAAS,EACT;YACU,IAAA,MAAM,GAAK,WAAW,OAAhB,CAAiB;YAE/B,IAAM,MAAM,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;YAGjC,IAAI,MAAM,GAAG,MAAM,CAAC;YAIpB,IAAI,oBAAoB,GAAG,MAAM,CAAC;oCAGzB,CAAC;gBACR,aAAa,CACX,SAAS,EACT;oBACE,IAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,SAAgB,CAAC,CAAC;oBACtD,IAAI,aAAa,GAAG,KAAK,CAAC;oBAC1B,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;wBAEJ,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;wBAClB,IAAI,CAAC,aAAa,EAAE;4BAElB,aAAa,GAAG,IAAI,CAAC;4BACrB,oBAAoB,EAAE,CAAC;yBACxB;wBACD,IAAI,CAAC,oBAAoB,EAAE;4BAGzB,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;yBACjD;oBACH,CAAC,EACD;wBACE,IAAI,CAAC,EAAE,MAAM,EAAE;4BAGb,UAAU,CAAC,QAAQ,EAAE,CAAC;yBACvB;oBACH,CAAC,CACF,CACF,CAAC;gBACJ,CAAC,EACD,UAAU,CACX,CAAC;;YAlCJ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE;wBAAtB,CAAC;aAmCT;QACH,CAAC,EACD,UAAU,CACX,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAMD,SAAS,aAAa,CAAC,SAAoC,EAAE,OAAmB,EAAE,YAA0B;IAC1G,IAAI,SAAS,EAAE;QACb,eAAe,CAAC,YAAY,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;KACnD;SAAM;QACL,OAAO,EAAE,CAAC;KACX;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/concat.js b/node_modules/rxjs/dist/esm5/internal/observable/concat.js deleted file mode 100644 index 4fc8e8d..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/concat.js +++ /dev/null @@ -1,11 +0,0 @@ -import { concatAll } from '../operators/concatAll'; -import { popScheduler } from '../util/args'; -import { from } from './from'; -export function concat() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return concatAll()(from(args, popScheduler(args))); -} -//# sourceMappingURL=concat.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/concat.js.map b/node_modules/rxjs/dist/esm5/internal/observable/concat.js.map deleted file mode 100644 index bd20f15..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/concat.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concat.js","sourceRoot":"","sources":["../../../../src/internal/observable/concat.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AA4G9B,MAAM,UAAU,MAAM;IAAC,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,yBAAc;;IACnC,OAAO,SAAS,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACrD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/connectable.js b/node_modules/rxjs/dist/esm5/internal/observable/connectable.js deleted file mode 100644 index 3600641..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/connectable.js +++ /dev/null @@ -1,27 +0,0 @@ -import { Subject } from '../Subject'; -import { Observable } from '../Observable'; -import { defer } from './defer'; -var DEFAULT_CONFIG = { - connector: function () { return new Subject(); }, - resetOnDisconnect: true, -}; -export function connectable(source, config) { - if (config === void 0) { config = DEFAULT_CONFIG; } - var connection = null; - var connector = config.connector, _a = config.resetOnDisconnect, resetOnDisconnect = _a === void 0 ? true : _a; - var subject = connector(); - var result = new Observable(function (subscriber) { - return subject.subscribe(subscriber); - }); - result.connect = function () { - if (!connection || connection.closed) { - connection = defer(function () { return source; }).subscribe(subject); - if (resetOnDisconnect) { - connection.add(function () { return (subject = connector()); }); - } - } - return connection; - }; - return result; -} -//# sourceMappingURL=connectable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/connectable.js.map b/node_modules/rxjs/dist/esm5/internal/observable/connectable.js.map deleted file mode 100644 index 596f951..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/connectable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"connectable.js","sourceRoot":"","sources":["../../../../src/internal/observable/connectable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAsBhC,IAAM,cAAc,GAA+B;IACjD,SAAS,EAAE,cAAM,OAAA,IAAI,OAAO,EAAW,EAAtB,CAAsB;IACvC,iBAAiB,EAAE,IAAI;CACxB,CAAC;AAUF,MAAM,UAAU,WAAW,CAAI,MAA0B,EAAE,MAA6C;IAA7C,uBAAA,EAAA,uBAA6C;IAEtG,IAAI,UAAU,GAAwB,IAAI,CAAC;IACnC,IAAA,SAAS,GAA+B,MAAM,UAArC,EAAE,KAA6B,MAAM,kBAAX,EAAxB,iBAAiB,mBAAG,IAAI,KAAA,CAAY;IACvD,IAAI,OAAO,GAAG,SAAS,EAAE,CAAC;IAE1B,IAAM,MAAM,GAAQ,IAAI,UAAU,CAAI,UAAC,UAAU;QAC/C,OAAO,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;IAKH,MAAM,CAAC,OAAO,GAAG;QACf,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,EAAE;YACpC,UAAU,GAAG,KAAK,CAAC,cAAM,OAAA,MAAM,EAAN,CAAM,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;YACpD,IAAI,iBAAiB,EAAE;gBACrB,UAAU,CAAC,GAAG,CAAC,cAAM,OAAA,CAAC,OAAO,GAAG,SAAS,EAAE,CAAC,EAAvB,CAAuB,CAAC,CAAC;aAC/C;SACF;QACD,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/defer.js b/node_modules/rxjs/dist/esm5/internal/observable/defer.js deleted file mode 100644 index b0a600e..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/defer.js +++ /dev/null @@ -1,8 +0,0 @@ -import { Observable } from '../Observable'; -import { innerFrom } from './innerFrom'; -export function defer(observableFactory) { - return new Observable(function (subscriber) { - innerFrom(observableFactory()).subscribe(subscriber); - }); -} -//# sourceMappingURL=defer.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/defer.js.map b/node_modules/rxjs/dist/esm5/internal/observable/defer.js.map deleted file mode 100644 index fa7af1a..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/defer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defer.js","sourceRoot":"","sources":["../../../../src/internal/observable/defer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAiDxC,MAAM,UAAU,KAAK,CAAiC,iBAA0B;IAC9E,OAAO,IAAI,UAAU,CAAqB,UAAC,UAAU;QACnD,SAAS,CAAC,iBAAiB,EAAE,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/dom/WebSocketSubject.js b/node_modules/rxjs/dist/esm5/internal/observable/dom/WebSocketSubject.js deleted file mode 100644 index cbce16e..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/dom/WebSocketSubject.js +++ /dev/null @@ -1,221 +0,0 @@ -import { __assign, __extends } from "tslib"; -import { Subject, AnonymousSubject } from '../../Subject'; -import { Subscriber } from '../../Subscriber'; -import { Observable } from '../../Observable'; -import { Subscription } from '../../Subscription'; -import { ReplaySubject } from '../../ReplaySubject'; -var DEFAULT_WEBSOCKET_CONFIG = { - url: '', - deserializer: function (e) { return JSON.parse(e.data); }, - serializer: function (value) { return JSON.stringify(value); }, -}; -var WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }'; -var WebSocketSubject = (function (_super) { - __extends(WebSocketSubject, _super); - function WebSocketSubject(urlConfigOrSource, destination) { - var _this = _super.call(this) || this; - _this._socket = null; - if (urlConfigOrSource instanceof Observable) { - _this.destination = destination; - _this.source = urlConfigOrSource; - } - else { - var config = (_this._config = __assign({}, DEFAULT_WEBSOCKET_CONFIG)); - _this._output = new Subject(); - if (typeof urlConfigOrSource === 'string') { - config.url = urlConfigOrSource; - } - else { - for (var key in urlConfigOrSource) { - if (urlConfigOrSource.hasOwnProperty(key)) { - config[key] = urlConfigOrSource[key]; - } - } - } - if (!config.WebSocketCtor && WebSocket) { - config.WebSocketCtor = WebSocket; - } - else if (!config.WebSocketCtor) { - throw new Error('no WebSocket constructor can be found'); - } - _this.destination = new ReplaySubject(); - } - return _this; - } - WebSocketSubject.prototype.lift = function (operator) { - var sock = new WebSocketSubject(this._config, this.destination); - sock.operator = operator; - sock.source = this; - return sock; - }; - WebSocketSubject.prototype._resetState = function () { - this._socket = null; - if (!this.source) { - this.destination = new ReplaySubject(); - } - this._output = new Subject(); - }; - WebSocketSubject.prototype.multiplex = function (subMsg, unsubMsg, messageFilter) { - var self = this; - return new Observable(function (observer) { - try { - self.next(subMsg()); - } - catch (err) { - observer.error(err); - } - var subscription = self.subscribe({ - next: function (x) { - try { - if (messageFilter(x)) { - observer.next(x); - } - } - catch (err) { - observer.error(err); - } - }, - error: function (err) { return observer.error(err); }, - complete: function () { return observer.complete(); }, - }); - return function () { - try { - self.next(unsubMsg()); - } - catch (err) { - observer.error(err); - } - subscription.unsubscribe(); - }; - }); - }; - WebSocketSubject.prototype._connectSocket = function () { - var _this = this; - var _a = this._config, WebSocketCtor = _a.WebSocketCtor, protocol = _a.protocol, url = _a.url, binaryType = _a.binaryType; - var observer = this._output; - var socket = null; - try { - socket = protocol ? new WebSocketCtor(url, protocol) : new WebSocketCtor(url); - this._socket = socket; - if (binaryType) { - this._socket.binaryType = binaryType; - } - } - catch (e) { - observer.error(e); - return; - } - var subscription = new Subscription(function () { - _this._socket = null; - if (socket && socket.readyState === 1) { - socket.close(); - } - }); - socket.onopen = function (evt) { - var _socket = _this._socket; - if (!_socket) { - socket.close(); - _this._resetState(); - return; - } - var openObserver = _this._config.openObserver; - if (openObserver) { - openObserver.next(evt); - } - var queue = _this.destination; - _this.destination = Subscriber.create(function (x) { - if (socket.readyState === 1) { - try { - var serializer = _this._config.serializer; - socket.send(serializer(x)); - } - catch (e) { - _this.destination.error(e); - } - } - }, function (err) { - var closingObserver = _this._config.closingObserver; - if (closingObserver) { - closingObserver.next(undefined); - } - if (err && err.code) { - socket.close(err.code, err.reason); - } - else { - observer.error(new TypeError(WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT)); - } - _this._resetState(); - }, function () { - var closingObserver = _this._config.closingObserver; - if (closingObserver) { - closingObserver.next(undefined); - } - socket.close(); - _this._resetState(); - }); - if (queue && queue instanceof ReplaySubject) { - subscription.add(queue.subscribe(_this.destination)); - } - }; - socket.onerror = function (e) { - _this._resetState(); - observer.error(e); - }; - socket.onclose = function (e) { - if (socket === _this._socket) { - _this._resetState(); - } - var closeObserver = _this._config.closeObserver; - if (closeObserver) { - closeObserver.next(e); - } - if (e.wasClean) { - observer.complete(); - } - else { - observer.error(e); - } - }; - socket.onmessage = function (e) { - try { - var deserializer = _this._config.deserializer; - observer.next(deserializer(e)); - } - catch (err) { - observer.error(err); - } - }; - }; - WebSocketSubject.prototype._subscribe = function (subscriber) { - var _this = this; - var source = this.source; - if (source) { - return source.subscribe(subscriber); - } - if (!this._socket) { - this._connectSocket(); - } - this._output.subscribe(subscriber); - subscriber.add(function () { - var _socket = _this._socket; - if (_this._output.observers.length === 0) { - if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) { - _socket.close(); - } - _this._resetState(); - } - }); - return subscriber; - }; - WebSocketSubject.prototype.unsubscribe = function () { - var _socket = this._socket; - if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) { - _socket.close(); - } - this._resetState(); - _super.prototype.unsubscribe.call(this); - }; - return WebSocketSubject; -}(AnonymousSubject)); -export { WebSocketSubject }; -//# sourceMappingURL=WebSocketSubject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/dom/WebSocketSubject.js.map b/node_modules/rxjs/dist/esm5/internal/observable/dom/WebSocketSubject.js.map deleted file mode 100644 index 005a2c3..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/dom/WebSocketSubject.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"WebSocketSubject.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/WebSocketSubject.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AA4IpD,IAAM,wBAAwB,GAAgC;IAC5D,GAAG,EAAE,EAAE;IACP,YAAY,EAAE,UAAC,CAAe,IAAK,OAAA,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,EAAlB,CAAkB;IACrD,UAAU,EAAE,UAAC,KAAU,IAAK,OAAA,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAArB,CAAqB;CAClD,CAAC;AAEF,IAAM,qCAAqC,GACzC,mIAAmI,CAAC;AAItI;IAAyC,oCAAmB;IAU1D,0BAAY,iBAAqE,EAAE,WAAyB;QAA5G,YACE,iBAAO,SAwBR;QA3BO,aAAO,GAAqB,IAAI,CAAC;QAIvC,IAAI,iBAAiB,YAAY,UAAU,EAAE;YAC3C,KAAI,CAAC,WAAW,GAAG,WAAW,CAAC;YAC/B,KAAI,CAAC,MAAM,GAAG,iBAAkC,CAAC;SAClD;aAAM;YACL,IAAM,MAAM,GAAG,CAAC,KAAI,CAAC,OAAO,gBAAQ,wBAAwB,CAAE,CAAC,CAAC;YAChE,KAAI,CAAC,OAAO,GAAG,IAAI,OAAO,EAAK,CAAC;YAChC,IAAI,OAAO,iBAAiB,KAAK,QAAQ,EAAE;gBACzC,MAAM,CAAC,GAAG,GAAG,iBAAiB,CAAC;aAChC;iBAAM;gBACL,KAAK,IAAM,GAAG,IAAI,iBAAiB,EAAE;oBACnC,IAAI,iBAAiB,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;wBACxC,MAAc,CAAC,GAAG,CAAC,GAAI,iBAAyB,CAAC,GAAG,CAAC,CAAC;qBACxD;iBACF;aACF;YAED,IAAI,CAAC,MAAM,CAAC,aAAa,IAAI,SAAS,EAAE;gBACtC,MAAM,CAAC,aAAa,GAAG,SAAS,CAAC;aAClC;iBAAM,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE;gBAChC,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;aAC1D;YACD,KAAI,CAAC,WAAW,GAAG,IAAI,aAAa,EAAE,CAAC;SACxC;;IACH,CAAC;IAGD,+BAAI,GAAJ,UAAQ,QAAwB;QAC9B,IAAM,IAAI,GAAG,IAAI,gBAAgB,CAAI,IAAI,CAAC,OAAsC,EAAE,IAAI,CAAC,WAAkB,CAAC,CAAC;QAC3G,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,sCAAW,GAAnB;QACE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,IAAI,CAAC,WAAW,GAAG,IAAI,aAAa,EAAE,CAAC;SACxC;QACD,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,EAAK,CAAC;IAClC,CAAC;IAoBD,oCAAS,GAAT,UAAU,MAAiB,EAAE,QAAmB,EAAE,aAAoC;QACpF,IAAM,IAAI,GAAG,IAAI,CAAC;QAClB,OAAO,IAAI,UAAU,CAAC,UAAC,QAAqB;YAC1C,IAAI;gBACF,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;aACrB;YAAC,OAAO,GAAG,EAAE;gBACZ,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aACrB;YAED,IAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC;gBAClC,IAAI,EAAE,UAAC,CAAC;oBACN,IAAI;wBACF,IAAI,aAAa,CAAC,CAAC,CAAC,EAAE;4BACpB,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;yBAClB;qBACF;oBAAC,OAAO,GAAG,EAAE;wBACZ,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;qBACrB;gBACH,CAAC;gBACD,KAAK,EAAE,UAAC,GAAG,IAAK,OAAA,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,EAAnB,CAAmB;gBACnC,QAAQ,EAAE,cAAM,OAAA,QAAQ,CAAC,QAAQ,EAAE,EAAnB,CAAmB;aACpC,CAAC,CAAC;YAEH,OAAO;gBACL,IAAI;oBACF,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;iBACvB;gBAAC,OAAO,GAAG,EAAE;oBACZ,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACrB;gBACD,YAAY,CAAC,WAAW,EAAE,CAAC;YAC7B,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,yCAAc,GAAtB;QAAA,iBAuGC;QAtGO,IAAA,KAA+C,IAAI,CAAC,OAAO,EAAzD,aAAa,mBAAA,EAAE,QAAQ,cAAA,EAAE,GAAG,SAAA,EAAE,UAAU,gBAAiB,CAAC;QAClE,IAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC;QAE9B,IAAI,MAAM,GAAqB,IAAI,CAAC;QACpC,IAAI;YACF,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,aAAc,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,aAAc,CAAC,GAAG,CAAC,CAAC;YAChF,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;YACtB,IAAI,UAAU,EAAE;gBACd,IAAI,CAAC,OAAO,CAAC,UAAU,GAAG,UAAU,CAAC;aACtC;SACF;QAAC,OAAO,CAAC,EAAE;YACV,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAClB,OAAO;SACR;QAED,IAAM,YAAY,GAAG,IAAI,YAAY,CAAC;YACpC,KAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YACpB,IAAI,MAAM,IAAI,MAAM,CAAC,UAAU,KAAK,CAAC,EAAE;gBACrC,MAAM,CAAC,KAAK,EAAE,CAAC;aAChB;QACH,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,GAAG,UAAC,GAAU;YACjB,IAAA,OAAO,GAAK,KAAI,QAAT,CAAU;YACzB,IAAI,CAAC,OAAO,EAAE;gBACZ,MAAO,CAAC,KAAK,EAAE,CAAC;gBAChB,KAAI,CAAC,WAAW,EAAE,CAAC;gBACnB,OAAO;aACR;YACO,IAAA,YAAY,GAAK,KAAI,CAAC,OAAO,aAAjB,CAAkB;YACtC,IAAI,YAAY,EAAE;gBAChB,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aACxB;YAED,IAAM,KAAK,GAAG,KAAI,CAAC,WAAW,CAAC;YAE/B,KAAI,CAAC,WAAW,GAAG,UAAU,CAAC,MAAM,CAClC,UAAC,CAAC;gBACA,IAAI,MAAO,CAAC,UAAU,KAAK,CAAC,EAAE;oBAC5B,IAAI;wBACM,IAAA,UAAU,GAAK,KAAI,CAAC,OAAO,WAAjB,CAAkB;wBACpC,MAAO,CAAC,IAAI,CAAC,UAAW,CAAC,CAAE,CAAC,CAAC,CAAC;qBAC/B;oBAAC,OAAO,CAAC,EAAE;wBACV,KAAI,CAAC,WAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;qBAC5B;iBACF;YACH,CAAC,EACD,UAAC,GAAG;gBACM,IAAA,eAAe,GAAK,KAAI,CAAC,OAAO,gBAAjB,CAAkB;gBACzC,IAAI,eAAe,EAAE;oBACnB,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;iBACjC;gBACD,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE;oBACnB,MAAO,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;iBACrC;qBAAM;oBACL,QAAQ,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,qCAAqC,CAAC,CAAC,CAAC;iBACtE;gBACD,KAAI,CAAC,WAAW,EAAE,CAAC;YACrB,CAAC,EACD;gBACU,IAAA,eAAe,GAAK,KAAI,CAAC,OAAO,gBAAjB,CAAkB;gBACzC,IAAI,eAAe,EAAE;oBACnB,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;iBACjC;gBACD,MAAO,CAAC,KAAK,EAAE,CAAC;gBAChB,KAAI,CAAC,WAAW,EAAE,CAAC;YACrB,CAAC,CACiB,CAAC;YAErB,IAAI,KAAK,IAAI,KAAK,YAAY,aAAa,EAAE;gBAC3C,YAAY,CAAC,GAAG,CAAE,KAA0B,CAAC,SAAS,CAAC,KAAI,CAAC,WAAW,CAAC,CAAC,CAAC;aAC3E;QACH,CAAC,CAAC;QAEF,MAAM,CAAC,OAAO,GAAG,UAAC,CAAQ;YACxB,KAAI,CAAC,WAAW,EAAE,CAAC;YACnB,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC,CAAC;QAEF,MAAM,CAAC,OAAO,GAAG,UAAC,CAAa;YAC7B,IAAI,MAAM,KAAK,KAAI,CAAC,OAAO,EAAE;gBAC3B,KAAI,CAAC,WAAW,EAAE,CAAC;aACpB;YACO,IAAA,aAAa,GAAK,KAAI,CAAC,OAAO,cAAjB,CAAkB;YACvC,IAAI,aAAa,EAAE;gBACjB,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aACvB;YACD,IAAI,CAAC,CAAC,QAAQ,EAAE;gBACd,QAAQ,CAAC,QAAQ,EAAE,CAAC;aACrB;iBAAM;gBACL,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;aACnB;QACH,CAAC,CAAC;QAEF,MAAM,CAAC,SAAS,GAAG,UAAC,CAAe;YACjC,IAAI;gBACM,IAAA,YAAY,GAAK,KAAI,CAAC,OAAO,aAAjB,CAAkB;gBACtC,QAAQ,CAAC,IAAI,CAAC,YAAa,CAAC,CAAC,CAAC,CAAC,CAAC;aACjC;YAAC,OAAO,GAAG,EAAE;gBACZ,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aACrB;QACH,CAAC,CAAC;IACJ,CAAC;IAGS,qCAAU,GAApB,UAAqB,UAAyB;QAA9C,iBAmBC;QAlBS,IAAA,MAAM,GAAK,IAAI,OAAT,CAAU;QACxB,IAAI,MAAM,EAAE;YACV,OAAO,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;SACrC;QACD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACjB,IAAI,CAAC,cAAc,EAAE,CAAC;SACvB;QACD,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QACnC,UAAU,CAAC,GAAG,CAAC;YACL,IAAA,OAAO,GAAK,KAAI,QAAT,CAAU;YACzB,IAAI,KAAI,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;gBACvC,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,KAAK,CAAC,IAAI,OAAO,CAAC,UAAU,KAAK,CAAC,CAAC,EAAE;oBACrE,OAAO,CAAC,KAAK,EAAE,CAAC;iBACjB;gBACD,KAAI,CAAC,WAAW,EAAE,CAAC;aACpB;QACH,CAAC,CAAC,CAAC;QACH,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,sCAAW,GAAX;QACU,IAAA,OAAO,GAAK,IAAI,QAAT,CAAU;QACzB,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,KAAK,CAAC,IAAI,OAAO,CAAC,UAAU,KAAK,CAAC,CAAC,EAAE;YACrE,OAAO,CAAC,KAAK,EAAE,CAAC;SACjB;QACD,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,iBAAM,WAAW,WAAE,CAAC;IACtB,CAAC;IACH,uBAAC;AAAD,CAAC,AAhPD,CAAyC,gBAAgB,GAgPxD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/dom/animationFrames.js b/node_modules/rxjs/dist/esm5/internal/observable/dom/animationFrames.js deleted file mode 100644 index 8fec6cd..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/dom/animationFrames.js +++ /dev/null @@ -1,34 +0,0 @@ -import { Observable } from '../../Observable'; -import { performanceTimestampProvider } from '../../scheduler/performanceTimestampProvider'; -import { animationFrameProvider } from '../../scheduler/animationFrameProvider'; -export function animationFrames(timestampProvider) { - return timestampProvider ? animationFramesFactory(timestampProvider) : DEFAULT_ANIMATION_FRAMES; -} -function animationFramesFactory(timestampProvider) { - return new Observable(function (subscriber) { - var provider = timestampProvider || performanceTimestampProvider; - var start = provider.now(); - var id = 0; - var run = function () { - if (!subscriber.closed) { - id = animationFrameProvider.requestAnimationFrame(function (timestamp) { - id = 0; - var now = provider.now(); - subscriber.next({ - timestamp: timestampProvider ? now : timestamp, - elapsed: now - start, - }); - run(); - }); - } - }; - run(); - return function () { - if (id) { - animationFrameProvider.cancelAnimationFrame(id); - } - }; - }); -} -var DEFAULT_ANIMATION_FRAMES = animationFramesFactory(); -//# sourceMappingURL=animationFrames.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/dom/animationFrames.js.map b/node_modules/rxjs/dist/esm5/internal/observable/dom/animationFrames.js.map deleted file mode 100644 index e5af4e4..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/dom/animationFrames.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"animationFrames.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/animationFrames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAuEhF,MAAM,UAAU,eAAe,CAAC,iBAAqC;IACnE,OAAO,iBAAiB,CAAC,CAAC,CAAC,sBAAsB,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,wBAAwB,CAAC;AAClG,CAAC;AAMD,SAAS,sBAAsB,CAAC,iBAAqC;IACnE,OAAO,IAAI,UAAU,CAAyC,UAAC,UAAU;QAIvE,IAAM,QAAQ,GAAG,iBAAiB,IAAI,4BAA4B,CAAC;QAMnE,IAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC;QAE7B,IAAI,EAAE,GAAG,CAAC,CAAC;QACX,IAAM,GAAG,GAAG;YACV,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;gBACtB,EAAE,GAAG,sBAAsB,CAAC,qBAAqB,CAAC,UAAC,SAAuC;oBACxF,EAAE,GAAG,CAAC,CAAC;oBAQP,IAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC;oBAC3B,UAAU,CAAC,IAAI,CAAC;wBACd,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS;wBAC9C,OAAO,EAAE,GAAG,GAAG,KAAK;qBACrB,CAAC,CAAC;oBACH,GAAG,EAAE,CAAC;gBACR,CAAC,CAAC,CAAC;aACJ;QACH,CAAC,CAAC;QAEF,GAAG,EAAE,CAAC;QAEN,OAAO;YACL,IAAI,EAAE,EAAE;gBACN,sBAAsB,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAC;aACjD;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAMD,IAAM,wBAAwB,GAAG,sBAAsB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/dom/fetch.js b/node_modules/rxjs/dist/esm5/internal/observable/dom/fetch.js deleted file mode 100644 index ff9361e..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/dom/fetch.js +++ /dev/null @@ -1,54 +0,0 @@ -import { __assign, __rest } from "tslib"; -import { createOperatorSubscriber } from '../../operators/OperatorSubscriber'; -import { Observable } from '../../Observable'; -import { innerFrom } from '../../observable/innerFrom'; -export function fromFetch(input, initWithSelector) { - if (initWithSelector === void 0) { initWithSelector = {}; } - var selector = initWithSelector.selector, init = __rest(initWithSelector, ["selector"]); - return new Observable(function (subscriber) { - var controller = new AbortController(); - var signal = controller.signal; - var abortable = true; - var outerSignal = init.signal; - if (outerSignal) { - if (outerSignal.aborted) { - controller.abort(); - } - else { - var outerSignalHandler_1 = function () { - if (!signal.aborted) { - controller.abort(); - } - }; - outerSignal.addEventListener('abort', outerSignalHandler_1); - subscriber.add(function () { return outerSignal.removeEventListener('abort', outerSignalHandler_1); }); - } - } - var perSubscriberInit = __assign(__assign({}, init), { signal: signal }); - var handleError = function (err) { - abortable = false; - subscriber.error(err); - }; - fetch(input, perSubscriberInit) - .then(function (response) { - if (selector) { - innerFrom(selector(response)).subscribe(createOperatorSubscriber(subscriber, undefined, function () { - abortable = false; - subscriber.complete(); - }, handleError)); - } - else { - abortable = false; - subscriber.next(response); - subscriber.complete(); - } - }) - .catch(handleError); - return function () { - if (abortable) { - controller.abort(); - } - }; - }); -} -//# sourceMappingURL=fetch.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/dom/fetch.js.map b/node_modules/rxjs/dist/esm5/internal/observable/dom/fetch.js.map deleted file mode 100644 index c402c03..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/dom/fetch.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/fetch.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AA4FvD,MAAM,UAAU,SAAS,CACvB,KAAuB,EACvB,gBAEM;IAFN,iCAAA,EAAA,qBAEM;IAEE,IAAA,QAAQ,GAAc,gBAAgB,SAA9B,EAAK,IAAI,UAAK,gBAAgB,EAAxC,YAAqB,CAAF,CAAsB;IAC/C,OAAO,IAAI,UAAU,CAAe,UAAC,UAAU;QAK7C,IAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;QACjC,IAAA,MAAM,GAAK,UAAU,OAAf,CAAgB;QAK9B,IAAI,SAAS,GAAG,IAAI,CAAC;QAKb,IAAQ,WAAW,GAAK,IAAI,OAAT,CAAU;QACrC,IAAI,WAAW,EAAE;YACf,IAAI,WAAW,CAAC,OAAO,EAAE;gBACvB,UAAU,CAAC,KAAK,EAAE,CAAC;aACpB;iBAAM;gBAGL,IAAM,oBAAkB,GAAG;oBACzB,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;wBACnB,UAAU,CAAC,KAAK,EAAE,CAAC;qBACpB;gBACH,CAAC,CAAC;gBACF,WAAW,CAAC,gBAAgB,CAAC,OAAO,EAAE,oBAAkB,CAAC,CAAC;gBAC1D,UAAU,CAAC,GAAG,CAAC,cAAM,OAAA,WAAW,CAAC,mBAAmB,CAAC,OAAO,EAAE,oBAAkB,CAAC,EAA5D,CAA4D,CAAC,CAAC;aACpF;SACF;QAOD,IAAM,iBAAiB,yBAAqB,IAAI,KAAE,MAAM,QAAA,GAAE,CAAC;QAE3D,IAAM,WAAW,GAAG,UAAC,GAAQ;YAC3B,SAAS,GAAG,KAAK,CAAC;YAClB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,CAAC;QAEF,KAAK,CAAC,KAAK,EAAE,iBAAiB,CAAC;aAC5B,IAAI,CAAC,UAAC,QAAQ;YACb,IAAI,QAAQ,EAAE;gBAIZ,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CACrC,wBAAwB,CACtB,UAAU,EAEV,SAAS,EAET;oBACE,SAAS,GAAG,KAAK,CAAC;oBAClB,UAAU,CAAC,QAAQ,EAAE,CAAC;gBACxB,CAAC,EACD,WAAW,CACZ,CACF,CAAC;aACH;iBAAM;gBACL,SAAS,GAAG,KAAK,CAAC;gBAClB,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAC1B,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,CAAC;aACD,KAAK,CAAC,WAAW,CAAC,CAAC;QAEtB,OAAO;YACL,IAAI,SAAS,EAAE;gBACb,UAAU,CAAC,KAAK,EAAE,CAAC;aACpB;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/dom/webSocket.js b/node_modules/rxjs/dist/esm5/internal/observable/dom/webSocket.js deleted file mode 100644 index 73a51ab..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/dom/webSocket.js +++ /dev/null @@ -1,5 +0,0 @@ -import { WebSocketSubject } from './WebSocketSubject'; -export function webSocket(urlConfigOrSource) { - return new WebSocketSubject(urlConfigOrSource); -} -//# sourceMappingURL=webSocket.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/dom/webSocket.js.map b/node_modules/rxjs/dist/esm5/internal/observable/dom/webSocket.js.map deleted file mode 100644 index f284743..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/dom/webSocket.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"webSocket.js","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/webSocket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAA0B,MAAM,oBAAoB,CAAC;AA8J9E,MAAM,UAAU,SAAS,CAAI,iBAAqD;IAChF,OAAO,IAAI,gBAAgB,CAAI,iBAAiB,CAAC,CAAC;AACpD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/empty.js b/node_modules/rxjs/dist/esm5/internal/observable/empty.js deleted file mode 100644 index 7d889fc..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/empty.js +++ /dev/null @@ -1,9 +0,0 @@ -import { Observable } from '../Observable'; -export var EMPTY = new Observable(function (subscriber) { return subscriber.complete(); }); -export function empty(scheduler) { - return scheduler ? emptyScheduled(scheduler) : EMPTY; -} -function emptyScheduled(scheduler) { - return new Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); }); -} -//# sourceMappingURL=empty.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map b/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map deleted file mode 100644 index c29b948..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"empty.js","sourceRoot":"","sources":["../../../../src/internal/observable/empty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAiE3C,MAAM,CAAC,IAAM,KAAK,GAAG,IAAI,UAAU,CAAQ,UAAC,UAAU,IAAK,OAAA,UAAU,CAAC,QAAQ,EAAE,EAArB,CAAqB,CAAC,CAAC;AAOlF,MAAM,UAAU,KAAK,CAAC,SAAyB;IAC7C,OAAO,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AACvD,CAAC;AAED,SAAS,cAAc,CAAC,SAAwB;IAC9C,OAAO,IAAI,UAAU,CAAQ,UAAC,UAAU,IAAK,OAAA,SAAS,CAAC,QAAQ,CAAC,cAAM,OAAA,UAAU,CAAC,QAAQ,EAAE,EAArB,CAAqB,CAAC,EAA/C,CAA+C,CAAC,CAAC;AAChG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/forkJoin.js b/node_modules/rxjs/dist/esm5/internal/observable/forkJoin.js deleted file mode 100644 index 3337e2c..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/forkJoin.js +++ /dev/null @@ -1,47 +0,0 @@ -import { Observable } from '../Observable'; -import { argsArgArrayOrObject } from '../util/argsArgArrayOrObject'; -import { innerFrom } from './innerFrom'; -import { popResultSelector } from '../util/args'; -import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; -import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; -import { createObject } from '../util/createObject'; -export function forkJoin() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var resultSelector = popResultSelector(args); - var _a = argsArgArrayOrObject(args), sources = _a.args, keys = _a.keys; - var result = new Observable(function (subscriber) { - var length = sources.length; - if (!length) { - subscriber.complete(); - return; - } - var values = new Array(length); - var remainingCompletions = length; - var remainingEmissions = length; - var _loop_1 = function (sourceIndex) { - var hasValue = false; - innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, function (value) { - if (!hasValue) { - hasValue = true; - remainingEmissions--; - } - values[sourceIndex] = value; - }, function () { return remainingCompletions--; }, undefined, function () { - if (!remainingCompletions || !hasValue) { - if (!remainingEmissions) { - subscriber.next(keys ? createObject(keys, values) : values); - } - subscriber.complete(); - } - })); - }; - for (var sourceIndex = 0; sourceIndex < length; sourceIndex++) { - _loop_1(sourceIndex); - } - }); - return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result; -} -//# sourceMappingURL=forkJoin.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/forkJoin.js.map b/node_modules/rxjs/dist/esm5/internal/observable/forkJoin.js.map deleted file mode 100644 index 01ce0f5..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/forkJoin.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"forkJoin.js","sourceRoot":"","sources":["../../../../src/internal/observable/forkJoin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAyIpD,MAAM,UAAU,QAAQ;IAAC,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,yBAAc;;IACrC,IAAM,cAAc,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACzC,IAAA,KAA0B,oBAAoB,CAAC,IAAI,CAAC,EAA5C,OAAO,UAAA,EAAE,IAAI,UAA+B,CAAC;IAC3D,IAAM,MAAM,GAAG,IAAI,UAAU,CAAC,UAAC,UAAU;QAC/B,IAAA,MAAM,GAAK,OAAO,OAAZ,CAAa;QAC3B,IAAI,CAAC,MAAM,EAAE;YACX,UAAU,CAAC,QAAQ,EAAE,CAAC;YACtB,OAAO;SACR;QACD,IAAM,MAAM,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;QACjC,IAAI,oBAAoB,GAAG,MAAM,CAAC;QAClC,IAAI,kBAAkB,GAAG,MAAM,CAAC;gCACvB,WAAW;YAClB,IAAI,QAAQ,GAAG,KAAK,CAAC;YACrB,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CACvC,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;gBACJ,IAAI,CAAC,QAAQ,EAAE;oBACb,QAAQ,GAAG,IAAI,CAAC;oBAChB,kBAAkB,EAAE,CAAC;iBACtB;gBACD,MAAM,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC;YAC9B,CAAC,EACD,cAAM,OAAA,oBAAoB,EAAE,EAAtB,CAAsB,EAC5B,SAAS,EACT;gBACE,IAAI,CAAC,oBAAoB,IAAI,CAAC,QAAQ,EAAE;oBACtC,IAAI,CAAC,kBAAkB,EAAE;wBACvB,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;qBAC7D;oBACD,UAAU,CAAC,QAAQ,EAAE,CAAC;iBACvB;YACH,CAAC,CACF,CACF,CAAC;;QAvBJ,KAAK,IAAI,WAAW,GAAG,CAAC,EAAE,WAAW,GAAG,MAAM,EAAE,WAAW,EAAE;oBAApD,WAAW;SAwBnB;IACH,CAAC,CAAC,CAAC;IACH,OAAO,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AACjF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/from.js b/node_modules/rxjs/dist/esm5/internal/observable/from.js deleted file mode 100644 index 2b61be4..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/from.js +++ /dev/null @@ -1,6 +0,0 @@ -import { scheduled } from '../scheduled/scheduled'; -import { innerFrom } from './innerFrom'; -export function from(input, scheduler) { - return scheduler ? scheduled(input, scheduler) : innerFrom(input); -} -//# sourceMappingURL=from.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/from.js.map b/node_modules/rxjs/dist/esm5/internal/observable/from.js.map deleted file mode 100644 index baf621f..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/from.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"from.js","sourceRoot":"","sources":["../../../../src/internal/observable/from.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAkGxC,MAAM,UAAU,IAAI,CAAI,KAAyB,EAAE,SAAyB;IAC1E,OAAO,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AACpE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js b/node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js deleted file mode 100644 index a6835d7..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js +++ /dev/null @@ -1,59 +0,0 @@ -import { __read } from "tslib"; -import { innerFrom } from '../observable/innerFrom'; -import { Observable } from '../Observable'; -import { mergeMap } from '../operators/mergeMap'; -import { isArrayLike } from '../util/isArrayLike'; -import { isFunction } from '../util/isFunction'; -import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; -var nodeEventEmitterMethods = ['addListener', 'removeListener']; -var eventTargetMethods = ['addEventListener', 'removeEventListener']; -var jqueryMethods = ['on', 'off']; -export function fromEvent(target, eventName, options, resultSelector) { - if (isFunction(options)) { - resultSelector = options; - options = undefined; - } - if (resultSelector) { - return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector)); - } - var _a = __read(isEventTarget(target) - ? eventTargetMethods.map(function (methodName) { return function (handler) { return target[methodName](eventName, handler, options); }; }) - : - isNodeStyleEventEmitter(target) - ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) - : isJQueryStyleEventEmitter(target) - ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) - : [], 2), add = _a[0], remove = _a[1]; - if (!add) { - if (isArrayLike(target)) { - return mergeMap(function (subTarget) { return fromEvent(subTarget, eventName, options); })(innerFrom(target)); - } - } - if (!add) { - throw new TypeError('Invalid event target'); - } - return new Observable(function (subscriber) { - var handler = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return subscriber.next(1 < args.length ? args : args[0]); - }; - add(handler); - return function () { return remove(handler); }; - }); -} -function toCommonHandlerRegistry(target, eventName) { - return function (methodName) { return function (handler) { return target[methodName](eventName, handler); }; }; -} -function isNodeStyleEventEmitter(target) { - return isFunction(target.addListener) && isFunction(target.removeListener); -} -function isJQueryStyleEventEmitter(target) { - return isFunction(target.on) && isFunction(target.off); -} -function isEventTarget(target) { - return isFunction(target.addEventListener) && isFunction(target.removeEventListener); -} -//# sourceMappingURL=fromEvent.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js.map b/node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js.map deleted file mode 100644 index 0c1fc07..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fromEvent.js","sourceRoot":"","sources":["../../../../src/internal/observable/fromEvent.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,IAAM,uBAAuB,GAAG,CAAC,aAAa,EAAE,gBAAgB,CAAU,CAAC;AAC3E,IAAM,kBAAkB,GAAG,CAAC,kBAAkB,EAAE,qBAAqB,CAAU,CAAC;AAChF,IAAM,aAAa,GAAG,CAAC,IAAI,EAAE,KAAK,CAAU,CAAC;AAqO7C,MAAM,UAAU,SAAS,CACvB,MAAW,EACX,SAAiB,EACjB,OAAwD,EACxD,cAAsC;IAEtC,IAAI,UAAU,CAAC,OAAO,CAAC,EAAE;QACvB,cAAc,GAAG,OAAO,CAAC;QACzB,OAAO,GAAG,SAAS,CAAC;KACrB;IACD,IAAI,cAAc,EAAE;QAClB,OAAO,SAAS,CAAI,MAAM,EAAE,SAAS,EAAE,OAA+B,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC;KAChH;IASK,IAAA,KAAA,OAEJ,aAAa,CAAC,MAAM,CAAC;QACnB,CAAC,CAAC,kBAAkB,CAAC,GAAG,CAAC,UAAC,UAAU,IAAK,OAAA,UAAC,OAAY,IAAK,OAAA,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,OAA+B,CAAC,EAAvE,CAAuE,EAAzF,CAAyF,CAAC;QACnI,CAAC;YACD,uBAAuB,CAAC,MAAM,CAAC;gBAC/B,CAAC,CAAC,uBAAuB,CAAC,GAAG,CAAC,uBAAuB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;gBACzE,CAAC,CAAC,yBAAyB,CAAC,MAAM,CAAC;oBACnC,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,uBAAuB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;oBAC/D,CAAC,CAAC,EAAE,IAAA,EATD,GAAG,QAAA,EAAE,MAAM,QASV,CAAC;IAOT,IAAI,CAAC,GAAG,EAAE;QACR,IAAI,WAAW,CAAC,MAAM,CAAC,EAAE;YACvB,OAAO,QAAQ,CAAC,UAAC,SAAc,IAAK,OAAA,SAAS,CAAC,SAAS,EAAE,SAAS,EAAE,OAA+B,CAAC,EAAhE,CAAgE,CAAC,CACnG,SAAS,CAAC,MAAM,CAAC,CACD,CAAC;SACpB;KACF;IAID,IAAI,CAAC,GAAG,EAAE;QACR,MAAM,IAAI,SAAS,CAAC,sBAAsB,CAAC,CAAC;KAC7C;IAED,OAAO,IAAI,UAAU,CAAI,UAAC,UAAU;QAIlC,IAAM,OAAO,GAAG;YAAC,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;YAAK,OAAA,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAAjD,CAAiD,CAAC;QAEtF,GAAG,CAAC,OAAO,CAAC,CAAC;QAEb,OAAO,cAAM,OAAA,MAAO,CAAC,OAAO,CAAC,EAAhB,CAAgB,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC;AASD,SAAS,uBAAuB,CAAC,MAAW,EAAE,SAAiB;IAC7D,OAAO,UAAC,UAAkB,IAAK,OAAA,UAAC,OAAY,IAAK,OAAA,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,EAAtC,CAAsC,EAAxD,CAAwD,CAAC;AAC1F,CAAC;AAOD,SAAS,uBAAuB,CAAC,MAAW;IAC1C,OAAO,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;AAC7E,CAAC;AAOD,SAAS,yBAAyB,CAAC,MAAW;IAC5C,OAAO,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AACzD,CAAC;AAOD,SAAS,aAAa,CAAC,MAAW;IAChC,OAAO,UAAU,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;AACvF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/fromEventPattern.js b/node_modules/rxjs/dist/esm5/internal/observable/fromEventPattern.js deleted file mode 100644 index 9c16f5f..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/fromEventPattern.js +++ /dev/null @@ -1,20 +0,0 @@ -import { Observable } from '../Observable'; -import { isFunction } from '../util/isFunction'; -import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; -export function fromEventPattern(addHandler, removeHandler, resultSelector) { - if (resultSelector) { - return fromEventPattern(addHandler, removeHandler).pipe(mapOneOrManyArgs(resultSelector)); - } - return new Observable(function (subscriber) { - var handler = function () { - var e = []; - for (var _i = 0; _i < arguments.length; _i++) { - e[_i] = arguments[_i]; - } - return subscriber.next(e.length === 1 ? e[0] : e); - }; - var retValue = addHandler(handler); - return isFunction(removeHandler) ? function () { return removeHandler(handler, retValue); } : undefined; - }); -} -//# sourceMappingURL=fromEventPattern.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/fromEventPattern.js.map b/node_modules/rxjs/dist/esm5/internal/observable/fromEventPattern.js.map deleted file mode 100644 index 0387661..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/fromEventPattern.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fromEventPattern.js","sourceRoot":"","sources":["../../../../src/internal/observable/fromEventPattern.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAsI5D,MAAM,UAAU,gBAAgB,CAC9B,UAA8C,EAC9C,aAAiE,EACjE,cAAsC;IAEtC,IAAI,cAAc,EAAE;QAClB,OAAO,gBAAgB,CAAI,UAAU,EAAE,aAAa,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC;KAC9F;IAED,OAAO,IAAI,UAAU,CAAU,UAAC,UAAU;QACxC,IAAM,OAAO,GAAG;YAAC,WAAS;iBAAT,UAAS,EAAT,qBAAS,EAAT,IAAS;gBAAT,sBAAS;;YAAK,OAAA,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAA1C,CAA0C,CAAC;QAC1E,IAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;QACrC,OAAO,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,cAAM,OAAA,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAhC,CAAgC,CAAC,CAAC,CAAC,SAAS,CAAC;IACxF,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/fromSubscribable.js b/node_modules/rxjs/dist/esm5/internal/observable/fromSubscribable.js deleted file mode 100644 index 5e8a5f1..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/fromSubscribable.js +++ /dev/null @@ -1,5 +0,0 @@ -import { Observable } from '../Observable'; -export function fromSubscribable(subscribable) { - return new Observable(function (subscriber) { return subscribable.subscribe(subscriber); }); -} -//# sourceMappingURL=fromSubscribable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/fromSubscribable.js.map b/node_modules/rxjs/dist/esm5/internal/observable/fromSubscribable.js.map deleted file mode 100644 index b594a6c..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/fromSubscribable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fromSubscribable.js","sourceRoot":"","sources":["../../../../src/internal/observable/fromSubscribable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAc3C,MAAM,UAAU,gBAAgB,CAAI,YAA6B;IAC/D,OAAO,IAAI,UAAU,CAAC,UAAC,UAAyB,IAAK,OAAA,YAAY,CAAC,SAAS,CAAC,UAAU,CAAC,EAAlC,CAAkC,CAAC,CAAC;AAC3F,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/generate.js b/node_modules/rxjs/dist/esm5/internal/observable/generate.js deleted file mode 100644 index d6f93b1..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/generate.js +++ /dev/null @@ -1,49 +0,0 @@ -import { __generator } from "tslib"; -import { identity } from '../util/identity'; -import { isScheduler } from '../util/isScheduler'; -import { defer } from './defer'; -import { scheduleIterable } from '../scheduled/scheduleIterable'; -export function generate(initialStateOrOptions, condition, iterate, resultSelectorOrScheduler, scheduler) { - var _a, _b; - var resultSelector; - var initialState; - if (arguments.length === 1) { - (_a = initialStateOrOptions, initialState = _a.initialState, condition = _a.condition, iterate = _a.iterate, _b = _a.resultSelector, resultSelector = _b === void 0 ? identity : _b, scheduler = _a.scheduler); - } - else { - initialState = initialStateOrOptions; - if (!resultSelectorOrScheduler || isScheduler(resultSelectorOrScheduler)) { - resultSelector = identity; - scheduler = resultSelectorOrScheduler; - } - else { - resultSelector = resultSelectorOrScheduler; - } - } - function gen() { - var state; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - state = initialState; - _a.label = 1; - case 1: - if (!(!condition || condition(state))) return [3, 4]; - return [4, resultSelector(state)]; - case 2: - _a.sent(); - _a.label = 3; - case 3: - state = iterate(state); - return [3, 1]; - case 4: return [2]; - } - }); - } - return defer((scheduler - ? - function () { return scheduleIterable(gen(), scheduler); } - : - gen)); -} -//# sourceMappingURL=generate.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/generate.js.map b/node_modules/rxjs/dist/esm5/internal/observable/generate.js.map deleted file mode 100644 index 8989d65..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/generate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../../src/internal/observable/generate.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA0UjE,MAAM,UAAU,QAAQ,CACtB,qBAAgD,EAChD,SAA4B,EAC5B,OAAwB,EACxB,yBAA4D,EAC5D,SAAyB;;IAEzB,IAAI,cAAgC,CAAC;IACrC,IAAI,YAAe,CAAC;IAIpB,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;QAG1B,CAAC,KAMG,qBAA8C,EALhD,YAAY,kBAAA,EACZ,SAAS,eAAA,EACT,OAAO,aAAA,EACP,sBAA6C,EAA7C,cAAc,mBAAG,QAA4B,KAAA,EAC7C,SAAS,eAAA,CACwC,CAAC;KACrD;SAAM;QAGL,YAAY,GAAG,qBAA0B,CAAC;QAC1C,IAAI,CAAC,yBAAyB,IAAI,WAAW,CAAC,yBAAyB,CAAC,EAAE;YACxE,cAAc,GAAG,QAA4B,CAAC;YAC9C,SAAS,GAAG,yBAA0C,CAAC;SACxD;aAAM;YACL,cAAc,GAAG,yBAA6C,CAAC;SAChE;KACF;IAGD,SAAU,GAAG;;;;;oBACF,KAAK,GAAG,YAAY;;;yBAAE,CAAA,CAAC,SAAS,IAAI,SAAS,CAAC,KAAK,CAAC,CAAA;oBAC3D,WAAM,cAAc,CAAC,KAAK,CAAC,EAAA;;oBAA3B,SAA2B,CAAC;;;oBADiC,KAAK,GAAG,OAAQ,CAAC,KAAK,CAAC,CAAA;;;;;KAGvF;IAGD,OAAO,KAAK,CACV,CAAC,SAAS;QACR,CAAC;YAEC,cAAM,OAAA,gBAAgB,CAAC,GAAG,EAAE,EAAE,SAAU,CAAC,EAAnC,CAAmC;QAC3C,CAAC;YAEC,GAAG,CAA6B,CACrC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/iif.js b/node_modules/rxjs/dist/esm5/internal/observable/iif.js deleted file mode 100644 index 0e5425a..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/iif.js +++ /dev/null @@ -1,5 +0,0 @@ -import { defer } from './defer'; -export function iif(condition, trueResult, falseResult) { - return defer(function () { return (condition() ? trueResult : falseResult); }); -} -//# sourceMappingURL=iif.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/iif.js.map b/node_modules/rxjs/dist/esm5/internal/observable/iif.js.map deleted file mode 100644 index df79d31..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/iif.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"iif.js","sourceRoot":"","sources":["../../../../src/internal/observable/iif.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAiFhC,MAAM,UAAU,GAAG,CAAO,SAAwB,EAAE,UAA8B,EAAE,WAA+B;IACjH,OAAO,KAAK,CAAC,cAAM,OAAA,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,EAAxC,CAAwC,CAAC,CAAC;AAC/D,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js b/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js deleted file mode 100644 index ac77ca7..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js +++ /dev/null @@ -1,143 +0,0 @@ -import { __asyncValues, __awaiter, __generator, __values } from "tslib"; -import { isArrayLike } from '../util/isArrayLike'; -import { isPromise } from '../util/isPromise'; -import { Observable } from '../Observable'; -import { isInteropObservable } from '../util/isInteropObservable'; -import { isAsyncIterable } from '../util/isAsyncIterable'; -import { createInvalidObservableTypeError } from '../util/throwUnobservableError'; -import { isIterable } from '../util/isIterable'; -import { isReadableStreamLike, readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike'; -import { isFunction } from '../util/isFunction'; -import { reportUnhandledError } from '../util/reportUnhandledError'; -import { observable as Symbol_observable } from '../symbol/observable'; -export function innerFrom(input) { - if (input instanceof Observable) { - return input; - } - if (input != null) { - if (isInteropObservable(input)) { - return fromInteropObservable(input); - } - if (isArrayLike(input)) { - return fromArrayLike(input); - } - if (isPromise(input)) { - return fromPromise(input); - } - if (isAsyncIterable(input)) { - return fromAsyncIterable(input); - } - if (isIterable(input)) { - return fromIterable(input); - } - if (isReadableStreamLike(input)) { - return fromReadableStreamLike(input); - } - } - throw createInvalidObservableTypeError(input); -} -export function fromInteropObservable(obj) { - return new Observable(function (subscriber) { - var obs = obj[Symbol_observable](); - if (isFunction(obs.subscribe)) { - return obs.subscribe(subscriber); - } - throw new TypeError('Provided object does not correctly implement Symbol.observable'); - }); -} -export function fromArrayLike(array) { - return new Observable(function (subscriber) { - for (var i = 0; i < array.length && !subscriber.closed; i++) { - subscriber.next(array[i]); - } - subscriber.complete(); - }); -} -export function fromPromise(promise) { - return new Observable(function (subscriber) { - promise - .then(function (value) { - if (!subscriber.closed) { - subscriber.next(value); - subscriber.complete(); - } - }, function (err) { return subscriber.error(err); }) - .then(null, reportUnhandledError); - }); -} -export function fromIterable(iterable) { - return new Observable(function (subscriber) { - var e_1, _a; - try { - for (var iterable_1 = __values(iterable), iterable_1_1 = iterable_1.next(); !iterable_1_1.done; iterable_1_1 = iterable_1.next()) { - var value = iterable_1_1.value; - subscriber.next(value); - if (subscriber.closed) { - return; - } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (iterable_1_1 && !iterable_1_1.done && (_a = iterable_1.return)) _a.call(iterable_1); - } - finally { if (e_1) throw e_1.error; } - } - subscriber.complete(); - }); -} -export function fromAsyncIterable(asyncIterable) { - return new Observable(function (subscriber) { - process(asyncIterable, subscriber).catch(function (err) { return subscriber.error(err); }); - }); -} -export function fromReadableStreamLike(readableStream) { - return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream)); -} -function process(asyncIterable, subscriber) { - var asyncIterable_1, asyncIterable_1_1; - var e_2, _a; - return __awaiter(this, void 0, void 0, function () { - var value, e_2_1; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - _b.trys.push([0, 5, 6, 11]); - asyncIterable_1 = __asyncValues(asyncIterable); - _b.label = 1; - case 1: return [4, asyncIterable_1.next()]; - case 2: - if (!(asyncIterable_1_1 = _b.sent(), !asyncIterable_1_1.done)) return [3, 4]; - value = asyncIterable_1_1.value; - subscriber.next(value); - if (subscriber.closed) { - return [2]; - } - _b.label = 3; - case 3: return [3, 1]; - case 4: return [3, 11]; - case 5: - e_2_1 = _b.sent(); - e_2 = { error: e_2_1 }; - return [3, 11]; - case 6: - _b.trys.push([6, , 9, 10]); - if (!(asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return))) return [3, 8]; - return [4, _a.call(asyncIterable_1)]; - case 7: - _b.sent(); - _b.label = 8; - case 8: return [3, 10]; - case 9: - if (e_2) throw e_2.error; - return [7]; - case 10: return [7]; - case 11: - subscriber.complete(); - return [2]; - } - }); - }); -} -//# sourceMappingURL=innerFrom.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js.map b/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js.map deleted file mode 100644 index 2044d76..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"innerFrom.js","sourceRoot":"","sources":["../../../../src/internal/observable/innerFrom.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,kCAAkC,EAAE,MAAM,8BAA8B,CAAC;AAExG,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGvE,MAAM,UAAU,SAAS,CAAI,KAAyB;IACpD,IAAI,KAAK,YAAY,UAAU,EAAE;QAC/B,OAAO,KAAK,CAAC;KACd;IACD,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE;YAC9B,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;SACrC;QACD,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE;YACtB,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC;SAC7B;QACD,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;YACpB,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;SAC3B;QACD,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE;YAC1B,OAAO,iBAAiB,CAAC,KAAK,CAAC,CAAC;SACjC;QACD,IAAI,UAAU,CAAC,KAAK,CAAC,EAAE;YACrB,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;SAC5B;QACD,IAAI,oBAAoB,CAAC,KAAK,CAAC,EAAE;YAC/B,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC;SACtC;KACF;IAED,MAAM,gCAAgC,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC;AAMD,MAAM,UAAU,qBAAqB,CAAI,GAAQ;IAC/C,OAAO,IAAI,UAAU,CAAC,UAAC,UAAyB;QAC9C,IAAM,GAAG,GAAG,GAAG,CAAC,iBAAiB,CAAC,EAAE,CAAC;QACrC,IAAI,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;YAC7B,OAAO,GAAG,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;SAClC;QAED,MAAM,IAAI,SAAS,CAAC,gEAAgE,CAAC,CAAC;IACxF,CAAC,CAAC,CAAC;AACL,CAAC;AASD,MAAM,UAAU,aAAa,CAAI,KAAmB;IAClD,OAAO,IAAI,UAAU,CAAC,UAAC,UAAyB;QAU9C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC3D,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;SAC3B;QACD,UAAU,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,WAAW,CAAI,OAAuB;IACpD,OAAO,IAAI,UAAU,CAAC,UAAC,UAAyB;QAC9C,OAAO;aACJ,IAAI,CACH,UAAC,KAAK;YACJ,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;gBACtB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,EACD,UAAC,GAAQ,IAAK,OAAA,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAArB,CAAqB,CACpC;aACA,IAAI,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,YAAY,CAAI,QAAqB;IACnD,OAAO,IAAI,UAAU,CAAC,UAAC,UAAyB;;;YAC9C,KAAoB,IAAA,aAAA,SAAA,QAAQ,CAAA,kCAAA,wDAAE;gBAAzB,IAAM,KAAK,qBAAA;gBACd,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,IAAI,UAAU,CAAC,MAAM,EAAE;oBACrB,OAAO;iBACR;aACF;;;;;;;;;QACD,UAAU,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAI,aAA+B;IAClE,OAAO,IAAI,UAAU,CAAC,UAAC,UAAyB;QAC9C,OAAO,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC,KAAK,CAAC,UAAC,GAAG,IAAK,OAAA,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAArB,CAAqB,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAI,cAAqC;IAC7E,OAAO,iBAAiB,CAAC,kCAAkC,CAAC,cAAc,CAAC,CAAC,CAAC;AAC/E,CAAC;AAED,SAAe,OAAO,CAAI,aAA+B,EAAE,UAAyB;;;;;;;;;oBACxD,kBAAA,cAAA,aAAa,CAAA;;;;;oBAAtB,KAAK,0BAAA,CAAA;oBACpB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAGvB,IAAI,UAAU,CAAC,MAAM,EAAE;wBACrB,WAAO;qBACR;;;;;;;;;;;;;;;;;;;;;oBAEH,UAAU,CAAC,QAAQ,EAAE,CAAC;;;;;CACvB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/interval.js b/node_modules/rxjs/dist/esm5/internal/observable/interval.js deleted file mode 100644 index 6944be4..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/interval.js +++ /dev/null @@ -1,11 +0,0 @@ -import { asyncScheduler } from '../scheduler/async'; -import { timer } from './timer'; -export function interval(period, scheduler) { - if (period === void 0) { period = 0; } - if (scheduler === void 0) { scheduler = asyncScheduler; } - if (period < 0) { - period = 0; - } - return timer(period, period, scheduler); -} -//# sourceMappingURL=interval.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/interval.js.map b/node_modules/rxjs/dist/esm5/internal/observable/interval.js.map deleted file mode 100644 index 0099362..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/interval.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"interval.js","sourceRoot":"","sources":["../../../../src/internal/observable/interval.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA8ChC,MAAM,UAAU,QAAQ,CAAC,MAAU,EAAE,SAAyC;IAArD,uBAAA,EAAA,UAAU;IAAE,0BAAA,EAAA,0BAAyC;IAC5E,IAAI,MAAM,GAAG,CAAC,EAAE;QAEd,MAAM,GAAG,CAAC,CAAC;KACZ;IAED,OAAO,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;AAC1C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/merge.js b/node_modules/rxjs/dist/esm5/internal/observable/merge.js deleted file mode 100644 index 99f4ab9..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/merge.js +++ /dev/null @@ -1,23 +0,0 @@ -import { mergeAll } from '../operators/mergeAll'; -import { innerFrom } from './innerFrom'; -import { EMPTY } from './empty'; -import { popNumber, popScheduler } from '../util/args'; -import { from } from './from'; -export function merge() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = popScheduler(args); - var concurrent = popNumber(args, Infinity); - var sources = args; - return !sources.length - ? - EMPTY - : sources.length === 1 - ? - innerFrom(sources[0]) - : - mergeAll(concurrent)(from(sources, scheduler)); -} -//# sourceMappingURL=merge.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/merge.js.map b/node_modules/rxjs/dist/esm5/internal/observable/merge.js.map deleted file mode 100644 index 3dcee5e..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/merge.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../../../src/internal/observable/merge.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAiF9B,MAAM,UAAU,KAAK;IAAC,cAA8D;SAA9D,UAA8D,EAA9D,qBAA8D,EAA9D,IAA8D;QAA9D,yBAA8D;;IAClF,IAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,IAAM,UAAU,GAAG,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC7C,IAAM,OAAO,GAAG,IAAkC,CAAC;IACnD,OAAO,CAAC,OAAO,CAAC,MAAM;QACpB,CAAC;YACC,KAAK;QACP,CAAC,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC;YACtB,CAAC;gBACC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YACvB,CAAC;gBACC,QAAQ,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;AACrD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/never.js b/node_modules/rxjs/dist/esm5/internal/observable/never.js deleted file mode 100644 index 376b030..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/never.js +++ /dev/null @@ -1,7 +0,0 @@ -import { Observable } from '../Observable'; -import { noop } from '../util/noop'; -export var NEVER = new Observable(noop); -export function never() { - return NEVER; -} -//# sourceMappingURL=never.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/never.js.map b/node_modules/rxjs/dist/esm5/internal/observable/never.js.map deleted file mode 100644 index 63f161c..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/never.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"never.js","sourceRoot":"","sources":["../../../../src/internal/observable/never.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAmCpC,MAAM,CAAC,IAAM,KAAK,GAAG,IAAI,UAAU,CAAQ,IAAI,CAAC,CAAC;AAKjD,MAAM,UAAU,KAAK;IACnB,OAAO,KAAK,CAAC;AACf,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/of.js b/node_modules/rxjs/dist/esm5/internal/observable/of.js deleted file mode 100644 index 11e56e4..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/of.js +++ /dev/null @@ -1,11 +0,0 @@ -import { popScheduler } from '../util/args'; -import { from } from './from'; -export function of() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = popScheduler(args); - return from(args, scheduler); -} -//# sourceMappingURL=of.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/of.js.map b/node_modules/rxjs/dist/esm5/internal/observable/of.js.map deleted file mode 100644 index f72c4de..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/of.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"of.js","sourceRoot":"","sources":["../../../../src/internal/observable/of.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AA4E9B,MAAM,UAAU,EAAE;IAAI,cAAiC;SAAjC,UAAiC,EAAjC,qBAAiC,EAAjC,IAAiC;QAAjC,yBAAiC;;IACrD,IAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO,IAAI,CAAC,IAAW,EAAE,SAAS,CAAC,CAAC;AACtC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/onErrorResumeNext.js b/node_modules/rxjs/dist/esm5/internal/observable/onErrorResumeNext.js deleted file mode 100644 index b47af23..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/onErrorResumeNext.js +++ /dev/null @@ -1,35 +0,0 @@ -import { Observable } from '../Observable'; -import { argsOrArgArray } from '../util/argsOrArgArray'; -import { OperatorSubscriber } from '../operators/OperatorSubscriber'; -import { noop } from '../util/noop'; -import { innerFrom } from './innerFrom'; -export function onErrorResumeNext() { - var sources = []; - for (var _i = 0; _i < arguments.length; _i++) { - sources[_i] = arguments[_i]; - } - var nextSources = argsOrArgArray(sources); - return new Observable(function (subscriber) { - var sourceIndex = 0; - var subscribeNext = function () { - if (sourceIndex < nextSources.length) { - var nextSource = void 0; - try { - nextSource = innerFrom(nextSources[sourceIndex++]); - } - catch (err) { - subscribeNext(); - return; - } - var innerSubscriber = new OperatorSubscriber(subscriber, undefined, noop, noop); - nextSource.subscribe(innerSubscriber); - innerSubscriber.add(subscribeNext); - } - else { - subscriber.complete(); - } - }; - subscribeNext(); - }); -} -//# sourceMappingURL=onErrorResumeNext.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/onErrorResumeNext.js.map b/node_modules/rxjs/dist/esm5/internal/observable/onErrorResumeNext.js.map deleted file mode 100644 index 85a0c7a..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/onErrorResumeNext.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"onErrorResumeNext.js","sourceRoot":"","sources":["../../../../src/internal/observable/onErrorResumeNext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAmExC,MAAM,UAAU,iBAAiB;IAC/B,iBAAyE;SAAzE,UAAyE,EAAzE,qBAAyE,EAAzE,IAAyE;QAAzE,4BAAyE;;IAEzE,IAAM,WAAW,GAA4B,cAAc,CAAC,OAAO,CAAQ,CAAC;IAE5E,OAAO,IAAI,UAAU,CAAC,UAAC,UAAU;QAC/B,IAAI,WAAW,GAAG,CAAC,CAAC;QACpB,IAAM,aAAa,GAAG;YACpB,IAAI,WAAW,GAAG,WAAW,CAAC,MAAM,EAAE;gBACpC,IAAI,UAAU,SAAuB,CAAC;gBACtC,IAAI;oBACF,UAAU,GAAG,SAAS,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;iBACpD;gBAAC,OAAO,GAAG,EAAE;oBACZ,aAAa,EAAE,CAAC;oBAChB,OAAO;iBACR;gBACD,IAAM,eAAe,GAAG,IAAI,kBAAkB,CAAC,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;gBAClF,UAAU,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;gBACtC,eAAe,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;aACpC;iBAAM;gBACL,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,CAAC;QACF,aAAa,EAAE,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/pairs.js b/node_modules/rxjs/dist/esm5/internal/observable/pairs.js deleted file mode 100644 index 77cc110..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/pairs.js +++ /dev/null @@ -1,5 +0,0 @@ -import { from } from './from'; -export function pairs(obj, scheduler) { - return from(Object.entries(obj), scheduler); -} -//# sourceMappingURL=pairs.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/pairs.js.map b/node_modules/rxjs/dist/esm5/internal/observable/pairs.js.map deleted file mode 100644 index a5586e2..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/pairs.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pairs.js","sourceRoot":"","sources":["../../../../src/internal/observable/pairs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AA2E9B,MAAM,UAAU,KAAK,CAAC,GAAQ,EAAE,SAAyB;IACvD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,SAAgB,CAAC,CAAC;AACrD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/partition.js b/node_modules/rxjs/dist/esm5/internal/observable/partition.js deleted file mode 100644 index a5a7d48..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/partition.js +++ /dev/null @@ -1,7 +0,0 @@ -import { not } from '../util/not'; -import { filter } from '../operators/filter'; -import { innerFrom } from './innerFrom'; -export function partition(source, predicate, thisArg) { - return [filter(predicate, thisArg)(innerFrom(source)), filter(not(predicate, thisArg))(innerFrom(source))]; -} -//# sourceMappingURL=partition.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/partition.js.map b/node_modules/rxjs/dist/esm5/internal/observable/partition.js.map deleted file mode 100644 index 7466104..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/partition.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"partition.js","sourceRoot":"","sources":["../../../../src/internal/observable/partition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AA0ExC,MAAM,UAAU,SAAS,CACvB,MAA0B,EAC1B,SAA0D,EAC1D,OAAa;IAEb,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAGxG,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/race.js b/node_modules/rxjs/dist/esm5/internal/observable/race.js deleted file mode 100644 index d1b0fd6..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/race.js +++ /dev/null @@ -1,32 +0,0 @@ -import { Observable } from '../Observable'; -import { innerFrom } from './innerFrom'; -import { argsOrArgArray } from '../util/argsOrArgArray'; -import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; -export function race() { - var sources = []; - for (var _i = 0; _i < arguments.length; _i++) { - sources[_i] = arguments[_i]; - } - sources = argsOrArgArray(sources); - return sources.length === 1 ? innerFrom(sources[0]) : new Observable(raceInit(sources)); -} -export function raceInit(sources) { - return function (subscriber) { - var subscriptions = []; - var _loop_1 = function (i) { - subscriptions.push(innerFrom(sources[i]).subscribe(createOperatorSubscriber(subscriber, function (value) { - if (subscriptions) { - for (var s = 0; s < subscriptions.length; s++) { - s !== i && subscriptions[s].unsubscribe(); - } - subscriptions = null; - } - subscriber.next(value); - }))); - }; - for (var i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) { - _loop_1(i); - } - }; -} -//# sourceMappingURL=race.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/race.js.map b/node_modules/rxjs/dist/esm5/internal/observable/race.js.map deleted file mode 100644 index 5cc4b88..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/race.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"race.js","sourceRoot":"","sources":["../../../../src/internal/observable/race.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AA6C3E,MAAM,UAAU,IAAI;IAAI,iBAAyD;SAAzD,UAAyD,EAAzD,qBAAyD,EAAzD,IAAyD;QAAzD,4BAAyD;;IAC/E,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IAElC,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAuB,CAAC,CAAC,CAAC,CAAC,IAAI,UAAU,CAAI,QAAQ,CAAC,OAA+B,CAAC,CAAC,CAAC;AAC3I,CAAC;AAOD,MAAM,UAAU,QAAQ,CAAI,OAA6B;IACvD,OAAO,UAAC,UAAyB;QAC/B,IAAI,aAAa,GAAmB,EAAE,CAAC;gCAM9B,CAAC;YACR,aAAa,CAAC,IAAI,CAChB,SAAS,CAAC,OAAO,CAAC,CAAC,CAAuB,CAAC,CAAC,SAAS,CACnD,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;gBACzC,IAAI,aAAa,EAAE;oBAGjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;wBAC7C,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;qBAC3C;oBACD,aAAa,GAAG,IAAK,CAAC;iBACvB;gBACD,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACzB,CAAC,CAAC,CACH,CACF,CAAC;;QAfJ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,aAAa,IAAI,CAAC,UAAU,CAAC,MAAM,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE;oBAArE,CAAC;SAgBT;IACH,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/range.js b/node_modules/rxjs/dist/esm5/internal/observable/range.js deleted file mode 100644 index 23c7343..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/range.js +++ /dev/null @@ -1,35 +0,0 @@ -import { Observable } from '../Observable'; -import { EMPTY } from './empty'; -export function range(start, count, scheduler) { - if (count == null) { - count = start; - start = 0; - } - if (count <= 0) { - return EMPTY; - } - var end = count + start; - return new Observable(scheduler - ? - function (subscriber) { - var n = start; - return scheduler.schedule(function () { - if (n < end) { - subscriber.next(n++); - this.schedule(); - } - else { - subscriber.complete(); - } - }); - } - : - function (subscriber) { - var n = start; - while (n < end && !subscriber.closed) { - subscriber.next(n++); - } - subscriber.complete(); - }); -} -//# sourceMappingURL=range.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/range.js.map b/node_modules/rxjs/dist/esm5/internal/observable/range.js.map deleted file mode 100644 index 952f2a0..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/range.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"range.js","sourceRoot":"","sources":["../../../../src/internal/observable/range.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAoDhC,MAAM,UAAU,KAAK,CAAC,KAAa,EAAE,KAAc,EAAE,SAAyB;IAC5E,IAAI,KAAK,IAAI,IAAI,EAAE;QAEjB,KAAK,GAAG,KAAK,CAAC;QACd,KAAK,GAAG,CAAC,CAAC;KACX;IAED,IAAI,KAAK,IAAI,CAAC,EAAE;QAEd,OAAO,KAAK,CAAC;KACd;IAGD,IAAM,GAAG,GAAG,KAAK,GAAG,KAAK,CAAC;IAE1B,OAAO,IAAI,UAAU,CACnB,SAAS;QACP,CAAC;YACC,UAAC,UAAU;gBACT,IAAI,CAAC,GAAG,KAAK,CAAC;gBACd,OAAO,SAAS,CAAC,QAAQ,CAAC;oBACxB,IAAI,CAAC,GAAG,GAAG,EAAE;wBACX,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;wBACrB,IAAI,CAAC,QAAQ,EAAE,CAAC;qBACjB;yBAAM;wBACL,UAAU,CAAC,QAAQ,EAAE,CAAC;qBACvB;gBACH,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;YACC,UAAC,UAAU;gBACT,IAAI,CAAC,GAAG,KAAK,CAAC;gBACd,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;oBACpC,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;iBACtB;gBACD,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC,CACN,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/throwError.js b/node_modules/rxjs/dist/esm5/internal/observable/throwError.js deleted file mode 100644 index 1498dde..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/throwError.js +++ /dev/null @@ -1,8 +0,0 @@ -import { Observable } from '../Observable'; -import { isFunction } from '../util/isFunction'; -export function throwError(errorOrErrorFactory, scheduler) { - var errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : function () { return errorOrErrorFactory; }; - var init = function (subscriber) { return subscriber.error(errorFactory()); }; - return new Observable(scheduler ? function (subscriber) { return scheduler.schedule(init, 0, subscriber); } : init); -} -//# sourceMappingURL=throwError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/throwError.js.map b/node_modules/rxjs/dist/esm5/internal/observable/throwError.js.map deleted file mode 100644 index e9606c1..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/throwError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"throwError.js","sourceRoot":"","sources":["../../../../src/internal/observable/throwError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAqHhD,MAAM,UAAU,UAAU,CAAC,mBAAwB,EAAE,SAAyB;IAC5E,IAAM,YAAY,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,cAAM,OAAA,mBAAmB,EAAnB,CAAmB,CAAC;IACvG,IAAM,IAAI,GAAG,UAAC,UAA6B,IAAK,OAAA,UAAU,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,EAAhC,CAAgC,CAAC;IACjF,OAAO,IAAI,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,UAAC,UAAU,IAAK,OAAA,SAAS,CAAC,QAAQ,CAAC,IAAW,EAAE,CAAC,EAAE,UAAU,CAAC,EAA9C,CAA8C,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAC3G,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/timer.js b/node_modules/rxjs/dist/esm5/internal/observable/timer.js deleted file mode 100644 index 8caa9bc..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/timer.js +++ /dev/null @@ -1,36 +0,0 @@ -import { Observable } from '../Observable'; -import { async as asyncScheduler } from '../scheduler/async'; -import { isScheduler } from '../util/isScheduler'; -import { isValidDate } from '../util/isDate'; -export function timer(dueTime, intervalOrScheduler, scheduler) { - if (dueTime === void 0) { dueTime = 0; } - if (scheduler === void 0) { scheduler = asyncScheduler; } - var intervalDuration = -1; - if (intervalOrScheduler != null) { - if (isScheduler(intervalOrScheduler)) { - scheduler = intervalOrScheduler; - } - else { - intervalDuration = intervalOrScheduler; - } - } - return new Observable(function (subscriber) { - var due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime; - if (due < 0) { - due = 0; - } - var n = 0; - return scheduler.schedule(function () { - if (!subscriber.closed) { - subscriber.next(n++); - if (0 <= intervalDuration) { - this.schedule(undefined, intervalDuration); - } - else { - subscriber.complete(); - } - } - }, due); - }); -} -//# sourceMappingURL=timer.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/timer.js.map b/node_modules/rxjs/dist/esm5/internal/observable/timer.js.map deleted file mode 100644 index 00e0f58..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/timer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timer.js","sourceRoot":"","sources":["../../../../src/internal/observable/timer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAgI7C,MAAM,UAAU,KAAK,CACnB,OAA0B,EAC1B,mBAA4C,EAC5C,SAAyC;IAFzC,wBAAA,EAAA,WAA0B;IAE1B,0BAAA,EAAA,0BAAyC;IAIzC,IAAI,gBAAgB,GAAG,CAAC,CAAC,CAAC;IAE1B,IAAI,mBAAmB,IAAI,IAAI,EAAE;QAI/B,IAAI,WAAW,CAAC,mBAAmB,CAAC,EAAE;YACpC,SAAS,GAAG,mBAAmB,CAAC;SACjC;aAAM;YAGL,gBAAgB,GAAG,mBAAmB,CAAC;SACxC;KACF;IAED,OAAO,IAAI,UAAU,CAAC,UAAC,UAAU;QAI/B,IAAI,GAAG,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,SAAU,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;QAEvE,IAAI,GAAG,GAAG,CAAC,EAAE;YAEX,GAAG,GAAG,CAAC,CAAC;SACT;QAGD,IAAI,CAAC,GAAG,CAAC,CAAC;QAGV,OAAO,SAAS,CAAC,QAAQ,CAAC;YACxB,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;gBAEtB,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;gBAErB,IAAI,CAAC,IAAI,gBAAgB,EAAE;oBAGzB,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;iBAC5C;qBAAM;oBAEL,UAAU,CAAC,QAAQ,EAAE,CAAC;iBACvB;aACF;QACH,CAAC,EAAE,GAAG,CAAC,CAAC;IACV,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/using.js b/node_modules/rxjs/dist/esm5/internal/observable/using.js deleted file mode 100644 index 6e244cc..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/using.js +++ /dev/null @@ -1,17 +0,0 @@ -import { Observable } from '../Observable'; -import { innerFrom } from './innerFrom'; -import { EMPTY } from './empty'; -export function using(resourceFactory, observableFactory) { - return new Observable(function (subscriber) { - var resource = resourceFactory(); - var result = observableFactory(resource); - var source = result ? innerFrom(result) : EMPTY; - source.subscribe(subscriber); - return function () { - if (resource) { - resource.unsubscribe(); - } - }; - }); -} -//# sourceMappingURL=using.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/using.js.map b/node_modules/rxjs/dist/esm5/internal/observable/using.js.map deleted file mode 100644 index 4250967..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/using.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"using.js","sourceRoot":"","sources":["../../../../src/internal/observable/using.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA4BhC,MAAM,UAAU,KAAK,CACnB,eAA4C,EAC5C,iBAAgE;IAEhE,OAAO,IAAI,UAAU,CAAqB,UAAC,UAAU;QACnD,IAAM,QAAQ,GAAG,eAAe,EAAE,CAAC;QACnC,IAAM,MAAM,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QAClD,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC7B,OAAO;YAGL,IAAI,QAAQ,EAAE;gBACZ,QAAQ,CAAC,WAAW,EAAE,CAAC;aACxB;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/zip.js b/node_modules/rxjs/dist/esm5/internal/observable/zip.js deleted file mode 100644 index a3b2b24..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/zip.js +++ /dev/null @@ -1,46 +0,0 @@ -import { __read, __spreadArray } from "tslib"; -import { Observable } from '../Observable'; -import { innerFrom } from './innerFrom'; -import { argsOrArgArray } from '../util/argsOrArgArray'; -import { EMPTY } from './empty'; -import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; -import { popResultSelector } from '../util/args'; -export function zip() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var resultSelector = popResultSelector(args); - var sources = argsOrArgArray(args); - return sources.length - ? new Observable(function (subscriber) { - var buffers = sources.map(function () { return []; }); - var completed = sources.map(function () { return false; }); - subscriber.add(function () { - buffers = completed = null; - }); - var _loop_1 = function (sourceIndex) { - innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, function (value) { - buffers[sourceIndex].push(value); - if (buffers.every(function (buffer) { return buffer.length; })) { - var result = buffers.map(function (buffer) { return buffer.shift(); }); - subscriber.next(resultSelector ? resultSelector.apply(void 0, __spreadArray([], __read(result))) : result); - if (buffers.some(function (buffer, i) { return !buffer.length && completed[i]; })) { - subscriber.complete(); - } - } - }, function () { - completed[sourceIndex] = true; - !buffers[sourceIndex].length && subscriber.complete(); - })); - }; - for (var sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) { - _loop_1(sourceIndex); - } - return function () { - buffers = completed = null; - }; - }) - : EMPTY; -} -//# sourceMappingURL=zip.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/observable/zip.js.map b/node_modules/rxjs/dist/esm5/internal/observable/zip.js.map deleted file mode 100644 index 5e02f60..0000000 --- a/node_modules/rxjs/dist/esm5/internal/observable/zip.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"zip.js","sourceRoot":"","sources":["../../../../src/internal/observable/zip.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AA8CjD,MAAM,UAAU,GAAG;IAAC,cAAkB;SAAlB,UAAkB,EAAlB,qBAAkB,EAAlB,IAAkB;QAAlB,yBAAkB;;IACpC,IAAM,cAAc,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAE/C,IAAM,OAAO,GAAG,cAAc,CAAC,IAAI,CAA0B,CAAC;IAE9D,OAAO,OAAO,CAAC,MAAM;QACnB,CAAC,CAAC,IAAI,UAAU,CAAY,UAAC,UAAU;YAGnC,IAAI,OAAO,GAAgB,OAAO,CAAC,GAAG,CAAC,cAAM,OAAA,EAAE,EAAF,CAAE,CAAC,CAAC;YAKjD,IAAI,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,cAAM,OAAA,KAAK,EAAL,CAAK,CAAC,CAAC;YAGzC,UAAU,CAAC,GAAG,CAAC;gBACb,OAAO,GAAG,SAAS,GAAG,IAAK,CAAC;YAC9B,CAAC,CAAC,CAAC;oCAKM,WAAW;gBAClB,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CACvC,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;oBACJ,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAIjC,IAAI,OAAO,CAAC,KAAK,CAAC,UAAC,MAAM,IAAK,OAAA,MAAM,CAAC,MAAM,EAAb,CAAa,CAAC,EAAE;wBAC5C,IAAM,MAAM,GAAQ,OAAO,CAAC,GAAG,CAAC,UAAC,MAAM,IAAK,OAAA,MAAM,CAAC,KAAK,EAAG,EAAf,CAAe,CAAC,CAAC;wBAE7D,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,wCAAI,MAAM,IAAE,CAAC,CAAC,MAAM,CAAC,CAAC;wBAIrE,IAAI,OAAO,CAAC,IAAI,CAAC,UAAC,MAAM,EAAE,CAAC,IAAK,OAAA,CAAC,MAAM,CAAC,MAAM,IAAI,SAAS,CAAC,CAAC,CAAC,EAA9B,CAA8B,CAAC,EAAE;4BAC/D,UAAU,CAAC,QAAQ,EAAE,CAAC;yBACvB;qBACF;gBACH,CAAC,EACD;oBAGE,SAAS,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;oBAI9B,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,MAAM,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;gBACxD,CAAC,CACF,CACF,CAAC;;YA/BJ,KAAK,IAAI,WAAW,GAAG,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,IAAI,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE;wBAAlF,WAAW;aAgCnB;YAGD,OAAO;gBACL,OAAO,GAAG,SAAS,GAAG,IAAK,CAAC;YAC9B,CAAC,CAAC;QACJ,CAAC,CAAC;QACJ,CAAC,CAAC,KAAK,CAAC;AACZ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js b/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js deleted file mode 100644 index 55d9321..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js +++ /dev/null @@ -1,61 +0,0 @@ -import { __extends } from "tslib"; -import { Subscriber } from '../Subscriber'; -export function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) { - return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize); -} -var OperatorSubscriber = (function (_super) { - __extends(OperatorSubscriber, _super); - function OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) { - var _this = _super.call(this, destination) || this; - _this.onFinalize = onFinalize; - _this.shouldUnsubscribe = shouldUnsubscribe; - _this._next = onNext - ? function (value) { - try { - onNext(value); - } - catch (err) { - destination.error(err); - } - } - : _super.prototype._next; - _this._error = onError - ? function (err) { - try { - onError(err); - } - catch (err) { - destination.error(err); - } - finally { - this.unsubscribe(); - } - } - : _super.prototype._error; - _this._complete = onComplete - ? function () { - try { - onComplete(); - } - catch (err) { - destination.error(err); - } - finally { - this.unsubscribe(); - } - } - : _super.prototype._complete; - return _this; - } - OperatorSubscriber.prototype.unsubscribe = function () { - var _a; - if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) { - var closed_1 = this.closed; - _super.prototype.unsubscribe.call(this); - !closed_1 && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this)); - } - }; - return OperatorSubscriber; -}(Subscriber)); -export { OperatorSubscriber }; -//# sourceMappingURL=OperatorSubscriber.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js.map b/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js.map deleted file mode 100644 index ba9ebaa..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OperatorSubscriber.js","sourceRoot":"","sources":["../../../../src/internal/operators/OperatorSubscriber.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAc3C,MAAM,UAAU,wBAAwB,CACtC,WAA4B,EAC5B,MAA2B,EAC3B,UAAuB,EACvB,OAA4B,EAC5B,UAAuB;IAEvB,OAAO,IAAI,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AACtF,CAAC;AAMD;IAA2C,sCAAa;IAiBtD,4BACE,WAA4B,EAC5B,MAA2B,EAC3B,UAAuB,EACvB,OAA4B,EACpB,UAAuB,EACvB,iBAAiC;QAN3C,YAoBE,kBAAM,WAAW,CAAC,SAoCnB;QAnDS,gBAAU,GAAV,UAAU,CAAa;QACvB,uBAAiB,GAAjB,iBAAiB,CAAgB;QAezC,KAAI,CAAC,KAAK,GAAG,MAAM;YACjB,CAAC,CAAC,UAAuC,KAAQ;gBAC7C,IAAI;oBACF,MAAM,CAAC,KAAK,CAAC,CAAC;iBACf;gBAAC,OAAO,GAAG,EAAE;oBACZ,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACxB;YACH,CAAC;YACH,CAAC,CAAC,iBAAM,KAAK,CAAC;QAChB,KAAI,CAAC,MAAM,GAAG,OAAO;YACnB,CAAC,CAAC,UAAuC,GAAQ;gBAC7C,IAAI;oBACF,OAAO,CAAC,GAAG,CAAC,CAAC;iBACd;gBAAC,OAAO,GAAG,EAAE;oBAEZ,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACxB;wBAAS;oBAER,IAAI,CAAC,WAAW,EAAE,CAAC;iBACpB;YACH,CAAC;YACH,CAAC,CAAC,iBAAM,MAAM,CAAC;QACjB,KAAI,CAAC,SAAS,GAAG,UAAU;YACzB,CAAC,CAAC;gBACE,IAAI;oBACF,UAAU,EAAE,CAAC;iBACd;gBAAC,OAAO,GAAG,EAAE;oBAEZ,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACxB;wBAAS;oBAER,IAAI,CAAC,WAAW,EAAE,CAAC;iBACpB;YACH,CAAC;YACH,CAAC,CAAC,iBAAM,SAAS,CAAC;;IACtB,CAAC;IAED,wCAAW,GAAX;;QACE,IAAI,CAAC,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,iBAAiB,EAAE,EAAE;YAC/C,IAAA,QAAM,GAAK,IAAI,OAAT,CAAU;YACxB,iBAAM,WAAW,WAAE,CAAC;YAEpB,CAAC,QAAM,KAAI,MAAA,IAAI,CAAC,UAAU,+CAAf,IAAI,CAAe,CAAA,CAAC;SAChC;IACH,CAAC;IACH,yBAAC;AAAD,CAAC,AAnFD,CAA2C,UAAU,GAmFpD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/audit.js b/node_modules/rxjs/dist/esm5/internal/operators/audit.js deleted file mode 100644 index cb6dd12..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/audit.js +++ /dev/null @@ -1,37 +0,0 @@ -import { operate } from '../util/lift'; -import { innerFrom } from '../observable/innerFrom'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function audit(durationSelector) { - return operate(function (source, subscriber) { - var hasValue = false; - var lastValue = null; - var durationSubscriber = null; - var isComplete = false; - var endDuration = function () { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); - durationSubscriber = null; - if (hasValue) { - hasValue = false; - var value = lastValue; - lastValue = null; - subscriber.next(value); - } - isComplete && subscriber.complete(); - }; - var cleanupDuration = function () { - durationSubscriber = null; - isComplete && subscriber.complete(); - }; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - hasValue = true; - lastValue = value; - if (!durationSubscriber) { - innerFrom(durationSelector(value)).subscribe((durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration))); - } - }, function () { - isComplete = true; - (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete(); - })); - }); -} -//# sourceMappingURL=audit.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/audit.js.map b/node_modules/rxjs/dist/esm5/internal/operators/audit.js.map deleted file mode 100644 index 2b5ad4f..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/audit.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../../../src/internal/operators/audit.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA+ChE,MAAM,UAAU,KAAK,CAAI,gBAAoD;IAC3E,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,SAAS,GAAa,IAAI,CAAC;QAC/B,IAAI,kBAAkB,GAA2B,IAAI,CAAC;QACtD,IAAI,UAAU,GAAG,KAAK,CAAC;QAEvB,IAAM,WAAW,GAAG;YAClB,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,WAAW,EAAE,CAAC;YAClC,kBAAkB,GAAG,IAAI,CAAC;YAC1B,IAAI,QAAQ,EAAE;gBACZ,QAAQ,GAAG,KAAK,CAAC;gBACjB,IAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;YACD,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACtC,CAAC,CAAC;QAEF,IAAM,eAAe,GAAG;YACtB,kBAAkB,GAAG,IAAI,CAAC;YAC1B,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACtC,CAAC,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,QAAQ,GAAG,IAAI,CAAC;YAChB,SAAS,GAAG,KAAK,CAAC;YAClB,IAAI,CAAC,kBAAkB,EAAE;gBACvB,SAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAC1C,CAAC,kBAAkB,GAAG,wBAAwB,CAAC,UAAU,EAAE,WAAW,EAAE,eAAe,CAAC,CAAC,CAC1F,CAAC;aACH;QACH,CAAC,EACD;YACE,UAAU,GAAG,IAAI,CAAC;YAClB,CAAC,CAAC,QAAQ,IAAI,CAAC,kBAAkB,IAAI,kBAAkB,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QAC3F,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/auditTime.js b/node_modules/rxjs/dist/esm5/internal/operators/auditTime.js deleted file mode 100644 index 5d3b5de..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/auditTime.js +++ /dev/null @@ -1,8 +0,0 @@ -import { asyncScheduler } from '../scheduler/async'; -import { audit } from './audit'; -import { timer } from '../observable/timer'; -export function auditTime(duration, scheduler) { - if (scheduler === void 0) { scheduler = asyncScheduler; } - return audit(function () { return timer(duration, scheduler); }); -} -//# sourceMappingURL=auditTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/auditTime.js.map b/node_modules/rxjs/dist/esm5/internal/operators/auditTime.js.map deleted file mode 100644 index bed4a8b..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/auditTime.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"auditTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/auditTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAkD5C,MAAM,UAAU,SAAS,CAAI,QAAgB,EAAE,SAAyC;IAAzC,0BAAA,EAAA,0BAAyC;IACtF,OAAO,KAAK,CAAC,cAAM,OAAA,KAAK,CAAC,QAAQ,EAAE,SAAS,CAAC,EAA1B,CAA0B,CAAC,CAAC;AACjD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/buffer.js b/node_modules/rxjs/dist/esm5/internal/operators/buffer.js deleted file mode 100644 index a8d2327..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/buffer.js +++ /dev/null @@ -1,22 +0,0 @@ -import { operate } from '../util/lift'; -import { noop } from '../util/noop'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; -export function buffer(closingNotifier) { - return operate(function (source, subscriber) { - var currentBuffer = []; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { return currentBuffer.push(value); }, function () { - subscriber.next(currentBuffer); - subscriber.complete(); - })); - innerFrom(closingNotifier).subscribe(createOperatorSubscriber(subscriber, function () { - var b = currentBuffer; - currentBuffer = []; - subscriber.next(b); - }, noop)); - return function () { - currentBuffer = null; - }; - }); -} -//# sourceMappingURL=buffer.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/buffer.js.map b/node_modules/rxjs/dist/esm5/internal/operators/buffer.js.map deleted file mode 100644 index b181112..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/buffer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"buffer.js","sourceRoot":"","sources":["../../../../src/internal/operators/buffer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAwCpD,MAAM,UAAU,MAAM,CAAI,eAAqC;IAC7D,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,aAAa,GAAQ,EAAE,CAAC;QAG5B,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK,IAAK,OAAA,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,EAAzB,CAAyB,EACpC;YACE,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YAC/B,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;QAGF,SAAS,CAAC,eAAe,CAAC,CAAC,SAAS,CAClC,wBAAwB,CACtB,UAAU,EACV;YAEE,IAAM,CAAC,GAAG,aAAa,CAAC;YACxB,aAAa,GAAG,EAAE,CAAC;YACnB,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACrB,CAAC,EACD,IAAI,CACL,CACF,CAAC;QAEF,OAAO;YAEL,aAAa,GAAG,IAAK,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/bufferCount.js b/node_modules/rxjs/dist/esm5/internal/operators/bufferCount.js deleted file mode 100644 index 69eb3ed..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/bufferCount.js +++ /dev/null @@ -1,71 +0,0 @@ -import { __values } from "tslib"; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { arrRemove } from '../util/arrRemove'; -export function bufferCount(bufferSize, startBufferEvery) { - if (startBufferEvery === void 0) { startBufferEvery = null; } - startBufferEvery = startBufferEvery !== null && startBufferEvery !== void 0 ? startBufferEvery : bufferSize; - return operate(function (source, subscriber) { - var buffers = []; - var count = 0; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var e_1, _a, e_2, _b; - var toEmit = null; - if (count++ % startBufferEvery === 0) { - buffers.push([]); - } - try { - for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { - var buffer = buffers_1_1.value; - buffer.push(value); - if (bufferSize <= buffer.length) { - toEmit = toEmit !== null && toEmit !== void 0 ? toEmit : []; - toEmit.push(buffer); - } - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1); - } - finally { if (e_1) throw e_1.error; } - } - if (toEmit) { - try { - for (var toEmit_1 = __values(toEmit), toEmit_1_1 = toEmit_1.next(); !toEmit_1_1.done; toEmit_1_1 = toEmit_1.next()) { - var buffer = toEmit_1_1.value; - arrRemove(buffers, buffer); - subscriber.next(buffer); - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (toEmit_1_1 && !toEmit_1_1.done && (_b = toEmit_1.return)) _b.call(toEmit_1); - } - finally { if (e_2) throw e_2.error; } - } - } - }, function () { - var e_3, _a; - try { - for (var buffers_2 = __values(buffers), buffers_2_1 = buffers_2.next(); !buffers_2_1.done; buffers_2_1 = buffers_2.next()) { - var buffer = buffers_2_1.value; - subscriber.next(buffer); - } - } - catch (e_3_1) { e_3 = { error: e_3_1 }; } - finally { - try { - if (buffers_2_1 && !buffers_2_1.done && (_a = buffers_2.return)) _a.call(buffers_2); - } - finally { if (e_3) throw e_3.error; } - } - subscriber.complete(); - }, undefined, function () { - buffers = null; - })); - }); -} -//# sourceMappingURL=bufferCount.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/bufferCount.js.map b/node_modules/rxjs/dist/esm5/internal/operators/bufferCount.js.map deleted file mode 100644 index 045b2e8..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/bufferCount.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bufferCount.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferCount.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAqD9C,MAAM,UAAU,WAAW,CAAI,UAAkB,EAAE,gBAAsC;IAAtC,iCAAA,EAAA,uBAAsC;IAGvF,gBAAgB,GAAG,gBAAgB,aAAhB,gBAAgB,cAAhB,gBAAgB,GAAI,UAAU,CAAC;IAElD,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,OAAO,GAAU,EAAE,CAAC;QACxB,IAAI,KAAK,GAAG,CAAC,CAAC;QAEd,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;;YACJ,IAAI,MAAM,GAAiB,IAAI,CAAC;YAKhC,IAAI,KAAK,EAAE,GAAG,gBAAiB,KAAK,CAAC,EAAE;gBACrC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;aAClB;;gBAGD,KAAqB,IAAA,YAAA,SAAA,OAAO,CAAA,gCAAA,qDAAE;oBAAzB,IAAM,MAAM,oBAAA;oBACf,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAMnB,IAAI,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE;wBAC/B,MAAM,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,CAAC;wBACtB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;qBACrB;iBACF;;;;;;;;;YAED,IAAI,MAAM,EAAE;;oBAIV,KAAqB,IAAA,WAAA,SAAA,MAAM,CAAA,8BAAA,kDAAE;wBAAxB,IAAM,MAAM,mBAAA;wBACf,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;wBAC3B,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;qBACzB;;;;;;;;;aACF;QACH,CAAC,EACD;;;gBAGE,KAAqB,IAAA,YAAA,SAAA,OAAO,CAAA,gCAAA,qDAAE;oBAAzB,IAAM,MAAM,oBAAA;oBACf,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;iBACzB;;;;;;;;;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EAED,SAAS,EACT;YAEE,OAAO,GAAG,IAAK,CAAC;QAClB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/bufferTime.js b/node_modules/rxjs/dist/esm5/internal/operators/bufferTime.js deleted file mode 100644 index b8f2715..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/bufferTime.js +++ /dev/null @@ -1,77 +0,0 @@ -import { __values } from "tslib"; -import { Subscription } from '../Subscription'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { arrRemove } from '../util/arrRemove'; -import { asyncScheduler } from '../scheduler/async'; -import { popScheduler } from '../util/args'; -import { executeSchedule } from '../util/executeSchedule'; -export function bufferTime(bufferTimeSpan) { - var _a, _b; - var otherArgs = []; - for (var _i = 1; _i < arguments.length; _i++) { - otherArgs[_i - 1] = arguments[_i]; - } - var scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler; - var bufferCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; - var maxBufferSize = otherArgs[1] || Infinity; - return operate(function (source, subscriber) { - var bufferRecords = []; - var restartOnEmit = false; - var emit = function (record) { - var buffer = record.buffer, subs = record.subs; - subs.unsubscribe(); - arrRemove(bufferRecords, record); - subscriber.next(buffer); - restartOnEmit && startBuffer(); - }; - var startBuffer = function () { - if (bufferRecords) { - var subs = new Subscription(); - subscriber.add(subs); - var buffer = []; - var record_1 = { - buffer: buffer, - subs: subs, - }; - bufferRecords.push(record_1); - executeSchedule(subs, scheduler, function () { return emit(record_1); }, bufferTimeSpan); - } - }; - if (bufferCreationInterval !== null && bufferCreationInterval >= 0) { - executeSchedule(subscriber, scheduler, startBuffer, bufferCreationInterval, true); - } - else { - restartOnEmit = true; - } - startBuffer(); - var bufferTimeSubscriber = createOperatorSubscriber(subscriber, function (value) { - var e_1, _a; - var recordsCopy = bufferRecords.slice(); - try { - for (var recordsCopy_1 = __values(recordsCopy), recordsCopy_1_1 = recordsCopy_1.next(); !recordsCopy_1_1.done; recordsCopy_1_1 = recordsCopy_1.next()) { - var record = recordsCopy_1_1.value; - var buffer = record.buffer; - buffer.push(value); - maxBufferSize <= buffer.length && emit(record); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (recordsCopy_1_1 && !recordsCopy_1_1.done && (_a = recordsCopy_1.return)) _a.call(recordsCopy_1); - } - finally { if (e_1) throw e_1.error; } - } - }, function () { - while (bufferRecords === null || bufferRecords === void 0 ? void 0 : bufferRecords.length) { - subscriber.next(bufferRecords.shift().buffer); - } - bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 ? void 0 : bufferTimeSubscriber.unsubscribe(); - subscriber.complete(); - subscriber.unsubscribe(); - }, undefined, function () { return (bufferRecords = null); }); - source.subscribe(bufferTimeSubscriber); - }); -} -//# sourceMappingURL=bufferTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/bufferTime.js.map b/node_modules/rxjs/dist/esm5/internal/operators/bufferTime.js.map deleted file mode 100644 index f99cf0a..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/bufferTime.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bufferTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferTime.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAmE1D,MAAM,UAAU,UAAU,CAAI,cAAsB;;IAAE,mBAAmB;SAAnB,UAAmB,EAAnB,qBAAmB,EAAnB,IAAmB;QAAnB,kCAAmB;;IACvE,IAAM,SAAS,GAAG,MAAA,YAAY,CAAC,SAAS,CAAC,mCAAI,cAAc,CAAC;IAC5D,IAAM,sBAAsB,GAAG,MAAC,SAAS,CAAC,CAAC,CAAY,mCAAI,IAAI,CAAC;IAChE,IAAM,aAAa,GAAI,SAAS,CAAC,CAAC,CAAY,IAAI,QAAQ,CAAC;IAE3D,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,aAAa,GAAiD,EAAE,CAAC;QAGrE,IAAI,aAAa,GAAG,KAAK,CAAC;QAQ1B,IAAM,IAAI,GAAG,UAAC,MAA2C;YAC/C,IAAA,MAAM,GAAW,MAAM,OAAjB,EAAE,IAAI,GAAK,MAAM,KAAX,CAAY;YAChC,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;YACjC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACxB,aAAa,IAAI,WAAW,EAAE,CAAC;QACjC,CAAC,CAAC;QAOF,IAAM,WAAW,GAAG;YAClB,IAAI,aAAa,EAAE;gBACjB,IAAM,IAAI,GAAG,IAAI,YAAY,EAAE,CAAC;gBAChC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBACrB,IAAM,MAAM,GAAQ,EAAE,CAAC;gBACvB,IAAM,QAAM,GAAG;oBACb,MAAM,QAAA;oBACN,IAAI,MAAA;iBACL,CAAC;gBACF,aAAa,CAAC,IAAI,CAAC,QAAM,CAAC,CAAC;gBAC3B,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,cAAM,OAAA,IAAI,CAAC,QAAM,CAAC,EAAZ,CAAY,EAAE,cAAc,CAAC,CAAC;aACtE;QACH,CAAC,CAAC;QAEF,IAAI,sBAAsB,KAAK,IAAI,IAAI,sBAAsB,IAAI,CAAC,EAAE;YAIlE,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,sBAAsB,EAAE,IAAI,CAAC,CAAC;SACnF;aAAM;YACL,aAAa,GAAG,IAAI,CAAC;SACtB;QAED,WAAW,EAAE,CAAC;QAEd,IAAM,oBAAoB,GAAG,wBAAwB,CACnD,UAAU,EACV,UAAC,KAAQ;;YAKP,IAAM,WAAW,GAAG,aAAc,CAAC,KAAK,EAAE,CAAC;;gBAC3C,KAAqB,IAAA,gBAAA,SAAA,WAAW,CAAA,wCAAA,iEAAE;oBAA7B,IAAM,MAAM,wBAAA;oBAEP,IAAA,MAAM,GAAK,MAAM,OAAX,CAAY;oBAC1B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAEnB,aAAa,IAAI,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC;iBAChD;;;;;;;;;QACH,CAAC,EACD;YAGE,OAAO,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,MAAM,EAAE;gBAC5B,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,EAAG,CAAC,MAAM,CAAC,CAAC;aAChD;YACD,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,WAAW,EAAE,CAAC;YACpC,UAAU,CAAC,QAAQ,EAAE,CAAC;YACtB,UAAU,CAAC,WAAW,EAAE,CAAC;QAC3B,CAAC,EAED,SAAS,EAET,cAAM,OAAA,CAAC,aAAa,GAAG,IAAI,CAAC,EAAtB,CAAsB,CAC7B,CAAC;QAEF,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/bufferToggle.js b/node_modules/rxjs/dist/esm5/internal/operators/bufferToggle.js deleted file mode 100644 index d18359b..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/bufferToggle.js +++ /dev/null @@ -1,45 +0,0 @@ -import { __values } from "tslib"; -import { Subscription } from '../Subscription'; -import { operate } from '../util/lift'; -import { innerFrom } from '../observable/innerFrom'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { noop } from '../util/noop'; -import { arrRemove } from '../util/arrRemove'; -export function bufferToggle(openings, closingSelector) { - return operate(function (source, subscriber) { - var buffers = []; - innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, function (openValue) { - var buffer = []; - buffers.push(buffer); - var closingSubscription = new Subscription(); - var emitBuffer = function () { - arrRemove(buffers, buffer); - subscriber.next(buffer); - closingSubscription.unsubscribe(); - }; - closingSubscription.add(innerFrom(closingSelector(openValue)).subscribe(createOperatorSubscriber(subscriber, emitBuffer, noop))); - }, noop)); - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var e_1, _a; - try { - for (var buffers_1 = __values(buffers), buffers_1_1 = buffers_1.next(); !buffers_1_1.done; buffers_1_1 = buffers_1.next()) { - var buffer = buffers_1_1.value; - buffer.push(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (buffers_1_1 && !buffers_1_1.done && (_a = buffers_1.return)) _a.call(buffers_1); - } - finally { if (e_1) throw e_1.error; } - } - }, function () { - while (buffers.length > 0) { - subscriber.next(buffers.shift()); - } - subscriber.complete(); - })); - }); -} -//# sourceMappingURL=bufferToggle.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/bufferToggle.js.map b/node_modules/rxjs/dist/esm5/internal/operators/bufferToggle.js.map deleted file mode 100644 index 65d0cbc..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/bufferToggle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bufferToggle.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferToggle.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AA6C9C,MAAM,UAAU,YAAY,CAC1B,QAA4B,EAC5B,eAAmD;IAEnD,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAM,OAAO,GAAU,EAAE,CAAC;QAG1B,SAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAC3B,wBAAwB,CACtB,UAAU,EACV,UAAC,SAAS;YACR,IAAM,MAAM,GAAQ,EAAE,CAAC;YACvB,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAGrB,IAAM,mBAAmB,GAAG,IAAI,YAAY,EAAE,CAAC;YAE/C,IAAM,UAAU,GAAG;gBACjB,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;gBAC3B,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBACxB,mBAAmB,CAAC,WAAW,EAAE,CAAC;YACpC,CAAC,CAAC;YAGF,mBAAmB,CAAC,GAAG,CAAC,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QACnI,CAAC,EACD,IAAI,CACL,CACF,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;;;gBAEJ,KAAqB,IAAA,YAAA,SAAA,OAAO,CAAA,gCAAA,qDAAE;oBAAzB,IAAM,MAAM,oBAAA;oBACf,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBACpB;;;;;;;;;QACH,CAAC,EACD;YAEE,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzB,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAG,CAAC,CAAC;aACnC;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/bufferWhen.js b/node_modules/rxjs/dist/esm5/internal/operators/bufferWhen.js deleted file mode 100644 index 019fb52..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/bufferWhen.js +++ /dev/null @@ -1,23 +0,0 @@ -import { operate } from '../util/lift'; -import { noop } from '../util/noop'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; -export function bufferWhen(closingSelector) { - return operate(function (source, subscriber) { - var buffer = null; - var closingSubscriber = null; - var openBuffer = function () { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); - var b = buffer; - buffer = []; - b && subscriber.next(b); - innerFrom(closingSelector()).subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openBuffer, noop))); - }; - openBuffer(); - source.subscribe(createOperatorSubscriber(subscriber, function (value) { return buffer === null || buffer === void 0 ? void 0 : buffer.push(value); }, function () { - buffer && subscriber.next(buffer); - subscriber.complete(); - }, undefined, function () { return (buffer = closingSubscriber = null); })); - }); -} -//# sourceMappingURL=bufferWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/bufferWhen.js.map b/node_modules/rxjs/dist/esm5/internal/operators/bufferWhen.js.map deleted file mode 100644 index 3adee4c..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/bufferWhen.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bufferWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferWhen.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAwCpD,MAAM,UAAU,UAAU,CAAI,eAA2C;IACvE,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,MAAM,GAAe,IAAI,CAAC;QAI9B,IAAI,iBAAiB,GAAyB,IAAI,CAAC;QAMnD,IAAM,UAAU,GAAG;YAGjB,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,WAAW,EAAE,CAAC;YAEjC,IAAM,CAAC,GAAG,MAAM,CAAC;YACjB,MAAM,GAAG,EAAE,CAAC;YACZ,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAGxB,SAAS,CAAC,eAAe,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,iBAAiB,GAAG,wBAAwB,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QACvH,CAAC,CAAC;QAGF,UAAU,EAAE,CAAC;QAGb,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EAEV,UAAC,KAAK,IAAK,OAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAC,KAAK,CAAC,EAAnB,CAAmB,EAG9B;YACE,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAClC,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EAED,SAAS,EAET,cAAM,OAAA,CAAC,MAAM,GAAG,iBAAiB,GAAG,IAAK,CAAC,EAApC,CAAoC,CAC3C,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/catchError.js b/node_modules/rxjs/dist/esm5/internal/operators/catchError.js deleted file mode 100644 index 646352f..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/catchError.js +++ /dev/null @@ -1,27 +0,0 @@ -import { innerFrom } from '../observable/innerFrom'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { operate } from '../util/lift'; -export function catchError(selector) { - return operate(function (source, subscriber) { - var innerSub = null; - var syncUnsub = false; - var handledResult; - innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, function (err) { - handledResult = innerFrom(selector(err, catchError(selector)(source))); - if (innerSub) { - innerSub.unsubscribe(); - innerSub = null; - handledResult.subscribe(subscriber); - } - else { - syncUnsub = true; - } - })); - if (syncUnsub) { - innerSub.unsubscribe(); - innerSub = null; - handledResult.subscribe(subscriber); - } - }); -} -//# sourceMappingURL=catchError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/catchError.js.map b/node_modules/rxjs/dist/esm5/internal/operators/catchError.js.map deleted file mode 100644 index caa61b7..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/catchError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"catchError.js","sourceRoot":"","sources":["../../../../src/internal/operators/catchError.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAkGvC,MAAM,UAAU,UAAU,CACxB,QAAgD;IAEhD,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAwB,IAAI,CAAC;QACzC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,aAA6C,CAAC;QAElD,QAAQ,GAAG,MAAM,CAAC,SAAS,CACzB,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,UAAC,GAAG;YAC7D,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACvE,IAAI,QAAQ,EAAE;gBACZ,QAAQ,CAAC,WAAW,EAAE,CAAC;gBACvB,QAAQ,GAAG,IAAI,CAAC;gBAChB,aAAa,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;aACrC;iBAAM;gBAGL,SAAS,GAAG,IAAI,CAAC;aAClB;QACH,CAAC,CAAC,CACH,CAAC;QAEF,IAAI,SAAS,EAAE;YAMb,QAAQ,CAAC,WAAW,EAAE,CAAC;YACvB,QAAQ,GAAG,IAAI,CAAC;YAChB,aAAc,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;SACtC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/combineAll.js b/node_modules/rxjs/dist/esm5/internal/operators/combineAll.js deleted file mode 100644 index 4db17c2..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/combineAll.js +++ /dev/null @@ -1,3 +0,0 @@ -import { combineLatestAll } from './combineLatestAll'; -export var combineAll = combineLatestAll; -//# sourceMappingURL=combineAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/combineAll.js.map b/node_modules/rxjs/dist/esm5/internal/operators/combineAll.js.map deleted file mode 100644 index da39afa..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/combineAll.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"combineAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAKtD,MAAM,CAAC,IAAM,UAAU,GAAG,gBAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/combineLatest.js b/node_modules/rxjs/dist/esm5/internal/operators/combineLatest.js deleted file mode 100644 index 68b4c59..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/combineLatest.js +++ /dev/null @@ -1,20 +0,0 @@ -import { __read, __spreadArray } from "tslib"; -import { combineLatestInit } from '../observable/combineLatest'; -import { operate } from '../util/lift'; -import { argsOrArgArray } from '../util/argsOrArgArray'; -import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; -import { pipe } from '../util/pipe'; -import { popResultSelector } from '../util/args'; -export function combineLatest() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var resultSelector = popResultSelector(args); - return resultSelector - ? pipe(combineLatest.apply(void 0, __spreadArray([], __read(args))), mapOneOrManyArgs(resultSelector)) - : operate(function (source, subscriber) { - combineLatestInit(__spreadArray([source], __read(argsOrArgArray(args))))(subscriber); - }); -} -//# sourceMappingURL=combineLatest.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/combineLatest.js.map b/node_modules/rxjs/dist/esm5/internal/operators/combineLatest.js.map deleted file mode 100644 index c9ef6ed..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/combineLatest.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"combineLatest.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatest.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAoBjD,MAAM,UAAU,aAAa;IAAO,cAA6D;SAA7D,UAA6D,EAA7D,qBAA6D,EAA7D,IAA6D;QAA7D,yBAA6D;;IAC/F,IAAM,cAAc,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC/C,OAAO,cAAc;QACnB,CAAC,CAAC,IAAI,CAAC,aAAa,wCAAK,IAAoC,KAAG,gBAAgB,CAAC,cAAc,CAAC,CAAC;QACjG,CAAC,CAAC,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YACzB,iBAAiB,gBAAE,MAAM,UAAK,cAAc,CAAC,IAAI,CAAC,GAAE,CAAC,UAAU,CAAC,CAAC;QACnE,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/combineLatestAll.js b/node_modules/rxjs/dist/esm5/internal/operators/combineLatestAll.js deleted file mode 100644 index 3af3909..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/combineLatestAll.js +++ /dev/null @@ -1,6 +0,0 @@ -import { combineLatest } from '../observable/combineLatest'; -import { joinAllInternals } from './joinAllInternals'; -export function combineLatestAll(project) { - return joinAllInternals(combineLatest, project); -} -//# sourceMappingURL=combineLatestAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/combineLatestAll.js.map b/node_modules/rxjs/dist/esm5/internal/operators/combineLatestAll.js.map deleted file mode 100644 index 2adf9b8..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/combineLatestAll.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"combineLatestAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatestAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AA6CtD,MAAM,UAAU,gBAAgB,CAAI,OAAsC;IACxE,OAAO,gBAAgB,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;AAClD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/combineLatestWith.js b/node_modules/rxjs/dist/esm5/internal/operators/combineLatestWith.js deleted file mode 100644 index 30e3761..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/combineLatestWith.js +++ /dev/null @@ -1,10 +0,0 @@ -import { __read, __spreadArray } from "tslib"; -import { combineLatest } from './combineLatest'; -export function combineLatestWith() { - var otherSources = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherSources[_i] = arguments[_i]; - } - return combineLatest.apply(void 0, __spreadArray([], __read(otherSources))); -} -//# sourceMappingURL=combineLatestWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/combineLatestWith.js.map b/node_modules/rxjs/dist/esm5/internal/operators/combineLatestWith.js.map deleted file mode 100644 index 2e30fb9..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/combineLatestWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"combineLatestWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatestWith.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA0ChD,MAAM,UAAU,iBAAiB;IAC/B,sBAA6C;SAA7C,UAA6C,EAA7C,qBAA6C,EAA7C,IAA6C;QAA7C,iCAA6C;;IAE7C,OAAO,aAAa,wCAAI,YAAY,IAAE;AACxC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/concat.js b/node_modules/rxjs/dist/esm5/internal/operators/concat.js deleted file mode 100644 index b31a393..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/concat.js +++ /dev/null @@ -1,16 +0,0 @@ -import { __read, __spreadArray } from "tslib"; -import { operate } from '../util/lift'; -import { concatAll } from './concatAll'; -import { popScheduler } from '../util/args'; -import { from } from '../observable/from'; -export function concat() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = popScheduler(args); - return operate(function (source, subscriber) { - concatAll()(from(__spreadArray([source], __read(args)), scheduler)).subscribe(subscriber); - }); -} -//# sourceMappingURL=concat.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/concat.js.map b/node_modules/rxjs/dist/esm5/internal/operators/concat.js.map deleted file mode 100644 index 0e9abef..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/concat.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concat.js","sourceRoot":"","sources":["../../../../src/internal/operators/concat.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAY1C,MAAM,UAAU,MAAM;IAAO,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,yBAAc;;IACzC,IAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,SAAS,EAAE,CAAC,IAAI,gBAAE,MAAM,UAAK,IAAI,IAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/concatAll.js b/node_modules/rxjs/dist/esm5/internal/operators/concatAll.js deleted file mode 100644 index 9ef0022..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/concatAll.js +++ /dev/null @@ -1,5 +0,0 @@ -import { mergeAll } from './mergeAll'; -export function concatAll() { - return mergeAll(1); -} -//# sourceMappingURL=concatAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/concatAll.js.map b/node_modules/rxjs/dist/esm5/internal/operators/concatAll.js.map deleted file mode 100644 index 0231f3f..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/concatAll.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concatAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AA2DtC,MAAM,UAAU,SAAS;IACvB,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC;AACrB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/concatMap.js b/node_modules/rxjs/dist/esm5/internal/operators/concatMap.js deleted file mode 100644 index bdacda3..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/concatMap.js +++ /dev/null @@ -1,6 +0,0 @@ -import { mergeMap } from './mergeMap'; -import { isFunction } from '../util/isFunction'; -export function concatMap(project, resultSelector) { - return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1); -} -//# sourceMappingURL=concatMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/concatMap.js.map b/node_modules/rxjs/dist/esm5/internal/operators/concatMap.js.map deleted file mode 100644 index 2d54e93..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/concatMap.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concatMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AA2EhD,MAAM,UAAU,SAAS,CACvB,OAAuC,EACvC,cAA6G;IAE7G,OAAO,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AAClG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/concatMapTo.js b/node_modules/rxjs/dist/esm5/internal/operators/concatMapTo.js deleted file mode 100644 index 44a5eb3..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/concatMapTo.js +++ /dev/null @@ -1,6 +0,0 @@ -import { concatMap } from './concatMap'; -import { isFunction } from '../util/isFunction'; -export function concatMapTo(innerObservable, resultSelector) { - return isFunction(resultSelector) ? concatMap(function () { return innerObservable; }, resultSelector) : concatMap(function () { return innerObservable; }); -} -//# sourceMappingURL=concatMapTo.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/concatMapTo.js.map b/node_modules/rxjs/dist/esm5/internal/operators/concatMapTo.js.map deleted file mode 100644 index 23617e9..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/concatMapTo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concatMapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatMapTo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAuEhD,MAAM,UAAU,WAAW,CACzB,eAAkB,EAClB,cAA6G;IAE7G,OAAO,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,CAAC,CAAC;AAC1H,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/concatWith.js b/node_modules/rxjs/dist/esm5/internal/operators/concatWith.js deleted file mode 100644 index c1d0bf6..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/concatWith.js +++ /dev/null @@ -1,10 +0,0 @@ -import { __read, __spreadArray } from "tslib"; -import { concat } from './concat'; -export function concatWith() { - var otherSources = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherSources[_i] = arguments[_i]; - } - return concat.apply(void 0, __spreadArray([], __read(otherSources))); -} -//# sourceMappingURL=concatWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/concatWith.js.map b/node_modules/rxjs/dist/esm5/internal/operators/concatWith.js.map deleted file mode 100644 index 0f7613c..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/concatWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concatWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/concatWith.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AA0ClC,MAAM,UAAU,UAAU;IACxB,sBAA6C;SAA7C,UAA6C,EAA7C,qBAA6C,EAA7C,IAA6C;QAA7C,iCAA6C;;IAE7C,OAAO,MAAM,wCAAI,YAAY,IAAE;AACjC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/connect.js b/node_modules/rxjs/dist/esm5/internal/operators/connect.js deleted file mode 100644 index 3ffd469..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/connect.js +++ /dev/null @@ -1,17 +0,0 @@ -import { Subject } from '../Subject'; -import { innerFrom } from '../observable/innerFrom'; -import { operate } from '../util/lift'; -import { fromSubscribable } from '../observable/fromSubscribable'; -var DEFAULT_CONFIG = { - connector: function () { return new Subject(); }, -}; -export function connect(selector, config) { - if (config === void 0) { config = DEFAULT_CONFIG; } - var connector = config.connector; - return operate(function (source, subscriber) { - var subject = connector(); - innerFrom(selector(fromSubscribable(subject))).subscribe(subscriber); - subscriber.add(source.subscribe(subject)); - }); -} -//# sourceMappingURL=connect.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/connect.js.map b/node_modules/rxjs/dist/esm5/internal/operators/connect.js.map deleted file mode 100644 index bdc6b7a..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/connect.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"connect.js","sourceRoot":"","sources":["../../../../src/internal/operators/connect.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAgBlE,IAAM,cAAc,GAA2B;IAC7C,SAAS,EAAE,cAAM,OAAA,IAAI,OAAO,EAAW,EAAtB,CAAsB;CACxC,CAAC;AA2EF,MAAM,UAAU,OAAO,CACrB,QAAsC,EACtC,MAAyC;IAAzC,uBAAA,EAAA,uBAAyC;IAEjC,IAAA,SAAS,GAAK,MAAM,UAAX,CAAY;IAC7B,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAM,OAAO,GAAG,SAAS,EAAE,CAAC;QAC5B,SAAS,CAAC,QAAQ,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QACrE,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/count.js b/node_modules/rxjs/dist/esm5/internal/operators/count.js deleted file mode 100644 index 73511a9..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/count.js +++ /dev/null @@ -1,5 +0,0 @@ -import { reduce } from './reduce'; -export function count(predicate) { - return reduce(function (total, value, i) { return (!predicate || predicate(value, i) ? total + 1 : total); }, 0); -} -//# sourceMappingURL=count.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/count.js.map b/node_modules/rxjs/dist/esm5/internal/operators/count.js.map deleted file mode 100644 index ebec8cd..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/count.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"count.js","sourceRoot":"","sources":["../../../../src/internal/operators/count.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAyDlC,MAAM,UAAU,KAAK,CAAI,SAAgD;IACvE,OAAO,MAAM,CAAC,UAAC,KAAK,EAAE,KAAK,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,SAAS,IAAI,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAvD,CAAuD,EAAE,CAAC,CAAC,CAAC;AACjG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/debounce.js b/node_modules/rxjs/dist/esm5/internal/operators/debounce.js deleted file mode 100644 index 7c0d289..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/debounce.js +++ /dev/null @@ -1,34 +0,0 @@ -import { operate } from '../util/lift'; -import { noop } from '../util/noop'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; -export function debounce(durationSelector) { - return operate(function (source, subscriber) { - var hasValue = false; - var lastValue = null; - var durationSubscriber = null; - var emit = function () { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); - durationSubscriber = null; - if (hasValue) { - hasValue = false; - var value = lastValue; - lastValue = null; - subscriber.next(value); - } - }; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe(); - hasValue = true; - lastValue = value; - durationSubscriber = createOperatorSubscriber(subscriber, emit, noop); - innerFrom(durationSelector(value)).subscribe(durationSubscriber); - }, function () { - emit(); - subscriber.complete(); - }, undefined, function () { - lastValue = durationSubscriber = null; - })); - }); -} -//# sourceMappingURL=debounce.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/debounce.js.map b/node_modules/rxjs/dist/esm5/internal/operators/debounce.js.map deleted file mode 100644 index 889ae7f..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/debounce.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"debounce.js","sourceRoot":"","sources":["../../../../src/internal/operators/debounce.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA4DpD,MAAM,UAAU,QAAQ,CAAI,gBAAoD;IAC9E,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,SAAS,GAAa,IAAI,CAAC;QAE/B,IAAI,kBAAkB,GAA2B,IAAI,CAAC;QAEtD,IAAM,IAAI,GAAG;YAIX,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,WAAW,EAAE,CAAC;YAClC,kBAAkB,GAAG,IAAI,CAAC;YAC1B,IAAI,QAAQ,EAAE;gBAEZ,QAAQ,GAAG,KAAK,CAAC;gBACjB,IAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAQ;YAIP,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,WAAW,EAAE,CAAC;YAClC,QAAQ,GAAG,IAAI,CAAC;YAChB,SAAS,GAAG,KAAK,CAAC;YAGlB,kBAAkB,GAAG,wBAAwB,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;YAEtE,SAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;QACnE,CAAC,EACD;YAGE,IAAI,EAAE,CAAC;YACP,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EAED,SAAS,EACT;YAEE,SAAS,GAAG,kBAAkB,GAAG,IAAI,CAAC;QACxC,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js b/node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js deleted file mode 100644 index 7e4f96c..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js +++ /dev/null @@ -1,44 +0,0 @@ -import { asyncScheduler } from '../scheduler/async'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function debounceTime(dueTime, scheduler) { - if (scheduler === void 0) { scheduler = asyncScheduler; } - return operate(function (source, subscriber) { - var activeTask = null; - var lastValue = null; - var lastTime = null; - var emit = function () { - if (activeTask) { - activeTask.unsubscribe(); - activeTask = null; - var value = lastValue; - lastValue = null; - subscriber.next(value); - } - }; - function emitWhenIdle() { - var targetTime = lastTime + dueTime; - var now = scheduler.now(); - if (now < targetTime) { - activeTask = this.schedule(undefined, targetTime - now); - subscriber.add(activeTask); - return; - } - emit(); - } - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - lastValue = value; - lastTime = scheduler.now(); - if (!activeTask) { - activeTask = scheduler.schedule(emitWhenIdle, dueTime); - subscriber.add(activeTask); - } - }, function () { - emit(); - subscriber.complete(); - }, undefined, function () { - lastValue = activeTask = null; - })); - }); -} -//# sourceMappingURL=debounceTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js.map b/node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js.map deleted file mode 100644 index f808a88..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/debounceTime.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"debounceTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/debounceTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA0DhE,MAAM,UAAU,YAAY,CAAI,OAAe,EAAE,SAAyC;IAAzC,0BAAA,EAAA,0BAAyC;IACxF,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,UAAU,GAAwB,IAAI,CAAC;QAC3C,IAAI,SAAS,GAAa,IAAI,CAAC;QAC/B,IAAI,QAAQ,GAAkB,IAAI,CAAC;QAEnC,IAAM,IAAI,GAAG;YACX,IAAI,UAAU,EAAE;gBAEd,UAAU,CAAC,WAAW,EAAE,CAAC;gBACzB,UAAU,GAAG,IAAI,CAAC;gBAClB,IAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,CAAC;QACF,SAAS,YAAY;YAInB,IAAM,UAAU,GAAG,QAAS,GAAG,OAAO,CAAC;YACvC,IAAM,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;YAC5B,IAAI,GAAG,GAAG,UAAU,EAAE;gBAEpB,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,UAAU,GAAG,GAAG,CAAC,CAAC;gBACxD,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;gBAC3B,OAAO;aACR;YAED,IAAI,EAAE,CAAC;QACT,CAAC;QAED,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAQ;YACP,SAAS,GAAG,KAAK,CAAC;YAClB,QAAQ,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;YAG3B,IAAI,CAAC,UAAU,EAAE;gBACf,UAAU,GAAG,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;gBACvD,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;aAC5B;QACH,CAAC,EACD;YAGE,IAAI,EAAE,CAAC;YACP,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EAED,SAAS,EACT;YAEE,SAAS,GAAG,UAAU,GAAG,IAAI,CAAC;QAChC,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/defaultIfEmpty.js b/node_modules/rxjs/dist/esm5/internal/operators/defaultIfEmpty.js deleted file mode 100644 index bf46020..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/defaultIfEmpty.js +++ /dev/null @@ -1,17 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function defaultIfEmpty(defaultValue) { - return operate(function (source, subscriber) { - var hasValue = false; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - hasValue = true; - subscriber.next(value); - }, function () { - if (!hasValue) { - subscriber.next(defaultValue); - } - subscriber.complete(); - })); - }); -} -//# sourceMappingURL=defaultIfEmpty.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/defaultIfEmpty.js.map b/node_modules/rxjs/dist/esm5/internal/operators/defaultIfEmpty.js.map deleted file mode 100644 index 248518e..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/defaultIfEmpty.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defaultIfEmpty.js","sourceRoot":"","sources":["../../../../src/internal/operators/defaultIfEmpty.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAqChE,MAAM,UAAU,cAAc,CAAO,YAAe;IAClD,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,QAAQ,GAAG,IAAI,CAAC;YAChB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC,EACD;YACE,IAAI,CAAC,QAAQ,EAAE;gBACb,UAAU,CAAC,IAAI,CAAC,YAAa,CAAC,CAAC;aAChC;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/delay.js b/node_modules/rxjs/dist/esm5/internal/operators/delay.js deleted file mode 100644 index cd2bfd0..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/delay.js +++ /dev/null @@ -1,9 +0,0 @@ -import { asyncScheduler } from '../scheduler/async'; -import { delayWhen } from './delayWhen'; -import { timer } from '../observable/timer'; -export function delay(due, scheduler) { - if (scheduler === void 0) { scheduler = asyncScheduler; } - var duration = timer(due, scheduler); - return delayWhen(function () { return duration; }); -} -//# sourceMappingURL=delay.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/delay.js.map b/node_modules/rxjs/dist/esm5/internal/operators/delay.js.map deleted file mode 100644 index 444b1fe..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/delay.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"delay.js","sourceRoot":"","sources":["../../../../src/internal/operators/delay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AA0D5C,MAAM,UAAU,KAAK,CAAI,GAAkB,EAAE,SAAyC;IAAzC,0BAAA,EAAA,0BAAyC;IACpF,IAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IACvC,OAAO,SAAS,CAAC,cAAM,OAAA,QAAQ,EAAR,CAAQ,CAAC,CAAC;AACnC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js b/node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js deleted file mode 100644 index 60869ef..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js +++ /dev/null @@ -1,15 +0,0 @@ -import { concat } from '../observable/concat'; -import { take } from './take'; -import { ignoreElements } from './ignoreElements'; -import { mapTo } from './mapTo'; -import { mergeMap } from './mergeMap'; -import { innerFrom } from '../observable/innerFrom'; -export function delayWhen(delayDurationSelector, subscriptionDelay) { - if (subscriptionDelay) { - return function (source) { - return concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector))); - }; - } - return mergeMap(function (value, index) { return innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)); }); -} -//# sourceMappingURL=delayWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js.map b/node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js.map deleted file mode 100644 index a1dbf6b..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/delayWhen.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"delayWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/delayWhen.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAoFpD,MAAM,UAAU,SAAS,CACvB,qBAAwE,EACxE,iBAAmC;IAEnC,IAAI,iBAAiB,EAAE;QAErB,OAAO,UAAC,MAAqB;YAC3B,OAAA,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC,CAAC;QAAxG,CAAwG,CAAC;KAC5G;IAED,OAAO,QAAQ,CAAC,UAAC,KAAK,EAAE,KAAK,IAAK,OAAA,SAAS,CAAC,qBAAqB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,EAA1E,CAA0E,CAAC,CAAC;AAChH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/dematerialize.js b/node_modules/rxjs/dist/esm5/internal/operators/dematerialize.js deleted file mode 100644 index afcd092..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/dematerialize.js +++ /dev/null @@ -1,9 +0,0 @@ -import { observeNotification } from '../Notification'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function dematerialize() { - return operate(function (source, subscriber) { - source.subscribe(createOperatorSubscriber(subscriber, function (notification) { return observeNotification(notification, subscriber); })); - }); -} -//# sourceMappingURL=dematerialize.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/dematerialize.js.map b/node_modules/rxjs/dist/esm5/internal/operators/dematerialize.js.map deleted file mode 100644 index 01d72f5..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/dematerialize.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dematerialize.js","sourceRoot":"","sources":["../../../../src/internal/operators/dematerialize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAkDhE,MAAM,UAAU,aAAa;IAC3B,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAC,YAAY,IAAK,OAAA,mBAAmB,CAAC,YAAY,EAAE,UAAU,CAAC,EAA7C,CAA6C,CAAC,CAAC,CAAC;IAC1H,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/distinct.js b/node_modules/rxjs/dist/esm5/internal/operators/distinct.js deleted file mode 100644 index f8503f3..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/distinct.js +++ /dev/null @@ -1,18 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { noop } from '../util/noop'; -import { innerFrom } from '../observable/innerFrom'; -export function distinct(keySelector, flushes) { - return operate(function (source, subscriber) { - var distinctKeys = new Set(); - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var key = keySelector ? keySelector(value) : value; - if (!distinctKeys.has(key)) { - distinctKeys.add(key); - subscriber.next(value); - } - })); - flushes && innerFrom(flushes).subscribe(createOperatorSubscriber(subscriber, function () { return distinctKeys.clear(); }, noop)); - }); -} -//# sourceMappingURL=distinct.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/distinct.js.map b/node_modules/rxjs/dist/esm5/internal/operators/distinct.js.map deleted file mode 100644 index 0cf50e8..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/distinct.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"distinct.js","sourceRoot":"","sources":["../../../../src/internal/operators/distinct.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA2DpD,MAAM,UAAU,QAAQ,CAAO,WAA6B,EAAE,OAA8B;IAC1F,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAM,YAAY,GAAG,IAAI,GAAG,EAAE,CAAC;QAC/B,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,IAAM,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;YACrD,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;gBAC1B,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBACtB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,CAAC,CACH,CAAC;QAEF,OAAO,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,cAAM,OAAA,YAAY,CAAC,KAAK,EAAE,EAApB,CAAoB,EAAE,IAAI,CAAC,CAAC,CAAC;IAClH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js b/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js deleted file mode 100644 index 3094442..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js +++ /dev/null @@ -1,23 +0,0 @@ -import { identity } from '../util/identity'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function distinctUntilChanged(comparator, keySelector) { - if (keySelector === void 0) { keySelector = identity; } - comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare; - return operate(function (source, subscriber) { - var previousKey; - var first = true; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var currentKey = keySelector(value); - if (first || !comparator(previousKey, currentKey)) { - first = false; - previousKey = currentKey; - subscriber.next(value); - } - })); - }); -} -function defaultCompare(a, b) { - return a === b; -} -//# sourceMappingURL=distinctUntilChanged.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js.map b/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js.map deleted file mode 100644 index 5652b1d..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"distinctUntilChanged.js","sourceRoot":"","sources":["../../../../src/internal/operators/distinctUntilChanged.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAuIhE,MAAM,UAAU,oBAAoB,CAClC,UAAiD,EACjD,WAA0D;IAA1D,4BAAA,EAAA,cAA+B,QAA2B;IAK1D,UAAU,GAAG,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,cAAc,CAAC;IAE1C,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAGhC,IAAI,WAAc,CAAC;QAEnB,IAAI,KAAK,GAAG,IAAI,CAAC;QAEjB,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YAEzC,IAAM,UAAU,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;YAKtC,IAAI,KAAK,IAAI,CAAC,UAAW,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE;gBAMlD,KAAK,GAAG,KAAK,CAAC;gBACd,WAAW,GAAG,UAAU,CAAC;gBAGzB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,cAAc,CAAC,CAAM,EAAE,CAAM;IACpC,OAAO,CAAC,KAAK,CAAC,CAAC;AACjB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilKeyChanged.js b/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilKeyChanged.js deleted file mode 100644 index 99e47a5..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilKeyChanged.js +++ /dev/null @@ -1,5 +0,0 @@ -import { distinctUntilChanged } from './distinctUntilChanged'; -export function distinctUntilKeyChanged(key, compare) { - return distinctUntilChanged(function (x, y) { return (compare ? compare(x[key], y[key]) : x[key] === y[key]); }); -} -//# sourceMappingURL=distinctUntilKeyChanged.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilKeyChanged.js.map b/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilKeyChanged.js.map deleted file mode 100644 index 1d34f02..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/distinctUntilKeyChanged.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"distinctUntilKeyChanged.js","sourceRoot":"","sources":["../../../../src/internal/operators/distinctUntilKeyChanged.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAqE9D,MAAM,UAAU,uBAAuB,CACrC,GAAM,EACN,OAAuC;IAEvC,OAAO,oBAAoB,CAAC,UAAC,CAAI,EAAE,CAAI,IAAK,OAAA,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,EAAvD,CAAuD,CAAC,CAAC;AACvG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/elementAt.js b/node_modules/rxjs/dist/esm5/internal/operators/elementAt.js deleted file mode 100644 index 4d53c66..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/elementAt.js +++ /dev/null @@ -1,15 +0,0 @@ -import { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError'; -import { filter } from './filter'; -import { throwIfEmpty } from './throwIfEmpty'; -import { defaultIfEmpty } from './defaultIfEmpty'; -import { take } from './take'; -export function elementAt(index, defaultValue) { - if (index < 0) { - throw new ArgumentOutOfRangeError(); - } - var hasDefaultValue = arguments.length >= 2; - return function (source) { - return source.pipe(filter(function (v, i) { return i === index; }), take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new ArgumentOutOfRangeError(); })); - }; -} -//# sourceMappingURL=elementAt.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/elementAt.js.map b/node_modules/rxjs/dist/esm5/internal/operators/elementAt.js.map deleted file mode 100644 index 7c802cd..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/elementAt.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"elementAt.js","sourceRoot":"","sources":["../../../../src/internal/operators/elementAt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAG1E,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAkD9B,MAAM,UAAU,SAAS,CAAW,KAAa,EAAE,YAAgB;IACjE,IAAI,KAAK,GAAG,CAAC,EAAE;QACb,MAAM,IAAI,uBAAuB,EAAE,CAAC;KACrC;IACD,IAAM,eAAe,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;IAC9C,OAAO,UAAC,MAAqB;QAC3B,OAAA,MAAM,CAAC,IAAI,CACT,MAAM,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,KAAK,KAAK,EAAX,CAAW,CAAC,EAC7B,IAAI,CAAC,CAAC,CAAC,EACP,eAAe,CAAC,CAAC,CAAC,cAAc,CAAC,YAAa,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,cAAM,OAAA,IAAI,uBAAuB,EAAE,EAA7B,CAA6B,CAAC,CACpG;IAJD,CAIC,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/endWith.js b/node_modules/rxjs/dist/esm5/internal/operators/endWith.js deleted file mode 100644 index 81f6808..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/endWith.js +++ /dev/null @@ -1,11 +0,0 @@ -import { __read, __spreadArray } from "tslib"; -import { concat } from '../observable/concat'; -import { of } from '../observable/of'; -export function endWith() { - var values = []; - for (var _i = 0; _i < arguments.length; _i++) { - values[_i] = arguments[_i]; - } - return function (source) { return concat(source, of.apply(void 0, __spreadArray([], __read(values)))); }; -} -//# sourceMappingURL=endWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/endWith.js.map b/node_modules/rxjs/dist/esm5/internal/operators/endWith.js.map deleted file mode 100644 index 6e406b3..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/endWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"endWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/endWith.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AA8DtC,MAAM,UAAU,OAAO;IAAI,gBAAmC;SAAnC,UAAmC,EAAnC,qBAAmC,EAAnC,IAAmC;QAAnC,2BAAmC;;IAC5D,OAAO,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,MAAM,EAAE,EAAE,wCAAI,MAAM,IAAmB,EAA9C,CAA8C,CAAC;AACnF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/every.js b/node_modules/rxjs/dist/esm5/internal/operators/every.js deleted file mode 100644 index 579ffb7..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/every.js +++ /dev/null @@ -1,17 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function every(predicate, thisArg) { - return operate(function (source, subscriber) { - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - if (!predicate.call(thisArg, value, index++, source)) { - subscriber.next(false); - subscriber.complete(); - } - }, function () { - subscriber.next(true); - subscriber.complete(); - })); - }); -} -//# sourceMappingURL=every.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/every.js.map b/node_modules/rxjs/dist/esm5/internal/operators/every.js.map deleted file mode 100644 index c94bfc6..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/every.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"every.js","sourceRoot":"","sources":["../../../../src/internal/operators/every.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAwChE,MAAM,UAAU,KAAK,CACnB,SAAsE,EACtE,OAAa;IAEb,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,EAAE;gBACpD,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,EACD;YACE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/exhaust.js b/node_modules/rxjs/dist/esm5/internal/operators/exhaust.js deleted file mode 100644 index 90f8c75..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/exhaust.js +++ /dev/null @@ -1,3 +0,0 @@ -import { exhaustAll } from './exhaustAll'; -export var exhaust = exhaustAll; -//# sourceMappingURL=exhaust.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/exhaust.js.map b/node_modules/rxjs/dist/esm5/internal/operators/exhaust.js.map deleted file mode 100644 index a490626..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/exhaust.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exhaust.js","sourceRoot":"","sources":["../../../../src/internal/operators/exhaust.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1C,MAAM,CAAC,IAAM,OAAO,GAAG,UAAU,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/exhaustAll.js b/node_modules/rxjs/dist/esm5/internal/operators/exhaustAll.js deleted file mode 100644 index c61b4f8..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/exhaustAll.js +++ /dev/null @@ -1,6 +0,0 @@ -import { exhaustMap } from './exhaustMap'; -import { identity } from '../util/identity'; -export function exhaustAll() { - return exhaustMap(identity); -} -//# sourceMappingURL=exhaustAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/exhaustAll.js.map b/node_modules/rxjs/dist/esm5/internal/operators/exhaustAll.js.map deleted file mode 100644 index 9d961b0..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/exhaustAll.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exhaustAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/exhaustAll.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AA8C5C,MAAM,UAAU,UAAU;IACxB,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/exhaustMap.js b/node_modules/rxjs/dist/esm5/internal/operators/exhaustMap.js deleted file mode 100644 index ad922ab..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/exhaustMap.js +++ /dev/null @@ -1,29 +0,0 @@ -import { map } from './map'; -import { innerFrom } from '../observable/innerFrom'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function exhaustMap(project, resultSelector) { - if (resultSelector) { - return function (source) { - return source.pipe(exhaustMap(function (a, i) { return innerFrom(project(a, i)).pipe(map(function (b, ii) { return resultSelector(a, b, i, ii); })); })); - }; - } - return operate(function (source, subscriber) { - var index = 0; - var innerSub = null; - var isComplete = false; - source.subscribe(createOperatorSubscriber(subscriber, function (outerValue) { - if (!innerSub) { - innerSub = createOperatorSubscriber(subscriber, undefined, function () { - innerSub = null; - isComplete && subscriber.complete(); - }); - innerFrom(project(outerValue, index++)).subscribe(innerSub); - } - }, function () { - isComplete = true; - !innerSub && subscriber.complete(); - })); - }); -} -//# sourceMappingURL=exhaustMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/exhaustMap.js.map b/node_modules/rxjs/dist/esm5/internal/operators/exhaustMap.js.map deleted file mode 100644 index 460e511..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/exhaustMap.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exhaustMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/exhaustMap.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA6DhE,MAAM,UAAU,UAAU,CACxB,OAAuC,EACvC,cAA6G;IAE7G,IAAI,cAAc,EAAE;QAElB,OAAO,UAAC,MAAqB;YAC3B,OAAA,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,UAAC,CAAM,EAAE,EAAO,IAAK,OAAA,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAA3B,CAA2B,CAAC,CAAC,EAApF,CAAoF,CAAC,CAAC;QAAvH,CAAuH,CAAC;KAC3H;IACD,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,IAAI,QAAQ,GAAyB,IAAI,CAAC;QAC1C,IAAI,UAAU,GAAG,KAAK,CAAC;QACvB,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,UAAU;YACT,IAAI,CAAC,QAAQ,EAAE;gBACb,QAAQ,GAAG,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE;oBACzD,QAAQ,GAAG,IAAI,CAAC;oBAChB,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;gBACtC,CAAC,CAAC,CAAC;gBACH,SAAS,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;aAC7D;QACH,CAAC,EACD;YACE,UAAU,GAAG,IAAI,CAAC;YAClB,CAAC,QAAQ,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACrC,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/expand.js b/node_modules/rxjs/dist/esm5/internal/operators/expand.js deleted file mode 100644 index 4bdc753..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/expand.js +++ /dev/null @@ -1,10 +0,0 @@ -import { operate } from '../util/lift'; -import { mergeInternals } from './mergeInternals'; -export function expand(project, concurrent, scheduler) { - if (concurrent === void 0) { concurrent = Infinity; } - concurrent = (concurrent || 0) < 1 ? Infinity : concurrent; - return operate(function (source, subscriber) { - return mergeInternals(source, subscriber, project, concurrent, undefined, true, scheduler); - }); -} -//# sourceMappingURL=expand.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/expand.js.map b/node_modules/rxjs/dist/esm5/internal/operators/expand.js.map deleted file mode 100644 index 52ad9e9..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/expand.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"expand.js","sourceRoot":"","sources":["../../../../src/internal/operators/expand.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAsElD,MAAM,UAAU,MAAM,CACpB,OAAuC,EACvC,UAAqB,EACrB,SAAyB;IADzB,2BAAA,EAAA,qBAAqB;IAGrB,UAAU,GAAG,CAAC,UAAU,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC;IAC3D,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,OAAA,cAAc,CAEZ,MAAM,EACN,UAAU,EACV,OAAO,EACP,UAAU,EAGV,SAAS,EAGT,IAAI,EACJ,SAAS,CACV;IAbD,CAaC,CACF,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/filter.js b/node_modules/rxjs/dist/esm5/internal/operators/filter.js deleted file mode 100644 index 273fa5b..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/filter.js +++ /dev/null @@ -1,9 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function filter(predicate, thisArg) { - return operate(function (source, subscriber) { - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { return predicate.call(thisArg, value, index++) && subscriber.next(value); })); - }); -} -//# sourceMappingURL=filter.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/filter.js.map b/node_modules/rxjs/dist/esm5/internal/operators/filter.js.map deleted file mode 100644 index 4e2ba5a..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/filter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"filter.js","sourceRoot":"","sources":["../../../../src/internal/operators/filter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA0DhE,MAAM,UAAU,MAAM,CAAI,SAA+C,EAAE,OAAa;IACtF,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,KAAK,GAAG,CAAC,CAAC;QAId,MAAM,CAAC,SAAS,CAId,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK,IAAK,OAAA,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAjE,CAAiE,CAAC,CACnH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/finalize.js b/node_modules/rxjs/dist/esm5/internal/operators/finalize.js deleted file mode 100644 index f86b285..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/finalize.js +++ /dev/null @@ -1,12 +0,0 @@ -import { operate } from '../util/lift'; -export function finalize(callback) { - return operate(function (source, subscriber) { - try { - source.subscribe(subscriber); - } - finally { - subscriber.add(callback); - } - }); -} -//# sourceMappingURL=finalize.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/finalize.js.map b/node_modules/rxjs/dist/esm5/internal/operators/finalize.js.map deleted file mode 100644 index 5ccebb0..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/finalize.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"finalize.js","sourceRoot":"","sources":["../../../../src/internal/operators/finalize.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA+DvC,MAAM,UAAU,QAAQ,CAAI,QAAoB;IAC9C,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAGhC,IAAI;YACF,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;SAC9B;gBAAS;YACR,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;SAC1B;IACH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/find.js b/node_modules/rxjs/dist/esm5/internal/operators/find.js deleted file mode 100644 index 2ea8da7..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/find.js +++ /dev/null @@ -1,22 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function find(predicate, thisArg) { - return operate(createFind(predicate, thisArg, 'value')); -} -export function createFind(predicate, thisArg, emit) { - var findIndex = emit === 'index'; - return function (source, subscriber) { - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var i = index++; - if (predicate.call(thisArg, value, i, source)) { - subscriber.next(findIndex ? i : value); - subscriber.complete(); - } - }, function () { - subscriber.next(findIndex ? -1 : undefined); - subscriber.complete(); - })); - }; -} -//# sourceMappingURL=find.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/find.js.map b/node_modules/rxjs/dist/esm5/internal/operators/find.js.map deleted file mode 100644 index 2c599aa..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/find.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"find.js","sourceRoot":"","sources":["../../../../src/internal/operators/find.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA2DhE,MAAM,UAAU,IAAI,CAClB,SAAsE,EACtE,OAAa;IAEb,OAAO,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,UAAU,CACxB,SAAsE,EACtE,OAAY,EACZ,IAAuB;IAEvB,IAAM,SAAS,GAAG,IAAI,KAAK,OAAO,CAAC;IACnC,OAAO,UAAC,MAAqB,EAAE,UAA2B;QACxD,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,IAAM,CAAC,GAAG,KAAK,EAAE,CAAC;YAClB,IAAI,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE;gBAC7C,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;gBACvC,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,EACD;YACE,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;YAC5C,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/findIndex.js b/node_modules/rxjs/dist/esm5/internal/operators/findIndex.js deleted file mode 100644 index d59c5f8..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/findIndex.js +++ /dev/null @@ -1,6 +0,0 @@ -import { operate } from '../util/lift'; -import { createFind } from './find'; -export function findIndex(predicate, thisArg) { - return operate(createFind(predicate, thisArg, 'index')); -} -//# sourceMappingURL=findIndex.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/findIndex.js.map b/node_modules/rxjs/dist/esm5/internal/operators/findIndex.js.map deleted file mode 100644 index 2bbddd0..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/findIndex.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"findIndex.js","sourceRoot":"","sources":["../../../../src/internal/operators/findIndex.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAsDpC,MAAM,UAAU,SAAS,CACvB,SAAsE,EACtE,OAAa;IAEb,OAAO,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAC1D,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/first.js b/node_modules/rxjs/dist/esm5/internal/operators/first.js deleted file mode 100644 index 2718af9..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/first.js +++ /dev/null @@ -1,13 +0,0 @@ -import { EmptyError } from '../util/EmptyError'; -import { filter } from './filter'; -import { take } from './take'; -import { defaultIfEmpty } from './defaultIfEmpty'; -import { throwIfEmpty } from './throwIfEmpty'; -import { identity } from '../util/identity'; -export function first(predicate, defaultValue) { - var hasDefaultValue = arguments.length >= 2; - return function (source) { - return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError(); })); - }; -} -//# sourceMappingURL=first.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/first.js.map b/node_modules/rxjs/dist/esm5/internal/operators/first.js.map deleted file mode 100644 index d6a06c3..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/first.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"first.js","sourceRoot":"","sources":["../../../../src/internal/operators/first.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AA0E5C,MAAM,UAAU,KAAK,CACnB,SAAgF,EAChF,YAAgB;IAEhB,IAAM,eAAe,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;IAC9C,OAAO,UAAC,MAAqB;QAC3B,OAAA,MAAM,CAAC,IAAI,CACT,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,EAAvB,CAAuB,CAAC,CAAC,CAAC,CAAC,QAAQ,EAChE,IAAI,CAAC,CAAC,CAAC,EACP,eAAe,CAAC,CAAC,CAAC,cAAc,CAAC,YAAa,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,cAAM,OAAA,IAAI,UAAU,EAAE,EAAhB,CAAgB,CAAC,CACvF;IAJD,CAIC,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/flatMap.js b/node_modules/rxjs/dist/esm5/internal/operators/flatMap.js deleted file mode 100644 index 937d334..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/flatMap.js +++ /dev/null @@ -1,3 +0,0 @@ -import { mergeMap } from './mergeMap'; -export var flatMap = mergeMap; -//# sourceMappingURL=flatMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/flatMap.js.map b/node_modules/rxjs/dist/esm5/internal/operators/flatMap.js.map deleted file mode 100644 index 6fd4c84..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/flatMap.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"flatMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/flatMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAKtC,MAAM,CAAC,IAAM,OAAO,GAAG,QAAQ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/groupBy.js b/node_modules/rxjs/dist/esm5/internal/operators/groupBy.js deleted file mode 100644 index 3d721a4..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/groupBy.js +++ /dev/null @@ -1,63 +0,0 @@ -import { Observable } from '../Observable'; -import { innerFrom } from '../observable/innerFrom'; -import { Subject } from '../Subject'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber, OperatorSubscriber } from './OperatorSubscriber'; -export function groupBy(keySelector, elementOrOptions, duration, connector) { - return operate(function (source, subscriber) { - var element; - if (!elementOrOptions || typeof elementOrOptions === 'function') { - element = elementOrOptions; - } - else { - (duration = elementOrOptions.duration, element = elementOrOptions.element, connector = elementOrOptions.connector); - } - var groups = new Map(); - var notify = function (cb) { - groups.forEach(cb); - cb(subscriber); - }; - var handleError = function (err) { return notify(function (consumer) { return consumer.error(err); }); }; - var activeGroups = 0; - var teardownAttempted = false; - var groupBySourceSubscriber = new OperatorSubscriber(subscriber, function (value) { - try { - var key_1 = keySelector(value); - var group_1 = groups.get(key_1); - if (!group_1) { - groups.set(key_1, (group_1 = connector ? connector() : new Subject())); - var grouped = createGroupedObservable(key_1, group_1); - subscriber.next(grouped); - if (duration) { - var durationSubscriber_1 = createOperatorSubscriber(group_1, function () { - group_1.complete(); - durationSubscriber_1 === null || durationSubscriber_1 === void 0 ? void 0 : durationSubscriber_1.unsubscribe(); - }, undefined, undefined, function () { return groups.delete(key_1); }); - groupBySourceSubscriber.add(innerFrom(duration(grouped)).subscribe(durationSubscriber_1)); - } - } - group_1.next(element ? element(value) : value); - } - catch (err) { - handleError(err); - } - }, function () { return notify(function (consumer) { return consumer.complete(); }); }, handleError, function () { return groups.clear(); }, function () { - teardownAttempted = true; - return activeGroups === 0; - }); - source.subscribe(groupBySourceSubscriber); - function createGroupedObservable(key, groupSubject) { - var result = new Observable(function (groupSubscriber) { - activeGroups++; - var innerSub = groupSubject.subscribe(groupSubscriber); - return function () { - innerSub.unsubscribe(); - --activeGroups === 0 && teardownAttempted && groupBySourceSubscriber.unsubscribe(); - }; - }); - result.key = key; - return result; - } - }); -} -//# sourceMappingURL=groupBy.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/groupBy.js.map b/node_modules/rxjs/dist/esm5/internal/operators/groupBy.js.map deleted file mode 100644 index b4a4285..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/groupBy.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"groupBy.js","sourceRoot":"","sources":["../../../../src/internal/operators/groupBy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAuIpF,MAAM,UAAU,OAAO,CACrB,WAA4B,EAC5B,gBAAgH,EAChH,QAAyE,EACzE,SAAkC;IAElC,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,OAAqC,CAAC;QAC1C,IAAI,CAAC,gBAAgB,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE;YAC/D,OAAO,GAAG,gBAAyC,CAAC;SACrD;aAAM;YACL,CAAG,QAAQ,GAAyB,gBAAgB,SAAzC,EAAE,OAAO,GAAgB,gBAAgB,QAAhC,EAAE,SAAS,GAAK,gBAAgB,UAArB,CAAsB,CAAC;SACvD;QAGD,IAAM,MAAM,GAAG,IAAI,GAAG,EAAuB,CAAC;QAG9C,IAAM,MAAM,GAAG,UAAC,EAAkC;YAChD,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YACnB,EAAE,CAAC,UAAU,CAAC,CAAC;QACjB,CAAC,CAAC;QAIF,IAAM,WAAW,GAAG,UAAC,GAAQ,IAAK,OAAA,MAAM,CAAC,UAAC,QAAQ,IAAK,OAAA,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,EAAnB,CAAmB,CAAC,EAAzC,CAAyC,CAAC;QAG5E,IAAI,YAAY,GAAG,CAAC,CAAC;QAGrB,IAAI,iBAAiB,GAAG,KAAK,CAAC;QAS9B,IAAM,uBAAuB,GAAG,IAAI,kBAAkB,CACpD,UAAU,EACV,UAAC,KAAQ;YAIP,IAAI;gBACF,IAAM,KAAG,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;gBAE/B,IAAI,OAAK,GAAG,MAAM,CAAC,GAAG,CAAC,KAAG,CAAC,CAAC;gBAC5B,IAAI,CAAC,OAAK,EAAE;oBAEV,MAAM,CAAC,GAAG,CAAC,KAAG,EAAE,CAAC,OAAK,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,IAAI,OAAO,EAAO,CAAC,CAAC,CAAC;oBAKxE,IAAM,OAAO,GAAG,uBAAuB,CAAC,KAAG,EAAE,OAAK,CAAC,CAAC;oBACpD,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBAEzB,IAAI,QAAQ,EAAE;wBACZ,IAAM,oBAAkB,GAAG,wBAAwB,CAMjD,OAAY,EACZ;4BAGE,OAAM,CAAC,QAAQ,EAAE,CAAC;4BAClB,oBAAkB,aAAlB,oBAAkB,uBAAlB,oBAAkB,CAAE,WAAW,EAAE,CAAC;wBACpC,CAAC,EAED,SAAS,EAGT,SAAS,EAET,cAAM,OAAA,MAAM,CAAC,MAAM,CAAC,KAAG,CAAC,EAAlB,CAAkB,CACzB,CAAC;wBAGF,uBAAuB,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,oBAAkB,CAAC,CAAC,CAAC;qBACzF;iBACF;gBAGD,OAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;aAC9C;YAAC,OAAO,GAAG,EAAE;gBACZ,WAAW,CAAC,GAAG,CAAC,CAAC;aAClB;QACH,CAAC,EAED,cAAM,OAAA,MAAM,CAAC,UAAC,QAAQ,IAAK,OAAA,QAAQ,CAAC,QAAQ,EAAE,EAAnB,CAAmB,CAAC,EAAzC,CAAyC,EAE/C,WAAW,EAKX,cAAM,OAAA,MAAM,CAAC,KAAK,EAAE,EAAd,CAAc,EACpB;YACE,iBAAiB,GAAG,IAAI,CAAC;YAIzB,OAAO,YAAY,KAAK,CAAC,CAAC;QAC5B,CAAC,CACF,CAAC;QAGF,MAAM,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAC;QAO1C,SAAS,uBAAuB,CAAC,GAAM,EAAE,YAA8B;YACrE,IAAM,MAAM,GAAQ,IAAI,UAAU,CAAI,UAAC,eAAe;gBACpD,YAAY,EAAE,CAAC;gBACf,IAAM,QAAQ,GAAG,YAAY,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;gBACzD,OAAO;oBACL,QAAQ,CAAC,WAAW,EAAE,CAAC;oBAIvB,EAAE,YAAY,KAAK,CAAC,IAAI,iBAAiB,IAAI,uBAAuB,CAAC,WAAW,EAAE,CAAC;gBACrF,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC;YACH,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;YACjB,OAAO,MAAM,CAAC;QAChB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js b/node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js deleted file mode 100644 index e590c33..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js +++ /dev/null @@ -1,9 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { noop } from '../util/noop'; -export function ignoreElements() { - return operate(function (source, subscriber) { - source.subscribe(createOperatorSubscriber(subscriber, noop)); - }); -} -//# sourceMappingURL=ignoreElements.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js.map b/node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js.map deleted file mode 100644 index 66249f8..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ignoreElements.js","sourceRoot":"","sources":["../../../../src/internal/operators/ignoreElements.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAqCpC,MAAM,UAAU,cAAc;IAC5B,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/isEmpty.js b/node_modules/rxjs/dist/esm5/internal/operators/isEmpty.js deleted file mode 100644 index 8a140b5..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/isEmpty.js +++ /dev/null @@ -1,14 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function isEmpty() { - return operate(function (source, subscriber) { - source.subscribe(createOperatorSubscriber(subscriber, function () { - subscriber.next(false); - subscriber.complete(); - }, function () { - subscriber.next(true); - subscriber.complete(); - })); - }); -} -//# sourceMappingURL=isEmpty.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/isEmpty.js.map b/node_modules/rxjs/dist/esm5/internal/operators/isEmpty.js.map deleted file mode 100644 index 68b5d63..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/isEmpty.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isEmpty.js","sourceRoot":"","sources":["../../../../src/internal/operators/isEmpty.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA+DhE,MAAM,UAAU,OAAO;IACrB,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV;YACE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACvB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD;YACE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACtB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/joinAllInternals.js b/node_modules/rxjs/dist/esm5/internal/operators/joinAllInternals.js deleted file mode 100644 index 62a00fc..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/joinAllInternals.js +++ /dev/null @@ -1,9 +0,0 @@ -import { identity } from '../util/identity'; -import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; -import { pipe } from '../util/pipe'; -import { mergeMap } from './mergeMap'; -import { toArray } from './toArray'; -export function joinAllInternals(joinFn, project) { - return pipe(toArray(), mergeMap(function (sources) { return joinFn(sources); }), project ? mapOneOrManyArgs(project) : identity); -} -//# sourceMappingURL=joinAllInternals.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/joinAllInternals.js.map b/node_modules/rxjs/dist/esm5/internal/operators/joinAllInternals.js.map deleted file mode 100644 index fb6cc39..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/joinAllInternals.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"joinAllInternals.js","sourceRoot":"","sources":["../../../../src/internal/operators/joinAllInternals.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,MAAM,UAAU,gBAAgB,CAAO,MAAwD,EAAE,OAA+B;IAC9H,OAAO,IAAI,CAGT,OAAO,EAAgE,EAEvE,QAAQ,CAAC,UAAC,OAAO,IAAK,OAAA,MAAM,CAAC,OAAO,CAAC,EAAf,CAAe,CAAC,EAEtC,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAE,QAAgB,CACxD,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/last.js b/node_modules/rxjs/dist/esm5/internal/operators/last.js deleted file mode 100644 index b77d792..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/last.js +++ /dev/null @@ -1,13 +0,0 @@ -import { EmptyError } from '../util/EmptyError'; -import { filter } from './filter'; -import { takeLast } from './takeLast'; -import { throwIfEmpty } from './throwIfEmpty'; -import { defaultIfEmpty } from './defaultIfEmpty'; -import { identity } from '../util/identity'; -export function last(predicate, defaultValue) { - var hasDefaultValue = arguments.length >= 2; - return function (source) { - return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity, takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError(); })); - }; -} -//# sourceMappingURL=last.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/last.js.map b/node_modules/rxjs/dist/esm5/internal/operators/last.js.map deleted file mode 100644 index ad878e2..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/last.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"last.js","sourceRoot":"","sources":["../../../../src/internal/operators/last.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAwE5C,MAAM,UAAU,IAAI,CAClB,SAAgF,EAChF,YAAgB;IAEhB,IAAM,eAAe,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;IAC9C,OAAO,UAAC,MAAqB;QAC3B,OAAA,MAAM,CAAC,IAAI,CACT,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,EAAvB,CAAuB,CAAC,CAAC,CAAC,CAAC,QAAQ,EAChE,QAAQ,CAAC,CAAC,CAAC,EACX,eAAe,CAAC,CAAC,CAAC,cAAc,CAAC,YAAa,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,cAAM,OAAA,IAAI,UAAU,EAAE,EAAhB,CAAgB,CAAC,CACvF;IAJD,CAIC,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/map.js b/node_modules/rxjs/dist/esm5/internal/operators/map.js deleted file mode 100644 index 84d27b4..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/map.js +++ /dev/null @@ -1,11 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function map(project, thisArg) { - return operate(function (source, subscriber) { - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - subscriber.next(project.call(thisArg, value, index++)); - })); - }); -} -//# sourceMappingURL=map.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/map.js.map b/node_modules/rxjs/dist/esm5/internal/operators/map.js.map deleted file mode 100644 index 2c238a5..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/map.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"map.js","sourceRoot":"","sources":["../../../../src/internal/operators/map.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA4ChE,MAAM,UAAU,GAAG,CAAO,OAAuC,EAAE,OAAa;IAC9E,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,KAAK,GAAG,CAAC,CAAC;QAGd,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAQ;YAG5C,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QACzD,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mapTo.js b/node_modules/rxjs/dist/esm5/internal/operators/mapTo.js deleted file mode 100644 index da6eaa2..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/mapTo.js +++ /dev/null @@ -1,5 +0,0 @@ -import { map } from './map'; -export function mapTo(value) { - return map(function () { return value; }); -} -//# sourceMappingURL=mapTo.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mapTo.js.map b/node_modules/rxjs/dist/esm5/internal/operators/mapTo.js.map deleted file mode 100644 index bc5313c..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/mapTo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/mapTo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AA4C5B,MAAM,UAAU,KAAK,CAAI,KAAQ;IAC/B,OAAO,GAAG,CAAC,cAAM,OAAA,KAAK,EAAL,CAAK,CAAC,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/materialize.js b/node_modules/rxjs/dist/esm5/internal/operators/materialize.js deleted file mode 100644 index f2c4839..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/materialize.js +++ /dev/null @@ -1,17 +0,0 @@ -import { Notification } from '../Notification'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function materialize() { - return operate(function (source, subscriber) { - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - subscriber.next(Notification.createNext(value)); - }, function () { - subscriber.next(Notification.createComplete()); - subscriber.complete(); - }, function (err) { - subscriber.next(Notification.createError(err)); - subscriber.complete(); - })); - }); -} -//# sourceMappingURL=materialize.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/materialize.js.map b/node_modules/rxjs/dist/esm5/internal/operators/materialize.js.map deleted file mode 100644 index 786d980..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/materialize.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"materialize.js","sourceRoot":"","sources":["../../../../src/internal/operators/materialize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAkDhE,MAAM,UAAU,WAAW;IACzB,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;QAClD,CAAC,EACD;YACE,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC,CAAC;YAC/C,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,UAAC,GAAG;YACF,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;YAC/C,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/max.js b/node_modules/rxjs/dist/esm5/internal/operators/max.js deleted file mode 100644 index 5e16431..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/max.js +++ /dev/null @@ -1,6 +0,0 @@ -import { reduce } from './reduce'; -import { isFunction } from '../util/isFunction'; -export function max(comparer) { - return reduce(isFunction(comparer) ? function (x, y) { return (comparer(x, y) > 0 ? x : y); } : function (x, y) { return (x > y ? x : y); }); -} -//# sourceMappingURL=max.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/max.js.map b/node_modules/rxjs/dist/esm5/internal/operators/max.js.map deleted file mode 100644 index 6eb7248..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/max.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"max.js","sourceRoot":"","sources":["../../../../src/internal/operators/max.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAiDhD,MAAM,UAAU,GAAG,CAAI,QAAiC;IACtD,OAAO,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAA5B,CAA4B,CAAC,CAAC,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAf,CAAe,CAAC,CAAC;AAC3G,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/merge.js b/node_modules/rxjs/dist/esm5/internal/operators/merge.js deleted file mode 100644 index 8ba1669..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/merge.js +++ /dev/null @@ -1,17 +0,0 @@ -import { __read, __spreadArray } from "tslib"; -import { operate } from '../util/lift'; -import { mergeAll } from './mergeAll'; -import { popNumber, popScheduler } from '../util/args'; -import { from } from '../observable/from'; -export function merge() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var scheduler = popScheduler(args); - var concurrent = popNumber(args, Infinity); - return operate(function (source, subscriber) { - mergeAll(concurrent)(from(__spreadArray([source], __read(args)), scheduler)).subscribe(subscriber); - }); -} -//# sourceMappingURL=merge.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/merge.js.map b/node_modules/rxjs/dist/esm5/internal/operators/merge.js.map deleted file mode 100644 index 8aef1fd..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/merge.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../../../src/internal/operators/merge.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAiB1C,MAAM,UAAU,KAAK;IAAI,cAAkB;SAAlB,UAAkB,EAAlB,qBAAkB,EAAlB,IAAkB;QAAlB,yBAAkB;;IACzC,IAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,IAAM,UAAU,GAAG,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAE7C,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,QAAQ,CAAC,UAAU,CAAC,CAAC,IAAI,gBAAE,MAAM,UAAM,IAA6B,IAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC3G,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js b/node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js deleted file mode 100644 index 7a1ca26..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js +++ /dev/null @@ -1,7 +0,0 @@ -import { mergeMap } from './mergeMap'; -import { identity } from '../util/identity'; -export function mergeAll(concurrent) { - if (concurrent === void 0) { concurrent = Infinity; } - return mergeMap(identity, concurrent); -} -//# sourceMappingURL=mergeAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js.map b/node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js.map deleted file mode 100644 index 2d24b82..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/mergeAll.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mergeAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AA8D5C,MAAM,UAAU,QAAQ,CAAiC,UAA6B;IAA7B,2BAAA,EAAA,qBAA6B;IACpF,OAAO,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;AACxC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js b/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js deleted file mode 100644 index e91f04e..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js +++ /dev/null @@ -1,61 +0,0 @@ -import { innerFrom } from '../observable/innerFrom'; -import { executeSchedule } from '../util/executeSchedule'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) { - var buffer = []; - var active = 0; - var index = 0; - var isComplete = false; - var checkComplete = function () { - if (isComplete && !buffer.length && !active) { - subscriber.complete(); - } - }; - var outerNext = function (value) { return (active < concurrent ? doInnerSub(value) : buffer.push(value)); }; - var doInnerSub = function (value) { - expand && subscriber.next(value); - active++; - var innerComplete = false; - innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, function (innerValue) { - onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue); - if (expand) { - outerNext(innerValue); - } - else { - subscriber.next(innerValue); - } - }, function () { - innerComplete = true; - }, undefined, function () { - if (innerComplete) { - try { - active--; - var _loop_1 = function () { - var bufferedValue = buffer.shift(); - if (innerSubScheduler) { - executeSchedule(subscriber, innerSubScheduler, function () { return doInnerSub(bufferedValue); }); - } - else { - doInnerSub(bufferedValue); - } - }; - while (buffer.length && active < concurrent) { - _loop_1(); - } - checkComplete(); - } - catch (err) { - subscriber.error(err); - } - } - })); - }; - source.subscribe(createOperatorSubscriber(subscriber, outerNext, function () { - isComplete = true; - checkComplete(); - })); - return function () { - additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer(); - }; -} -//# sourceMappingURL=mergeInternals.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js.map b/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js.map deleted file mode 100644 index 13a2a50..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mergeInternals.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeInternals.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAGpD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAehE,MAAM,UAAU,cAAc,CAC5B,MAAqB,EACrB,UAAyB,EACzB,OAAwD,EACxD,UAAkB,EAClB,YAAsC,EACtC,MAAgB,EAChB,iBAAiC,EACjC,mBAAgC;IAGhC,IAAM,MAAM,GAAQ,EAAE,CAAC;IAEvB,IAAI,MAAM,GAAG,CAAC,CAAC;IAEf,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,IAAI,UAAU,GAAG,KAAK,CAAC;IAKvB,IAAM,aAAa,GAAG;QAIpB,IAAI,UAAU,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE;YAC3C,UAAU,CAAC,QAAQ,EAAE,CAAC;SACvB;IACH,CAAC,CAAC;IAGF,IAAM,SAAS,GAAG,UAAC,KAAQ,IAAK,OAAA,CAAC,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAA9D,CAA8D,CAAC;IAE/F,IAAM,UAAU,GAAG,UAAC,KAAQ;QAI1B,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,KAAY,CAAC,CAAC;QAIxC,MAAM,EAAE,CAAC;QAKT,IAAI,aAAa,GAAG,KAAK,CAAC;QAG1B,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAC1C,wBAAwB,CACtB,UAAU,EACV,UAAC,UAAU;YAGT,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAG,UAAU,CAAC,CAAC;YAE3B,IAAI,MAAM,EAAE;gBAGV,SAAS,CAAC,UAAiB,CAAC,CAAC;aAC9B;iBAAM;gBAEL,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;aAC7B;QACH,CAAC,EACD;YAGE,aAAa,GAAG,IAAI,CAAC;QACvB,CAAC,EAED,SAAS,EACT;YAIE,IAAI,aAAa,EAAE;gBAKjB,IAAI;oBAIF,MAAM,EAAE,CAAC;;wBAMP,IAAM,aAAa,GAAG,MAAM,CAAC,KAAK,EAAG,CAAC;wBAItC,IAAI,iBAAiB,EAAE;4BACrB,eAAe,CAAC,UAAU,EAAE,iBAAiB,EAAE,cAAM,OAAA,UAAU,CAAC,aAAa,CAAC,EAAzB,CAAyB,CAAC,CAAC;yBACjF;6BAAM;4BACL,UAAU,CAAC,aAAa,CAAC,CAAC;yBAC3B;;oBATH,OAAO,MAAM,CAAC,MAAM,IAAI,MAAM,GAAG,UAAU;;qBAU1C;oBAED,aAAa,EAAE,CAAC;iBACjB;gBAAC,OAAO,GAAG,EAAE;oBACZ,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACvB;aACF;QACH,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC;IAGF,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE;QAE9C,UAAU,GAAG,IAAI,CAAC;QAClB,aAAa,EAAE,CAAC;IAClB,CAAC,CAAC,CACH,CAAC;IAIF,OAAO;QACL,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,EAAI,CAAC;IAC1B,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js b/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js deleted file mode 100644 index 9eb2c26..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js +++ /dev/null @@ -1,16 +0,0 @@ -import { map } from './map'; -import { innerFrom } from '../observable/innerFrom'; -import { operate } from '../util/lift'; -import { mergeInternals } from './mergeInternals'; -import { isFunction } from '../util/isFunction'; -export function mergeMap(project, resultSelector, concurrent) { - if (concurrent === void 0) { concurrent = Infinity; } - if (isFunction(resultSelector)) { - return mergeMap(function (a, i) { return map(function (b, ii) { return resultSelector(a, b, i, ii); })(innerFrom(project(a, i))); }, concurrent); - } - else if (typeof resultSelector === 'number') { - concurrent = resultSelector; - } - return operate(function (source, subscriber) { return mergeInternals(source, subscriber, project, concurrent); }); -} -//# sourceMappingURL=mergeMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js.map b/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js.map deleted file mode 100644 index a1c82a8..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mergeMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeMap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AA2EhD,MAAM,UAAU,QAAQ,CACtB,OAAuC,EACvC,cAAwH,EACxH,UAA6B;IAA7B,2BAAA,EAAA,qBAA6B;IAE7B,IAAI,UAAU,CAAC,cAAc,CAAC,EAAE;QAE9B,OAAO,QAAQ,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,GAAG,CAAC,UAAC,CAAM,EAAE,EAAU,IAAK,OAAA,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAA3B,CAA2B,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAlF,CAAkF,EAAE,UAAU,CAAC,CAAC;KAC3H;SAAM,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE;QAC7C,UAAU,GAAG,cAAc,CAAC;KAC7B;IAED,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU,IAAK,OAAA,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC,EAAvD,CAAuD,CAAC,CAAC;AAClG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mergeMapTo.js b/node_modules/rxjs/dist/esm5/internal/operators/mergeMapTo.js deleted file mode 100644 index 4f06e2b..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/mergeMapTo.js +++ /dev/null @@ -1,13 +0,0 @@ -import { mergeMap } from './mergeMap'; -import { isFunction } from '../util/isFunction'; -export function mergeMapTo(innerObservable, resultSelector, concurrent) { - if (concurrent === void 0) { concurrent = Infinity; } - if (isFunction(resultSelector)) { - return mergeMap(function () { return innerObservable; }, resultSelector, concurrent); - } - if (typeof resultSelector === 'number') { - concurrent = resultSelector; - } - return mergeMap(function () { return innerObservable; }, concurrent); -} -//# sourceMappingURL=mergeMapTo.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mergeMapTo.js.map b/node_modules/rxjs/dist/esm5/internal/operators/mergeMapTo.js.map deleted file mode 100644 index d3df6ee..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/mergeMapTo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mergeMapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeMapTo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AA2DhD,MAAM,UAAU,UAAU,CACxB,eAAkB,EAClB,cAAwH,EACxH,UAA6B;IAA7B,2BAAA,EAAA,qBAA6B;IAE7B,IAAI,UAAU,CAAC,cAAc,CAAC,EAAE;QAC9B,OAAO,QAAQ,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC;KACpE;IACD,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE;QACtC,UAAU,GAAG,cAAc,CAAC;KAC7B;IACD,OAAO,QAAQ,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,EAAE,UAAU,CAAC,CAAC;AACrD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mergeScan.js b/node_modules/rxjs/dist/esm5/internal/operators/mergeScan.js deleted file mode 100644 index a8d7bc7..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/mergeScan.js +++ /dev/null @@ -1,12 +0,0 @@ -import { operate } from '../util/lift'; -import { mergeInternals } from './mergeInternals'; -export function mergeScan(accumulator, seed, concurrent) { - if (concurrent === void 0) { concurrent = Infinity; } - return operate(function (source, subscriber) { - var state = seed; - return mergeInternals(source, subscriber, function (value, index) { return accumulator(state, value, index); }, concurrent, function (value) { - state = value; - }, false, undefined, function () { return (state = null); }); - }); -} -//# sourceMappingURL=mergeScan.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mergeScan.js.map b/node_modules/rxjs/dist/esm5/internal/operators/mergeScan.js.map deleted file mode 100644 index 7fb71fd..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/mergeScan.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mergeScan.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeScan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAmElD,MAAM,UAAU,SAAS,CACvB,WAAoE,EACpE,IAAO,EACP,UAAqB;IAArB,2BAAA,EAAA,qBAAqB;IAErB,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,KAAK,GAAG,IAAI,CAAC;QAEjB,OAAO,cAAc,CACnB,MAAM,EACN,UAAU,EACV,UAAC,KAAK,EAAE,KAAK,IAAK,OAAA,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAhC,CAAgC,EAClD,UAAU,EACV,UAAC,KAAK;YACJ,KAAK,GAAG,KAAK,CAAC;QAChB,CAAC,EACD,KAAK,EACL,SAAS,EACT,cAAM,OAAA,CAAC,KAAK,GAAG,IAAK,CAAC,EAAf,CAAe,CACtB,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mergeWith.js b/node_modules/rxjs/dist/esm5/internal/operators/mergeWith.js deleted file mode 100644 index 037ea38..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/mergeWith.js +++ /dev/null @@ -1,10 +0,0 @@ -import { __read, __spreadArray } from "tslib"; -import { merge } from './merge'; -export function mergeWith() { - var otherSources = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherSources[_i] = arguments[_i]; - } - return merge.apply(void 0, __spreadArray([], __read(otherSources))); -} -//# sourceMappingURL=mergeWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/mergeWith.js.map b/node_modules/rxjs/dist/esm5/internal/operators/mergeWith.js.map deleted file mode 100644 index 1ce77ea..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/mergeWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mergeWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeWith.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA2ChC,MAAM,UAAU,SAAS;IACvB,sBAA6C;SAA7C,UAA6C,EAA7C,qBAA6C,EAA7C,IAA6C;QAA7C,iCAA6C;;IAE7C,OAAO,KAAK,wCAAI,YAAY,IAAE;AAChC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/min.js b/node_modules/rxjs/dist/esm5/internal/operators/min.js deleted file mode 100644 index 5eedf33..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/min.js +++ /dev/null @@ -1,6 +0,0 @@ -import { reduce } from './reduce'; -import { isFunction } from '../util/isFunction'; -export function min(comparer) { - return reduce(isFunction(comparer) ? function (x, y) { return (comparer(x, y) < 0 ? x : y); } : function (x, y) { return (x < y ? x : y); }); -} -//# sourceMappingURL=min.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/min.js.map b/node_modules/rxjs/dist/esm5/internal/operators/min.js.map deleted file mode 100644 index d187c80..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"min.js","sourceRoot":"","sources":["../../../../src/internal/operators/min.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAiDhD,MAAM,UAAU,GAAG,CAAI,QAAiC;IACtD,OAAO,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAA5B,CAA4B,CAAC,CAAC,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAf,CAAe,CAAC,CAAC;AAC3G,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/multicast.js b/node_modules/rxjs/dist/esm5/internal/operators/multicast.js deleted file mode 100644 index 9bea366..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/multicast.js +++ /dev/null @@ -1,13 +0,0 @@ -import { ConnectableObservable } from '../observable/ConnectableObservable'; -import { isFunction } from '../util/isFunction'; -import { connect } from './connect'; -export function multicast(subjectOrSubjectFactory, selector) { - var subjectFactory = isFunction(subjectOrSubjectFactory) ? subjectOrSubjectFactory : function () { return subjectOrSubjectFactory; }; - if (isFunction(selector)) { - return connect(selector, { - connector: subjectFactory, - }); - } - return function (source) { return new ConnectableObservable(source, subjectFactory); }; -} -//# sourceMappingURL=multicast.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/multicast.js.map b/node_modules/rxjs/dist/esm5/internal/operators/multicast.js.map deleted file mode 100644 index d7533c8..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/multicast.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"multicast.js","sourceRoot":"","sources":["../../../../src/internal/operators/multicast.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4EpC,MAAM,UAAU,SAAS,CACvB,uBAAwD,EACxD,QAAmD;IAEnD,IAAM,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,cAAM,OAAA,uBAAuB,EAAvB,CAAuB,CAAC;IAErH,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE;QAIxB,OAAO,OAAO,CAAC,QAAQ,EAAE;YACvB,SAAS,EAAE,cAAc;SAC1B,CAAC,CAAC;KACJ;IAED,OAAO,UAAC,MAAqB,IAAK,OAAA,IAAI,qBAAqB,CAAM,MAAM,EAAE,cAAc,CAAC,EAAtD,CAAsD,CAAC;AAC3F,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js b/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js deleted file mode 100644 index ab3028a..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js +++ /dev/null @@ -1,10 +0,0 @@ -import { executeSchedule } from '../util/executeSchedule'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function observeOn(scheduler, delay) { - if (delay === void 0) { delay = 0; } - return operate(function (source, subscriber) { - source.subscribe(createOperatorSubscriber(subscriber, function (value) { return executeSchedule(subscriber, scheduler, function () { return subscriber.next(value); }, delay); }, function () { return executeSchedule(subscriber, scheduler, function () { return subscriber.complete(); }, delay); }, function (err) { return executeSchedule(subscriber, scheduler, function () { return subscriber.error(err); }, delay); })); - }); -} -//# sourceMappingURL=observeOn.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js.map b/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js.map deleted file mode 100644 index b6537a9..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"observeOn.js","sourceRoot":"","sources":["../../../../src/internal/operators/observeOn.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAsDhE,MAAM,UAAU,SAAS,CAAI,SAAwB,EAAE,KAAS;IAAT,sBAAA,EAAA,SAAS;IAC9D,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK,IAAK,OAAA,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,cAAM,OAAA,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAtB,CAAsB,EAAE,KAAK,CAAC,EAA3E,CAA2E,EACtF,cAAM,OAAA,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,cAAM,OAAA,UAAU,CAAC,QAAQ,EAAE,EAArB,CAAqB,EAAE,KAAK,CAAC,EAA1E,CAA0E,EAChF,UAAC,GAAG,IAAK,OAAA,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,cAAM,OAAA,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAArB,CAAqB,EAAE,KAAK,CAAC,EAA1E,CAA0E,CACpF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/onErrorResumeNextWith.js b/node_modules/rxjs/dist/esm5/internal/operators/onErrorResumeNextWith.js deleted file mode 100644 index 2981576..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/onErrorResumeNextWith.js +++ /dev/null @@ -1,13 +0,0 @@ -import { __read, __spreadArray } from "tslib"; -import { argsOrArgArray } from '../util/argsOrArgArray'; -import { onErrorResumeNext as oERNCreate } from '../observable/onErrorResumeNext'; -export function onErrorResumeNextWith() { - var sources = []; - for (var _i = 0; _i < arguments.length; _i++) { - sources[_i] = arguments[_i]; - } - var nextSources = argsOrArgArray(sources); - return function (source) { return oERNCreate.apply(void 0, __spreadArray([source], __read(nextSources))); }; -} -export var onErrorResumeNext = onErrorResumeNextWith; -//# sourceMappingURL=onErrorResumeNextWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/onErrorResumeNextWith.js.map b/node_modules/rxjs/dist/esm5/internal/operators/onErrorResumeNextWith.js.map deleted file mode 100644 index ab95682..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/onErrorResumeNextWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"onErrorResumeNextWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/onErrorResumeNextWith.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,iBAAiB,IAAI,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAiFlF,MAAM,UAAU,qBAAqB;IACnC,iBAAyE;SAAzE,UAAyE,EAAzE,qBAAyE,EAAzE,IAAyE;QAAzE,4BAAyE;;IAMzE,IAAM,WAAW,GAAG,cAAc,CAAC,OAAO,CAAuC,CAAC;IAElF,OAAO,UAAC,MAAM,IAAK,OAAA,UAAU,8BAAC,MAAM,UAAK,WAAW,KAAjC,CAAkC,CAAC;AACxD,CAAC;AAKD,MAAM,CAAC,IAAM,iBAAiB,GAAG,qBAAqB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/pairwise.js b/node_modules/rxjs/dist/esm5/internal/operators/pairwise.js deleted file mode 100644 index 2130442..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/pairwise.js +++ /dev/null @@ -1,15 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function pairwise() { - return operate(function (source, subscriber) { - var prev; - var hasPrev = false; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var p = prev; - prev = value; - hasPrev && subscriber.next([p, value]); - hasPrev = true; - })); - }); -} -//# sourceMappingURL=pairwise.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/pairwise.js.map b/node_modules/rxjs/dist/esm5/internal/operators/pairwise.js.map deleted file mode 100644 index 7419532..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/pairwise.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pairwise.js","sourceRoot":"","sources":["../../../../src/internal/operators/pairwise.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA6ChE,MAAM,UAAU,QAAQ;IACtB,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,IAAO,CAAC;QACZ,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,IAAM,CAAC,GAAG,IAAI,CAAC;YACf,IAAI,GAAG,KAAK,CAAC;YACb,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;YACvC,OAAO,GAAG,IAAI,CAAC;QACjB,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/partition.js b/node_modules/rxjs/dist/esm5/internal/operators/partition.js deleted file mode 100644 index f5deaa0..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/partition.js +++ /dev/null @@ -1,8 +0,0 @@ -import { not } from '../util/not'; -import { filter } from './filter'; -export function partition(predicate, thisArg) { - return function (source) { - return [filter(predicate, thisArg)(source), filter(not(predicate, thisArg))(source)]; - }; -} -//# sourceMappingURL=partition.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/partition.js.map b/node_modules/rxjs/dist/esm5/internal/operators/partition.js.map deleted file mode 100644 index 0da33d1..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/partition.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"partition.js","sourceRoot":"","sources":["../../../../src/internal/operators/partition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAsDlC,MAAM,UAAU,SAAS,CACvB,SAA+C,EAC/C,OAAa;IAEb,OAAO,UAAC,MAAqB;QAC3B,OAAA,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAmC;IAA/G,CAA+G,CAAC;AACpH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/pluck.js b/node_modules/rxjs/dist/esm5/internal/operators/pluck.js deleted file mode 100644 index ea59337..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/pluck.js +++ /dev/null @@ -1,25 +0,0 @@ -import { map } from './map'; -export function pluck() { - var properties = []; - for (var _i = 0; _i < arguments.length; _i++) { - properties[_i] = arguments[_i]; - } - var length = properties.length; - if (length === 0) { - throw new Error('list of properties cannot be empty.'); - } - return map(function (x) { - var currentProp = x; - for (var i = 0; i < length; i++) { - var p = currentProp === null || currentProp === void 0 ? void 0 : currentProp[properties[i]]; - if (typeof p !== 'undefined') { - currentProp = p; - } - else { - return undefined; - } - } - return currentProp; - }); -} -//# sourceMappingURL=pluck.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/pluck.js.map b/node_modules/rxjs/dist/esm5/internal/operators/pluck.js.map deleted file mode 100644 index 10087b1..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/pluck.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pluck.js","sourceRoot":"","sources":["../../../../src/internal/operators/pluck.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAwF5B,MAAM,UAAU,KAAK;IAAO,oBAA8C;SAA9C,UAA8C,EAA9C,qBAA8C,EAA9C,IAA8C;QAA9C,+BAA8C;;IACxE,IAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IACjC,IAAI,MAAM,KAAK,CAAC,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;KACxD;IACD,OAAO,GAAG,CAAC,UAAC,CAAC;QACX,IAAI,WAAW,GAAQ,CAAC,CAAC;QACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;YAC/B,IAAM,CAAC,GAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAG,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACvC,IAAI,OAAO,CAAC,KAAK,WAAW,EAAE;gBAC5B,WAAW,GAAG,CAAC,CAAC;aACjB;iBAAM;gBACL,OAAO,SAAS,CAAC;aAClB;SACF;QACD,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/publish.js b/node_modules/rxjs/dist/esm5/internal/operators/publish.js deleted file mode 100644 index 8d003f9..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/publish.js +++ /dev/null @@ -1,7 +0,0 @@ -import { Subject } from '../Subject'; -import { multicast } from './multicast'; -import { connect } from './connect'; -export function publish(selector) { - return selector ? function (source) { return connect(selector)(source); } : function (source) { return multicast(new Subject())(source); }; -} -//# sourceMappingURL=publish.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/publish.js.map b/node_modules/rxjs/dist/esm5/internal/operators/publish.js.map deleted file mode 100644 index 377db20..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/publish.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../../src/internal/operators/publish.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqFpC,MAAM,UAAU,OAAO,CAAO,QAAiC;IAC7D,OAAO,QAAQ,CAAC,CAAC,CAAC,UAAC,MAAM,IAAK,OAAA,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAzB,CAAyB,CAAC,CAAC,CAAC,UAAC,MAAM,IAAK,OAAA,SAAS,CAAC,IAAI,OAAO,EAAK,CAAC,CAAC,MAAM,CAAC,EAAnC,CAAmC,CAAC;AAC5G,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/publishBehavior.js b/node_modules/rxjs/dist/esm5/internal/operators/publishBehavior.js deleted file mode 100644 index 42ae70c..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/publishBehavior.js +++ /dev/null @@ -1,9 +0,0 @@ -import { BehaviorSubject } from '../BehaviorSubject'; -import { ConnectableObservable } from '../observable/ConnectableObservable'; -export function publishBehavior(initialValue) { - return function (source) { - var subject = new BehaviorSubject(initialValue); - return new ConnectableObservable(source, function () { return subject; }); - }; -} -//# sourceMappingURL=publishBehavior.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/publishBehavior.js.map b/node_modules/rxjs/dist/esm5/internal/operators/publishBehavior.js.map deleted file mode 100644 index 6a7b85a..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/publishBehavior.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"publishBehavior.js","sourceRoot":"","sources":["../../../../src/internal/operators/publishBehavior.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAiB5E,MAAM,UAAU,eAAe,CAAI,YAAe;IAEhD,OAAO,UAAC,MAAM;QACZ,IAAM,OAAO,GAAG,IAAI,eAAe,CAAI,YAAY,CAAC,CAAC;QACrD,OAAO,IAAI,qBAAqB,CAAC,MAAM,EAAE,cAAM,OAAA,OAAO,EAAP,CAAO,CAAC,CAAC;IAC1D,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/publishLast.js b/node_modules/rxjs/dist/esm5/internal/operators/publishLast.js deleted file mode 100644 index c312d86..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/publishLast.js +++ /dev/null @@ -1,9 +0,0 @@ -import { AsyncSubject } from '../AsyncSubject'; -import { ConnectableObservable } from '../observable/ConnectableObservable'; -export function publishLast() { - return function (source) { - var subject = new AsyncSubject(); - return new ConnectableObservable(source, function () { return subject; }); - }; -} -//# sourceMappingURL=publishLast.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/publishLast.js.map b/node_modules/rxjs/dist/esm5/internal/operators/publishLast.js.map deleted file mode 100644 index e173ca7..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/publishLast.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"publishLast.js","sourceRoot":"","sources":["../../../../src/internal/operators/publishLast.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAmE5E,MAAM,UAAU,WAAW;IAEzB,OAAO,UAAC,MAAM;QACZ,IAAM,OAAO,GAAG,IAAI,YAAY,EAAK,CAAC;QACtC,OAAO,IAAI,qBAAqB,CAAC,MAAM,EAAE,cAAM,OAAA,OAAO,EAAP,CAAO,CAAC,CAAC;IAC1D,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/publishReplay.js b/node_modules/rxjs/dist/esm5/internal/operators/publishReplay.js deleted file mode 100644 index 4f7325d..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/publishReplay.js +++ /dev/null @@ -1,11 +0,0 @@ -import { ReplaySubject } from '../ReplaySubject'; -import { multicast } from './multicast'; -import { isFunction } from '../util/isFunction'; -export function publishReplay(bufferSize, windowTime, selectorOrScheduler, timestampProvider) { - if (selectorOrScheduler && !isFunction(selectorOrScheduler)) { - timestampProvider = selectorOrScheduler; - } - var selector = isFunction(selectorOrScheduler) ? selectorOrScheduler : undefined; - return function (source) { return multicast(new ReplaySubject(bufferSize, windowTime, timestampProvider), selector)(source); }; -} -//# sourceMappingURL=publishReplay.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/publishReplay.js.map b/node_modules/rxjs/dist/esm5/internal/operators/publishReplay.js.map deleted file mode 100644 index 71b6776..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/publishReplay.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"publishReplay.js","sourceRoot":"","sources":["../../../../src/internal/operators/publishReplay.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AA8EhD,MAAM,UAAU,aAAa,CAC3B,UAAmB,EACnB,UAAmB,EACnB,mBAAgE,EAChE,iBAAqC;IAErC,IAAI,mBAAmB,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE;QAC3D,iBAAiB,GAAG,mBAAmB,CAAC;KACzC;IACD,IAAM,QAAQ,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS,CAAC;IAGnF,OAAO,UAAC,MAAqB,IAAK,OAAA,SAAS,CAAC,IAAI,aAAa,CAAI,UAAU,EAAE,UAAU,EAAE,iBAAiB,CAAC,EAAE,QAAS,CAAC,CAAC,MAAM,CAAC,EAA7F,CAA6F,CAAC;AAClI,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/race.js b/node_modules/rxjs/dist/esm5/internal/operators/race.js deleted file mode 100644 index 063ecb3..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/race.js +++ /dev/null @@ -1,11 +0,0 @@ -import { __read, __spreadArray } from "tslib"; -import { argsOrArgArray } from '../util/argsOrArgArray'; -import { raceWith } from './raceWith'; -export function race() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return raceWith.apply(void 0, __spreadArray([], __read(argsOrArgArray(args)))); -} -//# sourceMappingURL=race.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/race.js.map b/node_modules/rxjs/dist/esm5/internal/operators/race.js.map deleted file mode 100644 index a2049a5..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/race.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"race.js","sourceRoot":"","sources":["../../../../src/internal/operators/race.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAetC,MAAM,UAAU,IAAI;IAAI,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,yBAAc;;IACpC,OAAO,QAAQ,wCAAI,cAAc,CAAC,IAAI,CAAC,IAAE;AAC3C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/raceWith.js b/node_modules/rxjs/dist/esm5/internal/operators/raceWith.js deleted file mode 100644 index cff7a6a..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/raceWith.js +++ /dev/null @@ -1,16 +0,0 @@ -import { __read, __spreadArray } from "tslib"; -import { raceInit } from '../observable/race'; -import { operate } from '../util/lift'; -import { identity } from '../util/identity'; -export function raceWith() { - var otherSources = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherSources[_i] = arguments[_i]; - } - return !otherSources.length - ? identity - : operate(function (source, subscriber) { - raceInit(__spreadArray([source], __read(otherSources)))(subscriber); - }); -} -//# sourceMappingURL=raceWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/raceWith.js.map b/node_modules/rxjs/dist/esm5/internal/operators/raceWith.js.map deleted file mode 100644 index 5547fed..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/raceWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"raceWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/raceWith.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AA4B5C,MAAM,UAAU,QAAQ;IACtB,sBAA6C;SAA7C,UAA6C,EAA7C,qBAA6C,EAA7C,IAA6C;QAA7C,iCAA6C;;IAE7C,OAAO,CAAC,YAAY,CAAC,MAAM;QACzB,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YACzB,QAAQ,gBAAiB,MAAM,UAAK,YAAY,GAAE,CAAC,UAAU,CAAC,CAAC;QACjE,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/reduce.js b/node_modules/rxjs/dist/esm5/internal/operators/reduce.js deleted file mode 100644 index 55be35a..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/reduce.js +++ /dev/null @@ -1,6 +0,0 @@ -import { scanInternals } from './scanInternals'; -import { operate } from '../util/lift'; -export function reduce(accumulator, seed) { - return operate(scanInternals(accumulator, seed, arguments.length >= 2, false, true)); -} -//# sourceMappingURL=reduce.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/reduce.js.map b/node_modules/rxjs/dist/esm5/internal/operators/reduce.js.map deleted file mode 100644 index e9ce0ca..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/reduce.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"reduce.js","sourceRoot":"","sources":["../../../../src/internal/operators/reduce.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAwDvC,MAAM,UAAU,MAAM,CAAO,WAAuD,EAAE,IAAU;IAC9F,OAAO,OAAO,CAAC,aAAa,CAAC,WAAW,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;AACvF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/refCount.js b/node_modules/rxjs/dist/esm5/internal/operators/refCount.js deleted file mode 100644 index ee0182d..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/refCount.js +++ /dev/null @@ -1,26 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function refCount() { - return operate(function (source, subscriber) { - var connection = null; - source._refCount++; - var refCounter = createOperatorSubscriber(subscriber, undefined, undefined, undefined, function () { - if (!source || source._refCount <= 0 || 0 < --source._refCount) { - connection = null; - return; - } - var sharedConnection = source._connection; - var conn = connection; - connection = null; - if (sharedConnection && (!conn || sharedConnection === conn)) { - sharedConnection.unsubscribe(); - } - subscriber.unsubscribe(); - }); - source.subscribe(refCounter); - if (!refCounter.closed) { - connection = source.connect(); - } - }); -} -//# sourceMappingURL=refCount.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/refCount.js.map b/node_modules/rxjs/dist/esm5/internal/operators/refCount.js.map deleted file mode 100644 index b7cf3a2..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/refCount.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"refCount.js","sourceRoot":"","sources":["../../../../src/internal/operators/refCount.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA4DhE,MAAM,UAAU,QAAQ;IACtB,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,UAAU,GAAwB,IAAI,CAAC;QAE1C,MAAc,CAAC,SAAS,EAAE,CAAC;QAE5B,IAAM,UAAU,GAAG,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE;YACvF,IAAI,CAAC,MAAM,IAAK,MAAc,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,EAAG,MAAc,CAAC,SAAS,EAAE;gBAChF,UAAU,GAAG,IAAI,CAAC;gBAClB,OAAO;aACR;YA2BD,IAAM,gBAAgB,GAAI,MAAc,CAAC,WAAW,CAAC;YACrD,IAAM,IAAI,GAAG,UAAU,CAAC;YACxB,UAAU,GAAG,IAAI,CAAC;YAElB,IAAI,gBAAgB,IAAI,CAAC,CAAC,IAAI,IAAI,gBAAgB,KAAK,IAAI,CAAC,EAAE;gBAC5D,gBAAgB,CAAC,WAAW,EAAE,CAAC;aAChC;YAED,UAAU,CAAC,WAAW,EAAE,CAAC;QAC3B,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAE7B,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;YACtB,UAAU,GAAI,MAAmC,CAAC,OAAO,EAAE,CAAC;SAC7D;IACH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/repeat.js b/node_modules/rxjs/dist/esm5/internal/operators/repeat.js deleted file mode 100644 index d5daec0..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/repeat.js +++ /dev/null @@ -1,60 +0,0 @@ -import { EMPTY } from '../observable/empty'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; -import { timer } from '../observable/timer'; -export function repeat(countOrConfig) { - var _a; - var count = Infinity; - var delay; - if (countOrConfig != null) { - if (typeof countOrConfig === 'object') { - (_a = countOrConfig.count, count = _a === void 0 ? Infinity : _a, delay = countOrConfig.delay); - } - else { - count = countOrConfig; - } - } - return count <= 0 - ? function () { return EMPTY; } - : operate(function (source, subscriber) { - var soFar = 0; - var sourceSub; - var resubscribe = function () { - sourceSub === null || sourceSub === void 0 ? void 0 : sourceSub.unsubscribe(); - sourceSub = null; - if (delay != null) { - var notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(soFar)); - var notifierSubscriber_1 = createOperatorSubscriber(subscriber, function () { - notifierSubscriber_1.unsubscribe(); - subscribeToSource(); - }); - notifier.subscribe(notifierSubscriber_1); - } - else { - subscribeToSource(); - } - }; - var subscribeToSource = function () { - var syncUnsub = false; - sourceSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, function () { - if (++soFar < count) { - if (sourceSub) { - resubscribe(); - } - else { - syncUnsub = true; - } - } - else { - subscriber.complete(); - } - })); - if (syncUnsub) { - resubscribe(); - } - }; - subscribeToSource(); - }); -} -//# sourceMappingURL=repeat.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/repeat.js.map b/node_modules/rxjs/dist/esm5/internal/operators/repeat.js.map deleted file mode 100644 index 6c78356..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/repeat.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"repeat.js","sourceRoot":"","sources":["../../../../src/internal/operators/repeat.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AA6G5C,MAAM,UAAU,MAAM,CAAI,aAAqC;;IAC7D,IAAI,KAAK,GAAG,QAAQ,CAAC;IACrB,IAAI,KAA4B,CAAC;IAEjC,IAAI,aAAa,IAAI,IAAI,EAAE;QACzB,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE;YACrC,CAAG,KAA4B,aAAa,MAAzB,EAAhB,KAAK,mBAAG,QAAQ,KAAA,EAAE,KAAK,GAAK,aAAa,MAAlB,CAAmB,CAAC;SAC/C;aAAM;YACL,KAAK,GAAG,aAAa,CAAC;SACvB;KACF;IAED,OAAO,KAAK,IAAI,CAAC;QACf,CAAC,CAAC,cAAM,OAAA,KAAK,EAAL,CAAK;QACb,CAAC,CAAC,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YACzB,IAAI,KAAK,GAAG,CAAC,CAAC;YACd,IAAI,SAA8B,CAAC;YAEnC,IAAM,WAAW,GAAG;gBAClB,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,WAAW,EAAE,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,IAAI,KAAK,IAAI,IAAI,EAAE;oBACjB,IAAM,QAAQ,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;oBACpF,IAAM,oBAAkB,GAAG,wBAAwB,CAAC,UAAU,EAAE;wBAC9D,oBAAkB,CAAC,WAAW,EAAE,CAAC;wBACjC,iBAAiB,EAAE,CAAC;oBACtB,CAAC,CAAC,CAAC;oBACH,QAAQ,CAAC,SAAS,CAAC,oBAAkB,CAAC,CAAC;iBACxC;qBAAM;oBACL,iBAAiB,EAAE,CAAC;iBACrB;YACH,CAAC,CAAC;YAEF,IAAM,iBAAiB,GAAG;gBACxB,IAAI,SAAS,GAAG,KAAK,CAAC;gBACtB,SAAS,GAAG,MAAM,CAAC,SAAS,CAC1B,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE;oBAC9C,IAAI,EAAE,KAAK,GAAG,KAAK,EAAE;wBACnB,IAAI,SAAS,EAAE;4BACb,WAAW,EAAE,CAAC;yBACf;6BAAM;4BACL,SAAS,GAAG,IAAI,CAAC;yBAClB;qBACF;yBAAM;wBACL,UAAU,CAAC,QAAQ,EAAE,CAAC;qBACvB;gBACH,CAAC,CAAC,CACH,CAAC;gBAEF,IAAI,SAAS,EAAE;oBACb,WAAW,EAAE,CAAC;iBACf;YACH,CAAC,CAAC;YAEF,iBAAiB,EAAE,CAAC;QACtB,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/repeatWhen.js b/node_modules/rxjs/dist/esm5/internal/operators/repeatWhen.js deleted file mode 100644 index 5839781..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/repeatWhen.js +++ /dev/null @@ -1,46 +0,0 @@ -import { innerFrom } from '../observable/innerFrom'; -import { Subject } from '../Subject'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function repeatWhen(notifier) { - return operate(function (source, subscriber) { - var innerSub; - var syncResub = false; - var completions$; - var isNotifierComplete = false; - var isMainComplete = false; - var checkComplete = function () { return isMainComplete && isNotifierComplete && (subscriber.complete(), true); }; - var getCompletionSubject = function () { - if (!completions$) { - completions$ = new Subject(); - innerFrom(notifier(completions$)).subscribe(createOperatorSubscriber(subscriber, function () { - if (innerSub) { - subscribeForRepeatWhen(); - } - else { - syncResub = true; - } - }, function () { - isNotifierComplete = true; - checkComplete(); - })); - } - return completions$; - }; - var subscribeForRepeatWhen = function () { - isMainComplete = false; - innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, function () { - isMainComplete = true; - !checkComplete() && getCompletionSubject().next(); - })); - if (syncResub) { - innerSub.unsubscribe(); - innerSub = null; - syncResub = false; - subscribeForRepeatWhen(); - } - }; - subscribeForRepeatWhen(); - }); -} -//# sourceMappingURL=repeatWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/repeatWhen.js.map b/node_modules/rxjs/dist/esm5/internal/operators/repeatWhen.js.map deleted file mode 100644 index 365f486..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/repeatWhen.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"repeatWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/repeatWhen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAIrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAoChE,MAAM,UAAU,UAAU,CAAI,QAAmE;IAC/F,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAA6B,CAAC;QAClC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,YAA2B,CAAC;QAChC,IAAI,kBAAkB,GAAG,KAAK,CAAC;QAC/B,IAAI,cAAc,GAAG,KAAK,CAAC;QAK3B,IAAM,aAAa,GAAG,cAAM,OAAA,cAAc,IAAI,kBAAkB,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,EAArE,CAAqE,CAAC;QAKlG,IAAM,oBAAoB,GAAG;YAC3B,IAAI,CAAC,YAAY,EAAE;gBACjB,YAAY,GAAG,IAAI,OAAO,EAAE,CAAC;gBAI7B,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CACzC,wBAAwB,CACtB,UAAU,EACV;oBACE,IAAI,QAAQ,EAAE;wBACZ,sBAAsB,EAAE,CAAC;qBAC1B;yBAAM;wBAKL,SAAS,GAAG,IAAI,CAAC;qBAClB;gBACH,CAAC,EACD;oBACE,kBAAkB,GAAG,IAAI,CAAC;oBAC1B,aAAa,EAAE,CAAC;gBAClB,CAAC,CACF,CACF,CAAC;aACH;YACD,OAAO,YAAY,CAAC;QACtB,CAAC,CAAC;QAEF,IAAM,sBAAsB,GAAG;YAC7B,cAAc,GAAG,KAAK,CAAC;YAEvB,QAAQ,GAAG,MAAM,CAAC,SAAS,CACzB,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE;gBAC9C,cAAc,GAAG,IAAI,CAAC;gBAMtB,CAAC,aAAa,EAAE,IAAI,oBAAoB,EAAE,CAAC,IAAI,EAAE,CAAC;YACpD,CAAC,CAAC,CACH,CAAC;YAEF,IAAI,SAAS,EAAE;gBAKb,QAAQ,CAAC,WAAW,EAAE,CAAC;gBAIvB,QAAQ,GAAG,IAAI,CAAC;gBAEhB,SAAS,GAAG,KAAK,CAAC;gBAElB,sBAAsB,EAAE,CAAC;aAC1B;QACH,CAAC,CAAC;QAGF,sBAAsB,EAAE,CAAC;IAC3B,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/retry.js b/node_modules/rxjs/dist/esm5/internal/operators/retry.js deleted file mode 100644 index 3ba2a04..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/retry.js +++ /dev/null @@ -1,69 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { identity } from '../util/identity'; -import { timer } from '../observable/timer'; -import { innerFrom } from '../observable/innerFrom'; -export function retry(configOrCount) { - if (configOrCount === void 0) { configOrCount = Infinity; } - var config; - if (configOrCount && typeof configOrCount === 'object') { - config = configOrCount; - } - else { - config = { - count: configOrCount, - }; - } - var _a = config.count, count = _a === void 0 ? Infinity : _a, delay = config.delay, _b = config.resetOnSuccess, resetOnSuccess = _b === void 0 ? false : _b; - return count <= 0 - ? identity - : operate(function (source, subscriber) { - var soFar = 0; - var innerSub; - var subscribeForRetry = function () { - var syncUnsub = false; - innerSub = source.subscribe(createOperatorSubscriber(subscriber, function (value) { - if (resetOnSuccess) { - soFar = 0; - } - subscriber.next(value); - }, undefined, function (err) { - if (soFar++ < count) { - var resub_1 = function () { - if (innerSub) { - innerSub.unsubscribe(); - innerSub = null; - subscribeForRetry(); - } - else { - syncUnsub = true; - } - }; - if (delay != null) { - var notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(err, soFar)); - var notifierSubscriber_1 = createOperatorSubscriber(subscriber, function () { - notifierSubscriber_1.unsubscribe(); - resub_1(); - }, function () { - subscriber.complete(); - }); - notifier.subscribe(notifierSubscriber_1); - } - else { - resub_1(); - } - } - else { - subscriber.error(err); - } - })); - if (syncUnsub) { - innerSub.unsubscribe(); - innerSub = null; - subscribeForRetry(); - } - }; - subscribeForRetry(); - }); -} -//# sourceMappingURL=retry.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/retry.js.map b/node_modules/rxjs/dist/esm5/internal/operators/retry.js.map deleted file mode 100644 index 7d544de..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/retry.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"retry.js","sourceRoot":"","sources":["../../../../src/internal/operators/retry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA6EpD,MAAM,UAAU,KAAK,CAAI,aAA8C;IAA9C,8BAAA,EAAA,wBAA8C;IACrE,IAAI,MAAmB,CAAC;IACxB,IAAI,aAAa,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE;QACtD,MAAM,GAAG,aAAa,CAAC;KACxB;SAAM;QACL,MAAM,GAAG;YACP,KAAK,EAAE,aAAuB;SAC/B,CAAC;KACH;IACO,IAAA,KAAoE,MAAM,MAA1D,EAAhB,KAAK,mBAAG,QAAQ,KAAA,EAAE,KAAK,GAA6C,MAAM,MAAnD,EAAE,KAA2C,MAAM,eAAX,EAAtB,cAAc,mBAAG,KAAK,KAAA,CAAY;IAEnF,OAAO,KAAK,IAAI,CAAC;QACf,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YACzB,IAAI,KAAK,GAAG,CAAC,CAAC;YACd,IAAI,QAA6B,CAAC;YAClC,IAAM,iBAAiB,GAAG;gBACxB,IAAI,SAAS,GAAG,KAAK,CAAC;gBACtB,QAAQ,GAAG,MAAM,CAAC,SAAS,CACzB,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;oBAEJ,IAAI,cAAc,EAAE;wBAClB,KAAK,GAAG,CAAC,CAAC;qBACX;oBACD,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACzB,CAAC,EAED,SAAS,EACT,UAAC,GAAG;oBACF,IAAI,KAAK,EAAE,GAAG,KAAK,EAAE;wBAEnB,IAAM,OAAK,GAAG;4BACZ,IAAI,QAAQ,EAAE;gCACZ,QAAQ,CAAC,WAAW,EAAE,CAAC;gCACvB,QAAQ,GAAG,IAAI,CAAC;gCAChB,iBAAiB,EAAE,CAAC;6BACrB;iCAAM;gCACL,SAAS,GAAG,IAAI,CAAC;6BAClB;wBACH,CAAC,CAAC;wBAEF,IAAI,KAAK,IAAI,IAAI,EAAE;4BAIjB,IAAM,QAAQ,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;4BACzF,IAAM,oBAAkB,GAAG,wBAAwB,CACjD,UAAU,EACV;gCAIE,oBAAkB,CAAC,WAAW,EAAE,CAAC;gCACjC,OAAK,EAAE,CAAC;4BACV,CAAC,EACD;gCAGE,UAAU,CAAC,QAAQ,EAAE,CAAC;4BACxB,CAAC,CACF,CAAC;4BACF,QAAQ,CAAC,SAAS,CAAC,oBAAkB,CAAC,CAAC;yBACxC;6BAAM;4BAEL,OAAK,EAAE,CAAC;yBACT;qBACF;yBAAM;wBAGL,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;qBACvB;gBACH,CAAC,CACF,CACF,CAAC;gBACF,IAAI,SAAS,EAAE;oBACb,QAAQ,CAAC,WAAW,EAAE,CAAC;oBACvB,QAAQ,GAAG,IAAI,CAAC;oBAChB,iBAAiB,EAAE,CAAC;iBACrB;YACH,CAAC,CAAC;YACF,iBAAiB,EAAE,CAAC;QACtB,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/retryWhen.js b/node_modules/rxjs/dist/esm5/internal/operators/retryWhen.js deleted file mode 100644 index e6e1c09..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/retryWhen.js +++ /dev/null @@ -1,32 +0,0 @@ -import { innerFrom } from '../observable/innerFrom'; -import { Subject } from '../Subject'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function retryWhen(notifier) { - return operate(function (source, subscriber) { - var innerSub; - var syncResub = false; - var errors$; - var subscribeForRetryWhen = function () { - innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, function (err) { - if (!errors$) { - errors$ = new Subject(); - innerFrom(notifier(errors$)).subscribe(createOperatorSubscriber(subscriber, function () { - return innerSub ? subscribeForRetryWhen() : (syncResub = true); - })); - } - if (errors$) { - errors$.next(err); - } - })); - if (syncResub) { - innerSub.unsubscribe(); - innerSub = null; - syncResub = false; - subscribeForRetryWhen(); - } - }; - subscribeForRetryWhen(); - }); -} -//# sourceMappingURL=retryWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/retryWhen.js.map b/node_modules/rxjs/dist/esm5/internal/operators/retryWhen.js.map deleted file mode 100644 index 7ccab1a..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/retryWhen.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"retryWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/retryWhen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAIrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA2DhE,MAAM,UAAU,SAAS,CAAI,QAA2D;IACtF,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAA6B,CAAC;QAClC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,OAAqB,CAAC;QAE1B,IAAM,qBAAqB,GAAG;YAC5B,QAAQ,GAAG,MAAM,CAAC,SAAS,CACzB,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,UAAC,GAAG;gBAC7D,IAAI,CAAC,OAAO,EAAE;oBACZ,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;oBACxB,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CACpC,wBAAwB,CAAC,UAAU,EAAE;wBAMnC,OAAA,QAAQ,CAAC,CAAC,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;oBAAvD,CAAuD,CACxD,CACF,CAAC;iBACH;gBACD,IAAI,OAAO,EAAE;oBAEX,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;iBACnB;YACH,CAAC,CAAC,CACH,CAAC;YAEF,IAAI,SAAS,EAAE;gBAKb,QAAQ,CAAC,WAAW,EAAE,CAAC;gBACvB,QAAQ,GAAG,IAAI,CAAC;gBAEhB,SAAS,GAAG,KAAK,CAAC;gBAElB,qBAAqB,EAAE,CAAC;aACzB;QACH,CAAC,CAAC;QAGF,qBAAqB,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/sample.js b/node_modules/rxjs/dist/esm5/internal/operators/sample.js deleted file mode 100644 index feff985..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/sample.js +++ /dev/null @@ -1,23 +0,0 @@ -import { innerFrom } from '../observable/innerFrom'; -import { operate } from '../util/lift'; -import { noop } from '../util/noop'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function sample(notifier) { - return operate(function (source, subscriber) { - var hasValue = false; - var lastValue = null; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - hasValue = true; - lastValue = value; - })); - innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, function () { - if (hasValue) { - hasValue = false; - var value = lastValue; - lastValue = null; - subscriber.next(value); - } - }, noop)); - }); -} -//# sourceMappingURL=sample.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/sample.js.map b/node_modules/rxjs/dist/esm5/internal/operators/sample.js.map deleted file mode 100644 index 34b7662..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/sample.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sample.js","sourceRoot":"","sources":["../../../../src/internal/operators/sample.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA0ChE,MAAM,UAAU,MAAM,CAAI,QAA8B;IACtD,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,SAAS,GAAa,IAAI,CAAC;QAC/B,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,QAAQ,GAAG,IAAI,CAAC;YAChB,SAAS,GAAG,KAAK,CAAC;QACpB,CAAC,CAAC,CACH,CAAC;QACF,SAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAC3B,wBAAwB,CACtB,UAAU,EACV;YACE,IAAI,QAAQ,EAAE;gBACZ,QAAQ,GAAG,KAAK,CAAC;gBACjB,IAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,EACD,IAAI,CACL,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/sampleTime.js b/node_modules/rxjs/dist/esm5/internal/operators/sampleTime.js deleted file mode 100644 index 8be13a0..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/sampleTime.js +++ /dev/null @@ -1,8 +0,0 @@ -import { asyncScheduler } from '../scheduler/async'; -import { sample } from './sample'; -import { interval } from '../observable/interval'; -export function sampleTime(period, scheduler) { - if (scheduler === void 0) { scheduler = asyncScheduler; } - return sample(interval(period, scheduler)); -} -//# sourceMappingURL=sampleTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/sampleTime.js.map b/node_modules/rxjs/dist/esm5/internal/operators/sampleTime.js.map deleted file mode 100644 index 473a763..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/sampleTime.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sampleTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/sampleTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AA6ClD,MAAM,UAAU,UAAU,CAAI,MAAc,EAAE,SAAyC;IAAzC,0BAAA,EAAA,0BAAyC;IACrF,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;AAC7C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/scan.js b/node_modules/rxjs/dist/esm5/internal/operators/scan.js deleted file mode 100644 index b60b8e0..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/scan.js +++ /dev/null @@ -1,6 +0,0 @@ -import { operate } from '../util/lift'; -import { scanInternals } from './scanInternals'; -export function scan(accumulator, seed) { - return operate(scanInternals(accumulator, seed, arguments.length >= 2, true)); -} -//# sourceMappingURL=scan.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/scan.js.map b/node_modules/rxjs/dist/esm5/internal/operators/scan.js.map deleted file mode 100644 index dd32f36..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/scan.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scan.js","sourceRoot":"","sources":["../../../../src/internal/operators/scan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAqFhD,MAAM,UAAU,IAAI,CAAU,WAA2D,EAAE,IAAQ;IAMjG,OAAO,OAAO,CAAC,aAAa,CAAC,WAAW,EAAE,IAAS,EAAE,SAAS,CAAC,MAAM,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AACrF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js b/node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js deleted file mode 100644 index 66eaff6..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js +++ /dev/null @@ -1,22 +0,0 @@ -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) { - return function (source, subscriber) { - var hasState = hasSeed; - var state = seed; - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var i = index++; - state = hasState - ? - accumulator(state, value, i) - : - ((hasState = true), value); - emitOnNext && subscriber.next(state); - }, emitBeforeComplete && - (function () { - hasState && subscriber.next(state); - subscriber.complete(); - }))); - }; -} -//# sourceMappingURL=scanInternals.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js.map b/node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js.map deleted file mode 100644 index 94e2abb..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scanInternals.js","sourceRoot":"","sources":["../../../../src/internal/operators/scanInternals.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAWhE,MAAM,UAAU,aAAa,CAC3B,WAA2D,EAC3D,IAAO,EACP,OAAgB,EAChB,UAAmB,EACnB,kBAAqC;IAErC,OAAO,UAAC,MAAqB,EAAE,UAA2B;QAIxD,IAAI,QAAQ,GAAG,OAAO,CAAC;QAIvB,IAAI,KAAK,GAAQ,IAAI,CAAC;QAEtB,IAAI,KAAK,GAAG,CAAC,CAAC;QAGd,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YAEJ,IAAM,CAAC,GAAG,KAAK,EAAE,CAAC;YAElB,KAAK,GAAG,QAAQ;gBACd,CAAC;oBACC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;gBAC9B,CAAC;oBAGC,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;YAG/B,UAAU,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC,EAGD,kBAAkB;YAChB,CAAC;gBACC,QAAQ,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACnC,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC,CAAC,CACL,CACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/sequenceEqual.js b/node_modules/rxjs/dist/esm5/internal/operators/sequenceEqual.js deleted file mode 100644 index 2bd7113..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/sequenceEqual.js +++ /dev/null @@ -1,40 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; -export function sequenceEqual(compareTo, comparator) { - if (comparator === void 0) { comparator = function (a, b) { return a === b; }; } - return operate(function (source, subscriber) { - var aState = createState(); - var bState = createState(); - var emit = function (isEqual) { - subscriber.next(isEqual); - subscriber.complete(); - }; - var createSubscriber = function (selfState, otherState) { - var sequenceEqualSubscriber = createOperatorSubscriber(subscriber, function (a) { - var buffer = otherState.buffer, complete = otherState.complete; - if (buffer.length === 0) { - complete ? emit(false) : selfState.buffer.push(a); - } - else { - !comparator(a, buffer.shift()) && emit(false); - } - }, function () { - selfState.complete = true; - var complete = otherState.complete, buffer = otherState.buffer; - complete && emit(buffer.length === 0); - sequenceEqualSubscriber === null || sequenceEqualSubscriber === void 0 ? void 0 : sequenceEqualSubscriber.unsubscribe(); - }); - return sequenceEqualSubscriber; - }; - source.subscribe(createSubscriber(aState, bState)); - innerFrom(compareTo).subscribe(createSubscriber(bState, aState)); - }); -} -function createState() { - return { - buffer: [], - complete: false, - }; -} -//# sourceMappingURL=sequenceEqual.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/sequenceEqual.js.map b/node_modules/rxjs/dist/esm5/internal/operators/sequenceEqual.js.map deleted file mode 100644 index df29e7b..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/sequenceEqual.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sequenceEqual.js","sourceRoot":"","sources":["../../../../src/internal/operators/sequenceEqual.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA2DpD,MAAM,UAAU,aAAa,CAC3B,SAA6B,EAC7B,UAAuD;IAAvD,2BAAA,EAAA,uBAAuC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,KAAK,CAAC,EAAP,CAAO;IAEvD,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAM,MAAM,GAAG,WAAW,EAAK,CAAC;QAEhC,IAAM,MAAM,GAAG,WAAW,EAAK,CAAC;QAGhC,IAAM,IAAI,GAAG,UAAC,OAAgB;YAC5B,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACzB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CAAC;QAOF,IAAM,gBAAgB,GAAG,UAAC,SAA2B,EAAE,UAA4B;YACjF,IAAM,uBAAuB,GAAG,wBAAwB,CACtD,UAAU,EACV,UAAC,CAAI;gBACK,IAAA,MAAM,GAAe,UAAU,OAAzB,EAAE,QAAQ,GAAK,UAAU,SAAf,CAAgB;gBACxC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;oBAOvB,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;iBACnD;qBAAM;oBAIL,CAAC,UAAU,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,EAAG,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;iBAChD;YACH,CAAC,EACD;gBAEE,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC;gBAClB,IAAA,QAAQ,GAAa,UAAU,SAAvB,EAAE,MAAM,GAAK,UAAU,OAAf,CAAgB;gBAKxC,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;gBAEtC,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,WAAW,EAAE,CAAC;YACzC,CAAC,CACF,CAAC;YAEF,OAAO,uBAAuB,CAAC;QACjC,CAAC,CAAC;QAGF,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;QACnD,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;AACL,CAAC;AAgBD,SAAS,WAAW;IAClB,OAAO;QACL,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,KAAK;KAChB,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/share.js b/node_modules/rxjs/dist/esm5/internal/operators/share.js deleted file mode 100644 index f2e2c10..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/share.js +++ /dev/null @@ -1,85 +0,0 @@ -import { __read, __spreadArray } from "tslib"; -import { innerFrom } from '../observable/innerFrom'; -import { Subject } from '../Subject'; -import { SafeSubscriber } from '../Subscriber'; -import { operate } from '../util/lift'; -export function share(options) { - if (options === void 0) { options = {}; } - var _a = options.connector, connector = _a === void 0 ? function () { return new Subject(); } : _a, _b = options.resetOnError, resetOnError = _b === void 0 ? true : _b, _c = options.resetOnComplete, resetOnComplete = _c === void 0 ? true : _c, _d = options.resetOnRefCountZero, resetOnRefCountZero = _d === void 0 ? true : _d; - return function (wrapperSource) { - var connection; - var resetConnection; - var subject; - var refCount = 0; - var hasCompleted = false; - var hasErrored = false; - var cancelReset = function () { - resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe(); - resetConnection = undefined; - }; - var reset = function () { - cancelReset(); - connection = subject = undefined; - hasCompleted = hasErrored = false; - }; - var resetAndUnsubscribe = function () { - var conn = connection; - reset(); - conn === null || conn === void 0 ? void 0 : conn.unsubscribe(); - }; - return operate(function (source, subscriber) { - refCount++; - if (!hasErrored && !hasCompleted) { - cancelReset(); - } - var dest = (subject = subject !== null && subject !== void 0 ? subject : connector()); - subscriber.add(function () { - refCount--; - if (refCount === 0 && !hasErrored && !hasCompleted) { - resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero); - } - }); - dest.subscribe(subscriber); - if (!connection && - refCount > 0) { - connection = new SafeSubscriber({ - next: function (value) { return dest.next(value); }, - error: function (err) { - hasErrored = true; - cancelReset(); - resetConnection = handleReset(reset, resetOnError, err); - dest.error(err); - }, - complete: function () { - hasCompleted = true; - cancelReset(); - resetConnection = handleReset(reset, resetOnComplete); - dest.complete(); - }, - }); - innerFrom(source).subscribe(connection); - } - })(wrapperSource); - }; -} -function handleReset(reset, on) { - var args = []; - for (var _i = 2; _i < arguments.length; _i++) { - args[_i - 2] = arguments[_i]; - } - if (on === true) { - reset(); - return; - } - if (on === false) { - return; - } - var onSubscriber = new SafeSubscriber({ - next: function () { - onSubscriber.unsubscribe(); - reset(); - }, - }); - return innerFrom(on.apply(void 0, __spreadArray([], __read(args)))).subscribe(onSubscriber); -} -//# sourceMappingURL=share.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/share.js.map b/node_modules/rxjs/dist/esm5/internal/operators/share.js.map deleted file mode 100644 index 229a038..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/share.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"share.js","sourceRoot":"","sources":["../../../../src/internal/operators/share.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAG/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAwIvC,MAAM,UAAU,KAAK,CAAI,OAA4B;IAA5B,wBAAA,EAAA,YAA4B;IAC3C,IAAA,KAAgH,OAAO,UAArF,EAAlC,SAAS,mBAAG,cAAM,OAAA,IAAI,OAAO,EAAK,EAAhB,CAAgB,KAAA,EAAE,KAA4E,OAAO,aAAhE,EAAnB,YAAY,mBAAG,IAAI,KAAA,EAAE,KAAuD,OAAO,gBAAxC,EAAtB,eAAe,mBAAG,IAAI,KAAA,EAAE,KAA+B,OAAO,oBAAZ,EAA1B,mBAAmB,mBAAG,IAAI,KAAA,CAAa;IAUhI,OAAO,UAAC,aAAa;QACnB,IAAI,UAAyC,CAAC;QAC9C,IAAI,eAAyC,CAAC;QAC9C,IAAI,OAAmC,CAAC;QACxC,IAAI,QAAQ,GAAG,CAAC,CAAC;QACjB,IAAI,YAAY,GAAG,KAAK,CAAC;QACzB,IAAI,UAAU,GAAG,KAAK,CAAC;QAEvB,IAAM,WAAW,GAAG;YAClB,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,WAAW,EAAE,CAAC;YAC/B,eAAe,GAAG,SAAS,CAAC;QAC9B,CAAC,CAAC;QAGF,IAAM,KAAK,GAAG;YACZ,WAAW,EAAE,CAAC;YACd,UAAU,GAAG,OAAO,GAAG,SAAS,CAAC;YACjC,YAAY,GAAG,UAAU,GAAG,KAAK,CAAC;QACpC,CAAC,CAAC;QACF,IAAM,mBAAmB,GAAG;YAG1B,IAAM,IAAI,GAAG,UAAU,CAAC;YACxB,KAAK,EAAE,CAAC;YACR,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,EAAE,CAAC;QACtB,CAAC,CAAC;QAEF,OAAO,OAAO,CAAO,UAAC,MAAM,EAAE,UAAU;YACtC,QAAQ,EAAE,CAAC;YACX,IAAI,CAAC,UAAU,IAAI,CAAC,YAAY,EAAE;gBAChC,WAAW,EAAE,CAAC;aACf;YAMD,IAAM,IAAI,GAAG,CAAC,OAAO,GAAG,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,SAAS,EAAE,CAAC,CAAC;YAOhD,UAAU,CAAC,GAAG,CAAC;gBACb,QAAQ,EAAE,CAAC;gBAKX,IAAI,QAAQ,KAAK,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,YAAY,EAAE;oBAClD,eAAe,GAAG,WAAW,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,CAAC;iBACzE;YACH,CAAC,CAAC,CAAC;YAIH,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;YAE3B,IACE,CAAC,UAAU;gBAIX,QAAQ,GAAG,CAAC,EACZ;gBAMA,UAAU,GAAG,IAAI,cAAc,CAAC;oBAC9B,IAAI,EAAE,UAAC,KAAK,IAAK,OAAA,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAhB,CAAgB;oBACjC,KAAK,EAAE,UAAC,GAAG;wBACT,UAAU,GAAG,IAAI,CAAC;wBAClB,WAAW,EAAE,CAAC;wBACd,eAAe,GAAG,WAAW,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,CAAC,CAAC;wBACxD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBAClB,CAAC;oBACD,QAAQ,EAAE;wBACR,YAAY,GAAG,IAAI,CAAC;wBACpB,WAAW,EAAE,CAAC;wBACd,eAAe,GAAG,WAAW,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;wBACtD,IAAI,CAAC,QAAQ,EAAE,CAAC;oBAClB,CAAC;iBACF,CAAC,CAAC;gBACH,SAAS,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;aACzC;QACH,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAClB,KAAiB,EACjB,EAAoD;IACpD,cAAU;SAAV,UAAU,EAAV,qBAAU,EAAV,IAAU;QAAV,6BAAU;;IAEV,IAAI,EAAE,KAAK,IAAI,EAAE;QACf,KAAK,EAAE,CAAC;QACR,OAAO;KACR;IAED,IAAI,EAAE,KAAK,KAAK,EAAE;QAChB,OAAO;KACR;IAED,IAAM,YAAY,GAAG,IAAI,cAAc,CAAC;QACtC,IAAI,EAAE;YACJ,YAAY,CAAC,WAAW,EAAE,CAAC;YAC3B,KAAK,EAAE,CAAC;QACV,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC,EAAE,wCAAI,IAAI,IAAE,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;AACxD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/shareReplay.js b/node_modules/rxjs/dist/esm5/internal/operators/shareReplay.js deleted file mode 100644 index 857e37b..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/shareReplay.js +++ /dev/null @@ -1,20 +0,0 @@ -import { ReplaySubject } from '../ReplaySubject'; -import { share } from './share'; -export function shareReplay(configOrBufferSize, windowTime, scheduler) { - var _a, _b, _c; - var bufferSize; - var refCount = false; - if (configOrBufferSize && typeof configOrBufferSize === 'object') { - (_a = configOrBufferSize.bufferSize, bufferSize = _a === void 0 ? Infinity : _a, _b = configOrBufferSize.windowTime, windowTime = _b === void 0 ? Infinity : _b, _c = configOrBufferSize.refCount, refCount = _c === void 0 ? false : _c, scheduler = configOrBufferSize.scheduler); - } - else { - bufferSize = (configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity); - } - return share({ - connector: function () { return new ReplaySubject(bufferSize, windowTime, scheduler); }, - resetOnError: true, - resetOnComplete: false, - resetOnRefCountZero: refCount, - }); -} -//# sourceMappingURL=shareReplay.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/shareReplay.js.map b/node_modules/rxjs/dist/esm5/internal/operators/shareReplay.js.map deleted file mode 100644 index 2408618..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/shareReplay.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"shareReplay.js","sourceRoot":"","sources":["../../../../src/internal/operators/shareReplay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAwJhC,MAAM,UAAU,WAAW,CACzB,kBAA+C,EAC/C,UAAmB,EACnB,SAAyB;;IAEzB,IAAI,UAAkB,CAAC;IACvB,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,IAAI,kBAAkB,IAAI,OAAO,kBAAkB,KAAK,QAAQ,EAAE;QAChE,CAAG,KAA8E,kBAAkB,WAA3E,EAArB,UAAU,mBAAG,QAAQ,KAAA,EAAE,KAAuD,kBAAkB,WAApD,EAArB,UAAU,mBAAG,QAAQ,KAAA,EAAE,KAAgC,kBAAkB,SAAlC,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAAE,SAAS,GAAK,kBAAkB,UAAvB,CAAwB,CAAC;KACtG;SAAM;QACL,UAAU,GAAG,CAAC,kBAAkB,aAAlB,kBAAkB,cAAlB,kBAAkB,GAAI,QAAQ,CAAW,CAAC;KACzD;IACD,OAAO,KAAK,CAAI;QACd,SAAS,EAAE,cAAM,OAAA,IAAI,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC,EAApD,CAAoD;QACrE,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,KAAK;QACtB,mBAAmB,EAAE,QAAQ;KAC9B,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/single.js b/node_modules/rxjs/dist/esm5/internal/operators/single.js deleted file mode 100644 index ed324d0..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/single.js +++ /dev/null @@ -1,30 +0,0 @@ -import { EmptyError } from '../util/EmptyError'; -import { SequenceError } from '../util/SequenceError'; -import { NotFoundError } from '../util/NotFoundError'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function single(predicate) { - return operate(function (source, subscriber) { - var hasValue = false; - var singleValue; - var seenValue = false; - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - seenValue = true; - if (!predicate || predicate(value, index++, source)) { - hasValue && subscriber.error(new SequenceError('Too many matching values')); - hasValue = true; - singleValue = value; - } - }, function () { - if (hasValue) { - subscriber.next(singleValue); - subscriber.complete(); - } - else { - subscriber.error(seenValue ? new NotFoundError('No matching values') : new EmptyError()); - } - })); - }); -} -//# sourceMappingURL=single.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/single.js.map b/node_modules/rxjs/dist/esm5/internal/operators/single.js.map deleted file mode 100644 index b5b4b5d..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/single.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"single.js","sourceRoot":"","sources":["../../../../src/internal/operators/single.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAqFhE,MAAM,UAAU,MAAM,CAAI,SAAuE;IAC/F,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,WAAc,CAAC;QACnB,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,SAAS,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,EAAE;gBACnD,QAAQ,IAAI,UAAU,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,0BAA0B,CAAC,CAAC,CAAC;gBAC5E,QAAQ,GAAG,IAAI,CAAC;gBAChB,WAAW,GAAG,KAAK,CAAC;aACrB;QACH,CAAC,EACD;YACE,IAAI,QAAQ,EAAE;gBACZ,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBAC7B,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;iBAAM;gBACL,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,aAAa,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,IAAI,UAAU,EAAE,CAAC,CAAC;aAC1F;QACH,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/skip.js b/node_modules/rxjs/dist/esm5/internal/operators/skip.js deleted file mode 100644 index 4804421..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/skip.js +++ /dev/null @@ -1,5 +0,0 @@ -import { filter } from './filter'; -export function skip(count) { - return filter(function (_, index) { return count <= index; }); -} -//# sourceMappingURL=skip.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/skip.js.map b/node_modules/rxjs/dist/esm5/internal/operators/skip.js.map deleted file mode 100644 index a6aa41c..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/skip.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"skip.js","sourceRoot":"","sources":["../../../../src/internal/operators/skip.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAmClC,MAAM,UAAU,IAAI,CAAI,KAAa;IACnC,OAAO,MAAM,CAAC,UAAC,CAAC,EAAE,KAAK,IAAK,OAAA,KAAK,IAAI,KAAK,EAAd,CAAc,CAAC,CAAC;AAC9C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/skipLast.js b/node_modules/rxjs/dist/esm5/internal/operators/skipLast.js deleted file mode 100644 index 8a69d32..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/skipLast.js +++ /dev/null @@ -1,28 +0,0 @@ -import { identity } from '../util/identity'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function skipLast(skipCount) { - return skipCount <= 0 - ? - identity - : operate(function (source, subscriber) { - var ring = new Array(skipCount); - var seen = 0; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var valueIndex = seen++; - if (valueIndex < skipCount) { - ring[valueIndex] = value; - } - else { - var index = valueIndex % skipCount; - var oldValue = ring[index]; - ring[index] = value; - subscriber.next(oldValue); - } - })); - return function () { - ring = null; - }; - }); -} -//# sourceMappingURL=skipLast.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/skipLast.js.map b/node_modules/rxjs/dist/esm5/internal/operators/skipLast.js.map deleted file mode 100644 index a35e890..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/skipLast.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"skipLast.js","sourceRoot":"","sources":["../../../../src/internal/operators/skipLast.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA4ChE,MAAM,UAAU,QAAQ,CAAI,SAAiB;IAC3C,OAAO,SAAS,IAAI,CAAC;QACnB,CAAC;YACC,QAAQ;QACV,CAAC,CAAC,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YAIzB,IAAI,IAAI,GAAQ,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC;YAGrC,IAAI,IAAI,GAAG,CAAC,CAAC;YACb,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;gBAKzC,IAAM,UAAU,GAAG,IAAI,EAAE,CAAC;gBAC1B,IAAI,UAAU,GAAG,SAAS,EAAE;oBAI1B,IAAI,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC;iBAC1B;qBAAM;oBAIL,IAAM,KAAK,GAAG,UAAU,GAAG,SAAS,CAAC;oBAGrC,IAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;oBAC7B,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;oBAKpB,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;iBAC3B;YACH,CAAC,CAAC,CACH,CAAC;YAEF,OAAO;gBAEL,IAAI,GAAG,IAAK,CAAC;YACf,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/skipUntil.js b/node_modules/rxjs/dist/esm5/internal/operators/skipUntil.js deleted file mode 100644 index 12aa7aa..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/skipUntil.js +++ /dev/null @@ -1,16 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; -import { noop } from '../util/noop'; -export function skipUntil(notifier) { - return operate(function (source, subscriber) { - var taking = false; - var skipSubscriber = createOperatorSubscriber(subscriber, function () { - skipSubscriber === null || skipSubscriber === void 0 ? void 0 : skipSubscriber.unsubscribe(); - taking = true; - }, noop); - innerFrom(notifier).subscribe(skipSubscriber); - source.subscribe(createOperatorSubscriber(subscriber, function (value) { return taking && subscriber.next(value); })); - }); -} -//# sourceMappingURL=skipUntil.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/skipUntil.js.map b/node_modules/rxjs/dist/esm5/internal/operators/skipUntil.js.map deleted file mode 100644 index b9c47b8..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/skipUntil.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"skipUntil.js","sourceRoot":"","sources":["../../../../src/internal/operators/skipUntil.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AA+CpC,MAAM,UAAU,SAAS,CAAI,QAA8B;IACzD,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,MAAM,GAAG,KAAK,CAAC;QAEnB,IAAM,cAAc,GAAG,wBAAwB,CAC7C,UAAU,EACV;YACE,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,WAAW,EAAE,CAAC;YAC9B,MAAM,GAAG,IAAI,CAAC;QAChB,CAAC,EACD,IAAI,CACL,CAAC;QAEF,SAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;QAE9C,MAAM,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK,IAAK,OAAA,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAhC,CAAgC,CAAC,CAAC,CAAC;IACtG,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/skipWhile.js b/node_modules/rxjs/dist/esm5/internal/operators/skipWhile.js deleted file mode 100644 index 4f86f13..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/skipWhile.js +++ /dev/null @@ -1,10 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function skipWhile(predicate) { - return operate(function (source, subscriber) { - var taking = false; - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { return (taking || (taking = !predicate(value, index++))) && subscriber.next(value); })); - }); -} -//# sourceMappingURL=skipWhile.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/skipWhile.js.map b/node_modules/rxjs/dist/esm5/internal/operators/skipWhile.js.map deleted file mode 100644 index c4e201d..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/skipWhile.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"skipWhile.js","sourceRoot":"","sources":["../../../../src/internal/operators/skipWhile.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAiDhE,MAAM,UAAU,SAAS,CAAI,SAA+C;IAC1E,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,MAAM,GAAG,KAAK,CAAC;QACnB,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK,IAAK,OAAA,CAAC,MAAM,IAAI,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAA3E,CAA2E,CAAC,CAC7H,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/startWith.js b/node_modules/rxjs/dist/esm5/internal/operators/startWith.js deleted file mode 100644 index f10bfca..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/startWith.js +++ /dev/null @@ -1,14 +0,0 @@ -import { concat } from '../observable/concat'; -import { popScheduler } from '../util/args'; -import { operate } from '../util/lift'; -export function startWith() { - var values = []; - for (var _i = 0; _i < arguments.length; _i++) { - values[_i] = arguments[_i]; - } - var scheduler = popScheduler(values); - return operate(function (source, subscriber) { - (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber); - }); -} -//# sourceMappingURL=startWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/startWith.js.map b/node_modules/rxjs/dist/esm5/internal/operators/startWith.js.map deleted file mode 100644 index f32f49c..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/startWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"startWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/startWith.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAuDvC,MAAM,UAAU,SAAS;IAAO,gBAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,2BAAc;;IAC5C,IAAM,SAAS,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IACvC,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAIhC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACjG,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js b/node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js deleted file mode 100644 index d77b949..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js +++ /dev/null @@ -1,8 +0,0 @@ -import { operate } from '../util/lift'; -export function subscribeOn(scheduler, delay) { - if (delay === void 0) { delay = 0; } - return operate(function (source, subscriber) { - subscriber.add(scheduler.schedule(function () { return source.subscribe(subscriber); }, delay)); - }); -} -//# sourceMappingURL=subscribeOn.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js.map b/node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js.map deleted file mode 100644 index c04f344..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"subscribeOn.js","sourceRoot":"","sources":["../../../../src/internal/operators/subscribeOn.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA6DvC,MAAM,UAAU,WAAW,CAAI,SAAwB,EAAE,KAAiB;IAAjB,sBAAA,EAAA,SAAiB;IACxE,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,cAAM,OAAA,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,EAA5B,CAA4B,EAAE,KAAK,CAAC,CAAC,CAAC;IAChF,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/switchAll.js b/node_modules/rxjs/dist/esm5/internal/operators/switchAll.js deleted file mode 100644 index f0db599..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/switchAll.js +++ /dev/null @@ -1,6 +0,0 @@ -import { switchMap } from './switchMap'; -import { identity } from '../util/identity'; -export function switchAll() { - return switchMap(identity); -} -//# sourceMappingURL=switchAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/switchAll.js.map b/node_modules/rxjs/dist/esm5/internal/operators/switchAll.js.map deleted file mode 100644 index f4b6438..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/switchAll.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"switchAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchAll.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AA4D5C,MAAM,UAAU,SAAS;IACvB,OAAO,SAAS,CAAC,QAAQ,CAAC,CAAC;AAC7B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/switchMap.js b/node_modules/rxjs/dist/esm5/internal/operators/switchMap.js deleted file mode 100644 index aed4575..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/switchMap.js +++ /dev/null @@ -1,24 +0,0 @@ -import { innerFrom } from '../observable/innerFrom'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function switchMap(project, resultSelector) { - return operate(function (source, subscriber) { - var innerSubscriber = null; - var index = 0; - var isComplete = false; - var checkComplete = function () { return isComplete && !innerSubscriber && subscriber.complete(); }; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe(); - var innerIndex = 0; - var outerIndex = index++; - innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = createOperatorSubscriber(subscriber, function (innerValue) { return subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue); }, function () { - innerSubscriber = null; - checkComplete(); - }))); - }, function () { - isComplete = true; - checkComplete(); - })); - }); -} -//# sourceMappingURL=switchMap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/switchMap.js.map b/node_modules/rxjs/dist/esm5/internal/operators/switchMap.js.map deleted file mode 100644 index db03d1c..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/switchMap.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"switchMap.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchMap.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAgFhE,MAAM,UAAU,SAAS,CACvB,OAAuC,EACvC,cAA6G;IAE7G,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,eAAe,GAA0C,IAAI,CAAC;QAClE,IAAI,KAAK,GAAG,CAAC,CAAC;QAEd,IAAI,UAAU,GAAG,KAAK,CAAC;QAIvB,IAAM,aAAa,GAAG,cAAM,OAAA,UAAU,IAAI,CAAC,eAAe,IAAI,UAAU,CAAC,QAAQ,EAAE,EAAvD,CAAuD,CAAC;QAEpF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YAEJ,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,WAAW,EAAE,CAAC;YAC/B,IAAI,UAAU,GAAG,CAAC,CAAC;YACnB,IAAM,UAAU,GAAG,KAAK,EAAE,CAAC;YAE3B,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,SAAS,CAC7C,CAAC,eAAe,GAAG,wBAAwB,CACzC,UAAU,EAIV,UAAC,UAAU,IAAK,OAAA,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,EAA1G,CAA0G,EAC1H;gBAIE,eAAe,GAAG,IAAK,CAAC;gBACxB,aAAa,EAAE,CAAC;YAClB,CAAC,CACF,CAAC,CACH,CAAC;QACJ,CAAC,EACD;YACE,UAAU,GAAG,IAAI,CAAC;YAClB,aAAa,EAAE,CAAC;QAClB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/switchMapTo.js b/node_modules/rxjs/dist/esm5/internal/operators/switchMapTo.js deleted file mode 100644 index b4eeada..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/switchMapTo.js +++ /dev/null @@ -1,6 +0,0 @@ -import { switchMap } from './switchMap'; -import { isFunction } from '../util/isFunction'; -export function switchMapTo(innerObservable, resultSelector) { - return isFunction(resultSelector) ? switchMap(function () { return innerObservable; }, resultSelector) : switchMap(function () { return innerObservable; }); -} -//# sourceMappingURL=switchMapTo.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/switchMapTo.js.map b/node_modules/rxjs/dist/esm5/internal/operators/switchMapTo.js.map deleted file mode 100644 index 046d5a7..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/switchMapTo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"switchMapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchMapTo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAwDhD,MAAM,UAAU,WAAW,CACzB,eAAkB,EAClB,cAA6G;IAE7G,OAAO,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,CAAC,CAAC;AAC1H,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/switchScan.js b/node_modules/rxjs/dist/esm5/internal/operators/switchScan.js deleted file mode 100644 index 8b28312..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/switchScan.js +++ /dev/null @@ -1,12 +0,0 @@ -import { switchMap } from './switchMap'; -import { operate } from '../util/lift'; -export function switchScan(accumulator, seed) { - return operate(function (source, subscriber) { - var state = seed; - switchMap(function (value, index) { return accumulator(state, value, index); }, function (_, innerValue) { return ((state = innerValue), innerValue); })(source).subscribe(subscriber); - return function () { - state = null; - }; - }); -} -//# sourceMappingURL=switchScan.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/switchScan.js.map b/node_modules/rxjs/dist/esm5/internal/operators/switchScan.js.map deleted file mode 100644 index 31a4022..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/switchScan.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"switchScan.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchScan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAqBvC,MAAM,UAAU,UAAU,CACxB,WAAmD,EACnD,IAAO;IAEP,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAGhC,IAAI,KAAK,GAAG,IAAI,CAAC;QAKjB,SAAS,CAGP,UAAC,KAAQ,EAAE,KAAK,IAAK,OAAA,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAhC,CAAgC,EAGrD,UAAC,CAAC,EAAE,UAAU,IAAK,OAAA,CAAC,CAAC,KAAK,GAAG,UAAU,CAAC,EAAE,UAAU,CAAC,EAAlC,CAAkC,CACtD,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAEhC,OAAO;YAEL,KAAK,GAAG,IAAK,CAAC;QAChB,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/take.js b/node_modules/rxjs/dist/esm5/internal/operators/take.js deleted file mode 100644 index e2c24c0..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/take.js +++ /dev/null @@ -1,20 +0,0 @@ -import { EMPTY } from '../observable/empty'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function take(count) { - return count <= 0 - ? - function () { return EMPTY; } - : operate(function (source, subscriber) { - var seen = 0; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - if (++seen <= count) { - subscriber.next(value); - if (count <= seen) { - subscriber.complete(); - } - } - })); - }); -} -//# sourceMappingURL=take.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/take.js.map b/node_modules/rxjs/dist/esm5/internal/operators/take.js.map deleted file mode 100644 index fd2e22b..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/take.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"take.js","sourceRoot":"","sources":["../../../../src/internal/operators/take.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA4ChE,MAAM,UAAU,IAAI,CAAI,KAAa;IACnC,OAAO,KAAK,IAAI,CAAC;QACf,CAAC;YACC,cAAM,OAAA,KAAK,EAAL,CAAK;QACb,CAAC,CAAC,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YACzB,IAAI,IAAI,GAAG,CAAC,CAAC;YACb,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;gBAIzC,IAAI,EAAE,IAAI,IAAI,KAAK,EAAE;oBACnB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAIvB,IAAI,KAAK,IAAI,IAAI,EAAE;wBACjB,UAAU,CAAC,QAAQ,EAAE,CAAC;qBACvB;iBACF;YACH,CAAC,CAAC,CACH,CAAC;QACJ,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/takeLast.js b/node_modules/rxjs/dist/esm5/internal/operators/takeLast.js deleted file mode 100644 index 9de2aa3..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/takeLast.js +++ /dev/null @@ -1,34 +0,0 @@ -import { __values } from "tslib"; -import { EMPTY } from '../observable/empty'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function takeLast(count) { - return count <= 0 - ? function () { return EMPTY; } - : operate(function (source, subscriber) { - var buffer = []; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - buffer.push(value); - count < buffer.length && buffer.shift(); - }, function () { - var e_1, _a; - try { - for (var buffer_1 = __values(buffer), buffer_1_1 = buffer_1.next(); !buffer_1_1.done; buffer_1_1 = buffer_1.next()) { - var value = buffer_1_1.value; - subscriber.next(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (buffer_1_1 && !buffer_1_1.done && (_a = buffer_1.return)) _a.call(buffer_1); - } - finally { if (e_1) throw e_1.error; } - } - subscriber.complete(); - }, undefined, function () { - buffer = null; - })); - }); -} -//# sourceMappingURL=takeLast.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/takeLast.js.map b/node_modules/rxjs/dist/esm5/internal/operators/takeLast.js.map deleted file mode 100644 index 615173f..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/takeLast.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"takeLast.js","sourceRoot":"","sources":["../../../../src/internal/operators/takeLast.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAyChE,MAAM,UAAU,QAAQ,CAAI,KAAa;IACvC,OAAO,KAAK,IAAI,CAAC;QACf,CAAC,CAAC,cAAM,OAAA,KAAK,EAAL,CAAK;QACb,CAAC,CAAC,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;YAKzB,IAAI,MAAM,GAAQ,EAAE,CAAC;YACrB,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;gBAEJ,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAGnB,KAAK,GAAG,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;YAC1C,CAAC,EACD;;;oBAGE,KAAoB,IAAA,WAAA,SAAA,MAAM,CAAA,8BAAA,kDAAE;wBAAvB,IAAM,KAAK,mBAAA;wBACd,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;qBACxB;;;;;;;;;gBACD,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC,EAED,SAAS,EACT;gBAEE,MAAM,GAAG,IAAK,CAAC;YACjB,CAAC,CACF,CACF,CAAC;QACJ,CAAC,CAAC,CAAC;AACT,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js b/node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js deleted file mode 100644 index d9e3351..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js +++ /dev/null @@ -1,11 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; -import { noop } from '../util/noop'; -export function takeUntil(notifier) { - return operate(function (source, subscriber) { - innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, function () { return subscriber.complete(); }, noop)); - !subscriber.closed && source.subscribe(subscriber); - }); -} -//# sourceMappingURL=takeUntil.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js.map b/node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js.map deleted file mode 100644 index e8d8b65..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"takeUntil.js","sourceRoot":"","sources":["../../../../src/internal/operators/takeUntil.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAwCpC,MAAM,UAAU,SAAS,CAAI,QAA8B;IACzD,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,SAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,cAAM,OAAA,UAAU,CAAC,QAAQ,EAAE,EAArB,CAAqB,EAAE,IAAI,CAAC,CAAC,CAAC;QACvG,CAAC,UAAU,CAAC,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/takeWhile.js b/node_modules/rxjs/dist/esm5/internal/operators/takeWhile.js deleted file mode 100644 index 855c606..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/takeWhile.js +++ /dev/null @@ -1,14 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function takeWhile(predicate, inclusive) { - if (inclusive === void 0) { inclusive = false; } - return operate(function (source, subscriber) { - var index = 0; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var result = predicate(value, index++); - (result || inclusive) && subscriber.next(value); - !result && subscriber.complete(); - })); - }); -} -//# sourceMappingURL=takeWhile.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/takeWhile.js.map b/node_modules/rxjs/dist/esm5/internal/operators/takeWhile.js.map deleted file mode 100644 index e93b344..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/takeWhile.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"takeWhile.js","sourceRoot":"","sources":["../../../../src/internal/operators/takeWhile.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAoDhE,MAAM,UAAU,SAAS,CAAI,SAA+C,EAAE,SAAiB;IAAjB,0BAAA,EAAA,iBAAiB;IAC7F,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,IAAM,MAAM,GAAG,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;YACzC,CAAC,MAAM,IAAI,SAAS,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAChD,CAAC,MAAM,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACnC,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/tap.js b/node_modules/rxjs/dist/esm5/internal/operators/tap.js deleted file mode 100644 index 868735a..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/tap.js +++ /dev/null @@ -1,40 +0,0 @@ -import { isFunction } from '../util/isFunction'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { identity } from '../util/identity'; -export function tap(observerOrNext, error, complete) { - var tapObserver = isFunction(observerOrNext) || error || complete - ? - { next: observerOrNext, error: error, complete: complete } - : observerOrNext; - return tapObserver - ? operate(function (source, subscriber) { - var _a; - (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - var isUnsub = true; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var _a; - (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value); - subscriber.next(value); - }, function () { - var _a; - isUnsub = false; - (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - subscriber.complete(); - }, function (err) { - var _a; - isUnsub = false; - (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err); - subscriber.error(err); - }, function () { - var _a, _b; - if (isUnsub) { - (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver); - } - (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver); - })); - }) - : - identity; -} -//# sourceMappingURL=tap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/tap.js.map b/node_modules/rxjs/dist/esm5/internal/operators/tap.js.map deleted file mode 100644 index 6347038..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/tap.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tap.js","sourceRoot":"","sources":["../../../../src/internal/operators/tap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAkK5C,MAAM,UAAU,GAAG,CACjB,cAAsE,EACtE,KAAiC,EACjC,QAA8B;IAK9B,IAAM,WAAW,GACf,UAAU,CAAC,cAAc,CAAC,IAAI,KAAK,IAAI,QAAQ;QAC7C,CAAC;YACE,EAAE,IAAI,EAAE,cAAyE,EAAE,KAAK,OAAA,EAAE,QAAQ,UAAA,EAA8B;QACnI,CAAC,CAAC,cAAc,CAAC;IAErB,OAAO,WAAW;QAChB,CAAC,CAAC,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;;YACzB,MAAA,WAAW,CAAC,SAAS,+CAArB,WAAW,CAAc,CAAC;YAC1B,IAAI,OAAO,GAAG,IAAI,CAAC;YACnB,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;;gBACJ,MAAA,WAAW,CAAC,IAAI,+CAAhB,WAAW,EAAQ,KAAK,CAAC,CAAC;gBAC1B,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACzB,CAAC,EACD;;gBACE,OAAO,GAAG,KAAK,CAAC;gBAChB,MAAA,WAAW,CAAC,QAAQ,+CAApB,WAAW,CAAa,CAAC;gBACzB,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC,EACD,UAAC,GAAG;;gBACF,OAAO,GAAG,KAAK,CAAC;gBAChB,MAAA,WAAW,CAAC,KAAK,+CAAjB,WAAW,EAAS,GAAG,CAAC,CAAC;gBACzB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACxB,CAAC,EACD;;gBACE,IAAI,OAAO,EAAE;oBACX,MAAA,WAAW,CAAC,WAAW,+CAAvB,WAAW,CAAgB,CAAC;iBAC7B;gBACD,MAAA,WAAW,CAAC,QAAQ,+CAApB,WAAW,CAAa,CAAC;YAC3B,CAAC,CACF,CACF,CAAC;QACJ,CAAC,CAAC;QACJ,CAAC;YAGC,QAAQ,CAAC;AACf,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/throttle.js b/node_modules/rxjs/dist/esm5/internal/operators/throttle.js deleted file mode 100644 index 9fac6aa..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/throttle.js +++ /dev/null @@ -1,45 +0,0 @@ -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; -export function throttle(durationSelector, config) { - return operate(function (source, subscriber) { - var _a = config !== null && config !== void 0 ? config : {}, _b = _a.leading, leading = _b === void 0 ? true : _b, _c = _a.trailing, trailing = _c === void 0 ? false : _c; - var hasValue = false; - var sendValue = null; - var throttled = null; - var isComplete = false; - var endThrottling = function () { - throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe(); - throttled = null; - if (trailing) { - send(); - isComplete && subscriber.complete(); - } - }; - var cleanupThrottling = function () { - throttled = null; - isComplete && subscriber.complete(); - }; - var startThrottle = function (value) { - return (throttled = innerFrom(durationSelector(value)).subscribe(createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling))); - }; - var send = function () { - if (hasValue) { - hasValue = false; - var value = sendValue; - sendValue = null; - subscriber.next(value); - !isComplete && startThrottle(value); - } - }; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - hasValue = true; - sendValue = value; - !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value)); - }, function () { - isComplete = true; - !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete(); - })); - }); -} -//# sourceMappingURL=throttle.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/throttle.js.map b/node_modules/rxjs/dist/esm5/internal/operators/throttle.js.map deleted file mode 100644 index 66877b7..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/throttle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"throttle.js","sourceRoot":"","sources":["../../../../src/internal/operators/throttle.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA8EpD,MAAM,UAAU,QAAQ,CAAI,gBAAoD,EAAE,MAAuB;IACvG,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAC1B,IAAA,KAAuC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,EAAjD,eAAc,EAAd,OAAO,mBAAG,IAAI,KAAA,EAAE,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAiB,CAAC;QAC1D,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,SAAS,GAAa,IAAI,CAAC;QAC/B,IAAI,SAAS,GAAwB,IAAI,CAAC;QAC1C,IAAI,UAAU,GAAG,KAAK,CAAC;QAEvB,IAAM,aAAa,GAAG;YACpB,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,WAAW,EAAE,CAAC;YACzB,SAAS,GAAG,IAAI,CAAC;YACjB,IAAI,QAAQ,EAAE;gBACZ,IAAI,EAAE,CAAC;gBACP,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;aACrC;QACH,CAAC,CAAC;QAEF,IAAM,iBAAiB,GAAG;YACxB,SAAS,GAAG,IAAI,CAAC;YACjB,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACtC,CAAC,CAAC;QAEF,IAAM,aAAa,GAAG,UAAC,KAAQ;YAC7B,OAAA,CAAC,SAAS,GAAG,SAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,aAAa,EAAE,iBAAiB,CAAC,CAAC,CAAC;QAAlI,CAAkI,CAAC;QAErI,IAAM,IAAI,GAAG;YACX,IAAI,QAAQ,EAAE;gBAIZ,QAAQ,GAAG,KAAK,CAAC;gBACjB,IAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBAEjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,CAAC,UAAU,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC;aACrC;QACH,CAAC,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EAMV,UAAC,KAAK;YACJ,QAAQ,GAAG,IAAI,CAAC;YAChB,SAAS,GAAG,KAAK,CAAC;YAClB,CAAC,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;QACjF,CAAC,EACD;YACE,UAAU,GAAG,IAAI,CAAC;YAClB,CAAC,CAAC,QAAQ,IAAI,QAAQ,IAAI,SAAS,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACrF,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/throttleTime.js b/node_modules/rxjs/dist/esm5/internal/operators/throttleTime.js deleted file mode 100644 index 95b0a39..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/throttleTime.js +++ /dev/null @@ -1,9 +0,0 @@ -import { asyncScheduler } from '../scheduler/async'; -import { throttle } from './throttle'; -import { timer } from '../observable/timer'; -export function throttleTime(duration, scheduler, config) { - if (scheduler === void 0) { scheduler = asyncScheduler; } - var duration$ = timer(duration, scheduler); - return throttle(function () { return duration$; }, config); -} -//# sourceMappingURL=throttleTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/throttleTime.js.map b/node_modules/rxjs/dist/esm5/internal/operators/throttleTime.js.map deleted file mode 100644 index c5b9cda..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/throttleTime.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"throttleTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/throttleTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAkB,MAAM,YAAY,CAAC;AAEtD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAmD5C,MAAM,UAAU,YAAY,CAC1B,QAAgB,EAChB,SAAyC,EACzC,MAAuB;IADvB,0BAAA,EAAA,0BAAyC;IAGzC,IAAM,SAAS,GAAG,KAAK,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC7C,OAAO,QAAQ,CAAC,cAAM,OAAA,SAAS,EAAT,CAAS,EAAE,MAAM,CAAC,CAAC;AAC3C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js b/node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js deleted file mode 100644 index e3179a3..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js +++ /dev/null @@ -1,17 +0,0 @@ -import { EmptyError } from '../util/EmptyError'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function throwIfEmpty(errorFactory) { - if (errorFactory === void 0) { errorFactory = defaultErrorFactory; } - return operate(function (source, subscriber) { - var hasValue = false; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - hasValue = true; - subscriber.next(value); - }, function () { return (hasValue ? subscriber.complete() : subscriber.error(errorFactory())); })); - }); -} -function defaultErrorFactory() { - return new EmptyError(); -} -//# sourceMappingURL=throwIfEmpty.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js.map b/node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js.map deleted file mode 100644 index 724b008..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/throwIfEmpty.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"throwIfEmpty.js","sourceRoot":"","sources":["../../../../src/internal/operators/throwIfEmpty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAsChE,MAAM,UAAU,YAAY,CAAI,YAA6C;IAA7C,6BAAA,EAAA,kCAA6C;IAC3E,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;YACJ,QAAQ,GAAG,IAAI,CAAC;YAChB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC,EACD,cAAM,OAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,EAArE,CAAqE,CAC5E,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,mBAAmB;IAC1B,OAAO,IAAI,UAAU,EAAE,CAAC;AAC1B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/timeInterval.js b/node_modules/rxjs/dist/esm5/internal/operators/timeInterval.js deleted file mode 100644 index a0f655e..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/timeInterval.js +++ /dev/null @@ -1,24 +0,0 @@ -import { asyncScheduler } from '../scheduler/async'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function timeInterval(scheduler) { - if (scheduler === void 0) { scheduler = asyncScheduler; } - return operate(function (source, subscriber) { - var last = scheduler.now(); - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var now = scheduler.now(); - var interval = now - last; - last = now; - subscriber.next(new TimeInterval(value, interval)); - })); - }); -} -var TimeInterval = (function () { - function TimeInterval(value, interval) { - this.value = value; - this.interval = interval; - } - return TimeInterval; -}()); -export { TimeInterval }; -//# sourceMappingURL=timeInterval.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/timeInterval.js.map b/node_modules/rxjs/dist/esm5/internal/operators/timeInterval.js.map deleted file mode 100644 index 40f9179..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/timeInterval.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timeInterval.js","sourceRoot":"","sources":["../../../../src/internal/operators/timeInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAyChE,MAAM,UAAU,YAAY,CAAI,SAAyC;IAAzC,0BAAA,EAAA,0BAAyC;IACvE,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,IAAI,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;QAC3B,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,IAAM,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;YAC5B,IAAM,QAAQ,GAAG,GAAG,GAAG,IAAI,CAAC;YAC5B,IAAI,GAAG,GAAG,CAAC;YACX,UAAU,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;QACrD,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAKD;IAIE,sBAAmB,KAAQ,EAAS,QAAgB;QAAjC,UAAK,GAAL,KAAK,CAAG;QAAS,aAAQ,GAAR,QAAQ,CAAQ;IAAG,CAAC;IAC1D,mBAAC;AAAD,CAAC,AALD,IAKC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/timeout.js b/node_modules/rxjs/dist/esm5/internal/operators/timeout.js deleted file mode 100644 index e508e02..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/timeout.js +++ /dev/null @@ -1,59 +0,0 @@ -import { asyncScheduler } from '../scheduler/async'; -import { isValidDate } from '../util/isDate'; -import { operate } from '../util/lift'; -import { innerFrom } from '../observable/innerFrom'; -import { createErrorClass } from '../util/createErrorClass'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { executeSchedule } from '../util/executeSchedule'; -export var TimeoutError = createErrorClass(function (_super) { - return function TimeoutErrorImpl(info) { - if (info === void 0) { info = null; } - _super(this); - this.message = 'Timeout has occurred'; - this.name = 'TimeoutError'; - this.info = info; - }; -}); -export function timeout(config, schedulerArg) { - var _a = (isValidDate(config) ? { first: config } : typeof config === 'number' ? { each: config } : config), first = _a.first, each = _a.each, _b = _a.with, _with = _b === void 0 ? timeoutErrorFactory : _b, _c = _a.scheduler, scheduler = _c === void 0 ? schedulerArg !== null && schedulerArg !== void 0 ? schedulerArg : asyncScheduler : _c, _d = _a.meta, meta = _d === void 0 ? null : _d; - if (first == null && each == null) { - throw new TypeError('No timeout provided.'); - } - return operate(function (source, subscriber) { - var originalSourceSubscription; - var timerSubscription; - var lastValue = null; - var seen = 0; - var startTimer = function (delay) { - timerSubscription = executeSchedule(subscriber, scheduler, function () { - try { - originalSourceSubscription.unsubscribe(); - innerFrom(_with({ - meta: meta, - lastValue: lastValue, - seen: seen, - })).subscribe(subscriber); - } - catch (err) { - subscriber.error(err); - } - }, delay); - }; - originalSourceSubscription = source.subscribe(createOperatorSubscriber(subscriber, function (value) { - timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); - seen++; - subscriber.next((lastValue = value)); - each > 0 && startTimer(each); - }, undefined, undefined, function () { - if (!(timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.closed)) { - timerSubscription === null || timerSubscription === void 0 ? void 0 : timerSubscription.unsubscribe(); - } - lastValue = null; - })); - !seen && startTimer(first != null ? (typeof first === 'number' ? first : +first - scheduler.now()) : each); - }); -} -function timeoutErrorFactory(info) { - throw new TimeoutError(info); -} -//# sourceMappingURL=timeout.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/timeout.js.map b/node_modules/rxjs/dist/esm5/internal/operators/timeout.js.map deleted file mode 100644 index b880f04..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/timeout.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timeout.js","sourceRoot":"","sources":["../../../../src/internal/operators/timeout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AA4E1D,MAAM,CAAC,IAAM,YAAY,GAAqB,gBAAgB,CAC5D,UAAC,MAAM;IACL,OAAA,SAAS,gBAAgB,CAAY,IAAoC;QAApC,qBAAA,EAAA,WAAoC;QACvE,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,OAAO,GAAG,sBAAsB,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;AALD,CAKC,CACJ,CAAC;AA6MF,MAAM,UAAU,OAAO,CACrB,MAA8C,EAC9C,YAA4B;IAStB,IAAA,KAMF,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,CAA2B,EAL9H,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,YAAiC,EAA3B,KAAK,mBAAG,mBAAmB,KAAA,EACjC,iBAA0C,EAA1C,SAAS,mBAAG,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,cAAc,KAAA,EAC1C,YAAY,EAAZ,IAAI,mBAAG,IAAK,KACkH,CAAC;IAEjI,IAAI,KAAK,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE;QAEjC,MAAM,IAAI,SAAS,CAAC,sBAAsB,CAAC,CAAC;KAC7C;IAED,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAMhC,IAAI,0BAAwC,CAAC;QAG7C,IAAI,iBAA+B,CAAC;QAGpC,IAAI,SAAS,GAAa,IAAI,CAAC;QAG/B,IAAI,IAAI,GAAG,CAAC,CAAC;QACb,IAAM,UAAU,GAAG,UAAC,KAAa;YAC/B,iBAAiB,GAAG,eAAe,CACjC,UAAU,EACV,SAAS,EACT;gBACE,IAAI;oBACF,0BAA0B,CAAC,WAAW,EAAE,CAAC;oBACzC,SAAS,CACP,KAAM,CAAC;wBACL,IAAI,MAAA;wBACJ,SAAS,WAAA;wBACT,IAAI,MAAA;qBACL,CAAC,CACH,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;iBACzB;gBAAC,OAAO,GAAG,EAAE;oBACZ,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACvB;YACH,CAAC,EACD,KAAK,CACN,CAAC;QACJ,CAAC,CAAC;QAEF,0BAA0B,GAAG,MAAM,CAAC,SAAS,CAC3C,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAQ;YAEP,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,WAAW,EAAE,CAAC;YACjC,IAAI,EAAE,CAAC;YAEP,UAAU,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC;YAErC,IAAK,GAAG,CAAC,IAAI,UAAU,CAAC,IAAK,CAAC,CAAC;QACjC,CAAC,EACD,SAAS,EACT,SAAS,EACT;YACE,IAAI,CAAC,CAAA,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,MAAM,CAAA,EAAE;gBAC9B,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,WAAW,EAAE,CAAC;aAClC;YAGD,SAAS,GAAG,IAAI,CAAC;QACnB,CAAC,CACF,CACF,CAAC;QAQF,CAAC,IAAI,IAAI,UAAU,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,SAAU,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,IAAK,CAAC,CAAC;IAC/G,CAAC,CAAC,CAAC;AACL,CAAC;AAOD,SAAS,mBAAmB,CAAC,IAAsB;IACjD,MAAM,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/timeoutWith.js b/node_modules/rxjs/dist/esm5/internal/operators/timeoutWith.js deleted file mode 100644 index de633b6..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/timeoutWith.js +++ /dev/null @@ -1,31 +0,0 @@ -import { async } from '../scheduler/async'; -import { isValidDate } from '../util/isDate'; -import { timeout } from './timeout'; -export function timeoutWith(due, withObservable, scheduler) { - var first; - var each; - var _with; - scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : async; - if (isValidDate(due)) { - first = due; - } - else if (typeof due === 'number') { - each = due; - } - if (withObservable) { - _with = function () { return withObservable; }; - } - else { - throw new TypeError('No observable provided to switch to'); - } - if (first == null && each == null) { - throw new TypeError('No timeout provided.'); - } - return timeout({ - first: first, - each: each, - scheduler: scheduler, - with: _with, - }); -} -//# sourceMappingURL=timeoutWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/timeoutWith.js.map b/node_modules/rxjs/dist/esm5/internal/operators/timeoutWith.js.map deleted file mode 100644 index fff73ca..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/timeoutWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timeoutWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/timeoutWith.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+EpC,MAAM,UAAU,WAAW,CACzB,GAAkB,EAClB,cAAkC,EAClC,SAAyB;IAEzB,IAAI,KAAgC,CAAC;IACrC,IAAI,IAAwB,CAAC;IAC7B,IAAI,KAA+B,CAAC;IACpC,SAAS,GAAG,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,KAAK,CAAC;IAE/B,IAAI,WAAW,CAAC,GAAG,CAAC,EAAE;QACpB,KAAK,GAAG,GAAG,CAAC;KACb;SAAM,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QAClC,IAAI,GAAG,GAAG,CAAC;KACZ;IAED,IAAI,cAAc,EAAE;QAClB,KAAK,GAAG,cAAM,OAAA,cAAc,EAAd,CAAc,CAAC;KAC9B;SAAM;QACL,MAAM,IAAI,SAAS,CAAC,qCAAqC,CAAC,CAAC;KAC5D;IAED,IAAI,KAAK,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE;QAEjC,MAAM,IAAI,SAAS,CAAC,sBAAsB,CAAC,CAAC;KAC7C;IAED,OAAO,OAAO,CAAwB;QACpC,KAAK,OAAA;QACL,IAAI,MAAA;QACJ,SAAS,WAAA;QACT,IAAI,EAAE,KAAK;KACZ,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/timestamp.js b/node_modules/rxjs/dist/esm5/internal/operators/timestamp.js deleted file mode 100644 index 413265e..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/timestamp.js +++ /dev/null @@ -1,7 +0,0 @@ -import { dateTimestampProvider } from '../scheduler/dateTimestampProvider'; -import { map } from './map'; -export function timestamp(timestampProvider) { - if (timestampProvider === void 0) { timestampProvider = dateTimestampProvider; } - return map(function (value) { return ({ value: value, timestamp: timestampProvider.now() }); }); -} -//# sourceMappingURL=timestamp.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/timestamp.js.map b/node_modules/rxjs/dist/esm5/internal/operators/timestamp.js.map deleted file mode 100644 index 7dde5f0..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/timestamp.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timestamp.js","sourceRoot":"","sources":["../../../../src/internal/operators/timestamp.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAkC5B,MAAM,UAAU,SAAS,CAAI,iBAA4D;IAA5D,kCAAA,EAAA,yCAA4D;IACvF,OAAO,GAAG,CAAC,UAAC,KAAQ,IAAK,OAAA,CAAC,EAAE,KAAK,OAAA,EAAE,SAAS,EAAE,iBAAiB,CAAC,GAAG,EAAE,EAAE,CAAC,EAA/C,CAA+C,CAAC,CAAC;AAC5E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/toArray.js b/node_modules/rxjs/dist/esm5/internal/operators/toArray.js deleted file mode 100644 index 5f7855d..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/toArray.js +++ /dev/null @@ -1,9 +0,0 @@ -import { reduce } from './reduce'; -import { operate } from '../util/lift'; -var arrReducer = function (arr, value) { return (arr.push(value), arr); }; -export function toArray() { - return operate(function (source, subscriber) { - reduce(arrReducer, [])(source).subscribe(subscriber); - }); -} -//# sourceMappingURL=toArray.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/toArray.js.map b/node_modules/rxjs/dist/esm5/internal/operators/toArray.js.map deleted file mode 100644 index a1e2224..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/toArray.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"toArray.js","sourceRoot":"","sources":["../../../../src/internal/operators/toArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,IAAM,UAAU,GAAG,UAAC,GAAU,EAAE,KAAU,IAAK,OAAA,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,EAAtB,CAAsB,CAAC;AAgCtE,MAAM,UAAU,OAAO;IAIrB,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,MAAM,CAAC,UAAU,EAAE,EAAS,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/window.js b/node_modules/rxjs/dist/esm5/internal/operators/window.js deleted file mode 100644 index 657c944..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/window.js +++ /dev/null @@ -1,28 +0,0 @@ -import { Subject } from '../Subject'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { noop } from '../util/noop'; -import { innerFrom } from '../observable/innerFrom'; -export function window(windowBoundaries) { - return operate(function (source, subscriber) { - var windowSubject = new Subject(); - subscriber.next(windowSubject.asObservable()); - var errorHandler = function (err) { - windowSubject.error(err); - subscriber.error(err); - }; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { return windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.next(value); }, function () { - windowSubject.complete(); - subscriber.complete(); - }, errorHandler)); - innerFrom(windowBoundaries).subscribe(createOperatorSubscriber(subscriber, function () { - windowSubject.complete(); - subscriber.next((windowSubject = new Subject())); - }, noop, errorHandler)); - return function () { - windowSubject === null || windowSubject === void 0 ? void 0 : windowSubject.unsubscribe(); - windowSubject = null; - }; - }); -} -//# sourceMappingURL=window.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/window.js.map b/node_modules/rxjs/dist/esm5/internal/operators/window.js.map deleted file mode 100644 index 52e6e34..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/window.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"window.js","sourceRoot":"","sources":["../../../../src/internal/operators/window.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA8CpD,MAAM,UAAU,MAAM,CAAI,gBAAsC;IAC9D,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,aAAa,GAAe,IAAI,OAAO,EAAK,CAAC;QAEjD,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC,CAAC;QAE9C,IAAM,YAAY,GAAG,UAAC,GAAQ;YAC5B,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACzB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,CAAC;QAGF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK,IAAK,OAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,IAAI,CAAC,KAAK,CAAC,EAA1B,CAA0B,EACrC;YACE,aAAa,CAAC,QAAQ,EAAE,CAAC;YACzB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,YAAY,CACb,CACF,CAAC;QAGF,SAAS,CAAC,gBAAgB,CAAC,CAAC,SAAS,CACnC,wBAAwB,CACtB,UAAU,EACV;YACE,aAAa,CAAC,QAAQ,EAAE,CAAC;YACzB,UAAU,CAAC,IAAI,CAAC,CAAC,aAAa,GAAG,IAAI,OAAO,EAAE,CAAC,CAAC,CAAC;QACnD,CAAC,EACD,IAAI,EACJ,YAAY,CACb,CACF,CAAC;QAEF,OAAO;YAIL,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,WAAW,EAAE,CAAC;YAC7B,aAAa,GAAG,IAAK,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/windowCount.js b/node_modules/rxjs/dist/esm5/internal/operators/windowCount.js deleted file mode 100644 index e10cd4a..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/windowCount.js +++ /dev/null @@ -1,53 +0,0 @@ -import { __values } from "tslib"; -import { Subject } from '../Subject'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -export function windowCount(windowSize, startWindowEvery) { - if (startWindowEvery === void 0) { startWindowEvery = 0; } - var startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize; - return operate(function (source, subscriber) { - var windows = [new Subject()]; - var starts = []; - var count = 0; - subscriber.next(windows[0].asObservable()); - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var e_1, _a; - try { - for (var windows_1 = __values(windows), windows_1_1 = windows_1.next(); !windows_1_1.done; windows_1_1 = windows_1.next()) { - var window_1 = windows_1_1.value; - window_1.next(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (windows_1_1 && !windows_1_1.done && (_a = windows_1.return)) _a.call(windows_1); - } - finally { if (e_1) throw e_1.error; } - } - var c = count - windowSize + 1; - if (c >= 0 && c % startEvery === 0) { - windows.shift().complete(); - } - if (++count % startEvery === 0) { - var window_2 = new Subject(); - windows.push(window_2); - subscriber.next(window_2.asObservable()); - } - }, function () { - while (windows.length > 0) { - windows.shift().complete(); - } - subscriber.complete(); - }, function (err) { - while (windows.length > 0) { - windows.shift().error(err); - } - subscriber.error(err); - }, function () { - starts = null; - windows = null; - })); - }); -} -//# sourceMappingURL=windowCount.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/windowCount.js.map b/node_modules/rxjs/dist/esm5/internal/operators/windowCount.js.map deleted file mode 100644 index 0c3dec0..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/windowCount.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"windowCount.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowCount.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA+DhE,MAAM,UAAU,WAAW,CAAI,UAAkB,EAAE,gBAA4B;IAA5B,iCAAA,EAAA,oBAA4B;IAC7E,IAAM,UAAU,GAAG,gBAAgB,GAAG,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,UAAU,CAAC;IAExE,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,OAAO,GAAG,CAAC,IAAI,OAAO,EAAK,CAAC,CAAC;QACjC,IAAI,MAAM,GAAa,EAAE,CAAC;QAC1B,IAAI,KAAK,GAAG,CAAC,CAAC;QAGd,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC;QAE3C,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAQ;;;gBAIP,KAAqB,IAAA,YAAA,SAAA,OAAO,CAAA,gCAAA,qDAAE;oBAAzB,IAAM,QAAM,oBAAA;oBACf,QAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBACpB;;;;;;;;;YAMD,IAAM,CAAC,GAAG,KAAK,GAAG,UAAU,GAAG,CAAC,CAAC;YACjC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,UAAU,KAAK,CAAC,EAAE;gBAClC,OAAO,CAAC,KAAK,EAAG,CAAC,QAAQ,EAAE,CAAC;aAC7B;YAOD,IAAI,EAAE,KAAK,GAAG,UAAU,KAAK,CAAC,EAAE;gBAC9B,IAAM,QAAM,GAAG,IAAI,OAAO,EAAK,CAAC;gBAChC,OAAO,CAAC,IAAI,CAAC,QAAM,CAAC,CAAC;gBACrB,UAAU,CAAC,IAAI,CAAC,QAAM,CAAC,YAAY,EAAE,CAAC,CAAC;aACxC;QACH,CAAC,EACD;YACE,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,QAAQ,EAAE,CAAC;aAC7B;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,UAAC,GAAG;YACF,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aAC7B;YACD,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,EACD;YACE,MAAM,GAAG,IAAK,CAAC;YACf,OAAO,GAAG,IAAK,CAAC;QAClB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/windowTime.js b/node_modules/rxjs/dist/esm5/internal/operators/windowTime.js deleted file mode 100644 index 6c16342..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/windowTime.js +++ /dev/null @@ -1,70 +0,0 @@ -import { Subject } from '../Subject'; -import { asyncScheduler } from '../scheduler/async'; -import { Subscription } from '../Subscription'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { arrRemove } from '../util/arrRemove'; -import { popScheduler } from '../util/args'; -import { executeSchedule } from '../util/executeSchedule'; -export function windowTime(windowTimeSpan) { - var _a, _b; - var otherArgs = []; - for (var _i = 1; _i < arguments.length; _i++) { - otherArgs[_i - 1] = arguments[_i]; - } - var scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler; - var windowCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null; - var maxWindowSize = otherArgs[1] || Infinity; - return operate(function (source, subscriber) { - var windowRecords = []; - var restartOnClose = false; - var closeWindow = function (record) { - var window = record.window, subs = record.subs; - window.complete(); - subs.unsubscribe(); - arrRemove(windowRecords, record); - restartOnClose && startWindow(); - }; - var startWindow = function () { - if (windowRecords) { - var subs = new Subscription(); - subscriber.add(subs); - var window_1 = new Subject(); - var record_1 = { - window: window_1, - subs: subs, - seen: 0, - }; - windowRecords.push(record_1); - subscriber.next(window_1.asObservable()); - executeSchedule(subs, scheduler, function () { return closeWindow(record_1); }, windowTimeSpan); - } - }; - if (windowCreationInterval !== null && windowCreationInterval >= 0) { - executeSchedule(subscriber, scheduler, startWindow, windowCreationInterval, true); - } - else { - restartOnClose = true; - } - startWindow(); - var loop = function (cb) { return windowRecords.slice().forEach(cb); }; - var terminate = function (cb) { - loop(function (_a) { - var window = _a.window; - return cb(window); - }); - cb(subscriber); - subscriber.unsubscribe(); - }; - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - loop(function (record) { - record.window.next(value); - maxWindowSize <= ++record.seen && closeWindow(record); - }); - }, function () { return terminate(function (consumer) { return consumer.complete(); }); }, function (err) { return terminate(function (consumer) { return consumer.error(err); }); })); - return function () { - windowRecords = null; - }; - }); -} -//# sourceMappingURL=windowTime.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/windowTime.js.map b/node_modules/rxjs/dist/esm5/internal/operators/windowTime.js.map deleted file mode 100644 index 484ab83..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/windowTime.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"windowTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAgG1D,MAAM,UAAU,UAAU,CAAI,cAAsB;;IAAE,mBAAmB;SAAnB,UAAmB,EAAnB,qBAAmB,EAAnB,IAAmB;QAAnB,kCAAmB;;IACvE,IAAM,SAAS,GAAG,MAAA,YAAY,CAAC,SAAS,CAAC,mCAAI,cAAc,CAAC;IAC5D,IAAM,sBAAsB,GAAG,MAAC,SAAS,CAAC,CAAC,CAAY,mCAAI,IAAI,CAAC;IAChE,IAAM,aAAa,GAAI,SAAS,CAAC,CAAC,CAAY,IAAI,QAAQ,CAAC;IAE3D,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,aAAa,GAA6B,EAAE,CAAC;QAGjD,IAAI,cAAc,GAAG,KAAK,CAAC;QAE3B,IAAM,WAAW,GAAG,UAAC,MAAkD;YAC7D,IAAA,MAAM,GAAW,MAAM,OAAjB,EAAE,IAAI,GAAK,MAAM,KAAX,CAAY;YAChC,MAAM,CAAC,QAAQ,EAAE,CAAC;YAClB,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;YACjC,cAAc,IAAI,WAAW,EAAE,CAAC;QAClC,CAAC,CAAC;QAMF,IAAM,WAAW,GAAG;YAClB,IAAI,aAAa,EAAE;gBACjB,IAAM,IAAI,GAAG,IAAI,YAAY,EAAE,CAAC;gBAChC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBACrB,IAAM,QAAM,GAAG,IAAI,OAAO,EAAK,CAAC;gBAChC,IAAM,QAAM,GAAG;oBACb,MAAM,UAAA;oBACN,IAAI,MAAA;oBACJ,IAAI,EAAE,CAAC;iBACR,CAAC;gBACF,aAAa,CAAC,IAAI,CAAC,QAAM,CAAC,CAAC;gBAC3B,UAAU,CAAC,IAAI,CAAC,QAAM,CAAC,YAAY,EAAE,CAAC,CAAC;gBACvC,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,cAAM,OAAA,WAAW,CAAC,QAAM,CAAC,EAAnB,CAAmB,EAAE,cAAc,CAAC,CAAC;aAC7E;QACH,CAAC,CAAC;QAEF,IAAI,sBAAsB,KAAK,IAAI,IAAI,sBAAsB,IAAI,CAAC,EAAE;YAIlE,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,sBAAsB,EAAE,IAAI,CAAC,CAAC;SACnF;aAAM;YACL,cAAc,GAAG,IAAI,CAAC;SACvB;QAED,WAAW,EAAE,CAAC;QAQd,IAAM,IAAI,GAAG,UAAC,EAAqC,IAAK,OAAA,aAAc,CAAC,KAAK,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,EAAlC,CAAkC,CAAC;QAM3F,IAAM,SAAS,GAAG,UAAC,EAAqC;YACtD,IAAI,CAAC,UAAC,EAAU;oBAAR,MAAM,YAAA;gBAAO,OAAA,EAAE,CAAC,MAAM,CAAC;YAAV,CAAU,CAAC,CAAC;YACjC,EAAE,CAAC,UAAU,CAAC,CAAC;YACf,UAAU,CAAC,WAAW,EAAE,CAAC;QAC3B,CAAC,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAQ;YAEP,IAAI,CAAC,UAAC,MAAM;gBACV,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAE1B,aAAa,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;YACxD,CAAC,CAAC,CAAC;QACL,CAAC,EAED,cAAM,OAAA,SAAS,CAAC,UAAC,QAAQ,IAAK,OAAA,QAAQ,CAAC,QAAQ,EAAE,EAAnB,CAAmB,CAAC,EAA5C,CAA4C,EAElD,UAAC,GAAG,IAAK,OAAA,SAAS,CAAC,UAAC,QAAQ,IAAK,OAAA,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,EAAnB,CAAmB,CAAC,EAA5C,CAA4C,CACtD,CACF,CAAC;QAKF,OAAO;YAEL,aAAa,GAAG,IAAK,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/windowToggle.js b/node_modules/rxjs/dist/esm5/internal/operators/windowToggle.js deleted file mode 100644 index 43ad335..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/windowToggle.js +++ /dev/null @@ -1,66 +0,0 @@ -import { __values } from "tslib"; -import { Subject } from '../Subject'; -import { Subscription } from '../Subscription'; -import { operate } from '../util/lift'; -import { innerFrom } from '../observable/innerFrom'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { noop } from '../util/noop'; -import { arrRemove } from '../util/arrRemove'; -export function windowToggle(openings, closingSelector) { - return operate(function (source, subscriber) { - var windows = []; - var handleError = function (err) { - while (0 < windows.length) { - windows.shift().error(err); - } - subscriber.error(err); - }; - innerFrom(openings).subscribe(createOperatorSubscriber(subscriber, function (openValue) { - var window = new Subject(); - windows.push(window); - var closingSubscription = new Subscription(); - var closeWindow = function () { - arrRemove(windows, window); - window.complete(); - closingSubscription.unsubscribe(); - }; - var closingNotifier; - try { - closingNotifier = innerFrom(closingSelector(openValue)); - } - catch (err) { - handleError(err); - return; - } - subscriber.next(window.asObservable()); - closingSubscription.add(closingNotifier.subscribe(createOperatorSubscriber(subscriber, closeWindow, noop, handleError))); - }, noop)); - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - var e_1, _a; - var windowsCopy = windows.slice(); - try { - for (var windowsCopy_1 = __values(windowsCopy), windowsCopy_1_1 = windowsCopy_1.next(); !windowsCopy_1_1.done; windowsCopy_1_1 = windowsCopy_1.next()) { - var window_1 = windowsCopy_1_1.value; - window_1.next(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (windowsCopy_1_1 && !windowsCopy_1_1.done && (_a = windowsCopy_1.return)) _a.call(windowsCopy_1); - } - finally { if (e_1) throw e_1.error; } - } - }, function () { - while (0 < windows.length) { - windows.shift().complete(); - } - subscriber.complete(); - }, handleError, function () { - while (0 < windows.length) { - windows.shift().unsubscribe(); - } - })); - }); -} -//# sourceMappingURL=windowToggle.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/windowToggle.js.map b/node_modules/rxjs/dist/esm5/internal/operators/windowToggle.js.map deleted file mode 100644 index 7b718ec..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/windowToggle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"windowToggle.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowToggle.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AA+C9C,MAAM,UAAU,YAAY,CAC1B,QAA4B,EAC5B,eAAuD;IAEvD,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAM,OAAO,GAAiB,EAAE,CAAC;QAEjC,IAAM,WAAW,GAAG,UAAC,GAAQ;YAC3B,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aAC7B;YACD,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,CAAC;QAEF,SAAS,CAAC,QAAQ,CAAC,CAAC,SAAS,CAC3B,wBAAwB,CACtB,UAAU,EACV,UAAC,SAAS;YACR,IAAM,MAAM,GAAG,IAAI,OAAO,EAAK,CAAC;YAChC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACrB,IAAM,mBAAmB,GAAG,IAAI,YAAY,EAAE,CAAC;YAC/C,IAAM,WAAW,GAAG;gBAClB,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;gBAC3B,MAAM,CAAC,QAAQ,EAAE,CAAC;gBAClB,mBAAmB,CAAC,WAAW,EAAE,CAAC;YACpC,CAAC,CAAC;YAEF,IAAI,eAAgC,CAAC;YACrC,IAAI;gBACF,eAAe,GAAG,SAAS,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC;aACzD;YAAC,OAAO,GAAG,EAAE;gBACZ,WAAW,CAAC,GAAG,CAAC,CAAC;gBACjB,OAAO;aACR;YAED,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;YAEvC,mBAAmB,CAAC,GAAG,CAAC,eAAe,CAAC,SAAS,CAAC,wBAAwB,CAAC,UAAU,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;QAC3H,CAAC,EACD,IAAI,CACL,CACF,CAAC;QAGF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAQ;;YAGP,IAAM,WAAW,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;;gBACpC,KAAqB,IAAA,gBAAA,SAAA,WAAW,CAAA,wCAAA,iEAAE;oBAA7B,IAAM,QAAM,wBAAA;oBACf,QAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBACpB;;;;;;;;;QACH,CAAC,EACD;YAEE,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,QAAQ,EAAE,CAAC;aAC7B;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,WAAW,EACX;YAME,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,WAAW,EAAE,CAAC;aAChC;QACH,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/windowWhen.js b/node_modules/rxjs/dist/esm5/internal/operators/windowWhen.js deleted file mode 100644 index a078bb2..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/windowWhen.js +++ /dev/null @@ -1,38 +0,0 @@ -import { Subject } from '../Subject'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; -export function windowWhen(closingSelector) { - return operate(function (source, subscriber) { - var window; - var closingSubscriber; - var handleError = function (err) { - window.error(err); - subscriber.error(err); - }; - var openWindow = function () { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); - window === null || window === void 0 ? void 0 : window.complete(); - window = new Subject(); - subscriber.next(window.asObservable()); - var closingNotifier; - try { - closingNotifier = innerFrom(closingSelector()); - } - catch (err) { - handleError(err); - return; - } - closingNotifier.subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openWindow, openWindow, handleError))); - }; - openWindow(); - source.subscribe(createOperatorSubscriber(subscriber, function (value) { return window.next(value); }, function () { - window.complete(); - subscriber.complete(); - }, handleError, function () { - closingSubscriber === null || closingSubscriber === void 0 ? void 0 : closingSubscriber.unsubscribe(); - window = null; - })); - }); -} -//# sourceMappingURL=windowWhen.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/windowWhen.js.map b/node_modules/rxjs/dist/esm5/internal/operators/windowWhen.js.map deleted file mode 100644 index 1452637..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/windowWhen.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"windowWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowWhen.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AA+CpD,MAAM,UAAU,UAAU,CAAI,eAA2C;IACvE,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,MAAyB,CAAC;QAC9B,IAAI,iBAA8C,CAAC;QAMnD,IAAM,WAAW,GAAG,UAAC,GAAQ;YAC3B,MAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACnB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,CAAC;QAQF,IAAM,UAAU,GAAG;YAGjB,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,WAAW,EAAE,CAAC;YAGjC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,EAAE,CAAC;YAGnB,MAAM,GAAG,IAAI,OAAO,EAAK,CAAC;YAC1B,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;YAGvC,IAAI,eAAgC,CAAC;YACrC,IAAI;gBACF,eAAe,GAAG,SAAS,CAAC,eAAe,EAAE,CAAC,CAAC;aAChD;YAAC,OAAO,GAAG,EAAE;gBACZ,WAAW,CAAC,GAAG,CAAC,CAAC;gBACjB,OAAO;aACR;YAMD,eAAe,CAAC,SAAS,CAAC,CAAC,iBAAiB,GAAG,wBAAwB,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;QAC7H,CAAC,CAAC;QAGF,UAAU,EAAE,CAAC;QAGb,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK,IAAK,OAAA,MAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAnB,CAAmB,EAC9B;YAEE,MAAO,CAAC,QAAQ,EAAE,CAAC;YACnB,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,WAAW,EACX;YAGE,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,WAAW,EAAE,CAAC;YACjC,MAAM,GAAG,IAAK,CAAC;QACjB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/withLatestFrom.js b/node_modules/rxjs/dist/esm5/internal/operators/withLatestFrom.js deleted file mode 100644 index 6240899..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/withLatestFrom.js +++ /dev/null @@ -1,39 +0,0 @@ -import { __read, __spreadArray } from "tslib"; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; -import { identity } from '../util/identity'; -import { noop } from '../util/noop'; -import { popResultSelector } from '../util/args'; -export function withLatestFrom() { - var inputs = []; - for (var _i = 0; _i < arguments.length; _i++) { - inputs[_i] = arguments[_i]; - } - var project = popResultSelector(inputs); - return operate(function (source, subscriber) { - var len = inputs.length; - var otherValues = new Array(len); - var hasValue = inputs.map(function () { return false; }); - var ready = false; - var _loop_1 = function (i) { - innerFrom(inputs[i]).subscribe(createOperatorSubscriber(subscriber, function (value) { - otherValues[i] = value; - if (!ready && !hasValue[i]) { - hasValue[i] = true; - (ready = hasValue.every(identity)) && (hasValue = null); - } - }, noop)); - }; - for (var i = 0; i < len; i++) { - _loop_1(i); - } - source.subscribe(createOperatorSubscriber(subscriber, function (value) { - if (ready) { - var values = __spreadArray([value], __read(otherValues)); - subscriber.next(project ? project.apply(void 0, __spreadArray([], __read(values))) : values); - } - })); - }); -} -//# sourceMappingURL=withLatestFrom.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/withLatestFrom.js.map b/node_modules/rxjs/dist/esm5/internal/operators/withLatestFrom.js.map deleted file mode 100644 index 841dc71..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/withLatestFrom.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"withLatestFrom.js","sourceRoot":"","sources":["../../../../src/internal/operators/withLatestFrom.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAoDjD,MAAM,UAAU,cAAc;IAAO,gBAAgB;SAAhB,UAAgB,EAAhB,qBAAgB,EAAhB,IAAgB;QAAhB,2BAAgB;;IACnD,IAAM,OAAO,GAAG,iBAAiB,CAAC,MAAM,CAAwC,CAAC;IAEjF,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;QAC1B,IAAM,WAAW,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;QAInC,IAAI,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,cAAM,OAAA,KAAK,EAAL,CAAK,CAAC,CAAC;QAGvC,IAAI,KAAK,GAAG,KAAK,CAAC;gCAMT,CAAC;YACR,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAC5B,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;gBACJ,WAAW,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;gBACvB,IAAI,CAAC,KAAK,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;oBAE1B,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;oBAKnB,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAK,CAAC,CAAC;iBAC1D;YACH,CAAC,EAGD,IAAI,CACL,CACF,CAAC;;QApBJ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE;oBAAnB,CAAC;SAqBT;QAGD,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YACzC,IAAI,KAAK,EAAE;gBAET,IAAM,MAAM,kBAAI,KAAK,UAAK,WAAW,EAAC,CAAC;gBACvC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,wCAAI,MAAM,IAAE,CAAC,CAAC,MAAM,CAAC,CAAC;aACxD;QACH,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/zip.js b/node_modules/rxjs/dist/esm5/internal/operators/zip.js deleted file mode 100644 index 044095f..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/zip.js +++ /dev/null @@ -1,13 +0,0 @@ -import { __read, __spreadArray } from "tslib"; -import { zip as zipStatic } from '../observable/zip'; -import { operate } from '../util/lift'; -export function zip() { - var sources = []; - for (var _i = 0; _i < arguments.length; _i++) { - sources[_i] = arguments[_i]; - } - return operate(function (source, subscriber) { - zipStatic.apply(void 0, __spreadArray([source], __read(sources))).subscribe(subscriber); - }); -} -//# sourceMappingURL=zip.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/zip.js.map b/node_modules/rxjs/dist/esm5/internal/operators/zip.js.map deleted file mode 100644 index f9dced7..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/zip.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"zip.js","sourceRoot":"","sources":["../../../../src/internal/operators/zip.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,IAAI,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAmBvC,MAAM,UAAU,GAAG;IAAO,iBAAwE;SAAxE,UAAwE,EAAxE,qBAAwE,EAAxE,IAAwE;QAAxE,4BAAwE;;IAChG,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,SAAS,8BAAC,MAA8B,UAAM,OAAuC,IAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IAC/G,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/zipAll.js b/node_modules/rxjs/dist/esm5/internal/operators/zipAll.js deleted file mode 100644 index c3faf7e..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/zipAll.js +++ /dev/null @@ -1,6 +0,0 @@ -import { zip } from '../observable/zip'; -import { joinAllInternals } from './joinAllInternals'; -export function zipAll(project) { - return joinAllInternals(zip, project); -} -//# sourceMappingURL=zipAll.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/zipAll.js.map b/node_modules/rxjs/dist/esm5/internal/operators/zipAll.js.map deleted file mode 100644 index 92c858e..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/zipAll.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"zipAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/zipAll.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAetD,MAAM,UAAU,MAAM,CAAO,OAA+B;IAC1D,OAAO,gBAAgB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/zipWith.js b/node_modules/rxjs/dist/esm5/internal/operators/zipWith.js deleted file mode 100644 index 07c60d5..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/zipWith.js +++ /dev/null @@ -1,10 +0,0 @@ -import { __read, __spreadArray } from "tslib"; -import { zip } from './zip'; -export function zipWith() { - var otherInputs = []; - for (var _i = 0; _i < arguments.length; _i++) { - otherInputs[_i] = arguments[_i]; - } - return zip.apply(void 0, __spreadArray([], __read(otherInputs))); -} -//# sourceMappingURL=zipWith.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/operators/zipWith.js.map b/node_modules/rxjs/dist/esm5/internal/operators/zipWith.js.map deleted file mode 100644 index 9633894..0000000 --- a/node_modules/rxjs/dist/esm5/internal/operators/zipWith.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"zipWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/zipWith.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAyB5B,MAAM,UAAU,OAAO;IAAkC,qBAA4C;SAA5C,UAA4C,EAA5C,qBAA4C,EAA5C,IAA4C;QAA5C,gCAA4C;;IACnG,OAAO,GAAG,wCAAI,WAAW,IAAE;AAC7B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js deleted file mode 100644 index a409116..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js +++ /dev/null @@ -1,18 +0,0 @@ -import { Observable } from '../Observable'; -export function scheduleArray(input, scheduler) { - return new Observable(function (subscriber) { - var i = 0; - return scheduler.schedule(function () { - if (i === input.length) { - subscriber.complete(); - } - else { - subscriber.next(input[i++]); - if (!subscriber.closed) { - this.schedule(); - } - } - }); - }); -} -//# sourceMappingURL=scheduleArray.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js.map b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js.map deleted file mode 100644 index e1e42e7..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scheduleArray.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,MAAM,UAAU,aAAa,CAAI,KAAmB,EAAE,SAAwB;IAC5E,OAAO,IAAI,UAAU,CAAI,UAAC,UAAU;QAElC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEV,OAAO,SAAS,CAAC,QAAQ,CAAC;YACxB,IAAI,CAAC,KAAK,KAAK,CAAC,MAAM,EAAE;gBAGtB,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;iBAAM;gBAGL,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBAI5B,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;oBACtB,IAAI,CAAC,QAAQ,EAAE,CAAC;iBACjB;aACF;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js deleted file mode 100644 index c5d5e21..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js +++ /dev/null @@ -1,23 +0,0 @@ -import { Observable } from '../Observable'; -import { executeSchedule } from '../util/executeSchedule'; -export function scheduleAsyncIterable(input, scheduler) { - if (!input) { - throw new Error('Iterable cannot be null'); - } - return new Observable(function (subscriber) { - executeSchedule(subscriber, scheduler, function () { - var iterator = input[Symbol.asyncIterator](); - executeSchedule(subscriber, scheduler, function () { - iterator.next().then(function (result) { - if (result.done) { - subscriber.complete(); - } - else { - subscriber.next(result.value); - } - }); - }, 0, true); - }); - }); -} -//# sourceMappingURL=scheduleAsyncIterable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js.map b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js.map deleted file mode 100644 index 0b0413e..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scheduleAsyncIterable.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleAsyncIterable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,UAAU,qBAAqB,CAAI,KAAuB,EAAE,SAAwB;IACxF,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;KAC5C;IACD,OAAO,IAAI,UAAU,CAAI,UAAC,UAAU;QAClC,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE;YACrC,IAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;YAC/C,eAAe,CACb,UAAU,EACV,SAAS,EACT;gBACE,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,UAAC,MAAM;oBAC1B,IAAI,MAAM,CAAC,IAAI,EAAE;wBAGf,UAAU,CAAC,QAAQ,EAAE,CAAC;qBACvB;yBAAM;wBACL,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;qBAC/B;gBACH,CAAC,CAAC,CAAC;YACL,CAAC,EACD,CAAC,EACD,IAAI,CACL,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js deleted file mode 100644 index 20b9345..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js +++ /dev/null @@ -1,32 +0,0 @@ -import { Observable } from '../Observable'; -import { iterator as Symbol_iterator } from '../symbol/iterator'; -import { isFunction } from '../util/isFunction'; -import { executeSchedule } from '../util/executeSchedule'; -export function scheduleIterable(input, scheduler) { - return new Observable(function (subscriber) { - var iterator; - executeSchedule(subscriber, scheduler, function () { - iterator = input[Symbol_iterator](); - executeSchedule(subscriber, scheduler, function () { - var _a; - var value; - var done; - try { - (_a = iterator.next(), value = _a.value, done = _a.done); - } - catch (err) { - subscriber.error(err); - return; - } - if (done) { - subscriber.complete(); - } - else { - subscriber.next(value); - } - }, 0, true); - }); - return function () { return isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return(); }; - }); -} -//# sourceMappingURL=scheduleIterable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js.map b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js.map deleted file mode 100644 index e970e5b..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scheduleIterable.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleIterable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,QAAQ,IAAI,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAO1D,MAAM,UAAU,gBAAgB,CAAI,KAAkB,EAAE,SAAwB;IAC9E,OAAO,IAAI,UAAU,CAAI,UAAC,UAAU;QAClC,IAAI,QAAwB,CAAC;QAK7B,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE;YAErC,QAAQ,GAAI,KAAa,CAAC,eAAe,CAAC,EAAE,CAAC;YAE7C,eAAe,CACb,UAAU,EACV,SAAS,EACT;;gBACE,IAAI,KAAQ,CAAC;gBACb,IAAI,IAAyB,CAAC;gBAC9B,IAAI;oBAEF,CAAC,KAAkB,QAAQ,CAAC,IAAI,EAAE,EAA/B,KAAK,WAAA,EAAE,IAAI,UAAA,CAAqB,CAAC;iBACrC;gBAAC,OAAO,GAAG,EAAE;oBAEZ,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBACtB,OAAO;iBACR;gBAED,IAAI,IAAI,EAAE;oBAKR,UAAU,CAAC,QAAQ,EAAE,CAAC;iBACvB;qBAAM;oBAEL,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBACxB;YACH,CAAC,EACD,CAAC,EACD,IAAI,CACL,CAAC;QACJ,CAAC,CAAC,CAAC;QAMH,OAAO,cAAM,OAAA,UAAU,CAAC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAC,IAAI,QAAQ,CAAC,MAAM,EAAE,EAAjD,CAAiD,CAAC;IACjE,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js deleted file mode 100644 index 979b009..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js +++ /dev/null @@ -1,7 +0,0 @@ -import { innerFrom } from '../observable/innerFrom'; -import { observeOn } from '../operators/observeOn'; -import { subscribeOn } from '../operators/subscribeOn'; -export function scheduleObservable(input, scheduler) { - return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); -} -//# sourceMappingURL=scheduleObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js.map b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js.map deleted file mode 100644 index 2010050..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scheduleObservable.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleObservable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,MAAM,UAAU,kBAAkB,CAAI,KAA2B,EAAE,SAAwB;IACzF,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;AAC7E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js b/node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js deleted file mode 100644 index 287c986..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js +++ /dev/null @@ -1,7 +0,0 @@ -import { innerFrom } from '../observable/innerFrom'; -import { observeOn } from '../operators/observeOn'; -import { subscribeOn } from '../operators/subscribeOn'; -export function schedulePromise(input, scheduler) { - return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); -} -//# sourceMappingURL=schedulePromise.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js.map b/node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js.map deleted file mode 100644 index 8da74ad..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"schedulePromise.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/schedulePromise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,MAAM,UAAU,eAAe,CAAI,KAAqB,EAAE,SAAwB;IAChF,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;AAC7E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js deleted file mode 100644 index 4bfbfc2..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js +++ /dev/null @@ -1,6 +0,0 @@ -import { scheduleAsyncIterable } from './scheduleAsyncIterable'; -import { readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike'; -export function scheduleReadableStreamLike(input, scheduler) { - return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler); -} -//# sourceMappingURL=scheduleReadableStreamLike.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js.map b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js.map deleted file mode 100644 index 6026c90..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scheduleReadableStreamLike.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleReadableStreamLike.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,kCAAkC,EAAE,MAAM,8BAA8B,CAAC;AAElF,MAAM,UAAU,0BAA0B,CAAI,KAA4B,EAAE,SAAwB;IAClG,OAAO,qBAAqB,CAAC,kCAAkC,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,CAAC;AACrF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js deleted file mode 100644 index 3ed1085..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js +++ /dev/null @@ -1,37 +0,0 @@ -import { scheduleObservable } from './scheduleObservable'; -import { schedulePromise } from './schedulePromise'; -import { scheduleArray } from './scheduleArray'; -import { scheduleIterable } from './scheduleIterable'; -import { scheduleAsyncIterable } from './scheduleAsyncIterable'; -import { isInteropObservable } from '../util/isInteropObservable'; -import { isPromise } from '../util/isPromise'; -import { isArrayLike } from '../util/isArrayLike'; -import { isIterable } from '../util/isIterable'; -import { isAsyncIterable } from '../util/isAsyncIterable'; -import { createInvalidObservableTypeError } from '../util/throwUnobservableError'; -import { isReadableStreamLike } from '../util/isReadableStreamLike'; -import { scheduleReadableStreamLike } from './scheduleReadableStreamLike'; -export function scheduled(input, scheduler) { - if (input != null) { - if (isInteropObservable(input)) { - return scheduleObservable(input, scheduler); - } - if (isArrayLike(input)) { - return scheduleArray(input, scheduler); - } - if (isPromise(input)) { - return schedulePromise(input, scheduler); - } - if (isAsyncIterable(input)) { - return scheduleAsyncIterable(input, scheduler); - } - if (isIterable(input)) { - return scheduleIterable(input, scheduler); - } - if (isReadableStreamLike(input)) { - return scheduleReadableStreamLike(input, scheduler); - } - } - throw createInvalidObservableTypeError(input); -} -//# sourceMappingURL=scheduled.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js.map b/node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js.map deleted file mode 100644 index 6355931..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scheduled.js","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAa1E,MAAM,UAAU,SAAS,CAAI,KAAyB,EAAE,SAAwB;IAC9E,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE;YAC9B,OAAO,kBAAkB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SAC7C;QACD,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE;YACtB,OAAO,aAAa,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SACxC;QACD,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;YACpB,OAAO,eAAe,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SAC1C;QACD,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE;YAC1B,OAAO,qBAAqB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SAChD;QACD,IAAI,UAAU,CAAC,KAAK,CAAC,EAAE;YACrB,OAAO,gBAAgB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SAC3C;QACD,IAAI,oBAAoB,CAAC,KAAK,CAAC,EAAE;YAC/B,OAAO,0BAA0B,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;SACrD;KACF;IACD,MAAM,gCAAgC,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/Action.js b/node_modules/rxjs/dist/esm5/internal/scheduler/Action.js deleted file mode 100644 index 5a8874b..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/Action.js +++ /dev/null @@ -1,15 +0,0 @@ -import { __extends } from "tslib"; -import { Subscription } from '../Subscription'; -var Action = (function (_super) { - __extends(Action, _super); - function Action(scheduler, work) { - return _super.call(this) || this; - } - Action.prototype.schedule = function (state, delay) { - if (delay === void 0) { delay = 0; } - return this; - }; - return Action; -}(Subscription)); -export { Action }; -//# sourceMappingURL=Action.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/Action.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/Action.js.map deleted file mode 100644 index d8a755e..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/Action.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Action.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/Action.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAe/C;IAA+B,0BAAY;IACzC,gBAAY,SAAoB,EAAE,IAAmD;eACnF,iBAAO;IACT,CAAC;IAWM,yBAAQ,GAAf,UAAgB,KAAS,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAC1C,OAAO,IAAI,CAAC;IACd,CAAC;IACH,aAAC;AAAD,CAAC,AAjBD,CAA+B,YAAY,GAiB1C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameAction.js b/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameAction.js deleted file mode 100644 index c90ed62..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameAction.js +++ /dev/null @@ -1,36 +0,0 @@ -import { __extends } from "tslib"; -import { AsyncAction } from './AsyncAction'; -import { animationFrameProvider } from './animationFrameProvider'; -var AnimationFrameAction = (function (_super) { - __extends(AnimationFrameAction, _super); - function AnimationFrameAction(scheduler, work) { - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - return _this; - } - AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - if (delay !== null && delay > 0) { - return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); - } - scheduler.actions.push(this); - return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(function () { return scheduler.flush(undefined); })); - }; - AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) { - var _a; - if (delay === void 0) { delay = 0; } - if (delay != null ? delay > 0 : this.delay > 0) { - return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); - } - var actions = scheduler.actions; - if (id != null && id === scheduler._scheduled && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { - animationFrameProvider.cancelAnimationFrame(id); - scheduler._scheduled = undefined; - } - return undefined; - }; - return AnimationFrameAction; -}(AsyncAction)); -export { AnimationFrameAction }; -//# sourceMappingURL=AnimationFrameAction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameAction.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameAction.js.map deleted file mode 100644 index c2ec26b..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameAction.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AnimationFrameAction.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AnimationFrameAction.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAGlE;IAA6C,wCAAc;IACzD,8BAAsB,SAAkC,EAAY,IAAmD;QAAvH,YACE,kBAAM,SAAS,EAAE,IAAI,CAAC,SACvB;QAFqB,eAAS,GAAT,SAAS,CAAyB;QAAY,UAAI,GAAJ,IAAI,CAA+C;;IAEvH,CAAC;IAES,6CAAc,GAAxB,UAAyB,SAAkC,EAAE,EAAgB,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAE9F,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,GAAG,CAAC,EAAE;YAC/B,OAAO,iBAAM,cAAc,YAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAED,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAI7B,OAAO,SAAS,CAAC,UAAU,IAAI,CAAC,SAAS,CAAC,UAAU,GAAG,sBAAsB,CAAC,qBAAqB,CAAC,cAAM,OAAA,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,EAA1B,CAA0B,CAAC,CAAC,CAAC;IACzI,CAAC;IAES,6CAAc,GAAxB,UAAyB,SAAkC,EAAE,EAAgB,EAAE,KAAiB;;QAAjB,sBAAA,EAAA,SAAiB;QAI9F,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE;YAC9C,OAAO,iBAAM,cAAc,YAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAIO,IAAA,OAAO,GAAK,SAAS,QAAd,CAAe;QAC9B,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,KAAK,SAAS,CAAC,UAAU,IAAI,CAAA,MAAA,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,0CAAE,EAAE,MAAK,EAAE,EAAE;YACvF,sBAAsB,CAAC,oBAAoB,CAAC,EAAY,CAAC,CAAC;YAC1D,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC;SAClC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IACH,2BAAC;AAAD,CAAC,AApCD,CAA6C,WAAW,GAoCvD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameScheduler.js b/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameScheduler.js deleted file mode 100644 index 5703302..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameScheduler.js +++ /dev/null @@ -1,37 +0,0 @@ -import { __extends } from "tslib"; -import { AsyncScheduler } from './AsyncScheduler'; -var AnimationFrameScheduler = (function (_super) { - __extends(AnimationFrameScheduler, _super); - function AnimationFrameScheduler() { - return _super !== null && _super.apply(this, arguments) || this; - } - AnimationFrameScheduler.prototype.flush = function (action) { - this._active = true; - var flushId; - if (action) { - flushId = action.id; - } - else { - flushId = this._scheduled; - this._scheduled = undefined; - } - var actions = this.actions; - var error; - action = action || actions.shift(); - do { - if ((error = action.execute(action.state, action.delay))) { - break; - } - } while ((action = actions[0]) && action.id === flushId && actions.shift()); - this._active = false; - if (error) { - while ((action = actions[0]) && action.id === flushId && actions.shift()) { - action.unsubscribe(); - } - throw error; - } - }; - return AnimationFrameScheduler; -}(AsyncScheduler)); -export { AnimationFrameScheduler }; -//# sourceMappingURL=AnimationFrameScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameScheduler.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameScheduler.js.map deleted file mode 100644 index fe6d668..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/AnimationFrameScheduler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AnimationFrameScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AnimationFrameScheduler.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;IAA6C,2CAAc;IAA3D;;IAuCA,CAAC;IAtCQ,uCAAK,GAAZ,UAAa,MAAyB;QACpC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAUpB,IAAI,OAAO,CAAC;QACZ,IAAI,MAAM,EAAE;YACV,OAAO,GAAG,MAAM,CAAC,EAAE,CAAC;SACrB;aAAM;YACL,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC;YAC1B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;SAC7B;QAEO,IAAA,OAAO,GAAK,IAAI,QAAT,CAAU;QACzB,IAAI,KAAU,CAAC;QACf,MAAM,GAAG,MAAM,IAAI,OAAO,CAAC,KAAK,EAAG,CAAC;QAEpC,GAAG;YACD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;gBACxD,MAAM;aACP;SACF,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;QAE5E,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QAErB,IAAI,KAAK,EAAE;YACT,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;gBACxE,MAAM,CAAC,WAAW,EAAE,CAAC;aACtB;YACD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;IACH,8BAAC;AAAD,CAAC,AAvCD,CAA6C,cAAc,GAuC1D"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/AsapAction.js b/node_modules/rxjs/dist/esm5/internal/scheduler/AsapAction.js deleted file mode 100644 index ba5d2a1..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/AsapAction.js +++ /dev/null @@ -1,38 +0,0 @@ -import { __extends } from "tslib"; -import { AsyncAction } from './AsyncAction'; -import { immediateProvider } from './immediateProvider'; -var AsapAction = (function (_super) { - __extends(AsapAction, _super); - function AsapAction(scheduler, work) { - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - return _this; - } - AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - if (delay !== null && delay > 0) { - return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); - } - scheduler.actions.push(this); - return scheduler._scheduled || (scheduler._scheduled = immediateProvider.setImmediate(scheduler.flush.bind(scheduler, undefined))); - }; - AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) { - var _a; - if (delay === void 0) { delay = 0; } - if (delay != null ? delay > 0 : this.delay > 0) { - return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay); - } - var actions = scheduler.actions; - if (id != null && ((_a = actions[actions.length - 1]) === null || _a === void 0 ? void 0 : _a.id) !== id) { - immediateProvider.clearImmediate(id); - if (scheduler._scheduled === id) { - scheduler._scheduled = undefined; - } - } - return undefined; - }; - return AsapAction; -}(AsyncAction)); -export { AsapAction }; -//# sourceMappingURL=AsapAction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/AsapAction.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/AsapAction.js.map deleted file mode 100644 index fe3c314..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/AsapAction.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AsapAction.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsapAction.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD;IAAmC,8BAAc;IAC/C,oBAAsB,SAAwB,EAAY,IAAmD;QAA7G,YACE,kBAAM,SAAS,EAAE,IAAI,CAAC,SACvB;QAFqB,eAAS,GAAT,SAAS,CAAe;QAAY,UAAI,GAAJ,IAAI,CAA+C;;IAE7G,CAAC;IAES,mCAAc,GAAxB,UAAyB,SAAwB,EAAE,EAAgB,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAEpF,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,GAAG,CAAC,EAAE;YAC/B,OAAO,iBAAM,cAAc,YAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAED,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAI7B,OAAO,SAAS,CAAC,UAAU,IAAI,CAAC,SAAS,CAAC,UAAU,GAAG,iBAAiB,CAAC,YAAY,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IACrI,CAAC;IAES,mCAAc,GAAxB,UAAyB,SAAwB,EAAE,EAAgB,EAAE,KAAiB;;QAAjB,sBAAA,EAAA,SAAiB;QAIpF,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE;YAC9C,OAAO,iBAAM,cAAc,YAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAIO,IAAA,OAAO,GAAK,SAAS,QAAd,CAAe;QAC9B,IAAI,EAAE,IAAI,IAAI,IAAI,CAAA,MAAA,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,0CAAE,EAAE,MAAK,EAAE,EAAE;YACxD,iBAAiB,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;YACrC,IAAI,SAAS,CAAC,UAAU,KAAK,EAAE,EAAE;gBAC/B,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC;aAClC;SACF;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IACH,iBAAC;AAAD,CAAC,AAtCD,CAAmC,WAAW,GAsC7C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/AsapScheduler.js b/node_modules/rxjs/dist/esm5/internal/scheduler/AsapScheduler.js deleted file mode 100644 index 180fbde..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/AsapScheduler.js +++ /dev/null @@ -1,31 +0,0 @@ -import { __extends } from "tslib"; -import { AsyncScheduler } from './AsyncScheduler'; -var AsapScheduler = (function (_super) { - __extends(AsapScheduler, _super); - function AsapScheduler() { - return _super !== null && _super.apply(this, arguments) || this; - } - AsapScheduler.prototype.flush = function (action) { - this._active = true; - var flushId = this._scheduled; - this._scheduled = undefined; - var actions = this.actions; - var error; - action = action || actions.shift(); - do { - if ((error = action.execute(action.state, action.delay))) { - break; - } - } while ((action = actions[0]) && action.id === flushId && actions.shift()); - this._active = false; - if (error) { - while ((action = actions[0]) && action.id === flushId && actions.shift()) { - action.unsubscribe(); - } - throw error; - } - }; - return AsapScheduler; -}(AsyncScheduler)); -export { AsapScheduler }; -//# sourceMappingURL=AsapScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/AsapScheduler.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/AsapScheduler.js.map deleted file mode 100644 index a42f27c..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/AsapScheduler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AsapScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsapScheduler.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;IAAmC,iCAAc;IAAjD;;IAkCA,CAAC;IAjCQ,6BAAK,GAAZ,UAAa,MAAyB;QACpC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAUpB,IAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC;QAChC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAEpB,IAAA,OAAO,GAAK,IAAI,QAAT,CAAU;QACzB,IAAI,KAAU,CAAC;QACf,MAAM,GAAG,MAAM,IAAI,OAAO,CAAC,KAAK,EAAG,CAAC;QAEpC,GAAG;YACD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;gBACxD,MAAM;aACP;SACF,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;QAE5E,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QAErB,IAAI,KAAK,EAAE;YACT,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,EAAE,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,EAAE;gBACxE,MAAM,CAAC,WAAW,EAAE,CAAC;aACtB;YACD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AAlCD,CAAmC,cAAc,GAkChD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js b/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js deleted file mode 100644 index 1844b98..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js +++ /dev/null @@ -1,90 +0,0 @@ -import { __extends } from "tslib"; -import { Action } from './Action'; -import { intervalProvider } from './intervalProvider'; -import { arrRemove } from '../util/arrRemove'; -var AsyncAction = (function (_super) { - __extends(AsyncAction, _super); - function AsyncAction(scheduler, work) { - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - _this.pending = false; - return _this; - } - AsyncAction.prototype.schedule = function (state, delay) { - var _a; - if (delay === void 0) { delay = 0; } - if (this.closed) { - return this; - } - this.state = state; - var id = this.id; - var scheduler = this.scheduler; - if (id != null) { - this.id = this.recycleAsyncId(scheduler, id, delay); - } - this.pending = true; - this.delay = delay; - this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay); - return this; - }; - AsyncAction.prototype.requestAsyncId = function (scheduler, _id, delay) { - if (delay === void 0) { delay = 0; } - return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay); - }; - AsyncAction.prototype.recycleAsyncId = function (_scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - if (delay != null && this.delay === delay && this.pending === false) { - return id; - } - if (id != null) { - intervalProvider.clearInterval(id); - } - return undefined; - }; - AsyncAction.prototype.execute = function (state, delay) { - if (this.closed) { - return new Error('executing a cancelled action'); - } - this.pending = false; - var error = this._execute(state, delay); - if (error) { - return error; - } - else if (this.pending === false && this.id != null) { - this.id = this.recycleAsyncId(this.scheduler, this.id, null); - } - }; - AsyncAction.prototype._execute = function (state, _delay) { - var errored = false; - var errorValue; - try { - this.work(state); - } - catch (e) { - errored = true; - errorValue = e ? e : new Error('Scheduled action threw falsy error'); - } - if (errored) { - this.unsubscribe(); - return errorValue; - } - }; - AsyncAction.prototype.unsubscribe = function () { - if (!this.closed) { - var _a = this, id = _a.id, scheduler = _a.scheduler; - var actions = scheduler.actions; - this.work = this.state = this.scheduler = null; - this.pending = false; - arrRemove(actions, this); - if (id != null) { - this.id = this.recycleAsyncId(scheduler, id, null); - } - this.delay = null; - _super.prototype.unsubscribe.call(this); - } - }; - return AsyncAction; -}(Action)); -export { AsyncAction }; -//# sourceMappingURL=AsyncAction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js.map deleted file mode 100644 index b0d2a06..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AsyncAction.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsyncAction.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C;IAAoC,+BAAS;IAO3C,qBAAsB,SAAyB,EAAY,IAAmD;QAA9G,YACE,kBAAM,SAAS,EAAE,IAAI,CAAC,SACvB;QAFqB,eAAS,GAAT,SAAS,CAAgB;QAAY,UAAI,GAAJ,IAAI,CAA+C;QAFpG,aAAO,GAAY,KAAK,CAAC;;IAInC,CAAC;IAEM,8BAAQ,GAAf,UAAgB,KAAS,EAAE,KAAiB;;QAAjB,sBAAA,EAAA,SAAiB;QAC1C,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,OAAO,IAAI,CAAC;SACb;QAGD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,IAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QACnB,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAuBjC,IAAI,EAAE,IAAI,IAAI,EAAE;YACd,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACrD;QAID,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAEpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,IAAI,CAAC,EAAE,GAAG,MAAA,IAAI,CAAC,EAAE,mCAAI,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QAEpE,OAAO,IAAI,CAAC;IACd,CAAC;IAES,oCAAc,GAAxB,UAAyB,SAAyB,EAAE,GAAiB,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QACtF,OAAO,gBAAgB,CAAC,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;IACpF,CAAC;IAES,oCAAc,GAAxB,UAAyB,UAA0B,EAAE,EAAgB,EAAE,KAAwB;QAAxB,sBAAA,EAAA,SAAwB;QAE7F,IAAI,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK,EAAE;YACnE,OAAO,EAAE,CAAC;SACX;QAGD,IAAI,EAAE,IAAI,IAAI,EAAE;YACd,gBAAgB,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;SACpC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAKM,6BAAO,GAAd,UAAe,KAAQ,EAAE,KAAa;QACpC,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,OAAO,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;SAClD;QAED,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAC1C,IAAI,KAAK,EAAE;YACT,OAAO,KAAK,CAAC;SACd;aAAM,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK,IAAI,IAAI,CAAC,EAAE,IAAI,IAAI,EAAE;YAcpD,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;SAC9D;IACH,CAAC;IAES,8BAAQ,GAAlB,UAAmB,KAAQ,EAAE,MAAc;QACzC,IAAI,OAAO,GAAY,KAAK,CAAC;QAC7B,IAAI,UAAe,CAAC;QACpB,IAAI;YACF,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAClB;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,GAAG,IAAI,CAAC;YAIf,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;SACtE;QACD,IAAI,OAAO,EAAE;YACX,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,OAAO,UAAU,CAAC;SACnB;IACH,CAAC;IAED,iCAAW,GAAX;QACE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YACV,IAAA,KAAoB,IAAI,EAAtB,EAAE,QAAA,EAAE,SAAS,eAAS,CAAC;YACvB,IAAA,OAAO,GAAK,SAAS,QAAd,CAAe;YAE9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,GAAG,IAAK,CAAC;YAChD,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;YAErB,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YACzB,IAAI,EAAE,IAAI,IAAI,EAAE;gBACd,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;aACpD;YAED,IAAI,CAAC,KAAK,GAAG,IAAK,CAAC;YACnB,iBAAM,WAAW,WAAE,CAAC;SACrB;IACH,CAAC;IACH,kBAAC;AAAD,CAAC,AA7ID,CAAoC,MAAM,GA6IzC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js b/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js deleted file mode 100644 index 01b08ee..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js +++ /dev/null @@ -1,36 +0,0 @@ -import { __extends } from "tslib"; -import { Scheduler } from '../Scheduler'; -var AsyncScheduler = (function (_super) { - __extends(AsyncScheduler, _super); - function AsyncScheduler(SchedulerAction, now) { - if (now === void 0) { now = Scheduler.now; } - var _this = _super.call(this, SchedulerAction, now) || this; - _this.actions = []; - _this._active = false; - return _this; - } - AsyncScheduler.prototype.flush = function (action) { - var actions = this.actions; - if (this._active) { - actions.push(action); - return; - } - var error; - this._active = true; - do { - if ((error = action.execute(action.state, action.delay))) { - break; - } - } while ((action = actions.shift())); - this._active = false; - if (error) { - while ((action = actions.shift())) { - action.unsubscribe(); - } - throw error; - } - }; - return AsyncScheduler; -}(Scheduler)); -export { AsyncScheduler }; -//# sourceMappingURL=AsyncScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js.map deleted file mode 100644 index 35fa9ca..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AsyncScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsyncScheduler.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAKzC;IAAoC,kCAAS;IAgB3C,wBAAY,eAA8B,EAAE,GAAiC;QAAjC,oBAAA,EAAA,MAAoB,SAAS,CAAC,GAAG;QAA7E,YACE,kBAAM,eAAe,EAAE,GAAG,CAAC,SAC5B;QAjBM,aAAO,GAA4B,EAAE,CAAC;QAMtC,aAAO,GAAY,KAAK,CAAC;;IAWhC,CAAC;IAEM,8BAAK,GAAZ,UAAa,MAAwB;QAC3B,IAAA,OAAO,GAAK,IAAI,QAAT,CAAU;QAEzB,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACrB,OAAO;SACR;QAED,IAAI,KAAU,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAEpB,GAAG;YACD,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;gBACxD,MAAM;aACP;SACF,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,EAAG,CAAC,EAAE;QAEtC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QAErB,IAAI,KAAK,EAAE;YACT,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,EAAG,CAAC,EAAE;gBAClC,MAAM,CAAC,WAAW,EAAE,CAAC;aACtB;YACD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;IACH,qBAAC;AAAD,CAAC,AA9CD,CAAoC,SAAS,GA8C5C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/QueueAction.js b/node_modules/rxjs/dist/esm5/internal/scheduler/QueueAction.js deleted file mode 100644 index dd7ccbf..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/QueueAction.js +++ /dev/null @@ -1,35 +0,0 @@ -import { __extends } from "tslib"; -import { AsyncAction } from './AsyncAction'; -var QueueAction = (function (_super) { - __extends(QueueAction, _super); - function QueueAction(scheduler, work) { - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - return _this; - } - QueueAction.prototype.schedule = function (state, delay) { - if (delay === void 0) { delay = 0; } - if (delay > 0) { - return _super.prototype.schedule.call(this, state, delay); - } - this.delay = delay; - this.state = state; - this.scheduler.flush(this); - return this; - }; - QueueAction.prototype.execute = function (state, delay) { - return delay > 0 || this.closed ? _super.prototype.execute.call(this, state, delay) : this._execute(state, delay); - }; - QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) { - return _super.prototype.requestAsyncId.call(this, scheduler, id, delay); - } - scheduler.flush(this); - return 0; - }; - return QueueAction; -}(AsyncAction)); -export { QueueAction }; -//# sourceMappingURL=QueueAction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/QueueAction.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/QueueAction.js.map deleted file mode 100644 index 0fdf216..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/QueueAction.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"QueueAction.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/QueueAction.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAM5C;IAAoC,+BAAc;IAChD,qBAAsB,SAAyB,EAAY,IAAmD;QAA9G,YACE,kBAAM,SAAS,EAAE,IAAI,CAAC,SACvB;QAFqB,eAAS,GAAT,SAAS,CAAgB;QAAY,UAAI,GAAJ,IAAI,CAA+C;;IAE9G,CAAC;IAEM,8BAAQ,GAAf,UAAgB,KAAS,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAC1C,IAAI,KAAK,GAAG,CAAC,EAAE;YACb,OAAO,iBAAM,QAAQ,YAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SACrC;QACD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,6BAAO,GAAd,UAAe,KAAQ,EAAE,KAAa;QACpC,OAAO,KAAK,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAM,OAAO,YAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC9F,CAAC;IAES,oCAAc,GAAxB,UAAyB,SAAyB,EAAE,EAAgB,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAKrF,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE;YACrE,OAAO,iBAAM,cAAc,YAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAGD,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAMtB,OAAO,CAAC,CAAC;IACX,CAAC;IACH,kBAAC;AAAD,CAAC,AArCD,CAAoC,WAAW,GAqC9C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/QueueScheduler.js b/node_modules/rxjs/dist/esm5/internal/scheduler/QueueScheduler.js deleted file mode 100644 index 735a46f..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/QueueScheduler.js +++ /dev/null @@ -1,11 +0,0 @@ -import { __extends } from "tslib"; -import { AsyncScheduler } from './AsyncScheduler'; -var QueueScheduler = (function (_super) { - __extends(QueueScheduler, _super); - function QueueScheduler() { - return _super !== null && _super.apply(this, arguments) || this; - } - return QueueScheduler; -}(AsyncScheduler)); -export { QueueScheduler }; -//# sourceMappingURL=QueueScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/QueueScheduler.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/QueueScheduler.js.map deleted file mode 100644 index 0d8874a..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/QueueScheduler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"QueueScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/QueueScheduler.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;IAAoC,kCAAc;IAAlD;;IACA,CAAC;IAAD,qBAAC;AAAD,CAAC,AADD,CAAoC,cAAc,GACjD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/VirtualTimeScheduler.js b/node_modules/rxjs/dist/esm5/internal/scheduler/VirtualTimeScheduler.js deleted file mode 100644 index 47890a4..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/VirtualTimeScheduler.js +++ /dev/null @@ -1,104 +0,0 @@ -import { __extends } from "tslib"; -import { AsyncAction } from './AsyncAction'; -import { Subscription } from '../Subscription'; -import { AsyncScheduler } from './AsyncScheduler'; -var VirtualTimeScheduler = (function (_super) { - __extends(VirtualTimeScheduler, _super); - function VirtualTimeScheduler(schedulerActionCtor, maxFrames) { - if (schedulerActionCtor === void 0) { schedulerActionCtor = VirtualAction; } - if (maxFrames === void 0) { maxFrames = Infinity; } - var _this = _super.call(this, schedulerActionCtor, function () { return _this.frame; }) || this; - _this.maxFrames = maxFrames; - _this.frame = 0; - _this.index = -1; - return _this; - } - VirtualTimeScheduler.prototype.flush = function () { - var _a = this, actions = _a.actions, maxFrames = _a.maxFrames; - var error; - var action; - while ((action = actions[0]) && action.delay <= maxFrames) { - actions.shift(); - this.frame = action.delay; - if ((error = action.execute(action.state, action.delay))) { - break; - } - } - if (error) { - while ((action = actions.shift())) { - action.unsubscribe(); - } - throw error; - } - }; - VirtualTimeScheduler.frameTimeFactor = 10; - return VirtualTimeScheduler; -}(AsyncScheduler)); -export { VirtualTimeScheduler }; -var VirtualAction = (function (_super) { - __extends(VirtualAction, _super); - function VirtualAction(scheduler, work, index) { - if (index === void 0) { index = (scheduler.index += 1); } - var _this = _super.call(this, scheduler, work) || this; - _this.scheduler = scheduler; - _this.work = work; - _this.index = index; - _this.active = true; - _this.index = scheduler.index = index; - return _this; - } - VirtualAction.prototype.schedule = function (state, delay) { - if (delay === void 0) { delay = 0; } - if (Number.isFinite(delay)) { - if (!this.id) { - return _super.prototype.schedule.call(this, state, delay); - } - this.active = false; - var action = new VirtualAction(this.scheduler, this.work); - this.add(action); - return action.schedule(state, delay); - } - else { - return Subscription.EMPTY; - } - }; - VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - this.delay = scheduler.frame + delay; - var actions = scheduler.actions; - actions.push(this); - actions.sort(VirtualAction.sortActions); - return 1; - }; - VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) { - if (delay === void 0) { delay = 0; } - return undefined; - }; - VirtualAction.prototype._execute = function (state, delay) { - if (this.active === true) { - return _super.prototype._execute.call(this, state, delay); - } - }; - VirtualAction.sortActions = function (a, b) { - if (a.delay === b.delay) { - if (a.index === b.index) { - return 0; - } - else if (a.index > b.index) { - return 1; - } - else { - return -1; - } - } - else if (a.delay > b.delay) { - return 1; - } - else { - return -1; - } - }; - return VirtualAction; -}(AsyncAction)); -export { VirtualAction }; -//# sourceMappingURL=VirtualTimeScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/VirtualTimeScheduler.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/VirtualTimeScheduler.js.map deleted file mode 100644 index d57f1d8..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/VirtualTimeScheduler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"VirtualTimeScheduler.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/VirtualTimeScheduler.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlD;IAA0C,wCAAc;IAyBtD,8BAAY,mBAA8D,EAAS,SAA4B;QAAnG,oCAAA,EAAA,sBAA0C,aAAoB;QAAS,0BAAA,EAAA,oBAA4B;QAA/G,YACE,kBAAM,mBAAmB,EAAE,cAAM,OAAA,KAAI,CAAC,KAAK,EAAV,CAAU,CAAC,SAC7C;QAFkF,eAAS,GAAT,SAAS,CAAmB;QAfxG,WAAK,GAAW,CAAC,CAAC;QAMlB,WAAK,GAAW,CAAC,CAAC,CAAC;;IAW1B,CAAC;IAMM,oCAAK,GAAZ;QACQ,IAAA,KAAyB,IAAI,EAA3B,OAAO,aAAA,EAAE,SAAS,eAAS,CAAC;QACpC,IAAI,KAAU,CAAC;QACf,IAAI,MAAoC,CAAC;QAEzC,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,KAAK,IAAI,SAAS,EAAE;YACzD,OAAO,CAAC,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;YAE1B,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE;gBACxD,MAAM;aACP;SACF;QAED,IAAI,KAAK,EAAE;YACT,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,EAAE;gBACjC,MAAM,CAAC,WAAW,EAAE,CAAC;aACtB;YACD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;IAnDM,oCAAe,GAAG,EAAE,CAAC;IAoD9B,2BAAC;CAAA,AAtDD,CAA0C,cAAc,GAsDvD;SAtDY,oBAAoB;AAwDjC;IAAsC,iCAAc;IAGlD,uBACY,SAA+B,EAC/B,IAAmD,EACnD,KAAsC;QAAtC,sBAAA,EAAA,SAAiB,SAAS,CAAC,KAAK,IAAI,CAAC,CAAC;QAHlD,YAKE,kBAAM,SAAS,EAAE,IAAI,CAAC,SAEvB;QANW,eAAS,GAAT,SAAS,CAAsB;QAC/B,UAAI,GAAJ,IAAI,CAA+C;QACnD,WAAK,GAAL,KAAK,CAAiC;QALxC,YAAM,GAAY,IAAI,CAAC;QAQ/B,KAAI,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC;;IACvC,CAAC;IAEM,gCAAQ,GAAf,UAAgB,KAAS,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAC1C,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;YAC1B,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;gBACZ,OAAO,iBAAM,QAAQ,YAAC,KAAK,EAAE,KAAK,CAAC,CAAC;aACrC;YACD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YAKpB,IAAM,MAAM,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YAC5D,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACjB,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SACtC;aAAM;YAGL,OAAO,YAAY,CAAC,KAAK,CAAC;SAC3B;IACH,CAAC;IAES,sCAAc,GAAxB,UAAyB,SAA+B,EAAE,EAAQ,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QACnF,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC;QAC7B,IAAA,OAAO,GAAK,SAAS,QAAd,CAAe;QAC9B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClB,OAAmC,CAAC,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;QACrE,OAAO,CAAC,CAAC;IACX,CAAC;IAES,sCAAc,GAAxB,UAAyB,SAA+B,EAAE,EAAQ,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QACnF,OAAO,SAAS,CAAC;IACnB,CAAC;IAES,gCAAQ,GAAlB,UAAmB,KAAQ,EAAE,KAAa;QACxC,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,EAAE;YACxB,OAAO,iBAAM,QAAQ,YAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SACrC;IACH,CAAC;IAEc,yBAAW,GAA1B,UAA8B,CAAmB,EAAE,CAAmB;QACpE,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,EAAE;YACvB,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,EAAE;gBACvB,OAAO,CAAC,CAAC;aACV;iBAAM,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,EAAE;gBAC5B,OAAO,CAAC,CAAC;aACV;iBAAM;gBACL,OAAO,CAAC,CAAC,CAAC;aACX;SACF;aAAM,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,EAAE;YAC5B,OAAO,CAAC,CAAC;SACV;aAAM;YACL,OAAO,CAAC,CAAC,CAAC;SACX;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AAjED,CAAsC,WAAW,GAiEhD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrame.js b/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrame.js deleted file mode 100644 index 470f513..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrame.js +++ /dev/null @@ -1,5 +0,0 @@ -import { AnimationFrameAction } from './AnimationFrameAction'; -import { AnimationFrameScheduler } from './AnimationFrameScheduler'; -export var animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction); -export var animationFrame = animationFrameScheduler; -//# sourceMappingURL=animationFrame.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrame.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrame.js.map deleted file mode 100644 index f733f45..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrame.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"animationFrame.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/animationFrame.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAkCpE,MAAM,CAAC,IAAM,uBAAuB,GAAG,IAAI,uBAAuB,CAAC,oBAAoB,CAAC,CAAC;AAKzF,MAAM,CAAC,IAAM,cAAc,GAAG,uBAAuB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrameProvider.js b/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrameProvider.js deleted file mode 100644 index 7c6ede7..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrameProvider.js +++ /dev/null @@ -1,36 +0,0 @@ -import { __read, __spreadArray } from "tslib"; -import { Subscription } from '../Subscription'; -export var animationFrameProvider = { - schedule: function (callback) { - var request = requestAnimationFrame; - var cancel = cancelAnimationFrame; - var delegate = animationFrameProvider.delegate; - if (delegate) { - request = delegate.requestAnimationFrame; - cancel = delegate.cancelAnimationFrame; - } - var handle = request(function (timestamp) { - cancel = undefined; - callback(timestamp); - }); - return new Subscription(function () { return cancel === null || cancel === void 0 ? void 0 : cancel(handle); }); - }, - requestAnimationFrame: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var delegate = animationFrameProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.requestAnimationFrame) || requestAnimationFrame).apply(void 0, __spreadArray([], __read(args))); - }, - cancelAnimationFrame: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var delegate = animationFrameProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.cancelAnimationFrame) || cancelAnimationFrame).apply(void 0, __spreadArray([], __read(args))); - }, - delegate: undefined, -}; -//# sourceMappingURL=animationFrameProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrameProvider.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrameProvider.js.map deleted file mode 100644 index 3d68b59..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/animationFrameProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"animationFrameProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/animationFrameProvider.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAc/C,MAAM,CAAC,IAAM,sBAAsB,GAA2B;IAG5D,QAAQ,EAAR,UAAS,QAAQ;QACf,IAAI,OAAO,GAAG,qBAAqB,CAAC;QACpC,IAAI,MAAM,GAA4C,oBAAoB,CAAC;QACnE,IAAA,QAAQ,GAAK,sBAAsB,SAA3B,CAA4B;QAC5C,IAAI,QAAQ,EAAE;YACZ,OAAO,GAAG,QAAQ,CAAC,qBAAqB,CAAC;YACzC,MAAM,GAAG,QAAQ,CAAC,oBAAoB,CAAC;SACxC;QACD,IAAM,MAAM,GAAG,OAAO,CAAC,UAAC,SAAS;YAI/B,MAAM,GAAG,SAAS,CAAC;YACnB,QAAQ,CAAC,SAAS,CAAC,CAAC;QACtB,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,YAAY,CAAC,cAAM,OAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,MAAM,CAAC,EAAhB,CAAgB,CAAC,CAAC;IAClD,CAAC;IACD,qBAAqB;QAAC,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QACnB,IAAA,QAAQ,GAAK,sBAAsB,SAA3B,CAA4B;QAC5C,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,qBAAqB,KAAI,qBAAqB,CAAC,wCAAI,IAAI,IAAE;IAC7E,CAAC;IACD,oBAAoB;QAAC,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QAClB,IAAA,QAAQ,GAAK,sBAAsB,SAA3B,CAA4B;QAC5C,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,oBAAoB,KAAI,oBAAoB,CAAC,wCAAI,IAAI,IAAE;IAC3E,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/asap.js b/node_modules/rxjs/dist/esm5/internal/scheduler/asap.js deleted file mode 100644 index 9c69dc3..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/asap.js +++ /dev/null @@ -1,5 +0,0 @@ -import { AsapAction } from './AsapAction'; -import { AsapScheduler } from './AsapScheduler'; -export var asapScheduler = new AsapScheduler(AsapAction); -export var asap = asapScheduler; -//# sourceMappingURL=asap.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/asap.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/asap.js.map deleted file mode 100644 index c0ac616..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/asap.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"asap.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/asap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAqChD,MAAM,CAAC,IAAM,aAAa,GAAG,IAAI,aAAa,CAAC,UAAU,CAAC,CAAC;AAK3D,MAAM,CAAC,IAAM,IAAI,GAAG,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/async.js b/node_modules/rxjs/dist/esm5/internal/scheduler/async.js deleted file mode 100644 index a045d43..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/async.js +++ /dev/null @@ -1,5 +0,0 @@ -import { AsyncAction } from './AsyncAction'; -import { AsyncScheduler } from './AsyncScheduler'; -export var asyncScheduler = new AsyncScheduler(AsyncAction); -export var async = asyncScheduler; -//# sourceMappingURL=async.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/async.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/async.js.map deleted file mode 100644 index 7346859..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/async.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"async.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/async.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAiDlD,MAAM,CAAC,IAAM,cAAc,GAAG,IAAI,cAAc,CAAC,WAAW,CAAC,CAAC;AAK9D,MAAM,CAAC,IAAM,KAAK,GAAG,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js b/node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js deleted file mode 100644 index 74c668c..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js +++ /dev/null @@ -1,7 +0,0 @@ -export var dateTimestampProvider = { - now: function () { - return (dateTimestampProvider.delegate || Date).now(); - }, - delegate: undefined, -}; -//# sourceMappingURL=dateTimestampProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js.map deleted file mode 100644 index 8d77651..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dateTimestampProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/dateTimestampProvider.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,IAAM,qBAAqB,GAA0B;IAC1D,GAAG;QAGD,OAAO,CAAC,qBAAqB,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC;IACxD,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/immediateProvider.js b/node_modules/rxjs/dist/esm5/internal/scheduler/immediateProvider.js deleted file mode 100644 index de02e9e..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/immediateProvider.js +++ /dev/null @@ -1,19 +0,0 @@ -import { __read, __spreadArray } from "tslib"; -import { Immediate } from '../util/Immediate'; -var setImmediate = Immediate.setImmediate, clearImmediate = Immediate.clearImmediate; -export var immediateProvider = { - setImmediate: function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - var delegate = immediateProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.setImmediate) || setImmediate).apply(void 0, __spreadArray([], __read(args))); - }, - clearImmediate: function (handle) { - var delegate = immediateProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearImmediate) || clearImmediate)(handle); - }, - delegate: undefined, -}; -//# sourceMappingURL=immediateProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/immediateProvider.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/immediateProvider.js.map deleted file mode 100644 index fba5681..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/immediateProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"immediateProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/immediateProvider.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEtC,IAAA,YAAY,GAAqB,SAAS,aAA9B,EAAE,cAAc,GAAK,SAAS,eAAd,CAAe;AAgBnD,MAAM,CAAC,IAAM,iBAAiB,GAAsB;IAGlD,YAAY;QAAC,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QACV,IAAA,QAAQ,GAAK,iBAAiB,SAAtB,CAAuB;QACvC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,YAAY,KAAI,YAAY,CAAC,wCAAI,IAAI,IAAE;IAC3D,CAAC;IACD,cAAc,EAAd,UAAe,MAAM;QACX,IAAA,QAAQ,GAAK,iBAAiB,SAAtB,CAAuB;QACvC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,cAAc,KAAI,cAAc,CAAC,CAAC,MAAa,CAAC,CAAC;IACrE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js b/node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js deleted file mode 100644 index 9c9c00d..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js +++ /dev/null @@ -1,20 +0,0 @@ -import { __read, __spreadArray } from "tslib"; -export var intervalProvider = { - setInterval: function (handler, timeout) { - var args = []; - for (var _i = 2; _i < arguments.length; _i++) { - args[_i - 2] = arguments[_i]; - } - var delegate = intervalProvider.delegate; - if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) { - return delegate.setInterval.apply(delegate, __spreadArray([handler, timeout], __read(args))); - } - return setInterval.apply(void 0, __spreadArray([handler, timeout], __read(args))); - }, - clearInterval: function (handle) { - var delegate = intervalProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle); - }, - delegate: undefined, -}; -//# sourceMappingURL=intervalProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js.map deleted file mode 100644 index f5e73ab..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"intervalProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/intervalProvider.ts"],"names":[],"mappings":";AAeA,MAAM,CAAC,IAAM,gBAAgB,GAAqB;IAGhD,WAAW,EAAX,UAAY,OAAmB,EAAE,OAAgB;QAAE,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,6BAAO;;QAChD,IAAA,QAAQ,GAAK,gBAAgB,SAArB,CAAsB;QACtC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE;YACzB,OAAO,QAAQ,CAAC,WAAW,OAApB,QAAQ,iBAAa,OAAO,EAAE,OAAO,UAAK,IAAI,IAAE;SACxD;QACD,OAAO,WAAW,8BAAC,OAAO,EAAE,OAAO,UAAK,IAAI,IAAE;IAChD,CAAC;IACD,aAAa,EAAb,UAAc,MAAM;QACV,IAAA,QAAQ,GAAK,gBAAgB,SAArB,CAAsB;QACtC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,aAAa,KAAI,aAAa,CAAC,CAAC,MAAa,CAAC,CAAC;IACnE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/performanceTimestampProvider.js b/node_modules/rxjs/dist/esm5/internal/scheduler/performanceTimestampProvider.js deleted file mode 100644 index 7efdca7..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/performanceTimestampProvider.js +++ /dev/null @@ -1,7 +0,0 @@ -export var performanceTimestampProvider = { - now: function () { - return (performanceTimestampProvider.delegate || performance).now(); - }, - delegate: undefined, -}; -//# sourceMappingURL=performanceTimestampProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/performanceTimestampProvider.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/performanceTimestampProvider.js.map deleted file mode 100644 index 0eb8871..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/performanceTimestampProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"performanceTimestampProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/performanceTimestampProvider.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,IAAM,4BAA4B,GAAiC;IACxE,GAAG;QAGD,OAAO,CAAC,4BAA4B,CAAC,QAAQ,IAAI,WAAW,CAAC,CAAC,GAAG,EAAE,CAAC;IACtE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/queue.js b/node_modules/rxjs/dist/esm5/internal/scheduler/queue.js deleted file mode 100644 index e7a4846..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/queue.js +++ /dev/null @@ -1,5 +0,0 @@ -import { QueueAction } from './QueueAction'; -import { QueueScheduler } from './QueueScheduler'; -export var queueScheduler = new QueueScheduler(QueueAction); -export var queue = queueScheduler; -//# sourceMappingURL=queue.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/queue.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/queue.js.map deleted file mode 100644 index 42488a6..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/queue.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"queue.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/queue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAiElD,MAAM,CAAC,IAAM,cAAc,GAAG,IAAI,cAAc,CAAC,WAAW,CAAC,CAAC;AAK9D,MAAM,CAAC,IAAM,KAAK,GAAG,cAAc,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js b/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js deleted file mode 100644 index 6000218..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +++ /dev/null @@ -1,20 +0,0 @@ -import { __read, __spreadArray } from "tslib"; -export var timeoutProvider = { - setTimeout: function (handler, timeout) { - var args = []; - for (var _i = 2; _i < arguments.length; _i++) { - args[_i - 2] = arguments[_i]; - } - var delegate = timeoutProvider.delegate; - if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) { - return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args))); - } - return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args))); - }, - clearTimeout: function (handle) { - var delegate = timeoutProvider.delegate; - return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle); - }, - delegate: undefined, -}; -//# sourceMappingURL=timeoutProvider.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map deleted file mode 100644 index cd6b79b..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timeoutProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/timeoutProvider.ts"],"names":[],"mappings":";AAeA,MAAM,CAAC,IAAM,eAAe,GAAoB;IAG9C,UAAU,EAAV,UAAW,OAAmB,EAAE,OAAgB;QAAE,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,6BAAO;;QAC/C,IAAA,QAAQ,GAAK,eAAe,SAApB,CAAqB;QACrC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,UAAU,EAAE;YACxB,OAAO,QAAQ,CAAC,UAAU,OAAnB,QAAQ,iBAAY,OAAO,EAAE,OAAO,UAAK,IAAI,IAAE;SACvD;QACD,OAAO,UAAU,8BAAC,OAAO,EAAE,OAAO,UAAK,IAAI,IAAE;IAC/C,CAAC;IACD,YAAY,EAAZ,UAAa,MAAM;QACT,IAAA,QAAQ,GAAK,eAAe,SAApB,CAAqB;QACrC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,YAAY,KAAI,YAAY,CAAC,CAAC,MAAa,CAAC,CAAC;IACjE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/timerHandle.js b/node_modules/rxjs/dist/esm5/internal/scheduler/timerHandle.js deleted file mode 100644 index 40cf606..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/timerHandle.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=timerHandle.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/scheduler/timerHandle.js.map b/node_modules/rxjs/dist/esm5/internal/scheduler/timerHandle.js.map deleted file mode 100644 index 8efd320..0000000 --- a/node_modules/rxjs/dist/esm5/internal/scheduler/timerHandle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timerHandle.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/timerHandle.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/symbol/iterator.js b/node_modules/rxjs/dist/esm5/internal/symbol/iterator.js deleted file mode 100644 index 982edbc..0000000 --- a/node_modules/rxjs/dist/esm5/internal/symbol/iterator.js +++ /dev/null @@ -1,8 +0,0 @@ -export function getSymbolIterator() { - if (typeof Symbol !== 'function' || !Symbol.iterator) { - return '@@iterator'; - } - return Symbol.iterator; -} -export var iterator = getSymbolIterator(); -//# sourceMappingURL=iterator.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/symbol/iterator.js.map b/node_modules/rxjs/dist/esm5/internal/symbol/iterator.js.map deleted file mode 100644 index 8476db3..0000000 --- a/node_modules/rxjs/dist/esm5/internal/symbol/iterator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"iterator.js","sourceRoot":"","sources":["../../../../src/internal/symbol/iterator.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,iBAAiB;IAC/B,IAAI,OAAO,MAAM,KAAK,UAAU,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;QACpD,OAAO,YAAmB,CAAC;KAC5B;IAED,OAAO,MAAM,CAAC,QAAQ,CAAC;AACzB,CAAC;AAED,MAAM,CAAC,IAAM,QAAQ,GAAG,iBAAiB,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/symbol/observable.js b/node_modules/rxjs/dist/esm5/internal/symbol/observable.js deleted file mode 100644 index a539338..0000000 --- a/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +++ /dev/null @@ -1,2 +0,0 @@ -export var observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })(); -//# sourceMappingURL=observable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map b/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map deleted file mode 100644 index 0eec0d5..0000000 --- a/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"observable.js","sourceRoot":"","sources":["../../../../src/internal/symbol/observable.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,IAAM,UAAU,GAAoB,CAAC,cAAM,OAAA,CAAC,OAAO,MAAM,KAAK,UAAU,IAAI,MAAM,CAAC,UAAU,CAAC,IAAI,cAAc,EAArE,CAAqE,CAAC,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/testing/ColdObservable.js b/node_modules/rxjs/dist/esm5/internal/testing/ColdObservable.js deleted file mode 100644 index 2225888..0000000 --- a/node_modules/rxjs/dist/esm5/internal/testing/ColdObservable.js +++ /dev/null @@ -1,39 +0,0 @@ -import { __extends } from "tslib"; -import { Observable } from '../Observable'; -import { Subscription } from '../Subscription'; -import { SubscriptionLoggable } from './SubscriptionLoggable'; -import { applyMixins } from '../util/applyMixins'; -import { observeNotification } from '../Notification'; -var ColdObservable = (function (_super) { - __extends(ColdObservable, _super); - function ColdObservable(messages, scheduler) { - var _this = _super.call(this, function (subscriber) { - var observable = this; - var index = observable.logSubscribedFrame(); - var subscription = new Subscription(); - subscription.add(new Subscription(function () { - observable.logUnsubscribedFrame(index); - })); - observable.scheduleMessages(subscriber); - return subscription; - }) || this; - _this.messages = messages; - _this.subscriptions = []; - _this.scheduler = scheduler; - return _this; - } - ColdObservable.prototype.scheduleMessages = function (subscriber) { - var messagesLength = this.messages.length; - for (var i = 0; i < messagesLength; i++) { - var message = this.messages[i]; - subscriber.add(this.scheduler.schedule(function (state) { - var _a = state, notification = _a.message.notification, destination = _a.subscriber; - observeNotification(notification, destination); - }, message.frame, { message: message, subscriber: subscriber })); - } - }; - return ColdObservable; -}(Observable)); -export { ColdObservable }; -applyMixins(ColdObservable, [SubscriptionLoggable]); -//# sourceMappingURL=ColdObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/testing/ColdObservable.js.map b/node_modules/rxjs/dist/esm5/internal/testing/ColdObservable.js.map deleted file mode 100644 index df8c8de..0000000 --- a/node_modules/rxjs/dist/esm5/internal/testing/ColdObservable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ColdObservable.js","sourceRoot":"","sources":["../../../../src/internal/testing/ColdObservable.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAI/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD;IAAuC,kCAAa;IAQlD,wBAAmB,QAAuB,EAAE,SAAoB;QAAhE,YACE,kBAAM,UAA+B,UAA2B;YAC9D,IAAM,UAAU,GAAsB,IAAW,CAAC;YAClD,IAAM,KAAK,GAAG,UAAU,CAAC,kBAAkB,EAAE,CAAC;YAC9C,IAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;YACxC,YAAY,CAAC,GAAG,CACd,IAAI,YAAY,CAAC;gBACf,UAAU,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;YACzC,CAAC,CAAC,CACH,CAAC;YACF,UAAU,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;YACxC,OAAO,YAAY,CAAC;QACtB,CAAC,CAAC,SAEH;QAdkB,cAAQ,GAAR,QAAQ,CAAe;QAPnC,mBAAa,GAAsB,EAAE,CAAC;QAoB3C,KAAI,CAAC,SAAS,GAAG,SAAS,CAAC;;IAC7B,CAAC;IAED,yCAAgB,GAAhB,UAAiB,UAA2B;QAC1C,IAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;QAC5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,EAAE,CAAC,EAAE,EAAE;YACvC,IAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YACjC,UAAU,CAAC,GAAG,CACZ,IAAI,CAAC,SAAS,CAAC,QAAQ,CACrB,UAAC,KAAK;gBACE,IAAA,KAAyD,KAAM,EAAlD,YAAY,0BAAA,EAAgB,WAAW,gBAAW,CAAC;gBACtE,mBAAmB,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;YACjD,CAAC,EACD,OAAO,CAAC,KAAK,EACb,EAAE,OAAO,SAAA,EAAE,UAAU,YAAA,EAAE,CACxB,CACF,CAAC;SACH;IACH,CAAC;IACH,qBAAC;AAAD,CAAC,AAxCD,CAAuC,UAAU,GAwChD;;AACD,WAAW,CAAC,cAAc,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/testing/HotObservable.js b/node_modules/rxjs/dist/esm5/internal/testing/HotObservable.js deleted file mode 100644 index e019898..0000000 --- a/node_modules/rxjs/dist/esm5/internal/testing/HotObservable.js +++ /dev/null @@ -1,45 +0,0 @@ -import { __extends } from "tslib"; -import { Subject } from '../Subject'; -import { Subscription } from '../Subscription'; -import { SubscriptionLoggable } from './SubscriptionLoggable'; -import { applyMixins } from '../util/applyMixins'; -import { observeNotification } from '../Notification'; -var HotObservable = (function (_super) { - __extends(HotObservable, _super); - function HotObservable(messages, scheduler) { - var _this = _super.call(this) || this; - _this.messages = messages; - _this.subscriptions = []; - _this.scheduler = scheduler; - return _this; - } - HotObservable.prototype._subscribe = function (subscriber) { - var subject = this; - var index = subject.logSubscribedFrame(); - var subscription = new Subscription(); - subscription.add(new Subscription(function () { - subject.logUnsubscribedFrame(index); - })); - subscription.add(_super.prototype._subscribe.call(this, subscriber)); - return subscription; - }; - HotObservable.prototype.setup = function () { - var subject = this; - var messagesLength = subject.messages.length; - var _loop_1 = function (i) { - (function () { - var _a = subject.messages[i], notification = _a.notification, frame = _a.frame; - subject.scheduler.schedule(function () { - observeNotification(notification, subject); - }, frame); - })(); - }; - for (var i = 0; i < messagesLength; i++) { - _loop_1(i); - } - }; - return HotObservable; -}(Subject)); -export { HotObservable }; -applyMixins(HotObservable, [SubscriptionLoggable]); -//# sourceMappingURL=HotObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/testing/HotObservable.js.map b/node_modules/rxjs/dist/esm5/internal/testing/HotObservable.js.map deleted file mode 100644 index f5364c3..0000000 --- a/node_modules/rxjs/dist/esm5/internal/testing/HotObservable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"HotObservable.js","sourceRoot":"","sources":["../../../../src/internal/testing/HotObservable.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAI/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD;IAAsC,iCAAU;IAQ9C,uBAAmB,QAAuB,EAAE,SAAoB;QAAhE,YACE,iBAAO,SAER;QAHkB,cAAQ,GAAR,QAAQ,CAAe;QAPnC,mBAAa,GAAsB,EAAE,CAAC;QAS3C,KAAI,CAAC,SAAS,GAAG,SAAS,CAAC;;IAC7B,CAAC;IAGS,kCAAU,GAApB,UAAqB,UAA2B;QAC9C,IAAM,OAAO,GAAqB,IAAI,CAAC;QACvC,IAAM,KAAK,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;QAC3C,IAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;QACxC,YAAY,CAAC,GAAG,CACd,IAAI,YAAY,CAAC;YACf,OAAO,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;QACtC,CAAC,CAAC,CACH,CAAC;QACF,YAAY,CAAC,GAAG,CAAC,iBAAM,UAAU,YAAC,UAAU,CAAC,CAAC,CAAC;QAC/C,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,6BAAK,GAAL;QACE,IAAM,OAAO,GAAG,IAAI,CAAC;QACrB,IAAM,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;gCAEtC,CAAC;YACR,CAAC;gBACO,IAAA,KAA0B,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAA3C,YAAY,kBAAA,EAAE,KAAK,WAAwB,CAAC;gBAEpD,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC;oBACzB,mBAAmB,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;gBAC7C,CAAC,EAAE,KAAK,CAAC,CAAC;YACZ,CAAC,CAAC,EAAE,CAAC;;QAPP,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,EAAE,CAAC,EAAE;oBAA9B,CAAC;SAQT;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AAzCD,CAAsC,OAAO,GAyC5C;;AACD,WAAW,CAAC,aAAa,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/testing/SubscriptionLog.js b/node_modules/rxjs/dist/esm5/internal/testing/SubscriptionLog.js deleted file mode 100644 index f8fa0d5..0000000 --- a/node_modules/rxjs/dist/esm5/internal/testing/SubscriptionLog.js +++ /dev/null @@ -1,10 +0,0 @@ -var SubscriptionLog = (function () { - function SubscriptionLog(subscribedFrame, unsubscribedFrame) { - if (unsubscribedFrame === void 0) { unsubscribedFrame = Infinity; } - this.subscribedFrame = subscribedFrame; - this.unsubscribedFrame = unsubscribedFrame; - } - return SubscriptionLog; -}()); -export { SubscriptionLog }; -//# sourceMappingURL=SubscriptionLog.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/testing/SubscriptionLog.js.map b/node_modules/rxjs/dist/esm5/internal/testing/SubscriptionLog.js.map deleted file mode 100644 index 547ec44..0000000 --- a/node_modules/rxjs/dist/esm5/internal/testing/SubscriptionLog.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SubscriptionLog.js","sourceRoot":"","sources":["../../../../src/internal/testing/SubscriptionLog.ts"],"names":[],"mappings":"AAAA;IACE,yBAAmB,eAAuB,EACvB,iBAAoC;QAApC,kCAAA,EAAA,4BAAoC;QADpC,oBAAe,GAAf,eAAe,CAAQ;QACvB,sBAAiB,GAAjB,iBAAiB,CAAmB;IACvD,CAAC;IACH,sBAAC;AAAD,CAAC,AAJD,IAIC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/testing/SubscriptionLoggable.js b/node_modules/rxjs/dist/esm5/internal/testing/SubscriptionLoggable.js deleted file mode 100644 index 80d1f3f..0000000 --- a/node_modules/rxjs/dist/esm5/internal/testing/SubscriptionLoggable.js +++ /dev/null @@ -1,18 +0,0 @@ -import { SubscriptionLog } from './SubscriptionLog'; -var SubscriptionLoggable = (function () { - function SubscriptionLoggable() { - this.subscriptions = []; - } - SubscriptionLoggable.prototype.logSubscribedFrame = function () { - this.subscriptions.push(new SubscriptionLog(this.scheduler.now())); - return this.subscriptions.length - 1; - }; - SubscriptionLoggable.prototype.logUnsubscribedFrame = function (index) { - var subscriptionLogs = this.subscriptions; - var oldSubscriptionLog = subscriptionLogs[index]; - subscriptionLogs[index] = new SubscriptionLog(oldSubscriptionLog.subscribedFrame, this.scheduler.now()); - }; - return SubscriptionLoggable; -}()); -export { SubscriptionLoggable }; -//# sourceMappingURL=SubscriptionLoggable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/testing/SubscriptionLoggable.js.map b/node_modules/rxjs/dist/esm5/internal/testing/SubscriptionLoggable.js.map deleted file mode 100644 index 6fbcce3..0000000 --- a/node_modules/rxjs/dist/esm5/internal/testing/SubscriptionLoggable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SubscriptionLoggable.js","sourceRoot":"","sources":["../../../../src/internal/testing/SubscriptionLoggable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD;IAAA;QACS,kBAAa,GAAsB,EAAE,CAAC;IAiB/C,CAAC;IAbC,iDAAkB,GAAlB;QACE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACnE,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;IACvC,CAAC;IAED,mDAAoB,GAApB,UAAqB,KAAa;QAChC,IAAM,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC;QAC5C,IAAM,kBAAkB,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;QACnD,gBAAgB,CAAC,KAAK,CAAC,GAAG,IAAI,eAAe,CAC3C,kBAAkB,CAAC,eAAe,EAClC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CACrB,CAAC;IACJ,CAAC;IACH,2BAAC;AAAD,CAAC,AAlBD,IAkBC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/testing/TestMessage.js b/node_modules/rxjs/dist/esm5/internal/testing/TestMessage.js deleted file mode 100644 index 47c15db..0000000 --- a/node_modules/rxjs/dist/esm5/internal/testing/TestMessage.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=TestMessage.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/testing/TestMessage.js.map b/node_modules/rxjs/dist/esm5/internal/testing/TestMessage.js.map deleted file mode 100644 index f91e8da..0000000 --- a/node_modules/rxjs/dist/esm5/internal/testing/TestMessage.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TestMessage.js","sourceRoot":"","sources":["../../../../src/internal/testing/TestMessage.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/testing/TestScheduler.js b/node_modules/rxjs/dist/esm5/internal/testing/TestScheduler.js deleted file mode 100644 index 22855ff..0000000 --- a/node_modules/rxjs/dist/esm5/internal/testing/TestScheduler.js +++ /dev/null @@ -1,569 +0,0 @@ -import { __extends, __read, __spreadArray, __values } from "tslib"; -import { Observable } from '../Observable'; -import { ColdObservable } from './ColdObservable'; -import { HotObservable } from './HotObservable'; -import { SubscriptionLog } from './SubscriptionLog'; -import { VirtualTimeScheduler, VirtualAction } from '../scheduler/VirtualTimeScheduler'; -import { COMPLETE_NOTIFICATION, errorNotification, nextNotification } from '../NotificationFactories'; -import { dateTimestampProvider } from '../scheduler/dateTimestampProvider'; -import { performanceTimestampProvider } from '../scheduler/performanceTimestampProvider'; -import { animationFrameProvider } from '../scheduler/animationFrameProvider'; -import { immediateProvider } from '../scheduler/immediateProvider'; -import { intervalProvider } from '../scheduler/intervalProvider'; -import { timeoutProvider } from '../scheduler/timeoutProvider'; -var defaultMaxFrame = 750; -var TestScheduler = (function (_super) { - __extends(TestScheduler, _super); - function TestScheduler(assertDeepEqual) { - var _this = _super.call(this, VirtualAction, defaultMaxFrame) || this; - _this.assertDeepEqual = assertDeepEqual; - _this.hotObservables = []; - _this.coldObservables = []; - _this.flushTests = []; - _this.runMode = false; - return _this; - } - TestScheduler.prototype.createTime = function (marbles) { - var indexOf = this.runMode ? marbles.trim().indexOf('|') : marbles.indexOf('|'); - if (indexOf === -1) { - throw new Error('marble diagram for time should have a completion marker "|"'); - } - return indexOf * TestScheduler.frameTimeFactor; - }; - TestScheduler.prototype.createColdObservable = function (marbles, values, error) { - if (marbles.indexOf('^') !== -1) { - throw new Error('cold observable cannot have subscription offset "^"'); - } - if (marbles.indexOf('!') !== -1) { - throw new Error('cold observable cannot have unsubscription marker "!"'); - } - var messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); - var cold = new ColdObservable(messages, this); - this.coldObservables.push(cold); - return cold; - }; - TestScheduler.prototype.createHotObservable = function (marbles, values, error) { - if (marbles.indexOf('!') !== -1) { - throw new Error('hot observable cannot have unsubscription marker "!"'); - } - var messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); - var subject = new HotObservable(messages, this); - this.hotObservables.push(subject); - return subject; - }; - TestScheduler.prototype.materializeInnerObservable = function (observable, outerFrame) { - var _this = this; - var messages = []; - observable.subscribe({ - next: function (value) { - messages.push({ frame: _this.frame - outerFrame, notification: nextNotification(value) }); - }, - error: function (error) { - messages.push({ frame: _this.frame - outerFrame, notification: errorNotification(error) }); - }, - complete: function () { - messages.push({ frame: _this.frame - outerFrame, notification: COMPLETE_NOTIFICATION }); - }, - }); - return messages; - }; - TestScheduler.prototype.expectObservable = function (observable, subscriptionMarbles) { - var _this = this; - if (subscriptionMarbles === void 0) { subscriptionMarbles = null; } - var actual = []; - var flushTest = { actual: actual, ready: false }; - var subscriptionParsed = TestScheduler.parseMarblesAsSubscriptions(subscriptionMarbles, this.runMode); - var subscriptionFrame = subscriptionParsed.subscribedFrame === Infinity ? 0 : subscriptionParsed.subscribedFrame; - var unsubscriptionFrame = subscriptionParsed.unsubscribedFrame; - var subscription; - this.schedule(function () { - subscription = observable.subscribe({ - next: function (x) { - var value = x instanceof Observable ? _this.materializeInnerObservable(x, _this.frame) : x; - actual.push({ frame: _this.frame, notification: nextNotification(value) }); - }, - error: function (error) { - actual.push({ frame: _this.frame, notification: errorNotification(error) }); - }, - complete: function () { - actual.push({ frame: _this.frame, notification: COMPLETE_NOTIFICATION }); - }, - }); - }, subscriptionFrame); - if (unsubscriptionFrame !== Infinity) { - this.schedule(function () { return subscription.unsubscribe(); }, unsubscriptionFrame); - } - this.flushTests.push(flushTest); - var runMode = this.runMode; - return { - toBe: function (marbles, values, errorValue) { - flushTest.ready = true; - flushTest.expected = TestScheduler.parseMarbles(marbles, values, errorValue, true, runMode); - }, - toEqual: function (other) { - flushTest.ready = true; - flushTest.expected = []; - _this.schedule(function () { - subscription = other.subscribe({ - next: function (x) { - var value = x instanceof Observable ? _this.materializeInnerObservable(x, _this.frame) : x; - flushTest.expected.push({ frame: _this.frame, notification: nextNotification(value) }); - }, - error: function (error) { - flushTest.expected.push({ frame: _this.frame, notification: errorNotification(error) }); - }, - complete: function () { - flushTest.expected.push({ frame: _this.frame, notification: COMPLETE_NOTIFICATION }); - }, - }); - }, subscriptionFrame); - }, - }; - }; - TestScheduler.prototype.expectSubscriptions = function (actualSubscriptionLogs) { - var flushTest = { actual: actualSubscriptionLogs, ready: false }; - this.flushTests.push(flushTest); - var runMode = this.runMode; - return { - toBe: function (marblesOrMarblesArray) { - var marblesArray = typeof marblesOrMarblesArray === 'string' ? [marblesOrMarblesArray] : marblesOrMarblesArray; - flushTest.ready = true; - flushTest.expected = marblesArray - .map(function (marbles) { return TestScheduler.parseMarblesAsSubscriptions(marbles, runMode); }) - .filter(function (marbles) { return marbles.subscribedFrame !== Infinity; }); - }, - }; - }; - TestScheduler.prototype.flush = function () { - var _this = this; - var hotObservables = this.hotObservables; - while (hotObservables.length > 0) { - hotObservables.shift().setup(); - } - _super.prototype.flush.call(this); - this.flushTests = this.flushTests.filter(function (test) { - if (test.ready) { - _this.assertDeepEqual(test.actual, test.expected); - return false; - } - return true; - }); - }; - TestScheduler.parseMarblesAsSubscriptions = function (marbles, runMode) { - var _this = this; - if (runMode === void 0) { runMode = false; } - if (typeof marbles !== 'string') { - return new SubscriptionLog(Infinity); - } - var characters = __spreadArray([], __read(marbles)); - var len = characters.length; - var groupStart = -1; - var subscriptionFrame = Infinity; - var unsubscriptionFrame = Infinity; - var frame = 0; - var _loop_1 = function (i) { - var nextFrame = frame; - var advanceFrameBy = function (count) { - nextFrame += count * _this.frameTimeFactor; - }; - var c = characters[i]; - switch (c) { - case ' ': - if (!runMode) { - advanceFrameBy(1); - } - break; - case '-': - advanceFrameBy(1); - break; - case '(': - groupStart = frame; - advanceFrameBy(1); - break; - case ')': - groupStart = -1; - advanceFrameBy(1); - break; - case '^': - if (subscriptionFrame !== Infinity) { - throw new Error("found a second subscription point '^' in a " + 'subscription marble diagram. There can only be one.'); - } - subscriptionFrame = groupStart > -1 ? groupStart : frame; - advanceFrameBy(1); - break; - case '!': - if (unsubscriptionFrame !== Infinity) { - throw new Error("found a second unsubscription point '!' in a " + 'subscription marble diagram. There can only be one.'); - } - unsubscriptionFrame = groupStart > -1 ? groupStart : frame; - break; - default: - if (runMode && c.match(/^[0-9]$/)) { - if (i === 0 || characters[i - 1] === ' ') { - var buffer = characters.slice(i).join(''); - var match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); - if (match) { - i += match[0].length - 1; - var duration = parseFloat(match[1]); - var unit = match[2]; - var durationInMs = void 0; - switch (unit) { - case 'ms': - durationInMs = duration; - break; - case 's': - durationInMs = duration * 1000; - break; - case 'm': - durationInMs = duration * 1000 * 60; - break; - default: - break; - } - advanceFrameBy(durationInMs / this_1.frameTimeFactor); - break; - } - } - } - throw new Error("there can only be '^' and '!' markers in a " + "subscription marble diagram. Found instead '" + c + "'."); - } - frame = nextFrame; - out_i_1 = i; - }; - var this_1 = this, out_i_1; - for (var i = 0; i < len; i++) { - _loop_1(i); - i = out_i_1; - } - if (unsubscriptionFrame < 0) { - return new SubscriptionLog(subscriptionFrame); - } - else { - return new SubscriptionLog(subscriptionFrame, unsubscriptionFrame); - } - }; - TestScheduler.parseMarbles = function (marbles, values, errorValue, materializeInnerObservables, runMode) { - var _this = this; - if (materializeInnerObservables === void 0) { materializeInnerObservables = false; } - if (runMode === void 0) { runMode = false; } - if (marbles.indexOf('!') !== -1) { - throw new Error('conventional marble diagrams cannot have the ' + 'unsubscription marker "!"'); - } - var characters = __spreadArray([], __read(marbles)); - var len = characters.length; - var testMessages = []; - var subIndex = runMode ? marbles.replace(/^[ ]+/, '').indexOf('^') : marbles.indexOf('^'); - var frame = subIndex === -1 ? 0 : subIndex * -this.frameTimeFactor; - var getValue = typeof values !== 'object' - ? function (x) { return x; } - : function (x) { - if (materializeInnerObservables && values[x] instanceof ColdObservable) { - return values[x].messages; - } - return values[x]; - }; - var groupStart = -1; - var _loop_2 = function (i) { - var nextFrame = frame; - var advanceFrameBy = function (count) { - nextFrame += count * _this.frameTimeFactor; - }; - var notification = void 0; - var c = characters[i]; - switch (c) { - case ' ': - if (!runMode) { - advanceFrameBy(1); - } - break; - case '-': - advanceFrameBy(1); - break; - case '(': - groupStart = frame; - advanceFrameBy(1); - break; - case ')': - groupStart = -1; - advanceFrameBy(1); - break; - case '|': - notification = COMPLETE_NOTIFICATION; - advanceFrameBy(1); - break; - case '^': - advanceFrameBy(1); - break; - case '#': - notification = errorNotification(errorValue || 'error'); - advanceFrameBy(1); - break; - default: - if (runMode && c.match(/^[0-9]$/)) { - if (i === 0 || characters[i - 1] === ' ') { - var buffer = characters.slice(i).join(''); - var match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); - if (match) { - i += match[0].length - 1; - var duration = parseFloat(match[1]); - var unit = match[2]; - var durationInMs = void 0; - switch (unit) { - case 'ms': - durationInMs = duration; - break; - case 's': - durationInMs = duration * 1000; - break; - case 'm': - durationInMs = duration * 1000 * 60; - break; - default: - break; - } - advanceFrameBy(durationInMs / this_2.frameTimeFactor); - break; - } - } - } - notification = nextNotification(getValue(c)); - advanceFrameBy(1); - break; - } - if (notification) { - testMessages.push({ frame: groupStart > -1 ? groupStart : frame, notification: notification }); - } - frame = nextFrame; - out_i_2 = i; - }; - var this_2 = this, out_i_2; - for (var i = 0; i < len; i++) { - _loop_2(i); - i = out_i_2; - } - return testMessages; - }; - TestScheduler.prototype.createAnimator = function () { - var _this = this; - if (!this.runMode) { - throw new Error('animate() must only be used in run mode'); - } - var lastHandle = 0; - var map; - var delegate = { - requestAnimationFrame: function (callback) { - if (!map) { - throw new Error('animate() was not called within run()'); - } - var handle = ++lastHandle; - map.set(handle, callback); - return handle; - }, - cancelAnimationFrame: function (handle) { - if (!map) { - throw new Error('animate() was not called within run()'); - } - map.delete(handle); - }, - }; - var animate = function (marbles) { - var e_1, _a; - if (map) { - throw new Error('animate() must not be called more than once within run()'); - } - if (/[|#]/.test(marbles)) { - throw new Error('animate() must not complete or error'); - } - map = new Map(); - var messages = TestScheduler.parseMarbles(marbles, undefined, undefined, undefined, true); - try { - for (var messages_1 = __values(messages), messages_1_1 = messages_1.next(); !messages_1_1.done; messages_1_1 = messages_1.next()) { - var message = messages_1_1.value; - _this.schedule(function () { - var e_2, _a; - var now = _this.now(); - var callbacks = Array.from(map.values()); - map.clear(); - try { - for (var callbacks_1 = (e_2 = void 0, __values(callbacks)), callbacks_1_1 = callbacks_1.next(); !callbacks_1_1.done; callbacks_1_1 = callbacks_1.next()) { - var callback = callbacks_1_1.value; - callback(now); - } - } - catch (e_2_1) { e_2 = { error: e_2_1 }; } - finally { - try { - if (callbacks_1_1 && !callbacks_1_1.done && (_a = callbacks_1.return)) _a.call(callbacks_1); - } - finally { if (e_2) throw e_2.error; } - } - }, message.frame); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (messages_1_1 && !messages_1_1.done && (_a = messages_1.return)) _a.call(messages_1); - } - finally { if (e_1) throw e_1.error; } - } - }; - return { animate: animate, delegate: delegate }; - }; - TestScheduler.prototype.createDelegates = function () { - var _this = this; - var lastHandle = 0; - var scheduleLookup = new Map(); - var run = function () { - var now = _this.now(); - var scheduledRecords = Array.from(scheduleLookup.values()); - var scheduledRecordsDue = scheduledRecords.filter(function (_a) { - var due = _a.due; - return due <= now; - }); - var dueImmediates = scheduledRecordsDue.filter(function (_a) { - var type = _a.type; - return type === 'immediate'; - }); - if (dueImmediates.length > 0) { - var _a = dueImmediates[0], handle = _a.handle, handler = _a.handler; - scheduleLookup.delete(handle); - handler(); - return; - } - var dueIntervals = scheduledRecordsDue.filter(function (_a) { - var type = _a.type; - return type === 'interval'; - }); - if (dueIntervals.length > 0) { - var firstDueInterval = dueIntervals[0]; - var duration = firstDueInterval.duration, handler = firstDueInterval.handler; - firstDueInterval.due = now + duration; - firstDueInterval.subscription = _this.schedule(run, duration); - handler(); - return; - } - var dueTimeouts = scheduledRecordsDue.filter(function (_a) { - var type = _a.type; - return type === 'timeout'; - }); - if (dueTimeouts.length > 0) { - var _b = dueTimeouts[0], handle = _b.handle, handler = _b.handler; - scheduleLookup.delete(handle); - handler(); - return; - } - throw new Error('Expected a due immediate or interval'); - }; - var immediate = { - setImmediate: function (handler) { - var handle = ++lastHandle; - scheduleLookup.set(handle, { - due: _this.now(), - duration: 0, - handle: handle, - handler: handler, - subscription: _this.schedule(run, 0), - type: 'immediate', - }); - return handle; - }, - clearImmediate: function (handle) { - var value = scheduleLookup.get(handle); - if (value) { - value.subscription.unsubscribe(); - scheduleLookup.delete(handle); - } - }, - }; - var interval = { - setInterval: function (handler, duration) { - if (duration === void 0) { duration = 0; } - var handle = ++lastHandle; - scheduleLookup.set(handle, { - due: _this.now() + duration, - duration: duration, - handle: handle, - handler: handler, - subscription: _this.schedule(run, duration), - type: 'interval', - }); - return handle; - }, - clearInterval: function (handle) { - var value = scheduleLookup.get(handle); - if (value) { - value.subscription.unsubscribe(); - scheduleLookup.delete(handle); - } - }, - }; - var timeout = { - setTimeout: function (handler, duration) { - if (duration === void 0) { duration = 0; } - var handle = ++lastHandle; - scheduleLookup.set(handle, { - due: _this.now() + duration, - duration: duration, - handle: handle, - handler: handler, - subscription: _this.schedule(run, duration), - type: 'timeout', - }); - return handle; - }, - clearTimeout: function (handle) { - var value = scheduleLookup.get(handle); - if (value) { - value.subscription.unsubscribe(); - scheduleLookup.delete(handle); - } - }, - }; - return { immediate: immediate, interval: interval, timeout: timeout }; - }; - TestScheduler.prototype.run = function (callback) { - var prevFrameTimeFactor = TestScheduler.frameTimeFactor; - var prevMaxFrames = this.maxFrames; - TestScheduler.frameTimeFactor = 1; - this.maxFrames = Infinity; - this.runMode = true; - var animator = this.createAnimator(); - var delegates = this.createDelegates(); - animationFrameProvider.delegate = animator.delegate; - dateTimestampProvider.delegate = this; - immediateProvider.delegate = delegates.immediate; - intervalProvider.delegate = delegates.interval; - timeoutProvider.delegate = delegates.timeout; - performanceTimestampProvider.delegate = this; - var helpers = { - cold: this.createColdObservable.bind(this), - hot: this.createHotObservable.bind(this), - flush: this.flush.bind(this), - time: this.createTime.bind(this), - expectObservable: this.expectObservable.bind(this), - expectSubscriptions: this.expectSubscriptions.bind(this), - animate: animator.animate, - }; - try { - var ret = callback(helpers); - this.flush(); - return ret; - } - finally { - TestScheduler.frameTimeFactor = prevFrameTimeFactor; - this.maxFrames = prevMaxFrames; - this.runMode = false; - animationFrameProvider.delegate = undefined; - dateTimestampProvider.delegate = undefined; - immediateProvider.delegate = undefined; - intervalProvider.delegate = undefined; - timeoutProvider.delegate = undefined; - performanceTimestampProvider.delegate = undefined; - } - }; - TestScheduler.frameTimeFactor = 10; - return TestScheduler; -}(VirtualTimeScheduler)); -export { TestScheduler }; -//# sourceMappingURL=TestScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/testing/TestScheduler.js.map b/node_modules/rxjs/dist/esm5/internal/testing/TestScheduler.js.map deleted file mode 100644 index 9033cd0..0000000 --- a/node_modules/rxjs/dist/esm5/internal/testing/TestScheduler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TestScheduler.js","sourceRoot":"","sources":["../../../../src/internal/testing/TestScheduler.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAExF,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACtG,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAE7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,IAAM,eAAe,GAAW,GAAG,CAAC;AAqBpC;IAAmC,iCAAoB;IAiCrD,uBAAmB,eAA+D;QAAlF,YACE,kBAAM,aAAa,EAAE,eAAe,CAAC,SACtC;QAFkB,qBAAe,GAAf,eAAe,CAAgD;QAtBlE,oBAAc,GAAyB,EAAE,CAAC;QAK1C,qBAAe,GAA0B,EAAE,CAAC;QAKpD,gBAAU,GAAoB,EAAE,CAAC;QAMjC,aAAO,GAAG,KAAK,CAAC;;IAQxB,CAAC;IAED,kCAAU,GAAV,UAAW,OAAe;QACxB,IAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAClF,IAAI,OAAO,KAAK,CAAC,CAAC,EAAE;YAClB,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;SAChF;QACD,OAAO,OAAO,GAAG,aAAa,CAAC,eAAe,CAAC;IACjD,CAAC;IAOD,4CAAoB,GAApB,UAAiC,OAAe,EAAE,MAAgC,EAAE,KAAW;QAC7F,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;YAC/B,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;SACxE;QACD,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;YAC/B,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;SAC1E;QACD,IAAM,QAAQ,GAAG,aAAa,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7F,IAAM,IAAI,GAAG,IAAI,cAAc,CAAI,QAAQ,EAAE,IAAI,CAAC,CAAC;QACnD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;IAOD,2CAAmB,GAAnB,UAAgC,OAAe,EAAE,MAAgC,EAAE,KAAW;QAC5F,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;YAC/B,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;SACzE;QACD,IAAM,QAAQ,GAAG,aAAa,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7F,IAAM,OAAO,GAAG,IAAI,aAAa,CAAI,QAAQ,EAAE,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClC,OAAO,OAAO,CAAC;IACjB,CAAC;IAEO,kDAA0B,GAAlC,UAAmC,UAA2B,EAAE,UAAkB;QAAlF,iBAcC;QAbC,IAAM,QAAQ,GAAkB,EAAE,CAAC;QACnC,UAAU,CAAC,SAAS,CAAC;YACnB,IAAI,EAAE,UAAC,KAAK;gBACV,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAI,CAAC,KAAK,GAAG,UAAU,EAAE,YAAY,EAAE,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC3F,CAAC;YACD,KAAK,EAAE,UAAC,KAAK;gBACX,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAI,CAAC,KAAK,GAAG,UAAU,EAAE,YAAY,EAAE,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC5F,CAAC;YACD,QAAQ,EAAE;gBACR,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAI,CAAC,KAAK,GAAG,UAAU,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC,CAAC;YACzF,CAAC;SACF,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,wCAAgB,GAAhB,UAAoB,UAAyB,EAAE,mBAAyC;QAAxF,iBAwDC;QAxD8C,oCAAA,EAAA,0BAAyC;QACtF,IAAM,MAAM,GAAkB,EAAE,CAAC;QACjC,IAAM,SAAS,GAAkB,EAAE,MAAM,QAAA,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QAC1D,IAAM,kBAAkB,GAAG,aAAa,CAAC,2BAA2B,CAAC,mBAAmB,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACxG,IAAM,iBAAiB,GAAG,kBAAkB,CAAC,eAAe,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,eAAe,CAAC;QACnH,IAAM,mBAAmB,GAAG,kBAAkB,CAAC,iBAAiB,CAAC;QACjE,IAAI,YAA0B,CAAC;QAE/B,IAAI,CAAC,QAAQ,CAAC;YACZ,YAAY,GAAG,UAAU,CAAC,SAAS,CAAC;gBAClC,IAAI,EAAE,UAAC,CAAC;oBAEN,IAAM,KAAK,GAAG,CAAC,YAAY,UAAU,CAAC,CAAC,CAAC,KAAI,CAAC,0BAA0B,CAAC,CAAC,EAAE,KAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC3F,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAI,CAAC,KAAK,EAAE,YAAY,EAAE,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBAC5E,CAAC;gBACD,KAAK,EAAE,UAAC,KAAK;oBACX,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAI,CAAC,KAAK,EAAE,YAAY,EAAE,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBAC7E,CAAC;gBACD,QAAQ,EAAE;oBACR,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAI,CAAC,KAAK,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC,CAAC;gBAC1E,CAAC;aACF,CAAC,CAAC;QACL,CAAC,EAAE,iBAAiB,CAAC,CAAC;QAEtB,IAAI,mBAAmB,KAAK,QAAQ,EAAE;YACpC,IAAI,CAAC,QAAQ,CAAC,cAAM,OAAA,YAAY,CAAC,WAAW,EAAE,EAA1B,CAA0B,EAAE,mBAAmB,CAAC,CAAC;SACtE;QAED,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACxB,IAAA,OAAO,GAAK,IAAI,QAAT,CAAU;QAEzB,OAAO;YACL,IAAI,EAAJ,UAAK,OAAe,EAAE,MAAY,EAAE,UAAgB;gBAClD,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC;gBACvB,SAAS,CAAC,QAAQ,GAAG,aAAa,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;YAC9F,CAAC;YACD,OAAO,EAAE,UAAC,KAAoB;gBAC5B,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC;gBACvB,SAAS,CAAC,QAAQ,GAAG,EAAE,CAAC;gBACxB,KAAI,CAAC,QAAQ,CAAC;oBACZ,YAAY,GAAG,KAAK,CAAC,SAAS,CAAC;wBAC7B,IAAI,EAAE,UAAC,CAAC;4BAEN,IAAM,KAAK,GAAG,CAAC,YAAY,UAAU,CAAC,CAAC,CAAC,KAAI,CAAC,0BAA0B,CAAC,CAAC,EAAE,KAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;4BAC3F,SAAS,CAAC,QAAS,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAI,CAAC,KAAK,EAAE,YAAY,EAAE,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;wBACzF,CAAC;wBACD,KAAK,EAAE,UAAC,KAAK;4BACX,SAAS,CAAC,QAAS,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAI,CAAC,KAAK,EAAE,YAAY,EAAE,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;wBAC1F,CAAC;wBACD,QAAQ,EAAE;4BACR,SAAS,CAAC,QAAS,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAI,CAAC,KAAK,EAAE,YAAY,EAAE,qBAAqB,EAAE,CAAC,CAAC;wBACvF,CAAC;qBACF,CAAC,CAAC;gBACL,CAAC,EAAE,iBAAiB,CAAC,CAAC;YACxB,CAAC;SACF,CAAC;IACJ,CAAC;IAED,2CAAmB,GAAnB,UAAoB,sBAAyC;QAC3D,IAAM,SAAS,GAAkB,EAAE,MAAM,EAAE,sBAAsB,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QAClF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACxB,IAAA,OAAO,GAAK,IAAI,QAAT,CAAU;QACzB,OAAO;YACL,IAAI,EAAJ,UAAK,qBAAwC;gBAC3C,IAAM,YAAY,GAAa,OAAO,qBAAqB,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,qBAAqB,CAAC;gBAC3H,SAAS,CAAC,KAAK,GAAG,IAAI,CAAC;gBACvB,SAAS,CAAC,QAAQ,GAAG,YAAY;qBAC9B,GAAG,CAAC,UAAC,OAAO,IAAK,OAAA,aAAa,CAAC,2BAA2B,CAAC,OAAO,EAAE,OAAO,CAAC,EAA3D,CAA2D,CAAC;qBAC7E,MAAM,CAAC,UAAC,OAAO,IAAK,OAAA,OAAO,CAAC,eAAe,KAAK,QAAQ,EAApC,CAAoC,CAAC,CAAC;YAC/D,CAAC;SACF,CAAC;IACJ,CAAC;IAED,6BAAK,GAAL;QAAA,iBAeC;QAdC,IAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC;QAC3C,OAAO,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE;YAChC,cAAc,CAAC,KAAK,EAAG,CAAC,KAAK,EAAE,CAAC;SACjC;QAED,iBAAM,KAAK,WAAE,CAAC;QAEd,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,UAAC,IAAI;YAC5C,IAAI,IAAI,CAAC,KAAK,EAAE;gBACd,KAAI,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACjD,OAAO,KAAK,CAAC;aACd;YACD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC;IAEM,yCAA2B,GAAlC,UAAmC,OAAsB,EAAE,OAAe;QAA1E,iBA+FC;QA/F0D,wBAAA,EAAA,eAAe;QACxE,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;YAC/B,OAAO,IAAI,eAAe,CAAC,QAAQ,CAAC,CAAC;SACtC;QAGD,IAAM,UAAU,4BAAO,OAAO,EAAC,CAAC;QAChC,IAAM,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC;QAC9B,IAAI,UAAU,GAAG,CAAC,CAAC,CAAC;QACpB,IAAI,iBAAiB,GAAG,QAAQ,CAAC;QACjC,IAAI,mBAAmB,GAAG,QAAQ,CAAC;QACnC,IAAI,KAAK,GAAG,CAAC,CAAC;gCAEL,CAAC;YACR,IAAI,SAAS,GAAG,KAAK,CAAC;YACtB,IAAM,cAAc,GAAG,UAAC,KAAa;gBACnC,SAAS,IAAI,KAAK,GAAG,KAAI,CAAC,eAAe,CAAC;YAC5C,CAAC,CAAC;YACF,IAAM,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;YACxB,QAAQ,CAAC,EAAE;gBACT,KAAK,GAAG;oBAEN,IAAI,CAAC,OAAO,EAAE;wBACZ,cAAc,CAAC,CAAC,CAAC,CAAC;qBACnB;oBACD,MAAM;gBACR,KAAK,GAAG;oBACN,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,UAAU,GAAG,KAAK,CAAC;oBACnB,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,UAAU,GAAG,CAAC,CAAC,CAAC;oBAChB,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,IAAI,iBAAiB,KAAK,QAAQ,EAAE;wBAClC,MAAM,IAAI,KAAK,CAAC,6CAA6C,GAAG,qDAAqD,CAAC,CAAC;qBACxH;oBACD,iBAAiB,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC;oBACzD,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,IAAI,mBAAmB,KAAK,QAAQ,EAAE;wBACpC,MAAM,IAAI,KAAK,CAAC,+CAA+C,GAAG,qDAAqD,CAAC,CAAC;qBAC1H;oBACD,mBAAmB,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC;oBAC3D,MAAM;gBACR;oBAEE,IAAI,OAAO,IAAI,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE;wBAGjC,IAAI,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE;4BACxC,IAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;4BAC5C,IAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;4BAC9D,IAAI,KAAK,EAAE;gCACT,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;gCACzB,IAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gCACtC,IAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;gCACtB,IAAI,YAAY,SAAQ,CAAC;gCAEzB,QAAQ,IAAI,EAAE;oCACZ,KAAK,IAAI;wCACP,YAAY,GAAG,QAAQ,CAAC;wCACxB,MAAM;oCACR,KAAK,GAAG;wCACN,YAAY,GAAG,QAAQ,GAAG,IAAI,CAAC;wCAC/B,MAAM;oCACR,KAAK,GAAG;wCACN,YAAY,GAAG,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAC;wCACpC,MAAM;oCACR;wCACE,MAAM;iCACT;gCAED,cAAc,CAAC,YAAa,GAAG,OAAK,eAAe,CAAC,CAAC;gCACrD,MAAM;6BACP;yBACF;qBACF;oBAED,MAAM,IAAI,KAAK,CAAC,6CAA6C,GAAG,8CAA8C,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;aAC9H;YAED,KAAK,GAAG,SAAS,CAAC;sBA1EX,CAAC;;;QAAV,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE;oBAAnB,CAAC;YAAD,CAAC;SA2ET;QAED,IAAI,mBAAmB,GAAG,CAAC,EAAE;YAC3B,OAAO,IAAI,eAAe,CAAC,iBAAiB,CAAC,CAAC;SAC/C;aAAM;YACL,OAAO,IAAI,eAAe,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAC;SACpE;IACH,CAAC;IAEM,0BAAY,GAAnB,UACE,OAAe,EACf,MAAY,EACZ,UAAgB,EAChB,2BAA4C,EAC5C,OAAe;QALjB,iBAgHC;QA5GC,4CAAA,EAAA,mCAA4C;QAC5C,wBAAA,EAAA,eAAe;QAEf,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;YAC/B,MAAM,IAAI,KAAK,CAAC,+CAA+C,GAAG,2BAA2B,CAAC,CAAC;SAChG;QAGD,IAAM,UAAU,4BAAO,OAAO,EAAC,CAAC;QAChC,IAAM,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC;QAC9B,IAAM,YAAY,GAAkB,EAAE,CAAC;QACvC,IAAM,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC5F,IAAI,KAAK,GAAG,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC;QACnE,IAAM,QAAQ,GACZ,OAAO,MAAM,KAAK,QAAQ;YACxB,CAAC,CAAC,UAAC,CAAM,IAAK,OAAA,CAAC,EAAD,CAAC;YACf,CAAC,CAAC,UAAC,CAAM;gBAEL,IAAI,2BAA2B,IAAI,MAAM,CAAC,CAAC,CAAC,YAAY,cAAc,EAAE;oBACtE,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;iBAC3B;gBACD,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;YACnB,CAAC,CAAC;QACR,IAAI,UAAU,GAAG,CAAC,CAAC,CAAC;gCAEX,CAAC;YACR,IAAI,SAAS,GAAG,KAAK,CAAC;YACtB,IAAM,cAAc,GAAG,UAAC,KAAa;gBACnC,SAAS,IAAI,KAAK,GAAG,KAAI,CAAC,eAAe,CAAC;YAC5C,CAAC,CAAC;YAEF,IAAI,YAAY,SAAyC,CAAC;YAC1D,IAAM,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;YACxB,QAAQ,CAAC,EAAE;gBACT,KAAK,GAAG;oBAEN,IAAI,CAAC,OAAO,EAAE;wBACZ,cAAc,CAAC,CAAC,CAAC,CAAC;qBACnB;oBACD,MAAM;gBACR,KAAK,GAAG;oBACN,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,UAAU,GAAG,KAAK,CAAC;oBACnB,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,UAAU,GAAG,CAAC,CAAC,CAAC;oBAChB,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,YAAY,GAAG,qBAAqB,CAAC;oBACrC,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR,KAAK,GAAG;oBACN,YAAY,GAAG,iBAAiB,CAAC,UAAU,IAAI,OAAO,CAAC,CAAC;oBACxD,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;gBACR;oBAEE,IAAI,OAAO,IAAI,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE;wBAGjC,IAAI,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE;4BACxC,IAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;4BAC5C,IAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;4BAC9D,IAAI,KAAK,EAAE;gCACT,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;gCACzB,IAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gCACtC,IAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;gCACtB,IAAI,YAAY,SAAQ,CAAC;gCAEzB,QAAQ,IAAI,EAAE;oCACZ,KAAK,IAAI;wCACP,YAAY,GAAG,QAAQ,CAAC;wCACxB,MAAM;oCACR,KAAK,GAAG;wCACN,YAAY,GAAG,QAAQ,GAAG,IAAI,CAAC;wCAC/B,MAAM;oCACR,KAAK,GAAG;wCACN,YAAY,GAAG,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAC;wCACpC,MAAM;oCACR;wCACE,MAAM;iCACT;gCAED,cAAc,CAAC,YAAa,GAAG,OAAK,eAAe,CAAC,CAAC;gCACrD,MAAM;6BACP;yBACF;qBACF;oBAED,YAAY,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC7C,cAAc,CAAC,CAAC,CAAC,CAAC;oBAClB,MAAM;aACT;YAED,IAAI,YAAY,EAAE;gBAChB,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,EAAE,YAAY,cAAA,EAAE,CAAC,CAAC;aAClF;YAED,KAAK,GAAG,SAAS,CAAC;sBAhFX,CAAC;;;QAAV,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE;oBAAnB,CAAC;YAAD,CAAC;SAiFT;QACD,OAAO,YAAY,CAAC;IACtB,CAAC;IAEO,sCAAc,GAAtB;QAAA,iBA6DC;QA5DC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACjB,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;SAC5D;QAWD,IAAI,UAAU,GAAG,CAAC,CAAC;QACnB,IAAI,GAAkD,CAAC;QAEvD,IAAM,QAAQ,GAAG;YACf,qBAAqB,EAArB,UAAsB,QAA8B;gBAClD,IAAI,CAAC,GAAG,EAAE;oBACR,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;iBAC1D;gBACD,IAAM,MAAM,GAAG,EAAE,UAAU,CAAC;gBAC5B,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;gBAC1B,OAAO,MAAM,CAAC;YAChB,CAAC;YACD,oBAAoB,EAApB,UAAqB,MAAc;gBACjC,IAAI,CAAC,GAAG,EAAE;oBACR,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;iBAC1D;gBACD,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACrB,CAAC;SACF,CAAC;QAEF,IAAM,OAAO,GAAG,UAAC,OAAe;;YAC9B,IAAI,GAAG,EAAE;gBACP,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;aAC7E;YACD,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;gBACxB,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;aACzD;YACD,GAAG,GAAG,IAAI,GAAG,EAAgC,CAAC;YAC9C,IAAM,QAAQ,GAAG,aAAa,CAAC,YAAY,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;;gBAC5F,KAAsB,IAAA,aAAA,SAAA,QAAQ,CAAA,kCAAA,wDAAE;oBAA3B,IAAM,OAAO,qBAAA;oBAChB,KAAI,CAAC,QAAQ,CAAC;;wBACZ,IAAM,GAAG,GAAG,KAAI,CAAC,GAAG,EAAE,CAAC;wBAMvB,IAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,GAAI,CAAC,MAAM,EAAE,CAAC,CAAC;wBAC5C,GAAI,CAAC,KAAK,EAAE,CAAC;;4BACb,KAAuB,IAAA,6BAAA,SAAA,SAAS,CAAA,CAAA,oCAAA,2DAAE;gCAA7B,IAAM,QAAQ,sBAAA;gCACjB,QAAQ,CAAC,GAAG,CAAC,CAAC;6BACf;;;;;;;;;oBACH,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;iBACnB;;;;;;;;;QACH,CAAC,CAAC;QAEF,OAAO,EAAE,OAAO,SAAA,EAAE,QAAQ,UAAA,EAAE,CAAC;IAC/B,CAAC;IAEO,uCAAe,GAAvB;QAAA,iBA4IC;QAhIC,IAAI,UAAU,GAAG,CAAC,CAAC;QACnB,IAAM,cAAc,GAAG,IAAI,GAAG,EAU3B,CAAC;QAEJ,IAAM,GAAG,GAAG;YAIV,IAAM,GAAG,GAAG,KAAI,CAAC,GAAG,EAAE,CAAC;YACvB,IAAM,gBAAgB,GAAG,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC;YAC7D,IAAM,mBAAmB,GAAG,gBAAgB,CAAC,MAAM,CAAC,UAAC,EAAO;oBAAL,GAAG,SAAA;gBAAO,OAAA,GAAG,IAAI,GAAG;YAAV,CAAU,CAAC,CAAC;YAC7E,IAAM,aAAa,GAAG,mBAAmB,CAAC,MAAM,CAAC,UAAC,EAAQ;oBAAN,IAAI,UAAA;gBAAO,OAAA,IAAI,KAAK,WAAW;YAApB,CAAoB,CAAC,CAAC;YACrF,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE;gBACtB,IAAA,KAAsB,aAAa,CAAC,CAAC,CAAC,EAApC,MAAM,YAAA,EAAE,OAAO,aAAqB,CAAC;gBAC7C,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBAC9B,OAAO,EAAE,CAAC;gBACV,OAAO;aACR;YACD,IAAM,YAAY,GAAG,mBAAmB,CAAC,MAAM,CAAC,UAAC,EAAQ;oBAAN,IAAI,UAAA;gBAAO,OAAA,IAAI,KAAK,UAAU;YAAnB,CAAmB,CAAC,CAAC;YACnF,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC3B,IAAM,gBAAgB,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;gBACjC,IAAA,QAAQ,GAAc,gBAAgB,SAA9B,EAAE,OAAO,GAAK,gBAAgB,QAArB,CAAsB;gBAC/C,gBAAgB,CAAC,GAAG,GAAG,GAAG,GAAG,QAAQ,CAAC;gBAItC,gBAAgB,CAAC,YAAY,GAAG,KAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;gBAC7D,OAAO,EAAE,CAAC;gBACV,OAAO;aACR;YACD,IAAM,WAAW,GAAG,mBAAmB,CAAC,MAAM,CAAC,UAAC,EAAQ;oBAAN,IAAI,UAAA;gBAAO,OAAA,IAAI,KAAK,SAAS;YAAlB,CAAkB,CAAC,CAAC;YACjF,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;gBACpB,IAAA,KAAsB,WAAW,CAAC,CAAC,CAAC,EAAlC,MAAM,YAAA,EAAE,OAAO,aAAmB,CAAC;gBAC3C,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBAC9B,OAAO,EAAE,CAAC;gBACV,OAAO;aACR;YACD,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;QAC1D,CAAC,CAAC;QAcF,IAAM,SAAS,GAAG;YAChB,YAAY,EAAE,UAAC,OAAmB;gBAChC,IAAM,MAAM,GAAG,EAAE,UAAU,CAAC;gBAC5B,cAAc,CAAC,GAAG,CAAC,MAAM,EAAE;oBACzB,GAAG,EAAE,KAAI,CAAC,GAAG,EAAE;oBACf,QAAQ,EAAE,CAAC;oBACX,MAAM,QAAA;oBACN,OAAO,SAAA;oBACP,YAAY,EAAE,KAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;oBACnC,IAAI,EAAE,WAAW;iBAClB,CAAC,CAAC;gBACH,OAAO,MAAM,CAAC;YAChB,CAAC;YACD,cAAc,EAAE,UAAC,MAAmB;gBAClC,IAAM,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;gBACzC,IAAI,KAAK,EAAE;oBACT,KAAK,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;oBACjC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;iBAC/B;YACH,CAAC;SACF,CAAC;QAEF,IAAM,QAAQ,GAAG;YACf,WAAW,EAAE,UAAC,OAAmB,EAAE,QAAY;gBAAZ,yBAAA,EAAA,YAAY;gBAC7C,IAAM,MAAM,GAAG,EAAE,UAAU,CAAC;gBAC5B,cAAc,CAAC,GAAG,CAAC,MAAM,EAAE;oBACzB,GAAG,EAAE,KAAI,CAAC,GAAG,EAAE,GAAG,QAAQ;oBAC1B,QAAQ,UAAA;oBACR,MAAM,QAAA;oBACN,OAAO,SAAA;oBACP,YAAY,EAAE,KAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;oBAC1C,IAAI,EAAE,UAAU;iBACjB,CAAC,CAAC;gBACH,OAAO,MAAM,CAAC;YAChB,CAAC;YACD,aAAa,EAAE,UAAC,MAAmB;gBACjC,IAAM,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;gBACzC,IAAI,KAAK,EAAE;oBACT,KAAK,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;oBACjC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;iBAC/B;YACH,CAAC;SACF,CAAC;QAEF,IAAM,OAAO,GAAG;YACd,UAAU,EAAE,UAAC,OAAmB,EAAE,QAAY;gBAAZ,yBAAA,EAAA,YAAY;gBAC5C,IAAM,MAAM,GAAG,EAAE,UAAU,CAAC;gBAC5B,cAAc,CAAC,GAAG,CAAC,MAAM,EAAE;oBACzB,GAAG,EAAE,KAAI,CAAC,GAAG,EAAE,GAAG,QAAQ;oBAC1B,QAAQ,UAAA;oBACR,MAAM,QAAA;oBACN,OAAO,SAAA;oBACP,YAAY,EAAE,KAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;oBAC1C,IAAI,EAAE,SAAS;iBAChB,CAAC,CAAC;gBACH,OAAO,MAAM,CAAC;YAChB,CAAC;YACD,YAAY,EAAE,UAAC,MAAmB;gBAChC,IAAM,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;gBACzC,IAAI,KAAK,EAAE;oBACT,KAAK,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;oBACjC,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;iBAC/B;YACH,CAAC;SACF,CAAC;QAEF,OAAO,EAAE,SAAS,WAAA,EAAE,QAAQ,UAAA,EAAE,OAAO,SAAA,EAAE,CAAC;IAC1C,CAAC;IAUD,2BAAG,GAAH,UAAO,QAAoC;QACzC,IAAM,mBAAmB,GAAG,aAAa,CAAC,eAAe,CAAC;QAC1D,IAAM,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC;QAErC,aAAa,CAAC,eAAe,GAAG,CAAC,CAAC;QAClC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAEpB,IAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QACvC,IAAM,SAAS,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QAEzC,sBAAsB,CAAC,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;QACpD,qBAAqB,CAAC,QAAQ,GAAG,IAAI,CAAC;QACtC,iBAAiB,CAAC,QAAQ,GAAG,SAAS,CAAC,SAAS,CAAC;QACjD,gBAAgB,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;QAC/C,eAAe,CAAC,QAAQ,GAAG,SAAS,CAAC,OAAO,CAAC;QAC7C,4BAA4B,CAAC,QAAQ,GAAG,IAAI,CAAC;QAE7C,IAAM,OAAO,GAAe;YAC1B,IAAI,EAAE,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC;YAC1C,GAAG,EAAE,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC;YACxC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;YAC5B,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;YAChC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC;YAClD,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC;YACxD,OAAO,EAAE,QAAQ,CAAC,OAAO;SAC1B,CAAC;QACF,IAAI;YACF,IAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;YAC9B,IAAI,CAAC,KAAK,EAAE,CAAC;YACb,OAAO,GAAG,CAAC;SACZ;gBAAS;YACR,aAAa,CAAC,eAAe,GAAG,mBAAmB,CAAC;YACpD,IAAI,CAAC,SAAS,GAAG,aAAa,CAAC;YAC/B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;YACrB,sBAAsB,CAAC,QAAQ,GAAG,SAAS,CAAC;YAC5C,qBAAqB,CAAC,QAAQ,GAAG,SAAS,CAAC;YAC3C,iBAAiB,CAAC,QAAQ,GAAG,SAAS,CAAC;YACvC,gBAAgB,CAAC,QAAQ,GAAG,SAAS,CAAC;YACtC,eAAe,CAAC,QAAQ,GAAG,SAAS,CAAC;YACrC,4BAA4B,CAAC,QAAQ,GAAG,SAAS,CAAC;SACnD;IACH,CAAC;IApoBM,6BAAe,GAAG,EAAE,CAAC;IAqoB9B,oBAAC;CAAA,AA3oBD,CAAmC,oBAAoB,GA2oBtD;SA3oBY,aAAa"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/types.js b/node_modules/rxjs/dist/esm5/internal/types.js deleted file mode 100644 index 718fd38..0000000 --- a/node_modules/rxjs/dist/esm5/internal/types.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/types.js.map b/node_modules/rxjs/dist/esm5/internal/types.js.map deleted file mode 100644 index 493d291..0000000 --- a/node_modules/rxjs/dist/esm5/internal/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/internal/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/ArgumentOutOfRangeError.js b/node_modules/rxjs/dist/esm5/internal/util/ArgumentOutOfRangeError.js deleted file mode 100644 index 49e3be7..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/ArgumentOutOfRangeError.js +++ /dev/null @@ -1,9 +0,0 @@ -import { createErrorClass } from './createErrorClass'; -export var ArgumentOutOfRangeError = createErrorClass(function (_super) { - return function ArgumentOutOfRangeErrorImpl() { - _super(this); - this.name = 'ArgumentOutOfRangeError'; - this.message = 'argument out of range'; - }; -}); -//# sourceMappingURL=ArgumentOutOfRangeError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/ArgumentOutOfRangeError.js.map b/node_modules/rxjs/dist/esm5/internal/util/ArgumentOutOfRangeError.js.map deleted file mode 100644 index 2fb416d..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/ArgumentOutOfRangeError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ArgumentOutOfRangeError.js","sourceRoot":"","sources":["../../../../src/internal/util/ArgumentOutOfRangeError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAoBtD,MAAM,CAAC,IAAM,uBAAuB,GAAgC,gBAAgB,CAClF,UAAC,MAAM;IACL,OAAA,SAAS,2BAA2B;QAClC,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,uBAAuB,CAAC;IACzC,CAAC;AAJD,CAIC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/EmptyError.js b/node_modules/rxjs/dist/esm5/internal/util/EmptyError.js deleted file mode 100644 index 0dc48bc..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/EmptyError.js +++ /dev/null @@ -1,9 +0,0 @@ -import { createErrorClass } from './createErrorClass'; -export var EmptyError = createErrorClass(function (_super) { - return function EmptyErrorImpl() { - _super(this); - this.name = 'EmptyError'; - this.message = 'no elements in sequence'; - }; -}); -//# sourceMappingURL=EmptyError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/EmptyError.js.map b/node_modules/rxjs/dist/esm5/internal/util/EmptyError.js.map deleted file mode 100644 index 9b97528..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/EmptyError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"EmptyError.js","sourceRoot":"","sources":["../../../../src/internal/util/EmptyError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAsBtD,MAAM,CAAC,IAAM,UAAU,GAAmB,gBAAgB,CACxD,UAAC,MAAM;IACL,OAAA,SAAS,cAAc;QACrB,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;QACzB,IAAI,CAAC,OAAO,GAAG,yBAAyB,CAAC;IAC3C,CAAC;AAJD,CAIC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/Immediate.js b/node_modules/rxjs/dist/esm5/internal/util/Immediate.js deleted file mode 100644 index c601bff..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/Immediate.js +++ /dev/null @@ -1,30 +0,0 @@ -var nextHandle = 1; -var resolved; -var activeHandles = {}; -function findAndClearHandle(handle) { - if (handle in activeHandles) { - delete activeHandles[handle]; - return true; - } - return false; -} -export var Immediate = { - setImmediate: function (cb) { - var handle = nextHandle++; - activeHandles[handle] = true; - if (!resolved) { - resolved = Promise.resolve(); - } - resolved.then(function () { return findAndClearHandle(handle) && cb(); }); - return handle; - }, - clearImmediate: function (handle) { - findAndClearHandle(handle); - }, -}; -export var TestTools = { - pending: function () { - return Object.keys(activeHandles).length; - } -}; -//# sourceMappingURL=Immediate.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/Immediate.js.map b/node_modules/rxjs/dist/esm5/internal/util/Immediate.js.map deleted file mode 100644 index c45eecc..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/Immediate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Immediate.js","sourceRoot":"","sources":["../../../../src/internal/util/Immediate.ts"],"names":[],"mappings":"AAAA,IAAI,UAAU,GAAG,CAAC,CAAC;AAEnB,IAAI,QAAsB,CAAC;AAC3B,IAAM,aAAa,GAA2B,EAAE,CAAC;AAOjD,SAAS,kBAAkB,CAAC,MAAc;IACxC,IAAI,MAAM,IAAI,aAAa,EAAE;QAC3B,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAKD,MAAM,CAAC,IAAM,SAAS,GAAG;IACvB,YAAY,EAAZ,UAAa,EAAc;QACzB,IAAM,MAAM,GAAG,UAAU,EAAE,CAAC;QAC5B,aAAa,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;QAC7B,IAAI,CAAC,QAAQ,EAAE;YACb,QAAQ,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;SAC9B;QACD,QAAQ,CAAC,IAAI,CAAC,cAAM,OAAA,kBAAkB,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,EAAlC,CAAkC,CAAC,CAAC;QACxD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,cAAc,EAAd,UAAe,MAAc;QAC3B,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;CACF,CAAC;AAKF,MAAM,CAAC,IAAM,SAAS,GAAG;IACvB,OAAO;QACL,OAAO,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC;IAC3C,CAAC;CACF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/NotFoundError.js b/node_modules/rxjs/dist/esm5/internal/util/NotFoundError.js deleted file mode 100644 index 2accd86..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/NotFoundError.js +++ /dev/null @@ -1,9 +0,0 @@ -import { createErrorClass } from './createErrorClass'; -export var NotFoundError = createErrorClass(function (_super) { - return function NotFoundErrorImpl(message) { - _super(this); - this.name = 'NotFoundError'; - this.message = message; - }; -}); -//# sourceMappingURL=NotFoundError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/NotFoundError.js.map b/node_modules/rxjs/dist/esm5/internal/util/NotFoundError.js.map deleted file mode 100644 index bfc3462..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/NotFoundError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NotFoundError.js","sourceRoot":"","sources":["../../../../src/internal/util/NotFoundError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAkBtD,MAAM,CAAC,IAAM,aAAa,GAAsB,gBAAgB,CAC9D,UAAC,MAAM;IACL,OAAA,SAAS,iBAAiB,CAAY,OAAe;QACnD,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;AAJD,CAIC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js b/node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js deleted file mode 100644 index 3289aa0..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js +++ /dev/null @@ -1,9 +0,0 @@ -import { createErrorClass } from './createErrorClass'; -export var ObjectUnsubscribedError = createErrorClass(function (_super) { - return function ObjectUnsubscribedErrorImpl() { - _super(this); - this.name = 'ObjectUnsubscribedError'; - this.message = 'object unsubscribed'; - }; -}); -//# sourceMappingURL=ObjectUnsubscribedError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js.map b/node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js.map deleted file mode 100644 index d980ac1..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ObjectUnsubscribedError.js","sourceRoot":"","sources":["../../../../src/internal/util/ObjectUnsubscribedError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAqBtD,MAAM,CAAC,IAAM,uBAAuB,GAAgC,gBAAgB,CAClF,UAAC,MAAM;IACL,OAAA,SAAS,2BAA2B;QAClC,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,qBAAqB,CAAC;IACvC,CAAC;AAJD,CAIC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/SequenceError.js b/node_modules/rxjs/dist/esm5/internal/util/SequenceError.js deleted file mode 100644 index d2ec9ac..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/SequenceError.js +++ /dev/null @@ -1,9 +0,0 @@ -import { createErrorClass } from './createErrorClass'; -export var SequenceError = createErrorClass(function (_super) { - return function SequenceErrorImpl(message) { - _super(this); - this.name = 'SequenceError'; - this.message = message; - }; -}); -//# sourceMappingURL=SequenceError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/SequenceError.js.map b/node_modules/rxjs/dist/esm5/internal/util/SequenceError.js.map deleted file mode 100644 index 53a6633..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/SequenceError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SequenceError.js","sourceRoot":"","sources":["../../../../src/internal/util/SequenceError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAkBtD,MAAM,CAAC,IAAM,aAAa,GAAsB,gBAAgB,CAC9D,UAAC,MAAM;IACL,OAAA,SAAS,iBAAiB,CAAY,OAAe;QACnD,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;AAJD,CAIC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js b/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js deleted file mode 100644 index 99a3ee3..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +++ /dev/null @@ -1,12 +0,0 @@ -import { createErrorClass } from './createErrorClass'; -export var UnsubscriptionError = createErrorClass(function (_super) { - return function UnsubscriptionErrorImpl(errors) { - _super(this); - this.message = errors - ? errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ') - : ''; - this.name = 'UnsubscriptionError'; - this.errors = errors; - }; -}); -//# sourceMappingURL=UnsubscriptionError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map b/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map deleted file mode 100644 index 4b1948d..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UnsubscriptionError.js","sourceRoot":"","sources":["../../../../src/internal/util/UnsubscriptionError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAkBtD,MAAM,CAAC,IAAM,mBAAmB,GAA4B,gBAAgB,CAC1E,UAAC,MAAM;IACL,OAAA,SAAS,uBAAuB,CAAY,MAA0B;QACpE,MAAM,CAAC,IAAI,CAAC,CAAC;QACb,IAAI,CAAC,OAAO,GAAG,MAAM;YACnB,CAAC,CAAI,MAAM,CAAC,MAAM,iDACxB,MAAM,CAAC,GAAG,CAAC,UAAC,GAAG,EAAE,CAAC,IAAK,OAAG,CAAC,GAAG,CAAC,UAAK,GAAG,CAAC,QAAQ,EAAI,EAA7B,CAA6B,CAAC,CAAC,IAAI,CAAC,MAAM,CAAG;YAC9D,CAAC,CAAC,EAAE,CAAC;QACP,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;AARD,CAQC,CACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/applyMixins.js b/node_modules/rxjs/dist/esm5/internal/util/applyMixins.js deleted file mode 100644 index 96eb49a..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/applyMixins.js +++ /dev/null @@ -1,11 +0,0 @@ -export function applyMixins(derivedCtor, baseCtors) { - for (var i = 0, len = baseCtors.length; i < len; i++) { - var baseCtor = baseCtors[i]; - var propertyKeys = Object.getOwnPropertyNames(baseCtor.prototype); - for (var j = 0, len2 = propertyKeys.length; j < len2; j++) { - var name_1 = propertyKeys[j]; - derivedCtor.prototype[name_1] = baseCtor.prototype[name_1]; - } - } -} -//# sourceMappingURL=applyMixins.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/applyMixins.js.map b/node_modules/rxjs/dist/esm5/internal/util/applyMixins.js.map deleted file mode 100644 index cab2079..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/applyMixins.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"applyMixins.js","sourceRoot":"","sources":["../../../../src/internal/util/applyMixins.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,WAAW,CAAC,WAAgB,EAAE,SAAgB;IAC5D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;QACpD,IAAM,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAM,YAAY,GAAG,MAAM,CAAC,mBAAmB,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACpE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;YACzD,IAAM,MAAI,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;YAC7B,WAAW,CAAC,SAAS,CAAC,MAAI,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,MAAI,CAAC,CAAC;SACxD;KACF;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/args.js b/node_modules/rxjs/dist/esm5/internal/util/args.js deleted file mode 100644 index ead7fc5..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/args.js +++ /dev/null @@ -1,15 +0,0 @@ -import { isFunction } from './isFunction'; -import { isScheduler } from './isScheduler'; -function last(arr) { - return arr[arr.length - 1]; -} -export function popResultSelector(args) { - return isFunction(last(args)) ? args.pop() : undefined; -} -export function popScheduler(args) { - return isScheduler(last(args)) ? args.pop() : undefined; -} -export function popNumber(args, defaultValue) { - return typeof last(args) === 'number' ? args.pop() : defaultValue; -} -//# sourceMappingURL=args.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/args.js.map b/node_modules/rxjs/dist/esm5/internal/util/args.js.map deleted file mode 100644 index 707c54c..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/args.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"args.js","sourceRoot":"","sources":["../../../../src/internal/util/args.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,SAAS,IAAI,CAAI,GAAQ;IACvB,OAAO,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,IAAW;IAC3C,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAW;IACtC,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,IAAW,EAAE,YAAoB;IACzD,OAAO,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAG,CAAC,CAAC,CAAC,YAAY,CAAC;AACrE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js b/node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js deleted file mode 100644 index 66ffb09..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js +++ /dev/null @@ -1,22 +0,0 @@ -var isArray = Array.isArray; -var getPrototypeOf = Object.getPrototypeOf, objectProto = Object.prototype, getKeys = Object.keys; -export function argsArgArrayOrObject(args) { - if (args.length === 1) { - var first_1 = args[0]; - if (isArray(first_1)) { - return { args: first_1, keys: null }; - } - if (isPOJO(first_1)) { - var keys = getKeys(first_1); - return { - args: keys.map(function (key) { return first_1[key]; }), - keys: keys, - }; - } - } - return { args: args, keys: null }; -} -function isPOJO(obj) { - return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto; -} -//# sourceMappingURL=argsArgArrayOrObject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js.map b/node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js.map deleted file mode 100644 index baf2e0f..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/argsArgArrayOrObject.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"argsArgArrayOrObject.js","sourceRoot":"","sources":["../../../../src/internal/util/argsArgArrayOrObject.ts"],"names":[],"mappings":"AAAQ,IAAA,OAAO,GAAK,KAAK,QAAV,CAAW;AAClB,IAAA,cAAc,GAA4C,MAAM,eAAlD,EAAa,WAAW,GAAoB,MAAM,UAA1B,EAAQ,OAAO,GAAK,MAAM,KAAX,CAAY;AAQzE,MAAM,UAAU,oBAAoB,CAAiC,IAAuB;IAC1F,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACrB,IAAM,OAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,OAAO,CAAC,OAAK,CAAC,EAAE;YAClB,OAAO,EAAE,IAAI,EAAE,OAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;SACpC;QACD,IAAI,MAAM,CAAC,OAAK,CAAC,EAAE;YACjB,IAAM,IAAI,GAAG,OAAO,CAAC,OAAK,CAAC,CAAC;YAC5B,OAAO;gBACL,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,UAAC,GAAG,IAAK,OAAA,OAAK,CAAC,GAAG,CAAC,EAAV,CAAU,CAAC;gBACnC,IAAI,MAAA;aACL,CAAC;SACH;KACF;IAED,OAAO,EAAE,IAAI,EAAE,IAAW,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAC3C,CAAC;AAED,SAAS,MAAM,CAAC,GAAQ;IACtB,OAAO,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,cAAc,CAAC,GAAG,CAAC,KAAK,WAAW,CAAC;AAC/E,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/argsOrArgArray.js b/node_modules/rxjs/dist/esm5/internal/util/argsOrArgArray.js deleted file mode 100644 index 58c482c..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/argsOrArgArray.js +++ /dev/null @@ -1,5 +0,0 @@ -var isArray = Array.isArray; -export function argsOrArgArray(args) { - return args.length === 1 && isArray(args[0]) ? args[0] : args; -} -//# sourceMappingURL=argsOrArgArray.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/argsOrArgArray.js.map b/node_modules/rxjs/dist/esm5/internal/util/argsOrArgArray.js.map deleted file mode 100644 index c789b98..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/argsOrArgArray.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"argsOrArgArray.js","sourceRoot":"","sources":["../../../../src/internal/util/argsOrArgArray.ts"],"names":[],"mappings":"AAAQ,IAAA,OAAO,GAAK,KAAK,QAAV,CAAW;AAM1B,MAAM,UAAU,cAAc,CAAI,IAAiB;IACjD,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,IAAY,CAAC;AACzE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js b/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js deleted file mode 100644 index dc6306d..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +++ /dev/null @@ -1,7 +0,0 @@ -export function arrRemove(arr, item) { - if (arr) { - var index = arr.indexOf(item); - 0 <= index && arr.splice(index, 1); - } -} -//# sourceMappingURL=arrRemove.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map b/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map deleted file mode 100644 index 513cb14..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"arrRemove.js","sourceRoot":"","sources":["../../../../src/internal/util/arrRemove.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,SAAS,CAAI,GAA2B,EAAE,IAAO;IAC/D,IAAI,GAAG,EAAE;QACP,IAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC,IAAI,KAAK,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;KACpC;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js b/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js deleted file mode 100644 index 3236fb3..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +++ /dev/null @@ -1,11 +0,0 @@ -export function createErrorClass(createImpl) { - var _super = function (instance) { - Error.call(instance); - instance.stack = new Error().stack; - }; - var ctorFunc = createImpl(_super); - ctorFunc.prototype = Object.create(Error.prototype); - ctorFunc.prototype.constructor = ctorFunc; - return ctorFunc; -} -//# sourceMappingURL=createErrorClass.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map b/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map deleted file mode 100644 index 619908d..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"createErrorClass.js","sourceRoot":"","sources":["../../../../src/internal/util/createErrorClass.ts"],"names":[],"mappings":"AASA,MAAM,UAAU,gBAAgB,CAAI,UAAgC;IAClE,IAAM,MAAM,GAAG,UAAC,QAAa;QAC3B,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrB,QAAQ,CAAC,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC,KAAK,CAAC;IACrC,CAAC,CAAC;IAEF,IAAM,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IACpC,QAAQ,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACpD,QAAQ,CAAC,SAAS,CAAC,WAAW,GAAG,QAAQ,CAAC;IAC1C,OAAO,QAAQ,CAAC;AAClB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/createObject.js b/node_modules/rxjs/dist/esm5/internal/util/createObject.js deleted file mode 100644 index 0908ef4..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/createObject.js +++ /dev/null @@ -1,4 +0,0 @@ -export function createObject(keys, values) { - return keys.reduce(function (result, key, i) { return ((result[key] = values[i]), result); }, {}); -} -//# sourceMappingURL=createObject.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/createObject.js.map b/node_modules/rxjs/dist/esm5/internal/util/createObject.js.map deleted file mode 100644 index 5c3f075..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/createObject.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"createObject.js","sourceRoot":"","sources":["../../../../src/internal/util/createObject.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,YAAY,CAAC,IAAc,EAAE,MAAa;IACxD,OAAO,IAAI,CAAC,MAAM,CAAC,UAAC,MAAM,EAAE,GAAG,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAnC,CAAmC,EAAE,EAAS,CAAC,CAAC;AACzF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/errorContext.js b/node_modules/rxjs/dist/esm5/internal/util/errorContext.js deleted file mode 100644 index a61d486..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +++ /dev/null @@ -1,28 +0,0 @@ -import { config } from '../config'; -var context = null; -export function errorContext(cb) { - if (config.useDeprecatedSynchronousErrorHandling) { - var isRoot = !context; - if (isRoot) { - context = { errorThrown: false, error: null }; - } - cb(); - if (isRoot) { - var _a = context, errorThrown = _a.errorThrown, error = _a.error; - context = null; - if (errorThrown) { - throw error; - } - } - } - else { - cb(); - } -} -export function captureError(err) { - if (config.useDeprecatedSynchronousErrorHandling && context) { - context.errorThrown = true; - context.error = err; - } -} -//# sourceMappingURL=errorContext.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map b/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map deleted file mode 100644 index 98671b7..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"errorContext.js","sourceRoot":"","sources":["../../../../src/internal/util/errorContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,IAAI,OAAO,GAAgD,IAAI,CAAC;AAShE,MAAM,UAAU,YAAY,CAAC,EAAc;IACzC,IAAI,MAAM,CAAC,qCAAqC,EAAE;QAChD,IAAM,MAAM,GAAG,CAAC,OAAO,CAAC;QACxB,IAAI,MAAM,EAAE;YACV,OAAO,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;SAC/C;QACD,EAAE,EAAE,CAAC;QACL,IAAI,MAAM,EAAE;YACJ,IAAA,KAAyB,OAAQ,EAA/B,WAAW,iBAAA,EAAE,KAAK,WAAa,CAAC;YACxC,OAAO,GAAG,IAAI,CAAC;YACf,IAAI,WAAW,EAAE;gBACf,MAAM,KAAK,CAAC;aACb;SACF;KACF;SAAM;QAGL,EAAE,EAAE,CAAC;KACN;AACH,CAAC;AAMD,MAAM,UAAU,YAAY,CAAC,GAAQ;IACnC,IAAI,MAAM,CAAC,qCAAqC,IAAI,OAAO,EAAE;QAC3D,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;QAC3B,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC;KACrB;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js b/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js deleted file mode 100644 index 6ac5329..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js +++ /dev/null @@ -1,18 +0,0 @@ -export function executeSchedule(parentSubscription, scheduler, work, delay, repeat) { - if (delay === void 0) { delay = 0; } - if (repeat === void 0) { repeat = false; } - var scheduleSubscription = scheduler.schedule(function () { - work(); - if (repeat) { - parentSubscription.add(this.schedule(null, delay)); - } - else { - this.unsubscribe(); - } - }, delay); - parentSubscription.add(scheduleSubscription); - if (!repeat) { - return scheduleSubscription; - } -} -//# sourceMappingURL=executeSchedule.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js.map b/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js.map deleted file mode 100644 index ae5d559..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"executeSchedule.js","sourceRoot":"","sources":["../../../../src/internal/util/executeSchedule.ts"],"names":[],"mappings":"AAkBA,MAAM,UAAU,eAAe,CAC7B,kBAAgC,EAChC,SAAwB,EACxB,IAAgB,EAChB,KAAS,EACT,MAAc;IADd,sBAAA,EAAA,SAAS;IACT,uBAAA,EAAA,cAAc;IAEd,IAAM,oBAAoB,GAAG,SAAS,CAAC,QAAQ,CAAC;QAC9C,IAAI,EAAE,CAAC;QACP,IAAI,MAAM,EAAE;YACV,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;SACpD;aAAM;YACL,IAAI,CAAC,WAAW,EAAE,CAAC;SACpB;IACH,CAAC,EAAE,KAAK,CAAC,CAAC;IAEV,kBAAkB,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAE7C,IAAI,CAAC,MAAM,EAAE;QAKX,OAAO,oBAAoB,CAAC;KAC7B;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/identity.js b/node_modules/rxjs/dist/esm5/internal/util/identity.js deleted file mode 100644 index 1084d77..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/identity.js +++ /dev/null @@ -1,4 +0,0 @@ -export function identity(x) { - return x; -} -//# sourceMappingURL=identity.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/identity.js.map b/node_modules/rxjs/dist/esm5/internal/util/identity.js.map deleted file mode 100644 index 28a2f40..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/identity.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../../../src/internal/util/identity.ts"],"names":[],"mappings":"AA0CA,MAAM,UAAU,QAAQ,CAAI,CAAI;IAC9B,OAAO,CAAC,CAAC;AACX,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js b/node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js deleted file mode 100644 index 743a46f..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js +++ /dev/null @@ -1,2 +0,0 @@ -export var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; }); -//# sourceMappingURL=isArrayLike.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js.map b/node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js.map deleted file mode 100644 index 954a3f6..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isArrayLike.js","sourceRoot":"","sources":["../../../../src/internal/util/isArrayLike.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,WAAW,GAAG,CAAC,UAAI,CAAM,IAAwB,OAAA,CAAC,IAAI,OAAO,CAAC,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,CAAC,KAAK,UAAU,EAA5D,CAA4D,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js b/node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js deleted file mode 100644 index 99da2eb..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js +++ /dev/null @@ -1,5 +0,0 @@ -import { isFunction } from './isFunction'; -export function isAsyncIterable(obj) { - return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]); -} -//# sourceMappingURL=isAsyncIterable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js.map b/node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js.map deleted file mode 100644 index 2e736bd..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isAsyncIterable.js","sourceRoot":"","sources":["../../../../src/internal/util/isAsyncIterable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,UAAU,eAAe,CAAI,GAAQ;IACzC,OAAO,MAAM,CAAC,aAAa,IAAI,UAAU,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;AACzE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isDate.js b/node_modules/rxjs/dist/esm5/internal/util/isDate.js deleted file mode 100644 index 74ddf32..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/isDate.js +++ /dev/null @@ -1,4 +0,0 @@ -export function isValidDate(value) { - return value instanceof Date && !isNaN(value); -} -//# sourceMappingURL=isDate.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isDate.js.map b/node_modules/rxjs/dist/esm5/internal/util/isDate.js.map deleted file mode 100644 index 9e2ef13..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/isDate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isDate.js","sourceRoot":"","sources":["../../../../src/internal/util/isDate.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,WAAW,CAAC,KAAU;IACpC,OAAO,KAAK,YAAY,IAAI,IAAI,CAAC,KAAK,CAAC,KAAY,CAAC,CAAC;AACvD,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isFunction.js b/node_modules/rxjs/dist/esm5/internal/util/isFunction.js deleted file mode 100644 index 558eec7..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +++ /dev/null @@ -1,4 +0,0 @@ -export function isFunction(value) { - return typeof value === 'function'; -} -//# sourceMappingURL=isFunction.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map b/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map deleted file mode 100644 index 452906c..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isFunction.js","sourceRoot":"","sources":["../../../../src/internal/util/isFunction.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,UAAU,CAAC,KAAU;IACnC,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js b/node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js deleted file mode 100644 index da58ece..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js +++ /dev/null @@ -1,6 +0,0 @@ -import { observable as Symbol_observable } from '../symbol/observable'; -import { isFunction } from './isFunction'; -export function isInteropObservable(input) { - return isFunction(input[Symbol_observable]); -} -//# sourceMappingURL=isInteropObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js.map b/node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js.map deleted file mode 100644 index f5ddd94..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isInteropObservable.js","sourceRoot":"","sources":["../../../../src/internal/util/isInteropObservable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,MAAM,UAAU,mBAAmB,CAAC,KAAU;IAC5C,OAAO,UAAU,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAC9C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isIterable.js b/node_modules/rxjs/dist/esm5/internal/util/isIterable.js deleted file mode 100644 index 20c52a6..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/isIterable.js +++ /dev/null @@ -1,6 +0,0 @@ -import { iterator as Symbol_iterator } from '../symbol/iterator'; -import { isFunction } from './isFunction'; -export function isIterable(input) { - return isFunction(input === null || input === void 0 ? void 0 : input[Symbol_iterator]); -} -//# sourceMappingURL=isIterable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isIterable.js.map b/node_modules/rxjs/dist/esm5/internal/util/isIterable.js.map deleted file mode 100644 index 3532931..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/isIterable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isIterable.js","sourceRoot":"","sources":["../../../../src/internal/util/isIterable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,MAAM,UAAU,UAAU,CAAC,KAAU;IACnC,OAAO,UAAU,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAG,eAAe,CAAC,CAAC,CAAC;AAC9C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isObservable.js b/node_modules/rxjs/dist/esm5/internal/util/isObservable.js deleted file mode 100644 index cc149c6..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/isObservable.js +++ /dev/null @@ -1,6 +0,0 @@ -import { Observable } from '../Observable'; -import { isFunction } from './isFunction'; -export function isObservable(obj) { - return !!obj && (obj instanceof Observable || (isFunction(obj.lift) && isFunction(obj.subscribe))); -} -//# sourceMappingURL=isObservable.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isObservable.js.map b/node_modules/rxjs/dist/esm5/internal/util/isObservable.js.map deleted file mode 100644 index b82f961..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/isObservable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isObservable.js","sourceRoot":"","sources":["../../../../src/internal/util/isObservable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM1C,MAAM,UAAU,YAAY,CAAC,GAAQ;IAGnC,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,YAAY,UAAU,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AACrG,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isPromise.js b/node_modules/rxjs/dist/esm5/internal/util/isPromise.js deleted file mode 100644 index 5114f67..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/isPromise.js +++ /dev/null @@ -1,5 +0,0 @@ -import { isFunction } from "./isFunction"; -export function isPromise(value) { - return isFunction(value === null || value === void 0 ? void 0 : value.then); -} -//# sourceMappingURL=isPromise.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isPromise.js.map b/node_modules/rxjs/dist/esm5/internal/util/isPromise.js.map deleted file mode 100644 index bb81d60..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/isPromise.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isPromise.js","sourceRoot":"","sources":["../../../../src/internal/util/isPromise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM1C,MAAM,UAAU,SAAS,CAAC,KAAU;IAClC,OAAO,UAAU,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAC,CAAC;AACjC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js b/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js deleted file mode 100644 index 08e18ea..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js +++ /dev/null @@ -1,39 +0,0 @@ -import { __asyncGenerator, __await, __generator } from "tslib"; -import { isFunction } from './isFunction'; -export function readableStreamLikeToAsyncGenerator(readableStream) { - return __asyncGenerator(this, arguments, function readableStreamLikeToAsyncGenerator_1() { - var reader, _a, value, done; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - reader = readableStream.getReader(); - _b.label = 1; - case 1: - _b.trys.push([1, , 9, 10]); - _b.label = 2; - case 2: - if (!true) return [3, 8]; - return [4, __await(reader.read())]; - case 3: - _a = _b.sent(), value = _a.value, done = _a.done; - if (!done) return [3, 5]; - return [4, __await(void 0)]; - case 4: return [2, _b.sent()]; - case 5: return [4, __await(value)]; - case 6: return [4, _b.sent()]; - case 7: - _b.sent(); - return [3, 2]; - case 8: return [3, 10]; - case 9: - reader.releaseLock(); - return [7]; - case 10: return [2]; - } - }); - }); -} -export function isReadableStreamLike(obj) { - return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader); -} -//# sourceMappingURL=isReadableStreamLike.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js.map b/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js.map deleted file mode 100644 index fff796e..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isReadableStreamLike.js","sourceRoot":"","sources":["../../../../src/internal/util/isReadableStreamLike.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,UAAiB,kCAAkC,CAAI,cAAqC;;;;;;oBAC1F,MAAM,GAAG,cAAc,CAAC,SAAS,EAAE,CAAC;;;;;;yBAEjC,IAAI;oBACe,mBAAM,MAAM,CAAC,IAAI,EAAE,GAAA;;oBAArC,KAAkB,SAAmB,EAAnC,KAAK,WAAA,EAAE,IAAI,UAAA;yBACf,IAAI,EAAJ,cAAI;;wBACN,sBAAO;2CAEH,KAAM;wBAAZ,sBAAY;;oBAAZ,SAAY,CAAC;;;;oBAGf,MAAM,CAAC,WAAW,EAAE,CAAC;;;;;;CAExB;AAED,MAAM,UAAU,oBAAoB,CAAI,GAAQ;IAG9C,OAAO,UAAU,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,SAAS,CAAC,CAAC;AACpC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isScheduler.js b/node_modules/rxjs/dist/esm5/internal/util/isScheduler.js deleted file mode 100644 index 05b4f3f..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/isScheduler.js +++ /dev/null @@ -1,5 +0,0 @@ -import { isFunction } from './isFunction'; -export function isScheduler(value) { - return value && isFunction(value.schedule); -} -//# sourceMappingURL=isScheduler.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/isScheduler.js.map b/node_modules/rxjs/dist/esm5/internal/util/isScheduler.js.map deleted file mode 100644 index 33c0d90..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/isScheduler.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isScheduler.js","sourceRoot":"","sources":["../../../../src/internal/util/isScheduler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,UAAU,WAAW,CAAC,KAAU;IACpC,OAAO,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAC7C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/lift.js b/node_modules/rxjs/dist/esm5/internal/util/lift.js deleted file mode 100644 index 558a88c..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/lift.js +++ /dev/null @@ -1,20 +0,0 @@ -import { isFunction } from './isFunction'; -export function hasLift(source) { - return isFunction(source === null || source === void 0 ? void 0 : source.lift); -} -export function operate(init) { - return function (source) { - if (hasLift(source)) { - return source.lift(function (liftedSource) { - try { - return init(liftedSource, this); - } - catch (err) { - this.error(err); - } - }); - } - throw new TypeError('Unable to lift unknown Observable type'); - }; -} -//# sourceMappingURL=lift.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/lift.js.map b/node_modules/rxjs/dist/esm5/internal/util/lift.js.map deleted file mode 100644 index 27e0eef..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/lift.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"lift.js","sourceRoot":"","sources":["../../../../src/internal/util/lift.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1C,MAAM,UAAU,OAAO,CAAC,MAAW;IACjC,OAAO,UAAU,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAC,CAAC;AAClC,CAAC;AAMD,MAAM,UAAU,OAAO,CACrB,IAAqF;IAErF,OAAO,UAAC,MAAqB;QAC3B,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE;YACnB,OAAO,MAAM,CAAC,IAAI,CAAC,UAA+B,YAA2B;gBAC3E,IAAI;oBACF,OAAO,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;iBACjC;gBAAC,OAAO,GAAG,EAAE;oBACZ,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACjB;YACH,CAAC,CAAC,CAAC;SACJ;QACD,MAAM,IAAI,SAAS,CAAC,wCAAwC,CAAC,CAAC;IAChE,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js b/node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js deleted file mode 100644 index 706add1..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js +++ /dev/null @@ -1,10 +0,0 @@ -import { __read, __spreadArray } from "tslib"; -import { map } from "../operators/map"; -var isArray = Array.isArray; -function callOrApply(fn, args) { - return isArray(args) ? fn.apply(void 0, __spreadArray([], __read(args))) : fn(args); -} -export function mapOneOrManyArgs(fn) { - return map(function (args) { return callOrApply(fn, args); }); -} -//# sourceMappingURL=mapOneOrManyArgs.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js.map b/node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js.map deleted file mode 100644 index be157b9..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mapOneOrManyArgs.js","sourceRoot":"","sources":["../../../../src/internal/util/mapOneOrManyArgs.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAE/B,IAAA,OAAO,GAAK,KAAK,QAAV,CAAW;AAE1B,SAAS,WAAW,CAAO,EAA2B,EAAE,IAAW;IAC/D,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,wCAAI,IAAI,IAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;AAClD,CAAC;AAMD,MAAM,UAAU,gBAAgB,CAAO,EAA2B;IAC9D,OAAO,GAAG,CAAC,UAAA,IAAI,IAAI,OAAA,WAAW,CAAC,EAAE,EAAE,IAAI,CAAC,EAArB,CAAqB,CAAC,CAAA;AAC7C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/noop.js b/node_modules/rxjs/dist/esm5/internal/util/noop.js deleted file mode 100644 index 1a78a54..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/noop.js +++ /dev/null @@ -1,2 +0,0 @@ -export function noop() { } -//# sourceMappingURL=noop.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/noop.js.map b/node_modules/rxjs/dist/esm5/internal/util/noop.js.map deleted file mode 100644 index 05e521a..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/noop.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"noop.js","sourceRoot":"","sources":["../../../../src/internal/util/noop.ts"],"names":[],"mappings":"AACA,MAAM,UAAU,IAAI,KAAK,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/not.js b/node_modules/rxjs/dist/esm5/internal/util/not.js deleted file mode 100644 index ac1f235..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/not.js +++ /dev/null @@ -1,4 +0,0 @@ -export function not(pred, thisArg) { - return function (value, index) { return !pred.call(thisArg, value, index); }; -} -//# sourceMappingURL=not.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/not.js.map b/node_modules/rxjs/dist/esm5/internal/util/not.js.map deleted file mode 100644 index cd686b8..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/not.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"not.js","sourceRoot":"","sources":["../../../../src/internal/util/not.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,GAAG,CAAI,IAA0C,EAAE,OAAY;IAC7E,OAAO,UAAC,KAAQ,EAAE,KAAa,IAAK,OAAA,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,EAAjC,CAAiC,CAAC;AACxE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/pipe.js b/node_modules/rxjs/dist/esm5/internal/util/pipe.js deleted file mode 100644 index 4db150f..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/pipe.js +++ /dev/null @@ -1,20 +0,0 @@ -import { identity } from './identity'; -export function pipe() { - var fns = []; - for (var _i = 0; _i < arguments.length; _i++) { - fns[_i] = arguments[_i]; - } - return pipeFromArray(fns); -} -export function pipeFromArray(fns) { - if (fns.length === 0) { - return identity; - } - if (fns.length === 1) { - return fns[0]; - } - return function piped(input) { - return fns.reduce(function (prev, fn) { return fn(prev); }, input); - }; -} -//# sourceMappingURL=pipe.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map b/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map deleted file mode 100644 index 5f24260..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pipe.js","sourceRoot":"","sources":["../../../../src/internal/util/pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AA6EtC,MAAM,UAAU,IAAI;IAAC,aAAsC;SAAtC,UAAsC,EAAtC,qBAAsC,EAAtC,IAAsC;QAAtC,wBAAsC;;IACzD,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC;AAC5B,CAAC;AAGD,MAAM,UAAU,aAAa,CAAO,GAA+B;IACjE,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;QACpB,OAAO,QAAmC,CAAC;KAC5C;IAED,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;QACpB,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;KACf;IAED,OAAO,SAAS,KAAK,CAAC,KAAQ;QAC5B,OAAO,GAAG,CAAC,MAAM,CAAC,UAAC,IAAS,EAAE,EAAuB,IAAK,OAAA,EAAE,CAAC,IAAI,CAAC,EAAR,CAAQ,EAAE,KAAY,CAAC,CAAC;IACpF,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js b/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js deleted file mode 100644 index def5430..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +++ /dev/null @@ -1,14 +0,0 @@ -import { config } from '../config'; -import { timeoutProvider } from '../scheduler/timeoutProvider'; -export function reportUnhandledError(err) { - timeoutProvider.setTimeout(function () { - var onUnhandledError = config.onUnhandledError; - if (onUnhandledError) { - onUnhandledError(err); - } - else { - throw err; - } - }); -} -//# sourceMappingURL=reportUnhandledError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map b/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map deleted file mode 100644 index fa87b43..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"reportUnhandledError.js","sourceRoot":"","sources":["../../../../src/internal/util/reportUnhandledError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAW/D,MAAM,UAAU,oBAAoB,CAAC,GAAQ;IAC3C,eAAe,CAAC,UAAU,CAAC;QACjB,IAAA,gBAAgB,GAAK,MAAM,iBAAX,CAAY;QACpC,IAAI,gBAAgB,EAAE;YAEpB,gBAAgB,CAAC,GAAG,CAAC,CAAC;SACvB;aAAM;YAEL,MAAM,GAAG,CAAC;SACX;IACH,CAAC,CAAC,CAAC;AACL,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/subscribeToArray.js b/node_modules/rxjs/dist/esm5/internal/util/subscribeToArray.js deleted file mode 100644 index 2cb9f1d..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/subscribeToArray.js +++ /dev/null @@ -1,7 +0,0 @@ -export var subscribeToArray = function (array) { return function (subscriber) { - for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) { - subscriber.next(array[i]); - } - subscriber.complete(); -}; }; -//# sourceMappingURL=subscribeToArray.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/subscribeToArray.js.map b/node_modules/rxjs/dist/esm5/internal/util/subscribeToArray.js.map deleted file mode 100644 index 8c1c042..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/subscribeToArray.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"subscribeToArray.js","sourceRoot":"","sources":["../../../../src/internal/util/subscribeToArray.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAAI,KAAmB,IAAK,OAAA,UAAC,UAAyB;IACpF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KAC3B;IACD,UAAU,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC,EAL2D,CAK3D,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js b/node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js deleted file mode 100644 index 99d7269..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js +++ /dev/null @@ -1,4 +0,0 @@ -export function createInvalidObservableTypeError(input) { - return new TypeError("You provided " + (input !== null && typeof input === 'object' ? 'an invalid object' : "'" + input + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable."); -} -//# sourceMappingURL=throwUnobservableError.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js.map b/node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js.map deleted file mode 100644 index 811c90a..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"throwUnobservableError.js","sourceRoot":"","sources":["../../../../src/internal/util/throwUnobservableError.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,gCAAgC,CAAC,KAAU;IAEzD,OAAO,IAAI,SAAS,CAClB,mBACE,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,MAAI,KAAK,MAAG,8HACwC,CAC3H,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/workarounds.js b/node_modules/rxjs/dist/esm5/internal/util/workarounds.js deleted file mode 100644 index 380c6e7..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/workarounds.js +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=workarounds.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/internal/util/workarounds.js.map b/node_modules/rxjs/dist/esm5/internal/util/workarounds.js.map deleted file mode 100644 index 75e7271..0000000 --- a/node_modules/rxjs/dist/esm5/internal/util/workarounds.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workarounds.js","sourceRoot":"","sources":["../../../../src/internal/util/workarounds.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/operators/index.js b/node_modules/rxjs/dist/esm5/operators/index.js deleted file mode 100644 index 79bbd88..0000000 --- a/node_modules/rxjs/dist/esm5/operators/index.js +++ /dev/null @@ -1,114 +0,0 @@ -export { audit } from '../internal/operators/audit'; -export { auditTime } from '../internal/operators/auditTime'; -export { buffer } from '../internal/operators/buffer'; -export { bufferCount } from '../internal/operators/bufferCount'; -export { bufferTime } from '../internal/operators/bufferTime'; -export { bufferToggle } from '../internal/operators/bufferToggle'; -export { bufferWhen } from '../internal/operators/bufferWhen'; -export { catchError } from '../internal/operators/catchError'; -export { combineAll } from '../internal/operators/combineAll'; -export { combineLatestAll } from '../internal/operators/combineLatestAll'; -export { combineLatest } from '../internal/operators/combineLatest'; -export { combineLatestWith } from '../internal/operators/combineLatestWith'; -export { concat } from '../internal/operators/concat'; -export { concatAll } from '../internal/operators/concatAll'; -export { concatMap } from '../internal/operators/concatMap'; -export { concatMapTo } from '../internal/operators/concatMapTo'; -export { concatWith } from '../internal/operators/concatWith'; -export { connect } from '../internal/operators/connect'; -export { count } from '../internal/operators/count'; -export { debounce } from '../internal/operators/debounce'; -export { debounceTime } from '../internal/operators/debounceTime'; -export { defaultIfEmpty } from '../internal/operators/defaultIfEmpty'; -export { delay } from '../internal/operators/delay'; -export { delayWhen } from '../internal/operators/delayWhen'; -export { dematerialize } from '../internal/operators/dematerialize'; -export { distinct } from '../internal/operators/distinct'; -export { distinctUntilChanged } from '../internal/operators/distinctUntilChanged'; -export { distinctUntilKeyChanged } from '../internal/operators/distinctUntilKeyChanged'; -export { elementAt } from '../internal/operators/elementAt'; -export { endWith } from '../internal/operators/endWith'; -export { every } from '../internal/operators/every'; -export { exhaust } from '../internal/operators/exhaust'; -export { exhaustAll } from '../internal/operators/exhaustAll'; -export { exhaustMap } from '../internal/operators/exhaustMap'; -export { expand } from '../internal/operators/expand'; -export { filter } from '../internal/operators/filter'; -export { finalize } from '../internal/operators/finalize'; -export { find } from '../internal/operators/find'; -export { findIndex } from '../internal/operators/findIndex'; -export { first } from '../internal/operators/first'; -export { groupBy } from '../internal/operators/groupBy'; -export { ignoreElements } from '../internal/operators/ignoreElements'; -export { isEmpty } from '../internal/operators/isEmpty'; -export { last } from '../internal/operators/last'; -export { map } from '../internal/operators/map'; -export { mapTo } from '../internal/operators/mapTo'; -export { materialize } from '../internal/operators/materialize'; -export { max } from '../internal/operators/max'; -export { merge } from '../internal/operators/merge'; -export { mergeAll } from '../internal/operators/mergeAll'; -export { flatMap } from '../internal/operators/flatMap'; -export { mergeMap } from '../internal/operators/mergeMap'; -export { mergeMapTo } from '../internal/operators/mergeMapTo'; -export { mergeScan } from '../internal/operators/mergeScan'; -export { mergeWith } from '../internal/operators/mergeWith'; -export { min } from '../internal/operators/min'; -export { multicast } from '../internal/operators/multicast'; -export { observeOn } from '../internal/operators/observeOn'; -export { onErrorResumeNext } from '../internal/operators/onErrorResumeNextWith'; -export { pairwise } from '../internal/operators/pairwise'; -export { partition } from '../internal/operators/partition'; -export { pluck } from '../internal/operators/pluck'; -export { publish } from '../internal/operators/publish'; -export { publishBehavior } from '../internal/operators/publishBehavior'; -export { publishLast } from '../internal/operators/publishLast'; -export { publishReplay } from '../internal/operators/publishReplay'; -export { race } from '../internal/operators/race'; -export { raceWith } from '../internal/operators/raceWith'; -export { reduce } from '../internal/operators/reduce'; -export { repeat } from '../internal/operators/repeat'; -export { repeatWhen } from '../internal/operators/repeatWhen'; -export { retry } from '../internal/operators/retry'; -export { retryWhen } from '../internal/operators/retryWhen'; -export { refCount } from '../internal/operators/refCount'; -export { sample } from '../internal/operators/sample'; -export { sampleTime } from '../internal/operators/sampleTime'; -export { scan } from '../internal/operators/scan'; -export { sequenceEqual } from '../internal/operators/sequenceEqual'; -export { share } from '../internal/operators/share'; -export { shareReplay } from '../internal/operators/shareReplay'; -export { single } from '../internal/operators/single'; -export { skip } from '../internal/operators/skip'; -export { skipLast } from '../internal/operators/skipLast'; -export { skipUntil } from '../internal/operators/skipUntil'; -export { skipWhile } from '../internal/operators/skipWhile'; -export { startWith } from '../internal/operators/startWith'; -export { subscribeOn } from '../internal/operators/subscribeOn'; -export { switchAll } from '../internal/operators/switchAll'; -export { switchMap } from '../internal/operators/switchMap'; -export { switchMapTo } from '../internal/operators/switchMapTo'; -export { switchScan } from '../internal/operators/switchScan'; -export { take } from '../internal/operators/take'; -export { takeLast } from '../internal/operators/takeLast'; -export { takeUntil } from '../internal/operators/takeUntil'; -export { takeWhile } from '../internal/operators/takeWhile'; -export { tap } from '../internal/operators/tap'; -export { throttle } from '../internal/operators/throttle'; -export { throttleTime } from '../internal/operators/throttleTime'; -export { throwIfEmpty } from '../internal/operators/throwIfEmpty'; -export { timeInterval } from '../internal/operators/timeInterval'; -export { timeout } from '../internal/operators/timeout'; -export { timeoutWith } from '../internal/operators/timeoutWith'; -export { timestamp } from '../internal/operators/timestamp'; -export { toArray } from '../internal/operators/toArray'; -export { window } from '../internal/operators/window'; -export { windowCount } from '../internal/operators/windowCount'; -export { windowTime } from '../internal/operators/windowTime'; -export { windowToggle } from '../internal/operators/windowToggle'; -export { windowWhen } from '../internal/operators/windowWhen'; -export { withLatestFrom } from '../internal/operators/withLatestFrom'; -export { zip } from '../internal/operators/zip'; -export { zipAll } from '../internal/operators/zipAll'; -export { zipWith } from '../internal/operators/zipWith'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/operators/index.js.map b/node_modules/rxjs/dist/esm5/operators/index.js.map deleted file mode 100644 index 9028717..0000000 --- a/node_modules/rxjs/dist/esm5/operators/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/operators/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAiB,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAkD,MAAM,+BAA+B,CAAC;AACxG,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAgB,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAe,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,KAAK,EAAe,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAqB,MAAM,mCAAmC,CAAC;AACnF,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAe,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAkB,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,OAAO,EAA8B,MAAM,+BAA+B,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/testing/index.js b/node_modules/rxjs/dist/esm5/testing/index.js deleted file mode 100644 index f0f7b53..0000000 --- a/node_modules/rxjs/dist/esm5/testing/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export { TestScheduler } from '../internal/testing/TestScheduler'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/testing/index.js.map b/node_modules/rxjs/dist/esm5/testing/index.js.map deleted file mode 100644 index bc7fd0d..0000000 --- a/node_modules/rxjs/dist/esm5/testing/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAc,MAAM,mCAAmC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/webSocket/index.js b/node_modules/rxjs/dist/esm5/webSocket/index.js deleted file mode 100644 index a4bb4ea..0000000 --- a/node_modules/rxjs/dist/esm5/webSocket/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export { webSocket as webSocket } from '../internal/observable/dom/webSocket'; -export { WebSocketSubject } from '../internal/observable/dom/WebSocketSubject'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/esm5/webSocket/index.js.map b/node_modules/rxjs/dist/esm5/webSocket/index.js.map deleted file mode 100644 index 0912982..0000000 --- a/node_modules/rxjs/dist/esm5/webSocket/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/webSocket/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAA0B,MAAM,6CAA6C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/ajax/index.d.ts b/node_modules/rxjs/dist/types/ajax/index.d.ts deleted file mode 100644 index 862c9e0..0000000 --- a/node_modules/rxjs/dist/types/ajax/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { ajax } from '../internal/ajax/ajax'; -export { AjaxError, AjaxTimeoutError } from '../internal/ajax/errors'; -export { AjaxResponse } from '../internal/ajax/AjaxResponse'; -export { AjaxRequest, AjaxConfig, AjaxDirection } from '../internal/ajax/types'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/ajax/index.d.ts.map b/node_modules/rxjs/dist/types/ajax/index.d.ts.map deleted file mode 100644 index f65dd62..0000000 --- a/node_modules/rxjs/dist/types/ajax/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ajax/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/fetch/index.d.ts b/node_modules/rxjs/dist/types/fetch/index.d.ts deleted file mode 100644 index 44a6e90..0000000 --- a/node_modules/rxjs/dist/types/fetch/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { fromFetch } from '../internal/observable/dom/fetch'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/fetch/index.d.ts.map b/node_modules/rxjs/dist/types/fetch/index.d.ts.map deleted file mode 100644 index 1345944..0000000 --- a/node_modules/rxjs/dist/types/fetch/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fetch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/index.d.ts b/node_modules/rxjs/dist/types/index.d.ts deleted file mode 100644 index fd64039..0000000 --- a/node_modules/rxjs/dist/types/index.d.ts +++ /dev/null @@ -1,173 +0,0 @@ -/// -/// -export { Observable } from './internal/Observable'; -export { ConnectableObservable } from './internal/observable/ConnectableObservable'; -export { GroupedObservable } from './internal/operators/groupBy'; -export { Operator } from './internal/Operator'; -export { observable } from './internal/symbol/observable'; -export { animationFrames } from './internal/observable/dom/animationFrames'; -export { Subject } from './internal/Subject'; -export { BehaviorSubject } from './internal/BehaviorSubject'; -export { ReplaySubject } from './internal/ReplaySubject'; -export { AsyncSubject } from './internal/AsyncSubject'; -export { asap, asapScheduler } from './internal/scheduler/asap'; -export { async, asyncScheduler } from './internal/scheduler/async'; -export { queue, queueScheduler } from './internal/scheduler/queue'; -export { animationFrame, animationFrameScheduler } from './internal/scheduler/animationFrame'; -export { VirtualTimeScheduler, VirtualAction } from './internal/scheduler/VirtualTimeScheduler'; -export { Scheduler } from './internal/Scheduler'; -export { Subscription } from './internal/Subscription'; -export { Subscriber } from './internal/Subscriber'; -export { Notification, NotificationKind } from './internal/Notification'; -export { pipe } from './internal/util/pipe'; -export { noop } from './internal/util/noop'; -export { identity } from './internal/util/identity'; -export { isObservable } from './internal/util/isObservable'; -export { lastValueFrom } from './internal/lastValueFrom'; -export { firstValueFrom } from './internal/firstValueFrom'; -export { ArgumentOutOfRangeError } from './internal/util/ArgumentOutOfRangeError'; -export { EmptyError } from './internal/util/EmptyError'; -export { NotFoundError } from './internal/util/NotFoundError'; -export { ObjectUnsubscribedError } from './internal/util/ObjectUnsubscribedError'; -export { SequenceError } from './internal/util/SequenceError'; -export { TimeoutError } from './internal/operators/timeout'; -export { UnsubscriptionError } from './internal/util/UnsubscriptionError'; -export { bindCallback } from './internal/observable/bindCallback'; -export { bindNodeCallback } from './internal/observable/bindNodeCallback'; -export { combineLatest } from './internal/observable/combineLatest'; -export { concat } from './internal/observable/concat'; -export { connectable } from './internal/observable/connectable'; -export { defer } from './internal/observable/defer'; -export { empty } from './internal/observable/empty'; -export { forkJoin } from './internal/observable/forkJoin'; -export { from } from './internal/observable/from'; -export { fromEvent } from './internal/observable/fromEvent'; -export { fromEventPattern } from './internal/observable/fromEventPattern'; -export { generate } from './internal/observable/generate'; -export { iif } from './internal/observable/iif'; -export { interval } from './internal/observable/interval'; -export { merge } from './internal/observable/merge'; -export { never } from './internal/observable/never'; -export { of } from './internal/observable/of'; -export { onErrorResumeNext } from './internal/observable/onErrorResumeNext'; -export { pairs } from './internal/observable/pairs'; -export { partition } from './internal/observable/partition'; -export { race } from './internal/observable/race'; -export { range } from './internal/observable/range'; -export { throwError } from './internal/observable/throwError'; -export { timer } from './internal/observable/timer'; -export { using } from './internal/observable/using'; -export { zip } from './internal/observable/zip'; -export { scheduled } from './internal/scheduled/scheduled'; -export { EMPTY } from './internal/observable/empty'; -export { NEVER } from './internal/observable/never'; -export * from './internal/types'; -export { config, GlobalConfig } from './internal/config'; -export { audit } from './internal/operators/audit'; -export { auditTime } from './internal/operators/auditTime'; -export { buffer } from './internal/operators/buffer'; -export { bufferCount } from './internal/operators/bufferCount'; -export { bufferTime } from './internal/operators/bufferTime'; -export { bufferToggle } from './internal/operators/bufferToggle'; -export { bufferWhen } from './internal/operators/bufferWhen'; -export { catchError } from './internal/operators/catchError'; -export { combineAll } from './internal/operators/combineAll'; -export { combineLatestAll } from './internal/operators/combineLatestAll'; -export { combineLatestWith } from './internal/operators/combineLatestWith'; -export { concatAll } from './internal/operators/concatAll'; -export { concatMap } from './internal/operators/concatMap'; -export { concatMapTo } from './internal/operators/concatMapTo'; -export { concatWith } from './internal/operators/concatWith'; -export { connect, ConnectConfig } from './internal/operators/connect'; -export { count } from './internal/operators/count'; -export { debounce } from './internal/operators/debounce'; -export { debounceTime } from './internal/operators/debounceTime'; -export { defaultIfEmpty } from './internal/operators/defaultIfEmpty'; -export { delay } from './internal/operators/delay'; -export { delayWhen } from './internal/operators/delayWhen'; -export { dematerialize } from './internal/operators/dematerialize'; -export { distinct } from './internal/operators/distinct'; -export { distinctUntilChanged } from './internal/operators/distinctUntilChanged'; -export { distinctUntilKeyChanged } from './internal/operators/distinctUntilKeyChanged'; -export { elementAt } from './internal/operators/elementAt'; -export { endWith } from './internal/operators/endWith'; -export { every } from './internal/operators/every'; -export { exhaust } from './internal/operators/exhaust'; -export { exhaustAll } from './internal/operators/exhaustAll'; -export { exhaustMap } from './internal/operators/exhaustMap'; -export { expand } from './internal/operators/expand'; -export { filter } from './internal/operators/filter'; -export { finalize } from './internal/operators/finalize'; -export { find } from './internal/operators/find'; -export { findIndex } from './internal/operators/findIndex'; -export { first } from './internal/operators/first'; -export { groupBy, BasicGroupByOptions, GroupByOptionsWithElement } from './internal/operators/groupBy'; -export { ignoreElements } from './internal/operators/ignoreElements'; -export { isEmpty } from './internal/operators/isEmpty'; -export { last } from './internal/operators/last'; -export { map } from './internal/operators/map'; -export { mapTo } from './internal/operators/mapTo'; -export { materialize } from './internal/operators/materialize'; -export { max } from './internal/operators/max'; -export { mergeAll } from './internal/operators/mergeAll'; -export { flatMap } from './internal/operators/flatMap'; -export { mergeMap } from './internal/operators/mergeMap'; -export { mergeMapTo } from './internal/operators/mergeMapTo'; -export { mergeScan } from './internal/operators/mergeScan'; -export { mergeWith } from './internal/operators/mergeWith'; -export { min } from './internal/operators/min'; -export { multicast } from './internal/operators/multicast'; -export { observeOn } from './internal/operators/observeOn'; -export { onErrorResumeNextWith } from './internal/operators/onErrorResumeNextWith'; -export { pairwise } from './internal/operators/pairwise'; -export { pluck } from './internal/operators/pluck'; -export { publish } from './internal/operators/publish'; -export { publishBehavior } from './internal/operators/publishBehavior'; -export { publishLast } from './internal/operators/publishLast'; -export { publishReplay } from './internal/operators/publishReplay'; -export { raceWith } from './internal/operators/raceWith'; -export { reduce } from './internal/operators/reduce'; -export { repeat, RepeatConfig } from './internal/operators/repeat'; -export { repeatWhen } from './internal/operators/repeatWhen'; -export { retry, RetryConfig } from './internal/operators/retry'; -export { retryWhen } from './internal/operators/retryWhen'; -export { refCount } from './internal/operators/refCount'; -export { sample } from './internal/operators/sample'; -export { sampleTime } from './internal/operators/sampleTime'; -export { scan } from './internal/operators/scan'; -export { sequenceEqual } from './internal/operators/sequenceEqual'; -export { share, ShareConfig } from './internal/operators/share'; -export { shareReplay, ShareReplayConfig } from './internal/operators/shareReplay'; -export { single } from './internal/operators/single'; -export { skip } from './internal/operators/skip'; -export { skipLast } from './internal/operators/skipLast'; -export { skipUntil } from './internal/operators/skipUntil'; -export { skipWhile } from './internal/operators/skipWhile'; -export { startWith } from './internal/operators/startWith'; -export { subscribeOn } from './internal/operators/subscribeOn'; -export { switchAll } from './internal/operators/switchAll'; -export { switchMap } from './internal/operators/switchMap'; -export { switchMapTo } from './internal/operators/switchMapTo'; -export { switchScan } from './internal/operators/switchScan'; -export { take } from './internal/operators/take'; -export { takeLast } from './internal/operators/takeLast'; -export { takeUntil } from './internal/operators/takeUntil'; -export { takeWhile } from './internal/operators/takeWhile'; -export { tap, TapObserver } from './internal/operators/tap'; -export { throttle, ThrottleConfig } from './internal/operators/throttle'; -export { throttleTime } from './internal/operators/throttleTime'; -export { throwIfEmpty } from './internal/operators/throwIfEmpty'; -export { timeInterval } from './internal/operators/timeInterval'; -export { timeout, TimeoutConfig, TimeoutInfo } from './internal/operators/timeout'; -export { timeoutWith } from './internal/operators/timeoutWith'; -export { timestamp } from './internal/operators/timestamp'; -export { toArray } from './internal/operators/toArray'; -export { window } from './internal/operators/window'; -export { windowCount } from './internal/operators/windowCount'; -export { windowTime } from './internal/operators/windowTime'; -export { windowToggle } from './internal/operators/windowToggle'; -export { windowWhen } from './internal/operators/windowWhen'; -export { withLatestFrom } from './internal/operators/withLatestFrom'; -export { zipAll } from './internal/operators/zipAll'; -export { zipWith } from './internal/operators/zipWith'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/index.d.ts.map b/node_modules/rxjs/dist/types/index.d.ts.map deleted file mode 100644 index 5587a1f..0000000 --- a/node_modules/rxjs/dist/types/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;AAeA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAG5E,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9F,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAChG,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGnD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGzE,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAG1E,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAG3D,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAGpD,cAAc,kBAAkB,CAAC;AAGjC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGzD,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACvG,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/AnyCatcher.d.ts b/node_modules/rxjs/dist/types/internal/AnyCatcher.d.ts deleted file mode 100644 index 2e39a59..0000000 --- a/node_modules/rxjs/dist/types/internal/AnyCatcher.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -declare const anyCatcherSymbol: unique symbol; -/** - * This is just a type that we're using to identify `any` being passed to - * function overloads. This is used because of situations like {@link forkJoin}, - * where it could return an `Observable` or an `Observable<{ [key: K]: T }>`, - * so `forkJoin(any)` would mean we need to return `Observable`. - */ -export declare type AnyCatcher = typeof anyCatcherSymbol; -export {}; -//# sourceMappingURL=AnyCatcher.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/AnyCatcher.d.ts.map b/node_modules/rxjs/dist/types/internal/AnyCatcher.d.ts.map deleted file mode 100644 index 4feb5cc..0000000 --- a/node_modules/rxjs/dist/types/internal/AnyCatcher.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AnyCatcher.d.ts","sourceRoot":"","sources":["../../../src/internal/AnyCatcher.ts"],"names":[],"mappings":"AAKA,OAAO,CAAC,MAAM,gBAAgB,EAAE,OAAO,MAAM,CAAC;AAE9C;;;;;GAKG;AACH,oBAAY,UAAU,GAAG,OAAO,gBAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/AsyncSubject.d.ts b/node_modules/rxjs/dist/types/internal/AsyncSubject.d.ts deleted file mode 100644 index 5c86c02..0000000 --- a/node_modules/rxjs/dist/types/internal/AsyncSubject.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Subject } from './Subject'; -/** - * A variant of Subject that only emits a value when it completes. It will emit - * its latest value to all its observers on completion. - */ -export declare class AsyncSubject extends Subject { - private _value; - private _hasValue; - private _isComplete; - next(value: T): void; - complete(): void; -} -//# sourceMappingURL=AsyncSubject.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/AsyncSubject.d.ts.map b/node_modules/rxjs/dist/types/internal/AsyncSubject.d.ts.map deleted file mode 100644 index d29b503..0000000 --- a/node_modules/rxjs/dist/types/internal/AsyncSubject.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AsyncSubject.d.ts","sourceRoot":"","sources":["../../../src/internal/AsyncSubject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC;;;GAGG;AACH,qBAAa,YAAY,CAAC,CAAC,CAAE,SAAQ,OAAO,CAAC,CAAC,CAAC;IAC7C,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,WAAW,CAAS;IAa5B,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;IAOpB,QAAQ,IAAI,IAAI;CAQjB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/BehaviorSubject.d.ts b/node_modules/rxjs/dist/types/internal/BehaviorSubject.d.ts deleted file mode 100644 index 131bc76..0000000 --- a/node_modules/rxjs/dist/types/internal/BehaviorSubject.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Subject } from './Subject'; -/** - * A variant of Subject that requires an initial value and emits its current - * value whenever it is subscribed to. - */ -export declare class BehaviorSubject extends Subject { - private _value; - constructor(_value: T); - get value(): T; - getValue(): T; - next(value: T): void; -} -//# sourceMappingURL=BehaviorSubject.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/BehaviorSubject.d.ts.map b/node_modules/rxjs/dist/types/internal/BehaviorSubject.d.ts.map deleted file mode 100644 index 2871cdf..0000000 --- a/node_modules/rxjs/dist/types/internal/BehaviorSubject.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BehaviorSubject.d.ts","sourceRoot":"","sources":["../../../src/internal/BehaviorSubject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC;;;GAGG;AACH,qBAAa,eAAe,CAAC,CAAC,CAAE,SAAQ,OAAO,CAAC,CAAC,CAAC;IACpC,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,CAAC;IAI7B,IAAI,KAAK,IAAI,CAAC,CAEb;IASD,QAAQ,IAAI,CAAC;IASb,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;CAGrB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Notification.d.ts b/node_modules/rxjs/dist/types/internal/Notification.d.ts deleted file mode 100644 index 61edfdc..0000000 --- a/node_modules/rxjs/dist/types/internal/Notification.d.ts +++ /dev/null @@ -1,175 +0,0 @@ -import { PartialObserver, ObservableNotification, CompleteNotification, NextNotification, ErrorNotification } from './types'; -import { Observable } from './Observable'; -/** - * @deprecated Use a string literal instead. `NotificationKind` will be replaced with a type alias in v8. - * It will not be replaced with a const enum as those are not compatible with isolated modules. - */ -export declare enum NotificationKind { - NEXT = "N", - ERROR = "E", - COMPLETE = "C" -} -/** - * Represents a push-based event or value that an {@link Observable} can emit. - * This class is particularly useful for operators that manage notifications, - * like {@link materialize}, {@link dematerialize}, {@link observeOn}, and - * others. Besides wrapping the actual delivered value, it also annotates it - * with metadata of, for instance, what type of push message it is (`next`, - * `error`, or `complete`). - * - * @see {@link materialize} - * @see {@link dematerialize} - * @see {@link observeOn} - * @deprecated It is NOT recommended to create instances of `Notification` directly. - * Rather, try to create POJOs matching the signature outlined in {@link ObservableNotification}. - * For example: `{ kind: 'N', value: 1 }`, `{ kind: 'E', error: new Error('bad') }`, or `{ kind: 'C' }`. - * Will be removed in v8. - */ -export declare class Notification { - readonly kind: 'N' | 'E' | 'C'; - readonly value?: T | undefined; - readonly error?: any; - /** - * A value signifying that the notification will "next" if observed. In truth, - * This is really synonymous with just checking `kind === "N"`. - * @deprecated Will be removed in v8. Instead, just check to see if the value of `kind` is `"N"`. - */ - readonly hasValue: boolean; - /** - * Creates a "Next" notification object. - * @param kind Always `'N'` - * @param value The value to notify with if observed. - * @deprecated Internal implementation detail. Use {@link Notification#createNext createNext} instead. - */ - constructor(kind: 'N', value?: T); - /** - * Creates an "Error" notification object. - * @param kind Always `'E'` - * @param value Always `undefined` - * @param error The error to notify with if observed. - * @deprecated Internal implementation detail. Use {@link Notification#createError createError} instead. - */ - constructor(kind: 'E', value: undefined, error: any); - /** - * Creates a "completion" notification object. - * @param kind Always `'C'` - * @deprecated Internal implementation detail. Use {@link Notification#createComplete createComplete} instead. - */ - constructor(kind: 'C'); - /** - * Executes the appropriate handler on a passed `observer` given the `kind` of notification. - * If the handler is missing it will do nothing. Even if the notification is an error, if - * there is no error handler on the observer, an error will not be thrown, it will noop. - * @param observer The observer to notify. - */ - observe(observer: PartialObserver): void; - /** - * Executes a notification on the appropriate handler from a list provided. - * If a handler is missing for the kind of notification, nothing is called - * and no error is thrown, it will be a noop. - * @param next A next handler - * @param error An error handler - * @param complete A complete handler - * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. - */ - do(next: (value: T) => void, error: (err: any) => void, complete: () => void): void; - /** - * Executes a notification on the appropriate handler from a list provided. - * If a handler is missing for the kind of notification, nothing is called - * and no error is thrown, it will be a noop. - * @param next A next handler - * @param error An error handler - * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. - */ - do(next: (value: T) => void, error: (err: any) => void): void; - /** - * Executes the next handler if the Notification is of `kind` `"N"`. Otherwise - * this will not error, and it will be a noop. - * @param next The next handler - * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. - */ - do(next: (value: T) => void): void; - /** - * Executes a notification on the appropriate handler from a list provided. - * If a handler is missing for the kind of notification, nothing is called - * and no error is thrown, it will be a noop. - * @param next A next handler - * @param error An error handler - * @param complete A complete handler - * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. - */ - accept(next: (value: T) => void, error: (err: any) => void, complete: () => void): void; - /** - * Executes a notification on the appropriate handler from a list provided. - * If a handler is missing for the kind of notification, nothing is called - * and no error is thrown, it will be a noop. - * @param next A next handler - * @param error An error handler - * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. - */ - accept(next: (value: T) => void, error: (err: any) => void): void; - /** - * Executes the next handler if the Notification is of `kind` `"N"`. Otherwise - * this will not error, and it will be a noop. - * @param next The next handler - * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. - */ - accept(next: (value: T) => void): void; - /** - * Executes the appropriate handler on a passed `observer` given the `kind` of notification. - * If the handler is missing it will do nothing. Even if the notification is an error, if - * there is no error handler on the observer, an error will not be thrown, it will noop. - * @param observer The observer to notify. - * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. - */ - accept(observer: PartialObserver): void; - /** - * Returns a simple Observable that just delivers the notification represented - * by this Notification instance. - * - * @deprecated Will be removed in v8. To convert a `Notification` to an {@link Observable}, - * use {@link of} and {@link dematerialize}: `of(notification).pipe(dematerialize())`. - */ - toObservable(): Observable; - private static completeNotification; - /** - * A shortcut to create a Notification instance of the type `next` from a - * given value. - * @param value The `next` value. - * @return The "next" Notification representing the argument. - * @deprecated It is NOT recommended to create instances of `Notification` directly. - * Rather, try to create POJOs matching the signature outlined in {@link ObservableNotification}. - * For example: `{ kind: 'N', value: 1 }`, `{ kind: 'E', error: new Error('bad') }`, or `{ kind: 'C' }`. - * Will be removed in v8. - */ - static createNext(value: T): Notification & NextNotification; - /** - * A shortcut to create a Notification instance of the type `error` from a - * given error. - * @param err The `error` error. - * @return The "error" Notification representing the argument. - * @deprecated It is NOT recommended to create instances of `Notification` directly. - * Rather, try to create POJOs matching the signature outlined in {@link ObservableNotification}. - * For example: `{ kind: 'N', value: 1 }`, `{ kind: 'E', error: new Error('bad') }`, or `{ kind: 'C' }`. - * Will be removed in v8. - */ - static createError(err?: any): Notification & ErrorNotification; - /** - * A shortcut to create a Notification instance of the type `complete`. - * @return The valueless "complete" Notification. - * @deprecated It is NOT recommended to create instances of `Notification` directly. - * Rather, try to create POJOs matching the signature outlined in {@link ObservableNotification}. - * For example: `{ kind: 'N', value: 1 }`, `{ kind: 'E', error: new Error('bad') }`, or `{ kind: 'C' }`. - * Will be removed in v8. - */ - static createComplete(): Notification & CompleteNotification; -} -/** - * Executes the appropriate handler on a passed `observer` given the `kind` of notification. - * If the handler is missing it will do nothing. Even if the notification is an error, if - * there is no error handler on the observer, an error will not be thrown, it will noop. - * @param notification The notification object to observe. - * @param observer The observer to notify. - */ -export declare function observeNotification(notification: ObservableNotification, observer: PartialObserver): void; -//# sourceMappingURL=Notification.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Notification.d.ts.map b/node_modules/rxjs/dist/types/internal/Notification.d.ts.map deleted file mode 100644 index e7a83e2..0000000 --- a/node_modules/rxjs/dist/types/internal/Notification.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Notification.d.ts","sourceRoot":"","sources":["../../../src/internal/Notification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC7H,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAO1C;;;GAGG;AACH,oBAAY,gBAAgB;IAC1B,IAAI,MAAM;IACV,KAAK,MAAM;IACX,QAAQ,MAAM;CACf;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,YAAY,CAAC,CAAC;aA6BG,IAAI,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG;aAAkB,KAAK,CAAC;aAAqB,KAAK,CAAC;IA5BpG;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAE3B;;;;;OAKG;gBACS,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC;IAChC;;;;;;OAMG;gBACS,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG;IACnD;;;;OAIG;gBACS,IAAI,EAAE,GAAG;IAKrB;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,IAAI;IAI3C;;;;;;;;OAQG;IACH,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI;IACnF;;;;;;;OAOG;IACH,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI;IAC7D;;;;;OAKG;IACH,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,GAAG,IAAI;IAMlC;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI;IACvF;;;;;;;OAOG;IACH,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI;IACjE;;;;;OAKG;IACH,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,GAAG,IAAI;IAEtC;;;;;;OAMG;IACH,MAAM,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,IAAI;IAO1C;;;;;;OAMG;IACH,YAAY,IAAI,UAAU,CAAC,CAAC,CAAC;IA0B7B,OAAO,CAAC,MAAM,CAAC,oBAAoB,CAAuE;IAC1G;;;;;;;;;OASG;IACH,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC;IAI7B;;;;;;;;;OASG;IACH,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE,GAAG;IAI5B;;;;;;;OAOG;IACH,MAAM,CAAC,cAAc,IAAI,YAAY,CAAC,KAAK,CAAC,GAAG,oBAAoB;CAGpE;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,YAAY,EAAE,sBAAsB,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,QAM3G"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/NotificationFactories.d.ts b/node_modules/rxjs/dist/types/internal/NotificationFactories.d.ts deleted file mode 100644 index 298d4cd..0000000 --- a/node_modules/rxjs/dist/types/internal/NotificationFactories.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=NotificationFactories.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/NotificationFactories.d.ts.map b/node_modules/rxjs/dist/types/internal/NotificationFactories.d.ts.map deleted file mode 100644 index e3f44d0..0000000 --- a/node_modules/rxjs/dist/types/internal/NotificationFactories.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NotificationFactories.d.ts","sourceRoot":"","sources":["../../../src/internal/NotificationFactories.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Observable.d.ts b/node_modules/rxjs/dist/types/internal/Observable.d.ts deleted file mode 100644 index b479910..0000000 --- a/node_modules/rxjs/dist/types/internal/Observable.d.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { Operator } from './Operator'; -import { Subscriber } from './Subscriber'; -import { Subscription } from './Subscription'; -import { TeardownLogic, OperatorFunction, Subscribable, Observer } from './types'; -/** - * A representation of any set of values over any amount of time. This is the most basic building block - * of RxJS. - */ -export declare class Observable implements Subscribable { - /** - * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. - */ - source: Observable | undefined; - /** - * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. - */ - operator: Operator | undefined; - /** - * @param subscribe The function that is called when the Observable is - * initially subscribed to. This function is given a Subscriber, to which new values - * can be `next`ed, or an `error` method can be called to raise an error, or - * `complete` can be called to notify of a successful completion. - */ - constructor(subscribe?: (this: Observable, subscriber: Subscriber) => TeardownLogic); - /** - * Creates a new Observable by calling the Observable constructor - * @param subscribe the subscriber function to be passed to the Observable constructor - * @return A new observable. - * @deprecated Use `new Observable()` instead. Will be removed in v8. - */ - static create: (...args: any[]) => any; - /** - * Creates a new Observable, with this Observable instance as the source, and the passed - * operator defined as the new observable's operator. - * @param operator the operator defining the operation to take on the observable - * @return A new observable with the Operator applied. - * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. - * If you have implemented an operator using `lift`, it is recommended that you create an - * operator by simply returning `new Observable()` directly. See "Creating new operators from - * scratch" section here: https://rxjs.dev/guide/operators - */ - lift(operator?: Operator): Observable; - subscribe(observerOrNext?: Partial> | ((value: T) => void)): Subscription; - /** @deprecated Instead of passing separate callback arguments, use an observer argument. Signatures taking separate callback arguments will be removed in v8. Details: https://rxjs.dev/deprecations/subscribe-arguments */ - subscribe(next?: ((value: T) => void) | null, error?: ((error: any) => void) | null, complete?: (() => void) | null): Subscription; - /** - * Used as a NON-CANCELLABLE means of subscribing to an observable, for use with - * APIs that expect promises, like `async/await`. You cannot unsubscribe from this. - * - * **WARNING**: Only use this with observables you *know* will complete. If the source - * observable does not complete, you will end up with a promise that is hung up, and - * potentially all of the state of an async function hanging out in memory. To avoid - * this situation, look into adding something like {@link timeout}, {@link take}, - * {@link takeWhile}, or {@link takeUntil} amongst others. - * - * #### Example - * - * ```ts - * import { interval, take } from 'rxjs'; - * - * const source$ = interval(1000).pipe(take(4)); - * - * async function getTotal() { - * let total = 0; - * - * await source$.forEach(value => { - * total += value; - * console.log('observable -> ' + value); - * }); - * - * return total; - * } - * - * getTotal().then( - * total => console.log('Total: ' + total) - * ); - * - * // Expected: - * // 'observable -> 0' - * // 'observable -> 1' - * // 'observable -> 2' - * // 'observable -> 3' - * // 'Total: 6' - * ``` - * - * @param next A handler for each value emitted by the observable. - * @return A promise that either resolves on observable completion or - * rejects with the handled error. - */ - forEach(next: (value: T) => void): Promise; - /** - * @param next a handler for each value emitted by the observable - * @param promiseCtor a constructor function used to instantiate the Promise - * @return a promise that either resolves on observable completion or - * rejects with the handled error - * @deprecated Passing a Promise constructor will no longer be available - * in upcoming versions of RxJS. This is because it adds weight to the library, for very - * little benefit. If you need this functionality, it is recommended that you either - * polyfill Promise, or you create an adapter to convert the returned native promise - * to whatever promise implementation you wanted. Will be removed in v8. - */ - forEach(next: (value: T) => void, promiseCtor: PromiseConstructorLike): Promise; - pipe(): Observable; - pipe(op1: OperatorFunction): Observable; - pipe(op1: OperatorFunction, op2: OperatorFunction): Observable; - pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction): Observable; - pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction): Observable; - pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction): Observable; - pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction, op6: OperatorFunction): Observable; - pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction, op6: OperatorFunction, op7: OperatorFunction): Observable; - pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction, op6: OperatorFunction, op7: OperatorFunction, op8: OperatorFunction): Observable; - pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction, op6: OperatorFunction, op7: OperatorFunction, op8: OperatorFunction, op9: OperatorFunction): Observable; - pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction, op4: OperatorFunction, op5: OperatorFunction, op6: OperatorFunction, op7: OperatorFunction, op8: OperatorFunction, op9: OperatorFunction, ...operations: OperatorFunction[]): Observable; - /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */ - toPromise(): Promise; - /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */ - toPromise(PromiseCtor: typeof Promise): Promise; - /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */ - toPromise(PromiseCtor: PromiseConstructorLike): Promise; -} -//# sourceMappingURL=Observable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Observable.d.ts.map b/node_modules/rxjs/dist/types/internal/Observable.d.ts.map deleted file mode 100644 index 17e71a2..0000000 --- a/node_modules/rxjs/dist/types/internal/Observable.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Observable.d.ts","sourceRoot":"","sources":["../../../src/internal/Observable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAkB,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAkB,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAOlF;;;GAGG;AACH,qBAAa,UAAU,CAAC,CAAC,CAAE,YAAW,YAAY,CAAC,CAAC,CAAC;IACnD;;OAEG;IACH,MAAM,EAAE,UAAU,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;IAEpC;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,SAAS,CAAC;IAEvC;;;;;OAKG;gBACS,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,aAAa;IAQzF;;;;;OAKG;IACH,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAEpC;IAEF;;;;;;;;;OASG;IACH,IAAI,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;IAOjD,SAAS,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,YAAY;IACrF,4NAA4N;IAC5N,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,EAAE,QAAQ,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,GAAG,YAAY;IA+KlI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2CG;IACH,OAAO,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAEhD;;;;;;;;;;OAUG;IACH,OAAO,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,EAAE,WAAW,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;IAoCrF,IAAI,IAAI,UAAU,CAAC,CAAC,CAAC;IACrB,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;IACnD,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;IACnF,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;IACnH,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EACb,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,GAC1B,UAAU,CAAC,CAAC,CAAC;IAChB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAChB,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,GAC1B,UAAU,CAAC,CAAC,CAAC;IAChB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EACnB,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,GAC1B,UAAU,CAAC,CAAC,CAAC;IAChB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EACtB,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,GAC1B,UAAU,CAAC,CAAC,CAAC;IAChB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EACzB,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,GAC1B,UAAU,CAAC,CAAC,CAAC;IAChB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAC5B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,GAC1B,UAAU,CAAC,CAAC,CAAC;IAChB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAC5B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,UAAU,EAAE,gBAAgB,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,GAC1C,UAAU,CAAC,OAAO,CAAC;IA4BtB,2JAA2J;IAC3J,SAAS,IAAI,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IACnC,2JAA2J;IAC3J,SAAS,CAAC,WAAW,EAAE,OAAO,OAAO,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAC9D,2JAA2J;IAC3J,SAAS,CAAC,WAAW,EAAE,sBAAsB,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;CAgCvE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Operator.d.ts b/node_modules/rxjs/dist/types/internal/Operator.d.ts deleted file mode 100644 index d7377ee..0000000 --- a/node_modules/rxjs/dist/types/internal/Operator.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Subscriber } from './Subscriber'; -import { TeardownLogic } from './types'; -/*** - * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. - */ -export interface Operator { - call(subscriber: Subscriber, source: any): TeardownLogic; -} -//# sourceMappingURL=Operator.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Operator.d.ts.map b/node_modules/rxjs/dist/types/internal/Operator.d.ts.map deleted file mode 100644 index 13e2530..0000000 --- a/node_modules/rxjs/dist/types/internal/Operator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Operator.d.ts","sourceRoot":"","sources":["../../../src/internal/Operator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC;;GAEG;AACH,MAAM,WAAW,QAAQ,CAAC,CAAC,EAAE,CAAC;IAC5B,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,aAAa,CAAC;CAC7D"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/ReplaySubject.d.ts b/node_modules/rxjs/dist/types/internal/ReplaySubject.d.ts deleted file mode 100644 index c19b2d0..0000000 --- a/node_modules/rxjs/dist/types/internal/ReplaySubject.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { Subject } from './Subject'; -import { TimestampProvider } from './types'; -/** - * A variant of {@link Subject} that "replays" old values to new subscribers by emitting them when they first subscribe. - * - * `ReplaySubject` has an internal buffer that will store a specified number of values that it has observed. Like `Subject`, - * `ReplaySubject` "observes" values by having them passed to its `next` method. When it observes a value, it will store that - * value for a time determined by the configuration of the `ReplaySubject`, as passed to its constructor. - * - * When a new subscriber subscribes to the `ReplaySubject` instance, it will synchronously emit all values in its buffer in - * a First-In-First-Out (FIFO) manner. The `ReplaySubject` will also complete, if it has observed completion; and it will - * error if it has observed an error. - * - * There are two main configuration items to be concerned with: - * - * 1. `bufferSize` - This will determine how many items are stored in the buffer, defaults to infinite. - * 2. `windowTime` - The amount of time to hold a value in the buffer before removing it from the buffer. - * - * Both configurations may exist simultaneously. So if you would like to buffer a maximum of 3 values, as long as the values - * are less than 2 seconds old, you could do so with a `new ReplaySubject(3, 2000)`. - * - * ### Differences with BehaviorSubject - * - * `BehaviorSubject` is similar to `new ReplaySubject(1)`, with a couple of exceptions: - * - * 1. `BehaviorSubject` comes "primed" with a single value upon construction. - * 2. `ReplaySubject` will replay values, even after observing an error, where `BehaviorSubject` will not. - * - * @see {@link Subject} - * @see {@link BehaviorSubject} - * @see {@link shareReplay} - */ -export declare class ReplaySubject extends Subject { - private _bufferSize; - private _windowTime; - private _timestampProvider; - private _buffer; - private _infiniteTimeWindow; - /** - * @param _bufferSize The size of the buffer to replay on subscription - * @param _windowTime The amount of time the buffered items will stay buffered - * @param _timestampProvider An object with a `now()` method that provides the current timestamp. This is used to - * calculate the amount of time something has been buffered. - */ - constructor(_bufferSize?: number, _windowTime?: number, _timestampProvider?: TimestampProvider); - next(value: T): void; - private _trimBuffer; -} -//# sourceMappingURL=ReplaySubject.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/ReplaySubject.d.ts.map b/node_modules/rxjs/dist/types/internal/ReplaySubject.d.ts.map deleted file mode 100644 index a66a0f9..0000000 --- a/node_modules/rxjs/dist/types/internal/ReplaySubject.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ReplaySubject.d.ts","sourceRoot":"","sources":["../../../src/internal/ReplaySubject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAK5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,aAAa,CAAC,CAAC,CAAE,SAAQ,OAAO,CAAC,CAAC,CAAC;IAW5C,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,kBAAkB;IAZ5B,OAAO,CAAC,OAAO,CAAsB;IACrC,OAAO,CAAC,mBAAmB,CAAQ;IAEnC;;;;;OAKG;gBAEO,WAAW,SAAW,EACtB,WAAW,SAAW,EACtB,kBAAkB,GAAE,iBAAyC;IAQvE,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;IA8BpB,OAAO,CAAC,WAAW;CAsBpB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Scheduler.d.ts b/node_modules/rxjs/dist/types/internal/Scheduler.d.ts deleted file mode 100644 index 87919f3..0000000 --- a/node_modules/rxjs/dist/types/internal/Scheduler.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Action } from './scheduler/Action'; -import { Subscription } from './Subscription'; -import { SchedulerLike, SchedulerAction } from './types'; -/** - * An execution context and a data structure to order tasks and schedule their - * execution. Provides a notion of (potentially virtual) time, through the - * `now()` getter method. - * - * Each unit of work in a Scheduler is called an `Action`. - * - * ```ts - * class Scheduler { - * now(): number; - * schedule(work, delay?, state?): Subscription; - * } - * ``` - * - * @deprecated Scheduler is an internal implementation detail of RxJS, and - * should not be used directly. Rather, create your own class and implement - * {@link SchedulerLike}. Will be made internal in v8. - */ -export declare class Scheduler implements SchedulerLike { - private schedulerActionCtor; - static now: () => number; - constructor(schedulerActionCtor: typeof Action, now?: () => number); - /** - * A getter method that returns a number representing the current time - * (at the time this function was called) according to the scheduler's own - * internal clock. - * @return A number that represents the current time. May or may not - * have a relation to wall-clock time. May or may not refer to a time unit - * (e.g. milliseconds). - */ - now: () => number; - /** - * Schedules a function, `work`, for execution. May happen at some point in - * the future, according to the `delay` parameter, if specified. May be passed - * some context object, `state`, which will be passed to the `work` function. - * - * The given arguments will be processed an stored as an Action object in a - * queue of actions. - * - * @param work A function representing a task, or some unit of work to be - * executed by the Scheduler. - * @param delay Time to wait before executing the work, where the time unit is - * implicit and defined by the Scheduler itself. - * @param state Some contextual data that the `work` function uses when called - * by the Scheduler. - * @return A subscription in order to be able to unsubscribe the scheduled work. - */ - schedule(work: (this: SchedulerAction, state?: T) => void, delay?: number, state?: T): Subscription; -} -//# sourceMappingURL=Scheduler.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Scheduler.d.ts.map b/node_modules/rxjs/dist/types/internal/Scheduler.d.ts.map deleted file mode 100644 index 5c008b6..0000000 --- a/node_modules/rxjs/dist/types/internal/Scheduler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Scheduler.d.ts","sourceRoot":"","sources":["../../../src/internal/Scheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAGzD;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,SAAU,YAAW,aAAa;IAGjC,OAAO,CAAC,mBAAmB;IAFvC,OAAc,GAAG,EAAE,MAAM,MAAM,CAA6B;gBAExC,mBAAmB,EAAE,OAAO,MAAM,EAAE,GAAG,GAAE,MAAM,MAAsB;IAIzF;;;;;;;OAOG;IACI,GAAG,EAAE,MAAM,MAAM,CAAC;IAEzB;;;;;;;;;;;;;;;OAeG;IACI,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,EAAE,KAAK,GAAE,MAAU,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,YAAY;CAGpH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Subject.d.ts b/node_modules/rxjs/dist/types/internal/Subject.d.ts deleted file mode 100644 index 8bb1d03..0000000 --- a/node_modules/rxjs/dist/types/internal/Subject.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { Operator } from './Operator'; -import { Observable } from './Observable'; -import { Observer, SubscriptionLike } from './types'; -/** - * A Subject is a special type of Observable that allows values to be - * multicasted to many Observers. Subjects are like EventEmitters. - * - * Every Subject is an Observable and an Observer. You can subscribe to a - * Subject, and you can call next to feed values as well as error and complete. - */ -export declare class Subject extends Observable implements SubscriptionLike { - closed: boolean; - private currentObservers; - /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ - observers: Observer[]; - /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ - isStopped: boolean; - /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ - hasError: boolean; - /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ - thrownError: any; - /** - * Creates a "subject" by basically gluing an observer to an observable. - * - * @deprecated Recommended you do not use. Will be removed at some point in the future. Plans for replacement still under discussion. - */ - static create: (...args: any[]) => any; - constructor(); - /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ - lift(operator: Operator): Observable; - next(value: T): void; - error(err: any): void; - complete(): void; - unsubscribe(): void; - get observed(): boolean; - /** - * Creates a new Observable with this Subject as the source. You can do this - * to create custom Observer-side logic of the Subject and conceal it from - * code that uses the Observable. - * @return Observable that this Subject casts to. - */ - asObservable(): Observable; -} -export declare class AnonymousSubject extends Subject { - /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ - destination?: Observer | undefined; - constructor( - /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ - destination?: Observer | undefined, source?: Observable); - next(value: T): void; - error(err: any): void; - complete(): void; -} -//# sourceMappingURL=Subject.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Subject.d.ts.map b/node_modules/rxjs/dist/types/internal/Subject.d.ts.map deleted file mode 100644 index 65d9487..0000000 --- a/node_modules/rxjs/dist/types/internal/Subject.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Subject.d.ts","sourceRoot":"","sources":["../../../src/internal/Subject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAiB,MAAM,SAAS,CAAC;AAKpE;;;;;;GAMG;AACH,qBAAa,OAAO,CAAC,CAAC,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAE,YAAW,gBAAgB;IACvE,MAAM,UAAS;IAEf,OAAO,CAAC,gBAAgB,CAA8B;IAEtD,oGAAoG;IACpG,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAM;IAC9B,oGAAoG;IACpG,SAAS,UAAS;IAClB,oGAAoG;IACpG,QAAQ,UAAS;IACjB,oGAAoG;IACpG,WAAW,EAAE,GAAG,CAAQ;IAExB;;;;OAIG;IACH,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAEpC;;IAOF,oGAAoG;IACpG,IAAI,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;IAahD,IAAI,CAAC,KAAK,EAAE,CAAC;IAcb,KAAK,CAAC,GAAG,EAAE,GAAG;IAcd,QAAQ;IAaR,WAAW;IAKX,IAAI,QAAQ,YAEX;IAuCD;;;;;OAKG;IACH,YAAY,IAAI,UAAU,CAAC,CAAC,CAAC;CAK9B;AAED,qBAAa,gBAAgB,CAAC,CAAC,CAAE,SAAQ,OAAO,CAAC,CAAC,CAAC;IAE/C,oGAAoG;IAC7F,WAAW,CAAC;;IADnB,oGAAoG;IAC7F,WAAW,CAAC,yBAAa,EAChC,MAAM,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC;IAMxB,IAAI,CAAC,KAAK,EAAE,CAAC;IAIb,KAAK,CAAC,GAAG,EAAE,GAAG;IAId,QAAQ;CAQT"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Subscriber.d.ts b/node_modules/rxjs/dist/types/internal/Subscriber.d.ts deleted file mode 100644 index 92aefd5..0000000 --- a/node_modules/rxjs/dist/types/internal/Subscriber.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { Observer } from './types'; -import { Subscription } from './Subscription'; -/** - * Implements the {@link Observer} interface and extends the - * {@link Subscription} class. While the {@link Observer} is the public API for - * consuming the values of an {@link Observable}, all Observers get converted to - * a Subscriber, in order to provide Subscription-like capabilities such as - * `unsubscribe`. Subscriber is a common type in RxJS, and crucial for - * implementing operators, but it is rarely used as a public API. - */ -export declare class Subscriber extends Subscription implements Observer { - /** - * A static factory for a Subscriber, given a (potentially partial) definition - * of an Observer. - * @param next The `next` callback of an Observer. - * @param error The `error` callback of an - * Observer. - * @param complete The `complete` callback of an - * Observer. - * @return A Subscriber wrapping the (partially defined) - * Observer represented by the given arguments. - * @deprecated Do not use. Will be removed in v8. There is no replacement for this - * method, and there is no reason to be creating instances of `Subscriber` directly. - * If you have a specific use case, please file an issue. - */ - static create(next?: (x?: T) => void, error?: (e?: any) => void, complete?: () => void): Subscriber; - /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ - protected isStopped: boolean; - /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ - protected destination: Subscriber | Observer; - /** - * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. - * There is no reason to directly create an instance of Subscriber. This type is exported for typings reasons. - */ - constructor(destination?: Subscriber | Observer); - /** - * The {@link Observer} callback to receive notifications of type `next` from - * the Observable, with a value. The Observable may call this method 0 or more - * times. - * @param value The `next` value. - */ - next(value: T): void; - /** - * The {@link Observer} callback to receive notifications of type `error` from - * the Observable, with an attached `Error`. Notifies the Observer that - * the Observable has experienced an error condition. - * @param err The `error` exception. - */ - error(err?: any): void; - /** - * The {@link Observer} callback to receive a valueless notification of type - * `complete` from the Observable. Notifies the Observer that the Observable - * has finished sending push-based notifications. - */ - complete(): void; - unsubscribe(): void; - protected _next(value: T): void; - protected _error(err: any): void; - protected _complete(): void; -} -export declare class SafeSubscriber extends Subscriber { - constructor(observerOrNext?: Partial> | ((value: T) => void) | null, error?: ((e?: any) => void) | null, complete?: (() => void) | null); -} -/** - * The observer used as a stub for subscriptions where the user did not - * pass any arguments to `subscribe`. Comes with the default error handling - * behavior. - */ -export declare const EMPTY_OBSERVER: Readonly> & { - closed: true; -}; -//# sourceMappingURL=Subscriber.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Subscriber.d.ts.map b/node_modules/rxjs/dist/types/internal/Subscriber.d.ts.map deleted file mode 100644 index 3bdf84c..0000000 --- a/node_modules/rxjs/dist/types/internal/Subscriber.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Subscriber.d.ts","sourceRoot":"","sources":["../../../src/internal/Subscriber.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAA0B,MAAM,SAAS,CAAC;AAC3D,OAAO,EAAkB,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQ9D;;;;;;;GAOG;AACH,qBAAa,UAAU,CAAC,CAAC,CAAE,SAAQ,YAAa,YAAW,QAAQ,CAAC,CAAC,CAAC;IACpE;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,EAAE,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC;IAIzG,oGAAoG;IACpG,SAAS,CAAC,SAAS,EAAE,OAAO,CAAS;IACrC,oGAAoG;IACpG,SAAS,CAAC,WAAW,EAAE,UAAU,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAEvD;;;OAGG;gBACS,WAAW,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC;IAczD;;;;;OAKG;IACH,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;IAQpB;;;;;OAKG;IACH,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,IAAI;IAStB;;;;OAIG;IACH,QAAQ,IAAI,IAAI;IAShB,WAAW,IAAI,IAAI;IAQnB,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;IAI/B,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI;IAQhC,SAAS,CAAC,SAAS,IAAI,IAAI;CAO5B;AAwDD,qBAAa,cAAc,CAAC,CAAC,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAC;gBAEhD,cAAc,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,IAAI,EACnE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,EAClC,QAAQ,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI;CAqCjC;AAgCD;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG;IAAE,MAAM,EAAE,IAAI,CAAA;CAKpE,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Subscription.d.ts b/node_modules/rxjs/dist/types/internal/Subscription.d.ts deleted file mode 100644 index 63cb040..0000000 --- a/node_modules/rxjs/dist/types/internal/Subscription.d.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { SubscriptionLike, TeardownLogic } from './types'; -/** - * Represents a disposable resource, such as the execution of an Observable. A - * Subscription has one important method, `unsubscribe`, that takes no argument - * and just disposes the resource held by the subscription. - * - * Additionally, subscriptions may be grouped together through the `add()` - * method, which will attach a child Subscription to the current Subscription. - * When a Subscription is unsubscribed, all its children (and its grandchildren) - * will be unsubscribed as well. - */ -export declare class Subscription implements SubscriptionLike { - private initialTeardown?; - static EMPTY: Subscription; - /** - * A flag to indicate whether this Subscription has already been unsubscribed. - */ - closed: boolean; - private _parentage; - /** - * The list of registered finalizers to execute upon unsubscription. Adding and removing from this - * list occurs in the {@link #add} and {@link #remove} methods. - */ - private _finalizers; - /** - * @param initialTeardown A function executed first as part of the finalization - * process that is kicked off when {@link #unsubscribe} is called. - */ - constructor(initialTeardown?: (() => void) | undefined); - /** - * Disposes the resources held by the subscription. May, for instance, cancel - * an ongoing Observable execution or cancel any other type of work that - * started when the Subscription was created. - */ - unsubscribe(): void; - /** - * Adds a finalizer to this subscription, so that finalization will be unsubscribed/called - * when this subscription is unsubscribed. If this subscription is already {@link #closed}, - * because it has already been unsubscribed, then whatever finalizer is passed to it - * will automatically be executed (unless the finalizer itself is also a closed subscription). - * - * Closed Subscriptions cannot be added as finalizers to any subscription. Adding a closed - * subscription to a any subscription will result in no operation. (A noop). - * - * Adding a subscription to itself, or adding `null` or `undefined` will not perform any - * operation at all. (A noop). - * - * `Subscription` instances that are added to this instance will automatically remove themselves - * if they are unsubscribed. Functions and {@link Unsubscribable} objects that you wish to remove - * will need to be removed manually with {@link #remove} - * - * @param teardown The finalization logic to add to this subscription. - */ - add(teardown: TeardownLogic): void; - /** - * Checks to see if a this subscription already has a particular parent. - * This will signal that this subscription has already been added to the parent in question. - * @param parent the parent to check for - */ - private _hasParent; - /** - * Adds a parent to this subscription so it can be removed from the parent if it - * unsubscribes on it's own. - * - * NOTE: THIS ASSUMES THAT {@link _hasParent} HAS ALREADY BEEN CHECKED. - * @param parent The parent subscription to add - */ - private _addParent; - /** - * Called on a child when it is removed via {@link #remove}. - * @param parent The parent to remove - */ - private _removeParent; - /** - * Removes a finalizer from this subscription that was previously added with the {@link #add} method. - * - * Note that `Subscription` instances, when unsubscribed, will automatically remove themselves - * from every other `Subscription` they have been added to. This means that using the `remove` method - * is not a common thing and should be used thoughtfully. - * - * If you add the same finalizer instance of a function or an unsubscribable object to a `Subscription` instance - * more than once, you will need to call `remove` the same number of times to remove all instances. - * - * All finalizer instances are removed to free up memory upon unsubscription. - * - * @param teardown The finalizer to remove from this subscription - */ - remove(teardown: Exclude): void; -} -export declare const EMPTY_SUBSCRIPTION: Subscription; -export declare function isSubscription(value: any): value is Subscription; -//# sourceMappingURL=Subscription.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/Subscription.d.ts.map b/node_modules/rxjs/dist/types/internal/Subscription.d.ts.map deleted file mode 100644 index 932ac36..0000000 --- a/node_modules/rxjs/dist/types/internal/Subscription.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Subscription.d.ts","sourceRoot":"","sources":["../../../src/internal/Subscription.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAkB,MAAM,SAAS,CAAC;AAG1E;;;;;;;;;GASG;AACH,qBAAa,YAAa,YAAW,gBAAgB;IAwBvC,OAAO,CAAC,eAAe,CAAC;IAvBpC,OAAc,KAAK,eAId;IAEL;;OAEG;IACI,MAAM,UAAS;IAEtB,OAAO,CAAC,UAAU,CAA8C;IAEhE;;;OAGG;IACH,OAAO,CAAC,WAAW,CAA+C;IAElE;;;OAGG;gBACiB,eAAe,CAAC,SAAQ,IAAI,aAAA;IAEhD;;;;OAIG;IACH,WAAW,IAAI,IAAI;IAmDnB;;;;;;;;;;;;;;;;;OAiBG;IACH,GAAG,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI;IAsBlC;;;;OAIG;IACH,OAAO,CAAC,UAAU;IAKlB;;;;;;OAMG;IACH,OAAO,CAAC,UAAU;IAKlB;;;OAGG;IACH,OAAO,CAAC,aAAa;IASrB;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,GAAG,IAAI;CAQrD;AAED,eAAO,MAAM,kBAAkB,cAAqB,CAAC;AAErD,wBAAgB,cAAc,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,YAAY,CAKhE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/ajax/AjaxResponse.d.ts b/node_modules/rxjs/dist/types/internal/ajax/AjaxResponse.d.ts deleted file mode 100644 index 79e8270..0000000 --- a/node_modules/rxjs/dist/types/internal/ajax/AjaxResponse.d.ts +++ /dev/null @@ -1,115 +0,0 @@ -import { AjaxRequest, AjaxResponseType } from './types'; -/** - * A normalized response from an AJAX request. To get the data from the response, - * you will want to read the `response` property. - * - * - DO NOT create instances of this class directly. - * - DO NOT subclass this class. - * - * It is advised not to hold this object in memory, as it has a reference to - * the original XHR used to make the request, as well as properties containing - * request and response data. - * - * @see {@link ajax} - * @see {@link AjaxConfig} - */ -export declare class AjaxResponse { - /** - * The original event object from the raw XHR event. - */ - readonly originalEvent: ProgressEvent; - /** - * The XMLHttpRequest object used to make the request. - * NOTE: It is advised not to hold this in memory, as it will retain references to all of it's event handlers - * and many other things related to the request. - */ - readonly xhr: XMLHttpRequest; - /** - * The request parameters used to make the HTTP request. - */ - readonly request: AjaxRequest; - /** - * The event type. This can be used to discern between different events - * if you're using progress events with {@link includeDownloadProgress} or - * {@link includeUploadProgress} settings in {@link AjaxConfig}. - * - * The event type consists of two parts: the {@link AjaxDirection} and the - * the event type. Merged with `_`, they form the `type` string. The - * direction can be an `upload` or a `download` direction, while an event can - * be `loadstart`, `progress` or `load`. - * - * `download_load` is the type of event when download has finished and the - * response is available. - */ - readonly type: AjaxResponseType; - /** The HTTP status code */ - readonly status: number; - /** - * The response data, if any. Note that this will automatically be converted to the proper type - */ - readonly response: T; - /** - * The responseType set on the request. (For example: `""`, `"arraybuffer"`, `"blob"`, `"document"`, `"json"`, or `"text"`) - * @deprecated There isn't much reason to examine this. It's the same responseType set (or defaulted) on the ajax config. - * If you really need to examine this value, you can check it on the `request` or the `xhr`. Will be removed in v8. - */ - readonly responseType: XMLHttpRequestResponseType; - /** - * The total number of bytes loaded so far. To be used with {@link total} while - * calculating progress. (You will want to set {@link includeDownloadProgress} or - * {@link includeDownloadProgress}) - */ - readonly loaded: number; - /** - * The total number of bytes to be loaded. To be used with {@link loaded} while - * calculating progress. (You will want to set {@link includeDownloadProgress} or - * {@link includeDownloadProgress}) - */ - readonly total: number; - /** - * A dictionary of the response headers. - */ - readonly responseHeaders: Record; - /** - * A normalized response from an AJAX request. To get the data from the response, - * you will want to read the `response` property. - * - * - DO NOT create instances of this class directly. - * - DO NOT subclass this class. - * - * @param originalEvent The original event object from the XHR `onload` event. - * @param xhr The `XMLHttpRequest` object used to make the request. This is useful for examining status code, etc. - * @param request The request settings used to make the HTTP request. - * @param type The type of the event emitted by the {@link ajax} Observable - */ - constructor( - /** - * The original event object from the raw XHR event. - */ - originalEvent: ProgressEvent, - /** - * The XMLHttpRequest object used to make the request. - * NOTE: It is advised not to hold this in memory, as it will retain references to all of it's event handlers - * and many other things related to the request. - */ - xhr: XMLHttpRequest, - /** - * The request parameters used to make the HTTP request. - */ - request: AjaxRequest, - /** - * The event type. This can be used to discern between different events - * if you're using progress events with {@link includeDownloadProgress} or - * {@link includeUploadProgress} settings in {@link AjaxConfig}. - * - * The event type consists of two parts: the {@link AjaxDirection} and the - * the event type. Merged with `_`, they form the `type` string. The - * direction can be an `upload` or a `download` direction, while an event can - * be `loadstart`, `progress` or `load`. - * - * `download_load` is the type of event when download has finished and the - * response is available. - */ - type?: AjaxResponseType); -} -//# sourceMappingURL=AjaxResponse.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/ajax/AjaxResponse.d.ts.map b/node_modules/rxjs/dist/types/internal/ajax/AjaxResponse.d.ts.map deleted file mode 100644 index 6381aa8..0000000 --- a/node_modules/rxjs/dist/types/internal/ajax/AjaxResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AjaxResponse.d.ts","sourceRoot":"","sources":["../../../../src/internal/ajax/AjaxResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGxD;;;;;;;;;;;;;GAaG;AACH,qBAAa,YAAY,CAAC,CAAC;IAgDvB;;OAEG;aACa,aAAa,EAAE,aAAa;IAC5C;;;;OAIG;aACa,GAAG,EAAE,cAAc;IACnC;;OAEG;aACa,OAAO,EAAE,WAAW;IACpC;;;;;;;;;;;;OAYG;aACa,IAAI,EAAE,gBAAgB;IA1ExC,2BAA2B;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IAErB;;;;OAIG;IACH,QAAQ,CAAC,YAAY,EAAE,0BAA0B,CAAC;IAElD;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjD;;;;;;;;;;;OAWG;;IAED;;OAEG;IACa,aAAa,EAAE,aAAa;IAC5C;;;;OAIG;IACa,GAAG,EAAE,cAAc;IACnC;;OAEG;IACa,OAAO,EAAE,WAAW;IACpC;;;;;;;;;;;;OAYG;IACa,IAAI,GAAE,gBAAkC;CA+B3D"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/ajax/ajax.d.ts b/node_modules/rxjs/dist/types/internal/ajax/ajax.d.ts deleted file mode 100644 index 4b5d485..0000000 --- a/node_modules/rxjs/dist/types/internal/ajax/ajax.d.ts +++ /dev/null @@ -1,227 +0,0 @@ -import { Observable } from '../Observable'; -import { AjaxConfig } from './types'; -import { AjaxResponse } from './AjaxResponse'; -export interface AjaxCreationMethod { - /** - * Creates an observable that will perform an AJAX request using the - * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in - * global scope by default. - * - * This is the most configurable option, and the basis for all other AJAX calls in the library. - * - * ## Example - * - * ```ts - * import { ajax } from 'rxjs/ajax'; - * import { map, catchError, of } from 'rxjs'; - * - * const obs$ = ajax({ - * method: 'GET', - * url: 'https://api.github.com/users?per_page=5', - * responseType: 'json' - * }).pipe( - * map(userResponse => console.log('users: ', userResponse)), - * catchError(error => { - * console.log('error: ', error); - * return of(error); - * }) - * ); - * ``` - */ - (config: AjaxConfig): Observable>; - /** - * Perform an HTTP GET using the - * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in - * global scope. Defaults to a `responseType` of `"json"`. - * - * ## Example - * - * ```ts - * import { ajax } from 'rxjs/ajax'; - * import { map, catchError, of } from 'rxjs'; - * - * const obs$ = ajax('https://api.github.com/users?per_page=5').pipe( - * map(userResponse => console.log('users: ', userResponse)), - * catchError(error => { - * console.log('error: ', error); - * return of(error); - * }) - * ); - * ``` - */ - (url: string): Observable>; - /** - * Performs an HTTP GET using the - * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in - * global scope by default, and a `responseType` of `"json"`. - * - * @param url The URL to get the resource from - * @param headers Optional headers. Case-Insensitive. - */ - get(url: string, headers?: Record): Observable>; - /** - * Performs an HTTP POST using the - * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in - * global scope by default, and a `responseType` of `"json"`. - * - * Before sending the value passed to the `body` argument, it is automatically serialized - * based on the specified `responseType`. By default, a JavaScript object will be serialized - * to JSON. A `responseType` of `application/x-www-form-urlencoded` will flatten any provided - * dictionary object to a url-encoded string. - * - * @param url The URL to get the resource from - * @param body The content to send. The body is automatically serialized. - * @param headers Optional headers. Case-Insensitive. - */ - post(url: string, body?: any, headers?: Record): Observable>; - /** - * Performs an HTTP PUT using the - * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in - * global scope by default, and a `responseType` of `"json"`. - * - * Before sending the value passed to the `body` argument, it is automatically serialized - * based on the specified `responseType`. By default, a JavaScript object will be serialized - * to JSON. A `responseType` of `application/x-www-form-urlencoded` will flatten any provided - * dictionary object to a url-encoded string. - * - * @param url The URL to get the resource from - * @param body The content to send. The body is automatically serialized. - * @param headers Optional headers. Case-Insensitive. - */ - put(url: string, body?: any, headers?: Record): Observable>; - /** - * Performs an HTTP PATCH using the - * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in - * global scope by default, and a `responseType` of `"json"`. - * - * Before sending the value passed to the `body` argument, it is automatically serialized - * based on the specified `responseType`. By default, a JavaScript object will be serialized - * to JSON. A `responseType` of `application/x-www-form-urlencoded` will flatten any provided - * dictionary object to a url-encoded string. - * - * @param url The URL to get the resource from - * @param body The content to send. The body is automatically serialized. - * @param headers Optional headers. Case-Insensitive. - */ - patch(url: string, body?: any, headers?: Record): Observable>; - /** - * Performs an HTTP DELETE using the - * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in - * global scope by default, and a `responseType` of `"json"`. - * - * @param url The URL to get the resource from - * @param headers Optional headers. Case-Insensitive. - */ - delete(url: string, headers?: Record): Observable>; - /** - * Performs an HTTP GET using the - * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in - * global scope by default, and returns the hydrated JavaScript object from the - * response. - * - * @param url The URL to get the resource from - * @param headers Optional headers. Case-Insensitive. - */ - getJSON(url: string, headers?: Record): Observable; -} -/** - * There is an ajax operator on the Rx object. - * - * It creates an observable for an Ajax request with either a request object with - * url, headers, etc or a string for a URL. - * - * ## Examples - * - * Using `ajax()` to fetch the response object that is being returned from API - * - * ```ts - * import { ajax } from 'rxjs/ajax'; - * import { map, catchError, of } from 'rxjs'; - * - * const obs$ = ajax('https://api.github.com/users?per_page=5').pipe( - * map(userResponse => console.log('users: ', userResponse)), - * catchError(error => { - * console.log('error: ', error); - * return of(error); - * }) - * ); - * - * obs$.subscribe({ - * next: value => console.log(value), - * error: err => console.log(err) - * }); - * ``` - * - * Using `ajax.getJSON()` to fetch data from API - * - * ```ts - * import { ajax } from 'rxjs/ajax'; - * import { map, catchError, of } from 'rxjs'; - * - * const obs$ = ajax.getJSON('https://api.github.com/users?per_page=5').pipe( - * map(userResponse => console.log('users: ', userResponse)), - * catchError(error => { - * console.log('error: ', error); - * return of(error); - * }) - * ); - * - * obs$.subscribe({ - * next: value => console.log(value), - * error: err => console.log(err) - * }); - * ``` - * - * Using `ajax()` with object as argument and method POST with a two seconds delay - * - * ```ts - * import { ajax } from 'rxjs/ajax'; - * import { map, catchError, of } from 'rxjs'; - * - * const users = ajax({ - * url: 'https://httpbin.org/delay/2', - * method: 'POST', - * headers: { - * 'Content-Type': 'application/json', - * 'rxjs-custom-header': 'Rxjs' - * }, - * body: { - * rxjs: 'Hello World!' - * } - * }).pipe( - * map(response => console.log('response: ', response)), - * catchError(error => { - * console.log('error: ', error); - * return of(error); - * }) - * ); - * - * users.subscribe({ - * next: value => console.log(value), - * error: err => console.log(err) - * }); - * ``` - * - * Using `ajax()` to fetch. An error object that is being returned from the request - * - * ```ts - * import { ajax } from 'rxjs/ajax'; - * import { map, catchError, of } from 'rxjs'; - * - * const obs$ = ajax('https://api.github.com/404').pipe( - * map(userResponse => console.log('users: ', userResponse)), - * catchError(error => { - * console.log('error: ', error); - * return of(error); - * }) - * ); - * - * obs$.subscribe({ - * next: value => console.log(value), - * error: err => console.log(err) - * }); - * ``` - */ -export declare const ajax: AjaxCreationMethod; -export declare function fromAjax(init: AjaxConfig): Observable>; -//# sourceMappingURL=ajax.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/ajax/ajax.d.ts.map b/node_modules/rxjs/dist/types/internal/ajax/ajax.d.ts.map deleted file mode 100644 index 6ccd632..0000000 --- a/node_modules/rxjs/dist/types/internal/ajax/ajax.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ajax.d.ts","sourceRoot":"","sources":["../../../../src/internal/ajax/ajax.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAiD,MAAM,SAAS,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,MAAM,WAAW,kBAAkB;IACjC;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IAErD;;;;;;;;;;;;;;;;;;;OAmBG;IACH,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IAE9C;;;;;;;OAOG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IAEnF;;;;;;;;;;;;;OAaG;IACH,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IAEhG;;;;;;;;;;;;;OAaG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IAE/F;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IAEjG;;;;;;;OAOG;IACH,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IAEtF;;;;;;;;OAQG;IACH,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;CAC1E;AAkCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiGG;AACH,eAAO,MAAM,IAAI,EAAE,kBAmBf,CAAC;AAQL,wBAAgB,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAuPzE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/ajax/errors.d.ts b/node_modules/rxjs/dist/types/internal/ajax/errors.d.ts deleted file mode 100644 index b31aa4c..0000000 --- a/node_modules/rxjs/dist/types/internal/ajax/errors.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { AjaxRequest } from './types'; -/** - * A normalized AJAX error. - * - * @see {@link ajax} - */ -export interface AjaxError extends Error { - /** - * The XHR instance associated with the error. - */ - xhr: XMLHttpRequest; - /** - * The AjaxRequest associated with the error. - */ - request: AjaxRequest; - /** - * The HTTP status code, if the request has completed. If not, - * it is set to `0`. - */ - status: number; - /** - * The responseType (e.g. 'json', 'arraybuffer', or 'xml'). - */ - responseType: XMLHttpRequestResponseType; - /** - * The response data. - */ - response: any; -} -export interface AjaxErrorCtor { - /** - * @deprecated Internal implementation detail. Do not construct error instances. - * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 - */ - new (message: string, xhr: XMLHttpRequest, request: AjaxRequest): AjaxError; -} -/** - * Thrown when an error occurs during an AJAX request. - * This is only exported because it is useful for checking to see if an error - * is an `instanceof AjaxError`. DO NOT create new instances of `AjaxError` with - * the constructor. - * - * @see {@link ajax} - */ -export declare const AjaxError: AjaxErrorCtor; -export interface AjaxTimeoutError extends AjaxError { -} -export interface AjaxTimeoutErrorCtor { - /** - * @deprecated Internal implementation detail. Do not construct error instances. - * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 - */ - new (xhr: XMLHttpRequest, request: AjaxRequest): AjaxTimeoutError; -} -/** - * Thrown when an AJAX request times out. Not to be confused with {@link TimeoutError}. - * - * This is exported only because it is useful for checking to see if errors are an - * `instanceof AjaxTimeoutError`. DO NOT use the constructor to create an instance of - * this type. - * - * @see {@link ajax} - */ -export declare const AjaxTimeoutError: AjaxTimeoutErrorCtor; -//# sourceMappingURL=errors.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/ajax/errors.d.ts.map b/node_modules/rxjs/dist/types/internal/ajax/errors.d.ts.map deleted file mode 100644 index 80bbc2f..0000000 --- a/node_modules/rxjs/dist/types/internal/ajax/errors.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/internal/ajax/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAItC;;;;GAIG;AACH,MAAM,WAAW,SAAU,SAAQ,KAAK;IACtC;;OAEG;IACH,GAAG,EAAE,cAAc,CAAC;IAEpB;;OAEG;IACH,OAAO,EAAE,WAAW,CAAC;IAErB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,YAAY,EAAE,0BAA0B,CAAC;IAEzC;;OAEG;IACH,QAAQ,EAAE,GAAG,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,KAAK,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,cAAc,EAAE,OAAO,EAAE,WAAW,GAAG,SAAS,CAAC;CAC7E;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,EAAE,aAmBvB,CAAC;AAEF,MAAM,WAAW,gBAAiB,SAAQ,SAAS;CAAG;AAEtD,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,KAAK,GAAG,EAAE,cAAc,EAAE,OAAO,EAAE,WAAW,GAAG,gBAAgB,CAAC;CACnE;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,EAAE,oBAQpB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/ajax/getXHRResponse.d.ts b/node_modules/rxjs/dist/types/internal/ajax/getXHRResponse.d.ts deleted file mode 100644 index c33ce59..0000000 --- a/node_modules/rxjs/dist/types/internal/ajax/getXHRResponse.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Gets what should be in the `response` property of the XHR. However, - * since we still support the final versions of IE, we need to do a little - * checking here to make sure that we get the right thing back. Consequently, - * we need to do a JSON.parse() in here, which *could* throw if the response - * isn't valid JSON. - * - * This is used both in creating an AjaxResponse, and in creating certain errors - * that we throw, so we can give the user whatever was in the response property. - * - * @param xhr The XHR to examine the response of - */ -export declare function getXHRResponse(xhr: XMLHttpRequest): any; -//# sourceMappingURL=getXHRResponse.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/ajax/getXHRResponse.d.ts.map b/node_modules/rxjs/dist/types/internal/ajax/getXHRResponse.d.ts.map deleted file mode 100644 index 59ddb07..0000000 --- a/node_modules/rxjs/dist/types/internal/ajax/getXHRResponse.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"getXHRResponse.d.ts","sourceRoot":"","sources":["../../../../src/internal/ajax/getXHRResponse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,cAAc,OAwBjD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/ajax/types.d.ts b/node_modules/rxjs/dist/types/internal/ajax/types.d.ts deleted file mode 100644 index 2ee2b80..0000000 --- a/node_modules/rxjs/dist/types/internal/ajax/types.d.ts +++ /dev/null @@ -1,200 +0,0 @@ -import { PartialObserver } from '../types'; -/** - * Valid Ajax direction types. Prefixes the event `type` in the - * {@link AjaxResponse} object with "upload_" for events related - * to uploading and "download_" for events related to downloading. - */ -export declare type AjaxDirection = 'upload' | 'download'; -export declare type ProgressEventType = 'loadstart' | 'progress' | 'load'; -export declare type AjaxResponseType = `${AjaxDirection}_${ProgressEventType}`; -/** - * The object containing values RxJS used to make the HTTP request. - * - * This is provided in {@link AjaxError} instances as the `request` - * object. - */ -export interface AjaxRequest { - /** - * The URL requested. - */ - url: string; - /** - * The body to send over the HTTP request. - */ - body?: any; - /** - * The HTTP method used to make the HTTP request. - */ - method: string; - /** - * Whether or not the request was made asynchronously. - */ - async: boolean; - /** - * The headers sent over the HTTP request. - */ - headers: Readonly>; - /** - * The timeout value used for the HTTP request. - * Note: this is only honored if the request is asynchronous (`async` is `true`). - */ - timeout: number; - /** - * The user credentials user name sent with the HTTP request. - */ - user?: string; - /** - * The user credentials password sent with the HTTP request. - */ - password?: string; - /** - * Whether or not the request was a CORS request. - */ - crossDomain: boolean; - /** - * Whether or not a CORS request was sent with credentials. - * If `false`, will also ignore cookies in the CORS response. - */ - withCredentials: boolean; - /** - * The [`responseType`](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseType) set before sending the request. - */ - responseType: XMLHttpRequestResponseType; -} -/** - * Configuration for the {@link ajax} creation function. - */ -export interface AjaxConfig { - /** The address of the resource to request via HTTP. */ - url: string; - /** - * The body of the HTTP request to send. - * - * This is serialized, by default, based off of the value of the `"content-type"` header. - * For example, if the `"content-type"` is `"application/json"`, the body will be serialized - * as JSON. If the `"content-type"` is `"application/x-www-form-urlencoded"`, whatever object passed - * to the body will be serialized as URL, using key-value pairs based off of the keys and values of the object. - * In all other cases, the body will be passed directly. - */ - body?: any; - /** - * Whether or not to send the request asynchronously. Defaults to `true`. - * If set to `false`, this will block the thread until the AJAX request responds. - */ - async?: boolean; - /** - * The HTTP Method to use for the request. Defaults to "GET". - */ - method?: string; - /** - * The HTTP headers to apply. - * - * Note that, by default, RxJS will add the following headers under certain conditions: - * - * 1. If the `"content-type"` header is **NOT** set, and the `body` is [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData), - * a `"content-type"` of `"application/x-www-form-urlencoded; charset=UTF-8"` will be set automatically. - * 2. If the `"x-requested-with"` header is **NOT** set, and the `crossDomain` configuration property is **NOT** explicitly set to `true`, - * (meaning it is not a CORS request), a `"x-requested-with"` header with a value of `"XMLHttpRequest"` will be set automatically. - * This header is generally meaningless, and is set by libraries and frameworks using `XMLHttpRequest` to make HTTP requests. - */ - headers?: Readonly>; - /** - * The time to wait before causing the underlying XMLHttpRequest to timeout. This is only honored if the - * `async` configuration setting is unset or set to `true`. Defaults to `0`, which is idiomatic for "never timeout". - */ - timeout?: number; - /** The user credentials user name to send with the HTTP request */ - user?: string; - /** The user credentials password to send with the HTTP request*/ - password?: string; - /** - * Whether or not to send the HTTP request as a CORS request. - * Defaults to `false`. - * - * @deprecated Will be removed in version 8. Cross domain requests and what creates a cross - * domain request, are dictated by the browser, and a boolean that forces it to be cross domain - * does not make sense. If you need to force cross domain, make sure you're making a secure request, - * then add a custom header to the request or use `withCredentials`. For more information on what - * triggers a cross domain request, see the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials). - * In particular, the section on [Simple Requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Simple_requests) is useful - * for understanding when CORS will not be used. - */ - crossDomain?: boolean; - /** - * To send user credentials in a CORS request, set to `true`. To exclude user credentials from - * a CORS request, _OR_ when cookies are to be ignored by the CORS response, set to `false`. - * - * Defaults to `false`. - */ - withCredentials?: boolean; - /** - * The name of your site's XSRF cookie. - */ - xsrfCookieName?: string; - /** - * The name of a custom header that you can use to send your XSRF cookie. - */ - xsrfHeaderName?: string; - /** - * Can be set to change the response type. - * Valid values are `"arraybuffer"`, `"blob"`, `"document"`, `"json"`, and `"text"`. - * Note that the type of `"document"` (such as an XML document) is ignored if the global context is - * not `Window`. - * - * Defaults to `"json"`. - */ - responseType?: XMLHttpRequestResponseType; - /** - * An optional factory used to create the XMLHttpRequest object used to make the AJAX request. - * This is useful in environments that lack `XMLHttpRequest`, or in situations where you - * wish to override the default `XMLHttpRequest` for some reason. - * - * If not provided, the `XMLHttpRequest` in global scope will be used. - * - * NOTE: This AJAX implementation relies on the built-in serialization and setting - * of Content-Type headers that is provided by standards-compliant XMLHttpRequest implementations, - * be sure any implementation you use meets that standard. - */ - createXHR?: () => XMLHttpRequest; - /** - * An observer for watching the upload progress of an HTTP request. Will - * emit progress events, and completes on the final upload load event, will error for - * any XHR error or timeout. - * - * This will **not** error for errored status codes. Rather, it will always _complete_ when - * the HTTP response comes back. - * - * @deprecated If you're looking for progress events, use {@link includeDownloadProgress} and - * {@link includeUploadProgress} instead. Will be removed in v8. - */ - progressSubscriber?: PartialObserver; - /** - * If `true`, will emit all download progress and load complete events as {@link AjaxResponse} - * from the observable. The final download event will also be emitted as a {@link AjaxResponse}. - * - * If both this and {@link includeUploadProgress} are `false`, then only the {@link AjaxResponse} will - * be emitted from the resulting observable. - */ - includeDownloadProgress?: boolean; - /** - * If `true`, will emit all upload progress and load complete events as {@link AjaxResponse} - * from the observable. The final download event will also be emitted as a {@link AjaxResponse}. - * - * If both this and {@link includeDownloadProgress} are `false`, then only the {@link AjaxResponse} will - * be emitted from the resulting observable. - */ - includeUploadProgress?: boolean; - /** - * Query string parameters to add to the URL in the request. - * This will require a polyfill for `URL` and `URLSearchParams` in Internet Explorer! - * - * Accepts either a query string, a `URLSearchParams` object, a dictionary of key/value pairs, or an - * array of key/value entry tuples. (Essentially, it takes anything that `new URLSearchParams` would normally take). - * - * If, for some reason you have a query string in the `url` argument, this will append to the query string in the url, - * but it will also overwrite the value of any keys that are an exact match. In other words, a url of `/test?a=1&b=2`, - * with queryParams of `{ b: 5, c: 6 }` will result in a url of roughly `/test?a=1&b=5&c=6`. - */ - queryParams?: string | URLSearchParams | Record | [string, string | number | boolean | string[] | number[] | boolean[]][]; -} -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/ajax/types.d.ts.map b/node_modules/rxjs/dist/types/internal/ajax/types.d.ts.map deleted file mode 100644 index f80f877..0000000 --- a/node_modules/rxjs/dist/types/internal/ajax/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/internal/ajax/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C;;;;GAIG;AACH,oBAAY,aAAa,GAAG,QAAQ,GAAG,UAAU,CAAC;AAElD,oBAAY,iBAAiB,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,CAAC;AAElE,oBAAY,gBAAgB,GAAG,GAAG,aAAa,IAAI,iBAAiB,EAAE,CAAC;AAEvE;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,IAAI,CAAC,EAAE,GAAG,CAAC;IAEX;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;IAEvC;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,eAAe,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,YAAY,EAAE,0BAA0B,CAAC;CAC1C;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,uDAAuD;IACvD,GAAG,EAAE,MAAM,CAAC;IAEZ;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,GAAG,CAAC;IAEX;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;IAExC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;;;;;;OAWG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,0BAA0B,CAAC;IAE1C;;;;;;;;;;OAUG;IACH,SAAS,CAAC,EAAE,MAAM,cAAc,CAAC;IAEjC;;;;;;;;;;OAUG;IACH,kBAAkB,CAAC,EAAE,eAAe,CAAC,aAAa,CAAC,CAAC;IAEpD;;;;;;OAMG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAElC;;;;;;OAMG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EACR,MAAM,GACN,eAAe,GACf,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,OAAO,EAAE,CAAC,GAC3E,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,OAAO,EAAE,CAAC,EAAE,CAAC;CAC7E"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/config.d.ts b/node_modules/rxjs/dist/types/internal/config.d.ts deleted file mode 100644 index 30fd30b..0000000 --- a/node_modules/rxjs/dist/types/internal/config.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { Subscriber } from './Subscriber'; -import { ObservableNotification } from './types'; -/** - * The {@link GlobalConfig} object for RxJS. It is used to configure things - * like how to react on unhandled errors. - */ -export declare const config: GlobalConfig; -/** - * The global configuration object for RxJS, used to configure things - * like how to react on unhandled errors. Accessible via {@link config} - * object. - */ -export interface GlobalConfig { - /** - * A registration point for unhandled errors from RxJS. These are errors that - * cannot were not handled by consuming code in the usual subscription path. For - * example, if you have this configured, and you subscribe to an observable without - * providing an error handler, errors from that subscription will end up here. This - * will _always_ be called asynchronously on another job in the runtime. This is because - * we do not want errors thrown in this user-configured handler to interfere with the - * behavior of the library. - */ - onUnhandledError: ((err: any) => void) | null; - /** - * A registration point for notifications that cannot be sent to subscribers because they - * have completed, errored or have been explicitly unsubscribed. By default, next, complete - * and error notifications sent to stopped subscribers are noops. However, sometimes callers - * might want a different behavior. For example, with sources that attempt to report errors - * to stopped subscribers, a caller can configure RxJS to throw an unhandled error instead. - * This will _always_ be called asynchronously on another job in the runtime. This is because - * we do not want errors thrown in this user-configured handler to interfere with the - * behavior of the library. - */ - onStoppedNotification: ((notification: ObservableNotification, subscriber: Subscriber) => void) | null; - /** - * The promise constructor used by default for {@link Observable#toPromise toPromise} and {@link Observable#forEach forEach} - * methods. - * - * @deprecated As of version 8, RxJS will no longer support this sort of injection of a - * Promise constructor. If you need a Promise implementation other than native promises, - * please polyfill/patch Promise as you see appropriate. Will be removed in v8. - */ - Promise?: PromiseConstructorLike; - /** - * If true, turns on synchronous error rethrowing, which is a deprecated behavior - * in v6 and higher. This behavior enables bad patterns like wrapping a subscribe - * call in a try/catch block. It also enables producer interference, a nasty bug - * where a multicast can be broken for all observers by a downstream consumer with - * an unhandled error. DO NOT USE THIS FLAG UNLESS IT'S NEEDED TO BUY TIME - * FOR MIGRATION REASONS. - * - * @deprecated As of version 8, RxJS will no longer support synchronous throwing - * of unhandled errors. All errors will be thrown on a separate call stack to prevent bad - * behaviors described above. Will be removed in v8. - */ - useDeprecatedSynchronousErrorHandling: boolean; - /** - * If true, enables an as-of-yet undocumented feature from v5: The ability to access - * `unsubscribe()` via `this` context in `next` functions created in observers passed - * to `subscribe`. - * - * This is being removed because the performance was severely problematic, and it could also cause - * issues when types other than POJOs are passed to subscribe as subscribers, as they will likely have - * their `this` context overwritten. - * - * @deprecated As of version 8, RxJS will no longer support altering the - * context of next functions provided as part of an observer to Subscribe. Instead, - * you will have access to a subscription or a signal or token that will allow you to do things like - * unsubscribe and test closed status. Will be removed in v8. - */ - useDeprecatedNextContext: boolean; -} -//# sourceMappingURL=config.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/config.d.ts.map b/node_modules/rxjs/dist/types/internal/config.d.ts.map deleted file mode 100644 index d18c18f..0000000 --- a/node_modules/rxjs/dist/types/internal/config.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/internal/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,YAMpB,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;;;OAQG;IACH,gBAAgB,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;IAE9C;;;;;;;;;OASG;IACH,qBAAqB,EAAE,CAAC,CAAC,YAAY,EAAE,sBAAsB,CAAC,GAAG,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;IAEjH;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,sBAAsB,CAAC;IAEjC;;;;;;;;;;;OAWG;IACH,qCAAqC,EAAE,OAAO,CAAC;IAE/C;;;;;;;;;;;;;OAaG;IACH,wBAAwB,EAAE,OAAO,CAAC;CACnC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/firstValueFrom.d.ts b/node_modules/rxjs/dist/types/internal/firstValueFrom.d.ts deleted file mode 100644 index fb72678..0000000 --- a/node_modules/rxjs/dist/types/internal/firstValueFrom.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Observable } from './Observable'; -export interface FirstValueFromConfig { - defaultValue: T; -} -export declare function firstValueFrom(source: Observable, config: FirstValueFromConfig): Promise; -export declare function firstValueFrom(source: Observable): Promise; -//# sourceMappingURL=firstValueFrom.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/firstValueFrom.d.ts.map b/node_modules/rxjs/dist/types/internal/firstValueFrom.d.ts.map deleted file mode 100644 index 35a6fbc..0000000 --- a/node_modules/rxjs/dist/types/internal/firstValueFrom.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"firstValueFrom.d.ts","sourceRoot":"","sources":["../../../src/internal/firstValueFrom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C,MAAM,WAAW,oBAAoB,CAAC,CAAC;IACrC,YAAY,EAAE,CAAC,CAAC;CACjB;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7G,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/lastValueFrom.d.ts b/node_modules/rxjs/dist/types/internal/lastValueFrom.d.ts deleted file mode 100644 index 415d601..0000000 --- a/node_modules/rxjs/dist/types/internal/lastValueFrom.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Observable } from './Observable'; -export interface LastValueFromConfig { - defaultValue: T; -} -export declare function lastValueFrom(source: Observable, config: LastValueFromConfig): Promise; -export declare function lastValueFrom(source: Observable): Promise; -//# sourceMappingURL=lastValueFrom.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/lastValueFrom.d.ts.map b/node_modules/rxjs/dist/types/internal/lastValueFrom.d.ts.map deleted file mode 100644 index 70c2cf9..0000000 --- a/node_modules/rxjs/dist/types/internal/lastValueFrom.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"lastValueFrom.d.ts","sourceRoot":"","sources":["../../../src/internal/lastValueFrom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,MAAM,WAAW,mBAAmB,CAAC,CAAC;IACpC,YAAY,EAAE,CAAC,CAAC;CACjB;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAC3G,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/ConnectableObservable.d.ts b/node_modules/rxjs/dist/types/internal/observable/ConnectableObservable.d.ts deleted file mode 100644 index 321d1d5..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/ConnectableObservable.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Subject } from '../Subject'; -import { Observable } from '../Observable'; -import { Subscription } from '../Subscription'; -/** - * @class ConnectableObservable - * @deprecated Will be removed in v8. Use {@link connectable} to create a connectable observable. - * If you are using the `refCount` method of `ConnectableObservable`, use the {@link share} operator - * instead. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export declare class ConnectableObservable extends Observable { - source: Observable; - protected subjectFactory: () => Subject; - protected _subject: Subject | null; - protected _refCount: number; - protected _connection: Subscription | null; - /** - * @param source The source observable - * @param subjectFactory The factory that creates the subject used internally. - * @deprecated Will be removed in v8. Use {@link connectable} to create a connectable observable. - * `new ConnectableObservable(source, factory)` is equivalent to - * `connectable(source, { connector: factory })`. - * When the `refCount()` method is needed, the {@link share} operator should be used instead: - * `new ConnectableObservable(source, factory).refCount()` is equivalent to - * `source.pipe(share({ connector: factory }))`. - * Details: https://rxjs.dev/deprecations/multicasting - */ - constructor(source: Observable, subjectFactory: () => Subject); - protected getSubject(): Subject; - protected _teardown(): void; - /** - * @deprecated {@link ConnectableObservable} will be removed in v8. Use {@link connectable} instead. - * Details: https://rxjs.dev/deprecations/multicasting - */ - connect(): Subscription; - /** - * @deprecated {@link ConnectableObservable} will be removed in v8. Use the {@link share} operator instead. - * Details: https://rxjs.dev/deprecations/multicasting - */ - refCount(): Observable; -} -//# sourceMappingURL=ConnectableObservable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/ConnectableObservable.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/ConnectableObservable.d.ts.map deleted file mode 100644 index b2d33a6..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/ConnectableObservable.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConnectableObservable.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/ConnectableObservable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAK/C;;;;;;GAMG;AACH,qBAAa,qBAAqB,CAAC,CAAC,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAC;IAgBtC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;IAAE,SAAS,CAAC,cAAc,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC;IAfpF,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAQ;IAC7C,SAAS,CAAC,SAAS,EAAE,MAAM,CAAK;IAChC,SAAS,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAAQ;IAElD;;;;;;;;;;OAUG;gBACgB,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,EAAY,cAAc,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC;IAepF,SAAS,CAAC,UAAU,IAAI,OAAO,CAAC,CAAC,CAAC;IAQlC,SAAS,CAAC,SAAS;IAOnB;;;OAGG;IACH,OAAO,IAAI,YAAY;IA+BvB;;;OAGG;IACH,QAAQ,IAAI,UAAU,CAAC,CAAC,CAAC;CAG1B"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/bindCallback.d.ts b/node_modules/rxjs/dist/types/internal/observable/bindCallback.d.ts deleted file mode 100644 index a2b8235..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/bindCallback.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { SchedulerLike } from '../types'; -import { Observable } from '../Observable'; -export declare function bindCallback(callbackFunc: (...args: any[]) => void, resultSelector: (...args: any[]) => any, scheduler?: SchedulerLike): (...args: any[]) => Observable; -export declare function bindCallback(callbackFunc: (...args: [...A, (...res: R) => void]) => void, schedulerLike?: SchedulerLike): (...arg: A) => Observable; -//# sourceMappingURL=bindCallback.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/bindCallback.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/bindCallback.d.ts.map deleted file mode 100644 index d4f6854..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/bindCallback.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bindCallback.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/bindCallback.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,wBAAgB,YAAY,CAC1B,YAAY,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,EACtC,cAAc,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACvC,SAAS,CAAC,EAAE,aAAa,GACxB,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,UAAU,CAAC,GAAG,CAAC,CAAC;AAGvC,wBAAgB,YAAY,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EACrF,YAAY,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC,KAAK,IAAI,EAC5D,aAAa,CAAC,EAAE,aAAa,GAC5B,CAAC,GAAG,GAAG,EAAE,CAAC,KAAK,UAAU,CAAC,CAAC,SAAS,EAAE,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/bindCallbackInternals.d.ts b/node_modules/rxjs/dist/types/internal/observable/bindCallbackInternals.d.ts deleted file mode 100644 index 52aed49..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/bindCallbackInternals.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { SchedulerLike } from '../types'; -import { Observable } from '../Observable'; -export declare function bindCallbackInternals(isNodeStyle: boolean, callbackFunc: any, resultSelector?: any, scheduler?: SchedulerLike): (...args: any[]) => Observable; -//# sourceMappingURL=bindCallbackInternals.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/bindCallbackInternals.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/bindCallbackInternals.d.ts.map deleted file mode 100644 index 2803f25..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/bindCallbackInternals.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bindCallbackInternals.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/bindCallbackInternals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,OAAO,EACpB,YAAY,EAAE,GAAG,EACjB,cAAc,CAAC,EAAE,GAAG,EACpB,SAAS,CAAC,EAAE,aAAa,GACxB,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,UAAU,CAAC,OAAO,CAAC,CAyGzC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/bindNodeCallback.d.ts b/node_modules/rxjs/dist/types/internal/observable/bindNodeCallback.d.ts deleted file mode 100644 index 1ecb72c..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/bindNodeCallback.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Observable } from '../Observable'; -import { SchedulerLike } from '../types'; -export declare function bindNodeCallback(callbackFunc: (...args: any[]) => void, resultSelector: (...args: any[]) => any, scheduler?: SchedulerLike): (...args: any[]) => Observable; -export declare function bindNodeCallback(callbackFunc: (...args: [...A, (err: any, ...res: R) => void]) => void, schedulerLike?: SchedulerLike): (...arg: A) => Observable; -//# sourceMappingURL=bindNodeCallback.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/bindNodeCallback.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/bindNodeCallback.d.ts.map deleted file mode 100644 index 05a49d9..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/bindNodeCallback.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bindNodeCallback.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/bindNodeCallback.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,EACtC,cAAc,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACvC,SAAS,CAAC,EAAE,aAAa,GACxB,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,UAAU,CAAC,GAAG,CAAC,CAAC;AAGvC,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EACzF,YAAY,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC,KAAK,IAAI,EACtE,aAAa,CAAC,EAAE,aAAa,GAC5B,CAAC,GAAG,GAAG,EAAE,CAAC,KAAK,UAAU,CAAC,CAAC,SAAS,EAAE,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/combineLatest.d.ts b/node_modules/rxjs/dist/types/internal/observable/combineLatest.d.ts deleted file mode 100644 index d3623b5..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/combineLatest.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Observable } from '../Observable'; -import { ObservableInput, SchedulerLike, ObservedValueOf, ObservableInputTuple } from '../types'; -import { Subscriber } from '../Subscriber'; -import { AnyCatcher } from '../AnyCatcher'; -/** - * You have passed `any` here, we can't figure out if it is - * an array or an object, so you're getting `unknown`. Use better types. - * @param arg Something typed as `any` - */ -export declare function combineLatest(arg: T): Observable; -export declare function combineLatest(sources: []): Observable; -export declare function combineLatest(sources: readonly [...ObservableInputTuple]): Observable; -/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ -export declare function combineLatest(sources: readonly [...ObservableInputTuple], resultSelector: (...values: A) => R, scheduler: SchedulerLike): Observable; -export declare function combineLatest(sources: readonly [...ObservableInputTuple], resultSelector: (...values: A) => R): Observable; -/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ -export declare function combineLatest(sources: readonly [...ObservableInputTuple], scheduler: SchedulerLike): Observable; -/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */ -export declare function combineLatest(...sources: [...ObservableInputTuple]): Observable; -/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ -export declare function combineLatest(...sourcesAndResultSelectorAndScheduler: [...ObservableInputTuple, (...values: A) => R, SchedulerLike]): Observable; -/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */ -export declare function combineLatest(...sourcesAndResultSelector: [...ObservableInputTuple, (...values: A) => R]): Observable; -/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ -export declare function combineLatest(...sourcesAndScheduler: [...ObservableInputTuple, SchedulerLike]): Observable; -export declare function combineLatest(sourcesObject: { - [K in any]: never; -}): Observable; -export declare function combineLatest>>(sourcesObject: T): Observable<{ - [K in keyof T]: ObservedValueOf; -}>; -export declare function combineLatestInit(observables: ObservableInput[], scheduler?: SchedulerLike, valueTransform?: (values: any[]) => any): (subscriber: Subscriber) => void; -//# sourceMappingURL=combineLatest.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/combineLatest.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/combineLatest.d.ts.map deleted file mode 100644 index 85e348b..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/combineLatest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"combineLatest.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/combineLatest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEjG,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAS3C;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,UAAU,EAAE,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;AAGjF,wBAAgB,aAAa,CAAC,OAAO,EAAE,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AAC9D,wBAAgB,aAAa,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,OAAO,EAAE,SAAS,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AAC3H,qKAAqK;AACrK,wBAAgB,aAAa,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,EAC3D,OAAO,EAAE,SAAS,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,EAC9C,cAAc,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,EACnC,SAAS,EAAE,aAAa,GACvB,UAAU,CAAC,CAAC,CAAC,CAAC;AACjB,wBAAgB,aAAa,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,EAC3D,OAAO,EAAE,SAAS,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,EAC9C,cAAc,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,GAClC,UAAU,CAAC,CAAC,CAAC,CAAC;AACjB,qKAAqK;AACrK,wBAAgB,aAAa,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EACxD,OAAO,EAAE,SAAS,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,EAC9C,SAAS,EAAE,aAAa,GACvB,UAAU,CAAC,CAAC,CAAC,CAAC;AAGjB,+JAA+J;AAC/J,wBAAgB,aAAa,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AACrH,qKAAqK;AACrK,wBAAgB,aAAa,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,EAC3D,GAAG,oCAAoC,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,GACxG,UAAU,CAAC,CAAC,CAAC,CAAC;AACjB,+JAA+J;AAC/J,wBAAgB,aAAa,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,EAC3D,GAAG,wBAAwB,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,GAC7E,UAAU,CAAC,CAAC,CAAC,CAAC;AACjB,qKAAqK;AACrK,wBAAgB,aAAa,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EACxD,GAAG,mBAAmB,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,GAClE,UAAU,CAAC,CAAC,CAAC,CAAC;AAGjB,wBAAgB,aAAa,CAAC,aAAa,EAAE;KAAG,CAAC,IAAI,GAAG,GAAG,KAAK;CAAE,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AACvF,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,EAC1E,aAAa,EAAE,CAAC,GACf,UAAU,CAAC;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC,CAAC;AA8JzD,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,eAAe,CAAC,GAAG,CAAC,EAAE,EACnC,SAAS,CAAC,EAAE,aAAa,EACzB,cAAc,GAAE,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,GAAc,gBAE7B,WAAW,GAAG,CAAC,UA0DpC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/concat.d.ts b/node_modules/rxjs/dist/types/internal/observable/concat.d.ts deleted file mode 100644 index 9fce40b..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/concat.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Observable } from '../Observable'; -import { ObservableInputTuple, SchedulerLike } from '../types'; -export declare function concat(...inputs: [...ObservableInputTuple]): Observable; -export declare function concat(...inputsAndScheduler: [...ObservableInputTuple, SchedulerLike]): Observable; -//# sourceMappingURL=concat.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/concat.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/concat.d.ts.map deleted file mode 100644 index 5b193c4..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/concat.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concat.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/concat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAK/D,wBAAgB,MAAM,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACrH,wBAAgB,MAAM,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EACjD,GAAG,kBAAkB,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,GACjE,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/connectable.d.ts b/node_modules/rxjs/dist/types/internal/observable/connectable.d.ts deleted file mode 100644 index fca54b4..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/connectable.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Connectable, ObservableInput, SubjectLike } from '../types'; -export interface ConnectableConfig { - /** - * A factory function used to create the Subject through which the source - * is multicast. By default this creates a {@link Subject}. - */ - connector: () => SubjectLike; - /** - * If true, the resulting observable will reset internal state upon disconnection - * and return to a "cold" state. This allows the resulting observable to be - * reconnected. - * If false, upon disconnection, the connecting subject will remain the - * connecting subject, meaning the resulting observable will not go "cold" again, - * and subsequent repeats or resubscriptions will resubscribe to that same subject. - */ - resetOnDisconnect?: boolean; -} -/** - * Creates an observable that multicasts once `connect()` is called on it. - * - * @param source The observable source to make connectable. - * @param config The configuration object for `connectable`. - * @returns A "connectable" observable, that has a `connect()` method, that you must call to - * connect the source to all consumers through the subject provided as the connector. - */ -export declare function connectable(source: ObservableInput, config?: ConnectableConfig): Connectable; -//# sourceMappingURL=connectable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/connectable.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/connectable.d.ts.map deleted file mode 100644 index 110fd5e..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/connectable.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"connectable.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/connectable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAMrE,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC;;;OAGG;IACH,SAAS,EAAE,MAAM,WAAW,CAAC,CAAC,CAAC,CAAC;IAChC;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAUD;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,MAAM,GAAE,iBAAiB,CAAC,CAAC,CAAkB,GAAG,WAAW,CAAC,CAAC,CAAC,CAwBxH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/defer.d.ts b/node_modules/rxjs/dist/types/internal/observable/defer.d.ts deleted file mode 100644 index dc0ff1b..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/defer.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { Observable } from '../Observable'; -import { ObservedValueOf, ObservableInput } from '../types'; -/** - * Creates an Observable that, on subscribe, calls an Observable factory to - * make an Observable for each new Observer. - * - * Creates the Observable lazily, that is, only when it - * is subscribed. - * - * - * ![](defer.png) - * - * `defer` allows you to create an Observable only when the Observer - * subscribes. It waits until an Observer subscribes to it, calls the given - * factory function to get an Observable -- where a factory function typically - * generates a new Observable -- and subscribes the Observer to this Observable. - * In case the factory function returns a falsy value, then EMPTY is used as - * Observable instead. Last but not least, an exception during the factory - * function call is transferred to the Observer by calling `error`. - * - * ## Example - * - * Subscribe to either an Observable of clicks or an Observable of interval, at random - * - * ```ts - * import { defer, fromEvent, interval } from 'rxjs'; - * - * const clicksOrInterval = defer(() => { - * return Math.random() > 0.5 - * ? fromEvent(document, 'click') - * : interval(1000); - * }); - * clicksOrInterval.subscribe(x => console.log(x)); - * - * // Results in the following behavior: - * // If the result of Math.random() is greater than 0.5 it will listen - * // for clicks anywhere on the "document"; when document is clicked it - * // will log a MouseEvent object to the console. If the result is less - * // than 0.5 it will emit ascending numbers, one every second(1000ms). - * ``` - * - * @see {@link Observable} - * - * @param observableFactory The Observable factory function to invoke for each - * Observer that subscribes to the output Observable. May also return any - * `ObservableInput`, which will be converted on the fly to an Observable. - * @return An Observable whose Observers' subscriptions trigger an invocation of the - * given Observable factory function. - */ -export declare function defer>(observableFactory: () => R): Observable>; -//# sourceMappingURL=defer.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/defer.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/defer.d.ts.map deleted file mode 100644 index 28ba3ac..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/defer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defer.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/defer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAAE,iBAAiB,EAAE,MAAM,CAAC,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAIhH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/dom/WebSocketSubject.d.ts b/node_modules/rxjs/dist/types/internal/observable/dom/WebSocketSubject.d.ts deleted file mode 100644 index d0f48c2..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/dom/WebSocketSubject.d.ts +++ /dev/null @@ -1,173 +0,0 @@ -import { AnonymousSubject } from '../../Subject'; -import { Observable } from '../../Observable'; -import { Operator } from '../../Operator'; -import { Observer, NextObserver } from '../../types'; -/** - * WebSocketSubjectConfig is a plain Object that allows us to make our - * webSocket configurable. - * - * Provides flexibility to {@link webSocket} - * - * It defines a set of properties to provide custom behavior in specific - * moments of the socket's lifecycle. When the connection opens we can - * use `openObserver`, when the connection is closed `closeObserver`, if we - * are interested in listening for data coming from server: `deserializer`, - * which allows us to customize the deserialization strategy of data before passing it - * to the socket client. By default, `deserializer` is going to apply `JSON.parse` to each message coming - * from the Server. - * - * ## Examples - * - * **deserializer**, the default for this property is `JSON.parse` but since there are just two options - * for incoming data, either be text or binary data. We can apply a custom deserialization strategy - * or just simply skip the default behaviour. - * - * ```ts - * import { webSocket } from 'rxjs/webSocket'; - * - * const wsSubject = webSocket({ - * url: 'ws://localhost:8081', - * //Apply any transformation of your choice. - * deserializer: ({ data }) => data - * }); - * - * wsSubject.subscribe(console.log); - * - * // Let's suppose we have this on the Server: ws.send('This is a msg from the server') - * //output - * // - * // This is a msg from the server - * ``` - * - * **serializer** allows us to apply custom serialization strategy but for the outgoing messages. - * - * ```ts - * import { webSocket } from 'rxjs/webSocket'; - * - * const wsSubject = webSocket({ - * url: 'ws://localhost:8081', - * // Apply any transformation of your choice. - * serializer: msg => JSON.stringify({ channel: 'webDevelopment', msg: msg }) - * }); - * - * wsSubject.subscribe(() => subject.next('msg to the server')); - * - * // Let's suppose we have this on the Server: - * // ws.on('message', msg => console.log); - * // ws.send('This is a msg from the server'); - * // output at server side: - * // - * // {"channel":"webDevelopment","msg":"msg to the server"} - * ``` - * - * **closeObserver** allows us to set a custom error when an error raises up. - * - * ```ts - * import { webSocket } from 'rxjs/webSocket'; - * - * const wsSubject = webSocket({ - * url: 'ws://localhost:8081', - * closeObserver: { - * next() { - * const customError = { code: 6666, reason: 'Custom evil reason' } - * console.log(`code: ${ customError.code }, reason: ${ customError.reason }`); - * } - * } - * }); - * - * // output - * // code: 6666, reason: Custom evil reason - * ``` - * - * **openObserver**, Let's say we need to make some kind of init task before sending/receiving msgs to the - * webSocket or sending notification that the connection was successful, this is when - * openObserver is useful for. - * - * ```ts - * import { webSocket } from 'rxjs/webSocket'; - * - * const wsSubject = webSocket({ - * url: 'ws://localhost:8081', - * openObserver: { - * next: () => { - * console.log('Connection ok'); - * } - * } - * }); - * - * // output - * // Connection ok - * ``` - */ -export interface WebSocketSubjectConfig { - /** The url of the socket server to connect to */ - url: string; - /** The protocol to use to connect */ - protocol?: string | Array; - /** @deprecated Will be removed in v8. Use {@link deserializer} instead. */ - resultSelector?: (e: MessageEvent) => T; - /** - * A serializer used to create messages from passed values before the - * messages are sent to the server. Defaults to JSON.stringify. - */ - serializer?: (value: T) => WebSocketMessage; - /** - * A deserializer used for messages arriving on the socket from the - * server. Defaults to JSON.parse. - */ - deserializer?: (e: MessageEvent) => T; - /** - * An Observer that watches when open events occur on the underlying web socket. - */ - openObserver?: NextObserver; - /** - * An Observer that watches when close events occur on the underlying web socket - */ - closeObserver?: NextObserver; - /** - * An Observer that watches when a close is about to occur due to - * unsubscription. - */ - closingObserver?: NextObserver; - /** - * A WebSocket constructor to use. This is useful for situations like using a - * WebSocket impl in Node (WebSocket is a DOM API), or for mocking a WebSocket - * for testing purposes - */ - WebSocketCtor?: { - new (url: string, protocols?: string | string[]): WebSocket; - }; - /** Sets the `binaryType` property of the underlying WebSocket. */ - binaryType?: 'blob' | 'arraybuffer'; -} -export declare type WebSocketMessage = string | ArrayBuffer | Blob | ArrayBufferView; -export declare class WebSocketSubject extends AnonymousSubject { - private _config; - private _socket; - constructor(urlConfigOrSource: string | WebSocketSubjectConfig | Observable, destination?: Observer); - /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ - lift(operator: Operator): WebSocketSubject; - private _resetState; - /** - * Creates an {@link Observable}, that when subscribed to, sends a message, - * defined by the `subMsg` function, to the server over the socket to begin a - * subscription to data over that socket. Once data arrives, the - * `messageFilter` argument will be used to select the appropriate data for - * the resulting Observable. When finalization occurs, either due to - * unsubscription, completion, or error, a message defined by the `unsubMsg` - * argument will be sent to the server over the WebSocketSubject. - * - * @param subMsg A function to generate the subscription message to be sent to - * the server. This will still be processed by the serializer in the - * WebSocketSubject's config. (Which defaults to JSON serialization) - * @param unsubMsg A function to generate the unsubscription message to be - * sent to the server at finalization. This will still be processed by the - * serializer in the WebSocketSubject's config. - * @param messageFilter A predicate for selecting the appropriate messages - * from the server for the output stream. - */ - multiplex(subMsg: () => any, unsubMsg: () => any, messageFilter: (value: T) => boolean): Observable; - private _connectSocket; - unsubscribe(): void; -} -//# sourceMappingURL=WebSocketSubject.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/dom/WebSocketSubject.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/dom/WebSocketSubject.d.ts.map deleted file mode 100644 index 173c4d4..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/dom/WebSocketSubject.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"WebSocketSubject.d.ts","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/WebSocketSubject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgGG;AACH,MAAM,WAAW,sBAAsB,CAAC,CAAC;IACvC,iDAAiD;IACjD,GAAG,EAAE,MAAM,CAAC;IACZ,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAClC,2EAA2E;IAC3E,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,YAAY,KAAK,CAAC,CAAC;IACxC;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,gBAAgB,CAAC;IAC5C;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,YAAY,KAAK,CAAC,CAAC;IACtC;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC;IACnC;;OAEG;IACH,aAAa,CAAC,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IACzC;;;OAGG;IACH,eAAe,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC;;;;OAIG;IACH,aAAa,CAAC,EAAE;QAAE,KAAK,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAA;KAAE,CAAC;IAChF,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC;CACrC;AAWD,oBAAY,gBAAgB,GAAG,MAAM,GAAG,WAAW,GAAG,IAAI,GAAG,eAAe,CAAC;AAE7E,qBAAa,gBAAgB,CAAC,CAAC,CAAE,SAAQ,gBAAgB,CAAC,CAAC,CAAC;IAE1D,OAAO,CAAC,OAAO,CAA4B;IAM3C,OAAO,CAAC,OAAO,CAA0B;gBAE7B,iBAAiB,EAAE,MAAM,GAAG,sBAAsB,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;IA2B5G,oGAAoG;IACpG,IAAI,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC;IAOtD,OAAO,CAAC,WAAW;IAQnB;;;;;;;;;;;;;;;;;OAiBG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,EAAE,QAAQ,EAAE,MAAM,GAAG,EAAE,aAAa,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO;IAkCtF,OAAO,CAAC,cAAc;IA+HtB,WAAW;CAQZ"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/dom/animationFrames.d.ts b/node_modules/rxjs/dist/types/internal/observable/dom/animationFrames.d.ts deleted file mode 100644 index 2f7659f..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/dom/animationFrames.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { Observable } from '../../Observable'; -import { TimestampProvider } from '../../types'; -/** - * An observable of animation frames - * - * Emits the amount of time elapsed since subscription and the timestamp on each animation frame. - * Defaults to milliseconds provided to the requestAnimationFrame's callback. Does not end on its own. - * - * Every subscription will start a separate animation loop. Since animation frames are always scheduled - * by the browser to occur directly before a repaint, scheduling more than one animation frame synchronously - * should not be much different or have more overhead than looping over an array of events during - * a single animation frame. However, if for some reason the developer would like to ensure the - * execution of animation-related handlers are all executed during the same task by the engine, - * the `share` operator can be used. - * - * This is useful for setting up animations with RxJS. - * - * ## Examples - * - * Tweening a div to move it on the screen - * - * ```ts - * import { animationFrames, map, takeWhile, endWith } from 'rxjs'; - * - * function tween(start: number, end: number, duration: number) { - * const diff = end - start; - * return animationFrames().pipe( - * // Figure out what percentage of time has passed - * map(({ elapsed }) => elapsed / duration), - * // Take the vector while less than 100% - * takeWhile(v => v < 1), - * // Finish with 100% - * endWith(1), - * // Calculate the distance traveled between start and end - * map(v => v * diff + start) - * ); - * } - * - * // Setup a div for us to move around - * const div = document.createElement('div'); - * document.body.appendChild(div); - * div.style.position = 'absolute'; - * div.style.width = '40px'; - * div.style.height = '40px'; - * div.style.backgroundColor = 'lime'; - * div.style.transform = 'translate3d(10px, 0, 0)'; - * - * tween(10, 200, 4000).subscribe(x => { - * div.style.transform = `translate3d(${ x }px, 0, 0)`; - * }); - * ``` - * - * Providing a custom timestamp provider - * - * ```ts - * import { animationFrames, TimestampProvider } from 'rxjs'; - * - * // A custom timestamp provider - * let now = 0; - * const customTSProvider: TimestampProvider = { - * now() { return now++; } - * }; - * - * const source$ = animationFrames(customTSProvider); - * - * // Log increasing numbers 0...1...2... on every animation frame. - * source$.subscribe(({ elapsed }) => console.log(elapsed)); - * ``` - * - * @param timestampProvider An object with a `now` method that provides a numeric timestamp - */ -export declare function animationFrames(timestampProvider?: TimestampProvider): Observable<{ - timestamp: number; - elapsed: number; -}>; -//# sourceMappingURL=animationFrames.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/dom/animationFrames.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/dom/animationFrames.d.ts.map deleted file mode 100644 index cf0f7a2..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/dom/animationFrames.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"animationFrames.d.ts","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/animationFrames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,wBAAgB,eAAe,CAAC,iBAAiB,CAAC,EAAE,iBAAiB;;;GAEpE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/dom/fetch.d.ts b/node_modules/rxjs/dist/types/internal/observable/dom/fetch.d.ts deleted file mode 100644 index f2ded40..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/dom/fetch.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Observable } from '../../Observable'; -import { ObservableInput } from '../../types'; -export declare function fromFetch(input: string | Request, init: RequestInit & { - selector: (response: Response) => ObservableInput; -}): Observable; -export declare function fromFetch(input: string | Request, init?: RequestInit): Observable; -//# sourceMappingURL=fetch.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/dom/fetch.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/dom/fetch.d.ts.map deleted file mode 100644 index 19a860b..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/dom/fetch.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/fetch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,wBAAgB,SAAS,CAAC,CAAC,EACzB,KAAK,EAAE,MAAM,GAAG,OAAO,EACvB,IAAI,EAAE,WAAW,GAAG;IAClB,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,eAAe,CAAC,CAAC,CAAC,CAAC;CACtD,GACA,UAAU,CAAC,CAAC,CAAC,CAAC;AAEjB,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/dom/webSocket.d.ts b/node_modules/rxjs/dist/types/internal/observable/dom/webSocket.d.ts deleted file mode 100644 index 9dbb47b..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/dom/webSocket.d.ts +++ /dev/null @@ -1,159 +0,0 @@ -import { WebSocketSubject, WebSocketSubjectConfig } from './WebSocketSubject'; -/** - * Wrapper around the w3c-compatible WebSocket object provided by the browser. - * - * {@link Subject} that communicates with a server via WebSocket - * - * `webSocket` is a factory function that produces a `WebSocketSubject`, - * which can be used to make WebSocket connection with an arbitrary endpoint. - * `webSocket` accepts as an argument either a string with url of WebSocket endpoint, or an - * {@link WebSocketSubjectConfig} object for providing additional configuration, as - * well as Observers for tracking lifecycle of WebSocket connection. - * - * When `WebSocketSubject` is subscribed, it attempts to make a socket connection, - * unless there is one made already. This means that many subscribers will always listen - * on the same socket, thus saving resources. If however, two instances are made of `WebSocketSubject`, - * even if these two were provided with the same url, they will attempt to make separate - * connections. When consumer of a `WebSocketSubject` unsubscribes, socket connection is closed, - * only if there are no more subscribers still listening. If after some time a consumer starts - * subscribing again, connection is reestablished. - * - * Once connection is made, whenever a new message comes from the server, `WebSocketSubject` will emit that - * message as a value in the stream. By default, a message from the socket is parsed via `JSON.parse`. If you - * want to customize how deserialization is handled (if at all), you can provide custom `resultSelector` - * function in {@link WebSocketSubject}. When connection closes, stream will complete, provided it happened without - * any errors. If at any point (starting, maintaining or closing a connection) there is an error, - * stream will also error with whatever WebSocket API has thrown. - * - * By virtue of being a {@link Subject}, `WebSocketSubject` allows for receiving and sending messages from the server. In order - * to communicate with a connected endpoint, use `next`, `error` and `complete` methods. `next` sends a value to the server, so bear in mind - * that this value will not be serialized beforehand. Because of This, `JSON.stringify` will have to be called on a value by hand, - * before calling `next` with a result. Note also that if at the moment of nexting value - * there is no socket connection (for example no one is subscribing), those values will be buffered, and sent when connection - * is finally established. `complete` method closes socket connection. `error` does the same, - * as well as notifying the server that something went wrong via status code and string with details of what happened. - * Since status code is required in WebSocket API, `WebSocketSubject` does not allow, like regular `Subject`, - * arbitrary values being passed to the `error` method. It needs to be called with an object that has `code` - * property with status code number and optional `reason` property with string describing details - * of an error. - * - * Calling `next` does not affect subscribers of `WebSocketSubject` - they have no - * information that something was sent to the server (unless of course the server - * responds somehow to a message). On the other hand, since calling `complete` triggers - * an attempt to close socket connection. If that connection is closed without any errors, stream will - * complete, thus notifying all subscribers. And since calling `error` closes - * socket connection as well, just with a different status code for the server, if closing itself proceeds - * without errors, subscribed Observable will not error, as one might expect, but complete as usual. In both cases - * (calling `complete` or `error`), if process of closing socket connection results in some errors, *then* stream - * will error. - * - * **Multiplexing** - * - * `WebSocketSubject` has an additional operator, not found in other Subjects. It is called `multiplex` and it is - * used to simulate opening several socket connections, while in reality maintaining only one. - * For example, an application has both chat panel and real-time notifications about sport news. Since these are two distinct functions, - * it would make sense to have two separate connections for each. Perhaps there could even be two separate services with WebSocket - * endpoints, running on separate machines with only GUI combining them together. Having a socket connection - * for each functionality could become too resource expensive. It is a common pattern to have single - * WebSocket endpoint that acts as a gateway for the other services (in this case chat and sport news services). - * Even though there is a single connection in a client app, having the ability to manipulate streams as if it - * were two separate sockets is desirable. This eliminates manually registering and unregistering in a gateway for - * given service and filter out messages of interest. This is exactly what `multiplex` method is for. - * - * Method accepts three parameters. First two are functions returning subscription and unsubscription messages - * respectively. These are messages that will be sent to the server, whenever consumer of resulting Observable - * subscribes and unsubscribes. Server can use them to verify that some kind of messages should start or stop - * being forwarded to the client. In case of the above example application, after getting subscription message with proper identifier, - * gateway server can decide that it should connect to real sport news service and start forwarding messages from it. - * Note that both messages will be sent as returned by the functions, they are by default serialized using JSON.stringify, just - * as messages pushed via `next`. Also bear in mind that these messages will be sent on *every* subscription and - * unsubscription. This is potentially dangerous, because one consumer of an Observable may unsubscribe and the server - * might stop sending messages, since it got unsubscription message. This needs to be handled - * on the server or using {@link publish} on a Observable returned from 'multiplex'. - * - * Last argument to `multiplex` is a `messageFilter` function which should return a boolean. It is used to filter out messages - * sent by the server to only those that belong to simulated WebSocket stream. For example, server might mark these - * messages with some kind of string identifier on a message object and `messageFilter` would return `true` - * if there is such identifier on an object emitted by the socket. Messages which returns `false` in `messageFilter` are simply skipped, - * and are not passed down the stream. - * - * Return value of `multiplex` is an Observable with messages incoming from emulated socket connection. Note that this - * is not a `WebSocketSubject`, so calling `next` or `multiplex` again will fail. For pushing values to the - * server, use root `WebSocketSubject`. - * - * ## Examples - * - * Listening for messages from the server - * - * ```ts - * import { webSocket } from 'rxjs/webSocket'; - * - * const subject = webSocket('ws://localhost:8081'); - * - * subject.subscribe({ - * next: msg => console.log('message received: ' + msg), // Called whenever there is a message from the server. - * error: err => console.log(err), // Called if at any point WebSocket API signals some kind of error. - * complete: () => console.log('complete') // Called when connection is closed (for whatever reason). - * }); - * ``` - * - * Pushing messages to the server - * - * ```ts - * import { webSocket } from 'rxjs/webSocket'; - * - * const subject = webSocket('ws://localhost:8081'); - * - * subject.subscribe(); - * // Note that at least one consumer has to subscribe to the created subject - otherwise "nexted" values will be just buffered and not sent, - * // since no connection was established! - * - * subject.next({ message: 'some message' }); - * // This will send a message to the server once a connection is made. Remember value is serialized with JSON.stringify by default! - * - * subject.complete(); // Closes the connection. - * - * subject.error({ code: 4000, reason: 'I think our app just broke!' }); - * // Also closes the connection, but let's the server know that this closing is caused by some error. - * ``` - * - * Multiplexing WebSocket - * - * ```ts - * import { webSocket } from 'rxjs/webSocket'; - * - * const subject = webSocket('ws://localhost:8081'); - * - * const observableA = subject.multiplex( - * () => ({ subscribe: 'A' }), // When server gets this message, it will start sending messages for 'A'... - * () => ({ unsubscribe: 'A' }), // ...and when gets this one, it will stop. - * message => message.type === 'A' // If the function returns `true` message is passed down the stream. Skipped if the function returns false. - * ); - * - * const observableB = subject.multiplex( // And the same goes for 'B'. - * () => ({ subscribe: 'B' }), - * () => ({ unsubscribe: 'B' }), - * message => message.type === 'B' - * ); - * - * const subA = observableA.subscribe(messageForA => console.log(messageForA)); - * // At this moment WebSocket connection is established. Server gets '{"subscribe": "A"}' message and starts sending messages for 'A', - * // which we log here. - * - * const subB = observableB.subscribe(messageForB => console.log(messageForB)); - * // Since we already have a connection, we just send '{"subscribe": "B"}' message to the server. It starts sending messages for 'B', - * // which we log here. - * - * subB.unsubscribe(); - * // Message '{"unsubscribe": "B"}' is sent to the server, which stops sending 'B' messages. - * - * subA.unsubscribe(); - * // Message '{"unsubscribe": "A"}' makes the server stop sending messages for 'A'. Since there is no more subscribers to root Subject, - * // socket connection closes. - * ``` - * - * @param urlConfigOrSource The WebSocket endpoint as an url or an object with configuration and additional Observers. - * @return Subject which allows to both send and receive messages via WebSocket connection. - */ -export declare function webSocket(urlConfigOrSource: string | WebSocketSubjectConfig): WebSocketSubject; -//# sourceMappingURL=webSocket.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/dom/webSocket.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/dom/webSocket.d.ts.map deleted file mode 100644 index ec0cc8e..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/dom/webSocket.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"webSocket.d.ts","sourceRoot":"","sources":["../../../../../src/internal/observable/dom/webSocket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2JG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,iBAAiB,EAAE,MAAM,GAAG,sBAAsB,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAEvG"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/empty.d.ts b/node_modules/rxjs/dist/types/internal/observable/empty.d.ts deleted file mode 100644 index accaa5b..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/empty.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { Observable } from '../Observable'; -import { SchedulerLike } from '../types'; -/** - * A simple Observable that emits no items to the Observer and immediately - * emits a complete notification. - * - * Just emits 'complete', and nothing else. - * - * ![](empty.png) - * - * A simple Observable that only emits the complete notification. It can be used - * for composing with other Observables, such as in a {@link mergeMap}. - * - * ## Examples - * - * Log complete notification - * - * ```ts - * import { EMPTY } from 'rxjs'; - * - * EMPTY.subscribe({ - * next: () => console.log('Next'), - * complete: () => console.log('Complete!') - * }); - * - * // Outputs - * // Complete! - * ``` - * - * Emit the number 7, then complete - * - * ```ts - * import { EMPTY, startWith } from 'rxjs'; - * - * const result = EMPTY.pipe(startWith(7)); - * result.subscribe(x => console.log(x)); - * - * // Outputs - * // 7 - * ``` - * - * Map and flatten only odd numbers to the sequence `'a'`, `'b'`, `'c'` - * - * ```ts - * import { interval, mergeMap, of, EMPTY } from 'rxjs'; - * - * const interval$ = interval(1000); - * const result = interval$.pipe( - * mergeMap(x => x % 2 === 1 ? of('a', 'b', 'c') : EMPTY), - * ); - * result.subscribe(x => console.log(x)); - * - * // Results in the following to the console: - * // x is equal to the count on the interval, e.g. (0, 1, 2, 3, ...) - * // x will occur every 1000ms - * // if x % 2 is equal to 1, print a, b, c (each on its own) - * // if x % 2 is not equal to 1, nothing will be output - * ``` - * - * @see {@link Observable} - * @see {@link NEVER} - * @see {@link of} - * @see {@link throwError} - */ -export declare const EMPTY: Observable; -/** - * @param scheduler A {@link SchedulerLike} to use for scheduling - * the emission of the complete notification. - * @deprecated Replaced with the {@link EMPTY} constant or {@link scheduled} (e.g. `scheduled([], scheduler)`). Will be removed in v8. - */ -export declare function empty(scheduler?: SchedulerLike): Observable; -//# sourceMappingURL=empty.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/empty.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/empty.d.ts.map deleted file mode 100644 index 0192112..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/empty.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"empty.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/empty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AACH,eAAO,MAAM,KAAK,mBAA+D,CAAC;AAElF;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,SAAS,CAAC,EAAE,aAAa,qBAE9C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/forkJoin.d.ts b/node_modules/rxjs/dist/types/internal/observable/forkJoin.d.ts deleted file mode 100644 index e36c9a4..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/forkJoin.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Observable } from '../Observable'; -import { ObservedValueOf, ObservableInputTuple, ObservableInput } from '../types'; -import { AnyCatcher } from '../AnyCatcher'; -/** - * You have passed `any` here, we can't figure out if it is - * an array or an object, so you're getting `unknown`. Use better types. - * @param arg Something typed as `any` - */ -export declare function forkJoin(arg: T): Observable; -export declare function forkJoin(scheduler: null | undefined): Observable; -export declare function forkJoin(sources: readonly []): Observable; -export declare function forkJoin(sources: readonly [...ObservableInputTuple]): Observable; -export declare function forkJoin(sources: readonly [...ObservableInputTuple], resultSelector: (...values: A) => R): Observable; -/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */ -export declare function forkJoin(...sources: [...ObservableInputTuple]): Observable; -/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */ -export declare function forkJoin(...sourcesAndResultSelector: [...ObservableInputTuple, (...values: A) => R]): Observable; -export declare function forkJoin(sourcesObject: { - [K in any]: never; -}): Observable; -export declare function forkJoin>>(sourcesObject: T): Observable<{ - [K in keyof T]: ObservedValueOf; -}>; -//# sourceMappingURL=forkJoin.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/forkJoin.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/forkJoin.d.ts.map deleted file mode 100644 index 540b349..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/forkJoin.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"forkJoin.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/forkJoin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAOlF,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,UAAU,EAAE,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;AAG5E,wBAAgB,QAAQ,CAAC,SAAS,EAAE,IAAI,GAAG,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AAGzE,wBAAgB,QAAQ,CAAC,OAAO,EAAE,SAAS,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AAClE,wBAAgB,QAAQ,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,OAAO,EAAE,SAAS,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AACtH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,EACtD,OAAO,EAAE,SAAS,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,EAC9C,cAAc,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,GAClC,UAAU,CAAC,CAAC,CAAC,CAAC;AAGjB,+JAA+J;AAC/J,wBAAgB,QAAQ,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AAChH,+JAA+J;AAC/J,wBAAgB,QAAQ,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,EACtD,GAAG,wBAAwB,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,GAC7E,UAAU,CAAC,CAAC,CAAC,CAAC;AAGjB,wBAAgB,QAAQ,CAAC,aAAa,EAAE;KAAG,CAAC,IAAI,GAAG,GAAG,KAAK;CAAE,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AAClF,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,EACrE,aAAa,EAAE,CAAC,GACf,UAAU,CAAC;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/from.d.ts b/node_modules/rxjs/dist/types/internal/observable/from.d.ts deleted file mode 100644 index f9fd3ff..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/from.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Observable } from '../Observable'; -import { ObservableInput, SchedulerLike, ObservedValueOf } from '../types'; -export declare function from>(input: O): Observable>; -/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled`. Details: https://rxjs.dev/deprecations/scheduler-argument */ -export declare function from>(input: O, scheduler: SchedulerLike | undefined): Observable>; -//# sourceMappingURL=from.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/from.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/from.d.ts.map deleted file mode 100644 index c891cc0..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/from.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"from.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/from.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI3E,wBAAgB,IAAI,CAAC,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/F,8IAA8I;AAC9I,wBAAgB,IAAI,CAAC,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,aAAa,GAAG,SAAS,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/fromEvent.d.ts b/node_modules/rxjs/dist/types/internal/observable/fromEvent.d.ts deleted file mode 100644 index bbc397d..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/fromEvent.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Observable } from '../Observable'; -export interface NodeStyleEventEmitter { - addListener(eventName: string | symbol, handler: NodeEventHandler): this; - removeListener(eventName: string | symbol, handler: NodeEventHandler): this; -} -export declare type NodeEventHandler = (...args: any[]) => void; -export interface NodeCompatibleEventEmitter { - addListener(eventName: string, handler: NodeEventHandler): void | {}; - removeListener(eventName: string, handler: NodeEventHandler): void | {}; -} -export interface JQueryStyleEventEmitter { - on(eventName: string, handler: (this: TContext, t: T, ...args: any[]) => any): void; - off(eventName: string, handler: (this: TContext, t: T, ...args: any[]) => any): void; -} -export interface EventListenerObject { - handleEvent(evt: E): void; -} -export interface HasEventTargetAddRemove { - addEventListener(type: string, listener: ((evt: E) => void) | EventListenerObject | null, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: string, listener: ((evt: E) => void) | EventListenerObject | null, options?: EventListenerOptions | boolean): void; -} -export interface EventListenerOptions { - capture?: boolean; - passive?: boolean; - once?: boolean; -} -export interface AddEventListenerOptions extends EventListenerOptions { - once?: boolean; - passive?: boolean; -} -export declare function fromEvent(target: HasEventTargetAddRemove | ArrayLike>, eventName: string): Observable; -export declare function fromEvent(target: HasEventTargetAddRemove | ArrayLike>, eventName: string, resultSelector: (event: T) => R): Observable; -export declare function fromEvent(target: HasEventTargetAddRemove | ArrayLike>, eventName: string, options: EventListenerOptions): Observable; -export declare function fromEvent(target: HasEventTargetAddRemove | ArrayLike>, eventName: string, options: EventListenerOptions, resultSelector: (event: T) => R): Observable; -export declare function fromEvent(target: NodeStyleEventEmitter | ArrayLike, eventName: string): Observable; -/** @deprecated Do not specify explicit type parameters. Signatures with type parameters that cannot be inferred will be removed in v8. */ -export declare function fromEvent(target: NodeStyleEventEmitter | ArrayLike, eventName: string): Observable; -export declare function fromEvent(target: NodeStyleEventEmitter | ArrayLike, eventName: string, resultSelector: (...args: any[]) => R): Observable; -export declare function fromEvent(target: NodeCompatibleEventEmitter | ArrayLike, eventName: string): Observable; -/** @deprecated Do not specify explicit type parameters. Signatures with type parameters that cannot be inferred will be removed in v8. */ -export declare function fromEvent(target: NodeCompatibleEventEmitter | ArrayLike, eventName: string): Observable; -export declare function fromEvent(target: NodeCompatibleEventEmitter | ArrayLike, eventName: string, resultSelector: (...args: any[]) => R): Observable; -export declare function fromEvent(target: JQueryStyleEventEmitter | ArrayLike>, eventName: string): Observable; -export declare function fromEvent(target: JQueryStyleEventEmitter | ArrayLike>, eventName: string, resultSelector: (value: T, ...args: any[]) => R): Observable; -//# sourceMappingURL=fromEvent.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/fromEvent.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/fromEvent.d.ts.map deleted file mode 100644 index 4e07aa1..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/fromEvent.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fromEvent.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/fromEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAW3C,MAAM,WAAW,qBAAqB;IACpC,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACzE,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAC7E;AAED,oBAAY,gBAAgB,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;AAKxD,MAAM,WAAW,0BAA0B;IACzC,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI,GAAG,EAAE,CAAC;IACrE,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI,GAAG,EAAE,CAAC;CACzE;AAID,MAAM,WAAW,uBAAuB,CAAC,QAAQ,EAAE,CAAC;IAClD,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GAAG,IAAI,CAAC;IACpF,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GAAG,IAAI,CAAC;CACtF;AAED,MAAM,WAAW,mBAAmB,CAAC,CAAC;IACpC,WAAW,CAAC,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,uBAAuB,CAAC,CAAC;IACxC,gBAAgB,CACd,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,GAAG,IAAI,EAC5D,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAC1C,IAAI,CAAC;IACR,mBAAmB,CACjB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,GAAG,IAAI,EAC5D,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,GACvC,IAAI,CAAC;CACT;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,uBAAwB,SAAQ,oBAAoB;IACnE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,uBAAuB,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AAC3I,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAC5B,MAAM,EAAE,uBAAuB,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,EAC1E,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAC9B,UAAU,CAAC,CAAC,CAAC,CAAC;AACjB,wBAAgB,SAAS,CAAC,CAAC,EACzB,MAAM,EAAE,uBAAuB,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,EAC1E,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,oBAAoB,GAC5B,UAAU,CAAC,CAAC,CAAC,CAAC;AACjB,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAC5B,MAAM,EAAE,uBAAuB,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,EAC1E,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,oBAAoB,EAC7B,cAAc,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAC9B,UAAU,CAAC,CAAC,CAAC,CAAC;AAEjB,wBAAgB,SAAS,CAAC,MAAM,EAAE,qBAAqB,GAAG,SAAS,CAAC,qBAAqB,CAAC,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;AACpI,0IAA0I;AAC1I,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,qBAAqB,GAAG,SAAS,CAAC,qBAAqB,CAAC,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AACjI,wBAAgB,SAAS,CAAC,CAAC,EACzB,MAAM,EAAE,qBAAqB,GAAG,SAAS,CAAC,qBAAqB,CAAC,EAChE,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,GACpC,UAAU,CAAC,CAAC,CAAC,CAAC;AAEjB,wBAAgB,SAAS,CACvB,MAAM,EAAE,0BAA0B,GAAG,SAAS,CAAC,0BAA0B,CAAC,EAC1E,SAAS,EAAE,MAAM,GAChB,UAAU,CAAC,OAAO,CAAC,CAAC;AACvB,0IAA0I;AAC1I,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,0BAA0B,GAAG,SAAS,CAAC,0BAA0B,CAAC,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AAC3I,wBAAgB,SAAS,CAAC,CAAC,EACzB,MAAM,EAAE,0BAA0B,GAAG,SAAS,CAAC,0BAA0B,CAAC,EAC1E,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,GACpC,UAAU,CAAC,CAAC,CAAC,CAAC;AAEjB,wBAAgB,SAAS,CAAC,CAAC,EACzB,MAAM,EAAE,uBAAuB,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,SAAS,CAAC,uBAAuB,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EACpF,SAAS,EAAE,MAAM,GAChB,UAAU,CAAC,CAAC,CAAC,CAAC;AACjB,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAC5B,MAAM,EAAE,uBAAuB,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,SAAS,CAAC,uBAAuB,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EACpF,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,GAC9C,UAAU,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/fromEventPattern.d.ts b/node_modules/rxjs/dist/types/internal/observable/fromEventPattern.d.ts deleted file mode 100644 index 027d12f..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/fromEventPattern.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Observable } from '../Observable'; -import { NodeEventHandler } from './fromEvent'; -export declare function fromEventPattern(addHandler: (handler: NodeEventHandler) => any, removeHandler?: (handler: NodeEventHandler, signal?: any) => void): Observable; -export declare function fromEventPattern(addHandler: (handler: NodeEventHandler) => any, removeHandler?: (handler: NodeEventHandler, signal?: any) => void, resultSelector?: (...args: any[]) => T): Observable; -//# sourceMappingURL=fromEventPattern.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/fromEventPattern.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/fromEventPattern.d.ts.map deleted file mode 100644 index 4f20f46..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/fromEventPattern.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fromEventPattern.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/fromEventPattern.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAI/C,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,UAAU,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,GAAG,EAC9C,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,GAAG,KAAK,IAAI,GAChE,UAAU,CAAC,CAAC,CAAC,CAAC;AACjB,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,UAAU,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,GAAG,EAC9C,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,GAAG,KAAK,IAAI,EACjE,cAAc,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,GACrC,UAAU,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/fromSubscribable.d.ts b/node_modules/rxjs/dist/types/internal/observable/fromSubscribable.d.ts deleted file mode 100644 index 71ec6f5..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/fromSubscribable.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Observable } from '../Observable'; -import { Subscribable } from '../types'; -/** - * Used to convert a subscribable to an observable. - * - * Currently, this is only used within internals. - * - * TODO: Discuss ObservableInput supporting "Subscribable". - * https://github.com/ReactiveX/rxjs/issues/5909 - * - * @param subscribable A subscribable - */ -export declare function fromSubscribable(subscribable: Subscribable): Observable; -//# sourceMappingURL=fromSubscribable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/fromSubscribable.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/fromSubscribable.d.ts.map deleted file mode 100644 index e9ab68c..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/fromSubscribable.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fromSubscribable.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/fromSubscribable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,iBAEhE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/generate.d.ts b/node_modules/rxjs/dist/types/internal/observable/generate.d.ts deleted file mode 100644 index 1a0f9e6..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/generate.d.ts +++ /dev/null @@ -1,314 +0,0 @@ -import { Observable } from '../Observable'; -import { SchedulerLike } from '../types'; -declare type ConditionFunc = (state: S) => boolean; -declare type IterateFunc = (state: S) => S; -declare type ResultFunc = (state: S) => T; -export interface GenerateBaseOptions { - /** - * Initial state. - */ - initialState: S; - /** - * Condition function that accepts state and returns boolean. - * When it returns false, the generator stops. - * If not specified, a generator never stops. - */ - condition?: ConditionFunc; - /** - * Iterate function that accepts state and returns new state. - */ - iterate: IterateFunc; - /** - * SchedulerLike to use for generation process. - * By default, a generator starts immediately. - */ - scheduler?: SchedulerLike; -} -export interface GenerateOptions extends GenerateBaseOptions { - /** - * Result selection function that accepts state and returns a value to emit. - */ - resultSelector: ResultFunc; -} -/** - * Generates an observable sequence by running a state-driven loop - * producing the sequence's elements, using the specified scheduler - * to send out observer messages. - * - * ![](generate.png) - * - * ## Examples - * - * Produces sequence of numbers - * - * ```ts - * import { generate } from 'rxjs'; - * - * const result = generate(0, x => x < 3, x => x + 1, x => x); - * - * result.subscribe(x => console.log(x)); - * - * // Logs: - * // 0 - * // 1 - * // 2 - * ``` - * - * Use `asapScheduler` - * - * ```ts - * import { generate, asapScheduler } from 'rxjs'; - * - * const result = generate(1, x => x < 5, x => x * 2, x => x + 1, asapScheduler); - * - * result.subscribe(x => console.log(x)); - * - * // Logs: - * // 2 - * // 3 - * // 5 - * ``` - * - * @see {@link from} - * @see {@link Observable} - * - * @param initialState Initial state. - * @param condition Condition to terminate generation (upon returning false). - * @param iterate Iteration step function. - * @param resultSelector Selector function for results produced in the sequence. - * @param scheduler A {@link SchedulerLike} on which to run the generator loop. - * If not provided, defaults to emit immediately. - * @returns The generated sequence. - * @deprecated Instead of passing separate arguments, use the options argument. - * Signatures taking separate arguments will be removed in v8. - */ -export declare function generate(initialState: S, condition: ConditionFunc, iterate: IterateFunc, resultSelector: ResultFunc, scheduler?: SchedulerLike): Observable; -/** - * Generates an Observable by running a state-driven loop - * that emits an element on each iteration. - * - * Use it instead of nexting values in a for loop. - * - * ![](generate.png) - * - * `generate` allows you to create a stream of values generated with a loop very similar to - * a traditional for loop. The first argument of `generate` is a beginning value. The second argument - * is a function that accepts this value and tests if some condition still holds. If it does, - * then the loop continues, if not, it stops. The third value is a function which takes the - * previously defined value and modifies it in some way on each iteration. Note how these three parameters - * are direct equivalents of three expressions in a traditional for loop: the first expression - * initializes some state (for example, a numeric index), the second tests if the loop can perform the next - * iteration (for example, if the index is lower than 10) and the third states how the defined value - * will be modified on every step (for example, the index will be incremented by one). - * - * Return value of a `generate` operator is an Observable that on each loop iteration - * emits a value. First of all, the condition function is ran. If it returns true, then the Observable - * emits the currently stored value (initial value at the first iteration) and finally updates - * that value with iterate function. If at some point the condition returns false, then the Observable - * completes at that moment. - * - * Optionally you can pass a fourth parameter to `generate` - a result selector function which allows you - * to immediately map the value that would normally be emitted by an Observable. - * - * If you find three anonymous functions in `generate` call hard to read, you can provide - * a single object to the operator instead where the object has the properties: `initialState`, - * `condition`, `iterate` and `resultSelector`, which should have respective values that you - * would normally pass to `generate`. `resultSelector` is still optional, but that form - * of calling `generate` allows you to omit `condition` as well. If you omit it, that means - * condition always holds, or in other words the resulting Observable will never complete. - * - * Both forms of `generate` can optionally accept a scheduler. In case of a multi-parameter call, - * scheduler simply comes as a last argument (no matter if there is a `resultSelector` - * function or not). In case of a single-parameter call, you can provide it as a - * `scheduler` property on the object passed to the operator. In both cases, a scheduler decides when - * the next iteration of the loop will happen and therefore when the next value will be emitted - * by the Observable. For example, to ensure that each value is pushed to the Observer - * on a separate task in the event loop, you could use the `async` scheduler. Note that - * by default (when no scheduler is passed) values are simply emitted synchronously. - * - * - * ## Examples - * - * Use with condition and iterate functions - * - * ```ts - * import { generate } from 'rxjs'; - * - * const result = generate(0, x => x < 3, x => x + 1); - * - * result.subscribe({ - * next: value => console.log(value), - * complete: () => console.log('Complete!') - * }); - * - * // Logs: - * // 0 - * // 1 - * // 2 - * // 'Complete!' - * ``` - * - * Use with condition, iterate and resultSelector functions - * - * ```ts - * import { generate } from 'rxjs'; - * - * const result = generate(0, x => x < 3, x => x + 1, x => x * 1000); - * - * result.subscribe({ - * next: value => console.log(value), - * complete: () => console.log('Complete!') - * }); - * - * // Logs: - * // 0 - * // 1000 - * // 2000 - * // 'Complete!' - * ``` - * - * Use with options object - * - * ```ts - * import { generate } from 'rxjs'; - * - * const result = generate({ - * initialState: 0, - * condition(value) { return value < 3; }, - * iterate(value) { return value + 1; }, - * resultSelector(value) { return value * 1000; } - * }); - * - * result.subscribe({ - * next: value => console.log(value), - * complete: () => console.log('Complete!') - * }); - * - * // Logs: - * // 0 - * // 1000 - * // 2000 - * // 'Complete!' - * ``` - * - * Use options object without condition function - * - * ```ts - * import { generate } from 'rxjs'; - * - * const result = generate({ - * initialState: 0, - * iterate(value) { return value + 1; }, - * resultSelector(value) { return value * 1000; } - * }); - * - * result.subscribe({ - * next: value => console.log(value), - * complete: () => console.log('Complete!') // This will never run - * }); - * - * // Logs: - * // 0 - * // 1000 - * // 2000 - * // 3000 - * // ...and never stops. - * ``` - * - * @see {@link from} - * - * @param initialState Initial state. - * @param condition Condition to terminate generation (upon returning false). - * @param iterate Iteration step function. - * @param scheduler A {@link Scheduler} on which to run the generator loop. If not - * provided, defaults to emitting immediately. - * @return The generated sequence. - * @deprecated Instead of passing separate arguments, use the options argument. - * Signatures taking separate arguments will be removed in v8. - */ -export declare function generate(initialState: S, condition: ConditionFunc, iterate: IterateFunc, scheduler?: SchedulerLike): Observable; -/** - * Generates an observable sequence by running a state-driven loop - * producing the sequence's elements, using the specified scheduler - * to send out observer messages. - * The overload accepts options object that might contain initial state, iterate, - * condition and scheduler. - * - * ![](generate.png) - * - * ## Examples - * - * Use options object with condition function - * - * ```ts - * import { generate } from 'rxjs'; - * - * const result = generate({ - * initialState: 0, - * condition: x => x < 3, - * iterate: x => x + 1 - * }); - * - * result.subscribe({ - * next: value => console.log(value), - * complete: () => console.log('Complete!') - * }); - * - * // Logs: - * // 0 - * // 1 - * // 2 - * // 'Complete!' - * ``` - * - * @see {@link from} - * @see {@link Observable} - * - * @param options Object that must contain initialState, iterate and might contain condition and scheduler. - * @returns The generated sequence. - */ -export declare function generate(options: GenerateBaseOptions): Observable; -/** - * Generates an observable sequence by running a state-driven loop - * producing the sequence's elements, using the specified scheduler - * to send out observer messages. - * The overload accepts options object that might contain initial state, iterate, - * condition, result selector and scheduler. - * - * ![](generate.png) - * - * ## Examples - * - * Use options object with condition and iterate function - * - * ```ts - * import { generate } from 'rxjs'; - * - * const result = generate({ - * initialState: 0, - * condition: x => x < 3, - * iterate: x => x + 1, - * resultSelector: x => x - * }); - * - * result.subscribe({ - * next: value => console.log(value), - * complete: () => console.log('Complete!') - * }); - * - * // Logs: - * // 0 - * // 1 - * // 2 - * // 'Complete!' - * ``` - * - * @see {@link from} - * @see {@link Observable} - * - * @param options Object that must contain initialState, iterate, resultSelector and might contain condition and scheduler. - * @returns The generated sequence. - */ -export declare function generate(options: GenerateOptions): Observable; -export {}; -//# sourceMappingURL=generate.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/generate.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/generate.d.ts.map deleted file mode 100644 index 5e8b569..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/generate.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/generate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAmB,aAAa,EAAE,MAAM,UAAU,CAAC;AAK1D,aAAK,aAAa,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC;AAC9C,aAAK,WAAW,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC;AACtC,aAAK,UAAU,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC;AAExC,MAAM,WAAW,mBAAmB,CAAC,CAAC;IACpC;;OAEG;IACH,YAAY,EAAE,CAAC,CAAC;IAChB;;;;OAIG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAC7B;;OAEG;IACH,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC;CAC3B;AAED,MAAM,WAAW,eAAe,CAAC,CAAC,EAAE,CAAC,CAAE,SAAQ,mBAAmB,CAAC,CAAC,CAAC;IACnE;;OAEG;IACH,cAAc,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAClC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,EAC3B,YAAY,EAAE,CAAC,EACf,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,EAC3B,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,EACvB,cAAc,EAAE,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,EAChC,SAAS,CAAC,EAAE,aAAa,GACxB,UAAU,CAAC,CAAC,CAAC,CAAC;AAEjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8IG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EACxB,YAAY,EAAE,CAAC,EACf,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,EAC3B,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,EACvB,SAAS,CAAC,EAAE,aAAa,GACxB,UAAU,CAAC,CAAC,CAAC,CAAC;AAEjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AAE5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/iif.d.ts b/node_modules/rxjs/dist/types/internal/observable/iif.d.ts deleted file mode 100644 index cc04914..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/iif.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { Observable } from '../Observable'; -import { ObservableInput } from '../types'; -/** - * Checks a boolean at subscription time, and chooses between one of two observable sources - * - * `iif` expects a function that returns a boolean (the `condition` function), and two sources, - * the `trueResult` and the `falseResult`, and returns an Observable. - * - * At the moment of subscription, the `condition` function is called. If the result is `true`, the - * subscription will be to the source passed as the `trueResult`, otherwise, the subscription will be - * to the source passed as the `falseResult`. - * - * If you need to check more than two options to choose between more than one observable, have a look at the {@link defer} creation method. - * - * ## Examples - * - * Change at runtime which Observable will be subscribed - * - * ```ts - * import { iif, of } from 'rxjs'; - * - * let subscribeToFirst; - * const firstOrSecond = iif( - * () => subscribeToFirst, - * of('first'), - * of('second') - * ); - * - * subscribeToFirst = true; - * firstOrSecond.subscribe(value => console.log(value)); - * - * // Logs: - * // 'first' - * - * subscribeToFirst = false; - * firstOrSecond.subscribe(value => console.log(value)); - * - * // Logs: - * // 'second' - * ``` - * - * Control access to an Observable - * - * ```ts - * import { iif, of, EMPTY } from 'rxjs'; - * - * let accessGranted; - * const observableIfYouHaveAccess = iif( - * () => accessGranted, - * of('It seems you have an access...'), - * EMPTY - * ); - * - * accessGranted = true; - * observableIfYouHaveAccess.subscribe({ - * next: value => console.log(value), - * complete: () => console.log('The end') - * }); - * - * // Logs: - * // 'It seems you have an access...' - * // 'The end' - * - * accessGranted = false; - * observableIfYouHaveAccess.subscribe({ - * next: value => console.log(value), - * complete: () => console.log('The end') - * }); - * - * // Logs: - * // 'The end' - * ``` - * - * @see {@link defer} - * - * @param condition Condition which Observable should be chosen. - * @param trueResult An Observable that will be subscribed if condition is true. - * @param falseResult An Observable that will be subscribed if condition is false. - * @return An observable that proxies to `trueResult` or `falseResult`, depending on the result of the `condition` function. - */ -export declare function iif(condition: () => boolean, trueResult: ObservableInput, falseResult: ObservableInput): Observable; -//# sourceMappingURL=iif.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/iif.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/iif.d.ts.map deleted file mode 100644 index bc076de..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/iif.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"iif.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/iif.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6EG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,OAAO,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAEtI"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/innerFrom.d.ts b/node_modules/rxjs/dist/types/internal/observable/innerFrom.d.ts deleted file mode 100644 index 1cd0239..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/innerFrom.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Observable } from '../Observable'; -import { ObservableInput, ObservedValueOf, ReadableStreamLike } from '../types'; -export declare function innerFrom>(input: O): Observable>; -/** - * Creates an RxJS Observable from an object that implements `Symbol.observable`. - * @param obj An object that properly implements `Symbol.observable`. - */ -export declare function fromInteropObservable(obj: any): Observable; -/** - * Synchronously emits the values of an array like and completes. - * This is exported because there are creation functions and operators that need to - * make direct use of the same logic, and there's no reason to make them run through - * `from` conditionals because we *know* they're dealing with an array. - * @param array The array to emit values from - */ -export declare function fromArrayLike(array: ArrayLike): Observable; -export declare function fromPromise(promise: PromiseLike): Observable; -export declare function fromIterable(iterable: Iterable): Observable; -export declare function fromAsyncIterable(asyncIterable: AsyncIterable): Observable; -export declare function fromReadableStreamLike(readableStream: ReadableStreamLike): Observable; -//# sourceMappingURL=innerFrom.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/innerFrom.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/innerFrom.d.ts.map deleted file mode 100644 index e6c03b7..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/innerFrom.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"innerFrom.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/innerFrom.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAWhF,wBAAgB,SAAS,CAAC,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AA6BpG;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,iBAShD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,iBAgBnD;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,iBAcrD;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,iBAUpD;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC,iBAInE;AAED,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,cAAc,EAAE,kBAAkB,CAAC,CAAC,CAAC,iBAE9E"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/interval.d.ts b/node_modules/rxjs/dist/types/internal/observable/interval.d.ts deleted file mode 100644 index 3c9364a..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/interval.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { Observable } from '../Observable'; -import { SchedulerLike } from '../types'; -/** - * Creates an Observable that emits sequential numbers every specified - * interval of time, on a specified {@link SchedulerLike}. - * - * Emits incremental numbers periodically in time. - * - * ![](interval.png) - * - * `interval` returns an Observable that emits an infinite sequence of - * ascending integers, with a constant interval of time of your choosing - * between those emissions. The first emission is not sent immediately, but - * only after the first period has passed. By default, this operator uses the - * `async` {@link SchedulerLike} to provide a notion of time, but you may pass any - * {@link SchedulerLike} to it. - * - * ## Example - * - * Emits ascending numbers, one every second (1000ms) up to the number 3 - * - * ```ts - * import { interval, take } from 'rxjs'; - * - * const numbers = interval(1000); - * - * const takeFourNumbers = numbers.pipe(take(4)); - * - * takeFourNumbers.subscribe(x => console.log('Next: ', x)); - * - * // Logs: - * // Next: 0 - * // Next: 1 - * // Next: 2 - * // Next: 3 - * ``` - * - * @see {@link timer} - * @see {@link delay} - * - * @param period The interval size in milliseconds (by default) or the time unit determined - * by the scheduler's clock. - * @param scheduler The {@link SchedulerLike} to use for scheduling the emission of values, - * and providing a notion of "time". - * @return An Observable that emits a sequential number each time interval. - */ -export declare function interval(period?: number, scheduler?: SchedulerLike): Observable; -//# sourceMappingURL=interval.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/interval.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/interval.d.ts.map deleted file mode 100644 index 30fa954..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/interval.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"interval.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/interval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,QAAQ,CAAC,MAAM,SAAI,EAAE,SAAS,GAAE,aAA8B,GAAG,UAAU,CAAC,MAAM,CAAC,CAOlG"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/merge.d.ts b/node_modules/rxjs/dist/types/internal/observable/merge.d.ts deleted file mode 100644 index a1ca048..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/merge.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Observable } from '../Observable'; -import { ObservableInputTuple, SchedulerLike } from '../types'; -export declare function merge(...sources: [...ObservableInputTuple]): Observable; -export declare function merge(...sourcesAndConcurrency: [...ObservableInputTuple, number?]): Observable; -/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `mergeAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ -export declare function merge(...sourcesAndScheduler: [...ObservableInputTuple, SchedulerLike?]): Observable; -/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `mergeAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ -export declare function merge(...sourcesAndConcurrencyAndScheduler: [...ObservableInputTuple, number?, SchedulerLike?]): Observable; -//# sourceMappingURL=merge.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/merge.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/merge.d.ts.map deleted file mode 100644 index e6d79d2..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/merge.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/merge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAmB,oBAAoB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAOhF,wBAAgB,KAAK,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACrH,wBAAgB,KAAK,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,qBAAqB,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAC5I,6JAA6J;AAC7J,wBAAgB,KAAK,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAChD,GAAG,mBAAmB,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,GACnE,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACzB,6JAA6J;AAC7J,wBAAgB,KAAK,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAChD,GAAG,iCAAiC,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,aAAa,CAAC,CAAC,GAC1F,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/never.d.ts b/node_modules/rxjs/dist/types/internal/observable/never.d.ts deleted file mode 100644 index ba889e1..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/never.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Observable } from '../Observable'; -/** - * An Observable that emits no items to the Observer and never completes. - * - * ![](never.png) - * - * A simple Observable that emits neither values nor errors nor the completion - * notification. It can be used for testing purposes or for composing with other - * Observables. Please note that by never emitting a complete notification, this - * Observable keeps the subscription from being disposed automatically. - * Subscriptions need to be manually disposed. - * - * ## Example - * - * Emit the number 7, then never emit anything else (not even complete) - * - * ```ts - * import { NEVER, startWith } from 'rxjs'; - * - * const info = () => console.log('Will not be called'); - * - * const result = NEVER.pipe(startWith(7)); - * result.subscribe({ - * next: x => console.log(x), - * error: info, - * complete: info - * }); - * ``` - * - * @see {@link Observable} - * @see {@link EMPTY} - * @see {@link of} - * @see {@link throwError} - */ -export declare const NEVER: Observable; -/** - * @deprecated Replaced with the {@link NEVER} constant. Will be removed in v8. - */ -export declare function never(): Observable; -//# sourceMappingURL=never.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/never.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/never.d.ts.map deleted file mode 100644 index 1adf3d4..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/never.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"never.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/never.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,KAAK,mBAA8B,CAAC;AAEjD;;GAEG;AACH,wBAAgB,KAAK,sBAEpB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/of.d.ts b/node_modules/rxjs/dist/types/internal/observable/of.d.ts deleted file mode 100644 index 29faae9..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/of.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { SchedulerLike, ValueFromArray } from '../types'; -import { Observable } from '../Observable'; -export declare function of(value: null): Observable; -export declare function of(value: undefined): Observable; -/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled`. Details: https://rxjs.dev/deprecations/scheduler-argument */ -export declare function of(scheduler: SchedulerLike): Observable; -/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled`. Details: https://rxjs.dev/deprecations/scheduler-argument */ -export declare function of(...valuesAndScheduler: [...A, SchedulerLike]): Observable>; -export declare function of(): Observable; -/** @deprecated Do not specify explicit type parameters. Signatures with type parameters that cannot be inferred will be removed in v8. */ -export declare function of(): Observable; -export declare function of(value: T): Observable; -export declare function of(...values: A): Observable>; -//# sourceMappingURL=of.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/of.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/of.d.ts.map deleted file mode 100644 index f949aec..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/of.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"of.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/of.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAS3C,wBAAgB,EAAE,CAAC,KAAK,EAAE,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;AAClD,wBAAgB,EAAE,CAAC,KAAK,EAAE,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;AAE5D,8IAA8I;AAC9I,wBAAgB,EAAE,CAAC,SAAS,EAAE,aAAa,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AAChE,8IAA8I;AAC9I,wBAAgB,EAAE,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,kBAAkB,EAAE,CAAC,GAAG,CAAC,EAAE,aAAa,CAAC,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9H,wBAAgB,EAAE,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;AACxC,0IAA0I;AAC1I,wBAAgB,EAAE,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC;AACvC,wBAAgB,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AAC/C,wBAAgB,EAAE,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/onErrorResumeNext.d.ts b/node_modules/rxjs/dist/types/internal/observable/onErrorResumeNext.d.ts deleted file mode 100644 index 503ba42..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/onErrorResumeNext.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Observable } from '../Observable'; -import { ObservableInputTuple } from '../types'; -export declare function onErrorResumeNext(sources: [...ObservableInputTuple]): Observable; -export declare function onErrorResumeNext(...sources: [...ObservableInputTuple]): Observable; -//# sourceMappingURL=onErrorResumeNext.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/onErrorResumeNext.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/onErrorResumeNext.d.ts.map deleted file mode 100644 index f8b7324..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/onErrorResumeNext.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"onErrorResumeNext.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/onErrorResumeNext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAMhD,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAC9H,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/pairs.d.ts b/node_modules/rxjs/dist/types/internal/observable/pairs.d.ts deleted file mode 100644 index 35ba244..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/pairs.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Observable } from '../Observable'; -import { SchedulerLike } from '../types'; -/** - * @deprecated Use `from(Object.entries(obj))` instead. Will be removed in v8. - */ -export declare function pairs(arr: readonly T[], scheduler?: SchedulerLike): Observable<[string, T]>; -/** - * @deprecated Use `from(Object.entries(obj))` instead. Will be removed in v8. - */ -export declare function pairs>(obj: O, scheduler?: SchedulerLike): Observable<[keyof O, O[keyof O]]>; -/** - * @deprecated Use `from(Object.entries(obj))` instead. Will be removed in v8. - */ -export declare function pairs(iterable: Iterable, scheduler?: SchedulerLike): Observable<[string, T]>; -/** - * @deprecated Use `from(Object.entries(obj))` instead. Will be removed in v8. - */ -export declare function pairs(n: number | bigint | boolean | ((...args: any[]) => any) | symbol, scheduler?: SchedulerLike): Observable<[never, never]>; -//# sourceMappingURL=pairs.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/pairs.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/pairs.d.ts.map deleted file mode 100644 index b808386..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/pairs.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pairs.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/pairs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC;;GAEG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,SAAS,CAAC,EAAE,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,UAAU,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;AAChG;;GAEG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,UAAU,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/H;;GAEG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,UAAU,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;AACpG;;GAEG;AACH,wBAAgB,KAAK,CACnB,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,GAAG,MAAM,EACjE,SAAS,CAAC,EAAE,aAAa,GACxB,UAAU,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/partition.d.ts b/node_modules/rxjs/dist/types/internal/observable/partition.d.ts deleted file mode 100644 index d19c26d..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/partition.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ObservableInput } from '../types'; -import { Observable } from '../Observable'; -/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ -export declare function partition(source: ObservableInput, predicate: (this: A, value: T, index: number) => value is U, thisArg: A): [Observable, Observable>]; -export declare function partition(source: ObservableInput, predicate: (value: T, index: number) => value is U): [Observable, Observable>]; -/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ -export declare function partition(source: ObservableInput, predicate: (this: A, value: T, index: number) => boolean, thisArg: A): [Observable, Observable]; -export declare function partition(source: ObservableInput, predicate: (value: T, index: number) => boolean): [Observable, Observable]; -//# sourceMappingURL=partition.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/partition.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/partition.d.ts.map deleted file mode 100644 index 3fd8d68..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/partition.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"partition.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/partition.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,gHAAgH;AAChH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,EACzC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,EAC1B,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,IAAI,CAAC,EAC3D,OAAO,EAAE,CAAC,GACT,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9C,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EACtC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,EAC1B,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,IAAI,CAAC,GACjD,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9C,gHAAgH;AAChH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAC5B,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,EAC1B,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,EACxD,OAAO,EAAE,CAAC,GACT,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAClC,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/race.d.ts b/node_modules/rxjs/dist/types/internal/observable/race.d.ts deleted file mode 100644 index a1ed4aa..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/race.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Observable } from '../Observable'; -import { ObservableInput, ObservableInputTuple } from '../types'; -import { Subscriber } from '../Subscriber'; -export declare function race(inputs: [...ObservableInputTuple]): Observable; -export declare function race(...inputs: [...ObservableInputTuple]): Observable; -/** - * An observable initializer function for both the static version and the - * operator version of race. - * @param sources The sources to race - */ -export declare function raceInit(sources: ObservableInput[]): (subscriber: Subscriber) => void; -//# sourceMappingURL=race.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/race.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/race.d.ts.map deleted file mode 100644 index 344f52d..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/race.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"race.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/race.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAGjE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,wBAAgB,IAAI,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAChH,wBAAgB,IAAI,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AA+CnH;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,gBACnC,WAAW,CAAC,CAAC,UAyBlC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/range.d.ts b/node_modules/rxjs/dist/types/internal/observable/range.d.ts deleted file mode 100644 index 87fcbb1..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/range.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { SchedulerLike } from '../types'; -import { Observable } from '../Observable'; -export declare function range(start: number, count?: number): Observable; -/** - * @deprecated The `scheduler` parameter will be removed in v8. Use `range(start, count).pipe(observeOn(scheduler))` instead. Details: Details: https://rxjs.dev/deprecations/scheduler-argument - */ -export declare function range(start: number, count: number | undefined, scheduler: SchedulerLike): Observable; -//# sourceMappingURL=range.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/range.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/range.d.ts.map deleted file mode 100644 index 489b6dd..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/range.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/range.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;AAEzE;;GAEG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,SAAS,EAAE,aAAa,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/throwError.d.ts b/node_modules/rxjs/dist/types/internal/observable/throwError.d.ts deleted file mode 100644 index cd26716..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/throwError.d.ts +++ /dev/null @@ -1,115 +0,0 @@ -import { Observable } from '../Observable'; -import { SchedulerLike } from '../types'; -/** - * Creates an observable that will create an error instance and push it to the consumer as an error - * immediately upon subscription. - * - * Just errors and does nothing else - * - * ![](throw.png) - * - * This creation function is useful for creating an observable that will create an error and error every - * time it is subscribed to. Generally, inside of most operators when you might want to return an errored - * observable, this is unnecessary. In most cases, such as in the inner return of {@link concatMap}, - * {@link mergeMap}, {@link defer}, and many others, you can simply throw the error, and RxJS will pick - * that up and notify the consumer of the error. - * - * ## Example - * - * Create a simple observable that will create a new error with a timestamp and log it - * and the message every time you subscribe to it - * - * ```ts - * import { throwError } from 'rxjs'; - * - * let errorCount = 0; - * - * const errorWithTimestamp$ = throwError(() => { - * const error: any = new Error(`This is error number ${ ++errorCount }`); - * error.timestamp = Date.now(); - * return error; - * }); - * - * errorWithTimestamp$.subscribe({ - * error: err => console.log(err.timestamp, err.message) - * }); - * - * errorWithTimestamp$.subscribe({ - * error: err => console.log(err.timestamp, err.message) - * }); - * - * // Logs the timestamp and a new error message for each subscription - * ``` - * - * ### Unnecessary usage - * - * Using `throwError` inside of an operator or creation function - * with a callback, is usually not necessary - * - * ```ts - * import { of, concatMap, timer, throwError } from 'rxjs'; - * - * const delays$ = of(1000, 2000, Infinity, 3000); - * - * delays$.pipe( - * concatMap(ms => { - * if (ms < 10000) { - * return timer(ms); - * } else { - * // This is probably overkill. - * return throwError(() => new Error(`Invalid time ${ ms }`)); - * } - * }) - * ) - * .subscribe({ - * next: console.log, - * error: console.error - * }); - * ``` - * - * You can just throw the error instead - * - * ```ts - * import { of, concatMap, timer } from 'rxjs'; - * - * const delays$ = of(1000, 2000, Infinity, 3000); - * - * delays$.pipe( - * concatMap(ms => { - * if (ms < 10000) { - * return timer(ms); - * } else { - * // Cleaner and easier to read for most folks. - * throw new Error(`Invalid time ${ ms }`); - * } - * }) - * ) - * .subscribe({ - * next: console.log, - * error: console.error - * }); - * ``` - * - * @param errorFactory A factory function that will create the error instance that is pushed. - */ -export declare function throwError(errorFactory: () => any): Observable; -/** - * Returns an observable that will error with the specified error immediately upon subscription. - * - * @param error The error instance to emit - * @deprecated Support for passing an error value will be removed in v8. Instead, pass a factory function to `throwError(() => new Error('test'))`. This is - * because it will create the error at the moment it should be created and capture a more appropriate stack trace. If - * for some reason you need to create the error ahead of time, you can still do that: `const err = new Error('test'); throwError(() => err);`. - */ -export declare function throwError(error: any): Observable; -/** - * Notifies the consumer of an error using a given scheduler by scheduling it at delay `0` upon subscription. - * - * @param errorOrErrorFactory An error instance or error factory - * @param scheduler A scheduler to use to schedule the error notification - * @deprecated The `scheduler` parameter will be removed in v8. - * Use `throwError` in combination with {@link observeOn}: `throwError(() => new Error('test')).pipe(observeOn(scheduler));`. - * Details: https://rxjs.dev/deprecations/scheduler-argument - */ -export declare function throwError(errorOrErrorFactory: any, scheduler: SchedulerLike): Observable; -//# sourceMappingURL=throwError.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/throwError.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/throwError.d.ts.map deleted file mode 100644 index 1902a9c..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/throwError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"throwError.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/throwError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FG;AACH,wBAAgB,UAAU,CAAC,YAAY,EAAE,MAAM,GAAG,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AAEvE;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,GAAG,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AAE1D;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,mBAAmB,EAAE,GAAG,EAAE,SAAS,EAAE,aAAa,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/timer.d.ts b/node_modules/rxjs/dist/types/internal/observable/timer.d.ts deleted file mode 100644 index d3f396e..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/timer.d.ts +++ /dev/null @@ -1,126 +0,0 @@ -import { Observable } from '../Observable'; -import { SchedulerLike } from '../types'; -/** - * Creates an observable that will wait for a specified time period, or exact date, before - * emitting the number 0. - * - * Used to emit a notification after a delay. - * - * This observable is useful for creating delays in code, or racing against other values - * for ad-hoc timeouts. - * - * The `delay` is specified by default in milliseconds, however providing a custom scheduler could - * create a different behavior. - * - * ## Examples - * - * Wait 3 seconds and start another observable - * - * You might want to use `timer` to delay subscription to an - * observable by a set amount of time. Here we use a timer with - * {@link concatMapTo} or {@link concatMap} in order to wait - * a few seconds and start a subscription to a source. - * - * ```ts - * import { of, timer, concatMap } from 'rxjs'; - * - * // This could be any observable - * const source = of(1, 2, 3); - * - * timer(3000) - * .pipe(concatMap(() => source)) - * .subscribe(console.log); - * ``` - * - * Take all values until the start of the next minute - * - * Using a `Date` as the trigger for the first emission, you can - * do things like wait until midnight to fire an event, or in this case, - * wait until a new minute starts (chosen so the example wouldn't take - * too long to run) in order to stop watching a stream. Leveraging - * {@link takeUntil}. - * - * ```ts - * import { interval, takeUntil, timer } from 'rxjs'; - * - * // Build a Date object that marks the - * // next minute. - * const currentDate = new Date(); - * const startOfNextMinute = new Date( - * currentDate.getFullYear(), - * currentDate.getMonth(), - * currentDate.getDate(), - * currentDate.getHours(), - * currentDate.getMinutes() + 1 - * ); - * - * // This could be any observable stream - * const source = interval(1000); - * - * const result = source.pipe( - * takeUntil(timer(startOfNextMinute)) - * ); - * - * result.subscribe(console.log); - * ``` - * - * ### Known Limitations - * - * - The {@link asyncScheduler} uses `setTimeout` which has limitations for how far in the future it can be scheduled. - * - * - If a `scheduler` is provided that returns a timestamp other than an epoch from `now()`, and - * a `Date` object is passed to the `dueTime` argument, the calculation for when the first emission - * should occur will be incorrect. In this case, it would be best to do your own calculations - * ahead of time, and pass a `number` in as the `dueTime`. - * - * @param due If a `number`, the amount of time in milliseconds to wait before emitting. - * If a `Date`, the exact time at which to emit. - * @param scheduler The scheduler to use to schedule the delay. Defaults to {@link asyncScheduler}. - */ -export declare function timer(due: number | Date, scheduler?: SchedulerLike): Observable<0>; -/** - * Creates an observable that starts an interval after a specified delay, emitting incrementing numbers -- starting at `0` -- - * on each interval after words. - * - * The `delay` and `intervalDuration` are specified by default in milliseconds, however providing a custom scheduler could - * create a different behavior. - * - * ## Example - * - * ### Start an interval that starts right away - * - * Since {@link interval} waits for the passed delay before starting, - * sometimes that's not ideal. You may want to start an interval immediately. - * `timer` works well for this. Here we have both side-by-side so you can - * see them in comparison. - * - * Note that this observable will never complete. - * - * ```ts - * import { timer, interval } from 'rxjs'; - * - * timer(0, 1000).subscribe(n => console.log('timer', n)); - * interval(1000).subscribe(n => console.log('interval', n)); - * ``` - * - * ### Known Limitations - * - * - The {@link asyncScheduler} uses `setTimeout` which has limitations for how far in the future it can be scheduled. - * - * - If a `scheduler` is provided that returns a timestamp other than an epoch from `now()`, and - * a `Date` object is passed to the `dueTime` argument, the calculation for when the first emission - * should occur will be incorrect. In this case, it would be best to do your own calculations - * ahead of time, and pass a `number` in as the `startDue`. - * @param startDue If a `number`, is the time to wait before starting the interval. - * If a `Date`, is the exact time at which to start the interval. - * @param intervalDuration The delay between each value emitted in the interval. Passing a - * negative number here will result in immediate completion after the first value is emitted, as though - * no `intervalDuration` was passed at all. - * @param scheduler The scheduler to use to schedule the delay. Defaults to {@link asyncScheduler}. - */ -export declare function timer(startDue: number | Date, intervalDuration: number, scheduler?: SchedulerLike): Observable; -/** - * @deprecated The signature allowing `undefined` to be passed for `intervalDuration` will be removed in v8. Use the `timer(dueTime, scheduler?)` signature instead. - */ -export declare function timer(dueTime: number | Date, unused: undefined, scheduler?: SchedulerLike): Observable<0>; -//# sourceMappingURL=timer.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/timer.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/timer.d.ts.map deleted file mode 100644 index a1e7151..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/timer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timer.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/timer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAKzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4EG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AAEpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;AAExH;;GAEG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/using.d.ts b/node_modules/rxjs/dist/types/internal/observable/using.d.ts deleted file mode 100644 index 14cbdd8..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/using.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Observable } from '../Observable'; -import { Unsubscribable, ObservableInput, ObservedValueOf } from '../types'; -/** - * Creates an Observable that uses a resource which will be disposed at the same time as the Observable. - * - * Use it when you catch yourself cleaning up after an Observable. - * - * `using` is a factory operator, which accepts two functions. First function returns a disposable resource. - * It can be an arbitrary object that implements `unsubscribe` method. Second function will be injected with - * that object and should return an Observable. That Observable can use resource object during its execution. - * Both functions passed to `using` will be called every time someone subscribes - neither an Observable nor - * resource object will be shared in any way between subscriptions. - * - * When Observable returned by `using` is subscribed, Observable returned from the second function will be subscribed - * as well. All its notifications (nexted values, completion and error events) will be emitted unchanged by the output - * Observable. If however someone unsubscribes from the Observable or source Observable completes or errors by itself, - * the `unsubscribe` method on resource object will be called. This can be used to do any necessary clean up, which - * otherwise would have to be handled by hand. Note that complete or error notifications are not emitted when someone - * cancels subscription to an Observable via `unsubscribe`, so `using` can be used as a hook, allowing you to make - * sure that all resources which need to exist during an Observable execution will be disposed at appropriate time. - * - * @see {@link defer} - * - * @param resourceFactory A function which creates any resource object that implements `unsubscribe` method. - * @param observableFactory A function which creates an Observable, that can use injected resource object. - * @return An Observable that behaves the same as Observable returned by `observableFactory`, but - * which - when completed, errored or unsubscribed - will also call `unsubscribe` on created resource object. - */ -export declare function using>(resourceFactory: () => Unsubscribable | void, observableFactory: (resource: Unsubscribable | void) => T | void): Observable>; -//# sourceMappingURL=using.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/using.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/using.d.ts.map deleted file mode 100644 index 0231d00..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/using.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"using.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/using.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI5E;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAClD,eAAe,EAAE,MAAM,cAAc,GAAG,IAAI,EAC5C,iBAAiB,EAAE,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,KAAK,CAAC,GAAG,IAAI,GAC/D,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAchC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/zip.d.ts b/node_modules/rxjs/dist/types/internal/observable/zip.d.ts deleted file mode 100644 index 67a41d1..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/zip.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Observable } from '../Observable'; -import { ObservableInputTuple } from '../types'; -export declare function zip(sources: [...ObservableInputTuple]): Observable; -export declare function zip(sources: [...ObservableInputTuple], resultSelector: (...values: A) => R): Observable; -export declare function zip(...sources: [...ObservableInputTuple]): Observable; -export declare function zip(...sourcesAndResultSelector: [...ObservableInputTuple, (...values: A) => R]): Observable; -//# sourceMappingURL=zip.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/observable/zip.d.ts.map b/node_modules/rxjs/dist/types/internal/observable/zip.d.ts.map deleted file mode 100644 index 714dfda..0000000 --- a/node_modules/rxjs/dist/types/internal/observable/zip.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"zip.d.ts","sourceRoot":"","sources":["../../../../src/internal/observable/zip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAOhD,wBAAgB,GAAG,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AACxG,wBAAgB,GAAG,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,EACjD,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,EACrC,cAAc,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,GAClC,UAAU,CAAC,CAAC,CAAC,CAAC;AACjB,wBAAgB,GAAG,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;AAC3G,wBAAgB,GAAG,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,EACjD,GAAG,wBAAwB,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,GAC7E,UAAU,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/OperatorSubscriber.d.ts b/node_modules/rxjs/dist/types/internal/operators/OperatorSubscriber.d.ts deleted file mode 100644 index 91a0dc7..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/OperatorSubscriber.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Subscriber } from '../Subscriber'; -/** - * Creates an instance of an `OperatorSubscriber`. - * @param destination The downstream subscriber. - * @param onNext Handles next values, only called if this subscriber is not stopped or closed. Any - * error that occurs in this function is caught and sent to the `error` method of this subscriber. - * @param onError Handles errors from the subscription, any errors that occur in this handler are caught - * and send to the `destination` error handler. - * @param onComplete Handles completion notification from the subscription. Any errors that occur in - * this handler are sent to the `destination` error handler. - * @param onFinalize Additional teardown logic here. This will only be called on teardown if the - * subscriber itself is not already closed. This is called after all other teardown logic is executed. - */ -export declare function createOperatorSubscriber(destination: Subscriber, onNext?: (value: T) => void, onComplete?: () => void, onError?: (err: any) => void, onFinalize?: () => void): Subscriber; -/** - * A generic helper for allowing operators to be created with a Subscriber and - * use closures to capture necessary state from the operator function itself. - */ -export declare class OperatorSubscriber extends Subscriber { - private onFinalize?; - private shouldUnsubscribe?; - /** - * Creates an instance of an `OperatorSubscriber`. - * @param destination The downstream subscriber. - * @param onNext Handles next values, only called if this subscriber is not stopped or closed. Any - * error that occurs in this function is caught and sent to the `error` method of this subscriber. - * @param onError Handles errors from the subscription, any errors that occur in this handler are caught - * and send to the `destination` error handler. - * @param onComplete Handles completion notification from the subscription. Any errors that occur in - * this handler are sent to the `destination` error handler. - * @param onFinalize Additional finalization logic here. This will only be called on finalization if the - * subscriber itself is not already closed. This is called after all other finalization logic is executed. - * @param shouldUnsubscribe An optional check to see if an unsubscribe call should truly unsubscribe. - * NOTE: This currently **ONLY** exists to support the strange behavior of {@link groupBy}, where unsubscription - * to the resulting observable does not actually disconnect from the source if there are active subscriptions - * to any grouped observable. (DO NOT EXPOSE OR USE EXTERNALLY!!!) - */ - constructor(destination: Subscriber, onNext?: (value: T) => void, onComplete?: () => void, onError?: (err: any) => void, onFinalize?: (() => void) | undefined, shouldUnsubscribe?: (() => boolean) | undefined); - unsubscribe(): void; -} -//# sourceMappingURL=OperatorSubscriber.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/OperatorSubscriber.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/OperatorSubscriber.d.ts.map deleted file mode 100644 index 3e925bd..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/OperatorSubscriber.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"OperatorSubscriber.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/OperatorSubscriber.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EACxC,WAAW,EAAE,UAAU,CAAC,GAAG,CAAC,EAC5B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,EAC3B,UAAU,CAAC,EAAE,MAAM,IAAI,EACvB,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,EAC5B,UAAU,CAAC,EAAE,MAAM,IAAI,GACtB,UAAU,CAAC,CAAC,CAAC,CAEf;AAED;;;GAGG;AACH,qBAAa,kBAAkB,CAAC,CAAC,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAC;IAsBpD,OAAO,CAAC,UAAU,CAAC;IACnB,OAAO,CAAC,iBAAiB,CAAC;IAtB5B;;;;;;;;;;;;;;;OAeG;gBAED,WAAW,EAAE,UAAU,CAAC,GAAG,CAAC,EAC5B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,EAC3B,UAAU,CAAC,EAAE,MAAM,IAAI,EACvB,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,EACpB,UAAU,CAAC,SAAQ,IAAI,aAAA,EACvB,iBAAiB,CAAC,SAAQ,OAAO,aAAA;IAoD3C,WAAW;CAQZ"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/audit.d.ts b/node_modules/rxjs/dist/types/internal/operators/audit.d.ts deleted file mode 100644 index 9020ef0..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/audit.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { MonoTypeOperatorFunction, ObservableInput } from '../types'; -/** - * Ignores source values for a duration determined by another Observable, then - * emits the most recent value from the source Observable, then repeats this - * process. - * - * It's like {@link auditTime}, but the silencing - * duration is determined by a second Observable. - * - * ![](audit.svg) - * - * `audit` is similar to `throttle`, but emits the last value from the silenced - * time window, instead of the first value. `audit` emits the most recent value - * from the source Observable on the output Observable as soon as its internal - * timer becomes disabled, and ignores source values while the timer is enabled. - * Initially, the timer is disabled. As soon as the first source value arrives, - * the timer is enabled by calling the `durationSelector` function with the - * source value, which returns the "duration" Observable. When the duration - * Observable emits a value, the timer is disabled, then the most - * recent source value is emitted on the output Observable, and this process - * repeats for the next source value. - * - * ## Example - * - * Emit clicks at a rate of at most one click per second - * - * ```ts - * import { fromEvent, audit, interval } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe(audit(ev => interval(1000))); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link auditTime} - * @see {@link debounce} - * @see {@link delayWhen} - * @see {@link sample} - * @see {@link throttle} - * - * @param durationSelector A function - * that receives a value from the source Observable, for computing the silencing - * duration, returned as an Observable or a Promise. - * @return A function that returns an Observable that performs rate-limiting of - * emissions from the source Observable. - */ -export declare function audit(durationSelector: (value: T) => ObservableInput): MonoTypeOperatorFunction; -//# sourceMappingURL=audit.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/audit.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/audit.d.ts.map deleted file mode 100644 index 7a8377e..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/audit.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/audit.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAMrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,eAAe,CAAC,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CA2C1G"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/auditTime.d.ts b/node_modules/rxjs/dist/types/internal/operators/auditTime.d.ts deleted file mode 100644 index 2c9e8cd..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/auditTime.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; -/** - * Ignores source values for `duration` milliseconds, then emits the most recent - * value from the source Observable, then repeats this process. - * - * When it sees a source value, it ignores that plus - * the next ones for `duration` milliseconds, and then it emits the most recent - * value from the source. - * - * ![](auditTime.png) - * - * `auditTime` is similar to `throttleTime`, but emits the last value from the - * silenced time window, instead of the first value. `auditTime` emits the most - * recent value from the source Observable on the output Observable as soon as - * its internal timer becomes disabled, and ignores source values while the - * timer is enabled. Initially, the timer is disabled. As soon as the first - * source value arrives, the timer is enabled. After `duration` milliseconds (or - * the time unit determined internally by the optional `scheduler`) has passed, - * the timer is disabled, then the most recent source value is emitted on the - * output Observable, and this process repeats for the next source value. - * Optionally takes a {@link SchedulerLike} for managing timers. - * - * ## Example - * - * Emit clicks at a rate of at most one click per second - * - * ```ts - * import { fromEvent, auditTime } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe(auditTime(1000)); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link audit} - * @see {@link debounceTime} - * @see {@link delay} - * @see {@link sampleTime} - * @see {@link throttleTime} - * - * @param duration Time to wait before emitting the most recent source value, - * measured in milliseconds or the time unit determined internally by the - * optional `scheduler`. - * @param scheduler The {@link SchedulerLike} to use for managing the timers - * that handle the rate-limiting behavior. - * @return A function that returns an Observable that performs rate-limiting of - * emissions from the source Observable. - */ -export declare function auditTime(duration: number, scheduler?: SchedulerLike): MonoTypeOperatorFunction; -//# sourceMappingURL=auditTime.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/auditTime.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/auditTime.d.ts.map deleted file mode 100644 index 309fc45..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/auditTime.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"auditTime.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/auditTime.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,GAAE,aAA8B,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAErH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/buffer.d.ts b/node_modules/rxjs/dist/types/internal/operators/buffer.d.ts deleted file mode 100644 index 50ce9b4..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/buffer.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { OperatorFunction, ObservableInput } from '../types'; -/** - * Buffers the source Observable values until `closingNotifier` emits. - * - * Collects values from the past as an array, and emits - * that array only when another Observable emits. - * - * ![](buffer.png) - * - * Buffers the incoming Observable values until the given `closingNotifier` - * `ObservableInput` (that internally gets converted to an Observable) - * emits a value, at which point it emits the buffer on the output - * Observable and starts a new buffer internally, awaiting the next time - * `closingNotifier` emits. - * - * ## Example - * - * On every click, emit array of most recent interval events - * - * ```ts - * import { fromEvent, interval, buffer } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const intervalEvents = interval(1000); - * const buffered = intervalEvents.pipe(buffer(clicks)); - * buffered.subscribe(x => console.log(x)); - * ``` - * - * @see {@link bufferCount} - * @see {@link bufferTime} - * @see {@link bufferToggle} - * @see {@link bufferWhen} - * @see {@link window} - * - * @param closingNotifier An `ObservableInput` that signals the - * buffer to be emitted on the output Observable. - * @return A function that returns an Observable of buffers, which are arrays - * of values. - */ -export declare function buffer(closingNotifier: ObservableInput): OperatorFunction; -//# sourceMappingURL=buffer.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/buffer.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/buffer.d.ts.map deleted file mode 100644 index 261cbe7..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/buffer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"buffer.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/buffer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAM7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,eAAe,EAAE,eAAe,CAAC,GAAG,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAoCzF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/bufferCount.d.ts b/node_modules/rxjs/dist/types/internal/operators/bufferCount.d.ts deleted file mode 100644 index 1009be5..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/bufferCount.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { OperatorFunction } from '../types'; -/** - * Buffers the source Observable values until the size hits the maximum - * `bufferSize` given. - * - * Collects values from the past as an array, and emits - * that array only when its size reaches `bufferSize`. - * - * ![](bufferCount.png) - * - * Buffers a number of values from the source Observable by `bufferSize` then - * emits the buffer and clears it, and starts a new buffer each - * `startBufferEvery` values. If `startBufferEvery` is not provided or is - * `null`, then new buffers are started immediately at the start of the source - * and when each buffer closes and is emitted. - * - * ## Examples - * - * Emit the last two click events as an array - * - * ```ts - * import { fromEvent, bufferCount } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const buffered = clicks.pipe(bufferCount(2)); - * buffered.subscribe(x => console.log(x)); - * ``` - * - * On every click, emit the last two click events as an array - * - * ```ts - * import { fromEvent, bufferCount } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const buffered = clicks.pipe(bufferCount(2, 1)); - * buffered.subscribe(x => console.log(x)); - * ``` - * - * @see {@link buffer} - * @see {@link bufferTime} - * @see {@link bufferToggle} - * @see {@link bufferWhen} - * @see {@link pairwise} - * @see {@link windowCount} - * - * @param bufferSize The maximum size of the buffer emitted. - * @param startBufferEvery Interval at which to start a new buffer. - * For example if `startBufferEvery` is `2`, then a new buffer will be started - * on every other value from the source. A new buffer is started at the - * beginning of the source by default. - * @return A function that returns an Observable of arrays of buffered values. - */ -export declare function bufferCount(bufferSize: number, startBufferEvery?: number | null): OperatorFunction; -//# sourceMappingURL=bufferCount.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/bufferCount.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/bufferCount.d.ts.map deleted file mode 100644 index b7fccb3..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/bufferCount.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bufferCount.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/bufferCount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAK5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,gBAAgB,GAAE,MAAM,GAAG,IAAW,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CA+DnH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/bufferTime.d.ts b/node_modules/rxjs/dist/types/internal/operators/bufferTime.d.ts deleted file mode 100644 index bdad980..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/bufferTime.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { OperatorFunction, SchedulerLike } from '../types'; -export declare function bufferTime(bufferTimeSpan: number, scheduler?: SchedulerLike): OperatorFunction; -export declare function bufferTime(bufferTimeSpan: number, bufferCreationInterval: number | null | undefined, scheduler?: SchedulerLike): OperatorFunction; -export declare function bufferTime(bufferTimeSpan: number, bufferCreationInterval: number | null | undefined, maxBufferSize: number, scheduler?: SchedulerLike): OperatorFunction; -//# sourceMappingURL=bufferTime.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/bufferTime.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/bufferTime.d.ts.map deleted file mode 100644 index f814883..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/bufferTime.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bufferTime.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/bufferTime.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAQ3D,wBAAgB,UAAU,CAAC,CAAC,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAC3G,wBAAgB,UAAU,CAAC,CAAC,EAC1B,cAAc,EAAE,MAAM,EACtB,sBAAsB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACjD,SAAS,CAAC,EAAE,aAAa,GACxB,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAC5B,wBAAgB,UAAU,CAAC,CAAC,EAC1B,cAAc,EAAE,MAAM,EACtB,sBAAsB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACjD,aAAa,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,aAAa,GACxB,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/bufferToggle.d.ts b/node_modules/rxjs/dist/types/internal/operators/bufferToggle.d.ts deleted file mode 100644 index 5e9cdbe..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/bufferToggle.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { OperatorFunction, ObservableInput } from '../types'; -/** - * Buffers the source Observable values starting from an emission from - * `openings` and ending when the output of `closingSelector` emits. - * - * Collects values from the past as an array. Starts - * collecting only when `opening` emits, and calls the `closingSelector` - * function to get an Observable that tells when to close the buffer. - * - * ![](bufferToggle.png) - * - * Buffers values from the source by opening the buffer via signals from an - * Observable provided to `openings`, and closing and sending the buffers when - * a Subscribable or Promise returned by the `closingSelector` function emits. - * - * ## Example - * - * Every other second, emit the click events from the next 500ms - * - * ```ts - * import { fromEvent, interval, bufferToggle, EMPTY } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const openings = interval(1000); - * const buffered = clicks.pipe(bufferToggle(openings, i => - * i % 2 ? interval(500) : EMPTY - * )); - * buffered.subscribe(x => console.log(x)); - * ``` - * - * @see {@link buffer} - * @see {@link bufferCount} - * @see {@link bufferTime} - * @see {@link bufferWhen} - * @see {@link windowToggle} - * - * @param openings A Subscribable or Promise of notifications to start new - * buffers. - * @param closingSelector A function that takes - * the value emitted by the `openings` observable and returns a Subscribable or Promise, - * which, when it emits, signals that the associated buffer should be emitted - * and cleared. - * @return A function that returns an Observable of arrays of buffered values. - */ -export declare function bufferToggle(openings: ObservableInput, closingSelector: (value: O) => ObservableInput): OperatorFunction; -//# sourceMappingURL=bufferToggle.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/bufferToggle.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/bufferToggle.d.ts.map deleted file mode 100644 index 05ee389..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/bufferToggle.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bufferToggle.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/bufferToggle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAO7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAC/B,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,EAC5B,eAAe,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,eAAe,CAAC,GAAG,CAAC,GAClD,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CA+C1B"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/bufferWhen.d.ts b/node_modules/rxjs/dist/types/internal/operators/bufferWhen.d.ts deleted file mode 100644 index e92642d..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/bufferWhen.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { ObservableInput, OperatorFunction } from '../types'; -/** - * Buffers the source Observable values, using a factory function of closing - * Observables to determine when to close, emit, and reset the buffer. - * - * Collects values from the past as an array. When it - * starts collecting values, it calls a function that returns an Observable that - * tells when to close the buffer and restart collecting. - * - * ![](bufferWhen.svg) - * - * Opens a buffer immediately, then closes the buffer when the observable - * returned by calling `closingSelector` function emits a value. When it closes - * the buffer, it immediately opens a new buffer and repeats the process. - * - * ## Example - * - * Emit an array of the last clicks every [1-5] random seconds - * - * ```ts - * import { fromEvent, bufferWhen, interval } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const buffered = clicks.pipe( - * bufferWhen(() => interval(1000 + Math.random() * 4000)) - * ); - * buffered.subscribe(x => console.log(x)); - * ``` - * - * @see {@link buffer} - * @see {@link bufferCount} - * @see {@link bufferTime} - * @see {@link bufferToggle} - * @see {@link windowWhen} - * - * @param closingSelector A function that takes no arguments and returns an - * Observable that signals buffer closure. - * @return A function that returns an Observable of arrays of buffered values. - */ -export declare function bufferWhen(closingSelector: () => ObservableInput): OperatorFunction; -//# sourceMappingURL=bufferWhen.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/bufferWhen.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/bufferWhen.d.ts.map deleted file mode 100644 index cdddb4a..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/bufferWhen.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bufferWhen.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/bufferWhen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAM7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC,GAAG,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAgDnG"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/catchError.d.ts b/node_modules/rxjs/dist/types/internal/operators/catchError.d.ts deleted file mode 100644 index ef7000e..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/catchError.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Observable } from '../Observable'; -import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; -export declare function catchError>(selector: (err: any, caught: Observable) => O): OperatorFunction>; -//# sourceMappingURL=catchError.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/catchError.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/catchError.d.ts.map deleted file mode 100644 index a1a9cc9..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/catchError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"catchError.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/catchError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAM9E,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAC1D,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,GAC/C,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/combineAll.d.ts b/node_modules/rxjs/dist/types/internal/operators/combineAll.d.ts deleted file mode 100644 index e1431c1..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/combineAll.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { combineLatestAll } from './combineLatestAll'; -/** - * @deprecated Renamed to {@link combineLatestAll}. Will be removed in v8. - */ -export declare const combineAll: typeof combineLatestAll; -//# sourceMappingURL=combineAll.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/combineAll.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/combineAll.d.ts.map deleted file mode 100644 index a3bccf4..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/combineAll.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"combineAll.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/combineAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,UAAU,yBAAmB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/combineLatest.d.ts b/node_modules/rxjs/dist/types/internal/operators/combineLatest.d.ts deleted file mode 100644 index 20944fa..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/combineLatest.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ObservableInputTuple, OperatorFunction } from '../types'; -/** @deprecated Replaced with {@link combineLatestWith}. Will be removed in v8. */ -export declare function combineLatest(sources: [...ObservableInputTuple], project: (...values: [T, ...A]) => R): OperatorFunction; -/** @deprecated Replaced with {@link combineLatestWith}. Will be removed in v8. */ -export declare function combineLatest(sources: [...ObservableInputTuple]): OperatorFunction; -/** @deprecated Replaced with {@link combineLatestWith}. Will be removed in v8. */ -export declare function combineLatest(...sourcesAndProject: [...ObservableInputTuple, (...values: [T, ...A]) => R]): OperatorFunction; -/** @deprecated Replaced with {@link combineLatestWith}. Will be removed in v8. */ -export declare function combineLatest(...sources: [...ObservableInputTuple]): OperatorFunction; -//# sourceMappingURL=combineLatest.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/combineLatest.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/combineLatest.d.ts.map deleted file mode 100644 index f2d2b79..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/combineLatest.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"combineLatest.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatest.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAOnF,kFAAkF;AAClF,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,EAC9D,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,EACrC,OAAO,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,GACnC,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC1B,kFAAkF;AAClF,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;AAEzI,kFAAkF;AAClF,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,EAC9D,GAAG,iBAAiB,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,GAC9E,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC1B,kFAAkF;AAClF,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,EAAE,GAAG,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/combineLatestAll.d.ts b/node_modules/rxjs/dist/types/internal/operators/combineLatestAll.d.ts deleted file mode 100644 index ef412ab..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/combineLatestAll.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { OperatorFunction, ObservableInput } from '../types'; -export declare function combineLatestAll(): OperatorFunction, T[]>; -export declare function combineLatestAll(): OperatorFunction; -export declare function combineLatestAll(project: (...values: T[]) => R): OperatorFunction, R>; -export declare function combineLatestAll(project: (...values: Array) => R): OperatorFunction; -//# sourceMappingURL=combineLatestAll.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/combineLatestAll.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/combineLatestAll.d.ts.map deleted file mode 100644 index f24ab4f..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/combineLatestAll.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"combineLatestAll.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatestAll.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG7D,wBAAgB,gBAAgB,CAAC,CAAC,KAAK,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AACjF,wBAAgB,gBAAgB,CAAC,CAAC,KAAK,gBAAgB,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;AAClE,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,KAAK,CAAC,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAChH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,gBAAgB,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/combineLatestWith.d.ts b/node_modules/rxjs/dist/types/internal/operators/combineLatestWith.d.ts deleted file mode 100644 index 71d3bdf..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/combineLatestWith.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { ObservableInputTuple, OperatorFunction, Cons } from '../types'; -/** - * Create an observable that combines the latest values from all passed observables and the source - * into arrays and emits them. - * - * Returns an observable, that when subscribed to, will subscribe to the source observable and all - * sources provided as arguments. Once all sources emit at least one value, all of the latest values - * will be emitted as an array. After that, every time any source emits a value, all of the latest values - * will be emitted as an array. - * - * This is a useful operator for eagerly calculating values based off of changed inputs. - * - * ## Example - * - * Simple concatenation of values from two inputs - * - * ```ts - * import { fromEvent, combineLatestWith, map } from 'rxjs'; - * - * // Setup: Add two inputs to the page - * const input1 = document.createElement('input'); - * document.body.appendChild(input1); - * const input2 = document.createElement('input'); - * document.body.appendChild(input2); - * - * // Get streams of changes - * const input1Changes$ = fromEvent(input1, 'change'); - * const input2Changes$ = fromEvent(input2, 'change'); - * - * // Combine the changes by adding them together - * input1Changes$.pipe( - * combineLatestWith(input2Changes$), - * map(([e1, e2]) => (e1.target).value + ' - ' + (e2.target).value) - * ) - * .subscribe(x => console.log(x)); - * ``` - * - * @param otherSources the other sources to subscribe to. - * @return A function that returns an Observable that emits the latest - * emissions from both source and provided Observables. - */ -export declare function combineLatestWith(...otherSources: [...ObservableInputTuple]): OperatorFunction>; -//# sourceMappingURL=combineLatestWith.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/combineLatestWith.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/combineLatestWith.d.ts.map deleted file mode 100644 index bc1c10e..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/combineLatestWith.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"combineLatestWith.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatestWith.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAC/D,GAAG,YAAY,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAC5C,gBAAgB,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAEjC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/concat.d.ts b/node_modules/rxjs/dist/types/internal/operators/concat.d.ts deleted file mode 100644 index fe93031..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/concat.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ObservableInputTuple, OperatorFunction, SchedulerLike } from '../types'; -/** @deprecated Replaced with {@link concatWith}. Will be removed in v8. */ -export declare function concat(...sources: [...ObservableInputTuple]): OperatorFunction; -/** @deprecated Replaced with {@link concatWith}. Will be removed in v8. */ -export declare function concat(...sourcesAndScheduler: [...ObservableInputTuple, SchedulerLike]): OperatorFunction; -//# sourceMappingURL=concat.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/concat.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/concat.d.ts.map deleted file mode 100644 index ff602b3..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/concat.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concat.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/concat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAMjF,2EAA2E;AAC3E,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACtI,2EAA2E;AAC3E,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EACpD,GAAG,mBAAmB,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,GAClE,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/concatAll.d.ts b/node_modules/rxjs/dist/types/internal/operators/concatAll.d.ts deleted file mode 100644 index 6eb2909..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/concatAll.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { OperatorFunction, ObservableInput, ObservedValueOf } from '../types'; -/** - * Converts a higher-order Observable into a first-order Observable by - * concatenating the inner Observables in order. - * - * Flattens an Observable-of-Observables by putting one - * inner Observable after the other. - * - * ![](concatAll.svg) - * - * Joins every Observable emitted by the source (a higher-order Observable), in - * a serial fashion. It subscribes to each inner Observable only after the - * previous inner Observable has completed, and merges all of their values into - * the returned observable. - * - * __Warning:__ If the source Observable emits Observables quickly and - * endlessly, and the inner Observables it emits generally complete slower than - * the source emits, you can run into memory issues as the incoming Observables - * collect in an unbounded buffer. - * - * Note: `concatAll` is equivalent to `mergeAll` with concurrency parameter set - * to `1`. - * - * ## Example - * - * For each click event, tick every second from 0 to 3, with no concurrency - * - * ```ts - * import { fromEvent, map, interval, take, concatAll } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const higherOrder = clicks.pipe( - * map(() => interval(1000).pipe(take(4))) - * ); - * const firstOrder = higherOrder.pipe(concatAll()); - * firstOrder.subscribe(x => console.log(x)); - * - * // Results in the following: - * // (results are not concurrent) - * // For every click on the "document" it will emit values 0 to 3 spaced - * // on a 1000ms interval - * // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3 - * ``` - * - * @see {@link combineLatestAll} - * @see {@link concat} - * @see {@link concatMap} - * @see {@link concatMapTo} - * @see {@link exhaustAll} - * @see {@link mergeAll} - * @see {@link switchAll} - * @see {@link switchMap} - * @see {@link zipAll} - * - * @return A function that returns an Observable emitting values from all the - * inner Observables concatenated. - */ -export declare function concatAll>(): OperatorFunction>; -//# sourceMappingURL=concatAll.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/concatAll.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/concatAll.d.ts.map deleted file mode 100644 index 14058ca..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/concatAll.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concatAll.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/concatAll.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,KAAK,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAEnG"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/concatMap.d.ts b/node_modules/rxjs/dist/types/internal/operators/concatMap.d.ts deleted file mode 100644 index 935e19a..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/concatMap.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; -export declare function concatMap>(project: (value: T, index: number) => O): OperatorFunction>; -/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ -export declare function concatMap>(project: (value: T, index: number) => O, resultSelector: undefined): OperatorFunction>; -/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ -export declare function concatMap>(project: (value: T, index: number) => O, resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R): OperatorFunction; -//# sourceMappingURL=concatMap.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/concatMap.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/concatMap.d.ts.map deleted file mode 100644 index 770b1d9..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/concatMap.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concatMap.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/concatMap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI9E,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EACzD,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GACtC,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,0JAA0J;AAC1J,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EACzD,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EACvC,cAAc,EAAE,SAAS,GACxB,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,0JAA0J;AAC1J,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAC5D,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EACvC,cAAc,EAAE,CAAC,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC,GAC3G,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/concatMapTo.d.ts b/node_modules/rxjs/dist/types/internal/operators/concatMapTo.d.ts deleted file mode 100644 index 1c8aa69..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/concatMapTo.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; -/** @deprecated Will be removed in v9. Use {@link concatMap} instead: `concatMap(() => result)` */ -export declare function concatMapTo>(observable: O): OperatorFunction>; -/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ -export declare function concatMapTo>(observable: O, resultSelector: undefined): OperatorFunction>; -/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ -export declare function concatMapTo>(observable: O, resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R): OperatorFunction; -//# sourceMappingURL=concatMapTo.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/concatMapTo.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/concatMapTo.d.ts.map deleted file mode 100644 index 8e20530..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/concatMapTo.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concatMapTo.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/concatMapTo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG9E,kGAAkG;AAClG,wBAAgB,WAAW,CAAC,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC,GAAG,gBAAgB,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9H,0JAA0J;AAC1J,wBAAgB,WAAW,CAAC,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAC5D,UAAU,EAAE,CAAC,EACb,cAAc,EAAE,SAAS,GACxB,gBAAgB,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AACjD,0JAA0J;AAC1J,wBAAgB,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAClE,UAAU,EAAE,CAAC,EACb,cAAc,EAAE,CAAC,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC,GAC3G,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/concatWith.d.ts b/node_modules/rxjs/dist/types/internal/operators/concatWith.d.ts deleted file mode 100644 index 4beb57a..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/concatWith.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { ObservableInputTuple, OperatorFunction } from '../types'; -/** - * Emits all of the values from the source observable, then, once it completes, subscribes - * to each observable source provided, one at a time, emitting all of their values, and not subscribing - * to the next one until it completes. - * - * `concat(a$, b$, c$)` is the same as `a$.pipe(concatWith(b$, c$))`. - * - * ## Example - * - * Listen for one mouse click, then listen for all mouse moves. - * - * ```ts - * import { fromEvent, map, take, concatWith } from 'rxjs'; - * - * const clicks$ = fromEvent(document, 'click'); - * const moves$ = fromEvent(document, 'mousemove'); - * - * clicks$.pipe( - * map(() => 'click'), - * take(1), - * concatWith( - * moves$.pipe( - * map(() => 'move') - * ) - * ) - * ) - * .subscribe(x => console.log(x)); - * - * // 'click' - * // 'move' - * // 'move' - * // 'move' - * // ... - * ``` - * - * @param otherSources Other observable sources to subscribe to, in sequence, after the original source is complete. - * @return A function that returns an Observable that concatenates - * subscriptions to the source and provided Observables subscribing to the next - * only once the current subscription completes. - */ -export declare function concatWith(...otherSources: [...ObservableInputTuple]): OperatorFunction; -//# sourceMappingURL=concatWith.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/concatWith.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/concatWith.d.ts.map deleted file mode 100644 index 8524045..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/concatWith.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concatWith.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/concatWith.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAGlE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EACxD,GAAG,YAAY,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAC5C,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAEpC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/connect.d.ts b/node_modules/rxjs/dist/types/internal/operators/connect.d.ts deleted file mode 100644 index 7e1f86d..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/connect.d.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { OperatorFunction, ObservableInput, ObservedValueOf, SubjectLike } from '../types'; -import { Observable } from '../Observable'; -/** - * An object used to configure {@link connect} operator. - */ -export interface ConnectConfig { - /** - * A factory function used to create the Subject through which the source - * is multicast. By default, this creates a {@link Subject}. - */ - connector: () => SubjectLike; -} -/** - * Creates an observable by multicasting the source within a function that - * allows the developer to define the usage of the multicast prior to connection. - * - * This is particularly useful if the observable source you wish to multicast could - * be synchronous or asynchronous. This sets it apart from {@link share}, which, in the - * case of totally synchronous sources will fail to share a single subscription with - * multiple consumers, as by the time the subscription to the result of {@link share} - * has returned, if the source is synchronous its internal reference count will jump from - * 0 to 1 back to 0 and reset. - * - * To use `connect`, you provide a `selector` function that will give you - * a multicast observable that is not yet connected. You then use that multicast observable - * to create a resulting observable that, when subscribed, will set up your multicast. This is - * generally, but not always, accomplished with {@link merge}. - * - * Note that using a {@link takeUntil} inside of `connect`'s `selector` _might_ mean you were looking - * to use the {@link takeWhile} operator instead. - * - * When you subscribe to the result of `connect`, the `selector` function will be called. After - * the `selector` function returns, the observable it returns will be subscribed to, _then_ the - * multicast will be connected to the source. - * - * ## Example - * - * Sharing a totally synchronous observable - * - * ```ts - * import { of, tap, connect, merge, map, filter } from 'rxjs'; - * - * const source$ = of(1, 2, 3, 4, 5).pipe( - * tap({ - * subscribe: () => console.log('subscription started'), - * next: n => console.log(`source emitted ${ n }`) - * }) - * ); - * - * source$.pipe( - * // Notice in here we're merging 3 subscriptions to `shared$`. - * connect(shared$ => merge( - * shared$.pipe(map(n => `all ${ n }`)), - * shared$.pipe(filter(n => n % 2 === 0), map(n => `even ${ n }`)), - * shared$.pipe(filter(n => n % 2 === 1), map(n => `odd ${ n }`)) - * )) - * ) - * .subscribe(console.log); - * - * // Expected output: (notice only one subscription) - * 'subscription started' - * 'source emitted 1' - * 'all 1' - * 'odd 1' - * 'source emitted 2' - * 'all 2' - * 'even 2' - * 'source emitted 3' - * 'all 3' - * 'odd 3' - * 'source emitted 4' - * 'all 4' - * 'even 4' - * 'source emitted 5' - * 'all 5' - * 'odd 5' - * ``` - * - * @param selector A function used to set up the multicast. Gives you a multicast observable - * that is not yet connected. With that, you're expected to create and return - * and Observable, that when subscribed to, will utilize the multicast observable. - * After this function is executed -- and its return value subscribed to -- the - * operator will subscribe to the source, and the connection will be made. - * @param config The configuration object for `connect`. - */ -export declare function connect>(selector: (shared: Observable) => O, config?: ConnectConfig): OperatorFunction>; -//# sourceMappingURL=connect.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/connect.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/connect.d.ts.map deleted file mode 100644 index 30b97e6..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/connect.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/connect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C;;GAEG;AACH,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B;;;OAGG;IACH,SAAS,EAAE,MAAM,WAAW,CAAC,CAAC,CAAC,CAAC;CACjC;AASD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAC3D,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,EACtC,MAAM,GAAE,aAAa,CAAC,CAAC,CAAkB,GACxC,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAOzC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/count.d.ts b/node_modules/rxjs/dist/types/internal/operators/count.d.ts deleted file mode 100644 index 67b8e8c..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/count.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { OperatorFunction } from '../types'; -/** - * Counts the number of emissions on the source and emits that number when the - * source completes. - * - * Tells how many values were emitted, when the source - * completes. - * - * ![](count.png) - * - * `count` transforms an Observable that emits values into an Observable that - * emits a single value that represents the number of values emitted by the - * source Observable. If the source Observable terminates with an error, `count` - * will pass this error notification along without emitting a value first. If - * the source Observable does not terminate at all, `count` will neither emit - * a value nor terminate. This operator takes an optional `predicate` function - * as argument, in which case the output emission will represent the number of - * source values that matched `true` with the `predicate`. - * - * ## Examples - * - * Counts how many seconds have passed before the first click happened - * - * ```ts - * import { interval, fromEvent, takeUntil, count } from 'rxjs'; - * - * const seconds = interval(1000); - * const clicks = fromEvent(document, 'click'); - * const secondsBeforeClick = seconds.pipe(takeUntil(clicks)); - * const result = secondsBeforeClick.pipe(count()); - * result.subscribe(x => console.log(x)); - * ``` - * - * Counts how many odd numbers are there between 1 and 7 - * - * ```ts - * import { range, count } from 'rxjs'; - * - * const numbers = range(1, 7); - * const result = numbers.pipe(count(i => i % 2 === 1)); - * result.subscribe(x => console.log(x)); - * // Results in: - * // 4 - * ``` - * - * @see {@link max} - * @see {@link min} - * @see {@link reduce} - * - * @param predicate A function that is used to analyze the value and the index and - * determine whether or not to increment the count. Return `true` to increment the count, - * and return `false` to keep the count the same. - * If the predicate is not provided, every value will be counted. - * @return A function that returns an Observable that emits one number that - * represents the count of emissions. - */ -export declare function count(predicate?: (value: T, index: number) => boolean): OperatorFunction; -//# sourceMappingURL=count.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/count.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/count.d.ts.map deleted file mode 100644 index 4ecfac5..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/count.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"count.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/count.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,GAAG,gBAAgB,CAAC,CAAC,EAAE,MAAM,CAAC,CAEtG"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/debounce.d.ts b/node_modules/rxjs/dist/types/internal/operators/debounce.d.ts deleted file mode 100644 index e067a8c..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/debounce.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { MonoTypeOperatorFunction, ObservableInput } from '../types'; -/** - * Emits a notification from the source Observable only after a particular time span - * determined by another Observable has passed without another source emission. - * - * It's like {@link debounceTime}, but the time span of - * emission silence is determined by a second Observable. - * - * ![](debounce.svg) - * - * `debounce` delays notifications emitted by the source Observable, but drops previous - * pending delayed emissions if a new notification arrives on the source Observable. - * This operator keeps track of the most recent notification from the source - * Observable, and spawns a duration Observable by calling the - * `durationSelector` function. The notification is emitted only when the duration - * Observable emits a next notification, and if no other notification was emitted on - * the source Observable since the duration Observable was spawned. If a new - * notification appears before the duration Observable emits, the previous notification will - * not be emitted and a new duration is scheduled from `durationSelector` is scheduled. - * If the completing event happens during the scheduled duration the last cached notification - * is emitted before the completion event is forwarded to the output observable. - * If the error event happens during the scheduled duration or after it only the error event is - * forwarded to the output observable. The cache notification is not emitted in this case. - * - * Like {@link debounceTime}, this is a rate-limiting operator, and also a - * delay-like operator since output emissions do not necessarily occur at the - * same time as they did on the source Observable. - * - * ## Example - * - * Emit the most recent click after a burst of clicks - * - * ```ts - * import { fromEvent, scan, debounce, interval } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe( - * scan(i => ++i, 1), - * debounce(i => interval(200 * i)) - * ); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link audit} - * @see {@link auditTime} - * @see {@link debounceTime} - * @see {@link delay} - * @see {@link sample} - * @see {@link sampleTime} - * @see {@link throttle} - * @see {@link throttleTime} - * - * @param durationSelector A function - * that receives a value from the source Observable, for computing the timeout - * duration for each source value, returned as an Observable or a Promise. - * @return A function that returns an Observable that delays the emissions of - * the source Observable by the specified duration Observable returned by - * `durationSelector`, and may drop some values if they occur too frequently. - */ -export declare function debounce(durationSelector: (value: T) => ObservableInput): MonoTypeOperatorFunction; -//# sourceMappingURL=debounce.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/debounce.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/debounce.d.ts.map deleted file mode 100644 index d8bf354..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/debounce.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/debounce.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAMrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,eAAe,CAAC,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAqD7G"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/debounceTime.d.ts b/node_modules/rxjs/dist/types/internal/operators/debounceTime.d.ts deleted file mode 100644 index 725ccea..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/debounceTime.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; -/** - * Emits a notification from the source Observable only after a particular time span - * has passed without another source emission. - * - * It's like {@link delay}, but passes only the most - * recent notification from each burst of emissions. - * - * ![](debounceTime.png) - * - * `debounceTime` delays notifications emitted by the source Observable, but drops - * previous pending delayed emissions if a new notification arrives on the source - * Observable. This operator keeps track of the most recent notification from the - * source Observable, and emits that only when `dueTime` has passed - * without any other notification appearing on the source Observable. If a new value - * appears before `dueTime` silence occurs, the previous notification will be dropped - * and will not be emitted and a new `dueTime` is scheduled. - * If the completing event happens during `dueTime` the last cached notification - * is emitted before the completion event is forwarded to the output observable. - * If the error event happens during `dueTime` or after it only the error event is - * forwarded to the output observable. The cache notification is not emitted in this case. - * - * This is a rate-limiting operator, because it is impossible for more than one - * notification to be emitted in any time window of duration `dueTime`, but it is also - * a delay-like operator since output emissions do not occur at the same time as - * they did on the source Observable. Optionally takes a {@link SchedulerLike} for - * managing timers. - * - * ## Example - * - * Emit the most recent click after a burst of clicks - * - * ```ts - * import { fromEvent, debounceTime } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe(debounceTime(1000)); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link audit} - * @see {@link auditTime} - * @see {@link debounce} - * @see {@link sample} - * @see {@link sampleTime} - * @see {@link throttle} - * @see {@link throttleTime} - * - * @param dueTime The timeout duration in milliseconds (or the time unit determined - * internally by the optional `scheduler`) for the window of time required to wait - * for emission silence before emitting the most recent source value. - * @param scheduler The {@link SchedulerLike} to use for managing the timers that - * handle the timeout for each value. - * @return A function that returns an Observable that delays the emissions of - * the source Observable by the specified `dueTime`, and may drop some values - * if they occur too frequently. - */ -export declare function debounceTime(dueTime: number, scheduler?: SchedulerLike): MonoTypeOperatorFunction; -//# sourceMappingURL=debounceTime.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/debounceTime.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/debounceTime.d.ts.map deleted file mode 100644 index 043bfe2..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/debounceTime.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"debounceTime.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/debounceTime.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAmB,aAAa,EAAE,MAAM,UAAU,CAAC;AAIpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAE,aAA8B,GAAG,wBAAwB,CAAC,CAAC,CAAC,CA4DvH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/defaultIfEmpty.d.ts b/node_modules/rxjs/dist/types/internal/operators/defaultIfEmpty.d.ts deleted file mode 100644 index afbd629..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/defaultIfEmpty.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { OperatorFunction } from '../types'; -/** - * Emits a given value if the source Observable completes without emitting any - * `next` value, otherwise mirrors the source Observable. - * - * If the source Observable turns out to be empty, then - * this operator will emit a default value. - * - * ![](defaultIfEmpty.png) - * - * `defaultIfEmpty` emits the values emitted by the source Observable or a - * specified default value if the source Observable is empty (completes without - * having emitted any `next` value). - * - * ## Example - * - * If no clicks happen in 5 seconds, then emit 'no clicks' - * - * ```ts - * import { fromEvent, takeUntil, interval, defaultIfEmpty } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const clicksBeforeFive = clicks.pipe(takeUntil(interval(5000))); - * const result = clicksBeforeFive.pipe(defaultIfEmpty('no clicks')); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link empty} - * @see {@link last} - * - * @param defaultValue The default value used if the source - * Observable is empty. - * @return A function that returns an Observable that emits either the - * specified `defaultValue` if the source Observable emits no items, or the - * values emitted by the source Observable. - */ -export declare function defaultIfEmpty(defaultValue: R): OperatorFunction; -//# sourceMappingURL=defaultIfEmpty.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/defaultIfEmpty.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/defaultIfEmpty.d.ts.map deleted file mode 100644 index 3c4aeac..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/defaultIfEmpty.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defaultIfEmpty.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/defaultIfEmpty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAmBhF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/delay.d.ts b/node_modules/rxjs/dist/types/internal/operators/delay.d.ts deleted file mode 100644 index 8dec47a..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/delay.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; -/** - * Delays the emission of items from the source Observable by a given timeout or - * until a given Date. - * - * Time shifts each item by some specified amount of - * milliseconds. - * - * ![](delay.svg) - * - * If the delay argument is a Number, this operator time shifts the source - * Observable by that amount of time expressed in milliseconds. The relative - * time intervals between the values are preserved. - * - * If the delay argument is a Date, this operator time shifts the start of the - * Observable execution until the given date occurs. - * - * ## Examples - * - * Delay each click by one second - * - * ```ts - * import { fromEvent, delay } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const delayedClicks = clicks.pipe(delay(1000)); // each click emitted after 1 second - * delayedClicks.subscribe(x => console.log(x)); - * ``` - * - * Delay all clicks until a future date happens - * - * ```ts - * import { fromEvent, delay } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const date = new Date('March 15, 2050 12:00:00'); // in the future - * const delayedClicks = clicks.pipe(delay(date)); // click emitted only after that date - * delayedClicks.subscribe(x => console.log(x)); - * ``` - * - * @see {@link delayWhen} - * @see {@link throttle} - * @see {@link throttleTime} - * @see {@link debounce} - * @see {@link debounceTime} - * @see {@link sample} - * @see {@link sampleTime} - * @see {@link audit} - * @see {@link auditTime} - * - * @param due The delay duration in milliseconds (a `number`) or a `Date` until - * which the emission of the source items is delayed. - * @param scheduler The {@link SchedulerLike} to use for managing the timers - * that handle the time-shift for each item. - * @return A function that returns an Observable that delays the emissions of - * the source Observable by the specified timeout or Date. - */ -export declare function delay(due: number | Date, scheduler?: SchedulerLike): MonoTypeOperatorFunction; -//# sourceMappingURL=delay.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/delay.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/delay.d.ts.map deleted file mode 100644 index 46efccb..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/delay.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"delay.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/delay.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAInE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,GAAE,aAA8B,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAGnH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/delayWhen.d.ts b/node_modules/rxjs/dist/types/internal/operators/delayWhen.d.ts deleted file mode 100644 index c9d6289..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/delayWhen.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Observable } from '../Observable'; -import { MonoTypeOperatorFunction, ObservableInput } from '../types'; -/** @deprecated The `subscriptionDelay` parameter will be removed in v8. */ -export declare function delayWhen(delayDurationSelector: (value: T, index: number) => ObservableInput, subscriptionDelay: Observable): MonoTypeOperatorFunction; -export declare function delayWhen(delayDurationSelector: (value: T, index: number) => ObservableInput): MonoTypeOperatorFunction; -//# sourceMappingURL=delayWhen.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/delayWhen.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/delayWhen.d.ts.map deleted file mode 100644 index f61e807..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/delayWhen.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"delayWhen.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/delayWhen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAQrE,2EAA2E;AAC3E,wBAAgB,SAAS,CAAC,CAAC,EACzB,qBAAqB,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,eAAe,CAAC,GAAG,CAAC,EACxE,iBAAiB,EAAE,UAAU,CAAC,GAAG,CAAC,GACjC,wBAAwB,CAAC,CAAC,CAAC,CAAC;AAC/B,wBAAgB,SAAS,CAAC,CAAC,EAAE,qBAAqB,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,eAAe,CAAC,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/dematerialize.d.ts b/node_modules/rxjs/dist/types/internal/operators/dematerialize.d.ts deleted file mode 100644 index b5a3949..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/dematerialize.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { OperatorFunction, ObservableNotification, ValueFromNotification } from '../types'; -/** - * Converts an Observable of {@link ObservableNotification} objects into the emissions - * that they represent. - * - * Unwraps {@link ObservableNotification} objects as actual `next`, - * `error` and `complete` emissions. The opposite of {@link materialize}. - * - * ![](dematerialize.png) - * - * `dematerialize` is assumed to operate an Observable that only emits - * {@link ObservableNotification} objects as `next` emissions, and does not emit any - * `error`. Such Observable is the output of a `materialize` operation. Those - * notifications are then unwrapped using the metadata they contain, and emitted - * as `next`, `error`, and `complete` on the output Observable. - * - * Use this operator in conjunction with {@link materialize}. - * - * ## Example - * - * Convert an Observable of Notifications to an actual Observable - * - * ```ts - * import { NextNotification, ErrorNotification, of, dematerialize } from 'rxjs'; - * - * const notifA: NextNotification = { kind: 'N', value: 'A' }; - * const notifB: NextNotification = { kind: 'N', value: 'B' }; - * const notifE: ErrorNotification = { kind: 'E', error: new TypeError('x.toUpperCase is not a function') }; - * - * const materialized = of(notifA, notifB, notifE); - * - * const upperCase = materialized.pipe(dematerialize()); - * upperCase.subscribe({ - * next: x => console.log(x), - * error: e => console.error(e) - * }); - * - * // Results in: - * // A - * // B - * // TypeError: x.toUpperCase is not a function - * ``` - * - * @see {@link materialize} - * - * @return A function that returns an Observable that emits items and - * notifications embedded in Notification objects emitted by the source - * Observable. - */ -export declare function dematerialize>(): OperatorFunction>; -//# sourceMappingURL=dematerialize.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/dematerialize.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/dematerialize.d.ts.map deleted file mode 100644 index 396d0d9..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/dematerialize.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dematerialize.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/dematerialize.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAI3F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,sBAAsB,CAAC,GAAG,CAAC,KAAK,gBAAgB,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAIpH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/distinct.d.ts b/node_modules/rxjs/dist/types/internal/operators/distinct.d.ts deleted file mode 100644 index d9346e7..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/distinct.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { MonoTypeOperatorFunction, ObservableInput } from '../types'; -/** - * Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from previous items. - * - * If a `keySelector` function is provided, then it will project each value from the source observable into a new value that it will - * check for equality with previously projected values. If the `keySelector` function is not provided, it will use each value from the - * source observable directly with an equality check against previous values. - * - * In JavaScript runtimes that support `Set`, this operator will use a `Set` to improve performance of the distinct value checking. - * - * In other runtimes, this operator will use a minimal implementation of `Set` that relies on an `Array` and `indexOf` under the - * hood, so performance will degrade as more values are checked for distinction. Even in newer browsers, a long-running `distinct` - * use might result in memory leaks. To help alleviate this in some scenarios, an optional `flushes` parameter is also provided so - * that the internal `Set` can be "flushed", basically clearing it of values. - * - * ## Examples - * - * A simple example with numbers - * - * ```ts - * import { of, distinct } from 'rxjs'; - * - * of(1, 1, 2, 2, 2, 1, 2, 3, 4, 3, 2, 1) - * .pipe(distinct()) - * .subscribe(x => console.log(x)); - * - * // Outputs - * // 1 - * // 2 - * // 3 - * // 4 - * ``` - * - * An example using the `keySelector` function - * - * ```ts - * import { of, distinct } from 'rxjs'; - * - * of( - * { age: 4, name: 'Foo'}, - * { age: 7, name: 'Bar'}, - * { age: 5, name: 'Foo'} - * ) - * .pipe(distinct(({ name }) => name)) - * .subscribe(x => console.log(x)); - * - * // Outputs - * // { age: 4, name: 'Foo' } - * // { age: 7, name: 'Bar' } - * ``` - * @see {@link distinctUntilChanged} - * @see {@link distinctUntilKeyChanged} - * - * @param keySelector Optional `function` to select which value you want to check as distinct. - * @param flushes Optional `ObservableInput` for flushing the internal HashSet of the operator. - * @return A function that returns an Observable that emits items from the - * source Observable with distinct values. - */ -export declare function distinct(keySelector?: (value: T) => K, flushes?: ObservableInput): MonoTypeOperatorFunction; -//# sourceMappingURL=distinct.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/distinct.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/distinct.d.ts.map deleted file mode 100644 index 9049e6a..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/distinct.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"distinct.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/distinct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAMrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,EAAE,eAAe,CAAC,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAezH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/distinctUntilChanged.d.ts b/node_modules/rxjs/dist/types/internal/operators/distinctUntilChanged.d.ts deleted file mode 100644 index 8394fa6..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/distinctUntilChanged.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { MonoTypeOperatorFunction } from '../types'; -export declare function distinctUntilChanged(comparator?: (previous: T, current: T) => boolean): MonoTypeOperatorFunction; -export declare function distinctUntilChanged(comparator: (previous: K, current: K) => boolean, keySelector: (value: T) => K): MonoTypeOperatorFunction; -//# sourceMappingURL=distinctUntilChanged.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/distinctUntilChanged.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/distinctUntilChanged.d.ts.map deleted file mode 100644 index 0a0f530..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/distinctUntilChanged.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"distinctUntilChanged.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/distinctUntilChanged.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAKpD,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,KAAK,OAAO,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;AACxH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,CAAC,EACvC,UAAU,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,KAAK,OAAO,EAChD,WAAW,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAC3B,wBAAwB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/distinctUntilKeyChanged.d.ts b/node_modules/rxjs/dist/types/internal/operators/distinctUntilKeyChanged.d.ts deleted file mode 100644 index 4c054c8..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/distinctUntilKeyChanged.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { MonoTypeOperatorFunction } from '../types'; -export declare function distinctUntilKeyChanged(key: keyof T): MonoTypeOperatorFunction; -export declare function distinctUntilKeyChanged(key: K, compare: (x: T[K], y: T[K]) => boolean): MonoTypeOperatorFunction; -//# sourceMappingURL=distinctUntilKeyChanged.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/distinctUntilKeyChanged.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/distinctUntilKeyChanged.d.ts.map deleted file mode 100644 index 0fe179e..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/distinctUntilKeyChanged.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"distinctUntilKeyChanged.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/distinctUntilKeyChanged.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAEpD,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;AACtF,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/elementAt.d.ts b/node_modules/rxjs/dist/types/internal/operators/elementAt.d.ts deleted file mode 100644 index 999e796..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/elementAt.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { OperatorFunction } from '../types'; -/** - * Emits the single value at the specified `index` in a sequence of emissions - * from the source Observable. - * - * Emits only the i-th value, then completes. - * - * ![](elementAt.png) - * - * `elementAt` returns an Observable that emits the item at the specified - * `index` in the source Observable, or a default value if that `index` is out - * of range and the `default` argument is provided. If the `default` argument is - * not given and the `index` is out of range, the output Observable will emit an - * `ArgumentOutOfRangeError` error. - * - * ## Example - * - * Emit only the third click event - * - * ```ts - * import { fromEvent, elementAt } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe(elementAt(2)); - * result.subscribe(x => console.log(x)); - * - * // Results in: - * // click 1 = nothing - * // click 2 = nothing - * // click 3 = MouseEvent object logged to console - * ``` - * - * @see {@link first} - * @see {@link last} - * @see {@link skip} - * @see {@link single} - * @see {@link take} - * - * @throws {ArgumentOutOfRangeError} When using `elementAt(i)`, it delivers an - * `ArgumentOutOfRangeError` to the Observer's `error` callback if `i < 0` or the - * Observable has completed before emitting the i-th `next` notification. - * - * @param index Is the number `i` for the i-th source emission that has happened - * since the subscription, starting from the number `0`. - * @param defaultValue The default value returned for missing indices. - * @return A function that returns an Observable that emits a single item, if - * it is found. Otherwise, it will emit the default value if given. If not, it - * emits an error. - */ -export declare function elementAt(index: number, defaultValue?: D): OperatorFunction; -//# sourceMappingURL=elementAt.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/elementAt.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/elementAt.d.ts.map deleted file mode 100644 index dafa75c..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/elementAt.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"elementAt.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/elementAt.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAM5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAW/F"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/endWith.d.ts b/node_modules/rxjs/dist/types/internal/operators/endWith.d.ts deleted file mode 100644 index 25236a5..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/endWith.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { MonoTypeOperatorFunction, SchedulerLike, OperatorFunction, ValueFromArray } from '../types'; -/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `concatAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ -export declare function endWith(scheduler: SchedulerLike): MonoTypeOperatorFunction; -/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `concatAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ -export declare function endWith(...valuesAndScheduler: [...A, SchedulerLike]): OperatorFunction>; -export declare function endWith(...values: A): OperatorFunction>; -//# sourceMappingURL=endWith.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/endWith.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/endWith.d.ts.map deleted file mode 100644 index 9ee0e7e..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/endWith.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"endWith.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/endWith.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAErG,8JAA8J;AAC9J,wBAAgB,OAAO,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;AAClF,8JAA8J;AAC9J,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,OAAO,EAAE,GAAG,CAAC,EAAE,EAClD,GAAG,kBAAkB,EAAE,CAAC,GAAG,CAAC,EAAE,aAAa,CAAC,GAC3C,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9C,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,OAAO,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/every.d.ts b/node_modules/rxjs/dist/types/internal/operators/every.d.ts deleted file mode 100644 index 29e2654..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/every.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Observable } from '../Observable'; -import { Falsy, OperatorFunction } from '../types'; -export declare function every(predicate: BooleanConstructor): OperatorFunction extends never ? false : boolean>; -/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ -export declare function every(predicate: BooleanConstructor, thisArg: any): OperatorFunction extends never ? false : boolean>; -/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ -export declare function every(predicate: (this: A, value: T, index: number, source: Observable) => boolean, thisArg: A): OperatorFunction; -export declare function every(predicate: (value: T, index: number, source: Observable) => boolean): OperatorFunction; -//# sourceMappingURL=every.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/every.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/every.d.ts.map deleted file mode 100644 index 313a35c..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/every.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"every.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/every.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAInD,wBAAgB,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,KAAK,GAAG,KAAK,GAAG,OAAO,CAAC,CAAC;AAChI,gHAAgH;AAChH,wBAAgB,KAAK,CAAC,CAAC,EACrB,SAAS,EAAE,kBAAkB,EAC7B,OAAO,EAAE,GAAG,GACX,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,KAAK,GAAG,KAAK,GAAG,OAAO,CAAC,CAAC;AAC1E,gHAAgH;AAChH,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,EACxB,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,EAC/E,OAAO,EAAE,CAAC,GACT,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;AAChC,wBAAgB,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,GAAG,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/exhaust.d.ts b/node_modules/rxjs/dist/types/internal/operators/exhaust.d.ts deleted file mode 100644 index 6379212..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/exhaust.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { exhaustAll } from './exhaustAll'; -/** - * @deprecated Renamed to {@link exhaustAll}. Will be removed in v8. - */ -export declare const exhaust: typeof exhaustAll; -//# sourceMappingURL=exhaust.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/exhaust.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/exhaust.d.ts.map deleted file mode 100644 index 6bf5832..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/exhaust.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exhaust.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/exhaust.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,OAAO,mBAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/exhaustAll.d.ts b/node_modules/rxjs/dist/types/internal/operators/exhaustAll.d.ts deleted file mode 100644 index fa22a01..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/exhaustAll.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { OperatorFunction, ObservableInput, ObservedValueOf } from '../types'; -/** - * Converts a higher-order Observable into a first-order Observable by dropping - * inner Observables while the previous inner Observable has not yet completed. - * - * Flattens an Observable-of-Observables by dropping the - * next inner Observables while the current inner is still executing. - * - * ![](exhaustAll.svg) - * - * `exhaustAll` subscribes to an Observable that emits Observables, also known as a - * higher-order Observable. Each time it observes one of these emitted inner - * Observables, the output Observable begins emitting the items emitted by that - * inner Observable. So far, it behaves like {@link mergeAll}. However, - * `exhaustAll` ignores every new inner Observable if the previous Observable has - * not yet completed. Once that one completes, it will accept and flatten the - * next inner Observable and repeat this process. - * - * ## Example - * - * Run a finite timer for each click, only if there is no currently active timer - * - * ```ts - * import { fromEvent, map, interval, take, exhaustAll } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const higherOrder = clicks.pipe( - * map(() => interval(1000).pipe(take(5))) - * ); - * const result = higherOrder.pipe(exhaustAll()); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link combineLatestAll} - * @see {@link concatAll} - * @see {@link switchAll} - * @see {@link switchMap} - * @see {@link mergeAll} - * @see {@link exhaustMap} - * @see {@link zipAll} - * - * @return A function that returns an Observable that takes a source of - * Observables and propagates the first Observable exclusively until it - * completes before subscribing to the next. - */ -export declare function exhaustAll>(): OperatorFunction>; -//# sourceMappingURL=exhaustAll.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/exhaustAll.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/exhaustAll.d.ts.map deleted file mode 100644 index ec23721..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/exhaustAll.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exhaustAll.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/exhaustAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,KAAK,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAEpG"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/exhaustMap.d.ts b/node_modules/rxjs/dist/types/internal/operators/exhaustMap.d.ts deleted file mode 100644 index 89ef188..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/exhaustMap.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; -export declare function exhaustMap>(project: (value: T, index: number) => O): OperatorFunction>; -/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ -export declare function exhaustMap>(project: (value: T, index: number) => O, resultSelector: undefined): OperatorFunction>; -/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ -export declare function exhaustMap(project: (value: T, index: number) => ObservableInput, resultSelector: (outerValue: T, innerValue: I, outerIndex: number, innerIndex: number) => R): OperatorFunction; -//# sourceMappingURL=exhaustMap.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/exhaustMap.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/exhaustMap.d.ts.map deleted file mode 100644 index afd740f..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/exhaustMap.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"exhaustMap.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/exhaustMap.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAO9E,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAC1D,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GACtC,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,0JAA0J;AAC1J,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAC1D,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EACvC,cAAc,EAAE,SAAS,GACxB,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,0JAA0J;AAC1J,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAChC,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,eAAe,CAAC,CAAC,CAAC,EACxD,cAAc,EAAE,CAAC,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC,GAC1F,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/expand.d.ts b/node_modules/rxjs/dist/types/internal/operators/expand.d.ts deleted file mode 100644 index 3972017..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/expand.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { OperatorFunction, ObservableInput, ObservedValueOf, SchedulerLike } from '../types'; -export declare function expand>(project: (value: T, index: number) => O, concurrent?: number, scheduler?: SchedulerLike): OperatorFunction>; -/** - * @deprecated The `scheduler` parameter will be removed in v8. If you need to schedule the inner subscription, - * use `subscribeOn` within the projection function: `expand((value) => fn(value).pipe(subscribeOn(scheduler)))`. - * Details: Details: https://rxjs.dev/deprecations/scheduler-argument - */ -export declare function expand>(project: (value: T, index: number) => O, concurrent: number | undefined, scheduler: SchedulerLike): OperatorFunction>; -//# sourceMappingURL=expand.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/expand.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/expand.d.ts.map deleted file mode 100644 index 76a7b90..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/expand.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"expand.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/expand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAK7F,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAC1D,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EACvC,UAAU,CAAC,EAAE,MAAM,EACnB,SAAS,CAAC,EAAE,aAAa,GACxB,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAC1D,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EACvC,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,SAAS,EAAE,aAAa,GACvB,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/filter.d.ts b/node_modules/rxjs/dist/types/internal/operators/filter.d.ts deleted file mode 100644 index ca45a23..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/filter.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { OperatorFunction, MonoTypeOperatorFunction, TruthyTypesOf } from '../types'; -/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ -export declare function filter(predicate: (this: A, value: T, index: number) => value is S, thisArg: A): OperatorFunction; -export declare function filter(predicate: (value: T, index: number) => value is S): OperatorFunction; -export declare function filter(predicate: BooleanConstructor): OperatorFunction>; -/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ -export declare function filter(predicate: (this: A, value: T, index: number) => boolean, thisArg: A): MonoTypeOperatorFunction; -export declare function filter(predicate: (value: T, index: number) => boolean): MonoTypeOperatorFunction; -//# sourceMappingURL=filter.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/filter.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/filter.d.ts.map deleted file mode 100644 index 8df64a4..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/filter.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIrF,gHAAgH;AAChH,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC3I,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,IAAI,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACnH,wBAAgB,MAAM,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AAChG,gHAAgH;AAChH,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,EAAE,OAAO,EAAE,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;AAChI,wBAAgB,MAAM,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/finalize.d.ts b/node_modules/rxjs/dist/types/internal/operators/finalize.d.ts deleted file mode 100644 index d0f334c..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/finalize.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { MonoTypeOperatorFunction } from '../types'; -/** - * Returns an Observable that mirrors the source Observable, but will call a specified function when - * the source terminates on complete or error. - * The specified function will also be called when the subscriber explicitly unsubscribes. - * - * ## Examples - * - * Execute callback function when the observable completes - * - * ```ts - * import { interval, take, finalize } from 'rxjs'; - * - * // emit value in sequence every 1 second - * const source = interval(1000); - * const example = source.pipe( - * take(5), //take only the first 5 values - * finalize(() => console.log('Sequence complete')) // Execute when the observable completes - * ); - * const subscribe = example.subscribe(val => console.log(val)); - * - * // results: - * // 0 - * // 1 - * // 2 - * // 3 - * // 4 - * // 'Sequence complete' - * ``` - * - * Execute callback function when the subscriber explicitly unsubscribes - * - * ```ts - * import { interval, finalize, tap, noop, timer } from 'rxjs'; - * - * const source = interval(100).pipe( - * finalize(() => console.log('[finalize] Called')), - * tap({ - * next: () => console.log('[next] Called'), - * error: () => console.log('[error] Not called'), - * complete: () => console.log('[tap complete] Not called') - * }) - * ); - * - * const sub = source.subscribe({ - * next: x => console.log(x), - * error: noop, - * complete: () => console.log('[complete] Not called') - * }); - * - * timer(150).subscribe(() => sub.unsubscribe()); - * - * // results: - * // '[next] Called' - * // 0 - * // '[finalize] Called' - * ``` - * - * @param callback Function to be called when source terminates. - * @return A function that returns an Observable that mirrors the source, but - * will call the specified function on termination. - */ -export declare function finalize(callback: () => void): MonoTypeOperatorFunction; -//# sourceMappingURL=finalize.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/finalize.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/finalize.d.ts.map deleted file mode 100644 index f427a73..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/finalize.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"finalize.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/finalize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAGpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAU7E"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/find.d.ts b/node_modules/rxjs/dist/types/internal/operators/find.d.ts deleted file mode 100644 index 0f89d5b..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/find.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Observable } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { OperatorFunction, TruthyTypesOf } from '../types'; -export declare function find(predicate: BooleanConstructor): OperatorFunction>; -/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ -export declare function find(predicate: (this: A, value: T, index: number, source: Observable) => value is S, thisArg: A): OperatorFunction; -export declare function find(predicate: (value: T, index: number, source: Observable) => value is S): OperatorFunction; -/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ -export declare function find(predicate: (this: A, value: T, index: number, source: Observable) => boolean, thisArg: A): OperatorFunction; -export declare function find(predicate: (value: T, index: number, source: Observable) => boolean): OperatorFunction; -export declare function createFind(predicate: (value: T, index: number, source: Observable) => boolean, thisArg: any, emit: 'value' | 'index'): (source: Observable, subscriber: Subscriber) => void; -//# sourceMappingURL=find.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/find.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/find.d.ts.map deleted file mode 100644 index c273b81..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/find.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/find.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAI3D,wBAAgB,IAAI,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9F,gHAAgH;AAChH,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,EACpC,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,EAClF,OAAO,EAAE,CAAC,GACT,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC;AACtC,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EACjC,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,GACxE,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC;AACtC,gHAAgH;AAChH,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EACvB,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,EAC/E,OAAO,EAAE,CAAC,GACT,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC;AACtC,wBAAgB,IAAI,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC;AAkDpI,wBAAgB,UAAU,CAAC,CAAC,EAC1B,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,EACtE,OAAO,EAAE,GAAG,EACZ,IAAI,EAAE,OAAO,GAAG,OAAO,YAGP,WAAW,CAAC,CAAC,cAAc,WAAW,GAAG,CAAC,UAmB3D"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/findIndex.d.ts b/node_modules/rxjs/dist/types/internal/operators/findIndex.d.ts deleted file mode 100644 index b0dc650..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/findIndex.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Observable } from '../Observable'; -import { Falsy, OperatorFunction } from '../types'; -export declare function findIndex(predicate: BooleanConstructor): OperatorFunction; -/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ -export declare function findIndex(predicate: BooleanConstructor, thisArg: any): OperatorFunction; -/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ -export declare function findIndex(predicate: (this: A, value: T, index: number, source: Observable) => boolean, thisArg: A): OperatorFunction; -export declare function findIndex(predicate: (value: T, index: number, source: Observable) => boolean): OperatorFunction; -//# sourceMappingURL=findIndex.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/findIndex.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/findIndex.d.ts.map deleted file mode 100644 index 7383ecd..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/findIndex.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"findIndex.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/findIndex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAInD,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,SAAS,KAAK,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;AAChH,gHAAgH;AAChH,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,OAAO,EAAE,GAAG,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,SAAS,KAAK,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;AAC9H,gHAAgH;AAChH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAC5B,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,EAC/E,OAAO,EAAE,CAAC,GACT,gBAAgB,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AAC/B,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,GAAG,gBAAgB,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/first.d.ts b/node_modules/rxjs/dist/types/internal/operators/first.d.ts deleted file mode 100644 index 1b7df1c..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/first.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Observable } from '../Observable'; -import { OperatorFunction, TruthyTypesOf } from '../types'; -export declare function first(predicate?: null, defaultValue?: D): OperatorFunction; -export declare function first(predicate: BooleanConstructor): OperatorFunction>; -export declare function first(predicate: BooleanConstructor, defaultValue: D): OperatorFunction | D>; -export declare function first(predicate: (value: T, index: number, source: Observable) => value is S, defaultValue?: S): OperatorFunction; -export declare function first(predicate: (value: T, index: number, source: Observable) => value is S, defaultValue: D): OperatorFunction; -export declare function first(predicate: (value: T, index: number, source: Observable) => boolean, defaultValue?: D): OperatorFunction; -//# sourceMappingURL=first.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/first.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/first.d.ts.map deleted file mode 100644 index 337c089..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/first.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"first.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/first.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAO3D,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC,EAAE,IAAI,EAAE,YAAY,CAAC,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AAChG,wBAAgB,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/F,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,YAAY,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AACvH,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EAClC,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,EACzE,YAAY,CAAC,EAAE,CAAC,GACf,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC1B,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,EACrC,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,EACzE,YAAY,EAAE,CAAC,GACd,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AAC9B,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAC5B,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,EACtE,YAAY,CAAC,EAAE,CAAC,GACf,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/flatMap.d.ts b/node_modules/rxjs/dist/types/internal/operators/flatMap.d.ts deleted file mode 100644 index 719fe58..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/flatMap.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { mergeMap } from './mergeMap'; -/** - * @deprecated Renamed to {@link mergeMap}. Will be removed in v8. - */ -export declare const flatMap: typeof mergeMap; -//# sourceMappingURL=flatMap.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/flatMap.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/flatMap.d.ts.map deleted file mode 100644 index 2177d97..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/flatMap.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"flatMap.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/flatMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;GAEG;AACH,eAAO,MAAM,OAAO,iBAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/groupBy.d.ts b/node_modules/rxjs/dist/types/internal/operators/groupBy.d.ts deleted file mode 100644 index 56aec0e..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/groupBy.d.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { Observable } from '../Observable'; -import { Subject } from '../Subject'; -import { ObservableInput, OperatorFunction, SubjectLike } from '../types'; -export interface BasicGroupByOptions { - element?: undefined; - duration?: (grouped: GroupedObservable) => ObservableInput; - connector?: () => SubjectLike; -} -export interface GroupByOptionsWithElement { - element: (value: T) => E; - duration?: (grouped: GroupedObservable) => ObservableInput; - connector?: () => SubjectLike; -} -export declare function groupBy(key: (value: T) => K, options: BasicGroupByOptions): OperatorFunction>; -export declare function groupBy(key: (value: T) => K, options: GroupByOptionsWithElement): OperatorFunction>; -export declare function groupBy(key: (value: T) => value is K): OperatorFunction | GroupedObservable>>; -export declare function groupBy(key: (value: T) => K): OperatorFunction>; -/** - * @deprecated use the options parameter instead. - */ -export declare function groupBy(key: (value: T) => K, element: void, duration: (grouped: GroupedObservable) => Observable): OperatorFunction>; -/** - * @deprecated use the options parameter instead. - */ -export declare function groupBy(key: (value: T) => K, element?: (value: T) => R, duration?: (grouped: GroupedObservable) => Observable): OperatorFunction>; -/** - * Groups the items emitted by an Observable according to a specified criterion, - * and emits these grouped items as `GroupedObservables`, one - * {@link GroupedObservable} per group. - * - * ![](groupBy.png) - * - * When the Observable emits an item, a key is computed for this item with the key function. - * - * If a {@link GroupedObservable} for this key exists, this {@link GroupedObservable} emits. Otherwise, a new - * {@link GroupedObservable} for this key is created and emits. - * - * A {@link GroupedObservable} represents values belonging to the same group represented by a common key. The common - * key is available as the `key` field of a {@link GroupedObservable} instance. - * - * The elements emitted by {@link GroupedObservable}s are by default the items emitted by the Observable, or elements - * returned by the element function. - * - * ## Examples - * - * Group objects by `id` and return as array - * - * ```ts - * import { of, groupBy, mergeMap, reduce } from 'rxjs'; - * - * of( - * { id: 1, name: 'JavaScript' }, - * { id: 2, name: 'Parcel' }, - * { id: 2, name: 'webpack' }, - * { id: 1, name: 'TypeScript' }, - * { id: 3, name: 'TSLint' } - * ).pipe( - * groupBy(p => p.id), - * mergeMap(group$ => group$.pipe(reduce((acc, cur) => [...acc, cur], []))) - * ) - * .subscribe(p => console.log(p)); - * - * // displays: - * // [{ id: 1, name: 'JavaScript' }, { id: 1, name: 'TypeScript'}] - * // [{ id: 2, name: 'Parcel' }, { id: 2, name: 'webpack'}] - * // [{ id: 3, name: 'TSLint' }] - * ``` - * - * Pivot data on the `id` field - * - * ```ts - * import { of, groupBy, mergeMap, reduce, map } from 'rxjs'; - * - * of( - * { id: 1, name: 'JavaScript' }, - * { id: 2, name: 'Parcel' }, - * { id: 2, name: 'webpack' }, - * { id: 1, name: 'TypeScript' }, - * { id: 3, name: 'TSLint' } - * ).pipe( - * groupBy(p => p.id, { element: p => p.name }), - * mergeMap(group$ => group$.pipe(reduce((acc, cur) => [...acc, cur], [`${ group$.key }`]))), - * map(arr => ({ id: parseInt(arr[0], 10), values: arr.slice(1) })) - * ) - * .subscribe(p => console.log(p)); - * - * // displays: - * // { id: 1, values: [ 'JavaScript', 'TypeScript' ] } - * // { id: 2, values: [ 'Parcel', 'webpack' ] } - * // { id: 3, values: [ 'TSLint' ] } - * ``` - * - * @param key A function that extracts the key - * for each item. - * @param element A function that extracts the - * return element for each item. - * @param duration - * A function that returns an Observable to determine how long each group should - * exist. - * @param connector Factory function to create an - * intermediate Subject through which grouped elements are emitted. - * @return A function that returns an Observable that emits GroupedObservables, - * each of which corresponds to a unique key value and each of which emits - * those items from the source Observable that share that key value. - * - * @deprecated Use the options parameter instead. - */ -export declare function groupBy(key: (value: T) => K, element?: (value: T) => R, duration?: (grouped: GroupedObservable) => Observable, connector?: () => Subject): OperatorFunction>; -/** - * An observable of values that is the emitted by the result of a {@link groupBy} operator, - * contains a `key` property for the grouping. - */ -export interface GroupedObservable extends Observable { - /** - * The key value for the grouped notifications. - */ - readonly key: K; -} -//# sourceMappingURL=groupBy.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/groupBy.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/groupBy.d.ts.map deleted file mode 100644 index 889877d..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/groupBy.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"groupBy.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/groupBy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,eAAe,EAAY,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAIpF,MAAM,WAAW,mBAAmB,CAAC,CAAC,EAAE,CAAC;IACvC,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,eAAe,CAAC,GAAG,CAAC,CAAC;IACtE,SAAS,CAAC,EAAE,MAAM,WAAW,CAAC,CAAC,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,yBAAyB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IAChD,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,eAAe,CAAC,GAAG,CAAC,CAAC;IACtE,SAAS,CAAC,EAAE,MAAM,WAAW,CAAC,CAAC,CAAC,CAAC;CAClC;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAEtI,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAC7B,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EACpB,OAAO,EAAE,yBAAyB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAC1C,gBAAgB,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAEhD,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EACpC,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,GAC5B,gBAAgB,CAAC,CAAC,EAAE,iBAAiB,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,iBAAiB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAE7F,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAElG;;GAEG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,EAC1B,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EACpB,OAAO,EAAE,IAAI,EACb,QAAQ,EAAE,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,UAAU,CAAC,GAAG,CAAC,GAC9D,gBAAgB,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAEhD;;GAEG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAC7B,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EACpB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EACzB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,UAAU,CAAC,GAAG,CAAC,GAC/D,gBAAgB,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAC7B,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EACpB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EACzB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,UAAU,CAAC,GAAG,CAAC,EAChE,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAC3B,gBAAgB,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AA6IhD;;;GAGG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAC;IAC5D;;OAEG;IACH,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;CACjB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/ignoreElements.d.ts b/node_modules/rxjs/dist/types/internal/operators/ignoreElements.d.ts deleted file mode 100644 index f852a52..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/ignoreElements.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { OperatorFunction } from '../types'; -/** - * Ignores all items emitted by the source Observable and only passes calls of `complete` or `error`. - * - * ![](ignoreElements.png) - * - * The `ignoreElements` operator suppresses all items emitted by the source Observable, - * but allows its termination notification (either `error` or `complete`) to pass through unchanged. - * - * If you do not care about the items being emitted by an Observable, but you do want to be notified - * when it completes or when it terminates with an error, you can apply the `ignoreElements` operator - * to the Observable, which will ensure that it will never call its observers’ `next` handlers. - * - * ## Example - * - * Ignore all `next` emissions from the source - * - * ```ts - * import { of, ignoreElements } from 'rxjs'; - * - * of('you', 'talking', 'to', 'me') - * .pipe(ignoreElements()) - * .subscribe({ - * next: word => console.log(word), - * error: err => console.log('error:', err), - * complete: () => console.log('the end'), - * }); - * - * // result: - * // 'the end' - * ``` - * - * @return A function that returns an empty Observable that only calls - * `complete` or `error`, based on which one is called by the source - * Observable. - */ -export declare function ignoreElements(): OperatorFunction; -//# sourceMappingURL=ignoreElements.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/ignoreElements.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/ignoreElements.d.ts.map deleted file mode 100644 index adeb20c..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/ignoreElements.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ignoreElements.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/ignoreElements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAK5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,cAAc,IAAI,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,CAIjE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/isEmpty.d.ts b/node_modules/rxjs/dist/types/internal/operators/isEmpty.d.ts deleted file mode 100644 index 6c35fdb..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/isEmpty.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { OperatorFunction } from '../types'; -/** - * Emits `false` if the input Observable emits any values, or emits `true` if the - * input Observable completes without emitting any values. - * - * Tells whether any values are emitted by an Observable. - * - * ![](isEmpty.png) - * - * `isEmpty` transforms an Observable that emits values into an Observable that - * emits a single boolean value representing whether or not any values were - * emitted by the source Observable. As soon as the source Observable emits a - * value, `isEmpty` will emit a `false` and complete. If the source Observable - * completes having not emitted anything, `isEmpty` will emit a `true` and - * complete. - * - * A similar effect could be achieved with {@link count}, but `isEmpty` can emit - * a `false` value sooner. - * - * ## Examples - * - * Emit `false` for a non-empty Observable - * - * ```ts - * import { Subject, isEmpty } from 'rxjs'; - * - * const source = new Subject(); - * const result = source.pipe(isEmpty()); - * - * source.subscribe(x => console.log(x)); - * result.subscribe(x => console.log(x)); - * - * source.next('a'); - * source.next('b'); - * source.next('c'); - * source.complete(); - * - * // Outputs - * // 'a' - * // false - * // 'b' - * // 'c' - * ``` - * - * Emit `true` for an empty Observable - * - * ```ts - * import { EMPTY, isEmpty } from 'rxjs'; - * - * const result = EMPTY.pipe(isEmpty()); - * result.subscribe(x => console.log(x)); - * - * // Outputs - * // true - * ``` - * - * @see {@link count} - * @see {@link EMPTY} - * - * @return A function that returns an Observable that emits boolean value - * indicating whether the source Observable was empty or not. - */ -export declare function isEmpty(): OperatorFunction; -//# sourceMappingURL=isEmpty.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/isEmpty.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/isEmpty.d.ts.map deleted file mode 100644 index d99bb3a..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/isEmpty.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isEmpty.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/isEmpty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,wBAAgB,OAAO,CAAC,CAAC,KAAK,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,CAgBzD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/joinAllInternals.d.ts b/node_modules/rxjs/dist/types/internal/operators/joinAllInternals.d.ts deleted file mode 100644 index 3e784f3..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/joinAllInternals.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Observable } from '../Observable'; -import { ObservableInput } from '../types'; -/** - * Collects all of the inner sources from source observable. Then, once the - * source completes, joins the values using the given static. - * - * This is used for {@link combineLatestAll} and {@link zipAll} which both have the - * same behavior of collecting all inner observables, then operating on them. - * - * @param joinFn The type of static join to apply to the sources collected - * @param project The projection function to apply to the values, if any - */ -export declare function joinAllInternals(joinFn: (sources: ObservableInput[]) => Observable, project?: (...args: any[]) => R): import("../types").UnaryFunction>, unknown>; -//# sourceMappingURL=joinAllInternals.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/joinAllInternals.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/joinAllInternals.d.ts.map deleted file mode 100644 index 54dda17..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/joinAllInternals.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"joinAllInternals.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/joinAllInternals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAoB,MAAM,UAAU,CAAC;AAO7D;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,UAAU,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,6EAU/H"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/last.d.ts b/node_modules/rxjs/dist/types/internal/operators/last.d.ts deleted file mode 100644 index ecbed43..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/last.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Observable } from '../Observable'; -import { OperatorFunction, TruthyTypesOf } from '../types'; -export declare function last(predicate: BooleanConstructor): OperatorFunction>; -export declare function last(predicate: BooleanConstructor, defaultValue: D): OperatorFunction | D>; -export declare function last(predicate?: null, defaultValue?: D): OperatorFunction; -export declare function last(predicate: (value: T, index: number, source: Observable) => value is S, defaultValue?: S): OperatorFunction; -export declare function last(predicate: (value: T, index: number, source: Observable) => boolean, defaultValue?: D): OperatorFunction; -//# sourceMappingURL=last.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/last.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/last.d.ts.map deleted file mode 100644 index c20a35b..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/last.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"last.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/last.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAO3D,wBAAgB,IAAI,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9F,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,YAAY,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AACtH,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,SAAS,CAAC,EAAE,IAAI,EAAE,YAAY,CAAC,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/F,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EACjC,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,EACzE,YAAY,CAAC,EAAE,CAAC,GACf,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC1B,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAC3B,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,EACtE,YAAY,CAAC,EAAE,CAAC,GACf,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/map.d.ts b/node_modules/rxjs/dist/types/internal/operators/map.d.ts deleted file mode 100644 index e302b61..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/map.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { OperatorFunction } from '../types'; -export declare function map(project: (value: T, index: number) => R): OperatorFunction; -/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ -export declare function map(project: (this: A, value: T, index: number) => R, thisArg: A): OperatorFunction; -//# sourceMappingURL=map.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/map.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/map.d.ts.map deleted file mode 100644 index ab43e40..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/map.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI5C,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC3F,gHAAgH;AAChH,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mapTo.d.ts b/node_modules/rxjs/dist/types/internal/operators/mapTo.d.ts deleted file mode 100644 index f3b8065..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/mapTo.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { OperatorFunction } from '../types'; -/** @deprecated To be removed in v9. Use {@link map} instead: `map(() => value)`. */ -export declare function mapTo(value: R): OperatorFunction; -/** - * @deprecated Do not specify explicit type parameters. Signatures with type parameters - * that cannot be inferred will be removed in v8. `mapTo` itself will be removed in v9, - * use {@link map} instead: `map(() => value)`. - * */ -export declare function mapTo(value: R): OperatorFunction; -//# sourceMappingURL=mapTo.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mapTo.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/mapTo.d.ts.map deleted file mode 100644 index df9402a..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/mapTo.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mapTo.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/mapTo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C,oFAAoF;AACpF,wBAAgB,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AACjE;;;;KAIK;AACL,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/materialize.d.ts b/node_modules/rxjs/dist/types/internal/operators/materialize.d.ts deleted file mode 100644 index 63f5032..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/materialize.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { Notification } from '../Notification'; -import { OperatorFunction, ObservableNotification } from '../types'; -/** - * Represents all of the notifications from the source Observable as `next` - * emissions marked with their original types within {@link Notification} - * objects. - * - * Wraps `next`, `error` and `complete` emissions in - * {@link Notification} objects, emitted as `next` on the output Observable. - * - * - * ![](materialize.png) - * - * `materialize` returns an Observable that emits a `next` notification for each - * `next`, `error`, or `complete` emission of the source Observable. When the - * source Observable emits `complete`, the output Observable will emit `next` as - * a Notification of type "complete", and then it will emit `complete` as well. - * When the source Observable emits `error`, the output will emit `next` as a - * Notification of type "error", and then `complete`. - * - * This operator is useful for producing metadata of the source Observable, to - * be consumed as `next` emissions. Use it in conjunction with - * {@link dematerialize}. - * - * ## Example - * - * Convert a faulty Observable to an Observable of Notifications - * - * ```ts - * import { of, materialize, map } from 'rxjs'; - * - * const letters = of('a', 'b', 13, 'd'); - * const upperCase = letters.pipe(map((x: any) => x.toUpperCase())); - * const materialized = upperCase.pipe(materialize()); - * - * materialized.subscribe(x => console.log(x)); - * - * // Results in the following: - * // - Notification { kind: 'N', value: 'A', error: undefined, hasValue: true } - * // - Notification { kind: 'N', value: 'B', error: undefined, hasValue: true } - * // - Notification { kind: 'E', value: undefined, error: TypeError { message: x.toUpperCase is not a function }, hasValue: false } - * ``` - * - * @see {@link Notification} - * @see {@link dematerialize} - * - * @return A function that returns an Observable that emits - * {@link Notification} objects that wrap the original emissions from the - * source Observable with metadata. - */ -export declare function materialize(): OperatorFunction & ObservableNotification>; -//# sourceMappingURL=materialize.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/materialize.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/materialize.d.ts.map deleted file mode 100644 index 8c88231..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/materialize.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"materialize.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/materialize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAIpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,wBAAgB,WAAW,CAAC,CAAC,KAAK,gBAAgB,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAmBjG"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/max.d.ts b/node_modules/rxjs/dist/types/internal/operators/max.d.ts deleted file mode 100644 index 0b37b45..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/max.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { MonoTypeOperatorFunction } from '../types'; -/** - * The `max` operator operates on an Observable that emits numbers (or items that - * can be compared with a provided function), and when source Observable completes - * it emits a single item: the item with the largest value. - * - * ![](max.png) - * - * ## Examples - * - * Get the maximal value of a series of numbers - * - * ```ts - * import { of, max } from 'rxjs'; - * - * of(5, 4, 7, 2, 8) - * .pipe(max()) - * .subscribe(x => console.log(x)); - * - * // Outputs - * // 8 - * ``` - * - * Use a comparer function to get the maximal item - * - * ```ts - * import { of, max } from 'rxjs'; - * - * of( - * { age: 7, name: 'Foo' }, - * { age: 5, name: 'Bar' }, - * { age: 9, name: 'Beer' } - * ).pipe( - * max((a, b) => a.age < b.age ? -1 : 1) - * ) - * .subscribe(x => console.log(x.name)); - * - * // Outputs - * // 'Beer' - * ``` - * - * @see {@link min} - * - * @param comparer Optional comparer function that it will use instead of its - * default to compare the value of two items. - * @return A function that returns an Observable that emits item with the - * largest value. - */ -export declare function max(comparer?: (x: T, y: T) => number): MonoTypeOperatorFunction; -//# sourceMappingURL=max.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/max.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/max.d.ts.map deleted file mode 100644 index 7e991b5..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/max.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"max.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/max.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAGpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAAM,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAErF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/merge.d.ts b/node_modules/rxjs/dist/types/internal/operators/merge.d.ts deleted file mode 100644 index a0b04bd..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/merge.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ObservableInputTuple, OperatorFunction, SchedulerLike } from '../types'; -/** @deprecated Replaced with {@link mergeWith}. Will be removed in v8. */ -export declare function merge(...sources: [...ObservableInputTuple]): OperatorFunction; -/** @deprecated Replaced with {@link mergeWith}. Will be removed in v8. */ -export declare function merge(...sourcesAndConcurrency: [...ObservableInputTuple, number]): OperatorFunction; -/** @deprecated Replaced with {@link mergeWith}. Will be removed in v8. */ -export declare function merge(...sourcesAndScheduler: [...ObservableInputTuple, SchedulerLike]): OperatorFunction; -/** @deprecated Replaced with {@link mergeWith}. Will be removed in v8. */ -export declare function merge(...sourcesAndConcurrencyAndScheduler: [...ObservableInputTuple, number, SchedulerLike]): OperatorFunction; -//# sourceMappingURL=merge.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/merge.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/merge.d.ts.map deleted file mode 100644 index f9c87e9..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/merge.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/merge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,oBAAoB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAMlG,0EAA0E;AAC1E,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACrI,0EAA0E;AAC1E,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EACnD,GAAG,qBAAqB,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,GAC7D,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACtC,0EAA0E;AAC1E,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EACnD,GAAG,mBAAmB,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,GAClE,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACtC,0EAA0E;AAC1E,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EACnD,GAAG,iCAAiC,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,GACxF,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mergeAll.d.ts b/node_modules/rxjs/dist/types/internal/operators/mergeAll.d.ts deleted file mode 100644 index 9d81681..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/mergeAll.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { OperatorFunction, ObservableInput, ObservedValueOf } from '../types'; -/** - * Converts a higher-order Observable into a first-order Observable which - * concurrently delivers all values that are emitted on the inner Observables. - * - * Flattens an Observable-of-Observables. - * - * ![](mergeAll.png) - * - * `mergeAll` subscribes to an Observable that emits Observables, also known as - * a higher-order Observable. Each time it observes one of these emitted inner - * Observables, it subscribes to that and delivers all the values from the - * inner Observable on the output Observable. The output Observable only - * completes once all inner Observables have completed. Any error delivered by - * a inner Observable will be immediately emitted on the output Observable. - * - * ## Examples - * - * Spawn a new interval Observable for each click event, and blend their outputs as one Observable - * - * ```ts - * import { fromEvent, map, interval, mergeAll } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const higherOrder = clicks.pipe(map(() => interval(1000))); - * const firstOrder = higherOrder.pipe(mergeAll()); - * - * firstOrder.subscribe(x => console.log(x)); - * ``` - * - * Count from 0 to 9 every second for each click, but only allow 2 concurrent timers - * - * ```ts - * import { fromEvent, map, interval, take, mergeAll } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const higherOrder = clicks.pipe( - * map(() => interval(1000).pipe(take(10))) - * ); - * const firstOrder = higherOrder.pipe(mergeAll(2)); - * - * firstOrder.subscribe(x => console.log(x)); - * ``` - * - * @see {@link combineLatestAll} - * @see {@link concatAll} - * @see {@link exhaustAll} - * @see {@link merge} - * @see {@link mergeMap} - * @see {@link mergeMapTo} - * @see {@link mergeScan} - * @see {@link switchAll} - * @see {@link switchMap} - * @see {@link zipAll} - * - * @param concurrent Maximum number of inner Observables being subscribed to - * concurrently. - * @return A function that returns an Observable that emits values coming from - * all the inner Observables emitted by the source Observable. - */ -export declare function mergeAll>(concurrent?: number): OperatorFunction>; -//# sourceMappingURL=mergeAll.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mergeAll.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/mergeAll.d.ts.map deleted file mode 100644 index def11cf..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/mergeAll.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mergeAll.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/mergeAll.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAAE,UAAU,GAAE,MAAiB,GAAG,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAE/H"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mergeInternals.d.ts b/node_modules/rxjs/dist/types/internal/operators/mergeInternals.d.ts deleted file mode 100644 index 14eed28..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/mergeInternals.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Observable } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { ObservableInput, SchedulerLike } from '../types'; -/** - * A process embodying the general "merge" strategy. This is used in - * `mergeMap` and `mergeScan` because the logic is otherwise nearly identical. - * @param source The original source observable - * @param subscriber The consumer subscriber - * @param project The projection function to get our inner sources - * @param concurrent The number of concurrent inner subscriptions - * @param onBeforeNext Additional logic to apply before nexting to our consumer - * @param expand If `true` this will perform an "expand" strategy, which differs only - * in that it recurses, and the inner subscription must be schedule-able. - * @param innerSubScheduler A scheduler to use to schedule inner subscriptions, - * this is to support the expand strategy, mostly, and should be deprecated - */ -export declare function mergeInternals(source: Observable, subscriber: Subscriber, project: (value: T, index: number) => ObservableInput, concurrent: number, onBeforeNext?: (innerValue: R) => void, expand?: boolean, innerSubScheduler?: SchedulerLike, additionalFinalizer?: () => void): () => void; -//# sourceMappingURL=mergeInternals.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mergeInternals.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/mergeInternals.d.ts.map deleted file mode 100644 index aa06e61..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/mergeInternals.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mergeInternals.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/mergeInternals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAI1D;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,EACjC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,EACrB,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,EACzB,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,eAAe,CAAC,CAAC,CAAC,EACxD,UAAU,EAAE,MAAM,EAClB,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,CAAC,KAAK,IAAI,EACtC,MAAM,CAAC,EAAE,OAAO,EAChB,iBAAiB,CAAC,EAAE,aAAa,EACjC,mBAAmB,CAAC,EAAE,MAAM,IAAI,cAwHjC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mergeMap.d.ts b/node_modules/rxjs/dist/types/internal/operators/mergeMap.d.ts deleted file mode 100644 index 046ee28..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/mergeMap.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; -export declare function mergeMap>(project: (value: T, index: number) => O, concurrent?: number): OperatorFunction>; -/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ -export declare function mergeMap>(project: (value: T, index: number) => O, resultSelector: undefined, concurrent?: number): OperatorFunction>; -/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ -export declare function mergeMap>(project: (value: T, index: number) => O, resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R, concurrent?: number): OperatorFunction; -//# sourceMappingURL=mergeMap.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mergeMap.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/mergeMap.d.ts.map deleted file mode 100644 index 0b97057..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/mergeMap.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mergeMap.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/mergeMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAQ9E,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EACxD,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EACvC,UAAU,CAAC,EAAE,MAAM,GAClB,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,0JAA0J;AAC1J,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EACxD,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EACvC,cAAc,EAAE,SAAS,EACzB,UAAU,CAAC,EAAE,MAAM,GAClB,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,0JAA0J;AAC1J,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAC3D,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EACvC,cAAc,EAAE,CAAC,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC,EAC5G,UAAU,CAAC,EAAE,MAAM,GAClB,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mergeMapTo.d.ts b/node_modules/rxjs/dist/types/internal/operators/mergeMapTo.d.ts deleted file mode 100644 index 81658e8..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/mergeMapTo.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { OperatorFunction, ObservedValueOf, ObservableInput } from '../types'; -/** @deprecated Will be removed in v9. Use {@link mergeMap} instead: `mergeMap(() => result)` */ -export declare function mergeMapTo>(innerObservable: O, concurrent?: number): OperatorFunction>; -/** - * @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. - * Details: https://rxjs.dev/deprecations/resultSelector - */ -export declare function mergeMapTo>(innerObservable: O, resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R, concurrent?: number): OperatorFunction; -//# sourceMappingURL=mergeMapTo.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mergeMapTo.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/mergeMapTo.d.ts.map deleted file mode 100644 index 408482f..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/mergeMapTo.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mergeMapTo.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/mergeMapTo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI9E,gGAAgG;AAChG,wBAAgB,UAAU,CAAC,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAC3D,eAAe,EAAE,CAAC,EAClB,UAAU,CAAC,EAAE,MAAM,GAClB,gBAAgB,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AACjD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EACjE,eAAe,EAAE,CAAC,EAClB,cAAc,EAAE,CAAC,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC,EAC5G,UAAU,CAAC,EAAE,MAAM,GAClB,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mergeScan.d.ts b/node_modules/rxjs/dist/types/internal/operators/mergeScan.d.ts deleted file mode 100644 index 1aacea7..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/mergeScan.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { ObservableInput, OperatorFunction } from '../types'; -/** - * Applies an accumulator function over the source Observable where the - * accumulator function itself returns an Observable, then each intermediate - * Observable returned is merged into the output Observable. - * - * It's like {@link scan}, but the Observables returned - * by the accumulator are merged into the outer Observable. - * - * The first parameter of the `mergeScan` is an `accumulator` function which is - * being called every time the source Observable emits a value. `mergeScan` will - * subscribe to the value returned by the `accumulator` function and will emit - * values to the subscriber emitted by inner Observable. - * - * The `accumulator` function is being called with three parameters passed to it: - * `acc`, `value` and `index`. The `acc` parameter is used as the state parameter - * whose value is initially set to the `seed` parameter (the second parameter - * passed to the `mergeScan` operator). - * - * `mergeScan` internally keeps the value of the `acc` parameter: as long as the - * source Observable emits without inner Observable emitting, the `acc` will be - * set to `seed`. The next time the inner Observable emits a value, `mergeScan` - * will internally remember it and it will be passed to the `accumulator` - * function as `acc` parameter the next time source emits. - * - * The `value` parameter of the `accumulator` function is the value emitted by the - * source Observable, while the `index` is a number which represent the order of the - * current emission by the source Observable. It starts with 0. - * - * The last parameter to the `mergeScan` is the `concurrent` value which defaults - * to Infinity. It represents the maximum number of inner Observable subscriptions - * at a time. - * - * ## Example - * - * Count the number of click events - * - * ```ts - * import { fromEvent, map, mergeScan, of } from 'rxjs'; - * - * const click$ = fromEvent(document, 'click'); - * const one$ = click$.pipe(map(() => 1)); - * const seed = 0; - * const count$ = one$.pipe( - * mergeScan((acc, one) => of(acc + one), seed) - * ); - * - * count$.subscribe(x => console.log(x)); - * - * // Results: - * // 1 - * // 2 - * // 3 - * // 4 - * // ...and so on for each click - * ``` - * - * @see {@link scan} - * @see {@link switchScan} - * - * @param accumulator The accumulator function called on each source value. - * @param seed The initial accumulation value. - * @param concurrent Maximum number of input Observables being subscribed to - * concurrently. - * @return A function that returns an Observable of the accumulated values. - */ -export declare function mergeScan(accumulator: (acc: R, value: T, index: number) => ObservableInput, seed: R, concurrent?: number): OperatorFunction; -//# sourceMappingURL=mergeScan.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mergeScan.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/mergeScan.d.ts.map deleted file mode 100644 index 4e46662..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/mergeScan.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mergeScan.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/mergeScan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAC5B,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,eAAe,CAAC,CAAC,CAAC,EACpE,IAAI,EAAE,CAAC,EACP,UAAU,SAAW,GACpB,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAkBxB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mergeWith.d.ts b/node_modules/rxjs/dist/types/internal/operators/mergeWith.d.ts deleted file mode 100644 index 9b2164d..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/mergeWith.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { ObservableInputTuple, OperatorFunction } from '../types'; -/** - * Merge the values from all observables to a single observable result. - * - * Creates an observable, that when subscribed to, subscribes to the source - * observable, and all other sources provided as arguments. All values from - * every source are emitted from the resulting subscription. - * - * When all sources complete, the resulting observable will complete. - * - * When any source errors, the resulting observable will error. - * - * ## Example - * - * Joining all outputs from multiple user input event streams - * - * ```ts - * import { fromEvent, map, mergeWith } from 'rxjs'; - * - * const clicks$ = fromEvent(document, 'click').pipe(map(() => 'click')); - * const mousemoves$ = fromEvent(document, 'mousemove').pipe(map(() => 'mousemove')); - * const dblclicks$ = fromEvent(document, 'dblclick').pipe(map(() => 'dblclick')); - * - * mousemoves$ - * .pipe(mergeWith(clicks$, dblclicks$)) - * .subscribe(x => console.log(x)); - * - * // result (assuming user interactions) - * // 'mousemove' - * // 'mousemove' - * // 'mousemove' - * // 'click' - * // 'click' - * // 'dblclick' - * ``` - * - * @see {@link merge} - * - * @param otherSources the sources to combine the current source with. - * @return A function that returns an Observable that merges the values from - * all given Observables. - */ -export declare function mergeWith(...otherSources: [...ObservableInputTuple]): OperatorFunction; -//# sourceMappingURL=mergeWith.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/mergeWith.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/mergeWith.d.ts.map deleted file mode 100644 index 551d0f2..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/mergeWith.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mergeWith.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/mergeWith.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAGlE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EACvD,GAAG,YAAY,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAC5C,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAEpC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/min.d.ts b/node_modules/rxjs/dist/types/internal/operators/min.d.ts deleted file mode 100644 index 0cd72f4..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/min.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { MonoTypeOperatorFunction } from '../types'; -/** - * The `min` operator operates on an Observable that emits numbers (or items that - * can be compared with a provided function), and when source Observable completes - * it emits a single item: the item with the smallest value. - * - * ![](min.png) - * - * ## Examples - * - * Get the minimal value of a series of numbers - * - * ```ts - * import { of, min } from 'rxjs'; - * - * of(5, 4, 7, 2, 8) - * .pipe(min()) - * .subscribe(x => console.log(x)); - * - * // Outputs - * // 2 - * ``` - * - * Use a comparer function to get the minimal item - * - * ```ts - * import { of, min } from 'rxjs'; - * - * of( - * { age: 7, name: 'Foo' }, - * { age: 5, name: 'Bar' }, - * { age: 9, name: 'Beer' } - * ).pipe( - * min((a, b) => a.age < b.age ? -1 : 1) - * ) - * .subscribe(x => console.log(x.name)); - * - * // Outputs - * // 'Bar' - * ``` - * - * @see {@link max} - * - * @param comparer Optional comparer function that it will use instead of its - * default to compare the value of two items. - * @return A function that returns an Observable that emits item with the - * smallest value. - */ -export declare function min(comparer?: (x: T, y: T) => number): MonoTypeOperatorFunction; -//# sourceMappingURL=min.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/min.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/min.d.ts.map deleted file mode 100644 index 72ed4a9..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/min.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"min.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/min.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAGpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAAM,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAErF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/multicast.d.ts b/node_modules/rxjs/dist/types/internal/operators/multicast.d.ts deleted file mode 100644 index 7b7e222..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/multicast.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Subject } from '../Subject'; -import { Observable } from '../Observable'; -import { ConnectableObservable } from '../observable/ConnectableObservable'; -import { OperatorFunction, UnaryFunction, ObservedValueOf, ObservableInput } from '../types'; -/** - * An operator that creates a {@link ConnectableObservable}, that when connected, - * with the `connect` method, will use the provided subject to multicast the values - * from the source to all consumers. - * - * @param subject The subject to multicast through. - * @return A function that returns a {@link ConnectableObservable} - * @deprecated Will be removed in v8. To create a connectable observable, use {@link connectable}. - * If you're using {@link refCount} after `multicast`, use the {@link share} operator instead. - * `multicast(subject), refCount()` is equivalent to - * `share({ connector: () => subject, resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false })`. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export declare function multicast(subject: Subject): UnaryFunction, ConnectableObservable>; -/** - * Because this is deprecated in favor of the {@link connect} operator, and was otherwise poorly documented, - * rather than duplicate the effort of documenting the same behavior, please see documentation for the - * {@link connect} operator. - * - * @param subject The subject used to multicast. - * @param selector A setup function to setup the multicast - * @return A function that returns an observable that mirrors the observable returned by the selector. - * @deprecated Will be removed in v8. Use the {@link connect} operator instead. - * `multicast(subject, selector)` is equivalent to - * `connect(selector, { connector: () => subject })`. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export declare function multicast>(subject: Subject, selector: (shared: Observable) => O): OperatorFunction>; -/** - * An operator that creates a {@link ConnectableObservable}, that when connected, - * with the `connect` method, will use the provided subject to multicast the values - * from the source to all consumers. - * - * @param subjectFactory A factory that will be called to create the subject. Passing a function here - * will cause the underlying subject to be "reset" on error, completion, or refCounted unsubscription of - * the source. - * @return A function that returns a {@link ConnectableObservable} - * @deprecated Will be removed in v8. To create a connectable observable, use {@link connectable}. - * If you're using {@link refCount} after `multicast`, use the {@link share} operator instead. - * `multicast(() => new BehaviorSubject('test')), refCount()` is equivalent to - * `share({ connector: () => new BehaviorSubject('test') })`. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export declare function multicast(subjectFactory: () => Subject): UnaryFunction, ConnectableObservable>; -/** - * Because this is deprecated in favor of the {@link connect} operator, and was otherwise poorly documented, - * rather than duplicate the effort of documenting the same behavior, please see documentation for the - * {@link connect} operator. - * - * @param subjectFactory A factory that creates the subject used to multicast. - * @param selector A function to setup the multicast and select the output. - * @return A function that returns an observable that mirrors the observable returned by the selector. - * @deprecated Will be removed in v8. Use the {@link connect} operator instead. - * `multicast(subjectFactory, selector)` is equivalent to - * `connect(selector, { connector: subjectFactory })`. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export declare function multicast>(subjectFactory: () => Subject, selector: (shared: Observable) => O): OperatorFunction>; -//# sourceMappingURL=multicast.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/multicast.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/multicast.d.ts.map deleted file mode 100644 index dfdec4b..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/multicast.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"multicast.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/multicast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI7F;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC;AAE1G;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EACzD,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EACnB,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,GACrC,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAE3C;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC;AAEvH;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EACzD,cAAc,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAChC,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,GACrC,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/observeOn.d.ts b/node_modules/rxjs/dist/types/internal/operators/observeOn.d.ts deleted file mode 100644 index 8ff7878..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/observeOn.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** @prettier */ -import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; -/** - * Re-emits all notifications from source Observable with specified scheduler. - * - * Ensure a specific scheduler is used, from outside of an Observable. - * - * `observeOn` is an operator that accepts a scheduler as a first parameter, which will be used to reschedule - * notifications emitted by the source Observable. It might be useful, if you do not have control over - * internal scheduler of a given Observable, but want to control when its values are emitted nevertheless. - * - * Returned Observable emits the same notifications (nexted values, complete and error events) as the source Observable, - * but rescheduled with provided scheduler. Note that this doesn't mean that source Observables internal - * scheduler will be replaced in any way. Original scheduler still will be used, but when the source Observable emits - * notification, it will be immediately scheduled again - this time with scheduler passed to `observeOn`. - * An anti-pattern would be calling `observeOn` on Observable that emits lots of values synchronously, to split - * that emissions into asynchronous chunks. For this to happen, scheduler would have to be passed into the source - * Observable directly (usually into the operator that creates it). `observeOn` simply delays notifications a - * little bit more, to ensure that they are emitted at expected moments. - * - * As a matter of fact, `observeOn` accepts second parameter, which specifies in milliseconds with what delay notifications - * will be emitted. The main difference between {@link delay} operator and `observeOn` is that `observeOn` - * will delay all notifications - including error notifications - while `delay` will pass through error - * from source Observable immediately when it is emitted. In general it is highly recommended to use `delay` operator - * for any kind of delaying of values in the stream, while using `observeOn` to specify which scheduler should be used - * for notification emissions in general. - * - * ## Example - * - * Ensure values in subscribe are called just before browser repaint - * - * ```ts - * import { interval, observeOn, animationFrameScheduler } from 'rxjs'; - * - * const someDiv = document.createElement('div'); - * someDiv.style.cssText = 'width: 200px;background: #09c'; - * document.body.appendChild(someDiv); - * const intervals = interval(10); // Intervals are scheduled - * // with async scheduler by default... - * intervals.pipe( - * observeOn(animationFrameScheduler) // ...but we will observe on animationFrame - * ) // scheduler to ensure smooth animation. - * .subscribe(val => { - * someDiv.style.height = val + 'px'; - * }); - * ``` - * - * @see {@link delay} - * - * @param scheduler Scheduler that will be used to reschedule notifications from source Observable. - * @param delay Number of milliseconds that states with what delay every notification should be rescheduled. - * @return A function that returns an Observable that emits the same - * notifications as the source Observable, but with provided scheduler. - */ -export declare function observeOn(scheduler: SchedulerLike, delay?: number): MonoTypeOperatorFunction; -//# sourceMappingURL=observeOn.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/observeOn.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/observeOn.d.ts.map deleted file mode 100644 index 5997ac5..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/observeOn.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"observeOn.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/observeOn.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAKnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,SAAI,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAW7F"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/onErrorResumeNextWith.d.ts b/node_modules/rxjs/dist/types/internal/operators/onErrorResumeNextWith.d.ts deleted file mode 100644 index 8323747..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/onErrorResumeNextWith.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { ObservableInputTuple, OperatorFunction } from '../types'; -export declare function onErrorResumeNextWith(sources: [...ObservableInputTuple]): OperatorFunction; -export declare function onErrorResumeNextWith(...sources: [...ObservableInputTuple]): OperatorFunction; -/** - * @deprecated Renamed. Use {@link onErrorResumeNextWith} instead. Will be removed in v8. - */ -export declare const onErrorResumeNext: typeof onErrorResumeNextWith; -//# sourceMappingURL=onErrorResumeNextWith.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/onErrorResumeNextWith.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/onErrorResumeNextWith.d.ts.map deleted file mode 100644 index 45bf50f..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/onErrorResumeNextWith.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"onErrorResumeNextWith.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/onErrorResumeNextWith.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAIlE,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EACnE,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GACpC,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACtC,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EACnE,GAAG,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GACvC,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAsFtC;;GAEG;AACH,eAAO,MAAM,iBAAiB,8BAAwB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/pairwise.d.ts b/node_modules/rxjs/dist/types/internal/operators/pairwise.d.ts deleted file mode 100644 index 08ea7b7..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/pairwise.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { OperatorFunction } from '../types'; -/** - * Groups pairs of consecutive emissions together and emits them as an array of - * two values. - * - * Puts the current value and previous value together as - * an array, and emits that. - * - * ![](pairwise.png) - * - * The Nth emission from the source Observable will cause the output Observable - * to emit an array [(N-1)th, Nth] of the previous and the current value, as a - * pair. For this reason, `pairwise` emits on the second and subsequent - * emissions from the source Observable, but not on the first emission, because - * there is no previous value in that case. - * - * ## Example - * - * On every click (starting from the second), emit the relative distance to the previous click - * - * ```ts - * import { fromEvent, pairwise, map } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const pairs = clicks.pipe(pairwise()); - * const distance = pairs.pipe( - * map(([first, second]) => { - * const x0 = first.clientX; - * const y0 = first.clientY; - * const x1 = second.clientX; - * const y1 = second.clientY; - * return Math.sqrt(Math.pow(x0 - x1, 2) + Math.pow(y0 - y1, 2)); - * }) - * ); - * - * distance.subscribe(x => console.log(x)); - * ``` - * - * @see {@link buffer} - * @see {@link bufferCount} - * - * @return A function that returns an Observable of pairs (as arrays) of - * consecutive values from the source Observable. - */ -export declare function pairwise(): OperatorFunction; -//# sourceMappingURL=pairwise.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/pairwise.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/pairwise.d.ts.map deleted file mode 100644 index 1c3a799..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/pairwise.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pairwise.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/pairwise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,QAAQ,CAAC,CAAC,KAAK,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAazD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/partition.d.ts b/node_modules/rxjs/dist/types/internal/operators/partition.d.ts deleted file mode 100644 index 6d1bb72..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/partition.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { Observable } from '../Observable'; -import { UnaryFunction } from '../types'; -/** - * Splits the source Observable into two, one with values that satisfy a - * predicate, and another with values that don't satisfy the predicate. - * - * It's like {@link filter}, but returns two Observables: - * one like the output of {@link filter}, and the other with values that did not - * pass the condition. - * - * ![](partition.png) - * - * `partition` outputs an array with two Observables that partition the values - * from the source Observable through the given `predicate` function. The first - * Observable in that array emits source values for which the predicate argument - * returns true. The second Observable emits source values for which the - * predicate returns false. The first behaves like {@link filter} and the second - * behaves like {@link filter} with the predicate negated. - * - * ## Example - * - * Partition click events into those on DIV elements and those elsewhere - * - * ```ts - * import { fromEvent } from 'rxjs'; - * import { partition } from 'rxjs/operators'; - * - * const div = document.createElement('div'); - * div.style.cssText = 'width: 200px; height: 200px; background: #09c;'; - * document.body.appendChild(div); - * - * const clicks = fromEvent(document, 'click'); - * const [clicksOnDivs, clicksElsewhere] = clicks.pipe(partition(ev => (ev.target).tagName === 'DIV')); - * - * clicksOnDivs.subscribe(x => console.log('DIV clicked: ', x)); - * clicksElsewhere.subscribe(x => console.log('Other clicked: ', x)); - * ``` - * - * @see {@link filter} - * - * @param predicate A function that evaluates each value emitted by the source - * Observable. If it returns `true`, the value is emitted on the first Observable - * in the returned array, if `false` the value is emitted on the second Observable - * in the array. The `index` parameter is the number `i` for the i-th source - * emission that has happened since the subscription, starting from the number `0`. - * @param thisArg An optional argument to determine the value of `this` in the - * `predicate` function. - * @return A function that returns an array with two Observables: one with - * values that passed the predicate, and another with values that did not pass - * the predicate. - * @deprecated Replaced with the {@link partition} static creation function. Will be removed in v8. - */ -export declare function partition(predicate: (value: T, index: number) => boolean, thisArg?: any): UnaryFunction, [Observable, Observable]>; -//# sourceMappingURL=partition.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/partition.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/partition.d.ts.map deleted file mode 100644 index e7d3c91..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/partition.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"partition.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/partition.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,wBAAgB,SAAS,CAAC,CAAC,EACzB,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,EAC/C,OAAO,CAAC,EAAE,GAAG,GACZ,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAG9D"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/pluck.d.ts b/node_modules/rxjs/dist/types/internal/operators/pluck.d.ts deleted file mode 100644 index cfc757d..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/pluck.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { OperatorFunction } from '../types'; -/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ -export declare function pluck(k1: K1): OperatorFunction; -/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ -export declare function pluck(k1: K1, k2: K2): OperatorFunction; -/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ -export declare function pluck(k1: K1, k2: K2, k3: K3): OperatorFunction; -/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ -export declare function pluck(k1: K1, k2: K2, k3: K3, k4: K4): OperatorFunction; -/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ -export declare function pluck(k1: K1, k2: K2, k3: K3, k4: K4, k5: K5): OperatorFunction; -/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ -export declare function pluck(k1: K1, k2: K2, k3: K3, k4: K4, k5: K5, k6: K6): OperatorFunction; -/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ -export declare function pluck(k1: K1, k2: K2, k3: K3, k4: K4, k5: K5, k6: K6, ...rest: string[]): OperatorFunction; -/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ -export declare function pluck(...properties: string[]): OperatorFunction; -//# sourceMappingURL=pluck.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/pluck.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/pluck.d.ts.map deleted file mode 100644 index 7f7aebd..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/pluck.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pluck.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/pluck.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C,kIAAkI;AAClI,wBAAgB,KAAK,CAAC,CAAC,EAAE,EAAE,SAAS,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACjF,kIAAkI;AAClI,wBAAgB,KAAK,CAAC,CAAC,EAAE,EAAE,SAAS,MAAM,CAAC,EAAE,EAAE,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACrH,kIAAkI;AAClI,wBAAgB,KAAK,CAAC,CAAC,EAAE,EAAE,SAAS,MAAM,CAAC,EAAE,EAAE,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAC7F,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,GACL,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACtC,kIAAkI;AAClI,wBAAgB,KAAK,CAAC,CAAC,EAAE,EAAE,SAAS,MAAM,CAAC,EAAE,EAAE,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAC7H,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,GACL,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC1C,kIAAkI;AAClI,wBAAgB,KAAK,CACnB,CAAC,EACD,EAAE,SAAS,MAAM,CAAC,EAClB,EAAE,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,EACtB,EAAE,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAC1B,EAAE,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAC9B,EAAE,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAClC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACtF,kIAAkI;AAClI,wBAAgB,KAAK,CACnB,CAAC,EACD,EAAE,SAAS,MAAM,CAAC,EAClB,EAAE,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,EACtB,EAAE,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAC1B,EAAE,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAC9B,EAAE,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAClC,EAAE,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EACtC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAClG,kIAAkI;AAClI,wBAAgB,KAAK,CACnB,CAAC,EACD,EAAE,SAAS,MAAM,CAAC,EAClB,EAAE,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,EACtB,EAAE,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAC1B,EAAE,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAC9B,EAAE,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAClC,EAAE,SAAS,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EACtC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;AACnG,kIAAkI;AAClI,wBAAgB,KAAK,CAAC,CAAC,EAAE,GAAG,UAAU,EAAE,MAAM,EAAE,GAAG,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/publish.d.ts b/node_modules/rxjs/dist/types/internal/operators/publish.d.ts deleted file mode 100644 index 89f8324..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/publish.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Observable } from '../Observable'; -import { ConnectableObservable } from '../observable/ConnectableObservable'; -import { OperatorFunction, UnaryFunction, ObservableInput, ObservedValueOf } from '../types'; -/** - * Returns a connectable observable that, when connected, will multicast - * all values through a single underlying {@link Subject} instance. - * - * @deprecated Will be removed in v8. To create a connectable observable, use {@link connectable}. - * `source.pipe(publish())` is equivalent to - * `connectable(source, { connector: () => new Subject(), resetOnDisconnect: false })`. - * If you're using {@link refCount} after `publish`, use {@link share} operator instead. - * `source.pipe(publish(), refCount())` is equivalent to - * `source.pipe(share({ resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false }))`. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export declare function publish(): UnaryFunction, ConnectableObservable>; -/** - * Returns an observable, that when subscribed to, creates an underlying {@link Subject}, - * provides an observable view of it to a `selector` function, takes the observable result of - * that selector function and subscribes to it, sending its values to the consumer, _then_ connects - * the subject to the original source. - * - * @param selector A function used to setup multicasting prior to automatic connection. - * - * @deprecated Will be removed in v8. Use the {@link connect} operator instead. - * `publish(selector)` is equivalent to `connect(selector)`. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export declare function publish>(selector: (shared: Observable) => O): OperatorFunction>; -//# sourceMappingURL=publish.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/publish.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/publish.d.ts.map deleted file mode 100644 index 5003ff5..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/publish.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/publish.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAA4B,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGvH;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CAAC,CAAC,KAAK,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC;AAErF;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/publishBehavior.d.ts b/node_modules/rxjs/dist/types/internal/operators/publishBehavior.d.ts deleted file mode 100644 index 8f3db6c..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/publishBehavior.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Observable } from '../Observable'; -import { ConnectableObservable } from '../observable/ConnectableObservable'; -import { UnaryFunction } from '../types'; -/** - * Creates a {@link ConnectableObservable} that utilizes a {@link BehaviorSubject}. - * - * @param initialValue The initial value passed to the {@link BehaviorSubject}. - * @return A function that returns a {@link ConnectableObservable} - * @deprecated Will be removed in v8. To create a connectable observable that uses a - * {@link BehaviorSubject} under the hood, use {@link connectable}. - * `source.pipe(publishBehavior(initValue))` is equivalent to - * `connectable(source, { connector: () => new BehaviorSubject(initValue), resetOnDisconnect: false })`. - * If you're using {@link refCount} after `publishBehavior`, use the {@link share} operator instead. - * `source.pipe(publishBehavior(initValue), refCount())` is equivalent to - * `source.pipe(share({ connector: () => new BehaviorSubject(initValue), resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false }))`. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export declare function publishBehavior(initialValue: T): UnaryFunction, ConnectableObservable>; -//# sourceMappingURL=publishBehavior.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/publishBehavior.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/publishBehavior.d.ts.map deleted file mode 100644 index 67ecc75..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/publishBehavior.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"publishBehavior.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/publishBehavior.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAM1G"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/publishLast.d.ts b/node_modules/rxjs/dist/types/internal/operators/publishLast.d.ts deleted file mode 100644 index 9c3bc5f..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/publishLast.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { Observable } from '../Observable'; -import { ConnectableObservable } from '../observable/ConnectableObservable'; -import { UnaryFunction } from '../types'; -/** - * Returns a connectable observable sequence that shares a single subscription to the - * underlying sequence containing only the last notification. - * - * ![](publishLast.png) - * - * Similar to {@link publish}, but it waits until the source observable completes and stores - * the last emitted value. - * Similarly to {@link publishReplay} and {@link publishBehavior}, this keeps storing the last - * value even if it has no more subscribers. If subsequent subscriptions happen, they will - * immediately get that last stored value and complete. - * - * ## Example - * - * ```ts - * import { ConnectableObservable, interval, publishLast, tap, take } from 'rxjs'; - * - * const connectable = >interval(1000) - * .pipe( - * tap(x => console.log('side effect', x)), - * take(3), - * publishLast() - * ); - * - * connectable.subscribe({ - * next: x => console.log('Sub. A', x), - * error: err => console.log('Sub. A Error', err), - * complete: () => console.log('Sub. A Complete') - * }); - * - * connectable.subscribe({ - * next: x => console.log('Sub. B', x), - * error: err => console.log('Sub. B Error', err), - * complete: () => console.log('Sub. B Complete') - * }); - * - * connectable.connect(); - * - * // Results: - * // 'side effect 0' - after one second - * // 'side effect 1' - after two seconds - * // 'side effect 2' - after three seconds - * // 'Sub. A 2' - immediately after 'side effect 2' - * // 'Sub. B 2' - * // 'Sub. A Complete' - * // 'Sub. B Complete' - * ``` - * - * @see {@link ConnectableObservable} - * @see {@link publish} - * @see {@link publishReplay} - * @see {@link publishBehavior} - * - * @return A function that returns an Observable that emits elements of a - * sequence produced by multicasting the source sequence. - * @deprecated Will be removed in v8. To create a connectable observable with an - * {@link AsyncSubject} under the hood, use {@link connectable}. - * `source.pipe(publishLast())` is equivalent to - * `connectable(source, { connector: () => new AsyncSubject(), resetOnDisconnect: false })`. - * If you're using {@link refCount} after `publishLast`, use the {@link share} operator instead. - * `source.pipe(publishLast(), refCount())` is equivalent to - * `source.pipe(share({ connector: () => new AsyncSubject(), resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false }))`. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export declare function publishLast(): UnaryFunction, ConnectableObservable>; -//# sourceMappingURL=publishLast.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/publishLast.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/publishLast.d.ts.map deleted file mode 100644 index 387fb90..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/publishLast.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"publishLast.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/publishLast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,wBAAgB,WAAW,CAAC,CAAC,KAAK,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAMvF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/publishReplay.d.ts b/node_modules/rxjs/dist/types/internal/operators/publishReplay.d.ts deleted file mode 100644 index c44a737..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/publishReplay.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { Observable } from '../Observable'; -import { MonoTypeOperatorFunction, OperatorFunction, TimestampProvider, ObservableInput, ObservedValueOf } from '../types'; -/** - * Creates a {@link ConnectableObservable} that uses a {@link ReplaySubject} - * internally. - * - * @param bufferSize The buffer size for the underlying {@link ReplaySubject}. - * @param windowTime The window time for the underlying {@link ReplaySubject}. - * @param timestampProvider The timestamp provider for the underlying {@link ReplaySubject}. - * @deprecated Will be removed in v8. To create a connectable observable that uses a - * {@link ReplaySubject} under the hood, use {@link connectable}. - * `source.pipe(publishReplay(size, time, scheduler))` is equivalent to - * `connectable(source, { connector: () => new ReplaySubject(size, time, scheduler), resetOnDisconnect: false })`. - * If you're using {@link refCount} after `publishReplay`, use the {@link share} operator instead. - * `publishReplay(size, time, scheduler), refCount()` is equivalent to - * `share({ connector: () => new ReplaySubject(size, time, scheduler), resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false })`. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export declare function publishReplay(bufferSize?: number, windowTime?: number, timestampProvider?: TimestampProvider): MonoTypeOperatorFunction; -/** - * Creates an observable, that when subscribed to, will create a {@link ReplaySubject}, - * and pass an observable from it (using [asObservable](api/index/class/Subject#asObservable)) to - * the `selector` function, which then returns an observable that is subscribed to before - * "connecting" the source to the internal `ReplaySubject`. - * - * Since this is deprecated, for additional details see the documentation for {@link connect}. - * - * @param bufferSize The buffer size for the underlying {@link ReplaySubject}. - * @param windowTime The window time for the underlying {@link ReplaySubject}. - * @param selector A function used to setup the multicast. - * @param timestampProvider The timestamp provider for the underlying {@link ReplaySubject}. - * @deprecated Will be removed in v8. Use the {@link connect} operator instead. - * `source.pipe(publishReplay(size, window, selector, scheduler))` is equivalent to - * `source.pipe(connect(selector, { connector: () => new ReplaySubject(size, window, scheduler) }))`. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export declare function publishReplay>(bufferSize: number | undefined, windowTime: number | undefined, selector: (shared: Observable) => O, timestampProvider?: TimestampProvider): OperatorFunction>; -/** - * Creates a {@link ConnectableObservable} that uses a {@link ReplaySubject} - * internally. - * - * @param bufferSize The buffer size for the underlying {@link ReplaySubject}. - * @param windowTime The window time for the underlying {@link ReplaySubject}. - * @param selector Passing `undefined` here determines that this operator will return a {@link ConnectableObservable}. - * @param timestampProvider The timestamp provider for the underlying {@link ReplaySubject}. - * @deprecated Will be removed in v8. To create a connectable observable that uses a - * {@link ReplaySubject} under the hood, use {@link connectable}. - * `source.pipe(publishReplay(size, time, scheduler))` is equivalent to - * `connectable(source, { connector: () => new ReplaySubject(size, time, scheduler), resetOnDisconnect: false })`. - * If you're using {@link refCount} after `publishReplay`, use the {@link share} operator instead. - * `publishReplay(size, time, scheduler), refCount()` is equivalent to - * `share({ connector: () => new ReplaySubject(size, time, scheduler), resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false })`. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export declare function publishReplay>(bufferSize: number | undefined, windowTime: number | undefined, selector: undefined, timestampProvider: TimestampProvider): OperatorFunction>; -//# sourceMappingURL=publishReplay.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/publishReplay.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/publishReplay.d.ts.map deleted file mode 100644 index 7a48ebc..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/publishReplay.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"publishReplay.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/publishReplay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG3H;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAC7B,UAAU,CAAC,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,MAAM,EACnB,iBAAiB,CAAC,EAAE,iBAAiB,GACpC,wBAAwB,CAAC,CAAC,CAAC,CAAC;AAE/B;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAC7D,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,EACtC,iBAAiB,CAAC,EAAE,iBAAiB,GACpC,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAE3C;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAC7D,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,QAAQ,EAAE,SAAS,EACnB,iBAAiB,EAAE,iBAAiB,GACnC,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/race.d.ts b/node_modules/rxjs/dist/types/internal/operators/race.d.ts deleted file mode 100644 index 0aee184..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/race.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { ObservableInputTuple, OperatorFunction } from '../types'; -/** @deprecated Replaced with {@link raceWith}. Will be removed in v8. */ -export declare function race(otherSources: [...ObservableInputTuple]): OperatorFunction; -/** @deprecated Replaced with {@link raceWith}. Will be removed in v8. */ -export declare function race(...otherSources: [...ObservableInputTuple]): OperatorFunction; -//# sourceMappingURL=race.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/race.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/race.d.ts.map deleted file mode 100644 index ca68cb8..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/race.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"race.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/race.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAIlE,yEAAyE;AACzE,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,YAAY,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACtI,yEAAyE;AACzE,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,YAAY,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/raceWith.d.ts b/node_modules/rxjs/dist/types/internal/operators/raceWith.d.ts deleted file mode 100644 index 762f5b3..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/raceWith.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { OperatorFunction, ObservableInputTuple } from '../types'; -/** - * Creates an Observable that mirrors the first source Observable to emit a next, - * error or complete notification from the combination of the Observable to which - * the operator is applied and supplied Observables. - * - * ## Example - * - * ```ts - * import { interval, map, raceWith } from 'rxjs'; - * - * const obs1 = interval(7000).pipe(map(() => 'slow one')); - * const obs2 = interval(3000).pipe(map(() => 'fast one')); - * const obs3 = interval(5000).pipe(map(() => 'medium one')); - * - * obs1 - * .pipe(raceWith(obs2, obs3)) - * .subscribe(winner => console.log(winner)); - * - * // Outputs - * // a series of 'fast one' - * ``` - * - * @param otherSources Sources used to race for which Observable emits first. - * @return A function that returns an Observable that mirrors the output of the - * first Observable to emit an item. - */ -export declare function raceWith(...otherSources: [...ObservableInputTuple]): OperatorFunction; -//# sourceMappingURL=raceWith.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/raceWith.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/raceWith.d.ts.map deleted file mode 100644 index 4a64c3b..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/raceWith.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"raceWith.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/raceWith.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAKlE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EACtD,GAAG,YAAY,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAC5C,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAMpC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/reduce.d.ts b/node_modules/rxjs/dist/types/internal/operators/reduce.d.ts deleted file mode 100644 index 531f333..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/reduce.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { OperatorFunction } from '../types'; -export declare function reduce(accumulator: (acc: A | V, value: V, index: number) => A): OperatorFunction; -export declare function reduce(accumulator: (acc: A, value: V, index: number) => A, seed: A): OperatorFunction; -export declare function reduce(accumulator: (acc: A | S, value: V, index: number) => A, seed: S): OperatorFunction; -//# sourceMappingURL=reduce.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/reduce.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/reduce.d.ts.map deleted file mode 100644 index 821fe4c..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/reduce.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"reduce.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/reduce.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AACtH,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACnH,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/refCount.d.ts b/node_modules/rxjs/dist/types/internal/operators/refCount.d.ts deleted file mode 100644 index 300bfbe..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/refCount.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { MonoTypeOperatorFunction } from '../types'; -/** - * Make a {@link ConnectableObservable} behave like a ordinary observable and automates the way - * you can connect to it. - * - * Internally it counts the subscriptions to the observable and subscribes (only once) to the source if - * the number of subscriptions is larger than 0. If the number of subscriptions is smaller than 1, it - * unsubscribes from the source. This way you can make sure that everything before the *published* - * refCount has only a single subscription independently of the number of subscribers to the target - * observable. - * - * Note that using the {@link share} operator is exactly the same as using the `multicast(() => new Subject())` operator - * (making the observable hot) and the *refCount* operator in a sequence. - * - * ![](refCount.png) - * - * ## Example - * - * In the following example there are two intervals turned into connectable observables - * by using the *publish* operator. The first one uses the *refCount* operator, the - * second one does not use it. You will notice that a connectable observable does nothing - * until you call its connect function. - * - * ```ts - * import { interval, tap, publish, refCount } from 'rxjs'; - * - * // Turn the interval observable into a ConnectableObservable (hot) - * const refCountInterval = interval(400).pipe( - * tap(num => console.log(`refCount ${ num }`)), - * publish(), - * refCount() - * ); - * - * const publishedInterval = interval(400).pipe( - * tap(num => console.log(`publish ${ num }`)), - * publish() - * ); - * - * refCountInterval.subscribe(); - * refCountInterval.subscribe(); - * // 'refCount 0' -----> 'refCount 1' -----> etc - * // All subscriptions will receive the same value and the tap (and - * // every other operator) before the `publish` operator will be executed - * // only once per event independently of the number of subscriptions. - * - * publishedInterval.subscribe(); - * // Nothing happens until you call .connect() on the observable. - * ``` - * - * @return A function that returns an Observable that automates the connection - * to ConnectableObservable. - * @see {@link ConnectableObservable} - * @see {@link share} - * @see {@link publish} - * @deprecated Replaced with the {@link share} operator. How `share` is used - * will depend on the connectable observable you created just prior to the - * `refCount` operator. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export declare function refCount(): MonoTypeOperatorFunction; -//# sourceMappingURL=refCount.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/refCount.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/refCount.d.ts.map deleted file mode 100644 index 51b9693..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/refCount.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"refCount.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/refCount.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAIpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,wBAAgB,QAAQ,CAAC,CAAC,KAAK,wBAAwB,CAAC,CAAC,CAAC,CAsDzD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/repeat.d.ts b/node_modules/rxjs/dist/types/internal/operators/repeat.d.ts deleted file mode 100644 index ad13b3c..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/repeat.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { MonoTypeOperatorFunction, ObservableInput } from '../types'; -export interface RepeatConfig { - /** - * The number of times to repeat the source. Defaults to `Infinity`. - */ - count?: number; - /** - * If a `number`, will delay the repeat of the source by that number of milliseconds. - * If a function, it will provide the number of times the source has been subscribed to, - * and the return value should be a valid observable input that will notify when the source - * should be repeated. If the notifier observable is empty, the result will complete. - */ - delay?: number | ((count: number) => ObservableInput); -} -/** - * Returns an Observable that will resubscribe to the source stream when the source stream completes. - * - * Repeats all values emitted on the source. It's like {@link retry}, but for non error cases. - * - * ![](repeat.png) - * - * Repeat will output values from a source until the source completes, then it will resubscribe to the - * source a specified number of times, with a specified delay. Repeat can be particularly useful in - * combination with closing operators like {@link take}, {@link takeUntil}, {@link first}, or {@link takeWhile}, - * as it can be used to restart a source again from scratch. - * - * Repeat is very similar to {@link retry}, where {@link retry} will resubscribe to the source in the error case, but - * `repeat` will resubscribe if the source completes. - * - * Note that `repeat` will _not_ catch errors. Use {@link retry} for that. - * - * - `repeat(0)` returns an empty observable - * - `repeat()` will repeat forever - * - `repeat({ delay: 200 })` will repeat forever, with a delay of 200ms between repetitions. - * - `repeat({ count: 2, delay: 400 })` will repeat twice, with a delay of 400ms between repetitions. - * - `repeat({ delay: (count) => timer(count * 1000) })` will repeat forever, but will have a delay that grows by one second for each repetition. - * - * ## Example - * - * Repeat a message stream - * - * ```ts - * import { of, repeat } from 'rxjs'; - * - * const source = of('Repeat message'); - * const result = source.pipe(repeat(3)); - * - * result.subscribe(x => console.log(x)); - * - * // Results - * // 'Repeat message' - * // 'Repeat message' - * // 'Repeat message' - * ``` - * - * Repeat 3 values, 2 times - * - * ```ts - * import { interval, take, repeat } from 'rxjs'; - * - * const source = interval(1000); - * const result = source.pipe(take(3), repeat(2)); - * - * result.subscribe(x => console.log(x)); - * - * // Results every second - * // 0 - * // 1 - * // 2 - * // 0 - * // 1 - * // 2 - * ``` - * - * Defining two complex repeats with delays on the same source. - * Note that the second repeat cannot be called until the first - * repeat as exhausted it's count. - * - * ```ts - * import { defer, of, repeat } from 'rxjs'; - * - * const source = defer(() => { - * return of(`Hello, it is ${new Date()}`) - * }); - * - * source.pipe( - * // Repeat 3 times with a delay of 1 second between repetitions - * repeat({ - * count: 3, - * delay: 1000, - * }), - * - * // *Then* repeat forever, but with an exponential step-back - * // maxing out at 1 minute. - * repeat({ - * delay: (count) => timer(Math.min(60000, 2 ^ count * 1000)) - * }) - * ) - * ``` - * - * @see {@link repeatWhen} - * @see {@link retry} - * - * @param countOrConfig Either the number of times the source Observable items are repeated - * (a count of 0 will yield an empty Observable) or a {@link RepeatConfig} object. - */ -export declare function repeat(countOrConfig?: number | RepeatConfig): MonoTypeOperatorFunction; -//# sourceMappingURL=repeat.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/repeat.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/repeat.d.ts.map deleted file mode 100644 index 30aa197..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/repeat.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"repeat.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/repeat.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAKrE,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;CAC5D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAwD5F"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/repeatWhen.d.ts b/node_modules/rxjs/dist/types/internal/operators/repeatWhen.d.ts deleted file mode 100644 index a05487c..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/repeatWhen.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Observable } from '../Observable'; -import { MonoTypeOperatorFunction, ObservableInput } from '../types'; -/** - * Returns an Observable that mirrors the source Observable with the exception of a `complete`. If the source - * Observable calls `complete`, this method will emit to the Observable returned from `notifier`. If that Observable - * calls `complete` or `error`, then this method will call `complete` or `error` on the child subscription. Otherwise - * this method will resubscribe to the source Observable. - * - * ![](repeatWhen.png) - * - * ## Example - * - * Repeat a message stream on click - * - * ```ts - * import { of, fromEvent, repeatWhen } from 'rxjs'; - * - * const source = of('Repeat message'); - * const documentClick$ = fromEvent(document, 'click'); - * - * const result = source.pipe(repeatWhen(() => documentClick$)); - * - * result.subscribe(data => console.log(data)) - * ``` - * - * @see {@link repeat} - * @see {@link retry} - * @see {@link retryWhen} - * - * @param notifier Function that receives an Observable of notifications with - * which a user can `complete` or `error`, aborting the repetition. - * @return A function that returns an Observable that mirrors the source - * Observable with the exception of a `complete`. - * @deprecated Will be removed in v9 or v10. Use {@link repeat}'s {@link RepeatConfig#delay delay} option instead. - * Instead of `repeatWhen(() => notify$)`, use: `repeat({ delay: () => notify$ })`. - */ -export declare function repeatWhen(notifier: (notifications: Observable) => ObservableInput): MonoTypeOperatorFunction; -//# sourceMappingURL=repeatWhen.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/repeatWhen.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/repeatWhen.d.ts.map deleted file mode 100644 index ca91308..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/repeatWhen.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"repeatWhen.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/repeatWhen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAIrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,aAAa,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,eAAe,CAAC,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAiF9H"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/retry.d.ts b/node_modules/rxjs/dist/types/internal/operators/retry.d.ts deleted file mode 100644 index d5afb0c..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/retry.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { MonoTypeOperatorFunction, ObservableInput } from '../types'; -/** - * The {@link retry} operator configuration object. `retry` either accepts a `number` - * or an object described by this interface. - */ -export interface RetryConfig { - /** - * The maximum number of times to retry. If `count` is omitted, `retry` will try to - * resubscribe on errors infinite number of times. - */ - count?: number; - /** - * The number of milliseconds to delay before retrying, OR a function to - * return a notifier for delaying. If a function is given, that function should - * return a notifier that, when it emits will retry the source. If the notifier - * completes _without_ emitting, the resulting observable will complete without error, - * if the notifier errors, the error will be pushed to the result. - */ - delay?: number | ((error: any, retryCount: number) => ObservableInput); - /** - * Whether or not to reset the retry counter when the retried subscription - * emits its first value. - */ - resetOnSuccess?: boolean; -} -export declare function retry(count?: number): MonoTypeOperatorFunction; -export declare function retry(config: RetryConfig): MonoTypeOperatorFunction; -//# sourceMappingURL=retry.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/retry.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/retry.d.ts.map deleted file mode 100644 index 08890ee..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/retry.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/retry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAQrE;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5E;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;AACtE,wBAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/retryWhen.d.ts b/node_modules/rxjs/dist/types/internal/operators/retryWhen.d.ts deleted file mode 100644 index cb10b79..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/retryWhen.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { Observable } from '../Observable'; -import { MonoTypeOperatorFunction, ObservableInput } from '../types'; -/** - * Returns an Observable that mirrors the source Observable with the exception of an `error`. If the source Observable - * calls `error`, this method will emit the Throwable that caused the error to the `ObservableInput` returned from `notifier`. - * If that Observable calls `complete` or `error` then this method will call `complete` or `error` on the child - * subscription. Otherwise this method will resubscribe to the source Observable. - * - * ![](retryWhen.png) - * - * Retry an observable sequence on error based on custom criteria. - * - * ## Example - * - * ```ts - * import { interval, map, retryWhen, tap, delayWhen, timer } from 'rxjs'; - * - * const source = interval(1000); - * const result = source.pipe( - * map(value => { - * if (value > 5) { - * // error will be picked up by retryWhen - * throw value; - * } - * return value; - * }), - * retryWhen(errors => - * errors.pipe( - * // log error message - * tap(value => console.log(`Value ${ value } was too high!`)), - * // restart in 5 seconds - * delayWhen(value => timer(value * 1000)) - * ) - * ) - * ); - * - * result.subscribe(value => console.log(value)); - * - * // results: - * // 0 - * // 1 - * // 2 - * // 3 - * // 4 - * // 5 - * // 'Value 6 was too high!' - * // - Wait 5 seconds then repeat - * ``` - * - * @see {@link retry} - * - * @param notifier Function that receives an Observable of notifications with which a - * user can `complete` or `error`, aborting the retry. - * @return A function that returns an Observable that mirrors the source - * Observable with the exception of an `error`. - * @deprecated Will be removed in v9 or v10, use {@link retry}'s `delay` option instead. - * Will be removed in v9 or v10. Use {@link retry}'s {@link RetryConfig#delay delay} option instead. - * Instead of `retryWhen(() => notify$)`, use: `retry({ delay: () => notify$ })`. - */ -export declare function retryWhen(notifier: (errors: Observable) => ObservableInput): MonoTypeOperatorFunction; -//# sourceMappingURL=retryWhen.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/retryWhen.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/retryWhen.d.ts.map deleted file mode 100644 index a4b5b32..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/retryWhen.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"retryWhen.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/retryWhen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAIrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,CAAC,KAAK,eAAe,CAAC,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CA8CrH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/sample.d.ts b/node_modules/rxjs/dist/types/internal/operators/sample.d.ts deleted file mode 100644 index 3840266..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/sample.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { MonoTypeOperatorFunction, ObservableInput } from '../types'; -/** - * Emits the most recently emitted value from the source Observable whenever - * another Observable, the `notifier`, emits. - * - * It's like {@link sampleTime}, but samples whenever - * the `notifier` `ObservableInput` emits something. - * - * ![](sample.png) - * - * Whenever the `notifier` `ObservableInput` emits a value, `sample` - * looks at the source Observable and emits whichever value it has most recently - * emitted since the previous sampling, unless the source has not emitted - * anything since the previous sampling. The `notifier` is subscribed to as soon - * as the output Observable is subscribed. - * - * ## Example - * - * On every click, sample the most recent `seconds` timer - * - * ```ts - * import { fromEvent, interval, sample } from 'rxjs'; - * - * const seconds = interval(1000); - * const clicks = fromEvent(document, 'click'); - * const result = seconds.pipe(sample(clicks)); - * - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link audit} - * @see {@link debounce} - * @see {@link sampleTime} - * @see {@link throttle} - * - * @param notifier The `ObservableInput` to use for sampling the - * source Observable. - * @return A function that returns an Observable that emits the results of - * sampling the values emitted by the source Observable whenever the notifier - * Observable emits value or completes. - */ -export declare function sample(notifier: ObservableInput): MonoTypeOperatorFunction; -//# sourceMappingURL=sample.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/sample.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/sample.d.ts.map deleted file mode 100644 index 51a926b..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/sample.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sample.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/sample.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAKrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,eAAe,CAAC,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAyBrF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/sampleTime.d.ts b/node_modules/rxjs/dist/types/internal/operators/sampleTime.d.ts deleted file mode 100644 index 6a8e9cc..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/sampleTime.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; -/** - * Emits the most recently emitted value from the source Observable within - * periodic time intervals. - * - * Samples the source Observable at periodic time - * intervals, emitting what it samples. - * - * ![](sampleTime.png) - * - * `sampleTime` periodically looks at the source Observable and emits whichever - * value it has most recently emitted since the previous sampling, unless the - * source has not emitted anything since the previous sampling. The sampling - * happens periodically in time every `period` milliseconds (or the time unit - * defined by the optional `scheduler` argument). The sampling starts as soon as - * the output Observable is subscribed. - * - * ## Example - * - * Every second, emit the most recent click at most once - * - * ```ts - * import { fromEvent, sampleTime } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe(sampleTime(1000)); - * - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link auditTime} - * @see {@link debounceTime} - * @see {@link delay} - * @see {@link sample} - * @see {@link throttleTime} - * - * @param period The sampling period expressed in milliseconds or the time unit - * determined internally by the optional `scheduler`. - * @param scheduler The {@link SchedulerLike} to use for managing the timers - * that handle the sampling. - * @return A function that returns an Observable that emits the results of - * sampling the values emitted by the source Observable at the specified time - * interval. - */ -export declare function sampleTime(period: number, scheduler?: SchedulerLike): MonoTypeOperatorFunction; -//# sourceMappingURL=sampleTime.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/sampleTime.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/sampleTime.d.ts.map deleted file mode 100644 index 6840b29..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/sampleTime.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sampleTime.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/sampleTime.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAInE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAE,aAA8B,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAEpH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/scan.d.ts b/node_modules/rxjs/dist/types/internal/operators/scan.d.ts deleted file mode 100644 index 97a9152..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/scan.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { OperatorFunction } from '../types'; -export declare function scan(accumulator: (acc: A | V, value: V, index: number) => A): OperatorFunction; -export declare function scan(accumulator: (acc: A, value: V, index: number) => A, seed: A): OperatorFunction; -export declare function scan(accumulator: (acc: A | S, value: V, index: number) => A, seed: S): OperatorFunction; -//# sourceMappingURL=scan.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/scan.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/scan.d.ts.map deleted file mode 100644 index 52ba32d..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/scan.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scan.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/scan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI5C,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AACpH,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACjH,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/scanInternals.d.ts b/node_modules/rxjs/dist/types/internal/operators/scanInternals.d.ts deleted file mode 100644 index 2adae3b..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/scanInternals.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Observable } from '../Observable'; -import { Subscriber } from '../Subscriber'; -/** - * A basic scan operation. This is used for `scan` and `reduce`. - * @param accumulator The accumulator to use - * @param seed The seed value for the state to accumulate - * @param hasSeed Whether or not a seed was provided - * @param emitOnNext Whether or not to emit the state on next - * @param emitBeforeComplete Whether or not to emit the before completion - */ -export declare function scanInternals(accumulator: (acc: V | A | S, value: V, index: number) => A, seed: S, hasSeed: boolean, emitOnNext: boolean, emitBeforeComplete?: undefined | true): (source: Observable, subscriber: Subscriber) => void; -//# sourceMappingURL=scanInternals.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/scanInternals.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/scanInternals.d.ts.map deleted file mode 100644 index c810abe..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/scanInternals.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scanInternals.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/scanInternals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C;;;;;;;GAOG;AAEH,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EACnC,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EAC3D,IAAI,EAAE,CAAC,EACP,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,OAAO,EACnB,kBAAkB,CAAC,EAAE,SAAS,GAAG,IAAI,YAErB,WAAW,CAAC,CAAC,cAAc,WAAW,GAAG,CAAC,UAyC3D"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/sequenceEqual.d.ts b/node_modules/rxjs/dist/types/internal/operators/sequenceEqual.d.ts deleted file mode 100644 index f479615..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/sequenceEqual.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { OperatorFunction, ObservableInput } from '../types'; -/** - * Compares all values of two observables in sequence using an optional comparator function - * and returns an observable of a single boolean value representing whether or not the two sequences - * are equal. - * - * Checks to see of all values emitted by both observables are equal, in order. - * - * ![](sequenceEqual.png) - * - * `sequenceEqual` subscribes to source observable and `compareTo` `ObservableInput` (that internally - * gets converted to an observable) and buffers incoming values from each observable. Whenever either - * observable emits a value, the value is buffered and the buffers are shifted and compared from the bottom - * up; If any value pair doesn't match, the returned observable will emit `false` and complete. If one of the - * observables completes, the operator will wait for the other observable to complete; If the other - * observable emits before completing, the returned observable will emit `false` and complete. If one observable never - * completes or emits after the other completes, the returned observable will never complete. - * - * ## Example - * - * Figure out if the Konami code matches - * - * ```ts - * import { from, fromEvent, map, bufferCount, mergeMap, sequenceEqual } from 'rxjs'; - * - * const codes = from([ - * 'ArrowUp', - * 'ArrowUp', - * 'ArrowDown', - * 'ArrowDown', - * 'ArrowLeft', - * 'ArrowRight', - * 'ArrowLeft', - * 'ArrowRight', - * 'KeyB', - * 'KeyA', - * 'Enter', // no start key, clearly. - * ]); - * - * const keys = fromEvent(document, 'keyup').pipe(map(e => e.code)); - * const matches = keys.pipe( - * bufferCount(11, 1), - * mergeMap(last11 => from(last11).pipe(sequenceEqual(codes))) - * ); - * matches.subscribe(matched => console.log('Successful cheat at Contra? ', matched)); - * ``` - * - * @see {@link combineLatest} - * @see {@link zip} - * @see {@link withLatestFrom} - * - * @param compareTo The `ObservableInput` sequence to compare the source sequence to. - * @param comparator An optional function to compare each value pair. - * - * @return A function that returns an Observable that emits a single boolean - * value representing whether or not the values emitted by the source - * Observable and provided `ObservableInput` were equal in sequence. - */ -export declare function sequenceEqual(compareTo: ObservableInput, comparator?: (a: T, b: T) => boolean): OperatorFunction; -//# sourceMappingURL=sequenceEqual.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/sequenceEqual.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/sequenceEqual.d.ts.map deleted file mode 100644 index 061182c..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/sequenceEqual.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sequenceEqual.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/sequenceEqual.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAK7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAC7B,SAAS,EAAE,eAAe,CAAC,CAAC,CAAC,EAC7B,UAAU,GAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,OAA2B,GACtD,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,CA2D9B"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/share.d.ts b/node_modules/rxjs/dist/types/internal/operators/share.d.ts deleted file mode 100644 index 43b9edd..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/share.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { MonoTypeOperatorFunction, SubjectLike, ObservableInput } from '../types'; -export interface ShareConfig { - /** - * The factory used to create the subject that will connect the source observable to - * multicast consumers. - */ - connector?: () => SubjectLike; - /** - * If `true`, the resulting observable will reset internal state on error from source and return to a "cold" state. This - * allows the resulting observable to be "retried" in the event of an error. - * If `false`, when an error comes from the source it will push the error into the connecting subject, and the subject - * will remain the connecting subject, meaning the resulting observable will not go "cold" again, and subsequent retries - * or resubscriptions will resubscribe to that same subject. In all cases, RxJS subjects will emit the same error again, however - * {@link ReplaySubject} will also push its buffered values before pushing the error. - * It is also possible to pass a notifier factory returning an `ObservableInput` instead which grants more fine-grained - * control over how and when the reset should happen. This allows behaviors like conditional or delayed resets. - */ - resetOnError?: boolean | ((error: any) => ObservableInput); - /** - * If `true`, the resulting observable will reset internal state on completion from source and return to a "cold" state. This - * allows the resulting observable to be "repeated" after it is done. - * If `false`, when the source completes, it will push the completion through the connecting subject, and the subject - * will remain the connecting subject, meaning the resulting observable will not go "cold" again, and subsequent repeats - * or resubscriptions will resubscribe to that same subject. - * It is also possible to pass a notifier factory returning an `ObservableInput` instead which grants more fine-grained - * control over how and when the reset should happen. This allows behaviors like conditional or delayed resets. - */ - resetOnComplete?: boolean | (() => ObservableInput); - /** - * If `true`, when the number of subscribers to the resulting observable reaches zero due to those subscribers unsubscribing, the - * internal state will be reset and the resulting observable will return to a "cold" state. This means that the next - * time the resulting observable is subscribed to, a new subject will be created and the source will be subscribed to - * again. - * If `false`, when the number of subscribers to the resulting observable reaches zero due to unsubscription, the subject - * will remain connected to the source, and new subscriptions to the result will be connected through that same subject. - * It is also possible to pass a notifier factory returning an `ObservableInput` instead which grants more fine-grained - * control over how and when the reset should happen. This allows behaviors like conditional or delayed resets. - */ - resetOnRefCountZero?: boolean | (() => ObservableInput); -} -export declare function share(): MonoTypeOperatorFunction; -export declare function share(options: ShareConfig): MonoTypeOperatorFunction; -//# sourceMappingURL=share.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/share.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/share.d.ts.map deleted file mode 100644 index ad8ff9e..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/share.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"share.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/share.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGlF,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,WAAW,CAAC,CAAC,CAAC,CAAC;IACjC;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;IAChE;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE,OAAO,GAAG,CAAC,MAAM,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;IACzD;;;;;;;;;OASG;IACH,mBAAmB,CAAC,EAAE,OAAO,GAAG,CAAC,MAAM,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;CAC9D;AAED,wBAAgB,KAAK,CAAC,CAAC,KAAK,wBAAwB,CAAC,CAAC,CAAC,CAAC;AAExD,wBAAgB,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/shareReplay.d.ts b/node_modules/rxjs/dist/types/internal/operators/shareReplay.d.ts deleted file mode 100644 index 3343908..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/shareReplay.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; -export interface ShareReplayConfig { - bufferSize?: number; - windowTime?: number; - refCount: boolean; - scheduler?: SchedulerLike; -} -export declare function shareReplay(config: ShareReplayConfig): MonoTypeOperatorFunction; -export declare function shareReplay(bufferSize?: number, windowTime?: number, scheduler?: SchedulerLike): MonoTypeOperatorFunction; -//# sourceMappingURL=shareReplay.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/shareReplay.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/shareReplay.d.ts.map deleted file mode 100644 index 55b8fcb..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/shareReplay.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"shareReplay.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/shareReplay.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGnE,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,aAAa,CAAC;CAC3B;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,iBAAiB,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;AACvF,wBAAgB,WAAW,CAAC,CAAC,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/single.d.ts b/node_modules/rxjs/dist/types/internal/operators/single.d.ts deleted file mode 100644 index bcdf63b..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/single.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Observable } from '../Observable'; -import { MonoTypeOperatorFunction, OperatorFunction, TruthyTypesOf } from '../types'; -export declare function single(predicate: BooleanConstructor): OperatorFunction>; -export declare function single(predicate?: (value: T, index: number, source: Observable) => boolean): MonoTypeOperatorFunction; -//# sourceMappingURL=single.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/single.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/single.d.ts.map deleted file mode 100644 index da32ebd..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/single.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"single.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/single.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAMrF,wBAAgB,MAAM,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AAChG,wBAAgB,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/skip.d.ts b/node_modules/rxjs/dist/types/internal/operators/skip.d.ts deleted file mode 100644 index bf68ccd..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/skip.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { MonoTypeOperatorFunction } from '../types'; -/** - * Returns an Observable that skips the first `count` items emitted by the source Observable. - * - * ![](skip.png) - * - * Skips the values until the sent notifications are equal or less than provided skip count. It raises - * an error if skip count is equal or more than the actual number of emits and source raises an error. - * - * ## Example - * - * Skip the values before the emission - * - * ```ts - * import { interval, skip } from 'rxjs'; - * - * // emit every half second - * const source = interval(500); - * // skip the first 10 emitted values - * const result = source.pipe(skip(10)); - * - * result.subscribe(value => console.log(value)); - * // output: 10...11...12...13... - * ``` - * - * @see {@link last} - * @see {@link skipWhile} - * @see {@link skipUntil} - * @see {@link skipLast} - * - * @param count The number of times, items emitted by source Observable should be skipped. - * @return A function that returns an Observable that skips the first `count` - * values emitted by the source Observable. - */ -export declare function skip(count: number): MonoTypeOperatorFunction; -//# sourceMappingURL=skip.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/skip.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/skip.d.ts.map deleted file mode 100644 index 5855c40..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/skip.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"skip.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/skip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAGpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAElE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/skipLast.d.ts b/node_modules/rxjs/dist/types/internal/operators/skipLast.d.ts deleted file mode 100644 index 0e84709..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/skipLast.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { MonoTypeOperatorFunction } from '../types'; -/** - * Skip a specified number of values before the completion of an observable. - * - * ![](skipLast.png) - * - * Returns an observable that will emit values as soon as it can, given a number of - * skipped values. For example, if you `skipLast(3)` on a source, when the source - * emits its fourth value, the first value the source emitted will finally be emitted - * from the returned observable, as it is no longer part of what needs to be skipped. - * - * All values emitted by the result of `skipLast(N)` will be delayed by `N` emissions, - * as each value is held in a buffer until enough values have been emitted that that - * the buffered value may finally be sent to the consumer. - * - * After subscribing, unsubscribing will not result in the emission of the buffered - * skipped values. - * - * ## Example - * - * Skip the last 2 values of an observable with many values - * - * ```ts - * import { of, skipLast } from 'rxjs'; - * - * const numbers = of(1, 2, 3, 4, 5); - * const skipLastTwo = numbers.pipe(skipLast(2)); - * skipLastTwo.subscribe(x => console.log(x)); - * - * // Results in: - * // 1 2 3 - * // (4 and 5 are skipped) - * ``` - * - * @see {@link skip} - * @see {@link skipUntil} - * @see {@link skipWhile} - * @see {@link take} - * - * @param skipCount Number of elements to skip from the end of the source Observable. - * @return A function that returns an Observable that skips the last `count` - * values emitted by the source Observable. - */ -export declare function skipLast(skipCount: number): MonoTypeOperatorFunction; -//# sourceMappingURL=skipLast.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/skipLast.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/skipLast.d.ts.map deleted file mode 100644 index 1195f43..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/skipLast.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"skipLast.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/skipLast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAKpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,GAAG,wBAAwB,CAAC,CAAC,CAAC,CA+C1E"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/skipUntil.d.ts b/node_modules/rxjs/dist/types/internal/operators/skipUntil.d.ts deleted file mode 100644 index caf1f5a..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/skipUntil.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { MonoTypeOperatorFunction, ObservableInput } from '../types'; -/** - * Returns an Observable that skips items emitted by the source Observable until a second Observable emits an item. - * - * The `skipUntil` operator causes the observable stream to skip the emission of values until the passed in observable - * emits the first value. This can be particularly useful in combination with user interactions, responses of HTTP - * requests or waiting for specific times to pass by. - * - * ![](skipUntil.png) - * - * Internally, the `skipUntil` operator subscribes to the passed in `notifier` `ObservableInput` (which gets converted - * to an Observable) in order to recognize the emission of its first value. When `notifier` emits next, the operator - * unsubscribes from it and starts emitting the values of the *source* observable until it completes or errors. It - * will never let the *source* observable emit any values if the `notifier` completes or throws an error without - * emitting a value before. - * - * ## Example - * - * In the following example, all emitted values of the interval observable are skipped until the user clicks anywhere - * within the page - * - * ```ts - * import { interval, fromEvent, skipUntil } from 'rxjs'; - * - * const intervalObservable = interval(1000); - * const click = fromEvent(document, 'click'); - * - * const emitAfterClick = intervalObservable.pipe( - * skipUntil(click) - * ); - * // clicked at 4.6s. output: 5...6...7...8........ or - * // clicked at 7.3s. output: 8...9...10..11....... - * emitAfterClick.subscribe(value => console.log(value)); - * ``` - * - * @see {@link last} - * @see {@link skip} - * @see {@link skipWhile} - * @see {@link skipLast} - * - * @param notifier An `ObservableInput` that has to emit an item before the source Observable elements begin to - * be mirrored by the resulting Observable. - * @return A function that returns an Observable that skips items from the - * source Observable until the `notifier` Observable emits an item, then emits the - * remaining items. - */ -export declare function skipUntil(notifier: ObservableInput): MonoTypeOperatorFunction; -//# sourceMappingURL=skipUntil.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/skipUntil.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/skipUntil.d.ts.map deleted file mode 100644 index 169f0f4..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/skipUntil.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"skipUntil.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/skipUntil.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAMrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,QAAQ,EAAE,eAAe,CAAC,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAiBxF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/skipWhile.d.ts b/node_modules/rxjs/dist/types/internal/operators/skipWhile.d.ts deleted file mode 100644 index dc78d67..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/skipWhile.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Falsy, MonoTypeOperatorFunction, OperatorFunction } from '../types'; -export declare function skipWhile(predicate: BooleanConstructor): OperatorFunction extends never ? never : T>; -export declare function skipWhile(predicate: (value: T, index: number) => true): OperatorFunction; -export declare function skipWhile(predicate: (value: T, index: number) => boolean): MonoTypeOperatorFunction; -//# sourceMappingURL=skipWhile.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/skipWhile.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/skipWhile.d.ts.map deleted file mode 100644 index eac8c09..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/skipWhile.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"skipWhile.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/skipWhile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI7E,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,KAAK,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC;AAC9H,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,gBAAgB,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AACvG,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/startWith.d.ts b/node_modules/rxjs/dist/types/internal/operators/startWith.d.ts deleted file mode 100644 index 8956a4c..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/startWith.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { OperatorFunction, SchedulerLike, ValueFromArray } from '../types'; -export declare function startWith(value: null): OperatorFunction; -export declare function startWith(value: undefined): OperatorFunction; -/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `concatAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ -export declare function startWith(...valuesAndScheduler: [...A, SchedulerLike]): OperatorFunction>; -export declare function startWith(...values: A): OperatorFunction>; -//# sourceMappingURL=startWith.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/startWith.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/startWith.d.ts.map deleted file mode 100644 index f86a117..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/startWith.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"startWith.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/startWith.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAS3E,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;AACzE,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC;AAEnF,8JAA8J;AAC9J,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,GAAG,CAAC,EAAE,EAC7D,GAAG,kBAAkB,EAAE,CAAC,GAAG,CAAC,EAAE,aAAa,CAAC,GAC3C,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9C,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/subscribeOn.d.ts b/node_modules/rxjs/dist/types/internal/operators/subscribeOn.d.ts deleted file mode 100644 index b17f2d9..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/subscribeOn.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; -/** - * Asynchronously subscribes Observers to this Observable on the specified {@link SchedulerLike}. - * - * With `subscribeOn` you can decide what type of scheduler a specific Observable will be using when it is subscribed to. - * - * Schedulers control the speed and order of emissions to observers from an Observable stream. - * - * ![](subscribeOn.png) - * - * ## Example - * - * Given the following code: - * - * ```ts - * import { of, merge } from 'rxjs'; - * - * const a = of(1, 2, 3); - * const b = of(4, 5, 6); - * - * merge(a, b).subscribe(console.log); - * - * // Outputs - * // 1 - * // 2 - * // 3 - * // 4 - * // 5 - * // 6 - * ``` - * - * Both Observable `a` and `b` will emit their values directly and synchronously once they are subscribed to. - * - * If we instead use the `subscribeOn` operator declaring that we want to use the {@link asyncScheduler} for values emitted by Observable `a`: - * - * ```ts - * import { of, subscribeOn, asyncScheduler, merge } from 'rxjs'; - * - * const a = of(1, 2, 3).pipe(subscribeOn(asyncScheduler)); - * const b = of(4, 5, 6); - * - * merge(a, b).subscribe(console.log); - * - * // Outputs - * // 4 - * // 5 - * // 6 - * // 1 - * // 2 - * // 3 - * ``` - * - * The reason for this is that Observable `b` emits its values directly and synchronously like before - * but the emissions from `a` are scheduled on the event loop because we are now using the {@link asyncScheduler} for that specific Observable. - * - * @param scheduler The {@link SchedulerLike} to perform subscription actions on. - * @param delay A delay to pass to the scheduler to delay subscriptions - * @return A function that returns an Observable modified so that its - * subscriptions happen on the specified {@link SchedulerLike}. - */ -export declare function subscribeOn(scheduler: SchedulerLike, delay?: number): MonoTypeOperatorFunction; -//# sourceMappingURL=subscribeOn.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/subscribeOn.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/subscribeOn.d.ts.map deleted file mode 100644 index 904061c..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/subscribeOn.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"subscribeOn.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/subscribeOn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,GAAE,MAAU,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAIvG"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/switchAll.d.ts b/node_modules/rxjs/dist/types/internal/operators/switchAll.d.ts deleted file mode 100644 index 816da0d..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/switchAll.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { OperatorFunction, ObservableInput, ObservedValueOf } from '../types'; -/** - * Converts a higher-order Observable into a first-order Observable - * producing values only from the most recent observable sequence - * - * Flattens an Observable-of-Observables. - * - * ![](switchAll.png) - * - * `switchAll` subscribes to a source that is an observable of observables, also known as a - * "higher-order observable" (or `Observable>`). It subscribes to the most recently - * provided "inner observable" emitted by the source, unsubscribing from any previously subscribed - * to inner observable, such that only the most recent inner observable may be subscribed to at - * any point in time. The resulting observable returned by `switchAll` will only complete if the - * source observable completes, *and* any currently subscribed to inner observable also has completed, - * if there are any. - * - * ## Examples - * - * Spawn a new interval observable for each click event, but for every new - * click, cancel the previous interval and subscribe to the new one - * - * ```ts - * import { fromEvent, tap, map, interval, switchAll } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click').pipe(tap(() => console.log('click'))); - * const source = clicks.pipe(map(() => interval(1000))); - * - * source - * .pipe(switchAll()) - * .subscribe(x => console.log(x)); - * - * // Output - * // click - * // 0 - * // 1 - * // 2 - * // 3 - * // ... - * // click - * // 0 - * // 1 - * // 2 - * // ... - * // click - * // ... - * ``` - * - * @see {@link combineLatestAll} - * @see {@link concatAll} - * @see {@link exhaustAll} - * @see {@link switchMap} - * @see {@link switchMapTo} - * @see {@link mergeAll} - * - * @return A function that returns an Observable that converts a higher-order - * Observable into a first-order Observable producing values only from the most - * recent Observable sequence. - */ -export declare function switchAll>(): OperatorFunction>; -//# sourceMappingURL=switchAll.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/switchAll.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/switchAll.d.ts.map deleted file mode 100644 index 9181679..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/switchAll.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"switchAll.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/switchAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,KAAK,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAEnG"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/switchMap.d.ts b/node_modules/rxjs/dist/types/internal/operators/switchMap.d.ts deleted file mode 100644 index 86de39d..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/switchMap.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; -export declare function switchMap>(project: (value: T, index: number) => O): OperatorFunction>; -/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ -export declare function switchMap>(project: (value: T, index: number) => O, resultSelector: undefined): OperatorFunction>; -/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ -export declare function switchMap>(project: (value: T, index: number) => O, resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R): OperatorFunction; -//# sourceMappingURL=switchMap.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/switchMap.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/switchMap.d.ts.map deleted file mode 100644 index 81016e7..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/switchMap.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"switchMap.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/switchMap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAM9E,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EACzD,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GACtC,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,0JAA0J;AAC1J,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EACzD,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EACvC,cAAc,EAAE,SAAS,GACxB,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,0JAA0J;AAC1J,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAC5D,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EACvC,cAAc,EAAE,CAAC,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC,GAC3G,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/switchMapTo.d.ts b/node_modules/rxjs/dist/types/internal/operators/switchMapTo.d.ts deleted file mode 100644 index 3f16734..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/switchMapTo.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; -/** @deprecated Will be removed in v9. Use {@link switchMap} instead: `switchMap(() => result)` */ -export declare function switchMapTo>(observable: O): OperatorFunction>; -/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ -export declare function switchMapTo>(observable: O, resultSelector: undefined): OperatorFunction>; -/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ -export declare function switchMapTo>(observable: O, resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R): OperatorFunction; -//# sourceMappingURL=switchMapTo.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/switchMapTo.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/switchMapTo.d.ts.map deleted file mode 100644 index 1073190..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/switchMapTo.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"switchMapTo.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/switchMapTo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG9E,kGAAkG;AAClG,wBAAgB,WAAW,CAAC,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC,GAAG,gBAAgB,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9H,0JAA0J;AAC1J,wBAAgB,WAAW,CAAC,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAC5D,UAAU,EAAE,CAAC,EACb,cAAc,EAAE,SAAS,GACxB,gBAAgB,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AACjD,0JAA0J;AAC1J,wBAAgB,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAClE,UAAU,EAAE,CAAC,EACb,cAAc,EAAE,CAAC,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC,GAC3G,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/switchScan.d.ts b/node_modules/rxjs/dist/types/internal/operators/switchScan.d.ts deleted file mode 100644 index a36e196..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/switchScan.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { ObservableInput, ObservedValueOf, OperatorFunction } from '../types'; -/** - * Applies an accumulator function over the source Observable where the - * accumulator function itself returns an Observable, emitting values - * only from the most recently returned Observable. - * - * It's like {@link mergeScan}, but only the most recent - * Observable returned by the accumulator is merged into the outer Observable. - * - * @see {@link scan} - * @see {@link mergeScan} - * @see {@link switchMap} - * - * @param accumulator - * The accumulator function called on each source value. - * @param seed The initial accumulation value. - * @return A function that returns an observable of the accumulated values. - */ -export declare function switchScan>(accumulator: (acc: R, value: T, index: number) => O, seed: R): OperatorFunction>; -//# sourceMappingURL=switchScan.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/switchScan.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/switchScan.d.ts.map deleted file mode 100644 index 7dd464b..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/switchScan.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"switchScan.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/switchScan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAM9E;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAC7D,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EACnD,IAAI,EAAE,CAAC,GACN,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAuBzC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/take.d.ts b/node_modules/rxjs/dist/types/internal/operators/take.d.ts deleted file mode 100644 index f9a8ef9..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/take.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { MonoTypeOperatorFunction } from '../types'; -/** - * Emits only the first `count` values emitted by the source Observable. - * - * Takes the first `count` values from the source, then - * completes. - * - * ![](take.png) - * - * `take` returns an Observable that emits only the first `count` values emitted - * by the source Observable. If the source emits fewer than `count` values then - * all of its values are emitted. After that, it completes, regardless if the - * source completes. - * - * ## Example - * - * Take the first 5 seconds of an infinite 1-second interval Observable - * - * ```ts - * import { interval, take } from 'rxjs'; - * - * const intervalCount = interval(1000); - * const takeFive = intervalCount.pipe(take(5)); - * takeFive.subscribe(x => console.log(x)); - * - * // Logs: - * // 0 - * // 1 - * // 2 - * // 3 - * // 4 - * ``` - * - * @see {@link takeLast} - * @see {@link takeUntil} - * @see {@link takeWhile} - * @see {@link skip} - * - * @param count The maximum number of `next` values to emit. - * @return A function that returns an Observable that emits only the first - * `count` values emitted by the source Observable, or all of the values from - * the source if the source emits fewer than `count` values. - */ -export declare function take(count: number): MonoTypeOperatorFunction; -//# sourceMappingURL=take.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/take.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/take.d.ts.map deleted file mode 100644 index bebe575..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/take.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"take.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/take.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAKpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAuBlE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/takeLast.d.ts b/node_modules/rxjs/dist/types/internal/operators/takeLast.d.ts deleted file mode 100644 index e5c99ad..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/takeLast.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { MonoTypeOperatorFunction } from '../types'; -/** - * Waits for the source to complete, then emits the last N values from the source, - * as specified by the `count` argument. - * - * ![](takeLast.png) - * - * `takeLast` results in an observable that will hold values up to `count` values in memory, - * until the source completes. It then pushes all values in memory to the consumer, in the - * order they were received from the source, then notifies the consumer that it is - * complete. - * - * If for some reason the source completes before the `count` supplied to `takeLast` is reached, - * all values received until that point are emitted, and then completion is notified. - * - * **Warning**: Using `takeLast` with an observable that never completes will result - * in an observable that never emits a value. - * - * ## Example - * - * Take the last 3 values of an Observable with many values - * - * ```ts - * import { range, takeLast } from 'rxjs'; - * - * const many = range(1, 100); - * const lastThree = many.pipe(takeLast(3)); - * lastThree.subscribe(x => console.log(x)); - * ``` - * - * @see {@link take} - * @see {@link takeUntil} - * @see {@link takeWhile} - * @see {@link skip} - * - * @param count The maximum number of values to emit from the end of - * the sequence of values emitted by the source Observable. - * @return A function that returns an Observable that emits at most the last - * `count` values emitted by the source Observable. - */ -export declare function takeLast(count: number): MonoTypeOperatorFunction; -//# sourceMappingURL=takeLast.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/takeLast.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/takeLast.d.ts.map deleted file mode 100644 index e1140f9..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/takeLast.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"takeLast.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/takeLast.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAIpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAoCtE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/takeUntil.d.ts b/node_modules/rxjs/dist/types/internal/operators/takeUntil.d.ts deleted file mode 100644 index 144780b..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/takeUntil.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { MonoTypeOperatorFunction, ObservableInput } from '../types'; -/** - * Emits the values emitted by the source Observable until a `notifier` - * Observable emits a value. - * - * Lets values pass until a second Observable, - * `notifier`, emits a value. Then, it completes. - * - * ![](takeUntil.png) - * - * `takeUntil` subscribes and begins mirroring the source Observable. It also - * monitors a second Observable, `notifier` that you provide. If the `notifier` - * emits a value, the output Observable stops mirroring the source Observable - * and completes. If the `notifier` doesn't emit any value and completes - * then `takeUntil` will pass all values. - * - * ## Example - * - * Tick every second until the first click happens - * - * ```ts - * import { interval, fromEvent, takeUntil } from 'rxjs'; - * - * const source = interval(1000); - * const clicks = fromEvent(document, 'click'); - * const result = source.pipe(takeUntil(clicks)); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link take} - * @see {@link takeLast} - * @see {@link takeWhile} - * @see {@link skip} - * - * @param notifier The `ObservableInput` whose first emitted value will cause the output - * Observable of `takeUntil` to stop emitting values from the source Observable. - * @return A function that returns an Observable that emits the values from the - * source Observable until `notifier` emits its first value. - */ -export declare function takeUntil(notifier: ObservableInput): MonoTypeOperatorFunction; -//# sourceMappingURL=takeUntil.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/takeUntil.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/takeUntil.d.ts.map deleted file mode 100644 index 2170863..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/takeUntil.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"takeUntil.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/takeUntil.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAMrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,QAAQ,EAAE,eAAe,CAAC,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAKxF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/takeWhile.d.ts b/node_modules/rxjs/dist/types/internal/operators/takeWhile.d.ts deleted file mode 100644 index 5431372..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/takeWhile.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { OperatorFunction, MonoTypeOperatorFunction, TruthyTypesOf } from '../types'; -export declare function takeWhile(predicate: BooleanConstructor, inclusive: true): MonoTypeOperatorFunction; -export declare function takeWhile(predicate: BooleanConstructor, inclusive: false): OperatorFunction>; -export declare function takeWhile(predicate: BooleanConstructor): OperatorFunction>; -export declare function takeWhile(predicate: (value: T, index: number) => value is S): OperatorFunction; -export declare function takeWhile(predicate: (value: T, index: number) => value is S, inclusive: false): OperatorFunction; -export declare function takeWhile(predicate: (value: T, index: number) => boolean, inclusive?: boolean): MonoTypeOperatorFunction; -//# sourceMappingURL=takeWhile.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/takeWhile.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/takeWhile.d.ts.map deleted file mode 100644 index fd4e11d..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/takeWhile.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"takeWhile.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/takeWhile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIrF,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,SAAS,EAAE,IAAI,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;AAC1G,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,SAAS,EAAE,KAAK,GAAG,gBAAgB,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AACrH,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AACnG,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,IAAI,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACtH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,IAAI,CAAC,EAAE,SAAS,EAAE,KAAK,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACxI,wBAAgB,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,EAAE,SAAS,CAAC,EAAE,OAAO,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/tap.d.ts b/node_modules/rxjs/dist/types/internal/operators/tap.d.ts deleted file mode 100644 index 349032a..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/tap.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { MonoTypeOperatorFunction, Observer } from '../types'; -/** - * An extension to the {@link Observer} interface used only by the {@link tap} operator. - * - * It provides a useful set of callbacks a user can register to do side-effects in - * cases other than what the usual {@link Observer} callbacks are - * ({@link guide/glossary-and-semantics#next next}, - * {@link guide/glossary-and-semantics#error error} and/or - * {@link guide/glossary-and-semantics#complete complete}). - * - * ## Example - * - * ```ts - * import { fromEvent, switchMap, tap, interval, take } from 'rxjs'; - * - * const source$ = fromEvent(document, 'click'); - * const result$ = source$.pipe( - * switchMap((_, i) => i % 2 === 0 - * ? fromEvent(document, 'mousemove').pipe( - * tap({ - * subscribe: () => console.log('Subscribed to the mouse move events after click #' + i), - * unsubscribe: () => console.log('Mouse move events #' + i + ' unsubscribed'), - * finalize: () => console.log('Mouse move events #' + i + ' finalized') - * }) - * ) - * : interval(1_000).pipe( - * take(5), - * tap({ - * subscribe: () => console.log('Subscribed to the 1-second interval events after click #' + i), - * unsubscribe: () => console.log('1-second interval events #' + i + ' unsubscribed'), - * finalize: () => console.log('1-second interval events #' + i + ' finalized') - * }) - * ) - * ) - * ); - * - * const subscription = result$.subscribe({ - * next: console.log - * }); - * - * setTimeout(() => { - * console.log('Unsubscribe after 60 seconds'); - * subscription.unsubscribe(); - * }, 60_000); - * ``` - */ -export interface TapObserver extends Observer { - /** - * The callback that `tap` operator invokes at the moment when the source Observable - * gets subscribed to. - */ - subscribe: () => void; - /** - * The callback that `tap` operator invokes when an explicit - * {@link guide/glossary-and-semantics#unsubscription unsubscribe} happens. It won't get invoked on - * `error` or `complete` events. - */ - unsubscribe: () => void; - /** - * The callback that `tap` operator invokes when any kind of - * {@link guide/glossary-and-semantics#finalization finalization} happens - either when - * the source Observable `error`s or `complete`s or when it gets explicitly unsubscribed - * by the user. There is no difference in using this callback or the {@link finalize} - * operator, but if you're already using `tap` operator, you can use this callback - * instead. You'd get the same result in either case. - */ - finalize: () => void; -} -export declare function tap(observerOrNext?: Partial> | ((value: T) => void)): MonoTypeOperatorFunction; -/** @deprecated Instead of passing separate callback arguments, use an observer argument. Signatures taking separate callback arguments will be removed in v8. Details: https://rxjs.dev/deprecations/subscribe-arguments */ -export declare function tap(next?: ((value: T) => void) | null, error?: ((error: any) => void) | null, complete?: (() => void) | null): MonoTypeOperatorFunction; -//# sourceMappingURL=tap.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/tap.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/tap.d.ts.map deleted file mode 100644 index ccffe8e..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/tap.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tap.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/tap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAM9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,CAAE,SAAQ,QAAQ,CAAC,CAAC,CAAC;IACjD;;;OAGG;IACH,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB;;;;OAIG;IACH,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB;;;;;;;OAOG;IACH,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AACD,wBAAgB,GAAG,CAAC,CAAC,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;AACrH,4NAA4N;AAC5N,wBAAgB,GAAG,CAAC,CAAC,EACnB,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,IAAI,EAClC,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,EACrC,QAAQ,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,GAC7B,wBAAwB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/throttle.d.ts b/node_modules/rxjs/dist/types/internal/operators/throttle.d.ts deleted file mode 100644 index ed082b2..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/throttle.d.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { MonoTypeOperatorFunction, ObservableInput } from '../types'; -/** - * An object interface used by {@link throttle} or {@link throttleTime} that ensure - * configuration options of these operators. - * - * @see {@link throttle} - * @see {@link throttleTime} - */ -export interface ThrottleConfig { - /** - * If `true`, the resulting Observable will emit the first value from the source - * Observable at the **start** of the "throttling" process (when starting an - * internal timer that prevents other emissions from the source to pass through). - * If `false`, it will not emit the first value from the source Observable at the - * start of the "throttling" process. - * - * If not provided, defaults to: `true`. - */ - leading?: boolean; - /** - * If `true`, the resulting Observable will emit the last value from the source - * Observable at the **end** of the "throttling" process (when ending an internal - * timer that prevents other emissions from the source to pass through). - * If `false`, it will not emit the last value from the source Observable at the - * end of the "throttling" process. - * - * If not provided, defaults to: `false`. - */ - trailing?: boolean; -} -/** - * Emits a value from the source Observable, then ignores subsequent source - * values for a duration determined by another Observable, then repeats this - * process. - * - * It's like {@link throttleTime}, but the silencing - * duration is determined by a second Observable. - * - * ![](throttle.svg) - * - * `throttle` emits the source Observable values on the output Observable - * when its internal timer is disabled, and ignores source values when the timer - * is enabled. Initially, the timer is disabled. As soon as the first source - * value arrives, it is forwarded to the output Observable, and then the timer - * is enabled by calling the `durationSelector` function with the source value, - * which returns the "duration" Observable. When the duration Observable emits a - * value, the timer is disabled, and this process repeats for the - * next source value. - * - * ## Example - * - * Emit clicks at a rate of at most one click per second - * - * ```ts - * import { fromEvent, throttle, interval } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe(throttle(() => interval(1000))); - * - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link audit} - * @see {@link debounce} - * @see {@link delayWhen} - * @see {@link sample} - * @see {@link throttleTime} - * - * @param durationSelector A function that receives a value from the source - * Observable, for computing the silencing duration for each source value, - * returned as an `ObservableInput`. - * @param config A configuration object to define `leading` and `trailing` - * behavior. Defaults to `{ leading: true, trailing: false }`. - * @return A function that returns an Observable that performs the throttle - * operation to limit the rate of emissions from the source. - */ -export declare function throttle(durationSelector: (value: T) => ObservableInput, config?: ThrottleConfig): MonoTypeOperatorFunction; -//# sourceMappingURL=throttle.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/throttle.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/throttle.d.ts.map deleted file mode 100644 index c955d40..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/throttle.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"throttle.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/throttle.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAKrE;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,eAAe,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,wBAAwB,CAAC,CAAC,CAAC,CA2DtI"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/throttleTime.d.ts b/node_modules/rxjs/dist/types/internal/operators/throttleTime.d.ts deleted file mode 100644 index b727f56..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/throttleTime.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { ThrottleConfig } from './throttle'; -import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; -/** - * Emits a value from the source Observable, then ignores subsequent source - * values for `duration` milliseconds, then repeats this process. - * - * Lets a value pass, then ignores source values for the - * next `duration` milliseconds. - * - * ![](throttleTime.png) - * - * `throttleTime` emits the source Observable values on the output Observable - * when its internal timer is disabled, and ignores source values when the timer - * is enabled. Initially, the timer is disabled. As soon as the first source - * value arrives, it is forwarded to the output Observable, and then the timer - * is enabled. After `duration` milliseconds (or the time unit determined - * internally by the optional `scheduler`) has passed, the timer is disabled, - * and this process repeats for the next source value. Optionally takes a - * {@link SchedulerLike} for managing timers. - * - * ## Examples - * - * ### Limit click rate - * - * Emit clicks at a rate of at most one click per second - * - * ```ts - * import { fromEvent, throttleTime } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe(throttleTime(1000)); - * - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link auditTime} - * @see {@link debounceTime} - * @see {@link delay} - * @see {@link sampleTime} - * @see {@link throttle} - * - * @param duration Time to wait before emitting another value after - * emitting the last value, measured in milliseconds or the time unit determined - * internally by the optional `scheduler`. - * @param scheduler The {@link SchedulerLike} to use for - * managing the timers that handle the throttling. Defaults to {@link asyncScheduler}. - * @param config A configuration object to define `leading` and - * `trailing` behavior. Defaults to `{ leading: true, trailing: false }`. - * @return A function that returns an Observable that performs the throttle - * operation to limit the rate of emissions from the source. - */ -export declare function throttleTime(duration: number, scheduler?: SchedulerLike, config?: ThrottleConfig): MonoTypeOperatorFunction; -//# sourceMappingURL=throttleTime.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/throttleTime.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/throttleTime.d.ts.map deleted file mode 100644 index 3568dd5..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/throttleTime.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"throttleTime.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/throttleTime.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,cAAc,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,aAA8B,EACzC,MAAM,CAAC,EAAE,cAAc,GACtB,wBAAwB,CAAC,CAAC,CAAC,CAG7B"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/throwIfEmpty.d.ts b/node_modules/rxjs/dist/types/internal/operators/throwIfEmpty.d.ts deleted file mode 100644 index b66dc46..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/throwIfEmpty.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { MonoTypeOperatorFunction } from '../types'; -/** - * If the source observable completes without emitting a value, it will emit - * an error. The error will be created at that time by the optional - * `errorFactory` argument, otherwise, the error will be {@link EmptyError}. - * - * ![](throwIfEmpty.png) - * - * ## Example - * - * Throw an error if the document wasn't clicked within 1 second - * - * ```ts - * import { fromEvent, takeUntil, timer, throwIfEmpty } from 'rxjs'; - * - * const click$ = fromEvent(document, 'click'); - * - * click$.pipe( - * takeUntil(timer(1000)), - * throwIfEmpty(() => new Error('The document was not clicked within 1 second')) - * ) - * .subscribe({ - * next() { - * console.log('The document was clicked'); - * }, - * error(err) { - * console.error(err.message); - * } - * }); - * ``` - * - * @param errorFactory A factory function called to produce the - * error to be thrown when the source observable completes without emitting a - * value. - * @return A function that returns an Observable that throws an error if the - * source Observable completed without emitting. - */ -export declare function throwIfEmpty(errorFactory?: () => any): MonoTypeOperatorFunction; -//# sourceMappingURL=throwIfEmpty.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/throwIfEmpty.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/throwIfEmpty.d.ts.map deleted file mode 100644 index 00a5e90..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/throwIfEmpty.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"throwIfEmpty.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/throwIfEmpty.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAIpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,YAAY,GAAE,MAAM,GAAyB,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAc1G"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/timeInterval.d.ts b/node_modules/rxjs/dist/types/internal/operators/timeInterval.d.ts deleted file mode 100644 index 7542ce3..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/timeInterval.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { SchedulerLike, OperatorFunction } from '../types'; -/** - * Emits an object containing the current value, and the time that has - * passed between emitting the current value and the previous value, which is - * calculated by using the provided `scheduler`'s `now()` method to retrieve - * the current time at each emission, then calculating the difference. The `scheduler` - * defaults to {@link asyncScheduler}, so by default, the `interval` will be in - * milliseconds. - * - * Convert an Observable that emits items into one that - * emits indications of the amount of time elapsed between those emissions. - * - * ![](timeInterval.png) - * - * ## Example - * - * Emit interval between current value with the last value - * - * ```ts - * import { interval, timeInterval } from 'rxjs'; - * - * const seconds = interval(1000); - * - * seconds - * .pipe(timeInterval()) - * .subscribe(value => console.log(value)); - * - * // NOTE: The values will never be this precise, - * // intervals created with `interval` or `setInterval` - * // are non-deterministic. - * - * // { value: 0, interval: 1000 } - * // { value: 1, interval: 1000 } - * // { value: 2, interval: 1000 } - * ``` - * - * @param scheduler Scheduler used to get the current time. - * @return A function that returns an Observable that emits information about - * value and interval. - */ -export declare function timeInterval(scheduler?: SchedulerLike): OperatorFunction>; -export declare class TimeInterval { - value: T; - interval: number; - /** - * @deprecated Internal implementation detail, do not construct directly. Will be made an interface in v8. - */ - constructor(value: T, interval: number); -} -//# sourceMappingURL=timeInterval.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/timeInterval.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/timeInterval.d.ts.map deleted file mode 100644 index 867ae5e..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/timeInterval.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timeInterval.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/timeInterval.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,SAAS,GAAE,aAA8B,GAAG,gBAAgB,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,CAY/G;AAKD,qBAAa,YAAY,CAAC,CAAC;IAIN,KAAK,EAAE,CAAC;IAAS,QAAQ,EAAE,MAAM;IAHpD;;OAEG;gBACgB,KAAK,EAAE,CAAC,EAAS,QAAQ,EAAE,MAAM;CACrD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/timeout.d.ts b/node_modules/rxjs/dist/types/internal/operators/timeout.d.ts deleted file mode 100644 index 683327a..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/timeout.d.ts +++ /dev/null @@ -1,255 +0,0 @@ -import { MonoTypeOperatorFunction, SchedulerLike, OperatorFunction, ObservableInput, ObservedValueOf } from '../types'; -export interface TimeoutConfig = ObservableInput, M = unknown> { - /** - * The time allowed between values from the source before timeout is triggered. - */ - each?: number; - /** - * The relative time as a `number` in milliseconds, or a specific time as a `Date` object, - * by which the first value must arrive from the source before timeout is triggered. - */ - first?: number | Date; - /** - * The scheduler to use with time-related operations within this operator. Defaults to {@link asyncScheduler} - */ - scheduler?: SchedulerLike; - /** - * A factory used to create observable to switch to when timeout occurs. Provides - * a {@link TimeoutInfo} about the source observable's emissions and what delay or - * exact time triggered the timeout. - */ - with?: (info: TimeoutInfo) => O; - /** - * Optional additional metadata you can provide to code that handles - * the timeout, will be provided through the {@link TimeoutError}. - * This can be used to help identify the source of a timeout or pass along - * other information related to the timeout. - */ - meta?: M; -} -export interface TimeoutInfo { - /** Optional metadata that was provided to the timeout configuration. */ - readonly meta: M; - /** The number of messages seen before the timeout */ - readonly seen: number; - /** The last message seen */ - readonly lastValue: T | null; -} -/** - * An error emitted when a timeout occurs. - */ -export interface TimeoutError extends Error { - /** - * The information provided to the error by the timeout - * operation that created the error. Will be `null` if - * used directly in non-RxJS code with an empty constructor. - * (Note that using this constructor directly is not recommended, - * you should create your own errors) - */ - info: TimeoutInfo | null; -} -export interface TimeoutErrorCtor { - /** - * @deprecated Internal implementation detail. Do not construct error instances. - * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 - */ - new (info?: TimeoutInfo): TimeoutError; -} -/** - * An error thrown by the {@link timeout} operator. - * - * Provided so users can use as a type and do quality comparisons. - * We recommend you do not subclass this or create instances of this class directly. - * If you have need of a error representing a timeout, you should - * create your own error class and use that. - * - * @see {@link timeout} - */ -export declare const TimeoutError: TimeoutErrorCtor; -/** - * If `with` is provided, this will return an observable that will switch to a different observable if the source - * does not push values within the specified time parameters. - * - * The most flexible option for creating a timeout behavior. - * - * The first thing to know about the configuration is if you do not provide a `with` property to the configuration, - * when timeout conditions are met, this operator will emit a {@link TimeoutError}. Otherwise, it will use the factory - * function provided by `with`, and switch your subscription to the result of that. Timeout conditions are provided by - * the settings in `first` and `each`. - * - * The `first` property can be either a `Date` for a specific time, a `number` for a time period relative to the - * point of subscription, or it can be skipped. This property is to check timeout conditions for the arrival of - * the first value from the source _only_. The timings of all subsequent values from the source will be checked - * against the time period provided by `each`, if it was provided. - * - * The `each` property can be either a `number` or skipped. If a value for `each` is provided, it represents the amount of - * time the resulting observable will wait between the arrival of values from the source before timing out. Note that if - * `first` is _not_ provided, the value from `each` will be used to check timeout conditions for the arrival of the first - * value and all subsequent values. If `first` _is_ provided, `each` will only be use to check all values after the first. - * - * ## Examples - * - * Emit a custom error if there is too much time between values - * - * ```ts - * import { interval, timeout, throwError } from 'rxjs'; - * - * class CustomTimeoutError extends Error { - * constructor() { - * super('It was too slow'); - * this.name = 'CustomTimeoutError'; - * } - * } - * - * const slow$ = interval(900); - * - * slow$.pipe( - * timeout({ - * each: 1000, - * with: () => throwError(() => new CustomTimeoutError()) - * }) - * ) - * .subscribe({ - * error: console.error - * }); - * ``` - * - * Switch to a faster observable if your source is slow. - * - * ```ts - * import { interval, timeout } from 'rxjs'; - * - * const slow$ = interval(900); - * const fast$ = interval(500); - * - * slow$.pipe( - * timeout({ - * each: 1000, - * with: () => fast$, - * }) - * ) - * .subscribe(console.log); - * ``` - * @param config The configuration for the timeout. - */ -export declare function timeout, M = unknown>(config: TimeoutConfig & { - with: (info: TimeoutInfo) => O; -}): OperatorFunction>; -/** - * Returns an observable that will error or switch to a different observable if the source does not push values - * within the specified time parameters. - * - * The most flexible option for creating a timeout behavior. - * - * The first thing to know about the configuration is if you do not provide a `with` property to the configuration, - * when timeout conditions are met, this operator will emit a {@link TimeoutError}. Otherwise, it will use the factory - * function provided by `with`, and switch your subscription to the result of that. Timeout conditions are provided by - * the settings in `first` and `each`. - * - * The `first` property can be either a `Date` for a specific time, a `number` for a time period relative to the - * point of subscription, or it can be skipped. This property is to check timeout conditions for the arrival of - * the first value from the source _only_. The timings of all subsequent values from the source will be checked - * against the time period provided by `each`, if it was provided. - * - * The `each` property can be either a `number` or skipped. If a value for `each` is provided, it represents the amount of - * time the resulting observable will wait between the arrival of values from the source before timing out. Note that if - * `first` is _not_ provided, the value from `each` will be used to check timeout conditions for the arrival of the first - * value and all subsequent values. If `first` _is_ provided, `each` will only be use to check all values after the first. - * - * ### Handling TimeoutErrors - * - * If no `with` property was provided, subscriptions to the resulting observable may emit an error of {@link TimeoutError}. - * The timeout error provides useful information you can examine when you're handling the error. The most common way to handle - * the error would be with {@link catchError}, although you could use {@link tap} or just the error handler in your `subscribe` call - * directly, if your error handling is only a side effect (such as notifying the user, or logging). - * - * In this case, you would check the error for `instanceof TimeoutError` to validate that the error was indeed from `timeout`, and - * not from some other source. If it's not from `timeout`, you should probably rethrow it if you're in a `catchError`. - * - * ## Examples - * - * Emit a {@link TimeoutError} if the first value, and _only_ the first value, does not arrive within 5 seconds - * - * ```ts - * import { interval, timeout } from 'rxjs'; - * - * // A random interval that lasts between 0 and 10 seconds per tick - * const source$ = interval(Math.round(Math.random() * 10_000)); - * - * source$.pipe( - * timeout({ first: 5_000 }) - * ) - * .subscribe({ - * next: console.log, - * error: console.error - * }); - * ``` - * - * Emit a {@link TimeoutError} if the source waits longer than 5 seconds between any two values or the first value - * and subscription. - * - * ```ts - * import { timer, timeout, expand } from 'rxjs'; - * - * const getRandomTime = () => Math.round(Math.random() * 10_000); - * - * // An observable that waits a random amount of time between each delivered value - * const source$ = timer(getRandomTime()) - * .pipe(expand(() => timer(getRandomTime()))); - * - * source$ - * .pipe(timeout({ each: 5_000 })) - * .subscribe({ - * next: console.log, - * error: console.error - * }); - * ``` - * - * Emit a {@link TimeoutError} if the source does not emit before 7 seconds, _or_ if the source waits longer than - * 5 seconds between any two values after the first. - * - * ```ts - * import { timer, timeout, expand } from 'rxjs'; - * - * const getRandomTime = () => Math.round(Math.random() * 10_000); - * - * // An observable that waits a random amount of time between each delivered value - * const source$ = timer(getRandomTime()) - * .pipe(expand(() => timer(getRandomTime()))); - * - * source$ - * .pipe(timeout({ first: 7_000, each: 5_000 })) - * .subscribe({ - * next: console.log, - * error: console.error - * }); - * ``` - */ -export declare function timeout(config: Omit, 'with'>): OperatorFunction; -/** - * Returns an observable that will error if the source does not push its first value before the specified time passed as a `Date`. - * This is functionally the same as `timeout({ first: someDate })`. - * - * Errors if the first value doesn't show up before the given date and time - * - * ![](timeout.png) - * - * @param first The date to at which the resulting observable will timeout if the source observable - * does not emit at least one value. - * @param scheduler The scheduler to use. Defaults to {@link asyncScheduler}. - */ -export declare function timeout(first: Date, scheduler?: SchedulerLike): MonoTypeOperatorFunction; -/** - * Returns an observable that will error if the source does not push a value within the specified time in milliseconds. - * This is functionally the same as `timeout({ each: milliseconds })`. - * - * Errors if it waits too long between any value - * - * ![](timeout.png) - * - * @param each The time allowed between each pushed value from the source before the resulting observable - * will timeout. - * @param scheduler The scheduler to use. Defaults to {@link asyncScheduler}. - */ -export declare function timeout(each: number, scheduler?: SchedulerLike): MonoTypeOperatorFunction; -//# sourceMappingURL=timeout.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/timeout.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/timeout.d.ts.map deleted file mode 100644 index e05e920..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/timeout.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timeout.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/timeout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAUvH,MAAM,WAAW,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,OAAO;IACpG;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC;IAE1B;;;;OAIG;IACH,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;IAEtC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,CAAC,CAAC;CACV;AAED,MAAM,WAAW,WAAW,CAAC,CAAC,EAAE,CAAC,GAAG,OAAO;IACzC,wEAAwE;IACxE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IACjB,qDAAqD;IACrD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4BAA4B;IAC5B,QAAQ,CAAC,SAAS,EAAE,CAAC,GAAG,IAAI,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,OAAO,CAAE,SAAQ,KAAK;IACnE;;;;;;OAMG;IACH,IAAI,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,OAAO,EAAE,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAC9E;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,EAAE,gBAQ1B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,OAAO,EACxE,MAAM,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG;IAAE,IAAI,EAAE,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAA;CAAE,GACxE,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyFG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAEhH;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;AAEhG;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/timeoutWith.d.ts b/node_modules/rxjs/dist/types/internal/operators/timeoutWith.d.ts deleted file mode 100644 index 9846627..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/timeoutWith.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { ObservableInput, OperatorFunction, SchedulerLike } from '../types'; -/** @deprecated Replaced with {@link timeout}. Instead of `timeoutWith(someDate, a$, scheduler)`, use the configuration object - * `timeout({ first: someDate, with: () => a$, scheduler })`. Will be removed in v8. */ -export declare function timeoutWith(dueBy: Date, switchTo: ObservableInput, scheduler?: SchedulerLike): OperatorFunction; -/** @deprecated Replaced with {@link timeout}. Instead of `timeoutWith(100, a$, scheduler)`, use the configuration object - * `timeout({ each: 100, with: () => a$, scheduler })`. Will be removed in v8. */ -export declare function timeoutWith(waitFor: number, switchTo: ObservableInput, scheduler?: SchedulerLike): OperatorFunction; -//# sourceMappingURL=timeoutWith.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/timeoutWith.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/timeoutWith.d.ts.map deleted file mode 100644 index c9370ed..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/timeoutWith.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timeoutWith.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/timeoutWith.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG5E;uFACuF;AACvF,wBAAgB,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AACpI;kFACkF;AAClF,wBAAgB,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/timestamp.d.ts b/node_modules/rxjs/dist/types/internal/operators/timestamp.d.ts deleted file mode 100644 index 9258c76..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/timestamp.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { OperatorFunction, TimestampProvider, Timestamp } from '../types'; -/** - * Attaches a timestamp to each item emitted by an observable indicating when it was emitted - * - * The `timestamp` operator maps the *source* observable stream to an object of type - * `{value: T, timestamp: R}`. The properties are generically typed. The `value` property contains the value - * and type of the *source* observable. The `timestamp` is generated by the schedulers `now` function. By - * default, it uses the `asyncScheduler` which simply returns `Date.now()` (milliseconds since 1970/01/01 - * 00:00:00:000) and therefore is of type `number`. - * - * ![](timestamp.png) - * - * ## Example - * - * In this example there is a timestamp attached to the document's click events - * - * ```ts - * import { fromEvent, timestamp } from 'rxjs'; - * - * const clickWithTimestamp = fromEvent(document, 'click').pipe( - * timestamp() - * ); - * - * // Emits data of type { value: PointerEvent, timestamp: number } - * clickWithTimestamp.subscribe(data => { - * console.log(data); - * }); - * ``` - * - * @param timestampProvider An object with a `now()` method used to get the current timestamp. - * @return A function that returns an Observable that attaches a timestamp to - * each item emitted by the source Observable indicating when it was emitted. - */ -export declare function timestamp(timestampProvider?: TimestampProvider): OperatorFunction>; -//# sourceMappingURL=timestamp.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/timestamp.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/timestamp.d.ts.map deleted file mode 100644 index 16a51f1..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/timestamp.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timestamp.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/timestamp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAI1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,iBAAiB,GAAE,iBAAyC,GAAG,gBAAgB,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAE5H"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/toArray.d.ts b/node_modules/rxjs/dist/types/internal/operators/toArray.d.ts deleted file mode 100644 index f22f7f1..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/toArray.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { OperatorFunction } from '../types'; -/** - * Collects all source emissions and emits them as an array when the source completes. - * - * Get all values inside an array when the source completes - * - * ![](toArray.png) - * - * `toArray` will wait until the source Observable completes before emitting - * the array containing all emissions. When the source Observable errors no - * array will be emitted. - * - * ## Example - * - * ```ts - * import { interval, take, toArray } from 'rxjs'; - * - * const source = interval(1000); - * const example = source.pipe( - * take(10), - * toArray() - * ); - * - * example.subscribe(value => console.log(value)); - * - * // output: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - * ``` - * - * @return A function that returns an Observable that emits an array of items - * emitted by the source Observable when source completes. - */ -export declare function toArray(): OperatorFunction; -//# sourceMappingURL=toArray.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/toArray.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/toArray.d.ts.map deleted file mode 100644 index 61ada18..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/toArray.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"toArray.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/toArray.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAK5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,OAAO,CAAC,CAAC,KAAK,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAOrD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/window.d.ts b/node_modules/rxjs/dist/types/internal/operators/window.d.ts deleted file mode 100644 index 88a78fb..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/window.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { Observable } from '../Observable'; -import { OperatorFunction, ObservableInput } from '../types'; -/** - * Branch out the source Observable values as a nested Observable whenever - * `windowBoundaries` emits. - * - * It's like {@link buffer}, but emits a nested Observable - * instead of an array. - * - * ![](window.png) - * - * Returns an Observable that emits windows of items it collects from the source - * Observable. The output Observable emits connected, non-overlapping - * windows. It emits the current window and opens a new one whenever the - * `windowBoundaries` emits an item. `windowBoundaries` can be any type that - * `ObservableInput` accepts. It internally gets converted to an Observable. - * Because each window is an Observable, the output is a higher-order Observable. - * - * ## Example - * - * In every window of 1 second each, emit at most 2 click events - * - * ```ts - * import { fromEvent, interval, window, map, take, mergeAll } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const sec = interval(1000); - * const result = clicks.pipe( - * window(sec), - * map(win => win.pipe(take(2))), // take at most 2 emissions from each window - * mergeAll() // flatten the Observable-of-Observables - * ); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link windowCount} - * @see {@link windowTime} - * @see {@link windowToggle} - * @see {@link windowWhen} - * @see {@link buffer} - * - * @param windowBoundaries An `ObservableInput` that completes the - * previous window and starts a new window. - * @return A function that returns an Observable of windows, which are - * Observables emitting values of the source Observable. - */ -export declare function window(windowBoundaries: ObservableInput): OperatorFunction>; -//# sourceMappingURL=window.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/window.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/window.d.ts.map deleted file mode 100644 index 41ca0d6..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/window.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/window.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAO7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,gBAAgB,EAAE,eAAe,CAAC,GAAG,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CA6CpG"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/windowCount.d.ts b/node_modules/rxjs/dist/types/internal/operators/windowCount.d.ts deleted file mode 100644 index 1036af6..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/windowCount.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { Observable } from '../Observable'; -import { OperatorFunction } from '../types'; -/** - * Branch out the source Observable values as a nested Observable with each - * nested Observable emitting at most `windowSize` values. - * - * It's like {@link bufferCount}, but emits a nested - * Observable instead of an array. - * - * ![](windowCount.png) - * - * Returns an Observable that emits windows of items it collects from the source - * Observable. The output Observable emits windows every `startWindowEvery` - * items, each containing no more than `windowSize` items. When the source - * Observable completes or encounters an error, the output Observable emits - * the current window and propagates the notification from the source - * Observable. If `startWindowEvery` is not provided, then new windows are - * started immediately at the start of the source and when each window completes - * with size `windowSize`. - * - * ## Examples - * - * Ignore every 3rd click event, starting from the first one - * - * ```ts - * import { fromEvent, windowCount, map, skip, mergeAll } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe( - * windowCount(3), - * map(win => win.pipe(skip(1))), // skip first of every 3 clicks - * mergeAll() // flatten the Observable-of-Observables - * ); - * result.subscribe(x => console.log(x)); - * ``` - * - * Ignore every 3rd click event, starting from the third one - * - * ```ts - * import { fromEvent, windowCount, mergeAll } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe( - * windowCount(2, 3), - * mergeAll() // flatten the Observable-of-Observables - * ); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link window} - * @see {@link windowTime} - * @see {@link windowToggle} - * @see {@link windowWhen} - * @see {@link bufferCount} - * - * @param windowSize The maximum number of values emitted by each window. - * @param startWindowEvery Interval at which to start a new window. For example - * if `startWindowEvery` is `2`, then a new window will be started on every - * other value from the source. A new window is started at the beginning of the - * source by default. - * @return A function that returns an Observable of windows, which in turn are - * Observable of values. - */ -export declare function windowCount(windowSize: number, startWindowEvery?: number): OperatorFunction>; -//# sourceMappingURL=windowCount.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/windowCount.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/windowCount.d.ts.map deleted file mode 100644 index 5e01b52..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/windowCount.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"windowCount.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/windowCount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,gBAAgB,GAAE,MAAU,GAAG,gBAAgB,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CA6DnH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/windowTime.d.ts b/node_modules/rxjs/dist/types/internal/operators/windowTime.d.ts deleted file mode 100644 index 4d7ee6b..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/windowTime.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Observable } from '../Observable'; -import { OperatorFunction, SchedulerLike } from '../types'; -export declare function windowTime(windowTimeSpan: number, scheduler?: SchedulerLike): OperatorFunction>; -export declare function windowTime(windowTimeSpan: number, windowCreationInterval: number, scheduler?: SchedulerLike): OperatorFunction>; -export declare function windowTime(windowTimeSpan: number, windowCreationInterval: number | null | void, maxWindowSize: number, scheduler?: SchedulerLike): OperatorFunction>; -//# sourceMappingURL=windowTime.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/windowTime.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/windowTime.d.ts.map deleted file mode 100644 index 8f85cc4..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/windowTime.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"windowTime.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/windowTime.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAY,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAOrE,wBAAgB,UAAU,CAAC,CAAC,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,gBAAgB,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AACrH,wBAAgB,UAAU,CAAC,CAAC,EAC1B,cAAc,EAAE,MAAM,EACtB,sBAAsB,EAAE,MAAM,EAC9B,SAAS,CAAC,EAAE,aAAa,GACxB,gBAAgB,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AACtC,wBAAgB,UAAU,CAAC,CAAC,EAC1B,cAAc,EAAE,MAAM,EACtB,sBAAsB,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,EAC5C,aAAa,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,aAAa,GACxB,gBAAgB,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/windowToggle.d.ts b/node_modules/rxjs/dist/types/internal/operators/windowToggle.d.ts deleted file mode 100644 index cad3811..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/windowToggle.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { Observable } from '../Observable'; -import { ObservableInput, OperatorFunction } from '../types'; -/** - * Branch out the source Observable values as a nested Observable starting from - * an emission from `openings` and ending when the output of `closingSelector` - * emits. - * - * It's like {@link bufferToggle}, but emits a nested - * Observable instead of an array. - * - * ![](windowToggle.png) - * - * Returns an Observable that emits windows of items it collects from the source - * Observable. The output Observable emits windows that contain those items - * emitted by the source Observable between the time when the `openings` - * Observable emits an item and when the Observable returned by - * `closingSelector` emits an item. - * - * ## Example - * - * Every other second, emit the click events from the next 500ms - * - * ```ts - * import { fromEvent, interval, windowToggle, EMPTY, mergeAll } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const openings = interval(1000); - * const result = clicks.pipe( - * windowToggle(openings, i => i % 2 ? interval(500) : EMPTY), - * mergeAll() - * ); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link window} - * @see {@link windowCount} - * @see {@link windowTime} - * @see {@link windowWhen} - * @see {@link bufferToggle} - * - * @param openings An observable of notifications to start new windows. - * @param closingSelector A function that takes the value emitted by the - * `openings` observable and returns an Observable, which, when it emits a next - * notification, signals that the associated window should complete. - * @return A function that returns an Observable of windows, which in turn are - * Observables. - */ -export declare function windowToggle(openings: ObservableInput, closingSelector: (openValue: O) => ObservableInput): OperatorFunction>; -//# sourceMappingURL=windowToggle.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/windowToggle.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/windowToggle.d.ts.map deleted file mode 100644 index 2229ce8..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/windowToggle.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"windowToggle.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/windowToggle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAO7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAC/B,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,EAC5B,eAAe,EAAE,CAAC,SAAS,EAAE,CAAC,KAAK,eAAe,CAAC,GAAG,CAAC,GACtD,gBAAgB,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAyEpC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/windowWhen.d.ts b/node_modules/rxjs/dist/types/internal/operators/windowWhen.d.ts deleted file mode 100644 index 65364a3..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/windowWhen.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { Observable } from '../Observable'; -import { ObservableInput, OperatorFunction } from '../types'; -/** - * Branch out the source Observable values as a nested Observable using a - * factory function of closing Observables to determine when to start a new - * window. - * - * It's like {@link bufferWhen}, but emits a nested - * Observable instead of an array. - * - * ![](windowWhen.png) - * - * Returns an Observable that emits windows of items it collects from the source - * Observable. The output Observable emits connected, non-overlapping windows. - * It emits the current window and opens a new one whenever the Observable - * produced by the specified `closingSelector` function emits an item. The first - * window is opened immediately when subscribing to the output Observable. - * - * ## Example - * - * Emit only the first two clicks events in every window of [1-5] random seconds - * - * ```ts - * import { fromEvent, windowWhen, interval, map, take, mergeAll } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe( - * windowWhen(() => interval(1000 + Math.random() * 4000)), - * map(win => win.pipe(take(2))), // take at most 2 emissions from each window - * mergeAll() // flatten the Observable-of-Observables - * ); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link window} - * @see {@link windowCount} - * @see {@link windowTime} - * @see {@link windowToggle} - * @see {@link bufferWhen} - * - * @param closingSelector A function that takes no arguments and returns an - * {@link ObservableInput} (that gets converted to Observable) that signals - * (on either `next` or `complete`) when to close the previous window and - * start a new one. - * @return A function that returns an Observable of windows, which in turn are - * Observables. - */ -export declare function windowWhen(closingSelector: () => ObservableInput): OperatorFunction>; -//# sourceMappingURL=windowWhen.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/windowWhen.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/windowWhen.d.ts.map deleted file mode 100644 index 81ad4bc..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/windowWhen.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"windowWhen.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/windowWhen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAK7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC,GAAG,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAuE7G"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/withLatestFrom.d.ts b/node_modules/rxjs/dist/types/internal/operators/withLatestFrom.d.ts deleted file mode 100644 index 7cc3c18..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/withLatestFrom.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { OperatorFunction, ObservableInputTuple } from '../types'; -export declare function withLatestFrom(...inputs: [...ObservableInputTuple]): OperatorFunction; -export declare function withLatestFrom(...inputs: [...ObservableInputTuple, (...value: [T, ...O]) => R]): OperatorFunction; -//# sourceMappingURL=withLatestFrom.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/withLatestFrom.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/withLatestFrom.d.ts.map deleted file mode 100644 index 901d652..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/withLatestFrom.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"withLatestFrom.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/withLatestFrom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAQlE,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,SAAS,OAAO,EAAE,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;AAEhI,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,SAAS,OAAO,EAAE,EAAE,CAAC,EACtD,GAAG,MAAM,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,GAClE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/zip.d.ts b/node_modules/rxjs/dist/types/internal/operators/zip.d.ts deleted file mode 100644 index ecdb727..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/zip.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ObservableInputTuple, OperatorFunction, Cons } from '../types'; -/** @deprecated Replaced with {@link zipWith}. Will be removed in v8. */ -export declare function zip(otherInputs: [...ObservableInputTuple]): OperatorFunction>; -/** @deprecated Replaced with {@link zipWith}. Will be removed in v8. */ -export declare function zip(otherInputsAndProject: [...ObservableInputTuple], project: (...values: Cons) => R): OperatorFunction; -/** @deprecated Replaced with {@link zipWith}. Will be removed in v8. */ -export declare function zip(...otherInputs: [...ObservableInputTuple]): OperatorFunction>; -/** @deprecated Replaced with {@link zipWith}. Will be removed in v8. */ -export declare function zip(...otherInputsAndProject: [...ObservableInputTuple, (...values: Cons) => R]): OperatorFunction; -//# sourceMappingURL=zip.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/zip.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/zip.d.ts.map deleted file mode 100644 index 5b64813..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/zip.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"zip.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/zip.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,oBAAoB,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGzF,wEAAwE;AACxE,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,WAAW,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACjI,wEAAwE;AACxE,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,EACpD,qBAAqB,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,EACnD,OAAO,EAAE,CAAC,GAAG,MAAM,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,GACpC,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC1B,wEAAwE;AACxE,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,WAAW,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACpI,wEAAwE;AACxE,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,CAAC,EACpD,GAAG,qBAAqB,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,GACnF,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/zipAll.d.ts b/node_modules/rxjs/dist/types/internal/operators/zipAll.d.ts deleted file mode 100644 index 3c3276b..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/zipAll.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { OperatorFunction, ObservableInput } from '../types'; -/** - * Collects all observable inner sources from the source, once the source completes, - * it will subscribe to all inner sources, combining their values by index and emitting - * them. - * - * @see {@link zipWith} - * @see {@link zip} - */ -export declare function zipAll(): OperatorFunction, T[]>; -export declare function zipAll(): OperatorFunction; -export declare function zipAll(project: (...values: T[]) => R): OperatorFunction, R>; -export declare function zipAll(project: (...values: Array) => R): OperatorFunction; -//# sourceMappingURL=zipAll.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/zipAll.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/zipAll.d.ts.map deleted file mode 100644 index 52fe3f2..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/zipAll.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"zipAll.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/zipAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI7D;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,CAAC,KAAK,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AACvE,wBAAgB,MAAM,CAAC,CAAC,KAAK,gBAAgB,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;AACxD,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,KAAK,CAAC,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACtG,wBAAgB,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,gBAAgB,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/zipWith.d.ts b/node_modules/rxjs/dist/types/internal/operators/zipWith.d.ts deleted file mode 100644 index 42c9c0b..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/zipWith.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { ObservableInputTuple, OperatorFunction, Cons } from '../types'; -/** - * Subscribes to the source, and the observable inputs provided as arguments, and combines their values, by index, into arrays. - * - * What is meant by "combine by index": The first value from each will be made into a single array, then emitted, - * then the second value from each will be combined into a single array and emitted, then the third value - * from each will be combined into a single array and emitted, and so on. - * - * This will continue until it is no longer able to combine values of the same index into an array. - * - * After the last value from any one completed source is emitted in an array, the resulting observable will complete, - * as there is no way to continue "zipping" values together by index. - * - * Use-cases for this operator are limited. There are memory concerns if one of the streams is emitting - * values at a much faster rate than the others. Usage should likely be limited to streams that emit - * at a similar pace, or finite streams of known length. - * - * In many cases, authors want `combineLatestWith` and not `zipWith`. - * - * @param otherInputs other observable inputs to collate values from. - * @return A function that returns an Observable that emits items by index - * combined from the source Observable and provided Observables, in form of an - * array. - */ -export declare function zipWith(...otherInputs: [...ObservableInputTuple]): OperatorFunction>; -//# sourceMappingURL=zipWith.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/operators/zipWith.d.ts.map b/node_modules/rxjs/dist/types/internal/operators/zipWith.d.ts.map deleted file mode 100644 index b1a3a8f..0000000 --- a/node_modules/rxjs/dist/types/internal/operators/zipWith.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"zipWith.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/zipWith.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGxE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,WAAW,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAEtI"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/scheduleArray.d.ts b/node_modules/rxjs/dist/types/internal/scheduled/scheduleArray.d.ts deleted file mode 100644 index 7bab482..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduled/scheduleArray.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Observable } from '../Observable'; -import { SchedulerLike } from '../types'; -export declare function scheduleArray(input: ArrayLike, scheduler: SchedulerLike): Observable; -//# sourceMappingURL=scheduleArray.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/scheduleArray.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduled/scheduleArray.d.ts.map deleted file mode 100644 index b1f58de..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduled/scheduleArray.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scheduleArray.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,iBAuB7E"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/scheduleAsyncIterable.d.ts b/node_modules/rxjs/dist/types/internal/scheduled/scheduleAsyncIterable.d.ts deleted file mode 100644 index 2856f17..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduled/scheduleAsyncIterable.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { SchedulerLike } from '../types'; -import { Observable } from '../Observable'; -export declare function scheduleAsyncIterable(input: AsyncIterable, scheduler: SchedulerLike): Observable; -//# sourceMappingURL=scheduleAsyncIterable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/scheduleAsyncIterable.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduled/scheduleAsyncIterable.d.ts.map deleted file mode 100644 index 3052359..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduled/scheduleAsyncIterable.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scheduleAsyncIterable.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleAsyncIterable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,iBA0BzF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/scheduleIterable.d.ts b/node_modules/rxjs/dist/types/internal/scheduled/scheduleIterable.d.ts deleted file mode 100644 index 71dc623..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduled/scheduleIterable.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Observable } from '../Observable'; -import { SchedulerLike } from '../types'; -/** - * Used in {@link scheduled} to create an observable from an Iterable. - * @param input The iterable to create an observable from - * @param scheduler The scheduler to use - */ -export declare function scheduleIterable(input: Iterable, scheduler: SchedulerLike): Observable; -//# sourceMappingURL=scheduleIterable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/scheduleIterable.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduled/scheduleIterable.d.ts.map deleted file mode 100644 index 34939b7..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduled/scheduleIterable.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scheduleIterable.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleIterable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAKzC;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,iBAgD/E"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/scheduleObservable.d.ts b/node_modules/rxjs/dist/types/internal/scheduled/scheduleObservable.d.ts deleted file mode 100644 index 4b22bf8..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduled/scheduleObservable.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { InteropObservable, SchedulerLike } from '../types'; -export declare function scheduleObservable(input: InteropObservable, scheduler: SchedulerLike): import("../Observable").Observable; -//# sourceMappingURL=scheduleObservable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/scheduleObservable.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduled/scheduleObservable.d.ts.map deleted file mode 100644 index de60a0c..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduled/scheduleObservable.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scheduleObservable.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleObservable.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE5D,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,yCAE1F"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/schedulePromise.d.ts b/node_modules/rxjs/dist/types/internal/scheduled/schedulePromise.d.ts deleted file mode 100644 index 36c20bd..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduled/schedulePromise.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { SchedulerLike } from '../types'; -export declare function schedulePromise(input: PromiseLike, scheduler: SchedulerLike): import("../Observable").Observable; -//# sourceMappingURL=schedulePromise.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/schedulePromise.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduled/schedulePromise.d.ts.map deleted file mode 100644 index 3ab24da..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduled/schedulePromise.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"schedulePromise.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduled/schedulePromise.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,wBAAgB,eAAe,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,yCAEjF"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/scheduleReadableStreamLike.d.ts b/node_modules/rxjs/dist/types/internal/scheduled/scheduleReadableStreamLike.d.ts deleted file mode 100644 index 8377ea8..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduled/scheduleReadableStreamLike.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { SchedulerLike, ReadableStreamLike } from '../types'; -import { Observable } from '../Observable'; -export declare function scheduleReadableStreamLike(input: ReadableStreamLike, scheduler: SchedulerLike): Observable; -//# sourceMappingURL=scheduleReadableStreamLike.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/scheduleReadableStreamLike.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduled/scheduleReadableStreamLike.d.ts.map deleted file mode 100644 index d360350..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduled/scheduleReadableStreamLike.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scheduleReadableStreamLike.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduleReadableStreamLike.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,wBAAgB,0BAA0B,CAAC,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,GAAG,UAAU,CAAC,CAAC,CAAC,CAEnH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/scheduled.d.ts b/node_modules/rxjs/dist/types/internal/scheduled/scheduled.d.ts deleted file mode 100644 index 4309964..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduled/scheduled.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ObservableInput, SchedulerLike } from '../types'; -import { Observable } from '../Observable'; -/** - * Converts from a common {@link ObservableInput} type to an observable where subscription and emissions - * are scheduled on the provided scheduler. - * - * @see {@link from} - * @see {@link of} - * - * @param input The observable, array, promise, iterable, etc you would like to schedule - * @param scheduler The scheduler to use to schedule the subscription and emissions from - * the returned observable. - */ -export declare function scheduled(input: ObservableInput, scheduler: SchedulerLike): Observable; -//# sourceMappingURL=scheduled.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduled/scheduled.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduled/scheduled.d.ts.map deleted file mode 100644 index dcfb245..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduled/scheduled.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scheduled.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduled/scheduled.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,GAAG,UAAU,CAAC,CAAC,CAAC,CAsB/F"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/Action.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/Action.d.ts deleted file mode 100644 index 16cbf99..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/Action.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Scheduler } from '../Scheduler'; -import { Subscription } from '../Subscription'; -import { SchedulerAction } from '../types'; -/** - * A unit of work to be executed in a `scheduler`. An action is typically - * created from within a {@link SchedulerLike} and an RxJS user does not need to concern - * themselves about creating and manipulating an Action. - * - * ```ts - * class Action extends Subscription { - * new (scheduler: Scheduler, work: (state?: T) => void); - * schedule(state?: T, delay: number = 0): Subscription; - * } - * ``` - */ -export declare class Action extends Subscription { - constructor(scheduler: Scheduler, work: (this: SchedulerAction, state?: T) => void); - /** - * Schedules this action on its parent {@link SchedulerLike} for execution. May be passed - * some context object, `state`. May happen at some point in the future, - * according to the `delay` parameter, if specified. - * @param state Some contextual data that the `work` function uses when called by the - * Scheduler. - * @param delay Time to wait before executing the work, where the time unit is implicit - * and defined by the Scheduler. - * @return A subscription in order to be able to unsubscribe the scheduled work. - */ - schedule(state?: T, delay?: number): Subscription; -} -//# sourceMappingURL=Action.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/Action.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/Action.d.ts.map deleted file mode 100644 index 9f5bf4f..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/Action.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/Action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C;;;;;;;;;;;GAWG;AACH,qBAAa,MAAM,CAAC,CAAC,CAAE,SAAQ,YAAY;gBAC7B,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI;IAGrF;;;;;;;;;OASG;IACI,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,KAAK,GAAE,MAAU,GAAG,YAAY;CAG5D"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/AnimationFrameAction.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/AnimationFrameAction.d.ts deleted file mode 100644 index 5b1757d..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/AnimationFrameAction.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { AsyncAction } from './AsyncAction'; -import { AnimationFrameScheduler } from './AnimationFrameScheduler'; -import { SchedulerAction } from '../types'; -import { TimerHandle } from './timerHandle'; -export declare class AnimationFrameAction extends AsyncAction { - protected scheduler: AnimationFrameScheduler; - protected work: (this: SchedulerAction, state?: T) => void; - constructor(scheduler: AnimationFrameScheduler, work: (this: SchedulerAction, state?: T) => void); - protected requestAsyncId(scheduler: AnimationFrameScheduler, id?: TimerHandle, delay?: number): TimerHandle; - protected recycleAsyncId(scheduler: AnimationFrameScheduler, id?: TimerHandle, delay?: number): TimerHandle | undefined; -} -//# sourceMappingURL=AnimationFrameAction.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/AnimationFrameAction.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/AnimationFrameAction.d.ts.map deleted file mode 100644 index 494eb2b..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/AnimationFrameAction.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AnimationFrameAction.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/AnimationFrameAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,oBAAoB,CAAC,CAAC,CAAE,SAAQ,WAAW,CAAC,CAAC,CAAC;IAC7C,SAAS,CAAC,SAAS,EAAE,uBAAuB;IAAE,SAAS,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI;gBAAjG,SAAS,EAAE,uBAAuB,EAAY,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI;IAIvH,SAAS,CAAC,cAAc,CAAC,SAAS,EAAE,uBAAuB,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,KAAK,GAAE,MAAU,GAAG,WAAW;IAa9G,SAAS,CAAC,cAAc,CAAC,SAAS,EAAE,uBAAuB,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,KAAK,GAAE,MAAU,GAAG,WAAW,GAAG,SAAS;CAkB3H"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/AnimationFrameScheduler.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/AnimationFrameScheduler.d.ts deleted file mode 100644 index 333e229..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/AnimationFrameScheduler.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { AsyncAction } from './AsyncAction'; -import { AsyncScheduler } from './AsyncScheduler'; -export declare class AnimationFrameScheduler extends AsyncScheduler { - flush(action?: AsyncAction): void; -} -//# sourceMappingURL=AnimationFrameScheduler.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/AnimationFrameScheduler.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/AnimationFrameScheduler.d.ts.map deleted file mode 100644 index 391528e..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/AnimationFrameScheduler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AnimationFrameScheduler.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/AnimationFrameScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBAAa,uBAAwB,SAAQ,cAAc;IAClD,KAAK,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,IAAI;CAsC9C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/AsapAction.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/AsapAction.d.ts deleted file mode 100644 index f0549c6..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/AsapAction.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { AsyncAction } from './AsyncAction'; -import { AsapScheduler } from './AsapScheduler'; -import { SchedulerAction } from '../types'; -import { TimerHandle } from './timerHandle'; -export declare class AsapAction extends AsyncAction { - protected scheduler: AsapScheduler; - protected work: (this: SchedulerAction, state?: T) => void; - constructor(scheduler: AsapScheduler, work: (this: SchedulerAction, state?: T) => void); - protected requestAsyncId(scheduler: AsapScheduler, id?: TimerHandle, delay?: number): TimerHandle; - protected recycleAsyncId(scheduler: AsapScheduler, id?: TimerHandle, delay?: number): TimerHandle | undefined; -} -//# sourceMappingURL=AsapAction.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/AsapAction.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/AsapAction.d.ts.map deleted file mode 100644 index 0ea713a..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/AsapAction.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AsapAction.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsapAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,UAAU,CAAC,CAAC,CAAE,SAAQ,WAAW,CAAC,CAAC,CAAC;IACnC,SAAS,CAAC,SAAS,EAAE,aAAa;IAAE,SAAS,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI;gBAAvF,SAAS,EAAE,aAAa,EAAY,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI;IAI7G,SAAS,CAAC,cAAc,CAAC,SAAS,EAAE,aAAa,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,KAAK,GAAE,MAAU,GAAG,WAAW;IAapG,SAAS,CAAC,cAAc,CAAC,SAAS,EAAE,aAAa,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,KAAK,GAAE,MAAU,GAAG,WAAW,GAAG,SAAS;CAoBjH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/AsapScheduler.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/AsapScheduler.d.ts deleted file mode 100644 index cd83028..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/AsapScheduler.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { AsyncAction } from './AsyncAction'; -import { AsyncScheduler } from './AsyncScheduler'; -export declare class AsapScheduler extends AsyncScheduler { - flush(action?: AsyncAction): void; -} -//# sourceMappingURL=AsapScheduler.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/AsapScheduler.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/AsapScheduler.d.ts.map deleted file mode 100644 index 26ec193..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/AsapScheduler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AsapScheduler.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsapScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBAAa,aAAc,SAAQ,cAAc;IACxC,KAAK,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,IAAI;CAiC9C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/AsyncAction.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/AsyncAction.d.ts deleted file mode 100644 index 1b8f800..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/AsyncAction.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Action } from './Action'; -import { SchedulerAction } from '../types'; -import { Subscription } from '../Subscription'; -import { AsyncScheduler } from './AsyncScheduler'; -import { TimerHandle } from './timerHandle'; -export declare class AsyncAction extends Action { - protected scheduler: AsyncScheduler; - protected work: (this: SchedulerAction, state?: T) => void; - id: TimerHandle | undefined; - state?: T; - delay: number; - protected pending: boolean; - constructor(scheduler: AsyncScheduler, work: (this: SchedulerAction, state?: T) => void); - schedule(state?: T, delay?: number): Subscription; - protected requestAsyncId(scheduler: AsyncScheduler, _id?: TimerHandle, delay?: number): TimerHandle; - protected recycleAsyncId(_scheduler: AsyncScheduler, id?: TimerHandle, delay?: number | null): TimerHandle | undefined; - /** - * Immediately executes this action and the `work` it contains. - */ - execute(state: T, delay: number): any; - protected _execute(state: T, _delay: number): any; - unsubscribe(): void; -} -//# sourceMappingURL=AsyncAction.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/AsyncAction.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/AsyncAction.d.ts.map deleted file mode 100644 index 4d7fd00..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/AsyncAction.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AsyncAction.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsyncAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,WAAW,CAAC,CAAC,CAAE,SAAQ,MAAM,CAAC,CAAC,CAAC;IAO/B,SAAS,CAAC,SAAS,EAAE,cAAc;IAAE,SAAS,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI;IANvG,EAAE,EAAE,WAAW,GAAG,SAAS,CAAC;IAC5B,KAAK,CAAC,EAAE,CAAC,CAAC;IAEV,KAAK,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,OAAO,EAAE,OAAO,CAAS;gBAEb,SAAS,EAAE,cAAc,EAAY,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI;IAIvG,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,KAAK,GAAE,MAAU,GAAG,YAAY;IA+C3D,SAAS,CAAC,cAAc,CAAC,SAAS,EAAE,cAAc,EAAE,GAAG,CAAC,EAAE,WAAW,EAAE,KAAK,GAAE,MAAU,GAAG,WAAW;IAItG,SAAS,CAAC,cAAc,CAAC,UAAU,EAAE,cAAc,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,KAAK,GAAE,MAAM,GAAG,IAAQ,GAAG,WAAW,GAAG,SAAS;IAczH;;OAEG;IACI,OAAO,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG;IA2B5C,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,GAAG;IAkBjD,WAAW;CAiBZ"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/AsyncScheduler.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/AsyncScheduler.d.ts deleted file mode 100644 index fe9e006..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/AsyncScheduler.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Scheduler } from '../Scheduler'; -import { Action } from './Action'; -import { AsyncAction } from './AsyncAction'; -export declare class AsyncScheduler extends Scheduler { - actions: Array>; - constructor(SchedulerAction: typeof Action, now?: () => number); - flush(action: AsyncAction): void; -} -//# sourceMappingURL=AsyncScheduler.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/AsyncScheduler.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/AsyncScheduler.d.ts.map deleted file mode 100644 index ee8a954..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/AsyncScheduler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AsyncScheduler.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/AsyncScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,qBAAa,cAAe,SAAQ,SAAS;IACpC,OAAO,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAM;gBAejC,eAAe,EAAE,OAAO,MAAM,EAAE,GAAG,GAAE,MAAM,MAAsB;IAItE,KAAK,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,IAAI;CA0B7C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/QueueAction.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/QueueAction.d.ts deleted file mode 100644 index 7d476dc..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/QueueAction.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { AsyncAction } from './AsyncAction'; -import { Subscription } from '../Subscription'; -import { QueueScheduler } from './QueueScheduler'; -import { SchedulerAction } from '../types'; -import { TimerHandle } from './timerHandle'; -export declare class QueueAction extends AsyncAction { - protected scheduler: QueueScheduler; - protected work: (this: SchedulerAction, state?: T) => void; - constructor(scheduler: QueueScheduler, work: (this: SchedulerAction, state?: T) => void); - schedule(state?: T, delay?: number): Subscription; - execute(state: T, delay: number): any; - protected requestAsyncId(scheduler: QueueScheduler, id?: TimerHandle, delay?: number): TimerHandle; -} -//# sourceMappingURL=QueueAction.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/QueueAction.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/QueueAction.d.ts.map deleted file mode 100644 index 9731371..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/QueueAction.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"QueueAction.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/QueueAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,WAAW,CAAC,CAAC,CAAE,SAAQ,WAAW,CAAC,CAAC,CAAC;IACpC,SAAS,CAAC,SAAS,EAAE,cAAc;IAAE,SAAS,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI;gBAAxF,SAAS,EAAE,cAAc,EAAY,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI;IAIvG,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,KAAK,GAAE,MAAU,GAAG,YAAY;IAUpD,OAAO,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG;IAI5C,SAAS,CAAC,cAAc,CAAC,SAAS,EAAE,cAAc,EAAE,EAAE,CAAC,EAAE,WAAW,EAAE,KAAK,GAAE,MAAU,GAAG,WAAW;CAkBtG"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/QueueScheduler.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/QueueScheduler.d.ts deleted file mode 100644 index 46e29d5..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/QueueScheduler.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { AsyncScheduler } from './AsyncScheduler'; -export declare class QueueScheduler extends AsyncScheduler { -} -//# sourceMappingURL=QueueScheduler.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/QueueScheduler.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/QueueScheduler.d.ts.map deleted file mode 100644 index 32ddc64..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/QueueScheduler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"QueueScheduler.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/QueueScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,qBAAa,cAAe,SAAQ,cAAc;CACjD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/VirtualTimeScheduler.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/VirtualTimeScheduler.d.ts deleted file mode 100644 index 6c5df15..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/VirtualTimeScheduler.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { AsyncAction } from './AsyncAction'; -import { Subscription } from '../Subscription'; -import { AsyncScheduler } from './AsyncScheduler'; -import { SchedulerAction } from '../types'; -import { TimerHandle } from './timerHandle'; -export declare class VirtualTimeScheduler extends AsyncScheduler { - maxFrames: number; - /** @deprecated Not used in VirtualTimeScheduler directly. Will be removed in v8. */ - static frameTimeFactor: number; - /** - * The current frame for the state of the virtual scheduler instance. The difference - * between two "frames" is synonymous with the passage of "virtual time units". So if - * you record `scheduler.frame` to be `1`, then later, observe `scheduler.frame` to be at `11`, - * that means `10` virtual time units have passed. - */ - frame: number; - /** - * Used internally to examine the current virtual action index being processed. - * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. - */ - index: number; - /** - * This creates an instance of a `VirtualTimeScheduler`. Experts only. The signature of - * this constructor is likely to change in the long run. - * - * @param schedulerActionCtor The type of Action to initialize when initializing actions during scheduling. - * @param maxFrames The maximum number of frames to process before stopping. Used to prevent endless flush cycles. - */ - constructor(schedulerActionCtor?: typeof AsyncAction, maxFrames?: number); - /** - * Prompt the Scheduler to execute all of its queued actions, therefore - * clearing its queue. - */ - flush(): void; -} -export declare class VirtualAction extends AsyncAction { - protected scheduler: VirtualTimeScheduler; - protected work: (this: SchedulerAction, state?: T) => void; - protected index: number; - protected active: boolean; - constructor(scheduler: VirtualTimeScheduler, work: (this: SchedulerAction, state?: T) => void, index?: number); - schedule(state?: T, delay?: number): Subscription; - protected requestAsyncId(scheduler: VirtualTimeScheduler, id?: any, delay?: number): TimerHandle; - protected recycleAsyncId(scheduler: VirtualTimeScheduler, id?: any, delay?: number): TimerHandle | undefined; - protected _execute(state: T, delay: number): any; - private static sortActions; -} -//# sourceMappingURL=VirtualTimeScheduler.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/VirtualTimeScheduler.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/VirtualTimeScheduler.d.ts.map deleted file mode 100644 index 952f456..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/VirtualTimeScheduler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"VirtualTimeScheduler.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/VirtualTimeScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,qBAAa,oBAAqB,SAAQ,cAAc;IAyB6B,SAAS,EAAE,MAAM;IAxBpG,oFAAoF;IACpF,MAAM,CAAC,eAAe,SAAM;IAE5B;;;;;OAKG;IACI,KAAK,EAAE,MAAM,CAAK;IAEzB;;;OAGG;IACI,KAAK,EAAE,MAAM,CAAM;IAE1B;;;;;;OAMG;gBACS,mBAAmB,GAAE,OAAO,WAAkC,EAAS,SAAS,GAAE,MAAiB;IAI/G;;;OAGG;IACI,KAAK,IAAI,IAAI;CAqBrB;AAED,qBAAa,aAAa,CAAC,CAAC,CAAE,SAAQ,WAAW,CAAC,CAAC,CAAC;IAIhD,SAAS,CAAC,SAAS,EAAE,oBAAoB;IACzC,SAAS,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI;IAC7D,SAAS,CAAC,KAAK,EAAE,MAAM;IALzB,SAAS,CAAC,MAAM,EAAE,OAAO,CAAQ;gBAGrB,SAAS,EAAE,oBAAoB,EAC/B,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,EACnD,KAAK,GAAE,MAA+B;IAM3C,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,KAAK,GAAE,MAAU,GAAG,YAAY;IAoB3D,SAAS,CAAC,cAAc,CAAC,SAAS,EAAE,oBAAoB,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,GAAE,MAAU,GAAG,WAAW;IAQnG,SAAS,CAAC,cAAc,CAAC,SAAS,EAAE,oBAAoB,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,KAAK,GAAE,MAAU,GAAG,WAAW,GAAG,SAAS;IAI/G,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG;IAMhD,OAAO,CAAC,MAAM,CAAC,WAAW;CAe3B"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/animationFrame.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/animationFrame.d.ts deleted file mode 100644 index 0355d4a..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/animationFrame.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { AnimationFrameScheduler } from './AnimationFrameScheduler'; -/** - * - * Animation Frame Scheduler - * - * Perform task when `window.requestAnimationFrame` would fire - * - * When `animationFrame` scheduler is used with delay, it will fall back to {@link asyncScheduler} scheduler - * behaviour. - * - * Without delay, `animationFrame` scheduler can be used to create smooth browser animations. - * It makes sure scheduled task will happen just before next browser content repaint, - * thus performing animations as efficiently as possible. - * - * ## Example - * Schedule div height animation - * ```ts - * // html:
    - * import { animationFrameScheduler } from 'rxjs'; - * - * const div = document.querySelector('div'); - * - * animationFrameScheduler.schedule(function(height) { - * div.style.height = height + "px"; - * - * this.schedule(height + 1); // `this` references currently executing Action, - * // which we reschedule with new state - * }, 0, 0); - * - * // You will see a div element growing in height - * ``` - */ -export declare const animationFrameScheduler: AnimationFrameScheduler; -/** - * @deprecated Renamed to {@link animationFrameScheduler}. Will be removed in v8. - */ -export declare const animationFrame: AnimationFrameScheduler; -//# sourceMappingURL=animationFrame.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/animationFrame.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/animationFrame.d.ts.map deleted file mode 100644 index 10e71f5..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/animationFrame.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"animationFrame.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/animationFrame.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,eAAO,MAAM,uBAAuB,yBAAoD,CAAC;AAEzF;;GAEG;AACH,eAAO,MAAM,cAAc,yBAA0B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/animationFrameProvider.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/animationFrameProvider.d.ts deleted file mode 100644 index 71a733b..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/animationFrameProvider.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Subscription } from '../Subscription'; -interface AnimationFrameProvider { - schedule(callback: FrameRequestCallback): Subscription; - requestAnimationFrame: typeof requestAnimationFrame; - cancelAnimationFrame: typeof cancelAnimationFrame; - delegate: { - requestAnimationFrame: typeof requestAnimationFrame; - cancelAnimationFrame: typeof cancelAnimationFrame; - } | undefined; -} -export declare const animationFrameProvider: AnimationFrameProvider; -export {}; -//# sourceMappingURL=animationFrameProvider.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/animationFrameProvider.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/animationFrameProvider.d.ts.map deleted file mode 100644 index 150a954..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/animationFrameProvider.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"animationFrameProvider.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/animationFrameProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,GAAG,YAAY,CAAC;IACvD,qBAAqB,EAAE,OAAO,qBAAqB,CAAC;IACpD,oBAAoB,EAAE,OAAO,oBAAoB,CAAC;IAClD,QAAQ,EACJ;QACE,qBAAqB,EAAE,OAAO,qBAAqB,CAAC;QACpD,oBAAoB,EAAE,OAAO,oBAAoB,CAAC;KACnD,GACD,SAAS,CAAC;CACf;AAED,eAAO,MAAM,sBAAsB,EAAE,sBA6BpC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/asap.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/asap.d.ts deleted file mode 100644 index 48dfb98..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/asap.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { AsapScheduler } from './AsapScheduler'; -/** - * - * Asap Scheduler - * - * Perform task as fast as it can be performed asynchronously - * - * `asap` scheduler behaves the same as {@link asyncScheduler} scheduler when you use it to delay task - * in time. If however you set delay to `0`, `asap` will wait for current synchronously executing - * code to end and then it will try to execute given task as fast as possible. - * - * `asap` scheduler will do its best to minimize time between end of currently executing code - * and start of scheduled task. This makes it best candidate for performing so called "deferring". - * Traditionally this was achieved by calling `setTimeout(deferredTask, 0)`, but that technique involves - * some (although minimal) unwanted delay. - * - * Note that using `asap` scheduler does not necessarily mean that your task will be first to process - * after currently executing code. In particular, if some task was also scheduled with `asap` before, - * that task will execute first. That being said, if you need to schedule task asynchronously, but - * as soon as possible, `asap` scheduler is your best bet. - * - * ## Example - * Compare async and asap scheduler< - * ```ts - * import { asapScheduler, asyncScheduler } from 'rxjs'; - * - * asyncScheduler.schedule(() => console.log('async')); // scheduling 'async' first... - * asapScheduler.schedule(() => console.log('asap')); - * - * // Logs: - * // "asap" - * // "async" - * // ... but 'asap' goes first! - * ``` - */ -export declare const asapScheduler: AsapScheduler; -/** - * @deprecated Renamed to {@link asapScheduler}. Will be removed in v8. - */ -export declare const asap: AsapScheduler; -//# sourceMappingURL=asap.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/asap.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/asap.d.ts.map deleted file mode 100644 index 979373f..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/asap.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"asap.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/asap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,eAAO,MAAM,aAAa,eAAgC,CAAC;AAE3D;;GAEG;AACH,eAAO,MAAM,IAAI,eAAgB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/async.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/async.d.ts deleted file mode 100644 index c08a5b4..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/async.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { AsyncScheduler } from './AsyncScheduler'; -/** - * - * Async Scheduler - * - * Schedule task as if you used setTimeout(task, duration) - * - * `async` scheduler schedules tasks asynchronously, by putting them on the JavaScript - * event loop queue. It is best used to delay tasks in time or to schedule tasks repeating - * in intervals. - * - * If you just want to "defer" task, that is to perform it right after currently - * executing synchronous code ends (commonly achieved by `setTimeout(deferredTask, 0)`), - * better choice will be the {@link asapScheduler} scheduler. - * - * ## Examples - * Use async scheduler to delay task - * ```ts - * import { asyncScheduler } from 'rxjs'; - * - * const task = () => console.log('it works!'); - * - * asyncScheduler.schedule(task, 2000); - * - * // After 2 seconds logs: - * // "it works!" - * ``` - * - * Use async scheduler to repeat task in intervals - * ```ts - * import { asyncScheduler } from 'rxjs'; - * - * function task(state) { - * console.log(state); - * this.schedule(state + 1, 1000); // `this` references currently executing Action, - * // which we reschedule with new state and delay - * } - * - * asyncScheduler.schedule(task, 3000, 0); - * - * // Logs: - * // 0 after 3s - * // 1 after 4s - * // 2 after 5s - * // 3 after 6s - * ``` - */ -export declare const asyncScheduler: AsyncScheduler; -/** - * @deprecated Renamed to {@link asyncScheduler}. Will be removed in v8. - */ -export declare const async: AsyncScheduler; -//# sourceMappingURL=async.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/async.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/async.d.ts.map deleted file mode 100644 index 678fa13..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/async.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/async.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,eAAO,MAAM,cAAc,gBAAkC,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,KAAK,gBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/dateTimestampProvider.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/dateTimestampProvider.d.ts deleted file mode 100644 index f88403f..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/dateTimestampProvider.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { TimestampProvider } from '../types'; -interface DateTimestampProvider extends TimestampProvider { - delegate: TimestampProvider | undefined; -} -export declare const dateTimestampProvider: DateTimestampProvider; -export {}; -//# sourceMappingURL=dateTimestampProvider.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/dateTimestampProvider.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/dateTimestampProvider.d.ts.map deleted file mode 100644 index 26ca11a..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/dateTimestampProvider.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dateTimestampProvider.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/dateTimestampProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,UAAU,qBAAsB,SAAQ,iBAAiB;IACvD,QAAQ,EAAE,iBAAiB,GAAG,SAAS,CAAC;CACzC;AAED,eAAO,MAAM,qBAAqB,EAAE,qBAOnC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/immediateProvider.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/immediateProvider.d.ts deleted file mode 100644 index 8226a71..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/immediateProvider.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { TimerHandle } from './timerHandle'; -declare type SetImmediateFunction = (handler: () => void, ...args: any[]) => TimerHandle; -declare type ClearImmediateFunction = (handle: TimerHandle) => void; -interface ImmediateProvider { - setImmediate: SetImmediateFunction; - clearImmediate: ClearImmediateFunction; - delegate: { - setImmediate: SetImmediateFunction; - clearImmediate: ClearImmediateFunction; - } | undefined; -} -export declare const immediateProvider: ImmediateProvider; -export {}; -//# sourceMappingURL=immediateProvider.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/immediateProvider.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/immediateProvider.d.ts.map deleted file mode 100644 index 17cfb10..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/immediateProvider.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"immediateProvider.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/immediateProvider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjD,aAAK,oBAAoB,GAAG,CAAC,OAAO,EAAE,MAAM,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,WAAW,CAAC;AACjF,aAAK,sBAAsB,GAAG,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;AAE5D,UAAU,iBAAiB;IACzB,YAAY,EAAE,oBAAoB,CAAC;IACnC,cAAc,EAAE,sBAAsB,CAAC;IACvC,QAAQ,EACJ;QACE,YAAY,EAAE,oBAAoB,CAAC;QACnC,cAAc,EAAE,sBAAsB,CAAC;KACxC,GACD,SAAS,CAAC;CACf;AAED,eAAO,MAAM,iBAAiB,EAAE,iBAY/B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/intervalProvider.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/intervalProvider.d.ts deleted file mode 100644 index cda8e4f..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/intervalProvider.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { TimerHandle } from './timerHandle'; -declare type SetIntervalFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle; -declare type ClearIntervalFunction = (handle: TimerHandle) => void; -interface IntervalProvider { - setInterval: SetIntervalFunction; - clearInterval: ClearIntervalFunction; - delegate: { - setInterval: SetIntervalFunction; - clearInterval: ClearIntervalFunction; - } | undefined; -} -export declare const intervalProvider: IntervalProvider; -export {}; -//# sourceMappingURL=intervalProvider.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/intervalProvider.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/intervalProvider.d.ts.map deleted file mode 100644 index 68dbec4..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/intervalProvider.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"intervalProvider.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/intervalProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,aAAK,mBAAmB,GAAG,CAAC,OAAO,EAAE,MAAM,IAAI,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,WAAW,CAAC;AAClG,aAAK,qBAAqB,GAAG,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;AAE3D,UAAU,gBAAgB;IACxB,WAAW,EAAE,mBAAmB,CAAC;IACjC,aAAa,EAAE,qBAAqB,CAAC;IACrC,QAAQ,EACJ;QACE,WAAW,EAAE,mBAAmB,CAAC;QACjC,aAAa,EAAE,qBAAqB,CAAC;KACtC,GACD,SAAS,CAAC;CACf;AAED,eAAO,MAAM,gBAAgB,EAAE,gBAe9B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/performanceTimestampProvider.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/performanceTimestampProvider.d.ts deleted file mode 100644 index 6a15ad3..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/performanceTimestampProvider.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { TimestampProvider } from '../types'; -interface PerformanceTimestampProvider extends TimestampProvider { - delegate: TimestampProvider | undefined; -} -export declare const performanceTimestampProvider: PerformanceTimestampProvider; -export {}; -//# sourceMappingURL=performanceTimestampProvider.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/performanceTimestampProvider.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/performanceTimestampProvider.d.ts.map deleted file mode 100644 index 4250539..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/performanceTimestampProvider.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"performanceTimestampProvider.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/performanceTimestampProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,UAAU,4BAA6B,SAAQ,iBAAiB;IAC9D,QAAQ,EAAE,iBAAiB,GAAG,SAAS,CAAC;CACzC;AAED,eAAO,MAAM,4BAA4B,EAAE,4BAO1C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/queue.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/queue.d.ts deleted file mode 100644 index e038f3c..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/queue.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { QueueScheduler } from './QueueScheduler'; -/** - * - * Queue Scheduler - * - * Put every next task on a queue, instead of executing it immediately - * - * `queue` scheduler, when used with delay, behaves the same as {@link asyncScheduler} scheduler. - * - * When used without delay, it schedules given task synchronously - executes it right when - * it is scheduled. However when called recursively, that is when inside the scheduled task, - * another task is scheduled with queue scheduler, instead of executing immediately as well, - * that task will be put on a queue and wait for current one to finish. - * - * This means that when you execute task with `queue` scheduler, you are sure it will end - * before any other task scheduled with that scheduler will start. - * - * ## Examples - * Schedule recursively first, then do something - * ```ts - * import { queueScheduler } from 'rxjs'; - * - * queueScheduler.schedule(() => { - * queueScheduler.schedule(() => console.log('second')); // will not happen now, but will be put on a queue - * - * console.log('first'); - * }); - * - * // Logs: - * // "first" - * // "second" - * ``` - * - * Reschedule itself recursively - * ```ts - * import { queueScheduler } from 'rxjs'; - * - * queueScheduler.schedule(function(state) { - * if (state !== 0) { - * console.log('before', state); - * this.schedule(state - 1); // `this` references currently executing Action, - * // which we reschedule with new state - * console.log('after', state); - * } - * }, 0, 3); - * - * // In scheduler that runs recursively, you would expect: - * // "before", 3 - * // "before", 2 - * // "before", 1 - * // "after", 1 - * // "after", 2 - * // "after", 3 - * - * // But with queue it logs: - * // "before", 3 - * // "after", 3 - * // "before", 2 - * // "after", 2 - * // "before", 1 - * // "after", 1 - * ``` - */ -export declare const queueScheduler: QueueScheduler; -/** - * @deprecated Renamed to {@link queueScheduler}. Will be removed in v8. - */ -export declare const queue: QueueScheduler; -//# sourceMappingURL=queue.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/queue.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/queue.d.ts.map deleted file mode 100644 index fdd91e6..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/queue.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/queue.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AAEH,eAAO,MAAM,cAAc,gBAAkC,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,KAAK,gBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/timeoutProvider.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/timeoutProvider.d.ts deleted file mode 100644 index 0da3da8..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/timeoutProvider.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { TimerHandle } from './timerHandle'; -declare type SetTimeoutFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle; -declare type ClearTimeoutFunction = (handle: TimerHandle) => void; -interface TimeoutProvider { - setTimeout: SetTimeoutFunction; - clearTimeout: ClearTimeoutFunction; - delegate: { - setTimeout: SetTimeoutFunction; - clearTimeout: ClearTimeoutFunction; - } | undefined; -} -export declare const timeoutProvider: TimeoutProvider; -export {}; -//# sourceMappingURL=timeoutProvider.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/timeoutProvider.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/timeoutProvider.d.ts.map deleted file mode 100644 index 379161e..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/timeoutProvider.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timeoutProvider.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/timeoutProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,aAAK,kBAAkB,GAAG,CAAC,OAAO,EAAE,MAAM,IAAI,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,WAAW,CAAC;AACjG,aAAK,oBAAoB,GAAG,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;AAE1D,UAAU,eAAe;IACvB,UAAU,EAAE,kBAAkB,CAAC;IAC/B,YAAY,EAAE,oBAAoB,CAAC;IACnC,QAAQ,EACJ;QACE,UAAU,EAAE,kBAAkB,CAAC;QAC/B,YAAY,EAAE,oBAAoB,CAAC;KACpC,GACD,SAAS,CAAC;CACf;AAED,eAAO,MAAM,eAAe,EAAE,eAe7B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/timerHandle.d.ts b/node_modules/rxjs/dist/types/internal/scheduler/timerHandle.d.ts deleted file mode 100644 index c023a37..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/timerHandle.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare type TimerHandle = number | ReturnType; -//# sourceMappingURL=timerHandle.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/scheduler/timerHandle.d.ts.map b/node_modules/rxjs/dist/types/internal/scheduler/timerHandle.d.ts.map deleted file mode 100644 index 9a49462..0000000 --- a/node_modules/rxjs/dist/types/internal/scheduler/timerHandle.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timerHandle.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/timerHandle.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW,GAAG,MAAM,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/symbol/iterator.d.ts b/node_modules/rxjs/dist/types/internal/symbol/iterator.d.ts deleted file mode 100644 index 19a41cd..0000000 --- a/node_modules/rxjs/dist/types/internal/symbol/iterator.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare function getSymbolIterator(): symbol; -export declare const iterator: symbol; -//# sourceMappingURL=iterator.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/symbol/iterator.d.ts.map b/node_modules/rxjs/dist/types/internal/symbol/iterator.d.ts.map deleted file mode 100644 index a3c59d4..0000000 --- a/node_modules/rxjs/dist/types/internal/symbol/iterator.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"iterator.d.ts","sourceRoot":"","sources":["../../../../src/internal/symbol/iterator.ts"],"names":[],"mappings":"AAAA,wBAAgB,iBAAiB,IAAI,MAAM,CAM1C;AAED,eAAO,MAAM,QAAQ,QAAsB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/symbol/observable.d.ts b/node_modules/rxjs/dist/types/internal/symbol/observable.d.ts deleted file mode 100644 index 0c49b30..0000000 --- a/node_modules/rxjs/dist/types/internal/symbol/observable.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Symbol.observable or a string "@@observable". Used for interop - * - * @deprecated We will no longer be exporting this symbol in upcoming versions of RxJS. - * Instead polyfill and use Symbol.observable directly *or* use https://www.npmjs.com/package/symbol-observable - */ -export declare const observable: string | symbol; -//# sourceMappingURL=observable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/symbol/observable.d.ts.map b/node_modules/rxjs/dist/types/internal/symbol/observable.d.ts.map deleted file mode 100644 index 08daa1e..0000000 --- a/node_modules/rxjs/dist/types/internal/symbol/observable.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"observable.d.ts","sourceRoot":"","sources":["../../../../src/internal/symbol/observable.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,GAAG,MAAwF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/testing/ColdObservable.d.ts b/node_modules/rxjs/dist/types/internal/testing/ColdObservable.d.ts deleted file mode 100644 index 76b175a..0000000 --- a/node_modules/rxjs/dist/types/internal/testing/ColdObservable.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Observable } from '../Observable'; -import { Scheduler } from '../Scheduler'; -import { TestMessage } from './TestMessage'; -import { SubscriptionLog } from './SubscriptionLog'; -import { SubscriptionLoggable } from './SubscriptionLoggable'; -import { Subscriber } from '../Subscriber'; -export declare class ColdObservable extends Observable implements SubscriptionLoggable { - messages: TestMessage[]; - subscriptions: SubscriptionLog[]; - scheduler: Scheduler; - logSubscribedFrame: () => number; - logUnsubscribedFrame: (index: number) => void; - constructor(messages: TestMessage[], scheduler: Scheduler); - scheduleMessages(subscriber: Subscriber): void; -} -//# sourceMappingURL=ColdObservable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/testing/ColdObservable.d.ts.map b/node_modules/rxjs/dist/types/internal/testing/ColdObservable.d.ts.map deleted file mode 100644 index bf1cfff..0000000 --- a/node_modules/rxjs/dist/types/internal/testing/ColdObservable.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ColdObservable.d.ts","sourceRoot":"","sources":["../../../../src/internal/testing/ColdObservable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,qBAAa,cAAc,CAAC,CAAC,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAE,YAAW,oBAAoB;IAQ/D,QAAQ,EAAE,WAAW,EAAE;IAPnC,aAAa,EAAE,eAAe,EAAE,CAAM;IAC7C,SAAS,EAAE,SAAS,CAAC;IAErB,kBAAkB,EAAE,MAAM,MAAM,CAAC;IAEjC,oBAAoB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;gBAE3B,QAAQ,EAAE,WAAW,EAAE,EAAE,SAAS,EAAE,SAAS;IAgBhE,gBAAgB,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,CAAC;CAgB7C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/testing/HotObservable.d.ts b/node_modules/rxjs/dist/types/internal/testing/HotObservable.d.ts deleted file mode 100644 index f296694..0000000 --- a/node_modules/rxjs/dist/types/internal/testing/HotObservable.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Subject } from '../Subject'; -import { Scheduler } from '../Scheduler'; -import { TestMessage } from './TestMessage'; -import { SubscriptionLog } from './SubscriptionLog'; -import { SubscriptionLoggable } from './SubscriptionLoggable'; -export declare class HotObservable extends Subject implements SubscriptionLoggable { - messages: TestMessage[]; - subscriptions: SubscriptionLog[]; - scheduler: Scheduler; - logSubscribedFrame: () => number; - logUnsubscribedFrame: (index: number) => void; - constructor(messages: TestMessage[], scheduler: Scheduler); - setup(): void; -} -//# sourceMappingURL=HotObservable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/testing/HotObservable.d.ts.map b/node_modules/rxjs/dist/types/internal/testing/HotObservable.d.ts.map deleted file mode 100644 index 9cada0a..0000000 --- a/node_modules/rxjs/dist/types/internal/testing/HotObservable.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"HotObservable.d.ts","sourceRoot":"","sources":["../../../../src/internal/testing/HotObservable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAGrC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAI9D,qBAAa,aAAa,CAAC,CAAC,CAAE,SAAQ,OAAO,CAAC,CAAC,CAAE,YAAW,oBAAoB;IAQ3D,QAAQ,EAAE,WAAW,EAAE;IAPnC,aAAa,EAAE,eAAe,EAAE,CAAM;IAC7C,SAAS,EAAE,SAAS,CAAC;IAErB,kBAAkB,EAAE,MAAM,MAAM,CAAC;IAEjC,oBAAoB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;gBAE3B,QAAQ,EAAE,WAAW,EAAE,EAAE,SAAS,EAAE,SAAS;IAmBhE,KAAK;CAcN"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/testing/SubscriptionLog.d.ts b/node_modules/rxjs/dist/types/internal/testing/SubscriptionLog.d.ts deleted file mode 100644 index f029e80..0000000 --- a/node_modules/rxjs/dist/types/internal/testing/SubscriptionLog.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export declare class SubscriptionLog { - subscribedFrame: number; - unsubscribedFrame: number; - constructor(subscribedFrame: number, unsubscribedFrame?: number); -} -//# sourceMappingURL=SubscriptionLog.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/testing/SubscriptionLog.d.ts.map b/node_modules/rxjs/dist/types/internal/testing/SubscriptionLog.d.ts.map deleted file mode 100644 index 4b57b08..0000000 --- a/node_modules/rxjs/dist/types/internal/testing/SubscriptionLog.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SubscriptionLog.d.ts","sourceRoot":"","sources":["../../../../src/internal/testing/SubscriptionLog.ts"],"names":[],"mappings":"AAAA,qBAAa,eAAe;IACP,eAAe,EAAE,MAAM;IACvB,iBAAiB,EAAE,MAAM;gBADzB,eAAe,EAAE,MAAM,EACvB,iBAAiB,GAAE,MAAiB;CAExD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/testing/SubscriptionLoggable.d.ts b/node_modules/rxjs/dist/types/internal/testing/SubscriptionLoggable.d.ts deleted file mode 100644 index 2b21758..0000000 --- a/node_modules/rxjs/dist/types/internal/testing/SubscriptionLoggable.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Scheduler } from '../Scheduler'; -import { SubscriptionLog } from './SubscriptionLog'; -export declare class SubscriptionLoggable { - subscriptions: SubscriptionLog[]; - scheduler: Scheduler; - logSubscribedFrame(): number; - logUnsubscribedFrame(index: number): void; -} -//# sourceMappingURL=SubscriptionLoggable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/testing/SubscriptionLoggable.d.ts.map b/node_modules/rxjs/dist/types/internal/testing/SubscriptionLoggable.d.ts.map deleted file mode 100644 index 113e268..0000000 --- a/node_modules/rxjs/dist/types/internal/testing/SubscriptionLoggable.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SubscriptionLoggable.d.ts","sourceRoot":"","sources":["../../../../src/internal/testing/SubscriptionLoggable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,qBAAa,oBAAoB;IACxB,aAAa,EAAE,eAAe,EAAE,CAAM;IAE7C,SAAS,EAAE,SAAS,CAAC;IAErB,kBAAkB,IAAI,MAAM;IAK5B,oBAAoB,CAAC,KAAK,EAAE,MAAM;CAQnC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/testing/TestMessage.d.ts b/node_modules/rxjs/dist/types/internal/testing/TestMessage.d.ts deleted file mode 100644 index de58893..0000000 --- a/node_modules/rxjs/dist/types/internal/testing/TestMessage.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { ObservableNotification } from '../types'; -export interface TestMessage { - frame: number; - notification: ObservableNotification; - isGhost?: boolean; -} -//# sourceMappingURL=TestMessage.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/testing/TestMessage.d.ts.map b/node_modules/rxjs/dist/types/internal/testing/TestMessage.d.ts.map deleted file mode 100644 index 250c8e0..0000000 --- a/node_modules/rxjs/dist/types/internal/testing/TestMessage.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TestMessage.d.ts","sourceRoot":"","sources":["../../../../src/internal/testing/TestMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAElD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,sBAAsB,CAAC,GAAG,CAAC,CAAC;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/testing/TestScheduler.d.ts b/node_modules/rxjs/dist/types/internal/testing/TestScheduler.d.ts deleted file mode 100644 index 06cad52..0000000 --- a/node_modules/rxjs/dist/types/internal/testing/TestScheduler.d.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { Observable } from '../Observable'; -import { ColdObservable } from './ColdObservable'; -import { HotObservable } from './HotObservable'; -import { TestMessage } from './TestMessage'; -import { SubscriptionLog } from './SubscriptionLog'; -import { VirtualTimeScheduler } from '../scheduler/VirtualTimeScheduler'; -export interface RunHelpers { - cold: typeof TestScheduler.prototype.createColdObservable; - hot: typeof TestScheduler.prototype.createHotObservable; - flush: typeof TestScheduler.prototype.flush; - time: typeof TestScheduler.prototype.createTime; - expectObservable: typeof TestScheduler.prototype.expectObservable; - expectSubscriptions: typeof TestScheduler.prototype.expectSubscriptions; - animate: (marbles: string) => void; -} -export declare type observableToBeFn = (marbles: string, values?: any, errorValue?: any) => void; -export declare type subscriptionLogsToBeFn = (marbles: string | string[]) => void; -export declare class TestScheduler extends VirtualTimeScheduler { - assertDeepEqual: (actual: any, expected: any) => boolean | void; - /** - * The number of virtual time units each character in a marble diagram represents. If - * the test scheduler is being used in "run mode", via the `run` method, this is temporarily - * set to `1` for the duration of the `run` block, then set back to whatever value it was. - */ - static frameTimeFactor: number; - /** - * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. - */ - readonly hotObservables: HotObservable[]; - /** - * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. - */ - readonly coldObservables: ColdObservable[]; - /** - * Test meta data to be processed during `flush()` - */ - private flushTests; - /** - * Indicates whether the TestScheduler instance is operating in "run mode", - * meaning it's processing a call to `run()` - */ - private runMode; - /** - * - * @param assertDeepEqual A function to set up your assertion for your test harness - */ - constructor(assertDeepEqual: (actual: any, expected: any) => boolean | void); - createTime(marbles: string): number; - /** - * @param marbles A diagram in the marble DSL. Letters map to keys in `values` if provided. - * @param values Values to use for the letters in `marbles`. If omitted, the letters themselves are used. - * @param error The error to use for the `#` marble (if present). - */ - createColdObservable(marbles: string, values?: { - [marble: string]: T; - }, error?: any): ColdObservable; - /** - * @param marbles A diagram in the marble DSL. Letters map to keys in `values` if provided. - * @param values Values to use for the letters in `marbles`. If omitted, the letters themselves are used. - * @param error The error to use for the `#` marble (if present). - */ - createHotObservable(marbles: string, values?: { - [marble: string]: T; - }, error?: any): HotObservable; - private materializeInnerObservable; - expectObservable(observable: Observable, subscriptionMarbles?: string | null): { - toBe(marbles: string, values?: any, errorValue?: any): void; - toEqual: (other: Observable) => void; - }; - expectSubscriptions(actualSubscriptionLogs: SubscriptionLog[]): { - toBe: subscriptionLogsToBeFn; - }; - flush(): void; - static parseMarblesAsSubscriptions(marbles: string | null, runMode?: boolean): SubscriptionLog; - static parseMarbles(marbles: string, values?: any, errorValue?: any, materializeInnerObservables?: boolean, runMode?: boolean): TestMessage[]; - private createAnimator; - private createDelegates; - /** - * The `run` method performs the test in 'run mode' - in which schedulers - * used within the test automatically delegate to the `TestScheduler`. That - * is, in 'run mode' there is no need to explicitly pass a `TestScheduler` - * instance to observable creators or operators. - * - * @see {@link /guide/testing/marble-testing} - */ - run(callback: (helpers: RunHelpers) => T): T; -} -//# sourceMappingURL=TestScheduler.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/testing/TestScheduler.d.ts.map b/node_modules/rxjs/dist/types/internal/testing/TestScheduler.d.ts.map deleted file mode 100644 index 4499f14..0000000 --- a/node_modules/rxjs/dist/types/internal/testing/TestScheduler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TestScheduler.d.ts","sourceRoot":"","sources":["../../../../src/internal/testing/TestScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,oBAAoB,EAAiB,MAAM,mCAAmC,CAAC;AAaxF,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,OAAO,aAAa,CAAC,SAAS,CAAC,oBAAoB,CAAC;IAC1D,GAAG,EAAE,OAAO,aAAa,CAAC,SAAS,CAAC,mBAAmB,CAAC;IACxD,KAAK,EAAE,OAAO,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC;IAC5C,IAAI,EAAE,OAAO,aAAa,CAAC,SAAS,CAAC,UAAU,CAAC;IAChD,gBAAgB,EAAE,OAAO,aAAa,CAAC,SAAS,CAAC,gBAAgB,CAAC;IAClE,mBAAmB,EAAE,OAAO,aAAa,CAAC,SAAS,CAAC,mBAAmB,CAAC;IACxE,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAQD,oBAAY,gBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,EAAE,UAAU,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;AACzF,oBAAY,sBAAsB,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI,CAAC;AAE1E,qBAAa,aAAc,SAAQ,oBAAoB;IAiClC,eAAe,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,KAAK,OAAO,GAAG,IAAI;IAhClF;;;;OAIG;IACH,MAAM,CAAC,eAAe,SAAM;IAE5B;;OAEG;IACH,SAAgB,cAAc,EAAE,aAAa,CAAC,GAAG,CAAC,EAAE,CAAM;IAE1D;;OAEG;IACH,SAAgB,eAAe,EAAE,cAAc,CAAC,GAAG,CAAC,EAAE,CAAM;IAE5D;;OAEG;IACH,OAAO,CAAC,UAAU,CAAuB;IAEzC;;;OAGG;IACH,OAAO,CAAC,OAAO,CAAS;IAExB;;;OAGG;gBACgB,eAAe,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,KAAK,OAAO,GAAG,IAAI;IAIlF,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAQnC;;;;OAIG;IACH,oBAAoB,CAAC,CAAC,GAAG,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,CAAA;KAAE,EAAE,KAAK,CAAC,EAAE,GAAG,GAAG,cAAc,CAAC,CAAC,CAAC;IAanH;;;;OAIG;IACH,mBAAmB,CAAC,CAAC,GAAG,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,CAAA;KAAE,EAAE,KAAK,CAAC,EAAE,GAAG,GAAG,aAAa,CAAC,CAAC,CAAC;IAUjH,OAAO,CAAC,0BAA0B;IAgBlC,gBAAgB,CAAC,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,mBAAmB,GAAE,MAAM,GAAG,IAAW;sBAgCtE,MAAM,WAAW,GAAG,eAAe,GAAG;yBAInC,WAAW,CAAC,CAAC;;IAsBlC,mBAAmB,CAAC,sBAAsB,EAAE,eAAe,EAAE,GAAG;QAAE,IAAI,EAAE,sBAAsB,CAAA;KAAE;IAehG,KAAK;IAiBL,MAAM,CAAC,2BAA2B,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,UAAQ,GAAG,eAAe;IAiG5F,MAAM,CAAC,YAAY,CACjB,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,GAAG,EACZ,UAAU,CAAC,EAAE,GAAG,EAChB,2BAA2B,GAAE,OAAe,EAC5C,OAAO,UAAQ,GACd,WAAW,EAAE;IA4GhB,OAAO,CAAC,cAAc;IA+DtB,OAAO,CAAC,eAAe;IA8IvB;;;;;;;OAOG;IACH,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,UAAU,KAAK,CAAC,GAAG,CAAC;CA2ChD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/types.d.ts b/node_modules/rxjs/dist/types/internal/types.d.ts deleted file mode 100644 index 16fe5e1..0000000 --- a/node_modules/rxjs/dist/types/internal/types.d.ts +++ /dev/null @@ -1,307 +0,0 @@ -/// -import { Observable } from './Observable'; -import { Subscription } from './Subscription'; -/** - * Note: This will add Symbol.observable globally for all TypeScript users, - * however, we are no longer polyfilling Symbol.observable - */ -declare global { - interface SymbolConstructor { - readonly observable: symbol; - } -} -/** - * A function type interface that describes a function that accepts one parameter `T` - * and returns another parameter `R`. - * - * Usually used to describe {@link OperatorFunction} - it always takes a single - * parameter (the source Observable) and returns another Observable. - */ -export interface UnaryFunction { - (source: T): R; -} -export interface OperatorFunction extends UnaryFunction, Observable> { -} -export declare type FactoryOrValue = T | (() => T); -/** - * A function type interface that describes a function that accepts and returns a parameter of the same type. - * - * Used to describe {@link OperatorFunction} with the only one type: `OperatorFunction`. - * - */ -export interface MonoTypeOperatorFunction extends OperatorFunction { -} -/** - * A value and the time at which it was emitted. - * - * Emitted by the `timestamp` operator - * - * @see {@link timestamp} - */ -export interface Timestamp { - value: T; - /** - * The timestamp. By default, this is in epoch milliseconds. - * Could vary based on the timestamp provider passed to the operator. - */ - timestamp: number; -} -/** - * A value emitted and the amount of time since the last value was emitted. - * - * Emitted by the `timeInterval` operator. - * - * @see {@link timeInterval} - */ -export interface TimeInterval { - value: T; - /** - * The amount of time between this value's emission and the previous value's emission. - * If this is the first emitted value, then it will be the amount of time since subscription - * started. - */ - interval: number; -} -export interface Unsubscribable { - unsubscribe(): void; -} -export declare type TeardownLogic = Subscription | Unsubscribable | (() => void) | void; -export interface SubscriptionLike extends Unsubscribable { - unsubscribe(): void; - readonly closed: boolean; -} -/** - * @deprecated Do not use. Most likely you want to use `ObservableInput`. Will be removed in v8. - */ -export declare type SubscribableOrPromise = Subscribable | Subscribable | PromiseLike | InteropObservable; -/** OBSERVABLE INTERFACES */ -export interface Subscribable { - subscribe(observer: Partial>): Unsubscribable; -} -/** - * Valid types that can be converted to observables. - */ -export declare type ObservableInput = Observable | InteropObservable | AsyncIterable | PromiseLike | ArrayLike | Iterable | ReadableStreamLike; -/** - * @deprecated Renamed to {@link InteropObservable }. Will be removed in v8. - */ -export declare type ObservableLike = InteropObservable; -/** - * An object that implements the `Symbol.observable` interface. - */ -export interface InteropObservable { - [Symbol.observable]: () => Subscribable; -} -/** - * A notification representing a "next" from an observable. - * Can be used with {@link dematerialize}. - */ -export interface NextNotification { - /** The kind of notification. Always "N" */ - kind: 'N'; - /** The value of the notification. */ - value: T; -} -/** - * A notification representing an "error" from an observable. - * Can be used with {@link dematerialize}. - */ -export interface ErrorNotification { - /** The kind of notification. Always "E" */ - kind: 'E'; - error: any; -} -/** - * A notification representing a "completion" from an observable. - * Can be used with {@link dematerialize}. - */ -export interface CompleteNotification { - kind: 'C'; -} -/** - * Valid observable notification types. - */ -export declare type ObservableNotification = NextNotification | ErrorNotification | CompleteNotification; -export interface NextObserver { - closed?: boolean; - next: (value: T) => void; - error?: (err: any) => void; - complete?: () => void; -} -export interface ErrorObserver { - closed?: boolean; - next?: (value: T) => void; - error: (err: any) => void; - complete?: () => void; -} -export interface CompletionObserver { - closed?: boolean; - next?: (value: T) => void; - error?: (err: any) => void; - complete: () => void; -} -export declare type PartialObserver = NextObserver | ErrorObserver | CompletionObserver; -/** - * An object interface that defines a set of callback functions a user can use to get - * notified of any set of {@link Observable} - * {@link guide/glossary-and-semantics#notification notification} events. - * - * For more info, please refer to {@link guide/observer this guide}. - */ -export interface Observer { - /** - * A callback function that gets called by the producer during the subscription when - * the producer "has" the `value`. It won't be called if `error` or `complete` callback - * functions have been called, nor after the consumer has unsubscribed. - * - * For more info, please refer to {@link guide/glossary-and-semantics#next this guide}. - */ - next: (value: T) => void; - /** - * A callback function that gets called by the producer if and when it encountered a - * problem of any kind. The errored value will be provided through the `err` parameter. - * This callback can't be called more than one time, it can't be called if the - * `complete` callback function have been called previously, nor it can't be called if - * the consumer has unsubscribed. - * - * For more info, please refer to {@link guide/glossary-and-semantics#error this guide}. - */ - error: (err: any) => void; - /** - * A callback function that gets called by the producer if and when it has no more - * values to provide (by calling `next` callback function). This means that no error - * has happened. This callback can't be called more than one time, it can't be called - * if the `error` callback function have been called previously, nor it can't be called - * if the consumer has unsubscribed. - * - * For more info, please refer to {@link guide/glossary-and-semantics#complete this guide}. - */ - complete: () => void; -} -export interface SubjectLike extends Observer, Subscribable { -} -export interface SchedulerLike extends TimestampProvider { - schedule(work: (this: SchedulerAction, state: T) => void, delay: number, state: T): Subscription; - schedule(work: (this: SchedulerAction, state?: T) => void, delay: number, state?: T): Subscription; - schedule(work: (this: SchedulerAction, state?: T) => void, delay?: number, state?: T): Subscription; -} -export interface SchedulerAction extends Subscription { - schedule(state?: T, delay?: number): Subscription; -} -/** - * This is a type that provides a method to allow RxJS to create a numeric timestamp - */ -export interface TimestampProvider { - /** - * Returns a timestamp as a number. - * - * This is used by types like `ReplaySubject` or operators like `timestamp` to calculate - * the amount of time passed between events. - */ - now(): number; -} -/** - * Extracts the type from an `ObservableInput`. If you have - * `O extends ObservableInput` and you pass in `Observable`, or - * `Promise`, etc, it will type as `number`. - */ -export declare type ObservedValueOf = O extends ObservableInput ? T : never; -/** - * Extracts a union of element types from an `ObservableInput[]`. - * If you have `O extends ObservableInput[]` and you pass in - * `Observable[]` or `Promise[]` you would get - * back a type of `string`. - * If you pass in `[Observable, Observable]` you would - * get back a type of `string | number`. - */ -export declare type ObservedValueUnionFromArray = X extends Array> ? T : never; -/** - * @deprecated Renamed to {@link ObservedValueUnionFromArray}. Will be removed in v8. - */ -export declare type ObservedValuesFromArray = ObservedValueUnionFromArray; -/** - * Extracts a tuple of element types from an `ObservableInput[]`. - * If you have `O extends ObservableInput[]` and you pass in - * `[Observable, Observable]` you would get back a type - * of `[string, number]`. - */ -export declare type ObservedValueTupleFromArray = { - [K in keyof X]: ObservedValueOf; -}; -/** - * Used to infer types from arguments to functions like {@link forkJoin}. - * So that you can have `forkJoin([Observable
    , PromiseLike]): Observable<[A, B]>` - * et al. - */ -export declare type ObservableInputTuple = { - [K in keyof T]: ObservableInput; -}; -/** - * Constructs a new tuple with the specified type at the head. - * If you declare `Cons` you will get back `[A, B, C]`. - */ -export declare type Cons = ((arg: X, ...rest: Y) => any) extends (...args: infer U) => any ? U : never; -/** - * Extracts the head of a tuple. - * If you declare `Head<[A, B, C]>` you will get back `A`. - */ -export declare type Head = ((...args: X) => any) extends (arg: infer U, ...rest: any[]) => any ? U : never; -/** - * Extracts the tail of a tuple. - * If you declare `Tail<[A, B, C]>` you will get back `[B, C]`. - */ -export declare type Tail = ((...args: X) => any) extends (arg: any, ...rest: infer U) => any ? U : never; -/** - * Extracts the generic value from an Array type. - * If you have `T extends Array`, and pass a `string[]` to it, - * `ValueFromArray` will return the actual type of `string`. - */ -export declare type ValueFromArray = A extends Array ? T : never; -/** - * Gets the value type from an {@link ObservableNotification}, if possible. - */ -export declare type ValueFromNotification = T extends { - kind: 'N' | 'E' | 'C'; -} ? T extends NextNotification ? T extends { - value: infer V; -} ? V : undefined : never : never; -/** - * A simple type to represent a gamut of "falsy" values... with a notable exception: - * `NaN` is "falsy" however, it is not and cannot be typed via TypeScript. See - * comments here: https://github.com/microsoft/TypeScript/issues/28682#issuecomment-707142417 - */ -export declare type Falsy = null | undefined | false | 0 | -0 | 0n | ''; -export declare type TruthyTypesOf = T extends Falsy ? never : T; -interface ReadableStreamDefaultReaderLike { - read(): PromiseLike<{ - done: false; - value: T; - } | { - done: true; - value?: undefined; - }>; - releaseLock(): void; -} -/** - * The base signature RxJS will look for to identify and use - * a [ReadableStream](https://streams.spec.whatwg.org/#rs-class) - * as an {@link ObservableInput} source. - */ -export interface ReadableStreamLike { - getReader(): ReadableStreamDefaultReaderLike; -} -/** - * An observable with a `connect` method that is used to create a subscription - * to an underlying source, connecting it with all consumers via a multicast. - */ -export interface Connectable extends Observable { - /** - * (Idempotent) Calling this method will connect the underlying source observable to all subscribed consumers - * through an underlying {@link Subject}. - * @returns A subscription, that when unsubscribed, will "disconnect" the source from the connector subject, - * severing notifications to all consumers. - */ - connect(): Subscription; -} -export {}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/types.d.ts.map b/node_modules/rxjs/dist/types/internal/types.d.ts.map deleted file mode 100644 index fdc92ab..0000000 --- a/node_modules/rxjs/dist/types/internal/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/internal/types.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;;GAGG;AACH,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,iBAAiB;QACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;KAC7B;CACF;AAID;;;;;;GAMG;AACH,MAAM,WAAW,aAAa,CAAC,CAAC,EAAE,CAAC;IACjC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;CAChB;AAED,MAAM,WAAW,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAE,SAAQ,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;CAAG;AAE9F,oBAAY,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB,CAAC,CAAC,CAAE,SAAQ,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC;CAAG;AAE9E;;;;;;GAMG;AACH,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,KAAK,EAAE,CAAC,CAAC;IACT;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,KAAK,EAAE,CAAC,CAAC;IAET;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAID,MAAM,WAAW,cAAc;IAC7B,WAAW,IAAI,IAAI,CAAC;CACrB;AAED,oBAAY,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;AAEhF,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACtD,WAAW,IAAI,IAAI,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,oBAAY,qBAAqB,CAAC,CAAC,IAAI,YAAY,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAErH,4BAA4B;AAE5B,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC;CAC3D;AAED;;GAEG;AACH,oBAAY,eAAe,CAAC,CAAC,IACzB,UAAU,CAAC,CAAC,CAAC,GACb,iBAAiB,CAAC,CAAC,CAAC,GACpB,aAAa,CAAC,CAAC,CAAC,GAChB,WAAW,CAAC,CAAC,CAAC,GACd,SAAS,CAAC,CAAC,CAAC,GACZ,QAAQ,CAAC,CAAC,CAAC,GACX,kBAAkB,CAAC,CAAC,CAAC,CAAC;AAE1B;;GAEG;AACH,oBAAY,cAAc,CAAC,CAAC,IAAI,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,MAAM,YAAY,CAAC,CAAC,CAAC,CAAC;CAC5C;AAID;;;GAGG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,2CAA2C;IAC3C,IAAI,EAAE,GAAG,CAAC;IACV,qCAAqC;IACrC,KAAK,EAAE,CAAC,CAAC;CACV;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,2CAA2C;IAC3C,IAAI,EAAE,GAAG,CAAC;IACV,KAAK,EAAE,GAAG,CAAC;CACZ;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,GAAG,CAAC;CACX;AAED;;GAEG;AACH,oBAAY,sBAAsB,CAAC,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;AAIvG,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IACzB,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC1B,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC1B,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;IAC3B,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,oBAAY,eAAe,CAAC,CAAC,IAAI,YAAY,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;AAE5F;;;;;;GAMG;AACH,MAAM,WAAW,QAAQ,CAAC,CAAC;IACzB;;;;;;OAMG;IACH,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IACzB;;;;;;;;OAQG;IACH,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;IAC1B;;;;;;;;OAQG;IACH,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,WAAW,CAAC,CAAC,CAAE,SAAQ,QAAQ,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC;CAAG;AAIvE,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACtD,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,YAAY,CAAC;IACvG,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC;IACzG,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC;CAC3G;AAED,MAAM,WAAW,eAAe,CAAC,CAAC,CAAE,SAAQ,YAAY;IACtD,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;CACnD;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;OAKG;IACH,GAAG,IAAI,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,oBAAY,eAAe,CAAC,CAAC,IAAI,CAAC,SAAS,eAAe,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAEhF;;;;;;;GAOG;AACH,oBAAY,2BAA2B,CAAC,CAAC,IAAI,CAAC,SAAS,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAEnG;;GAEG;AACH,oBAAY,uBAAuB,CAAC,CAAC,IAAI,2BAA2B,CAAC,CAAC,CAAC,CAAC;AAExE;;;;;GAKG;AACH,oBAAY,2BAA2B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAEvF;;;;GAIG;AACH,oBAAY,oBAAoB,CAAC,CAAC,IAAI;KACnC,CAAC,IAAI,MAAM,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACtC,CAAC;AAEF;;;GAGG;AACH,oBAAY,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,GAAG,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,KAAK,GAAG,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC;AAE5H;;;GAGG;AACH,oBAAY,IAAI,CAAC,CAAC,SAAS,SAAS,GAAG,EAAE,IAAI,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC;AAE7H;;;GAGG;AACH,oBAAY,IAAI,CAAC,CAAC,SAAS,SAAS,GAAG,EAAE,IAAI,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC;AAE3H;;;;GAIG;AACH,oBAAY,cAAc,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,IAAI,CAAC,SAAS,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAEhG;;GAEG;AACH,oBAAY,qBAAqB,CAAC,CAAC,IAAI,CAAC,SAAS;IAAE,IAAI,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;CAAE,GACtE,CAAC,SAAS,gBAAgB,CAAC,GAAG,CAAC,GAC7B,CAAC,SAAS;IAAE,KAAK,EAAE,MAAM,CAAC,CAAA;CAAE,GAC1B,CAAC,GACD,SAAS,GACX,KAAK,GACP,KAAK,CAAC;AAEV;;;;GAIG;AACH,oBAAY,KAAK,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC;AAEhE,oBAAY,aAAa,CAAC,CAAC,IAAI,CAAC,SAAS,KAAK,GAAG,KAAK,GAAG,CAAC,CAAC;AAI3D,UAAU,+BAA+B,CAAC,CAAC;IAIzC,IAAI,IAAI,WAAW,CACf;QACE,IAAI,EAAE,KAAK,CAAC;QACZ,KAAK,EAAE,CAAC,CAAC;KACV,GACD;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,KAAK,CAAC,EAAE,SAAS,CAAA;KAAE,CACpC,CAAC;IACF,WAAW,IAAI,IAAI,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC,SAAS,IAAI,+BAA+B,CAAC,CAAC,CAAC,CAAC;CACjD;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAC;IACnD;;;;;OAKG;IACH,OAAO,IAAI,YAAY,CAAC;CACzB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/ArgumentOutOfRangeError.d.ts b/node_modules/rxjs/dist/types/internal/util/ArgumentOutOfRangeError.d.ts deleted file mode 100644 index 963d01d..0000000 --- a/node_modules/rxjs/dist/types/internal/util/ArgumentOutOfRangeError.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -export interface ArgumentOutOfRangeError extends Error { -} -export interface ArgumentOutOfRangeErrorCtor { - /** - * @deprecated Internal implementation detail. Do not construct error instances. - * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 - */ - new (): ArgumentOutOfRangeError; -} -/** - * An error thrown when an element was queried at a certain index of an - * Observable, but no such index or position exists in that sequence. - * - * @see {@link elementAt} - * @see {@link take} - * @see {@link takeLast} - */ -export declare const ArgumentOutOfRangeError: ArgumentOutOfRangeErrorCtor; -//# sourceMappingURL=ArgumentOutOfRangeError.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/ArgumentOutOfRangeError.d.ts.map b/node_modules/rxjs/dist/types/internal/util/ArgumentOutOfRangeError.d.ts.map deleted file mode 100644 index ee8d747..0000000 --- a/node_modules/rxjs/dist/types/internal/util/ArgumentOutOfRangeError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ArgumentOutOfRangeError.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/ArgumentOutOfRangeError.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,uBAAwB,SAAQ,KAAK;CAAG;AAEzD,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,QAAQ,uBAAuB,CAAC;CACjC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,EAAE,2BAOrC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/EmptyError.d.ts b/node_modules/rxjs/dist/types/internal/util/EmptyError.d.ts deleted file mode 100644 index 06e651c..0000000 --- a/node_modules/rxjs/dist/types/internal/util/EmptyError.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -export interface EmptyError extends Error { -} -export interface EmptyErrorCtor { - /** - * @deprecated Internal implementation detail. Do not construct error instances. - * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 - */ - new (): EmptyError; -} -/** - * An error thrown when an Observable or a sequence was queried but has no - * elements. - * - * @see {@link first} - * @see {@link last} - * @see {@link single} - * @see {@link firstValueFrom} - * @see {@link lastValueFrom} - */ -export declare const EmptyError: EmptyErrorCtor; -//# sourceMappingURL=EmptyError.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/EmptyError.d.ts.map b/node_modules/rxjs/dist/types/internal/util/EmptyError.d.ts.map deleted file mode 100644 index 7badeb0..0000000 --- a/node_modules/rxjs/dist/types/internal/util/EmptyError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"EmptyError.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/EmptyError.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAW,SAAQ,KAAK;CAAG;AAE5C,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,QAAQ,UAAU,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,EAAE,cAOxB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/Immediate.d.ts b/node_modules/rxjs/dist/types/internal/util/Immediate.d.ts deleted file mode 100644 index 72ae5b6..0000000 --- a/node_modules/rxjs/dist/types/internal/util/Immediate.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Helper functions to schedule and unschedule microtasks. - */ -export declare const Immediate: { - setImmediate(cb: () => void): number; - clearImmediate(handle: number): void; -}; -/** - * Used for internal testing purposes only. Do not export from library. - */ -export declare const TestTools: { - pending(): number; -}; -//# sourceMappingURL=Immediate.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/Immediate.d.ts.map b/node_modules/rxjs/dist/types/internal/util/Immediate.d.ts.map deleted file mode 100644 index 6738831..0000000 --- a/node_modules/rxjs/dist/types/internal/util/Immediate.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Immediate.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/Immediate.ts"],"names":[],"mappings":"AAkBA;;GAEG;AACH,eAAO,MAAM,SAAS;qBACH,MAAM,IAAI,GAAG,MAAM;2BAUb,MAAM,GAAG,IAAI;CAGrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS;;CAIrB,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/NotFoundError.d.ts b/node_modules/rxjs/dist/types/internal/util/NotFoundError.d.ts deleted file mode 100644 index 5aedfbe..0000000 --- a/node_modules/rxjs/dist/types/internal/util/NotFoundError.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export interface NotFoundError extends Error { -} -export interface NotFoundErrorCtor { - /** - * @deprecated Internal implementation detail. Do not construct error instances. - * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 - */ - new (message: string): NotFoundError; -} -/** - * An error thrown when a value or values are missing from an - * observable sequence. - * - * @see {@link operators/single} - */ -export declare const NotFoundError: NotFoundErrorCtor; -//# sourceMappingURL=NotFoundError.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/NotFoundError.d.ts.map b/node_modules/rxjs/dist/types/internal/util/NotFoundError.d.ts.map deleted file mode 100644 index 7f79cdc..0000000 --- a/node_modules/rxjs/dist/types/internal/util/NotFoundError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NotFoundError.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/NotFoundError.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAc,SAAQ,KAAK;CAAG;AAE/C,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,KAAK,OAAO,EAAE,MAAM,GAAG,aAAa,CAAC;CACtC;AAED;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,iBAO3B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/ObjectUnsubscribedError.d.ts b/node_modules/rxjs/dist/types/internal/util/ObjectUnsubscribedError.d.ts deleted file mode 100644 index 372abfa..0000000 --- a/node_modules/rxjs/dist/types/internal/util/ObjectUnsubscribedError.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -export interface ObjectUnsubscribedError extends Error { -} -export interface ObjectUnsubscribedErrorCtor { - /** - * @deprecated Internal implementation detail. Do not construct error instances. - * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 - */ - new (): ObjectUnsubscribedError; -} -/** - * An error thrown when an action is invalid because the object has been - * unsubscribed. - * - * @see {@link Subject} - * @see {@link BehaviorSubject} - * - * @class ObjectUnsubscribedError - */ -export declare const ObjectUnsubscribedError: ObjectUnsubscribedErrorCtor; -//# sourceMappingURL=ObjectUnsubscribedError.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/ObjectUnsubscribedError.d.ts.map b/node_modules/rxjs/dist/types/internal/util/ObjectUnsubscribedError.d.ts.map deleted file mode 100644 index 7d8bf1b..0000000 --- a/node_modules/rxjs/dist/types/internal/util/ObjectUnsubscribedError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ObjectUnsubscribedError.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/ObjectUnsubscribedError.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,uBAAwB,SAAQ,KAAK;CAAG;AAEzD,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,QAAQ,uBAAuB,CAAC;CACjC;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,EAAE,2BAOrC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/SequenceError.d.ts b/node_modules/rxjs/dist/types/internal/util/SequenceError.d.ts deleted file mode 100644 index b9c8375..0000000 --- a/node_modules/rxjs/dist/types/internal/util/SequenceError.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export interface SequenceError extends Error { -} -export interface SequenceErrorCtor { - /** - * @deprecated Internal implementation detail. Do not construct error instances. - * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 - */ - new (message: string): SequenceError; -} -/** - * An error thrown when something is wrong with the sequence of - * values arriving on the observable. - * - * @see {@link operators/single} - */ -export declare const SequenceError: SequenceErrorCtor; -//# sourceMappingURL=SequenceError.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/SequenceError.d.ts.map b/node_modules/rxjs/dist/types/internal/util/SequenceError.d.ts.map deleted file mode 100644 index 8976c41..0000000 --- a/node_modules/rxjs/dist/types/internal/util/SequenceError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SequenceError.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/SequenceError.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAc,SAAQ,KAAK;CAAG;AAE/C,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,KAAK,OAAO,EAAE,MAAM,GAAG,aAAa,CAAC;CACtC;AAED;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,iBAO3B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/UnsubscriptionError.d.ts b/node_modules/rxjs/dist/types/internal/util/UnsubscriptionError.d.ts deleted file mode 100644 index 9c584ce..0000000 --- a/node_modules/rxjs/dist/types/internal/util/UnsubscriptionError.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface UnsubscriptionError extends Error { - readonly errors: any[]; -} -export interface UnsubscriptionErrorCtor { - /** - * @deprecated Internal implementation detail. Do not construct error instances. - * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 - */ - new (errors: any[]): UnsubscriptionError; -} -/** - * An error thrown when one or more errors have occurred during the - * `unsubscribe` of a {@link Subscription}. - */ -export declare const UnsubscriptionError: UnsubscriptionErrorCtor; -//# sourceMappingURL=UnsubscriptionError.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/UnsubscriptionError.d.ts.map b/node_modules/rxjs/dist/types/internal/util/UnsubscriptionError.d.ts.map deleted file mode 100644 index e6f2809..0000000 --- a/node_modules/rxjs/dist/types/internal/util/UnsubscriptionError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"UnsubscriptionError.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/UnsubscriptionError.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,mBAAoB,SAAQ,KAAK;IAChD,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,KAAK,MAAM,EAAE,GAAG,EAAE,GAAG,mBAAmB,CAAC;CAC1C;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,uBAWjC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/applyMixins.d.ts b/node_modules/rxjs/dist/types/internal/util/applyMixins.d.ts deleted file mode 100644 index 91c9ed2..0000000 --- a/node_modules/rxjs/dist/types/internal/util/applyMixins.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare function applyMixins(derivedCtor: any, baseCtors: any[]): void; -//# sourceMappingURL=applyMixins.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/applyMixins.d.ts.map b/node_modules/rxjs/dist/types/internal/util/applyMixins.d.ts.map deleted file mode 100644 index d41642c..0000000 --- a/node_modules/rxjs/dist/types/internal/util/applyMixins.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"applyMixins.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/applyMixins.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,WAAW,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,QAS7D"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/args.d.ts b/node_modules/rxjs/dist/types/internal/util/args.d.ts deleted file mode 100644 index 0dfb0a0..0000000 --- a/node_modules/rxjs/dist/types/internal/util/args.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { SchedulerLike } from '../types'; -export declare function popResultSelector(args: any[]): ((...args: unknown[]) => unknown) | undefined; -export declare function popScheduler(args: any[]): SchedulerLike | undefined; -export declare function popNumber(args: any[], defaultValue: number): number; -//# sourceMappingURL=args.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/args.d.ts.map b/node_modules/rxjs/dist/types/internal/util/args.d.ts.map deleted file mode 100644 index 45de1ed..0000000 --- a/node_modules/rxjs/dist/types/internal/util/args.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAQzC,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,GAAG,SAAS,CAE5F;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,aAAa,GAAG,SAAS,CAEnE;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAEnE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/argsArgArrayOrObject.d.ts b/node_modules/rxjs/dist/types/internal/util/argsArgArrayOrObject.d.ts deleted file mode 100644 index de18e29..0000000 --- a/node_modules/rxjs/dist/types/internal/util/argsArgArrayOrObject.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Used in functions where either a list of arguments, a single array of arguments, or a - * dictionary of arguments can be returned. Returns an object with an `args` property with - * the arguments in an array, if it is a dictionary, it will also return the `keys` in another - * property. - */ -export declare function argsArgArrayOrObject>(args: T[] | [O] | [T[]]): { - args: T[]; - keys: string[] | null; -}; -//# sourceMappingURL=argsArgArrayOrObject.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/argsArgArrayOrObject.d.ts.map b/node_modules/rxjs/dist/types/internal/util/argsArgArrayOrObject.d.ts.map deleted file mode 100644 index fad6ddf..0000000 --- a/node_modules/rxjs/dist/types/internal/util/argsArgArrayOrObject.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"argsArgArrayOrObject.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/argsArgArrayOrObject.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG;IAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;CAAE,CAgBlI"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/argsOrArgArray.d.ts b/node_modules/rxjs/dist/types/internal/util/argsOrArgArray.d.ts deleted file mode 100644 index 768d674..0000000 --- a/node_modules/rxjs/dist/types/internal/util/argsOrArgArray.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Used in operators and functions that accept either a list of arguments, or an array of arguments - * as a single argument. - */ -export declare function argsOrArgArray(args: (T | T[])[]): T[]; -//# sourceMappingURL=argsOrArgArray.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/argsOrArgArray.d.ts.map b/node_modules/rxjs/dist/types/internal/util/argsOrArgArray.d.ts.map deleted file mode 100644 index 73f4d10..0000000 --- a/node_modules/rxjs/dist/types/internal/util/argsOrArgArray.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"argsOrArgArray.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/argsOrArgArray.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAExD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/arrRemove.d.ts b/node_modules/rxjs/dist/types/internal/util/arrRemove.d.ts deleted file mode 100644 index c7cb9fa..0000000 --- a/node_modules/rxjs/dist/types/internal/util/arrRemove.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Removes an item from an array, mutating it. - * @param arr The array to remove the item from - * @param item The item to remove - */ -export declare function arrRemove(arr: T[] | undefined | null, item: T): void; -//# sourceMappingURL=arrRemove.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/arrRemove.d.ts.map b/node_modules/rxjs/dist/types/internal/util/arrRemove.d.ts.map deleted file mode 100644 index f31c2b3..0000000 --- a/node_modules/rxjs/dist/types/internal/util/arrRemove.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"arrRemove.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/arrRemove.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,SAAS,GAAG,IAAI,EAAE,IAAI,EAAE,CAAC,QAKhE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/createErrorClass.d.ts b/node_modules/rxjs/dist/types/internal/util/createErrorClass.d.ts deleted file mode 100644 index 0821eab..0000000 --- a/node_modules/rxjs/dist/types/internal/util/createErrorClass.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Used to create Error subclasses until the community moves away from ES5. - * - * This is because compiling from TypeScript down to ES5 has issues with subclassing Errors - * as well as other built-in types: https://github.com/Microsoft/TypeScript/issues/12123 - * - * @param createImpl A factory function to create the actual constructor implementation. The returned - * function should be a named function that calls `_super` internally. - */ -export declare function createErrorClass(createImpl: (_super: any) => any): T; -//# sourceMappingURL=createErrorClass.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/createErrorClass.d.ts.map b/node_modules/rxjs/dist/types/internal/util/createErrorClass.d.ts.map deleted file mode 100644 index 2243a56..0000000 --- a/node_modules/rxjs/dist/types/internal/util/createErrorClass.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"createErrorClass.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/createErrorClass.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,GAAG,GAAG,CAAC,CAUvE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/createObject.d.ts b/node_modules/rxjs/dist/types/internal/util/createObject.d.ts deleted file mode 100644 index e9ae39e..0000000 --- a/node_modules/rxjs/dist/types/internal/util/createObject.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare function createObject(keys: string[], values: any[]): any; -//# sourceMappingURL=createObject.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/createObject.d.ts.map b/node_modules/rxjs/dist/types/internal/util/createObject.d.ts.map deleted file mode 100644 index e08ba0a..0000000 --- a/node_modules/rxjs/dist/types/internal/util/createObject.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"createObject.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/createObject.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,OAEzD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/errorContext.d.ts b/node_modules/rxjs/dist/types/internal/util/errorContext.d.ts deleted file mode 100644 index 5345a28..0000000 --- a/node_modules/rxjs/dist/types/internal/util/errorContext.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Handles dealing with errors for super-gross mode. Creates a context, in which - * any synchronously thrown errors will be passed to {@link captureError}. Which - * will record the error such that it will be rethrown after the call back is complete. - * TODO: Remove in v8 - * @param cb An immediately executed function. - */ -export declare function errorContext(cb: () => void): void; -/** - * Captures errors only in super-gross mode. - * @param err the error to capture - */ -export declare function captureError(err: any): void; -//# sourceMappingURL=errorContext.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/errorContext.d.ts.map b/node_modules/rxjs/dist/types/internal/util/errorContext.d.ts.map deleted file mode 100644 index d08a687..0000000 --- a/node_modules/rxjs/dist/types/internal/util/errorContext.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"errorContext.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/errorContext.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,IAAI,QAmB1C;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,QAKpC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/executeSchedule.d.ts b/node_modules/rxjs/dist/types/internal/util/executeSchedule.d.ts deleted file mode 100644 index a46a606..0000000 --- a/node_modules/rxjs/dist/types/internal/util/executeSchedule.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Subscription } from '../Subscription'; -import { SchedulerLike } from '../types'; -export declare function executeSchedule(parentSubscription: Subscription, scheduler: SchedulerLike, work: () => void, delay: number, repeat: true): void; -export declare function executeSchedule(parentSubscription: Subscription, scheduler: SchedulerLike, work: () => void, delay?: number, repeat?: false): Subscription; -//# sourceMappingURL=executeSchedule.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/executeSchedule.d.ts.map b/node_modules/rxjs/dist/types/internal/util/executeSchedule.d.ts.map deleted file mode 100644 index 3577be1..0000000 --- a/node_modules/rxjs/dist/types/internal/util/executeSchedule.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"executeSchedule.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/executeSchedule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAmB,aAAa,EAAE,MAAM,UAAU,CAAC;AAE1D,wBAAgB,eAAe,CAC7B,kBAAkB,EAAE,YAAY,EAChC,SAAS,EAAE,aAAa,EACxB,IAAI,EAAE,MAAM,IAAI,EAChB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,IAAI,GACX,IAAI,CAAC;AACR,wBAAgB,eAAe,CAC7B,kBAAkB,EAAE,YAAY,EAChC,SAAS,EAAE,aAAa,EACxB,IAAI,EAAE,MAAM,IAAI,EAChB,KAAK,CAAC,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,KAAK,GACb,YAAY,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/identity.d.ts b/node_modules/rxjs/dist/types/internal/util/identity.d.ts deleted file mode 100644 index 328d6ed..0000000 --- a/node_modules/rxjs/dist/types/internal/util/identity.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * This function takes one parameter and just returns it. Simply put, - * this is like `(x: T): T => x`. - * - * ## Examples - * - * This is useful in some cases when using things like `mergeMap` - * - * ```ts - * import { interval, take, map, range, mergeMap, identity } from 'rxjs'; - * - * const source$ = interval(1000).pipe(take(5)); - * - * const result$ = source$.pipe( - * map(i => range(i)), - * mergeMap(identity) // same as mergeMap(x => x) - * ); - * - * result$.subscribe({ - * next: console.log - * }); - * ``` - * - * Or when you want to selectively apply an operator - * - * ```ts - * import { interval, take, identity } from 'rxjs'; - * - * const shouldLimit = () => Math.random() < 0.5; - * - * const source$ = interval(1000); - * - * const result$ = source$.pipe(shouldLimit() ? take(5) : identity); - * - * result$.subscribe({ - * next: console.log - * }); - * ``` - * - * @param x Any value that is returned by this function - * @returns The value passed as the first parameter to this function - */ -export declare function identity(x: T): T; -//# sourceMappingURL=identity.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/identity.d.ts.map b/node_modules/rxjs/dist/types/internal/util/identity.d.ts.map deleted file mode 100644 index f52067b..0000000 --- a/node_modules/rxjs/dist/types/internal/util/identity.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAEnC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isArrayLike.d.ts b/node_modules/rxjs/dist/types/internal/util/isArrayLike.d.ts deleted file mode 100644 index f2878e5..0000000 --- a/node_modules/rxjs/dist/types/internal/util/isArrayLike.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare const isArrayLike: (x: any) => x is ArrayLike; -//# sourceMappingURL=isArrayLike.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isArrayLike.d.ts.map b/node_modules/rxjs/dist/types/internal/util/isArrayLike.d.ts.map deleted file mode 100644 index 3ef1303..0000000 --- a/node_modules/rxjs/dist/types/internal/util/isArrayLike.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isArrayLike.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/isArrayLike.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,SAAW,GAAG,sBAAqF,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isAsyncIterable.d.ts b/node_modules/rxjs/dist/types/internal/util/isAsyncIterable.d.ts deleted file mode 100644 index dfb0206..0000000 --- a/node_modules/rxjs/dist/types/internal/util/isAsyncIterable.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare function isAsyncIterable(obj: any): obj is AsyncIterable; -//# sourceMappingURL=isAsyncIterable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isAsyncIterable.d.ts.map b/node_modules/rxjs/dist/types/internal/util/isAsyncIterable.d.ts.map deleted file mode 100644 index 14807c3..0000000 --- a/node_modules/rxjs/dist/types/internal/util/isAsyncIterable.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isAsyncIterable.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/isAsyncIterable.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,aAAa,CAAC,CAAC,CAAC,CAEpE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isDate.d.ts b/node_modules/rxjs/dist/types/internal/util/isDate.d.ts deleted file mode 100644 index cb9a6ae..0000000 --- a/node_modules/rxjs/dist/types/internal/util/isDate.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Checks to see if a value is not only a `Date` object, - * but a *valid* `Date` object that can be converted to a - * number. For example, `new Date('blah')` is indeed an - * `instanceof Date`, however it cannot be converted to a - * number. - */ -export declare function isValidDate(value: any): value is Date; -//# sourceMappingURL=isDate.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isDate.d.ts.map b/node_modules/rxjs/dist/types/internal/util/isDate.d.ts.map deleted file mode 100644 index 59ef4f2..0000000 --- a/node_modules/rxjs/dist/types/internal/util/isDate.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isDate.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/isDate.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,IAAI,CAErD"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isFunction.d.ts b/node_modules/rxjs/dist/types/internal/util/isFunction.d.ts deleted file mode 100644 index b9ea60f..0000000 --- a/node_modules/rxjs/dist/types/internal/util/isFunction.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Returns true if the object is a function. - * @param value The value to check - */ -export declare function isFunction(value: any): value is (...args: any[]) => any; -//# sourceMappingURL=isFunction.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isFunction.d.ts.map b/node_modules/rxjs/dist/types/internal/util/isFunction.d.ts.map deleted file mode 100644 index b66e708..0000000 --- a/node_modules/rxjs/dist/types/internal/util/isFunction.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isFunction.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/isFunction.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAEvE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isInteropObservable.d.ts b/node_modules/rxjs/dist/types/internal/util/isInteropObservable.d.ts deleted file mode 100644 index 4a27f38..0000000 --- a/node_modules/rxjs/dist/types/internal/util/isInteropObservable.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { InteropObservable } from '../types'; -/** Identifies an input as being Observable (but not necessary an Rx Observable) */ -export declare function isInteropObservable(input: any): input is InteropObservable; -//# sourceMappingURL=isInteropObservable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isInteropObservable.d.ts.map b/node_modules/rxjs/dist/types/internal/util/isInteropObservable.d.ts.map deleted file mode 100644 index b76d5c5..0000000 --- a/node_modules/rxjs/dist/types/internal/util/isInteropObservable.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isInteropObservable.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/isInteropObservable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAI7C,mFAAmF;AACnF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,iBAAiB,CAAC,GAAG,CAAC,CAE/E"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isIterable.d.ts b/node_modules/rxjs/dist/types/internal/util/isIterable.d.ts deleted file mode 100644 index f152825..0000000 --- a/node_modules/rxjs/dist/types/internal/util/isIterable.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/** Identifies an input as being an Iterable */ -export declare function isIterable(input: any): input is Iterable; -//# sourceMappingURL=isIterable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isIterable.d.ts.map b/node_modules/rxjs/dist/types/internal/util/isIterable.d.ts.map deleted file mode 100644 index e605afa..0000000 --- a/node_modules/rxjs/dist/types/internal/util/isIterable.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isIterable.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/isIterable.ts"],"names":[],"mappings":"AAGA,+CAA+C;AAC/C,wBAAgB,UAAU,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,QAAQ,CAAC,GAAG,CAAC,CAE7D"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isObservable.d.ts b/node_modules/rxjs/dist/types/internal/util/isObservable.d.ts deleted file mode 100644 index d6b6211..0000000 --- a/node_modules/rxjs/dist/types/internal/util/isObservable.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** prettier */ -import { Observable } from '../Observable'; -/** - * Tests to see if the object is an RxJS {@link Observable} - * @param obj the object to test - */ -export declare function isObservable(obj: any): obj is Observable; -//# sourceMappingURL=isObservable.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isObservable.d.ts.map b/node_modules/rxjs/dist/types/internal/util/isObservable.d.ts.map deleted file mode 100644 index 569d59d..0000000 --- a/node_modules/rxjs/dist/types/internal/util/isObservable.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isObservable.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/isObservable.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,CAIjE"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isPromise.d.ts b/node_modules/rxjs/dist/types/internal/util/isPromise.d.ts deleted file mode 100644 index 9090e34..0000000 --- a/node_modules/rxjs/dist/types/internal/util/isPromise.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Tests to see if the object is "thennable". - * @param value the object to test - */ -export declare function isPromise(value: any): value is PromiseLike; -//# sourceMappingURL=isPromise.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isPromise.d.ts.map b/node_modules/rxjs/dist/types/internal/util/isPromise.d.ts.map deleted file mode 100644 index df356b2..0000000 --- a/node_modules/rxjs/dist/types/internal/util/isPromise.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isPromise.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/isPromise.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,WAAW,CAAC,GAAG,CAAC,CAE/D"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isReadableStreamLike.d.ts b/node_modules/rxjs/dist/types/internal/util/isReadableStreamLike.d.ts deleted file mode 100644 index 3cb2782..0000000 --- a/node_modules/rxjs/dist/types/internal/util/isReadableStreamLike.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { ReadableStreamLike } from '../types'; -export declare function readableStreamLikeToAsyncGenerator(readableStream: ReadableStreamLike): AsyncGenerator; -export declare function isReadableStreamLike(obj: any): obj is ReadableStreamLike; -//# sourceMappingURL=isReadableStreamLike.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isReadableStreamLike.d.ts.map b/node_modules/rxjs/dist/types/internal/util/isReadableStreamLike.d.ts.map deleted file mode 100644 index 1dadd18..0000000 --- a/node_modules/rxjs/dist/types/internal/util/isReadableStreamLike.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isReadableStreamLike.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/isReadableStreamLike.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAG9C,wBAAuB,kCAAkC,CAAC,CAAC,EAAE,cAAc,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAarH;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,kBAAkB,CAAC,CAAC,CAAC,CAI9E"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isScheduler.d.ts b/node_modules/rxjs/dist/types/internal/util/isScheduler.d.ts deleted file mode 100644 index d637034..0000000 --- a/node_modules/rxjs/dist/types/internal/util/isScheduler.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { SchedulerLike } from '../types'; -export declare function isScheduler(value: any): value is SchedulerLike; -//# sourceMappingURL=isScheduler.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/isScheduler.d.ts.map b/node_modules/rxjs/dist/types/internal/util/isScheduler.d.ts.map deleted file mode 100644 index 4c42e4f..0000000 --- a/node_modules/rxjs/dist/types/internal/util/isScheduler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"isScheduler.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/isScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,wBAAgB,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,aAAa,CAE9D"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/lift.d.ts b/node_modules/rxjs/dist/types/internal/util/lift.d.ts deleted file mode 100644 index 2fb543d..0000000 --- a/node_modules/rxjs/dist/types/internal/util/lift.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Observable } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { OperatorFunction } from '../types'; -/** - * Used to determine if an object is an Observable with a lift function. - */ -export declare function hasLift(source: any): source is { - lift: InstanceType['lift']; -}; -/** - * Creates an `OperatorFunction`. Used to define operators throughout the library in a concise way. - * @param init The logic to connect the liftedSource to the subscriber at the moment of subscription. - */ -export declare function operate(init: (liftedSource: Observable, subscriber: Subscriber) => (() => void) | void): OperatorFunction; -//# sourceMappingURL=lift.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/lift.d.ts.map b/node_modules/rxjs/dist/types/internal/util/lift.d.ts.map deleted file mode 100644 index 9008a32..0000000 --- a/node_modules/rxjs/dist/types/internal/util/lift.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"lift.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/lift.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C;;GAEG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,IAAI;IAAE,IAAI,EAAE,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA;CAAE,CAEhG;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,EAC1B,IAAI,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,GACpF,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAaxB"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/mapOneOrManyArgs.d.ts b/node_modules/rxjs/dist/types/internal/util/mapOneOrManyArgs.d.ts deleted file mode 100644 index ec7d8ed..0000000 --- a/node_modules/rxjs/dist/types/internal/util/mapOneOrManyArgs.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { OperatorFunction } from "../types"; -/** - * Used in several -- mostly deprecated -- situations where we need to - * apply a list of arguments or a single argument to a result selector. - */ -export declare function mapOneOrManyArgs(fn: ((...values: T[]) => R)): OperatorFunction; -//# sourceMappingURL=mapOneOrManyArgs.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/mapOneOrManyArgs.d.ts.map b/node_modules/rxjs/dist/types/internal/util/mapOneOrManyArgs.d.ts.map deleted file mode 100644 index f498539..0000000 --- a/node_modules/rxjs/dist/types/internal/util/mapOneOrManyArgs.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"mapOneOrManyArgs.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/mapOneOrManyArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAS5C;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,GAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAE9F"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/noop.d.ts b/node_modules/rxjs/dist/types/internal/util/noop.d.ts deleted file mode 100644 index 57938f4..0000000 --- a/node_modules/rxjs/dist/types/internal/util/noop.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare function noop(): void; -//# sourceMappingURL=noop.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/noop.d.ts.map b/node_modules/rxjs/dist/types/internal/util/noop.d.ts.map deleted file mode 100644 index c4effe9..0000000 --- a/node_modules/rxjs/dist/types/internal/util/noop.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"noop.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/noop.ts"],"names":[],"mappings":"AACA,wBAAgB,IAAI,SAAM"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/not.d.ts b/node_modules/rxjs/dist/types/internal/util/not.d.ts deleted file mode 100644 index 85e3f8e..0000000 --- a/node_modules/rxjs/dist/types/internal/util/not.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare function not(pred: (value: T, index: number) => boolean, thisArg: any): (value: T, index: number) => boolean; -//# sourceMappingURL=not.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/not.d.ts.map b/node_modules/rxjs/dist/types/internal/util/not.d.ts.map deleted file mode 100644 index 07dbbe4..0000000 --- a/node_modules/rxjs/dist/types/internal/util/not.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"not.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/not.ts"],"names":[],"mappings":"AAAA,wBAAgB,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAErH"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/pipe.d.ts b/node_modules/rxjs/dist/types/internal/util/pipe.d.ts deleted file mode 100644 index 4df727f..0000000 --- a/node_modules/rxjs/dist/types/internal/util/pipe.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { identity } from './identity'; -import { UnaryFunction } from '../types'; -export declare function pipe(): typeof identity; -export declare function pipe(fn1: UnaryFunction): UnaryFunction; -export declare function pipe(fn1: UnaryFunction, fn2: UnaryFunction): UnaryFunction; -export declare function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction): UnaryFunction; -export declare function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction, fn4: UnaryFunction): UnaryFunction; -export declare function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction, fn4: UnaryFunction, fn5: UnaryFunction): UnaryFunction; -export declare function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction, fn4: UnaryFunction, fn5: UnaryFunction, fn6: UnaryFunction): UnaryFunction; -export declare function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction, fn4: UnaryFunction, fn5: UnaryFunction, fn6: UnaryFunction, fn7: UnaryFunction): UnaryFunction; -export declare function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction, fn4: UnaryFunction, fn5: UnaryFunction, fn6: UnaryFunction, fn7: UnaryFunction, fn8: UnaryFunction): UnaryFunction; -export declare function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction, fn4: UnaryFunction, fn5: UnaryFunction, fn6: UnaryFunction, fn7: UnaryFunction, fn8: UnaryFunction, fn9: UnaryFunction): UnaryFunction; -export declare function pipe(fn1: UnaryFunction, fn2: UnaryFunction, fn3: UnaryFunction, fn4: UnaryFunction, fn5: UnaryFunction, fn6: UnaryFunction, fn7: UnaryFunction, fn8: UnaryFunction, fn9: UnaryFunction, ...fns: UnaryFunction[]): UnaryFunction; -//# sourceMappingURL=pipe.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/pipe.d.ts.map b/node_modules/rxjs/dist/types/internal/util/pipe.d.ts.map deleted file mode 100644 index 9e06cc8..0000000 --- a/node_modules/rxjs/dist/types/internal/util/pipe.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pipe.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,wBAAgB,IAAI,IAAI,OAAO,QAAQ,CAAC;AACxC,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC1E,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACvG,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACpI,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAChC,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,GACvB,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACvB,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EACnC,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,GACvB,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACvB,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EACtC,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,GACvB,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACvB,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EACzC,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,GACvB,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACvB,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAC5C,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,GACvB,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACvB,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAC/C,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,GACvB,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACvB,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAC/C,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EACxB,GAAG,GAAG,EAAE,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,GAChC,aAAa,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/reportUnhandledError.d.ts b/node_modules/rxjs/dist/types/internal/util/reportUnhandledError.d.ts deleted file mode 100644 index c0b8d41..0000000 --- a/node_modules/rxjs/dist/types/internal/util/reportUnhandledError.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Handles an error on another job either with the user-configured {@link onUnhandledError}, - * or by throwing it on that new job so it can be picked up by `window.onerror`, `process.on('error')`, etc. - * - * This should be called whenever there is an error that is out-of-band with the subscription - * or when an error hits a terminal boundary of the subscription and no error handler was provided. - * - * @param err the error to report - */ -export declare function reportUnhandledError(err: any): void; -//# sourceMappingURL=reportUnhandledError.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/reportUnhandledError.d.ts.map b/node_modules/rxjs/dist/types/internal/util/reportUnhandledError.d.ts.map deleted file mode 100644 index 92adc5e..0000000 --- a/node_modules/rxjs/dist/types/internal/util/reportUnhandledError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"reportUnhandledError.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/reportUnhandledError.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,GAAG,QAW5C"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/subscribeToArray.d.ts b/node_modules/rxjs/dist/types/internal/util/subscribeToArray.d.ts deleted file mode 100644 index 543b961..0000000 --- a/node_modules/rxjs/dist/types/internal/util/subscribeToArray.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Subscriber } from '../Subscriber'; -/** - * Subscribes to an ArrayLike with a subscriber - * @param array The array or array-like to subscribe to - */ -export declare const subscribeToArray: (array: ArrayLike) => (subscriber: Subscriber) => void; -//# sourceMappingURL=subscribeToArray.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/subscribeToArray.d.ts.map b/node_modules/rxjs/dist/types/internal/util/subscribeToArray.d.ts.map deleted file mode 100644 index 279c671..0000000 --- a/node_modules/rxjs/dist/types/internal/util/subscribeToArray.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"subscribeToArray.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/subscribeToArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C;;;GAGG;AACH,eAAO,MAAM,gBAAgB,iEAK5B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/throwUnobservableError.d.ts b/node_modules/rxjs/dist/types/internal/util/throwUnobservableError.d.ts deleted file mode 100644 index b07130b..0000000 --- a/node_modules/rxjs/dist/types/internal/util/throwUnobservableError.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Creates the TypeError to throw if an invalid object is passed to `from` or `scheduled`. - * @param input The object that was passed. - */ -export declare function createInvalidObservableTypeError(input: any): TypeError; -//# sourceMappingURL=throwUnobservableError.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/throwUnobservableError.d.ts.map b/node_modules/rxjs/dist/types/internal/util/throwUnobservableError.d.ts.map deleted file mode 100644 index e1a43ab..0000000 --- a/node_modules/rxjs/dist/types/internal/util/throwUnobservableError.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"throwUnobservableError.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/throwUnobservableError.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,GAAG,aAO1D"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/workarounds.d.ts b/node_modules/rxjs/dist/types/internal/util/workarounds.d.ts deleted file mode 100644 index 53c76a4..0000000 --- a/node_modules/rxjs/dist/types/internal/util/workarounds.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=workarounds.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/internal/util/workarounds.d.ts.map b/node_modules/rxjs/dist/types/internal/util/workarounds.d.ts.map deleted file mode 100644 index 6419f2e..0000000 --- a/node_modules/rxjs/dist/types/internal/util/workarounds.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"workarounds.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/workarounds.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAA"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/operators/index.d.ts b/node_modules/rxjs/dist/types/operators/index.d.ts deleted file mode 100644 index 5b9232c..0000000 --- a/node_modules/rxjs/dist/types/operators/index.d.ts +++ /dev/null @@ -1,114 +0,0 @@ -export { audit } from '../internal/operators/audit'; -export { auditTime } from '../internal/operators/auditTime'; -export { buffer } from '../internal/operators/buffer'; -export { bufferCount } from '../internal/operators/bufferCount'; -export { bufferTime } from '../internal/operators/bufferTime'; -export { bufferToggle } from '../internal/operators/bufferToggle'; -export { bufferWhen } from '../internal/operators/bufferWhen'; -export { catchError } from '../internal/operators/catchError'; -export { combineAll } from '../internal/operators/combineAll'; -export { combineLatestAll } from '../internal/operators/combineLatestAll'; -export { combineLatest } from '../internal/operators/combineLatest'; -export { combineLatestWith } from '../internal/operators/combineLatestWith'; -export { concat } from '../internal/operators/concat'; -export { concatAll } from '../internal/operators/concatAll'; -export { concatMap } from '../internal/operators/concatMap'; -export { concatMapTo } from '../internal/operators/concatMapTo'; -export { concatWith } from '../internal/operators/concatWith'; -export { connect, ConnectConfig } from '../internal/operators/connect'; -export { count } from '../internal/operators/count'; -export { debounce } from '../internal/operators/debounce'; -export { debounceTime } from '../internal/operators/debounceTime'; -export { defaultIfEmpty } from '../internal/operators/defaultIfEmpty'; -export { delay } from '../internal/operators/delay'; -export { delayWhen } from '../internal/operators/delayWhen'; -export { dematerialize } from '../internal/operators/dematerialize'; -export { distinct } from '../internal/operators/distinct'; -export { distinctUntilChanged } from '../internal/operators/distinctUntilChanged'; -export { distinctUntilKeyChanged } from '../internal/operators/distinctUntilKeyChanged'; -export { elementAt } from '../internal/operators/elementAt'; -export { endWith } from '../internal/operators/endWith'; -export { every } from '../internal/operators/every'; -export { exhaust } from '../internal/operators/exhaust'; -export { exhaustAll } from '../internal/operators/exhaustAll'; -export { exhaustMap } from '../internal/operators/exhaustMap'; -export { expand } from '../internal/operators/expand'; -export { filter } from '../internal/operators/filter'; -export { finalize } from '../internal/operators/finalize'; -export { find } from '../internal/operators/find'; -export { findIndex } from '../internal/operators/findIndex'; -export { first } from '../internal/operators/first'; -export { groupBy, BasicGroupByOptions, GroupByOptionsWithElement } from '../internal/operators/groupBy'; -export { ignoreElements } from '../internal/operators/ignoreElements'; -export { isEmpty } from '../internal/operators/isEmpty'; -export { last } from '../internal/operators/last'; -export { map } from '../internal/operators/map'; -export { mapTo } from '../internal/operators/mapTo'; -export { materialize } from '../internal/operators/materialize'; -export { max } from '../internal/operators/max'; -export { merge } from '../internal/operators/merge'; -export { mergeAll } from '../internal/operators/mergeAll'; -export { flatMap } from '../internal/operators/flatMap'; -export { mergeMap } from '../internal/operators/mergeMap'; -export { mergeMapTo } from '../internal/operators/mergeMapTo'; -export { mergeScan } from '../internal/operators/mergeScan'; -export { mergeWith } from '../internal/operators/mergeWith'; -export { min } from '../internal/operators/min'; -export { multicast } from '../internal/operators/multicast'; -export { observeOn } from '../internal/operators/observeOn'; -export { onErrorResumeNext } from '../internal/operators/onErrorResumeNextWith'; -export { pairwise } from '../internal/operators/pairwise'; -export { partition } from '../internal/operators/partition'; -export { pluck } from '../internal/operators/pluck'; -export { publish } from '../internal/operators/publish'; -export { publishBehavior } from '../internal/operators/publishBehavior'; -export { publishLast } from '../internal/operators/publishLast'; -export { publishReplay } from '../internal/operators/publishReplay'; -export { race } from '../internal/operators/race'; -export { raceWith } from '../internal/operators/raceWith'; -export { reduce } from '../internal/operators/reduce'; -export { repeat, RepeatConfig } from '../internal/operators/repeat'; -export { repeatWhen } from '../internal/operators/repeatWhen'; -export { retry, RetryConfig } from '../internal/operators/retry'; -export { retryWhen } from '../internal/operators/retryWhen'; -export { refCount } from '../internal/operators/refCount'; -export { sample } from '../internal/operators/sample'; -export { sampleTime } from '../internal/operators/sampleTime'; -export { scan } from '../internal/operators/scan'; -export { sequenceEqual } from '../internal/operators/sequenceEqual'; -export { share, ShareConfig } from '../internal/operators/share'; -export { shareReplay, ShareReplayConfig } from '../internal/operators/shareReplay'; -export { single } from '../internal/operators/single'; -export { skip } from '../internal/operators/skip'; -export { skipLast } from '../internal/operators/skipLast'; -export { skipUntil } from '../internal/operators/skipUntil'; -export { skipWhile } from '../internal/operators/skipWhile'; -export { startWith } from '../internal/operators/startWith'; -export { subscribeOn } from '../internal/operators/subscribeOn'; -export { switchAll } from '../internal/operators/switchAll'; -export { switchMap } from '../internal/operators/switchMap'; -export { switchMapTo } from '../internal/operators/switchMapTo'; -export { switchScan } from '../internal/operators/switchScan'; -export { take } from '../internal/operators/take'; -export { takeLast } from '../internal/operators/takeLast'; -export { takeUntil } from '../internal/operators/takeUntil'; -export { takeWhile } from '../internal/operators/takeWhile'; -export { tap, TapObserver } from '../internal/operators/tap'; -export { throttle, ThrottleConfig } from '../internal/operators/throttle'; -export { throttleTime } from '../internal/operators/throttleTime'; -export { throwIfEmpty } from '../internal/operators/throwIfEmpty'; -export { timeInterval } from '../internal/operators/timeInterval'; -export { timeout, TimeoutConfig, TimeoutInfo } from '../internal/operators/timeout'; -export { timeoutWith } from '../internal/operators/timeoutWith'; -export { timestamp } from '../internal/operators/timestamp'; -export { toArray } from '../internal/operators/toArray'; -export { window } from '../internal/operators/window'; -export { windowCount } from '../internal/operators/windowCount'; -export { windowTime } from '../internal/operators/windowTime'; -export { windowToggle } from '../internal/operators/windowToggle'; -export { windowWhen } from '../internal/operators/windowWhen'; -export { withLatestFrom } from '../internal/operators/withLatestFrom'; -export { zip } from '../internal/operators/zip'; -export { zipAll } from '../internal/operators/zipAll'; -export { zipWith } from '../internal/operators/zipWith'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/operators/index.d.ts.map b/node_modules/rxjs/dist/types/operators/index.d.ts.map deleted file mode 100644 index 3920212..0000000 --- a/node_modules/rxjs/dist/types/operators/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/operators/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AACxG,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACnF,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/testing/index.d.ts b/node_modules/rxjs/dist/types/testing/index.d.ts deleted file mode 100644 index 989b5d9..0000000 --- a/node_modules/rxjs/dist/types/testing/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { TestScheduler, RunHelpers } from '../internal/testing/TestScheduler'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/testing/index.d.ts.map b/node_modules/rxjs/dist/types/testing/index.d.ts.map deleted file mode 100644 index f5da557..0000000 --- a/node_modules/rxjs/dist/types/testing/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/webSocket/index.d.ts b/node_modules/rxjs/dist/types/webSocket/index.d.ts deleted file mode 100644 index 2e1940d..0000000 --- a/node_modules/rxjs/dist/types/webSocket/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { webSocket as webSocket } from '../internal/observable/dom/webSocket'; -export { WebSocketSubject, WebSocketSubjectConfig } from '../internal/observable/dom/WebSocketSubject'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/rxjs/dist/types/webSocket/index.d.ts.map b/node_modules/rxjs/dist/types/webSocket/index.d.ts.map deleted file mode 100644 index a38d6bc..0000000 --- a/node_modules/rxjs/dist/types/webSocket/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/webSocket/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC"} \ No newline at end of file diff --git a/node_modules/rxjs/fetch/package.json b/node_modules/rxjs/fetch/package.json deleted file mode 100644 index 892f358..0000000 --- a/node_modules/rxjs/fetch/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "rxjs/fetch", - "types": "../dist/types/fetch/index.d.ts", - "main": "../dist/cjs/fetch/index.js", - "module": "../dist/esm5/fetch/index.js", - "es2015": "../dist/esm/fetch/index.js", - "sideEffects": false -} diff --git a/node_modules/rxjs/operators/package.json b/node_modules/rxjs/operators/package.json deleted file mode 100644 index 302736d..0000000 --- a/node_modules/rxjs/operators/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "rxjs/operators", - "types": "../dist/types/operators/index.d.ts", - "main": "../dist/cjs/operators/index.js", - "module": "../dist/esm5/operators/index.js", - "es2015": "../dist/esm/operators/index.js", - "sideEffects": false -} diff --git a/node_modules/rxjs/package.json b/node_modules/rxjs/package.json deleted file mode 100644 index 9e0c077..0000000 --- a/node_modules/rxjs/package.json +++ /dev/null @@ -1,245 +0,0 @@ -{ - "name": "rxjs", - "version": "7.8.2", - "description": "Reactive Extensions for modern JavaScript", - "main": "./dist/cjs/index.js", - "module": "./dist/esm5/index.js", - "es2015": "./dist/esm/index.js", - "types": "index.d.ts", - "typesVersions": { - ">=4.2": { - "*": [ - "dist/types/*" - ] - } - }, - "sideEffects": false, - "exports": { - ".": { - "types": "./dist/types/index.d.ts", - "node": "./dist/cjs/index.js", - "require": "./dist/cjs/index.js", - "es2015": "./dist/esm/index.js", - "default": "./dist/esm5/index.js" - }, - "./ajax": { - "types": "./dist/types/ajax/index.d.ts", - "node": "./dist/cjs/ajax/index.js", - "require": "./dist/cjs/ajax/index.js", - "es2015": "./dist/esm/ajax/index.js", - "default": "./dist/esm5/ajax/index.js" - }, - "./fetch": { - "types": "./dist/types/fetch/index.d.ts", - "node": "./dist/cjs/fetch/index.js", - "require": "./dist/cjs/fetch/index.js", - "es2015": "./dist/esm/fetch/index.js", - "default": "./dist/esm5/fetch/index.js" - }, - "./operators": { - "types": "./dist/types/operators/index.d.ts", - "node": "./dist/cjs/operators/index.js", - "require": "./dist/cjs/operators/index.js", - "es2015": "./dist/esm/operators/index.js", - "default": "./dist/esm5/operators/index.js" - }, - "./testing": { - "types": "./dist/types/testing/index.d.ts", - "node": "./dist/cjs/testing/index.js", - "require": "./dist/cjs/testing/index.js", - "es2015": "./dist/esm/testing/index.js", - "default": "./dist/esm5/testing/index.js" - }, - "./webSocket": { - "types": "./dist/types/webSocket/index.d.ts", - "node": "./dist/cjs/webSocket/index.js", - "require": "./dist/cjs/webSocket/index.js", - "es2015": "./dist/esm/webSocket/index.js", - "default": "./dist/esm5/webSocket/index.js" - }, - "./internal/*": { - "types": "./dist/types/internal/*.d.ts", - "node": "./dist/cjs/internal/*.js", - "require": "./dist/cjs/internal/*.js", - "es2015": "./dist/esm/internal/*.js", - "default": "./dist/esm5/internal/*.js" - }, - "./package.json": "./package.json" - }, - "config": { - "commitizen": { - "path": "cz-conventional-changelog" - } - }, - "lint-staged": { - "*.js": "eslint --cache --fix", - "(src|spec)/**/*.ts": [ - "tslint --fix", - "prettier --write" - ], - "*.{js,css,md}": "prettier --write" - }, - "scripts": { - "changelog": "npx conventional-changelog-cli -p angular -i CHANGELOG.md -s", - "build:spec:browser": "echo \"Browser test is not working currently\" && exit -1 && webpack --config spec/support/webpack.mocha.config.js", - "lint_spec": "tslint -c spec/tslint.json -p spec/tsconfig.json \"spec/**/*.ts\"", - "lint_src": "tslint -c tslint.json -p src/tsconfig.base.json \"src/**/*.ts\"", - "lint": "npm-run-all --parallel lint_*", - "dtslint": "tsc -b ./src/tsconfig.types.json && tslint -c spec-dtslint/tslint.json -p spec-dtslint/tsconfig.json \"spec-dtslint/**/*.ts\"", - "prepublishOnly": "npm run build:package && npm run lint && npm run test && npm run test:circular && npm run dtslint && npm run test:side-effects", - "publish_docs": "./publish_docs.sh", - "test": "cross-env TS_NODE_PROJECT=tsconfig.mocha.json mocha --config spec/support/.mocharc.js \"spec/**/*-spec.ts\"", - "test:esm": "node spec/module-test-spec.mjs", - "test:browser": "echo \"Browser test is not working currently\" && exit -1 && npm-run-all build:spec:browser && opn spec/support/mocha-browser-runner.html", - "test:circular": "dependency-cruiser --validate .dependency-cruiser.json -x \"^node_modules\" dist/esm5", - "test:systemjs": "node integration/systemjs/systemjs-compatibility-spec.js", - "test:side-effects": "check-side-effects --test integration/side-effects/side-effects.json", - "test:side-effects:update": "npm run test:side-effects -- --update", - "test:import": "ts-node ./integration/import/runner.ts", - "compile": "tsc -b ./src/tsconfig.cjs.json ./src/tsconfig.cjs.spec.json ./src/tsconfig.esm.json ./src/tsconfig.esm5.json ./src/tsconfig.esm5.rollup.json ./src/tsconfig.types.json ./src/tsconfig.types.spec.json ./spec/tsconfig.json", - "build:clean": "shx rm -rf ./dist", - "build:global": "node ./tools/make-umd-bundle.js && node ./tools/make-closure-core.js", - "build:package": "npm-run-all build:clean compile build:global && node ./tools/prepare-package.js && node ./tools/generate-alias.js", - "watch": "nodemon -w \"src/\" -w \"spec/\" -e ts -x npm test", - "watch:dtslint": "nodemon -w \"src/\" -w \"spec-dtslint/\" -e ts -x npm run dtslint" - }, - "repository": { - "type": "git", - "url": "https://github.com/reactivex/rxjs.git" - }, - "keywords": [ - "Rx", - "RxJS", - "ReactiveX", - "ReactiveExtensions", - "Streams", - "Observables", - "Observable", - "Stream", - "ES6", - "ES2015" - ], - "author": "Ben Lesh ", - "contributors": [ - { - "name": "Ben Lesh", - "email": "ben@benlesh.com" - }, - { - "name": "Paul Taylor", - "email": "paul.e.taylor@me.com" - }, - { - "name": "Jeff Cross", - "email": "crossj@google.com" - }, - { - "name": "Matthew Podwysocki", - "email": "matthewp@microsoft.com" - }, - { - "name": "OJ Kwon", - "email": "kwon.ohjoong@gmail.com" - }, - { - "name": "Andre Staltz", - "email": "andre@staltz.com" - } - ], - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/ReactiveX/RxJS/issues" - }, - "homepage": "https://rxjs.dev", - "dependencies": { - "tslib": "^2.1.0" - }, - "devDependencies": { - "@angular-devkit/build-optimizer": "0.4.6", - "@angular-devkit/schematics": "^11.0.7", - "@swc/core": "^1.2.128", - "@swc/helpers": "^0.3.2", - "@types/chai": "^4.2.11", - "@types/lodash": "4.14.102", - "@types/mocha": "^7.0.2", - "@types/node": "^14.14.6", - "@types/shelljs": "^0.8.8", - "@types/sinon": "4.1.3", - "@types/sinon-chai": "2.7.29", - "@types/source-map": "^0.5.2", - "@typescript-eslint/eslint-plugin": "^4.29.1", - "@typescript-eslint/parser": "^4.29.1", - "babel-polyfill": "6.26.0", - "chai": "^4.2.0", - "check-side-effects": "0.0.23", - "color": "3.0.0", - "colors": "1.1.2", - "cross-env": "5.1.3", - "cz-conventional-changelog": "1.2.0", - "dependency-cruiser": "^9.12.0", - "escape-string-regexp": "1.0.5", - "eslint": "^7.8.1", - "eslint-plugin-jasmine": "^2.10.1", - "form-data": "^3.0.0", - "fs-extra": "^8.1.0", - "glob": "7.1.2", - "google-closure-compiler-js": "20170218.0.0", - "husky": "^4.2.5", - "klaw-sync": "3.0.2", - "lint-staged": "^10.2.11", - "lodash": "^4.17.15", - "minimist": "^1.2.5", - "mocha": "^8.1.3", - "nodemon": "^1.9.2", - "npm-run-all": "4.1.2", - "opn-cli": "3.1.0", - "platform": "1.3.5", - "prettier": "^2.5.1", - "promise": "8.0.1", - "rollup": "0.66.6", - "rollup-plugin-alias": "1.4.0", - "rollup-plugin-inject": "2.0.0", - "rollup-plugin-node-resolve": "2.0.0", - "shelljs": "^0.8.4", - "shx": "^0.3.2", - "sinon": "4.3.0", - "sinon-chai": "2.14.0", - "source-map-support": "0.5.3", - "systemjs": "^0.21.0", - "ts-node": "^9.1.1", - "tslint": "^5.20.1", - "tslint-config-prettier": "^1.18.0", - "tslint-etc": "1.13.10", - "tslint-no-toplevel-property-access": "0.0.2", - "tslint-no-unused-expression-chai": "0.0.3", - "typescript": "~4.2.0", - "validate-commit-msg": "2.14.0", - "web-streams-polyfill": "^3.0.2", - "webpack": "^4.31.0" - }, - "files": [ - "dist/bundles", - "dist/cjs/**/!(*.tsbuildinfo)", - "dist/esm/**/!(*.tsbuildinfo)", - "dist/esm5/**/!(*.tsbuildinfo)", - "dist/types/**/!(*.tsbuildinfo)", - "ajax", - "fetch", - "operators", - "testing", - "webSocket", - "src", - "CHANGELOG.md", - "CODE_OF_CONDUCT.md", - "LICENSE.txt", - "package.json", - "README.md", - "tsconfig.json" - ], - "husky": { - "hooks": { - "pre-commit": "lint-staged", - "commit-msg": "validate-commit-msg" - } - } -} diff --git a/node_modules/rxjs/src/Rx.global.js b/node_modules/rxjs/src/Rx.global.js deleted file mode 100644 index d75682b..0000000 --- a/node_modules/rxjs/src/Rx.global.js +++ /dev/null @@ -1,5 +0,0 @@ -(function (root, factory) { - root.Rx = factory(); -})(window || global || this, function () { - return require('../dist/package/Rx'); -}); \ No newline at end of file diff --git a/node_modules/rxjs/src/ajax/index.ts b/node_modules/rxjs/src/ajax/index.ts deleted file mode 100644 index f30f026..0000000 --- a/node_modules/rxjs/src/ajax/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { ajax } from '../internal/ajax/ajax'; -export { AjaxError, AjaxTimeoutError } from '../internal/ajax/errors'; -export { AjaxResponse } from '../internal/ajax/AjaxResponse'; -export { AjaxRequest, AjaxConfig, AjaxDirection } from '../internal/ajax/types'; diff --git a/node_modules/rxjs/src/fetch/index.ts b/node_modules/rxjs/src/fetch/index.ts deleted file mode 100644 index e6ff01d..0000000 --- a/node_modules/rxjs/src/fetch/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { fromFetch } from '../internal/observable/dom/fetch'; diff --git a/node_modules/rxjs/src/index.ts b/node_modules/rxjs/src/index.ts deleted file mode 100644 index 1805341..0000000 --- a/node_modules/rxjs/src/index.ts +++ /dev/null @@ -1,209 +0,0 @@ -////////////////////////////////////////////////////////// -// Here we need to reference our other deep imports -// so VS code will figure out where they are -// see conversation here: -// https://github.com/microsoft/TypeScript/issues/43034 -////////////////////////////////////////////////////////// - -// tslint:disable: no-reference -// It's tempting to add references to all of the deep-import locations, but -// adding references to those that require DOM types breaks Node projects. -/// -/// -// tslint:enable: no-reference - -/* Observable */ -export { Observable } from './internal/Observable'; -export { ConnectableObservable } from './internal/observable/ConnectableObservable'; -export { GroupedObservable } from './internal/operators/groupBy'; -export { Operator } from './internal/Operator'; -export { observable } from './internal/symbol/observable'; -export { animationFrames } from './internal/observable/dom/animationFrames'; - -/* Subjects */ -export { Subject } from './internal/Subject'; -export { BehaviorSubject } from './internal/BehaviorSubject'; -export { ReplaySubject } from './internal/ReplaySubject'; -export { AsyncSubject } from './internal/AsyncSubject'; - -/* Schedulers */ -export { asap, asapScheduler } from './internal/scheduler/asap'; -export { async, asyncScheduler } from './internal/scheduler/async'; -export { queue, queueScheduler } from './internal/scheduler/queue'; -export { animationFrame, animationFrameScheduler } from './internal/scheduler/animationFrame'; -export { VirtualTimeScheduler, VirtualAction } from './internal/scheduler/VirtualTimeScheduler'; -export { Scheduler } from './internal/Scheduler'; - -/* Subscription */ -export { Subscription } from './internal/Subscription'; -export { Subscriber } from './internal/Subscriber'; - -/* Notification */ -export { Notification, NotificationKind } from './internal/Notification'; - -/* Utils */ -export { pipe } from './internal/util/pipe'; -export { noop } from './internal/util/noop'; -export { identity } from './internal/util/identity'; -export { isObservable } from './internal/util/isObservable'; - -/* Promise Conversion */ -export { lastValueFrom } from './internal/lastValueFrom'; -export { firstValueFrom } from './internal/firstValueFrom'; - -/* Error types */ -export { ArgumentOutOfRangeError } from './internal/util/ArgumentOutOfRangeError'; -export { EmptyError } from './internal/util/EmptyError'; -export { NotFoundError } from './internal/util/NotFoundError'; -export { ObjectUnsubscribedError } from './internal/util/ObjectUnsubscribedError'; -export { SequenceError } from './internal/util/SequenceError'; -export { TimeoutError } from './internal/operators/timeout'; -export { UnsubscriptionError } from './internal/util/UnsubscriptionError'; - -/* Static observable creation exports */ -export { bindCallback } from './internal/observable/bindCallback'; -export { bindNodeCallback } from './internal/observable/bindNodeCallback'; -export { combineLatest } from './internal/observable/combineLatest'; -export { concat } from './internal/observable/concat'; -export { connectable } from './internal/observable/connectable'; -export { defer } from './internal/observable/defer'; -export { empty } from './internal/observable/empty'; -export { forkJoin } from './internal/observable/forkJoin'; -export { from } from './internal/observable/from'; -export { fromEvent } from './internal/observable/fromEvent'; -export { fromEventPattern } from './internal/observable/fromEventPattern'; -export { generate } from './internal/observable/generate'; -export { iif } from './internal/observable/iif'; -export { interval } from './internal/observable/interval'; -export { merge } from './internal/observable/merge'; -export { never } from './internal/observable/never'; -export { of } from './internal/observable/of'; -export { onErrorResumeNext } from './internal/observable/onErrorResumeNext'; -export { pairs } from './internal/observable/pairs'; -export { partition } from './internal/observable/partition'; -export { race } from './internal/observable/race'; -export { range } from './internal/observable/range'; -export { throwError } from './internal/observable/throwError'; -export { timer } from './internal/observable/timer'; -export { using } from './internal/observable/using'; -export { zip } from './internal/observable/zip'; -export { scheduled } from './internal/scheduled/scheduled'; - -/* Constants */ -export { EMPTY } from './internal/observable/empty'; -export { NEVER } from './internal/observable/never'; - -/* Types */ -export * from './internal/types'; - -/* Config */ -export { config, GlobalConfig } from './internal/config'; - -/* Operators */ -export { audit } from './internal/operators/audit'; -export { auditTime } from './internal/operators/auditTime'; -export { buffer } from './internal/operators/buffer'; -export { bufferCount } from './internal/operators/bufferCount'; -export { bufferTime } from './internal/operators/bufferTime'; -export { bufferToggle } from './internal/operators/bufferToggle'; -export { bufferWhen } from './internal/operators/bufferWhen'; -export { catchError } from './internal/operators/catchError'; -export { combineAll } from './internal/operators/combineAll'; -export { combineLatestAll } from './internal/operators/combineLatestAll'; -export { combineLatestWith } from './internal/operators/combineLatestWith'; -export { concatAll } from './internal/operators/concatAll'; -export { concatMap } from './internal/operators/concatMap'; -export { concatMapTo } from './internal/operators/concatMapTo'; -export { concatWith } from './internal/operators/concatWith'; -export { connect, ConnectConfig } from './internal/operators/connect'; -export { count } from './internal/operators/count'; -export { debounce } from './internal/operators/debounce'; -export { debounceTime } from './internal/operators/debounceTime'; -export { defaultIfEmpty } from './internal/operators/defaultIfEmpty'; -export { delay } from './internal/operators/delay'; -export { delayWhen } from './internal/operators/delayWhen'; -export { dematerialize } from './internal/operators/dematerialize'; -export { distinct } from './internal/operators/distinct'; -export { distinctUntilChanged } from './internal/operators/distinctUntilChanged'; -export { distinctUntilKeyChanged } from './internal/operators/distinctUntilKeyChanged'; -export { elementAt } from './internal/operators/elementAt'; -export { endWith } from './internal/operators/endWith'; -export { every } from './internal/operators/every'; -export { exhaust } from './internal/operators/exhaust'; -export { exhaustAll } from './internal/operators/exhaustAll'; -export { exhaustMap } from './internal/operators/exhaustMap'; -export { expand } from './internal/operators/expand'; -export { filter } from './internal/operators/filter'; -export { finalize } from './internal/operators/finalize'; -export { find } from './internal/operators/find'; -export { findIndex } from './internal/operators/findIndex'; -export { first } from './internal/operators/first'; -export { groupBy, BasicGroupByOptions, GroupByOptionsWithElement } from './internal/operators/groupBy'; -export { ignoreElements } from './internal/operators/ignoreElements'; -export { isEmpty } from './internal/operators/isEmpty'; -export { last } from './internal/operators/last'; -export { map } from './internal/operators/map'; -export { mapTo } from './internal/operators/mapTo'; -export { materialize } from './internal/operators/materialize'; -export { max } from './internal/operators/max'; -export { mergeAll } from './internal/operators/mergeAll'; -export { flatMap } from './internal/operators/flatMap'; -export { mergeMap } from './internal/operators/mergeMap'; -export { mergeMapTo } from './internal/operators/mergeMapTo'; -export { mergeScan } from './internal/operators/mergeScan'; -export { mergeWith } from './internal/operators/mergeWith'; -export { min } from './internal/operators/min'; -export { multicast } from './internal/operators/multicast'; -export { observeOn } from './internal/operators/observeOn'; -export { onErrorResumeNextWith } from './internal/operators/onErrorResumeNextWith'; -export { pairwise } from './internal/operators/pairwise'; -export { pluck } from './internal/operators/pluck'; -export { publish } from './internal/operators/publish'; -export { publishBehavior } from './internal/operators/publishBehavior'; -export { publishLast } from './internal/operators/publishLast'; -export { publishReplay } from './internal/operators/publishReplay'; -export { raceWith } from './internal/operators/raceWith'; -export { reduce } from './internal/operators/reduce'; -export { repeat, RepeatConfig } from './internal/operators/repeat'; -export { repeatWhen } from './internal/operators/repeatWhen'; -export { retry, RetryConfig } from './internal/operators/retry'; -export { retryWhen } from './internal/operators/retryWhen'; -export { refCount } from './internal/operators/refCount'; -export { sample } from './internal/operators/sample'; -export { sampleTime } from './internal/operators/sampleTime'; -export { scan } from './internal/operators/scan'; -export { sequenceEqual } from './internal/operators/sequenceEqual'; -export { share, ShareConfig } from './internal/operators/share'; -export { shareReplay, ShareReplayConfig } from './internal/operators/shareReplay'; -export { single } from './internal/operators/single'; -export { skip } from './internal/operators/skip'; -export { skipLast } from './internal/operators/skipLast'; -export { skipUntil } from './internal/operators/skipUntil'; -export { skipWhile } from './internal/operators/skipWhile'; -export { startWith } from './internal/operators/startWith'; -export { subscribeOn } from './internal/operators/subscribeOn'; -export { switchAll } from './internal/operators/switchAll'; -export { switchMap } from './internal/operators/switchMap'; -export { switchMapTo } from './internal/operators/switchMapTo'; -export { switchScan } from './internal/operators/switchScan'; -export { take } from './internal/operators/take'; -export { takeLast } from './internal/operators/takeLast'; -export { takeUntil } from './internal/operators/takeUntil'; -export { takeWhile } from './internal/operators/takeWhile'; -export { tap, TapObserver } from './internal/operators/tap'; -export { throttle, ThrottleConfig } from './internal/operators/throttle'; -export { throttleTime } from './internal/operators/throttleTime'; -export { throwIfEmpty } from './internal/operators/throwIfEmpty'; -export { timeInterval } from './internal/operators/timeInterval'; -export { timeout, TimeoutConfig, TimeoutInfo } from './internal/operators/timeout'; -export { timeoutWith } from './internal/operators/timeoutWith'; -export { timestamp } from './internal/operators/timestamp'; -export { toArray } from './internal/operators/toArray'; -export { window } from './internal/operators/window'; -export { windowCount } from './internal/operators/windowCount'; -export { windowTime } from './internal/operators/windowTime'; -export { windowToggle } from './internal/operators/windowToggle'; -export { windowWhen } from './internal/operators/windowWhen'; -export { withLatestFrom } from './internal/operators/withLatestFrom'; -export { zipAll } from './internal/operators/zipAll'; -export { zipWith } from './internal/operators/zipWith'; diff --git a/node_modules/rxjs/src/internal/AnyCatcher.ts b/node_modules/rxjs/src/internal/AnyCatcher.ts deleted file mode 100644 index e69ebe1..0000000 --- a/node_modules/rxjs/src/internal/AnyCatcher.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Note that we cannot apply the `internal` tag here because the declaration - * needs to survive the `stripInternal` option. Otherwise, `AnyCatcher` will - * be `any` in the `.d.ts` files. - */ -declare const anyCatcherSymbol: unique symbol; - -/** - * This is just a type that we're using to identify `any` being passed to - * function overloads. This is used because of situations like {@link forkJoin}, - * where it could return an `Observable` or an `Observable<{ [key: K]: T }>`, - * so `forkJoin(any)` would mean we need to return `Observable`. - */ -export type AnyCatcher = typeof anyCatcherSymbol; diff --git a/node_modules/rxjs/src/internal/AsyncSubject.ts b/node_modules/rxjs/src/internal/AsyncSubject.ts deleted file mode 100644 index abb086c..0000000 --- a/node_modules/rxjs/src/internal/AsyncSubject.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Subject } from './Subject'; -import { Subscriber } from './Subscriber'; - -/** - * A variant of Subject that only emits a value when it completes. It will emit - * its latest value to all its observers on completion. - */ -export class AsyncSubject extends Subject { - private _value: T | null = null; - private _hasValue = false; - private _isComplete = false; - - /** @internal */ - protected _checkFinalizedStatuses(subscriber: Subscriber) { - const { hasError, _hasValue, _value, thrownError, isStopped, _isComplete } = this; - if (hasError) { - subscriber.error(thrownError); - } else if (isStopped || _isComplete) { - _hasValue && subscriber.next(_value!); - subscriber.complete(); - } - } - - next(value: T): void { - if (!this.isStopped) { - this._value = value; - this._hasValue = true; - } - } - - complete(): void { - const { _hasValue, _value, _isComplete } = this; - if (!_isComplete) { - this._isComplete = true; - _hasValue && super.next(_value!); - super.complete(); - } - } -} diff --git a/node_modules/rxjs/src/internal/BehaviorSubject.ts b/node_modules/rxjs/src/internal/BehaviorSubject.ts deleted file mode 100644 index 6540f13..0000000 --- a/node_modules/rxjs/src/internal/BehaviorSubject.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Subject } from './Subject'; -import { Subscriber } from './Subscriber'; -import { Subscription } from './Subscription'; - -/** - * A variant of Subject that requires an initial value and emits its current - * value whenever it is subscribed to. - */ -export class BehaviorSubject extends Subject { - constructor(private _value: T) { - super(); - } - - get value(): T { - return this.getValue(); - } - - /** @internal */ - protected _subscribe(subscriber: Subscriber): Subscription { - const subscription = super._subscribe(subscriber); - !subscription.closed && subscriber.next(this._value); - return subscription; - } - - getValue(): T { - const { hasError, thrownError, _value } = this; - if (hasError) { - throw thrownError; - } - this._throwIfClosed(); - return _value; - } - - next(value: T): void { - super.next((this._value = value)); - } -} diff --git a/node_modules/rxjs/src/internal/Notification.ts b/node_modules/rxjs/src/internal/Notification.ts deleted file mode 100644 index cf344c4..0000000 --- a/node_modules/rxjs/src/internal/Notification.ts +++ /dev/null @@ -1,238 +0,0 @@ -import { PartialObserver, ObservableNotification, CompleteNotification, NextNotification, ErrorNotification } from './types'; -import { Observable } from './Observable'; -import { EMPTY } from './observable/empty'; -import { of } from './observable/of'; -import { throwError } from './observable/throwError'; -import { isFunction } from './util/isFunction'; - -// TODO: When this enum is removed, replace it with a type alias. See #4556. -/** - * @deprecated Use a string literal instead. `NotificationKind` will be replaced with a type alias in v8. - * It will not be replaced with a const enum as those are not compatible with isolated modules. - */ -export enum NotificationKind { - NEXT = 'N', - ERROR = 'E', - COMPLETE = 'C', -} - -/** - * Represents a push-based event or value that an {@link Observable} can emit. - * This class is particularly useful for operators that manage notifications, - * like {@link materialize}, {@link dematerialize}, {@link observeOn}, and - * others. Besides wrapping the actual delivered value, it also annotates it - * with metadata of, for instance, what type of push message it is (`next`, - * `error`, or `complete`). - * - * @see {@link materialize} - * @see {@link dematerialize} - * @see {@link observeOn} - * @deprecated It is NOT recommended to create instances of `Notification` directly. - * Rather, try to create POJOs matching the signature outlined in {@link ObservableNotification}. - * For example: `{ kind: 'N', value: 1 }`, `{ kind: 'E', error: new Error('bad') }`, or `{ kind: 'C' }`. - * Will be removed in v8. - */ -export class Notification { - /** - * A value signifying that the notification will "next" if observed. In truth, - * This is really synonymous with just checking `kind === "N"`. - * @deprecated Will be removed in v8. Instead, just check to see if the value of `kind` is `"N"`. - */ - readonly hasValue: boolean; - - /** - * Creates a "Next" notification object. - * @param kind Always `'N'` - * @param value The value to notify with if observed. - * @deprecated Internal implementation detail. Use {@link Notification#createNext createNext} instead. - */ - constructor(kind: 'N', value?: T); - /** - * Creates an "Error" notification object. - * @param kind Always `'E'` - * @param value Always `undefined` - * @param error The error to notify with if observed. - * @deprecated Internal implementation detail. Use {@link Notification#createError createError} instead. - */ - constructor(kind: 'E', value: undefined, error: any); - /** - * Creates a "completion" notification object. - * @param kind Always `'C'` - * @deprecated Internal implementation detail. Use {@link Notification#createComplete createComplete} instead. - */ - constructor(kind: 'C'); - constructor(public readonly kind: 'N' | 'E' | 'C', public readonly value?: T, public readonly error?: any) { - this.hasValue = kind === 'N'; - } - - /** - * Executes the appropriate handler on a passed `observer` given the `kind` of notification. - * If the handler is missing it will do nothing. Even if the notification is an error, if - * there is no error handler on the observer, an error will not be thrown, it will noop. - * @param observer The observer to notify. - */ - observe(observer: PartialObserver): void { - return observeNotification(this as ObservableNotification, observer); - } - - /** - * Executes a notification on the appropriate handler from a list provided. - * If a handler is missing for the kind of notification, nothing is called - * and no error is thrown, it will be a noop. - * @param next A next handler - * @param error An error handler - * @param complete A complete handler - * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. - */ - do(next: (value: T) => void, error: (err: any) => void, complete: () => void): void; - /** - * Executes a notification on the appropriate handler from a list provided. - * If a handler is missing for the kind of notification, nothing is called - * and no error is thrown, it will be a noop. - * @param next A next handler - * @param error An error handler - * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. - */ - do(next: (value: T) => void, error: (err: any) => void): void; - /** - * Executes the next handler if the Notification is of `kind` `"N"`. Otherwise - * this will not error, and it will be a noop. - * @param next The next handler - * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. - */ - do(next: (value: T) => void): void; - do(nextHandler: (value: T) => void, errorHandler?: (err: any) => void, completeHandler?: () => void): void { - const { kind, value, error } = this; - return kind === 'N' ? nextHandler?.(value!) : kind === 'E' ? errorHandler?.(error) : completeHandler?.(); - } - - /** - * Executes a notification on the appropriate handler from a list provided. - * If a handler is missing for the kind of notification, nothing is called - * and no error is thrown, it will be a noop. - * @param next A next handler - * @param error An error handler - * @param complete A complete handler - * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. - */ - accept(next: (value: T) => void, error: (err: any) => void, complete: () => void): void; - /** - * Executes a notification on the appropriate handler from a list provided. - * If a handler is missing for the kind of notification, nothing is called - * and no error is thrown, it will be a noop. - * @param next A next handler - * @param error An error handler - * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. - */ - accept(next: (value: T) => void, error: (err: any) => void): void; - /** - * Executes the next handler if the Notification is of `kind` `"N"`. Otherwise - * this will not error, and it will be a noop. - * @param next The next handler - * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. - */ - accept(next: (value: T) => void): void; - - /** - * Executes the appropriate handler on a passed `observer` given the `kind` of notification. - * If the handler is missing it will do nothing. Even if the notification is an error, if - * there is no error handler on the observer, an error will not be thrown, it will noop. - * @param observer The observer to notify. - * @deprecated Replaced with {@link Notification#observe observe}. Will be removed in v8. - */ - accept(observer: PartialObserver): void; - accept(nextOrObserver: PartialObserver | ((value: T) => void), error?: (err: any) => void, complete?: () => void) { - return isFunction((nextOrObserver as any)?.next) - ? this.observe(nextOrObserver as PartialObserver) - : this.do(nextOrObserver as (value: T) => void, error as any, complete as any); - } - - /** - * Returns a simple Observable that just delivers the notification represented - * by this Notification instance. - * - * @deprecated Will be removed in v8. To convert a `Notification` to an {@link Observable}, - * use {@link of} and {@link dematerialize}: `of(notification).pipe(dematerialize())`. - */ - toObservable(): Observable { - const { kind, value, error } = this; - // Select the observable to return by `kind` - const result = - kind === 'N' - ? // Next kind. Return an observable of that value. - of(value!) - : // - kind === 'E' - ? // Error kind. Return an observable that emits the error. - throwError(() => error) - : // - kind === 'C' - ? // Completion kind. Kind is "C", return an observable that just completes. - EMPTY - : // Unknown kind, return falsy, so we error below. - 0; - if (!result) { - // TODO: consider removing this check. The only way to cause this would be to - // use the Notification constructor directly in a way that is not type-safe. - // and direct use of the Notification constructor is deprecated. - throw new TypeError(`Unexpected notification kind ${kind}`); - } - return result; - } - - private static completeNotification = new Notification('C') as Notification & CompleteNotification; - /** - * A shortcut to create a Notification instance of the type `next` from a - * given value. - * @param value The `next` value. - * @return The "next" Notification representing the argument. - * @deprecated It is NOT recommended to create instances of `Notification` directly. - * Rather, try to create POJOs matching the signature outlined in {@link ObservableNotification}. - * For example: `{ kind: 'N', value: 1 }`, `{ kind: 'E', error: new Error('bad') }`, or `{ kind: 'C' }`. - * Will be removed in v8. - */ - static createNext(value: T) { - return new Notification('N', value) as Notification & NextNotification; - } - - /** - * A shortcut to create a Notification instance of the type `error` from a - * given error. - * @param err The `error` error. - * @return The "error" Notification representing the argument. - * @deprecated It is NOT recommended to create instances of `Notification` directly. - * Rather, try to create POJOs matching the signature outlined in {@link ObservableNotification}. - * For example: `{ kind: 'N', value: 1 }`, `{ kind: 'E', error: new Error('bad') }`, or `{ kind: 'C' }`. - * Will be removed in v8. - */ - static createError(err?: any) { - return new Notification('E', undefined, err) as Notification & ErrorNotification; - } - - /** - * A shortcut to create a Notification instance of the type `complete`. - * @return The valueless "complete" Notification. - * @deprecated It is NOT recommended to create instances of `Notification` directly. - * Rather, try to create POJOs matching the signature outlined in {@link ObservableNotification}. - * For example: `{ kind: 'N', value: 1 }`, `{ kind: 'E', error: new Error('bad') }`, or `{ kind: 'C' }`. - * Will be removed in v8. - */ - static createComplete(): Notification & CompleteNotification { - return Notification.completeNotification; - } -} - -/** - * Executes the appropriate handler on a passed `observer` given the `kind` of notification. - * If the handler is missing it will do nothing. Even if the notification is an error, if - * there is no error handler on the observer, an error will not be thrown, it will noop. - * @param notification The notification object to observe. - * @param observer The observer to notify. - */ -export function observeNotification(notification: ObservableNotification, observer: PartialObserver) { - const { kind, value, error } = notification as any; - if (typeof kind !== 'string') { - throw new TypeError('Invalid notification, missing "kind"'); - } - kind === 'N' ? observer.next?.(value!) : kind === 'E' ? observer.error?.(error) : observer.complete?.(); -} diff --git a/node_modules/rxjs/src/internal/NotificationFactories.ts b/node_modules/rxjs/src/internal/NotificationFactories.ts deleted file mode 100644 index 5d2080a..0000000 --- a/node_modules/rxjs/src/internal/NotificationFactories.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { CompleteNotification, NextNotification, ErrorNotification } from './types'; - -/** - * A completion object optimized for memory use and created to be the - * same "shape" as other notifications in v8. - * @internal - */ -export const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined) as CompleteNotification)(); - -/** - * Internal use only. Creates an optimized error notification that is the same "shape" - * as other notifications. - * @internal - */ -export function errorNotification(error: any): ErrorNotification { - return createNotification('E', undefined, error) as any; -} - -/** - * Internal use only. Creates an optimized next notification that is the same "shape" - * as other notifications. - * @internal - */ -export function nextNotification(value: T) { - return createNotification('N', value, undefined) as NextNotification; -} - -/** - * Ensures that all notifications created internally have the same "shape" in v8. - * - * TODO: This is only exported to support a crazy legacy test in `groupBy`. - * @internal - */ -export function createNotification(kind: 'N' | 'E' | 'C', value: any, error: any) { - return { - kind, - value, - error, - }; -} diff --git a/node_modules/rxjs/src/internal/Observable.ts b/node_modules/rxjs/src/internal/Observable.ts deleted file mode 100644 index 2da026f..0000000 --- a/node_modules/rxjs/src/internal/Observable.ts +++ /dev/null @@ -1,487 +0,0 @@ -import { Operator } from './Operator'; -import { SafeSubscriber, Subscriber } from './Subscriber'; -import { isSubscription, Subscription } from './Subscription'; -import { TeardownLogic, OperatorFunction, Subscribable, Observer } from './types'; -import { observable as Symbol_observable } from './symbol/observable'; -import { pipeFromArray } from './util/pipe'; -import { config } from './config'; -import { isFunction } from './util/isFunction'; -import { errorContext } from './util/errorContext'; - -/** - * A representation of any set of values over any amount of time. This is the most basic building block - * of RxJS. - */ -export class Observable implements Subscribable { - /** - * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. - */ - source: Observable | undefined; - - /** - * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. - */ - operator: Operator | undefined; - - /** - * @param subscribe The function that is called when the Observable is - * initially subscribed to. This function is given a Subscriber, to which new values - * can be `next`ed, or an `error` method can be called to raise an error, or - * `complete` can be called to notify of a successful completion. - */ - constructor(subscribe?: (this: Observable, subscriber: Subscriber) => TeardownLogic) { - if (subscribe) { - this._subscribe = subscribe; - } - } - - // HACK: Since TypeScript inherits static properties too, we have to - // fight against TypeScript here so Subject can have a different static create signature - /** - * Creates a new Observable by calling the Observable constructor - * @param subscribe the subscriber function to be passed to the Observable constructor - * @return A new observable. - * @deprecated Use `new Observable()` instead. Will be removed in v8. - */ - static create: (...args: any[]) => any = (subscribe?: (subscriber: Subscriber) => TeardownLogic) => { - return new Observable(subscribe); - }; - - /** - * Creates a new Observable, with this Observable instance as the source, and the passed - * operator defined as the new observable's operator. - * @param operator the operator defining the operation to take on the observable - * @return A new observable with the Operator applied. - * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. - * If you have implemented an operator using `lift`, it is recommended that you create an - * operator by simply returning `new Observable()` directly. See "Creating new operators from - * scratch" section here: https://rxjs.dev/guide/operators - */ - lift(operator?: Operator): Observable { - const observable = new Observable(); - observable.source = this; - observable.operator = operator; - return observable; - } - - subscribe(observerOrNext?: Partial> | ((value: T) => void)): Subscription; - /** @deprecated Instead of passing separate callback arguments, use an observer argument. Signatures taking separate callback arguments will be removed in v8. Details: https://rxjs.dev/deprecations/subscribe-arguments */ - subscribe(next?: ((value: T) => void) | null, error?: ((error: any) => void) | null, complete?: (() => void) | null): Subscription; - /** - * Invokes an execution of an Observable and registers Observer handlers for notifications it will emit. - * - * Use it when you have all these Observables, but still nothing is happening. - * - * `subscribe` is not a regular operator, but a method that calls Observable's internal `subscribe` function. It - * might be for example a function that you passed to Observable's constructor, but most of the time it is - * a library implementation, which defines what will be emitted by an Observable, and when it be will emitted. This means - * that calling `subscribe` is actually the moment when Observable starts its work, not when it is created, as it is often - * the thought. - * - * Apart from starting the execution of an Observable, this method allows you to listen for values - * that an Observable emits, as well as for when it completes or errors. You can achieve this in two - * of the following ways. - * - * The first way is creating an object that implements {@link Observer} interface. It should have methods - * defined by that interface, but note that it should be just a regular JavaScript object, which you can create - * yourself in any way you want (ES6 class, classic function constructor, object literal etc.). In particular, do - * not attempt to use any RxJS implementation details to create Observers - you don't need them. Remember also - * that your object does not have to implement all methods. If you find yourself creating a method that doesn't - * do anything, you can simply omit it. Note however, if the `error` method is not provided and an error happens, - * it will be thrown asynchronously. Errors thrown asynchronously cannot be caught using `try`/`catch`. Instead, - * use the {@link onUnhandledError} configuration option or use a runtime handler (like `window.onerror` or - * `process.on('error)`) to be notified of unhandled errors. Because of this, it's recommended that you provide - * an `error` method to avoid missing thrown errors. - * - * The second way is to give up on Observer object altogether and simply provide callback functions in place of its methods. - * This means you can provide three functions as arguments to `subscribe`, where the first function is equivalent - * of a `next` method, the second of an `error` method and the third of a `complete` method. Just as in case of an Observer, - * if you do not need to listen for something, you can omit a function by passing `undefined` or `null`, - * since `subscribe` recognizes these functions by where they were placed in function call. When it comes - * to the `error` function, as with an Observer, if not provided, errors emitted by an Observable will be thrown asynchronously. - * - * You can, however, subscribe with no parameters at all. This may be the case where you're not interested in terminal events - * and you also handled emissions internally by using operators (e.g. using `tap`). - * - * Whichever style of calling `subscribe` you use, in both cases it returns a Subscription object. - * This object allows you to call `unsubscribe` on it, which in turn will stop the work that an Observable does and will clean - * up all resources that an Observable used. Note that cancelling a subscription will not call `complete` callback - * provided to `subscribe` function, which is reserved for a regular completion signal that comes from an Observable. - * - * Remember that callbacks provided to `subscribe` are not guaranteed to be called asynchronously. - * It is an Observable itself that decides when these functions will be called. For example {@link of} - * by default emits all its values synchronously. Always check documentation for how given Observable - * will behave when subscribed and if its default behavior can be modified with a `scheduler`. - * - * #### Examples - * - * Subscribe with an {@link guide/observer Observer} - * - * ```ts - * import { of } from 'rxjs'; - * - * const sumObserver = { - * sum: 0, - * next(value) { - * console.log('Adding: ' + value); - * this.sum = this.sum + value; - * }, - * error() { - * // We actually could just remove this method, - * // since we do not really care about errors right now. - * }, - * complete() { - * console.log('Sum equals: ' + this.sum); - * } - * }; - * - * of(1, 2, 3) // Synchronously emits 1, 2, 3 and then completes. - * .subscribe(sumObserver); - * - * // Logs: - * // 'Adding: 1' - * // 'Adding: 2' - * // 'Adding: 3' - * // 'Sum equals: 6' - * ``` - * - * Subscribe with functions ({@link deprecations/subscribe-arguments deprecated}) - * - * ```ts - * import { of } from 'rxjs' - * - * let sum = 0; - * - * of(1, 2, 3).subscribe( - * value => { - * console.log('Adding: ' + value); - * sum = sum + value; - * }, - * undefined, - * () => console.log('Sum equals: ' + sum) - * ); - * - * // Logs: - * // 'Adding: 1' - * // 'Adding: 2' - * // 'Adding: 3' - * // 'Sum equals: 6' - * ``` - * - * Cancel a subscription - * - * ```ts - * import { interval } from 'rxjs'; - * - * const subscription = interval(1000).subscribe({ - * next(num) { - * console.log(num) - * }, - * complete() { - * // Will not be called, even when cancelling subscription. - * console.log('completed!'); - * } - * }); - * - * setTimeout(() => { - * subscription.unsubscribe(); - * console.log('unsubscribed!'); - * }, 2500); - * - * // Logs: - * // 0 after 1s - * // 1 after 2s - * // 'unsubscribed!' after 2.5s - * ``` - * - * @param observerOrNext Either an {@link Observer} with some or all callback methods, - * or the `next` handler that is called for each value emitted from the subscribed Observable. - * @param error A handler for a terminal event resulting from an error. If no error handler is provided, - * the error will be thrown asynchronously as unhandled. - * @param complete A handler for a terminal event resulting from successful completion. - * @return A subscription reference to the registered handlers. - */ - subscribe( - observerOrNext?: Partial> | ((value: T) => void) | null, - error?: ((error: any) => void) | null, - complete?: (() => void) | null - ): Subscription { - const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete); - - errorContext(() => { - const { operator, source } = this; - subscriber.add( - operator - ? // We're dealing with a subscription in the - // operator chain to one of our lifted operators. - operator.call(subscriber, source) - : source - ? // If `source` has a value, but `operator` does not, something that - // had intimate knowledge of our API, like our `Subject`, must have - // set it. We're going to just call `_subscribe` directly. - this._subscribe(subscriber) - : // In all other cases, we're likely wrapping a user-provided initializer - // function, so we need to catch errors and handle them appropriately. - this._trySubscribe(subscriber) - ); - }); - - return subscriber; - } - - /** @internal */ - protected _trySubscribe(sink: Subscriber): TeardownLogic { - try { - return this._subscribe(sink); - } catch (err) { - // We don't need to return anything in this case, - // because it's just going to try to `add()` to a subscription - // above. - sink.error(err); - } - } - - /** - * Used as a NON-CANCELLABLE means of subscribing to an observable, for use with - * APIs that expect promises, like `async/await`. You cannot unsubscribe from this. - * - * **WARNING**: Only use this with observables you *know* will complete. If the source - * observable does not complete, you will end up with a promise that is hung up, and - * potentially all of the state of an async function hanging out in memory. To avoid - * this situation, look into adding something like {@link timeout}, {@link take}, - * {@link takeWhile}, or {@link takeUntil} amongst others. - * - * #### Example - * - * ```ts - * import { interval, take } from 'rxjs'; - * - * const source$ = interval(1000).pipe(take(4)); - * - * async function getTotal() { - * let total = 0; - * - * await source$.forEach(value => { - * total += value; - * console.log('observable -> ' + value); - * }); - * - * return total; - * } - * - * getTotal().then( - * total => console.log('Total: ' + total) - * ); - * - * // Expected: - * // 'observable -> 0' - * // 'observable -> 1' - * // 'observable -> 2' - * // 'observable -> 3' - * // 'Total: 6' - * ``` - * - * @param next A handler for each value emitted by the observable. - * @return A promise that either resolves on observable completion or - * rejects with the handled error. - */ - forEach(next: (value: T) => void): Promise; - - /** - * @param next a handler for each value emitted by the observable - * @param promiseCtor a constructor function used to instantiate the Promise - * @return a promise that either resolves on observable completion or - * rejects with the handled error - * @deprecated Passing a Promise constructor will no longer be available - * in upcoming versions of RxJS. This is because it adds weight to the library, for very - * little benefit. If you need this functionality, it is recommended that you either - * polyfill Promise, or you create an adapter to convert the returned native promise - * to whatever promise implementation you wanted. Will be removed in v8. - */ - forEach(next: (value: T) => void, promiseCtor: PromiseConstructorLike): Promise; - - forEach(next: (value: T) => void, promiseCtor?: PromiseConstructorLike): Promise { - promiseCtor = getPromiseCtor(promiseCtor); - - return new promiseCtor((resolve, reject) => { - const subscriber = new SafeSubscriber({ - next: (value) => { - try { - next(value); - } catch (err) { - reject(err); - subscriber.unsubscribe(); - } - }, - error: reject, - complete: resolve, - }); - this.subscribe(subscriber); - }) as Promise; - } - - /** @internal */ - protected _subscribe(subscriber: Subscriber): TeardownLogic { - return this.source?.subscribe(subscriber); - } - - /** - * An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable - * @return This instance of the observable. - */ - [Symbol_observable]() { - return this; - } - - /* tslint:disable:max-line-length */ - pipe(): Observable; - pipe(op1: OperatorFunction): Observable; - pipe(op1: OperatorFunction, op2: OperatorFunction): Observable; - pipe(op1: OperatorFunction, op2: OperatorFunction, op3: OperatorFunction): Observable; - pipe( - op1: OperatorFunction, - op2: OperatorFunction, - op3: OperatorFunction, - op4: OperatorFunction - ): Observable; - pipe( - op1: OperatorFunction, - op2: OperatorFunction, - op3: OperatorFunction, - op4: OperatorFunction, - op5: OperatorFunction - ): Observable; - pipe( - op1: OperatorFunction, - op2: OperatorFunction, - op3: OperatorFunction, - op4: OperatorFunction, - op5: OperatorFunction, - op6: OperatorFunction - ): Observable; - pipe( - op1: OperatorFunction, - op2: OperatorFunction, - op3: OperatorFunction, - op4: OperatorFunction, - op5: OperatorFunction, - op6: OperatorFunction, - op7: OperatorFunction - ): Observable; - pipe( - op1: OperatorFunction, - op2: OperatorFunction, - op3: OperatorFunction, - op4: OperatorFunction, - op5: OperatorFunction, - op6: OperatorFunction, - op7: OperatorFunction, - op8: OperatorFunction - ): Observable; - pipe( - op1: OperatorFunction, - op2: OperatorFunction, - op3: OperatorFunction, - op4: OperatorFunction, - op5: OperatorFunction, - op6: OperatorFunction, - op7: OperatorFunction, - op8: OperatorFunction, - op9: OperatorFunction - ): Observable; - pipe( - op1: OperatorFunction, - op2: OperatorFunction, - op3: OperatorFunction, - op4: OperatorFunction, - op5: OperatorFunction, - op6: OperatorFunction, - op7: OperatorFunction, - op8: OperatorFunction, - op9: OperatorFunction, - ...operations: OperatorFunction[] - ): Observable; - /* tslint:enable:max-line-length */ - - /** - * Used to stitch together functional operators into a chain. - * - * ## Example - * - * ```ts - * import { interval, filter, map, scan } from 'rxjs'; - * - * interval(1000) - * .pipe( - * filter(x => x % 2 === 0), - * map(x => x + x), - * scan((acc, x) => acc + x) - * ) - * .subscribe(x => console.log(x)); - * ``` - * - * @return The Observable result of all the operators having been called - * in the order they were passed in. - */ - pipe(...operations: OperatorFunction[]): Observable { - return pipeFromArray(operations)(this); - } - - /* tslint:disable:max-line-length */ - /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */ - toPromise(): Promise; - /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */ - toPromise(PromiseCtor: typeof Promise): Promise; - /** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */ - toPromise(PromiseCtor: PromiseConstructorLike): Promise; - /* tslint:enable:max-line-length */ - - /** - * Subscribe to this Observable and get a Promise resolving on - * `complete` with the last emission (if any). - * - * **WARNING**: Only use this with observables you *know* will complete. If the source - * observable does not complete, you will end up with a promise that is hung up, and - * potentially all of the state of an async function hanging out in memory. To avoid - * this situation, look into adding something like {@link timeout}, {@link take}, - * {@link takeWhile}, or {@link takeUntil} amongst others. - * - * @param [promiseCtor] a constructor function used to instantiate - * the Promise - * @return A Promise that resolves with the last value emit, or - * rejects on an error. If there were no emissions, Promise - * resolves with undefined. - * @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise - */ - toPromise(promiseCtor?: PromiseConstructorLike): Promise { - promiseCtor = getPromiseCtor(promiseCtor); - - return new promiseCtor((resolve, reject) => { - let value: T | undefined; - this.subscribe( - (x: T) => (value = x), - (err: any) => reject(err), - () => resolve(value) - ); - }) as Promise; - } -} - -/** - * Decides between a passed promise constructor from consuming code, - * A default configured promise constructor, and the native promise - * constructor and returns it. If nothing can be found, it will throw - * an error. - * @param promiseCtor The optional promise constructor to passed by consuming code - */ -function getPromiseCtor(promiseCtor: PromiseConstructorLike | undefined) { - return promiseCtor ?? config.Promise ?? Promise; -} - -function isObserver(value: any): value is Observer { - return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete); -} - -function isSubscriber(value: any): value is Subscriber { - return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value)); -} diff --git a/node_modules/rxjs/src/internal/Operator.ts b/node_modules/rxjs/src/internal/Operator.ts deleted file mode 100644 index ab7bc50..0000000 --- a/node_modules/rxjs/src/internal/Operator.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Subscriber } from './Subscriber'; -import { TeardownLogic } from './types'; - -/*** - * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. - */ -export interface Operator { - call(subscriber: Subscriber, source: any): TeardownLogic; -} diff --git a/node_modules/rxjs/src/internal/ReplaySubject.ts b/node_modules/rxjs/src/internal/ReplaySubject.ts deleted file mode 100644 index 67394b7..0000000 --- a/node_modules/rxjs/src/internal/ReplaySubject.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { Subject } from './Subject'; -import { TimestampProvider } from './types'; -import { Subscriber } from './Subscriber'; -import { Subscription } from './Subscription'; -import { dateTimestampProvider } from './scheduler/dateTimestampProvider'; - -/** - * A variant of {@link Subject} that "replays" old values to new subscribers by emitting them when they first subscribe. - * - * `ReplaySubject` has an internal buffer that will store a specified number of values that it has observed. Like `Subject`, - * `ReplaySubject` "observes" values by having them passed to its `next` method. When it observes a value, it will store that - * value for a time determined by the configuration of the `ReplaySubject`, as passed to its constructor. - * - * When a new subscriber subscribes to the `ReplaySubject` instance, it will synchronously emit all values in its buffer in - * a First-In-First-Out (FIFO) manner. The `ReplaySubject` will also complete, if it has observed completion; and it will - * error if it has observed an error. - * - * There are two main configuration items to be concerned with: - * - * 1. `bufferSize` - This will determine how many items are stored in the buffer, defaults to infinite. - * 2. `windowTime` - The amount of time to hold a value in the buffer before removing it from the buffer. - * - * Both configurations may exist simultaneously. So if you would like to buffer a maximum of 3 values, as long as the values - * are less than 2 seconds old, you could do so with a `new ReplaySubject(3, 2000)`. - * - * ### Differences with BehaviorSubject - * - * `BehaviorSubject` is similar to `new ReplaySubject(1)`, with a couple of exceptions: - * - * 1. `BehaviorSubject` comes "primed" with a single value upon construction. - * 2. `ReplaySubject` will replay values, even after observing an error, where `BehaviorSubject` will not. - * - * @see {@link Subject} - * @see {@link BehaviorSubject} - * @see {@link shareReplay} - */ -export class ReplaySubject extends Subject { - private _buffer: (T | number)[] = []; - private _infiniteTimeWindow = true; - - /** - * @param _bufferSize The size of the buffer to replay on subscription - * @param _windowTime The amount of time the buffered items will stay buffered - * @param _timestampProvider An object with a `now()` method that provides the current timestamp. This is used to - * calculate the amount of time something has been buffered. - */ - constructor( - private _bufferSize = Infinity, - private _windowTime = Infinity, - private _timestampProvider: TimestampProvider = dateTimestampProvider - ) { - super(); - this._infiniteTimeWindow = _windowTime === Infinity; - this._bufferSize = Math.max(1, _bufferSize); - this._windowTime = Math.max(1, _windowTime); - } - - next(value: T): void { - const { isStopped, _buffer, _infiniteTimeWindow, _timestampProvider, _windowTime } = this; - if (!isStopped) { - _buffer.push(value); - !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime); - } - this._trimBuffer(); - super.next(value); - } - - /** @internal */ - protected _subscribe(subscriber: Subscriber): Subscription { - this._throwIfClosed(); - this._trimBuffer(); - - const subscription = this._innerSubscribe(subscriber); - - const { _infiniteTimeWindow, _buffer } = this; - // We use a copy here, so reentrant code does not mutate our array while we're - // emitting it to a new subscriber. - const copy = _buffer.slice(); - for (let i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) { - subscriber.next(copy[i] as T); - } - - this._checkFinalizedStatuses(subscriber); - - return subscription; - } - - private _trimBuffer() { - const { _bufferSize, _timestampProvider, _buffer, _infiniteTimeWindow } = this; - // If we don't have an infinite buffer size, and we're over the length, - // use splice to truncate the old buffer values off. Note that we have to - // double the size for instances where we're not using an infinite time window - // because we're storing the values and the timestamps in the same array. - const adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize; - _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize); - - // Now, if we're not in an infinite time window, remove all values where the time is - // older than what is allowed. - if (!_infiniteTimeWindow) { - const now = _timestampProvider.now(); - let last = 0; - // Search the array for the first timestamp that isn't expired and - // truncate the buffer up to that point. - for (let i = 1; i < _buffer.length && (_buffer[i] as number) <= now; i += 2) { - last = i; - } - last && _buffer.splice(0, last + 1); - } - } -} diff --git a/node_modules/rxjs/src/internal/Scheduler.ts b/node_modules/rxjs/src/internal/Scheduler.ts deleted file mode 100644 index 0c3d6b6..0000000 --- a/node_modules/rxjs/src/internal/Scheduler.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { Action } from './scheduler/Action'; -import { Subscription } from './Subscription'; -import { SchedulerLike, SchedulerAction } from './types'; -import { dateTimestampProvider } from './scheduler/dateTimestampProvider'; - -/** - * An execution context and a data structure to order tasks and schedule their - * execution. Provides a notion of (potentially virtual) time, through the - * `now()` getter method. - * - * Each unit of work in a Scheduler is called an `Action`. - * - * ```ts - * class Scheduler { - * now(): number; - * schedule(work, delay?, state?): Subscription; - * } - * ``` - * - * @deprecated Scheduler is an internal implementation detail of RxJS, and - * should not be used directly. Rather, create your own class and implement - * {@link SchedulerLike}. Will be made internal in v8. - */ -export class Scheduler implements SchedulerLike { - public static now: () => number = dateTimestampProvider.now; - - constructor(private schedulerActionCtor: typeof Action, now: () => number = Scheduler.now) { - this.now = now; - } - - /** - * A getter method that returns a number representing the current time - * (at the time this function was called) according to the scheduler's own - * internal clock. - * @return A number that represents the current time. May or may not - * have a relation to wall-clock time. May or may not refer to a time unit - * (e.g. milliseconds). - */ - public now: () => number; - - /** - * Schedules a function, `work`, for execution. May happen at some point in - * the future, according to the `delay` parameter, if specified. May be passed - * some context object, `state`, which will be passed to the `work` function. - * - * The given arguments will be processed an stored as an Action object in a - * queue of actions. - * - * @param work A function representing a task, or some unit of work to be - * executed by the Scheduler. - * @param delay Time to wait before executing the work, where the time unit is - * implicit and defined by the Scheduler itself. - * @param state Some contextual data that the `work` function uses when called - * by the Scheduler. - * @return A subscription in order to be able to unsubscribe the scheduled work. - */ - public schedule(work: (this: SchedulerAction, state?: T) => void, delay: number = 0, state?: T): Subscription { - return new this.schedulerActionCtor(this, work).schedule(state, delay); - } -} diff --git a/node_modules/rxjs/src/internal/Subject.ts b/node_modules/rxjs/src/internal/Subject.ts deleted file mode 100644 index 61ed267..0000000 --- a/node_modules/rxjs/src/internal/Subject.ts +++ /dev/null @@ -1,185 +0,0 @@ -import { Operator } from './Operator'; -import { Observable } from './Observable'; -import { Subscriber } from './Subscriber'; -import { Subscription, EMPTY_SUBSCRIPTION } from './Subscription'; -import { Observer, SubscriptionLike, TeardownLogic } from './types'; -import { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError'; -import { arrRemove } from './util/arrRemove'; -import { errorContext } from './util/errorContext'; - -/** - * A Subject is a special type of Observable that allows values to be - * multicasted to many Observers. Subjects are like EventEmitters. - * - * Every Subject is an Observable and an Observer. You can subscribe to a - * Subject, and you can call next to feed values as well as error and complete. - */ -export class Subject extends Observable implements SubscriptionLike { - closed = false; - - private currentObservers: Observer[] | null = null; - - /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ - observers: Observer[] = []; - /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ - isStopped = false; - /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ - hasError = false; - /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ - thrownError: any = null; - - /** - * Creates a "subject" by basically gluing an observer to an observable. - * - * @deprecated Recommended you do not use. Will be removed at some point in the future. Plans for replacement still under discussion. - */ - static create: (...args: any[]) => any = (destination: Observer, source: Observable): AnonymousSubject => { - return new AnonymousSubject(destination, source); - }; - - constructor() { - // NOTE: This must be here to obscure Observable's constructor. - super(); - } - - /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ - lift(operator: Operator): Observable { - const subject = new AnonymousSubject(this, this); - subject.operator = operator as any; - return subject as any; - } - - /** @internal */ - protected _throwIfClosed() { - if (this.closed) { - throw new ObjectUnsubscribedError(); - } - } - - next(value: T) { - errorContext(() => { - this._throwIfClosed(); - if (!this.isStopped) { - if (!this.currentObservers) { - this.currentObservers = Array.from(this.observers); - } - for (const observer of this.currentObservers) { - observer.next(value); - } - } - }); - } - - error(err: any) { - errorContext(() => { - this._throwIfClosed(); - if (!this.isStopped) { - this.hasError = this.isStopped = true; - this.thrownError = err; - const { observers } = this; - while (observers.length) { - observers.shift()!.error(err); - } - } - }); - } - - complete() { - errorContext(() => { - this._throwIfClosed(); - if (!this.isStopped) { - this.isStopped = true; - const { observers } = this; - while (observers.length) { - observers.shift()!.complete(); - } - } - }); - } - - unsubscribe() { - this.isStopped = this.closed = true; - this.observers = this.currentObservers = null!; - } - - get observed() { - return this.observers?.length > 0; - } - - /** @internal */ - protected _trySubscribe(subscriber: Subscriber): TeardownLogic { - this._throwIfClosed(); - return super._trySubscribe(subscriber); - } - - /** @internal */ - protected _subscribe(subscriber: Subscriber): Subscription { - this._throwIfClosed(); - this._checkFinalizedStatuses(subscriber); - return this._innerSubscribe(subscriber); - } - - /** @internal */ - protected _innerSubscribe(subscriber: Subscriber) { - const { hasError, isStopped, observers } = this; - if (hasError || isStopped) { - return EMPTY_SUBSCRIPTION; - } - this.currentObservers = null; - observers.push(subscriber); - return new Subscription(() => { - this.currentObservers = null; - arrRemove(observers, subscriber); - }); - } - - /** @internal */ - protected _checkFinalizedStatuses(subscriber: Subscriber) { - const { hasError, thrownError, isStopped } = this; - if (hasError) { - subscriber.error(thrownError); - } else if (isStopped) { - subscriber.complete(); - } - } - - /** - * Creates a new Observable with this Subject as the source. You can do this - * to create custom Observer-side logic of the Subject and conceal it from - * code that uses the Observable. - * @return Observable that this Subject casts to. - */ - asObservable(): Observable { - const observable: any = new Observable(); - observable.source = this; - return observable; - } -} - -export class AnonymousSubject extends Subject { - constructor( - /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ - public destination?: Observer, - source?: Observable - ) { - super(); - this.source = source; - } - - next(value: T) { - this.destination?.next?.(value); - } - - error(err: any) { - this.destination?.error?.(err); - } - - complete() { - this.destination?.complete?.(); - } - - /** @internal */ - protected _subscribe(subscriber: Subscriber): Subscription { - return this.source?.subscribe(subscriber) ?? EMPTY_SUBSCRIPTION; - } -} diff --git a/node_modules/rxjs/src/internal/Subscriber.ts b/node_modules/rxjs/src/internal/Subscriber.ts deleted file mode 100644 index 4a96c0e..0000000 --- a/node_modules/rxjs/src/internal/Subscriber.ts +++ /dev/null @@ -1,270 +0,0 @@ -import { isFunction } from './util/isFunction'; -import { Observer, ObservableNotification } from './types'; -import { isSubscription, Subscription } from './Subscription'; -import { config } from './config'; -import { reportUnhandledError } from './util/reportUnhandledError'; -import { noop } from './util/noop'; -import { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories'; -import { timeoutProvider } from './scheduler/timeoutProvider'; -import { captureError } from './util/errorContext'; - -/** - * Implements the {@link Observer} interface and extends the - * {@link Subscription} class. While the {@link Observer} is the public API for - * consuming the values of an {@link Observable}, all Observers get converted to - * a Subscriber, in order to provide Subscription-like capabilities such as - * `unsubscribe`. Subscriber is a common type in RxJS, and crucial for - * implementing operators, but it is rarely used as a public API. - */ -export class Subscriber extends Subscription implements Observer { - /** - * A static factory for a Subscriber, given a (potentially partial) definition - * of an Observer. - * @param next The `next` callback of an Observer. - * @param error The `error` callback of an - * Observer. - * @param complete The `complete` callback of an - * Observer. - * @return A Subscriber wrapping the (partially defined) - * Observer represented by the given arguments. - * @deprecated Do not use. Will be removed in v8. There is no replacement for this - * method, and there is no reason to be creating instances of `Subscriber` directly. - * If you have a specific use case, please file an issue. - */ - static create(next?: (x?: T) => void, error?: (e?: any) => void, complete?: () => void): Subscriber { - return new SafeSubscriber(next, error, complete); - } - - /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ - protected isStopped: boolean = false; - /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ - protected destination: Subscriber | Observer; // this `any` is the escape hatch to erase extra type param (e.g. R) - - /** - * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. - * There is no reason to directly create an instance of Subscriber. This type is exported for typings reasons. - */ - constructor(destination?: Subscriber | Observer) { - super(); - if (destination) { - this.destination = destination; - // Automatically chain subscriptions together here. - // if destination is a Subscription, then it is a Subscriber. - if (isSubscription(destination)) { - destination.add(this); - } - } else { - this.destination = EMPTY_OBSERVER; - } - } - - /** - * The {@link Observer} callback to receive notifications of type `next` from - * the Observable, with a value. The Observable may call this method 0 or more - * times. - * @param value The `next` value. - */ - next(value: T): void { - if (this.isStopped) { - handleStoppedNotification(nextNotification(value), this); - } else { - this._next(value!); - } - } - - /** - * The {@link Observer} callback to receive notifications of type `error` from - * the Observable, with an attached `Error`. Notifies the Observer that - * the Observable has experienced an error condition. - * @param err The `error` exception. - */ - error(err?: any): void { - if (this.isStopped) { - handleStoppedNotification(errorNotification(err), this); - } else { - this.isStopped = true; - this._error(err); - } - } - - /** - * The {@link Observer} callback to receive a valueless notification of type - * `complete` from the Observable. Notifies the Observer that the Observable - * has finished sending push-based notifications. - */ - complete(): void { - if (this.isStopped) { - handleStoppedNotification(COMPLETE_NOTIFICATION, this); - } else { - this.isStopped = true; - this._complete(); - } - } - - unsubscribe(): void { - if (!this.closed) { - this.isStopped = true; - super.unsubscribe(); - this.destination = null!; - } - } - - protected _next(value: T): void { - this.destination.next(value); - } - - protected _error(err: any): void { - try { - this.destination.error(err); - } finally { - this.unsubscribe(); - } - } - - protected _complete(): void { - try { - this.destination.complete(); - } finally { - this.unsubscribe(); - } - } -} - -/** - * This bind is captured here because we want to be able to have - * compatibility with monoid libraries that tend to use a method named - * `bind`. In particular, a library called Monio requires this. - */ -const _bind = Function.prototype.bind; - -function bind any>(fn: Fn, thisArg: any): Fn { - return _bind.call(fn, thisArg); -} - -/** - * Internal optimization only, DO NOT EXPOSE. - * @internal - */ -class ConsumerObserver implements Observer { - constructor(private partialObserver: Partial>) {} - - next(value: T): void { - const { partialObserver } = this; - if (partialObserver.next) { - try { - partialObserver.next(value); - } catch (error) { - handleUnhandledError(error); - } - } - } - - error(err: any): void { - const { partialObserver } = this; - if (partialObserver.error) { - try { - partialObserver.error(err); - } catch (error) { - handleUnhandledError(error); - } - } else { - handleUnhandledError(err); - } - } - - complete(): void { - const { partialObserver } = this; - if (partialObserver.complete) { - try { - partialObserver.complete(); - } catch (error) { - handleUnhandledError(error); - } - } - } -} - -export class SafeSubscriber extends Subscriber { - constructor( - observerOrNext?: Partial> | ((value: T) => void) | null, - error?: ((e?: any) => void) | null, - complete?: (() => void) | null - ) { - super(); - - let partialObserver: Partial>; - if (isFunction(observerOrNext) || !observerOrNext) { - // The first argument is a function, not an observer. The next - // two arguments *could* be observers, or they could be empty. - partialObserver = { - next: (observerOrNext ?? undefined) as ((value: T) => void) | undefined, - error: error ?? undefined, - complete: complete ?? undefined, - }; - } else { - // The first argument is a partial observer. - let context: any; - if (this && config.useDeprecatedNextContext) { - // This is a deprecated path that made `this.unsubscribe()` available in - // next handler functions passed to subscribe. This only exists behind a flag - // now, as it is *very* slow. - context = Object.create(observerOrNext); - context.unsubscribe = () => this.unsubscribe(); - partialObserver = { - next: observerOrNext.next && bind(observerOrNext.next, context), - error: observerOrNext.error && bind(observerOrNext.error, context), - complete: observerOrNext.complete && bind(observerOrNext.complete, context), - }; - } else { - // The "normal" path. Just use the partial observer directly. - partialObserver = observerOrNext; - } - } - - // Wrap the partial observer to ensure it's a full observer, and - // make sure proper error handling is accounted for. - this.destination = new ConsumerObserver(partialObserver); - } -} - -function handleUnhandledError(error: any) { - if (config.useDeprecatedSynchronousErrorHandling) { - captureError(error); - } else { - // Ideal path, we report this as an unhandled error, - // which is thrown on a new call stack. - reportUnhandledError(error); - } -} - -/** - * An error handler used when no error handler was supplied - * to the SafeSubscriber -- meaning no error handler was supplied - * do the `subscribe` call on our observable. - * @param err The error to handle - */ -function defaultErrorHandler(err: any) { - throw err; -} - -/** - * A handler for notifications that cannot be sent to a stopped subscriber. - * @param notification The notification being sent. - * @param subscriber The stopped subscriber. - */ -function handleStoppedNotification(notification: ObservableNotification, subscriber: Subscriber) { - const { onStoppedNotification } = config; - onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber)); -} - -/** - * The observer used as a stub for subscriptions where the user did not - * pass any arguments to `subscribe`. Comes with the default error handling - * behavior. - */ -export const EMPTY_OBSERVER: Readonly> & { closed: true } = { - closed: true, - next: noop, - error: defaultErrorHandler, - complete: noop, -}; diff --git a/node_modules/rxjs/src/internal/Subscription.ts b/node_modules/rxjs/src/internal/Subscription.ts deleted file mode 100644 index 97f7b33..0000000 --- a/node_modules/rxjs/src/internal/Subscription.ts +++ /dev/null @@ -1,212 +0,0 @@ -import { isFunction } from './util/isFunction'; -import { UnsubscriptionError } from './util/UnsubscriptionError'; -import { SubscriptionLike, TeardownLogic, Unsubscribable } from './types'; -import { arrRemove } from './util/arrRemove'; - -/** - * Represents a disposable resource, such as the execution of an Observable. A - * Subscription has one important method, `unsubscribe`, that takes no argument - * and just disposes the resource held by the subscription. - * - * Additionally, subscriptions may be grouped together through the `add()` - * method, which will attach a child Subscription to the current Subscription. - * When a Subscription is unsubscribed, all its children (and its grandchildren) - * will be unsubscribed as well. - */ -export class Subscription implements SubscriptionLike { - public static EMPTY = (() => { - const empty = new Subscription(); - empty.closed = true; - return empty; - })(); - - /** - * A flag to indicate whether this Subscription has already been unsubscribed. - */ - public closed = false; - - private _parentage: Subscription[] | Subscription | null = null; - - /** - * The list of registered finalizers to execute upon unsubscription. Adding and removing from this - * list occurs in the {@link #add} and {@link #remove} methods. - */ - private _finalizers: Exclude[] | null = null; - - /** - * @param initialTeardown A function executed first as part of the finalization - * process that is kicked off when {@link #unsubscribe} is called. - */ - constructor(private initialTeardown?: () => void) {} - - /** - * Disposes the resources held by the subscription. May, for instance, cancel - * an ongoing Observable execution or cancel any other type of work that - * started when the Subscription was created. - */ - unsubscribe(): void { - let errors: any[] | undefined; - - if (!this.closed) { - this.closed = true; - - // Remove this from it's parents. - const { _parentage } = this; - if (_parentage) { - this._parentage = null; - if (Array.isArray(_parentage)) { - for (const parent of _parentage) { - parent.remove(this); - } - } else { - _parentage.remove(this); - } - } - - const { initialTeardown: initialFinalizer } = this; - if (isFunction(initialFinalizer)) { - try { - initialFinalizer(); - } catch (e) { - errors = e instanceof UnsubscriptionError ? e.errors : [e]; - } - } - - const { _finalizers } = this; - if (_finalizers) { - this._finalizers = null; - for (const finalizer of _finalizers) { - try { - execFinalizer(finalizer); - } catch (err) { - errors = errors ?? []; - if (err instanceof UnsubscriptionError) { - errors = [...errors, ...err.errors]; - } else { - errors.push(err); - } - } - } - } - - if (errors) { - throw new UnsubscriptionError(errors); - } - } - } - - /** - * Adds a finalizer to this subscription, so that finalization will be unsubscribed/called - * when this subscription is unsubscribed. If this subscription is already {@link #closed}, - * because it has already been unsubscribed, then whatever finalizer is passed to it - * will automatically be executed (unless the finalizer itself is also a closed subscription). - * - * Closed Subscriptions cannot be added as finalizers to any subscription. Adding a closed - * subscription to a any subscription will result in no operation. (A noop). - * - * Adding a subscription to itself, or adding `null` or `undefined` will not perform any - * operation at all. (A noop). - * - * `Subscription` instances that are added to this instance will automatically remove themselves - * if they are unsubscribed. Functions and {@link Unsubscribable} objects that you wish to remove - * will need to be removed manually with {@link #remove} - * - * @param teardown The finalization logic to add to this subscription. - */ - add(teardown: TeardownLogic): void { - // Only add the finalizer if it's not undefined - // and don't add a subscription to itself. - if (teardown && teardown !== this) { - if (this.closed) { - // If this subscription is already closed, - // execute whatever finalizer is handed to it automatically. - execFinalizer(teardown); - } else { - if (teardown instanceof Subscription) { - // We don't add closed subscriptions, and we don't add the same subscription - // twice. Subscription unsubscribe is idempotent. - if (teardown.closed || teardown._hasParent(this)) { - return; - } - teardown._addParent(this); - } - (this._finalizers = this._finalizers ?? []).push(teardown); - } - } - } - - /** - * Checks to see if a this subscription already has a particular parent. - * This will signal that this subscription has already been added to the parent in question. - * @param parent the parent to check for - */ - private _hasParent(parent: Subscription) { - const { _parentage } = this; - return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent)); - } - - /** - * Adds a parent to this subscription so it can be removed from the parent if it - * unsubscribes on it's own. - * - * NOTE: THIS ASSUMES THAT {@link _hasParent} HAS ALREADY BEEN CHECKED. - * @param parent The parent subscription to add - */ - private _addParent(parent: Subscription) { - const { _parentage } = this; - this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent; - } - - /** - * Called on a child when it is removed via {@link #remove}. - * @param parent The parent to remove - */ - private _removeParent(parent: Subscription) { - const { _parentage } = this; - if (_parentage === parent) { - this._parentage = null; - } else if (Array.isArray(_parentage)) { - arrRemove(_parentage, parent); - } - } - - /** - * Removes a finalizer from this subscription that was previously added with the {@link #add} method. - * - * Note that `Subscription` instances, when unsubscribed, will automatically remove themselves - * from every other `Subscription` they have been added to. This means that using the `remove` method - * is not a common thing and should be used thoughtfully. - * - * If you add the same finalizer instance of a function or an unsubscribable object to a `Subscription` instance - * more than once, you will need to call `remove` the same number of times to remove all instances. - * - * All finalizer instances are removed to free up memory upon unsubscription. - * - * @param teardown The finalizer to remove from this subscription - */ - remove(teardown: Exclude): void { - const { _finalizers } = this; - _finalizers && arrRemove(_finalizers, teardown); - - if (teardown instanceof Subscription) { - teardown._removeParent(this); - } - } -} - -export const EMPTY_SUBSCRIPTION = Subscription.EMPTY; - -export function isSubscription(value: any): value is Subscription { - return ( - value instanceof Subscription || - (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)) - ); -} - -function execFinalizer(finalizer: Unsubscribable | (() => void)) { - if (isFunction(finalizer)) { - finalizer(); - } else { - finalizer.unsubscribe(); - } -} diff --git a/node_modules/rxjs/src/internal/ajax/AjaxResponse.ts b/node_modules/rxjs/src/internal/ajax/AjaxResponse.ts deleted file mode 100644 index c9ca915..0000000 --- a/node_modules/rxjs/src/internal/ajax/AjaxResponse.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { AjaxRequest, AjaxResponseType } from './types'; -import { getXHRResponse } from './getXHRResponse'; - -/** - * A normalized response from an AJAX request. To get the data from the response, - * you will want to read the `response` property. - * - * - DO NOT create instances of this class directly. - * - DO NOT subclass this class. - * - * It is advised not to hold this object in memory, as it has a reference to - * the original XHR used to make the request, as well as properties containing - * request and response data. - * - * @see {@link ajax} - * @see {@link AjaxConfig} - */ -export class AjaxResponse { - /** The HTTP status code */ - readonly status: number; - - /** - * The response data, if any. Note that this will automatically be converted to the proper type - */ - readonly response: T; - - /** - * The responseType set on the request. (For example: `""`, `"arraybuffer"`, `"blob"`, `"document"`, `"json"`, or `"text"`) - * @deprecated There isn't much reason to examine this. It's the same responseType set (or defaulted) on the ajax config. - * If you really need to examine this value, you can check it on the `request` or the `xhr`. Will be removed in v8. - */ - readonly responseType: XMLHttpRequestResponseType; - - /** - * The total number of bytes loaded so far. To be used with {@link total} while - * calculating progress. (You will want to set {@link includeDownloadProgress} or - * {@link includeDownloadProgress}) - */ - readonly loaded: number; - - /** - * The total number of bytes to be loaded. To be used with {@link loaded} while - * calculating progress. (You will want to set {@link includeDownloadProgress} or - * {@link includeDownloadProgress}) - */ - readonly total: number; - - /** - * A dictionary of the response headers. - */ - readonly responseHeaders: Record; - - /** - * A normalized response from an AJAX request. To get the data from the response, - * you will want to read the `response` property. - * - * - DO NOT create instances of this class directly. - * - DO NOT subclass this class. - * - * @param originalEvent The original event object from the XHR `onload` event. - * @param xhr The `XMLHttpRequest` object used to make the request. This is useful for examining status code, etc. - * @param request The request settings used to make the HTTP request. - * @param type The type of the event emitted by the {@link ajax} Observable - */ - constructor( - /** - * The original event object from the raw XHR event. - */ - public readonly originalEvent: ProgressEvent, - /** - * The XMLHttpRequest object used to make the request. - * NOTE: It is advised not to hold this in memory, as it will retain references to all of it's event handlers - * and many other things related to the request. - */ - public readonly xhr: XMLHttpRequest, - /** - * The request parameters used to make the HTTP request. - */ - public readonly request: AjaxRequest, - /** - * The event type. This can be used to discern between different events - * if you're using progress events with {@link includeDownloadProgress} or - * {@link includeUploadProgress} settings in {@link AjaxConfig}. - * - * The event type consists of two parts: the {@link AjaxDirection} and the - * the event type. Merged with `_`, they form the `type` string. The - * direction can be an `upload` or a `download` direction, while an event can - * be `loadstart`, `progress` or `load`. - * - * `download_load` is the type of event when download has finished and the - * response is available. - */ - public readonly type: AjaxResponseType = 'download_load' - ) { - const { status, responseType } = xhr; - this.status = status ?? 0; - this.responseType = responseType ?? ''; - - // Parse the response headers in advance for the user. There's really - // not a great way to get all of them. So we need to parse the header string - // we get back. It comes in a simple enough format: - // - // header-name: value here - // content-type: application/json - // other-header-here: some, other, values, or, whatever - const allHeaders = xhr.getAllResponseHeaders(); - this.responseHeaders = allHeaders - ? // Split the header text into lines - allHeaders.split('\n').reduce((headers: Record, line) => { - // Split the lines on the first ": " as - // "key: value". Note that the value could - // technically have a ": " in it. - const index = line.indexOf(': '); - headers[line.slice(0, index)] = line.slice(index + 2); - return headers; - }, {}) - : {}; - - this.response = getXHRResponse(xhr); - const { loaded, total } = originalEvent; - this.loaded = loaded; - this.total = total; - } -} diff --git a/node_modules/rxjs/src/internal/ajax/ajax.ts b/node_modules/rxjs/src/internal/ajax/ajax.ts deleted file mode 100644 index b1628da..0000000 --- a/node_modules/rxjs/src/internal/ajax/ajax.ts +++ /dev/null @@ -1,622 +0,0 @@ -import { map } from '../operators/map'; -import { Observable } from '../Observable'; -import { AjaxConfig, AjaxRequest, AjaxDirection, ProgressEventType } from './types'; -import { AjaxResponse } from './AjaxResponse'; -import { AjaxTimeoutError, AjaxError } from './errors'; - -export interface AjaxCreationMethod { - /** - * Creates an observable that will perform an AJAX request using the - * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in - * global scope by default. - * - * This is the most configurable option, and the basis for all other AJAX calls in the library. - * - * ## Example - * - * ```ts - * import { ajax } from 'rxjs/ajax'; - * import { map, catchError, of } from 'rxjs'; - * - * const obs$ = ajax({ - * method: 'GET', - * url: 'https://api.github.com/users?per_page=5', - * responseType: 'json' - * }).pipe( - * map(userResponse => console.log('users: ', userResponse)), - * catchError(error => { - * console.log('error: ', error); - * return of(error); - * }) - * ); - * ``` - */ - (config: AjaxConfig): Observable>; - - /** - * Perform an HTTP GET using the - * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in - * global scope. Defaults to a `responseType` of `"json"`. - * - * ## Example - * - * ```ts - * import { ajax } from 'rxjs/ajax'; - * import { map, catchError, of } from 'rxjs'; - * - * const obs$ = ajax('https://api.github.com/users?per_page=5').pipe( - * map(userResponse => console.log('users: ', userResponse)), - * catchError(error => { - * console.log('error: ', error); - * return of(error); - * }) - * ); - * ``` - */ - (url: string): Observable>; - - /** - * Performs an HTTP GET using the - * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in - * global scope by default, and a `responseType` of `"json"`. - * - * @param url The URL to get the resource from - * @param headers Optional headers. Case-Insensitive. - */ - get(url: string, headers?: Record): Observable>; - - /** - * Performs an HTTP POST using the - * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in - * global scope by default, and a `responseType` of `"json"`. - * - * Before sending the value passed to the `body` argument, it is automatically serialized - * based on the specified `responseType`. By default, a JavaScript object will be serialized - * to JSON. A `responseType` of `application/x-www-form-urlencoded` will flatten any provided - * dictionary object to a url-encoded string. - * - * @param url The URL to get the resource from - * @param body The content to send. The body is automatically serialized. - * @param headers Optional headers. Case-Insensitive. - */ - post(url: string, body?: any, headers?: Record): Observable>; - - /** - * Performs an HTTP PUT using the - * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in - * global scope by default, and a `responseType` of `"json"`. - * - * Before sending the value passed to the `body` argument, it is automatically serialized - * based on the specified `responseType`. By default, a JavaScript object will be serialized - * to JSON. A `responseType` of `application/x-www-form-urlencoded` will flatten any provided - * dictionary object to a url-encoded string. - * - * @param url The URL to get the resource from - * @param body The content to send. The body is automatically serialized. - * @param headers Optional headers. Case-Insensitive. - */ - put(url: string, body?: any, headers?: Record): Observable>; - - /** - * Performs an HTTP PATCH using the - * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in - * global scope by default, and a `responseType` of `"json"`. - * - * Before sending the value passed to the `body` argument, it is automatically serialized - * based on the specified `responseType`. By default, a JavaScript object will be serialized - * to JSON. A `responseType` of `application/x-www-form-urlencoded` will flatten any provided - * dictionary object to a url-encoded string. - * - * @param url The URL to get the resource from - * @param body The content to send. The body is automatically serialized. - * @param headers Optional headers. Case-Insensitive. - */ - patch(url: string, body?: any, headers?: Record): Observable>; - - /** - * Performs an HTTP DELETE using the - * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in - * global scope by default, and a `responseType` of `"json"`. - * - * @param url The URL to get the resource from - * @param headers Optional headers. Case-Insensitive. - */ - delete(url: string, headers?: Record): Observable>; - - /** - * Performs an HTTP GET using the - * [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) in - * global scope by default, and returns the hydrated JavaScript object from the - * response. - * - * @param url The URL to get the resource from - * @param headers Optional headers. Case-Insensitive. - */ - getJSON(url: string, headers?: Record): Observable; -} - -function ajaxGet(url: string, headers?: Record): Observable> { - return ajax({ method: 'GET', url, headers }); -} - -function ajaxPost(url: string, body?: any, headers?: Record): Observable> { - return ajax({ method: 'POST', url, body, headers }); -} - -function ajaxDelete(url: string, headers?: Record): Observable> { - return ajax({ method: 'DELETE', url, headers }); -} - -function ajaxPut(url: string, body?: any, headers?: Record): Observable> { - return ajax({ method: 'PUT', url, body, headers }); -} - -function ajaxPatch(url: string, body?: any, headers?: Record): Observable> { - return ajax({ method: 'PATCH', url, body, headers }); -} - -const mapResponse = map((x: AjaxResponse) => x.response); - -function ajaxGetJSON(url: string, headers?: Record): Observable { - return mapResponse( - ajax({ - method: 'GET', - url, - headers, - }) - ); -} - -/** - * There is an ajax operator on the Rx object. - * - * It creates an observable for an Ajax request with either a request object with - * url, headers, etc or a string for a URL. - * - * ## Examples - * - * Using `ajax()` to fetch the response object that is being returned from API - * - * ```ts - * import { ajax } from 'rxjs/ajax'; - * import { map, catchError, of } from 'rxjs'; - * - * const obs$ = ajax('https://api.github.com/users?per_page=5').pipe( - * map(userResponse => console.log('users: ', userResponse)), - * catchError(error => { - * console.log('error: ', error); - * return of(error); - * }) - * ); - * - * obs$.subscribe({ - * next: value => console.log(value), - * error: err => console.log(err) - * }); - * ``` - * - * Using `ajax.getJSON()` to fetch data from API - * - * ```ts - * import { ajax } from 'rxjs/ajax'; - * import { map, catchError, of } from 'rxjs'; - * - * const obs$ = ajax.getJSON('https://api.github.com/users?per_page=5').pipe( - * map(userResponse => console.log('users: ', userResponse)), - * catchError(error => { - * console.log('error: ', error); - * return of(error); - * }) - * ); - * - * obs$.subscribe({ - * next: value => console.log(value), - * error: err => console.log(err) - * }); - * ``` - * - * Using `ajax()` with object as argument and method POST with a two seconds delay - * - * ```ts - * import { ajax } from 'rxjs/ajax'; - * import { map, catchError, of } from 'rxjs'; - * - * const users = ajax({ - * url: 'https://httpbin.org/delay/2', - * method: 'POST', - * headers: { - * 'Content-Type': 'application/json', - * 'rxjs-custom-header': 'Rxjs' - * }, - * body: { - * rxjs: 'Hello World!' - * } - * }).pipe( - * map(response => console.log('response: ', response)), - * catchError(error => { - * console.log('error: ', error); - * return of(error); - * }) - * ); - * - * users.subscribe({ - * next: value => console.log(value), - * error: err => console.log(err) - * }); - * ``` - * - * Using `ajax()` to fetch. An error object that is being returned from the request - * - * ```ts - * import { ajax } from 'rxjs/ajax'; - * import { map, catchError, of } from 'rxjs'; - * - * const obs$ = ajax('https://api.github.com/404').pipe( - * map(userResponse => console.log('users: ', userResponse)), - * catchError(error => { - * console.log('error: ', error); - * return of(error); - * }) - * ); - * - * obs$.subscribe({ - * next: value => console.log(value), - * error: err => console.log(err) - * }); - * ``` - */ -export const ajax: AjaxCreationMethod = (() => { - const create = (urlOrConfig: string | AjaxConfig) => { - const config: AjaxConfig = - typeof urlOrConfig === 'string' - ? { - url: urlOrConfig, - } - : urlOrConfig; - return fromAjax(config); - }; - - create.get = ajaxGet; - create.post = ajaxPost; - create.delete = ajaxDelete; - create.put = ajaxPut; - create.patch = ajaxPatch; - create.getJSON = ajaxGetJSON; - - return create; -})(); - -const UPLOAD = 'upload'; -const DOWNLOAD = 'download'; -const LOADSTART = 'loadstart'; -const PROGRESS = 'progress'; -const LOAD = 'load'; - -export function fromAjax(init: AjaxConfig): Observable> { - return new Observable((destination) => { - const config = { - // Defaults - async: true, - crossDomain: false, - withCredentials: false, - method: 'GET', - timeout: 0, - responseType: 'json' as XMLHttpRequestResponseType, - - ...init, - }; - - const { queryParams, body: configuredBody, headers: configuredHeaders } = config; - - let url = config.url; - if (!url) { - throw new TypeError('url is required'); - } - - if (queryParams) { - let searchParams: URLSearchParams; - if (url.includes('?')) { - // If the user has passed a URL with a querystring already in it, - // we need to combine them. So we're going to split it. There - // should only be one `?` in a valid URL. - const parts = url.split('?'); - if (2 < parts.length) { - throw new TypeError('invalid url'); - } - // Add the passed queryParams to the params already in the url provided. - searchParams = new URLSearchParams(parts[1]); - // queryParams is converted to any because the runtime is *much* more permissive than - // the types are. - new URLSearchParams(queryParams as any).forEach((value, key) => searchParams.set(key, value)); - // We have to do string concatenation here, because `new URL(url)` does - // not like relative URLs like `/this` without a base url, which we can't - // specify, nor can we assume `location` will exist, because of node. - url = parts[0] + '?' + searchParams; - } else { - // There is no preexisting querystring, so we can just use URLSearchParams - // to convert the passed queryParams into the proper format and encodings. - // queryParams is converted to any because the runtime is *much* more permissive than - // the types are. - searchParams = new URLSearchParams(queryParams as any); - url = url + '?' + searchParams; - } - } - - // Normalize the headers. We're going to make them all lowercase, since - // Headers are case insensitive by design. This makes it easier to verify - // that we aren't setting or sending duplicates. - const headers: Record = {}; - if (configuredHeaders) { - for (const key in configuredHeaders) { - if (configuredHeaders.hasOwnProperty(key)) { - headers[key.toLowerCase()] = configuredHeaders[key]; - } - } - } - - const crossDomain = config.crossDomain; - - // Set the x-requested-with header. This is a non-standard header that has - // come to be a de facto standard for HTTP requests sent by libraries and frameworks - // using XHR. However, we DO NOT want to set this if it is a CORS request. This is - // because sometimes this header can cause issues with CORS. To be clear, - // None of this is necessary, it's only being set because it's "the thing libraries do" - // Starting back as far as JQuery, and continuing with other libraries such as Angular 1, - // Axios, et al. - if (!crossDomain && !('x-requested-with' in headers)) { - headers['x-requested-with'] = 'XMLHttpRequest'; - } - - // Allow users to provide their XSRF cookie name and the name of a custom header to use to - // send the cookie. - const { withCredentials, xsrfCookieName, xsrfHeaderName } = config; - if ((withCredentials || !crossDomain) && xsrfCookieName && xsrfHeaderName) { - const xsrfCookie = document?.cookie.match(new RegExp(`(^|;\\s*)(${xsrfCookieName})=([^;]*)`))?.pop() ?? ''; - if (xsrfCookie) { - headers[xsrfHeaderName] = xsrfCookie; - } - } - - // Examine the body and determine whether or not to serialize it - // and set the content-type in `headers`, if we're able. - const body = extractContentTypeAndMaybeSerializeBody(configuredBody, headers); - - // The final request settings. - const _request: Readonly = { - ...config, - - // Set values we ensured above - url, - headers, - body, - }; - - let xhr: XMLHttpRequest; - - // Create our XHR so we can get started. - xhr = init.createXHR ? init.createXHR() : new XMLHttpRequest(); - - { - /////////////////////////////////////////////////// - // set up the events before open XHR - // https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest - // You need to add the event listeners before calling open() on the request. - // Otherwise the progress events will not fire. - /////////////////////////////////////////////////// - - const { progressSubscriber, includeDownloadProgress = false, includeUploadProgress = false } = init; - - /** - * Wires up an event handler that will emit an error when fired. Used - * for timeout and abort events. - * @param type The type of event we're treating as an error - * @param errorFactory A function that creates the type of error to emit. - */ - const addErrorEvent = (type: string, errorFactory: () => any) => { - xhr.addEventListener(type, () => { - const error = errorFactory(); - progressSubscriber?.error?.(error); - destination.error(error); - }); - }; - - // If the request times out, handle errors appropriately. - addErrorEvent('timeout', () => new AjaxTimeoutError(xhr, _request)); - - // If the request aborts (due to a network disconnection or the like), handle - // it as an error. - addErrorEvent('abort', () => new AjaxError('aborted', xhr, _request)); - - /** - * Creates a response object to emit to the consumer. - * @param direction the direction related to the event. Prefixes the event `type` in the - * `AjaxResponse` object with "upload_" for events related to uploading and "download_" - * for events related to downloading. - * @param event the actual event object. - */ - const createResponse = (direction: AjaxDirection, event: ProgressEvent) => - new AjaxResponse(event, xhr, _request, `${direction}_${event.type as ProgressEventType}` as const); - - /** - * Wires up an event handler that emits a Response object to the consumer, used for - * all events that emit responses, loadstart, progress, and load. - * Note that download load handling is a bit different below, because it has - * more logic it needs to run. - * @param target The target, either the XHR itself or the Upload object. - * @param type The type of event to wire up - * @param direction The "direction", used to prefix the response object that is - * emitted to the consumer. (e.g. "upload_" or "download_") - */ - const addProgressEvent = (target: any, type: string, direction: AjaxDirection) => { - target.addEventListener(type, (event: ProgressEvent) => { - destination.next(createResponse(direction, event)); - }); - }; - - if (includeUploadProgress) { - [LOADSTART, PROGRESS, LOAD].forEach((type) => addProgressEvent(xhr.upload, type, UPLOAD)); - } - - if (progressSubscriber) { - [LOADSTART, PROGRESS].forEach((type) => xhr.upload.addEventListener(type, (e: any) => progressSubscriber?.next?.(e))); - } - - if (includeDownloadProgress) { - [LOADSTART, PROGRESS].forEach((type) => addProgressEvent(xhr, type, DOWNLOAD)); - } - - const emitError = (status?: number) => { - const msg = 'ajax error' + (status ? ' ' + status : ''); - destination.error(new AjaxError(msg, xhr, _request)); - }; - - xhr.addEventListener('error', (e) => { - progressSubscriber?.error?.(e); - emitError(); - }); - - xhr.addEventListener(LOAD, (event) => { - const { status } = xhr; - // 4xx and 5xx should error (https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html) - if (status < 400) { - progressSubscriber?.complete?.(); - - let response: AjaxResponse; - try { - // This can throw in IE, because we end up needing to do a JSON.parse - // of the response in some cases to produce object we'd expect from - // modern browsers. - response = createResponse(DOWNLOAD, event); - } catch (err) { - destination.error(err); - return; - } - - destination.next(response); - destination.complete(); - } else { - progressSubscriber?.error?.(event); - emitError(status); - } - }); - } - - const { user, method, async } = _request; - // open XHR - if (user) { - xhr.open(method, url, async, user, _request.password); - } else { - xhr.open(method, url, async); - } - - // timeout, responseType and withCredentials can be set once the XHR is open - if (async) { - xhr.timeout = _request.timeout; - xhr.responseType = _request.responseType; - } - - if ('withCredentials' in xhr) { - xhr.withCredentials = _request.withCredentials; - } - - // set headers - for (const key in headers) { - if (headers.hasOwnProperty(key)) { - xhr.setRequestHeader(key, headers[key]); - } - } - - // finally send the request - if (body) { - xhr.send(body); - } else { - xhr.send(); - } - - return () => { - if (xhr && xhr.readyState !== 4 /*XHR done*/) { - xhr.abort(); - } - }; - }); -} - -/** - * Examines the body to determine if we need to serialize it for them or not. - * If the body is a type that XHR handles natively, we just allow it through, - * otherwise, if the body is something that *we* can serialize for the user, - * we will serialize it, and attempt to set the `content-type` header, if it's - * not already set. - * @param body The body passed in by the user - * @param headers The normalized headers - */ -function extractContentTypeAndMaybeSerializeBody(body: any, headers: Record) { - if ( - !body || - typeof body === 'string' || - isFormData(body) || - isURLSearchParams(body) || - isArrayBuffer(body) || - isFile(body) || - isBlob(body) || - isReadableStream(body) - ) { - // The XHR instance itself can handle serializing these, and set the content-type for us - // so we don't need to do that. https://xhr.spec.whatwg.org/#the-send()-method - return body; - } - - if (isArrayBufferView(body)) { - // This is a typed array (e.g. Float32Array or Uint8Array), or a DataView. - // XHR can handle this one too: https://fetch.spec.whatwg.org/#concept-bodyinit-extract - return body.buffer; - } - - if (typeof body === 'object') { - // If we have made it here, this is an object, probably a POJO, and we'll try - // to serialize it for them. If this doesn't work, it will throw, obviously, which - // is okay. The workaround for users would be to manually set the body to their own - // serialized string (accounting for circular references or whatever), then set - // the content-type manually as well. - headers['content-type'] = headers['content-type'] ?? 'application/json;charset=utf-8'; - return JSON.stringify(body); - } - - // If we've gotten past everything above, this is something we don't quite know how to - // handle. Throw an error. This will be caught and emitted from the observable. - throw new TypeError('Unknown body type'); -} - -const _toString = Object.prototype.toString; - -function toStringCheck(obj: any, name: string): boolean { - return _toString.call(obj) === `[object ${name}]`; -} - -function isArrayBuffer(body: any): body is ArrayBuffer { - return toStringCheck(body, 'ArrayBuffer'); -} - -function isFile(body: any): body is File { - return toStringCheck(body, 'File'); -} - -function isBlob(body: any): body is Blob { - return toStringCheck(body, 'Blob'); -} - -function isArrayBufferView(body: any): body is ArrayBufferView { - return typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView(body); -} - -function isFormData(body: any): body is FormData { - return typeof FormData !== 'undefined' && body instanceof FormData; -} - -function isURLSearchParams(body: any): body is URLSearchParams { - return typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams; -} - -function isReadableStream(body: any): body is ReadableStream { - return typeof ReadableStream !== 'undefined' && body instanceof ReadableStream; -} diff --git a/node_modules/rxjs/src/internal/ajax/errors.ts b/node_modules/rxjs/src/internal/ajax/errors.ts deleted file mode 100644 index 36b6dc7..0000000 --- a/node_modules/rxjs/src/internal/ajax/errors.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { AjaxRequest } from './types'; -import { getXHRResponse } from './getXHRResponse'; -import { createErrorClass } from '../util/createErrorClass'; - -/** - * A normalized AJAX error. - * - * @see {@link ajax} - */ -export interface AjaxError extends Error { - /** - * The XHR instance associated with the error. - */ - xhr: XMLHttpRequest; - - /** - * The AjaxRequest associated with the error. - */ - request: AjaxRequest; - - /** - * The HTTP status code, if the request has completed. If not, - * it is set to `0`. - */ - status: number; - - /** - * The responseType (e.g. 'json', 'arraybuffer', or 'xml'). - */ - responseType: XMLHttpRequestResponseType; - - /** - * The response data. - */ - response: any; -} - -export interface AjaxErrorCtor { - /** - * @deprecated Internal implementation detail. Do not construct error instances. - * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 - */ - new (message: string, xhr: XMLHttpRequest, request: AjaxRequest): AjaxError; -} - -/** - * Thrown when an error occurs during an AJAX request. - * This is only exported because it is useful for checking to see if an error - * is an `instanceof AjaxError`. DO NOT create new instances of `AjaxError` with - * the constructor. - * - * @see {@link ajax} - */ -export const AjaxError: AjaxErrorCtor = createErrorClass( - (_super) => - function AjaxErrorImpl(this: any, message: string, xhr: XMLHttpRequest, request: AjaxRequest) { - this.message = message; - this.name = 'AjaxError'; - this.xhr = xhr; - this.request = request; - this.status = xhr.status; - this.responseType = xhr.responseType; - let response: any; - try { - // This can throw in IE, because we have to do a JSON.parse of - // the response in some cases to get the expected response property. - response = getXHRResponse(xhr); - } catch (err) { - response = xhr.responseText; - } - this.response = response; - } -); - -export interface AjaxTimeoutError extends AjaxError {} - -export interface AjaxTimeoutErrorCtor { - /** - * @deprecated Internal implementation detail. Do not construct error instances. - * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 - */ - new (xhr: XMLHttpRequest, request: AjaxRequest): AjaxTimeoutError; -} - -/** - * Thrown when an AJAX request times out. Not to be confused with {@link TimeoutError}. - * - * This is exported only because it is useful for checking to see if errors are an - * `instanceof AjaxTimeoutError`. DO NOT use the constructor to create an instance of - * this type. - * - * @see {@link ajax} - */ -export const AjaxTimeoutError: AjaxTimeoutErrorCtor = (() => { - function AjaxTimeoutErrorImpl(this: any, xhr: XMLHttpRequest, request: AjaxRequest) { - AjaxError.call(this, 'ajax timeout', xhr, request); - this.name = 'AjaxTimeoutError'; - return this; - } - AjaxTimeoutErrorImpl.prototype = Object.create(AjaxError.prototype); - return AjaxTimeoutErrorImpl; -})() as any; diff --git a/node_modules/rxjs/src/internal/ajax/getXHRResponse.ts b/node_modules/rxjs/src/internal/ajax/getXHRResponse.ts deleted file mode 100644 index 34d7031..0000000 --- a/node_modules/rxjs/src/internal/ajax/getXHRResponse.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Gets what should be in the `response` property of the XHR. However, - * since we still support the final versions of IE, we need to do a little - * checking here to make sure that we get the right thing back. Consequently, - * we need to do a JSON.parse() in here, which *could* throw if the response - * isn't valid JSON. - * - * This is used both in creating an AjaxResponse, and in creating certain errors - * that we throw, so we can give the user whatever was in the response property. - * - * @param xhr The XHR to examine the response of - */ -export function getXHRResponse(xhr: XMLHttpRequest) { - switch (xhr.responseType) { - case 'json': { - if ('response' in xhr) { - return xhr.response; - } else { - // IE - const ieXHR: any = xhr; - return JSON.parse(ieXHR.responseText); - } - } - case 'document': - return xhr.responseXML; - case 'text': - default: { - if ('response' in xhr) { - return xhr.response; - } else { - // IE - const ieXHR: any = xhr; - return ieXHR.responseText; - } - } - } -} diff --git a/node_modules/rxjs/src/internal/ajax/types.ts b/node_modules/rxjs/src/internal/ajax/types.ts deleted file mode 100644 index 96e8a91..0000000 --- a/node_modules/rxjs/src/internal/ajax/types.ts +++ /dev/null @@ -1,235 +0,0 @@ -import { PartialObserver } from '../types'; - -/** - * Valid Ajax direction types. Prefixes the event `type` in the - * {@link AjaxResponse} object with "upload_" for events related - * to uploading and "download_" for events related to downloading. - */ -export type AjaxDirection = 'upload' | 'download'; - -export type ProgressEventType = 'loadstart' | 'progress' | 'load'; - -export type AjaxResponseType = `${AjaxDirection}_${ProgressEventType}`; - -/** - * The object containing values RxJS used to make the HTTP request. - * - * This is provided in {@link AjaxError} instances as the `request` - * object. - */ -export interface AjaxRequest { - /** - * The URL requested. - */ - url: string; - - /** - * The body to send over the HTTP request. - */ - body?: any; - - /** - * The HTTP method used to make the HTTP request. - */ - method: string; - - /** - * Whether or not the request was made asynchronously. - */ - async: boolean; - - /** - * The headers sent over the HTTP request. - */ - headers: Readonly>; - - /** - * The timeout value used for the HTTP request. - * Note: this is only honored if the request is asynchronous (`async` is `true`). - */ - timeout: number; - - /** - * The user credentials user name sent with the HTTP request. - */ - user?: string; - - /** - * The user credentials password sent with the HTTP request. - */ - password?: string; - - /** - * Whether or not the request was a CORS request. - */ - crossDomain: boolean; - - /** - * Whether or not a CORS request was sent with credentials. - * If `false`, will also ignore cookies in the CORS response. - */ - withCredentials: boolean; - - /** - * The [`responseType`](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseType) set before sending the request. - */ - responseType: XMLHttpRequestResponseType; -} - -/** - * Configuration for the {@link ajax} creation function. - */ -export interface AjaxConfig { - /** The address of the resource to request via HTTP. */ - url: string; - - /** - * The body of the HTTP request to send. - * - * This is serialized, by default, based off of the value of the `"content-type"` header. - * For example, if the `"content-type"` is `"application/json"`, the body will be serialized - * as JSON. If the `"content-type"` is `"application/x-www-form-urlencoded"`, whatever object passed - * to the body will be serialized as URL, using key-value pairs based off of the keys and values of the object. - * In all other cases, the body will be passed directly. - */ - body?: any; - - /** - * Whether or not to send the request asynchronously. Defaults to `true`. - * If set to `false`, this will block the thread until the AJAX request responds. - */ - async?: boolean; - - /** - * The HTTP Method to use for the request. Defaults to "GET". - */ - method?: string; - - /** - * The HTTP headers to apply. - * - * Note that, by default, RxJS will add the following headers under certain conditions: - * - * 1. If the `"content-type"` header is **NOT** set, and the `body` is [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData), - * a `"content-type"` of `"application/x-www-form-urlencoded; charset=UTF-8"` will be set automatically. - * 2. If the `"x-requested-with"` header is **NOT** set, and the `crossDomain` configuration property is **NOT** explicitly set to `true`, - * (meaning it is not a CORS request), a `"x-requested-with"` header with a value of `"XMLHttpRequest"` will be set automatically. - * This header is generally meaningless, and is set by libraries and frameworks using `XMLHttpRequest` to make HTTP requests. - */ - headers?: Readonly>; - - /** - * The time to wait before causing the underlying XMLHttpRequest to timeout. This is only honored if the - * `async` configuration setting is unset or set to `true`. Defaults to `0`, which is idiomatic for "never timeout". - */ - timeout?: number; - - /** The user credentials user name to send with the HTTP request */ - user?: string; - - /** The user credentials password to send with the HTTP request*/ - password?: string; - - /** - * Whether or not to send the HTTP request as a CORS request. - * Defaults to `false`. - * - * @deprecated Will be removed in version 8. Cross domain requests and what creates a cross - * domain request, are dictated by the browser, and a boolean that forces it to be cross domain - * does not make sense. If you need to force cross domain, make sure you're making a secure request, - * then add a custom header to the request or use `withCredentials`. For more information on what - * triggers a cross domain request, see the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials). - * In particular, the section on [Simple Requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Simple_requests) is useful - * for understanding when CORS will not be used. - */ - crossDomain?: boolean; - - /** - * To send user credentials in a CORS request, set to `true`. To exclude user credentials from - * a CORS request, _OR_ when cookies are to be ignored by the CORS response, set to `false`. - * - * Defaults to `false`. - */ - withCredentials?: boolean; - - /** - * The name of your site's XSRF cookie. - */ - xsrfCookieName?: string; - - /** - * The name of a custom header that you can use to send your XSRF cookie. - */ - xsrfHeaderName?: string; - - /** - * Can be set to change the response type. - * Valid values are `"arraybuffer"`, `"blob"`, `"document"`, `"json"`, and `"text"`. - * Note that the type of `"document"` (such as an XML document) is ignored if the global context is - * not `Window`. - * - * Defaults to `"json"`. - */ - responseType?: XMLHttpRequestResponseType; - - /** - * An optional factory used to create the XMLHttpRequest object used to make the AJAX request. - * This is useful in environments that lack `XMLHttpRequest`, or in situations where you - * wish to override the default `XMLHttpRequest` for some reason. - * - * If not provided, the `XMLHttpRequest` in global scope will be used. - * - * NOTE: This AJAX implementation relies on the built-in serialization and setting - * of Content-Type headers that is provided by standards-compliant XMLHttpRequest implementations, - * be sure any implementation you use meets that standard. - */ - createXHR?: () => XMLHttpRequest; - - /** - * An observer for watching the upload progress of an HTTP request. Will - * emit progress events, and completes on the final upload load event, will error for - * any XHR error or timeout. - * - * This will **not** error for errored status codes. Rather, it will always _complete_ when - * the HTTP response comes back. - * - * @deprecated If you're looking for progress events, use {@link includeDownloadProgress} and - * {@link includeUploadProgress} instead. Will be removed in v8. - */ - progressSubscriber?: PartialObserver; - - /** - * If `true`, will emit all download progress and load complete events as {@link AjaxResponse} - * from the observable. The final download event will also be emitted as a {@link AjaxResponse}. - * - * If both this and {@link includeUploadProgress} are `false`, then only the {@link AjaxResponse} will - * be emitted from the resulting observable. - */ - includeDownloadProgress?: boolean; - - /** - * If `true`, will emit all upload progress and load complete events as {@link AjaxResponse} - * from the observable. The final download event will also be emitted as a {@link AjaxResponse}. - * - * If both this and {@link includeDownloadProgress} are `false`, then only the {@link AjaxResponse} will - * be emitted from the resulting observable. - */ - includeUploadProgress?: boolean; - - /** - * Query string parameters to add to the URL in the request. - * This will require a polyfill for `URL` and `URLSearchParams` in Internet Explorer! - * - * Accepts either a query string, a `URLSearchParams` object, a dictionary of key/value pairs, or an - * array of key/value entry tuples. (Essentially, it takes anything that `new URLSearchParams` would normally take). - * - * If, for some reason you have a query string in the `url` argument, this will append to the query string in the url, - * but it will also overwrite the value of any keys that are an exact match. In other words, a url of `/test?a=1&b=2`, - * with queryParams of `{ b: 5, c: 6 }` will result in a url of roughly `/test?a=1&b=5&c=6`. - */ - queryParams?: - | string - | URLSearchParams - | Record - | [string, string | number | boolean | string[] | number[] | boolean[]][]; -} diff --git a/node_modules/rxjs/src/internal/config.ts b/node_modules/rxjs/src/internal/config.ts deleted file mode 100644 index 99461db..0000000 --- a/node_modules/rxjs/src/internal/config.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { Subscriber } from './Subscriber'; -import { ObservableNotification } from './types'; - -/** - * The {@link GlobalConfig} object for RxJS. It is used to configure things - * like how to react on unhandled errors. - */ -export const config: GlobalConfig = { - onUnhandledError: null, - onStoppedNotification: null, - Promise: undefined, - useDeprecatedSynchronousErrorHandling: false, - useDeprecatedNextContext: false, -}; - -/** - * The global configuration object for RxJS, used to configure things - * like how to react on unhandled errors. Accessible via {@link config} - * object. - */ -export interface GlobalConfig { - /** - * A registration point for unhandled errors from RxJS. These are errors that - * cannot were not handled by consuming code in the usual subscription path. For - * example, if you have this configured, and you subscribe to an observable without - * providing an error handler, errors from that subscription will end up here. This - * will _always_ be called asynchronously on another job in the runtime. This is because - * we do not want errors thrown in this user-configured handler to interfere with the - * behavior of the library. - */ - onUnhandledError: ((err: any) => void) | null; - - /** - * A registration point for notifications that cannot be sent to subscribers because they - * have completed, errored or have been explicitly unsubscribed. By default, next, complete - * and error notifications sent to stopped subscribers are noops. However, sometimes callers - * might want a different behavior. For example, with sources that attempt to report errors - * to stopped subscribers, a caller can configure RxJS to throw an unhandled error instead. - * This will _always_ be called asynchronously on another job in the runtime. This is because - * we do not want errors thrown in this user-configured handler to interfere with the - * behavior of the library. - */ - onStoppedNotification: ((notification: ObservableNotification, subscriber: Subscriber) => void) | null; - - /** - * The promise constructor used by default for {@link Observable#toPromise toPromise} and {@link Observable#forEach forEach} - * methods. - * - * @deprecated As of version 8, RxJS will no longer support this sort of injection of a - * Promise constructor. If you need a Promise implementation other than native promises, - * please polyfill/patch Promise as you see appropriate. Will be removed in v8. - */ - Promise?: PromiseConstructorLike; - - /** - * If true, turns on synchronous error rethrowing, which is a deprecated behavior - * in v6 and higher. This behavior enables bad patterns like wrapping a subscribe - * call in a try/catch block. It also enables producer interference, a nasty bug - * where a multicast can be broken for all observers by a downstream consumer with - * an unhandled error. DO NOT USE THIS FLAG UNLESS IT'S NEEDED TO BUY TIME - * FOR MIGRATION REASONS. - * - * @deprecated As of version 8, RxJS will no longer support synchronous throwing - * of unhandled errors. All errors will be thrown on a separate call stack to prevent bad - * behaviors described above. Will be removed in v8. - */ - useDeprecatedSynchronousErrorHandling: boolean; - - /** - * If true, enables an as-of-yet undocumented feature from v5: The ability to access - * `unsubscribe()` via `this` context in `next` functions created in observers passed - * to `subscribe`. - * - * This is being removed because the performance was severely problematic, and it could also cause - * issues when types other than POJOs are passed to subscribe as subscribers, as they will likely have - * their `this` context overwritten. - * - * @deprecated As of version 8, RxJS will no longer support altering the - * context of next functions provided as part of an observer to Subscribe. Instead, - * you will have access to a subscription or a signal or token that will allow you to do things like - * unsubscribe and test closed status. Will be removed in v8. - */ - useDeprecatedNextContext: boolean; -} diff --git a/node_modules/rxjs/src/internal/firstValueFrom.ts b/node_modules/rxjs/src/internal/firstValueFrom.ts deleted file mode 100644 index 2fc4bcf..0000000 --- a/node_modules/rxjs/src/internal/firstValueFrom.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { Observable } from './Observable'; -import { EmptyError } from './util/EmptyError'; -import { SafeSubscriber } from './Subscriber'; - -export interface FirstValueFromConfig { - defaultValue: T; -} - -export function firstValueFrom(source: Observable, config: FirstValueFromConfig): Promise; -export function firstValueFrom(source: Observable): Promise; - -/** - * Converts an observable to a promise by subscribing to the observable, - * and returning a promise that will resolve as soon as the first value - * arrives from the observable. The subscription will then be closed. - * - * If the observable stream completes before any values were emitted, the - * returned promise will reject with {@link EmptyError} or will resolve - * with the default value if a default was specified. - * - * If the observable stream emits an error, the returned promise will reject - * with that error. - * - * **WARNING**: Only use this with observables you *know* will emit at least one value, - * *OR* complete. If the source observable does not emit one value or complete, you will - * end up with a promise that is hung up, and potentially all of the state of an - * async function hanging out in memory. To avoid this situation, look into adding - * something like {@link timeout}, {@link take}, {@link takeWhile}, or {@link takeUntil} - * amongst others. - * - * ## Example - * - * Wait for the first value from a stream and emit it from a promise in - * an async function - * - * ```ts - * import { interval, firstValueFrom } from 'rxjs'; - * - * async function execute() { - * const source$ = interval(2000); - * const firstNumber = await firstValueFrom(source$); - * console.log(`The first number is ${ firstNumber }`); - * } - * - * execute(); - * - * // Expected output: - * // 'The first number is 0' - * ``` - * - * @see {@link lastValueFrom} - * - * @param source the observable to convert to a promise - * @param config a configuration object to define the `defaultValue` to use if the source completes without emitting a value - */ -export function firstValueFrom(source: Observable, config?: FirstValueFromConfig): Promise { - const hasConfig = typeof config === 'object'; - return new Promise((resolve, reject) => { - const subscriber = new SafeSubscriber({ - next: (value) => { - resolve(value); - subscriber.unsubscribe(); - }, - error: reject, - complete: () => { - if (hasConfig) { - resolve(config!.defaultValue); - } else { - reject(new EmptyError()); - } - }, - }); - source.subscribe(subscriber); - }); -} diff --git a/node_modules/rxjs/src/internal/lastValueFrom.ts b/node_modules/rxjs/src/internal/lastValueFrom.ts deleted file mode 100644 index 90fcebf..0000000 --- a/node_modules/rxjs/src/internal/lastValueFrom.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { Observable } from './Observable'; -import { EmptyError } from './util/EmptyError'; - -export interface LastValueFromConfig { - defaultValue: T; -} - -export function lastValueFrom(source: Observable, config: LastValueFromConfig): Promise; -export function lastValueFrom(source: Observable): Promise; - -/** - * Converts an observable to a promise by subscribing to the observable, - * waiting for it to complete, and resolving the returned promise with the - * last value from the observed stream. - * - * If the observable stream completes before any values were emitted, the - * returned promise will reject with {@link EmptyError} or will resolve - * with the default value if a default was specified. - * - * If the observable stream emits an error, the returned promise will reject - * with that error. - * - * **WARNING**: Only use this with observables you *know* will complete. If the source - * observable does not complete, you will end up with a promise that is hung up, and - * potentially all of the state of an async function hanging out in memory. To avoid - * this situation, look into adding something like {@link timeout}, {@link take}, - * {@link takeWhile}, or {@link takeUntil} amongst others. - * - * ## Example - * - * Wait for the last value from a stream and emit it from a promise in - * an async function - * - * ```ts - * import { interval, take, lastValueFrom } from 'rxjs'; - * - * async function execute() { - * const source$ = interval(2000).pipe(take(10)); - * const finalNumber = await lastValueFrom(source$); - * console.log(`The final number is ${ finalNumber }`); - * } - * - * execute(); - * - * // Expected output: - * // 'The final number is 9' - * ``` - * - * @see {@link firstValueFrom} - * - * @param source the observable to convert to a promise - * @param config a configuration object to define the `defaultValue` to use if the source completes without emitting a value - */ -export function lastValueFrom(source: Observable, config?: LastValueFromConfig): Promise { - const hasConfig = typeof config === 'object'; - return new Promise((resolve, reject) => { - let _hasValue = false; - let _value: T; - source.subscribe({ - next: (value) => { - _value = value; - _hasValue = true; - }, - error: reject, - complete: () => { - if (_hasValue) { - resolve(_value); - } else if (hasConfig) { - resolve(config!.defaultValue); - } else { - reject(new EmptyError()); - } - }, - }); - }); -} diff --git a/node_modules/rxjs/src/internal/observable/ConnectableObservable.ts b/node_modules/rxjs/src/internal/observable/ConnectableObservable.ts deleted file mode 100644 index bd1c76f..0000000 --- a/node_modules/rxjs/src/internal/observable/ConnectableObservable.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { Subject } from '../Subject'; -import { Observable } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { Subscription } from '../Subscription'; -import { refCount as higherOrderRefCount } from '../operators/refCount'; -import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; -import { hasLift } from '../util/lift'; - -/** - * @class ConnectableObservable - * @deprecated Will be removed in v8. Use {@link connectable} to create a connectable observable. - * If you are using the `refCount` method of `ConnectableObservable`, use the {@link share} operator - * instead. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export class ConnectableObservable extends Observable { - protected _subject: Subject | null = null; - protected _refCount: number = 0; - protected _connection: Subscription | null = null; - - /** - * @param source The source observable - * @param subjectFactory The factory that creates the subject used internally. - * @deprecated Will be removed in v8. Use {@link connectable} to create a connectable observable. - * `new ConnectableObservable(source, factory)` is equivalent to - * `connectable(source, { connector: factory })`. - * When the `refCount()` method is needed, the {@link share} operator should be used instead: - * `new ConnectableObservable(source, factory).refCount()` is equivalent to - * `source.pipe(share({ connector: factory }))`. - * Details: https://rxjs.dev/deprecations/multicasting - */ - constructor(public source: Observable, protected subjectFactory: () => Subject) { - super(); - // If we have lift, monkey patch that here. This is done so custom observable - // types will compose through multicast. Otherwise the resulting observable would - // simply be an instance of `ConnectableObservable`. - if (hasLift(source)) { - this.lift = source.lift; - } - } - - /** @internal */ - protected _subscribe(subscriber: Subscriber) { - return this.getSubject().subscribe(subscriber); - } - - protected getSubject(): Subject { - const subject = this._subject; - if (!subject || subject.isStopped) { - this._subject = this.subjectFactory(); - } - return this._subject!; - } - - protected _teardown() { - this._refCount = 0; - const { _connection } = this; - this._subject = this._connection = null; - _connection?.unsubscribe(); - } - - /** - * @deprecated {@link ConnectableObservable} will be removed in v8. Use {@link connectable} instead. - * Details: https://rxjs.dev/deprecations/multicasting - */ - connect(): Subscription { - let connection = this._connection; - if (!connection) { - connection = this._connection = new Subscription(); - const subject = this.getSubject(); - connection.add( - this.source.subscribe( - createOperatorSubscriber( - subject as any, - undefined, - () => { - this._teardown(); - subject.complete(); - }, - (err) => { - this._teardown(); - subject.error(err); - }, - () => this._teardown() - ) - ) - ); - - if (connection.closed) { - this._connection = null; - connection = Subscription.EMPTY; - } - } - return connection; - } - - /** - * @deprecated {@link ConnectableObservable} will be removed in v8. Use the {@link share} operator instead. - * Details: https://rxjs.dev/deprecations/multicasting - */ - refCount(): Observable { - return higherOrderRefCount()(this) as Observable; - } -} diff --git a/node_modules/rxjs/src/internal/observable/bindCallback.ts b/node_modules/rxjs/src/internal/observable/bindCallback.ts deleted file mode 100644 index a4bd574..0000000 --- a/node_modules/rxjs/src/internal/observable/bindCallback.ts +++ /dev/null @@ -1,149 +0,0 @@ -/* @prettier */ -import { SchedulerLike } from '../types'; -import { Observable } from '../Observable'; -import { bindCallbackInternals } from './bindCallbackInternals'; - -export function bindCallback( - callbackFunc: (...args: any[]) => void, - resultSelector: (...args: any[]) => any, - scheduler?: SchedulerLike -): (...args: any[]) => Observable; - -// args is the arguments array and we push the callback on the rest tuple since the rest parameter must be last (only item) in a parameter list -export function bindCallback( - callbackFunc: (...args: [...A, (...res: R) => void]) => void, - schedulerLike?: SchedulerLike -): (...arg: A) => Observable; - -/** - * Converts a callback API to a function that returns an Observable. - * - * Give it a function `f` of type `f(x, callback)` and - * it will return a function `g` that when called as `g(x)` will output an - * Observable. - * - * `bindCallback` is not an operator because its input and output are not - * Observables. The input is a function `func` with some parameters. The - * last parameter must be a callback function that `func` calls when it is - * done. - * - * The output of `bindCallback` is a function that takes the same parameters - * as `func`, except the last one (the callback). When the output function - * is called with arguments it will return an Observable. If function `func` - * calls its callback with one argument, the Observable will emit that value. - * If on the other hand the callback is called with multiple values the resulting - * Observable will emit an array with said values as arguments. - * - * It is **very important** to remember that input function `func` is not called - * when the output function is, but rather when the Observable returned by the output - * function is subscribed. This means if `func` makes an AJAX request, that request - * will be made every time someone subscribes to the resulting Observable, but not before. - * - * The last optional parameter - `scheduler` - can be used to control when the call - * to `func` happens after someone subscribes to Observable, as well as when results - * passed to callback will be emitted. By default, the subscription to an Observable calls `func` - * synchronously, but using {@link asyncScheduler} as the last parameter will defer the call to `func`, - * just like wrapping the call in `setTimeout` with a timeout of `0` would. If you were to use the async Scheduler - * and call `subscribe` on the output Observable, all function calls that are currently executing - * will end before `func` is invoked. - * - * By default, results passed to the callback are emitted immediately after `func` invokes the callback. - * In particular, if the callback is called synchronously, then the subscription of the resulting Observable - * will call the `next` function synchronously as well. If you want to defer that call, - * you may use {@link asyncScheduler} just as before. This means that by using `Scheduler.async` you can - * ensure that `func` always calls its callback asynchronously, thus avoiding terrifying Zalgo. - * - * Note that the Observable created by the output function will always emit a single value - * and then complete immediately. If `func` calls the callback multiple times, values from subsequent - * calls will not appear in the stream. If you need to listen for multiple calls, - * you probably want to use {@link fromEvent} or {@link fromEventPattern} instead. - * - * If `func` depends on some context (`this` property) and is not already bound, the context of `func` - * will be the context that the output function has at call time. In particular, if `func` - * is called as a method of some object and if `func` is not already bound, in order to preserve the context - * it is recommended that the context of the output function is set to that object as well. - * - * If the input function calls its callback in the "node style" (i.e. first argument to callback is - * optional error parameter signaling whether the call failed or not), {@link bindNodeCallback} - * provides convenient error handling and probably is a better choice. - * `bindCallback` will treat such functions the same as any other and error parameters - * (whether passed or not) will always be interpreted as regular callback argument. - * - * ## Examples - * - * Convert jQuery's getJSON to an Observable API - * - * ```ts - * import { bindCallback } from 'rxjs'; - * import * as jQuery from 'jquery'; - * - * // Suppose we have jQuery.getJSON('/my/url', callback) - * const getJSONAsObservable = bindCallback(jQuery.getJSON); - * const result = getJSONAsObservable('/my/url'); - * result.subscribe(x => console.log(x), e => console.error(e)); - * ``` - * - * Receive an array of arguments passed to a callback - * - * ```ts - * import { bindCallback } from 'rxjs'; - * - * const someFunction = (n, s, cb) => { - * cb(n, s, { someProperty: 'someValue' }); - * }; - * - * const boundSomeFunction = bindCallback(someFunction); - * boundSomeFunction(5, 'some string').subscribe((values) => { - * console.log(values); // [5, 'some string', {someProperty: 'someValue'}] - * }); - * ``` - * - * Compare behaviour with and without `asyncScheduler` - * - * ```ts - * import { bindCallback, asyncScheduler } from 'rxjs'; - * - * function iCallMyCallbackSynchronously(cb) { - * cb(); - * } - * - * const boundSyncFn = bindCallback(iCallMyCallbackSynchronously); - * const boundAsyncFn = bindCallback(iCallMyCallbackSynchronously, null, asyncScheduler); - * - * boundSyncFn().subscribe(() => console.log('I was sync!')); - * boundAsyncFn().subscribe(() => console.log('I was async!')); - * console.log('This happened...'); - * - * // Logs: - * // I was sync! - * // This happened... - * // I was async! - * ``` - * - * Use `bindCallback` on an object method - * - * ```ts - * import { bindCallback } from 'rxjs'; - * - * const boundMethod = bindCallback(someObject.methodWithCallback); - * boundMethod - * .call(someObject) // make sure methodWithCallback has access to someObject - * .subscribe(subscriber); - * ``` - * - * @see {@link bindNodeCallback} - * @see {@link from} - * - * @param callbackFunc A function with a callback as the last parameter. - * @param resultSelector A mapping function used to transform callback events. - * @param scheduler The scheduler on which to schedule the callbacks. - * @return A function which returns the Observable that delivers the same - * values the callback would deliver. - */ -export function bindCallback( - callbackFunc: (...args: [...any[], (...res: any) => void]) => void, - resultSelector?: ((...args: any[]) => any) | SchedulerLike, - scheduler?: SchedulerLike -): (...args: any[]) => Observable { - return bindCallbackInternals(false, callbackFunc, resultSelector, scheduler); -} diff --git a/node_modules/rxjs/src/internal/observable/bindCallbackInternals.ts b/node_modules/rxjs/src/internal/observable/bindCallbackInternals.ts deleted file mode 100644 index e614044..0000000 --- a/node_modules/rxjs/src/internal/observable/bindCallbackInternals.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { SchedulerLike } from '../types'; -import { isScheduler } from '../util/isScheduler'; -import { Observable } from '../Observable'; -import { subscribeOn } from '../operators/subscribeOn'; -import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; -import { observeOn } from '../operators/observeOn'; -import { AsyncSubject } from '../AsyncSubject'; - -export function bindCallbackInternals( - isNodeStyle: boolean, - callbackFunc: any, - resultSelector?: any, - scheduler?: SchedulerLike -): (...args: any[]) => Observable { - if (resultSelector) { - if (isScheduler(resultSelector)) { - scheduler = resultSelector; - } else { - // The user provided a result selector. - return function (this: any, ...args: any[]) { - return (bindCallbackInternals(isNodeStyle, callbackFunc, scheduler) as any) - .apply(this, args) - .pipe(mapOneOrManyArgs(resultSelector as any)); - }; - } - } - - // If a scheduler was passed, use our `subscribeOn` and `observeOn` operators - // to compose that behavior for the user. - if (scheduler) { - return function (this: any, ...args: any[]) { - return (bindCallbackInternals(isNodeStyle, callbackFunc) as any) - .apply(this, args) - .pipe(subscribeOn(scheduler!), observeOn(scheduler!)); - }; - } - - return function (this: any, ...args: any[]): Observable { - // We're using AsyncSubject, because it emits when it completes, - // and it will play the value to all late-arriving subscribers. - const subject = new AsyncSubject(); - - // If this is true, then we haven't called our function yet. - let uninitialized = true; - return new Observable((subscriber) => { - // Add our subscriber to the subject. - const subs = subject.subscribe(subscriber); - - if (uninitialized) { - uninitialized = false; - // We're going to execute the bound function - // This bit is to signal that we are hitting the callback asynchronously. - // Because we don't have any anti-"Zalgo" guarantees with whatever - // function we are handed, we use this bit to figure out whether or not - // we are getting hit in a callback synchronously during our call. - let isAsync = false; - - // This is used to signal that the callback completed synchronously. - let isComplete = false; - - // Call our function that has a callback. If at any time during this - // call, an error is thrown, it will be caught by the Observable - // subscription process and sent to the consumer. - callbackFunc.apply( - // Pass the appropriate `this` context. - this, - [ - // Pass the arguments. - ...args, - // And our callback handler. - (...results: any[]) => { - if (isNodeStyle) { - // If this is a node callback, shift the first value off of the - // results and check it, as it is the error argument. By shifting, - // we leave only the argument(s) we want to pass to the consumer. - const err = results.shift(); - if (err != null) { - subject.error(err); - // If we've errored, we can stop processing this function - // as there's nothing else to do. Just return to escape. - return; - } - } - // If we have one argument, notify the consumer - // of it as a single value, otherwise, if there's more than one, pass - // them as an array. Note that if there are no arguments, `undefined` - // will be emitted. - subject.next(1 < results.length ? results : results[0]); - // Flip this flag, so we know we can complete it in the synchronous - // case below. - isComplete = true; - // If we're not asynchronous, we need to defer the `complete` call - // until after the call to the function is over. This is because an - // error could be thrown in the function after it calls our callback, - // and if that is the case, if we complete here, we are unable to notify - // the consumer than an error occurred. - if (isAsync) { - subject.complete(); - } - }, - ] - ); - // If we flipped `isComplete` during the call, we resolved synchronously, - // notify complete, because we skipped it in the callback to wait - // to make sure there were no errors during the call. - if (isComplete) { - subject.complete(); - } - - // We're no longer synchronous. If the callback is called at this point - // we can notify complete on the spot. - isAsync = true; - } - - // Return the subscription from adding our subscriber to the subject. - return subs; - }); - }; -} diff --git a/node_modules/rxjs/src/internal/observable/bindNodeCallback.ts b/node_modules/rxjs/src/internal/observable/bindNodeCallback.ts deleted file mode 100644 index 8d83722..0000000 --- a/node_modules/rxjs/src/internal/observable/bindNodeCallback.ts +++ /dev/null @@ -1,131 +0,0 @@ -/* @prettier */ -import { Observable } from '../Observable'; -import { SchedulerLike } from '../types'; -import { bindCallbackInternals } from './bindCallbackInternals'; - -export function bindNodeCallback( - callbackFunc: (...args: any[]) => void, - resultSelector: (...args: any[]) => any, - scheduler?: SchedulerLike -): (...args: any[]) => Observable; - -// args is the arguments array and we push the callback on the rest tuple since the rest parameter must be last (only item) in a parameter list -export function bindNodeCallback( - callbackFunc: (...args: [...A, (err: any, ...res: R) => void]) => void, - schedulerLike?: SchedulerLike -): (...arg: A) => Observable; - -/** - * Converts a Node.js-style callback API to a function that returns an - * Observable. - * - * It's just like {@link bindCallback}, but the - * callback is expected to be of type `callback(error, result)`. - * - * `bindNodeCallback` is not an operator because its input and output are not - * Observables. The input is a function `func` with some parameters, but the - * last parameter must be a callback function that `func` calls when it is - * done. The callback function is expected to follow Node.js conventions, - * where the first argument to the callback is an error object, signaling - * whether call was successful. If that object is passed to callback, it means - * something went wrong. - * - * The output of `bindNodeCallback` is a function that takes the same - * parameters as `func`, except the last one (the callback). When the output - * function is called with arguments, it will return an Observable. - * If `func` calls its callback with error parameter present, Observable will - * error with that value as well. If error parameter is not passed, Observable will emit - * second parameter. If there are more parameters (third and so on), - * Observable will emit an array with all arguments, except first error argument. - * - * Note that `func` will not be called at the same time output function is, - * but rather whenever resulting Observable is subscribed. By default call to - * `func` will happen synchronously after subscription, but that can be changed - * with proper `scheduler` provided as optional third parameter. {@link SchedulerLike} - * can also control when values from callback will be emitted by Observable. - * To find out more, check out documentation for {@link bindCallback}, where - * {@link SchedulerLike} works exactly the same. - * - * As in {@link bindCallback}, context (`this` property) of input function will be set to context - * of returned function, when it is called. - * - * After Observable emits value, it will complete immediately. This means - * even if `func` calls callback again, values from second and consecutive - * calls will never appear on the stream. If you need to handle functions - * that call callbacks multiple times, check out {@link fromEvent} or - * {@link fromEventPattern} instead. - * - * Note that `bindNodeCallback` can be used in non-Node.js environments as well. - * "Node.js-style" callbacks are just a convention, so if you write for - * browsers or any other environment and API you use implements that callback style, - * `bindNodeCallback` can be safely used on that API functions as well. - * - * Remember that Error object passed to callback does not have to be an instance - * of JavaScript built-in `Error` object. In fact, it does not even have to an object. - * Error parameter of callback function is interpreted as "present", when value - * of that parameter is truthy. It could be, for example, non-zero number, non-empty - * string or boolean `true`. In all of these cases resulting Observable would error - * with that value. This means usually regular style callbacks will fail very often when - * `bindNodeCallback` is used. If your Observable errors much more often then you - * would expect, check if callback really is called in Node.js-style and, if not, - * switch to {@link bindCallback} instead. - * - * Note that even if error parameter is technically present in callback, but its value - * is falsy, it still won't appear in array emitted by Observable. - * - * ## Examples - * - * Read a file from the filesystem and get the data as an Observable - * - * ```ts - * import * as fs from 'fs'; - * const readFileAsObservable = bindNodeCallback(fs.readFile); - * const result = readFileAsObservable('./roadNames.txt', 'utf8'); - * result.subscribe(x => console.log(x), e => console.error(e)); - * ``` - * - * Use on function calling callback with multiple arguments - * - * ```ts - * someFunction((err, a, b) => { - * console.log(err); // null - * console.log(a); // 5 - * console.log(b); // "some string" - * }); - * const boundSomeFunction = bindNodeCallback(someFunction); - * boundSomeFunction() - * .subscribe(value => { - * console.log(value); // [5, "some string"] - * }); - * ``` - * - * Use on function calling callback in regular style - * - * ```ts - * someFunction(a => { - * console.log(a); // 5 - * }); - * const boundSomeFunction = bindNodeCallback(someFunction); - * boundSomeFunction() - * .subscribe( - * value => {} // never gets called - * err => console.log(err) // 5 - * ); - * ``` - * - * @see {@link bindCallback} - * @see {@link from} - * - * @param callbackFunc Function with a Node.js-style callback as the last parameter. - * @param resultSelector A mapping function used to transform callback events. - * @param scheduler The scheduler on which to schedule the callbacks. - * @return A function which returns the Observable that delivers the same values the - * Node.js callback would deliver. - */ -export function bindNodeCallback( - callbackFunc: (...args: [...any[], (err: any, ...res: any) => void]) => void, - resultSelector?: ((...args: any[]) => any) | SchedulerLike, - scheduler?: SchedulerLike -): (...args: any[]) => Observable { - return bindCallbackInternals(true, callbackFunc, resultSelector, scheduler); -} diff --git a/node_modules/rxjs/src/internal/observable/combineLatest.ts b/node_modules/rxjs/src/internal/observable/combineLatest.ts deleted file mode 100644 index 9044060..0000000 --- a/node_modules/rxjs/src/internal/observable/combineLatest.ts +++ /dev/null @@ -1,300 +0,0 @@ -import { Observable } from '../Observable'; -import { ObservableInput, SchedulerLike, ObservedValueOf, ObservableInputTuple } from '../types'; -import { argsArgArrayOrObject } from '../util/argsArgArrayOrObject'; -import { Subscriber } from '../Subscriber'; -import { from } from './from'; -import { identity } from '../util/identity'; -import { Subscription } from '../Subscription'; -import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; -import { popResultSelector, popScheduler } from '../util/args'; -import { createObject } from '../util/createObject'; -import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; -import { AnyCatcher } from '../AnyCatcher'; -import { executeSchedule } from '../util/executeSchedule'; - -// combineLatest(any) -// We put this first because we need to catch cases where the user has supplied -// _exactly `any`_ as the argument. Since `any` literally matches _anything_, -// we don't want it to randomly hit one of the other type signatures below, -// as we have no idea at build-time what type we should be returning when given an any. - -/** - * You have passed `any` here, we can't figure out if it is - * an array or an object, so you're getting `unknown`. Use better types. - * @param arg Something typed as `any` - */ -export function combineLatest(arg: T): Observable; - -// combineLatest([a, b, c]) -export function combineLatest(sources: []): Observable; -export function combineLatest(sources: readonly [...ObservableInputTuple]): Observable; -/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ -export function combineLatest( - sources: readonly [...ObservableInputTuple], - resultSelector: (...values: A) => R, - scheduler: SchedulerLike -): Observable; -export function combineLatest( - sources: readonly [...ObservableInputTuple], - resultSelector: (...values: A) => R -): Observable; -/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ -export function combineLatest( - sources: readonly [...ObservableInputTuple], - scheduler: SchedulerLike -): Observable; - -// combineLatest(a, b, c) -/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */ -export function combineLatest(...sources: [...ObservableInputTuple]): Observable; -/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ -export function combineLatest( - ...sourcesAndResultSelectorAndScheduler: [...ObservableInputTuple, (...values: A) => R, SchedulerLike] -): Observable; -/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */ -export function combineLatest( - ...sourcesAndResultSelector: [...ObservableInputTuple, (...values: A) => R] -): Observable; -/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `combineLatestAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ -export function combineLatest( - ...sourcesAndScheduler: [...ObservableInputTuple, SchedulerLike] -): Observable; - -// combineLatest({a, b, c}) -export function combineLatest(sourcesObject: { [K in any]: never }): Observable; -export function combineLatest>>( - sourcesObject: T -): Observable<{ [K in keyof T]: ObservedValueOf }>; - -/** - * Combines multiple Observables to create an Observable whose values are - * calculated from the latest values of each of its input Observables. - * - * Whenever any input Observable emits a value, it - * computes a formula using the latest values from all the inputs, then emits - * the output of that formula. - * - * ![](combineLatest.png) - * - * `combineLatest` combines the values from all the Observables passed in the - * observables array. This is done by subscribing to each Observable in order and, - * whenever any Observable emits, collecting an array of the most recent - * values from each Observable. So if you pass `n` Observables to this operator, - * the returned Observable will always emit an array of `n` values, in an order - * corresponding to the order of the passed Observables (the value from the first Observable - * will be at index 0 of the array and so on). - * - * Static version of `combineLatest` accepts an array of Observables. Note that an array of - * Observables is a good choice, if you don't know beforehand how many Observables - * you will combine. Passing an empty array will result in an Observable that - * completes immediately. - * - * To ensure the output array always has the same length, `combineLatest` will - * actually wait for all input Observables to emit at least once, - * before it starts emitting results. This means if some Observable emits - * values before other Observables started emitting, all these values but the last - * will be lost. On the other hand, if some Observable does not emit a value but - * completes, resulting Observable will complete at the same moment without - * emitting anything, since it will now be impossible to include a value from the - * completed Observable in the resulting array. Also, if some input Observable does - * not emit any value and never completes, `combineLatest` will also never emit - * and never complete, since, again, it will wait for all streams to emit some - * value. - * - * If at least one Observable was passed to `combineLatest` and all passed Observables - * emitted something, the resulting Observable will complete when all combined - * streams complete. So even if some Observable completes, the result of - * `combineLatest` will still emit values when other Observables do. In case - * of a completed Observable, its value from now on will always be the last - * emitted value. On the other hand, if any Observable errors, `combineLatest` - * will error immediately as well, and all other Observables will be unsubscribed. - * - * ## Examples - * - * Combine two timer Observables - * - * ```ts - * import { timer, combineLatest } from 'rxjs'; - * - * const firstTimer = timer(0, 1000); // emit 0, 1, 2... after every second, starting from now - * const secondTimer = timer(500, 1000); // emit 0, 1, 2... after every second, starting 0,5s from now - * const combinedTimers = combineLatest([firstTimer, secondTimer]); - * combinedTimers.subscribe(value => console.log(value)); - * // Logs - * // [0, 0] after 0.5s - * // [1, 0] after 1s - * // [1, 1] after 1.5s - * // [2, 1] after 2s - * ``` - * - * Combine a dictionary of Observables - * - * ```ts - * import { of, delay, startWith, combineLatest } from 'rxjs'; - * - * const observables = { - * a: of(1).pipe(delay(1000), startWith(0)), - * b: of(5).pipe(delay(5000), startWith(0)), - * c: of(10).pipe(delay(10000), startWith(0)) - * }; - * const combined = combineLatest(observables); - * combined.subscribe(value => console.log(value)); - * // Logs - * // { a: 0, b: 0, c: 0 } immediately - * // { a: 1, b: 0, c: 0 } after 1s - * // { a: 1, b: 5, c: 0 } after 5s - * // { a: 1, b: 5, c: 10 } after 10s - * ``` - * - * Combine an array of Observables - * - * ```ts - * import { of, delay, startWith, combineLatest } from 'rxjs'; - * - * const observables = [1, 5, 10].map( - * n => of(n).pipe( - * delay(n * 1000), // emit 0 and then emit n after n seconds - * startWith(0) - * ) - * ); - * const combined = combineLatest(observables); - * combined.subscribe(value => console.log(value)); - * // Logs - * // [0, 0, 0] immediately - * // [1, 0, 0] after 1s - * // [1, 5, 0] after 5s - * // [1, 5, 10] after 10s - * ``` - * - * Use map operator to dynamically calculate the Body-Mass Index - * - * ```ts - * import { of, combineLatest, map } from 'rxjs'; - * - * const weight = of(70, 72, 76, 79, 75); - * const height = of(1.76, 1.77, 1.78); - * const bmi = combineLatest([weight, height]).pipe( - * map(([w, h]) => w / (h * h)), - * ); - * bmi.subscribe(x => console.log('BMI is ' + x)); - * - * // With output to console: - * // BMI is 24.212293388429753 - * // BMI is 23.93948099205209 - * // BMI is 23.671253629592222 - * ``` - * - * @see {@link combineLatestAll} - * @see {@link merge} - * @see {@link withLatestFrom} - * - * @param args Any number of `ObservableInput`s provided either as an array or as an object - * to combine with each other. If the last parameter is the function, it will be used to project the - * values from the combined latest values into a new value on the output Observable. - * @return An Observable of projected values from the most recent values from each `ObservableInput`, - * or an array of the most recent values from each `ObservableInput`. - */ -export function combineLatest, R>(...args: any[]): Observable | Observable[]> { - const scheduler = popScheduler(args); - const resultSelector = popResultSelector(args); - - const { args: observables, keys } = argsArgArrayOrObject(args); - - if (observables.length === 0) { - // If no observables are passed, or someone has passed an empty array - // of observables, or even an empty object POJO, we need to just - // complete (EMPTY), but we have to honor the scheduler provided if any. - return from([], scheduler as any); - } - - const result = new Observable[]>( - combineLatestInit( - observables as ObservableInput>[], - scheduler, - keys - ? // A handler for scrubbing the array of args into a dictionary. - (values) => createObject(keys, values) - : // A passthrough to just return the array - identity - ) - ); - - return resultSelector ? (result.pipe(mapOneOrManyArgs(resultSelector)) as Observable) : result; -} - -export function combineLatestInit( - observables: ObservableInput[], - scheduler?: SchedulerLike, - valueTransform: (values: any[]) => any = identity -) { - return (subscriber: Subscriber) => { - // The outer subscription. We're capturing this in a function - // because we may have to schedule it. - maybeSchedule( - scheduler, - () => { - const { length } = observables; - // A store for the values each observable has emitted so far. We match observable to value on index. - const values = new Array(length); - // The number of currently active subscriptions, as they complete, we decrement this number to see if - // we are all done combining values, so we can complete the result. - let active = length; - // The number of inner sources that still haven't emitted the first value - // We need to track this because all sources need to emit one value in order - // to start emitting values. - let remainingFirstValues = length; - // The loop to kick off subscription. We're keying everything on index `i` to relate the observables passed - // in to the slot in the output array or the key in the array of keys in the output dictionary. - for (let i = 0; i < length; i++) { - maybeSchedule( - scheduler, - () => { - const source = from(observables[i], scheduler as any); - let hasFirstValue = false; - source.subscribe( - createOperatorSubscriber( - subscriber, - (value) => { - // When we get a value, record it in our set of values. - values[i] = value; - if (!hasFirstValue) { - // If this is our first value, record that. - hasFirstValue = true; - remainingFirstValues--; - } - if (!remainingFirstValues) { - // We're not waiting for any more - // first values, so we can emit! - subscriber.next(valueTransform(values.slice())); - } - }, - () => { - if (!--active) { - // We only complete the result if we have no more active - // inner observables. - subscriber.complete(); - } - } - ) - ); - }, - subscriber - ); - } - }, - subscriber - ); - }; -} - -/** - * A small utility to handle the couple of locations where we want to schedule if a scheduler was provided, - * but we don't if there was no scheduler. - */ -function maybeSchedule(scheduler: SchedulerLike | undefined, execute: () => void, subscription: Subscription) { - if (scheduler) { - executeSchedule(subscription, scheduler, execute); - } else { - execute(); - } -} diff --git a/node_modules/rxjs/src/internal/observable/concat.ts b/node_modules/rxjs/src/internal/observable/concat.ts deleted file mode 100644 index edbaa31..0000000 --- a/node_modules/rxjs/src/internal/observable/concat.ts +++ /dev/null @@ -1,115 +0,0 @@ -import { Observable } from '../Observable'; -import { ObservableInputTuple, SchedulerLike } from '../types'; -import { concatAll } from '../operators/concatAll'; -import { popScheduler } from '../util/args'; -import { from } from './from'; - -export function concat(...inputs: [...ObservableInputTuple]): Observable; -export function concat( - ...inputsAndScheduler: [...ObservableInputTuple, SchedulerLike] -): Observable; - -/** - * Creates an output Observable which sequentially emits all values from the first given - * Observable and then moves on to the next. - * - * Concatenates multiple Observables together by - * sequentially emitting their values, one Observable after the other. - * - * ![](concat.png) - * - * `concat` joins multiple Observables together, by subscribing to them one at a time and - * merging their results into the output Observable. You can pass either an array of - * Observables, or put them directly as arguments. Passing an empty array will result - * in Observable that completes immediately. - * - * `concat` will subscribe to first input Observable and emit all its values, without - * changing or affecting them in any way. When that Observable completes, it will - * subscribe to then next Observable passed and, again, emit its values. This will be - * repeated, until the operator runs out of Observables. When last input Observable completes, - * `concat` will complete as well. At any given moment only one Observable passed to operator - * emits values. If you would like to emit values from passed Observables concurrently, check out - * {@link merge} instead, especially with optional `concurrent` parameter. As a matter of fact, - * `concat` is an equivalent of `merge` operator with `concurrent` parameter set to `1`. - * - * Note that if some input Observable never completes, `concat` will also never complete - * and Observables following the one that did not complete will never be subscribed. On the other - * hand, if some Observable simply completes immediately after it is subscribed, it will be - * invisible for `concat`, which will just move on to the next Observable. - * - * If any Observable in chain errors, instead of passing control to the next Observable, - * `concat` will error immediately as well. Observables that would be subscribed after - * the one that emitted error, never will. - * - * If you pass to `concat` the same Observable many times, its stream of values - * will be "replayed" on every subscription, which means you can repeat given Observable - * as many times as you like. If passing the same Observable to `concat` 1000 times becomes tedious, - * you can always use {@link repeat}. - * - * ## Examples - * - * Concatenate a timer counting from 0 to 3 with a synchronous sequence from 1 to 10 - * - * ```ts - * import { interval, take, range, concat } from 'rxjs'; - * - * const timer = interval(1000).pipe(take(4)); - * const sequence = range(1, 10); - * const result = concat(timer, sequence); - * result.subscribe(x => console.log(x)); - * - * // results in: - * // 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3 -immediate-> 1 ... 10 - * ``` - * - * Concatenate 3 Observables - * - * ```ts - * import { interval, take, concat } from 'rxjs'; - * - * const timer1 = interval(1000).pipe(take(10)); - * const timer2 = interval(2000).pipe(take(6)); - * const timer3 = interval(500).pipe(take(10)); - * - * const result = concat(timer1, timer2, timer3); - * result.subscribe(x => console.log(x)); - * - * // results in the following: - * // (Prints to console sequentially) - * // -1000ms-> 0 -1000ms-> 1 -1000ms-> ... 9 - * // -2000ms-> 0 -2000ms-> 1 -2000ms-> ... 5 - * // -500ms-> 0 -500ms-> 1 -500ms-> ... 9 - * ``` - * - * Concatenate the same Observable to repeat it - * - * ```ts - * import { interval, take, concat } from 'rxjs'; - * - * const timer = interval(1000).pipe(take(2)); - * - * concat(timer, timer) // concatenating the same Observable! - * .subscribe({ - * next: value => console.log(value), - * complete: () => console.log('...and it is done!') - * }); - * - * // Logs: - * // 0 after 1s - * // 1 after 2s - * // 0 after 3s - * // 1 after 4s - * // '...and it is done!' also after 4s - * ``` - * - * @see {@link concatAll} - * @see {@link concatMap} - * @see {@link concatMapTo} - * @see {@link startWith} - * @see {@link endWith} - * - * @param args `ObservableInput`s to concatenate. - */ -export function concat(...args: any[]): Observable { - return concatAll()(from(args, popScheduler(args))); -} diff --git a/node_modules/rxjs/src/internal/observable/connectable.ts b/node_modules/rxjs/src/internal/observable/connectable.ts deleted file mode 100644 index 4609118..0000000 --- a/node_modules/rxjs/src/internal/observable/connectable.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { Connectable, ObservableInput, SubjectLike } from '../types'; -import { Subject } from '../Subject'; -import { Subscription } from '../Subscription'; -import { Observable } from '../Observable'; -import { defer } from './defer'; - -export interface ConnectableConfig { - /** - * A factory function used to create the Subject through which the source - * is multicast. By default this creates a {@link Subject}. - */ - connector: () => SubjectLike; - /** - * If true, the resulting observable will reset internal state upon disconnection - * and return to a "cold" state. This allows the resulting observable to be - * reconnected. - * If false, upon disconnection, the connecting subject will remain the - * connecting subject, meaning the resulting observable will not go "cold" again, - * and subsequent repeats or resubscriptions will resubscribe to that same subject. - */ - resetOnDisconnect?: boolean; -} - -/** - * The default configuration for `connectable`. - */ -const DEFAULT_CONFIG: ConnectableConfig = { - connector: () => new Subject(), - resetOnDisconnect: true, -}; - -/** - * Creates an observable that multicasts once `connect()` is called on it. - * - * @param source The observable source to make connectable. - * @param config The configuration object for `connectable`. - * @returns A "connectable" observable, that has a `connect()` method, that you must call to - * connect the source to all consumers through the subject provided as the connector. - */ -export function connectable(source: ObservableInput, config: ConnectableConfig = DEFAULT_CONFIG): Connectable { - // The subscription representing the connection. - let connection: Subscription | null = null; - const { connector, resetOnDisconnect = true } = config; - let subject = connector(); - - const result: any = new Observable((subscriber) => { - return subject.subscribe(subscriber); - }); - - // Define the `connect` function. This is what users must call - // in order to "connect" the source to the subject that is - // multicasting it. - result.connect = () => { - if (!connection || connection.closed) { - connection = defer(() => source).subscribe(subject); - if (resetOnDisconnect) { - connection.add(() => (subject = connector())); - } - } - return connection; - }; - - return result; -} diff --git a/node_modules/rxjs/src/internal/observable/defer.ts b/node_modules/rxjs/src/internal/observable/defer.ts deleted file mode 100644 index 2bd3db9..0000000 --- a/node_modules/rxjs/src/internal/observable/defer.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { Observable } from '../Observable'; -import { ObservedValueOf, ObservableInput } from '../types'; -import { innerFrom } from './innerFrom'; - -/** - * Creates an Observable that, on subscribe, calls an Observable factory to - * make an Observable for each new Observer. - * - * Creates the Observable lazily, that is, only when it - * is subscribed. - * - * - * ![](defer.png) - * - * `defer` allows you to create an Observable only when the Observer - * subscribes. It waits until an Observer subscribes to it, calls the given - * factory function to get an Observable -- where a factory function typically - * generates a new Observable -- and subscribes the Observer to this Observable. - * In case the factory function returns a falsy value, then EMPTY is used as - * Observable instead. Last but not least, an exception during the factory - * function call is transferred to the Observer by calling `error`. - * - * ## Example - * - * Subscribe to either an Observable of clicks or an Observable of interval, at random - * - * ```ts - * import { defer, fromEvent, interval } from 'rxjs'; - * - * const clicksOrInterval = defer(() => { - * return Math.random() > 0.5 - * ? fromEvent(document, 'click') - * : interval(1000); - * }); - * clicksOrInterval.subscribe(x => console.log(x)); - * - * // Results in the following behavior: - * // If the result of Math.random() is greater than 0.5 it will listen - * // for clicks anywhere on the "document"; when document is clicked it - * // will log a MouseEvent object to the console. If the result is less - * // than 0.5 it will emit ascending numbers, one every second(1000ms). - * ``` - * - * @see {@link Observable} - * - * @param observableFactory The Observable factory function to invoke for each - * Observer that subscribes to the output Observable. May also return any - * `ObservableInput`, which will be converted on the fly to an Observable. - * @return An Observable whose Observers' subscriptions trigger an invocation of the - * given Observable factory function. - */ -export function defer>(observableFactory: () => R): Observable> { - return new Observable>((subscriber) => { - innerFrom(observableFactory()).subscribe(subscriber); - }); -} diff --git a/node_modules/rxjs/src/internal/observable/dom/WebSocketSubject.ts b/node_modules/rxjs/src/internal/observable/dom/WebSocketSubject.ts deleted file mode 100644 index 9eecbf5..0000000 --- a/node_modules/rxjs/src/internal/observable/dom/WebSocketSubject.ts +++ /dev/null @@ -1,397 +0,0 @@ -import { Subject, AnonymousSubject } from '../../Subject'; -import { Subscriber } from '../../Subscriber'; -import { Observable } from '../../Observable'; -import { Subscription } from '../../Subscription'; -import { Operator } from '../../Operator'; -import { ReplaySubject } from '../../ReplaySubject'; -import { Observer, NextObserver } from '../../types'; - -/** - * WebSocketSubjectConfig is a plain Object that allows us to make our - * webSocket configurable. - * - * Provides flexibility to {@link webSocket} - * - * It defines a set of properties to provide custom behavior in specific - * moments of the socket's lifecycle. When the connection opens we can - * use `openObserver`, when the connection is closed `closeObserver`, if we - * are interested in listening for data coming from server: `deserializer`, - * which allows us to customize the deserialization strategy of data before passing it - * to the socket client. By default, `deserializer` is going to apply `JSON.parse` to each message coming - * from the Server. - * - * ## Examples - * - * **deserializer**, the default for this property is `JSON.parse` but since there are just two options - * for incoming data, either be text or binary data. We can apply a custom deserialization strategy - * or just simply skip the default behaviour. - * - * ```ts - * import { webSocket } from 'rxjs/webSocket'; - * - * const wsSubject = webSocket({ - * url: 'ws://localhost:8081', - * //Apply any transformation of your choice. - * deserializer: ({ data }) => data - * }); - * - * wsSubject.subscribe(console.log); - * - * // Let's suppose we have this on the Server: ws.send('This is a msg from the server') - * //output - * // - * // This is a msg from the server - * ``` - * - * **serializer** allows us to apply custom serialization strategy but for the outgoing messages. - * - * ```ts - * import { webSocket } from 'rxjs/webSocket'; - * - * const wsSubject = webSocket({ - * url: 'ws://localhost:8081', - * // Apply any transformation of your choice. - * serializer: msg => JSON.stringify({ channel: 'webDevelopment', msg: msg }) - * }); - * - * wsSubject.subscribe(() => subject.next('msg to the server')); - * - * // Let's suppose we have this on the Server: - * // ws.on('message', msg => console.log); - * // ws.send('This is a msg from the server'); - * // output at server side: - * // - * // {"channel":"webDevelopment","msg":"msg to the server"} - * ``` - * - * **closeObserver** allows us to set a custom error when an error raises up. - * - * ```ts - * import { webSocket } from 'rxjs/webSocket'; - * - * const wsSubject = webSocket({ - * url: 'ws://localhost:8081', - * closeObserver: { - * next() { - * const customError = { code: 6666, reason: 'Custom evil reason' } - * console.log(`code: ${ customError.code }, reason: ${ customError.reason }`); - * } - * } - * }); - * - * // output - * // code: 6666, reason: Custom evil reason - * ``` - * - * **openObserver**, Let's say we need to make some kind of init task before sending/receiving msgs to the - * webSocket or sending notification that the connection was successful, this is when - * openObserver is useful for. - * - * ```ts - * import { webSocket } from 'rxjs/webSocket'; - * - * const wsSubject = webSocket({ - * url: 'ws://localhost:8081', - * openObserver: { - * next: () => { - * console.log('Connection ok'); - * } - * } - * }); - * - * // output - * // Connection ok - * ``` - */ -export interface WebSocketSubjectConfig { - /** The url of the socket server to connect to */ - url: string; - /** The protocol to use to connect */ - protocol?: string | Array; - /** @deprecated Will be removed in v8. Use {@link deserializer} instead. */ - resultSelector?: (e: MessageEvent) => T; - /** - * A serializer used to create messages from passed values before the - * messages are sent to the server. Defaults to JSON.stringify. - */ - serializer?: (value: T) => WebSocketMessage; - /** - * A deserializer used for messages arriving on the socket from the - * server. Defaults to JSON.parse. - */ - deserializer?: (e: MessageEvent) => T; - /** - * An Observer that watches when open events occur on the underlying web socket. - */ - openObserver?: NextObserver; - /** - * An Observer that watches when close events occur on the underlying web socket - */ - closeObserver?: NextObserver; - /** - * An Observer that watches when a close is about to occur due to - * unsubscription. - */ - closingObserver?: NextObserver; - /** - * A WebSocket constructor to use. This is useful for situations like using a - * WebSocket impl in Node (WebSocket is a DOM API), or for mocking a WebSocket - * for testing purposes - */ - WebSocketCtor?: { new (url: string, protocols?: string | string[]): WebSocket }; - /** Sets the `binaryType` property of the underlying WebSocket. */ - binaryType?: 'blob' | 'arraybuffer'; -} - -const DEFAULT_WEBSOCKET_CONFIG: WebSocketSubjectConfig = { - url: '', - deserializer: (e: MessageEvent) => JSON.parse(e.data), - serializer: (value: any) => JSON.stringify(value), -}; - -const WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = - 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }'; - -export type WebSocketMessage = string | ArrayBuffer | Blob | ArrayBufferView; - -export class WebSocketSubject extends AnonymousSubject { - // @ts-ignore: Property has no initializer and is not definitely assigned - private _config: WebSocketSubjectConfig; - - /** @internal */ - // @ts-ignore: Property has no initializer and is not definitely assigned - _output: Subject; - - private _socket: WebSocket | null = null; - - constructor(urlConfigOrSource: string | WebSocketSubjectConfig | Observable, destination?: Observer) { - super(); - if (urlConfigOrSource instanceof Observable) { - this.destination = destination; - this.source = urlConfigOrSource as Observable; - } else { - const config = (this._config = { ...DEFAULT_WEBSOCKET_CONFIG }); - this._output = new Subject(); - if (typeof urlConfigOrSource === 'string') { - config.url = urlConfigOrSource; - } else { - for (const key in urlConfigOrSource) { - if (urlConfigOrSource.hasOwnProperty(key)) { - (config as any)[key] = (urlConfigOrSource as any)[key]; - } - } - } - - if (!config.WebSocketCtor && WebSocket) { - config.WebSocketCtor = WebSocket; - } else if (!config.WebSocketCtor) { - throw new Error('no WebSocket constructor can be found'); - } - this.destination = new ReplaySubject(); - } - } - - /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */ - lift(operator: Operator): WebSocketSubject { - const sock = new WebSocketSubject(this._config as WebSocketSubjectConfig, this.destination as any); - sock.operator = operator; - sock.source = this; - return sock; - } - - private _resetState() { - this._socket = null; - if (!this.source) { - this.destination = new ReplaySubject(); - } - this._output = new Subject(); - } - - /** - * Creates an {@link Observable}, that when subscribed to, sends a message, - * defined by the `subMsg` function, to the server over the socket to begin a - * subscription to data over that socket. Once data arrives, the - * `messageFilter` argument will be used to select the appropriate data for - * the resulting Observable. When finalization occurs, either due to - * unsubscription, completion, or error, a message defined by the `unsubMsg` - * argument will be sent to the server over the WebSocketSubject. - * - * @param subMsg A function to generate the subscription message to be sent to - * the server. This will still be processed by the serializer in the - * WebSocketSubject's config. (Which defaults to JSON serialization) - * @param unsubMsg A function to generate the unsubscription message to be - * sent to the server at finalization. This will still be processed by the - * serializer in the WebSocketSubject's config. - * @param messageFilter A predicate for selecting the appropriate messages - * from the server for the output stream. - */ - multiplex(subMsg: () => any, unsubMsg: () => any, messageFilter: (value: T) => boolean) { - const self = this; - return new Observable((observer: Observer) => { - try { - self.next(subMsg()); - } catch (err) { - observer.error(err); - } - - const subscription = self.subscribe({ - next: (x) => { - try { - if (messageFilter(x)) { - observer.next(x); - } - } catch (err) { - observer.error(err); - } - }, - error: (err) => observer.error(err), - complete: () => observer.complete(), - }); - - return () => { - try { - self.next(unsubMsg()); - } catch (err) { - observer.error(err); - } - subscription.unsubscribe(); - }; - }); - } - - private _connectSocket() { - const { WebSocketCtor, protocol, url, binaryType } = this._config; - const observer = this._output; - - let socket: WebSocket | null = null; - try { - socket = protocol ? new WebSocketCtor!(url, protocol) : new WebSocketCtor!(url); - this._socket = socket; - if (binaryType) { - this._socket.binaryType = binaryType; - } - } catch (e) { - observer.error(e); - return; - } - - const subscription = new Subscription(() => { - this._socket = null; - if (socket && socket.readyState === 1) { - socket.close(); - } - }); - - socket.onopen = (evt: Event) => { - const { _socket } = this; - if (!_socket) { - socket!.close(); - this._resetState(); - return; - } - const { openObserver } = this._config; - if (openObserver) { - openObserver.next(evt); - } - - const queue = this.destination; - - this.destination = Subscriber.create( - (x) => { - if (socket!.readyState === 1) { - try { - const { serializer } = this._config; - socket!.send(serializer!(x!)); - } catch (e) { - this.destination!.error(e); - } - } - }, - (err) => { - const { closingObserver } = this._config; - if (closingObserver) { - closingObserver.next(undefined); - } - if (err && err.code) { - socket!.close(err.code, err.reason); - } else { - observer.error(new TypeError(WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT)); - } - this._resetState(); - }, - () => { - const { closingObserver } = this._config; - if (closingObserver) { - closingObserver.next(undefined); - } - socket!.close(); - this._resetState(); - } - ) as Subscriber; - - if (queue && queue instanceof ReplaySubject) { - subscription.add((queue as ReplaySubject).subscribe(this.destination)); - } - }; - - socket.onerror = (e: Event) => { - this._resetState(); - observer.error(e); - }; - - socket.onclose = (e: CloseEvent) => { - if (socket === this._socket) { - this._resetState(); - } - const { closeObserver } = this._config; - if (closeObserver) { - closeObserver.next(e); - } - if (e.wasClean) { - observer.complete(); - } else { - observer.error(e); - } - }; - - socket.onmessage = (e: MessageEvent) => { - try { - const { deserializer } = this._config; - observer.next(deserializer!(e)); - } catch (err) { - observer.error(err); - } - }; - } - - /** @internal */ - protected _subscribe(subscriber: Subscriber): Subscription { - const { source } = this; - if (source) { - return source.subscribe(subscriber); - } - if (!this._socket) { - this._connectSocket(); - } - this._output.subscribe(subscriber); - subscriber.add(() => { - const { _socket } = this; - if (this._output.observers.length === 0) { - if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) { - _socket.close(); - } - this._resetState(); - } - }); - return subscriber; - } - - unsubscribe() { - const { _socket } = this; - if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) { - _socket.close(); - } - this._resetState(); - super.unsubscribe(); - } -} diff --git a/node_modules/rxjs/src/internal/observable/dom/animationFrames.ts b/node_modules/rxjs/src/internal/observable/dom/animationFrames.ts deleted file mode 100644 index 38b338b..0000000 --- a/node_modules/rxjs/src/internal/observable/dom/animationFrames.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { Observable } from '../../Observable'; -import { TimestampProvider } from '../../types'; -import { performanceTimestampProvider } from '../../scheduler/performanceTimestampProvider'; -import { animationFrameProvider } from '../../scheduler/animationFrameProvider'; - -/** - * An observable of animation frames - * - * Emits the amount of time elapsed since subscription and the timestamp on each animation frame. - * Defaults to milliseconds provided to the requestAnimationFrame's callback. Does not end on its own. - * - * Every subscription will start a separate animation loop. Since animation frames are always scheduled - * by the browser to occur directly before a repaint, scheduling more than one animation frame synchronously - * should not be much different or have more overhead than looping over an array of events during - * a single animation frame. However, if for some reason the developer would like to ensure the - * execution of animation-related handlers are all executed during the same task by the engine, - * the `share` operator can be used. - * - * This is useful for setting up animations with RxJS. - * - * ## Examples - * - * Tweening a div to move it on the screen - * - * ```ts - * import { animationFrames, map, takeWhile, endWith } from 'rxjs'; - * - * function tween(start: number, end: number, duration: number) { - * const diff = end - start; - * return animationFrames().pipe( - * // Figure out what percentage of time has passed - * map(({ elapsed }) => elapsed / duration), - * // Take the vector while less than 100% - * takeWhile(v => v < 1), - * // Finish with 100% - * endWith(1), - * // Calculate the distance traveled between start and end - * map(v => v * diff + start) - * ); - * } - * - * // Setup a div for us to move around - * const div = document.createElement('div'); - * document.body.appendChild(div); - * div.style.position = 'absolute'; - * div.style.width = '40px'; - * div.style.height = '40px'; - * div.style.backgroundColor = 'lime'; - * div.style.transform = 'translate3d(10px, 0, 0)'; - * - * tween(10, 200, 4000).subscribe(x => { - * div.style.transform = `translate3d(${ x }px, 0, 0)`; - * }); - * ``` - * - * Providing a custom timestamp provider - * - * ```ts - * import { animationFrames, TimestampProvider } from 'rxjs'; - * - * // A custom timestamp provider - * let now = 0; - * const customTSProvider: TimestampProvider = { - * now() { return now++; } - * }; - * - * const source$ = animationFrames(customTSProvider); - * - * // Log increasing numbers 0...1...2... on every animation frame. - * source$.subscribe(({ elapsed }) => console.log(elapsed)); - * ``` - * - * @param timestampProvider An object with a `now` method that provides a numeric timestamp - */ -export function animationFrames(timestampProvider?: TimestampProvider) { - return timestampProvider ? animationFramesFactory(timestampProvider) : DEFAULT_ANIMATION_FRAMES; -} - -/** - * Does the work of creating the observable for `animationFrames`. - * @param timestampProvider The timestamp provider to use to create the observable - */ -function animationFramesFactory(timestampProvider?: TimestampProvider) { - return new Observable<{ timestamp: number; elapsed: number }>((subscriber) => { - // If no timestamp provider is specified, use performance.now() - as it - // will return timestamps 'compatible' with those passed to the run - // callback and won't be affected by NTP adjustments, etc. - const provider = timestampProvider || performanceTimestampProvider; - - // Capture the start time upon subscription, as the run callback can remain - // queued for a considerable period of time and the elapsed time should - // represent the time elapsed since subscription - not the time since the - // first rendered animation frame. - const start = provider.now(); - - let id = 0; - const run = () => { - if (!subscriber.closed) { - id = animationFrameProvider.requestAnimationFrame((timestamp: DOMHighResTimeStamp | number) => { - id = 0; - // Use the provider's timestamp to calculate the elapsed time. Note that - // this means - if the caller hasn't passed a provider - that - // performance.now() will be used instead of the timestamp that was - // passed to the run callback. The reason for this is that the timestamp - // passed to the callback can be earlier than the start time, as it - // represents the time at which the browser decided it would render any - // queued frames - and that time can be earlier the captured start time. - const now = provider.now(); - subscriber.next({ - timestamp: timestampProvider ? now : timestamp, - elapsed: now - start, - }); - run(); - }); - } - }; - - run(); - - return () => { - if (id) { - animationFrameProvider.cancelAnimationFrame(id); - } - }; - }); -} - -/** - * In the common case, where the timestamp provided by the rAF API is used, - * we use this shared observable to reduce overhead. - */ -const DEFAULT_ANIMATION_FRAMES = animationFramesFactory(); diff --git a/node_modules/rxjs/src/internal/observable/dom/fetch.ts b/node_modules/rxjs/src/internal/observable/dom/fetch.ts deleted file mode 100644 index 1894d24..0000000 --- a/node_modules/rxjs/src/internal/observable/dom/fetch.ts +++ /dev/null @@ -1,180 +0,0 @@ -import { createOperatorSubscriber } from '../../operators/OperatorSubscriber'; -import { Observable } from '../../Observable'; -import { innerFrom } from '../../observable/innerFrom'; -import { ObservableInput } from '../../types'; - -export function fromFetch( - input: string | Request, - init: RequestInit & { - selector: (response: Response) => ObservableInput; - } -): Observable; - -export function fromFetch(input: string | Request, init?: RequestInit): Observable; - -/** - * Uses [the Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) to - * make an HTTP request. - * - * **WARNING** Parts of the fetch API are still experimental. `AbortController` is - * required for this implementation to work and use cancellation appropriately. - * - * Will automatically set up an internal [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) - * in order to finalize the internal `fetch` when the subscription tears down. - * - * If a `signal` is provided via the `init` argument, it will behave like it usually does with - * `fetch`. If the provided `signal` aborts, the error that `fetch` normally rejects with - * in that scenario will be emitted as an error from the observable. - * - * ## Examples - * - * Basic use - * - * ```ts - * import { fromFetch } from 'rxjs/fetch'; - * import { switchMap, of, catchError } from 'rxjs'; - * - * const data$ = fromFetch('https://api.github.com/users?per_page=5').pipe( - * switchMap(response => { - * if (response.ok) { - * // OK return data - * return response.json(); - * } else { - * // Server is returning a status requiring the client to try something else. - * return of({ error: true, message: `Error ${ response.status }` }); - * } - * }), - * catchError(err => { - * // Network or other error, handle appropriately - * console.error(err); - * return of({ error: true, message: err.message }) - * }) - * ); - * - * data$.subscribe({ - * next: result => console.log(result), - * complete: () => console.log('done') - * }); - * ``` - * - * ### Use with Chunked Transfer Encoding - * - * With HTTP responses that use [chunked transfer encoding](https://tools.ietf.org/html/rfc7230#section-3.3.1), - * the promise returned by `fetch` will resolve as soon as the response's headers are - * received. - * - * That means the `fromFetch` observable will emit a `Response` - and will - * then complete - before the body is received. When one of the methods on the - * `Response` - like `text()` or `json()` - is called, the returned promise will not - * resolve until the entire body has been received. Unsubscribing from any observable - * that uses the promise as an observable input will not abort the request. - * - * To facilitate aborting the retrieval of responses that use chunked transfer encoding, - * a `selector` can be specified via the `init` parameter: - * - * ```ts - * import { of } from 'rxjs'; - * import { fromFetch } from 'rxjs/fetch'; - * - * const data$ = fromFetch('https://api.github.com/users?per_page=5', { - * selector: response => response.json() - * }); - * - * data$.subscribe({ - * next: result => console.log(result), - * complete: () => console.log('done') - * }); - * ``` - * - * @param input The resource you would like to fetch. Can be a url or a request object. - * @param initWithSelector A configuration object for the fetch. - * [See MDN for more details](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters) - * @returns An Observable, that when subscribed to, performs an HTTP request using the native `fetch` - * function. The {@link Subscription} is tied to an `AbortController` for the fetch. - */ -export function fromFetch( - input: string | Request, - initWithSelector: RequestInit & { - selector?: (response: Response) => ObservableInput; - } = {} -): Observable { - const { selector, ...init } = initWithSelector; - return new Observable((subscriber) => { - // Our controller for aborting this fetch. - // Any externally provided AbortSignal will have to call - // abort on this controller when signaled, because the - // signal from this controller is what is being passed to `fetch`. - const controller = new AbortController(); - const { signal } = controller; - // This flag exists to make sure we don't `abort()` the fetch upon tearing down - // this observable after emitting a Response. Aborting in such circumstances - // would also abort subsequent methods - like `json()` - that could be called - // on the Response. Consider: `fromFetch().pipe(take(1), mergeMap(res => res.json()))` - let abortable = true; - - // If the user provided an init configuration object, - // let's process it and chain our abort signals, if necessary. - // If a signal is provided, just have it finalized. It's a cancellation token, basically. - const { signal: outerSignal } = init; - if (outerSignal) { - if (outerSignal.aborted) { - controller.abort(); - } else { - // We got an AbortSignal from the arguments passed into `fromFetch`. - // We need to wire up our AbortController to abort when this signal aborts. - const outerSignalHandler = () => { - if (!signal.aborted) { - controller.abort(); - } - }; - outerSignal.addEventListener('abort', outerSignalHandler); - subscriber.add(() => outerSignal.removeEventListener('abort', outerSignalHandler)); - } - } - - // The initialization object passed to `fetch` as the second - // argument. This ferries in important information, including our - // AbortSignal. Create a new init, so we don't accidentally mutate the - // passed init, or reassign it. This is because the init passed in - // is shared between each subscription to the result. - const perSubscriberInit: RequestInit = { ...init, signal }; - - const handleError = (err: any) => { - abortable = false; - subscriber.error(err); - }; - - fetch(input, perSubscriberInit) - .then((response) => { - if (selector) { - // If we have a selector function, use it to project our response. - // Note that any error that comes from our selector will be - // sent to the promise `catch` below and handled. - innerFrom(selector(response)).subscribe( - createOperatorSubscriber( - subscriber, - // Values are passed through to the subscriber - undefined, - // The projected response is complete. - () => { - abortable = false; - subscriber.complete(); - }, - handleError - ) - ); - } else { - abortable = false; - subscriber.next(response); - subscriber.complete(); - } - }) - .catch(handleError); - - return () => { - if (abortable) { - controller.abort(); - } - }; - }); -} diff --git a/node_modules/rxjs/src/internal/observable/dom/webSocket.ts b/node_modules/rxjs/src/internal/observable/dom/webSocket.ts deleted file mode 100644 index b10c5d8..0000000 --- a/node_modules/rxjs/src/internal/observable/dom/webSocket.ts +++ /dev/null @@ -1,161 +0,0 @@ -import { WebSocketSubject, WebSocketSubjectConfig } from './WebSocketSubject'; - -/** - * Wrapper around the w3c-compatible WebSocket object provided by the browser. - * - * {@link Subject} that communicates with a server via WebSocket - * - * `webSocket` is a factory function that produces a `WebSocketSubject`, - * which can be used to make WebSocket connection with an arbitrary endpoint. - * `webSocket` accepts as an argument either a string with url of WebSocket endpoint, or an - * {@link WebSocketSubjectConfig} object for providing additional configuration, as - * well as Observers for tracking lifecycle of WebSocket connection. - * - * When `WebSocketSubject` is subscribed, it attempts to make a socket connection, - * unless there is one made already. This means that many subscribers will always listen - * on the same socket, thus saving resources. If however, two instances are made of `WebSocketSubject`, - * even if these two were provided with the same url, they will attempt to make separate - * connections. When consumer of a `WebSocketSubject` unsubscribes, socket connection is closed, - * only if there are no more subscribers still listening. If after some time a consumer starts - * subscribing again, connection is reestablished. - * - * Once connection is made, whenever a new message comes from the server, `WebSocketSubject` will emit that - * message as a value in the stream. By default, a message from the socket is parsed via `JSON.parse`. If you - * want to customize how deserialization is handled (if at all), you can provide custom `resultSelector` - * function in {@link WebSocketSubject}. When connection closes, stream will complete, provided it happened without - * any errors. If at any point (starting, maintaining or closing a connection) there is an error, - * stream will also error with whatever WebSocket API has thrown. - * - * By virtue of being a {@link Subject}, `WebSocketSubject` allows for receiving and sending messages from the server. In order - * to communicate with a connected endpoint, use `next`, `error` and `complete` methods. `next` sends a value to the server, so bear in mind - * that this value will not be serialized beforehand. Because of This, `JSON.stringify` will have to be called on a value by hand, - * before calling `next` with a result. Note also that if at the moment of nexting value - * there is no socket connection (for example no one is subscribing), those values will be buffered, and sent when connection - * is finally established. `complete` method closes socket connection. `error` does the same, - * as well as notifying the server that something went wrong via status code and string with details of what happened. - * Since status code is required in WebSocket API, `WebSocketSubject` does not allow, like regular `Subject`, - * arbitrary values being passed to the `error` method. It needs to be called with an object that has `code` - * property with status code number and optional `reason` property with string describing details - * of an error. - * - * Calling `next` does not affect subscribers of `WebSocketSubject` - they have no - * information that something was sent to the server (unless of course the server - * responds somehow to a message). On the other hand, since calling `complete` triggers - * an attempt to close socket connection. If that connection is closed without any errors, stream will - * complete, thus notifying all subscribers. And since calling `error` closes - * socket connection as well, just with a different status code for the server, if closing itself proceeds - * without errors, subscribed Observable will not error, as one might expect, but complete as usual. In both cases - * (calling `complete` or `error`), if process of closing socket connection results in some errors, *then* stream - * will error. - * - * **Multiplexing** - * - * `WebSocketSubject` has an additional operator, not found in other Subjects. It is called `multiplex` and it is - * used to simulate opening several socket connections, while in reality maintaining only one. - * For example, an application has both chat panel and real-time notifications about sport news. Since these are two distinct functions, - * it would make sense to have two separate connections for each. Perhaps there could even be two separate services with WebSocket - * endpoints, running on separate machines with only GUI combining them together. Having a socket connection - * for each functionality could become too resource expensive. It is a common pattern to have single - * WebSocket endpoint that acts as a gateway for the other services (in this case chat and sport news services). - * Even though there is a single connection in a client app, having the ability to manipulate streams as if it - * were two separate sockets is desirable. This eliminates manually registering and unregistering in a gateway for - * given service and filter out messages of interest. This is exactly what `multiplex` method is for. - * - * Method accepts three parameters. First two are functions returning subscription and unsubscription messages - * respectively. These are messages that will be sent to the server, whenever consumer of resulting Observable - * subscribes and unsubscribes. Server can use them to verify that some kind of messages should start or stop - * being forwarded to the client. In case of the above example application, after getting subscription message with proper identifier, - * gateway server can decide that it should connect to real sport news service and start forwarding messages from it. - * Note that both messages will be sent as returned by the functions, they are by default serialized using JSON.stringify, just - * as messages pushed via `next`. Also bear in mind that these messages will be sent on *every* subscription and - * unsubscription. This is potentially dangerous, because one consumer of an Observable may unsubscribe and the server - * might stop sending messages, since it got unsubscription message. This needs to be handled - * on the server or using {@link publish} on a Observable returned from 'multiplex'. - * - * Last argument to `multiplex` is a `messageFilter` function which should return a boolean. It is used to filter out messages - * sent by the server to only those that belong to simulated WebSocket stream. For example, server might mark these - * messages with some kind of string identifier on a message object and `messageFilter` would return `true` - * if there is such identifier on an object emitted by the socket. Messages which returns `false` in `messageFilter` are simply skipped, - * and are not passed down the stream. - * - * Return value of `multiplex` is an Observable with messages incoming from emulated socket connection. Note that this - * is not a `WebSocketSubject`, so calling `next` or `multiplex` again will fail. For pushing values to the - * server, use root `WebSocketSubject`. - * - * ## Examples - * - * Listening for messages from the server - * - * ```ts - * import { webSocket } from 'rxjs/webSocket'; - * - * const subject = webSocket('ws://localhost:8081'); - * - * subject.subscribe({ - * next: msg => console.log('message received: ' + msg), // Called whenever there is a message from the server. - * error: err => console.log(err), // Called if at any point WebSocket API signals some kind of error. - * complete: () => console.log('complete') // Called when connection is closed (for whatever reason). - * }); - * ``` - * - * Pushing messages to the server - * - * ```ts - * import { webSocket } from 'rxjs/webSocket'; - * - * const subject = webSocket('ws://localhost:8081'); - * - * subject.subscribe(); - * // Note that at least one consumer has to subscribe to the created subject - otherwise "nexted" values will be just buffered and not sent, - * // since no connection was established! - * - * subject.next({ message: 'some message' }); - * // This will send a message to the server once a connection is made. Remember value is serialized with JSON.stringify by default! - * - * subject.complete(); // Closes the connection. - * - * subject.error({ code: 4000, reason: 'I think our app just broke!' }); - * // Also closes the connection, but let's the server know that this closing is caused by some error. - * ``` - * - * Multiplexing WebSocket - * - * ```ts - * import { webSocket } from 'rxjs/webSocket'; - * - * const subject = webSocket('ws://localhost:8081'); - * - * const observableA = subject.multiplex( - * () => ({ subscribe: 'A' }), // When server gets this message, it will start sending messages for 'A'... - * () => ({ unsubscribe: 'A' }), // ...and when gets this one, it will stop. - * message => message.type === 'A' // If the function returns `true` message is passed down the stream. Skipped if the function returns false. - * ); - * - * const observableB = subject.multiplex( // And the same goes for 'B'. - * () => ({ subscribe: 'B' }), - * () => ({ unsubscribe: 'B' }), - * message => message.type === 'B' - * ); - * - * const subA = observableA.subscribe(messageForA => console.log(messageForA)); - * // At this moment WebSocket connection is established. Server gets '{"subscribe": "A"}' message and starts sending messages for 'A', - * // which we log here. - * - * const subB = observableB.subscribe(messageForB => console.log(messageForB)); - * // Since we already have a connection, we just send '{"subscribe": "B"}' message to the server. It starts sending messages for 'B', - * // which we log here. - * - * subB.unsubscribe(); - * // Message '{"unsubscribe": "B"}' is sent to the server, which stops sending 'B' messages. - * - * subA.unsubscribe(); - * // Message '{"unsubscribe": "A"}' makes the server stop sending messages for 'A'. Since there is no more subscribers to root Subject, - * // socket connection closes. - * ``` - * - * @param urlConfigOrSource The WebSocket endpoint as an url or an object with configuration and additional Observers. - * @return Subject which allows to both send and receive messages via WebSocket connection. - */ -export function webSocket(urlConfigOrSource: string | WebSocketSubjectConfig): WebSocketSubject { - return new WebSocketSubject(urlConfigOrSource); -} diff --git a/node_modules/rxjs/src/internal/observable/empty.ts b/node_modules/rxjs/src/internal/observable/empty.ts deleted file mode 100644 index 8f59e45..0000000 --- a/node_modules/rxjs/src/internal/observable/empty.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { Observable } from '../Observable'; -import { SchedulerLike } from '../types'; - -/** - * A simple Observable that emits no items to the Observer and immediately - * emits a complete notification. - * - * Just emits 'complete', and nothing else. - * - * ![](empty.png) - * - * A simple Observable that only emits the complete notification. It can be used - * for composing with other Observables, such as in a {@link mergeMap}. - * - * ## Examples - * - * Log complete notification - * - * ```ts - * import { EMPTY } from 'rxjs'; - * - * EMPTY.subscribe({ - * next: () => console.log('Next'), - * complete: () => console.log('Complete!') - * }); - * - * // Outputs - * // Complete! - * ``` - * - * Emit the number 7, then complete - * - * ```ts - * import { EMPTY, startWith } from 'rxjs'; - * - * const result = EMPTY.pipe(startWith(7)); - * result.subscribe(x => console.log(x)); - * - * // Outputs - * // 7 - * ``` - * - * Map and flatten only odd numbers to the sequence `'a'`, `'b'`, `'c'` - * - * ```ts - * import { interval, mergeMap, of, EMPTY } from 'rxjs'; - * - * const interval$ = interval(1000); - * const result = interval$.pipe( - * mergeMap(x => x % 2 === 1 ? of('a', 'b', 'c') : EMPTY), - * ); - * result.subscribe(x => console.log(x)); - * - * // Results in the following to the console: - * // x is equal to the count on the interval, e.g. (0, 1, 2, 3, ...) - * // x will occur every 1000ms - * // if x % 2 is equal to 1, print a, b, c (each on its own) - * // if x % 2 is not equal to 1, nothing will be output - * ``` - * - * @see {@link Observable} - * @see {@link NEVER} - * @see {@link of} - * @see {@link throwError} - */ -export const EMPTY = new Observable((subscriber) => subscriber.complete()); - -/** - * @param scheduler A {@link SchedulerLike} to use for scheduling - * the emission of the complete notification. - * @deprecated Replaced with the {@link EMPTY} constant or {@link scheduled} (e.g. `scheduled([], scheduler)`). Will be removed in v8. - */ -export function empty(scheduler?: SchedulerLike) { - return scheduler ? emptyScheduled(scheduler) : EMPTY; -} - -function emptyScheduled(scheduler: SchedulerLike) { - return new Observable((subscriber) => scheduler.schedule(() => subscriber.complete())); -} diff --git a/node_modules/rxjs/src/internal/observable/forkJoin.ts b/node_modules/rxjs/src/internal/observable/forkJoin.ts deleted file mode 100644 index ec9c418..0000000 --- a/node_modules/rxjs/src/internal/observable/forkJoin.ts +++ /dev/null @@ -1,184 +0,0 @@ -import { Observable } from '../Observable'; -import { ObservedValueOf, ObservableInputTuple, ObservableInput } from '../types'; -import { argsArgArrayOrObject } from '../util/argsArgArrayOrObject'; -import { innerFrom } from './innerFrom'; -import { popResultSelector } from '../util/args'; -import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; -import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; -import { createObject } from '../util/createObject'; -import { AnyCatcher } from '../AnyCatcher'; - -// forkJoin(any) -// We put this first because we need to catch cases where the user has supplied -// _exactly `any`_ as the argument. Since `any` literally matches _anything_, -// we don't want it to randomly hit one of the other type signatures below, -// as we have no idea at build-time what type we should be returning when given an any. - -/** - * You have passed `any` here, we can't figure out if it is - * an array or an object, so you're getting `unknown`. Use better types. - * @param arg Something typed as `any` - */ -export function forkJoin(arg: T): Observable; - -// forkJoin(null | undefined) -export function forkJoin(scheduler: null | undefined): Observable; - -// forkJoin([a, b, c]) -export function forkJoin(sources: readonly []): Observable; -export function forkJoin(sources: readonly [...ObservableInputTuple]): Observable; -export function forkJoin( - sources: readonly [...ObservableInputTuple], - resultSelector: (...values: A) => R -): Observable; - -// forkJoin(a, b, c) -/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */ -export function forkJoin(...sources: [...ObservableInputTuple]): Observable; -/** @deprecated Pass an array of sources instead. The rest-parameters signature will be removed in v8. Details: https://rxjs.dev/deprecations/array-argument */ -export function forkJoin( - ...sourcesAndResultSelector: [...ObservableInputTuple, (...values: A) => R] -): Observable; - -// forkJoin({a, b, c}) -export function forkJoin(sourcesObject: { [K in any]: never }): Observable; -export function forkJoin>>( - sourcesObject: T -): Observable<{ [K in keyof T]: ObservedValueOf }>; - -/** - * Accepts an `Array` of {@link ObservableInput} or a dictionary `Object` of {@link ObservableInput} and returns - * an {@link Observable} that emits either an array of values in the exact same order as the passed array, - * or a dictionary of values in the same shape as the passed dictionary. - * - * Wait for Observables to complete and then combine last values they emitted; - * complete immediately if an empty array is passed. - * - * ![](forkJoin.png) - * - * `forkJoin` is an operator that takes any number of input observables which can be passed either as an array - * or a dictionary of input observables. If no input observables are provided (e.g. an empty array is passed), - * then the resulting stream will complete immediately. - * - * `forkJoin` will wait for all passed observables to emit and complete and then it will emit an array or an object with last - * values from corresponding observables. - * - * If you pass an array of `n` observables to the operator, then the resulting - * array will have `n` values, where the first value is the last one emitted by the first observable, - * second value is the last one emitted by the second observable and so on. - * - * If you pass a dictionary of observables to the operator, then the resulting - * objects will have the same keys as the dictionary passed, with their last values they have emitted - * located at the corresponding key. - * - * That means `forkJoin` will not emit more than once and it will complete after that. If you need to emit combined - * values not only at the end of the lifecycle of passed observables, but also throughout it, try out {@link combineLatest} - * or {@link zip} instead. - * - * In order for the resulting array to have the same length as the number of input observables, whenever any of - * the given observables completes without emitting any value, `forkJoin` will complete at that moment as well - * and it will not emit anything either, even if it already has some last values from other observables. - * Conversely, if there is an observable that never completes, `forkJoin` will never complete either, - * unless at any point some other observable completes without emitting a value, which brings us back to - * the previous case. Overall, in order for `forkJoin` to emit a value, all given observables - * have to emit something at least once and complete. - * - * If any given observable errors at some point, `forkJoin` will error as well and immediately unsubscribe - * from the other observables. - * - * Optionally `forkJoin` accepts a `resultSelector` function, that will be called with values which normally - * would land in the emitted array. Whatever is returned by the `resultSelector`, will appear in the output - * observable instead. This means that the default `resultSelector` can be thought of as a function that takes - * all its arguments and puts them into an array. Note that the `resultSelector` will be called only - * when `forkJoin` is supposed to emit a result. - * - * ## Examples - * - * Use `forkJoin` with a dictionary of observable inputs - * - * ```ts - * import { forkJoin, of, timer } from 'rxjs'; - * - * const observable = forkJoin({ - * foo: of(1, 2, 3, 4), - * bar: Promise.resolve(8), - * baz: timer(4000) - * }); - * observable.subscribe({ - * next: value => console.log(value), - * complete: () => console.log('This is how it ends!'), - * }); - * - * // Logs: - * // { foo: 4, bar: 8, baz: 0 } after 4 seconds - * // 'This is how it ends!' immediately after - * ``` - * - * Use `forkJoin` with an array of observable inputs - * - * ```ts - * import { forkJoin, of, timer } from 'rxjs'; - * - * const observable = forkJoin([ - * of(1, 2, 3, 4), - * Promise.resolve(8), - * timer(4000) - * ]); - * observable.subscribe({ - * next: value => console.log(value), - * complete: () => console.log('This is how it ends!'), - * }); - * - * // Logs: - * // [4, 8, 0] after 4 seconds - * // 'This is how it ends!' immediately after - * ``` - * - * @see {@link combineLatest} - * @see {@link zip} - * - * @param args Any number of `ObservableInput`s provided either as an array, as an object - * or as arguments passed directly to the operator. - * @return Observable emitting either an array of last values emitted by passed Observables - * or value from project function. - */ -export function forkJoin(...args: any[]): Observable { - const resultSelector = popResultSelector(args); - const { args: sources, keys } = argsArgArrayOrObject(args); - const result = new Observable((subscriber) => { - const { length } = sources; - if (!length) { - subscriber.complete(); - return; - } - const values = new Array(length); - let remainingCompletions = length; - let remainingEmissions = length; - for (let sourceIndex = 0; sourceIndex < length; sourceIndex++) { - let hasValue = false; - innerFrom(sources[sourceIndex]).subscribe( - createOperatorSubscriber( - subscriber, - (value) => { - if (!hasValue) { - hasValue = true; - remainingEmissions--; - } - values[sourceIndex] = value; - }, - () => remainingCompletions--, - undefined, - () => { - if (!remainingCompletions || !hasValue) { - if (!remainingEmissions) { - subscriber.next(keys ? createObject(keys, values) : values); - } - subscriber.complete(); - } - } - ) - ); - } - }); - return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result; -} diff --git a/node_modules/rxjs/src/internal/observable/from.ts b/node_modules/rxjs/src/internal/observable/from.ts deleted file mode 100644 index 42e1a42..0000000 --- a/node_modules/rxjs/src/internal/observable/from.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { Observable } from '../Observable'; -import { ObservableInput, SchedulerLike, ObservedValueOf } from '../types'; -import { scheduled } from '../scheduled/scheduled'; -import { innerFrom } from './innerFrom'; - -export function from>(input: O): Observable>; -/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled`. Details: https://rxjs.dev/deprecations/scheduler-argument */ -export function from>(input: O, scheduler: SchedulerLike | undefined): Observable>; - -/** - * Creates an Observable from an Array, an array-like object, a Promise, an iterable object, or an Observable-like object. - * - * Converts almost anything to an Observable. - * - * ![](from.png) - * - * `from` converts various other objects and data types into Observables. It also converts a Promise, an array-like, or an - * iterable - * object into an Observable that emits the items in that promise, array, or iterable. A String, in this context, is treated - * as an array of characters. Observable-like objects (contains a function named with the ES2015 Symbol for Observable) can also be - * converted through this operator. - * - * ## Examples - * - * Converts an array to an Observable - * - * ```ts - * import { from } from 'rxjs'; - * - * const array = [10, 20, 30]; - * const result = from(array); - * - * result.subscribe(x => console.log(x)); - * - * // Logs: - * // 10 - * // 20 - * // 30 - * ``` - * - * Convert an infinite iterable (from a generator) to an Observable - * - * ```ts - * import { from, take } from 'rxjs'; - * - * function* generateDoubles(seed) { - * let i = seed; - * while (true) { - * yield i; - * i = 2 * i; // double it - * } - * } - * - * const iterator = generateDoubles(3); - * const result = from(iterator).pipe(take(10)); - * - * result.subscribe(x => console.log(x)); - * - * // Logs: - * // 3 - * // 6 - * // 12 - * // 24 - * // 48 - * // 96 - * // 192 - * // 384 - * // 768 - * // 1536 - * ``` - * - * With `asyncScheduler` - * - * ```ts - * import { from, asyncScheduler } from 'rxjs'; - * - * console.log('start'); - * - * const array = [10, 20, 30]; - * const result = from(array, asyncScheduler); - * - * result.subscribe(x => console.log(x)); - * - * console.log('end'); - * - * // Logs: - * // 'start' - * // 'end' - * // 10 - * // 20 - * // 30 - * ``` - * - * @see {@link fromEvent} - * @see {@link fromEventPattern} - * - * @param input A subscription object, a Promise, an Observable-like, - * an Array, an iterable, or an array-like object to be converted. - * @param scheduler An optional {@link SchedulerLike} on which to schedule the emission of values. - * @return An Observable converted from {@link ObservableInput}. - */ -export function from(input: ObservableInput, scheduler?: SchedulerLike): Observable { - return scheduler ? scheduled(input, scheduler) : innerFrom(input); -} diff --git a/node_modules/rxjs/src/internal/observable/fromEvent.ts b/node_modules/rxjs/src/internal/observable/fromEvent.ts deleted file mode 100644 index ef15431..0000000 --- a/node_modules/rxjs/src/internal/observable/fromEvent.ts +++ /dev/null @@ -1,339 +0,0 @@ -import { innerFrom } from '../observable/innerFrom'; -import { Observable } from '../Observable'; -import { mergeMap } from '../operators/mergeMap'; -import { isArrayLike } from '../util/isArrayLike'; -import { isFunction } from '../util/isFunction'; -import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; - -// These constants are used to create handler registry functions using array mapping below. -const nodeEventEmitterMethods = ['addListener', 'removeListener'] as const; -const eventTargetMethods = ['addEventListener', 'removeEventListener'] as const; -const jqueryMethods = ['on', 'off'] as const; - -export interface NodeStyleEventEmitter { - addListener(eventName: string | symbol, handler: NodeEventHandler): this; - removeListener(eventName: string | symbol, handler: NodeEventHandler): this; -} - -export type NodeEventHandler = (...args: any[]) => void; - -// For APIs that implement `addListener` and `removeListener` methods that may -// not use the same arguments or return EventEmitter values -// such as React Native -export interface NodeCompatibleEventEmitter { - addListener(eventName: string, handler: NodeEventHandler): void | {}; - removeListener(eventName: string, handler: NodeEventHandler): void | {}; -} - -// Use handler types like those in @types/jquery. See: -// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/847731ba1d7fa6db6b911c0e43aa0afe596e7723/types/jquery/misc.d.ts#L6395 -export interface JQueryStyleEventEmitter { - on(eventName: string, handler: (this: TContext, t: T, ...args: any[]) => any): void; - off(eventName: string, handler: (this: TContext, t: T, ...args: any[]) => any): void; -} - -export interface EventListenerObject { - handleEvent(evt: E): void; -} - -export interface HasEventTargetAddRemove { - addEventListener( - type: string, - listener: ((evt: E) => void) | EventListenerObject | null, - options?: boolean | AddEventListenerOptions - ): void; - removeEventListener( - type: string, - listener: ((evt: E) => void) | EventListenerObject | null, - options?: EventListenerOptions | boolean - ): void; -} - -export interface EventListenerOptions { - capture?: boolean; - passive?: boolean; - once?: boolean; -} - -export interface AddEventListenerOptions extends EventListenerOptions { - once?: boolean; - passive?: boolean; -} - -export function fromEvent(target: HasEventTargetAddRemove | ArrayLike>, eventName: string): Observable; -export function fromEvent( - target: HasEventTargetAddRemove | ArrayLike>, - eventName: string, - resultSelector: (event: T) => R -): Observable; -export function fromEvent( - target: HasEventTargetAddRemove | ArrayLike>, - eventName: string, - options: EventListenerOptions -): Observable; -export function fromEvent( - target: HasEventTargetAddRemove | ArrayLike>, - eventName: string, - options: EventListenerOptions, - resultSelector: (event: T) => R -): Observable; - -export function fromEvent(target: NodeStyleEventEmitter | ArrayLike, eventName: string): Observable; -/** @deprecated Do not specify explicit type parameters. Signatures with type parameters that cannot be inferred will be removed in v8. */ -export function fromEvent(target: NodeStyleEventEmitter | ArrayLike, eventName: string): Observable; -export function fromEvent( - target: NodeStyleEventEmitter | ArrayLike, - eventName: string, - resultSelector: (...args: any[]) => R -): Observable; - -export function fromEvent( - target: NodeCompatibleEventEmitter | ArrayLike, - eventName: string -): Observable; -/** @deprecated Do not specify explicit type parameters. Signatures with type parameters that cannot be inferred will be removed in v8. */ -export function fromEvent(target: NodeCompatibleEventEmitter | ArrayLike, eventName: string): Observable; -export function fromEvent( - target: NodeCompatibleEventEmitter | ArrayLike, - eventName: string, - resultSelector: (...args: any[]) => R -): Observable; - -export function fromEvent( - target: JQueryStyleEventEmitter | ArrayLike>, - eventName: string -): Observable; -export function fromEvent( - target: JQueryStyleEventEmitter | ArrayLike>, - eventName: string, - resultSelector: (value: T, ...args: any[]) => R -): Observable; - -/** - * Creates an Observable that emits events of a specific type coming from the - * given event target. - * - * Creates an Observable from DOM events, or Node.js - * EventEmitter events or others. - * - * ![](fromEvent.png) - * - * `fromEvent` accepts as a first argument event target, which is an object with methods - * for registering event handler functions. As a second argument it takes string that indicates - * type of event we want to listen for. `fromEvent` supports selected types of event targets, - * which are described in detail below. If your event target does not match any of the ones listed, - * you should use {@link fromEventPattern}, which can be used on arbitrary APIs. - * When it comes to APIs supported by `fromEvent`, their methods for adding and removing event - * handler functions have different names, but they all accept a string describing event type - * and function itself, which will be called whenever said event happens. - * - * Every time resulting Observable is subscribed, event handler function will be registered - * to event target on given event type. When that event fires, value - * passed as a first argument to registered function will be emitted by output Observable. - * When Observable is unsubscribed, function will be unregistered from event target. - * - * Note that if event target calls registered function with more than one argument, second - * and following arguments will not appear in resulting stream. In order to get access to them, - * you can pass to `fromEvent` optional project function, which will be called with all arguments - * passed to event handler. Output Observable will then emit value returned by project function, - * instead of the usual value. - * - * Remember that event targets listed below are checked via duck typing. It means that - * no matter what kind of object you have and no matter what environment you work in, - * you can safely use `fromEvent` on that object if it exposes described methods (provided - * of course they behave as was described above). So for example if Node.js library exposes - * event target which has the same method names as DOM EventTarget, `fromEvent` is still - * a good choice. - * - * If the API you use is more callback then event handler oriented (subscribed - * callback function fires only once and thus there is no need to manually - * unregister it), you should use {@link bindCallback} or {@link bindNodeCallback} - * instead. - * - * `fromEvent` supports following types of event targets: - * - * **DOM EventTarget** - * - * This is an object with `addEventListener` and `removeEventListener` methods. - * - * In the browser, `addEventListener` accepts - apart from event type string and event - * handler function arguments - optional third parameter, which is either an object or boolean, - * both used for additional configuration how and when passed function will be called. When - * `fromEvent` is used with event target of that type, you can provide this values - * as third parameter as well. - * - * **Node.js EventEmitter** - * - * An object with `addListener` and `removeListener` methods. - * - * **JQuery-style event target** - * - * An object with `on` and `off` methods - * - * **DOM NodeList** - * - * List of DOM Nodes, returned for example by `document.querySelectorAll` or `Node.childNodes`. - * - * Although this collection is not event target in itself, `fromEvent` will iterate over all Nodes - * it contains and install event handler function in every of them. When returned Observable - * is unsubscribed, function will be removed from all Nodes. - * - * **DOM HtmlCollection** - * - * Just as in case of NodeList it is a collection of DOM nodes. Here as well event handler function is - * installed and removed in each of elements. - * - * - * ## Examples - * - * Emit clicks happening on the DOM document - * - * ```ts - * import { fromEvent } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * clicks.subscribe(x => console.log(x)); - * - * // Results in: - * // MouseEvent object logged to console every time a click - * // occurs on the document. - * ``` - * - * Use `addEventListener` with capture option - * - * ```ts - * import { fromEvent } from 'rxjs'; - * - * const div = document.createElement('div'); - * div.style.cssText = 'width: 200px; height: 200px; background: #09c;'; - * document.body.appendChild(div); - * - * // note optional configuration parameter which will be passed to addEventListener - * const clicksInDocument = fromEvent(document, 'click', { capture: true }); - * const clicksInDiv = fromEvent(div, 'click'); - * - * clicksInDocument.subscribe(() => console.log('document')); - * clicksInDiv.subscribe(() => console.log('div')); - * - * // By default events bubble UP in DOM tree, so normally - * // when we would click on div in document - * // "div" would be logged first and then "document". - * // Since we specified optional `capture` option, document - * // will catch event when it goes DOWN DOM tree, so console - * // will log "document" and then "div". - * ``` - * - * @see {@link bindCallback} - * @see {@link bindNodeCallback} - * @see {@link fromEventPattern} - * - * @param target The DOM EventTarget, Node.js EventEmitter, JQuery-like event target, - * NodeList or HTMLCollection to attach the event handler to. - * @param eventName The event name of interest, being emitted by the `target`. - * @param options Options to pass through to the underlying `addListener`, - * `addEventListener` or `on` functions. - * @param resultSelector A mapping function used to transform events. It takes the - * arguments from the event handler and should return a single value. - * @return An Observable emitting events registered through `target`'s - * listener handlers. - */ -export function fromEvent( - target: any, - eventName: string, - options?: EventListenerOptions | ((...args: any[]) => T), - resultSelector?: (...args: any[]) => T -): Observable { - if (isFunction(options)) { - resultSelector = options; - options = undefined; - } - if (resultSelector) { - return fromEvent(target, eventName, options as EventListenerOptions).pipe(mapOneOrManyArgs(resultSelector)); - } - - // Figure out our add and remove methods. In order to do this, - // we are going to analyze the target in a preferred order, if - // the target matches a given signature, we take the two "add" and "remove" - // method names and apply them to a map to create opposite versions of the - // same function. This is because they all operate in duplicate pairs, - // `addListener(name, handler)`, `removeListener(name, handler)`, for example. - // The call only differs by method name, as to whether or not you're adding or removing. - const [add, remove] = - // If it is an EventTarget, we need to use a slightly different method than the other two patterns. - isEventTarget(target) - ? eventTargetMethods.map((methodName) => (handler: any) => target[methodName](eventName, handler, options as EventListenerOptions)) - : // In all other cases, the call pattern is identical with the exception of the method names. - isNodeStyleEventEmitter(target) - ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) - : isJQueryStyleEventEmitter(target) - ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) - : []; - - // If add is falsy, it's because we didn't match a pattern above. - // Check to see if it is an ArrayLike, because if it is, we want to - // try to apply fromEvent to all of it's items. We do this check last, - // because there are may be some types that are both ArrayLike *and* implement - // event registry points, and we'd rather delegate to that when possible. - if (!add) { - if (isArrayLike(target)) { - return mergeMap((subTarget: any) => fromEvent(subTarget, eventName, options as EventListenerOptions))( - innerFrom(target) - ) as Observable; - } - } - - // If add is falsy and we made it here, it's because we didn't - // match any valid target objects above. - if (!add) { - throw new TypeError('Invalid event target'); - } - - return new Observable((subscriber) => { - // The handler we are going to register. Forwards the event object, by itself, or - // an array of arguments to the event handler, if there is more than one argument, - // to the consumer. - const handler = (...args: any[]) => subscriber.next(1 < args.length ? args : args[0]); - // Do the work of adding the handler to the target. - add(handler); - // When we finalize, we want to remove the handler and free up memory. - return () => remove!(handler); - }); -} - -/** - * Used to create `add` and `remove` functions to register and unregister event handlers - * from a target in the most common handler pattern, where there are only two arguments. - * (e.g. `on(name, fn)`, `off(name, fn)`, `addListener(name, fn)`, or `removeListener(name, fn)`) - * @param target The target we're calling methods on - * @param eventName The event name for the event we're creating register or unregister functions for - */ -function toCommonHandlerRegistry(target: any, eventName: string) { - return (methodName: string) => (handler: any) => target[methodName](eventName, handler); -} - -/** - * Checks to see if the target implements the required node-style EventEmitter methods - * for adding and removing event handlers. - * @param target the object to check - */ -function isNodeStyleEventEmitter(target: any): target is NodeStyleEventEmitter { - return isFunction(target.addListener) && isFunction(target.removeListener); -} - -/** - * Checks to see if the target implements the required jQuery-style EventEmitter methods - * for adding and removing event handlers. - * @param target the object to check - */ -function isJQueryStyleEventEmitter(target: any): target is JQueryStyleEventEmitter { - return isFunction(target.on) && isFunction(target.off); -} - -/** - * Checks to see if the target implements the required EventTarget methods - * for adding and removing event handlers. - * @param target the object to check - */ -function isEventTarget(target: any): target is HasEventTargetAddRemove { - return isFunction(target.addEventListener) && isFunction(target.removeEventListener); -} diff --git a/node_modules/rxjs/src/internal/observable/fromEventPattern.ts b/node_modules/rxjs/src/internal/observable/fromEventPattern.ts deleted file mode 100644 index 6e700b1..0000000 --- a/node_modules/rxjs/src/internal/observable/fromEventPattern.ts +++ /dev/null @@ -1,152 +0,0 @@ -import { Observable } from '../Observable'; -import { isFunction } from '../util/isFunction'; -import { NodeEventHandler } from './fromEvent'; -import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; - -/* tslint:disable:max-line-length */ -export function fromEventPattern( - addHandler: (handler: NodeEventHandler) => any, - removeHandler?: (handler: NodeEventHandler, signal?: any) => void -): Observable; -export function fromEventPattern( - addHandler: (handler: NodeEventHandler) => any, - removeHandler?: (handler: NodeEventHandler, signal?: any) => void, - resultSelector?: (...args: any[]) => T -): Observable; -/* tslint:enable:max-line-length */ - -/** - * Creates an Observable from an arbitrary API for registering event handlers. - * - * When that method for adding event handler was something {@link fromEvent} - * was not prepared for. - * - * ![](fromEventPattern.png) - * - * `fromEventPattern` allows you to convert into an Observable any API that supports registering handler functions - * for events. It is similar to {@link fromEvent}, but far - * more flexible. In fact, all use cases of {@link fromEvent} could be easily handled by - * `fromEventPattern` (although in slightly more verbose way). - * - * This operator accepts as a first argument an `addHandler` function, which will be injected with - * handler parameter. That handler is actually an event handler function that you now can pass - * to API expecting it. `addHandler` will be called whenever Observable - * returned by the operator is subscribed, so registering handler in API will not - * necessarily happen when `fromEventPattern` is called. - * - * After registration, every time an event that we listen to happens, - * Observable returned by `fromEventPattern` will emit value that event handler - * function was called with. Note that if event handler was called with more - * than one argument, second and following arguments will not appear in the Observable. - * - * If API you are using allows to unregister event handlers as well, you can pass to `fromEventPattern` - * another function - `removeHandler` - as a second parameter. It will be injected - * with the same handler function as before, which now you can use to unregister - * it from the API. `removeHandler` will be called when consumer of resulting Observable - * unsubscribes from it. - * - * In some APIs unregistering is actually handled differently. Method registering an event handler - * returns some kind of token, which is later used to identify which function should - * be unregistered or it itself has method that unregisters event handler. - * If that is the case with your API, make sure token returned - * by registering method is returned by `addHandler`. Then it will be passed - * as a second argument to `removeHandler`, where you will be able to use it. - * - * If you need access to all event handler parameters (not only the first one), - * or you need to transform them in any way, you can call `fromEventPattern` with optional - * third parameter - project function which will accept all arguments passed to - * event handler when it is called. Whatever is returned from project function will appear on - * resulting stream instead of usual event handlers first argument. This means - * that default project can be thought of as function that takes its first parameter - * and ignores the rest. - * - * ## Examples - * - * Emits clicks happening on the DOM document - * - * ```ts - * import { fromEventPattern } from 'rxjs'; - * - * function addClickHandler(handler) { - * document.addEventListener('click', handler); - * } - * - * function removeClickHandler(handler) { - * document.removeEventListener('click', handler); - * } - * - * const clicks = fromEventPattern( - * addClickHandler, - * removeClickHandler - * ); - * clicks.subscribe(x => console.log(x)); - * - * // Whenever you click anywhere in the browser, DOM MouseEvent - * // object will be logged. - * ``` - * - * Use with API that returns cancellation token - * - * ```ts - * import { fromEventPattern } from 'rxjs'; - * - * const token = someAPI.registerEventHandler(function() {}); - * someAPI.unregisterEventHandler(token); // this APIs cancellation method accepts - * // not handler itself, but special token. - * - * const someAPIObservable = fromEventPattern( - * function(handler) { return someAPI.registerEventHandler(handler); }, // Note that we return the token here... - * function(handler, token) { someAPI.unregisterEventHandler(token); } // ...to then use it here. - * ); - * ``` - * - * Use with project function - * - * ```ts - * import { fromEventPattern } from 'rxjs'; - * - * someAPI.registerEventHandler((eventType, eventMessage) => { - * console.log(eventType, eventMessage); // Logs 'EVENT_TYPE' 'EVENT_MESSAGE' to console. - * }); - * - * const someAPIObservable = fromEventPattern( - * handler => someAPI.registerEventHandler(handler), - * handler => someAPI.unregisterEventHandler(handler) - * (eventType, eventMessage) => eventType + ' --- ' + eventMessage // without that function only 'EVENT_TYPE' - * ); // would be emitted by the Observable - * - * someAPIObservable.subscribe(value => console.log(value)); - * - * // Logs: - * // 'EVENT_TYPE --- EVENT_MESSAGE' - * ``` - * - * @see {@link fromEvent} - * @see {@link bindCallback} - * @see {@link bindNodeCallback} - * - * @param addHandler A function that takes a `handler` function as argument and attaches it - * somehow to the actual source of events. - * @param removeHandler A function that takes a `handler` function as an argument and removes - * it from the event source. If `addHandler` returns some kind of token, `removeHandler` function - * will have it as a second parameter. - * @param resultSelector A function to transform results. It takes the arguments from the event - * handler and should return a single value. - * @return Observable which, when an event happens, emits first parameter passed to registered - * event handler. Alternatively it emits whatever project function returns at that moment. - */ -export function fromEventPattern( - addHandler: (handler: NodeEventHandler) => any, - removeHandler?: (handler: NodeEventHandler, signal?: any) => void, - resultSelector?: (...args: any[]) => T -): Observable { - if (resultSelector) { - return fromEventPattern(addHandler, removeHandler).pipe(mapOneOrManyArgs(resultSelector)); - } - - return new Observable((subscriber) => { - const handler = (...e: T[]) => subscriber.next(e.length === 1 ? e[0] : e); - const retValue = addHandler(handler); - return isFunction(removeHandler) ? () => removeHandler(handler, retValue) : undefined; - }); -} diff --git a/node_modules/rxjs/src/internal/observable/fromSubscribable.ts b/node_modules/rxjs/src/internal/observable/fromSubscribable.ts deleted file mode 100644 index 12e45bf..0000000 --- a/node_modules/rxjs/src/internal/observable/fromSubscribable.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Observable } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { Subscribable } from '../types'; - -/** - * Used to convert a subscribable to an observable. - * - * Currently, this is only used within internals. - * - * TODO: Discuss ObservableInput supporting "Subscribable". - * https://github.com/ReactiveX/rxjs/issues/5909 - * - * @param subscribable A subscribable - */ -export function fromSubscribable(subscribable: Subscribable) { - return new Observable((subscriber: Subscriber) => subscribable.subscribe(subscriber)); -} diff --git a/node_modules/rxjs/src/internal/observable/generate.ts b/node_modules/rxjs/src/internal/observable/generate.ts deleted file mode 100644 index 0b728be..0000000 --- a/node_modules/rxjs/src/internal/observable/generate.ts +++ /dev/null @@ -1,387 +0,0 @@ -import { Observable } from '../Observable'; -import { identity } from '../util/identity'; -import { ObservableInput, SchedulerLike } from '../types'; -import { isScheduler } from '../util/isScheduler'; -import { defer } from './defer'; -import { scheduleIterable } from '../scheduled/scheduleIterable'; - -type ConditionFunc = (state: S) => boolean; -type IterateFunc = (state: S) => S; -type ResultFunc = (state: S) => T; - -export interface GenerateBaseOptions { - /** - * Initial state. - */ - initialState: S; - /** - * Condition function that accepts state and returns boolean. - * When it returns false, the generator stops. - * If not specified, a generator never stops. - */ - condition?: ConditionFunc; - /** - * Iterate function that accepts state and returns new state. - */ - iterate: IterateFunc; - /** - * SchedulerLike to use for generation process. - * By default, a generator starts immediately. - */ - scheduler?: SchedulerLike; -} - -export interface GenerateOptions extends GenerateBaseOptions { - /** - * Result selection function that accepts state and returns a value to emit. - */ - resultSelector: ResultFunc; -} - -/** - * Generates an observable sequence by running a state-driven loop - * producing the sequence's elements, using the specified scheduler - * to send out observer messages. - * - * ![](generate.png) - * - * ## Examples - * - * Produces sequence of numbers - * - * ```ts - * import { generate } from 'rxjs'; - * - * const result = generate(0, x => x < 3, x => x + 1, x => x); - * - * result.subscribe(x => console.log(x)); - * - * // Logs: - * // 0 - * // 1 - * // 2 - * ``` - * - * Use `asapScheduler` - * - * ```ts - * import { generate, asapScheduler } from 'rxjs'; - * - * const result = generate(1, x => x < 5, x => x * 2, x => x + 1, asapScheduler); - * - * result.subscribe(x => console.log(x)); - * - * // Logs: - * // 2 - * // 3 - * // 5 - * ``` - * - * @see {@link from} - * @see {@link Observable} - * - * @param initialState Initial state. - * @param condition Condition to terminate generation (upon returning false). - * @param iterate Iteration step function. - * @param resultSelector Selector function for results produced in the sequence. - * @param scheduler A {@link SchedulerLike} on which to run the generator loop. - * If not provided, defaults to emit immediately. - * @returns The generated sequence. - * @deprecated Instead of passing separate arguments, use the options argument. - * Signatures taking separate arguments will be removed in v8. - */ -export function generate( - initialState: S, - condition: ConditionFunc, - iterate: IterateFunc, - resultSelector: ResultFunc, - scheduler?: SchedulerLike -): Observable; - -/** - * Generates an Observable by running a state-driven loop - * that emits an element on each iteration. - * - * Use it instead of nexting values in a for loop. - * - * ![](generate.png) - * - * `generate` allows you to create a stream of values generated with a loop very similar to - * a traditional for loop. The first argument of `generate` is a beginning value. The second argument - * is a function that accepts this value and tests if some condition still holds. If it does, - * then the loop continues, if not, it stops. The third value is a function which takes the - * previously defined value and modifies it in some way on each iteration. Note how these three parameters - * are direct equivalents of three expressions in a traditional for loop: the first expression - * initializes some state (for example, a numeric index), the second tests if the loop can perform the next - * iteration (for example, if the index is lower than 10) and the third states how the defined value - * will be modified on every step (for example, the index will be incremented by one). - * - * Return value of a `generate` operator is an Observable that on each loop iteration - * emits a value. First of all, the condition function is ran. If it returns true, then the Observable - * emits the currently stored value (initial value at the first iteration) and finally updates - * that value with iterate function. If at some point the condition returns false, then the Observable - * completes at that moment. - * - * Optionally you can pass a fourth parameter to `generate` - a result selector function which allows you - * to immediately map the value that would normally be emitted by an Observable. - * - * If you find three anonymous functions in `generate` call hard to read, you can provide - * a single object to the operator instead where the object has the properties: `initialState`, - * `condition`, `iterate` and `resultSelector`, which should have respective values that you - * would normally pass to `generate`. `resultSelector` is still optional, but that form - * of calling `generate` allows you to omit `condition` as well. If you omit it, that means - * condition always holds, or in other words the resulting Observable will never complete. - * - * Both forms of `generate` can optionally accept a scheduler. In case of a multi-parameter call, - * scheduler simply comes as a last argument (no matter if there is a `resultSelector` - * function or not). In case of a single-parameter call, you can provide it as a - * `scheduler` property on the object passed to the operator. In both cases, a scheduler decides when - * the next iteration of the loop will happen and therefore when the next value will be emitted - * by the Observable. For example, to ensure that each value is pushed to the Observer - * on a separate task in the event loop, you could use the `async` scheduler. Note that - * by default (when no scheduler is passed) values are simply emitted synchronously. - * - * - * ## Examples - * - * Use with condition and iterate functions - * - * ```ts - * import { generate } from 'rxjs'; - * - * const result = generate(0, x => x < 3, x => x + 1); - * - * result.subscribe({ - * next: value => console.log(value), - * complete: () => console.log('Complete!') - * }); - * - * // Logs: - * // 0 - * // 1 - * // 2 - * // 'Complete!' - * ``` - * - * Use with condition, iterate and resultSelector functions - * - * ```ts - * import { generate } from 'rxjs'; - * - * const result = generate(0, x => x < 3, x => x + 1, x => x * 1000); - * - * result.subscribe({ - * next: value => console.log(value), - * complete: () => console.log('Complete!') - * }); - * - * // Logs: - * // 0 - * // 1000 - * // 2000 - * // 'Complete!' - * ``` - * - * Use with options object - * - * ```ts - * import { generate } from 'rxjs'; - * - * const result = generate({ - * initialState: 0, - * condition(value) { return value < 3; }, - * iterate(value) { return value + 1; }, - * resultSelector(value) { return value * 1000; } - * }); - * - * result.subscribe({ - * next: value => console.log(value), - * complete: () => console.log('Complete!') - * }); - * - * // Logs: - * // 0 - * // 1000 - * // 2000 - * // 'Complete!' - * ``` - * - * Use options object without condition function - * - * ```ts - * import { generate } from 'rxjs'; - * - * const result = generate({ - * initialState: 0, - * iterate(value) { return value + 1; }, - * resultSelector(value) { return value * 1000; } - * }); - * - * result.subscribe({ - * next: value => console.log(value), - * complete: () => console.log('Complete!') // This will never run - * }); - * - * // Logs: - * // 0 - * // 1000 - * // 2000 - * // 3000 - * // ...and never stops. - * ``` - * - * @see {@link from} - * - * @param initialState Initial state. - * @param condition Condition to terminate generation (upon returning false). - * @param iterate Iteration step function. - * @param scheduler A {@link Scheduler} on which to run the generator loop. If not - * provided, defaults to emitting immediately. - * @return The generated sequence. - * @deprecated Instead of passing separate arguments, use the options argument. - * Signatures taking separate arguments will be removed in v8. - */ -export function generate( - initialState: S, - condition: ConditionFunc, - iterate: IterateFunc, - scheduler?: SchedulerLike -): Observable; - -/** - * Generates an observable sequence by running a state-driven loop - * producing the sequence's elements, using the specified scheduler - * to send out observer messages. - * The overload accepts options object that might contain initial state, iterate, - * condition and scheduler. - * - * ![](generate.png) - * - * ## Examples - * - * Use options object with condition function - * - * ```ts - * import { generate } from 'rxjs'; - * - * const result = generate({ - * initialState: 0, - * condition: x => x < 3, - * iterate: x => x + 1 - * }); - * - * result.subscribe({ - * next: value => console.log(value), - * complete: () => console.log('Complete!') - * }); - * - * // Logs: - * // 0 - * // 1 - * // 2 - * // 'Complete!' - * ``` - * - * @see {@link from} - * @see {@link Observable} - * - * @param options Object that must contain initialState, iterate and might contain condition and scheduler. - * @returns The generated sequence. - */ -export function generate(options: GenerateBaseOptions): Observable; - -/** - * Generates an observable sequence by running a state-driven loop - * producing the sequence's elements, using the specified scheduler - * to send out observer messages. - * The overload accepts options object that might contain initial state, iterate, - * condition, result selector and scheduler. - * - * ![](generate.png) - * - * ## Examples - * - * Use options object with condition and iterate function - * - * ```ts - * import { generate } from 'rxjs'; - * - * const result = generate({ - * initialState: 0, - * condition: x => x < 3, - * iterate: x => x + 1, - * resultSelector: x => x - * }); - * - * result.subscribe({ - * next: value => console.log(value), - * complete: () => console.log('Complete!') - * }); - * - * // Logs: - * // 0 - * // 1 - * // 2 - * // 'Complete!' - * ``` - * - * @see {@link from} - * @see {@link Observable} - * - * @param options Object that must contain initialState, iterate, resultSelector and might contain condition and scheduler. - * @returns The generated sequence. - */ -export function generate(options: GenerateOptions): Observable; - -export function generate( - initialStateOrOptions: S | GenerateOptions, - condition?: ConditionFunc, - iterate?: IterateFunc, - resultSelectorOrScheduler?: ResultFunc | SchedulerLike, - scheduler?: SchedulerLike -): Observable { - let resultSelector: ResultFunc; - let initialState: S; - - // TODO: Remove this as we move away from deprecated signatures - // and move towards a configuration object argument. - if (arguments.length === 1) { - // If we only have one argument, we can assume it is a configuration object. - // Note that folks not using TypeScript may trip over this. - ({ - initialState, - condition, - iterate, - resultSelector = identity as ResultFunc, - scheduler, - } = initialStateOrOptions as GenerateOptions); - } else { - // Deprecated arguments path. Figure out what the user - // passed and set it here. - initialState = initialStateOrOptions as S; - if (!resultSelectorOrScheduler || isScheduler(resultSelectorOrScheduler)) { - resultSelector = identity as ResultFunc; - scheduler = resultSelectorOrScheduler as SchedulerLike; - } else { - resultSelector = resultSelectorOrScheduler as ResultFunc; - } - } - - // The actual generator used to "generate" values. - function* gen() { - for (let state = initialState; !condition || condition(state); state = iterate!(state)) { - yield resultSelector(state); - } - } - - // We use `defer` because we want to defer the creation of the iterator from the iterable. - return defer( - (scheduler - ? // If a scheduler was provided, use `scheduleIterable` to ensure that iteration/generation - // happens on the scheduler. - () => scheduleIterable(gen(), scheduler!) - : // Otherwise, if there's no scheduler, we can just use the generator function directly in - // `defer` and executing it will return the generator (which is iterable). - gen) as () => ObservableInput - ); -} diff --git a/node_modules/rxjs/src/internal/observable/iif.ts b/node_modules/rxjs/src/internal/observable/iif.ts deleted file mode 100644 index d9ea9f1..0000000 --- a/node_modules/rxjs/src/internal/observable/iif.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { Observable } from '../Observable'; -import { defer } from './defer'; -import { ObservableInput } from '../types'; - -/** - * Checks a boolean at subscription time, and chooses between one of two observable sources - * - * `iif` expects a function that returns a boolean (the `condition` function), and two sources, - * the `trueResult` and the `falseResult`, and returns an Observable. - * - * At the moment of subscription, the `condition` function is called. If the result is `true`, the - * subscription will be to the source passed as the `trueResult`, otherwise, the subscription will be - * to the source passed as the `falseResult`. - * - * If you need to check more than two options to choose between more than one observable, have a look at the {@link defer} creation method. - * - * ## Examples - * - * Change at runtime which Observable will be subscribed - * - * ```ts - * import { iif, of } from 'rxjs'; - * - * let subscribeToFirst; - * const firstOrSecond = iif( - * () => subscribeToFirst, - * of('first'), - * of('second') - * ); - * - * subscribeToFirst = true; - * firstOrSecond.subscribe(value => console.log(value)); - * - * // Logs: - * // 'first' - * - * subscribeToFirst = false; - * firstOrSecond.subscribe(value => console.log(value)); - * - * // Logs: - * // 'second' - * ``` - * - * Control access to an Observable - * - * ```ts - * import { iif, of, EMPTY } from 'rxjs'; - * - * let accessGranted; - * const observableIfYouHaveAccess = iif( - * () => accessGranted, - * of('It seems you have an access...'), - * EMPTY - * ); - * - * accessGranted = true; - * observableIfYouHaveAccess.subscribe({ - * next: value => console.log(value), - * complete: () => console.log('The end') - * }); - * - * // Logs: - * // 'It seems you have an access...' - * // 'The end' - * - * accessGranted = false; - * observableIfYouHaveAccess.subscribe({ - * next: value => console.log(value), - * complete: () => console.log('The end') - * }); - * - * // Logs: - * // 'The end' - * ``` - * - * @see {@link defer} - * - * @param condition Condition which Observable should be chosen. - * @param trueResult An Observable that will be subscribed if condition is true. - * @param falseResult An Observable that will be subscribed if condition is false. - * @return An observable that proxies to `trueResult` or `falseResult`, depending on the result of the `condition` function. - */ -export function iif(condition: () => boolean, trueResult: ObservableInput, falseResult: ObservableInput): Observable { - return defer(() => (condition() ? trueResult : falseResult)); -} diff --git a/node_modules/rxjs/src/internal/observable/innerFrom.ts b/node_modules/rxjs/src/internal/observable/innerFrom.ts deleted file mode 100644 index c3852c1..0000000 --- a/node_modules/rxjs/src/internal/observable/innerFrom.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { isArrayLike } from '../util/isArrayLike'; -import { isPromise } from '../util/isPromise'; -import { Observable } from '../Observable'; -import { ObservableInput, ObservedValueOf, ReadableStreamLike } from '../types'; -import { isInteropObservable } from '../util/isInteropObservable'; -import { isAsyncIterable } from '../util/isAsyncIterable'; -import { createInvalidObservableTypeError } from '../util/throwUnobservableError'; -import { isIterable } from '../util/isIterable'; -import { isReadableStreamLike, readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike'; -import { Subscriber } from '../Subscriber'; -import { isFunction } from '../util/isFunction'; -import { reportUnhandledError } from '../util/reportUnhandledError'; -import { observable as Symbol_observable } from '../symbol/observable'; - -export function innerFrom>(input: O): Observable>; -export function innerFrom(input: ObservableInput): Observable { - if (input instanceof Observable) { - return input; - } - if (input != null) { - if (isInteropObservable(input)) { - return fromInteropObservable(input); - } - if (isArrayLike(input)) { - return fromArrayLike(input); - } - if (isPromise(input)) { - return fromPromise(input); - } - if (isAsyncIterable(input)) { - return fromAsyncIterable(input); - } - if (isIterable(input)) { - return fromIterable(input); - } - if (isReadableStreamLike(input)) { - return fromReadableStreamLike(input); - } - } - - throw createInvalidObservableTypeError(input); -} - -/** - * Creates an RxJS Observable from an object that implements `Symbol.observable`. - * @param obj An object that properly implements `Symbol.observable`. - */ -export function fromInteropObservable(obj: any) { - return new Observable((subscriber: Subscriber) => { - const obs = obj[Symbol_observable](); - if (isFunction(obs.subscribe)) { - return obs.subscribe(subscriber); - } - // Should be caught by observable subscribe function error handling. - throw new TypeError('Provided object does not correctly implement Symbol.observable'); - }); -} - -/** - * Synchronously emits the values of an array like and completes. - * This is exported because there are creation functions and operators that need to - * make direct use of the same logic, and there's no reason to make them run through - * `from` conditionals because we *know* they're dealing with an array. - * @param array The array to emit values from - */ -export function fromArrayLike(array: ArrayLike) { - return new Observable((subscriber: Subscriber) => { - // Loop over the array and emit each value. Note two things here: - // 1. We're making sure that the subscriber is not closed on each loop. - // This is so we don't continue looping over a very large array after - // something like a `take`, `takeWhile`, or other synchronous unsubscription - // has already unsubscribed. - // 2. In this form, reentrant code can alter that array we're looping over. - // This is a known issue, but considered an edge case. The alternative would - // be to copy the array before executing the loop, but this has - // performance implications. - for (let i = 0; i < array.length && !subscriber.closed; i++) { - subscriber.next(array[i]); - } - subscriber.complete(); - }); -} - -export function fromPromise(promise: PromiseLike) { - return new Observable((subscriber: Subscriber) => { - promise - .then( - (value) => { - if (!subscriber.closed) { - subscriber.next(value); - subscriber.complete(); - } - }, - (err: any) => subscriber.error(err) - ) - .then(null, reportUnhandledError); - }); -} - -export function fromIterable(iterable: Iterable) { - return new Observable((subscriber: Subscriber) => { - for (const value of iterable) { - subscriber.next(value); - if (subscriber.closed) { - return; - } - } - subscriber.complete(); - }); -} - -export function fromAsyncIterable(asyncIterable: AsyncIterable) { - return new Observable((subscriber: Subscriber) => { - process(asyncIterable, subscriber).catch((err) => subscriber.error(err)); - }); -} - -export function fromReadableStreamLike(readableStream: ReadableStreamLike) { - return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream)); -} - -async function process(asyncIterable: AsyncIterable, subscriber: Subscriber) { - for await (const value of asyncIterable) { - subscriber.next(value); - // A side-effect may have closed our subscriber, - // check before the next iteration. - if (subscriber.closed) { - return; - } - } - subscriber.complete(); -} diff --git a/node_modules/rxjs/src/internal/observable/interval.ts b/node_modules/rxjs/src/internal/observable/interval.ts deleted file mode 100644 index a21809b..0000000 --- a/node_modules/rxjs/src/internal/observable/interval.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { Observable } from '../Observable'; -import { asyncScheduler } from '../scheduler/async'; -import { SchedulerLike } from '../types'; -import { timer } from './timer'; - -/** - * Creates an Observable that emits sequential numbers every specified - * interval of time, on a specified {@link SchedulerLike}. - * - * Emits incremental numbers periodically in time. - * - * ![](interval.png) - * - * `interval` returns an Observable that emits an infinite sequence of - * ascending integers, with a constant interval of time of your choosing - * between those emissions. The first emission is not sent immediately, but - * only after the first period has passed. By default, this operator uses the - * `async` {@link SchedulerLike} to provide a notion of time, but you may pass any - * {@link SchedulerLike} to it. - * - * ## Example - * - * Emits ascending numbers, one every second (1000ms) up to the number 3 - * - * ```ts - * import { interval, take } from 'rxjs'; - * - * const numbers = interval(1000); - * - * const takeFourNumbers = numbers.pipe(take(4)); - * - * takeFourNumbers.subscribe(x => console.log('Next: ', x)); - * - * // Logs: - * // Next: 0 - * // Next: 1 - * // Next: 2 - * // Next: 3 - * ``` - * - * @see {@link timer} - * @see {@link delay} - * - * @param period The interval size in milliseconds (by default) or the time unit determined - * by the scheduler's clock. - * @param scheduler The {@link SchedulerLike} to use for scheduling the emission of values, - * and providing a notion of "time". - * @return An Observable that emits a sequential number each time interval. - */ -export function interval(period = 0, scheduler: SchedulerLike = asyncScheduler): Observable { - if (period < 0) { - // We cannot schedule an interval in the past. - period = 0; - } - - return timer(period, period, scheduler); -} diff --git a/node_modules/rxjs/src/internal/observable/merge.ts b/node_modules/rxjs/src/internal/observable/merge.ts deleted file mode 100644 index de8ac13..0000000 --- a/node_modules/rxjs/src/internal/observable/merge.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { Observable } from '../Observable'; -import { ObservableInput, ObservableInputTuple, SchedulerLike } from '../types'; -import { mergeAll } from '../operators/mergeAll'; -import { innerFrom } from './innerFrom'; -import { EMPTY } from './empty'; -import { popNumber, popScheduler } from '../util/args'; -import { from } from './from'; - -export function merge(...sources: [...ObservableInputTuple]): Observable; -export function merge(...sourcesAndConcurrency: [...ObservableInputTuple, number?]): Observable; -/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `mergeAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ -export function merge( - ...sourcesAndScheduler: [...ObservableInputTuple, SchedulerLike?] -): Observable; -/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `mergeAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ -export function merge( - ...sourcesAndConcurrencyAndScheduler: [...ObservableInputTuple, number?, SchedulerLike?] -): Observable; - -/** - * Creates an output Observable which concurrently emits all values from every - * given input Observable. - * - * Flattens multiple Observables together by blending - * their values into one Observable. - * - * ![](merge.png) - * - * `merge` subscribes to each given input Observable (as arguments), and simply - * forwards (without doing any transformation) all the values from all the input - * Observables to the output Observable. The output Observable only completes - * once all input Observables have completed. Any error delivered by an input - * Observable will be immediately emitted on the output Observable. - * - * ## Examples - * - * Merge together two Observables: 1s interval and clicks - * - * ```ts - * import { merge, fromEvent, interval } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const timer = interval(1000); - * const clicksOrTimer = merge(clicks, timer); - * clicksOrTimer.subscribe(x => console.log(x)); - * - * // Results in the following: - * // timer will emit ascending values, one every second(1000ms) to console - * // clicks logs MouseEvents to console every time the "document" is clicked - * // Since the two streams are merged you see these happening - * // as they occur. - * ``` - * - * Merge together 3 Observables, but run only 2 concurrently - * - * ```ts - * import { interval, take, merge } from 'rxjs'; - * - * const timer1 = interval(1000).pipe(take(10)); - * const timer2 = interval(2000).pipe(take(6)); - * const timer3 = interval(500).pipe(take(10)); - * - * const concurrent = 2; // the argument - * const merged = merge(timer1, timer2, timer3, concurrent); - * merged.subscribe(x => console.log(x)); - * - * // Results in the following: - * // - First timer1 and timer2 will run concurrently - * // - timer1 will emit a value every 1000ms for 10 iterations - * // - timer2 will emit a value every 2000ms for 6 iterations - * // - after timer1 hits its max iteration, timer2 will - * // continue, and timer3 will start to run concurrently with timer2 - * // - when timer2 hits its max iteration it terminates, and - * // timer3 will continue to emit a value every 500ms until it is complete - * ``` - * - * @see {@link mergeAll} - * @see {@link mergeMap} - * @see {@link mergeMapTo} - * @see {@link mergeScan} - * - * @param args `ObservableInput`s to merge together. If the last parameter - * is of type number, `merge` will use it to limit number of concurrently - * subscribed `ObservableInput`s. If the last parameter is {@link SchedulerLike}, - * it will be used for scheduling the emission of values. - * @return An Observable that emits items that are the result of every input Observable. - */ -export function merge(...args: (ObservableInput | number | SchedulerLike)[]): Observable { - const scheduler = popScheduler(args); - const concurrent = popNumber(args, Infinity); - const sources = args as ObservableInput[]; - return !sources.length - ? // No source provided - EMPTY - : sources.length === 1 - ? // One source? Just return it. - innerFrom(sources[0]) - : // Merge all sources - mergeAll(concurrent)(from(sources, scheduler)); -} diff --git a/node_modules/rxjs/src/internal/observable/never.ts b/node_modules/rxjs/src/internal/observable/never.ts deleted file mode 100644 index cfbec7d..0000000 --- a/node_modules/rxjs/src/internal/observable/never.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Observable } from '../Observable'; -import { noop } from '../util/noop'; - -/** - * An Observable that emits no items to the Observer and never completes. - * - * ![](never.png) - * - * A simple Observable that emits neither values nor errors nor the completion - * notification. It can be used for testing purposes or for composing with other - * Observables. Please note that by never emitting a complete notification, this - * Observable keeps the subscription from being disposed automatically. - * Subscriptions need to be manually disposed. - * - * ## Example - * - * Emit the number 7, then never emit anything else (not even complete) - * - * ```ts - * import { NEVER, startWith } from 'rxjs'; - * - * const info = () => console.log('Will not be called'); - * - * const result = NEVER.pipe(startWith(7)); - * result.subscribe({ - * next: x => console.log(x), - * error: info, - * complete: info - * }); - * ``` - * - * @see {@link Observable} - * @see {@link EMPTY} - * @see {@link of} - * @see {@link throwError} - */ -export const NEVER = new Observable(noop); - -/** - * @deprecated Replaced with the {@link NEVER} constant. Will be removed in v8. - */ -export function never() { - return NEVER; -} diff --git a/node_modules/rxjs/src/internal/observable/of.ts b/node_modules/rxjs/src/internal/observable/of.ts deleted file mode 100644 index a1c9357..0000000 --- a/node_modules/rxjs/src/internal/observable/of.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { SchedulerLike, ValueFromArray } from '../types'; -import { Observable } from '../Observable'; -import { popScheduler } from '../util/args'; -import { from } from './from'; - -// Devs are more likely to pass null or undefined than they are a scheduler -// without accompanying values. To make things easier for (naughty) devs who -// use the `strictNullChecks: false` TypeScript compiler option, these -// overloads with explicit null and undefined values are included. - -export function of(value: null): Observable; -export function of(value: undefined): Observable; - -/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled`. Details: https://rxjs.dev/deprecations/scheduler-argument */ -export function of(scheduler: SchedulerLike): Observable; -/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled`. Details: https://rxjs.dev/deprecations/scheduler-argument */ -export function of(...valuesAndScheduler: [...A, SchedulerLike]): Observable>; - -export function of(): Observable; -/** @deprecated Do not specify explicit type parameters. Signatures with type parameters that cannot be inferred will be removed in v8. */ -export function of(): Observable; -export function of(value: T): Observable; -export function of(...values: A): Observable>; - -/** - * Converts the arguments to an observable sequence. - * - * Each argument becomes a `next` notification. - * - * ![](of.png) - * - * Unlike {@link from}, it does not do any flattening and emits each argument in whole - * as a separate `next` notification. - * - * ## Examples - * - * Emit the values `10, 20, 30` - * - * ```ts - * import { of } from 'rxjs'; - * - * of(10, 20, 30) - * .subscribe({ - * next: value => console.log('next:', value), - * error: err => console.log('error:', err), - * complete: () => console.log('the end'), - * }); - * - * // Outputs - * // next: 10 - * // next: 20 - * // next: 30 - * // the end - * ``` - * - * Emit the array `[1, 2, 3]` - * - * ```ts - * import { of } from 'rxjs'; - * - * of([1, 2, 3]) - * .subscribe({ - * next: value => console.log('next:', value), - * error: err => console.log('error:', err), - * complete: () => console.log('the end'), - * }); - * - * // Outputs - * // next: [1, 2, 3] - * // the end - * ``` - * - * @see {@link from} - * @see {@link range} - * - * @param args A comma separated list of arguments you want to be emitted. - * @return An Observable that synchronously emits the arguments described - * above and then immediately completes. - */ -export function of(...args: Array): Observable { - const scheduler = popScheduler(args); - return from(args as T[], scheduler); -} diff --git a/node_modules/rxjs/src/internal/observable/onErrorResumeNext.ts b/node_modules/rxjs/src/internal/observable/onErrorResumeNext.ts deleted file mode 100644 index d2133ea..0000000 --- a/node_modules/rxjs/src/internal/observable/onErrorResumeNext.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { Observable } from '../Observable'; -import { ObservableInputTuple } from '../types'; -import { argsOrArgArray } from '../util/argsOrArgArray'; -import { OperatorSubscriber } from '../operators/OperatorSubscriber'; -import { noop } from '../util/noop'; -import { innerFrom } from './innerFrom'; - -export function onErrorResumeNext(sources: [...ObservableInputTuple]): Observable; -export function onErrorResumeNext(...sources: [...ObservableInputTuple]): Observable; - -/** - * When any of the provided Observable emits a complete or an error notification, it immediately subscribes to the next one - * that was passed. - * - * Execute series of Observables no matter what, even if it means swallowing errors. - * - * ![](onErrorResumeNext.png) - * - * `onErrorResumeNext` will subscribe to each observable source it is provided, in order. - * If the source it's subscribed to emits an error or completes, it will move to the next source - * without error. - * - * If `onErrorResumeNext` is provided no arguments, or a single, empty array, it will return {@link EMPTY}. - * - * `onErrorResumeNext` is basically {@link concat}, only it will continue, even if one of its - * sources emits an error. - * - * Note that there is no way to handle any errors thrown by sources via the result of - * `onErrorResumeNext`. If you want to handle errors thrown in any given source, you can - * always use the {@link catchError} operator on them before passing them into `onErrorResumeNext`. - * - * ## Example - * - * Subscribe to the next Observable after map fails - * - * ```ts - * import { onErrorResumeNext, of, map } from 'rxjs'; - * - * onErrorResumeNext( - * of(1, 2, 3, 0).pipe( - * map(x => { - * if (x === 0) { - * throw Error(); - * } - * return 10 / x; - * }) - * ), - * of(1, 2, 3) - * ) - * .subscribe({ - * next: value => console.log(value), - * error: err => console.log(err), // Will never be called. - * complete: () => console.log('done') - * }); - * - * // Logs: - * // 10 - * // 5 - * // 3.3333333333333335 - * // 1 - * // 2 - * // 3 - * // 'done' - * ``` - * - * @see {@link concat} - * @see {@link catchError} - * - * @param sources `ObservableInput`s passed either directly or as an array. - * @return An Observable that concatenates all sources, one after the other, - * ignoring all errors, such that any error causes it to move on to the next source. - */ -export function onErrorResumeNext( - ...sources: [[...ObservableInputTuple]] | [...ObservableInputTuple] -): Observable { - const nextSources: ObservableInputTuple = argsOrArgArray(sources) as any; - - return new Observable((subscriber) => { - let sourceIndex = 0; - const subscribeNext = () => { - if (sourceIndex < nextSources.length) { - let nextSource: Observable; - try { - nextSource = innerFrom(nextSources[sourceIndex++]); - } catch (err) { - subscribeNext(); - return; - } - const innerSubscriber = new OperatorSubscriber(subscriber, undefined, noop, noop); - nextSource.subscribe(innerSubscriber); - innerSubscriber.add(subscribeNext); - } else { - subscriber.complete(); - } - }; - subscribeNext(); - }); -} diff --git a/node_modules/rxjs/src/internal/observable/pairs.ts b/node_modules/rxjs/src/internal/observable/pairs.ts deleted file mode 100644 index ca4d7f0..0000000 --- a/node_modules/rxjs/src/internal/observable/pairs.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { Observable } from '../Observable'; -import { SchedulerLike } from '../types'; -import { from } from './from'; - -/** - * @deprecated Use `from(Object.entries(obj))` instead. Will be removed in v8. - */ -export function pairs(arr: readonly T[], scheduler?: SchedulerLike): Observable<[string, T]>; -/** - * @deprecated Use `from(Object.entries(obj))` instead. Will be removed in v8. - */ -export function pairs>(obj: O, scheduler?: SchedulerLike): Observable<[keyof O, O[keyof O]]>; -/** - * @deprecated Use `from(Object.entries(obj))` instead. Will be removed in v8. - */ -export function pairs(iterable: Iterable, scheduler?: SchedulerLike): Observable<[string, T]>; -/** - * @deprecated Use `from(Object.entries(obj))` instead. Will be removed in v8. - */ -export function pairs( - n: number | bigint | boolean | ((...args: any[]) => any) | symbol, - scheduler?: SchedulerLike -): Observable<[never, never]>; - -/** - * Convert an object into an Observable of `[key, value]` pairs. - * - * Turn entries of an object into a stream. - * - * ![](pairs.png) - * - * `pairs` takes an arbitrary object and returns an Observable that emits arrays. Each - * emitted array has exactly two elements - the first is a key from the object - * and the second is a value corresponding to that key. Keys are extracted from - * an object via `Object.keys` function, which means that they will be only - * enumerable keys that are present on an object directly - not ones inherited - * via prototype chain. - * - * By default, these arrays are emitted synchronously. To change that you can - * pass a {@link SchedulerLike} as a second argument to `pairs`. - * - * ## Example - * - * Converts an object to an Observable - * - * ```ts - * import { pairs } from 'rxjs'; - * - * const obj = { - * foo: 42, - * bar: 56, - * baz: 78 - * }; - * - * pairs(obj).subscribe({ - * next: value => console.log(value), - * complete: () => console.log('Complete!') - * }); - * - * // Logs: - * // ['foo', 42] - * // ['bar', 56] - * // ['baz', 78] - * // 'Complete!' - * ``` - * - * ### Object.entries required - * - * In IE, you will need to polyfill `Object.entries` in order to use this. - * [MDN has a polyfill here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries) - * - * @param obj The object to inspect and turn into an Observable sequence. - * @param scheduler An optional IScheduler to schedule when resulting - * Observable will emit values. - * @returns An observable sequence of [key, value] pairs from the object. - * @deprecated Use `from(Object.entries(obj))` instead. Will be removed in v8. - */ -export function pairs(obj: any, scheduler?: SchedulerLike) { - return from(Object.entries(obj), scheduler as any); -} diff --git a/node_modules/rxjs/src/internal/observable/partition.ts b/node_modules/rxjs/src/internal/observable/partition.ts deleted file mode 100644 index 34a61a1..0000000 --- a/node_modules/rxjs/src/internal/observable/partition.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { not } from '../util/not'; -import { filter } from '../operators/filter'; -import { ObservableInput } from '../types'; -import { Observable } from '../Observable'; -import { innerFrom } from './innerFrom'; - -/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ -export function partition( - source: ObservableInput, - predicate: (this: A, value: T, index: number) => value is U, - thisArg: A -): [Observable, Observable>]; -export function partition( - source: ObservableInput, - predicate: (value: T, index: number) => value is U -): [Observable, Observable>]; - -/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ -export function partition( - source: ObservableInput, - predicate: (this: A, value: T, index: number) => boolean, - thisArg: A -): [Observable, Observable]; -export function partition(source: ObservableInput, predicate: (value: T, index: number) => boolean): [Observable, Observable]; - -/** - * Splits the source Observable into two, one with values that satisfy a - * predicate, and another with values that don't satisfy the predicate. - * - * It's like {@link filter}, but returns two Observables: - * one like the output of {@link filter}, and the other with values that did not - * pass the condition. - * - * ![](partition.png) - * - * `partition` outputs an array with two Observables that partition the values - * from the source Observable through the given `predicate` function. The first - * Observable in that array emits source values for which the predicate argument - * returns true. The second Observable emits source values for which the - * predicate returns false. The first behaves like {@link filter} and the second - * behaves like {@link filter} with the predicate negated. - * - * ## Example - * - * Partition a set of numbers into odds and evens observables - * - * ```ts - * import { of, partition } from 'rxjs'; - * - * const observableValues = of(1, 2, 3, 4, 5, 6); - * const [evens$, odds$] = partition(observableValues, value => value % 2 === 0); - * - * odds$.subscribe(x => console.log('odds', x)); - * evens$.subscribe(x => console.log('evens', x)); - * - * // Logs: - * // odds 1 - * // odds 3 - * // odds 5 - * // evens 2 - * // evens 4 - * // evens 6 - * ``` - * - * @see {@link filter} - * - * @param source The source `ObservableInput` that will be split into a tuple of - * two Observable elements. - * @param predicate A function that evaluates each value emitted by the source - * Observable. If it returns `true`, the value is emitted on the first Observable - * in the returned array, if `false` the value is emitted on the second Observable - * in the array. The `index` parameter is the number `i` for the i-th source - * emission that has happened since the subscription, starting from the number `0`. - * @param thisArg An optional argument to determine the value of `this` in the - * `predicate` function. - * @return An array with two Observables: one with values that passed the - * predicate, and another with values that did not pass the predicate. - */ -export function partition( - source: ObservableInput, - predicate: (this: any, value: T, index: number) => boolean, - thisArg?: any -): [Observable, Observable] { - return [filter(predicate, thisArg)(innerFrom(source)), filter(not(predicate, thisArg))(innerFrom(source))] as [ - Observable, - Observable - ]; -} diff --git a/node_modules/rxjs/src/internal/observable/race.ts b/node_modules/rxjs/src/internal/observable/race.ts deleted file mode 100644 index d87293f..0000000 --- a/node_modules/rxjs/src/internal/observable/race.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { Observable } from '../Observable'; -import { innerFrom } from './innerFrom'; -import { Subscription } from '../Subscription'; -import { ObservableInput, ObservableInputTuple } from '../types'; -import { argsOrArgArray } from '../util/argsOrArgArray'; -import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; -import { Subscriber } from '../Subscriber'; - -export function race(inputs: [...ObservableInputTuple]): Observable; -export function race(...inputs: [...ObservableInputTuple]): Observable; - -/** - * Returns an observable that mirrors the first source observable to emit an item. - * - * ![](race.png) - * - * `race` returns an observable, that when subscribed to, subscribes to all source observables immediately. - * As soon as one of the source observables emits a value, the result unsubscribes from the other sources. - * The resulting observable will forward all notifications, including error and completion, from the "winning" - * source observable. - * - * If one of the used source observable throws an errors before a first notification - * the race operator will also throw an error, no matter if another source observable - * could potentially win the race. - * - * `race` can be useful for selecting the response from the fastest network connection for - * HTTP or WebSockets. `race` can also be useful for switching observable context based on user - * input. - * - * ## Example - * - * Subscribes to the observable that was the first to start emitting. - * - * ```ts - * import { interval, map, race } from 'rxjs'; - * - * const obs1 = interval(7000).pipe(map(() => 'slow one')); - * const obs2 = interval(3000).pipe(map(() => 'fast one')); - * const obs3 = interval(5000).pipe(map(() => 'medium one')); - * - * race(obs1, obs2, obs3) - * .subscribe(winner => console.log(winner)); - * - * // Outputs - * // a series of 'fast one' - * ``` - * - * @param sources Used to race for which `ObservableInput` emits first. - * @return An Observable that mirrors the output of the first Observable to emit an item. - */ -export function race(...sources: (ObservableInput | ObservableInput[])[]): Observable { - sources = argsOrArgArray(sources); - // If only one source was passed, just return it. Otherwise return the race. - return sources.length === 1 ? innerFrom(sources[0] as ObservableInput) : new Observable(raceInit(sources as ObservableInput[])); -} - -/** - * An observable initializer function for both the static version and the - * operator version of race. - * @param sources The sources to race - */ -export function raceInit(sources: ObservableInput[]) { - return (subscriber: Subscriber) => { - let subscriptions: Subscription[] = []; - - // Subscribe to all of the sources. Note that we are checking `subscriptions` here - // Is is an array of all actively "racing" subscriptions, and it is `null` after the - // race has been won. So, if we have racer that synchronously "wins", this loop will - // stop before it subscribes to any more. - for (let i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) { - subscriptions.push( - innerFrom(sources[i] as ObservableInput).subscribe( - createOperatorSubscriber(subscriber, (value) => { - if (subscriptions) { - // We're still racing, but we won! So unsubscribe - // all other subscriptions that we have, except this one. - for (let s = 0; s < subscriptions.length; s++) { - s !== i && subscriptions[s].unsubscribe(); - } - subscriptions = null!; - } - subscriber.next(value); - }) - ) - ); - } - }; -} diff --git a/node_modules/rxjs/src/internal/observable/range.ts b/node_modules/rxjs/src/internal/observable/range.ts deleted file mode 100644 index cfc82cf..0000000 --- a/node_modules/rxjs/src/internal/observable/range.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { SchedulerLike } from '../types'; -import { Observable } from '../Observable'; -import { EMPTY } from './empty'; - -export function range(start: number, count?: number): Observable; - -/** - * @deprecated The `scheduler` parameter will be removed in v8. Use `range(start, count).pipe(observeOn(scheduler))` instead. Details: Details: https://rxjs.dev/deprecations/scheduler-argument - */ -export function range(start: number, count: number | undefined, scheduler: SchedulerLike): Observable; - -/** - * Creates an Observable that emits a sequence of numbers within a specified - * range. - * - * Emits a sequence of numbers in a range. - * - * ![](range.png) - * - * `range` operator emits a range of sequential integers, in order, where you - * select the `start` of the range and its `length`. By default, uses no - * {@link SchedulerLike} and just delivers the notifications synchronously, but may use - * an optional {@link SchedulerLike} to regulate those deliveries. - * - * ## Example - * - * Produce a range of numbers - * - * ```ts - * import { range } from 'rxjs'; - * - * const numbers = range(1, 3); - * - * numbers.subscribe({ - * next: value => console.log(value), - * complete: () => console.log('Complete!') - * }); - * - * // Logs: - * // 1 - * // 2 - * // 3 - * // 'Complete!' - * ``` - * - * @see {@link timer} - * @see {@link interval} - * - * @param start The value of the first integer in the sequence. - * @param count The number of sequential integers to generate. - * @param scheduler A {@link SchedulerLike} to use for scheduling the emissions - * of the notifications. - * @return An Observable of numbers that emits a finite range of sequential integers. - */ -export function range(start: number, count?: number, scheduler?: SchedulerLike): Observable { - if (count == null) { - // If one argument was passed, it's the count, not the start. - count = start; - start = 0; - } - - if (count <= 0) { - // No count? We're going nowhere. Return EMPTY. - return EMPTY; - } - - // Where the range should stop. - const end = count + start; - - return new Observable( - scheduler - ? // The deprecated scheduled path. - (subscriber) => { - let n = start; - return scheduler.schedule(function () { - if (n < end) { - subscriber.next(n++); - this.schedule(); - } else { - subscriber.complete(); - } - }); - } - : // Standard synchronous range. - (subscriber) => { - let n = start; - while (n < end && !subscriber.closed) { - subscriber.next(n++); - } - subscriber.complete(); - } - ); -} diff --git a/node_modules/rxjs/src/internal/observable/throwError.ts b/node_modules/rxjs/src/internal/observable/throwError.ts deleted file mode 100644 index a307f5a..0000000 --- a/node_modules/rxjs/src/internal/observable/throwError.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { Observable } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { SchedulerLike } from '../types'; -import { isFunction } from '../util/isFunction'; - -/** - * Creates an observable that will create an error instance and push it to the consumer as an error - * immediately upon subscription. - * - * Just errors and does nothing else - * - * ![](throw.png) - * - * This creation function is useful for creating an observable that will create an error and error every - * time it is subscribed to. Generally, inside of most operators when you might want to return an errored - * observable, this is unnecessary. In most cases, such as in the inner return of {@link concatMap}, - * {@link mergeMap}, {@link defer}, and many others, you can simply throw the error, and RxJS will pick - * that up and notify the consumer of the error. - * - * ## Example - * - * Create a simple observable that will create a new error with a timestamp and log it - * and the message every time you subscribe to it - * - * ```ts - * import { throwError } from 'rxjs'; - * - * let errorCount = 0; - * - * const errorWithTimestamp$ = throwError(() => { - * const error: any = new Error(`This is error number ${ ++errorCount }`); - * error.timestamp = Date.now(); - * return error; - * }); - * - * errorWithTimestamp$.subscribe({ - * error: err => console.log(err.timestamp, err.message) - * }); - * - * errorWithTimestamp$.subscribe({ - * error: err => console.log(err.timestamp, err.message) - * }); - * - * // Logs the timestamp and a new error message for each subscription - * ``` - * - * ### Unnecessary usage - * - * Using `throwError` inside of an operator or creation function - * with a callback, is usually not necessary - * - * ```ts - * import { of, concatMap, timer, throwError } from 'rxjs'; - * - * const delays$ = of(1000, 2000, Infinity, 3000); - * - * delays$.pipe( - * concatMap(ms => { - * if (ms < 10000) { - * return timer(ms); - * } else { - * // This is probably overkill. - * return throwError(() => new Error(`Invalid time ${ ms }`)); - * } - * }) - * ) - * .subscribe({ - * next: console.log, - * error: console.error - * }); - * ``` - * - * You can just throw the error instead - * - * ```ts - * import { of, concatMap, timer } from 'rxjs'; - * - * const delays$ = of(1000, 2000, Infinity, 3000); - * - * delays$.pipe( - * concatMap(ms => { - * if (ms < 10000) { - * return timer(ms); - * } else { - * // Cleaner and easier to read for most folks. - * throw new Error(`Invalid time ${ ms }`); - * } - * }) - * ) - * .subscribe({ - * next: console.log, - * error: console.error - * }); - * ``` - * - * @param errorFactory A factory function that will create the error instance that is pushed. - */ -export function throwError(errorFactory: () => any): Observable; - -/** - * Returns an observable that will error with the specified error immediately upon subscription. - * - * @param error The error instance to emit - * @deprecated Support for passing an error value will be removed in v8. Instead, pass a factory function to `throwError(() => new Error('test'))`. This is - * because it will create the error at the moment it should be created and capture a more appropriate stack trace. If - * for some reason you need to create the error ahead of time, you can still do that: `const err = new Error('test'); throwError(() => err);`. - */ -export function throwError(error: any): Observable; - -/** - * Notifies the consumer of an error using a given scheduler by scheduling it at delay `0` upon subscription. - * - * @param errorOrErrorFactory An error instance or error factory - * @param scheduler A scheduler to use to schedule the error notification - * @deprecated The `scheduler` parameter will be removed in v8. - * Use `throwError` in combination with {@link observeOn}: `throwError(() => new Error('test')).pipe(observeOn(scheduler));`. - * Details: https://rxjs.dev/deprecations/scheduler-argument - */ -export function throwError(errorOrErrorFactory: any, scheduler: SchedulerLike): Observable; - -export function throwError(errorOrErrorFactory: any, scheduler?: SchedulerLike): Observable { - const errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : () => errorOrErrorFactory; - const init = (subscriber: Subscriber) => subscriber.error(errorFactory()); - return new Observable(scheduler ? (subscriber) => scheduler.schedule(init as any, 0, subscriber) : init); -} diff --git a/node_modules/rxjs/src/internal/observable/timer.ts b/node_modules/rxjs/src/internal/observable/timer.ts deleted file mode 100644 index dcc2745..0000000 --- a/node_modules/rxjs/src/internal/observable/timer.ts +++ /dev/null @@ -1,186 +0,0 @@ -import { Observable } from '../Observable'; -import { SchedulerLike } from '../types'; -import { async as asyncScheduler } from '../scheduler/async'; -import { isScheduler } from '../util/isScheduler'; -import { isValidDate } from '../util/isDate'; - -/** - * Creates an observable that will wait for a specified time period, or exact date, before - * emitting the number 0. - * - * Used to emit a notification after a delay. - * - * This observable is useful for creating delays in code, or racing against other values - * for ad-hoc timeouts. - * - * The `delay` is specified by default in milliseconds, however providing a custom scheduler could - * create a different behavior. - * - * ## Examples - * - * Wait 3 seconds and start another observable - * - * You might want to use `timer` to delay subscription to an - * observable by a set amount of time. Here we use a timer with - * {@link concatMapTo} or {@link concatMap} in order to wait - * a few seconds and start a subscription to a source. - * - * ```ts - * import { of, timer, concatMap } from 'rxjs'; - * - * // This could be any observable - * const source = of(1, 2, 3); - * - * timer(3000) - * .pipe(concatMap(() => source)) - * .subscribe(console.log); - * ``` - * - * Take all values until the start of the next minute - * - * Using a `Date` as the trigger for the first emission, you can - * do things like wait until midnight to fire an event, or in this case, - * wait until a new minute starts (chosen so the example wouldn't take - * too long to run) in order to stop watching a stream. Leveraging - * {@link takeUntil}. - * - * ```ts - * import { interval, takeUntil, timer } from 'rxjs'; - * - * // Build a Date object that marks the - * // next minute. - * const currentDate = new Date(); - * const startOfNextMinute = new Date( - * currentDate.getFullYear(), - * currentDate.getMonth(), - * currentDate.getDate(), - * currentDate.getHours(), - * currentDate.getMinutes() + 1 - * ); - * - * // This could be any observable stream - * const source = interval(1000); - * - * const result = source.pipe( - * takeUntil(timer(startOfNextMinute)) - * ); - * - * result.subscribe(console.log); - * ``` - * - * ### Known Limitations - * - * - The {@link asyncScheduler} uses `setTimeout` which has limitations for how far in the future it can be scheduled. - * - * - If a `scheduler` is provided that returns a timestamp other than an epoch from `now()`, and - * a `Date` object is passed to the `dueTime` argument, the calculation for when the first emission - * should occur will be incorrect. In this case, it would be best to do your own calculations - * ahead of time, and pass a `number` in as the `dueTime`. - * - * @param due If a `number`, the amount of time in milliseconds to wait before emitting. - * If a `Date`, the exact time at which to emit. - * @param scheduler The scheduler to use to schedule the delay. Defaults to {@link asyncScheduler}. - */ -export function timer(due: number | Date, scheduler?: SchedulerLike): Observable<0>; - -/** - * Creates an observable that starts an interval after a specified delay, emitting incrementing numbers -- starting at `0` -- - * on each interval after words. - * - * The `delay` and `intervalDuration` are specified by default in milliseconds, however providing a custom scheduler could - * create a different behavior. - * - * ## Example - * - * ### Start an interval that starts right away - * - * Since {@link interval} waits for the passed delay before starting, - * sometimes that's not ideal. You may want to start an interval immediately. - * `timer` works well for this. Here we have both side-by-side so you can - * see them in comparison. - * - * Note that this observable will never complete. - * - * ```ts - * import { timer, interval } from 'rxjs'; - * - * timer(0, 1000).subscribe(n => console.log('timer', n)); - * interval(1000).subscribe(n => console.log('interval', n)); - * ``` - * - * ### Known Limitations - * - * - The {@link asyncScheduler} uses `setTimeout` which has limitations for how far in the future it can be scheduled. - * - * - If a `scheduler` is provided that returns a timestamp other than an epoch from `now()`, and - * a `Date` object is passed to the `dueTime` argument, the calculation for when the first emission - * should occur will be incorrect. In this case, it would be best to do your own calculations - * ahead of time, and pass a `number` in as the `startDue`. - * @param startDue If a `number`, is the time to wait before starting the interval. - * If a `Date`, is the exact time at which to start the interval. - * @param intervalDuration The delay between each value emitted in the interval. Passing a - * negative number here will result in immediate completion after the first value is emitted, as though - * no `intervalDuration` was passed at all. - * @param scheduler The scheduler to use to schedule the delay. Defaults to {@link asyncScheduler}. - */ -export function timer(startDue: number | Date, intervalDuration: number, scheduler?: SchedulerLike): Observable; - -/** - * @deprecated The signature allowing `undefined` to be passed for `intervalDuration` will be removed in v8. Use the `timer(dueTime, scheduler?)` signature instead. - */ -export function timer(dueTime: number | Date, unused: undefined, scheduler?: SchedulerLike): Observable<0>; - -export function timer( - dueTime: number | Date = 0, - intervalOrScheduler?: number | SchedulerLike, - scheduler: SchedulerLike = asyncScheduler -): Observable { - // Since negative intervalDuration is treated as though no - // interval was specified at all, we start with a negative number. - let intervalDuration = -1; - - if (intervalOrScheduler != null) { - // If we have a second argument, and it's a scheduler, - // override the scheduler we had defaulted. Otherwise, - // it must be an interval. - if (isScheduler(intervalOrScheduler)) { - scheduler = intervalOrScheduler; - } else { - // Note that this *could* be negative, in which case - // it's like not passing an intervalDuration at all. - intervalDuration = intervalOrScheduler; - } - } - - return new Observable((subscriber) => { - // If a valid date is passed, calculate how long to wait before - // executing the first value... otherwise, if it's a number just schedule - // that many milliseconds (or scheduler-specified unit size) in the future. - let due = isValidDate(dueTime) ? +dueTime - scheduler!.now() : dueTime; - - if (due < 0) { - // Ensure we don't schedule in the future. - due = 0; - } - - // The incrementing value we emit. - let n = 0; - - // Start the timer. - return scheduler.schedule(function () { - if (!subscriber.closed) { - // Emit the next value and increment. - subscriber.next(n++); - - if (0 <= intervalDuration) { - // If we have a interval after the initial timer, - // reschedule with the period. - this.schedule(undefined, intervalDuration); - } else { - // We didn't have an interval. So just complete. - subscriber.complete(); - } - } - }, due); - }); -} diff --git a/node_modules/rxjs/src/internal/observable/using.ts b/node_modules/rxjs/src/internal/observable/using.ts deleted file mode 100644 index e95b1f0..0000000 --- a/node_modules/rxjs/src/internal/observable/using.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { Observable } from '../Observable'; -import { Unsubscribable, ObservableInput, ObservedValueOf } from '../types'; -import { innerFrom } from './innerFrom'; -import { EMPTY } from './empty'; - -/** - * Creates an Observable that uses a resource which will be disposed at the same time as the Observable. - * - * Use it when you catch yourself cleaning up after an Observable. - * - * `using` is a factory operator, which accepts two functions. First function returns a disposable resource. - * It can be an arbitrary object that implements `unsubscribe` method. Second function will be injected with - * that object and should return an Observable. That Observable can use resource object during its execution. - * Both functions passed to `using` will be called every time someone subscribes - neither an Observable nor - * resource object will be shared in any way between subscriptions. - * - * When Observable returned by `using` is subscribed, Observable returned from the second function will be subscribed - * as well. All its notifications (nexted values, completion and error events) will be emitted unchanged by the output - * Observable. If however someone unsubscribes from the Observable or source Observable completes or errors by itself, - * the `unsubscribe` method on resource object will be called. This can be used to do any necessary clean up, which - * otherwise would have to be handled by hand. Note that complete or error notifications are not emitted when someone - * cancels subscription to an Observable via `unsubscribe`, so `using` can be used as a hook, allowing you to make - * sure that all resources which need to exist during an Observable execution will be disposed at appropriate time. - * - * @see {@link defer} - * - * @param resourceFactory A function which creates any resource object that implements `unsubscribe` method. - * @param observableFactory A function which creates an Observable, that can use injected resource object. - * @return An Observable that behaves the same as Observable returned by `observableFactory`, but - * which - when completed, errored or unsubscribed - will also call `unsubscribe` on created resource object. - */ -export function using>( - resourceFactory: () => Unsubscribable | void, - observableFactory: (resource: Unsubscribable | void) => T | void -): Observable> { - return new Observable>((subscriber) => { - const resource = resourceFactory(); - const result = observableFactory(resource); - const source = result ? innerFrom(result) : EMPTY; - source.subscribe(subscriber); - return () => { - // NOTE: Optional chaining did not work here. - // Related TS Issue: https://github.com/microsoft/TypeScript/issues/40818 - if (resource) { - resource.unsubscribe(); - } - }; - }); -} diff --git a/node_modules/rxjs/src/internal/observable/zip.ts b/node_modules/rxjs/src/internal/observable/zip.ts deleted file mode 100644 index d6d2adf..0000000 --- a/node_modules/rxjs/src/internal/observable/zip.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { Observable } from '../Observable'; -import { ObservableInputTuple } from '../types'; -import { innerFrom } from './innerFrom'; -import { argsOrArgArray } from '../util/argsOrArgArray'; -import { EMPTY } from './empty'; -import { createOperatorSubscriber } from '../operators/OperatorSubscriber'; -import { popResultSelector } from '../util/args'; - -export function zip(sources: [...ObservableInputTuple]): Observable; -export function zip( - sources: [...ObservableInputTuple], - resultSelector: (...values: A) => R -): Observable; -export function zip(...sources: [...ObservableInputTuple]): Observable; -export function zip( - ...sourcesAndResultSelector: [...ObservableInputTuple, (...values: A) => R] -): Observable; - -/** - * Combines multiple Observables to create an Observable whose values are calculated from the values, in order, of each - * of its input Observables. - * - * If the last parameter is a function, this function is used to compute the created value from the input values. - * Otherwise, an array of the input values is returned. - * - * ## Example - * - * Combine age and name from different sources - * - * ```ts - * import { of, zip, map } from 'rxjs'; - * - * const age$ = of(27, 25, 29); - * const name$ = of('Foo', 'Bar', 'Beer'); - * const isDev$ = of(true, true, false); - * - * zip(age$, name$, isDev$).pipe( - * map(([age, name, isDev]) => ({ age, name, isDev })) - * ) - * .subscribe(x => console.log(x)); - * - * // Outputs - * // { age: 27, name: 'Foo', isDev: true } - * // { age: 25, name: 'Bar', isDev: true } - * // { age: 29, name: 'Beer', isDev: false } - * ``` - * - * @param args Any number of `ObservableInput`s provided either as an array or as an object - * to combine with each other. - * @return An Observable of array values of the values emitted at the same index from each - * individual `ObservableInput`. - */ -export function zip(...args: unknown[]): Observable { - const resultSelector = popResultSelector(args); - - const sources = argsOrArgArray(args) as Observable[]; - - return sources.length - ? new Observable((subscriber) => { - // A collection of buffers of values from each source. - // Keyed by the same index with which the sources were passed in. - let buffers: unknown[][] = sources.map(() => []); - - // An array of flags of whether or not the sources have completed. - // This is used to check to see if we should complete the result. - // Keyed by the same index with which the sources were passed in. - let completed = sources.map(() => false); - - // When everything is done, release the arrays above. - subscriber.add(() => { - buffers = completed = null!; - }); - - // Loop over our sources and subscribe to each one. The index `i` is - // especially important here, because we use it in closures below to - // access the related buffers and completion properties - for (let sourceIndex = 0; !subscriber.closed && sourceIndex < sources.length; sourceIndex++) { - innerFrom(sources[sourceIndex]).subscribe( - createOperatorSubscriber( - subscriber, - (value) => { - buffers[sourceIndex].push(value); - // if every buffer has at least one value in it, then we - // can shift out the oldest value from each buffer and emit - // them as an array. - if (buffers.every((buffer) => buffer.length)) { - const result: any = buffers.map((buffer) => buffer.shift()!); - // Emit the array. If theres' a result selector, use that. - subscriber.next(resultSelector ? resultSelector(...result) : result); - // If any one of the sources is both complete and has an empty buffer - // then we complete the result. This is because we cannot possibly have - // any more values to zip together. - if (buffers.some((buffer, i) => !buffer.length && completed[i])) { - subscriber.complete(); - } - } - }, - () => { - // This source completed. Mark it as complete so we can check it later - // if we have to. - completed[sourceIndex] = true; - // But, if this complete source has nothing in its buffer, then we - // can complete the result, because we can't possibly have any more - // values from this to zip together with the other values. - !buffers[sourceIndex].length && subscriber.complete(); - } - ) - ); - } - - // When everything is done, release the arrays above. - return () => { - buffers = completed = null!; - }; - }) - : EMPTY; -} diff --git a/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts b/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts deleted file mode 100644 index 593b937..0000000 --- a/node_modules/rxjs/src/internal/operators/OperatorSubscriber.ts +++ /dev/null @@ -1,112 +0,0 @@ -import { Subscriber } from '../Subscriber'; - -/** - * Creates an instance of an `OperatorSubscriber`. - * @param destination The downstream subscriber. - * @param onNext Handles next values, only called if this subscriber is not stopped or closed. Any - * error that occurs in this function is caught and sent to the `error` method of this subscriber. - * @param onError Handles errors from the subscription, any errors that occur in this handler are caught - * and send to the `destination` error handler. - * @param onComplete Handles completion notification from the subscription. Any errors that occur in - * this handler are sent to the `destination` error handler. - * @param onFinalize Additional teardown logic here. This will only be called on teardown if the - * subscriber itself is not already closed. This is called after all other teardown logic is executed. - */ -export function createOperatorSubscriber( - destination: Subscriber, - onNext?: (value: T) => void, - onComplete?: () => void, - onError?: (err: any) => void, - onFinalize?: () => void -): Subscriber { - return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize); -} - -/** - * A generic helper for allowing operators to be created with a Subscriber and - * use closures to capture necessary state from the operator function itself. - */ -export class OperatorSubscriber extends Subscriber { - /** - * Creates an instance of an `OperatorSubscriber`. - * @param destination The downstream subscriber. - * @param onNext Handles next values, only called if this subscriber is not stopped or closed. Any - * error that occurs in this function is caught and sent to the `error` method of this subscriber. - * @param onError Handles errors from the subscription, any errors that occur in this handler are caught - * and send to the `destination` error handler. - * @param onComplete Handles completion notification from the subscription. Any errors that occur in - * this handler are sent to the `destination` error handler. - * @param onFinalize Additional finalization logic here. This will only be called on finalization if the - * subscriber itself is not already closed. This is called after all other finalization logic is executed. - * @param shouldUnsubscribe An optional check to see if an unsubscribe call should truly unsubscribe. - * NOTE: This currently **ONLY** exists to support the strange behavior of {@link groupBy}, where unsubscription - * to the resulting observable does not actually disconnect from the source if there are active subscriptions - * to any grouped observable. (DO NOT EXPOSE OR USE EXTERNALLY!!!) - */ - constructor( - destination: Subscriber, - onNext?: (value: T) => void, - onComplete?: () => void, - onError?: (err: any) => void, - private onFinalize?: () => void, - private shouldUnsubscribe?: () => boolean - ) { - // It's important - for performance reasons - that all of this class's - // members are initialized and that they are always initialized in the same - // order. This will ensure that all OperatorSubscriber instances have the - // same hidden class in V8. This, in turn, will help keep the number of - // hidden classes involved in property accesses within the base class as - // low as possible. If the number of hidden classes involved exceeds four, - // the property accesses will become megamorphic and performance penalties - // will be incurred - i.e. inline caches won't be used. - // - // The reasons for ensuring all instances have the same hidden class are - // further discussed in this blog post from Benedikt Meurer: - // https://benediktmeurer.de/2018/03/23/impact-of-polymorphism-on-component-based-frameworks-like-react/ - super(destination); - this._next = onNext - ? function (this: OperatorSubscriber, value: T) { - try { - onNext(value); - } catch (err) { - destination.error(err); - } - } - : super._next; - this._error = onError - ? function (this: OperatorSubscriber, err: any) { - try { - onError(err); - } catch (err) { - // Send any errors that occur down stream. - destination.error(err); - } finally { - // Ensure finalization. - this.unsubscribe(); - } - } - : super._error; - this._complete = onComplete - ? function (this: OperatorSubscriber) { - try { - onComplete(); - } catch (err) { - // Send any errors that occur down stream. - destination.error(err); - } finally { - // Ensure finalization. - this.unsubscribe(); - } - } - : super._complete; - } - - unsubscribe() { - if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) { - const { closed } = this; - super.unsubscribe(); - // Execute additional teardown if we have any and we didn't already do so. - !closed && this.onFinalize?.(); - } - } -} diff --git a/node_modules/rxjs/src/internal/operators/audit.ts b/node_modules/rxjs/src/internal/operators/audit.ts deleted file mode 100644 index da13800..0000000 --- a/node_modules/rxjs/src/internal/operators/audit.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { Subscriber } from '../Subscriber'; -import { MonoTypeOperatorFunction, ObservableInput } from '../types'; - -import { operate } from '../util/lift'; -import { innerFrom } from '../observable/innerFrom'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -/** - * Ignores source values for a duration determined by another Observable, then - * emits the most recent value from the source Observable, then repeats this - * process. - * - * It's like {@link auditTime}, but the silencing - * duration is determined by a second Observable. - * - * ![](audit.svg) - * - * `audit` is similar to `throttle`, but emits the last value from the silenced - * time window, instead of the first value. `audit` emits the most recent value - * from the source Observable on the output Observable as soon as its internal - * timer becomes disabled, and ignores source values while the timer is enabled. - * Initially, the timer is disabled. As soon as the first source value arrives, - * the timer is enabled by calling the `durationSelector` function with the - * source value, which returns the "duration" Observable. When the duration - * Observable emits a value, the timer is disabled, then the most - * recent source value is emitted on the output Observable, and this process - * repeats for the next source value. - * - * ## Example - * - * Emit clicks at a rate of at most one click per second - * - * ```ts - * import { fromEvent, audit, interval } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe(audit(ev => interval(1000))); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link auditTime} - * @see {@link debounce} - * @see {@link delayWhen} - * @see {@link sample} - * @see {@link throttle} - * - * @param durationSelector A function - * that receives a value from the source Observable, for computing the silencing - * duration, returned as an Observable or a Promise. - * @return A function that returns an Observable that performs rate-limiting of - * emissions from the source Observable. - */ -export function audit(durationSelector: (value: T) => ObservableInput): MonoTypeOperatorFunction { - return operate((source, subscriber) => { - let hasValue = false; - let lastValue: T | null = null; - let durationSubscriber: Subscriber | null = null; - let isComplete = false; - - const endDuration = () => { - durationSubscriber?.unsubscribe(); - durationSubscriber = null; - if (hasValue) { - hasValue = false; - const value = lastValue!; - lastValue = null; - subscriber.next(value); - } - isComplete && subscriber.complete(); - }; - - const cleanupDuration = () => { - durationSubscriber = null; - isComplete && subscriber.complete(); - }; - - source.subscribe( - createOperatorSubscriber( - subscriber, - (value) => { - hasValue = true; - lastValue = value; - if (!durationSubscriber) { - innerFrom(durationSelector(value)).subscribe( - (durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration)) - ); - } - }, - () => { - isComplete = true; - (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete(); - } - ) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/auditTime.ts b/node_modules/rxjs/src/internal/operators/auditTime.ts deleted file mode 100644 index c2beddf..0000000 --- a/node_modules/rxjs/src/internal/operators/auditTime.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { asyncScheduler } from '../scheduler/async'; -import { audit } from './audit'; -import { timer } from '../observable/timer'; -import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; - -/** - * Ignores source values for `duration` milliseconds, then emits the most recent - * value from the source Observable, then repeats this process. - * - * When it sees a source value, it ignores that plus - * the next ones for `duration` milliseconds, and then it emits the most recent - * value from the source. - * - * ![](auditTime.png) - * - * `auditTime` is similar to `throttleTime`, but emits the last value from the - * silenced time window, instead of the first value. `auditTime` emits the most - * recent value from the source Observable on the output Observable as soon as - * its internal timer becomes disabled, and ignores source values while the - * timer is enabled. Initially, the timer is disabled. As soon as the first - * source value arrives, the timer is enabled. After `duration` milliseconds (or - * the time unit determined internally by the optional `scheduler`) has passed, - * the timer is disabled, then the most recent source value is emitted on the - * output Observable, and this process repeats for the next source value. - * Optionally takes a {@link SchedulerLike} for managing timers. - * - * ## Example - * - * Emit clicks at a rate of at most one click per second - * - * ```ts - * import { fromEvent, auditTime } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe(auditTime(1000)); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link audit} - * @see {@link debounceTime} - * @see {@link delay} - * @see {@link sampleTime} - * @see {@link throttleTime} - * - * @param duration Time to wait before emitting the most recent source value, - * measured in milliseconds or the time unit determined internally by the - * optional `scheduler`. - * @param scheduler The {@link SchedulerLike} to use for managing the timers - * that handle the rate-limiting behavior. - * @return A function that returns an Observable that performs rate-limiting of - * emissions from the source Observable. - */ -export function auditTime(duration: number, scheduler: SchedulerLike = asyncScheduler): MonoTypeOperatorFunction { - return audit(() => timer(duration, scheduler)); -} diff --git a/node_modules/rxjs/src/internal/operators/buffer.ts b/node_modules/rxjs/src/internal/operators/buffer.ts deleted file mode 100644 index 2ca2fde..0000000 --- a/node_modules/rxjs/src/internal/operators/buffer.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { OperatorFunction, ObservableInput } from '../types'; -import { operate } from '../util/lift'; -import { noop } from '../util/noop'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; - -/** - * Buffers the source Observable values until `closingNotifier` emits. - * - * Collects values from the past as an array, and emits - * that array only when another Observable emits. - * - * ![](buffer.png) - * - * Buffers the incoming Observable values until the given `closingNotifier` - * `ObservableInput` (that internally gets converted to an Observable) - * emits a value, at which point it emits the buffer on the output - * Observable and starts a new buffer internally, awaiting the next time - * `closingNotifier` emits. - * - * ## Example - * - * On every click, emit array of most recent interval events - * - * ```ts - * import { fromEvent, interval, buffer } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const intervalEvents = interval(1000); - * const buffered = intervalEvents.pipe(buffer(clicks)); - * buffered.subscribe(x => console.log(x)); - * ``` - * - * @see {@link bufferCount} - * @see {@link bufferTime} - * @see {@link bufferToggle} - * @see {@link bufferWhen} - * @see {@link window} - * - * @param closingNotifier An `ObservableInput` that signals the - * buffer to be emitted on the output Observable. - * @return A function that returns an Observable of buffers, which are arrays - * of values. - */ -export function buffer(closingNotifier: ObservableInput): OperatorFunction { - return operate((source, subscriber) => { - // The current buffered values. - let currentBuffer: T[] = []; - - // Subscribe to our source. - source.subscribe( - createOperatorSubscriber( - subscriber, - (value) => currentBuffer.push(value), - () => { - subscriber.next(currentBuffer); - subscriber.complete(); - } - ) - ); - - // Subscribe to the closing notifier. - innerFrom(closingNotifier).subscribe( - createOperatorSubscriber( - subscriber, - () => { - // Start a new buffer and emit the previous one. - const b = currentBuffer; - currentBuffer = []; - subscriber.next(b); - }, - noop - ) - ); - - return () => { - // Ensure buffered values are released on finalization. - currentBuffer = null!; - }; - }); -} diff --git a/node_modules/rxjs/src/internal/operators/bufferCount.ts b/node_modules/rxjs/src/internal/operators/bufferCount.ts deleted file mode 100644 index 1d82d2c..0000000 --- a/node_modules/rxjs/src/internal/operators/bufferCount.ts +++ /dev/null @@ -1,120 +0,0 @@ -import { OperatorFunction } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { arrRemove } from '../util/arrRemove'; - -/** - * Buffers the source Observable values until the size hits the maximum - * `bufferSize` given. - * - * Collects values from the past as an array, and emits - * that array only when its size reaches `bufferSize`. - * - * ![](bufferCount.png) - * - * Buffers a number of values from the source Observable by `bufferSize` then - * emits the buffer and clears it, and starts a new buffer each - * `startBufferEvery` values. If `startBufferEvery` is not provided or is - * `null`, then new buffers are started immediately at the start of the source - * and when each buffer closes and is emitted. - * - * ## Examples - * - * Emit the last two click events as an array - * - * ```ts - * import { fromEvent, bufferCount } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const buffered = clicks.pipe(bufferCount(2)); - * buffered.subscribe(x => console.log(x)); - * ``` - * - * On every click, emit the last two click events as an array - * - * ```ts - * import { fromEvent, bufferCount } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const buffered = clicks.pipe(bufferCount(2, 1)); - * buffered.subscribe(x => console.log(x)); - * ``` - * - * @see {@link buffer} - * @see {@link bufferTime} - * @see {@link bufferToggle} - * @see {@link bufferWhen} - * @see {@link pairwise} - * @see {@link windowCount} - * - * @param bufferSize The maximum size of the buffer emitted. - * @param startBufferEvery Interval at which to start a new buffer. - * For example if `startBufferEvery` is `2`, then a new buffer will be started - * on every other value from the source. A new buffer is started at the - * beginning of the source by default. - * @return A function that returns an Observable of arrays of buffered values. - */ -export function bufferCount(bufferSize: number, startBufferEvery: number | null = null): OperatorFunction { - // If no `startBufferEvery` value was supplied, then we're - // opening and closing on the bufferSize itself. - startBufferEvery = startBufferEvery ?? bufferSize; - - return operate((source, subscriber) => { - let buffers: T[][] = []; - let count = 0; - - source.subscribe( - createOperatorSubscriber( - subscriber, - (value) => { - let toEmit: T[][] | null = null; - - // Check to see if we need to start a buffer. - // This will start one at the first value, and then - // a new one every N after that. - if (count++ % startBufferEvery! === 0) { - buffers.push([]); - } - - // Push our value into our active buffers. - for (const buffer of buffers) { - buffer.push(value); - // Check to see if we're over the bufferSize - // if we are, record it so we can emit it later. - // If we emitted it now and removed it, it would - // mutate the `buffers` array while we're looping - // over it. - if (bufferSize <= buffer.length) { - toEmit = toEmit ?? []; - toEmit.push(buffer); - } - } - - if (toEmit) { - // We have found some buffers that are over the - // `bufferSize`. Emit them, and remove them from our - // buffers list. - for (const buffer of toEmit) { - arrRemove(buffers, buffer); - subscriber.next(buffer); - } - } - }, - () => { - // When the source completes, emit all of our - // active buffers. - for (const buffer of buffers) { - subscriber.next(buffer); - } - subscriber.complete(); - }, - // Pass all errors through to consumer. - undefined, - () => { - // Clean up our memory when we finalize - buffers = null!; - } - ) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/bufferTime.ts b/node_modules/rxjs/src/internal/operators/bufferTime.ts deleted file mode 100644 index 43a7b13..0000000 --- a/node_modules/rxjs/src/internal/operators/bufferTime.ts +++ /dev/null @@ -1,165 +0,0 @@ -import { Subscription } from '../Subscription'; -import { OperatorFunction, SchedulerLike } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { arrRemove } from '../util/arrRemove'; -import { asyncScheduler } from '../scheduler/async'; -import { popScheduler } from '../util/args'; -import { executeSchedule } from '../util/executeSchedule'; - -export function bufferTime(bufferTimeSpan: number, scheduler?: SchedulerLike): OperatorFunction; -export function bufferTime( - bufferTimeSpan: number, - bufferCreationInterval: number | null | undefined, - scheduler?: SchedulerLike -): OperatorFunction; -export function bufferTime( - bufferTimeSpan: number, - bufferCreationInterval: number | null | undefined, - maxBufferSize: number, - scheduler?: SchedulerLike -): OperatorFunction; - -/** - * Buffers the source Observable values for a specific time period. - * - * Collects values from the past as an array, and emits - * those arrays periodically in time. - * - * ![](bufferTime.png) - * - * Buffers values from the source for a specific time duration `bufferTimeSpan`. - * Unless the optional argument `bufferCreationInterval` is given, it emits and - * resets the buffer every `bufferTimeSpan` milliseconds. If - * `bufferCreationInterval` is given, this operator opens the buffer every - * `bufferCreationInterval` milliseconds and closes (emits and resets) the - * buffer every `bufferTimeSpan` milliseconds. When the optional argument - * `maxBufferSize` is specified, the buffer will be closed either after - * `bufferTimeSpan` milliseconds or when it contains `maxBufferSize` elements. - * - * ## Examples - * - * Every second, emit an array of the recent click events - * - * ```ts - * import { fromEvent, bufferTime } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const buffered = clicks.pipe(bufferTime(1000)); - * buffered.subscribe(x => console.log(x)); - * ``` - * - * Every 5 seconds, emit the click events from the next 2 seconds - * - * ```ts - * import { fromEvent, bufferTime } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const buffered = clicks.pipe(bufferTime(2000, 5000)); - * buffered.subscribe(x => console.log(x)); - * ``` - * - * @see {@link buffer} - * @see {@link bufferCount} - * @see {@link bufferToggle} - * @see {@link bufferWhen} - * @see {@link windowTime} - * - * @param bufferTimeSpan The amount of time to fill each buffer array. - * @param otherArgs Other configuration arguments such as: - * - `bufferCreationInterval` - the interval at which to start new buffers; - * - `maxBufferSize` - the maximum buffer size; - * - `scheduler` - the scheduler on which to schedule the intervals that determine buffer boundaries. - * @return A function that returns an Observable of arrays of buffered values. - */ -export function bufferTime(bufferTimeSpan: number, ...otherArgs: any[]): OperatorFunction { - const scheduler = popScheduler(otherArgs) ?? asyncScheduler; - const bufferCreationInterval = (otherArgs[0] as number) ?? null; - const maxBufferSize = (otherArgs[1] as number) || Infinity; - - return operate((source, subscriber) => { - // The active buffers, their related subscriptions, and removal functions. - let bufferRecords: { buffer: T[]; subs: Subscription }[] | null = []; - // If true, it means that every time we emit a buffer, we want to start a new buffer - // this is only really used for when *just* the buffer time span is passed. - let restartOnEmit = false; - - /** - * Does the work of emitting the buffer from the record, ensuring that the - * record is removed before the emission so reentrant code (from some custom scheduling, perhaps) - * does not alter the buffer. Also checks to see if a new buffer needs to be started - * after the emit. - */ - const emit = (record: { buffer: T[]; subs: Subscription }) => { - const { buffer, subs } = record; - subs.unsubscribe(); - arrRemove(bufferRecords, record); - subscriber.next(buffer); - restartOnEmit && startBuffer(); - }; - - /** - * Called every time we start a new buffer. This does - * the work of scheduling a job at the requested bufferTimeSpan - * that will emit the buffer (if it's not unsubscribed before then). - */ - const startBuffer = () => { - if (bufferRecords) { - const subs = new Subscription(); - subscriber.add(subs); - const buffer: T[] = []; - const record = { - buffer, - subs, - }; - bufferRecords.push(record); - executeSchedule(subs, scheduler, () => emit(record), bufferTimeSpan); - } - }; - - if (bufferCreationInterval !== null && bufferCreationInterval >= 0) { - // The user passed both a bufferTimeSpan (required), and a creation interval - // That means we need to start new buffers on the interval, and those buffers need - // to wait the required time span before emitting. - executeSchedule(subscriber, scheduler, startBuffer, bufferCreationInterval, true); - } else { - restartOnEmit = true; - } - - startBuffer(); - - const bufferTimeSubscriber = createOperatorSubscriber( - subscriber, - (value: T) => { - // Copy the records, so if we need to remove one we - // don't mutate the array. It's hard, but not impossible to - // set up a buffer time that could mutate the array and - // cause issues here. - const recordsCopy = bufferRecords!.slice(); - for (const record of recordsCopy) { - // Loop over all buffers and - const { buffer } = record; - buffer.push(value); - // If the buffer is over the max size, we need to emit it. - maxBufferSize <= buffer.length && emit(record); - } - }, - () => { - // The source completed, emit all of the active - // buffers we have before we complete. - while (bufferRecords?.length) { - subscriber.next(bufferRecords.shift()!.buffer); - } - bufferTimeSubscriber?.unsubscribe(); - subscriber.complete(); - subscriber.unsubscribe(); - }, - // Pass all errors through to consumer. - undefined, - // Clean up - () => (bufferRecords = null) - ); - - source.subscribe(bufferTimeSubscriber); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/bufferToggle.ts b/node_modules/rxjs/src/internal/operators/bufferToggle.ts deleted file mode 100644 index fabefbc..0000000 --- a/node_modules/rxjs/src/internal/operators/bufferToggle.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { Subscription } from '../Subscription'; -import { OperatorFunction, ObservableInput } from '../types'; -import { operate } from '../util/lift'; -import { innerFrom } from '../observable/innerFrom'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { noop } from '../util/noop'; -import { arrRemove } from '../util/arrRemove'; - -/** - * Buffers the source Observable values starting from an emission from - * `openings` and ending when the output of `closingSelector` emits. - * - * Collects values from the past as an array. Starts - * collecting only when `opening` emits, and calls the `closingSelector` - * function to get an Observable that tells when to close the buffer. - * - * ![](bufferToggle.png) - * - * Buffers values from the source by opening the buffer via signals from an - * Observable provided to `openings`, and closing and sending the buffers when - * a Subscribable or Promise returned by the `closingSelector` function emits. - * - * ## Example - * - * Every other second, emit the click events from the next 500ms - * - * ```ts - * import { fromEvent, interval, bufferToggle, EMPTY } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const openings = interval(1000); - * const buffered = clicks.pipe(bufferToggle(openings, i => - * i % 2 ? interval(500) : EMPTY - * )); - * buffered.subscribe(x => console.log(x)); - * ``` - * - * @see {@link buffer} - * @see {@link bufferCount} - * @see {@link bufferTime} - * @see {@link bufferWhen} - * @see {@link windowToggle} - * - * @param openings A Subscribable or Promise of notifications to start new - * buffers. - * @param closingSelector A function that takes - * the value emitted by the `openings` observable and returns a Subscribable or Promise, - * which, when it emits, signals that the associated buffer should be emitted - * and cleared. - * @return A function that returns an Observable of arrays of buffered values. - */ -export function bufferToggle( - openings: ObservableInput, - closingSelector: (value: O) => ObservableInput -): OperatorFunction { - return operate((source, subscriber) => { - const buffers: T[][] = []; - - // Subscribe to the openings notifier first - innerFrom(openings).subscribe( - createOperatorSubscriber( - subscriber, - (openValue) => { - const buffer: T[] = []; - buffers.push(buffer); - // We use this composite subscription, so that - // when the closing notifier emits, we can tear it down. - const closingSubscription = new Subscription(); - - const emitBuffer = () => { - arrRemove(buffers, buffer); - subscriber.next(buffer); - closingSubscription.unsubscribe(); - }; - - // The line below will add the subscription to the parent subscriber *and* the closing subscription. - closingSubscription.add(innerFrom(closingSelector(openValue)).subscribe(createOperatorSubscriber(subscriber, emitBuffer, noop))); - }, - noop - ) - ); - - source.subscribe( - createOperatorSubscriber( - subscriber, - (value) => { - // Value from our source. Add it to all pending buffers. - for (const buffer of buffers) { - buffer.push(value); - } - }, - () => { - // Source complete. Emit all pending buffers. - while (buffers.length > 0) { - subscriber.next(buffers.shift()!); - } - subscriber.complete(); - } - ) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/bufferWhen.ts b/node_modules/rxjs/src/internal/operators/bufferWhen.ts deleted file mode 100644 index ee64402..0000000 --- a/node_modules/rxjs/src/internal/operators/bufferWhen.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { Subscriber } from '../Subscriber'; -import { ObservableInput, OperatorFunction } from '../types'; -import { operate } from '../util/lift'; -import { noop } from '../util/noop'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; - -/** - * Buffers the source Observable values, using a factory function of closing - * Observables to determine when to close, emit, and reset the buffer. - * - * Collects values from the past as an array. When it - * starts collecting values, it calls a function that returns an Observable that - * tells when to close the buffer and restart collecting. - * - * ![](bufferWhen.svg) - * - * Opens a buffer immediately, then closes the buffer when the observable - * returned by calling `closingSelector` function emits a value. When it closes - * the buffer, it immediately opens a new buffer and repeats the process. - * - * ## Example - * - * Emit an array of the last clicks every [1-5] random seconds - * - * ```ts - * import { fromEvent, bufferWhen, interval } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const buffered = clicks.pipe( - * bufferWhen(() => interval(1000 + Math.random() * 4000)) - * ); - * buffered.subscribe(x => console.log(x)); - * ``` - * - * @see {@link buffer} - * @see {@link bufferCount} - * @see {@link bufferTime} - * @see {@link bufferToggle} - * @see {@link windowWhen} - * - * @param closingSelector A function that takes no arguments and returns an - * Observable that signals buffer closure. - * @return A function that returns an Observable of arrays of buffered values. - */ -export function bufferWhen(closingSelector: () => ObservableInput): OperatorFunction { - return operate((source, subscriber) => { - // The buffer we keep and emit. - let buffer: T[] | null = null; - // A reference to the subscriber used to subscribe to - // the closing notifier. We need to hold this so we can - // end the subscription after the first notification. - let closingSubscriber: Subscriber | null = null; - - // Ends the previous closing notifier subscription, so it - // terminates after the first emission, then emits - // the current buffer if there is one, starts a new buffer, and starts a - // new closing notifier. - const openBuffer = () => { - // Make sure to finalize the closing subscription, we only cared - // about one notification. - closingSubscriber?.unsubscribe(); - // emit the buffer if we have one, and start a new buffer. - const b = buffer; - buffer = []; - b && subscriber.next(b); - - // Get a new closing notifier and subscribe to it. - innerFrom(closingSelector()).subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openBuffer, noop))); - }; - - // Start the first buffer. - openBuffer(); - - // Subscribe to our source. - source.subscribe( - createOperatorSubscriber( - subscriber, - // Add every new value to the current buffer. - (value) => buffer?.push(value), - // When we complete, emit the buffer if we have one, - // then complete the result. - () => { - buffer && subscriber.next(buffer); - subscriber.complete(); - }, - // Pass all errors through to consumer. - undefined, - // Release memory on finalization - () => (buffer = closingSubscriber = null!) - ) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/catchError.ts b/node_modules/rxjs/src/internal/operators/catchError.ts deleted file mode 100644 index 0e2fc6d..0000000 --- a/node_modules/rxjs/src/internal/operators/catchError.ts +++ /dev/null @@ -1,139 +0,0 @@ -import { Observable } from '../Observable'; - -import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; -import { Subscription } from '../Subscription'; -import { innerFrom } from '../observable/innerFrom'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { operate } from '../util/lift'; - -export function catchError>( - selector: (err: any, caught: Observable) => O -): OperatorFunction>; - -/** - * Catches errors on the observable to be handled by returning a new observable or throwing an error. - * - * - * It only listens to the error channel and ignores notifications. - * Handles errors from the source observable, and maps them to a new observable. - * The error may also be rethrown, or a new error can be thrown to emit an error from the result. - * - * - * ![](catch.png) - * - * This operator handles errors, but forwards along all other events to the resulting observable. - * If the source observable terminates with an error, it will map that error to a new observable, - * subscribe to it, and forward all of its events to the resulting observable. - * - * ## Examples - * - * Continue with a different Observable when there's an error - * - * ```ts - * import { of, map, catchError } from 'rxjs'; - * - * of(1, 2, 3, 4, 5) - * .pipe( - * map(n => { - * if (n === 4) { - * throw 'four!'; - * } - * return n; - * }), - * catchError(err => of('I', 'II', 'III', 'IV', 'V')) - * ) - * .subscribe(x => console.log(x)); - * // 1, 2, 3, I, II, III, IV, V - * ``` - * - * Retry the caught source Observable again in case of error, similar to `retry()` operator - * - * ```ts - * import { of, map, catchError, take } from 'rxjs'; - * - * of(1, 2, 3, 4, 5) - * .pipe( - * map(n => { - * if (n === 4) { - * throw 'four!'; - * } - * return n; - * }), - * catchError((err, caught) => caught), - * take(30) - * ) - * .subscribe(x => console.log(x)); - * // 1, 2, 3, 1, 2, 3, ... - * ``` - * - * Throw a new error when the source Observable throws an error - * - * ```ts - * import { of, map, catchError } from 'rxjs'; - * - * of(1, 2, 3, 4, 5) - * .pipe( - * map(n => { - * if (n === 4) { - * throw 'four!'; - * } - * return n; - * }), - * catchError(err => { - * throw 'error in source. Details: ' + err; - * }) - * ) - * .subscribe({ - * next: x => console.log(x), - * error: err => console.log(err) - * }); - * // 1, 2, 3, error in source. Details: four! - * ``` - * - * @see {@link onErrorResumeNext} - * @see {@link repeat} - * @see {@link repeatWhen} - * @see {@link retry } - * @see {@link retryWhen} - * - * @param selector A function that takes as arguments `err`, which is the error, and `caught`, which - * is the source observable, in case you'd like to "retry" that observable by returning it again. - * Whatever observable is returned by the `selector` will be used to continue the observable chain. - * @return A function that returns an Observable that originates from either - * the source or the Observable returned by the `selector` function. - */ -export function catchError>( - selector: (err: any, caught: Observable) => O -): OperatorFunction> { - return operate((source, subscriber) => { - let innerSub: Subscription | null = null; - let syncUnsub = false; - let handledResult: Observable>; - - innerSub = source.subscribe( - createOperatorSubscriber(subscriber, undefined, undefined, (err) => { - handledResult = innerFrom(selector(err, catchError(selector)(source))); - if (innerSub) { - innerSub.unsubscribe(); - innerSub = null; - handledResult.subscribe(subscriber); - } else { - // We don't have an innerSub yet, that means the error was synchronous - // because the subscribe call hasn't returned yet. - syncUnsub = true; - } - }) - ); - - if (syncUnsub) { - // We have a synchronous error, we need to make sure to - // finalize right away. This ensures that callbacks in the `finalize` operator are called - // at the right time, and that finalization occurs at the expected - // time between the source error and the subscription to the - // next observable. - innerSub.unsubscribe(); - innerSub = null; - handledResult!.subscribe(subscriber); - } - }); -} diff --git a/node_modules/rxjs/src/internal/operators/combineAll.ts b/node_modules/rxjs/src/internal/operators/combineAll.ts deleted file mode 100644 index c24157e..0000000 --- a/node_modules/rxjs/src/internal/operators/combineAll.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { combineLatestAll } from './combineLatestAll'; - -/** - * @deprecated Renamed to {@link combineLatestAll}. Will be removed in v8. - */ -export const combineAll = combineLatestAll; diff --git a/node_modules/rxjs/src/internal/operators/combineLatest.ts b/node_modules/rxjs/src/internal/operators/combineLatest.ts deleted file mode 100644 index 3f0f3a6..0000000 --- a/node_modules/rxjs/src/internal/operators/combineLatest.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { combineLatestInit } from '../observable/combineLatest'; -import { ObservableInput, ObservableInputTuple, OperatorFunction } from '../types'; -import { operate } from '../util/lift'; -import { argsOrArgArray } from '../util/argsOrArgArray'; -import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; -import { pipe } from '../util/pipe'; -import { popResultSelector } from '../util/args'; - -/** @deprecated Replaced with {@link combineLatestWith}. Will be removed in v8. */ -export function combineLatest( - sources: [...ObservableInputTuple], - project: (...values: [T, ...A]) => R -): OperatorFunction; -/** @deprecated Replaced with {@link combineLatestWith}. Will be removed in v8. */ -export function combineLatest(sources: [...ObservableInputTuple]): OperatorFunction; - -/** @deprecated Replaced with {@link combineLatestWith}. Will be removed in v8. */ -export function combineLatest( - ...sourcesAndProject: [...ObservableInputTuple, (...values: [T, ...A]) => R] -): OperatorFunction; -/** @deprecated Replaced with {@link combineLatestWith}. Will be removed in v8. */ -export function combineLatest(...sources: [...ObservableInputTuple]): OperatorFunction; - -/** - * @deprecated Replaced with {@link combineLatestWith}. Will be removed in v8. - */ -export function combineLatest(...args: (ObservableInput | ((...values: any[]) => R))[]): OperatorFunction { - const resultSelector = popResultSelector(args); - return resultSelector - ? pipe(combineLatest(...(args as Array>)), mapOneOrManyArgs(resultSelector)) - : operate((source, subscriber) => { - combineLatestInit([source, ...argsOrArgArray(args)])(subscriber); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/combineLatestAll.ts b/node_modules/rxjs/src/internal/operators/combineLatestAll.ts deleted file mode 100644 index 434f621..0000000 --- a/node_modules/rxjs/src/internal/operators/combineLatestAll.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { combineLatest } from '../observable/combineLatest'; -import { OperatorFunction, ObservableInput } from '../types'; -import { joinAllInternals } from './joinAllInternals'; - -export function combineLatestAll(): OperatorFunction, T[]>; -export function combineLatestAll(): OperatorFunction; -export function combineLatestAll(project: (...values: T[]) => R): OperatorFunction, R>; -export function combineLatestAll(project: (...values: Array) => R): OperatorFunction; - -/** - * Flattens an Observable-of-Observables by applying {@link combineLatest} when the Observable-of-Observables completes. - * - * `combineLatestAll` takes an Observable of Observables, and collects all Observables from it. Once the outer Observable completes, - * it subscribes to all collected Observables and combines their values using the {@link combineLatest} strategy, such that: - * - * * Every time an inner Observable emits, the output Observable emits - * * When the returned observable emits, it emits all of the latest values by: - * * If a `project` function is provided, it is called with each recent value from each inner Observable in whatever order they - * arrived, and the result of the `project` function is what is emitted by the output Observable. - * * If there is no `project` function, an array of all the most recent values is emitted by the output Observable. - * - * ## Example - * - * Map two click events to a finite interval Observable, then apply `combineLatestAll` - * - * ```ts - * import { fromEvent, map, interval, take, combineLatestAll } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const higherOrder = clicks.pipe( - * map(() => interval(Math.random() * 2000).pipe(take(3))), - * take(2) - * ); - * const result = higherOrder.pipe(combineLatestAll()); - * - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link combineLatest} - * @see {@link combineLatestWith} - * @see {@link mergeAll} - * - * @param project optional function to map the most recent values from each inner Observable into a new result. - * Takes each of the most recent values from each collected inner Observable as arguments, in order. - * @return A function that returns an Observable that flattens Observables - * emitted by the source Observable. - */ -export function combineLatestAll(project?: (...values: Array) => R) { - return joinAllInternals(combineLatest, project); -} diff --git a/node_modules/rxjs/src/internal/operators/combineLatestWith.ts b/node_modules/rxjs/src/internal/operators/combineLatestWith.ts deleted file mode 100644 index b262f89..0000000 --- a/node_modules/rxjs/src/internal/operators/combineLatestWith.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { ObservableInputTuple, OperatorFunction, Cons } from '../types'; -import { combineLatest } from './combineLatest'; - -/** - * Create an observable that combines the latest values from all passed observables and the source - * into arrays and emits them. - * - * Returns an observable, that when subscribed to, will subscribe to the source observable and all - * sources provided as arguments. Once all sources emit at least one value, all of the latest values - * will be emitted as an array. After that, every time any source emits a value, all of the latest values - * will be emitted as an array. - * - * This is a useful operator for eagerly calculating values based off of changed inputs. - * - * ## Example - * - * Simple concatenation of values from two inputs - * - * ```ts - * import { fromEvent, combineLatestWith, map } from 'rxjs'; - * - * // Setup: Add two inputs to the page - * const input1 = document.createElement('input'); - * document.body.appendChild(input1); - * const input2 = document.createElement('input'); - * document.body.appendChild(input2); - * - * // Get streams of changes - * const input1Changes$ = fromEvent(input1, 'change'); - * const input2Changes$ = fromEvent(input2, 'change'); - * - * // Combine the changes by adding them together - * input1Changes$.pipe( - * combineLatestWith(input2Changes$), - * map(([e1, e2]) => (e1.target).value + ' - ' + (e2.target).value) - * ) - * .subscribe(x => console.log(x)); - * ``` - * - * @param otherSources the other sources to subscribe to. - * @return A function that returns an Observable that emits the latest - * emissions from both source and provided Observables. - */ -export function combineLatestWith( - ...otherSources: [...ObservableInputTuple] -): OperatorFunction> { - return combineLatest(...otherSources); -} diff --git a/node_modules/rxjs/src/internal/operators/concat.ts b/node_modules/rxjs/src/internal/operators/concat.ts deleted file mode 100644 index eadb595..0000000 --- a/node_modules/rxjs/src/internal/operators/concat.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ObservableInputTuple, OperatorFunction, SchedulerLike } from '../types'; -import { operate } from '../util/lift'; -import { concatAll } from './concatAll'; -import { popScheduler } from '../util/args'; -import { from } from '../observable/from'; - -/** @deprecated Replaced with {@link concatWith}. Will be removed in v8. */ -export function concat(...sources: [...ObservableInputTuple]): OperatorFunction; -/** @deprecated Replaced with {@link concatWith}. Will be removed in v8. */ -export function concat( - ...sourcesAndScheduler: [...ObservableInputTuple, SchedulerLike] -): OperatorFunction; - -/** - * @deprecated Replaced with {@link concatWith}. Will be removed in v8. - */ -export function concat(...args: any[]): OperatorFunction { - const scheduler = popScheduler(args); - return operate((source, subscriber) => { - concatAll()(from([source, ...args], scheduler)).subscribe(subscriber); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/concatAll.ts b/node_modules/rxjs/src/internal/operators/concatAll.ts deleted file mode 100644 index 05be4fc..0000000 --- a/node_modules/rxjs/src/internal/operators/concatAll.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { mergeAll } from './mergeAll'; -import { OperatorFunction, ObservableInput, ObservedValueOf } from '../types'; - -/** - * Converts a higher-order Observable into a first-order Observable by - * concatenating the inner Observables in order. - * - * Flattens an Observable-of-Observables by putting one - * inner Observable after the other. - * - * ![](concatAll.svg) - * - * Joins every Observable emitted by the source (a higher-order Observable), in - * a serial fashion. It subscribes to each inner Observable only after the - * previous inner Observable has completed, and merges all of their values into - * the returned observable. - * - * __Warning:__ If the source Observable emits Observables quickly and - * endlessly, and the inner Observables it emits generally complete slower than - * the source emits, you can run into memory issues as the incoming Observables - * collect in an unbounded buffer. - * - * Note: `concatAll` is equivalent to `mergeAll` with concurrency parameter set - * to `1`. - * - * ## Example - * - * For each click event, tick every second from 0 to 3, with no concurrency - * - * ```ts - * import { fromEvent, map, interval, take, concatAll } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const higherOrder = clicks.pipe( - * map(() => interval(1000).pipe(take(4))) - * ); - * const firstOrder = higherOrder.pipe(concatAll()); - * firstOrder.subscribe(x => console.log(x)); - * - * // Results in the following: - * // (results are not concurrent) - * // For every click on the "document" it will emit values 0 to 3 spaced - * // on a 1000ms interval - * // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3 - * ``` - * - * @see {@link combineLatestAll} - * @see {@link concat} - * @see {@link concatMap} - * @see {@link concatMapTo} - * @see {@link exhaustAll} - * @see {@link mergeAll} - * @see {@link switchAll} - * @see {@link switchMap} - * @see {@link zipAll} - * - * @return A function that returns an Observable emitting values from all the - * inner Observables concatenated. - */ -export function concatAll>(): OperatorFunction> { - return mergeAll(1); -} diff --git a/node_modules/rxjs/src/internal/operators/concatMap.ts b/node_modules/rxjs/src/internal/operators/concatMap.ts deleted file mode 100644 index 1a6dc67..0000000 --- a/node_modules/rxjs/src/internal/operators/concatMap.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { mergeMap } from './mergeMap'; -import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; -import { isFunction } from '../util/isFunction'; - -/* tslint:disable:max-line-length */ -export function concatMap>( - project: (value: T, index: number) => O -): OperatorFunction>; -/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ -export function concatMap>( - project: (value: T, index: number) => O, - resultSelector: undefined -): OperatorFunction>; -/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ -export function concatMap>( - project: (value: T, index: number) => O, - resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R -): OperatorFunction; -/* tslint:enable:max-line-length */ - -/** - * Projects each source value to an Observable which is merged in the output - * Observable, in a serialized fashion waiting for each one to complete before - * merging the next. - * - * Maps each value to an Observable, then flattens all of - * these inner Observables using {@link concatAll}. - * - * ![](concatMap.png) - * - * Returns an Observable that emits items based on applying a function that you - * supply to each item emitted by the source Observable, where that function - * returns an (so-called "inner") Observable. Each new inner Observable is - * concatenated with the previous inner Observable. - * - * __Warning:__ if source values arrive endlessly and faster than their - * corresponding inner Observables can complete, it will result in memory issues - * as inner Observables amass in an unbounded buffer waiting for their turn to - * be subscribed to. - * - * Note: `concatMap` is equivalent to `mergeMap` with concurrency parameter set - * to `1`. - * - * ## Example - * - * For each click event, tick every second from 0 to 3, with no concurrency - * - * ```ts - * import { fromEvent, concatMap, interval, take } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe( - * concatMap(ev => interval(1000).pipe(take(4))) - * ); - * result.subscribe(x => console.log(x)); - * - * // Results in the following: - * // (results are not concurrent) - * // For every click on the "document" it will emit values 0 to 3 spaced - * // on a 1000ms interval - * // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3 - * ``` - * - * @see {@link concat} - * @see {@link concatAll} - * @see {@link concatMapTo} - * @see {@link exhaustMap} - * @see {@link mergeMap} - * @see {@link switchMap} - * - * @param project A function that, when applied to an item emitted by the source - * Observable, returns an Observable. - * @return A function that returns an Observable that emits the result of - * applying the projection function (and the optional deprecated - * `resultSelector`) to each item emitted by the source Observable and taking - * values from each projected inner Observable sequentially. - */ -export function concatMap>( - project: (value: T, index: number) => O, - resultSelector?: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R -): OperatorFunction | R> { - return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1); -} diff --git a/node_modules/rxjs/src/internal/operators/concatMapTo.ts b/node_modules/rxjs/src/internal/operators/concatMapTo.ts deleted file mode 100644 index 9c04b8e..0000000 --- a/node_modules/rxjs/src/internal/operators/concatMapTo.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { concatMap } from './concatMap'; -import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; -import { isFunction } from '../util/isFunction'; - -/** @deprecated Will be removed in v9. Use {@link concatMap} instead: `concatMap(() => result)` */ -export function concatMapTo>(observable: O): OperatorFunction>; -/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ -export function concatMapTo>( - observable: O, - resultSelector: undefined -): OperatorFunction>; -/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ -export function concatMapTo>( - observable: O, - resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R -): OperatorFunction; - -/** - * Projects each source value to the same Observable which is merged multiple - * times in a serialized fashion on the output Observable. - * - * It's like {@link concatMap}, but maps each value - * always to the same inner Observable. - * - * ![](concatMapTo.png) - * - * Maps each source value to the given Observable `innerObservable` regardless - * of the source value, and then flattens those resulting Observables into one - * single Observable, which is the output Observable. Each new `innerObservable` - * instance emitted on the output Observable is concatenated with the previous - * `innerObservable` instance. - * - * __Warning:__ if source values arrive endlessly and faster than their - * corresponding inner Observables can complete, it will result in memory issues - * as inner Observables amass in an unbounded buffer waiting for their turn to - * be subscribed to. - * - * Note: `concatMapTo` is equivalent to `mergeMapTo` with concurrency parameter - * set to `1`. - * - * ## Example - * - * For each click event, tick every second from 0 to 3, with no concurrency - * - * ```ts - * import { fromEvent, concatMapTo, interval, take } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe( - * concatMapTo(interval(1000).pipe(take(4))) - * ); - * result.subscribe(x => console.log(x)); - * - * // Results in the following: - * // (results are not concurrent) - * // For every click on the "document" it will emit values 0 to 3 spaced - * // on a 1000ms interval - * // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3 - * ``` - * - * @see {@link concat} - * @see {@link concatAll} - * @see {@link concatMap} - * @see {@link mergeMapTo} - * @see {@link switchMapTo} - * - * @param innerObservable An `ObservableInput` to replace each value from the - * source Observable. - * @return A function that returns an Observable of values merged together by - * joining the passed Observable with itself, one after the other, for each - * value emitted from the source. - * @deprecated Will be removed in v9. Use {@link concatMap} instead: `concatMap(() => result)` - */ -export function concatMapTo>( - innerObservable: O, - resultSelector?: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R -): OperatorFunction | R> { - return isFunction(resultSelector) ? concatMap(() => innerObservable, resultSelector) : concatMap(() => innerObservable); -} diff --git a/node_modules/rxjs/src/internal/operators/concatWith.ts b/node_modules/rxjs/src/internal/operators/concatWith.ts deleted file mode 100644 index b836b29..0000000 --- a/node_modules/rxjs/src/internal/operators/concatWith.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { ObservableInputTuple, OperatorFunction } from '../types'; -import { concat } from './concat'; - -/** - * Emits all of the values from the source observable, then, once it completes, subscribes - * to each observable source provided, one at a time, emitting all of their values, and not subscribing - * to the next one until it completes. - * - * `concat(a$, b$, c$)` is the same as `a$.pipe(concatWith(b$, c$))`. - * - * ## Example - * - * Listen for one mouse click, then listen for all mouse moves. - * - * ```ts - * import { fromEvent, map, take, concatWith } from 'rxjs'; - * - * const clicks$ = fromEvent(document, 'click'); - * const moves$ = fromEvent(document, 'mousemove'); - * - * clicks$.pipe( - * map(() => 'click'), - * take(1), - * concatWith( - * moves$.pipe( - * map(() => 'move') - * ) - * ) - * ) - * .subscribe(x => console.log(x)); - * - * // 'click' - * // 'move' - * // 'move' - * // 'move' - * // ... - * ``` - * - * @param otherSources Other observable sources to subscribe to, in sequence, after the original source is complete. - * @return A function that returns an Observable that concatenates - * subscriptions to the source and provided Observables subscribing to the next - * only once the current subscription completes. - */ -export function concatWith( - ...otherSources: [...ObservableInputTuple] -): OperatorFunction { - return concat(...otherSources); -} diff --git a/node_modules/rxjs/src/internal/operators/connect.ts b/node_modules/rxjs/src/internal/operators/connect.ts deleted file mode 100644 index 4a6b3c4..0000000 --- a/node_modules/rxjs/src/internal/operators/connect.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { OperatorFunction, ObservableInput, ObservedValueOf, SubjectLike } from '../types'; -import { Observable } from '../Observable'; -import { Subject } from '../Subject'; -import { innerFrom } from '../observable/innerFrom'; -import { operate } from '../util/lift'; -import { fromSubscribable } from '../observable/fromSubscribable'; - -/** - * An object used to configure {@link connect} operator. - */ -export interface ConnectConfig { - /** - * A factory function used to create the Subject through which the source - * is multicast. By default, this creates a {@link Subject}. - */ - connector: () => SubjectLike; -} - -/** - * The default configuration for `connect`. - */ -const DEFAULT_CONFIG: ConnectConfig = { - connector: () => new Subject(), -}; - -/** - * Creates an observable by multicasting the source within a function that - * allows the developer to define the usage of the multicast prior to connection. - * - * This is particularly useful if the observable source you wish to multicast could - * be synchronous or asynchronous. This sets it apart from {@link share}, which, in the - * case of totally synchronous sources will fail to share a single subscription with - * multiple consumers, as by the time the subscription to the result of {@link share} - * has returned, if the source is synchronous its internal reference count will jump from - * 0 to 1 back to 0 and reset. - * - * To use `connect`, you provide a `selector` function that will give you - * a multicast observable that is not yet connected. You then use that multicast observable - * to create a resulting observable that, when subscribed, will set up your multicast. This is - * generally, but not always, accomplished with {@link merge}. - * - * Note that using a {@link takeUntil} inside of `connect`'s `selector` _might_ mean you were looking - * to use the {@link takeWhile} operator instead. - * - * When you subscribe to the result of `connect`, the `selector` function will be called. After - * the `selector` function returns, the observable it returns will be subscribed to, _then_ the - * multicast will be connected to the source. - * - * ## Example - * - * Sharing a totally synchronous observable - * - * ```ts - * import { of, tap, connect, merge, map, filter } from 'rxjs'; - * - * const source$ = of(1, 2, 3, 4, 5).pipe( - * tap({ - * subscribe: () => console.log('subscription started'), - * next: n => console.log(`source emitted ${ n }`) - * }) - * ); - * - * source$.pipe( - * // Notice in here we're merging 3 subscriptions to `shared$`. - * connect(shared$ => merge( - * shared$.pipe(map(n => `all ${ n }`)), - * shared$.pipe(filter(n => n % 2 === 0), map(n => `even ${ n }`)), - * shared$.pipe(filter(n => n % 2 === 1), map(n => `odd ${ n }`)) - * )) - * ) - * .subscribe(console.log); - * - * // Expected output: (notice only one subscription) - * 'subscription started' - * 'source emitted 1' - * 'all 1' - * 'odd 1' - * 'source emitted 2' - * 'all 2' - * 'even 2' - * 'source emitted 3' - * 'all 3' - * 'odd 3' - * 'source emitted 4' - * 'all 4' - * 'even 4' - * 'source emitted 5' - * 'all 5' - * 'odd 5' - * ``` - * - * @param selector A function used to set up the multicast. Gives you a multicast observable - * that is not yet connected. With that, you're expected to create and return - * and Observable, that when subscribed to, will utilize the multicast observable. - * After this function is executed -- and its return value subscribed to -- the - * operator will subscribe to the source, and the connection will be made. - * @param config The configuration object for `connect`. - */ -export function connect>( - selector: (shared: Observable) => O, - config: ConnectConfig = DEFAULT_CONFIG -): OperatorFunction> { - const { connector } = config; - return operate((source, subscriber) => { - const subject = connector(); - innerFrom(selector(fromSubscribable(subject))).subscribe(subscriber); - subscriber.add(source.subscribe(subject)); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/count.ts b/node_modules/rxjs/src/internal/operators/count.ts deleted file mode 100644 index 8b764f8..0000000 --- a/node_modules/rxjs/src/internal/operators/count.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { OperatorFunction } from '../types'; -import { reduce } from './reduce'; - -/** - * Counts the number of emissions on the source and emits that number when the - * source completes. - * - * Tells how many values were emitted, when the source - * completes. - * - * ![](count.png) - * - * `count` transforms an Observable that emits values into an Observable that - * emits a single value that represents the number of values emitted by the - * source Observable. If the source Observable terminates with an error, `count` - * will pass this error notification along without emitting a value first. If - * the source Observable does not terminate at all, `count` will neither emit - * a value nor terminate. This operator takes an optional `predicate` function - * as argument, in which case the output emission will represent the number of - * source values that matched `true` with the `predicate`. - * - * ## Examples - * - * Counts how many seconds have passed before the first click happened - * - * ```ts - * import { interval, fromEvent, takeUntil, count } from 'rxjs'; - * - * const seconds = interval(1000); - * const clicks = fromEvent(document, 'click'); - * const secondsBeforeClick = seconds.pipe(takeUntil(clicks)); - * const result = secondsBeforeClick.pipe(count()); - * result.subscribe(x => console.log(x)); - * ``` - * - * Counts how many odd numbers are there between 1 and 7 - * - * ```ts - * import { range, count } from 'rxjs'; - * - * const numbers = range(1, 7); - * const result = numbers.pipe(count(i => i % 2 === 1)); - * result.subscribe(x => console.log(x)); - * // Results in: - * // 4 - * ``` - * - * @see {@link max} - * @see {@link min} - * @see {@link reduce} - * - * @param predicate A function that is used to analyze the value and the index and - * determine whether or not to increment the count. Return `true` to increment the count, - * and return `false` to keep the count the same. - * If the predicate is not provided, every value will be counted. - * @return A function that returns an Observable that emits one number that - * represents the count of emissions. - */ -export function count(predicate?: (value: T, index: number) => boolean): OperatorFunction { - return reduce((total, value, i) => (!predicate || predicate(value, i) ? total + 1 : total), 0); -} diff --git a/node_modules/rxjs/src/internal/operators/debounce.ts b/node_modules/rxjs/src/internal/operators/debounce.ts deleted file mode 100644 index b644855..0000000 --- a/node_modules/rxjs/src/internal/operators/debounce.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { Subscriber } from '../Subscriber'; -import { MonoTypeOperatorFunction, ObservableInput } from '../types'; -import { operate } from '../util/lift'; -import { noop } from '../util/noop'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; - -/** - * Emits a notification from the source Observable only after a particular time span - * determined by another Observable has passed without another source emission. - * - * It's like {@link debounceTime}, but the time span of - * emission silence is determined by a second Observable. - * - * ![](debounce.svg) - * - * `debounce` delays notifications emitted by the source Observable, but drops previous - * pending delayed emissions if a new notification arrives on the source Observable. - * This operator keeps track of the most recent notification from the source - * Observable, and spawns a duration Observable by calling the - * `durationSelector` function. The notification is emitted only when the duration - * Observable emits a next notification, and if no other notification was emitted on - * the source Observable since the duration Observable was spawned. If a new - * notification appears before the duration Observable emits, the previous notification will - * not be emitted and a new duration is scheduled from `durationSelector` is scheduled. - * If the completing event happens during the scheduled duration the last cached notification - * is emitted before the completion event is forwarded to the output observable. - * If the error event happens during the scheduled duration or after it only the error event is - * forwarded to the output observable. The cache notification is not emitted in this case. - * - * Like {@link debounceTime}, this is a rate-limiting operator, and also a - * delay-like operator since output emissions do not necessarily occur at the - * same time as they did on the source Observable. - * - * ## Example - * - * Emit the most recent click after a burst of clicks - * - * ```ts - * import { fromEvent, scan, debounce, interval } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe( - * scan(i => ++i, 1), - * debounce(i => interval(200 * i)) - * ); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link audit} - * @see {@link auditTime} - * @see {@link debounceTime} - * @see {@link delay} - * @see {@link sample} - * @see {@link sampleTime} - * @see {@link throttle} - * @see {@link throttleTime} - * - * @param durationSelector A function - * that receives a value from the source Observable, for computing the timeout - * duration for each source value, returned as an Observable or a Promise. - * @return A function that returns an Observable that delays the emissions of - * the source Observable by the specified duration Observable returned by - * `durationSelector`, and may drop some values if they occur too frequently. - */ -export function debounce(durationSelector: (value: T) => ObservableInput): MonoTypeOperatorFunction { - return operate((source, subscriber) => { - let hasValue = false; - let lastValue: T | null = null; - // The subscriber/subscription for the current debounce, if there is one. - let durationSubscriber: Subscriber | null = null; - - const emit = () => { - // Unsubscribe any current debounce subscription we have, - // we only cared about the first notification from it, and we - // want to clean that subscription up as soon as possible. - durationSubscriber?.unsubscribe(); - durationSubscriber = null; - if (hasValue) { - // We have a value! Free up memory first, then emit the value. - hasValue = false; - const value = lastValue!; - lastValue = null; - subscriber.next(value); - } - }; - - source.subscribe( - createOperatorSubscriber( - subscriber, - (value: T) => { - // Cancel any pending debounce duration. We don't - // need to null it out here yet tho, because we're just going - // to create another one in a few lines. - durationSubscriber?.unsubscribe(); - hasValue = true; - lastValue = value; - // Capture our duration subscriber, so we can unsubscribe it when we're notified - // and we're going to emit the value. - durationSubscriber = createOperatorSubscriber(subscriber, emit, noop); - // Subscribe to the duration. - innerFrom(durationSelector(value)).subscribe(durationSubscriber); - }, - () => { - // Source completed. - // Emit any pending debounced values then complete - emit(); - subscriber.complete(); - }, - // Pass all errors through to consumer - undefined, - () => { - // Finalization. - lastValue = durationSubscriber = null; - } - ) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/debounceTime.ts b/node_modules/rxjs/src/internal/operators/debounceTime.ts deleted file mode 100644 index 0992bce..0000000 --- a/node_modules/rxjs/src/internal/operators/debounceTime.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { asyncScheduler } from '../scheduler/async'; -import { Subscription } from '../Subscription'; -import { MonoTypeOperatorFunction, SchedulerAction, SchedulerLike } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -/** - * Emits a notification from the source Observable only after a particular time span - * has passed without another source emission. - * - * It's like {@link delay}, but passes only the most - * recent notification from each burst of emissions. - * - * ![](debounceTime.png) - * - * `debounceTime` delays notifications emitted by the source Observable, but drops - * previous pending delayed emissions if a new notification arrives on the source - * Observable. This operator keeps track of the most recent notification from the - * source Observable, and emits that only when `dueTime` has passed - * without any other notification appearing on the source Observable. If a new value - * appears before `dueTime` silence occurs, the previous notification will be dropped - * and will not be emitted and a new `dueTime` is scheduled. - * If the completing event happens during `dueTime` the last cached notification - * is emitted before the completion event is forwarded to the output observable. - * If the error event happens during `dueTime` or after it only the error event is - * forwarded to the output observable. The cache notification is not emitted in this case. - * - * This is a rate-limiting operator, because it is impossible for more than one - * notification to be emitted in any time window of duration `dueTime`, but it is also - * a delay-like operator since output emissions do not occur at the same time as - * they did on the source Observable. Optionally takes a {@link SchedulerLike} for - * managing timers. - * - * ## Example - * - * Emit the most recent click after a burst of clicks - * - * ```ts - * import { fromEvent, debounceTime } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe(debounceTime(1000)); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link audit} - * @see {@link auditTime} - * @see {@link debounce} - * @see {@link sample} - * @see {@link sampleTime} - * @see {@link throttle} - * @see {@link throttleTime} - * - * @param dueTime The timeout duration in milliseconds (or the time unit determined - * internally by the optional `scheduler`) for the window of time required to wait - * for emission silence before emitting the most recent source value. - * @param scheduler The {@link SchedulerLike} to use for managing the timers that - * handle the timeout for each value. - * @return A function that returns an Observable that delays the emissions of - * the source Observable by the specified `dueTime`, and may drop some values - * if they occur too frequently. - */ -export function debounceTime(dueTime: number, scheduler: SchedulerLike = asyncScheduler): MonoTypeOperatorFunction { - return operate((source, subscriber) => { - let activeTask: Subscription | null = null; - let lastValue: T | null = null; - let lastTime: number | null = null; - - const emit = () => { - if (activeTask) { - // We have a value! Free up memory first, then emit the value. - activeTask.unsubscribe(); - activeTask = null; - const value = lastValue!; - lastValue = null; - subscriber.next(value); - } - }; - function emitWhenIdle(this: SchedulerAction) { - // This is called `dueTime` after the first value - // but we might have received new values during this window! - - const targetTime = lastTime! + dueTime; - const now = scheduler.now(); - if (now < targetTime) { - // On that case, re-schedule to the new target - activeTask = this.schedule(undefined, targetTime - now); - subscriber.add(activeTask); - return; - } - - emit(); - } - - source.subscribe( - createOperatorSubscriber( - subscriber, - (value: T) => { - lastValue = value; - lastTime = scheduler.now(); - - // Only set up a task if it's not already up - if (!activeTask) { - activeTask = scheduler.schedule(emitWhenIdle, dueTime); - subscriber.add(activeTask); - } - }, - () => { - // Source completed. - // Emit any pending debounced values then complete - emit(); - subscriber.complete(); - }, - // Pass all errors through to consumer. - undefined, - () => { - // Finalization. - lastValue = activeTask = null; - } - ) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/defaultIfEmpty.ts b/node_modules/rxjs/src/internal/operators/defaultIfEmpty.ts deleted file mode 100644 index 9e0d277..0000000 --- a/node_modules/rxjs/src/internal/operators/defaultIfEmpty.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { OperatorFunction } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -/** - * Emits a given value if the source Observable completes without emitting any - * `next` value, otherwise mirrors the source Observable. - * - * If the source Observable turns out to be empty, then - * this operator will emit a default value. - * - * ![](defaultIfEmpty.png) - * - * `defaultIfEmpty` emits the values emitted by the source Observable or a - * specified default value if the source Observable is empty (completes without - * having emitted any `next` value). - * - * ## Example - * - * If no clicks happen in 5 seconds, then emit 'no clicks' - * - * ```ts - * import { fromEvent, takeUntil, interval, defaultIfEmpty } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const clicksBeforeFive = clicks.pipe(takeUntil(interval(5000))); - * const result = clicksBeforeFive.pipe(defaultIfEmpty('no clicks')); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link empty} - * @see {@link last} - * - * @param defaultValue The default value used if the source - * Observable is empty. - * @return A function that returns an Observable that emits either the - * specified `defaultValue` if the source Observable emits no items, or the - * values emitted by the source Observable. - */ -export function defaultIfEmpty(defaultValue: R): OperatorFunction { - return operate((source, subscriber) => { - let hasValue = false; - source.subscribe( - createOperatorSubscriber( - subscriber, - (value) => { - hasValue = true; - subscriber.next(value); - }, - () => { - if (!hasValue) { - subscriber.next(defaultValue!); - } - subscriber.complete(); - } - ) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/delay.ts b/node_modules/rxjs/src/internal/operators/delay.ts deleted file mode 100644 index 47fae49..0000000 --- a/node_modules/rxjs/src/internal/operators/delay.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { asyncScheduler } from '../scheduler/async'; -import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; -import { delayWhen } from './delayWhen'; -import { timer } from '../observable/timer'; - -/** - * Delays the emission of items from the source Observable by a given timeout or - * until a given Date. - * - * Time shifts each item by some specified amount of - * milliseconds. - * - * ![](delay.svg) - * - * If the delay argument is a Number, this operator time shifts the source - * Observable by that amount of time expressed in milliseconds. The relative - * time intervals between the values are preserved. - * - * If the delay argument is a Date, this operator time shifts the start of the - * Observable execution until the given date occurs. - * - * ## Examples - * - * Delay each click by one second - * - * ```ts - * import { fromEvent, delay } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const delayedClicks = clicks.pipe(delay(1000)); // each click emitted after 1 second - * delayedClicks.subscribe(x => console.log(x)); - * ``` - * - * Delay all clicks until a future date happens - * - * ```ts - * import { fromEvent, delay } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const date = new Date('March 15, 2050 12:00:00'); // in the future - * const delayedClicks = clicks.pipe(delay(date)); // click emitted only after that date - * delayedClicks.subscribe(x => console.log(x)); - * ``` - * - * @see {@link delayWhen} - * @see {@link throttle} - * @see {@link throttleTime} - * @see {@link debounce} - * @see {@link debounceTime} - * @see {@link sample} - * @see {@link sampleTime} - * @see {@link audit} - * @see {@link auditTime} - * - * @param due The delay duration in milliseconds (a `number`) or a `Date` until - * which the emission of the source items is delayed. - * @param scheduler The {@link SchedulerLike} to use for managing the timers - * that handle the time-shift for each item. - * @return A function that returns an Observable that delays the emissions of - * the source Observable by the specified timeout or Date. - */ -export function delay(due: number | Date, scheduler: SchedulerLike = asyncScheduler): MonoTypeOperatorFunction { - const duration = timer(due, scheduler); - return delayWhen(() => duration); -} diff --git a/node_modules/rxjs/src/internal/operators/delayWhen.ts b/node_modules/rxjs/src/internal/operators/delayWhen.ts deleted file mode 100644 index 0755507..0000000 --- a/node_modules/rxjs/src/internal/operators/delayWhen.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { Observable } from '../Observable'; -import { MonoTypeOperatorFunction, ObservableInput } from '../types'; -import { concat } from '../observable/concat'; -import { take } from './take'; -import { ignoreElements } from './ignoreElements'; -import { mapTo } from './mapTo'; -import { mergeMap } from './mergeMap'; -import { innerFrom } from '../observable/innerFrom'; - -/** @deprecated The `subscriptionDelay` parameter will be removed in v8. */ -export function delayWhen( - delayDurationSelector: (value: T, index: number) => ObservableInput, - subscriptionDelay: Observable -): MonoTypeOperatorFunction; -export function delayWhen(delayDurationSelector: (value: T, index: number) => ObservableInput): MonoTypeOperatorFunction; - -/** - * Delays the emission of items from the source Observable by a given time span - * determined by the emissions of another Observable. - * - * It's like {@link delay}, but the time span of the - * delay duration is determined by a second Observable. - * - * ![](delayWhen.png) - * - * `delayWhen` operator shifts each emitted value from the source Observable by - * a time span determined by another Observable. When the source emits a value, - * the `delayDurationSelector` function is called with the value emitted from - * the source Observable as the first argument to the `delayDurationSelector`. - * The `delayDurationSelector` function should return an {@link ObservableInput}, - * that is internally converted to an Observable that is called the "duration" - * Observable. - * - * The source value is emitted on the output Observable only when the "duration" - * Observable emits ({@link guide/glossary-and-semantics#next next}s) any value. - * Upon that, the "duration" Observable gets unsubscribed. - * - * Before RxJS V7, the {@link guide/glossary-and-semantics#complete completion} - * of the "duration" Observable would have been triggering the emission of the - * source value to the output Observable, but with RxJS V7, this is not the case - * anymore. - * - * Only next notifications (from the "duration" Observable) trigger values from - * the source Observable to be passed to the output Observable. If the "duration" - * Observable only emits the complete notification (without next), the value - * emitted by the source Observable will never get to the output Observable - it - * will be swallowed. If the "duration" Observable errors, the error will be - * propagated to the output Observable. - * - * Optionally, `delayWhen` takes a second argument, `subscriptionDelay`, which - * is an Observable. When `subscriptionDelay` emits its first value or - * completes, the source Observable is subscribed to and starts behaving like - * described in the previous paragraph. If `subscriptionDelay` is not provided, - * `delayWhen` will subscribe to the source Observable as soon as the output - * Observable is subscribed. - * - * ## Example - * - * Delay each click by a random amount of time, between 0 and 5 seconds - * - * ```ts - * import { fromEvent, delayWhen, interval } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const delayedClicks = clicks.pipe( - * delayWhen(() => interval(Math.random() * 5000)) - * ); - * delayedClicks.subscribe(x => console.log(x)); - * ``` - * - * @see {@link delay} - * @see {@link throttle} - * @see {@link throttleTime} - * @see {@link debounce} - * @see {@link debounceTime} - * @see {@link sample} - * @see {@link sampleTime} - * @see {@link audit} - * @see {@link auditTime} - * - * @param delayDurationSelector A function that returns an `ObservableInput` for - * each `value` emitted by the source Observable, which is then used to delay the - * emission of that `value` on the output Observable until the `ObservableInput` - * returned from this function emits a next value. When called, beside `value`, - * this function receives a zero-based `index` of the emission order. - * @param subscriptionDelay An Observable that triggers the subscription to the - * source Observable once it emits any value. - * @return A function that returns an Observable that delays the emissions of - * the source Observable by an amount of time specified by the Observable - * returned by `delayDurationSelector`. - */ -export function delayWhen( - delayDurationSelector: (value: T, index: number) => ObservableInput, - subscriptionDelay?: Observable -): MonoTypeOperatorFunction { - if (subscriptionDelay) { - // DEPRECATED PATH - return (source: Observable) => - concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector))); - } - - return mergeMap((value, index) => innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value))); -} diff --git a/node_modules/rxjs/src/internal/operators/dematerialize.ts b/node_modules/rxjs/src/internal/operators/dematerialize.ts deleted file mode 100644 index 3a4e17f..0000000 --- a/node_modules/rxjs/src/internal/operators/dematerialize.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { observeNotification } from '../Notification'; -import { OperatorFunction, ObservableNotification, ValueFromNotification } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -/** - * Converts an Observable of {@link ObservableNotification} objects into the emissions - * that they represent. - * - * Unwraps {@link ObservableNotification} objects as actual `next`, - * `error` and `complete` emissions. The opposite of {@link materialize}. - * - * ![](dematerialize.png) - * - * `dematerialize` is assumed to operate an Observable that only emits - * {@link ObservableNotification} objects as `next` emissions, and does not emit any - * `error`. Such Observable is the output of a `materialize` operation. Those - * notifications are then unwrapped using the metadata they contain, and emitted - * as `next`, `error`, and `complete` on the output Observable. - * - * Use this operator in conjunction with {@link materialize}. - * - * ## Example - * - * Convert an Observable of Notifications to an actual Observable - * - * ```ts - * import { NextNotification, ErrorNotification, of, dematerialize } from 'rxjs'; - * - * const notifA: NextNotification = { kind: 'N', value: 'A' }; - * const notifB: NextNotification = { kind: 'N', value: 'B' }; - * const notifE: ErrorNotification = { kind: 'E', error: new TypeError('x.toUpperCase is not a function') }; - * - * const materialized = of(notifA, notifB, notifE); - * - * const upperCase = materialized.pipe(dematerialize()); - * upperCase.subscribe({ - * next: x => console.log(x), - * error: e => console.error(e) - * }); - * - * // Results in: - * // A - * // B - * // TypeError: x.toUpperCase is not a function - * ``` - * - * @see {@link materialize} - * - * @return A function that returns an Observable that emits items and - * notifications embedded in Notification objects emitted by the source - * Observable. - */ -export function dematerialize>(): OperatorFunction> { - return operate((source, subscriber) => { - source.subscribe(createOperatorSubscriber(subscriber, (notification) => observeNotification(notification, subscriber))); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/distinct.ts b/node_modules/rxjs/src/internal/operators/distinct.ts deleted file mode 100644 index 70ed2c2..0000000 --- a/node_modules/rxjs/src/internal/operators/distinct.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { MonoTypeOperatorFunction, ObservableInput } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { noop } from '../util/noop'; -import { innerFrom } from '../observable/innerFrom'; - -/** - * Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from previous items. - * - * If a `keySelector` function is provided, then it will project each value from the source observable into a new value that it will - * check for equality with previously projected values. If the `keySelector` function is not provided, it will use each value from the - * source observable directly with an equality check against previous values. - * - * In JavaScript runtimes that support `Set`, this operator will use a `Set` to improve performance of the distinct value checking. - * - * In other runtimes, this operator will use a minimal implementation of `Set` that relies on an `Array` and `indexOf` under the - * hood, so performance will degrade as more values are checked for distinction. Even in newer browsers, a long-running `distinct` - * use might result in memory leaks. To help alleviate this in some scenarios, an optional `flushes` parameter is also provided so - * that the internal `Set` can be "flushed", basically clearing it of values. - * - * ## Examples - * - * A simple example with numbers - * - * ```ts - * import { of, distinct } from 'rxjs'; - * - * of(1, 1, 2, 2, 2, 1, 2, 3, 4, 3, 2, 1) - * .pipe(distinct()) - * .subscribe(x => console.log(x)); - * - * // Outputs - * // 1 - * // 2 - * // 3 - * // 4 - * ``` - * - * An example using the `keySelector` function - * - * ```ts - * import { of, distinct } from 'rxjs'; - * - * of( - * { age: 4, name: 'Foo'}, - * { age: 7, name: 'Bar'}, - * { age: 5, name: 'Foo'} - * ) - * .pipe(distinct(({ name }) => name)) - * .subscribe(x => console.log(x)); - * - * // Outputs - * // { age: 4, name: 'Foo' } - * // { age: 7, name: 'Bar' } - * ``` - * @see {@link distinctUntilChanged} - * @see {@link distinctUntilKeyChanged} - * - * @param keySelector Optional `function` to select which value you want to check as distinct. - * @param flushes Optional `ObservableInput` for flushing the internal HashSet of the operator. - * @return A function that returns an Observable that emits items from the - * source Observable with distinct values. - */ -export function distinct(keySelector?: (value: T) => K, flushes?: ObservableInput): MonoTypeOperatorFunction { - return operate((source, subscriber) => { - const distinctKeys = new Set(); - source.subscribe( - createOperatorSubscriber(subscriber, (value) => { - const key = keySelector ? keySelector(value) : value; - if (!distinctKeys.has(key)) { - distinctKeys.add(key); - subscriber.next(value); - } - }) - ); - - flushes && innerFrom(flushes).subscribe(createOperatorSubscriber(subscriber, () => distinctKeys.clear(), noop)); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/distinctUntilChanged.ts b/node_modules/rxjs/src/internal/operators/distinctUntilChanged.ts deleted file mode 100644 index 5db2f98..0000000 --- a/node_modules/rxjs/src/internal/operators/distinctUntilChanged.ts +++ /dev/null @@ -1,182 +0,0 @@ -import { MonoTypeOperatorFunction } from '../types'; -import { identity } from '../util/identity'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -export function distinctUntilChanged(comparator?: (previous: T, current: T) => boolean): MonoTypeOperatorFunction; -export function distinctUntilChanged( - comparator: (previous: K, current: K) => boolean, - keySelector: (value: T) => K -): MonoTypeOperatorFunction; - -/** - * Returns a result {@link Observable} that emits all values pushed by the source observable if they - * are distinct in comparison to the last value the result observable emitted. - * - * When provided without parameters or with the first parameter (`{@link distinctUntilChanged#comparator comparator}`), - * it behaves like this: - * - * 1. It will always emit the first value from the source. - * 2. For all subsequent values pushed by the source, they will be compared to the previously emitted values - * using the provided `comparator` or an `===` equality check. - * 3. If the value pushed by the source is determined to be unequal by this check, that value is emitted and - * becomes the new "previously emitted value" internally. - * - * When the second parameter (`{@link distinctUntilChanged#keySelector keySelector}`) is provided, the behavior - * changes: - * - * 1. It will always emit the first value from the source. - * 2. The `keySelector` will be run against all values, including the first value. - * 3. For all values after the first, the selected key will be compared against the key selected from - * the previously emitted value using the `comparator`. - * 4. If the keys are determined to be unequal by this check, the value (not the key), is emitted - * and the selected key from that value is saved for future comparisons against other keys. - * - * ## Examples - * - * A very basic example with no `{@link distinctUntilChanged#comparator comparator}`. Note that `1` is emitted more than once, - * because it's distinct in comparison to the _previously emitted_ value, - * not in comparison to _all other emitted values_. - * - * ```ts - * import { of, distinctUntilChanged } from 'rxjs'; - * - * of(1, 1, 1, 2, 2, 2, 1, 1, 3, 3) - * .pipe(distinctUntilChanged()) - * .subscribe(console.log); - * // Logs: 1, 2, 1, 3 - * ``` - * - * With a `{@link distinctUntilChanged#comparator comparator}`, you can do custom comparisons. Let's say - * you only want to emit a value when all of its components have - * changed: - * - * ```ts - * import { of, distinctUntilChanged } from 'rxjs'; - * - * const totallyDifferentBuilds$ = of( - * { engineVersion: '1.1.0', transmissionVersion: '1.2.0' }, - * { engineVersion: '1.1.0', transmissionVersion: '1.4.0' }, - * { engineVersion: '1.3.0', transmissionVersion: '1.4.0' }, - * { engineVersion: '1.3.0', transmissionVersion: '1.5.0' }, - * { engineVersion: '2.0.0', transmissionVersion: '1.5.0' } - * ).pipe( - * distinctUntilChanged((prev, curr) => { - * return ( - * prev.engineVersion === curr.engineVersion || - * prev.transmissionVersion === curr.transmissionVersion - * ); - * }) - * ); - * - * totallyDifferentBuilds$.subscribe(console.log); - * - * // Logs: - * // { engineVersion: '1.1.0', transmissionVersion: '1.2.0' } - * // { engineVersion: '1.3.0', transmissionVersion: '1.4.0' } - * // { engineVersion: '2.0.0', transmissionVersion: '1.5.0' } - * ``` - * - * You can also provide a custom `{@link distinctUntilChanged#comparator comparator}` to check that emitted - * changes are only in one direction. Let's say you only want to get - * the next record temperature: - * - * ```ts - * import { of, distinctUntilChanged } from 'rxjs'; - * - * const temps$ = of(30, 31, 20, 34, 33, 29, 35, 20); - * - * const recordHighs$ = temps$.pipe( - * distinctUntilChanged((prevHigh, temp) => { - * // If the current temp is less than - * // or the same as the previous record, - * // the record hasn't changed. - * return temp <= prevHigh; - * }) - * ); - * - * recordHighs$.subscribe(console.log); - * // Logs: 30, 31, 34, 35 - * ``` - * - * Selecting update events only when the `updatedBy` field shows - * the account changed hands. - * - * ```ts - * import { of, distinctUntilChanged } from 'rxjs'; - * - * // A stream of updates to a given account - * const accountUpdates$ = of( - * { updatedBy: 'blesh', data: [] }, - * { updatedBy: 'blesh', data: [] }, - * { updatedBy: 'ncjamieson', data: [] }, - * { updatedBy: 'ncjamieson', data: [] }, - * { updatedBy: 'blesh', data: [] } - * ); - * - * // We only want the events where it changed hands - * const changedHands$ = accountUpdates$.pipe( - * distinctUntilChanged(undefined, update => update.updatedBy) - * ); - * - * changedHands$.subscribe(console.log); - * // Logs: - * // { updatedBy: 'blesh', data: Array[0] } - * // { updatedBy: 'ncjamieson', data: Array[0] } - * // { updatedBy: 'blesh', data: Array[0] } - * ``` - * - * @see {@link distinct} - * @see {@link distinctUntilKeyChanged} - * - * @param comparator A function used to compare the previous and current keys for - * equality. Defaults to a `===` check. - * @param keySelector Used to select a key value to be passed to the `comparator`. - * - * @return A function that returns an Observable that emits items from the - * source Observable with distinct values. - */ -export function distinctUntilChanged( - comparator?: (previous: K, current: K) => boolean, - keySelector: (value: T) => K = identity as (value: T) => K -): MonoTypeOperatorFunction { - // We've been allowing `null` do be passed as the `compare`, so we can't do - // a default value for the parameter, because that will only work - // for `undefined`. - comparator = comparator ?? defaultCompare; - - return operate((source, subscriber) => { - // The previous key, used to compare against keys selected - // from new arrivals to determine "distinctiveness". - let previousKey: K; - // Whether or not this is the first value we've gotten. - let first = true; - - source.subscribe( - createOperatorSubscriber(subscriber, (value) => { - // We always call the key selector. - const currentKey = keySelector(value); - - // If it's the first value, we always emit it. - // Otherwise, we compare this key to the previous key, and - // if the comparer returns false, we emit. - if (first || !comparator!(previousKey, currentKey)) { - // Update our state *before* we emit the value - // as emission can be the source of re-entrant code - // in functional libraries like this. We only really - // need to do this if it's the first value, or if the - // key we're tracking in previous needs to change. - first = false; - previousKey = currentKey; - - // Emit the value! - subscriber.next(value); - } - }) - ); - }); -} - -function defaultCompare(a: any, b: any) { - return a === b; -} diff --git a/node_modules/rxjs/src/internal/operators/distinctUntilKeyChanged.ts b/node_modules/rxjs/src/internal/operators/distinctUntilKeyChanged.ts deleted file mode 100644 index b7c4593..0000000 --- a/node_modules/rxjs/src/internal/operators/distinctUntilKeyChanged.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { distinctUntilChanged } from './distinctUntilChanged'; -import { MonoTypeOperatorFunction } from '../types'; - -export function distinctUntilKeyChanged(key: keyof T): MonoTypeOperatorFunction; -export function distinctUntilKeyChanged(key: K, compare: (x: T[K], y: T[K]) => boolean): MonoTypeOperatorFunction; - -/** - * Returns an Observable that emits all items emitted by the source Observable that - * are distinct by comparison from the previous item, using a property accessed by - * using the key provided to check if the two items are distinct. - * - * If a comparator function is provided, then it will be called for each item to - * test for whether that value should be emitted or not. - * - * If a comparator function is not provided, an equality check is used by default. - * - * ## Examples - * - * An example comparing the name of persons - * - * ```ts - * import { of, distinctUntilKeyChanged } from 'rxjs'; - * - * of( - * { age: 4, name: 'Foo' }, - * { age: 7, name: 'Bar' }, - * { age: 5, name: 'Foo' }, - * { age: 6, name: 'Foo' } - * ).pipe( - * distinctUntilKeyChanged('name') - * ) - * .subscribe(x => console.log(x)); - * - * // displays: - * // { age: 4, name: 'Foo' } - * // { age: 7, name: 'Bar' } - * // { age: 5, name: 'Foo' } - * ``` - * - * An example comparing the first letters of the name - * - * ```ts - * import { of, distinctUntilKeyChanged } from 'rxjs'; - * - * of( - * { age: 4, name: 'Foo1' }, - * { age: 7, name: 'Bar' }, - * { age: 5, name: 'Foo2' }, - * { age: 6, name: 'Foo3' } - * ).pipe( - * distinctUntilKeyChanged('name', (x, y) => x.substring(0, 3) === y.substring(0, 3)) - * ) - * .subscribe(x => console.log(x)); - * - * // displays: - * // { age: 4, name: 'Foo1' } - * // { age: 7, name: 'Bar' } - * // { age: 5, name: 'Foo2' } - * ``` - * - * @see {@link distinct} - * @see {@link distinctUntilChanged} - * - * @param key String key for object property lookup on each item. - * @param compare Optional comparison function called to test if an item is distinct - * from the previous item in the source. - * @return A function that returns an Observable that emits items from the source - * Observable with distinct values based on the key specified. - */ -export function distinctUntilKeyChanged( - key: K, - compare?: (x: T[K], y: T[K]) => boolean -): MonoTypeOperatorFunction { - return distinctUntilChanged((x: T, y: T) => (compare ? compare(x[key], y[key]) : x[key] === y[key])); -} diff --git a/node_modules/rxjs/src/internal/operators/elementAt.ts b/node_modules/rxjs/src/internal/operators/elementAt.ts deleted file mode 100644 index 47a1d34..0000000 --- a/node_modules/rxjs/src/internal/operators/elementAt.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError'; -import { Observable } from '../Observable'; -import { OperatorFunction } from '../types'; -import { filter } from './filter'; -import { throwIfEmpty } from './throwIfEmpty'; -import { defaultIfEmpty } from './defaultIfEmpty'; -import { take } from './take'; - -/** - * Emits the single value at the specified `index` in a sequence of emissions - * from the source Observable. - * - * Emits only the i-th value, then completes. - * - * ![](elementAt.png) - * - * `elementAt` returns an Observable that emits the item at the specified - * `index` in the source Observable, or a default value if that `index` is out - * of range and the `default` argument is provided. If the `default` argument is - * not given and the `index` is out of range, the output Observable will emit an - * `ArgumentOutOfRangeError` error. - * - * ## Example - * - * Emit only the third click event - * - * ```ts - * import { fromEvent, elementAt } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe(elementAt(2)); - * result.subscribe(x => console.log(x)); - * - * // Results in: - * // click 1 = nothing - * // click 2 = nothing - * // click 3 = MouseEvent object logged to console - * ``` - * - * @see {@link first} - * @see {@link last} - * @see {@link skip} - * @see {@link single} - * @see {@link take} - * - * @throws {ArgumentOutOfRangeError} When using `elementAt(i)`, it delivers an - * `ArgumentOutOfRangeError` to the Observer's `error` callback if `i < 0` or the - * Observable has completed before emitting the i-th `next` notification. - * - * @param index Is the number `i` for the i-th source emission that has happened - * since the subscription, starting from the number `0`. - * @param defaultValue The default value returned for missing indices. - * @return A function that returns an Observable that emits a single item, if - * it is found. Otherwise, it will emit the default value if given. If not, it - * emits an error. - */ -export function elementAt(index: number, defaultValue?: D): OperatorFunction { - if (index < 0) { - throw new ArgumentOutOfRangeError(); - } - const hasDefaultValue = arguments.length >= 2; - return (source: Observable) => - source.pipe( - filter((v, i) => i === index), - take(1), - hasDefaultValue ? defaultIfEmpty(defaultValue!) : throwIfEmpty(() => new ArgumentOutOfRangeError()) - ); -} diff --git a/node_modules/rxjs/src/internal/operators/endWith.ts b/node_modules/rxjs/src/internal/operators/endWith.ts deleted file mode 100644 index 436e5b3..0000000 --- a/node_modules/rxjs/src/internal/operators/endWith.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** prettier */ -import { Observable } from '../Observable'; -import { concat } from '../observable/concat'; -import { of } from '../observable/of'; -import { MonoTypeOperatorFunction, SchedulerLike, OperatorFunction, ValueFromArray } from '../types'; - -/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `concatAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ -export function endWith(scheduler: SchedulerLike): MonoTypeOperatorFunction; -/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `concatAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ -export function endWith( - ...valuesAndScheduler: [...A, SchedulerLike] -): OperatorFunction>; - -export function endWith(...values: A): OperatorFunction>; - -/** - * Returns an observable that will emit all values from the source, then synchronously emit - * the provided value(s) immediately after the source completes. - * - * NOTE: Passing a last argument of a Scheduler is _deprecated_, and may result in incorrect - * types in TypeScript. - * - * This is useful for knowing when an observable ends. Particularly when paired with an - * operator like {@link takeUntil} - * - * ![](endWith.png) - * - * ## Example - * - * Emit values to know when an interval starts and stops. The interval will - * stop when a user clicks anywhere on the document. - * - * ```ts - * import { interval, map, fromEvent, startWith, takeUntil, endWith } from 'rxjs'; - * - * const ticker$ = interval(5000).pipe( - * map(() => 'tick') - * ); - * - * const documentClicks$ = fromEvent(document, 'click'); - * - * ticker$.pipe( - * startWith('interval started'), - * takeUntil(documentClicks$), - * endWith('interval ended by click') - * ) - * .subscribe(x => console.log(x)); - * - * // Result (assuming a user clicks after 15 seconds) - * // 'interval started' - * // 'tick' - * // 'tick' - * // 'tick' - * // 'interval ended by click' - * ``` - * - * @see {@link startWith} - * @see {@link concat} - * @see {@link takeUntil} - * - * @param values Items you want the modified Observable to emit last. - * @return A function that returns an Observable that emits all values from the - * source, then synchronously emits the provided value(s) immediately after the - * source completes. - */ -export function endWith(...values: Array): MonoTypeOperatorFunction { - return (source: Observable) => concat(source, of(...values)) as Observable; -} diff --git a/node_modules/rxjs/src/internal/operators/every.ts b/node_modules/rxjs/src/internal/operators/every.ts deleted file mode 100644 index a6a86bf..0000000 --- a/node_modules/rxjs/src/internal/operators/every.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { Observable } from '../Observable'; -import { Falsy, OperatorFunction } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -export function every(predicate: BooleanConstructor): OperatorFunction extends never ? false : boolean>; -/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ -export function every( - predicate: BooleanConstructor, - thisArg: any -): OperatorFunction extends never ? false : boolean>; -/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ -export function every( - predicate: (this: A, value: T, index: number, source: Observable) => boolean, - thisArg: A -): OperatorFunction; -export function every(predicate: (value: T, index: number, source: Observable) => boolean): OperatorFunction; - -/** - * Returns an Observable that emits whether or not every item of the source satisfies the condition specified. - * - * If all values pass predicate before the source completes, emits true before completion, - * otherwise emit false, then complete. - * - * ![](every.png) - * - * ## Example - * - * A simple example emitting true if all elements are less than 5, false otherwise - * - * ```ts - * import { of, every } from 'rxjs'; - * - * of(1, 2, 3, 4, 5, 6) - * .pipe(every(x => x < 5)) - * .subscribe(x => console.log(x)); // -> false - * ``` - * - * @param predicate A function for determining if an item meets a specified condition. - * @param thisArg Optional object to use for `this` in the callback. - * @return A function that returns an Observable of booleans that determines if - * all items of the source Observable meet the condition specified. - */ -export function every( - predicate: (value: T, index: number, source: Observable) => boolean, - thisArg?: any -): OperatorFunction { - return operate((source, subscriber) => { - let index = 0; - source.subscribe( - createOperatorSubscriber( - subscriber, - (value) => { - if (!predicate.call(thisArg, value, index++, source)) { - subscriber.next(false); - subscriber.complete(); - } - }, - () => { - subscriber.next(true); - subscriber.complete(); - } - ) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/exhaust.ts b/node_modules/rxjs/src/internal/operators/exhaust.ts deleted file mode 100644 index a4410db..0000000 --- a/node_modules/rxjs/src/internal/operators/exhaust.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { exhaustAll } from './exhaustAll'; - -/** - * @deprecated Renamed to {@link exhaustAll}. Will be removed in v8. - */ -export const exhaust = exhaustAll; diff --git a/node_modules/rxjs/src/internal/operators/exhaustAll.ts b/node_modules/rxjs/src/internal/operators/exhaustAll.ts deleted file mode 100644 index 4a58a5e..0000000 --- a/node_modules/rxjs/src/internal/operators/exhaustAll.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { OperatorFunction, ObservableInput, ObservedValueOf } from '../types'; -import { exhaustMap } from './exhaustMap'; -import { identity } from '../util/identity'; - -/** - * Converts a higher-order Observable into a first-order Observable by dropping - * inner Observables while the previous inner Observable has not yet completed. - * - * Flattens an Observable-of-Observables by dropping the - * next inner Observables while the current inner is still executing. - * - * ![](exhaustAll.svg) - * - * `exhaustAll` subscribes to an Observable that emits Observables, also known as a - * higher-order Observable. Each time it observes one of these emitted inner - * Observables, the output Observable begins emitting the items emitted by that - * inner Observable. So far, it behaves like {@link mergeAll}. However, - * `exhaustAll` ignores every new inner Observable if the previous Observable has - * not yet completed. Once that one completes, it will accept and flatten the - * next inner Observable and repeat this process. - * - * ## Example - * - * Run a finite timer for each click, only if there is no currently active timer - * - * ```ts - * import { fromEvent, map, interval, take, exhaustAll } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const higherOrder = clicks.pipe( - * map(() => interval(1000).pipe(take(5))) - * ); - * const result = higherOrder.pipe(exhaustAll()); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link combineLatestAll} - * @see {@link concatAll} - * @see {@link switchAll} - * @see {@link switchMap} - * @see {@link mergeAll} - * @see {@link exhaustMap} - * @see {@link zipAll} - * - * @return A function that returns an Observable that takes a source of - * Observables and propagates the first Observable exclusively until it - * completes before subscribing to the next. - */ -export function exhaustAll>(): OperatorFunction> { - return exhaustMap(identity); -} diff --git a/node_modules/rxjs/src/internal/operators/exhaustMap.ts b/node_modules/rxjs/src/internal/operators/exhaustMap.ts deleted file mode 100644 index bf66683..0000000 --- a/node_modules/rxjs/src/internal/operators/exhaustMap.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { Observable } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; -import { map } from './map'; -import { innerFrom } from '../observable/innerFrom'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -/* tslint:disable:max-line-length */ -export function exhaustMap>( - project: (value: T, index: number) => O -): OperatorFunction>; -/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ -export function exhaustMap>( - project: (value: T, index: number) => O, - resultSelector: undefined -): OperatorFunction>; -/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ -export function exhaustMap( - project: (value: T, index: number) => ObservableInput, - resultSelector: (outerValue: T, innerValue: I, outerIndex: number, innerIndex: number) => R -): OperatorFunction; -/* tslint:enable:max-line-length */ - -/** - * Projects each source value to an Observable which is merged in the output - * Observable only if the previous projected Observable has completed. - * - * Maps each value to an Observable, then flattens all of - * these inner Observables using {@link exhaustAll}. - * - * ![](exhaustMap.png) - * - * Returns an Observable that emits items based on applying a function that you - * supply to each item emitted by the source Observable, where that function - * returns an (so-called "inner") Observable. When it projects a source value to - * an Observable, the output Observable begins emitting the items emitted by - * that projected Observable. However, `exhaustMap` ignores every new projected - * Observable if the previous projected Observable has not yet completed. Once - * that one completes, it will accept and flatten the next projected Observable - * and repeat this process. - * - * ## Example - * - * Run a finite timer for each click, only if there is no currently active timer - * - * ```ts - * import { fromEvent, exhaustMap, interval, take } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe( - * exhaustMap(() => interval(1000).pipe(take(5))) - * ); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link concatMap} - * @see {@link exhaust} - * @see {@link mergeMap} - * @see {@link switchMap} - * - * @param project A function that, when applied to an item emitted by the source - * Observable, returns an Observable. - * @return A function that returns an Observable containing projected - * Observables of each item of the source, ignoring projected Observables that - * start before their preceding Observable has completed. - */ -export function exhaustMap>( - project: (value: T, index: number) => O, - resultSelector?: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R -): OperatorFunction | R> { - if (resultSelector) { - // DEPRECATED PATH - return (source: Observable) => - source.pipe(exhaustMap((a, i) => innerFrom(project(a, i)).pipe(map((b: any, ii: any) => resultSelector(a, b, i, ii))))); - } - return operate((source, subscriber) => { - let index = 0; - let innerSub: Subscriber | null = null; - let isComplete = false; - source.subscribe( - createOperatorSubscriber( - subscriber, - (outerValue) => { - if (!innerSub) { - innerSub = createOperatorSubscriber(subscriber, undefined, () => { - innerSub = null; - isComplete && subscriber.complete(); - }); - innerFrom(project(outerValue, index++)).subscribe(innerSub); - } - }, - () => { - isComplete = true; - !innerSub && subscriber.complete(); - } - ) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/expand.ts b/node_modules/rxjs/src/internal/operators/expand.ts deleted file mode 100644 index 481a373..0000000 --- a/node_modules/rxjs/src/internal/operators/expand.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { OperatorFunction, ObservableInput, ObservedValueOf, SchedulerLike } from '../types'; -import { operate } from '../util/lift'; -import { mergeInternals } from './mergeInternals'; - -/* tslint:disable:max-line-length */ -export function expand>( - project: (value: T, index: number) => O, - concurrent?: number, - scheduler?: SchedulerLike -): OperatorFunction>; -/** - * @deprecated The `scheduler` parameter will be removed in v8. If you need to schedule the inner subscription, - * use `subscribeOn` within the projection function: `expand((value) => fn(value).pipe(subscribeOn(scheduler)))`. - * Details: Details: https://rxjs.dev/deprecations/scheduler-argument - */ -export function expand>( - project: (value: T, index: number) => O, - concurrent: number | undefined, - scheduler: SchedulerLike -): OperatorFunction>; -/* tslint:enable:max-line-length */ - -/** - * Recursively projects each source value to an Observable which is merged in - * the output Observable. - * - * It's similar to {@link mergeMap}, but applies the - * projection function to every source value as well as every output value. - * It's recursive. - * - * ![](expand.png) - * - * Returns an Observable that emits items based on applying a function that you - * supply to each item emitted by the source Observable, where that function - * returns an Observable, and then merging those resulting Observables and - * emitting the results of this merger. *Expand* will re-emit on the output - * Observable every source value. Then, each output value is given to the - * `project` function which returns an inner Observable to be merged on the - * output Observable. Those output values resulting from the projection are also - * given to the `project` function to produce new output values. This is how - * *expand* behaves recursively. - * - * ## Example - * - * Start emitting the powers of two on every click, at most 10 of them - * - * ```ts - * import { fromEvent, map, expand, of, delay, take } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const powersOfTwo = clicks.pipe( - * map(() => 1), - * expand(x => of(2 * x).pipe(delay(1000))), - * take(10) - * ); - * powersOfTwo.subscribe(x => console.log(x)); - * ``` - * - * @see {@link mergeMap} - * @see {@link mergeScan} - * - * @param project A function that, when applied to an item emitted by the source - * or the output Observable, returns an Observable. - * @param concurrent Maximum number of input Observables being subscribed to - * concurrently. - * @param scheduler The {@link SchedulerLike} to use for subscribing to - * each projected inner Observable. - * @return A function that returns an Observable that emits the source values - * and also result of applying the projection function to each value emitted on - * the output Observable and merging the results of the Observables obtained - * from this transformation. - */ -export function expand>( - project: (value: T, index: number) => O, - concurrent = Infinity, - scheduler?: SchedulerLike -): OperatorFunction> { - concurrent = (concurrent || 0) < 1 ? Infinity : concurrent; - return operate((source, subscriber) => - mergeInternals( - // General merge params - source, - subscriber, - project, - concurrent, - - // onBeforeNext - undefined, - - // Expand-specific - true, // Use expand path - scheduler // Inner subscription scheduler - ) - ); -} diff --git a/node_modules/rxjs/src/internal/operators/filter.ts b/node_modules/rxjs/src/internal/operators/filter.ts deleted file mode 100644 index ccc1dec..0000000 --- a/node_modules/rxjs/src/internal/operators/filter.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { OperatorFunction, MonoTypeOperatorFunction, TruthyTypesOf } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ -export function filter(predicate: (this: A, value: T, index: number) => value is S, thisArg: A): OperatorFunction; -export function filter(predicate: (value: T, index: number) => value is S): OperatorFunction; -export function filter(predicate: BooleanConstructor): OperatorFunction>; -/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ -export function filter(predicate: (this: A, value: T, index: number) => boolean, thisArg: A): MonoTypeOperatorFunction; -export function filter(predicate: (value: T, index: number) => boolean): MonoTypeOperatorFunction; - -/** - * Filter items emitted by the source Observable by only emitting those that - * satisfy a specified predicate. - * - * Like - * [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter), - * it only emits a value from the source if it passes a criterion function. - * - * ![](filter.png) - * - * Similar to the well-known `Array.prototype.filter` method, this operator - * takes values from the source Observable, passes them through a `predicate` - * function and only emits those values that yielded `true`. - * - * ## Example - * - * Emit only click events whose target was a DIV element - * - * ```ts - * import { fromEvent, filter } from 'rxjs'; - * - * const div = document.createElement('div'); - * div.style.cssText = 'width: 200px; height: 200px; background: #09c;'; - * document.body.appendChild(div); - * - * const clicks = fromEvent(document, 'click'); - * const clicksOnDivs = clicks.pipe(filter(ev => (ev.target).tagName === 'DIV')); - * clicksOnDivs.subscribe(x => console.log(x)); - * ``` - * - * @see {@link distinct} - * @see {@link distinctUntilChanged} - * @see {@link distinctUntilKeyChanged} - * @see {@link ignoreElements} - * @see {@link partition} - * @see {@link skip} - * - * @param predicate A function that - * evaluates each value emitted by the source Observable. If it returns `true`, - * the value is emitted, if `false` the value is not passed to the output - * Observable. The `index` parameter is the number `i` for the i-th source - * emission that has happened since the subscription, starting from the number - * `0`. - * @param thisArg An optional argument to determine the value of `this` - * in the `predicate` function. - * @return A function that returns an Observable that emits items from the - * source Observable that satisfy the specified `predicate`. - */ -export function filter(predicate: (value: T, index: number) => boolean, thisArg?: any): MonoTypeOperatorFunction { - return operate((source, subscriber) => { - // An index passed to our predicate function on each call. - let index = 0; - - // Subscribe to the source, all errors and completions are - // forwarded to the consumer. - source.subscribe( - // Call the predicate with the appropriate `this` context, - // if the predicate returns `true`, then send the value - // to the consumer. - createOperatorSubscriber(subscriber, (value) => predicate.call(thisArg, value, index++) && subscriber.next(value)) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/finalize.ts b/node_modules/rxjs/src/internal/operators/finalize.ts deleted file mode 100644 index 12821fd..0000000 --- a/node_modules/rxjs/src/internal/operators/finalize.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { MonoTypeOperatorFunction } from '../types'; -import { operate } from '../util/lift'; - -/** - * Returns an Observable that mirrors the source Observable, but will call a specified function when - * the source terminates on complete or error. - * The specified function will also be called when the subscriber explicitly unsubscribes. - * - * ## Examples - * - * Execute callback function when the observable completes - * - * ```ts - * import { interval, take, finalize } from 'rxjs'; - * - * // emit value in sequence every 1 second - * const source = interval(1000); - * const example = source.pipe( - * take(5), //take only the first 5 values - * finalize(() => console.log('Sequence complete')) // Execute when the observable completes - * ); - * const subscribe = example.subscribe(val => console.log(val)); - * - * // results: - * // 0 - * // 1 - * // 2 - * // 3 - * // 4 - * // 'Sequence complete' - * ``` - * - * Execute callback function when the subscriber explicitly unsubscribes - * - * ```ts - * import { interval, finalize, tap, noop, timer } from 'rxjs'; - * - * const source = interval(100).pipe( - * finalize(() => console.log('[finalize] Called')), - * tap({ - * next: () => console.log('[next] Called'), - * error: () => console.log('[error] Not called'), - * complete: () => console.log('[tap complete] Not called') - * }) - * ); - * - * const sub = source.subscribe({ - * next: x => console.log(x), - * error: noop, - * complete: () => console.log('[complete] Not called') - * }); - * - * timer(150).subscribe(() => sub.unsubscribe()); - * - * // results: - * // '[next] Called' - * // 0 - * // '[finalize] Called' - * ``` - * - * @param callback Function to be called when source terminates. - * @return A function that returns an Observable that mirrors the source, but - * will call the specified function on termination. - */ -export function finalize(callback: () => void): MonoTypeOperatorFunction { - return operate((source, subscriber) => { - // TODO: This try/finally was only added for `useDeprecatedSynchronousErrorHandling`. - // REMOVE THIS WHEN THAT HOT GARBAGE IS REMOVED IN V8. - try { - source.subscribe(subscriber); - } finally { - subscriber.add(callback); - } - }); -} diff --git a/node_modules/rxjs/src/internal/operators/find.ts b/node_modules/rxjs/src/internal/operators/find.ts deleted file mode 100644 index 0697abf..0000000 --- a/node_modules/rxjs/src/internal/operators/find.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { Observable } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { OperatorFunction, TruthyTypesOf } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -export function find(predicate: BooleanConstructor): OperatorFunction>; -/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ -export function find( - predicate: (this: A, value: T, index: number, source: Observable) => value is S, - thisArg: A -): OperatorFunction; -export function find( - predicate: (value: T, index: number, source: Observable) => value is S -): OperatorFunction; -/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ -export function find( - predicate: (this: A, value: T, index: number, source: Observable) => boolean, - thisArg: A -): OperatorFunction; -export function find(predicate: (value: T, index: number, source: Observable) => boolean): OperatorFunction; -/** - * Emits only the first value emitted by the source Observable that meets some - * condition. - * - * Finds the first value that passes some test and emits - * that. - * - * ![](find.png) - * - * `find` searches for the first item in the source Observable that matches the - * specified condition embodied by the `predicate`, and returns the first - * occurrence in the source. Unlike {@link first}, the `predicate` is required - * in `find`, and does not emit an error if a valid value is not found - * (emits `undefined` instead). - * - * ## Example - * - * Find and emit the first click that happens on a DIV element - * - * ```ts - * import { fromEvent, find } from 'rxjs'; - * - * const div = document.createElement('div'); - * div.style.cssText = 'width: 200px; height: 200px; background: #09c;'; - * document.body.appendChild(div); - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe(find(ev => (ev.target).tagName === 'DIV')); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link filter} - * @see {@link first} - * @see {@link findIndex} - * @see {@link take} - * - * @param predicate A function called with each item to test for condition matching. - * @param thisArg An optional argument to determine the value of `this` in the - * `predicate` function. - * @return A function that returns an Observable that emits the first item that - * matches the condition. - */ -export function find( - predicate: (value: T, index: number, source: Observable) => boolean, - thisArg?: any -): OperatorFunction { - return operate(createFind(predicate, thisArg, 'value')); -} - -export function createFind( - predicate: (value: T, index: number, source: Observable) => boolean, - thisArg: any, - emit: 'value' | 'index' -) { - const findIndex = emit === 'index'; - return (source: Observable, subscriber: Subscriber) => { - let index = 0; - source.subscribe( - createOperatorSubscriber( - subscriber, - (value) => { - const i = index++; - if (predicate.call(thisArg, value, i, source)) { - subscriber.next(findIndex ? i : value); - subscriber.complete(); - } - }, - () => { - subscriber.next(findIndex ? -1 : undefined); - subscriber.complete(); - } - ) - ); - }; -} diff --git a/node_modules/rxjs/src/internal/operators/findIndex.ts b/node_modules/rxjs/src/internal/operators/findIndex.ts deleted file mode 100644 index e1ef757..0000000 --- a/node_modules/rxjs/src/internal/operators/findIndex.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Observable } from '../Observable'; -import { Falsy, OperatorFunction } from '../types'; -import { operate } from '../util/lift'; -import { createFind } from './find'; - -export function findIndex(predicate: BooleanConstructor): OperatorFunction; -/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ -export function findIndex(predicate: BooleanConstructor, thisArg: any): OperatorFunction; -/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ -export function findIndex( - predicate: (this: A, value: T, index: number, source: Observable) => boolean, - thisArg: A -): OperatorFunction; -export function findIndex(predicate: (value: T, index: number, source: Observable) => boolean): OperatorFunction; - -/** - * Emits only the index of the first value emitted by the source Observable that - * meets some condition. - * - * It's like {@link find}, but emits the index of the - * found value, not the value itself. - * - * ![](findIndex.png) - * - * `findIndex` searches for the first item in the source Observable that matches - * the specified condition embodied by the `predicate`, and returns the - * (zero-based) index of the first occurrence in the source. Unlike - * {@link first}, the `predicate` is required in `findIndex`, and does not emit - * an error if a valid value is not found. - * - * ## Example - * - * Emit the index of first click that happens on a DIV element - * - * ```ts - * import { fromEvent, findIndex } from 'rxjs'; - * - * const div = document.createElement('div'); - * div.style.cssText = 'width: 200px; height: 200px; background: #09c;'; - * document.body.appendChild(div); - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe(findIndex(ev => (ev.target).tagName === 'DIV')); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link filter} - * @see {@link find} - * @see {@link first} - * @see {@link take} - * - * @param predicate A function called with each item to test for condition matching. - * @param thisArg An optional argument to determine the value of `this` in the - * `predicate` function. - * @return A function that returns an Observable that emits the index of the - * first item that matches the condition. - */ -export function findIndex( - predicate: (value: T, index: number, source: Observable) => boolean, - thisArg?: any -): OperatorFunction { - return operate(createFind(predicate, thisArg, 'index')); -} diff --git a/node_modules/rxjs/src/internal/operators/first.ts b/node_modules/rxjs/src/internal/operators/first.ts deleted file mode 100644 index 337aa59..0000000 --- a/node_modules/rxjs/src/internal/operators/first.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { Observable } from '../Observable'; -import { EmptyError } from '../util/EmptyError'; -import { OperatorFunction, TruthyTypesOf } from '../types'; -import { filter } from './filter'; -import { take } from './take'; -import { defaultIfEmpty } from './defaultIfEmpty'; -import { throwIfEmpty } from './throwIfEmpty'; -import { identity } from '../util/identity'; - -export function first(predicate?: null, defaultValue?: D): OperatorFunction; -export function first(predicate: BooleanConstructor): OperatorFunction>; -export function first(predicate: BooleanConstructor, defaultValue: D): OperatorFunction | D>; -export function first( - predicate: (value: T, index: number, source: Observable) => value is S, - defaultValue?: S -): OperatorFunction; -export function first( - predicate: (value: T, index: number, source: Observable) => value is S, - defaultValue: D -): OperatorFunction; -export function first( - predicate: (value: T, index: number, source: Observable) => boolean, - defaultValue?: D -): OperatorFunction; - -/** - * Emits only the first value (or the first value that meets some condition) - * emitted by the source Observable. - * - * Emits only the first value. Or emits only the first - * value that passes some test. - * - * ![](first.png) - * - * If called with no arguments, `first` emits the first value of the source - * Observable, then completes. If called with a `predicate` function, `first` - * emits the first value of the source that matches the specified condition. Emits an error - * notification if `defaultValue` was not provided and a matching element is not found. - * - * ## Examples - * - * Emit only the first click that happens on the DOM - * - * ```ts - * import { fromEvent, first } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe(first()); - * result.subscribe(x => console.log(x)); - * ``` - * - * Emits the first click that happens on a DIV - * - * ```ts - * import { fromEvent, first } from 'rxjs'; - * - * const div = document.createElement('div'); - * div.style.cssText = 'width: 200px; height: 200px; background: #09c;'; - * document.body.appendChild(div); - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe(first(ev => (ev.target).tagName === 'DIV')); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link filter} - * @see {@link find} - * @see {@link take} - * @see {@link last} - * - * @throws {EmptyError} Delivers an `EmptyError` to the Observer's `error` - * callback if the Observable completes before any `next` notification was sent. - * This is how `first()` is different from `take(1)` which completes instead. - * - * @param predicate An optional function called with each item to test for condition - * matching. - * @param defaultValue The default value emitted in case no valid value was found on - * the source. - * @return A function that returns an Observable that emits the first item that - * matches the condition. - */ -export function first( - predicate?: ((value: T, index: number, source: Observable) => boolean) | null, - defaultValue?: D -): OperatorFunction { - const hasDefaultValue = arguments.length >= 2; - return (source: Observable) => - source.pipe( - predicate ? filter((v, i) => predicate(v, i, source)) : identity, - take(1), - hasDefaultValue ? defaultIfEmpty(defaultValue!) : throwIfEmpty(() => new EmptyError()) - ); -} diff --git a/node_modules/rxjs/src/internal/operators/flatMap.ts b/node_modules/rxjs/src/internal/operators/flatMap.ts deleted file mode 100644 index 817917c..0000000 --- a/node_modules/rxjs/src/internal/operators/flatMap.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { mergeMap } from './mergeMap'; - -/** - * @deprecated Renamed to {@link mergeMap}. Will be removed in v8. - */ -export const flatMap = mergeMap; diff --git a/node_modules/rxjs/src/internal/operators/groupBy.ts b/node_modules/rxjs/src/internal/operators/groupBy.ts deleted file mode 100644 index 17bbb9a..0000000 --- a/node_modules/rxjs/src/internal/operators/groupBy.ts +++ /dev/null @@ -1,288 +0,0 @@ -import { Observable } from '../Observable'; -import { innerFrom } from '../observable/innerFrom'; -import { Subject } from '../Subject'; -import { ObservableInput, Observer, OperatorFunction, SubjectLike } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber, OperatorSubscriber } from './OperatorSubscriber'; - -export interface BasicGroupByOptions { - element?: undefined; - duration?: (grouped: GroupedObservable) => ObservableInput; - connector?: () => SubjectLike; -} - -export interface GroupByOptionsWithElement { - element: (value: T) => E; - duration?: (grouped: GroupedObservable) => ObservableInput; - connector?: () => SubjectLike; -} - -export function groupBy(key: (value: T) => K, options: BasicGroupByOptions): OperatorFunction>; - -export function groupBy( - key: (value: T) => K, - options: GroupByOptionsWithElement -): OperatorFunction>; - -export function groupBy( - key: (value: T) => value is K -): OperatorFunction | GroupedObservable>>; - -export function groupBy(key: (value: T) => K): OperatorFunction>; - -/** - * @deprecated use the options parameter instead. - */ -export function groupBy( - key: (value: T) => K, - element: void, - duration: (grouped: GroupedObservable) => Observable -): OperatorFunction>; - -/** - * @deprecated use the options parameter instead. - */ -export function groupBy( - key: (value: T) => K, - element?: (value: T) => R, - duration?: (grouped: GroupedObservable) => Observable -): OperatorFunction>; - -/** - * Groups the items emitted by an Observable according to a specified criterion, - * and emits these grouped items as `GroupedObservables`, one - * {@link GroupedObservable} per group. - * - * ![](groupBy.png) - * - * When the Observable emits an item, a key is computed for this item with the key function. - * - * If a {@link GroupedObservable} for this key exists, this {@link GroupedObservable} emits. Otherwise, a new - * {@link GroupedObservable} for this key is created and emits. - * - * A {@link GroupedObservable} represents values belonging to the same group represented by a common key. The common - * key is available as the `key` field of a {@link GroupedObservable} instance. - * - * The elements emitted by {@link GroupedObservable}s are by default the items emitted by the Observable, or elements - * returned by the element function. - * - * ## Examples - * - * Group objects by `id` and return as array - * - * ```ts - * import { of, groupBy, mergeMap, reduce } from 'rxjs'; - * - * of( - * { id: 1, name: 'JavaScript' }, - * { id: 2, name: 'Parcel' }, - * { id: 2, name: 'webpack' }, - * { id: 1, name: 'TypeScript' }, - * { id: 3, name: 'TSLint' } - * ).pipe( - * groupBy(p => p.id), - * mergeMap(group$ => group$.pipe(reduce((acc, cur) => [...acc, cur], []))) - * ) - * .subscribe(p => console.log(p)); - * - * // displays: - * // [{ id: 1, name: 'JavaScript' }, { id: 1, name: 'TypeScript'}] - * // [{ id: 2, name: 'Parcel' }, { id: 2, name: 'webpack'}] - * // [{ id: 3, name: 'TSLint' }] - * ``` - * - * Pivot data on the `id` field - * - * ```ts - * import { of, groupBy, mergeMap, reduce, map } from 'rxjs'; - * - * of( - * { id: 1, name: 'JavaScript' }, - * { id: 2, name: 'Parcel' }, - * { id: 2, name: 'webpack' }, - * { id: 1, name: 'TypeScript' }, - * { id: 3, name: 'TSLint' } - * ).pipe( - * groupBy(p => p.id, { element: p => p.name }), - * mergeMap(group$ => group$.pipe(reduce((acc, cur) => [...acc, cur], [`${ group$.key }`]))), - * map(arr => ({ id: parseInt(arr[0], 10), values: arr.slice(1) })) - * ) - * .subscribe(p => console.log(p)); - * - * // displays: - * // { id: 1, values: [ 'JavaScript', 'TypeScript' ] } - * // { id: 2, values: [ 'Parcel', 'webpack' ] } - * // { id: 3, values: [ 'TSLint' ] } - * ``` - * - * @param key A function that extracts the key - * for each item. - * @param element A function that extracts the - * return element for each item. - * @param duration - * A function that returns an Observable to determine how long each group should - * exist. - * @param connector Factory function to create an - * intermediate Subject through which grouped elements are emitted. - * @return A function that returns an Observable that emits GroupedObservables, - * each of which corresponds to a unique key value and each of which emits - * those items from the source Observable that share that key value. - * - * @deprecated Use the options parameter instead. - */ -export function groupBy( - key: (value: T) => K, - element?: (value: T) => R, - duration?: (grouped: GroupedObservable) => Observable, - connector?: () => Subject -): OperatorFunction>; - -// Impl -export function groupBy( - keySelector: (value: T) => K, - elementOrOptions?: ((value: any) => any) | void | BasicGroupByOptions | GroupByOptionsWithElement, - duration?: (grouped: GroupedObservable) => ObservableInput, - connector?: () => SubjectLike -): OperatorFunction> { - return operate((source, subscriber) => { - let element: ((value: any) => any) | void; - if (!elementOrOptions || typeof elementOrOptions === 'function') { - element = elementOrOptions as ((value: any) => any); - } else { - ({ duration, element, connector } = elementOrOptions); - } - - // A lookup for the groups that we have so far. - const groups = new Map>(); - - // Used for notifying all groups and the subscriber in the same way. - const notify = (cb: (group: Observer) => void) => { - groups.forEach(cb); - cb(subscriber); - }; - - // Used to handle errors from the source, AND errors that occur during the - // next call from the source. - const handleError = (err: any) => notify((consumer) => consumer.error(err)); - - // The number of actively subscribed groups - let activeGroups = 0; - - // Whether or not teardown was attempted on this subscription. - let teardownAttempted = false; - - // Capturing a reference to this, because we need a handle to it - // in `createGroupedObservable` below. This is what we use to - // subscribe to our source observable. This sometimes needs to be unsubscribed - // out-of-band with our `subscriber` which is the downstream subscriber, or destination, - // in cases where a user unsubscribes from the main resulting subscription, but - // still has groups from this subscription subscribed and would expect values from it - // Consider: `source.pipe(groupBy(fn), take(2))`. - const groupBySourceSubscriber = new OperatorSubscriber( - subscriber, - (value: T) => { - // Because we have to notify all groups of any errors that occur in here, - // we have to add our own try/catch to ensure that those errors are propagated. - // OperatorSubscriber will only send the error to the main subscriber. - try { - const key = keySelector(value); - - let group = groups.get(key); - if (!group) { - // Create our group subject - groups.set(key, (group = connector ? connector() : new Subject())); - - // Emit the grouped observable. Note that we can't do a simple `asObservable()` here, - // because the grouped observable has special semantics around reference counting - // to ensure we don't sever our connection to the source prematurely. - const grouped = createGroupedObservable(key, group); - subscriber.next(grouped); - - if (duration) { - const durationSubscriber = createOperatorSubscriber( - // Providing the group here ensures that it is disposed of -- via `unsubscribe` -- - // when the duration subscription is torn down. That is important, because then - // if someone holds a handle to the grouped observable and tries to subscribe to it - // after the connection to the source has been severed, they will get an - // `ObjectUnsubscribedError` and know they can't possibly get any notifications. - group as any, - () => { - // Our duration notified! We can complete the group. - // The group will be removed from the map in the finalization phase. - group!.complete(); - durationSubscriber?.unsubscribe(); - }, - // Completions are also sent to the group, but just the group. - undefined, - // Errors on the duration subscriber are sent to the group - // but only the group. They are not sent to the main subscription. - undefined, - // Finalization: Remove this group from our map. - () => groups.delete(key) - ); - - // Start our duration notifier. - groupBySourceSubscriber.add(innerFrom(duration(grouped)).subscribe(durationSubscriber)); - } - } - - // Send the value to our group. - group.next(element ? element(value) : value); - } catch (err) { - handleError(err); - } - }, - // Source completes. - () => notify((consumer) => consumer.complete()), - // Error from the source. - handleError, - // Free up memory. - // When the source subscription is _finally_ torn down, release the subjects and keys - // in our groups Map, they may be quite large and we don't want to keep them around if we - // don't have to. - () => groups.clear(), - () => { - teardownAttempted = true; - // We only kill our subscription to the source if we have - // no active groups. As stated above, consider this scenario: - // source$.pipe(groupBy(fn), take(2)). - return activeGroups === 0; - } - ); - - // Subscribe to the source - source.subscribe(groupBySourceSubscriber); - - /** - * Creates the actual grouped observable returned. - * @param key The key of the group - * @param groupSubject The subject that fuels the group - */ - function createGroupedObservable(key: K, groupSubject: SubjectLike) { - const result: any = new Observable((groupSubscriber) => { - activeGroups++; - const innerSub = groupSubject.subscribe(groupSubscriber); - return () => { - innerSub.unsubscribe(); - // We can kill the subscription to our source if we now have no more - // active groups subscribed, and a finalization was already attempted on - // the source. - --activeGroups === 0 && teardownAttempted && groupBySourceSubscriber.unsubscribe(); - }; - }); - result.key = key; - return result; - } - }); -} - -/** - * An observable of values that is the emitted by the result of a {@link groupBy} operator, - * contains a `key` property for the grouping. - */ -export interface GroupedObservable extends Observable { - /** - * The key value for the grouped notifications. - */ - readonly key: K; -} diff --git a/node_modules/rxjs/src/internal/operators/ignoreElements.ts b/node_modules/rxjs/src/internal/operators/ignoreElements.ts deleted file mode 100644 index d4977ac..0000000 --- a/node_modules/rxjs/src/internal/operators/ignoreElements.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { OperatorFunction } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { noop } from '../util/noop'; - -/** - * Ignores all items emitted by the source Observable and only passes calls of `complete` or `error`. - * - * ![](ignoreElements.png) - * - * The `ignoreElements` operator suppresses all items emitted by the source Observable, - * but allows its termination notification (either `error` or `complete`) to pass through unchanged. - * - * If you do not care about the items being emitted by an Observable, but you do want to be notified - * when it completes or when it terminates with an error, you can apply the `ignoreElements` operator - * to the Observable, which will ensure that it will never call its observers’ `next` handlers. - * - * ## Example - * - * Ignore all `next` emissions from the source - * - * ```ts - * import { of, ignoreElements } from 'rxjs'; - * - * of('you', 'talking', 'to', 'me') - * .pipe(ignoreElements()) - * .subscribe({ - * next: word => console.log(word), - * error: err => console.log('error:', err), - * complete: () => console.log('the end'), - * }); - * - * // result: - * // 'the end' - * ``` - * - * @return A function that returns an empty Observable that only calls - * `complete` or `error`, based on which one is called by the source - * Observable. - */ -export function ignoreElements(): OperatorFunction { - return operate((source, subscriber) => { - source.subscribe(createOperatorSubscriber(subscriber, noop)); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/isEmpty.ts b/node_modules/rxjs/src/internal/operators/isEmpty.ts deleted file mode 100644 index 5de8deb..0000000 --- a/node_modules/rxjs/src/internal/operators/isEmpty.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { OperatorFunction } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -/** - * Emits `false` if the input Observable emits any values, or emits `true` if the - * input Observable completes without emitting any values. - * - * Tells whether any values are emitted by an Observable. - * - * ![](isEmpty.png) - * - * `isEmpty` transforms an Observable that emits values into an Observable that - * emits a single boolean value representing whether or not any values were - * emitted by the source Observable. As soon as the source Observable emits a - * value, `isEmpty` will emit a `false` and complete. If the source Observable - * completes having not emitted anything, `isEmpty` will emit a `true` and - * complete. - * - * A similar effect could be achieved with {@link count}, but `isEmpty` can emit - * a `false` value sooner. - * - * ## Examples - * - * Emit `false` for a non-empty Observable - * - * ```ts - * import { Subject, isEmpty } from 'rxjs'; - * - * const source = new Subject(); - * const result = source.pipe(isEmpty()); - * - * source.subscribe(x => console.log(x)); - * result.subscribe(x => console.log(x)); - * - * source.next('a'); - * source.next('b'); - * source.next('c'); - * source.complete(); - * - * // Outputs - * // 'a' - * // false - * // 'b' - * // 'c' - * ``` - * - * Emit `true` for an empty Observable - * - * ```ts - * import { EMPTY, isEmpty } from 'rxjs'; - * - * const result = EMPTY.pipe(isEmpty()); - * result.subscribe(x => console.log(x)); - * - * // Outputs - * // true - * ``` - * - * @see {@link count} - * @see {@link EMPTY} - * - * @return A function that returns an Observable that emits boolean value - * indicating whether the source Observable was empty or not. - */ -export function isEmpty(): OperatorFunction { - return operate((source, subscriber) => { - source.subscribe( - createOperatorSubscriber( - subscriber, - () => { - subscriber.next(false); - subscriber.complete(); - }, - () => { - subscriber.next(true); - subscriber.complete(); - } - ) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/joinAllInternals.ts b/node_modules/rxjs/src/internal/operators/joinAllInternals.ts deleted file mode 100644 index 74876e9..0000000 --- a/node_modules/rxjs/src/internal/operators/joinAllInternals.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Observable } from '../Observable'; -import { ObservableInput, OperatorFunction } from '../types'; -import { identity } from '../util/identity'; -import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs'; -import { pipe } from '../util/pipe'; -import { mergeMap } from './mergeMap'; -import { toArray } from './toArray'; - -/** - * Collects all of the inner sources from source observable. Then, once the - * source completes, joins the values using the given static. - * - * This is used for {@link combineLatestAll} and {@link zipAll} which both have the - * same behavior of collecting all inner observables, then operating on them. - * - * @param joinFn The type of static join to apply to the sources collected - * @param project The projection function to apply to the values, if any - */ -export function joinAllInternals(joinFn: (sources: ObservableInput[]) => Observable, project?: (...args: any[]) => R) { - return pipe( - // Collect all inner sources into an array, and emit them when the - // source completes. - toArray() as OperatorFunction, ObservableInput[]>, - // Run the join function on the collected array of inner sources. - mergeMap((sources) => joinFn(sources)), - // If a projection function was supplied, apply it to each result. - project ? mapOneOrManyArgs(project) : (identity as any) - ); -} diff --git a/node_modules/rxjs/src/internal/operators/last.ts b/node_modules/rxjs/src/internal/operators/last.ts deleted file mode 100644 index 698ce23..0000000 --- a/node_modules/rxjs/src/internal/operators/last.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { Observable } from '../Observable'; -import { EmptyError } from '../util/EmptyError'; -import { OperatorFunction, TruthyTypesOf } from '../types'; -import { filter } from './filter'; -import { takeLast } from './takeLast'; -import { throwIfEmpty } from './throwIfEmpty'; -import { defaultIfEmpty } from './defaultIfEmpty'; -import { identity } from '../util/identity'; - -export function last(predicate: BooleanConstructor): OperatorFunction>; -export function last(predicate: BooleanConstructor, defaultValue: D): OperatorFunction | D>; -export function last(predicate?: null, defaultValue?: D): OperatorFunction; -export function last( - predicate: (value: T, index: number, source: Observable) => value is S, - defaultValue?: S -): OperatorFunction; -export function last( - predicate: (value: T, index: number, source: Observable) => boolean, - defaultValue?: D -): OperatorFunction; - -/** - * Returns an Observable that emits only the last item emitted by the source Observable. - * It optionally takes a predicate function as a parameter, in which case, rather than emitting - * the last item from the source Observable, the resulting Observable will emit the last item - * from the source Observable that satisfies the predicate. - * - * ![](last.png) - * - * It will emit an error notification if the source completes without notification or one that matches - * the predicate. It returns the last value or if a predicate is provided last value that matches the - * predicate. It returns the given default value if no notification is emitted or matches the predicate. - * - * ## Examples - * - * Last alphabet from the sequence - * - * ```ts - * import { from, last } from 'rxjs'; - * - * const source = from(['x', 'y', 'z']); - * const result = source.pipe(last()); - * - * result.subscribe(value => console.log(`Last alphabet: ${ value }`)); - * - * // Outputs - * // Last alphabet: z - * ``` - * - * Default value when the value in the predicate is not matched - * - * ```ts - * import { from, last } from 'rxjs'; - * - * const source = from(['x', 'y', 'z']); - * const result = source.pipe(last(char => char === 'a', 'not found')); - * - * result.subscribe(value => console.log(`'a' is ${ value }.`)); - * - * // Outputs - * // 'a' is not found. - * ``` - * - * @see {@link skip} - * @see {@link skipUntil} - * @see {@link skipLast} - * @see {@link skipWhile} - * @see {@link first} - * - * @throws {EmptyError} Delivers an `EmptyError` to the Observer's `error` - * callback if the Observable completes before any `next` notification was sent. - * - * @param predicate The condition any source emitted item has to satisfy. - * @param defaultValue An optional default value to provide if last `predicate` - * isn't met or no values were emitted. - * @return A function that returns an Observable that emits only the last item - * satisfying the given condition from the source, or an error notification - * with an `EmptyError` object if no such items are emitted. - */ -export function last( - predicate?: ((value: T, index: number, source: Observable) => boolean) | null, - defaultValue?: D -): OperatorFunction { - const hasDefaultValue = arguments.length >= 2; - return (source: Observable) => - source.pipe( - predicate ? filter((v, i) => predicate(v, i, source)) : identity, - takeLast(1), - hasDefaultValue ? defaultIfEmpty(defaultValue!) : throwIfEmpty(() => new EmptyError()) - ); -} diff --git a/node_modules/rxjs/src/internal/operators/map.ts b/node_modules/rxjs/src/internal/operators/map.ts deleted file mode 100644 index fa7305d..0000000 --- a/node_modules/rxjs/src/internal/operators/map.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { OperatorFunction } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -export function map(project: (value: T, index: number) => R): OperatorFunction; -/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */ -export function map(project: (this: A, value: T, index: number) => R, thisArg: A): OperatorFunction; - -/** - * Applies a given `project` function to each value emitted by the source - * Observable, and emits the resulting values as an Observable. - * - * Like [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map), - * it passes each source value through a transformation function to get - * corresponding output values. - * - * ![](map.png) - * - * Similar to the well known `Array.prototype.map` function, this operator - * applies a projection to each value and emits that projection in the output - * Observable. - * - * ## Example - * - * Map every click to the `clientX` position of that click - * - * ```ts - * import { fromEvent, map } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const positions = clicks.pipe(map(ev => ev.clientX)); - * - * positions.subscribe(x => console.log(x)); - * ``` - * - * @see {@link mapTo} - * @see {@link pluck} - * - * @param project The function to apply to each `value` emitted by the source - * Observable. The `index` parameter is the number `i` for the i-th emission - * that has happened since the subscription, starting from the number `0`. - * @param thisArg An optional argument to define what `this` is in the - * `project` function. - * @return A function that returns an Observable that emits the values from the - * source Observable transformed by the given `project` function. - */ -export function map(project: (value: T, index: number) => R, thisArg?: any): OperatorFunction { - return operate((source, subscriber) => { - // The index of the value from the source. Used with projection. - let index = 0; - // Subscribe to the source, all errors and completions are sent along - // to the consumer. - source.subscribe( - createOperatorSubscriber(subscriber, (value: T) => { - // Call the projection function with the appropriate this context, - // and send the resulting value to the consumer. - subscriber.next(project.call(thisArg, value, index++)); - }) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/mapTo.ts b/node_modules/rxjs/src/internal/operators/mapTo.ts deleted file mode 100644 index 9fb8a8e..0000000 --- a/node_modules/rxjs/src/internal/operators/mapTo.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { OperatorFunction } from '../types'; -import { map } from './map'; - -/** @deprecated To be removed in v9. Use {@link map} instead: `map(() => value)`. */ -export function mapTo(value: R): OperatorFunction; -/** - * @deprecated Do not specify explicit type parameters. Signatures with type parameters - * that cannot be inferred will be removed in v8. `mapTo` itself will be removed in v9, - * use {@link map} instead: `map(() => value)`. - * */ -export function mapTo(value: R): OperatorFunction; - -/** - * Emits the given constant value on the output Observable every time the source - * Observable emits a value. - * - * Like {@link map}, but it maps every source value to - * the same output value every time. - * - * ![](mapTo.png) - * - * Takes a constant `value` as argument, and emits that whenever the source - * Observable emits a value. In other words, ignores the actual source value, - * and simply uses the emission moment to know when to emit the given `value`. - * - * ## Example - * - * Map every click to the string `'Hi'` - * - * ```ts - * import { fromEvent, mapTo } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const greetings = clicks.pipe(mapTo('Hi')); - * - * greetings.subscribe(x => console.log(x)); - * ``` - * - * @see {@link map} - * - * @param value The value to map each source value to. - * @return A function that returns an Observable that emits the given `value` - * every time the source Observable emits. - * @deprecated To be removed in v9. Use {@link map} instead: `map(() => value)`. - */ -export function mapTo(value: R): OperatorFunction { - return map(() => value); -} diff --git a/node_modules/rxjs/src/internal/operators/materialize.ts b/node_modules/rxjs/src/internal/operators/materialize.ts deleted file mode 100644 index 5f9a629..0000000 --- a/node_modules/rxjs/src/internal/operators/materialize.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { Notification } from '../Notification'; -import { OperatorFunction, ObservableNotification } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -/** - * Represents all of the notifications from the source Observable as `next` - * emissions marked with their original types within {@link Notification} - * objects. - * - * Wraps `next`, `error` and `complete` emissions in - * {@link Notification} objects, emitted as `next` on the output Observable. - * - * - * ![](materialize.png) - * - * `materialize` returns an Observable that emits a `next` notification for each - * `next`, `error`, or `complete` emission of the source Observable. When the - * source Observable emits `complete`, the output Observable will emit `next` as - * a Notification of type "complete", and then it will emit `complete` as well. - * When the source Observable emits `error`, the output will emit `next` as a - * Notification of type "error", and then `complete`. - * - * This operator is useful for producing metadata of the source Observable, to - * be consumed as `next` emissions. Use it in conjunction with - * {@link dematerialize}. - * - * ## Example - * - * Convert a faulty Observable to an Observable of Notifications - * - * ```ts - * import { of, materialize, map } from 'rxjs'; - * - * const letters = of('a', 'b', 13, 'd'); - * const upperCase = letters.pipe(map((x: any) => x.toUpperCase())); - * const materialized = upperCase.pipe(materialize()); - * - * materialized.subscribe(x => console.log(x)); - * - * // Results in the following: - * // - Notification { kind: 'N', value: 'A', error: undefined, hasValue: true } - * // - Notification { kind: 'N', value: 'B', error: undefined, hasValue: true } - * // - Notification { kind: 'E', value: undefined, error: TypeError { message: x.toUpperCase is not a function }, hasValue: false } - * ``` - * - * @see {@link Notification} - * @see {@link dematerialize} - * - * @return A function that returns an Observable that emits - * {@link Notification} objects that wrap the original emissions from the - * source Observable with metadata. - */ -export function materialize(): OperatorFunction & ObservableNotification> { - return operate((source, subscriber) => { - source.subscribe( - createOperatorSubscriber( - subscriber, - (value) => { - subscriber.next(Notification.createNext(value)); - }, - () => { - subscriber.next(Notification.createComplete()); - subscriber.complete(); - }, - (err) => { - subscriber.next(Notification.createError(err)); - subscriber.complete(); - } - ) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/max.ts b/node_modules/rxjs/src/internal/operators/max.ts deleted file mode 100644 index 8c2f5d0..0000000 --- a/node_modules/rxjs/src/internal/operators/max.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { reduce } from './reduce'; -import { MonoTypeOperatorFunction } from '../types'; -import { isFunction } from '../util/isFunction'; - -/** - * The `max` operator operates on an Observable that emits numbers (or items that - * can be compared with a provided function), and when source Observable completes - * it emits a single item: the item with the largest value. - * - * ![](max.png) - * - * ## Examples - * - * Get the maximal value of a series of numbers - * - * ```ts - * import { of, max } from 'rxjs'; - * - * of(5, 4, 7, 2, 8) - * .pipe(max()) - * .subscribe(x => console.log(x)); - * - * // Outputs - * // 8 - * ``` - * - * Use a comparer function to get the maximal item - * - * ```ts - * import { of, max } from 'rxjs'; - * - * of( - * { age: 7, name: 'Foo' }, - * { age: 5, name: 'Bar' }, - * { age: 9, name: 'Beer' } - * ).pipe( - * max((a, b) => a.age < b.age ? -1 : 1) - * ) - * .subscribe(x => console.log(x.name)); - * - * // Outputs - * // 'Beer' - * ``` - * - * @see {@link min} - * - * @param comparer Optional comparer function that it will use instead of its - * default to compare the value of two items. - * @return A function that returns an Observable that emits item with the - * largest value. - */ -export function max(comparer?: (x: T, y: T) => number): MonoTypeOperatorFunction { - return reduce(isFunction(comparer) ? (x, y) => (comparer(x, y) > 0 ? x : y) : (x, y) => (x > y ? x : y)); -} diff --git a/node_modules/rxjs/src/internal/operators/merge.ts b/node_modules/rxjs/src/internal/operators/merge.ts deleted file mode 100644 index 73fff7d..0000000 --- a/node_modules/rxjs/src/internal/operators/merge.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { ObservableInput, ObservableInputTuple, OperatorFunction, SchedulerLike } from '../types'; -import { operate } from '../util/lift'; -import { mergeAll } from './mergeAll'; -import { popNumber, popScheduler } from '../util/args'; -import { from } from '../observable/from'; - -/** @deprecated Replaced with {@link mergeWith}. Will be removed in v8. */ -export function merge(...sources: [...ObservableInputTuple]): OperatorFunction; -/** @deprecated Replaced with {@link mergeWith}. Will be removed in v8. */ -export function merge( - ...sourcesAndConcurrency: [...ObservableInputTuple, number] -): OperatorFunction; -/** @deprecated Replaced with {@link mergeWith}. Will be removed in v8. */ -export function merge( - ...sourcesAndScheduler: [...ObservableInputTuple, SchedulerLike] -): OperatorFunction; -/** @deprecated Replaced with {@link mergeWith}. Will be removed in v8. */ -export function merge( - ...sourcesAndConcurrencyAndScheduler: [...ObservableInputTuple, number, SchedulerLike] -): OperatorFunction; - -export function merge(...args: unknown[]): OperatorFunction { - const scheduler = popScheduler(args); - const concurrent = popNumber(args, Infinity); - - return operate((source, subscriber) => { - mergeAll(concurrent)(from([source, ...(args as ObservableInput[])], scheduler)).subscribe(subscriber); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/mergeAll.ts b/node_modules/rxjs/src/internal/operators/mergeAll.ts deleted file mode 100644 index 51f28fd..0000000 --- a/node_modules/rxjs/src/internal/operators/mergeAll.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { mergeMap } from './mergeMap'; -import { identity } from '../util/identity'; -import { OperatorFunction, ObservableInput, ObservedValueOf } from '../types'; - -/** - * Converts a higher-order Observable into a first-order Observable which - * concurrently delivers all values that are emitted on the inner Observables. - * - * Flattens an Observable-of-Observables. - * - * ![](mergeAll.png) - * - * `mergeAll` subscribes to an Observable that emits Observables, also known as - * a higher-order Observable. Each time it observes one of these emitted inner - * Observables, it subscribes to that and delivers all the values from the - * inner Observable on the output Observable. The output Observable only - * completes once all inner Observables have completed. Any error delivered by - * a inner Observable will be immediately emitted on the output Observable. - * - * ## Examples - * - * Spawn a new interval Observable for each click event, and blend their outputs as one Observable - * - * ```ts - * import { fromEvent, map, interval, mergeAll } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const higherOrder = clicks.pipe(map(() => interval(1000))); - * const firstOrder = higherOrder.pipe(mergeAll()); - * - * firstOrder.subscribe(x => console.log(x)); - * ``` - * - * Count from 0 to 9 every second for each click, but only allow 2 concurrent timers - * - * ```ts - * import { fromEvent, map, interval, take, mergeAll } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const higherOrder = clicks.pipe( - * map(() => interval(1000).pipe(take(10))) - * ); - * const firstOrder = higherOrder.pipe(mergeAll(2)); - * - * firstOrder.subscribe(x => console.log(x)); - * ``` - * - * @see {@link combineLatestAll} - * @see {@link concatAll} - * @see {@link exhaustAll} - * @see {@link merge} - * @see {@link mergeMap} - * @see {@link mergeMapTo} - * @see {@link mergeScan} - * @see {@link switchAll} - * @see {@link switchMap} - * @see {@link zipAll} - * - * @param concurrent Maximum number of inner Observables being subscribed to - * concurrently. - * @return A function that returns an Observable that emits values coming from - * all the inner Observables emitted by the source Observable. - */ -export function mergeAll>(concurrent: number = Infinity): OperatorFunction> { - return mergeMap(identity, concurrent); -} diff --git a/node_modules/rxjs/src/internal/operators/mergeInternals.ts b/node_modules/rxjs/src/internal/operators/mergeInternals.ts deleted file mode 100644 index dab3a2b..0000000 --- a/node_modules/rxjs/src/internal/operators/mergeInternals.ts +++ /dev/null @@ -1,149 +0,0 @@ -import { Observable } from '../Observable'; -import { innerFrom } from '../observable/innerFrom'; -import { Subscriber } from '../Subscriber'; -import { ObservableInput, SchedulerLike } from '../types'; -import { executeSchedule } from '../util/executeSchedule'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -/** - * A process embodying the general "merge" strategy. This is used in - * `mergeMap` and `mergeScan` because the logic is otherwise nearly identical. - * @param source The original source observable - * @param subscriber The consumer subscriber - * @param project The projection function to get our inner sources - * @param concurrent The number of concurrent inner subscriptions - * @param onBeforeNext Additional logic to apply before nexting to our consumer - * @param expand If `true` this will perform an "expand" strategy, which differs only - * in that it recurses, and the inner subscription must be schedule-able. - * @param innerSubScheduler A scheduler to use to schedule inner subscriptions, - * this is to support the expand strategy, mostly, and should be deprecated - */ -export function mergeInternals( - source: Observable, - subscriber: Subscriber, - project: (value: T, index: number) => ObservableInput, - concurrent: number, - onBeforeNext?: (innerValue: R) => void, - expand?: boolean, - innerSubScheduler?: SchedulerLike, - additionalFinalizer?: () => void -) { - // Buffered values, in the event of going over our concurrency limit - const buffer: T[] = []; - // The number of active inner subscriptions. - let active = 0; - // An index to pass to our accumulator function - let index = 0; - // Whether or not the outer source has completed. - let isComplete = false; - - /** - * Checks to see if we can complete our result or not. - */ - const checkComplete = () => { - // If the outer has completed, and nothing is left in the buffer, - // and we don't have any active inner subscriptions, then we can - // Emit the state and complete. - if (isComplete && !buffer.length && !active) { - subscriber.complete(); - } - }; - - // If we're under our concurrency limit, just start the inner subscription, otherwise buffer and wait. - const outerNext = (value: T) => (active < concurrent ? doInnerSub(value) : buffer.push(value)); - - const doInnerSub = (value: T) => { - // If we're expanding, we need to emit the outer values and the inner values - // as the inners will "become outers" in a way as they are recursively fed - // back to the projection mechanism. - expand && subscriber.next(value as any); - - // Increment the number of active subscriptions so we can track it - // against our concurrency limit later. - active++; - - // A flag used to show that the inner observable completed. - // This is checked during finalization to see if we should - // move to the next item in the buffer, if there is on. - let innerComplete = false; - - // Start our inner subscription. - innerFrom(project(value, index++)).subscribe( - createOperatorSubscriber( - subscriber, - (innerValue) => { - // `mergeScan` has additional handling here. For example - // taking the inner value and updating state. - onBeforeNext?.(innerValue); - - if (expand) { - // If we're expanding, then just recurse back to our outer - // handler. It will emit the value first thing. - outerNext(innerValue as any); - } else { - // Otherwise, emit the inner value. - subscriber.next(innerValue); - } - }, - () => { - // Flag that we have completed, so we know to check the buffer - // during finalization. - innerComplete = true; - }, - // Errors are passed to the destination. - undefined, - () => { - // During finalization, if the inner completed (it wasn't errored or - // cancelled), then we want to try the next item in the buffer if - // there is one. - if (innerComplete) { - // We have to wrap this in a try/catch because it happens during - // finalization, possibly asynchronously, and we want to pass - // any errors that happen (like in a projection function) to - // the outer Subscriber. - try { - // INNER SOURCE COMPLETE - // Decrement the active count to ensure that the next time - // we try to call `doInnerSub`, the number is accurate. - active--; - // If we have more values in the buffer, try to process those - // Note that this call will increment `active` ahead of the - // next conditional, if there were any more inner subscriptions - // to start. - while (buffer.length && active < concurrent) { - const bufferedValue = buffer.shift()!; - // Particularly for `expand`, we need to check to see if a scheduler was provided - // for when we want to start our inner subscription. Otherwise, we just start - // are next inner subscription. - if (innerSubScheduler) { - executeSchedule(subscriber, innerSubScheduler, () => doInnerSub(bufferedValue)); - } else { - doInnerSub(bufferedValue); - } - } - // Check to see if we can complete, and complete if so. - checkComplete(); - } catch (err) { - subscriber.error(err); - } - } - } - ) - ); - }; - - // Subscribe to our source observable. - source.subscribe( - createOperatorSubscriber(subscriber, outerNext, () => { - // Outer completed, make a note of it, and check to see if we can complete everything. - isComplete = true; - checkComplete(); - }) - ); - - // Additional finalization (for when the destination is torn down). - // Other finalization is added implicitly via subscription above. - return () => { - additionalFinalizer?.(); - }; -} diff --git a/node_modules/rxjs/src/internal/operators/mergeMap.ts b/node_modules/rxjs/src/internal/operators/mergeMap.ts deleted file mode 100644 index 5b698ea..0000000 --- a/node_modules/rxjs/src/internal/operators/mergeMap.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; -import { map } from './map'; -import { innerFrom } from '../observable/innerFrom'; -import { operate } from '../util/lift'; -import { mergeInternals } from './mergeInternals'; -import { isFunction } from '../util/isFunction'; - -/* tslint:disable:max-line-length */ -export function mergeMap>( - project: (value: T, index: number) => O, - concurrent?: number -): OperatorFunction>; -/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ -export function mergeMap>( - project: (value: T, index: number) => O, - resultSelector: undefined, - concurrent?: number -): OperatorFunction>; -/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ -export function mergeMap>( - project: (value: T, index: number) => O, - resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R, - concurrent?: number -): OperatorFunction; -/* tslint:enable:max-line-length */ - -/** - * Projects each source value to an Observable which is merged in the output - * Observable. - * - * Maps each value to an Observable, then flattens all of - * these inner Observables using {@link mergeAll}. - * - * ![](mergeMap.png) - * - * Returns an Observable that emits items based on applying a function that you - * supply to each item emitted by the source Observable, where that function - * returns an Observable, and then merging those resulting Observables and - * emitting the results of this merger. - * - * ## Example - * - * Map and flatten each letter to an Observable ticking every 1 second - * - * ```ts - * import { of, mergeMap, interval, map } from 'rxjs'; - * - * const letters = of('a', 'b', 'c'); - * const result = letters.pipe( - * mergeMap(x => interval(1000).pipe(map(i => x + i))) - * ); - * - * result.subscribe(x => console.log(x)); - * - * // Results in the following: - * // a0 - * // b0 - * // c0 - * // a1 - * // b1 - * // c1 - * // continues to list a, b, c every second with respective ascending integers - * ``` - * - * @see {@link concatMap} - * @see {@link exhaustMap} - * @see {@link merge} - * @see {@link mergeAll} - * @see {@link mergeMapTo} - * @see {@link mergeScan} - * @see {@link switchMap} - * - * @param project A function that, when applied to an item emitted by the source - * Observable, returns an Observable. - * @param concurrent Maximum number of `ObservableInput`s being subscribed to concurrently. - * @return A function that returns an Observable that emits the result of - * applying the projection function (and the optional deprecated - * `resultSelector`) to each item emitted by the source Observable and merging - * the results of the Observables obtained from this transformation. - */ -export function mergeMap>( - project: (value: T, index: number) => O, - resultSelector?: ((outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R) | number, - concurrent: number = Infinity -): OperatorFunction | R> { - if (isFunction(resultSelector)) { - // DEPRECATED PATH - return mergeMap((a, i) => map((b: any, ii: number) => resultSelector(a, b, i, ii))(innerFrom(project(a, i))), concurrent); - } else if (typeof resultSelector === 'number') { - concurrent = resultSelector; - } - - return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent)); -} diff --git a/node_modules/rxjs/src/internal/operators/mergeMapTo.ts b/node_modules/rxjs/src/internal/operators/mergeMapTo.ts deleted file mode 100644 index bcc4654..0000000 --- a/node_modules/rxjs/src/internal/operators/mergeMapTo.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { OperatorFunction, ObservedValueOf, ObservableInput } from '../types'; -import { mergeMap } from './mergeMap'; -import { isFunction } from '../util/isFunction'; - -/** @deprecated Will be removed in v9. Use {@link mergeMap} instead: `mergeMap(() => result)` */ -export function mergeMapTo>( - innerObservable: O, - concurrent?: number -): OperatorFunction>; -/** - * @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. - * Details: https://rxjs.dev/deprecations/resultSelector - */ -export function mergeMapTo>( - innerObservable: O, - resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R, - concurrent?: number -): OperatorFunction; -/* tslint:enable:max-line-length */ - -/** - * Projects each source value to the same Observable which is merged multiple - * times in the output Observable. - * - * It's like {@link mergeMap}, but maps each value always - * to the same inner Observable. - * - * ![](mergeMapTo.png) - * - * Maps each source value to the given Observable `innerObservable` regardless - * of the source value, and then merges those resulting Observables into one - * single Observable, which is the output Observable. - * - * ## Example - * - * For each click event, start an interval Observable ticking every 1 second - * - * ```ts - * import { fromEvent, mergeMapTo, interval } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe(mergeMapTo(interval(1000))); - * - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link concatMapTo} - * @see {@link merge} - * @see {@link mergeAll} - * @see {@link mergeMap} - * @see {@link mergeScan} - * @see {@link switchMapTo} - * - * @param innerObservable An `ObservableInput` to replace each value from the - * source Observable. - * @param concurrent Maximum number of input Observables being subscribed to - * concurrently. - * @return A function that returns an Observable that emits items from the - * given `innerObservable`. - * @deprecated Will be removed in v9. Use {@link mergeMap} instead: `mergeMap(() => result)` - */ -export function mergeMapTo>( - innerObservable: O, - resultSelector?: ((outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R) | number, - concurrent: number = Infinity -): OperatorFunction | R> { - if (isFunction(resultSelector)) { - return mergeMap(() => innerObservable, resultSelector, concurrent); - } - if (typeof resultSelector === 'number') { - concurrent = resultSelector; - } - return mergeMap(() => innerObservable, concurrent); -} diff --git a/node_modules/rxjs/src/internal/operators/mergeScan.ts b/node_modules/rxjs/src/internal/operators/mergeScan.ts deleted file mode 100644 index c9c520b..0000000 --- a/node_modules/rxjs/src/internal/operators/mergeScan.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { ObservableInput, OperatorFunction } from '../types'; -import { operate } from '../util/lift'; -import { mergeInternals } from './mergeInternals'; - -/** - * Applies an accumulator function over the source Observable where the - * accumulator function itself returns an Observable, then each intermediate - * Observable returned is merged into the output Observable. - * - * It's like {@link scan}, but the Observables returned - * by the accumulator are merged into the outer Observable. - * - * The first parameter of the `mergeScan` is an `accumulator` function which is - * being called every time the source Observable emits a value. `mergeScan` will - * subscribe to the value returned by the `accumulator` function and will emit - * values to the subscriber emitted by inner Observable. - * - * The `accumulator` function is being called with three parameters passed to it: - * `acc`, `value` and `index`. The `acc` parameter is used as the state parameter - * whose value is initially set to the `seed` parameter (the second parameter - * passed to the `mergeScan` operator). - * - * `mergeScan` internally keeps the value of the `acc` parameter: as long as the - * source Observable emits without inner Observable emitting, the `acc` will be - * set to `seed`. The next time the inner Observable emits a value, `mergeScan` - * will internally remember it and it will be passed to the `accumulator` - * function as `acc` parameter the next time source emits. - * - * The `value` parameter of the `accumulator` function is the value emitted by the - * source Observable, while the `index` is a number which represent the order of the - * current emission by the source Observable. It starts with 0. - * - * The last parameter to the `mergeScan` is the `concurrent` value which defaults - * to Infinity. It represents the maximum number of inner Observable subscriptions - * at a time. - * - * ## Example - * - * Count the number of click events - * - * ```ts - * import { fromEvent, map, mergeScan, of } from 'rxjs'; - * - * const click$ = fromEvent(document, 'click'); - * const one$ = click$.pipe(map(() => 1)); - * const seed = 0; - * const count$ = one$.pipe( - * mergeScan((acc, one) => of(acc + one), seed) - * ); - * - * count$.subscribe(x => console.log(x)); - * - * // Results: - * // 1 - * // 2 - * // 3 - * // 4 - * // ...and so on for each click - * ``` - * - * @see {@link scan} - * @see {@link switchScan} - * - * @param accumulator The accumulator function called on each source value. - * @param seed The initial accumulation value. - * @param concurrent Maximum number of input Observables being subscribed to - * concurrently. - * @return A function that returns an Observable of the accumulated values. - */ -export function mergeScan( - accumulator: (acc: R, value: T, index: number) => ObservableInput, - seed: R, - concurrent = Infinity -): OperatorFunction { - return operate((source, subscriber) => { - // The accumulated state. - let state = seed; - - return mergeInternals( - source, - subscriber, - (value, index) => accumulator(state, value, index), - concurrent, - (value) => { - state = value; - }, - false, - undefined, - () => (state = null!) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/mergeWith.ts b/node_modules/rxjs/src/internal/operators/mergeWith.ts deleted file mode 100644 index b0c8142..0000000 --- a/node_modules/rxjs/src/internal/operators/mergeWith.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { ObservableInputTuple, OperatorFunction } from '../types'; -import { merge } from './merge'; - -/** - * Merge the values from all observables to a single observable result. - * - * Creates an observable, that when subscribed to, subscribes to the source - * observable, and all other sources provided as arguments. All values from - * every source are emitted from the resulting subscription. - * - * When all sources complete, the resulting observable will complete. - * - * When any source errors, the resulting observable will error. - * - * ## Example - * - * Joining all outputs from multiple user input event streams - * - * ```ts - * import { fromEvent, map, mergeWith } from 'rxjs'; - * - * const clicks$ = fromEvent(document, 'click').pipe(map(() => 'click')); - * const mousemoves$ = fromEvent(document, 'mousemove').pipe(map(() => 'mousemove')); - * const dblclicks$ = fromEvent(document, 'dblclick').pipe(map(() => 'dblclick')); - * - * mousemoves$ - * .pipe(mergeWith(clicks$, dblclicks$)) - * .subscribe(x => console.log(x)); - * - * // result (assuming user interactions) - * // 'mousemove' - * // 'mousemove' - * // 'mousemove' - * // 'click' - * // 'click' - * // 'dblclick' - * ``` - * - * @see {@link merge} - * - * @param otherSources the sources to combine the current source with. - * @return A function that returns an Observable that merges the values from - * all given Observables. - */ -export function mergeWith( - ...otherSources: [...ObservableInputTuple] -): OperatorFunction { - return merge(...otherSources); -} diff --git a/node_modules/rxjs/src/internal/operators/min.ts b/node_modules/rxjs/src/internal/operators/min.ts deleted file mode 100644 index 41dcd09..0000000 --- a/node_modules/rxjs/src/internal/operators/min.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { reduce } from './reduce'; -import { MonoTypeOperatorFunction } from '../types'; -import { isFunction } from '../util/isFunction'; - -/** - * The `min` operator operates on an Observable that emits numbers (or items that - * can be compared with a provided function), and when source Observable completes - * it emits a single item: the item with the smallest value. - * - * ![](min.png) - * - * ## Examples - * - * Get the minimal value of a series of numbers - * - * ```ts - * import { of, min } from 'rxjs'; - * - * of(5, 4, 7, 2, 8) - * .pipe(min()) - * .subscribe(x => console.log(x)); - * - * // Outputs - * // 2 - * ``` - * - * Use a comparer function to get the minimal item - * - * ```ts - * import { of, min } from 'rxjs'; - * - * of( - * { age: 7, name: 'Foo' }, - * { age: 5, name: 'Bar' }, - * { age: 9, name: 'Beer' } - * ).pipe( - * min((a, b) => a.age < b.age ? -1 : 1) - * ) - * .subscribe(x => console.log(x.name)); - * - * // Outputs - * // 'Bar' - * ``` - * - * @see {@link max} - * - * @param comparer Optional comparer function that it will use instead of its - * default to compare the value of two items. - * @return A function that returns an Observable that emits item with the - * smallest value. - */ -export function min(comparer?: (x: T, y: T) => number): MonoTypeOperatorFunction { - return reduce(isFunction(comparer) ? (x, y) => (comparer(x, y) < 0 ? x : y) : (x, y) => (x < y ? x : y)); -} diff --git a/node_modules/rxjs/src/internal/operators/multicast.ts b/node_modules/rxjs/src/internal/operators/multicast.ts deleted file mode 100644 index 4ea03d2..0000000 --- a/node_modules/rxjs/src/internal/operators/multicast.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { Subject } from '../Subject'; -import { Observable } from '../Observable'; -import { ConnectableObservable } from '../observable/ConnectableObservable'; -import { OperatorFunction, UnaryFunction, ObservedValueOf, ObservableInput } from '../types'; -import { isFunction } from '../util/isFunction'; -import { connect } from './connect'; - -/** - * An operator that creates a {@link ConnectableObservable}, that when connected, - * with the `connect` method, will use the provided subject to multicast the values - * from the source to all consumers. - * - * @param subject The subject to multicast through. - * @return A function that returns a {@link ConnectableObservable} - * @deprecated Will be removed in v8. To create a connectable observable, use {@link connectable}. - * If you're using {@link refCount} after `multicast`, use the {@link share} operator instead. - * `multicast(subject), refCount()` is equivalent to - * `share({ connector: () => subject, resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false })`. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export function multicast(subject: Subject): UnaryFunction, ConnectableObservable>; - -/** - * Because this is deprecated in favor of the {@link connect} operator, and was otherwise poorly documented, - * rather than duplicate the effort of documenting the same behavior, please see documentation for the - * {@link connect} operator. - * - * @param subject The subject used to multicast. - * @param selector A setup function to setup the multicast - * @return A function that returns an observable that mirrors the observable returned by the selector. - * @deprecated Will be removed in v8. Use the {@link connect} operator instead. - * `multicast(subject, selector)` is equivalent to - * `connect(selector, { connector: () => subject })`. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export function multicast>( - subject: Subject, - selector: (shared: Observable) => O -): OperatorFunction>; - -/** - * An operator that creates a {@link ConnectableObservable}, that when connected, - * with the `connect` method, will use the provided subject to multicast the values - * from the source to all consumers. - * - * @param subjectFactory A factory that will be called to create the subject. Passing a function here - * will cause the underlying subject to be "reset" on error, completion, or refCounted unsubscription of - * the source. - * @return A function that returns a {@link ConnectableObservable} - * @deprecated Will be removed in v8. To create a connectable observable, use {@link connectable}. - * If you're using {@link refCount} after `multicast`, use the {@link share} operator instead. - * `multicast(() => new BehaviorSubject('test')), refCount()` is equivalent to - * `share({ connector: () => new BehaviorSubject('test') })`. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export function multicast(subjectFactory: () => Subject): UnaryFunction, ConnectableObservable>; - -/** - * Because this is deprecated in favor of the {@link connect} operator, and was otherwise poorly documented, - * rather than duplicate the effort of documenting the same behavior, please see documentation for the - * {@link connect} operator. - * - * @param subjectFactory A factory that creates the subject used to multicast. - * @param selector A function to setup the multicast and select the output. - * @return A function that returns an observable that mirrors the observable returned by the selector. - * @deprecated Will be removed in v8. Use the {@link connect} operator instead. - * `multicast(subjectFactory, selector)` is equivalent to - * `connect(selector, { connector: subjectFactory })`. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export function multicast>( - subjectFactory: () => Subject, - selector: (shared: Observable) => O -): OperatorFunction>; - -/** - * @deprecated Will be removed in v8. Use the {@link connectable} observable, the {@link connect} operator or the - * {@link share} operator instead. See the overloads below for equivalent replacement examples of this operator's - * behaviors. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export function multicast( - subjectOrSubjectFactory: Subject | (() => Subject), - selector?: (source: Observable) => Observable -): OperatorFunction { - const subjectFactory = isFunction(subjectOrSubjectFactory) ? subjectOrSubjectFactory : () => subjectOrSubjectFactory; - - if (isFunction(selector)) { - // If a selector function is provided, then we're a "normal" operator that isn't - // going to return a ConnectableObservable. We can use `connect` to do what we - // need to do. - return connect(selector, { - connector: subjectFactory, - }); - } - - return (source: Observable) => new ConnectableObservable(source, subjectFactory); -} diff --git a/node_modules/rxjs/src/internal/operators/observeOn.ts b/node_modules/rxjs/src/internal/operators/observeOn.ts deleted file mode 100644 index bd37111..0000000 --- a/node_modules/rxjs/src/internal/operators/observeOn.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** @prettier */ -import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; -import { executeSchedule } from '../util/executeSchedule'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -/** - * Re-emits all notifications from source Observable with specified scheduler. - * - * Ensure a specific scheduler is used, from outside of an Observable. - * - * `observeOn` is an operator that accepts a scheduler as a first parameter, which will be used to reschedule - * notifications emitted by the source Observable. It might be useful, if you do not have control over - * internal scheduler of a given Observable, but want to control when its values are emitted nevertheless. - * - * Returned Observable emits the same notifications (nexted values, complete and error events) as the source Observable, - * but rescheduled with provided scheduler. Note that this doesn't mean that source Observables internal - * scheduler will be replaced in any way. Original scheduler still will be used, but when the source Observable emits - * notification, it will be immediately scheduled again - this time with scheduler passed to `observeOn`. - * An anti-pattern would be calling `observeOn` on Observable that emits lots of values synchronously, to split - * that emissions into asynchronous chunks. For this to happen, scheduler would have to be passed into the source - * Observable directly (usually into the operator that creates it). `observeOn` simply delays notifications a - * little bit more, to ensure that they are emitted at expected moments. - * - * As a matter of fact, `observeOn` accepts second parameter, which specifies in milliseconds with what delay notifications - * will be emitted. The main difference between {@link delay} operator and `observeOn` is that `observeOn` - * will delay all notifications - including error notifications - while `delay` will pass through error - * from source Observable immediately when it is emitted. In general it is highly recommended to use `delay` operator - * for any kind of delaying of values in the stream, while using `observeOn` to specify which scheduler should be used - * for notification emissions in general. - * - * ## Example - * - * Ensure values in subscribe are called just before browser repaint - * - * ```ts - * import { interval, observeOn, animationFrameScheduler } from 'rxjs'; - * - * const someDiv = document.createElement('div'); - * someDiv.style.cssText = 'width: 200px;background: #09c'; - * document.body.appendChild(someDiv); - * const intervals = interval(10); // Intervals are scheduled - * // with async scheduler by default... - * intervals.pipe( - * observeOn(animationFrameScheduler) // ...but we will observe on animationFrame - * ) // scheduler to ensure smooth animation. - * .subscribe(val => { - * someDiv.style.height = val + 'px'; - * }); - * ``` - * - * @see {@link delay} - * - * @param scheduler Scheduler that will be used to reschedule notifications from source Observable. - * @param delay Number of milliseconds that states with what delay every notification should be rescheduled. - * @return A function that returns an Observable that emits the same - * notifications as the source Observable, but with provided scheduler. - */ -export function observeOn(scheduler: SchedulerLike, delay = 0): MonoTypeOperatorFunction { - return operate((source, subscriber) => { - source.subscribe( - createOperatorSubscriber( - subscriber, - (value) => executeSchedule(subscriber, scheduler, () => subscriber.next(value), delay), - () => executeSchedule(subscriber, scheduler, () => subscriber.complete(), delay), - (err) => executeSchedule(subscriber, scheduler, () => subscriber.error(err), delay) - ) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/onErrorResumeNextWith.ts b/node_modules/rxjs/src/internal/operators/onErrorResumeNextWith.ts deleted file mode 100644 index 9355c3f..0000000 --- a/node_modules/rxjs/src/internal/operators/onErrorResumeNextWith.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { ObservableInputTuple, OperatorFunction } from '../types'; -import { argsOrArgArray } from '../util/argsOrArgArray'; -import { onErrorResumeNext as oERNCreate } from '../observable/onErrorResumeNext'; - -export function onErrorResumeNextWith( - sources: [...ObservableInputTuple] -): OperatorFunction; -export function onErrorResumeNextWith( - ...sources: [...ObservableInputTuple] -): OperatorFunction; - -/** - * When any of the provided Observable emits an complete or error notification, it immediately subscribes to the next one - * that was passed. - * - * Execute series of Observables, subscribes to next one on error or complete. - * - * ![](onErrorResumeNext.png) - * - * `onErrorResumeNext` is an operator that accepts a series of Observables, provided either directly as - * arguments or as an array. If no single Observable is provided, returned Observable will simply behave the same - * as the source. - * - * `onErrorResumeNext` returns an Observable that starts by subscribing and re-emitting values from the source Observable. - * When its stream of values ends - no matter if Observable completed or emitted an error - `onErrorResumeNext` - * will subscribe to the first Observable that was passed as an argument to the method. It will start re-emitting - * its values as well and - again - when that stream ends, `onErrorResumeNext` will proceed to subscribing yet another - * Observable in provided series, no matter if previous Observable completed or ended with an error. This will - * be happening until there is no more Observables left in the series, at which point returned Observable will - * complete - even if the last subscribed stream ended with an error. - * - * `onErrorResumeNext` can be therefore thought of as version of {@link concat} operator, which is more permissive - * when it comes to the errors emitted by its input Observables. While `concat` subscribes to the next Observable - * in series only if previous one successfully completed, `onErrorResumeNext` subscribes even if it ended with - * an error. - * - * Note that you do not get any access to errors emitted by the Observables. In particular do not - * expect these errors to appear in error callback passed to {@link Observable#subscribe}. If you want to take - * specific actions based on what error was emitted by an Observable, you should try out {@link catchError} instead. - * - * - * ## Example - * - * Subscribe to the next Observable after map fails - * - * ```ts - * import { of, onErrorResumeNext, map } from 'rxjs'; - * - * of(1, 2, 3, 0) - * .pipe( - * map(x => { - * if (x === 0) { - * throw Error(); - * } - * - * return 10 / x; - * }), - * onErrorResumeNext(of(1, 2, 3)) - * ) - * .subscribe({ - * next: val => console.log(val), - * error: err => console.log(err), // Will never be called. - * complete: () => console.log('that\'s it!') - * }); - * - * // Logs: - * // 10 - * // 5 - * // 3.3333333333333335 - * // 1 - * // 2 - * // 3 - * // 'that's it!' - * ``` - * - * @see {@link concat} - * @see {@link catchError} - * - * @param sources `ObservableInput`s passed either directly or as an array. - * @return A function that returns an Observable that emits values from source - * Observable, but - if it errors - subscribes to the next passed Observable - * and so on, until it completes or runs out of Observables. - */ -export function onErrorResumeNextWith( - ...sources: [[...ObservableInputTuple]] | [...ObservableInputTuple] -): OperatorFunction { - // For some reason, TS 4.1 RC gets the inference wrong here and infers the - // result to be `A[number][]` - completely dropping the ObservableInput part - // of the type. This makes no sense whatsoever. As a workaround, the type is - // asserted explicitly. - const nextSources = argsOrArgArray(sources) as unknown as ObservableInputTuple; - - return (source) => oERNCreate(source, ...nextSources); -} - -/** - * @deprecated Renamed. Use {@link onErrorResumeNextWith} instead. Will be removed in v8. - */ -export const onErrorResumeNext = onErrorResumeNextWith; diff --git a/node_modules/rxjs/src/internal/operators/pairwise.ts b/node_modules/rxjs/src/internal/operators/pairwise.ts deleted file mode 100644 index e2b0eba..0000000 --- a/node_modules/rxjs/src/internal/operators/pairwise.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { OperatorFunction } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -/** - * Groups pairs of consecutive emissions together and emits them as an array of - * two values. - * - * Puts the current value and previous value together as - * an array, and emits that. - * - * ![](pairwise.png) - * - * The Nth emission from the source Observable will cause the output Observable - * to emit an array [(N-1)th, Nth] of the previous and the current value, as a - * pair. For this reason, `pairwise` emits on the second and subsequent - * emissions from the source Observable, but not on the first emission, because - * there is no previous value in that case. - * - * ## Example - * - * On every click (starting from the second), emit the relative distance to the previous click - * - * ```ts - * import { fromEvent, pairwise, map } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const pairs = clicks.pipe(pairwise()); - * const distance = pairs.pipe( - * map(([first, second]) => { - * const x0 = first.clientX; - * const y0 = first.clientY; - * const x1 = second.clientX; - * const y1 = second.clientY; - * return Math.sqrt(Math.pow(x0 - x1, 2) + Math.pow(y0 - y1, 2)); - * }) - * ); - * - * distance.subscribe(x => console.log(x)); - * ``` - * - * @see {@link buffer} - * @see {@link bufferCount} - * - * @return A function that returns an Observable of pairs (as arrays) of - * consecutive values from the source Observable. - */ -export function pairwise(): OperatorFunction { - return operate((source, subscriber) => { - let prev: T; - let hasPrev = false; - source.subscribe( - createOperatorSubscriber(subscriber, (value) => { - const p = prev; - prev = value; - hasPrev && subscriber.next([p, value]); - hasPrev = true; - }) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/partition.ts b/node_modules/rxjs/src/internal/operators/partition.ts deleted file mode 100644 index 9f29f85..0000000 --- a/node_modules/rxjs/src/internal/operators/partition.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { not } from '../util/not'; -import { filter } from './filter'; -import { Observable } from '../Observable'; -import { UnaryFunction } from '../types'; - -/** - * Splits the source Observable into two, one with values that satisfy a - * predicate, and another with values that don't satisfy the predicate. - * - * It's like {@link filter}, but returns two Observables: - * one like the output of {@link filter}, and the other with values that did not - * pass the condition. - * - * ![](partition.png) - * - * `partition` outputs an array with two Observables that partition the values - * from the source Observable through the given `predicate` function. The first - * Observable in that array emits source values for which the predicate argument - * returns true. The second Observable emits source values for which the - * predicate returns false. The first behaves like {@link filter} and the second - * behaves like {@link filter} with the predicate negated. - * - * ## Example - * - * Partition click events into those on DIV elements and those elsewhere - * - * ```ts - * import { fromEvent } from 'rxjs'; - * import { partition } from 'rxjs/operators'; - * - * const div = document.createElement('div'); - * div.style.cssText = 'width: 200px; height: 200px; background: #09c;'; - * document.body.appendChild(div); - * - * const clicks = fromEvent(document, 'click'); - * const [clicksOnDivs, clicksElsewhere] = clicks.pipe(partition(ev => (ev.target).tagName === 'DIV')); - * - * clicksOnDivs.subscribe(x => console.log('DIV clicked: ', x)); - * clicksElsewhere.subscribe(x => console.log('Other clicked: ', x)); - * ``` - * - * @see {@link filter} - * - * @param predicate A function that evaluates each value emitted by the source - * Observable. If it returns `true`, the value is emitted on the first Observable - * in the returned array, if `false` the value is emitted on the second Observable - * in the array. The `index` parameter is the number `i` for the i-th source - * emission that has happened since the subscription, starting from the number `0`. - * @param thisArg An optional argument to determine the value of `this` in the - * `predicate` function. - * @return A function that returns an array with two Observables: one with - * values that passed the predicate, and another with values that did not pass - * the predicate. - * @deprecated Replaced with the {@link partition} static creation function. Will be removed in v8. - */ -export function partition( - predicate: (value: T, index: number) => boolean, - thisArg?: any -): UnaryFunction, [Observable, Observable]> { - return (source: Observable) => - [filter(predicate, thisArg)(source), filter(not(predicate, thisArg))(source)] as [Observable, Observable]; -} diff --git a/node_modules/rxjs/src/internal/operators/pluck.ts b/node_modules/rxjs/src/internal/operators/pluck.ts deleted file mode 100644 index b80da73..0000000 --- a/node_modules/rxjs/src/internal/operators/pluck.ts +++ /dev/null @@ -1,106 +0,0 @@ -import { map } from './map'; -import { OperatorFunction } from '../types'; - -/* tslint:disable:max-line-length */ -/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ -export function pluck(k1: K1): OperatorFunction; -/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ -export function pluck(k1: K1, k2: K2): OperatorFunction; -/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ -export function pluck( - k1: K1, - k2: K2, - k3: K3 -): OperatorFunction; -/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ -export function pluck( - k1: K1, - k2: K2, - k3: K3, - k4: K4 -): OperatorFunction; -/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ -export function pluck< - T, - K1 extends keyof T, - K2 extends keyof T[K1], - K3 extends keyof T[K1][K2], - K4 extends keyof T[K1][K2][K3], - K5 extends keyof T[K1][K2][K3][K4] ->(k1: K1, k2: K2, k3: K3, k4: K4, k5: K5): OperatorFunction; -/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ -export function pluck< - T, - K1 extends keyof T, - K2 extends keyof T[K1], - K3 extends keyof T[K1][K2], - K4 extends keyof T[K1][K2][K3], - K5 extends keyof T[K1][K2][K3][K4], - K6 extends keyof T[K1][K2][K3][K4][K5] ->(k1: K1, k2: K2, k3: K3, k4: K4, k5: K5, k6: K6): OperatorFunction; -/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ -export function pluck< - T, - K1 extends keyof T, - K2 extends keyof T[K1], - K3 extends keyof T[K1][K2], - K4 extends keyof T[K1][K2][K3], - K5 extends keyof T[K1][K2][K3][K4], - K6 extends keyof T[K1][K2][K3][K4][K5] ->(k1: K1, k2: K2, k3: K3, k4: K4, k5: K5, k6: K6, ...rest: string[]): OperatorFunction; -/** @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. */ -export function pluck(...properties: string[]): OperatorFunction; -/* tslint:enable:max-line-length */ - -/** - * Maps each source value to its specified nested property. - * - * Like {@link map}, but meant only for picking one of - * the nested properties of every emitted value. - * - * ![](pluck.png) - * - * Given a list of strings or numbers describing a path to a property, retrieves - * the value of a specified nested property from all values in the source - * Observable. If a property can't be resolved, it will return `undefined` for - * that value. - * - * ## Example - * - * Map every click to the tagName of the clicked target element - * - * ```ts - * import { fromEvent, pluck } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const tagNames = clicks.pipe(pluck('target', 'tagName')); - * - * tagNames.subscribe(x => console.log(x)); - * ``` - * - * @see {@link map} - * - * @param properties The nested properties to pluck from each source - * value. - * @return A function that returns an Observable of property values from the - * source values. - * @deprecated Use {@link map} and optional chaining: `pluck('foo', 'bar')` is `map(x => x?.foo?.bar)`. Will be removed in v8. - */ -export function pluck(...properties: Array): OperatorFunction { - const length = properties.length; - if (length === 0) { - throw new Error('list of properties cannot be empty.'); - } - return map((x) => { - let currentProp: any = x; - for (let i = 0; i < length; i++) { - const p = currentProp?.[properties[i]]; - if (typeof p !== 'undefined') { - currentProp = p; - } else { - return undefined; - } - } - return currentProp; - }); -} diff --git a/node_modules/rxjs/src/internal/operators/publish.ts b/node_modules/rxjs/src/internal/operators/publish.ts deleted file mode 100644 index 6a42705..0000000 --- a/node_modules/rxjs/src/internal/operators/publish.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { Observable } from '../Observable'; -import { Subject } from '../Subject'; -import { multicast } from './multicast'; -import { ConnectableObservable } from '../observable/ConnectableObservable'; -import { MonoTypeOperatorFunction, OperatorFunction, UnaryFunction, ObservableInput, ObservedValueOf } from '../types'; -import { connect } from './connect'; - -/** - * Returns a connectable observable that, when connected, will multicast - * all values through a single underlying {@link Subject} instance. - * - * @deprecated Will be removed in v8. To create a connectable observable, use {@link connectable}. - * `source.pipe(publish())` is equivalent to - * `connectable(source, { connector: () => new Subject(), resetOnDisconnect: false })`. - * If you're using {@link refCount} after `publish`, use {@link share} operator instead. - * `source.pipe(publish(), refCount())` is equivalent to - * `source.pipe(share({ resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false }))`. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export function publish(): UnaryFunction, ConnectableObservable>; - -/** - * Returns an observable, that when subscribed to, creates an underlying {@link Subject}, - * provides an observable view of it to a `selector` function, takes the observable result of - * that selector function and subscribes to it, sending its values to the consumer, _then_ connects - * the subject to the original source. - * - * @param selector A function used to setup multicasting prior to automatic connection. - * - * @deprecated Will be removed in v8. Use the {@link connect} operator instead. - * `publish(selector)` is equivalent to `connect(selector)`. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export function publish>(selector: (shared: Observable) => O): OperatorFunction>; - -/** - * Returns a ConnectableObservable, which is a variety of Observable that waits until its connect method is called - * before it begins emitting items to those Observers that have subscribed to it. - * - * Makes a cold Observable hot - * - * ![](publish.png) - * - * ## Examples - * - * Make `source$` hot by applying `publish` operator, then merge each inner observable into a single one - * and subscribe - * - * ```ts - * import { zip, interval, of, map, publish, merge, tap } from 'rxjs'; - * - * const source$ = zip(interval(2000), of(1, 2, 3, 4, 5, 6, 7, 8, 9)) - * .pipe(map(([, number]) => number)); - * - * source$ - * .pipe( - * publish(multicasted$ => - * merge( - * multicasted$.pipe(tap(x => console.log('Stream 1:', x))), - * multicasted$.pipe(tap(x => console.log('Stream 2:', x))), - * multicasted$.pipe(tap(x => console.log('Stream 3:', x))) - * ) - * ) - * ) - * .subscribe(); - * - * // Results every two seconds - * // Stream 1: 1 - * // Stream 2: 1 - * // Stream 3: 1 - * // ... - * // Stream 1: 9 - * // Stream 2: 9 - * // Stream 3: 9 - * ``` - * - * @see {@link publishLast} - * @see {@link publishReplay} - * @see {@link publishBehavior} - * - * @param selector Optional selector function which can use the multicasted source sequence as many times - * as needed, without causing multiple subscriptions to the source sequence. - * Subscribers to the given source will receive all notifications of the source from the time of the subscription on. - * @return A function that returns a ConnectableObservable that upon connection - * causes the source Observable to emit items to its Observers. - * @deprecated Will be removed in v8. Use the {@link connectable} observable, the {@link connect} operator or the - * {@link share} operator instead. See the overloads below for equivalent replacement examples of this operator's - * behaviors. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export function publish(selector?: OperatorFunction): MonoTypeOperatorFunction | OperatorFunction { - return selector ? (source) => connect(selector)(source) : (source) => multicast(new Subject())(source); -} diff --git a/node_modules/rxjs/src/internal/operators/publishBehavior.ts b/node_modules/rxjs/src/internal/operators/publishBehavior.ts deleted file mode 100644 index d94589c..0000000 --- a/node_modules/rxjs/src/internal/operators/publishBehavior.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Observable } from '../Observable'; -import { BehaviorSubject } from '../BehaviorSubject'; -import { ConnectableObservable } from '../observable/ConnectableObservable'; -import { UnaryFunction } from '../types'; - -/** - * Creates a {@link ConnectableObservable} that utilizes a {@link BehaviorSubject}. - * - * @param initialValue The initial value passed to the {@link BehaviorSubject}. - * @return A function that returns a {@link ConnectableObservable} - * @deprecated Will be removed in v8. To create a connectable observable that uses a - * {@link BehaviorSubject} under the hood, use {@link connectable}. - * `source.pipe(publishBehavior(initValue))` is equivalent to - * `connectable(source, { connector: () => new BehaviorSubject(initValue), resetOnDisconnect: false })`. - * If you're using {@link refCount} after `publishBehavior`, use the {@link share} operator instead. - * `source.pipe(publishBehavior(initValue), refCount())` is equivalent to - * `source.pipe(share({ connector: () => new BehaviorSubject(initValue), resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false }))`. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export function publishBehavior(initialValue: T): UnaryFunction, ConnectableObservable> { - // Note that this has *never* supported the selector function. - return (source) => { - const subject = new BehaviorSubject(initialValue); - return new ConnectableObservable(source, () => subject); - }; -} diff --git a/node_modules/rxjs/src/internal/operators/publishLast.ts b/node_modules/rxjs/src/internal/operators/publishLast.ts deleted file mode 100644 index ded47fb..0000000 --- a/node_modules/rxjs/src/internal/operators/publishLast.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { Observable } from '../Observable'; -import { AsyncSubject } from '../AsyncSubject'; -import { ConnectableObservable } from '../observable/ConnectableObservable'; -import { UnaryFunction } from '../types'; - -/** - * Returns a connectable observable sequence that shares a single subscription to the - * underlying sequence containing only the last notification. - * - * ![](publishLast.png) - * - * Similar to {@link publish}, but it waits until the source observable completes and stores - * the last emitted value. - * Similarly to {@link publishReplay} and {@link publishBehavior}, this keeps storing the last - * value even if it has no more subscribers. If subsequent subscriptions happen, they will - * immediately get that last stored value and complete. - * - * ## Example - * - * ```ts - * import { ConnectableObservable, interval, publishLast, tap, take } from 'rxjs'; - * - * const connectable = >interval(1000) - * .pipe( - * tap(x => console.log('side effect', x)), - * take(3), - * publishLast() - * ); - * - * connectable.subscribe({ - * next: x => console.log('Sub. A', x), - * error: err => console.log('Sub. A Error', err), - * complete: () => console.log('Sub. A Complete') - * }); - * - * connectable.subscribe({ - * next: x => console.log('Sub. B', x), - * error: err => console.log('Sub. B Error', err), - * complete: () => console.log('Sub. B Complete') - * }); - * - * connectable.connect(); - * - * // Results: - * // 'side effect 0' - after one second - * // 'side effect 1' - after two seconds - * // 'side effect 2' - after three seconds - * // 'Sub. A 2' - immediately after 'side effect 2' - * // 'Sub. B 2' - * // 'Sub. A Complete' - * // 'Sub. B Complete' - * ``` - * - * @see {@link ConnectableObservable} - * @see {@link publish} - * @see {@link publishReplay} - * @see {@link publishBehavior} - * - * @return A function that returns an Observable that emits elements of a - * sequence produced by multicasting the source sequence. - * @deprecated Will be removed in v8. To create a connectable observable with an - * {@link AsyncSubject} under the hood, use {@link connectable}. - * `source.pipe(publishLast())` is equivalent to - * `connectable(source, { connector: () => new AsyncSubject(), resetOnDisconnect: false })`. - * If you're using {@link refCount} after `publishLast`, use the {@link share} operator instead. - * `source.pipe(publishLast(), refCount())` is equivalent to - * `source.pipe(share({ connector: () => new AsyncSubject(), resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false }))`. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export function publishLast(): UnaryFunction, ConnectableObservable> { - // Note that this has *never* supported a selector function like `publish` and `publishReplay`. - return (source) => { - const subject = new AsyncSubject(); - return new ConnectableObservable(source, () => subject); - }; -} diff --git a/node_modules/rxjs/src/internal/operators/publishReplay.ts b/node_modules/rxjs/src/internal/operators/publishReplay.ts deleted file mode 100644 index 47494e2..0000000 --- a/node_modules/rxjs/src/internal/operators/publishReplay.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { Observable } from '../Observable'; -import { ReplaySubject } from '../ReplaySubject'; -import { multicast } from './multicast'; -import { MonoTypeOperatorFunction, OperatorFunction, TimestampProvider, ObservableInput, ObservedValueOf } from '../types'; -import { isFunction } from '../util/isFunction'; - -/** - * Creates a {@link ConnectableObservable} that uses a {@link ReplaySubject} - * internally. - * - * @param bufferSize The buffer size for the underlying {@link ReplaySubject}. - * @param windowTime The window time for the underlying {@link ReplaySubject}. - * @param timestampProvider The timestamp provider for the underlying {@link ReplaySubject}. - * @deprecated Will be removed in v8. To create a connectable observable that uses a - * {@link ReplaySubject} under the hood, use {@link connectable}. - * `source.pipe(publishReplay(size, time, scheduler))` is equivalent to - * `connectable(source, { connector: () => new ReplaySubject(size, time, scheduler), resetOnDisconnect: false })`. - * If you're using {@link refCount} after `publishReplay`, use the {@link share} operator instead. - * `publishReplay(size, time, scheduler), refCount()` is equivalent to - * `share({ connector: () => new ReplaySubject(size, time, scheduler), resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false })`. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export function publishReplay( - bufferSize?: number, - windowTime?: number, - timestampProvider?: TimestampProvider -): MonoTypeOperatorFunction; - -/** - * Creates an observable, that when subscribed to, will create a {@link ReplaySubject}, - * and pass an observable from it (using [asObservable](api/index/class/Subject#asObservable)) to - * the `selector` function, which then returns an observable that is subscribed to before - * "connecting" the source to the internal `ReplaySubject`. - * - * Since this is deprecated, for additional details see the documentation for {@link connect}. - * - * @param bufferSize The buffer size for the underlying {@link ReplaySubject}. - * @param windowTime The window time for the underlying {@link ReplaySubject}. - * @param selector A function used to setup the multicast. - * @param timestampProvider The timestamp provider for the underlying {@link ReplaySubject}. - * @deprecated Will be removed in v8. Use the {@link connect} operator instead. - * `source.pipe(publishReplay(size, window, selector, scheduler))` is equivalent to - * `source.pipe(connect(selector, { connector: () => new ReplaySubject(size, window, scheduler) }))`. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export function publishReplay>( - bufferSize: number | undefined, - windowTime: number | undefined, - selector: (shared: Observable) => O, - timestampProvider?: TimestampProvider -): OperatorFunction>; - -/** - * Creates a {@link ConnectableObservable} that uses a {@link ReplaySubject} - * internally. - * - * @param bufferSize The buffer size for the underlying {@link ReplaySubject}. - * @param windowTime The window time for the underlying {@link ReplaySubject}. - * @param selector Passing `undefined` here determines that this operator will return a {@link ConnectableObservable}. - * @param timestampProvider The timestamp provider for the underlying {@link ReplaySubject}. - * @deprecated Will be removed in v8. To create a connectable observable that uses a - * {@link ReplaySubject} under the hood, use {@link connectable}. - * `source.pipe(publishReplay(size, time, scheduler))` is equivalent to - * `connectable(source, { connector: () => new ReplaySubject(size, time, scheduler), resetOnDisconnect: false })`. - * If you're using {@link refCount} after `publishReplay`, use the {@link share} operator instead. - * `publishReplay(size, time, scheduler), refCount()` is equivalent to - * `share({ connector: () => new ReplaySubject(size, time, scheduler), resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false })`. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export function publishReplay>( - bufferSize: number | undefined, - windowTime: number | undefined, - selector: undefined, - timestampProvider: TimestampProvider -): OperatorFunction>; - -/** - * @deprecated Will be removed in v8. Use the {@link connectable} observable, the {@link connect} operator or the - * {@link share} operator instead. See the overloads below for equivalent replacement examples of this operator's - * behaviors. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export function publishReplay( - bufferSize?: number, - windowTime?: number, - selectorOrScheduler?: TimestampProvider | OperatorFunction, - timestampProvider?: TimestampProvider -) { - if (selectorOrScheduler && !isFunction(selectorOrScheduler)) { - timestampProvider = selectorOrScheduler; - } - const selector = isFunction(selectorOrScheduler) ? selectorOrScheduler : undefined; - // Note, we're passing `selector!` here, because at runtime, `undefined` is an acceptable argument - // but it makes our TypeScript signature for `multicast` unhappy (as it should, because it's gross). - return (source: Observable) => multicast(new ReplaySubject(bufferSize, windowTime, timestampProvider), selector!)(source); -} diff --git a/node_modules/rxjs/src/internal/operators/race.ts b/node_modules/rxjs/src/internal/operators/race.ts deleted file mode 100644 index efa8cd9..0000000 --- a/node_modules/rxjs/src/internal/operators/race.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { ObservableInputTuple, OperatorFunction } from '../types'; -import { argsOrArgArray } from '../util/argsOrArgArray'; -import { raceWith } from './raceWith'; - -/** @deprecated Replaced with {@link raceWith}. Will be removed in v8. */ -export function race(otherSources: [...ObservableInputTuple]): OperatorFunction; -/** @deprecated Replaced with {@link raceWith}. Will be removed in v8. */ -export function race(...otherSources: [...ObservableInputTuple]): OperatorFunction; - -/** - * Returns an Observable that mirrors the first source Observable to emit a next, - * error or complete notification from the combination of this Observable and supplied Observables. - * @param args Sources used to race for which Observable emits first. - * @return A function that returns an Observable that mirrors the output of the - * first Observable to emit an item. - * @deprecated Replaced with {@link raceWith}. Will be removed in v8. - */ -export function race(...args: any[]): OperatorFunction { - return raceWith(...argsOrArgArray(args)); -} diff --git a/node_modules/rxjs/src/internal/operators/raceWith.ts b/node_modules/rxjs/src/internal/operators/raceWith.ts deleted file mode 100644 index 6e72929..0000000 --- a/node_modules/rxjs/src/internal/operators/raceWith.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { OperatorFunction, ObservableInputTuple } from '../types'; -import { raceInit } from '../observable/race'; -import { operate } from '../util/lift'; -import { identity } from '../util/identity'; - -/** - * Creates an Observable that mirrors the first source Observable to emit a next, - * error or complete notification from the combination of the Observable to which - * the operator is applied and supplied Observables. - * - * ## Example - * - * ```ts - * import { interval, map, raceWith } from 'rxjs'; - * - * const obs1 = interval(7000).pipe(map(() => 'slow one')); - * const obs2 = interval(3000).pipe(map(() => 'fast one')); - * const obs3 = interval(5000).pipe(map(() => 'medium one')); - * - * obs1 - * .pipe(raceWith(obs2, obs3)) - * .subscribe(winner => console.log(winner)); - * - * // Outputs - * // a series of 'fast one' - * ``` - * - * @param otherSources Sources used to race for which Observable emits first. - * @return A function that returns an Observable that mirrors the output of the - * first Observable to emit an item. - */ -export function raceWith( - ...otherSources: [...ObservableInputTuple] -): OperatorFunction { - return !otherSources.length - ? identity - : operate((source, subscriber) => { - raceInit([source, ...otherSources])(subscriber); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/reduce.ts b/node_modules/rxjs/src/internal/operators/reduce.ts deleted file mode 100644 index 5ee565e..0000000 --- a/node_modules/rxjs/src/internal/operators/reduce.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { scanInternals } from './scanInternals'; -import { OperatorFunction } from '../types'; -import { operate } from '../util/lift'; - -export function reduce(accumulator: (acc: A | V, value: V, index: number) => A): OperatorFunction; -export function reduce(accumulator: (acc: A, value: V, index: number) => A, seed: A): OperatorFunction; -export function reduce(accumulator: (acc: A | S, value: V, index: number) => A, seed: S): OperatorFunction; - -/** - * Applies an accumulator function over the source Observable, and returns the - * accumulated result when the source completes, given an optional seed value. - * - * Combines together all values emitted on the source, - * using an accumulator function that knows how to join a new source value into - * the accumulation from the past. - * - * ![](reduce.png) - * - * Like - * [Array.prototype.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce), - * `reduce` applies an `accumulator` function against an accumulation and each - * value of the source Observable (from the past) to reduce it to a single - * value, emitted on the output Observable. Note that `reduce` will only emit - * one value, only when the source Observable completes. It is equivalent to - * applying operator {@link scan} followed by operator {@link last}. - * - * Returns an Observable that applies a specified `accumulator` function to each - * item emitted by the source Observable. If a `seed` value is specified, then - * that value will be used as the initial value for the accumulator. If no seed - * value is specified, the first item of the source is used as the seed. - * - * ## Example - * - * Count the number of click events that happened in 5 seconds - * - * ```ts - * import { fromEvent, takeUntil, interval, map, reduce } from 'rxjs'; - * - * const clicksInFiveSeconds = fromEvent(document, 'click') - * .pipe(takeUntil(interval(5000))); - * - * const ones = clicksInFiveSeconds.pipe(map(() => 1)); - * const seed = 0; - * const count = ones.pipe(reduce((acc, one) => acc + one, seed)); - * - * count.subscribe(x => console.log(x)); - * ``` - * - * @see {@link count} - * @see {@link expand} - * @see {@link mergeScan} - * @see {@link scan} - * - * @param accumulator The accumulator function called on each source value. - * @param seed The initial accumulation value. - * @return A function that returns an Observable that emits a single value that - * is the result of accumulating the values emitted by the source Observable. - */ -export function reduce(accumulator: (acc: V | A, value: V, index: number) => A, seed?: any): OperatorFunction { - return operate(scanInternals(accumulator, seed, arguments.length >= 2, false, true)); -} diff --git a/node_modules/rxjs/src/internal/operators/refCount.ts b/node_modules/rxjs/src/internal/operators/refCount.ts deleted file mode 100644 index c4162c0..0000000 --- a/node_modules/rxjs/src/internal/operators/refCount.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { ConnectableObservable } from '../observable/ConnectableObservable'; -import { Subscription } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -/** - * Make a {@link ConnectableObservable} behave like a ordinary observable and automates the way - * you can connect to it. - * - * Internally it counts the subscriptions to the observable and subscribes (only once) to the source if - * the number of subscriptions is larger than 0. If the number of subscriptions is smaller than 1, it - * unsubscribes from the source. This way you can make sure that everything before the *published* - * refCount has only a single subscription independently of the number of subscribers to the target - * observable. - * - * Note that using the {@link share} operator is exactly the same as using the `multicast(() => new Subject())` operator - * (making the observable hot) and the *refCount* operator in a sequence. - * - * ![](refCount.png) - * - * ## Example - * - * In the following example there are two intervals turned into connectable observables - * by using the *publish* operator. The first one uses the *refCount* operator, the - * second one does not use it. You will notice that a connectable observable does nothing - * until you call its connect function. - * - * ```ts - * import { interval, tap, publish, refCount } from 'rxjs'; - * - * // Turn the interval observable into a ConnectableObservable (hot) - * const refCountInterval = interval(400).pipe( - * tap(num => console.log(`refCount ${ num }`)), - * publish(), - * refCount() - * ); - * - * const publishedInterval = interval(400).pipe( - * tap(num => console.log(`publish ${ num }`)), - * publish() - * ); - * - * refCountInterval.subscribe(); - * refCountInterval.subscribe(); - * // 'refCount 0' -----> 'refCount 1' -----> etc - * // All subscriptions will receive the same value and the tap (and - * // every other operator) before the `publish` operator will be executed - * // only once per event independently of the number of subscriptions. - * - * publishedInterval.subscribe(); - * // Nothing happens until you call .connect() on the observable. - * ``` - * - * @return A function that returns an Observable that automates the connection - * to ConnectableObservable. - * @see {@link ConnectableObservable} - * @see {@link share} - * @see {@link publish} - * @deprecated Replaced with the {@link share} operator. How `share` is used - * will depend on the connectable observable you created just prior to the - * `refCount` operator. - * Details: https://rxjs.dev/deprecations/multicasting - */ -export function refCount(): MonoTypeOperatorFunction { - return operate((source, subscriber) => { - let connection: Subscription | null = null; - - (source as any)._refCount++; - - const refCounter = createOperatorSubscriber(subscriber, undefined, undefined, undefined, () => { - if (!source || (source as any)._refCount <= 0 || 0 < --(source as any)._refCount) { - connection = null; - return; - } - - /// - // Compare the local RefCountSubscriber's connection Subscription to the - // connection Subscription on the shared ConnectableObservable. In cases - // where the ConnectableObservable source synchronously emits values, and - // the RefCountSubscriber's downstream Observers synchronously unsubscribe, - // execution continues to here before the RefCountOperator has a chance to - // supply the RefCountSubscriber with the shared connection Subscription. - // For example: - // ``` - // range(0, 10).pipe( - // publish(), - // refCount(), - // take(5), - // ) - // .subscribe(); - // ``` - // In order to account for this case, RefCountSubscriber should only dispose - // the ConnectableObservable's shared connection Subscription if the - // connection Subscription exists, *and* either: - // a. RefCountSubscriber doesn't have a reference to the shared connection - // Subscription yet, or, - // b. RefCountSubscriber's connection Subscription reference is identical - // to the shared connection Subscription - /// - - const sharedConnection = (source as any)._connection; - const conn = connection; - connection = null; - - if (sharedConnection && (!conn || sharedConnection === conn)) { - sharedConnection.unsubscribe(); - } - - subscriber.unsubscribe(); - }); - - source.subscribe(refCounter); - - if (!refCounter.closed) { - connection = (source as ConnectableObservable).connect(); - } - }); -} diff --git a/node_modules/rxjs/src/internal/operators/repeat.ts b/node_modules/rxjs/src/internal/operators/repeat.ts deleted file mode 100644 index 21a8cce..0000000 --- a/node_modules/rxjs/src/internal/operators/repeat.ts +++ /dev/null @@ -1,172 +0,0 @@ -import { Subscription } from '../Subscription'; -import { EMPTY } from '../observable/empty'; -import { operate } from '../util/lift'; -import { MonoTypeOperatorFunction, ObservableInput } from '../types'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; -import { timer } from '../observable/timer'; - -export interface RepeatConfig { - /** - * The number of times to repeat the source. Defaults to `Infinity`. - */ - count?: number; - - /** - * If a `number`, will delay the repeat of the source by that number of milliseconds. - * If a function, it will provide the number of times the source has been subscribed to, - * and the return value should be a valid observable input that will notify when the source - * should be repeated. If the notifier observable is empty, the result will complete. - */ - delay?: number | ((count: number) => ObservableInput); -} - -/** - * Returns an Observable that will resubscribe to the source stream when the source stream completes. - * - * Repeats all values emitted on the source. It's like {@link retry}, but for non error cases. - * - * ![](repeat.png) - * - * Repeat will output values from a source until the source completes, then it will resubscribe to the - * source a specified number of times, with a specified delay. Repeat can be particularly useful in - * combination with closing operators like {@link take}, {@link takeUntil}, {@link first}, or {@link takeWhile}, - * as it can be used to restart a source again from scratch. - * - * Repeat is very similar to {@link retry}, where {@link retry} will resubscribe to the source in the error case, but - * `repeat` will resubscribe if the source completes. - * - * Note that `repeat` will _not_ catch errors. Use {@link retry} for that. - * - * - `repeat(0)` returns an empty observable - * - `repeat()` will repeat forever - * - `repeat({ delay: 200 })` will repeat forever, with a delay of 200ms between repetitions. - * - `repeat({ count: 2, delay: 400 })` will repeat twice, with a delay of 400ms between repetitions. - * - `repeat({ delay: (count) => timer(count * 1000) })` will repeat forever, but will have a delay that grows by one second for each repetition. - * - * ## Example - * - * Repeat a message stream - * - * ```ts - * import { of, repeat } from 'rxjs'; - * - * const source = of('Repeat message'); - * const result = source.pipe(repeat(3)); - * - * result.subscribe(x => console.log(x)); - * - * // Results - * // 'Repeat message' - * // 'Repeat message' - * // 'Repeat message' - * ``` - * - * Repeat 3 values, 2 times - * - * ```ts - * import { interval, take, repeat } from 'rxjs'; - * - * const source = interval(1000); - * const result = source.pipe(take(3), repeat(2)); - * - * result.subscribe(x => console.log(x)); - * - * // Results every second - * // 0 - * // 1 - * // 2 - * // 0 - * // 1 - * // 2 - * ``` - * - * Defining two complex repeats with delays on the same source. - * Note that the second repeat cannot be called until the first - * repeat as exhausted it's count. - * - * ```ts - * import { defer, of, repeat } from 'rxjs'; - * - * const source = defer(() => { - * return of(`Hello, it is ${new Date()}`) - * }); - * - * source.pipe( - * // Repeat 3 times with a delay of 1 second between repetitions - * repeat({ - * count: 3, - * delay: 1000, - * }), - * - * // *Then* repeat forever, but with an exponential step-back - * // maxing out at 1 minute. - * repeat({ - * delay: (count) => timer(Math.min(60000, 2 ^ count * 1000)) - * }) - * ) - * ``` - * - * @see {@link repeatWhen} - * @see {@link retry} - * - * @param countOrConfig Either the number of times the source Observable items are repeated - * (a count of 0 will yield an empty Observable) or a {@link RepeatConfig} object. - */ -export function repeat(countOrConfig?: number | RepeatConfig): MonoTypeOperatorFunction { - let count = Infinity; - let delay: RepeatConfig['delay']; - - if (countOrConfig != null) { - if (typeof countOrConfig === 'object') { - ({ count = Infinity, delay } = countOrConfig); - } else { - count = countOrConfig; - } - } - - return count <= 0 - ? () => EMPTY - : operate((source, subscriber) => { - let soFar = 0; - let sourceSub: Subscription | null; - - const resubscribe = () => { - sourceSub?.unsubscribe(); - sourceSub = null; - if (delay != null) { - const notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(soFar)); - const notifierSubscriber = createOperatorSubscriber(subscriber, () => { - notifierSubscriber.unsubscribe(); - subscribeToSource(); - }); - notifier.subscribe(notifierSubscriber); - } else { - subscribeToSource(); - } - }; - - const subscribeToSource = () => { - let syncUnsub = false; - sourceSub = source.subscribe( - createOperatorSubscriber(subscriber, undefined, () => { - if (++soFar < count) { - if (sourceSub) { - resubscribe(); - } else { - syncUnsub = true; - } - } else { - subscriber.complete(); - } - }) - ); - - if (syncUnsub) { - resubscribe(); - } - }; - - subscribeToSource(); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/repeatWhen.ts b/node_modules/rxjs/src/internal/operators/repeatWhen.ts deleted file mode 100644 index 403b2c6..0000000 --- a/node_modules/rxjs/src/internal/operators/repeatWhen.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { Observable } from '../Observable'; -import { innerFrom } from '../observable/innerFrom'; -import { Subject } from '../Subject'; -import { Subscription } from '../Subscription'; - -import { MonoTypeOperatorFunction, ObservableInput } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -/** - * Returns an Observable that mirrors the source Observable with the exception of a `complete`. If the source - * Observable calls `complete`, this method will emit to the Observable returned from `notifier`. If that Observable - * calls `complete` or `error`, then this method will call `complete` or `error` on the child subscription. Otherwise - * this method will resubscribe to the source Observable. - * - * ![](repeatWhen.png) - * - * ## Example - * - * Repeat a message stream on click - * - * ```ts - * import { of, fromEvent, repeatWhen } from 'rxjs'; - * - * const source = of('Repeat message'); - * const documentClick$ = fromEvent(document, 'click'); - * - * const result = source.pipe(repeatWhen(() => documentClick$)); - * - * result.subscribe(data => console.log(data)) - * ``` - * - * @see {@link repeat} - * @see {@link retry} - * @see {@link retryWhen} - * - * @param notifier Function that receives an Observable of notifications with - * which a user can `complete` or `error`, aborting the repetition. - * @return A function that returns an Observable that mirrors the source - * Observable with the exception of a `complete`. - * @deprecated Will be removed in v9 or v10. Use {@link repeat}'s {@link RepeatConfig#delay delay} option instead. - * Instead of `repeatWhen(() => notify$)`, use: `repeat({ delay: () => notify$ })`. - */ -export function repeatWhen(notifier: (notifications: Observable) => ObservableInput): MonoTypeOperatorFunction { - return operate((source, subscriber) => { - let innerSub: Subscription | null; - let syncResub = false; - let completions$: Subject; - let isNotifierComplete = false; - let isMainComplete = false; - - /** - * Checks to see if we can complete the result, completes it, and returns `true` if it was completed. - */ - const checkComplete = () => isMainComplete && isNotifierComplete && (subscriber.complete(), true); - /** - * Gets the subject to send errors through. If it doesn't exist, - * we know we need to setup the notifier. - */ - const getCompletionSubject = () => { - if (!completions$) { - completions$ = new Subject(); - - // If the call to `notifier` throws, it will be caught by the OperatorSubscriber - // In the main subscription -- in `subscribeForRepeatWhen`. - innerFrom(notifier(completions$)).subscribe( - createOperatorSubscriber( - subscriber, - () => { - if (innerSub) { - subscribeForRepeatWhen(); - } else { - // If we don't have an innerSub yet, that's because the inner subscription - // call hasn't even returned yet. We've arrived here synchronously. - // So we flag that we want to resub, such that we can ensure finalization - // happens before we resubscribe. - syncResub = true; - } - }, - () => { - isNotifierComplete = true; - checkComplete(); - } - ) - ); - } - return completions$; - }; - - const subscribeForRepeatWhen = () => { - isMainComplete = false; - - innerSub = source.subscribe( - createOperatorSubscriber(subscriber, undefined, () => { - isMainComplete = true; - // Check to see if we are complete, and complete if so. - // If we are not complete. Get the subject. This calls the `notifier` function. - // If that function fails, it will throw and `.next()` will not be reached on this - // line. The thrown error is caught by the _complete handler in this - // `OperatorSubscriber` and handled appropriately. - !checkComplete() && getCompletionSubject().next(); - }) - ); - - if (syncResub) { - // Ensure that the inner subscription is torn down before - // moving on to the next subscription in the synchronous case. - // If we don't do this here, all inner subscriptions will not be - // torn down until the entire observable is done. - innerSub.unsubscribe(); - // It is important to null this out. Not only to free up memory, but - // to make sure code above knows we are in a subscribing state to - // handle synchronous resubscription. - innerSub = null; - // We may need to do this multiple times, so reset the flags. - syncResub = false; - // Resubscribe - subscribeForRepeatWhen(); - } - }; - - // Start the subscription - subscribeForRepeatWhen(); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/retry.ts b/node_modules/rxjs/src/internal/operators/retry.ts deleted file mode 100644 index dbb5164..0000000 --- a/node_modules/rxjs/src/internal/operators/retry.ts +++ /dev/null @@ -1,168 +0,0 @@ -import { MonoTypeOperatorFunction, ObservableInput } from '../types'; -import { operate } from '../util/lift'; -import { Subscription } from '../Subscription'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { identity } from '../util/identity'; -import { timer } from '../observable/timer'; -import { innerFrom } from '../observable/innerFrom'; - -/** - * The {@link retry} operator configuration object. `retry` either accepts a `number` - * or an object described by this interface. - */ -export interface RetryConfig { - /** - * The maximum number of times to retry. If `count` is omitted, `retry` will try to - * resubscribe on errors infinite number of times. - */ - count?: number; - /** - * The number of milliseconds to delay before retrying, OR a function to - * return a notifier for delaying. If a function is given, that function should - * return a notifier that, when it emits will retry the source. If the notifier - * completes _without_ emitting, the resulting observable will complete without error, - * if the notifier errors, the error will be pushed to the result. - */ - delay?: number | ((error: any, retryCount: number) => ObservableInput); - /** - * Whether or not to reset the retry counter when the retried subscription - * emits its first value. - */ - resetOnSuccess?: boolean; -} - -export function retry(count?: number): MonoTypeOperatorFunction; -export function retry(config: RetryConfig): MonoTypeOperatorFunction; - -/** - * Returns an Observable that mirrors the source Observable with the exception of an `error`. - * - * If the source Observable calls `error`, this method will resubscribe to the source Observable for a maximum of - * `count` resubscriptions rather than propagating the `error` call. - * - * ![](retry.png) - * - * The number of retries is determined by the `count` parameter. It can be set either by passing a number to - * `retry` function or by setting `count` property when `retry` is configured using {@link RetryConfig}. If - * `count` is omitted, `retry` will try to resubscribe on errors infinite number of times. - * - * Any and all items emitted by the source Observable will be emitted by the resulting Observable, even those - * emitted during failed subscriptions. For example, if an Observable fails at first but emits `[1, 2]` then - * succeeds the second time and emits: `[1, 2, 3, 4, 5, complete]` then the complete stream of emissions and - * notifications would be: `[1, 2, 1, 2, 3, 4, 5, complete]`. - * - * ## Example - * - * ```ts - * import { interval, mergeMap, throwError, of, retry } from 'rxjs'; - * - * const source = interval(1000); - * const result = source.pipe( - * mergeMap(val => val > 5 ? throwError(() => 'Error!') : of(val)), - * retry(2) // retry 2 times on error - * ); - * - * result.subscribe({ - * next: value => console.log(value), - * error: err => console.log(`${ err }: Retried 2 times then quit!`) - * }); - * - * // Output: - * // 0..1..2..3..4..5.. - * // 0..1..2..3..4..5.. - * // 0..1..2..3..4..5.. - * // 'Error!: Retried 2 times then quit!' - * ``` - * - * @see {@link retryWhen} - * - * @param configOrCount Either number of retry attempts before failing or a - * {@link RetryConfig} object. - * @return A function that returns an Observable that will resubscribe to the - * source stream when the source stream errors, at most `count` times. - */ -export function retry(configOrCount: number | RetryConfig = Infinity): MonoTypeOperatorFunction { - let config: RetryConfig; - if (configOrCount && typeof configOrCount === 'object') { - config = configOrCount; - } else { - config = { - count: configOrCount as number, - }; - } - const { count = Infinity, delay, resetOnSuccess: resetOnSuccess = false } = config; - - return count <= 0 - ? identity - : operate((source, subscriber) => { - let soFar = 0; - let innerSub: Subscription | null; - const subscribeForRetry = () => { - let syncUnsub = false; - innerSub = source.subscribe( - createOperatorSubscriber( - subscriber, - (value) => { - // If we're resetting on success - if (resetOnSuccess) { - soFar = 0; - } - subscriber.next(value); - }, - // Completions are passed through to consumer. - undefined, - (err) => { - if (soFar++ < count) { - // We are still under our retry count - const resub = () => { - if (innerSub) { - innerSub.unsubscribe(); - innerSub = null; - subscribeForRetry(); - } else { - syncUnsub = true; - } - }; - - if (delay != null) { - // The user specified a retry delay. - // They gave us a number, use a timer, otherwise, it's a function, - // and we're going to call it to get a notifier. - const notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(err, soFar)); - const notifierSubscriber = createOperatorSubscriber( - subscriber, - () => { - // After we get the first notification, we - // unsubscribe from the notifier, because we don't want anymore - // and we resubscribe to the source. - notifierSubscriber.unsubscribe(); - resub(); - }, - () => { - // The notifier completed without emitting. - // The author is telling us they want to complete. - subscriber.complete(); - } - ); - notifier.subscribe(notifierSubscriber); - } else { - // There was no notifier given. Just resub immediately. - resub(); - } - } else { - // We're past our maximum number of retries. - // Just send along the error. - subscriber.error(err); - } - } - ) - ); - if (syncUnsub) { - innerSub.unsubscribe(); - innerSub = null; - subscribeForRetry(); - } - }; - subscribeForRetry(); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/retryWhen.ts b/node_modules/rxjs/src/internal/operators/retryWhen.ts deleted file mode 100644 index 0b83ad6..0000000 --- a/node_modules/rxjs/src/internal/operators/retryWhen.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { Observable } from '../Observable'; -import { innerFrom } from '../observable/innerFrom'; -import { Subject } from '../Subject'; -import { Subscription } from '../Subscription'; - -import { MonoTypeOperatorFunction, ObservableInput } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -/** - * Returns an Observable that mirrors the source Observable with the exception of an `error`. If the source Observable - * calls `error`, this method will emit the Throwable that caused the error to the `ObservableInput` returned from `notifier`. - * If that Observable calls `complete` or `error` then this method will call `complete` or `error` on the child - * subscription. Otherwise this method will resubscribe to the source Observable. - * - * ![](retryWhen.png) - * - * Retry an observable sequence on error based on custom criteria. - * - * ## Example - * - * ```ts - * import { interval, map, retryWhen, tap, delayWhen, timer } from 'rxjs'; - * - * const source = interval(1000); - * const result = source.pipe( - * map(value => { - * if (value > 5) { - * // error will be picked up by retryWhen - * throw value; - * } - * return value; - * }), - * retryWhen(errors => - * errors.pipe( - * // log error message - * tap(value => console.log(`Value ${ value } was too high!`)), - * // restart in 5 seconds - * delayWhen(value => timer(value * 1000)) - * ) - * ) - * ); - * - * result.subscribe(value => console.log(value)); - * - * // results: - * // 0 - * // 1 - * // 2 - * // 3 - * // 4 - * // 5 - * // 'Value 6 was too high!' - * // - Wait 5 seconds then repeat - * ``` - * - * @see {@link retry} - * - * @param notifier Function that receives an Observable of notifications with which a - * user can `complete` or `error`, aborting the retry. - * @return A function that returns an Observable that mirrors the source - * Observable with the exception of an `error`. - * @deprecated Will be removed in v9 or v10, use {@link retry}'s `delay` option instead. - * Will be removed in v9 or v10. Use {@link retry}'s {@link RetryConfig#delay delay} option instead. - * Instead of `retryWhen(() => notify$)`, use: `retry({ delay: () => notify$ })`. - */ -export function retryWhen(notifier: (errors: Observable) => ObservableInput): MonoTypeOperatorFunction { - return operate((source, subscriber) => { - let innerSub: Subscription | null; - let syncResub = false; - let errors$: Subject; - - const subscribeForRetryWhen = () => { - innerSub = source.subscribe( - createOperatorSubscriber(subscriber, undefined, undefined, (err) => { - if (!errors$) { - errors$ = new Subject(); - innerFrom(notifier(errors$)).subscribe( - createOperatorSubscriber(subscriber, () => - // If we have an innerSub, this was an asynchronous call, kick off the retry. - // Otherwise, if we don't have an innerSub yet, that's because the inner subscription - // call hasn't even returned yet. We've arrived here synchronously. - // So we flag that we want to resub, such that we can ensure finalization - // happens before we resubscribe. - innerSub ? subscribeForRetryWhen() : (syncResub = true) - ) - ); - } - if (errors$) { - // We have set up the notifier without error. - errors$.next(err); - } - }) - ); - - if (syncResub) { - // Ensure that the inner subscription is torn down before - // moving on to the next subscription in the synchronous case. - // If we don't do this here, all inner subscriptions will not be - // torn down until the entire observable is done. - innerSub.unsubscribe(); - innerSub = null; - // We may need to do this multiple times, so reset the flag. - syncResub = false; - // Resubscribe - subscribeForRetryWhen(); - } - }; - - // Start the subscription - subscribeForRetryWhen(); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/sample.ts b/node_modules/rxjs/src/internal/operators/sample.ts deleted file mode 100644 index 9008af2..0000000 --- a/node_modules/rxjs/src/internal/operators/sample.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { innerFrom } from '../observable/innerFrom'; -import { MonoTypeOperatorFunction, ObservableInput } from '../types'; -import { operate } from '../util/lift'; -import { noop } from '../util/noop'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -/** - * Emits the most recently emitted value from the source Observable whenever - * another Observable, the `notifier`, emits. - * - * It's like {@link sampleTime}, but samples whenever - * the `notifier` `ObservableInput` emits something. - * - * ![](sample.png) - * - * Whenever the `notifier` `ObservableInput` emits a value, `sample` - * looks at the source Observable and emits whichever value it has most recently - * emitted since the previous sampling, unless the source has not emitted - * anything since the previous sampling. The `notifier` is subscribed to as soon - * as the output Observable is subscribed. - * - * ## Example - * - * On every click, sample the most recent `seconds` timer - * - * ```ts - * import { fromEvent, interval, sample } from 'rxjs'; - * - * const seconds = interval(1000); - * const clicks = fromEvent(document, 'click'); - * const result = seconds.pipe(sample(clicks)); - * - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link audit} - * @see {@link debounce} - * @see {@link sampleTime} - * @see {@link throttle} - * - * @param notifier The `ObservableInput` to use for sampling the - * source Observable. - * @return A function that returns an Observable that emits the results of - * sampling the values emitted by the source Observable whenever the notifier - * Observable emits value or completes. - */ -export function sample(notifier: ObservableInput): MonoTypeOperatorFunction { - return operate((source, subscriber) => { - let hasValue = false; - let lastValue: T | null = null; - source.subscribe( - createOperatorSubscriber(subscriber, (value) => { - hasValue = true; - lastValue = value; - }) - ); - innerFrom(notifier).subscribe( - createOperatorSubscriber( - subscriber, - () => { - if (hasValue) { - hasValue = false; - const value = lastValue!; - lastValue = null; - subscriber.next(value); - } - }, - noop - ) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/sampleTime.ts b/node_modules/rxjs/src/internal/operators/sampleTime.ts deleted file mode 100644 index e4af047..0000000 --- a/node_modules/rxjs/src/internal/operators/sampleTime.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { asyncScheduler } from '../scheduler/async'; -import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; -import { sample } from './sample'; -import { interval } from '../observable/interval'; - -/** - * Emits the most recently emitted value from the source Observable within - * periodic time intervals. - * - * Samples the source Observable at periodic time - * intervals, emitting what it samples. - * - * ![](sampleTime.png) - * - * `sampleTime` periodically looks at the source Observable and emits whichever - * value it has most recently emitted since the previous sampling, unless the - * source has not emitted anything since the previous sampling. The sampling - * happens periodically in time every `period` milliseconds (or the time unit - * defined by the optional `scheduler` argument). The sampling starts as soon as - * the output Observable is subscribed. - * - * ## Example - * - * Every second, emit the most recent click at most once - * - * ```ts - * import { fromEvent, sampleTime } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe(sampleTime(1000)); - * - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link auditTime} - * @see {@link debounceTime} - * @see {@link delay} - * @see {@link sample} - * @see {@link throttleTime} - * - * @param period The sampling period expressed in milliseconds or the time unit - * determined internally by the optional `scheduler`. - * @param scheduler The {@link SchedulerLike} to use for managing the timers - * that handle the sampling. - * @return A function that returns an Observable that emits the results of - * sampling the values emitted by the source Observable at the specified time - * interval. - */ -export function sampleTime(period: number, scheduler: SchedulerLike = asyncScheduler): MonoTypeOperatorFunction { - return sample(interval(period, scheduler)); -} diff --git a/node_modules/rxjs/src/internal/operators/scan.ts b/node_modules/rxjs/src/internal/operators/scan.ts deleted file mode 100644 index ce30695..0000000 --- a/node_modules/rxjs/src/internal/operators/scan.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { OperatorFunction } from '../types'; -import { operate } from '../util/lift'; -import { scanInternals } from './scanInternals'; - -export function scan(accumulator: (acc: A | V, value: V, index: number) => A): OperatorFunction; -export function scan(accumulator: (acc: A, value: V, index: number) => A, seed: A): OperatorFunction; -export function scan(accumulator: (acc: A | S, value: V, index: number) => A, seed: S): OperatorFunction; - -// TODO: link to a "redux pattern" section in the guide (location TBD) - -/** - * Useful for encapsulating and managing state. Applies an accumulator (or "reducer function") - * to each value from the source after an initial state is established -- either via - * a `seed` value (second argument), or from the first value from the source. - * - * It's like {@link reduce}, but emits the current - * accumulation state after each update - * - * ![](scan.png) - * - * This operator maintains an internal state and emits it after processing each value as follows: - * - * 1. First value arrives - * - If a `seed` value was supplied (as the second argument to `scan`), let `state = seed` and `value = firstValue`. - * - If NO `seed` value was supplied (no second argument), let `state = firstValue` and go to 3. - * 2. Let `state = accumulator(state, value)`. - * - If an error is thrown by `accumulator`, notify the consumer of an error. The process ends. - * 3. Emit `state`. - * 4. Next value arrives, let `value = nextValue`, go to 2. - * - * ## Examples - * - * An average of previous numbers. This example shows how - * not providing a `seed` can prime the stream with the - * first value from the source. - * - * ```ts - * import { of, scan, map } from 'rxjs'; - * - * const numbers$ = of(1, 2, 3); - * - * numbers$ - * .pipe( - * // Get the sum of the numbers coming in. - * scan((total, n) => total + n), - * // Get the average by dividing the sum by the total number - * // received so far (which is 1 more than the zero-based index). - * map((sum, index) => sum / (index + 1)) - * ) - * .subscribe(console.log); - * ``` - * - * The Fibonacci sequence. This example shows how you can use - * a seed to prime accumulation process. Also... you know... Fibonacci. - * So important to like, computers and stuff that its whiteboarded - * in job interviews. Now you can show them the Rx version! (Please don't, haha) - * - * ```ts - * import { interval, scan, map, startWith } from 'rxjs'; - * - * const firstTwoFibs = [0, 1]; - * // An endless stream of Fibonacci numbers. - * const fibonacci$ = interval(1000).pipe( - * // Scan to get the fibonacci numbers (after 0, 1) - * scan(([a, b]) => [b, a + b], firstTwoFibs), - * // Get the second number in the tuple, it's the one you calculated - * map(([, n]) => n), - * // Start with our first two digits :) - * startWith(...firstTwoFibs) - * ); - * - * fibonacci$.subscribe(console.log); - * ``` - * - * @see {@link expand} - * @see {@link mergeScan} - * @see {@link reduce} - * @see {@link switchScan} - * - * @param accumulator A "reducer function". This will be called for each value after an initial state is - * acquired. - * @param seed The initial state. If this is not provided, the first value from the source will - * be used as the initial state, and emitted without going through the accumulator. All subsequent values - * will be processed by the accumulator function. If this is provided, all values will go through - * the accumulator function. - * @return A function that returns an Observable of the accumulated values. - */ -export function scan(accumulator: (acc: V | A | S, value: V, index: number) => A, seed?: S): OperatorFunction { - // providing a seed of `undefined` *should* be valid and trigger - // hasSeed! so don't use `seed !== undefined` checks! - // For this reason, we have to check it here at the original call site - // otherwise inside Operator/Subscriber we won't know if `undefined` - // means they didn't provide anything or if they literally provided `undefined` - return operate(scanInternals(accumulator, seed as S, arguments.length >= 2, true)); -} diff --git a/node_modules/rxjs/src/internal/operators/scanInternals.ts b/node_modules/rxjs/src/internal/operators/scanInternals.ts deleted file mode 100644 index f2c2e5a..0000000 --- a/node_modules/rxjs/src/internal/operators/scanInternals.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { Observable } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -/** - * A basic scan operation. This is used for `scan` and `reduce`. - * @param accumulator The accumulator to use - * @param seed The seed value for the state to accumulate - * @param hasSeed Whether or not a seed was provided - * @param emitOnNext Whether or not to emit the state on next - * @param emitBeforeComplete Whether or not to emit the before completion - */ - -export function scanInternals( - accumulator: (acc: V | A | S, value: V, index: number) => A, - seed: S, - hasSeed: boolean, - emitOnNext: boolean, - emitBeforeComplete?: undefined | true -) { - return (source: Observable, subscriber: Subscriber) => { - // Whether or not we have state yet. This will only be - // false before the first value arrives if we didn't get - // a seed value. - let hasState = hasSeed; - // The state that we're tracking, starting with the seed, - // if there is one, and then updated by the return value - // from the accumulator on each emission. - let state: any = seed; - // An index to pass to the accumulator function. - let index = 0; - - // Subscribe to our source. All errors and completions are passed through. - source.subscribe( - createOperatorSubscriber( - subscriber, - (value) => { - // Always increment the index. - const i = index++; - // Set the state - state = hasState - ? // We already have state, so we can get the new state from the accumulator - accumulator(state, value, i) - : // We didn't have state yet, a seed value was not provided, so - - // we set the state to the first value, and mark that we have state now - ((hasState = true), value); - - // Maybe send it to the consumer. - emitOnNext && subscriber.next(state); - }, - // If an onComplete was given, call it, otherwise - // just pass through the complete notification to the consumer. - emitBeforeComplete && - (() => { - hasState && subscriber.next(state); - subscriber.complete(); - }) - ) - ); - }; -} diff --git a/node_modules/rxjs/src/internal/operators/sequenceEqual.ts b/node_modules/rxjs/src/internal/operators/sequenceEqual.ts deleted file mode 100644 index a6f9bec..0000000 --- a/node_modules/rxjs/src/internal/operators/sequenceEqual.ts +++ /dev/null @@ -1,146 +0,0 @@ -import { OperatorFunction, ObservableInput } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; - -/** - * Compares all values of two observables in sequence using an optional comparator function - * and returns an observable of a single boolean value representing whether or not the two sequences - * are equal. - * - * Checks to see of all values emitted by both observables are equal, in order. - * - * ![](sequenceEqual.png) - * - * `sequenceEqual` subscribes to source observable and `compareTo` `ObservableInput` (that internally - * gets converted to an observable) and buffers incoming values from each observable. Whenever either - * observable emits a value, the value is buffered and the buffers are shifted and compared from the bottom - * up; If any value pair doesn't match, the returned observable will emit `false` and complete. If one of the - * observables completes, the operator will wait for the other observable to complete; If the other - * observable emits before completing, the returned observable will emit `false` and complete. If one observable never - * completes or emits after the other completes, the returned observable will never complete. - * - * ## Example - * - * Figure out if the Konami code matches - * - * ```ts - * import { from, fromEvent, map, bufferCount, mergeMap, sequenceEqual } from 'rxjs'; - * - * const codes = from([ - * 'ArrowUp', - * 'ArrowUp', - * 'ArrowDown', - * 'ArrowDown', - * 'ArrowLeft', - * 'ArrowRight', - * 'ArrowLeft', - * 'ArrowRight', - * 'KeyB', - * 'KeyA', - * 'Enter', // no start key, clearly. - * ]); - * - * const keys = fromEvent(document, 'keyup').pipe(map(e => e.code)); - * const matches = keys.pipe( - * bufferCount(11, 1), - * mergeMap(last11 => from(last11).pipe(sequenceEqual(codes))) - * ); - * matches.subscribe(matched => console.log('Successful cheat at Contra? ', matched)); - * ``` - * - * @see {@link combineLatest} - * @see {@link zip} - * @see {@link withLatestFrom} - * - * @param compareTo The `ObservableInput` sequence to compare the source sequence to. - * @param comparator An optional function to compare each value pair. - * - * @return A function that returns an Observable that emits a single boolean - * value representing whether or not the values emitted by the source - * Observable and provided `ObservableInput` were equal in sequence. - */ -export function sequenceEqual( - compareTo: ObservableInput, - comparator: (a: T, b: T) => boolean = (a, b) => a === b -): OperatorFunction { - return operate((source, subscriber) => { - // The state for the source observable - const aState = createState(); - // The state for the compareTo observable; - const bState = createState(); - - /** A utility to emit and complete */ - const emit = (isEqual: boolean) => { - subscriber.next(isEqual); - subscriber.complete(); - }; - - /** - * Creates a subscriber that subscribes to one of the sources, and compares its collected - * state -- `selfState` -- to the other source's collected state -- `otherState`. This - * is used for both streams. - */ - const createSubscriber = (selfState: SequenceState, otherState: SequenceState) => { - const sequenceEqualSubscriber = createOperatorSubscriber( - subscriber, - (a: T) => { - const { buffer, complete } = otherState; - if (buffer.length === 0) { - // If there's no values in the other buffer - // and the other stream is complete, we know - // this isn't a match, because we got one more value. - // Otherwise, we push onto our buffer, so when the other - // stream emits, it can pull this value off our buffer and check it - // at the appropriate time. - complete ? emit(false) : selfState.buffer.push(a); - } else { - // If the other stream *does* have values in its buffer, - // pull the oldest one off so we can compare it to what we - // just got. If it wasn't a match, emit `false` and complete. - !comparator(a, buffer.shift()!) && emit(false); - } - }, - () => { - // Or observable completed - selfState.complete = true; - const { complete, buffer } = otherState; - // If the other observable is also complete, and there's - // still stuff left in their buffer, it doesn't match, if their - // buffer is empty, then it does match. This is because we can't - // possibly get more values here anymore. - complete && emit(buffer.length === 0); - // Be sure to clean up our stream as soon as possible if we can. - sequenceEqualSubscriber?.unsubscribe(); - } - ); - - return sequenceEqualSubscriber; - }; - - // Subscribe to each source. - source.subscribe(createSubscriber(aState, bState)); - innerFrom(compareTo).subscribe(createSubscriber(bState, aState)); - }); -} - -/** - * A simple structure for the data used to test each sequence - */ -interface SequenceState { - /** A temporary store for arrived values before they are checked */ - buffer: T[]; - /** Whether or not the sequence source has completed. */ - complete: boolean; -} - -/** - * Creates a simple structure that is used to represent - * data used to test each sequence. - */ -function createState(): SequenceState { - return { - buffer: [], - complete: false, - }; -} diff --git a/node_modules/rxjs/src/internal/operators/share.ts b/node_modules/rxjs/src/internal/operators/share.ts deleted file mode 100644 index bc0c270..0000000 --- a/node_modules/rxjs/src/internal/operators/share.ts +++ /dev/null @@ -1,267 +0,0 @@ -import { innerFrom } from '../observable/innerFrom'; -import { Subject } from '../Subject'; -import { SafeSubscriber } from '../Subscriber'; -import { Subscription } from '../Subscription'; -import { MonoTypeOperatorFunction, SubjectLike, ObservableInput } from '../types'; -import { operate } from '../util/lift'; - -export interface ShareConfig { - /** - * The factory used to create the subject that will connect the source observable to - * multicast consumers. - */ - connector?: () => SubjectLike; - /** - * If `true`, the resulting observable will reset internal state on error from source and return to a "cold" state. This - * allows the resulting observable to be "retried" in the event of an error. - * If `false`, when an error comes from the source it will push the error into the connecting subject, and the subject - * will remain the connecting subject, meaning the resulting observable will not go "cold" again, and subsequent retries - * or resubscriptions will resubscribe to that same subject. In all cases, RxJS subjects will emit the same error again, however - * {@link ReplaySubject} will also push its buffered values before pushing the error. - * It is also possible to pass a notifier factory returning an `ObservableInput` instead which grants more fine-grained - * control over how and when the reset should happen. This allows behaviors like conditional or delayed resets. - */ - resetOnError?: boolean | ((error: any) => ObservableInput); - /** - * If `true`, the resulting observable will reset internal state on completion from source and return to a "cold" state. This - * allows the resulting observable to be "repeated" after it is done. - * If `false`, when the source completes, it will push the completion through the connecting subject, and the subject - * will remain the connecting subject, meaning the resulting observable will not go "cold" again, and subsequent repeats - * or resubscriptions will resubscribe to that same subject. - * It is also possible to pass a notifier factory returning an `ObservableInput` instead which grants more fine-grained - * control over how and when the reset should happen. This allows behaviors like conditional or delayed resets. - */ - resetOnComplete?: boolean | (() => ObservableInput); - /** - * If `true`, when the number of subscribers to the resulting observable reaches zero due to those subscribers unsubscribing, the - * internal state will be reset and the resulting observable will return to a "cold" state. This means that the next - * time the resulting observable is subscribed to, a new subject will be created and the source will be subscribed to - * again. - * If `false`, when the number of subscribers to the resulting observable reaches zero due to unsubscription, the subject - * will remain connected to the source, and new subscriptions to the result will be connected through that same subject. - * It is also possible to pass a notifier factory returning an `ObservableInput` instead which grants more fine-grained - * control over how and when the reset should happen. This allows behaviors like conditional or delayed resets. - */ - resetOnRefCountZero?: boolean | (() => ObservableInput); -} - -export function share(): MonoTypeOperatorFunction; - -export function share(options: ShareConfig): MonoTypeOperatorFunction; - -/** - * Returns a new Observable that multicasts (shares) the original Observable. As long as there is at least one - * Subscriber this Observable will be subscribed and emitting data. When all subscribers have unsubscribed it will - * unsubscribe from the source Observable. Because the Observable is multicasting it makes the stream `hot`. - * This is an alias for `multicast(() => new Subject()), refCount()`. - * - * The subscription to the underlying source Observable can be reset (unsubscribe and resubscribe for new subscribers), - * if the subscriber count to the shared observable drops to 0, or if the source Observable errors or completes. It is - * possible to use notifier factories for the resets to allow for behaviors like conditional or delayed resets. Please - * note that resetting on error or complete of the source Observable does not behave like a transparent retry or restart - * of the source because the error or complete will be forwarded to all subscribers and their subscription will be - * closed. Only new subscribers after a reset on error or complete happened will cause a fresh subscription to the - * source. To achieve transparent retries or restarts pipe the source through appropriate operators before sharing. - * - * ![](share.png) - * - * ## Example - * - * Generate new multicast Observable from the `source` Observable value - * - * ```ts - * import { interval, tap, map, take, share } from 'rxjs'; - * - * const source = interval(1000).pipe( - * tap(x => console.log('Processing: ', x)), - * map(x => x * x), - * take(6), - * share() - * ); - * - * source.subscribe(x => console.log('subscription 1: ', x)); - * source.subscribe(x => console.log('subscription 2: ', x)); - * - * // Logs: - * // Processing: 0 - * // subscription 1: 0 - * // subscription 2: 0 - * // Processing: 1 - * // subscription 1: 1 - * // subscription 2: 1 - * // Processing: 2 - * // subscription 1: 4 - * // subscription 2: 4 - * // Processing: 3 - * // subscription 1: 9 - * // subscription 2: 9 - * // Processing: 4 - * // subscription 1: 16 - * // subscription 2: 16 - * // Processing: 5 - * // subscription 1: 25 - * // subscription 2: 25 - * ``` - * - * ## Example with notifier factory: Delayed reset - * - * ```ts - * import { interval, take, share, timer } from 'rxjs'; - * - * const source = interval(1000).pipe( - * take(3), - * share({ - * resetOnRefCountZero: () => timer(1000) - * }) - * ); - * - * const subscriptionOne = source.subscribe(x => console.log('subscription 1: ', x)); - * setTimeout(() => subscriptionOne.unsubscribe(), 1300); - * - * setTimeout(() => source.subscribe(x => console.log('subscription 2: ', x)), 1700); - * - * setTimeout(() => source.subscribe(x => console.log('subscription 3: ', x)), 5000); - * - * // Logs: - * // subscription 1: 0 - * // (subscription 1 unsubscribes here) - * // (subscription 2 subscribes here ~400ms later, source was not reset) - * // subscription 2: 1 - * // subscription 2: 2 - * // (subscription 2 unsubscribes here) - * // (subscription 3 subscribes here ~2000ms later, source did reset before) - * // subscription 3: 0 - * // subscription 3: 1 - * // subscription 3: 2 - * ``` - * - * @see {@link shareReplay} - * - * @return A function that returns an Observable that mirrors the source. - */ -export function share(options: ShareConfig = {}): MonoTypeOperatorFunction { - const { connector = () => new Subject(), resetOnError = true, resetOnComplete = true, resetOnRefCountZero = true } = options; - // It's necessary to use a wrapper here, as the _operator_ must be - // referentially transparent. Otherwise, it cannot be used in calls to the - // static `pipe` function - to create a partial pipeline. - // - // The _operator function_ - the function returned by the _operator_ - will - // not be referentially transparent - as it shares its source - but the - // _operator function_ is called when the complete pipeline is composed via a - // call to a source observable's `pipe` method - not when the static `pipe` - // function is called. - return (wrapperSource) => { - let connection: SafeSubscriber | undefined; - let resetConnection: Subscription | undefined; - let subject: SubjectLike | undefined; - let refCount = 0; - let hasCompleted = false; - let hasErrored = false; - - const cancelReset = () => { - resetConnection?.unsubscribe(); - resetConnection = undefined; - }; - // Used to reset the internal state to a "cold" - // state, as though it had never been subscribed to. - const reset = () => { - cancelReset(); - connection = subject = undefined; - hasCompleted = hasErrored = false; - }; - const resetAndUnsubscribe = () => { - // We need to capture the connection before - // we reset (if we need to reset). - const conn = connection; - reset(); - conn?.unsubscribe(); - }; - - return operate((source, subscriber) => { - refCount++; - if (!hasErrored && !hasCompleted) { - cancelReset(); - } - - // Create the subject if we don't have one yet. Grab a local reference to - // it as well, which avoids non-null assertions when using it and, if we - // connect to it now, then error/complete need a reference after it was - // reset. - const dest = (subject = subject ?? connector()); - - // Add the finalization directly to the subscriber - instead of returning it - - // so that the handling of the subscriber's unsubscription will be wired - // up _before_ the subscription to the source occurs. This is done so that - // the assignment to the source connection's `closed` property will be seen - // by synchronous firehose sources. - subscriber.add(() => { - refCount--; - - // If we're resetting on refCount === 0, and it's 0, we only want to do - // that on "unsubscribe", really. Resetting on error or completion is a different - // configuration. - if (refCount === 0 && !hasErrored && !hasCompleted) { - resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero); - } - }); - - // The following line adds the subscription to the subscriber passed. - // Basically, `subscriber === dest.subscribe(subscriber)` is `true`. - dest.subscribe(subscriber); - - if ( - !connection && - // Check this shareReplay is still activate - it can be reset to 0 - // and be "unsubscribed" _before_ it actually subscribes. - // If we were to subscribe then, it'd leak and get stuck. - refCount > 0 - ) { - // We need to create a subscriber here - rather than pass an observer and - // assign the returned subscription to connection - because it's possible - // for reentrant subscriptions to the shared observable to occur and in - // those situations we want connection to be already-assigned so that we - // don't create another connection to the source. - connection = new SafeSubscriber({ - next: (value) => dest.next(value), - error: (err) => { - hasErrored = true; - cancelReset(); - resetConnection = handleReset(reset, resetOnError, err); - dest.error(err); - }, - complete: () => { - hasCompleted = true; - cancelReset(); - resetConnection = handleReset(reset, resetOnComplete); - dest.complete(); - }, - }); - innerFrom(source).subscribe(connection); - } - })(wrapperSource); - }; -} - -function handleReset( - reset: () => void, - on: boolean | ((...args: T) => ObservableInput), - ...args: T -): Subscription | undefined { - if (on === true) { - reset(); - return; - } - - if (on === false) { - return; - } - - const onSubscriber = new SafeSubscriber({ - next: () => { - onSubscriber.unsubscribe(); - reset(); - }, - }); - - return innerFrom(on(...args)).subscribe(onSubscriber); -} diff --git a/node_modules/rxjs/src/internal/operators/shareReplay.ts b/node_modules/rxjs/src/internal/operators/shareReplay.ts deleted file mode 100644 index b43f363..0000000 --- a/node_modules/rxjs/src/internal/operators/shareReplay.ts +++ /dev/null @@ -1,173 +0,0 @@ -import { ReplaySubject } from '../ReplaySubject'; -import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; -import { share } from './share'; - -export interface ShareReplayConfig { - bufferSize?: number; - windowTime?: number; - refCount: boolean; - scheduler?: SchedulerLike; -} - -export function shareReplay(config: ShareReplayConfig): MonoTypeOperatorFunction; -export function shareReplay(bufferSize?: number, windowTime?: number, scheduler?: SchedulerLike): MonoTypeOperatorFunction; - -/** - * Share source and replay specified number of emissions on subscription. - * - * This operator is a specialization of `replay` that connects to a source observable - * and multicasts through a `ReplaySubject` constructed with the specified arguments. - * A successfully completed source will stay cached in the `shareReplay`ed observable forever, - * but an errored source can be retried. - * - * ## Why use `shareReplay`? - * - * You generally want to use `shareReplay` when you have side-effects or taxing computations - * that you do not wish to be executed amongst multiple subscribers. - * It may also be valuable in situations where you know you will have late subscribers to - * a stream that need access to previously emitted values. - * This ability to replay values on subscription is what differentiates {@link share} and `shareReplay`. - * - * ## Reference counting - * - * By default `shareReplay` will use `refCount` of false, meaning that it will _not_ unsubscribe the - * source when the reference counter drops to zero, i.e. the inner `ReplaySubject` will _not_ be unsubscribed - * (and potentially run for ever). - * This is the default as it is expected that `shareReplay` is often used to keep around expensive to setup - * observables which we want to keep running instead of having to do the expensive setup again. - * - * As of RXJS version 6.4.0 a new overload signature was added to allow for manual control over what - * happens when the operators internal reference counter drops to zero. - * If `refCount` is true, the source will be unsubscribed from once the reference count drops to zero, i.e. - * the inner `ReplaySubject` will be unsubscribed. All new subscribers will receive value emissions from a - * new `ReplaySubject` which in turn will cause a new subscription to the source observable. - * - * ## Examples - * - * Example with a third subscriber coming late to the party - * - * ```ts - * import { interval, take, shareReplay } from 'rxjs'; - * - * const shared$ = interval(2000).pipe( - * take(6), - * shareReplay(3) - * ); - * - * shared$.subscribe(x => console.log('sub A: ', x)); - * shared$.subscribe(y => console.log('sub B: ', y)); - * - * setTimeout(() => { - * shared$.subscribe(y => console.log('sub C: ', y)); - * }, 11000); - * - * // Logs: - * // (after ~2000 ms) - * // sub A: 0 - * // sub B: 0 - * // (after ~4000 ms) - * // sub A: 1 - * // sub B: 1 - * // (after ~6000 ms) - * // sub A: 2 - * // sub B: 2 - * // (after ~8000 ms) - * // sub A: 3 - * // sub B: 3 - * // (after ~10000 ms) - * // sub A: 4 - * // sub B: 4 - * // (after ~11000 ms, sub C gets the last 3 values) - * // sub C: 2 - * // sub C: 3 - * // sub C: 4 - * // (after ~12000 ms) - * // sub A: 5 - * // sub B: 5 - * // sub C: 5 - * ``` - * - * Example for `refCount` usage - * - * ```ts - * import { Observable, tap, interval, shareReplay, take } from 'rxjs'; - * - * const log = (name: string, source: Observable) => source.pipe( - * tap({ - * subscribe: () => console.log(`${ name }: subscribed`), - * next: value => console.log(`${ name }: ${ value }`), - * complete: () => console.log(`${ name }: completed`), - * finalize: () => console.log(`${ name }: unsubscribed`) - * }) - * ); - * - * const obs$ = log('source', interval(1000)); - * - * const shared$ = log('shared', obs$.pipe( - * shareReplay({ bufferSize: 1, refCount: true }), - * take(2) - * )); - * - * shared$.subscribe(x => console.log('sub A: ', x)); - * shared$.subscribe(y => console.log('sub B: ', y)); - * - * // PRINTS: - * // shared: subscribed <-- reference count = 1 - * // source: subscribed - * // shared: subscribed <-- reference count = 2 - * // source: 0 - * // shared: 0 - * // sub A: 0 - * // shared: 0 - * // sub B: 0 - * // source: 1 - * // shared: 1 - * // sub A: 1 - * // shared: completed <-- take(2) completes the subscription for sub A - * // shared: unsubscribed <-- reference count = 1 - * // shared: 1 - * // sub B: 1 - * // shared: completed <-- take(2) completes the subscription for sub B - * // shared: unsubscribed <-- reference count = 0 - * // source: unsubscribed <-- replaySubject unsubscribes from source observable because the reference count dropped to 0 and refCount is true - * - * // In case of refCount being false, the unsubscribe is never called on the source and the source would keep on emitting, even if no subscribers - * // are listening. - * // source: 2 - * // source: 3 - * // source: 4 - * // ... - * ``` - * - * @see {@link publish} - * @see {@link share} - * @see {@link publishReplay} - * - * @param configOrBufferSize Maximum element count of the replay buffer or {@link ShareReplayConfig configuration} - * object. - * @param windowTime Maximum time length of the replay buffer in milliseconds. - * @param scheduler Scheduler where connected observers within the selector function - * will be invoked on. - * @return A function that returns an Observable sequence that contains the - * elements of a sequence produced by multicasting the source sequence within a - * selector function. - */ -export function shareReplay( - configOrBufferSize?: ShareReplayConfig | number, - windowTime?: number, - scheduler?: SchedulerLike -): MonoTypeOperatorFunction { - let bufferSize: number; - let refCount = false; - if (configOrBufferSize && typeof configOrBufferSize === 'object') { - ({ bufferSize = Infinity, windowTime = Infinity, refCount = false, scheduler } = configOrBufferSize); - } else { - bufferSize = (configOrBufferSize ?? Infinity) as number; - } - return share({ - connector: () => new ReplaySubject(bufferSize, windowTime, scheduler), - resetOnError: true, - resetOnComplete: false, - resetOnRefCountZero: refCount, - }); -} diff --git a/node_modules/rxjs/src/internal/operators/single.ts b/node_modules/rxjs/src/internal/operators/single.ts deleted file mode 100644 index 59c21c5..0000000 --- a/node_modules/rxjs/src/internal/operators/single.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { Observable } from '../Observable'; -import { EmptyError } from '../util/EmptyError'; - -import { MonoTypeOperatorFunction, OperatorFunction, TruthyTypesOf } from '../types'; -import { SequenceError } from '../util/SequenceError'; -import { NotFoundError } from '../util/NotFoundError'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -export function single(predicate: BooleanConstructor): OperatorFunction>; -export function single(predicate?: (value: T, index: number, source: Observable) => boolean): MonoTypeOperatorFunction; - -/** - * Returns an observable that asserts that only one value is - * emitted from the observable that matches the predicate. If no - * predicate is provided, then it will assert that the observable - * only emits one value. - * - * If the source Observable did not emit `next` before completion, it - * will emit an {@link EmptyError} to the Observer's `error` callback. - * - * In the event that two values are found that match the predicate, - * or when there are two values emitted and no predicate, it will - * emit a {@link SequenceError} to the Observer's `error` callback. - * - * In the event that no values match the predicate, if one is provided, - * it will emit a {@link NotFoundError} to the Observer's `error` callback. - * - * ## Example - * - * Expect only `name` beginning with `'B'` - * - * ```ts - * import { of, single } from 'rxjs'; - * - * const source1 = of( - * { name: 'Ben' }, - * { name: 'Tracy' }, - * { name: 'Laney' }, - * { name: 'Lily' } - * ); - * - * source1 - * .pipe(single(x => x.name.startsWith('B'))) - * .subscribe(x => console.log(x)); - * // Emits 'Ben' - * - * - * const source2 = of( - * { name: 'Ben' }, - * { name: 'Tracy' }, - * { name: 'Bradley' }, - * { name: 'Lincoln' } - * ); - * - * source2 - * .pipe(single(x => x.name.startsWith('B'))) - * .subscribe({ error: err => console.error(err) }); - * // Error emitted: SequenceError('Too many values match') - * - * - * const source3 = of( - * { name: 'Laney' }, - * { name: 'Tracy' }, - * { name: 'Lily' }, - * { name: 'Lincoln' } - * ); - * - * source3 - * .pipe(single(x => x.name.startsWith('B'))) - * .subscribe({ error: err => console.error(err) }); - * // Error emitted: NotFoundError('No values match') - * ``` - * - * @see {@link first} - * @see {@link find} - * @see {@link findIndex} - * @see {@link elementAt} - * - * @throws {NotFoundError} Delivers a `NotFoundError` to the Observer's `error` - * callback if the Observable completes before any `next` notification was sent. - * @throws {SequenceError} Delivers a `SequenceError` if more than one value is - * emitted that matches the provided predicate. If no predicate is provided, it - * will deliver a `SequenceError` if more than one value comes from the source. - * @throws {EmptyError} Delivers an `EmptyError` if no values were `next`ed prior - * to completion. - * - * @param predicate A predicate function to evaluate items emitted by the source - * Observable. - * @return A function that returns an Observable that emits the single item - * emitted by the source Observable that matches the predicate. - */ -export function single(predicate?: (value: T, index: number, source: Observable) => boolean): MonoTypeOperatorFunction { - return operate((source, subscriber) => { - let hasValue = false; - let singleValue: T; - let seenValue = false; - let index = 0; - source.subscribe( - createOperatorSubscriber( - subscriber, - (value) => { - seenValue = true; - if (!predicate || predicate(value, index++, source)) { - hasValue && subscriber.error(new SequenceError('Too many matching values')); - hasValue = true; - singleValue = value; - } - }, - () => { - if (hasValue) { - subscriber.next(singleValue); - subscriber.complete(); - } else { - subscriber.error(seenValue ? new NotFoundError('No matching values') : new EmptyError()); - } - } - ) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/skip.ts b/node_modules/rxjs/src/internal/operators/skip.ts deleted file mode 100644 index 424ad65..0000000 --- a/node_modules/rxjs/src/internal/operators/skip.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { MonoTypeOperatorFunction } from '../types'; -import { filter } from './filter'; - -/** - * Returns an Observable that skips the first `count` items emitted by the source Observable. - * - * ![](skip.png) - * - * Skips the values until the sent notifications are equal or less than provided skip count. It raises - * an error if skip count is equal or more than the actual number of emits and source raises an error. - * - * ## Example - * - * Skip the values before the emission - * - * ```ts - * import { interval, skip } from 'rxjs'; - * - * // emit every half second - * const source = interval(500); - * // skip the first 10 emitted values - * const result = source.pipe(skip(10)); - * - * result.subscribe(value => console.log(value)); - * // output: 10...11...12...13... - * ``` - * - * @see {@link last} - * @see {@link skipWhile} - * @see {@link skipUntil} - * @see {@link skipLast} - * - * @param count The number of times, items emitted by source Observable should be skipped. - * @return A function that returns an Observable that skips the first `count` - * values emitted by the source Observable. - */ -export function skip(count: number): MonoTypeOperatorFunction { - return filter((_, index) => count <= index); -} diff --git a/node_modules/rxjs/src/internal/operators/skipLast.ts b/node_modules/rxjs/src/internal/operators/skipLast.ts deleted file mode 100644 index e0f75b5..0000000 --- a/node_modules/rxjs/src/internal/operators/skipLast.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { MonoTypeOperatorFunction } from '../types'; -import { identity } from '../util/identity'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -/** - * Skip a specified number of values before the completion of an observable. - * - * ![](skipLast.png) - * - * Returns an observable that will emit values as soon as it can, given a number of - * skipped values. For example, if you `skipLast(3)` on a source, when the source - * emits its fourth value, the first value the source emitted will finally be emitted - * from the returned observable, as it is no longer part of what needs to be skipped. - * - * All values emitted by the result of `skipLast(N)` will be delayed by `N` emissions, - * as each value is held in a buffer until enough values have been emitted that that - * the buffered value may finally be sent to the consumer. - * - * After subscribing, unsubscribing will not result in the emission of the buffered - * skipped values. - * - * ## Example - * - * Skip the last 2 values of an observable with many values - * - * ```ts - * import { of, skipLast } from 'rxjs'; - * - * const numbers = of(1, 2, 3, 4, 5); - * const skipLastTwo = numbers.pipe(skipLast(2)); - * skipLastTwo.subscribe(x => console.log(x)); - * - * // Results in: - * // 1 2 3 - * // (4 and 5 are skipped) - * ``` - * - * @see {@link skip} - * @see {@link skipUntil} - * @see {@link skipWhile} - * @see {@link take} - * - * @param skipCount Number of elements to skip from the end of the source Observable. - * @return A function that returns an Observable that skips the last `count` - * values emitted by the source Observable. - */ -export function skipLast(skipCount: number): MonoTypeOperatorFunction { - return skipCount <= 0 - ? // For skipCounts less than or equal to zero, we are just mirroring the source. - identity - : operate((source, subscriber) => { - // A ring buffer to hold the values while we wait to see - // if we can emit it or it's part of the "skipped" last values. - // Note that it is the _same size_ as the skip count. - let ring: T[] = new Array(skipCount); - // The number of values seen so far. This is used to get - // the index of the current value when it arrives. - let seen = 0; - source.subscribe( - createOperatorSubscriber(subscriber, (value) => { - // Get the index of the value we have right now - // relative to all other values we've seen, then - // increment `seen`. This ensures we've moved to - // the next slot in our ring buffer. - const valueIndex = seen++; - if (valueIndex < skipCount) { - // If we haven't seen enough values to fill our buffer yet, - // Then we aren't to a number of seen values where we can - // emit anything, so let's just start by filling the ring buffer. - ring[valueIndex] = value; - } else { - // We are traversing over the ring array in such - // a way that when we get to the end, we loop back - // and go to the start. - const index = valueIndex % skipCount; - // Pull the oldest value out so we can emit it, - // and stuff the new value in it's place. - const oldValue = ring[index]; - ring[index] = value; - // Emit the old value. It is important that this happens - // after we swap the value in the buffer, if it happens - // before we swap the value in the buffer, then a synchronous - // source can get the buffer out of whack. - subscriber.next(oldValue); - } - }) - ); - - return () => { - // Release our values in memory - ring = null!; - }; - }); -} diff --git a/node_modules/rxjs/src/internal/operators/skipUntil.ts b/node_modules/rxjs/src/internal/operators/skipUntil.ts deleted file mode 100644 index e6984e5..0000000 --- a/node_modules/rxjs/src/internal/operators/skipUntil.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { MonoTypeOperatorFunction, ObservableInput } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; -import { noop } from '../util/noop'; - -/** - * Returns an Observable that skips items emitted by the source Observable until a second Observable emits an item. - * - * The `skipUntil` operator causes the observable stream to skip the emission of values until the passed in observable - * emits the first value. This can be particularly useful in combination with user interactions, responses of HTTP - * requests or waiting for specific times to pass by. - * - * ![](skipUntil.png) - * - * Internally, the `skipUntil` operator subscribes to the passed in `notifier` `ObservableInput` (which gets converted - * to an Observable) in order to recognize the emission of its first value. When `notifier` emits next, the operator - * unsubscribes from it and starts emitting the values of the *source* observable until it completes or errors. It - * will never let the *source* observable emit any values if the `notifier` completes or throws an error without - * emitting a value before. - * - * ## Example - * - * In the following example, all emitted values of the interval observable are skipped until the user clicks anywhere - * within the page - * - * ```ts - * import { interval, fromEvent, skipUntil } from 'rxjs'; - * - * const intervalObservable = interval(1000); - * const click = fromEvent(document, 'click'); - * - * const emitAfterClick = intervalObservable.pipe( - * skipUntil(click) - * ); - * // clicked at 4.6s. output: 5...6...7...8........ or - * // clicked at 7.3s. output: 8...9...10..11....... - * emitAfterClick.subscribe(value => console.log(value)); - * ``` - * - * @see {@link last} - * @see {@link skip} - * @see {@link skipWhile} - * @see {@link skipLast} - * - * @param notifier An `ObservableInput` that has to emit an item before the source Observable elements begin to - * be mirrored by the resulting Observable. - * @return A function that returns an Observable that skips items from the - * source Observable until the `notifier` Observable emits an item, then emits the - * remaining items. - */ -export function skipUntil(notifier: ObservableInput): MonoTypeOperatorFunction { - return operate((source, subscriber) => { - let taking = false; - - const skipSubscriber = createOperatorSubscriber( - subscriber, - () => { - skipSubscriber?.unsubscribe(); - taking = true; - }, - noop - ); - - innerFrom(notifier).subscribe(skipSubscriber); - - source.subscribe(createOperatorSubscriber(subscriber, (value) => taking && subscriber.next(value))); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/skipWhile.ts b/node_modules/rxjs/src/internal/operators/skipWhile.ts deleted file mode 100644 index 84b7379..0000000 --- a/node_modules/rxjs/src/internal/operators/skipWhile.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { Falsy, MonoTypeOperatorFunction, OperatorFunction } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -export function skipWhile(predicate: BooleanConstructor): OperatorFunction extends never ? never : T>; -export function skipWhile(predicate: (value: T, index: number) => true): OperatorFunction; -export function skipWhile(predicate: (value: T, index: number) => boolean): MonoTypeOperatorFunction; - -/** - * Returns an Observable that skips all items emitted by the source Observable as long as a specified condition holds - * true, but emits all further source items as soon as the condition becomes false. - * - * ![](skipWhile.png) - * - * Skips all the notifications with a truthy predicate. It will not skip the notifications when the predicate is falsy. - * It can also be skipped using index. Once the predicate is true, it will not be called again. - * - * ## Example - * - * Skip some super heroes - * - * ```ts - * import { from, skipWhile } from 'rxjs'; - * - * const source = from(['Green Arrow', 'SuperMan', 'Flash', 'SuperGirl', 'Black Canary']) - * // Skip the heroes until SuperGirl - * const example = source.pipe(skipWhile(hero => hero !== 'SuperGirl')); - * // output: SuperGirl, Black Canary - * example.subscribe(femaleHero => console.log(femaleHero)); - * ``` - * - * Skip values from the array until index 5 - * - * ```ts - * import { from, skipWhile } from 'rxjs'; - * - * const source = from([1, 2, 3, 4, 5, 6, 7, 9, 10]); - * const example = source.pipe(skipWhile((_, i) => i !== 5)); - * // output: 6, 7, 9, 10 - * example.subscribe(value => console.log(value)); - * ``` - * - * @see {@link last} - * @see {@link skip} - * @see {@link skipUntil} - * @see {@link skipLast} - * - * @param predicate A function to test each item emitted from the source Observable. - * @return A function that returns an Observable that begins emitting items - * emitted by the source Observable when the specified predicate becomes false. - */ -export function skipWhile(predicate: (value: T, index: number) => boolean): MonoTypeOperatorFunction { - return operate((source, subscriber) => { - let taking = false; - let index = 0; - source.subscribe( - createOperatorSubscriber(subscriber, (value) => (taking || (taking = !predicate(value, index++))) && subscriber.next(value)) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/startWith.ts b/node_modules/rxjs/src/internal/operators/startWith.ts deleted file mode 100644 index 8c11ddb..0000000 --- a/node_modules/rxjs/src/internal/operators/startWith.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { concat } from '../observable/concat'; -import { OperatorFunction, SchedulerLike, ValueFromArray } from '../types'; -import { popScheduler } from '../util/args'; -import { operate } from '../util/lift'; - -// Devs are more likely to pass null or undefined than they are a scheduler -// without accompanying values. To make things easier for (naughty) devs who -// use the `strictNullChecks: false` TypeScript compiler option, these -// overloads with explicit null and undefined values are included. - -export function startWith(value: null): OperatorFunction; -export function startWith(value: undefined): OperatorFunction; - -/** @deprecated The `scheduler` parameter will be removed in v8. Use `scheduled` and `concatAll`. Details: https://rxjs.dev/deprecations/scheduler-argument */ -export function startWith( - ...valuesAndScheduler: [...A, SchedulerLike] -): OperatorFunction>; -export function startWith(...values: A): OperatorFunction>; - -/** - * Returns an observable that, at the moment of subscription, will synchronously emit all - * values provided to this operator, then subscribe to the source and mirror all of its emissions - * to subscribers. - * - * This is a useful way to know when subscription has occurred on an existing observable. - * - * First emits its arguments in order, and then any - * emissions from the source. - * - * ![](startWith.png) - * - * ## Examples - * - * Emit a value when a timer starts. - * - * ```ts - * import { timer, map, startWith } from 'rxjs'; - * - * timer(1000) - * .pipe( - * map(() => 'timer emit'), - * startWith('timer start') - * ) - * .subscribe(x => console.log(x)); - * - * // results: - * // 'timer start' - * // 'timer emit' - * ``` - * - * @param values Items you want the modified Observable to emit first. - * @return A function that returns an Observable that synchronously emits - * provided values before subscribing to the source Observable. - * - * @see {@link endWith} - * @see {@link finalize} - * @see {@link concat} - */ -export function startWith(...values: D[]): OperatorFunction { - const scheduler = popScheduler(values); - return operate((source, subscriber) => { - // Here we can't pass `undefined` as a scheduler, because if we did, the - // code inside of `concat` would be confused by the `undefined`, and treat it - // like an invalid observable. So we have to split it two different ways. - (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/subscribeOn.ts b/node_modules/rxjs/src/internal/operators/subscribeOn.ts deleted file mode 100644 index 17240d0..0000000 --- a/node_modules/rxjs/src/internal/operators/subscribeOn.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; -import { operate } from '../util/lift'; - -/** - * Asynchronously subscribes Observers to this Observable on the specified {@link SchedulerLike}. - * - * With `subscribeOn` you can decide what type of scheduler a specific Observable will be using when it is subscribed to. - * - * Schedulers control the speed and order of emissions to observers from an Observable stream. - * - * ![](subscribeOn.png) - * - * ## Example - * - * Given the following code: - * - * ```ts - * import { of, merge } from 'rxjs'; - * - * const a = of(1, 2, 3); - * const b = of(4, 5, 6); - * - * merge(a, b).subscribe(console.log); - * - * // Outputs - * // 1 - * // 2 - * // 3 - * // 4 - * // 5 - * // 6 - * ``` - * - * Both Observable `a` and `b` will emit their values directly and synchronously once they are subscribed to. - * - * If we instead use the `subscribeOn` operator declaring that we want to use the {@link asyncScheduler} for values emitted by Observable `a`: - * - * ```ts - * import { of, subscribeOn, asyncScheduler, merge } from 'rxjs'; - * - * const a = of(1, 2, 3).pipe(subscribeOn(asyncScheduler)); - * const b = of(4, 5, 6); - * - * merge(a, b).subscribe(console.log); - * - * // Outputs - * // 4 - * // 5 - * // 6 - * // 1 - * // 2 - * // 3 - * ``` - * - * The reason for this is that Observable `b` emits its values directly and synchronously like before - * but the emissions from `a` are scheduled on the event loop because we are now using the {@link asyncScheduler} for that specific Observable. - * - * @param scheduler The {@link SchedulerLike} to perform subscription actions on. - * @param delay A delay to pass to the scheduler to delay subscriptions - * @return A function that returns an Observable modified so that its - * subscriptions happen on the specified {@link SchedulerLike}. - */ -export function subscribeOn(scheduler: SchedulerLike, delay: number = 0): MonoTypeOperatorFunction { - return operate((source, subscriber) => { - subscriber.add(scheduler.schedule(() => source.subscribe(subscriber), delay)); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/switchAll.ts b/node_modules/rxjs/src/internal/operators/switchAll.ts deleted file mode 100644 index 69e9cbb..0000000 --- a/node_modules/rxjs/src/internal/operators/switchAll.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { OperatorFunction, ObservableInput, ObservedValueOf } from '../types'; -import { switchMap } from './switchMap'; -import { identity } from '../util/identity'; - -/** - * Converts a higher-order Observable into a first-order Observable - * producing values only from the most recent observable sequence - * - * Flattens an Observable-of-Observables. - * - * ![](switchAll.png) - * - * `switchAll` subscribes to a source that is an observable of observables, also known as a - * "higher-order observable" (or `Observable>`). It subscribes to the most recently - * provided "inner observable" emitted by the source, unsubscribing from any previously subscribed - * to inner observable, such that only the most recent inner observable may be subscribed to at - * any point in time. The resulting observable returned by `switchAll` will only complete if the - * source observable completes, *and* any currently subscribed to inner observable also has completed, - * if there are any. - * - * ## Examples - * - * Spawn a new interval observable for each click event, but for every new - * click, cancel the previous interval and subscribe to the new one - * - * ```ts - * import { fromEvent, tap, map, interval, switchAll } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click').pipe(tap(() => console.log('click'))); - * const source = clicks.pipe(map(() => interval(1000))); - * - * source - * .pipe(switchAll()) - * .subscribe(x => console.log(x)); - * - * // Output - * // click - * // 0 - * // 1 - * // 2 - * // 3 - * // ... - * // click - * // 0 - * // 1 - * // 2 - * // ... - * // click - * // ... - * ``` - * - * @see {@link combineLatestAll} - * @see {@link concatAll} - * @see {@link exhaustAll} - * @see {@link switchMap} - * @see {@link switchMapTo} - * @see {@link mergeAll} - * - * @return A function that returns an Observable that converts a higher-order - * Observable into a first-order Observable producing values only from the most - * recent Observable sequence. - */ -export function switchAll>(): OperatorFunction> { - return switchMap(identity); -} diff --git a/node_modules/rxjs/src/internal/operators/switchMap.ts b/node_modules/rxjs/src/internal/operators/switchMap.ts deleted file mode 100644 index 0ded7ba..0000000 --- a/node_modules/rxjs/src/internal/operators/switchMap.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { Subscriber } from '../Subscriber'; -import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; -import { innerFrom } from '../observable/innerFrom'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -/* tslint:disable:max-line-length */ -export function switchMap>( - project: (value: T, index: number) => O -): OperatorFunction>; -/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ -export function switchMap>( - project: (value: T, index: number) => O, - resultSelector: undefined -): OperatorFunction>; -/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ -export function switchMap>( - project: (value: T, index: number) => O, - resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R -): OperatorFunction; -/* tslint:enable:max-line-length */ - -/** - * Projects each source value to an Observable which is merged in the output - * Observable, emitting values only from the most recently projected Observable. - * - * Maps each value to an Observable, then flattens all of - * these inner Observables using {@link switchAll}. - * - * ![](switchMap.png) - * - * Returns an Observable that emits items based on applying a function that you - * supply to each item emitted by the source Observable, where that function - * returns an (so-called "inner") Observable. Each time it observes one of these - * inner Observables, the output Observable begins emitting the items emitted by - * that inner Observable. When a new inner Observable is emitted, `switchMap` - * stops emitting items from the earlier-emitted inner Observable and begins - * emitting items from the new one. It continues to behave like this for - * subsequent inner Observables. - * - * ## Example - * - * Generate new Observable according to source Observable values - * - * ```ts - * import { of, switchMap } from 'rxjs'; - * - * const switched = of(1, 2, 3).pipe(switchMap(x => of(x, x ** 2, x ** 3))); - * switched.subscribe(x => console.log(x)); - * // outputs - * // 1 - * // 1 - * // 1 - * // 2 - * // 4 - * // 8 - * // 3 - * // 9 - * // 27 - * ``` - * - * Restart an interval Observable on every click event - * - * ```ts - * import { fromEvent, switchMap, interval } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe(switchMap(() => interval(1000))); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link concatMap} - * @see {@link exhaustMap} - * @see {@link mergeMap} - * @see {@link switchAll} - * @see {@link switchMapTo} - * - * @param project A function that, when applied to an item emitted by the source - * Observable, returns an Observable. - * @return A function that returns an Observable that emits the result of - * applying the projection function (and the optional deprecated - * `resultSelector`) to each item emitted by the source Observable and taking - * only the values from the most recently projected inner Observable. - */ -export function switchMap>( - project: (value: T, index: number) => O, - resultSelector?: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R -): OperatorFunction | R> { - return operate((source, subscriber) => { - let innerSubscriber: Subscriber> | null = null; - let index = 0; - // Whether or not the source subscription has completed - let isComplete = false; - - // We only complete the result if the source is complete AND we don't have an active inner subscription. - // This is called both when the source completes and when the inners complete. - const checkComplete = () => isComplete && !innerSubscriber && subscriber.complete(); - - source.subscribe( - createOperatorSubscriber( - subscriber, - (value) => { - // Cancel the previous inner subscription if there was one - innerSubscriber?.unsubscribe(); - let innerIndex = 0; - const outerIndex = index++; - // Start the next inner subscription - innerFrom(project(value, outerIndex)).subscribe( - (innerSubscriber = createOperatorSubscriber( - subscriber, - // When we get a new inner value, next it through. Note that this is - // handling the deprecate result selector here. This is because with this architecture - // it ends up being smaller than using the map operator. - (innerValue) => subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue), - () => { - // The inner has completed. Null out the inner subscriber to - // free up memory and to signal that we have no inner subscription - // currently. - innerSubscriber = null!; - checkComplete(); - } - )) - ); - }, - () => { - isComplete = true; - checkComplete(); - } - ) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/switchMapTo.ts b/node_modules/rxjs/src/internal/operators/switchMapTo.ts deleted file mode 100644 index 9819bdf..0000000 --- a/node_modules/rxjs/src/internal/operators/switchMapTo.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { switchMap } from './switchMap'; -import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types'; -import { isFunction } from '../util/isFunction'; - -/** @deprecated Will be removed in v9. Use {@link switchMap} instead: `switchMap(() => result)` */ -export function switchMapTo>(observable: O): OperatorFunction>; -/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ -export function switchMapTo>( - observable: O, - resultSelector: undefined -): OperatorFunction>; -/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */ -export function switchMapTo>( - observable: O, - resultSelector: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R -): OperatorFunction; - -/** - * Projects each source value to the same Observable which is flattened multiple - * times with {@link switchMap} in the output Observable. - * - * It's like {@link switchMap}, but maps each value - * always to the same inner Observable. - * - * ![](switchMapTo.png) - * - * Maps each source value to the given Observable `innerObservable` regardless - * of the source value, and then flattens those resulting Observables into one - * single Observable, which is the output Observable. The output Observables - * emits values only from the most recently emitted instance of - * `innerObservable`. - * - * ## Example - * - * Restart an interval Observable on every click event - * - * ```ts - * import { fromEvent, switchMapTo, interval } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe(switchMapTo(interval(1000))); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link concatMapTo} - * @see {@link switchAll} - * @see {@link switchMap} - * @see {@link mergeMapTo} - * - * @param innerObservable An `ObservableInput` to replace each value from the - * source Observable. - * @return A function that returns an Observable that emits items from the - * given `innerObservable` (and optionally transformed through the deprecated - * `resultSelector`) every time a value is emitted on the source Observable, - * and taking only the values from the most recently projected inner - * Observable. - * @deprecated Will be removed in v9. Use {@link switchMap} instead: `switchMap(() => result)` - */ -export function switchMapTo>( - innerObservable: O, - resultSelector?: (outerValue: T, innerValue: ObservedValueOf, outerIndex: number, innerIndex: number) => R -): OperatorFunction | R> { - return isFunction(resultSelector) ? switchMap(() => innerObservable, resultSelector) : switchMap(() => innerObservable); -} diff --git a/node_modules/rxjs/src/internal/operators/switchScan.ts b/node_modules/rxjs/src/internal/operators/switchScan.ts deleted file mode 100644 index 902a2a7..0000000 --- a/node_modules/rxjs/src/internal/operators/switchScan.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { ObservableInput, ObservedValueOf, OperatorFunction } from '../types'; -import { switchMap } from './switchMap'; -import { operate } from '../util/lift'; - -// TODO: Generate a marble diagram for these docs. - -/** - * Applies an accumulator function over the source Observable where the - * accumulator function itself returns an Observable, emitting values - * only from the most recently returned Observable. - * - * It's like {@link mergeScan}, but only the most recent - * Observable returned by the accumulator is merged into the outer Observable. - * - * @see {@link scan} - * @see {@link mergeScan} - * @see {@link switchMap} - * - * @param accumulator - * The accumulator function called on each source value. - * @param seed The initial accumulation value. - * @return A function that returns an observable of the accumulated values. - */ -export function switchScan>( - accumulator: (acc: R, value: T, index: number) => O, - seed: R -): OperatorFunction> { - return operate((source, subscriber) => { - // The state we will keep up to date to pass into our - // accumulator function at each new value from the source. - let state = seed; - - // Use `switchMap` on our `source` to do the work of creating - // this operator. Note the backwards order here of `switchMap()(source)` - // to avoid needing to use `pipe` unnecessarily - switchMap( - // On each value from the source, call the accumulator with - // our previous state, the value and the index. - (value: T, index) => accumulator(state, value, index), - // Using the deprecated result selector here as a dirty trick - // to update our state with the flattened value. - (_, innerValue) => ((state = innerValue), innerValue) - )(source).subscribe(subscriber); - - return () => { - // Release state on finalization - state = null!; - }; - }); -} diff --git a/node_modules/rxjs/src/internal/operators/take.ts b/node_modules/rxjs/src/internal/operators/take.ts deleted file mode 100644 index b2054e7..0000000 --- a/node_modules/rxjs/src/internal/operators/take.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { MonoTypeOperatorFunction } from '../types'; -import { EMPTY } from '../observable/empty'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -/** - * Emits only the first `count` values emitted by the source Observable. - * - * Takes the first `count` values from the source, then - * completes. - * - * ![](take.png) - * - * `take` returns an Observable that emits only the first `count` values emitted - * by the source Observable. If the source emits fewer than `count` values then - * all of its values are emitted. After that, it completes, regardless if the - * source completes. - * - * ## Example - * - * Take the first 5 seconds of an infinite 1-second interval Observable - * - * ```ts - * import { interval, take } from 'rxjs'; - * - * const intervalCount = interval(1000); - * const takeFive = intervalCount.pipe(take(5)); - * takeFive.subscribe(x => console.log(x)); - * - * // Logs: - * // 0 - * // 1 - * // 2 - * // 3 - * // 4 - * ``` - * - * @see {@link takeLast} - * @see {@link takeUntil} - * @see {@link takeWhile} - * @see {@link skip} - * - * @param count The maximum number of `next` values to emit. - * @return A function that returns an Observable that emits only the first - * `count` values emitted by the source Observable, or all of the values from - * the source if the source emits fewer than `count` values. - */ -export function take(count: number): MonoTypeOperatorFunction { - return count <= 0 - ? // If we are taking no values, that's empty. - () => EMPTY - : operate((source, subscriber) => { - let seen = 0; - source.subscribe( - createOperatorSubscriber(subscriber, (value) => { - // Increment the number of values we have seen, - // then check it against the allowed count to see - // if we are still letting values through. - if (++seen <= count) { - subscriber.next(value); - // If we have met or passed our allowed count, - // we need to complete. We have to do <= here, - // because re-entrant code will increment `seen` twice. - if (count <= seen) { - subscriber.complete(); - } - } - }) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/takeLast.ts b/node_modules/rxjs/src/internal/operators/takeLast.ts deleted file mode 100644 index 972d147..0000000 --- a/node_modules/rxjs/src/internal/operators/takeLast.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { EMPTY } from '../observable/empty'; -import { MonoTypeOperatorFunction } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -/** - * Waits for the source to complete, then emits the last N values from the source, - * as specified by the `count` argument. - * - * ![](takeLast.png) - * - * `takeLast` results in an observable that will hold values up to `count` values in memory, - * until the source completes. It then pushes all values in memory to the consumer, in the - * order they were received from the source, then notifies the consumer that it is - * complete. - * - * If for some reason the source completes before the `count` supplied to `takeLast` is reached, - * all values received until that point are emitted, and then completion is notified. - * - * **Warning**: Using `takeLast` with an observable that never completes will result - * in an observable that never emits a value. - * - * ## Example - * - * Take the last 3 values of an Observable with many values - * - * ```ts - * import { range, takeLast } from 'rxjs'; - * - * const many = range(1, 100); - * const lastThree = many.pipe(takeLast(3)); - * lastThree.subscribe(x => console.log(x)); - * ``` - * - * @see {@link take} - * @see {@link takeUntil} - * @see {@link takeWhile} - * @see {@link skip} - * - * @param count The maximum number of values to emit from the end of - * the sequence of values emitted by the source Observable. - * @return A function that returns an Observable that emits at most the last - * `count` values emitted by the source Observable. - */ -export function takeLast(count: number): MonoTypeOperatorFunction { - return count <= 0 - ? () => EMPTY - : operate((source, subscriber) => { - // This buffer will hold the values we are going to emit - // when the source completes. Since we only want to take the - // last N values, we can't emit until we're sure we're not getting - // any more values. - let buffer: T[] = []; - source.subscribe( - createOperatorSubscriber( - subscriber, - (value) => { - // Add the most recent value onto the end of our buffer. - buffer.push(value); - // If our buffer is now larger than the number of values we - // want to take, we remove the oldest value from the buffer. - count < buffer.length && buffer.shift(); - }, - () => { - // The source completed, we now know what are last values - // are, emit them in the order they were received. - for (const value of buffer) { - subscriber.next(value); - } - subscriber.complete(); - }, - // Errors are passed through to the consumer - undefined, - () => { - // During finalization release the values in our buffer. - buffer = null!; - } - ) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/takeUntil.ts b/node_modules/rxjs/src/internal/operators/takeUntil.ts deleted file mode 100644 index 177141d..0000000 --- a/node_modules/rxjs/src/internal/operators/takeUntil.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { MonoTypeOperatorFunction, ObservableInput } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; -import { noop } from '../util/noop'; - -/** - * Emits the values emitted by the source Observable until a `notifier` - * Observable emits a value. - * - * Lets values pass until a second Observable, - * `notifier`, emits a value. Then, it completes. - * - * ![](takeUntil.png) - * - * `takeUntil` subscribes and begins mirroring the source Observable. It also - * monitors a second Observable, `notifier` that you provide. If the `notifier` - * emits a value, the output Observable stops mirroring the source Observable - * and completes. If the `notifier` doesn't emit any value and completes - * then `takeUntil` will pass all values. - * - * ## Example - * - * Tick every second until the first click happens - * - * ```ts - * import { interval, fromEvent, takeUntil } from 'rxjs'; - * - * const source = interval(1000); - * const clicks = fromEvent(document, 'click'); - * const result = source.pipe(takeUntil(clicks)); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link take} - * @see {@link takeLast} - * @see {@link takeWhile} - * @see {@link skip} - * - * @param notifier The `ObservableInput` whose first emitted value will cause the output - * Observable of `takeUntil` to stop emitting values from the source Observable. - * @return A function that returns an Observable that emits the values from the - * source Observable until `notifier` emits its first value. - */ -export function takeUntil(notifier: ObservableInput): MonoTypeOperatorFunction { - return operate((source, subscriber) => { - innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => subscriber.complete(), noop)); - !subscriber.closed && source.subscribe(subscriber); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/takeWhile.ts b/node_modules/rxjs/src/internal/operators/takeWhile.ts deleted file mode 100644 index b48e34c..0000000 --- a/node_modules/rxjs/src/internal/operators/takeWhile.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { OperatorFunction, MonoTypeOperatorFunction, TruthyTypesOf } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -export function takeWhile(predicate: BooleanConstructor, inclusive: true): MonoTypeOperatorFunction; -export function takeWhile(predicate: BooleanConstructor, inclusive: false): OperatorFunction>; -export function takeWhile(predicate: BooleanConstructor): OperatorFunction>; -export function takeWhile(predicate: (value: T, index: number) => value is S): OperatorFunction; -export function takeWhile(predicate: (value: T, index: number) => value is S, inclusive: false): OperatorFunction; -export function takeWhile(predicate: (value: T, index: number) => boolean, inclusive?: boolean): MonoTypeOperatorFunction; - -/** - * Emits values emitted by the source Observable so long as each value satisfies - * the given `predicate`, and then completes as soon as this `predicate` is not - * satisfied. - * - * Takes values from the source only while they pass the - * condition given. When the first value does not satisfy, it completes. - * - * ![](takeWhile.png) - * - * `takeWhile` subscribes and begins mirroring the source Observable. Each value - * emitted on the source is given to the `predicate` function which returns a - * boolean, representing a condition to be satisfied by the source values. The - * output Observable emits the source values until such time as the `predicate` - * returns false, at which point `takeWhile` stops mirroring the source - * Observable and completes the output Observable. - * - * ## Example - * - * Emit click events only while the clientX property is greater than 200 - * - * ```ts - * import { fromEvent, takeWhile } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe(takeWhile(ev => ev.clientX > 200)); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link take} - * @see {@link takeLast} - * @see {@link takeUntil} - * @see {@link skip} - * - * @param predicate A function that evaluates a value emitted by the source - * Observable and returns a boolean. Also takes the (zero-based) index as the - * second argument. - * @param inclusive When set to `true` the value that caused `predicate` to - * return `false` will also be emitted. - * @return A function that returns an Observable that emits values from the - * source Observable so long as each value satisfies the condition defined by - * the `predicate`, then completes. - */ -export function takeWhile(predicate: (value: T, index: number) => boolean, inclusive = false): MonoTypeOperatorFunction { - return operate((source, subscriber) => { - let index = 0; - source.subscribe( - createOperatorSubscriber(subscriber, (value) => { - const result = predicate(value, index++); - (result || inclusive) && subscriber.next(value); - !result && subscriber.complete(); - }) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/tap.ts b/node_modules/rxjs/src/internal/operators/tap.ts deleted file mode 100644 index bc6243e..0000000 --- a/node_modules/rxjs/src/internal/operators/tap.ts +++ /dev/null @@ -1,215 +0,0 @@ -import { MonoTypeOperatorFunction, Observer } from '../types'; -import { isFunction } from '../util/isFunction'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { identity } from '../util/identity'; - -/** - * An extension to the {@link Observer} interface used only by the {@link tap} operator. - * - * It provides a useful set of callbacks a user can register to do side-effects in - * cases other than what the usual {@link Observer} callbacks are - * ({@link guide/glossary-and-semantics#next next}, - * {@link guide/glossary-and-semantics#error error} and/or - * {@link guide/glossary-and-semantics#complete complete}). - * - * ## Example - * - * ```ts - * import { fromEvent, switchMap, tap, interval, take } from 'rxjs'; - * - * const source$ = fromEvent(document, 'click'); - * const result$ = source$.pipe( - * switchMap((_, i) => i % 2 === 0 - * ? fromEvent(document, 'mousemove').pipe( - * tap({ - * subscribe: () => console.log('Subscribed to the mouse move events after click #' + i), - * unsubscribe: () => console.log('Mouse move events #' + i + ' unsubscribed'), - * finalize: () => console.log('Mouse move events #' + i + ' finalized') - * }) - * ) - * : interval(1_000).pipe( - * take(5), - * tap({ - * subscribe: () => console.log('Subscribed to the 1-second interval events after click #' + i), - * unsubscribe: () => console.log('1-second interval events #' + i + ' unsubscribed'), - * finalize: () => console.log('1-second interval events #' + i + ' finalized') - * }) - * ) - * ) - * ); - * - * const subscription = result$.subscribe({ - * next: console.log - * }); - * - * setTimeout(() => { - * console.log('Unsubscribe after 60 seconds'); - * subscription.unsubscribe(); - * }, 60_000); - * ``` - */ -export interface TapObserver extends Observer { - /** - * The callback that `tap` operator invokes at the moment when the source Observable - * gets subscribed to. - */ - subscribe: () => void; - /** - * The callback that `tap` operator invokes when an explicit - * {@link guide/glossary-and-semantics#unsubscription unsubscribe} happens. It won't get invoked on - * `error` or `complete` events. - */ - unsubscribe: () => void; - /** - * The callback that `tap` operator invokes when any kind of - * {@link guide/glossary-and-semantics#finalization finalization} happens - either when - * the source Observable `error`s or `complete`s or when it gets explicitly unsubscribed - * by the user. There is no difference in using this callback or the {@link finalize} - * operator, but if you're already using `tap` operator, you can use this callback - * instead. You'd get the same result in either case. - */ - finalize: () => void; -} -export function tap(observerOrNext?: Partial> | ((value: T) => void)): MonoTypeOperatorFunction; -/** @deprecated Instead of passing separate callback arguments, use an observer argument. Signatures taking separate callback arguments will be removed in v8. Details: https://rxjs.dev/deprecations/subscribe-arguments */ -export function tap( - next?: ((value: T) => void) | null, - error?: ((error: any) => void) | null, - complete?: (() => void) | null -): MonoTypeOperatorFunction; - -/** - * Used to perform side-effects for notifications from the source observable - * - * Used when you want to affect outside state with a notification without altering the notification - * - * ![](tap.png) - * - * Tap is designed to allow the developer a designated place to perform side effects. While you _could_ perform side-effects - * inside of a `map` or a `mergeMap`, that would make their mapping functions impure, which isn't always a big deal, but will - * make it so you can't do things like memoize those functions. The `tap` operator is designed solely for such side-effects to - * help you remove side-effects from other operations. - * - * For any notification, next, error, or complete, `tap` will call the appropriate callback you have provided to it, via a function - * reference, or a partial observer, then pass that notification down the stream. - * - * The observable returned by `tap` is an exact mirror of the source, with one exception: Any error that occurs -- synchronously -- in a handler - * provided to `tap` will be emitted as an error from the returned observable. - * - * > Be careful! You can mutate objects as they pass through the `tap` operator's handlers. - * - * The most common use of `tap` is actually for debugging. You can place a `tap(console.log)` anywhere - * in your observable `pipe`, log out the notifications as they are emitted by the source returned by the previous - * operation. - * - * ## Examples - * - * Check a random number before it is handled. Below is an observable that will use a random number between 0 and 1, - * and emit `'big'` or `'small'` depending on the size of that number. But we wanted to log what the original number - * was, so we have added a `tap(console.log)`. - * - * ```ts - * import { of, tap, map } from 'rxjs'; - * - * of(Math.random()).pipe( - * tap(console.log), - * map(n => n > 0.5 ? 'big' : 'small') - * ).subscribe(console.log); - * ``` - * - * Using `tap` to analyze a value and force an error. Below is an observable where in our system we only - * want to emit numbers 3 or less we get from another source. We can force our observable to error - * using `tap`. - * - * ```ts - * import { of, tap } from 'rxjs'; - * - * const source = of(1, 2, 3, 4, 5); - * - * source.pipe( - * tap(n => { - * if (n > 3) { - * throw new TypeError(`Value ${ n } is greater than 3`); - * } - * }) - * ) - * .subscribe({ next: console.log, error: err => console.log(err.message) }); - * ``` - * - * We want to know when an observable completes before moving on to the next observable. The system - * below will emit a random series of `'X'` characters from 3 different observables in sequence. The - * only way we know when one observable completes and moves to the next one, in this case, is because - * we have added a `tap` with the side effect of logging to console. - * - * ```ts - * import { of, concatMap, interval, take, map, tap } from 'rxjs'; - * - * of(1, 2, 3).pipe( - * concatMap(n => interval(1000).pipe( - * take(Math.round(Math.random() * 10)), - * map(() => 'X'), - * tap({ complete: () => console.log(`Done with ${ n }`) }) - * )) - * ) - * .subscribe(console.log); - * ``` - * - * @see {@link finalize} - * @see {@link TapObserver} - * - * @param observerOrNext A next handler or partial observer - * @param error An error handler - * @param complete A completion handler - * @return A function that returns an Observable identical to the source, but - * runs the specified Observer or callback(s) for each item. - */ -export function tap( - observerOrNext?: Partial> | ((value: T) => void) | null, - error?: ((e: any) => void) | null, - complete?: (() => void) | null -): MonoTypeOperatorFunction { - // We have to check to see not only if next is a function, - // but if error or complete were passed. This is because someone - // could technically call tap like `tap(null, fn)` or `tap(null, null, fn)`. - const tapObserver = - isFunction(observerOrNext) || error || complete - ? // tslint:disable-next-line: no-object-literal-type-assertion - ({ next: observerOrNext as Exclude>>, error, complete } as Partial>) - : observerOrNext; - - return tapObserver - ? operate((source, subscriber) => { - tapObserver.subscribe?.(); - let isUnsub = true; - source.subscribe( - createOperatorSubscriber( - subscriber, - (value) => { - tapObserver.next?.(value); - subscriber.next(value); - }, - () => { - isUnsub = false; - tapObserver.complete?.(); - subscriber.complete(); - }, - (err) => { - isUnsub = false; - tapObserver.error?.(err); - subscriber.error(err); - }, - () => { - if (isUnsub) { - tapObserver.unsubscribe?.(); - } - tapObserver.finalize?.(); - } - ) - ); - }) - : // Tap was called with no valid tap observer or handler - // (e.g. `tap(null, null, null)` or `tap(null)` or `tap()`) - // so we're going to just mirror the source. - identity; -} diff --git a/node_modules/rxjs/src/internal/operators/throttle.ts b/node_modules/rxjs/src/internal/operators/throttle.ts deleted file mode 100644 index 8c53a1c..0000000 --- a/node_modules/rxjs/src/internal/operators/throttle.ts +++ /dev/null @@ -1,143 +0,0 @@ -import { Subscription } from '../Subscription'; - -import { MonoTypeOperatorFunction, ObservableInput } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; - -/** - * An object interface used by {@link throttle} or {@link throttleTime} that ensure - * configuration options of these operators. - * - * @see {@link throttle} - * @see {@link throttleTime} - */ -export interface ThrottleConfig { - /** - * If `true`, the resulting Observable will emit the first value from the source - * Observable at the **start** of the "throttling" process (when starting an - * internal timer that prevents other emissions from the source to pass through). - * If `false`, it will not emit the first value from the source Observable at the - * start of the "throttling" process. - * - * If not provided, defaults to: `true`. - */ - leading?: boolean; - /** - * If `true`, the resulting Observable will emit the last value from the source - * Observable at the **end** of the "throttling" process (when ending an internal - * timer that prevents other emissions from the source to pass through). - * If `false`, it will not emit the last value from the source Observable at the - * end of the "throttling" process. - * - * If not provided, defaults to: `false`. - */ - trailing?: boolean; -} - -/** - * Emits a value from the source Observable, then ignores subsequent source - * values for a duration determined by another Observable, then repeats this - * process. - * - * It's like {@link throttleTime}, but the silencing - * duration is determined by a second Observable. - * - * ![](throttle.svg) - * - * `throttle` emits the source Observable values on the output Observable - * when its internal timer is disabled, and ignores source values when the timer - * is enabled. Initially, the timer is disabled. As soon as the first source - * value arrives, it is forwarded to the output Observable, and then the timer - * is enabled by calling the `durationSelector` function with the source value, - * which returns the "duration" Observable. When the duration Observable emits a - * value, the timer is disabled, and this process repeats for the - * next source value. - * - * ## Example - * - * Emit clicks at a rate of at most one click per second - * - * ```ts - * import { fromEvent, throttle, interval } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe(throttle(() => interval(1000))); - * - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link audit} - * @see {@link debounce} - * @see {@link delayWhen} - * @see {@link sample} - * @see {@link throttleTime} - * - * @param durationSelector A function that receives a value from the source - * Observable, for computing the silencing duration for each source value, - * returned as an `ObservableInput`. - * @param config A configuration object to define `leading` and `trailing` - * behavior. Defaults to `{ leading: true, trailing: false }`. - * @return A function that returns an Observable that performs the throttle - * operation to limit the rate of emissions from the source. - */ -export function throttle(durationSelector: (value: T) => ObservableInput, config?: ThrottleConfig): MonoTypeOperatorFunction { - return operate((source, subscriber) => { - const { leading = true, trailing = false } = config ?? {}; - let hasValue = false; - let sendValue: T | null = null; - let throttled: Subscription | null = null; - let isComplete = false; - - const endThrottling = () => { - throttled?.unsubscribe(); - throttled = null; - if (trailing) { - send(); - isComplete && subscriber.complete(); - } - }; - - const cleanupThrottling = () => { - throttled = null; - isComplete && subscriber.complete(); - }; - - const startThrottle = (value: T) => - (throttled = innerFrom(durationSelector(value)).subscribe(createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling))); - - const send = () => { - if (hasValue) { - // Ensure we clear out our value and hasValue flag - // before we emit, otherwise reentrant code can cause - // issues here. - hasValue = false; - const value = sendValue!; - sendValue = null; - // Emit the value. - subscriber.next(value); - !isComplete && startThrottle(value); - } - }; - - source.subscribe( - createOperatorSubscriber( - subscriber, - // Regarding the presence of throttled.closed in the following - // conditions, if a synchronous duration selector is specified - weird, - // but legal - an already-closed subscription will be assigned to - // throttled, so the subscription's closed property needs to be checked, - // too. - (value) => { - hasValue = true; - sendValue = value; - !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value)); - }, - () => { - isComplete = true; - !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete(); - } - ) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/throttleTime.ts b/node_modules/rxjs/src/internal/operators/throttleTime.ts deleted file mode 100644 index de325fe..0000000 --- a/node_modules/rxjs/src/internal/operators/throttleTime.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { asyncScheduler } from '../scheduler/async'; -import { throttle, ThrottleConfig } from './throttle'; -import { MonoTypeOperatorFunction, SchedulerLike } from '../types'; -import { timer } from '../observable/timer'; - -/** - * Emits a value from the source Observable, then ignores subsequent source - * values for `duration` milliseconds, then repeats this process. - * - * Lets a value pass, then ignores source values for the - * next `duration` milliseconds. - * - * ![](throttleTime.png) - * - * `throttleTime` emits the source Observable values on the output Observable - * when its internal timer is disabled, and ignores source values when the timer - * is enabled. Initially, the timer is disabled. As soon as the first source - * value arrives, it is forwarded to the output Observable, and then the timer - * is enabled. After `duration` milliseconds (or the time unit determined - * internally by the optional `scheduler`) has passed, the timer is disabled, - * and this process repeats for the next source value. Optionally takes a - * {@link SchedulerLike} for managing timers. - * - * ## Examples - * - * ### Limit click rate - * - * Emit clicks at a rate of at most one click per second - * - * ```ts - * import { fromEvent, throttleTime } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe(throttleTime(1000)); - * - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link auditTime} - * @see {@link debounceTime} - * @see {@link delay} - * @see {@link sampleTime} - * @see {@link throttle} - * - * @param duration Time to wait before emitting another value after - * emitting the last value, measured in milliseconds or the time unit determined - * internally by the optional `scheduler`. - * @param scheduler The {@link SchedulerLike} to use for - * managing the timers that handle the throttling. Defaults to {@link asyncScheduler}. - * @param config A configuration object to define `leading` and - * `trailing` behavior. Defaults to `{ leading: true, trailing: false }`. - * @return A function that returns an Observable that performs the throttle - * operation to limit the rate of emissions from the source. - */ -export function throttleTime( - duration: number, - scheduler: SchedulerLike = asyncScheduler, - config?: ThrottleConfig -): MonoTypeOperatorFunction { - const duration$ = timer(duration, scheduler); - return throttle(() => duration$, config); -} diff --git a/node_modules/rxjs/src/internal/operators/throwIfEmpty.ts b/node_modules/rxjs/src/internal/operators/throwIfEmpty.ts deleted file mode 100644 index 76497a2..0000000 --- a/node_modules/rxjs/src/internal/operators/throwIfEmpty.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { EmptyError } from '../util/EmptyError'; -import { MonoTypeOperatorFunction } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -/** - * If the source observable completes without emitting a value, it will emit - * an error. The error will be created at that time by the optional - * `errorFactory` argument, otherwise, the error will be {@link EmptyError}. - * - * ![](throwIfEmpty.png) - * - * ## Example - * - * Throw an error if the document wasn't clicked within 1 second - * - * ```ts - * import { fromEvent, takeUntil, timer, throwIfEmpty } from 'rxjs'; - * - * const click$ = fromEvent(document, 'click'); - * - * click$.pipe( - * takeUntil(timer(1000)), - * throwIfEmpty(() => new Error('The document was not clicked within 1 second')) - * ) - * .subscribe({ - * next() { - * console.log('The document was clicked'); - * }, - * error(err) { - * console.error(err.message); - * } - * }); - * ``` - * - * @param errorFactory A factory function called to produce the - * error to be thrown when the source observable completes without emitting a - * value. - * @return A function that returns an Observable that throws an error if the - * source Observable completed without emitting. - */ -export function throwIfEmpty(errorFactory: () => any = defaultErrorFactory): MonoTypeOperatorFunction { - return operate((source, subscriber) => { - let hasValue = false; - source.subscribe( - createOperatorSubscriber( - subscriber, - (value) => { - hasValue = true; - subscriber.next(value); - }, - () => (hasValue ? subscriber.complete() : subscriber.error(errorFactory())) - ) - ); - }); -} - -function defaultErrorFactory() { - return new EmptyError(); -} diff --git a/node_modules/rxjs/src/internal/operators/timeInterval.ts b/node_modules/rxjs/src/internal/operators/timeInterval.ts deleted file mode 100644 index 6a58ab2..0000000 --- a/node_modules/rxjs/src/internal/operators/timeInterval.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { asyncScheduler } from '../scheduler/async'; -import { SchedulerLike, OperatorFunction } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -/** - * Emits an object containing the current value, and the time that has - * passed between emitting the current value and the previous value, which is - * calculated by using the provided `scheduler`'s `now()` method to retrieve - * the current time at each emission, then calculating the difference. The `scheduler` - * defaults to {@link asyncScheduler}, so by default, the `interval` will be in - * milliseconds. - * - * Convert an Observable that emits items into one that - * emits indications of the amount of time elapsed between those emissions. - * - * ![](timeInterval.png) - * - * ## Example - * - * Emit interval between current value with the last value - * - * ```ts - * import { interval, timeInterval } from 'rxjs'; - * - * const seconds = interval(1000); - * - * seconds - * .pipe(timeInterval()) - * .subscribe(value => console.log(value)); - * - * // NOTE: The values will never be this precise, - * // intervals created with `interval` or `setInterval` - * // are non-deterministic. - * - * // { value: 0, interval: 1000 } - * // { value: 1, interval: 1000 } - * // { value: 2, interval: 1000 } - * ``` - * - * @param scheduler Scheduler used to get the current time. - * @return A function that returns an Observable that emits information about - * value and interval. - */ -export function timeInterval(scheduler: SchedulerLike = asyncScheduler): OperatorFunction> { - return operate((source, subscriber) => { - let last = scheduler.now(); - source.subscribe( - createOperatorSubscriber(subscriber, (value) => { - const now = scheduler.now(); - const interval = now - last; - last = now; - subscriber.next(new TimeInterval(value, interval)); - }) - ); - }); -} - -// TODO(benlesh): make this an interface, export the interface, but not the implemented class, -// there's no reason users should be manually creating this type. - -export class TimeInterval { - /** - * @deprecated Internal implementation detail, do not construct directly. Will be made an interface in v8. - */ - constructor(public value: T, public interval: number) {} -} diff --git a/node_modules/rxjs/src/internal/operators/timeout.ts b/node_modules/rxjs/src/internal/operators/timeout.ts deleted file mode 100644 index a2e1635..0000000 --- a/node_modules/rxjs/src/internal/operators/timeout.ts +++ /dev/null @@ -1,403 +0,0 @@ -import { asyncScheduler } from '../scheduler/async'; -import { MonoTypeOperatorFunction, SchedulerLike, OperatorFunction, ObservableInput, ObservedValueOf } from '../types'; -import { isValidDate } from '../util/isDate'; -import { Subscription } from '../Subscription'; -import { operate } from '../util/lift'; -import { Observable } from '../Observable'; -import { innerFrom } from '../observable/innerFrom'; -import { createErrorClass } from '../util/createErrorClass'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { executeSchedule } from '../util/executeSchedule'; - -export interface TimeoutConfig = ObservableInput, M = unknown> { - /** - * The time allowed between values from the source before timeout is triggered. - */ - each?: number; - - /** - * The relative time as a `number` in milliseconds, or a specific time as a `Date` object, - * by which the first value must arrive from the source before timeout is triggered. - */ - first?: number | Date; - - /** - * The scheduler to use with time-related operations within this operator. Defaults to {@link asyncScheduler} - */ - scheduler?: SchedulerLike; - - /** - * A factory used to create observable to switch to when timeout occurs. Provides - * a {@link TimeoutInfo} about the source observable's emissions and what delay or - * exact time triggered the timeout. - */ - with?: (info: TimeoutInfo) => O; - - /** - * Optional additional metadata you can provide to code that handles - * the timeout, will be provided through the {@link TimeoutError}. - * This can be used to help identify the source of a timeout or pass along - * other information related to the timeout. - */ - meta?: M; -} - -export interface TimeoutInfo { - /** Optional metadata that was provided to the timeout configuration. */ - readonly meta: M; - /** The number of messages seen before the timeout */ - readonly seen: number; - /** The last message seen */ - readonly lastValue: T | null; -} - -/** - * An error emitted when a timeout occurs. - */ -export interface TimeoutError extends Error { - /** - * The information provided to the error by the timeout - * operation that created the error. Will be `null` if - * used directly in non-RxJS code with an empty constructor. - * (Note that using this constructor directly is not recommended, - * you should create your own errors) - */ - info: TimeoutInfo | null; -} - -export interface TimeoutErrorCtor { - /** - * @deprecated Internal implementation detail. Do not construct error instances. - * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 - */ - new (info?: TimeoutInfo): TimeoutError; -} - -/** - * An error thrown by the {@link timeout} operator. - * - * Provided so users can use as a type and do quality comparisons. - * We recommend you do not subclass this or create instances of this class directly. - * If you have need of a error representing a timeout, you should - * create your own error class and use that. - * - * @see {@link timeout} - */ -export const TimeoutError: TimeoutErrorCtor = createErrorClass( - (_super) => - function TimeoutErrorImpl(this: any, info: TimeoutInfo | null = null) { - _super(this); - this.message = 'Timeout has occurred'; - this.name = 'TimeoutError'; - this.info = info; - } -); - -/** - * If `with` is provided, this will return an observable that will switch to a different observable if the source - * does not push values within the specified time parameters. - * - * The most flexible option for creating a timeout behavior. - * - * The first thing to know about the configuration is if you do not provide a `with` property to the configuration, - * when timeout conditions are met, this operator will emit a {@link TimeoutError}. Otherwise, it will use the factory - * function provided by `with`, and switch your subscription to the result of that. Timeout conditions are provided by - * the settings in `first` and `each`. - * - * The `first` property can be either a `Date` for a specific time, a `number` for a time period relative to the - * point of subscription, or it can be skipped. This property is to check timeout conditions for the arrival of - * the first value from the source _only_. The timings of all subsequent values from the source will be checked - * against the time period provided by `each`, if it was provided. - * - * The `each` property can be either a `number` or skipped. If a value for `each` is provided, it represents the amount of - * time the resulting observable will wait between the arrival of values from the source before timing out. Note that if - * `first` is _not_ provided, the value from `each` will be used to check timeout conditions for the arrival of the first - * value and all subsequent values. If `first` _is_ provided, `each` will only be use to check all values after the first. - * - * ## Examples - * - * Emit a custom error if there is too much time between values - * - * ```ts - * import { interval, timeout, throwError } from 'rxjs'; - * - * class CustomTimeoutError extends Error { - * constructor() { - * super('It was too slow'); - * this.name = 'CustomTimeoutError'; - * } - * } - * - * const slow$ = interval(900); - * - * slow$.pipe( - * timeout({ - * each: 1000, - * with: () => throwError(() => new CustomTimeoutError()) - * }) - * ) - * .subscribe({ - * error: console.error - * }); - * ``` - * - * Switch to a faster observable if your source is slow. - * - * ```ts - * import { interval, timeout } from 'rxjs'; - * - * const slow$ = interval(900); - * const fast$ = interval(500); - * - * slow$.pipe( - * timeout({ - * each: 1000, - * with: () => fast$, - * }) - * ) - * .subscribe(console.log); - * ``` - * @param config The configuration for the timeout. - */ -export function timeout, M = unknown>( - config: TimeoutConfig & { with: (info: TimeoutInfo) => O } -): OperatorFunction>; - -/** - * Returns an observable that will error or switch to a different observable if the source does not push values - * within the specified time parameters. - * - * The most flexible option for creating a timeout behavior. - * - * The first thing to know about the configuration is if you do not provide a `with` property to the configuration, - * when timeout conditions are met, this operator will emit a {@link TimeoutError}. Otherwise, it will use the factory - * function provided by `with`, and switch your subscription to the result of that. Timeout conditions are provided by - * the settings in `first` and `each`. - * - * The `first` property can be either a `Date` for a specific time, a `number` for a time period relative to the - * point of subscription, or it can be skipped. This property is to check timeout conditions for the arrival of - * the first value from the source _only_. The timings of all subsequent values from the source will be checked - * against the time period provided by `each`, if it was provided. - * - * The `each` property can be either a `number` or skipped. If a value for `each` is provided, it represents the amount of - * time the resulting observable will wait between the arrival of values from the source before timing out. Note that if - * `first` is _not_ provided, the value from `each` will be used to check timeout conditions for the arrival of the first - * value and all subsequent values. If `first` _is_ provided, `each` will only be use to check all values after the first. - * - * ### Handling TimeoutErrors - * - * If no `with` property was provided, subscriptions to the resulting observable may emit an error of {@link TimeoutError}. - * The timeout error provides useful information you can examine when you're handling the error. The most common way to handle - * the error would be with {@link catchError}, although you could use {@link tap} or just the error handler in your `subscribe` call - * directly, if your error handling is only a side effect (such as notifying the user, or logging). - * - * In this case, you would check the error for `instanceof TimeoutError` to validate that the error was indeed from `timeout`, and - * not from some other source. If it's not from `timeout`, you should probably rethrow it if you're in a `catchError`. - * - * ## Examples - * - * Emit a {@link TimeoutError} if the first value, and _only_ the first value, does not arrive within 5 seconds - * - * ```ts - * import { interval, timeout } from 'rxjs'; - * - * // A random interval that lasts between 0 and 10 seconds per tick - * const source$ = interval(Math.round(Math.random() * 10_000)); - * - * source$.pipe( - * timeout({ first: 5_000 }) - * ) - * .subscribe({ - * next: console.log, - * error: console.error - * }); - * ``` - * - * Emit a {@link TimeoutError} if the source waits longer than 5 seconds between any two values or the first value - * and subscription. - * - * ```ts - * import { timer, timeout, expand } from 'rxjs'; - * - * const getRandomTime = () => Math.round(Math.random() * 10_000); - * - * // An observable that waits a random amount of time between each delivered value - * const source$ = timer(getRandomTime()) - * .pipe(expand(() => timer(getRandomTime()))); - * - * source$ - * .pipe(timeout({ each: 5_000 })) - * .subscribe({ - * next: console.log, - * error: console.error - * }); - * ``` - * - * Emit a {@link TimeoutError} if the source does not emit before 7 seconds, _or_ if the source waits longer than - * 5 seconds between any two values after the first. - * - * ```ts - * import { timer, timeout, expand } from 'rxjs'; - * - * const getRandomTime = () => Math.round(Math.random() * 10_000); - * - * // An observable that waits a random amount of time between each delivered value - * const source$ = timer(getRandomTime()) - * .pipe(expand(() => timer(getRandomTime()))); - * - * source$ - * .pipe(timeout({ first: 7_000, each: 5_000 })) - * .subscribe({ - * next: console.log, - * error: console.error - * }); - * ``` - */ -export function timeout(config: Omit, 'with'>): OperatorFunction; - -/** - * Returns an observable that will error if the source does not push its first value before the specified time passed as a `Date`. - * This is functionally the same as `timeout({ first: someDate })`. - * - * Errors if the first value doesn't show up before the given date and time - * - * ![](timeout.png) - * - * @param first The date to at which the resulting observable will timeout if the source observable - * does not emit at least one value. - * @param scheduler The scheduler to use. Defaults to {@link asyncScheduler}. - */ -export function timeout(first: Date, scheduler?: SchedulerLike): MonoTypeOperatorFunction; - -/** - * Returns an observable that will error if the source does not push a value within the specified time in milliseconds. - * This is functionally the same as `timeout({ each: milliseconds })`. - * - * Errors if it waits too long between any value - * - * ![](timeout.png) - * - * @param each The time allowed between each pushed value from the source before the resulting observable - * will timeout. - * @param scheduler The scheduler to use. Defaults to {@link asyncScheduler}. - */ -export function timeout(each: number, scheduler?: SchedulerLike): MonoTypeOperatorFunction; - -/** - * - * Errors if Observable does not emit a value in given time span. - * - * Timeouts on Observable that doesn't emit values fast enough. - * - * ![](timeout.png) - * - * @see {@link timeoutWith} - * - * @return A function that returns an Observable that mirrors behaviour of the - * source Observable, unless timeout happens when it throws an error. - */ -export function timeout, M>( - config: number | Date | TimeoutConfig, - schedulerArg?: SchedulerLike -): OperatorFunction> { - // Intentionally terse code. - // If the first argument is a valid `Date`, then we use it as the `first` config. - // Otherwise, if the first argument is a `number`, then we use it as the `each` config. - // Otherwise, it can be assumed the first argument is the configuration object itself, and - // we destructure that into what we're going to use, setting important defaults as we do. - // NOTE: The default for `scheduler` will be the `scheduler` argument if it exists, or - // it will default to the `asyncScheduler`. - const { - first, - each, - with: _with = timeoutErrorFactory, - scheduler = schedulerArg ?? asyncScheduler, - meta = null!, - } = (isValidDate(config) ? { first: config } : typeof config === 'number' ? { each: config } : config) as TimeoutConfig; - - if (first == null && each == null) { - // Ensure timeout was provided at runtime. - throw new TypeError('No timeout provided.'); - } - - return operate((source, subscriber) => { - // This subscription encapsulates our subscription to the - // source for this operator. We're capturing it separately, - // because if there is a `with` observable to fail over to, - // we want to unsubscribe from our original subscription, and - // hand of the subscription to that one. - let originalSourceSubscription: Subscription; - // The subscription for our timeout timer. This changes - // every time we get a new value. - let timerSubscription: Subscription; - // A bit of state we pass to our with and error factories to - // tell what the last value we saw was. - let lastValue: T | null = null; - // A bit of state we pass to the with and error factories to - // tell how many values we have seen so far. - let seen = 0; - const startTimer = (delay: number) => { - timerSubscription = executeSchedule( - subscriber, - scheduler, - () => { - try { - originalSourceSubscription.unsubscribe(); - innerFrom( - _with!({ - meta, - lastValue, - seen, - }) - ).subscribe(subscriber); - } catch (err) { - subscriber.error(err); - } - }, - delay - ); - }; - - originalSourceSubscription = source.subscribe( - createOperatorSubscriber( - subscriber, - (value: T) => { - // clear the timer so we can emit and start another one. - timerSubscription?.unsubscribe(); - seen++; - // Emit - subscriber.next((lastValue = value)); - // null | undefined are both < 0. Thanks, JavaScript. - each! > 0 && startTimer(each!); - }, - undefined, - undefined, - () => { - if (!timerSubscription?.closed) { - timerSubscription?.unsubscribe(); - } - // Be sure not to hold the last value in memory after unsubscription - // it could be quite large. - lastValue = null; - } - ) - ); - - // Intentionally terse code. - // If we've `seen` a value, that means the "first" clause was met already, if it existed. - // it also means that a timer was already started for "each" (in the next handler above). - // If `first` was provided, and it's a number, then use it. - // If `first` was provided and it's not a number, it's a Date, and we get the difference between it and "now". - // If `first` was not provided at all, then our first timer will be the value from `each`. - !seen && startTimer(first != null ? (typeof first === 'number' ? first : +first - scheduler!.now()) : each!); - }); -} - -/** - * The default function to use to emit an error when timeout occurs and a `with` function - * is not specified. - * @param info The information about the timeout to pass along to the error - */ -function timeoutErrorFactory(info: TimeoutInfo): Observable { - throw new TimeoutError(info); -} diff --git a/node_modules/rxjs/src/internal/operators/timeoutWith.ts b/node_modules/rxjs/src/internal/operators/timeoutWith.ts deleted file mode 100644 index 1a4d0ca..0000000 --- a/node_modules/rxjs/src/internal/operators/timeoutWith.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { async } from '../scheduler/async'; -import { isValidDate } from '../util/isDate'; -import { ObservableInput, OperatorFunction, SchedulerLike } from '../types'; -import { timeout } from './timeout'; - -/** @deprecated Replaced with {@link timeout}. Instead of `timeoutWith(someDate, a$, scheduler)`, use the configuration object - * `timeout({ first: someDate, with: () => a$, scheduler })`. Will be removed in v8. */ -export function timeoutWith(dueBy: Date, switchTo: ObservableInput, scheduler?: SchedulerLike): OperatorFunction; -/** @deprecated Replaced with {@link timeout}. Instead of `timeoutWith(100, a$, scheduler)`, use the configuration object - * `timeout({ each: 100, with: () => a$, scheduler })`. Will be removed in v8. */ -export function timeoutWith(waitFor: number, switchTo: ObservableInput, scheduler?: SchedulerLike): OperatorFunction; - -/** - * When the passed timespan elapses before the source emits any given value, it will unsubscribe from the source, - * and switch the subscription to another observable. - * - * Used to switch to a different observable if your source is being slow. - * - * Useful in cases where: - * - * - You want to switch to a different source that may be faster. - * - You want to notify a user that the data stream is slow. - * - You want to emit a custom error rather than the {@link TimeoutError} emitted - * by the default usage of {@link timeout}. - * - * If the first parameter is passed as Date and the time of the Date arrives before the first value arrives from the source, - * it will unsubscribe from the source and switch the subscription to another observable. - * - * Use Date object to switch to a different observable if the first value doesn't arrive by a specific time. - * - * Can be used to set a timeout only for the first value, however it's recommended to use the {@link timeout} operator with - * the `first` configuration to get the same effect. - * - * ## Examples - * - * Fallback to a faster observable - * - * ```ts - * import { interval, timeoutWith } from 'rxjs'; - * - * const slow$ = interval(1000); - * const faster$ = interval(500); - * - * slow$ - * .pipe(timeoutWith(900, faster$)) - * .subscribe(console.log); - * ``` - * - * Emit your own custom timeout error - * - * ```ts - * import { interval, timeoutWith, throwError } from 'rxjs'; - * - * class CustomTimeoutError extends Error { - * constructor() { - * super('It was too slow'); - * this.name = 'CustomTimeoutError'; - * } - * } - * - * const slow$ = interval(1000); - * - * slow$ - * .pipe(timeoutWith(900, throwError(() => new CustomTimeoutError()))) - * .subscribe({ - * error: err => console.error(err.message) - * }); - * ``` - * - * @see {@link timeout} - * - * @param due When passed a number, used as the time (in milliseconds) allowed between each value from the source before timeout - * is triggered. When passed a Date, used as the exact time at which the timeout will be triggered if the first value does not arrive. - * @param withObservable The observable to switch to when timeout occurs. - * @param scheduler The scheduler to use with time-related operations within this operator. Defaults to {@link asyncScheduler} - * @return A function that returns an Observable that mirrors behaviour of the - * source Observable, unless timeout happens when it starts emitting values - * from the `ObservableInput` passed as a second parameter. - * @deprecated Replaced with {@link timeout}. Instead of `timeoutWith(100, a$, scheduler)`, use {@link timeout} with the configuration - * object: `timeout({ each: 100, with: () => a$, scheduler })`. Instead of `timeoutWith(someDate, a$, scheduler)`, use {@link timeout} - * with the configuration object: `timeout({ first: someDate, with: () => a$, scheduler })`. Will be removed in v8. - */ -export function timeoutWith( - due: number | Date, - withObservable: ObservableInput, - scheduler?: SchedulerLike -): OperatorFunction { - let first: number | Date | undefined; - let each: number | undefined; - let _with: () => ObservableInput; - scheduler = scheduler ?? async; - - if (isValidDate(due)) { - first = due; - } else if (typeof due === 'number') { - each = due; - } - - if (withObservable) { - _with = () => withObservable; - } else { - throw new TypeError('No observable provided to switch to'); - } - - if (first == null && each == null) { - // Ensure timeout was provided at runtime. - throw new TypeError('No timeout provided.'); - } - - return timeout>({ - first, - each, - scheduler, - with: _with, - }); -} diff --git a/node_modules/rxjs/src/internal/operators/timestamp.ts b/node_modules/rxjs/src/internal/operators/timestamp.ts deleted file mode 100644 index bb388de..0000000 --- a/node_modules/rxjs/src/internal/operators/timestamp.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { OperatorFunction, TimestampProvider, Timestamp } from '../types'; -import { dateTimestampProvider } from '../scheduler/dateTimestampProvider'; -import { map } from './map'; - -/** - * Attaches a timestamp to each item emitted by an observable indicating when it was emitted - * - * The `timestamp` operator maps the *source* observable stream to an object of type - * `{value: T, timestamp: R}`. The properties are generically typed. The `value` property contains the value - * and type of the *source* observable. The `timestamp` is generated by the schedulers `now` function. By - * default, it uses the `asyncScheduler` which simply returns `Date.now()` (milliseconds since 1970/01/01 - * 00:00:00:000) and therefore is of type `number`. - * - * ![](timestamp.png) - * - * ## Example - * - * In this example there is a timestamp attached to the document's click events - * - * ```ts - * import { fromEvent, timestamp } from 'rxjs'; - * - * const clickWithTimestamp = fromEvent(document, 'click').pipe( - * timestamp() - * ); - * - * // Emits data of type { value: PointerEvent, timestamp: number } - * clickWithTimestamp.subscribe(data => { - * console.log(data); - * }); - * ``` - * - * @param timestampProvider An object with a `now()` method used to get the current timestamp. - * @return A function that returns an Observable that attaches a timestamp to - * each item emitted by the source Observable indicating when it was emitted. - */ -export function timestamp(timestampProvider: TimestampProvider = dateTimestampProvider): OperatorFunction> { - return map((value: T) => ({ value, timestamp: timestampProvider.now() })); -} diff --git a/node_modules/rxjs/src/internal/operators/toArray.ts b/node_modules/rxjs/src/internal/operators/toArray.ts deleted file mode 100644 index 2678472..0000000 --- a/node_modules/rxjs/src/internal/operators/toArray.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { reduce } from './reduce'; -import { OperatorFunction } from '../types'; -import { operate } from '../util/lift'; - -const arrReducer = (arr: any[], value: any) => (arr.push(value), arr); - -/** - * Collects all source emissions and emits them as an array when the source completes. - * - * Get all values inside an array when the source completes - * - * ![](toArray.png) - * - * `toArray` will wait until the source Observable completes before emitting - * the array containing all emissions. When the source Observable errors no - * array will be emitted. - * - * ## Example - * - * ```ts - * import { interval, take, toArray } from 'rxjs'; - * - * const source = interval(1000); - * const example = source.pipe( - * take(10), - * toArray() - * ); - * - * example.subscribe(value => console.log(value)); - * - * // output: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - * ``` - * - * @return A function that returns an Observable that emits an array of items - * emitted by the source Observable when source completes. - */ -export function toArray(): OperatorFunction { - // Because arrays are mutable, and we're mutating the array in this - // reducer process, we have to encapsulate the creation of the initial - // array within this `operate` function. - return operate((source, subscriber) => { - reduce(arrReducer, [] as T[])(source).subscribe(subscriber); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/window.ts b/node_modules/rxjs/src/internal/operators/window.ts deleted file mode 100644 index b8250cb..0000000 --- a/node_modules/rxjs/src/internal/operators/window.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { Observable } from '../Observable'; -import { OperatorFunction, ObservableInput } from '../types'; -import { Subject } from '../Subject'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { noop } from '../util/noop'; -import { innerFrom } from '../observable/innerFrom'; - -/** - * Branch out the source Observable values as a nested Observable whenever - * `windowBoundaries` emits. - * - * It's like {@link buffer}, but emits a nested Observable - * instead of an array. - * - * ![](window.png) - * - * Returns an Observable that emits windows of items it collects from the source - * Observable. The output Observable emits connected, non-overlapping - * windows. It emits the current window and opens a new one whenever the - * `windowBoundaries` emits an item. `windowBoundaries` can be any type that - * `ObservableInput` accepts. It internally gets converted to an Observable. - * Because each window is an Observable, the output is a higher-order Observable. - * - * ## Example - * - * In every window of 1 second each, emit at most 2 click events - * - * ```ts - * import { fromEvent, interval, window, map, take, mergeAll } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const sec = interval(1000); - * const result = clicks.pipe( - * window(sec), - * map(win => win.pipe(take(2))), // take at most 2 emissions from each window - * mergeAll() // flatten the Observable-of-Observables - * ); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link windowCount} - * @see {@link windowTime} - * @see {@link windowToggle} - * @see {@link windowWhen} - * @see {@link buffer} - * - * @param windowBoundaries An `ObservableInput` that completes the - * previous window and starts a new window. - * @return A function that returns an Observable of windows, which are - * Observables emitting values of the source Observable. - */ -export function window(windowBoundaries: ObservableInput): OperatorFunction> { - return operate((source, subscriber) => { - let windowSubject: Subject = new Subject(); - - subscriber.next(windowSubject.asObservable()); - - const errorHandler = (err: any) => { - windowSubject.error(err); - subscriber.error(err); - }; - - // Subscribe to our source - source.subscribe( - createOperatorSubscriber( - subscriber, - (value) => windowSubject?.next(value), - () => { - windowSubject.complete(); - subscriber.complete(); - }, - errorHandler - ) - ); - - // Subscribe to the window boundaries. - innerFrom(windowBoundaries).subscribe( - createOperatorSubscriber( - subscriber, - () => { - windowSubject.complete(); - subscriber.next((windowSubject = new Subject())); - }, - noop, - errorHandler - ) - ); - - return () => { - // Unsubscribing the subject ensures that anyone who has captured - // a reference to this window that tries to use it after it can - // no longer get values from the source will get an ObjectUnsubscribedError. - windowSubject?.unsubscribe(); - windowSubject = null!; - }; - }); -} diff --git a/node_modules/rxjs/src/internal/operators/windowCount.ts b/node_modules/rxjs/src/internal/operators/windowCount.ts deleted file mode 100644 index cf24e1b..0000000 --- a/node_modules/rxjs/src/internal/operators/windowCount.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { Observable } from '../Observable'; -import { Subject } from '../Subject'; -import { OperatorFunction } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; - -/** - * Branch out the source Observable values as a nested Observable with each - * nested Observable emitting at most `windowSize` values. - * - * It's like {@link bufferCount}, but emits a nested - * Observable instead of an array. - * - * ![](windowCount.png) - * - * Returns an Observable that emits windows of items it collects from the source - * Observable. The output Observable emits windows every `startWindowEvery` - * items, each containing no more than `windowSize` items. When the source - * Observable completes or encounters an error, the output Observable emits - * the current window and propagates the notification from the source - * Observable. If `startWindowEvery` is not provided, then new windows are - * started immediately at the start of the source and when each window completes - * with size `windowSize`. - * - * ## Examples - * - * Ignore every 3rd click event, starting from the first one - * - * ```ts - * import { fromEvent, windowCount, map, skip, mergeAll } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe( - * windowCount(3), - * map(win => win.pipe(skip(1))), // skip first of every 3 clicks - * mergeAll() // flatten the Observable-of-Observables - * ); - * result.subscribe(x => console.log(x)); - * ``` - * - * Ignore every 3rd click event, starting from the third one - * - * ```ts - * import { fromEvent, windowCount, mergeAll } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe( - * windowCount(2, 3), - * mergeAll() // flatten the Observable-of-Observables - * ); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link window} - * @see {@link windowTime} - * @see {@link windowToggle} - * @see {@link windowWhen} - * @see {@link bufferCount} - * - * @param windowSize The maximum number of values emitted by each window. - * @param startWindowEvery Interval at which to start a new window. For example - * if `startWindowEvery` is `2`, then a new window will be started on every - * other value from the source. A new window is started at the beginning of the - * source by default. - * @return A function that returns an Observable of windows, which in turn are - * Observable of values. - */ -export function windowCount(windowSize: number, startWindowEvery: number = 0): OperatorFunction> { - const startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize; - - return operate((source, subscriber) => { - let windows = [new Subject()]; - let starts: number[] = []; - let count = 0; - - // Open the first window. - subscriber.next(windows[0].asObservable()); - - source.subscribe( - createOperatorSubscriber( - subscriber, - (value: T) => { - // Emit the value through all current windows. - // We don't need to create a new window yet, we - // do that as soon as we close one. - for (const window of windows) { - window.next(value); - } - // Here we're using the size of the window array to figure - // out if the oldest window has emitted enough values. We can do this - // because the size of the window array is a function of the values - // seen by the subscription. If it's time to close it, we complete - // it and remove it. - const c = count - windowSize + 1; - if (c >= 0 && c % startEvery === 0) { - windows.shift()!.complete(); - } - - // Look to see if the next count tells us it's time to open a new window. - // TODO: We need to figure out if this really makes sense. We're technically - // emitting windows *before* we have a value to emit them for. It's probably - // more expected that we should be emitting the window when the start - // count is reached -- not before. - if (++count % startEvery === 0) { - const window = new Subject(); - windows.push(window); - subscriber.next(window.asObservable()); - } - }, - () => { - while (windows.length > 0) { - windows.shift()!.complete(); - } - subscriber.complete(); - }, - (err) => { - while (windows.length > 0) { - windows.shift()!.error(err); - } - subscriber.error(err); - }, - () => { - starts = null!; - windows = null!; - } - ) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/windowTime.ts b/node_modules/rxjs/src/internal/operators/windowTime.ts deleted file mode 100644 index b54656b..0000000 --- a/node_modules/rxjs/src/internal/operators/windowTime.ts +++ /dev/null @@ -1,207 +0,0 @@ -import { Subject } from '../Subject'; -import { asyncScheduler } from '../scheduler/async'; -import { Observable } from '../Observable'; -import { Subscription } from '../Subscription'; -import { Observer, OperatorFunction, SchedulerLike } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { arrRemove } from '../util/arrRemove'; -import { popScheduler } from '../util/args'; -import { executeSchedule } from '../util/executeSchedule'; - -export function windowTime(windowTimeSpan: number, scheduler?: SchedulerLike): OperatorFunction>; -export function windowTime( - windowTimeSpan: number, - windowCreationInterval: number, - scheduler?: SchedulerLike -): OperatorFunction>; -export function windowTime( - windowTimeSpan: number, - windowCreationInterval: number | null | void, - maxWindowSize: number, - scheduler?: SchedulerLike -): OperatorFunction>; - -/** - * Branch out the source Observable values as a nested Observable periodically - * in time. - * - * It's like {@link bufferTime}, but emits a nested - * Observable instead of an array. - * - * ![](windowTime.png) - * - * Returns an Observable that emits windows of items it collects from the source - * Observable. The output Observable starts a new window periodically, as - * determined by the `windowCreationInterval` argument. It emits each window - * after a fixed timespan, specified by the `windowTimeSpan` argument. When the - * source Observable completes or encounters an error, the output Observable - * emits the current window and propagates the notification from the source - * Observable. If `windowCreationInterval` is not provided, the output - * Observable starts a new window when the previous window of duration - * `windowTimeSpan` completes. If `maxWindowCount` is provided, each window - * will emit at most fixed number of values. Window will complete immediately - * after emitting last value and next one still will open as specified by - * `windowTimeSpan` and `windowCreationInterval` arguments. - * - * ## Examples - * - * In every window of 1 second each, emit at most 2 click events - * - * ```ts - * import { fromEvent, windowTime, map, take, mergeAll } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe( - * windowTime(1000), - * map(win => win.pipe(take(2))), // take at most 2 emissions from each window - * mergeAll() // flatten the Observable-of-Observables - * ); - * result.subscribe(x => console.log(x)); - * ``` - * - * Every 5 seconds start a window 1 second long, and emit at most 2 click events per window - * - * ```ts - * import { fromEvent, windowTime, map, take, mergeAll } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe( - * windowTime(1000, 5000), - * map(win => win.pipe(take(2))), // take at most 2 emissions from each window - * mergeAll() // flatten the Observable-of-Observables - * ); - * result.subscribe(x => console.log(x)); - * ``` - * - * Same as example above but with `maxWindowCount` instead of `take` - * - * ```ts - * import { fromEvent, windowTime, mergeAll } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe( - * windowTime(1000, 5000, 2), // take at most 2 emissions from each window - * mergeAll() // flatten the Observable-of-Observables - * ); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link window} - * @see {@link windowCount} - * @see {@link windowToggle} - * @see {@link windowWhen} - * @see {@link bufferTime} - * - * @param windowTimeSpan The amount of time, in milliseconds, to fill each window. - * @param windowCreationInterval The interval at which to start new - * windows. - * @param maxWindowSize Max number of - * values each window can emit before completion. - * @param scheduler The scheduler on which to schedule the - * intervals that determine window boundaries. - * @return A function that returns an Observable of windows, which in turn are - * Observables. - */ -export function windowTime(windowTimeSpan: number, ...otherArgs: any[]): OperatorFunction> { - const scheduler = popScheduler(otherArgs) ?? asyncScheduler; - const windowCreationInterval = (otherArgs[0] as number) ?? null; - const maxWindowSize = (otherArgs[1] as number) || Infinity; - - return operate((source, subscriber) => { - // The active windows, their related subscriptions, and removal functions. - let windowRecords: WindowRecord[] | null = []; - // If true, it means that every time we close a window, we want to start a new window. - // This is only really used for when *just* the time span is passed. - let restartOnClose = false; - - const closeWindow = (record: { window: Subject; subs: Subscription }) => { - const { window, subs } = record; - window.complete(); - subs.unsubscribe(); - arrRemove(windowRecords, record); - restartOnClose && startWindow(); - }; - - /** - * Called every time we start a new window. This also does - * the work of scheduling the job to close the window. - */ - const startWindow = () => { - if (windowRecords) { - const subs = new Subscription(); - subscriber.add(subs); - const window = new Subject(); - const record = { - window, - subs, - seen: 0, - }; - windowRecords.push(record); - subscriber.next(window.asObservable()); - executeSchedule(subs, scheduler, () => closeWindow(record), windowTimeSpan); - } - }; - - if (windowCreationInterval !== null && windowCreationInterval >= 0) { - // The user passed both a windowTimeSpan (required), and a creation interval - // That means we need to start new window on the interval, and those windows need - // to wait the required time span before completing. - executeSchedule(subscriber, scheduler, startWindow, windowCreationInterval, true); - } else { - restartOnClose = true; - } - - startWindow(); - - /** - * We need to loop over a copy of the window records several times in this operator. - * This is to save bytes over the wire more than anything. - * The reason we copy the array is that reentrant code could mutate the array while - * we are iterating over it. - */ - const loop = (cb: (record: WindowRecord) => void) => windowRecords!.slice().forEach(cb); - - /** - * Used to notify all of the windows and the subscriber in the same way - * in the error and complete handlers. - */ - const terminate = (cb: (consumer: Observer) => void) => { - loop(({ window }) => cb(window)); - cb(subscriber); - subscriber.unsubscribe(); - }; - - source.subscribe( - createOperatorSubscriber( - subscriber, - (value: T) => { - // Notify all windows of the value. - loop((record) => { - record.window.next(value); - // If the window is over the max size, we need to close it. - maxWindowSize <= ++record.seen && closeWindow(record); - }); - }, - // Complete the windows and the downstream subscriber and clean up. - () => terminate((consumer) => consumer.complete()), - // Notify the windows and the downstream subscriber of the error and clean up. - (err) => terminate((consumer) => consumer.error(err)) - ) - ); - - // Additional finalization. This will be called when the - // destination tears down. Other finalizations are registered implicitly - // above via subscription. - return () => { - // Ensure that the buffer is released. - windowRecords = null!; - }; - }); -} - -interface WindowRecord { - seen: number; - window: Subject; - subs: Subscription; -} diff --git a/node_modules/rxjs/src/internal/operators/windowToggle.ts b/node_modules/rxjs/src/internal/operators/windowToggle.ts deleted file mode 100644 index a17bef5..0000000 --- a/node_modules/rxjs/src/internal/operators/windowToggle.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { Observable } from '../Observable'; -import { Subject } from '../Subject'; -import { Subscription } from '../Subscription'; -import { ObservableInput, OperatorFunction } from '../types'; -import { operate } from '../util/lift'; -import { innerFrom } from '../observable/innerFrom'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { noop } from '../util/noop'; -import { arrRemove } from '../util/arrRemove'; - -/** - * Branch out the source Observable values as a nested Observable starting from - * an emission from `openings` and ending when the output of `closingSelector` - * emits. - * - * It's like {@link bufferToggle}, but emits a nested - * Observable instead of an array. - * - * ![](windowToggle.png) - * - * Returns an Observable that emits windows of items it collects from the source - * Observable. The output Observable emits windows that contain those items - * emitted by the source Observable between the time when the `openings` - * Observable emits an item and when the Observable returned by - * `closingSelector` emits an item. - * - * ## Example - * - * Every other second, emit the click events from the next 500ms - * - * ```ts - * import { fromEvent, interval, windowToggle, EMPTY, mergeAll } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const openings = interval(1000); - * const result = clicks.pipe( - * windowToggle(openings, i => i % 2 ? interval(500) : EMPTY), - * mergeAll() - * ); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link window} - * @see {@link windowCount} - * @see {@link windowTime} - * @see {@link windowWhen} - * @see {@link bufferToggle} - * - * @param openings An observable of notifications to start new windows. - * @param closingSelector A function that takes the value emitted by the - * `openings` observable and returns an Observable, which, when it emits a next - * notification, signals that the associated window should complete. - * @return A function that returns an Observable of windows, which in turn are - * Observables. - */ -export function windowToggle( - openings: ObservableInput, - closingSelector: (openValue: O) => ObservableInput -): OperatorFunction> { - return operate((source, subscriber) => { - const windows: Subject[] = []; - - const handleError = (err: any) => { - while (0 < windows.length) { - windows.shift()!.error(err); - } - subscriber.error(err); - }; - - innerFrom(openings).subscribe( - createOperatorSubscriber( - subscriber, - (openValue) => { - const window = new Subject(); - windows.push(window); - const closingSubscription = new Subscription(); - const closeWindow = () => { - arrRemove(windows, window); - window.complete(); - closingSubscription.unsubscribe(); - }; - - let closingNotifier: Observable; - try { - closingNotifier = innerFrom(closingSelector(openValue)); - } catch (err) { - handleError(err); - return; - } - - subscriber.next(window.asObservable()); - - closingSubscription.add(closingNotifier.subscribe(createOperatorSubscriber(subscriber, closeWindow, noop, handleError))); - }, - noop - ) - ); - - // Subscribe to the source to get things started. - source.subscribe( - createOperatorSubscriber( - subscriber, - (value: T) => { - // Copy the windows array before we emit to - // make sure we don't have issues with reentrant code. - const windowsCopy = windows.slice(); - for (const window of windowsCopy) { - window.next(value); - } - }, - () => { - // Complete all of our windows before we complete. - while (0 < windows.length) { - windows.shift()!.complete(); - } - subscriber.complete(); - }, - handleError, - () => { - // Add this finalization so that all window subjects are - // disposed of. This way, if a user tries to subscribe - // to a window *after* the outer subscription has been unsubscribed, - // they will get an error, instead of waiting forever to - // see if a value arrives. - while (0 < windows.length) { - windows.shift()!.unsubscribe(); - } - } - ) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/windowWhen.ts b/node_modules/rxjs/src/internal/operators/windowWhen.ts deleted file mode 100644 index ec31be0..0000000 --- a/node_modules/rxjs/src/internal/operators/windowWhen.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { Subscriber } from '../Subscriber'; -import { Observable } from '../Observable'; -import { Subject } from '../Subject'; -import { ObservableInput, OperatorFunction } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; - -/** - * Branch out the source Observable values as a nested Observable using a - * factory function of closing Observables to determine when to start a new - * window. - * - * It's like {@link bufferWhen}, but emits a nested - * Observable instead of an array. - * - * ![](windowWhen.png) - * - * Returns an Observable that emits windows of items it collects from the source - * Observable. The output Observable emits connected, non-overlapping windows. - * It emits the current window and opens a new one whenever the Observable - * produced by the specified `closingSelector` function emits an item. The first - * window is opened immediately when subscribing to the output Observable. - * - * ## Example - * - * Emit only the first two clicks events in every window of [1-5] random seconds - * - * ```ts - * import { fromEvent, windowWhen, interval, map, take, mergeAll } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const result = clicks.pipe( - * windowWhen(() => interval(1000 + Math.random() * 4000)), - * map(win => win.pipe(take(2))), // take at most 2 emissions from each window - * mergeAll() // flatten the Observable-of-Observables - * ); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link window} - * @see {@link windowCount} - * @see {@link windowTime} - * @see {@link windowToggle} - * @see {@link bufferWhen} - * - * @param closingSelector A function that takes no arguments and returns an - * {@link ObservableInput} (that gets converted to Observable) that signals - * (on either `next` or `complete`) when to close the previous window and - * start a new one. - * @return A function that returns an Observable of windows, which in turn are - * Observables. - */ -export function windowWhen(closingSelector: () => ObservableInput): OperatorFunction> { - return operate((source, subscriber) => { - let window: Subject | null; - let closingSubscriber: Subscriber | undefined; - - /** - * When we get an error, we have to notify both the - * destination subscriber and the window. - */ - const handleError = (err: any) => { - window!.error(err); - subscriber.error(err); - }; - - /** - * Called every time we need to open a window. - * Recursive, as it will start the closing notifier, which - * inevitably *should* call openWindow -- but may not if - * it is a "never" observable. - */ - const openWindow = () => { - // We need to clean up our closing subscription, - // we only cared about the first next or complete notification. - closingSubscriber?.unsubscribe(); - - // Close our window before starting a new one. - window?.complete(); - - // Start the new window. - window = new Subject(); - subscriber.next(window.asObservable()); - - // Get our closing notifier. - let closingNotifier: Observable; - try { - closingNotifier = innerFrom(closingSelector()); - } catch (err) { - handleError(err); - return; - } - - // Subscribe to the closing notifier, be sure - // to capture the subscriber (aka Subscription) - // so we can clean it up when we close the window - // and open a new one. - closingNotifier.subscribe((closingSubscriber = createOperatorSubscriber(subscriber, openWindow, openWindow, handleError))); - }; - - // Start the first window. - openWindow(); - - // Subscribe to the source - source.subscribe( - createOperatorSubscriber( - subscriber, - (value) => window!.next(value), - () => { - // The source completed, close the window and complete. - window!.complete(); - subscriber.complete(); - }, - handleError, - () => { - // Be sure to clean up our closing subscription - // when this tears down. - closingSubscriber?.unsubscribe(); - window = null!; - } - ) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/withLatestFrom.ts b/node_modules/rxjs/src/internal/operators/withLatestFrom.ts deleted file mode 100644 index 6cd7e4a..0000000 --- a/node_modules/rxjs/src/internal/operators/withLatestFrom.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { OperatorFunction, ObservableInputTuple } from '../types'; -import { operate } from '../util/lift'; -import { createOperatorSubscriber } from './OperatorSubscriber'; -import { innerFrom } from '../observable/innerFrom'; -import { identity } from '../util/identity'; -import { noop } from '../util/noop'; -import { popResultSelector } from '../util/args'; - -export function withLatestFrom(...inputs: [...ObservableInputTuple]): OperatorFunction; - -export function withLatestFrom( - ...inputs: [...ObservableInputTuple, (...value: [T, ...O]) => R] -): OperatorFunction; - -/** - * Combines the source Observable with other Observables to create an Observable - * whose values are calculated from the latest values of each, only when the - * source emits. - * - * Whenever the source Observable emits a value, it - * computes a formula using that value plus the latest values from other input - * Observables, then emits the output of that formula. - * - * ![](withLatestFrom.png) - * - * `withLatestFrom` combines each value from the source Observable (the - * instance) with the latest values from the other input Observables only when - * the source emits a value, optionally using a `project` function to determine - * the value to be emitted on the output Observable. All input Observables must - * emit at least one value before the output Observable will emit a value. - * - * ## Example - * - * On every click event, emit an array with the latest timer event plus the click event - * - * ```ts - * import { fromEvent, interval, withLatestFrom } from 'rxjs'; - * - * const clicks = fromEvent(document, 'click'); - * const timer = interval(1000); - * const result = clicks.pipe(withLatestFrom(timer)); - * result.subscribe(x => console.log(x)); - * ``` - * - * @see {@link combineLatest} - * - * @param inputs An input Observable to combine with the source Observable. More - * than one input Observables may be given as argument. If the last parameter is - * a function, it will be used as a projection function for combining values - * together. When the function is called, it receives all values in order of the - * Observables passed, where the first parameter is a value from the source - * Observable. (e.g. - * `a.pipe(withLatestFrom(b, c), map(([a1, b1, c1]) => a1 + b1 + c1))`). If this - * is not passed, arrays will be emitted on the output Observable. - * @return A function that returns an Observable of projected values from the - * most recent values from each input Observable, or an array of the most - * recent values from each input Observable. - */ -export function withLatestFrom(...inputs: any[]): OperatorFunction { - const project = popResultSelector(inputs) as ((...args: any[]) => R) | undefined; - - return operate((source, subscriber) => { - const len = inputs.length; - const otherValues = new Array(len); - // An array of whether or not the other sources have emitted. Matched with them by index. - // TODO: At somepoint, we should investigate the performance implications here, and look - // into using a `Set()` and checking the `size` to see if we're ready. - let hasValue = inputs.map(() => false); - // Flipped true when we have at least one value from all other sources and - // we are ready to start emitting values. - let ready = false; - - // Other sources. Note that here we are not checking `subscriber.closed`, - // this causes all inputs to be subscribed to, even if nothing can be emitted - // from them. This is an important distinction because subscription constitutes - // a side-effect. - for (let i = 0; i < len; i++) { - innerFrom(inputs[i]).subscribe( - createOperatorSubscriber( - subscriber, - (value) => { - otherValues[i] = value; - if (!ready && !hasValue[i]) { - // If we're not ready yet, flag to show this observable has emitted. - hasValue[i] = true; - // Intentionally terse code. - // If all of our other observables have emitted, set `ready` to `true`, - // so we know we can start emitting values, then clean up the `hasValue` array, - // because we don't need it anymore. - (ready = hasValue.every(identity)) && (hasValue = null!); - } - }, - // Completing one of the other sources has - // no bearing on the completion of our result. - noop - ) - ); - } - - // Source subscription - source.subscribe( - createOperatorSubscriber(subscriber, (value) => { - if (ready) { - // We have at least one value from the other sources. Go ahead and emit. - const values = [value, ...otherValues]; - subscriber.next(project ? project(...values) : values); - } - }) - ); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/zip.ts b/node_modules/rxjs/src/internal/operators/zip.ts deleted file mode 100644 index f8c2f68..0000000 --- a/node_modules/rxjs/src/internal/operators/zip.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { zip as zipStatic } from '../observable/zip'; -import { ObservableInput, ObservableInputTuple, OperatorFunction, Cons } from '../types'; -import { operate } from '../util/lift'; - -/** @deprecated Replaced with {@link zipWith}. Will be removed in v8. */ -export function zip(otherInputs: [...ObservableInputTuple]): OperatorFunction>; -/** @deprecated Replaced with {@link zipWith}. Will be removed in v8. */ -export function zip( - otherInputsAndProject: [...ObservableInputTuple], - project: (...values: Cons) => R -): OperatorFunction; -/** @deprecated Replaced with {@link zipWith}. Will be removed in v8. */ -export function zip(...otherInputs: [...ObservableInputTuple]): OperatorFunction>; -/** @deprecated Replaced with {@link zipWith}. Will be removed in v8. */ -export function zip( - ...otherInputsAndProject: [...ObservableInputTuple, (...values: Cons) => R] -): OperatorFunction; - -/** - * @deprecated Replaced with {@link zipWith}. Will be removed in v8. - */ -export function zip(...sources: Array | ((...values: Array) => R)>): OperatorFunction { - return operate((source, subscriber) => { - zipStatic(source as ObservableInput, ...(sources as Array>)).subscribe(subscriber); - }); -} diff --git a/node_modules/rxjs/src/internal/operators/zipAll.ts b/node_modules/rxjs/src/internal/operators/zipAll.ts deleted file mode 100644 index 697cff5..0000000 --- a/node_modules/rxjs/src/internal/operators/zipAll.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { OperatorFunction, ObservableInput } from '../types'; -import { zip } from '../observable/zip'; -import { joinAllInternals } from './joinAllInternals'; - -/** - * Collects all observable inner sources from the source, once the source completes, - * it will subscribe to all inner sources, combining their values by index and emitting - * them. - * - * @see {@link zipWith} - * @see {@link zip} - */ -export function zipAll(): OperatorFunction, T[]>; -export function zipAll(): OperatorFunction; -export function zipAll(project: (...values: T[]) => R): OperatorFunction, R>; -export function zipAll(project: (...values: Array) => R): OperatorFunction; - -export function zipAll(project?: (...values: T[]) => R) { - return joinAllInternals(zip, project); -} diff --git a/node_modules/rxjs/src/internal/operators/zipWith.ts b/node_modules/rxjs/src/internal/operators/zipWith.ts deleted file mode 100644 index 22eaad7..0000000 --- a/node_modules/rxjs/src/internal/operators/zipWith.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { ObservableInputTuple, OperatorFunction, Cons } from '../types'; -import { zip } from './zip'; - -/** - * Subscribes to the source, and the observable inputs provided as arguments, and combines their values, by index, into arrays. - * - * What is meant by "combine by index": The first value from each will be made into a single array, then emitted, - * then the second value from each will be combined into a single array and emitted, then the third value - * from each will be combined into a single array and emitted, and so on. - * - * This will continue until it is no longer able to combine values of the same index into an array. - * - * After the last value from any one completed source is emitted in an array, the resulting observable will complete, - * as there is no way to continue "zipping" values together by index. - * - * Use-cases for this operator are limited. There are memory concerns if one of the streams is emitting - * values at a much faster rate than the others. Usage should likely be limited to streams that emit - * at a similar pace, or finite streams of known length. - * - * In many cases, authors want `combineLatestWith` and not `zipWith`. - * - * @param otherInputs other observable inputs to collate values from. - * @return A function that returns an Observable that emits items by index - * combined from the source Observable and provided Observables, in form of an - * array. - */ -export function zipWith(...otherInputs: [...ObservableInputTuple]): OperatorFunction> { - return zip(...otherInputs); -} diff --git a/node_modules/rxjs/src/internal/scheduled/scheduleArray.ts b/node_modules/rxjs/src/internal/scheduled/scheduleArray.ts deleted file mode 100644 index ea8fa24..0000000 --- a/node_modules/rxjs/src/internal/scheduled/scheduleArray.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Observable } from '../Observable'; -import { SchedulerLike } from '../types'; - -export function scheduleArray(input: ArrayLike, scheduler: SchedulerLike) { - return new Observable((subscriber) => { - // The current array index. - let i = 0; - // Start iterating over the array like on a schedule. - return scheduler.schedule(function () { - if (i === input.length) { - // If we have hit the end of the array like in the - // previous job, we can complete. - subscriber.complete(); - } else { - // Otherwise let's next the value at the current index, - // then increment our index. - subscriber.next(input[i++]); - // If the last emission didn't cause us to close the subscriber - // (via take or some side effect), reschedule the job and we'll - // make another pass. - if (!subscriber.closed) { - this.schedule(); - } - } - }); - }); -} diff --git a/node_modules/rxjs/src/internal/scheduled/scheduleAsyncIterable.ts b/node_modules/rxjs/src/internal/scheduled/scheduleAsyncIterable.ts deleted file mode 100644 index daa0346..0000000 --- a/node_modules/rxjs/src/internal/scheduled/scheduleAsyncIterable.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { SchedulerLike } from '../types'; -import { Observable } from '../Observable'; -import { executeSchedule } from '../util/executeSchedule'; - -export function scheduleAsyncIterable(input: AsyncIterable, scheduler: SchedulerLike) { - if (!input) { - throw new Error('Iterable cannot be null'); - } - return new Observable((subscriber) => { - executeSchedule(subscriber, scheduler, () => { - const iterator = input[Symbol.asyncIterator](); - executeSchedule( - subscriber, - scheduler, - () => { - iterator.next().then((result) => { - if (result.done) { - // This will remove the subscriptions from - // the parent subscription. - subscriber.complete(); - } else { - subscriber.next(result.value); - } - }); - }, - 0, - true - ); - }); - }); -} diff --git a/node_modules/rxjs/src/internal/scheduled/scheduleIterable.ts b/node_modules/rxjs/src/internal/scheduled/scheduleIterable.ts deleted file mode 100644 index aa1459d..0000000 --- a/node_modules/rxjs/src/internal/scheduled/scheduleIterable.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { Observable } from '../Observable'; -import { SchedulerLike } from '../types'; -import { iterator as Symbol_iterator } from '../symbol/iterator'; -import { isFunction } from '../util/isFunction'; -import { executeSchedule } from '../util/executeSchedule'; - -/** - * Used in {@link scheduled} to create an observable from an Iterable. - * @param input The iterable to create an observable from - * @param scheduler The scheduler to use - */ -export function scheduleIterable(input: Iterable, scheduler: SchedulerLike) { - return new Observable((subscriber) => { - let iterator: Iterator; - - // Schedule the initial creation of the iterator from - // the iterable. This is so the code in the iterable is - // not called until the scheduled job fires. - executeSchedule(subscriber, scheduler, () => { - // Create the iterator. - iterator = (input as any)[Symbol_iterator](); - - executeSchedule( - subscriber, - scheduler, - () => { - let value: T; - let done: boolean | undefined; - try { - // Pull the value out of the iterator - ({ value, done } = iterator.next()); - } catch (err) { - // We got an error while pulling from the iterator - subscriber.error(err); - return; - } - - if (done) { - // If it is "done" we just complete. This mimics the - // behavior of JavaScript's `for..of` consumption of - // iterables, which will not emit the value from an iterator - // result of `{ done: true: value: 'here' }`. - subscriber.complete(); - } else { - // The iterable is not done, emit the value. - subscriber.next(value); - } - }, - 0, - true - ); - }); - - // During finalization, if we see this iterator has a `return` method, - // then we know it is a Generator, and not just an Iterator. So we call - // the `return()` function. This will ensure that any `finally { }` blocks - // inside of the generator we can hit will be hit properly. - return () => isFunction(iterator?.return) && iterator.return(); - }); -} diff --git a/node_modules/rxjs/src/internal/scheduled/scheduleObservable.ts b/node_modules/rxjs/src/internal/scheduled/scheduleObservable.ts deleted file mode 100644 index 29ba3b5..0000000 --- a/node_modules/rxjs/src/internal/scheduled/scheduleObservable.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { innerFrom } from '../observable/innerFrom'; -import { observeOn } from '../operators/observeOn'; -import { subscribeOn } from '../operators/subscribeOn'; -import { InteropObservable, SchedulerLike } from '../types'; - -export function scheduleObservable(input: InteropObservable, scheduler: SchedulerLike) { - return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); -} diff --git a/node_modules/rxjs/src/internal/scheduled/schedulePromise.ts b/node_modules/rxjs/src/internal/scheduled/schedulePromise.ts deleted file mode 100644 index f1211d0..0000000 --- a/node_modules/rxjs/src/internal/scheduled/schedulePromise.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { innerFrom } from '../observable/innerFrom'; -import { observeOn } from '../operators/observeOn'; -import { subscribeOn } from '../operators/subscribeOn'; -import { SchedulerLike } from '../types'; - -export function schedulePromise(input: PromiseLike, scheduler: SchedulerLike) { - return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler)); -} diff --git a/node_modules/rxjs/src/internal/scheduled/scheduleReadableStreamLike.ts b/node_modules/rxjs/src/internal/scheduled/scheduleReadableStreamLike.ts deleted file mode 100644 index d742f10..0000000 --- a/node_modules/rxjs/src/internal/scheduled/scheduleReadableStreamLike.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { SchedulerLike, ReadableStreamLike } from '../types'; -import { Observable } from '../Observable'; -import { scheduleAsyncIterable } from './scheduleAsyncIterable'; -import { readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike'; - -export function scheduleReadableStreamLike(input: ReadableStreamLike, scheduler: SchedulerLike): Observable { - return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler); -} diff --git a/node_modules/rxjs/src/internal/scheduled/scheduled.ts b/node_modules/rxjs/src/internal/scheduled/scheduled.ts deleted file mode 100644 index bb2e425..0000000 --- a/node_modules/rxjs/src/internal/scheduled/scheduled.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { scheduleObservable } from './scheduleObservable'; -import { schedulePromise } from './schedulePromise'; -import { scheduleArray } from './scheduleArray'; -import { scheduleIterable } from './scheduleIterable'; -import { scheduleAsyncIterable } from './scheduleAsyncIterable'; -import { isInteropObservable } from '../util/isInteropObservable'; -import { isPromise } from '../util/isPromise'; -import { isArrayLike } from '../util/isArrayLike'; -import { isIterable } from '../util/isIterable'; -import { ObservableInput, SchedulerLike } from '../types'; -import { Observable } from '../Observable'; -import { isAsyncIterable } from '../util/isAsyncIterable'; -import { createInvalidObservableTypeError } from '../util/throwUnobservableError'; -import { isReadableStreamLike } from '../util/isReadableStreamLike'; -import { scheduleReadableStreamLike } from './scheduleReadableStreamLike'; - -/** - * Converts from a common {@link ObservableInput} type to an observable where subscription and emissions - * are scheduled on the provided scheduler. - * - * @see {@link from} - * @see {@link of} - * - * @param input The observable, array, promise, iterable, etc you would like to schedule - * @param scheduler The scheduler to use to schedule the subscription and emissions from - * the returned observable. - */ -export function scheduled(input: ObservableInput, scheduler: SchedulerLike): Observable { - if (input != null) { - if (isInteropObservable(input)) { - return scheduleObservable(input, scheduler); - } - if (isArrayLike(input)) { - return scheduleArray(input, scheduler); - } - if (isPromise(input)) { - return schedulePromise(input, scheduler); - } - if (isAsyncIterable(input)) { - return scheduleAsyncIterable(input, scheduler); - } - if (isIterable(input)) { - return scheduleIterable(input, scheduler); - } - if (isReadableStreamLike(input)) { - return scheduleReadableStreamLike(input, scheduler); - } - } - throw createInvalidObservableTypeError(input); -} diff --git a/node_modules/rxjs/src/internal/scheduler/Action.ts b/node_modules/rxjs/src/internal/scheduler/Action.ts deleted file mode 100644 index a9c543b..0000000 --- a/node_modules/rxjs/src/internal/scheduler/Action.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Scheduler } from '../Scheduler'; -import { Subscription } from '../Subscription'; -import { SchedulerAction } from '../types'; - -/** - * A unit of work to be executed in a `scheduler`. An action is typically - * created from within a {@link SchedulerLike} and an RxJS user does not need to concern - * themselves about creating and manipulating an Action. - * - * ```ts - * class Action extends Subscription { - * new (scheduler: Scheduler, work: (state?: T) => void); - * schedule(state?: T, delay: number = 0): Subscription; - * } - * ``` - */ -export class Action extends Subscription { - constructor(scheduler: Scheduler, work: (this: SchedulerAction, state?: T) => void) { - super(); - } - /** - * Schedules this action on its parent {@link SchedulerLike} for execution. May be passed - * some context object, `state`. May happen at some point in the future, - * according to the `delay` parameter, if specified. - * @param state Some contextual data that the `work` function uses when called by the - * Scheduler. - * @param delay Time to wait before executing the work, where the time unit is implicit - * and defined by the Scheduler. - * @return A subscription in order to be able to unsubscribe the scheduled work. - */ - public schedule(state?: T, delay: number = 0): Subscription { - return this; - } -} diff --git a/node_modules/rxjs/src/internal/scheduler/AnimationFrameAction.ts b/node_modules/rxjs/src/internal/scheduler/AnimationFrameAction.ts deleted file mode 100644 index 502bbc7..0000000 --- a/node_modules/rxjs/src/internal/scheduler/AnimationFrameAction.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { AsyncAction } from './AsyncAction'; -import { AnimationFrameScheduler } from './AnimationFrameScheduler'; -import { SchedulerAction } from '../types'; -import { animationFrameProvider } from './animationFrameProvider'; -import { TimerHandle } from './timerHandle'; - -export class AnimationFrameAction extends AsyncAction { - constructor(protected scheduler: AnimationFrameScheduler, protected work: (this: SchedulerAction, state?: T) => void) { - super(scheduler, work); - } - - protected requestAsyncId(scheduler: AnimationFrameScheduler, id?: TimerHandle, delay: number = 0): TimerHandle { - // If delay is greater than 0, request as an async action. - if (delay !== null && delay > 0) { - return super.requestAsyncId(scheduler, id, delay); - } - // Push the action to the end of the scheduler queue. - scheduler.actions.push(this); - // If an animation frame has already been requested, don't request another - // one. If an animation frame hasn't been requested yet, request one. Return - // the current animation frame request id. - return scheduler._scheduled || (scheduler._scheduled = animationFrameProvider.requestAnimationFrame(() => scheduler.flush(undefined))); - } - - protected recycleAsyncId(scheduler: AnimationFrameScheduler, id?: TimerHandle, delay: number = 0): TimerHandle | undefined { - // If delay exists and is greater than 0, or if the delay is null (the - // action wasn't rescheduled) but was originally scheduled as an async - // action, then recycle as an async action. - if (delay != null ? delay > 0 : this.delay > 0) { - return super.recycleAsyncId(scheduler, id, delay); - } - // If the scheduler queue has no remaining actions with the same async id, - // cancel the requested animation frame and set the scheduled flag to - // undefined so the next AnimationFrameAction will request its own. - const { actions } = scheduler; - if (id != null && id === scheduler._scheduled && actions[actions.length - 1]?.id !== id) { - animationFrameProvider.cancelAnimationFrame(id as number); - scheduler._scheduled = undefined; - } - // Return undefined so the action knows to request a new async id if it's rescheduled. - return undefined; - } -} diff --git a/node_modules/rxjs/src/internal/scheduler/AnimationFrameScheduler.ts b/node_modules/rxjs/src/internal/scheduler/AnimationFrameScheduler.ts deleted file mode 100644 index 1f21ffa..0000000 --- a/node_modules/rxjs/src/internal/scheduler/AnimationFrameScheduler.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { AsyncAction } from './AsyncAction'; -import { AsyncScheduler } from './AsyncScheduler'; - -export class AnimationFrameScheduler extends AsyncScheduler { - public flush(action?: AsyncAction): void { - this._active = true; - // The async id that effects a call to flush is stored in _scheduled. - // Before executing an action, it's necessary to check the action's async - // id to determine whether it's supposed to be executed in the current - // flush. - // Previous implementations of this method used a count to determine this, - // but that was unsound, as actions that are unsubscribed - i.e. cancelled - - // are removed from the actions array and that can shift actions that are - // scheduled to be executed in a subsequent flush into positions at which - // they are executed within the current flush. - let flushId; - if (action) { - flushId = action.id; - } else { - flushId = this._scheduled; - this._scheduled = undefined; - } - - const { actions } = this; - let error: any; - action = action || actions.shift()!; - - do { - if ((error = action.execute(action.state, action.delay))) { - break; - } - } while ((action = actions[0]) && action.id === flushId && actions.shift()); - - this._active = false; - - if (error) { - while ((action = actions[0]) && action.id === flushId && actions.shift()) { - action.unsubscribe(); - } - throw error; - } - } -} diff --git a/node_modules/rxjs/src/internal/scheduler/AsapAction.ts b/node_modules/rxjs/src/internal/scheduler/AsapAction.ts deleted file mode 100644 index 178f677..0000000 --- a/node_modules/rxjs/src/internal/scheduler/AsapAction.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { AsyncAction } from './AsyncAction'; -import { AsapScheduler } from './AsapScheduler'; -import { SchedulerAction } from '../types'; -import { immediateProvider } from './immediateProvider'; -import { TimerHandle } from './timerHandle'; - -export class AsapAction extends AsyncAction { - constructor(protected scheduler: AsapScheduler, protected work: (this: SchedulerAction, state?: T) => void) { - super(scheduler, work); - } - - protected requestAsyncId(scheduler: AsapScheduler, id?: TimerHandle, delay: number = 0): TimerHandle { - // If delay is greater than 0, request as an async action. - if (delay !== null && delay > 0) { - return super.requestAsyncId(scheduler, id, delay); - } - // Push the action to the end of the scheduler queue. - scheduler.actions.push(this); - // If a microtask has already been scheduled, don't schedule another - // one. If a microtask hasn't been scheduled yet, schedule one now. Return - // the current scheduled microtask id. - return scheduler._scheduled || (scheduler._scheduled = immediateProvider.setImmediate(scheduler.flush.bind(scheduler, undefined))); - } - - protected recycleAsyncId(scheduler: AsapScheduler, id?: TimerHandle, delay: number = 0): TimerHandle | undefined { - // If delay exists and is greater than 0, or if the delay is null (the - // action wasn't rescheduled) but was originally scheduled as an async - // action, then recycle as an async action. - if (delay != null ? delay > 0 : this.delay > 0) { - return super.recycleAsyncId(scheduler, id, delay); - } - // If the scheduler queue has no remaining actions with the same async id, - // cancel the requested microtask and set the scheduled flag to undefined - // so the next AsapAction will request its own. - const { actions } = scheduler; - if (id != null && actions[actions.length - 1]?.id !== id) { - immediateProvider.clearImmediate(id); - if (scheduler._scheduled === id) { - scheduler._scheduled = undefined; - } - } - // Return undefined so the action knows to request a new async id if it's rescheduled. - return undefined; - } -} diff --git a/node_modules/rxjs/src/internal/scheduler/AsapScheduler.ts b/node_modules/rxjs/src/internal/scheduler/AsapScheduler.ts deleted file mode 100644 index 95874bd..0000000 --- a/node_modules/rxjs/src/internal/scheduler/AsapScheduler.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { AsyncAction } from './AsyncAction'; -import { AsyncScheduler } from './AsyncScheduler'; - -export class AsapScheduler extends AsyncScheduler { - public flush(action?: AsyncAction): void { - this._active = true; - // The async id that effects a call to flush is stored in _scheduled. - // Before executing an action, it's necessary to check the action's async - // id to determine whether it's supposed to be executed in the current - // flush. - // Previous implementations of this method used a count to determine this, - // but that was unsound, as actions that are unsubscribed - i.e. cancelled - - // are removed from the actions array and that can shift actions that are - // scheduled to be executed in a subsequent flush into positions at which - // they are executed within the current flush. - const flushId = this._scheduled; - this._scheduled = undefined; - - const { actions } = this; - let error: any; - action = action || actions.shift()!; - - do { - if ((error = action.execute(action.state, action.delay))) { - break; - } - } while ((action = actions[0]) && action.id === flushId && actions.shift()); - - this._active = false; - - if (error) { - while ((action = actions[0]) && action.id === flushId && actions.shift()) { - action.unsubscribe(); - } - throw error; - } - } -} diff --git a/node_modules/rxjs/src/internal/scheduler/AsyncAction.ts b/node_modules/rxjs/src/internal/scheduler/AsyncAction.ts deleted file mode 100644 index 704b571..0000000 --- a/node_modules/rxjs/src/internal/scheduler/AsyncAction.ts +++ /dev/null @@ -1,150 +0,0 @@ -import { Action } from './Action'; -import { SchedulerAction } from '../types'; -import { Subscription } from '../Subscription'; -import { AsyncScheduler } from './AsyncScheduler'; -import { intervalProvider } from './intervalProvider'; -import { arrRemove } from '../util/arrRemove'; -import { TimerHandle } from './timerHandle'; - -export class AsyncAction extends Action { - public id: TimerHandle | undefined; - public state?: T; - // @ts-ignore: Property has no initializer and is not definitely assigned - public delay: number; - protected pending: boolean = false; - - constructor(protected scheduler: AsyncScheduler, protected work: (this: SchedulerAction, state?: T) => void) { - super(scheduler, work); - } - - public schedule(state?: T, delay: number = 0): Subscription { - if (this.closed) { - return this; - } - - // Always replace the current state with the new state. - this.state = state; - - const id = this.id; - const scheduler = this.scheduler; - - // - // Important implementation note: - // - // Actions only execute once by default, unless rescheduled from within the - // scheduled callback. This allows us to implement single and repeat - // actions via the same code path, without adding API surface area, as well - // as mimic traditional recursion but across asynchronous boundaries. - // - // However, JS runtimes and timers distinguish between intervals achieved by - // serial `setTimeout` calls vs. a single `setInterval` call. An interval of - // serial `setTimeout` calls can be individually delayed, which delays - // scheduling the next `setTimeout`, and so on. `setInterval` attempts to - // guarantee the interval callback will be invoked more precisely to the - // interval period, regardless of load. - // - // Therefore, we use `setInterval` to schedule single and repeat actions. - // If the action reschedules itself with the same delay, the interval is not - // canceled. If the action doesn't reschedule, or reschedules with a - // different delay, the interval will be canceled after scheduled callback - // execution. - // - if (id != null) { - this.id = this.recycleAsyncId(scheduler, id, delay); - } - - // Set the pending flag indicating that this action has been scheduled, or - // has recursively rescheduled itself. - this.pending = true; - - this.delay = delay; - // If this action has already an async Id, don't request a new one. - this.id = this.id ?? this.requestAsyncId(scheduler, this.id, delay); - - return this; - } - - protected requestAsyncId(scheduler: AsyncScheduler, _id?: TimerHandle, delay: number = 0): TimerHandle { - return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay); - } - - protected recycleAsyncId(_scheduler: AsyncScheduler, id?: TimerHandle, delay: number | null = 0): TimerHandle | undefined { - // If this action is rescheduled with the same delay time, don't clear the interval id. - if (delay != null && this.delay === delay && this.pending === false) { - return id; - } - // Otherwise, if the action's delay time is different from the current delay, - // or the action has been rescheduled before it's executed, clear the interval id - if (id != null) { - intervalProvider.clearInterval(id); - } - - return undefined; - } - - /** - * Immediately executes this action and the `work` it contains. - */ - public execute(state: T, delay: number): any { - if (this.closed) { - return new Error('executing a cancelled action'); - } - - this.pending = false; - const error = this._execute(state, delay); - if (error) { - return error; - } else if (this.pending === false && this.id != null) { - // Dequeue if the action didn't reschedule itself. Don't call - // unsubscribe(), because the action could reschedule later. - // For example: - // ``` - // scheduler.schedule(function doWork(counter) { - // /* ... I'm a busy worker bee ... */ - // var originalAction = this; - // /* wait 100ms before rescheduling the action */ - // setTimeout(function () { - // originalAction.schedule(counter + 1); - // }, 100); - // }, 1000); - // ``` - this.id = this.recycleAsyncId(this.scheduler, this.id, null); - } - } - - protected _execute(state: T, _delay: number): any { - let errored: boolean = false; - let errorValue: any; - try { - this.work(state); - } catch (e) { - errored = true; - // HACK: Since code elsewhere is relying on the "truthiness" of the - // return here, we can't have it return "" or 0 or false. - // TODO: Clean this up when we refactor schedulers mid-version-8 or so. - errorValue = e ? e : new Error('Scheduled action threw falsy error'); - } - if (errored) { - this.unsubscribe(); - return errorValue; - } - } - - unsubscribe() { - if (!this.closed) { - const { id, scheduler } = this; - const { actions } = scheduler; - - this.work = this.state = this.scheduler = null!; - this.pending = false; - - arrRemove(actions, this); - if (id != null) { - this.id = this.recycleAsyncId(scheduler, id, null); - } - - this.delay = null!; - super.unsubscribe(); - } - } -} diff --git a/node_modules/rxjs/src/internal/scheduler/AsyncScheduler.ts b/node_modules/rxjs/src/internal/scheduler/AsyncScheduler.ts deleted file mode 100644 index b05e2e3..0000000 --- a/node_modules/rxjs/src/internal/scheduler/AsyncScheduler.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { Scheduler } from '../Scheduler'; -import { Action } from './Action'; -import { AsyncAction } from './AsyncAction'; -import { TimerHandle } from './timerHandle'; - -export class AsyncScheduler extends Scheduler { - public actions: Array> = []; - /** - * A flag to indicate whether the Scheduler is currently executing a batch of - * queued actions. - * @internal - */ - public _active: boolean = false; - /** - * An internal ID used to track the latest asynchronous task such as those - * coming from `setTimeout`, `setInterval`, `requestAnimationFrame`, and - * others. - * @internal - */ - public _scheduled: TimerHandle | undefined; - - constructor(SchedulerAction: typeof Action, now: () => number = Scheduler.now) { - super(SchedulerAction, now); - } - - public flush(action: AsyncAction): void { - const { actions } = this; - - if (this._active) { - actions.push(action); - return; - } - - let error: any; - this._active = true; - - do { - if ((error = action.execute(action.state, action.delay))) { - break; - } - } while ((action = actions.shift()!)); // exhaust the scheduler queue - - this._active = false; - - if (error) { - while ((action = actions.shift()!)) { - action.unsubscribe(); - } - throw error; - } - } -} diff --git a/node_modules/rxjs/src/internal/scheduler/QueueAction.ts b/node_modules/rxjs/src/internal/scheduler/QueueAction.ts deleted file mode 100644 index 9016edb..0000000 --- a/node_modules/rxjs/src/internal/scheduler/QueueAction.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { AsyncAction } from './AsyncAction'; -import { Subscription } from '../Subscription'; -import { QueueScheduler } from './QueueScheduler'; -import { SchedulerAction } from '../types'; -import { TimerHandle } from './timerHandle'; - -export class QueueAction extends AsyncAction { - constructor(protected scheduler: QueueScheduler, protected work: (this: SchedulerAction, state?: T) => void) { - super(scheduler, work); - } - - public schedule(state?: T, delay: number = 0): Subscription { - if (delay > 0) { - return super.schedule(state, delay); - } - this.delay = delay; - this.state = state; - this.scheduler.flush(this); - return this; - } - - public execute(state: T, delay: number): any { - return delay > 0 || this.closed ? super.execute(state, delay) : this._execute(state, delay); - } - - protected requestAsyncId(scheduler: QueueScheduler, id?: TimerHandle, delay: number = 0): TimerHandle { - // If delay exists and is greater than 0, or if the delay is null (the - // action wasn't rescheduled) but was originally scheduled as an async - // action, then recycle as an async action. - - if ((delay != null && delay > 0) || (delay == null && this.delay > 0)) { - return super.requestAsyncId(scheduler, id, delay); - } - - // Otherwise flush the scheduler starting with this action. - scheduler.flush(this); - - // HACK: In the past, this was returning `void`. However, `void` isn't a valid - // `TimerHandle`, and generally the return value here isn't really used. So the - // compromise is to return `0` which is both "falsy" and a valid `TimerHandle`, - // as opposed to refactoring every other instanceo of `requestAsyncId`. - return 0; - } -} diff --git a/node_modules/rxjs/src/internal/scheduler/QueueScheduler.ts b/node_modules/rxjs/src/internal/scheduler/QueueScheduler.ts deleted file mode 100644 index e9dab3d..0000000 --- a/node_modules/rxjs/src/internal/scheduler/QueueScheduler.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { AsyncScheduler } from './AsyncScheduler'; - -export class QueueScheduler extends AsyncScheduler { -} diff --git a/node_modules/rxjs/src/internal/scheduler/VirtualTimeScheduler.ts b/node_modules/rxjs/src/internal/scheduler/VirtualTimeScheduler.ts deleted file mode 100644 index 70fec02..0000000 --- a/node_modules/rxjs/src/internal/scheduler/VirtualTimeScheduler.ts +++ /dev/null @@ -1,128 +0,0 @@ -import { AsyncAction } from './AsyncAction'; -import { Subscription } from '../Subscription'; -import { AsyncScheduler } from './AsyncScheduler'; -import { SchedulerAction } from '../types'; -import { TimerHandle } from './timerHandle'; - -export class VirtualTimeScheduler extends AsyncScheduler { - /** @deprecated Not used in VirtualTimeScheduler directly. Will be removed in v8. */ - static frameTimeFactor = 10; - - /** - * The current frame for the state of the virtual scheduler instance. The difference - * between two "frames" is synonymous with the passage of "virtual time units". So if - * you record `scheduler.frame` to be `1`, then later, observe `scheduler.frame` to be at `11`, - * that means `10` virtual time units have passed. - */ - public frame: number = 0; - - /** - * Used internally to examine the current virtual action index being processed. - * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. - */ - public index: number = -1; - - /** - * This creates an instance of a `VirtualTimeScheduler`. Experts only. The signature of - * this constructor is likely to change in the long run. - * - * @param schedulerActionCtor The type of Action to initialize when initializing actions during scheduling. - * @param maxFrames The maximum number of frames to process before stopping. Used to prevent endless flush cycles. - */ - constructor(schedulerActionCtor: typeof AsyncAction = VirtualAction as any, public maxFrames: number = Infinity) { - super(schedulerActionCtor, () => this.frame); - } - - /** - * Prompt the Scheduler to execute all of its queued actions, therefore - * clearing its queue. - */ - public flush(): void { - const { actions, maxFrames } = this; - let error: any; - let action: AsyncAction | undefined; - - while ((action = actions[0]) && action.delay <= maxFrames) { - actions.shift(); - this.frame = action.delay; - - if ((error = action.execute(action.state, action.delay))) { - break; - } - } - - if (error) { - while ((action = actions.shift())) { - action.unsubscribe(); - } - throw error; - } - } -} - -export class VirtualAction extends AsyncAction { - protected active: boolean = true; - - constructor( - protected scheduler: VirtualTimeScheduler, - protected work: (this: SchedulerAction, state?: T) => void, - protected index: number = (scheduler.index += 1) - ) { - super(scheduler, work); - this.index = scheduler.index = index; - } - - public schedule(state?: T, delay: number = 0): Subscription { - if (Number.isFinite(delay)) { - if (!this.id) { - return super.schedule(state, delay); - } - this.active = false; - // If an action is rescheduled, we save allocations by mutating its state, - // pushing it to the end of the scheduler queue, and recycling the action. - // But since the VirtualTimeScheduler is used for testing, VirtualActions - // must be immutable so they can be inspected later. - const action = new VirtualAction(this.scheduler, this.work); - this.add(action); - return action.schedule(state, delay); - } else { - // If someone schedules something with Infinity, it'll never happen. So we - // don't even schedule it. - return Subscription.EMPTY; - } - } - - protected requestAsyncId(scheduler: VirtualTimeScheduler, id?: any, delay: number = 0): TimerHandle { - this.delay = scheduler.frame + delay; - const { actions } = scheduler; - actions.push(this); - (actions as Array>).sort(VirtualAction.sortActions); - return 1; - } - - protected recycleAsyncId(scheduler: VirtualTimeScheduler, id?: any, delay: number = 0): TimerHandle | undefined { - return undefined; - } - - protected _execute(state: T, delay: number): any { - if (this.active === true) { - return super._execute(state, delay); - } - } - - private static sortActions(a: VirtualAction, b: VirtualAction) { - if (a.delay === b.delay) { - if (a.index === b.index) { - return 0; - } else if (a.index > b.index) { - return 1; - } else { - return -1; - } - } else if (a.delay > b.delay) { - return 1; - } else { - return -1; - } - } -} diff --git a/node_modules/rxjs/src/internal/scheduler/animationFrame.ts b/node_modules/rxjs/src/internal/scheduler/animationFrame.ts deleted file mode 100644 index 2ce033d..0000000 --- a/node_modules/rxjs/src/internal/scheduler/animationFrame.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { AnimationFrameAction } from './AnimationFrameAction'; -import { AnimationFrameScheduler } from './AnimationFrameScheduler'; - -/** - * - * Animation Frame Scheduler - * - * Perform task when `window.requestAnimationFrame` would fire - * - * When `animationFrame` scheduler is used with delay, it will fall back to {@link asyncScheduler} scheduler - * behaviour. - * - * Without delay, `animationFrame` scheduler can be used to create smooth browser animations. - * It makes sure scheduled task will happen just before next browser content repaint, - * thus performing animations as efficiently as possible. - * - * ## Example - * Schedule div height animation - * ```ts - * // html:
    - * import { animationFrameScheduler } from 'rxjs'; - * - * const div = document.querySelector('div'); - * - * animationFrameScheduler.schedule(function(height) { - * div.style.height = height + "px"; - * - * this.schedule(height + 1); // `this` references currently executing Action, - * // which we reschedule with new state - * }, 0, 0); - * - * // You will see a div element growing in height - * ``` - */ - -export const animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction); - -/** - * @deprecated Renamed to {@link animationFrameScheduler}. Will be removed in v8. - */ -export const animationFrame = animationFrameScheduler; diff --git a/node_modules/rxjs/src/internal/scheduler/animationFrameProvider.ts b/node_modules/rxjs/src/internal/scheduler/animationFrameProvider.ts deleted file mode 100644 index 610093b..0000000 --- a/node_modules/rxjs/src/internal/scheduler/animationFrameProvider.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Subscription } from '../Subscription'; - -interface AnimationFrameProvider { - schedule(callback: FrameRequestCallback): Subscription; - requestAnimationFrame: typeof requestAnimationFrame; - cancelAnimationFrame: typeof cancelAnimationFrame; - delegate: - | { - requestAnimationFrame: typeof requestAnimationFrame; - cancelAnimationFrame: typeof cancelAnimationFrame; - } - | undefined; -} - -export const animationFrameProvider: AnimationFrameProvider = { - // When accessing the delegate, use the variable rather than `this` so that - // the functions can be called without being bound to the provider. - schedule(callback) { - let request = requestAnimationFrame; - let cancel: typeof cancelAnimationFrame | undefined = cancelAnimationFrame; - const { delegate } = animationFrameProvider; - if (delegate) { - request = delegate.requestAnimationFrame; - cancel = delegate.cancelAnimationFrame; - } - const handle = request((timestamp) => { - // Clear the cancel function. The request has been fulfilled, so - // attempting to cancel the request upon unsubscription would be - // pointless. - cancel = undefined; - callback(timestamp); - }); - return new Subscription(() => cancel?.(handle)); - }, - requestAnimationFrame(...args) { - const { delegate } = animationFrameProvider; - return (delegate?.requestAnimationFrame || requestAnimationFrame)(...args); - }, - cancelAnimationFrame(...args) { - const { delegate } = animationFrameProvider; - return (delegate?.cancelAnimationFrame || cancelAnimationFrame)(...args); - }, - delegate: undefined, -}; diff --git a/node_modules/rxjs/src/internal/scheduler/asap.ts b/node_modules/rxjs/src/internal/scheduler/asap.ts deleted file mode 100644 index 5be1be4..0000000 --- a/node_modules/rxjs/src/internal/scheduler/asap.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { AsapAction } from './AsapAction'; -import { AsapScheduler } from './AsapScheduler'; - -/** - * - * Asap Scheduler - * - * Perform task as fast as it can be performed asynchronously - * - * `asap` scheduler behaves the same as {@link asyncScheduler} scheduler when you use it to delay task - * in time. If however you set delay to `0`, `asap` will wait for current synchronously executing - * code to end and then it will try to execute given task as fast as possible. - * - * `asap` scheduler will do its best to minimize time between end of currently executing code - * and start of scheduled task. This makes it best candidate for performing so called "deferring". - * Traditionally this was achieved by calling `setTimeout(deferredTask, 0)`, but that technique involves - * some (although minimal) unwanted delay. - * - * Note that using `asap` scheduler does not necessarily mean that your task will be first to process - * after currently executing code. In particular, if some task was also scheduled with `asap` before, - * that task will execute first. That being said, if you need to schedule task asynchronously, but - * as soon as possible, `asap` scheduler is your best bet. - * - * ## Example - * Compare async and asap scheduler< - * ```ts - * import { asapScheduler, asyncScheduler } from 'rxjs'; - * - * asyncScheduler.schedule(() => console.log('async')); // scheduling 'async' first... - * asapScheduler.schedule(() => console.log('asap')); - * - * // Logs: - * // "asap" - * // "async" - * // ... but 'asap' goes first! - * ``` - */ - -export const asapScheduler = new AsapScheduler(AsapAction); - -/** - * @deprecated Renamed to {@link asapScheduler}. Will be removed in v8. - */ -export const asap = asapScheduler; diff --git a/node_modules/rxjs/src/internal/scheduler/async.ts b/node_modules/rxjs/src/internal/scheduler/async.ts deleted file mode 100644 index 76f9dc8..0000000 --- a/node_modules/rxjs/src/internal/scheduler/async.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { AsyncAction } from './AsyncAction'; -import { AsyncScheduler } from './AsyncScheduler'; - -/** - * - * Async Scheduler - * - * Schedule task as if you used setTimeout(task, duration) - * - * `async` scheduler schedules tasks asynchronously, by putting them on the JavaScript - * event loop queue. It is best used to delay tasks in time or to schedule tasks repeating - * in intervals. - * - * If you just want to "defer" task, that is to perform it right after currently - * executing synchronous code ends (commonly achieved by `setTimeout(deferredTask, 0)`), - * better choice will be the {@link asapScheduler} scheduler. - * - * ## Examples - * Use async scheduler to delay task - * ```ts - * import { asyncScheduler } from 'rxjs'; - * - * const task = () => console.log('it works!'); - * - * asyncScheduler.schedule(task, 2000); - * - * // After 2 seconds logs: - * // "it works!" - * ``` - * - * Use async scheduler to repeat task in intervals - * ```ts - * import { asyncScheduler } from 'rxjs'; - * - * function task(state) { - * console.log(state); - * this.schedule(state + 1, 1000); // `this` references currently executing Action, - * // which we reschedule with new state and delay - * } - * - * asyncScheduler.schedule(task, 3000, 0); - * - * // Logs: - * // 0 after 3s - * // 1 after 4s - * // 2 after 5s - * // 3 after 6s - * ``` - */ - -export const asyncScheduler = new AsyncScheduler(AsyncAction); - -/** - * @deprecated Renamed to {@link asyncScheduler}. Will be removed in v8. - */ -export const async = asyncScheduler; diff --git a/node_modules/rxjs/src/internal/scheduler/dateTimestampProvider.ts b/node_modules/rxjs/src/internal/scheduler/dateTimestampProvider.ts deleted file mode 100644 index 9e8339d..0000000 --- a/node_modules/rxjs/src/internal/scheduler/dateTimestampProvider.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { TimestampProvider } from '../types'; - -interface DateTimestampProvider extends TimestampProvider { - delegate: TimestampProvider | undefined; -} - -export const dateTimestampProvider: DateTimestampProvider = { - now() { - // Use the variable rather than `this` so that the function can be called - // without being bound to the provider. - return (dateTimestampProvider.delegate || Date).now(); - }, - delegate: undefined, -}; diff --git a/node_modules/rxjs/src/internal/scheduler/immediateProvider.ts b/node_modules/rxjs/src/internal/scheduler/immediateProvider.ts deleted file mode 100644 index d70fbf3..0000000 --- a/node_modules/rxjs/src/internal/scheduler/immediateProvider.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Immediate } from '../util/Immediate'; -import type { TimerHandle } from './timerHandle'; -const { setImmediate, clearImmediate } = Immediate; - -type SetImmediateFunction = (handler: () => void, ...args: any[]) => TimerHandle; -type ClearImmediateFunction = (handle: TimerHandle) => void; - -interface ImmediateProvider { - setImmediate: SetImmediateFunction; - clearImmediate: ClearImmediateFunction; - delegate: - | { - setImmediate: SetImmediateFunction; - clearImmediate: ClearImmediateFunction; - } - | undefined; -} - -export const immediateProvider: ImmediateProvider = { - // When accessing the delegate, use the variable rather than `this` so that - // the functions can be called without being bound to the provider. - setImmediate(...args) { - const { delegate } = immediateProvider; - return (delegate?.setImmediate || setImmediate)(...args); - }, - clearImmediate(handle) { - const { delegate } = immediateProvider; - return (delegate?.clearImmediate || clearImmediate)(handle as any); - }, - delegate: undefined, -}; diff --git a/node_modules/rxjs/src/internal/scheduler/intervalProvider.ts b/node_modules/rxjs/src/internal/scheduler/intervalProvider.ts deleted file mode 100644 index 032317d..0000000 --- a/node_modules/rxjs/src/internal/scheduler/intervalProvider.ts +++ /dev/null @@ -1,31 +0,0 @@ -import type { TimerHandle } from './timerHandle'; -type SetIntervalFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle; -type ClearIntervalFunction = (handle: TimerHandle) => void; - -interface IntervalProvider { - setInterval: SetIntervalFunction; - clearInterval: ClearIntervalFunction; - delegate: - | { - setInterval: SetIntervalFunction; - clearInterval: ClearIntervalFunction; - } - | undefined; -} - -export const intervalProvider: IntervalProvider = { - // When accessing the delegate, use the variable rather than `this` so that - // the functions can be called without being bound to the provider. - setInterval(handler: () => void, timeout?: number, ...args) { - const { delegate } = intervalProvider; - if (delegate?.setInterval) { - return delegate.setInterval(handler, timeout, ...args); - } - return setInterval(handler, timeout, ...args); - }, - clearInterval(handle) { - const { delegate } = intervalProvider; - return (delegate?.clearInterval || clearInterval)(handle as any); - }, - delegate: undefined, -}; diff --git a/node_modules/rxjs/src/internal/scheduler/performanceTimestampProvider.ts b/node_modules/rxjs/src/internal/scheduler/performanceTimestampProvider.ts deleted file mode 100644 index 873e71b..0000000 --- a/node_modules/rxjs/src/internal/scheduler/performanceTimestampProvider.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { TimestampProvider } from '../types'; - -interface PerformanceTimestampProvider extends TimestampProvider { - delegate: TimestampProvider | undefined; -} - -export const performanceTimestampProvider: PerformanceTimestampProvider = { - now() { - // Use the variable rather than `this` so that the function can be called - // without being bound to the provider. - return (performanceTimestampProvider.delegate || performance).now(); - }, - delegate: undefined, -}; diff --git a/node_modules/rxjs/src/internal/scheduler/queue.ts b/node_modules/rxjs/src/internal/scheduler/queue.ts deleted file mode 100644 index df4e216..0000000 --- a/node_modules/rxjs/src/internal/scheduler/queue.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { QueueAction } from './QueueAction'; -import { QueueScheduler } from './QueueScheduler'; - -/** - * - * Queue Scheduler - * - * Put every next task on a queue, instead of executing it immediately - * - * `queue` scheduler, when used with delay, behaves the same as {@link asyncScheduler} scheduler. - * - * When used without delay, it schedules given task synchronously - executes it right when - * it is scheduled. However when called recursively, that is when inside the scheduled task, - * another task is scheduled with queue scheduler, instead of executing immediately as well, - * that task will be put on a queue and wait for current one to finish. - * - * This means that when you execute task with `queue` scheduler, you are sure it will end - * before any other task scheduled with that scheduler will start. - * - * ## Examples - * Schedule recursively first, then do something - * ```ts - * import { queueScheduler } from 'rxjs'; - * - * queueScheduler.schedule(() => { - * queueScheduler.schedule(() => console.log('second')); // will not happen now, but will be put on a queue - * - * console.log('first'); - * }); - * - * // Logs: - * // "first" - * // "second" - * ``` - * - * Reschedule itself recursively - * ```ts - * import { queueScheduler } from 'rxjs'; - * - * queueScheduler.schedule(function(state) { - * if (state !== 0) { - * console.log('before', state); - * this.schedule(state - 1); // `this` references currently executing Action, - * // which we reschedule with new state - * console.log('after', state); - * } - * }, 0, 3); - * - * // In scheduler that runs recursively, you would expect: - * // "before", 3 - * // "before", 2 - * // "before", 1 - * // "after", 1 - * // "after", 2 - * // "after", 3 - * - * // But with queue it logs: - * // "before", 3 - * // "after", 3 - * // "before", 2 - * // "after", 2 - * // "before", 1 - * // "after", 1 - * ``` - */ - -export const queueScheduler = new QueueScheduler(QueueAction); - -/** - * @deprecated Renamed to {@link queueScheduler}. Will be removed in v8. - */ -export const queue = queueScheduler; diff --git a/node_modules/rxjs/src/internal/scheduler/timeoutProvider.ts b/node_modules/rxjs/src/internal/scheduler/timeoutProvider.ts deleted file mode 100644 index 205e016..0000000 --- a/node_modules/rxjs/src/internal/scheduler/timeoutProvider.ts +++ /dev/null @@ -1,31 +0,0 @@ -import type { TimerHandle } from './timerHandle'; -type SetTimeoutFunction = (handler: () => void, timeout?: number, ...args: any[]) => TimerHandle; -type ClearTimeoutFunction = (handle: TimerHandle) => void; - -interface TimeoutProvider { - setTimeout: SetTimeoutFunction; - clearTimeout: ClearTimeoutFunction; - delegate: - | { - setTimeout: SetTimeoutFunction; - clearTimeout: ClearTimeoutFunction; - } - | undefined; -} - -export const timeoutProvider: TimeoutProvider = { - // When accessing the delegate, use the variable rather than `this` so that - // the functions can be called without being bound to the provider. - setTimeout(handler: () => void, timeout?: number, ...args) { - const { delegate } = timeoutProvider; - if (delegate?.setTimeout) { - return delegate.setTimeout(handler, timeout, ...args); - } - return setTimeout(handler, timeout, ...args); - }, - clearTimeout(handle) { - const { delegate } = timeoutProvider; - return (delegate?.clearTimeout || clearTimeout)(handle as any); - }, - delegate: undefined, -}; diff --git a/node_modules/rxjs/src/internal/scheduler/timerHandle.ts b/node_modules/rxjs/src/internal/scheduler/timerHandle.ts deleted file mode 100644 index 99c0098..0000000 --- a/node_modules/rxjs/src/internal/scheduler/timerHandle.ts +++ /dev/null @@ -1 +0,0 @@ -export type TimerHandle = number | ReturnType; diff --git a/node_modules/rxjs/src/internal/symbol/iterator.ts b/node_modules/rxjs/src/internal/symbol/iterator.ts deleted file mode 100644 index 75098ef..0000000 --- a/node_modules/rxjs/src/internal/symbol/iterator.ts +++ /dev/null @@ -1,9 +0,0 @@ -export function getSymbolIterator(): symbol { - if (typeof Symbol !== 'function' || !Symbol.iterator) { - return '@@iterator' as any; - } - - return Symbol.iterator; -} - -export const iterator = getSymbolIterator(); diff --git a/node_modules/rxjs/src/internal/symbol/observable.ts b/node_modules/rxjs/src/internal/symbol/observable.ts deleted file mode 100644 index b133245..0000000 --- a/node_modules/rxjs/src/internal/symbol/observable.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Symbol.observable or a string "@@observable". Used for interop - * - * @deprecated We will no longer be exporting this symbol in upcoming versions of RxJS. - * Instead polyfill and use Symbol.observable directly *or* use https://www.npmjs.com/package/symbol-observable - */ -export const observable: string | symbol = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')(); diff --git a/node_modules/rxjs/src/internal/testing/ColdObservable.ts b/node_modules/rxjs/src/internal/testing/ColdObservable.ts deleted file mode 100644 index 40cbe49..0000000 --- a/node_modules/rxjs/src/internal/testing/ColdObservable.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { Observable } from '../Observable'; -import { Subscription } from '../Subscription'; -import { Scheduler } from '../Scheduler'; -import { TestMessage } from './TestMessage'; -import { SubscriptionLog } from './SubscriptionLog'; -import { SubscriptionLoggable } from './SubscriptionLoggable'; -import { applyMixins } from '../util/applyMixins'; -import { Subscriber } from '../Subscriber'; -import { observeNotification } from '../Notification'; - -export class ColdObservable extends Observable implements SubscriptionLoggable { - public subscriptions: SubscriptionLog[] = []; - scheduler: Scheduler; - // @ts-ignore: Property has no initializer and is not definitely assigned - logSubscribedFrame: () => number; - // @ts-ignore: Property has no initializer and is not definitely assigned - logUnsubscribedFrame: (index: number) => void; - - constructor(public messages: TestMessage[], scheduler: Scheduler) { - super(function (this: Observable, subscriber: Subscriber) { - const observable: ColdObservable = this as any; - const index = observable.logSubscribedFrame(); - const subscription = new Subscription(); - subscription.add( - new Subscription(() => { - observable.logUnsubscribedFrame(index); - }) - ); - observable.scheduleMessages(subscriber); - return subscription; - }); - this.scheduler = scheduler; - } - - scheduleMessages(subscriber: Subscriber) { - const messagesLength = this.messages.length; - for (let i = 0; i < messagesLength; i++) { - const message = this.messages[i]; - subscriber.add( - this.scheduler.schedule( - (state) => { - const { message: { notification }, subscriber: destination } = state!; - observeNotification(notification, destination); - }, - message.frame, - { message, subscriber } - ) - ); - } - } -} -applyMixins(ColdObservable, [SubscriptionLoggable]); diff --git a/node_modules/rxjs/src/internal/testing/HotObservable.ts b/node_modules/rxjs/src/internal/testing/HotObservable.ts deleted file mode 100644 index c151480..0000000 --- a/node_modules/rxjs/src/internal/testing/HotObservable.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Subject } from '../Subject'; -import { Subscriber } from '../Subscriber'; -import { Subscription } from '../Subscription'; -import { Scheduler } from '../Scheduler'; -import { TestMessage } from './TestMessage'; -import { SubscriptionLog } from './SubscriptionLog'; -import { SubscriptionLoggable } from './SubscriptionLoggable'; -import { applyMixins } from '../util/applyMixins'; -import { observeNotification } from '../Notification'; - -export class HotObservable extends Subject implements SubscriptionLoggable { - public subscriptions: SubscriptionLog[] = []; - scheduler: Scheduler; - // @ts-ignore: Property has no initializer and is not definitely assigned - logSubscribedFrame: () => number; - // @ts-ignore: Property has no initializer and is not definitely assigned - logUnsubscribedFrame: (index: number) => void; - - constructor(public messages: TestMessage[], scheduler: Scheduler) { - super(); - this.scheduler = scheduler; - } - - /** @internal */ - protected _subscribe(subscriber: Subscriber): Subscription { - const subject: HotObservable = this; - const index = subject.logSubscribedFrame(); - const subscription = new Subscription(); - subscription.add( - new Subscription(() => { - subject.logUnsubscribedFrame(index); - }) - ); - subscription.add(super._subscribe(subscriber)); - return subscription; - } - - setup() { - const subject = this; - const messagesLength = subject.messages.length; - /* tslint:disable:no-var-keyword */ - for (let i = 0; i < messagesLength; i++) { - (() => { - const { notification, frame } = subject.messages[i]; - /* tslint:enable */ - subject.scheduler.schedule(() => { - observeNotification(notification, subject); - }, frame); - })(); - } - } -} -applyMixins(HotObservable, [SubscriptionLoggable]); diff --git a/node_modules/rxjs/src/internal/testing/SubscriptionLog.ts b/node_modules/rxjs/src/internal/testing/SubscriptionLog.ts deleted file mode 100644 index 367a6d9..0000000 --- a/node_modules/rxjs/src/internal/testing/SubscriptionLog.ts +++ /dev/null @@ -1,5 +0,0 @@ -export class SubscriptionLog { - constructor(public subscribedFrame: number, - public unsubscribedFrame: number = Infinity) { - } -} \ No newline at end of file diff --git a/node_modules/rxjs/src/internal/testing/SubscriptionLoggable.ts b/node_modules/rxjs/src/internal/testing/SubscriptionLoggable.ts deleted file mode 100644 index e8def04..0000000 --- a/node_modules/rxjs/src/internal/testing/SubscriptionLoggable.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Scheduler } from '../Scheduler'; -import { SubscriptionLog } from './SubscriptionLog'; - -export class SubscriptionLoggable { - public subscriptions: SubscriptionLog[] = []; - // @ts-ignore: Property has no initializer and is not definitely assigned - scheduler: Scheduler; - - logSubscribedFrame(): number { - this.subscriptions.push(new SubscriptionLog(this.scheduler.now())); - return this.subscriptions.length - 1; - } - - logUnsubscribedFrame(index: number) { - const subscriptionLogs = this.subscriptions; - const oldSubscriptionLog = subscriptionLogs[index]; - subscriptionLogs[index] = new SubscriptionLog( - oldSubscriptionLog.subscribedFrame, - this.scheduler.now() - ); - } -} diff --git a/node_modules/rxjs/src/internal/testing/TestMessage.ts b/node_modules/rxjs/src/internal/testing/TestMessage.ts deleted file mode 100644 index 918b477..0000000 --- a/node_modules/rxjs/src/internal/testing/TestMessage.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { ObservableNotification } from '../types'; - -export interface TestMessage { - frame: number; - notification: ObservableNotification; - isGhost?: boolean; -} diff --git a/node_modules/rxjs/src/internal/testing/TestScheduler.ts b/node_modules/rxjs/src/internal/testing/TestScheduler.ts deleted file mode 100644 index 0045166..0000000 --- a/node_modules/rxjs/src/internal/testing/TestScheduler.ts +++ /dev/null @@ -1,690 +0,0 @@ -import { Observable } from '../Observable'; -import { ColdObservable } from './ColdObservable'; -import { HotObservable } from './HotObservable'; -import { TestMessage } from './TestMessage'; -import { SubscriptionLog } from './SubscriptionLog'; -import { Subscription } from '../Subscription'; -import { VirtualTimeScheduler, VirtualAction } from '../scheduler/VirtualTimeScheduler'; -import { ObservableNotification } from '../types'; -import { COMPLETE_NOTIFICATION, errorNotification, nextNotification } from '../NotificationFactories'; -import { dateTimestampProvider } from '../scheduler/dateTimestampProvider'; -import { performanceTimestampProvider } from '../scheduler/performanceTimestampProvider'; -import { animationFrameProvider } from '../scheduler/animationFrameProvider'; -import type { TimerHandle } from '../scheduler/timerHandle'; -import { immediateProvider } from '../scheduler/immediateProvider'; -import { intervalProvider } from '../scheduler/intervalProvider'; -import { timeoutProvider } from '../scheduler/timeoutProvider'; - -const defaultMaxFrame: number = 750; - -export interface RunHelpers { - cold: typeof TestScheduler.prototype.createColdObservable; - hot: typeof TestScheduler.prototype.createHotObservable; - flush: typeof TestScheduler.prototype.flush; - time: typeof TestScheduler.prototype.createTime; - expectObservable: typeof TestScheduler.prototype.expectObservable; - expectSubscriptions: typeof TestScheduler.prototype.expectSubscriptions; - animate: (marbles: string) => void; -} - -interface FlushableTest { - ready: boolean; - actual?: any[]; - expected?: any[]; -} - -export type observableToBeFn = (marbles: string, values?: any, errorValue?: any) => void; -export type subscriptionLogsToBeFn = (marbles: string | string[]) => void; - -export class TestScheduler extends VirtualTimeScheduler { - /** - * The number of virtual time units each character in a marble diagram represents. If - * the test scheduler is being used in "run mode", via the `run` method, this is temporarily - * set to `1` for the duration of the `run` block, then set back to whatever value it was. - */ - static frameTimeFactor = 10; - - /** - * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. - */ - public readonly hotObservables: HotObservable[] = []; - - /** - * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. - */ - public readonly coldObservables: ColdObservable[] = []; - - /** - * Test meta data to be processed during `flush()` - */ - private flushTests: FlushableTest[] = []; - - /** - * Indicates whether the TestScheduler instance is operating in "run mode", - * meaning it's processing a call to `run()` - */ - private runMode = false; - - /** - * - * @param assertDeepEqual A function to set up your assertion for your test harness - */ - constructor(public assertDeepEqual: (actual: any, expected: any) => boolean | void) { - super(VirtualAction, defaultMaxFrame); - } - - createTime(marbles: string): number { - const indexOf = this.runMode ? marbles.trim().indexOf('|') : marbles.indexOf('|'); - if (indexOf === -1) { - throw new Error('marble diagram for time should have a completion marker "|"'); - } - return indexOf * TestScheduler.frameTimeFactor; - } - - /** - * @param marbles A diagram in the marble DSL. Letters map to keys in `values` if provided. - * @param values Values to use for the letters in `marbles`. If omitted, the letters themselves are used. - * @param error The error to use for the `#` marble (if present). - */ - createColdObservable(marbles: string, values?: { [marble: string]: T }, error?: any): ColdObservable { - if (marbles.indexOf('^') !== -1) { - throw new Error('cold observable cannot have subscription offset "^"'); - } - if (marbles.indexOf('!') !== -1) { - throw new Error('cold observable cannot have unsubscription marker "!"'); - } - const messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); - const cold = new ColdObservable(messages, this); - this.coldObservables.push(cold); - return cold; - } - - /** - * @param marbles A diagram in the marble DSL. Letters map to keys in `values` if provided. - * @param values Values to use for the letters in `marbles`. If omitted, the letters themselves are used. - * @param error The error to use for the `#` marble (if present). - */ - createHotObservable(marbles: string, values?: { [marble: string]: T }, error?: any): HotObservable { - if (marbles.indexOf('!') !== -1) { - throw new Error('hot observable cannot have unsubscription marker "!"'); - } - const messages = TestScheduler.parseMarbles(marbles, values, error, undefined, this.runMode); - const subject = new HotObservable(messages, this); - this.hotObservables.push(subject); - return subject; - } - - private materializeInnerObservable(observable: Observable, outerFrame: number): TestMessage[] { - const messages: TestMessage[] = []; - observable.subscribe({ - next: (value) => { - messages.push({ frame: this.frame - outerFrame, notification: nextNotification(value) }); - }, - error: (error) => { - messages.push({ frame: this.frame - outerFrame, notification: errorNotification(error) }); - }, - complete: () => { - messages.push({ frame: this.frame - outerFrame, notification: COMPLETE_NOTIFICATION }); - }, - }); - return messages; - } - - expectObservable(observable: Observable, subscriptionMarbles: string | null = null) { - const actual: TestMessage[] = []; - const flushTest: FlushableTest = { actual, ready: false }; - const subscriptionParsed = TestScheduler.parseMarblesAsSubscriptions(subscriptionMarbles, this.runMode); - const subscriptionFrame = subscriptionParsed.subscribedFrame === Infinity ? 0 : subscriptionParsed.subscribedFrame; - const unsubscriptionFrame = subscriptionParsed.unsubscribedFrame; - let subscription: Subscription; - - this.schedule(() => { - subscription = observable.subscribe({ - next: (x) => { - // Support Observable-of-Observables - const value = x instanceof Observable ? this.materializeInnerObservable(x, this.frame) : x; - actual.push({ frame: this.frame, notification: nextNotification(value) }); - }, - error: (error) => { - actual.push({ frame: this.frame, notification: errorNotification(error) }); - }, - complete: () => { - actual.push({ frame: this.frame, notification: COMPLETE_NOTIFICATION }); - }, - }); - }, subscriptionFrame); - - if (unsubscriptionFrame !== Infinity) { - this.schedule(() => subscription.unsubscribe(), unsubscriptionFrame); - } - - this.flushTests.push(flushTest); - const { runMode } = this; - - return { - toBe(marbles: string, values?: any, errorValue?: any) { - flushTest.ready = true; - flushTest.expected = TestScheduler.parseMarbles(marbles, values, errorValue, true, runMode); - }, - toEqual: (other: Observable) => { - flushTest.ready = true; - flushTest.expected = []; - this.schedule(() => { - subscription = other.subscribe({ - next: (x) => { - // Support Observable-of-Observables - const value = x instanceof Observable ? this.materializeInnerObservable(x, this.frame) : x; - flushTest.expected!.push({ frame: this.frame, notification: nextNotification(value) }); - }, - error: (error) => { - flushTest.expected!.push({ frame: this.frame, notification: errorNotification(error) }); - }, - complete: () => { - flushTest.expected!.push({ frame: this.frame, notification: COMPLETE_NOTIFICATION }); - }, - }); - }, subscriptionFrame); - }, - }; - } - - expectSubscriptions(actualSubscriptionLogs: SubscriptionLog[]): { toBe: subscriptionLogsToBeFn } { - const flushTest: FlushableTest = { actual: actualSubscriptionLogs, ready: false }; - this.flushTests.push(flushTest); - const { runMode } = this; - return { - toBe(marblesOrMarblesArray: string | string[]) { - const marblesArray: string[] = typeof marblesOrMarblesArray === 'string' ? [marblesOrMarblesArray] : marblesOrMarblesArray; - flushTest.ready = true; - flushTest.expected = marblesArray - .map((marbles) => TestScheduler.parseMarblesAsSubscriptions(marbles, runMode)) - .filter((marbles) => marbles.subscribedFrame !== Infinity); - }, - }; - } - - flush() { - const hotObservables = this.hotObservables; - while (hotObservables.length > 0) { - hotObservables.shift()!.setup(); - } - - super.flush(); - - this.flushTests = this.flushTests.filter((test) => { - if (test.ready) { - this.assertDeepEqual(test.actual, test.expected); - return false; - } - return true; - }); - } - - static parseMarblesAsSubscriptions(marbles: string | null, runMode = false): SubscriptionLog { - if (typeof marbles !== 'string') { - return new SubscriptionLog(Infinity); - } - // Spreading the marbles into an array leverages ES2015's support for emoji - // characters when iterating strings. - const characters = [...marbles]; - const len = characters.length; - let groupStart = -1; - let subscriptionFrame = Infinity; - let unsubscriptionFrame = Infinity; - let frame = 0; - - for (let i = 0; i < len; i++) { - let nextFrame = frame; - const advanceFrameBy = (count: number) => { - nextFrame += count * this.frameTimeFactor; - }; - const c = characters[i]; - switch (c) { - case ' ': - // Whitespace no longer advances time - if (!runMode) { - advanceFrameBy(1); - } - break; - case '-': - advanceFrameBy(1); - break; - case '(': - groupStart = frame; - advanceFrameBy(1); - break; - case ')': - groupStart = -1; - advanceFrameBy(1); - break; - case '^': - if (subscriptionFrame !== Infinity) { - throw new Error("found a second subscription point '^' in a " + 'subscription marble diagram. There can only be one.'); - } - subscriptionFrame = groupStart > -1 ? groupStart : frame; - advanceFrameBy(1); - break; - case '!': - if (unsubscriptionFrame !== Infinity) { - throw new Error("found a second unsubscription point '!' in a " + 'subscription marble diagram. There can only be one.'); - } - unsubscriptionFrame = groupStart > -1 ? groupStart : frame; - break; - default: - // time progression syntax - if (runMode && c.match(/^[0-9]$/)) { - // Time progression must be preceded by at least one space - // if it's not at the beginning of the diagram - if (i === 0 || characters[i - 1] === ' ') { - const buffer = characters.slice(i).join(''); - const match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); - if (match) { - i += match[0].length - 1; - const duration = parseFloat(match[1]); - const unit = match[2]; - let durationInMs: number; - - switch (unit) { - case 'ms': - durationInMs = duration; - break; - case 's': - durationInMs = duration * 1000; - break; - case 'm': - durationInMs = duration * 1000 * 60; - break; - default: - break; - } - - advanceFrameBy(durationInMs! / this.frameTimeFactor); - break; - } - } - } - - throw new Error("there can only be '^' and '!' markers in a " + "subscription marble diagram. Found instead '" + c + "'."); - } - - frame = nextFrame; - } - - if (unsubscriptionFrame < 0) { - return new SubscriptionLog(subscriptionFrame); - } else { - return new SubscriptionLog(subscriptionFrame, unsubscriptionFrame); - } - } - - static parseMarbles( - marbles: string, - values?: any, - errorValue?: any, - materializeInnerObservables: boolean = false, - runMode = false - ): TestMessage[] { - if (marbles.indexOf('!') !== -1) { - throw new Error('conventional marble diagrams cannot have the ' + 'unsubscription marker "!"'); - } - // Spreading the marbles into an array leverages ES2015's support for emoji - // characters when iterating strings. - const characters = [...marbles]; - const len = characters.length; - const testMessages: TestMessage[] = []; - const subIndex = runMode ? marbles.replace(/^[ ]+/, '').indexOf('^') : marbles.indexOf('^'); - let frame = subIndex === -1 ? 0 : subIndex * -this.frameTimeFactor; - const getValue = - typeof values !== 'object' - ? (x: any) => x - : (x: any) => { - // Support Observable-of-Observables - if (materializeInnerObservables && values[x] instanceof ColdObservable) { - return values[x].messages; - } - return values[x]; - }; - let groupStart = -1; - - for (let i = 0; i < len; i++) { - let nextFrame = frame; - const advanceFrameBy = (count: number) => { - nextFrame += count * this.frameTimeFactor; - }; - - let notification: ObservableNotification | undefined; - const c = characters[i]; - switch (c) { - case ' ': - // Whitespace no longer advances time - if (!runMode) { - advanceFrameBy(1); - } - break; - case '-': - advanceFrameBy(1); - break; - case '(': - groupStart = frame; - advanceFrameBy(1); - break; - case ')': - groupStart = -1; - advanceFrameBy(1); - break; - case '|': - notification = COMPLETE_NOTIFICATION; - advanceFrameBy(1); - break; - case '^': - advanceFrameBy(1); - break; - case '#': - notification = errorNotification(errorValue || 'error'); - advanceFrameBy(1); - break; - default: - // Might be time progression syntax, or a value literal - if (runMode && c.match(/^[0-9]$/)) { - // Time progression must be preceded by at least one space - // if it's not at the beginning of the diagram - if (i === 0 || characters[i - 1] === ' ') { - const buffer = characters.slice(i).join(''); - const match = buffer.match(/^([0-9]+(?:\.[0-9]+)?)(ms|s|m) /); - if (match) { - i += match[0].length - 1; - const duration = parseFloat(match[1]); - const unit = match[2]; - let durationInMs: number; - - switch (unit) { - case 'ms': - durationInMs = duration; - break; - case 's': - durationInMs = duration * 1000; - break; - case 'm': - durationInMs = duration * 1000 * 60; - break; - default: - break; - } - - advanceFrameBy(durationInMs! / this.frameTimeFactor); - break; - } - } - } - - notification = nextNotification(getValue(c)); - advanceFrameBy(1); - break; - } - - if (notification) { - testMessages.push({ frame: groupStart > -1 ? groupStart : frame, notification }); - } - - frame = nextFrame; - } - return testMessages; - } - - private createAnimator() { - if (!this.runMode) { - throw new Error('animate() must only be used in run mode'); - } - - // The TestScheduler assigns a delegate to the provider that's used for - // requestAnimationFrame (rAF). The delegate works in conjunction with the - // animate run helper to coordinate the invocation of any rAF callbacks, - // that are effected within tests, with the animation frames specified by - // the test's author - in the marbles that are passed to the animate run - // helper. This allows the test's author to write deterministic tests and - // gives the author full control over when - or if - animation frames are - // 'painted'. - - let lastHandle = 0; - let map: Map | undefined; - - const delegate = { - requestAnimationFrame(callback: FrameRequestCallback) { - if (!map) { - throw new Error('animate() was not called within run()'); - } - const handle = ++lastHandle; - map.set(handle, callback); - return handle; - }, - cancelAnimationFrame(handle: number) { - if (!map) { - throw new Error('animate() was not called within run()'); - } - map.delete(handle); - }, - }; - - const animate = (marbles: string) => { - if (map) { - throw new Error('animate() must not be called more than once within run()'); - } - if (/[|#]/.test(marbles)) { - throw new Error('animate() must not complete or error'); - } - map = new Map(); - const messages = TestScheduler.parseMarbles(marbles, undefined, undefined, undefined, true); - for (const message of messages) { - this.schedule(() => { - const now = this.now(); - // Capture the callbacks within the queue and clear the queue - // before enumerating the callbacks, as callbacks might - // reschedule themselves. (And, yeah, we're using a Map to represent - // the queue, but the values are guaranteed to be returned in - // insertion order, so it's all good. Trust me, I've read the docs.) - const callbacks = Array.from(map!.values()); - map!.clear(); - for (const callback of callbacks) { - callback(now); - } - }, message.frame); - } - }; - - return { animate, delegate }; - } - - private createDelegates() { - // When in run mode, the TestScheduler provides alternate implementations - // of set/clearImmediate and set/clearInterval. These implementations are - // consumed by the scheduler implementations via the providers. This is - // done to effect deterministic asap and async scheduler behavior so that - // all of the schedulers are testable in 'run mode'. Prior to v7, - // delegation occurred at the scheduler level. That is, the asap and - // animation frame schedulers were identical in behavior to the async - // scheduler. Now, when in run mode, asap actions are prioritized over - // async actions and animation frame actions are coordinated using the - // animate run helper. - - let lastHandle = 0; - const scheduleLookup = new Map< - TimerHandle, - { - due: number; - duration: number; - handle: TimerHandle; - handler: () => void; - subscription: Subscription; - type: 'immediate' | 'interval' | 'timeout'; - } - >(); - - const run = () => { - // Whenever a scheduled run is executed, it must run a single immediate - // or interval action - with immediate actions being prioritized over - // interval and timeout actions. - const now = this.now(); - const scheduledRecords = Array.from(scheduleLookup.values()); - const scheduledRecordsDue = scheduledRecords.filter(({ due }) => due <= now); - const dueImmediates = scheduledRecordsDue.filter(({ type }) => type === 'immediate'); - if (dueImmediates.length > 0) { - const { handle, handler } = dueImmediates[0]; - scheduleLookup.delete(handle); - handler(); - return; - } - const dueIntervals = scheduledRecordsDue.filter(({ type }) => type === 'interval'); - if (dueIntervals.length > 0) { - const firstDueInterval = dueIntervals[0]; - const { duration, handler } = firstDueInterval; - firstDueInterval.due = now + duration; - // The interval delegate must behave like setInterval, so run needs to - // be rescheduled. This will continue until the clearInterval delegate - // unsubscribes and deletes the handle from the map. - firstDueInterval.subscription = this.schedule(run, duration); - handler(); - return; - } - const dueTimeouts = scheduledRecordsDue.filter(({ type }) => type === 'timeout'); - if (dueTimeouts.length > 0) { - const { handle, handler } = dueTimeouts[0]; - scheduleLookup.delete(handle); - handler(); - return; - } - throw new Error('Expected a due immediate or interval'); - }; - - // The following objects are the delegates that replace conventional - // runtime implementations with TestScheduler implementations. - // - // The immediate delegate is depended upon by the asapScheduler. - // - // The interval delegate is depended upon by the asyncScheduler. - // - // The timeout delegate is not depended upon by any scheduler, but it's - // included here because the onUnhandledError and onStoppedNotification - // configuration points use setTimeout to avoid producer interference. It's - // inclusion allows for the testing of these configuration points. - - const immediate = { - setImmediate: (handler: () => void) => { - const handle = ++lastHandle; - scheduleLookup.set(handle, { - due: this.now(), - duration: 0, - handle, - handler, - subscription: this.schedule(run, 0), - type: 'immediate', - }); - return handle; - }, - clearImmediate: (handle: TimerHandle) => { - const value = scheduleLookup.get(handle); - if (value) { - value.subscription.unsubscribe(); - scheduleLookup.delete(handle); - } - }, - }; - - const interval = { - setInterval: (handler: () => void, duration = 0) => { - const handle = ++lastHandle; - scheduleLookup.set(handle, { - due: this.now() + duration, - duration, - handle, - handler, - subscription: this.schedule(run, duration), - type: 'interval', - }); - return handle; - }, - clearInterval: (handle: TimerHandle) => { - const value = scheduleLookup.get(handle); - if (value) { - value.subscription.unsubscribe(); - scheduleLookup.delete(handle); - } - }, - }; - - const timeout = { - setTimeout: (handler: () => void, duration = 0) => { - const handle = ++lastHandle; - scheduleLookup.set(handle, { - due: this.now() + duration, - duration, - handle, - handler, - subscription: this.schedule(run, duration), - type: 'timeout', - }); - return handle; - }, - clearTimeout: (handle: TimerHandle) => { - const value = scheduleLookup.get(handle); - if (value) { - value.subscription.unsubscribe(); - scheduleLookup.delete(handle); - } - }, - }; - - return { immediate, interval, timeout }; - } - - /** - * The `run` method performs the test in 'run mode' - in which schedulers - * used within the test automatically delegate to the `TestScheduler`. That - * is, in 'run mode' there is no need to explicitly pass a `TestScheduler` - * instance to observable creators or operators. - * - * @see {@link /guide/testing/marble-testing} - */ - run(callback: (helpers: RunHelpers) => T): T { - const prevFrameTimeFactor = TestScheduler.frameTimeFactor; - const prevMaxFrames = this.maxFrames; - - TestScheduler.frameTimeFactor = 1; - this.maxFrames = Infinity; - this.runMode = true; - - const animator = this.createAnimator(); - const delegates = this.createDelegates(); - - animationFrameProvider.delegate = animator.delegate; - dateTimestampProvider.delegate = this; - immediateProvider.delegate = delegates.immediate; - intervalProvider.delegate = delegates.interval; - timeoutProvider.delegate = delegates.timeout; - performanceTimestampProvider.delegate = this; - - const helpers: RunHelpers = { - cold: this.createColdObservable.bind(this), - hot: this.createHotObservable.bind(this), - flush: this.flush.bind(this), - time: this.createTime.bind(this), - expectObservable: this.expectObservable.bind(this), - expectSubscriptions: this.expectSubscriptions.bind(this), - animate: animator.animate, - }; - try { - const ret = callback(helpers); - this.flush(); - return ret; - } finally { - TestScheduler.frameTimeFactor = prevFrameTimeFactor; - this.maxFrames = prevMaxFrames; - this.runMode = false; - animationFrameProvider.delegate = undefined; - dateTimestampProvider.delegate = undefined; - immediateProvider.delegate = undefined; - intervalProvider.delegate = undefined; - timeoutProvider.delegate = undefined; - performanceTimestampProvider.delegate = undefined; - } - } -} diff --git a/node_modules/rxjs/src/internal/types.ts b/node_modules/rxjs/src/internal/types.ts deleted file mode 100644 index b72eab3..0000000 --- a/node_modules/rxjs/src/internal/types.ts +++ /dev/null @@ -1,371 +0,0 @@ -// https://github.com/microsoft/TypeScript/issues/40462#issuecomment-689879308 -/// - -import { Observable } from './Observable'; -import { Subscription } from './Subscription'; - -/** - * Note: This will add Symbol.observable globally for all TypeScript users, - * however, we are no longer polyfilling Symbol.observable - */ -declare global { - interface SymbolConstructor { - readonly observable: symbol; - } -} - -/* OPERATOR INTERFACES */ - -/** - * A function type interface that describes a function that accepts one parameter `T` - * and returns another parameter `R`. - * - * Usually used to describe {@link OperatorFunction} - it always takes a single - * parameter (the source Observable) and returns another Observable. - */ -export interface UnaryFunction { - (source: T): R; -} - -export interface OperatorFunction extends UnaryFunction, Observable> {} - -export type FactoryOrValue = T | (() => T); - -/** - * A function type interface that describes a function that accepts and returns a parameter of the same type. - * - * Used to describe {@link OperatorFunction} with the only one type: `OperatorFunction`. - * - */ -export interface MonoTypeOperatorFunction extends OperatorFunction {} - -/** - * A value and the time at which it was emitted. - * - * Emitted by the `timestamp` operator - * - * @see {@link timestamp} - */ -export interface Timestamp { - value: T; - /** - * The timestamp. By default, this is in epoch milliseconds. - * Could vary based on the timestamp provider passed to the operator. - */ - timestamp: number; -} - -/** - * A value emitted and the amount of time since the last value was emitted. - * - * Emitted by the `timeInterval` operator. - * - * @see {@link timeInterval} - */ -export interface TimeInterval { - value: T; - - /** - * The amount of time between this value's emission and the previous value's emission. - * If this is the first emitted value, then it will be the amount of time since subscription - * started. - */ - interval: number; -} - -/* SUBSCRIPTION INTERFACES */ - -export interface Unsubscribable { - unsubscribe(): void; -} - -export type TeardownLogic = Subscription | Unsubscribable | (() => void) | void; - -export interface SubscriptionLike extends Unsubscribable { - unsubscribe(): void; - readonly closed: boolean; -} - -/** - * @deprecated Do not use. Most likely you want to use `ObservableInput`. Will be removed in v8. - */ -export type SubscribableOrPromise = Subscribable | Subscribable | PromiseLike | InteropObservable; - -/** OBSERVABLE INTERFACES */ - -export interface Subscribable { - subscribe(observer: Partial>): Unsubscribable; -} - -/** - * Valid types that can be converted to observables. - */ -export type ObservableInput = - | Observable - | InteropObservable - | AsyncIterable - | PromiseLike - | ArrayLike - | Iterable - | ReadableStreamLike; - -/** - * @deprecated Renamed to {@link InteropObservable }. Will be removed in v8. - */ -export type ObservableLike = InteropObservable; - -/** - * An object that implements the `Symbol.observable` interface. - */ -export interface InteropObservable { - [Symbol.observable]: () => Subscribable; -} - -/* NOTIFICATIONS */ - -/** - * A notification representing a "next" from an observable. - * Can be used with {@link dematerialize}. - */ -export interface NextNotification { - /** The kind of notification. Always "N" */ - kind: 'N'; - /** The value of the notification. */ - value: T; -} - -/** - * A notification representing an "error" from an observable. - * Can be used with {@link dematerialize}. - */ -export interface ErrorNotification { - /** The kind of notification. Always "E" */ - kind: 'E'; - error: any; -} - -/** - * A notification representing a "completion" from an observable. - * Can be used with {@link dematerialize}. - */ -export interface CompleteNotification { - kind: 'C'; -} - -/** - * Valid observable notification types. - */ -export type ObservableNotification = NextNotification | ErrorNotification | CompleteNotification; - -/* OBSERVER INTERFACES */ - -export interface NextObserver { - closed?: boolean; - next: (value: T) => void; - error?: (err: any) => void; - complete?: () => void; -} - -export interface ErrorObserver { - closed?: boolean; - next?: (value: T) => void; - error: (err: any) => void; - complete?: () => void; -} - -export interface CompletionObserver { - closed?: boolean; - next?: (value: T) => void; - error?: (err: any) => void; - complete: () => void; -} - -export type PartialObserver = NextObserver | ErrorObserver | CompletionObserver; - -/** - * An object interface that defines a set of callback functions a user can use to get - * notified of any set of {@link Observable} - * {@link guide/glossary-and-semantics#notification notification} events. - * - * For more info, please refer to {@link guide/observer this guide}. - */ -export interface Observer { - /** - * A callback function that gets called by the producer during the subscription when - * the producer "has" the `value`. It won't be called if `error` or `complete` callback - * functions have been called, nor after the consumer has unsubscribed. - * - * For more info, please refer to {@link guide/glossary-and-semantics#next this guide}. - */ - next: (value: T) => void; - /** - * A callback function that gets called by the producer if and when it encountered a - * problem of any kind. The errored value will be provided through the `err` parameter. - * This callback can't be called more than one time, it can't be called if the - * `complete` callback function have been called previously, nor it can't be called if - * the consumer has unsubscribed. - * - * For more info, please refer to {@link guide/glossary-and-semantics#error this guide}. - */ - error: (err: any) => void; - /** - * A callback function that gets called by the producer if and when it has no more - * values to provide (by calling `next` callback function). This means that no error - * has happened. This callback can't be called more than one time, it can't be called - * if the `error` callback function have been called previously, nor it can't be called - * if the consumer has unsubscribed. - * - * For more info, please refer to {@link guide/glossary-and-semantics#complete this guide}. - */ - complete: () => void; -} - -export interface SubjectLike extends Observer, Subscribable {} - -/* SCHEDULER INTERFACES */ - -export interface SchedulerLike extends TimestampProvider { - schedule(work: (this: SchedulerAction, state: T) => void, delay: number, state: T): Subscription; - schedule(work: (this: SchedulerAction, state?: T) => void, delay: number, state?: T): Subscription; - schedule(work: (this: SchedulerAction, state?: T) => void, delay?: number, state?: T): Subscription; -} - -export interface SchedulerAction extends Subscription { - schedule(state?: T, delay?: number): Subscription; -} - -/** - * This is a type that provides a method to allow RxJS to create a numeric timestamp - */ -export interface TimestampProvider { - /** - * Returns a timestamp as a number. - * - * This is used by types like `ReplaySubject` or operators like `timestamp` to calculate - * the amount of time passed between events. - */ - now(): number; -} - -/** - * Extracts the type from an `ObservableInput`. If you have - * `O extends ObservableInput` and you pass in `Observable`, or - * `Promise`, etc, it will type as `number`. - */ -export type ObservedValueOf = O extends ObservableInput ? T : never; - -/** - * Extracts a union of element types from an `ObservableInput[]`. - * If you have `O extends ObservableInput[]` and you pass in - * `Observable[]` or `Promise[]` you would get - * back a type of `string`. - * If you pass in `[Observable, Observable]` you would - * get back a type of `string | number`. - */ -export type ObservedValueUnionFromArray = X extends Array> ? T : never; - -/** - * @deprecated Renamed to {@link ObservedValueUnionFromArray}. Will be removed in v8. - */ -export type ObservedValuesFromArray = ObservedValueUnionFromArray; - -/** - * Extracts a tuple of element types from an `ObservableInput[]`. - * If you have `O extends ObservableInput[]` and you pass in - * `[Observable, Observable]` you would get back a type - * of `[string, number]`. - */ -export type ObservedValueTupleFromArray = { [K in keyof X]: ObservedValueOf }; - -/** - * Used to infer types from arguments to functions like {@link forkJoin}. - * So that you can have `forkJoin([Observable
    , PromiseLike]): Observable<[A, B]>` - * et al. - */ -export type ObservableInputTuple = { - [K in keyof T]: ObservableInput; -}; - -/** - * Constructs a new tuple with the specified type at the head. - * If you declare `Cons` you will get back `[A, B, C]`. - */ -export type Cons = ((arg: X, ...rest: Y) => any) extends (...args: infer U) => any ? U : never; - -/** - * Extracts the head of a tuple. - * If you declare `Head<[A, B, C]>` you will get back `A`. - */ -export type Head = ((...args: X) => any) extends (arg: infer U, ...rest: any[]) => any ? U : never; - -/** - * Extracts the tail of a tuple. - * If you declare `Tail<[A, B, C]>` you will get back `[B, C]`. - */ -export type Tail = ((...args: X) => any) extends (arg: any, ...rest: infer U) => any ? U : never; - -/** - * Extracts the generic value from an Array type. - * If you have `T extends Array`, and pass a `string[]` to it, - * `ValueFromArray` will return the actual type of `string`. - */ -export type ValueFromArray = A extends Array ? T : never; - -/** - * Gets the value type from an {@link ObservableNotification}, if possible. - */ -export type ValueFromNotification = T extends { kind: 'N' | 'E' | 'C' } - ? T extends NextNotification - ? T extends { value: infer V } - ? V - : undefined - : never - : never; - -/** - * A simple type to represent a gamut of "falsy" values... with a notable exception: - * `NaN` is "falsy" however, it is not and cannot be typed via TypeScript. See - * comments here: https://github.com/microsoft/TypeScript/issues/28682#issuecomment-707142417 - */ -export type Falsy = null | undefined | false | 0 | -0 | 0n | ''; - -export type TruthyTypesOf = T extends Falsy ? never : T; - -// We shouldn't rely on this type definition being available globally yet since it's -// not necessarily available in every TS environment. -interface ReadableStreamDefaultReaderLike { - // HACK: As of TS 4.2.2, The provided types for the iterator results of a `ReadableStreamDefaultReader` - // are significantly different enough from `IteratorResult` as to cause compilation errors. - // The type at the time is `ReadableStreamDefaultReadResult`. - read(): PromiseLike< - | { - done: false; - value: T; - } - | { done: true; value?: undefined } - >; - releaseLock(): void; -} - -/** - * The base signature RxJS will look for to identify and use - * a [ReadableStream](https://streams.spec.whatwg.org/#rs-class) - * as an {@link ObservableInput} source. - */ -export interface ReadableStreamLike { - getReader(): ReadableStreamDefaultReaderLike; -} - -/** - * An observable with a `connect` method that is used to create a subscription - * to an underlying source, connecting it with all consumers via a multicast. - */ -export interface Connectable extends Observable { - /** - * (Idempotent) Calling this method will connect the underlying source observable to all subscribed consumers - * through an underlying {@link Subject}. - * @returns A subscription, that when unsubscribed, will "disconnect" the source from the connector subject, - * severing notifications to all consumers. - */ - connect(): Subscription; -} diff --git a/node_modules/rxjs/src/internal/umd.ts b/node_modules/rxjs/src/internal/umd.ts deleted file mode 100644 index e81c574..0000000 --- a/node_modules/rxjs/src/internal/umd.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - NOTE: This is the global export file for rxjs v6 and higher. - */ - -/* rxjs */ -export * from '../index'; - -/* rxjs.operators */ -import * as _operators from '../operators/index'; -export const operators = _operators; - -/* rxjs.testing */ -import * as _testing from '../testing/index'; -export const testing = _testing; - -/* rxjs.ajax */ -import * as _ajax from '../ajax/index'; -export const ajax = _ajax; - -/* rxjs.webSocket */ -import * as _webSocket from '../webSocket/index'; -export const webSocket = _webSocket; - -/* rxjs.fetch */ -import * as _fetch from '../fetch/index'; -export const fetch = _fetch; diff --git a/node_modules/rxjs/src/internal/util/ArgumentOutOfRangeError.ts b/node_modules/rxjs/src/internal/util/ArgumentOutOfRangeError.ts deleted file mode 100644 index 9a89d76..0000000 --- a/node_modules/rxjs/src/internal/util/ArgumentOutOfRangeError.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { createErrorClass } from './createErrorClass'; - -export interface ArgumentOutOfRangeError extends Error {} - -export interface ArgumentOutOfRangeErrorCtor { - /** - * @deprecated Internal implementation detail. Do not construct error instances. - * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 - */ - new (): ArgumentOutOfRangeError; -} - -/** - * An error thrown when an element was queried at a certain index of an - * Observable, but no such index or position exists in that sequence. - * - * @see {@link elementAt} - * @see {@link take} - * @see {@link takeLast} - */ -export const ArgumentOutOfRangeError: ArgumentOutOfRangeErrorCtor = createErrorClass( - (_super) => - function ArgumentOutOfRangeErrorImpl(this: any) { - _super(this); - this.name = 'ArgumentOutOfRangeError'; - this.message = 'argument out of range'; - } -); diff --git a/node_modules/rxjs/src/internal/util/EmptyError.ts b/node_modules/rxjs/src/internal/util/EmptyError.ts deleted file mode 100644 index eb2c5e3..0000000 --- a/node_modules/rxjs/src/internal/util/EmptyError.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { createErrorClass } from './createErrorClass'; - -export interface EmptyError extends Error {} - -export interface EmptyErrorCtor { - /** - * @deprecated Internal implementation detail. Do not construct error instances. - * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 - */ - new (): EmptyError; -} - -/** - * An error thrown when an Observable or a sequence was queried but has no - * elements. - * - * @see {@link first} - * @see {@link last} - * @see {@link single} - * @see {@link firstValueFrom} - * @see {@link lastValueFrom} - */ -export const EmptyError: EmptyErrorCtor = createErrorClass( - (_super) => - function EmptyErrorImpl(this: any) { - _super(this); - this.name = 'EmptyError'; - this.message = 'no elements in sequence'; - } -); diff --git a/node_modules/rxjs/src/internal/util/Immediate.ts b/node_modules/rxjs/src/internal/util/Immediate.ts deleted file mode 100644 index f01f546..0000000 --- a/node_modules/rxjs/src/internal/util/Immediate.ts +++ /dev/null @@ -1,45 +0,0 @@ -let nextHandle = 1; -// The promise needs to be created lazily otherwise it won't be patched by Zones -let resolved: Promise; -const activeHandles: { [key: number]: any } = {}; - -/** - * Finds the handle in the list of active handles, and removes it. - * Returns `true` if found, `false` otherwise. Used both to clear - * Immediate scheduled tasks, and to identify if a task should be scheduled. - */ -function findAndClearHandle(handle: number): boolean { - if (handle in activeHandles) { - delete activeHandles[handle]; - return true; - } - return false; -} - -/** - * Helper functions to schedule and unschedule microtasks. - */ -export const Immediate = { - setImmediate(cb: () => void): number { - const handle = nextHandle++; - activeHandles[handle] = true; - if (!resolved) { - resolved = Promise.resolve(); - } - resolved.then(() => findAndClearHandle(handle) && cb()); - return handle; - }, - - clearImmediate(handle: number): void { - findAndClearHandle(handle); - }, -}; - -/** - * Used for internal testing purposes only. Do not export from library. - */ -export const TestTools = { - pending() { - return Object.keys(activeHandles).length; - } -}; diff --git a/node_modules/rxjs/src/internal/util/NotFoundError.ts b/node_modules/rxjs/src/internal/util/NotFoundError.ts deleted file mode 100644 index ecd213f..0000000 --- a/node_modules/rxjs/src/internal/util/NotFoundError.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { createErrorClass } from './createErrorClass'; - -export interface NotFoundError extends Error {} - -export interface NotFoundErrorCtor { - /** - * @deprecated Internal implementation detail. Do not construct error instances. - * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 - */ - new (message: string): NotFoundError; -} - -/** - * An error thrown when a value or values are missing from an - * observable sequence. - * - * @see {@link operators/single} - */ -export const NotFoundError: NotFoundErrorCtor = createErrorClass( - (_super) => - function NotFoundErrorImpl(this: any, message: string) { - _super(this); - this.name = 'NotFoundError'; - this.message = message; - } -); diff --git a/node_modules/rxjs/src/internal/util/ObjectUnsubscribedError.ts b/node_modules/rxjs/src/internal/util/ObjectUnsubscribedError.ts deleted file mode 100644 index 5e833f9..0000000 --- a/node_modules/rxjs/src/internal/util/ObjectUnsubscribedError.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { createErrorClass } from './createErrorClass'; - -export interface ObjectUnsubscribedError extends Error {} - -export interface ObjectUnsubscribedErrorCtor { - /** - * @deprecated Internal implementation detail. Do not construct error instances. - * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 - */ - new (): ObjectUnsubscribedError; -} - -/** - * An error thrown when an action is invalid because the object has been - * unsubscribed. - * - * @see {@link Subject} - * @see {@link BehaviorSubject} - * - * @class ObjectUnsubscribedError - */ -export const ObjectUnsubscribedError: ObjectUnsubscribedErrorCtor = createErrorClass( - (_super) => - function ObjectUnsubscribedErrorImpl(this: any) { - _super(this); - this.name = 'ObjectUnsubscribedError'; - this.message = 'object unsubscribed'; - } -); diff --git a/node_modules/rxjs/src/internal/util/SequenceError.ts b/node_modules/rxjs/src/internal/util/SequenceError.ts deleted file mode 100644 index 06483d0..0000000 --- a/node_modules/rxjs/src/internal/util/SequenceError.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { createErrorClass } from './createErrorClass'; - -export interface SequenceError extends Error {} - -export interface SequenceErrorCtor { - /** - * @deprecated Internal implementation detail. Do not construct error instances. - * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 - */ - new (message: string): SequenceError; -} - -/** - * An error thrown when something is wrong with the sequence of - * values arriving on the observable. - * - * @see {@link operators/single} - */ -export const SequenceError: SequenceErrorCtor = createErrorClass( - (_super) => - function SequenceErrorImpl(this: any, message: string) { - _super(this); - this.name = 'SequenceError'; - this.message = message; - } -); diff --git a/node_modules/rxjs/src/internal/util/UnsubscriptionError.ts b/node_modules/rxjs/src/internal/util/UnsubscriptionError.ts deleted file mode 100644 index cd7d09f..0000000 --- a/node_modules/rxjs/src/internal/util/UnsubscriptionError.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { createErrorClass } from './createErrorClass'; - -export interface UnsubscriptionError extends Error { - readonly errors: any[]; -} - -export interface UnsubscriptionErrorCtor { - /** - * @deprecated Internal implementation detail. Do not construct error instances. - * Cannot be tagged as internal: https://github.com/ReactiveX/rxjs/issues/6269 - */ - new (errors: any[]): UnsubscriptionError; -} - -/** - * An error thrown when one or more errors have occurred during the - * `unsubscribe` of a {@link Subscription}. - */ -export const UnsubscriptionError: UnsubscriptionErrorCtor = createErrorClass( - (_super) => - function UnsubscriptionErrorImpl(this: any, errors: (Error | string)[]) { - _super(this); - this.message = errors - ? `${errors.length} errors occurred during unsubscription: -${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\n ')}` - : ''; - this.name = 'UnsubscriptionError'; - this.errors = errors; - } -); diff --git a/node_modules/rxjs/src/internal/util/applyMixins.ts b/node_modules/rxjs/src/internal/util/applyMixins.ts deleted file mode 100644 index 7c1ed24..0000000 --- a/node_modules/rxjs/src/internal/util/applyMixins.ts +++ /dev/null @@ -1,10 +0,0 @@ -export function applyMixins(derivedCtor: any, baseCtors: any[]) { - for (let i = 0, len = baseCtors.length; i < len; i++) { - const baseCtor = baseCtors[i]; - const propertyKeys = Object.getOwnPropertyNames(baseCtor.prototype); - for (let j = 0, len2 = propertyKeys.length; j < len2; j++) { - const name = propertyKeys[j]; - derivedCtor.prototype[name] = baseCtor.prototype[name]; - } - } -} \ No newline at end of file diff --git a/node_modules/rxjs/src/internal/util/args.ts b/node_modules/rxjs/src/internal/util/args.ts deleted file mode 100644 index 0ce104b..0000000 --- a/node_modules/rxjs/src/internal/util/args.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { SchedulerLike } from '../types'; -import { isFunction } from './isFunction'; -import { isScheduler } from './isScheduler'; - -function last(arr: T[]): T | undefined { - return arr[arr.length - 1]; -} - -export function popResultSelector(args: any[]): ((...args: unknown[]) => unknown) | undefined { - return isFunction(last(args)) ? args.pop() : undefined; -} - -export function popScheduler(args: any[]): SchedulerLike | undefined { - return isScheduler(last(args)) ? args.pop() : undefined; -} - -export function popNumber(args: any[], defaultValue: number): number { - return typeof last(args) === 'number' ? args.pop()! : defaultValue; -} diff --git a/node_modules/rxjs/src/internal/util/argsArgArrayOrObject.ts b/node_modules/rxjs/src/internal/util/argsArgArrayOrObject.ts deleted file mode 100644 index 483bef9..0000000 --- a/node_modules/rxjs/src/internal/util/argsArgArrayOrObject.ts +++ /dev/null @@ -1,30 +0,0 @@ -const { isArray } = Array; -const { getPrototypeOf, prototype: objectProto, keys: getKeys } = Object; - -/** - * Used in functions where either a list of arguments, a single array of arguments, or a - * dictionary of arguments can be returned. Returns an object with an `args` property with - * the arguments in an array, if it is a dictionary, it will also return the `keys` in another - * property. - */ -export function argsArgArrayOrObject>(args: T[] | [O] | [T[]]): { args: T[]; keys: string[] | null } { - if (args.length === 1) { - const first = args[0]; - if (isArray(first)) { - return { args: first, keys: null }; - } - if (isPOJO(first)) { - const keys = getKeys(first); - return { - args: keys.map((key) => first[key]), - keys, - }; - } - } - - return { args: args as T[], keys: null }; -} - -function isPOJO(obj: any): obj is object { - return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto; -} diff --git a/node_modules/rxjs/src/internal/util/argsOrArgArray.ts b/node_modules/rxjs/src/internal/util/argsOrArgArray.ts deleted file mode 100644 index b0096ce..0000000 --- a/node_modules/rxjs/src/internal/util/argsOrArgArray.ts +++ /dev/null @@ -1,9 +0,0 @@ -const { isArray } = Array; - -/** - * Used in operators and functions that accept either a list of arguments, or an array of arguments - * as a single argument. - */ -export function argsOrArgArray(args: (T | T[])[]): T[] { - return args.length === 1 && isArray(args[0]) ? args[0] : (args as T[]); -} diff --git a/node_modules/rxjs/src/internal/util/arrRemove.ts b/node_modules/rxjs/src/internal/util/arrRemove.ts deleted file mode 100644 index 51a76cd..0000000 --- a/node_modules/rxjs/src/internal/util/arrRemove.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Removes an item from an array, mutating it. - * @param arr The array to remove the item from - * @param item The item to remove - */ -export function arrRemove(arr: T[] | undefined | null, item: T) { - if (arr) { - const index = arr.indexOf(item); - 0 <= index && arr.splice(index, 1); - } -} diff --git a/node_modules/rxjs/src/internal/util/createErrorClass.ts b/node_modules/rxjs/src/internal/util/createErrorClass.ts deleted file mode 100644 index e354fd3..0000000 --- a/node_modules/rxjs/src/internal/util/createErrorClass.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Used to create Error subclasses until the community moves away from ES5. - * - * This is because compiling from TypeScript down to ES5 has issues with subclassing Errors - * as well as other built-in types: https://github.com/Microsoft/TypeScript/issues/12123 - * - * @param createImpl A factory function to create the actual constructor implementation. The returned - * function should be a named function that calls `_super` internally. - */ -export function createErrorClass(createImpl: (_super: any) => any): T { - const _super = (instance: any) => { - Error.call(instance); - instance.stack = new Error().stack; - }; - - const ctorFunc = createImpl(_super); - ctorFunc.prototype = Object.create(Error.prototype); - ctorFunc.prototype.constructor = ctorFunc; - return ctorFunc; -} diff --git a/node_modules/rxjs/src/internal/util/createObject.ts b/node_modules/rxjs/src/internal/util/createObject.ts deleted file mode 100644 index 0f79f92..0000000 --- a/node_modules/rxjs/src/internal/util/createObject.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function createObject(keys: string[], values: any[]) { - return keys.reduce((result, key, i) => ((result[key] = values[i]), result), {} as any); -} diff --git a/node_modules/rxjs/src/internal/util/errorContext.ts b/node_modules/rxjs/src/internal/util/errorContext.ts deleted file mode 100644 index 6c4ffb1..0000000 --- a/node_modules/rxjs/src/internal/util/errorContext.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { config } from '../config'; - -let context: { errorThrown: boolean; error: any } | null = null; - -/** - * Handles dealing with errors for super-gross mode. Creates a context, in which - * any synchronously thrown errors will be passed to {@link captureError}. Which - * will record the error such that it will be rethrown after the call back is complete. - * TODO: Remove in v8 - * @param cb An immediately executed function. - */ -export function errorContext(cb: () => void) { - if (config.useDeprecatedSynchronousErrorHandling) { - const isRoot = !context; - if (isRoot) { - context = { errorThrown: false, error: null }; - } - cb(); - if (isRoot) { - const { errorThrown, error } = context!; - context = null; - if (errorThrown) { - throw error; - } - } - } else { - // This is the general non-deprecated path for everyone that - // isn't crazy enough to use super-gross mode (useDeprecatedSynchronousErrorHandling) - cb(); - } -} - -/** - * Captures errors only in super-gross mode. - * @param err the error to capture - */ -export function captureError(err: any) { - if (config.useDeprecatedSynchronousErrorHandling && context) { - context.errorThrown = true; - context.error = err; - } -} diff --git a/node_modules/rxjs/src/internal/util/executeSchedule.ts b/node_modules/rxjs/src/internal/util/executeSchedule.ts deleted file mode 100644 index 1bcb990..0000000 --- a/node_modules/rxjs/src/internal/util/executeSchedule.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Subscription } from '../Subscription'; -import { SchedulerAction, SchedulerLike } from '../types'; - -export function executeSchedule( - parentSubscription: Subscription, - scheduler: SchedulerLike, - work: () => void, - delay: number, - repeat: true -): void; -export function executeSchedule( - parentSubscription: Subscription, - scheduler: SchedulerLike, - work: () => void, - delay?: number, - repeat?: false -): Subscription; - -export function executeSchedule( - parentSubscription: Subscription, - scheduler: SchedulerLike, - work: () => void, - delay = 0, - repeat = false -): Subscription | void { - const scheduleSubscription = scheduler.schedule(function (this: SchedulerAction) { - work(); - if (repeat) { - parentSubscription.add(this.schedule(null, delay)); - } else { - this.unsubscribe(); - } - }, delay); - - parentSubscription.add(scheduleSubscription); - - if (!repeat) { - // Because user-land scheduler implementations are unlikely to properly reuse - // Actions for repeat scheduling, we can't trust that the returned subscription - // will control repeat subscription scenarios. So we're trying to avoid using them - // incorrectly within this library. - return scheduleSubscription; - } -} diff --git a/node_modules/rxjs/src/internal/util/identity.ts b/node_modules/rxjs/src/internal/util/identity.ts deleted file mode 100644 index 0b07958..0000000 --- a/node_modules/rxjs/src/internal/util/identity.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * This function takes one parameter and just returns it. Simply put, - * this is like `(x: T): T => x`. - * - * ## Examples - * - * This is useful in some cases when using things like `mergeMap` - * - * ```ts - * import { interval, take, map, range, mergeMap, identity } from 'rxjs'; - * - * const source$ = interval(1000).pipe(take(5)); - * - * const result$ = source$.pipe( - * map(i => range(i)), - * mergeMap(identity) // same as mergeMap(x => x) - * ); - * - * result$.subscribe({ - * next: console.log - * }); - * ``` - * - * Or when you want to selectively apply an operator - * - * ```ts - * import { interval, take, identity } from 'rxjs'; - * - * const shouldLimit = () => Math.random() < 0.5; - * - * const source$ = interval(1000); - * - * const result$ = source$.pipe(shouldLimit() ? take(5) : identity); - * - * result$.subscribe({ - * next: console.log - * }); - * ``` - * - * @param x Any value that is returned by this function - * @returns The value passed as the first parameter to this function - */ -export function identity(x: T): T { - return x; -} diff --git a/node_modules/rxjs/src/internal/util/isArrayLike.ts b/node_modules/rxjs/src/internal/util/isArrayLike.ts deleted file mode 100644 index 6f634d4..0000000 --- a/node_modules/rxjs/src/internal/util/isArrayLike.ts +++ /dev/null @@ -1 +0,0 @@ -export const isArrayLike = ((x: any): x is ArrayLike => x && typeof x.length === 'number' && typeof x !== 'function'); \ No newline at end of file diff --git a/node_modules/rxjs/src/internal/util/isAsyncIterable.ts b/node_modules/rxjs/src/internal/util/isAsyncIterable.ts deleted file mode 100644 index d419dc3..0000000 --- a/node_modules/rxjs/src/internal/util/isAsyncIterable.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { isFunction } from './isFunction'; - -export function isAsyncIterable(obj: any): obj is AsyncIterable { - return Symbol.asyncIterator && isFunction(obj?.[Symbol.asyncIterator]); -} diff --git a/node_modules/rxjs/src/internal/util/isDate.ts b/node_modules/rxjs/src/internal/util/isDate.ts deleted file mode 100644 index ed09ffb..0000000 --- a/node_modules/rxjs/src/internal/util/isDate.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Checks to see if a value is not only a `Date` object, - * but a *valid* `Date` object that can be converted to a - * number. For example, `new Date('blah')` is indeed an - * `instanceof Date`, however it cannot be converted to a - * number. - */ -export function isValidDate(value: any): value is Date { - return value instanceof Date && !isNaN(value as any); -} diff --git a/node_modules/rxjs/src/internal/util/isFunction.ts b/node_modules/rxjs/src/internal/util/isFunction.ts deleted file mode 100644 index 2715f07..0000000 --- a/node_modules/rxjs/src/internal/util/isFunction.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Returns true if the object is a function. - * @param value The value to check - */ -export function isFunction(value: any): value is (...args: any[]) => any { - return typeof value === 'function'; -} diff --git a/node_modules/rxjs/src/internal/util/isInteropObservable.ts b/node_modules/rxjs/src/internal/util/isInteropObservable.ts deleted file mode 100644 index e709b8a..0000000 --- a/node_modules/rxjs/src/internal/util/isInteropObservable.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { InteropObservable } from '../types'; -import { observable as Symbol_observable } from '../symbol/observable'; -import { isFunction } from './isFunction'; - -/** Identifies an input as being Observable (but not necessary an Rx Observable) */ -export function isInteropObservable(input: any): input is InteropObservable { - return isFunction(input[Symbol_observable]); -} diff --git a/node_modules/rxjs/src/internal/util/isIterable.ts b/node_modules/rxjs/src/internal/util/isIterable.ts deleted file mode 100644 index 9b492b3..0000000 --- a/node_modules/rxjs/src/internal/util/isIterable.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { iterator as Symbol_iterator } from '../symbol/iterator'; -import { isFunction } from './isFunction'; - -/** Identifies an input as being an Iterable */ -export function isIterable(input: any): input is Iterable { - return isFunction(input?.[Symbol_iterator]); -} diff --git a/node_modules/rxjs/src/internal/util/isObservable.ts b/node_modules/rxjs/src/internal/util/isObservable.ts deleted file mode 100644 index 8df8f32..0000000 --- a/node_modules/rxjs/src/internal/util/isObservable.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** prettier */ -import { Observable } from '../Observable'; -import { isFunction } from './isFunction'; - -/** - * Tests to see if the object is an RxJS {@link Observable} - * @param obj the object to test - */ -export function isObservable(obj: any): obj is Observable { - // The !! is to ensure that this publicly exposed function returns - // `false` if something like `null` or `0` is passed. - return !!obj && (obj instanceof Observable || (isFunction(obj.lift) && isFunction(obj.subscribe))); -} diff --git a/node_modules/rxjs/src/internal/util/isPromise.ts b/node_modules/rxjs/src/internal/util/isPromise.ts deleted file mode 100644 index 0baef64..0000000 --- a/node_modules/rxjs/src/internal/util/isPromise.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { isFunction } from "./isFunction"; - -/** - * Tests to see if the object is "thennable". - * @param value the object to test - */ -export function isPromise(value: any): value is PromiseLike { - return isFunction(value?.then); -} diff --git a/node_modules/rxjs/src/internal/util/isReadableStreamLike.ts b/node_modules/rxjs/src/internal/util/isReadableStreamLike.ts deleted file mode 100644 index 87b9c15..0000000 --- a/node_modules/rxjs/src/internal/util/isReadableStreamLike.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ReadableStreamLike } from '../types'; -import { isFunction } from './isFunction'; - -export async function* readableStreamLikeToAsyncGenerator(readableStream: ReadableStreamLike): AsyncGenerator { - const reader = readableStream.getReader(); - try { - while (true) { - const { value, done } = await reader.read(); - if (done) { - return; - } - yield value!; - } - } finally { - reader.releaseLock(); - } -} - -export function isReadableStreamLike(obj: any): obj is ReadableStreamLike { - // We don't want to use instanceof checks because they would return - // false for instances from another Realm, like an

    - Nodemon Logo -

    - - - -
    - Want to contribute? Check out our contribution guidelines. -